summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVenkata Narendra Kumar Gutta <vgutta@codeaurora.org>2016-08-02 12:31:23 +0530
committerGerrit - the friendly Code Review server <code-review@localhost>2016-08-05 01:19:37 -0700
commit6718f53dddd59bf7fa701167d169c932ecd2d940 (patch)
tree84da50adba4e5ef3ba5727b4d66c72e15a4d8151
parent3336c17fe42833d798810f28b2ca3324be91e79b (diff)
ASoC: msm: qdsp6v2: Fix crash during WFD playback and SSR
Device crash is observed for consecutive SSR's triggered during WFD playback. This is due to callback functions registered by afe client aren't reset during the first SSR and the same callback functions are being used for the next SSR event, resulting access in freed data. Fix this issue by resetting the callback functions during SSR. CRs-Fixed: 1045045 Change-Id: Ib651dd59b30e4924f4e199cfd4fae64df6030d9d Signed-off-by: Venkata Narendra Kumar Gutta <vgutta@codeaurora.org>
-rw-r--r--sound/soc/msm/qdsp6v2/q6afe.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sound/soc/msm/qdsp6v2/q6afe.c b/sound/soc/msm/qdsp6v2/q6afe.c
index 8efa04c3807e..b87eef810d42 100644
--- a/sound/soc/msm/qdsp6v2/q6afe.c
+++ b/sound/soc/msm/qdsp6v2/q6afe.c
@@ -292,11 +292,13 @@ static int32_t afe_callback(struct apr_client_data *data, void *priv)
this_afe.tx_cb(data->opcode, data->token,
data->payload,
this_afe.tx_private_data);
+ this_afe.tx_cb = NULL;
}
if (this_afe.rx_cb) {
this_afe.rx_cb(data->opcode, data->token,
data->payload,
this_afe.rx_private_data);
+ this_afe.rx_cb = NULL;
}
return 0;