3 * included by patch_realtek.c
6 /* ALC880 board config type */
26 #ifdef CONFIG_SND_DEBUG
29 ALC880_MODEL_LAST /* last tag */
33 * ALC880 3-stack model
35 * DAC: Front = 0x02 (0x0c), Surr = 0x05 (0x0f), CLFE = 0x04 (0x0e)
36 * Pin assignment: Front = 0x14, Line-In/Surr = 0x1a, Mic/CLFE = 0x18,
37 * F-Mic = 0x1b, HP = 0x19
40 static const hda_nid_t alc880_dac_nids[4] = {
41 /* front, rear, clfe, rear_surr */
42 0x02, 0x05, 0x04, 0x03
45 static const hda_nid_t alc880_adc_nids[3] = {
50 /* The datasheet says the node 0x07 is connected from inputs,
51 * but it shows zero connection in the real implementation on some devices.
52 * Note: this is a 915GAV bug, fixed on 915GLV
54 static const hda_nid_t alc880_adc_nids_alt[2] = {
59 #define ALC880_DIGOUT_NID 0x06
60 #define ALC880_DIGIN_NID 0x0a
61 #define ALC880_PIN_CD_NID 0x1c
63 static const struct hda_input_mux alc880_capture_source = {
73 /* channel source setting (2/6 channel selection for 3-stack) */
75 static const struct hda_verb alc880_threestack_ch2_init[] = {
76 /* set line-in to input, mute it */
77 { 0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN },
78 { 0x1a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE },
79 /* set mic-in to input vref 80%, mute it */
80 { 0x18, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80 },
81 { 0x18, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE },
86 static const struct hda_verb alc880_threestack_ch6_init[] = {
87 /* set line-in to output, unmute it */
88 { 0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT },
89 { 0x1a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE },
90 /* set mic-in to output, unmute it */
91 { 0x18, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT },
92 { 0x18, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE },
96 static const struct hda_channel_mode alc880_threestack_modes[2] = {
97 { 2, alc880_threestack_ch2_init },
98 { 6, alc880_threestack_ch6_init },
101 static const struct snd_kcontrol_new alc880_three_stack_mixer[] = {
102 HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT),
103 HDA_BIND_MUTE("Front Playback Switch", 0x0c, 2, HDA_INPUT),
104 HDA_CODEC_VOLUME("Surround Playback Volume", 0x0f, 0x0, HDA_OUTPUT),
105 HDA_BIND_MUTE("Surround Playback Switch", 0x0f, 2, HDA_INPUT),
106 HDA_CODEC_VOLUME_MONO("Center Playback Volume", 0x0e, 1, 0x0, HDA_OUTPUT),
107 HDA_CODEC_VOLUME_MONO("LFE Playback Volume", 0x0e, 2, 0x0, HDA_OUTPUT),
108 HDA_BIND_MUTE_MONO("Center Playback Switch", 0x0e, 1, 2, HDA_INPUT),
109 HDA_BIND_MUTE_MONO("LFE Playback Switch", 0x0e, 2, 2, HDA_INPUT),
110 HDA_CODEC_VOLUME("CD Playback Volume", 0x0b, 0x04, HDA_INPUT),
111 HDA_CODEC_MUTE("CD Playback Switch", 0x0b, 0x04, HDA_INPUT),
112 HDA_CODEC_VOLUME("Line Playback Volume", 0x0b, 0x02, HDA_INPUT),
113 HDA_CODEC_MUTE("Line Playback Switch", 0x0b, 0x02, HDA_INPUT),
114 HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT),
115 HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT),
116 HDA_CODEC_VOLUME("Front Mic Playback Volume", 0x0b, 0x3, HDA_INPUT),
117 HDA_CODEC_MUTE("Front Mic Playback Switch", 0x0b, 0x3, HDA_INPUT),
118 HDA_CODEC_MUTE("Headphone Playback Switch", 0x19, 0x0, HDA_OUTPUT),
120 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
121 .name = "Channel Mode",
122 .info = alc_ch_mode_info,
123 .get = alc_ch_mode_get,
124 .put = alc_ch_mode_put,
130 * ALC880 5-stack model
132 * DAC: Front = 0x02 (0x0c), Surr = 0x05 (0x0f), CLFE = 0x04 (0x0d),
134 * Pin assignment: Front = 0x14, Surr = 0x17, CLFE = 0x16
135 * Line-In/Side = 0x1a, Mic = 0x18, F-Mic = 0x1b, HP = 0x19
138 /* additional mixers to alc880_three_stack_mixer */
139 static const struct snd_kcontrol_new alc880_five_stack_mixer[] = {
140 HDA_CODEC_VOLUME("Side Playback Volume", 0x0d, 0x0, HDA_OUTPUT),
141 HDA_BIND_MUTE("Side Playback Switch", 0x0d, 2, HDA_INPUT),
145 /* channel source setting (6/8 channel selection for 5-stack) */
147 static const struct hda_verb alc880_fivestack_ch6_init[] = {
148 /* set line-in to input, mute it */
149 { 0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN },
150 { 0x1a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE },
155 static const struct hda_verb alc880_fivestack_ch8_init[] = {
156 /* set line-in to output, unmute it */
157 { 0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT },
158 { 0x1a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE },
162 static const struct hda_channel_mode alc880_fivestack_modes[2] = {
163 { 6, alc880_fivestack_ch6_init },
164 { 8, alc880_fivestack_ch8_init },
169 * ALC880 6-stack model
171 * DAC: Front = 0x02 (0x0c), Surr = 0x03 (0x0d), CLFE = 0x04 (0x0e),
173 * Pin assignment: Front = 0x14, Surr = 0x15, CLFE = 0x16, Side = 0x17,
174 * Mic = 0x18, F-Mic = 0x19, Line = 0x1a, HP = 0x1b
177 static const hda_nid_t alc880_6st_dac_nids[4] = {
178 /* front, rear, clfe, rear_surr */
179 0x02, 0x03, 0x04, 0x05
182 static const struct hda_input_mux alc880_6stack_capture_source = {
186 { "Front Mic", 0x1 },
192 /* fixed 8-channels */
193 static const struct hda_channel_mode alc880_sixstack_modes[1] = {
197 static const struct snd_kcontrol_new alc880_six_stack_mixer[] = {
198 HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT),
199 HDA_BIND_MUTE("Front Playback Switch", 0x0c, 2, HDA_INPUT),
200 HDA_CODEC_VOLUME("Surround Playback Volume", 0x0d, 0x0, HDA_OUTPUT),
201 HDA_BIND_MUTE("Surround Playback Switch", 0x0d, 2, HDA_INPUT),
202 HDA_CODEC_VOLUME_MONO("Center Playback Volume", 0x0e, 1, 0x0, HDA_OUTPUT),
203 HDA_CODEC_VOLUME_MONO("LFE Playback Volume", 0x0e, 2, 0x0, HDA_OUTPUT),
204 HDA_BIND_MUTE_MONO("Center Playback Switch", 0x0e, 1, 2, HDA_INPUT),
205 HDA_BIND_MUTE_MONO("LFE Playback Switch", 0x0e, 2, 2, HDA_INPUT),
206 HDA_CODEC_VOLUME("Side Playback Volume", 0x0f, 0x0, HDA_OUTPUT),
207 HDA_BIND_MUTE("Side Playback Switch", 0x0f, 2, HDA_INPUT),
208 HDA_CODEC_VOLUME("CD Playback Volume", 0x0b, 0x04, HDA_INPUT),
209 HDA_CODEC_MUTE("CD Playback Switch", 0x0b, 0x04, HDA_INPUT),
210 HDA_CODEC_VOLUME("Line Playback Volume", 0x0b, 0x02, HDA_INPUT),
211 HDA_CODEC_MUTE("Line Playback Switch", 0x0b, 0x02, HDA_INPUT),
212 HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT),
213 HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT),
214 HDA_CODEC_VOLUME("Front Mic Playback Volume", 0x0b, 0x1, HDA_INPUT),
215 HDA_CODEC_MUTE("Front Mic Playback Switch", 0x0b, 0x1, HDA_INPUT),
217 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
218 .name = "Channel Mode",
219 .info = alc_ch_mode_info,
220 .get = alc_ch_mode_get,
221 .put = alc_ch_mode_put,
227 static const hda_nid_t alc880_w810_dac_nids[3] = {
228 /* front, rear/surround, clfe */
235 * DAC: Front = 0x02 (0x0c), HP = 0x03 (0x0d)
236 * Pin assignment: Front = 0x14, HP = 0x15, Mic = 0x18, Mic2 = 0x19(?),
240 static const hda_nid_t alc880_z71v_dac_nids[1] = {
243 #define ALC880_Z71V_HP_DAC 0x03
245 /* fixed 2 channels */
246 static const struct hda_channel_mode alc880_2_jack_modes[1] = {
250 static const struct snd_kcontrol_new alc880_z71v_mixer[] = {
251 HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT),
252 HDA_BIND_MUTE("Front Playback Switch", 0x0c, 2, HDA_INPUT),
253 HDA_CODEC_VOLUME("Headphone Playback Volume", 0x0d, 0x0, HDA_OUTPUT),
254 HDA_BIND_MUTE("Headphone Playback Switch", 0x0d, 2, HDA_INPUT),
255 HDA_CODEC_VOLUME("CD Playback Volume", 0x0b, 0x04, HDA_INPUT),
256 HDA_CODEC_MUTE("CD Playback Switch", 0x0b, 0x04, HDA_INPUT),
257 HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT),
258 HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT),
266 * DAC: HP = 0x02 (0x0c), Front = 0x03 (0x0d)
267 * Pin assignment: HP = 0x14, Front = 0x15, Mic = 0x18
270 static const hda_nid_t alc880_f1734_dac_nids[1] = {
273 #define ALC880_F1734_HP_DAC 0x02
275 static const struct snd_kcontrol_new alc880_f1734_mixer[] = {
276 HDA_CODEC_VOLUME("Headphone Playback Volume", 0x0c, 0x0, HDA_OUTPUT),
277 HDA_BIND_MUTE("Headphone Playback Switch", 0x0c, 2, HDA_INPUT),
278 HDA_CODEC_VOLUME("Speaker Playback Volume", 0x0d, 0x0, HDA_OUTPUT),
279 HDA_BIND_MUTE("Speaker Playback Switch", 0x0d, 2, HDA_INPUT),
280 HDA_CODEC_VOLUME("CD Playback Volume", 0x0b, 0x04, HDA_INPUT),
281 HDA_CODEC_MUTE("CD Playback Switch", 0x0b, 0x04, HDA_INPUT),
282 HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x1, HDA_INPUT),
283 HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x1, HDA_INPUT),
287 static const struct hda_input_mux alc880_f1734_capture_source = {
299 * DAC: HP/Front = 0x02 (0x0c), Surr = 0x03 (0x0d), CLFE = 0x04 (0x0e)
300 * Pin assignment: HP/Front = 0x14, Surr = 0x15, CLFE = 0x16,
301 * Mic = 0x18, Line = 0x1a
304 #define alc880_asus_dac_nids alc880_w810_dac_nids /* identical with w810 */
305 #define alc880_asus_modes alc880_threestack_modes /* 2/6 channel mode */
307 static const struct snd_kcontrol_new alc880_asus_mixer[] = {
308 HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT),
309 HDA_BIND_MUTE("Front Playback Switch", 0x0c, 2, HDA_INPUT),
310 HDA_CODEC_VOLUME("Surround Playback Volume", 0x0d, 0x0, HDA_OUTPUT),
311 HDA_BIND_MUTE("Surround Playback Switch", 0x0d, 2, HDA_INPUT),
312 HDA_CODEC_VOLUME_MONO("Center Playback Volume", 0x0e, 1, 0x0, HDA_OUTPUT),
313 HDA_CODEC_VOLUME_MONO("LFE Playback Volume", 0x0e, 2, 0x0, HDA_OUTPUT),
314 HDA_BIND_MUTE_MONO("Center Playback Switch", 0x0e, 1, 2, HDA_INPUT),
315 HDA_BIND_MUTE_MONO("LFE Playback Switch", 0x0e, 2, 2, HDA_INPUT),
316 HDA_CODEC_VOLUME("CD Playback Volume", 0x0b, 0x04, HDA_INPUT),
317 HDA_CODEC_MUTE("CD Playback Switch", 0x0b, 0x04, HDA_INPUT),
318 HDA_CODEC_VOLUME("Line Playback Volume", 0x0b, 0x02, HDA_INPUT),
319 HDA_CODEC_MUTE("Line Playback Switch", 0x0b, 0x02, HDA_INPUT),
320 HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT),
321 HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT),
323 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
324 .name = "Channel Mode",
325 .info = alc_ch_mode_info,
326 .get = alc_ch_mode_get,
327 .put = alc_ch_mode_put,
333 * ALC880 ASUS W1V model
335 * DAC: HP/Front = 0x02 (0x0c), Surr = 0x03 (0x0d), CLFE = 0x04 (0x0e)
336 * Pin assignment: HP/Front = 0x14, Surr = 0x15, CLFE = 0x16,
337 * Mic = 0x18, Line = 0x1a, Line2 = 0x1b
340 /* additional mixers to alc880_asus_mixer */
341 static const struct snd_kcontrol_new alc880_asus_w1v_mixer[] = {
342 HDA_CODEC_VOLUME("Line2 Playback Volume", 0x0b, 0x03, HDA_INPUT),
343 HDA_CODEC_MUTE("Line2 Playback Switch", 0x0b, 0x03, HDA_INPUT),
348 static const struct snd_kcontrol_new alc880_tcl_s700_mixer[] = {
349 HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT),
350 HDA_CODEC_MUTE("Front Playback Switch", 0x1b, 0x0, HDA_OUTPUT),
351 HDA_CODEC_MUTE("Headphone Playback Switch", 0x14, 0x0, HDA_OUTPUT),
352 HDA_CODEC_VOLUME("CD Playback Volume", 0x0B, 0x04, HDA_INPUT),
353 HDA_CODEC_MUTE("CD Playback Switch", 0x0B, 0x04, HDA_INPUT),
354 HDA_CODEC_VOLUME("Mic Playback Volume", 0x0B, 0x0, HDA_INPUT),
355 HDA_CODEC_MUTE("Mic Playback Switch", 0x0B, 0x0, HDA_INPUT),
356 HDA_CODEC_VOLUME("Capture Volume", 0x08, 0x0, HDA_INPUT),
357 HDA_CODEC_MUTE("Capture Switch", 0x08, 0x0, HDA_INPUT),
362 static const struct snd_kcontrol_new alc880_uniwill_mixer[] = {
363 HDA_CODEC_VOLUME("Headphone Playback Volume", 0x0c, 0x0, HDA_OUTPUT),
364 HDA_BIND_MUTE("Headphone Playback Switch", 0x0c, 2, HDA_INPUT),
365 HDA_CODEC_VOLUME("Speaker Playback Volume", 0x0d, 0x0, HDA_OUTPUT),
366 HDA_BIND_MUTE("Speaker Playback Switch", 0x0d, 2, HDA_INPUT),
367 HDA_CODEC_VOLUME_MONO("Center Playback Volume", 0x0e, 1, 0x0, HDA_OUTPUT),
368 HDA_CODEC_VOLUME_MONO("LFE Playback Volume", 0x0e, 2, 0x0, HDA_OUTPUT),
369 HDA_BIND_MUTE_MONO("Center Playback Switch", 0x0e, 1, 2, HDA_INPUT),
370 HDA_BIND_MUTE_MONO("LFE Playback Switch", 0x0e, 2, 2, HDA_INPUT),
371 HDA_CODEC_VOLUME("CD Playback Volume", 0x0b, 0x04, HDA_INPUT),
372 HDA_CODEC_MUTE("CD Playback Switch", 0x0b, 0x04, HDA_INPUT),
373 HDA_CODEC_VOLUME("Line Playback Volume", 0x0b, 0x02, HDA_INPUT),
374 HDA_CODEC_MUTE("Line Playback Switch", 0x0b, 0x02, HDA_INPUT),
375 HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT),
376 HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT),
377 HDA_CODEC_VOLUME("Front Mic Playback Volume", 0x0b, 0x1, HDA_INPUT),
378 HDA_CODEC_MUTE("Front Mic Playback Switch", 0x0b, 0x1, HDA_INPUT),
380 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
381 .name = "Channel Mode",
382 .info = alc_ch_mode_info,
383 .get = alc_ch_mode_get,
384 .put = alc_ch_mode_put,
389 static const struct snd_kcontrol_new alc880_fujitsu_mixer[] = {
390 HDA_CODEC_VOLUME("Headphone Playback Volume", 0x0c, 0x0, HDA_OUTPUT),
391 HDA_BIND_MUTE("Headphone Playback Switch", 0x0c, 2, HDA_INPUT),
392 HDA_CODEC_VOLUME("Speaker Playback Volume", 0x0d, 0x0, HDA_OUTPUT),
393 HDA_BIND_MUTE("Speaker Playback Switch", 0x0d, 2, HDA_INPUT),
394 HDA_CODEC_VOLUME("CD Playback Volume", 0x0b, 0x04, HDA_INPUT),
395 HDA_CODEC_MUTE("CD Playback Switch", 0x0b, 0x04, HDA_INPUT),
396 HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT),
397 HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT),
398 HDA_CODEC_VOLUME("Internal Mic Playback Volume", 0x0b, 0x1, HDA_INPUT),
399 HDA_CODEC_MUTE("Internal Mic Playback Switch", 0x0b, 0x1, HDA_INPUT),
403 static const struct snd_kcontrol_new alc880_uniwill_p53_mixer[] = {
404 HDA_CODEC_VOLUME("Headphone Playback Volume", 0x0c, 0x0, HDA_OUTPUT),
405 HDA_BIND_MUTE("Headphone Playback Switch", 0x0c, 2, HDA_INPUT),
406 HDA_CODEC_VOLUME("Speaker Playback Volume", 0x0d, 0x0, HDA_OUTPUT),
407 HDA_BIND_MUTE("Speaker Playback Switch", 0x0d, 2, HDA_INPUT),
408 HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT),
409 HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT),
414 * initialize the codec volumes, etc
418 * generic initialization of ADC, input mixers and output mixers
420 static const struct hda_verb alc880_volume_init_verbs[] = {
422 * Unmute ADC0-2 and set the default input to mic-in
424 {0x07, AC_VERB_SET_CONNECT_SEL, 0x00},
425 {0x07, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
426 {0x08, AC_VERB_SET_CONNECT_SEL, 0x00},
427 {0x08, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
428 {0x09, AC_VERB_SET_CONNECT_SEL, 0x00},
429 {0x09, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
431 /* Unmute input amps (CD, Line In, Mic 1 & Mic 2) of the analog-loopback
433 * Note: PASD motherboards uses the Line In 2 as the input for front
436 /* Amp Indices: Mic1 = 0, Mic2 = 1, Line1 = 2, Line2 = 3, CD = 4 */
437 {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
438 {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(1)},
439 {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(2)},
440 {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(3)},
441 {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(4)},
442 {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(6)},
443 {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(7)},
446 * Set up output mixers (0x0c - 0x0f)
448 /* set vol=0 to output mixers */
449 {0x0c, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_ZERO},
450 {0x0d, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_ZERO},
451 {0x0e, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_ZERO},
452 {0x0f, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_ZERO},
453 /* set up input amps for analog loopback */
454 /* Amp Indices: DAC = 0, mixer = 1 */
455 {0x0c, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
456 {0x0c, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(1)},
457 {0x0d, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
458 {0x0d, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(1)},
459 {0x0e, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
460 {0x0e, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(1)},
461 {0x0f, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
462 {0x0f, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(1)},
468 * 3-stack pin configuration:
469 * front = 0x14, mic/clfe = 0x18, HP = 0x19, line/surr = 0x1a, f-mic = 0x1b
471 static const struct hda_verb alc880_pin_3stack_init_verbs[] = {
473 * preset connection lists of input pins
474 * 0 = front, 1 = rear_surr, 2 = CLFE, 3 = surround
476 {0x10, AC_VERB_SET_CONNECT_SEL, 0x02}, /* mic/clfe */
477 {0x11, AC_VERB_SET_CONNECT_SEL, 0x00}, /* HP */
478 {0x12, AC_VERB_SET_CONNECT_SEL, 0x03}, /* line/surround */
481 * Set pin mode and muting
483 /* set front pin widgets 0x14 for output */
484 {0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
485 {0x14, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
486 /* Mic1 (rear panel) pin widget for input and vref at 80% */
487 {0x18, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80},
488 {0x18, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE},
489 /* Mic2 (as headphone out) for HP output */
490 {0x19, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP},
491 {0x19, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
492 /* Line In pin widget for input */
493 {0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN},
494 {0x1a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE},
495 /* Line2 (as front mic) pin widget for input and vref at 80% */
496 {0x1b, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80},
497 {0x1b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE},
498 /* CD pin widget for input */
499 {0x1c, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN},
505 * 5-stack pin configuration:
506 * front = 0x14, surround = 0x17, clfe = 0x16, mic = 0x18, HP = 0x19,
507 * line-in/side = 0x1a, f-mic = 0x1b
509 static const struct hda_verb alc880_pin_5stack_init_verbs[] = {
511 * preset connection lists of input pins
512 * 0 = front, 1 = rear_surr, 2 = CLFE, 3 = surround
514 {0x11, AC_VERB_SET_CONNECT_SEL, 0x00}, /* HP */
515 {0x12, AC_VERB_SET_CONNECT_SEL, 0x01}, /* line/side */
518 * Set pin mode and muting
520 /* set pin widgets 0x14-0x17 for output */
521 {0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
522 {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
523 {0x16, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
524 {0x17, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
525 /* unmute pins for output (no gain on this amp) */
526 {0x14, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
527 {0x15, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
528 {0x16, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
529 {0x17, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
531 /* Mic1 (rear panel) pin widget for input and vref at 80% */
532 {0x18, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80},
533 {0x18, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE},
534 /* Mic2 (as headphone out) for HP output */
535 {0x19, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP},
536 {0x19, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
537 /* Line In pin widget for input */
538 {0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN},
539 {0x1a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE},
540 /* Line2 (as front mic) pin widget for input and vref at 80% */
541 {0x1b, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80},
542 {0x1b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE},
543 /* CD pin widget for input */
544 {0x1c, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN},
550 * Z71V pin configuration:
551 * Speaker-out = 0x14, HP = 0x15, Mic = 0x18, Line-in = 0x1a, Mic2 = 0x1b (?)
553 static const struct hda_verb alc880_pin_z71v_init_verbs[] = {
554 {0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
555 {0x14, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
556 {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP},
557 {0x15, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
559 {0x18, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80},
560 {0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN},
561 {0x1b, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80},
562 {0x1c, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN},
568 * 6-stack pin configuration:
569 * front = 0x14, surr = 0x15, clfe = 0x16, side = 0x17, mic = 0x18,
570 * f-mic = 0x19, line = 0x1a, HP = 0x1b
572 static const struct hda_verb alc880_pin_6stack_init_verbs[] = {
573 {0x13, AC_VERB_SET_CONNECT_SEL, 0x00}, /* HP */
575 {0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
576 {0x14, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
577 {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
578 {0x15, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
579 {0x16, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
580 {0x16, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
581 {0x17, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
582 {0x17, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
584 {0x18, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80},
585 {0x18, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE},
586 {0x19, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80},
587 {0x19, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE},
588 {0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN},
589 {0x1a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE},
590 {0x1b, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP},
591 {0x1b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
592 {0x1c, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN},
598 * Uniwill pin configuration:
599 * HP = 0x14, InternalSpeaker = 0x15, mic = 0x18, internal mic = 0x19,
602 static const struct hda_verb alc880_uniwill_init_verbs[] = {
603 {0x13, AC_VERB_SET_CONNECT_SEL, 0x00}, /* HP */
605 {0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP},
606 {0x14, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
607 {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP},
608 {0x15, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
609 {0x16, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP},
610 {0x16, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
611 {0x17, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
612 {0x17, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
613 {0x0c, AC_VERB_SET_AMP_GAIN_MUTE, (0x7000 | (0x00 << 8))},
614 {0x0c, AC_VERB_SET_AMP_GAIN_MUTE, (0x7000 | (0x01 << 8))},
615 {0x0d, AC_VERB_SET_AMP_GAIN_MUTE, (0x7000 | (0x00 << 8))},
616 {0x0d, AC_VERB_SET_AMP_GAIN_MUTE, (0x7000 | (0x01 << 8))},
617 {0x0e, AC_VERB_SET_AMP_GAIN_MUTE, (0x7000 | (0x00 << 8))},
618 {0x0e, AC_VERB_SET_AMP_GAIN_MUTE, (0x7000 | (0x01 << 8))},
620 {0x18, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80},
621 {0x18, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE},
622 {0x19, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80},
623 {0x19, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE},
624 {0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN},
625 {0x1a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE},
626 /* {0x1b, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP}, */
627 /* {0x1b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE}, */
628 {0x1c, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN},
630 {0x14, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | ALC_HP_EVENT},
631 {0x18, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | ALC_MIC_EVENT},
638 * HP = 0x14, InternalSpeaker = 0x15, mic = 0x19,
640 static const struct hda_verb alc880_uniwill_p53_init_verbs[] = {
641 {0x13, AC_VERB_SET_CONNECT_SEL, 0x00}, /* HP */
643 {0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP},
644 {0x14, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
645 {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP},
646 {0x15, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
647 {0x16, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP},
648 {0x16, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
649 {0x0c, AC_VERB_SET_AMP_GAIN_MUTE, (0x7000 | (0x00 << 8))},
650 {0x0c, AC_VERB_SET_AMP_GAIN_MUTE, (0x7000 | (0x01 << 8))},
651 {0x0d, AC_VERB_SET_AMP_GAIN_MUTE, (0x7000 | (0x00 << 8))},
652 {0x0d, AC_VERB_SET_AMP_GAIN_MUTE, (0x7000 | (0x01 << 8))},
653 {0x0e, AC_VERB_SET_AMP_GAIN_MUTE, (0x7000 | (0x00 << 8))},
654 {0x0e, AC_VERB_SET_AMP_GAIN_MUTE, (0x7000 | (0x01 << 8))},
656 {0x18, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80},
657 {0x18, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE},
658 {0x19, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80},
659 {0x19, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE},
660 {0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN},
661 {0x1a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE},
663 {0x14, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | ALC_HP_EVENT},
664 {0x21, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | ALC_DCVOL_EVENT},
669 static const struct hda_verb alc880_beep_init_verbs[] = {
670 { 0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(5) },
674 static void alc880_uniwill_setup(struct hda_codec *codec)
676 struct alc_spec *spec = codec->spec;
678 spec->autocfg.hp_pins[0] = 0x14;
679 spec->autocfg.speaker_pins[0] = 0x15;
680 spec->autocfg.speaker_pins[0] = 0x16;
681 alc_simple_setup_automute(spec, ALC_AUTOMUTE_AMP);
684 static void alc880_uniwill_init_hook(struct hda_codec *codec)
686 alc_hp_automute(codec);
687 alc88x_simple_mic_automute(codec);
690 static void alc880_uniwill_unsol_event(struct hda_codec *codec,
693 /* Looks like the unsol event is incompatible with the standard
694 * definition. 4bit tag is placed at 28 bit!
699 alc88x_simple_mic_automute(codec);
702 alc_exec_unsol_event(codec, res);
707 static void alc880_uniwill_p53_setup(struct hda_codec *codec)
709 struct alc_spec *spec = codec->spec;
711 spec->autocfg.hp_pins[0] = 0x14;
712 spec->autocfg.speaker_pins[0] = 0x15;
713 alc_simple_setup_automute(spec, ALC_AUTOMUTE_AMP);
716 static void alc880_uniwill_p53_dcvol_automute(struct hda_codec *codec)
718 unsigned int present;
720 present = snd_hda_codec_read(codec, 0x21, 0,
721 AC_VERB_GET_VOLUME_KNOB_CONTROL, 0);
722 present &= HDA_AMP_VOLMASK;
723 snd_hda_codec_amp_stereo(codec, 0x0c, HDA_OUTPUT, 0,
724 HDA_AMP_VOLMASK, present);
725 snd_hda_codec_amp_stereo(codec, 0x0d, HDA_OUTPUT, 0,
726 HDA_AMP_VOLMASK, present);
729 static void alc880_uniwill_p53_unsol_event(struct hda_codec *codec,
732 /* Looks like the unsol event is incompatible with the standard
733 * definition. 4bit tag is placed at 28 bit!
736 if (res == ALC_DCVOL_EVENT)
737 alc880_uniwill_p53_dcvol_automute(codec);
739 alc_exec_unsol_event(codec, res);
743 * F1734 pin configuration:
744 * HP = 0x14, speaker-out = 0x15, mic = 0x18
746 static const struct hda_verb alc880_pin_f1734_init_verbs[] = {
747 {0x07, AC_VERB_SET_CONNECT_SEL, 0x01},
748 {0x10, AC_VERB_SET_CONNECT_SEL, 0x02},
749 {0x11, AC_VERB_SET_CONNECT_SEL, 0x00},
750 {0x12, AC_VERB_SET_CONNECT_SEL, 0x01},
751 {0x13, AC_VERB_SET_CONNECT_SEL, 0x00},
753 {0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP},
754 {0x14, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
755 {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
756 {0x15, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
758 {0x18, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80},
759 {0x18, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE},
760 {0x19, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF50},
761 {0x19, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE},
762 {0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
763 {0x1a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
764 {0x1b, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
765 {0x1b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
766 {0x1c, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN},
768 {0x14, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN|ALC_HP_EVENT},
769 {0x21, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN|ALC_DCVOL_EVENT},
775 * ASUS pin configuration:
776 * HP/front = 0x14, surr = 0x15, clfe = 0x16, mic = 0x18, line = 0x1a
778 static const struct hda_verb alc880_pin_asus_init_verbs[] = {
779 {0x10, AC_VERB_SET_CONNECT_SEL, 0x02},
780 {0x11, AC_VERB_SET_CONNECT_SEL, 0x00},
781 {0x12, AC_VERB_SET_CONNECT_SEL, 0x01},
782 {0x13, AC_VERB_SET_CONNECT_SEL, 0x00},
784 {0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP},
785 {0x14, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
786 {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
787 {0x14, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
788 {0x16, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
789 {0x14, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
790 {0x17, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
791 {0x14, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
793 {0x18, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80},
794 {0x14, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE},
795 {0x19, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80},
796 {0x14, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE},
797 {0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN},
798 {0x14, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE},
799 {0x1b, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
800 {0x14, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
801 {0x1c, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN},
806 /* Enable GPIO mask and set output */
807 #define alc880_gpio1_init_verbs alc_gpio1_init_verbs
808 #define alc880_gpio2_init_verbs alc_gpio2_init_verbs
809 #define alc880_gpio3_init_verbs alc_gpio3_init_verbs
811 static const struct hda_verb alc880_pin_tcl_S700_init_verbs[] = {
812 /* change to EAPD mode */
813 {0x20, AC_VERB_SET_COEF_INDEX, 0x07},
814 {0x20, AC_VERB_SET_PROC_COEF, 0x3060},
816 /* Headphone output */
817 {0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP},
819 {0x1b, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
820 {0x1b, AC_VERB_SET_CONNECT_SEL, 0x00},
822 /* Line In pin widget for input */
823 {0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN},
824 /* CD pin widget for input */
825 {0x1c, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN},
826 /* Mic1 (rear panel) pin widget for input and vref at 80% */
827 {0x18, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80},
829 /* change to EAPD mode */
830 {0x20, AC_VERB_SET_COEF_INDEX, 0x07},
831 {0x20, AC_VERB_SET_PROC_COEF, 0x3070},
837 * Test configuration for debugging
839 * Almost all inputs/outputs are enabled. I/O pins can be configured via
842 #ifdef CONFIG_SND_DEBUG
843 static const hda_nid_t alc880_test_dac_nids[4] = {
844 0x02, 0x03, 0x04, 0x05
847 static const struct hda_input_mux alc880_test_capture_source = {
860 static const struct hda_channel_mode alc880_test_modes[4] = {
867 static int alc_test_pin_ctl_info(struct snd_kcontrol *kcontrol,
868 struct snd_ctl_elem_info *uinfo)
870 static const char * const texts[] = {
871 "N/A", "Line Out", "HP Out",
872 "In Hi-Z", "In 50%", "In Grd", "In 80%", "In 100%"
874 uinfo->type = SNDRV_CTL_ELEM_TYPE_ENUMERATED;
876 uinfo->value.enumerated.items = 8;
877 if (uinfo->value.enumerated.item >= 8)
878 uinfo->value.enumerated.item = 7;
879 strcpy(uinfo->value.enumerated.name, texts[uinfo->value.enumerated.item]);
883 static int alc_test_pin_ctl_get(struct snd_kcontrol *kcontrol,
884 struct snd_ctl_elem_value *ucontrol)
886 struct hda_codec *codec = snd_kcontrol_chip(kcontrol);
887 hda_nid_t nid = (hda_nid_t)kcontrol->private_value;
888 unsigned int pin_ctl, item = 0;
890 pin_ctl = snd_hda_codec_read(codec, nid, 0,
891 AC_VERB_GET_PIN_WIDGET_CONTROL, 0);
892 if (pin_ctl & AC_PINCTL_OUT_EN) {
893 if (pin_ctl & AC_PINCTL_HP_EN)
897 } else if (pin_ctl & AC_PINCTL_IN_EN) {
898 switch (pin_ctl & AC_PINCTL_VREFEN) {
899 case AC_PINCTL_VREF_HIZ: item = 3; break;
900 case AC_PINCTL_VREF_50: item = 4; break;
901 case AC_PINCTL_VREF_GRD: item = 5; break;
902 case AC_PINCTL_VREF_80: item = 6; break;
903 case AC_PINCTL_VREF_100: item = 7; break;
906 ucontrol->value.enumerated.item[0] = item;
910 static int alc_test_pin_ctl_put(struct snd_kcontrol *kcontrol,
911 struct snd_ctl_elem_value *ucontrol)
913 struct hda_codec *codec = snd_kcontrol_chip(kcontrol);
914 hda_nid_t nid = (hda_nid_t)kcontrol->private_value;
915 static const unsigned int ctls[] = {
916 0, AC_PINCTL_OUT_EN, AC_PINCTL_OUT_EN | AC_PINCTL_HP_EN,
917 AC_PINCTL_IN_EN | AC_PINCTL_VREF_HIZ,
918 AC_PINCTL_IN_EN | AC_PINCTL_VREF_50,
919 AC_PINCTL_IN_EN | AC_PINCTL_VREF_GRD,
920 AC_PINCTL_IN_EN | AC_PINCTL_VREF_80,
921 AC_PINCTL_IN_EN | AC_PINCTL_VREF_100,
923 unsigned int old_ctl, new_ctl;
925 old_ctl = snd_hda_codec_read(codec, nid, 0,
926 AC_VERB_GET_PIN_WIDGET_CONTROL, 0);
927 new_ctl = ctls[ucontrol->value.enumerated.item[0]];
928 if (old_ctl != new_ctl) {
930 snd_hda_codec_write_cache(codec, nid, 0,
931 AC_VERB_SET_PIN_WIDGET_CONTROL,
933 val = ucontrol->value.enumerated.item[0] >= 3 ?
935 snd_hda_codec_amp_stereo(codec, nid, HDA_OUTPUT, 0,
942 static int alc_test_pin_src_info(struct snd_kcontrol *kcontrol,
943 struct snd_ctl_elem_info *uinfo)
945 static const char * const texts[] = {
946 "Front", "Surround", "CLFE", "Side"
948 uinfo->type = SNDRV_CTL_ELEM_TYPE_ENUMERATED;
950 uinfo->value.enumerated.items = 4;
951 if (uinfo->value.enumerated.item >= 4)
952 uinfo->value.enumerated.item = 3;
953 strcpy(uinfo->value.enumerated.name, texts[uinfo->value.enumerated.item]);
957 static int alc_test_pin_src_get(struct snd_kcontrol *kcontrol,
958 struct snd_ctl_elem_value *ucontrol)
960 struct hda_codec *codec = snd_kcontrol_chip(kcontrol);
961 hda_nid_t nid = (hda_nid_t)kcontrol->private_value;
964 sel = snd_hda_codec_read(codec, nid, 0, AC_VERB_GET_CONNECT_SEL, 0);
965 ucontrol->value.enumerated.item[0] = sel & 3;
969 static int alc_test_pin_src_put(struct snd_kcontrol *kcontrol,
970 struct snd_ctl_elem_value *ucontrol)
972 struct hda_codec *codec = snd_kcontrol_chip(kcontrol);
973 hda_nid_t nid = (hda_nid_t)kcontrol->private_value;
976 sel = snd_hda_codec_read(codec, nid, 0, AC_VERB_GET_CONNECT_SEL, 0) & 3;
977 if (ucontrol->value.enumerated.item[0] != sel) {
978 sel = ucontrol->value.enumerated.item[0] & 3;
979 snd_hda_codec_write_cache(codec, nid, 0,
980 AC_VERB_SET_CONNECT_SEL, sel);
986 #define PIN_CTL_TEST(xname,nid) { \
987 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, \
989 .subdevice = HDA_SUBDEV_NID_FLAG | nid, \
990 .info = alc_test_pin_ctl_info, \
991 .get = alc_test_pin_ctl_get, \
992 .put = alc_test_pin_ctl_put, \
993 .private_value = nid \
996 #define PIN_SRC_TEST(xname,nid) { \
997 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, \
999 .subdevice = HDA_SUBDEV_NID_FLAG | nid, \
1000 .info = alc_test_pin_src_info, \
1001 .get = alc_test_pin_src_get, \
1002 .put = alc_test_pin_src_put, \
1003 .private_value = nid \
1006 static const struct snd_kcontrol_new alc880_test_mixer[] = {
1007 HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT),
1008 HDA_CODEC_VOLUME("Surround Playback Volume", 0x0d, 0x0, HDA_OUTPUT),
1009 HDA_CODEC_VOLUME("CLFE Playback Volume", 0x0e, 0x0, HDA_OUTPUT),
1010 HDA_CODEC_VOLUME("Side Playback Volume", 0x0f, 0x0, HDA_OUTPUT),
1011 HDA_BIND_MUTE("Front Playback Switch", 0x0c, 2, HDA_INPUT),
1012 HDA_BIND_MUTE("Surround Playback Switch", 0x0d, 2, HDA_INPUT),
1013 HDA_BIND_MUTE("CLFE Playback Switch", 0x0e, 2, HDA_INPUT),
1014 HDA_BIND_MUTE("Side Playback Switch", 0x0f, 2, HDA_INPUT),
1015 PIN_CTL_TEST("Front Pin Mode", 0x14),
1016 PIN_CTL_TEST("Surround Pin Mode", 0x15),
1017 PIN_CTL_TEST("CLFE Pin Mode", 0x16),
1018 PIN_CTL_TEST("Side Pin Mode", 0x17),
1019 PIN_CTL_TEST("In-1 Pin Mode", 0x18),
1020 PIN_CTL_TEST("In-2 Pin Mode", 0x19),
1021 PIN_CTL_TEST("In-3 Pin Mode", 0x1a),
1022 PIN_CTL_TEST("In-4 Pin Mode", 0x1b),
1023 PIN_SRC_TEST("In-1 Pin Source", 0x18),
1024 PIN_SRC_TEST("In-2 Pin Source", 0x19),
1025 PIN_SRC_TEST("In-3 Pin Source", 0x1a),
1026 PIN_SRC_TEST("In-4 Pin Source", 0x1b),
1027 HDA_CODEC_VOLUME("In-1 Playback Volume", 0x0b, 0x0, HDA_INPUT),
1028 HDA_CODEC_MUTE("In-1 Playback Switch", 0x0b, 0x0, HDA_INPUT),
1029 HDA_CODEC_VOLUME("In-2 Playback Volume", 0x0b, 0x1, HDA_INPUT),
1030 HDA_CODEC_MUTE("In-2 Playback Switch", 0x0b, 0x1, HDA_INPUT),
1031 HDA_CODEC_VOLUME("In-3 Playback Volume", 0x0b, 0x2, HDA_INPUT),
1032 HDA_CODEC_MUTE("In-3 Playback Switch", 0x0b, 0x2, HDA_INPUT),
1033 HDA_CODEC_VOLUME("In-4 Playback Volume", 0x0b, 0x3, HDA_INPUT),
1034 HDA_CODEC_MUTE("In-4 Playback Switch", 0x0b, 0x3, HDA_INPUT),
1035 HDA_CODEC_VOLUME("CD Playback Volume", 0x0b, 0x4, HDA_INPUT),
1036 HDA_CODEC_MUTE("CD Playback Switch", 0x0b, 0x4, HDA_INPUT),
1038 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
1039 .name = "Channel Mode",
1040 .info = alc_ch_mode_info,
1041 .get = alc_ch_mode_get,
1042 .put = alc_ch_mode_put,
1047 static const struct hda_verb alc880_test_init_verbs[] = {
1048 /* Unmute inputs of 0x0c - 0x0f */
1049 {0x0c, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
1050 {0x0c, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)},
1051 {0x0d, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
1052 {0x0d, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)},
1053 {0x0e, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
1054 {0x0e, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)},
1055 {0x0f, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
1056 {0x0f, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)},
1057 /* Vol output for 0x0c-0x0f */
1058 {0x0c, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_ZERO},
1059 {0x0d, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_ZERO},
1060 {0x0e, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_ZERO},
1061 {0x0f, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_ZERO},
1062 /* Set output pins 0x14-0x17 */
1063 {0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
1064 {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
1065 {0x16, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
1066 {0x17, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
1067 /* Unmute output pins 0x14-0x17 */
1068 {0x14, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
1069 {0x15, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
1070 {0x16, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
1071 {0x17, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
1072 /* Set input pins 0x18-0x1c */
1073 {0x18, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80},
1074 {0x19, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80},
1075 {0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN},
1076 {0x1b, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN},
1077 {0x1c, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN},
1078 /* Mute input pins 0x18-0x1b */
1079 {0x18, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE},
1080 {0x19, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE},
1081 {0x1a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE},
1082 {0x1b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE},
1084 {0x07, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
1085 {0x07, AC_VERB_SET_CONNECT_SEL, 0x00},
1086 {0x08, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
1087 {0x08, AC_VERB_SET_CONNECT_SEL, 0x00},
1088 {0x09, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
1089 {0x09, AC_VERB_SET_CONNECT_SEL, 0x00},
1090 /* Analog input/passthru */
1091 {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
1092 {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(1)},
1093 {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(2)},
1094 {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(3)},
1095 {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(4)},
1103 static const char * const alc880_models[ALC880_MODEL_LAST] = {
1104 [ALC880_3ST] = "3stack",
1105 [ALC880_TCL_S700] = "tcl",
1106 [ALC880_3ST_DIG] = "3stack-digout",
1107 [ALC880_5ST] = "5stack",
1108 [ALC880_5ST_DIG] = "5stack-digout",
1109 [ALC880_Z71V] = "z71v",
1110 [ALC880_6ST] = "6stack",
1111 [ALC880_6ST_DIG] = "6stack-digout",
1112 [ALC880_ASUS] = "asus",
1113 [ALC880_ASUS_W1V] = "asus-w1v",
1114 [ALC880_ASUS_DIG] = "asus-dig",
1115 [ALC880_ASUS_DIG2] = "asus-dig2",
1116 [ALC880_UNIWILL_DIG] = "uniwill",
1117 [ALC880_UNIWILL_P53] = "uniwill-p53",
1118 [ALC880_FUJITSU] = "fujitsu",
1119 [ALC880_F1734] = "F1734",
1120 #ifdef CONFIG_SND_DEBUG
1121 [ALC880_TEST] = "test",
1123 [ALC880_AUTO] = "auto",
1126 static const struct snd_pci_quirk alc880_cfg_tbl[] = {
1127 SND_PCI_QUIRK(0x1019, 0xa880, "ECS", ALC880_5ST_DIG),
1128 SND_PCI_QUIRK(0x1019, 0xa884, "Acer APFV", ALC880_6ST),
1129 SND_PCI_QUIRK(0x1025, 0x0070, "ULI", ALC880_3ST_DIG),
1130 SND_PCI_QUIRK(0x1025, 0x0077, "ULI", ALC880_6ST_DIG),
1131 SND_PCI_QUIRK(0x1025, 0x0078, "ULI", ALC880_6ST_DIG),
1132 SND_PCI_QUIRK(0x1025, 0x0087, "ULI", ALC880_6ST_DIG),
1133 SND_PCI_QUIRK(0x1025, 0xe309, "ULI", ALC880_3ST_DIG),
1134 SND_PCI_QUIRK(0x1025, 0xe310, "ULI", ALC880_3ST),
1135 SND_PCI_QUIRK(0x1039, 0x1234, NULL, ALC880_6ST_DIG),
1136 SND_PCI_QUIRK(0x1043, 0x10b3, "ASUS W1V", ALC880_ASUS_W1V),
1137 SND_PCI_QUIRK(0x1043, 0x10c2, "ASUS W6A", ALC880_ASUS_DIG),
1138 SND_PCI_QUIRK(0x1043, 0x10c3, "ASUS Wxx", ALC880_ASUS_DIG),
1139 SND_PCI_QUIRK(0x1043, 0x1113, "ASUS", ALC880_ASUS_DIG),
1140 SND_PCI_QUIRK(0x1043, 0x1123, "ASUS", ALC880_ASUS_DIG),
1141 SND_PCI_QUIRK(0x1043, 0x1173, "ASUS", ALC880_ASUS_DIG),
1142 SND_PCI_QUIRK(0x1043, 0x1964, "ASUS Z71V", ALC880_Z71V),
1143 /* SND_PCI_QUIRK(0x1043, 0x1964, "ASUS", ALC880_ASUS_DIG), */
1144 SND_PCI_QUIRK(0x1043, 0x1973, "ASUS", ALC880_ASUS_DIG),
1145 SND_PCI_QUIRK(0x1043, 0x19b3, "ASUS", ALC880_ASUS_DIG),
1146 SND_PCI_QUIRK(0x1043, 0x814e, "ASUS P5GD1 w/SPDIF", ALC880_6ST_DIG),
1147 SND_PCI_QUIRK(0x1043, 0x8181, "ASUS P4GPL", ALC880_ASUS_DIG),
1148 SND_PCI_QUIRK(0x1043, 0x8196, "ASUS P5GD1", ALC880_6ST),
1149 SND_PCI_QUIRK(0x1043, 0x81b4, "ASUS", ALC880_6ST),
1150 SND_PCI_QUIRK_VENDOR(0x1043, "ASUS", ALC880_ASUS), /* default ASUS */
1151 SND_PCI_QUIRK(0x104d, 0x81a0, "Sony", ALC880_3ST),
1152 SND_PCI_QUIRK(0x104d, 0x81d6, "Sony", ALC880_3ST),
1153 SND_PCI_QUIRK(0x107b, 0x3032, "Gateway", ALC880_5ST),
1154 SND_PCI_QUIRK(0x107b, 0x3033, "Gateway", ALC880_5ST),
1155 SND_PCI_QUIRK(0x107b, 0x4039, "Gateway", ALC880_5ST),
1156 SND_PCI_QUIRK(0x1297, 0xc790, "Shuttle ST20G5", ALC880_6ST_DIG),
1157 SND_PCI_QUIRK(0x1458, 0xa102, "Gigabyte K8", ALC880_6ST_DIG),
1158 SND_PCI_QUIRK(0x1462, 0x1150, "MSI", ALC880_6ST_DIG),
1159 SND_PCI_QUIRK(0x1509, 0x925d, "FIC P4M", ALC880_6ST_DIG),
1160 SND_PCI_QUIRK(0x1558, 0x5401, "ASUS", ALC880_ASUS_DIG2),
1161 SND_PCI_QUIRK(0x1565, 0x8202, "Biostar", ALC880_5ST_DIG),
1162 SND_PCI_QUIRK(0x1584, 0x9050, "Uniwill", ALC880_UNIWILL_DIG),
1163 SND_PCI_QUIRK(0x1584, 0x9054, "Uniwill", ALC880_F1734),
1164 SND_PCI_QUIRK(0x1584, 0x9070, "Uniwill", ALC880_UNIWILL),
1165 SND_PCI_QUIRK(0x1584, 0x9077, "Uniwill P53", ALC880_UNIWILL_P53),
1166 SND_PCI_QUIRK(0x1695, 0x400d, "EPoX", ALC880_5ST_DIG),
1167 SND_PCI_QUIRK(0x1695, 0x4012, "EPox EP-5LDA", ALC880_5ST_DIG),
1168 SND_PCI_QUIRK(0x1734, 0x107c, "FSC F1734", ALC880_F1734),
1169 SND_PCI_QUIRK(0x1734, 0x1094, "FSC Amilo M1451G", ALC880_FUJITSU),
1170 SND_PCI_QUIRK(0x1734, 0x10ac, "FSC AMILO Xi 1526", ALC880_F1734),
1171 SND_PCI_QUIRK(0x1734, 0x10b0, "Fujitsu", ALC880_FUJITSU),
1172 SND_PCI_QUIRK(0x19db, 0x4188, "TCL S700", ALC880_TCL_S700),
1173 SND_PCI_QUIRK(0x2668, 0x8086, NULL, ALC880_6ST_DIG), /* broken BIOS */
1174 SND_PCI_QUIRK(0x8086, 0x2668, NULL, ALC880_6ST_DIG),
1175 SND_PCI_QUIRK(0x8086, 0xa100, "Intel mobo", ALC880_5ST_DIG),
1176 SND_PCI_QUIRK(0x8086, 0xd400, "Intel mobo", ALC880_5ST_DIG),
1177 SND_PCI_QUIRK(0x8086, 0xd401, "Intel mobo", ALC880_5ST_DIG),
1178 SND_PCI_QUIRK(0x8086, 0xd402, "Intel mobo", ALC880_3ST_DIG),
1179 SND_PCI_QUIRK(0x8086, 0xe224, "Intel mobo", ALC880_5ST_DIG),
1180 SND_PCI_QUIRK(0x8086, 0xe305, "Intel mobo", ALC880_3ST_DIG),
1181 SND_PCI_QUIRK(0x8086, 0xe308, "Intel mobo", ALC880_3ST_DIG),
1182 SND_PCI_QUIRK(0x8086, 0xe400, "Intel mobo", ALC880_5ST_DIG),
1183 SND_PCI_QUIRK(0x8086, 0xe401, "Intel mobo", ALC880_5ST_DIG),
1184 SND_PCI_QUIRK(0x8086, 0xe402, "Intel mobo", ALC880_5ST_DIG),
1186 SND_PCI_QUIRK_VENDOR(0x8086, "Intel mobo", ALC880_3ST),
1187 SND_PCI_QUIRK(0xa0a0, 0x0560, "AOpen i915GMm-HFS", ALC880_5ST_DIG),
1188 SND_PCI_QUIRK(0xe803, 0x1019, NULL, ALC880_6ST_DIG),
1193 * ALC880 codec presets
1195 static const struct alc_config_preset alc880_presets[] = {
1197 .mixers = { alc880_three_stack_mixer },
1198 .init_verbs = { alc880_volume_init_verbs,
1199 alc880_pin_3stack_init_verbs },
1200 .num_dacs = ARRAY_SIZE(alc880_dac_nids),
1201 .dac_nids = alc880_dac_nids,
1202 .num_channel_mode = ARRAY_SIZE(alc880_threestack_modes),
1203 .channel_mode = alc880_threestack_modes,
1205 .input_mux = &alc880_capture_source,
1207 [ALC880_3ST_DIG] = {
1208 .mixers = { alc880_three_stack_mixer },
1209 .init_verbs = { alc880_volume_init_verbs,
1210 alc880_pin_3stack_init_verbs },
1211 .num_dacs = ARRAY_SIZE(alc880_dac_nids),
1212 .dac_nids = alc880_dac_nids,
1213 .dig_out_nid = ALC880_DIGOUT_NID,
1214 .num_channel_mode = ARRAY_SIZE(alc880_threestack_modes),
1215 .channel_mode = alc880_threestack_modes,
1217 .input_mux = &alc880_capture_source,
1219 [ALC880_TCL_S700] = {
1220 .mixers = { alc880_tcl_s700_mixer },
1221 .init_verbs = { alc880_volume_init_verbs,
1222 alc880_pin_tcl_S700_init_verbs,
1223 alc880_gpio2_init_verbs },
1224 .num_dacs = ARRAY_SIZE(alc880_dac_nids),
1225 .dac_nids = alc880_dac_nids,
1226 .adc_nids = alc880_adc_nids_alt, /* FIXME: correct? */
1227 .num_adc_nids = 1, /* single ADC */
1229 .num_channel_mode = ARRAY_SIZE(alc880_2_jack_modes),
1230 .channel_mode = alc880_2_jack_modes,
1231 .input_mux = &alc880_capture_source,
1234 .mixers = { alc880_three_stack_mixer,
1235 alc880_five_stack_mixer},
1236 .init_verbs = { alc880_volume_init_verbs,
1237 alc880_pin_5stack_init_verbs },
1238 .num_dacs = ARRAY_SIZE(alc880_dac_nids),
1239 .dac_nids = alc880_dac_nids,
1240 .num_channel_mode = ARRAY_SIZE(alc880_fivestack_modes),
1241 .channel_mode = alc880_fivestack_modes,
1242 .input_mux = &alc880_capture_source,
1244 [ALC880_5ST_DIG] = {
1245 .mixers = { alc880_three_stack_mixer,
1246 alc880_five_stack_mixer },
1247 .init_verbs = { alc880_volume_init_verbs,
1248 alc880_pin_5stack_init_verbs },
1249 .num_dacs = ARRAY_SIZE(alc880_dac_nids),
1250 .dac_nids = alc880_dac_nids,
1251 .dig_out_nid = ALC880_DIGOUT_NID,
1252 .num_channel_mode = ARRAY_SIZE(alc880_fivestack_modes),
1253 .channel_mode = alc880_fivestack_modes,
1254 .input_mux = &alc880_capture_source,
1257 .mixers = { alc880_six_stack_mixer },
1258 .init_verbs = { alc880_volume_init_verbs,
1259 alc880_pin_6stack_init_verbs },
1260 .num_dacs = ARRAY_SIZE(alc880_6st_dac_nids),
1261 .dac_nids = alc880_6st_dac_nids,
1262 .num_channel_mode = ARRAY_SIZE(alc880_sixstack_modes),
1263 .channel_mode = alc880_sixstack_modes,
1264 .input_mux = &alc880_6stack_capture_source,
1266 [ALC880_6ST_DIG] = {
1267 .mixers = { alc880_six_stack_mixer },
1268 .init_verbs = { alc880_volume_init_verbs,
1269 alc880_pin_6stack_init_verbs },
1270 .num_dacs = ARRAY_SIZE(alc880_6st_dac_nids),
1271 .dac_nids = alc880_6st_dac_nids,
1272 .dig_out_nid = ALC880_DIGOUT_NID,
1273 .num_channel_mode = ARRAY_SIZE(alc880_sixstack_modes),
1274 .channel_mode = alc880_sixstack_modes,
1275 .input_mux = &alc880_6stack_capture_source,
1278 .mixers = { alc880_z71v_mixer },
1279 .init_verbs = { alc880_volume_init_verbs,
1280 alc880_pin_z71v_init_verbs },
1281 .num_dacs = ARRAY_SIZE(alc880_z71v_dac_nids),
1282 .dac_nids = alc880_z71v_dac_nids,
1283 .dig_out_nid = ALC880_DIGOUT_NID,
1285 .num_channel_mode = ARRAY_SIZE(alc880_2_jack_modes),
1286 .channel_mode = alc880_2_jack_modes,
1287 .input_mux = &alc880_capture_source,
1290 .mixers = { alc880_f1734_mixer },
1291 .init_verbs = { alc880_volume_init_verbs,
1292 alc880_pin_f1734_init_verbs },
1293 .num_dacs = ARRAY_SIZE(alc880_f1734_dac_nids),
1294 .dac_nids = alc880_f1734_dac_nids,
1296 .num_channel_mode = ARRAY_SIZE(alc880_2_jack_modes),
1297 .channel_mode = alc880_2_jack_modes,
1298 .input_mux = &alc880_f1734_capture_source,
1299 .unsol_event = alc880_uniwill_p53_unsol_event,
1300 .setup = alc880_uniwill_p53_setup,
1301 .init_hook = alc_hp_automute,
1304 .mixers = { alc880_asus_mixer },
1305 .init_verbs = { alc880_volume_init_verbs,
1306 alc880_pin_asus_init_verbs,
1307 alc880_gpio1_init_verbs },
1308 .num_dacs = ARRAY_SIZE(alc880_asus_dac_nids),
1309 .dac_nids = alc880_asus_dac_nids,
1310 .num_channel_mode = ARRAY_SIZE(alc880_asus_modes),
1311 .channel_mode = alc880_asus_modes,
1313 .input_mux = &alc880_capture_source,
1315 [ALC880_ASUS_DIG] = {
1316 .mixers = { alc880_asus_mixer },
1317 .init_verbs = { alc880_volume_init_verbs,
1318 alc880_pin_asus_init_verbs,
1319 alc880_gpio1_init_verbs },
1320 .num_dacs = ARRAY_SIZE(alc880_asus_dac_nids),
1321 .dac_nids = alc880_asus_dac_nids,
1322 .dig_out_nid = ALC880_DIGOUT_NID,
1323 .num_channel_mode = ARRAY_SIZE(alc880_asus_modes),
1324 .channel_mode = alc880_asus_modes,
1326 .input_mux = &alc880_capture_source,
1328 [ALC880_ASUS_DIG2] = {
1329 .mixers = { alc880_asus_mixer },
1330 .init_verbs = { alc880_volume_init_verbs,
1331 alc880_pin_asus_init_verbs,
1332 alc880_gpio2_init_verbs }, /* use GPIO2 */
1333 .num_dacs = ARRAY_SIZE(alc880_asus_dac_nids),
1334 .dac_nids = alc880_asus_dac_nids,
1335 .dig_out_nid = ALC880_DIGOUT_NID,
1336 .num_channel_mode = ARRAY_SIZE(alc880_asus_modes),
1337 .channel_mode = alc880_asus_modes,
1339 .input_mux = &alc880_capture_source,
1341 [ALC880_ASUS_W1V] = {
1342 .mixers = { alc880_asus_mixer, alc880_asus_w1v_mixer },
1343 .init_verbs = { alc880_volume_init_verbs,
1344 alc880_pin_asus_init_verbs,
1345 alc880_gpio1_init_verbs },
1346 .num_dacs = ARRAY_SIZE(alc880_asus_dac_nids),
1347 .dac_nids = alc880_asus_dac_nids,
1348 .dig_out_nid = ALC880_DIGOUT_NID,
1349 .num_channel_mode = ARRAY_SIZE(alc880_asus_modes),
1350 .channel_mode = alc880_asus_modes,
1352 .input_mux = &alc880_capture_source,
1354 [ALC880_UNIWILL_DIG] = {
1355 .mixers = { alc880_asus_mixer },
1356 .init_verbs = { alc880_volume_init_verbs,
1357 alc880_pin_asus_init_verbs },
1358 .num_dacs = ARRAY_SIZE(alc880_asus_dac_nids),
1359 .dac_nids = alc880_asus_dac_nids,
1360 .dig_out_nid = ALC880_DIGOUT_NID,
1361 .num_channel_mode = ARRAY_SIZE(alc880_asus_modes),
1362 .channel_mode = alc880_asus_modes,
1364 .input_mux = &alc880_capture_source,
1366 [ALC880_UNIWILL] = {
1367 .mixers = { alc880_uniwill_mixer },
1368 .init_verbs = { alc880_volume_init_verbs,
1369 alc880_uniwill_init_verbs },
1370 .num_dacs = ARRAY_SIZE(alc880_asus_dac_nids),
1371 .dac_nids = alc880_asus_dac_nids,
1372 .dig_out_nid = ALC880_DIGOUT_NID,
1373 .num_channel_mode = ARRAY_SIZE(alc880_threestack_modes),
1374 .channel_mode = alc880_threestack_modes,
1376 .input_mux = &alc880_capture_source,
1377 .unsol_event = alc880_uniwill_unsol_event,
1378 .setup = alc880_uniwill_setup,
1379 .init_hook = alc880_uniwill_init_hook,
1381 [ALC880_UNIWILL_P53] = {
1382 .mixers = { alc880_uniwill_p53_mixer },
1383 .init_verbs = { alc880_volume_init_verbs,
1384 alc880_uniwill_p53_init_verbs },
1385 .num_dacs = ARRAY_SIZE(alc880_asus_dac_nids),
1386 .dac_nids = alc880_asus_dac_nids,
1387 .num_channel_mode = ARRAY_SIZE(alc880_threestack_modes),
1388 .channel_mode = alc880_threestack_modes,
1389 .input_mux = &alc880_capture_source,
1390 .unsol_event = alc880_uniwill_p53_unsol_event,
1391 .setup = alc880_uniwill_p53_setup,
1392 .init_hook = alc_hp_automute,
1394 [ALC880_FUJITSU] = {
1395 .mixers = { alc880_fujitsu_mixer },
1396 .init_verbs = { alc880_volume_init_verbs,
1397 alc880_uniwill_p53_init_verbs,
1398 alc880_beep_init_verbs },
1399 .num_dacs = ARRAY_SIZE(alc880_dac_nids),
1400 .dac_nids = alc880_dac_nids,
1401 .dig_out_nid = ALC880_DIGOUT_NID,
1402 .num_channel_mode = ARRAY_SIZE(alc880_2_jack_modes),
1403 .channel_mode = alc880_2_jack_modes,
1404 .input_mux = &alc880_capture_source,
1405 .unsol_event = alc880_uniwill_p53_unsol_event,
1406 .setup = alc880_uniwill_p53_setup,
1407 .init_hook = alc_hp_automute,
1409 #ifdef CONFIG_SND_DEBUG
1411 .mixers = { alc880_test_mixer },
1412 .init_verbs = { alc880_test_init_verbs },
1413 .num_dacs = ARRAY_SIZE(alc880_test_dac_nids),
1414 .dac_nids = alc880_test_dac_nids,
1415 .dig_out_nid = ALC880_DIGOUT_NID,
1416 .num_channel_mode = ARRAY_SIZE(alc880_test_modes),
1417 .channel_mode = alc880_test_modes,
1418 .input_mux = &alc880_test_capture_source,