msm: audio: 8k: Send ACDB data after the PREPARE stage of device switch
As per the Q6 API, the ACDB configuration need to be sent to Q6 after the PREPARE stage of the device switch. But in the current code it is in the reverse order. Hence correcting the code as per the Q6 API. Change-Id: I9f947d44f73b1fc71ddea8259ca54402edc895c2 Signed-off-by: Phani Kumar Allada <pallad@codeaurora.org>
This commit is contained in:
parent
038cb087d1
commit
b46eec7adc
@ -1564,9 +1564,9 @@ static void _audio_rx_path_enable(int reconf, uint32_t acdb_id)
|
||||
adie_proceed_to_stage(adie, ADIE_PATH_RX, ADIE_STAGE_DIGITAL_READY);
|
||||
adie_proceed_to_stage(adie, ADIE_PATH_RX, ADIE_STAGE_DIGITAL_ANALOG_READY);
|
||||
|
||||
audio_update_acdb(audio_rx_device_id, acdb_id);
|
||||
if (!reconf)
|
||||
qdsp6_devchg_notify(ac_control, ADSP_AUDIO_RX_DEVICE, audio_rx_device_id);
|
||||
audio_update_acdb(audio_rx_device_id, acdb_id);
|
||||
qdsp6_standby(ac_control);
|
||||
qdsp6_start(ac_control);
|
||||
|
||||
@ -1591,10 +1591,9 @@ static void _audio_tx_path_enable(int reconf, uint32_t acdb_id)
|
||||
adie_proceed_to_stage(adie, ADIE_PATH_TX, ADIE_STAGE_DIGITAL_READY);
|
||||
adie_proceed_to_stage(adie, ADIE_PATH_TX, ADIE_STAGE_DIGITAL_ANALOG_READY);
|
||||
|
||||
audio_update_acdb(audio_tx_device_id, acdb_id);
|
||||
|
||||
if (!reconf)
|
||||
qdsp6_devchg_notify(ac_control, ADSP_AUDIO_TX_DEVICE, audio_tx_device_id);
|
||||
audio_update_acdb(audio_tx_device_id, acdb_id);
|
||||
qdsp6_standby(ac_control);
|
||||
qdsp6_start(ac_control);
|
||||
|
||||
@ -1900,14 +1899,15 @@ int q6audio_update_acdb(uint32_t id_src, uint32_t id_dst)
|
||||
return 0;
|
||||
|
||||
mutex_lock(&audio_path_lock);
|
||||
res = audio_update_acdb(id_dst, id_src);
|
||||
if (res)
|
||||
goto done;
|
||||
|
||||
if (q6_device_to_dir(id_dst) == Q6_RX)
|
||||
qdsp6_devchg_notify(ac_control, ADSP_AUDIO_RX_DEVICE, id_dst);
|
||||
else
|
||||
qdsp6_devchg_notify(ac_control, ADSP_AUDIO_TX_DEVICE, id_dst);
|
||||
res = audio_update_acdb(id_dst, id_src);
|
||||
if (res)
|
||||
goto done;
|
||||
|
||||
qdsp6_standby(ac_control);
|
||||
qdsp6_start(ac_control);
|
||||
done:
|
||||
@ -2054,8 +2054,8 @@ static void do_rx_routing(uint32_t device_id, uint32_t acdb_id)
|
||||
AUDIO_INFO("%s\n", __func__);
|
||||
if (device_id == audio_rx_device_id) {
|
||||
if (acdb_id != rx_acdb) {
|
||||
audio_update_acdb(device_id, acdb_id);
|
||||
qdsp6_devchg_notify(ac_control, ADSP_AUDIO_RX_DEVICE, device_id);
|
||||
audio_update_acdb(device_id, acdb_id);
|
||||
qdsp6_standby(ac_control);
|
||||
qdsp6_start(ac_control);
|
||||
}
|
||||
@ -2078,8 +2078,8 @@ static void do_tx_routing(uint32_t device_id, uint32_t acdb_id)
|
||||
AUDIO_INFO("%s\n", __func__);
|
||||
if (device_id == audio_tx_device_id) {
|
||||
if (acdb_id != tx_acdb) {
|
||||
audio_update_acdb(device_id, acdb_id);
|
||||
qdsp6_devchg_notify(ac_control, ADSP_AUDIO_TX_DEVICE, device_id);
|
||||
audio_update_acdb(device_id, acdb_id);
|
||||
qdsp6_standby(ac_control);
|
||||
qdsp6_start(ac_control);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user