Skip to content

Commit 67794f8

Browse files
puleglottiwai
authored andcommitted
ALSA: usb-audio: Skip setting clock selector for single connections
Since commit 086b957 ("ALSA: usb-audio: Skip the clock selector inquiry for single connections") we are already skipping clock selector inquiry if only one clock source is connected, but we are still sending a set request. Lets skip that too. This should fix errors when setting a sample rate on devices that don't have any controls present within the clock selector. An example of such device is the new revision of MOTU M Series (07fd:000b): AudioControl Interface Descriptor: bLength 8 bDescriptorType 36 bDescriptorSubtype 11 (CLOCK_SELECTOR) bClockID 1 bNrInPins 1 baCSourceID(0) 2 bmControls 0x00 iClockSelector 0 Perhaps we also should check if clock selectors are readable and writeable like we already do for clock sources, but this is out of scope of this patch. Link: https://bugzilla.kernel.org/show_bug.cgi?id=217601 Signed-off-by: Alexander Tsoy <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
1 parent a969210 commit 67794f8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

sound/usb/clock.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,8 @@ static int __uac_clock_find_source(struct snd_usb_audio *chip,
325325
visited, validate);
326326
if (ret > 0) {
327327
/* Skip setting clock selector again for some devices */
328-
if (chip->quirk_flags & QUIRK_FLAG_SKIP_CLOCK_SELECTOR)
328+
if (chip->quirk_flags & QUIRK_FLAG_SKIP_CLOCK_SELECTOR ||
329+
pins == 1)
329330
return ret;
330331
err = uac_clock_selector_set_val(chip, entity_id, cur);
331332
if (err < 0)

0 commit comments

Comments
 (0)