diff options
author | Ayush Garg <ayush.garg@samsung.com> | 2022-09-29 13:36:43 +0530 |
---|---|---|
committer | Ayush Garg <ayush.garg@samsung.com> | 2022-09-29 14:04:57 +0530 |
commit | c859b060b3fe10cef6c595c8b8ed8098d53b5fdd (patch) | |
tree | da2eca55c30d6d622c483e89565eb5d393f77745 /src/bluetooth-audio.c | |
parent | ea5ea73fd1875b463f3ff697f55dc588225d9c38 (diff) | |
download | bluetooth-c859b060b3fe10cef6c595c8b8ed8098d53b5fdd.tar.gz bluetooth-c859b060b3fe10cef6c595c8b8ed8098d53b5fdd.tar.bz2 bluetooth-c859b060b3fe10cef6c595c8b8ed8098d53b5fdd.zip |
fhub: Add DA featurestizen_7.0_m2_releaseaccepted/tizen/unified/20221006.065349accepted/tizen/unified/20221006.065311accepted/tizen/7.0/unified/hotfix/20221116.104614accepted/tizen/7.0/unified/20221110.063739tizen_7.0_hotfixaccepted/tizen_7.0_unified_hotfix
Applied patches
- add BT_HF_EVENT_AUDIO_MUTE event for audio mute function
- modify profile check routine for HFP & PBAP
This patchset should be merged with the following bluetooth-frwk's
patchset in order to build successfully:
bluetooth-frwk Change-Id: Ifc77646b0ef4cac509c88b647d86855baa658d3e
Change-Id: I3144f6091206891a67e19e81badf80737d8c5df6
Signed-off-by: shss-choi <shss.choi@samsung.com>
Signed-off-by: Ayush Garg <ayush.garg@samsung.com>
Diffstat (limited to 'src/bluetooth-audio.c')
-rw-r--r-- | src/bluetooth-audio.c | 40 |
1 files changed, 25 insertions, 15 deletions
diff --git a/src/bluetooth-audio.c b/src/bluetooth-audio.c index ae78e18..6a5d39d 100644 --- a/src/bluetooth-audio.c +++ b/src/bluetooth-audio.c @@ -132,7 +132,7 @@ int bt_audio_initialize(void) else is_audio_a2dp_initialized = true; - if (TIZEN_PROFILE_WEARABLE_IVI) { + if (TIZEN_PROFILE_WEARABLE_IVI || TIZEN_FEATURE_FHUB_REFERENCE) { error = bluetooth_hf_init(_bt_hf_event_proxy, NULL); /* LCOV_EXCL_LINE */ error = _bt_get_error_code(error); /* LCOV_EXCL_LINE */ if (BT_ERROR_NONE != error) /* LCOV_EXCL_LINE */ @@ -142,12 +142,14 @@ int bt_audio_initialize(void) } #ifndef TIZEN_FEATURE_HFP_DISABLE /* B2_3G */ - error = bluetooth_telephony_init((void *)_bt_telephony_event_proxy, NULL); - error = _bt_convert_telephony_error_code(error); - if (BT_ERROR_NONE != error) - BT_ERR("[%s] (0x%08x)", _bt_convert_error_to_string(error), error); /* LCOV_EXCL_LINE */ - else - is_audio_ag_initialized = true; + if (!TIZEN_FEATURE_FHUB_REFERENCE) { + error = bluetooth_telephony_init((void *)_bt_telephony_event_proxy, NULL); + error = _bt_convert_telephony_error_code(error); + if (BT_ERROR_NONE != error) + BT_ERR("[%s] (0x%08x)", _bt_convert_error_to_string(error), error); /* LCOV_EXCL_LINE */ + else + is_audio_ag_initialized = true; + } #endif /* There is no success case for 3 profiles */ @@ -174,7 +176,7 @@ int bt_audio_deinitialize(void) is_audio_a2dp_initialized = false; - if (TIZEN_PROFILE_WEARABLE_IVI) { /* LCOV_EXCL_START */ + if (TIZEN_PROFILE_WEARABLE_IVI || TIZEN_FEATURE_FHUB_REFERENCE) { /* LCOV_EXCL_START */ error = bluetooth_hf_deinit(); error = _bt_get_error_code(error); if (BT_ERROR_NONE != error) @@ -184,12 +186,14 @@ int bt_audio_deinitialize(void) } #ifndef TIZEN_FEATURE_HFP_DISABLE /* B2_3G */ - error = bluetooth_telephony_deinit(); - error = _bt_convert_telephony_error_code(error); - if (BT_ERROR_NONE != error) - BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(error), error); + if (!TIZEN_FEATURE_FHUB_REFERENCE) { + error = bluetooth_telephony_deinit(); + error = _bt_convert_telephony_error_code(error); + if (BT_ERROR_NONE != error) + BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(error), error); - is_audio_ag_initialized = false; + is_audio_ag_initialized = false; + } #endif return BT_ERROR_NONE; @@ -242,7 +246,7 @@ int bt_audio_connect(const char *remote_address, bt_audio_profile_type_e type) error = bluetooth_av_source_connect(&addr_hex); break; case BT_AUDIO_PROFILE_TYPE_AG: - if (TIZEN_PROFILE_WEARABLE_IVI) { + if (TIZEN_PROFILE_WEARABLE_IVI || TIZEN_FEATURE_FHUB_REFERENCE) { BT_CHECK_HF_INIT_STATUS(); error = bluetooth_hf_connect(&addr_hex); break; @@ -301,7 +305,7 @@ int bt_audio_disconnect(const char *remote_address, bt_audio_profile_type_e type error = bluetooth_av_source_disconnect(&addr_hex); break; case BT_AUDIO_PROFILE_TYPE_AG: - if (TIZEN_PROFILE_WEARABLE_IVI) { + if (TIZEN_PROFILE_WEARABLE_IVI || TIZEN_FEATURE_FHUB_REFERENCE) { BT_CHECK_HF_INIT_STATUS(); error = bluetooth_hf_disconnect(&addr_hex); break; @@ -1080,6 +1084,12 @@ int bt_hf_notify_call_event(bt_hf_call_event_e event, char *phone_number) case BT_HF_CALL_EVENT_ADD_TO_CONVERSATION: error = bluetooth_hf_join_call(); break; + case BT_HF_CALL_EVENT_AUDIO_MUTE_ON: + error = bluetooth_hf_audio_mute_on(); + break; + case BT_HF_CALL_EVENT_AUDIO_MUTE_OFF: + error = bluetooth_hf_audio_mute_off(); + break; default: error = BLUETOOTH_ERROR_INVALID_PARAM; break; |