aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2011-11-09 09:06:45 -0500
committerTakashi Iwai <tiwai@suse.de>2011-11-09 09:08:41 -0500
commit596830ee1d2d9cf56e5efe0c020eb588beecae62 (patch)
tree8a8d9f6c7c46b1c88ac2402c38d947294e016473
parent0e7cc2e745450daa0aec8f32d663f7811cfac0f3 (diff)
ALSA: hda/realtek - Look through codec SSID for fix-up lists
Not only PCI SSIDs but also look through codec SSIDs for fix-up table entries. MacBook tend to give the same PCI SSID but unique codec SSIDs. Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r--sound/pci/hda/patch_realtek.c22
1 files changed, 18 insertions, 4 deletions
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 75f739b7e763..640cf2810f03 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -1526,6 +1526,7 @@ static void alc_pick_fixup(struct hda_codec *codec,
1526 const struct alc_fixup *fixlist) 1526 const struct alc_fixup *fixlist)
1527{ 1527{
1528 struct alc_spec *spec = codec->spec; 1528 struct alc_spec *spec = codec->spec;
1529 const struct snd_pci_quirk *q;
1529 int id = -1; 1530 int id = -1;
1530 const char *name = NULL; 1531 const char *name = NULL;
1531 1532
@@ -1540,12 +1541,25 @@ static void alc_pick_fixup(struct hda_codec *codec,
1540 } 1541 }
1541 } 1542 }
1542 if (id < 0) { 1543 if (id < 0) {
1543 quirk = snd_pci_quirk_lookup(codec->bus->pci, quirk); 1544 q = snd_pci_quirk_lookup(codec->bus->pci, quirk);
1544 if (quirk) { 1545 if (q) {
1545 id = quirk->value; 1546 id = q->value;
1547#ifdef CONFIG_SND_DEBUG_VERBOSE
1548 name = q->name;
1549#endif
1550 }
1551 }
1552 if (id < 0) {
1553 for (q = quirk; q->subvendor; q++) {
1554 unsigned int vendorid =
1555 q->subdevice | (q->subvendor << 16);
1556 if (vendorid == codec->subsystem_id) {
1557 id = q->value;
1546#ifdef CONFIG_SND_DEBUG_VERBOSE 1558#ifdef CONFIG_SND_DEBUG_VERBOSE
1547 name = quirk->name; 1559 name = q->name;
1548#endif 1560#endif
1561 break;
1562 }
1549 } 1563 }
1550 } 1564 }
1551 1565