Vinod Koul 0a117d00e8 ALSA: compress: fix partial_drain completion state
[ Upstream commit f79a732a8325dfbd570d87f1435019d7e5501c6d ]

On partial_drain completion we should be in SNDRV_PCM_STATE_RUNNING
state, so set that for partially draining streams in
snd_compr_drain_notify() and use a flag for partially draining streams

While at it, add locks for stream state change in
snd_compr_drain_notify() as well.

Fixes: f44f2a5417b2 ("ALSA: compress: fix drain calls blocking other compress functions (v6)")
Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Tested-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Tested-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Link: https://lore.kernel.org/r/20200629134737.105993-4-vkoul@kernel.org
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-07-22 09:22:17 +02:00
..
2015-11-18 18:08:54 +00:00
2017-08-30 20:44:29 +02:00
2014-05-05 18:20:22 -07:00
2015-11-30 12:24:12 +00:00
2015-02-02 14:42:42 +01:00
2014-07-04 18:50:51 +01:00
2015-07-09 12:00:11 +01:00
2017-06-28 18:33:31 +01:00
2014-04-18 18:52:18 +01:00
2015-11-18 12:55:25 +00:00
2016-09-24 19:51:57 +01:00
2015-03-11 12:08:20 +00:00
2014-09-15 15:52:03 +02:00