From: Takashi Iwai Date: Tue, 11 Sep 2012 14:42:18 +0000 (+0200) Subject: ALSA: hda - Check bit mask for codec SSID in snd_hda_pick_fixup() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=a33b7b0a89a240a1416fa489f0b805488bfb9afd;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git ALSA: hda - Check bit mask for codec SSID in snd_hda_pick_fixup() snd_hda_pick_fixup() didn't check the case where the device mask bits are set, typically used for SND_PCI_QUIRK_VENDOR() entries. Fix this. Signed-off-by: Takashi Iwai --- diff --git a/sound/pci/hda/hda_auto_parser.c b/sound/pci/hda/hda_auto_parser.c index 9acd5a964eb6..a98e25ebfd63 100644 --- a/sound/pci/hda/hda_auto_parser.c +++ b/sound/pci/hda/hda_auto_parser.c @@ -735,7 +735,8 @@ void snd_hda_pick_fixup(struct hda_codec *codec, for (q = quirk; q->subvendor; q++) { unsigned int vendorid = q->subdevice | (q->subvendor << 16); - if (vendorid == codec->subsystem_id) { + unsigned int mask = 0xffff0000 | q->subdevice_mask; + if ((codec->subsystem_id & mask) == (vendorid & mask)) { id = q->value; #ifdef CONFIG_SND_DEBUG_VERBOSE name = q->name;