aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2011-11-09 12:03:07 -0500
committerTakashi Iwai <tiwai@suse.de>2011-11-09 12:03:07 -0500
commiteb844d51cccca0ce9fad316da803f1bbe53d323b (patch)
tree833770bd3ed5e2d61c673eb0b9b9458dfacdf258 /sound
parentac9b1cddf10a299fb3a4dd411e518d07ad17f89f (diff)
ALSA: hda/realtek - Remove ALC882 targa-* models
All ALC882 targa-* models can be replaced with the auto-parser just with the additional GPIO3 setup. And it's generically applied to all MSI boards unless other quirks are present. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r--sound/pci/hda/alc882_quirks.c235
-rw-r--r--sound/pci/hda/patch_realtek.c6
2 files changed, 6 insertions, 235 deletions
diff --git a/sound/pci/hda/alc882_quirks.c b/sound/pci/hda/alc882_quirks.c
index 707dd28aa15e..185ad65a311e 100644
--- a/sound/pci/hda/alc882_quirks.c
+++ b/sound/pci/hda/alc882_quirks.c
@@ -9,7 +9,6 @@ enum {
9 ALC882_3ST_DIG, 9 ALC882_3ST_DIG,
10 ALC882_6ST_DIG, 10 ALC882_6ST_DIG,
11 ALC882_W2JC, 11 ALC882_W2JC,
12 ALC882_TARGA,
13 ALC885_MACPRO, 12 ALC885_MACPRO,
14 ALC885_MBA21, 13 ALC885_MBA21,
15 ALC885_MBP3, 14 ALC885_MBP3,
@@ -21,9 +20,6 @@ enum {
21 ALC883_3ST_6ch_DIG, 20 ALC883_3ST_6ch_DIG,
22 ALC883_3ST_6ch, 21 ALC883_3ST_6ch,
23 ALC883_6ST_DIG, 22 ALC883_6ST_DIG,
24 ALC883_TARGA_DIG,
25 ALC883_TARGA_2ch_DIG,
26 ALC883_TARGA_8ch_DIG,
27 ALC888_ACER_ASPIRE_4930G, 23 ALC888_ACER_ASPIRE_4930G,
28 ALC888_ACER_ASPIRE_6530G, 24 ALC888_ACER_ASPIRE_6530G,
29 ALC888_ACER_ASPIRE_8930G, 25 ALC888_ACER_ASPIRE_8930G,
@@ -1019,23 +1015,6 @@ static const struct snd_kcontrol_new alc882_w2jc_mixer[] = {
1019 { } /* end */ 1015 { } /* end */
1020}; 1016};
1021 1017
1022static const struct snd_kcontrol_new alc882_targa_mixer[] = {
1023 HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT),
1024 HDA_BIND_MUTE("Front Playback Switch", 0x0c, 2, HDA_INPUT),
1025 HDA_CODEC_MUTE("Headphone Playback Switch", 0x1b, 0x0, HDA_OUTPUT),
1026 HDA_CODEC_VOLUME("CD Playback Volume", 0x0b, 0x04, HDA_INPUT),
1027 HDA_CODEC_MUTE("CD Playback Switch", 0x0b, 0x04, HDA_INPUT),
1028 HDA_CODEC_VOLUME("Line Playback Volume", 0x0b, 0x02, HDA_INPUT),
1029 HDA_CODEC_MUTE("Line Playback Switch", 0x0b, 0x02, HDA_INPUT),
1030 HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT),
1031 HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT),
1032 HDA_CODEC_VOLUME("Mic Boost Volume", 0x18, 0, HDA_INPUT),
1033 HDA_CODEC_VOLUME("Front Mic Playback Volume", 0x0b, 0x1, HDA_INPUT),
1034 HDA_CODEC_MUTE("Front Mic Playback Switch", 0x0b, 0x1, HDA_INPUT),
1035 HDA_CODEC_VOLUME("Front Mic Boost Volume", 0x19, 0, HDA_INPUT),
1036 { } /* end */
1037};
1038
1039static const struct snd_kcontrol_new alc882_chmode_mixer[] = { 1018static const struct snd_kcontrol_new alc882_chmode_mixer[] = {
1040 { 1019 {
1041 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 1020 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
@@ -1593,45 +1572,7 @@ static void alc885_imac91_setup(struct hda_codec *codec)
1593 alc_simple_setup_automute(spec, ALC_AUTOMUTE_AMP); 1572 alc_simple_setup_automute(spec, ALC_AUTOMUTE_AMP);
1594} 1573}
1595 1574
1596static const struct hda_verb alc882_targa_verbs[] = {
1597 {0x0c, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
1598 {0x0c, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)},
1599
1600 {0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP},
1601 {0x1b, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
1602
1603 {0x18, AC_VERB_SET_CONNECT_SEL, 0x02}, /* mic/clfe */
1604 {0x1a, AC_VERB_SET_CONNECT_SEL, 0x01}, /* line/surround */
1605 {0x1b, AC_VERB_SET_CONNECT_SEL, 0x00}, /* HP */
1606
1607 {0x14, AC_VERB_SET_UNSOLICITED_ENABLE, ALC_HP_EVENT | AC_USRSP_EN},
1608 { } /* end */
1609};
1610
1611/* toggle speaker-output according to the hp-jack state */ 1575/* toggle speaker-output according to the hp-jack state */
1612static void alc882_targa_automute(struct hda_codec *codec)
1613{
1614 struct alc_spec *spec = codec->spec;
1615 alc_hp_automute(codec);
1616 snd_hda_codec_write_cache(codec, 1, 0, AC_VERB_SET_GPIO_DATA,
1617 spec->hp_jack_present ? 1 : 3);
1618}
1619
1620static void alc882_targa_setup(struct hda_codec *codec)
1621{
1622 struct alc_spec *spec = codec->spec;
1623
1624 spec->autocfg.hp_pins[0] = 0x14;
1625 spec->autocfg.speaker_pins[0] = 0x1b;
1626 alc_simple_setup_automute(spec, ALC_AUTOMUTE_AMP);
1627}
1628
1629static void alc882_targa_unsol_event(struct hda_codec *codec, unsigned int res)
1630{
1631 if ((res >> 26) == ALC_HP_EVENT)
1632 alc882_targa_automute(codec);
1633}
1634
1635static void alc882_gpio_mute(struct hda_codec *codec, int pin, int muted) 1576static void alc882_gpio_mute(struct hda_codec *codec, int pin, int muted)
1636{ 1577{
1637 unsigned int gpiostate, gpiomask, gpiodir; 1578 unsigned int gpiostate, gpiomask, gpiodir;
@@ -1834,52 +1775,6 @@ static const struct snd_kcontrol_new alc883_fivestack_mixer[] = {
1834 { } /* end */ 1775 { } /* end */
1835}; 1776};
1836 1777
1837static const struct snd_kcontrol_new alc883_targa_mixer[] = {
1838 HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT),
1839 HDA_BIND_MUTE("Front Playback Switch", 0x0c, 2, HDA_INPUT),
1840 HDA_CODEC_MUTE("Headphone Playback Switch", 0x14, 0x0, HDA_OUTPUT),
1841 HDA_CODEC_MUTE("Speaker Playback Switch", 0x1b, 0x0, HDA_OUTPUT),
1842 HDA_CODEC_VOLUME("Surround Playback Volume", 0x0d, 0x0, HDA_OUTPUT),
1843 HDA_BIND_MUTE("Surround Playback Switch", 0x0d, 2, HDA_INPUT),
1844 HDA_CODEC_VOLUME_MONO("Center Playback Volume", 0x0e, 1, 0x0, HDA_OUTPUT),
1845 HDA_CODEC_VOLUME_MONO("LFE Playback Volume", 0x0e, 2, 0x0, HDA_OUTPUT),
1846 HDA_BIND_MUTE_MONO("Center Playback Switch", 0x0e, 1, 2, HDA_INPUT),
1847 HDA_BIND_MUTE_MONO("LFE Playback Switch", 0x0e, 2, 2, HDA_INPUT),
1848 HDA_CODEC_VOLUME("CD Playback Volume", 0x0b, 0x04, HDA_INPUT),
1849 HDA_CODEC_MUTE("CD Playback Switch", 0x0b, 0x04, HDA_INPUT),
1850 HDA_CODEC_VOLUME("Line Playback Volume", 0x0b, 0x02, HDA_INPUT),
1851 HDA_CODEC_MUTE("Line Playback Switch", 0x0b, 0x02, HDA_INPUT),
1852 HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT),
1853 HDA_CODEC_VOLUME("Mic Boost Volume", 0x18, 0, HDA_INPUT),
1854 HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT),
1855 { } /* end */
1856};
1857
1858static const struct snd_kcontrol_new alc883_targa_2ch_mixer[] = {
1859 HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT),
1860 HDA_BIND_MUTE("Front Playback Switch", 0x0c, 2, HDA_INPUT),
1861 HDA_CODEC_MUTE("Headphone Playback Switch", 0x14, 0x0, HDA_OUTPUT),
1862 HDA_CODEC_MUTE("Speaker Playback Switch", 0x1b, 0x0, HDA_OUTPUT),
1863 HDA_CODEC_VOLUME("CD Playback Volume", 0x0b, 0x04, HDA_INPUT),
1864 HDA_CODEC_MUTE("CD Playback Switch", 0x0b, 0x04, HDA_INPUT),
1865 HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT),
1866 HDA_CODEC_VOLUME("Mic Boost Volume", 0x18, 0, HDA_INPUT),
1867 HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT),
1868 HDA_CODEC_VOLUME("Internal Mic Playback Volume", 0x0b, 0x1, HDA_INPUT),
1869 HDA_CODEC_VOLUME("Internal Mic Boost Volume", 0x19, 0, HDA_INPUT),
1870 HDA_CODEC_MUTE("Internal Mic Playback Switch", 0x0b, 0x1, HDA_INPUT),
1871 { } /* end */
1872};
1873
1874static const struct snd_kcontrol_new alc883_targa_8ch_mixer[] = {
1875 HDA_CODEC_VOLUME("Side Playback Volume", 0x0f, 0x0, HDA_OUTPUT),
1876 HDA_BIND_MUTE("Side Playback Switch", 0x0f, 2, HDA_INPUT),
1877 HDA_CODEC_VOLUME("Internal Mic Playback Volume", 0x0b, 0x1, HDA_INPUT),
1878 HDA_CODEC_VOLUME("Internal Mic Boost Volume", 0x19, 0, HDA_INPUT),
1879 HDA_CODEC_MUTE("Internal Mic Playback Switch", 0x0b, 0x1, HDA_INPUT),
1880 { } /* end */
1881};
1882
1883static const struct snd_kcontrol_new alc888_acer_aspire_6530_mixer[] = { 1778static const struct snd_kcontrol_new alc888_acer_aspire_6530_mixer[] = {
1884 HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT), 1779 HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT),
1885 HDA_CODEC_VOLUME("LFE Playback Volume", 0x0f, 0x0, HDA_OUTPUT), 1780 HDA_CODEC_VOLUME("LFE Playback Volume", 0x0f, 0x0, HDA_OUTPUT),
@@ -1948,39 +1843,6 @@ static const struct snd_kcontrol_new alc883_chmode_mixer[] = {
1948 { } /* end */ 1843 { } /* end */
1949}; 1844};
1950 1845
1951static const struct hda_verb alc883_targa_verbs[] = {
1952 {0x0c, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
1953 {0x0c, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)},
1954
1955 {0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP},
1956 {0x1b, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
1957
1958/* Connect Line-Out side jack (SPDIF) to Side */
1959 {0x17, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
1960 {0x17, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
1961 {0x17, AC_VERB_SET_CONNECT_SEL, 0x03},
1962/* Connect Mic jack to CLFE */
1963 {0x18, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
1964 {0x18, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
1965 {0x18, AC_VERB_SET_CONNECT_SEL, 0x02},
1966/* Connect Line-in jack to Surround */
1967 {0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
1968 {0x1a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
1969 {0x1a, AC_VERB_SET_CONNECT_SEL, 0x01},
1970/* Connect HP out jack to Front */
1971 {0x1b, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
1972 {0x1b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
1973 {0x1b, AC_VERB_SET_CONNECT_SEL, 0x00},
1974
1975 {0x14, AC_VERB_SET_UNSOLICITED_ENABLE, ALC_HP_EVENT | AC_USRSP_EN},
1976
1977 { } /* end */
1978};
1979
1980/* toggle speaker-output according to the hp-jack state */
1981#define alc883_targa_init_hook alc882_targa_init_hook
1982#define alc883_targa_unsol_event alc882_targa_unsol_event
1983
1984static const struct hda_verb alc889A_mb31_verbs[] = { 1846static const struct hda_verb alc889A_mb31_verbs[] = {
1985 /* Init rear pin (used as headphone output) */ 1847 /* Init rear pin (used as headphone output) */
1986 {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, 0xc4}, /* Apple Headphones */ 1848 {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, 0xc4}, /* Apple Headphones */
@@ -2031,7 +1893,6 @@ static const char * const alc882_models[ALC882_MODEL_LAST] = {
2031 [ALC882_3ST_DIG] = "3stack-dig", 1893 [ALC882_3ST_DIG] = "3stack-dig",
2032 [ALC882_6ST_DIG] = "6stack-dig", 1894 [ALC882_6ST_DIG] = "6stack-dig",
2033 [ALC882_W2JC] = "w2jc", 1895 [ALC882_W2JC] = "w2jc",
2034 [ALC882_TARGA] = "targa",
2035 [ALC885_MACPRO] = "macpro", 1896 [ALC885_MACPRO] = "macpro",
2036 [ALC885_MB5] = "mb5", 1897 [ALC885_MB5] = "mb5",
2037 [ALC885_MACMINI3] = "macmini3", 1898 [ALC885_MACMINI3] = "macmini3",
@@ -2043,9 +1904,6 @@ static const char * const alc882_models[ALC882_MODEL_LAST] = {
2043 [ALC883_3ST_6ch_DIG] = "3stack-6ch-dig", 1904 [ALC883_3ST_6ch_DIG] = "3stack-6ch-dig",
2044 [ALC883_3ST_6ch] = "3stack-6ch", 1905 [ALC883_3ST_6ch] = "3stack-6ch",
2045 [ALC883_6ST_DIG] = "alc883-6stack-dig", 1906 [ALC883_6ST_DIG] = "alc883-6stack-dig",
2046 [ALC883_TARGA_DIG] = "targa-dig",
2047 [ALC883_TARGA_2ch_DIG] = "targa-2ch-dig",
2048 [ALC883_TARGA_8ch_DIG] = "targa-8ch-dig",
2049 [ALC888_ACER_ASPIRE_4930G] = "acer-aspire-4930g", 1907 [ALC888_ACER_ASPIRE_4930G] = "acer-aspire-4930g",
2050 [ALC888_ACER_ASPIRE_6530G] = "acer-aspire-6530g", 1908 [ALC888_ACER_ASPIRE_6530G] = "acer-aspire-6530g",
2051 [ALC888_ACER_ASPIRE_8930G] = "acer-aspire-8930g", 1909 [ALC888_ACER_ASPIRE_8930G] = "acer-aspire-8930g",
@@ -2091,37 +1949,14 @@ static const struct snd_pci_quirk alc882_cfg_tbl[] = {
2091 SND_PCI_QUIRK(0x108e, 0x534d, NULL, ALC883_3ST_6ch), 1949 SND_PCI_QUIRK(0x108e, 0x534d, NULL, ALC883_3ST_6ch),
2092 SND_PCI_QUIRK(0x1458, 0xa002, "Gigabyte P35 DS3R", ALC882_6ST_DIG), 1950 SND_PCI_QUIRK(0x1458, 0xa002, "Gigabyte P35 DS3R", ALC882_6ST_DIG),
2093 1951
2094 SND_PCI_QUIRK(0x1462, 0x0349, "MSI", ALC883_TARGA_2ch_DIG),
2095 SND_PCI_QUIRK(0x1462, 0x040d, "MSI", ALC883_TARGA_2ch_DIG),
2096 SND_PCI_QUIRK(0x1462, 0x0579, "MSI", ALC883_TARGA_2ch_DIG),
2097 SND_PCI_QUIRK(0x1462, 0x28fb, "Targa T8", ALC882_TARGA), /* MSI-1049 T8 */
2098 SND_PCI_QUIRK(0x1462, 0x2fb3, "MSI", ALC882_AUTO),
2099 SND_PCI_QUIRK(0x1462, 0x6668, "MSI", ALC882_6ST_DIG), 1952 SND_PCI_QUIRK(0x1462, 0x6668, "MSI", ALC882_6ST_DIG),
2100 SND_PCI_QUIRK(0x1462, 0x3729, "MSI S420", ALC883_TARGA_DIG),
2101 SND_PCI_QUIRK(0x1462, 0x3783, "NEC S970", ALC883_TARGA_DIG),
2102 SND_PCI_QUIRK(0x1462, 0x3b7f, "MSI", ALC883_TARGA_2ch_DIG),
2103 SND_PCI_QUIRK(0x1462, 0x3ef9, "MSI", ALC883_TARGA_DIG),
2104 SND_PCI_QUIRK(0x1462, 0x3fc1, "MSI", ALC883_TARGA_DIG),
2105 SND_PCI_QUIRK(0x1462, 0x3fc3, "MSI", ALC883_TARGA_DIG),
2106 SND_PCI_QUIRK(0x1462, 0x3fcc, "MSI", ALC883_TARGA_DIG),
2107 SND_PCI_QUIRK(0x1462, 0x3fdf, "MSI", ALC883_TARGA_DIG),
2108 SND_PCI_QUIRK(0x1462, 0x42cd, "MSI", ALC883_TARGA_DIG),
2109 SND_PCI_QUIRK(0x1462, 0x4314, "MSI", ALC883_TARGA_DIG),
2110 SND_PCI_QUIRK(0x1462, 0x4319, "MSI", ALC883_TARGA_DIG),
2111 SND_PCI_QUIRK(0x1462, 0x4324, "MSI", ALC883_TARGA_DIG),
2112 SND_PCI_QUIRK(0x1462, 0x4570, "MSI Wind Top AE2220", ALC883_TARGA_DIG),
2113 SND_PCI_QUIRK(0x1462, 0x6510, "MSI GX620", ALC883_TARGA_8ch_DIG),
2114 SND_PCI_QUIRK(0x1462, 0x6668, "MSI", ALC883_6ST_DIG), 1953 SND_PCI_QUIRK(0x1462, 0x6668, "MSI", ALC883_6ST_DIG),
2115 SND_PCI_QUIRK(0x1462, 0x7187, "MSI", ALC883_6ST_DIG), 1954 SND_PCI_QUIRK(0x1462, 0x7187, "MSI", ALC883_6ST_DIG),
2116 SND_PCI_QUIRK(0x1462, 0x7250, "MSI", ALC883_6ST_DIG), 1955 SND_PCI_QUIRK(0x1462, 0x7250, "MSI", ALC883_6ST_DIG),
2117 SND_PCI_QUIRK(0x1462, 0x7260, "MSI 7260", ALC883_TARGA_DIG),
2118 SND_PCI_QUIRK(0x1462, 0x7267, "MSI", ALC883_3ST_6ch_DIG), 1956 SND_PCI_QUIRK(0x1462, 0x7267, "MSI", ALC883_3ST_6ch_DIG),
2119 SND_PCI_QUIRK(0x1462, 0x7280, "MSI", ALC883_6ST_DIG), 1957 SND_PCI_QUIRK(0x1462, 0x7280, "MSI", ALC883_6ST_DIG),
2120 SND_PCI_QUIRK(0x1462, 0x7327, "MSI", ALC883_6ST_DIG), 1958 SND_PCI_QUIRK(0x1462, 0x7327, "MSI", ALC883_6ST_DIG),
2121 SND_PCI_QUIRK(0x1462, 0x7350, "MSI", ALC883_6ST_DIG), 1959 SND_PCI_QUIRK(0x1462, 0x7350, "MSI", ALC883_6ST_DIG),
2122 SND_PCI_QUIRK(0x1462, 0x7437, "MSI NetOn AP1900", ALC883_TARGA_DIG),
2123 SND_PCI_QUIRK(0x1462, 0xa422, "MSI", ALC883_TARGA_2ch_DIG),
2124 SND_PCI_QUIRK(0x1462, 0xaa08, "MSI", ALC883_TARGA_2ch_DIG),
2125 1960
2126 SND_PCI_QUIRK(0x147b, 0x1083, "Abit IP35-PRO", ALC883_6ST_DIG), 1961 SND_PCI_QUIRK(0x147b, 0x1083, "Abit IP35-PRO", ALC883_6ST_DIG),
2127 SND_PCI_QUIRK(0x1558, 0x0571, "Clevo laptop M570U", ALC883_3ST_6ch_DIG), 1962 SND_PCI_QUIRK(0x1558, 0x0571, "Clevo laptop M570U", ALC883_3ST_6ch_DIG),
@@ -2302,24 +2137,6 @@ static const struct alc_config_preset alc882_presets[] = {
2302 .setup = alc885_imac91_setup, 2137 .setup = alc885_imac91_setup,
2303 .init_hook = alc_hp_automute, 2138 .init_hook = alc_hp_automute,
2304 }, 2139 },
2305 [ALC882_TARGA] = {
2306 .mixers = { alc882_targa_mixer, alc882_chmode_mixer },
2307 .init_verbs = { alc882_base_init_verbs, alc882_adc1_init_verbs,
2308 alc880_gpio3_init_verbs, alc882_targa_verbs},
2309 .num_dacs = ARRAY_SIZE(alc882_dac_nids),
2310 .dac_nids = alc882_dac_nids,
2311 .dig_out_nid = ALC882_DIGOUT_NID,
2312 .num_adc_nids = ARRAY_SIZE(alc882_adc_nids),
2313 .adc_nids = alc882_adc_nids,
2314 .capsrc_nids = alc882_capsrc_nids,
2315 .num_channel_mode = ARRAY_SIZE(alc882_3ST_6ch_modes),
2316 .channel_mode = alc882_3ST_6ch_modes,
2317 .need_dac_fix = 1,
2318 .input_mux = &alc882_capture_source,
2319 .unsol_event = alc_sku_unsol_event,
2320 .setup = alc882_targa_setup,
2321 .init_hook = alc882_targa_automute,
2322 },
2323 [ALC883_3ST_2ch_DIG] = { 2140 [ALC883_3ST_2ch_DIG] = {
2324 .mixers = { alc883_3ST_2ch_mixer }, 2141 .mixers = { alc883_3ST_2ch_mixer },
2325 .init_verbs = { alc883_init_verbs }, 2142 .init_verbs = { alc883_init_verbs },
@@ -2417,58 +2234,6 @@ static const struct alc_config_preset alc882_presets[] = {
2417 .channel_mode = alc883_sixstack_modes, 2234 .channel_mode = alc883_sixstack_modes,
2418 .input_mux = &alc883_capture_source, 2235 .input_mux = &alc883_capture_source,
2419 }, 2236 },
2420 [ALC883_TARGA_DIG] = {
2421 .mixers = { alc883_targa_mixer, alc883_chmode_mixer },
2422 .init_verbs = { alc883_init_verbs, alc880_gpio3_init_verbs,
2423 alc883_targa_verbs},
2424 .num_dacs = ARRAY_SIZE(alc883_dac_nids),
2425 .dac_nids = alc883_dac_nids,
2426 .dig_out_nid = ALC883_DIGOUT_NID,
2427 .num_channel_mode = ARRAY_SIZE(alc883_3ST_6ch_modes),
2428 .channel_mode = alc883_3ST_6ch_modes,
2429 .need_dac_fix = 1,
2430 .input_mux = &alc883_capture_source,
2431 .unsol_event = alc883_targa_unsol_event,
2432 .setup = alc882_targa_setup,
2433 .init_hook = alc882_targa_automute,
2434 },
2435 [ALC883_TARGA_2ch_DIG] = {
2436 .mixers = { alc883_targa_2ch_mixer},
2437 .init_verbs = { alc883_init_verbs, alc880_gpio3_init_verbs,
2438 alc883_targa_verbs},
2439 .num_dacs = ARRAY_SIZE(alc883_dac_nids),
2440 .dac_nids = alc883_dac_nids,
2441 .adc_nids = alc883_adc_nids_alt,
2442 .num_adc_nids = ARRAY_SIZE(alc883_adc_nids_alt),
2443 .capsrc_nids = alc883_capsrc_nids,
2444 .dig_out_nid = ALC883_DIGOUT_NID,
2445 .num_channel_mode = ARRAY_SIZE(alc883_3ST_2ch_modes),
2446 .channel_mode = alc883_3ST_2ch_modes,
2447 .input_mux = &alc883_capture_source,
2448 .unsol_event = alc883_targa_unsol_event,
2449 .setup = alc882_targa_setup,
2450 .init_hook = alc882_targa_automute,
2451 },
2452 [ALC883_TARGA_8ch_DIG] = {
2453 .mixers = { alc883_targa_mixer, alc883_targa_8ch_mixer,
2454 alc883_chmode_mixer },
2455 .init_verbs = { alc883_init_verbs, alc880_gpio3_init_verbs,
2456 alc883_targa_verbs },
2457 .num_dacs = ARRAY_SIZE(alc883_dac_nids),
2458 .dac_nids = alc883_dac_nids,
2459 .num_adc_nids = ARRAY_SIZE(alc883_adc_nids_rev),
2460 .adc_nids = alc883_adc_nids_rev,
2461 .capsrc_nids = alc883_capsrc_nids_rev,
2462 .dig_out_nid = ALC883_DIGOUT_NID,
2463 .dig_in_nid = ALC883_DIGIN_NID,
2464 .num_channel_mode = ARRAY_SIZE(alc883_4ST_8ch_modes),
2465 .channel_mode = alc883_4ST_8ch_modes,
2466 .need_dac_fix = 1,
2467 .input_mux = &alc883_capture_source,
2468 .unsol_event = alc883_targa_unsol_event,
2469 .setup = alc882_targa_setup,
2470 .init_hook = alc882_targa_automute,
2471 },
2472 [ALC888_ACER_ASPIRE_4930G] = { 2237 [ALC888_ACER_ASPIRE_4930G] = {
2473 .mixers = { alc888_acer_aspire_4930g_mixer, 2238 .mixers = { alc888_acer_aspire_4930g_mixer,
2474 alc883_chmode_mixer }, 2239 alc883_chmode_mixer },
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 765780ca397b..5aa8deb4ae88 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -4238,6 +4238,7 @@ enum {
4238 ALC882_FIXUP_EAPD, 4238 ALC882_FIXUP_EAPD,
4239 ALC883_FIXUP_EAPD, 4239 ALC883_FIXUP_EAPD,
4240 ALC883_FIXUP_ACER_EAPD, 4240 ALC883_FIXUP_ACER_EAPD,
4241 ALC882_FIXUP_GPIO3,
4241}; 4242};
4242 4243
4243static const struct alc_fixup alc882_fixups[] = { 4244static const struct alc_fixup alc882_fixups[] = {
@@ -4318,6 +4319,10 @@ static const struct alc_fixup alc882_fixups[] = {
4318 { } 4319 { }
4319 } 4320 }
4320 }, 4321 },
4322 [ALC882_FIXUP_GPIO3] = {
4323 .type = ALC_FIXUP_VERBS,
4324 .v.verbs = alc_gpio3_init_verbs,
4325 },
4321}; 4326};
4322 4327
4323static const struct snd_pci_quirk alc882_fixup_tbl[] = { 4328static const struct snd_pci_quirk alc882_fixup_tbl[] = {
@@ -4335,6 +4340,7 @@ static const struct snd_pci_quirk alc882_fixup_tbl[] = {
4335 SND_PCI_QUIRK(0x104d, 0x9047, "Sony Vaio TT", ALC889_FIXUP_VAIO_TT), 4340 SND_PCI_QUIRK(0x104d, 0x9047, "Sony Vaio TT", ALC889_FIXUP_VAIO_TT),
4336 SND_PCI_QUIRK(0x106b, 0x3200, "iMac 7,1 Aluminum", ALC882_FIXUP_EAPD), /* codec SSID */ 4341 SND_PCI_QUIRK(0x106b, 0x3200, "iMac 7,1 Aluminum", ALC882_FIXUP_EAPD), /* codec SSID */
4337 SND_PCI_QUIRK(0x1071, 0x8258, "Evesham Voyaeger", ALC882_FIXUP_EAPD), 4342 SND_PCI_QUIRK(0x1071, 0x8258, "Evesham Voyaeger", ALC882_FIXUP_EAPD),
4343 SND_PCI_QUIRK_VENDOR(0x1462, "MSI", ALC882_FIXUP_GPIO3),
4338 SND_PCI_QUIRK(0x147b, 0x107a, "Abit AW9D-MAX", ALC882_FIXUP_ABIT_AW9D_MAX), 4344 SND_PCI_QUIRK(0x147b, 0x107a, "Abit AW9D-MAX", ALC882_FIXUP_ABIT_AW9D_MAX),
4339 SND_PCI_QUIRK_VENDOR(0x1558, "Clevo laptop", ALC882_FIXUP_EAPD), 4345 SND_PCI_QUIRK_VENDOR(0x1558, "Clevo laptop", ALC882_FIXUP_EAPD),
4340 SND_PCI_QUIRK(0x161f, 0x2054, "Medion laptop", ALC883_FIXUP_EAPD), 4346 SND_PCI_QUIRK(0x161f, 0x2054, "Medion laptop", ALC883_FIXUP_EAPD),