diff options
Diffstat (limited to 'sound/pci/hda/patch_realtek.c')
-rw-r--r-- | sound/pci/hda/patch_realtek.c | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 2d7d7de8498a..427da45d7906 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
@@ -10830,7 +10830,8 @@ static int alc_auto_add_mic_boost(struct hda_codec *codec) | |||
10830 | { | 10830 | { |
10831 | struct alc_spec *spec = codec->spec; | 10831 | struct alc_spec *spec = codec->spec; |
10832 | struct auto_pin_cfg *cfg = &spec->autocfg; | 10832 | struct auto_pin_cfg *cfg = &spec->autocfg; |
10833 | int i, err; | 10833 | int i, err, type; |
10834 | int type_idx = 0; | ||
10834 | hda_nid_t nid; | 10835 | hda_nid_t nid; |
10835 | 10836 | ||
10836 | for (i = 0; i < cfg->num_inputs; i++) { | 10837 | for (i = 0; i < cfg->num_inputs; i++) { |
@@ -10839,9 +10840,15 @@ static int alc_auto_add_mic_boost(struct hda_codec *codec) | |||
10839 | nid = cfg->inputs[i].pin; | 10840 | nid = cfg->inputs[i].pin; |
10840 | if (get_wcaps(codec, nid) & AC_WCAP_IN_AMP) { | 10841 | if (get_wcaps(codec, nid) & AC_WCAP_IN_AMP) { |
10841 | char label[32]; | 10842 | char label[32]; |
10843 | type = cfg->inputs[i].type; | ||
10844 | if (i > 0 && type == cfg->inputs[i - 1].type) | ||
10845 | type_idx++; | ||
10846 | else | ||
10847 | type_idx = 0; | ||
10842 | snprintf(label, sizeof(label), "%s Boost", | 10848 | snprintf(label, sizeof(label), "%s Boost", |
10843 | hda_get_autocfg_input_label(codec, cfg, i)); | 10849 | hda_get_autocfg_input_label(codec, cfg, i)); |
10844 | err = add_control(spec, ALC_CTL_WIDGET_VOL, label, 0, | 10850 | err = add_control(spec, ALC_CTL_WIDGET_VOL, label, |
10851 | type_idx, | ||
10845 | HDA_COMPOSE_AMP_VAL(nid, 3, 0, HDA_INPUT)); | 10852 | HDA_COMPOSE_AMP_VAL(nid, 3, 0, HDA_INPUT)); |
10846 | if (err < 0) | 10853 | if (err < 0) |
10847 | return err; | 10854 | return err; |
@@ -14800,6 +14807,8 @@ static int alc269_resume(struct hda_codec *codec) | |||
14800 | enum { | 14807 | enum { |
14801 | ALC269_FIXUP_SONY_VAIO, | 14808 | ALC269_FIXUP_SONY_VAIO, |
14802 | ALC269_FIXUP_DELL_M101Z, | 14809 | ALC269_FIXUP_DELL_M101Z, |
14810 | ALC269_FIXUP_LENOVO_EDGE14, | ||
14811 | ALC269_FIXUP_ASUS_G73JW, | ||
14803 | }; | 14812 | }; |
14804 | 14813 | ||
14805 | static const struct alc_fixup alc269_fixups[] = { | 14814 | static const struct alc_fixup alc269_fixups[] = { |
@@ -14817,11 +14826,22 @@ static const struct alc_fixup alc269_fixups[] = { | |||
14817 | {} | 14826 | {} |
14818 | } | 14827 | } |
14819 | }, | 14828 | }, |
14829 | [ALC269_FIXUP_LENOVO_EDGE14] = { | ||
14830 | .sku = ALC_FIXUP_SKU_IGNORE, | ||
14831 | }, | ||
14832 | [ALC269_FIXUP_ASUS_G73JW] = { | ||
14833 | .pins = (const struct alc_pincfg[]) { | ||
14834 | { 0x17, 0x99130111 }, /* subwoofer */ | ||
14835 | { } | ||
14836 | } | ||
14837 | }, | ||
14820 | }; | 14838 | }; |
14821 | 14839 | ||
14822 | static struct snd_pci_quirk alc269_fixup_tbl[] = { | 14840 | static struct snd_pci_quirk alc269_fixup_tbl[] = { |
14823 | SND_PCI_QUIRK_VENDOR(0x104d, "Sony VAIO", ALC269_FIXUP_SONY_VAIO), | 14841 | SND_PCI_QUIRK_VENDOR(0x104d, "Sony VAIO", ALC269_FIXUP_SONY_VAIO), |
14824 | SND_PCI_QUIRK(0x1028, 0x0470, "Dell M101z", ALC269_FIXUP_DELL_M101Z), | 14842 | SND_PCI_QUIRK(0x1028, 0x0470, "Dell M101z", ALC269_FIXUP_DELL_M101Z), |
14843 | SND_PCI_QUIRK(0x17aa, 0x21b8, "Thinkpad Edge 14", ALC269_FIXUP_LENOVO_EDGE14), | ||
14844 | SND_PCI_QUIRK(0x1043, 0x1a13, "Asus G73Jw", ALC269_FIXUP_ASUS_G73JW), | ||
14825 | {} | 14845 | {} |
14826 | }; | 14846 | }; |
14827 | 14847 | ||