summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorPatrick Lai <plai@codeaurora.org>2017-01-01 09:44:39 +0300
committerMark Brown <broonie@kernel.org>2017-01-06 21:19:10 +0300
commit9f169b9f52a4afccdab7a7d2311b0c53a78a1e6b (patch)
tree717a662fd0cb8931ecafc165b7637926577be5b3 /sound
parenta5de5b74a50113564a1e0850e2da96c37c35e55d (diff)
downloadlinux-9f169b9f52a4afccdab7a7d2311b0c53a78a1e6b.tar.xz
ASoC: dpcm: Avoid putting stream state to STOP when FE stream is paused
When multiple front-ends are using the same back-end, putting state of a front-end to STOP state upon receiving pause command will result in backend stream getting released by DPCM framework unintentionally. In order to avoid backend to be released when another active front-end stream is present, put the stream state to PAUSED state instead of STOP state. Signed-off-by: Patrick Lai <plai@codeaurora.org> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/soc-pcm.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c
index e7a1eaa2772f..6aba14009c92 100644
--- a/sound/soc/soc-pcm.c
+++ b/sound/soc/soc-pcm.c
@@ -2184,9 +2184,11 @@ static int dpcm_fe_dai_do_trigger(struct snd_pcm_substream *substream, int cmd)
break;
case SNDRV_PCM_TRIGGER_STOP:
case SNDRV_PCM_TRIGGER_SUSPEND:
- case SNDRV_PCM_TRIGGER_PAUSE_PUSH:
fe->dpcm[stream].state = SND_SOC_DPCM_STATE_STOP;
break;
+ case SNDRV_PCM_TRIGGER_PAUSE_PUSH:
+ fe->dpcm[stream].state = SND_SOC_DPCM_STATE_PAUSED;
+ break;
}
out: