Skip to content

Commit

Permalink
ALSA: usb-audio: Don't start stream for capture at prepare
Browse files Browse the repository at this point in the history
The recent change made mistakenly the stream for capture started at
prepare stage.  Add the stream direction check to avoid it.

Fixes: 9c9a3b9 ("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>
  • Loading branch information
tiwai committed Nov 19, 2021
1 parent eee5d6f commit 83de8f8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sound/usb/pcm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 83de8f8

Please sign in to comment.