diff options
author | Charles Keepax <ckeepax@opensource.cirrus.com> | 2019-02-05 19:29:40 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-02-20 12:13:16 +0300 |
commit | d7204d3860ee12f1d3da9680e9f25afa9ad65c1f (patch) | |
tree | 86513cd94dcfcfda0ce948ac8716e6f755d16e9a /sound/pci | |
parent | b1746f9f05d35f1c55015899d40789b7bfc184bd (diff) | |
download | linux-d7204d3860ee12f1d3da9680e9f25afa9ad65c1f.tar.xz |
ALSA: compress: Fix stop handling on compressed capture streams
commit 4f2ab5e1d13d6aa77c55f4914659784efd776eb4 upstream.
It is normal user behaviour to start, stop, then start a stream
again without closing it. Currently this works for compressed
playback streams but not capture ones.
The states on a compressed capture stream go directly from OPEN to
PREPARED, unlike a playback stream which moves to SETUP and waits
for a write of data before moving to PREPARED. Currently however,
when a stop is sent the state is set to SETUP for both types of
streams. This leaves a capture stream in the situation where a new
start can't be sent as that requires the state to be PREPARED and
a new set_params can't be sent as that requires the state to be
OPEN. The only option being to close the stream, and then reopen.
Correct this issues by allowing snd_compr_drain_notify to set the
state depending on the stream direction, as we already do in
set_params.
Fixes: 49bb6402f1aa ("ALSA: compress_core: Add support for capture streams")
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'sound/pci')
0 files changed, 0 insertions, 0 deletions