diff options
author | DoHyun Pyun <dh79.pyun@samsung.com> | 2020-03-05 09:17:16 +0900 |
---|---|---|
committer | DoHyun Pyun <dh79.pyun@samsung.com> | 2020-03-05 14:01:06 +0900 |
commit | e3a0e2d4981fd475aff9b55c26b8703c785d4ba3 (patch) | |
tree | 874863c15a157fa6da657a646d5d61e50f532851 /test | |
parent | ef906f6f27adb37dcf5f242c9ef20390212953f2 (diff) | |
download | bluetooth-e3a0e2d4981fd475aff9b55c26b8703c785d4ba3.tar.gz bluetooth-e3a0e2d4981fd475aff9b55c26b8703c785d4ba3.tar.bz2 bluetooth-e3a0e2d4981fd475aff9b55c26b8703c785d4ba3.zip |
Enable speaker and microphone gain change eventsubmit/tizen/20200310.235006accepted/tizen/unified/20200312.234409
Change-Id: If9ca3cede8aecc56efa0119bf9a0e7a1bab66150
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
Diffstat (limited to 'test')
-rw-r--r-- | test/bt_unit_test.c | 36 | ||||
-rw-r--r-- | test/bt_unit_test.h | 4 |
2 files changed, 40 insertions, 0 deletions
diff --git a/test/bt_unit_test.c b/test/bt_unit_test.c index 411c5c9..61fd1ed 100644 --- a/test/bt_unit_test.c +++ b/test/bt_unit_test.c @@ -532,6 +532,14 @@ tc_table_t tc_audio[] = { , BT_UNIT_TEST_FUNCTION_AG_SET_SCO_STATE_CHANGED_CB}, {"bt_ag_unset_sco_state_changed_cb" , BT_UNIT_TEST_FUNCTION_AG_UNSET_SCO_STATE_CHANGED_CB}, + {"bt_ag_set_speaker_gain_changed_cb" + , BT_UNIT_TEST_FUNCTION_AG_SET_SPEAKER_GAIN_CHANGED_CB}, + {"bt_ag_unset_speaker_gain_changed_cb" + , BT_UNIT_TEST_FUNCTION_AG_UNSET_SPEAKER_GAIN_CHANGED_CB}, + {"bt_ag_set_microphone_gain_changed_cb" + , BT_UNIT_TEST_FUNCTION_AG_SET_MICRO_GAIN_CHANGED_CB}, + {"bt_ag_unset_microphone_gain_changed_cb" + , BT_UNIT_TEST_FUNCTION_AG_UNSET_MICRO_GAIN_CHANGED_CB}, {"bt_ag_is_connected" , BT_UNIT_TEST_FUNCTION_AG_IS_CONNECTED}, {"BT_AG_CALL_EVENT_IDLE" @@ -2163,6 +2171,16 @@ void __bt_ag_sco_state_changed_cb(int result, TC_PRT("opened [%s]", opened ? "YES" : "NO"); } +void __bt_ag_speaker_gain_changed_cb(int gain, void *user_data) +{ + TC_PRT("gain [%d]", gain); +} + +void __bt_ag_microphone_gain_changed_cb(int gain, void *user_data) +{ + TC_PRT("gain [%d]", gain); +} + void __bt_ag_set_call_handling_event_cb(bt_ag_call_handling_event_e event, unsigned int call_id, void *user_data) { @@ -6044,6 +6062,24 @@ int test_input_callback(void *data) ret = bt_ag_unset_sco_state_changed_cb(); TC_PRT("returns %s\n", __bt_get_error_message(ret)); break; + case BT_UNIT_TEST_FUNCTION_AG_SET_SPEAKER_GAIN_CHANGED_CB: + ret = bt_ag_set_speaker_gain_changed_cb( + __bt_ag_speaker_gain_changed_cb, NULL); + TC_PRT("returns %s\n", __bt_get_error_message(ret)); + break; + case BT_UNIT_TEST_FUNCTION_AG_UNSET_SPEAKER_GAIN_CHANGED_CB: + ret = bt_ag_unset_speaker_gain_changed_cb(); + TC_PRT("returns %s\n", __bt_get_error_message(ret)); + break; + case BT_UNIT_TEST_FUNCTION_AG_SET_MICRO_GAIN_CHANGED_CB: + ret = bt_ag_set_microphone_gain_changed_cb( + __bt_ag_microphone_gain_changed_cb, NULL); + TC_PRT("returns %s\n", __bt_get_error_message(ret)); + break; + case BT_UNIT_TEST_FUNCTION_AG_UNSET_MICRO_GAIN_CHANGED_CB: + ret = bt_ag_unset_microphone_gain_changed_cb(); + TC_PRT("returns %s\n", __bt_get_error_message(ret)); + break; case BT_UNIT_TEST_FUNCTION_AG_IS_CONNECTED: { bool connected = false; ret = bt_ag_is_connected(&connected); diff --git a/test/bt_unit_test.h b/test/bt_unit_test.h index e41dcf0..a7bb745 100644 --- a/test/bt_unit_test.h +++ b/test/bt_unit_test.h @@ -216,6 +216,10 @@ typedef enum { BT_UNIT_TEST_FUNCTION_AG_IS_SCO_OPENED, BT_UNIT_TEST_FUNCTION_AG_SET_SCO_STATE_CHANGED_CB, BT_UNIT_TEST_FUNCTION_AG_UNSET_SCO_STATE_CHANGED_CB, + BT_UNIT_TEST_FUNCTION_AG_SET_SPEAKER_GAIN_CHANGED_CB, + BT_UNIT_TEST_FUNCTION_AG_UNSET_SPEAKER_GAIN_CHANGED_CB, + BT_UNIT_TEST_FUNCTION_AG_SET_MICRO_GAIN_CHANGED_CB, + BT_UNIT_TEST_FUNCTION_AG_UNSET_MICRO_GAIN_CHANGED_CB, BT_UNIT_TEST_FUNCTION_AG_IS_CONNECTED, BT_UNIT_TEST_FUNCTION_AG_CALL_EVENT_IDLE, BT_UNIT_TEST_FUNCTION_AG_CALL_EVENT_ANSWERED, |