AUDIO_LOG_INFO("modem is connected for call = %d", (val == VBC_TD_CHANNELID));
return (val == VBC_TD_CHANNELID) ? 1 : 0;
AUDIO_LOG_INFO("modem is connected for call = %d", (val == VBC_TD_CHANNELID));
return (val == VBC_TD_CHANNELID) ? 1 : 0;
if(ah->device.active_out & AUDIO_DEVICE_OUT_BT_SCO) {
if(modem->i2s_bt.is_ext) {
if(modem->i2s_bt.is_switch) {
if(ah->device.active_out & AUDIO_DEVICE_OUT_BT_SCO) {
if(modem->i2s_bt.is_ext) {
if(modem->i2s_bt.is_switch) {
PIN_SWITCH_IIS0_SYS_SEL, PIN_SWITCH_IIS0_CP0_ID);
}
} else {
if(modem->i2s_bt.is_switch) {
int value = 0;
PIN_SWITCH_IIS0_SYS_SEL, PIN_SWITCH_IIS0_CP0_ID);
}
} else {
if(modem->i2s_bt.is_switch) {
int value = 0;
PIN_SWITCH_IIS0_SYS_SEL, PIN_SWITCH_IIS0_AP_ID);
}
}
if(ah->device.active_out & AUDIO_DEVICE_OUT_BT_SCO) {
if(modem->i2s_bt.is_switch) {
PIN_SWITCH_IIS0_SYS_SEL, PIN_SWITCH_IIS0_AP_ID);
}
}
if(ah->device.active_out & AUDIO_DEVICE_OUT_BT_SCO) {
if(modem->i2s_bt.is_switch) {
if(ah->device.active_out & AUDIO_DEVICE_OUT_BT_SCO) {
if(modem->i2s_bt.is_ext) {
if(modem->i2s_bt.is_switch) {
if(ah->device.active_out & AUDIO_DEVICE_OUT_BT_SCO) {
if(modem->i2s_bt.is_ext) {
if(modem->i2s_bt.is_switch) {
PIN_SWITCH_IIS0_SYS_SEL, PIN_SWITCH_IIS0_CP1_ID);
}
} else {
if(modem->i2s_bt.is_switch) {
int value = 0;
PIN_SWITCH_IIS0_SYS_SEL, PIN_SWITCH_IIS0_CP1_ID);
}
} else {
if(modem->i2s_bt.is_switch) {
int value = 0;
PIN_SWITCH_IIS0_SYS_SEL, PIN_SWITCH_IIS0_CP2_ID);
}
}
if(ah->device.active_out & AUDIO_DEVICE_OUT_BT_SCO) {
if(modem->i2s_bt.is_switch) {
PIN_SWITCH_IIS0_SYS_SEL, PIN_SWITCH_IIS0_CP2_ID);
}
}
if(ah->device.active_out & AUDIO_DEVICE_OUT_BT_SCO) {
if(modem->i2s_bt.is_switch) {
- audio_ret = _audio_do_route_voicecall(ah, ah->device.init_call_devices, ah->device.num_of_call_devices);
- if (AUDIO_IS_ERROR(audio_ret)) {
+ if ((audio_ret = _audio_update_route_voicecall(ah, ah->device.init_call_devices, ah->device.num_of_call_devices))) {
AUDIO_LOG_WARN("set voicecall route return 0x%x", audio_ret);
if (audio_ret == AUDIO_ERR_INVALID_STATE) {
/* send signal and wait for the ucm setting,
AUDIO_LOG_WARN("set voicecall route return 0x%x", audio_ret);
if (audio_ret == AUDIO_ERR_INVALID_STATE) {
/* send signal and wait for the ucm setting,
if (ah->device.active_out & (AUDIO_DEVICE_OUT_SPEAKER | AUDIO_DEVICE_OUT_BT_SCO)) {
if (ah->modem.cp_type == CP_TG)
if (ah->device.active_out & (AUDIO_DEVICE_OUT_SPEAKER | AUDIO_DEVICE_OUT_BT_SCO)) {
if (ah->modem.cp_type == CP_TG)
COND_TIMEDWAIT(ah->device.device_cond, ah->device.device_lock, "device_cond", TIMEOUT_SEC);
MUTEX_UNLOCK(ah->device.device_lock, "device_lock");
COND_TIMEDWAIT(ah->device.device_cond, ah->device.device_lock, "device_cond", TIMEOUT_SEC);
MUTEX_UNLOCK(ah->device.device_lock, "device_lock");
AUDIO_LOG_DEBUG("[voice] Send response for VBC_CMD_PCM_CLOSE");
__vbc_write_response(vbpipe_fd, VBC_CMD_PCM_CLOSE, 0);
AUDIO_LOG_DEBUG("[voice] Send response for VBC_CMD_PCM_CLOSE");
__vbc_write_response(vbpipe_fd, VBC_CMD_PCM_CLOSE, 0);
if (ah->device.active_out & (AUDIO_DEVICE_OUT_SPEAKER | AUDIO_DEVICE_OUT_BT_SCO)) {
if (ah->modem.cp_type == CP_TG)
if (ah->device.active_out & (AUDIO_DEVICE_OUT_SPEAKER | AUDIO_DEVICE_OUT_BT_SCO)) {
if (ah->modem.cp_type == CP_TG)
AUDIO_LOG_DEBUG("[voice] Send response for VBC_CMD_SET_GAIN");
__vbc_write_response(vbpipe_fd, VBC_CMD_SWITCH_CTRL, 0);
AUDIO_LOG_DEBUG("[voice] Send response for VBC_CMD_SET_GAIN");
__vbc_write_response(vbpipe_fd, VBC_CMD_SWITCH_CTRL, 0);
if (ah->device.active_out & (AUDIO_DEVICE_OUT_SPEAKER | AUDIO_DEVICE_OUT_BT_SCO)) {
if (ah->modem.cp_type == CP_TG)
if (ah->device.active_out & (AUDIO_DEVICE_OUT_SPEAKER | AUDIO_DEVICE_OUT_BT_SCO)) {
if (ah->modem.cp_type == CP_TG)
}
/* To do: set mode params : __vbc_set_mode_params(ah, vbpipe_fd); */
AUDIO_LOG_DEBUG("[voip] Send response for VBC_CMD_SET_MODE");
}
/* To do: set mode params : __vbc_set_mode_params(ah, vbpipe_fd); */
AUDIO_LOG_DEBUG("[voip] Send response for VBC_CMD_SET_MODE");
AUDIO_LOG_DEBUG("[voip] Send response for VBC_CMD_SWITCH_CTRL");
__vbc_write_response(vbpipe_fd, VBC_CMD_SWITCH_CTRL, 0);
AUDIO_LOG_DEBUG("[voip] Send response for VBC_CMD_SWITCH_CTRL");
__vbc_write_response(vbpipe_fd, VBC_CMD_SWITCH_CTRL, 0);
{
/* TODO. Make sure we always receive CLOSE command from modem and then close pcm device */
ah->modem.vbc.exit_vbc_thread = 1;
{
/* TODO. Make sure we always receive CLOSE command from modem and then close pcm device */
ah->modem.vbc.exit_vbc_thread = 1;
ah->modem.cp_type = ah->modem.cp->vbc_ctrl_pipe_info->cp_type;
/* This ctrl need to be set "0" always - SPRD */
ah->modem.cp_type = ah->modem.cp->vbc_ctrl_pipe_info->cp_type;
/* This ctrl need to be set "0" always - SPRD */