Skip to content

Commit 2027f11

Browse files
committed
ALSA: usb-audio: Register card again for iface over delayed_register option
When the delayed registration is specified via either delayed_register option or the quirk, we delay the invocation of snd_card_register() until the given interface. But if a wrong value has been set there and there are more interfaces over the given interface number, snd_card_register() call would be missing for those interfaces. This patch catches up those missing calls by fixing the comparison of the interface number. Now the call is skipped only if the processed interface is less than the given interface, instead of the exact match. Fixes: b70038e ("ALSA: usb-audio: Add delayed_register option") Link: https://bugzilla.kernel.org/show_bug.cgi?id=216082 Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
1 parent 7e1afce commit 2027f11

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

sound/usb/card.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -699,7 +699,7 @@ static bool check_delayed_register_option(struct snd_usb_audio *chip, int iface)
699699
if (delayed_register[i] &&
700700
sscanf(delayed_register[i], "%x:%x", &id, &inum) == 2 &&
701701
id == chip->usb_id)
702-
return inum != iface;
702+
return iface < inum;
703703
}
704704

705705
return false;

sound/usb/quirks.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1764,7 +1764,7 @@ bool snd_usb_registration_quirk(struct snd_usb_audio *chip, int iface)
17641764

17651765
for (q = registration_quirks; q->usb_id; q++)
17661766
if (chip->usb_id == q->usb_id)
1767-
return iface != q->interface;
1767+
return iface < q->interface;
17681768

17691769
/* Register as normal */
17701770
return false;

0 commit comments

Comments
 (0)