diff options
author | Tobin Davis <tdavis@dsl-only.net> | 2007-08-07 05:50:26 -0400 |
---|---|---|
committer | Jaroslav Kysela <perex@perex.cz> | 2007-10-16 09:58:28 -0400 |
commit | 2880a8670d45f66bbdd3c5dd8f4ba46fe1ce9329 (patch) | |
tree | eb9523603cc8389a25e2717bb7b3fb00b6a2b000 /sound/pci/hda | |
parent | 4ff076e5d925d8f714b88a1d3992796f89b45450 (diff) |
[ALSA] hda-codec - Add support for Acer Aspire laptops
This patch adds support for some Acer Aspire systems.
Signed-off-by: Tobin Davis <tdavis@dsl-only.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Diffstat (limited to 'sound/pci/hda')
-rw-r--r-- | sound/pci/hda/patch_realtek.c | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index db4aded97456..39c08bb670d1 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
@@ -167,6 +167,7 @@ enum { | |||
167 | ALC883_TARGA_DIG, | 167 | ALC883_TARGA_DIG, |
168 | ALC883_TARGA_2ch_DIG, | 168 | ALC883_TARGA_2ch_DIG, |
169 | ALC883_ACER, | 169 | ALC883_ACER, |
170 | ALC883_ACER_ASPIRE, | ||
170 | ALC883_MEDION, | 171 | ALC883_MEDION, |
171 | ALC883_MEDION_MD2, | 172 | ALC883_MEDION_MD2, |
172 | ALC883_LAPTOP_EAPD, | 173 | ALC883_LAPTOP_EAPD, |
@@ -6219,6 +6220,33 @@ static struct snd_kcontrol_new alc888_3st_hp_mixer[] = { | |||
6219 | { } /* end */ | 6220 | { } /* end */ |
6220 | }; | 6221 | }; |
6221 | 6222 | ||
6223 | static struct snd_kcontrol_new alc883_acer_aspire_mixer[] = { | ||
6224 | HDA_CODEC_VOLUME("Front Playback Volume", 0x0d, 0x0, HDA_OUTPUT), | ||
6225 | HDA_CODEC_MUTE("Front Playback Switch", 0x15, 0x0, HDA_OUTPUT), | ||
6226 | HDA_CODEC_VOLUME("Headphone Playback Volume", 0x0c, 0x0, HDA_OUTPUT), | ||
6227 | HDA_CODEC_MUTE("Headphone Playback Switch", 0x14, 0x0, HDA_OUTPUT), | ||
6228 | HDA_CODEC_VOLUME("CD Playback Volume", 0x0b, 0x04, HDA_INPUT), | ||
6229 | HDA_CODEC_MUTE("CD Playback Switch", 0x0b, 0x04, HDA_INPUT), | ||
6230 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT), | ||
6231 | HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT), | ||
6232 | HDA_CODEC_VOLUME("Line Playback Volume", 0x0b, 0x02, HDA_INPUT), | ||
6233 | HDA_CODEC_MUTE("Line Playback Switch", 0x0b, 0x02, HDA_INPUT), | ||
6234 | HDA_CODEC_VOLUME("Capture Volume", 0x08, 0x0, HDA_INPUT), | ||
6235 | HDA_CODEC_MUTE("Capture Switch", 0x08, 0x0, HDA_INPUT), | ||
6236 | HDA_CODEC_VOLUME_IDX("Capture Volume", 1, 0x09, 0x0, HDA_INPUT), | ||
6237 | HDA_CODEC_MUTE_IDX("Capture Switch", 1, 0x09, 0x0, HDA_INPUT), | ||
6238 | { | ||
6239 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, | ||
6240 | /* .name = "Capture Source", */ | ||
6241 | .name = "Input Source", | ||
6242 | .count = 2, | ||
6243 | .info = alc883_mux_enum_info, | ||
6244 | .get = alc883_mux_enum_get, | ||
6245 | .put = alc883_mux_enum_put, | ||
6246 | }, | ||
6247 | { } /* end */ | ||
6248 | }; | ||
6249 | |||
6222 | static struct snd_kcontrol_new alc883_chmode_mixer[] = { | 6250 | static struct snd_kcontrol_new alc883_chmode_mixer[] = { |
6223 | { | 6251 | { |
6224 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, | 6252 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, |
@@ -6436,6 +6464,18 @@ static struct hda_verb alc883_medion_md2_verbs[] = { | |||
6436 | { } /* end */ | 6464 | { } /* end */ |
6437 | }; | 6465 | }; |
6438 | 6466 | ||
6467 | static struct hda_verb alc883_acer_aspire_verbs[] = { | ||
6468 | {0x0c, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, | ||
6469 | {0x0c, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)}, | ||
6470 | {0x0d, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, | ||
6471 | {0x0d, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)}, | ||
6472 | |||
6473 | {0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP}, | ||
6474 | |||
6475 | {0x14, AC_VERB_SET_UNSOLICITED_ENABLE, ALC880_HP_EVENT | AC_USRSP_EN}, | ||
6476 | { } /* end */ | ||
6477 | }; | ||
6478 | |||
6439 | /* toggle speaker-output according to the hp-jack state */ | 6479 | /* toggle speaker-output according to the hp-jack state */ |
6440 | static void alc883_medion_md2_automute(struct hda_codec *codec) | 6480 | static void alc883_medion_md2_automute(struct hda_codec *codec) |
6441 | { | 6481 | { |
@@ -6622,6 +6662,7 @@ static const char *alc883_models[ALC883_MODEL_LAST] = { | |||
6622 | [ALC883_TARGA_DIG] = "targa-dig", | 6662 | [ALC883_TARGA_DIG] = "targa-dig", |
6623 | [ALC883_TARGA_2ch_DIG] = "targa-2ch-dig", | 6663 | [ALC883_TARGA_2ch_DIG] = "targa-2ch-dig", |
6624 | [ALC883_ACER] = "acer", | 6664 | [ALC883_ACER] = "acer", |
6665 | [ALC883_ACER_ASPIRE] = "acer-aspire", | ||
6625 | [ALC883_MEDION] = "medion", | 6666 | [ALC883_MEDION] = "medion", |
6626 | [ALC883_MEDION_MD2] = "medion-md2", | 6667 | [ALC883_MEDION_MD2] = "medion-md2", |
6627 | [ALC883_LAPTOP_EAPD] = "laptop-eapd", | 6668 | [ALC883_LAPTOP_EAPD] = "laptop-eapd", |
@@ -6657,6 +6698,7 @@ static struct snd_pci_quirk alc883_cfg_tbl[] = { | |||
6657 | SND_PCI_QUIRK(0x1462, 0x4319, "MSI", ALC883_TARGA_DIG), | 6698 | SND_PCI_QUIRK(0x1462, 0x4319, "MSI", ALC883_TARGA_DIG), |
6658 | SND_PCI_QUIRK(0x1462, 0x4324, "MSI", ALC883_TARGA_DIG), | 6699 | SND_PCI_QUIRK(0x1462, 0x4324, "MSI", ALC883_TARGA_DIG), |
6659 | SND_PCI_QUIRK(0x1462, 0xa422, "MSI", ALC883_TARGA_2ch_DIG), | 6700 | SND_PCI_QUIRK(0x1462, 0xa422, "MSI", ALC883_TARGA_2ch_DIG), |
6701 | SND_PCI_QUIRK(0x1025, 0x0110, "Acer Aspire", ALC883_ACER_ASPIRE), | ||
6660 | SND_PCI_QUIRK(0x1025, 0, "Acer laptop", ALC883_ACER), | 6702 | SND_PCI_QUIRK(0x1025, 0, "Acer laptop", ALC883_ACER), |
6661 | SND_PCI_QUIRK(0x15d9, 0x8780, "Supermicro PDSBA", ALC883_3ST_6ch), | 6703 | SND_PCI_QUIRK(0x15d9, 0x8780, "Supermicro PDSBA", ALC883_3ST_6ch), |
6662 | SND_PCI_QUIRK(0x161f, 0x2054, "Medion laptop", ALC883_MEDION), | 6704 | SND_PCI_QUIRK(0x161f, 0x2054, "Medion laptop", ALC883_MEDION), |
@@ -6771,6 +6813,20 @@ static struct alc_config_preset alc883_presets[] = { | |||
6771 | .channel_mode = alc883_3ST_2ch_modes, | 6813 | .channel_mode = alc883_3ST_2ch_modes, |
6772 | .input_mux = &alc883_capture_source, | 6814 | .input_mux = &alc883_capture_source, |
6773 | }, | 6815 | }, |
6816 | [ALC883_ACER_ASPIRE] = { | ||
6817 | .mixers = { alc883_acer_aspire_mixer}, | ||
6818 | .init_verbs = { alc883_init_verbs, alc883_acer_aspire_verbs}, | ||
6819 | .num_dacs = ARRAY_SIZE(alc883_dac_nids), | ||
6820 | .dac_nids = alc883_dac_nids, | ||
6821 | .dig_out_nid = ALC883_DIGOUT_NID, | ||
6822 | .num_adc_nids = ARRAY_SIZE(alc883_adc_nids), | ||
6823 | .adc_nids = alc883_adc_nids, | ||
6824 | .num_channel_mode = ARRAY_SIZE(alc883_3ST_2ch_modes), | ||
6825 | .channel_mode = alc883_3ST_2ch_modes, | ||
6826 | .input_mux = &alc883_capture_source, | ||
6827 | .unsol_event = alc883_medion_md2_unsol_event, | ||
6828 | .init_hook = alc883_medion_md2_automute, | ||
6829 | }, | ||
6774 | [ALC883_MEDION] = { | 6830 | [ALC883_MEDION] = { |
6775 | .mixers = { alc883_fivestack_mixer, | 6831 | .mixers = { alc883_fivestack_mixer, |
6776 | alc883_chmode_mixer }, | 6832 | alc883_chmode_mixer }, |