aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2011-11-09 11:39:15 -0500
committerTakashi Iwai <tiwai@suse.de>2011-11-09 11:58:30 -0500
commit8812c4f96178620ebaabbd6e32401411b244d26b (patch)
tree08f6c5f7973109470454bac01ff8a13819eb873f /sound/pci
parent25da1f86b4e7f5fef26cec1f65be3b120f2d36ac (diff)
ALSA: hda/realtek - Move ALC882 model=acer-aspire to auto-parser
The ALC882 model=acer-aspire requires the additional COEF setup. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci')
-rw-r--r--sound/pci/hda/alc882_quirks.c62
-rw-r--r--sound/pci/hda/patch_realtek.c16
2 files changed, 16 insertions, 62 deletions
diff --git a/sound/pci/hda/alc882_quirks.c b/sound/pci/hda/alc882_quirks.c
index 29c9b8a0a655..707dd28aa15e 100644
--- a/sound/pci/hda/alc882_quirks.c
+++ b/sound/pci/hda/alc882_quirks.c
@@ -24,7 +24,6 @@ enum {
24 ALC883_TARGA_DIG, 24 ALC883_TARGA_DIG,
25 ALC883_TARGA_2ch_DIG, 25 ALC883_TARGA_2ch_DIG,
26 ALC883_TARGA_8ch_DIG, 26 ALC883_TARGA_8ch_DIG,
27 ALC883_ACER_ASPIRE,
28 ALC888_ACER_ASPIRE_4930G, 27 ALC888_ACER_ASPIRE_4930G,
29 ALC888_ACER_ASPIRE_6530G, 28 ALC888_ACER_ASPIRE_6530G,
30 ALC888_ACER_ASPIRE_8930G, 29 ALC888_ACER_ASPIRE_8930G,
@@ -1881,18 +1880,6 @@ static const struct snd_kcontrol_new alc883_targa_8ch_mixer[] = {
1881 { } /* end */ 1880 { } /* end */
1882}; 1881};
1883 1882
1884static const struct snd_kcontrol_new alc883_acer_aspire_mixer[] = {
1885 HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT),
1886 HDA_BIND_MUTE("Front Playback Switch", 0x0c, 2, HDA_INPUT),
1887 HDA_CODEC_MUTE("Headphone Playback Switch", 0x14, 0x0, HDA_OUTPUT),
1888 HDA_CODEC_VOLUME("Line Playback Volume", 0x0b, 0x02, HDA_INPUT),
1889 HDA_CODEC_MUTE("Line Playback Switch", 0x0b, 0x02, HDA_INPUT),
1890 HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT),
1891 HDA_CODEC_VOLUME("Mic Boost Volume", 0x18, 0, HDA_INPUT),
1892 HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT),
1893 { } /* end */
1894};
1895
1896static const struct snd_kcontrol_new alc888_acer_aspire_6530_mixer[] = { 1883static const struct snd_kcontrol_new alc888_acer_aspire_6530_mixer[] = {
1897 HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT), 1884 HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT),
1898 HDA_CODEC_VOLUME("LFE Playback Volume", 0x0f, 0x0, HDA_OUTPUT), 1885 HDA_CODEC_VOLUME("LFE Playback Volume", 0x0f, 0x0, HDA_OUTPUT),
@@ -1994,35 +1981,6 @@ static const struct hda_verb alc883_targa_verbs[] = {
1994#define alc883_targa_init_hook alc882_targa_init_hook 1981#define alc883_targa_init_hook alc882_targa_init_hook
1995#define alc883_targa_unsol_event alc882_targa_unsol_event 1982#define alc883_targa_unsol_event alc882_targa_unsol_event
1996 1983
1997/* toggle speaker-output according to the hp-jack state */
1998static void alc883_acer_aspire_setup(struct hda_codec *codec)
1999{
2000 struct alc_spec *spec = codec->spec;
2001
2002 spec->autocfg.hp_pins[0] = 0x14;
2003 spec->autocfg.speaker_pins[0] = 0x15;
2004 spec->autocfg.speaker_pins[1] = 0x16;
2005 alc_simple_setup_automute(spec, ALC_AUTOMUTE_AMP);
2006}
2007
2008static const struct hda_verb alc883_acer_eapd_verbs[] = {
2009 /* HP Pin: output 0 (0x0c) */
2010 {0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP},
2011 {0x14, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
2012 {0x14, AC_VERB_SET_CONNECT_SEL, 0x00},
2013 /* Front Pin: output 0 (0x0c) */
2014 {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
2015 {0x15, AC_VERB_SET_CONNECT_SEL, 0x00},
2016 {0x16, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
2017 {0x16, AC_VERB_SET_CONNECT_SEL, 0x00},
2018 /* eanable EAPD on medion laptop */
2019 {0x20, AC_VERB_SET_COEF_INDEX, 0x07},
2020 {0x20, AC_VERB_SET_PROC_COEF, 0x3050},
2021 /* enable unsolicited event */
2022 {0x14, AC_VERB_SET_UNSOLICITED_ENABLE, ALC_HP_EVENT | AC_USRSP_EN},
2023 { }
2024};
2025
2026static const struct hda_verb alc889A_mb31_verbs[] = { 1984static const struct hda_verb alc889A_mb31_verbs[] = {
2027 /* Init rear pin (used as headphone output) */ 1985 /* Init rear pin (used as headphone output) */
2028 {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, 0xc4}, /* Apple Headphones */ 1986 {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, 0xc4}, /* Apple Headphones */
@@ -2088,7 +2046,6 @@ static const char * const alc882_models[ALC882_MODEL_LAST] = {
2088 [ALC883_TARGA_DIG] = "targa-dig", 2046 [ALC883_TARGA_DIG] = "targa-dig",
2089 [ALC883_TARGA_2ch_DIG] = "targa-2ch-dig", 2047 [ALC883_TARGA_2ch_DIG] = "targa-2ch-dig",
2090 [ALC883_TARGA_8ch_DIG] = "targa-8ch-dig", 2048 [ALC883_TARGA_8ch_DIG] = "targa-8ch-dig",
2091 [ALC883_ACER_ASPIRE] = "acer-aspire",
2092 [ALC888_ACER_ASPIRE_4930G] = "acer-aspire-4930g", 2049 [ALC888_ACER_ASPIRE_4930G] = "acer-aspire-4930g",
2093 [ALC888_ACER_ASPIRE_6530G] = "acer-aspire-6530g", 2050 [ALC888_ACER_ASPIRE_6530G] = "acer-aspire-6530g",
2094 [ALC888_ACER_ASPIRE_8930G] = "acer-aspire-8930g", 2051 [ALC888_ACER_ASPIRE_8930G] = "acer-aspire-8930g",
@@ -2103,12 +2060,6 @@ static const char * const alc882_models[ALC882_MODEL_LAST] = {
2103static const struct snd_pci_quirk alc882_cfg_tbl[] = { 2060static const struct snd_pci_quirk alc882_cfg_tbl[] = {
2104 SND_PCI_QUIRK(0x1019, 0x6668, "ECS", ALC882_6ST_DIG), 2061 SND_PCI_QUIRK(0x1019, 0x6668, "ECS", ALC882_6ST_DIG),
2105 2062
2106 SND_PCI_QUIRK(0x1025, 0x006c, "Acer Aspire 9810", ALC883_ACER_ASPIRE),
2107 SND_PCI_QUIRK(0x1025, 0x0090, "Acer Aspire", ALC883_ACER_ASPIRE),
2108 SND_PCI_QUIRK(0x1025, 0x010a, "Acer Ferrari 5000", ALC883_ACER_ASPIRE),
2109 SND_PCI_QUIRK(0x1025, 0x0110, "Acer Aspire", ALC883_ACER_ASPIRE),
2110 SND_PCI_QUIRK(0x1025, 0x0112, "Acer Aspire 9303", ALC883_ACER_ASPIRE),
2111 SND_PCI_QUIRK(0x1025, 0x0121, "Acer Aspire 5920G", ALC883_ACER_ASPIRE),
2112 SND_PCI_QUIRK(0x1025, 0x013e, "Acer Aspire 4930G", 2063 SND_PCI_QUIRK(0x1025, 0x013e, "Acer Aspire 4930G",
2113 ALC888_ACER_ASPIRE_4930G), 2064 ALC888_ACER_ASPIRE_4930G),
2114 SND_PCI_QUIRK(0x1025, 0x013f, "Acer Aspire 5930G", 2065 SND_PCI_QUIRK(0x1025, 0x013f, "Acer Aspire 5930G",
@@ -2518,19 +2469,6 @@ static const struct alc_config_preset alc882_presets[] = {
2518 .setup = alc882_targa_setup, 2469 .setup = alc882_targa_setup,
2519 .init_hook = alc882_targa_automute, 2470 .init_hook = alc882_targa_automute,
2520 }, 2471 },
2521 [ALC883_ACER_ASPIRE] = {
2522 .mixers = { alc883_acer_aspire_mixer },
2523 .init_verbs = { alc883_init_verbs, alc883_acer_eapd_verbs },
2524 .num_dacs = ARRAY_SIZE(alc883_dac_nids),
2525 .dac_nids = alc883_dac_nids,
2526 .dig_out_nid = ALC883_DIGOUT_NID,
2527 .num_channel_mode = ARRAY_SIZE(alc883_3ST_2ch_modes),
2528 .channel_mode = alc883_3ST_2ch_modes,
2529 .input_mux = &alc883_capture_source,
2530 .unsol_event = alc_sku_unsol_event,
2531 .setup = alc883_acer_aspire_setup,
2532 .init_hook = alc_hp_automute,
2533 },
2534 [ALC888_ACER_ASPIRE_4930G] = { 2472 [ALC888_ACER_ASPIRE_4930G] = {
2535 .mixers = { alc888_acer_aspire_4930g_mixer, 2473 .mixers = { alc888_acer_aspire_4930g_mixer,
2536 alc883_chmode_mixer }, 2474 alc883_chmode_mixer },
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 422430d6f2f1..32663c7de9f6 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -4237,6 +4237,7 @@ enum {
4237 ALC888_FIXUP_EEE1601, 4237 ALC888_FIXUP_EEE1601,
4238 ALC882_FIXUP_EAPD, 4238 ALC882_FIXUP_EAPD,
4239 ALC883_FIXUP_EAPD, 4239 ALC883_FIXUP_EAPD,
4240 ALC883_FIXUP_ACER_EAPD,
4240}; 4241};
4241 4242
4242static const struct alc_fixup alc882_fixups[] = { 4243static const struct alc_fixup alc882_fixups[] = {
@@ -4308,9 +4309,24 @@ static const struct alc_fixup alc882_fixups[] = {
4308 { } 4309 { }
4309 } 4310 }
4310 }, 4311 },
4312 [ALC883_FIXUP_ACER_EAPD] = {
4313 .type = ALC_FIXUP_VERBS,
4314 .v.verbs = (const struct hda_verb[]) {
4315 /* eanable EAPD on Acer laptops */
4316 { 0x20, AC_VERB_SET_COEF_INDEX, 0x07 },
4317 { 0x20, AC_VERB_SET_PROC_COEF, 0x3050 },
4318 { }
4319 }
4320 },
4311}; 4321};
4312 4322
4313static const struct snd_pci_quirk alc882_fixup_tbl[] = { 4323static const struct snd_pci_quirk alc882_fixup_tbl[] = {
4324 SND_PCI_QUIRK(0x1025, 0x006c, "Acer Aspire 9810", ALC883_FIXUP_ACER_EAPD),
4325 SND_PCI_QUIRK(0x1025, 0x0090, "Acer Aspire", ALC883_FIXUP_ACER_EAPD),
4326 SND_PCI_QUIRK(0x1025, 0x010a, "Acer Ferrari 5000", ALC883_FIXUP_ACER_EAPD),
4327 SND_PCI_QUIRK(0x1025, 0x0110, "Acer Aspire", ALC883_FIXUP_ACER_EAPD),
4328 SND_PCI_QUIRK(0x1025, 0x0112, "Acer Aspire 9303", ALC883_FIXUP_ACER_EAPD),
4329 SND_PCI_QUIRK(0x1025, 0x0121, "Acer Aspire 5920G", ALC883_FIXUP_ACER_EAPD),
4314 SND_PCI_QUIRK(0x1025, 0x0155, "Packard-Bell M5120", ALC882_FIXUP_PB_M5210), 4330 SND_PCI_QUIRK(0x1025, 0x0155, "Packard-Bell M5120", ALC882_FIXUP_PB_M5210),
4315 SND_PCI_QUIRK(0x1043, 0x13c2, "Asus A7M", ALC882_FIXUP_EAPD), 4331 SND_PCI_QUIRK(0x1043, 0x13c2, "Asus A7M", ALC882_FIXUP_EAPD),
4316 SND_PCI_QUIRK(0x1043, 0x1873, "ASUS W90V", ALC882_FIXUP_ASUS_W90V), 4332 SND_PCI_QUIRK(0x1043, 0x1873, "ASUS W90V", ALC882_FIXUP_ASUS_W90V),