Skip to content

Commit 086b957

Browse files
committed
ALSA: usb-audio: Skip the clock selector inquiry for single connections
The current USB-audio driver gets an error at probing NUX MG-300 about parsing the clocks. This is because the firmware doesn't return the proper connection of the clock selector that is connected to a single clock; it's likely that the firmware was lazy^w optimized and the inquiry wasn't handled. Actually it makes little sense to inquire and set up the single connection explicitly. This patch fixes the issue by simply skipping the clock selector inquiry if it's a single connection. Reported-by: Mike Oliphant <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
1 parent b952ac7 commit 086b957

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

sound/usb/clock.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -298,6 +298,11 @@ static int __uac_clock_find_source(struct snd_usb_audio *chip,
298298
if (selector) {
299299
int ret, i, cur;
300300

301+
if (selector->bNrInPins == 1) {
302+
ret = 1;
303+
goto find_source;
304+
}
305+
301306
/* the entity ID we are looking for is a selector.
302307
* find out what it currently selects */
303308
ret = uac_clock_selector_get_val(chip, selector->bClockID);
@@ -314,6 +319,7 @@ static int __uac_clock_find_source(struct snd_usb_audio *chip,
314319
return -EINVAL;
315320
}
316321

322+
find_source:
317323
cur = ret;
318324
ret = __uac_clock_find_source(chip, fmt,
319325
selector->baCSourceID[ret - 1],

0 commit comments

Comments
 (0)