aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/patch_realtek.c
diff options
context:
space:
mode:
authorKailang Yang <kailang@realtek.com>2008-08-26 07:17:46 -0400
committerJaroslav Kysela <perex@perex.cz>2008-08-29 04:05:59 -0400
commite2757d5efad01dae6986e1f84590898e47231964 (patch)
treecb1483388a008671a7111312dbb1be1102cb642c /sound/pci/hda/patch_realtek.c
parent60db6b53fb43421beb2ff3fe3e63412bf81620aa (diff)
ALSA: hda - support more ALC888 devices
- Add Lenovo Sky support (17aa:101d) - Add ASUS M90V support (1043:8317) - Add ASUS Eee 1601 support (1043:835f) Signed-off-by: Kailang Yang <kailang@realtek.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Diffstat (limited to 'sound/pci/hda/patch_realtek.c')
-rw-r--r--sound/pci/hda/patch_realtek.c322
1 files changed, 312 insertions, 10 deletions
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 538d85440a30..d748d19f1632 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -210,6 +210,7 @@ enum {
210 ALC883_LENOVO_101E_2ch, 210 ALC883_LENOVO_101E_2ch,
211 ALC883_LENOVO_NB0763, 211 ALC883_LENOVO_NB0763,
212 ALC888_LENOVO_MS7195_DIG, 212 ALC888_LENOVO_MS7195_DIG,
213 ALC888_LENOVO_SKY,
213 ALC883_HAIER_W66, 214 ALC883_HAIER_W66,
214 ALC888_3ST_HP, 215 ALC888_3ST_HP,
215 ALC888_6ST_DELL, 216 ALC888_6ST_DELL,
@@ -217,6 +218,8 @@ enum {
217 ALC883_CLEVO_M720, 218 ALC883_CLEVO_M720,
218 ALC883_FUJITSU_PI2515, 219 ALC883_FUJITSU_PI2515,
219 ALC883_3ST_6ch_INTEL, 220 ALC883_3ST_6ch_INTEL,
221 ALC888_ASUS_M90V,
222 ALC888_ASUS_EEE1601,
220 ALC883_AUTO, 223 ALC883_AUTO,
221 ALC883_MODEL_LAST, 224 ALC883_MODEL_LAST,
222}; 225};
@@ -6808,6 +6811,23 @@ static struct hda_input_mux alc883_fujitsu_pi2515_capture_source = {
6808 }, 6811 },
6809}; 6812};
6810 6813
6814static struct hda_input_mux alc883_lenovo_sky_capture_source = {
6815 .num_items = 3,
6816 .items = {
6817 { "Mic", 0x0 },
6818 { "Front Mic", 0x1 },
6819 { "Line", 0x4 },
6820 },
6821};
6822
6823static struct hda_input_mux alc883_asus_eee1601_capture_source = {
6824 .num_items = 2,
6825 .items = {
6826 { "Mic", 0x0 },
6827 { "Line", 0x2 },
6828 },
6829};
6830
6811#define alc883_mux_enum_info alc_mux_enum_info 6831#define alc883_mux_enum_info alc_mux_enum_info
6812#define alc883_mux_enum_get alc_mux_enum_get 6832#define alc883_mux_enum_get alc_mux_enum_get
6813/* ALC883 has the ALC882-type input selection */ 6833/* ALC883 has the ALC882-type input selection */
@@ -7122,13 +7142,11 @@ static struct snd_kcontrol_new alc883_3ST_6ch_mixer[] = {
7122 HDA_CODEC_MUTE("PC Speaker Playback Switch", 0x0b, 0x05, HDA_INPUT), 7142 HDA_CODEC_MUTE("PC Speaker Playback Switch", 0x0b, 0x05, HDA_INPUT),
7123 HDA_CODEC_VOLUME("Capture Volume", 0x08, 0x0, HDA_INPUT), 7143 HDA_CODEC_VOLUME("Capture Volume", 0x08, 0x0, HDA_INPUT),
7124 HDA_CODEC_MUTE("Capture Switch", 0x08, 0x0, HDA_INPUT), 7144 HDA_CODEC_MUTE("Capture Switch", 0x08, 0x0, HDA_INPUT),
7125 HDA_CODEC_VOLUME_IDX("Capture Volume", 1, 0x09, 0x0, HDA_INPUT),
7126 HDA_CODEC_MUTE_IDX("Capture Switch", 1, 0x09, 0x0, HDA_INPUT),
7127 { 7145 {
7128 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 7146 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
7129 /* .name = "Capture Source", */ 7147 /* .name = "Capture Source", */
7130 .name = "Input Source", 7148 .name = "Input Source",
7131 .count = 2, 7149 .count = 1,
7132 .info = alc883_mux_enum_info, 7150 .info = alc883_mux_enum_info,
7133 .get = alc883_mux_enum_get, 7151 .get = alc883_mux_enum_get,
7134 .put = alc883_mux_enum_put, 7152 .put = alc883_mux_enum_put,
@@ -7373,6 +7391,87 @@ static struct snd_kcontrol_new alc883_acer_aspire_mixer[] = {
7373 { } /* end */ 7391 { } /* end */
7374}; 7392};
7375 7393
7394static struct snd_kcontrol_new alc888_lenovo_sky_mixer[] = {
7395 HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT),
7396 HDA_BIND_MUTE("Front Playback Switch", 0x0c, 2, HDA_INPUT),
7397 HDA_CODEC_VOLUME("Surround Playback Volume", 0x0e, 0x0, HDA_OUTPUT),
7398 HDA_BIND_MUTE("Surround Playback Switch", 0x0e, 2, HDA_INPUT),
7399 HDA_CODEC_VOLUME_MONO("Center Playback Volume",
7400 0x0d, 1, 0x0, HDA_OUTPUT),
7401 HDA_CODEC_VOLUME_MONO("LFE Playback Volume", 0x0d, 2, 0x0, HDA_OUTPUT),
7402 HDA_BIND_MUTE_MONO("Center Playback Switch", 0x0d, 1, 2, HDA_INPUT),
7403 HDA_BIND_MUTE_MONO("LFE Playback Switch", 0x0d, 2, 2, HDA_INPUT),
7404 HDA_CODEC_VOLUME("Side Playback Volume", 0x0f, 0x0, HDA_OUTPUT),
7405 HDA_BIND_MUTE("Side Playback Switch", 0x0f, 2, HDA_INPUT),
7406 HDA_CODEC_MUTE("Headphone Playback Switch", 0x1b, 0x0, HDA_OUTPUT),
7407 HDA_CODEC_MUTE("iSpeaker Playback Switch", 0x1a, 0x0, HDA_OUTPUT),
7408 HDA_CODEC_VOLUME("CD Playback Volume", 0x0b, 0x04, HDA_INPUT),
7409 HDA_CODEC_MUTE("CD Playback Switch", 0x0b, 0x04, HDA_INPUT),
7410 HDA_CODEC_VOLUME("Line Playback Volume", 0x0b, 0x02, HDA_INPUT),
7411 HDA_CODEC_MUTE("Line Playback Switch", 0x0b, 0x02, HDA_INPUT),
7412 HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT),
7413 HDA_CODEC_VOLUME("Mic Boost", 0x18, 0, HDA_INPUT),
7414 HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT),
7415 HDA_CODEC_VOLUME("Front Mic Playback Volume", 0x0b, 0x1, HDA_INPUT),
7416 HDA_CODEC_VOLUME("Front Mic Boost", 0x19, 0, HDA_INPUT),
7417 HDA_CODEC_MUTE("Front Mic Playback Switch", 0x0b, 0x1, HDA_INPUT),
7418 HDA_CODEC_VOLUME("Capture Volume", 0x08, 0x0, HDA_INPUT),
7419 HDA_CODEC_MUTE("Capture Switch", 0x08, 0x0, HDA_INPUT),
7420 HDA_CODEC_VOLUME_IDX("Capture Volume", 1, 0x09, 0x0, HDA_INPUT),
7421 HDA_CODEC_MUTE_IDX("Capture Switch", 1, 0x09, 0x0, HDA_INPUT),
7422 {
7423 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
7424 /* .name = "Capture Source", */
7425 .name = "Input Source",
7426 .count = 2,
7427 .info = alc883_mux_enum_info,
7428 .get = alc883_mux_enum_get,
7429 .put = alc883_mux_enum_put,
7430 },
7431 { } /* end */
7432};
7433
7434static struct hda_bind_ctls alc883_bind_cap_vol = {
7435 .ops = &snd_hda_bind_vol,
7436 .values = {
7437 HDA_COMPOSE_AMP_VAL(0x08, 3, 0, HDA_INPUT),
7438 HDA_COMPOSE_AMP_VAL(0x09, 3, 0, HDA_INPUT),
7439 0
7440 },
7441};
7442
7443static struct hda_bind_ctls alc883_bind_cap_switch = {
7444 .ops = &snd_hda_bind_sw,
7445 .values = {
7446 HDA_COMPOSE_AMP_VAL(0x08, 3, 0, HDA_INPUT),
7447 HDA_COMPOSE_AMP_VAL(0x09, 3, 0, HDA_INPUT),
7448 0
7449 },
7450};
7451
7452static struct snd_kcontrol_new alc883_asus_eee1601_mixer[] = {
7453 HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT),
7454 HDA_BIND_MUTE("Front Playback Switch", 0x0c, 2, HDA_INPUT),
7455 HDA_CODEC_MUTE("Headphone Playback Switch", 0x14, 0x0, HDA_OUTPUT),
7456 HDA_CODEC_VOLUME("Line Playback Volume", 0x0b, 0x02, HDA_INPUT),
7457 HDA_CODEC_MUTE("Line Playback Switch", 0x0b, 0x02, HDA_INPUT),
7458 HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT),
7459 HDA_CODEC_VOLUME("Mic Boost", 0x18, 0, HDA_INPUT),
7460 HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT),
7461 HDA_BIND_VOL("Capture Volume", &alc883_bind_cap_vol),
7462 HDA_BIND_SW("Capture Switch", &alc883_bind_cap_switch),
7463 {
7464 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
7465 /* .name = "Capture Source", */
7466 .name = "Input Source",
7467 .count = 1,
7468 .info = alc883_mux_enum_info,
7469 .get = alc883_mux_enum_get,
7470 .put = alc883_mux_enum_put,
7471 },
7472 { } /* end */
7473};
7474
7376static struct snd_kcontrol_new alc883_chmode_mixer[] = { 7475static struct snd_kcontrol_new alc883_chmode_mixer[] = {
7377 { 7476 {
7378 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 7477 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
@@ -7386,7 +7485,7 @@ static struct snd_kcontrol_new alc883_chmode_mixer[] = {
7386 7485
7387static struct hda_verb alc883_init_verbs[] = { 7486static struct hda_verb alc883_init_verbs[] = {
7388 /* ADC1: mute amp left and right */ 7487 /* ADC1: mute amp left and right */
7389 {0x08, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)}, 7488 {0x08, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
7390 {0x08, AC_VERB_SET_CONNECT_SEL, 0x00}, 7489 {0x08, AC_VERB_SET_CONNECT_SEL, 0x00},
7391 /* ADC2: mute amp left and right */ 7490 /* ADC2: mute amp left and right */
7392 {0x09, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)}, 7491 {0x09, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
@@ -7451,14 +7550,14 @@ static struct hda_verb alc883_init_verbs[] = {
7451 /* Mixer elements: 0x18, 19, 1a, 1b, 1c, 1d, 14, 15, 16, 17, 0b */ 7550 /* Mixer elements: 0x18, 19, 1a, 1b, 1c, 1d, 14, 15, 16, 17, 0b */
7452 /* Input mixer2 */ 7551 /* Input mixer2 */
7453 {0x23, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, 7552 {0x23, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
7454 {0x23, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)}, 7553 {0x23, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(1)},
7455 {0x23, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(2)}, 7554 {0x23, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(2)},
7456 {0x23, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(4)}, 7555 {0x23, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(4)},
7457 /* Input mixer3 */ 7556 /* Input mixer3 */
7458 {0x22, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, 7557 {0x22, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
7459 {0x22, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)}, 7558 {0x22, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(1)},
7460 {0x22, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(2)}, 7559 {0x22, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(2)},
7461 {0x22, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(4)}, 7560 {0x22, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(4)},
7462 { } 7561 { }
7463}; 7562};
7464 7563
@@ -7608,6 +7707,18 @@ static struct hda_verb alc883_haier_w66_verbs[] = {
7608 { } /* end */ 7707 { } /* end */
7609}; 7708};
7610 7709
7710static struct hda_verb alc888_lenovo_sky_verbs[] = {
7711 {0x0c, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
7712 {0x0c, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)},
7713 {0x0d, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
7714 {0x0e, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
7715 {0x0f, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
7716 {0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
7717 {0x1a, AC_VERB_SET_CONNECT_SEL, 0x00},
7718 {0x1b, AC_VERB_SET_UNSOLICITED_ENABLE, ALC880_HP_EVENT | AC_USRSP_EN},
7719 { } /* end */
7720};
7721
7611static struct hda_verb alc888_3st_hp_verbs[] = { 7722static struct hda_verb alc888_3st_hp_verbs[] = {
7612 {0x14, AC_VERB_SET_CONNECT_SEL, 0x00}, /* Front: output 0 (0x0c) */ 7723 {0x14, AC_VERB_SET_CONNECT_SEL, 0x00}, /* Front: output 0 (0x0c) */
7613 {0x16, AC_VERB_SET_CONNECT_SEL, 0x01}, /* Rear : output 1 (0x0d) */ 7724 {0x16, AC_VERB_SET_CONNECT_SEL, 0x01}, /* Rear : output 1 (0x0d) */
@@ -7904,6 +8015,50 @@ static void alc888_6st_dell_unsol_event(struct hda_codec *codec,
7904 } 8015 }
7905} 8016}
7906 8017
8018static void alc888_lenovo_sky_front_automute(struct hda_codec *codec)
8019{
8020 unsigned int mute;
8021 unsigned int present;
8022
8023 snd_hda_codec_read(codec, 0x1b, 0, AC_VERB_SET_PIN_SENSE, 0);
8024 present = snd_hda_codec_read(codec, 0x1b, 0,
8025 AC_VERB_GET_PIN_SENSE, 0);
8026 present = (present & 0x80000000) != 0;
8027 if (present) {
8028 /* mute internal speaker */
8029 snd_hda_codec_amp_stereo(codec, 0x14, HDA_OUTPUT, 0,
8030 HDA_AMP_MUTE, HDA_AMP_MUTE);
8031 snd_hda_codec_amp_stereo(codec, 0x15, HDA_OUTPUT, 0,
8032 HDA_AMP_MUTE, HDA_AMP_MUTE);
8033 snd_hda_codec_amp_stereo(codec, 0x16, HDA_OUTPUT, 0,
8034 HDA_AMP_MUTE, HDA_AMP_MUTE);
8035 snd_hda_codec_amp_stereo(codec, 0x17, HDA_OUTPUT, 0,
8036 HDA_AMP_MUTE, HDA_AMP_MUTE);
8037 snd_hda_codec_amp_stereo(codec, 0x1a, HDA_OUTPUT, 0,
8038 HDA_AMP_MUTE, HDA_AMP_MUTE);
8039 } else {
8040 /* unmute internal speaker if necessary */
8041 mute = snd_hda_codec_amp_read(codec, 0x1b, 0, HDA_OUTPUT, 0);
8042 snd_hda_codec_amp_stereo(codec, 0x14, HDA_OUTPUT, 0,
8043 HDA_AMP_MUTE, mute);
8044 snd_hda_codec_amp_stereo(codec, 0x15, HDA_OUTPUT, 0,
8045 HDA_AMP_MUTE, mute);
8046 snd_hda_codec_amp_stereo(codec, 0x16, HDA_OUTPUT, 0,
8047 HDA_AMP_MUTE, mute);
8048 snd_hda_codec_amp_stereo(codec, 0x17, HDA_OUTPUT, 0,
8049 HDA_AMP_MUTE, mute);
8050 snd_hda_codec_amp_stereo(codec, 0x1a, HDA_OUTPUT, 0,
8051 HDA_AMP_MUTE, mute);
8052 }
8053}
8054
8055static void alc883_lenovo_sky_unsol_event(struct hda_codec *codec,
8056 unsigned int res)
8057{
8058 if ((res >> 26) == ALC880_HP_EVENT)
8059 alc888_lenovo_sky_front_automute(codec);
8060}
8061
7907/* 8062/*
7908 * generic initialization of ADC, input mixers and output mixers 8063 * generic initialization of ADC, input mixers and output mixers
7909 */ 8064 */
@@ -7988,6 +8143,105 @@ static struct snd_kcontrol_new alc883_capture_mixer[] = {
7988 { } /* end */ 8143 { } /* end */
7989}; 8144};
7990 8145
8146static struct hda_verb alc888_asus_m90v_verbs[] = {
8147 {0x22, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
8148 {0x23, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
8149 {0x23, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)},
8150 /* enable unsolicited event */
8151 {0x1b, AC_VERB_SET_UNSOLICITED_ENABLE, ALC880_HP_EVENT | AC_USRSP_EN},
8152 {0x18, AC_VERB_SET_UNSOLICITED_ENABLE, ALC880_MIC_EVENT | AC_USRSP_EN},
8153 { } /* end */
8154};
8155
8156static void alc883_nb_mic_automute(struct hda_codec *codec)
8157{
8158 unsigned int present;
8159
8160 present = snd_hda_codec_read(codec, 0x18, 0,
8161 AC_VERB_GET_PIN_SENSE, 0) & 0x80000000;
8162 snd_hda_codec_write(codec, 0x23, 0, AC_VERB_SET_AMP_GAIN_MUTE,
8163 0x7000 | (0x00 << 8) | (present ? 0 : 0x80));
8164 snd_hda_codec_write(codec, 0x23, 0, AC_VERB_SET_AMP_GAIN_MUTE,
8165 0x7000 | (0x01 << 8) | (present ? 0x80 : 0));
8166}
8167
8168static void alc883_M90V_speaker_automute(struct hda_codec *codec)
8169{
8170 unsigned int present;
8171 unsigned char bits;
8172
8173 present = snd_hda_codec_read(codec, 0x1b, 0,
8174 AC_VERB_GET_PIN_SENSE, 0)
8175 & AC_PINSENSE_PRESENCE;
8176 bits = present ? 0 : PIN_OUT;
8177 snd_hda_codec_write(codec, 0x14, 0, AC_VERB_SET_PIN_WIDGET_CONTROL,
8178 bits);
8179 snd_hda_codec_write(codec, 0x15, 0, AC_VERB_SET_PIN_WIDGET_CONTROL,
8180 bits);
8181 snd_hda_codec_write(codec, 0x16, 0, AC_VERB_SET_PIN_WIDGET_CONTROL,
8182 bits);
8183}
8184
8185static void alc883_mode2_unsol_event(struct hda_codec *codec,
8186 unsigned int res)
8187{
8188 switch (res >> 26) {
8189 case ALC880_HP_EVENT:
8190 alc883_M90V_speaker_automute(codec);
8191 break;
8192 case ALC880_MIC_EVENT:
8193 alc883_nb_mic_automute(codec);
8194 break;
8195 }
8196}
8197
8198static void alc883_mode2_inithook(struct hda_codec *codec)
8199{
8200 alc883_M90V_speaker_automute(codec);
8201 alc883_nb_mic_automute(codec);
8202}
8203
8204static struct hda_verb alc888_asus_eee1601_verbs[] = {
8205 {0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP},
8206 {0x1b, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
8207 {0x22, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
8208 {0x23, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
8209 {0x23, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(1)},
8210 {0x20, AC_VERB_SET_COEF_INDEX, 0x0b},
8211 {0x20, AC_VERB_SET_PROC_COEF, 0x0838},
8212 /* enable unsolicited event */
8213 {0x14, AC_VERB_SET_UNSOLICITED_ENABLE, ALC880_HP_EVENT | AC_USRSP_EN},
8214 { } /* end */
8215};
8216
8217static void alc883_eee1601_speaker_automute(struct hda_codec *codec)
8218{
8219 unsigned int present;
8220 unsigned char bits;
8221
8222 present = snd_hda_codec_read(codec, 0x14, 0,
8223 AC_VERB_GET_PIN_SENSE, 0)
8224 & AC_PINSENSE_PRESENCE;
8225 bits = present ? 0 : PIN_OUT;
8226 snd_hda_codec_write(codec, 0x1b, 0, AC_VERB_SET_PIN_WIDGET_CONTROL,
8227 bits);
8228}
8229
8230static void alc883_eee1601_unsol_event(struct hda_codec *codec,
8231 unsigned int res)
8232{
8233 switch (res >> 26) {
8234 case ALC880_HP_EVENT:
8235 alc883_eee1601_speaker_automute(codec);
8236 break;
8237 }
8238}
8239
8240static void alc883_eee1601_inithook(struct hda_codec *codec)
8241{
8242 alc883_eee1601_speaker_automute(codec);
8243}
8244
7991#ifdef CONFIG_SND_HDA_POWER_SAVE 8245#ifdef CONFIG_SND_HDA_POWER_SAVE
7992#define alc883_loopbacks alc880_loopbacks 8246#define alc883_loopbacks alc880_loopbacks
7993#endif 8247#endif
@@ -8017,6 +8271,7 @@ static const char *alc883_models[ALC883_MODEL_LAST] = {
8017 [ALC883_LENOVO_101E_2ch] = "lenovo-101e", 8271 [ALC883_LENOVO_101E_2ch] = "lenovo-101e",
8018 [ALC883_LENOVO_NB0763] = "lenovo-nb0763", 8272 [ALC883_LENOVO_NB0763] = "lenovo-nb0763",
8019 [ALC888_LENOVO_MS7195_DIG] = "lenovo-ms7195-dig", 8273 [ALC888_LENOVO_MS7195_DIG] = "lenovo-ms7195-dig",
8274 [ALC888_LENOVO_SKY] = "lenovo-sky",
8020 [ALC883_HAIER_W66] = "haier-w66", 8275 [ALC883_HAIER_W66] = "haier-w66",
8021 [ALC888_3ST_HP] = "3stack-hp", 8276 [ALC888_3ST_HP] = "3stack-hp",
8022 [ALC888_6ST_DELL] = "6stack-dell", 8277 [ALC888_6ST_DELL] = "6stack-dell",
@@ -8040,10 +8295,13 @@ static struct snd_pci_quirk alc883_cfg_tbl[] = {
8040 SND_PCI_QUIRK(0x103c, 0x2a60, "HP Lucknow", ALC888_3ST_HP), 8295 SND_PCI_QUIRK(0x103c, 0x2a60, "HP Lucknow", ALC888_3ST_HP),
8041 SND_PCI_QUIRK(0x103c, 0x2a61, "HP Nettle", ALC883_6ST_DIG), 8296 SND_PCI_QUIRK(0x103c, 0x2a61, "HP Nettle", ALC883_6ST_DIG),
8042 SND_PCI_QUIRK(0x1043, 0x8249, "Asus M2A-VM HDMI", ALC883_3ST_6ch_DIG), 8297 SND_PCI_QUIRK(0x1043, 0x8249, "Asus M2A-VM HDMI", ALC883_3ST_6ch_DIG),
8298 SND_PCI_QUIRK(0x1043, 0x8317, "Asus M90V", ALC888_ASUS_M90V),
8299 SND_PCI_QUIRK(0x1043, 0x835f, "Asus Eee 1601", ALC888_ASUS_EEE1601),
8043 SND_PCI_QUIRK(0x105b, 0x0ce8, "Foxconn P35AX-S", ALC883_6ST_DIG), 8300 SND_PCI_QUIRK(0x105b, 0x0ce8, "Foxconn P35AX-S", ALC883_6ST_DIG),
8044 SND_PCI_QUIRK(0x105b, 0x6668, "Foxconn", ALC883_6ST_DIG), 8301 SND_PCI_QUIRK(0x105b, 0x6668, "Foxconn", ALC883_6ST_DIG),
8045 SND_PCI_QUIRK(0x1071, 0x8253, "Mitac 8252d", ALC883_MITAC), 8302 SND_PCI_QUIRK(0x1071, 0x8253, "Mitac 8252d", ALC883_MITAC),
8046 SND_PCI_QUIRK(0x1071, 0x8258, "Evesham Voyaeger", ALC883_LAPTOP_EAPD), 8303 SND_PCI_QUIRK(0x1071, 0x8258, "Evesham Voyaeger", ALC883_LAPTOP_EAPD),
8304 SND_PCI_QUIRK(0x10f1, 0x2350, "TYAN-S2350", ALC888_6ST_DELL),
8047 SND_PCI_QUIRK(0x108e, 0x534d, NULL, ALC883_3ST_6ch), 8305 SND_PCI_QUIRK(0x108e, 0x534d, NULL, ALC883_3ST_6ch),
8048 SND_PCI_QUIRK(0x1458, 0xa002, "MSI", ALC883_6ST_DIG), 8306 SND_PCI_QUIRK(0x1458, 0xa002, "MSI", ALC883_6ST_DIG),
8049 SND_PCI_QUIRK(0x1462, 0x0349, "MSI", ALC883_TARGA_2ch_DIG), 8307 SND_PCI_QUIRK(0x1462, 0x0349, "MSI", ALC883_TARGA_2ch_DIG),
@@ -8079,6 +8337,7 @@ static struct snd_pci_quirk alc883_cfg_tbl[] = {
8079 SND_PCI_QUIRK(0x17aa, 0x2085, "Lenovo NB0763", ALC883_LENOVO_NB0763), 8337 SND_PCI_QUIRK(0x17aa, 0x2085, "Lenovo NB0763", ALC883_LENOVO_NB0763),
8080 SND_PCI_QUIRK(0x17aa, 0x3bfc, "Lenovo NB0763", ALC883_LENOVO_NB0763), 8338 SND_PCI_QUIRK(0x17aa, 0x3bfc, "Lenovo NB0763", ALC883_LENOVO_NB0763),
8081 SND_PCI_QUIRK(0x17aa, 0x3bfd, "Lenovo NB0763", ALC883_LENOVO_NB0763), 8339 SND_PCI_QUIRK(0x17aa, 0x3bfd, "Lenovo NB0763", ALC883_LENOVO_NB0763),
8340 SND_PCI_QUIRK(0x17aa, 0x101d, "Lenovo Sky", ALC888_LENOVO_SKY),
8082 SND_PCI_QUIRK(0x17c0, 0x4071, "MEDION MD2", ALC883_MEDION_MD2), 8341 SND_PCI_QUIRK(0x17c0, 0x4071, "MEDION MD2", ALC883_MEDION_MD2),
8083 SND_PCI_QUIRK(0x17f2, 0x5000, "Albatron KI690-AM2", ALC883_6ST_DIG), 8342 SND_PCI_QUIRK(0x17f2, 0x5000, "Albatron KI690-AM2", ALC883_6ST_DIG),
8084 SND_PCI_QUIRK(0x1991, 0x5625, "Haier W66", ALC883_HAIER_W66), 8343 SND_PCI_QUIRK(0x1991, 0x5625, "Haier W66", ALC883_HAIER_W66),
@@ -8335,6 +8594,49 @@ static struct alc_config_preset alc883_presets[] = {
8335 .unsol_event = alc883_2ch_fujitsu_pi2515_unsol_event, 8594 .unsol_event = alc883_2ch_fujitsu_pi2515_unsol_event,
8336 .init_hook = alc883_2ch_fujitsu_pi2515_automute, 8595 .init_hook = alc883_2ch_fujitsu_pi2515_automute,
8337 }, 8596 },
8597 [ALC888_LENOVO_SKY] = {
8598 .mixers = { alc888_lenovo_sky_mixer, alc883_chmode_mixer },
8599 .init_verbs = { alc883_init_verbs, alc888_lenovo_sky_verbs},
8600 .num_dacs = ARRAY_SIZE(alc883_dac_nids),
8601 .dac_nids = alc883_dac_nids,
8602 .dig_out_nid = ALC883_DIGOUT_NID,
8603 .num_adc_nids = ARRAY_SIZE(alc883_adc_nids),
8604 .adc_nids = alc883_adc_nids,
8605 .num_channel_mode = ARRAY_SIZE(alc883_sixstack_modes),
8606 .channel_mode = alc883_sixstack_modes,
8607 .need_dac_fix = 1,
8608 .input_mux = &alc883_lenovo_sky_capture_source,
8609 .unsol_event = alc883_lenovo_sky_unsol_event,
8610 .init_hook = alc888_lenovo_sky_front_automute,
8611 },
8612 [ALC888_ASUS_M90V] = {
8613 .mixers = { alc883_3ST_6ch_mixer, alc883_chmode_mixer },
8614 .init_verbs = { alc883_init_verbs, alc888_asus_m90v_verbs },
8615 .num_dacs = ARRAY_SIZE(alc883_dac_nids),
8616 .dac_nids = alc883_dac_nids,
8617 .dig_out_nid = ALC883_DIGOUT_NID,
8618 .dig_in_nid = ALC883_DIGIN_NID,
8619 .num_channel_mode = ARRAY_SIZE(alc883_3ST_6ch_modes),
8620 .channel_mode = alc883_3ST_6ch_modes,
8621 .need_dac_fix = 1,
8622 .input_mux = &alc883_fujitsu_pi2515_capture_source,
8623 .unsol_event = alc883_mode2_unsol_event,
8624 .init_hook = alc883_mode2_inithook,
8625 },
8626 [ALC888_ASUS_EEE1601] = {
8627 .mixers = { alc883_asus_eee1601_mixer },
8628 .init_verbs = { alc883_init_verbs, alc888_asus_eee1601_verbs },
8629 .num_dacs = ARRAY_SIZE(alc883_dac_nids),
8630 .dac_nids = alc883_dac_nids,
8631 .dig_out_nid = ALC883_DIGOUT_NID,
8632 .dig_in_nid = ALC883_DIGIN_NID,
8633 .num_channel_mode = ARRAY_SIZE(alc883_3ST_2ch_modes),
8634 .channel_mode = alc883_3ST_2ch_modes,
8635 .need_dac_fix = 1,
8636 .input_mux = &alc883_asus_eee1601_capture_source,
8637 .unsol_event = alc883_eee1601_unsol_event,
8638 .init_hook = alc883_eee1601_inithook,
8639 },
8338}; 8640};
8339 8641
8340 8642