diff mbox

ASoC: Intel: Atom: Fix message handling during drop stream

Message ID 1472623985-31234-1-git-send-email-harshapriya.n@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Harsha Priya Aug. 31, 2016, 6:13 a.m. UTC
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 <harshapriya.n@intel.com>
Signed-off-by: Naveen M <naveen.m@intel.com>
---
 sound/soc/intel/atom/sst/sst_ipc.c | 3 +++
 1 file changed, 3 insertions(+)

Comments

Vinod Koul Aug. 31, 2016, 10:19 a.m. UTC | #1
On Tue, Aug 30, 2016 at 11:13:05PM -0700, Harsha Priya wrote:
> 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.

Acked-by: Vinod Koul <vinod.koul@intel.com>
diff mbox

Patch

diff --git a/sound/soc/intel/atom/sst/sst_ipc.c b/sound/soc/intel/atom/sst/sst_ipc.c
index 8afa6fe..bfc8899 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)