From: Harsha Priya Date: Wed, 31 Aug 2016 06:13:05 +0000 (-0700) Subject: ASoC: Intel: Atom: Fix message handling during drop stream X-Git-Tag: v4.9-rc1~120^2^2~17^2~1 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=de34dcfe70576792a6312f9af4a1f880182b2d3b;p=karo-tx-linux.git ASoC: Intel: Atom: Fix message handling during drop stream If a stream is being dropped, the period_elapsed received then after need not be processed. Processing of the period_elapsed message causes a time out in drop stream response processing. This patch adds a condition to skip period_elapsed message processing if the stream is in INIT state. Signed-off-by: Harsha Priya Signed-off-by: Naveen M Acked-by: Vinod Koul Signed-off-by: Mark Brown --- diff --git a/sound/soc/intel/atom/sst/sst_ipc.c b/sound/soc/intel/atom/sst/sst_ipc.c index 8afa6fe7b0b0..bfc889950bb2 100644 --- a/sound/soc/intel/atom/sst/sst_ipc.c +++ b/sound/soc/intel/atom/sst/sst_ipc.c @@ -267,6 +267,9 @@ static void process_fw_async_msg(struct intel_sst_drv *sst_drv_ctx, "Period elapsed rcvd for pipe id 0x%x\n", pipe_id); stream = &sst_drv_ctx->streams[str_id]; + /* If stream is dropped, skip processing this message*/ + if (stream->status == STREAM_INIT) + break; if (stream->period_elapsed) stream->period_elapsed(stream->pcm_substream); if (stream->compr_cb)