aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sound/pci/hda/patch_realtek.c532
1 files changed, 515 insertions, 17 deletions
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index a4ede27af021..34ac63469532 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -93,6 +93,7 @@ enum {
93 ALC262_HP_BPC_D7000_WL, 93 ALC262_HP_BPC_D7000_WL,
94 ALC262_HP_BPC_D7000_WF, 94 ALC262_HP_BPC_D7000_WF,
95 ALC262_BENQ_ED8, 95 ALC262_BENQ_ED8,
96 ALC262_SONY_ASSAMD,
96 ALC262_AUTO, 97 ALC262_AUTO,
97 ALC262_MODEL_LAST /* last tag */ 98 ALC262_MODEL_LAST /* last tag */
98}; 99};
@@ -118,6 +119,7 @@ enum {
118 ALC861VD_3ST_DIG, 119 ALC861VD_3ST_DIG,
119 ALC861VD_6ST_DIG, 120 ALC861VD_6ST_DIG,
120 ALC861VD_LENOVO, 121 ALC861VD_LENOVO,
122 ALC861VD_DALLAS,
121 ALC861VD_AUTO, 123 ALC861VD_AUTO,
122 ALC861VD_MODEL_LAST, 124 ALC861VD_MODEL_LAST,
123}; 125};
@@ -139,8 +141,10 @@ enum {
139 ALC882_6ST_DIG, 141 ALC882_6ST_DIG,
140 ALC882_ARIMA, 142 ALC882_ARIMA,
141 ALC882_W2JC, 143 ALC882_W2JC,
142 ALC882_AUTO, 144 ALC882_TARGA,
145 ALC882_ASUS_A7J,
143 ALC885_MACPRO, 146 ALC885_MACPRO,
147 ALC882_AUTO,
144 ALC882_MODEL_LAST, 148 ALC882_MODEL_LAST,
145}; 149};
146 150
@@ -152,11 +156,13 @@ enum {
152 ALC883_6ST_DIG, 156 ALC883_6ST_DIG,
153 ALC883_TARGA_DIG, 157 ALC883_TARGA_DIG,
154 ALC883_TARGA_2ch_DIG, 158 ALC883_TARGA_2ch_DIG,
155 ALC888_DEMO_BOARD,
156 ALC883_ACER, 159 ALC883_ACER,
157 ALC883_MEDION, 160 ALC883_MEDION,
161 ALC883_MEDION_MD2,
158 ALC883_LAPTOP_EAPD, 162 ALC883_LAPTOP_EAPD,
159 ALC883_LENOVO_101E_2ch, 163 ALC883_LENOVO_101E_2ch,
164 ALC883_LENOVO_NB0763,
165 ALC888_LENOVO_MS7195_DIG,
160 ALC883_AUTO, 166 ALC883_AUTO,
161 ALC883_MODEL_LAST, 167 ALC883_MODEL_LAST,
162}; 168};
@@ -4753,6 +4759,35 @@ static int alc882_mux_enum_put(struct snd_kcontrol *kcontrol,
4753} 4759}
4754 4760
4755/* 4761/*
4762 * 2ch mode
4763 */
4764static struct hda_verb alc882_3ST_ch2_init[] = {
4765 { 0x18, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80 },
4766 { 0x18, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE },
4767 { 0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN },
4768 { 0x1a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE },
4769 { } /* end */
4770};
4771
4772/*
4773 * 6ch mode
4774 */
4775static struct hda_verb alc882_3ST_ch6_init[] = {
4776 { 0x18, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT },
4777 { 0x18, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE },
4778 { 0x18, AC_VERB_SET_CONNECT_SEL, 0x02 },
4779 { 0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT },
4780 { 0x1a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE },
4781 { 0x1a, AC_VERB_SET_CONNECT_SEL, 0x01 },
4782 { } /* end */
4783};
4784
4785static struct hda_channel_mode alc882_3ST_6ch_modes[2] = {
4786 { 2, alc882_3ST_ch2_init },
4787 { 6, alc882_3ST_ch6_init },
4788};
4789
4790/*
4756 * 6ch mode 4791 * 6ch mode
4757 */ 4792 */
4758static struct hda_verb alc882_sixstack_ch6_init[] = { 4793static struct hda_verb alc882_sixstack_ch6_init[] = {
@@ -4824,6 +4859,40 @@ static struct snd_kcontrol_new alc882_w2jc_mixer[] = {
4824 { } /* end */ 4859 { } /* end */
4825}; 4860};
4826 4861
4862static struct snd_kcontrol_new alc882_targa_mixer[] = {
4863 HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT),
4864 HDA_BIND_MUTE("Front Playback Switch", 0x0c, 2, HDA_INPUT),
4865 HDA_CODEC_MUTE("Headphone Playback Switch", 0x1b, 0x0, HDA_OUTPUT),
4866 HDA_CODEC_VOLUME("CD Playback Volume", 0x0b, 0x04, HDA_INPUT),
4867 HDA_CODEC_MUTE("CD Playback Switch", 0x0b, 0x04, HDA_INPUT),
4868 HDA_CODEC_VOLUME("Line Playback Volume", 0x0b, 0x02, HDA_INPUT),
4869 HDA_CODEC_MUTE("Line Playback Switch", 0x0b, 0x02, HDA_INPUT),
4870 HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT),
4871 HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT),
4872 HDA_CODEC_VOLUME("Front Mic Playback Volume", 0x0b, 0x1, HDA_INPUT),
4873 HDA_CODEC_MUTE("Front Mic Playback Switch", 0x0b, 0x1, HDA_INPUT),
4874 { } /* end */
4875};
4876
4877/* Pin assignment: Front=0x14, HP = 0x15, Front = 0x16, ???
4878 * Front Mic=0x18, Line In = 0x1a, Line In = 0x1b, CD = 0x1c
4879 */
4880static struct snd_kcontrol_new alc882_asus_a7j_mixer[] = {
4881 HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT),
4882 HDA_CODEC_MUTE("Front Playback Switch", 0x14, 0x0, HDA_OUTPUT),
4883 HDA_CODEC_MUTE("Headphone Playback Switch", 0x15, 0x0, HDA_OUTPUT),
4884 HDA_CODEC_MUTE("Mobile Front Playback Switch", 0x16, 0x0, HDA_OUTPUT),
4885 HDA_CODEC_VOLUME("CD Playback Volume", 0x0b, 0x04, HDA_INPUT),
4886 HDA_CODEC_MUTE("CD Playback Switch", 0x0b, 0x04, HDA_INPUT),
4887 HDA_CODEC_VOLUME("Line Playback Volume", 0x0b, 0x02, HDA_INPUT),
4888 HDA_CODEC_MUTE("Line Playback Switch", 0x0b, 0x02, HDA_INPUT),
4889 HDA_CODEC_VOLUME("Mobile Line Playback Volume", 0x0b, 0x03, HDA_INPUT),
4890 HDA_CODEC_MUTE("Mobile Line Playback Switch", 0x0b, 0x03, HDA_INPUT),
4891 HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT),
4892 HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT),
4893 { } /* end */
4894};
4895
4827static struct snd_kcontrol_new alc882_chmode_mixer[] = { 4896static struct snd_kcontrol_new alc882_chmode_mixer[] = {
4828 { 4897 {
4829 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 4898 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
@@ -4985,6 +5054,66 @@ static struct hda_verb alc882_macpro_init_verbs[] = {
4985 { } 5054 { }
4986}; 5055};
4987 5056
5057static struct hda_verb alc882_targa_verbs[] = {
5058 {0x0c, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
5059 {0x0c, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)},
5060
5061 {0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP},
5062 {0x1b, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
5063
5064 {0x18, AC_VERB_SET_CONNECT_SEL, 0x02}, /* mic/clfe */
5065 {0x1a, AC_VERB_SET_CONNECT_SEL, 0x01}, /* line/surround */
5066 {0x1b, AC_VERB_SET_CONNECT_SEL, 0x00}, /* HP */
5067
5068 {0x14, AC_VERB_SET_UNSOLICITED_ENABLE, ALC880_HP_EVENT | AC_USRSP_EN},
5069 {0x01, AC_VERB_SET_GPIO_MASK, 0x03},
5070 {0x01, AC_VERB_SET_GPIO_DIRECTION, 0x03},
5071 {0x01, AC_VERB_SET_GPIO_DATA, 0x03},
5072 { } /* end */
5073};
5074
5075/* toggle speaker-output according to the hp-jack state */
5076static void alc882_targa_automute(struct hda_codec *codec)
5077{
5078 unsigned int present;
5079
5080 present = snd_hda_codec_read(codec, 0x14, 0,
5081 AC_VERB_GET_PIN_SENSE, 0) & 0x80000000;
5082 snd_hda_codec_amp_update(codec, 0x1b, 0, HDA_OUTPUT, 0,
5083 0x80, present ? 0x80 : 0);
5084 snd_hda_codec_amp_update(codec, 0x1b, 1, HDA_OUTPUT, 0,
5085 0x80, present ? 0x80 : 0);
5086 snd_hda_codec_write(codec, 1, 0, AC_VERB_SET_GPIO_DATA, present ? 1 : 3);
5087}
5088
5089static void alc882_targa_unsol_event(struct hda_codec *codec, unsigned int res)
5090{
5091 /* Looks like the unsol event is incompatible with the standard
5092 * definition. 4bit tag is placed at 26 bit!
5093 */
5094 if (((res >> 26) == ALC880_HP_EVENT)) {
5095 alc882_targa_automute(codec);
5096 }
5097}
5098
5099static struct hda_verb alc882_asus_a7j_verbs[] = {
5100 {0x0c, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
5101 {0x0c, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)},
5102
5103 {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP},
5104 {0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
5105 {0x16, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
5106
5107 {0x14, AC_VERB_SET_CONNECT_SEL, 0x00}, /* Front */
5108 {0x15, AC_VERB_SET_CONNECT_SEL, 0x00}, /* HP */
5109 {0x16, AC_VERB_SET_CONNECT_SEL, 0x00}, /* Front */
5110
5111 {0x18, AC_VERB_SET_CONNECT_SEL, 0x02}, /* mic/clfe */
5112 {0x1a, AC_VERB_SET_CONNECT_SEL, 0x01}, /* line/surround */
5113 {0x1b, AC_VERB_SET_CONNECT_SEL, 0x00}, /* HP */
5114 { } /* end */
5115};
5116
4988static void alc882_gpio_mute(struct hda_codec *codec, int pin, int muted) 5117static void alc882_gpio_mute(struct hda_codec *codec, int pin, int muted)
4989{ 5118{
4990 unsigned int gpiostate, gpiomask, gpiodir; 5119 unsigned int gpiostate, gpiomask, gpiodir;
@@ -5152,7 +5281,9 @@ static struct snd_pci_quirk alc882_cfg_tbl[] = {
5152 SND_PCI_QUIRK(0x1019, 0x6668, "ECS", ALC882_6ST_DIG), 5281 SND_PCI_QUIRK(0x1019, 0x6668, "ECS", ALC882_6ST_DIG),
5153 SND_PCI_QUIRK(0x105b, 0x6668, "Foxconn", ALC882_6ST_DIG), 5282 SND_PCI_QUIRK(0x105b, 0x6668, "Foxconn", ALC882_6ST_DIG),
5154 SND_PCI_QUIRK(0x1462, 0x6668, "MSI", ALC882_6ST_DIG), 5283 SND_PCI_QUIRK(0x1462, 0x6668, "MSI", ALC882_6ST_DIG),
5284 SND_PCI_QUIRK(0x1462, 0x28fb, "Targa T8", ALC882_TARGA), /* MSI-1049 T8 */
5155 SND_PCI_QUIRK(0x161f, 0x2054, "Arima W820", ALC882_ARIMA), 5285 SND_PCI_QUIRK(0x161f, 0x2054, "Arima W820", ALC882_ARIMA),
5286 SND_PCI_QUIRK(0x1043, 0x060d, "Asus A7J", ALC882_ASUS_A7J),
5156 SND_PCI_QUIRK(0x1043, 0x81d8, "Asus P5WD", ALC882_6ST_DIG), 5287 SND_PCI_QUIRK(0x1043, 0x81d8, "Asus P5WD", ALC882_6ST_DIG),
5157 SND_PCI_QUIRK(0x1043, 0x1971, "Asus W2JC", ALC882_W2JC), 5288 SND_PCI_QUIRK(0x1043, 0x1971, "Asus W2JC", ALC882_W2JC),
5158 {} 5289 {}
@@ -5214,6 +5345,36 @@ static struct alc_config_preset alc882_presets[] = {
5214 .channel_mode = alc882_ch_modes, 5345 .channel_mode = alc882_ch_modes,
5215 .input_mux = &alc882_capture_source, 5346 .input_mux = &alc882_capture_source,
5216 }, 5347 },
5348 [ALC882_TARGA] = {
5349 .mixers = { alc882_targa_mixer, alc882_chmode_mixer,
5350 alc882_capture_mixer },
5351 .init_verbs = { alc882_init_verbs, alc882_targa_verbs},
5352 .num_dacs = ARRAY_SIZE(alc882_dac_nids),
5353 .dac_nids = alc882_dac_nids,
5354 .dig_out_nid = ALC882_DIGOUT_NID,
5355 .num_adc_nids = ARRAY_SIZE(alc882_adc_nids),
5356 .adc_nids = alc882_adc_nids,
5357 .num_channel_mode = ARRAY_SIZE(alc882_3ST_6ch_modes),
5358 .channel_mode = alc882_3ST_6ch_modes,
5359 .need_dac_fix = 1,
5360 .input_mux = &alc882_capture_source,
5361 .unsol_event = alc882_targa_unsol_event,
5362 .init_hook = alc882_targa_automute,
5363 },
5364 [ALC882_ASUS_A7J] = {
5365 .mixers = { alc882_asus_a7j_mixer, alc882_chmode_mixer,
5366 alc882_capture_mixer },
5367 .init_verbs = { alc882_init_verbs, alc882_asus_a7j_verbs},
5368 .num_dacs = ARRAY_SIZE(alc882_dac_nids),
5369 .dac_nids = alc882_dac_nids,
5370 .dig_out_nid = ALC882_DIGOUT_NID,
5371 .num_adc_nids = ARRAY_SIZE(alc882_adc_nids),
5372 .adc_nids = alc882_adc_nids,
5373 .num_channel_mode = ARRAY_SIZE(alc882_3ST_6ch_modes),
5374 .channel_mode = alc882_3ST_6ch_modes,
5375 .need_dac_fix = 1,
5376 .input_mux = &alc882_capture_source,
5377 },
5217}; 5378};
5218 5379
5219 5380
@@ -5441,6 +5602,16 @@ static struct hda_input_mux alc883_lenovo_101e_capture_source = {
5441 }, 5602 },
5442}; 5603};
5443 5604
5605static struct hda_input_mux alc883_lenovo_nb0763_capture_source = {
5606 .num_items = 4,
5607 .items = {
5608 { "Mic", 0x0 },
5609 { "iMic", 0x1 },
5610 { "Line", 0x2 },
5611 { "CD", 0x4 },
5612 },
5613};
5614
5444#define alc883_mux_enum_info alc_mux_enum_info 5615#define alc883_mux_enum_info alc_mux_enum_info
5445#define alc883_mux_enum_get alc_mux_enum_get 5616#define alc883_mux_enum_get alc_mux_enum_get
5446 5617
@@ -5772,6 +5943,58 @@ static struct snd_kcontrol_new alc883_lenovo_101e_2ch_mixer[] = {
5772 { } /* end */ 5943 { } /* end */
5773}; 5944};
5774 5945
5946static struct snd_kcontrol_new alc883_lenovo_nb0763_mixer[] = {
5947 HDA_CODEC_VOLUME("Speaker Playback Volume", 0x0c, 0x0, HDA_OUTPUT),
5948 HDA_BIND_MUTE("Speaker Playback Switch", 0x0c, 2, HDA_INPUT),
5949 HDA_CODEC_MUTE("Headphone Playback Switch", 0x14, 0x0, HDA_OUTPUT),
5950 HDA_CODEC_VOLUME("CD Playback Volume", 0x0b, 0x04, HDA_INPUT),
5951 HDA_CODEC_MUTE("CD Playback Switch", 0x0b, 0x04, HDA_INPUT),
5952 HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT),
5953 HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT),
5954 HDA_CODEC_VOLUME("iMic Playback Volume", 0x0b, 0x1, HDA_INPUT),
5955 HDA_CODEC_MUTE("iMic Playback Switch", 0x0b, 0x1, HDA_INPUT),
5956 HDA_CODEC_VOLUME("Capture Volume", 0x08, 0x0, HDA_INPUT),
5957 HDA_CODEC_MUTE("Capture Switch", 0x08, 0x0, HDA_INPUT),
5958 HDA_CODEC_VOLUME_IDX("Capture Volume", 1, 0x09, 0x0, HDA_INPUT),
5959 HDA_CODEC_MUTE_IDX("Capture Switch", 1, 0x09, 0x0, HDA_INPUT),
5960 {
5961 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
5962 /* .name = "Capture Source", */
5963 .name = "Input Source",
5964 .count = 2,
5965 .info = alc883_mux_enum_info,
5966 .get = alc883_mux_enum_get,
5967 .put = alc883_mux_enum_put,
5968 },
5969 { } /* end */
5970};
5971
5972static struct snd_kcontrol_new alc883_medion_md2_mixer[] = {
5973 HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT),
5974 HDA_CODEC_MUTE("Headphone Playback Switch", 0x14, 0x0, HDA_OUTPUT),
5975 HDA_CODEC_MUTE("Front Playback Switch", 0x15, 0x0, HDA_OUTPUT),
5976 HDA_CODEC_VOLUME("CD Playback Volume", 0x0b, 0x04, HDA_INPUT),
5977 HDA_CODEC_MUTE("CD Playback Switch", 0x0b, 0x04, HDA_INPUT),
5978 HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT),
5979 HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT),
5980 HDA_CODEC_VOLUME("Line Playback Volume", 0x0b, 0x02, HDA_INPUT),
5981 HDA_CODEC_MUTE("Line Playback Switch", 0x0b, 0x02, HDA_INPUT),
5982 HDA_CODEC_VOLUME("Capture Volume", 0x08, 0x0, HDA_INPUT),
5983 HDA_CODEC_MUTE("Capture Switch", 0x08, 0x0, HDA_INPUT),
5984 HDA_CODEC_VOLUME_IDX("Capture Volume", 1, 0x09, 0x0, HDA_INPUT),
5985 HDA_CODEC_MUTE_IDX("Capture Switch", 1, 0x09, 0x0, HDA_INPUT),
5986 {
5987 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
5988 /* .name = "Capture Source", */
5989 .name = "Input Source",
5990 .count = 2,
5991 .info = alc883_mux_enum_info,
5992 .get = alc883_mux_enum_get,
5993 .put = alc883_mux_enum_put,
5994 },
5995 { } /* end */
5996};
5997
5775static struct snd_kcontrol_new alc883_chmode_mixer[] = { 5998static struct snd_kcontrol_new alc883_chmode_mixer[] = {
5776 { 5999 {
5777 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 6000 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
@@ -5886,6 +6109,93 @@ static struct hda_verb alc883_lenovo_101e_verbs[] = {
5886 { } /* end */ 6109 { } /* end */
5887}; 6110};
5888 6111
6112static struct hda_verb alc883_lenovo_nb0763_verbs[] = {
6113 {0x15, AC_VERB_SET_CONNECT_SEL, 0x00},
6114 {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP},
6115 {0x14, AC_VERB_SET_UNSOLICITED_ENABLE, ALC880_HP_EVENT | AC_USRSP_EN},
6116 {0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP},
6117 { } /* end */
6118};
6119
6120static struct hda_verb alc888_lenovo_ms7195_verbs[] = {
6121 {0x0c, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
6122 {0x0c, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)},
6123 {0x15, AC_VERB_SET_CONNECT_SEL, 0x00},
6124 {0x14, AC_VERB_SET_UNSOLICITED_ENABLE, ALC880_FRONT_EVENT | AC_USRSP_EN},
6125 {0x1b, AC_VERB_SET_UNSOLICITED_ENABLE, ALC880_HP_EVENT | AC_USRSP_EN},
6126 { } /* end */
6127};
6128
6129/* toggle front-jack and RCA according to the hp-jack state */
6130static void alc888_lenovo_ms7195_front_automute(struct hda_codec *codec)
6131{
6132 unsigned int present;
6133
6134 present = snd_hda_codec_read(codec, 0x1b, 0,
6135 AC_VERB_GET_PIN_SENSE, 0) & 0x80000000;
6136 snd_hda_codec_amp_update(codec, 0x14, 0, HDA_OUTPUT, 0,
6137 0x80, present ? 0x80 : 0);
6138 snd_hda_codec_amp_update(codec, 0x14, 1, HDA_OUTPUT, 0,
6139 0x80, present ? 0x80 : 0);
6140 snd_hda_codec_amp_update(codec, 0x15, 0, HDA_OUTPUT, 0,
6141 0x80, present ? 0x80 : 0);
6142 snd_hda_codec_amp_update(codec, 0x15, 1, HDA_OUTPUT, 0,
6143 0x80, present ? 0x80 : 0);
6144
6145}
6146
6147/* toggle RCA according to the front-jack state */
6148static void alc888_lenovo_ms7195_rca_automute(struct hda_codec *codec)
6149{
6150 unsigned int present;
6151
6152 present = snd_hda_codec_read(codec, 0x14, 0,
6153 AC_VERB_GET_PIN_SENSE, 0) & 0x80000000;
6154 snd_hda_codec_amp_update(codec, 0x15, 0, HDA_OUTPUT, 0,
6155 0x80, present ? 0x80 : 0);
6156 snd_hda_codec_amp_update(codec, 0x15, 1, HDA_OUTPUT, 0,
6157 0x80, present ? 0x80 : 0);
6158
6159}
6160static void alc883_lenovo_ms7195_unsol_event(struct hda_codec *codec,
6161 unsigned int res)
6162{
6163 if ((res >> 26) == ALC880_HP_EVENT)
6164 alc888_lenovo_ms7195_front_automute(codec);
6165 if ((res >> 26) == ALC880_FRONT_EVENT)
6166 alc888_lenovo_ms7195_rca_automute(codec);
6167}
6168
6169static struct hda_verb alc883_medion_md2_verbs[] = {
6170 {0x0c, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
6171 {0x0c, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)},
6172
6173 {0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP},
6174
6175 {0x14, AC_VERB_SET_UNSOLICITED_ENABLE, ALC880_HP_EVENT | AC_USRSP_EN},
6176 { } /* end */
6177};
6178
6179/* toggle speaker-output according to the hp-jack state */
6180static void alc883_medion_md2_automute(struct hda_codec *codec)
6181{
6182 unsigned int present;
6183
6184 present = snd_hda_codec_read(codec, 0x14, 0,
6185 AC_VERB_GET_PIN_SENSE, 0) & 0x80000000;
6186 snd_hda_codec_amp_update(codec, 0x15, 0, HDA_OUTPUT, 0,
6187 0x80, present ? 0x80 : 0);
6188 snd_hda_codec_amp_update(codec, 0x15, 1, HDA_OUTPUT, 0,
6189 0x80, present ? 0x80 : 0);
6190}
6191
6192static void alc883_medion_md2_unsol_event(struct hda_codec *codec,
6193 unsigned int res)
6194{
6195 if ((res >> 26) == ALC880_HP_EVENT)
6196 alc883_medion_md2_automute(codec);
6197}
6198
5889/* toggle speaker-output according to the hp-jack state */ 6199/* toggle speaker-output according to the hp-jack state */
5890static void alc883_tagra_automute(struct hda_codec *codec) 6200static void alc883_tagra_automute(struct hda_codec *codec)
5891{ 6201{
@@ -6051,11 +6361,13 @@ static const char *alc883_models[ALC883_MODEL_LAST] = {
6051 [ALC883_6ST_DIG] = "6stack-dig", 6361 [ALC883_6ST_DIG] = "6stack-dig",
6052 [ALC883_TARGA_DIG] = "targa-dig", 6362 [ALC883_TARGA_DIG] = "targa-dig",
6053 [ALC883_TARGA_2ch_DIG] = "targa-2ch-dig", 6363 [ALC883_TARGA_2ch_DIG] = "targa-2ch-dig",
6054 [ALC888_DEMO_BOARD] = "6stack-dig-demo",
6055 [ALC883_ACER] = "acer", 6364 [ALC883_ACER] = "acer",
6056 [ALC883_MEDION] = "medion", 6365 [ALC883_MEDION] = "medion",
6366 [ALC883_MEDION_MD2] = "medion-md2",
6057 [ALC883_LAPTOP_EAPD] = "laptop-eapd", 6367 [ALC883_LAPTOP_EAPD] = "laptop-eapd",
6058 [ALC883_LENOVO_101E_2ch] = "lenovo-101e", 6368 [ALC883_LENOVO_101E_2ch] = "lenovo-101e",
6369 [ALC883_LENOVO_NB0763] = "lenovo-nb0763",
6370 [ALC888_LENOVO_MS7195_DIG] = "lenovo-ms7195-dig",
6059 [ALC883_AUTO] = "auto", 6371 [ALC883_AUTO] = "auto",
6060}; 6372};
6061 6373
@@ -6082,7 +6394,10 @@ static struct snd_pci_quirk alc883_cfg_tbl[] = {
6082 SND_PCI_QUIRK(0x161f, 0x2054, "Medion laptop", ALC883_MEDION), 6394 SND_PCI_QUIRK(0x161f, 0x2054, "Medion laptop", ALC883_MEDION),
6083 SND_PCI_QUIRK(0x1071, 0x8258, "Evesham Voyaeger", ALC883_LAPTOP_EAPD), 6395 SND_PCI_QUIRK(0x1071, 0x8258, "Evesham Voyaeger", ALC883_LAPTOP_EAPD),
6084 SND_PCI_QUIRK(0x8086, 0xd601, "D102GGC", ALC883_3ST_6ch), 6396 SND_PCI_QUIRK(0x8086, 0xd601, "D102GGC", ALC883_3ST_6ch),
6085 SND_PCI_QUIRK(0x17aa, 0x101e, "lenovo 101e", ALC883_LENOVO_101E_2ch), 6397 SND_PCI_QUIRK(0x17aa, 0x101e, "Lenovo 101e", ALC883_LENOVO_101E_2ch),
6398 SND_PCI_QUIRK(0x17aa, 0x3bfd, "Lenovo NB0763", ALC883_LENOVO_NB0763),
6399 SND_PCI_QUIRK(0x17aa, 0x2085, "Lenovo NB0763", ALC883_LENOVO_NB0763),
6400 SND_PCI_QUIRK(0x17c0, 0x4071, "MEDION MD2", ALC883_MEDION_MD2),
6086 {} 6401 {}
6087}; 6402};
6088 6403
@@ -6168,19 +6483,6 @@ static struct alc_config_preset alc883_presets[] = {
6168 .unsol_event = alc883_tagra_unsol_event, 6483 .unsol_event = alc883_tagra_unsol_event,
6169 .init_hook = alc883_tagra_automute, 6484 .init_hook = alc883_tagra_automute,
6170 }, 6485 },
6171 [ALC888_DEMO_BOARD] = {
6172 .mixers = { alc883_base_mixer, alc883_chmode_mixer },
6173 .init_verbs = { alc883_init_verbs },
6174 .num_dacs = ARRAY_SIZE(alc883_dac_nids),
6175 .dac_nids = alc883_dac_nids,
6176 .dig_out_nid = ALC883_DIGOUT_NID,
6177 .num_adc_nids = ARRAY_SIZE(alc883_adc_nids),
6178 .adc_nids = alc883_adc_nids,
6179 .dig_in_nid = ALC883_DIGIN_NID,
6180 .num_channel_mode = ARRAY_SIZE(alc883_sixstack_modes),
6181 .channel_mode = alc883_sixstack_modes,
6182 .input_mux = &alc883_capture_source,
6183 },
6184 [ALC883_ACER] = { 6486 [ALC883_ACER] = {
6185 .mixers = { alc883_base_mixer, 6487 .mixers = { alc883_base_mixer,
6186 alc883_chmode_mixer }, 6488 alc883_chmode_mixer },
@@ -6211,6 +6513,20 @@ static struct alc_config_preset alc883_presets[] = {
6211 .channel_mode = alc883_sixstack_modes, 6513 .channel_mode = alc883_sixstack_modes,
6212 .input_mux = &alc883_capture_source, 6514 .input_mux = &alc883_capture_source,
6213 }, 6515 },
6516 [ALC883_MEDION_MD2] = {
6517 .mixers = { alc883_medion_md2_mixer},
6518 .init_verbs = { alc883_init_verbs, alc883_medion_md2_verbs},
6519 .num_dacs = ARRAY_SIZE(alc883_dac_nids),
6520 .dac_nids = alc883_dac_nids,
6521 .dig_out_nid = ALC883_DIGOUT_NID,
6522 .num_adc_nids = ARRAY_SIZE(alc883_adc_nids),
6523 .adc_nids = alc883_adc_nids,
6524 .num_channel_mode = ARRAY_SIZE(alc883_3ST_2ch_modes),
6525 .channel_mode = alc883_3ST_2ch_modes,
6526 .input_mux = &alc883_capture_source,
6527 .unsol_event = alc883_medion_md2_unsol_event,
6528 .init_hook = alc883_medion_md2_automute,
6529 },
6214 [ALC883_LAPTOP_EAPD] = { 6530 [ALC883_LAPTOP_EAPD] = {
6215 .mixers = { alc883_base_mixer, 6531 .mixers = { alc883_base_mixer,
6216 alc883_chmode_mixer }, 6532 alc883_chmode_mixer },
@@ -6236,6 +6552,35 @@ static struct alc_config_preset alc883_presets[] = {
6236 .unsol_event = alc883_lenovo_101e_unsol_event, 6552 .unsol_event = alc883_lenovo_101e_unsol_event,
6237 .init_hook = alc883_lenovo_101e_all_automute, 6553 .init_hook = alc883_lenovo_101e_all_automute,
6238 }, 6554 },
6555 [ALC883_LENOVO_NB0763] = {
6556 .mixers = { alc883_lenovo_nb0763_mixer },
6557 .init_verbs = { alc883_init_verbs, alc883_lenovo_nb0763_verbs},
6558 .num_dacs = ARRAY_SIZE(alc883_dac_nids),
6559 .dac_nids = alc883_dac_nids,
6560 .num_adc_nids = ARRAY_SIZE(alc883_adc_nids),
6561 .adc_nids = alc883_adc_nids,
6562 .num_channel_mode = ARRAY_SIZE(alc883_3ST_2ch_modes),
6563 .channel_mode = alc883_3ST_2ch_modes,
6564 .need_dac_fix = 1,
6565 .input_mux = &alc883_lenovo_nb0763_capture_source,
6566 .unsol_event = alc883_medion_md2_unsol_event,
6567 .init_hook = alc883_medion_md2_automute,
6568 },
6569 [ALC888_LENOVO_MS7195_DIG] = {
6570 .mixers = { alc883_3ST_6ch_mixer, alc883_chmode_mixer },
6571 .init_verbs = { alc883_init_verbs, alc888_lenovo_ms7195_verbs},
6572 .num_dacs = ARRAY_SIZE(alc883_dac_nids),
6573 .dac_nids = alc883_dac_nids,
6574 .dig_out_nid = ALC883_DIGOUT_NID,
6575 .num_adc_nids = ARRAY_SIZE(alc883_adc_nids),
6576 .adc_nids = alc883_adc_nids,
6577 .num_channel_mode = ARRAY_SIZE(alc883_3ST_6ch_modes),
6578 .channel_mode = alc883_3ST_6ch_modes,
6579 .need_dac_fix = 1,
6580 .input_mux = &alc883_capture_source,
6581 .unsol_event = alc883_lenovo_ms7195_unsol_event,
6582 .init_hook = alc888_lenovo_ms7195_front_automute,
6583 },
6239}; 6584};
6240 6585
6241 6586
@@ -6499,6 +6844,18 @@ static struct snd_kcontrol_new alc262_HP_BPC_WildWest_option_mixer[] = {
6499 { } /* end */ 6844 { } /* end */
6500}; 6845};
6501 6846
6847static struct snd_kcontrol_new alc262_sony_mixer[] = {
6848 HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT),
6849 HDA_CODEC_MUTE("Front Playback Switch", 0x15, 0x0, HDA_OUTPUT),
6850 HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT),
6851 HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT),
6852 HDA_CODEC_VOLUME("ATAPI Mic Playback Volume", 0x0b, 0x01, HDA_INPUT),
6853 HDA_CODEC_MUTE("ATAPI Mic Playback Switch", 0x0b, 0x01, HDA_INPUT),
6854 { } /* end */
6855};
6856
6857
6858
6502#define alc262_capture_mixer alc882_capture_mixer 6859#define alc262_capture_mixer alc882_capture_mixer
6503#define alc262_capture_alt_mixer alc882_capture_alt_mixer 6860#define alc262_capture_alt_mixer alc882_capture_alt_mixer
6504 6861
@@ -6597,6 +6954,15 @@ static struct hda_verb alc262_hippo1_unsol_verbs[] = {
6597 {} 6954 {}
6598}; 6955};
6599 6956
6957static struct hda_verb alc262_sony_unsol_verbs[] = {
6958 {0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, 0xc0},
6959 {0x15, AC_VERB_SET_CONNECT_SEL, 0x00},
6960 {0x19, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x24}, // Front Mic
6961
6962 {0x15, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | ALC880_HP_EVENT},
6963 {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP},
6964};
6965
6600/* mute/unmute internal speaker according to the hp jack and mute state */ 6966/* mute/unmute internal speaker according to the hp jack and mute state */
6601static void alc262_hippo_automute(struct hda_codec *codec, int force) 6967static void alc262_hippo_automute(struct hda_codec *codec, int force)
6602{ 6968{
@@ -7215,6 +7581,7 @@ static const char *alc262_models[ALC262_MODEL_LAST] = {
7215 [ALC262_HP_BPC] = "hp-bpc", 7581 [ALC262_HP_BPC] = "hp-bpc",
7216 [ALC262_HP_BPC_D7000_WL]= "hp-bpc-d7000", 7582 [ALC262_HP_BPC_D7000_WL]= "hp-bpc-d7000",
7217 [ALC262_BENQ_ED8] = "benq", 7583 [ALC262_BENQ_ED8] = "benq",
7584 [ALC262_BENQ_ED8] = "sony-assamd",
7218 [ALC262_AUTO] = "auto", 7585 [ALC262_AUTO] = "auto",
7219}; 7586};
7220 7587
@@ -7236,6 +7603,9 @@ static struct snd_pci_quirk alc262_cfg_tbl[] = {
7236 SND_PCI_QUIRK(0x10cf, 0x1397, "Fujitsu", ALC262_FUJITSU), 7603 SND_PCI_QUIRK(0x10cf, 0x1397, "Fujitsu", ALC262_FUJITSU),
7237 SND_PCI_QUIRK(0x17ff, 0x058f, "Benq Hippo", ALC262_HIPPO_1), 7604 SND_PCI_QUIRK(0x17ff, 0x058f, "Benq Hippo", ALC262_HIPPO_1),
7238 SND_PCI_QUIRK(0x17ff, 0x0560, "Benq ED8", ALC262_BENQ_ED8), 7605 SND_PCI_QUIRK(0x17ff, 0x0560, "Benq ED8", ALC262_BENQ_ED8),
7606 SND_PCI_QUIRK(0x104d, 0x9015, "Sony 0x9015", ALC262_SONY_ASSAMD),
7607 SND_PCI_QUIRK(0x104d, 0x900e, "Sony ASSAMD", ALC262_SONY_ASSAMD),
7608 SND_PCI_QUIRK(0x104d, 0x1f00, "Sony ASSAMD", ALC262_SONY_ASSAMD),
7239 {} 7609 {}
7240}; 7610};
7241 7611
@@ -7327,6 +7697,17 @@ static struct alc_config_preset alc262_presets[] = {
7327 .channel_mode = alc262_modes, 7697 .channel_mode = alc262_modes,
7328 .input_mux = &alc262_capture_source, 7698 .input_mux = &alc262_capture_source,
7329 }, 7699 },
7700 [ALC262_SONY_ASSAMD] = {
7701 .mixers = { alc262_sony_mixer },
7702 .init_verbs = { alc262_init_verbs, alc262_sony_unsol_verbs},
7703 .num_dacs = ARRAY_SIZE(alc262_dac_nids),
7704 .dac_nids = alc262_dac_nids,
7705 .hp_nid = 0x02,
7706 .num_channel_mode = ARRAY_SIZE(alc262_modes),
7707 .channel_mode = alc262_modes,
7708 .input_mux = &alc262_capture_source,
7709 .unsol_event = alc262_hippo_unsol_event,
7710 },
7330}; 7711};
7331 7712
7332static int patch_alc262(struct hda_codec *codec) 7713static int patch_alc262(struct hda_codec *codec)
@@ -8599,6 +8980,15 @@ static struct hda_input_mux alc861vd_capture_source = {
8599 }, 8980 },
8600}; 8981};
8601 8982
8983static struct hda_input_mux alc861vd_dallas_capture_source = {
8984 .num_items = 3,
8985 .items = {
8986 { "Front Mic", 0x0 },
8987 { "ATAPI Mic", 0x1 },
8988 { "Line In", 0x5 },
8989 },
8990};
8991
8602#define alc861vd_mux_enum_info alc_mux_enum_info 8992#define alc861vd_mux_enum_info alc_mux_enum_info
8603#define alc861vd_mux_enum_get alc_mux_enum_get 8993#define alc861vd_mux_enum_get alc_mux_enum_get
8604 8994
@@ -8782,6 +9172,34 @@ static struct snd_kcontrol_new alc861vd_lenovo_mixer[] = {
8782 { } /* end */ 9172 { } /* end */
8783}; 9173};
8784 9174
9175/* Pin assignment: Front=0x14, HP = 0x15,
9176 * Front Mic=0x18, ATAPI Mic = 0x19, Line In = 0x1d
9177 */
9178static struct snd_kcontrol_new alc861vd_dallas_mixer[] = {
9179 HDA_CODEC_VOLUME("Front Playback Volume", 0x02, 0x0, HDA_OUTPUT),
9180 HDA_BIND_MUTE("Front Playback Switch", 0x0c, 2, HDA_INPUT),
9181 HDA_CODEC_VOLUME("Headphone Playback Volume", 0x03, 0x0, HDA_OUTPUT),
9182 HDA_BIND_MUTE("Headphone Playback Switch", 0x0d, 2, HDA_INPUT),
9183 HDA_CODEC_VOLUME("Front Mic Playback Volume", 0x0b, 0x0, HDA_INPUT),
9184 HDA_CODEC_MUTE("Front Mic Playback Switch", 0x0b, 0x0, HDA_INPUT),
9185 HDA_CODEC_VOLUME("ATAPI Mic Playback Volume", 0x0b, 0x1, HDA_INPUT),
9186 HDA_CODEC_MUTE("ATAPI Mic Playback Switch", 0x0b, 0x1, HDA_INPUT),
9187 HDA_CODEC_VOLUME("Line Playback Volume", 0x0b, 0x05, HDA_INPUT),
9188 HDA_CODEC_MUTE("Line Playback Switch", 0x0b, 0x05, HDA_INPUT),
9189 HDA_CODEC_VOLUME("Capture Volume", 0x09, 0x0, HDA_INPUT),
9190 HDA_CODEC_MUTE("Capture Switch", 0x09, 0x0, HDA_INPUT),
9191 {
9192 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
9193 /* .name = "Capture Source", */
9194 .name = "Input Source",
9195 .count = 1,
9196 .info = alc882_mux_enum_info,
9197 .get = alc882_mux_enum_get,
9198 .put = alc882_mux_enum_put,
9199 },
9200 { } /* end */
9201};
9202
8785/* 9203/*
8786 * generic initialization of ADC, input mixers and output mixers 9204 * generic initialization of ADC, input mixers and output mixers
8787 */ 9205 */
@@ -8969,6 +9387,70 @@ static void alc861vd_lenovo_unsol_event(struct hda_codec *codec,
8969 } 9387 }
8970} 9388}
8971 9389
9390static struct hda_verb alc861vd_dallas_verbs[] = {
9391 {0x02, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_ZERO},
9392 {0x03, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_ZERO},
9393 {0x04, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_ZERO},
9394 {0x05, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_ZERO},
9395
9396 {0x0c, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
9397 {0x0c, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)},
9398 {0x0d, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
9399 {0x0d, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(1)},
9400 {0x0e, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
9401 {0x0e, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(1)},
9402 {0x0f, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
9403 {0x0f, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(1)},
9404
9405 {0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
9406 {0x14, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
9407 {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
9408 {0x15, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
9409 {0x16, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
9410 {0x16, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
9411 {0x17, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
9412 {0x17, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
9413
9414 {0x18, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF50},
9415 {0x18, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE},
9416 {0x19, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF50},
9417 {0x19, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE},
9418 {0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN},
9419 {0x1b, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN},
9420 {0x1c, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN},
9421 {0x1d, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN},
9422
9423 {0x22, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
9424 {0x22, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(3)},
9425 {0x22, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(2)},
9426 {0x22, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(4)},
9427
9428 {0x09, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
9429 {0x09, AC_VERB_SET_CONNECT_SEL, 0x00},
9430 {0x15, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | ALC880_HP_EVENT},
9431
9432 { } /* end */
9433};
9434
9435/* toggle speaker-output according to the hp-jack state */
9436static void alc861vd_dallas_automute(struct hda_codec *codec)
9437{
9438 unsigned int present;
9439
9440 present = snd_hda_codec_read(codec, 0x15, 0,
9441 AC_VERB_GET_PIN_SENSE, 0) & 0x80000000;
9442 snd_hda_codec_amp_update(codec, 0x14, 0, HDA_OUTPUT, 0,
9443 0x80, present ? 0x80 : 0);
9444 snd_hda_codec_amp_update(codec, 0x14, 1, HDA_OUTPUT, 0,
9445 0x80, present ? 0x80 : 0);
9446}
9447
9448static void alc861vd_dallas_unsol_event(struct hda_codec *codec, unsigned int res)
9449{
9450 if ((res >> 26) == ALC880_HP_EVENT)
9451 alc861vd_dallas_automute(codec);
9452}
9453
8972/* pcm configuration: identiacal with ALC880 */ 9454/* pcm configuration: identiacal with ALC880 */
8973#define alc861vd_pcm_analog_playback alc880_pcm_analog_playback 9455#define alc861vd_pcm_analog_playback alc880_pcm_analog_playback
8974#define alc861vd_pcm_analog_capture alc880_pcm_analog_capture 9456#define alc861vd_pcm_analog_capture alc880_pcm_analog_capture
@@ -8984,6 +9466,7 @@ static const char *alc861vd_models[ALC861VD_MODEL_LAST] = {
8984 [ALC861VD_3ST_DIG] = "3stack-digout", 9466 [ALC861VD_3ST_DIG] = "3stack-digout",
8985 [ALC861VD_6ST_DIG] = "6stack-digout", 9467 [ALC861VD_6ST_DIG] = "6stack-digout",
8986 [ALC861VD_LENOVO] = "lenovo", 9468 [ALC861VD_LENOVO] = "lenovo",
9469 [ALC861VD_DALLAS] = "dallas",
8987 [ALC861VD_AUTO] = "auto", 9470 [ALC861VD_AUTO] = "auto",
8988}; 9471};
8989 9472
@@ -8993,6 +9476,8 @@ static struct snd_pci_quirk alc861vd_cfg_tbl[] = {
8993 SND_PCI_QUIRK(0x10de, 0x03f0, "Realtek ALC660 demo", ALC660VD_3ST), 9476 SND_PCI_QUIRK(0x10de, 0x03f0, "Realtek ALC660 demo", ALC660VD_3ST),
8994 SND_PCI_QUIRK(0x1019, 0xa88d, "Realtek ALC660 demo", ALC660VD_3ST), 9477 SND_PCI_QUIRK(0x1019, 0xa88d, "Realtek ALC660 demo", ALC660VD_3ST),
8995 9478
9479 SND_PCI_QUIRK(0x1179, 0xff00, "DALLAS", ALC861VD_DALLAS),
9480 SND_PCI_QUIRK(0x1179, 0xff01, "DALLAS", ALC861VD_DALLAS),
8996 SND_PCI_QUIRK(0x17aa, 0x3802, "Lenovo 3000 C200", ALC861VD_LENOVO), 9481 SND_PCI_QUIRK(0x17aa, 0x3802, "Lenovo 3000 C200", ALC861VD_LENOVO),
8997 SND_PCI_QUIRK(0x17aa, 0x2066, "Lenovo", ALC861VD_LENOVO), 9482 SND_PCI_QUIRK(0x17aa, 0x2066, "Lenovo", ALC861VD_LENOVO),
8998 {} 9483 {}
@@ -9059,6 +9544,19 @@ static struct alc_config_preset alc861vd_presets[] = {
9059 .unsol_event = alc861vd_lenovo_unsol_event, 9544 .unsol_event = alc861vd_lenovo_unsol_event,
9060 .init_hook = alc861vd_lenovo_automute, 9545 .init_hook = alc861vd_lenovo_automute,
9061 }, 9546 },
9547 [ALC861VD_DALLAS] = {
9548 .mixers = { alc861vd_dallas_mixer },
9549 .init_verbs = { alc861vd_dallas_verbs },
9550 .num_dacs = ARRAY_SIZE(alc861vd_dac_nids),
9551 .dac_nids = alc861vd_dac_nids,
9552 .num_adc_nids = ARRAY_SIZE(alc861vd_adc_nids),
9553 .adc_nids = alc861vd_adc_nids,
9554 .num_channel_mode = ARRAY_SIZE(alc861vd_3stack_2ch_modes),
9555 .channel_mode = alc861vd_3stack_2ch_modes,
9556 .input_mux = &alc861vd_dallas_capture_source,
9557 .unsol_event = alc861vd_dallas_unsol_event,
9558 .init_hook = alc861vd_dallas_automute,
9559 },
9062}; 9560};
9063 9561
9064/* 9562/*