ASoC: apr: Add separate initial boot flag for ADSP and Modem
apr ignores initial PDR_DOWN event from ADSP/Modem during boot up. ADSP_DOWN event is wrongly sent to audio drivers during boot up if it gets MODEM_UP event before ADSP_DOWN. Added separate flags for both ADSP and Modem events to avoid this issue. CRs-Fixed: 2232315 Change-Id: I2c6084ac03e3867009f36be36631f881124f59ba Signed-off-by: Soumya Managoli <smanag@codeaurora.org>
This commit is contained in:
parent
2df3743287
commit
62d95ed05b
1 changed files with 20 additions and 11 deletions
|
@ -45,7 +45,8 @@ static void *apr_pkt_ctx;
|
|||
static wait_queue_head_t dsp_wait;
|
||||
static wait_queue_head_t modem_wait;
|
||||
static bool is_modem_up;
|
||||
static bool is_initial_boot;
|
||||
static bool is_initial_modem_boot;
|
||||
static bool is_initial_adsp_boot;
|
||||
/* Subsystem restart: QDSP6 data, functions */
|
||||
static struct workqueue_struct *apr_reset_workqueue;
|
||||
static void apr_reset_deregister(struct work_struct *work);
|
||||
|
@ -909,21 +910,28 @@ static int apr_notifier_service_cb(struct notifier_block *this,
|
|||
* recovery notifications during initial boot
|
||||
* up since everything is expected to be down.
|
||||
*/
|
||||
if (is_initial_boot) {
|
||||
is_initial_boot = false;
|
||||
break;
|
||||
}
|
||||
if (cb_data->domain == AUDIO_NOTIFIER_MODEM_DOMAIN)
|
||||
if (cb_data->domain == AUDIO_NOTIFIER_MODEM_DOMAIN) {
|
||||
if (is_initial_modem_boot) {
|
||||
is_initial_modem_boot = false;
|
||||
break;
|
||||
}
|
||||
apr_modem_down(opcode);
|
||||
else
|
||||
} else {
|
||||
if (is_initial_adsp_boot) {
|
||||
is_initial_adsp_boot = false;
|
||||
break;
|
||||
}
|
||||
apr_adsp_down(opcode);
|
||||
}
|
||||
break;
|
||||
case AUDIO_NOTIFIER_SERVICE_UP:
|
||||
is_initial_boot = false;
|
||||
if (cb_data->domain == AUDIO_NOTIFIER_MODEM_DOMAIN)
|
||||
if (cb_data->domain == AUDIO_NOTIFIER_MODEM_DOMAIN) {
|
||||
is_initial_modem_boot = false;
|
||||
apr_modem_up();
|
||||
else
|
||||
} else {
|
||||
is_initial_adsp_boot = false;
|
||||
apr_adsp_up();
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
@ -965,7 +973,8 @@ static int __init apr_init(void)
|
|||
if (!apr_pkt_ctx)
|
||||
pr_err("%s: Unable to create ipc log context\n", __func__);
|
||||
|
||||
is_initial_boot = true;
|
||||
is_initial_modem_boot = true;
|
||||
is_initial_adsp_boot = true;
|
||||
subsys_notif_register("apr_adsp", AUDIO_NOTIFIER_ADSP_DOMAIN,
|
||||
&adsp_service_nb);
|
||||
subsys_notif_register("apr_modem", AUDIO_NOTIFIER_MODEM_DOMAIN,
|
||||
|
|
Loading…
Add table
Reference in a new issue