summaryrefslogtreecommitdiff
path: root/sound/usb/pcm.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2021-08-29 09:38:30 +0200
committerTakashi Iwai <tiwai@suse.de>2021-08-29 09:41:27 +0200
commit4801bee7d5a36c199b734a28cde5259183aff822 (patch)
tree106e13cacf6d6263316ff0147734465037e90cd8 /sound/usb/pcm.c
parent4267c5a8f3133db0572cd9abee059b42cafbbdad (diff)
ALSA: usb-audio: Add lowlatency module option
For making user to switch back to the old playback mode, this patch adds a new module option 'lowlatency' to snd-usb-audio driver. When user face a regression due to the recent low-latency playback support, they can test easily by passing lowlatency=0 option without rebuilding the kernel. Fixes: 307cc9baac5c ("ALSA: usb-audio: Reduce latency at playback start, take#2") Link: https://lore.kernel.org/r/20210829073830.22686-1-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/usb/pcm.c')
-rw-r--r--sound/usb/pcm.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sound/usb/pcm.c b/sound/usb/pcm.c
index f5cbf61ac366..5dc9266180e3 100644
--- a/sound/usb/pcm.c
+++ b/sound/usb/pcm.c
@@ -617,7 +617,8 @@ static int snd_usb_pcm_prepare(struct snd_pcm_substream *substream)
/* check whether early start is needed for playback stream */
subs->early_playback_start =
subs->direction == SNDRV_PCM_STREAM_PLAYBACK &&
- subs->data_endpoint->nominal_queue_size >= subs->buffer_bytes;
+ (!chip->lowlatency ||
+ (subs->data_endpoint->nominal_queue_size >= subs->buffer_bytes));
if (subs->early_playback_start)
ret = start_endpoints(subs);