summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2011-11-09 15:06:45 +0100
committerTakashi Iwai <tiwai@suse.de>2011-11-09 15:08:41 +0100
commit596830ee1d2d9cf56e5efe0c020eb588beecae62 (patch)
tree8a8d9f6c7c46b1c88ac2402c38d947294e016473
parent0e7cc2e745450daa0aec8f32d663f7811cfac0f3 (diff)
downloadblackbird-obmc-linux-596830ee1d2d9cf56e5efe0c020eb588beecae62.tar.gz
blackbird-obmc-linux-596830ee1d2d9cf56e5efe0c020eb588beecae62.zip
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,
const struct alc_fixup *fixlist)
{
struct alc_spec *spec = codec->spec;
+ const struct snd_pci_quirk *q;
int id = -1;
const char *name = NULL;
@@ -1540,12 +1541,25 @@ static void alc_pick_fixup(struct hda_codec *codec,
}
}
if (id < 0) {
- quirk = snd_pci_quirk_lookup(codec->bus->pci, quirk);
- if (quirk) {
- id = quirk->value;
+ q = snd_pci_quirk_lookup(codec->bus->pci, quirk);
+ if (q) {
+ id = q->value;
+#ifdef CONFIG_SND_DEBUG_VERBOSE
+ name = q->name;
+#endif
+ }
+ }
+ if (id < 0) {
+ for (q = quirk; q->subvendor; q++) {
+ unsigned int vendorid =
+ q->subdevice | (q->subvendor << 16);
+ if (vendorid == codec->subsystem_id) {
+ id = q->value;
#ifdef CONFIG_SND_DEBUG_VERBOSE
- name = quirk->name;
+ name = q->name;
#endif
+ break;
+ }
}
}
OpenPOWER on IntegriCloud