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)
committerDanny Wood <danwood76@gmail.com>
Tue, 29 Jan 2019 13:11:28 +0000 (13:11 +0000)
commit64521d29f133976fbc87652fc1051c800397cbc5
tree483eac0310d636a771e5b2d19ad53fd70756d44c
parent2183cdb2fbbbfbc8feec8d24cf2213b2426fc570
ASoC: dpcm: fix the BE state on hw_free

commit 5e82d2be6ee53275c72e964507518d7964c82753 upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
sound/soc/soc-pcm.c