From 6718f53dddd59bf7fa701167d169c932ecd2d940 Mon Sep 17 00:00:00 2001 From: Venkata Narendra Kumar Gutta Date: Tue, 2 Aug 2016 12:31:23 +0530 Subject: [PATCH] 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 --- sound/soc/msm/qdsp6v2/q6afe.c | 2 ++ 1 file changed, 2 insertions(+) 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;