• Takashi Iwai's avatar
    ALSA: pcm: Revert capture stream behavior change in blocking mode · 1529b10a
    Takashi Iwai authored
    commit 00a399ca upstream.
    
    In the commit 62ba568f ("ALSA: pcm: Return 0 when size <
    start_threshold in capture"), we changed the behavior of
    __snd_pcm_lib_xfer() to return immediately with 0 when a capture
    stream has a high start_threshold.  This was intended to be a
    correction of the behavior consistency and looked harmless, but this
    was the culprit of the recent breakage reported by syzkaller, which
    was fixed by the commit e190161f ("ALSA: pcm: Fix tight loop of
    OSS capture stream").
    
    At the time for the OSS fix, I didn't touch the behavior for ALSA
    native API, as assuming that this behavior actually is good.  But this
    turned out to be also broken actually for a similar deployment,
    e.g. one thread goes to a write loop in blocking mode while another
    thread controls the start/stop of the stream manually.
    
    Overall, the original commit is harmful, and it brings less merit to
    keep that behavior.  Let's revert it.
    
    Fixes: 62ba568f ("ALSA: pcm: Return 0 when size < start_threshold in capture")
    Fixes: e190161f ("ALSA: pcm: Fix tight loop of OSS capture stream")
    Cc: <stable@vger.kernel.org>
    Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    1529b10a
Name
Last commit
Last update
Documentation Loading commit data...
LICENSES Loading commit data...
arch Loading commit data...
block Loading commit data...
certs Loading commit data...
crypto Loading commit data...
drivers Loading commit data...
firmware Loading commit data...
fs Loading commit data...
include Loading commit data...
init Loading commit data...
ipc Loading commit data...
kernel Loading commit data...
lib Loading commit data...
mm Loading commit data...
net Loading commit data...
samples Loading commit data...
scripts Loading commit data...
security Loading commit data...
sound Loading commit data...
tools Loading commit data...
usr Loading commit data...
virt Loading commit data...
.clang-format Loading commit data...
.cocciconfig Loading commit data...
.get_maintainer.ignore Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
.mailmap Loading commit data...
COPYING Loading commit data...
CREDITS Loading commit data...
Kbuild Loading commit data...
Kconfig Loading commit data...
MAINTAINERS Loading commit data...
Makefile Loading commit data...
README Loading commit data...