Allow to change audio-route path to BT-headset also after receiving the acknowledgeme...
authorPetteri Tikander <juhax.p.tikander@intel.com>
Tue, 18 Jun 2013 10:37:21 +0000 (13:37 +0300)
committerPetteri Tikander <juhax.p.tikander@intel.com>
Tue, 18 Jun 2013 10:37:21 +0000 (13:37 +0300)
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!

call-engine/voice-call-bt.c

index 82c9b35582c45eb8ea42e656792f37b4f7546b33..4401d6054a7dcf24c15f5e5bd15164d9e8baef7a 100755 (executable)
@@ -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;
        }