aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2014-12-08 13:11:39 +0000
committerMark Brown <broonie@kernel.org>2014-12-08 13:11:39 +0000
commit6980a317356cdca536731d8e930bc07d59b2d265 (patch)
tree6bfe2411a2832ed925ea559dd4acf06c22d6f73b /sound/soc
parentLinux 3.18 (diff)
parentASoC: soc-pcm: do not hw_free BE if it's still used (diff)
downloadlinux-dev-6980a317356cdca536731d8e930bc07d59b2d265.tar.xz
linux-dev-6980a317356cdca536731d8e930bc07d59b2d265.zip
Merge remote-tracking branch 'asoc/fix/pcm' into asoc-linus
Diffstat (limited to 'sound/soc')
-rw-r--r--sound/soc/soc-pcm.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c
index 57277dd79e11..70e8088a5468 100644
--- a/sound/soc/soc-pcm.c
+++ b/sound/soc/soc-pcm.c
@@ -1664,6 +1664,10 @@ int dpcm_be_dai_hw_free(struct snd_soc_pcm_runtime *fe, int stream)
if (!snd_soc_dpcm_can_be_free_stop(fe, be, stream))
continue;
+ /* do not free hw if this BE is used by other FE */
+ if (be->dpcm[stream].users > 1)
+ continue;
+
if ((be->dpcm[stream].state != SND_SOC_DPCM_STATE_HW_PARAMS) &&
(be->dpcm[stream].state != SND_SOC_DPCM_STATE_PREPARE) &&
(be->dpcm[stream].state != SND_SOC_DPCM_STATE_HW_FREE) &&