aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/patch_realtek.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/pci/hda/patch_realtek.c')
-rw-r--r--sound/pci/hda/patch_realtek.c130
1 files changed, 107 insertions, 23 deletions
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 5e42059f10a1..c5ea483d7559 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -1780,8 +1780,11 @@ enum {
1780 ALC889_FIXUP_DAC_ROUTE, 1780 ALC889_FIXUP_DAC_ROUTE,
1781 ALC889_FIXUP_MBP_VREF, 1781 ALC889_FIXUP_MBP_VREF,
1782 ALC889_FIXUP_IMAC91_VREF, 1782 ALC889_FIXUP_IMAC91_VREF,
1783 ALC889_FIXUP_MBA21_VREF,
1783 ALC882_FIXUP_INV_DMIC, 1784 ALC882_FIXUP_INV_DMIC,
1784 ALC882_FIXUP_NO_PRIMARY_HP, 1785 ALC882_FIXUP_NO_PRIMARY_HP,
1786 ALC887_FIXUP_ASUS_BASS,
1787 ALC887_FIXUP_BASS_CHMAP,
1785}; 1788};
1786 1789
1787static void alc889_fixup_coef(struct hda_codec *codec, 1790static void alc889_fixup_coef(struct hda_codec *codec,
@@ -1882,17 +1885,13 @@ static void alc889_fixup_mbp_vref(struct hda_codec *codec,
1882 } 1885 }
1883} 1886}
1884 1887
1885/* Set VREF on speaker pins on imac91 */ 1888static void alc889_fixup_mac_pins(struct hda_codec *codec,
1886static void alc889_fixup_imac91_vref(struct hda_codec *codec, 1889 const hda_nid_t *nids, int num_nids)
1887 const struct hda_fixup *fix, int action)
1888{ 1890{
1889 struct alc_spec *spec = codec->spec; 1891 struct alc_spec *spec = codec->spec;
1890 static hda_nid_t nids[2] = { 0x18, 0x1a };
1891 int i; 1892 int i;
1892 1893
1893 if (action != HDA_FIXUP_ACT_INIT) 1894 for (i = 0; i < num_nids; i++) {
1894 return;
1895 for (i = 0; i < ARRAY_SIZE(nids); i++) {
1896 unsigned int val; 1895 unsigned int val;
1897 val = snd_hda_codec_get_pin_target(codec, nids[i]); 1896 val = snd_hda_codec_get_pin_target(codec, nids[i]);
1898 val |= AC_PINCTL_VREF_50; 1897 val |= AC_PINCTL_VREF_50;
@@ -1901,6 +1900,26 @@ static void alc889_fixup_imac91_vref(struct hda_codec *codec,
1901 spec->gen.keep_vref_in_automute = 1; 1900 spec->gen.keep_vref_in_automute = 1;
1902} 1901}
1903 1902
1903/* Set VREF on speaker pins on imac91 */
1904static void alc889_fixup_imac91_vref(struct hda_codec *codec,
1905 const struct hda_fixup *fix, int action)
1906{
1907 static hda_nid_t nids[2] = { 0x18, 0x1a };
1908
1909 if (action == HDA_FIXUP_ACT_INIT)
1910 alc889_fixup_mac_pins(codec, nids, ARRAY_SIZE(nids));
1911}
1912
1913/* Set VREF on speaker pins on mba21 */
1914static void alc889_fixup_mba21_vref(struct hda_codec *codec,
1915 const struct hda_fixup *fix, int action)
1916{
1917 static hda_nid_t nids[2] = { 0x18, 0x19 };
1918
1919 if (action == HDA_FIXUP_ACT_INIT)
1920 alc889_fixup_mac_pins(codec, nids, ARRAY_SIZE(nids));
1921}
1922
1904/* Don't take HP output as primary 1923/* Don't take HP output as primary
1905 * Strangely, the speaker output doesn't work on Vaio Z and some Vaio 1924 * Strangely, the speaker output doesn't work on Vaio Z and some Vaio
1906 * all-in-one desktop PCs (for example VGC-LN51JGB) through DAC 0x05 1925 * all-in-one desktop PCs (for example VGC-LN51JGB) through DAC 0x05
@@ -1915,6 +1934,9 @@ static void alc882_fixup_no_primary_hp(struct hda_codec *codec,
1915 } 1934 }
1916} 1935}
1917 1936
1937static void alc_fixup_bass_chmap(struct hda_codec *codec,
1938 const struct hda_fixup *fix, int action);
1939
1918static const struct hda_fixup alc882_fixups[] = { 1940static const struct hda_fixup alc882_fixups[] = {
1919 [ALC882_FIXUP_ABIT_AW9D_MAX] = { 1941 [ALC882_FIXUP_ABIT_AW9D_MAX] = {
1920 .type = HDA_FIXUP_PINS, 1942 .type = HDA_FIXUP_PINS,
@@ -2097,6 +2119,12 @@ static const struct hda_fixup alc882_fixups[] = {
2097 .chained = true, 2119 .chained = true,
2098 .chain_id = ALC882_FIXUP_GPIO1, 2120 .chain_id = ALC882_FIXUP_GPIO1,
2099 }, 2121 },
2122 [ALC889_FIXUP_MBA21_VREF] = {
2123 .type = HDA_FIXUP_FUNC,
2124 .v.func = alc889_fixup_mba21_vref,
2125 .chained = true,
2126 .chain_id = ALC889_FIXUP_MBP_VREF,
2127 },
2100 [ALC882_FIXUP_INV_DMIC] = { 2128 [ALC882_FIXUP_INV_DMIC] = {
2101 .type = HDA_FIXUP_FUNC, 2129 .type = HDA_FIXUP_FUNC,
2102 .v.func = alc_fixup_inv_dmic_0x12, 2130 .v.func = alc_fixup_inv_dmic_0x12,
@@ -2105,6 +2133,19 @@ static const struct hda_fixup alc882_fixups[] = {
2105 .type = HDA_FIXUP_FUNC, 2133 .type = HDA_FIXUP_FUNC,
2106 .v.func = alc882_fixup_no_primary_hp, 2134 .v.func = alc882_fixup_no_primary_hp,
2107 }, 2135 },
2136 [ALC887_FIXUP_ASUS_BASS] = {
2137 .type = HDA_FIXUP_PINS,
2138 .v.pins = (const struct hda_pintbl[]) {
2139 {0x16, 0x99130130}, /* bass speaker */
2140 {}
2141 },
2142 .chained = true,
2143 .chain_id = ALC887_FIXUP_BASS_CHMAP,
2144 },
2145 [ALC887_FIXUP_BASS_CHMAP] = {
2146 .type = HDA_FIXUP_FUNC,
2147 .v.func = alc_fixup_bass_chmap,
2148 },
2108}; 2149};
2109 2150
2110static const struct snd_pci_quirk alc882_fixup_tbl[] = { 2151static const struct snd_pci_quirk alc882_fixup_tbl[] = {
@@ -2138,6 +2179,7 @@ static const struct snd_pci_quirk alc882_fixup_tbl[] = {
2138 SND_PCI_QUIRK(0x1043, 0x1873, "ASUS W90V", ALC882_FIXUP_ASUS_W90V), 2179 SND_PCI_QUIRK(0x1043, 0x1873, "ASUS W90V", ALC882_FIXUP_ASUS_W90V),
2139 SND_PCI_QUIRK(0x1043, 0x1971, "Asus W2JC", ALC882_FIXUP_ASUS_W2JC), 2180 SND_PCI_QUIRK(0x1043, 0x1971, "Asus W2JC", ALC882_FIXUP_ASUS_W2JC),
2140 SND_PCI_QUIRK(0x1043, 0x835f, "Asus Eee 1601", ALC888_FIXUP_EEE1601), 2181 SND_PCI_QUIRK(0x1043, 0x835f, "Asus Eee 1601", ALC888_FIXUP_EEE1601),
2182 SND_PCI_QUIRK(0x1043, 0x84bc, "ASUS ET2700", ALC887_FIXUP_ASUS_BASS),
2141 SND_PCI_QUIRK(0x104d, 0x9047, "Sony Vaio TT", ALC889_FIXUP_VAIO_TT), 2183 SND_PCI_QUIRK(0x104d, 0x9047, "Sony Vaio TT", ALC889_FIXUP_VAIO_TT),
2142 SND_PCI_QUIRK(0x104d, 0x905a, "Sony Vaio Z", ALC882_FIXUP_NO_PRIMARY_HP), 2184 SND_PCI_QUIRK(0x104d, 0x905a, "Sony Vaio Z", ALC882_FIXUP_NO_PRIMARY_HP),
2143 SND_PCI_QUIRK(0x104d, 0x9043, "Sony Vaio VGC-LN51JGB", ALC882_FIXUP_NO_PRIMARY_HP), 2185 SND_PCI_QUIRK(0x104d, 0x9043, "Sony Vaio VGC-LN51JGB", ALC882_FIXUP_NO_PRIMARY_HP),
@@ -2153,7 +2195,7 @@ static const struct snd_pci_quirk alc882_fixup_tbl[] = {
2153 SND_PCI_QUIRK(0x106b, 0x3000, "iMac", ALC889_FIXUP_MBP_VREF), 2195 SND_PCI_QUIRK(0x106b, 0x3000, "iMac", ALC889_FIXUP_MBP_VREF),
2154 SND_PCI_QUIRK(0x106b, 0x3200, "iMac 7,1 Aluminum", ALC882_FIXUP_EAPD), 2196 SND_PCI_QUIRK(0x106b, 0x3200, "iMac 7,1 Aluminum", ALC882_FIXUP_EAPD),
2155 SND_PCI_QUIRK(0x106b, 0x3400, "MacBookAir 1,1", ALC889_FIXUP_MBP_VREF), 2197 SND_PCI_QUIRK(0x106b, 0x3400, "MacBookAir 1,1", ALC889_FIXUP_MBP_VREF),
2156 SND_PCI_QUIRK(0x106b, 0x3500, "MacBookAir 2,1", ALC889_FIXUP_MBP_VREF), 2198 SND_PCI_QUIRK(0x106b, 0x3500, "MacBookAir 2,1", ALC889_FIXUP_MBA21_VREF),
2157 SND_PCI_QUIRK(0x106b, 0x3600, "Macbook 3,1", ALC889_FIXUP_MBP_VREF), 2199 SND_PCI_QUIRK(0x106b, 0x3600, "Macbook 3,1", ALC889_FIXUP_MBP_VREF),
2158 SND_PCI_QUIRK(0x106b, 0x3800, "MacbookPro 4,1", ALC889_FIXUP_MBP_VREF), 2200 SND_PCI_QUIRK(0x106b, 0x3800, "MacbookPro 4,1", ALC889_FIXUP_MBP_VREF),
2159 SND_PCI_QUIRK(0x106b, 0x3e00, "iMac 24 Aluminum", ALC885_FIXUP_MACPRO_GPIO), 2201 SND_PCI_QUIRK(0x106b, 0x3e00, "iMac 24 Aluminum", ALC885_FIXUP_MACPRO_GPIO),
@@ -3268,6 +3310,7 @@ static void alc_headset_mode_ctia(struct hda_codec *codec)
3268 alc_write_coef_idx(codec, 0x18, 0x7388); 3310 alc_write_coef_idx(codec, 0x18, 0x7388);
3269 break; 3311 break;
3270 case 0x10ec0668: 3312 case 0x10ec0668:
3313 alc_write_coef_idx(codec, 0x11, 0x0001);
3271 alc_write_coef_idx(codec, 0x15, 0x0d60); 3314 alc_write_coef_idx(codec, 0x15, 0x0d60);
3272 alc_write_coef_idx(codec, 0xc3, 0x0000); 3315 alc_write_coef_idx(codec, 0xc3, 0x0000);
3273 break; 3316 break;
@@ -3296,6 +3339,7 @@ static void alc_headset_mode_omtp(struct hda_codec *codec)
3296 alc_write_coef_idx(codec, 0x18, 0x7388); 3339 alc_write_coef_idx(codec, 0x18, 0x7388);
3297 break; 3340 break;
3298 case 0x10ec0668: 3341 case 0x10ec0668:
3342 alc_write_coef_idx(codec, 0x11, 0x0001);
3299 alc_write_coef_idx(codec, 0x15, 0x0d50); 3343 alc_write_coef_idx(codec, 0x15, 0x0d50);
3300 alc_write_coef_idx(codec, 0xc3, 0x0000); 3344 alc_write_coef_idx(codec, 0xc3, 0x0000);
3301 break; 3345 break;
@@ -3581,11 +3625,6 @@ static void alc283_hp_automute_hook(struct hda_codec *codec,
3581 vref); 3625 vref);
3582} 3626}
3583 3627
3584static void alc283_chromebook_caps(struct hda_codec *codec)
3585{
3586 snd_hda_override_wcaps(codec, 0x03, 0);
3587}
3588
3589static void alc283_fixup_chromebook(struct hda_codec *codec, 3628static void alc283_fixup_chromebook(struct hda_codec *codec,
3590 const struct hda_fixup *fix, int action) 3629 const struct hda_fixup *fix, int action)
3591{ 3630{
@@ -3594,9 +3633,26 @@ static void alc283_fixup_chromebook(struct hda_codec *codec,
3594 3633
3595 switch (action) { 3634 switch (action) {
3596 case HDA_FIXUP_ACT_PRE_PROBE: 3635 case HDA_FIXUP_ACT_PRE_PROBE:
3597 alc283_chromebook_caps(codec); 3636 snd_hda_override_wcaps(codec, 0x03, 0);
3598 /* Disable AA-loopback as it causes white noise */ 3637 /* Disable AA-loopback as it causes white noise */
3599 spec->gen.mixer_nid = 0; 3638 spec->gen.mixer_nid = 0;
3639 break;
3640 case HDA_FIXUP_ACT_INIT:
3641 /* Enable Line1 input control by verb */
3642 val = alc_read_coef_idx(codec, 0x1a);
3643 alc_write_coef_idx(codec, 0x1a, val | (1 << 4));
3644 break;
3645 }
3646}
3647
3648static void alc283_fixup_sense_combo_jack(struct hda_codec *codec,
3649 const struct hda_fixup *fix, int action)
3650{
3651 struct alc_spec *spec = codec->spec;
3652 int val;
3653
3654 switch (action) {
3655 case HDA_FIXUP_ACT_PRE_PROBE:
3600 spec->gen.hp_automute_hook = alc283_hp_automute_hook; 3656 spec->gen.hp_automute_hook = alc283_hp_automute_hook;
3601 break; 3657 break;
3602 case HDA_FIXUP_ACT_INIT: 3658 case HDA_FIXUP_ACT_INIT:
@@ -3604,9 +3660,6 @@ static void alc283_fixup_chromebook(struct hda_codec *codec,
3604 /* Set to manual mode */ 3660 /* Set to manual mode */
3605 val = alc_read_coef_idx(codec, 0x06); 3661 val = alc_read_coef_idx(codec, 0x06);
3606 alc_write_coef_idx(codec, 0x06, val & ~0x000c); 3662 alc_write_coef_idx(codec, 0x06, val & ~0x000c);
3607 /* Enable Line1 input control by verb */
3608 val = alc_read_coef_idx(codec, 0x1a);
3609 alc_write_coef_idx(codec, 0x1a, val | (1 << 4));
3610 break; 3663 break;
3611 } 3664 }
3612} 3665}
@@ -3798,9 +3851,11 @@ enum {
3798 ALC271_FIXUP_HP_GATE_MIC_JACK, 3851 ALC271_FIXUP_HP_GATE_MIC_JACK,
3799 ALC269_FIXUP_ACER_AC700, 3852 ALC269_FIXUP_ACER_AC700,
3800 ALC269_FIXUP_LIMIT_INT_MIC_BOOST, 3853 ALC269_FIXUP_LIMIT_INT_MIC_BOOST,
3854 ALC269VB_FIXUP_ASUS_ZENBOOK,
3801 ALC269_FIXUP_LIMIT_INT_MIC_BOOST_MUTE_LED, 3855 ALC269_FIXUP_LIMIT_INT_MIC_BOOST_MUTE_LED,
3802 ALC269VB_FIXUP_ORDISSIMO_EVE2, 3856 ALC269VB_FIXUP_ORDISSIMO_EVE2,
3803 ALC283_FIXUP_CHROME_BOOK, 3857 ALC283_FIXUP_CHROME_BOOK,
3858 ALC283_FIXUP_SENSE_COMBO_JACK,
3804 ALC282_FIXUP_ASUS_TX300, 3859 ALC282_FIXUP_ASUS_TX300,
3805 ALC283_FIXUP_INT_MIC, 3860 ALC283_FIXUP_INT_MIC,
3806 ALC290_FIXUP_MONO_SPEAKERS, 3861 ALC290_FIXUP_MONO_SPEAKERS,
@@ -4075,6 +4130,12 @@ static const struct hda_fixup alc269_fixups[] = {
4075 .chained = true, 4130 .chained = true,
4076 .chain_id = ALC269_FIXUP_THINKPAD_ACPI, 4131 .chain_id = ALC269_FIXUP_THINKPAD_ACPI,
4077 }, 4132 },
4133 [ALC269VB_FIXUP_ASUS_ZENBOOK] = {
4134 .type = HDA_FIXUP_FUNC,
4135 .v.func = alc269_fixup_limit_int_mic_boost,
4136 .chained = true,
4137 .chain_id = ALC269VB_FIXUP_DMIC,
4138 },
4078 [ALC269_FIXUP_LIMIT_INT_MIC_BOOST_MUTE_LED] = { 4139 [ALC269_FIXUP_LIMIT_INT_MIC_BOOST_MUTE_LED] = {
4079 .type = HDA_FIXUP_FUNC, 4140 .type = HDA_FIXUP_FUNC,
4080 .v.func = alc269_fixup_limit_int_mic_boost, 4141 .v.func = alc269_fixup_limit_int_mic_boost,
@@ -4094,6 +4155,12 @@ static const struct hda_fixup alc269_fixups[] = {
4094 .type = HDA_FIXUP_FUNC, 4155 .type = HDA_FIXUP_FUNC,
4095 .v.func = alc283_fixup_chromebook, 4156 .v.func = alc283_fixup_chromebook,
4096 }, 4157 },
4158 [ALC283_FIXUP_SENSE_COMBO_JACK] = {
4159 .type = HDA_FIXUP_FUNC,
4160 .v.func = alc283_fixup_sense_combo_jack,
4161 .chained = true,
4162 .chain_id = ALC283_FIXUP_CHROME_BOOK,
4163 },
4097 [ALC282_FIXUP_ASUS_TX300] = { 4164 [ALC282_FIXUP_ASUS_TX300] = {
4098 .type = HDA_FIXUP_FUNC, 4165 .type = HDA_FIXUP_FUNC,
4099 .v.func = alc282_fixup_asus_tx300, 4166 .v.func = alc282_fixup_asus_tx300,
@@ -4176,6 +4243,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
4176 SND_PCI_QUIRK(0x1028, 0x0614, "Dell Inspiron 3135", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE), 4243 SND_PCI_QUIRK(0x1028, 0x0614, "Dell Inspiron 3135", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE),
4177 SND_PCI_QUIRK(0x1028, 0x0616, "Dell Vostro 5470", ALC290_FIXUP_MONO_SPEAKERS), 4244 SND_PCI_QUIRK(0x1028, 0x0616, "Dell Vostro 5470", ALC290_FIXUP_MONO_SPEAKERS),
4178 SND_PCI_QUIRK(0x1028, 0x061f, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE), 4245 SND_PCI_QUIRK(0x1028, 0x061f, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE),
4246 SND_PCI_QUIRK(0x1028, 0x0638, "Dell Inspiron 5439", ALC290_FIXUP_MONO_SPEAKERS),
4179 SND_PCI_QUIRK(0x1028, 0x063f, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE), 4247 SND_PCI_QUIRK(0x1028, 0x063f, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE),
4180 SND_PCI_QUIRK(0x1028, 0x15cc, "Dell X5 Precision", ALC269_FIXUP_DELL2_MIC_NO_PRESENCE), 4248 SND_PCI_QUIRK(0x1028, 0x15cc, "Dell X5 Precision", ALC269_FIXUP_DELL2_MIC_NO_PRESENCE),
4181 SND_PCI_QUIRK(0x1028, 0x15cd, "Dell X5 Precision", ALC269_FIXUP_DELL2_MIC_NO_PRESENCE), 4249 SND_PCI_QUIRK(0x1028, 0x15cd, "Dell X5 Precision", ALC269_FIXUP_DELL2_MIC_NO_PRESENCE),
@@ -4184,13 +4252,12 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
4184 SND_PCI_QUIRK(0x103c, 0x1973, "HP Pavilion", ALC269_FIXUP_HP_MUTE_LED_MIC1), 4252 SND_PCI_QUIRK(0x103c, 0x1973, "HP Pavilion", ALC269_FIXUP_HP_MUTE_LED_MIC1),
4185 SND_PCI_QUIRK(0x103c, 0x1983, "HP Pavilion", ALC269_FIXUP_HP_MUTE_LED_MIC1), 4253 SND_PCI_QUIRK(0x103c, 0x1983, "HP Pavilion", ALC269_FIXUP_HP_MUTE_LED_MIC1),
4186 SND_PCI_QUIRK(0x103c, 0x218b, "HP", ALC269_FIXUP_LIMIT_INT_MIC_BOOST_MUTE_LED), 4254 SND_PCI_QUIRK(0x103c, 0x218b, "HP", ALC269_FIXUP_LIMIT_INT_MIC_BOOST_MUTE_LED),
4187 SND_PCI_QUIRK(0x103c, 0x21ed, "HP Falco Chromebook", ALC283_FIXUP_CHROME_BOOK),
4188 SND_PCI_QUIRK_VENDOR(0x103c, "HP", ALC269_FIXUP_HP_MUTE_LED), 4255 SND_PCI_QUIRK_VENDOR(0x103c, "HP", ALC269_FIXUP_HP_MUTE_LED),
4189 SND_PCI_QUIRK(0x1043, 0x103f, "ASUS TX300", ALC282_FIXUP_ASUS_TX300), 4256 SND_PCI_QUIRK(0x1043, 0x103f, "ASUS TX300", ALC282_FIXUP_ASUS_TX300),
4190 SND_PCI_QUIRK(0x1043, 0x106d, "Asus K53BE", ALC269_FIXUP_LIMIT_INT_MIC_BOOST), 4257 SND_PCI_QUIRK(0x1043, 0x106d, "Asus K53BE", ALC269_FIXUP_LIMIT_INT_MIC_BOOST),
4191 SND_PCI_QUIRK(0x1043, 0x115d, "Asus 1015E", ALC269_FIXUP_LIMIT_INT_MIC_BOOST), 4258 SND_PCI_QUIRK(0x1043, 0x115d, "Asus 1015E", ALC269_FIXUP_LIMIT_INT_MIC_BOOST),
4192 SND_PCI_QUIRK(0x1043, 0x1427, "Asus Zenbook UX31E", ALC269VB_FIXUP_DMIC), 4259 SND_PCI_QUIRK(0x1043, 0x1427, "Asus Zenbook UX31E", ALC269VB_FIXUP_ASUS_ZENBOOK),
4193 SND_PCI_QUIRK(0x1043, 0x1517, "Asus Zenbook UX31A", ALC269VB_FIXUP_DMIC), 4260 SND_PCI_QUIRK(0x1043, 0x1517, "Asus Zenbook UX31A", ALC269VB_FIXUP_ASUS_ZENBOOK),
4194 SND_PCI_QUIRK(0x1043, 0x16e3, "ASUS UX50", ALC269_FIXUP_STEREO_DMIC), 4261 SND_PCI_QUIRK(0x1043, 0x16e3, "ASUS UX50", ALC269_FIXUP_STEREO_DMIC),
4195 SND_PCI_QUIRK(0x1043, 0x1a13, "Asus G73Jw", ALC269_FIXUP_ASUS_G73JW), 4262 SND_PCI_QUIRK(0x1043, 0x1a13, "Asus G73Jw", ALC269_FIXUP_ASUS_G73JW),
4196 SND_PCI_QUIRK(0x1043, 0x1b13, "Asus U41SV", ALC269_FIXUP_INV_DMIC), 4263 SND_PCI_QUIRK(0x1043, 0x1b13, "Asus U41SV", ALC269_FIXUP_INV_DMIC),
@@ -4292,6 +4359,8 @@ static const struct hda_model_fixup alc269_fixup_models[] = {
4292 {.id = ALC269_FIXUP_HP_GPIO_LED, .name = "hp-gpio-led"}, 4359 {.id = ALC269_FIXUP_HP_GPIO_LED, .name = "hp-gpio-led"},
4293 {.id = ALC269_FIXUP_DELL1_MIC_NO_PRESENCE, .name = "dell-headset-multi"}, 4360 {.id = ALC269_FIXUP_DELL1_MIC_NO_PRESENCE, .name = "dell-headset-multi"},
4294 {.id = ALC269_FIXUP_DELL2_MIC_NO_PRESENCE, .name = "dell-headset-dock"}, 4361 {.id = ALC269_FIXUP_DELL2_MIC_NO_PRESENCE, .name = "dell-headset-dock"},
4362 {.id = ALC283_FIXUP_CHROME_BOOK, .name = "alc283-chrome"},
4363 {.id = ALC283_FIXUP_SENSE_COMBO_JACK, .name = "alc283-sense-combo"},
4295 {} 4364 {}
4296}; 4365};
4297 4366
@@ -4467,6 +4536,7 @@ enum {
4467 ALC861_FIXUP_AMP_VREF_0F, 4536 ALC861_FIXUP_AMP_VREF_0F,
4468 ALC861_FIXUP_NO_JACK_DETECT, 4537 ALC861_FIXUP_NO_JACK_DETECT,
4469 ALC861_FIXUP_ASUS_A6RP, 4538 ALC861_FIXUP_ASUS_A6RP,
4539 ALC660_FIXUP_ASUS_W7J,
4470}; 4540};
4471 4541
4472/* On some laptops, VREF of pin 0x0f is abused for controlling the main amp */ 4542/* On some laptops, VREF of pin 0x0f is abused for controlling the main amp */
@@ -4516,10 +4586,22 @@ static const struct hda_fixup alc861_fixups[] = {
4516 .v.func = alc861_fixup_asus_amp_vref_0f, 4586 .v.func = alc861_fixup_asus_amp_vref_0f,
4517 .chained = true, 4587 .chained = true,
4518 .chain_id = ALC861_FIXUP_NO_JACK_DETECT, 4588 .chain_id = ALC861_FIXUP_NO_JACK_DETECT,
4589 },
4590 [ALC660_FIXUP_ASUS_W7J] = {
4591 .type = HDA_FIXUP_VERBS,
4592 .v.verbs = (const struct hda_verb[]) {
4593 /* ASUS W7J needs a magic pin setup on unused NID 0x10
4594 * for enabling outputs
4595 */
4596 {0x10, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x24},
4597 { }
4598 },
4519 } 4599 }
4520}; 4600};
4521 4601
4522static const struct snd_pci_quirk alc861_fixup_tbl[] = { 4602static const struct snd_pci_quirk alc861_fixup_tbl[] = {
4603 SND_PCI_QUIRK(0x1043, 0x1253, "ASUS W7J", ALC660_FIXUP_ASUS_W7J),
4604 SND_PCI_QUIRK(0x1043, 0x1263, "ASUS Z35HL", ALC660_FIXUP_ASUS_W7J),
4523 SND_PCI_QUIRK(0x1043, 0x1393, "ASUS A6Rp", ALC861_FIXUP_ASUS_A6RP), 4605 SND_PCI_QUIRK(0x1043, 0x1393, "ASUS A6Rp", ALC861_FIXUP_ASUS_A6RP),
4524 SND_PCI_QUIRK_VENDOR(0x1043, "ASUS laptop", ALC861_FIXUP_AMP_VREF_0F), 4606 SND_PCI_QUIRK_VENDOR(0x1043, "ASUS laptop", ALC861_FIXUP_AMP_VREF_0F),
4525 SND_PCI_QUIRK(0x1462, 0x7254, "HP DX2200", ALC861_FIXUP_NO_JACK_DETECT), 4607 SND_PCI_QUIRK(0x1462, 0x7254, "HP DX2200", ALC861_FIXUP_NO_JACK_DETECT),
@@ -4715,7 +4797,7 @@ static const struct snd_pcm_chmap_elem asus_pcm_2_1_chmaps[] = {
4715}; 4797};
4716 4798
4717/* override the 2.1 chmap */ 4799/* override the 2.1 chmap */
4718static void alc662_fixup_bass_chmap(struct hda_codec *codec, 4800static void alc_fixup_bass_chmap(struct hda_codec *codec,
4719 const struct hda_fixup *fix, int action) 4801 const struct hda_fixup *fix, int action)
4720{ 4802{
4721 if (action == HDA_FIXUP_ACT_BUILD) { 4803 if (action == HDA_FIXUP_ACT_BUILD) {
@@ -4923,7 +5005,7 @@ static const struct hda_fixup alc662_fixups[] = {
4923 }, 5005 },
4924 [ALC662_FIXUP_BASS_CHMAP] = { 5006 [ALC662_FIXUP_BASS_CHMAP] = {
4925 .type = HDA_FIXUP_FUNC, 5007 .type = HDA_FIXUP_FUNC,
4926 .v.func = alc662_fixup_bass_chmap, 5008 .v.func = alc_fixup_bass_chmap,
4927 .chained = true, 5009 .chained = true,
4928 .chain_id = ALC662_FIXUP_ASUS_MODE4 5010 .chain_id = ALC662_FIXUP_ASUS_MODE4
4929 }, 5011 },
@@ -4936,7 +5018,7 @@ static const struct hda_fixup alc662_fixups[] = {
4936 }, 5018 },
4937 [ALC662_FIXUP_BASS_1A_CHMAP] = { 5019 [ALC662_FIXUP_BASS_1A_CHMAP] = {
4938 .type = HDA_FIXUP_FUNC, 5020 .type = HDA_FIXUP_FUNC,
4939 .v.func = alc662_fixup_bass_chmap, 5021 .v.func = alc_fixup_bass_chmap,
4940 .chained = true, 5022 .chained = true,
4941 .chain_id = ALC662_FIXUP_BASS_1A, 5023 .chain_id = ALC662_FIXUP_BASS_1A,
4942 }, 5024 },
@@ -5118,6 +5200,7 @@ static int patch_alc662(struct hda_codec *codec)
5118 case 0x10ec0272: 5200 case 0x10ec0272:
5119 case 0x10ec0663: 5201 case 0x10ec0663:
5120 case 0x10ec0665: 5202 case 0x10ec0665:
5203 case 0x10ec0668:
5121 set_beep_amp(spec, 0x0b, 0x04, HDA_INPUT); 5204 set_beep_amp(spec, 0x0b, 0x04, HDA_INPUT);
5122 break; 5205 break;
5123 case 0x10ec0273: 5206 case 0x10ec0273:
@@ -5175,6 +5258,7 @@ static int patch_alc680(struct hda_codec *codec)
5175 */ 5258 */
5176static const struct hda_codec_preset snd_hda_preset_realtek[] = { 5259static const struct hda_codec_preset snd_hda_preset_realtek[] = {
5177 { .id = 0x10ec0221, .name = "ALC221", .patch = patch_alc269 }, 5260 { .id = 0x10ec0221, .name = "ALC221", .patch = patch_alc269 },
5261 { .id = 0x10ec0231, .name = "ALC231", .patch = patch_alc269 },
5178 { .id = 0x10ec0233, .name = "ALC233", .patch = patch_alc269 }, 5262 { .id = 0x10ec0233, .name = "ALC233", .patch = patch_alc269 },
5179 { .id = 0x10ec0255, .name = "ALC255", .patch = patch_alc269 }, 5263 { .id = 0x10ec0255, .name = "ALC255", .patch = patch_alc269 },
5180 { .id = 0x10ec0260, .name = "ALC260", .patch = patch_alc260 }, 5264 { .id = 0x10ec0260, .name = "ALC260", .patch = patch_alc260 },