diff options
-rw-r--r-- | Documentation/sound/alsa/ALSA-Configuration.txt | 1 | ||||
-rw-r--r-- | sound/pci/hda/patch_realtek.c | 94 |
2 files changed, 95 insertions, 0 deletions
diff --git a/Documentation/sound/alsa/ALSA-Configuration.txt b/Documentation/sound/alsa/ALSA-Configuration.txt index 959c80d0c479..9f40935eb3a3 100644 --- a/Documentation/sound/alsa/ALSA-Configuration.txt +++ b/Documentation/sound/alsa/ALSA-Configuration.txt | |||
@@ -872,6 +872,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed. | |||
872 | haier-w66 Haier W66 | 872 | haier-w66 Haier W66 |
873 | 6stack-hp HP machines with 6stack (Nettle boards) | 873 | 6stack-hp HP machines with 6stack (Nettle boards) |
874 | 3stack-hp HP machines with 3stack (Lucknow, Samba boards) | 874 | 3stack-hp HP machines with 3stack (Lucknow, Samba boards) |
875 | 6stack-dell Dell machines with 6stack (Inspiron 530) | ||
875 | mitac Mitac 8252D | 876 | mitac Mitac 8252D |
876 | auto auto-config reading BIOS (default) | 877 | auto auto-config reading BIOS (default) |
877 | 878 | ||
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 11bd68bb55f9..9aa2b5821e07 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
@@ -196,6 +196,7 @@ enum { | |||
196 | ALC883_HAIER_W66, | 196 | ALC883_HAIER_W66, |
197 | ALC888_6ST_HP, | 197 | ALC888_6ST_HP, |
198 | ALC888_3ST_HP, | 198 | ALC888_3ST_HP, |
199 | ALC888_6ST_DELL, | ||
199 | ALC883_MITAC, | 200 | ALC883_MITAC, |
200 | ALC883_AUTO, | 201 | ALC883_AUTO, |
201 | ALC883_MODEL_LAST, | 202 | ALC883_MODEL_LAST, |
@@ -6812,6 +6813,46 @@ static struct snd_kcontrol_new alc888_3st_hp_mixer[] = { | |||
6812 | { } /* end */ | 6813 | { } /* end */ |
6813 | }; | 6814 | }; |
6814 | 6815 | ||
6816 | static struct snd_kcontrol_new alc888_6st_dell_mixer[] = { | ||
6817 | HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT), | ||
6818 | HDA_BIND_MUTE("Front Playback Switch", 0x0c, 2, HDA_INPUT), | ||
6819 | HDA_CODEC_VOLUME("Surround Playback Volume", 0x0e, 0x0, HDA_OUTPUT), | ||
6820 | HDA_BIND_MUTE("Surround Playback Switch", 0x0e, 2, HDA_INPUT), | ||
6821 | HDA_CODEC_VOLUME_MONO("Center Playback Volume", 0x0d, 1, 0x0, HDA_OUTPUT), | ||
6822 | HDA_CODEC_VOLUME_MONO("LFE Playback Volume", 0x0d, 2, 0x0, HDA_OUTPUT), | ||
6823 | HDA_BIND_MUTE_MONO("Center Playback Switch", 0x0d, 1, 2, HDA_INPUT), | ||
6824 | HDA_BIND_MUTE_MONO("LFE Playback Switch", 0x0d, 2, 2, HDA_INPUT), | ||
6825 | HDA_CODEC_VOLUME("Side Playback Volume", 0x0f, 0x0, HDA_OUTPUT), | ||
6826 | HDA_BIND_MUTE("Side Playback Switch", 0x0f, 2, HDA_INPUT), | ||
6827 | HDA_CODEC_MUTE("Headphone Playback Switch", 0x1b, 0x0, HDA_OUTPUT), | ||
6828 | HDA_CODEC_VOLUME("CD Playback Volume", 0x0b, 0x04, HDA_INPUT), | ||
6829 | HDA_CODEC_MUTE("CD Playback Switch", 0x0b, 0x04, HDA_INPUT), | ||
6830 | HDA_CODEC_VOLUME("Line Playback Volume", 0x0b, 0x02, HDA_INPUT), | ||
6831 | HDA_CODEC_MUTE("Line Playback Switch", 0x0b, 0x02, HDA_INPUT), | ||
6832 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT), | ||
6833 | HDA_CODEC_VOLUME("Mic Boost", 0x18, 0, HDA_INPUT), | ||
6834 | HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT), | ||
6835 | HDA_CODEC_VOLUME("Front Mic Playback Volume", 0x0b, 0x1, HDA_INPUT), | ||
6836 | HDA_CODEC_VOLUME("Front Mic Boost", 0x19, 0, HDA_INPUT), | ||
6837 | HDA_CODEC_MUTE("Front Mic Playback Switch", 0x0b, 0x1, HDA_INPUT), | ||
6838 | HDA_CODEC_VOLUME("PC Speaker Playback Volume", 0x0b, 0x05, HDA_INPUT), | ||
6839 | HDA_CODEC_MUTE("PC Speaker Playback Switch", 0x0b, 0x05, HDA_INPUT), | ||
6840 | HDA_CODEC_VOLUME("Capture Volume", 0x08, 0x0, HDA_INPUT), | ||
6841 | HDA_CODEC_MUTE("Capture Switch", 0x08, 0x0, HDA_INPUT), | ||
6842 | HDA_CODEC_VOLUME_IDX("Capture Volume", 1, 0x09, 0x0, HDA_INPUT), | ||
6843 | HDA_CODEC_MUTE_IDX("Capture Switch", 1, 0x09, 0x0, HDA_INPUT), | ||
6844 | { | ||
6845 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, | ||
6846 | /* .name = "Capture Source", */ | ||
6847 | .name = "Input Source", | ||
6848 | .count = 2, | ||
6849 | .info = alc883_mux_enum_info, | ||
6850 | .get = alc883_mux_enum_get, | ||
6851 | .put = alc883_mux_enum_put, | ||
6852 | }, | ||
6853 | { } /* end */ | ||
6854 | }; | ||
6855 | |||
6815 | static struct snd_kcontrol_new alc883_acer_aspire_mixer[] = { | 6856 | static struct snd_kcontrol_new alc883_acer_aspire_mixer[] = { |
6816 | HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT), | 6857 | HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT), |
6817 | HDA_BIND_MUTE("Front Playback Switch", 0x0c, 2, HDA_INPUT), | 6858 | HDA_BIND_MUTE("Front Playback Switch", 0x0c, 2, HDA_INPUT), |
@@ -7058,6 +7099,15 @@ static struct hda_verb alc888_3st_hp_verbs[] = { | |||
7058 | { } | 7099 | { } |
7059 | }; | 7100 | }; |
7060 | 7101 | ||
7102 | static struct hda_verb alc888_6st_dell_verbs[] = { | ||
7103 | {0x14, AC_VERB_SET_CONNECT_SEL, 0x00}, /* Front: output 0 (0x0c) */ | ||
7104 | {0x15, AC_VERB_SET_CONNECT_SEL, 0x02}, /* Rear : output 1 (0x0e) */ | ||
7105 | {0x16, AC_VERB_SET_CONNECT_SEL, 0x01}, /* CLFE : output 2 (0x0d) */ | ||
7106 | {0x17, AC_VERB_SET_CONNECT_SEL, 0x03}, /* Side : output 3 (0x0f) */ | ||
7107 | {0x1b, AC_VERB_SET_UNSOLICITED_ENABLE, ALC880_HP_EVENT | AC_USRSP_EN}, | ||
7108 | { } | ||
7109 | }; | ||
7110 | |||
7061 | static struct hda_verb alc888_3st_hp_2ch_init[] = { | 7111 | static struct hda_verb alc888_3st_hp_2ch_init[] = { |
7062 | { 0x18, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80 }, | 7112 | { 0x18, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80 }, |
7063 | { 0x18, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE }, | 7113 | { 0x18, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE }, |
@@ -7253,6 +7303,33 @@ static struct hda_verb alc883_acer_eapd_verbs[] = { | |||
7253 | { } | 7303 | { } |
7254 | }; | 7304 | }; |
7255 | 7305 | ||
7306 | static void alc888_6st_dell_front_automute(struct hda_codec *codec) | ||
7307 | { | ||
7308 | unsigned int present; | ||
7309 | |||
7310 | present = snd_hda_codec_read(codec, 0x1b, 0, | ||
7311 | AC_VERB_GET_PIN_SENSE, 0) & 0x80000000; | ||
7312 | snd_hda_codec_amp_stereo(codec, 0x14, HDA_OUTPUT, 0, | ||
7313 | HDA_AMP_MUTE, present ? HDA_AMP_MUTE : 0); | ||
7314 | snd_hda_codec_amp_stereo(codec, 0x15, HDA_OUTPUT, 0, | ||
7315 | HDA_AMP_MUTE, present ? HDA_AMP_MUTE : 0); | ||
7316 | snd_hda_codec_amp_stereo(codec, 0x16, HDA_OUTPUT, 0, | ||
7317 | HDA_AMP_MUTE, present ? HDA_AMP_MUTE : 0); | ||
7318 | snd_hda_codec_amp_stereo(codec, 0x17, HDA_OUTPUT, 0, | ||
7319 | HDA_AMP_MUTE, present ? HDA_AMP_MUTE : 0); | ||
7320 | } | ||
7321 | |||
7322 | static void alc888_6st_dell_unsol_event(struct hda_codec *codec, | ||
7323 | unsigned int res) | ||
7324 | { | ||
7325 | switch (res >> 26) { | ||
7326 | case ALC880_HP_EVENT: | ||
7327 | printk("hp_event\n"); | ||
7328 | alc888_6st_dell_front_automute(codec); | ||
7329 | break; | ||
7330 | } | ||
7331 | } | ||
7332 | |||
7256 | /* | 7333 | /* |
7257 | * generic initialization of ADC, input mixers and output mixers | 7334 | * generic initialization of ADC, input mixers and output mixers |
7258 | */ | 7335 | */ |
@@ -7369,6 +7446,7 @@ static const char *alc883_models[ALC883_MODEL_LAST] = { | |||
7369 | [ALC883_HAIER_W66] = "haier-w66", | 7446 | [ALC883_HAIER_W66] = "haier-w66", |
7370 | [ALC888_6ST_HP] = "6stack-hp", | 7447 | [ALC888_6ST_HP] = "6stack-hp", |
7371 | [ALC888_3ST_HP] = "3stack-hp", | 7448 | [ALC888_3ST_HP] = "3stack-hp", |
7449 | [ALC888_6ST_DELL] = "6stack-dell", | ||
7372 | [ALC883_MITAC] = "mitac", | 7450 | [ALC883_MITAC] = "mitac", |
7373 | [ALC883_AUTO] = "auto", | 7451 | [ALC883_AUTO] = "auto", |
7374 | }; | 7452 | }; |
@@ -7379,6 +7457,7 @@ static struct snd_pci_quirk alc883_cfg_tbl[] = { | |||
7379 | SND_PCI_QUIRK(0x1025, 0x0110, "Acer Aspire", ALC883_ACER_ASPIRE), | 7457 | SND_PCI_QUIRK(0x1025, 0x0110, "Acer Aspire", ALC883_ACER_ASPIRE), |
7380 | SND_PCI_QUIRK(0x1025, 0x0112, "Acer Aspire 9303", ALC883_ACER_ASPIRE), | 7458 | SND_PCI_QUIRK(0x1025, 0x0112, "Acer Aspire 9303", ALC883_ACER_ASPIRE), |
7381 | SND_PCI_QUIRK(0x1025, 0, "Acer laptop", ALC883_ACER), /* default Acer */ | 7459 | SND_PCI_QUIRK(0x1025, 0, "Acer laptop", ALC883_ACER), /* default Acer */ |
7460 | SND_PCI_QUIRK(0x1028, 0x020d, "Dell Inspiron 530", ALC888_6ST_DELL), | ||
7382 | SND_PCI_QUIRK(0x103c, 0x2a3d, "HP Pavillion", ALC883_6ST_DIG), | 7461 | SND_PCI_QUIRK(0x103c, 0x2a3d, "HP Pavillion", ALC883_6ST_DIG), |
7383 | SND_PCI_QUIRK(0x103c, 0x2a4f, "HP Samba", ALC888_3ST_HP), | 7462 | SND_PCI_QUIRK(0x103c, 0x2a4f, "HP Samba", ALC888_3ST_HP), |
7384 | SND_PCI_QUIRK(0x103c, 0x2a60, "HP Lucknow", ALC888_3ST_HP), | 7463 | SND_PCI_QUIRK(0x103c, 0x2a60, "HP Lucknow", ALC888_3ST_HP), |
@@ -7653,6 +7732,21 @@ static struct alc_config_preset alc883_presets[] = { | |||
7653 | .need_dac_fix = 1, | 7732 | .need_dac_fix = 1, |
7654 | .input_mux = &alc883_capture_source, | 7733 | .input_mux = &alc883_capture_source, |
7655 | }, | 7734 | }, |
7735 | [ALC888_6ST_DELL] = { | ||
7736 | .mixers = { alc888_6st_dell_mixer, alc883_chmode_mixer }, | ||
7737 | .init_verbs = { alc883_init_verbs, alc888_6st_dell_verbs }, | ||
7738 | .num_dacs = ARRAY_SIZE(alc883_dac_nids), | ||
7739 | .dac_nids = alc883_dac_nids, | ||
7740 | .dig_out_nid = ALC883_DIGOUT_NID, | ||
7741 | .num_adc_nids = ARRAY_SIZE(alc883_adc_nids), | ||
7742 | .adc_nids = alc883_adc_nids, | ||
7743 | .dig_in_nid = ALC883_DIGIN_NID, | ||
7744 | .num_channel_mode = ARRAY_SIZE(alc883_sixstack_modes), | ||
7745 | .channel_mode = alc883_sixstack_modes, | ||
7746 | .input_mux = &alc883_capture_source, | ||
7747 | .unsol_event = alc888_6st_dell_unsol_event, | ||
7748 | .init_hook = alc888_6st_dell_front_automute, | ||
7749 | }, | ||
7656 | [ALC883_MITAC] = { | 7750 | [ALC883_MITAC] = { |
7657 | .mixers = { alc883_mitac_mixer }, | 7751 | .mixers = { alc883_mitac_mixer }, |
7658 | .init_verbs = { alc883_init_verbs, alc883_mitac_verbs }, | 7752 | .init_verbs = { alc883_init_verbs, alc883_mitac_verbs }, |