This is a note to let you know that I've just added the patch titled ALSA: pcm: Return 0 when size < start_threshold in capture to the 4.19-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: alsa-pcm-return-0-when-size-start_threshold-in-captu.patch and it can be found in the queue-4.19 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. commit b0525b009dbf48b3a995163c1e133037efa5096d Author: Ricardo Biehl Pasquali <pasqualirb@xxxxxxxxx> Date: Sat Aug 25 16:53:23 2018 -0300 ALSA: pcm: Return 0 when size < start_threshold in capture [ Upstream commit 62ba568f7aef4beb0eda945a2b2a91b7a2b8f215 ] In __snd_pcm_lib_xfer(), when capture, if state is PREPARED and size is less than start_threshold nothing can be done. As there is no error, 0 is returned. Signed-off-by: Ricardo Biehl Pasquali <pasqualirb@xxxxxxxxx> Signed-off-by: Takashi Iwai <tiwai@xxxxxxx> Stable-dep-of: 4413665dd6c5 ("ALSA: usb-audio: Add quirks for Dell WD19 dock") Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx> diff --git a/sound/core/pcm_lib.c b/sound/core/pcm_lib.c index c376471cf760f..463c04e82558b 100644 --- a/sound/core/pcm_lib.c +++ b/sound/core/pcm_lib.c @@ -2178,11 +2178,16 @@ snd_pcm_sframes_t __snd_pcm_lib_xfer(struct snd_pcm_substream *substream, goto _end_unlock; if (!is_playback && - runtime->status->state == SNDRV_PCM_STATE_PREPARED && - size >= runtime->start_threshold) { - err = snd_pcm_start(substream); - if (err < 0) + runtime->status->state == SNDRV_PCM_STATE_PREPARED) { + if (size >= runtime->start_threshold) { + err = snd_pcm_start(substream); + if (err < 0) + goto _end_unlock; + } else { + /* nothing to do */ + err = 0; goto _end_unlock; + } } runtime->twake = runtime->control->avail_min ? : 1;