OSDN Git Service

ASoC: msm: qdsp6v2: fix non-gapless transition failure
authorSatya Krishna Pindiproli <satyak@codeaurora.org>
Thu, 23 Jun 2016 08:20:03 +0000 (13:50 +0530)
committerKyle Yan <kyan@codeaurora.org>
Wed, 29 Jun 2016 18:00:33 +0000 (11:00 -0700)
During non-gapless transition, there is an indefinite wait in
drain until either eos_ack or cmd_interrupt is set. This results
in playback getting stuck and occurs because cmd_interrupt is
not set in TRIGGER_STOP as gapless_transition is set to 1 during
partial drain of earlier stream.

Fix the issue by setting gapless_transition to 0 when gapless
fails which ensures that cmd_interrupt is set in TRIGGER_STOP.

CRs-Fixed: 1027991
Change-Id: I47d2d45df8686f25e8170a84fcaf68e143f6e4f6
Signed-off-by: Satya Krishna Pindiproli <satyak@codeaurora.org>
sound/soc/msm/qdsp6v2/msm-compress-q6-v2.c

index b0cd4a6..1115b13 100755 (executable)
@@ -1763,6 +1763,7 @@ static int msm_compr_trigger(struct snd_compr_stream *cstream, int cmd)
                   stream can be used for gapless playback
                */
                prtd->gapless_state.set_next_stream_id = false;
+               prtd->gapless_state.gapless_transition = 0;
                pr_debug("%s:CMD_EOS stream_id %d\n", __func__, ac->stream_id);
 
                prtd->eos_ack = 0;