Lines Matching +full:codec +full:- +full:0
1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * Universal Interface for Intel High Definition Audio Codec
32 /* extra amp-initialization sequence types */
80 /* codec parameterization */
107 void (*init_hook)(struct hda_codec *codec);
109 void (*power_hook)(struct hda_codec *codec);
111 void (*shutup)(struct hda_codec *codec);
112 void (*reboot_notify)(struct hda_codec *codec);
136 static int alc_read_coefex_idx(struct hda_codec *codec, hda_nid_t nid, in alc_read_coefex_idx() argument
141 snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_COEF_INDEX, coef_idx); in alc_read_coefex_idx()
142 val = snd_hda_codec_read(codec, nid, 0, AC_VERB_GET_PROC_COEF, 0); in alc_read_coefex_idx()
146 #define alc_read_coef_idx(codec, coef_idx) \ argument
147 alc_read_coefex_idx(codec, 0x20, coef_idx)
149 static void alc_write_coefex_idx(struct hda_codec *codec, hda_nid_t nid, in alc_write_coefex_idx() argument
152 snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_COEF_INDEX, coef_idx); in alc_write_coefex_idx()
153 snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_PROC_COEF, coef_val); in alc_write_coefex_idx()
156 #define alc_write_coef_idx(codec, coef_idx, coef_val) \ argument
157 alc_write_coefex_idx(codec, 0x20, coef_idx, coef_val)
159 static void alc_update_coefex_idx(struct hda_codec *codec, hda_nid_t nid, in alc_update_coefex_idx() argument
163 unsigned int val = alc_read_coefex_idx(codec, nid, coef_idx); in alc_update_coefex_idx()
165 if (val != -1) in alc_update_coefex_idx()
166 alc_write_coefex_idx(codec, nid, coef_idx, in alc_update_coefex_idx()
170 #define alc_update_coef_idx(codec, coef_idx, mask, bits_set) \ argument
171 alc_update_coefex_idx(codec, 0x20, coef_idx, mask, bits_set)
173 /* a special bypass for COEF 0; read the cached value at the second time */
174 static unsigned int alc_get_coef0(struct hda_codec *codec) in alc_get_coef0() argument
176 struct alc_spec *spec = codec->spec; in alc_get_coef0()
178 if (!spec->coef0) in alc_get_coef0()
179 spec->coef0 = alc_read_coef_idx(codec, 0); in alc_get_coef0()
180 return spec->coef0; in alc_get_coef0()
193 #define WRITE_COEFEX(_nid, _idx, _val) UPDATE_COEFEX(_nid, _idx, -1, _val)
194 #define WRITE_COEF(_idx, _val) WRITE_COEFEX(0x20, _idx, _val)
195 #define UPDATE_COEF(_idx, _mask, _val) UPDATE_COEFEX(0x20, _idx, _mask, _val)
197 static void alc_process_coef_fw(struct hda_codec *codec, in alc_process_coef_fw() argument
200 for (; fw->nid; fw++) { in alc_process_coef_fw()
201 if (fw->mask == (unsigned short)-1) in alc_process_coef_fw()
202 alc_write_coefex_idx(codec, fw->nid, fw->idx, fw->val); in alc_process_coef_fw()
204 alc_update_coefex_idx(codec, fw->nid, fw->idx, in alc_process_coef_fw()
205 fw->mask, fw->val); in alc_process_coef_fw()
214 static void alc_setup_gpio(struct hda_codec *codec, unsigned int mask) in alc_setup_gpio() argument
216 struct alc_spec *spec = codec->spec; in alc_setup_gpio()
218 spec->gpio_mask |= mask; in alc_setup_gpio()
219 spec->gpio_dir |= mask; in alc_setup_gpio()
220 spec->gpio_data |= mask; in alc_setup_gpio()
223 static void alc_write_gpio_data(struct hda_codec *codec) in alc_write_gpio_data() argument
225 struct alc_spec *spec = codec->spec; in alc_write_gpio_data()
227 snd_hda_codec_write(codec, 0x01, 0, AC_VERB_SET_GPIO_DATA, in alc_write_gpio_data()
228 spec->gpio_data); in alc_write_gpio_data()
231 static void alc_update_gpio_data(struct hda_codec *codec, unsigned int mask, in alc_update_gpio_data() argument
234 struct alc_spec *spec = codec->spec; in alc_update_gpio_data()
235 unsigned int oldval = spec->gpio_data; in alc_update_gpio_data()
238 spec->gpio_data |= mask; in alc_update_gpio_data()
240 spec->gpio_data &= ~mask; in alc_update_gpio_data()
241 if (oldval != spec->gpio_data) in alc_update_gpio_data()
242 alc_write_gpio_data(codec); in alc_update_gpio_data()
245 static void alc_write_gpio(struct hda_codec *codec) in alc_write_gpio() argument
247 struct alc_spec *spec = codec->spec; in alc_write_gpio()
249 if (!spec->gpio_mask) in alc_write_gpio()
252 snd_hda_codec_write(codec, codec->core.afg, 0, in alc_write_gpio()
253 AC_VERB_SET_GPIO_MASK, spec->gpio_mask); in alc_write_gpio()
254 snd_hda_codec_write(codec, codec->core.afg, 0, in alc_write_gpio()
255 AC_VERB_SET_GPIO_DIRECTION, spec->gpio_dir); in alc_write_gpio()
256 if (spec->gpio_write_delay) in alc_write_gpio()
258 alc_write_gpio_data(codec); in alc_write_gpio()
261 static void alc_fixup_gpio(struct hda_codec *codec, int action, in alc_fixup_gpio() argument
265 alc_setup_gpio(codec, mask); in alc_fixup_gpio()
268 static void alc_fixup_gpio1(struct hda_codec *codec, in alc_fixup_gpio1() argument
271 alc_fixup_gpio(codec, action, 0x01); in alc_fixup_gpio1()
274 static void alc_fixup_gpio2(struct hda_codec *codec, in alc_fixup_gpio2() argument
277 alc_fixup_gpio(codec, action, 0x02); in alc_fixup_gpio2()
280 static void alc_fixup_gpio3(struct hda_codec *codec, in alc_fixup_gpio3() argument
283 alc_fixup_gpio(codec, action, 0x03); in alc_fixup_gpio3()
286 static void alc_fixup_gpio4(struct hda_codec *codec, in alc_fixup_gpio4() argument
289 alc_fixup_gpio(codec, action, 0x04); in alc_fixup_gpio4()
292 static void alc_fixup_micmute_led(struct hda_codec *codec, in alc_fixup_micmute_led() argument
296 snd_hda_gen_add_micmute_led_cdev(codec, NULL); in alc_fixup_micmute_led()
304 static void alc_fix_pll(struct hda_codec *codec) in alc_fix_pll() argument
306 struct alc_spec *spec = codec->spec; in alc_fix_pll()
308 if (spec->pll_nid) in alc_fix_pll()
309 alc_update_coefex_idx(codec, spec->pll_nid, spec->pll_coef_idx, in alc_fix_pll()
310 1 << spec->pll_coef_bit, 0); in alc_fix_pll()
313 static void alc_fix_pll_init(struct hda_codec *codec, hda_nid_t nid, in alc_fix_pll_init() argument
316 struct alc_spec *spec = codec->spec; in alc_fix_pll_init()
317 spec->pll_nid = nid; in alc_fix_pll_init()
318 spec->pll_coef_idx = coef_idx; in alc_fix_pll_init()
319 spec->pll_coef_bit = coef_bit; in alc_fix_pll_init()
320 alc_fix_pll(codec); in alc_fix_pll_init()
323 /* update the master volume per volume-knob's unsol event */
324 static void alc_update_knob_master(struct hda_codec *codec, in alc_update_knob_master() argument
331 kctl = snd_hda_find_mixer_ctl(codec, "Master Playback Volume"); in alc_update_knob_master()
337 val = snd_hda_codec_read(codec, jack->nid, 0, in alc_update_knob_master()
338 AC_VERB_GET_VOLUME_KNOB_CONTROL, 0); in alc_update_knob_master()
340 uctl->value.integer.value[0] = val; in alc_update_knob_master()
341 uctl->value.integer.value[1] = val; in alc_update_knob_master()
342 kctl->put(kctl, uctl); in alc_update_knob_master()
346 static void alc880_unsol_event(struct hda_codec *codec, unsigned int res) in alc880_unsol_event() argument
350 snd_hda_jack_unsol_event(codec, res >> 2); in alc880_unsol_event()
354 static void alc_fill_eapd_coef(struct hda_codec *codec) in alc_fill_eapd_coef() argument
358 coef = alc_get_coef0(codec); in alc_fill_eapd_coef()
360 switch (codec->core.vendor_id) { in alc_fill_eapd_coef()
361 case 0x10ec0262: in alc_fill_eapd_coef()
362 alc_update_coef_idx(codec, 0x7, 0, 1<<5); in alc_fill_eapd_coef()
364 case 0x10ec0267: in alc_fill_eapd_coef()
365 case 0x10ec0268: in alc_fill_eapd_coef()
366 alc_update_coef_idx(codec, 0x7, 0, 1<<13); in alc_fill_eapd_coef()
368 case 0x10ec0269: in alc_fill_eapd_coef()
369 if ((coef & 0x00f0) == 0x0010) in alc_fill_eapd_coef()
370 alc_update_coef_idx(codec, 0xd, 0, 1<<14); in alc_fill_eapd_coef()
371 if ((coef & 0x00f0) == 0x0020) in alc_fill_eapd_coef()
372 alc_update_coef_idx(codec, 0x4, 1<<15, 0); in alc_fill_eapd_coef()
373 if ((coef & 0x00f0) == 0x0030) in alc_fill_eapd_coef()
374 alc_update_coef_idx(codec, 0x10, 1<<9, 0); in alc_fill_eapd_coef()
376 case 0x10ec0280: in alc_fill_eapd_coef()
377 case 0x10ec0284: in alc_fill_eapd_coef()
378 case 0x10ec0290: in alc_fill_eapd_coef()
379 case 0x10ec0292: in alc_fill_eapd_coef()
380 alc_update_coef_idx(codec, 0x4, 1<<15, 0); in alc_fill_eapd_coef()
382 case 0x10ec0225: in alc_fill_eapd_coef()
383 case 0x10ec0295: in alc_fill_eapd_coef()
384 case 0x10ec0299: in alc_fill_eapd_coef()
385 alc_update_coef_idx(codec, 0x67, 0xf000, 0x3000); in alc_fill_eapd_coef()
387 case 0x10ec0215: in alc_fill_eapd_coef()
388 case 0x10ec0230: in alc_fill_eapd_coef()
389 case 0x10ec0233: in alc_fill_eapd_coef()
390 case 0x10ec0235: in alc_fill_eapd_coef()
391 case 0x10ec0236: in alc_fill_eapd_coef()
392 case 0x10ec0245: in alc_fill_eapd_coef()
393 case 0x10ec0255: in alc_fill_eapd_coef()
394 case 0x10ec0256: in alc_fill_eapd_coef()
395 case 0x10ec0257: in alc_fill_eapd_coef()
396 case 0x10ec0282: in alc_fill_eapd_coef()
397 case 0x10ec0283: in alc_fill_eapd_coef()
398 case 0x10ec0286: in alc_fill_eapd_coef()
399 case 0x10ec0288: in alc_fill_eapd_coef()
400 case 0x10ec0285: in alc_fill_eapd_coef()
401 case 0x10ec0298: in alc_fill_eapd_coef()
402 case 0x10ec0289: in alc_fill_eapd_coef()
403 case 0x10ec0300: in alc_fill_eapd_coef()
404 alc_update_coef_idx(codec, 0x10, 1<<9, 0); in alc_fill_eapd_coef()
406 case 0x10ec0275: in alc_fill_eapd_coef()
407 alc_update_coef_idx(codec, 0xe, 0, 1<<0); in alc_fill_eapd_coef()
409 case 0x10ec0287: in alc_fill_eapd_coef()
410 alc_update_coef_idx(codec, 0x10, 1<<9, 0); in alc_fill_eapd_coef()
411 alc_write_coef_idx(codec, 0x8, 0x4ab7); in alc_fill_eapd_coef()
413 case 0x10ec0293: in alc_fill_eapd_coef()
414 alc_update_coef_idx(codec, 0xa, 1<<13, 0); in alc_fill_eapd_coef()
416 case 0x10ec0234: in alc_fill_eapd_coef()
417 case 0x10ec0274: in alc_fill_eapd_coef()
418 case 0x10ec0294: in alc_fill_eapd_coef()
419 case 0x10ec0700: in alc_fill_eapd_coef()
420 case 0x10ec0701: in alc_fill_eapd_coef()
421 case 0x10ec0703: in alc_fill_eapd_coef()
422 case 0x10ec0711: in alc_fill_eapd_coef()
423 alc_update_coef_idx(codec, 0x10, 1<<15, 0); in alc_fill_eapd_coef()
425 case 0x10ec0662: in alc_fill_eapd_coef()
426 if ((coef & 0x00f0) == 0x0030) in alc_fill_eapd_coef()
427 alc_update_coef_idx(codec, 0x4, 1<<10, 0); /* EAPD Ctrl */ in alc_fill_eapd_coef()
429 case 0x10ec0272: in alc_fill_eapd_coef()
430 case 0x10ec0273: in alc_fill_eapd_coef()
431 case 0x10ec0663: in alc_fill_eapd_coef()
432 case 0x10ec0665: in alc_fill_eapd_coef()
433 case 0x10ec0670: in alc_fill_eapd_coef()
434 case 0x10ec0671: in alc_fill_eapd_coef()
435 case 0x10ec0672: in alc_fill_eapd_coef()
436 alc_update_coef_idx(codec, 0xd, 0, 1<<14); /* EAPD Ctrl */ in alc_fill_eapd_coef()
438 case 0x10ec0222: in alc_fill_eapd_coef()
439 case 0x10ec0623: in alc_fill_eapd_coef()
440 alc_update_coef_idx(codec, 0x19, 1<<13, 0); in alc_fill_eapd_coef()
442 case 0x10ec0668: in alc_fill_eapd_coef()
443 alc_update_coef_idx(codec, 0x7, 3<<13, 0); in alc_fill_eapd_coef()
445 case 0x10ec0867: in alc_fill_eapd_coef()
446 alc_update_coef_idx(codec, 0x4, 1<<10, 0); in alc_fill_eapd_coef()
448 case 0x10ec0888: in alc_fill_eapd_coef()
449 if ((coef & 0x00f0) == 0x0020 || (coef & 0x00f0) == 0x0030) in alc_fill_eapd_coef()
450 alc_update_coef_idx(codec, 0x7, 1<<5, 0); in alc_fill_eapd_coef()
452 case 0x10ec0892: in alc_fill_eapd_coef()
453 case 0x10ec0897: in alc_fill_eapd_coef()
454 alc_update_coef_idx(codec, 0x7, 1<<5, 0); in alc_fill_eapd_coef()
456 case 0x10ec0899: in alc_fill_eapd_coef()
457 case 0x10ec0900: in alc_fill_eapd_coef()
458 case 0x10ec0b00: in alc_fill_eapd_coef()
459 case 0x10ec1168: in alc_fill_eapd_coef()
460 case 0x10ec1220: in alc_fill_eapd_coef()
461 alc_update_coef_idx(codec, 0x7, 1<<1, 0); in alc_fill_eapd_coef()
467 static void alc888_coef_init(struct hda_codec *codec) in alc888_coef_init() argument
469 switch (alc_get_coef0(codec) & 0x00f0) { in alc888_coef_init()
470 /* alc888-VA */ in alc888_coef_init()
471 case 0x00: in alc888_coef_init()
472 /* alc888-VB */ in alc888_coef_init()
473 case 0x10: in alc888_coef_init()
474 alc_update_coef_idx(codec, 7, 0, 0x2030); /* Turn EAPD to High */ in alc888_coef_init()
480 static void set_eapd(struct hda_codec *codec, hda_nid_t nid, int on) in set_eapd() argument
482 if (get_wcaps_type(get_wcaps(codec, nid)) != AC_WID_PIN) in set_eapd()
484 if (snd_hda_query_pin_caps(codec, nid) & AC_PINCAP_EAPD) in set_eapd()
485 snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_EAPD_BTLENABLE, in set_eapd()
486 on ? 2 : 0); in set_eapd()
489 /* turn on/off EAPD controls of the codec */
490 static void alc_auto_setup_eapd(struct hda_codec *codec, bool on) in alc_auto_setup_eapd() argument
494 0x0f, 0x10, 0x14, 0x15, 0x17, 0 in alc_auto_setup_eapd()
498 set_eapd(codec, *p, on); in alc_auto_setup_eapd()
501 static int find_ext_mic_pin(struct hda_codec *codec);
503 static void alc_headset_mic_no_shutup(struct hda_codec *codec) in alc_headset_mic_no_shutup() argument
506 int mic_pin = find_ext_mic_pin(codec); in alc_headset_mic_no_shutup()
512 if (codec->bus->shutdown) in alc_headset_mic_no_shutup()
515 snd_array_for_each(&codec->init_pins, i, pin) { in alc_headset_mic_no_shutup()
517 if (pin->nid != mic_pin) in alc_headset_mic_no_shutup()
518 snd_hda_codec_read(codec, pin->nid, 0, in alc_headset_mic_no_shutup()
519 AC_VERB_SET_PIN_WIDGET_CONTROL, 0); in alc_headset_mic_no_shutup()
522 codec->pins_shutup = 1; in alc_headset_mic_no_shutup()
525 static void alc_shutup_pins(struct hda_codec *codec) in alc_shutup_pins() argument
527 struct alc_spec *spec = codec->spec; in alc_shutup_pins()
529 switch (codec->core.vendor_id) { in alc_shutup_pins()
530 case 0x10ec0236: in alc_shutup_pins()
531 case 0x10ec0256: in alc_shutup_pins()
532 case 0x10ec0283: in alc_shutup_pins()
533 case 0x10ec0286: in alc_shutup_pins()
534 case 0x10ec0288: in alc_shutup_pins()
535 case 0x10ec0298: in alc_shutup_pins()
536 alc_headset_mic_no_shutup(codec); in alc_shutup_pins()
539 if (!spec->no_shutup_pins) in alc_shutup_pins()
540 snd_hda_shutup_pins(codec); in alc_shutup_pins()
546 * just turning off EAPD and a little pause for avoiding pop-noise
548 static void alc_eapd_shutup(struct hda_codec *codec) in alc_eapd_shutup() argument
550 struct alc_spec *spec = codec->spec; in alc_eapd_shutup()
552 alc_auto_setup_eapd(codec, false); in alc_eapd_shutup()
553 if (!spec->no_depop_delay) in alc_eapd_shutup()
555 alc_shutup_pins(codec); in alc_eapd_shutup()
559 static void alc_auto_init_amp(struct hda_codec *codec, int type) in alc_auto_init_amp() argument
561 alc_auto_setup_eapd(codec, true); in alc_auto_init_amp()
562 alc_write_gpio(codec); in alc_auto_init_amp()
565 switch (codec->core.vendor_id) { in alc_auto_init_amp()
566 case 0x10ec0260: in alc_auto_init_amp()
567 alc_update_coefex_idx(codec, 0x1a, 7, 0, 0x2010); in alc_auto_init_amp()
569 case 0x10ec0880: in alc_auto_init_amp()
570 case 0x10ec0882: in alc_auto_init_amp()
571 case 0x10ec0883: in alc_auto_init_amp()
572 case 0x10ec0885: in alc_auto_init_amp()
573 alc_update_coef_idx(codec, 7, 0, 0x2030); in alc_auto_init_amp()
575 case 0x10ec0888: in alc_auto_init_amp()
576 alc888_coef_init(codec); in alc_auto_init_amp()
586 if (spec->gen.autocfg.hp_pins[0]) in alc_get_hp_pin()
587 return spec->gen.autocfg.hp_pins[0]; in alc_get_hp_pin()
588 if (spec->gen.autocfg.line_out_type == AC_JACK_HP_OUT) in alc_get_hp_pin()
589 return spec->gen.autocfg.line_out_pins[0]; in alc_get_hp_pin()
590 return 0; in alc_get_hp_pin()
597 /* Could be any non-zero and even value. When used as fixup, tells
602 static void alc_fixup_sku_ignore(struct hda_codec *codec, in alc_fixup_sku_ignore() argument
605 struct alc_spec *spec = codec->spec; in alc_fixup_sku_ignore()
607 spec->cdefine.fixup = 1; in alc_fixup_sku_ignore()
608 spec->cdefine.sku_cfg = ALC_FIXUP_SKU_IGNORE; in alc_fixup_sku_ignore()
612 static void alc_fixup_no_depop_delay(struct hda_codec *codec, in alc_fixup_no_depop_delay() argument
615 struct alc_spec *spec = codec->spec; in alc_fixup_no_depop_delay()
618 spec->no_depop_delay = 1; in alc_fixup_no_depop_delay()
619 codec->depop_delay = 0; in alc_fixup_no_depop_delay()
623 static int alc_auto_parse_customize_define(struct hda_codec *codec) in alc_auto_parse_customize_define() argument
626 unsigned nid = 0; in alc_auto_parse_customize_define()
627 struct alc_spec *spec = codec->spec; in alc_auto_parse_customize_define()
629 spec->cdefine.enable_pcbeep = 1; /* assume always enabled */ in alc_auto_parse_customize_define()
631 if (spec->cdefine.fixup) { in alc_auto_parse_customize_define()
632 ass = spec->cdefine.sku_cfg; in alc_auto_parse_customize_define()
634 return -1; in alc_auto_parse_customize_define()
638 if (!codec->bus->pci) in alc_auto_parse_customize_define()
639 return -1; in alc_auto_parse_customize_define()
640 ass = codec->core.subsystem_id & 0xffff; in alc_auto_parse_customize_define()
641 if (ass != codec->bus->pci->subsystem_device && (ass & 1)) in alc_auto_parse_customize_define()
644 nid = 0x1d; in alc_auto_parse_customize_define()
645 if (codec->core.vendor_id == 0x10ec0260) in alc_auto_parse_customize_define()
646 nid = 0x17; in alc_auto_parse_customize_define()
647 ass = snd_hda_codec_get_pincfg(codec, nid); in alc_auto_parse_customize_define()
650 codec_info(codec, "%s: SKU not ready 0x%08x\n", in alc_auto_parse_customize_define()
651 codec->core.chip_name, ass); in alc_auto_parse_customize_define()
652 return -1; in alc_auto_parse_customize_define()
656 tmp = 0; in alc_auto_parse_customize_define()
661 if (((ass >> 16) & 0xf) != tmp) in alc_auto_parse_customize_define()
662 return -1; in alc_auto_parse_customize_define()
664 spec->cdefine.port_connectivity = ass >> 30; in alc_auto_parse_customize_define()
665 spec->cdefine.enable_pcbeep = (ass & 0x100000) >> 20; in alc_auto_parse_customize_define()
666 spec->cdefine.check_sum = (ass >> 16) & 0xf; in alc_auto_parse_customize_define()
667 spec->cdefine.customization = ass >> 8; in alc_auto_parse_customize_define()
669 spec->cdefine.sku_cfg = ass; in alc_auto_parse_customize_define()
670 spec->cdefine.external_amp = (ass & 0x38) >> 3; in alc_auto_parse_customize_define()
671 spec->cdefine.platform_type = (ass & 0x4) >> 2; in alc_auto_parse_customize_define()
672 spec->cdefine.swap = (ass & 0x2) >> 1; in alc_auto_parse_customize_define()
673 spec->cdefine.override = ass & 0x1; in alc_auto_parse_customize_define()
675 codec_dbg(codec, "SKU: Nid=0x%x sku_cfg=0x%08x\n", in alc_auto_parse_customize_define()
676 nid, spec->cdefine.sku_cfg); in alc_auto_parse_customize_define()
677 codec_dbg(codec, "SKU: port_connectivity=0x%x\n", in alc_auto_parse_customize_define()
678 spec->cdefine.port_connectivity); in alc_auto_parse_customize_define()
679 codec_dbg(codec, "SKU: enable_pcbeep=0x%x\n", spec->cdefine.enable_pcbeep); in alc_auto_parse_customize_define()
680 codec_dbg(codec, "SKU: check_sum=0x%08x\n", spec->cdefine.check_sum); in alc_auto_parse_customize_define()
681 codec_dbg(codec, "SKU: customization=0x%08x\n", spec->cdefine.customization); in alc_auto_parse_customize_define()
682 codec_dbg(codec, "SKU: external_amp=0x%x\n", spec->cdefine.external_amp); in alc_auto_parse_customize_define()
683 codec_dbg(codec, "SKU: platform_type=0x%x\n", spec->cdefine.platform_type); in alc_auto_parse_customize_define()
684 codec_dbg(codec, "SKU: swap=0x%x\n", spec->cdefine.swap); in alc_auto_parse_customize_define()
685 codec_dbg(codec, "SKU: override=0x%x\n", spec->cdefine.override); in alc_auto_parse_customize_define()
687 return 0; in alc_auto_parse_customize_define()
690 /* return the position of NID in the list, or -1 if not found */
694 for (i = 0; i < nums; i++) in find_idx_in_nid_list()
697 return -1; in find_idx_in_nid_list()
702 return find_idx_in_nid_list(nid, list, nums) >= 0; in found_in_nid_list()
705 /* check subsystem ID and set up device-specific initialization;
706 * return 1 if initialized, 0 if invalid SSID
708 /* 32-bit subsystem ID for BIOS loading in HD Audio codec.
711 * 7 ~ 0 : Assembly ID
712 * port-A --> pin 39/41, port-E --> pin 14/15, port-D --> pin 35/36
714 static int alc_subsystem_id(struct hda_codec *codec, const hda_nid_t *ports) in alc_subsystem_id() argument
718 struct alc_spec *spec = codec->spec; in alc_subsystem_id()
720 if (spec->cdefine.fixup) { in alc_subsystem_id()
721 ass = spec->cdefine.sku_cfg; in alc_subsystem_id()
723 return 0; in alc_subsystem_id()
727 ass = codec->core.subsystem_id & 0xffff; in alc_subsystem_id()
728 if (codec->bus->pci && in alc_subsystem_id()
729 ass != codec->bus->pci->subsystem_device && (ass & 1)) in alc_subsystem_id()
739 * 0 : override in alc_subsystem_id()
741 nid = 0x1d; in alc_subsystem_id()
742 if (codec->core.vendor_id == 0x10ec0260) in alc_subsystem_id()
743 nid = 0x17; in alc_subsystem_id()
744 ass = snd_hda_codec_get_pincfg(codec, nid); in alc_subsystem_id()
745 codec_dbg(codec, in alc_subsystem_id()
746 "realtek: No valid SSID, checking pincfg 0x%08x for NID 0x%x\n", in alc_subsystem_id()
749 return 0; in alc_subsystem_id()
751 return 0; in alc_subsystem_id()
754 tmp = 0; in alc_subsystem_id()
759 if (((ass >> 16) & 0xf) != tmp) in alc_subsystem_id()
760 return 0; in alc_subsystem_id()
762 codec_dbg(codec, "realtek: Enabling init ASM_ID=0x%04x CODEC_ID=%08x\n", in alc_subsystem_id()
763 ass & 0xffff, codec->core.vendor_id); in alc_subsystem_id()
765 * 0 : override in alc_subsystem_id()
767 * 2 : 0 --> Desktop, 1 --> Laptop in alc_subsystem_id()
771 tmp = (ass & 0x38) >> 3; /* external Amp control */ in alc_subsystem_id()
772 if (spec->init_amp == ALC_INIT_UNDEFINED) { in alc_subsystem_id()
775 alc_setup_gpio(codec, 0x01); in alc_subsystem_id()
778 alc_setup_gpio(codec, 0x02); in alc_subsystem_id()
781 alc_setup_gpio(codec, 0x03); in alc_subsystem_id()
785 spec->init_amp = ALC_INIT_DEFAULT; in alc_subsystem_id()
793 if (!(ass & 0x8000)) in alc_subsystem_id()
797 * 12~11: Headphone out -> 00: PortA, 01: PortE, 02: PortD, 03: Resvered in alc_subsystem_id()
799 * 15 : 1 --> enable the function "Mute internal speaker in alc_subsystem_id()
804 tmp = (ass >> 11) & 0x3; /* HP to chassis */ in alc_subsystem_id()
806 if (found_in_nid_list(nid, spec->gen.autocfg.line_out_pins, in alc_subsystem_id()
807 spec->gen.autocfg.line_outs)) in alc_subsystem_id()
809 spec->gen.autocfg.hp_pins[0] = nid; in alc_subsystem_id()
814 /* Check the validity of ALC subsystem-id
815 * ports contains an array of 4 pin NIDs for port-A, E, D and I */
816 static void alc_ssid_check(struct hda_codec *codec, const hda_nid_t *ports) in alc_ssid_check() argument
818 if (!alc_subsystem_id(codec, ports)) { in alc_ssid_check()
819 struct alc_spec *spec = codec->spec; in alc_ssid_check()
820 if (spec->init_amp == ALC_INIT_UNDEFINED) { in alc_ssid_check()
821 codec_dbg(codec, in alc_ssid_check()
823 spec->init_amp = ALC_INIT_DEFAULT; in alc_ssid_check()
831 static void alc_fixup_inv_dmic(struct hda_codec *codec, in alc_fixup_inv_dmic() argument
834 struct alc_spec *spec = codec->spec; in alc_fixup_inv_dmic()
836 spec->gen.inv_dmic_split = 1; in alc_fixup_inv_dmic()
840 static int alc_build_controls(struct hda_codec *codec) in alc_build_controls() argument
844 err = snd_hda_gen_build_controls(codec); in alc_build_controls()
845 if (err < 0) in alc_build_controls()
848 snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_BUILD); in alc_build_controls()
849 return 0; in alc_build_controls()
857 static void alc_pre_init(struct hda_codec *codec) in alc_pre_init() argument
859 alc_fill_eapd_coef(codec); in alc_pre_init()
862 #define is_s3_resume(codec) \ argument
863 ((codec)->core.dev.power.power_state.event == PM_EVENT_RESUME)
864 #define is_s4_resume(codec) \ argument
865 ((codec)->core.dev.power.power_state.event == PM_EVENT_RESTORE)
867 static int alc_init(struct hda_codec *codec) in alc_init() argument
869 struct alc_spec *spec = codec->spec; in alc_init()
872 if (is_s4_resume(codec)) in alc_init()
873 alc_pre_init(codec); in alc_init()
875 if (spec->init_hook) in alc_init()
876 spec->init_hook(codec); in alc_init()
878 spec->gen.skip_verbs = 1; /* applied in below */ in alc_init()
879 snd_hda_gen_init(codec); in alc_init()
880 alc_fix_pll(codec); in alc_init()
881 alc_auto_init_amp(codec, spec->init_amp); in alc_init()
882 snd_hda_apply_verbs(codec); /* apply verbs here after own init */ in alc_init()
884 snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_INIT); in alc_init()
886 return 0; in alc_init()
889 static inline void alc_shutup(struct hda_codec *codec) in alc_shutup() argument
891 struct alc_spec *spec = codec->spec; in alc_shutup()
893 if (!snd_hda_get_bool_hint(codec, "shutup")) in alc_shutup()
896 if (spec && spec->shutup) in alc_shutup()
897 spec->shutup(codec); in alc_shutup()
899 alc_shutup_pins(codec); in alc_shutup()
902 static void alc_reboot_notify(struct hda_codec *codec) in alc_reboot_notify() argument
904 struct alc_spec *spec = codec->spec; in alc_reboot_notify()
906 if (spec && spec->reboot_notify) in alc_reboot_notify()
907 spec->reboot_notify(codec); in alc_reboot_notify()
909 alc_shutup(codec); in alc_reboot_notify()
915 static void alc_power_eapd(struct hda_codec *codec) in alc_power_eapd() argument
917 alc_auto_setup_eapd(codec, false); in alc_power_eapd()
920 static int alc_suspend(struct hda_codec *codec) in alc_suspend() argument
922 struct alc_spec *spec = codec->spec; in alc_suspend()
923 alc_shutup(codec); in alc_suspend()
924 if (spec && spec->power_hook) in alc_suspend()
925 spec->power_hook(codec); in alc_suspend()
926 return 0; in alc_suspend()
931 static int alc_resume(struct hda_codec *codec) in alc_resume() argument
933 struct alc_spec *spec = codec->spec; in alc_resume()
935 if (!spec->no_depop_delay) in alc_resume()
937 codec->patch_ops.init(codec); in alc_resume()
938 snd_hda_regmap_sync(codec); in alc_resume()
939 hda_call_check_power_status(codec, 0x01); in alc_resume()
940 return 0; in alc_resume()
961 #define alc_codec_rename(codec, name) snd_hda_codec_set_name(codec, name) argument
981 { 0x10ec0221, 0xf00f, 0x1003, "ALC231" },
982 { 0x10ec0269, 0xfff0, 0x3010, "ALC277" },
983 { 0x10ec0269, 0xf0f0, 0x2010, "ALC259" },
984 { 0x10ec0269, 0xf0f0, 0x3010, "ALC258" },
985 { 0x10ec0269, 0x00f0, 0x0010, "ALC269VB" },
986 { 0x10ec0269, 0xffff, 0xa023, "ALC259" },
987 { 0x10ec0269, 0xffff, 0x6023, "ALC281X" },
988 { 0x10ec0269, 0x00f0, 0x0020, "ALC269VC" },
989 { 0x10ec0269, 0x00f0, 0x0030, "ALC269VD" },
990 { 0x10ec0662, 0xffff, 0x4020, "ALC656" },
991 { 0x10ec0887, 0x00f0, 0x0030, "ALC887-VD" },
992 { 0x10ec0888, 0x00f0, 0x0030, "ALC888-VD" },
993 { 0x10ec0888, 0xf0f0, 0x3020, "ALC886" },
994 { 0x10ec0899, 0x2000, 0x2000, "ALC899" },
995 { 0x10ec0892, 0xffff, 0x8020, "ALC661" },
996 { 0x10ec0892, 0xffff, 0x8011, "ALC661" },
997 { 0x10ec0892, 0xffff, 0x4011, "ALC656" },
1002 { 0x10ec0280, 0x1028, 0, "ALC3220" },
1003 { 0x10ec0282, 0x1028, 0, "ALC3221" },
1004 { 0x10ec0283, 0x1028, 0, "ALC3223" },
1005 { 0x10ec0288, 0x1028, 0, "ALC3263" },
1006 { 0x10ec0292, 0x1028, 0, "ALC3226" },
1007 { 0x10ec0293, 0x1028, 0, "ALC3235" },
1008 { 0x10ec0255, 0x1028, 0, "ALC3234" },
1009 { 0x10ec0668, 0x1028, 0, "ALC3661" },
1010 { 0x10ec0275, 0x1028, 0, "ALC3260" },
1011 { 0x10ec0899, 0x1028, 0, "ALC3861" },
1012 { 0x10ec0298, 0x1028, 0, "ALC3266" },
1013 { 0x10ec0236, 0x1028, 0, "ALC3204" },
1014 { 0x10ec0256, 0x1028, 0, "ALC3246" },
1015 { 0x10ec0225, 0x1028, 0, "ALC3253" },
1016 { 0x10ec0295, 0x1028, 0, "ALC3254" },
1017 { 0x10ec0299, 0x1028, 0, "ALC3271" },
1018 { 0x10ec0670, 0x1025, 0, "ALC669X" },
1019 { 0x10ec0676, 0x1025, 0, "ALC679X" },
1020 { 0x10ec0282, 0x1043, 0, "ALC3229" },
1021 { 0x10ec0233, 0x1043, 0, "ALC3236" },
1022 { 0x10ec0280, 0x103c, 0, "ALC3228" },
1023 { 0x10ec0282, 0x103c, 0, "ALC3227" },
1024 { 0x10ec0286, 0x103c, 0, "ALC3242" },
1025 { 0x10ec0290, 0x103c, 0, "ALC3241" },
1026 { 0x10ec0668, 0x103c, 0, "ALC3662" },
1027 { 0x10ec0283, 0x17aa, 0, "ALC3239" },
1028 { 0x10ec0292, 0x17aa, 0, "ALC3232" },
1032 static int alc_codec_rename_from_preset(struct hda_codec *codec) in alc_codec_rename_from_preset() argument
1037 for (p = rename_tbl; p->vendor_id; p++) { in alc_codec_rename_from_preset()
1038 if (p->vendor_id != codec->core.vendor_id) in alc_codec_rename_from_preset()
1040 if ((alc_get_coef0(codec) & p->coef_mask) == p->coef_bits) in alc_codec_rename_from_preset()
1041 return alc_codec_rename(codec, p->name); in alc_codec_rename_from_preset()
1044 if (!codec->bus->pci) in alc_codec_rename_from_preset()
1045 return 0; in alc_codec_rename_from_preset()
1046 for (q = rename_pci_tbl; q->codec_vendor_id; q++) { in alc_codec_rename_from_preset()
1047 if (q->codec_vendor_id != codec->core.vendor_id) in alc_codec_rename_from_preset()
1049 if (q->pci_subvendor != codec->bus->pci->subsystem_vendor) in alc_codec_rename_from_preset()
1051 if (!q->pci_subdevice || in alc_codec_rename_from_preset()
1052 q->pci_subdevice == codec->bus->pci->subsystem_device) in alc_codec_rename_from_preset()
1053 return alc_codec_rename(codec, q->name); in alc_codec_rename_from_preset()
1056 return 0; in alc_codec_rename_from_preset()
1061 * Digital-beep handlers
1067 HDA_CODEC_VOLUME("Beep Playback Volume", 0, 0, HDA_INPUT),
1068 HDA_CODEC_MUTE_BEEP("Beep Playback Switch", 0, 0, HDA_INPUT),
1079 for (i = 0; i < ARRAY_SIZE(alc_beep_mixer); i++) { in set_beep_amp()
1080 knew = snd_hda_gen_add_kctl(&spec->gen, NULL, in set_beep_amp()
1083 return -ENOMEM; in set_beep_amp()
1084 knew->private_value = beep_amp; in set_beep_amp()
1086 return 0; in set_beep_amp()
1090 SND_PCI_QUIRK(0x1043, 0x103c, "ASUS", 1),
1091 SND_PCI_QUIRK(0x1043, 0x115d, "ASUS", 1),
1092 SND_PCI_QUIRK(0x1043, 0x829f, "ASUS", 1),
1093 SND_PCI_QUIRK(0x1043, 0x8376, "EeePC", 1),
1094 SND_PCI_QUIRK(0x1043, 0x83ce, "EeePC", 1),
1095 SND_PCI_QUIRK(0x1043, 0x831a, "EeePC", 1),
1096 SND_PCI_QUIRK(0x1043, 0x834a, "EeePC", 1),
1097 SND_PCI_QUIRK(0x1458, 0xa002, "GA-MA790X", 1),
1098 SND_PCI_QUIRK(0x8086, 0xd613, "Intel", 1),
1099 /* denylist -- no beep available */
1100 SND_PCI_QUIRK(0x17aa, 0x309e, "Lenovo ThinkCentre M73", 0),
1101 SND_PCI_QUIRK(0x17aa, 0x30a3, "Lenovo ThinkCentre M93", 0),
1105 static inline int has_cdefine_beep(struct hda_codec *codec) in has_cdefine_beep() argument
1107 struct alc_spec *spec = codec->spec; in has_cdefine_beep()
1109 q = snd_pci_quirk_lookup(codec->bus->pci, beep_allow_list); in has_cdefine_beep()
1111 return q->value; in has_cdefine_beep()
1112 return spec->cdefine.enable_pcbeep; in has_cdefine_beep()
1115 #define set_beep_amp(spec, nid, idx, dir) 0
1116 #define has_cdefine_beep(codec) 0 argument
1120 /* return 1 if successful, 0 if the proper config is not found,
1123 static int alc_parse_auto_config(struct hda_codec *codec, in alc_parse_auto_config() argument
1127 struct alc_spec *spec = codec->spec; in alc_parse_auto_config()
1128 struct auto_pin_cfg *cfg = &spec->gen.autocfg; in alc_parse_auto_config()
1131 err = snd_hda_parse_pin_defcfg(codec, cfg, ignore_nids, in alc_parse_auto_config()
1132 spec->parse_flags); in alc_parse_auto_config()
1133 if (err < 0) in alc_parse_auto_config()
1137 alc_ssid_check(codec, ssid_nids); in alc_parse_auto_config()
1139 err = snd_hda_gen_parse_auto_config(codec, cfg); in alc_parse_auto_config()
1140 if (err < 0) in alc_parse_auto_config()
1147 static int alc_alloc_spec(struct hda_codec *codec, hda_nid_t mixer_nid) in alc_alloc_spec() argument
1153 return -ENOMEM; in alc_alloc_spec()
1154 codec->spec = spec; in alc_alloc_spec()
1155 snd_hda_gen_spec_init(&spec->gen); in alc_alloc_spec()
1156 spec->gen.mixer_nid = mixer_nid; in alc_alloc_spec()
1157 spec->gen.own_eapd_ctl = 1; in alc_alloc_spec()
1158 codec->single_adc_amp = 1; in alc_alloc_spec()
1159 /* FIXME: do we need this for all Realtek codec models? */ in alc_alloc_spec()
1160 codec->spdif_status_reset = 1; in alc_alloc_spec()
1161 codec->forced_resume = 1; in alc_alloc_spec()
1162 codec->patch_ops = alc_patch_ops; in alc_alloc_spec()
1164 err = alc_codec_rename_from_preset(codec); in alc_alloc_spec()
1165 if (err < 0) { in alc_alloc_spec()
1169 return 0; in alc_alloc_spec()
1172 static int alc880_parse_auto_config(struct hda_codec *codec) in alc880_parse_auto_config() argument
1174 static const hda_nid_t alc880_ignore[] = { 0x1d, 0 }; in alc880_parse_auto_config()
1175 static const hda_nid_t alc880_ssids[] = { 0x15, 0x1b, 0x14, 0 }; in alc880_parse_auto_config()
1176 return alc_parse_auto_config(codec, alc880_ignore, alc880_ssids); in alc880_parse_auto_config()
1180 * ALC880 fix-ups
1210 /* enable the volume-knob widget support on NID 0x21 */
1211 static void alc880_fixup_vol_knob(struct hda_codec *codec, in alc880_fixup_vol_knob() argument
1215 snd_hda_jack_detect_enable_callback(codec, 0x21, in alc880_fixup_vol_knob()
1231 { 0x20, AC_VERB_SET_COEF_INDEX, 0x07 },
1232 { 0x20, AC_VERB_SET_PROC_COEF, 0x3060 },
1242 { 0x16, 0x411111f0 },
1243 { 0x18, 0x411111f0 },
1244 { 0x1a, 0x411111f0 },
1251 { 0x1a, 0x0181344f }, /* line-in */
1252 { 0x1b, 0x0321403f }, /* headphone */
1260 { 0x17, 0x411111f0 },
1270 { 0x20, AC_VERB_SET_COEF_INDEX, 0x07 },
1271 { 0x20, AC_VERB_SET_PROC_COEF, 0x3060 },
1279 { 0x20, AC_VERB_SET_COEF_INDEX, 0x07 },
1280 { 0x20, AC_VERB_SET_PROC_COEF, 0x3070 },
1294 { 0x14, 0x0121401f }, /* HP */
1295 { 0x15, 0x99030120 }, /* speaker */
1296 { 0x16, 0x99030130 }, /* bass speaker */
1297 { 0x17, 0x411111f0 }, /* N/A */
1298 { 0x18, 0x411111f0 }, /* N/A */
1299 { 0x19, 0x01a19950 }, /* mic-in */
1300 { 0x1a, 0x411111f0 }, /* N/A */
1301 { 0x1b, 0x411111f0 }, /* N/A */
1302 { 0x1c, 0x411111f0 }, /* N/A */
1303 { 0x1d, 0x411111f0 }, /* N/A */
1304 { 0x1e, 0x01454140 }, /* SPDIF out */
1314 { 0x14, 0x0121401f }, /* HP */
1315 { 0x15, 0x99030120 }, /* speaker */
1316 { 0x16, 0x411111f0 }, /* N/A */
1317 { 0x17, 0x411111f0 }, /* N/A */
1318 { 0x18, 0x411111f0 }, /* N/A */
1319 { 0x19, 0x01a19950 }, /* mic-in */
1320 { 0x1a, 0x411111f0 }, /* N/A */
1321 { 0x1b, 0x411111f0 }, /* N/A */
1322 { 0x1c, 0x411111f0 }, /* N/A */
1323 { 0x1d, 0x411111f0 }, /* N/A */
1324 { 0x1e, 0x411111f0 }, /* N/A */
1334 { 0x14, 0x0121411f }, /* HP */
1335 { 0x15, 0x99030120 }, /* speaker */
1336 { 0x16, 0x99030130 }, /* bass speaker */
1344 { 0x17, 0x411111f0 },
1345 { 0x19, 0x411111f0 },
1346 { 0x1b, 0x411111f0 },
1347 { 0x1f, 0x411111f0 },
1355 { 0x14, 0x99030120 }, /* speaker */
1356 { 0x15, 0x0121411f }, /* HP */
1357 { 0x16, 0x411111f0 }, /* N/A */
1358 { 0x17, 0x411111f0 }, /* N/A */
1359 { 0x18, 0x01a19950 }, /* mic-in */
1360 { 0x19, 0x411111f0 }, /* N/A */
1361 { 0x1a, 0x01813031 }, /* line-in */
1362 { 0x1b, 0x411111f0 }, /* N/A */
1363 { 0x1c, 0x411111f0 }, /* N/A */
1364 { 0x1d, 0x411111f0 }, /* N/A */
1365 { 0x1e, 0x0144111e }, /* SPDIF */
1373 { 0x14, 0x0121411f }, /* HP */
1374 { 0x15, 0x411111f0 }, /* N/A */
1375 { 0x16, 0x411111f0 }, /* N/A */
1376 { 0x17, 0x411111f0 }, /* N/A */
1377 { 0x18, 0x90a60160 }, /* mic */
1378 { 0x19, 0x411111f0 }, /* N/A */
1379 { 0x1a, 0x411111f0 }, /* N/A */
1380 { 0x1b, 0x411111f0 }, /* N/A */
1381 { 0x1c, 0x411111f0 }, /* N/A */
1382 { 0x1d, 0x411111f0 }, /* N/A */
1383 { 0x1e, 0xb743111e }, /* SPDIF out */
1392 { 0x14, 0x01014010 }, /* line-out */
1393 { 0x15, 0x411111f0 }, /* N/A */
1394 { 0x16, 0x411111f0 }, /* N/A */
1395 { 0x17, 0x411111f0 }, /* N/A */
1396 { 0x18, 0x01a19c30 }, /* mic-in */
1397 { 0x19, 0x0121411f }, /* HP */
1398 { 0x1a, 0x01813031 }, /* line-in */
1399 { 0x1b, 0x02a19c40 }, /* front-mic */
1400 { 0x1c, 0x411111f0 }, /* N/A */
1401 { 0x1d, 0x411111f0 }, /* N/A */
1402 /* 0x1e is filled in below */
1403 { 0x1f, 0x411111f0 }, /* N/A */
1410 { 0x1e, 0x411111f0 }, /* N/A */
1419 { 0x1e, 0x0144111e }, /* SPDIF */
1428 { 0x14, 0x01014010 }, /* front */
1429 { 0x15, 0x411111f0 }, /* N/A */
1430 { 0x16, 0x01011411 }, /* CLFE */
1431 { 0x17, 0x01016412 }, /* surr */
1432 { 0x18, 0x01a19c30 }, /* mic-in */
1433 { 0x19, 0x0121411f }, /* HP */
1434 { 0x1a, 0x01813031 }, /* line-in */
1435 { 0x1b, 0x02a19c40 }, /* front-mic */
1436 { 0x1c, 0x411111f0 }, /* N/A */
1437 { 0x1d, 0x411111f0 }, /* N/A */
1438 /* 0x1e is filled in below */
1439 { 0x1f, 0x411111f0 }, /* N/A */
1446 { 0x1e, 0x411111f0 }, /* N/A */
1455 { 0x1e, 0x0144111e }, /* SPDIF */
1464 { 0x14, 0x01014010 }, /* front */
1465 { 0x15, 0x01016412 }, /* surr */
1466 { 0x16, 0x01011411 }, /* CLFE */
1467 { 0x17, 0x01012414 }, /* side */
1468 { 0x18, 0x01a19c30 }, /* mic-in */
1469 { 0x19, 0x02a19c40 }, /* front-mic */
1470 { 0x1a, 0x01813031 }, /* line-in */
1471 { 0x1b, 0x0121411f }, /* HP */
1472 { 0x1c, 0x411111f0 }, /* N/A */
1473 { 0x1d, 0x411111f0 }, /* N/A */
1474 /* 0x1e is filled in below */
1475 { 0x1f, 0x411111f0 }, /* N/A */
1482 { 0x1e, 0x411111f0 }, /* N/A */
1491 { 0x1e, 0x0144111e }, /* SPDIF */
1500 { 0x1b, 0x0121401f }, /* HP with jack detect */
1509 SND_PCI_QUIRK(0x1019, 0x0f69, "Coeus G610P", ALC880_FIXUP_W810),
1510 SND_PCI_QUIRK(0x1043, 0x10c3, "ASUS W5A", ALC880_FIXUP_ASUS_W5A),
1511 SND_PCI_QUIRK(0x1043, 0x1964, "ASUS Z71V", ALC880_FIXUP_Z71V),
1512 SND_PCI_QUIRK_VENDOR(0x1043, "ASUS", ALC880_FIXUP_GPIO1),
1513 SND_PCI_QUIRK(0x147b, 0x1045, "ABit AA8XE", ALC880_FIXUP_6ST_AUTOMUTE),
1514 SND_PCI_QUIRK(0x1558, 0x5401, "Clevo GPIO2", ALC880_FIXUP_GPIO2),
1515 SND_PCI_QUIRK_VENDOR(0x1558, "Clevo", ALC880_FIXUP_EAPD_COEF),
1516 SND_PCI_QUIRK(0x1584, 0x9050, "Uniwill", ALC880_FIXUP_UNIWILL_DIG),
1517 SND_PCI_QUIRK(0x1584, 0x9054, "Uniwill", ALC880_FIXUP_F1734),
1518 SND_PCI_QUIRK(0x1584, 0x9070, "Uniwill", ALC880_FIXUP_UNIWILL),
1519 SND_PCI_QUIRK(0x1584, 0x9077, "Uniwill P53", ALC880_FIXUP_VOL_KNOB),
1520 SND_PCI_QUIRK(0x161f, 0x203d, "W810", ALC880_FIXUP_W810),
1521 SND_PCI_QUIRK(0x161f, 0x205d, "Medion Rim 2150", ALC880_FIXUP_MEDION_RIM),
1522 SND_PCI_QUIRK(0x1631, 0xe011, "PB 13201056", ALC880_FIXUP_6ST_AUTOMUTE),
1523 SND_PCI_QUIRK(0x1734, 0x107c, "FSC Amilo M1437", ALC880_FIXUP_FUJITSU),
1524 SND_PCI_QUIRK(0x1734, 0x1094, "FSC Amilo M1451G", ALC880_FIXUP_FUJITSU),
1525 SND_PCI_QUIRK(0x1734, 0x10ac, "FSC AMILO Xi 1526", ALC880_FIXUP_F1734),
1526 SND_PCI_QUIRK(0x1734, 0x10b0, "FSC Amilo Pi1556", ALC880_FIXUP_FUJITSU),
1527 SND_PCI_QUIRK(0x1854, 0x003b, "LG", ALC880_FIXUP_LG),
1528 SND_PCI_QUIRK(0x1854, 0x005f, "LG P1 Express", ALC880_FIXUP_LG),
1529 SND_PCI_QUIRK(0x1854, 0x0068, "LG w1", ALC880_FIXUP_LG),
1530 SND_PCI_QUIRK(0x1854, 0x0077, "LG LW25", ALC880_FIXUP_LG_LW25),
1531 SND_PCI_QUIRK(0x19db, 0x4188, "TCL S700", ALC880_FIXUP_TCL_S700),
1534 * It's not quite sure whether BIOS sets the correct pin-config table
1539 SND_PCI_QUIRK(0x1019, 0xa880, "ECS", ALC880_FIXUP_5ST_DIG),
1540 SND_PCI_QUIRK(0x1019, 0xa884, "Acer APFV", ALC880_FIXUP_6ST),
1541 SND_PCI_QUIRK(0x1025, 0x0070, "ULI", ALC880_FIXUP_3ST_DIG),
1542 SND_PCI_QUIRK(0x1025, 0x0077, "ULI", ALC880_FIXUP_6ST_DIG),
1543 SND_PCI_QUIRK(0x1025, 0x0078, "ULI", ALC880_FIXUP_6ST_DIG),
1544 SND_PCI_QUIRK(0x1025, 0x0087, "ULI", ALC880_FIXUP_6ST_DIG),
1545 SND_PCI_QUIRK(0x1025, 0xe309, "ULI", ALC880_FIXUP_3ST_DIG),
1546 SND_PCI_QUIRK(0x1025, 0xe310, "ULI", ALC880_FIXUP_3ST),
1547 SND_PCI_QUIRK(0x1039, 0x1234, NULL, ALC880_FIXUP_6ST_DIG),
1548 SND_PCI_QUIRK(0x104d, 0x81a0, "Sony", ALC880_FIXUP_3ST),
1549 SND_PCI_QUIRK(0x104d, 0x81d6, "Sony", ALC880_FIXUP_3ST),
1550 SND_PCI_QUIRK(0x107b, 0x3032, "Gateway", ALC880_FIXUP_5ST),
1551 SND_PCI_QUIRK(0x107b, 0x3033, "Gateway", ALC880_FIXUP_5ST),
1552 SND_PCI_QUIRK(0x107b, 0x4039, "Gateway", ALC880_FIXUP_5ST),
1553 SND_PCI_QUIRK(0x1297, 0xc790, "Shuttle ST20G5", ALC880_FIXUP_6ST_DIG),
1554 SND_PCI_QUIRK(0x1458, 0xa102, "Gigabyte K8", ALC880_FIXUP_6ST_DIG),
1555 SND_PCI_QUIRK(0x1462, 0x1150, "MSI", ALC880_FIXUP_6ST_DIG),
1556 SND_PCI_QUIRK(0x1509, 0x925d, "FIC P4M", ALC880_FIXUP_6ST_DIG),
1557 SND_PCI_QUIRK(0x1565, 0x8202, "Biostar", ALC880_FIXUP_5ST_DIG),
1558 SND_PCI_QUIRK(0x1695, 0x400d, "EPoX", ALC880_FIXUP_5ST_DIG),
1559 SND_PCI_QUIRK(0x1695, 0x4012, "EPox EP-5LDA", ALC880_FIXUP_5ST_DIG),
1560 SND_PCI_QUIRK(0x2668, 0x8086, NULL, ALC880_FIXUP_6ST_DIG), /* broken BIOS */
1561 SND_PCI_QUIRK(0x8086, 0x2668, NULL, ALC880_FIXUP_6ST_DIG),
1562 SND_PCI_QUIRK(0x8086, 0xa100, "Intel mobo", ALC880_FIXUP_5ST_DIG),
1563 SND_PCI_QUIRK(0x8086, 0xd400, "Intel mobo", ALC880_FIXUP_5ST_DIG),
1564 SND_PCI_QUIRK(0x8086, 0xd401, "Intel mobo", ALC880_FIXUP_5ST_DIG),
1565 SND_PCI_QUIRK(0x8086, 0xd402, "Intel mobo", ALC880_FIXUP_3ST_DIG),
1566 SND_PCI_QUIRK(0x8086, 0xe224, "Intel mobo", ALC880_FIXUP_5ST_DIG),
1567 SND_PCI_QUIRK(0x8086, 0xe305, "Intel mobo", ALC880_FIXUP_3ST_DIG),
1568 SND_PCI_QUIRK(0x8086, 0xe308, "Intel mobo", ALC880_FIXUP_3ST_DIG),
1569 SND_PCI_QUIRK(0x8086, 0xe400, "Intel mobo", ALC880_FIXUP_5ST_DIG),
1570 SND_PCI_QUIRK(0x8086, 0xe401, "Intel mobo", ALC880_FIXUP_5ST_DIG),
1571 SND_PCI_QUIRK(0x8086, 0xe402, "Intel mobo", ALC880_FIXUP_5ST_DIG),
1573 SND_PCI_QUIRK_VENDOR(0x8086, "Intel mobo", ALC880_FIXUP_3ST),
1574 SND_PCI_QUIRK(0xa0a0, 0x0560, "AOpen i915GMm-HFS", ALC880_FIXUP_5ST_DIG),
1575 SND_PCI_QUIRK(0xe803, 0x1019, NULL, ALC880_FIXUP_6ST_DIG),
1581 {.id = ALC880_FIXUP_3ST_DIG, .name = "3stack-digout"},
1583 {.id = ALC880_FIXUP_5ST_DIG, .name = "5stack-digout"},
1585 {.id = ALC880_FIXUP_6ST_DIG, .name = "6stack-digout"},
1586 {.id = ALC880_FIXUP_6ST_AUTOMUTE, .name = "6stack-automute"},
1594 static int patch_alc880(struct hda_codec *codec) in patch_alc880() argument
1599 err = alc_alloc_spec(codec, 0x0b); in patch_alc880()
1600 if (err < 0) in patch_alc880()
1603 spec = codec->spec; in patch_alc880()
1604 spec->gen.need_dac_fix = 1; in patch_alc880()
1605 spec->gen.beep_nid = 0x01; in patch_alc880()
1607 codec->patch_ops.unsol_event = alc880_unsol_event; in patch_alc880()
1609 alc_pre_init(codec); in patch_alc880()
1611 snd_hda_pick_fixup(codec, alc880_fixup_models, alc880_fixup_tbl, in patch_alc880()
1613 snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PRE_PROBE); in patch_alc880()
1616 err = alc880_parse_auto_config(codec); in patch_alc880()
1617 if (err < 0) in patch_alc880()
1620 if (!spec->gen.no_analog) { in patch_alc880()
1621 err = set_beep_amp(spec, 0x0b, 0x05, HDA_INPUT); in patch_alc880()
1622 if (err < 0) in patch_alc880()
1626 snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PROBE); in patch_alc880()
1628 return 0; in patch_alc880()
1631 alc_free(codec); in patch_alc880()
1639 static int alc260_parse_auto_config(struct hda_codec *codec) in alc260_parse_auto_config() argument
1641 static const hda_nid_t alc260_ignore[] = { 0x17, 0 }; in alc260_parse_auto_config()
1642 static const hda_nid_t alc260_ssids[] = { 0x10, 0x15, 0x0f, 0 }; in alc260_parse_auto_config()
1643 return alc_parse_auto_config(codec, alc260_ignore, alc260_ssids); in alc260_parse_auto_config()
1663 static void alc260_gpio1_automute(struct hda_codec *codec) in alc260_gpio1_automute() argument
1665 struct alc_spec *spec = codec->spec; in alc260_gpio1_automute()
1667 alc_update_gpio_data(codec, 0x01, spec->gen.hp_jack_present); in alc260_gpio1_automute()
1670 static void alc260_fixup_gpio1_toggle(struct hda_codec *codec, in alc260_fixup_gpio1_toggle() argument
1673 struct alc_spec *spec = codec->spec; in alc260_fixup_gpio1_toggle()
1678 spec->gen.automute_hook = alc260_gpio1_automute; in alc260_fixup_gpio1_toggle()
1679 spec->gen.detect_hp = 1; in alc260_fixup_gpio1_toggle()
1680 spec->gen.automute_speaker = 1; in alc260_fixup_gpio1_toggle()
1681 spec->gen.autocfg.hp_pins[0] = 0x0f; /* copy it for automute */ in alc260_fixup_gpio1_toggle()
1682 snd_hda_jack_detect_enable_callback(codec, 0x0f, in alc260_fixup_gpio1_toggle()
1684 alc_setup_gpio(codec, 0x01); in alc260_fixup_gpio1_toggle()
1688 static void alc260_fixup_kn1(struct hda_codec *codec, in alc260_fixup_kn1() argument
1691 struct alc_spec *spec = codec->spec; in alc260_fixup_kn1()
1693 { 0x0f, 0x02214000 }, /* HP/speaker */ in alc260_fixup_kn1()
1694 { 0x12, 0x90a60160 }, /* int mic */ in alc260_fixup_kn1()
1695 { 0x13, 0x02a19000 }, /* ext mic */ in alc260_fixup_kn1()
1696 { 0x18, 0x01446000 }, /* SPDIF out */ in alc260_fixup_kn1()
1698 { 0x10, 0x411111f0 }, in alc260_fixup_kn1()
1699 { 0x11, 0x411111f0 }, in alc260_fixup_kn1()
1700 { 0x14, 0x411111f0 }, in alc260_fixup_kn1()
1701 { 0x15, 0x411111f0 }, in alc260_fixup_kn1()
1702 { 0x16, 0x411111f0 }, in alc260_fixup_kn1()
1703 { 0x17, 0x411111f0 }, in alc260_fixup_kn1()
1704 { 0x19, 0x411111f0 }, in alc260_fixup_kn1()
1710 snd_hda_apply_pincfgs(codec, pincfgs); in alc260_fixup_kn1()
1711 spec->init_amp = ALC_INIT_NONE; in alc260_fixup_kn1()
1716 static void alc260_fixup_fsc_s7020(struct hda_codec *codec, in alc260_fixup_fsc_s7020() argument
1719 struct alc_spec *spec = codec->spec; in alc260_fixup_fsc_s7020()
1721 spec->init_amp = ALC_INIT_NONE; in alc260_fixup_fsc_s7020()
1724 static void alc260_fixup_fsc_s7020_jwse(struct hda_codec *codec, in alc260_fixup_fsc_s7020_jwse() argument
1727 struct alc_spec *spec = codec->spec; in alc260_fixup_fsc_s7020_jwse()
1729 spec->gen.add_jack_modes = 1; in alc260_fixup_fsc_s7020_jwse()
1730 spec->gen.hp_mic = 1; in alc260_fixup_fsc_s7020_jwse()
1738 { 0x11, 0x90130110 }, /* speaker */
1745 { 0x0f, 0x01214000 }, /* HP */
1752 { 0x1a, AC_VERB_SET_COEF_INDEX, 0x07 },
1753 { 0x1a, AC_VERB_SET_PROC_COEF, 0x3040 },
1770 { 0x1a, AC_VERB_SET_COEF_INDEX, 0x07 },
1771 { 0x1a, AC_VERB_SET_PROC_COEF, 0x3050 },
1801 { 0x0f, 0x01211020 },
1802 { 0x10, 0x0001003f },
1803 { 0x11, 0x411111f0 },
1804 { 0x12, 0x01a15930 },
1805 { 0x13, 0x411111f0 },
1806 { 0x14, 0x411111f0 },
1807 { 0x15, 0x411111f0 },
1808 { 0x16, 0x411111f0 },
1809 { 0x17, 0x411111f0 },
1810 { 0x18, 0x411111f0 },
1811 { 0x19, 0x411111f0 },
1818 SND_PCI_QUIRK(0x1025, 0x007b, "Acer C20x", ALC260_FIXUP_GPIO1),
1819 SND_PCI_QUIRK(0x1025, 0x007f, "Acer Aspire 9500", ALC260_FIXUP_COEF),
1820 SND_PCI_QUIRK(0x1025, 0x008f, "Acer", ALC260_FIXUP_GPIO1),
1821 SND_PCI_QUIRK(0x103c, 0x280a, "HP dc5750", ALC260_FIXUP_HP_DC5750),
1822 SND_PCI_QUIRK(0x103c, 0x30ba, "HP Presario B1900", ALC260_FIXUP_HP_B1900),
1823 SND_PCI_QUIRK(0x104d, 0x81bb, "Sony VAIO", ALC260_FIXUP_VAIO_PINS),
1824 SND_PCI_QUIRK(0x104d, 0x81e2, "Sony VAIO TX", ALC260_FIXUP_HP_PIN_0F),
1825 SND_PCI_QUIRK(0x10cf, 0x1326, "FSC LifeBook S7020", ALC260_FIXUP_FSC_S7020),
1826 SND_PCI_QUIRK(0x1509, 0x4540, "Favorit 100XS", ALC260_FIXUP_GPIO1),
1827 SND_PCI_QUIRK(0x152d, 0x0729, "Quanta KN1", ALC260_FIXUP_KN1),
1828 SND_PCI_QUIRK(0x161f, 0x2057, "Replacer 672V", ALC260_FIXUP_REPLACER),
1829 SND_PCI_QUIRK(0x1631, 0xc017, "PB V7900", ALC260_FIXUP_COEF),
1837 {.id = ALC260_FIXUP_FSC_S7020_JWSE, .name = "fujitsu-jwse"},
1843 static int patch_alc260(struct hda_codec *codec) in patch_alc260() argument
1848 err = alc_alloc_spec(codec, 0x07); in patch_alc260()
1849 if (err < 0) in patch_alc260()
1852 spec = codec->spec; in patch_alc260()
1857 spec->gen.prefer_hp_amp = 1; in patch_alc260()
1858 spec->gen.beep_nid = 0x01; in patch_alc260()
1860 spec->shutup = alc_eapd_shutup; in patch_alc260()
1862 alc_pre_init(codec); in patch_alc260()
1864 snd_hda_pick_fixup(codec, alc260_fixup_models, alc260_fixup_tbl, in patch_alc260()
1866 snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PRE_PROBE); in patch_alc260()
1869 err = alc260_parse_auto_config(codec); in patch_alc260()
1870 if (err < 0) in patch_alc260()
1873 if (!spec->gen.no_analog) { in patch_alc260()
1874 err = set_beep_amp(spec, 0x07, 0x05, HDA_INPUT); in patch_alc260()
1875 if (err < 0) in patch_alc260()
1879 snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PROBE); in patch_alc260()
1881 return 0; in patch_alc260()
1884 alc_free(codec); in patch_alc260()
1895 * 6-channel independent captures.
1897 * In addition, an independent DAC for the multi-playback (not used in this
1947 static void alc889_fixup_coef(struct hda_codec *codec, in alc889_fixup_coef() argument
1952 alc_update_coef_idx(codec, 7, 0, 0x2030); in alc889_fixup_coef()
1956 static void alc885_fixup_macpro_gpio(struct hda_codec *codec, in alc885_fixup_macpro_gpio() argument
1959 struct alc_spec *spec = codec->spec; in alc885_fixup_macpro_gpio()
1961 spec->gpio_write_delay = true; in alc885_fixup_macpro_gpio()
1962 alc_fixup_gpio3(codec, fix, action); in alc885_fixup_macpro_gpio()
1969 static void alc889_fixup_dac_route(struct hda_codec *codec, in alc889_fixup_dac_route() argument
1974 static const hda_nid_t conn1[] = { 0x0c, 0x0d }; in alc889_fixup_dac_route()
1975 static const hda_nid_t conn2[] = { 0x0e, 0x0f }; in alc889_fixup_dac_route()
1976 snd_hda_override_conn_list(codec, 0x14, ARRAY_SIZE(conn1), conn1); in alc889_fixup_dac_route()
1977 snd_hda_override_conn_list(codec, 0x15, ARRAY_SIZE(conn1), conn1); in alc889_fixup_dac_route()
1978 snd_hda_override_conn_list(codec, 0x18, ARRAY_SIZE(conn2), conn2); in alc889_fixup_dac_route()
1979 snd_hda_override_conn_list(codec, 0x1a, ARRAY_SIZE(conn2), conn2); in alc889_fixup_dac_route()
1982 static const hda_nid_t conn[] = { 0x0c, 0x0d, 0x0e, 0x0f, 0x26 }; in alc889_fixup_dac_route()
1983 snd_hda_override_conn_list(codec, 0x14, ARRAY_SIZE(conn), conn); in alc889_fixup_dac_route()
1984 snd_hda_override_conn_list(codec, 0x15, ARRAY_SIZE(conn), conn); in alc889_fixup_dac_route()
1985 snd_hda_override_conn_list(codec, 0x18, ARRAY_SIZE(conn), conn); in alc889_fixup_dac_route()
1986 snd_hda_override_conn_list(codec, 0x1a, ARRAY_SIZE(conn), conn); in alc889_fixup_dac_route()
1991 static void alc889_fixup_mbp_vref(struct hda_codec *codec, in alc889_fixup_mbp_vref() argument
1994 static const hda_nid_t nids[] = { 0x14, 0x15, 0x19 }; in alc889_fixup_mbp_vref()
1995 struct alc_spec *spec = codec->spec; in alc889_fixup_mbp_vref()
2000 for (i = 0; i < ARRAY_SIZE(nids); i++) { in alc889_fixup_mbp_vref()
2001 unsigned int val = snd_hda_codec_get_pincfg(codec, nids[i]); in alc889_fixup_mbp_vref()
2004 val = snd_hda_codec_get_pin_target(codec, nids[i]); in alc889_fixup_mbp_vref()
2006 snd_hda_set_pin_ctl(codec, nids[i], val); in alc889_fixup_mbp_vref()
2007 spec->gen.keep_vref_in_automute = 1; in alc889_fixup_mbp_vref()
2012 static void alc889_fixup_mac_pins(struct hda_codec *codec, in alc889_fixup_mac_pins() argument
2015 struct alc_spec *spec = codec->spec; in alc889_fixup_mac_pins()
2018 for (i = 0; i < num_nids; i++) { in alc889_fixup_mac_pins()
2020 val = snd_hda_codec_get_pin_target(codec, nids[i]); in alc889_fixup_mac_pins()
2022 snd_hda_set_pin_ctl(codec, nids[i], val); in alc889_fixup_mac_pins()
2024 spec->gen.keep_vref_in_automute = 1; in alc889_fixup_mac_pins()
2028 static void alc889_fixup_imac91_vref(struct hda_codec *codec, in alc889_fixup_imac91_vref() argument
2031 static const hda_nid_t nids[] = { 0x18, 0x1a }; in alc889_fixup_imac91_vref()
2034 alc889_fixup_mac_pins(codec, nids, ARRAY_SIZE(nids)); in alc889_fixup_imac91_vref()
2038 static void alc889_fixup_mba11_vref(struct hda_codec *codec, in alc889_fixup_mba11_vref() argument
2041 static const hda_nid_t nids[] = { 0x18 }; in alc889_fixup_mba11_vref()
2044 alc889_fixup_mac_pins(codec, nids, ARRAY_SIZE(nids)); in alc889_fixup_mba11_vref()
2048 static void alc889_fixup_mba21_vref(struct hda_codec *codec, in alc889_fixup_mba21_vref() argument
2051 static const hda_nid_t nids[] = { 0x18, 0x19 }; in alc889_fixup_mba21_vref()
2054 alc889_fixup_mac_pins(codec, nids, ARRAY_SIZE(nids)); in alc889_fixup_mba21_vref()
2059 * all-in-one desktop PCs (for example VGC-LN51JGB) through DAC 0x05
2061 static void alc882_fixup_no_primary_hp(struct hda_codec *codec, in alc882_fixup_no_primary_hp() argument
2064 struct alc_spec *spec = codec->spec; in alc882_fixup_no_primary_hp()
2066 spec->gen.no_primary_hp = 1; in alc882_fixup_no_primary_hp()
2067 spec->gen.no_multi_io = 1; in alc882_fixup_no_primary_hp()
2071 static void alc_fixup_bass_chmap(struct hda_codec *codec,
2074 /* For dual-codec configuration, we need to disable some features to avoid
2077 static void alc_fixup_dual_codecs(struct hda_codec *codec, in alc_fixup_dual_codecs() argument
2080 struct alc_spec *spec = codec->spec; in alc_fixup_dual_codecs()
2085 spec->gen.suppress_vmaster = 1; in alc_fixup_dual_codecs()
2086 /* auto-mute and auto-mic switch don't work with multiple codecs */ in alc_fixup_dual_codecs()
2087 spec->gen.suppress_auto_mute = 1; in alc_fixup_dual_codecs()
2088 spec->gen.suppress_auto_mic = 1; in alc_fixup_dual_codecs()
2090 spec->gen.mixer_nid = 0; in alc_fixup_dual_codecs()
2092 codec->force_pin_prefix = 1; in alc_fixup_dual_codecs()
2095 static void rename_ctl(struct hda_codec *codec, const char *oldname, in rename_ctl() argument
2100 kctl = snd_hda_find_mixer_ctl(codec, oldname); in rename_ctl()
2102 strcpy(kctl->id.name, newname); in rename_ctl()
2105 static void alc1220_fixup_gb_dual_codecs(struct hda_codec *codec, in alc1220_fixup_gb_dual_codecs() argument
2109 alc_fixup_dual_codecs(codec, fix, action); in alc1220_fixup_gb_dual_codecs()
2113 strcpy(codec->card->longname, "HDAudio-Gigabyte-ALC1220DualCodecs"); in alc1220_fixup_gb_dual_codecs()
2116 /* rename Capture controls depending on the codec */ in alc1220_fixup_gb_dual_codecs()
2117 rename_ctl(codec, "Capture Volume", in alc1220_fixup_gb_dual_codecs()
2118 codec->addr == 0 ? in alc1220_fixup_gb_dual_codecs()
2119 "Rear-Panel Capture Volume" : in alc1220_fixup_gb_dual_codecs()
2120 "Front-Panel Capture Volume"); in alc1220_fixup_gb_dual_codecs()
2121 rename_ctl(codec, "Capture Switch", in alc1220_fixup_gb_dual_codecs()
2122 codec->addr == 0 ? in alc1220_fixup_gb_dual_codecs()
2123 "Rear-Panel Capture Switch" : in alc1220_fixup_gb_dual_codecs()
2124 "Front-Panel Capture Switch"); in alc1220_fixup_gb_dual_codecs()
2129 static void alc1220_fixup_gb_x570(struct hda_codec *codec, in alc1220_fixup_gb_x570() argument
2133 static const hda_nid_t conn1[] = { 0x0c }; in alc1220_fixup_gb_x570()
2135 WRITE_COEF(0x1a, 0x01c1), in alc1220_fixup_gb_x570()
2136 WRITE_COEF(0x1b, 0x0202), in alc1220_fixup_gb_x570()
2137 WRITE_COEF(0x43, 0x3005), in alc1220_fixup_gb_x570()
2143 snd_hda_override_conn_list(codec, 0x14, ARRAY_SIZE(conn1), conn1); in alc1220_fixup_gb_x570()
2144 snd_hda_override_conn_list(codec, 0x1b, ARRAY_SIZE(conn1), conn1); in alc1220_fixup_gb_x570()
2147 alc_process_coef_fw(codec, gb_x570_coefs); in alc1220_fixup_gb_x570()
2152 static void alc1220_fixup_clevo_p950(struct hda_codec *codec, in alc1220_fixup_clevo_p950() argument
2156 static const hda_nid_t conn1[] = { 0x0c }; in alc1220_fixup_clevo_p950()
2161 alc_update_coef_idx(codec, 0x7, 0, 0x3c3); in alc1220_fixup_clevo_p950()
2162 /* We therefore want to make sure 0x14 (front headphone) and in alc1220_fixup_clevo_p950()
2163 * 0x1b (speakers) use the stereo DAC 0x02 in alc1220_fixup_clevo_p950()
2165 snd_hda_override_conn_list(codec, 0x14, ARRAY_SIZE(conn1), conn1); in alc1220_fixup_clevo_p950()
2166 snd_hda_override_conn_list(codec, 0x1b, ARRAY_SIZE(conn1), conn1); in alc1220_fixup_clevo_p950()
2169 static void alc_fixup_headset_mode_no_hp_mic(struct hda_codec *codec,
2172 static void alc1220_fixup_clevo_pb51ed(struct hda_codec *codec, in alc1220_fixup_clevo_pb51ed() argument
2176 alc1220_fixup_clevo_p950(codec, fix, action); in alc1220_fixup_clevo_pb51ed()
2177 alc_fixup_headset_mode_no_hp_mic(codec, fix, action); in alc1220_fixup_clevo_pb51ed()
2180 static void alc887_asus_hp_automute_hook(struct hda_codec *codec, in alc887_asus_hp_automute_hook() argument
2183 struct alc_spec *spec = codec->spec; in alc887_asus_hp_automute_hook()
2186 snd_hda_gen_hp_automute(codec, jack); in alc887_asus_hp_automute_hook()
2188 if (spec->gen.hp_jack_present) in alc887_asus_hp_automute_hook()
2192 snd_hda_set_pin_ctl(codec, 0x19, PIN_HP | vref); in alc887_asus_hp_automute_hook()
2195 static void alc887_fixup_asus_jack(struct hda_codec *codec, in alc887_fixup_asus_jack() argument
2198 struct alc_spec *spec = codec->spec; in alc887_fixup_asus_jack()
2201 snd_hda_set_pin_ctl_cache(codec, 0x1b, PIN_HP); in alc887_fixup_asus_jack()
2202 spec->gen.hp_automute_hook = alc887_asus_hp_automute_hook; in alc887_fixup_asus_jack()
2209 { 0x15, 0x01080104 }, /* side */
2210 { 0x16, 0x01011012 }, /* rear */
2211 { 0x17, 0x01016011 }, /* clfe */
2218 { 0x15, 0x99130112 }, /* rear int speakers */
2219 { 0x16, 0x99130111 }, /* subwoofer */
2226 { 0x19, PIN_VREF50 },
2237 { 0x16, 0x99130110 }, /* fix sequence for CLFE */
2244 { 0x1c, 0x993301f0 }, /* CD */
2251 { 0x1b, 0x02214120 }, /* Front HP jack is flaky, disable jack detect */
2260 { 0x17, 0x90170111 }, /* hidden surround speaker */
2267 { 0x20, AC_VERB_SET_COEF_INDEX, 0x0b },
2268 { 0x20, AC_VERB_SET_PROC_COEF, 0x0838 },
2276 { 0x20, AC_VERB_SET_COEF_INDEX, 0x07 },
2277 { 0x20, AC_VERB_SET_PROC_COEF, 0x0068 },
2285 { 0x20, AC_VERB_SET_COEF_INDEX, 0x07 },
2286 { 0x20, AC_VERB_SET_PROC_COEF, 0x3060 },
2294 { 0x20, AC_VERB_SET_COEF_INDEX, 0x07 },
2295 { 0x20, AC_VERB_SET_PROC_COEF, 0x3070 },
2303 { 0x20, AC_VERB_SET_COEF_INDEX, 0x07 },
2304 { 0x20, AC_VERB_SET_PROC_COEF, 0x3050 },
2333 { 0x16, 0x99130111 }, /* CLFE speaker */
2334 { 0x17, 0x99130112 }, /* surround speaker */
2343 { 0x16, 0x99130111 }, /* CLFE speaker */
2344 { 0x1b, 0x99130112 }, /* surround speaker */
2356 /* setting bits 1-5 disables DAC nids 0x02-0x06
2357 * apparently. Init=0x38 */
2358 { 0x20, AC_VERB_SET_COEF_INDEX, 0x03 },
2359 { 0x20, AC_VERB_SET_PROC_COEF, 0x0000 },
2362 * Init=0x4900 */
2363 { 0x20, AC_VERB_SET_COEF_INDEX, 0x08 },
2364 { 0x20, AC_VERB_SET_PROC_COEF, 0x0000 },
2372 * codec replicate the sum signal to both channels,
2375 /* DMIC_CONTROL? Init value = 0x0001 */
2376 { 0x20, AC_VERB_SET_COEF_INDEX, 0x0b },
2377 { 0x20, AC_VERB_SET_PROC_COEF, 0x0003 },
2378 { 0x20, AC_VERB_SET_COEF_INDEX, 0x07 },
2379 { 0x20, AC_VERB_SET_PROC_COEF, 0x3050 },
2440 {0x16, 0x99130130}, /* bass speaker */
2469 { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */
2478 { 0x15, 0x02a14150 }, /* use as headset mic, without its own jack detect */
2479 { 0x19, 0x22219420 },
2492 SND_PCI_QUIRK(0x1025, 0x006c, "Acer Aspire 9810", ALC883_FIXUP_ACER_EAPD),
2493 SND_PCI_QUIRK(0x1025, 0x0090, "Acer Aspire", ALC883_FIXUP_ACER_EAPD),
2494 SND_PCI_QUIRK(0x1025, 0x0107, "Acer Aspire", ALC883_FIXUP_ACER_EAPD),
2495 SND_PCI_QUIRK(0x1025, 0x010a, "Acer Ferrari 5000", ALC883_FIXUP_ACER_EAPD),
2496 SND_PCI_QUIRK(0x1025, 0x0110, "Acer Aspire", ALC883_FIXUP_ACER_EAPD),
2497 SND_PCI_QUIRK(0x1025, 0x0112, "Acer Aspire 9303", ALC883_FIXUP_ACER_EAPD),
2498 SND_PCI_QUIRK(0x1025, 0x0121, "Acer Aspire 5920G", ALC883_FIXUP_ACER_EAPD),
2499 SND_PCI_QUIRK(0x1025, 0x013e, "Acer Aspire 4930G",
2501 SND_PCI_QUIRK(0x1025, 0x013f, "Acer Aspire 5930G",
2503 SND_PCI_QUIRK(0x1025, 0x0145, "Acer Aspire 8930G",
2505 SND_PCI_QUIRK(0x1025, 0x0146, "Acer Aspire 6935G",
2507 SND_PCI_QUIRK(0x1025, 0x0142, "Acer Aspire 7730G",
2509 SND_PCI_QUIRK(0x1025, 0x0155, "Packard-Bell M5120", ALC882_FIXUP_PB_M5210),
2510 SND_PCI_QUIRK(0x1025, 0x015e, "Acer Aspire 6930G",
2512 SND_PCI_QUIRK(0x1025, 0x0166, "Acer Aspire 6530G",
2514 SND_PCI_QUIRK(0x1025, 0x021e, "Acer Aspire 5739G",
2516 SND_PCI_QUIRK(0x1025, 0x0259, "Acer Aspire 5935", ALC889_FIXUP_DAC_ROUTE),
2517 SND_PCI_QUIRK(0x1025, 0x026b, "Acer Aspire 8940G", ALC882_FIXUP_ACER_ASPIRE_8930G),
2518 SND_PCI_QUIRK(0x1025, 0x0296, "Acer Aspire 7736z", ALC882_FIXUP_ACER_ASPIRE_7736),
2519 SND_PCI_QUIRK(0x1043, 0x13c2, "Asus A7M", ALC882_FIXUP_EAPD),
2520 SND_PCI_QUIRK(0x1043, 0x1873, "ASUS W90V", ALC882_FIXUP_ASUS_W90V),
2521 SND_PCI_QUIRK(0x1043, 0x1971, "Asus W2JC", ALC882_FIXUP_ASUS_W2JC),
2522 SND_PCI_QUIRK(0x1043, 0x2390, "Asus D700SA", ALC887_FIXUP_ASUS_HMIC),
2523 SND_PCI_QUIRK(0x1043, 0x835f, "Asus Eee 1601", ALC888_FIXUP_EEE1601),
2524 SND_PCI_QUIRK(0x1043, 0x84bc, "ASUS ET2700", ALC887_FIXUP_ASUS_BASS),
2525 SND_PCI_QUIRK(0x1043, 0x8691, "ASUS ROG Ranger VIII", ALC882_FIXUP_GPIO3),
2526 SND_PCI_QUIRK(0x104d, 0x9043, "Sony Vaio VGC-LN51JGB", ALC882_FIXUP_NO_PRIMARY_HP),
2527 SND_PCI_QUIRK(0x104d, 0x9044, "Sony VAIO AiO", ALC882_FIXUP_NO_PRIMARY_HP),
2528 SND_PCI_QUIRK(0x104d, 0x9047, "Sony Vaio TT", ALC889_FIXUP_VAIO_TT),
2529 SND_PCI_QUIRK(0x104d, 0x905a, "Sony Vaio Z", ALC882_FIXUP_NO_PRIMARY_HP),
2530 SND_PCI_QUIRK(0x104d, 0x9060, "Sony Vaio VPCL14M1R", ALC882_FIXUP_NO_PRIMARY_HP),
2532 /* All Apple entries are in codec SSIDs */
2533 SND_PCI_QUIRK(0x106b, 0x00a0, "MacBookPro 3,1", ALC889_FIXUP_MBP_VREF),
2534 SND_PCI_QUIRK(0x106b, 0x00a1, "Macbook", ALC889_FIXUP_MBP_VREF),
2535 SND_PCI_QUIRK(0x106b, 0x00a4, "MacbookPro 4,1", ALC889_FIXUP_MBP_VREF),
2536 SND_PCI_QUIRK(0x106b, 0x0c00, "Mac Pro", ALC889_FIXUP_MP11_VREF),
2537 SND_PCI_QUIRK(0x106b, 0x1000, "iMac 24", ALC885_FIXUP_MACPRO_GPIO),
2538 SND_PCI_QUIRK(0x106b, 0x2800, "AppleTV", ALC885_FIXUP_MACPRO_GPIO),
2539 SND_PCI_QUIRK(0x106b, 0x2c00, "MacbookPro rev3", ALC889_FIXUP_MBP_VREF),
2540 SND_PCI_QUIRK(0x106b, 0x3000, "iMac", ALC889_FIXUP_MBP_VREF),
2541 SND_PCI_QUIRK(0x106b, 0x3200, "iMac 7,1 Aluminum", ALC882_FIXUP_EAPD),
2542 SND_PCI_QUIRK(0x106b, 0x3400, "MacBookAir 1,1", ALC889_FIXUP_MBA11_VREF),
2543 SND_PCI_QUIRK(0x106b, 0x3500, "MacBookAir 2,1", ALC889_FIXUP_MBA21_VREF),
2544 SND_PCI_QUIRK(0x106b, 0x3600, "Macbook 3,1", ALC889_FIXUP_MBP_VREF),
2545 SND_PCI_QUIRK(0x106b, 0x3800, "MacbookPro 4,1", ALC889_FIXUP_MBP_VREF),
2546 SND_PCI_QUIRK(0x106b, 0x3e00, "iMac 24 Aluminum", ALC885_FIXUP_MACPRO_GPIO),
2547 SND_PCI_QUIRK(0x106b, 0x3f00, "Macbook 5,1", ALC889_FIXUP_IMAC91_VREF),
2548 SND_PCI_QUIRK(0x106b, 0x4000, "MacbookPro 5,1", ALC889_FIXUP_IMAC91_VREF),
2549 SND_PCI_QUIRK(0x106b, 0x4100, "Macmini 3,1", ALC889_FIXUP_IMAC91_VREF),
2550 SND_PCI_QUIRK(0x106b, 0x4200, "Mac Pro 4,1/5,1", ALC889_FIXUP_MP41_VREF),
2551 SND_PCI_QUIRK(0x106b, 0x4300, "iMac 9,1", ALC889_FIXUP_IMAC91_VREF),
2552 SND_PCI_QUIRK(0x106b, 0x4600, "MacbookPro 5,2", ALC889_FIXUP_IMAC91_VREF),
2553 SND_PCI_QUIRK(0x106b, 0x4900, "iMac 9,1 Aluminum", ALC889_FIXUP_IMAC91_VREF),
2554 SND_PCI_QUIRK(0x106b, 0x4a00, "Macbook 5,2", ALC889_FIXUP_MBA11_VREF),
2556 SND_PCI_QUIRK(0x1071, 0x8258, "Evesham Voyaeger", ALC882_FIXUP_EAPD),
2557 SND_PCI_QUIRK(0x13fe, 0x1009, "Advantech MIT-W101", ALC886_FIXUP_EAPD),
2558 SND_PCI_QUIRK(0x1458, 0xa002, "Gigabyte EP45-DS3/Z87X-UD3H", ALC889_FIXUP_FRONT_HP_NO_PRESENCE),
2559 SND_PCI_QUIRK(0x1458, 0xa0b8, "Gigabyte AZ370-Gaming", ALC1220_FIXUP_GB_DUAL_CODECS),
2560 SND_PCI_QUIRK(0x1458, 0xa0cd, "Gigabyte X570 Aorus Master", ALC1220_FIXUP_GB_X570),
2561 SND_PCI_QUIRK(0x1458, 0xa0ce, "Gigabyte X570 Aorus Xtreme", ALC1220_FIXUP_CLEVO_P950),
2562 SND_PCI_QUIRK(0x1462, 0x11f7, "MSI-GE63", ALC1220_FIXUP_CLEVO_P950),
2563 SND_PCI_QUIRK(0x1462, 0x1228, "MSI-GP63", ALC1220_FIXUP_CLEVO_P950),
2564 SND_PCI_QUIRK(0x1462, 0x1229, "MSI-GP73", ALC1220_FIXUP_CLEVO_P950),
2565 SND_PCI_QUIRK(0x1462, 0x1275, "MSI-GL63", ALC1220_FIXUP_CLEVO_P950),
2566 SND_PCI_QUIRK(0x1462, 0x1276, "MSI-GL73", ALC1220_FIXUP_CLEVO_P950),
2567 SND_PCI_QUIRK(0x1462, 0x1293, "MSI-GP65", ALC1220_FIXUP_CLEVO_P950),
2568 SND_PCI_QUIRK(0x1462, 0x7350, "MSI-7350", ALC889_FIXUP_CD),
2569 SND_PCI_QUIRK(0x1462, 0xcc34, "MSI Godlike X570", ALC1220_FIXUP_GB_DUAL_CODECS),
2570 SND_PCI_QUIRK(0x1462, 0xda57, "MSI Z270-Gaming", ALC1220_FIXUP_GB_DUAL_CODECS),
2571 SND_PCI_QUIRK_VENDOR(0x1462, "MSI", ALC882_FIXUP_GPIO3),
2572 SND_PCI_QUIRK(0x147b, 0x107a, "Abit AW9D-MAX", ALC882_FIXUP_ABIT_AW9D_MAX),
2573 SND_PCI_QUIRK(0x1558, 0x50d3, "Clevo PC50[ER][CDF]", ALC1220_FIXUP_CLEVO_PB51ED_PINS),
2574 SND_PCI_QUIRK(0x1558, 0x65d1, "Clevo PB51[ER][CDF]", ALC1220_FIXUP_CLEVO_PB51ED_PINS),
2575 SND_PCI_QUIRK(0x1558, 0x65d2, "Clevo PB51R[CDF]", ALC1220_FIXUP_CLEVO_PB51ED_PINS),
2576 SND_PCI_QUIRK(0x1558, 0x65e1, "Clevo PB51[ED][DF]", ALC1220_FIXUP_CLEVO_PB51ED_PINS),
2577 SND_PCI_QUIRK(0x1558, 0x65e5, "Clevo PC50D[PRS](?:-D|-G)?", ALC1220_FIXUP_CLEVO_PB51ED_PINS),
2578 SND_PCI_QUIRK(0x1558, 0x65f1, "Clevo PC50HS", ALC1220_FIXUP_CLEVO_PB51ED_PINS),
2579 SND_PCI_QUIRK(0x1558, 0x67d1, "Clevo PB71[ER][CDF]", ALC1220_FIXUP_CLEVO_PB51ED_PINS),
2580 SND_PCI_QUIRK(0x1558, 0x67e1, "Clevo PB71[DE][CDF]", ALC1220_FIXUP_CLEVO_PB51ED_PINS),
2581 SND_PCI_QUIRK(0x1558, 0x67e5, "Clevo PC70D[PRS](?:-D|-G)?", ALC1220_FIXUP_CLEVO_PB51ED_PINS),
2582 SND_PCI_QUIRK(0x1558, 0x67f1, "Clevo PC70H[PRS]", ALC1220_FIXUP_CLEVO_PB51ED_PINS),
2583 SND_PCI_QUIRK(0x1558, 0x70d1, "Clevo PC70[ER][CDF]", ALC1220_FIXUP_CLEVO_PB51ED_PINS),
2584 SND_PCI_QUIRK(0x1558, 0x7714, "Clevo X170SM", ALC1220_FIXUP_CLEVO_PB51ED_PINS),
2585 SND_PCI_QUIRK(0x1558, 0x7715, "Clevo X170KM-G", ALC1220_FIXUP_CLEVO_PB51ED),
2586 SND_PCI_QUIRK(0x1558, 0x9501, "Clevo P950HR", ALC1220_FIXUP_CLEVO_P950),
2587 SND_PCI_QUIRK(0x1558, 0x9506, "Clevo P955HQ", ALC1220_FIXUP_CLEVO_P950),
2588 SND_PCI_QUIRK(0x1558, 0x950a, "Clevo P955H[PR]", ALC1220_FIXUP_CLEVO_P950),
2589 SND_PCI_QUIRK(0x1558, 0x95e1, "Clevo P95xER", ALC1220_FIXUP_CLEVO_P950),
2590 SND_PCI_QUIRK(0x1558, 0x95e2, "Clevo P950ER", ALC1220_FIXUP_CLEVO_P950),
2591 SND_PCI_QUIRK(0x1558, 0x95e3, "Clevo P955[ER]T", ALC1220_FIXUP_CLEVO_P950),
2592 SND_PCI_QUIRK(0x1558, 0x95e4, "Clevo P955ER", ALC1220_FIXUP_CLEVO_P950),
2593 SND_PCI_QUIRK(0x1558, 0x95e5, "Clevo P955EE6", ALC1220_FIXUP_CLEVO_P950),
2594 SND_PCI_QUIRK(0x1558, 0x95e6, "Clevo P950R[CDF]", ALC1220_FIXUP_CLEVO_P950),
2595 SND_PCI_QUIRK(0x1558, 0x96e1, "Clevo P960[ER][CDFN]-K", ALC1220_FIXUP_CLEVO_P950),
2596 SND_PCI_QUIRK(0x1558, 0x97e1, "Clevo P970[ER][CDFN]", ALC1220_FIXUP_CLEVO_P950),
2597 SND_PCI_QUIRK(0x1558, 0x97e2, "Clevo P970RC-M", ALC1220_FIXUP_CLEVO_P950),
2598 SND_PCI_QUIRK_VENDOR(0x1558, "Clevo laptop", ALC882_FIXUP_EAPD),
2599 SND_PCI_QUIRK(0x161f, 0x2054, "Medion laptop", ALC883_FIXUP_EAPD),
2600 SND_PCI_QUIRK(0x17aa, 0x3a0d, "Lenovo Y530", ALC882_FIXUP_LENOVO_Y530),
2601 SND_PCI_QUIRK(0x8086, 0x0022, "DX58SO", ALC889_FIXUP_COEF),
2606 {.id = ALC882_FIXUP_ABIT_AW9D_MAX, .name = "abit-aw9d"},
2607 {.id = ALC882_FIXUP_LENOVO_Y530, .name = "lenovo-y530"},
2608 {.id = ALC882_FIXUP_ACER_ASPIRE_7736, .name = "acer-aspire-7736"},
2609 {.id = ALC882_FIXUP_ASUS_W90V, .name = "asus-w90v"},
2611 {.id = ALC889_FIXUP_FRONT_HP_NO_PRESENCE, .name = "no-front-hp"},
2612 {.id = ALC889_FIXUP_VAIO_TT, .name = "vaio-tt"},
2614 {.id = ALC882_FIXUP_EAPD, .name = "alc882-eapd"},
2615 {.id = ALC883_FIXUP_EAPD, .name = "alc883-eapd"},
2619 {.id = ALC889_FIXUP_COEF, .name = "alc889-coef"},
2620 {.id = ALC882_FIXUP_ASUS_W2JC, .name = "asus-w2jc"},
2621 {.id = ALC882_FIXUP_ACER_ASPIRE_4930G, .name = "acer-aspire-4930g"},
2622 {.id = ALC882_FIXUP_ACER_ASPIRE_8930G, .name = "acer-aspire-8930g"},
2623 {.id = ALC883_FIXUP_ACER_EAPD, .name = "acer-aspire"},
2624 {.id = ALC885_FIXUP_MACPRO_GPIO, .name = "macpro-gpio"},
2625 {.id = ALC889_FIXUP_DAC_ROUTE, .name = "dac-route"},
2626 {.id = ALC889_FIXUP_MBP_VREF, .name = "mbp-vref"},
2627 {.id = ALC889_FIXUP_IMAC91_VREF, .name = "imac91-vref"},
2628 {.id = ALC889_FIXUP_MBA11_VREF, .name = "mba11-vref"},
2629 {.id = ALC889_FIXUP_MBA21_VREF, .name = "mba21-vref"},
2630 {.id = ALC889_FIXUP_MP11_VREF, .name = "mp11-vref"},
2631 {.id = ALC889_FIXUP_MP41_VREF, .name = "mp41-vref"},
2632 {.id = ALC882_FIXUP_INV_DMIC, .name = "inv-dmic"},
2633 {.id = ALC882_FIXUP_NO_PRIMARY_HP, .name = "no-primary-hp"},
2634 {.id = ALC887_FIXUP_ASUS_BASS, .name = "asus-bass"},
2635 {.id = ALC1220_FIXUP_GB_DUAL_CODECS, .name = "dual-codecs"},
2636 {.id = ALC1220_FIXUP_CLEVO_P950, .name = "clevo-p950"},
2641 SND_HDA_PIN_QUIRK(0x10ec1220, 0x1043, "ASUS", ALC1220_FIXUP_CLEVO_P950,
2642 {0x14, 0x01014010},
2643 {0x15, 0x01011012},
2644 {0x16, 0x01016011},
2645 {0x18, 0x01a19040},
2646 {0x19, 0x02a19050},
2647 {0x1a, 0x0181304f},
2648 {0x1b, 0x0221401f},
2649 {0x1e, 0x01456130}),
2650 SND_HDA_PIN_QUIRK(0x10ec1220, 0x1462, "MS-7C35", ALC1220_FIXUP_CLEVO_P950,
2651 {0x14, 0x01015010},
2652 {0x15, 0x01011012},
2653 {0x16, 0x01011011},
2654 {0x18, 0x01a11040},
2655 {0x19, 0x02a19050},
2656 {0x1a, 0x0181104f},
2657 {0x1b, 0x0221401f},
2658 {0x1e, 0x01451130}),
2666 static int alc882_parse_auto_config(struct hda_codec *codec) in alc882_parse_auto_config() argument
2668 static const hda_nid_t alc882_ignore[] = { 0x1d, 0 }; in alc882_parse_auto_config()
2669 static const hda_nid_t alc882_ssids[] = { 0x15, 0x1b, 0x14, 0 }; in alc882_parse_auto_config()
2670 return alc_parse_auto_config(codec, alc882_ignore, alc882_ssids); in alc882_parse_auto_config()
2675 static int patch_alc882(struct hda_codec *codec) in patch_alc882() argument
2680 err = alc_alloc_spec(codec, 0x0b); in patch_alc882()
2681 if (err < 0) in patch_alc882()
2684 spec = codec->spec; in patch_alc882()
2686 switch (codec->core.vendor_id) { in patch_alc882()
2687 case 0x10ec0882: in patch_alc882()
2688 case 0x10ec0885: in patch_alc882()
2689 case 0x10ec0900: in patch_alc882()
2690 case 0x10ec0b00: in patch_alc882()
2691 case 0x10ec1220: in patch_alc882()
2695 alc_fix_pll_init(codec, 0x20, 0x0a, 10); in patch_alc882()
2699 alc_pre_init(codec); in patch_alc882()
2701 snd_hda_pick_fixup(codec, alc882_fixup_models, alc882_fixup_tbl, in patch_alc882()
2703 snd_hda_pick_pin_fixup(codec, alc882_pin_fixup_tbl, alc882_fixups, true); in patch_alc882()
2704 snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PRE_PROBE); in patch_alc882()
2706 alc_auto_parse_customize_define(codec); in patch_alc882()
2708 if (has_cdefine_beep(codec)) in patch_alc882()
2709 spec->gen.beep_nid = 0x01; in patch_alc882()
2712 err = alc882_parse_auto_config(codec); in patch_alc882()
2713 if (err < 0) in patch_alc882()
2716 if (!spec->gen.no_analog && spec->gen.beep_nid) { in patch_alc882()
2717 err = set_beep_amp(spec, 0x0b, 0x05, HDA_INPUT); in patch_alc882()
2718 if (err < 0) in patch_alc882()
2722 snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PROBE); in patch_alc882()
2724 return 0; in patch_alc882()
2727 alc_free(codec); in patch_alc882()
2735 static int alc262_parse_auto_config(struct hda_codec *codec) in alc262_parse_auto_config() argument
2737 static const hda_nid_t alc262_ignore[] = { 0x1d, 0 }; in alc262_parse_auto_config()
2738 static const hda_nid_t alc262_ssids[] = { 0x15, 0x1b, 0x14, 0 }; in alc262_parse_auto_config()
2739 return alc_parse_auto_config(codec, alc262_ignore, alc262_ssids); in alc262_parse_auto_config()
2761 { 0x14, 0x99130110 }, /* speaker */
2762 { 0x15, 0x0221142f }, /* front HP */
2763 { 0x1b, 0x0121141f }, /* rear HP */
2770 { 0x15, 0x90170110 }, /* speaker */
2779 { 0x16, 0x99130120 }, /* internal speaker */
2786 { 0x14, 0x1993e1f0 }, /* int AUX */
2793 { 0x19, PIN_VREF50 },
2802 { 0x20, AC_VERB_SET_COEF_INDEX, 0x07 },
2803 { 0x20, AC_VERB_SET_PROC_COEF, 0x3070 },
2810 { 0x20, AC_VERB_SET_COEF_INDEX, 0x07 },
2811 { 0x20, AC_VERB_SET_PROC_COEF, 0x3050 },
2826 SND_PCI_QUIRK(0x103c, 0x170b, "HP Z200", ALC262_FIXUP_HP_Z200),
2827 SND_PCI_QUIRK(0x10cf, 0x1397, "Fujitsu Lifebook S7110", ALC262_FIXUP_FSC_S7110),
2828 SND_PCI_QUIRK(0x10cf, 0x142d, "Fujitsu Lifebook E8410", ALC262_FIXUP_BENQ),
2829 SND_PCI_QUIRK(0x10f1, 0x2915, "Tyan Thunder n6650W", ALC262_FIXUP_TYAN),
2830 SND_PCI_QUIRK(0x1734, 0x1141, "FSC ESPRIMO U9210", ALC262_FIXUP_FSC_H270),
2831 SND_PCI_QUIRK(0x1734, 0x1147, "FSC Celsius H270", ALC262_FIXUP_FSC_H270),
2832 SND_PCI_QUIRK(0x17aa, 0x384e, "Lenovo 3000", ALC262_FIXUP_LENOVO_3000),
2833 SND_PCI_QUIRK(0x17ff, 0x0560, "Benq ED8", ALC262_FIXUP_BENQ),
2834 SND_PCI_QUIRK(0x17ff, 0x058d, "Benq T31-16", ALC262_FIXUP_BENQ_T31),
2835 SND_PCI_QUIRK(0x8086, 0x7270, "BayleyBay", ALC262_FIXUP_INTEL_BAYLEYBAY),
2840 {.id = ALC262_FIXUP_INV_DMIC, .name = "inv-dmic"},
2841 {.id = ALC262_FIXUP_FSC_H270, .name = "fsc-h270"},
2842 {.id = ALC262_FIXUP_FSC_S7110, .name = "fsc-s7110"},
2843 {.id = ALC262_FIXUP_HP_Z200, .name = "hp-z200"},
2845 {.id = ALC262_FIXUP_LENOVO_3000, .name = "lenovo-3000"},
2847 {.id = ALC262_FIXUP_BENQ_T31, .name = "benq-t31"},
2854 static int patch_alc262(struct hda_codec *codec) in patch_alc262() argument
2859 err = alc_alloc_spec(codec, 0x0b); in patch_alc262()
2860 if (err < 0) in patch_alc262()
2863 spec = codec->spec; in patch_alc262()
2864 spec->gen.shared_mic_vref_pin = 0x18; in patch_alc262()
2866 spec->shutup = alc_eapd_shutup; in patch_alc262()
2868 #if 0 in patch_alc262()
2870 * under-run in patch_alc262()
2872 alc_update_coefex_idx(codec, 0x1a, 7, 0, 0x80); in patch_alc262()
2874 alc_fix_pll_init(codec, 0x20, 0x0a, 10); in patch_alc262()
2876 alc_pre_init(codec); in patch_alc262()
2878 snd_hda_pick_fixup(codec, alc262_fixup_models, alc262_fixup_tbl, in patch_alc262()
2880 snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PRE_PROBE); in patch_alc262()
2882 alc_auto_parse_customize_define(codec); in patch_alc262()
2884 if (has_cdefine_beep(codec)) in patch_alc262()
2885 spec->gen.beep_nid = 0x01; in patch_alc262()
2888 err = alc262_parse_auto_config(codec); in patch_alc262()
2889 if (err < 0) in patch_alc262()
2892 if (!spec->gen.no_analog && spec->gen.beep_nid) { in patch_alc262()
2893 err = set_beep_amp(spec, 0x0b, 0x05, HDA_INPUT); in patch_alc262()
2894 if (err < 0) in patch_alc262()
2898 snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PROBE); in patch_alc262()
2900 return 0; in patch_alc262()
2903 alc_free(codec); in patch_alc262()
2910 /* bind Beep switches of both NID 0x0f and 0x10 */
2914 struct hda_codec *codec = snd_kcontrol_chip(kcontrol); in alc268_beep_switch_put() local
2918 mutex_lock(&codec->control_mutex); in alc268_beep_switch_put()
2919 pval = kcontrol->private_value; in alc268_beep_switch_put()
2920 kcontrol->private_value = (pval & ~0xff) | 0x0f; in alc268_beep_switch_put()
2922 if (err >= 0) { in alc268_beep_switch_put()
2923 kcontrol->private_value = (pval & ~0xff) | 0x10; in alc268_beep_switch_put()
2926 kcontrol->private_value = pval; in alc268_beep_switch_put()
2927 mutex_unlock(&codec->control_mutex); in alc268_beep_switch_put()
2932 HDA_CODEC_VOLUME("Beep Playback Volume", 0x1d, 0x0, HDA_INPUT),
2940 .private_value = HDA_COMPOSE_AMP_VAL(0x0f, 3, 1, HDA_INPUT)
2944 /* set PCBEEP vol = 0, mute connections */
2946 {0x1d, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
2947 {0x0f, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(1)},
2948 {0x10, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(1)},
2966 {0x15, AC_VERB_SET_EAPD_BTLENABLE, 0},
2973 { 0x1e, 0x014b1180 }, /* enable SPDIF out */
2980 {.id = ALC268_FIXUP_INV_DMIC, .name = "inv-dmic"},
2981 {.id = ALC268_FIXUP_HP_EAPD, .name = "hp-eapd"},
2987 SND_PCI_QUIRK(0x1025, 0x0139, "Acer TravelMate 6293", ALC268_FIXUP_SPDIF),
2988 SND_PCI_QUIRK(0x1025, 0x015b, "Acer AOA 150 (ZG5)", ALC268_FIXUP_INV_DMIC),
2989 /* below is codec SSID since multiple Toshiba laptops have the
2992 SND_PCI_QUIRK(0x1179, 0xff06, "Toshiba P200", ALC268_FIXUP_HP_EAPD),
2999 static int alc268_parse_auto_config(struct hda_codec *codec) in alc268_parse_auto_config() argument
3001 static const hda_nid_t alc268_ssids[] = { 0x15, 0x1b, 0x14, 0 }; in alc268_parse_auto_config()
3002 return alc_parse_auto_config(codec, NULL, alc268_ssids); in alc268_parse_auto_config()
3007 static int patch_alc268(struct hda_codec *codec) in patch_alc268() argument
3012 /* ALC268 has no aa-loopback mixer */ in patch_alc268()
3013 err = alc_alloc_spec(codec, 0); in patch_alc268()
3014 if (err < 0) in patch_alc268()
3017 spec = codec->spec; in patch_alc268()
3018 if (has_cdefine_beep(codec)) in patch_alc268()
3019 spec->gen.beep_nid = 0x01; in patch_alc268()
3021 spec->shutup = alc_eapd_shutup; in patch_alc268()
3023 alc_pre_init(codec); in patch_alc268()
3025 snd_hda_pick_fixup(codec, alc268_fixup_models, alc268_fixup_tbl, alc268_fixups); in patch_alc268()
3026 snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PRE_PROBE); in patch_alc268()
3029 err = alc268_parse_auto_config(codec); in patch_alc268()
3030 if (err < 0) in patch_alc268()
3033 if (err > 0 && !spec->gen.no_analog && in patch_alc268()
3034 spec->gen.autocfg.speaker_pins[0] != 0x1d) { in patch_alc268()
3035 for (i = 0; i < ARRAY_SIZE(alc268_beep_mixer); i++) { in patch_alc268()
3036 if (!snd_hda_gen_add_kctl(&spec->gen, NULL, in patch_alc268()
3038 err = -ENOMEM; in patch_alc268()
3042 snd_hda_add_verbs(codec, alc268_beep_init_verbs); in patch_alc268()
3043 if (!query_amp_caps(codec, 0x1d, HDA_INPUT)) in patch_alc268()
3045 snd_hda_override_amp_caps(codec, 0x1d, HDA_INPUT, in patch_alc268()
3046 (0x0c << AC_AMPCAP_OFFSET_SHIFT) | in patch_alc268()
3047 (0x0c << AC_AMPCAP_NUM_STEPS_SHIFT) | in patch_alc268()
3048 (0x07 << AC_AMPCAP_STEP_SIZE_SHIFT) | in patch_alc268()
3049 (0 << AC_AMPCAP_MUTE_SHIFT)); in patch_alc268()
3052 snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PROBE); in patch_alc268()
3054 return 0; in patch_alc268()
3057 alc_free(codec); in patch_alc268()
3073 /* different alc269-variants */
3100 static int alc269_parse_auto_config(struct hda_codec *codec) in alc269_parse_auto_config() argument
3102 static const hda_nid_t alc269_ignore[] = { 0x1d, 0 }; in alc269_parse_auto_config()
3103 static const hda_nid_t alc269_ssids[] = { 0, 0x1b, 0x14, 0x21 }; in alc269_parse_auto_config()
3104 static const hda_nid_t alc269va_ssids[] = { 0x15, 0x1b, 0x14, 0 }; in alc269_parse_auto_config()
3105 struct alc_spec *spec = codec->spec; in alc269_parse_auto_config()
3108 switch (spec->codec_variant) { in alc269_parse_auto_config()
3138 return alc_parse_auto_config(codec, alc269_ignore, ssids); in alc269_parse_auto_config()
3149 static void alc_headset_btn_callback(struct hda_codec *codec, in alc_headset_btn_callback() argument
3152 int report = 0; in alc_headset_btn_callback()
3154 if (jack->unsol_res & (7 << 13)) in alc_headset_btn_callback()
3157 if (jack->unsol_res & (1 << 16 | 3 << 8)) in alc_headset_btn_callback()
3161 if (jack->unsol_res & (7 << 23)) in alc_headset_btn_callback()
3165 if (jack->unsol_res & (7 << 10)) in alc_headset_btn_callback()
3168 jack->jack->button_state = report; in alc_headset_btn_callback()
3171 static void alc_disable_headset_jack_key(struct hda_codec *codec) in alc_disable_headset_jack_key() argument
3173 struct alc_spec *spec = codec->spec; in alc_disable_headset_jack_key()
3175 if (!spec->has_hs_key) in alc_disable_headset_jack_key()
3178 switch (codec->core.vendor_id) { in alc_disable_headset_jack_key()
3179 case 0x10ec0215: in alc_disable_headset_jack_key()
3180 case 0x10ec0225: in alc_disable_headset_jack_key()
3181 case 0x10ec0285: in alc_disable_headset_jack_key()
3182 case 0x10ec0287: in alc_disable_headset_jack_key()
3183 case 0x10ec0295: in alc_disable_headset_jack_key()
3184 case 0x10ec0289: in alc_disable_headset_jack_key()
3185 case 0x10ec0299: in alc_disable_headset_jack_key()
3186 alc_write_coef_idx(codec, 0x48, 0x0); in alc_disable_headset_jack_key()
3187 alc_update_coef_idx(codec, 0x49, 0x0045, 0x0); in alc_disable_headset_jack_key()
3188 alc_update_coef_idx(codec, 0x44, 0x0045 << 8, 0x0); in alc_disable_headset_jack_key()
3190 case 0x10ec0230: in alc_disable_headset_jack_key()
3191 case 0x10ec0236: in alc_disable_headset_jack_key()
3192 case 0x10ec0256: in alc_disable_headset_jack_key()
3193 alc_write_coef_idx(codec, 0x48, 0x0); in alc_disable_headset_jack_key()
3194 alc_update_coef_idx(codec, 0x49, 0x0045, 0x0); in alc_disable_headset_jack_key()
3199 static void alc_enable_headset_jack_key(struct hda_codec *codec) in alc_enable_headset_jack_key() argument
3201 struct alc_spec *spec = codec->spec; in alc_enable_headset_jack_key()
3203 if (!spec->has_hs_key) in alc_enable_headset_jack_key()
3206 switch (codec->core.vendor_id) { in alc_enable_headset_jack_key()
3207 case 0x10ec0215: in alc_enable_headset_jack_key()
3208 case 0x10ec0225: in alc_enable_headset_jack_key()
3209 case 0x10ec0285: in alc_enable_headset_jack_key()
3210 case 0x10ec0287: in alc_enable_headset_jack_key()
3211 case 0x10ec0295: in alc_enable_headset_jack_key()
3212 case 0x10ec0289: in alc_enable_headset_jack_key()
3213 case 0x10ec0299: in alc_enable_headset_jack_key()
3214 alc_write_coef_idx(codec, 0x48, 0xd011); in alc_enable_headset_jack_key()
3215 alc_update_coef_idx(codec, 0x49, 0x007f, 0x0045); in alc_enable_headset_jack_key()
3216 alc_update_coef_idx(codec, 0x44, 0x007f << 8, 0x0045 << 8); in alc_enable_headset_jack_key()
3218 case 0x10ec0230: in alc_enable_headset_jack_key()
3219 case 0x10ec0236: in alc_enable_headset_jack_key()
3220 case 0x10ec0256: in alc_enable_headset_jack_key()
3221 alc_write_coef_idx(codec, 0x48, 0xd011); in alc_enable_headset_jack_key()
3222 alc_update_coef_idx(codec, 0x49, 0x007f, 0x0045); in alc_enable_headset_jack_key()
3227 static void alc_fixup_headset_jack(struct hda_codec *codec, in alc_fixup_headset_jack() argument
3230 struct alc_spec *spec = codec->spec; in alc_fixup_headset_jack()
3234 spec->has_hs_key = 1; in alc_fixup_headset_jack()
3235 snd_hda_jack_detect_enable_callback(codec, 0x55, in alc_fixup_headset_jack()
3237 snd_hda_jack_add_kctl(codec, 0x55, "Headset Jack", false, in alc_fixup_headset_jack()
3241 alc_enable_headset_jack_key(codec); in alc_fixup_headset_jack()
3246 static void alc269vb_toggle_power_output(struct hda_codec *codec, int power_up) in alc269vb_toggle_power_output() argument
3248 alc_update_coef_idx(codec, 0x04, 1 << 11, power_up ? (1 << 11) : 0); in alc269vb_toggle_power_output()
3251 static void alc269_shutup(struct hda_codec *codec) in alc269_shutup() argument
3253 struct alc_spec *spec = codec->spec; in alc269_shutup()
3255 if (spec->codec_variant == ALC269_TYPE_ALC269VB) in alc269_shutup()
3256 alc269vb_toggle_power_output(codec, 0); in alc269_shutup()
3257 if (spec->codec_variant == ALC269_TYPE_ALC269VB && in alc269_shutup()
3258 (alc_get_coef0(codec) & 0x00ff) == 0x018) { in alc269_shutup()
3261 alc_shutup_pins(codec); in alc269_shutup()
3265 WRITE_COEF(0x03, 0x0002), /* Power Down Control */
3266 UPDATE_COEF(0x05, 0xff3f, 0x0700), /* FIFO and filter clock */
3267 WRITE_COEF(0x07, 0x0200), /* DMIC control */
3268 UPDATE_COEF(0x06, 0x00f0, 0), /* Analog clock */
3269 UPDATE_COEF(0x08, 0xfffc, 0x0c2c), /* JD */
3270 WRITE_COEF(0x0a, 0xcccc), /* JD offset1 */
3271 WRITE_COEF(0x0b, 0xcccc), /* JD offset2 */
3272 WRITE_COEF(0x0e, 0x6e00), /* LDO1/2/3, DAC/ADC */
3273 UPDATE_COEF(0x0f, 0xf800, 0x1000), /* JD */
3274 UPDATE_COEF(0x10, 0xfc00, 0x0c00), /* Capless */
3275 WRITE_COEF(0x6f, 0x0), /* Class D test 4 */
3276 UPDATE_COEF(0x0c, 0xfe00, 0), /* IO power down directly */
3277 WRITE_COEF(0x34, 0xa0c0), /* ANC */
3278 UPDATE_COEF(0x16, 0x0008, 0), /* AGC MUX */
3279 UPDATE_COEF(0x1d, 0x00e0, 0), /* DAC simple content protection */
3280 UPDATE_COEF(0x1f, 0x00e0, 0), /* ADC simple content protection */
3281 WRITE_COEF(0x21, 0x8804), /* DAC ADC Zero Detection */
3282 WRITE_COEF(0x63, 0x2902), /* PLL */
3283 WRITE_COEF(0x68, 0xa080), /* capless control 2 */
3284 WRITE_COEF(0x69, 0x3400), /* capless control 3 */
3285 WRITE_COEF(0x6a, 0x2f3e), /* capless control 4 */
3286 WRITE_COEF(0x6b, 0x0), /* capless control 5 */
3287 UPDATE_COEF(0x6d, 0x0fff, 0x0900), /* class D test 2 */
3288 WRITE_COEF(0x6e, 0x110a), /* class D test 3 */
3289 UPDATE_COEF(0x70, 0x00f8, 0x00d8), /* class D test 5 */
3290 WRITE_COEF(0x71, 0x0014), /* class D test 6 */
3291 WRITE_COEF(0x72, 0xc2ba), /* classD OCP */
3292 UPDATE_COEF(0x77, 0x0f80, 0), /* classD pure DC test */
3293 WRITE_COEF(0x6c, 0xfc06), /* Class D amp control */
3297 static void alc282_restore_default_value(struct hda_codec *codec) in alc282_restore_default_value() argument
3299 alc_process_coef_fw(codec, alc282_coefs); in alc282_restore_default_value()
3302 static void alc282_init(struct hda_codec *codec) in alc282_init() argument
3304 struct alc_spec *spec = codec->spec; in alc282_init()
3309 alc282_restore_default_value(codec); in alc282_init()
3313 hp_pin_sense = snd_hda_jack_detect(codec, hp_pin); in alc282_init()
3314 coef78 = alc_read_coef_idx(codec, 0x78); in alc282_init()
3316 /* Index 0x78 Direct Drive HP AMP LPM Control 1 */ in alc282_init()
3318 alc_write_coef_idx(codec, 0x78, 0x9004); in alc282_init()
3323 snd_hda_codec_write(codec, hp_pin, 0, in alc282_init()
3329 snd_hda_codec_write(codec, hp_pin, 0, in alc282_init()
3336 alc_write_coef_idx(codec, 0x78, coef78); in alc282_init()
3339 static void alc282_shutup(struct hda_codec *codec) in alc282_shutup() argument
3341 struct alc_spec *spec = codec->spec; in alc282_shutup()
3347 alc269_shutup(codec); in alc282_shutup()
3351 hp_pin_sense = snd_hda_jack_detect(codec, hp_pin); in alc282_shutup()
3352 coef78 = alc_read_coef_idx(codec, 0x78); in alc282_shutup()
3353 alc_write_coef_idx(codec, 0x78, 0x9004); in alc282_shutup()
3358 snd_hda_codec_write(codec, hp_pin, 0, in alc282_shutup()
3364 if (!spec->no_shutup_pins) in alc282_shutup()
3365 snd_hda_codec_write(codec, hp_pin, 0, in alc282_shutup()
3366 AC_VERB_SET_PIN_WIDGET_CONTROL, 0x0); in alc282_shutup()
3371 alc_auto_setup_eapd(codec, false); in alc282_shutup()
3372 alc_shutup_pins(codec); in alc282_shutup()
3373 alc_write_coef_idx(codec, 0x78, coef78); in alc282_shutup()
3377 WRITE_COEF(0x03, 0x0002), /* Power Down Control */
3378 UPDATE_COEF(0x05, 0xff3f, 0x0700), /* FIFO and filter clock */
3379 WRITE_COEF(0x07, 0x0200), /* DMIC control */
3380 UPDATE_COEF(0x06, 0x00f0, 0), /* Analog clock */
3381 UPDATE_COEF(0x08, 0xfffc, 0x0c2c), /* JD */
3382 WRITE_COEF(0x0a, 0xcccc), /* JD offset1 */
3383 WRITE_COEF(0x0b, 0xcccc), /* JD offset2 */
3384 WRITE_COEF(0x0e, 0x6fc0), /* LDO1/2/3, DAC/ADC */
3385 UPDATE_COEF(0x0f, 0xf800, 0x1000), /* JD */
3386 UPDATE_COEF(0x10, 0xfc00, 0x0c00), /* Capless */
3387 WRITE_COEF(0x3a, 0x0), /* Class D test 4 */
3388 UPDATE_COEF(0x0c, 0xfe00, 0x0), /* IO power down directly */
3389 WRITE_COEF(0x22, 0xa0c0), /* ANC */
3390 UPDATE_COEFEX(0x53, 0x01, 0x000f, 0x0008), /* AGC MUX */
3391 UPDATE_COEF(0x1d, 0x00e0, 0), /* DAC simple content protection */
3392 UPDATE_COEF(0x1f, 0x00e0, 0), /* ADC simple content protection */
3393 WRITE_COEF(0x21, 0x8804), /* DAC ADC Zero Detection */
3394 WRITE_COEF(0x2e, 0x2902), /* PLL */
3395 WRITE_COEF(0x33, 0xa080), /* capless control 2 */
3396 WRITE_COEF(0x34, 0x3400), /* capless control 3 */
3397 WRITE_COEF(0x35, 0x2f3e), /* capless control 4 */
3398 WRITE_COEF(0x36, 0x0), /* capless control 5 */
3399 UPDATE_COEF(0x38, 0x0fff, 0x0900), /* class D test 2 */
3400 WRITE_COEF(0x39, 0x110a), /* class D test 3 */
3401 UPDATE_COEF(0x3b, 0x00f8, 0x00d8), /* class D test 5 */
3402 WRITE_COEF(0x3c, 0x0014), /* class D test 6 */
3403 WRITE_COEF(0x3d, 0xc2ba), /* classD OCP */
3404 UPDATE_COEF(0x42, 0x0f80, 0x0), /* classD pure DC test */
3405 WRITE_COEF(0x49, 0x0), /* test mode */
3406 UPDATE_COEF(0x40, 0xf800, 0x9800), /* Class D DC enable */
3407 UPDATE_COEF(0x42, 0xf000, 0x2000), /* DC offset */
3408 WRITE_COEF(0x37, 0xfc06), /* Class D amp control */
3409 UPDATE_COEF(0x1b, 0x8000, 0), /* HP JD control */
3413 static void alc283_restore_default_value(struct hda_codec *codec) in alc283_restore_default_value() argument
3415 alc_process_coef_fw(codec, alc283_coefs); in alc283_restore_default_value()
3418 static void alc283_init(struct hda_codec *codec) in alc283_init() argument
3420 struct alc_spec *spec = codec->spec; in alc283_init()
3424 alc283_restore_default_value(codec); in alc283_init()
3430 hp_pin_sense = snd_hda_jack_detect(codec, hp_pin); in alc283_init()
3432 /* Index 0x43 Direct Drive HP AMP LPM Control 1 */ in alc283_init()
3434 alc_write_coef_idx(codec, 0x43, 0x9004); in alc283_init()
3436 snd_hda_codec_write(codec, hp_pin, 0, in alc283_init()
3442 snd_hda_codec_write(codec, hp_pin, 0, in alc283_init()
3447 /* Index 0x46 Combo jack auto switch control 2 */ in alc283_init()
3449 alc_update_coef_idx(codec, 0x46, 3 << 12, 0); in alc283_init()
3451 alc_write_coef_idx(codec, 0x43, 0x9614); in alc283_init()
3454 static void alc283_shutup(struct hda_codec *codec) in alc283_shutup() argument
3456 struct alc_spec *spec = codec->spec; in alc283_shutup()
3461 alc269_shutup(codec); in alc283_shutup()
3465 hp_pin_sense = snd_hda_jack_detect(codec, hp_pin); in alc283_shutup()
3467 alc_write_coef_idx(codec, 0x43, 0x9004); in alc283_shutup()
3470 alc_write_coef_idx(codec, 0x06, 0x2100); in alc283_shutup()
3472 snd_hda_codec_write(codec, hp_pin, 0, in alc283_shutup()
3478 if (!spec->no_shutup_pins) in alc283_shutup()
3479 snd_hda_codec_write(codec, hp_pin, 0, in alc283_shutup()
3480 AC_VERB_SET_PIN_WIDGET_CONTROL, 0x0); in alc283_shutup()
3482 alc_update_coef_idx(codec, 0x46, 0, 3 << 12); in alc283_shutup()
3486 alc_auto_setup_eapd(codec, false); in alc283_shutup()
3487 alc_shutup_pins(codec); in alc283_shutup()
3488 alc_write_coef_idx(codec, 0x43, 0x9614); in alc283_shutup()
3491 static void alc256_init(struct hda_codec *codec) in alc256_init() argument
3493 struct alc_spec *spec = codec->spec; in alc256_init()
3498 hp_pin = 0x21; in alc256_init()
3502 hp_pin_sense = snd_hda_jack_detect(codec, hp_pin); in alc256_init()
3507 alc_update_coefex_idx(codec, 0x57, 0x04, 0x0007, 0x1); /* Low power */ in alc256_init()
3508 if (spec->ultra_low_power) { in alc256_init()
3509 alc_update_coef_idx(codec, 0x03, 1<<1, 1<<1); in alc256_init()
3510 alc_update_coef_idx(codec, 0x08, 3<<2, 3<<2); in alc256_init()
3511 alc_update_coef_idx(codec, 0x08, 7<<4, 0); in alc256_init()
3512 alc_update_coef_idx(codec, 0x3b, 1<<15, 0); in alc256_init()
3513 alc_update_coef_idx(codec, 0x0e, 7<<6, 7<<6); in alc256_init()
3517 snd_hda_codec_write(codec, hp_pin, 0, in alc256_init()
3520 if (hp_pin_sense || spec->ultra_low_power) in alc256_init()
3523 snd_hda_codec_write(codec, hp_pin, 0, in alc256_init()
3526 if (hp_pin_sense || spec->ultra_low_power) in alc256_init()
3529 alc_update_coef_idx(codec, 0x46, 3 << 12, 0); in alc256_init()
3530 alc_update_coefex_idx(codec, 0x57, 0x04, 0x0007, 0x4); /* Hight power */ in alc256_init()
3531 alc_update_coefex_idx(codec, 0x53, 0x02, 0x8000, 1 << 15); /* Clear bit */ in alc256_init()
3532 alc_update_coefex_idx(codec, 0x53, 0x02, 0x8000, 0 << 15); in alc256_init()
3536 * Documentation/sound/hd-audio/realtek-pc-beep.rst for details of in alc256_init()
3539 alc_write_coef_idx(codec, 0x36, 0x5757); in alc256_init()
3542 static void alc256_shutup(struct hda_codec *codec) in alc256_shutup() argument
3544 struct alc_spec *spec = codec->spec; in alc256_shutup()
3549 hp_pin = 0x21; in alc256_shutup()
3551 hp_pin_sense = snd_hda_jack_detect(codec, hp_pin); in alc256_shutup()
3556 snd_hda_codec_write(codec, hp_pin, 0, in alc256_shutup()
3559 if (hp_pin_sense || spec->ultra_low_power) in alc256_shutup()
3563 /* NOTE: call this before clearing the pin, otherwise codec stalls */ in alc256_shutup()
3565 * when booting with headset plugged. So skip setting it for the codec alc257 in alc256_shutup()
3567 if (spec->codec_variant != ALC269_TYPE_ALC257 && in alc256_shutup()
3568 spec->codec_variant != ALC269_TYPE_ALC256) in alc256_shutup()
3569 alc_update_coef_idx(codec, 0x46, 0, 3 << 12); in alc256_shutup()
3571 if (!spec->no_shutup_pins) in alc256_shutup()
3572 snd_hda_codec_write(codec, hp_pin, 0, in alc256_shutup()
3573 AC_VERB_SET_PIN_WIDGET_CONTROL, 0x0); in alc256_shutup()
3575 if (hp_pin_sense || spec->ultra_low_power) in alc256_shutup()
3578 alc_auto_setup_eapd(codec, false); in alc256_shutup()
3579 alc_shutup_pins(codec); in alc256_shutup()
3580 if (spec->ultra_low_power) { in alc256_shutup()
3582 alc_update_coef_idx(codec, 0x03, 1<<1, 0); in alc256_shutup()
3583 alc_update_coef_idx(codec, 0x08, 7<<4, 7<<4); in alc256_shutup()
3584 alc_update_coef_idx(codec, 0x08, 3<<2, 0); in alc256_shutup()
3585 alc_update_coef_idx(codec, 0x3b, 1<<15, 1<<15); in alc256_shutup()
3586 alc_update_coef_idx(codec, 0x0e, 7<<6, 0); in alc256_shutup()
3591 static void alc225_init(struct hda_codec *codec) in alc225_init() argument
3593 struct alc_spec *spec = codec->spec; in alc225_init()
3598 hp_pin = 0x21; in alc225_init()
3601 hp1_pin_sense = snd_hda_jack_detect(codec, hp_pin); in alc225_init()
3602 hp2_pin_sense = snd_hda_jack_detect(codec, 0x16); in alc225_init()
3607 alc_update_coefex_idx(codec, 0x57, 0x04, 0x0007, 0x1); /* Low power */ in alc225_init()
3608 if (spec->ultra_low_power) { in alc225_init()
3609 alc_update_coef_idx(codec, 0x08, 0x0f << 2, 3<<2); in alc225_init()
3610 alc_update_coef_idx(codec, 0x0e, 7<<6, 7<<6); in alc225_init()
3611 alc_update_coef_idx(codec, 0x33, 1<<11, 0); in alc225_init()
3615 if (hp1_pin_sense || spec->ultra_low_power) in alc225_init()
3616 snd_hda_codec_write(codec, hp_pin, 0, in alc225_init()
3619 snd_hda_codec_write(codec, 0x16, 0, in alc225_init()
3622 if (hp1_pin_sense || hp2_pin_sense || spec->ultra_low_power) in alc225_init()
3625 if (hp1_pin_sense || spec->ultra_low_power) in alc225_init()
3626 snd_hda_codec_write(codec, hp_pin, 0, in alc225_init()
3629 snd_hda_codec_write(codec, 0x16, 0, in alc225_init()
3632 if (hp1_pin_sense || hp2_pin_sense || spec->ultra_low_power) in alc225_init()
3635 alc_update_coef_idx(codec, 0x4a, 3 << 10, 0); in alc225_init()
3636 alc_update_coefex_idx(codec, 0x57, 0x04, 0x0007, 0x4); /* Hight power */ in alc225_init()
3639 static void alc225_shutup(struct hda_codec *codec) in alc225_shutup() argument
3641 struct alc_spec *spec = codec->spec; in alc225_shutup()
3646 hp_pin = 0x21; in alc225_shutup()
3648 alc_disable_headset_jack_key(codec); in alc225_shutup()
3650 alc_update_coef_idx(codec, 0x4a, 0, 3 << 10); in alc225_shutup()
3652 hp1_pin_sense = snd_hda_jack_detect(codec, hp_pin); in alc225_shutup()
3653 hp2_pin_sense = snd_hda_jack_detect(codec, 0x16); in alc225_shutup()
3658 if (hp1_pin_sense || spec->ultra_low_power) in alc225_shutup()
3659 snd_hda_codec_write(codec, hp_pin, 0, in alc225_shutup()
3662 snd_hda_codec_write(codec, 0x16, 0, in alc225_shutup()
3665 if (hp1_pin_sense || hp2_pin_sense || spec->ultra_low_power) in alc225_shutup()
3668 if (hp1_pin_sense || spec->ultra_low_power) in alc225_shutup()
3669 snd_hda_codec_write(codec, hp_pin, 0, in alc225_shutup()
3670 AC_VERB_SET_PIN_WIDGET_CONTROL, 0x0); in alc225_shutup()
3672 snd_hda_codec_write(codec, 0x16, 0, in alc225_shutup()
3673 AC_VERB_SET_PIN_WIDGET_CONTROL, 0x0); in alc225_shutup()
3675 if (hp1_pin_sense || hp2_pin_sense || spec->ultra_low_power) in alc225_shutup()
3678 alc_auto_setup_eapd(codec, false); in alc225_shutup()
3679 alc_shutup_pins(codec); in alc225_shutup()
3680 if (spec->ultra_low_power) { in alc225_shutup()
3682 alc_update_coef_idx(codec, 0x08, 0x0f << 2, 0x0c << 2); in alc225_shutup()
3683 alc_update_coef_idx(codec, 0x0e, 7<<6, 0); in alc225_shutup()
3684 alc_update_coef_idx(codec, 0x33, 1<<11, 1<<11); in alc225_shutup()
3685 alc_update_coef_idx(codec, 0x4a, 3<<4, 2<<4); in alc225_shutup()
3689 alc_update_coef_idx(codec, 0x4a, 3 << 10, 0); in alc225_shutup()
3690 alc_enable_headset_jack_key(codec); in alc225_shutup()
3693 static void alc_default_init(struct hda_codec *codec) in alc_default_init() argument
3695 struct alc_spec *spec = codec->spec; in alc_default_init()
3704 hp_pin_sense = snd_hda_jack_detect(codec, hp_pin); in alc_default_init()
3709 snd_hda_codec_write(codec, hp_pin, 0, in alc_default_init()
3715 snd_hda_codec_write(codec, hp_pin, 0, in alc_default_init()
3722 static void alc_default_shutup(struct hda_codec *codec) in alc_default_shutup() argument
3724 struct alc_spec *spec = codec->spec; in alc_default_shutup()
3729 alc269_shutup(codec); in alc_default_shutup()
3733 hp_pin_sense = snd_hda_jack_detect(codec, hp_pin); in alc_default_shutup()
3738 snd_hda_codec_write(codec, hp_pin, 0, in alc_default_shutup()
3744 if (!spec->no_shutup_pins) in alc_default_shutup()
3745 snd_hda_codec_write(codec, hp_pin, 0, in alc_default_shutup()
3746 AC_VERB_SET_PIN_WIDGET_CONTROL, 0x0); in alc_default_shutup()
3751 alc_auto_setup_eapd(codec, false); in alc_default_shutup()
3752 alc_shutup_pins(codec); in alc_default_shutup()
3755 static void alc294_hp_init(struct hda_codec *codec) in alc294_hp_init() argument
3757 struct alc_spec *spec = codec->spec; in alc294_hp_init()
3764 snd_hda_codec_write(codec, hp_pin, 0, in alc294_hp_init()
3769 if (!spec->no_shutup_pins) in alc294_hp_init()
3770 snd_hda_codec_write(codec, hp_pin, 0, in alc294_hp_init()
3771 AC_VERB_SET_PIN_WIDGET_CONTROL, 0x0); in alc294_hp_init()
3773 alc_update_coef_idx(codec, 0x6f, 0x000f, 0);/* Set HP depop to manual mode */ in alc294_hp_init()
3774 alc_update_coefex_idx(codec, 0x58, 0x00, 0x8000, 0x8000); /* HP depop procedure start */ in alc294_hp_init()
3777 val = alc_read_coefex_idx(codec, 0x58, 0x01); in alc294_hp_init()
3778 for (i = 0; i < 20 && val & 0x0080; i++) { in alc294_hp_init()
3780 val = alc_read_coefex_idx(codec, 0x58, 0x01); in alc294_hp_init()
3783 alc_update_coef_idx(codec, 0x6f, 0x000f, 0x000b); in alc294_hp_init()
3787 static void alc294_init(struct hda_codec *codec) in alc294_init() argument
3789 struct alc_spec *spec = codec->spec; in alc294_init()
3792 if (!spec->done_hp_init || in alc294_init()
3793 codec->core.dev.power.power_state.event == PM_EVENT_RESTORE) { in alc294_init()
3794 alc294_hp_init(codec); in alc294_init()
3795 spec->done_hp_init = true; in alc294_init()
3797 alc_default_init(codec); in alc294_init()
3800 static void alc5505_coef_set(struct hda_codec *codec, unsigned int index_reg, in alc5505_coef_set() argument
3803 snd_hda_codec_write(codec, 0x51, 0, AC_VERB_SET_COEF_INDEX, index_reg >> 1); in alc5505_coef_set()
3804 snd_hda_codec_write(codec, 0x51, 0, AC_VERB_SET_PROC_COEF, val & 0xffff); /* LSB */ in alc5505_coef_set()
3805 snd_hda_codec_write(codec, 0x51, 0, AC_VERB_SET_PROC_COEF, val >> 16); /* MSB */ in alc5505_coef_set()
3808 static int alc5505_coef_get(struct hda_codec *codec, unsigned int index_reg) in alc5505_coef_get() argument
3812 snd_hda_codec_write(codec, 0x51, 0, AC_VERB_SET_COEF_INDEX, index_reg >> 1); in alc5505_coef_get()
3813 val = snd_hda_codec_read(codec, 0x51, 0, AC_VERB_GET_PROC_COEF, 0) in alc5505_coef_get()
3814 & 0xffff; in alc5505_coef_get()
3815 val |= snd_hda_codec_read(codec, 0x51, 0, AC_VERB_GET_PROC_COEF, 0) in alc5505_coef_get()
3820 static void alc5505_dsp_halt(struct hda_codec *codec) in alc5505_dsp_halt() argument
3824 alc5505_coef_set(codec, 0x3000, 0x000c); /* DSP CPU stop */ in alc5505_dsp_halt()
3825 alc5505_coef_set(codec, 0x880c, 0x0008); /* DDR enter self refresh */ in alc5505_dsp_halt()
3826 alc5505_coef_set(codec, 0x61c0, 0x11110080); /* Clock control for PLL and CPU */ in alc5505_dsp_halt()
3827 alc5505_coef_set(codec, 0x6230, 0xfc0d4011); /* Disable Input OP */ in alc5505_dsp_halt()
3828 alc5505_coef_set(codec, 0x61b4, 0x040a2b03); /* Stop PLL2 */ in alc5505_dsp_halt()
3829 alc5505_coef_set(codec, 0x61b0, 0x00005b17); /* Stop PLL1 */ in alc5505_dsp_halt()
3830 alc5505_coef_set(codec, 0x61b8, 0x04133303); /* Stop PLL3 */ in alc5505_dsp_halt()
3831 val = alc5505_coef_get(codec, 0x6220); in alc5505_dsp_halt()
3832 alc5505_coef_set(codec, 0x6220, (val | 0x3000)); /* switch Ringbuffer clock to DBUS clock */ in alc5505_dsp_halt()
3835 static void alc5505_dsp_back_from_halt(struct hda_codec *codec) in alc5505_dsp_back_from_halt() argument
3837 alc5505_coef_set(codec, 0x61b8, 0x04133302); in alc5505_dsp_back_from_halt()
3838 alc5505_coef_set(codec, 0x61b0, 0x00005b16); in alc5505_dsp_back_from_halt()
3839 alc5505_coef_set(codec, 0x61b4, 0x040a2b02); in alc5505_dsp_back_from_halt()
3840 alc5505_coef_set(codec, 0x6230, 0xf80d4011); in alc5505_dsp_back_from_halt()
3841 alc5505_coef_set(codec, 0x6220, 0x2002010f); in alc5505_dsp_back_from_halt()
3842 alc5505_coef_set(codec, 0x880c, 0x00000004); in alc5505_dsp_back_from_halt()
3845 static void alc5505_dsp_init(struct hda_codec *codec) in alc5505_dsp_init() argument
3849 alc5505_dsp_halt(codec); in alc5505_dsp_init()
3850 alc5505_dsp_back_from_halt(codec); in alc5505_dsp_init()
3851 alc5505_coef_set(codec, 0x61b0, 0x5b14); /* PLL1 control */ in alc5505_dsp_init()
3852 alc5505_coef_set(codec, 0x61b0, 0x5b16); in alc5505_dsp_init()
3853 alc5505_coef_set(codec, 0x61b4, 0x04132b00); /* PLL2 control */ in alc5505_dsp_init()
3854 alc5505_coef_set(codec, 0x61b4, 0x04132b02); in alc5505_dsp_init()
3855 alc5505_coef_set(codec, 0x61b8, 0x041f3300); /* PLL3 control*/ in alc5505_dsp_init()
3856 alc5505_coef_set(codec, 0x61b8, 0x041f3302); in alc5505_dsp_init()
3857 snd_hda_codec_write(codec, 0x51, 0, AC_VERB_SET_CODEC_RESET, 0); /* Function reset */ in alc5505_dsp_init()
3858 alc5505_coef_set(codec, 0x61b8, 0x041b3302); in alc5505_dsp_init()
3859 alc5505_coef_set(codec, 0x61b8, 0x04173302); in alc5505_dsp_init()
3860 alc5505_coef_set(codec, 0x61b8, 0x04163302); in alc5505_dsp_init()
3861 alc5505_coef_set(codec, 0x8800, 0x348b328b); /* DRAM control */ in alc5505_dsp_init()
3862 alc5505_coef_set(codec, 0x8808, 0x00020022); /* DRAM control */ in alc5505_dsp_init()
3863 alc5505_coef_set(codec, 0x8818, 0x00000400); /* DRAM control */ in alc5505_dsp_init()
3865 val = alc5505_coef_get(codec, 0x6200) >> 16; /* Read revision ID */ in alc5505_dsp_init()
3867 alc5505_coef_set(codec, 0x6220, 0x2002010f); /* I/O PAD Configuration */ in alc5505_dsp_init()
3869 alc5505_coef_set(codec, 0x6220, 0x6002018f); in alc5505_dsp_init()
3871 alc5505_coef_set(codec, 0x61ac, 0x055525f0); /**/ in alc5505_dsp_init()
3872 alc5505_coef_set(codec, 0x61c0, 0x12230080); /* Clock control */ in alc5505_dsp_init()
3873 alc5505_coef_set(codec, 0x61b4, 0x040e2b02); /* PLL2 control */ in alc5505_dsp_init()
3874 alc5505_coef_set(codec, 0x61bc, 0x010234f8); /* OSC Control */ in alc5505_dsp_init()
3875 alc5505_coef_set(codec, 0x880c, 0x00000004); /* DRAM Function control */ in alc5505_dsp_init()
3876 alc5505_coef_set(codec, 0x880c, 0x00000003); in alc5505_dsp_init()
3877 alc5505_coef_set(codec, 0x880c, 0x00000010); in alc5505_dsp_init()
3880 alc5505_dsp_halt(codec); in alc5505_dsp_init()
3885 #define alc5505_dsp_suspend(codec) do { } while (0) /* NOP */ argument
3886 #define alc5505_dsp_resume(codec) do { } while (0) /* NOP */ argument
3888 #define alc5505_dsp_suspend(codec) alc5505_dsp_halt(codec) argument
3889 #define alc5505_dsp_resume(codec) alc5505_dsp_back_from_halt(codec) argument
3893 static int alc269_suspend(struct hda_codec *codec) in alc269_suspend() argument
3895 struct alc_spec *spec = codec->spec; in alc269_suspend()
3897 if (spec->has_alc5505_dsp) in alc269_suspend()
3898 alc5505_dsp_suspend(codec); in alc269_suspend()
3899 return alc_suspend(codec); in alc269_suspend()
3902 static int alc269_resume(struct hda_codec *codec) in alc269_resume() argument
3904 struct alc_spec *spec = codec->spec; in alc269_resume()
3906 if (spec->codec_variant == ALC269_TYPE_ALC269VB) in alc269_resume()
3907 alc269vb_toggle_power_output(codec, 0); in alc269_resume()
3908 if (spec->codec_variant == ALC269_TYPE_ALC269VB && in alc269_resume()
3909 (alc_get_coef0(codec) & 0x00ff) == 0x018) { in alc269_resume()
3913 codec->patch_ops.init(codec); in alc269_resume()
3915 if (spec->codec_variant == ALC269_TYPE_ALC269VB) in alc269_resume()
3916 alc269vb_toggle_power_output(codec, 1); in alc269_resume()
3917 if (spec->codec_variant == ALC269_TYPE_ALC269VB && in alc269_resume()
3918 (alc_get_coef0(codec) & 0x00ff) == 0x017) { in alc269_resume()
3922 snd_hda_regmap_sync(codec); in alc269_resume()
3923 hda_call_check_power_status(codec, 0x01); in alc269_resume()
3925 /* on some machine, the BIOS will clear the codec gpio data when enter in alc269_resume()
3929 if (spec->gpio_data) in alc269_resume()
3930 alc_write_gpio_data(codec); in alc269_resume()
3932 if (spec->has_alc5505_dsp) in alc269_resume()
3933 alc5505_dsp_resume(codec); in alc269_resume()
3935 return 0; in alc269_resume()
3939 static void alc269_fixup_pincfg_no_hp_to_lineout(struct hda_codec *codec, in alc269_fixup_pincfg_no_hp_to_lineout() argument
3942 struct alc_spec *spec = codec->spec; in alc269_fixup_pincfg_no_hp_to_lineout()
3945 spec->parse_flags = HDA_PINCFG_NO_HP_FIXUP; in alc269_fixup_pincfg_no_hp_to_lineout()
3948 static void alc269_fixup_pincfg_U7x7_headset_mic(struct hda_codec *codec, in alc269_fixup_pincfg_U7x7_headset_mic() argument
3952 unsigned int cfg_headphone = snd_hda_codec_get_pincfg(codec, 0x21); in alc269_fixup_pincfg_U7x7_headset_mic()
3953 unsigned int cfg_headset_mic = snd_hda_codec_get_pincfg(codec, 0x19); in alc269_fixup_pincfg_U7x7_headset_mic()
3955 if (cfg_headphone && cfg_headset_mic == 0x411111f0) in alc269_fixup_pincfg_U7x7_headset_mic()
3956 snd_hda_codec_set_pincfg(codec, 0x19, in alc269_fixup_pincfg_U7x7_headset_mic()
3961 static void alc269_fixup_hweq(struct hda_codec *codec, in alc269_fixup_hweq() argument
3965 alc_update_coef_idx(codec, 0x1e, 0, 0x80); in alc269_fixup_hweq()
3968 static void alc269_fixup_headset_mic(struct hda_codec *codec, in alc269_fixup_headset_mic() argument
3971 struct alc_spec *spec = codec->spec; in alc269_fixup_headset_mic()
3974 spec->parse_flags |= HDA_PINCFG_HEADSET_MIC; in alc269_fixup_headset_mic()
3977 static void alc271_fixup_dmic(struct hda_codec *codec, in alc271_fixup_dmic() argument
3981 {0x20, AC_VERB_SET_COEF_INDEX, 0x0d}, in alc271_fixup_dmic()
3982 {0x20, AC_VERB_SET_PROC_COEF, 0x4000}, in alc271_fixup_dmic()
3987 if (strcmp(codec->core.chip_name, "ALC271X") && in alc271_fixup_dmic()
3988 strcmp(codec->core.chip_name, "ALC269VB")) in alc271_fixup_dmic()
3990 cfg = snd_hda_codec_get_pincfg(codec, 0x12); in alc271_fixup_dmic()
3992 snd_hda_sequence_write(codec, verbs); in alc271_fixup_dmic()
3996 static void alc269vb_fixup_aspire_e1_coef(struct hda_codec *codec, in alc269vb_fixup_aspire_e1_coef() argument
4001 alc_update_coef_idx(codec, 0x0d, 0x6000, 0x6000); in alc269vb_fixup_aspire_e1_coef()
4004 static void alc269_fixup_pcm_44k(struct hda_codec *codec, in alc269_fixup_pcm_44k() argument
4007 struct alc_spec *spec = codec->spec; in alc269_fixup_pcm_44k()
4015 spec->gen.stream_analog_playback = &alc269_44k_pcm_analog_playback; in alc269_fixup_pcm_44k()
4016 spec->gen.stream_analog_capture = &alc269_44k_pcm_analog_capture; in alc269_fixup_pcm_44k()
4019 static void alc269_fixup_stereo_dmic(struct hda_codec *codec, in alc269_fixup_stereo_dmic() argument
4022 /* The digital-mic unit sends PDM (differential signal) instead of in alc269_fixup_stereo_dmic()
4028 alc_update_coef_idx(codec, 0x07, 0, 0x80); in alc269_fixup_stereo_dmic()
4031 static void alc269_quanta_automute(struct hda_codec *codec) in alc269_quanta_automute() argument
4033 snd_hda_gen_update_outputs(codec); in alc269_quanta_automute()
4035 alc_write_coef_idx(codec, 0x0c, 0x680); in alc269_quanta_automute()
4036 alc_write_coef_idx(codec, 0x0c, 0x480); in alc269_quanta_automute()
4039 static void alc269_fixup_quanta_mute(struct hda_codec *codec, in alc269_fixup_quanta_mute() argument
4042 struct alc_spec *spec = codec->spec; in alc269_fixup_quanta_mute()
4045 spec->gen.automute_hook = alc269_quanta_automute; in alc269_fixup_quanta_mute()
4048 static void alc269_x101_hp_automute_hook(struct hda_codec *codec, in alc269_x101_hp_automute_hook() argument
4051 struct alc_spec *spec = codec->spec; in alc269_x101_hp_automute_hook()
4054 snd_hda_gen_hp_automute(codec, jack); in alc269_x101_hp_automute_hook()
4056 vref = spec->gen.hp_jack_present ? PIN_VREF80 : 0; in alc269_x101_hp_automute_hook()
4058 snd_hda_codec_write(codec, 0x18, 0, AC_VERB_SET_PIN_WIDGET_CONTROL, in alc269_x101_hp_automute_hook()
4061 snd_hda_codec_write(codec, 0x18, 0, AC_VERB_SET_PIN_WIDGET_CONTROL, in alc269_x101_hp_automute_hook()
4073 static void alc298_huawei_mbx_stereo_seq(struct hda_codec *codec, in alc298_huawei_mbx_stereo_seq() argument
4077 snd_hda_codec_write(codec, 0x06, 0, AC_VERB_SET_DIGI_CONVERT_3, 0x0); in alc298_huawei_mbx_stereo_seq()
4078 alc_write_coef_idx(codec, 0x26, 0xb000); in alc298_huawei_mbx_stereo_seq()
4081 snd_hda_codec_write(codec, 0x21, 0, AC_VERB_GET_PIN_SENSE, 0x0); in alc298_huawei_mbx_stereo_seq()
4083 snd_hda_codec_write(codec, 0x6, 0, AC_VERB_SET_DIGI_CONVERT_3, 0x80); in alc298_huawei_mbx_stereo_seq()
4084 alc_write_coef_idx(codec, 0x26, 0xf000); in alc298_huawei_mbx_stereo_seq()
4085 alc_write_coef_idx(codec, 0x23, initval->value_0x23); in alc298_huawei_mbx_stereo_seq()
4087 if (initval->value_0x23 != 0x1e) in alc298_huawei_mbx_stereo_seq()
4088 alc_write_coef_idx(codec, 0x25, initval->value_0x25); in alc298_huawei_mbx_stereo_seq()
4090 snd_hda_codec_write(codec, 0x20, 0, AC_VERB_SET_COEF_INDEX, 0x26); in alc298_huawei_mbx_stereo_seq()
4091 snd_hda_codec_write(codec, 0x20, 0, AC_VERB_SET_PROC_COEF, 0xb010); in alc298_huawei_mbx_stereo_seq()
4094 static void alc298_fixup_huawei_mbx_stereo(struct hda_codec *codec, in alc298_fixup_huawei_mbx_stereo() argument
4100 {0x0c, 0x00}, {0x0d, 0x00}, {0x0e, 0x00}, {0x0f, 0x00}, in alc298_fixup_huawei_mbx_stereo()
4101 {0x10, 0x00}, {0x1a, 0x40}, {0x1b, 0x82}, {0x1c, 0x00}, in alc298_fixup_huawei_mbx_stereo()
4102 {0x1d, 0x00}, {0x1e, 0x00}, {0x1f, 0x00}, in alc298_fixup_huawei_mbx_stereo()
4103 {0x20, 0xc2}, {0x21, 0xc8}, {0x22, 0x26}, {0x23, 0x24}, in alc298_fixup_huawei_mbx_stereo()
4104 {0x27, 0xff}, {0x28, 0xff}, {0x29, 0xff}, {0x2a, 0x8f}, in alc298_fixup_huawei_mbx_stereo()
4105 {0x2b, 0x02}, {0x2c, 0x48}, {0x2d, 0x34}, {0x2e, 0x00}, in alc298_fixup_huawei_mbx_stereo()
4106 {0x2f, 0x00}, in alc298_fixup_huawei_mbx_stereo()
4107 {0x30, 0x00}, {0x31, 0x00}, {0x32, 0x00}, {0x33, 0x00}, in alc298_fixup_huawei_mbx_stereo()
4108 {0x34, 0x00}, {0x35, 0x01}, {0x36, 0x93}, {0x37, 0x0c}, in alc298_fixup_huawei_mbx_stereo()
4109 {0x38, 0x00}, {0x39, 0x00}, {0x3a, 0xf8}, {0x38, 0x80}, in alc298_fixup_huawei_mbx_stereo()
4118 snd_hda_codec_write(codec, 0x06, 0, AC_VERB_SET_DIGI_CONVERT_3, 0x00); in alc298_fixup_huawei_mbx_stereo()
4119 snd_hda_codec_write(codec, 0x06, 0, AC_VERB_SET_DIGI_CONVERT_3, 0x80); in alc298_fixup_huawei_mbx_stereo()
4120 alc_write_coef_idx(codec, 0x26, 0xf000); in alc298_fixup_huawei_mbx_stereo()
4121 alc_write_coef_idx(codec, 0x22, 0x31); in alc298_fixup_huawei_mbx_stereo()
4122 alc_write_coef_idx(codec, 0x23, 0x0b); in alc298_fixup_huawei_mbx_stereo()
4123 alc_write_coef_idx(codec, 0x25, 0x00); in alc298_fixup_huawei_mbx_stereo()
4124 snd_hda_codec_write(codec, 0x20, 0, AC_VERB_SET_COEF_INDEX, 0x26); in alc298_fixup_huawei_mbx_stereo()
4125 snd_hda_codec_write(codec, 0x20, 0, AC_VERB_SET_PROC_COEF, 0xb010); in alc298_fixup_huawei_mbx_stereo()
4127 for (seq = dac_init; seq->value_0x23; seq++) in alc298_fixup_huawei_mbx_stereo()
4128 alc298_huawei_mbx_stereo_seq(codec, seq, seq == dac_init); in alc298_fixup_huawei_mbx_stereo()
4131 static void alc269_fixup_x101_headset_mic(struct hda_codec *codec, in alc269_fixup_x101_headset_mic() argument
4134 struct alc_spec *spec = codec->spec; in alc269_fixup_x101_headset_mic()
4136 spec->parse_flags |= HDA_PINCFG_HEADSET_MIC; in alc269_fixup_x101_headset_mic()
4137 spec->gen.hp_automute_hook = alc269_x101_hp_automute_hook; in alc269_fixup_x101_headset_mic()
4141 static void alc_update_vref_led(struct hda_codec *codec, hda_nid_t pin, in alc_update_vref_led() argument
4150 pinval = snd_hda_codec_get_pin_target(codec, pin); in alc_update_vref_led()
4154 snd_hda_power_up_pm(codec); in alc_update_vref_led()
4155 snd_hda_set_pin_ctl_cache(codec, pin, pinval); in alc_update_vref_led()
4156 snd_hda_power_down_pm(codec); in alc_update_vref_led()
4159 /* update mute-LED according to the speaker mute state via mic VREF pin */
4163 struct hda_codec *codec = dev_to_hda_codec(led_cdev->dev->parent); in vref_mute_led_set() local
4164 struct alc_spec *spec = codec->spec; in vref_mute_led_set()
4166 alc_update_vref_led(codec, spec->mute_led_nid, in vref_mute_led_set()
4167 spec->mute_led_polarity, brightness); in vref_mute_led_set()
4168 return 0; in vref_mute_led_set()
4172 static unsigned int led_power_filter(struct hda_codec *codec, in led_power_filter() argument
4176 struct alc_spec *spec = codec->spec; in led_power_filter()
4178 if (power_state != AC_PWRST_D3 || nid == 0 || in led_power_filter()
4179 (nid != spec->mute_led_nid && nid != spec->cap_mute_led_nid)) in led_power_filter()
4182 /* Set pin ctl again, it might have just been set to 0 */ in led_power_filter()
4183 snd_hda_set_pin_ctl(codec, nid, in led_power_filter()
4184 snd_hda_codec_get_pin_target(codec, nid)); in led_power_filter()
4186 return snd_hda_gen_path_power_filter(codec, nid, power_state); in led_power_filter()
4189 static void alc269_fixup_hp_mute_led(struct hda_codec *codec, in alc269_fixup_hp_mute_led() argument
4192 struct alc_spec *spec = codec->spec; in alc269_fixup_hp_mute_led()
4200 if (sscanf(dev->name, "HP_Mute_LED_%d_%x", &pol, &pin) != 2) in alc269_fixup_hp_mute_led()
4202 if (pin < 0x0a || pin >= 0x10) in alc269_fixup_hp_mute_led()
4204 spec->mute_led_polarity = pol; in alc269_fixup_hp_mute_led()
4205 spec->mute_led_nid = pin - 0x0a + 0x18; in alc269_fixup_hp_mute_led()
4206 snd_hda_gen_add_mute_led_cdev(codec, vref_mute_led_set); in alc269_fixup_hp_mute_led()
4207 codec->power_filter = led_power_filter; in alc269_fixup_hp_mute_led()
4208 codec_dbg(codec, in alc269_fixup_hp_mute_led()
4209 "Detected mute LED for %x:%d\n", spec->mute_led_nid, in alc269_fixup_hp_mute_led()
4210 spec->mute_led_polarity); in alc269_fixup_hp_mute_led()
4215 static void alc269_fixup_hp_mute_led_micx(struct hda_codec *codec, in alc269_fixup_hp_mute_led_micx() argument
4219 struct alc_spec *spec = codec->spec; in alc269_fixup_hp_mute_led_micx()
4222 spec->mute_led_polarity = 0; in alc269_fixup_hp_mute_led_micx()
4223 spec->mute_led_nid = pin; in alc269_fixup_hp_mute_led_micx()
4224 snd_hda_gen_add_mute_led_cdev(codec, vref_mute_led_set); in alc269_fixup_hp_mute_led_micx()
4225 codec->power_filter = led_power_filter; in alc269_fixup_hp_mute_led_micx()
4229 static void alc269_fixup_hp_mute_led_mic1(struct hda_codec *codec, in alc269_fixup_hp_mute_led_mic1() argument
4232 alc269_fixup_hp_mute_led_micx(codec, fix, action, 0x18); in alc269_fixup_hp_mute_led_mic1()
4235 static void alc269_fixup_hp_mute_led_mic2(struct hda_codec *codec, in alc269_fixup_hp_mute_led_mic2() argument
4238 alc269_fixup_hp_mute_led_micx(codec, fix, action, 0x19); in alc269_fixup_hp_mute_led_mic2()
4241 static void alc269_fixup_hp_mute_led_mic3(struct hda_codec *codec, in alc269_fixup_hp_mute_led_mic3() argument
4244 alc269_fixup_hp_mute_led_micx(codec, fix, action, 0x1b); in alc269_fixup_hp_mute_led_mic3()
4248 static void alc_update_gpio_led(struct hda_codec *codec, unsigned int mask, in alc_update_gpio_led() argument
4253 alc_update_gpio_data(codec, mask, !enabled); /* muted -> LED on */ in alc_update_gpio_led()
4260 struct hda_codec *codec = dev_to_hda_codec(led_cdev->dev->parent); in gpio_mute_led_set() local
4261 struct alc_spec *spec = codec->spec; in gpio_mute_led_set()
4263 alc_update_gpio_led(codec, spec->gpio_mute_led_mask, in gpio_mute_led_set()
4264 spec->mute_led_polarity, !brightness); in gpio_mute_led_set()
4265 return 0; in gpio_mute_led_set()
4268 /* turn on/off mic-mute LED via GPIO per capture hook */
4272 struct hda_codec *codec = dev_to_hda_codec(led_cdev->dev->parent); in micmute_led_set() local
4273 struct alc_spec *spec = codec->spec; in micmute_led_set()
4275 alc_update_gpio_led(codec, spec->gpio_mic_led_mask, in micmute_led_set()
4276 spec->micmute_led_polarity, !brightness); in micmute_led_set()
4277 return 0; in micmute_led_set()
4280 /* setup mute and mic-mute GPIO bits, add hooks appropriately */
4281 static void alc_fixup_hp_gpio_led(struct hda_codec *codec, in alc_fixup_hp_gpio_led() argument
4286 struct alc_spec *spec = codec->spec; in alc_fixup_hp_gpio_led()
4288 alc_fixup_gpio(codec, action, mute_mask | micmute_mask); in alc_fixup_hp_gpio_led()
4293 spec->gpio_mute_led_mask = mute_mask; in alc_fixup_hp_gpio_led()
4294 snd_hda_gen_add_mute_led_cdev(codec, gpio_mute_led_set); in alc_fixup_hp_gpio_led()
4297 spec->gpio_mic_led_mask = micmute_mask; in alc_fixup_hp_gpio_led()
4298 snd_hda_gen_add_micmute_led_cdev(codec, micmute_led_set); in alc_fixup_hp_gpio_led()
4302 static void alc236_fixup_hp_gpio_led(struct hda_codec *codec, in alc236_fixup_hp_gpio_led() argument
4305 alc_fixup_hp_gpio_led(codec, action, 0x02, 0x01); in alc236_fixup_hp_gpio_led()
4308 static void alc269_fixup_hp_gpio_led(struct hda_codec *codec, in alc269_fixup_hp_gpio_led() argument
4311 alc_fixup_hp_gpio_led(codec, action, 0x08, 0x10); in alc269_fixup_hp_gpio_led()
4314 static void alc285_fixup_hp_gpio_led(struct hda_codec *codec, in alc285_fixup_hp_gpio_led() argument
4317 alc_fixup_hp_gpio_led(codec, action, 0x04, 0x01); in alc285_fixup_hp_gpio_led()
4320 static void alc286_fixup_hp_gpio_led(struct hda_codec *codec, in alc286_fixup_hp_gpio_led() argument
4323 alc_fixup_hp_gpio_led(codec, action, 0x02, 0x20); in alc286_fixup_hp_gpio_led()
4326 static void alc287_fixup_hp_gpio_led(struct hda_codec *codec, in alc287_fixup_hp_gpio_led() argument
4329 alc_fixup_hp_gpio_led(codec, action, 0x10, 0); in alc287_fixup_hp_gpio_led()
4332 static void alc245_fixup_hp_gpio_led(struct hda_codec *codec, in alc245_fixup_hp_gpio_led() argument
4335 struct alc_spec *spec = codec->spec; in alc245_fixup_hp_gpio_led()
4338 spec->micmute_led_polarity = 1; in alc245_fixup_hp_gpio_led()
4339 alc_fixup_hp_gpio_led(codec, action, 0, 0x04); in alc245_fixup_hp_gpio_led()
4342 /* turn on/off mic-mute LED per capture hook via VREF change */
4346 struct hda_codec *codec = dev_to_hda_codec(led_cdev->dev->parent); in vref_micmute_led_set() local
4347 struct alc_spec *spec = codec->spec; in vref_micmute_led_set()
4349 alc_update_vref_led(codec, spec->cap_mute_led_nid, in vref_micmute_led_set()
4350 spec->micmute_led_polarity, brightness); in vref_micmute_led_set()
4351 return 0; in vref_micmute_led_set()
4354 static void alc269_fixup_hp_gpio_mic1_led(struct hda_codec *codec, in alc269_fixup_hp_gpio_mic1_led() argument
4357 struct alc_spec *spec = codec->spec; in alc269_fixup_hp_gpio_mic1_led()
4359 alc_fixup_hp_gpio_led(codec, action, 0x08, 0); in alc269_fixup_hp_gpio_mic1_led()
4364 spec->gpio_mask |= 0x10; in alc269_fixup_hp_gpio_mic1_led()
4365 spec->gpio_dir |= 0x10; in alc269_fixup_hp_gpio_mic1_led()
4366 spec->cap_mute_led_nid = 0x18; in alc269_fixup_hp_gpio_mic1_led()
4367 snd_hda_gen_add_micmute_led_cdev(codec, vref_micmute_led_set); in alc269_fixup_hp_gpio_mic1_led()
4368 codec->power_filter = led_power_filter; in alc269_fixup_hp_gpio_mic1_led()
4372 static void alc280_fixup_hp_gpio4(struct hda_codec *codec, in alc280_fixup_hp_gpio4() argument
4375 struct alc_spec *spec = codec->spec; in alc280_fixup_hp_gpio4()
4377 alc_fixup_hp_gpio_led(codec, action, 0x08, 0); in alc280_fixup_hp_gpio4()
4379 spec->cap_mute_led_nid = 0x18; in alc280_fixup_hp_gpio4()
4380 snd_hda_gen_add_micmute_led_cdev(codec, vref_micmute_led_set); in alc280_fixup_hp_gpio4()
4381 codec->power_filter = led_power_filter; in alc280_fixup_hp_gpio4()
4388 static void alc245_fixup_hp_x360_amp(struct hda_codec *codec, in alc245_fixup_hp_x360_amp() argument
4391 struct alc_spec *spec = codec->spec; in alc245_fixup_hp_x360_amp()
4395 spec->gpio_mask |= 0x01; in alc245_fixup_hp_x360_amp()
4396 spec->gpio_dir |= 0x01; in alc245_fixup_hp_x360_amp()
4400 alc_update_gpio_data(codec, 0x01, true); in alc245_fixup_hp_x360_amp()
4402 alc_update_gpio_data(codec, 0x01, false); in alc245_fixup_hp_x360_amp()
4409 struct hda_codec *codec, in alc274_hp_envy_pcm_hook() argument
4415 alc_update_gpio_data(codec, 0x04, true); in alc274_hp_envy_pcm_hook()
4418 alc_update_gpio_data(codec, 0x04, false); in alc274_hp_envy_pcm_hook()
4423 static void alc274_fixup_hp_envy_gpio(struct hda_codec *codec, in alc274_fixup_hp_envy_gpio() argument
4427 struct alc_spec *spec = codec->spec; in alc274_fixup_hp_envy_gpio()
4430 spec->gpio_mask |= 0x04; in alc274_fixup_hp_envy_gpio()
4431 spec->gpio_dir |= 0x04; in alc274_fixup_hp_envy_gpio()
4432 spec->gen.pcm_playback_hook = alc274_hp_envy_pcm_hook; in alc274_fixup_hp_envy_gpio()
4436 static void alc_update_coef_led(struct hda_codec *codec, in alc_update_coef_led() argument
4443 alc_update_coef_idx(codec, led->idx, led->mask, in alc_update_coef_led()
4444 on ? led->on : led->off); in alc_update_coef_led()
4447 /* update mute-LED according to the speaker mute state via COEF bit */
4451 struct hda_codec *codec = dev_to_hda_codec(led_cdev->dev->parent); in coef_mute_led_set() local
4452 struct alc_spec *spec = codec->spec; in coef_mute_led_set()
4454 alc_update_coef_led(codec, &spec->mute_led_coef, in coef_mute_led_set()
4455 spec->mute_led_polarity, brightness); in coef_mute_led_set()
4456 return 0; in coef_mute_led_set()
4459 static void alc285_fixup_hp_mute_led_coefbit(struct hda_codec *codec, in alc285_fixup_hp_mute_led_coefbit() argument
4463 struct alc_spec *spec = codec->spec; in alc285_fixup_hp_mute_led_coefbit()
4466 spec->mute_led_polarity = 0; in alc285_fixup_hp_mute_led_coefbit()
4467 spec->mute_led_coef.idx = 0x0b; in alc285_fixup_hp_mute_led_coefbit()
4468 spec->mute_led_coef.mask = 1 << 3; in alc285_fixup_hp_mute_led_coefbit()
4469 spec->mute_led_coef.on = 1 << 3; in alc285_fixup_hp_mute_led_coefbit()
4470 spec->mute_led_coef.off = 0; in alc285_fixup_hp_mute_led_coefbit()
4471 snd_hda_gen_add_mute_led_cdev(codec, coef_mute_led_set); in alc285_fixup_hp_mute_led_coefbit()
4475 static void alc236_fixup_hp_mute_led_coefbit(struct hda_codec *codec, in alc236_fixup_hp_mute_led_coefbit() argument
4479 struct alc_spec *spec = codec->spec; in alc236_fixup_hp_mute_led_coefbit()
4482 spec->mute_led_polarity = 0; in alc236_fixup_hp_mute_led_coefbit()
4483 spec->mute_led_coef.idx = 0x34; in alc236_fixup_hp_mute_led_coefbit()
4484 spec->mute_led_coef.mask = 1 << 5; in alc236_fixup_hp_mute_led_coefbit()
4485 spec->mute_led_coef.on = 0; in alc236_fixup_hp_mute_led_coefbit()
4486 spec->mute_led_coef.off = 1 << 5; in alc236_fixup_hp_mute_led_coefbit()
4487 snd_hda_gen_add_mute_led_cdev(codec, coef_mute_led_set); in alc236_fixup_hp_mute_led_coefbit()
4491 /* turn on/off mic-mute LED per capture hook by coef bit */
4495 struct hda_codec *codec = dev_to_hda_codec(led_cdev->dev->parent); in coef_micmute_led_set() local
4496 struct alc_spec *spec = codec->spec; in coef_micmute_led_set()
4498 alc_update_coef_led(codec, &spec->mic_led_coef, in coef_micmute_led_set()
4499 spec->micmute_led_polarity, brightness); in coef_micmute_led_set()
4500 return 0; in coef_micmute_led_set()
4503 static void alc285_fixup_hp_coef_micmute_led(struct hda_codec *codec, in alc285_fixup_hp_coef_micmute_led() argument
4506 struct alc_spec *spec = codec->spec; in alc285_fixup_hp_coef_micmute_led()
4509 spec->mic_led_coef.idx = 0x19; in alc285_fixup_hp_coef_micmute_led()
4510 spec->mic_led_coef.mask = 1 << 13; in alc285_fixup_hp_coef_micmute_led()
4511 spec->mic_led_coef.on = 1 << 13; in alc285_fixup_hp_coef_micmute_led()
4512 spec->mic_led_coef.off = 0; in alc285_fixup_hp_coef_micmute_led()
4513 snd_hda_gen_add_micmute_led_cdev(codec, coef_micmute_led_set); in alc285_fixup_hp_coef_micmute_led()
4517 static void alc236_fixup_hp_coef_micmute_led(struct hda_codec *codec, in alc236_fixup_hp_coef_micmute_led() argument
4520 struct alc_spec *spec = codec->spec; in alc236_fixup_hp_coef_micmute_led()
4523 spec->mic_led_coef.idx = 0x35; in alc236_fixup_hp_coef_micmute_led()
4524 spec->mic_led_coef.mask = 3 << 2; in alc236_fixup_hp_coef_micmute_led()
4525 spec->mic_led_coef.on = 2 << 2; in alc236_fixup_hp_coef_micmute_led()
4526 spec->mic_led_coef.off = 1 << 2; in alc236_fixup_hp_coef_micmute_led()
4527 snd_hda_gen_add_micmute_led_cdev(codec, coef_micmute_led_set); in alc236_fixup_hp_coef_micmute_led()
4531 static void alc285_fixup_hp_mute_led(struct hda_codec *codec, in alc285_fixup_hp_mute_led() argument
4534 alc285_fixup_hp_mute_led_coefbit(codec, fix, action); in alc285_fixup_hp_mute_led()
4535 alc285_fixup_hp_coef_micmute_led(codec, fix, action); in alc285_fixup_hp_mute_led()
4538 static void alc236_fixup_hp_mute_led(struct hda_codec *codec, in alc236_fixup_hp_mute_led() argument
4541 alc236_fixup_hp_mute_led_coefbit(codec, fix, action); in alc236_fixup_hp_mute_led()
4542 alc236_fixup_hp_coef_micmute_led(codec, fix, action); in alc236_fixup_hp_mute_led()
4545 static void alc236_fixup_hp_micmute_led_vref(struct hda_codec *codec, in alc236_fixup_hp_micmute_led_vref() argument
4548 struct alc_spec *spec = codec->spec; in alc236_fixup_hp_micmute_led_vref()
4551 spec->cap_mute_led_nid = 0x1a; in alc236_fixup_hp_micmute_led_vref()
4552 snd_hda_gen_add_micmute_led_cdev(codec, vref_micmute_led_set); in alc236_fixup_hp_micmute_led_vref()
4553 codec->power_filter = led_power_filter; in alc236_fixup_hp_micmute_led_vref()
4557 static void alc236_fixup_hp_mute_led_micmute_vref(struct hda_codec *codec, in alc236_fixup_hp_mute_led_micmute_vref() argument
4560 alc236_fixup_hp_mute_led_coefbit(codec, fix, action); in alc236_fixup_hp_mute_led_micmute_vref()
4561 alc236_fixup_hp_micmute_led_vref(codec, fix, action); in alc236_fixup_hp_mute_led_micmute_vref()
4565 static void gpio2_mic_hotkey_event(struct hda_codec *codec, in gpio2_mic_hotkey_event() argument
4568 struct alc_spec *spec = codec->spec; in gpio2_mic_hotkey_event()
4572 input_report_key(spec->kb_dev, spec->alc_mute_keycode_map[ALC_KEY_MICMUTE_INDEX], 1); in gpio2_mic_hotkey_event()
4573 input_sync(spec->kb_dev); in gpio2_mic_hotkey_event()
4574 input_report_key(spec->kb_dev, spec->alc_mute_keycode_map[ALC_KEY_MICMUTE_INDEX], 0); in gpio2_mic_hotkey_event()
4575 input_sync(spec->kb_dev); in gpio2_mic_hotkey_event()
4578 static int alc_register_micmute_input_device(struct hda_codec *codec) in alc_register_micmute_input_device() argument
4580 struct alc_spec *spec = codec->spec; in alc_register_micmute_input_device()
4583 spec->kb_dev = input_allocate_device(); in alc_register_micmute_input_device()
4584 if (!spec->kb_dev) { in alc_register_micmute_input_device()
4585 codec_err(codec, "Out of memory (input_allocate_device)\n"); in alc_register_micmute_input_device()
4586 return -ENOMEM; in alc_register_micmute_input_device()
4589 spec->alc_mute_keycode_map[ALC_KEY_MICMUTE_INDEX] = KEY_MICMUTE; in alc_register_micmute_input_device()
4591 spec->kb_dev->name = "Microphone Mute Button"; in alc_register_micmute_input_device()
4592 spec->kb_dev->evbit[0] = BIT_MASK(EV_KEY); in alc_register_micmute_input_device()
4593 spec->kb_dev->keycodesize = sizeof(spec->alc_mute_keycode_map[0]); in alc_register_micmute_input_device()
4594 spec->kb_dev->keycodemax = ARRAY_SIZE(spec->alc_mute_keycode_map); in alc_register_micmute_input_device()
4595 spec->kb_dev->keycode = spec->alc_mute_keycode_map; in alc_register_micmute_input_device()
4596 for (i = 0; i < ARRAY_SIZE(spec->alc_mute_keycode_map); i++) in alc_register_micmute_input_device()
4597 set_bit(spec->alc_mute_keycode_map[i], spec->kb_dev->keybit); in alc_register_micmute_input_device()
4599 if (input_register_device(spec->kb_dev)) { in alc_register_micmute_input_device()
4600 codec_err(codec, "input_register_device failed\n"); in alc_register_micmute_input_device()
4601 input_free_device(spec->kb_dev); in alc_register_micmute_input_device()
4602 spec->kb_dev = NULL; in alc_register_micmute_input_device()
4603 return -ENOMEM; in alc_register_micmute_input_device()
4606 return 0; in alc_register_micmute_input_device()
4614 static void alc280_fixup_hp_gpio2_mic_hotkey(struct hda_codec *codec, in alc280_fixup_hp_gpio2_mic_hotkey() argument
4617 struct alc_spec *spec = codec->spec; in alc280_fixup_hp_gpio2_mic_hotkey()
4619 alc_fixup_hp_gpio_led(codec, action, 0x08, 0x10); in alc280_fixup_hp_gpio2_mic_hotkey()
4621 spec->init_amp = ALC_INIT_DEFAULT; in alc280_fixup_hp_gpio2_mic_hotkey()
4622 if (alc_register_micmute_input_device(codec) != 0) in alc280_fixup_hp_gpio2_mic_hotkey()
4625 spec->gpio_mask |= 0x06; in alc280_fixup_hp_gpio2_mic_hotkey()
4626 spec->gpio_dir |= 0x02; in alc280_fixup_hp_gpio2_mic_hotkey()
4627 spec->gpio_data |= 0x02; in alc280_fixup_hp_gpio2_mic_hotkey()
4628 snd_hda_codec_write_cache(codec, codec->core.afg, 0, in alc280_fixup_hp_gpio2_mic_hotkey()
4629 AC_VERB_SET_GPIO_UNSOLICITED_RSP_MASK, 0x04); in alc280_fixup_hp_gpio2_mic_hotkey()
4630 snd_hda_jack_detect_enable_callback(codec, codec->core.afg, in alc280_fixup_hp_gpio2_mic_hotkey()
4635 if (!spec->kb_dev) in alc280_fixup_hp_gpio2_mic_hotkey()
4640 input_unregister_device(spec->kb_dev); in alc280_fixup_hp_gpio2_mic_hotkey()
4641 spec->kb_dev = NULL; in alc280_fixup_hp_gpio2_mic_hotkey()
4648 static void alc233_fixup_lenovo_line2_mic_hotkey(struct hda_codec *codec, in alc233_fixup_lenovo_line2_mic_hotkey() argument
4651 struct alc_spec *spec = codec->spec; in alc233_fixup_lenovo_line2_mic_hotkey()
4653 alc_fixup_hp_gpio_led(codec, action, 0, 0x04); in alc233_fixup_lenovo_line2_mic_hotkey()
4655 spec->init_amp = ALC_INIT_DEFAULT; in alc233_fixup_lenovo_line2_mic_hotkey()
4656 if (alc_register_micmute_input_device(codec) != 0) in alc233_fixup_lenovo_line2_mic_hotkey()
4659 snd_hda_jack_detect_enable_callback(codec, 0x1b, in alc233_fixup_lenovo_line2_mic_hotkey()
4664 if (!spec->kb_dev) in alc233_fixup_lenovo_line2_mic_hotkey()
4669 input_unregister_device(spec->kb_dev); in alc233_fixup_lenovo_line2_mic_hotkey()
4670 spec->kb_dev = NULL; in alc233_fixup_lenovo_line2_mic_hotkey()
4678 static void alc269_fixup_hp_line1_mic1_led(struct hda_codec *codec, in alc269_fixup_hp_line1_mic1_led() argument
4681 struct alc_spec *spec = codec->spec; in alc269_fixup_hp_line1_mic1_led()
4683 alc269_fixup_hp_mute_led_micx(codec, fix, action, 0x1a); in alc269_fixup_hp_line1_mic1_led()
4685 spec->cap_mute_led_nid = 0x18; in alc269_fixup_hp_line1_mic1_led()
4686 snd_hda_gen_add_micmute_led_cdev(codec, vref_micmute_led_set); in alc269_fixup_hp_line1_mic1_led()
4691 UPDATE_COEF(0x4a, 1<<8, 0),
4692 UPDATE_COEFEX(0x57, 0x05, 1<<14, 0),
4693 UPDATE_COEF(0x63, 3<<14, 3<<14),
4694 UPDATE_COEF(0x4a, 3<<4, 2<<4),
4695 UPDATE_COEF(0x4a, 3<<10, 3<<10),
4696 UPDATE_COEF(0x45, 0x3f<<10, 0x34<<10),
4697 UPDATE_COEF(0x4a, 3<<10, 0),
4701 static void alc_headset_mode_unplugged(struct hda_codec *codec) in alc_headset_mode_unplugged() argument
4703 struct alc_spec *spec = codec->spec; in alc_headset_mode_unplugged()
4705 WRITE_COEF(0x1b, 0x0c0b), /* LDO and MISC control */ in alc_headset_mode_unplugged()
4706 WRITE_COEF(0x45, 0xd089), /* UAJ function set to menual mode */ in alc_headset_mode_unplugged()
4707 UPDATE_COEFEX(0x57, 0x05, 1<<14, 0), /* Direct Drive HP Amp control(Set to verb control)*/ in alc_headset_mode_unplugged()
4708 WRITE_COEF(0x06, 0x6104), /* Set MIC2 Vref gate with HP */ in alc_headset_mode_unplugged()
4709 WRITE_COEFEX(0x57, 0x03, 0x8aa6), /* Direct Drive HP Amp control */ in alc_headset_mode_unplugged()
4713 WRITE_COEF(0x1b, 0x0c4b), /* LDO and MISC control */ in alc_headset_mode_unplugged()
4714 WRITE_COEF(0x45, 0xd089), /* UAJ function set to menual mode */ in alc_headset_mode_unplugged()
4715 WRITE_COEF(0x06, 0x6104), /* Set MIC2 Vref gate with HP */ in alc_headset_mode_unplugged()
4716 WRITE_COEFEX(0x57, 0x03, 0x09a3), /* Direct Drive HP Amp control */ in alc_headset_mode_unplugged()
4717 UPDATE_COEFEX(0x57, 0x05, 1<<14, 0), /* Direct Drive HP Amp control(Set to verb control)*/ in alc_headset_mode_unplugged()
4721 WRITE_COEF(0x1b, 0x0c0b), in alc_headset_mode_unplugged()
4722 WRITE_COEF(0x45, 0xc429), in alc_headset_mode_unplugged()
4723 UPDATE_COEF(0x35, 0x4000, 0), in alc_headset_mode_unplugged()
4724 WRITE_COEF(0x06, 0x2104), in alc_headset_mode_unplugged()
4725 WRITE_COEF(0x1a, 0x0001), in alc_headset_mode_unplugged()
4726 WRITE_COEF(0x26, 0x0004), in alc_headset_mode_unplugged()
4727 WRITE_COEF(0x32, 0x42a3), in alc_headset_mode_unplugged()
4731 UPDATE_COEF(0x4f, 0xfcc0, 0xc400), in alc_headset_mode_unplugged()
4732 UPDATE_COEF(0x50, 0x2000, 0x2000), in alc_headset_mode_unplugged()
4733 UPDATE_COEF(0x56, 0x0006, 0x0006), in alc_headset_mode_unplugged()
4734 UPDATE_COEF(0x66, 0x0008, 0), in alc_headset_mode_unplugged()
4735 UPDATE_COEF(0x67, 0x2000, 0), in alc_headset_mode_unplugged()
4739 UPDATE_COEF(0x19, 0x1300, 0x0300), in alc_headset_mode_unplugged()
4743 WRITE_COEF(0x76, 0x000e), in alc_headset_mode_unplugged()
4744 WRITE_COEF(0x6c, 0x2400), in alc_headset_mode_unplugged()
4745 WRITE_COEF(0x18, 0x7308), in alc_headset_mode_unplugged()
4746 WRITE_COEF(0x6b, 0xc429), in alc_headset_mode_unplugged()
4750 UPDATE_COEF(0x10, 7<<8, 6<<8), /* SET Line1 JD to 0 */ in alc_headset_mode_unplugged()
4751 UPDATE_COEFEX(0x57, 0x05, 1<<15|1<<13, 0x0), /* SET charge pump by verb */ in alc_headset_mode_unplugged()
4752 UPDATE_COEFEX(0x57, 0x03, 1<<10, 1<<10), /* SET EN_OSW to 1 */ in alc_headset_mode_unplugged()
4753 UPDATE_COEF(0x1a, 1<<3, 1<<3), /* Combo JD gating with LINE1-VREFO */ in alc_headset_mode_unplugged()
4754 WRITE_COEF(0x45, 0xc429), /* Set to TRS type */ in alc_headset_mode_unplugged()
4755 UPDATE_COEF(0x4a, 0x000f, 0x000e), /* Combo Jack auto detect */ in alc_headset_mode_unplugged()
4759 WRITE_COEF(0x15, 0x0d40), in alc_headset_mode_unplugged()
4760 WRITE_COEF(0xb7, 0x802b), in alc_headset_mode_unplugged()
4764 UPDATE_COEF(0x63, 3<<14, 0), in alc_headset_mode_unplugged()
4768 UPDATE_COEF(0x4a, 0x0100, 0), in alc_headset_mode_unplugged()
4769 UPDATE_COEFEX(0x57, 0x05, 0x4000, 0), in alc_headset_mode_unplugged()
4770 UPDATE_COEF(0x6b, 0xf000, 0x5000), in alc_headset_mode_unplugged()
4771 UPDATE_COEF(0x4a, 0x0010, 0), in alc_headset_mode_unplugged()
4772 UPDATE_COEF(0x4a, 0x0c00, 0x0c00), in alc_headset_mode_unplugged()
4773 WRITE_COEF(0x45, 0x5289), in alc_headset_mode_unplugged()
4774 UPDATE_COEF(0x4a, 0x0c00, 0), in alc_headset_mode_unplugged()
4778 if (spec->no_internal_mic_pin) { in alc_headset_mode_unplugged()
4779 alc_update_coef_idx(codec, 0x45, 0xf<<12 | 1<<10, 5<<12); in alc_headset_mode_unplugged()
4783 switch (codec->core.vendor_id) { in alc_headset_mode_unplugged()
4784 case 0x10ec0255: in alc_headset_mode_unplugged()
4785 alc_process_coef_fw(codec, coef0255); in alc_headset_mode_unplugged()
4787 case 0x10ec0230: in alc_headset_mode_unplugged()
4788 case 0x10ec0236: in alc_headset_mode_unplugged()
4789 case 0x10ec0256: in alc_headset_mode_unplugged()
4790 alc_process_coef_fw(codec, coef0256); in alc_headset_mode_unplugged()
4792 case 0x10ec0234: in alc_headset_mode_unplugged()
4793 case 0x10ec0274: in alc_headset_mode_unplugged()
4794 case 0x10ec0294: in alc_headset_mode_unplugged()
4795 alc_process_coef_fw(codec, coef0274); in alc_headset_mode_unplugged()
4797 case 0x10ec0233: in alc_headset_mode_unplugged()
4798 case 0x10ec0283: in alc_headset_mode_unplugged()
4799 alc_process_coef_fw(codec, coef0233); in alc_headset_mode_unplugged()
4801 case 0x10ec0286: in alc_headset_mode_unplugged()
4802 case 0x10ec0288: in alc_headset_mode_unplugged()
4803 alc_process_coef_fw(codec, coef0288); in alc_headset_mode_unplugged()
4805 case 0x10ec0298: in alc_headset_mode_unplugged()
4806 alc_process_coef_fw(codec, coef0298); in alc_headset_mode_unplugged()
4807 alc_process_coef_fw(codec, coef0288); in alc_headset_mode_unplugged()
4809 case 0x10ec0292: in alc_headset_mode_unplugged()
4810 alc_process_coef_fw(codec, coef0292); in alc_headset_mode_unplugged()
4812 case 0x10ec0293: in alc_headset_mode_unplugged()
4813 alc_process_coef_fw(codec, coef0293); in alc_headset_mode_unplugged()
4815 case 0x10ec0668: in alc_headset_mode_unplugged()
4816 alc_process_coef_fw(codec, coef0668); in alc_headset_mode_unplugged()
4818 case 0x10ec0215: in alc_headset_mode_unplugged()
4819 case 0x10ec0225: in alc_headset_mode_unplugged()
4820 case 0x10ec0285: in alc_headset_mode_unplugged()
4821 case 0x10ec0295: in alc_headset_mode_unplugged()
4822 case 0x10ec0289: in alc_headset_mode_unplugged()
4823 case 0x10ec0299: in alc_headset_mode_unplugged()
4824 alc_process_coef_fw(codec, alc225_pre_hsmode); in alc_headset_mode_unplugged()
4825 alc_process_coef_fw(codec, coef0225); in alc_headset_mode_unplugged()
4827 case 0x10ec0867: in alc_headset_mode_unplugged()
4828 alc_update_coefex_idx(codec, 0x57, 0x5, 1<<14, 0); in alc_headset_mode_unplugged()
4831 codec_dbg(codec, "Headset jack set to unplugged mode.\n"); in alc_headset_mode_unplugged()
4835 static void alc_headset_mode_mic_in(struct hda_codec *codec, hda_nid_t hp_pin, in alc_headset_mode_mic_in() argument
4839 WRITE_COEFEX(0x57, 0x03, 0x8aa6), in alc_headset_mode_mic_in()
4840 WRITE_COEF(0x06, 0x6100), /* Set MIC2 Vref gate to normal */ in alc_headset_mode_mic_in()
4844 UPDATE_COEFEX(0x57, 0x05, 1<<14, 1<<14), /* Direct Drive HP Amp control(Set to verb control)*/ in alc_headset_mode_mic_in()
4845 WRITE_COEFEX(0x57, 0x03, 0x09a3), in alc_headset_mode_mic_in()
4846 WRITE_COEF(0x06, 0x6100), /* Set MIC2 Vref gate to normal */ in alc_headset_mode_mic_in()
4850 UPDATE_COEF(0x35, 0, 1<<14), in alc_headset_mode_mic_in()
4851 WRITE_COEF(0x06, 0x2100), in alc_headset_mode_mic_in()
4852 WRITE_COEF(0x1a, 0x0021), in alc_headset_mode_mic_in()
4853 WRITE_COEF(0x26, 0x008c), in alc_headset_mode_mic_in()
4857 UPDATE_COEF(0x4f, 0x00c0, 0), in alc_headset_mode_mic_in()
4858 UPDATE_COEF(0x50, 0x2000, 0), in alc_headset_mode_mic_in()
4859 UPDATE_COEF(0x56, 0x0006, 0), in alc_headset_mode_mic_in()
4860 UPDATE_COEF(0x4f, 0xfcc0, 0xc400), in alc_headset_mode_mic_in()
4861 UPDATE_COEF(0x66, 0x0008, 0x0008), in alc_headset_mode_mic_in()
4862 UPDATE_COEF(0x67, 0x2000, 0x2000), in alc_headset_mode_mic_in()
4866 WRITE_COEF(0x19, 0xa208), in alc_headset_mode_mic_in()
4867 WRITE_COEF(0x2e, 0xacf0), in alc_headset_mode_mic_in()
4871 UPDATE_COEFEX(0x57, 0x05, 0, 1<<15|1<<13), /* SET charge pump by verb */ in alc_headset_mode_mic_in()
4872 UPDATE_COEFEX(0x57, 0x03, 1<<10, 0), /* SET EN_OSW to 0 */ in alc_headset_mode_mic_in()
4873 UPDATE_COEF(0x1a, 1<<3, 0), /* Combo JD gating without LINE1-VREFO */ in alc_headset_mode_mic_in()
4877 WRITE_COEF(0xb7, 0x802b), in alc_headset_mode_mic_in()
4878 WRITE_COEF(0xb5, 0x1040), in alc_headset_mode_mic_in()
4879 UPDATE_COEF(0xc3, 0, 1<<12), in alc_headset_mode_mic_in()
4883 UPDATE_COEFEX(0x57, 0x05, 1<<14, 1<<14), in alc_headset_mode_mic_in()
4884 UPDATE_COEF(0x4a, 3<<4, 2<<4), in alc_headset_mode_mic_in()
4885 UPDATE_COEF(0x63, 3<<14, 0), in alc_headset_mode_mic_in()
4889 UPDATE_COEFEX(0x57, 0x05, 0x4000, 0x4000), in alc_headset_mode_mic_in()
4890 UPDATE_COEF(0x4a, 0x0010, 0), in alc_headset_mode_mic_in()
4891 UPDATE_COEF(0x6b, 0xf000, 0), in alc_headset_mode_mic_in()
4895 switch (codec->core.vendor_id) { in alc_headset_mode_mic_in()
4896 case 0x10ec0255: in alc_headset_mode_mic_in()
4897 alc_write_coef_idx(codec, 0x45, 0xc489); in alc_headset_mode_mic_in()
4898 snd_hda_set_pin_ctl_cache(codec, hp_pin, 0); in alc_headset_mode_mic_in()
4899 alc_process_coef_fw(codec, coef0255); in alc_headset_mode_mic_in()
4900 snd_hda_set_pin_ctl_cache(codec, mic_pin, PIN_VREF50); in alc_headset_mode_mic_in()
4902 case 0x10ec0230: in alc_headset_mode_mic_in()
4903 case 0x10ec0236: in alc_headset_mode_mic_in()
4904 case 0x10ec0256: in alc_headset_mode_mic_in()
4905 alc_write_coef_idx(codec, 0x45, 0xc489); in alc_headset_mode_mic_in()
4906 snd_hda_set_pin_ctl_cache(codec, hp_pin, 0); in alc_headset_mode_mic_in()
4907 alc_process_coef_fw(codec, coef0256); in alc_headset_mode_mic_in()
4908 snd_hda_set_pin_ctl_cache(codec, mic_pin, PIN_VREF50); in alc_headset_mode_mic_in()
4910 case 0x10ec0234: in alc_headset_mode_mic_in()
4911 case 0x10ec0274: in alc_headset_mode_mic_in()
4912 case 0x10ec0294: in alc_headset_mode_mic_in()
4913 alc_write_coef_idx(codec, 0x45, 0x4689); in alc_headset_mode_mic_in()
4914 snd_hda_set_pin_ctl_cache(codec, hp_pin, 0); in alc_headset_mode_mic_in()
4915 alc_process_coef_fw(codec, coef0274); in alc_headset_mode_mic_in()
4916 snd_hda_set_pin_ctl_cache(codec, mic_pin, PIN_VREF50); in alc_headset_mode_mic_in()
4918 case 0x10ec0233: in alc_headset_mode_mic_in()
4919 case 0x10ec0283: in alc_headset_mode_mic_in()
4920 alc_write_coef_idx(codec, 0x45, 0xc429); in alc_headset_mode_mic_in()
4921 snd_hda_set_pin_ctl_cache(codec, hp_pin, 0); in alc_headset_mode_mic_in()
4922 alc_process_coef_fw(codec, coef0233); in alc_headset_mode_mic_in()
4923 snd_hda_set_pin_ctl_cache(codec, mic_pin, PIN_VREF50); in alc_headset_mode_mic_in()
4925 case 0x10ec0286: in alc_headset_mode_mic_in()
4926 case 0x10ec0288: in alc_headset_mode_mic_in()
4927 case 0x10ec0298: in alc_headset_mode_mic_in()
4928 snd_hda_set_pin_ctl_cache(codec, hp_pin, 0); in alc_headset_mode_mic_in()
4929 alc_process_coef_fw(codec, coef0288); in alc_headset_mode_mic_in()
4930 snd_hda_set_pin_ctl_cache(codec, mic_pin, PIN_VREF50); in alc_headset_mode_mic_in()
4932 case 0x10ec0292: in alc_headset_mode_mic_in()
4933 snd_hda_set_pin_ctl_cache(codec, hp_pin, 0); in alc_headset_mode_mic_in()
4934 alc_process_coef_fw(codec, coef0292); in alc_headset_mode_mic_in()
4936 case 0x10ec0293: in alc_headset_mode_mic_in()
4938 alc_write_coef_idx(codec, 0x45, 0xc429); in alc_headset_mode_mic_in()
4939 snd_hda_set_pin_ctl_cache(codec, hp_pin, 0); in alc_headset_mode_mic_in()
4940 alc_process_coef_fw(codec, coef0293); in alc_headset_mode_mic_in()
4941 snd_hda_set_pin_ctl_cache(codec, mic_pin, PIN_VREF50); in alc_headset_mode_mic_in()
4943 case 0x10ec0867: in alc_headset_mode_mic_in()
4944 alc_update_coefex_idx(codec, 0x57, 0x5, 0, 1<<14); in alc_headset_mode_mic_in()
4946 case 0x10ec0221: in alc_headset_mode_mic_in()
4947 case 0x10ec0662: in alc_headset_mode_mic_in()
4948 snd_hda_set_pin_ctl_cache(codec, hp_pin, 0); in alc_headset_mode_mic_in()
4949 snd_hda_set_pin_ctl_cache(codec, mic_pin, PIN_VREF50); in alc_headset_mode_mic_in()
4951 case 0x10ec0668: in alc_headset_mode_mic_in()
4952 alc_write_coef_idx(codec, 0x11, 0x0001); in alc_headset_mode_mic_in()
4953 snd_hda_set_pin_ctl_cache(codec, hp_pin, 0); in alc_headset_mode_mic_in()
4954 alc_process_coef_fw(codec, coef0688); in alc_headset_mode_mic_in()
4955 snd_hda_set_pin_ctl_cache(codec, mic_pin, PIN_VREF50); in alc_headset_mode_mic_in()
4957 case 0x10ec0215: in alc_headset_mode_mic_in()
4958 case 0x10ec0225: in alc_headset_mode_mic_in()
4959 case 0x10ec0285: in alc_headset_mode_mic_in()
4960 case 0x10ec0295: in alc_headset_mode_mic_in()
4961 case 0x10ec0289: in alc_headset_mode_mic_in()
4962 case 0x10ec0299: in alc_headset_mode_mic_in()
4963 alc_process_coef_fw(codec, alc225_pre_hsmode); in alc_headset_mode_mic_in()
4964 alc_update_coef_idx(codec, 0x45, 0x3f<<10, 0x31<<10); in alc_headset_mode_mic_in()
4965 snd_hda_set_pin_ctl_cache(codec, hp_pin, 0); in alc_headset_mode_mic_in()
4966 alc_process_coef_fw(codec, coef0225); in alc_headset_mode_mic_in()
4967 snd_hda_set_pin_ctl_cache(codec, mic_pin, PIN_VREF50); in alc_headset_mode_mic_in()
4970 codec_dbg(codec, "Headset jack set to mic-in mode.\n"); in alc_headset_mode_mic_in()
4973 static void alc_headset_mode_default(struct hda_codec *codec) in alc_headset_mode_default() argument
4976 UPDATE_COEF(0x45, 0x3f<<10, 0x30<<10), in alc_headset_mode_default()
4977 UPDATE_COEF(0x45, 0x3f<<10, 0x31<<10), in alc_headset_mode_default()
4978 UPDATE_COEF(0x49, 3<<8, 0<<8), in alc_headset_mode_default()
4979 UPDATE_COEF(0x4a, 3<<4, 3<<4), in alc_headset_mode_default()
4980 UPDATE_COEF(0x63, 3<<14, 0), in alc_headset_mode_default()
4981 UPDATE_COEF(0x67, 0xf000, 0x3000), in alc_headset_mode_default()
4985 WRITE_COEF(0x45, 0xc089), in alc_headset_mode_default()
4986 WRITE_COEF(0x45, 0xc489), in alc_headset_mode_default()
4987 WRITE_COEFEX(0x57, 0x03, 0x8ea6), in alc_headset_mode_default()
4988 WRITE_COEF(0x49, 0x0049), in alc_headset_mode_default()
4992 WRITE_COEF(0x45, 0xc489), in alc_headset_mode_default()
4993 WRITE_COEFEX(0x57, 0x03, 0x0da3), in alc_headset_mode_default()
4994 WRITE_COEF(0x49, 0x0049), in alc_headset_mode_default()
4995 UPDATE_COEFEX(0x57, 0x05, 1<<14, 0), /* Direct Drive HP Amp control(Set to verb control)*/ in alc_headset_mode_default()
4996 WRITE_COEF(0x06, 0x6100), in alc_headset_mode_default()
5000 WRITE_COEF(0x06, 0x2100), in alc_headset_mode_default()
5001 WRITE_COEF(0x32, 0x4ea3), in alc_headset_mode_default()
5005 UPDATE_COEF(0x4f, 0xfcc0, 0xc400), /* Set to TRS type */ in alc_headset_mode_default()
5006 UPDATE_COEF(0x50, 0x2000, 0x2000), in alc_headset_mode_default()
5007 UPDATE_COEF(0x56, 0x0006, 0x0006), in alc_headset_mode_default()
5008 UPDATE_COEF(0x66, 0x0008, 0), in alc_headset_mode_default()
5009 UPDATE_COEF(0x67, 0x2000, 0), in alc_headset_mode_default()
5013 WRITE_COEF(0x76, 0x000e), in alc_headset_mode_default()
5014 WRITE_COEF(0x6c, 0x2400), in alc_headset_mode_default()
5015 WRITE_COEF(0x6b, 0xc429), in alc_headset_mode_default()
5016 WRITE_COEF(0x18, 0x7308), in alc_headset_mode_default()
5020 UPDATE_COEF(0x4a, 0x000f, 0x000e), /* Combo Jack auto detect */ in alc_headset_mode_default()
5021 WRITE_COEF(0x45, 0xC429), /* Set to TRS type */ in alc_headset_mode_default()
5022 UPDATE_COEF(0x1a, 1<<3, 0), /* Combo JD gating without LINE1-VREFO */ in alc_headset_mode_default()
5026 WRITE_COEF(0x11, 0x0041), in alc_headset_mode_default()
5027 WRITE_COEF(0x15, 0x0d40), in alc_headset_mode_default()
5028 WRITE_COEF(0xb7, 0x802b), in alc_headset_mode_default()
5032 WRITE_COEF(0x45, 0x4289), in alc_headset_mode_default()
5033 UPDATE_COEF(0x4a, 0x0010, 0x0010), in alc_headset_mode_default()
5034 UPDATE_COEF(0x6b, 0x0f00, 0), in alc_headset_mode_default()
5035 UPDATE_COEF(0x49, 0x0300, 0x0300), in alc_headset_mode_default()
5039 switch (codec->core.vendor_id) { in alc_headset_mode_default()
5040 case 0x10ec0215: in alc_headset_mode_default()
5041 case 0x10ec0225: in alc_headset_mode_default()
5042 case 0x10ec0285: in alc_headset_mode_default()
5043 case 0x10ec0295: in alc_headset_mode_default()
5044 case 0x10ec0289: in alc_headset_mode_default()
5045 case 0x10ec0299: in alc_headset_mode_default()
5046 alc_process_coef_fw(codec, alc225_pre_hsmode); in alc_headset_mode_default()
5047 alc_process_coef_fw(codec, coef0225); in alc_headset_mode_default()
5049 case 0x10ec0255: in alc_headset_mode_default()
5050 alc_process_coef_fw(codec, coef0255); in alc_headset_mode_default()
5052 case 0x10ec0230: in alc_headset_mode_default()
5053 case 0x10ec0236: in alc_headset_mode_default()
5054 case 0x10ec0256: in alc_headset_mode_default()
5055 alc_write_coef_idx(codec, 0x1b, 0x0e4b); in alc_headset_mode_default()
5056 alc_write_coef_idx(codec, 0x45, 0xc089); in alc_headset_mode_default()
5058 alc_process_coef_fw(codec, coef0256); in alc_headset_mode_default()
5060 case 0x10ec0234: in alc_headset_mode_default()
5061 case 0x10ec0274: in alc_headset_mode_default()
5062 case 0x10ec0294: in alc_headset_mode_default()
5063 alc_process_coef_fw(codec, coef0274); in alc_headset_mode_default()
5065 case 0x10ec0233: in alc_headset_mode_default()
5066 case 0x10ec0283: in alc_headset_mode_default()
5067 alc_process_coef_fw(codec, coef0233); in alc_headset_mode_default()
5069 case 0x10ec0286: in alc_headset_mode_default()
5070 case 0x10ec0288: in alc_headset_mode_default()
5071 case 0x10ec0298: in alc_headset_mode_default()
5072 alc_process_coef_fw(codec, coef0288); in alc_headset_mode_default()
5074 case 0x10ec0292: in alc_headset_mode_default()
5075 alc_process_coef_fw(codec, coef0292); in alc_headset_mode_default()
5077 case 0x10ec0293: in alc_headset_mode_default()
5078 alc_process_coef_fw(codec, coef0293); in alc_headset_mode_default()
5080 case 0x10ec0668: in alc_headset_mode_default()
5081 alc_process_coef_fw(codec, coef0688); in alc_headset_mode_default()
5083 case 0x10ec0867: in alc_headset_mode_default()
5084 alc_update_coefex_idx(codec, 0x57, 0x5, 1<<14, 0); in alc_headset_mode_default()
5087 codec_dbg(codec, "Headset jack set to headphone (default) mode.\n"); in alc_headset_mode_default()
5091 static void alc_headset_mode_ctia(struct hda_codec *codec) in alc_headset_mode_ctia() argument
5096 WRITE_COEF(0x45, 0xd489), /* Set to CTIA type */ in alc_headset_mode_ctia()
5097 WRITE_COEF(0x1b, 0x0c2b), in alc_headset_mode_ctia()
5098 WRITE_COEFEX(0x57, 0x03, 0x8ea6), in alc_headset_mode_ctia()
5102 WRITE_COEF(0x45, 0xd489), /* Set to CTIA type */ in alc_headset_mode_ctia()
5103 WRITE_COEF(0x1b, 0x0e6b), in alc_headset_mode_ctia()
5107 WRITE_COEF(0x45, 0xd429), in alc_headset_mode_ctia()
5108 WRITE_COEF(0x1b, 0x0c2b), in alc_headset_mode_ctia()
5109 WRITE_COEF(0x32, 0x4ea3), in alc_headset_mode_ctia()
5113 UPDATE_COEF(0x50, 0x2000, 0x2000), in alc_headset_mode_ctia()
5114 UPDATE_COEF(0x56, 0x0006, 0x0006), in alc_headset_mode_ctia()
5115 UPDATE_COEF(0x66, 0x0008, 0), in alc_headset_mode_ctia()
5116 UPDATE_COEF(0x67, 0x2000, 0), in alc_headset_mode_ctia()
5120 WRITE_COEF(0x6b, 0xd429), in alc_headset_mode_ctia()
5121 WRITE_COEF(0x76, 0x0008), in alc_headset_mode_ctia()
5122 WRITE_COEF(0x18, 0x7388), in alc_headset_mode_ctia()
5126 WRITE_COEF(0x45, 0xd429), /* Set to ctia type */ in alc_headset_mode_ctia()
5127 UPDATE_COEF(0x10, 7<<8, 7<<8), /* SET Line1 JD to 1 */ in alc_headset_mode_ctia()
5131 WRITE_COEF(0x11, 0x0001), in alc_headset_mode_ctia()
5132 WRITE_COEF(0x15, 0x0d60), in alc_headset_mode_ctia()
5133 WRITE_COEF(0xc3, 0x0000), in alc_headset_mode_ctia()
5137 UPDATE_COEF(0x45, 0x3f<<10, 0x35<<10), in alc_headset_mode_ctia()
5138 UPDATE_COEF(0x63, 3<<14, 2<<14), in alc_headset_mode_ctia()
5142 UPDATE_COEF(0x45, 0x3f<<10, 0x35<<10), in alc_headset_mode_ctia()
5143 UPDATE_COEF(0x63, 3<<14, 1<<14), in alc_headset_mode_ctia()
5147 switch (codec->core.vendor_id) { in alc_headset_mode_ctia()
5148 case 0x10ec0255: in alc_headset_mode_ctia()
5149 alc_process_coef_fw(codec, coef0255); in alc_headset_mode_ctia()
5151 case 0x10ec0230: in alc_headset_mode_ctia()
5152 case 0x10ec0236: in alc_headset_mode_ctia()
5153 case 0x10ec0256: in alc_headset_mode_ctia()
5154 alc_process_coef_fw(codec, coef0256); in alc_headset_mode_ctia()
5156 case 0x10ec0234: in alc_headset_mode_ctia()
5157 case 0x10ec0274: in alc_headset_mode_ctia()
5158 case 0x10ec0294: in alc_headset_mode_ctia()
5159 alc_write_coef_idx(codec, 0x45, 0xd689); in alc_headset_mode_ctia()
5161 case 0x10ec0233: in alc_headset_mode_ctia()
5162 case 0x10ec0283: in alc_headset_mode_ctia()
5163 alc_process_coef_fw(codec, coef0233); in alc_headset_mode_ctia()
5165 case 0x10ec0298: in alc_headset_mode_ctia()
5166 val = alc_read_coef_idx(codec, 0x50); in alc_headset_mode_ctia()
5168 alc_update_coef_idx(codec, 0x8e, 0x0070, 0x0020); in alc_headset_mode_ctia()
5169 alc_update_coef_idx(codec, 0x4f, 0xfcc0, 0xd400); in alc_headset_mode_ctia()
5172 alc_update_coef_idx(codec, 0x8e, 0x0070, 0x0010); in alc_headset_mode_ctia()
5173 alc_update_coef_idx(codec, 0x4f, 0xfcc0, 0xd400); in alc_headset_mode_ctia()
5177 case 0x10ec0286: in alc_headset_mode_ctia()
5178 case 0x10ec0288: in alc_headset_mode_ctia()
5179 alc_update_coef_idx(codec, 0x4f, 0xfcc0, 0xd400); in alc_headset_mode_ctia()
5181 alc_process_coef_fw(codec, coef0288); in alc_headset_mode_ctia()
5183 case 0x10ec0292: in alc_headset_mode_ctia()
5184 alc_process_coef_fw(codec, coef0292); in alc_headset_mode_ctia()
5186 case 0x10ec0293: in alc_headset_mode_ctia()
5187 alc_process_coef_fw(codec, coef0293); in alc_headset_mode_ctia()
5189 case 0x10ec0668: in alc_headset_mode_ctia()
5190 alc_process_coef_fw(codec, coef0688); in alc_headset_mode_ctia()
5192 case 0x10ec0215: in alc_headset_mode_ctia()
5193 case 0x10ec0225: in alc_headset_mode_ctia()
5194 case 0x10ec0285: in alc_headset_mode_ctia()
5195 case 0x10ec0295: in alc_headset_mode_ctia()
5196 case 0x10ec0289: in alc_headset_mode_ctia()
5197 case 0x10ec0299: in alc_headset_mode_ctia()
5198 val = alc_read_coef_idx(codec, 0x45); in alc_headset_mode_ctia()
5200 alc_process_coef_fw(codec, coef0225_2); in alc_headset_mode_ctia()
5202 alc_process_coef_fw(codec, coef0225_1); in alc_headset_mode_ctia()
5204 case 0x10ec0867: in alc_headset_mode_ctia()
5205 alc_update_coefex_idx(codec, 0x57, 0x5, 1<<14, 0); in alc_headset_mode_ctia()
5208 codec_dbg(codec, "Headset jack set to iPhone-style headset mode.\n"); in alc_headset_mode_ctia()
5212 static void alc_headset_mode_omtp(struct hda_codec *codec) in alc_headset_mode_omtp() argument
5215 WRITE_COEF(0x45, 0xe489), /* Set to OMTP Type */ in alc_headset_mode_omtp()
5216 WRITE_COEF(0x1b, 0x0c2b), in alc_headset_mode_omtp()
5217 WRITE_COEFEX(0x57, 0x03, 0x8ea6), in alc_headset_mode_omtp()
5221 WRITE_COEF(0x45, 0xe489), /* Set to OMTP Type */ in alc_headset_mode_omtp()
5222 WRITE_COEF(0x1b, 0x0e6b), in alc_headset_mode_omtp()
5226 WRITE_COEF(0x45, 0xe429), in alc_headset_mode_omtp()
5227 WRITE_COEF(0x1b, 0x0c2b), in alc_headset_mode_omtp()
5228 WRITE_COEF(0x32, 0x4ea3), in alc_headset_mode_omtp()
5232 UPDATE_COEF(0x50, 0x2000, 0x2000), in alc_headset_mode_omtp()
5233 UPDATE_COEF(0x56, 0x0006, 0x0006), in alc_headset_mode_omtp()
5234 UPDATE_COEF(0x66, 0x0008, 0), in alc_headset_mode_omtp()
5235 UPDATE_COEF(0x67, 0x2000, 0), in alc_headset_mode_omtp()
5239 WRITE_COEF(0x6b, 0xe429), in alc_headset_mode_omtp()
5240 WRITE_COEF(0x76, 0x0008), in alc_headset_mode_omtp()
5241 WRITE_COEF(0x18, 0x7388), in alc_headset_mode_omtp()
5245 WRITE_COEF(0x45, 0xe429), /* Set to omtp type */ in alc_headset_mode_omtp()
5246 UPDATE_COEF(0x10, 7<<8, 7<<8), /* SET Line1 JD to 1 */ in alc_headset_mode_omtp()
5250 WRITE_COEF(0x11, 0x0001), in alc_headset_mode_omtp()
5251 WRITE_COEF(0x15, 0x0d50), in alc_headset_mode_omtp()
5252 WRITE_COEF(0xc3, 0x0000), in alc_headset_mode_omtp()
5256 UPDATE_COEF(0x45, 0x3f<<10, 0x39<<10), in alc_headset_mode_omtp()
5257 UPDATE_COEF(0x63, 3<<14, 2<<14), in alc_headset_mode_omtp()
5261 switch (codec->core.vendor_id) { in alc_headset_mode_omtp()
5262 case 0x10ec0255: in alc_headset_mode_omtp()
5263 alc_process_coef_fw(codec, coef0255); in alc_headset_mode_omtp()
5265 case 0x10ec0230: in alc_headset_mode_omtp()
5266 case 0x10ec0236: in alc_headset_mode_omtp()
5267 case 0x10ec0256: in alc_headset_mode_omtp()
5268 alc_process_coef_fw(codec, coef0256); in alc_headset_mode_omtp()
5270 case 0x10ec0234: in alc_headset_mode_omtp()
5271 case 0x10ec0274: in alc_headset_mode_omtp()
5272 case 0x10ec0294: in alc_headset_mode_omtp()
5273 alc_write_coef_idx(codec, 0x45, 0xe689); in alc_headset_mode_omtp()
5275 case 0x10ec0233: in alc_headset_mode_omtp()
5276 case 0x10ec0283: in alc_headset_mode_omtp()
5277 alc_process_coef_fw(codec, coef0233); in alc_headset_mode_omtp()
5279 case 0x10ec0298: in alc_headset_mode_omtp()
5280 alc_update_coef_idx(codec, 0x8e, 0x0070, 0x0010);/* Headset output enable */ in alc_headset_mode_omtp()
5281 alc_update_coef_idx(codec, 0x4f, 0xfcc0, 0xe400); in alc_headset_mode_omtp()
5284 case 0x10ec0286: in alc_headset_mode_omtp()
5285 case 0x10ec0288: in alc_headset_mode_omtp()
5286 alc_update_coef_idx(codec, 0x4f, 0xfcc0, 0xe400); in alc_headset_mode_omtp()
5288 alc_process_coef_fw(codec, coef0288); in alc_headset_mode_omtp()
5290 case 0x10ec0292: in alc_headset_mode_omtp()
5291 alc_process_coef_fw(codec, coef0292); in alc_headset_mode_omtp()
5293 case 0x10ec0293: in alc_headset_mode_omtp()
5294 alc_process_coef_fw(codec, coef0293); in alc_headset_mode_omtp()
5296 case 0x10ec0668: in alc_headset_mode_omtp()
5297 alc_process_coef_fw(codec, coef0688); in alc_headset_mode_omtp()
5299 case 0x10ec0215: in alc_headset_mode_omtp()
5300 case 0x10ec0225: in alc_headset_mode_omtp()
5301 case 0x10ec0285: in alc_headset_mode_omtp()
5302 case 0x10ec0295: in alc_headset_mode_omtp()
5303 case 0x10ec0289: in alc_headset_mode_omtp()
5304 case 0x10ec0299: in alc_headset_mode_omtp()
5305 alc_process_coef_fw(codec, coef0225); in alc_headset_mode_omtp()
5308 codec_dbg(codec, "Headset jack set to Nokia-style headset mode.\n"); in alc_headset_mode_omtp()
5311 static void alc_determine_headset_type(struct hda_codec *codec) in alc_determine_headset_type() argument
5315 struct alc_spec *spec = codec->spec; in alc_determine_headset_type()
5317 WRITE_COEF(0x45, 0xd089), /* combo jack auto switch control(Check type)*/ in alc_determine_headset_type()
5318 WRITE_COEF(0x49, 0x0149), /* combo jack auto switch control(Vref in alc_determine_headset_type()
5323 UPDATE_COEF(0x4f, 0xfcc0, 0xd400), /* Check Type */ in alc_determine_headset_type()
5327 UPDATE_COEF(0x50, 0x2000, 0x2000), in alc_determine_headset_type()
5328 UPDATE_COEF(0x56, 0x0006, 0x0006), in alc_determine_headset_type()
5329 UPDATE_COEF(0x66, 0x0008, 0), in alc_determine_headset_type()
5330 UPDATE_COEF(0x67, 0x2000, 0), in alc_determine_headset_type()
5331 UPDATE_COEF(0x19, 0x1300, 0x1300), in alc_determine_headset_type()
5335 UPDATE_COEF(0x4a, 0x000f, 0x0008), /* Combo Jack auto detect */ in alc_determine_headset_type()
5336 WRITE_COEF(0x45, 0xD429), /* Set to ctia type */ in alc_determine_headset_type()
5340 WRITE_COEF(0x11, 0x0001), in alc_determine_headset_type()
5341 WRITE_COEF(0xb7, 0x802b), in alc_determine_headset_type()
5342 WRITE_COEF(0x15, 0x0d60), in alc_determine_headset_type()
5343 WRITE_COEF(0xc3, 0x0c00), in alc_determine_headset_type()
5347 UPDATE_COEF(0x4a, 0x0010, 0), in alc_determine_headset_type()
5348 UPDATE_COEF(0x4a, 0x8000, 0), in alc_determine_headset_type()
5349 WRITE_COEF(0x45, 0xd289), in alc_determine_headset_type()
5350 UPDATE_COEF(0x49, 0x0300, 0x0300), in alc_determine_headset_type()
5354 if (spec->no_internal_mic_pin) { in alc_determine_headset_type()
5355 alc_update_coef_idx(codec, 0x45, 0xf<<12 | 1<<10, 5<<12); in alc_determine_headset_type()
5359 switch (codec->core.vendor_id) { in alc_determine_headset_type()
5360 case 0x10ec0255: in alc_determine_headset_type()
5361 alc_process_coef_fw(codec, coef0255); in alc_determine_headset_type()
5363 val = alc_read_coef_idx(codec, 0x46); in alc_determine_headset_type()
5364 is_ctia = (val & 0x0070) == 0x0070; in alc_determine_headset_type()
5366 case 0x10ec0230: in alc_determine_headset_type()
5367 case 0x10ec0236: in alc_determine_headset_type()
5368 case 0x10ec0256: in alc_determine_headset_type()
5369 alc_write_coef_idx(codec, 0x1b, 0x0e4b); in alc_determine_headset_type()
5370 alc_write_coef_idx(codec, 0x06, 0x6104); in alc_determine_headset_type()
5371 alc_write_coefex_idx(codec, 0x57, 0x3, 0x09a3); in alc_determine_headset_type()
5373 snd_hda_codec_write(codec, 0x21, 0, in alc_determine_headset_type()
5376 snd_hda_codec_write(codec, 0x21, 0, in alc_determine_headset_type()
5377 AC_VERB_SET_PIN_WIDGET_CONTROL, 0x0); in alc_determine_headset_type()
5379 alc_process_coef_fw(codec, coef0255); in alc_determine_headset_type()
5381 val = alc_read_coef_idx(codec, 0x46); in alc_determine_headset_type()
5382 is_ctia = (val & 0x0070) == 0x0070; in alc_determine_headset_type()
5384 alc_write_coefex_idx(codec, 0x57, 0x3, 0x0da3); in alc_determine_headset_type()
5385 alc_update_coefex_idx(codec, 0x57, 0x5, 1<<14, 0); in alc_determine_headset_type()
5387 snd_hda_codec_write(codec, 0x21, 0, in alc_determine_headset_type()
5390 snd_hda_codec_write(codec, 0x21, 0, in alc_determine_headset_type()
5393 case 0x10ec0234: in alc_determine_headset_type()
5394 case 0x10ec0274: in alc_determine_headset_type()
5395 case 0x10ec0294: in alc_determine_headset_type()
5396 alc_process_coef_fw(codec, coef0274); in alc_determine_headset_type()
5398 val = alc_read_coef_idx(codec, 0x46); in alc_determine_headset_type()
5399 is_ctia = (val & 0x00f0) == 0x00f0; in alc_determine_headset_type()
5401 case 0x10ec0233: in alc_determine_headset_type()
5402 case 0x10ec0283: in alc_determine_headset_type()
5403 alc_write_coef_idx(codec, 0x45, 0xd029); in alc_determine_headset_type()
5405 val = alc_read_coef_idx(codec, 0x46); in alc_determine_headset_type()
5406 is_ctia = (val & 0x0070) == 0x0070; in alc_determine_headset_type()
5408 case 0x10ec0298: in alc_determine_headset_type()
5409 snd_hda_codec_write(codec, 0x21, 0, in alc_determine_headset_type()
5412 snd_hda_codec_write(codec, 0x21, 0, in alc_determine_headset_type()
5413 AC_VERB_SET_PIN_WIDGET_CONTROL, 0x0); in alc_determine_headset_type()
5416 val = alc_read_coef_idx(codec, 0x50); in alc_determine_headset_type()
5418 alc_update_coef_idx(codec, 0x8e, 0x0070, 0x0020); in alc_determine_headset_type()
5419 alc_process_coef_fw(codec, coef0288); in alc_determine_headset_type()
5421 val = alc_read_coef_idx(codec, 0x50); in alc_determine_headset_type()
5422 is_ctia = (val & 0x0070) == 0x0070; in alc_determine_headset_type()
5424 alc_update_coef_idx(codec, 0x8e, 0x0070, 0x0010); in alc_determine_headset_type()
5425 alc_process_coef_fw(codec, coef0288); in alc_determine_headset_type()
5427 val = alc_read_coef_idx(codec, 0x50); in alc_determine_headset_type()
5428 is_ctia = (val & 0x0070) == 0x0070; in alc_determine_headset_type()
5430 alc_process_coef_fw(codec, coef0298); in alc_determine_headset_type()
5431 snd_hda_codec_write(codec, 0x21, 0, in alc_determine_headset_type()
5434 snd_hda_codec_write(codec, 0x21, 0, in alc_determine_headset_type()
5437 case 0x10ec0286: in alc_determine_headset_type()
5438 case 0x10ec0288: in alc_determine_headset_type()
5439 alc_process_coef_fw(codec, coef0288); in alc_determine_headset_type()
5441 val = alc_read_coef_idx(codec, 0x50); in alc_determine_headset_type()
5442 is_ctia = (val & 0x0070) == 0x0070; in alc_determine_headset_type()
5444 case 0x10ec0292: in alc_determine_headset_type()
5445 alc_write_coef_idx(codec, 0x6b, 0xd429); in alc_determine_headset_type()
5447 val = alc_read_coef_idx(codec, 0x6c); in alc_determine_headset_type()
5448 is_ctia = (val & 0x001c) == 0x001c; in alc_determine_headset_type()
5450 case 0x10ec0293: in alc_determine_headset_type()
5451 alc_process_coef_fw(codec, coef0293); in alc_determine_headset_type()
5453 val = alc_read_coef_idx(codec, 0x46); in alc_determine_headset_type()
5454 is_ctia = (val & 0x0070) == 0x0070; in alc_determine_headset_type()
5456 case 0x10ec0668: in alc_determine_headset_type()
5457 alc_process_coef_fw(codec, coef0688); in alc_determine_headset_type()
5459 val = alc_read_coef_idx(codec, 0xbe); in alc_determine_headset_type()
5460 is_ctia = (val & 0x1c02) == 0x1c02; in alc_determine_headset_type()
5462 case 0x10ec0215: in alc_determine_headset_type()
5463 case 0x10ec0225: in alc_determine_headset_type()
5464 case 0x10ec0285: in alc_determine_headset_type()
5465 case 0x10ec0295: in alc_determine_headset_type()
5466 case 0x10ec0289: in alc_determine_headset_type()
5467 case 0x10ec0299: in alc_determine_headset_type()
5468 snd_hda_codec_write(codec, 0x21, 0, in alc_determine_headset_type()
5471 snd_hda_codec_write(codec, 0x21, 0, in alc_determine_headset_type()
5472 AC_VERB_SET_PIN_WIDGET_CONTROL, 0x0); in alc_determine_headset_type()
5474 alc_process_coef_fw(codec, alc225_pre_hsmode); in alc_determine_headset_type()
5475 alc_update_coef_idx(codec, 0x67, 0xf000, 0x1000); in alc_determine_headset_type()
5476 val = alc_read_coef_idx(codec, 0x45); in alc_determine_headset_type()
5478 alc_update_coef_idx(codec, 0x45, 0x3f<<10, 0x34<<10); in alc_determine_headset_type()
5479 alc_update_coef_idx(codec, 0x49, 3<<8, 2<<8); in alc_determine_headset_type()
5481 val = alc_read_coef_idx(codec, 0x46); in alc_determine_headset_type()
5482 is_ctia = (val & 0x00f0) == 0x00f0; in alc_determine_headset_type()
5484 alc_update_coef_idx(codec, 0x45, 0x3f<<10, 0x34<<10); in alc_determine_headset_type()
5485 alc_update_coef_idx(codec, 0x49, 3<<8, 1<<8); in alc_determine_headset_type()
5487 val = alc_read_coef_idx(codec, 0x46); in alc_determine_headset_type()
5488 is_ctia = (val & 0x00f0) == 0x00f0; in alc_determine_headset_type()
5490 alc_update_coef_idx(codec, 0x4a, 7<<6, 7<<6); in alc_determine_headset_type()
5491 alc_update_coef_idx(codec, 0x4a, 3<<4, 3<<4); in alc_determine_headset_type()
5492 alc_update_coef_idx(codec, 0x67, 0xf000, 0x3000); in alc_determine_headset_type()
5494 snd_hda_codec_write(codec, 0x21, 0, in alc_determine_headset_type()
5497 snd_hda_codec_write(codec, 0x21, 0, in alc_determine_headset_type()
5500 case 0x10ec0867: in alc_determine_headset_type()
5505 codec_dbg(codec, "Headset jack detected iPhone-style headset: %s\n", in alc_determine_headset_type()
5507 spec->current_headset_type = is_ctia ? ALC_HEADSET_TYPE_CTIA : ALC_HEADSET_TYPE_OMTP; in alc_determine_headset_type()
5510 static void alc_update_headset_mode(struct hda_codec *codec) in alc_update_headset_mode() argument
5512 struct alc_spec *spec = codec->spec; in alc_update_headset_mode()
5514 hda_nid_t mux_pin = spec->gen.imux_pins[spec->gen.cur_mux[0]]; in alc_update_headset_mode()
5519 if (!snd_hda_jack_detect(codec, hp_pin)) in alc_update_headset_mode()
5521 else if (mux_pin == spec->headset_mic_pin) in alc_update_headset_mode()
5523 else if (mux_pin == spec->headphone_mic_pin) in alc_update_headset_mode()
5528 if (new_headset_mode == spec->current_headset_mode) { in alc_update_headset_mode()
5529 snd_hda_gen_update_outputs(codec); in alc_update_headset_mode()
5535 alc_headset_mode_unplugged(codec); in alc_update_headset_mode()
5536 spec->current_headset_mode = ALC_HEADSET_MODE_UNKNOWN; in alc_update_headset_mode()
5537 spec->current_headset_type = ALC_HEADSET_TYPE_UNKNOWN; in alc_update_headset_mode()
5538 spec->gen.hp_jack_present = false; in alc_update_headset_mode()
5541 if (spec->current_headset_type == ALC_HEADSET_TYPE_UNKNOWN) in alc_update_headset_mode()
5542 alc_determine_headset_type(codec); in alc_update_headset_mode()
5543 if (spec->current_headset_type == ALC_HEADSET_TYPE_CTIA) in alc_update_headset_mode()
5544 alc_headset_mode_ctia(codec); in alc_update_headset_mode()
5545 else if (spec->current_headset_type == ALC_HEADSET_TYPE_OMTP) in alc_update_headset_mode()
5546 alc_headset_mode_omtp(codec); in alc_update_headset_mode()
5547 spec->gen.hp_jack_present = true; in alc_update_headset_mode()
5550 alc_headset_mode_mic_in(codec, hp_pin, spec->headphone_mic_pin); in alc_update_headset_mode()
5551 spec->gen.hp_jack_present = false; in alc_update_headset_mode()
5554 alc_headset_mode_default(codec); in alc_update_headset_mode()
5555 spec->gen.hp_jack_present = true; in alc_update_headset_mode()
5559 snd_hda_set_pin_ctl_cache(codec, hp_pin, in alc_update_headset_mode()
5561 if (spec->headphone_mic_pin && spec->headphone_mic_pin != hp_pin) in alc_update_headset_mode()
5562 snd_hda_set_pin_ctl_cache(codec, spec->headphone_mic_pin, in alc_update_headset_mode()
5565 spec->current_headset_mode = new_headset_mode; in alc_update_headset_mode()
5567 snd_hda_gen_update_outputs(codec); in alc_update_headset_mode()
5570 static void alc_update_headset_mode_hook(struct hda_codec *codec, in alc_update_headset_mode_hook() argument
5574 alc_update_headset_mode(codec); in alc_update_headset_mode_hook()
5577 static void alc_update_headset_jack_cb(struct hda_codec *codec, in alc_update_headset_jack_cb() argument
5580 snd_hda_gen_hp_automute(codec, jack); in alc_update_headset_jack_cb()
5581 alc_update_headset_mode(codec); in alc_update_headset_jack_cb()
5584 static void alc_probe_headset_mode(struct hda_codec *codec) in alc_probe_headset_mode() argument
5587 struct alc_spec *spec = codec->spec; in alc_probe_headset_mode()
5588 struct auto_pin_cfg *cfg = &spec->gen.autocfg; in alc_probe_headset_mode()
5591 for (i = 0; i < cfg->num_inputs; i++) { in alc_probe_headset_mode()
5592 if (cfg->inputs[i].is_headset_mic && !spec->headset_mic_pin) in alc_probe_headset_mode()
5593 spec->headset_mic_pin = cfg->inputs[i].pin; in alc_probe_headset_mode()
5594 if (cfg->inputs[i].is_headphone_mic && !spec->headphone_mic_pin) in alc_probe_headset_mode()
5595 spec->headphone_mic_pin = cfg->inputs[i].pin; in alc_probe_headset_mode()
5598 WARN_ON(spec->gen.cap_sync_hook); in alc_probe_headset_mode()
5599 spec->gen.cap_sync_hook = alc_update_headset_mode_hook; in alc_probe_headset_mode()
5600 spec->gen.automute_hook = alc_update_headset_mode; in alc_probe_headset_mode()
5601 spec->gen.hp_automute_hook = alc_update_headset_jack_cb; in alc_probe_headset_mode()
5604 static void alc_fixup_headset_mode(struct hda_codec *codec, in alc_fixup_headset_mode() argument
5607 struct alc_spec *spec = codec->spec; in alc_fixup_headset_mode()
5611 spec->parse_flags |= HDA_PINCFG_HEADSET_MIC | HDA_PINCFG_HEADPHONE_MIC; in alc_fixup_headset_mode()
5614 alc_probe_headset_mode(codec); in alc_fixup_headset_mode()
5617 if (is_s3_resume(codec) || is_s4_resume(codec)) { in alc_fixup_headset_mode()
5618 spec->current_headset_mode = ALC_HEADSET_MODE_UNKNOWN; in alc_fixup_headset_mode()
5619 spec->current_headset_type = ALC_HEADSET_TYPE_UNKNOWN; in alc_fixup_headset_mode()
5621 alc_update_headset_mode(codec); in alc_fixup_headset_mode()
5626 static void alc_fixup_headset_mode_no_hp_mic(struct hda_codec *codec, in alc_fixup_headset_mode_no_hp_mic() argument
5630 struct alc_spec *spec = codec->spec; in alc_fixup_headset_mode_no_hp_mic()
5631 spec->parse_flags |= HDA_PINCFG_HEADSET_MIC; in alc_fixup_headset_mode_no_hp_mic()
5634 alc_fixup_headset_mode(codec, fix, action); in alc_fixup_headset_mode_no_hp_mic()
5637 static void alc255_set_default_jack_type(struct hda_codec *codec) in alc255_set_default_jack_type() argument
5641 WRITE_COEF(0x1b, 0x880b), in alc255_set_default_jack_type()
5642 WRITE_COEF(0x45, 0xd089), in alc255_set_default_jack_type()
5643 WRITE_COEF(0x1b, 0x080b), in alc255_set_default_jack_type()
5644 WRITE_COEF(0x46, 0x0004), in alc255_set_default_jack_type()
5645 WRITE_COEF(0x1b, 0x0c0b), in alc255_set_default_jack_type()
5649 WRITE_COEF(0x1b, 0x884b), in alc255_set_default_jack_type()
5650 WRITE_COEF(0x45, 0xd089), in alc255_set_default_jack_type()
5651 WRITE_COEF(0x1b, 0x084b), in alc255_set_default_jack_type()
5652 WRITE_COEF(0x46, 0x0004), in alc255_set_default_jack_type()
5653 WRITE_COEF(0x1b, 0x0c4b), in alc255_set_default_jack_type()
5656 switch (codec->core.vendor_id) { in alc255_set_default_jack_type()
5657 case 0x10ec0255: in alc255_set_default_jack_type()
5658 alc_process_coef_fw(codec, alc255fw); in alc255_set_default_jack_type()
5660 case 0x10ec0230: in alc255_set_default_jack_type()
5661 case 0x10ec0236: in alc255_set_default_jack_type()
5662 case 0x10ec0256: in alc255_set_default_jack_type()
5663 alc_process_coef_fw(codec, alc256fw); in alc255_set_default_jack_type()
5669 static void alc_fixup_headset_mode_alc255(struct hda_codec *codec, in alc_fixup_headset_mode_alc255() argument
5673 alc255_set_default_jack_type(codec); in alc_fixup_headset_mode_alc255()
5675 alc_fixup_headset_mode(codec, fix, action); in alc_fixup_headset_mode_alc255()
5678 static void alc_fixup_headset_mode_alc255_no_hp_mic(struct hda_codec *codec, in alc_fixup_headset_mode_alc255_no_hp_mic() argument
5682 struct alc_spec *spec = codec->spec; in alc_fixup_headset_mode_alc255_no_hp_mic()
5683 spec->parse_flags |= HDA_PINCFG_HEADSET_MIC; in alc_fixup_headset_mode_alc255_no_hp_mic()
5684 alc255_set_default_jack_type(codec); in alc_fixup_headset_mode_alc255_no_hp_mic()
5687 alc_fixup_headset_mode(codec, fix, action); in alc_fixup_headset_mode_alc255_no_hp_mic()
5690 static void alc288_update_headset_jack_cb(struct hda_codec *codec, in alc288_update_headset_jack_cb() argument
5693 struct alc_spec *spec = codec->spec; in alc288_update_headset_jack_cb()
5695 alc_update_headset_jack_cb(codec, jack); in alc288_update_headset_jack_cb()
5697 alc_update_gpio_data(codec, 0x40, spec->gen.hp_jack_present); in alc288_update_headset_jack_cb()
5700 static void alc_fixup_headset_mode_dell_alc288(struct hda_codec *codec, in alc_fixup_headset_mode_dell_alc288() argument
5703 alc_fixup_headset_mode(codec, fix, action); in alc_fixup_headset_mode_dell_alc288()
5705 struct alc_spec *spec = codec->spec; in alc_fixup_headset_mode_dell_alc288()
5707 spec->gpio_mask |= 0x40; in alc_fixup_headset_mode_dell_alc288()
5708 spec->gpio_dir |= 0x40; in alc_fixup_headset_mode_dell_alc288()
5709 spec->gen.hp_automute_hook = alc288_update_headset_jack_cb; in alc_fixup_headset_mode_dell_alc288()
5713 static void alc_fixup_auto_mute_via_amp(struct hda_codec *codec, in alc_fixup_auto_mute_via_amp() argument
5717 struct alc_spec *spec = codec->spec; in alc_fixup_auto_mute_via_amp()
5718 spec->gen.auto_mute_via_amp = 1; in alc_fixup_auto_mute_via_amp()
5722 static void alc_fixup_no_shutup(struct hda_codec *codec, in alc_fixup_no_shutup() argument
5726 struct alc_spec *spec = codec->spec; in alc_fixup_no_shutup()
5727 spec->no_shutup_pins = 1; in alc_fixup_no_shutup()
5731 static void alc_fixup_disable_aamix(struct hda_codec *codec, in alc_fixup_disable_aamix() argument
5735 struct alc_spec *spec = codec->spec; in alc_fixup_disable_aamix()
5736 /* Disable AA-loopback as it causes white noise */ in alc_fixup_disable_aamix()
5737 spec->gen.mixer_nid = 0; in alc_fixup_disable_aamix()
5742 static void alc_fixup_tpt440_dock(struct hda_codec *codec, in alc_fixup_tpt440_dock() argument
5746 { 0x16, 0x21211010 }, /* dock headphone */ in alc_fixup_tpt440_dock()
5747 { 0x19, 0x21a11010 }, /* dock mic */ in alc_fixup_tpt440_dock()
5750 struct alc_spec *spec = codec->spec; in alc_fixup_tpt440_dock()
5753 spec->reboot_notify = snd_hda_gen_reboot_notify; /* reduce noise */ in alc_fixup_tpt440_dock()
5754 spec->parse_flags = HDA_PINCFG_NO_HP_FIXUP; in alc_fixup_tpt440_dock()
5755 codec->power_save_node = 0; /* avoid click noises */ in alc_fixup_tpt440_dock()
5756 snd_hda_apply_pincfgs(codec, pincfgs); in alc_fixup_tpt440_dock()
5760 static void alc_fixup_tpt470_dock(struct hda_codec *codec, in alc_fixup_tpt470_dock() argument
5764 { 0x17, 0x21211010 }, /* dock headphone */ in alc_fixup_tpt470_dock()
5765 { 0x19, 0x21a11010 }, /* dock mic */ in alc_fixup_tpt470_dock()
5768 struct alc_spec *spec = codec->spec; in alc_fixup_tpt470_dock()
5771 spec->parse_flags = HDA_PINCFG_NO_HP_FIXUP; in alc_fixup_tpt470_dock()
5772 snd_hda_apply_pincfgs(codec, pincfgs); in alc_fixup_tpt470_dock()
5775 snd_hda_codec_write(codec, 0x17, 0, in alc_fixup_tpt470_dock()
5776 AC_VERB_SET_CONFIG_DEFAULT_BYTES_3, 0); in alc_fixup_tpt470_dock()
5778 snd_hda_codec_write(codec, 0x19, 0, in alc_fixup_tpt470_dock()
5779 AC_VERB_SET_CONFIG_DEFAULT_BYTES_3, 0); in alc_fixup_tpt470_dock()
5783 static void alc_fixup_tpt470_dacs(struct hda_codec *codec, in alc_fixup_tpt470_dacs() argument
5786 /* Assure the speaker pin to be coupled with DAC NID 0x03; otherwise in alc_fixup_tpt470_dacs()
5788 * ALC298 codec in alc_fixup_tpt470_dacs()
5791 0x14, 0x03, 0x17, 0x02, 0x21, 0x02, in alc_fixup_tpt470_dacs()
5792 0 in alc_fixup_tpt470_dacs()
5794 struct alc_spec *spec = codec->spec; in alc_fixup_tpt470_dacs()
5797 spec->gen.preferred_dacs = preferred_pairs; in alc_fixup_tpt470_dacs()
5800 static void alc295_fixup_asus_dacs(struct hda_codec *codec, in alc295_fixup_asus_dacs() argument
5804 0x17, 0x02, 0x21, 0x03, 0 in alc295_fixup_asus_dacs()
5806 struct alc_spec *spec = codec->spec; in alc295_fixup_asus_dacs()
5809 spec->gen.preferred_dacs = preferred_pairs; in alc295_fixup_asus_dacs()
5812 static void alc_shutup_dell_xps13(struct hda_codec *codec) in alc_shutup_dell_xps13() argument
5814 struct alc_spec *spec = codec->spec; in alc_shutup_dell_xps13()
5818 snd_hda_codec_write(codec, hp_pin, 0, in alc_shutup_dell_xps13()
5823 static void alc_fixup_dell_xps13(struct hda_codec *codec, in alc_fixup_dell_xps13() argument
5826 struct alc_spec *spec = codec->spec; in alc_fixup_dell_xps13()
5827 struct hda_input_mux *imux = &spec->gen.input_mux; in alc_fixup_dell_xps13()
5832 /* mic pin 0x19 must be initialized with Vref Hi-Z, otherwise in alc_fixup_dell_xps13()
5835 snd_hda_codec_set_pin_target(codec, 0x19, PIN_VREFHIZ); in alc_fixup_dell_xps13()
5836 spec->shutup = alc_shutup_dell_xps13; in alc_fixup_dell_xps13()
5840 for (i = 0; i < imux->num_items; i++) { in alc_fixup_dell_xps13()
5841 if (spec->gen.imux_pins[i] == 0x12) { in alc_fixup_dell_xps13()
5842 spec->gen.cur_mux[0] = i; in alc_fixup_dell_xps13()
5850 static void alc_fixup_headset_mode_alc662(struct hda_codec *codec, in alc_fixup_headset_mode_alc662() argument
5853 struct alc_spec *spec = codec->spec; in alc_fixup_headset_mode_alc662()
5856 spec->parse_flags |= HDA_PINCFG_HEADSET_MIC; in alc_fixup_headset_mode_alc662()
5857 spec->gen.hp_mic = 1; /* Mic-in is same pin as headphone */ in alc_fixup_headset_mode_alc662()
5859 /* Disable boost for mic-in permanently. (This code is only called in alc_fixup_headset_mode_alc662()
5860 from quirks that guarantee that the headphone is at NID 0x1b.) */ in alc_fixup_headset_mode_alc662()
5861 snd_hda_codec_write(codec, 0x1b, 0, AC_VERB_SET_AMP_GAIN_MUTE, 0x7000); in alc_fixup_headset_mode_alc662()
5862 snd_hda_override_wcaps(codec, 0x1b, get_wcaps(codec, 0x1b) & ~AC_WCAP_IN_AMP); in alc_fixup_headset_mode_alc662()
5864 alc_fixup_headset_mode(codec, fix, action); in alc_fixup_headset_mode_alc662()
5867 static void alc_fixup_headset_mode_alc668(struct hda_codec *codec, in alc_fixup_headset_mode_alc668() argument
5871 alc_write_coef_idx(codec, 0xc4, 0x8000); in alc_fixup_headset_mode_alc668()
5872 alc_update_coef_idx(codec, 0xc2, ~0xfe, 0); in alc_fixup_headset_mode_alc668()
5873 snd_hda_set_pin_ctl_cache(codec, 0x18, 0); in alc_fixup_headset_mode_alc668()
5875 alc_fixup_headset_mode(codec, fix, action); in alc_fixup_headset_mode_alc668()
5878 /* Returns the nid of the external mic input pin, or 0 if it cannot be found. */
5879 static int find_ext_mic_pin(struct hda_codec *codec) in find_ext_mic_pin() argument
5881 struct alc_spec *spec = codec->spec; in find_ext_mic_pin()
5882 struct auto_pin_cfg *cfg = &spec->gen.autocfg; in find_ext_mic_pin()
5887 for (i = 0; i < cfg->num_inputs; i++) { in find_ext_mic_pin()
5888 if (cfg->inputs[i].type != AUTO_PIN_MIC) in find_ext_mic_pin()
5890 nid = cfg->inputs[i].pin; in find_ext_mic_pin()
5891 defcfg = snd_hda_codec_get_pincfg(codec, nid); in find_ext_mic_pin()
5897 return 0; in find_ext_mic_pin()
5900 static void alc271_hp_gate_mic_jack(struct hda_codec *codec, in alc271_hp_gate_mic_jack() argument
5904 struct alc_spec *spec = codec->spec; in alc271_hp_gate_mic_jack()
5907 int mic_pin = find_ext_mic_pin(codec); in alc271_hp_gate_mic_jack()
5912 snd_hda_jack_set_gating_jack(codec, mic_pin, hp_pin); in alc271_hp_gate_mic_jack()
5916 static void alc269_fixup_limit_int_mic_boost(struct hda_codec *codec, in alc269_fixup_limit_int_mic_boost() argument
5920 struct alc_spec *spec = codec->spec; in alc269_fixup_limit_int_mic_boost()
5921 struct auto_pin_cfg *cfg = &spec->gen.autocfg; in alc269_fixup_limit_int_mic_boost()
5926 Therefore limit the boost to 0 or 1. */ in alc269_fixup_limit_int_mic_boost()
5931 for (i = 0; i < cfg->num_inputs; i++) { in alc269_fixup_limit_int_mic_boost()
5932 hda_nid_t nid = cfg->inputs[i].pin; in alc269_fixup_limit_int_mic_boost()
5934 if (cfg->inputs[i].type != AUTO_PIN_MIC) in alc269_fixup_limit_int_mic_boost()
5936 defcfg = snd_hda_codec_get_pincfg(codec, nid); in alc269_fixup_limit_int_mic_boost()
5940 snd_hda_override_amp_caps(codec, nid, HDA_INPUT, in alc269_fixup_limit_int_mic_boost()
5941 (0x00 << AC_AMPCAP_OFFSET_SHIFT) | in alc269_fixup_limit_int_mic_boost()
5942 (0x01 << AC_AMPCAP_NUM_STEPS_SHIFT) | in alc269_fixup_limit_int_mic_boost()
5943 (0x2f << AC_AMPCAP_STEP_SIZE_SHIFT) | in alc269_fixup_limit_int_mic_boost()
5944 (0 << AC_AMPCAP_MUTE_SHIFT)); in alc269_fixup_limit_int_mic_boost()
5948 static void alc283_hp_automute_hook(struct hda_codec *codec, in alc283_hp_automute_hook() argument
5951 struct alc_spec *spec = codec->spec; in alc283_hp_automute_hook()
5955 snd_hda_gen_hp_automute(codec, jack); in alc283_hp_automute_hook()
5957 vref = spec->gen.hp_jack_present ? PIN_VREF80 : 0; in alc283_hp_automute_hook()
5960 snd_hda_codec_write(codec, 0x19, 0, AC_VERB_SET_PIN_WIDGET_CONTROL, in alc283_hp_automute_hook()
5964 static void alc283_fixup_chromebook(struct hda_codec *codec, in alc283_fixup_chromebook() argument
5967 struct alc_spec *spec = codec->spec; in alc283_fixup_chromebook()
5971 snd_hda_override_wcaps(codec, 0x03, 0); in alc283_fixup_chromebook()
5972 /* Disable AA-loopback as it causes white noise */ in alc283_fixup_chromebook()
5973 spec->gen.mixer_nid = 0; in alc283_fixup_chromebook()
5976 /* MIC2-VREF control */ in alc283_fixup_chromebook()
5978 alc_update_coef_idx(codec, 0x06, 0x000c, 0); in alc283_fixup_chromebook()
5980 alc_update_coef_idx(codec, 0x1a, 0, 1 << 4); in alc283_fixup_chromebook()
5985 static void alc283_fixup_sense_combo_jack(struct hda_codec *codec, in alc283_fixup_sense_combo_jack() argument
5988 struct alc_spec *spec = codec->spec; in alc283_fixup_sense_combo_jack()
5992 spec->gen.hp_automute_hook = alc283_hp_automute_hook; in alc283_fixup_sense_combo_jack()
5995 /* MIC2-VREF control */ in alc283_fixup_sense_combo_jack()
5997 alc_update_coef_idx(codec, 0x06, 0x000c, 0); in alc283_fixup_sense_combo_jack()
6002 /* mute tablet speaker pin (0x14) via dock plugging in addition */
6003 static void asus_tx300_automute(struct hda_codec *codec) in asus_tx300_automute() argument
6005 struct alc_spec *spec = codec->spec; in asus_tx300_automute()
6006 snd_hda_gen_update_outputs(codec); in asus_tx300_automute()
6007 if (snd_hda_jack_detect(codec, 0x1b)) in asus_tx300_automute()
6008 spec->gen.mute_bits |= (1ULL << 0x14); in asus_tx300_automute()
6011 static void alc282_fixup_asus_tx300(struct hda_codec *codec, in alc282_fixup_asus_tx300() argument
6014 struct alc_spec *spec = codec->spec; in alc282_fixup_asus_tx300()
6016 { 0x1b, 0x21114000 }, /* dock speaker pin */ in alc282_fixup_asus_tx300()
6022 spec->init_amp = ALC_INIT_DEFAULT; in alc282_fixup_asus_tx300()
6024 alc_setup_gpio(codec, 0x04); in alc282_fixup_asus_tx300()
6025 snd_hda_apply_pincfgs(codec, dock_pins); in alc282_fixup_asus_tx300()
6026 spec->gen.auto_mute_via_amp = 1; in alc282_fixup_asus_tx300()
6027 spec->gen.automute_hook = asus_tx300_automute; in alc282_fixup_asus_tx300()
6028 snd_hda_jack_detect_enable_callback(codec, 0x1b, in alc282_fixup_asus_tx300()
6032 spec->init_amp = ALC_INIT_DEFAULT; in alc282_fixup_asus_tx300()
6038 rename_ctl(codec, "Speaker Playback Switch", in alc282_fixup_asus_tx300()
6040 rename_ctl(codec, "Bass Speaker Playback Switch", in alc282_fixup_asus_tx300()
6046 static void alc290_fixup_mono_speakers(struct hda_codec *codec, in alc290_fixup_mono_speakers() argument
6050 /* DAC node 0x03 is giving mono output. We therefore want to in alc290_fixup_mono_speakers()
6051 make sure 0x14 (front speaker) and 0x15 (headphones) use the in alc290_fixup_mono_speakers()
6052 stereo DAC, while leaving 0x17 (bass speaker) for node 0x03. */ in alc290_fixup_mono_speakers()
6053 static const hda_nid_t conn1[] = { 0x0c }; in alc290_fixup_mono_speakers()
6054 snd_hda_override_conn_list(codec, 0x14, ARRAY_SIZE(conn1), conn1); in alc290_fixup_mono_speakers()
6055 snd_hda_override_conn_list(codec, 0x15, ARRAY_SIZE(conn1), conn1); in alc290_fixup_mono_speakers()
6059 static void alc298_fixup_speaker_volume(struct hda_codec *codec, in alc298_fixup_speaker_volume() argument
6063 /* The speaker is routed to the Node 0x06 by a mistake, as a result in alc298_fixup_speaker_volume()
6065 Amp-out capability. we change the speaker's route to: in alc298_fixup_speaker_volume()
6066 Node 0x02 (Audio Output) -> Node 0x0c (Audio Mixer) -> Node 0x17 ( in alc298_fixup_speaker_volume()
6067 Pin Complex), since Node 0x02 has Amp-out caps, we can adjust in alc298_fixup_speaker_volume()
6070 static const hda_nid_t conn1[] = { 0x0c }; in alc298_fixup_speaker_volume()
6071 snd_hda_override_conn_list(codec, 0x17, ARRAY_SIZE(conn1), conn1); in alc298_fixup_speaker_volume()
6075 /* disable DAC3 (0x06) selection on NID 0x17 as it has no volume amp control */
6076 static void alc295_fixup_disable_dac3(struct hda_codec *codec, in alc295_fixup_disable_dac3() argument
6080 static const hda_nid_t conn[] = { 0x02, 0x03 }; in alc295_fixup_disable_dac3()
6081 snd_hda_override_conn_list(codec, 0x17, ARRAY_SIZE(conn), conn); in alc295_fixup_disable_dac3()
6085 /* force NID 0x17 (Bass Speaker) to DAC1 to share it with the main speaker */
6086 static void alc285_fixup_speaker2_to_dac1(struct hda_codec *codec, in alc285_fixup_speaker2_to_dac1() argument
6090 static const hda_nid_t conn[] = { 0x02 }; in alc285_fixup_speaker2_to_dac1()
6091 snd_hda_override_conn_list(codec, 0x17, ARRAY_SIZE(conn), conn); in alc285_fixup_speaker2_to_dac1()
6096 static void alc280_hp_gpio4_automute_hook(struct hda_codec *codec, in alc280_hp_gpio4_automute_hook() argument
6099 struct alc_spec *spec = codec->spec; in alc280_hp_gpio4_automute_hook()
6101 snd_hda_gen_hp_automute(codec, jack); in alc280_hp_gpio4_automute_hook()
6102 /* mute_led_polarity is set to 0, so we pass inverted value here */ in alc280_hp_gpio4_automute_hook()
6103 alc_update_gpio_led(codec, 0x10, spec->mute_led_polarity, in alc280_hp_gpio4_automute_hook()
6104 !spec->gen.hp_jack_present); in alc280_hp_gpio4_automute_hook()
6113 static void alc280_fixup_hp_9480m(struct hda_codec *codec, in alc280_fixup_hp_9480m() argument
6117 struct alc_spec *spec = codec->spec; in alc280_fixup_hp_9480m()
6119 alc_fixup_hp_gpio_led(codec, action, 0x08, 0); in alc280_fixup_hp_9480m()
6122 spec->gpio_mask |= 0x10; in alc280_fixup_hp_9480m()
6123 spec->gpio_dir |= 0x10; in alc280_fixup_hp_9480m()
6124 spec->gen.hp_automute_hook = alc280_hp_gpio4_automute_hook; in alc280_fixup_hp_9480m()
6128 static void alc275_fixup_gpio4_off(struct hda_codec *codec, in alc275_fixup_gpio4_off() argument
6132 struct alc_spec *spec = codec->spec; in alc275_fixup_gpio4_off()
6135 spec->gpio_mask |= 0x04; in alc275_fixup_gpio4_off()
6136 spec->gpio_dir |= 0x04; in alc275_fixup_gpio4_off()
6143 * DAC1 (NID 0x02) -> Speaker (NID 0x14); some eq applied secretly
6144 * DAC2 (NID 0x03) -> Bass (NID 0x17) & Headphone (NID 0x21); sharing a DAC
6145 * DAC3 (NID 0x06) -> Unused, due to the lack of volume amp
6147 static void alc285_fixup_thinkpad_x1_gen7(struct hda_codec *codec, in alc285_fixup_thinkpad_x1_gen7() argument
6150 static const hda_nid_t conn[] = { 0x02, 0x03 }; /* exclude 0x06 */ in alc285_fixup_thinkpad_x1_gen7()
6152 0x14, 0x02, 0x17, 0x03, 0x21, 0x03, 0 in alc285_fixup_thinkpad_x1_gen7()
6154 struct alc_spec *spec = codec->spec; in alc285_fixup_thinkpad_x1_gen7()
6158 snd_hda_override_conn_list(codec, 0x17, ARRAY_SIZE(conn), conn); in alc285_fixup_thinkpad_x1_gen7()
6159 spec->gen.preferred_dacs = preferred_pairs; in alc285_fixup_thinkpad_x1_gen7()
6168 rename_ctl(codec, "Front Playback Volume", "DAC1 Playback Volume"); in alc285_fixup_thinkpad_x1_gen7()
6169 rename_ctl(codec, "Bass Speaker Playback Volume", "DAC2 Playback Volume"); in alc285_fixup_thinkpad_x1_gen7()
6174 static void alc233_alc662_fixup_lenovo_dual_codecs(struct hda_codec *codec, in alc233_alc662_fixup_lenovo_dual_codecs() argument
6178 alc_fixup_dual_codecs(codec, fix, action); in alc233_alc662_fixup_lenovo_dual_codecs()
6182 strcpy(codec->card->longname, "HDAudio-Lenovo-DualCodecs"); in alc233_alc662_fixup_lenovo_dual_codecs()
6185 /* rename Capture controls depending on the codec */ in alc233_alc662_fixup_lenovo_dual_codecs()
6186 rename_ctl(codec, "Capture Volume", in alc233_alc662_fixup_lenovo_dual_codecs()
6187 codec->addr == 0 ? in alc233_alc662_fixup_lenovo_dual_codecs()
6188 "Rear-Panel Capture Volume" : in alc233_alc662_fixup_lenovo_dual_codecs()
6189 "Front-Panel Capture Volume"); in alc233_alc662_fixup_lenovo_dual_codecs()
6190 rename_ctl(codec, "Capture Switch", in alc233_alc662_fixup_lenovo_dual_codecs()
6191 codec->addr == 0 ? in alc233_alc662_fixup_lenovo_dual_codecs()
6192 "Rear-Panel Capture Switch" : in alc233_alc662_fixup_lenovo_dual_codecs()
6193 "Front-Panel Capture Switch"); in alc233_alc662_fixup_lenovo_dual_codecs()
6198 static void alc225_fixup_s3_pop_noise(struct hda_codec *codec, in alc225_fixup_s3_pop_noise() argument
6204 codec->power_save_node = 1; in alc225_fixup_s3_pop_noise()
6207 /* Forcibly assign NID 0x03 to HP/LO while NID 0x02 to SPK for EQ */
6208 static void alc274_fixup_bind_dacs(struct hda_codec *codec, in alc274_fixup_bind_dacs() argument
6211 struct alc_spec *spec = codec->spec; in alc274_fixup_bind_dacs()
6213 0x21, 0x03, 0x1b, 0x03, 0x16, 0x02, in alc274_fixup_bind_dacs()
6214 0 in alc274_fixup_bind_dacs()
6220 spec->gen.preferred_dacs = preferred_pairs; in alc274_fixup_bind_dacs()
6221 spec->gen.auto_mute_via_amp = 1; in alc274_fixup_bind_dacs()
6222 codec->power_save_node = 0; in alc274_fixup_bind_dacs()
6225 /* avoid DAC 0x06 for bass speaker 0x17; it has no volume control */
6226 static void alc289_fixup_asus_ga401(struct hda_codec *codec, in alc289_fixup_asus_ga401() argument
6230 0x14, 0x02, 0x17, 0x02, 0x21, 0x03, 0 in alc289_fixup_asus_ga401()
6232 struct alc_spec *spec = codec->spec; in alc289_fixup_asus_ga401()
6235 spec->gen.preferred_dacs = preferred_pairs; in alc289_fixup_asus_ga401()
6236 spec->gen.obey_preferred_dacs = 1; in alc289_fixup_asus_ga401()
6240 /* The DAC of NID 0x3 will introduce click/pop noise on headphones, so invalidate it */
6241 static void alc285_fixup_invalidate_dacs(struct hda_codec *codec, in alc285_fixup_invalidate_dacs() argument
6247 snd_hda_override_wcaps(codec, 0x03, 0); in alc285_fixup_invalidate_dacs()
6250 static void alc_combo_jack_hp_jd_restart(struct hda_codec *codec) in alc_combo_jack_hp_jd_restart() argument
6252 switch (codec->core.vendor_id) { in alc_combo_jack_hp_jd_restart()
6253 case 0x10ec0274: in alc_combo_jack_hp_jd_restart()
6254 case 0x10ec0294: in alc_combo_jack_hp_jd_restart()
6255 case 0x10ec0225: in alc_combo_jack_hp_jd_restart()
6256 case 0x10ec0295: in alc_combo_jack_hp_jd_restart()
6257 case 0x10ec0299: in alc_combo_jack_hp_jd_restart()
6258 alc_update_coef_idx(codec, 0x4a, 0x8000, 1 << 15); /* Reset HP JD */ in alc_combo_jack_hp_jd_restart()
6259 alc_update_coef_idx(codec, 0x4a, 0x8000, 0 << 15); in alc_combo_jack_hp_jd_restart()
6261 case 0x10ec0230: in alc_combo_jack_hp_jd_restart()
6262 case 0x10ec0235: in alc_combo_jack_hp_jd_restart()
6263 case 0x10ec0236: in alc_combo_jack_hp_jd_restart()
6264 case 0x10ec0255: in alc_combo_jack_hp_jd_restart()
6265 case 0x10ec0256: in alc_combo_jack_hp_jd_restart()
6266 alc_update_coef_idx(codec, 0x1b, 0x8000, 1 << 15); /* Reset HP JD */ in alc_combo_jack_hp_jd_restart()
6267 alc_update_coef_idx(codec, 0x1b, 0x8000, 0 << 15); in alc_combo_jack_hp_jd_restart()
6272 static void alc295_fixup_chromebook(struct hda_codec *codec, in alc295_fixup_chromebook() argument
6275 struct alc_spec *spec = codec->spec; in alc295_fixup_chromebook()
6279 spec->ultra_low_power = true; in alc295_fixup_chromebook()
6282 alc_combo_jack_hp_jd_restart(codec); in alc295_fixup_chromebook()
6287 static void alc_fixup_disable_mic_vref(struct hda_codec *codec, in alc_fixup_disable_mic_vref() argument
6291 snd_hda_codec_set_pin_target(codec, 0x19, PIN_VREFHIZ); in alc_fixup_disable_mic_vref()
6295 static void alc294_gx502_toggle_output(struct hda_codec *codec, in alc294_gx502_toggle_output() argument
6298 /* The Windows driver sets the codec up in a very different way where in alc294_gx502_toggle_output()
6299 * it appears to leave 0x10 = 0x8a20 set. For Linux we need to toggle it in alc294_gx502_toggle_output()
6301 if (snd_hda_jack_detect_state(codec, 0x21) == HDA_JACK_PRESENT) in alc294_gx502_toggle_output()
6302 alc_write_coef_idx(codec, 0x10, 0x8a20); in alc294_gx502_toggle_output()
6304 alc_write_coef_idx(codec, 0x10, 0x0a20); in alc294_gx502_toggle_output()
6307 static void alc294_fixup_gx502_hp(struct hda_codec *codec, in alc294_fixup_gx502_hp() argument
6310 /* Pin 0x21: headphones/headset mic */ in alc294_fixup_gx502_hp()
6311 if (!is_jack_detectable(codec, 0x21)) in alc294_fixup_gx502_hp()
6316 snd_hda_jack_detect_enable_callback(codec, 0x21, in alc294_fixup_gx502_hp()
6323 alc294_gx502_toggle_output(codec, NULL); in alc294_fixup_gx502_hp()
6328 static void alc294_gu502_toggle_output(struct hda_codec *codec, in alc294_gu502_toggle_output() argument
6331 /* Windows sets 0x10 to 0x8420 for Node 0x20 which is in alc294_gu502_toggle_output()
6334 if (snd_hda_jack_detect_state(codec, 0x21) == HDA_JACK_PRESENT) in alc294_gu502_toggle_output()
6335 alc_write_coef_idx(codec, 0x10, 0x8420); in alc294_gu502_toggle_output()
6337 alc_write_coef_idx(codec, 0x10, 0x0a20); in alc294_gu502_toggle_output()
6340 static void alc294_fixup_gu502_hp(struct hda_codec *codec, in alc294_fixup_gu502_hp() argument
6343 if (!is_jack_detectable(codec, 0x21)) in alc294_fixup_gu502_hp()
6348 snd_hda_jack_detect_enable_callback(codec, 0x21, in alc294_fixup_gu502_hp()
6352 alc294_gu502_toggle_output(codec, NULL); in alc294_fixup_gu502_hp()
6357 static void alc285_fixup_hp_gpio_amp_init(struct hda_codec *codec, in alc285_fixup_hp_gpio_amp_init() argument
6364 alc_write_coef_idx(codec, 0x65, 0x0); in alc285_fixup_hp_gpio_amp_init()
6367 static void alc274_fixup_hp_headset_mic(struct hda_codec *codec, in alc274_fixup_hp_headset_mic() argument
6372 alc_combo_jack_hp_jd_restart(codec); in alc274_fixup_hp_headset_mic()
6377 static void alc_fixup_no_int_mic(struct hda_codec *codec, in alc_fixup_no_int_mic() argument
6380 struct alc_spec *spec = codec->spec; in alc_fixup_no_int_mic()
6385 alc_update_coef_idx(codec, 0x45, 0xf<<12 | 1<<10, 5<<12); in alc_fixup_no_int_mic()
6386 spec->no_internal_mic_pin = true; in alc_fixup_no_int_mic()
6389 alc_combo_jack_hp_jd_restart(codec); in alc_fixup_no_int_mic()
6397 static void alc285_fixup_hp_spectre_x360_eb1(struct hda_codec *codec, in alc285_fixup_hp_spectre_x360_eb1() argument
6400 static const hda_nid_t conn[] = { 0x02 }; in alc285_fixup_hp_spectre_x360_eb1()
6402 struct alc_spec *spec = codec->spec; in alc285_fixup_hp_spectre_x360_eb1()
6404 { 0x14, 0x90170110 }, /* front/high speakers */ in alc285_fixup_hp_spectre_x360_eb1()
6405 { 0x17, 0x90170130 }, /* back/bass speakers */ in alc285_fixup_hp_spectre_x360_eb1()
6410 alc_fixup_hp_gpio_led(codec, action, 0x00, 0x04); in alc285_fixup_hp_spectre_x360_eb1()
6414 spec->micmute_led_polarity = 1; in alc285_fixup_hp_spectre_x360_eb1()
6416 spec->gpio_mask |= 0x01; in alc285_fixup_hp_spectre_x360_eb1()
6417 spec->gpio_dir |= 0x01; in alc285_fixup_hp_spectre_x360_eb1()
6418 snd_hda_apply_pincfgs(codec, pincfgs); in alc285_fixup_hp_spectre_x360_eb1()
6420 snd_hda_override_conn_list(codec, 0x14, ARRAY_SIZE(conn), conn); in alc285_fixup_hp_spectre_x360_eb1()
6421 snd_hda_override_conn_list(codec, 0x17, ARRAY_SIZE(conn), conn); in alc285_fixup_hp_spectre_x360_eb1()
6425 alc_update_gpio_data(codec, 0x01, true); in alc285_fixup_hp_spectre_x360_eb1()
6427 alc_update_gpio_data(codec, 0x01, false); in alc285_fixup_hp_spectre_x360_eb1()
6432 static void alc285_fixup_hp_spectre_x360(struct hda_codec *codec, in alc285_fixup_hp_spectre_x360() argument
6435 static const hda_nid_t conn[] = { 0x02 }; in alc285_fixup_hp_spectre_x360()
6437 { 0x14, 0x90170110 }, /* rear speaker */ in alc285_fixup_hp_spectre_x360()
6443 snd_hda_apply_pincfgs(codec, pincfgs); in alc285_fixup_hp_spectre_x360()
6445 snd_hda_override_conn_list(codec, 0x17, ARRAY_SIZE(conn), conn); in alc285_fixup_hp_spectre_x360()
6453 static void alc_fixup_thinkpad_acpi(struct hda_codec *codec, in alc_fixup_thinkpad_acpi() argument
6456 alc_fixup_no_shutup(codec, fix, action); /* reduce click noise */ in alc_fixup_thinkpad_acpi()
6457 hda_fixup_thinkpad_acpi(codec, fix, action); in alc_fixup_thinkpad_acpi()
6461 static void alc287_fixup_legion_15imhg05_speakers(struct hda_codec *codec, in alc287_fixup_legion_15imhg05_speakers() argument
6465 struct alc_spec *spec = codec->spec; in alc287_fixup_legion_15imhg05_speakers()
6469 spec->gen.suppress_auto_mute = 1; in alc287_fixup_legion_15imhg05_speakers()
6481 WRITE_COEF(0x10, 0x0020), WRITE_COEF(0x24, 0x0000),
6482 WRITE_COEF(0x26, 0x0000), WRITE_COEF(0x29, 0x3000),
6483 WRITE_COEF(0x37, 0xfe05), WRITE_COEF(0x45, 0x5089),
6487 static void alc256_fixup_set_coef_defaults(struct hda_codec *codec, in alc256_fixup_set_coef_defaults() argument
6496 * plugged-in state, while the internal microphone is always in an in alc256_fixup_set_coef_defaults()
6499 alc_process_coef_fw(codec, alc256_fixup_set_coef_defaults_coefs); in alc256_fixup_set_coef_defaults()
6503 WRITE_COEF(0x1a, 0x9003), WRITE_COEF(0x1b, 0x0e2b), WRITE_COEF(0x37, 0xfe06),
6504 WRITE_COEF(0x38, 0x4981), WRITE_COEF(0x45, 0xd489), WRITE_COEF(0x46, 0x0074),
6505 WRITE_COEF(0x49, 0x0149),
6509 static void alc233_fixup_no_audio_jack(struct hda_codec *codec, in alc233_fixup_no_audio_jack() argument
6520 alc_process_coef_fw(codec, alc233_fixup_no_audio_jack_coefs); in alc233_fixup_no_audio_jack()
6523 static void alc256_fixup_mic_no_presence_and_resume(struct hda_codec *codec, in alc256_fixup_mic_no_presence_and_resume() argument
6528 * The Clevo NJ51CU comes either with the ALC293 or the ALC256 codec, in alc256_fixup_mic_no_presence_and_resume()
6529 * but uses the 0x8686 subproduct id in both cases. The ALC256 codec in alc256_fixup_mic_no_presence_and_resume()
6532 if (codec->core.vendor_id == 0x10ec0256) { in alc256_fixup_mic_no_presence_and_resume()
6533 alc_update_coef_idx(codec, 0x10, 1<<9, 0); in alc256_fixup_mic_no_presence_and_resume()
6534 snd_hda_codec_set_pincfg(codec, 0x19, 0x04a11120); in alc256_fixup_mic_no_presence_and_resume()
6536 snd_hda_codec_set_pincfg(codec, 0x1a, 0x04a1113c); in alc256_fixup_mic_no_presence_and_resume()
6772 {0x19, PIN_VREFGRD},
6786 {0x20, AC_VERB_SET_COEF_INDEX, 13},
6787 {0x20, AC_VERB_SET_PROC_COEF, 0x4040},
6798 { 0x17, 0x99130111 }, /* subwoofer */
6805 {0x14, AC_VERB_SET_EAPD_BTLENABLE, 0},
6846 { 0x1a, 0x2101103f }, /* dock line-out */
6847 { 0x1b, 0x23a11040 }, /* dock mic-in */
6856 { 0x19, 0x01a1903c }, /* headset mic, with jack detect */
6863 { 0x21, 0x0221102f }, /* HP out */
6878 { 0x14, 0x99130110 }, /* speaker */
6879 { 0x15, 0x0121401f }, /* HP out */
6880 { 0x18, 0x01a19c20 }, /* mic */
6881 { 0x19, 0x99a3092f }, /* int-mic */
6888 { 0x12, 0x99a3092f }, /* int-mic */
6889 { 0x14, 0x99130110 }, /* speaker */
6890 { 0x15, 0x0121401f }, /* HP out */
6891 { 0x18, 0x01a19c20 }, /* mic */
6898 { 0x14, 0x99130110 }, /* speaker */
6899 { 0x18, 0x01a19c20 }, /* mic */
6900 { 0x19, 0x99a3092f }, /* int-mic */
6901 { 0x21, 0x0121401f }, /* HP out */
6908 { 0x12, 0x99a3092f }, /* int-mic */
6909 { 0x14, 0x99130110 }, /* speaker */
6910 { 0x18, 0x01a19c20 }, /* mic */
6911 { 0x21, 0x0121401f }, /* HP out */
6956 { 0x19, 0x23a11040 }, /* dock mic */
6957 { 0x1b, 0x2121103f }, /* dock headphone */
6978 { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */
6979 { 0x1a, 0x01a1913d }, /* use as headphone mic, without its own jack detect */
6988 { 0x16, 0x21014020 }, /* dock line out */
6989 { 0x19, 0x21a19030 }, /* dock mic */
6990 { 0x1a, 0x01a1913c }, /* use as headset mic, without its own jack detect */
6999 { 0x1a, 0x01a1913c }, /* use as headset mic, without its own jack detect */
7008 { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */
7009 { 0x1b, 0x01a1913d }, /* use as headphone mic, without its own jack detect */
7028 { 0x19, 0x01a1913c }, /* headset mic w/o jack detect */
7037 { 0x18, 0x01a1913c }, /* use as headset mic, without its own jack detect */
7046 {0x12, 0x90a60130},
7047 {0x13, 0x40000000},
7048 {0x14, 0x90170110},
7049 {0x18, 0x411111f0},
7050 {0x19, 0x04a11040},
7051 {0x1a, 0x411111f0},
7052 {0x1b, 0x90170112},
7053 {0x1d, 0x40759a05},
7054 {0x1e, 0x411111f0},
7055 {0x21, 0x04211020},
7074 {0x18, AC_VERB_SET_PIN_WIDGET_CONTROL, 0},
7075 {0x20, AC_VERB_SET_COEF_INDEX, 0x08},
7076 {0x20, AC_VERB_SET_PROC_COEF, 0x0310},
7085 { 0x18, 0x04a1182c }, /* Headset mic */
7094 { 0x14, 0x99130110 }, /* speaker */
7095 { 0x19, 0x01a19c20 }, /* mic */
7096 { 0x1b, 0x99a7012f }, /* int-mic */
7097 { 0x21, 0x0121401f }, /* HP out */
7116 { 0x12, 0x99a3092f }, /* int-mic */
7117 { 0x14, 0x99130110 }, /* speaker */
7118 { 0x18, 0x03a11c20 }, /* mic */
7119 { 0x1e, 0x0346101e }, /* SPDIF1 */
7120 { 0x21, 0x0321101f }, /* HP out */
7141 /* class-D output amp +5dB */
7142 { 0x20, AC_VERB_SET_COEF_INDEX, 0x12 },
7143 { 0x20, AC_VERB_SET_PROC_COEF, 0x2800 },
7158 { 0x12, 0x99a3092f }, /* int-mic */
7159 { 0x18, 0x03a11d20 }, /* mic */
7160 { 0x19, 0x411111f0 }, /* Unused bogus pin */
7181 {0x20, AC_VERB_SET_COEF_INDEX, 0x1a},
7182 {0x20, AC_VERB_SET_PROC_COEF, 0x0011},
7191 { 0x17, 0x90170112 }, /* subwoofer */
7200 { 0x17, 0x90170112 }, /* subwoofer */
7231 { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */
7240 { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */
7249 { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */
7250 { 0x1a, 0x01a1913d }, /* use as headphone mic, without its own jack detect */
7259 { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */
7278 { 0x18, 0x01a1913d }, /* use as headphone mic, without its own jack detect */
7279 { 0x1a, 0x01a1913c }, /* use as headset mic, without its own jack detect */
7300 { 0x19, 0x04a110f0 },
7311 { 0x12, 0x90a60130 },
7312 { 0x14, 0x90170110 },
7313 { 0x17, 0x40000008 },
7314 { 0x18, 0x411111f0 },
7315 { 0x19, 0x01a1913c },
7316 { 0x1a, 0x411111f0 },
7317 { 0x1b, 0x411111f0 },
7318 { 0x1d, 0x40f89b2d },
7319 { 0x1e, 0x411111f0 },
7320 { 0x21, 0x0321101f },
7343 { 0x1b, 0x21011020 }, /* line-out */
7344 { 0x1a, 0x01a1903c }, /* headset mic */
7345 { 0x18, 0x2181103f }, /* line-in */
7354 { 0x1b, 0x21011020 }, /* line-out */
7355 { 0x18, 0x2181103f }, /* line-in */
7380 { 0x18, 0x01a1913c }, /* use as headset mic, without its own jack detect */
7381 { 0x1a, 0x01a1913d }, /* use as headphone mic, without its own jack detect */
7427 { 0x18, 0x01a1913c }, /* headset mic w/o jack detect */
7436 { 0x18, 0x01a1913c }, /* use as headset mic, without its own jack detect */
7437 { 0x1a, 0x01a1913d }, /* use as headphone mic, without its own jack detect */
7446 { 0x18, 0x01a1913c }, /* use as headset mic, without its own jack detect */
7456 {0x20, AC_VERB_SET_COEF_INDEX, 0x1f},
7457 {0x20, AC_VERB_SET_PROC_COEF, 0x00c0},
7458 {0x20, AC_VERB_SET_COEF_INDEX, 0x30},
7459 {0x20, AC_VERB_SET_PROC_COEF, 0x00b1},
7498 /* Disable pass-through path for FRONT 14h */
7499 { 0x20, AC_VERB_SET_COEF_INDEX, 0x36 },
7500 { 0x20, AC_VERB_SET_PROC_COEF, 0x57d7 },
7515 { 0x19, 0x02a19020 }, /* Front Mic */
7548 { 0x1b, 0x90170151 },
7563 { 0x18, 0x01a1913c }, /* use as headset mic, without its own jack detect */
7564 { 0x1a, 0x01a1913d }, /* use as headphone mic, without its own jack detect */
7577 { 0x13, 0x90a60160 }, /* use as internal mic */
7578 { 0x19, 0x04a11120 }, /* use as headset mic, without its own jack detect */
7592 { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */
7602 {0x20, AC_VERB_SET_COEF_INDEX, 0x40},
7603 {0x20, AC_VERB_SET_PROC_COEF, 0x8800},
7618 { 0x20, AC_VERB_SET_COEF_INDEX, 0x45 },
7619 { 0x20, AC_VERB_SET_PROC_COEF, 0x5089 },
7633 { 0x1a, 0x04a19040 },
7640 { 0x16, 0x0101102f }, /* Rear Headset HP */
7641 { 0x19, 0x02a1913c }, /* use as Front headset mic, without its own jack detect */
7642 { 0x1a, 0x01a19030 }, /* Rear Headset MIC */
7643 { 0x1b, 0x02011020 },
7659 {0x20, AC_VERB_SET_COEF_INDEX, 0x45},
7660 {0x20, AC_VERB_SET_PROC_COEF, 0x5289},
7661 {0x20, AC_VERB_SET_COEF_INDEX, 0x4A},
7662 {0x20, AC_VERB_SET_PROC_COEF, 0x001b},
7663 {0x58, AC_VERB_SET_COEF_INDEX, 0x00},
7664 {0x58, AC_VERB_SET_PROC_COEF, 0x3888},
7665 {0x20, AC_VERB_SET_COEF_INDEX, 0x6f},
7666 {0x20, AC_VERB_SET_PROC_COEF, 0x2c0b},
7679 { 0x1b, 0x0401102f },
7700 { 0x14, 0x0201101f },
7709 { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */
7724 { 0x19, 0x0181313f},
7743 { 0x18, 0x01a1913c }, /* use as headset mic, without its own jack detect */
7752 { 0x13, 0x90a60160 }, /* use as internal mic */
7753 { 0x19, 0x04a11120 }, /* use as headset mic, without its own jack detect */
7762 { 0x19, 0x01a1103c }, /* use as headset mic */
7772 { 0x20, AC_VERB_SET_COEF_INDEX, 0x40 },
7773 { 0x20, AC_VERB_SET_PROC_COEF, 0x8800 },
7774 { 0x20, AC_VERB_SET_COEF_INDEX, 0x0f },
7775 { 0x20, AC_VERB_SET_PROC_COEF, 0x7774 },
7794 { 0x1a, 0x01a1913c }, /* use as headset mic, without its own jack detect */
7803 /* Disable PCBEEP-IN passthrough */
7804 { 0x20, AC_VERB_SET_COEF_INDEX, 0x36 },
7805 { 0x20, AC_VERB_SET_PROC_COEF, 0x57d7 },
7814 { 0x19, 0x03a11130 },
7815 { 0x1a, 0x90a60140 }, /* use as internal mic */
7824 { 0x16, 0x01011020 }, /* Rear Line out */
7825 { 0x19, 0x01a1913c }, /* use as Front headset mic, without its own jack detect */
7846 { 0x20, AC_VERB_SET_COEF_INDEX, 0x4f },
7847 { 0x20, AC_VERB_SET_PROC_COEF, 0x5029 },
7856 { 0x19, 0x03a11020 }, /* headset mic with jack detect */
7865 { 0x19, 0x04a11120 }, /* use as headset mic, without its own jack detect */
7874 { 0x21, 0x90170150 }, /* use as headset mic, without its own jack detect */
7881 { 0x19, 0x04a11040 },
7882 { 0x21, 0x04211020 },
7891 { 0x17, 0x90170130 }, /* bass spk */
7932 { 0x20, AC_VERB_SET_COEF_INDEX, 0x0f },
7933 { 0x20, AC_VERB_SET_PROC_COEF, 0x7774 },
7942 { 0x19, 0x03a11050 }, /* front HP mic */
7943 { 0x1a, 0x01a11830 }, /* rear external mic */
7944 { 0x21, 0x03211020 }, /* front HP out */
7953 /* set 0x15 to HP-OUT ctrl */
7954 { 0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, 0xc0 },
7955 /* unmute the 0x15 amp */
7956 { 0x15, AC_VERB_SET_AMP_GAIN_MUTE, 0xb000 },
7969 { 0x19, 0x01a11050 }, /* rear HP mic */
7970 { 0x1a, 0x01a11830 }, /* rear external mic */
7971 { 0x21, 0x012110f0 }, /* rear HP out */
7980 /* set 0x15 to HP-OUT ctrl */
7981 { 0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, 0xc0 },
7982 /* unmute the 0x15 amp */
7983 { 0x15, AC_VERB_SET_AMP_GAIN_MUTE, 0xb000 },
7984 /* set 0x1b to HP-OUT */
7985 { 0x1b, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x24 },
8001 { 0x20, AC_VERB_SET_COEF_INDEX, 0x1b },
8002 { 0x20, AC_VERB_SET_PROC_COEF, 0x4e4b },
8031 { 0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL, 0xc5 },
8038 { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */
8047 { 0x14, 0x90100120 }, /* use as internal speaker */
8048 { 0x18, 0x02a111f0 }, /* use as headset mic, without its own jack detect */
8049 { 0x1a, 0x01011020 }, /* use as line out */
8058 { 0x18, 0x02a11030 }, /* use as headset mic */
8067 { 0x18, 0x01a11130 }, /* use as headset mic, without its own jack detect */
8082 { 0x19, 0x03a11020 }, /* headset mic with jack detect */
8089 { 0x19, 0x02a11120 }, /* use as headset mic, without its own jack detect */
8104 { 0x12, 0x411111f0 },
8105 { 0x14, 0x90170110 }, /* speaker */
8106 { 0x15, 0x032f1020 }, /* HP out */
8107 { 0x17, 0x411111f0 },
8108 { 0x18, 0x03ab1040 }, /* mic */
8109 { 0x19, 0xb7a7013f },
8110 { 0x1a, 0x0181305f },
8111 { 0x1b, 0x411111f0 },
8112 { 0x1d, 0x411111f0 },
8113 { 0x1e, 0x411111f0 },
8121 { 0x12, 0x4000c000 },
8122 { 0x14, 0x90170110 }, /* speaker */
8123 { 0x15, 0x0421401f }, /* HP out */
8124 { 0x17, 0x411111f0 },
8125 { 0x18, 0x04a19020 }, /* mic */
8126 { 0x19, 0x411111f0 },
8127 { 0x1a, 0x411111f0 },
8128 { 0x1b, 0x411111f0 },
8129 { 0x1d, 0x40448505 },
8130 { 0x1e, 0x411111f0 },
8131 { 0x20, 0x8000ffff },
8139 { 0x12, 0x40000000 },
8140 { 0x14, 0x01014010 }, /* speaker */
8141 { 0x15, 0x411111f0 }, /* HP out */
8142 { 0x16, 0x411111f0 },
8143 { 0x18, 0x01a19020 }, /* mic */
8144 { 0x19, 0x02a19021 },
8145 { 0x1a, 0x0181302f },
8146 { 0x1b, 0x0221401f },
8147 { 0x1c, 0x411111f0 },
8148 { 0x1d, 0x4044c601 },
8149 { 0x1e, 0x411111f0 },
8157 { 0x12, 0x40000000 },
8158 { 0x14, 0x90170110 }, /* speaker */
8159 { 0x17, 0x411111f0 },
8160 { 0x18, 0x03a19040 }, /* mic1 */
8161 { 0x19, 0x90a70130 }, /* mic2 */
8162 { 0x1a, 0x411111f0 },
8163 { 0x1b, 0x411111f0 },
8164 { 0x1d, 0x40489d2d },
8165 { 0x1e, 0x411111f0 },
8166 { 0x20, 0x0003ffff },
8167 { 0x21, 0x03214020 },
8175 { 0x14, 0x99130110 }, /* speaker */
8176 { 0x15, 0x0121401f }, /* HP out */
8177 { 0x18, 0x01a19c20 }, /* rear mic */
8178 { 0x19, 0x99a3092f }, /* front mic */
8179 { 0x1b, 0x0201401f }, /* front lineout */
8187 { 0x1b, 0x01a1913c }, /* use as headset mic, without its own jack detect */
8196 { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */
8205 { 0x20, AC_VERB_SET_COEF_INDEX, 0x45 },
8206 { 0x20, AC_VERB_SET_PROC_COEF, 0x5089 },
8215 { 0x20, AC_VERB_SET_COEF_INDEX, 0x45 },
8216 { 0x20, AC_VERB_SET_PROC_COEF, 0x5089 },
8234 { 0x20, AC_VERB_SET_COEF_INDEX, 0x0f },
8235 { 0x20, AC_VERB_SET_PROC_COEF, 0x7778 },
8264 { 0x1b, 0x411111f0 },
8265 { 0x18, 0x01a1913c }, /* use as headset mic, without its own jack detect */
8280 { 0x19, 0x02a1113c }, /* use as headset mic, without its own jack detect */
8281 { 0x1a, 0x90a1092f }, /* use as internal mic */
8300 { 0x12, 0xb7a60130 },
8301 { 0x13, 0x40000000 },
8302 { 0x14, 0x411111f0 },
8303 { 0x16, 0x411111f0 },
8304 { 0x17, 0x90170110 },
8305 { 0x18, 0x411111f0 },
8306 { 0x19, 0x02a11030 },
8307 { 0x1a, 0x411111f0 },
8308 { 0x1b, 0x04a19030 },
8309 { 0x1d, 0x40600001 },
8310 { 0x1e, 0x411111f0 },
8311 { 0x21, 0x03211020 },
8340 { 0x21, 0x03211030 }, /* Change the Headphone location to Left */
8369 { 0x20, AC_VERB_SET_COEF_INDEX, 0x24 },
8370 { 0x20, AC_VERB_SET_PROC_COEF, 0x41 },
8372 { 0x20, AC_VERB_SET_COEF_INDEX, 0x26 },
8373 { 0x20, AC_VERB_SET_PROC_COEF, 0xc },
8374 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
8375 { 0x20, AC_VERB_SET_PROC_COEF, 0x1a },
8376 { 0x20, AC_VERB_SET_PROC_COEF, 0xb020 },
8378 { 0x20, AC_VERB_SET_COEF_INDEX, 0x26 },
8379 { 0x20, AC_VERB_SET_PROC_COEF, 0x2 },
8380 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
8381 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
8382 { 0x20, AC_VERB_SET_PROC_COEF, 0xb020 },
8385 { 0x20, AC_VERB_SET_COEF_INDEX, 0x24 },
8386 { 0x20, AC_VERB_SET_PROC_COEF, 0x42 },
8388 { 0x20, AC_VERB_SET_COEF_INDEX, 0x26 },
8389 { 0x20, AC_VERB_SET_PROC_COEF, 0xc },
8390 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
8391 { 0x20, AC_VERB_SET_PROC_COEF, 0x2a },
8392 { 0x20, AC_VERB_SET_PROC_COEF, 0xb020 },
8394 { 0x20, AC_VERB_SET_COEF_INDEX, 0x26 },
8395 { 0x20, AC_VERB_SET_PROC_COEF, 0x2 },
8396 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
8397 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
8398 { 0x20, AC_VERB_SET_PROC_COEF, 0xb020 },
8414 { 0x20, AC_VERB_SET_COEF_INDEX, 0x24 },
8415 { 0x20, AC_VERB_SET_PROC_COEF, 0x41 },
8417 { 0x20, AC_VERB_SET_COEF_INDEX, 0x26 },
8418 { 0x20, AC_VERB_SET_PROC_COEF, 0xc },
8419 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
8420 { 0x20, AC_VERB_SET_PROC_COEF, 0x1a },
8421 { 0x20, AC_VERB_SET_PROC_COEF, 0xb020 },
8423 { 0x20, AC_VERB_SET_COEF_INDEX, 0x26 },
8424 { 0x20, AC_VERB_SET_PROC_COEF, 0x2 },
8425 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
8426 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
8427 { 0x20, AC_VERB_SET_PROC_COEF, 0xb020 },
8430 { 0x20, AC_VERB_SET_COEF_INDEX, 0x24 },
8431 { 0x20, AC_VERB_SET_PROC_COEF, 0x46 },
8433 { 0x20, AC_VERB_SET_COEF_INDEX, 0x26 },
8434 { 0x20, AC_VERB_SET_PROC_COEF, 0xc },
8435 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
8436 { 0x20, AC_VERB_SET_PROC_COEF, 0x2a },
8437 { 0x20, AC_VERB_SET_PROC_COEF, 0xb020 },
8439 { 0x20, AC_VERB_SET_COEF_INDEX, 0x26 },
8440 { 0x20, AC_VERB_SET_PROC_COEF, 0x2 },
8441 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
8442 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
8443 { 0x20, AC_VERB_SET_PROC_COEF, 0xb020 },
8452 { 0x20, AC_VERB_SET_COEF_INDEX, 0x24 },
8453 { 0x20, AC_VERB_SET_PROC_COEF, 0x41 },
8454 { 0x20, AC_VERB_SET_COEF_INDEX, 0x26 },
8455 { 0x20, AC_VERB_SET_PROC_COEF, 0x2 },
8456 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
8457 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
8458 { 0x20, AC_VERB_SET_PROC_COEF, 0xb020 },
8459 { 0x20, AC_VERB_SET_COEF_INDEX, 0x24 },
8460 { 0x20, AC_VERB_SET_PROC_COEF, 0x42 },
8461 { 0x20, AC_VERB_SET_COEF_INDEX, 0x26 },
8462 { 0x20, AC_VERB_SET_PROC_COEF, 0x2 },
8463 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
8464 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
8465 { 0x20, AC_VERB_SET_PROC_COEF, 0xb020 },
8482 { 0x19, 0x03a11120 }, /* use as headset mic, without its own jack detect */
8501 SND_PCI_QUIRK(0x1025, 0x0283, "Acer TravelMate 8371", ALC269_FIXUP_INV_DMIC),
8502 SND_PCI_QUIRK(0x1025, 0x029b, "Acer 1810TZ", ALC269_FIXUP_INV_DMIC),
8503 SND_PCI_QUIRK(0x1025, 0x0349, "Acer AOD260", ALC269_FIXUP_INV_DMIC),
8504 SND_PCI_QUIRK(0x1025, 0x047c, "Acer AC700", ALC269_FIXUP_ACER_AC700),
8505 SND_PCI_QUIRK(0x1025, 0x072d, "Acer Aspire V5-571G", ALC269_FIXUP_ASPIRE_HEADSET_MIC),
8506 SND_PCI_QUIRK(0x1025, 0x0740, "Acer AO725", ALC271_FIXUP_HP_GATE_MIC_JACK),
8507 SND_PCI_QUIRK(0x1025, 0x0742, "Acer AO756", ALC271_FIXUP_HP_GATE_MIC_JACK),
8508 SND_PCI_QUIRK(0x1025, 0x0762, "Acer Aspire E1-472", ALC271_FIXUP_HP_GATE_MIC_JACK_E1_572),
8509 SND_PCI_QUIRK(0x1025, 0x0775, "Acer Aspire E1-572", ALC271_FIXUP_HP_GATE_MIC_JACK_E1_572),
8510 SND_PCI_QUIRK(0x1025, 0x079b, "Acer Aspire V5-573G", ALC282_FIXUP_ASPIRE_V5_PINS),
8511 SND_PCI_QUIRK(0x1025, 0x080d, "Acer Aspire V5-122P", ALC269_FIXUP_ASPIRE_HEADSET_MIC),
8512 SND_PCI_QUIRK(0x1025, 0x0840, "Acer Aspire E1", ALC269VB_FIXUP_ASPIRE_E1_COEF),
8513 SND_PCI_QUIRK(0x1025, 0x101c, "Acer Veriton N2510G", ALC269_FIXUP_LIFEBOOK),
8514 SND_PCI_QUIRK(0x1025, 0x102b, "Acer Aspire C24-860", ALC286_FIXUP_ACER_AIO_MIC_NO_PRESENCE),
8515 SND_PCI_QUIRK(0x1025, 0x1065, "Acer Aspire C20-820", ALC269VC_FIXUP_ACER_HEADSET_MIC),
8516 SND_PCI_QUIRK(0x1025, 0x106d, "Acer Cloudbook 14", ALC283_FIXUP_CHROME_BOOK),
8517 SND_PCI_QUIRK(0x1025, 0x1094, "Acer Aspire E5-575T", ALC255_FIXUP_ACER_LIMIT_INT_MIC_BOOST),
8518 SND_PCI_QUIRK(0x1025, 0x1099, "Acer Aspire E5-523G", ALC255_FIXUP_ACER_MIC_NO_PRESENCE),
8519 SND_PCI_QUIRK(0x1025, 0x110e, "Acer Aspire ES1-432", ALC255_FIXUP_ACER_MIC_NO_PRESENCE),
8520 SND_PCI_QUIRK(0x1025, 0x1166, "Acer Veriton N4640G", ALC269_FIXUP_LIFEBOOK),
8521 SND_PCI_QUIRK(0x1025, 0x1167, "Acer Veriton N6640G", ALC269_FIXUP_LIFEBOOK),
8522 SND_PCI_QUIRK(0x1025, 0x1246, "Acer Predator Helios 500", ALC299_FIXUP_PREDATOR_SPK),
8523 SND_PCI_QUIRK(0x1025, 0x1247, "Acer vCopperbox", ALC269VC_FIXUP_ACER_VCOPPERBOX_PINS),
8524 SND_PCI_QUIRK(0x1025, 0x1248, "Acer Veriton N4660G", ALC269VC_FIXUP_ACER_MIC_NO_PRESENCE),
8525 SND_PCI_QUIRK(0x1025, 0x1269, "Acer SWIFT SF314-54", ALC256_FIXUP_ACER_HEADSET_MIC),
8526 SND_PCI_QUIRK(0x1025, 0x128f, "Acer Veriton Z6860G", ALC286_FIXUP_ACER_AIO_HEADSET_MIC),
8527 SND_PCI_QUIRK(0x1025, 0x1290, "Acer Veriton Z4860G", ALC286_FIXUP_ACER_AIO_HEADSET_MIC),
8528 SND_PCI_QUIRK(0x1025, 0x1291, "Acer Veriton Z4660G", ALC286_FIXUP_ACER_AIO_HEADSET_MIC),
8529 SND_PCI_QUIRK(0x1025, 0x129c, "Acer SWIFT SF314-55", ALC256_FIXUP_ACER_HEADSET_MIC),
8530 SND_PCI_QUIRK(0x1025, 0x1300, "Acer SWIFT SF314-56", ALC256_FIXUP_ACER_MIC_NO_PRESENCE),
8531 SND_PCI_QUIRK(0x1025, 0x1308, "Acer Aspire Z24-890", ALC286_FIXUP_ACER_AIO_HEADSET_MIC),
8532 SND_PCI_QUIRK(0x1025, 0x132a, "Acer TravelMate B114-21", ALC233_FIXUP_ACER_HEADSET_MIC),
8533 SND_PCI_QUIRK(0x1025, 0x1330, "Acer TravelMate X514-51T", ALC255_FIXUP_ACER_HEADSET_MIC),
8534 SND_PCI_QUIRK(0x1025, 0x141f, "Acer Spin SP513-54N", ALC255_FIXUP_ACER_MIC_NO_PRESENCE),
8535 SND_PCI_QUIRK(0x1025, 0x142b, "Acer Swift SF314-42", ALC255_FIXUP_ACER_MIC_NO_PRESENCE),
8536 SND_PCI_QUIRK(0x1025, 0x1430, "Acer TravelMate B311R-31", ALC256_FIXUP_ACER_MIC_NO_PRESENCE),
8537 SND_PCI_QUIRK(0x1025, 0x1466, "Acer Aspire A515-56", ALC255_FIXUP_ACER_HEADPHONE_AND_MIC),
8538 SND_PCI_QUIRK(0x1028, 0x0470, "Dell M101z", ALC269_FIXUP_DELL_M101Z),
8539 SND_PCI_QUIRK(0x1028, 0x054b, "Dell XPS one 2710", ALC275_FIXUP_DELL_XPS),
8540 SND_PCI_QUIRK(0x1028, 0x05bd, "Dell Latitude E6440", ALC292_FIXUP_DELL_E7X),
8541 SND_PCI_QUIRK(0x1028, 0x05be, "Dell Latitude E6540", ALC292_FIXUP_DELL_E7X),
8542 SND_PCI_QUIRK(0x1028, 0x05ca, "Dell Latitude E7240", ALC292_FIXUP_DELL_E7X),
8543 SND_PCI_QUIRK(0x1028, 0x05cb, "Dell Latitude E7440", ALC292_FIXUP_DELL_E7X),
8544 SND_PCI_QUIRK(0x1028, 0x05da, "Dell Vostro 5460", ALC290_FIXUP_SUBWOOFER),
8545 SND_PCI_QUIRK(0x1028, 0x05f4, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE),
8546 SND_PCI_QUIRK(0x1028, 0x05f5, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE),
8547 SND_PCI_QUIRK(0x1028, 0x05f6, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE),
8548 SND_PCI_QUIRK(0x1028, 0x0615, "Dell Vostro 5470", ALC290_FIXUP_SUBWOOFER_HSJACK),
8549 SND_PCI_QUIRK(0x1028, 0x0616, "Dell Vostro 5470", ALC290_FIXUP_SUBWOOFER_HSJACK),
8550 SND_PCI_QUIRK(0x1028, 0x062c, "Dell Latitude E5550", ALC292_FIXUP_DELL_E7X),
8551 SND_PCI_QUIRK(0x1028, 0x062e, "Dell Latitude E7450", ALC292_FIXUP_DELL_E7X),
8552 SND_PCI_QUIRK(0x1028, 0x0638, "Dell Inspiron 5439", ALC290_FIXUP_MONO_SPEAKERS_HSJACK),
8553 SND_PCI_QUIRK(0x1028, 0x064a, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE),
8554 SND_PCI_QUIRK(0x1028, 0x064b, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE),
8555 SND_PCI_QUIRK(0x1028, 0x0665, "Dell XPS 13", ALC288_FIXUP_DELL_XPS_13),
8556 SND_PCI_QUIRK(0x1028, 0x0669, "Dell Optiplex 9020m", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE),
8557 SND_PCI_QUIRK(0x1028, 0x069a, "Dell Vostro 5480", ALC290_FIXUP_SUBWOOFER_HSJACK),
8558 SND_PCI_QUIRK(0x1028, 0x06c7, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE),
8559 SND_PCI_QUIRK(0x1028, 0x06d9, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE),
8560 SND_PCI_QUIRK(0x1028, 0x06da, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE),
8561 SND_PCI_QUIRK(0x1028, 0x06db, "Dell", ALC293_FIXUP_DISABLE_AAMIX_MULTIJACK),
8562 SND_PCI_QUIRK(0x1028, 0x06dd, "Dell", ALC293_FIXUP_DISABLE_AAMIX_MULTIJACK),
8563 SND_PCI_QUIRK(0x1028, 0x06de, "Dell", ALC293_FIXUP_DISABLE_AAMIX_MULTIJACK),
8564 SND_PCI_QUIRK(0x1028, 0x06df, "Dell", ALC293_FIXUP_DISABLE_AAMIX_MULTIJACK),
8565 SND_PCI_QUIRK(0x1028, 0x06e0, "Dell", ALC293_FIXUP_DISABLE_AAMIX_MULTIJACK),
8566 SND_PCI_QUIRK(0x1028, 0x0706, "Dell Inspiron 7559", ALC256_FIXUP_DELL_INSPIRON_7559_SUBWOOFER),
8567 SND_PCI_QUIRK(0x1028, 0x0725, "Dell Inspiron 3162", ALC255_FIXUP_DELL_SPK_NOISE),
8568 SND_PCI_QUIRK(0x1028, 0x0738, "Dell Precision 5820", ALC269_FIXUP_NO_SHUTUP),
8569 SND_PCI_QUIRK(0x1028, 0x075c, "Dell XPS 27 7760", ALC298_FIXUP_SPK_VOLUME),
8570 SND_PCI_QUIRK(0x1028, 0x075d, "Dell AIO", ALC298_FIXUP_SPK_VOLUME),
8571 …SND_PCI_QUIRK(0x1028, 0x0798, "Dell Inspiron 17 7000 Gaming", ALC256_FIXUP_DELL_INSPIRON_7559_SUBW…
8572 SND_PCI_QUIRK(0x1028, 0x07b0, "Dell Precision 7520", ALC295_FIXUP_DISABLE_DAC3),
8573 SND_PCI_QUIRK(0x1028, 0x080c, "Dell WYSE", ALC225_FIXUP_DELL_WYSE_MIC_NO_PRESENCE),
8574 SND_PCI_QUIRK(0x1028, 0x084b, "Dell", ALC274_FIXUP_DELL_AIO_LINEOUT_VERB),
8575 SND_PCI_QUIRK(0x1028, 0x084e, "Dell", ALC274_FIXUP_DELL_AIO_LINEOUT_VERB),
8576 SND_PCI_QUIRK(0x1028, 0x0871, "Dell Precision 3630", ALC255_FIXUP_DELL_HEADSET_MIC),
8577 SND_PCI_QUIRK(0x1028, 0x0872, "Dell Precision 3630", ALC255_FIXUP_DELL_HEADSET_MIC),
8578 SND_PCI_QUIRK(0x1028, 0x0873, "Dell Precision 3930", ALC255_FIXUP_DUMMY_LINEOUT_VERB),
8579 SND_PCI_QUIRK(0x1028, 0x08ad, "Dell WYSE AIO", ALC225_FIXUP_DELL_WYSE_AIO_MIC_NO_PRESENCE),
8580 SND_PCI_QUIRK(0x1028, 0x08ae, "Dell WYSE NB", ALC225_FIXUP_DELL1_MIC_NO_PRESENCE),
8581 SND_PCI_QUIRK(0x1028, 0x0935, "Dell", ALC274_FIXUP_DELL_AIO_LINEOUT_VERB),
8582 SND_PCI_QUIRK(0x1028, 0x097d, "Dell Precision", ALC289_FIXUP_DUAL_SPK),
8583 SND_PCI_QUIRK(0x1028, 0x097e, "Dell Precision", ALC289_FIXUP_DUAL_SPK),
8584 SND_PCI_QUIRK(0x1028, 0x098d, "Dell Precision", ALC233_FIXUP_ASUS_MIC_NO_PRESENCE),
8585 SND_PCI_QUIRK(0x1028, 0x09bf, "Dell Precision", ALC233_FIXUP_ASUS_MIC_NO_PRESENCE),
8586 SND_PCI_QUIRK(0x1028, 0x0a2e, "Dell", ALC236_FIXUP_DELL_AIO_HEADSET_MIC),
8587 SND_PCI_QUIRK(0x1028, 0x0a30, "Dell", ALC236_FIXUP_DELL_AIO_HEADSET_MIC),
8588 SND_PCI_QUIRK(0x1028, 0x0a58, "Dell", ALC255_FIXUP_DELL_HEADSET_MIC),
8589 SND_PCI_QUIRK(0x1028, 0x0a61, "Dell XPS 15 9510", ALC289_FIXUP_DUAL_SPK),
8590 SND_PCI_QUIRK(0x1028, 0x0a62, "Dell Precision 5560", ALC289_FIXUP_DUAL_SPK),
8591 SND_PCI_QUIRK(0x1028, 0x0a9d, "Dell Latitude 5430", ALC269_FIXUP_DELL4_MIC_NO_PRESENCE),
8592 SND_PCI_QUIRK(0x1028, 0x0a9e, "Dell Latitude 5430", ALC269_FIXUP_DELL4_MIC_NO_PRESENCE),
8593 SND_PCI_QUIRK(0x1028, 0x164a, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE),
8594 SND_PCI_QUIRK(0x1028, 0x164b, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE),
8595 SND_PCI_QUIRK(0x103c, 0x1586, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC2),
8596 SND_PCI_QUIRK(0x103c, 0x18e6, "HP", ALC269_FIXUP_HP_GPIO_LED),
8597 SND_PCI_QUIRK(0x103c, 0x218b, "HP", ALC269_FIXUP_LIMIT_INT_MIC_BOOST_MUTE_LED),
8598 SND_PCI_QUIRK(0x103c, 0x21f9, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
8599 SND_PCI_QUIRK(0x103c, 0x2210, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
8600 SND_PCI_QUIRK(0x103c, 0x2214, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
8601 SND_PCI_QUIRK(0x103c, 0x221b, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED),
8602 SND_PCI_QUIRK(0x103c, 0x221c, "HP EliteBook 755 G2", ALC280_FIXUP_HP_HEADSET_MIC),
8603 SND_PCI_QUIRK(0x103c, 0x2221, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED),
8604 SND_PCI_QUIRK(0x103c, 0x2225, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED),
8605 SND_PCI_QUIRK(0x103c, 0x2236, "HP", ALC269_FIXUP_HP_LINE1_MIC1_LED),
8606 SND_PCI_QUIRK(0x103c, 0x2237, "HP", ALC269_FIXUP_HP_LINE1_MIC1_LED),
8607 SND_PCI_QUIRK(0x103c, 0x2238, "HP", ALC269_FIXUP_HP_LINE1_MIC1_LED),
8608 SND_PCI_QUIRK(0x103c, 0x2239, "HP", ALC269_FIXUP_HP_LINE1_MIC1_LED),
8609 SND_PCI_QUIRK(0x103c, 0x224b, "HP", ALC269_FIXUP_HP_LINE1_MIC1_LED),
8610 SND_PCI_QUIRK(0x103c, 0x2253, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED),
8611 SND_PCI_QUIRK(0x103c, 0x2254, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED),
8612 SND_PCI_QUIRK(0x103c, 0x2255, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED),
8613 SND_PCI_QUIRK(0x103c, 0x2256, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED),
8614 SND_PCI_QUIRK(0x103c, 0x2257, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED),
8615 SND_PCI_QUIRK(0x103c, 0x2259, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED),
8616 SND_PCI_QUIRK(0x103c, 0x225a, "HP", ALC269_FIXUP_HP_DOCK_GPIO_MIC1_LED),
8617 SND_PCI_QUIRK(0x103c, 0x225f, "HP", ALC280_FIXUP_HP_GPIO2_MIC_HOTKEY),
8618 SND_PCI_QUIRK(0x103c, 0x2260, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
8619 SND_PCI_QUIRK(0x103c, 0x2263, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
8620 SND_PCI_QUIRK(0x103c, 0x2264, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
8621 SND_PCI_QUIRK(0x103c, 0x2265, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
8622 SND_PCI_QUIRK(0x103c, 0x2268, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
8623 SND_PCI_QUIRK(0x103c, 0x226a, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
8624 SND_PCI_QUIRK(0x103c, 0x226b, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
8625 SND_PCI_QUIRK(0x103c, 0x226e, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
8626 SND_PCI_QUIRK(0x103c, 0x2271, "HP", ALC286_FIXUP_HP_GPIO_LED),
8627 SND_PCI_QUIRK(0x103c, 0x2272, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED),
8628 SND_PCI_QUIRK(0x103c, 0x2272, "HP", ALC280_FIXUP_HP_DOCK_PINS),
8629 SND_PCI_QUIRK(0x103c, 0x2273, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED),
8630 SND_PCI_QUIRK(0x103c, 0x2273, "HP", ALC280_FIXUP_HP_DOCK_PINS),
8631 SND_PCI_QUIRK(0x103c, 0x2278, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED),
8632 SND_PCI_QUIRK(0x103c, 0x227f, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
8633 SND_PCI_QUIRK(0x103c, 0x2282, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
8634 SND_PCI_QUIRK(0x103c, 0x228b, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
8635 SND_PCI_QUIRK(0x103c, 0x228e, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
8636 SND_PCI_QUIRK(0x103c, 0x229e, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
8637 SND_PCI_QUIRK(0x103c, 0x22b2, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
8638 SND_PCI_QUIRK(0x103c, 0x22b7, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
8639 SND_PCI_QUIRK(0x103c, 0x22bf, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
8640 SND_PCI_QUIRK(0x103c, 0x22c4, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
8641 SND_PCI_QUIRK(0x103c, 0x22c5, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
8642 SND_PCI_QUIRK(0x103c, 0x22c7, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
8643 SND_PCI_QUIRK(0x103c, 0x22c8, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
8644 SND_PCI_QUIRK(0x103c, 0x22cf, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
8645 SND_PCI_QUIRK(0x103c, 0x22db, "HP", ALC280_FIXUP_HP_9480M),
8646 SND_PCI_QUIRK(0x103c, 0x22dc, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED),
8647 SND_PCI_QUIRK(0x103c, 0x22fb, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED),
8648 SND_PCI_QUIRK(0x103c, 0x2334, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
8649 SND_PCI_QUIRK(0x103c, 0x2335, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
8650 SND_PCI_QUIRK(0x103c, 0x2336, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
8651 SND_PCI_QUIRK(0x103c, 0x2337, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
8652 SND_PCI_QUIRK(0x103c, 0x802e, "HP Z240 SFF", ALC221_FIXUP_HP_MIC_NO_PRESENCE),
8653 SND_PCI_QUIRK(0x103c, 0x802f, "HP Z240", ALC221_FIXUP_HP_MIC_NO_PRESENCE),
8654 SND_PCI_QUIRK(0x103c, 0x8077, "HP", ALC256_FIXUP_HP_HEADSET_MIC),
8655 SND_PCI_QUIRK(0x103c, 0x8158, "HP", ALC256_FIXUP_HP_HEADSET_MIC),
8656 SND_PCI_QUIRK(0x103c, 0x820d, "HP Pavilion 15", ALC269_FIXUP_HP_MUTE_LED_MIC3),
8657 SND_PCI_QUIRK(0x103c, 0x8256, "HP", ALC221_FIXUP_HP_FRONT_MIC),
8658 SND_PCI_QUIRK(0x103c, 0x827e, "HP x360", ALC295_FIXUP_HP_X360),
8659 SND_PCI_QUIRK(0x103c, 0x827f, "HP x360", ALC269_FIXUP_HP_MUTE_LED_MIC3),
8660 SND_PCI_QUIRK(0x103c, 0x82bf, "HP G3 mini", ALC221_FIXUP_HP_MIC_NO_PRESENCE),
8661 SND_PCI_QUIRK(0x103c, 0x82c0, "HP G3 mini premium", ALC221_FIXUP_HP_MIC_NO_PRESENCE),
8662 SND_PCI_QUIRK(0x103c, 0x83b9, "HP Spectre x360", ALC269_FIXUP_HP_MUTE_LED_MIC3),
8663 SND_PCI_QUIRK(0x103c, 0x841c, "HP Pavilion 15-CK0xx", ALC269_FIXUP_HP_MUTE_LED_MIC3),
8664 SND_PCI_QUIRK(0x103c, 0x8497, "HP Envy x360", ALC269_FIXUP_HP_MUTE_LED_MIC3),
8665 SND_PCI_QUIRK(0x103c, 0x84da, "HP OMEN dc0019-ur", ALC295_FIXUP_HP_OMEN),
8666 SND_PCI_QUIRK(0x103c, 0x84e7, "HP Pavilion 15", ALC269_FIXUP_HP_MUTE_LED_MIC3),
8667 SND_PCI_QUIRK(0x103c, 0x8519, "HP Spectre x360 15-df0xxx", ALC285_FIXUP_HP_SPECTRE_X360),
8668 SND_PCI_QUIRK(0x103c, 0x860f, "HP ZBook 15 G6", ALC285_FIXUP_HP_GPIO_AMP_INIT),
8669 SND_PCI_QUIRK(0x103c, 0x861f, "HP Elite Dragonfly G1", ALC285_FIXUP_HP_GPIO_AMP_INIT),
8670 SND_PCI_QUIRK(0x103c, 0x869d, "HP", ALC236_FIXUP_HP_MUTE_LED),
8671 SND_PCI_QUIRK(0x103c, 0x86c7, "HP Envy AiO 32", ALC274_FIXUP_HP_ENVY_GPIO),
8672 SND_PCI_QUIRK(0x103c, 0x8716, "HP Elite Dragonfly G2 Notebook PC", ALC285_FIXUP_HP_GPIO_AMP_INIT),
8673 …SND_PCI_QUIRK(0x103c, 0x8720, "HP EliteBook x360 1040 G8 Notebook PC", ALC285_FIXUP_HP_GPIO_AMP_IN…
8674 SND_PCI_QUIRK(0x103c, 0x8724, "HP EliteBook 850 G7", ALC285_FIXUP_HP_GPIO_LED),
8675 SND_PCI_QUIRK(0x103c, 0x8728, "HP EliteBook 840 G7", ALC285_FIXUP_HP_GPIO_LED),
8676 SND_PCI_QUIRK(0x103c, 0x8729, "HP", ALC285_FIXUP_HP_GPIO_LED),
8677 SND_PCI_QUIRK(0x103c, 0x8730, "HP ProBook 445 G7", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF),
8678 SND_PCI_QUIRK(0x103c, 0x8735, "HP ProBook 435 G7", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF),
8679 SND_PCI_QUIRK(0x103c, 0x8736, "HP", ALC285_FIXUP_HP_GPIO_AMP_INIT),
8680 SND_PCI_QUIRK(0x103c, 0x8760, "HP", ALC285_FIXUP_HP_MUTE_LED),
8681 SND_PCI_QUIRK(0x103c, 0x877a, "HP", ALC285_FIXUP_HP_MUTE_LED),
8682 SND_PCI_QUIRK(0x103c, 0x877d, "HP", ALC236_FIXUP_HP_MUTE_LED),
8683 SND_PCI_QUIRK(0x103c, 0x8780, "HP ZBook Fury 17 G7 Mobile Workstation",
8685 SND_PCI_QUIRK(0x103c, 0x8783, "HP ZBook Fury 15 G7 Mobile Workstation",
8687 SND_PCI_QUIRK(0x103c, 0x8788, "HP OMEN 15", ALC285_FIXUP_HP_MUTE_LED),
8688 SND_PCI_QUIRK(0x103c, 0x87c8, "HP", ALC287_FIXUP_HP_GPIO_LED),
8689 SND_PCI_QUIRK(0x103c, 0x87e5, "HP ProBook 440 G8 Notebook PC", ALC236_FIXUP_HP_GPIO_LED),
8690 SND_PCI_QUIRK(0x103c, 0x87e7, "HP ProBook 450 G8 Notebook PC", ALC236_FIXUP_HP_GPIO_LED),
8691 SND_PCI_QUIRK(0x103c, 0x87f1, "HP ProBook 630 G8 Notebook PC", ALC236_FIXUP_HP_GPIO_LED),
8692 SND_PCI_QUIRK(0x103c, 0x87f2, "HP ProBook 640 G8 Notebook PC", ALC236_FIXUP_HP_GPIO_LED),
8693 SND_PCI_QUIRK(0x103c, 0x87f4, "HP", ALC287_FIXUP_HP_GPIO_LED),
8694 SND_PCI_QUIRK(0x103c, 0x87f5, "HP", ALC287_FIXUP_HP_GPIO_LED),
8695 SND_PCI_QUIRK(0x103c, 0x87f6, "HP Spectre x360 14", ALC245_FIXUP_HP_X360_AMP),
8696 SND_PCI_QUIRK(0x103c, 0x87f7, "HP Spectre x360 14", ALC245_FIXUP_HP_X360_AMP),
8697 SND_PCI_QUIRK(0x103c, 0x8805, "HP ProBook 650 G8 Notebook PC", ALC236_FIXUP_HP_GPIO_LED),
8698 SND_PCI_QUIRK(0x103c, 0x880d, "HP EliteBook 830 G8 Notebook PC", ALC285_FIXUP_HP_GPIO_LED),
8699 SND_PCI_QUIRK(0x103c, 0x8811, "HP Spectre x360 15-eb1xxx", ALC285_FIXUP_HP_SPECTRE_X360_EB1),
8700 SND_PCI_QUIRK(0x103c, 0x8812, "HP Spectre x360 15-eb1xxx", ALC285_FIXUP_HP_SPECTRE_X360_EB1),
8701 SND_PCI_QUIRK(0x103c, 0x8846, "HP EliteBook 850 G8 Notebook PC", ALC285_FIXUP_HP_GPIO_LED),
8702 SND_PCI_QUIRK(0x103c, 0x8847, "HP EliteBook x360 830 G8 Notebook PC", ALC285_FIXUP_HP_GPIO_LED),
8703 SND_PCI_QUIRK(0x103c, 0x884b, "HP EliteBook 840 Aero G8 Notebook PC", ALC285_FIXUP_HP_GPIO_LED),
8704 SND_PCI_QUIRK(0x103c, 0x884c, "HP EliteBook 840 G8 Notebook PC", ALC285_FIXUP_HP_GPIO_LED),
8705 …SND_PCI_QUIRK(0x103c, 0x8862, "HP ProBook 445 G8 Notebook PC", ALC236_FIXUP_HP_LIMIT_INT_MIC_BOOST…
8706 …SND_PCI_QUIRK(0x103c, 0x8863, "HP ProBook 445 G8 Notebook PC", ALC236_FIXUP_HP_LIMIT_INT_MIC_BOOST…
8707 …SND_PCI_QUIRK(0x103c, 0x886d, "HP ZBook Fury 17.3 Inch G8 Mobile Workstation PC", ALC285_FIXUP_HP_…
8708 …SND_PCI_QUIRK(0x103c, 0x8870, "HP ZBook Fury 15.6 Inch G8 Mobile Workstation PC", ALC285_FIXUP_HP_…
8709 …SND_PCI_QUIRK(0x103c, 0x8873, "HP ZBook Studio 15.6 Inch G8 Mobile Workstation PC", ALC285_FIXUP_H…
8710 …SND_PCI_QUIRK(0x103c, 0x888d, "HP ZBook Power 15.6 inch G8 Mobile Workstation PC", ALC236_FIXUP_HP…
8711 SND_PCI_QUIRK(0x103c, 0x8896, "HP EliteBook 855 G8 Notebook PC", ALC285_FIXUP_HP_MUTE_LED),
8712 SND_PCI_QUIRK(0x1043, 0x103e, "ASUS X540SA", ALC256_FIXUP_ASUS_MIC),
8713 SND_PCI_QUIRK(0x1043, 0x103f, "ASUS TX300", ALC282_FIXUP_ASUS_TX300),
8714 SND_PCI_QUIRK(0x1043, 0x106d, "Asus K53BE", ALC269_FIXUP_LIMIT_INT_MIC_BOOST),
8715 SND_PCI_QUIRK(0x1043, 0x10a1, "ASUS UX391UA", ALC294_FIXUP_ASUS_SPK),
8716 SND_PCI_QUIRK(0x1043, 0x10c0, "ASUS X540SA", ALC256_FIXUP_ASUS_MIC),
8717 SND_PCI_QUIRK(0x1043, 0x10d0, "ASUS X540LA/X540LJ", ALC255_FIXUP_ASUS_MIC_NO_PRESENCE),
8718 SND_PCI_QUIRK(0x1043, 0x115d, "Asus 1015E", ALC269_FIXUP_LIMIT_INT_MIC_BOOST),
8719 SND_PCI_QUIRK(0x1043, 0x11c0, "ASUS X556UR", ALC255_FIXUP_ASUS_MIC_NO_PRESENCE),
8720 SND_PCI_QUIRK(0x1043, 0x125e, "ASUS Q524UQK", ALC255_FIXUP_ASUS_MIC_NO_PRESENCE),
8721 SND_PCI_QUIRK(0x1043, 0x1271, "ASUS X430UN", ALC256_FIXUP_ASUS_MIC_NO_PRESENCE),
8722 SND_PCI_QUIRK(0x1043, 0x1290, "ASUS X441SA", ALC233_FIXUP_EAPD_COEF_AND_MIC_NO_PRESENCE),
8723 SND_PCI_QUIRK(0x1043, 0x12a0, "ASUS X441UV", ALC233_FIXUP_EAPD_COEF_AND_MIC_NO_PRESENCE),
8724 SND_PCI_QUIRK(0x1043, 0x12e0, "ASUS X541SA", ALC256_FIXUP_ASUS_MIC),
8725 SND_PCI_QUIRK(0x1043, 0x12f0, "ASUS X541UV", ALC256_FIXUP_ASUS_MIC),
8726 SND_PCI_QUIRK(0x1043, 0x13b0, "ASUS Z550SA", ALC256_FIXUP_ASUS_MIC),
8727 SND_PCI_QUIRK(0x1043, 0x1427, "Asus Zenbook UX31E", ALC269VB_FIXUP_ASUS_ZENBOOK),
8728 SND_PCI_QUIRK(0x1043, 0x1517, "Asus Zenbook UX31A", ALC269VB_FIXUP_ASUS_ZENBOOK_UX31A),
8729 SND_PCI_QUIRK(0x1043, 0x16e3, "ASUS UX50", ALC269_FIXUP_STEREO_DMIC),
8730 SND_PCI_QUIRK(0x1043, 0x1740, "ASUS UX430UA", ALC295_FIXUP_ASUS_DACS),
8731 SND_PCI_QUIRK(0x1043, 0x17d1, "ASUS UX431FL", ALC294_FIXUP_ASUS_DUAL_SPK),
8732 SND_PCI_QUIRK(0x1043, 0x1662, "ASUS GV301QH", ALC294_FIXUP_ASUS_DUAL_SPK),
8733 SND_PCI_QUIRK(0x1043, 0x1881, "ASUS Zephyrus S/M", ALC294_FIXUP_ASUS_GX502_PINS),
8734 SND_PCI_QUIRK(0x1043, 0x18b1, "Asus MJ401TA", ALC256_FIXUP_ASUS_HEADSET_MIC),
8735 SND_PCI_QUIRK(0x1043, 0x18f1, "Asus FX505DT", ALC256_FIXUP_ASUS_HEADSET_MIC),
8736 SND_PCI_QUIRK(0x1043, 0x194e, "ASUS UX563FD", ALC294_FIXUP_ASUS_HPE),
8737 SND_PCI_QUIRK(0x1043, 0x1970, "ASUS UX550VE", ALC289_FIXUP_ASUS_GA401),
8738 SND_PCI_QUIRK(0x1043, 0x1982, "ASUS B1400CEPE", ALC256_FIXUP_ASUS_HPE),
8739 SND_PCI_QUIRK(0x1043, 0x19ce, "ASUS B9450FA", ALC294_FIXUP_ASUS_HPE),
8740 SND_PCI_QUIRK(0x1043, 0x19e1, "ASUS UX581LV", ALC295_FIXUP_ASUS_MIC_NO_PRESENCE),
8741 SND_PCI_QUIRK(0x1043, 0x1a13, "Asus G73Jw", ALC269_FIXUP_ASUS_G73JW),
8742 SND_PCI_QUIRK(0x1043, 0x1a30, "ASUS X705UD", ALC256_FIXUP_ASUS_MIC),
8743 SND_PCI_QUIRK(0x1043, 0x1b11, "ASUS UX431DA", ALC294_FIXUP_ASUS_COEF_1B),
8744 SND_PCI_QUIRK(0x1043, 0x1b13, "Asus U41SV", ALC269_FIXUP_INV_DMIC),
8745 SND_PCI_QUIRK(0x1043, 0x1bbd, "ASUS Z550MA", ALC255_FIXUP_ASUS_MIC_NO_PRESENCE),
8746 SND_PCI_QUIRK(0x1043, 0x1c23, "Asus X55U", ALC269_FIXUP_LIMIT_INT_MIC_BOOST),
8747 SND_PCI_QUIRK(0x1043, 0x1ccd, "ASUS X555UB", ALC256_FIXUP_ASUS_MIC),
8748 SND_PCI_QUIRK(0x1043, 0x1d4e, "ASUS TM420", ALC256_FIXUP_ASUS_HPE),
8749 SND_PCI_QUIRK(0x1043, 0x1e11, "ASUS Zephyrus G15", ALC289_FIXUP_ASUS_GA502),
8750 SND_PCI_QUIRK(0x1043, 0x1e51, "ASUS Zephyrus M15", ALC294_FIXUP_ASUS_GU502_PINS),
8751 SND_PCI_QUIRK(0x1043, 0x1e8e, "ASUS Zephyrus G15", ALC289_FIXUP_ASUS_GA401),
8752 SND_PCI_QUIRK(0x1043, 0x1f11, "ASUS Zephyrus G14", ALC289_FIXUP_ASUS_GA401),
8753 SND_PCI_QUIRK(0x1043, 0x3030, "ASUS ZN270IE", ALC256_FIXUP_ASUS_AIO_GPIO2),
8754 SND_PCI_QUIRK(0x1043, 0x831a, "ASUS P901", ALC269_FIXUP_STEREO_DMIC),
8755 SND_PCI_QUIRK(0x1043, 0x834a, "ASUS S101", ALC269_FIXUP_STEREO_DMIC),
8756 SND_PCI_QUIRK(0x1043, 0x8398, "ASUS P1005", ALC269_FIXUP_STEREO_DMIC),
8757 SND_PCI_QUIRK(0x1043, 0x83ce, "ASUS P1005", ALC269_FIXUP_STEREO_DMIC),
8758 SND_PCI_QUIRK(0x1043, 0x8516, "ASUS X101CH", ALC269_FIXUP_ASUS_X101),
8759 SND_PCI_QUIRK(0x104d, 0x9073, "Sony VAIO", ALC275_FIXUP_SONY_VAIO_GPIO2),
8760 SND_PCI_QUIRK(0x104d, 0x907b, "Sony VAIO", ALC275_FIXUP_SONY_HWEQ),
8761 SND_PCI_QUIRK(0x104d, 0x9084, "Sony VAIO", ALC275_FIXUP_SONY_HWEQ),
8762 SND_PCI_QUIRK(0x104d, 0x9099, "Sony VAIO S13", ALC275_FIXUP_SONY_DISABLE_AAMIX),
8763 SND_PCI_QUIRK(0x104d, 0x90b5, "Sony VAIO Pro 11", ALC286_FIXUP_SONY_MIC_NO_PRESENCE),
8764 SND_PCI_QUIRK(0x104d, 0x90b6, "Sony VAIO Pro 13", ALC286_FIXUP_SONY_MIC_NO_PRESENCE),
8765 SND_PCI_QUIRK(0x10cf, 0x1475, "Lifebook", ALC269_FIXUP_LIFEBOOK),
8766 SND_PCI_QUIRK(0x10cf, 0x159f, "Lifebook E780", ALC269_FIXUP_LIFEBOOK_NO_HP_TO_LINEOUT),
8767 SND_PCI_QUIRK(0x10cf, 0x15dc, "Lifebook T731", ALC269_FIXUP_LIFEBOOK_HP_PIN),
8768 SND_PCI_QUIRK(0x10cf, 0x1629, "Lifebook U7x7", ALC255_FIXUP_LIFEBOOK_U7x7_HEADSET_MIC),
8769 SND_PCI_QUIRK(0x10cf, 0x1757, "Lifebook E752", ALC269_FIXUP_LIFEBOOK_HP_PIN),
8770 SND_PCI_QUIRK(0x10cf, 0x1845, "Lifebook U904", ALC269_FIXUP_LIFEBOOK_EXTMIC),
8771 SND_PCI_QUIRK(0x10ec, 0x10f2, "Intel Reference board", ALC700_FIXUP_INTEL_REFERENCE),
8772 SND_PCI_QUIRK(0x10ec, 0x118c, "Medion EE4254 MD62100", ALC256_FIXUP_MEDION_HEADSET_NO_PRESENCE),
8773 SND_PCI_QUIRK(0x10ec, 0x1230, "Intel Reference board", ALC295_FIXUP_CHROME_BOOK),
8774 SND_PCI_QUIRK(0x10ec, 0x1252, "Intel Reference board", ALC295_FIXUP_CHROME_BOOK),
8775 SND_PCI_QUIRK(0x10ec, 0x1254, "Intel Reference board", ALC295_FIXUP_CHROME_BOOK),
8776 SND_PCI_QUIRK(0x10f7, 0x8338, "Panasonic CF-SZ6", ALC269_FIXUP_HEADSET_MODE),
8777 SND_PCI_QUIRK(0x144d, 0xc109, "Samsung Ativ book 9 (NP900X3G)", ALC269_FIXUP_INV_DMIC),
8778 …SND_PCI_QUIRK(0x144d, 0xc169, "Samsung Notebook 9 Pen (NP930SBE-K01US)", ALC298_FIXUP_SAMSUNG_HEAD…
8779 …SND_PCI_QUIRK(0x144d, 0xc176, "Samsung Notebook 9 Pro (NP930MBE-K04US)", ALC298_FIXUP_SAMSUNG_HEAD…
8780 …SND_PCI_QUIRK(0x144d, 0xc189, "Samsung Galaxy Flex Book (NT950QCG-X716)", ALC298_FIXUP_SAMSUNG_HEA…
8781 …SND_PCI_QUIRK(0x144d, 0xc18a, "Samsung Galaxy Book Ion (NP930XCJ-K01US)", ALC298_FIXUP_SAMSUNG_HEA…
8782 SND_PCI_QUIRK(0x144d, 0xc740, "Samsung Ativ book 8 (NP870Z5G)", ALC269_FIXUP_ATIV_BOOK_8),
8783 …SND_PCI_QUIRK(0x144d, 0xc812, "Samsung Notebook Pen S (NT950SBE-X58)", ALC298_FIXUP_SAMSUNG_HEADPH…
8784 …SND_PCI_QUIRK(0x144d, 0xc830, "Samsung Galaxy Book Ion (NT950XCJ-X716A)", ALC298_FIXUP_SAMSUNG_HEA…
8785 SND_PCI_QUIRK(0x1458, 0xfa53, "Gigabyte BXBT-2807", ALC283_FIXUP_HEADSET_MIC),
8786 SND_PCI_QUIRK(0x1462, 0xb120, "MSI Cubi MS-B120", ALC283_FIXUP_HEADSET_MIC),
8787 SND_PCI_QUIRK(0x1462, 0xb171, "Cubi N 8GL (MS-B171)", ALC283_FIXUP_HEADSET_MIC),
8788 SND_PCI_QUIRK(0x152d, 0x1082, "Quanta NL3", ALC269_FIXUP_LIFEBOOK),
8789 SND_PCI_QUIRK(0x1558, 0x1323, "Clevo N130ZU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
8790 …SND_PCI_QUIRK(0x1558, 0x1325, "System76 Darter Pro (darp5)", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE…
8791 SND_PCI_QUIRK(0x1558, 0x1401, "Clevo L140[CZ]U", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
8792 SND_PCI_QUIRK(0x1558, 0x1403, "Clevo N140CU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
8793 SND_PCI_QUIRK(0x1558, 0x1404, "Clevo N150CU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
8794 SND_PCI_QUIRK(0x1558, 0x14a1, "Clevo L141MU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
8795 SND_PCI_QUIRK(0x1558, 0x4018, "Clevo NV40M[BE]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
8796 SND_PCI_QUIRK(0x1558, 0x4019, "Clevo NV40MZ", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
8797 SND_PCI_QUIRK(0x1558, 0x4020, "Clevo NV40MB", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
8798 SND_PCI_QUIRK(0x1558, 0x40a1, "Clevo NL40GU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
8799 SND_PCI_QUIRK(0x1558, 0x40c1, "Clevo NL40[CZ]U", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
8800 SND_PCI_QUIRK(0x1558, 0x40d1, "Clevo NL41DU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
8801 SND_PCI_QUIRK(0x1558, 0x5015, "Clevo NH5[58]H[HJK]Q", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
8802 SND_PCI_QUIRK(0x1558, 0x5017, "Clevo NH7[79]H[HJK]Q", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
8803 SND_PCI_QUIRK(0x1558, 0x50a3, "Clevo NJ51GU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
8804 SND_PCI_QUIRK(0x1558, 0x50b3, "Clevo NK50S[BEZ]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
8805 SND_PCI_QUIRK(0x1558, 0x50b6, "Clevo NK50S5", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
8806 SND_PCI_QUIRK(0x1558, 0x50b8, "Clevo NK50SZ", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
8807 SND_PCI_QUIRK(0x1558, 0x50d5, "Clevo NP50D5", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
8808 SND_PCI_QUIRK(0x1558, 0x50e1, "Clevo NH5[58]HPQ", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
8809 SND_PCI_QUIRK(0x1558, 0x50e2, "Clevo NH7[79]HPQ", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
8810 SND_PCI_QUIRK(0x1558, 0x50f0, "Clevo NH50A[CDF]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
8811 SND_PCI_QUIRK(0x1558, 0x50f2, "Clevo NH50E[PR]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
8812 SND_PCI_QUIRK(0x1558, 0x50f3, "Clevo NH58DPQ", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
8813 SND_PCI_QUIRK(0x1558, 0x50f5, "Clevo NH55EPY", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
8814 SND_PCI_QUIRK(0x1558, 0x50f6, "Clevo NH55DPQ", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
8815 SND_PCI_QUIRK(0x1558, 0x5101, "Clevo S510WU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
8816 SND_PCI_QUIRK(0x1558, 0x5157, "Clevo W517GU1", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
8817 SND_PCI_QUIRK(0x1558, 0x51a1, "Clevo NS50MU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
8818 SND_PCI_QUIRK(0x1558, 0x70a1, "Clevo NB70T[HJK]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
8819 SND_PCI_QUIRK(0x1558, 0x70b3, "Clevo NK70SB", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
8820 SND_PCI_QUIRK(0x1558, 0x70f2, "Clevo NH79EPY", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
8821 SND_PCI_QUIRK(0x1558, 0x70f3, "Clevo NH77DPQ", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
8822 SND_PCI_QUIRK(0x1558, 0x70f4, "Clevo NH77EPY", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
8823 SND_PCI_QUIRK(0x1558, 0x70f6, "Clevo NH77DPQ-Y", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
8824 SND_PCI_QUIRK(0x1558, 0x8228, "Clevo NR40BU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
8825 SND_PCI_QUIRK(0x1558, 0x8520, "Clevo NH50D[CD]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
8826 SND_PCI_QUIRK(0x1558, 0x8521, "Clevo NH77D[CD]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
8827 SND_PCI_QUIRK(0x1558, 0x8535, "Clevo NH50D[BE]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
8828 SND_PCI_QUIRK(0x1558, 0x8536, "Clevo NH79D[BE]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
8829 SND_PCI_QUIRK(0x1558, 0x8550, "System76 Gazelle (gaze14)", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
8830 SND_PCI_QUIRK(0x1558, 0x8551, "System76 Gazelle (gaze14)", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
8831 SND_PCI_QUIRK(0x1558, 0x8560, "System76 Gazelle (gaze14)", ALC269_FIXUP_HEADSET_MIC),
8832 SND_PCI_QUIRK(0x1558, 0x8561, "System76 Gazelle (gaze14)", ALC269_FIXUP_HEADSET_MIC),
8833 SND_PCI_QUIRK(0x1558, 0x8562, "Clevo NH[5|7][0-9]RZ[Q]", ALC269_FIXUP_DMIC),
8834 SND_PCI_QUIRK(0x1558, 0x8668, "Clevo NP50B[BE]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
8835 SND_PCI_QUIRK(0x1558, 0x8680, "Clevo NJ50LU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
8836 SND_PCI_QUIRK(0x1558, 0x8686, "Clevo NH50[CZ]U", ALC256_FIXUP_MIC_NO_PRESENCE_AND_RESUME),
8837 SND_PCI_QUIRK(0x1558, 0x8a20, "Clevo NH55DCQ-Y", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
8838 SND_PCI_QUIRK(0x1558, 0x8a51, "Clevo NH70RCQ-Y", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
8839 SND_PCI_QUIRK(0x1558, 0x8d50, "Clevo NH55RCQ-M", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
8840 SND_PCI_QUIRK(0x1558, 0x951d, "Clevo N950T[CDF]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
8841 SND_PCI_QUIRK(0x1558, 0x9600, "Clevo N960K[PR]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
8842 SND_PCI_QUIRK(0x1558, 0x961d, "Clevo N960S[CDF]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
8843 SND_PCI_QUIRK(0x1558, 0x971d, "Clevo N970T[CDF]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
8844 SND_PCI_QUIRK(0x1558, 0xa500, "Clevo NL53RU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
8845 SND_PCI_QUIRK(0x1558, 0xa600, "Clevo NL5XNU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
8846 SND_PCI_QUIRK(0x1558, 0xb018, "Clevo NP50D[BE]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
8847 SND_PCI_QUIRK(0x1558, 0xb019, "Clevo NH77D[BE]Q", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
8848 SND_PCI_QUIRK(0x1558, 0xb022, "Clevo NH77D[DC][QW]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
8849 SND_PCI_QUIRK(0x1558, 0xc018, "Clevo NP50D[BE]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
8850 SND_PCI_QUIRK(0x1558, 0xc019, "Clevo NH77D[BE]Q", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
8851 SND_PCI_QUIRK(0x1558, 0xc022, "Clevo NH77[DC][QW]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
8852 SND_PCI_QUIRK(0x17aa, 0x1036, "Lenovo P520", ALC233_FIXUP_LENOVO_MULTI_CODECS),
8853 SND_PCI_QUIRK(0x17aa, 0x1048, "ThinkCentre Station", ALC623_FIXUP_LENOVO_THINKSTATION_P340),
8854 SND_PCI_QUIRK(0x17aa, 0x20f2, "Thinkpad SL410/510", ALC269_FIXUP_SKU_IGNORE),
8855 SND_PCI_QUIRK(0x17aa, 0x215e, "Thinkpad L512", ALC269_FIXUP_SKU_IGNORE),
8856 SND_PCI_QUIRK(0x17aa, 0x21b8, "Thinkpad Edge 14", ALC269_FIXUP_SKU_IGNORE),
8857 SND_PCI_QUIRK(0x17aa, 0x21ca, "Thinkpad L412", ALC269_FIXUP_SKU_IGNORE),
8858 SND_PCI_QUIRK(0x17aa, 0x21e9, "Thinkpad Edge 15", ALC269_FIXUP_SKU_IGNORE),
8859 SND_PCI_QUIRK(0x17aa, 0x21f3, "Thinkpad T430", ALC269_FIXUP_LENOVO_DOCK),
8860 SND_PCI_QUIRK(0x17aa, 0x21f6, "Thinkpad T530", ALC269_FIXUP_LENOVO_DOCK_LIMIT_BOOST),
8861 SND_PCI_QUIRK(0x17aa, 0x21fa, "Thinkpad X230", ALC269_FIXUP_LENOVO_DOCK),
8862 SND_PCI_QUIRK(0x17aa, 0x21fb, "Thinkpad T430s", ALC269_FIXUP_LENOVO_DOCK),
8863 SND_PCI_QUIRK(0x17aa, 0x2203, "Thinkpad X230 Tablet", ALC269_FIXUP_LENOVO_DOCK),
8864 SND_PCI_QUIRK(0x17aa, 0x2208, "Thinkpad T431s", ALC269_FIXUP_LENOVO_DOCK),
8865 SND_PCI_QUIRK(0x17aa, 0x220c, "Thinkpad T440s", ALC292_FIXUP_TPT440),
8866 SND_PCI_QUIRK(0x17aa, 0x220e, "Thinkpad T440p", ALC292_FIXUP_TPT440_DOCK),
8867 SND_PCI_QUIRK(0x17aa, 0x2210, "Thinkpad T540p", ALC292_FIXUP_TPT440_DOCK),
8868 SND_PCI_QUIRK(0x17aa, 0x2211, "Thinkpad W541", ALC292_FIXUP_TPT440_DOCK),
8869 SND_PCI_QUIRK(0x17aa, 0x2212, "Thinkpad T440", ALC292_FIXUP_TPT440_DOCK),
8870 SND_PCI_QUIRK(0x17aa, 0x2214, "Thinkpad X240", ALC292_FIXUP_TPT440_DOCK),
8871 SND_PCI_QUIRK(0x17aa, 0x2215, "Thinkpad", ALC269_FIXUP_LIMIT_INT_MIC_BOOST),
8872 SND_PCI_QUIRK(0x17aa, 0x2218, "Thinkpad X1 Carbon 2nd", ALC292_FIXUP_TPT440_DOCK),
8873 SND_PCI_QUIRK(0x17aa, 0x2223, "ThinkPad T550", ALC292_FIXUP_TPT440_DOCK),
8874 SND_PCI_QUIRK(0x17aa, 0x2226, "ThinkPad X250", ALC292_FIXUP_TPT440_DOCK),
8875 SND_PCI_QUIRK(0x17aa, 0x222d, "Thinkpad", ALC298_FIXUP_TPT470_DOCK),
8876 SND_PCI_QUIRK(0x17aa, 0x222e, "Thinkpad", ALC298_FIXUP_TPT470_DOCK),
8877 SND_PCI_QUIRK(0x17aa, 0x2231, "Thinkpad T560", ALC292_FIXUP_TPT460),
8878 SND_PCI_QUIRK(0x17aa, 0x2233, "Thinkpad", ALC292_FIXUP_TPT460),
8879 SND_PCI_QUIRK(0x17aa, 0x2245, "Thinkpad T470", ALC298_FIXUP_TPT470_DOCK),
8880 SND_PCI_QUIRK(0x17aa, 0x2246, "Thinkpad", ALC298_FIXUP_TPT470_DOCK),
8881 SND_PCI_QUIRK(0x17aa, 0x2247, "Thinkpad", ALC298_FIXUP_TPT470_DOCK),
8882 SND_PCI_QUIRK(0x17aa, 0x2249, "Thinkpad", ALC292_FIXUP_TPT460),
8883 SND_PCI_QUIRK(0x17aa, 0x224b, "Thinkpad", ALC298_FIXUP_TPT470_DOCK),
8884 SND_PCI_QUIRK(0x17aa, 0x224c, "Thinkpad", ALC298_FIXUP_TPT470_DOCK),
8885 SND_PCI_QUIRK(0x17aa, 0x224d, "Thinkpad", ALC298_FIXUP_TPT470_DOCK),
8886 SND_PCI_QUIRK(0x17aa, 0x225d, "Thinkpad T480", ALC269_FIXUP_LIMIT_INT_MIC_BOOST),
8887 SND_PCI_QUIRK(0x17aa, 0x2292, "Thinkpad X1 Carbon 7th", ALC285_FIXUP_THINKPAD_HEADSET_JACK),
8888 SND_PCI_QUIRK(0x17aa, 0x22be, "Thinkpad X1 Carbon 8th", ALC285_FIXUP_THINKPAD_HEADSET_JACK),
8889 SND_PCI_QUIRK(0x17aa, 0x22c1, "Thinkpad P1 Gen 3", ALC285_FIXUP_THINKPAD_NO_BASS_SPK_HEADSET_JACK),
8890 …SND_PCI_QUIRK(0x17aa, 0x22c2, "Thinkpad X1 Extreme Gen 3", ALC285_FIXUP_THINKPAD_NO_BASS_SPK_HEADS…
8891 SND_PCI_QUIRK(0x17aa, 0x30bb, "ThinkCentre AIO", ALC233_FIXUP_LENOVO_LINE2_MIC_HOTKEY),
8892 SND_PCI_QUIRK(0x17aa, 0x30e2, "ThinkCentre AIO", ALC233_FIXUP_LENOVO_LINE2_MIC_HOTKEY),
8893 SND_PCI_QUIRK(0x17aa, 0x310c, "ThinkCentre Station", ALC294_FIXUP_LENOVO_MIC_LOCATION),
8894 SND_PCI_QUIRK(0x17aa, 0x3111, "ThinkCentre Station", ALC294_FIXUP_LENOVO_MIC_LOCATION),
8895 SND_PCI_QUIRK(0x17aa, 0x312a, "ThinkCentre Station", ALC294_FIXUP_LENOVO_MIC_LOCATION),
8896 SND_PCI_QUIRK(0x17aa, 0x312f, "ThinkCentre Station", ALC294_FIXUP_LENOVO_MIC_LOCATION),
8897 SND_PCI_QUIRK(0x17aa, 0x313c, "ThinkCentre Station", ALC294_FIXUP_LENOVO_MIC_LOCATION),
8898 SND_PCI_QUIRK(0x17aa, 0x3151, "ThinkCentre Station", ALC283_FIXUP_HEADSET_MIC),
8899 SND_PCI_QUIRK(0x17aa, 0x3176, "ThinkCentre Station", ALC283_FIXUP_HEADSET_MIC),
8900 SND_PCI_QUIRK(0x17aa, 0x3178, "ThinkCentre Station", ALC283_FIXUP_HEADSET_MIC),
8901 SND_PCI_QUIRK(0x17aa, 0x31af, "ThinkCentre Station", ALC623_FIXUP_LENOVO_THINKSTATION_P340),
8902 SND_PCI_QUIRK(0x17aa, 0x3813, "Legion 7i 15IMHG05", ALC287_FIXUP_LEGION_15IMHG05_SPEAKERS),
8903 SND_PCI_QUIRK(0x17aa, 0x3818, "Lenovo C940", ALC298_FIXUP_LENOVO_SPK_VOLUME),
8904 SND_PCI_QUIRK(0x17aa, 0x3819, "Lenovo 13s Gen2 ITL", ALC287_FIXUP_13S_GEN2_SPEAKERS),
8905 SND_PCI_QUIRK(0x17aa, 0x3824, "Legion Y9000X 2020", ALC285_FIXUP_LEGION_Y9000X_SPEAKERS),
8906 SND_PCI_QUIRK(0x17aa, 0x3827, "Ideapad S740", ALC285_FIXUP_IDEAPAD_S740_COEF),
8907 SND_PCI_QUIRK(0x17aa, 0x3834, "Lenovo IdeaPad Slim 9i 14ITL5", ALC287_FIXUP_YOGA7_14ITL_SPEAKERS),
8908 SND_PCI_QUIRK(0x17aa, 0x3843, "Yoga 9i", ALC287_FIXUP_IDEAPAD_BASS_SPK_AMP),
8909 SND_PCI_QUIRK(0x17aa, 0x384a, "Lenovo Yoga 7 15ITL5", ALC287_FIXUP_YOGA7_14ITL_SPEAKERS),
8910 SND_PCI_QUIRK(0x17aa, 0x3852, "Lenovo Yoga 7 14ITL5", ALC287_FIXUP_YOGA7_14ITL_SPEAKERS),
8911 SND_PCI_QUIRK(0x17aa, 0x3853, "Lenovo Yoga 7 15ITL5", ALC287_FIXUP_YOGA7_14ITL_SPEAKERS),
8912 SND_PCI_QUIRK(0x17aa, 0x3902, "Lenovo E50-80", ALC269_FIXUP_DMIC_THINKPAD_ACPI),
8913 SND_PCI_QUIRK(0x17aa, 0x3977, "IdeaPad S210", ALC283_FIXUP_INT_MIC),
8914 SND_PCI_QUIRK(0x17aa, 0x3978, "Lenovo B50-70", ALC269_FIXUP_DMIC_THINKPAD_ACPI),
8915 SND_PCI_QUIRK(0x17aa, 0x3bf8, "Quanta FL1", ALC269_FIXUP_PCM_44K),
8916 SND_PCI_QUIRK(0x17aa, 0x5013, "Thinkpad", ALC269_FIXUP_LIMIT_INT_MIC_BOOST),
8917 SND_PCI_QUIRK(0x17aa, 0x501a, "Thinkpad", ALC283_FIXUP_INT_MIC),
8918 SND_PCI_QUIRK(0x17aa, 0x501e, "Thinkpad L440", ALC292_FIXUP_TPT440_DOCK),
8919 SND_PCI_QUIRK(0x17aa, 0x5026, "Thinkpad", ALC269_FIXUP_LIMIT_INT_MIC_BOOST),
8920 SND_PCI_QUIRK(0x17aa, 0x5034, "Thinkpad T450", ALC292_FIXUP_TPT440_DOCK),
8921 SND_PCI_QUIRK(0x17aa, 0x5036, "Thinkpad T450s", ALC292_FIXUP_TPT440_DOCK),
8922 SND_PCI_QUIRK(0x17aa, 0x503c, "Thinkpad L450", ALC292_FIXUP_TPT440_DOCK),
8923 SND_PCI_QUIRK(0x17aa, 0x504a, "ThinkPad X260", ALC292_FIXUP_TPT440_DOCK),
8924 SND_PCI_QUIRK(0x17aa, 0x504b, "Thinkpad", ALC293_FIXUP_LENOVO_SPK_NOISE),
8925 SND_PCI_QUIRK(0x17aa, 0x5050, "Thinkpad T560p", ALC292_FIXUP_TPT460),
8926 SND_PCI_QUIRK(0x17aa, 0x5051, "Thinkpad L460", ALC292_FIXUP_TPT460),
8927 SND_PCI_QUIRK(0x17aa, 0x5053, "Thinkpad T460", ALC292_FIXUP_TPT460),
8928 SND_PCI_QUIRK(0x17aa, 0x505d, "Thinkpad", ALC298_FIXUP_TPT470_DOCK),
8929 SND_PCI_QUIRK(0x17aa, 0x505f, "Thinkpad", ALC298_FIXUP_TPT470_DOCK),
8930 SND_PCI_QUIRK(0x17aa, 0x5062, "Thinkpad", ALC298_FIXUP_TPT470_DOCK),
8931 SND_PCI_QUIRK(0x17aa, 0x5109, "Thinkpad", ALC269_FIXUP_LIMIT_INT_MIC_BOOST),
8932 SND_PCI_QUIRK(0x17aa, 0x511e, "Thinkpad", ALC298_FIXUP_TPT470_DOCK),
8933 SND_PCI_QUIRK(0x17aa, 0x511f, "Thinkpad", ALC298_FIXUP_TPT470_DOCK),
8934 SND_PCI_QUIRK(0x17aa, 0x9e54, "LENOVO NB", ALC269_FIXUP_LENOVO_EAPD),
8935 SND_PCI_QUIRK(0x1849, 0x1233, "ASRock NUC Box 1100", ALC233_FIXUP_NO_AUDIO_JACK),
8936 SND_PCI_QUIRK(0x19e5, 0x3204, "Huawei MACH-WX9", ALC256_FIXUP_HUAWEI_MACH_WX9_PINS),
8937 SND_PCI_QUIRK(0x1b35, 0x1235, "CZC B20", ALC269_FIXUP_CZC_B20),
8938 SND_PCI_QUIRK(0x1b35, 0x1236, "CZC TMI", ALC269_FIXUP_CZC_TMI),
8939 SND_PCI_QUIRK(0x1b35, 0x1237, "CZC L101", ALC269_FIXUP_CZC_L101),
8940 …SND_PCI_QUIRK(0x1b7d, 0xa831, "Ordissimo EVE2 ", ALC269VB_FIXUP_ORDISSIMO_EVE2), /* Also known as …
8941 SND_PCI_QUIRK(0x1c06, 0x2013, "Lemote A1802", ALC269_FIXUP_LEMOTE_A1802),
8942 SND_PCI_QUIRK(0x1c06, 0x2015, "Lemote A190X", ALC269_FIXUP_LEMOTE_A190X),
8943 SND_PCI_QUIRK(0x1d05, 0x1132, "TongFang PHxTxX1", ALC256_FIXUP_SET_COEF_DEFAULTS),
8944 SND_PCI_QUIRK(0x1d72, 0x1602, "RedmiBook", ALC255_FIXUP_XIAOMI_HEADSET_MIC),
8945 SND_PCI_QUIRK(0x1d72, 0x1701, "XiaomiNotebook Pro", ALC298_FIXUP_DELL1_MIC_NO_PRESENCE),
8946 SND_PCI_QUIRK(0x1d72, 0x1901, "RedmiBook 14", ALC256_FIXUP_ASUS_HEADSET_MIC),
8947 SND_PCI_QUIRK(0x1d72, 0x1947, "RedmiBook Air", ALC255_FIXUP_XIAOMI_HEADSET_MIC),
8948 SND_PCI_QUIRK(0x8086, 0x2074, "Intel NUC 8", ALC233_FIXUP_INTEL_NUC8_DMIC),
8949 SND_PCI_QUIRK(0x8086, 0x2080, "Intel NUC 8 Rugged", ALC256_FIXUP_INTEL_NUC8_RUGGED),
8950 SND_PCI_QUIRK(0x8086, 0x2081, "Intel NUC 10", ALC256_FIXUP_INTEL_NUC10),
8952 #if 0
8958 SND_PCI_QUIRK(0x1043, 0x8330, "ASUS Eeepc P703 P900A",
8960 SND_PCI_QUIRK(0x1043, 0x1013, "ASUS N61Da", ALC269_FIXUP_AMIC),
8961 SND_PCI_QUIRK(0x1043, 0x1143, "ASUS B53f", ALC269_FIXUP_AMIC),
8962 SND_PCI_QUIRK(0x1043, 0x1133, "ASUS UJ20ft", ALC269_FIXUP_AMIC),
8963 SND_PCI_QUIRK(0x1043, 0x1183, "ASUS K72DR", ALC269_FIXUP_AMIC),
8964 SND_PCI_QUIRK(0x1043, 0x11b3, "ASUS K52DR", ALC269_FIXUP_AMIC),
8965 SND_PCI_QUIRK(0x1043, 0x11e3, "ASUS U33Jc", ALC269_FIXUP_AMIC),
8966 SND_PCI_QUIRK(0x1043, 0x1273, "ASUS UL80Jt", ALC269_FIXUP_AMIC),
8967 SND_PCI_QUIRK(0x1043, 0x1283, "ASUS U53Jc", ALC269_FIXUP_AMIC),
8968 SND_PCI_QUIRK(0x1043, 0x12b3, "ASUS N82JV", ALC269_FIXUP_AMIC),
8969 SND_PCI_QUIRK(0x1043, 0x12d3, "ASUS N61Jv", ALC269_FIXUP_AMIC),
8970 SND_PCI_QUIRK(0x1043, 0x13a3, "ASUS UL30Vt", ALC269_FIXUP_AMIC),
8971 SND_PCI_QUIRK(0x1043, 0x1373, "ASUS G73JX", ALC269_FIXUP_AMIC),
8972 SND_PCI_QUIRK(0x1043, 0x1383, "ASUS UJ30Jc", ALC269_FIXUP_AMIC),
8973 SND_PCI_QUIRK(0x1043, 0x13d3, "ASUS N61JA", ALC269_FIXUP_AMIC),
8974 SND_PCI_QUIRK(0x1043, 0x1413, "ASUS UL50", ALC269_FIXUP_AMIC),
8975 SND_PCI_QUIRK(0x1043, 0x1443, "ASUS UL30", ALC269_FIXUP_AMIC),
8976 SND_PCI_QUIRK(0x1043, 0x1453, "ASUS M60Jv", ALC269_FIXUP_AMIC),
8977 SND_PCI_QUIRK(0x1043, 0x1483, "ASUS UL80", ALC269_FIXUP_AMIC),
8978 SND_PCI_QUIRK(0x1043, 0x14f3, "ASUS F83Vf", ALC269_FIXUP_AMIC),
8979 SND_PCI_QUIRK(0x1043, 0x14e3, "ASUS UL20", ALC269_FIXUP_AMIC),
8980 SND_PCI_QUIRK(0x1043, 0x1513, "ASUS UX30", ALC269_FIXUP_AMIC),
8981 SND_PCI_QUIRK(0x1043, 0x1593, "ASUS N51Vn", ALC269_FIXUP_AMIC),
8982 SND_PCI_QUIRK(0x1043, 0x15a3, "ASUS N60Jv", ALC269_FIXUP_AMIC),
8983 SND_PCI_QUIRK(0x1043, 0x15b3, "ASUS N60Dp", ALC269_FIXUP_AMIC),
8984 SND_PCI_QUIRK(0x1043, 0x15c3, "ASUS N70De", ALC269_FIXUP_AMIC),
8985 SND_PCI_QUIRK(0x1043, 0x15e3, "ASUS F83T", ALC269_FIXUP_AMIC),
8986 SND_PCI_QUIRK(0x1043, 0x1643, "ASUS M60J", ALC269_FIXUP_AMIC),
8987 SND_PCI_QUIRK(0x1043, 0x1653, "ASUS U50", ALC269_FIXUP_AMIC),
8988 SND_PCI_QUIRK(0x1043, 0x1693, "ASUS F50N", ALC269_FIXUP_AMIC),
8989 SND_PCI_QUIRK(0x1043, 0x16a3, "ASUS F5Q", ALC269_FIXUP_AMIC),
8990 SND_PCI_QUIRK(0x1043, 0x1723, "ASUS P80", ALC269_FIXUP_AMIC),
8991 SND_PCI_QUIRK(0x1043, 0x1743, "ASUS U80", ALC269_FIXUP_AMIC),
8992 SND_PCI_QUIRK(0x1043, 0x1773, "ASUS U20A", ALC269_FIXUP_AMIC),
8993 SND_PCI_QUIRK(0x1043, 0x1883, "ASUS F81Se", ALC269_FIXUP_AMIC),
8994 SND_PCI_QUIRK(0x152d, 0x1778, "Quanta ON1", ALC269_FIXUP_DMIC),
8995 SND_PCI_QUIRK(0x17aa, 0x3be9, "Quanta Wistron", ALC269_FIXUP_AMIC),
8996 SND_PCI_QUIRK(0x17aa, 0x3bf8, "Quanta FL1", ALC269_FIXUP_AMIC),
8997 SND_PCI_QUIRK(0x17ff, 0x059a, "Quanta EL3", ALC269_FIXUP_DMIC),
8998 SND_PCI_QUIRK(0x17ff, 0x059b, "Quanta JR1", ALC269_FIXUP_DMIC),
9004 SND_PCI_QUIRK_VENDOR(0x1025, "Acer Aspire", ALC271_FIXUP_DMIC),
9005 SND_PCI_QUIRK_VENDOR(0x103c, "HP", ALC269_FIXUP_HP_MUTE_LED),
9006 SND_PCI_QUIRK_VENDOR(0x104d, "Sony VAIO", ALC269_FIXUP_SONY_VAIO),
9007 SND_PCI_QUIRK_VENDOR(0x17aa, "Thinkpad", ALC269_FIXUP_THINKPAD_ACPI),
9008 SND_PCI_QUIRK_VENDOR(0x19e5, "Huawei Matebook", ALC255_FIXUP_MIC_MUTE_LED),
9013 {.id = ALC269_FIXUP_AMIC, .name = "laptop-amic"},
9014 {.id = ALC269_FIXUP_DMIC, .name = "laptop-dmic"},
9015 {.id = ALC269_FIXUP_STEREO_DMIC, .name = "alc269-dmic"},
9016 {.id = ALC271_FIXUP_DMIC, .name = "alc271-dmic"},
9017 {.id = ALC269_FIXUP_INV_DMIC, .name = "inv-dmic"},
9018 {.id = ALC269_FIXUP_HEADSET_MIC, .name = "headset-mic"},
9019 {.id = ALC269_FIXUP_HEADSET_MODE, .name = "headset-mode"},
9020 {.id = ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC, .name = "headset-mode-no-hp-mic"},
9021 {.id = ALC269_FIXUP_LENOVO_DOCK, .name = "lenovo-dock"},
9022 {.id = ALC269_FIXUP_LENOVO_DOCK_LIMIT_BOOST, .name = "lenovo-dock-limit-boost"},
9023 {.id = ALC269_FIXUP_HP_GPIO_LED, .name = "hp-gpio-led"},
9024 {.id = ALC269_FIXUP_HP_DOCK_GPIO_MIC1_LED, .name = "hp-dock-gpio-mic1-led"},
9025 {.id = ALC269_FIXUP_DELL1_MIC_NO_PRESENCE, .name = "dell-headset-multi"},
9026 {.id = ALC269_FIXUP_DELL2_MIC_NO_PRESENCE, .name = "dell-headset-dock"},
9027 {.id = ALC269_FIXUP_DELL3_MIC_NO_PRESENCE, .name = "dell-headset3"},
9028 {.id = ALC269_FIXUP_DELL4_MIC_NO_PRESENCE, .name = "dell-headset4"},
9029 {.id = ALC283_FIXUP_CHROME_BOOK, .name = "alc283-dac-wcaps"},
9030 {.id = ALC283_FIXUP_SENSE_COMBO_JACK, .name = "alc283-sense-combo"},
9031 {.id = ALC292_FIXUP_TPT440_DOCK, .name = "tpt440-dock"},
9034 {.id = ALC298_FIXUP_TPT470_DOCK_FIX, .name = "tpt470-dock-fix"},
9035 {.id = ALC298_FIXUP_TPT470_DOCK, .name = "tpt470-dock"},
9036 {.id = ALC233_FIXUP_LENOVO_MULTI_CODECS, .name = "dual-codecs"},
9037 {.id = ALC700_FIXUP_INTEL_REFERENCE, .name = "alc700-ref"},
9039 {.id = ALC269_FIXUP_DELL_M101Z, .name = "dell-m101z"},
9040 {.id = ALC269_FIXUP_ASUS_G73JW, .name = "asus-g73jw"},
9041 {.id = ALC269_FIXUP_LENOVO_EAPD, .name = "lenovo-eapd"},
9042 {.id = ALC275_FIXUP_SONY_HWEQ, .name = "sony-hweq"},
9045 {.id = ALC269_FIXUP_LIFEBOOK_EXTMIC, .name = "lifebook-extmic"},
9046 {.id = ALC269_FIXUP_LIFEBOOK_HP_PIN, .name = "lifebook-hp-pin"},
9047 {.id = ALC255_FIXUP_LIFEBOOK_U7x7_HEADSET_MIC, .name = "lifebook-u7x7"},
9048 {.id = ALC269VB_FIXUP_AMIC, .name = "alc269vb-amic"},
9049 {.id = ALC269VB_FIXUP_DMIC, .name = "alc269vb-dmic"},
9050 {.id = ALC269_FIXUP_HP_MUTE_LED_MIC1, .name = "hp-mute-led-mic1"},
9051 {.id = ALC269_FIXUP_HP_MUTE_LED_MIC2, .name = "hp-mute-led-mic2"},
9052 {.id = ALC269_FIXUP_HP_MUTE_LED_MIC3, .name = "hp-mute-led-mic3"},
9053 {.id = ALC269_FIXUP_HP_GPIO_MIC1_LED, .name = "hp-gpio-mic1"},
9054 {.id = ALC269_FIXUP_HP_LINE1_MIC1_LED, .name = "hp-line1-mic1"},
9056 {.id = ALC286_FIXUP_SONY_MIC_NO_PRESENCE, .name = "sony-nomic"},
9057 {.id = ALC269_FIXUP_ASPIRE_HEADSET_MIC, .name = "aspire-headset-mic"},
9058 {.id = ALC269_FIXUP_ASUS_X101, .name = "asus-x101"},
9059 {.id = ALC271_FIXUP_HP_GATE_MIC_JACK, .name = "acer-ao7xx"},
9060 {.id = ALC271_FIXUP_HP_GATE_MIC_JACK_E1_572, .name = "acer-aspire-e1"},
9061 {.id = ALC269_FIXUP_ACER_AC700, .name = "acer-ac700"},
9062 {.id = ALC269_FIXUP_LIMIT_INT_MIC_BOOST, .name = "limit-mic-boost"},
9063 {.id = ALC269VB_FIXUP_ASUS_ZENBOOK, .name = "asus-zenbook"},
9064 {.id = ALC269VB_FIXUP_ASUS_ZENBOOK_UX31A, .name = "asus-zenbook-ux31a"},
9066 {.id = ALC282_FIXUP_ASUS_TX300, .name = "asus-tx300"},
9067 {.id = ALC283_FIXUP_INT_MIC, .name = "alc283-int-mic"},
9068 {.id = ALC290_FIXUP_MONO_SPEAKERS_HSJACK, .name = "mono-speakers"},
9069 {.id = ALC290_FIXUP_SUBWOOFER_HSJACK, .name = "alc290-subwoofer"},
9071 {.id = ALC269_FIXUP_DMIC_THINKPAD_ACPI, .name = "dmic-thinkpad"},
9072 {.id = ALC255_FIXUP_ACER_MIC_NO_PRESENCE, .name = "alc255-acer"},
9073 {.id = ALC255_FIXUP_ASUS_MIC_NO_PRESENCE, .name = "alc255-asus"},
9074 {.id = ALC255_FIXUP_DELL1_MIC_NO_PRESENCE, .name = "alc255-dell1"},
9075 {.id = ALC255_FIXUP_DELL2_MIC_NO_PRESENCE, .name = "alc255-dell2"},
9076 {.id = ALC293_FIXUP_DELL1_MIC_NO_PRESENCE, .name = "alc293-dell1"},
9077 {.id = ALC283_FIXUP_HEADSET_MIC, .name = "alc283-headset"},
9078 {.id = ALC255_FIXUP_MIC_MUTE_LED, .name = "alc255-dell-mute"},
9079 {.id = ALC282_FIXUP_ASPIRE_V5_PINS, .name = "aspire-v5"},
9080 {.id = ALC269VB_FIXUP_ASPIRE_E1_COEF, .name = "aspire-e1-coef"},
9081 {.id = ALC280_FIXUP_HP_GPIO4, .name = "hp-gpio4"},
9082 {.id = ALC286_FIXUP_HP_GPIO_LED, .name = "hp-gpio-led"},
9083 {.id = ALC280_FIXUP_HP_GPIO2_MIC_HOTKEY, .name = "hp-gpio2-hotkey"},
9084 {.id = ALC280_FIXUP_HP_DOCK_PINS, .name = "hp-dock-pins"},
9085 {.id = ALC269_FIXUP_HP_DOCK_GPIO_MIC1_LED, .name = "hp-dock-gpio-mic"},
9086 {.id = ALC280_FIXUP_HP_9480M, .name = "hp-9480m"},
9087 {.id = ALC288_FIXUP_DELL_HEADSET_MODE, .name = "alc288-dell-headset"},
9088 {.id = ALC288_FIXUP_DELL1_MIC_NO_PRESENCE, .name = "alc288-dell1"},
9089 {.id = ALC288_FIXUP_DELL_XPS_13, .name = "alc288-dell-xps13"},
9090 {.id = ALC292_FIXUP_DELL_E7X, .name = "dell-e7x"},
9091 {.id = ALC293_FIXUP_DISABLE_AAMIX_MULTIJACK, .name = "alc293-dell"},
9092 {.id = ALC298_FIXUP_DELL1_MIC_NO_PRESENCE, .name = "alc298-dell1"},
9093 {.id = ALC298_FIXUP_DELL_AIO_MIC_NO_PRESENCE, .name = "alc298-dell-aio"},
9094 {.id = ALC275_FIXUP_DELL_XPS, .name = "alc275-dell-xps"},
9095 {.id = ALC293_FIXUP_LENOVO_SPK_NOISE, .name = "lenovo-spk-noise"},
9096 {.id = ALC233_FIXUP_LENOVO_LINE2_MIC_HOTKEY, .name = "lenovo-hotkey"},
9097 {.id = ALC255_FIXUP_DELL_SPK_NOISE, .name = "dell-spk-noise"},
9098 {.id = ALC225_FIXUP_DELL1_MIC_NO_PRESENCE, .name = "alc225-dell1"},
9099 {.id = ALC295_FIXUP_DISABLE_DAC3, .name = "alc295-disable-dac3"},
9100 {.id = ALC285_FIXUP_SPEAKER2_TO_DAC1, .name = "alc285-speaker2-to-dac1"},
9101 {.id = ALC280_FIXUP_HP_HEADSET_MIC, .name = "alc280-hp-headset"},
9102 {.id = ALC221_FIXUP_HP_FRONT_MIC, .name = "alc221-hp-mic"},
9103 {.id = ALC298_FIXUP_SPK_VOLUME, .name = "alc298-spk-volume"},
9104 {.id = ALC256_FIXUP_DELL_INSPIRON_7559_SUBWOOFER, .name = "dell-inspiron-7559"},
9105 {.id = ALC269_FIXUP_ATIV_BOOK_8, .name = "ativ-book"},
9106 {.id = ALC221_FIXUP_HP_MIC_NO_PRESENCE, .name = "alc221-hp-mic"},
9107 {.id = ALC256_FIXUP_ASUS_HEADSET_MODE, .name = "alc256-asus-headset"},
9108 {.id = ALC256_FIXUP_ASUS_MIC, .name = "alc256-asus-mic"},
9109 {.id = ALC256_FIXUP_ASUS_AIO_GPIO2, .name = "alc256-asus-aio"},
9110 {.id = ALC233_FIXUP_ASUS_MIC_NO_PRESENCE, .name = "alc233-asus"},
9111 {.id = ALC233_FIXUP_EAPD_COEF_AND_MIC_NO_PRESENCE, .name = "alc233-eapd"},
9112 {.id = ALC294_FIXUP_LENOVO_MIC_LOCATION, .name = "alc294-lenovo-mic"},
9113 {.id = ALC225_FIXUP_DELL_WYSE_MIC_NO_PRESENCE, .name = "alc225-wyse"},
9114 {.id = ALC274_FIXUP_DELL_AIO_LINEOUT_VERB, .name = "alc274-dell-aio"},
9115 {.id = ALC255_FIXUP_DUMMY_LINEOUT_VERB, .name = "alc255-dummy-lineout"},
9116 {.id = ALC255_FIXUP_DELL_HEADSET_MIC, .name = "alc255-dell-headset"},
9117 {.id = ALC295_FIXUP_HP_X360, .name = "alc295-hp-x360"},
9118 {.id = ALC225_FIXUP_HEADSET_JACK, .name = "alc-headset-jack"},
9119 {.id = ALC295_FIXUP_CHROME_BOOK, .name = "alc-chrome-book"},
9120 {.id = ALC299_FIXUP_PREDATOR_SPK, .name = "predator-spk"},
9121 {.id = ALC298_FIXUP_HUAWEI_MBX_STEREO, .name = "huawei-mbx-stereo"},
9122 {.id = ALC256_FIXUP_MEDION_HEADSET_NO_PRESENCE, .name = "alc256-medion-headset"},
9123 {.id = ALC298_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET, .name = "alc298-samsung-headphone"},
9124 {.id = ALC255_FIXUP_XIAOMI_HEADSET_MIC, .name = "alc255-xiaomi-headset"},
9125 {.id = ALC274_FIXUP_HP_MIC, .name = "alc274-hp-mic-detect"},
9126 {.id = ALC245_FIXUP_HP_X360_AMP, .name = "alc245-hp-x360-amp"},
9127 {.id = ALC295_FIXUP_HP_OMEN, .name = "alc295-hp-omen"},
9128 {.id = ALC285_FIXUP_HP_SPECTRE_X360, .name = "alc285-hp-spectre-x360"},
9129 {.id = ALC285_FIXUP_HP_SPECTRE_X360_EB1, .name = "alc285-hp-spectre-x360-eb1"},
9130 {.id = ALC287_FIXUP_IDEAPAD_BASS_SPK_AMP, .name = "alc287-ideapad-bass-spk-amp"},
9131 {.id = ALC623_FIXUP_LENOVO_THINKSTATION_P340, .name = "alc623-lenovo-thinkstation-p340"},
9132 {.id = ALC255_FIXUP_ACER_HEADPHONE_AND_MIC, .name = "alc255-acer-headphone-and-mic"},
9133 {.id = ALC285_FIXUP_HP_GPIO_AMP_INIT, .name = "alc285-hp-amp-init"},
9137 {0x21, 0x04211020}
9140 {0x12, 0x90a60140}, \
9141 {0x14, 0x90170110}, \
9142 {0x21, 0x02211020}
9145 {0x14, 0x90170110}
9148 {0x12, 0x99a30130}
9151 {0x14, 0x90170110}, \
9152 {0x15, 0x0221401f}
9155 {0x12, 0xb7a60130}, \
9156 {0x14, 0x90170110}, \
9157 {0x21, 0x04211020}
9160 {0x12, 0x90a60130}, \
9161 {0x21, 0x03211020}
9164 SND_HDA_PIN_QUIRK(0x10ec0221, 0x103c, "HP Workstation", ALC221_FIXUP_HP_HEADSET_MIC,
9165 {0x14, 0x01014020},
9166 {0x17, 0x90170110},
9167 {0x18, 0x02a11030},
9168 {0x19, 0x0181303F},
9169 {0x21, 0x0221102f}),
9170 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1025, "Acer", ALC255_FIXUP_ACER_MIC_NO_PRESENCE,
9171 {0x12, 0x90a601c0},
9172 {0x14, 0x90171120},
9173 {0x21, 0x02211030}),
9174 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1043, "ASUS", ALC255_FIXUP_ASUS_MIC_NO_PRESENCE,
9175 {0x14, 0x90170110},
9176 {0x1b, 0x90a70130},
9177 {0x21, 0x03211020}),
9178 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1043, "ASUS", ALC255_FIXUP_ASUS_MIC_NO_PRESENCE,
9179 {0x1a, 0x90a70130},
9180 {0x1b, 0x90170110},
9181 {0x21, 0x03211020}),
9182 SND_HDA_PIN_QUIRK(0x10ec0225, 0x1028, "Dell", ALC225_FIXUP_DELL1_MIC_NO_PRESENCE,
9184 {0x12, 0xb7a60130},
9185 {0x14, 0x901701a0}),
9186 SND_HDA_PIN_QUIRK(0x10ec0225, 0x1028, "Dell", ALC225_FIXUP_DELL1_MIC_NO_PRESENCE,
9188 {0x12, 0xb7a60130},
9189 {0x14, 0x901701b0}),
9190 SND_HDA_PIN_QUIRK(0x10ec0225, 0x1028, "Dell", ALC225_FIXUP_DELL1_MIC_NO_PRESENCE,
9192 {0x12, 0xb7a60150},
9193 {0x14, 0x901701a0}),
9194 SND_HDA_PIN_QUIRK(0x10ec0225, 0x1028, "Dell", ALC225_FIXUP_DELL1_MIC_NO_PRESENCE,
9196 {0x12, 0xb7a60150},
9197 {0x14, 0x901701b0}),
9198 SND_HDA_PIN_QUIRK(0x10ec0225, 0x1028, "Dell", ALC225_FIXUP_DELL1_MIC_NO_PRESENCE,
9200 {0x12, 0xb7a60130},
9201 {0x1b, 0x90170110}),
9202 SND_HDA_PIN_QUIRK(0x10ec0233, 0x8086, "Intel NUC Skull Canyon", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE,
9203 {0x1b, 0x01111010},
9204 {0x1e, 0x01451130},
9205 {0x21, 0x02211020}),
9206 SND_HDA_PIN_QUIRK(0x10ec0235, 0x17aa, "Lenovo", ALC233_FIXUP_LENOVO_LINE2_MIC_HOTKEY,
9207 {0x12, 0x90a60140},
9208 {0x14, 0x90170110},
9209 {0x19, 0x02a11030},
9210 {0x21, 0x02211020}),
9211 SND_HDA_PIN_QUIRK(0x10ec0235, 0x17aa, "Lenovo", ALC294_FIXUP_LENOVO_MIC_LOCATION,
9212 {0x14, 0x90170110},
9213 {0x19, 0x02a11030},
9214 {0x1a, 0x02a11040},
9215 {0x1b, 0x01014020},
9216 {0x21, 0x0221101f}),
9217 SND_HDA_PIN_QUIRK(0x10ec0235, 0x17aa, "Lenovo", ALC294_FIXUP_LENOVO_MIC_LOCATION,
9218 {0x14, 0x90170110},
9219 {0x19, 0x02a11030},
9220 {0x1a, 0x02a11040},
9221 {0x1b, 0x01011020},
9222 {0x21, 0x0221101f}),
9223 SND_HDA_PIN_QUIRK(0x10ec0235, 0x17aa, "Lenovo", ALC294_FIXUP_LENOVO_MIC_LOCATION,
9224 {0x14, 0x90170110},
9225 {0x19, 0x02a11020},
9226 {0x1a, 0x02a11030},
9227 {0x21, 0x0221101f}),
9228 SND_HDA_PIN_QUIRK(0x10ec0236, 0x1028, "Dell", ALC236_FIXUP_DELL_AIO_HEADSET_MIC,
9229 {0x21, 0x02211010}),
9230 SND_HDA_PIN_QUIRK(0x10ec0236, 0x103c, "HP", ALC256_FIXUP_HP_HEADSET_MIC,
9231 {0x14, 0x90170110},
9232 {0x19, 0x02a11020},
9233 {0x21, 0x02211030}),
9234 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL2_MIC_NO_PRESENCE,
9235 {0x14, 0x90170110},
9236 {0x21, 0x02211020}),
9237 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
9238 {0x14, 0x90170130},
9239 {0x21, 0x02211040}),
9240 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
9241 {0x12, 0x90a60140},
9242 {0x14, 0x90170110},
9243 {0x21, 0x02211020}),
9244 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
9245 {0x12, 0x90a60160},
9246 {0x14, 0x90170120},
9247 {0x21, 0x02211030}),
9248 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
9249 {0x14, 0x90170110},
9250 {0x1b, 0x02011020},
9251 {0x21, 0x0221101f}),
9252 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
9253 {0x14, 0x90170110},
9254 {0x1b, 0x01011020},
9255 {0x21, 0x0221101f}),
9256 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
9257 {0x14, 0x90170130},
9258 {0x1b, 0x01014020},
9259 {0x21, 0x0221103f}),
9260 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
9261 {0x14, 0x90170130},
9262 {0x1b, 0x01011020},
9263 {0x21, 0x0221103f}),
9264 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
9265 {0x14, 0x90170130},
9266 {0x1b, 0x02011020},
9267 {0x21, 0x0221103f}),
9268 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
9269 {0x14, 0x90170150},
9270 {0x1b, 0x02011020},
9271 {0x21, 0x0221105f}),
9272 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
9273 {0x14, 0x90170110},
9274 {0x1b, 0x01014020},
9275 {0x21, 0x0221101f}),
9276 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
9277 {0x12, 0x90a60160},
9278 {0x14, 0x90170120},
9279 {0x17, 0x90170140},
9280 {0x21, 0x0321102f}),
9281 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
9282 {0x12, 0x90a60160},
9283 {0x14, 0x90170130},
9284 {0x21, 0x02211040}),
9285 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
9286 {0x12, 0x90a60160},
9287 {0x14, 0x90170140},
9288 {0x21, 0x02211050}),
9289 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
9290 {0x12, 0x90a60170},
9291 {0x14, 0x90170120},
9292 {0x21, 0x02211030}),
9293 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
9294 {0x12, 0x90a60170},
9295 {0x14, 0x90170130},
9296 {0x21, 0x02211040}),
9297 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
9298 {0x12, 0x90a60170},
9299 {0x14, 0x90171130},
9300 {0x21, 0x02211040}),
9301 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
9302 {0x12, 0x90a60170},
9303 {0x14, 0x90170140},
9304 {0x21, 0x02211050}),
9305 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell Inspiron 5548", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
9306 {0x12, 0x90a60180},
9307 {0x14, 0x90170130},
9308 {0x21, 0x02211040}),
9309 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell Inspiron 5565", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
9310 {0x12, 0x90a60180},
9311 {0x14, 0x90170120},
9312 {0x21, 0x02211030}),
9313 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
9314 {0x1b, 0x01011020},
9315 {0x21, 0x02211010}),
9316 SND_HDA_PIN_QUIRK(0x10ec0256, 0x1043, "ASUS", ALC256_FIXUP_ASUS_MIC,
9317 {0x14, 0x90170110},
9318 {0x1b, 0x90a70130},
9319 {0x21, 0x04211020}),
9320 SND_HDA_PIN_QUIRK(0x10ec0256, 0x1043, "ASUS", ALC256_FIXUP_ASUS_MIC,
9321 {0x14, 0x90170110},
9322 {0x1b, 0x90a70130},
9323 {0x21, 0x03211020}),
9324 SND_HDA_PIN_QUIRK(0x10ec0256, 0x1043, "ASUS", ALC256_FIXUP_ASUS_MIC_NO_PRESENCE,
9325 {0x12, 0x90a60130},
9326 {0x14, 0x90170110},
9327 {0x21, 0x03211020}),
9328 SND_HDA_PIN_QUIRK(0x10ec0256, 0x1043, "ASUS", ALC256_FIXUP_ASUS_MIC_NO_PRESENCE,
9329 {0x12, 0x90a60130},
9330 {0x14, 0x90170110},
9331 {0x21, 0x04211020}),
9332 SND_HDA_PIN_QUIRK(0x10ec0256, 0x1043, "ASUS", ALC256_FIXUP_ASUS_MIC_NO_PRESENCE,
9333 {0x1a, 0x90a70130},
9334 {0x1b, 0x90170110},
9335 {0x21, 0x03211020}),
9336 SND_HDA_PIN_QUIRK(0x10ec0256, 0x103c, "HP", ALC256_FIXUP_HP_HEADSET_MIC,
9337 {0x14, 0x90170110},
9338 {0x19, 0x02a11020},
9339 {0x21, 0x0221101f}),
9340 SND_HDA_PIN_QUIRK(0x10ec0274, 0x103c, "HP", ALC274_FIXUP_HP_HEADSET_MIC,
9341 {0x17, 0x90170110},
9342 {0x19, 0x03a11030},
9343 {0x21, 0x03211020}),
9344 SND_HDA_PIN_QUIRK(0x10ec0280, 0x103c, "HP", ALC280_FIXUP_HP_GPIO4,
9345 {0x12, 0x90a60130},
9346 {0x14, 0x90170110},
9347 {0x15, 0x0421101f},
9348 {0x1a, 0x04a11020}),
9349 SND_HDA_PIN_QUIRK(0x10ec0280, 0x103c, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED,
9350 {0x12, 0x90a60140},
9351 {0x14, 0x90170110},
9352 {0x15, 0x0421101f},
9353 {0x18, 0x02811030},
9354 {0x1a, 0x04a1103f},
9355 {0x1b, 0x02011020}),
9356 SND_HDA_PIN_QUIRK(0x10ec0282, 0x103c, "HP 15 Touchsmart", ALC269_FIXUP_HP_MUTE_LED_MIC1,
9358 {0x12, 0x99a30130},
9359 {0x19, 0x03a11020},
9360 {0x21, 0x0321101f}),
9361 SND_HDA_PIN_QUIRK(0x10ec0282, 0x103c, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1,
9363 {0x12, 0x99a30130},
9364 {0x19, 0x03a11020},
9365 {0x21, 0x03211040}),
9366 SND_HDA_PIN_QUIRK(0x10ec0282, 0x103c, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1,
9368 {0x12, 0x99a30130},
9369 {0x19, 0x03a11030},
9370 {0x21, 0x03211020}),
9371 SND_HDA_PIN_QUIRK(0x10ec0282, 0x103c, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1,
9373 {0x12, 0x99a30130},
9374 {0x19, 0x04a11020},
9375 {0x21, 0x0421101f}),
9376 SND_HDA_PIN_QUIRK(0x10ec0282, 0x103c, "HP", ALC269_FIXUP_HP_LINE1_MIC1_LED,
9378 {0x12, 0x90a60140},
9379 {0x19, 0x04a11030},
9380 {0x21, 0x04211020}),
9381 SND_HDA_PIN_QUIRK(0x10ec0282, 0x1025, "Acer", ALC282_FIXUP_ACER_DISABLE_LINEOUT,
9383 {0x12, 0x90a609c0},
9384 {0x18, 0x03a11830},
9385 {0x19, 0x04a19831},
9386 {0x1a, 0x0481303f},
9387 {0x1b, 0x04211020},
9388 {0x21, 0x0321101f}),
9389 SND_HDA_PIN_QUIRK(0x10ec0282, 0x1025, "Acer", ALC282_FIXUP_ACER_DISABLE_LINEOUT,
9391 {0x12, 0x90a60940},
9392 {0x18, 0x03a11830},
9393 {0x19, 0x04a19831},
9394 {0x1a, 0x0481303f},
9395 {0x1b, 0x04211020},
9396 {0x21, 0x0321101f}),
9397 SND_HDA_PIN_QUIRK(0x10ec0283, 0x1028, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE,
9399 {0x12, 0x90a60130},
9400 {0x21, 0x0321101f}),
9401 SND_HDA_PIN_QUIRK(0x10ec0283, 0x1028, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE,
9402 {0x12, 0x90a60160},
9403 {0x14, 0x90170120},
9404 {0x21, 0x02211030}),
9405 SND_HDA_PIN_QUIRK(0x10ec0283, 0x1028, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE,
9407 {0x12, 0x90a60130},
9408 {0x19, 0x03a11020},
9409 {0x21, 0x0321101f}),
9410 SND_HDA_PIN_QUIRK(0x10ec0285, 0x17aa, "Lenovo", ALC285_FIXUP_LENOVO_PC_BEEP_IN_NOISE,
9411 {0x12, 0x90a60130},
9412 {0x14, 0x90170110},
9413 {0x19, 0x04a11040},
9414 {0x21, 0x04211020}),
9415 SND_HDA_PIN_QUIRK(0x10ec0285, 0x17aa, "Lenovo", ALC285_FIXUP_LENOVO_PC_BEEP_IN_NOISE,
9416 {0x14, 0x90170110},
9417 {0x19, 0x04a11040},
9418 {0x1d, 0x40600001},
9419 {0x21, 0x04211020}),
9420 SND_HDA_PIN_QUIRK(0x10ec0285, 0x17aa, "Lenovo", ALC285_FIXUP_THINKPAD_NO_BASS_SPK_HEADSET_JACK,
9421 {0x14, 0x90170110},
9422 {0x19, 0x04a11040},
9423 {0x21, 0x04211020}),
9424 SND_HDA_PIN_QUIRK(0x10ec0287, 0x17aa, "Lenovo", ALC285_FIXUP_THINKPAD_HEADSET_JACK,
9425 {0x14, 0x90170110},
9426 {0x17, 0x90170111},
9427 {0x19, 0x03a11030},
9428 {0x21, 0x03211020}),
9429 SND_HDA_PIN_QUIRK(0x10ec0286, 0x1025, "Acer", ALC286_FIXUP_ACER_AIO_MIC_NO_PRESENCE,
9430 {0x12, 0x90a60130},
9431 {0x17, 0x90170110},
9432 {0x21, 0x02211020}),
9433 SND_HDA_PIN_QUIRK(0x10ec0288, 0x1028, "Dell", ALC288_FIXUP_DELL1_MIC_NO_PRESENCE,
9434 {0x12, 0x90a60120},
9435 {0x14, 0x90170110},
9436 {0x21, 0x0321101f}),
9437 SND_HDA_PIN_QUIRK(0x10ec0290, 0x103c, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1,
9439 {0x15, 0x04211040},
9440 {0x18, 0x90170112},
9441 {0x1a, 0x04a11020}),
9442 SND_HDA_PIN_QUIRK(0x10ec0290, 0x103c, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1,
9444 {0x15, 0x04211040},
9445 {0x18, 0x90170110},
9446 {0x1a, 0x04a11020}),
9447 SND_HDA_PIN_QUIRK(0x10ec0290, 0x103c, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1,
9449 {0x15, 0x0421101f},
9450 {0x1a, 0x04a11020}),
9451 SND_HDA_PIN_QUIRK(0x10ec0290, 0x103c, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1,
9453 {0x15, 0x04211020},
9454 {0x1a, 0x04a11040}),
9455 SND_HDA_PIN_QUIRK(0x10ec0290, 0x103c, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1,
9457 {0x14, 0x90170110},
9458 {0x15, 0x04211020},
9459 {0x1a, 0x04a11040}),
9460 SND_HDA_PIN_QUIRK(0x10ec0290, 0x103c, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1,
9462 {0x14, 0x90170110},
9463 {0x15, 0x04211020},
9464 {0x1a, 0x04a11020}),
9465 SND_HDA_PIN_QUIRK(0x10ec0290, 0x103c, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1,
9467 {0x14, 0x90170110},
9468 {0x15, 0x0421101f},
9469 {0x1a, 0x04a11020}),
9470 SND_HDA_PIN_QUIRK(0x10ec0292, 0x1028, "Dell", ALC269_FIXUP_DELL2_MIC_NO_PRESENCE,
9472 {0x12, 0x90a60140},
9473 {0x16, 0x01014020},
9474 {0x19, 0x01a19030}),
9475 SND_HDA_PIN_QUIRK(0x10ec0292, 0x1028, "Dell", ALC269_FIXUP_DELL2_MIC_NO_PRESENCE,
9477 {0x12, 0x90a60140},
9478 {0x16, 0x01014020},
9479 {0x18, 0x02a19031},
9480 {0x19, 0x01a1903e}),
9481 SND_HDA_PIN_QUIRK(0x10ec0292, 0x1028, "Dell", ALC269_FIXUP_DELL3_MIC_NO_PRESENCE,
9483 {0x12, 0x90a60140}),
9484 SND_HDA_PIN_QUIRK(0x10ec0293, 0x1028, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE,
9486 {0x13, 0x90a60140},
9487 {0x16, 0x21014020},
9488 {0x19, 0x21a19030}),
9489 SND_HDA_PIN_QUIRK(0x10ec0293, 0x1028, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE,
9491 {0x13, 0x90a60140}),
9492 SND_HDA_PIN_QUIRK(0x10ec0294, 0x1043, "ASUS", ALC294_FIXUP_ASUS_HPE,
9493 {0x17, 0x90170110},
9494 {0x21, 0x04211020}),
9495 SND_HDA_PIN_QUIRK(0x10ec0294, 0x1043, "ASUS", ALC294_FIXUP_ASUS_MIC,
9496 {0x14, 0x90170110},
9497 {0x1b, 0x90a70130},
9498 {0x21, 0x04211020}),
9499 SND_HDA_PIN_QUIRK(0x10ec0294, 0x1043, "ASUS", ALC294_FIXUP_ASUS_SPK,
9500 {0x12, 0x90a60130},
9501 {0x17, 0x90170110},
9502 {0x21, 0x03211020}),
9503 SND_HDA_PIN_QUIRK(0x10ec0294, 0x1043, "ASUS", ALC294_FIXUP_ASUS_SPK,
9504 {0x12, 0x90a60130},
9505 {0x17, 0x90170110},
9506 {0x21, 0x04211020}),
9507 SND_HDA_PIN_QUIRK(0x10ec0295, 0x1043, "ASUS", ALC294_FIXUP_ASUS_SPK,
9508 {0x12, 0x90a60130},
9509 {0x17, 0x90170110},
9510 {0x21, 0x03211020}),
9511 SND_HDA_PIN_QUIRK(0x10ec0295, 0x1043, "ASUS", ALC295_FIXUP_ASUS_MIC_NO_PRESENCE,
9512 {0x12, 0x90a60120},
9513 {0x17, 0x90170110},
9514 {0x21, 0x04211030}),
9515 SND_HDA_PIN_QUIRK(0x10ec0295, 0x1043, "ASUS", ALC295_FIXUP_ASUS_MIC_NO_PRESENCE,
9516 {0x12, 0x90a60130},
9517 {0x17, 0x90170110},
9518 {0x21, 0x03211020}),
9519 SND_HDA_PIN_QUIRK(0x10ec0295, 0x1043, "ASUS", ALC295_FIXUP_ASUS_MIC_NO_PRESENCE,
9520 {0x12, 0x90a60130},
9521 {0x17, 0x90170110},
9522 {0x21, 0x03211020}),
9523 SND_HDA_PIN_QUIRK(0x10ec0295, 0x1028, "Dell", ALC269_FIXUP_DELL4_MIC_NO_PRESENCE,
9524 {0x14, 0x90170110},
9525 {0x21, 0x04211020}),
9526 SND_HDA_PIN_QUIRK(0x10ec0295, 0x1028, "Dell", ALC269_FIXUP_DELL4_MIC_NO_PRESENCE,
9527 {0x14, 0x90170110},
9528 {0x21, 0x04211030}),
9529 SND_HDA_PIN_QUIRK(0x10ec0295, 0x1028, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE,
9531 {0x17, 0x21014020},
9532 {0x18, 0x21a19030}),
9533 SND_HDA_PIN_QUIRK(0x10ec0295, 0x1028, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE,
9535 {0x17, 0x21014040},
9536 {0x18, 0x21a19050}),
9537 SND_HDA_PIN_QUIRK(0x10ec0295, 0x1028, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE,
9539 SND_HDA_PIN_QUIRK(0x10ec0298, 0x1028, "Dell", ALC298_FIXUP_DELL1_MIC_NO_PRESENCE,
9541 {0x17, 0x90170110}),
9542 SND_HDA_PIN_QUIRK(0x10ec0298, 0x1028, "Dell", ALC298_FIXUP_DELL1_MIC_NO_PRESENCE,
9544 {0x17, 0x90170140}),
9545 SND_HDA_PIN_QUIRK(0x10ec0298, 0x1028, "Dell", ALC298_FIXUP_DELL1_MIC_NO_PRESENCE,
9547 {0x17, 0x90170150}),
9548 SND_HDA_PIN_QUIRK(0x10ec0298, 0x1028, "Dell", ALC298_FIXUP_SPK_VOLUME,
9549 {0x12, 0xb7a60140},
9550 {0x13, 0xb7a60150},
9551 {0x17, 0x90170110},
9552 {0x1a, 0x03011020},
9553 {0x21, 0x03211030}),
9554 SND_HDA_PIN_QUIRK(0x10ec0298, 0x1028, "Dell", ALC298_FIXUP_ALIENWARE_MIC_NO_PRESENCE,
9555 {0x12, 0xb7a60140},
9556 {0x17, 0x90170110},
9557 {0x1a, 0x03a11030},
9558 {0x21, 0x03211020}),
9559 SND_HDA_PIN_QUIRK(0x10ec0299, 0x1028, "Dell", ALC269_FIXUP_DELL4_MIC_NO_PRESENCE,
9561 {0x12, 0xb7a60130},
9562 {0x17, 0x90170110}),
9563 SND_HDA_PIN_QUIRK(0x10ec0623, 0x17aa, "Lenovo", ALC283_FIXUP_HEADSET_MIC,
9564 {0x14, 0x01014010},
9565 {0x17, 0x90170120},
9566 {0x18, 0x02a11030},
9567 {0x19, 0x02a1103f},
9568 {0x21, 0x0221101f}),
9576 * at most one tbl is allowed to define for the same vendor and same codec
9579 SND_HDA_PIN_QUIRK(0x10ec0289, 0x1028, "Dell", ALC269_FIXUP_DELL4_MIC_NO_PRESENCE,
9580 {0x19, 0x40000000},
9581 {0x1b, 0x40000000}),
9582 SND_HDA_PIN_QUIRK(0x10ec0256, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
9583 {0x19, 0x40000000},
9584 {0x1a, 0x40000000}),
9585 SND_HDA_PIN_QUIRK(0x10ec0236, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
9586 {0x19, 0x40000000},
9587 {0x1a, 0x40000000}),
9588 SND_HDA_PIN_QUIRK(0x10ec0274, 0x1028, "Dell", ALC274_FIXUP_DELL_AIO_LINEOUT_VERB,
9589 {0x19, 0x40000000},
9590 {0x1a, 0x40000000}),
9594 static void alc269_fill_coef(struct hda_codec *codec) in alc269_fill_coef() argument
9596 struct alc_spec *spec = codec->spec; in alc269_fill_coef()
9599 if (spec->codec_variant != ALC269_TYPE_ALC269VB) in alc269_fill_coef()
9602 if ((alc_get_coef0(codec) & 0x00ff) < 0x015) { in alc269_fill_coef()
9603 alc_write_coef_idx(codec, 0xf, 0x960b); in alc269_fill_coef()
9604 alc_write_coef_idx(codec, 0xe, 0x8817); in alc269_fill_coef()
9607 if ((alc_get_coef0(codec) & 0x00ff) == 0x016) { in alc269_fill_coef()
9608 alc_write_coef_idx(codec, 0xf, 0x960b); in alc269_fill_coef()
9609 alc_write_coef_idx(codec, 0xe, 0x8814); in alc269_fill_coef()
9612 if ((alc_get_coef0(codec) & 0x00ff) == 0x017) { in alc269_fill_coef()
9614 alc_update_coef_idx(codec, 0x04, 0, 1<<11); in alc269_fill_coef()
9617 if ((alc_get_coef0(codec) & 0x00ff) == 0x018) { in alc269_fill_coef()
9618 val = alc_read_coef_idx(codec, 0xd); in alc269_fill_coef()
9619 if (val != -1 && (val & 0x0c00) >> 10 != 0x1) { in alc269_fill_coef()
9621 alc_write_coef_idx(codec, 0xd, val | (1<<10)); in alc269_fill_coef()
9623 val = alc_read_coef_idx(codec, 0x17); in alc269_fill_coef()
9624 if (val != -1 && (val & 0x01c0) >> 6 != 0x4) { in alc269_fill_coef()
9626 alc_write_coef_idx(codec, 0x17, val | (1<<7)); in alc269_fill_coef()
9631 alc_update_coef_idx(codec, 0x4, 0, 1<<11); in alc269_fill_coef()
9636 static int patch_alc269(struct hda_codec *codec) in patch_alc269() argument
9641 err = alc_alloc_spec(codec, 0x0b); in patch_alc269()
9642 if (err < 0) in patch_alc269()
9645 spec = codec->spec; in patch_alc269()
9646 spec->gen.shared_mic_vref_pin = 0x18; in patch_alc269()
9647 codec->power_save_node = 0; in patch_alc269()
9650 codec->patch_ops.suspend = alc269_suspend; in patch_alc269()
9651 codec->patch_ops.resume = alc269_resume; in patch_alc269()
9653 spec->shutup = alc_default_shutup; in patch_alc269()
9654 spec->init_hook = alc_default_init; in patch_alc269()
9656 switch (codec->core.vendor_id) { in patch_alc269()
9657 case 0x10ec0269: in patch_alc269()
9658 spec->codec_variant = ALC269_TYPE_ALC269VA; in patch_alc269()
9659 switch (alc_get_coef0(codec) & 0x00f0) { in patch_alc269()
9660 case 0x0010: in patch_alc269()
9661 if (codec->bus->pci && in patch_alc269()
9662 codec->bus->pci->subsystem_vendor == 0x1025 && in patch_alc269()
9663 spec->cdefine.platform_type == 1) in patch_alc269()
9664 err = alc_codec_rename(codec, "ALC271X"); in patch_alc269()
9665 spec->codec_variant = ALC269_TYPE_ALC269VB; in patch_alc269()
9667 case 0x0020: in patch_alc269()
9668 if (codec->bus->pci && in patch_alc269()
9669 codec->bus->pci->subsystem_vendor == 0x17aa && in patch_alc269()
9670 codec->bus->pci->subsystem_device == 0x21f3) in patch_alc269()
9671 err = alc_codec_rename(codec, "ALC3202"); in patch_alc269()
9672 spec->codec_variant = ALC269_TYPE_ALC269VC; in patch_alc269()
9674 case 0x0030: in patch_alc269()
9675 spec->codec_variant = ALC269_TYPE_ALC269VD; in patch_alc269()
9678 alc_fix_pll_init(codec, 0x20, 0x04, 15); in patch_alc269()
9680 if (err < 0) in patch_alc269()
9682 spec->shutup = alc269_shutup; in patch_alc269()
9683 spec->init_hook = alc269_fill_coef; in patch_alc269()
9684 alc269_fill_coef(codec); in patch_alc269()
9687 case 0x10ec0280: in patch_alc269()
9688 case 0x10ec0290: in patch_alc269()
9689 spec->codec_variant = ALC269_TYPE_ALC280; in patch_alc269()
9691 case 0x10ec0282: in patch_alc269()
9692 spec->codec_variant = ALC269_TYPE_ALC282; in patch_alc269()
9693 spec->shutup = alc282_shutup; in patch_alc269()
9694 spec->init_hook = alc282_init; in patch_alc269()
9696 case 0x10ec0233: in patch_alc269()
9697 case 0x10ec0283: in patch_alc269()
9698 spec->codec_variant = ALC269_TYPE_ALC283; in patch_alc269()
9699 spec->shutup = alc283_shutup; in patch_alc269()
9700 spec->init_hook = alc283_init; in patch_alc269()
9702 case 0x10ec0284: in patch_alc269()
9703 case 0x10ec0292: in patch_alc269()
9704 spec->codec_variant = ALC269_TYPE_ALC284; in patch_alc269()
9706 case 0x10ec0293: in patch_alc269()
9707 spec->codec_variant = ALC269_TYPE_ALC293; in patch_alc269()
9709 case 0x10ec0286: in patch_alc269()
9710 case 0x10ec0288: in patch_alc269()
9711 spec->codec_variant = ALC269_TYPE_ALC286; in patch_alc269()
9713 case 0x10ec0298: in patch_alc269()
9714 spec->codec_variant = ALC269_TYPE_ALC298; in patch_alc269()
9716 case 0x10ec0235: in patch_alc269()
9717 case 0x10ec0255: in patch_alc269()
9718 spec->codec_variant = ALC269_TYPE_ALC255; in patch_alc269()
9719 spec->shutup = alc256_shutup; in patch_alc269()
9720 spec->init_hook = alc256_init; in patch_alc269()
9722 case 0x10ec0230: in patch_alc269()
9723 case 0x10ec0236: in patch_alc269()
9724 case 0x10ec0256: in patch_alc269()
9725 spec->codec_variant = ALC269_TYPE_ALC256; in patch_alc269()
9726 spec->shutup = alc256_shutup; in patch_alc269()
9727 spec->init_hook = alc256_init; in patch_alc269()
9728 spec->gen.mixer_nid = 0; /* ALC256 does not have any loopback mixer path */ in patch_alc269()
9730 case 0x10ec0257: in patch_alc269()
9731 spec->codec_variant = ALC269_TYPE_ALC257; in patch_alc269()
9732 spec->shutup = alc256_shutup; in patch_alc269()
9733 spec->init_hook = alc256_init; in patch_alc269()
9734 spec->gen.mixer_nid = 0; in patch_alc269()
9736 case 0x10ec0215: in patch_alc269()
9737 case 0x10ec0245: in patch_alc269()
9738 case 0x10ec0285: in patch_alc269()
9739 case 0x10ec0287: in patch_alc269()
9740 case 0x10ec0289: in patch_alc269()
9741 spec->codec_variant = ALC269_TYPE_ALC215; in patch_alc269()
9742 spec->shutup = alc225_shutup; in patch_alc269()
9743 spec->init_hook = alc225_init; in patch_alc269()
9744 spec->gen.mixer_nid = 0; in patch_alc269()
9746 case 0x10ec0225: in patch_alc269()
9747 case 0x10ec0295: in patch_alc269()
9748 case 0x10ec0299: in patch_alc269()
9749 spec->codec_variant = ALC269_TYPE_ALC225; in patch_alc269()
9750 spec->shutup = alc225_shutup; in patch_alc269()
9751 spec->init_hook = alc225_init; in patch_alc269()
9752 spec->gen.mixer_nid = 0; /* no loopback on ALC225, ALC295 and ALC299 */ in patch_alc269()
9754 case 0x10ec0234: in patch_alc269()
9755 case 0x10ec0274: in patch_alc269()
9756 case 0x10ec0294: in patch_alc269()
9757 spec->codec_variant = ALC269_TYPE_ALC294; in patch_alc269()
9758 spec->gen.mixer_nid = 0; /* ALC2x4 does not have any loopback mixer path */ in patch_alc269()
9759 alc_update_coef_idx(codec, 0x6b, 0x0018, (1<<4) | (1<<3)); /* UAJ MIC Vref control by verb */ in patch_alc269()
9760 spec->init_hook = alc294_init; in patch_alc269()
9762 case 0x10ec0300: in patch_alc269()
9763 spec->codec_variant = ALC269_TYPE_ALC300; in patch_alc269()
9764 spec->gen.mixer_nid = 0; /* no loopback on ALC300 */ in patch_alc269()
9766 case 0x10ec0623: in patch_alc269()
9767 spec->codec_variant = ALC269_TYPE_ALC623; in patch_alc269()
9769 case 0x10ec0700: in patch_alc269()
9770 case 0x10ec0701: in patch_alc269()
9771 case 0x10ec0703: in patch_alc269()
9772 case 0x10ec0711: in patch_alc269()
9773 spec->codec_variant = ALC269_TYPE_ALC700; in patch_alc269()
9774 spec->gen.mixer_nid = 0; /* ALC700 does not have any loopback mixer path */ in patch_alc269()
9775 alc_update_coef_idx(codec, 0x4a, 1 << 15, 0); /* Combo jack auto trigger control */ in patch_alc269()
9776 spec->init_hook = alc294_init; in patch_alc269()
9781 if (snd_hda_codec_read(codec, 0x51, 0, AC_VERB_PARAMETERS, 0) == 0x10ec5505) { in patch_alc269()
9782 spec->has_alc5505_dsp = 1; in patch_alc269()
9783 spec->init_hook = alc5505_dsp_init; in patch_alc269()
9786 alc_pre_init(codec); in patch_alc269()
9788 snd_hda_pick_fixup(codec, alc269_fixup_models, in patch_alc269()
9794 if (codec->fixup_id == ALC282_FIXUP_ASUS_TX300 && in patch_alc269()
9795 codec->core.vendor_id == 0x10ec0294) { in patch_alc269()
9796 codec_dbg(codec, "Clear wrong fixup for ASUS ROG Strix G17\n"); in patch_alc269()
9797 codec->fixup_id = HDA_FIXUP_ID_NOT_SET; in patch_alc269()
9800 snd_hda_pick_pin_fixup(codec, alc269_pin_fixup_tbl, alc269_fixups, true); in patch_alc269()
9801 snd_hda_pick_pin_fixup(codec, alc269_fallback_pin_fixup_tbl, alc269_fixups, false); in patch_alc269()
9802 snd_hda_pick_fixup(codec, NULL, alc269_fixup_vendor_tbl, in patch_alc269()
9804 snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PRE_PROBE); in patch_alc269()
9806 alc_auto_parse_customize_define(codec); in patch_alc269()
9808 if (has_cdefine_beep(codec)) in patch_alc269()
9809 spec->gen.beep_nid = 0x01; in patch_alc269()
9812 err = alc269_parse_auto_config(codec); in patch_alc269()
9813 if (err < 0) in patch_alc269()
9816 if (!spec->gen.no_analog && spec->gen.beep_nid && spec->gen.mixer_nid) { in patch_alc269()
9817 err = set_beep_amp(spec, spec->gen.mixer_nid, 0x04, HDA_INPUT); in patch_alc269()
9818 if (err < 0) in patch_alc269()
9822 snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PROBE); in patch_alc269()
9824 return 0; in patch_alc269()
9827 alc_free(codec); in patch_alc269()
9835 static int alc861_parse_auto_config(struct hda_codec *codec) in alc861_parse_auto_config() argument
9837 static const hda_nid_t alc861_ignore[] = { 0x1d, 0 }; in alc861_parse_auto_config()
9838 static const hda_nid_t alc861_ssids[] = { 0x0e, 0x0f, 0x0b, 0 }; in alc861_parse_auto_config()
9839 return alc_parse_auto_config(codec, alc861_ignore, alc861_ssids); in alc861_parse_auto_config()
9851 /* On some laptops, VREF of pin 0x0f is abused for controlling the main amp */
9852 static void alc861_fixup_asus_amp_vref_0f(struct hda_codec *codec, in alc861_fixup_asus_amp_vref_0f() argument
9855 struct alc_spec *spec = codec->spec; in alc861_fixup_asus_amp_vref_0f()
9860 val = snd_hda_codec_get_pin_target(codec, 0x0f); in alc861_fixup_asus_amp_vref_0f()
9864 snd_hda_set_pin_ctl(codec, 0x0f, val); in alc861_fixup_asus_amp_vref_0f()
9865 spec->gen.keep_vref_in_automute = 1; in alc861_fixup_asus_amp_vref_0f()
9868 /* suppress the jack-detection */
9869 static void alc_fixup_no_jack_detect(struct hda_codec *codec, in alc_fixup_no_jack_detect() argument
9873 codec->no_jack_detect = 1; in alc_fixup_no_jack_detect()
9880 { 0x0b, 0x0221101f }, /* HP */
9881 { 0x0f, 0x90170310 }, /* speaker */
9902 /* ASUS W7J needs a magic pin setup on unused NID 0x10
9905 {0x10, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x24},
9912 SND_PCI_QUIRK(0x1043, 0x1253, "ASUS W7J", ALC660_FIXUP_ASUS_W7J),
9913 SND_PCI_QUIRK(0x1043, 0x1263, "ASUS Z35HL", ALC660_FIXUP_ASUS_W7J),
9914 SND_PCI_QUIRK(0x1043, 0x1393, "ASUS A6Rp", ALC861_FIXUP_ASUS_A6RP),
9915 SND_PCI_QUIRK_VENDOR(0x1043, "ASUS laptop", ALC861_FIXUP_AMP_VREF_0F),
9916 SND_PCI_QUIRK(0x1462, 0x7254, "HP DX2200", ALC861_FIXUP_NO_JACK_DETECT),
9917 SND_PCI_QUIRK_VENDOR(0x1584, "Haier/Uniwill", ALC861_FIXUP_AMP_VREF_0F),
9918 SND_PCI_QUIRK(0x1734, 0x10c7, "FSC Amilo Pi1505", ALC861_FIXUP_FSC_AMILO_PI1505),
9924 static int patch_alc861(struct hda_codec *codec) in patch_alc861() argument
9929 err = alc_alloc_spec(codec, 0x15); in patch_alc861()
9930 if (err < 0) in patch_alc861()
9933 spec = codec->spec; in patch_alc861()
9934 if (has_cdefine_beep(codec)) in patch_alc861()
9935 spec->gen.beep_nid = 0x23; in patch_alc861()
9938 spec->power_hook = alc_power_eapd; in patch_alc861()
9941 alc_pre_init(codec); in patch_alc861()
9943 snd_hda_pick_fixup(codec, NULL, alc861_fixup_tbl, alc861_fixups); in patch_alc861()
9944 snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PRE_PROBE); in patch_alc861()
9947 err = alc861_parse_auto_config(codec); in patch_alc861()
9948 if (err < 0) in patch_alc861()
9951 if (!spec->gen.no_analog) { in patch_alc861()
9952 err = set_beep_amp(spec, 0x23, 0, HDA_OUTPUT); in patch_alc861()
9953 if (err < 0) in patch_alc861()
9957 snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PROBE); in patch_alc861()
9959 return 0; in patch_alc861()
9962 alc_free(codec); in patch_alc861()
9967 * ALC861-VD support
9973 static int alc861vd_parse_auto_config(struct hda_codec *codec) in alc861vd_parse_auto_config() argument
9975 static const hda_nid_t alc861vd_ignore[] = { 0x1d, 0 }; in alc861vd_parse_auto_config()
9976 static const hda_nid_t alc861vd_ssids[] = { 0x15, 0x1b, 0x14, 0 }; in alc861vd_parse_auto_config()
9977 return alc_parse_auto_config(codec, alc861vd_ignore, alc861vd_ssids); in alc861vd_parse_auto_config()
9986 static void alc861vd_fixup_dallas(struct hda_codec *codec, in alc861vd_fixup_dallas() argument
9990 snd_hda_override_pin_caps(codec, 0x18, 0x00000734); in alc861vd_fixup_dallas()
9991 snd_hda_override_pin_caps(codec, 0x19, 0x0000073c); in alc861vd_fixup_dallas()
9996 static void alc660vd_fixup_asus_gpio1(struct hda_codec *codec, in alc660vd_fixup_asus_gpio1() argument
9999 struct alc_spec *spec = codec->spec; in alc660vd_fixup_asus_gpio1()
10002 spec->gpio_mask |= 0x02; in alc660vd_fixup_asus_gpio1()
10003 alc_fixup_gpio(codec, action, 0x01); in alc660vd_fixup_asus_gpio1()
10018 SND_PCI_QUIRK(0x103c, 0x30bf, "HP TX1000", ALC861VD_FIX_DALLAS),
10019 SND_PCI_QUIRK(0x1043, 0x1339, "ASUS A7-K", ALC660VD_FIX_ASUS_GPIO1),
10020 SND_PCI_QUIRK(0x1179, 0xff31, "Toshiba L30-149", ALC861VD_FIX_DALLAS),
10026 static int patch_alc861vd(struct hda_codec *codec) in patch_alc861vd() argument
10031 err = alc_alloc_spec(codec, 0x0b); in patch_alc861vd()
10032 if (err < 0) in patch_alc861vd()
10035 spec = codec->spec; in patch_alc861vd()
10036 if (has_cdefine_beep(codec)) in patch_alc861vd()
10037 spec->gen.beep_nid = 0x23; in patch_alc861vd()
10039 spec->shutup = alc_eapd_shutup; in patch_alc861vd()
10041 alc_pre_init(codec); in patch_alc861vd()
10043 snd_hda_pick_fixup(codec, NULL, alc861vd_fixup_tbl, alc861vd_fixups); in patch_alc861vd()
10044 snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PRE_PROBE); in patch_alc861vd()
10047 err = alc861vd_parse_auto_config(codec); in patch_alc861vd()
10048 if (err < 0) in patch_alc861vd()
10051 if (!spec->gen.no_analog) { in patch_alc861vd()
10052 err = set_beep_amp(spec, 0x0b, 0x05, HDA_INPUT); in patch_alc861vd()
10053 if (err < 0) in patch_alc861vd()
10057 snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PROBE); in patch_alc861vd()
10059 return 0; in patch_alc861vd()
10062 alc_free(codec); in patch_alc861vd()
10072 * 6-channel independent captures.
10074 * In addition, an independent DAC for the multi-playback (not used in this
10082 static int alc662_parse_auto_config(struct hda_codec *codec) in alc662_parse_auto_config() argument
10084 static const hda_nid_t alc662_ignore[] = { 0x1d, 0 }; in alc662_parse_auto_config()
10085 static const hda_nid_t alc663_ssids[] = { 0x15, 0x1b, 0x14, 0x21 }; in alc662_parse_auto_config()
10086 static const hda_nid_t alc662_ssids[] = { 0x15, 0x1b, 0x14, 0 }; in alc662_parse_auto_config()
10089 if (codec->core.vendor_id == 0x10ec0272 || codec->core.vendor_id == 0x10ec0663 || in alc662_parse_auto_config()
10090 codec->core.vendor_id == 0x10ec0665 || codec->core.vendor_id == 0x10ec0670 || in alc662_parse_auto_config()
10091 codec->core.vendor_id == 0x10ec0671) in alc662_parse_auto_config()
10095 return alc_parse_auto_config(codec, alc662_ignore, ssids); in alc662_parse_auto_config()
10098 static void alc272_fixup_mario(struct hda_codec *codec, in alc272_fixup_mario() argument
10103 if (snd_hda_override_amp_caps(codec, 0x2, HDA_OUTPUT, in alc272_fixup_mario()
10104 (0x3b << AC_AMPCAP_OFFSET_SHIFT) | in alc272_fixup_mario()
10105 (0x3b << AC_AMPCAP_NUM_STEPS_SHIFT) | in alc272_fixup_mario()
10106 (0x03 << AC_AMPCAP_STEP_SIZE_SHIFT) | in alc272_fixup_mario()
10107 (0 << AC_AMPCAP_MUTE_SHIFT))) in alc272_fixup_mario()
10108 codec_warn(codec, "failed to override amp caps for NID 0x2\n"); in alc272_fixup_mario()
10121 static void alc_fixup_bass_chmap(struct hda_codec *codec, in alc_fixup_bass_chmap() argument
10125 struct alc_spec *spec = codec->spec; in alc_fixup_bass_chmap()
10126 spec->gen.pcm_rec[0]->stream[0].chmap = asus_pcm_2_1_chmaps; in alc_fixup_bass_chmap()
10131 static unsigned int gpio_led_power_filter(struct hda_codec *codec, in gpio_led_power_filter() argument
10135 struct alc_spec *spec = codec->spec; in gpio_led_power_filter()
10136 if (nid == codec->core.afg && power_state == AC_PWRST_D3 && spec->gpio_data) in gpio_led_power_filter()
10141 static void alc662_fixup_led_gpio1(struct hda_codec *codec, in alc662_fixup_led_gpio1() argument
10144 struct alc_spec *spec = codec->spec; in alc662_fixup_led_gpio1()
10146 alc_fixup_hp_gpio_led(codec, action, 0x01, 0); in alc662_fixup_led_gpio1()
10148 spec->mute_led_polarity = 1; in alc662_fixup_led_gpio1()
10149 codec->power_filter = gpio_led_power_filter; in alc662_fixup_led_gpio1()
10153 static void alc662_usi_automute_hook(struct hda_codec *codec, in alc662_usi_automute_hook() argument
10156 struct alc_spec *spec = codec->spec; in alc662_usi_automute_hook()
10159 snd_hda_gen_hp_automute(codec, jack); in alc662_usi_automute_hook()
10161 vref = spec->gen.hp_jack_present ? PIN_VREF80 : 0; in alc662_usi_automute_hook()
10163 snd_hda_codec_write(codec, 0x19, 0, AC_VERB_SET_PIN_WIDGET_CONTROL, in alc662_usi_automute_hook()
10167 static void alc662_fixup_usi_headset_mic(struct hda_codec *codec, in alc662_fixup_usi_headset_mic() argument
10170 struct alc_spec *spec = codec->spec; in alc662_fixup_usi_headset_mic()
10172 spec->parse_flags |= HDA_PINCFG_HEADSET_MIC; in alc662_fixup_usi_headset_mic()
10173 spec->gen.hp_automute_hook = alc662_usi_automute_hook; in alc662_fixup_usi_headset_mic()
10177 static void alc662_aspire_ethos_mute_speakers(struct hda_codec *codec, in alc662_aspire_ethos_mute_speakers() argument
10180 /* surround speakers at 0x1b already get muted automatically when in alc662_aspire_ethos_mute_speakers()
10183 * 0x15 - front left/front right in alc662_aspire_ethos_mute_speakers()
10184 * 0x18 - front center/ LFE in alc662_aspire_ethos_mute_speakers()
10186 if (snd_hda_jack_detect_state(codec, 0x1b) == HDA_JACK_PRESENT) { in alc662_aspire_ethos_mute_speakers()
10187 snd_hda_set_pin_ctl_cache(codec, 0x15, 0); in alc662_aspire_ethos_mute_speakers()
10188 snd_hda_set_pin_ctl_cache(codec, 0x18, 0); in alc662_aspire_ethos_mute_speakers()
10190 snd_hda_set_pin_ctl_cache(codec, 0x15, PIN_OUT); in alc662_aspire_ethos_mute_speakers()
10191 snd_hda_set_pin_ctl_cache(codec, 0x18, PIN_OUT); in alc662_aspire_ethos_mute_speakers()
10195 static void alc662_fixup_aspire_ethos_hp(struct hda_codec *codec, in alc662_fixup_aspire_ethos_hp() argument
10198 /* Pin 0x1b: shared headphones jack and surround speakers */ in alc662_fixup_aspire_ethos_hp()
10199 if (!is_jack_detectable(codec, 0x1b)) in alc662_fixup_aspire_ethos_hp()
10204 snd_hda_jack_detect_enable_callback(codec, 0x1b, in alc662_fixup_aspire_ethos_hp()
10207 alc_setup_gpio(codec, 0x02); in alc662_fixup_aspire_ethos_hp()
10213 alc662_aspire_ethos_mute_speakers(codec, NULL); in alc662_fixup_aspire_ethos_hp()
10218 static void alc671_fixup_hp_headset_mic2(struct hda_codec *codec, in alc671_fixup_hp_headset_mic2() argument
10221 struct alc_spec *spec = codec->spec; in alc671_fixup_hp_headset_mic2()
10224 { 0x19, 0x02a11040 }, /* use as headset mic, with its own jack detect */ in alc671_fixup_hp_headset_mic2()
10225 { 0x1b, 0x0181304f }, in alc671_fixup_hp_headset_mic2()
10231 spec->gen.mixer_nid = 0; in alc671_fixup_hp_headset_mic2()
10232 spec->parse_flags |= HDA_PINCFG_HEADSET_MIC; in alc671_fixup_hp_headset_mic2()
10233 snd_hda_apply_pincfgs(codec, pincfgs); in alc671_fixup_hp_headset_mic2()
10236 alc_write_coef_idx(codec, 0x19, 0xa054); in alc671_fixup_hp_headset_mic2()
10241 static void alc897_hp_automute_hook(struct hda_codec *codec, in alc897_hp_automute_hook() argument
10244 struct alc_spec *spec = codec->spec; in alc897_hp_automute_hook()
10247 snd_hda_gen_hp_automute(codec, jack); in alc897_hp_automute_hook()
10248 vref = spec->gen.hp_jack_present ? (PIN_HP | AC_PINCTL_VREF_100) : PIN_HP; in alc897_hp_automute_hook()
10249 snd_hda_codec_write(codec, 0x1b, 0, AC_VERB_SET_PIN_WIDGET_CONTROL, in alc897_hp_automute_hook()
10253 static void alc897_fixup_lenovo_headset_mic(struct hda_codec *codec, in alc897_fixup_lenovo_headset_mic() argument
10256 struct alc_spec *spec = codec->spec; in alc897_fixup_lenovo_headset_mic()
10258 spec->gen.hp_automute_hook = alc897_hp_automute_hook; in alc897_fixup_lenovo_headset_mic()
10263 WRITE_COEF(0x01, 0xbebe), WRITE_COEF(0x02, 0xaaaa), WRITE_COEF(0x03, 0x0),
10264 WRITE_COEF(0x04, 0x0180), WRITE_COEF(0x06, 0x0), WRITE_COEF(0x07, 0x0f80),
10265 WRITE_COEF(0x08, 0x0031), WRITE_COEF(0x0a, 0x0060), WRITE_COEF(0x0b, 0x0),
10266 WRITE_COEF(0x0c, 0x7cf7), WRITE_COEF(0x0d, 0x1080), WRITE_COEF(0x0e, 0x7f7f),
10267 WRITE_COEF(0x0f, 0xcccc), WRITE_COEF(0x10, 0xddcc), WRITE_COEF(0x11, 0x0001),
10268 WRITE_COEF(0x13, 0x0), WRITE_COEF(0x14, 0x2aa0), WRITE_COEF(0x17, 0xa940),
10269 WRITE_COEF(0x19, 0x0), WRITE_COEF(0x1a, 0x0), WRITE_COEF(0x1b, 0x0),
10270 WRITE_COEF(0x1c, 0x0), WRITE_COEF(0x1d, 0x0), WRITE_COEF(0x1e, 0x7418),
10271 WRITE_COEF(0x1f, 0x0804), WRITE_COEF(0x20, 0x4200), WRITE_COEF(0x21, 0x0468),
10272 WRITE_COEF(0x22, 0x8ccc), WRITE_COEF(0x23, 0x0250), WRITE_COEF(0x24, 0x7418),
10273 WRITE_COEF(0x27, 0x0), WRITE_COEF(0x28, 0x8ccc), WRITE_COEF(0x2a, 0xff00),
10274 WRITE_COEF(0x2b, 0x8000), WRITE_COEF(0xa7, 0xff00), WRITE_COEF(0xa8, 0x8000),
10275 WRITE_COEF(0xaa, 0x2e17), WRITE_COEF(0xab, 0xa0c0), WRITE_COEF(0xac, 0x0),
10276 WRITE_COEF(0xad, 0x0), WRITE_COEF(0xae, 0x2ac6), WRITE_COEF(0xaf, 0xa480),
10277 WRITE_COEF(0xb0, 0x0), WRITE_COEF(0xb1, 0x0), WRITE_COEF(0xb2, 0x0),
10278 WRITE_COEF(0xb3, 0x0), WRITE_COEF(0xb4, 0x0), WRITE_COEF(0xb5, 0x1040),
10279 WRITE_COEF(0xb6, 0xd697), WRITE_COEF(0xb7, 0x902b), WRITE_COEF(0xb8, 0xd697),
10280 WRITE_COEF(0xb9, 0x902b), WRITE_COEF(0xba, 0xb8ba), WRITE_COEF(0xbb, 0xaaab),
10281 WRITE_COEF(0xbc, 0xaaaf), WRITE_COEF(0xbd, 0x6aaa), WRITE_COEF(0xbe, 0x1c02),
10282 WRITE_COEF(0xc0, 0x00ff), WRITE_COEF(0xc1, 0x0fa6),
10286 static void alc668_restore_default_value(struct hda_codec *codec) in alc668_restore_default_value() argument
10288 alc_process_coef_fw(codec, alc668_coefs); in alc668_restore_default_value()
10350 { 0x15, 0x99130112 }, /* subwoofer */
10361 { 0x17, 0x99130112 }, /* subwoofer */
10374 {0x12, 0x403cc000},
10375 {0x14, 0x90170110}, /* speaker */
10376 {0x15, 0x411111f0},
10377 {0x16, 0x411111f0},
10378 {0x18, 0x01a19030}, /* mic */
10379 {0x19, 0x90a7013f}, /* int-mic */
10380 {0x1a, 0x01014020},
10381 {0x1b, 0x0121401f},
10382 {0x1c, 0x411111f0},
10383 {0x1d, 0x411111f0},
10384 {0x1e, 0x40478e35},
10393 {0x14, AC_VERB_SET_EAPD_BTLENABLE, 0},
10404 { 0x14, 0x0221201f }, /* HP out */
10413 { 0x14, 0x99130110 }, /* speaker */
10414 { 0x18, 0x01a19c20 }, /* mic */
10415 { 0x19, 0x99a3092f }, /* int-mic */
10416 { 0x21, 0x0121401f }, /* HP out */
10425 { 0x14, 0x99130110 }, /* speaker */
10426 { 0x18, 0x01a19820 }, /* mic */
10427 { 0x19, 0x99a3092f }, /* int-mic */
10428 { 0x1b, 0x0121401f }, /* HP out */
10437 { 0x14, 0x99130110 }, /* speaker */
10438 { 0x15, 0x0121441f }, /* HP */
10439 { 0x18, 0x01a19840 }, /* mic */
10440 { 0x19, 0x99a3094f }, /* int-mic */
10441 { 0x21, 0x01211420 }, /* HP2 */
10450 { 0x14, 0x99130110 }, /* speaker */
10451 { 0x16, 0x99130111 }, /* speaker */
10452 { 0x18, 0x01a19840 }, /* mic */
10453 { 0x19, 0x99a3094f }, /* int-mic */
10454 { 0x21, 0x0121441f }, /* HP */
10463 { 0x14, 0x99130110 }, /* speaker */
10464 { 0x15, 0x0121441f }, /* HP */
10465 { 0x16, 0x99130111 }, /* speaker */
10466 { 0x18, 0x01a19840 }, /* mic */
10467 { 0x19, 0x99a3094f }, /* int-mic */
10476 { 0x14, 0x99130110 }, /* speaker */
10477 { 0x15, 0x01211420 }, /* HP2 */
10478 { 0x18, 0x01a19840 }, /* mic */
10479 { 0x19, 0x99a3094f }, /* int-mic */
10480 { 0x1b, 0x0121441f }, /* HP */
10489 { 0x14, 0x99130110 }, /* speaker */
10490 { 0x17, 0x99130111 }, /* speaker */
10491 { 0x18, 0x01a19840 }, /* mic */
10492 { 0x19, 0x99a3094f }, /* int-mic */
10493 { 0x1b, 0x01214020 }, /* HP */
10494 { 0x21, 0x0121401f }, /* HP */
10503 { 0x14, 0x99130110 }, /* speaker */
10504 { 0x12, 0x99a30970 }, /* int-mic */
10505 { 0x15, 0x01214020 }, /* HP */
10506 { 0x17, 0x99130111 }, /* speaker */
10507 { 0x18, 0x01a19840 }, /* mic */
10508 { 0x21, 0x0121401f }, /* HP */
10521 { 0x1b, 0x02214020 }, /* Front HP */
10550 { 0x19, 0x03a1113c }, /* use as headset mic, without its own jack detect */
10551 /* headphone mic by setting pin control of 0x1b (headphone out) to in + vref_50 */
10564 { 0x19, 0x03a1913d }, /* use as headphone mic, without its own jack detect */
10565 { 0x1b, 0x03a1113c }, /* use as headset mic, without its own jack detect */
10584 {0x16, 0x80106111}, /* bass speaker */
10593 {0x1a, 0x80106111}, /* bass speaker */
10617 { 0x19, 0x03a1913d }, /* use as headphone mic, without its own jack detect */
10618 { 0x1a, 0x90170151 }, /* bass speaker */
10619 { 0x1b, 0x03a1113c }, /* use as headset mic, without its own jack detect */
10628 { 0x20, AC_VERB_SET_COEF_INDEX, 0xc3 },
10629 { 0x20, AC_VERB_SET_PROC_COEF, 0x4000 },
10636 { 0x16, 0x0421101f }, /* HP */
10649 { 0x19, 0x03a1913d }, /* use as headphone mic, without its own jack detect */
10650 { 0x1b, 0x03a1113c }, /* use as headset mic, without its own jack detect */
10659 { 0x15, 0x50170120 }, /* no internal speaker */
10666 { 0x15, 0x40f000f0 }, /* disabled */
10667 { 0x16, 0x40f000f0 }, /* disabled */
10678 { 0x19, 0x02a1913c }, /* use as headset mic, without its own jack detect */
10679 { 0x18, 0x01a1903d },
10696 { 0x15, 0x92130110 }, /* front speakers */
10697 { 0x18, 0x99130111 }, /* center/subwoofer */
10698 { 0x1b, 0x11130012 }, /* surround plus jack for HP */
10711 { 0x1a, 0x02a1113c }, /* use as headset mic, without its own jack detect */
10720 { 0x1a, 0x01a11140 }, /* use as headset mic, without its own jack detect */
10721 { 0x1b, 0x0221144f },
10730 { 0x1b, 0x04a1112c },
10745 { 0x20, AC_VERB_SET_COEF_INDEX, 0x15 },
10746 { 0x20, AC_VERB_SET_PROC_COEF, 0x0d60 },
10757 { 0x1a, 0x03a11050 },
10766 SND_PCI_QUIRK(0x1019, 0x9087, "ECS", ALC662_FIXUP_ASUS_MODE2),
10767 SND_PCI_QUIRK(0x1025, 0x022f, "Acer Aspire One", ALC662_FIXUP_INV_DMIC),
10768 SND_PCI_QUIRK(0x1025, 0x0241, "Packard Bell DOTS", ALC662_FIXUP_INV_DMIC),
10769 SND_PCI_QUIRK(0x1025, 0x0308, "Acer Aspire 8942G", ALC662_FIXUP_ASPIRE),
10770 SND_PCI_QUIRK(0x1025, 0x031c, "Gateway NV79", ALC662_FIXUP_SKU_IGNORE),
10771 SND_PCI_QUIRK(0x1025, 0x0349, "eMachines eM250", ALC662_FIXUP_INV_DMIC),
10772 SND_PCI_QUIRK(0x1025, 0x034a, "Gateway LT27", ALC662_FIXUP_INV_DMIC),
10773 SND_PCI_QUIRK(0x1025, 0x038b, "Acer Aspire 8943G", ALC662_FIXUP_ASPIRE),
10774 SND_PCI_QUIRK(0x1025, 0x0566, "Acer Aspire Ethos 8951G", ALC669_FIXUP_ACER_ASPIRE_ETHOS),
10775 SND_PCI_QUIRK(0x1025, 0x123c, "Acer Nitro N50-600", ALC662_FIXUP_ACER_NITRO_HEADSET_MODE),
10776 SND_PCI_QUIRK(0x1025, 0x124e, "Acer 2660G", ALC662_FIXUP_ACER_X2660G_HEADSET_MODE),
10777 SND_PCI_QUIRK(0x1028, 0x05d8, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE),
10778 SND_PCI_QUIRK(0x1028, 0x05db, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE),
10779 SND_PCI_QUIRK(0x1028, 0x05fe, "Dell XPS 15", ALC668_FIXUP_DELL_XPS13),
10780 SND_PCI_QUIRK(0x1028, 0x060a, "Dell XPS 13", ALC668_FIXUP_DELL_XPS13),
10781 SND_PCI_QUIRK(0x1028, 0x060d, "Dell M3800", ALC668_FIXUP_DELL_XPS13),
10782 SND_PCI_QUIRK(0x1028, 0x0625, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE),
10783 SND_PCI_QUIRK(0x1028, 0x0626, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE),
10784 SND_PCI_QUIRK(0x1028, 0x0696, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE),
10785 SND_PCI_QUIRK(0x1028, 0x0698, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE),
10786 SND_PCI_QUIRK(0x1028, 0x069f, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE),
10787 SND_PCI_QUIRK(0x103c, 0x1632, "HP RP5800", ALC662_FIXUP_HP_RP5800),
10788 SND_PCI_QUIRK(0x103c, 0x873e, "HP", ALC671_FIXUP_HP_HEADSET_MIC2),
10789 SND_PCI_QUIRK(0x1043, 0x1080, "Asus UX501VW", ALC668_FIXUP_HEADSET_MODE),
10790 SND_PCI_QUIRK(0x1043, 0x11cd, "Asus N550", ALC662_FIXUP_ASUS_Nx50),
10791 SND_PCI_QUIRK(0x1043, 0x129d, "Asus N750", ALC662_FIXUP_ASUS_Nx50),
10792 SND_PCI_QUIRK(0x1043, 0x12ff, "ASUS G751", ALC668_FIXUP_ASUS_G751),
10793 SND_PCI_QUIRK(0x1043, 0x13df, "Asus N550JX", ALC662_FIXUP_BASS_1A),
10794 SND_PCI_QUIRK(0x1043, 0x1477, "ASUS N56VZ", ALC662_FIXUP_BASS_MODE4_CHMAP),
10795 SND_PCI_QUIRK(0x1043, 0x15a7, "ASUS UX51VZH", ALC662_FIXUP_BASS_16),
10796 SND_PCI_QUIRK(0x1043, 0x177d, "ASUS N551", ALC668_FIXUP_ASUS_Nx51),
10797 SND_PCI_QUIRK(0x1043, 0x17bd, "ASUS N751", ALC668_FIXUP_ASUS_Nx51),
10798 SND_PCI_QUIRK(0x1043, 0x185d, "ASUS G551JW", ALC668_FIXUP_ASUS_NO_HEADSET_MIC),
10799 SND_PCI_QUIRK(0x1043, 0x1963, "ASUS X71SL", ALC662_FIXUP_ASUS_MODE8),
10800 SND_PCI_QUIRK(0x1043, 0x1b73, "ASUS N55SF", ALC662_FIXUP_BASS_16),
10801 SND_PCI_QUIRK(0x1043, 0x1bf3, "ASUS N76VZ", ALC662_FIXUP_BASS_MODE4_CHMAP),
10802 SND_PCI_QUIRK(0x1043, 0x8469, "ASUS mobo", ALC662_FIXUP_NO_JACK_DETECT),
10803 SND_PCI_QUIRK(0x105b, 0x0cd6, "Foxconn", ALC662_FIXUP_ASUS_MODE2),
10804 SND_PCI_QUIRK(0x144d, 0xc051, "Samsung R720", ALC662_FIXUP_IDEAPAD),
10805 SND_PCI_QUIRK(0x14cd, 0x5003, "USI", ALC662_FIXUP_USI_HEADSET_MODE),
10806 SND_PCI_QUIRK(0x17aa, 0x1036, "Lenovo P520", ALC662_FIXUP_LENOVO_MULTI_CODECS),
10807 SND_PCI_QUIRK(0x17aa, 0x32ca, "Lenovo ThinkCentre M80", ALC897_FIXUP_HEADSET_MIC_PIN),
10808 SND_PCI_QUIRK(0x17aa, 0x32cb, "Lenovo ThinkCentre M70", ALC897_FIXUP_HEADSET_MIC_PIN),
10809 SND_PCI_QUIRK(0x17aa, 0x32cf, "Lenovo ThinkCentre M950", ALC897_FIXUP_HEADSET_MIC_PIN),
10810 SND_PCI_QUIRK(0x17aa, 0x32f7, "Lenovo ThinkCentre M90", ALC897_FIXUP_HEADSET_MIC_PIN),
10811 SND_PCI_QUIRK(0x17aa, 0x38af, "Lenovo Ideapad Y550P", ALC662_FIXUP_IDEAPAD),
10812 SND_PCI_QUIRK(0x17aa, 0x3a0d, "Lenovo Ideapad Y550", ALC662_FIXUP_IDEAPAD),
10813 SND_PCI_QUIRK(0x1849, 0x5892, "ASRock B150M", ALC892_FIXUP_ASROCK_MOBO),
10814 SND_PCI_QUIRK(0x19da, 0xa130, "Zotac Z68", ALC662_FIXUP_ZOTAC_Z68),
10815 SND_PCI_QUIRK(0x1b0a, 0x01b8, "ACER Veriton", ALC662_FIXUP_ACER_VERITON),
10816 SND_PCI_QUIRK(0x1b35, 0x1234, "CZC ET26", ALC662_FIXUP_CZC_ET26),
10817 SND_PCI_QUIRK(0x1b35, 0x2206, "CZC P10T", ALC662_FIXUP_CZC_P10T),
10819 #if 0
10825 SND_PCI_QUIRK(0x1043, 0x1000, "ASUS N50Vm", ALC662_FIXUP_ASUS_MODE1),
10826 SND_PCI_QUIRK(0x1043, 0x1092, "ASUS NB", ALC662_FIXUP_ASUS_MODE3),
10827 SND_PCI_QUIRK(0x1043, 0x1173, "ASUS K73Jn", ALC662_FIXUP_ASUS_MODE1),
10828 SND_PCI_QUIRK(0x1043, 0x11c3, "ASUS M70V", ALC662_FIXUP_ASUS_MODE3),
10829 SND_PCI_QUIRK(0x1043, 0x11d3, "ASUS NB", ALC662_FIXUP_ASUS_MODE1),
10830 SND_PCI_QUIRK(0x1043, 0x11f3, "ASUS NB", ALC662_FIXUP_ASUS_MODE2),
10831 SND_PCI_QUIRK(0x1043, 0x1203, "ASUS NB", ALC662_FIXUP_ASUS_MODE1),
10832 SND_PCI_QUIRK(0x1043, 0x1303, "ASUS G60J", ALC662_FIXUP_ASUS_MODE1),
10833 SND_PCI_QUIRK(0x1043, 0x1333, "ASUS G60Jx", ALC662_FIXUP_ASUS_MODE1),
10834 SND_PCI_QUIRK(0x1043, 0x1339, "ASUS NB", ALC662_FIXUP_ASUS_MODE2),
10835 SND_PCI_QUIRK(0x1043, 0x13e3, "ASUS N71JA", ALC662_FIXUP_ASUS_MODE7),
10836 SND_PCI_QUIRK(0x1043, 0x1463, "ASUS N71", ALC662_FIXUP_ASUS_MODE7),
10837 SND_PCI_QUIRK(0x1043, 0x14d3, "ASUS G72", ALC662_FIXUP_ASUS_MODE8),
10838 SND_PCI_QUIRK(0x1043, 0x1563, "ASUS N90", ALC662_FIXUP_ASUS_MODE3),
10839 SND_PCI_QUIRK(0x1043, 0x15d3, "ASUS N50SF F50SF", ALC662_FIXUP_ASUS_MODE1),
10840 SND_PCI_QUIRK(0x1043, 0x16c3, "ASUS NB", ALC662_FIXUP_ASUS_MODE2),
10841 SND_PCI_QUIRK(0x1043, 0x16f3, "ASUS K40C K50C", ALC662_FIXUP_ASUS_MODE2),
10842 SND_PCI_QUIRK(0x1043, 0x1733, "ASUS N81De", ALC662_FIXUP_ASUS_MODE1),
10843 SND_PCI_QUIRK(0x1043, 0x1753, "ASUS NB", ALC662_FIXUP_ASUS_MODE2),
10844 SND_PCI_QUIRK(0x1043, 0x1763, "ASUS NB", ALC662_FIXUP_ASUS_MODE6),
10845 SND_PCI_QUIRK(0x1043, 0x1765, "ASUS NB", ALC662_FIXUP_ASUS_MODE6),
10846 SND_PCI_QUIRK(0x1043, 0x1783, "ASUS NB", ALC662_FIXUP_ASUS_MODE2),
10847 SND_PCI_QUIRK(0x1043, 0x1793, "ASUS F50GX", ALC662_FIXUP_ASUS_MODE1),
10848 SND_PCI_QUIRK(0x1043, 0x17b3, "ASUS F70SL", ALC662_FIXUP_ASUS_MODE3),
10849 SND_PCI_QUIRK(0x1043, 0x17f3, "ASUS X58LE", ALC662_FIXUP_ASUS_MODE2),
10850 SND_PCI_QUIRK(0x1043, 0x1813, "ASUS NB", ALC662_FIXUP_ASUS_MODE2),
10851 SND_PCI_QUIRK(0x1043, 0x1823, "ASUS NB", ALC662_FIXUP_ASUS_MODE5),
10852 SND_PCI_QUIRK(0x1043, 0x1833, "ASUS NB", ALC662_FIXUP_ASUS_MODE6),
10853 SND_PCI_QUIRK(0x1043, 0x1843, "ASUS NB", ALC662_FIXUP_ASUS_MODE2),
10854 SND_PCI_QUIRK(0x1043, 0x1853, "ASUS F50Z", ALC662_FIXUP_ASUS_MODE1),
10855 SND_PCI_QUIRK(0x1043, 0x1864, "ASUS NB", ALC662_FIXUP_ASUS_MODE2),
10856 SND_PCI_QUIRK(0x1043, 0x1876, "ASUS NB", ALC662_FIXUP_ASUS_MODE2),
10857 SND_PCI_QUIRK(0x1043, 0x1893, "ASUS M50Vm", ALC662_FIXUP_ASUS_MODE3),
10858 SND_PCI_QUIRK(0x1043, 0x1894, "ASUS X55", ALC662_FIXUP_ASUS_MODE3),
10859 SND_PCI_QUIRK(0x1043, 0x18b3, "ASUS N80Vc", ALC662_FIXUP_ASUS_MODE1),
10860 SND_PCI_QUIRK(0x1043, 0x18c3, "ASUS VX5", ALC662_FIXUP_ASUS_MODE1),
10861 SND_PCI_QUIRK(0x1043, 0x18d3, "ASUS N81Te", ALC662_FIXUP_ASUS_MODE1),
10862 SND_PCI_QUIRK(0x1043, 0x18f3, "ASUS N505Tp", ALC662_FIXUP_ASUS_MODE1),
10863 SND_PCI_QUIRK(0x1043, 0x1903, "ASUS F5GL", ALC662_FIXUP_ASUS_MODE1),
10864 SND_PCI_QUIRK(0x1043, 0x1913, "ASUS NB", ALC662_FIXUP_ASUS_MODE2),
10865 SND_PCI_QUIRK(0x1043, 0x1933, "ASUS F80Q", ALC662_FIXUP_ASUS_MODE2),
10866 SND_PCI_QUIRK(0x1043, 0x1943, "ASUS Vx3V", ALC662_FIXUP_ASUS_MODE1),
10867 SND_PCI_QUIRK(0x1043, 0x1953, "ASUS NB", ALC662_FIXUP_ASUS_MODE1),
10868 SND_PCI_QUIRK(0x1043, 0x1963, "ASUS X71C", ALC662_FIXUP_ASUS_MODE3),
10869 SND_PCI_QUIRK(0x1043, 0x1983, "ASUS N5051A", ALC662_FIXUP_ASUS_MODE1),
10870 SND_PCI_QUIRK(0x1043, 0x1993, "ASUS N20", ALC662_FIXUP_ASUS_MODE1),
10871 SND_PCI_QUIRK(0x1043, 0x19b3, "ASUS F7Z", ALC662_FIXUP_ASUS_MODE1),
10872 SND_PCI_QUIRK(0x1043, 0x19c3, "ASUS F5Z/F6x", ALC662_FIXUP_ASUS_MODE2),
10873 SND_PCI_QUIRK(0x1043, 0x19e3, "ASUS NB", ALC662_FIXUP_ASUS_MODE1),
10874 SND_PCI_QUIRK(0x1043, 0x19f3, "ASUS NB", ALC662_FIXUP_ASUS_MODE4),
10883 {.id = ALC662_FIXUP_HP_RP5800, .name = "hp-rp5800"},
10884 {.id = ALC662_FIXUP_ASUS_MODE1, .name = "asus-mode1"},
10885 {.id = ALC662_FIXUP_ASUS_MODE2, .name = "asus-mode2"},
10886 {.id = ALC662_FIXUP_ASUS_MODE3, .name = "asus-mode3"},
10887 {.id = ALC662_FIXUP_ASUS_MODE4, .name = "asus-mode4"},
10888 {.id = ALC662_FIXUP_ASUS_MODE5, .name = "asus-mode5"},
10889 {.id = ALC662_FIXUP_ASUS_MODE6, .name = "asus-mode6"},
10890 {.id = ALC662_FIXUP_ASUS_MODE7, .name = "asus-mode7"},
10891 {.id = ALC662_FIXUP_ASUS_MODE8, .name = "asus-mode8"},
10892 {.id = ALC662_FIXUP_ZOTAC_Z68, .name = "zotac-z68"},
10893 {.id = ALC662_FIXUP_INV_DMIC, .name = "inv-dmic"},
10894 {.id = ALC662_FIXUP_DELL_MIC_NO_PRESENCE, .name = "alc662-headset-multi"},
10895 {.id = ALC668_FIXUP_DELL_MIC_NO_PRESENCE, .name = "dell-headset-multi"},
10896 {.id = ALC662_FIXUP_HEADSET_MODE, .name = "alc662-headset"},
10897 {.id = ALC668_FIXUP_HEADSET_MODE, .name = "alc668-headset"},
10901 {.id = ALC668_FIXUP_DELL_XPS13, .name = "dell-xps13"},
10902 {.id = ALC662_FIXUP_ASUS_Nx50, .name = "asus-nx50"},
10903 {.id = ALC668_FIXUP_ASUS_Nx51, .name = "asus-nx51"},
10904 {.id = ALC668_FIXUP_ASUS_G751, .name = "asus-g751"},
10905 {.id = ALC891_FIXUP_HEADSET_MODE, .name = "alc891-headset"},
10906 {.id = ALC891_FIXUP_DELL_MIC_NO_PRESENCE, .name = "alc891-headset-multi"},
10907 {.id = ALC662_FIXUP_ACER_VERITON, .name = "acer-veriton"},
10908 {.id = ALC892_FIXUP_ASROCK_MOBO, .name = "asrock-mobo"},
10909 {.id = ALC662_FIXUP_USI_HEADSET_MODE, .name = "usi-headset"},
10910 {.id = ALC662_FIXUP_LENOVO_MULTI_CODECS, .name = "dual-codecs"},
10911 {.id = ALC669_FIXUP_ACER_ASPIRE_ETHOS, .name = "aspire-ethos"},
10916 SND_HDA_PIN_QUIRK(0x10ec0867, 0x1028, "Dell", ALC891_FIXUP_DELL_MIC_NO_PRESENCE,
10917 {0x17, 0x02211010},
10918 {0x18, 0x01a19030},
10919 {0x1a, 0x01813040},
10920 {0x21, 0x01014020}),
10921 SND_HDA_PIN_QUIRK(0x10ec0867, 0x1028, "Dell", ALC891_FIXUP_DELL_MIC_NO_PRESENCE,
10922 {0x16, 0x01813030},
10923 {0x17, 0x02211010},
10924 {0x18, 0x01a19040},
10925 {0x21, 0x01014020}),
10926 SND_HDA_PIN_QUIRK(0x10ec0662, 0x1028, "Dell", ALC662_FIXUP_DELL_MIC_NO_PRESENCE,
10927 {0x14, 0x01014010},
10928 {0x18, 0x01a19020},
10929 {0x1a, 0x0181302f},
10930 {0x1b, 0x0221401f}),
10931 SND_HDA_PIN_QUIRK(0x10ec0668, 0x1028, "Dell", ALC668_FIXUP_AUTO_MUTE,
10932 {0x12, 0x99a30130},
10933 {0x14, 0x90170110},
10934 {0x15, 0x0321101f},
10935 {0x16, 0x03011020}),
10936 SND_HDA_PIN_QUIRK(0x10ec0668, 0x1028, "Dell", ALC668_FIXUP_AUTO_MUTE,
10937 {0x12, 0x99a30140},
10938 {0x14, 0x90170110},
10939 {0x15, 0x0321101f},
10940 {0x16, 0x03011020}),
10941 SND_HDA_PIN_QUIRK(0x10ec0668, 0x1028, "Dell", ALC668_FIXUP_AUTO_MUTE,
10942 {0x12, 0x99a30150},
10943 {0x14, 0x90170110},
10944 {0x15, 0x0321101f},
10945 {0x16, 0x03011020}),
10946 SND_HDA_PIN_QUIRK(0x10ec0668, 0x1028, "Dell", ALC668_FIXUP_AUTO_MUTE,
10947 {0x14, 0x90170110},
10948 {0x15, 0x0321101f},
10949 {0x16, 0x03011020}),
10950 SND_HDA_PIN_QUIRK(0x10ec0668, 0x1028, "Dell XPS 15", ALC668_FIXUP_AUTO_MUTE,
10951 {0x12, 0x90a60130},
10952 {0x14, 0x90170110},
10953 {0x15, 0x0321101f}),
10954 SND_HDA_PIN_QUIRK(0x10ec0671, 0x103c, "HP cPC", ALC671_FIXUP_HP_HEADSET_MIC2,
10955 {0x14, 0x01014010},
10956 {0x17, 0x90170150},
10957 {0x19, 0x02a11060},
10958 {0x1b, 0x01813030},
10959 {0x21, 0x02211020}),
10960 SND_HDA_PIN_QUIRK(0x10ec0671, 0x103c, "HP cPC", ALC671_FIXUP_HP_HEADSET_MIC2,
10961 {0x14, 0x01014010},
10962 {0x18, 0x01a19040},
10963 {0x1b, 0x01813030},
10964 {0x21, 0x02211020}),
10965 SND_HDA_PIN_QUIRK(0x10ec0671, 0x103c, "HP cPC", ALC671_FIXUP_HP_HEADSET_MIC2,
10966 {0x14, 0x01014020},
10967 {0x17, 0x90170110},
10968 {0x18, 0x01a19050},
10969 {0x1b, 0x01813040},
10970 {0x21, 0x02211030}),
10976 static int patch_alc662(struct hda_codec *codec) in patch_alc662() argument
10981 err = alc_alloc_spec(codec, 0x0b); in patch_alc662()
10982 if (err < 0) in patch_alc662()
10985 spec = codec->spec; in patch_alc662()
10987 spec->shutup = alc_eapd_shutup; in patch_alc662()
10990 spec->parse_flags = HDA_PINCFG_NO_HP_FIXUP; in patch_alc662()
10992 alc_fix_pll_init(codec, 0x20, 0x04, 15); in patch_alc662()
10994 switch (codec->core.vendor_id) { in patch_alc662()
10995 case 0x10ec0668: in patch_alc662()
10996 spec->init_hook = alc668_restore_default_value; in patch_alc662()
11000 alc_pre_init(codec); in patch_alc662()
11002 snd_hda_pick_fixup(codec, alc662_fixup_models, in patch_alc662()
11004 snd_hda_pick_pin_fixup(codec, alc662_pin_fixup_tbl, alc662_fixups, true); in patch_alc662()
11005 snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PRE_PROBE); in patch_alc662()
11007 alc_auto_parse_customize_define(codec); in patch_alc662()
11009 if (has_cdefine_beep(codec)) in patch_alc662()
11010 spec->gen.beep_nid = 0x01; in patch_alc662()
11012 if ((alc_get_coef0(codec) & (1 << 14)) && in patch_alc662()
11013 codec->bus->pci && codec->bus->pci->subsystem_vendor == 0x1025 && in patch_alc662()
11014 spec->cdefine.platform_type == 1) { in patch_alc662()
11015 err = alc_codec_rename(codec, "ALC272X"); in patch_alc662()
11016 if (err < 0) in patch_alc662()
11021 err = alc662_parse_auto_config(codec); in patch_alc662()
11022 if (err < 0) in patch_alc662()
11025 if (!spec->gen.no_analog && spec->gen.beep_nid) { in patch_alc662()
11026 switch (codec->core.vendor_id) { in patch_alc662()
11027 case 0x10ec0662: in patch_alc662()
11028 err = set_beep_amp(spec, 0x0b, 0x05, HDA_INPUT); in patch_alc662()
11030 case 0x10ec0272: in patch_alc662()
11031 case 0x10ec0663: in patch_alc662()
11032 case 0x10ec0665: in patch_alc662()
11033 case 0x10ec0668: in patch_alc662()
11034 err = set_beep_amp(spec, 0x0b, 0x04, HDA_INPUT); in patch_alc662()
11036 case 0x10ec0273: in patch_alc662()
11037 err = set_beep_amp(spec, 0x0b, 0x03, HDA_INPUT); in patch_alc662()
11040 if (err < 0) in patch_alc662()
11044 snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PROBE); in patch_alc662()
11046 return 0; in patch_alc662()
11049 alc_free(codec); in patch_alc662()
11057 static int alc680_parse_auto_config(struct hda_codec *codec) in alc680_parse_auto_config() argument
11059 return alc_parse_auto_config(codec, NULL, NULL); in alc680_parse_auto_config()
11064 static int patch_alc680(struct hda_codec *codec) in patch_alc680() argument
11068 /* ALC680 has no aa-loopback mixer */ in patch_alc680()
11069 err = alc_alloc_spec(codec, 0); in patch_alc680()
11070 if (err < 0) in patch_alc680()
11074 err = alc680_parse_auto_config(codec); in patch_alc680()
11075 if (err < 0) { in patch_alc680()
11076 alc_free(codec); in patch_alc680()
11080 return 0; in patch_alc680()
11087 HDA_CODEC_ENTRY(0x10ec0215, "ALC215", patch_alc269),
11088 HDA_CODEC_ENTRY(0x10ec0221, "ALC221", patch_alc269),
11089 HDA_CODEC_ENTRY(0x10ec0222, "ALC222", patch_alc269),
11090 HDA_CODEC_ENTRY(0x10ec0225, "ALC225", patch_alc269),
11091 HDA_CODEC_ENTRY(0x10ec0230, "ALC236", patch_alc269),
11092 HDA_CODEC_ENTRY(0x10ec0231, "ALC231", patch_alc269),
11093 HDA_CODEC_ENTRY(0x10ec0233, "ALC233", patch_alc269),
11094 HDA_CODEC_ENTRY(0x10ec0234, "ALC234", patch_alc269),
11095 HDA_CODEC_ENTRY(0x10ec0235, "ALC233", patch_alc269),
11096 HDA_CODEC_ENTRY(0x10ec0236, "ALC236", patch_alc269),
11097 HDA_CODEC_ENTRY(0x10ec0245, "ALC245", patch_alc269),
11098 HDA_CODEC_ENTRY(0x10ec0255, "ALC255", patch_alc269),
11099 HDA_CODEC_ENTRY(0x10ec0256, "ALC256", patch_alc269),
11100 HDA_CODEC_ENTRY(0x10ec0257, "ALC257", patch_alc269),
11101 HDA_CODEC_ENTRY(0x10ec0260, "ALC260", patch_alc260),
11102 HDA_CODEC_ENTRY(0x10ec0262, "ALC262", patch_alc262),
11103 HDA_CODEC_ENTRY(0x10ec0267, "ALC267", patch_alc268),
11104 HDA_CODEC_ENTRY(0x10ec0268, "ALC268", patch_alc268),
11105 HDA_CODEC_ENTRY(0x10ec0269, "ALC269", patch_alc269),
11106 HDA_CODEC_ENTRY(0x10ec0270, "ALC270", patch_alc269),
11107 HDA_CODEC_ENTRY(0x10ec0272, "ALC272", patch_alc662),
11108 HDA_CODEC_ENTRY(0x10ec0274, "ALC274", patch_alc269),
11109 HDA_CODEC_ENTRY(0x10ec0275, "ALC275", patch_alc269),
11110 HDA_CODEC_ENTRY(0x10ec0276, "ALC276", patch_alc269),
11111 HDA_CODEC_ENTRY(0x10ec0280, "ALC280", patch_alc269),
11112 HDA_CODEC_ENTRY(0x10ec0282, "ALC282", patch_alc269),
11113 HDA_CODEC_ENTRY(0x10ec0283, "ALC283", patch_alc269),
11114 HDA_CODEC_ENTRY(0x10ec0284, "ALC284", patch_alc269),
11115 HDA_CODEC_ENTRY(0x10ec0285, "ALC285", patch_alc269),
11116 HDA_CODEC_ENTRY(0x10ec0286, "ALC286", patch_alc269),
11117 HDA_CODEC_ENTRY(0x10ec0287, "ALC287", patch_alc269),
11118 HDA_CODEC_ENTRY(0x10ec0288, "ALC288", patch_alc269),
11119 HDA_CODEC_ENTRY(0x10ec0289, "ALC289", patch_alc269),
11120 HDA_CODEC_ENTRY(0x10ec0290, "ALC290", patch_alc269),
11121 HDA_CODEC_ENTRY(0x10ec0292, "ALC292", patch_alc269),
11122 HDA_CODEC_ENTRY(0x10ec0293, "ALC293", patch_alc269),
11123 HDA_CODEC_ENTRY(0x10ec0294, "ALC294", patch_alc269),
11124 HDA_CODEC_ENTRY(0x10ec0295, "ALC295", patch_alc269),
11125 HDA_CODEC_ENTRY(0x10ec0298, "ALC298", patch_alc269),
11126 HDA_CODEC_ENTRY(0x10ec0299, "ALC299", patch_alc269),
11127 HDA_CODEC_ENTRY(0x10ec0300, "ALC300", patch_alc269),
11128 HDA_CODEC_ENTRY(0x10ec0623, "ALC623", patch_alc269),
11129 HDA_CODEC_REV_ENTRY(0x10ec0861, 0x100340, "ALC660", patch_alc861),
11130 HDA_CODEC_ENTRY(0x10ec0660, "ALC660-VD", patch_alc861vd),
11131 HDA_CODEC_ENTRY(0x10ec0861, "ALC861", patch_alc861),
11132 HDA_CODEC_ENTRY(0x10ec0862, "ALC861-VD", patch_alc861vd),
11133 HDA_CODEC_REV_ENTRY(0x10ec0662, 0x100002, "ALC662 rev2", patch_alc882),
11134 HDA_CODEC_REV_ENTRY(0x10ec0662, 0x100101, "ALC662 rev1", patch_alc662),
11135 HDA_CODEC_REV_ENTRY(0x10ec0662, 0x100300, "ALC662 rev3", patch_alc662),
11136 HDA_CODEC_ENTRY(0x10ec0663, "ALC663", patch_alc662),
11137 HDA_CODEC_ENTRY(0x10ec0665, "ALC665", patch_alc662),
11138 HDA_CODEC_ENTRY(0x10ec0667, "ALC667", patch_alc662),
11139 HDA_CODEC_ENTRY(0x10ec0668, "ALC668", patch_alc662),
11140 HDA_CODEC_ENTRY(0x10ec0670, "ALC670", patch_alc662),
11141 HDA_CODEC_ENTRY(0x10ec0671, "ALC671", patch_alc662),
11142 HDA_CODEC_ENTRY(0x10ec0680, "ALC680", patch_alc680),
11143 HDA_CODEC_ENTRY(0x10ec0700, "ALC700", patch_alc269),
11144 HDA_CODEC_ENTRY(0x10ec0701, "ALC701", patch_alc269),
11145 HDA_CODEC_ENTRY(0x10ec0703, "ALC703", patch_alc269),
11146 HDA_CODEC_ENTRY(0x10ec0711, "ALC711", patch_alc269),
11147 HDA_CODEC_ENTRY(0x10ec0867, "ALC891", patch_alc662),
11148 HDA_CODEC_ENTRY(0x10ec0880, "ALC880", patch_alc880),
11149 HDA_CODEC_ENTRY(0x10ec0882, "ALC882", patch_alc882),
11150 HDA_CODEC_ENTRY(0x10ec0883, "ALC883", patch_alc882),
11151 HDA_CODEC_REV_ENTRY(0x10ec0885, 0x100101, "ALC889A", patch_alc882),
11152 HDA_CODEC_REV_ENTRY(0x10ec0885, 0x100103, "ALC889A", patch_alc882),
11153 HDA_CODEC_ENTRY(0x10ec0885, "ALC885", patch_alc882),
11154 HDA_CODEC_ENTRY(0x10ec0887, "ALC887", patch_alc882),
11155 HDA_CODEC_REV_ENTRY(0x10ec0888, 0x100101, "ALC1200", patch_alc882),
11156 HDA_CODEC_ENTRY(0x10ec0888, "ALC888", patch_alc882),
11157 HDA_CODEC_ENTRY(0x10ec0889, "ALC889", patch_alc882),
11158 HDA_CODEC_ENTRY(0x10ec0892, "ALC892", patch_alc662),
11159 HDA_CODEC_ENTRY(0x10ec0897, "ALC897", patch_alc662),
11160 HDA_CODEC_ENTRY(0x10ec0899, "ALC898", patch_alc882),
11161 HDA_CODEC_ENTRY(0x10ec0900, "ALC1150", patch_alc882),
11162 HDA_CODEC_ENTRY(0x10ec0b00, "ALCS1200A", patch_alc882),
11163 HDA_CODEC_ENTRY(0x10ec1168, "ALC1220", patch_alc882),
11164 HDA_CODEC_ENTRY(0x10ec1220, "ALC1220", patch_alc882),
11170 MODULE_DESCRIPTION("Realtek HD-audio codec");