• Charles Keepax's avatar
    ALSA: compress: Fix stop handling on compressed capture streams · 18a47b48
    Charles Keepax authored
    commit 4f2ab5e1 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: 49bb6402 ("ALSA: compress_core: Add support for capture streams")
    Signed-off-by: 's avatarCharles Keepax <ckeepax@opensource.cirrus.com>
    Cc: <stable@vger.kernel.org>
    Signed-off-by: 's avatarTakashi Iwai <tiwai@suse.de>
    Signed-off-by: 's avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    18a47b48
Name
Last commit
Last update
..
acpi Loading commit data...
asm-generic Loading commit data...
clocksource Loading commit data...
crypto Loading commit data...
drm Loading commit data...
dt-bindings Loading commit data...
keys Loading commit data...
kvm Loading commit data...
linux Loading commit data...
math-emu Loading commit data...
media Loading commit data...
memory Loading commit data...
misc Loading commit data...
net Loading commit data...
pcmcia Loading commit data...
ras Loading commit data...
rdma Loading commit data...
scsi Loading commit data...
soc Loading commit data...
sound Loading commit data...
target Loading commit data...
trace Loading commit data...
uapi Loading commit data...
video Loading commit data...
xen Loading commit data...