• Charles Keepax's avatar
    ALSA: compress: Fix stop handling on compressed capture streams · bbc0621f
    Charles Keepax authored
    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: 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>
    bbc0621f
Name
Last commit
Last update
..
ac97_codec.h Loading commit data...
aci.h Loading commit data...
ad1816a.h Loading commit data...
ad1843.h Loading commit data...
adau1373.h Loading commit data...
aess.h Loading commit data...
ak4113.h Loading commit data...
ak4114.h Loading commit data...
ak4117.h Loading commit data...
ak4531_codec.h Loading commit data...
ak4641.h Loading commit data...
ak4xxx-adda.h Loading commit data...
alc5623.h Loading commit data...
asequencer.h Loading commit data...
asound.h Loading commit data...
asoundef.h Loading commit data...
compress_driver.h Loading commit data...
control.h Loading commit data...
core.h Loading commit data...
cs35l33.h Loading commit data...
cs35l34.h Loading commit data...
cs35l35.h Loading commit data...
cs4231-regs.h Loading commit data...
cs4271.h Loading commit data...
cs42l52.h Loading commit data...
cs42l56.h Loading commit data...
cs42l73.h Loading commit data...
cs8403.h Loading commit data...
cs8427.h Loading commit data...
da7213.h Loading commit data...
da7218.h Loading commit data...
da7219-aad.h Loading commit data...
da7219.h Loading commit data...
da9055.h Loading commit data...
designware_i2s.h Loading commit data...
dmaengine_pcm.h Loading commit data...
emu10k1.h Loading commit data...
emu10k1_synth.h Loading commit data...
emu8000.h Loading commit data...
emu8000_reg.h Loading commit data...
emux_legacy.h Loading commit data...
emux_synth.h Loading commit data...
es1688.h Loading commit data...
gus.h Loading commit data...
hda_chmap.h Loading commit data...
hda_hwdep.h Loading commit data...
hda_i915.h Loading commit data...
hda_register.h Loading commit data...
hda_regmap.h Loading commit data...
hda_verbs.h Loading commit data...
hdaudio.h Loading commit data...
hdaudio_ext.h Loading commit data...
hdmi-codec.h Loading commit data...
hwdep.h Loading commit data...
i2c.h Loading commit data...
info.h Loading commit data...
initval.h Loading commit data...
jack.h Loading commit data...
l3.h Loading commit data...
max9768.h Loading commit data...
max98088.h Loading commit data...
max98090.h Loading commit data...
max98095.h Loading commit data...
memalloc.h Loading commit data...
minors.h Loading commit data...
mixer_oss.h Loading commit data...
mpu401.h Loading commit data...
omap-hdmi-audio.h Loading commit data...
omap-pcm.h Loading commit data...
opl3.h Loading commit data...
opl4.h Loading commit data...
pcm-indirect.h Loading commit data...
pcm.h Loading commit data...
pcm_drm_eld.h Loading commit data...
pcm_iec958.h Loading commit data...
pcm_oss.h Loading commit data...
pcm_params.h Loading commit data...
pt2258.h Loading commit data...
pxa2xx-lib.h Loading commit data...
rawmidi.h Loading commit data...
rt286.h Loading commit data...
rt298.h Loading commit data...
rt5514.h Loading commit data...
rt5640.h Loading commit data...
rt5645.h Loading commit data...
rt5651.h Loading commit data...
rt5659.h Loading commit data...
rt5660.h Loading commit data...
rt5663.h Loading commit data...
rt5665.h Loading commit data...
rt5670.h Loading commit data...
s3c24xx_uda134x.h Loading commit data...
sb.h Loading commit data...
sb16_csp.h Loading commit data...
seq_device.h Loading commit data...
seq_kernel.h Loading commit data...
seq_midi_emul.h Loading commit data...
seq_midi_event.h Loading commit data...
seq_oss.h Loading commit data...
seq_oss_legacy.h Loading commit data...
seq_virmidi.h Loading commit data...
sh_dac_audio.h Loading commit data...
sh_fsi.h Loading commit data...
simple_card.h Loading commit data...
simple_card_utils.h Loading commit data...
snd_wavefront.h Loading commit data...
soc-dai.h Loading commit data...
soc-dapm.h Loading commit data...
soc-dpcm.h Loading commit data...
soc-topology.h Loading commit data...
soc.h Loading commit data...
soundfont.h Loading commit data...
spear_dma.h Loading commit data...
spear_spdif.h Loading commit data...
sta32x.h Loading commit data...
sta350.h Loading commit data...
tas2552-plat.h Loading commit data...
tas5086.h Loading commit data...
tea6330t.h Loading commit data...
timer.h Loading commit data...
tlv.h Loading commit data...
tlv320aic32x4.h Loading commit data...
tlv320aic3x.h Loading commit data...
tlv320dac33-plat.h Loading commit data...
tpa6130a2-plat.h Loading commit data...
uda134x.h Loading commit data...
uda1380.h Loading commit data...
util_mem.h Loading commit data...
vx_core.h Loading commit data...
wavefront.h Loading commit data...
wm0010.h Loading commit data...
wm1250-ev1.h Loading commit data...
wm2000.h Loading commit data...
wm2200.h Loading commit data...
wm5100.h Loading commit data...
wm8903.h Loading commit data...
wm8904.h Loading commit data...
wm8955.h Loading commit data...
wm8960.h Loading commit data...
wm8962.h Loading commit data...
wm8993.h Loading commit data...
wm8996.h Loading commit data...
wm9081.h Loading commit data...
wm9090.h Loading commit data...
wss.h Loading commit data...