ALSA: compress: Be more restrictive about when a drain is allowed
authorCharles Keepax <ckeepax@opensource.cirrus.com>
Mon, 22 Jul 2019 09:24:36 +0000 (10:24 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 16 Aug 2019 08:12:47 +0000 (10:12 +0200)
commitb065f404c946804a4cca28f483e1dd9b343395ee
tree22513777fcd1f54b1b880fe5bec894b6a9c6abd9
parent30dd700da7de7b1c4f382a7a8637ccc4cae506b9
ALSA: compress: Be more restrictive about when a drain is allowed

[ Upstream commit 3b8179944cb0dd53e5223996966746cdc8a60657 ]

Draining makes little sense in the situation of hardware overrun, as the
hardware will have consumed all its available samples. Additionally,
draining whilst the stream is paused would presumably get stuck as no
data is being consumed on the DSP side.

Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Acked-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
sound/core/compress_offload.c