From cc895413836818cd0e990f8926673a5e5c1b6d17 Mon Sep 17 00:00:00 2001 From: Banajit Goswami Date: Wed, 2 Nov 2016 12:55:27 -0700 Subject: [PATCH] ASoC: msm: q6dspv2: wake up tasks when ADSP goes down When ADSP goes down, all tasks waiting for response from ADSP should be woken up, so that the upper layers can proceed with the clean up. Change adds code to wake up tasks, waiting for response from ADSP for memory related commands, when ADSP sub-system notifier reaches ASM driver. CRs-Fixed: 1085631 Change-Id: I0eed467aec676dd6eba71bf08aa4a45ada90133b Signed-off-by: Banajit Goswami --- sound/soc/msm/qdsp6v2/q6asm.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sound/soc/msm/qdsp6v2/q6asm.c b/sound/soc/msm/qdsp6v2/q6asm.c index 0ea94cb52bfb..2874a334dfdd 100644 --- a/sound/soc/msm/qdsp6v2/q6asm.c +++ b/sound/soc/msm/qdsp6v2/q6asm.c @@ -1658,8 +1658,10 @@ static int32_t q6asm_callback(struct apr_client_data *data, void *priv) ac->apr = NULL; atomic_set(&ac->time_flag, 0); atomic_set(&ac->cmd_state, 0); + atomic_set(&ac->mem_state, 0); wake_up(&ac->time_wait); wake_up(&ac->cmd_wait); + wake_up(&ac->mem_wait); mutex_unlock(&ac->cmd_lock); return 0; }