From f47eab663ee4dc99a5c4e10b2495376d5f38d8e3 Mon Sep 17 00:00:00 2001 From: Dhanalakshmi Siddani Date: Thu, 5 May 2016 11:09:39 +0530 Subject: [PATCH] ASoC: msm: qdsp6v2: do not set cmd_interrupt flag in eos for gapless cmd_interrupt flag is set during first stream's stop in gapless playback but it is not reset after receiving eos ack. This interrupts second stream partial drain and eos is sent to client, which leads to session close causing audio mute. Do not set cmd_interrupt during gapless transition to fix the issue as no one is waiting for eos. CRs-Fixed: 1012546 Change-Id: Ibcbdde0ea59ff80a798de0b894c2239899260860 Signed-off-by: Dhanalakshmi Siddani --- sound/soc/msm/qdsp6v2/msm-compress-q6-v2.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/sound/soc/msm/qdsp6v2/msm-compress-q6-v2.c b/sound/soc/msm/qdsp6v2/msm-compress-q6-v2.c index a7ed5381e690..00519a454fb4 100755 --- a/sound/soc/msm/qdsp6v2/msm-compress-q6-v2.c +++ b/sound/soc/msm/qdsp6v2/msm-compress-q6-v2.c @@ -1533,8 +1533,15 @@ static int msm_compr_trigger(struct snd_compr_stream *cstream, int cmd) } if (atomic_read(&prtd->eos)) { pr_debug("%s: interrupt eos wait queues", __func__); - prtd->cmd_interrupt = 1; - wake_up(&prtd->eos_wait); + /* + * Gapless playback does not wait for eos, do not set + * cmd_int and do not wake up eos_wait during gapless + * transition + */ + if (!prtd->gapless_state.gapless_transition) { + prtd->cmd_interrupt = 1; + wake_up(&prtd->eos_wait); + } atomic_set(&prtd->eos, 0); } if (atomic_read(&prtd->drain)) {