mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-04 08:17:46 +00:00
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>
This commit is contained in:
parent
0e7cc2e745
commit
596830ee1d
1 changed files with 18 additions and 4 deletions
|
@ -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,14 +1541,27 @@ 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 = quirk->name;
|
||||
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 = q->name;
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
spec->fixup_id = id;
|
||||
if (id >= 0) {
|
||||
|
|
Loading…
Add table
Reference in a new issue