aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2011-11-09 09:22:01 -0500
committerTakashi Iwai <tiwai@suse.de>2011-11-09 11:57:45 -0500
commit7a6069bf64d22e1ca5413acf494dafb4200be44c (patch)
tree2af2bc6aebd18edf86f674a052f61b4225588150
parented63a88775c183dd3d6ee0bde0670960754e944a (diff)
ALSA: hda/realtek - Replace ALC882 arima, medion and laptop-eapd quirks
Move these quitks to the auto-parser. They just need some EAPD setups in addition. Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r--sound/pci/hda/alc882_quirks.c104
-rw-r--r--sound/pci/hda/patch_realtek.c13
2 files changed, 13 insertions, 104 deletions
diff --git a/sound/pci/hda/alc882_quirks.c b/sound/pci/hda/alc882_quirks.c
index 2c5c1810f802..0f7f5e7346b8 100644
--- a/sound/pci/hda/alc882_quirks.c
+++ b/sound/pci/hda/alc882_quirks.c
@@ -8,7 +8,6 @@ enum {
8 ALC882_AUTO, 8 ALC882_AUTO,
9 ALC882_3ST_DIG, 9 ALC882_3ST_DIG,
10 ALC882_6ST_DIG, 10 ALC882_6ST_DIG,
11 ALC882_ARIMA,
12 ALC882_W2JC, 11 ALC882_W2JC,
13 ALC882_TARGA, 12 ALC882_TARGA,
14 ALC885_MACPRO, 13 ALC885_MACPRO,
@@ -31,9 +30,6 @@ enum {
31 ALC888_ACER_ASPIRE_6530G, 30 ALC888_ACER_ASPIRE_6530G,
32 ALC888_ACER_ASPIRE_8930G, 31 ALC888_ACER_ASPIRE_8930G,
33 ALC888_ACER_ASPIRE_7730G, 32 ALC888_ACER_ASPIRE_7730G,
34 ALC883_MEDION,
35 ALC883_MEDION_WIM2160,
36 ALC883_LAPTOP_EAPD,
37 ALC888_3ST_HP, 33 ALC888_3ST_HP,
38 ALC888_6ST_DELL, 34 ALC888_6ST_DELL,
39 ALC883_CLEVO_M540R, 35 ALC883_CLEVO_M540R,
@@ -1731,13 +1727,6 @@ static const struct hda_channel_mode alc889A_mb31_6ch_modes[4] = {
1731 { 6, alc889A_mb31_ch6_init }, 1727 { 6, alc889A_mb31_ch6_init },
1732}; 1728};
1733 1729
1734static const struct hda_verb alc883_medion_eapd_verbs[] = {
1735 /* eanable EAPD on medion laptop */
1736 {0x20, AC_VERB_SET_COEF_INDEX, 0x07},
1737 {0x20, AC_VERB_SET_PROC_COEF, 0x3070},
1738 { }
1739};
1740
1741#define alc883_base_mixer alc882_base_mixer 1730#define alc883_base_mixer alc882_base_mixer
1742 1731
1743static const struct snd_kcontrol_new alc883_clevo_m720_mixer[] = { 1732static const struct snd_kcontrol_new alc883_clevo_m720_mixer[] = {
@@ -1911,43 +1900,6 @@ static const struct snd_kcontrol_new alc883_targa_8ch_mixer[] = {
1911 { } /* end */ 1900 { } /* end */
1912}; 1901};
1913 1902
1914static const struct snd_kcontrol_new alc883_medion_wim2160_mixer[] = {
1915 HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT),
1916 HDA_BIND_MUTE("Front Playback Switch", 0x0c, 2, HDA_INPUT),
1917 HDA_CODEC_MUTE("Speaker Playback Switch", 0x15, 0x0, HDA_OUTPUT),
1918 HDA_CODEC_MUTE("Headphone Playback Switch", 0x1a, 0x0, HDA_OUTPUT),
1919 HDA_CODEC_VOLUME("Line Playback Volume", 0x08, 0x0, HDA_INPUT),
1920 HDA_CODEC_MUTE("Line Playback Switch", 0x08, 0x0, HDA_INPUT),
1921 { } /* end */
1922};
1923
1924static const struct hda_verb alc883_medion_wim2160_verbs[] = {
1925 /* Unmute front mixer */
1926 {0x0c, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
1927 {0x0c, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)},
1928
1929 /* Set speaker pin to front mixer */
1930 {0x15, AC_VERB_SET_CONNECT_SEL, 0x00},
1931
1932 /* Init headphone pin */
1933 {0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP},
1934 {0x1a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
1935 {0x1a, AC_VERB_SET_CONNECT_SEL, 0x00},
1936 {0x1a, AC_VERB_SET_UNSOLICITED_ENABLE, ALC_HP_EVENT | AC_USRSP_EN},
1937
1938 { } /* end */
1939};
1940
1941/* toggle speaker-output according to the hp-jack state */
1942static void alc883_medion_wim2160_setup(struct hda_codec *codec)
1943{
1944 struct alc_spec *spec = codec->spec;
1945
1946 spec->autocfg.hp_pins[0] = 0x1a;
1947 spec->autocfg.speaker_pins[0] = 0x15;
1948 alc_simple_setup_automute(spec, ALC_AUTOMUTE_AMP);
1949}
1950
1951static const struct snd_kcontrol_new alc883_acer_aspire_mixer[] = { 1903static const struct snd_kcontrol_new alc883_acer_aspire_mixer[] = {
1952 HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT), 1904 HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT),
1953 HDA_BIND_MUTE("Front Playback Switch", 0x0c, 2, HDA_INPUT), 1905 HDA_BIND_MUTE("Front Playback Switch", 0x0c, 2, HDA_INPUT),
@@ -2276,7 +2228,6 @@ static const hda_nid_t alc1200_slave_dig_outs[] = {
2276static const char * const alc882_models[ALC882_MODEL_LAST] = { 2228static const char * const alc882_models[ALC882_MODEL_LAST] = {
2277 [ALC882_3ST_DIG] = "3stack-dig", 2229 [ALC882_3ST_DIG] = "3stack-dig",
2278 [ALC882_6ST_DIG] = "6stack-dig", 2230 [ALC882_6ST_DIG] = "6stack-dig",
2279 [ALC882_ARIMA] = "arima",
2280 [ALC882_W2JC] = "w2jc", 2231 [ALC882_W2JC] = "w2jc",
2281 [ALC882_TARGA] = "targa", 2232 [ALC882_TARGA] = "targa",
2282 [ALC885_MACPRO] = "macpro", 2233 [ALC885_MACPRO] = "macpro",
@@ -2299,9 +2250,6 @@ static const char * const alc882_models[ALC882_MODEL_LAST] = {
2299 [ALC888_ACER_ASPIRE_6530G] = "acer-aspire-6530g", 2250 [ALC888_ACER_ASPIRE_6530G] = "acer-aspire-6530g",
2300 [ALC888_ACER_ASPIRE_8930G] = "acer-aspire-8930g", 2251 [ALC888_ACER_ASPIRE_8930G] = "acer-aspire-8930g",
2301 [ALC888_ACER_ASPIRE_7730G] = "acer-aspire-7730g", 2252 [ALC888_ACER_ASPIRE_7730G] = "acer-aspire-7730g",
2302 [ALC883_MEDION] = "medion",
2303 [ALC883_MEDION_WIM2160] = "medion-wim2160",
2304 [ALC883_LAPTOP_EAPD] = "laptop-eapd",
2305 [ALC888_3ST_HP] = "3stack-hp", 2253 [ALC888_3ST_HP] = "3stack-hp",
2306 [ALC888_6ST_DELL] = "6stack-dell", 2254 [ALC888_6ST_DELL] = "6stack-dell",
2307 [ALC883_CLEVO_M540R] = "clevo-m540r", 2255 [ALC883_CLEVO_M540R] = "clevo-m540r",
@@ -2360,7 +2308,6 @@ static const struct snd_pci_quirk alc882_cfg_tbl[] = {
2360 2308
2361 SND_PCI_QUIRK(0x105b, 0x0ce8, "Foxconn P35AX-S", ALC883_6ST_DIG), 2309 SND_PCI_QUIRK(0x105b, 0x0ce8, "Foxconn P35AX-S", ALC883_6ST_DIG),
2362 SND_PCI_QUIRK(0x105b, 0x6668, "Foxconn", ALC882_6ST_DIG), 2310 SND_PCI_QUIRK(0x105b, 0x6668, "Foxconn", ALC882_6ST_DIG),
2363 SND_PCI_QUIRK(0x1071, 0x8258, "Evesham Voyaeger", ALC883_LAPTOP_EAPD),
2364 SND_PCI_QUIRK(0x10f1, 0x2350, "TYAN-S2350", ALC888_6ST_DELL), 2311 SND_PCI_QUIRK(0x10f1, 0x2350, "TYAN-S2350", ALC888_6ST_DELL),
2365 SND_PCI_QUIRK(0x108e, 0x534d, NULL, ALC883_3ST_6ch), 2312 SND_PCI_QUIRK(0x108e, 0x534d, NULL, ALC883_3ST_6ch),
2366 SND_PCI_QUIRK(0x1458, 0xa002, "Gigabyte P35 DS3R", ALC882_6ST_DIG), 2313 SND_PCI_QUIRK(0x1458, 0xa002, "Gigabyte P35 DS3R", ALC882_6ST_DIG),
@@ -2402,10 +2349,7 @@ static const struct snd_pci_quirk alc882_cfg_tbl[] = {
2402 SND_PCI_QUIRK(0x1558, 0x0721, "Clevo laptop M720R", ALC883_CLEVO_M720), 2349 SND_PCI_QUIRK(0x1558, 0x0721, "Clevo laptop M720R", ALC883_CLEVO_M720),
2403 SND_PCI_QUIRK(0x1558, 0x0722, "Clevo laptop M720SR", ALC883_CLEVO_M720), 2350 SND_PCI_QUIRK(0x1558, 0x0722, "Clevo laptop M720SR", ALC883_CLEVO_M720),
2404 SND_PCI_QUIRK(0x1558, 0x5409, "Clevo laptop M540R", ALC883_CLEVO_M540R), 2351 SND_PCI_QUIRK(0x1558, 0x5409, "Clevo laptop M540R", ALC883_CLEVO_M540R),
2405 SND_PCI_QUIRK_VENDOR(0x1558, "Clevo laptop", ALC883_LAPTOP_EAPD),
2406 SND_PCI_QUIRK(0x15d9, 0x8780, "Supermicro PDSBA", ALC883_3ST_6ch), 2352 SND_PCI_QUIRK(0x15d9, 0x8780, "Supermicro PDSBA", ALC883_3ST_6ch),
2407 /* SND_PCI_QUIRK(0x161f, 0x2054, "Arima W820", ALC882_ARIMA), */
2408 SND_PCI_QUIRK(0x161f, 0x2054, "Medion laptop", ALC883_MEDION),
2409 SND_PCI_QUIRK(0x17f2, 0x5000, "Albatron KI690-AM2", ALC883_6ST_DIG), 2353 SND_PCI_QUIRK(0x17f2, 0x5000, "Albatron KI690-AM2", ALC883_6ST_DIG),
2410 2354
2411 SND_PCI_QUIRK(0x8086, 0x0001, "DG33BUC", ALC883_3ST_6ch_INTEL), 2355 SND_PCI_QUIRK(0x8086, 0x0001, "DG33BUC", ALC883_3ST_6ch_INTEL),
@@ -2471,16 +2415,6 @@ static const struct alc_config_preset alc882_presets[] = {
2471 .channel_mode = alc882_sixstack_modes, 2415 .channel_mode = alc882_sixstack_modes,
2472 .input_mux = &alc882_capture_source, 2416 .input_mux = &alc882_capture_source,
2473 }, 2417 },
2474 [ALC882_ARIMA] = {
2475 .mixers = { alc882_base_mixer, alc882_chmode_mixer },
2476 .init_verbs = { alc882_base_init_verbs, alc882_adc1_init_verbs,
2477 alc882_eapd_verbs },
2478 .num_dacs = ARRAY_SIZE(alc882_dac_nids),
2479 .dac_nids = alc882_dac_nids,
2480 .num_channel_mode = ARRAY_SIZE(alc882_sixstack_modes),
2481 .channel_mode = alc882_sixstack_modes,
2482 .input_mux = &alc882_capture_source,
2483 },
2484 [ALC882_W2JC] = { 2418 [ALC882_W2JC] = {
2485 .mixers = { alc882_w2jc_mixer, alc882_chmode_mixer }, 2419 .mixers = { alc882_w2jc_mixer, alc882_chmode_mixer },
2486 .init_verbs = { alc882_base_init_verbs, alc882_adc1_init_verbs, 2420 .init_verbs = { alc882_base_init_verbs, alc882_adc1_init_verbs,
@@ -2873,44 +2807,6 @@ static const struct alc_config_preset alc882_presets[] = {
2873 .setup = alc888_acer_aspire_7730g_setup, 2807 .setup = alc888_acer_aspire_7730g_setup,
2874 .init_hook = alc_hp_automute, 2808 .init_hook = alc_hp_automute,
2875 }, 2809 },
2876 [ALC883_MEDION] = {
2877 .mixers = { alc883_fivestack_mixer,
2878 alc883_chmode_mixer },
2879 .init_verbs = { alc883_init_verbs,
2880 alc883_medion_eapd_verbs },
2881 .num_dacs = ARRAY_SIZE(alc883_dac_nids),
2882 .dac_nids = alc883_dac_nids,
2883 .adc_nids = alc883_adc_nids_alt,
2884 .num_adc_nids = ARRAY_SIZE(alc883_adc_nids_alt),
2885 .capsrc_nids = alc883_capsrc_nids,
2886 .num_channel_mode = ARRAY_SIZE(alc883_sixstack_modes),
2887 .channel_mode = alc883_sixstack_modes,
2888 .input_mux = &alc883_capture_source,
2889 },
2890 [ALC883_MEDION_WIM2160] = {
2891 .mixers = { alc883_medion_wim2160_mixer },
2892 .init_verbs = { alc883_init_verbs, alc883_medion_wim2160_verbs },
2893 .num_dacs = ARRAY_SIZE(alc883_dac_nids),
2894 .dac_nids = alc883_dac_nids,
2895 .dig_out_nid = ALC883_DIGOUT_NID,
2896 .num_adc_nids = ARRAY_SIZE(alc883_adc_nids),
2897 .adc_nids = alc883_adc_nids,
2898 .num_channel_mode = ARRAY_SIZE(alc883_3ST_2ch_modes),
2899 .channel_mode = alc883_3ST_2ch_modes,
2900 .input_mux = &alc883_capture_source,
2901 .unsol_event = alc_sku_unsol_event,
2902 .setup = alc883_medion_wim2160_setup,
2903 .init_hook = alc_hp_automute,
2904 },
2905 [ALC883_LAPTOP_EAPD] = {
2906 .mixers = { alc883_base_mixer },
2907 .init_verbs = { alc883_init_verbs, alc882_eapd_verbs },
2908 .num_dacs = ARRAY_SIZE(alc883_dac_nids),
2909 .dac_nids = alc883_dac_nids,
2910 .num_channel_mode = ARRAY_SIZE(alc883_3ST_2ch_modes),
2911 .channel_mode = alc883_3ST_2ch_modes,
2912 .input_mux = &alc883_capture_source,
2913 },
2914 [ALC883_CLEVO_M540R] = { 2810 [ALC883_CLEVO_M540R] = {
2915 .mixers = { alc883_3ST_6ch_mixer, alc883_chmode_mixer }, 2811 .mixers = { alc883_3ST_6ch_mixer, alc883_chmode_mixer },
2916 .init_verbs = { alc883_init_verbs, alc883_clevo_m540r_verbs }, 2812 .init_verbs = { alc883_init_verbs, alc883_clevo_m540r_verbs },
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 43c7aeac0492..422430d6f2f1 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -4236,6 +4236,7 @@ enum {
4236 ALC889_FIXUP_VAIO_TT, 4236 ALC889_FIXUP_VAIO_TT,
4237 ALC888_FIXUP_EEE1601, 4237 ALC888_FIXUP_EEE1601,
4238 ALC882_FIXUP_EAPD, 4238 ALC882_FIXUP_EAPD,
4239 ALC883_FIXUP_EAPD,
4239}; 4240};
4240 4241
4241static const struct alc_fixup alc882_fixups[] = { 4242static const struct alc_fixup alc882_fixups[] = {
@@ -4298,6 +4299,15 @@ static const struct alc_fixup alc882_fixups[] = {
4298 { } 4299 { }
4299 } 4300 }
4300 }, 4301 },
4302 [ALC883_FIXUP_EAPD] = {
4303 .type = ALC_FIXUP_VERBS,
4304 .v.verbs = (const struct hda_verb[]) {
4305 /* change to EAPD mode */
4306 { 0x20, AC_VERB_SET_COEF_INDEX, 0x07 },
4307 { 0x20, AC_VERB_SET_PROC_COEF, 0x3070 },
4308 { }
4309 }
4310 },
4301}; 4311};
4302 4312
4303static const struct snd_pci_quirk alc882_fixup_tbl[] = { 4313static const struct snd_pci_quirk alc882_fixup_tbl[] = {
@@ -4307,9 +4317,12 @@ static const struct snd_pci_quirk alc882_fixup_tbl[] = {
4307 SND_PCI_QUIRK(0x1043, 0x835f, "Asus Eee 1601", ALC888_FIXUP_EEE1601), 4317 SND_PCI_QUIRK(0x1043, 0x835f, "Asus Eee 1601", ALC888_FIXUP_EEE1601),
4308 SND_PCI_QUIRK(0x17aa, 0x3a0d, "Lenovo Y530", ALC882_FIXUP_LENOVO_Y530), 4318 SND_PCI_QUIRK(0x17aa, 0x3a0d, "Lenovo Y530", ALC882_FIXUP_LENOVO_Y530),
4309 SND_PCI_QUIRK(0x106b, 0x3200, "iMac 7,1 Aluminum", ALC882_FIXUP_EAPD), /* codec SSID */ 4319 SND_PCI_QUIRK(0x106b, 0x3200, "iMac 7,1 Aluminum", ALC882_FIXUP_EAPD), /* codec SSID */
4320 SND_PCI_QUIRK(0x1071, 0x8258, "Evesham Voyaeger", ALC882_FIXUP_EAPD),
4310 SND_PCI_QUIRK(0x147b, 0x107a, "Abit AW9D-MAX", ALC882_FIXUP_ABIT_AW9D_MAX), 4321 SND_PCI_QUIRK(0x147b, 0x107a, "Abit AW9D-MAX", ALC882_FIXUP_ABIT_AW9D_MAX),
4311 SND_PCI_QUIRK(0x1025, 0x0296, "Acer Aspire 7736z", ALC882_FIXUP_ACER_ASPIRE_7736), 4322 SND_PCI_QUIRK(0x1025, 0x0296, "Acer Aspire 7736z", ALC882_FIXUP_ACER_ASPIRE_7736),
4312 SND_PCI_QUIRK(0x104d, 0x9047, "Sony Vaio TT", ALC889_FIXUP_VAIO_TT), 4323 SND_PCI_QUIRK(0x104d, 0x9047, "Sony Vaio TT", ALC889_FIXUP_VAIO_TT),
4324 SND_PCI_QUIRK_VENDOR(0x1558, "Clevo laptop", ALC882_FIXUP_EAPD),
4325 SND_PCI_QUIRK(0x161f, 0x2054, "Medion laptop", ALC883_FIXUP_EAPD),
4313 {} 4326 {}
4314}; 4327};
4315 4328