]> git.baikalelectronics.ru Git - kernel.git/commitdiff
ALSA: core: Fix SSID quirk lookup for subvendor=0
authorTakashi Iwai <tiwai@suse.de>
Sun, 16 Jan 2022 08:28:38 +0000 (09:28 +0100)
committerTakashi Iwai <tiwai@suse.de>
Mon, 17 Jan 2022 08:59:32 +0000 (09:59 +0100)
Some weird devices set the codec SSID vendor ID 0, and
snd_pci_quirk_lookup_id() loop aborts at the point although it should
still try matching with the SSID device ID.  This resulted in a
missing quirk for some old Macs.

Fix the loop termination condition to check both subvendor and
subdevice.

Fixes: fcafcc326b85 ("ALSA: hda: Code refactoring snd_hda_pick_fixup()")
Cc: <stable@vger.kernel.org>
BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=215495
Link: https://lore.kernel.org/r/20220116082838.19382-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/core/misc.c

index 3579dd7a161f7beccfa92ac92eb9eb2ea81c14e1..50e4aaa6270d187a456fb3fe5ce0af525cbe3f13 100644 (file)
@@ -112,7 +112,7 @@ snd_pci_quirk_lookup_id(u16 vendor, u16 device,
 {
        const struct snd_pci_quirk *q;
 
-       for (q = list; q->subvendor; q++) {
+       for (q = list; q->subvendor || q->subdevice; q++) {
                if (q->subvendor != vendor)
                        continue;
                if (!q->subdevice ||