OSDN Git Service

ALSA: compress: Fix regression on compressed capture streams
authorCharles Keepax <ckeepax@opensource.cirrus.com>
Mon, 22 Jul 2019 09:24:33 +0000 (10:24 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 25 Aug 2019 08:52:48 +0000 (10:52 +0200)
commit4e07b0fe0d0f0040e3dabbe85f23bc1ceaf4eba6
treeed056c5a9237bcfd6ab22ebdd696b04e53c75611
parentf34ef4fb5d307d211ad93b232a94c27bd5cda4af
ALSA: compress: Fix regression on compressed capture streams

[ Upstream commit 4475f8c4ab7b248991a60d9c02808dbb813d6be8 ]

A previous fix to the stop handling on compressed capture streams causes
some knock on issues. The previous fix updated snd_compr_drain_notify to
set the state back to PREPARED for capture streams. This causes some
issues however as the handling for snd_compr_poll differs between the
two states and some user-space applications were relying on the poll
failing after the stream had been stopped.

To correct this regression whilst still fixing the original problem the
patch was addressing, update the capture handling to skip the PREPARED
state rather than skipping the SETUP state as it has done until now.

Fixes: 4f2ab5e1d13d ("ALSA: compress: Fix stop handling on compressed capture streams")
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>
include/sound/compress_driver.h
sound/core/compress_offload.c