ASoC: dpcm: fix the BE state on hw_free
authorVinod Koul <vinod.koul@intel.com>
Mon, 1 Feb 2016 16:56:40 +0000 (22:26 +0530)
committerSasha Levin <sasha.levin@oracle.com>
Sun, 28 Feb 2016 05:04:24 +0000 (00:04 -0500)
commit988ba6758fbc851c71505c3df18eb8af1e730fa7
treed247b7c89efe185ba61f5a308435f18b65dc9362
parent992eab6ecc8255a005c6bfc9505eca9a8d08206a
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>
sound/soc/soc-pcm.c