2 * ALC882/ALC883/ALC888/ALC889 quirk models
3 * included by patch_realtek.c
32 ALC888_ACER_ASPIRE_4930G
,
33 ALC888_ACER_ASPIRE_6530G
,
34 ALC888_ACER_ASPIRE_8930G
,
35 ALC888_ACER_ASPIRE_7730G
,
37 ALC883_MEDION_WIM2160
,
39 ALC883_LENOVO_101E_2ch
,
41 ALC888_LENOVO_MS7195_DIG
,
49 ALC883_FUJITSU_PI2515
,
50 ALC888_FUJITSU_XA3530
,
65 static const struct hda_verb alc888_4ST_ch2_intel_init
[] = {
66 /* Mic-in jack as mic in */
67 { 0x18, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_VREF80
},
68 { 0x18, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_MUTE
},
69 /* Line-in jack as Line in */
70 { 0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_IN
},
71 { 0x1a, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_MUTE
},
72 /* Line-Out as Front */
73 { 0x17, AC_VERB_SET_CONNECT_SEL
, 0x00},
80 static const struct hda_verb alc888_4ST_ch4_intel_init
[] = {
81 /* Mic-in jack as mic in */
82 { 0x18, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_VREF80
},
83 { 0x18, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_MUTE
},
84 /* Line-in jack as Surround */
85 { 0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_OUT
},
86 { 0x1a, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_UNMUTE
},
87 /* Line-Out as Front */
88 { 0x17, AC_VERB_SET_CONNECT_SEL
, 0x00},
95 static const struct hda_verb alc888_4ST_ch6_intel_init
[] = {
96 /* Mic-in jack as CLFE */
97 { 0x18, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_OUT
},
98 { 0x18, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_UNMUTE
},
99 /* Line-in jack as Surround */
100 { 0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_OUT
},
101 { 0x1a, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_UNMUTE
},
102 /* Line-Out as CLFE (workaround because Mic-in is not loud enough) */
103 { 0x17, AC_VERB_SET_CONNECT_SEL
, 0x03},
110 static const struct hda_verb alc888_4ST_ch8_intel_init
[] = {
111 /* Mic-in jack as CLFE */
112 { 0x18, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_OUT
},
113 { 0x18, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_UNMUTE
},
114 /* Line-in jack as Surround */
115 { 0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_OUT
},
116 { 0x1a, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_UNMUTE
},
117 /* Line-Out as Side */
118 { 0x17, AC_VERB_SET_CONNECT_SEL
, 0x03},
122 static const struct hda_channel_mode alc888_4ST_8ch_intel_modes
[4] = {
123 { 2, alc888_4ST_ch2_intel_init
},
124 { 4, alc888_4ST_ch4_intel_init
},
125 { 6, alc888_4ST_ch6_intel_init
},
126 { 8, alc888_4ST_ch8_intel_init
},
130 * ALC888 Fujitsu Siemens Amillo xa3530
133 static const struct hda_verb alc888_fujitsu_xa3530_verbs
[] = {
134 /* Front Mic: set to PIN_IN (empty by default) */
135 {0x12, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_IN
},
136 /* Connect Internal HP to Front */
137 {0x14, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_OUT
},
138 {0x14, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_UNMUTE
},
139 {0x14, AC_VERB_SET_CONNECT_SEL
, 0x00},
140 /* Connect Bass HP to Front */
141 {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_OUT
},
142 {0x15, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_UNMUTE
},
143 {0x15, AC_VERB_SET_CONNECT_SEL
, 0x00},
144 /* Connect Line-Out side jack (SPDIF) to Side */
145 {0x17, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_OUT
},
146 {0x17, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_UNMUTE
},
147 {0x17, AC_VERB_SET_CONNECT_SEL
, 0x03},
148 /* Connect Mic jack to CLFE */
149 {0x18, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_OUT
},
150 {0x18, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_UNMUTE
},
151 {0x18, AC_VERB_SET_CONNECT_SEL
, 0x02},
152 /* Connect Line-in jack to Surround */
153 {0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_OUT
},
154 {0x1a, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_UNMUTE
},
155 {0x1a, AC_VERB_SET_CONNECT_SEL
, 0x01},
156 /* Connect HP out jack to Front */
157 {0x1b, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_OUT
},
158 {0x1b, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_UNMUTE
},
159 {0x1b, AC_VERB_SET_CONNECT_SEL
, 0x00},
160 /* Enable unsolicited event for HP jack and Line-out jack */
161 {0x1b, AC_VERB_SET_UNSOLICITED_ENABLE
, ALC_HP_EVENT
| AC_USRSP_EN
},
162 {0x17, AC_VERB_SET_UNSOLICITED_ENABLE
, ALC_HP_EVENT
| AC_USRSP_EN
},
166 static void alc889_automute_setup(struct hda_codec
*codec
)
168 struct alc_spec
*spec
= codec
->spec
;
170 spec
->autocfg
.hp_pins
[0] = 0x15;
171 spec
->autocfg
.speaker_pins
[0] = 0x14;
172 spec
->autocfg
.speaker_pins
[1] = 0x16;
173 spec
->autocfg
.speaker_pins
[2] = 0x17;
174 spec
->autocfg
.speaker_pins
[3] = 0x19;
175 spec
->autocfg
.speaker_pins
[4] = 0x1a;
177 spec
->automute_mode
= ALC_AUTOMUTE_AMP
;
180 static void alc889_intel_init_hook(struct hda_codec
*codec
)
182 alc889_coef_init(codec
);
183 alc_hp_automute(codec
);
186 static void alc888_fujitsu_xa3530_setup(struct hda_codec
*codec
)
188 struct alc_spec
*spec
= codec
->spec
;
190 spec
->autocfg
.hp_pins
[0] = 0x17; /* line-out */
191 spec
->autocfg
.hp_pins
[1] = 0x1b; /* hp */
192 spec
->autocfg
.speaker_pins
[0] = 0x14; /* speaker */
193 spec
->autocfg
.speaker_pins
[1] = 0x15; /* bass */
195 spec
->automute_mode
= ALC_AUTOMUTE_AMP
;
199 * ALC888 Acer Aspire 4930G model
202 static const struct hda_verb alc888_acer_aspire_4930g_verbs
[] = {
203 /* Front Mic: set to PIN_IN (empty by default) */
204 {0x12, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_IN
},
205 /* Unselect Front Mic by default in input mixer 3 */
206 {0x22, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_IN_MUTE(0xb)},
207 /* Enable unsolicited event for HP jack */
208 {0x15, AC_VERB_SET_UNSOLICITED_ENABLE
, ALC_HP_EVENT
| AC_USRSP_EN
},
209 /* Connect Internal HP to front */
210 {0x14, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_OUT
},
211 {0x14, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_UNMUTE
},
212 {0x14, AC_VERB_SET_CONNECT_SEL
, 0x00},
213 /* Connect HP out to front */
214 {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_OUT
},
215 {0x15, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_UNMUTE
},
216 {0x15, AC_VERB_SET_CONNECT_SEL
, 0x00},
217 {0x15, AC_VERB_SET_EAPD_BTLENABLE
, 2},
222 * ALC888 Acer Aspire 6530G model
225 static const struct hda_verb alc888_acer_aspire_6530g_verbs
[] = {
226 /* Route to built-in subwoofer as well as speakers */
227 {0x0c, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_IN_UNMUTE(0)},
228 {0x0c, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_IN_UNMUTE(1)},
229 {0x0f, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_IN_UNMUTE(0)},
230 {0x0f, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_IN_UNMUTE(1)},
231 /* Bias voltage on for external mic port */
232 {0x18, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_IN
| PIN_VREF80
},
233 /* Front Mic: set to PIN_IN (empty by default) */
234 {0x12, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_IN
},
235 /* Unselect Front Mic by default in input mixer 3 */
236 {0x22, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_IN_MUTE(0xb)},
237 /* Enable unsolicited event for HP jack */
238 {0x15, AC_VERB_SET_UNSOLICITED_ENABLE
, ALC_HP_EVENT
| AC_USRSP_EN
},
239 /* Enable speaker output */
240 {0x14, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_OUT
},
241 {0x14, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_UNMUTE
},
242 {0x14, AC_VERB_SET_EAPD_BTLENABLE
, 2},
243 /* Enable headphone output */
244 {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_OUT
| PIN_HP
},
245 {0x15, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_UNMUTE
},
246 {0x15, AC_VERB_SET_CONNECT_SEL
, 0x00},
247 {0x15, AC_VERB_SET_EAPD_BTLENABLE
, 2},
252 *ALC888 Acer Aspire 7730G model
255 static const struct hda_verb alc888_acer_aspire_7730G_verbs
[] = {
256 /* Bias voltage on for external mic port */
257 {0x18, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_IN
| PIN_VREF80
},
258 /* Front Mic: set to PIN_IN (empty by default) */
259 {0x12, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_IN
},
260 /* Unselect Front Mic by default in input mixer 3 */
261 {0x22, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_IN_MUTE(0xb)},
262 /* Enable unsolicited event for HP jack */
263 {0x15, AC_VERB_SET_UNSOLICITED_ENABLE
, ALC_HP_EVENT
| AC_USRSP_EN
},
264 /* Enable speaker output */
265 {0x14, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_OUT
},
266 {0x14, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_UNMUTE
},
267 {0x14, AC_VERB_SET_EAPD_BTLENABLE
, 2},
268 /* Enable headphone output */
269 {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_OUT
| PIN_HP
},
270 {0x15, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_UNMUTE
},
271 {0x15, AC_VERB_SET_CONNECT_SEL
, 0x00},
272 {0x15, AC_VERB_SET_EAPD_BTLENABLE
, 2},
273 /*Enable internal subwoofer */
274 {0x17, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_OUT
},
275 {0x17, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_UNMUTE
},
276 {0x17, AC_VERB_SET_CONNECT_SEL
, 0x02},
277 {0x17, AC_VERB_SET_EAPD_BTLENABLE
, 2},
282 * ALC889 Acer Aspire 8930G model
285 static const struct hda_verb alc889_acer_aspire_8930g_verbs
[] = {
286 /* Front Mic: set to PIN_IN (empty by default) */
287 {0x12, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_IN
},
288 /* Unselect Front Mic by default in input mixer 3 */
289 {0x22, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_IN_MUTE(0xb)},
290 /* Enable unsolicited event for HP jack */
291 {0x15, AC_VERB_SET_UNSOLICITED_ENABLE
, ALC_HP_EVENT
| AC_USRSP_EN
},
292 /* Connect Internal Front to Front */
293 {0x14, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_OUT
},
294 {0x14, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_UNMUTE
},
295 {0x14, AC_VERB_SET_CONNECT_SEL
, 0x00},
296 /* Connect Internal Rear to Rear */
297 {0x1b, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_OUT
},
298 {0x1b, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_UNMUTE
},
299 {0x1b, AC_VERB_SET_CONNECT_SEL
, 0x01},
300 /* Connect Internal CLFE to CLFE */
301 {0x16, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_OUT
},
302 {0x16, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_UNMUTE
},
303 {0x16, AC_VERB_SET_CONNECT_SEL
, 0x02},
304 /* Connect HP out to Front */
305 {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_OUT
| PIN_HP
},
306 {0x15, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_UNMUTE
},
307 {0x15, AC_VERB_SET_CONNECT_SEL
, 0x00},
308 /* Enable all DACs */
309 /* DAC DISABLE/MUTE 1? */
310 /* setting bits 1-5 disables DAC nids 0x02-0x06 apparently. Init=0x38 */
311 {0x20, AC_VERB_SET_COEF_INDEX
, 0x03},
312 {0x20, AC_VERB_SET_PROC_COEF
, 0x0000},
313 /* DAC DISABLE/MUTE 2? */
314 /* some bit here disables the other DACs. Init=0x4900 */
315 {0x20, AC_VERB_SET_COEF_INDEX
, 0x08},
316 {0x20, AC_VERB_SET_PROC_COEF
, 0x0000},
318 * This laptop has a stereo digital microphone. The mics are only 1cm apart
319 * which makes the stereo useless. However, either the mic or the ALC889
320 * makes the signal become a difference/sum signal instead of standard
321 * stereo, which is annoying. So instead we flip this bit which makes the
322 * codec replicate the sum signal to both channels, turning it into a
325 /* DMIC_CONTROL? Init value = 0x0001 */
326 {0x20, AC_VERB_SET_COEF_INDEX
, 0x0b},
327 {0x20, AC_VERB_SET_PROC_COEF
, 0x0003},
331 static const struct hda_input_mux alc888_2_capture_sources
[2] = {
332 /* Front mic only available on one ADC */
339 { "Front Mic", 0xb },
352 static const struct hda_input_mux alc888_acer_aspire_6530_sources
[2] = {
353 /* Interal mic only available on one ADC */
360 { "Input Mix", 0xa },
361 { "Internal Mic", 0xb },
370 { "Input Mix", 0xa },
375 static const struct hda_input_mux alc889_capture_sources
[3] = {
376 /* Digital mic only available on first "ADC" */
383 { "Front Mic", 0xb },
384 { "Input Mix", 0xa },
393 { "Input Mix", 0xa },
402 { "Input Mix", 0xa },
407 static const struct snd_kcontrol_new alc888_base_mixer
[] = {
408 HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT
),
409 HDA_BIND_MUTE("Front Playback Switch", 0x0c, 2, HDA_INPUT
),
410 HDA_CODEC_VOLUME("Surround Playback Volume", 0x0d, 0x0, HDA_OUTPUT
),
411 HDA_BIND_MUTE("Surround Playback Switch", 0x0d, 2, HDA_INPUT
),
412 HDA_CODEC_VOLUME_MONO("Center Playback Volume", 0x0e, 1, 0x0,
414 HDA_CODEC_VOLUME_MONO("LFE Playback Volume", 0x0e, 2, 0x0, HDA_OUTPUT
),
415 HDA_BIND_MUTE_MONO("Center Playback Switch", 0x0e, 1, 2, HDA_INPUT
),
416 HDA_BIND_MUTE_MONO("LFE Playback Switch", 0x0e, 2, 2, HDA_INPUT
),
417 HDA_CODEC_VOLUME("Side Playback Volume", 0x0f, 0x0, HDA_OUTPUT
),
418 HDA_BIND_MUTE("Side Playback Switch", 0x0f, 2, HDA_INPUT
),
419 HDA_CODEC_VOLUME("CD Playback Volume", 0x0b, 0x04, HDA_INPUT
),
420 HDA_CODEC_MUTE("CD Playback Switch", 0x0b, 0x04, HDA_INPUT
),
421 HDA_CODEC_VOLUME("Line Playback Volume", 0x0b, 0x02, HDA_INPUT
),
422 HDA_CODEC_MUTE("Line Playback Switch", 0x0b, 0x02, HDA_INPUT
),
423 HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT
),
424 HDA_CODEC_VOLUME("Mic Boost Volume", 0x18, 0, HDA_INPUT
),
425 HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT
),
429 static const struct snd_kcontrol_new alc888_acer_aspire_4930g_mixer
[] = {
430 HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT
),
431 HDA_BIND_MUTE("Front Playback Switch", 0x0c, 2, HDA_INPUT
),
432 HDA_CODEC_VOLUME("Surround Playback Volume", 0x0d, 0x0, HDA_OUTPUT
),
433 HDA_BIND_MUTE("Surround Playback Switch", 0x0d, 2, HDA_INPUT
),
434 HDA_CODEC_VOLUME_MONO("Center Playback Volume", 0x0e, 1, 0x0,
436 HDA_BIND_MUTE_MONO("Center Playback Switch", 0x0e, 1, 2, HDA_INPUT
),
437 HDA_CODEC_VOLUME_MONO("LFE Playback Volume", 0x0e, 2, 0x0, HDA_OUTPUT
),
438 HDA_BIND_MUTE_MONO("LFE Playback Switch", 0x0e, 2, 2, HDA_INPUT
),
439 HDA_CODEC_VOLUME_MONO("Internal LFE Playback Volume", 0x0f, 1, 0x0, HDA_OUTPUT
),
440 HDA_BIND_MUTE_MONO("Internal LFE Playback Switch", 0x0f, 1, 2, HDA_INPUT
),
441 HDA_CODEC_VOLUME("CD Playback Volume", 0x0b, 0x04, HDA_INPUT
),
442 HDA_CODEC_MUTE("CD Playback Switch", 0x0b, 0x04, HDA_INPUT
),
443 HDA_CODEC_VOLUME("Line Playback Volume", 0x0b, 0x02, HDA_INPUT
),
444 HDA_CODEC_MUTE("Line Playback Switch", 0x0b, 0x02, HDA_INPUT
),
445 HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT
),
446 HDA_CODEC_VOLUME("Mic Boost Volume", 0x18, 0, HDA_INPUT
),
447 HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT
),
451 static const struct snd_kcontrol_new alc889_acer_aspire_8930g_mixer
[] = {
452 HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT
),
453 HDA_BIND_MUTE("Front Playback Switch", 0x0c, 2, HDA_INPUT
),
454 HDA_CODEC_VOLUME("Surround Playback Volume", 0x0d, 0x0, HDA_OUTPUT
),
455 HDA_BIND_MUTE("Surround Playback Switch", 0x0d, 2, HDA_INPUT
),
456 HDA_CODEC_VOLUME_MONO("Center Playback Volume", 0x0e, 1, 0x0,
458 HDA_CODEC_VOLUME_MONO("LFE Playback Volume", 0x0e, 2, 0x0, HDA_OUTPUT
),
459 HDA_BIND_MUTE_MONO("Center Playback Switch", 0x0e, 1, 2, HDA_INPUT
),
460 HDA_BIND_MUTE_MONO("LFE Playback Switch", 0x0e, 2, 2, HDA_INPUT
),
461 HDA_CODEC_VOLUME("Line Playback Volume", 0x0b, 0x02, HDA_INPUT
),
462 HDA_CODEC_MUTE("Line Playback Switch", 0x0b, 0x02, HDA_INPUT
),
463 HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT
),
464 HDA_CODEC_VOLUME("Mic Boost Volume", 0x18, 0, HDA_INPUT
),
465 HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT
),
470 static void alc888_acer_aspire_4930g_setup(struct hda_codec
*codec
)
472 struct alc_spec
*spec
= codec
->spec
;
474 spec
->autocfg
.hp_pins
[0] = 0x15;
475 spec
->autocfg
.speaker_pins
[0] = 0x14;
476 spec
->autocfg
.speaker_pins
[1] = 0x16;
477 spec
->autocfg
.speaker_pins
[2] = 0x17;
479 spec
->automute_mode
= ALC_AUTOMUTE_AMP
;
482 static void alc888_acer_aspire_6530g_setup(struct hda_codec
*codec
)
484 struct alc_spec
*spec
= codec
->spec
;
486 spec
->autocfg
.hp_pins
[0] = 0x15;
487 spec
->autocfg
.speaker_pins
[0] = 0x14;
488 spec
->autocfg
.speaker_pins
[1] = 0x16;
489 spec
->autocfg
.speaker_pins
[2] = 0x17;
491 spec
->automute_mode
= ALC_AUTOMUTE_AMP
;
494 static void alc888_acer_aspire_7730g_setup(struct hda_codec
*codec
)
496 struct alc_spec
*spec
= codec
->spec
;
498 spec
->autocfg
.hp_pins
[0] = 0x15;
499 spec
->autocfg
.speaker_pins
[0] = 0x14;
500 spec
->autocfg
.speaker_pins
[1] = 0x16;
501 spec
->autocfg
.speaker_pins
[2] = 0x17;
503 spec
->automute_mode
= ALC_AUTOMUTE_AMP
;
506 static void alc889_acer_aspire_8930g_setup(struct hda_codec
*codec
)
508 struct alc_spec
*spec
= codec
->spec
;
510 spec
->autocfg
.hp_pins
[0] = 0x15;
511 spec
->autocfg
.speaker_pins
[0] = 0x14;
512 spec
->autocfg
.speaker_pins
[1] = 0x16;
513 spec
->autocfg
.speaker_pins
[2] = 0x1b;
515 spec
->automute_mode
= ALC_AUTOMUTE_AMP
;
518 #define ALC882_DIGOUT_NID 0x06
519 #define ALC882_DIGIN_NID 0x0a
520 #define ALC883_DIGOUT_NID ALC882_DIGOUT_NID
521 #define ALC883_DIGIN_NID ALC882_DIGIN_NID
522 #define ALC1200_DIGOUT_NID 0x10
525 static const struct hda_channel_mode alc882_ch_modes
[1] = {
530 static const hda_nid_t alc882_dac_nids
[4] = {
531 /* front, rear, clfe, rear_surr */
532 0x02, 0x03, 0x04, 0x05
534 #define alc883_dac_nids alc882_dac_nids
537 #define alc882_adc_nids alc880_adc_nids
538 #define alc882_adc_nids_alt alc880_adc_nids_alt
539 #define alc883_adc_nids alc882_adc_nids_alt
540 static const hda_nid_t alc883_adc_nids_alt
[1] = { 0x08 };
541 static const hda_nid_t alc883_adc_nids_rev
[2] = { 0x09, 0x08 };
542 #define alc889_adc_nids alc880_adc_nids
544 static const hda_nid_t alc882_capsrc_nids
[3] = { 0x24, 0x23, 0x22 };
545 static const hda_nid_t alc882_capsrc_nids_alt
[2] = { 0x23, 0x22 };
546 #define alc883_capsrc_nids alc882_capsrc_nids_alt
547 static const hda_nid_t alc883_capsrc_nids_rev
[2] = { 0x22, 0x23 };
548 #define alc889_capsrc_nids alc882_capsrc_nids
551 /* FIXME: should be a matrix-type input source selection */
553 static const struct hda_input_mux alc882_capture_source
= {
557 { "Front Mic", 0x1 },
563 #define alc883_capture_source alc882_capture_source
565 static const struct hda_input_mux alc889_capture_source
= {
568 { "Front Mic", 0x0 },
574 static const struct hda_input_mux mb5_capture_source
= {
583 static const struct hda_input_mux macmini3_capture_source
= {
591 static const struct hda_input_mux alc883_3stack_6ch_intel
= {
595 { "Front Mic", 0x0 },
601 static const struct hda_input_mux alc883_lenovo_101e_capture_source
= {
609 static const struct hda_input_mux alc883_lenovo_nb0763_capture_source
= {
613 { "Internal Mic", 0x1 },
619 static const struct hda_input_mux alc883_fujitsu_pi2515_capture_source
= {
623 { "Internal Mic", 0x1 },
627 static const struct hda_input_mux alc883_lenovo_sky_capture_source
= {
631 { "Front Mic", 0x1 },
636 static const struct hda_input_mux alc883_asus_eee1601_capture_source
= {
644 static const struct hda_input_mux alc889A_mb31_capture_source
= {
648 /* Front Mic (0x01) unused */
650 /* Line 2 (0x03) unused */
651 /* CD (0x04) unused? */
655 static const struct hda_input_mux alc889A_imac91_capture_source
= {
659 { "Line", 0x2 }, /* Not sure! */
666 static const struct hda_channel_mode alc883_3ST_2ch_modes
[1] = {
673 static const struct hda_verb alc882_3ST_ch2_init
[] = {
674 { 0x18, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_VREF80
},
675 { 0x18, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_MUTE
},
676 { 0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_IN
},
677 { 0x1a, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_MUTE
},
684 static const struct hda_verb alc882_3ST_ch4_init
[] = {
685 { 0x18, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_VREF80
},
686 { 0x18, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_MUTE
},
687 { 0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_OUT
},
688 { 0x1a, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_UNMUTE
},
689 { 0x1a, AC_VERB_SET_CONNECT_SEL
, 0x01 },
696 static const struct hda_verb alc882_3ST_ch6_init
[] = {
697 { 0x18, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_OUT
},
698 { 0x18, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_UNMUTE
},
699 { 0x18, AC_VERB_SET_CONNECT_SEL
, 0x02 },
700 { 0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_OUT
},
701 { 0x1a, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_UNMUTE
},
702 { 0x1a, AC_VERB_SET_CONNECT_SEL
, 0x01 },
706 static const struct hda_channel_mode alc882_3ST_6ch_modes
[3] = {
707 { 2, alc882_3ST_ch2_init
},
708 { 4, alc882_3ST_ch4_init
},
709 { 6, alc882_3ST_ch6_init
},
712 #define alc883_3ST_6ch_modes alc882_3ST_6ch_modes
717 static const struct hda_verb alc883_3ST_ch2_clevo_init
[] = {
718 { 0x15, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_HP
},
719 { 0x18, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_VREF80
},
720 { 0x18, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_MUTE
},
721 { 0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_IN
},
722 { 0x1a, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_MUTE
},
729 static const struct hda_verb alc883_3ST_ch4_clevo_init
[] = {
730 { 0x15, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_OUT
},
731 { 0x18, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_VREF80
},
732 { 0x18, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_MUTE
},
733 { 0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_OUT
},
734 { 0x1a, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_UNMUTE
},
735 { 0x1a, AC_VERB_SET_CONNECT_SEL
, 0x01 },
742 static const struct hda_verb alc883_3ST_ch6_clevo_init
[] = {
743 { 0x15, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_OUT
},
744 { 0x18, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_OUT
},
745 { 0x18, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_UNMUTE
},
746 { 0x18, AC_VERB_SET_CONNECT_SEL
, 0x02 },
747 { 0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_OUT
},
748 { 0x1a, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_UNMUTE
},
749 { 0x1a, AC_VERB_SET_CONNECT_SEL
, 0x01 },
753 static const struct hda_channel_mode alc883_3ST_6ch_clevo_modes
[3] = {
754 { 2, alc883_3ST_ch2_clevo_init
},
755 { 4, alc883_3ST_ch4_clevo_init
},
756 { 6, alc883_3ST_ch6_clevo_init
},
763 static const struct hda_verb alc882_sixstack_ch6_init
[] = {
764 { 0x17, AC_VERB_SET_PIN_WIDGET_CONTROL
, 0x00 },
765 { 0x16, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_OUT
},
766 { 0x15, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_OUT
},
767 { 0x14, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_OUT
},
774 static const struct hda_verb alc882_sixstack_ch8_init
[] = {
775 { 0x17, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_OUT
},
776 { 0x16, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_OUT
},
777 { 0x15, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_OUT
},
778 { 0x14, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_OUT
},
782 static const struct hda_channel_mode alc882_sixstack_modes
[2] = {
783 { 6, alc882_sixstack_ch6_init
},
784 { 8, alc882_sixstack_ch8_init
},
788 /* Macbook Air 2,1 */
790 static const struct hda_channel_mode alc885_mba21_ch_modes
[1] = {
795 * macbook pro ALC885 can switch LineIn to LineOut without losing Mic
801 static const struct hda_verb alc885_mbp_ch2_init
[] = {
802 { 0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_IN
},
803 { 0x0d, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_IN_MUTE(0)},
804 { 0x0d, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_IN_MUTE(1)},
811 static const struct hda_verb alc885_mbp_ch4_init
[] = {
812 { 0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_OUT
},
813 { 0x1a, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_UNMUTE
},
814 { 0x1a, AC_VERB_SET_CONNECT_SEL
, 0x01 },
815 { 0x0d, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_IN_UNMUTE(0)},
816 { 0x0d, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_IN_UNMUTE(1)},
820 static const struct hda_channel_mode alc885_mbp_4ch_modes
[2] = {
821 { 2, alc885_mbp_ch2_init
},
822 { 4, alc885_mbp_ch4_init
},
827 * Speakers/Woofer/HP = Front
830 static const struct hda_verb alc885_mb5_ch2_init
[] = {
831 {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_IN
},
832 {0x15, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_MUTE
},
838 * Speakers/HP = Front
842 static const struct hda_verb alc885_mb5_ch6_init
[] = {
843 {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_OUT
},
844 {0x15, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_UNMUTE
},
845 {0x15, AC_VERB_SET_CONNECT_SEL
, 0x01},
849 static const struct hda_channel_mode alc885_mb5_6ch_modes
[2] = {
850 { 2, alc885_mb5_ch2_init
},
851 { 6, alc885_mb5_ch6_init
},
854 #define alc885_macmini3_6ch_modes alc885_mb5_6ch_modes
859 static const struct hda_verb alc883_4ST_ch2_init
[] = {
860 { 0x17, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_OUT
},
861 { 0x17, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_UNMUTE
},
862 { 0x18, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_VREF80
},
863 { 0x18, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_MUTE
},
864 { 0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_IN
},
865 { 0x1a, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_MUTE
},
872 static const struct hda_verb alc883_4ST_ch4_init
[] = {
873 { 0x17, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_OUT
},
874 { 0x17, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_UNMUTE
},
875 { 0x18, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_VREF80
},
876 { 0x18, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_MUTE
},
877 { 0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_OUT
},
878 { 0x1a, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_UNMUTE
},
879 { 0x1a, AC_VERB_SET_CONNECT_SEL
, 0x01 },
886 static const struct hda_verb alc883_4ST_ch6_init
[] = {
887 { 0x17, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_OUT
},
888 { 0x17, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_UNMUTE
},
889 { 0x18, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_OUT
},
890 { 0x18, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_UNMUTE
},
891 { 0x18, AC_VERB_SET_CONNECT_SEL
, 0x02 },
892 { 0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_OUT
},
893 { 0x1a, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_UNMUTE
},
894 { 0x1a, AC_VERB_SET_CONNECT_SEL
, 0x01 },
901 static const struct hda_verb alc883_4ST_ch8_init
[] = {
902 { 0x17, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_OUT
},
903 { 0x17, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_UNMUTE
},
904 { 0x17, AC_VERB_SET_CONNECT_SEL
, 0x03 },
905 { 0x18, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_OUT
},
906 { 0x18, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_UNMUTE
},
907 { 0x18, AC_VERB_SET_CONNECT_SEL
, 0x02 },
908 { 0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_OUT
},
909 { 0x1a, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_UNMUTE
},
910 { 0x1a, AC_VERB_SET_CONNECT_SEL
, 0x01 },
914 static const struct hda_channel_mode alc883_4ST_8ch_modes
[4] = {
915 { 2, alc883_4ST_ch2_init
},
916 { 4, alc883_4ST_ch4_init
},
917 { 6, alc883_4ST_ch6_init
},
918 { 8, alc883_4ST_ch8_init
},
925 static const struct hda_verb alc883_3ST_ch2_intel_init
[] = {
926 { 0x19, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_VREF80
},
927 { 0x19, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_MUTE
},
928 { 0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_IN
},
929 { 0x1a, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_MUTE
},
936 static const struct hda_verb alc883_3ST_ch4_intel_init
[] = {
937 { 0x19, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_VREF80
},
938 { 0x19, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_MUTE
},
939 { 0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_OUT
},
940 { 0x1a, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_UNMUTE
},
941 { 0x1a, AC_VERB_SET_CONNECT_SEL
, 0x01 },
948 static const struct hda_verb alc883_3ST_ch6_intel_init
[] = {
949 { 0x19, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_OUT
},
950 { 0x19, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_UNMUTE
},
951 { 0x19, AC_VERB_SET_CONNECT_SEL
, 0x02 },
952 { 0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_OUT
},
953 { 0x1a, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_UNMUTE
},
954 { 0x1a, AC_VERB_SET_CONNECT_SEL
, 0x01 },
958 static const struct hda_channel_mode alc883_3ST_6ch_intel_modes
[3] = {
959 { 2, alc883_3ST_ch2_intel_init
},
960 { 4, alc883_3ST_ch4_intel_init
},
961 { 6, alc883_3ST_ch6_intel_init
},
967 static const struct hda_verb alc889_ch2_intel_init
[] = {
968 { 0x14, AC_VERB_SET_CONNECT_SEL
, 0x00 },
969 { 0x19, AC_VERB_SET_CONNECT_SEL
, 0x00 },
970 { 0x16, AC_VERB_SET_CONNECT_SEL
, 0x00 },
971 { 0x17, AC_VERB_SET_CONNECT_SEL
, 0x00 },
972 { 0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_IN
},
973 { 0x1a, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_MUTE
},
980 static const struct hda_verb alc889_ch6_intel_init
[] = {
981 { 0x14, AC_VERB_SET_CONNECT_SEL
, 0x00 },
982 { 0x19, AC_VERB_SET_CONNECT_SEL
, 0x01 },
983 { 0x16, AC_VERB_SET_CONNECT_SEL
, 0x02 },
984 { 0x17, AC_VERB_SET_CONNECT_SEL
, 0x03 },
985 { 0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_IN
},
986 { 0x1a, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_MUTE
},
993 static const struct hda_verb alc889_ch8_intel_init
[] = {
994 { 0x14, AC_VERB_SET_CONNECT_SEL
, 0x00 },
995 { 0x19, AC_VERB_SET_CONNECT_SEL
, 0x01 },
996 { 0x16, AC_VERB_SET_CONNECT_SEL
, 0x02 },
997 { 0x17, AC_VERB_SET_CONNECT_SEL
, 0x03 },
998 { 0x1a, AC_VERB_SET_CONNECT_SEL
, 0x03 },
999 { 0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_OUT
},
1000 { 0x1a, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_UNMUTE
},
1004 static const struct hda_channel_mode alc889_8ch_intel_modes
[3] = {
1005 { 2, alc889_ch2_intel_init
},
1006 { 6, alc889_ch6_intel_init
},
1007 { 8, alc889_ch8_intel_init
},
1013 static const struct hda_verb alc883_sixstack_ch6_init
[] = {
1014 { 0x17, AC_VERB_SET_PIN_WIDGET_CONTROL
, 0x00 },
1015 { 0x16, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_OUT
},
1016 { 0x15, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_OUT
},
1017 { 0x14, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_OUT
},
1024 static const struct hda_verb alc883_sixstack_ch8_init
[] = {
1025 { 0x17, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_OUT
},
1026 { 0x16, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_OUT
},
1027 { 0x15, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_OUT
},
1028 { 0x14, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_OUT
},
1032 static const struct hda_channel_mode alc883_sixstack_modes
[2] = {
1033 { 6, alc883_sixstack_ch6_init
},
1034 { 8, alc883_sixstack_ch8_init
},
1038 /* Pin assignment: Front=0x14, Rear=0x15, CLFE=0x16, Side=0x17
1039 * Mic=0x18, Front Mic=0x19, Line-In=0x1a, HP=0x1b
1041 static const struct snd_kcontrol_new alc882_base_mixer
[] = {
1042 HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT
),
1043 HDA_BIND_MUTE("Front Playback Switch", 0x0c, 2, HDA_INPUT
),
1044 HDA_CODEC_VOLUME("Surround Playback Volume", 0x0d, 0x0, HDA_OUTPUT
),
1045 HDA_BIND_MUTE("Surround Playback Switch", 0x0d, 2, HDA_INPUT
),
1046 HDA_CODEC_VOLUME_MONO("Center Playback Volume", 0x0e, 1, 0x0, HDA_OUTPUT
),
1047 HDA_CODEC_VOLUME_MONO("LFE Playback Volume", 0x0e, 2, 0x0, HDA_OUTPUT
),
1048 HDA_BIND_MUTE_MONO("Center Playback Switch", 0x0e, 1, 2, HDA_INPUT
),
1049 HDA_BIND_MUTE_MONO("LFE Playback Switch", 0x0e, 2, 2, HDA_INPUT
),
1050 HDA_CODEC_VOLUME("Side Playback Volume", 0x0f, 0x0, HDA_OUTPUT
),
1051 HDA_BIND_MUTE("Side Playback Switch", 0x0f, 2, HDA_INPUT
),
1052 HDA_CODEC_MUTE("Headphone Playback Switch", 0x1b, 0x0, HDA_OUTPUT
),
1053 HDA_CODEC_VOLUME("CD Playback Volume", 0x0b, 0x04, HDA_INPUT
),
1054 HDA_CODEC_MUTE("CD Playback Switch", 0x0b, 0x04, HDA_INPUT
),
1055 HDA_CODEC_VOLUME("Line Playback Volume", 0x0b, 0x02, HDA_INPUT
),
1056 HDA_CODEC_MUTE("Line Playback Switch", 0x0b, 0x02, HDA_INPUT
),
1057 HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT
),
1058 HDA_CODEC_VOLUME("Mic Boost Volume", 0x18, 0, HDA_INPUT
),
1059 HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT
),
1060 HDA_CODEC_VOLUME("Front Mic Playback Volume", 0x0b, 0x1, HDA_INPUT
),
1061 HDA_CODEC_VOLUME("Front Mic Boost Volume", 0x19, 0, HDA_INPUT
),
1062 HDA_CODEC_MUTE("Front Mic Playback Switch", 0x0b, 0x1, HDA_INPUT
),
1066 /* Macbook Air 2,1 same control for HP and internal Speaker */
1068 static const struct snd_kcontrol_new alc885_mba21_mixer
[] = {
1069 HDA_CODEC_VOLUME("Speaker Playback Volume", 0x0c, 0x00, HDA_OUTPUT
),
1070 HDA_BIND_MUTE("Speaker Playback Switch", 0x0c, 0x02, HDA_OUTPUT
),
1075 static const struct snd_kcontrol_new alc885_mbp3_mixer
[] = {
1076 HDA_CODEC_VOLUME("Speaker Playback Volume", 0x0c, 0x00, HDA_OUTPUT
),
1077 HDA_BIND_MUTE ("Speaker Playback Switch", 0x0c, 0x02, HDA_INPUT
),
1078 HDA_CODEC_VOLUME("Headphone Playback Volume", 0x0e, 0x00, HDA_OUTPUT
),
1079 HDA_BIND_MUTE ("Headphone Playback Switch", 0x0e, 0x02, HDA_INPUT
),
1080 HDA_CODEC_VOLUME("Surround Playback Volume", 0x0d, 0x00, HDA_OUTPUT
),
1081 HDA_CODEC_VOLUME("Line Playback Volume", 0x0b, 0x02, HDA_INPUT
),
1082 HDA_CODEC_MUTE ("Line Playback Switch", 0x0b, 0x02, HDA_INPUT
),
1083 HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x00, HDA_INPUT
),
1084 HDA_CODEC_MUTE ("Mic Playback Switch", 0x0b, 0x00, HDA_INPUT
),
1085 HDA_CODEC_VOLUME("Line Boost Volume", 0x1a, 0x00, HDA_INPUT
),
1086 HDA_CODEC_VOLUME("Mic Boost Volume", 0x18, 0x00, HDA_INPUT
),
1090 static const struct snd_kcontrol_new alc885_mb5_mixer
[] = {
1091 HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x00, HDA_OUTPUT
),
1092 HDA_BIND_MUTE ("Front Playback Switch", 0x0c, 0x02, HDA_INPUT
),
1093 HDA_CODEC_VOLUME("Surround Playback Volume", 0x0d, 0x00, HDA_OUTPUT
),
1094 HDA_BIND_MUTE ("Surround Playback Switch", 0x0d, 0x02, HDA_INPUT
),
1095 HDA_CODEC_VOLUME("LFE Playback Volume", 0x0e, 0x00, HDA_OUTPUT
),
1096 HDA_BIND_MUTE ("LFE Playback Switch", 0x0e, 0x02, HDA_INPUT
),
1097 HDA_CODEC_VOLUME("Headphone Playback Volume", 0x0f, 0x00, HDA_OUTPUT
),
1098 HDA_BIND_MUTE ("Headphone Playback Switch", 0x0f, 0x02, HDA_INPUT
),
1099 HDA_CODEC_VOLUME("Line Playback Volume", 0x0b, 0x07, HDA_INPUT
),
1100 HDA_CODEC_MUTE ("Line Playback Switch", 0x0b, 0x07, HDA_INPUT
),
1101 HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x01, HDA_INPUT
),
1102 HDA_CODEC_MUTE ("Mic Playback Switch", 0x0b, 0x01, HDA_INPUT
),
1103 HDA_CODEC_VOLUME("Line Boost Volume", 0x15, 0x00, HDA_INPUT
),
1104 HDA_CODEC_VOLUME("Mic Boost Volume", 0x19, 0x00, HDA_INPUT
),
1108 static const struct snd_kcontrol_new alc885_macmini3_mixer
[] = {
1109 HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x00, HDA_OUTPUT
),
1110 HDA_BIND_MUTE ("Front Playback Switch", 0x0c, 0x02, HDA_INPUT
),
1111 HDA_CODEC_VOLUME("Surround Playback Volume", 0x0d, 0x00, HDA_OUTPUT
),
1112 HDA_BIND_MUTE ("Surround Playback Switch", 0x0d, 0x02, HDA_INPUT
),
1113 HDA_CODEC_VOLUME("LFE Playback Volume", 0x0e, 0x00, HDA_OUTPUT
),
1114 HDA_BIND_MUTE ("LFE Playback Switch", 0x0e, 0x02, HDA_INPUT
),
1115 HDA_CODEC_VOLUME("Headphone Playback Volume", 0x0f, 0x00, HDA_OUTPUT
),
1116 HDA_BIND_MUTE ("Headphone Playback Switch", 0x0f, 0x02, HDA_INPUT
),
1117 HDA_CODEC_VOLUME("Line Playback Volume", 0x0b, 0x07, HDA_INPUT
),
1118 HDA_CODEC_MUTE ("Line Playback Switch", 0x0b, 0x07, HDA_INPUT
),
1119 HDA_CODEC_VOLUME("Line Boost Volume", 0x15, 0x00, HDA_INPUT
),
1123 static const struct snd_kcontrol_new alc885_imac91_mixer
[] = {
1124 HDA_CODEC_VOLUME("Speaker Playback Volume", 0x0c, 0x00, HDA_OUTPUT
),
1125 HDA_BIND_MUTE("Speaker Playback Switch", 0x0c, 0x02, HDA_INPUT
),
1130 static const struct snd_kcontrol_new alc882_w2jc_mixer
[] = {
1131 HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT
),
1132 HDA_BIND_MUTE("Front Playback Switch", 0x0c, 2, HDA_INPUT
),
1133 HDA_CODEC_VOLUME("CD Playback Volume", 0x0b, 0x04, HDA_INPUT
),
1134 HDA_CODEC_MUTE("CD Playback Switch", 0x0b, 0x04, HDA_INPUT
),
1135 HDA_CODEC_VOLUME("Line Playback Volume", 0x0b, 0x02, HDA_INPUT
),
1136 HDA_CODEC_MUTE("Line Playback Switch", 0x0b, 0x02, HDA_INPUT
),
1137 HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT
),
1138 HDA_CODEC_VOLUME("Mic Boost Volume", 0x18, 0, HDA_INPUT
),
1139 HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT
),
1143 static const struct snd_kcontrol_new alc882_targa_mixer
[] = {
1144 HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT
),
1145 HDA_BIND_MUTE("Front Playback Switch", 0x0c, 2, HDA_INPUT
),
1146 HDA_CODEC_MUTE("Headphone Playback Switch", 0x1b, 0x0, HDA_OUTPUT
),
1147 HDA_CODEC_VOLUME("CD Playback Volume", 0x0b, 0x04, HDA_INPUT
),
1148 HDA_CODEC_MUTE("CD Playback Switch", 0x0b, 0x04, HDA_INPUT
),
1149 HDA_CODEC_VOLUME("Line Playback Volume", 0x0b, 0x02, HDA_INPUT
),
1150 HDA_CODEC_MUTE("Line Playback Switch", 0x0b, 0x02, HDA_INPUT
),
1151 HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT
),
1152 HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT
),
1153 HDA_CODEC_VOLUME("Mic Boost Volume", 0x18, 0, HDA_INPUT
),
1154 HDA_CODEC_VOLUME("Front Mic Playback Volume", 0x0b, 0x1, HDA_INPUT
),
1155 HDA_CODEC_MUTE("Front Mic Playback Switch", 0x0b, 0x1, HDA_INPUT
),
1156 HDA_CODEC_VOLUME("Front Mic Boost Volume", 0x19, 0, HDA_INPUT
),
1160 /* Pin assignment: Front=0x14, HP = 0x15, Front = 0x16, ???
1161 * Front Mic=0x18, Line In = 0x1a, Line In = 0x1b, CD = 0x1c
1163 static const struct snd_kcontrol_new alc882_asus_a7j_mixer
[] = {
1164 HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT
),
1165 HDA_CODEC_MUTE("Front Playback Switch", 0x14, 0x0, HDA_OUTPUT
),
1166 HDA_CODEC_MUTE("Headphone Playback Switch", 0x15, 0x0, HDA_OUTPUT
),
1167 HDA_CODEC_MUTE("Mobile Front Playback Switch", 0x16, 0x0, HDA_OUTPUT
),
1168 HDA_CODEC_VOLUME("CD Playback Volume", 0x0b, 0x04, HDA_INPUT
),
1169 HDA_CODEC_MUTE("CD Playback Switch", 0x0b, 0x04, HDA_INPUT
),
1170 HDA_CODEC_VOLUME("Line Playback Volume", 0x0b, 0x02, HDA_INPUT
),
1171 HDA_CODEC_MUTE("Line Playback Switch", 0x0b, 0x02, HDA_INPUT
),
1172 HDA_CODEC_VOLUME("Mobile Line Playback Volume", 0x0b, 0x03, HDA_INPUT
),
1173 HDA_CODEC_MUTE("Mobile Line Playback Switch", 0x0b, 0x03, HDA_INPUT
),
1174 HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT
),
1175 HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT
),
1176 HDA_CODEC_VOLUME("Mic Boost Volume", 0x18, 0, HDA_INPUT
),
1180 static const struct snd_kcontrol_new alc882_asus_a7m_mixer
[] = {
1181 HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT
),
1182 HDA_BIND_MUTE("Front Playback Switch", 0x0c, 2, HDA_INPUT
),
1183 HDA_CODEC_MUTE("Headphone Playback Switch", 0x15, 0x0, HDA_OUTPUT
),
1184 HDA_CODEC_VOLUME("CD Playback Volume", 0x0b, 0x04, HDA_INPUT
),
1185 HDA_CODEC_MUTE("CD Playback Switch", 0x0b, 0x04, HDA_INPUT
),
1186 HDA_CODEC_VOLUME("Line Playback Volume", 0x0b, 0x02, HDA_INPUT
),
1187 HDA_CODEC_MUTE("Line Playback Switch", 0x0b, 0x02, HDA_INPUT
),
1188 HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT
),
1189 HDA_CODEC_VOLUME("Mic Boost Volume", 0x18, 0, HDA_INPUT
),
1190 HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT
),
1194 static const struct snd_kcontrol_new alc882_chmode_mixer
[] = {
1196 .iface
= SNDRV_CTL_ELEM_IFACE_MIXER
,
1197 .name
= "Channel Mode",
1198 .info
= alc_ch_mode_info
,
1199 .get
= alc_ch_mode_get
,
1200 .put
= alc_ch_mode_put
,
1205 static const struct hda_verb alc882_base_init_verbs
[] = {
1206 /* Front mixer: unmute input/output amp left and right (volume = 0) */
1207 {0x0c, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_IN_MUTE(0)},
1208 {0x0c, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_IN_MUTE(1)},
1210 {0x0d, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_IN_MUTE(0)},
1211 {0x0d, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_IN_MUTE(1)},
1213 {0x0e, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_IN_MUTE(0)},
1214 {0x0e, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_IN_MUTE(1)},
1216 {0x0f, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_IN_MUTE(0)},
1217 {0x0f, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_IN_MUTE(1)},
1219 /* Front Pin: output 0 (0x0c) */
1220 {0x14, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_OUT
},
1221 {0x14, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_UNMUTE
},
1222 {0x14, AC_VERB_SET_CONNECT_SEL
, 0x00},
1223 /* Rear Pin: output 1 (0x0d) */
1224 {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_OUT
},
1225 {0x15, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_UNMUTE
},
1226 {0x15, AC_VERB_SET_CONNECT_SEL
, 0x01},
1227 /* CLFE Pin: output 2 (0x0e) */
1228 {0x16, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_OUT
},
1229 {0x16, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_UNMUTE
},
1230 {0x16, AC_VERB_SET_CONNECT_SEL
, 0x02},
1231 /* Side Pin: output 3 (0x0f) */
1232 {0x17, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_OUT
},
1233 {0x17, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_UNMUTE
},
1234 {0x17, AC_VERB_SET_CONNECT_SEL
, 0x03},
1235 /* Mic (rear) pin: input vref at 80% */
1236 {0x18, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_VREF80
},
1237 {0x18, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_MUTE
},
1238 /* Front Mic pin: input vref at 80% */
1239 {0x19, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_VREF80
},
1240 {0x19, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_MUTE
},
1241 /* Line In pin: input */
1242 {0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_IN
},
1243 {0x1a, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_MUTE
},
1244 /* Line-2 In: Headphone output (output 0 - 0x0c) */
1245 {0x1b, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_HP
},
1246 {0x1b, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_UNMUTE
},
1247 {0x1b, AC_VERB_SET_CONNECT_SEL
, 0x00},
1248 /* CD pin widget for input */
1249 {0x1c, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_IN
},
1251 /* FIXME: use matrix-type input source selection */
1252 /* Mixer elements: 0x18, 19, 1a, 1b, 1c, 1d, 14, 15, 16, 17, 0b */
1254 {0x23, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_IN_UNMUTE(0)},
1256 {0x22, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_IN_UNMUTE(0)},
1257 /* ADC2: mute amp left and right */
1258 {0x08, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_IN_MUTE(0)},
1259 {0x08, AC_VERB_SET_CONNECT_SEL
, 0x00},
1260 /* ADC3: mute amp left and right */
1261 {0x09, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_IN_MUTE(0)},
1262 {0x09, AC_VERB_SET_CONNECT_SEL
, 0x00},
1267 static const struct hda_verb alc882_adc1_init_verbs
[] = {
1268 /* Input mixer1: unmute Mic, F-Mic, Line, CD inputs */
1269 {0x24, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_IN_UNMUTE(0)},
1270 {0x24, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_IN_MUTE(3)},
1271 {0x24, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_IN_MUTE(2)},
1272 {0x24, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_IN_MUTE(4)},
1273 /* ADC1: mute amp left and right */
1274 {0x07, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_IN_MUTE(0)},
1275 {0x07, AC_VERB_SET_CONNECT_SEL
, 0x00},
1279 static const struct hda_verb alc882_eapd_verbs
[] = {
1280 /* change to EAPD mode */
1281 {0x20, AC_VERB_SET_COEF_INDEX
, 0x07},
1282 {0x20, AC_VERB_SET_PROC_COEF
, 0x3060},
1286 static const struct hda_verb alc889_eapd_verbs
[] = {
1287 {0x14, AC_VERB_SET_EAPD_BTLENABLE
, 2},
1288 {0x15, AC_VERB_SET_EAPD_BTLENABLE
, 2},
1292 static const struct hda_verb alc_hp15_unsol_verbs
[] = {
1293 {0x15, AC_VERB_SET_UNSOLICITED_ENABLE
, AC_USRSP_EN
| ALC_HP_EVENT
},
1294 {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_HP
},
1298 static const struct hda_verb alc885_init_verbs
[] = {
1299 /* Front mixer: unmute input/output amp left and right (volume = 0) */
1300 {0x0c, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_IN_UNMUTE(0)},
1301 {0x0c, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_IN_UNMUTE(1)},
1303 {0x0d, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_IN_UNMUTE(0)},
1304 {0x0d, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_IN_UNMUTE(1)},
1306 {0x0e, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_IN_UNMUTE(0)},
1307 {0x0e, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_IN_UNMUTE(1)},
1309 {0x0f, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_IN_UNMUTE(0)},
1310 {0x0f, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_IN_UNMUTE(1)},
1312 /* Front HP Pin: output 0 (0x0c) */
1313 {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_HP
},
1314 {0x15, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_UNMUTE
},
1315 {0x15, AC_VERB_SET_CONNECT_SEL
, 0x00},
1316 /* Front Pin: output 0 (0x0c) */
1317 {0x14, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_OUT
},
1318 {0x14, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_UNMUTE
},
1319 {0x14, AC_VERB_SET_CONNECT_SEL
, 0x00},
1320 /* Rear Pin: output 1 (0x0d) */
1321 {0x19, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_OUT
},
1322 {0x19, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_UNMUTE
},
1323 {0x19, AC_VERB_SET_CONNECT_SEL
, 0x01},
1324 /* CLFE Pin: output 2 (0x0e) */
1325 {0x16, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_OUT
},
1326 {0x16, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_UNMUTE
},
1327 {0x16, AC_VERB_SET_CONNECT_SEL
, 0x02},
1328 /* Side Pin: output 3 (0x0f) */
1329 {0x17, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_OUT
},
1330 {0x17, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_UNMUTE
},
1331 {0x17, AC_VERB_SET_CONNECT_SEL
, 0x03},
1332 /* Mic (rear) pin: input vref at 80% */
1333 {0x1b, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_VREF80
},
1334 {0x1b, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_MUTE
},
1335 /* Front Mic pin: input vref at 80% */
1336 {0x18, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_VREF80
},
1337 {0x18, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_MUTE
},
1338 /* Line In pin: input */
1339 {0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_IN
},
1340 {0x1a, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_MUTE
},
1342 /* Mixer elements: 0x18, , 0x1a, 0x1b */
1344 {0x24, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_IN_UNMUTE(0)},
1346 {0x23, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_IN_UNMUTE(0)},
1348 {0x22, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_IN_UNMUTE(0)},
1349 /* ADC2: mute amp left and right */
1350 {0x08, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_IN_MUTE(0)},
1351 /* ADC3: mute amp left and right */
1352 {0x09, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_IN_MUTE(0)},
1357 static const struct hda_verb alc885_init_input_verbs
[] = {
1358 {0x24, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_IN_UNMUTE(0)},
1359 {0x24, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_IN_UNMUTE(2)},
1360 {0x24, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_IN_UNMUTE(3)},
1365 /* Unmute Selector 24h and set the default input to front mic */
1366 static const struct hda_verb alc889_init_input_verbs
[] = {
1367 {0x24, AC_VERB_SET_CONNECT_SEL
, 0x00},
1368 {0x24, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_UNMUTE
},
1373 #define alc883_init_verbs alc882_base_init_verbs
1376 static const struct snd_kcontrol_new alc882_macpro_mixer
[] = {
1377 HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT
),
1378 HDA_BIND_MUTE("Front Playback Switch", 0x0c, 2, HDA_INPUT
),
1379 HDA_CODEC_MUTE("Headphone Playback Switch", 0x18, 0x0, HDA_OUTPUT
),
1380 HDA_CODEC_VOLUME("Line Playback Volume", 0x0b, 0x01, HDA_INPUT
),
1381 HDA_CODEC_MUTE("Line Playback Switch", 0x0b, 0x01, HDA_INPUT
),
1382 /* FIXME: this looks suspicious...
1383 HDA_CODEC_VOLUME("Beep Playback Volume", 0x0b, 0x02, HDA_INPUT),
1384 HDA_CODEC_MUTE("Beep Playback Switch", 0x0b, 0x02, HDA_INPUT),
1389 static const struct hda_verb alc882_macpro_init_verbs
[] = {
1390 /* Front mixer: unmute input/output amp left and right (volume = 0) */
1391 {0x0c, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_ZERO
},
1392 {0x0c, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_IN_MUTE(0)},
1393 {0x0c, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_IN_MUTE(1)},
1394 /* Front Pin: output 0 (0x0c) */
1395 {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_OUT
},
1396 {0x15, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_UNMUTE
},
1397 {0x15, AC_VERB_SET_CONNECT_SEL
, 0x00},
1398 /* Front Mic pin: input vref at 80% */
1399 {0x19, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_VREF80
},
1400 {0x19, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_MUTE
},
1401 /* Speaker: output */
1402 {0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_OUT
},
1403 {0x1a, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_UNMUTE
},
1404 {0x1a, AC_VERB_SET_CONNECT_SEL
, 0x04},
1405 /* Headphone output (output 0 - 0x0c) */
1406 {0x18, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_HP
},
1407 {0x18, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_UNMUTE
},
1408 {0x18, AC_VERB_SET_CONNECT_SEL
, 0x00},
1410 /* FIXME: use matrix-type input source selection */
1411 /* Mixer elements: 0x18, 19, 1a, 1b, 1c, 1d, 14, 15, 16, 17, 0b */
1412 /* Input mixer1: unmute Mic, F-Mic, Line, CD inputs */
1413 {0x24, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_IN_UNMUTE(0)},
1414 {0x24, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_IN_MUTE(3)},
1415 {0x24, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_IN_MUTE(2)},
1416 {0x24, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_IN_MUTE(4)},
1418 {0x23, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_IN_UNMUTE(0)},
1419 {0x23, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_IN_MUTE(3)},
1420 {0x23, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_IN_MUTE(2)},
1421 {0x23, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_IN_MUTE(4)},
1423 {0x22, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_IN_UNMUTE(0)},
1424 {0x22, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_IN_MUTE(3)},
1425 {0x22, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_IN_MUTE(2)},
1426 {0x22, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_IN_MUTE(4)},
1427 /* ADC1: mute amp left and right */
1428 {0x07, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_IN_MUTE(0)},
1429 {0x07, AC_VERB_SET_CONNECT_SEL
, 0x00},
1430 /* ADC2: mute amp left and right */
1431 {0x08, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_IN_MUTE(0)},
1432 {0x08, AC_VERB_SET_CONNECT_SEL
, 0x00},
1433 /* ADC3: mute amp left and right */
1434 {0x09, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_IN_MUTE(0)},
1435 {0x09, AC_VERB_SET_CONNECT_SEL
, 0x00},
1441 static const struct hda_verb alc885_mb5_init_verbs
[] = {
1443 {0x02, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_UNMUTE
},
1444 {0x03, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_UNMUTE
},
1445 {0x04, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_UNMUTE
},
1446 {0x05, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_UNMUTE
},
1448 {0x0c, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_ZERO
},
1449 {0x0c, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_IN_MUTE(0)},
1450 {0x0c, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_IN_MUTE(1)},
1451 /* Surround mixer */
1452 {0x0d, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_ZERO
},
1453 {0x0d, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_IN_MUTE(0)},
1454 {0x0d, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_IN_MUTE(1)},
1456 {0x0e, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_ZERO
},
1457 {0x0e, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_IN_MUTE(0)},
1458 {0x0e, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_IN_MUTE(1)},
1460 {0x0f, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_ZERO
},
1461 {0x0f, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_IN_MUTE(0)},
1462 {0x0f, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_IN_MUTE(1)},
1463 /* Front Pin (0x0c) */
1464 {0x18, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_OUT
| 0x01},
1465 {0x18, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_UNMUTE
},
1466 {0x18, AC_VERB_SET_CONNECT_SEL
, 0x00},
1467 /* LFE Pin (0x0e) */
1468 {0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_OUT
| 0x01},
1469 {0x1a, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_UNMUTE
},
1470 {0x1a, AC_VERB_SET_CONNECT_SEL
, 0x02},
1472 {0x14, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_OUT
},
1473 {0x14, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_UNMUTE
},
1474 {0x14, AC_VERB_SET_CONNECT_SEL
, 0x03},
1475 {0x14, AC_VERB_SET_UNSOLICITED_ENABLE
, ALC_HP_EVENT
| AC_USRSP_EN
},
1476 /* Front Mic pin: input vref at 80% */
1477 {0x19, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_VREF80
},
1478 {0x19, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_MUTE
},
1480 {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_IN
},
1481 {0x15, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_MUTE
},
1483 {0x24, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_IN_UNMUTE(0x1)},
1484 {0x24, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_IN_MUTE(0x7)},
1485 {0x24, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_IN_MUTE(0x4)},
1490 static const struct hda_verb alc885_macmini3_init_verbs
[] = {
1492 {0x02, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_UNMUTE
},
1493 {0x03, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_UNMUTE
},
1494 {0x04, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_UNMUTE
},
1495 {0x05, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_UNMUTE
},
1497 {0x0c, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_ZERO
},
1498 {0x0c, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_IN_MUTE(0)},
1499 {0x0c, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_IN_MUTE(1)},
1500 /* Surround mixer */
1501 {0x0d, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_ZERO
},
1502 {0x0d, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_IN_MUTE(0)},
1503 {0x0d, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_IN_MUTE(1)},
1505 {0x0e, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_ZERO
},
1506 {0x0e, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_IN_MUTE(0)},
1507 {0x0e, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_IN_MUTE(1)},
1509 {0x0f, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_ZERO
},
1510 {0x0f, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_IN_MUTE(0)},
1511 {0x0f, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_IN_MUTE(1)},
1512 /* Front Pin (0x0c) */
1513 {0x18, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_OUT
| 0x01},
1514 {0x18, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_UNMUTE
},
1515 {0x18, AC_VERB_SET_CONNECT_SEL
, 0x00},
1516 /* LFE Pin (0x0e) */
1517 {0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_OUT
| 0x01},
1518 {0x1a, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_UNMUTE
},
1519 {0x1a, AC_VERB_SET_CONNECT_SEL
, 0x02},
1521 {0x14, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_OUT
},
1522 {0x14, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_UNMUTE
},
1523 {0x14, AC_VERB_SET_CONNECT_SEL
, 0x03},
1524 {0x14, AC_VERB_SET_UNSOLICITED_ENABLE
, ALC_HP_EVENT
| AC_USRSP_EN
},
1526 {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_IN
},
1527 {0x15, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_MUTE
},
1529 {0x24, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_IN_UNMUTE(1)},
1530 {0x24, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_IN_MUTE(3)},
1531 {0x24, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_IN_MUTE(2)},
1532 {0x24, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_IN_MUTE(4)},
1537 static const struct hda_verb alc885_mba21_init_verbs
[] = {
1538 /*Internal and HP Speaker Mixer*/
1539 {0x0c, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_ZERO
},
1540 {0x0c, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_IN_UNMUTE(0)},
1541 {0x0c, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_IN_UNMUTE(1)},
1542 /*Internal Speaker Pin (0x0c)*/
1543 {0x18, AC_VERB_SET_PIN_WIDGET_CONTROL
, (PIN_OUT
| AC_PINCTL_VREF_50
) },
1544 {0x18, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_UNMUTE
},
1545 {0x18, AC_VERB_SET_CONNECT_SEL
, 0x00},
1546 /* HP Pin: output 0 (0x0e) */
1547 {0x14, AC_VERB_SET_PIN_WIDGET_CONTROL
, 0xc4},
1548 {0x14, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_UNMUTE
},
1549 {0x14, AC_VERB_SET_CONNECT_SEL
, 0x00},
1550 {0x14, AC_VERB_SET_UNSOLICITED_ENABLE
, (ALC_HP_EVENT
| AC_USRSP_EN
)},
1551 /* Line in (is hp when jack connected)*/
1552 {0x19, AC_VERB_SET_PIN_WIDGET_CONTROL
, AC_PINCTL_VREF_50
},
1553 {0x19, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_MUTE
},
1559 /* Macbook Pro rev3 */
1560 static const struct hda_verb alc885_mbp3_init_verbs
[] = {
1561 /* Front mixer: unmute input/output amp left and right (volume = 0) */
1562 {0x0c, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_ZERO
},
1563 {0x0c, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_IN_MUTE(0)},
1564 {0x0c, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_IN_MUTE(1)},
1566 {0x0d, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_ZERO
},
1567 {0x0d, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_IN_MUTE(0)},
1568 {0x0d, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_IN_MUTE(1)},
1570 {0x0e, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_ZERO
},
1571 {0x0e, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_IN_MUTE(0)},
1572 {0x0e, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_IN_MUTE(1)},
1573 /* Front Pin: output 0 (0x0c) */
1574 {0x14, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_OUT
},
1575 {0x14, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_UNMUTE
},
1576 {0x14, AC_VERB_SET_CONNECT_SEL
, 0x00},
1577 /* HP Pin: output 0 (0x0e) */
1578 {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL
, 0xc4},
1579 {0x15, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_UNMUTE
},
1580 {0x15, AC_VERB_SET_CONNECT_SEL
, 0x02},
1581 {0x15, AC_VERB_SET_UNSOLICITED_ENABLE
, ALC_HP_EVENT
| AC_USRSP_EN
},
1582 /* Mic (rear) pin: input vref at 80% */
1583 {0x18, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_VREF80
},
1584 {0x18, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_MUTE
},
1585 /* Front Mic pin: input vref at 80% */
1586 {0x19, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_VREF80
},
1587 {0x19, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_MUTE
},
1588 /* Line In pin: use output 1 when in LineOut mode */
1589 {0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_IN
},
1590 {0x1a, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_MUTE
},
1591 {0x1a, AC_VERB_SET_CONNECT_SEL
, 0x01},
1593 /* FIXME: use matrix-type input source selection */
1594 /* Mixer elements: 0x18, 19, 1a, 1b, 1c, 1d, 14, 15, 16, 17, 0b */
1595 /* Input mixer1: unmute Mic, F-Mic, Line, CD inputs */
1596 {0x24, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_IN_UNMUTE(0)},
1597 {0x24, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_IN_MUTE(3)},
1598 {0x24, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_IN_MUTE(2)},
1599 {0x24, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_IN_MUTE(4)},
1601 {0x23, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_IN_UNMUTE(0)},
1602 {0x23, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_IN_MUTE(3)},
1603 {0x23, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_IN_MUTE(2)},
1604 {0x23, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_IN_MUTE(4)},
1606 {0x22, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_IN_UNMUTE(0)},
1607 {0x22, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_IN_MUTE(3)},
1608 {0x22, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_IN_MUTE(2)},
1609 {0x22, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_IN_MUTE(4)},
1610 /* ADC1: mute amp left and right */
1611 {0x07, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_IN_MUTE(0)},
1612 {0x07, AC_VERB_SET_CONNECT_SEL
, 0x00},
1613 /* ADC2: mute amp left and right */
1614 {0x08, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_IN_MUTE(0)},
1615 {0x08, AC_VERB_SET_CONNECT_SEL
, 0x00},
1616 /* ADC3: mute amp left and right */
1617 {0x09, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_IN_MUTE(0)},
1618 {0x09, AC_VERB_SET_CONNECT_SEL
, 0x00},
1624 static const struct hda_verb alc885_imac91_init_verbs
[] = {
1625 /* Internal Speaker Pin (0x0c) */
1626 {0x18, AC_VERB_SET_PIN_WIDGET_CONTROL
, (PIN_OUT
| AC_PINCTL_VREF_50
) },
1627 {0x18, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_UNMUTE
},
1628 {0x18, AC_VERB_SET_CONNECT_SEL
, 0x00},
1629 {0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL
, (PIN_OUT
| AC_PINCTL_VREF_50
) },
1630 {0x1a, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_UNMUTE
},
1631 {0x1a, AC_VERB_SET_CONNECT_SEL
, 0x00},
1633 {0x14, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_HP
},
1634 {0x14, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_UNMUTE
},
1635 {0x14, AC_VERB_SET_CONNECT_SEL
, 0x00},
1636 {0x14, AC_VERB_SET_UNSOLICITED_ENABLE
, (ALC_HP_EVENT
| AC_USRSP_EN
)},
1638 {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL
, AC_PINCTL_VREF_50
},
1639 {0x15, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_MUTE
},
1640 /* Front Mic pin: input vref at 80% */
1641 {0x19, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_VREF80
},
1642 {0x19, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_MUTE
},
1644 {0x0d, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_ZERO
},
1645 {0x0d, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_IN_MUTE(0)},
1646 {0x0d, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_IN_MUTE(1)},
1647 /* Line-Out mixer: unmute input/output amp left and right (volume = 0) */
1648 {0x0c, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_ZERO
},
1649 {0x0c, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_IN_MUTE(0)},
1650 {0x0c, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_IN_MUTE(1)},
1651 /* 0x24 [Audio Mixer] wcaps 0x20010b: Stereo Amp-In */
1652 {0x24, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_IN_UNMUTE(0)},
1653 {0x24, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_IN_MUTE(3)},
1654 {0x24, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_IN_MUTE(2)},
1655 {0x24, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_IN_MUTE(4)},
1656 /* 0x23 [Audio Mixer] wcaps 0x20010b: Stereo Amp-In */
1657 {0x23, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_IN_UNMUTE(0)},
1658 {0x23, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_IN_MUTE(3)},
1659 {0x23, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_IN_MUTE(2)},
1660 {0x23, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_IN_MUTE(4)},
1661 /* 0x22 [Audio Mixer] wcaps 0x20010b: Stereo Amp-In */
1662 {0x22, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_IN_UNMUTE(0)},
1663 {0x22, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_IN_MUTE(3)},
1664 {0x22, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_IN_MUTE(2)},
1665 {0x22, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_IN_MUTE(4)},
1666 /* 0x07 [Audio Input] wcaps 0x10011b: Stereo Amp-In */
1667 {0x07, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_IN_MUTE(0)},
1668 {0x07, AC_VERB_SET_CONNECT_SEL
, 0x00},
1669 /* 0x08 [Audio Input] wcaps 0x10011b: Stereo Amp-In */
1670 {0x08, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_IN_MUTE(0)},
1671 {0x08, AC_VERB_SET_CONNECT_SEL
, 0x00},
1672 /* 0x09 [Audio Input] wcaps 0x10011b: Stereo Amp-In */
1673 {0x09, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_IN_MUTE(0)},
1674 {0x09, AC_VERB_SET_CONNECT_SEL
, 0x00},
1678 /* iMac 24 mixer. */
1679 static const struct snd_kcontrol_new alc885_imac24_mixer
[] = {
1680 HDA_CODEC_VOLUME("Master Playback Volume", 0x0c, 0x00, HDA_OUTPUT
),
1681 HDA_CODEC_MUTE("Master Playback Switch", 0x0c, 0x00, HDA_INPUT
),
1685 /* iMac 24 init verbs. */
1686 static const struct hda_verb alc885_imac24_init_verbs
[] = {
1687 /* Internal speakers: output 0 (0x0c) */
1688 {0x18, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_OUT
},
1689 {0x18, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_UNMUTE
},
1690 {0x18, AC_VERB_SET_CONNECT_SEL
, 0x00},
1691 /* Internal speakers: output 0 (0x0c) */
1692 {0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_OUT
},
1693 {0x1a, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_UNMUTE
},
1694 {0x1a, AC_VERB_SET_CONNECT_SEL
, 0x00},
1695 /* Headphone: output 0 (0x0c) */
1696 {0x14, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_HP
},
1697 {0x14, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_UNMUTE
},
1698 {0x14, AC_VERB_SET_CONNECT_SEL
, 0x00},
1699 {0x14, AC_VERB_SET_UNSOLICITED_ENABLE
, ALC_HP_EVENT
| AC_USRSP_EN
},
1700 /* Front Mic: input vref at 80% */
1701 {0x19, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_VREF80
},
1702 {0x19, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_MUTE
},
1706 /* Toggle speaker-output according to the hp-jack state */
1707 static void alc885_imac24_setup(struct hda_codec
*codec
)
1709 struct alc_spec
*spec
= codec
->spec
;
1711 spec
->autocfg
.hp_pins
[0] = 0x14;
1712 spec
->autocfg
.speaker_pins
[0] = 0x18;
1713 spec
->autocfg
.speaker_pins
[1] = 0x1a;
1715 spec
->automute_mode
= ALC_AUTOMUTE_AMP
;
1718 #define alc885_mb5_setup alc885_imac24_setup
1719 #define alc885_macmini3_setup alc885_imac24_setup
1721 /* Macbook Air 2,1 */
1722 static void alc885_mba21_setup(struct hda_codec
*codec
)
1724 struct alc_spec
*spec
= codec
->spec
;
1726 spec
->autocfg
.hp_pins
[0] = 0x14;
1727 spec
->autocfg
.speaker_pins
[0] = 0x18;
1729 spec
->automute_mode
= ALC_AUTOMUTE_AMP
;
1734 static void alc885_mbp3_setup(struct hda_codec
*codec
)
1736 struct alc_spec
*spec
= codec
->spec
;
1738 spec
->autocfg
.hp_pins
[0] = 0x15;
1739 spec
->autocfg
.speaker_pins
[0] = 0x14;
1741 spec
->automute_mode
= ALC_AUTOMUTE_AMP
;
1744 static void alc885_imac91_setup(struct hda_codec
*codec
)
1746 struct alc_spec
*spec
= codec
->spec
;
1748 spec
->autocfg
.hp_pins
[0] = 0x14;
1749 spec
->autocfg
.speaker_pins
[0] = 0x18;
1750 spec
->autocfg
.speaker_pins
[1] = 0x1a;
1752 spec
->automute_mode
= ALC_AUTOMUTE_AMP
;
1755 static const struct hda_verb alc882_targa_verbs
[] = {
1756 {0x0c, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_IN_UNMUTE(0)},
1757 {0x0c, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_IN_UNMUTE(1)},
1759 {0x14, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_HP
},
1760 {0x1b, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_OUT
},
1762 {0x18, AC_VERB_SET_CONNECT_SEL
, 0x02}, /* mic/clfe */
1763 {0x1a, AC_VERB_SET_CONNECT_SEL
, 0x01}, /* line/surround */
1764 {0x1b, AC_VERB_SET_CONNECT_SEL
, 0x00}, /* HP */
1766 {0x14, AC_VERB_SET_UNSOLICITED_ENABLE
, ALC_HP_EVENT
| AC_USRSP_EN
},
1770 /* toggle speaker-output according to the hp-jack state */
1771 static void alc882_targa_automute(struct hda_codec
*codec
)
1773 struct alc_spec
*spec
= codec
->spec
;
1774 alc_hp_automute(codec
);
1775 snd_hda_codec_write_cache(codec
, 1, 0, AC_VERB_SET_GPIO_DATA
,
1776 spec
->jack_present
? 1 : 3);
1779 static void alc882_targa_setup(struct hda_codec
*codec
)
1781 struct alc_spec
*spec
= codec
->spec
;
1783 spec
->autocfg
.hp_pins
[0] = 0x14;
1784 spec
->autocfg
.speaker_pins
[0] = 0x1b;
1786 spec
->automute_mode
= ALC_AUTOMUTE_AMP
;
1789 static void alc882_targa_unsol_event(struct hda_codec
*codec
, unsigned int res
)
1791 if ((res
>> 26) == ALC_HP_EVENT
)
1792 alc882_targa_automute(codec
);
1795 static const struct hda_verb alc882_asus_a7j_verbs
[] = {
1796 {0x0c, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_IN_UNMUTE(0)},
1797 {0x0c, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_IN_UNMUTE(1)},
1799 {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_HP
},
1800 {0x14, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_OUT
},
1801 {0x16, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_OUT
},
1803 {0x14, AC_VERB_SET_CONNECT_SEL
, 0x00}, /* Front */
1804 {0x15, AC_VERB_SET_CONNECT_SEL
, 0x00}, /* HP */
1805 {0x16, AC_VERB_SET_CONNECT_SEL
, 0x00}, /* Front */
1807 {0x18, AC_VERB_SET_CONNECT_SEL
, 0x02}, /* mic/clfe */
1808 {0x1a, AC_VERB_SET_CONNECT_SEL
, 0x01}, /* line/surround */
1809 {0x1b, AC_VERB_SET_CONNECT_SEL
, 0x00}, /* HP */
1813 static const struct hda_verb alc882_asus_a7m_verbs
[] = {
1814 {0x0c, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_IN_UNMUTE(0)},
1815 {0x0c, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_IN_UNMUTE(1)},
1817 {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_HP
},
1818 {0x14, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_OUT
},
1819 {0x16, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_OUT
},
1821 {0x14, AC_VERB_SET_CONNECT_SEL
, 0x00}, /* Front */
1822 {0x15, AC_VERB_SET_CONNECT_SEL
, 0x00}, /* HP */
1823 {0x16, AC_VERB_SET_CONNECT_SEL
, 0x00}, /* Front */
1825 {0x18, AC_VERB_SET_CONNECT_SEL
, 0x02}, /* mic/clfe */
1826 {0x1a, AC_VERB_SET_CONNECT_SEL
, 0x01}, /* line/surround */
1827 {0x1b, AC_VERB_SET_CONNECT_SEL
, 0x00}, /* HP */
1831 static void alc882_gpio_mute(struct hda_codec
*codec
, int pin
, int muted
)
1833 unsigned int gpiostate
, gpiomask
, gpiodir
;
1835 gpiostate
= snd_hda_codec_read(codec
, codec
->afg
, 0,
1836 AC_VERB_GET_GPIO_DATA
, 0);
1839 gpiostate
|= (1 << pin
);
1841 gpiostate
&= ~(1 << pin
);
1843 gpiomask
= snd_hda_codec_read(codec
, codec
->afg
, 0,
1844 AC_VERB_GET_GPIO_MASK
, 0);
1845 gpiomask
|= (1 << pin
);
1847 gpiodir
= snd_hda_codec_read(codec
, codec
->afg
, 0,
1848 AC_VERB_GET_GPIO_DIRECTION
, 0);
1849 gpiodir
|= (1 << pin
);
1852 snd_hda_codec_write(codec
, codec
->afg
, 0,
1853 AC_VERB_SET_GPIO_MASK
, gpiomask
);
1854 snd_hda_codec_write(codec
, codec
->afg
, 0,
1855 AC_VERB_SET_GPIO_DIRECTION
, gpiodir
);
1859 snd_hda_codec_write(codec
, codec
->afg
, 0,
1860 AC_VERB_SET_GPIO_DATA
, gpiostate
);
1863 /* set up GPIO at initialization */
1864 static void alc885_macpro_init_hook(struct hda_codec
*codec
)
1866 alc882_gpio_mute(codec
, 0, 0);
1867 alc882_gpio_mute(codec
, 1, 0);
1870 /* set up GPIO and update auto-muting at initialization */
1871 static void alc885_imac24_init_hook(struct hda_codec
*codec
)
1873 alc885_macpro_init_hook(codec
);
1874 alc_hp_automute(codec
);
1877 /* 2ch mode (Speaker:front, Subwoofer:CLFE, Line:input, Headphones:front) */
1878 static const struct hda_verb alc889A_mb31_ch2_init
[] = {
1879 {0x15, AC_VERB_SET_CONNECT_SEL
, 0x00}, /* HP as front */
1880 {0x16, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_UNMUTE
}, /* Subwoofer on */
1881 {0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_IN
}, /* Line as input */
1882 {0x1a, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_MUTE
}, /* Line off */
1886 /* 4ch mode (Speaker:front, Subwoofer:CLFE, Line:CLFE, Headphones:front) */
1887 static const struct hda_verb alc889A_mb31_ch4_init
[] = {
1888 {0x15, AC_VERB_SET_CONNECT_SEL
, 0x00}, /* HP as front */
1889 {0x16, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_UNMUTE
}, /* Subwoofer on */
1890 {0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_OUT
}, /* Line as output */
1891 {0x1a, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_UNMUTE
}, /* Line on */
1895 /* 5ch mode (Speaker:front, Subwoofer:CLFE, Line:input, Headphones:rear) */
1896 static const struct hda_verb alc889A_mb31_ch5_init
[] = {
1897 {0x15, AC_VERB_SET_CONNECT_SEL
, 0x01}, /* HP as rear */
1898 {0x16, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_UNMUTE
}, /* Subwoofer on */
1899 {0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_IN
}, /* Line as input */
1900 {0x1a, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_MUTE
}, /* Line off */
1904 /* 6ch mode (Speaker:front, Subwoofer:off, Line:CLFE, Headphones:Rear) */
1905 static const struct hda_verb alc889A_mb31_ch6_init
[] = {
1906 {0x15, AC_VERB_SET_CONNECT_SEL
, 0x01}, /* HP as front */
1907 {0x16, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_MUTE
}, /* Subwoofer off */
1908 {0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_OUT
}, /* Line as output */
1909 {0x1a, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_UNMUTE
}, /* Line on */
1913 static const struct hda_channel_mode alc889A_mb31_6ch_modes
[4] = {
1914 { 2, alc889A_mb31_ch2_init
},
1915 { 4, alc889A_mb31_ch4_init
},
1916 { 5, alc889A_mb31_ch5_init
},
1917 { 6, alc889A_mb31_ch6_init
},
1920 static const struct hda_verb alc883_medion_eapd_verbs
[] = {
1921 /* eanable EAPD on medion laptop */
1922 {0x20, AC_VERB_SET_COEF_INDEX
, 0x07},
1923 {0x20, AC_VERB_SET_PROC_COEF
, 0x3070},
1927 #define alc883_base_mixer alc882_base_mixer
1929 static const struct snd_kcontrol_new alc883_mitac_mixer
[] = {
1930 HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT
),
1931 HDA_BIND_MUTE("Front Playback Switch", 0x0c, 2, HDA_INPUT
),
1932 HDA_CODEC_VOLUME_MONO("Center Playback Volume", 0x0e, 1, 0x0, HDA_OUTPUT
),
1933 HDA_CODEC_VOLUME_MONO("LFE Playback Volume", 0x0e, 2, 0x0, HDA_OUTPUT
),
1934 HDA_BIND_MUTE_MONO("Center Playback Switch", 0x0e, 1, 2, HDA_INPUT
),
1935 HDA_BIND_MUTE_MONO("LFE Playback Switch", 0x0e, 2, 2, HDA_INPUT
),
1936 HDA_CODEC_MUTE("Headphone Playback Switch", 0x15, 0x0, HDA_OUTPUT
),
1937 HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT
),
1938 HDA_CODEC_VOLUME("Mic Boost Volume", 0x18, 0, HDA_INPUT
),
1939 HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT
),
1940 HDA_CODEC_VOLUME("Front Mic Playback Volume", 0x0b, 0x1, HDA_INPUT
),
1941 HDA_CODEC_VOLUME("Front Mic Boost Volume", 0x19, 0, HDA_INPUT
),
1942 HDA_CODEC_MUTE("Front Mic Playback Switch", 0x0b, 0x1, HDA_INPUT
),
1946 static const struct snd_kcontrol_new alc883_clevo_m720_mixer
[] = {
1947 HDA_CODEC_VOLUME("Headphone Playback Volume", 0x0c, 0x0, HDA_OUTPUT
),
1948 HDA_BIND_MUTE("Headphone Playback Switch", 0x0c, 2, HDA_INPUT
),
1949 HDA_CODEC_VOLUME("Speaker Playback Volume", 0x0d, 0x0, HDA_OUTPUT
),
1950 HDA_BIND_MUTE("Speaker Playback Switch", 0x0d, 2, HDA_INPUT
),
1951 HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT
),
1952 HDA_CODEC_VOLUME("Mic Boost Volume", 0x18, 0, HDA_INPUT
),
1953 HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT
),
1954 HDA_CODEC_VOLUME("Internal Mic Playback Volume", 0x0b, 0x1, HDA_INPUT
),
1955 HDA_CODEC_VOLUME("Internal Mic Boost Volume", 0x19, 0, HDA_INPUT
),
1956 HDA_CODEC_MUTE("Internal Mic Playback Switch", 0x0b, 0x1, HDA_INPUT
),
1960 static const struct snd_kcontrol_new alc883_2ch_fujitsu_pi2515_mixer
[] = {
1961 HDA_CODEC_VOLUME("Headphone Playback Volume", 0x0c, 0x0, HDA_OUTPUT
),
1962 HDA_BIND_MUTE("Headphone Playback Switch", 0x0c, 2, HDA_INPUT
),
1963 HDA_CODEC_VOLUME("Speaker Playback Volume", 0x0d, 0x0, HDA_OUTPUT
),
1964 HDA_BIND_MUTE("Speaker Playback Switch", 0x0d, 2, HDA_INPUT
),
1965 HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT
),
1966 HDA_CODEC_VOLUME("Mic Boost Volume", 0x18, 0, HDA_INPUT
),
1967 HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT
),
1968 HDA_CODEC_VOLUME("Internal Mic Playback Volume", 0x0b, 0x1, HDA_INPUT
),
1969 HDA_CODEC_VOLUME("Internal Mic Boost Volume", 0x19, 0, HDA_INPUT
),
1970 HDA_CODEC_MUTE("Internal Mic Playback Switch", 0x0b, 0x1, HDA_INPUT
),
1974 static const struct snd_kcontrol_new alc883_3ST_2ch_mixer
[] = {
1975 HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT
),
1976 HDA_BIND_MUTE("Front Playback Switch", 0x0c, 2, HDA_INPUT
),
1977 HDA_CODEC_MUTE("Headphone Playback Switch", 0x1b, 0x0, HDA_OUTPUT
),
1978 HDA_CODEC_VOLUME("CD Playback Volume", 0x0b, 0x04, HDA_INPUT
),
1979 HDA_CODEC_MUTE("CD Playback Switch", 0x0b, 0x04, HDA_INPUT
),
1980 HDA_CODEC_VOLUME("Line Playback Volume", 0x0b, 0x02, HDA_INPUT
),
1981 HDA_CODEC_MUTE("Line Playback Switch", 0x0b, 0x02, HDA_INPUT
),
1982 HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT
),
1983 HDA_CODEC_VOLUME("Mic Boost Volume", 0x18, 0, HDA_INPUT
),
1984 HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT
),
1985 HDA_CODEC_VOLUME("Front Mic Playback Volume", 0x0b, 0x1, HDA_INPUT
),
1986 HDA_CODEC_VOLUME("Front Mic Boost Volume", 0x19, 0, HDA_INPUT
),
1987 HDA_CODEC_MUTE("Front Mic Playback Switch", 0x0b, 0x1, HDA_INPUT
),
1991 static const struct snd_kcontrol_new alc883_3ST_6ch_mixer
[] = {
1992 HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT
),
1993 HDA_BIND_MUTE("Front Playback Switch", 0x0c, 2, HDA_INPUT
),
1994 HDA_CODEC_VOLUME("Surround Playback Volume", 0x0d, 0x0, HDA_OUTPUT
),
1995 HDA_BIND_MUTE("Surround Playback Switch", 0x0d, 2, HDA_INPUT
),
1996 HDA_CODEC_VOLUME_MONO("Center Playback Volume", 0x0e, 1, 0x0, HDA_OUTPUT
),
1997 HDA_CODEC_VOLUME_MONO("LFE Playback Volume", 0x0e, 2, 0x0, HDA_OUTPUT
),
1998 HDA_BIND_MUTE_MONO("Center Playback Switch", 0x0e, 1, 2, HDA_INPUT
),
1999 HDA_BIND_MUTE_MONO("LFE Playback Switch", 0x0e, 2, 2, HDA_INPUT
),
2000 HDA_CODEC_MUTE("Headphone Playback Switch", 0x1b, 0x0, HDA_OUTPUT
),
2001 HDA_CODEC_VOLUME("CD Playback Volume", 0x0b, 0x04, HDA_INPUT
),
2002 HDA_CODEC_MUTE("CD Playback Switch", 0x0b, 0x04, HDA_INPUT
),
2003 HDA_CODEC_VOLUME("Line Playback Volume", 0x0b, 0x02, HDA_INPUT
),
2004 HDA_CODEC_MUTE("Line Playback Switch", 0x0b, 0x02, HDA_INPUT
),
2005 HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT
),
2006 HDA_CODEC_VOLUME("Mic Boost Volume", 0x18, 0, HDA_INPUT
),
2007 HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT
),
2008 HDA_CODEC_VOLUME("Front Mic Playback Volume", 0x0b, 0x1, HDA_INPUT
),
2009 HDA_CODEC_VOLUME("Front Mic Boost Volume", 0x19, 0, HDA_INPUT
),
2010 HDA_CODEC_MUTE("Front Mic Playback Switch", 0x0b, 0x1, HDA_INPUT
),
2014 static const struct snd_kcontrol_new alc883_3ST_6ch_intel_mixer
[] = {
2015 HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT
),
2016 HDA_BIND_MUTE("Front Playback Switch", 0x0c, 2, HDA_INPUT
),
2017 HDA_CODEC_VOLUME("Surround Playback Volume", 0x0d, 0x0, HDA_OUTPUT
),
2018 HDA_BIND_MUTE("Surround Playback Switch", 0x0d, 2, HDA_INPUT
),
2019 HDA_CODEC_VOLUME_MONO("Center Playback Volume", 0x0e, 1, 0x0,
2021 HDA_CODEC_VOLUME_MONO("LFE Playback Volume", 0x0e, 2, 0x0, HDA_OUTPUT
),
2022 HDA_BIND_MUTE_MONO("Center Playback Switch", 0x0e, 1, 2, HDA_INPUT
),
2023 HDA_BIND_MUTE_MONO("LFE Playback Switch", 0x0e, 2, 2, HDA_INPUT
),
2024 HDA_CODEC_MUTE("Headphone Playback Switch", 0x15, 0x0, HDA_OUTPUT
),
2025 HDA_CODEC_VOLUME("CD Playback Volume", 0x0b, 0x04, HDA_INPUT
),
2026 HDA_CODEC_MUTE("CD Playback Switch", 0x0b, 0x04, HDA_INPUT
),
2027 HDA_CODEC_VOLUME("Line Playback Volume", 0x0b, 0x02, HDA_INPUT
),
2028 HDA_CODEC_MUTE("Line Playback Switch", 0x0b, 0x02, HDA_INPUT
),
2029 HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x1, HDA_INPUT
),
2030 HDA_CODEC_VOLUME("Mic Boost Volume", 0x19, 0, HDA_INPUT
),
2031 HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x1, HDA_INPUT
),
2032 HDA_CODEC_VOLUME("Front Mic Playback Volume", 0x0b, 0x0, HDA_INPUT
),
2033 HDA_CODEC_VOLUME("Front Mic Boost Volume", 0x18, 0, HDA_INPUT
),
2034 HDA_CODEC_MUTE("Front Mic Playback Switch", 0x0b, 0x0, HDA_INPUT
),
2038 static const struct snd_kcontrol_new alc885_8ch_intel_mixer
[] = {
2039 HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT
),
2040 HDA_BIND_MUTE("Front Playback Switch", 0x0c, 2, HDA_INPUT
),
2041 HDA_CODEC_VOLUME("Surround Playback Volume", 0x0d, 0x0, HDA_OUTPUT
),
2042 HDA_BIND_MUTE("Surround Playback Switch", 0x0d, 2, HDA_INPUT
),
2043 HDA_CODEC_VOLUME_MONO("Center Playback Volume", 0x0e, 1, 0x0,
2045 HDA_CODEC_VOLUME_MONO("LFE Playback Volume", 0x0e, 2, 0x0, HDA_OUTPUT
),
2046 HDA_BIND_MUTE_MONO("Center Playback Switch", 0x0e, 1, 2, HDA_INPUT
),
2047 HDA_BIND_MUTE_MONO("LFE Playback Switch", 0x0e, 2, 2, HDA_INPUT
),
2048 HDA_CODEC_VOLUME("Speaker Playback Volume", 0x0f, 0x0, HDA_OUTPUT
),
2049 HDA_BIND_MUTE("Speaker Playback Switch", 0x0f, 2, HDA_INPUT
),
2050 HDA_CODEC_MUTE("Headphone Playback Switch", 0x15, 0x0, HDA_OUTPUT
),
2051 HDA_CODEC_VOLUME("Line Playback Volume", 0x0b, 0x02, HDA_INPUT
),
2052 HDA_CODEC_MUTE("Line Playback Switch", 0x0b, 0x02, HDA_INPUT
),
2053 HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x3, HDA_INPUT
),
2054 HDA_CODEC_VOLUME("Mic Boost Volume", 0x1b, 0, HDA_INPUT
),
2055 HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x3, HDA_INPUT
),
2056 HDA_CODEC_VOLUME("Front Mic Playback Volume", 0x0b, 0x0, HDA_INPUT
),
2057 HDA_CODEC_VOLUME("Front Mic Boost Volume", 0x18, 0, HDA_INPUT
),
2058 HDA_CODEC_MUTE("Front Mic Playback Switch", 0x0b, 0x0, HDA_INPUT
),
2062 static const struct snd_kcontrol_new alc883_fivestack_mixer
[] = {
2063 HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT
),
2064 HDA_BIND_MUTE("Front Playback Switch", 0x0c, 2, HDA_INPUT
),
2065 HDA_CODEC_VOLUME("Surround Playback Volume", 0x0d, 0x0, HDA_OUTPUT
),
2066 HDA_BIND_MUTE("Surround Playback Switch", 0x0d, 2, HDA_INPUT
),
2067 HDA_CODEC_VOLUME_MONO("Center Playback Volume", 0x0e, 1, 0x0, HDA_OUTPUT
),
2068 HDA_CODEC_VOLUME_MONO("LFE Playback Volume", 0x0e, 2, 0x0, HDA_OUTPUT
),
2069 HDA_BIND_MUTE_MONO("Center Playback Switch", 0x0e, 1, 2, HDA_INPUT
),
2070 HDA_BIND_MUTE_MONO("LFE Playback Switch", 0x0e, 2, 2, HDA_INPUT
),
2071 HDA_CODEC_MUTE("Headphone Playback Switch", 0x1b, 0x0, HDA_OUTPUT
),
2072 HDA_CODEC_VOLUME("CD Playback Volume", 0x0b, 0x04, HDA_INPUT
),
2073 HDA_CODEC_MUTE("CD Playback Switch", 0x0b, 0x04, HDA_INPUT
),
2074 HDA_CODEC_VOLUME("Line Playback Volume", 0x0b, 0x02, HDA_INPUT
),
2075 HDA_CODEC_MUTE("Line Playback Switch", 0x0b, 0x02, HDA_INPUT
),
2076 HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT
),
2077 HDA_CODEC_VOLUME("Mic Boost Volume", 0x18, 0, HDA_INPUT
),
2078 HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT
),
2079 HDA_CODEC_VOLUME("Front Mic Playback Volume", 0x0b, 0x1, HDA_INPUT
),
2080 HDA_CODEC_VOLUME("Front Mic Boost Volume", 0x19, 0, HDA_INPUT
),
2081 HDA_CODEC_MUTE("Front Mic Playback Switch", 0x0b, 0x1, HDA_INPUT
),
2085 static const struct snd_kcontrol_new alc883_targa_mixer
[] = {
2086 HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT
),
2087 HDA_BIND_MUTE("Front Playback Switch", 0x0c, 2, HDA_INPUT
),
2088 HDA_CODEC_MUTE("Headphone Playback Switch", 0x14, 0x0, HDA_OUTPUT
),
2089 HDA_CODEC_MUTE("Speaker Playback Switch", 0x1b, 0x0, HDA_OUTPUT
),
2090 HDA_CODEC_VOLUME("Surround Playback Volume", 0x0d, 0x0, HDA_OUTPUT
),
2091 HDA_BIND_MUTE("Surround Playback Switch", 0x0d, 2, HDA_INPUT
),
2092 HDA_CODEC_VOLUME_MONO("Center Playback Volume", 0x0e, 1, 0x0, HDA_OUTPUT
),
2093 HDA_CODEC_VOLUME_MONO("LFE Playback Volume", 0x0e, 2, 0x0, HDA_OUTPUT
),
2094 HDA_BIND_MUTE_MONO("Center Playback Switch", 0x0e, 1, 2, HDA_INPUT
),
2095 HDA_BIND_MUTE_MONO("LFE Playback Switch", 0x0e, 2, 2, HDA_INPUT
),
2096 HDA_CODEC_VOLUME("CD Playback Volume", 0x0b, 0x04, HDA_INPUT
),
2097 HDA_CODEC_MUTE("CD Playback Switch", 0x0b, 0x04, HDA_INPUT
),
2098 HDA_CODEC_VOLUME("Line Playback Volume", 0x0b, 0x02, HDA_INPUT
),
2099 HDA_CODEC_MUTE("Line Playback Switch", 0x0b, 0x02, HDA_INPUT
),
2100 HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT
),
2101 HDA_CODEC_VOLUME("Mic Boost Volume", 0x18, 0, HDA_INPUT
),
2102 HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT
),
2106 static const struct snd_kcontrol_new alc883_targa_2ch_mixer
[] = {
2107 HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT
),
2108 HDA_BIND_MUTE("Front Playback Switch", 0x0c, 2, HDA_INPUT
),
2109 HDA_CODEC_MUTE("Headphone Playback Switch", 0x14, 0x0, HDA_OUTPUT
),
2110 HDA_CODEC_MUTE("Speaker Playback Switch", 0x1b, 0x0, HDA_OUTPUT
),
2111 HDA_CODEC_VOLUME("CD Playback Volume", 0x0b, 0x04, HDA_INPUT
),
2112 HDA_CODEC_MUTE("CD Playback Switch", 0x0b, 0x04, HDA_INPUT
),
2113 HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT
),
2114 HDA_CODEC_VOLUME("Mic Boost Volume", 0x18, 0, HDA_INPUT
),
2115 HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT
),
2116 HDA_CODEC_VOLUME("Internal Mic Playback Volume", 0x0b, 0x1, HDA_INPUT
),
2117 HDA_CODEC_VOLUME("Internal Mic Boost Volume", 0x19, 0, HDA_INPUT
),
2118 HDA_CODEC_MUTE("Internal Mic Playback Switch", 0x0b, 0x1, HDA_INPUT
),
2122 static const struct snd_kcontrol_new alc883_targa_8ch_mixer
[] = {
2123 HDA_CODEC_VOLUME("Side Playback Volume", 0x0f, 0x0, HDA_OUTPUT
),
2124 HDA_BIND_MUTE("Side Playback Switch", 0x0f, 2, HDA_INPUT
),
2125 HDA_CODEC_VOLUME("Internal Mic Playback Volume", 0x0b, 0x1, HDA_INPUT
),
2126 HDA_CODEC_VOLUME("Internal Mic Boost Volume", 0x19, 0, HDA_INPUT
),
2127 HDA_CODEC_MUTE("Internal Mic Playback Switch", 0x0b, 0x1, HDA_INPUT
),
2131 static const struct snd_kcontrol_new alc883_lenovo_101e_2ch_mixer
[] = {
2132 HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT
),
2133 HDA_BIND_MUTE("Front Playback Switch", 0x0c, 2, HDA_INPUT
),
2134 HDA_CODEC_VOLUME("Speaker Playback Volume", 0x0d, 0x0, HDA_OUTPUT
),
2135 HDA_BIND_MUTE("Speaker Playback Switch", 0x0d, 2, HDA_INPUT
),
2136 HDA_CODEC_MUTE("Headphone Playback Switch", 0x1b, 0x0, HDA_OUTPUT
),
2137 HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x1, HDA_INPUT
),
2138 HDA_CODEC_VOLUME("Mic Boost Volume", 0x18, 0, HDA_INPUT
),
2139 HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x1, HDA_INPUT
),
2143 static const struct snd_kcontrol_new alc883_lenovo_nb0763_mixer
[] = {
2144 HDA_CODEC_VOLUME("Speaker Playback Volume", 0x0c, 0x0, HDA_OUTPUT
),
2145 HDA_BIND_MUTE("Speaker Playback Switch", 0x0c, 2, HDA_INPUT
),
2146 HDA_CODEC_MUTE("Headphone Playback Switch", 0x14, 0x0, HDA_OUTPUT
),
2147 HDA_CODEC_VOLUME("CD Playback Volume", 0x0b, 0x04, HDA_INPUT
),
2148 HDA_CODEC_MUTE("CD Playback Switch", 0x0b, 0x04, HDA_INPUT
),
2149 HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT
),
2150 HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT
),
2151 HDA_CODEC_VOLUME("Internal Mic Playback Volume", 0x0b, 0x1, HDA_INPUT
),
2152 HDA_CODEC_MUTE("Internal Mic Playback Switch", 0x0b, 0x1, HDA_INPUT
),
2156 static const struct snd_kcontrol_new alc883_medion_wim2160_mixer
[] = {
2157 HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT
),
2158 HDA_BIND_MUTE("Front Playback Switch", 0x0c, 2, HDA_INPUT
),
2159 HDA_CODEC_MUTE("Speaker Playback Switch", 0x15, 0x0, HDA_OUTPUT
),
2160 HDA_CODEC_MUTE("Headphone Playback Switch", 0x1a, 0x0, HDA_OUTPUT
),
2161 HDA_CODEC_VOLUME("Line Playback Volume", 0x08, 0x0, HDA_INPUT
),
2162 HDA_CODEC_MUTE("Line Playback Switch", 0x08, 0x0, HDA_INPUT
),
2166 static const struct hda_verb alc883_medion_wim2160_verbs
[] = {
2167 /* Unmute front mixer */
2168 {0x0c, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_IN_UNMUTE(0)},
2169 {0x0c, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_IN_UNMUTE(1)},
2171 /* Set speaker pin to front mixer */
2172 {0x15, AC_VERB_SET_CONNECT_SEL
, 0x00},
2174 /* Init headphone pin */
2175 {0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_HP
},
2176 {0x1a, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_UNMUTE
},
2177 {0x1a, AC_VERB_SET_CONNECT_SEL
, 0x00},
2178 {0x1a, AC_VERB_SET_UNSOLICITED_ENABLE
, ALC_HP_EVENT
| AC_USRSP_EN
},
2183 /* toggle speaker-output according to the hp-jack state */
2184 static void alc883_medion_wim2160_setup(struct hda_codec
*codec
)
2186 struct alc_spec
*spec
= codec
->spec
;
2188 spec
->autocfg
.hp_pins
[0] = 0x1a;
2189 spec
->autocfg
.speaker_pins
[0] = 0x15;
2191 spec
->automute_mode
= ALC_AUTOMUTE_AMP
;
2194 static const struct snd_kcontrol_new alc883_acer_aspire_mixer
[] = {
2195 HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT
),
2196 HDA_BIND_MUTE("Front Playback Switch", 0x0c, 2, HDA_INPUT
),
2197 HDA_CODEC_MUTE("Headphone Playback Switch", 0x14, 0x0, HDA_OUTPUT
),
2198 HDA_CODEC_VOLUME("Line Playback Volume", 0x0b, 0x02, HDA_INPUT
),
2199 HDA_CODEC_MUTE("Line Playback Switch", 0x0b, 0x02, HDA_INPUT
),
2200 HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT
),
2201 HDA_CODEC_VOLUME("Mic Boost Volume", 0x18, 0, HDA_INPUT
),
2202 HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT
),
2206 static const struct snd_kcontrol_new alc888_acer_aspire_6530_mixer
[] = {
2207 HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT
),
2208 HDA_CODEC_VOLUME("LFE Playback Volume", 0x0f, 0x0, HDA_OUTPUT
),
2209 HDA_CODEC_VOLUME("Line Playback Volume", 0x0b, 0x02, HDA_INPUT
),
2210 HDA_CODEC_MUTE("Line Playback Switch", 0x0b, 0x02, HDA_INPUT
),
2211 HDA_CODEC_VOLUME("CD Playback Volume", 0x0b, 0x04, HDA_INPUT
),
2212 HDA_CODEC_MUTE("CD Playback Switch", 0x0b, 0x04, HDA_INPUT
),
2213 HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT
),
2214 HDA_CODEC_VOLUME("Mic Boost Volume", 0x18, 0, HDA_INPUT
),
2215 HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT
),
2219 static const struct snd_kcontrol_new alc888_lenovo_sky_mixer
[] = {
2220 HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT
),
2221 HDA_BIND_MUTE("Front Playback Switch", 0x0c, 2, HDA_INPUT
),
2222 HDA_CODEC_VOLUME("Surround Playback Volume", 0x0e, 0x0, HDA_OUTPUT
),
2223 HDA_BIND_MUTE("Surround Playback Switch", 0x0e, 2, HDA_INPUT
),
2224 HDA_CODEC_VOLUME_MONO("Center Playback Volume",
2225 0x0d, 1, 0x0, HDA_OUTPUT
),
2226 HDA_CODEC_VOLUME_MONO("LFE Playback Volume", 0x0d, 2, 0x0, HDA_OUTPUT
),
2227 HDA_BIND_MUTE_MONO("Center Playback Switch", 0x0d, 1, 2, HDA_INPUT
),
2228 HDA_BIND_MUTE_MONO("LFE Playback Switch", 0x0d, 2, 2, HDA_INPUT
),
2229 HDA_CODEC_VOLUME("Side Playback Volume", 0x0f, 0x0, HDA_OUTPUT
),
2230 HDA_BIND_MUTE("Side Playback Switch", 0x0f, 2, HDA_INPUT
),
2231 HDA_CODEC_VOLUME("CD Playback Volume", 0x0b, 0x04, HDA_INPUT
),
2232 HDA_CODEC_MUTE("CD Playback Switch", 0x0b, 0x04, HDA_INPUT
),
2233 HDA_CODEC_VOLUME("Line Playback Volume", 0x0b, 0x02, HDA_INPUT
),
2234 HDA_CODEC_MUTE("Line Playback Switch", 0x0b, 0x02, HDA_INPUT
),
2235 HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT
),
2236 HDA_CODEC_VOLUME("Mic Boost Volume", 0x18, 0, HDA_INPUT
),
2237 HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT
),
2238 HDA_CODEC_VOLUME("Front Mic Playback Volume", 0x0b, 0x1, HDA_INPUT
),
2239 HDA_CODEC_VOLUME("Front Mic Boost Volume", 0x19, 0, HDA_INPUT
),
2240 HDA_CODEC_MUTE("Front Mic Playback Switch", 0x0b, 0x1, HDA_INPUT
),
2244 static const struct snd_kcontrol_new alc889A_mb31_mixer
[] = {
2246 HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x00, HDA_OUTPUT
),
2247 HDA_BIND_MUTE("Front Playback Switch", 0x0c, 0x02, HDA_INPUT
),
2248 HDA_CODEC_VOLUME("Surround Playback Volume", 0x0d, 0x00, HDA_OUTPUT
),
2249 HDA_BIND_MUTE("Surround Playback Switch", 0x0d, 0x02, HDA_INPUT
),
2250 HDA_CODEC_VOLUME_MONO("Center Playback Volume", 0x0e, 1, 0x00,
2252 HDA_BIND_MUTE_MONO("Center Playback Switch", 0x0e, 1, 0x02, HDA_INPUT
),
2253 HDA_CODEC_VOLUME_MONO("LFE Playback Volume", 0x0e, 2, 0x00, HDA_OUTPUT
),
2254 HDA_BIND_MUTE_MONO("LFE Playback Switch", 0x0e, 2, 0x02, HDA_INPUT
),
2255 /* Output switches */
2256 HDA_CODEC_MUTE("Enable Speaker", 0x14, 0x00, HDA_OUTPUT
),
2257 HDA_CODEC_MUTE("Enable Headphones", 0x15, 0x00, HDA_OUTPUT
),
2258 HDA_CODEC_MUTE_MONO("Enable LFE", 0x16, 2, 0x00, HDA_OUTPUT
),
2260 HDA_CODEC_VOLUME("Mic Boost Volume", 0x18, 0x00, HDA_INPUT
),
2261 HDA_CODEC_VOLUME("Line Boost Volume", 0x1a, 0x00, HDA_INPUT
),
2263 HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x00, HDA_INPUT
),
2264 HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x00, HDA_INPUT
),
2265 HDA_CODEC_VOLUME("Line Playback Volume", 0x0b, 0x02, HDA_INPUT
),
2266 HDA_CODEC_MUTE("Line Playback Switch", 0x0b, 0x02, HDA_INPUT
),
2270 static const struct snd_kcontrol_new alc883_vaiott_mixer
[] = {
2271 HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT
),
2272 HDA_BIND_MUTE("Front Playback Switch", 0x0c, 2, HDA_INPUT
),
2273 HDA_CODEC_MUTE("Headphone Playback Switch", 0x15, 0x0, HDA_OUTPUT
),
2274 HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x1, HDA_INPUT
),
2275 HDA_CODEC_VOLUME("Mic Boost Volume", 0x19, 0, HDA_INPUT
),
2276 HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x1, HDA_INPUT
),
2280 static const struct hda_bind_ctls alc883_bind_cap_vol
= {
2281 .ops
= &snd_hda_bind_vol
,
2283 HDA_COMPOSE_AMP_VAL(0x08, 3, 0, HDA_INPUT
),
2284 HDA_COMPOSE_AMP_VAL(0x09, 3, 0, HDA_INPUT
),
2289 static const struct hda_bind_ctls alc883_bind_cap_switch
= {
2290 .ops
= &snd_hda_bind_sw
,
2292 HDA_COMPOSE_AMP_VAL(0x08, 3, 0, HDA_INPUT
),
2293 HDA_COMPOSE_AMP_VAL(0x09, 3, 0, HDA_INPUT
),
2298 static const struct snd_kcontrol_new alc883_asus_eee1601_mixer
[] = {
2299 HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT
),
2300 HDA_BIND_MUTE("Front Playback Switch", 0x0c, 2, HDA_INPUT
),
2301 HDA_CODEC_MUTE("Headphone Playback Switch", 0x14, 0x0, HDA_OUTPUT
),
2302 HDA_CODEC_VOLUME("Line Playback Volume", 0x0b, 0x02, HDA_INPUT
),
2303 HDA_CODEC_MUTE("Line Playback Switch", 0x0b, 0x02, HDA_INPUT
),
2304 HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT
),
2305 HDA_CODEC_VOLUME("Mic Boost Volume", 0x18, 0, HDA_INPUT
),
2306 HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT
),
2310 static const struct snd_kcontrol_new alc883_asus_eee1601_cap_mixer
[] = {
2311 HDA_BIND_VOL("Capture Volume", &alc883_bind_cap_vol
),
2312 HDA_BIND_SW("Capture Switch", &alc883_bind_cap_switch
),
2314 .iface
= SNDRV_CTL_ELEM_IFACE_MIXER
,
2315 /* .name = "Capture Source", */
2316 .name
= "Input Source",
2318 .info
= alc_mux_enum_info
,
2319 .get
= alc_mux_enum_get
,
2320 .put
= alc_mux_enum_put
,
2325 static const struct snd_kcontrol_new alc883_chmode_mixer
[] = {
2327 .iface
= SNDRV_CTL_ELEM_IFACE_MIXER
,
2328 .name
= "Channel Mode",
2329 .info
= alc_ch_mode_info
,
2330 .get
= alc_ch_mode_get
,
2331 .put
= alc_ch_mode_put
,
2336 /* toggle speaker-output according to the hp-jack state */
2337 static void alc883_mitac_setup(struct hda_codec
*codec
)
2339 struct alc_spec
*spec
= codec
->spec
;
2341 spec
->autocfg
.hp_pins
[0] = 0x15;
2342 spec
->autocfg
.speaker_pins
[0] = 0x14;
2343 spec
->autocfg
.speaker_pins
[1] = 0x17;
2345 spec
->automute_mode
= ALC_AUTOMUTE_AMP
;
2348 static const struct hda_verb alc883_mitac_verbs
[] = {
2350 {0x15, AC_VERB_SET_CONNECT_SEL
, 0x00},
2351 {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_HP
},
2353 {0x17, AC_VERB_SET_CONNECT_SEL
, 0x02},
2354 {0x17, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_OUT
},
2356 /* enable unsolicited event */
2357 {0x15, AC_VERB_SET_UNSOLICITED_ENABLE
, ALC_HP_EVENT
| AC_USRSP_EN
},
2358 /* {0x18, AC_VERB_SET_UNSOLICITED_ENABLE, ALC_MIC_EVENT | AC_USRSP_EN}, */
2363 static const struct hda_verb alc883_clevo_m540r_verbs
[] = {
2365 {0x15, AC_VERB_SET_CONNECT_SEL
, 0x00},
2366 {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_HP
},
2368 /*{0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP},*/
2370 /* enable unsolicited event */
2372 {0x15, AC_VERB_SET_UNSOLICITED_ENABLE, ALC_HP_EVENT | AC_USRSP_EN},
2373 {0x18, AC_VERB_SET_UNSOLICITED_ENABLE, ALC_MIC_EVENT | AC_USRSP_EN},
2379 static const struct hda_verb alc883_clevo_m720_verbs
[] = {
2381 {0x15, AC_VERB_SET_CONNECT_SEL
, 0x00},
2382 {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_HP
},
2384 {0x14, AC_VERB_SET_CONNECT_SEL
, 0x01},
2385 {0x14, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_OUT
},
2387 /* enable unsolicited event */
2388 {0x15, AC_VERB_SET_UNSOLICITED_ENABLE
, ALC_HP_EVENT
| AC_USRSP_EN
},
2389 {0x18, AC_VERB_SET_UNSOLICITED_ENABLE
, ALC_MIC_EVENT
| AC_USRSP_EN
},
2394 static const struct hda_verb alc883_2ch_fujitsu_pi2515_verbs
[] = {
2396 {0x14, AC_VERB_SET_CONNECT_SEL
, 0x00},
2397 {0x14, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_HP
},
2399 {0x15, AC_VERB_SET_CONNECT_SEL
, 0x01},
2400 {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_OUT
},
2402 /* enable unsolicited event */
2403 {0x14, AC_VERB_SET_UNSOLICITED_ENABLE
, ALC_HP_EVENT
| AC_USRSP_EN
},
2408 static const struct hda_verb alc883_targa_verbs
[] = {
2409 {0x0c, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_IN_UNMUTE(0)},
2410 {0x0c, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_IN_UNMUTE(1)},
2412 {0x14, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_HP
},
2413 {0x1b, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_OUT
},
2415 /* Connect Line-Out side jack (SPDIF) to Side */
2416 {0x17, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_OUT
},
2417 {0x17, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_UNMUTE
},
2418 {0x17, AC_VERB_SET_CONNECT_SEL
, 0x03},
2419 /* Connect Mic jack to CLFE */
2420 {0x18, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_OUT
},
2421 {0x18, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_UNMUTE
},
2422 {0x18, AC_VERB_SET_CONNECT_SEL
, 0x02},
2423 /* Connect Line-in jack to Surround */
2424 {0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_OUT
},
2425 {0x1a, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_UNMUTE
},
2426 {0x1a, AC_VERB_SET_CONNECT_SEL
, 0x01},
2427 /* Connect HP out jack to Front */
2428 {0x1b, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_OUT
},
2429 {0x1b, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_UNMUTE
},
2430 {0x1b, AC_VERB_SET_CONNECT_SEL
, 0x00},
2432 {0x14, AC_VERB_SET_UNSOLICITED_ENABLE
, ALC_HP_EVENT
| AC_USRSP_EN
},
2437 static const struct hda_verb alc883_lenovo_101e_verbs
[] = {
2438 {0x15, AC_VERB_SET_CONNECT_SEL
, 0x00},
2439 {0x14, AC_VERB_SET_UNSOLICITED_ENABLE
, ALC_FRONT_EVENT
|AC_USRSP_EN
},
2440 {0x1b, AC_VERB_SET_UNSOLICITED_ENABLE
, ALC_HP_EVENT
|AC_USRSP_EN
},
2444 static const struct hda_verb alc883_lenovo_nb0763_verbs
[] = {
2445 {0x15, AC_VERB_SET_CONNECT_SEL
, 0x00},
2446 {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_HP
},
2447 {0x14, AC_VERB_SET_UNSOLICITED_ENABLE
, ALC_HP_EVENT
| AC_USRSP_EN
},
2448 {0x14, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_HP
},
2452 static const struct hda_verb alc888_lenovo_ms7195_verbs
[] = {
2453 {0x0c, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_IN_UNMUTE(0)},
2454 {0x0c, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_IN_UNMUTE(1)},
2455 {0x15, AC_VERB_SET_CONNECT_SEL
, 0x00},
2456 {0x14, AC_VERB_SET_UNSOLICITED_ENABLE
, ALC_FRONT_EVENT
| AC_USRSP_EN
},
2457 {0x1b, AC_VERB_SET_UNSOLICITED_ENABLE
, ALC_HP_EVENT
| AC_USRSP_EN
},
2461 static const struct hda_verb alc883_haier_w66_verbs
[] = {
2462 {0x0c, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_IN_UNMUTE(0)},
2463 {0x0c, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_IN_UNMUTE(1)},
2465 {0x14, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_OUT
},
2467 {0x1b, AC_VERB_SET_CONNECT_SEL
, 0x00},
2468 {0x1b, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_HP
},
2469 {0x1b, AC_VERB_SET_UNSOLICITED_ENABLE
, ALC_HP_EVENT
| AC_USRSP_EN
},
2470 {0x1b, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_HP
},
2474 static const struct hda_verb alc888_lenovo_sky_verbs
[] = {
2475 {0x0c, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_IN_UNMUTE(0)},
2476 {0x0c, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_IN_UNMUTE(1)},
2477 {0x0d, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_IN_UNMUTE(0)},
2478 {0x0e, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_IN_UNMUTE(0)},
2479 {0x0f, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_IN_UNMUTE(0)},
2480 {0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_OUT
},
2481 {0x1a, AC_VERB_SET_CONNECT_SEL
, 0x00},
2482 {0x1b, AC_VERB_SET_UNSOLICITED_ENABLE
, ALC_HP_EVENT
| AC_USRSP_EN
},
2486 static const struct hda_verb alc888_6st_dell_verbs
[] = {
2487 {0x1b, AC_VERB_SET_UNSOLICITED_ENABLE
, ALC_HP_EVENT
| AC_USRSP_EN
},
2491 static const struct hda_verb alc883_vaiott_verbs
[] = {
2493 {0x15, AC_VERB_SET_CONNECT_SEL
, 0x00},
2494 {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_HP
},
2496 /* enable unsolicited event */
2497 {0x15, AC_VERB_SET_UNSOLICITED_ENABLE
, ALC_HP_EVENT
| AC_USRSP_EN
},
2502 static void alc888_3st_hp_setup(struct hda_codec
*codec
)
2504 struct alc_spec
*spec
= codec
->spec
;
2506 spec
->autocfg
.hp_pins
[0] = 0x1b;
2507 spec
->autocfg
.speaker_pins
[0] = 0x14;
2508 spec
->autocfg
.speaker_pins
[1] = 0x16;
2509 spec
->autocfg
.speaker_pins
[2] = 0x18;
2511 spec
->automute_mode
= ALC_AUTOMUTE_AMP
;
2514 static const struct hda_verb alc888_3st_hp_verbs
[] = {
2515 {0x14, AC_VERB_SET_CONNECT_SEL
, 0x00}, /* Front: output 0 (0x0c) */
2516 {0x16, AC_VERB_SET_CONNECT_SEL
, 0x01}, /* Rear : output 1 (0x0d) */
2517 {0x18, AC_VERB_SET_CONNECT_SEL
, 0x02}, /* CLFE : output 2 (0x0e) */
2518 {0x1b, AC_VERB_SET_UNSOLICITED_ENABLE
, ALC_HP_EVENT
| AC_USRSP_EN
},
2525 static const struct hda_verb alc888_3st_hp_2ch_init
[] = {
2526 { 0x18, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_VREF80
},
2527 { 0x18, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_MUTE
},
2528 { 0x16, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_IN
},
2529 { 0x16, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_MUTE
},
2536 static const struct hda_verb alc888_3st_hp_4ch_init
[] = {
2537 { 0x18, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_VREF80
},
2538 { 0x18, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_MUTE
},
2539 { 0x16, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_OUT
},
2540 { 0x16, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_UNMUTE
},
2541 { 0x16, AC_VERB_SET_CONNECT_SEL
, 0x01 },
2548 static const struct hda_verb alc888_3st_hp_6ch_init
[] = {
2549 { 0x18, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_OUT
},
2550 { 0x18, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_UNMUTE
},
2551 { 0x18, AC_VERB_SET_CONNECT_SEL
, 0x02 },
2552 { 0x16, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_OUT
},
2553 { 0x16, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_UNMUTE
},
2554 { 0x16, AC_VERB_SET_CONNECT_SEL
, 0x01 },
2558 static const struct hda_channel_mode alc888_3st_hp_modes
[3] = {
2559 { 2, alc888_3st_hp_2ch_init
},
2560 { 4, alc888_3st_hp_4ch_init
},
2561 { 6, alc888_3st_hp_6ch_init
},
2564 static void alc888_lenovo_ms7195_setup(struct hda_codec
*codec
)
2566 struct alc_spec
*spec
= codec
->spec
;
2568 spec
->autocfg
.hp_pins
[0] = 0x1b;
2569 spec
->autocfg
.line_out_pins
[0] = 0x14;
2570 spec
->autocfg
.speaker_pins
[0] = 0x15;
2572 spec
->automute_mode
= ALC_AUTOMUTE_AMP
;
2575 /* toggle speaker-output according to the hp-jack state */
2576 static void alc883_lenovo_nb0763_setup(struct hda_codec
*codec
)
2578 struct alc_spec
*spec
= codec
->spec
;
2580 spec
->autocfg
.hp_pins
[0] = 0x14;
2581 spec
->autocfg
.speaker_pins
[0] = 0x15;
2583 spec
->automute_mode
= ALC_AUTOMUTE_AMP
;
2586 /* toggle speaker-output according to the hp-jack state */
2587 #define alc883_targa_init_hook alc882_targa_init_hook
2588 #define alc883_targa_unsol_event alc882_targa_unsol_event
2590 static void alc883_clevo_m720_setup(struct hda_codec
*codec
)
2592 struct alc_spec
*spec
= codec
->spec
;
2594 spec
->autocfg
.hp_pins
[0] = 0x15;
2595 spec
->autocfg
.speaker_pins
[0] = 0x14;
2597 spec
->automute_mode
= ALC_AUTOMUTE_AMP
;
2600 static void alc883_clevo_m720_init_hook(struct hda_codec
*codec
)
2602 alc_hp_automute(codec
);
2603 alc88x_simple_mic_automute(codec
);
2606 static void alc883_clevo_m720_unsol_event(struct hda_codec
*codec
,
2609 switch (res
>> 26) {
2611 alc88x_simple_mic_automute(codec
);
2614 alc_sku_unsol_event(codec
, res
);
2619 /* toggle speaker-output according to the hp-jack state */
2620 static void alc883_2ch_fujitsu_pi2515_setup(struct hda_codec
*codec
)
2622 struct alc_spec
*spec
= codec
->spec
;
2624 spec
->autocfg
.hp_pins
[0] = 0x14;
2625 spec
->autocfg
.speaker_pins
[0] = 0x15;
2627 spec
->automute_mode
= ALC_AUTOMUTE_AMP
;
2630 static void alc883_haier_w66_setup(struct hda_codec
*codec
)
2632 struct alc_spec
*spec
= codec
->spec
;
2634 spec
->autocfg
.hp_pins
[0] = 0x1b;
2635 spec
->autocfg
.speaker_pins
[0] = 0x14;
2637 spec
->automute_mode
= ALC_AUTOMUTE_AMP
;
2640 static void alc883_lenovo_101e_setup(struct hda_codec
*codec
)
2642 struct alc_spec
*spec
= codec
->spec
;
2644 spec
->autocfg
.hp_pins
[0] = 0x1b;
2645 spec
->autocfg
.line_out_pins
[0] = 0x14;
2646 spec
->autocfg
.speaker_pins
[0] = 0x15;
2648 spec
->detect_line
= 1;
2649 spec
->automute_lines
= 1;
2650 spec
->automute_mode
= ALC_AUTOMUTE_AMP
;
2653 /* toggle speaker-output according to the hp-jack state */
2654 static void alc883_acer_aspire_setup(struct hda_codec
*codec
)
2656 struct alc_spec
*spec
= codec
->spec
;
2658 spec
->autocfg
.hp_pins
[0] = 0x14;
2659 spec
->autocfg
.speaker_pins
[0] = 0x15;
2660 spec
->autocfg
.speaker_pins
[1] = 0x16;
2662 spec
->automute_mode
= ALC_AUTOMUTE_AMP
;
2665 static const struct hda_verb alc883_acer_eapd_verbs
[] = {
2666 /* HP Pin: output 0 (0x0c) */
2667 {0x14, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_HP
},
2668 {0x14, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_UNMUTE
},
2669 {0x14, AC_VERB_SET_CONNECT_SEL
, 0x00},
2670 /* Front Pin: output 0 (0x0c) */
2671 {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_OUT
},
2672 {0x15, AC_VERB_SET_CONNECT_SEL
, 0x00},
2673 {0x16, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_OUT
},
2674 {0x16, AC_VERB_SET_CONNECT_SEL
, 0x00},
2675 /* eanable EAPD on medion laptop */
2676 {0x20, AC_VERB_SET_COEF_INDEX
, 0x07},
2677 {0x20, AC_VERB_SET_PROC_COEF
, 0x3050},
2678 /* enable unsolicited event */
2679 {0x14, AC_VERB_SET_UNSOLICITED_ENABLE
, ALC_HP_EVENT
| AC_USRSP_EN
},
2683 static void alc888_6st_dell_setup(struct hda_codec
*codec
)
2685 struct alc_spec
*spec
= codec
->spec
;
2687 spec
->autocfg
.hp_pins
[0] = 0x1b;
2688 spec
->autocfg
.speaker_pins
[0] = 0x14;
2689 spec
->autocfg
.speaker_pins
[1] = 0x15;
2690 spec
->autocfg
.speaker_pins
[2] = 0x16;
2691 spec
->autocfg
.speaker_pins
[3] = 0x17;
2693 spec
->automute_mode
= ALC_AUTOMUTE_AMP
;
2696 static void alc888_lenovo_sky_setup(struct hda_codec
*codec
)
2698 struct alc_spec
*spec
= codec
->spec
;
2700 spec
->autocfg
.hp_pins
[0] = 0x1b;
2701 spec
->autocfg
.speaker_pins
[0] = 0x14;
2702 spec
->autocfg
.speaker_pins
[1] = 0x15;
2703 spec
->autocfg
.speaker_pins
[2] = 0x16;
2704 spec
->autocfg
.speaker_pins
[3] = 0x17;
2705 spec
->autocfg
.speaker_pins
[4] = 0x1a;
2707 spec
->automute_mode
= ALC_AUTOMUTE_AMP
;
2710 static void alc883_vaiott_setup(struct hda_codec
*codec
)
2712 struct alc_spec
*spec
= codec
->spec
;
2714 spec
->autocfg
.hp_pins
[0] = 0x15;
2715 spec
->autocfg
.speaker_pins
[0] = 0x14;
2716 spec
->autocfg
.speaker_pins
[1] = 0x17;
2718 spec
->automute_mode
= ALC_AUTOMUTE_AMP
;
2721 static const struct hda_verb alc888_asus_m90v_verbs
[] = {
2722 {0x22, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_IN_MUTE(0)},
2723 {0x23, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_IN_MUTE(0)},
2724 {0x23, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_IN_UNMUTE(1)},
2725 /* enable unsolicited event */
2726 {0x1b, AC_VERB_SET_UNSOLICITED_ENABLE
, ALC_HP_EVENT
| AC_USRSP_EN
},
2727 {0x18, AC_VERB_SET_UNSOLICITED_ENABLE
, ALC_MIC_EVENT
| AC_USRSP_EN
},
2731 static void alc883_mode2_setup(struct hda_codec
*codec
)
2733 struct alc_spec
*spec
= codec
->spec
;
2735 spec
->autocfg
.hp_pins
[0] = 0x1b;
2736 spec
->autocfg
.speaker_pins
[0] = 0x14;
2737 spec
->autocfg
.speaker_pins
[1] = 0x15;
2738 spec
->autocfg
.speaker_pins
[2] = 0x16;
2739 spec
->ext_mic_pin
= 0x18;
2740 spec
->int_mic_pin
= 0x19;
2743 spec
->automute_mode
= ALC_AUTOMUTE_AMP
;
2746 static const struct hda_verb alc888_asus_eee1601_verbs
[] = {
2747 {0x14, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_HP
},
2748 {0x1b, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_OUT
},
2749 {0x22, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_IN_MUTE(0)},
2750 {0x23, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_IN_UNMUTE(0)},
2751 {0x23, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_IN_MUTE(1)},
2752 {0x20, AC_VERB_SET_COEF_INDEX
, 0x0b},
2753 {0x20, AC_VERB_SET_PROC_COEF
, 0x0838},
2754 /* enable unsolicited event */
2755 {0x14, AC_VERB_SET_UNSOLICITED_ENABLE
, ALC_HP_EVENT
| AC_USRSP_EN
},
2759 static void alc883_eee1601_inithook(struct hda_codec
*codec
)
2761 struct alc_spec
*spec
= codec
->spec
;
2763 spec
->autocfg
.hp_pins
[0] = 0x14;
2764 spec
->autocfg
.speaker_pins
[0] = 0x1b;
2765 alc_hp_automute(codec
);
2768 static const struct hda_verb alc889A_mb31_verbs
[] = {
2769 /* Init rear pin (used as headphone output) */
2770 {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL
, 0xc4}, /* Apple Headphones */
2771 {0x15, AC_VERB_SET_CONNECT_SEL
, 0x00}, /* Connect to front */
2772 {0x15, AC_VERB_SET_UNSOLICITED_ENABLE
, ALC_HP_EVENT
| AC_USRSP_EN
},
2773 /* Init line pin (used as output in 4ch and 6ch mode) */
2774 {0x1a, AC_VERB_SET_CONNECT_SEL
, 0x02}, /* Connect to CLFE */
2775 /* Init line 2 pin (used as headphone out by default) */
2776 {0x1b, AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_IN
}, /* Use as input */
2777 {0x1b, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_MUTE
}, /* Mute output */
2781 /* Mute speakers according to the headphone jack state */
2782 static void alc889A_mb31_automute(struct hda_codec
*codec
)
2784 unsigned int present
;
2786 /* Mute only in 2ch or 4ch mode */
2787 if (snd_hda_codec_read(codec
, 0x15, 0, AC_VERB_GET_CONNECT_SEL
, 0)
2789 present
= snd_hda_jack_detect(codec
, 0x15);
2790 snd_hda_codec_amp_stereo(codec
, 0x14, HDA_OUTPUT
, 0,
2791 HDA_AMP_MUTE
, present
? HDA_AMP_MUTE
: 0);
2792 snd_hda_codec_amp_stereo(codec
, 0x16, HDA_OUTPUT
, 0,
2793 HDA_AMP_MUTE
, present
? HDA_AMP_MUTE
: 0);
2797 static void alc889A_mb31_unsol_event(struct hda_codec
*codec
, unsigned int res
)
2799 if ((res
>> 26) == ALC_HP_EVENT
)
2800 alc889A_mb31_automute(codec
);
2803 static const hda_nid_t alc883_slave_dig_outs
[] = {
2804 ALC1200_DIGOUT_NID
, 0,
2807 static const hda_nid_t alc1200_slave_dig_outs
[] = {
2808 ALC883_DIGOUT_NID
, 0,
2812 * configuration and preset
2814 static const char * const alc882_models
[ALC882_MODEL_LAST
] = {
2815 [ALC882_3ST_DIG
] = "3stack-dig",
2816 [ALC882_6ST_DIG
] = "6stack-dig",
2817 [ALC882_ARIMA
] = "arima",
2818 [ALC882_W2JC
] = "w2jc",
2819 [ALC882_TARGA
] = "targa",
2820 [ALC882_ASUS_A7J
] = "asus-a7j",
2821 [ALC882_ASUS_A7M
] = "asus-a7m",
2822 [ALC885_MACPRO
] = "macpro",
2823 [ALC885_MB5
] = "mb5",
2824 [ALC885_MACMINI3
] = "macmini3",
2825 [ALC885_MBA21
] = "mba21",
2826 [ALC885_MBP3
] = "mbp3",
2827 [ALC885_IMAC24
] = "imac24",
2828 [ALC885_IMAC91
] = "imac91",
2829 [ALC883_3ST_2ch_DIG
] = "3stack-2ch-dig",
2830 [ALC883_3ST_6ch_DIG
] = "3stack-6ch-dig",
2831 [ALC883_3ST_6ch
] = "3stack-6ch",
2832 [ALC883_6ST_DIG
] = "alc883-6stack-dig",
2833 [ALC883_TARGA_DIG
] = "targa-dig",
2834 [ALC883_TARGA_2ch_DIG
] = "targa-2ch-dig",
2835 [ALC883_TARGA_8ch_DIG
] = "targa-8ch-dig",
2836 [ALC883_ACER
] = "acer",
2837 [ALC883_ACER_ASPIRE
] = "acer-aspire",
2838 [ALC888_ACER_ASPIRE_4930G
] = "acer-aspire-4930g",
2839 [ALC888_ACER_ASPIRE_6530G
] = "acer-aspire-6530g",
2840 [ALC888_ACER_ASPIRE_8930G
] = "acer-aspire-8930g",
2841 [ALC888_ACER_ASPIRE_7730G
] = "acer-aspire-7730g",
2842 [ALC883_MEDION
] = "medion",
2843 [ALC883_MEDION_WIM2160
] = "medion-wim2160",
2844 [ALC883_LAPTOP_EAPD
] = "laptop-eapd",
2845 [ALC883_LENOVO_101E_2ch
] = "lenovo-101e",
2846 [ALC883_LENOVO_NB0763
] = "lenovo-nb0763",
2847 [ALC888_LENOVO_MS7195_DIG
] = "lenovo-ms7195-dig",
2848 [ALC888_LENOVO_SKY
] = "lenovo-sky",
2849 [ALC883_HAIER_W66
] = "haier-w66",
2850 [ALC888_3ST_HP
] = "3stack-hp",
2851 [ALC888_6ST_DELL
] = "6stack-dell",
2852 [ALC883_MITAC
] = "mitac",
2853 [ALC883_CLEVO_M540R
] = "clevo-m540r",
2854 [ALC883_CLEVO_M720
] = "clevo-m720",
2855 [ALC883_FUJITSU_PI2515
] = "fujitsu-pi2515",
2856 [ALC888_FUJITSU_XA3530
] = "fujitsu-xa3530",
2857 [ALC883_3ST_6ch_INTEL
] = "3stack-6ch-intel",
2858 [ALC889A_INTEL
] = "intel-alc889a",
2859 [ALC889_INTEL
] = "intel-x58",
2860 [ALC1200_ASUS_P5Q
] = "asus-p5q",
2861 [ALC889A_MB31
] = "mb31",
2862 [ALC883_SONY_VAIO_TT
] = "sony-vaio-tt",
2863 [ALC882_AUTO
] = "auto",
2866 static const struct snd_pci_quirk alc882_cfg_tbl
[] = {
2867 SND_PCI_QUIRK(0x1019, 0x6668, "ECS", ALC882_6ST_DIG
),
2869 SND_PCI_QUIRK(0x1025, 0x006c, "Acer Aspire 9810", ALC883_ACER_ASPIRE
),
2870 SND_PCI_QUIRK(0x1025, 0x0090, "Acer Aspire", ALC883_ACER_ASPIRE
),
2871 SND_PCI_QUIRK(0x1025, 0x010a, "Acer Ferrari 5000", ALC883_ACER_ASPIRE
),
2872 SND_PCI_QUIRK(0x1025, 0x0110, "Acer Aspire", ALC883_ACER_ASPIRE
),
2873 SND_PCI_QUIRK(0x1025, 0x0112, "Acer Aspire 9303", ALC883_ACER_ASPIRE
),
2874 SND_PCI_QUIRK(0x1025, 0x0121, "Acer Aspire 5920G", ALC883_ACER_ASPIRE
),
2875 SND_PCI_QUIRK(0x1025, 0x013e, "Acer Aspire 4930G",
2876 ALC888_ACER_ASPIRE_4930G
),
2877 SND_PCI_QUIRK(0x1025, 0x013f, "Acer Aspire 5930G",
2878 ALC888_ACER_ASPIRE_4930G
),
2879 SND_PCI_QUIRK(0x1025, 0x0145, "Acer Aspire 8930G",
2880 ALC888_ACER_ASPIRE_8930G
),
2881 SND_PCI_QUIRK(0x1025, 0x0146, "Acer Aspire 6935G",
2882 ALC888_ACER_ASPIRE_8930G
),
2883 SND_PCI_QUIRK(0x1025, 0x0157, "Acer X3200", ALC882_AUTO
),
2884 SND_PCI_QUIRK(0x1025, 0x0158, "Acer AX1700-U3700A", ALC882_AUTO
),
2885 SND_PCI_QUIRK(0x1025, 0x015e, "Acer Aspire 6930G",
2886 ALC888_ACER_ASPIRE_6530G
),
2887 SND_PCI_QUIRK(0x1025, 0x0166, "Acer Aspire 6530G",
2888 ALC888_ACER_ASPIRE_6530G
),
2889 SND_PCI_QUIRK(0x1025, 0x0142, "Acer Aspire 7730G",
2890 ALC888_ACER_ASPIRE_7730G
),
2891 /* default Acer -- disabled as it causes more problems.
2892 * model=auto should work fine now
2894 /* SND_PCI_QUIRK_VENDOR(0x1025, "Acer laptop", ALC883_ACER), */
2896 SND_PCI_QUIRK(0x1028, 0x020d, "Dell Inspiron 530", ALC888_6ST_DELL
),
2898 SND_PCI_QUIRK(0x103c, 0x2a3d, "HP Pavilion", ALC883_6ST_DIG
),
2899 SND_PCI_QUIRK(0x103c, 0x2a4f, "HP Samba", ALC888_3ST_HP
),
2900 SND_PCI_QUIRK(0x103c, 0x2a60, "HP Lucknow", ALC888_3ST_HP
),
2901 SND_PCI_QUIRK(0x103c, 0x2a61, "HP Nettle", ALC883_6ST_DIG
),
2902 SND_PCI_QUIRK(0x103c, 0x2a66, "HP Acacia", ALC888_3ST_HP
),
2903 SND_PCI_QUIRK(0x103c, 0x2a72, "HP Educ.ar", ALC888_3ST_HP
),
2905 SND_PCI_QUIRK(0x1043, 0x060d, "Asus A7J", ALC882_ASUS_A7J
),
2906 SND_PCI_QUIRK(0x1043, 0x1243, "Asus A7J", ALC882_ASUS_A7J
),
2907 SND_PCI_QUIRK(0x1043, 0x13c2, "Asus A7M", ALC882_ASUS_A7M
),
2908 SND_PCI_QUIRK(0x1043, 0x1873, "Asus M90V", ALC888_ASUS_M90V
),
2909 SND_PCI_QUIRK(0x1043, 0x1971, "Asus W2JC", ALC882_W2JC
),
2910 SND_PCI_QUIRK(0x1043, 0x817f, "Asus P5LD2", ALC882_6ST_DIG
),
2911 SND_PCI_QUIRK(0x1043, 0x81d8, "Asus P5WD", ALC882_6ST_DIG
),
2912 SND_PCI_QUIRK(0x1043, 0x8249, "Asus M2A-VM HDMI", ALC883_3ST_6ch_DIG
),
2913 SND_PCI_QUIRK(0x1043, 0x8284, "Asus Z37E", ALC883_6ST_DIG
),
2914 SND_PCI_QUIRK(0x1043, 0x82fe, "Asus P5Q-EM HDMI", ALC1200_ASUS_P5Q
),
2915 SND_PCI_QUIRK(0x1043, 0x835f, "Asus Eee 1601", ALC888_ASUS_EEE1601
),
2917 SND_PCI_QUIRK(0x104d, 0x9047, "Sony Vaio TT", ALC883_SONY_VAIO_TT
),
2918 SND_PCI_QUIRK(0x105b, 0x0ce8, "Foxconn P35AX-S", ALC883_6ST_DIG
),
2919 SND_PCI_QUIRK(0x105b, 0x6668, "Foxconn", ALC882_6ST_DIG
),
2920 SND_PCI_QUIRK(0x1071, 0x8227, "Mitac 82801H", ALC883_MITAC
),
2921 SND_PCI_QUIRK(0x1071, 0x8253, "Mitac 8252d", ALC883_MITAC
),
2922 SND_PCI_QUIRK(0x1071, 0x8258, "Evesham Voyaeger", ALC883_LAPTOP_EAPD
),
2923 SND_PCI_QUIRK(0x10f1, 0x2350, "TYAN-S2350", ALC888_6ST_DELL
),
2924 SND_PCI_QUIRK(0x108e, 0x534d, NULL
, ALC883_3ST_6ch
),
2925 SND_PCI_QUIRK(0x1458, 0xa002, "Gigabyte P35 DS3R", ALC882_6ST_DIG
),
2927 SND_PCI_QUIRK(0x1462, 0x0349, "MSI", ALC883_TARGA_2ch_DIG
),
2928 SND_PCI_QUIRK(0x1462, 0x040d, "MSI", ALC883_TARGA_2ch_DIG
),
2929 SND_PCI_QUIRK(0x1462, 0x0579, "MSI", ALC883_TARGA_2ch_DIG
),
2930 SND_PCI_QUIRK(0x1462, 0x28fb, "Targa T8", ALC882_TARGA
), /* MSI-1049 T8 */
2931 SND_PCI_QUIRK(0x1462, 0x2fb3, "MSI", ALC882_AUTO
),
2932 SND_PCI_QUIRK(0x1462, 0x6668, "MSI", ALC882_6ST_DIG
),
2933 SND_PCI_QUIRK(0x1462, 0x3729, "MSI S420", ALC883_TARGA_DIG
),
2934 SND_PCI_QUIRK(0x1462, 0x3783, "NEC S970", ALC883_TARGA_DIG
),
2935 SND_PCI_QUIRK(0x1462, 0x3b7f, "MSI", ALC883_TARGA_2ch_DIG
),
2936 SND_PCI_QUIRK(0x1462, 0x3ef9, "MSI", ALC883_TARGA_DIG
),
2937 SND_PCI_QUIRK(0x1462, 0x3fc1, "MSI", ALC883_TARGA_DIG
),
2938 SND_PCI_QUIRK(0x1462, 0x3fc3, "MSI", ALC883_TARGA_DIG
),
2939 SND_PCI_QUIRK(0x1462, 0x3fcc, "MSI", ALC883_TARGA_DIG
),
2940 SND_PCI_QUIRK(0x1462, 0x3fdf, "MSI", ALC883_TARGA_DIG
),
2941 SND_PCI_QUIRK(0x1462, 0x42cd, "MSI", ALC883_TARGA_DIG
),
2942 SND_PCI_QUIRK(0x1462, 0x4314, "MSI", ALC883_TARGA_DIG
),
2943 SND_PCI_QUIRK(0x1462, 0x4319, "MSI", ALC883_TARGA_DIG
),
2944 SND_PCI_QUIRK(0x1462, 0x4324, "MSI", ALC883_TARGA_DIG
),
2945 SND_PCI_QUIRK(0x1462, 0x4570, "MSI Wind Top AE2220", ALC883_TARGA_DIG
),
2946 SND_PCI_QUIRK(0x1462, 0x6510, "MSI GX620", ALC883_TARGA_8ch_DIG
),
2947 SND_PCI_QUIRK(0x1462, 0x6668, "MSI", ALC883_6ST_DIG
),
2948 SND_PCI_QUIRK(0x1462, 0x7187, "MSI", ALC883_6ST_DIG
),
2949 SND_PCI_QUIRK(0x1462, 0x7250, "MSI", ALC883_6ST_DIG
),
2950 SND_PCI_QUIRK(0x1462, 0x7260, "MSI 7260", ALC883_TARGA_DIG
),
2951 SND_PCI_QUIRK(0x1462, 0x7267, "MSI", ALC883_3ST_6ch_DIG
),
2952 SND_PCI_QUIRK(0x1462, 0x7280, "MSI", ALC883_6ST_DIG
),
2953 SND_PCI_QUIRK(0x1462, 0x7327, "MSI", ALC883_6ST_DIG
),
2954 SND_PCI_QUIRK(0x1462, 0x7350, "MSI", ALC883_6ST_DIG
),
2955 SND_PCI_QUIRK(0x1462, 0x7437, "MSI NetOn AP1900", ALC883_TARGA_DIG
),
2956 SND_PCI_QUIRK(0x1462, 0xa422, "MSI", ALC883_TARGA_2ch_DIG
),
2957 SND_PCI_QUIRK(0x1462, 0xaa08, "MSI", ALC883_TARGA_2ch_DIG
),
2959 SND_PCI_QUIRK(0x147b, 0x1083, "Abit IP35-PRO", ALC883_6ST_DIG
),
2960 SND_PCI_QUIRK(0x1558, 0x0571, "Clevo laptop M570U", ALC883_3ST_6ch_DIG
),
2961 SND_PCI_QUIRK(0x1558, 0x0721, "Clevo laptop M720R", ALC883_CLEVO_M720
),
2962 SND_PCI_QUIRK(0x1558, 0x0722, "Clevo laptop M720SR", ALC883_CLEVO_M720
),
2963 SND_PCI_QUIRK(0x1558, 0x5409, "Clevo laptop M540R", ALC883_CLEVO_M540R
),
2964 SND_PCI_QUIRK_VENDOR(0x1558, "Clevo laptop", ALC883_LAPTOP_EAPD
),
2965 SND_PCI_QUIRK(0x15d9, 0x8780, "Supermicro PDSBA", ALC883_3ST_6ch
),
2966 /* SND_PCI_QUIRK(0x161f, 0x2054, "Arima W820", ALC882_ARIMA), */
2967 SND_PCI_QUIRK(0x161f, 0x2054, "Medion laptop", ALC883_MEDION
),
2968 SND_PCI_QUIRK_MASK(0x1734, 0xfff0, 0x1100, "FSC AMILO Xi/Pi25xx",
2969 ALC883_FUJITSU_PI2515
),
2970 SND_PCI_QUIRK_MASK(0x1734, 0xfff0, 0x1130, "Fujitsu AMILO Xa35xx",
2971 ALC888_FUJITSU_XA3530
),
2972 SND_PCI_QUIRK(0x17aa, 0x101e, "Lenovo 101e", ALC883_LENOVO_101E_2ch
),
2973 SND_PCI_QUIRK(0x17aa, 0x2085, "Lenovo NB0763", ALC883_LENOVO_NB0763
),
2974 SND_PCI_QUIRK(0x17aa, 0x3bfc, "Lenovo NB0763", ALC883_LENOVO_NB0763
),
2975 SND_PCI_QUIRK(0x17aa, 0x3bfd, "Lenovo NB0763", ALC883_LENOVO_NB0763
),
2976 SND_PCI_QUIRK(0x17aa, 0x101d, "Lenovo Sky", ALC888_LENOVO_SKY
),
2977 SND_PCI_QUIRK(0x17c0, 0x4085, "MEDION MD96630", ALC888_LENOVO_MS7195_DIG
),
2978 SND_PCI_QUIRK(0x17f2, 0x5000, "Albatron KI690-AM2", ALC883_6ST_DIG
),
2979 SND_PCI_QUIRK(0x1991, 0x5625, "Haier W66", ALC883_HAIER_W66
),
2981 SND_PCI_QUIRK(0x8086, 0x0001, "DG33BUC", ALC883_3ST_6ch_INTEL
),
2982 SND_PCI_QUIRK(0x8086, 0x0002, "DG33FBC", ALC883_3ST_6ch_INTEL
),
2983 SND_PCI_QUIRK(0x8086, 0x2503, "82801H", ALC883_MITAC
),
2984 SND_PCI_QUIRK(0x8086, 0x0022, "DX58SO", ALC889_INTEL
),
2985 SND_PCI_QUIRK(0x8086, 0x0021, "Intel IbexPeak", ALC889A_INTEL
),
2986 SND_PCI_QUIRK(0x8086, 0x3b56, "Intel IbexPeak", ALC889A_INTEL
),
2987 SND_PCI_QUIRK(0x8086, 0xd601, "D102GGC", ALC882_6ST_DIG
),
2992 /* codec SSID table for Intel Mac */
2993 static const struct snd_pci_quirk alc882_ssid_cfg_tbl
[] = {
2994 SND_PCI_QUIRK(0x106b, 0x00a0, "MacBookPro 3,1", ALC885_MBP3
),
2995 SND_PCI_QUIRK(0x106b, 0x00a1, "Macbook", ALC885_MBP3
),
2996 SND_PCI_QUIRK(0x106b, 0x00a4, "MacbookPro 4,1", ALC885_MBP3
),
2997 SND_PCI_QUIRK(0x106b, 0x0c00, "Mac Pro", ALC885_MACPRO
),
2998 SND_PCI_QUIRK(0x106b, 0x1000, "iMac 24", ALC885_IMAC24
),
2999 SND_PCI_QUIRK(0x106b, 0x2800, "AppleTV", ALC885_IMAC24
),
3000 SND_PCI_QUIRK(0x106b, 0x2c00, "MacbookPro rev3", ALC885_MBP3
),
3001 SND_PCI_QUIRK(0x106b, 0x3000, "iMac", ALC889A_MB31
),
3002 SND_PCI_QUIRK(0x106b, 0x3200, "iMac 7,1 Aluminum", ALC882_ASUS_A7M
),
3003 SND_PCI_QUIRK(0x106b, 0x3400, "MacBookAir 1,1", ALC885_MBP3
),
3004 SND_PCI_QUIRK(0x106b, 0x3500, "MacBookAir 2,1", ALC885_MBA21
),
3005 SND_PCI_QUIRK(0x106b, 0x3600, "Macbook 3,1", ALC889A_MB31
),
3006 SND_PCI_QUIRK(0x106b, 0x3800, "MacbookPro 4,1", ALC885_MBP3
),
3007 SND_PCI_QUIRK(0x106b, 0x3e00, "iMac 24 Aluminum", ALC885_IMAC24
),
3008 SND_PCI_QUIRK(0x106b, 0x4900, "iMac 9,1 Aluminum", ALC885_IMAC91
),
3009 SND_PCI_QUIRK(0x106b, 0x3f00, "Macbook 5,1", ALC885_MB5
),
3010 SND_PCI_QUIRK(0x106b, 0x4a00, "Macbook 5,2", ALC885_MB5
),
3011 /* FIXME: HP jack sense seems not working for MBP 5,1 or 5,2,
3012 * so apparently no perfect solution yet
3014 SND_PCI_QUIRK(0x106b, 0x4000, "MacbookPro 5,1", ALC885_MB5
),
3015 SND_PCI_QUIRK(0x106b, 0x4600, "MacbookPro 5,2", ALC885_MB5
),
3016 SND_PCI_QUIRK(0x106b, 0x4100, "Macmini 3,1", ALC885_MACMINI3
),
3020 static const struct alc_config_preset alc882_presets
[] = {
3021 [ALC882_3ST_DIG
] = {
3022 .mixers
= { alc882_base_mixer
},
3023 .init_verbs
= { alc882_base_init_verbs
,
3024 alc882_adc1_init_verbs
},
3025 .num_dacs
= ARRAY_SIZE(alc882_dac_nids
),
3026 .dac_nids
= alc882_dac_nids
,
3027 .dig_out_nid
= ALC882_DIGOUT_NID
,
3028 .dig_in_nid
= ALC882_DIGIN_NID
,
3029 .num_channel_mode
= ARRAY_SIZE(alc882_ch_modes
),
3030 .channel_mode
= alc882_ch_modes
,
3032 .input_mux
= &alc882_capture_source
,
3034 [ALC882_6ST_DIG
] = {
3035 .mixers
= { alc882_base_mixer
, alc882_chmode_mixer
},
3036 .init_verbs
= { alc882_base_init_verbs
,
3037 alc882_adc1_init_verbs
},
3038 .num_dacs
= ARRAY_SIZE(alc882_dac_nids
),
3039 .dac_nids
= alc882_dac_nids
,
3040 .dig_out_nid
= ALC882_DIGOUT_NID
,
3041 .dig_in_nid
= ALC882_DIGIN_NID
,
3042 .num_channel_mode
= ARRAY_SIZE(alc882_sixstack_modes
),
3043 .channel_mode
= alc882_sixstack_modes
,
3044 .input_mux
= &alc882_capture_source
,
3047 .mixers
= { alc882_base_mixer
, alc882_chmode_mixer
},
3048 .init_verbs
= { alc882_base_init_verbs
, alc882_adc1_init_verbs
,
3049 alc882_eapd_verbs
},
3050 .num_dacs
= ARRAY_SIZE(alc882_dac_nids
),
3051 .dac_nids
= alc882_dac_nids
,
3052 .num_channel_mode
= ARRAY_SIZE(alc882_sixstack_modes
),
3053 .channel_mode
= alc882_sixstack_modes
,
3054 .input_mux
= &alc882_capture_source
,
3057 .mixers
= { alc882_w2jc_mixer
, alc882_chmode_mixer
},
3058 .init_verbs
= { alc882_base_init_verbs
, alc882_adc1_init_verbs
,
3059 alc882_eapd_verbs
, alc880_gpio1_init_verbs
},
3060 .num_dacs
= ARRAY_SIZE(alc882_dac_nids
),
3061 .dac_nids
= alc882_dac_nids
,
3062 .num_channel_mode
= ARRAY_SIZE(alc880_threestack_modes
),
3063 .channel_mode
= alc880_threestack_modes
,
3065 .input_mux
= &alc882_capture_source
,
3066 .dig_out_nid
= ALC882_DIGOUT_NID
,
3069 .mixers
= { alc885_mba21_mixer
},
3070 .init_verbs
= { alc885_mba21_init_verbs
, alc880_gpio1_init_verbs
},
3072 .dac_nids
= alc882_dac_nids
,
3073 .channel_mode
= alc885_mba21_ch_modes
,
3074 .num_channel_mode
= ARRAY_SIZE(alc885_mba21_ch_modes
),
3075 .input_mux
= &alc882_capture_source
,
3076 .unsol_event
= alc_sku_unsol_event
,
3077 .setup
= alc885_mba21_setup
,
3078 .init_hook
= alc_hp_automute
,
3081 .mixers
= { alc885_mbp3_mixer
, alc882_chmode_mixer
},
3082 .init_verbs
= { alc885_mbp3_init_verbs
,
3083 alc880_gpio1_init_verbs
},
3085 .dac_nids
= alc882_dac_nids
,
3087 .channel_mode
= alc885_mbp_4ch_modes
,
3088 .num_channel_mode
= ARRAY_SIZE(alc885_mbp_4ch_modes
),
3089 .input_mux
= &alc882_capture_source
,
3090 .dig_out_nid
= ALC882_DIGOUT_NID
,
3091 .dig_in_nid
= ALC882_DIGIN_NID
,
3092 .unsol_event
= alc_sku_unsol_event
,
3093 .setup
= alc885_mbp3_setup
,
3094 .init_hook
= alc_hp_automute
,
3097 .mixers
= { alc885_mb5_mixer
, alc882_chmode_mixer
},
3098 .init_verbs
= { alc885_mb5_init_verbs
,
3099 alc880_gpio1_init_verbs
},
3100 .num_dacs
= ARRAY_SIZE(alc882_dac_nids
),
3101 .dac_nids
= alc882_dac_nids
,
3102 .channel_mode
= alc885_mb5_6ch_modes
,
3103 .num_channel_mode
= ARRAY_SIZE(alc885_mb5_6ch_modes
),
3104 .input_mux
= &mb5_capture_source
,
3105 .dig_out_nid
= ALC882_DIGOUT_NID
,
3106 .dig_in_nid
= ALC882_DIGIN_NID
,
3107 .unsol_event
= alc_sku_unsol_event
,
3108 .setup
= alc885_mb5_setup
,
3109 .init_hook
= alc_hp_automute
,
3111 [ALC885_MACMINI3
] = {
3112 .mixers
= { alc885_macmini3_mixer
, alc882_chmode_mixer
},
3113 .init_verbs
= { alc885_macmini3_init_verbs
,
3114 alc880_gpio1_init_verbs
},
3115 .num_dacs
= ARRAY_SIZE(alc882_dac_nids
),
3116 .dac_nids
= alc882_dac_nids
,
3117 .channel_mode
= alc885_macmini3_6ch_modes
,
3118 .num_channel_mode
= ARRAY_SIZE(alc885_macmini3_6ch_modes
),
3119 .input_mux
= &macmini3_capture_source
,
3120 .dig_out_nid
= ALC882_DIGOUT_NID
,
3121 .dig_in_nid
= ALC882_DIGIN_NID
,
3122 .unsol_event
= alc_sku_unsol_event
,
3123 .setup
= alc885_macmini3_setup
,
3124 .init_hook
= alc_hp_automute
,
3127 .mixers
= { alc882_macpro_mixer
},
3128 .init_verbs
= { alc882_macpro_init_verbs
},
3129 .num_dacs
= ARRAY_SIZE(alc882_dac_nids
),
3130 .dac_nids
= alc882_dac_nids
,
3131 .dig_out_nid
= ALC882_DIGOUT_NID
,
3132 .dig_in_nid
= ALC882_DIGIN_NID
,
3133 .num_channel_mode
= ARRAY_SIZE(alc882_ch_modes
),
3134 .channel_mode
= alc882_ch_modes
,
3135 .input_mux
= &alc882_capture_source
,
3136 .init_hook
= alc885_macpro_init_hook
,
3139 .mixers
= { alc885_imac24_mixer
},
3140 .init_verbs
= { alc885_imac24_init_verbs
},
3141 .num_dacs
= ARRAY_SIZE(alc882_dac_nids
),
3142 .dac_nids
= alc882_dac_nids
,
3143 .dig_out_nid
= ALC882_DIGOUT_NID
,
3144 .dig_in_nid
= ALC882_DIGIN_NID
,
3145 .num_channel_mode
= ARRAY_SIZE(alc882_ch_modes
),
3146 .channel_mode
= alc882_ch_modes
,
3147 .input_mux
= &alc882_capture_source
,
3148 .unsol_event
= alc_sku_unsol_event
,
3149 .setup
= alc885_imac24_setup
,
3150 .init_hook
= alc885_imac24_init_hook
,
3153 .mixers
= {alc885_imac91_mixer
},
3154 .init_verbs
= { alc885_imac91_init_verbs
,
3155 alc880_gpio1_init_verbs
},
3156 .num_dacs
= ARRAY_SIZE(alc882_dac_nids
),
3157 .dac_nids
= alc882_dac_nids
,
3158 .channel_mode
= alc885_mba21_ch_modes
,
3159 .num_channel_mode
= ARRAY_SIZE(alc885_mba21_ch_modes
),
3160 .input_mux
= &alc889A_imac91_capture_source
,
3161 .dig_out_nid
= ALC882_DIGOUT_NID
,
3162 .dig_in_nid
= ALC882_DIGIN_NID
,
3163 .unsol_event
= alc_sku_unsol_event
,
3164 .setup
= alc885_imac91_setup
,
3165 .init_hook
= alc_hp_automute
,
3168 .mixers
= { alc882_targa_mixer
, alc882_chmode_mixer
},
3169 .init_verbs
= { alc882_base_init_verbs
, alc882_adc1_init_verbs
,
3170 alc880_gpio3_init_verbs
, alc882_targa_verbs
},
3171 .num_dacs
= ARRAY_SIZE(alc882_dac_nids
),
3172 .dac_nids
= alc882_dac_nids
,
3173 .dig_out_nid
= ALC882_DIGOUT_NID
,
3174 .num_adc_nids
= ARRAY_SIZE(alc882_adc_nids
),
3175 .adc_nids
= alc882_adc_nids
,
3176 .capsrc_nids
= alc882_capsrc_nids
,
3177 .num_channel_mode
= ARRAY_SIZE(alc882_3ST_6ch_modes
),
3178 .channel_mode
= alc882_3ST_6ch_modes
,
3180 .input_mux
= &alc882_capture_source
,
3181 .unsol_event
= alc_sku_unsol_event
,
3182 .setup
= alc882_targa_setup
,
3183 .init_hook
= alc882_targa_automute
,
3185 [ALC882_ASUS_A7J
] = {
3186 .mixers
= { alc882_asus_a7j_mixer
, alc882_chmode_mixer
},
3187 .init_verbs
= { alc882_base_init_verbs
, alc882_adc1_init_verbs
,
3188 alc882_asus_a7j_verbs
},
3189 .num_dacs
= ARRAY_SIZE(alc882_dac_nids
),
3190 .dac_nids
= alc882_dac_nids
,
3191 .dig_out_nid
= ALC882_DIGOUT_NID
,
3192 .num_adc_nids
= ARRAY_SIZE(alc882_adc_nids
),
3193 .adc_nids
= alc882_adc_nids
,
3194 .capsrc_nids
= alc882_capsrc_nids
,
3195 .num_channel_mode
= ARRAY_SIZE(alc882_3ST_6ch_modes
),
3196 .channel_mode
= alc882_3ST_6ch_modes
,
3198 .input_mux
= &alc882_capture_source
,
3200 [ALC882_ASUS_A7M
] = {
3201 .mixers
= { alc882_asus_a7m_mixer
, alc882_chmode_mixer
},
3202 .init_verbs
= { alc882_base_init_verbs
, alc882_adc1_init_verbs
,
3203 alc882_eapd_verbs
, alc880_gpio1_init_verbs
,
3204 alc882_asus_a7m_verbs
},
3205 .num_dacs
= ARRAY_SIZE(alc882_dac_nids
),
3206 .dac_nids
= alc882_dac_nids
,
3207 .dig_out_nid
= ALC882_DIGOUT_NID
,
3208 .num_channel_mode
= ARRAY_SIZE(alc880_threestack_modes
),
3209 .channel_mode
= alc880_threestack_modes
,
3211 .input_mux
= &alc882_capture_source
,
3213 [ALC883_3ST_2ch_DIG
] = {
3214 .mixers
= { alc883_3ST_2ch_mixer
},
3215 .init_verbs
= { alc883_init_verbs
},
3216 .num_dacs
= ARRAY_SIZE(alc883_dac_nids
),
3217 .dac_nids
= alc883_dac_nids
,
3218 .dig_out_nid
= ALC883_DIGOUT_NID
,
3219 .dig_in_nid
= ALC883_DIGIN_NID
,
3220 .num_channel_mode
= ARRAY_SIZE(alc883_3ST_2ch_modes
),
3221 .channel_mode
= alc883_3ST_2ch_modes
,
3222 .input_mux
= &alc883_capture_source
,
3224 [ALC883_3ST_6ch_DIG
] = {
3225 .mixers
= { alc883_3ST_6ch_mixer
, alc883_chmode_mixer
},
3226 .init_verbs
= { alc883_init_verbs
},
3227 .num_dacs
= ARRAY_SIZE(alc883_dac_nids
),
3228 .dac_nids
= alc883_dac_nids
,
3229 .dig_out_nid
= ALC883_DIGOUT_NID
,
3230 .dig_in_nid
= ALC883_DIGIN_NID
,
3231 .num_channel_mode
= ARRAY_SIZE(alc883_3ST_6ch_modes
),
3232 .channel_mode
= alc883_3ST_6ch_modes
,
3234 .input_mux
= &alc883_capture_source
,
3236 [ALC883_3ST_6ch
] = {
3237 .mixers
= { alc883_3ST_6ch_mixer
, alc883_chmode_mixer
},
3238 .init_verbs
= { alc883_init_verbs
},
3239 .num_dacs
= ARRAY_SIZE(alc883_dac_nids
),
3240 .dac_nids
= alc883_dac_nids
,
3241 .num_channel_mode
= ARRAY_SIZE(alc883_3ST_6ch_modes
),
3242 .channel_mode
= alc883_3ST_6ch_modes
,
3244 .input_mux
= &alc883_capture_source
,
3246 [ALC883_3ST_6ch_INTEL
] = {
3247 .mixers
= { alc883_3ST_6ch_intel_mixer
, alc883_chmode_mixer
},
3248 .init_verbs
= { alc883_init_verbs
},
3249 .num_dacs
= ARRAY_SIZE(alc883_dac_nids
),
3250 .dac_nids
= alc883_dac_nids
,
3251 .dig_out_nid
= ALC883_DIGOUT_NID
,
3252 .dig_in_nid
= ALC883_DIGIN_NID
,
3253 .slave_dig_outs
= alc883_slave_dig_outs
,
3254 .num_channel_mode
= ARRAY_SIZE(alc883_3ST_6ch_intel_modes
),
3255 .channel_mode
= alc883_3ST_6ch_intel_modes
,
3257 .input_mux
= &alc883_3stack_6ch_intel
,
3260 .mixers
= { alc885_8ch_intel_mixer
, alc883_chmode_mixer
},
3261 .init_verbs
= { alc885_init_verbs
, alc885_init_input_verbs
,
3262 alc_hp15_unsol_verbs
},
3263 .num_dacs
= ARRAY_SIZE(alc883_dac_nids
),
3264 .dac_nids
= alc883_dac_nids
,
3265 .num_adc_nids
= ARRAY_SIZE(alc889_adc_nids
),
3266 .adc_nids
= alc889_adc_nids
,
3267 .dig_out_nid
= ALC883_DIGOUT_NID
,
3268 .dig_in_nid
= ALC883_DIGIN_NID
,
3269 .slave_dig_outs
= alc883_slave_dig_outs
,
3270 .num_channel_mode
= ARRAY_SIZE(alc889_8ch_intel_modes
),
3271 .channel_mode
= alc889_8ch_intel_modes
,
3272 .capsrc_nids
= alc889_capsrc_nids
,
3273 .input_mux
= &alc889_capture_source
,
3274 .setup
= alc889_automute_setup
,
3275 .init_hook
= alc_hp_automute
,
3276 .unsol_event
= alc_sku_unsol_event
,
3280 .mixers
= { alc885_8ch_intel_mixer
, alc883_chmode_mixer
},
3281 .init_verbs
= { alc885_init_verbs
, alc889_init_input_verbs
,
3282 alc889_eapd_verbs
, alc_hp15_unsol_verbs
},
3283 .num_dacs
= ARRAY_SIZE(alc883_dac_nids
),
3284 .dac_nids
= alc883_dac_nids
,
3285 .num_adc_nids
= ARRAY_SIZE(alc889_adc_nids
),
3286 .adc_nids
= alc889_adc_nids
,
3287 .dig_out_nid
= ALC883_DIGOUT_NID
,
3288 .dig_in_nid
= ALC883_DIGIN_NID
,
3289 .slave_dig_outs
= alc883_slave_dig_outs
,
3290 .num_channel_mode
= ARRAY_SIZE(alc889_8ch_intel_modes
),
3291 .channel_mode
= alc889_8ch_intel_modes
,
3292 .capsrc_nids
= alc889_capsrc_nids
,
3293 .input_mux
= &alc889_capture_source
,
3294 .setup
= alc889_automute_setup
,
3295 .init_hook
= alc889_intel_init_hook
,
3296 .unsol_event
= alc_sku_unsol_event
,
3299 [ALC883_6ST_DIG
] = {
3300 .mixers
= { alc883_base_mixer
, alc883_chmode_mixer
},
3301 .init_verbs
= { alc883_init_verbs
},
3302 .num_dacs
= ARRAY_SIZE(alc883_dac_nids
),
3303 .dac_nids
= alc883_dac_nids
,
3304 .dig_out_nid
= ALC883_DIGOUT_NID
,
3305 .dig_in_nid
= ALC883_DIGIN_NID
,
3306 .num_channel_mode
= ARRAY_SIZE(alc883_sixstack_modes
),
3307 .channel_mode
= alc883_sixstack_modes
,
3308 .input_mux
= &alc883_capture_source
,
3310 [ALC883_TARGA_DIG
] = {
3311 .mixers
= { alc883_targa_mixer
, alc883_chmode_mixer
},
3312 .init_verbs
= { alc883_init_verbs
, alc880_gpio3_init_verbs
,
3313 alc883_targa_verbs
},
3314 .num_dacs
= ARRAY_SIZE(alc883_dac_nids
),
3315 .dac_nids
= alc883_dac_nids
,
3316 .dig_out_nid
= ALC883_DIGOUT_NID
,
3317 .num_channel_mode
= ARRAY_SIZE(alc883_3ST_6ch_modes
),
3318 .channel_mode
= alc883_3ST_6ch_modes
,
3320 .input_mux
= &alc883_capture_source
,
3321 .unsol_event
= alc883_targa_unsol_event
,
3322 .setup
= alc882_targa_setup
,
3323 .init_hook
= alc882_targa_automute
,
3325 [ALC883_TARGA_2ch_DIG
] = {
3326 .mixers
= { alc883_targa_2ch_mixer
},
3327 .init_verbs
= { alc883_init_verbs
, alc880_gpio3_init_verbs
,
3328 alc883_targa_verbs
},
3329 .num_dacs
= ARRAY_SIZE(alc883_dac_nids
),
3330 .dac_nids
= alc883_dac_nids
,
3331 .adc_nids
= alc883_adc_nids_alt
,
3332 .num_adc_nids
= ARRAY_SIZE(alc883_adc_nids_alt
),
3333 .capsrc_nids
= alc883_capsrc_nids
,
3334 .dig_out_nid
= ALC883_DIGOUT_NID
,
3335 .num_channel_mode
= ARRAY_SIZE(alc883_3ST_2ch_modes
),
3336 .channel_mode
= alc883_3ST_2ch_modes
,
3337 .input_mux
= &alc883_capture_source
,
3338 .unsol_event
= alc883_targa_unsol_event
,
3339 .setup
= alc882_targa_setup
,
3340 .init_hook
= alc882_targa_automute
,
3342 [ALC883_TARGA_8ch_DIG
] = {
3343 .mixers
= { alc883_targa_mixer
, alc883_targa_8ch_mixer
,
3344 alc883_chmode_mixer
},
3345 .init_verbs
= { alc883_init_verbs
, alc880_gpio3_init_verbs
,
3346 alc883_targa_verbs
},
3347 .num_dacs
= ARRAY_SIZE(alc883_dac_nids
),
3348 .dac_nids
= alc883_dac_nids
,
3349 .num_adc_nids
= ARRAY_SIZE(alc883_adc_nids_rev
),
3350 .adc_nids
= alc883_adc_nids_rev
,
3351 .capsrc_nids
= alc883_capsrc_nids_rev
,
3352 .dig_out_nid
= ALC883_DIGOUT_NID
,
3353 .dig_in_nid
= ALC883_DIGIN_NID
,
3354 .num_channel_mode
= ARRAY_SIZE(alc883_4ST_8ch_modes
),
3355 .channel_mode
= alc883_4ST_8ch_modes
,
3357 .input_mux
= &alc883_capture_source
,
3358 .unsol_event
= alc883_targa_unsol_event
,
3359 .setup
= alc882_targa_setup
,
3360 .init_hook
= alc882_targa_automute
,
3363 .mixers
= { alc883_base_mixer
},
3364 /* On TravelMate laptops, GPIO 0 enables the internal speaker
3365 * and the headphone jack. Turn this on and rely on the
3366 * standard mute methods whenever the user wants to turn
3367 * these outputs off.
3369 .init_verbs
= { alc883_init_verbs
, alc880_gpio1_init_verbs
},
3370 .num_dacs
= ARRAY_SIZE(alc883_dac_nids
),
3371 .dac_nids
= alc883_dac_nids
,
3372 .num_channel_mode
= ARRAY_SIZE(alc883_3ST_2ch_modes
),
3373 .channel_mode
= alc883_3ST_2ch_modes
,
3374 .input_mux
= &alc883_capture_source
,
3376 [ALC883_ACER_ASPIRE
] = {
3377 .mixers
= { alc883_acer_aspire_mixer
},
3378 .init_verbs
= { alc883_init_verbs
, alc883_acer_eapd_verbs
},
3379 .num_dacs
= ARRAY_SIZE(alc883_dac_nids
),
3380 .dac_nids
= alc883_dac_nids
,
3381 .dig_out_nid
= ALC883_DIGOUT_NID
,
3382 .num_channel_mode
= ARRAY_SIZE(alc883_3ST_2ch_modes
),
3383 .channel_mode
= alc883_3ST_2ch_modes
,
3384 .input_mux
= &alc883_capture_source
,
3385 .unsol_event
= alc_sku_unsol_event
,
3386 .setup
= alc883_acer_aspire_setup
,
3387 .init_hook
= alc_hp_automute
,
3389 [ALC888_ACER_ASPIRE_4930G
] = {
3390 .mixers
= { alc888_acer_aspire_4930g_mixer
,
3391 alc883_chmode_mixer
},
3392 .init_verbs
= { alc883_init_verbs
, alc880_gpio1_init_verbs
,
3393 alc888_acer_aspire_4930g_verbs
},
3394 .num_dacs
= ARRAY_SIZE(alc883_dac_nids
),
3395 .dac_nids
= alc883_dac_nids
,
3396 .num_adc_nids
= ARRAY_SIZE(alc883_adc_nids_rev
),
3397 .adc_nids
= alc883_adc_nids_rev
,
3398 .capsrc_nids
= alc883_capsrc_nids_rev
,
3399 .dig_out_nid
= ALC883_DIGOUT_NID
,
3400 .num_channel_mode
= ARRAY_SIZE(alc883_3ST_6ch_modes
),
3401 .channel_mode
= alc883_3ST_6ch_modes
,
3403 .const_channel_count
= 6,
3405 ARRAY_SIZE(alc888_2_capture_sources
),
3406 .input_mux
= alc888_2_capture_sources
,
3407 .unsol_event
= alc_sku_unsol_event
,
3408 .setup
= alc888_acer_aspire_4930g_setup
,
3409 .init_hook
= alc_hp_automute
,
3411 [ALC888_ACER_ASPIRE_6530G
] = {
3412 .mixers
= { alc888_acer_aspire_6530_mixer
},
3413 .init_verbs
= { alc883_init_verbs
, alc880_gpio1_init_verbs
,
3414 alc888_acer_aspire_6530g_verbs
},
3415 .num_dacs
= ARRAY_SIZE(alc883_dac_nids
),
3416 .dac_nids
= alc883_dac_nids
,
3417 .num_adc_nids
= ARRAY_SIZE(alc883_adc_nids_rev
),
3418 .adc_nids
= alc883_adc_nids_rev
,
3419 .capsrc_nids
= alc883_capsrc_nids_rev
,
3420 .dig_out_nid
= ALC883_DIGOUT_NID
,
3421 .num_channel_mode
= ARRAY_SIZE(alc883_3ST_2ch_modes
),
3422 .channel_mode
= alc883_3ST_2ch_modes
,
3424 ARRAY_SIZE(alc888_2_capture_sources
),
3425 .input_mux
= alc888_acer_aspire_6530_sources
,
3426 .unsol_event
= alc_sku_unsol_event
,
3427 .setup
= alc888_acer_aspire_6530g_setup
,
3428 .init_hook
= alc_hp_automute
,
3430 [ALC888_ACER_ASPIRE_8930G
] = {
3431 .mixers
= { alc889_acer_aspire_8930g_mixer
,
3432 alc883_chmode_mixer
},
3433 .init_verbs
= { alc883_init_verbs
, alc880_gpio1_init_verbs
,
3434 alc889_acer_aspire_8930g_verbs
,
3436 .num_dacs
= ARRAY_SIZE(alc883_dac_nids
),
3437 .dac_nids
= alc883_dac_nids
,
3438 .num_adc_nids
= ARRAY_SIZE(alc889_adc_nids
),
3439 .adc_nids
= alc889_adc_nids
,
3440 .capsrc_nids
= alc889_capsrc_nids
,
3441 .dig_out_nid
= ALC883_DIGOUT_NID
,
3442 .num_channel_mode
= ARRAY_SIZE(alc883_3ST_6ch_modes
),
3443 .channel_mode
= alc883_3ST_6ch_modes
,
3445 .const_channel_count
= 6,
3447 ARRAY_SIZE(alc889_capture_sources
),
3448 .input_mux
= alc889_capture_sources
,
3449 .unsol_event
= alc_sku_unsol_event
,
3450 .setup
= alc889_acer_aspire_8930g_setup
,
3451 .init_hook
= alc_hp_automute
,
3452 #ifdef CONFIG_SND_HDA_POWER_SAVE
3453 .power_hook
= alc_power_eapd
,
3456 [ALC888_ACER_ASPIRE_7730G
] = {
3457 .mixers
= { alc883_3ST_6ch_mixer
,
3458 alc883_chmode_mixer
},
3459 .init_verbs
= { alc883_init_verbs
, alc880_gpio1_init_verbs
,
3460 alc888_acer_aspire_7730G_verbs
},
3461 .num_dacs
= ARRAY_SIZE(alc883_dac_nids
),
3462 .dac_nids
= alc883_dac_nids
,
3463 .num_adc_nids
= ARRAY_SIZE(alc883_adc_nids_rev
),
3464 .adc_nids
= alc883_adc_nids_rev
,
3465 .capsrc_nids
= alc883_capsrc_nids_rev
,
3466 .dig_out_nid
= ALC883_DIGOUT_NID
,
3467 .num_channel_mode
= ARRAY_SIZE(alc883_3ST_6ch_modes
),
3468 .channel_mode
= alc883_3ST_6ch_modes
,
3470 .const_channel_count
= 6,
3471 .input_mux
= &alc883_capture_source
,
3472 .unsol_event
= alc_sku_unsol_event
,
3473 .setup
= alc888_acer_aspire_7730g_setup
,
3474 .init_hook
= alc_hp_automute
,
3477 .mixers
= { alc883_fivestack_mixer
,
3478 alc883_chmode_mixer
},
3479 .init_verbs
= { alc883_init_verbs
,
3480 alc883_medion_eapd_verbs
},
3481 .num_dacs
= ARRAY_SIZE(alc883_dac_nids
),
3482 .dac_nids
= alc883_dac_nids
,
3483 .adc_nids
= alc883_adc_nids_alt
,
3484 .num_adc_nids
= ARRAY_SIZE(alc883_adc_nids_alt
),
3485 .capsrc_nids
= alc883_capsrc_nids
,
3486 .num_channel_mode
= ARRAY_SIZE(alc883_sixstack_modes
),
3487 .channel_mode
= alc883_sixstack_modes
,
3488 .input_mux
= &alc883_capture_source
,
3490 [ALC883_MEDION_WIM2160
] = {
3491 .mixers
= { alc883_medion_wim2160_mixer
},
3492 .init_verbs
= { alc883_init_verbs
, alc883_medion_wim2160_verbs
},
3493 .num_dacs
= ARRAY_SIZE(alc883_dac_nids
),
3494 .dac_nids
= alc883_dac_nids
,
3495 .dig_out_nid
= ALC883_DIGOUT_NID
,
3496 .num_adc_nids
= ARRAY_SIZE(alc883_adc_nids
),
3497 .adc_nids
= alc883_adc_nids
,
3498 .num_channel_mode
= ARRAY_SIZE(alc883_3ST_2ch_modes
),
3499 .channel_mode
= alc883_3ST_2ch_modes
,
3500 .input_mux
= &alc883_capture_source
,
3501 .unsol_event
= alc_sku_unsol_event
,
3502 .setup
= alc883_medion_wim2160_setup
,
3503 .init_hook
= alc_hp_automute
,
3505 [ALC883_LAPTOP_EAPD
] = {
3506 .mixers
= { alc883_base_mixer
},
3507 .init_verbs
= { alc883_init_verbs
, alc882_eapd_verbs
},
3508 .num_dacs
= ARRAY_SIZE(alc883_dac_nids
),
3509 .dac_nids
= alc883_dac_nids
,
3510 .num_channel_mode
= ARRAY_SIZE(alc883_3ST_2ch_modes
),
3511 .channel_mode
= alc883_3ST_2ch_modes
,
3512 .input_mux
= &alc883_capture_source
,
3514 [ALC883_CLEVO_M540R
] = {
3515 .mixers
= { alc883_3ST_6ch_mixer
, alc883_chmode_mixer
},
3516 .init_verbs
= { alc883_init_verbs
, alc883_clevo_m540r_verbs
},
3517 .num_dacs
= ARRAY_SIZE(alc883_dac_nids
),
3518 .dac_nids
= alc883_dac_nids
,
3519 .dig_out_nid
= ALC883_DIGOUT_NID
,
3520 .dig_in_nid
= ALC883_DIGIN_NID
,
3521 .num_channel_mode
= ARRAY_SIZE(alc883_3ST_6ch_clevo_modes
),
3522 .channel_mode
= alc883_3ST_6ch_clevo_modes
,
3524 .input_mux
= &alc883_capture_source
,
3525 /* This machine has the hardware HP auto-muting, thus
3526 * we need no software mute via unsol event
3529 [ALC883_CLEVO_M720
] = {
3530 .mixers
= { alc883_clevo_m720_mixer
},
3531 .init_verbs
= { alc883_init_verbs
, alc883_clevo_m720_verbs
},
3532 .num_dacs
= ARRAY_SIZE(alc883_dac_nids
),
3533 .dac_nids
= alc883_dac_nids
,
3534 .dig_out_nid
= ALC883_DIGOUT_NID
,
3535 .num_channel_mode
= ARRAY_SIZE(alc883_3ST_2ch_modes
),
3536 .channel_mode
= alc883_3ST_2ch_modes
,
3537 .input_mux
= &alc883_capture_source
,
3538 .unsol_event
= alc883_clevo_m720_unsol_event
,
3539 .setup
= alc883_clevo_m720_setup
,
3540 .init_hook
= alc883_clevo_m720_init_hook
,
3542 [ALC883_LENOVO_101E_2ch
] = {
3543 .mixers
= { alc883_lenovo_101e_2ch_mixer
},
3544 .init_verbs
= { alc883_init_verbs
, alc883_lenovo_101e_verbs
},
3545 .num_dacs
= ARRAY_SIZE(alc883_dac_nids
),
3546 .dac_nids
= alc883_dac_nids
,
3547 .adc_nids
= alc883_adc_nids_alt
,
3548 .num_adc_nids
= ARRAY_SIZE(alc883_adc_nids_alt
),
3549 .capsrc_nids
= alc883_capsrc_nids
,
3550 .num_channel_mode
= ARRAY_SIZE(alc883_3ST_2ch_modes
),
3551 .channel_mode
= alc883_3ST_2ch_modes
,
3552 .input_mux
= &alc883_lenovo_101e_capture_source
,
3553 .setup
= alc883_lenovo_101e_setup
,
3554 .unsol_event
= alc_sku_unsol_event
,
3555 .init_hook
= alc_inithook
,
3557 [ALC883_LENOVO_NB0763
] = {
3558 .mixers
= { alc883_lenovo_nb0763_mixer
},
3559 .init_verbs
= { alc883_init_verbs
, alc883_lenovo_nb0763_verbs
},
3560 .num_dacs
= ARRAY_SIZE(alc883_dac_nids
),
3561 .dac_nids
= alc883_dac_nids
,
3562 .num_channel_mode
= ARRAY_SIZE(alc883_3ST_2ch_modes
),
3563 .channel_mode
= alc883_3ST_2ch_modes
,
3565 .input_mux
= &alc883_lenovo_nb0763_capture_source
,
3566 .unsol_event
= alc_sku_unsol_event
,
3567 .setup
= alc883_lenovo_nb0763_setup
,
3568 .init_hook
= alc_hp_automute
,
3570 [ALC888_LENOVO_MS7195_DIG
] = {
3571 .mixers
= { alc883_3ST_6ch_mixer
, alc883_chmode_mixer
},
3572 .init_verbs
= { alc883_init_verbs
, alc888_lenovo_ms7195_verbs
},
3573 .num_dacs
= ARRAY_SIZE(alc883_dac_nids
),
3574 .dac_nids
= alc883_dac_nids
,
3575 .dig_out_nid
= ALC883_DIGOUT_NID
,
3576 .num_channel_mode
= ARRAY_SIZE(alc883_3ST_6ch_modes
),
3577 .channel_mode
= alc883_3ST_6ch_modes
,
3579 .input_mux
= &alc883_capture_source
,
3580 .unsol_event
= alc_sku_unsol_event
,
3581 .setup
= alc888_lenovo_ms7195_setup
,
3582 .init_hook
= alc_inithook
,
3584 [ALC883_HAIER_W66
] = {
3585 .mixers
= { alc883_targa_2ch_mixer
},
3586 .init_verbs
= { alc883_init_verbs
, alc883_haier_w66_verbs
},
3587 .num_dacs
= ARRAY_SIZE(alc883_dac_nids
),
3588 .dac_nids
= alc883_dac_nids
,
3589 .dig_out_nid
= ALC883_DIGOUT_NID
,
3590 .num_channel_mode
= ARRAY_SIZE(alc883_3ST_2ch_modes
),
3591 .channel_mode
= alc883_3ST_2ch_modes
,
3592 .input_mux
= &alc883_capture_source
,
3593 .unsol_event
= alc_sku_unsol_event
,
3594 .setup
= alc883_haier_w66_setup
,
3595 .init_hook
= alc_hp_automute
,
3598 .mixers
= { alc883_3ST_6ch_mixer
, alc883_chmode_mixer
},
3599 .init_verbs
= { alc883_init_verbs
, alc888_3st_hp_verbs
},
3600 .num_dacs
= ARRAY_SIZE(alc883_dac_nids
),
3601 .dac_nids
= alc883_dac_nids
,
3602 .num_channel_mode
= ARRAY_SIZE(alc888_3st_hp_modes
),
3603 .channel_mode
= alc888_3st_hp_modes
,
3605 .input_mux
= &alc883_capture_source
,
3606 .unsol_event
= alc_sku_unsol_event
,
3607 .setup
= alc888_3st_hp_setup
,
3608 .init_hook
= alc_hp_automute
,
3610 [ALC888_6ST_DELL
] = {
3611 .mixers
= { alc883_base_mixer
, alc883_chmode_mixer
},
3612 .init_verbs
= { alc883_init_verbs
, alc888_6st_dell_verbs
},
3613 .num_dacs
= ARRAY_SIZE(alc883_dac_nids
),
3614 .dac_nids
= alc883_dac_nids
,
3615 .dig_out_nid
= ALC883_DIGOUT_NID
,
3616 .dig_in_nid
= ALC883_DIGIN_NID
,
3617 .num_channel_mode
= ARRAY_SIZE(alc883_sixstack_modes
),
3618 .channel_mode
= alc883_sixstack_modes
,
3619 .input_mux
= &alc883_capture_source
,
3620 .unsol_event
= alc_sku_unsol_event
,
3621 .setup
= alc888_6st_dell_setup
,
3622 .init_hook
= alc_hp_automute
,
3625 .mixers
= { alc883_mitac_mixer
},
3626 .init_verbs
= { alc883_init_verbs
, alc883_mitac_verbs
},
3627 .num_dacs
= ARRAY_SIZE(alc883_dac_nids
),
3628 .dac_nids
= alc883_dac_nids
,
3629 .num_channel_mode
= ARRAY_SIZE(alc883_3ST_2ch_modes
),
3630 .channel_mode
= alc883_3ST_2ch_modes
,
3631 .input_mux
= &alc883_capture_source
,
3632 .unsol_event
= alc_sku_unsol_event
,
3633 .setup
= alc883_mitac_setup
,
3634 .init_hook
= alc_hp_automute
,
3636 [ALC883_FUJITSU_PI2515
] = {
3637 .mixers
= { alc883_2ch_fujitsu_pi2515_mixer
},
3638 .init_verbs
= { alc883_init_verbs
,
3639 alc883_2ch_fujitsu_pi2515_verbs
},
3640 .num_dacs
= ARRAY_SIZE(alc883_dac_nids
),
3641 .dac_nids
= alc883_dac_nids
,
3642 .dig_out_nid
= ALC883_DIGOUT_NID
,
3643 .num_channel_mode
= ARRAY_SIZE(alc883_3ST_2ch_modes
),
3644 .channel_mode
= alc883_3ST_2ch_modes
,
3645 .input_mux
= &alc883_fujitsu_pi2515_capture_source
,
3646 .unsol_event
= alc_sku_unsol_event
,
3647 .setup
= alc883_2ch_fujitsu_pi2515_setup
,
3648 .init_hook
= alc_hp_automute
,
3650 [ALC888_FUJITSU_XA3530
] = {
3651 .mixers
= { alc888_base_mixer
, alc883_chmode_mixer
},
3652 .init_verbs
= { alc883_init_verbs
,
3653 alc888_fujitsu_xa3530_verbs
},
3654 .num_dacs
= ARRAY_SIZE(alc883_dac_nids
),
3655 .dac_nids
= alc883_dac_nids
,
3656 .num_adc_nids
= ARRAY_SIZE(alc883_adc_nids_rev
),
3657 .adc_nids
= alc883_adc_nids_rev
,
3658 .capsrc_nids
= alc883_capsrc_nids_rev
,
3659 .dig_out_nid
= ALC883_DIGOUT_NID
,
3660 .num_channel_mode
= ARRAY_SIZE(alc888_4ST_8ch_intel_modes
),
3661 .channel_mode
= alc888_4ST_8ch_intel_modes
,
3663 ARRAY_SIZE(alc888_2_capture_sources
),
3664 .input_mux
= alc888_2_capture_sources
,
3665 .unsol_event
= alc_sku_unsol_event
,
3666 .setup
= alc888_fujitsu_xa3530_setup
,
3667 .init_hook
= alc_hp_automute
,
3669 [ALC888_LENOVO_SKY
] = {
3670 .mixers
= { alc888_lenovo_sky_mixer
, alc883_chmode_mixer
},
3671 .init_verbs
= { alc883_init_verbs
, alc888_lenovo_sky_verbs
},
3672 .num_dacs
= ARRAY_SIZE(alc883_dac_nids
),
3673 .dac_nids
= alc883_dac_nids
,
3674 .dig_out_nid
= ALC883_DIGOUT_NID
,
3675 .num_channel_mode
= ARRAY_SIZE(alc883_sixstack_modes
),
3676 .channel_mode
= alc883_sixstack_modes
,
3678 .input_mux
= &alc883_lenovo_sky_capture_source
,
3679 .unsol_event
= alc_sku_unsol_event
,
3680 .setup
= alc888_lenovo_sky_setup
,
3681 .init_hook
= alc_hp_automute
,
3683 [ALC888_ASUS_M90V
] = {
3684 .mixers
= { alc883_3ST_6ch_mixer
, alc883_chmode_mixer
},
3685 .init_verbs
= { alc883_init_verbs
, alc888_asus_m90v_verbs
},
3686 .num_dacs
= ARRAY_SIZE(alc883_dac_nids
),
3687 .dac_nids
= alc883_dac_nids
,
3688 .dig_out_nid
= ALC883_DIGOUT_NID
,
3689 .dig_in_nid
= ALC883_DIGIN_NID
,
3690 .num_channel_mode
= ARRAY_SIZE(alc883_3ST_6ch_modes
),
3691 .channel_mode
= alc883_3ST_6ch_modes
,
3693 .input_mux
= &alc883_fujitsu_pi2515_capture_source
,
3694 .unsol_event
= alc_sku_unsol_event
,
3695 .setup
= alc883_mode2_setup
,
3696 .init_hook
= alc_inithook
,
3698 [ALC888_ASUS_EEE1601
] = {
3699 .mixers
= { alc883_asus_eee1601_mixer
},
3700 .cap_mixer
= alc883_asus_eee1601_cap_mixer
,
3701 .init_verbs
= { alc883_init_verbs
, alc888_asus_eee1601_verbs
},
3702 .num_dacs
= ARRAY_SIZE(alc883_dac_nids
),
3703 .dac_nids
= alc883_dac_nids
,
3704 .dig_out_nid
= ALC883_DIGOUT_NID
,
3705 .dig_in_nid
= ALC883_DIGIN_NID
,
3706 .num_channel_mode
= ARRAY_SIZE(alc883_3ST_2ch_modes
),
3707 .channel_mode
= alc883_3ST_2ch_modes
,
3709 .input_mux
= &alc883_asus_eee1601_capture_source
,
3710 .unsol_event
= alc_sku_unsol_event
,
3711 .init_hook
= alc883_eee1601_inithook
,
3713 [ALC1200_ASUS_P5Q
] = {
3714 .mixers
= { alc883_base_mixer
, alc883_chmode_mixer
},
3715 .init_verbs
= { alc883_init_verbs
},
3716 .num_dacs
= ARRAY_SIZE(alc883_dac_nids
),
3717 .dac_nids
= alc883_dac_nids
,
3718 .dig_out_nid
= ALC1200_DIGOUT_NID
,
3719 .dig_in_nid
= ALC883_DIGIN_NID
,
3720 .slave_dig_outs
= alc1200_slave_dig_outs
,
3721 .num_channel_mode
= ARRAY_SIZE(alc883_sixstack_modes
),
3722 .channel_mode
= alc883_sixstack_modes
,
3723 .input_mux
= &alc883_capture_source
,
3726 .mixers
= { alc889A_mb31_mixer
, alc883_chmode_mixer
},
3727 .init_verbs
= { alc883_init_verbs
, alc889A_mb31_verbs
,
3728 alc880_gpio1_init_verbs
},
3729 .adc_nids
= alc883_adc_nids
,
3730 .num_adc_nids
= ARRAY_SIZE(alc883_adc_nids
),
3731 .capsrc_nids
= alc883_capsrc_nids
,
3732 .dac_nids
= alc883_dac_nids
,
3733 .num_dacs
= ARRAY_SIZE(alc883_dac_nids
),
3734 .channel_mode
= alc889A_mb31_6ch_modes
,
3735 .num_channel_mode
= ARRAY_SIZE(alc889A_mb31_6ch_modes
),
3736 .input_mux
= &alc889A_mb31_capture_source
,
3737 .dig_out_nid
= ALC883_DIGOUT_NID
,
3738 .unsol_event
= alc889A_mb31_unsol_event
,
3739 .init_hook
= alc889A_mb31_automute
,
3741 [ALC883_SONY_VAIO_TT
] = {
3742 .mixers
= { alc883_vaiott_mixer
},
3743 .init_verbs
= { alc883_init_verbs
, alc883_vaiott_verbs
},
3744 .num_dacs
= ARRAY_SIZE(alc883_dac_nids
),
3745 .dac_nids
= alc883_dac_nids
,
3746 .num_channel_mode
= ARRAY_SIZE(alc883_3ST_2ch_modes
),
3747 .channel_mode
= alc883_3ST_2ch_modes
,
3748 .input_mux
= &alc883_capture_source
,
3749 .unsol_event
= alc_sku_unsol_event
,
3750 .setup
= alc883_vaiott_setup
,
3751 .init_hook
= alc_hp_automute
,