|
@@ -1459,22 +1459,31 @@ struct alc_fixup {
|
|
|
|
|
|
static void alc_pick_fixup(struct hda_codec *codec,
|
|
|
const struct snd_pci_quirk *quirk,
|
|
|
- const struct alc_fixup *fix)
|
|
|
+ const struct alc_fixup *fix,
|
|
|
+ int pre_init)
|
|
|
{
|
|
|
const struct alc_pincfg *cfg;
|
|
|
|
|
|
quirk = snd_pci_quirk_lookup(codec->bus->pci, quirk);
|
|
|
if (!quirk)
|
|
|
return;
|
|
|
-
|
|
|
fix += quirk->value;
|
|
|
cfg = fix->pins;
|
|
|
- if (cfg) {
|
|
|
+ if (pre_init && cfg) {
|
|
|
+#ifdef CONFIG_SND_DEBUG_VERBOSE
|
|
|
+ snd_printdd(KERN_INFO "hda_codec: %s: Apply pincfg for %s\n",
|
|
|
+ codec->chip_name, quirk->name);
|
|
|
+#endif
|
|
|
for (; cfg->nid; cfg++)
|
|
|
snd_hda_codec_set_pincfg(codec, cfg->nid, cfg->val);
|
|
|
}
|
|
|
- if (fix->verbs)
|
|
|
+ if (!pre_init && fix->verbs) {
|
|
|
+#ifdef CONFIG_SND_DEBUG_VERBOSE
|
|
|
+ snd_printdd(KERN_INFO "hda_codec: %s: Apply fix-verbs for %s\n",
|
|
|
+ codec->chip_name, quirk->name);
|
|
|
+#endif
|
|
|
add_verb(codec->spec, fix->verbs);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
static int alc_read_coef_idx(struct hda_codec *codec,
|
|
@@ -10535,7 +10544,8 @@ static int patch_alc882(struct hda_codec *codec)
|
|
|
board_config = ALC882_AUTO;
|
|
|
}
|
|
|
|
|
|
- alc_pick_fixup(codec, alc882_fixup_tbl, alc882_fixups);
|
|
|
+ if (board_config == ALC882_AUTO)
|
|
|
+ alc_pick_fixup(codec, alc882_fixup_tbl, alc882_fixups, 1);
|
|
|
|
|
|
if (board_config == ALC882_AUTO) {
|
|
|
/* automatic parse from the BIOS config */
|
|
@@ -10610,6 +10620,9 @@ static int patch_alc882(struct hda_codec *codec)
|
|
|
if (spec->cdefine.enable_pcbeep)
|
|
|
set_beep_amp(spec, 0x0b, 0x05, HDA_INPUT);
|
|
|
|
|
|
+ if (board_config == ALC882_AUTO)
|
|
|
+ alc_pick_fixup(codec, alc882_fixup_tbl, alc882_fixups, 0);
|
|
|
+
|
|
|
spec->vmaster_nid = 0x0c;
|
|
|
|
|
|
codec->patch_ops = alc_patch_ops;
|
|
@@ -14192,6 +14205,27 @@ static void alc269_auto_init(struct hda_codec *codec)
|
|
|
alc_inithook(codec);
|
|
|
}
|
|
|
|
|
|
+enum {
|
|
|
+ ALC269_FIXUP_SONY_VAIO,
|
|
|
+};
|
|
|
+
|
|
|
+const static struct hda_verb alc269_sony_vaio_fixup_verbs[] = {
|
|
|
+ {0x19, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREFGRD},
|
|
|
+ {}
|
|
|
+};
|
|
|
+
|
|
|
+static const struct alc_fixup alc269_fixups[] = {
|
|
|
+ [ALC269_FIXUP_SONY_VAIO] = {
|
|
|
+ .verbs = alc269_sony_vaio_fixup_verbs
|
|
|
+ },
|
|
|
+};
|
|
|
+
|
|
|
+static struct snd_pci_quirk alc269_fixup_tbl[] = {
|
|
|
+ SND_PCI_QUIRK(0x104d, 0x9071, "Sony VAIO", ALC269_FIXUP_SONY_VAIO),
|
|
|
+ {}
|
|
|
+};
|
|
|
+
|
|
|
+
|
|
|
/*
|
|
|
* configuration and preset
|
|
|
*/
|
|
@@ -14251,7 +14285,7 @@ static struct snd_pci_quirk alc269_cfg_tbl[] = {
|
|
|
ALC269_DMIC),
|
|
|
SND_PCI_QUIRK(0x1043, 0x8398, "ASUS P1005HA", ALC269_DMIC),
|
|
|
SND_PCI_QUIRK(0x1043, 0x83ce, "ASUS P1005HA", ALC269_DMIC),
|
|
|
- SND_PCI_QUIRK(0x104d, 0x9071, "SONY XTB", ALC269_DMIC),
|
|
|
+ SND_PCI_QUIRK(0x104d, 0x9071, "Sony VAIO", ALC269_AUTO),
|
|
|
SND_PCI_QUIRK(0x10cf, 0x1475, "Lifebook ICH9M-based", ALC269_LIFEBOOK),
|
|
|
SND_PCI_QUIRK(0x152d, 0x1778, "Quanta ON1", ALC269_DMIC),
|
|
|
SND_PCI_QUIRK(0x1734, 0x115d, "FSC Amilo", ALC269_FUJITSU),
|
|
@@ -14405,6 +14439,9 @@ static int patch_alc269(struct hda_codec *codec)
|
|
|
board_config = ALC269_AUTO;
|
|
|
}
|
|
|
|
|
|
+ if (board_config == ALC269_AUTO)
|
|
|
+ alc_pick_fixup(codec, alc269_fixup_tbl, alc269_fixups, 1);
|
|
|
+
|
|
|
if (board_config == ALC269_AUTO) {
|
|
|
/* automatic parse from the BIOS config */
|
|
|
err = alc269_parse_auto_config(codec);
|
|
@@ -14458,6 +14495,9 @@ static int patch_alc269(struct hda_codec *codec)
|
|
|
if (spec->cdefine.enable_pcbeep)
|
|
|
set_beep_amp(spec, 0x0b, 0x04, HDA_INPUT);
|
|
|
|
|
|
+ if (board_config == ALC269_AUTO)
|
|
|
+ alc_pick_fixup(codec, alc269_fixup_tbl, alc269_fixups, 0);
|
|
|
+
|
|
|
spec->vmaster_nid = 0x02;
|
|
|
|
|
|
codec->patch_ops = alc_patch_ops;
|
|
@@ -15548,7 +15588,8 @@ static int patch_alc861(struct hda_codec *codec)
|
|
|
board_config = ALC861_AUTO;
|
|
|
}
|
|
|
|
|
|
- alc_pick_fixup(codec, alc861_fixup_tbl, alc861_fixups);
|
|
|
+ if (board_config == ALC861_AUTO)
|
|
|
+ alc_pick_fixup(codec, alc861_fixup_tbl, alc861_fixups, 1);
|
|
|
|
|
|
if (board_config == ALC861_AUTO) {
|
|
|
/* automatic parse from the BIOS config */
|
|
@@ -15585,6 +15626,9 @@ static int patch_alc861(struct hda_codec *codec)
|
|
|
|
|
|
spec->vmaster_nid = 0x03;
|
|
|
|
|
|
+ if (board_config == ALC861_AUTO)
|
|
|
+ alc_pick_fixup(codec, alc861_fixup_tbl, alc861_fixups, 0);
|
|
|
+
|
|
|
codec->patch_ops = alc_patch_ops;
|
|
|
if (board_config == ALC861_AUTO) {
|
|
|
spec->init_hook = alc861_auto_init;
|
|
@@ -16519,7 +16563,8 @@ static int patch_alc861vd(struct hda_codec *codec)
|
|
|
board_config = ALC861VD_AUTO;
|
|
|
}
|
|
|
|
|
|
- alc_pick_fixup(codec, alc861vd_fixup_tbl, alc861vd_fixups);
|
|
|
+ if (board_config == ALC861VD_AUTO)
|
|
|
+ alc_pick_fixup(codec, alc861vd_fixup_tbl, alc861vd_fixups, 1);
|
|
|
|
|
|
if (board_config == ALC861VD_AUTO) {
|
|
|
/* automatic parse from the BIOS config */
|
|
@@ -16567,6 +16612,9 @@ static int patch_alc861vd(struct hda_codec *codec)
|
|
|
|
|
|
spec->vmaster_nid = 0x02;
|
|
|
|
|
|
+ if (board_config == ALC861VD_AUTO)
|
|
|
+ alc_pick_fixup(codec, alc861vd_fixup_tbl, alc861vd_fixups, 0);
|
|
|
+
|
|
|
codec->patch_ops = alc_patch_ops;
|
|
|
|
|
|
if (board_config == ALC861VD_AUTO)
|