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>
This commit is contained in:
Venkata Narendra Kumar Gutta 2016-08-02 12:31:23 +05:30 committed by Gerrit - the friendly Code Review server
parent 3336c17fe4
commit 6718f53ddd

View file

@ -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;