ALSA: usb-audio: UAC2: auto clock selection module param
Add a module param to disable auto clock selection.
This is provided for users that expect the audio stream to
fail when the clock source is invalid (e.g., the word clock
was unintentionally disconnected).
Signed-off-by: Eldad Zack <eldad@fogrefinery.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
diff --git a/sound/usb/clock.c b/sound/usb/clock.c
index d7ab2d75..e59d359 100644
--- a/sound/usb/clock.c
+++ b/sound/usb/clock.c
@@ -217,7 +217,7 @@
cur = ret;
ret = __uac_clock_find_source(chip, selector->baCSourceID[ret - 1],
visited, validate);
- if (!validate || ret > 0)
+ if (!validate || ret > 0 || !chip->autoclock)
return ret;
/* The current clock source is invalid, try others. */