summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorVinod Koul <vinod.koul@intel.com>2016-02-01 22:26:40 +0530
committerSasha Levin <sasha.levin@oracle.com>2016-03-02 15:18:55 -0500
commitd15106ce3710043bebe97b7f1198cc3c9247cbcd (patch)
tree828a27dc7a001053c58f68624f7b4e022da6011a /sound
parentc1e386dd272963b2d2e4f6fd799d3e3b04daa968 (diff)
downloadlwn-d15106ce3710043bebe97b7f1198cc3c9247cbcd.tar.gz
lwn-d15106ce3710043bebe97b7f1198cc3c9247cbcd.zip
ASoC: dpcm: fix the BE state on hw_free
[ Upstream commit 5e82d2be6ee53275c72e964507518d7964c82753 ] While performing hw_free, DPCM checks the BE state but leaves out the suspend state. The suspend state needs to be checked as well, as we might be suspended and then usermode closes rather than resuming the audio stream. This was found by a stress testing of system with playback in loop and killed after few seconds running in background and second script running suspend-resume test in loop Signed-off-by: Vinod Koul <vinod.koul@intel.com> Acked-by: Liam Girdwood <liam.r.girdwood@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org> Cc: stable@vger.kernel.org Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/soc-pcm.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c
index 57277dd79e11..f8893f51d47b 100644
--- a/sound/soc/soc-pcm.c
+++ b/sound/soc/soc-pcm.c
@@ -1668,7 +1668,8 @@ int dpcm_be_dai_hw_free(struct snd_soc_pcm_runtime *fe, int stream)
(be->dpcm[stream].state != SND_SOC_DPCM_STATE_PREPARE) &&
(be->dpcm[stream].state != SND_SOC_DPCM_STATE_HW_FREE) &&
(be->dpcm[stream].state != SND_SOC_DPCM_STATE_PAUSED) &&
- (be->dpcm[stream].state != SND_SOC_DPCM_STATE_STOP))
+ (be->dpcm[stream].state != SND_SOC_DPCM_STATE_STOP) &&
+ (be->dpcm[stream].state != SND_SOC_DPCM_STATE_SUSPEND))
continue;
dev_dbg(be->dev, "ASoC: hw_free BE %s\n",