[TNEXT-2899] Update audio status when SCO is opened 61/155761/1 accepted/tizen/unified/20171017.070842 submit/tizen/20171016.084528
authorsinikang <sinikang@samsung.com>
Mon, 16 Oct 2017 05:35:54 +0000 (14:35 +0900)
committersinikang <sinikang@samsung.com>
Mon, 16 Oct 2017 05:35:54 +0000 (14:35 +0900)
 - In case of BT Voicecall,
   When audio path is set to BT Voice, volume info is unavaliable.
   So should update audio status when SCO is opened.

Change-Id: I8d068838064bc72bfbed7a803f935cb15c5b66f0

packaging/call-manager.spec
service/src/callmgr-core.c

index 9835e59..19b0221 100644 (file)
@@ -1,6 +1,6 @@
 %define major 0
 %define minor 2
-%define patchlevel 38
+%define patchlevel 39
 %define ext_feature 0
 
 Name:           call-manager
index c65d938..f91cf4e 100644 (file)
@@ -1633,7 +1633,10 @@ static void __callmgr_core_process_audio_events(cm_audio_event_type_e event_type
                callmgr_path_type_e route = CALL_AUDIO_PATH_NONE_E;
 
                _callmgr_core_get_audio_state(core_data, &route);
-               _callmgr_dbus_send_audio_status(core_data, route);
+               if (route != CALL_AUDIO_PATH_BT_E)
+                       _callmgr_dbus_send_audio_status(core_data, route);
+               else
+                       info("[BT Voice ] Do not update audio status in here");
                if (route != CALL_AUDIO_PATH_NONE_E) {
                        __callmgr_core_set_telephony_audio_route(core_data, active_device);
                }
@@ -1881,6 +1884,15 @@ static void __callmgr_core_process_bt_events(cm_bt_event_type_e event_type, void
                        is_sco_opened = GPOINTER_TO_INT(event_data);
                        info("sco open status : %d", is_sco_opened);
 
+                       if (TRUE == is_sco_opened) {
+                               callmgr_path_type_e route = CALL_AUDIO_PATH_NONE_E;
+                               _callmgr_core_get_audio_state(core_data, &route);
+                               if (route == CALL_AUDIO_PATH_BT_E) {
+                                       info("[BT Voice] Should update audio status when SCO is opened");
+                                       _callmgr_dbus_send_audio_status(core_data, route);
+                               }
+                       }
+
                        _callmgr_bt_is_wbs_mode(&is_wbs_mode);
                        if (FALSE == is_wbs_mode) {
                                _callmgr_audio_set_bt_band(core_data->audio_handle, CM_AUDIO_BT_BAND_NB);