diff options
-rw-r--r-- | sound/pci/hda/patch_realtek.c | 22 |
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 | ||