aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Documentation/sound/alsa/ALSA-Configuration.txt1
-rw-r--r--sound/pci/hda/patch_realtek.c52
2 files changed, 52 insertions, 1 deletions
diff --git a/Documentation/sound/alsa/ALSA-Configuration.txt b/Documentation/sound/alsa/ALSA-Configuration.txt
index da70bb82f637..d7660549bb91 100644
--- a/Documentation/sound/alsa/ALSA-Configuration.txt
+++ b/Documentation/sound/alsa/ALSA-Configuration.txt
@@ -870,6 +870,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
870 lenovo-101e Lenovo 101E 870 lenovo-101e Lenovo 101E
871 lenovo-nb0763 Lenovo NB0763 871 lenovo-nb0763 Lenovo NB0763
872 lenovo-ms7195-dig Lenovo MS7195 872 lenovo-ms7195-dig Lenovo MS7195
873 haier-w66 Haier W66
873 6stack-hp HP machines with 6stack (Nettle boards) 874 6stack-hp HP machines with 6stack (Nettle boards)
874 3stack-hp HP machines with 3stack (Lucknow, Samba boards) 875 3stack-hp HP machines with 3stack (Lucknow, Samba boards)
875 auto auto-config reading BIOS (default) 876 auto auto-config reading BIOS (default)
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 4a40a056a8c6..f558b801c82d 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -177,7 +177,8 @@ enum {
177 ALC883_LAPTOP_EAPD, 177 ALC883_LAPTOP_EAPD,
178 ALC883_LENOVO_101E_2ch, 178 ALC883_LENOVO_101E_2ch,
179 ALC883_LENOVO_NB0763, 179 ALC883_LENOVO_NB0763,
180 ALC888_LENOVO_MS7195_DIG, 180 ALC888_LENOVO_MS7195_DIG,
181 ALC883_HAIER_W66,
181 ALC888_6ST_HP, 182 ALC888_6ST_HP,
182 ALC888_3ST_HP, 183 ALC888_3ST_HP,
183 ALC883_AUTO, 184 ALC883_AUTO,
@@ -6567,6 +6568,19 @@ static struct hda_verb alc888_lenovo_ms7195_verbs[] = {
6567 { } /* end */ 6568 { } /* end */
6568}; 6569};
6569 6570
6571static struct hda_verb alc883_haier_w66_verbs[] = {
6572 {0x0c, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
6573 {0x0c, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)},
6574
6575 {0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
6576
6577 {0x1b, AC_VERB_SET_CONNECT_SEL, 0x00},
6578 {0x1b, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP},
6579 {0x1b, AC_VERB_SET_UNSOLICITED_ENABLE, ALC880_HP_EVENT | AC_USRSP_EN},
6580 {0x1b, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP},
6581 { } /* end */
6582};
6583
6570static struct hda_verb alc888_6st_hp_verbs[] = { 6584static struct hda_verb alc888_6st_hp_verbs[] = {
6571 {0x14, AC_VERB_SET_CONNECT_SEL, 0x00}, /* Front: output 0 (0x0c) */ 6585 {0x14, AC_VERB_SET_CONNECT_SEL, 0x00}, /* Front: output 0 (0x0c) */
6572 {0x15, AC_VERB_SET_CONNECT_SEL, 0x02}, /* Rear : output 2 (0x0e) */ 6586 {0x15, AC_VERB_SET_CONNECT_SEL, 0x02}, /* Rear : output 2 (0x0e) */
@@ -6685,6 +6699,25 @@ static void alc883_tagra_unsol_event(struct hda_codec *codec, unsigned int res)
6685 alc883_tagra_automute(codec); 6699 alc883_tagra_automute(codec);
6686} 6700}
6687 6701
6702static void alc883_haier_w66_automute(struct hda_codec *codec)
6703{
6704 unsigned int present;
6705 unsigned char bits;
6706
6707 present = snd_hda_codec_read(codec, 0x1b, 0,
6708 AC_VERB_GET_PIN_SENSE, 0) & 0x80000000;
6709 bits = present ? 0x80 : 0;
6710 snd_hda_codec_amp_stereo(codec, 0x14, HDA_OUTPUT, 0,
6711 0x80, bits);
6712}
6713
6714static void alc883_haier_w66_unsol_event(struct hda_codec *codec,
6715 unsigned int res)
6716{
6717 if ((res >> 26) == ALC880_HP_EVENT)
6718 alc883_haier_w66_automute(codec);
6719}
6720
6688static void alc883_lenovo_101e_ispeaker_automute(struct hda_codec *codec) 6721static void alc883_lenovo_101e_ispeaker_automute(struct hda_codec *codec)
6689{ 6722{
6690 unsigned int present; 6723 unsigned int present;
@@ -6871,6 +6904,7 @@ static const char *alc883_models[ALC883_MODEL_LAST] = {
6871 [ALC883_LENOVO_101E_2ch] = "lenovo-101e", 6904 [ALC883_LENOVO_101E_2ch] = "lenovo-101e",
6872 [ALC883_LENOVO_NB0763] = "lenovo-nb0763", 6905 [ALC883_LENOVO_NB0763] = "lenovo-nb0763",
6873 [ALC888_LENOVO_MS7195_DIG] = "lenovo-ms7195-dig", 6906 [ALC888_LENOVO_MS7195_DIG] = "lenovo-ms7195-dig",
6907 [ALC883_HAIER_W66] = "haier-w66",
6874 [ALC888_6ST_HP] = "6stack-hp", 6908 [ALC888_6ST_HP] = "6stack-hp",
6875 [ALC888_3ST_HP] = "3stack-hp", 6909 [ALC888_3ST_HP] = "3stack-hp",
6876 [ALC883_AUTO] = "auto", 6910 [ALC883_AUTO] = "auto",
@@ -6915,6 +6949,8 @@ static struct snd_pci_quirk alc883_cfg_tbl[] = {
6915 SND_PCI_QUIRK(0x103c, 0x2a60, "HP Lucknow", ALC888_3ST_HP), 6949 SND_PCI_QUIRK(0x103c, 0x2a60, "HP Lucknow", ALC888_3ST_HP),
6916 SND_PCI_QUIRK(0x103c, 0x2a4f, "HP Samba", ALC888_3ST_HP), 6950 SND_PCI_QUIRK(0x103c, 0x2a4f, "HP Samba", ALC888_3ST_HP),
6917 SND_PCI_QUIRK(0x17c0, 0x4071, "MEDION MD2", ALC883_MEDION_MD2), 6951 SND_PCI_QUIRK(0x17c0, 0x4071, "MEDION MD2", ALC883_MEDION_MD2),
6952 SND_PCI_QUIRK(0x1991, 0x5625, "Haier W66", ALC883_HAIER_W66),
6953 SND_PCI_QUIRK(0x17aa, 0x3bfc, "Lenovo NB0763", ALC883_LENOVO_NB0763),
6918 {} 6954 {}
6919}; 6955};
6920 6956
@@ -7109,6 +7145,20 @@ static struct alc_config_preset alc883_presets[] = {
7109 .input_mux = &alc883_capture_source, 7145 .input_mux = &alc883_capture_source,
7110 .unsol_event = alc883_lenovo_ms7195_unsol_event, 7146 .unsol_event = alc883_lenovo_ms7195_unsol_event,
7111 .init_hook = alc888_lenovo_ms7195_front_automute, 7147 .init_hook = alc888_lenovo_ms7195_front_automute,
7148 },
7149 [ALC883_HAIER_W66] = {
7150 .mixers = { alc883_tagra_2ch_mixer},
7151 .init_verbs = { alc883_init_verbs, alc883_haier_w66_verbs},
7152 .num_dacs = ARRAY_SIZE(alc883_dac_nids),
7153 .dac_nids = alc883_dac_nids,
7154 .dig_out_nid = ALC883_DIGOUT_NID,
7155 .num_adc_nids = ARRAY_SIZE(alc883_adc_nids),
7156 .adc_nids = alc883_adc_nids,
7157 .num_channel_mode = ARRAY_SIZE(alc883_3ST_2ch_modes),
7158 .channel_mode = alc883_3ST_2ch_modes,
7159 .input_mux = &alc883_capture_source,
7160 .unsol_event = alc883_haier_w66_unsol_event,
7161 .init_hook = alc883_haier_w66_automute,
7112 }, 7162 },
7113 [ALC888_6ST_HP] = { 7163 [ALC888_6ST_HP] = {
7114 .mixers = { alc888_6st_hp_mixer, alc883_chmode_mixer }, 7164 .mixers = { alc888_6st_hp_mixer, alc883_chmode_mixer },