diff options
author | Takashi Iwai <tiwai@suse.de> | 2021-11-19 11:26:29 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-12-08 09:04:37 +0100 |
commit | 1236351c29c7ffe02c96078d30d766392e90c568 (patch) | |
tree | d29b8a62d1b6e49e0500ffbfc520d1d6078cea8c /sound/usb | |
parent | 321cd173b8cc4a1cccf6bfefac1c9f7408dae38a (diff) | |
download | linux-stable-1236351c29c7ffe02c96078d30d766392e90c568.tar.gz linux-stable-1236351c29c7ffe02c96078d30d766392e90c568.tar.bz2 linux-stable-1236351c29c7ffe02c96078d30d766392e90c568.zip |
ALSA: usb-audio: Don't start stream for capture at prepare
commit 83de8f83816e8e15227dac985163e3d433a2bf9d upstream.
The recent change made mistakenly the stream for capture started at
prepare stage. Add the stream direction check to avoid it.
Fixes: 9c9a3b9da891 ("ALSA: usb-audio: Rename early_playback_start flag with lowlatency_playback")
Link: https://lore.kernel.org/r/20211119102629.7476-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'sound/usb')
-rw-r--r-- | sound/usb/pcm.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sound/usb/pcm.c b/sound/usb/pcm.c index f1f22e84c191..2e51fb031ae0 100644 --- a/sound/usb/pcm.c +++ b/sound/usb/pcm.c @@ -640,7 +640,8 @@ static int snd_usb_pcm_prepare(struct snd_pcm_substream *substream) runtime->delay = 0; subs->lowlatency_playback = lowlatency_playback_available(runtime, subs); - if (!subs->lowlatency_playback) + if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK && + !subs->lowlatency_playback) ret = start_endpoints(subs); unlock: |