From 97fdd73057b273016fc87a7413fca561c7c0f814 Mon Sep 17 00:00:00 2001 From: Chandrakanth Gorantla Date: Fri, 25 Apr 2014 19:19:57 +0530 Subject: ASOC: DPCM: Allow pause state as prev state for stop state In case of seek, pause <-> stop <-> resume is the general sequence, so allow pause state to come before stop. Bug 1405523 Change-Id: Ib90d5c6cb780bdb5c9cedd33ae114f78603b2649 Signed-off-by: Chandrakanth Gorantla Reviewed-on: http://git-master/r/401556 Reviewed-by: Deepa Madiregama Reviewed-by: Ravindra Lokhande GVS: Gerrit_Virtual_Submit Reviewed-by: Sumit Bhattacharya --- sound/soc/soc-pcm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sound') diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c index e1925aba662e..9a93befa6d2e 100644 --- a/sound/soc/soc-pcm.c +++ b/sound/soc/soc-pcm.c @@ -1463,7 +1463,8 @@ int dpcm_be_dai_trigger(struct snd_soc_pcm_runtime *fe, int stream, be->dpcm[stream].state = SND_SOC_DPCM_STATE_START; break; case SNDRV_PCM_TRIGGER_STOP: - if (be->dpcm[stream].state != SND_SOC_DPCM_STATE_START) + if ((be->dpcm[stream].state != SND_SOC_DPCM_STATE_START) && + (be->dpcm[stream].state != SND_SOC_DPCM_STATE_PAUSED)) continue; if (!snd_soc_dpcm_can_be_free_stop(fe, be, stream)) -- cgit v1.2.3