From: Petteri Tikander Date: Tue, 18 Jun 2013 10:37:21 +0000 (+0300) Subject: Allow to change audio-route path to BT-headset also after receiving the acknowledgeme... X-Git-Tag: submit/tizen_2.2/20130714.152348~1^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=065fb3b080ecd202ab83b421061b0b2a63dd1ecb;p=apps%2Fhome%2Fcall.git Allow to change audio-route path to BT-headset also after receiving the acknowledgement for bt_ag_open_sco. Fix is for TDIS-6026, TZSP-6058 When switching from receiver- or speaker-audio path to BT-headset in PR3, changing audio-route path to BT-headset fails in voicecall_snd_change_path(), because VCONF-value 'memory/bluetooth/btsco' will be set by BT-framework to TRUE just AFTER checking it, so too late. In Lunchbox, 'memory/bluetooth/btsco' will be set earlier, so voicecall_snd_change_path_real() will be called in voicecall_snd_change_path(). Later even after succesfull receive of __vc_bt_ag_sco_state_changed_cb()-event, 'bt_connected'-flag is still FALSE (because being earlier in receiver/speaker), so audio-path will not be changed even in this function. 'bt_connected'-flag will be set after __vc_bt_audio_connection_state_changed_cb() event, but also now audio-path change fails in __vc_bt_handle_connectivity_event(), because it will be done only, if 'bt_connected' is FALSE. So change of the audio-route never succeeds in PR3 after being earlier in receiver/speaker! --- diff --git a/call-engine/voice-call-bt.c b/call-engine/voice-call-bt.c index 82c9b35..4401d60 100755 --- a/call-engine/voice-call-bt.c +++ b/call-engine/voice-call-bt.c @@ -286,8 +286,8 @@ gboolean _vc_bt_handle_bt_events(call_vc_core_state_t *pcall_core, vc_bt_ag_para CALL_ENG_DEBUG(ENG_DEBUG, "Event: %s(%d)", gszbt_req_event[pbt_info->param1], pbt_info->param1); - /*HS Connection not required for sending response to VC_BT_AG_REQ_CALL_STATUS */ - if ((FALSE == pcall_core->bt_connected) && (VC_BT_AG_REQ_CALL_STATUS != pbt_info->param1)) { + /*HS Connection not required for sending response to VC_BT_AG_REQ_CALL_STATUS or VC_BT_AG_REQ_SWITCH_TO_HEADSET */ + if ((FALSE == pcall_core->bt_connected) && (VC_BT_AG_REQ_CALL_STATUS != pbt_info->param1) && (VC_BT_AG_REQ_SWITCH_TO_HEADSET != pbt_info->param1)) { CALL_ENG_DEBUG(ENG_ERR, "BT not connected, Ignoring BT Events, BT Event= %d", pbt_info->param1); return TRUE; }