1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * Universal Interface for Intel High Definition Audio Codec
5 * HD audio interface patch for Realtek ALC codecs
7 * Copyright (c) 2004 Kailang Yang <kailang@realtek.com.tw>
8 * PeiSen Hou <pshou@realtek.com.tw>
9 * Takashi Iwai <tiwai@suse.de>
10 * Jonathan Woithe <jwoithe@just42.net>
13 #include <linux/acpi.h>
14 #include <linux/init.h>
15 #include <linux/delay.h>
16 #include <linux/slab.h>
17 #include <linux/pci.h>
18 #include <linux/dmi.h>
19 #include <linux/module.h>
20 #include <linux/input.h>
21 #include <linux/leds.h>
22 #include <linux/ctype.h>
23 #include <sound/core.h>
24 #include <sound/jack.h>
25 #include <sound/hda_codec.h>
26 #include "hda_local.h"
27 #include "hda_auto_parser.h"
29 #include "hda_generic.h"
30 #include "hda_component.h"
32 /* keep halting ALC5505 DSP, for power saving */
33 #define HALT_REALTEK_ALC5505
35 /* extra amp-initialization sequence types */
43 ALC_HEADSET_MODE_UNKNOWN,
44 ALC_HEADSET_MODE_UNPLUGGED,
45 ALC_HEADSET_MODE_HEADSET,
47 ALC_HEADSET_MODE_HEADPHONE,
51 ALC_HEADSET_TYPE_UNKNOWN,
52 ALC_HEADSET_TYPE_CTIA,
53 ALC_HEADSET_TYPE_OMTP,
57 ALC_KEY_MICMUTE_INDEX,
60 struct alc_customize_define {
62 unsigned char port_connectivity;
63 unsigned char check_sum;
64 unsigned char customization;
65 unsigned char external_amp;
66 unsigned int enable_pcbeep:1;
67 unsigned int platform_type:1;
69 unsigned int override:1;
70 unsigned int fixup:1; /* Means that this sku is set by driver, not read from hw */
81 struct hda_gen_spec gen; /* must be at head */
83 /* codec parameterization */
84 struct alc_customize_define cdefine;
85 unsigned int parse_flags; /* flag for snd_hda_parse_pin_defcfg() */
88 unsigned int gpio_mask;
89 unsigned int gpio_dir;
90 unsigned int gpio_data;
91 bool gpio_write_delay; /* add a delay before writing gpio_data */
93 /* mute LED for HP laptops, see vref_mute_led_set() */
94 int mute_led_polarity;
95 int micmute_led_polarity;
96 hda_nid_t mute_led_nid;
97 hda_nid_t cap_mute_led_nid;
99 unsigned int gpio_mute_led_mask;
100 unsigned int gpio_mic_led_mask;
101 struct alc_coef_led mute_led_coef;
102 struct alc_coef_led mic_led_coef;
103 struct mutex coef_mutex;
105 hda_nid_t headset_mic_pin;
106 hda_nid_t headphone_mic_pin;
107 int current_headset_mode;
108 int current_headset_type;
111 void (*init_hook)(struct hda_codec *codec);
113 void (*power_hook)(struct hda_codec *codec);
115 void (*shutup)(struct hda_codec *codec);
118 int codec_variant; /* flag for other variants */
119 unsigned int has_alc5505_dsp:1;
120 unsigned int no_depop_delay:1;
121 unsigned int done_hp_init:1;
122 unsigned int no_shutup_pins:1;
123 unsigned int ultra_low_power:1;
124 unsigned int has_hs_key:1;
125 unsigned int no_internal_mic_pin:1;
126 unsigned int en_3kpull_low:1;
130 unsigned int pll_coef_idx, pll_coef_bit;
132 struct input_dev *kb_dev;
133 u8 alc_mute_keycode_map[1];
135 /* component binding */
136 struct hda_component comps[HDA_MAX_COMPONENTS];
140 * COEF access helper functions
143 static void coef_mutex_lock(struct hda_codec *codec)
145 struct alc_spec *spec = codec->spec;
147 snd_hda_power_up_pm(codec);
148 mutex_lock(&spec->coef_mutex);
151 static void coef_mutex_unlock(struct hda_codec *codec)
153 struct alc_spec *spec = codec->spec;
155 mutex_unlock(&spec->coef_mutex);
156 snd_hda_power_down_pm(codec);
159 static int __alc_read_coefex_idx(struct hda_codec *codec, hda_nid_t nid,
160 unsigned int coef_idx)
164 snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_COEF_INDEX, coef_idx);
165 val = snd_hda_codec_read(codec, nid, 0, AC_VERB_GET_PROC_COEF, 0);
169 static int alc_read_coefex_idx(struct hda_codec *codec, hda_nid_t nid,
170 unsigned int coef_idx)
174 coef_mutex_lock(codec);
175 val = __alc_read_coefex_idx(codec, nid, coef_idx);
176 coef_mutex_unlock(codec);
180 #define alc_read_coef_idx(codec, coef_idx) \
181 alc_read_coefex_idx(codec, 0x20, coef_idx)
183 static void __alc_write_coefex_idx(struct hda_codec *codec, hda_nid_t nid,
184 unsigned int coef_idx, unsigned int coef_val)
186 snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_COEF_INDEX, coef_idx);
187 snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_PROC_COEF, coef_val);
190 static void alc_write_coefex_idx(struct hda_codec *codec, hda_nid_t nid,
191 unsigned int coef_idx, unsigned int coef_val)
193 coef_mutex_lock(codec);
194 __alc_write_coefex_idx(codec, nid, coef_idx, coef_val);
195 coef_mutex_unlock(codec);
198 #define alc_write_coef_idx(codec, coef_idx, coef_val) \
199 alc_write_coefex_idx(codec, 0x20, coef_idx, coef_val)
201 static void __alc_update_coefex_idx(struct hda_codec *codec, hda_nid_t nid,
202 unsigned int coef_idx, unsigned int mask,
203 unsigned int bits_set)
205 unsigned int val = __alc_read_coefex_idx(codec, nid, coef_idx);
208 __alc_write_coefex_idx(codec, nid, coef_idx,
209 (val & ~mask) | bits_set);
212 static void alc_update_coefex_idx(struct hda_codec *codec, hda_nid_t nid,
213 unsigned int coef_idx, unsigned int mask,
214 unsigned int bits_set)
216 coef_mutex_lock(codec);
217 __alc_update_coefex_idx(codec, nid, coef_idx, mask, bits_set);
218 coef_mutex_unlock(codec);
221 #define alc_update_coef_idx(codec, coef_idx, mask, bits_set) \
222 alc_update_coefex_idx(codec, 0x20, coef_idx, mask, bits_set)
224 /* a special bypass for COEF 0; read the cached value at the second time */
225 static unsigned int alc_get_coef0(struct hda_codec *codec)
227 struct alc_spec *spec = codec->spec;
230 spec->coef0 = alc_read_coef_idx(codec, 0);
234 /* coef writes/updates batch */
242 #define UPDATE_COEFEX(_nid, _idx, _mask, _val) \
243 { .nid = (_nid), .idx = (_idx), .mask = (_mask), .val = (_val) }
244 #define WRITE_COEFEX(_nid, _idx, _val) UPDATE_COEFEX(_nid, _idx, -1, _val)
245 #define WRITE_COEF(_idx, _val) WRITE_COEFEX(0x20, _idx, _val)
246 #define UPDATE_COEF(_idx, _mask, _val) UPDATE_COEFEX(0x20, _idx, _mask, _val)
248 static void alc_process_coef_fw(struct hda_codec *codec,
249 const struct coef_fw *fw)
251 coef_mutex_lock(codec);
252 for (; fw->nid; fw++) {
253 if (fw->mask == (unsigned short)-1)
254 __alc_write_coefex_idx(codec, fw->nid, fw->idx, fw->val);
256 __alc_update_coefex_idx(codec, fw->nid, fw->idx,
259 coef_mutex_unlock(codec);
263 * GPIO setup tables, used in initialization
266 /* Enable GPIO mask and set output */
267 static void alc_setup_gpio(struct hda_codec *codec, unsigned int mask)
269 struct alc_spec *spec = codec->spec;
271 spec->gpio_mask |= mask;
272 spec->gpio_dir |= mask;
273 spec->gpio_data |= mask;
276 static void alc_write_gpio_data(struct hda_codec *codec)
278 struct alc_spec *spec = codec->spec;
280 snd_hda_codec_write(codec, 0x01, 0, AC_VERB_SET_GPIO_DATA,
284 static void alc_update_gpio_data(struct hda_codec *codec, unsigned int mask,
287 struct alc_spec *spec = codec->spec;
288 unsigned int oldval = spec->gpio_data;
291 spec->gpio_data |= mask;
293 spec->gpio_data &= ~mask;
294 if (oldval != spec->gpio_data)
295 alc_write_gpio_data(codec);
298 static void alc_write_gpio(struct hda_codec *codec)
300 struct alc_spec *spec = codec->spec;
302 if (!spec->gpio_mask)
305 snd_hda_codec_write(codec, codec->core.afg, 0,
306 AC_VERB_SET_GPIO_MASK, spec->gpio_mask);
307 snd_hda_codec_write(codec, codec->core.afg, 0,
308 AC_VERB_SET_GPIO_DIRECTION, spec->gpio_dir);
309 if (spec->gpio_write_delay)
311 alc_write_gpio_data(codec);
314 static void alc_fixup_gpio(struct hda_codec *codec, int action,
317 if (action == HDA_FIXUP_ACT_PRE_PROBE)
318 alc_setup_gpio(codec, mask);
321 static void alc_fixup_gpio1(struct hda_codec *codec,
322 const struct hda_fixup *fix, int action)
324 alc_fixup_gpio(codec, action, 0x01);
327 static void alc_fixup_gpio2(struct hda_codec *codec,
328 const struct hda_fixup *fix, int action)
330 alc_fixup_gpio(codec, action, 0x02);
333 static void alc_fixup_gpio3(struct hda_codec *codec,
334 const struct hda_fixup *fix, int action)
336 alc_fixup_gpio(codec, action, 0x03);
339 static void alc_fixup_gpio4(struct hda_codec *codec,
340 const struct hda_fixup *fix, int action)
342 alc_fixup_gpio(codec, action, 0x04);
345 static void alc_fixup_micmute_led(struct hda_codec *codec,
346 const struct hda_fixup *fix, int action)
348 if (action == HDA_FIXUP_ACT_PRE_PROBE)
349 snd_hda_gen_add_micmute_led_cdev(codec, NULL);
353 * Fix hardware PLL issue
354 * On some codecs, the analog PLL gating control must be off while
355 * the default value is 1.
357 static void alc_fix_pll(struct hda_codec *codec)
359 struct alc_spec *spec = codec->spec;
362 alc_update_coefex_idx(codec, spec->pll_nid, spec->pll_coef_idx,
363 1 << spec->pll_coef_bit, 0);
366 static void alc_fix_pll_init(struct hda_codec *codec, hda_nid_t nid,
367 unsigned int coef_idx, unsigned int coef_bit)
369 struct alc_spec *spec = codec->spec;
371 spec->pll_coef_idx = coef_idx;
372 spec->pll_coef_bit = coef_bit;
376 /* update the master volume per volume-knob's unsol event */
377 static void alc_update_knob_master(struct hda_codec *codec,
378 struct hda_jack_callback *jack)
381 struct snd_kcontrol *kctl;
382 struct snd_ctl_elem_value *uctl;
384 kctl = snd_hda_find_mixer_ctl(codec, "Master Playback Volume");
387 uctl = kzalloc(sizeof(*uctl), GFP_KERNEL);
390 val = snd_hda_codec_read(codec, jack->nid, 0,
391 AC_VERB_GET_VOLUME_KNOB_CONTROL, 0);
392 val &= HDA_AMP_VOLMASK;
393 uctl->value.integer.value[0] = val;
394 uctl->value.integer.value[1] = val;
395 kctl->put(kctl, uctl);
399 static void alc880_unsol_event(struct hda_codec *codec, unsigned int res)
401 /* For some reason, the res given from ALC880 is broken.
402 Here we adjust it properly. */
403 snd_hda_jack_unsol_event(codec, res >> 2);
406 /* Change EAPD to verb control */
407 static void alc_fill_eapd_coef(struct hda_codec *codec)
411 coef = alc_get_coef0(codec);
413 switch (codec->core.vendor_id) {
415 alc_update_coef_idx(codec, 0x7, 0, 1<<5);
419 alc_update_coef_idx(codec, 0x7, 0, 1<<13);
422 if ((coef & 0x00f0) == 0x0010)
423 alc_update_coef_idx(codec, 0xd, 0, 1<<14);
424 if ((coef & 0x00f0) == 0x0020)
425 alc_update_coef_idx(codec, 0x4, 1<<15, 0);
426 if ((coef & 0x00f0) == 0x0030)
427 alc_update_coef_idx(codec, 0x10, 1<<9, 0);
433 alc_update_coef_idx(codec, 0x4, 1<<15, 0);
438 alc_update_coef_idx(codec, 0x67, 0xf000, 0x3000);
443 alc_update_coef_idx(codec, 0x36, 1<<13, 0);
460 alc_update_coef_idx(codec, 0x10, 1<<9, 0);
463 alc_update_coef_idx(codec, 0xe, 0, 1<<0);
466 alc_update_coef_idx(codec, 0x10, 1<<9, 0);
467 alc_write_coef_idx(codec, 0x8, 0x4ab7);
470 alc_update_coef_idx(codec, 0xa, 1<<13, 0);
479 alc_update_coef_idx(codec, 0x10, 1<<15, 0);
482 if ((coef & 0x00f0) == 0x0030)
483 alc_update_coef_idx(codec, 0x4, 1<<10, 0); /* EAPD Ctrl */
492 alc_update_coef_idx(codec, 0xd, 0, 1<<14); /* EAPD Ctrl */
496 alc_update_coef_idx(codec, 0x19, 1<<13, 0);
499 alc_update_coef_idx(codec, 0x7, 3<<13, 0);
502 alc_update_coef_idx(codec, 0x4, 1<<10, 0);
505 if ((coef & 0x00f0) == 0x0020 || (coef & 0x00f0) == 0x0030)
506 alc_update_coef_idx(codec, 0x7, 1<<5, 0);
510 alc_update_coef_idx(codec, 0x7, 1<<5, 0);
517 alc_update_coef_idx(codec, 0x7, 1<<1, 0);
522 /* additional initialization for ALC888 variants */
523 static void alc888_coef_init(struct hda_codec *codec)
525 switch (alc_get_coef0(codec) & 0x00f0) {
530 alc_update_coef_idx(codec, 7, 0, 0x2030); /* Turn EAPD to High */
535 /* turn on/off EAPD control (only if available) */
536 static void set_eapd(struct hda_codec *codec, hda_nid_t nid, int on)
538 if (get_wcaps_type(get_wcaps(codec, nid)) != AC_WID_PIN)
540 if (snd_hda_query_pin_caps(codec, nid) & AC_PINCAP_EAPD)
541 snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_EAPD_BTLENABLE,
545 /* turn on/off EAPD controls of the codec */
546 static void alc_auto_setup_eapd(struct hda_codec *codec, bool on)
548 /* We currently only handle front, HP */
549 static const hda_nid_t pins[] = {
550 0x0f, 0x10, 0x14, 0x15, 0x17, 0
553 for (p = pins; *p; p++)
554 set_eapd(codec, *p, on);
557 static int find_ext_mic_pin(struct hda_codec *codec);
559 static void alc_headset_mic_no_shutup(struct hda_codec *codec)
561 const struct hda_pincfg *pin;
562 int mic_pin = find_ext_mic_pin(codec);
565 /* don't shut up pins when unloading the driver; otherwise it breaks
566 * the default pin setup at the next load of the driver
568 if (codec->bus->shutdown)
571 snd_array_for_each(&codec->init_pins, i, pin) {
572 /* use read here for syncing after issuing each verb */
573 if (pin->nid != mic_pin)
574 snd_hda_codec_read(codec, pin->nid, 0,
575 AC_VERB_SET_PIN_WIDGET_CONTROL, 0);
578 codec->pins_shutup = 1;
581 static void alc_shutup_pins(struct hda_codec *codec)
583 struct alc_spec *spec = codec->spec;
585 switch (codec->core.vendor_id) {
593 alc_headset_mic_no_shutup(codec);
596 if (!spec->no_shutup_pins)
597 snd_hda_shutup_pins(codec);
602 /* generic shutup callback;
603 * just turning off EAPD and a little pause for avoiding pop-noise
605 static void alc_eapd_shutup(struct hda_codec *codec)
607 struct alc_spec *spec = codec->spec;
609 alc_auto_setup_eapd(codec, false);
610 if (!spec->no_depop_delay)
612 alc_shutup_pins(codec);
615 /* generic EAPD initialization */
616 static void alc_auto_init_amp(struct hda_codec *codec, int type)
618 alc_auto_setup_eapd(codec, true);
619 alc_write_gpio(codec);
621 case ALC_INIT_DEFAULT:
622 switch (codec->core.vendor_id) {
624 alc_update_coefex_idx(codec, 0x1a, 7, 0, 0x2010);
630 alc_update_coef_idx(codec, 7, 0, 0x2030);
633 alc888_coef_init(codec);
640 /* get a primary headphone pin if available */
641 static hda_nid_t alc_get_hp_pin(struct alc_spec *spec)
643 if (spec->gen.autocfg.hp_pins[0])
644 return spec->gen.autocfg.hp_pins[0];
645 if (spec->gen.autocfg.line_out_type == AC_JACK_HP_OUT)
646 return spec->gen.autocfg.line_out_pins[0];
651 * Realtek SSID verification
654 /* Could be any non-zero and even value. When used as fixup, tells
655 * the driver to ignore any present sku defines.
657 #define ALC_FIXUP_SKU_IGNORE (2)
659 static void alc_fixup_sku_ignore(struct hda_codec *codec,
660 const struct hda_fixup *fix, int action)
662 struct alc_spec *spec = codec->spec;
663 if (action == HDA_FIXUP_ACT_PRE_PROBE) {
664 spec->cdefine.fixup = 1;
665 spec->cdefine.sku_cfg = ALC_FIXUP_SKU_IGNORE;
669 static void alc_fixup_no_depop_delay(struct hda_codec *codec,
670 const struct hda_fixup *fix, int action)
672 struct alc_spec *spec = codec->spec;
674 if (action == HDA_FIXUP_ACT_PROBE) {
675 spec->no_depop_delay = 1;
676 codec->depop_delay = 0;
680 static int alc_auto_parse_customize_define(struct hda_codec *codec)
682 unsigned int ass, tmp, i;
684 struct alc_spec *spec = codec->spec;
686 spec->cdefine.enable_pcbeep = 1; /* assume always enabled */
688 if (spec->cdefine.fixup) {
689 ass = spec->cdefine.sku_cfg;
690 if (ass == ALC_FIXUP_SKU_IGNORE)
695 if (!codec->bus->pci)
697 ass = codec->core.subsystem_id & 0xffff;
698 if (ass != codec->bus->pci->subsystem_device && (ass & 1))
702 if (codec->core.vendor_id == 0x10ec0260)
704 ass = snd_hda_codec_get_pincfg(codec, nid);
707 codec_info(codec, "%s: SKU not ready 0x%08x\n",
708 codec->core.chip_name, ass);
714 for (i = 1; i < 16; i++) {
718 if (((ass >> 16) & 0xf) != tmp)
721 spec->cdefine.port_connectivity = ass >> 30;
722 spec->cdefine.enable_pcbeep = (ass & 0x100000) >> 20;
723 spec->cdefine.check_sum = (ass >> 16) & 0xf;
724 spec->cdefine.customization = ass >> 8;
726 spec->cdefine.sku_cfg = ass;
727 spec->cdefine.external_amp = (ass & 0x38) >> 3;
728 spec->cdefine.platform_type = (ass & 0x4) >> 2;
729 spec->cdefine.swap = (ass & 0x2) >> 1;
730 spec->cdefine.override = ass & 0x1;
732 codec_dbg(codec, "SKU: Nid=0x%x sku_cfg=0x%08x\n",
733 nid, spec->cdefine.sku_cfg);
734 codec_dbg(codec, "SKU: port_connectivity=0x%x\n",
735 spec->cdefine.port_connectivity);
736 codec_dbg(codec, "SKU: enable_pcbeep=0x%x\n", spec->cdefine.enable_pcbeep);
737 codec_dbg(codec, "SKU: check_sum=0x%08x\n", spec->cdefine.check_sum);
738 codec_dbg(codec, "SKU: customization=0x%08x\n", spec->cdefine.customization);
739 codec_dbg(codec, "SKU: external_amp=0x%x\n", spec->cdefine.external_amp);
740 codec_dbg(codec, "SKU: platform_type=0x%x\n", spec->cdefine.platform_type);
741 codec_dbg(codec, "SKU: swap=0x%x\n", spec->cdefine.swap);
742 codec_dbg(codec, "SKU: override=0x%x\n", spec->cdefine.override);
747 /* return the position of NID in the list, or -1 if not found */
748 static int find_idx_in_nid_list(hda_nid_t nid, const hda_nid_t *list, int nums)
751 for (i = 0; i < nums; i++)
756 /* return true if the given NID is found in the list */
757 static bool found_in_nid_list(hda_nid_t nid, const hda_nid_t *list, int nums)
759 return find_idx_in_nid_list(nid, list, nums) >= 0;
762 /* check subsystem ID and set up device-specific initialization;
763 * return 1 if initialized, 0 if invalid SSID
765 /* 32-bit subsystem ID for BIOS loading in HD Audio codec.
766 * 31 ~ 16 : Manufacture ID
768 * 7 ~ 0 : Assembly ID
769 * port-A --> pin 39/41, port-E --> pin 14/15, port-D --> pin 35/36
771 static int alc_subsystem_id(struct hda_codec *codec, const hda_nid_t *ports)
773 unsigned int ass, tmp, i;
775 struct alc_spec *spec = codec->spec;
777 if (spec->cdefine.fixup) {
778 ass = spec->cdefine.sku_cfg;
779 if (ass == ALC_FIXUP_SKU_IGNORE)
784 ass = codec->core.subsystem_id & 0xffff;
785 if (codec->bus->pci &&
786 ass != codec->bus->pci->subsystem_device && (ass & 1))
789 /* invalid SSID, check the special NID pin defcfg instead */
791 * 31~30 : port connectivity
794 * 19~16 : Check sum (15:1)
799 if (codec->core.vendor_id == 0x10ec0260)
801 ass = snd_hda_codec_get_pincfg(codec, nid);
803 "realtek: No valid SSID, checking pincfg 0x%08x for NID 0x%x\n",
807 if ((ass >> 30) != 1) /* no physical connection */
812 for (i = 1; i < 16; i++) {
816 if (((ass >> 16) & 0xf) != tmp)
819 codec_dbg(codec, "realtek: Enabling init ASM_ID=0x%04x CODEC_ID=%08x\n",
820 ass & 0xffff, codec->core.vendor_id);
824 * 2 : 0 --> Desktop, 1 --> Laptop
825 * 3~5 : External Amplifier control
828 tmp = (ass & 0x38) >> 3; /* external Amp control */
829 if (spec->init_amp == ALC_INIT_UNDEFINED) {
832 alc_setup_gpio(codec, 0x01);
835 alc_setup_gpio(codec, 0x02);
838 alc_setup_gpio(codec, 0x04);
842 spec->init_amp = ALC_INIT_DEFAULT;
847 /* is laptop or Desktop and enable the function "Mute internal speaker
848 * when the external headphone out jack is plugged"
853 * 10~8 : Jack location
854 * 12~11: Headphone out -> 00: PortA, 01: PortE, 02: PortD, 03: Resvered
856 * 15 : 1 --> enable the function "Mute internal speaker
857 * when the external headphone out jack is plugged"
859 if (!alc_get_hp_pin(spec)) {
861 tmp = (ass >> 11) & 0x3; /* HP to chassis */
863 if (found_in_nid_list(nid, spec->gen.autocfg.line_out_pins,
864 spec->gen.autocfg.line_outs))
866 spec->gen.autocfg.hp_pins[0] = nid;
871 /* Check the validity of ALC subsystem-id
872 * ports contains an array of 4 pin NIDs for port-A, E, D and I */
873 static void alc_ssid_check(struct hda_codec *codec, const hda_nid_t *ports)
875 if (!alc_subsystem_id(codec, ports)) {
876 struct alc_spec *spec = codec->spec;
877 if (spec->init_amp == ALC_INIT_UNDEFINED) {
879 "realtek: Enable default setup for auto mode as fallback\n");
880 spec->init_amp = ALC_INIT_DEFAULT;
888 static void alc_fixup_inv_dmic(struct hda_codec *codec,
889 const struct hda_fixup *fix, int action)
891 struct alc_spec *spec = codec->spec;
893 spec->gen.inv_dmic_split = 1;
897 static int alc_build_controls(struct hda_codec *codec)
901 err = snd_hda_gen_build_controls(codec);
905 snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_BUILD);
914 static void alc_pre_init(struct hda_codec *codec)
916 alc_fill_eapd_coef(codec);
919 #define is_s3_resume(codec) \
920 ((codec)->core.dev.power.power_state.event == PM_EVENT_RESUME)
921 #define is_s4_resume(codec) \
922 ((codec)->core.dev.power.power_state.event == PM_EVENT_RESTORE)
924 static int alc_init(struct hda_codec *codec)
926 struct alc_spec *spec = codec->spec;
928 /* hibernation resume needs the full chip initialization */
929 if (is_s4_resume(codec))
933 spec->init_hook(codec);
935 spec->gen.skip_verbs = 1; /* applied in below */
936 snd_hda_gen_init(codec);
938 alc_auto_init_amp(codec, spec->init_amp);
939 snd_hda_apply_verbs(codec); /* apply verbs here after own init */
941 snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_INIT);
946 #define alc_free snd_hda_gen_free
949 static inline void alc_shutup(struct hda_codec *codec)
951 struct alc_spec *spec = codec->spec;
953 if (!snd_hda_get_bool_hint(codec, "shutup"))
954 return; /* disabled explicitly by hints */
956 if (spec && spec->shutup)
959 alc_shutup_pins(codec);
962 static void alc_power_eapd(struct hda_codec *codec)
964 alc_auto_setup_eapd(codec, false);
967 static int alc_suspend(struct hda_codec *codec)
969 struct alc_spec *spec = codec->spec;
971 if (spec && spec->power_hook)
972 spec->power_hook(codec);
976 static int alc_resume(struct hda_codec *codec)
978 struct alc_spec *spec = codec->spec;
980 if (!spec->no_depop_delay)
981 msleep(150); /* to avoid pop noise */
982 codec->patch_ops.init(codec);
983 snd_hda_regmap_sync(codec);
984 hda_call_check_power_status(codec, 0x01);
991 static const struct hda_codec_ops alc_patch_ops = {
992 .build_controls = alc_build_controls,
993 .build_pcms = snd_hda_gen_build_pcms,
996 .unsol_event = snd_hda_jack_unsol_event,
998 .resume = alc_resume,
999 .suspend = alc_suspend,
1000 .check_power_status = snd_hda_gen_check_power_status,
1005 #define alc_codec_rename(codec, name) snd_hda_codec_set_name(codec, name)
1008 * Rename codecs appropriately from COEF value or subvendor id
1010 struct alc_codec_rename_table {
1011 unsigned int vendor_id;
1012 unsigned short coef_mask;
1013 unsigned short coef_bits;
1017 struct alc_codec_rename_pci_table {
1018 unsigned int codec_vendor_id;
1019 unsigned short pci_subvendor;
1020 unsigned short pci_subdevice;
1024 static const struct alc_codec_rename_table rename_tbl[] = {
1025 { 0x10ec0221, 0xf00f, 0x1003, "ALC231" },
1026 { 0x10ec0269, 0xfff0, 0x3010, "ALC277" },
1027 { 0x10ec0269, 0xf0f0, 0x2010, "ALC259" },
1028 { 0x10ec0269, 0xf0f0, 0x3010, "ALC258" },
1029 { 0x10ec0269, 0x00f0, 0x0010, "ALC269VB" },
1030 { 0x10ec0269, 0xffff, 0xa023, "ALC259" },
1031 { 0x10ec0269, 0xffff, 0x6023, "ALC281X" },
1032 { 0x10ec0269, 0x00f0, 0x0020, "ALC269VC" },
1033 { 0x10ec0269, 0x00f0, 0x0030, "ALC269VD" },
1034 { 0x10ec0662, 0xffff, 0x4020, "ALC656" },
1035 { 0x10ec0887, 0x00f0, 0x0030, "ALC887-VD" },
1036 { 0x10ec0888, 0x00f0, 0x0030, "ALC888-VD" },
1037 { 0x10ec0888, 0xf0f0, 0x3020, "ALC886" },
1038 { 0x10ec0899, 0x2000, 0x2000, "ALC899" },
1039 { 0x10ec0892, 0xffff, 0x8020, "ALC661" },
1040 { 0x10ec0892, 0xffff, 0x8011, "ALC661" },
1041 { 0x10ec0892, 0xffff, 0x4011, "ALC656" },
1042 { } /* terminator */
1045 static const struct alc_codec_rename_pci_table rename_pci_tbl[] = {
1046 { 0x10ec0280, 0x1028, 0, "ALC3220" },
1047 { 0x10ec0282, 0x1028, 0, "ALC3221" },
1048 { 0x10ec0283, 0x1028, 0, "ALC3223" },
1049 { 0x10ec0288, 0x1028, 0, "ALC3263" },
1050 { 0x10ec0292, 0x1028, 0, "ALC3226" },
1051 { 0x10ec0293, 0x1028, 0, "ALC3235" },
1052 { 0x10ec0255, 0x1028, 0, "ALC3234" },
1053 { 0x10ec0668, 0x1028, 0, "ALC3661" },
1054 { 0x10ec0275, 0x1028, 0, "ALC3260" },
1055 { 0x10ec0899, 0x1028, 0, "ALC3861" },
1056 { 0x10ec0298, 0x1028, 0, "ALC3266" },
1057 { 0x10ec0236, 0x1028, 0, "ALC3204" },
1058 { 0x10ec0256, 0x1028, 0, "ALC3246" },
1059 { 0x10ec0225, 0x1028, 0, "ALC3253" },
1060 { 0x10ec0295, 0x1028, 0, "ALC3254" },
1061 { 0x10ec0299, 0x1028, 0, "ALC3271" },
1062 { 0x10ec0670, 0x1025, 0, "ALC669X" },
1063 { 0x10ec0676, 0x1025, 0, "ALC679X" },
1064 { 0x10ec0282, 0x1043, 0, "ALC3229" },
1065 { 0x10ec0233, 0x1043, 0, "ALC3236" },
1066 { 0x10ec0280, 0x103c, 0, "ALC3228" },
1067 { 0x10ec0282, 0x103c, 0, "ALC3227" },
1068 { 0x10ec0286, 0x103c, 0, "ALC3242" },
1069 { 0x10ec0290, 0x103c, 0, "ALC3241" },
1070 { 0x10ec0668, 0x103c, 0, "ALC3662" },
1071 { 0x10ec0283, 0x17aa, 0, "ALC3239" },
1072 { 0x10ec0292, 0x17aa, 0, "ALC3232" },
1073 { } /* terminator */
1076 static int alc_codec_rename_from_preset(struct hda_codec *codec)
1078 const struct alc_codec_rename_table *p;
1079 const struct alc_codec_rename_pci_table *q;
1081 for (p = rename_tbl; p->vendor_id; p++) {
1082 if (p->vendor_id != codec->core.vendor_id)
1084 if ((alc_get_coef0(codec) & p->coef_mask) == p->coef_bits)
1085 return alc_codec_rename(codec, p->name);
1088 if (!codec->bus->pci)
1090 for (q = rename_pci_tbl; q->codec_vendor_id; q++) {
1091 if (q->codec_vendor_id != codec->core.vendor_id)
1093 if (q->pci_subvendor != codec->bus->pci->subsystem_vendor)
1095 if (!q->pci_subdevice ||
1096 q->pci_subdevice == codec->bus->pci->subsystem_device)
1097 return alc_codec_rename(codec, q->name);
1105 * Digital-beep handlers
1107 #ifdef CONFIG_SND_HDA_INPUT_BEEP
1109 /* additional beep mixers; private_value will be overwritten */
1110 static const struct snd_kcontrol_new alc_beep_mixer[] = {
1111 HDA_CODEC_VOLUME("Beep Playback Volume", 0, 0, HDA_INPUT),
1112 HDA_CODEC_MUTE_BEEP("Beep Playback Switch", 0, 0, HDA_INPUT),
1115 /* set up and create beep controls */
1116 static int set_beep_amp(struct alc_spec *spec, hda_nid_t nid,
1119 struct snd_kcontrol_new *knew;
1120 unsigned int beep_amp = HDA_COMPOSE_AMP_VAL(nid, 3, idx, dir);
1123 for (i = 0; i < ARRAY_SIZE(alc_beep_mixer); i++) {
1124 knew = snd_hda_gen_add_kctl(&spec->gen, NULL,
1125 &alc_beep_mixer[i]);
1128 knew->private_value = beep_amp;
1133 static const struct snd_pci_quirk beep_allow_list[] = {
1134 SND_PCI_QUIRK(0x1043, 0x103c, "ASUS", 1),
1135 SND_PCI_QUIRK(0x1043, 0x115d, "ASUS", 1),
1136 SND_PCI_QUIRK(0x1043, 0x829f, "ASUS", 1),
1137 SND_PCI_QUIRK(0x1043, 0x8376, "EeePC", 1),
1138 SND_PCI_QUIRK(0x1043, 0x83ce, "EeePC", 1),
1139 SND_PCI_QUIRK(0x1043, 0x831a, "EeePC", 1),
1140 SND_PCI_QUIRK(0x1043, 0x834a, "EeePC", 1),
1141 SND_PCI_QUIRK(0x1458, 0xa002, "GA-MA790X", 1),
1142 SND_PCI_QUIRK(0x8086, 0xd613, "Intel", 1),
1143 /* denylist -- no beep available */
1144 SND_PCI_QUIRK(0x17aa, 0x309e, "Lenovo ThinkCentre M73", 0),
1145 SND_PCI_QUIRK(0x17aa, 0x30a3, "Lenovo ThinkCentre M93", 0),
1149 static inline int has_cdefine_beep(struct hda_codec *codec)
1151 struct alc_spec *spec = codec->spec;
1152 const struct snd_pci_quirk *q;
1153 q = snd_pci_quirk_lookup(codec->bus->pci, beep_allow_list);
1156 return spec->cdefine.enable_pcbeep;
1159 #define set_beep_amp(spec, nid, idx, dir) 0
1160 #define has_cdefine_beep(codec) 0
1163 /* parse the BIOS configuration and set up the alc_spec */
1164 /* return 1 if successful, 0 if the proper config is not found,
1165 * or a negative error code
1167 static int alc_parse_auto_config(struct hda_codec *codec,
1168 const hda_nid_t *ignore_nids,
1169 const hda_nid_t *ssid_nids)
1171 struct alc_spec *spec = codec->spec;
1172 struct auto_pin_cfg *cfg = &spec->gen.autocfg;
1175 err = snd_hda_parse_pin_defcfg(codec, cfg, ignore_nids,
1181 alc_ssid_check(codec, ssid_nids);
1183 err = snd_hda_gen_parse_auto_config(codec, cfg);
1190 /* common preparation job for alc_spec */
1191 static int alc_alloc_spec(struct hda_codec *codec, hda_nid_t mixer_nid)
1193 struct alc_spec *spec = kzalloc(sizeof(*spec), GFP_KERNEL);
1199 snd_hda_gen_spec_init(&spec->gen);
1200 spec->gen.mixer_nid = mixer_nid;
1201 spec->gen.own_eapd_ctl = 1;
1202 codec->single_adc_amp = 1;
1203 /* FIXME: do we need this for all Realtek codec models? */
1204 codec->spdif_status_reset = 1;
1205 codec->forced_resume = 1;
1206 codec->patch_ops = alc_patch_ops;
1207 mutex_init(&spec->coef_mutex);
1209 err = alc_codec_rename_from_preset(codec);
1217 static int alc880_parse_auto_config(struct hda_codec *codec)
1219 static const hda_nid_t alc880_ignore[] = { 0x1d, 0 };
1220 static const hda_nid_t alc880_ssids[] = { 0x15, 0x1b, 0x14, 0 };
1221 return alc_parse_auto_config(codec, alc880_ignore, alc880_ssids);
1230 ALC880_FIXUP_MEDION_RIM,
1232 ALC880_FIXUP_LG_LW25,
1234 ALC880_FIXUP_EAPD_COEF,
1235 ALC880_FIXUP_TCL_S700,
1236 ALC880_FIXUP_VOL_KNOB,
1237 ALC880_FIXUP_FUJITSU,
1239 ALC880_FIXUP_UNIWILL,
1240 ALC880_FIXUP_UNIWILL_DIG,
1242 ALC880_FIXUP_ASUS_W5A,
1243 ALC880_FIXUP_3ST_BASE,
1245 ALC880_FIXUP_3ST_DIG,
1246 ALC880_FIXUP_5ST_BASE,
1248 ALC880_FIXUP_5ST_DIG,
1249 ALC880_FIXUP_6ST_BASE,
1251 ALC880_FIXUP_6ST_DIG,
1252 ALC880_FIXUP_6ST_AUTOMUTE,
1255 /* enable the volume-knob widget support on NID 0x21 */
1256 static void alc880_fixup_vol_knob(struct hda_codec *codec,
1257 const struct hda_fixup *fix, int action)
1259 if (action == HDA_FIXUP_ACT_PROBE)
1260 snd_hda_jack_detect_enable_callback(codec, 0x21,
1261 alc_update_knob_master);
1264 static const struct hda_fixup alc880_fixups[] = {
1265 [ALC880_FIXUP_GPIO1] = {
1266 .type = HDA_FIXUP_FUNC,
1267 .v.func = alc_fixup_gpio1,
1269 [ALC880_FIXUP_GPIO2] = {
1270 .type = HDA_FIXUP_FUNC,
1271 .v.func = alc_fixup_gpio2,
1273 [ALC880_FIXUP_MEDION_RIM] = {
1274 .type = HDA_FIXUP_VERBS,
1275 .v.verbs = (const struct hda_verb[]) {
1276 { 0x20, AC_VERB_SET_COEF_INDEX, 0x07 },
1277 { 0x20, AC_VERB_SET_PROC_COEF, 0x3060 },
1281 .chain_id = ALC880_FIXUP_GPIO2,
1283 [ALC880_FIXUP_LG] = {
1284 .type = HDA_FIXUP_PINS,
1285 .v.pins = (const struct hda_pintbl[]) {
1286 /* disable bogus unused pins */
1287 { 0x16, 0x411111f0 },
1288 { 0x18, 0x411111f0 },
1289 { 0x1a, 0x411111f0 },
1293 [ALC880_FIXUP_LG_LW25] = {
1294 .type = HDA_FIXUP_PINS,
1295 .v.pins = (const struct hda_pintbl[]) {
1296 { 0x1a, 0x0181344f }, /* line-in */
1297 { 0x1b, 0x0321403f }, /* headphone */
1301 [ALC880_FIXUP_W810] = {
1302 .type = HDA_FIXUP_PINS,
1303 .v.pins = (const struct hda_pintbl[]) {
1304 /* disable bogus unused pins */
1305 { 0x17, 0x411111f0 },
1309 .chain_id = ALC880_FIXUP_GPIO2,
1311 [ALC880_FIXUP_EAPD_COEF] = {
1312 .type = HDA_FIXUP_VERBS,
1313 .v.verbs = (const struct hda_verb[]) {
1314 /* change to EAPD mode */
1315 { 0x20, AC_VERB_SET_COEF_INDEX, 0x07 },
1316 { 0x20, AC_VERB_SET_PROC_COEF, 0x3060 },
1320 [ALC880_FIXUP_TCL_S700] = {
1321 .type = HDA_FIXUP_VERBS,
1322 .v.verbs = (const struct hda_verb[]) {
1323 /* change to EAPD mode */
1324 { 0x20, AC_VERB_SET_COEF_INDEX, 0x07 },
1325 { 0x20, AC_VERB_SET_PROC_COEF, 0x3070 },
1329 .chain_id = ALC880_FIXUP_GPIO2,
1331 [ALC880_FIXUP_VOL_KNOB] = {
1332 .type = HDA_FIXUP_FUNC,
1333 .v.func = alc880_fixup_vol_knob,
1335 [ALC880_FIXUP_FUJITSU] = {
1336 /* override all pins as BIOS on old Amilo is broken */
1337 .type = HDA_FIXUP_PINS,
1338 .v.pins = (const struct hda_pintbl[]) {
1339 { 0x14, 0x0121401f }, /* HP */
1340 { 0x15, 0x99030120 }, /* speaker */
1341 { 0x16, 0x99030130 }, /* bass speaker */
1342 { 0x17, 0x411111f0 }, /* N/A */
1343 { 0x18, 0x411111f0 }, /* N/A */
1344 { 0x19, 0x01a19950 }, /* mic-in */
1345 { 0x1a, 0x411111f0 }, /* N/A */
1346 { 0x1b, 0x411111f0 }, /* N/A */
1347 { 0x1c, 0x411111f0 }, /* N/A */
1348 { 0x1d, 0x411111f0 }, /* N/A */
1349 { 0x1e, 0x01454140 }, /* SPDIF out */
1353 .chain_id = ALC880_FIXUP_VOL_KNOB,
1355 [ALC880_FIXUP_F1734] = {
1356 /* almost compatible with FUJITSU, but no bass and SPDIF */
1357 .type = HDA_FIXUP_PINS,
1358 .v.pins = (const struct hda_pintbl[]) {
1359 { 0x14, 0x0121401f }, /* HP */
1360 { 0x15, 0x99030120 }, /* speaker */
1361 { 0x16, 0x411111f0 }, /* N/A */
1362 { 0x17, 0x411111f0 }, /* N/A */
1363 { 0x18, 0x411111f0 }, /* N/A */
1364 { 0x19, 0x01a19950 }, /* mic-in */
1365 { 0x1a, 0x411111f0 }, /* N/A */
1366 { 0x1b, 0x411111f0 }, /* N/A */
1367 { 0x1c, 0x411111f0 }, /* N/A */
1368 { 0x1d, 0x411111f0 }, /* N/A */
1369 { 0x1e, 0x411111f0 }, /* N/A */
1373 .chain_id = ALC880_FIXUP_VOL_KNOB,
1375 [ALC880_FIXUP_UNIWILL] = {
1376 /* need to fix HP and speaker pins to be parsed correctly */
1377 .type = HDA_FIXUP_PINS,
1378 .v.pins = (const struct hda_pintbl[]) {
1379 { 0x14, 0x0121411f }, /* HP */
1380 { 0x15, 0x99030120 }, /* speaker */
1381 { 0x16, 0x99030130 }, /* bass speaker */
1385 [ALC880_FIXUP_UNIWILL_DIG] = {
1386 .type = HDA_FIXUP_PINS,
1387 .v.pins = (const struct hda_pintbl[]) {
1388 /* disable bogus unused pins */
1389 { 0x17, 0x411111f0 },
1390 { 0x19, 0x411111f0 },
1391 { 0x1b, 0x411111f0 },
1392 { 0x1f, 0x411111f0 },
1396 [ALC880_FIXUP_Z71V] = {
1397 .type = HDA_FIXUP_PINS,
1398 .v.pins = (const struct hda_pintbl[]) {
1399 /* set up the whole pins as BIOS is utterly broken */
1400 { 0x14, 0x99030120 }, /* speaker */
1401 { 0x15, 0x0121411f }, /* HP */
1402 { 0x16, 0x411111f0 }, /* N/A */
1403 { 0x17, 0x411111f0 }, /* N/A */
1404 { 0x18, 0x01a19950 }, /* mic-in */
1405 { 0x19, 0x411111f0 }, /* N/A */
1406 { 0x1a, 0x01813031 }, /* line-in */
1407 { 0x1b, 0x411111f0 }, /* N/A */
1408 { 0x1c, 0x411111f0 }, /* N/A */
1409 { 0x1d, 0x411111f0 }, /* N/A */
1410 { 0x1e, 0x0144111e }, /* SPDIF */
1414 [ALC880_FIXUP_ASUS_W5A] = {
1415 .type = HDA_FIXUP_PINS,
1416 .v.pins = (const struct hda_pintbl[]) {
1417 /* set up the whole pins as BIOS is utterly broken */
1418 { 0x14, 0x0121411f }, /* HP */
1419 { 0x15, 0x411111f0 }, /* N/A */
1420 { 0x16, 0x411111f0 }, /* N/A */
1421 { 0x17, 0x411111f0 }, /* N/A */
1422 { 0x18, 0x90a60160 }, /* mic */
1423 { 0x19, 0x411111f0 }, /* N/A */
1424 { 0x1a, 0x411111f0 }, /* N/A */
1425 { 0x1b, 0x411111f0 }, /* N/A */
1426 { 0x1c, 0x411111f0 }, /* N/A */
1427 { 0x1d, 0x411111f0 }, /* N/A */
1428 { 0x1e, 0xb743111e }, /* SPDIF out */
1432 .chain_id = ALC880_FIXUP_GPIO1,
1434 [ALC880_FIXUP_3ST_BASE] = {
1435 .type = HDA_FIXUP_PINS,
1436 .v.pins = (const struct hda_pintbl[]) {
1437 { 0x14, 0x01014010 }, /* line-out */
1438 { 0x15, 0x411111f0 }, /* N/A */
1439 { 0x16, 0x411111f0 }, /* N/A */
1440 { 0x17, 0x411111f0 }, /* N/A */
1441 { 0x18, 0x01a19c30 }, /* mic-in */
1442 { 0x19, 0x0121411f }, /* HP */
1443 { 0x1a, 0x01813031 }, /* line-in */
1444 { 0x1b, 0x02a19c40 }, /* front-mic */
1445 { 0x1c, 0x411111f0 }, /* N/A */
1446 { 0x1d, 0x411111f0 }, /* N/A */
1447 /* 0x1e is filled in below */
1448 { 0x1f, 0x411111f0 }, /* N/A */
1452 [ALC880_FIXUP_3ST] = {
1453 .type = HDA_FIXUP_PINS,
1454 .v.pins = (const struct hda_pintbl[]) {
1455 { 0x1e, 0x411111f0 }, /* N/A */
1459 .chain_id = ALC880_FIXUP_3ST_BASE,
1461 [ALC880_FIXUP_3ST_DIG] = {
1462 .type = HDA_FIXUP_PINS,
1463 .v.pins = (const struct hda_pintbl[]) {
1464 { 0x1e, 0x0144111e }, /* SPDIF */
1468 .chain_id = ALC880_FIXUP_3ST_BASE,
1470 [ALC880_FIXUP_5ST_BASE] = {
1471 .type = HDA_FIXUP_PINS,
1472 .v.pins = (const struct hda_pintbl[]) {
1473 { 0x14, 0x01014010 }, /* front */
1474 { 0x15, 0x411111f0 }, /* N/A */
1475 { 0x16, 0x01011411 }, /* CLFE */
1476 { 0x17, 0x01016412 }, /* surr */
1477 { 0x18, 0x01a19c30 }, /* mic-in */
1478 { 0x19, 0x0121411f }, /* HP */
1479 { 0x1a, 0x01813031 }, /* line-in */
1480 { 0x1b, 0x02a19c40 }, /* front-mic */
1481 { 0x1c, 0x411111f0 }, /* N/A */
1482 { 0x1d, 0x411111f0 }, /* N/A */
1483 /* 0x1e is filled in below */
1484 { 0x1f, 0x411111f0 }, /* N/A */
1488 [ALC880_FIXUP_5ST] = {
1489 .type = HDA_FIXUP_PINS,
1490 .v.pins = (const struct hda_pintbl[]) {
1491 { 0x1e, 0x411111f0 }, /* N/A */
1495 .chain_id = ALC880_FIXUP_5ST_BASE,
1497 [ALC880_FIXUP_5ST_DIG] = {
1498 .type = HDA_FIXUP_PINS,
1499 .v.pins = (const struct hda_pintbl[]) {
1500 { 0x1e, 0x0144111e }, /* SPDIF */
1504 .chain_id = ALC880_FIXUP_5ST_BASE,
1506 [ALC880_FIXUP_6ST_BASE] = {
1507 .type = HDA_FIXUP_PINS,
1508 .v.pins = (const struct hda_pintbl[]) {
1509 { 0x14, 0x01014010 }, /* front */
1510 { 0x15, 0x01016412 }, /* surr */
1511 { 0x16, 0x01011411 }, /* CLFE */
1512 { 0x17, 0x01012414 }, /* side */
1513 { 0x18, 0x01a19c30 }, /* mic-in */
1514 { 0x19, 0x02a19c40 }, /* front-mic */
1515 { 0x1a, 0x01813031 }, /* line-in */
1516 { 0x1b, 0x0121411f }, /* HP */
1517 { 0x1c, 0x411111f0 }, /* N/A */
1518 { 0x1d, 0x411111f0 }, /* N/A */
1519 /* 0x1e is filled in below */
1520 { 0x1f, 0x411111f0 }, /* N/A */
1524 [ALC880_FIXUP_6ST] = {
1525 .type = HDA_FIXUP_PINS,
1526 .v.pins = (const struct hda_pintbl[]) {
1527 { 0x1e, 0x411111f0 }, /* N/A */
1531 .chain_id = ALC880_FIXUP_6ST_BASE,
1533 [ALC880_FIXUP_6ST_DIG] = {
1534 .type = HDA_FIXUP_PINS,
1535 .v.pins = (const struct hda_pintbl[]) {
1536 { 0x1e, 0x0144111e }, /* SPDIF */
1540 .chain_id = ALC880_FIXUP_6ST_BASE,
1542 [ALC880_FIXUP_6ST_AUTOMUTE] = {
1543 .type = HDA_FIXUP_PINS,
1544 .v.pins = (const struct hda_pintbl[]) {
1545 { 0x1b, 0x0121401f }, /* HP with jack detect */
1548 .chained_before = true,
1549 .chain_id = ALC880_FIXUP_6ST_BASE,
1553 static const struct snd_pci_quirk alc880_fixup_tbl[] = {
1554 SND_PCI_QUIRK(0x1019, 0x0f69, "Coeus G610P", ALC880_FIXUP_W810),
1555 SND_PCI_QUIRK(0x1043, 0x10c3, "ASUS W5A", ALC880_FIXUP_ASUS_W5A),
1556 SND_PCI_QUIRK(0x1043, 0x1964, "ASUS Z71V", ALC880_FIXUP_Z71V),
1557 SND_PCI_QUIRK_VENDOR(0x1043, "ASUS", ALC880_FIXUP_GPIO1),
1558 SND_PCI_QUIRK(0x147b, 0x1045, "ABit AA8XE", ALC880_FIXUP_6ST_AUTOMUTE),
1559 SND_PCI_QUIRK(0x1558, 0x5401, "Clevo GPIO2", ALC880_FIXUP_GPIO2),
1560 SND_PCI_QUIRK_VENDOR(0x1558, "Clevo", ALC880_FIXUP_EAPD_COEF),
1561 SND_PCI_QUIRK(0x1584, 0x9050, "Uniwill", ALC880_FIXUP_UNIWILL_DIG),
1562 SND_PCI_QUIRK(0x1584, 0x9054, "Uniwill", ALC880_FIXUP_F1734),
1563 SND_PCI_QUIRK(0x1584, 0x9070, "Uniwill", ALC880_FIXUP_UNIWILL),
1564 SND_PCI_QUIRK(0x1584, 0x9077, "Uniwill P53", ALC880_FIXUP_VOL_KNOB),
1565 SND_PCI_QUIRK(0x161f, 0x203d, "W810", ALC880_FIXUP_W810),
1566 SND_PCI_QUIRK(0x161f, 0x205d, "Medion Rim 2150", ALC880_FIXUP_MEDION_RIM),
1567 SND_PCI_QUIRK(0x1631, 0xe011, "PB 13201056", ALC880_FIXUP_6ST_AUTOMUTE),
1568 SND_PCI_QUIRK(0x1734, 0x107c, "FSC Amilo M1437", ALC880_FIXUP_FUJITSU),
1569 SND_PCI_QUIRK(0x1734, 0x1094, "FSC Amilo M1451G", ALC880_FIXUP_FUJITSU),
1570 SND_PCI_QUIRK(0x1734, 0x10ac, "FSC AMILO Xi 1526", ALC880_FIXUP_F1734),
1571 SND_PCI_QUIRK(0x1734, 0x10b0, "FSC Amilo Pi1556", ALC880_FIXUP_FUJITSU),
1572 SND_PCI_QUIRK(0x1854, 0x003b, "LG", ALC880_FIXUP_LG),
1573 SND_PCI_QUIRK(0x1854, 0x005f, "LG P1 Express", ALC880_FIXUP_LG),
1574 SND_PCI_QUIRK(0x1854, 0x0068, "LG w1", ALC880_FIXUP_LG),
1575 SND_PCI_QUIRK(0x1854, 0x0077, "LG LW25", ALC880_FIXUP_LG_LW25),
1576 SND_PCI_QUIRK(0x19db, 0x4188, "TCL S700", ALC880_FIXUP_TCL_S700),
1578 /* Below is the copied entries from alc880_quirks.c.
1579 * It's not quite sure whether BIOS sets the correct pin-config table
1580 * on these machines, thus they are kept to be compatible with
1581 * the old static quirks. Once when it's confirmed to work without
1582 * these overrides, it'd be better to remove.
1584 SND_PCI_QUIRK(0x1019, 0xa880, "ECS", ALC880_FIXUP_5ST_DIG),
1585 SND_PCI_QUIRK(0x1019, 0xa884, "Acer APFV", ALC880_FIXUP_6ST),
1586 SND_PCI_QUIRK(0x1025, 0x0070, "ULI", ALC880_FIXUP_3ST_DIG),
1587 SND_PCI_QUIRK(0x1025, 0x0077, "ULI", ALC880_FIXUP_6ST_DIG),
1588 SND_PCI_QUIRK(0x1025, 0x0078, "ULI", ALC880_FIXUP_6ST_DIG),
1589 SND_PCI_QUIRK(0x1025, 0x0087, "ULI", ALC880_FIXUP_6ST_DIG),
1590 SND_PCI_QUIRK(0x1025, 0xe309, "ULI", ALC880_FIXUP_3ST_DIG),
1591 SND_PCI_QUIRK(0x1025, 0xe310, "ULI", ALC880_FIXUP_3ST),
1592 SND_PCI_QUIRK(0x1039, 0x1234, NULL, ALC880_FIXUP_6ST_DIG),
1593 SND_PCI_QUIRK(0x104d, 0x81a0, "Sony", ALC880_FIXUP_3ST),
1594 SND_PCI_QUIRK(0x104d, 0x81d6, "Sony", ALC880_FIXUP_3ST),
1595 SND_PCI_QUIRK(0x107b, 0x3032, "Gateway", ALC880_FIXUP_5ST),
1596 SND_PCI_QUIRK(0x107b, 0x3033, "Gateway", ALC880_FIXUP_5ST),
1597 SND_PCI_QUIRK(0x107b, 0x4039, "Gateway", ALC880_FIXUP_5ST),
1598 SND_PCI_QUIRK(0x1297, 0xc790, "Shuttle ST20G5", ALC880_FIXUP_6ST_DIG),
1599 SND_PCI_QUIRK(0x1458, 0xa102, "Gigabyte K8", ALC880_FIXUP_6ST_DIG),
1600 SND_PCI_QUIRK(0x1462, 0x1150, "MSI", ALC880_FIXUP_6ST_DIG),
1601 SND_PCI_QUIRK(0x1509, 0x925d, "FIC P4M", ALC880_FIXUP_6ST_DIG),
1602 SND_PCI_QUIRK(0x1565, 0x8202, "Biostar", ALC880_FIXUP_5ST_DIG),
1603 SND_PCI_QUIRK(0x1695, 0x400d, "EPoX", ALC880_FIXUP_5ST_DIG),
1604 SND_PCI_QUIRK(0x1695, 0x4012, "EPox EP-5LDA", ALC880_FIXUP_5ST_DIG),
1605 SND_PCI_QUIRK(0x2668, 0x8086, NULL, ALC880_FIXUP_6ST_DIG), /* broken BIOS */
1606 SND_PCI_QUIRK(0x8086, 0x2668, NULL, ALC880_FIXUP_6ST_DIG),
1607 SND_PCI_QUIRK(0x8086, 0xa100, "Intel mobo", ALC880_FIXUP_5ST_DIG),
1608 SND_PCI_QUIRK(0x8086, 0xd400, "Intel mobo", ALC880_FIXUP_5ST_DIG),
1609 SND_PCI_QUIRK(0x8086, 0xd401, "Intel mobo", ALC880_FIXUP_5ST_DIG),
1610 SND_PCI_QUIRK(0x8086, 0xd402, "Intel mobo", ALC880_FIXUP_3ST_DIG),
1611 SND_PCI_QUIRK(0x8086, 0xe224, "Intel mobo", ALC880_FIXUP_5ST_DIG),
1612 SND_PCI_QUIRK(0x8086, 0xe305, "Intel mobo", ALC880_FIXUP_3ST_DIG),
1613 SND_PCI_QUIRK(0x8086, 0xe308, "Intel mobo", ALC880_FIXUP_3ST_DIG),
1614 SND_PCI_QUIRK(0x8086, 0xe400, "Intel mobo", ALC880_FIXUP_5ST_DIG),
1615 SND_PCI_QUIRK(0x8086, 0xe401, "Intel mobo", ALC880_FIXUP_5ST_DIG),
1616 SND_PCI_QUIRK(0x8086, 0xe402, "Intel mobo", ALC880_FIXUP_5ST_DIG),
1618 SND_PCI_QUIRK_VENDOR(0x8086, "Intel mobo", ALC880_FIXUP_3ST),
1619 SND_PCI_QUIRK(0xa0a0, 0x0560, "AOpen i915GMm-HFS", ALC880_FIXUP_5ST_DIG),
1620 SND_PCI_QUIRK(0xe803, 0x1019, NULL, ALC880_FIXUP_6ST_DIG),
1624 static const struct hda_model_fixup alc880_fixup_models[] = {
1625 {.id = ALC880_FIXUP_3ST, .name = "3stack"},
1626 {.id = ALC880_FIXUP_3ST_DIG, .name = "3stack-digout"},
1627 {.id = ALC880_FIXUP_5ST, .name = "5stack"},
1628 {.id = ALC880_FIXUP_5ST_DIG, .name = "5stack-digout"},
1629 {.id = ALC880_FIXUP_6ST, .name = "6stack"},
1630 {.id = ALC880_FIXUP_6ST_DIG, .name = "6stack-digout"},
1631 {.id = ALC880_FIXUP_6ST_AUTOMUTE, .name = "6stack-automute"},
1637 * OK, here we have finally the patch for ALC880
1639 static int patch_alc880(struct hda_codec *codec)
1641 struct alc_spec *spec;
1644 err = alc_alloc_spec(codec, 0x0b);
1649 spec->gen.need_dac_fix = 1;
1650 spec->gen.beep_nid = 0x01;
1652 codec->patch_ops.unsol_event = alc880_unsol_event;
1654 alc_pre_init(codec);
1656 snd_hda_pick_fixup(codec, alc880_fixup_models, alc880_fixup_tbl,
1658 snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PRE_PROBE);
1660 /* automatic parse from the BIOS config */
1661 err = alc880_parse_auto_config(codec);
1665 if (!spec->gen.no_analog) {
1666 err = set_beep_amp(spec, 0x0b, 0x05, HDA_INPUT);
1671 snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PROBE);
1684 static int alc260_parse_auto_config(struct hda_codec *codec)
1686 static const hda_nid_t alc260_ignore[] = { 0x17, 0 };
1687 static const hda_nid_t alc260_ssids[] = { 0x10, 0x15, 0x0f, 0 };
1688 return alc_parse_auto_config(codec, alc260_ignore, alc260_ssids);
1695 ALC260_FIXUP_HP_DC5750,
1696 ALC260_FIXUP_HP_PIN_0F,
1699 ALC260_FIXUP_GPIO1_TOGGLE,
1700 ALC260_FIXUP_REPLACER,
1701 ALC260_FIXUP_HP_B1900,
1703 ALC260_FIXUP_FSC_S7020,
1704 ALC260_FIXUP_FSC_S7020_JWSE,
1705 ALC260_FIXUP_VAIO_PINS,
1708 static void alc260_gpio1_automute(struct hda_codec *codec)
1710 struct alc_spec *spec = codec->spec;
1712 alc_update_gpio_data(codec, 0x01, spec->gen.hp_jack_present);
1715 static void alc260_fixup_gpio1_toggle(struct hda_codec *codec,
1716 const struct hda_fixup *fix, int action)
1718 struct alc_spec *spec = codec->spec;
1719 if (action == HDA_FIXUP_ACT_PROBE) {
1720 /* although the machine has only one output pin, we need to
1721 * toggle GPIO1 according to the jack state
1723 spec->gen.automute_hook = alc260_gpio1_automute;
1724 spec->gen.detect_hp = 1;
1725 spec->gen.automute_speaker = 1;
1726 spec->gen.autocfg.hp_pins[0] = 0x0f; /* copy it for automute */
1727 snd_hda_jack_detect_enable_callback(codec, 0x0f,
1728 snd_hda_gen_hp_automute);
1729 alc_setup_gpio(codec, 0x01);
1733 static void alc260_fixup_kn1(struct hda_codec *codec,
1734 const struct hda_fixup *fix, int action)
1736 struct alc_spec *spec = codec->spec;
1737 static const struct hda_pintbl pincfgs[] = {
1738 { 0x0f, 0x02214000 }, /* HP/speaker */
1739 { 0x12, 0x90a60160 }, /* int mic */
1740 { 0x13, 0x02a19000 }, /* ext mic */
1741 { 0x18, 0x01446000 }, /* SPDIF out */
1742 /* disable bogus I/O pins */
1743 { 0x10, 0x411111f0 },
1744 { 0x11, 0x411111f0 },
1745 { 0x14, 0x411111f0 },
1746 { 0x15, 0x411111f0 },
1747 { 0x16, 0x411111f0 },
1748 { 0x17, 0x411111f0 },
1749 { 0x19, 0x411111f0 },
1754 case HDA_FIXUP_ACT_PRE_PROBE:
1755 snd_hda_apply_pincfgs(codec, pincfgs);
1756 spec->init_amp = ALC_INIT_NONE;
1761 static void alc260_fixup_fsc_s7020(struct hda_codec *codec,
1762 const struct hda_fixup *fix, int action)
1764 struct alc_spec *spec = codec->spec;
1765 if (action == HDA_FIXUP_ACT_PRE_PROBE)
1766 spec->init_amp = ALC_INIT_NONE;
1769 static void alc260_fixup_fsc_s7020_jwse(struct hda_codec *codec,
1770 const struct hda_fixup *fix, int action)
1772 struct alc_spec *spec = codec->spec;
1773 if (action == HDA_FIXUP_ACT_PRE_PROBE) {
1774 spec->gen.add_jack_modes = 1;
1775 spec->gen.hp_mic = 1;
1779 static const struct hda_fixup alc260_fixups[] = {
1780 [ALC260_FIXUP_HP_DC5750] = {
1781 .type = HDA_FIXUP_PINS,
1782 .v.pins = (const struct hda_pintbl[]) {
1783 { 0x11, 0x90130110 }, /* speaker */
1787 [ALC260_FIXUP_HP_PIN_0F] = {
1788 .type = HDA_FIXUP_PINS,
1789 .v.pins = (const struct hda_pintbl[]) {
1790 { 0x0f, 0x01214000 }, /* HP */
1794 [ALC260_FIXUP_COEF] = {
1795 .type = HDA_FIXUP_VERBS,
1796 .v.verbs = (const struct hda_verb[]) {
1797 { 0x1a, AC_VERB_SET_COEF_INDEX, 0x07 },
1798 { 0x1a, AC_VERB_SET_PROC_COEF, 0x3040 },
1802 [ALC260_FIXUP_GPIO1] = {
1803 .type = HDA_FIXUP_FUNC,
1804 .v.func = alc_fixup_gpio1,
1806 [ALC260_FIXUP_GPIO1_TOGGLE] = {
1807 .type = HDA_FIXUP_FUNC,
1808 .v.func = alc260_fixup_gpio1_toggle,
1810 .chain_id = ALC260_FIXUP_HP_PIN_0F,
1812 [ALC260_FIXUP_REPLACER] = {
1813 .type = HDA_FIXUP_VERBS,
1814 .v.verbs = (const struct hda_verb[]) {
1815 { 0x1a, AC_VERB_SET_COEF_INDEX, 0x07 },
1816 { 0x1a, AC_VERB_SET_PROC_COEF, 0x3050 },
1820 .chain_id = ALC260_FIXUP_GPIO1_TOGGLE,
1822 [ALC260_FIXUP_HP_B1900] = {
1823 .type = HDA_FIXUP_FUNC,
1824 .v.func = alc260_fixup_gpio1_toggle,
1826 .chain_id = ALC260_FIXUP_COEF,
1828 [ALC260_FIXUP_KN1] = {
1829 .type = HDA_FIXUP_FUNC,
1830 .v.func = alc260_fixup_kn1,
1832 [ALC260_FIXUP_FSC_S7020] = {
1833 .type = HDA_FIXUP_FUNC,
1834 .v.func = alc260_fixup_fsc_s7020,
1836 [ALC260_FIXUP_FSC_S7020_JWSE] = {
1837 .type = HDA_FIXUP_FUNC,
1838 .v.func = alc260_fixup_fsc_s7020_jwse,
1840 .chain_id = ALC260_FIXUP_FSC_S7020,
1842 [ALC260_FIXUP_VAIO_PINS] = {
1843 .type = HDA_FIXUP_PINS,
1844 .v.pins = (const struct hda_pintbl[]) {
1845 /* Pin configs are missing completely on some VAIOs */
1846 { 0x0f, 0x01211020 },
1847 { 0x10, 0x0001003f },
1848 { 0x11, 0x411111f0 },
1849 { 0x12, 0x01a15930 },
1850 { 0x13, 0x411111f0 },
1851 { 0x14, 0x411111f0 },
1852 { 0x15, 0x411111f0 },
1853 { 0x16, 0x411111f0 },
1854 { 0x17, 0x411111f0 },
1855 { 0x18, 0x411111f0 },
1856 { 0x19, 0x411111f0 },
1862 static const struct snd_pci_quirk alc260_fixup_tbl[] = {
1863 SND_PCI_QUIRK(0x1025, 0x007b, "Acer C20x", ALC260_FIXUP_GPIO1),
1864 SND_PCI_QUIRK(0x1025, 0x007f, "Acer Aspire 9500", ALC260_FIXUP_COEF),
1865 SND_PCI_QUIRK(0x1025, 0x008f, "Acer", ALC260_FIXUP_GPIO1),
1866 SND_PCI_QUIRK(0x103c, 0x280a, "HP dc5750", ALC260_FIXUP_HP_DC5750),
1867 SND_PCI_QUIRK(0x103c, 0x30ba, "HP Presario B1900", ALC260_FIXUP_HP_B1900),
1868 SND_PCI_QUIRK(0x104d, 0x81bb, "Sony VAIO", ALC260_FIXUP_VAIO_PINS),
1869 SND_PCI_QUIRK(0x104d, 0x81e2, "Sony VAIO TX", ALC260_FIXUP_HP_PIN_0F),
1870 SND_PCI_QUIRK(0x10cf, 0x1326, "FSC LifeBook S7020", ALC260_FIXUP_FSC_S7020),
1871 SND_PCI_QUIRK(0x1509, 0x4540, "Favorit 100XS", ALC260_FIXUP_GPIO1),
1872 SND_PCI_QUIRK(0x152d, 0x0729, "Quanta KN1", ALC260_FIXUP_KN1),
1873 SND_PCI_QUIRK(0x161f, 0x2057, "Replacer 672V", ALC260_FIXUP_REPLACER),
1874 SND_PCI_QUIRK(0x1631, 0xc017, "PB V7900", ALC260_FIXUP_COEF),
1878 static const struct hda_model_fixup alc260_fixup_models[] = {
1879 {.id = ALC260_FIXUP_GPIO1, .name = "gpio1"},
1880 {.id = ALC260_FIXUP_COEF, .name = "coef"},
1881 {.id = ALC260_FIXUP_FSC_S7020, .name = "fujitsu"},
1882 {.id = ALC260_FIXUP_FSC_S7020_JWSE, .name = "fujitsu-jwse"},
1888 static int patch_alc260(struct hda_codec *codec)
1890 struct alc_spec *spec;
1893 err = alc_alloc_spec(codec, 0x07);
1898 /* as quite a few machines require HP amp for speaker outputs,
1899 * it's easier to enable it unconditionally; even if it's unneeded,
1900 * it's almost harmless.
1902 spec->gen.prefer_hp_amp = 1;
1903 spec->gen.beep_nid = 0x01;
1905 spec->shutup = alc_eapd_shutup;
1907 alc_pre_init(codec);
1909 snd_hda_pick_fixup(codec, alc260_fixup_models, alc260_fixup_tbl,
1911 snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PRE_PROBE);
1913 /* automatic parse from the BIOS config */
1914 err = alc260_parse_auto_config(codec);
1918 if (!spec->gen.no_analog) {
1919 err = set_beep_amp(spec, 0x07, 0x05, HDA_INPUT);
1924 snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PROBE);
1935 * ALC882/883/885/888/889 support
1937 * ALC882 is almost identical with ALC880 but has cleaner and more flexible
1938 * configuration. Each pin widget can choose any input DACs and a mixer.
1939 * Each ADC is connected from a mixer of all inputs. This makes possible
1940 * 6-channel independent captures.
1942 * In addition, an independent DAC for the multi-playback (not used in this
1950 ALC882_FIXUP_ABIT_AW9D_MAX,
1951 ALC882_FIXUP_LENOVO_Y530,
1952 ALC882_FIXUP_PB_M5210,
1953 ALC882_FIXUP_ACER_ASPIRE_7736,
1954 ALC882_FIXUP_ASUS_W90V,
1956 ALC889_FIXUP_FRONT_HP_NO_PRESENCE,
1957 ALC889_FIXUP_VAIO_TT,
1958 ALC888_FIXUP_EEE1601,
1962 ALC883_FIXUP_ACER_EAPD,
1967 ALC882_FIXUP_ASUS_W2JC,
1968 ALC882_FIXUP_ACER_ASPIRE_4930G,
1969 ALC882_FIXUP_ACER_ASPIRE_8930G,
1970 ALC882_FIXUP_ASPIRE_8930G_VERBS,
1971 ALC885_FIXUP_MACPRO_GPIO,
1972 ALC889_FIXUP_DAC_ROUTE,
1973 ALC889_FIXUP_MBP_VREF,
1974 ALC889_FIXUP_IMAC91_VREF,
1975 ALC889_FIXUP_MBA11_VREF,
1976 ALC889_FIXUP_MBA21_VREF,
1977 ALC889_FIXUP_MP11_VREF,
1978 ALC889_FIXUP_MP41_VREF,
1979 ALC882_FIXUP_INV_DMIC,
1980 ALC882_FIXUP_NO_PRIMARY_HP,
1981 ALC887_FIXUP_ASUS_BASS,
1982 ALC887_FIXUP_BASS_CHMAP,
1983 ALC1220_FIXUP_GB_DUAL_CODECS,
1984 ALC1220_FIXUP_GB_X570,
1985 ALC1220_FIXUP_CLEVO_P950,
1986 ALC1220_FIXUP_CLEVO_PB51ED,
1987 ALC1220_FIXUP_CLEVO_PB51ED_PINS,
1988 ALC887_FIXUP_ASUS_AUDIO,
1989 ALC887_FIXUP_ASUS_HMIC,
1990 ALCS1200A_FIXUP_MIC_VREF,
1991 ALC888VD_FIXUP_MIC_100VREF,
1994 static void alc889_fixup_coef(struct hda_codec *codec,
1995 const struct hda_fixup *fix, int action)
1997 if (action != HDA_FIXUP_ACT_INIT)
1999 alc_update_coef_idx(codec, 7, 0, 0x2030);
2002 /* set up GPIO at initialization */
2003 static void alc885_fixup_macpro_gpio(struct hda_codec *codec,
2004 const struct hda_fixup *fix, int action)
2006 struct alc_spec *spec = codec->spec;
2008 spec->gpio_write_delay = true;
2009 alc_fixup_gpio3(codec, fix, action);
2012 /* Fix the connection of some pins for ALC889:
2013 * At least, Acer Aspire 5935 shows the connections to DAC3/4 don't
2014 * work correctly (bko#42740)
2016 static void alc889_fixup_dac_route(struct hda_codec *codec,
2017 const struct hda_fixup *fix, int action)
2019 if (action == HDA_FIXUP_ACT_PRE_PROBE) {
2020 /* fake the connections during parsing the tree */
2021 static const hda_nid_t conn1[] = { 0x0c, 0x0d };
2022 static const hda_nid_t conn2[] = { 0x0e, 0x0f };
2023 snd_hda_override_conn_list(codec, 0x14, ARRAY_SIZE(conn1), conn1);
2024 snd_hda_override_conn_list(codec, 0x15, ARRAY_SIZE(conn1), conn1);
2025 snd_hda_override_conn_list(codec, 0x18, ARRAY_SIZE(conn2), conn2);
2026 snd_hda_override_conn_list(codec, 0x1a, ARRAY_SIZE(conn2), conn2);
2027 } else if (action == HDA_FIXUP_ACT_PROBE) {
2028 /* restore the connections */
2029 static const hda_nid_t conn[] = { 0x0c, 0x0d, 0x0e, 0x0f, 0x26 };
2030 snd_hda_override_conn_list(codec, 0x14, ARRAY_SIZE(conn), conn);
2031 snd_hda_override_conn_list(codec, 0x15, ARRAY_SIZE(conn), conn);
2032 snd_hda_override_conn_list(codec, 0x18, ARRAY_SIZE(conn), conn);
2033 snd_hda_override_conn_list(codec, 0x1a, ARRAY_SIZE(conn), conn);
2037 /* Set VREF on HP pin */
2038 static void alc889_fixup_mbp_vref(struct hda_codec *codec,
2039 const struct hda_fixup *fix, int action)
2041 static const hda_nid_t nids[] = { 0x14, 0x15, 0x19 };
2042 struct alc_spec *spec = codec->spec;
2045 if (action != HDA_FIXUP_ACT_INIT)
2047 for (i = 0; i < ARRAY_SIZE(nids); i++) {
2048 unsigned int val = snd_hda_codec_get_pincfg(codec, nids[i]);
2049 if (get_defcfg_device(val) != AC_JACK_HP_OUT)
2051 val = snd_hda_codec_get_pin_target(codec, nids[i]);
2052 val |= AC_PINCTL_VREF_80;
2053 snd_hda_set_pin_ctl(codec, nids[i], val);
2054 spec->gen.keep_vref_in_automute = 1;
2059 static void alc889_fixup_mac_pins(struct hda_codec *codec,
2060 const hda_nid_t *nids, int num_nids)
2062 struct alc_spec *spec = codec->spec;
2065 for (i = 0; i < num_nids; i++) {
2067 val = snd_hda_codec_get_pin_target(codec, nids[i]);
2068 val |= AC_PINCTL_VREF_50;
2069 snd_hda_set_pin_ctl(codec, nids[i], val);
2071 spec->gen.keep_vref_in_automute = 1;
2074 /* Set VREF on speaker pins on imac91 */
2075 static void alc889_fixup_imac91_vref(struct hda_codec *codec,
2076 const struct hda_fixup *fix, int action)
2078 static const hda_nid_t nids[] = { 0x18, 0x1a };
2080 if (action == HDA_FIXUP_ACT_INIT)
2081 alc889_fixup_mac_pins(codec, nids, ARRAY_SIZE(nids));
2084 /* Set VREF on speaker pins on mba11 */
2085 static void alc889_fixup_mba11_vref(struct hda_codec *codec,
2086 const struct hda_fixup *fix, int action)
2088 static const hda_nid_t nids[] = { 0x18 };
2090 if (action == HDA_FIXUP_ACT_INIT)
2091 alc889_fixup_mac_pins(codec, nids, ARRAY_SIZE(nids));
2094 /* Set VREF on speaker pins on mba21 */
2095 static void alc889_fixup_mba21_vref(struct hda_codec *codec,
2096 const struct hda_fixup *fix, int action)
2098 static const hda_nid_t nids[] = { 0x18, 0x19 };
2100 if (action == HDA_FIXUP_ACT_INIT)
2101 alc889_fixup_mac_pins(codec, nids, ARRAY_SIZE(nids));
2104 /* Don't take HP output as primary
2105 * Strangely, the speaker output doesn't work on Vaio Z and some Vaio
2106 * all-in-one desktop PCs (for example VGC-LN51JGB) through DAC 0x05
2108 static void alc882_fixup_no_primary_hp(struct hda_codec *codec,
2109 const struct hda_fixup *fix, int action)
2111 struct alc_spec *spec = codec->spec;
2112 if (action == HDA_FIXUP_ACT_PRE_PROBE) {
2113 spec->gen.no_primary_hp = 1;
2114 spec->gen.no_multi_io = 1;
2118 static void alc_fixup_bass_chmap(struct hda_codec *codec,
2119 const struct hda_fixup *fix, int action);
2121 /* For dual-codec configuration, we need to disable some features to avoid
2122 * conflicts of kctls and PCM streams
2124 static void alc_fixup_dual_codecs(struct hda_codec *codec,
2125 const struct hda_fixup *fix, int action)
2127 struct alc_spec *spec = codec->spec;
2129 if (action != HDA_FIXUP_ACT_PRE_PROBE)
2131 /* disable vmaster */
2132 spec->gen.suppress_vmaster = 1;
2133 /* auto-mute and auto-mic switch don't work with multiple codecs */
2134 spec->gen.suppress_auto_mute = 1;
2135 spec->gen.suppress_auto_mic = 1;
2136 /* disable aamix as well */
2137 spec->gen.mixer_nid = 0;
2138 /* add location prefix to avoid conflicts */
2139 codec->force_pin_prefix = 1;
2142 static void rename_ctl(struct hda_codec *codec, const char *oldname,
2143 const char *newname)
2145 struct snd_kcontrol *kctl;
2147 kctl = snd_hda_find_mixer_ctl(codec, oldname);
2149 snd_ctl_rename(codec->card, kctl, newname);
2152 static void alc1220_fixup_gb_dual_codecs(struct hda_codec *codec,
2153 const struct hda_fixup *fix,
2156 alc_fixup_dual_codecs(codec, fix, action);
2158 case HDA_FIXUP_ACT_PRE_PROBE:
2159 /* override card longname to provide a unique UCM profile */
2160 strcpy(codec->card->longname, "HDAudio-Gigabyte-ALC1220DualCodecs");
2162 case HDA_FIXUP_ACT_BUILD:
2163 /* rename Capture controls depending on the codec */
2164 rename_ctl(codec, "Capture Volume",
2166 "Rear-Panel Capture Volume" :
2167 "Front-Panel Capture Volume");
2168 rename_ctl(codec, "Capture Switch",
2170 "Rear-Panel Capture Switch" :
2171 "Front-Panel Capture Switch");
2176 static void alc1220_fixup_gb_x570(struct hda_codec *codec,
2177 const struct hda_fixup *fix,
2180 static const hda_nid_t conn1[] = { 0x0c };
2181 static const struct coef_fw gb_x570_coefs[] = {
2182 WRITE_COEF(0x07, 0x03c0),
2183 WRITE_COEF(0x1a, 0x01c1),
2184 WRITE_COEF(0x1b, 0x0202),
2185 WRITE_COEF(0x43, 0x3005),
2190 case HDA_FIXUP_ACT_PRE_PROBE:
2191 snd_hda_override_conn_list(codec, 0x14, ARRAY_SIZE(conn1), conn1);
2192 snd_hda_override_conn_list(codec, 0x1b, ARRAY_SIZE(conn1), conn1);
2194 case HDA_FIXUP_ACT_INIT:
2195 alc_process_coef_fw(codec, gb_x570_coefs);
2200 static void alc1220_fixup_clevo_p950(struct hda_codec *codec,
2201 const struct hda_fixup *fix,
2204 static const hda_nid_t conn1[] = { 0x0c };
2206 if (action != HDA_FIXUP_ACT_PRE_PROBE)
2209 alc_update_coef_idx(codec, 0x7, 0, 0x3c3);
2210 /* We therefore want to make sure 0x14 (front headphone) and
2211 * 0x1b (speakers) use the stereo DAC 0x02
2213 snd_hda_override_conn_list(codec, 0x14, ARRAY_SIZE(conn1), conn1);
2214 snd_hda_override_conn_list(codec, 0x1b, ARRAY_SIZE(conn1), conn1);
2217 static void alc_fixup_headset_mode_no_hp_mic(struct hda_codec *codec,
2218 const struct hda_fixup *fix, int action);
2220 static void alc1220_fixup_clevo_pb51ed(struct hda_codec *codec,
2221 const struct hda_fixup *fix,
2224 alc1220_fixup_clevo_p950(codec, fix, action);
2225 alc_fixup_headset_mode_no_hp_mic(codec, fix, action);
2228 static void alc887_asus_hp_automute_hook(struct hda_codec *codec,
2229 struct hda_jack_callback *jack)
2231 struct alc_spec *spec = codec->spec;
2234 snd_hda_gen_hp_automute(codec, jack);
2236 if (spec->gen.hp_jack_present)
2237 vref = AC_PINCTL_VREF_80;
2239 vref = AC_PINCTL_VREF_HIZ;
2240 snd_hda_set_pin_ctl(codec, 0x19, PIN_HP | vref);
2243 static void alc887_fixup_asus_jack(struct hda_codec *codec,
2244 const struct hda_fixup *fix, int action)
2246 struct alc_spec *spec = codec->spec;
2247 if (action != HDA_FIXUP_ACT_PROBE)
2249 snd_hda_set_pin_ctl_cache(codec, 0x1b, PIN_HP);
2250 spec->gen.hp_automute_hook = alc887_asus_hp_automute_hook;
2253 static const struct hda_fixup alc882_fixups[] = {
2254 [ALC882_FIXUP_ABIT_AW9D_MAX] = {
2255 .type = HDA_FIXUP_PINS,
2256 .v.pins = (const struct hda_pintbl[]) {
2257 { 0x15, 0x01080104 }, /* side */
2258 { 0x16, 0x01011012 }, /* rear */
2259 { 0x17, 0x01016011 }, /* clfe */
2263 [ALC882_FIXUP_LENOVO_Y530] = {
2264 .type = HDA_FIXUP_PINS,
2265 .v.pins = (const struct hda_pintbl[]) {
2266 { 0x15, 0x99130112 }, /* rear int speakers */
2267 { 0x16, 0x99130111 }, /* subwoofer */
2271 [ALC882_FIXUP_PB_M5210] = {
2272 .type = HDA_FIXUP_PINCTLS,
2273 .v.pins = (const struct hda_pintbl[]) {
2274 { 0x19, PIN_VREF50 },
2278 [ALC882_FIXUP_ACER_ASPIRE_7736] = {
2279 .type = HDA_FIXUP_FUNC,
2280 .v.func = alc_fixup_sku_ignore,
2282 [ALC882_FIXUP_ASUS_W90V] = {
2283 .type = HDA_FIXUP_PINS,
2284 .v.pins = (const struct hda_pintbl[]) {
2285 { 0x16, 0x99130110 }, /* fix sequence for CLFE */
2289 [ALC889_FIXUP_CD] = {
2290 .type = HDA_FIXUP_PINS,
2291 .v.pins = (const struct hda_pintbl[]) {
2292 { 0x1c, 0x993301f0 }, /* CD */
2296 [ALC889_FIXUP_FRONT_HP_NO_PRESENCE] = {
2297 .type = HDA_FIXUP_PINS,
2298 .v.pins = (const struct hda_pintbl[]) {
2299 { 0x1b, 0x02214120 }, /* Front HP jack is flaky, disable jack detect */
2303 .chain_id = ALC889_FIXUP_CD,
2305 [ALC889_FIXUP_VAIO_TT] = {
2306 .type = HDA_FIXUP_PINS,
2307 .v.pins = (const struct hda_pintbl[]) {
2308 { 0x17, 0x90170111 }, /* hidden surround speaker */
2312 [ALC888_FIXUP_EEE1601] = {
2313 .type = HDA_FIXUP_VERBS,
2314 .v.verbs = (const struct hda_verb[]) {
2315 { 0x20, AC_VERB_SET_COEF_INDEX, 0x0b },
2316 { 0x20, AC_VERB_SET_PROC_COEF, 0x0838 },
2320 [ALC886_FIXUP_EAPD] = {
2321 .type = HDA_FIXUP_VERBS,
2322 .v.verbs = (const struct hda_verb[]) {
2323 /* change to EAPD mode */
2324 { 0x20, AC_VERB_SET_COEF_INDEX, 0x07 },
2325 { 0x20, AC_VERB_SET_PROC_COEF, 0x0068 },
2329 [ALC882_FIXUP_EAPD] = {
2330 .type = HDA_FIXUP_VERBS,
2331 .v.verbs = (const struct hda_verb[]) {
2332 /* change to EAPD mode */
2333 { 0x20, AC_VERB_SET_COEF_INDEX, 0x07 },
2334 { 0x20, AC_VERB_SET_PROC_COEF, 0x3060 },
2338 [ALC883_FIXUP_EAPD] = {
2339 .type = HDA_FIXUP_VERBS,
2340 .v.verbs = (const struct hda_verb[]) {
2341 /* change to EAPD mode */
2342 { 0x20, AC_VERB_SET_COEF_INDEX, 0x07 },
2343 { 0x20, AC_VERB_SET_PROC_COEF, 0x3070 },
2347 [ALC883_FIXUP_ACER_EAPD] = {
2348 .type = HDA_FIXUP_VERBS,
2349 .v.verbs = (const struct hda_verb[]) {
2350 /* eanable EAPD on Acer laptops */
2351 { 0x20, AC_VERB_SET_COEF_INDEX, 0x07 },
2352 { 0x20, AC_VERB_SET_PROC_COEF, 0x3050 },
2356 [ALC882_FIXUP_GPIO1] = {
2357 .type = HDA_FIXUP_FUNC,
2358 .v.func = alc_fixup_gpio1,
2360 [ALC882_FIXUP_GPIO2] = {
2361 .type = HDA_FIXUP_FUNC,
2362 .v.func = alc_fixup_gpio2,
2364 [ALC882_FIXUP_GPIO3] = {
2365 .type = HDA_FIXUP_FUNC,
2366 .v.func = alc_fixup_gpio3,
2368 [ALC882_FIXUP_ASUS_W2JC] = {
2369 .type = HDA_FIXUP_FUNC,
2370 .v.func = alc_fixup_gpio1,
2372 .chain_id = ALC882_FIXUP_EAPD,
2374 [ALC889_FIXUP_COEF] = {
2375 .type = HDA_FIXUP_FUNC,
2376 .v.func = alc889_fixup_coef,
2378 [ALC882_FIXUP_ACER_ASPIRE_4930G] = {
2379 .type = HDA_FIXUP_PINS,
2380 .v.pins = (const struct hda_pintbl[]) {
2381 { 0x16, 0x99130111 }, /* CLFE speaker */
2382 { 0x17, 0x99130112 }, /* surround speaker */
2386 .chain_id = ALC882_FIXUP_GPIO1,
2388 [ALC882_FIXUP_ACER_ASPIRE_8930G] = {
2389 .type = HDA_FIXUP_PINS,
2390 .v.pins = (const struct hda_pintbl[]) {
2391 { 0x16, 0x99130111 }, /* CLFE speaker */
2392 { 0x1b, 0x99130112 }, /* surround speaker */
2396 .chain_id = ALC882_FIXUP_ASPIRE_8930G_VERBS,
2398 [ALC882_FIXUP_ASPIRE_8930G_VERBS] = {
2399 /* additional init verbs for Acer Aspire 8930G */
2400 .type = HDA_FIXUP_VERBS,
2401 .v.verbs = (const struct hda_verb[]) {
2402 /* Enable all DACs */
2403 /* DAC DISABLE/MUTE 1? */
2404 /* setting bits 1-5 disables DAC nids 0x02-0x06
2405 * apparently. Init=0x38 */
2406 { 0x20, AC_VERB_SET_COEF_INDEX, 0x03 },
2407 { 0x20, AC_VERB_SET_PROC_COEF, 0x0000 },
2408 /* DAC DISABLE/MUTE 2? */
2409 /* some bit here disables the other DACs.
2411 { 0x20, AC_VERB_SET_COEF_INDEX, 0x08 },
2412 { 0x20, AC_VERB_SET_PROC_COEF, 0x0000 },
2414 * This laptop has a stereo digital microphone.
2415 * The mics are only 1cm apart which makes the stereo
2416 * useless. However, either the mic or the ALC889
2417 * makes the signal become a difference/sum signal
2418 * instead of standard stereo, which is annoying.
2419 * So instead we flip this bit which makes the
2420 * codec replicate the sum signal to both channels,
2421 * turning it into a normal mono mic.
2423 /* DMIC_CONTROL? Init value = 0x0001 */
2424 { 0x20, AC_VERB_SET_COEF_INDEX, 0x0b },
2425 { 0x20, AC_VERB_SET_PROC_COEF, 0x0003 },
2426 { 0x20, AC_VERB_SET_COEF_INDEX, 0x07 },
2427 { 0x20, AC_VERB_SET_PROC_COEF, 0x3050 },
2431 .chain_id = ALC882_FIXUP_GPIO1,
2433 [ALC885_FIXUP_MACPRO_GPIO] = {
2434 .type = HDA_FIXUP_FUNC,
2435 .v.func = alc885_fixup_macpro_gpio,
2437 [ALC889_FIXUP_DAC_ROUTE] = {
2438 .type = HDA_FIXUP_FUNC,
2439 .v.func = alc889_fixup_dac_route,
2441 [ALC889_FIXUP_MBP_VREF] = {
2442 .type = HDA_FIXUP_FUNC,
2443 .v.func = alc889_fixup_mbp_vref,
2445 .chain_id = ALC882_FIXUP_GPIO1,
2447 [ALC889_FIXUP_IMAC91_VREF] = {
2448 .type = HDA_FIXUP_FUNC,
2449 .v.func = alc889_fixup_imac91_vref,
2451 .chain_id = ALC882_FIXUP_GPIO1,
2453 [ALC889_FIXUP_MBA11_VREF] = {
2454 .type = HDA_FIXUP_FUNC,
2455 .v.func = alc889_fixup_mba11_vref,
2457 .chain_id = ALC889_FIXUP_MBP_VREF,
2459 [ALC889_FIXUP_MBA21_VREF] = {
2460 .type = HDA_FIXUP_FUNC,
2461 .v.func = alc889_fixup_mba21_vref,
2463 .chain_id = ALC889_FIXUP_MBP_VREF,
2465 [ALC889_FIXUP_MP11_VREF] = {
2466 .type = HDA_FIXUP_FUNC,
2467 .v.func = alc889_fixup_mba11_vref,
2469 .chain_id = ALC885_FIXUP_MACPRO_GPIO,
2471 [ALC889_FIXUP_MP41_VREF] = {
2472 .type = HDA_FIXUP_FUNC,
2473 .v.func = alc889_fixup_mbp_vref,
2475 .chain_id = ALC885_FIXUP_MACPRO_GPIO,
2477 [ALC882_FIXUP_INV_DMIC] = {
2478 .type = HDA_FIXUP_FUNC,
2479 .v.func = alc_fixup_inv_dmic,
2481 [ALC882_FIXUP_NO_PRIMARY_HP] = {
2482 .type = HDA_FIXUP_FUNC,
2483 .v.func = alc882_fixup_no_primary_hp,
2485 [ALC887_FIXUP_ASUS_BASS] = {
2486 .type = HDA_FIXUP_PINS,
2487 .v.pins = (const struct hda_pintbl[]) {
2488 {0x16, 0x99130130}, /* bass speaker */
2492 .chain_id = ALC887_FIXUP_BASS_CHMAP,
2494 [ALC887_FIXUP_BASS_CHMAP] = {
2495 .type = HDA_FIXUP_FUNC,
2496 .v.func = alc_fixup_bass_chmap,
2498 [ALC1220_FIXUP_GB_DUAL_CODECS] = {
2499 .type = HDA_FIXUP_FUNC,
2500 .v.func = alc1220_fixup_gb_dual_codecs,
2502 [ALC1220_FIXUP_GB_X570] = {
2503 .type = HDA_FIXUP_FUNC,
2504 .v.func = alc1220_fixup_gb_x570,
2506 [ALC1220_FIXUP_CLEVO_P950] = {
2507 .type = HDA_FIXUP_FUNC,
2508 .v.func = alc1220_fixup_clevo_p950,
2510 [ALC1220_FIXUP_CLEVO_PB51ED] = {
2511 .type = HDA_FIXUP_FUNC,
2512 .v.func = alc1220_fixup_clevo_pb51ed,
2514 [ALC1220_FIXUP_CLEVO_PB51ED_PINS] = {
2515 .type = HDA_FIXUP_PINS,
2516 .v.pins = (const struct hda_pintbl[]) {
2517 { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */
2521 .chain_id = ALC1220_FIXUP_CLEVO_PB51ED,
2523 [ALC887_FIXUP_ASUS_AUDIO] = {
2524 .type = HDA_FIXUP_PINS,
2525 .v.pins = (const struct hda_pintbl[]) {
2526 { 0x15, 0x02a14150 }, /* use as headset mic, without its own jack detect */
2527 { 0x19, 0x22219420 },
2531 [ALC887_FIXUP_ASUS_HMIC] = {
2532 .type = HDA_FIXUP_FUNC,
2533 .v.func = alc887_fixup_asus_jack,
2535 .chain_id = ALC887_FIXUP_ASUS_AUDIO,
2537 [ALCS1200A_FIXUP_MIC_VREF] = {
2538 .type = HDA_FIXUP_PINCTLS,
2539 .v.pins = (const struct hda_pintbl[]) {
2540 { 0x18, PIN_VREF50 }, /* rear mic */
2541 { 0x19, PIN_VREF50 }, /* front mic */
2545 [ALC888VD_FIXUP_MIC_100VREF] = {
2546 .type = HDA_FIXUP_PINCTLS,
2547 .v.pins = (const struct hda_pintbl[]) {
2548 { 0x18, PIN_VREF100 }, /* headset mic */
2554 static const struct snd_pci_quirk alc882_fixup_tbl[] = {
2555 SND_PCI_QUIRK(0x1025, 0x006c, "Acer Aspire 9810", ALC883_FIXUP_ACER_EAPD),
2556 SND_PCI_QUIRK(0x1025, 0x0090, "Acer Aspire", ALC883_FIXUP_ACER_EAPD),
2557 SND_PCI_QUIRK(0x1025, 0x0107, "Acer Aspire", ALC883_FIXUP_ACER_EAPD),
2558 SND_PCI_QUIRK(0x1025, 0x010a, "Acer Ferrari 5000", ALC883_FIXUP_ACER_EAPD),
2559 SND_PCI_QUIRK(0x1025, 0x0110, "Acer Aspire", ALC883_FIXUP_ACER_EAPD),
2560 SND_PCI_QUIRK(0x1025, 0x0112, "Acer Aspire 9303", ALC883_FIXUP_ACER_EAPD),
2561 SND_PCI_QUIRK(0x1025, 0x0121, "Acer Aspire 5920G", ALC883_FIXUP_ACER_EAPD),
2562 SND_PCI_QUIRK(0x1025, 0x013e, "Acer Aspire 4930G",
2563 ALC882_FIXUP_ACER_ASPIRE_4930G),
2564 SND_PCI_QUIRK(0x1025, 0x013f, "Acer Aspire 5930G",
2565 ALC882_FIXUP_ACER_ASPIRE_4930G),
2566 SND_PCI_QUIRK(0x1025, 0x0145, "Acer Aspire 8930G",
2567 ALC882_FIXUP_ACER_ASPIRE_8930G),
2568 SND_PCI_QUIRK(0x1025, 0x0146, "Acer Aspire 6935G",
2569 ALC882_FIXUP_ACER_ASPIRE_8930G),
2570 SND_PCI_QUIRK(0x1025, 0x0142, "Acer Aspire 7730G",
2571 ALC882_FIXUP_ACER_ASPIRE_4930G),
2572 SND_PCI_QUIRK(0x1025, 0x0155, "Packard-Bell M5120", ALC882_FIXUP_PB_M5210),
2573 SND_PCI_QUIRK(0x1025, 0x015e, "Acer Aspire 6930G",
2574 ALC882_FIXUP_ACER_ASPIRE_4930G),
2575 SND_PCI_QUIRK(0x1025, 0x0166, "Acer Aspire 6530G",
2576 ALC882_FIXUP_ACER_ASPIRE_4930G),
2577 SND_PCI_QUIRK(0x1025, 0x021e, "Acer Aspire 5739G",
2578 ALC882_FIXUP_ACER_ASPIRE_4930G),
2579 SND_PCI_QUIRK(0x1025, 0x0259, "Acer Aspire 5935", ALC889_FIXUP_DAC_ROUTE),
2580 SND_PCI_QUIRK(0x1025, 0x026b, "Acer Aspire 8940G", ALC882_FIXUP_ACER_ASPIRE_8930G),
2581 SND_PCI_QUIRK(0x1025, 0x0296, "Acer Aspire 7736z", ALC882_FIXUP_ACER_ASPIRE_7736),
2582 SND_PCI_QUIRK(0x1043, 0x13c2, "Asus A7M", ALC882_FIXUP_EAPD),
2583 SND_PCI_QUIRK(0x1043, 0x1873, "ASUS W90V", ALC882_FIXUP_ASUS_W90V),
2584 SND_PCI_QUIRK(0x1043, 0x1971, "Asus W2JC", ALC882_FIXUP_ASUS_W2JC),
2585 SND_PCI_QUIRK(0x1043, 0x2390, "Asus D700SA", ALC887_FIXUP_ASUS_HMIC),
2586 SND_PCI_QUIRK(0x1043, 0x835f, "Asus Eee 1601", ALC888_FIXUP_EEE1601),
2587 SND_PCI_QUIRK(0x1043, 0x84bc, "ASUS ET2700", ALC887_FIXUP_ASUS_BASS),
2588 SND_PCI_QUIRK(0x1043, 0x8691, "ASUS ROG Ranger VIII", ALC882_FIXUP_GPIO3),
2589 SND_PCI_QUIRK(0x1043, 0x8797, "ASUS TUF B550M-PLUS", ALCS1200A_FIXUP_MIC_VREF),
2590 SND_PCI_QUIRK(0x104d, 0x9043, "Sony Vaio VGC-LN51JGB", ALC882_FIXUP_NO_PRIMARY_HP),
2591 SND_PCI_QUIRK(0x104d, 0x9044, "Sony VAIO AiO", ALC882_FIXUP_NO_PRIMARY_HP),
2592 SND_PCI_QUIRK(0x104d, 0x9047, "Sony Vaio TT", ALC889_FIXUP_VAIO_TT),
2593 SND_PCI_QUIRK(0x104d, 0x905a, "Sony Vaio Z", ALC882_FIXUP_NO_PRIMARY_HP),
2594 SND_PCI_QUIRK(0x104d, 0x9060, "Sony Vaio VPCL14M1R", ALC882_FIXUP_NO_PRIMARY_HP),
2596 /* All Apple entries are in codec SSIDs */
2597 SND_PCI_QUIRK(0x106b, 0x00a0, "MacBookPro 3,1", ALC889_FIXUP_MBP_VREF),
2598 SND_PCI_QUIRK(0x106b, 0x00a1, "Macbook", ALC889_FIXUP_MBP_VREF),
2599 SND_PCI_QUIRK(0x106b, 0x00a4, "MacbookPro 4,1", ALC889_FIXUP_MBP_VREF),
2600 SND_PCI_QUIRK(0x106b, 0x0c00, "Mac Pro", ALC889_FIXUP_MP11_VREF),
2601 SND_PCI_QUIRK(0x106b, 0x1000, "iMac 24", ALC885_FIXUP_MACPRO_GPIO),
2602 SND_PCI_QUIRK(0x106b, 0x2800, "AppleTV", ALC885_FIXUP_MACPRO_GPIO),
2603 SND_PCI_QUIRK(0x106b, 0x2c00, "MacbookPro rev3", ALC889_FIXUP_MBP_VREF),
2604 SND_PCI_QUIRK(0x106b, 0x3000, "iMac", ALC889_FIXUP_MBP_VREF),
2605 SND_PCI_QUIRK(0x106b, 0x3200, "iMac 7,1 Aluminum", ALC882_FIXUP_EAPD),
2606 SND_PCI_QUIRK(0x106b, 0x3400, "MacBookAir 1,1", ALC889_FIXUP_MBA11_VREF),
2607 SND_PCI_QUIRK(0x106b, 0x3500, "MacBookAir 2,1", ALC889_FIXUP_MBA21_VREF),
2608 SND_PCI_QUIRK(0x106b, 0x3600, "Macbook 3,1", ALC889_FIXUP_MBP_VREF),
2609 SND_PCI_QUIRK(0x106b, 0x3800, "MacbookPro 4,1", ALC889_FIXUP_MBP_VREF),
2610 SND_PCI_QUIRK(0x106b, 0x3e00, "iMac 24 Aluminum", ALC885_FIXUP_MACPRO_GPIO),
2611 SND_PCI_QUIRK(0x106b, 0x3f00, "Macbook 5,1", ALC889_FIXUP_IMAC91_VREF),
2612 SND_PCI_QUIRK(0x106b, 0x4000, "MacbookPro 5,1", ALC889_FIXUP_IMAC91_VREF),
2613 SND_PCI_QUIRK(0x106b, 0x4100, "Macmini 3,1", ALC889_FIXUP_IMAC91_VREF),
2614 SND_PCI_QUIRK(0x106b, 0x4200, "Mac Pro 4,1/5,1", ALC889_FIXUP_MP41_VREF),
2615 SND_PCI_QUIRK(0x106b, 0x4300, "iMac 9,1", ALC889_FIXUP_IMAC91_VREF),
2616 SND_PCI_QUIRK(0x106b, 0x4600, "MacbookPro 5,2", ALC889_FIXUP_IMAC91_VREF),
2617 SND_PCI_QUIRK(0x106b, 0x4900, "iMac 9,1 Aluminum", ALC889_FIXUP_IMAC91_VREF),
2618 SND_PCI_QUIRK(0x106b, 0x4a00, "Macbook 5,2", ALC889_FIXUP_MBA11_VREF),
2620 SND_PCI_QUIRK(0x1071, 0x8258, "Evesham Voyaeger", ALC882_FIXUP_EAPD),
2621 SND_PCI_QUIRK(0x10ec, 0x12d8, "iBase Elo Touch", ALC888VD_FIXUP_MIC_100VREF),
2622 SND_PCI_QUIRK(0x13fe, 0x1009, "Advantech MIT-W101", ALC886_FIXUP_EAPD),
2623 SND_PCI_QUIRK(0x1458, 0xa002, "Gigabyte EP45-DS3/Z87X-UD3H", ALC889_FIXUP_FRONT_HP_NO_PRESENCE),
2624 SND_PCI_QUIRK(0x1458, 0xa0b8, "Gigabyte AZ370-Gaming", ALC1220_FIXUP_GB_DUAL_CODECS),
2625 SND_PCI_QUIRK(0x1458, 0xa0cd, "Gigabyte X570 Aorus Master", ALC1220_FIXUP_GB_X570),
2626 SND_PCI_QUIRK(0x1458, 0xa0ce, "Gigabyte X570 Aorus Xtreme", ALC1220_FIXUP_GB_X570),
2627 SND_PCI_QUIRK(0x1458, 0xa0d5, "Gigabyte X570S Aorus Master", ALC1220_FIXUP_GB_X570),
2628 SND_PCI_QUIRK(0x1462, 0x11f7, "MSI-GE63", ALC1220_FIXUP_CLEVO_P950),
2629 SND_PCI_QUIRK(0x1462, 0x1228, "MSI-GP63", ALC1220_FIXUP_CLEVO_P950),
2630 SND_PCI_QUIRK(0x1462, 0x1229, "MSI-GP73", ALC1220_FIXUP_CLEVO_P950),
2631 SND_PCI_QUIRK(0x1462, 0x1275, "MSI-GL63", ALC1220_FIXUP_CLEVO_P950),
2632 SND_PCI_QUIRK(0x1462, 0x1276, "MSI-GL73", ALC1220_FIXUP_CLEVO_P950),
2633 SND_PCI_QUIRK(0x1462, 0x1293, "MSI-GP65", ALC1220_FIXUP_CLEVO_P950),
2634 SND_PCI_QUIRK(0x1462, 0x7350, "MSI-7350", ALC889_FIXUP_CD),
2635 SND_PCI_QUIRK(0x1462, 0xcc34, "MSI Godlike X570", ALC1220_FIXUP_GB_DUAL_CODECS),
2636 SND_PCI_QUIRK(0x1462, 0xda57, "MSI Z270-Gaming", ALC1220_FIXUP_GB_DUAL_CODECS),
2637 SND_PCI_QUIRK_VENDOR(0x1462, "MSI", ALC882_FIXUP_GPIO3),
2638 SND_PCI_QUIRK(0x147b, 0x107a, "Abit AW9D-MAX", ALC882_FIXUP_ABIT_AW9D_MAX),
2639 SND_PCI_QUIRK(0x1558, 0x3702, "Clevo X370SN[VW]", ALC1220_FIXUP_CLEVO_PB51ED_PINS),
2640 SND_PCI_QUIRK(0x1558, 0x50d3, "Clevo PC50[ER][CDF]", ALC1220_FIXUP_CLEVO_PB51ED_PINS),
2641 SND_PCI_QUIRK(0x1558, 0x65d1, "Clevo PB51[ER][CDF]", ALC1220_FIXUP_CLEVO_PB51ED_PINS),
2642 SND_PCI_QUIRK(0x1558, 0x65d2, "Clevo PB51R[CDF]", ALC1220_FIXUP_CLEVO_PB51ED_PINS),
2643 SND_PCI_QUIRK(0x1558, 0x65e1, "Clevo PB51[ED][DF]", ALC1220_FIXUP_CLEVO_PB51ED_PINS),
2644 SND_PCI_QUIRK(0x1558, 0x65e5, "Clevo PC50D[PRS](?:-D|-G)?", ALC1220_FIXUP_CLEVO_PB51ED_PINS),
2645 SND_PCI_QUIRK(0x1558, 0x65f1, "Clevo PC50HS", ALC1220_FIXUP_CLEVO_PB51ED_PINS),
2646 SND_PCI_QUIRK(0x1558, 0x65f5, "Clevo PD50PN[NRT]", ALC1220_FIXUP_CLEVO_PB51ED_PINS),
2647 SND_PCI_QUIRK(0x1558, 0x66a2, "Clevo PE60RNE", ALC1220_FIXUP_CLEVO_PB51ED_PINS),
2648 SND_PCI_QUIRK(0x1558, 0x67d1, "Clevo PB71[ER][CDF]", ALC1220_FIXUP_CLEVO_PB51ED_PINS),
2649 SND_PCI_QUIRK(0x1558, 0x67e1, "Clevo PB71[DE][CDF]", ALC1220_FIXUP_CLEVO_PB51ED_PINS),
2650 SND_PCI_QUIRK(0x1558, 0x67e5, "Clevo PC70D[PRS](?:-D|-G)?", ALC1220_FIXUP_CLEVO_PB51ED_PINS),
2651 SND_PCI_QUIRK(0x1558, 0x67f1, "Clevo PC70H[PRS]", ALC1220_FIXUP_CLEVO_PB51ED_PINS),
2652 SND_PCI_QUIRK(0x1558, 0x67f5, "Clevo PD70PN[NRT]", ALC1220_FIXUP_CLEVO_PB51ED_PINS),
2653 SND_PCI_QUIRK(0x1558, 0x70d1, "Clevo PC70[ER][CDF]", ALC1220_FIXUP_CLEVO_PB51ED_PINS),
2654 SND_PCI_QUIRK(0x1558, 0x7714, "Clevo X170SM", ALC1220_FIXUP_CLEVO_PB51ED_PINS),
2655 SND_PCI_QUIRK(0x1558, 0x7715, "Clevo X170KM-G", ALC1220_FIXUP_CLEVO_PB51ED),
2656 SND_PCI_QUIRK(0x1558, 0x9501, "Clevo P950HR", ALC1220_FIXUP_CLEVO_P950),
2657 SND_PCI_QUIRK(0x1558, 0x9506, "Clevo P955HQ", ALC1220_FIXUP_CLEVO_P950),
2658 SND_PCI_QUIRK(0x1558, 0x950a, "Clevo P955H[PR]", ALC1220_FIXUP_CLEVO_P950),
2659 SND_PCI_QUIRK(0x1558, 0x95e1, "Clevo P95xER", ALC1220_FIXUP_CLEVO_P950),
2660 SND_PCI_QUIRK(0x1558, 0x95e2, "Clevo P950ER", ALC1220_FIXUP_CLEVO_P950),
2661 SND_PCI_QUIRK(0x1558, 0x95e3, "Clevo P955[ER]T", ALC1220_FIXUP_CLEVO_P950),
2662 SND_PCI_QUIRK(0x1558, 0x95e4, "Clevo P955ER", ALC1220_FIXUP_CLEVO_P950),
2663 SND_PCI_QUIRK(0x1558, 0x95e5, "Clevo P955EE6", ALC1220_FIXUP_CLEVO_P950),
2664 SND_PCI_QUIRK(0x1558, 0x95e6, "Clevo P950R[CDF]", ALC1220_FIXUP_CLEVO_P950),
2665 SND_PCI_QUIRK(0x1558, 0x96e1, "Clevo P960[ER][CDFN]-K", ALC1220_FIXUP_CLEVO_P950),
2666 SND_PCI_QUIRK(0x1558, 0x97e1, "Clevo P970[ER][CDFN]", ALC1220_FIXUP_CLEVO_P950),
2667 SND_PCI_QUIRK(0x1558, 0x97e2, "Clevo P970RC-M", ALC1220_FIXUP_CLEVO_P950),
2668 SND_PCI_QUIRK(0x1558, 0xd502, "Clevo PD50SNE", ALC1220_FIXUP_CLEVO_PB51ED_PINS),
2669 SND_PCI_QUIRK_VENDOR(0x1558, "Clevo laptop", ALC882_FIXUP_EAPD),
2670 SND_PCI_QUIRK(0x161f, 0x2054, "Medion laptop", ALC883_FIXUP_EAPD),
2671 SND_PCI_QUIRK(0x17aa, 0x3a0d, "Lenovo Y530", ALC882_FIXUP_LENOVO_Y530),
2672 SND_PCI_QUIRK(0x8086, 0x0022, "DX58SO", ALC889_FIXUP_COEF),
2676 static const struct hda_model_fixup alc882_fixup_models[] = {
2677 {.id = ALC882_FIXUP_ABIT_AW9D_MAX, .name = "abit-aw9d"},
2678 {.id = ALC882_FIXUP_LENOVO_Y530, .name = "lenovo-y530"},
2679 {.id = ALC882_FIXUP_ACER_ASPIRE_7736, .name = "acer-aspire-7736"},
2680 {.id = ALC882_FIXUP_ASUS_W90V, .name = "asus-w90v"},
2681 {.id = ALC889_FIXUP_CD, .name = "cd"},
2682 {.id = ALC889_FIXUP_FRONT_HP_NO_PRESENCE, .name = "no-front-hp"},
2683 {.id = ALC889_FIXUP_VAIO_TT, .name = "vaio-tt"},
2684 {.id = ALC888_FIXUP_EEE1601, .name = "eee1601"},
2685 {.id = ALC882_FIXUP_EAPD, .name = "alc882-eapd"},
2686 {.id = ALC883_FIXUP_EAPD, .name = "alc883-eapd"},
2687 {.id = ALC882_FIXUP_GPIO1, .name = "gpio1"},
2688 {.id = ALC882_FIXUP_GPIO2, .name = "gpio2"},
2689 {.id = ALC882_FIXUP_GPIO3, .name = "gpio3"},
2690 {.id = ALC889_FIXUP_COEF, .name = "alc889-coef"},
2691 {.id = ALC882_FIXUP_ASUS_W2JC, .name = "asus-w2jc"},
2692 {.id = ALC882_FIXUP_ACER_ASPIRE_4930G, .name = "acer-aspire-4930g"},
2693 {.id = ALC882_FIXUP_ACER_ASPIRE_8930G, .name = "acer-aspire-8930g"},
2694 {.id = ALC883_FIXUP_ACER_EAPD, .name = "acer-aspire"},
2695 {.id = ALC885_FIXUP_MACPRO_GPIO, .name = "macpro-gpio"},
2696 {.id = ALC889_FIXUP_DAC_ROUTE, .name = "dac-route"},
2697 {.id = ALC889_FIXUP_MBP_VREF, .name = "mbp-vref"},
2698 {.id = ALC889_FIXUP_IMAC91_VREF, .name = "imac91-vref"},
2699 {.id = ALC889_FIXUP_MBA11_VREF, .name = "mba11-vref"},
2700 {.id = ALC889_FIXUP_MBA21_VREF, .name = "mba21-vref"},
2701 {.id = ALC889_FIXUP_MP11_VREF, .name = "mp11-vref"},
2702 {.id = ALC889_FIXUP_MP41_VREF, .name = "mp41-vref"},
2703 {.id = ALC882_FIXUP_INV_DMIC, .name = "inv-dmic"},
2704 {.id = ALC882_FIXUP_NO_PRIMARY_HP, .name = "no-primary-hp"},
2705 {.id = ALC887_FIXUP_ASUS_BASS, .name = "asus-bass"},
2706 {.id = ALC1220_FIXUP_GB_DUAL_CODECS, .name = "dual-codecs"},
2707 {.id = ALC1220_FIXUP_GB_X570, .name = "gb-x570"},
2708 {.id = ALC1220_FIXUP_CLEVO_P950, .name = "clevo-p950"},
2712 static const struct snd_hda_pin_quirk alc882_pin_fixup_tbl[] = {
2713 SND_HDA_PIN_QUIRK(0x10ec1220, 0x1043, "ASUS", ALC1220_FIXUP_CLEVO_P950,
2721 {0x1e, 0x01456130}),
2722 SND_HDA_PIN_QUIRK(0x10ec1220, 0x1462, "MS-7C35", ALC1220_FIXUP_CLEVO_P950,
2730 {0x1e, 0x01451130}),
2735 * BIOS auto configuration
2737 /* almost identical with ALC880 parser... */
2738 static int alc882_parse_auto_config(struct hda_codec *codec)
2740 static const hda_nid_t alc882_ignore[] = { 0x1d, 0 };
2741 static const hda_nid_t alc882_ssids[] = { 0x15, 0x1b, 0x14, 0 };
2742 return alc_parse_auto_config(codec, alc882_ignore, alc882_ssids);
2747 static int patch_alc882(struct hda_codec *codec)
2749 struct alc_spec *spec;
2752 err = alc_alloc_spec(codec, 0x0b);
2758 switch (codec->core.vendor_id) {
2766 /* ALC883 and variants */
2767 alc_fix_pll_init(codec, 0x20, 0x0a, 10);
2771 alc_pre_init(codec);
2773 snd_hda_pick_fixup(codec, alc882_fixup_models, alc882_fixup_tbl,
2775 snd_hda_pick_pin_fixup(codec, alc882_pin_fixup_tbl, alc882_fixups, true);
2776 snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PRE_PROBE);
2778 alc_auto_parse_customize_define(codec);
2780 if (has_cdefine_beep(codec))
2781 spec->gen.beep_nid = 0x01;
2783 /* automatic parse from the BIOS config */
2784 err = alc882_parse_auto_config(codec);
2788 if (!spec->gen.no_analog && spec->gen.beep_nid) {
2789 err = set_beep_amp(spec, 0x0b, 0x05, HDA_INPUT);
2794 snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PROBE);
2807 static int alc262_parse_auto_config(struct hda_codec *codec)
2809 static const hda_nid_t alc262_ignore[] = { 0x1d, 0 };
2810 static const hda_nid_t alc262_ssids[] = { 0x15, 0x1b, 0x14, 0 };
2811 return alc_parse_auto_config(codec, alc262_ignore, alc262_ssids);
2818 ALC262_FIXUP_FSC_H270,
2819 ALC262_FIXUP_FSC_S7110,
2820 ALC262_FIXUP_HP_Z200,
2822 ALC262_FIXUP_LENOVO_3000,
2824 ALC262_FIXUP_BENQ_T31,
2825 ALC262_FIXUP_INV_DMIC,
2826 ALC262_FIXUP_INTEL_BAYLEYBAY,
2829 static const struct hda_fixup alc262_fixups[] = {
2830 [ALC262_FIXUP_FSC_H270] = {
2831 .type = HDA_FIXUP_PINS,
2832 .v.pins = (const struct hda_pintbl[]) {
2833 { 0x14, 0x99130110 }, /* speaker */
2834 { 0x15, 0x0221142f }, /* front HP */
2835 { 0x1b, 0x0121141f }, /* rear HP */
2839 [ALC262_FIXUP_FSC_S7110] = {
2840 .type = HDA_FIXUP_PINS,
2841 .v.pins = (const struct hda_pintbl[]) {
2842 { 0x15, 0x90170110 }, /* speaker */
2846 .chain_id = ALC262_FIXUP_BENQ,
2848 [ALC262_FIXUP_HP_Z200] = {
2849 .type = HDA_FIXUP_PINS,
2850 .v.pins = (const struct hda_pintbl[]) {
2851 { 0x16, 0x99130120 }, /* internal speaker */
2855 [ALC262_FIXUP_TYAN] = {
2856 .type = HDA_FIXUP_PINS,
2857 .v.pins = (const struct hda_pintbl[]) {
2858 { 0x14, 0x1993e1f0 }, /* int AUX */
2862 [ALC262_FIXUP_LENOVO_3000] = {
2863 .type = HDA_FIXUP_PINCTLS,
2864 .v.pins = (const struct hda_pintbl[]) {
2865 { 0x19, PIN_VREF50 },
2869 .chain_id = ALC262_FIXUP_BENQ,
2871 [ALC262_FIXUP_BENQ] = {
2872 .type = HDA_FIXUP_VERBS,
2873 .v.verbs = (const struct hda_verb[]) {
2874 { 0x20, AC_VERB_SET_COEF_INDEX, 0x07 },
2875 { 0x20, AC_VERB_SET_PROC_COEF, 0x3070 },
2879 [ALC262_FIXUP_BENQ_T31] = {
2880 .type = HDA_FIXUP_VERBS,
2881 .v.verbs = (const struct hda_verb[]) {
2882 { 0x20, AC_VERB_SET_COEF_INDEX, 0x07 },
2883 { 0x20, AC_VERB_SET_PROC_COEF, 0x3050 },
2887 [ALC262_FIXUP_INV_DMIC] = {
2888 .type = HDA_FIXUP_FUNC,
2889 .v.func = alc_fixup_inv_dmic,
2891 [ALC262_FIXUP_INTEL_BAYLEYBAY] = {
2892 .type = HDA_FIXUP_FUNC,
2893 .v.func = alc_fixup_no_depop_delay,
2897 static const struct snd_pci_quirk alc262_fixup_tbl[] = {
2898 SND_PCI_QUIRK(0x103c, 0x170b, "HP Z200", ALC262_FIXUP_HP_Z200),
2899 SND_PCI_QUIRK(0x10cf, 0x1397, "Fujitsu Lifebook S7110", ALC262_FIXUP_FSC_S7110),
2900 SND_PCI_QUIRK(0x10cf, 0x142d, "Fujitsu Lifebook E8410", ALC262_FIXUP_BENQ),
2901 SND_PCI_QUIRK(0x10f1, 0x2915, "Tyan Thunder n6650W", ALC262_FIXUP_TYAN),
2902 SND_PCI_QUIRK(0x1734, 0x1141, "FSC ESPRIMO U9210", ALC262_FIXUP_FSC_H270),
2903 SND_PCI_QUIRK(0x1734, 0x1147, "FSC Celsius H270", ALC262_FIXUP_FSC_H270),
2904 SND_PCI_QUIRK(0x17aa, 0x384e, "Lenovo 3000", ALC262_FIXUP_LENOVO_3000),
2905 SND_PCI_QUIRK(0x17ff, 0x0560, "Benq ED8", ALC262_FIXUP_BENQ),
2906 SND_PCI_QUIRK(0x17ff, 0x058d, "Benq T31-16", ALC262_FIXUP_BENQ_T31),
2907 SND_PCI_QUIRK(0x8086, 0x7270, "BayleyBay", ALC262_FIXUP_INTEL_BAYLEYBAY),
2911 static const struct hda_model_fixup alc262_fixup_models[] = {
2912 {.id = ALC262_FIXUP_INV_DMIC, .name = "inv-dmic"},
2913 {.id = ALC262_FIXUP_FSC_H270, .name = "fsc-h270"},
2914 {.id = ALC262_FIXUP_FSC_S7110, .name = "fsc-s7110"},
2915 {.id = ALC262_FIXUP_HP_Z200, .name = "hp-z200"},
2916 {.id = ALC262_FIXUP_TYAN, .name = "tyan"},
2917 {.id = ALC262_FIXUP_LENOVO_3000, .name = "lenovo-3000"},
2918 {.id = ALC262_FIXUP_BENQ, .name = "benq"},
2919 {.id = ALC262_FIXUP_BENQ_T31, .name = "benq-t31"},
2920 {.id = ALC262_FIXUP_INTEL_BAYLEYBAY, .name = "bayleybay"},
2926 static int patch_alc262(struct hda_codec *codec)
2928 struct alc_spec *spec;
2931 err = alc_alloc_spec(codec, 0x0b);
2936 spec->gen.shared_mic_vref_pin = 0x18;
2938 spec->shutup = alc_eapd_shutup;
2941 /* pshou 07/11/05 set a zero PCM sample to DAC when FIFO is
2944 alc_update_coefex_idx(codec, 0x1a, 7, 0, 0x80);
2946 alc_fix_pll_init(codec, 0x20, 0x0a, 10);
2948 alc_pre_init(codec);
2950 snd_hda_pick_fixup(codec, alc262_fixup_models, alc262_fixup_tbl,
2952 snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PRE_PROBE);
2954 alc_auto_parse_customize_define(codec);
2956 if (has_cdefine_beep(codec))
2957 spec->gen.beep_nid = 0x01;
2959 /* automatic parse from the BIOS config */
2960 err = alc262_parse_auto_config(codec);
2964 if (!spec->gen.no_analog && spec->gen.beep_nid) {
2965 err = set_beep_amp(spec, 0x0b, 0x05, HDA_INPUT);
2970 snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PROBE);
2982 /* bind Beep switches of both NID 0x0f and 0x10 */
2983 static int alc268_beep_switch_put(struct snd_kcontrol *kcontrol,
2984 struct snd_ctl_elem_value *ucontrol)
2986 struct hda_codec *codec = snd_kcontrol_chip(kcontrol);
2990 mutex_lock(&codec->control_mutex);
2991 pval = kcontrol->private_value;
2992 kcontrol->private_value = (pval & ~0xff) | 0x0f;
2993 err = snd_hda_mixer_amp_switch_put(kcontrol, ucontrol);
2995 kcontrol->private_value = (pval & ~0xff) | 0x10;
2996 err = snd_hda_mixer_amp_switch_put(kcontrol, ucontrol);
2998 kcontrol->private_value = pval;
2999 mutex_unlock(&codec->control_mutex);
3003 static const struct snd_kcontrol_new alc268_beep_mixer[] = {
3004 HDA_CODEC_VOLUME("Beep Playback Volume", 0x1d, 0x0, HDA_INPUT),
3006 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
3007 .name = "Beep Playback Switch",
3008 .subdevice = HDA_SUBDEV_AMP_FLAG,
3009 .info = snd_hda_mixer_amp_switch_info,
3010 .get = snd_hda_mixer_amp_switch_get,
3011 .put = alc268_beep_switch_put,
3012 .private_value = HDA_COMPOSE_AMP_VAL(0x0f, 3, 1, HDA_INPUT)
3016 /* set PCBEEP vol = 0, mute connections */
3017 static const struct hda_verb alc268_beep_init_verbs[] = {
3018 {0x1d, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
3019 {0x0f, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(1)},
3020 {0x10, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(1)},
3025 ALC268_FIXUP_INV_DMIC,
3026 ALC268_FIXUP_HP_EAPD,
3030 static const struct hda_fixup alc268_fixups[] = {
3031 [ALC268_FIXUP_INV_DMIC] = {
3032 .type = HDA_FIXUP_FUNC,
3033 .v.func = alc_fixup_inv_dmic,
3035 [ALC268_FIXUP_HP_EAPD] = {
3036 .type = HDA_FIXUP_VERBS,
3037 .v.verbs = (const struct hda_verb[]) {
3038 {0x15, AC_VERB_SET_EAPD_BTLENABLE, 0},
3042 [ALC268_FIXUP_SPDIF] = {
3043 .type = HDA_FIXUP_PINS,
3044 .v.pins = (const struct hda_pintbl[]) {
3045 { 0x1e, 0x014b1180 }, /* enable SPDIF out */
3051 static const struct hda_model_fixup alc268_fixup_models[] = {
3052 {.id = ALC268_FIXUP_INV_DMIC, .name = "inv-dmic"},
3053 {.id = ALC268_FIXUP_HP_EAPD, .name = "hp-eapd"},
3054 {.id = ALC268_FIXUP_SPDIF, .name = "spdif"},
3058 static const struct snd_pci_quirk alc268_fixup_tbl[] = {
3059 SND_PCI_QUIRK(0x1025, 0x0139, "Acer TravelMate 6293", ALC268_FIXUP_SPDIF),
3060 SND_PCI_QUIRK(0x1025, 0x015b, "Acer AOA 150 (ZG5)", ALC268_FIXUP_INV_DMIC),
3061 /* below is codec SSID since multiple Toshiba laptops have the
3062 * same PCI SSID 1179:ff00
3064 SND_PCI_QUIRK(0x1179, 0xff06, "Toshiba P200", ALC268_FIXUP_HP_EAPD),
3069 * BIOS auto configuration
3071 static int alc268_parse_auto_config(struct hda_codec *codec)
3073 static const hda_nid_t alc268_ssids[] = { 0x15, 0x1b, 0x14, 0 };
3074 return alc_parse_auto_config(codec, NULL, alc268_ssids);
3079 static int patch_alc268(struct hda_codec *codec)
3081 struct alc_spec *spec;
3084 /* ALC268 has no aa-loopback mixer */
3085 err = alc_alloc_spec(codec, 0);
3090 if (has_cdefine_beep(codec))
3091 spec->gen.beep_nid = 0x01;
3093 spec->shutup = alc_eapd_shutup;
3095 alc_pre_init(codec);
3097 snd_hda_pick_fixup(codec, alc268_fixup_models, alc268_fixup_tbl, alc268_fixups);
3098 snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PRE_PROBE);
3100 /* automatic parse from the BIOS config */
3101 err = alc268_parse_auto_config(codec);
3105 if (err > 0 && !spec->gen.no_analog &&
3106 spec->gen.autocfg.speaker_pins[0] != 0x1d) {
3107 for (i = 0; i < ARRAY_SIZE(alc268_beep_mixer); i++) {
3108 if (!snd_hda_gen_add_kctl(&spec->gen, NULL,
3109 &alc268_beep_mixer[i])) {
3114 snd_hda_add_verbs(codec, alc268_beep_init_verbs);
3115 if (!query_amp_caps(codec, 0x1d, HDA_INPUT))
3116 /* override the amp caps for beep generator */
3117 snd_hda_override_amp_caps(codec, 0x1d, HDA_INPUT,
3118 (0x0c << AC_AMPCAP_OFFSET_SHIFT) |
3119 (0x0c << AC_AMPCAP_NUM_STEPS_SHIFT) |
3120 (0x07 << AC_AMPCAP_STEP_SIZE_SHIFT) |
3121 (0 << AC_AMPCAP_MUTE_SHIFT));
3124 snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PROBE);
3137 static const struct hda_pcm_stream alc269_44k_pcm_analog_playback = {
3138 .rates = SNDRV_PCM_RATE_44100, /* fixed rate */
3141 static const struct hda_pcm_stream alc269_44k_pcm_analog_capture = {
3142 .rates = SNDRV_PCM_RATE_44100, /* fixed rate */
3145 /* different alc269-variants */
3147 ALC269_TYPE_ALC269VA,
3148 ALC269_TYPE_ALC269VB,
3149 ALC269_TYPE_ALC269VC,
3150 ALC269_TYPE_ALC269VD,
3172 * BIOS auto configuration
3174 static int alc269_parse_auto_config(struct hda_codec *codec)
3176 static const hda_nid_t alc269_ignore[] = { 0x1d, 0 };
3177 static const hda_nid_t alc269_ssids[] = { 0, 0x1b, 0x14, 0x21 };
3178 static const hda_nid_t alc269va_ssids[] = { 0x15, 0x1b, 0x14, 0 };
3179 struct alc_spec *spec = codec->spec;
3180 const hda_nid_t *ssids;
3182 switch (spec->codec_variant) {
3183 case ALC269_TYPE_ALC269VA:
3184 case ALC269_TYPE_ALC269VC:
3185 case ALC269_TYPE_ALC280:
3186 case ALC269_TYPE_ALC284:
3187 case ALC269_TYPE_ALC293:
3188 ssids = alc269va_ssids;
3190 case ALC269_TYPE_ALC269VB:
3191 case ALC269_TYPE_ALC269VD:
3192 case ALC269_TYPE_ALC282:
3193 case ALC269_TYPE_ALC283:
3194 case ALC269_TYPE_ALC286:
3195 case ALC269_TYPE_ALC298:
3196 case ALC269_TYPE_ALC255:
3197 case ALC269_TYPE_ALC256:
3198 case ALC269_TYPE_ALC257:
3199 case ALC269_TYPE_ALC215:
3200 case ALC269_TYPE_ALC225:
3201 case ALC269_TYPE_ALC245:
3202 case ALC269_TYPE_ALC287:
3203 case ALC269_TYPE_ALC294:
3204 case ALC269_TYPE_ALC300:
3205 case ALC269_TYPE_ALC623:
3206 case ALC269_TYPE_ALC700:
3207 ssids = alc269_ssids;
3210 ssids = alc269_ssids;
3214 return alc_parse_auto_config(codec, alc269_ignore, ssids);
3217 static const struct hda_jack_keymap alc_headset_btn_keymap[] = {
3218 { SND_JACK_BTN_0, KEY_PLAYPAUSE },
3219 { SND_JACK_BTN_1, KEY_VOICECOMMAND },
3220 { SND_JACK_BTN_2, KEY_VOLUMEUP },
3221 { SND_JACK_BTN_3, KEY_VOLUMEDOWN },
3225 static void alc_headset_btn_callback(struct hda_codec *codec,
3226 struct hda_jack_callback *jack)
3230 if (jack->unsol_res & (7 << 13))
3231 report |= SND_JACK_BTN_0;
3233 if (jack->unsol_res & (1 << 16 | 3 << 8))
3234 report |= SND_JACK_BTN_1;
3237 if (jack->unsol_res & (7 << 23))
3238 report |= SND_JACK_BTN_2;
3240 /* Volume down key */
3241 if (jack->unsol_res & (7 << 10))
3242 report |= SND_JACK_BTN_3;
3244 snd_hda_jack_set_button_state(codec, jack->nid, report);
3247 static void alc_disable_headset_jack_key(struct hda_codec *codec)
3249 struct alc_spec *spec = codec->spec;
3251 if (!spec->has_hs_key)
3254 switch (codec->core.vendor_id) {
3262 alc_write_coef_idx(codec, 0x48, 0x0);
3263 alc_update_coef_idx(codec, 0x49, 0x0045, 0x0);
3264 alc_update_coef_idx(codec, 0x44, 0x0045 << 8, 0x0);
3271 alc_write_coef_idx(codec, 0x48, 0x0);
3272 alc_update_coef_idx(codec, 0x49, 0x0045, 0x0);
3277 static void alc_enable_headset_jack_key(struct hda_codec *codec)
3279 struct alc_spec *spec = codec->spec;
3281 if (!spec->has_hs_key)
3284 switch (codec->core.vendor_id) {
3292 alc_write_coef_idx(codec, 0x48, 0xd011);
3293 alc_update_coef_idx(codec, 0x49, 0x007f, 0x0045);
3294 alc_update_coef_idx(codec, 0x44, 0x007f << 8, 0x0045 << 8);
3301 alc_write_coef_idx(codec, 0x48, 0xd011);
3302 alc_update_coef_idx(codec, 0x49, 0x007f, 0x0045);
3307 static void alc_fixup_headset_jack(struct hda_codec *codec,
3308 const struct hda_fixup *fix, int action)
3310 struct alc_spec *spec = codec->spec;
3314 case HDA_FIXUP_ACT_PRE_PROBE:
3315 spec->has_hs_key = 1;
3316 snd_hda_jack_detect_enable_callback(codec, 0x55,
3317 alc_headset_btn_callback);
3319 case HDA_FIXUP_ACT_BUILD:
3320 hp_pin = alc_get_hp_pin(spec);
3321 if (!hp_pin || snd_hda_jack_bind_keymap(codec, 0x55,
3322 alc_headset_btn_keymap,
3324 snd_hda_jack_add_kctl(codec, 0x55, "Headset Jack",
3325 false, SND_JACK_HEADSET,
3326 alc_headset_btn_keymap);
3328 alc_enable_headset_jack_key(codec);
3333 static void alc269vb_toggle_power_output(struct hda_codec *codec, int power_up)
3335 alc_update_coef_idx(codec, 0x04, 1 << 11, power_up ? (1 << 11) : 0);
3338 static void alc269_shutup(struct hda_codec *codec)
3340 struct alc_spec *spec = codec->spec;
3342 if (spec->codec_variant == ALC269_TYPE_ALC269VB)
3343 alc269vb_toggle_power_output(codec, 0);
3344 if (spec->codec_variant == ALC269_TYPE_ALC269VB &&
3345 (alc_get_coef0(codec) & 0x00ff) == 0x018) {
3348 alc_shutup_pins(codec);
3351 static const struct coef_fw alc282_coefs[] = {
3352 WRITE_COEF(0x03, 0x0002), /* Power Down Control */
3353 UPDATE_COEF(0x05, 0xff3f, 0x0700), /* FIFO and filter clock */
3354 WRITE_COEF(0x07, 0x0200), /* DMIC control */
3355 UPDATE_COEF(0x06, 0x00f0, 0), /* Analog clock */
3356 UPDATE_COEF(0x08, 0xfffc, 0x0c2c), /* JD */
3357 WRITE_COEF(0x0a, 0xcccc), /* JD offset1 */
3358 WRITE_COEF(0x0b, 0xcccc), /* JD offset2 */
3359 WRITE_COEF(0x0e, 0x6e00), /* LDO1/2/3, DAC/ADC */
3360 UPDATE_COEF(0x0f, 0xf800, 0x1000), /* JD */
3361 UPDATE_COEF(0x10, 0xfc00, 0x0c00), /* Capless */
3362 WRITE_COEF(0x6f, 0x0), /* Class D test 4 */
3363 UPDATE_COEF(0x0c, 0xfe00, 0), /* IO power down directly */
3364 WRITE_COEF(0x34, 0xa0c0), /* ANC */
3365 UPDATE_COEF(0x16, 0x0008, 0), /* AGC MUX */
3366 UPDATE_COEF(0x1d, 0x00e0, 0), /* DAC simple content protection */
3367 UPDATE_COEF(0x1f, 0x00e0, 0), /* ADC simple content protection */
3368 WRITE_COEF(0x21, 0x8804), /* DAC ADC Zero Detection */
3369 WRITE_COEF(0x63, 0x2902), /* PLL */
3370 WRITE_COEF(0x68, 0xa080), /* capless control 2 */
3371 WRITE_COEF(0x69, 0x3400), /* capless control 3 */
3372 WRITE_COEF(0x6a, 0x2f3e), /* capless control 4 */
3373 WRITE_COEF(0x6b, 0x0), /* capless control 5 */
3374 UPDATE_COEF(0x6d, 0x0fff, 0x0900), /* class D test 2 */
3375 WRITE_COEF(0x6e, 0x110a), /* class D test 3 */
3376 UPDATE_COEF(0x70, 0x00f8, 0x00d8), /* class D test 5 */
3377 WRITE_COEF(0x71, 0x0014), /* class D test 6 */
3378 WRITE_COEF(0x72, 0xc2ba), /* classD OCP */
3379 UPDATE_COEF(0x77, 0x0f80, 0), /* classD pure DC test */
3380 WRITE_COEF(0x6c, 0xfc06), /* Class D amp control */
3384 static void alc282_restore_default_value(struct hda_codec *codec)
3386 alc_process_coef_fw(codec, alc282_coefs);
3389 static void alc282_init(struct hda_codec *codec)
3391 struct alc_spec *spec = codec->spec;
3392 hda_nid_t hp_pin = alc_get_hp_pin(spec);
3396 alc282_restore_default_value(codec);
3400 hp_pin_sense = snd_hda_jack_detect(codec, hp_pin);
3401 coef78 = alc_read_coef_idx(codec, 0x78);
3403 /* Index 0x78 Direct Drive HP AMP LPM Control 1 */
3404 /* Headphone capless set to high power mode */
3405 alc_write_coef_idx(codec, 0x78, 0x9004);
3410 snd_hda_codec_write(codec, hp_pin, 0,
3411 AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE);
3416 snd_hda_codec_write(codec, hp_pin, 0,
3417 AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT);
3422 /* Headphone capless set to normal mode */
3423 alc_write_coef_idx(codec, 0x78, coef78);
3426 static void alc282_shutup(struct hda_codec *codec)
3428 struct alc_spec *spec = codec->spec;
3429 hda_nid_t hp_pin = alc_get_hp_pin(spec);
3434 alc269_shutup(codec);
3438 hp_pin_sense = snd_hda_jack_detect(codec, hp_pin);
3439 coef78 = alc_read_coef_idx(codec, 0x78);
3440 alc_write_coef_idx(codec, 0x78, 0x9004);
3445 snd_hda_codec_write(codec, hp_pin, 0,
3446 AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE);
3451 if (!spec->no_shutup_pins)
3452 snd_hda_codec_write(codec, hp_pin, 0,
3453 AC_VERB_SET_PIN_WIDGET_CONTROL, 0x0);
3458 alc_auto_setup_eapd(codec, false);
3459 alc_shutup_pins(codec);
3460 alc_write_coef_idx(codec, 0x78, coef78);
3463 static const struct coef_fw alc283_coefs[] = {
3464 WRITE_COEF(0x03, 0x0002), /* Power Down Control */
3465 UPDATE_COEF(0x05, 0xff3f, 0x0700), /* FIFO and filter clock */
3466 WRITE_COEF(0x07, 0x0200), /* DMIC control */
3467 UPDATE_COEF(0x06, 0x00f0, 0), /* Analog clock */
3468 UPDATE_COEF(0x08, 0xfffc, 0x0c2c), /* JD */
3469 WRITE_COEF(0x0a, 0xcccc), /* JD offset1 */
3470 WRITE_COEF(0x0b, 0xcccc), /* JD offset2 */
3471 WRITE_COEF(0x0e, 0x6fc0), /* LDO1/2/3, DAC/ADC */
3472 UPDATE_COEF(0x0f, 0xf800, 0x1000), /* JD */
3473 UPDATE_COEF(0x10, 0xfc00, 0x0c00), /* Capless */
3474 WRITE_COEF(0x3a, 0x0), /* Class D test 4 */
3475 UPDATE_COEF(0x0c, 0xfe00, 0x0), /* IO power down directly */
3476 WRITE_COEF(0x22, 0xa0c0), /* ANC */
3477 UPDATE_COEFEX(0x53, 0x01, 0x000f, 0x0008), /* AGC MUX */
3478 UPDATE_COEF(0x1d, 0x00e0, 0), /* DAC simple content protection */
3479 UPDATE_COEF(0x1f, 0x00e0, 0), /* ADC simple content protection */
3480 WRITE_COEF(0x21, 0x8804), /* DAC ADC Zero Detection */
3481 WRITE_COEF(0x2e, 0x2902), /* PLL */
3482 WRITE_COEF(0x33, 0xa080), /* capless control 2 */
3483 WRITE_COEF(0x34, 0x3400), /* capless control 3 */
3484 WRITE_COEF(0x35, 0x2f3e), /* capless control 4 */
3485 WRITE_COEF(0x36, 0x0), /* capless control 5 */
3486 UPDATE_COEF(0x38, 0x0fff, 0x0900), /* class D test 2 */
3487 WRITE_COEF(0x39, 0x110a), /* class D test 3 */
3488 UPDATE_COEF(0x3b, 0x00f8, 0x00d8), /* class D test 5 */
3489 WRITE_COEF(0x3c, 0x0014), /* class D test 6 */
3490 WRITE_COEF(0x3d, 0xc2ba), /* classD OCP */
3491 UPDATE_COEF(0x42, 0x0f80, 0x0), /* classD pure DC test */
3492 WRITE_COEF(0x49, 0x0), /* test mode */
3493 UPDATE_COEF(0x40, 0xf800, 0x9800), /* Class D DC enable */
3494 UPDATE_COEF(0x42, 0xf000, 0x2000), /* DC offset */
3495 WRITE_COEF(0x37, 0xfc06), /* Class D amp control */
3496 UPDATE_COEF(0x1b, 0x8000, 0), /* HP JD control */
3500 static void alc283_restore_default_value(struct hda_codec *codec)
3502 alc_process_coef_fw(codec, alc283_coefs);
3505 static void alc283_init(struct hda_codec *codec)
3507 struct alc_spec *spec = codec->spec;
3508 hda_nid_t hp_pin = alc_get_hp_pin(spec);
3511 alc283_restore_default_value(codec);
3517 hp_pin_sense = snd_hda_jack_detect(codec, hp_pin);
3519 /* Index 0x43 Direct Drive HP AMP LPM Control 1 */
3520 /* Headphone capless set to high power mode */
3521 alc_write_coef_idx(codec, 0x43, 0x9004);
3523 snd_hda_codec_write(codec, hp_pin, 0,
3524 AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE);
3529 snd_hda_codec_write(codec, hp_pin, 0,
3530 AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT);
3534 /* Index 0x46 Combo jack auto switch control 2 */
3535 /* 3k pull low control for Headset jack. */
3536 alc_update_coef_idx(codec, 0x46, 3 << 12, 0);
3537 /* Headphone capless set to normal mode */
3538 alc_write_coef_idx(codec, 0x43, 0x9614);
3541 static void alc283_shutup(struct hda_codec *codec)
3543 struct alc_spec *spec = codec->spec;
3544 hda_nid_t hp_pin = alc_get_hp_pin(spec);
3548 alc269_shutup(codec);
3552 hp_pin_sense = snd_hda_jack_detect(codec, hp_pin);
3554 alc_write_coef_idx(codec, 0x43, 0x9004);
3556 /*depop hp during suspend*/
3557 alc_write_coef_idx(codec, 0x06, 0x2100);
3559 snd_hda_codec_write(codec, hp_pin, 0,
3560 AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE);
3565 if (!spec->no_shutup_pins)
3566 snd_hda_codec_write(codec, hp_pin, 0,
3567 AC_VERB_SET_PIN_WIDGET_CONTROL, 0x0);
3569 alc_update_coef_idx(codec, 0x46, 0, 3 << 12);
3573 alc_auto_setup_eapd(codec, false);
3574 alc_shutup_pins(codec);
3575 alc_write_coef_idx(codec, 0x43, 0x9614);
3578 static void alc256_init(struct hda_codec *codec)
3580 struct alc_spec *spec = codec->spec;
3581 hda_nid_t hp_pin = alc_get_hp_pin(spec);
3584 if (spec->ultra_low_power) {
3585 alc_update_coef_idx(codec, 0x03, 1<<1, 1<<1);
3586 alc_update_coef_idx(codec, 0x08, 3<<2, 3<<2);
3587 alc_update_coef_idx(codec, 0x08, 7<<4, 0);
3588 alc_update_coef_idx(codec, 0x3b, 1<<15, 0);
3589 alc_update_coef_idx(codec, 0x0e, 7<<6, 7<<6);
3598 hp_pin_sense = snd_hda_jack_detect(codec, hp_pin);
3603 alc_update_coefex_idx(codec, 0x57, 0x04, 0x0007, 0x1); /* Low power */
3605 snd_hda_codec_write(codec, hp_pin, 0,
3606 AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE);
3608 if (hp_pin_sense || spec->ultra_low_power)
3611 snd_hda_codec_write(codec, hp_pin, 0,
3612 AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT);
3614 if (hp_pin_sense || spec->ultra_low_power)
3617 alc_update_coef_idx(codec, 0x46, 3 << 12, 0);
3618 alc_update_coefex_idx(codec, 0x57, 0x04, 0x0007, 0x4); /* Hight power */
3619 alc_update_coefex_idx(codec, 0x53, 0x02, 0x8000, 1 << 15); /* Clear bit */
3620 alc_update_coefex_idx(codec, 0x53, 0x02, 0x8000, 0 << 15);
3622 * Expose headphone mic (or possibly Line In on some machines) instead
3623 * of PC Beep on 1Ah, and disable 1Ah loopback for all outputs. See
3624 * Documentation/sound/hd-audio/realtek-pc-beep.rst for details of
3627 alc_write_coef_idx(codec, 0x36, 0x5757);
3630 static void alc256_shutup(struct hda_codec *codec)
3632 struct alc_spec *spec = codec->spec;
3633 hda_nid_t hp_pin = alc_get_hp_pin(spec);
3639 alc_update_coefex_idx(codec, 0x57, 0x04, 0x0007, 0x1); /* Low power */
3640 hp_pin_sense = snd_hda_jack_detect(codec, hp_pin);
3645 snd_hda_codec_write(codec, hp_pin, 0,
3646 AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE);
3648 if (hp_pin_sense || spec->ultra_low_power)
3651 /* 3k pull low control for Headset jack. */
3652 /* NOTE: call this before clearing the pin, otherwise codec stalls */
3653 /* If disable 3k pulldown control for alc257, the Mic detection will not work correctly
3654 * when booting with headset plugged. So skip setting it for the codec alc257
3656 if (spec->en_3kpull_low)
3657 alc_update_coef_idx(codec, 0x46, 0, 3 << 12);
3659 if (!spec->no_shutup_pins)
3660 snd_hda_codec_write(codec, hp_pin, 0,
3661 AC_VERB_SET_PIN_WIDGET_CONTROL, 0x0);
3663 if (hp_pin_sense || spec->ultra_low_power)
3666 alc_auto_setup_eapd(codec, false);
3667 alc_shutup_pins(codec);
3668 if (spec->ultra_low_power) {
3670 alc_update_coef_idx(codec, 0x03, 1<<1, 0);
3671 alc_update_coef_idx(codec, 0x08, 7<<4, 7<<4);
3672 alc_update_coef_idx(codec, 0x08, 3<<2, 0);
3673 alc_update_coef_idx(codec, 0x3b, 1<<15, 1<<15);
3674 alc_update_coef_idx(codec, 0x0e, 7<<6, 0);
3679 static void alc285_hp_init(struct hda_codec *codec)
3681 struct alc_spec *spec = codec->spec;
3682 hda_nid_t hp_pin = alc_get_hp_pin(spec);
3684 int coef38, coef0d, coef36;
3686 alc_write_coefex_idx(codec, 0x58, 0x00, 0x1888); /* write default value */
3687 alc_update_coef_idx(codec, 0x4a, 1<<15, 1<<15); /* Reset HP JD */
3688 coef38 = alc_read_coef_idx(codec, 0x38); /* Amp control */
3689 coef0d = alc_read_coef_idx(codec, 0x0d); /* Digital Misc control */
3690 coef36 = alc_read_coef_idx(codec, 0x36); /* Passthrough Control */
3691 alc_update_coef_idx(codec, 0x38, 1<<4, 0x0);
3692 alc_update_coef_idx(codec, 0x0d, 0x110, 0x0);
3694 alc_update_coef_idx(codec, 0x67, 0xf000, 0x3000);
3697 snd_hda_codec_write(codec, hp_pin, 0,
3698 AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE);
3701 alc_update_coef_idx(codec, 0x36, 1<<14, 1<<14);
3702 alc_update_coef_idx(codec, 0x36, 1<<13, 0x0);
3705 snd_hda_codec_write(codec, hp_pin, 0,
3706 AC_VERB_SET_PIN_WIDGET_CONTROL, 0x0);
3708 alc_write_coef_idx(codec, 0x67, 0x0); /* Set HP depop to manual mode */
3709 alc_write_coefex_idx(codec, 0x58, 0x00, 0x7880);
3710 alc_write_coefex_idx(codec, 0x58, 0x0f, 0xf049);
3711 alc_update_coefex_idx(codec, 0x58, 0x03, 0x00f0, 0x00c0);
3713 alc_write_coefex_idx(codec, 0x58, 0x00, 0xf888); /* HP depop procedure start */
3714 val = alc_read_coefex_idx(codec, 0x58, 0x00);
3715 for (i = 0; i < 20 && val & 0x8000; i++) {
3717 val = alc_read_coefex_idx(codec, 0x58, 0x00);
3718 } /* Wait for depop procedure finish */
3720 alc_write_coefex_idx(codec, 0x58, 0x00, val); /* write back the result */
3721 alc_update_coef_idx(codec, 0x38, 1<<4, coef38);
3722 alc_update_coef_idx(codec, 0x0d, 0x110, coef0d);
3723 alc_update_coef_idx(codec, 0x36, 3<<13, coef36);
3726 alc_update_coef_idx(codec, 0x4a, 1<<15, 0);
3729 static void alc225_init(struct hda_codec *codec)
3731 struct alc_spec *spec = codec->spec;
3732 hda_nid_t hp_pin = alc_get_hp_pin(spec);
3733 bool hp1_pin_sense, hp2_pin_sense;
3735 if (spec->ultra_low_power) {
3736 alc_update_coef_idx(codec, 0x08, 0x0f << 2, 3<<2);
3737 alc_update_coef_idx(codec, 0x0e, 7<<6, 7<<6);
3738 alc_update_coef_idx(codec, 0x33, 1<<11, 0);
3742 if (spec->codec_variant != ALC269_TYPE_ALC287 &&
3743 spec->codec_variant != ALC269_TYPE_ALC245)
3744 /* required only at boot or S3 and S4 resume time */
3745 if (!spec->done_hp_init ||
3746 is_s3_resume(codec) ||
3747 is_s4_resume(codec)) {
3748 alc285_hp_init(codec);
3749 spec->done_hp_init = true;
3756 hp1_pin_sense = snd_hda_jack_detect(codec, hp_pin);
3757 hp2_pin_sense = snd_hda_jack_detect(codec, 0x16);
3759 if (hp1_pin_sense || hp2_pin_sense)
3762 alc_update_coefex_idx(codec, 0x57, 0x04, 0x0007, 0x1); /* Low power */
3764 if (hp1_pin_sense || spec->ultra_low_power)
3765 snd_hda_codec_write(codec, hp_pin, 0,
3766 AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE);
3768 snd_hda_codec_write(codec, 0x16, 0,
3769 AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE);
3771 if (hp1_pin_sense || hp2_pin_sense || spec->ultra_low_power)
3774 if (hp1_pin_sense || spec->ultra_low_power)
3775 snd_hda_codec_write(codec, hp_pin, 0,
3776 AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT);
3778 snd_hda_codec_write(codec, 0x16, 0,
3779 AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT);
3781 if (hp1_pin_sense || hp2_pin_sense || spec->ultra_low_power)
3784 alc_update_coef_idx(codec, 0x4a, 3 << 10, 0);
3785 alc_update_coefex_idx(codec, 0x57, 0x04, 0x0007, 0x4); /* Hight power */
3788 static void alc225_shutup(struct hda_codec *codec)
3790 struct alc_spec *spec = codec->spec;
3791 hda_nid_t hp_pin = alc_get_hp_pin(spec);
3792 bool hp1_pin_sense, hp2_pin_sense;
3797 alc_disable_headset_jack_key(codec);
3798 /* 3k pull low control for Headset jack. */
3799 alc_update_coef_idx(codec, 0x4a, 0, 3 << 10);
3801 hp1_pin_sense = snd_hda_jack_detect(codec, hp_pin);
3802 hp2_pin_sense = snd_hda_jack_detect(codec, 0x16);
3804 if (hp1_pin_sense || hp2_pin_sense)
3807 if (hp1_pin_sense || spec->ultra_low_power)
3808 snd_hda_codec_write(codec, hp_pin, 0,
3809 AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE);
3811 snd_hda_codec_write(codec, 0x16, 0,
3812 AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE);
3814 if (hp1_pin_sense || hp2_pin_sense || spec->ultra_low_power)
3817 if (hp1_pin_sense || spec->ultra_low_power)
3818 snd_hda_codec_write(codec, hp_pin, 0,
3819 AC_VERB_SET_PIN_WIDGET_CONTROL, 0x0);
3821 snd_hda_codec_write(codec, 0x16, 0,
3822 AC_VERB_SET_PIN_WIDGET_CONTROL, 0x0);
3824 if (hp1_pin_sense || hp2_pin_sense || spec->ultra_low_power)
3827 alc_auto_setup_eapd(codec, false);
3828 alc_shutup_pins(codec);
3829 if (spec->ultra_low_power) {
3831 alc_update_coef_idx(codec, 0x08, 0x0f << 2, 0x0c << 2);
3832 alc_update_coef_idx(codec, 0x0e, 7<<6, 0);
3833 alc_update_coef_idx(codec, 0x33, 1<<11, 1<<11);
3834 alc_update_coef_idx(codec, 0x4a, 3<<4, 2<<4);
3838 alc_update_coef_idx(codec, 0x4a, 3 << 10, 0);
3839 alc_enable_headset_jack_key(codec);
3842 static void alc_default_init(struct hda_codec *codec)
3844 struct alc_spec *spec = codec->spec;
3845 hda_nid_t hp_pin = alc_get_hp_pin(spec);
3853 hp_pin_sense = snd_hda_jack_detect(codec, hp_pin);
3858 snd_hda_codec_write(codec, hp_pin, 0,
3859 AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE);
3864 snd_hda_codec_write(codec, hp_pin, 0,
3865 AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT);
3871 static void alc_default_shutup(struct hda_codec *codec)
3873 struct alc_spec *spec = codec->spec;
3874 hda_nid_t hp_pin = alc_get_hp_pin(spec);
3878 alc269_shutup(codec);
3882 hp_pin_sense = snd_hda_jack_detect(codec, hp_pin);
3887 snd_hda_codec_write(codec, hp_pin, 0,
3888 AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE);
3893 if (!spec->no_shutup_pins)
3894 snd_hda_codec_write(codec, hp_pin, 0,
3895 AC_VERB_SET_PIN_WIDGET_CONTROL, 0x0);
3900 alc_auto_setup_eapd(codec, false);
3901 alc_shutup_pins(codec);
3904 static void alc294_hp_init(struct hda_codec *codec)
3906 struct alc_spec *spec = codec->spec;
3907 hda_nid_t hp_pin = alc_get_hp_pin(spec);
3913 snd_hda_codec_write(codec, hp_pin, 0,
3914 AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE);
3918 if (!spec->no_shutup_pins)
3919 snd_hda_codec_write(codec, hp_pin, 0,
3920 AC_VERB_SET_PIN_WIDGET_CONTROL, 0x0);
3922 alc_update_coef_idx(codec, 0x6f, 0x000f, 0);/* Set HP depop to manual mode */
3923 alc_update_coefex_idx(codec, 0x58, 0x00, 0x8000, 0x8000); /* HP depop procedure start */
3925 /* Wait for depop procedure finish */
3926 val = alc_read_coefex_idx(codec, 0x58, 0x01);
3927 for (i = 0; i < 20 && val & 0x0080; i++) {
3929 val = alc_read_coefex_idx(codec, 0x58, 0x01);
3931 /* Set HP depop to auto mode */
3932 alc_update_coef_idx(codec, 0x6f, 0x000f, 0x000b);
3936 static void alc294_init(struct hda_codec *codec)
3938 struct alc_spec *spec = codec->spec;
3940 /* required only at boot or S4 resume time */
3941 if (!spec->done_hp_init ||
3942 codec->core.dev.power.power_state.event == PM_EVENT_RESTORE) {
3943 alc294_hp_init(codec);
3944 spec->done_hp_init = true;
3946 alc_default_init(codec);
3949 static void alc5505_coef_set(struct hda_codec *codec, unsigned int index_reg,
3952 snd_hda_codec_write(codec, 0x51, 0, AC_VERB_SET_COEF_INDEX, index_reg >> 1);
3953 snd_hda_codec_write(codec, 0x51, 0, AC_VERB_SET_PROC_COEF, val & 0xffff); /* LSB */
3954 snd_hda_codec_write(codec, 0x51, 0, AC_VERB_SET_PROC_COEF, val >> 16); /* MSB */
3957 static int alc5505_coef_get(struct hda_codec *codec, unsigned int index_reg)
3961 snd_hda_codec_write(codec, 0x51, 0, AC_VERB_SET_COEF_INDEX, index_reg >> 1);
3962 val = snd_hda_codec_read(codec, 0x51, 0, AC_VERB_GET_PROC_COEF, 0)
3964 val |= snd_hda_codec_read(codec, 0x51, 0, AC_VERB_GET_PROC_COEF, 0)
3969 static void alc5505_dsp_halt(struct hda_codec *codec)
3973 alc5505_coef_set(codec, 0x3000, 0x000c); /* DSP CPU stop */
3974 alc5505_coef_set(codec, 0x880c, 0x0008); /* DDR enter self refresh */
3975 alc5505_coef_set(codec, 0x61c0, 0x11110080); /* Clock control for PLL and CPU */
3976 alc5505_coef_set(codec, 0x6230, 0xfc0d4011); /* Disable Input OP */
3977 alc5505_coef_set(codec, 0x61b4, 0x040a2b03); /* Stop PLL2 */
3978 alc5505_coef_set(codec, 0x61b0, 0x00005b17); /* Stop PLL1 */
3979 alc5505_coef_set(codec, 0x61b8, 0x04133303); /* Stop PLL3 */
3980 val = alc5505_coef_get(codec, 0x6220);
3981 alc5505_coef_set(codec, 0x6220, (val | 0x3000)); /* switch Ringbuffer clock to DBUS clock */
3984 static void alc5505_dsp_back_from_halt(struct hda_codec *codec)
3986 alc5505_coef_set(codec, 0x61b8, 0x04133302);
3987 alc5505_coef_set(codec, 0x61b0, 0x00005b16);
3988 alc5505_coef_set(codec, 0x61b4, 0x040a2b02);
3989 alc5505_coef_set(codec, 0x6230, 0xf80d4011);
3990 alc5505_coef_set(codec, 0x6220, 0x2002010f);
3991 alc5505_coef_set(codec, 0x880c, 0x00000004);
3994 static void alc5505_dsp_init(struct hda_codec *codec)
3998 alc5505_dsp_halt(codec);
3999 alc5505_dsp_back_from_halt(codec);
4000 alc5505_coef_set(codec, 0x61b0, 0x5b14); /* PLL1 control */
4001 alc5505_coef_set(codec, 0x61b0, 0x5b16);
4002 alc5505_coef_set(codec, 0x61b4, 0x04132b00); /* PLL2 control */
4003 alc5505_coef_set(codec, 0x61b4, 0x04132b02);
4004 alc5505_coef_set(codec, 0x61b8, 0x041f3300); /* PLL3 control*/
4005 alc5505_coef_set(codec, 0x61b8, 0x041f3302);
4006 snd_hda_codec_write(codec, 0x51, 0, AC_VERB_SET_CODEC_RESET, 0); /* Function reset */
4007 alc5505_coef_set(codec, 0x61b8, 0x041b3302);
4008 alc5505_coef_set(codec, 0x61b8, 0x04173302);
4009 alc5505_coef_set(codec, 0x61b8, 0x04163302);
4010 alc5505_coef_set(codec, 0x8800, 0x348b328b); /* DRAM control */
4011 alc5505_coef_set(codec, 0x8808, 0x00020022); /* DRAM control */
4012 alc5505_coef_set(codec, 0x8818, 0x00000400); /* DRAM control */
4014 val = alc5505_coef_get(codec, 0x6200) >> 16; /* Read revision ID */
4016 alc5505_coef_set(codec, 0x6220, 0x2002010f); /* I/O PAD Configuration */
4018 alc5505_coef_set(codec, 0x6220, 0x6002018f);
4020 alc5505_coef_set(codec, 0x61ac, 0x055525f0); /**/
4021 alc5505_coef_set(codec, 0x61c0, 0x12230080); /* Clock control */
4022 alc5505_coef_set(codec, 0x61b4, 0x040e2b02); /* PLL2 control */
4023 alc5505_coef_set(codec, 0x61bc, 0x010234f8); /* OSC Control */
4024 alc5505_coef_set(codec, 0x880c, 0x00000004); /* DRAM Function control */
4025 alc5505_coef_set(codec, 0x880c, 0x00000003);
4026 alc5505_coef_set(codec, 0x880c, 0x00000010);
4028 #ifdef HALT_REALTEK_ALC5505
4029 alc5505_dsp_halt(codec);
4033 #ifdef HALT_REALTEK_ALC5505
4034 #define alc5505_dsp_suspend(codec) do { } while (0) /* NOP */
4035 #define alc5505_dsp_resume(codec) do { } while (0) /* NOP */
4037 #define alc5505_dsp_suspend(codec) alc5505_dsp_halt(codec)
4038 #define alc5505_dsp_resume(codec) alc5505_dsp_back_from_halt(codec)
4042 static int alc269_suspend(struct hda_codec *codec)
4044 struct alc_spec *spec = codec->spec;
4046 if (spec->has_alc5505_dsp)
4047 alc5505_dsp_suspend(codec);
4049 return alc_suspend(codec);
4052 static int alc269_resume(struct hda_codec *codec)
4054 struct alc_spec *spec = codec->spec;
4056 if (spec->codec_variant == ALC269_TYPE_ALC269VB)
4057 alc269vb_toggle_power_output(codec, 0);
4058 if (spec->codec_variant == ALC269_TYPE_ALC269VB &&
4059 (alc_get_coef0(codec) & 0x00ff) == 0x018) {
4063 codec->patch_ops.init(codec);
4065 if (spec->codec_variant == ALC269_TYPE_ALC269VB)
4066 alc269vb_toggle_power_output(codec, 1);
4067 if (spec->codec_variant == ALC269_TYPE_ALC269VB &&
4068 (alc_get_coef0(codec) & 0x00ff) == 0x017) {
4072 snd_hda_regmap_sync(codec);
4073 hda_call_check_power_status(codec, 0x01);
4075 /* on some machine, the BIOS will clear the codec gpio data when enter
4076 * suspend, and won't restore the data after resume, so we restore it
4079 if (spec->gpio_data)
4080 alc_write_gpio_data(codec);
4082 if (spec->has_alc5505_dsp)
4083 alc5505_dsp_resume(codec);
4087 #endif /* CONFIG_PM */
4089 static void alc269_fixup_pincfg_no_hp_to_lineout(struct hda_codec *codec,
4090 const struct hda_fixup *fix, int action)
4092 struct alc_spec *spec = codec->spec;
4094 if (action == HDA_FIXUP_ACT_PRE_PROBE)
4095 spec->parse_flags = HDA_PINCFG_NO_HP_FIXUP;
4098 static void alc269_fixup_pincfg_U7x7_headset_mic(struct hda_codec *codec,
4099 const struct hda_fixup *fix,
4102 unsigned int cfg_headphone = snd_hda_codec_get_pincfg(codec, 0x21);
4103 unsigned int cfg_headset_mic = snd_hda_codec_get_pincfg(codec, 0x19);
4105 if (cfg_headphone && cfg_headset_mic == 0x411111f0)
4106 snd_hda_codec_set_pincfg(codec, 0x19,
4107 (cfg_headphone & ~AC_DEFCFG_DEVICE) |
4108 (AC_JACK_MIC_IN << AC_DEFCFG_DEVICE_SHIFT));
4111 static void alc269_fixup_hweq(struct hda_codec *codec,
4112 const struct hda_fixup *fix, int action)
4114 if (action == HDA_FIXUP_ACT_INIT)
4115 alc_update_coef_idx(codec, 0x1e, 0, 0x80);
4118 static void alc269_fixup_headset_mic(struct hda_codec *codec,
4119 const struct hda_fixup *fix, int action)
4121 struct alc_spec *spec = codec->spec;
4123 if (action == HDA_FIXUP_ACT_PRE_PROBE)
4124 spec->parse_flags |= HDA_PINCFG_HEADSET_MIC;
4127 static void alc271_fixup_dmic(struct hda_codec *codec,
4128 const struct hda_fixup *fix, int action)
4130 static const struct hda_verb verbs[] = {
4131 {0x20, AC_VERB_SET_COEF_INDEX, 0x0d},
4132 {0x20, AC_VERB_SET_PROC_COEF, 0x4000},
4137 if (strcmp(codec->core.chip_name, "ALC271X") &&
4138 strcmp(codec->core.chip_name, "ALC269VB"))
4140 cfg = snd_hda_codec_get_pincfg(codec, 0x12);
4141 if (get_defcfg_connect(cfg) == AC_JACK_PORT_FIXED)
4142 snd_hda_sequence_write(codec, verbs);
4145 /* Fix the speaker amp after resume, etc */
4146 static void alc269vb_fixup_aspire_e1_coef(struct hda_codec *codec,
4147 const struct hda_fixup *fix,
4150 if (action == HDA_FIXUP_ACT_INIT)
4151 alc_update_coef_idx(codec, 0x0d, 0x6000, 0x6000);
4154 static void alc269_fixup_pcm_44k(struct hda_codec *codec,
4155 const struct hda_fixup *fix, int action)
4157 struct alc_spec *spec = codec->spec;
4159 if (action != HDA_FIXUP_ACT_PROBE)
4162 /* Due to a hardware problem on Lenovo Ideadpad, we need to
4163 * fix the sample rate of analog I/O to 44.1kHz
4165 spec->gen.stream_analog_playback = &alc269_44k_pcm_analog_playback;
4166 spec->gen.stream_analog_capture = &alc269_44k_pcm_analog_capture;
4169 static void alc269_fixup_stereo_dmic(struct hda_codec *codec,
4170 const struct hda_fixup *fix, int action)
4172 /* The digital-mic unit sends PDM (differential signal) instead of
4173 * the standard PCM, thus you can't record a valid mono stream as is.
4174 * Below is a workaround specific to ALC269 to control the dmic
4175 * signal source as mono.
4177 if (action == HDA_FIXUP_ACT_INIT)
4178 alc_update_coef_idx(codec, 0x07, 0, 0x80);
4181 static void alc269_quanta_automute(struct hda_codec *codec)
4183 snd_hda_gen_update_outputs(codec);
4185 alc_write_coef_idx(codec, 0x0c, 0x680);
4186 alc_write_coef_idx(codec, 0x0c, 0x480);
4189 static void alc269_fixup_quanta_mute(struct hda_codec *codec,
4190 const struct hda_fixup *fix, int action)
4192 struct alc_spec *spec = codec->spec;
4193 if (action != HDA_FIXUP_ACT_PROBE)
4195 spec->gen.automute_hook = alc269_quanta_automute;
4198 static void alc269_x101_hp_automute_hook(struct hda_codec *codec,
4199 struct hda_jack_callback *jack)
4201 struct alc_spec *spec = codec->spec;
4204 snd_hda_gen_hp_automute(codec, jack);
4206 vref = spec->gen.hp_jack_present ? PIN_VREF80 : 0;
4208 snd_hda_codec_write(codec, 0x18, 0, AC_VERB_SET_PIN_WIDGET_CONTROL,
4211 snd_hda_codec_write(codec, 0x18, 0, AC_VERB_SET_PIN_WIDGET_CONTROL,
4216 * Magic sequence to make Huawei Matebook X right speaker working (bko#197801)
4218 struct hda_alc298_mbxinit {
4219 unsigned char value_0x23;
4220 unsigned char value_0x25;
4223 static void alc298_huawei_mbx_stereo_seq(struct hda_codec *codec,
4224 const struct hda_alc298_mbxinit *initval,
4227 snd_hda_codec_write(codec, 0x06, 0, AC_VERB_SET_DIGI_CONVERT_3, 0x0);
4228 alc_write_coef_idx(codec, 0x26, 0xb000);
4231 snd_hda_codec_write(codec, 0x21, 0, AC_VERB_GET_PIN_SENSE, 0x0);
4233 snd_hda_codec_write(codec, 0x6, 0, AC_VERB_SET_DIGI_CONVERT_3, 0x80);
4234 alc_write_coef_idx(codec, 0x26, 0xf000);
4235 alc_write_coef_idx(codec, 0x23, initval->value_0x23);
4237 if (initval->value_0x23 != 0x1e)
4238 alc_write_coef_idx(codec, 0x25, initval->value_0x25);
4240 snd_hda_codec_write(codec, 0x20, 0, AC_VERB_SET_COEF_INDEX, 0x26);
4241 snd_hda_codec_write(codec, 0x20, 0, AC_VERB_SET_PROC_COEF, 0xb010);
4244 static void alc298_fixup_huawei_mbx_stereo(struct hda_codec *codec,
4245 const struct hda_fixup *fix,
4248 /* Initialization magic */
4249 static const struct hda_alc298_mbxinit dac_init[] = {
4250 {0x0c, 0x00}, {0x0d, 0x00}, {0x0e, 0x00}, {0x0f, 0x00},
4251 {0x10, 0x00}, {0x1a, 0x40}, {0x1b, 0x82}, {0x1c, 0x00},
4252 {0x1d, 0x00}, {0x1e, 0x00}, {0x1f, 0x00},
4253 {0x20, 0xc2}, {0x21, 0xc8}, {0x22, 0x26}, {0x23, 0x24},
4254 {0x27, 0xff}, {0x28, 0xff}, {0x29, 0xff}, {0x2a, 0x8f},
4255 {0x2b, 0x02}, {0x2c, 0x48}, {0x2d, 0x34}, {0x2e, 0x00},
4257 {0x30, 0x00}, {0x31, 0x00}, {0x32, 0x00}, {0x33, 0x00},
4258 {0x34, 0x00}, {0x35, 0x01}, {0x36, 0x93}, {0x37, 0x0c},
4259 {0x38, 0x00}, {0x39, 0x00}, {0x3a, 0xf8}, {0x38, 0x80},
4262 const struct hda_alc298_mbxinit *seq;
4264 if (action != HDA_FIXUP_ACT_INIT)
4268 snd_hda_codec_write(codec, 0x06, 0, AC_VERB_SET_DIGI_CONVERT_3, 0x00);
4269 snd_hda_codec_write(codec, 0x06, 0, AC_VERB_SET_DIGI_CONVERT_3, 0x80);
4270 alc_write_coef_idx(codec, 0x26, 0xf000);
4271 alc_write_coef_idx(codec, 0x22, 0x31);
4272 alc_write_coef_idx(codec, 0x23, 0x0b);
4273 alc_write_coef_idx(codec, 0x25, 0x00);
4274 snd_hda_codec_write(codec, 0x20, 0, AC_VERB_SET_COEF_INDEX, 0x26);
4275 snd_hda_codec_write(codec, 0x20, 0, AC_VERB_SET_PROC_COEF, 0xb010);
4277 for (seq = dac_init; seq->value_0x23; seq++)
4278 alc298_huawei_mbx_stereo_seq(codec, seq, seq == dac_init);
4281 static void alc269_fixup_x101_headset_mic(struct hda_codec *codec,
4282 const struct hda_fixup *fix, int action)
4284 struct alc_spec *spec = codec->spec;
4285 if (action == HDA_FIXUP_ACT_PRE_PROBE) {
4286 spec->parse_flags |= HDA_PINCFG_HEADSET_MIC;
4287 spec->gen.hp_automute_hook = alc269_x101_hp_automute_hook;
4291 static void alc_update_vref_led(struct hda_codec *codec, hda_nid_t pin,
4292 bool polarity, bool on)
4294 unsigned int pinval;
4300 pinval = snd_hda_codec_get_pin_target(codec, pin);
4301 pinval &= ~AC_PINCTL_VREFEN;
4302 pinval |= on ? AC_PINCTL_VREF_80 : AC_PINCTL_VREF_HIZ;
4303 /* temporarily power up/down for setting VREF */
4304 snd_hda_power_up_pm(codec);
4305 snd_hda_set_pin_ctl_cache(codec, pin, pinval);
4306 snd_hda_power_down_pm(codec);
4309 /* update mute-LED according to the speaker mute state via mic VREF pin */
4310 static int vref_mute_led_set(struct led_classdev *led_cdev,
4311 enum led_brightness brightness)
4313 struct hda_codec *codec = dev_to_hda_codec(led_cdev->dev->parent);
4314 struct alc_spec *spec = codec->spec;
4316 alc_update_vref_led(codec, spec->mute_led_nid,
4317 spec->mute_led_polarity, brightness);
4321 /* Make sure the led works even in runtime suspend */
4322 static unsigned int led_power_filter(struct hda_codec *codec,
4324 unsigned int power_state)
4326 struct alc_spec *spec = codec->spec;
4328 if (power_state != AC_PWRST_D3 || nid == 0 ||
4329 (nid != spec->mute_led_nid && nid != spec->cap_mute_led_nid))
4332 /* Set pin ctl again, it might have just been set to 0 */
4333 snd_hda_set_pin_ctl(codec, nid,
4334 snd_hda_codec_get_pin_target(codec, nid));
4336 return snd_hda_gen_path_power_filter(codec, nid, power_state);
4339 static void alc269_fixup_hp_mute_led(struct hda_codec *codec,
4340 const struct hda_fixup *fix, int action)
4342 struct alc_spec *spec = codec->spec;
4343 const struct dmi_device *dev = NULL;
4345 if (action != HDA_FIXUP_ACT_PRE_PROBE)
4348 while ((dev = dmi_find_device(DMI_DEV_TYPE_OEM_STRING, NULL, dev))) {
4350 if (sscanf(dev->name, "HP_Mute_LED_%d_%x", &pol, &pin) != 2)
4352 if (pin < 0x0a || pin >= 0x10)
4354 spec->mute_led_polarity = pol;
4355 spec->mute_led_nid = pin - 0x0a + 0x18;
4356 snd_hda_gen_add_mute_led_cdev(codec, vref_mute_led_set);
4357 codec->power_filter = led_power_filter;
4359 "Detected mute LED for %x:%d\n", spec->mute_led_nid,
4360 spec->mute_led_polarity);
4365 static void alc269_fixup_hp_mute_led_micx(struct hda_codec *codec,
4366 const struct hda_fixup *fix,
4367 int action, hda_nid_t pin)
4369 struct alc_spec *spec = codec->spec;
4371 if (action == HDA_FIXUP_ACT_PRE_PROBE) {
4372 spec->mute_led_polarity = 0;
4373 spec->mute_led_nid = pin;
4374 snd_hda_gen_add_mute_led_cdev(codec, vref_mute_led_set);
4375 codec->power_filter = led_power_filter;
4379 static void alc269_fixup_hp_mute_led_mic1(struct hda_codec *codec,
4380 const struct hda_fixup *fix, int action)
4382 alc269_fixup_hp_mute_led_micx(codec, fix, action, 0x18);
4385 static void alc269_fixup_hp_mute_led_mic2(struct hda_codec *codec,
4386 const struct hda_fixup *fix, int action)
4388 alc269_fixup_hp_mute_led_micx(codec, fix, action, 0x19);
4391 static void alc269_fixup_hp_mute_led_mic3(struct hda_codec *codec,
4392 const struct hda_fixup *fix, int action)
4394 alc269_fixup_hp_mute_led_micx(codec, fix, action, 0x1b);
4397 /* update LED status via GPIO */
4398 static void alc_update_gpio_led(struct hda_codec *codec, unsigned int mask,
4399 int polarity, bool enabled)
4403 alc_update_gpio_data(codec, mask, !enabled); /* muted -> LED on */
4406 /* turn on/off mute LED via GPIO per vmaster hook */
4407 static int gpio_mute_led_set(struct led_classdev *led_cdev,
4408 enum led_brightness brightness)
4410 struct hda_codec *codec = dev_to_hda_codec(led_cdev->dev->parent);
4411 struct alc_spec *spec = codec->spec;
4413 alc_update_gpio_led(codec, spec->gpio_mute_led_mask,
4414 spec->mute_led_polarity, !brightness);
4418 /* turn on/off mic-mute LED via GPIO per capture hook */
4419 static int micmute_led_set(struct led_classdev *led_cdev,
4420 enum led_brightness brightness)
4422 struct hda_codec *codec = dev_to_hda_codec(led_cdev->dev->parent);
4423 struct alc_spec *spec = codec->spec;
4425 alc_update_gpio_led(codec, spec->gpio_mic_led_mask,
4426 spec->micmute_led_polarity, !brightness);
4430 /* setup mute and mic-mute GPIO bits, add hooks appropriately */
4431 static void alc_fixup_hp_gpio_led(struct hda_codec *codec,
4433 unsigned int mute_mask,
4434 unsigned int micmute_mask)
4436 struct alc_spec *spec = codec->spec;
4438 alc_fixup_gpio(codec, action, mute_mask | micmute_mask);
4440 if (action != HDA_FIXUP_ACT_PRE_PROBE)
4443 spec->gpio_mute_led_mask = mute_mask;
4444 snd_hda_gen_add_mute_led_cdev(codec, gpio_mute_led_set);
4447 spec->gpio_mic_led_mask = micmute_mask;
4448 snd_hda_gen_add_micmute_led_cdev(codec, micmute_led_set);
4452 static void alc236_fixup_hp_gpio_led(struct hda_codec *codec,
4453 const struct hda_fixup *fix, int action)
4455 alc_fixup_hp_gpio_led(codec, action, 0x02, 0x01);
4458 static void alc269_fixup_hp_gpio_led(struct hda_codec *codec,
4459 const struct hda_fixup *fix, int action)
4461 alc_fixup_hp_gpio_led(codec, action, 0x08, 0x10);
4464 static void alc285_fixup_hp_gpio_led(struct hda_codec *codec,
4465 const struct hda_fixup *fix, int action)
4467 alc_fixup_hp_gpio_led(codec, action, 0x04, 0x01);
4470 static void alc286_fixup_hp_gpio_led(struct hda_codec *codec,
4471 const struct hda_fixup *fix, int action)
4473 alc_fixup_hp_gpio_led(codec, action, 0x02, 0x20);
4476 static void alc287_fixup_hp_gpio_led(struct hda_codec *codec,
4477 const struct hda_fixup *fix, int action)
4479 alc_fixup_hp_gpio_led(codec, action, 0x10, 0);
4482 static void alc245_fixup_hp_gpio_led(struct hda_codec *codec,
4483 const struct hda_fixup *fix, int action)
4485 struct alc_spec *spec = codec->spec;
4487 if (action == HDA_FIXUP_ACT_PRE_PROBE)
4488 spec->micmute_led_polarity = 1;
4489 alc_fixup_hp_gpio_led(codec, action, 0, 0x04);
4492 /* turn on/off mic-mute LED per capture hook via VREF change */
4493 static int vref_micmute_led_set(struct led_classdev *led_cdev,
4494 enum led_brightness brightness)
4496 struct hda_codec *codec = dev_to_hda_codec(led_cdev->dev->parent);
4497 struct alc_spec *spec = codec->spec;
4499 alc_update_vref_led(codec, spec->cap_mute_led_nid,
4500 spec->micmute_led_polarity, brightness);
4504 static void alc269_fixup_hp_gpio_mic1_led(struct hda_codec *codec,
4505 const struct hda_fixup *fix, int action)
4507 struct alc_spec *spec = codec->spec;
4509 alc_fixup_hp_gpio_led(codec, action, 0x08, 0);
4510 if (action == HDA_FIXUP_ACT_PRE_PROBE) {
4511 /* Like hp_gpio_mic1_led, but also needs GPIO4 low to
4512 * enable headphone amp
4514 spec->gpio_mask |= 0x10;
4515 spec->gpio_dir |= 0x10;
4516 spec->cap_mute_led_nid = 0x18;
4517 snd_hda_gen_add_micmute_led_cdev(codec, vref_micmute_led_set);
4518 codec->power_filter = led_power_filter;
4522 static void alc280_fixup_hp_gpio4(struct hda_codec *codec,
4523 const struct hda_fixup *fix, int action)
4525 struct alc_spec *spec = codec->spec;
4527 alc_fixup_hp_gpio_led(codec, action, 0x08, 0);
4528 if (action == HDA_FIXUP_ACT_PRE_PROBE) {
4529 spec->cap_mute_led_nid = 0x18;
4530 snd_hda_gen_add_micmute_led_cdev(codec, vref_micmute_led_set);
4531 codec->power_filter = led_power_filter;
4535 /* HP Spectre x360 14 model needs a unique workaround for enabling the amp;
4536 * it needs to toggle the GPIO0 once on and off at each time (bko#210633)
4538 static void alc245_fixup_hp_x360_amp(struct hda_codec *codec,
4539 const struct hda_fixup *fix, int action)
4541 struct alc_spec *spec = codec->spec;
4544 case HDA_FIXUP_ACT_PRE_PROBE:
4545 spec->gpio_mask |= 0x01;
4546 spec->gpio_dir |= 0x01;
4548 case HDA_FIXUP_ACT_INIT:
4549 /* need to toggle GPIO to enable the amp */
4550 alc_update_gpio_data(codec, 0x01, true);
4552 alc_update_gpio_data(codec, 0x01, false);
4557 /* toggle GPIO2 at each time stream is started; we use PREPARE state instead */
4558 static void alc274_hp_envy_pcm_hook(struct hda_pcm_stream *hinfo,
4559 struct hda_codec *codec,
4560 struct snd_pcm_substream *substream,
4564 case HDA_GEN_PCM_ACT_PREPARE:
4565 alc_update_gpio_data(codec, 0x04, true);
4567 case HDA_GEN_PCM_ACT_CLEANUP:
4568 alc_update_gpio_data(codec, 0x04, false);
4573 static void alc274_fixup_hp_envy_gpio(struct hda_codec *codec,
4574 const struct hda_fixup *fix,
4577 struct alc_spec *spec = codec->spec;
4579 if (action == HDA_FIXUP_ACT_PROBE) {
4580 spec->gpio_mask |= 0x04;
4581 spec->gpio_dir |= 0x04;
4582 spec->gen.pcm_playback_hook = alc274_hp_envy_pcm_hook;
4586 static void alc_update_coef_led(struct hda_codec *codec,
4587 struct alc_coef_led *led,
4588 bool polarity, bool on)
4592 /* temporarily power up/down for setting COEF bit */
4593 alc_update_coef_idx(codec, led->idx, led->mask,
4594 on ? led->on : led->off);
4597 /* update mute-LED according to the speaker mute state via COEF bit */
4598 static int coef_mute_led_set(struct led_classdev *led_cdev,
4599 enum led_brightness brightness)
4601 struct hda_codec *codec = dev_to_hda_codec(led_cdev->dev->parent);
4602 struct alc_spec *spec = codec->spec;
4604 alc_update_coef_led(codec, &spec->mute_led_coef,
4605 spec->mute_led_polarity, brightness);
4609 static void alc285_fixup_hp_mute_led_coefbit(struct hda_codec *codec,
4610 const struct hda_fixup *fix,
4613 struct alc_spec *spec = codec->spec;
4615 if (action == HDA_FIXUP_ACT_PRE_PROBE) {
4616 spec->mute_led_polarity = 0;
4617 spec->mute_led_coef.idx = 0x0b;
4618 spec->mute_led_coef.mask = 1 << 3;
4619 spec->mute_led_coef.on = 1 << 3;
4620 spec->mute_led_coef.off = 0;
4621 snd_hda_gen_add_mute_led_cdev(codec, coef_mute_led_set);
4625 static void alc236_fixup_hp_mute_led_coefbit(struct hda_codec *codec,
4626 const struct hda_fixup *fix,
4629 struct alc_spec *spec = codec->spec;
4631 if (action == HDA_FIXUP_ACT_PRE_PROBE) {
4632 spec->mute_led_polarity = 0;
4633 spec->mute_led_coef.idx = 0x34;
4634 spec->mute_led_coef.mask = 1 << 5;
4635 spec->mute_led_coef.on = 0;
4636 spec->mute_led_coef.off = 1 << 5;
4637 snd_hda_gen_add_mute_led_cdev(codec, coef_mute_led_set);
4641 static void alc236_fixup_hp_mute_led_coefbit2(struct hda_codec *codec,
4642 const struct hda_fixup *fix, int action)
4644 struct alc_spec *spec = codec->spec;
4646 if (action == HDA_FIXUP_ACT_PRE_PROBE) {
4647 spec->mute_led_polarity = 0;
4648 spec->mute_led_coef.idx = 0x07;
4649 spec->mute_led_coef.mask = 1;
4650 spec->mute_led_coef.on = 1;
4651 spec->mute_led_coef.off = 0;
4652 snd_hda_gen_add_mute_led_cdev(codec, coef_mute_led_set);
4656 static void alc245_fixup_hp_mute_led_coefbit(struct hda_codec *codec,
4657 const struct hda_fixup *fix,
4660 struct alc_spec *spec = codec->spec;
4662 if (action == HDA_FIXUP_ACT_PRE_PROBE) {
4663 spec->mute_led_polarity = 0;
4664 spec->mute_led_coef.idx = 0x0b;
4665 spec->mute_led_coef.mask = 3 << 2;
4666 spec->mute_led_coef.on = 2 << 2;
4667 spec->mute_led_coef.off = 1 << 2;
4668 snd_hda_gen_add_mute_led_cdev(codec, coef_mute_led_set);
4672 /* turn on/off mic-mute LED per capture hook by coef bit */
4673 static int coef_micmute_led_set(struct led_classdev *led_cdev,
4674 enum led_brightness brightness)
4676 struct hda_codec *codec = dev_to_hda_codec(led_cdev->dev->parent);
4677 struct alc_spec *spec = codec->spec;
4679 alc_update_coef_led(codec, &spec->mic_led_coef,
4680 spec->micmute_led_polarity, brightness);
4684 static void alc285_fixup_hp_coef_micmute_led(struct hda_codec *codec,
4685 const struct hda_fixup *fix, int action)
4687 struct alc_spec *spec = codec->spec;
4689 if (action == HDA_FIXUP_ACT_PRE_PROBE) {
4690 spec->mic_led_coef.idx = 0x19;
4691 spec->mic_led_coef.mask = 1 << 13;
4692 spec->mic_led_coef.on = 1 << 13;
4693 spec->mic_led_coef.off = 0;
4694 snd_hda_gen_add_micmute_led_cdev(codec, coef_micmute_led_set);
4698 static void alc285_fixup_hp_gpio_micmute_led(struct hda_codec *codec,
4699 const struct hda_fixup *fix, int action)
4701 struct alc_spec *spec = codec->spec;
4703 if (action == HDA_FIXUP_ACT_PRE_PROBE)
4704 spec->micmute_led_polarity = 1;
4705 alc_fixup_hp_gpio_led(codec, action, 0, 0x04);
4708 static void alc236_fixup_hp_coef_micmute_led(struct hda_codec *codec,
4709 const struct hda_fixup *fix, int action)
4711 struct alc_spec *spec = codec->spec;
4713 if (action == HDA_FIXUP_ACT_PRE_PROBE) {
4714 spec->mic_led_coef.idx = 0x35;
4715 spec->mic_led_coef.mask = 3 << 2;
4716 spec->mic_led_coef.on = 2 << 2;
4717 spec->mic_led_coef.off = 1 << 2;
4718 snd_hda_gen_add_micmute_led_cdev(codec, coef_micmute_led_set);
4722 static void alc285_fixup_hp_mute_led(struct hda_codec *codec,
4723 const struct hda_fixup *fix, int action)
4725 alc285_fixup_hp_mute_led_coefbit(codec, fix, action);
4726 alc285_fixup_hp_coef_micmute_led(codec, fix, action);
4729 static void alc285_fixup_hp_spectre_x360_mute_led(struct hda_codec *codec,
4730 const struct hda_fixup *fix, int action)
4732 alc285_fixup_hp_mute_led_coefbit(codec, fix, action);
4733 alc285_fixup_hp_gpio_micmute_led(codec, fix, action);
4736 static void alc236_fixup_hp_mute_led(struct hda_codec *codec,
4737 const struct hda_fixup *fix, int action)
4739 alc236_fixup_hp_mute_led_coefbit(codec, fix, action);
4740 alc236_fixup_hp_coef_micmute_led(codec, fix, action);
4743 static void alc236_fixup_hp_micmute_led_vref(struct hda_codec *codec,
4744 const struct hda_fixup *fix, int action)
4746 struct alc_spec *spec = codec->spec;
4748 if (action == HDA_FIXUP_ACT_PRE_PROBE) {
4749 spec->cap_mute_led_nid = 0x1a;
4750 snd_hda_gen_add_micmute_led_cdev(codec, vref_micmute_led_set);
4751 codec->power_filter = led_power_filter;
4755 static void alc236_fixup_hp_mute_led_micmute_vref(struct hda_codec *codec,
4756 const struct hda_fixup *fix, int action)
4758 alc236_fixup_hp_mute_led_coefbit(codec, fix, action);
4759 alc236_fixup_hp_micmute_led_vref(codec, fix, action);
4762 static inline void alc298_samsung_write_coef_pack(struct hda_codec *codec,
4763 const unsigned short coefs[2])
4765 alc_write_coef_idx(codec, 0x23, coefs[0]);
4766 alc_write_coef_idx(codec, 0x25, coefs[1]);
4767 alc_write_coef_idx(codec, 0x26, 0xb011);
4770 struct alc298_samsung_amp_desc {
4772 unsigned short init_seq[2][2];
4775 static void alc298_fixup_samsung_amp(struct hda_codec *codec,
4776 const struct hda_fixup *fix, int action)
4779 static const unsigned short init_seq[][2] = {
4780 { 0x19, 0x00 }, { 0x20, 0xc0 }, { 0x22, 0x44 }, { 0x23, 0x08 },
4781 { 0x24, 0x85 }, { 0x25, 0x41 }, { 0x35, 0x40 }, { 0x36, 0x01 },
4782 { 0x38, 0x81 }, { 0x3a, 0x03 }, { 0x3b, 0x81 }, { 0x40, 0x3e },
4783 { 0x41, 0x07 }, { 0x400, 0x1 }
4785 static const struct alc298_samsung_amp_desc amps[] = {
4786 { 0x3a, { { 0x18, 0x1 }, { 0x26, 0x0 } } },
4787 { 0x39, { { 0x18, 0x2 }, { 0x26, 0x1 } } }
4790 if (action != HDA_FIXUP_ACT_INIT)
4793 for (i = 0; i < ARRAY_SIZE(amps); i++) {
4794 alc_write_coef_idx(codec, 0x22, amps[i].nid);
4796 for (j = 0; j < ARRAY_SIZE(amps[i].init_seq); j++)
4797 alc298_samsung_write_coef_pack(codec, amps[i].init_seq[j]);
4799 for (j = 0; j < ARRAY_SIZE(init_seq); j++)
4800 alc298_samsung_write_coef_pack(codec, init_seq[j]);
4804 #if IS_REACHABLE(CONFIG_INPUT)
4805 static void gpio2_mic_hotkey_event(struct hda_codec *codec,
4806 struct hda_jack_callback *event)
4808 struct alc_spec *spec = codec->spec;
4810 /* GPIO2 just toggles on a keypress/keyrelease cycle. Therefore
4811 send both key on and key off event for every interrupt. */
4812 input_report_key(spec->kb_dev, spec->alc_mute_keycode_map[ALC_KEY_MICMUTE_INDEX], 1);
4813 input_sync(spec->kb_dev);
4814 input_report_key(spec->kb_dev, spec->alc_mute_keycode_map[ALC_KEY_MICMUTE_INDEX], 0);
4815 input_sync(spec->kb_dev);
4818 static int alc_register_micmute_input_device(struct hda_codec *codec)
4820 struct alc_spec *spec = codec->spec;
4823 spec->kb_dev = input_allocate_device();
4824 if (!spec->kb_dev) {
4825 codec_err(codec, "Out of memory (input_allocate_device)\n");
4829 spec->alc_mute_keycode_map[ALC_KEY_MICMUTE_INDEX] = KEY_MICMUTE;
4831 spec->kb_dev->name = "Microphone Mute Button";
4832 spec->kb_dev->evbit[0] = BIT_MASK(EV_KEY);
4833 spec->kb_dev->keycodesize = sizeof(spec->alc_mute_keycode_map[0]);
4834 spec->kb_dev->keycodemax = ARRAY_SIZE(spec->alc_mute_keycode_map);
4835 spec->kb_dev->keycode = spec->alc_mute_keycode_map;
4836 for (i = 0; i < ARRAY_SIZE(spec->alc_mute_keycode_map); i++)
4837 set_bit(spec->alc_mute_keycode_map[i], spec->kb_dev->keybit);
4839 if (input_register_device(spec->kb_dev)) {
4840 codec_err(codec, "input_register_device failed\n");
4841 input_free_device(spec->kb_dev);
4842 spec->kb_dev = NULL;
4849 /* GPIO1 = set according to SKU external amp
4850 * GPIO2 = mic mute hotkey
4852 * GPIO4 = mic mute LED
4854 static void alc280_fixup_hp_gpio2_mic_hotkey(struct hda_codec *codec,
4855 const struct hda_fixup *fix, int action)
4857 struct alc_spec *spec = codec->spec;
4859 alc_fixup_hp_gpio_led(codec, action, 0x08, 0x10);
4860 if (action == HDA_FIXUP_ACT_PRE_PROBE) {
4861 spec->init_amp = ALC_INIT_DEFAULT;
4862 if (alc_register_micmute_input_device(codec) != 0)
4865 spec->gpio_mask |= 0x06;
4866 spec->gpio_dir |= 0x02;
4867 spec->gpio_data |= 0x02;
4868 snd_hda_codec_write_cache(codec, codec->core.afg, 0,
4869 AC_VERB_SET_GPIO_UNSOLICITED_RSP_MASK, 0x04);
4870 snd_hda_jack_detect_enable_callback(codec, codec->core.afg,
4871 gpio2_mic_hotkey_event);
4879 case HDA_FIXUP_ACT_FREE:
4880 input_unregister_device(spec->kb_dev);
4881 spec->kb_dev = NULL;
4885 /* Line2 = mic mute hotkey
4886 * GPIO2 = mic mute LED
4888 static void alc233_fixup_lenovo_line2_mic_hotkey(struct hda_codec *codec,
4889 const struct hda_fixup *fix, int action)
4891 struct alc_spec *spec = codec->spec;
4893 alc_fixup_hp_gpio_led(codec, action, 0, 0x04);
4894 if (action == HDA_FIXUP_ACT_PRE_PROBE) {
4895 spec->init_amp = ALC_INIT_DEFAULT;
4896 if (alc_register_micmute_input_device(codec) != 0)
4899 snd_hda_jack_detect_enable_callback(codec, 0x1b,
4900 gpio2_mic_hotkey_event);
4908 case HDA_FIXUP_ACT_FREE:
4909 input_unregister_device(spec->kb_dev);
4910 spec->kb_dev = NULL;
4914 #define alc280_fixup_hp_gpio2_mic_hotkey NULL
4915 #define alc233_fixup_lenovo_line2_mic_hotkey NULL
4918 static void alc269_fixup_hp_line1_mic1_led(struct hda_codec *codec,
4919 const struct hda_fixup *fix, int action)
4921 struct alc_spec *spec = codec->spec;
4923 alc269_fixup_hp_mute_led_micx(codec, fix, action, 0x1a);
4924 if (action == HDA_FIXUP_ACT_PRE_PROBE) {
4925 spec->cap_mute_led_nid = 0x18;
4926 snd_hda_gen_add_micmute_led_cdev(codec, vref_micmute_led_set);
4930 static const struct coef_fw alc225_pre_hsmode[] = {
4931 UPDATE_COEF(0x4a, 1<<8, 0),
4932 UPDATE_COEFEX(0x57, 0x05, 1<<14, 0),
4933 UPDATE_COEF(0x63, 3<<14, 3<<14),
4934 UPDATE_COEF(0x4a, 3<<4, 2<<4),
4935 UPDATE_COEF(0x4a, 3<<10, 3<<10),
4936 UPDATE_COEF(0x45, 0x3f<<10, 0x34<<10),
4937 UPDATE_COEF(0x4a, 3<<10, 0),
4941 static void alc_headset_mode_unplugged(struct hda_codec *codec)
4943 struct alc_spec *spec = codec->spec;
4944 static const struct coef_fw coef0255[] = {
4945 WRITE_COEF(0x1b, 0x0c0b), /* LDO and MISC control */
4946 WRITE_COEF(0x45, 0xd089), /* UAJ function set to menual mode */
4947 UPDATE_COEFEX(0x57, 0x05, 1<<14, 0), /* Direct Drive HP Amp control(Set to verb control)*/
4948 WRITE_COEF(0x06, 0x6104), /* Set MIC2 Vref gate with HP */
4949 WRITE_COEFEX(0x57, 0x03, 0x8aa6), /* Direct Drive HP Amp control */
4952 static const struct coef_fw coef0256[] = {
4953 WRITE_COEF(0x1b, 0x0c4b), /* LDO and MISC control */
4954 WRITE_COEF(0x45, 0xd089), /* UAJ function set to menual mode */
4955 WRITE_COEF(0x06, 0x6104), /* Set MIC2 Vref gate with HP */
4956 WRITE_COEFEX(0x57, 0x03, 0x09a3), /* Direct Drive HP Amp control */
4957 UPDATE_COEFEX(0x57, 0x05, 1<<14, 0), /* Direct Drive HP Amp control(Set to verb control)*/
4960 static const struct coef_fw coef0233[] = {
4961 WRITE_COEF(0x1b, 0x0c0b),
4962 WRITE_COEF(0x45, 0xc429),
4963 UPDATE_COEF(0x35, 0x4000, 0),
4964 WRITE_COEF(0x06, 0x2104),
4965 WRITE_COEF(0x1a, 0x0001),
4966 WRITE_COEF(0x26, 0x0004),
4967 WRITE_COEF(0x32, 0x42a3),
4970 static const struct coef_fw coef0288[] = {
4971 UPDATE_COEF(0x4f, 0xfcc0, 0xc400),
4972 UPDATE_COEF(0x50, 0x2000, 0x2000),
4973 UPDATE_COEF(0x56, 0x0006, 0x0006),
4974 UPDATE_COEF(0x66, 0x0008, 0),
4975 UPDATE_COEF(0x67, 0x2000, 0),
4978 static const struct coef_fw coef0298[] = {
4979 UPDATE_COEF(0x19, 0x1300, 0x0300),
4982 static const struct coef_fw coef0292[] = {
4983 WRITE_COEF(0x76, 0x000e),
4984 WRITE_COEF(0x6c, 0x2400),
4985 WRITE_COEF(0x18, 0x7308),
4986 WRITE_COEF(0x6b, 0xc429),
4989 static const struct coef_fw coef0293[] = {
4990 UPDATE_COEF(0x10, 7<<8, 6<<8), /* SET Line1 JD to 0 */
4991 UPDATE_COEFEX(0x57, 0x05, 1<<15|1<<13, 0x0), /* SET charge pump by verb */
4992 UPDATE_COEFEX(0x57, 0x03, 1<<10, 1<<10), /* SET EN_OSW to 1 */
4993 UPDATE_COEF(0x1a, 1<<3, 1<<3), /* Combo JD gating with LINE1-VREFO */
4994 WRITE_COEF(0x45, 0xc429), /* Set to TRS type */
4995 UPDATE_COEF(0x4a, 0x000f, 0x000e), /* Combo Jack auto detect */
4998 static const struct coef_fw coef0668[] = {
4999 WRITE_COEF(0x15, 0x0d40),
5000 WRITE_COEF(0xb7, 0x802b),
5003 static const struct coef_fw coef0225[] = {
5004 UPDATE_COEF(0x63, 3<<14, 0),
5007 static const struct coef_fw coef0274[] = {
5008 UPDATE_COEF(0x4a, 0x0100, 0),
5009 UPDATE_COEFEX(0x57, 0x05, 0x4000, 0),
5010 UPDATE_COEF(0x6b, 0xf000, 0x5000),
5011 UPDATE_COEF(0x4a, 0x0010, 0),
5012 UPDATE_COEF(0x4a, 0x0c00, 0x0c00),
5013 WRITE_COEF(0x45, 0x5289),
5014 UPDATE_COEF(0x4a, 0x0c00, 0),
5018 if (spec->no_internal_mic_pin) {
5019 alc_update_coef_idx(codec, 0x45, 0xf<<12 | 1<<10, 5<<12);
5023 switch (codec->core.vendor_id) {
5025 alc_process_coef_fw(codec, coef0255);
5031 alc_process_coef_fw(codec, coef0256);
5036 alc_process_coef_fw(codec, coef0274);
5040 alc_process_coef_fw(codec, coef0233);
5044 alc_process_coef_fw(codec, coef0288);
5047 alc_process_coef_fw(codec, coef0298);
5048 alc_process_coef_fw(codec, coef0288);
5051 alc_process_coef_fw(codec, coef0292);
5054 alc_process_coef_fw(codec, coef0293);
5057 alc_process_coef_fw(codec, coef0668);
5065 alc_process_coef_fw(codec, alc225_pre_hsmode);
5066 alc_process_coef_fw(codec, coef0225);
5069 alc_update_coefex_idx(codec, 0x57, 0x5, 1<<14, 0);
5072 codec_dbg(codec, "Headset jack set to unplugged mode.\n");
5076 static void alc_headset_mode_mic_in(struct hda_codec *codec, hda_nid_t hp_pin,
5079 static const struct coef_fw coef0255[] = {
5080 WRITE_COEFEX(0x57, 0x03, 0x8aa6),
5081 WRITE_COEF(0x06, 0x6100), /* Set MIC2 Vref gate to normal */
5084 static const struct coef_fw coef0256[] = {
5085 UPDATE_COEFEX(0x57, 0x05, 1<<14, 1<<14), /* Direct Drive HP Amp control(Set to verb control)*/
5086 WRITE_COEFEX(0x57, 0x03, 0x09a3),
5087 WRITE_COEF(0x06, 0x6100), /* Set MIC2 Vref gate to normal */
5090 static const struct coef_fw coef0233[] = {
5091 UPDATE_COEF(0x35, 0, 1<<14),
5092 WRITE_COEF(0x06, 0x2100),
5093 WRITE_COEF(0x1a, 0x0021),
5094 WRITE_COEF(0x26, 0x008c),
5097 static const struct coef_fw coef0288[] = {
5098 UPDATE_COEF(0x4f, 0x00c0, 0),
5099 UPDATE_COEF(0x50, 0x2000, 0),
5100 UPDATE_COEF(0x56, 0x0006, 0),
5101 UPDATE_COEF(0x4f, 0xfcc0, 0xc400),
5102 UPDATE_COEF(0x66, 0x0008, 0x0008),
5103 UPDATE_COEF(0x67, 0x2000, 0x2000),
5106 static const struct coef_fw coef0292[] = {
5107 WRITE_COEF(0x19, 0xa208),
5108 WRITE_COEF(0x2e, 0xacf0),
5111 static const struct coef_fw coef0293[] = {
5112 UPDATE_COEFEX(0x57, 0x05, 0, 1<<15|1<<13), /* SET charge pump by verb */
5113 UPDATE_COEFEX(0x57, 0x03, 1<<10, 0), /* SET EN_OSW to 0 */
5114 UPDATE_COEF(0x1a, 1<<3, 0), /* Combo JD gating without LINE1-VREFO */
5117 static const struct coef_fw coef0688[] = {
5118 WRITE_COEF(0xb7, 0x802b),
5119 WRITE_COEF(0xb5, 0x1040),
5120 UPDATE_COEF(0xc3, 0, 1<<12),
5123 static const struct coef_fw coef0225[] = {
5124 UPDATE_COEFEX(0x57, 0x05, 1<<14, 1<<14),
5125 UPDATE_COEF(0x4a, 3<<4, 2<<4),
5126 UPDATE_COEF(0x63, 3<<14, 0),
5129 static const struct coef_fw coef0274[] = {
5130 UPDATE_COEFEX(0x57, 0x05, 0x4000, 0x4000),
5131 UPDATE_COEF(0x4a, 0x0010, 0),
5132 UPDATE_COEF(0x6b, 0xf000, 0),
5136 switch (codec->core.vendor_id) {
5138 alc_write_coef_idx(codec, 0x45, 0xc489);
5139 snd_hda_set_pin_ctl_cache(codec, hp_pin, 0);
5140 alc_process_coef_fw(codec, coef0255);
5141 snd_hda_set_pin_ctl_cache(codec, mic_pin, PIN_VREF50);
5147 alc_write_coef_idx(codec, 0x45, 0xc489);
5148 snd_hda_set_pin_ctl_cache(codec, hp_pin, 0);
5149 alc_process_coef_fw(codec, coef0256);
5150 snd_hda_set_pin_ctl_cache(codec, mic_pin, PIN_VREF50);
5155 alc_write_coef_idx(codec, 0x45, 0x4689);
5156 snd_hda_set_pin_ctl_cache(codec, hp_pin, 0);
5157 alc_process_coef_fw(codec, coef0274);
5158 snd_hda_set_pin_ctl_cache(codec, mic_pin, PIN_VREF50);
5162 alc_write_coef_idx(codec, 0x45, 0xc429);
5163 snd_hda_set_pin_ctl_cache(codec, hp_pin, 0);
5164 alc_process_coef_fw(codec, coef0233);
5165 snd_hda_set_pin_ctl_cache(codec, mic_pin, PIN_VREF50);
5170 snd_hda_set_pin_ctl_cache(codec, hp_pin, 0);
5171 alc_process_coef_fw(codec, coef0288);
5172 snd_hda_set_pin_ctl_cache(codec, mic_pin, PIN_VREF50);
5175 snd_hda_set_pin_ctl_cache(codec, hp_pin, 0);
5176 alc_process_coef_fw(codec, coef0292);
5179 /* Set to TRS mode */
5180 alc_write_coef_idx(codec, 0x45, 0xc429);
5181 snd_hda_set_pin_ctl_cache(codec, hp_pin, 0);
5182 alc_process_coef_fw(codec, coef0293);
5183 snd_hda_set_pin_ctl_cache(codec, mic_pin, PIN_VREF50);
5186 alc_update_coefex_idx(codec, 0x57, 0x5, 0, 1<<14);
5190 snd_hda_set_pin_ctl_cache(codec, hp_pin, 0);
5191 snd_hda_set_pin_ctl_cache(codec, mic_pin, PIN_VREF50);
5194 alc_write_coef_idx(codec, 0x11, 0x0001);
5195 snd_hda_set_pin_ctl_cache(codec, hp_pin, 0);
5196 alc_process_coef_fw(codec, coef0688);
5197 snd_hda_set_pin_ctl_cache(codec, mic_pin, PIN_VREF50);
5205 alc_process_coef_fw(codec, alc225_pre_hsmode);
5206 alc_update_coef_idx(codec, 0x45, 0x3f<<10, 0x31<<10);
5207 snd_hda_set_pin_ctl_cache(codec, hp_pin, 0);
5208 alc_process_coef_fw(codec, coef0225);
5209 snd_hda_set_pin_ctl_cache(codec, mic_pin, PIN_VREF50);
5212 codec_dbg(codec, "Headset jack set to mic-in mode.\n");
5215 static void alc_headset_mode_default(struct hda_codec *codec)
5217 static const struct coef_fw coef0225[] = {
5218 UPDATE_COEF(0x45, 0x3f<<10, 0x30<<10),
5219 UPDATE_COEF(0x45, 0x3f<<10, 0x31<<10),
5220 UPDATE_COEF(0x49, 3<<8, 0<<8),
5221 UPDATE_COEF(0x4a, 3<<4, 3<<4),
5222 UPDATE_COEF(0x63, 3<<14, 0),
5223 UPDATE_COEF(0x67, 0xf000, 0x3000),
5226 static const struct coef_fw coef0255[] = {
5227 WRITE_COEF(0x45, 0xc089),
5228 WRITE_COEF(0x45, 0xc489),
5229 WRITE_COEFEX(0x57, 0x03, 0x8ea6),
5230 WRITE_COEF(0x49, 0x0049),
5233 static const struct coef_fw coef0256[] = {
5234 WRITE_COEF(0x45, 0xc489),
5235 WRITE_COEFEX(0x57, 0x03, 0x0da3),
5236 WRITE_COEF(0x49, 0x0049),
5237 UPDATE_COEFEX(0x57, 0x05, 1<<14, 0), /* Direct Drive HP Amp control(Set to verb control)*/
5238 WRITE_COEF(0x06, 0x6100),
5241 static const struct coef_fw coef0233[] = {
5242 WRITE_COEF(0x06, 0x2100),
5243 WRITE_COEF(0x32, 0x4ea3),
5246 static const struct coef_fw coef0288[] = {
5247 UPDATE_COEF(0x4f, 0xfcc0, 0xc400), /* Set to TRS type */
5248 UPDATE_COEF(0x50, 0x2000, 0x2000),
5249 UPDATE_COEF(0x56, 0x0006, 0x0006),
5250 UPDATE_COEF(0x66, 0x0008, 0),
5251 UPDATE_COEF(0x67, 0x2000, 0),
5254 static const struct coef_fw coef0292[] = {
5255 WRITE_COEF(0x76, 0x000e),
5256 WRITE_COEF(0x6c, 0x2400),
5257 WRITE_COEF(0x6b, 0xc429),
5258 WRITE_COEF(0x18, 0x7308),
5261 static const struct coef_fw coef0293[] = {
5262 UPDATE_COEF(0x4a, 0x000f, 0x000e), /* Combo Jack auto detect */
5263 WRITE_COEF(0x45, 0xC429), /* Set to TRS type */
5264 UPDATE_COEF(0x1a, 1<<3, 0), /* Combo JD gating without LINE1-VREFO */
5267 static const struct coef_fw coef0688[] = {
5268 WRITE_COEF(0x11, 0x0041),
5269 WRITE_COEF(0x15, 0x0d40),
5270 WRITE_COEF(0xb7, 0x802b),
5273 static const struct coef_fw coef0274[] = {
5274 WRITE_COEF(0x45, 0x4289),
5275 UPDATE_COEF(0x4a, 0x0010, 0x0010),
5276 UPDATE_COEF(0x6b, 0x0f00, 0),
5277 UPDATE_COEF(0x49, 0x0300, 0x0300),
5281 switch (codec->core.vendor_id) {
5288 alc_process_coef_fw(codec, alc225_pre_hsmode);
5289 alc_process_coef_fw(codec, coef0225);
5292 alc_process_coef_fw(codec, coef0255);
5298 alc_write_coef_idx(codec, 0x1b, 0x0e4b);
5299 alc_write_coef_idx(codec, 0x45, 0xc089);
5301 alc_process_coef_fw(codec, coef0256);
5306 alc_process_coef_fw(codec, coef0274);
5310 alc_process_coef_fw(codec, coef0233);
5315 alc_process_coef_fw(codec, coef0288);
5318 alc_process_coef_fw(codec, coef0292);
5321 alc_process_coef_fw(codec, coef0293);
5324 alc_process_coef_fw(codec, coef0688);
5327 alc_update_coefex_idx(codec, 0x57, 0x5, 1<<14, 0);
5330 codec_dbg(codec, "Headset jack set to headphone (default) mode.\n");
5334 static void alc_headset_mode_ctia(struct hda_codec *codec)
5338 static const struct coef_fw coef0255[] = {
5339 WRITE_COEF(0x45, 0xd489), /* Set to CTIA type */
5340 WRITE_COEF(0x1b, 0x0c2b),
5341 WRITE_COEFEX(0x57, 0x03, 0x8ea6),
5344 static const struct coef_fw coef0256[] = {
5345 WRITE_COEF(0x45, 0xd489), /* Set to CTIA type */
5346 WRITE_COEF(0x1b, 0x0e6b),
5349 static const struct coef_fw coef0233[] = {
5350 WRITE_COEF(0x45, 0xd429),
5351 WRITE_COEF(0x1b, 0x0c2b),
5352 WRITE_COEF(0x32, 0x4ea3),
5355 static const struct coef_fw coef0288[] = {
5356 UPDATE_COEF(0x50, 0x2000, 0x2000),
5357 UPDATE_COEF(0x56, 0x0006, 0x0006),
5358 UPDATE_COEF(0x66, 0x0008, 0),
5359 UPDATE_COEF(0x67, 0x2000, 0),
5362 static const struct coef_fw coef0292[] = {
5363 WRITE_COEF(0x6b, 0xd429),
5364 WRITE_COEF(0x76, 0x0008),
5365 WRITE_COEF(0x18, 0x7388),
5368 static const struct coef_fw coef0293[] = {
5369 WRITE_COEF(0x45, 0xd429), /* Set to ctia type */
5370 UPDATE_COEF(0x10, 7<<8, 7<<8), /* SET Line1 JD to 1 */
5373 static const struct coef_fw coef0688[] = {
5374 WRITE_COEF(0x11, 0x0001),
5375 WRITE_COEF(0x15, 0x0d60),
5376 WRITE_COEF(0xc3, 0x0000),
5379 static const struct coef_fw coef0225_1[] = {
5380 UPDATE_COEF(0x45, 0x3f<<10, 0x35<<10),
5381 UPDATE_COEF(0x63, 3<<14, 2<<14),
5384 static const struct coef_fw coef0225_2[] = {
5385 UPDATE_COEF(0x45, 0x3f<<10, 0x35<<10),
5386 UPDATE_COEF(0x63, 3<<14, 1<<14),
5390 switch (codec->core.vendor_id) {
5392 alc_process_coef_fw(codec, coef0255);
5398 alc_process_coef_fw(codec, coef0256);
5403 alc_write_coef_idx(codec, 0x45, 0xd689);
5407 alc_process_coef_fw(codec, coef0233);
5410 val = alc_read_coef_idx(codec, 0x50);
5411 if (val & (1 << 12)) {
5412 alc_update_coef_idx(codec, 0x8e, 0x0070, 0x0020);
5413 alc_update_coef_idx(codec, 0x4f, 0xfcc0, 0xd400);
5416 alc_update_coef_idx(codec, 0x8e, 0x0070, 0x0010);
5417 alc_update_coef_idx(codec, 0x4f, 0xfcc0, 0xd400);
5423 alc_update_coef_idx(codec, 0x4f, 0xfcc0, 0xd400);
5425 alc_process_coef_fw(codec, coef0288);
5428 alc_process_coef_fw(codec, coef0292);
5431 alc_process_coef_fw(codec, coef0293);
5434 alc_process_coef_fw(codec, coef0688);
5442 val = alc_read_coef_idx(codec, 0x45);
5444 alc_process_coef_fw(codec, coef0225_2);
5446 alc_process_coef_fw(codec, coef0225_1);
5449 alc_update_coefex_idx(codec, 0x57, 0x5, 1<<14, 0);
5452 codec_dbg(codec, "Headset jack set to iPhone-style headset mode.\n");
5456 static void alc_headset_mode_omtp(struct hda_codec *codec)
5458 static const struct coef_fw coef0255[] = {
5459 WRITE_COEF(0x45, 0xe489), /* Set to OMTP Type */
5460 WRITE_COEF(0x1b, 0x0c2b),
5461 WRITE_COEFEX(0x57, 0x03, 0x8ea6),
5464 static const struct coef_fw coef0256[] = {
5465 WRITE_COEF(0x45, 0xe489), /* Set to OMTP Type */
5466 WRITE_COEF(0x1b, 0x0e6b),
5469 static const struct coef_fw coef0233[] = {
5470 WRITE_COEF(0x45, 0xe429),
5471 WRITE_COEF(0x1b, 0x0c2b),
5472 WRITE_COEF(0x32, 0x4ea3),
5475 static const struct coef_fw coef0288[] = {
5476 UPDATE_COEF(0x50, 0x2000, 0x2000),
5477 UPDATE_COEF(0x56, 0x0006, 0x0006),
5478 UPDATE_COEF(0x66, 0x0008, 0),
5479 UPDATE_COEF(0x67, 0x2000, 0),
5482 static const struct coef_fw coef0292[] = {
5483 WRITE_COEF(0x6b, 0xe429),
5484 WRITE_COEF(0x76, 0x0008),
5485 WRITE_COEF(0x18, 0x7388),
5488 static const struct coef_fw coef0293[] = {
5489 WRITE_COEF(0x45, 0xe429), /* Set to omtp type */
5490 UPDATE_COEF(0x10, 7<<8, 7<<8), /* SET Line1 JD to 1 */
5493 static const struct coef_fw coef0688[] = {
5494 WRITE_COEF(0x11, 0x0001),
5495 WRITE_COEF(0x15, 0x0d50),
5496 WRITE_COEF(0xc3, 0x0000),
5499 static const struct coef_fw coef0225[] = {
5500 UPDATE_COEF(0x45, 0x3f<<10, 0x39<<10),
5501 UPDATE_COEF(0x63, 3<<14, 2<<14),
5505 switch (codec->core.vendor_id) {
5507 alc_process_coef_fw(codec, coef0255);
5513 alc_process_coef_fw(codec, coef0256);
5518 alc_write_coef_idx(codec, 0x45, 0xe689);
5522 alc_process_coef_fw(codec, coef0233);
5525 alc_update_coef_idx(codec, 0x8e, 0x0070, 0x0010);/* Headset output enable */
5526 alc_update_coef_idx(codec, 0x4f, 0xfcc0, 0xe400);
5531 alc_update_coef_idx(codec, 0x4f, 0xfcc0, 0xe400);
5533 alc_process_coef_fw(codec, coef0288);
5536 alc_process_coef_fw(codec, coef0292);
5539 alc_process_coef_fw(codec, coef0293);
5542 alc_process_coef_fw(codec, coef0688);
5550 alc_process_coef_fw(codec, coef0225);
5553 codec_dbg(codec, "Headset jack set to Nokia-style headset mode.\n");
5556 static void alc_determine_headset_type(struct hda_codec *codec)
5559 bool is_ctia = false;
5560 struct alc_spec *spec = codec->spec;
5561 static const struct coef_fw coef0255[] = {
5562 WRITE_COEF(0x45, 0xd089), /* combo jack auto switch control(Check type)*/
5563 WRITE_COEF(0x49, 0x0149), /* combo jack auto switch control(Vref
5567 static const struct coef_fw coef0288[] = {
5568 UPDATE_COEF(0x4f, 0xfcc0, 0xd400), /* Check Type */
5571 static const struct coef_fw coef0298[] = {
5572 UPDATE_COEF(0x50, 0x2000, 0x2000),
5573 UPDATE_COEF(0x56, 0x0006, 0x0006),
5574 UPDATE_COEF(0x66, 0x0008, 0),
5575 UPDATE_COEF(0x67, 0x2000, 0),
5576 UPDATE_COEF(0x19, 0x1300, 0x1300),
5579 static const struct coef_fw coef0293[] = {
5580 UPDATE_COEF(0x4a, 0x000f, 0x0008), /* Combo Jack auto detect */
5581 WRITE_COEF(0x45, 0xD429), /* Set to ctia type */
5584 static const struct coef_fw coef0688[] = {
5585 WRITE_COEF(0x11, 0x0001),
5586 WRITE_COEF(0xb7, 0x802b),
5587 WRITE_COEF(0x15, 0x0d60),
5588 WRITE_COEF(0xc3, 0x0c00),
5591 static const struct coef_fw coef0274[] = {
5592 UPDATE_COEF(0x4a, 0x0010, 0),
5593 UPDATE_COEF(0x4a, 0x8000, 0),
5594 WRITE_COEF(0x45, 0xd289),
5595 UPDATE_COEF(0x49, 0x0300, 0x0300),
5599 if (spec->no_internal_mic_pin) {
5600 alc_update_coef_idx(codec, 0x45, 0xf<<12 | 1<<10, 5<<12);
5604 switch (codec->core.vendor_id) {
5606 alc_process_coef_fw(codec, coef0255);
5608 val = alc_read_coef_idx(codec, 0x46);
5609 is_ctia = (val & 0x0070) == 0x0070;
5615 alc_write_coef_idx(codec, 0x1b, 0x0e4b);
5616 alc_write_coef_idx(codec, 0x06, 0x6104);
5617 alc_write_coefex_idx(codec, 0x57, 0x3, 0x09a3);
5619 snd_hda_codec_write(codec, 0x21, 0,
5620 AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE);
5622 snd_hda_codec_write(codec, 0x21, 0,
5623 AC_VERB_SET_PIN_WIDGET_CONTROL, 0x0);
5625 alc_process_coef_fw(codec, coef0255);
5627 val = alc_read_coef_idx(codec, 0x46);
5628 is_ctia = (val & 0x0070) == 0x0070;
5630 alc_write_coefex_idx(codec, 0x57, 0x3, 0x0da3);
5631 alc_update_coefex_idx(codec, 0x57, 0x5, 1<<14, 0);
5633 snd_hda_codec_write(codec, 0x21, 0,
5634 AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT);
5636 snd_hda_codec_write(codec, 0x21, 0,
5637 AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE);
5642 alc_process_coef_fw(codec, coef0274);
5644 val = alc_read_coef_idx(codec, 0x46);
5645 is_ctia = (val & 0x00f0) == 0x00f0;
5649 alc_write_coef_idx(codec, 0x45, 0xd029);
5651 val = alc_read_coef_idx(codec, 0x46);
5652 is_ctia = (val & 0x0070) == 0x0070;
5655 snd_hda_codec_write(codec, 0x21, 0,
5656 AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE);
5658 snd_hda_codec_write(codec, 0x21, 0,
5659 AC_VERB_SET_PIN_WIDGET_CONTROL, 0x0);
5662 val = alc_read_coef_idx(codec, 0x50);
5663 if (val & (1 << 12)) {
5664 alc_update_coef_idx(codec, 0x8e, 0x0070, 0x0020);
5665 alc_process_coef_fw(codec, coef0288);
5667 val = alc_read_coef_idx(codec, 0x50);
5668 is_ctia = (val & 0x0070) == 0x0070;
5670 alc_update_coef_idx(codec, 0x8e, 0x0070, 0x0010);
5671 alc_process_coef_fw(codec, coef0288);
5673 val = alc_read_coef_idx(codec, 0x50);
5674 is_ctia = (val & 0x0070) == 0x0070;
5676 alc_process_coef_fw(codec, coef0298);
5677 snd_hda_codec_write(codec, 0x21, 0,
5678 AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP);
5680 snd_hda_codec_write(codec, 0x21, 0,
5681 AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE);
5685 alc_process_coef_fw(codec, coef0288);
5687 val = alc_read_coef_idx(codec, 0x50);
5688 is_ctia = (val & 0x0070) == 0x0070;
5691 alc_write_coef_idx(codec, 0x6b, 0xd429);
5693 val = alc_read_coef_idx(codec, 0x6c);
5694 is_ctia = (val & 0x001c) == 0x001c;
5697 alc_process_coef_fw(codec, coef0293);
5699 val = alc_read_coef_idx(codec, 0x46);
5700 is_ctia = (val & 0x0070) == 0x0070;
5703 alc_process_coef_fw(codec, coef0688);
5705 val = alc_read_coef_idx(codec, 0xbe);
5706 is_ctia = (val & 0x1c02) == 0x1c02;
5714 snd_hda_codec_write(codec, 0x21, 0,
5715 AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE);
5717 snd_hda_codec_write(codec, 0x21, 0,
5718 AC_VERB_SET_PIN_WIDGET_CONTROL, 0x0);
5720 alc_process_coef_fw(codec, alc225_pre_hsmode);
5721 alc_update_coef_idx(codec, 0x67, 0xf000, 0x1000);
5722 val = alc_read_coef_idx(codec, 0x45);
5723 if (val & (1 << 9)) {
5724 alc_update_coef_idx(codec, 0x45, 0x3f<<10, 0x34<<10);
5725 alc_update_coef_idx(codec, 0x49, 3<<8, 2<<8);
5727 val = alc_read_coef_idx(codec, 0x46);
5728 is_ctia = (val & 0x00f0) == 0x00f0;
5730 alc_update_coef_idx(codec, 0x45, 0x3f<<10, 0x34<<10);
5731 alc_update_coef_idx(codec, 0x49, 3<<8, 1<<8);
5733 val = alc_read_coef_idx(codec, 0x46);
5734 is_ctia = (val & 0x00f0) == 0x00f0;
5736 alc_update_coef_idx(codec, 0x4a, 7<<6, 7<<6);
5737 alc_update_coef_idx(codec, 0x4a, 3<<4, 3<<4);
5738 alc_update_coef_idx(codec, 0x67, 0xf000, 0x3000);
5740 snd_hda_codec_write(codec, 0x21, 0,
5741 AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT);
5743 snd_hda_codec_write(codec, 0x21, 0,
5744 AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE);
5751 codec_dbg(codec, "Headset jack detected iPhone-style headset: %s\n",
5752 is_ctia ? "yes" : "no");
5753 spec->current_headset_type = is_ctia ? ALC_HEADSET_TYPE_CTIA : ALC_HEADSET_TYPE_OMTP;
5756 static void alc_update_headset_mode(struct hda_codec *codec)
5758 struct alc_spec *spec = codec->spec;
5760 hda_nid_t mux_pin = spec->gen.imux_pins[spec->gen.cur_mux[0]];
5761 hda_nid_t hp_pin = alc_get_hp_pin(spec);
5763 int new_headset_mode;
5765 if (!snd_hda_jack_detect(codec, hp_pin))
5766 new_headset_mode = ALC_HEADSET_MODE_UNPLUGGED;
5767 else if (mux_pin == spec->headset_mic_pin)
5768 new_headset_mode = ALC_HEADSET_MODE_HEADSET;
5769 else if (mux_pin == spec->headphone_mic_pin)
5770 new_headset_mode = ALC_HEADSET_MODE_MIC;
5772 new_headset_mode = ALC_HEADSET_MODE_HEADPHONE;
5774 if (new_headset_mode == spec->current_headset_mode) {
5775 snd_hda_gen_update_outputs(codec);
5779 switch (new_headset_mode) {
5780 case ALC_HEADSET_MODE_UNPLUGGED:
5781 alc_headset_mode_unplugged(codec);
5782 spec->current_headset_mode = ALC_HEADSET_MODE_UNKNOWN;
5783 spec->current_headset_type = ALC_HEADSET_TYPE_UNKNOWN;
5784 spec->gen.hp_jack_present = false;
5786 case ALC_HEADSET_MODE_HEADSET:
5787 if (spec->current_headset_type == ALC_HEADSET_TYPE_UNKNOWN)
5788 alc_determine_headset_type(codec);
5789 if (spec->current_headset_type == ALC_HEADSET_TYPE_CTIA)
5790 alc_headset_mode_ctia(codec);
5791 else if (spec->current_headset_type == ALC_HEADSET_TYPE_OMTP)
5792 alc_headset_mode_omtp(codec);
5793 spec->gen.hp_jack_present = true;
5795 case ALC_HEADSET_MODE_MIC:
5796 alc_headset_mode_mic_in(codec, hp_pin, spec->headphone_mic_pin);
5797 spec->gen.hp_jack_present = false;
5799 case ALC_HEADSET_MODE_HEADPHONE:
5800 alc_headset_mode_default(codec);
5801 spec->gen.hp_jack_present = true;
5804 if (new_headset_mode != ALC_HEADSET_MODE_MIC) {
5805 snd_hda_set_pin_ctl_cache(codec, hp_pin,
5806 AC_PINCTL_OUT_EN | AC_PINCTL_HP_EN);
5807 if (spec->headphone_mic_pin && spec->headphone_mic_pin != hp_pin)
5808 snd_hda_set_pin_ctl_cache(codec, spec->headphone_mic_pin,
5811 spec->current_headset_mode = new_headset_mode;
5813 snd_hda_gen_update_outputs(codec);
5816 static void alc_update_headset_mode_hook(struct hda_codec *codec,
5817 struct snd_kcontrol *kcontrol,
5818 struct snd_ctl_elem_value *ucontrol)
5820 alc_update_headset_mode(codec);
5823 static void alc_update_headset_jack_cb(struct hda_codec *codec,
5824 struct hda_jack_callback *jack)
5826 snd_hda_gen_hp_automute(codec, jack);
5827 alc_update_headset_mode(codec);
5830 static void alc_probe_headset_mode(struct hda_codec *codec)
5833 struct alc_spec *spec = codec->spec;
5834 struct auto_pin_cfg *cfg = &spec->gen.autocfg;
5837 for (i = 0; i < cfg->num_inputs; i++) {
5838 if (cfg->inputs[i].is_headset_mic && !spec->headset_mic_pin)
5839 spec->headset_mic_pin = cfg->inputs[i].pin;
5840 if (cfg->inputs[i].is_headphone_mic && !spec->headphone_mic_pin)
5841 spec->headphone_mic_pin = cfg->inputs[i].pin;
5844 WARN_ON(spec->gen.cap_sync_hook);
5845 spec->gen.cap_sync_hook = alc_update_headset_mode_hook;
5846 spec->gen.automute_hook = alc_update_headset_mode;
5847 spec->gen.hp_automute_hook = alc_update_headset_jack_cb;
5850 static void alc_fixup_headset_mode(struct hda_codec *codec,
5851 const struct hda_fixup *fix, int action)
5853 struct alc_spec *spec = codec->spec;
5856 case HDA_FIXUP_ACT_PRE_PROBE:
5857 spec->parse_flags |= HDA_PINCFG_HEADSET_MIC | HDA_PINCFG_HEADPHONE_MIC;
5859 case HDA_FIXUP_ACT_PROBE:
5860 alc_probe_headset_mode(codec);
5862 case HDA_FIXUP_ACT_INIT:
5863 if (is_s3_resume(codec) || is_s4_resume(codec)) {
5864 spec->current_headset_mode = ALC_HEADSET_MODE_UNKNOWN;
5865 spec->current_headset_type = ALC_HEADSET_TYPE_UNKNOWN;
5867 alc_update_headset_mode(codec);
5872 static void alc_fixup_headset_mode_no_hp_mic(struct hda_codec *codec,
5873 const struct hda_fixup *fix, int action)
5875 if (action == HDA_FIXUP_ACT_PRE_PROBE) {
5876 struct alc_spec *spec = codec->spec;
5877 spec->parse_flags |= HDA_PINCFG_HEADSET_MIC;
5880 alc_fixup_headset_mode(codec, fix, action);
5883 static void alc255_set_default_jack_type(struct hda_codec *codec)
5885 /* Set to iphone type */
5886 static const struct coef_fw alc255fw[] = {
5887 WRITE_COEF(0x1b, 0x880b),
5888 WRITE_COEF(0x45, 0xd089),
5889 WRITE_COEF(0x1b, 0x080b),
5890 WRITE_COEF(0x46, 0x0004),
5891 WRITE_COEF(0x1b, 0x0c0b),
5894 static const struct coef_fw alc256fw[] = {
5895 WRITE_COEF(0x1b, 0x884b),
5896 WRITE_COEF(0x45, 0xd089),
5897 WRITE_COEF(0x1b, 0x084b),
5898 WRITE_COEF(0x46, 0x0004),
5899 WRITE_COEF(0x1b, 0x0c4b),
5902 switch (codec->core.vendor_id) {
5904 alc_process_coef_fw(codec, alc255fw);
5910 alc_process_coef_fw(codec, alc256fw);
5916 static void alc_fixup_headset_mode_alc255(struct hda_codec *codec,
5917 const struct hda_fixup *fix, int action)
5919 if (action == HDA_FIXUP_ACT_PRE_PROBE) {
5920 alc255_set_default_jack_type(codec);
5922 alc_fixup_headset_mode(codec, fix, action);
5925 static void alc_fixup_headset_mode_alc255_no_hp_mic(struct hda_codec *codec,
5926 const struct hda_fixup *fix, int action)
5928 if (action == HDA_FIXUP_ACT_PRE_PROBE) {
5929 struct alc_spec *spec = codec->spec;
5930 spec->parse_flags |= HDA_PINCFG_HEADSET_MIC;
5931 alc255_set_default_jack_type(codec);
5934 alc_fixup_headset_mode(codec, fix, action);
5937 static void alc288_update_headset_jack_cb(struct hda_codec *codec,
5938 struct hda_jack_callback *jack)
5940 struct alc_spec *spec = codec->spec;
5942 alc_update_headset_jack_cb(codec, jack);
5943 /* Headset Mic enable or disable, only for Dell Dino */
5944 alc_update_gpio_data(codec, 0x40, spec->gen.hp_jack_present);
5947 static void alc_fixup_headset_mode_dell_alc288(struct hda_codec *codec,
5948 const struct hda_fixup *fix, int action)
5950 alc_fixup_headset_mode(codec, fix, action);
5951 if (action == HDA_FIXUP_ACT_PROBE) {
5952 struct alc_spec *spec = codec->spec;
5953 /* toggled via hp_automute_hook */
5954 spec->gpio_mask |= 0x40;
5955 spec->gpio_dir |= 0x40;
5956 spec->gen.hp_automute_hook = alc288_update_headset_jack_cb;
5960 static void alc_fixup_auto_mute_via_amp(struct hda_codec *codec,
5961 const struct hda_fixup *fix, int action)
5963 if (action == HDA_FIXUP_ACT_PRE_PROBE) {
5964 struct alc_spec *spec = codec->spec;
5965 spec->gen.auto_mute_via_amp = 1;
5969 static void alc_fixup_no_shutup(struct hda_codec *codec,
5970 const struct hda_fixup *fix, int action)
5972 if (action == HDA_FIXUP_ACT_PRE_PROBE) {
5973 struct alc_spec *spec = codec->spec;
5974 spec->no_shutup_pins = 1;
5978 static void alc_fixup_disable_aamix(struct hda_codec *codec,
5979 const struct hda_fixup *fix, int action)
5981 if (action == HDA_FIXUP_ACT_PRE_PROBE) {
5982 struct alc_spec *spec = codec->spec;
5983 /* Disable AA-loopback as it causes white noise */
5984 spec->gen.mixer_nid = 0;
5988 /* fixup for Thinkpad docks: add dock pins, avoid HP parser fixup */
5989 static void alc_fixup_tpt440_dock(struct hda_codec *codec,
5990 const struct hda_fixup *fix, int action)
5992 static const struct hda_pintbl pincfgs[] = {
5993 { 0x16, 0x21211010 }, /* dock headphone */
5994 { 0x19, 0x21a11010 }, /* dock mic */
5997 struct alc_spec *spec = codec->spec;
5999 if (action == HDA_FIXUP_ACT_PRE_PROBE) {
6000 spec->parse_flags = HDA_PINCFG_NO_HP_FIXUP;
6001 codec->power_save_node = 0; /* avoid click noises */
6002 snd_hda_apply_pincfgs(codec, pincfgs);
6006 static void alc_fixup_tpt470_dock(struct hda_codec *codec,
6007 const struct hda_fixup *fix, int action)
6009 static const struct hda_pintbl pincfgs[] = {
6010 { 0x17, 0x21211010 }, /* dock headphone */
6011 { 0x19, 0x21a11010 }, /* dock mic */
6014 struct alc_spec *spec = codec->spec;
6016 if (action == HDA_FIXUP_ACT_PRE_PROBE) {
6017 spec->parse_flags = HDA_PINCFG_NO_HP_FIXUP;
6018 snd_hda_apply_pincfgs(codec, pincfgs);
6019 } else if (action == HDA_FIXUP_ACT_INIT) {
6020 /* Enable DOCK device */
6021 snd_hda_codec_write(codec, 0x17, 0,
6022 AC_VERB_SET_CONFIG_DEFAULT_BYTES_3, 0);
6023 /* Enable DOCK device */
6024 snd_hda_codec_write(codec, 0x19, 0,
6025 AC_VERB_SET_CONFIG_DEFAULT_BYTES_3, 0);
6029 static void alc_fixup_tpt470_dacs(struct hda_codec *codec,
6030 const struct hda_fixup *fix, int action)
6032 /* Assure the speaker pin to be coupled with DAC NID 0x03; otherwise
6033 * the speaker output becomes too low by some reason on Thinkpads with
6036 static const hda_nid_t preferred_pairs[] = {
6037 0x14, 0x03, 0x17, 0x02, 0x21, 0x02,
6040 struct alc_spec *spec = codec->spec;
6042 if (action == HDA_FIXUP_ACT_PRE_PROBE)
6043 spec->gen.preferred_dacs = preferred_pairs;
6046 static void alc295_fixup_asus_dacs(struct hda_codec *codec,
6047 const struct hda_fixup *fix, int action)
6049 static const hda_nid_t preferred_pairs[] = {
6050 0x17, 0x02, 0x21, 0x03, 0
6052 struct alc_spec *spec = codec->spec;
6054 if (action == HDA_FIXUP_ACT_PRE_PROBE)
6055 spec->gen.preferred_dacs = preferred_pairs;
6058 static void alc_shutup_dell_xps13(struct hda_codec *codec)
6060 struct alc_spec *spec = codec->spec;
6061 int hp_pin = alc_get_hp_pin(spec);
6063 /* Prevent pop noises when headphones are plugged in */
6064 snd_hda_codec_write(codec, hp_pin, 0,
6065 AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE);
6069 static void alc_fixup_dell_xps13(struct hda_codec *codec,
6070 const struct hda_fixup *fix, int action)
6072 struct alc_spec *spec = codec->spec;
6073 struct hda_input_mux *imux = &spec->gen.input_mux;
6077 case HDA_FIXUP_ACT_PRE_PROBE:
6078 /* mic pin 0x19 must be initialized with Vref Hi-Z, otherwise
6079 * it causes a click noise at start up
6081 snd_hda_codec_set_pin_target(codec, 0x19, PIN_VREFHIZ);
6082 spec->shutup = alc_shutup_dell_xps13;
6084 case HDA_FIXUP_ACT_PROBE:
6085 /* Make the internal mic the default input source. */
6086 for (i = 0; i < imux->num_items; i++) {
6087 if (spec->gen.imux_pins[i] == 0x12) {
6088 spec->gen.cur_mux[0] = i;
6096 static void alc_fixup_headset_mode_alc662(struct hda_codec *codec,
6097 const struct hda_fixup *fix, int action)
6099 struct alc_spec *spec = codec->spec;
6101 if (action == HDA_FIXUP_ACT_PRE_PROBE) {
6102 spec->parse_flags |= HDA_PINCFG_HEADSET_MIC;
6103 spec->gen.hp_mic = 1; /* Mic-in is same pin as headphone */
6105 /* Disable boost for mic-in permanently. (This code is only called
6106 from quirks that guarantee that the headphone is at NID 0x1b.) */
6107 snd_hda_codec_write(codec, 0x1b, 0, AC_VERB_SET_AMP_GAIN_MUTE, 0x7000);
6108 snd_hda_override_wcaps(codec, 0x1b, get_wcaps(codec, 0x1b) & ~AC_WCAP_IN_AMP);
6110 alc_fixup_headset_mode(codec, fix, action);
6113 static void alc_fixup_headset_mode_alc668(struct hda_codec *codec,
6114 const struct hda_fixup *fix, int action)
6116 if (action == HDA_FIXUP_ACT_PRE_PROBE) {
6117 alc_write_coef_idx(codec, 0xc4, 0x8000);
6118 alc_update_coef_idx(codec, 0xc2, ~0xfe, 0);
6119 snd_hda_set_pin_ctl_cache(codec, 0x18, 0);
6121 alc_fixup_headset_mode(codec, fix, action);
6124 /* Returns the nid of the external mic input pin, or 0 if it cannot be found. */
6125 static int find_ext_mic_pin(struct hda_codec *codec)
6127 struct alc_spec *spec = codec->spec;
6128 struct auto_pin_cfg *cfg = &spec->gen.autocfg;
6130 unsigned int defcfg;
6133 for (i = 0; i < cfg->num_inputs; i++) {
6134 if (cfg->inputs[i].type != AUTO_PIN_MIC)
6136 nid = cfg->inputs[i].pin;
6137 defcfg = snd_hda_codec_get_pincfg(codec, nid);
6138 if (snd_hda_get_input_pin_attr(defcfg) == INPUT_PIN_ATTR_INT)
6146 static void alc271_hp_gate_mic_jack(struct hda_codec *codec,
6147 const struct hda_fixup *fix,
6150 struct alc_spec *spec = codec->spec;
6152 if (action == HDA_FIXUP_ACT_PROBE) {
6153 int mic_pin = find_ext_mic_pin(codec);
6154 int hp_pin = alc_get_hp_pin(spec);
6156 if (snd_BUG_ON(!mic_pin || !hp_pin))
6158 snd_hda_jack_set_gating_jack(codec, mic_pin, hp_pin);
6162 static void alc269_fixup_limit_int_mic_boost(struct hda_codec *codec,
6163 const struct hda_fixup *fix,
6166 struct alc_spec *spec = codec->spec;
6167 struct auto_pin_cfg *cfg = &spec->gen.autocfg;
6170 /* The mic boosts on level 2 and 3 are too noisy
6171 on the internal mic input.
6172 Therefore limit the boost to 0 or 1. */
6174 if (action != HDA_FIXUP_ACT_PROBE)
6177 for (i = 0; i < cfg->num_inputs; i++) {
6178 hda_nid_t nid = cfg->inputs[i].pin;
6179 unsigned int defcfg;
6180 if (cfg->inputs[i].type != AUTO_PIN_MIC)
6182 defcfg = snd_hda_codec_get_pincfg(codec, nid);
6183 if (snd_hda_get_input_pin_attr(defcfg) != INPUT_PIN_ATTR_INT)
6186 snd_hda_override_amp_caps(codec, nid, HDA_INPUT,
6187 (0x00 << AC_AMPCAP_OFFSET_SHIFT) |
6188 (0x01 << AC_AMPCAP_NUM_STEPS_SHIFT) |
6189 (0x2f << AC_AMPCAP_STEP_SIZE_SHIFT) |
6190 (0 << AC_AMPCAP_MUTE_SHIFT));
6194 static void alc283_hp_automute_hook(struct hda_codec *codec,
6195 struct hda_jack_callback *jack)
6197 struct alc_spec *spec = codec->spec;
6201 snd_hda_gen_hp_automute(codec, jack);
6203 vref = spec->gen.hp_jack_present ? PIN_VREF80 : 0;
6206 snd_hda_codec_write(codec, 0x19, 0, AC_VERB_SET_PIN_WIDGET_CONTROL,
6210 static void alc283_fixup_chromebook(struct hda_codec *codec,
6211 const struct hda_fixup *fix, int action)
6213 struct alc_spec *spec = codec->spec;
6216 case HDA_FIXUP_ACT_PRE_PROBE:
6217 snd_hda_override_wcaps(codec, 0x03, 0);
6218 /* Disable AA-loopback as it causes white noise */
6219 spec->gen.mixer_nid = 0;
6221 case HDA_FIXUP_ACT_INIT:
6222 /* MIC2-VREF control */
6223 /* Set to manual mode */
6224 alc_update_coef_idx(codec, 0x06, 0x000c, 0);
6225 /* Enable Line1 input control by verb */
6226 alc_update_coef_idx(codec, 0x1a, 0, 1 << 4);
6231 static void alc283_fixup_sense_combo_jack(struct hda_codec *codec,
6232 const struct hda_fixup *fix, int action)
6234 struct alc_spec *spec = codec->spec;
6237 case HDA_FIXUP_ACT_PRE_PROBE:
6238 spec->gen.hp_automute_hook = alc283_hp_automute_hook;
6240 case HDA_FIXUP_ACT_INIT:
6241 /* MIC2-VREF control */
6242 /* Set to manual mode */
6243 alc_update_coef_idx(codec, 0x06, 0x000c, 0);
6248 /* mute tablet speaker pin (0x14) via dock plugging in addition */
6249 static void asus_tx300_automute(struct hda_codec *codec)
6251 struct alc_spec *spec = codec->spec;
6252 snd_hda_gen_update_outputs(codec);
6253 if (snd_hda_jack_detect(codec, 0x1b))
6254 spec->gen.mute_bits |= (1ULL << 0x14);
6257 static void alc282_fixup_asus_tx300(struct hda_codec *codec,
6258 const struct hda_fixup *fix, int action)
6260 struct alc_spec *spec = codec->spec;
6261 static const struct hda_pintbl dock_pins[] = {
6262 { 0x1b, 0x21114000 }, /* dock speaker pin */
6267 case HDA_FIXUP_ACT_PRE_PROBE:
6268 spec->init_amp = ALC_INIT_DEFAULT;
6269 /* TX300 needs to set up GPIO2 for the speaker amp */
6270 alc_setup_gpio(codec, 0x04);
6271 snd_hda_apply_pincfgs(codec, dock_pins);
6272 spec->gen.auto_mute_via_amp = 1;
6273 spec->gen.automute_hook = asus_tx300_automute;
6274 snd_hda_jack_detect_enable_callback(codec, 0x1b,
6275 snd_hda_gen_hp_automute);
6277 case HDA_FIXUP_ACT_PROBE:
6278 spec->init_amp = ALC_INIT_DEFAULT;
6280 case HDA_FIXUP_ACT_BUILD:
6281 /* this is a bit tricky; give more sane names for the main
6282 * (tablet) speaker and the dock speaker, respectively
6284 rename_ctl(codec, "Speaker Playback Switch",
6285 "Dock Speaker Playback Switch");
6286 rename_ctl(codec, "Bass Speaker Playback Switch",
6287 "Speaker Playback Switch");
6292 static void alc290_fixup_mono_speakers(struct hda_codec *codec,
6293 const struct hda_fixup *fix, int action)
6295 if (action == HDA_FIXUP_ACT_PRE_PROBE) {
6296 /* DAC node 0x03 is giving mono output. We therefore want to
6297 make sure 0x14 (front speaker) and 0x15 (headphones) use the
6298 stereo DAC, while leaving 0x17 (bass speaker) for node 0x03. */
6299 static const hda_nid_t conn1[] = { 0x0c };
6300 snd_hda_override_conn_list(codec, 0x14, ARRAY_SIZE(conn1), conn1);
6301 snd_hda_override_conn_list(codec, 0x15, ARRAY_SIZE(conn1), conn1);
6305 static void alc298_fixup_speaker_volume(struct hda_codec *codec,
6306 const struct hda_fixup *fix, int action)
6308 if (action == HDA_FIXUP_ACT_PRE_PROBE) {
6309 /* The speaker is routed to the Node 0x06 by a mistake, as a result
6310 we can't adjust the speaker's volume since this node does not has
6311 Amp-out capability. we change the speaker's route to:
6312 Node 0x02 (Audio Output) -> Node 0x0c (Audio Mixer) -> Node 0x17 (
6313 Pin Complex), since Node 0x02 has Amp-out caps, we can adjust
6314 speaker's volume now. */
6316 static const hda_nid_t conn1[] = { 0x0c };
6317 snd_hda_override_conn_list(codec, 0x17, ARRAY_SIZE(conn1), conn1);
6321 /* disable DAC3 (0x06) selection on NID 0x17 as it has no volume amp control */
6322 static void alc295_fixup_disable_dac3(struct hda_codec *codec,
6323 const struct hda_fixup *fix, int action)
6325 if (action == HDA_FIXUP_ACT_PRE_PROBE) {
6326 static const hda_nid_t conn[] = { 0x02, 0x03 };
6327 snd_hda_override_conn_list(codec, 0x17, ARRAY_SIZE(conn), conn);
6331 /* force NID 0x17 (Bass Speaker) to DAC1 to share it with the main speaker */
6332 static void alc285_fixup_speaker2_to_dac1(struct hda_codec *codec,
6333 const struct hda_fixup *fix, int action)
6335 if (action == HDA_FIXUP_ACT_PRE_PROBE) {
6336 static const hda_nid_t conn[] = { 0x02 };
6337 snd_hda_override_conn_list(codec, 0x17, ARRAY_SIZE(conn), conn);
6341 /* Hook to update amp GPIO4 for automute */
6342 static void alc280_hp_gpio4_automute_hook(struct hda_codec *codec,
6343 struct hda_jack_callback *jack)
6345 struct alc_spec *spec = codec->spec;
6347 snd_hda_gen_hp_automute(codec, jack);
6348 /* mute_led_polarity is set to 0, so we pass inverted value here */
6349 alc_update_gpio_led(codec, 0x10, spec->mute_led_polarity,
6350 !spec->gen.hp_jack_present);
6353 /* Manage GPIOs for HP EliteBook Folio 9480m.
6355 * GPIO4 is the headphone amplifier power control
6356 * GPIO3 is the audio output mute indicator LED
6359 static void alc280_fixup_hp_9480m(struct hda_codec *codec,
6360 const struct hda_fixup *fix,
6363 struct alc_spec *spec = codec->spec;
6365 alc_fixup_hp_gpio_led(codec, action, 0x08, 0);
6366 if (action == HDA_FIXUP_ACT_PRE_PROBE) {
6367 /* amp at GPIO4; toggled via alc280_hp_gpio4_automute_hook() */
6368 spec->gpio_mask |= 0x10;
6369 spec->gpio_dir |= 0x10;
6370 spec->gen.hp_automute_hook = alc280_hp_gpio4_automute_hook;
6374 static void alc275_fixup_gpio4_off(struct hda_codec *codec,
6375 const struct hda_fixup *fix,
6378 struct alc_spec *spec = codec->spec;
6380 if (action == HDA_FIXUP_ACT_PRE_PROBE) {
6381 spec->gpio_mask |= 0x04;
6382 spec->gpio_dir |= 0x04;
6383 /* set data bit low */
6387 /* Quirk for Thinkpad X1 7th and 8th Gen
6388 * The following fixed routing needed
6389 * DAC1 (NID 0x02) -> Speaker (NID 0x14); some eq applied secretly
6390 * DAC2 (NID 0x03) -> Bass (NID 0x17) & Headphone (NID 0x21); sharing a DAC
6391 * DAC3 (NID 0x06) -> Unused, due to the lack of volume amp
6393 static void alc285_fixup_thinkpad_x1_gen7(struct hda_codec *codec,
6394 const struct hda_fixup *fix, int action)
6396 static const hda_nid_t conn[] = { 0x02, 0x03 }; /* exclude 0x06 */
6397 static const hda_nid_t preferred_pairs[] = {
6398 0x14, 0x02, 0x17, 0x03, 0x21, 0x03, 0
6400 struct alc_spec *spec = codec->spec;
6403 case HDA_FIXUP_ACT_PRE_PROBE:
6404 snd_hda_override_conn_list(codec, 0x17, ARRAY_SIZE(conn), conn);
6405 spec->gen.preferred_dacs = preferred_pairs;
6407 case HDA_FIXUP_ACT_BUILD:
6408 /* The generic parser creates somewhat unintuitive volume ctls
6409 * with the fixed routing above, and the shared DAC2 may be
6411 * Rename those to unique names so that PA doesn't touch them
6412 * and use only Master volume.
6414 rename_ctl(codec, "Front Playback Volume", "DAC1 Playback Volume");
6415 rename_ctl(codec, "Bass Speaker Playback Volume", "DAC2 Playback Volume");
6420 static void alc233_alc662_fixup_lenovo_dual_codecs(struct hda_codec *codec,
6421 const struct hda_fixup *fix,
6424 alc_fixup_dual_codecs(codec, fix, action);
6426 case HDA_FIXUP_ACT_PRE_PROBE:
6427 /* override card longname to provide a unique UCM profile */
6428 strcpy(codec->card->longname, "HDAudio-Lenovo-DualCodecs");
6430 case HDA_FIXUP_ACT_BUILD:
6431 /* rename Capture controls depending on the codec */
6432 rename_ctl(codec, "Capture Volume",
6434 "Rear-Panel Capture Volume" :
6435 "Front-Panel Capture Volume");
6436 rename_ctl(codec, "Capture Switch",
6438 "Rear-Panel Capture Switch" :
6439 "Front-Panel Capture Switch");
6444 static void alc225_fixup_s3_pop_noise(struct hda_codec *codec,
6445 const struct hda_fixup *fix, int action)
6447 if (action != HDA_FIXUP_ACT_PRE_PROBE)
6450 codec->power_save_node = 1;
6453 /* Forcibly assign NID 0x03 to HP/LO while NID 0x02 to SPK for EQ */
6454 static void alc274_fixup_bind_dacs(struct hda_codec *codec,
6455 const struct hda_fixup *fix, int action)
6457 struct alc_spec *spec = codec->spec;
6458 static const hda_nid_t preferred_pairs[] = {
6459 0x21, 0x03, 0x1b, 0x03, 0x16, 0x02,
6463 if (action != HDA_FIXUP_ACT_PRE_PROBE)
6466 spec->gen.preferred_dacs = preferred_pairs;
6467 spec->gen.auto_mute_via_amp = 1;
6468 codec->power_save_node = 0;
6471 /* avoid DAC 0x06 for bass speaker 0x17; it has no volume control */
6472 static void alc289_fixup_asus_ga401(struct hda_codec *codec,
6473 const struct hda_fixup *fix, int action)
6475 static const hda_nid_t preferred_pairs[] = {
6476 0x14, 0x02, 0x17, 0x02, 0x21, 0x03, 0
6478 struct alc_spec *spec = codec->spec;
6480 if (action == HDA_FIXUP_ACT_PRE_PROBE) {
6481 spec->gen.preferred_dacs = preferred_pairs;
6482 spec->gen.obey_preferred_dacs = 1;
6486 /* The DAC of NID 0x3 will introduce click/pop noise on headphones, so invalidate it */
6487 static void alc285_fixup_invalidate_dacs(struct hda_codec *codec,
6488 const struct hda_fixup *fix, int action)
6490 if (action != HDA_FIXUP_ACT_PRE_PROBE)
6493 snd_hda_override_wcaps(codec, 0x03, 0);
6496 static void alc_combo_jack_hp_jd_restart(struct hda_codec *codec)
6498 switch (codec->core.vendor_id) {
6504 alc_update_coef_idx(codec, 0x4a, 0x8000, 1 << 15); /* Reset HP JD */
6505 alc_update_coef_idx(codec, 0x4a, 0x8000, 0 << 15);
6514 alc_update_coef_idx(codec, 0x1b, 0x8000, 1 << 15); /* Reset HP JD */
6515 alc_update_coef_idx(codec, 0x1b, 0x8000, 0 << 15);
6520 static void alc295_fixup_chromebook(struct hda_codec *codec,
6521 const struct hda_fixup *fix, int action)
6523 struct alc_spec *spec = codec->spec;
6526 case HDA_FIXUP_ACT_PRE_PROBE:
6527 spec->ultra_low_power = true;
6529 case HDA_FIXUP_ACT_INIT:
6530 alc_combo_jack_hp_jd_restart(codec);
6535 static void alc_fixup_disable_mic_vref(struct hda_codec *codec,
6536 const struct hda_fixup *fix, int action)
6538 if (action == HDA_FIXUP_ACT_PRE_PROBE)
6539 snd_hda_codec_set_pin_target(codec, 0x19, PIN_VREFHIZ);
6543 static void alc294_gx502_toggle_output(struct hda_codec *codec,
6544 struct hda_jack_callback *cb)
6546 /* The Windows driver sets the codec up in a very different way where
6547 * it appears to leave 0x10 = 0x8a20 set. For Linux we need to toggle it
6549 if (snd_hda_jack_detect_state(codec, 0x21) == HDA_JACK_PRESENT)
6550 alc_write_coef_idx(codec, 0x10, 0x8a20);
6552 alc_write_coef_idx(codec, 0x10, 0x0a20);
6555 static void alc294_fixup_gx502_hp(struct hda_codec *codec,
6556 const struct hda_fixup *fix, int action)
6558 /* Pin 0x21: headphones/headset mic */
6559 if (!is_jack_detectable(codec, 0x21))
6563 case HDA_FIXUP_ACT_PRE_PROBE:
6564 snd_hda_jack_detect_enable_callback(codec, 0x21,
6565 alc294_gx502_toggle_output);
6567 case HDA_FIXUP_ACT_INIT:
6568 /* Make sure to start in a correct state, i.e. if
6569 * headphones have been plugged in before powering up the system
6571 alc294_gx502_toggle_output(codec, NULL);
6576 static void alc294_gu502_toggle_output(struct hda_codec *codec,
6577 struct hda_jack_callback *cb)
6579 /* Windows sets 0x10 to 0x8420 for Node 0x20 which is
6580 * responsible from changes between speakers and headphones
6582 if (snd_hda_jack_detect_state(codec, 0x21) == HDA_JACK_PRESENT)
6583 alc_write_coef_idx(codec, 0x10, 0x8420);
6585 alc_write_coef_idx(codec, 0x10, 0x0a20);
6588 static void alc294_fixup_gu502_hp(struct hda_codec *codec,
6589 const struct hda_fixup *fix, int action)
6591 if (!is_jack_detectable(codec, 0x21))
6595 case HDA_FIXUP_ACT_PRE_PROBE:
6596 snd_hda_jack_detect_enable_callback(codec, 0x21,
6597 alc294_gu502_toggle_output);
6599 case HDA_FIXUP_ACT_INIT:
6600 alc294_gu502_toggle_output(codec, NULL);
6605 static void alc285_fixup_hp_gpio_amp_init(struct hda_codec *codec,
6606 const struct hda_fixup *fix, int action)
6608 if (action != HDA_FIXUP_ACT_INIT)
6612 alc_write_coef_idx(codec, 0x65, 0x0);
6615 static void alc274_fixup_hp_headset_mic(struct hda_codec *codec,
6616 const struct hda_fixup *fix, int action)
6619 case HDA_FIXUP_ACT_INIT:
6620 alc_combo_jack_hp_jd_restart(codec);
6625 static void alc_fixup_no_int_mic(struct hda_codec *codec,
6626 const struct hda_fixup *fix, int action)
6628 struct alc_spec *spec = codec->spec;
6631 case HDA_FIXUP_ACT_PRE_PROBE:
6632 /* Mic RING SLEEVE swap for combo jack */
6633 alc_update_coef_idx(codec, 0x45, 0xf<<12 | 1<<10, 5<<12);
6634 spec->no_internal_mic_pin = true;
6636 case HDA_FIXUP_ACT_INIT:
6637 alc_combo_jack_hp_jd_restart(codec);
6642 /* GPIO1 = amplifier on/off
6643 * GPIO3 = mic mute LED
6645 static void alc285_fixup_hp_spectre_x360_eb1(struct hda_codec *codec,
6646 const struct hda_fixup *fix, int action)
6648 static const hda_nid_t conn[] = { 0x02 };
6650 struct alc_spec *spec = codec->spec;
6651 static const struct hda_pintbl pincfgs[] = {
6652 { 0x14, 0x90170110 }, /* front/high speakers */
6653 { 0x17, 0x90170130 }, /* back/bass speakers */
6657 //enable micmute led
6658 alc_fixup_hp_gpio_led(codec, action, 0x00, 0x04);
6661 case HDA_FIXUP_ACT_PRE_PROBE:
6662 spec->micmute_led_polarity = 1;
6663 /* needed for amp of back speakers */
6664 spec->gpio_mask |= 0x01;
6665 spec->gpio_dir |= 0x01;
6666 snd_hda_apply_pincfgs(codec, pincfgs);
6667 /* share DAC to have unified volume control */
6668 snd_hda_override_conn_list(codec, 0x14, ARRAY_SIZE(conn), conn);
6669 snd_hda_override_conn_list(codec, 0x17, ARRAY_SIZE(conn), conn);
6671 case HDA_FIXUP_ACT_INIT:
6672 /* need to toggle GPIO to enable the amp of back speakers */
6673 alc_update_gpio_data(codec, 0x01, true);
6675 alc_update_gpio_data(codec, 0x01, false);
6680 static void alc285_fixup_hp_spectre_x360(struct hda_codec *codec,
6681 const struct hda_fixup *fix, int action)
6683 static const hda_nid_t conn[] = { 0x02 };
6684 static const struct hda_pintbl pincfgs[] = {
6685 { 0x14, 0x90170110 }, /* rear speaker */
6690 case HDA_FIXUP_ACT_PRE_PROBE:
6691 snd_hda_apply_pincfgs(codec, pincfgs);
6692 /* force front speaker to DAC1 */
6693 snd_hda_override_conn_list(codec, 0x17, ARRAY_SIZE(conn), conn);
6698 /* for hda_fixup_thinkpad_acpi() */
6699 #include "thinkpad_helper.c"
6701 static void alc_fixup_thinkpad_acpi(struct hda_codec *codec,
6702 const struct hda_fixup *fix, int action)
6704 alc_fixup_no_shutup(codec, fix, action); /* reduce click noise */
6705 hda_fixup_thinkpad_acpi(codec, fix, action);
6708 /* Fixup for Lenovo Legion 15IMHg05 speaker output on headset removal. */
6709 static void alc287_fixup_legion_15imhg05_speakers(struct hda_codec *codec,
6710 const struct hda_fixup *fix,
6713 struct alc_spec *spec = codec->spec;
6716 case HDA_FIXUP_ACT_PRE_PROBE:
6717 spec->gen.suppress_auto_mute = 1;
6722 static void comp_acpi_device_notify(acpi_handle handle, u32 event, void *data)
6724 struct hda_codec *cdc = data;
6725 struct alc_spec *spec = cdc->spec;
6727 codec_info(cdc, "ACPI Notification %d\n", event);
6729 hda_component_acpi_device_notify(spec->comps, ARRAY_SIZE(spec->comps),
6730 handle, event, data);
6733 static int comp_bind(struct device *dev)
6735 struct hda_codec *cdc = dev_to_hda_codec(dev);
6736 struct alc_spec *spec = cdc->spec;
6739 ret = hda_component_manager_bind(cdc, spec->comps);
6743 return hda_component_manager_bind_acpi_notifications(cdc,
6744 spec->comps, ARRAY_SIZE(spec->comps),
6745 comp_acpi_device_notify, cdc);
6748 static void comp_unbind(struct device *dev)
6750 struct hda_codec *cdc = dev_to_hda_codec(dev);
6751 struct alc_spec *spec = cdc->spec;
6753 hda_component_manager_unbind_acpi_notifications(cdc, spec->comps, comp_acpi_device_notify);
6754 hda_component_manager_unbind(cdc, spec->comps);
6757 static const struct component_master_ops comp_master_ops = {
6759 .unbind = comp_unbind,
6762 static void comp_generic_playback_hook(struct hda_pcm_stream *hinfo, struct hda_codec *cdc,
6763 struct snd_pcm_substream *sub, int action)
6765 struct alc_spec *spec = cdc->spec;
6767 hda_component_manager_playback_hook(spec->comps, ARRAY_SIZE(spec->comps), action);
6770 static void comp_generic_fixup(struct hda_codec *cdc, int action, const char *bus,
6771 const char *hid, const char *match_str, int count)
6773 struct alc_spec *spec = cdc->spec;
6777 case HDA_FIXUP_ACT_PRE_PROBE:
6778 ret = hda_component_manager_init(cdc, spec->comps, count, bus, hid,
6779 match_str, &comp_master_ops);
6783 spec->gen.pcm_playback_hook = comp_generic_playback_hook;
6785 case HDA_FIXUP_ACT_FREE:
6786 hda_component_manager_free(cdc, &comp_master_ops);
6791 static void cs35l41_fixup_i2c_two(struct hda_codec *cdc, const struct hda_fixup *fix, int action)
6793 comp_generic_fixup(cdc, action, "i2c", "CSC3551", "-%s:00-cs35l41-hda.%d", 2);
6796 static void cs35l41_fixup_i2c_four(struct hda_codec *cdc, const struct hda_fixup *fix, int action)
6798 comp_generic_fixup(cdc, action, "i2c", "CSC3551", "-%s:00-cs35l41-hda.%d", 4);
6801 static void cs35l41_fixup_spi_two(struct hda_codec *codec, const struct hda_fixup *fix, int action)
6803 comp_generic_fixup(codec, action, "spi", "CSC3551", "-%s:00-cs35l41-hda.%d", 2);
6806 static void cs35l41_fixup_spi_four(struct hda_codec *codec, const struct hda_fixup *fix, int action)
6808 comp_generic_fixup(codec, action, "spi", "CSC3551", "-%s:00-cs35l41-hda.%d", 4);
6811 static void alc287_fixup_legion_16achg6_speakers(struct hda_codec *cdc, const struct hda_fixup *fix,
6814 comp_generic_fixup(cdc, action, "i2c", "CLSA0100", "-%s:00-cs35l41-hda.%d", 2);
6817 static void alc287_fixup_legion_16ithg6_speakers(struct hda_codec *cdc, const struct hda_fixup *fix,
6820 comp_generic_fixup(cdc, action, "i2c", "CLSA0101", "-%s:00-cs35l41-hda.%d", 2);
6823 static void cs35l56_fixup_spi_four(struct hda_codec *cdc, const struct hda_fixup *fix, int action)
6825 comp_generic_fixup(cdc, action, "spi", "CSC3556", "-%s:00-cs35l56-hda.%d", 4);
6828 static void tas2781_fixup_i2c(struct hda_codec *cdc,
6829 const struct hda_fixup *fix, int action)
6831 comp_generic_fixup(cdc, action, "i2c", "TIAS2781", "-%s:00", 1);
6834 static void yoga7_14arb7_fixup_i2c(struct hda_codec *cdc,
6835 const struct hda_fixup *fix, int action)
6837 comp_generic_fixup(cdc, action, "i2c", "INT8866", "-%s:00", 1);
6840 /* for alc295_fixup_hp_top_speakers */
6841 #include "hp_x360_helper.c"
6843 /* for alc285_fixup_ideapad_s740_coef() */
6844 #include "ideapad_s740_helper.c"
6846 static const struct coef_fw alc256_fixup_set_coef_defaults_coefs[] = {
6847 WRITE_COEF(0x10, 0x0020), WRITE_COEF(0x24, 0x0000),
6848 WRITE_COEF(0x26, 0x0000), WRITE_COEF(0x29, 0x3000),
6849 WRITE_COEF(0x37, 0xfe05), WRITE_COEF(0x45, 0x5089),
6853 static void alc256_fixup_set_coef_defaults(struct hda_codec *codec,
6854 const struct hda_fixup *fix,
6858 * A certain other OS sets these coeffs to different values. On at least
6859 * one TongFang barebone these settings might survive even a cold
6860 * reboot. So to restore a clean slate the values are explicitly reset
6861 * to default here. Without this, the external microphone is always in a
6862 * plugged-in state, while the internal microphone is always in an
6863 * unplugged state, breaking the ability to use the internal microphone.
6865 alc_process_coef_fw(codec, alc256_fixup_set_coef_defaults_coefs);
6868 static const struct coef_fw alc233_fixup_no_audio_jack_coefs[] = {
6869 WRITE_COEF(0x1a, 0x9003), WRITE_COEF(0x1b, 0x0e2b), WRITE_COEF(0x37, 0xfe06),
6870 WRITE_COEF(0x38, 0x4981), WRITE_COEF(0x45, 0xd489), WRITE_COEF(0x46, 0x0074),
6871 WRITE_COEF(0x49, 0x0149),
6875 static void alc233_fixup_no_audio_jack(struct hda_codec *codec,
6876 const struct hda_fixup *fix,
6880 * The audio jack input and output is not detected on the ASRock NUC Box
6881 * 1100 series when cold booting without this fix. Warm rebooting from a
6882 * certain other OS makes the audio functional, as COEF settings are
6883 * preserved in this case. This fix sets these altered COEF values as
6886 alc_process_coef_fw(codec, alc233_fixup_no_audio_jack_coefs);
6889 static void alc256_fixup_mic_no_presence_and_resume(struct hda_codec *codec,
6890 const struct hda_fixup *fix,
6894 * The Clevo NJ51CU comes either with the ALC293 or the ALC256 codec,
6895 * but uses the 0x8686 subproduct id in both cases. The ALC256 codec
6896 * needs an additional quirk for sound working after suspend and resume.
6898 if (codec->core.vendor_id == 0x10ec0256) {
6899 alc_update_coef_idx(codec, 0x10, 1<<9, 0);
6900 snd_hda_codec_set_pincfg(codec, 0x19, 0x04a11120);
6902 snd_hda_codec_set_pincfg(codec, 0x1a, 0x04a1113c);
6906 static void alc_fixup_dell4_mic_no_presence_quiet(struct hda_codec *codec,
6907 const struct hda_fixup *fix,
6910 struct alc_spec *spec = codec->spec;
6911 struct hda_input_mux *imux = &spec->gen.input_mux;
6914 alc269_fixup_limit_int_mic_boost(codec, fix, action);
6917 case HDA_FIXUP_ACT_PRE_PROBE:
6919 * Set the vref of pin 0x19 (Headset Mic) and pin 0x1b (Headphone Mic)
6920 * to Hi-Z to avoid pop noises at startup and when plugging and
6921 * unplugging headphones.
6923 snd_hda_codec_set_pin_target(codec, 0x19, PIN_VREFHIZ);
6924 snd_hda_codec_set_pin_target(codec, 0x1b, PIN_VREFHIZ);
6926 case HDA_FIXUP_ACT_PROBE:
6928 * Make the internal mic (0x12) the default input source to
6929 * prevent pop noises on cold boot.
6931 for (i = 0; i < imux->num_items; i++) {
6932 if (spec->gen.imux_pins[i] == 0x12) {
6933 spec->gen.cur_mux[0] = i;
6941 static void alc287_fixup_yoga9_14iap7_bass_spk_pin(struct hda_codec *codec,
6942 const struct hda_fixup *fix, int action)
6945 * The Pin Complex 0x17 for the bass speakers is wrongly reported as
6948 static const struct hda_pintbl pincfgs[] = {
6949 { 0x17, 0x90170121 },
6953 * Avoid DAC 0x06 and 0x08, as they have no volume controls.
6954 * DAC 0x02 and 0x03 would be fine.
6956 static const hda_nid_t conn[] = { 0x02, 0x03 };
6958 * Prefer both speakerbar (0x14) and bass speakers (0x17) connected to DAC 0x02.
6959 * Headphones (0x21) are connected to DAC 0x03.
6961 static const hda_nid_t preferred_pairs[] = {
6967 struct alc_spec *spec = codec->spec;
6970 case HDA_FIXUP_ACT_PRE_PROBE:
6971 snd_hda_apply_pincfgs(codec, pincfgs);
6972 snd_hda_override_conn_list(codec, 0x17, ARRAY_SIZE(conn), conn);
6973 spec->gen.preferred_dacs = preferred_pairs;
6978 static void alc295_fixup_dell_inspiron_top_speakers(struct hda_codec *codec,
6979 const struct hda_fixup *fix, int action)
6981 static const struct hda_pintbl pincfgs[] = {
6982 { 0x14, 0x90170151 },
6983 { 0x17, 0x90170150 },
6986 static const hda_nid_t conn[] = { 0x02, 0x03 };
6987 static const hda_nid_t preferred_pairs[] = {
6993 struct alc_spec *spec = codec->spec;
6995 alc_fixup_no_shutup(codec, fix, action);
6998 case HDA_FIXUP_ACT_PRE_PROBE:
6999 snd_hda_apply_pincfgs(codec, pincfgs);
7000 snd_hda_override_conn_list(codec, 0x17, ARRAY_SIZE(conn), conn);
7001 spec->gen.preferred_dacs = preferred_pairs;
7006 /* Forcibly assign NID 0x03 to HP while NID 0x02 to SPK */
7007 static void alc287_fixup_bind_dacs(struct hda_codec *codec,
7008 const struct hda_fixup *fix, int action)
7010 struct alc_spec *spec = codec->spec;
7011 static const hda_nid_t conn[] = { 0x02, 0x03 }; /* exclude 0x06 */
7012 static const hda_nid_t preferred_pairs[] = {
7013 0x17, 0x02, 0x21, 0x03, 0
7016 if (action != HDA_FIXUP_ACT_PRE_PROBE)
7019 snd_hda_override_conn_list(codec, 0x17, ARRAY_SIZE(conn), conn);
7020 spec->gen.preferred_dacs = preferred_pairs;
7021 spec->gen.auto_mute_via_amp = 1;
7022 if (spec->gen.autocfg.speaker_pins[0] != 0x14) {
7023 snd_hda_codec_write_cache(codec, 0x14, 0, AC_VERB_SET_PIN_WIDGET_CONTROL,
7024 0x0); /* Make sure 0x14 was disable */
7027 /* Fix none verb table of Headset Mic pin */
7028 static void alc_fixup_headset_mic(struct hda_codec *codec,
7029 const struct hda_fixup *fix, int action)
7031 struct alc_spec *spec = codec->spec;
7032 static const struct hda_pintbl pincfgs[] = {
7033 { 0x19, 0x03a1103c },
7038 case HDA_FIXUP_ACT_PRE_PROBE:
7039 snd_hda_apply_pincfgs(codec, pincfgs);
7040 alc_update_coef_idx(codec, 0x45, 0xf<<12 | 1<<10, 5<<12);
7041 spec->parse_flags |= HDA_PINCFG_HEADSET_MIC;
7049 ALC269_FIXUP_SONY_VAIO,
7050 ALC275_FIXUP_SONY_VAIO_GPIO2,
7051 ALC269_FIXUP_DELL_M101Z,
7052 ALC269_FIXUP_SKU_IGNORE,
7053 ALC269_FIXUP_ASUS_G73JW,
7054 ALC269_FIXUP_ASUS_N7601ZM_PINS,
7055 ALC269_FIXUP_ASUS_N7601ZM,
7056 ALC269_FIXUP_LENOVO_EAPD,
7057 ALC275_FIXUP_SONY_HWEQ,
7058 ALC275_FIXUP_SONY_DISABLE_AAMIX,
7060 ALC269_FIXUP_PCM_44K,
7061 ALC269_FIXUP_STEREO_DMIC,
7062 ALC269_FIXUP_HEADSET_MIC,
7063 ALC269_FIXUP_QUANTA_MUTE,
7064 ALC269_FIXUP_LIFEBOOK,
7065 ALC269_FIXUP_LIFEBOOK_EXTMIC,
7066 ALC269_FIXUP_LIFEBOOK_HP_PIN,
7067 ALC269_FIXUP_LIFEBOOK_NO_HP_TO_LINEOUT,
7068 ALC255_FIXUP_LIFEBOOK_U7x7_HEADSET_MIC,
7071 ALC269VB_FIXUP_AMIC,
7072 ALC269VB_FIXUP_DMIC,
7073 ALC269_FIXUP_HP_MUTE_LED,
7074 ALC269_FIXUP_HP_MUTE_LED_MIC1,
7075 ALC269_FIXUP_HP_MUTE_LED_MIC2,
7076 ALC269_FIXUP_HP_MUTE_LED_MIC3,
7077 ALC269_FIXUP_HP_GPIO_LED,
7078 ALC269_FIXUP_HP_GPIO_MIC1_LED,
7079 ALC269_FIXUP_HP_LINE1_MIC1_LED,
7080 ALC269_FIXUP_INV_DMIC,
7081 ALC269_FIXUP_LENOVO_DOCK,
7082 ALC269_FIXUP_LENOVO_DOCK_LIMIT_BOOST,
7083 ALC269_FIXUP_NO_SHUTUP,
7084 ALC286_FIXUP_SONY_MIC_NO_PRESENCE,
7085 ALC269_FIXUP_PINCFG_NO_HP_TO_LINEOUT,
7086 ALC269_FIXUP_DELL1_MIC_NO_PRESENCE,
7087 ALC269_FIXUP_DELL2_MIC_NO_PRESENCE,
7088 ALC269_FIXUP_DELL3_MIC_NO_PRESENCE,
7089 ALC269_FIXUP_DELL4_MIC_NO_PRESENCE,
7090 ALC269_FIXUP_DELL4_MIC_NO_PRESENCE_QUIET,
7091 ALC269_FIXUP_HEADSET_MODE,
7092 ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC,
7093 ALC269_FIXUP_ASPIRE_HEADSET_MIC,
7094 ALC269_FIXUP_ASUS_X101_FUNC,
7095 ALC269_FIXUP_ASUS_X101_VERB,
7096 ALC269_FIXUP_ASUS_X101,
7097 ALC271_FIXUP_AMIC_MIC2,
7098 ALC271_FIXUP_HP_GATE_MIC_JACK,
7099 ALC271_FIXUP_HP_GATE_MIC_JACK_E1_572,
7100 ALC269_FIXUP_ACER_AC700,
7101 ALC269_FIXUP_LIMIT_INT_MIC_BOOST,
7102 ALC269VB_FIXUP_ASUS_ZENBOOK,
7103 ALC269VB_FIXUP_ASUS_ZENBOOK_UX31A,
7104 ALC269VB_FIXUP_ASUS_MIC_NO_PRESENCE,
7105 ALC269_FIXUP_LIMIT_INT_MIC_BOOST_MUTE_LED,
7106 ALC269VB_FIXUP_ORDISSIMO_EVE2,
7107 ALC283_FIXUP_CHROME_BOOK,
7108 ALC283_FIXUP_SENSE_COMBO_JACK,
7109 ALC282_FIXUP_ASUS_TX300,
7110 ALC283_FIXUP_INT_MIC,
7111 ALC290_FIXUP_MONO_SPEAKERS,
7112 ALC290_FIXUP_MONO_SPEAKERS_HSJACK,
7113 ALC290_FIXUP_SUBWOOFER,
7114 ALC290_FIXUP_SUBWOOFER_HSJACK,
7115 ALC269_FIXUP_THINKPAD_ACPI,
7116 ALC269_FIXUP_DMIC_THINKPAD_ACPI,
7117 ALC269VB_FIXUP_CHUWI_COREBOOK_XPRO,
7118 ALC255_FIXUP_ACER_MIC_NO_PRESENCE,
7119 ALC255_FIXUP_ASUS_MIC_NO_PRESENCE,
7120 ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
7121 ALC255_FIXUP_DELL2_MIC_NO_PRESENCE,
7122 ALC255_FIXUP_HEADSET_MODE,
7123 ALC255_FIXUP_HEADSET_MODE_NO_HP_MIC,
7124 ALC293_FIXUP_DELL1_MIC_NO_PRESENCE,
7125 ALC292_FIXUP_TPT440_DOCK,
7126 ALC292_FIXUP_TPT440,
7127 ALC283_FIXUP_HEADSET_MIC,
7128 ALC255_FIXUP_MIC_MUTE_LED,
7129 ALC282_FIXUP_ASPIRE_V5_PINS,
7130 ALC269VB_FIXUP_ASPIRE_E1_COEF,
7131 ALC280_FIXUP_HP_GPIO4,
7132 ALC286_FIXUP_HP_GPIO_LED,
7133 ALC280_FIXUP_HP_GPIO2_MIC_HOTKEY,
7134 ALC280_FIXUP_HP_DOCK_PINS,
7135 ALC269_FIXUP_HP_DOCK_GPIO_MIC1_LED,
7136 ALC280_FIXUP_HP_9480M,
7137 ALC245_FIXUP_HP_X360_AMP,
7138 ALC285_FIXUP_HP_SPECTRE_X360_EB1,
7139 ALC288_FIXUP_DELL_HEADSET_MODE,
7140 ALC288_FIXUP_DELL1_MIC_NO_PRESENCE,
7141 ALC288_FIXUP_DELL_XPS_13,
7142 ALC288_FIXUP_DISABLE_AAMIX,
7143 ALC292_FIXUP_DELL_E7X_AAMIX,
7144 ALC292_FIXUP_DELL_E7X,
7145 ALC292_FIXUP_DISABLE_AAMIX,
7146 ALC293_FIXUP_DISABLE_AAMIX_MULTIJACK,
7147 ALC298_FIXUP_ALIENWARE_MIC_NO_PRESENCE,
7148 ALC298_FIXUP_DELL1_MIC_NO_PRESENCE,
7149 ALC298_FIXUP_DELL_AIO_MIC_NO_PRESENCE,
7150 ALC275_FIXUP_DELL_XPS,
7151 ALC293_FIXUP_LENOVO_SPK_NOISE,
7152 ALC233_FIXUP_LENOVO_LINE2_MIC_HOTKEY,
7153 ALC255_FIXUP_DELL_SPK_NOISE,
7154 ALC225_FIXUP_DISABLE_MIC_VREF,
7155 ALC225_FIXUP_DELL1_MIC_NO_PRESENCE,
7156 ALC295_FIXUP_DISABLE_DAC3,
7157 ALC285_FIXUP_SPEAKER2_TO_DAC1,
7158 ALC285_FIXUP_ASUS_SPEAKER2_TO_DAC1,
7159 ALC285_FIXUP_ASUS_HEADSET_MIC,
7160 ALC285_FIXUP_ASUS_SPI_REAR_SPEAKERS,
7161 ALC285_FIXUP_ASUS_I2C_SPEAKER2_TO_DAC1,
7162 ALC285_FIXUP_ASUS_I2C_HEADSET_MIC,
7163 ALC280_FIXUP_HP_HEADSET_MIC,
7164 ALC221_FIXUP_HP_FRONT_MIC,
7165 ALC292_FIXUP_TPT460,
7166 ALC298_FIXUP_SPK_VOLUME,
7167 ALC298_FIXUP_LENOVO_SPK_VOLUME,
7168 ALC256_FIXUP_DELL_INSPIRON_7559_SUBWOOFER,
7169 ALC269_FIXUP_ATIV_BOOK_8,
7170 ALC221_FIXUP_HP_288PRO_MIC_NO_PRESENCE,
7171 ALC221_FIXUP_HP_MIC_NO_PRESENCE,
7172 ALC256_FIXUP_ASUS_HEADSET_MODE,
7173 ALC256_FIXUP_ASUS_MIC,
7174 ALC256_FIXUP_ASUS_AIO_GPIO2,
7175 ALC233_FIXUP_ASUS_MIC_NO_PRESENCE,
7176 ALC233_FIXUP_EAPD_COEF_AND_MIC_NO_PRESENCE,
7177 ALC233_FIXUP_LENOVO_MULTI_CODECS,
7178 ALC233_FIXUP_ACER_HEADSET_MIC,
7179 ALC294_FIXUP_LENOVO_MIC_LOCATION,
7180 ALC225_FIXUP_DELL_WYSE_MIC_NO_PRESENCE,
7181 ALC225_FIXUP_S3_POP_NOISE,
7182 ALC700_FIXUP_INTEL_REFERENCE,
7183 ALC274_FIXUP_DELL_BIND_DACS,
7184 ALC274_FIXUP_DELL_AIO_LINEOUT_VERB,
7185 ALC298_FIXUP_TPT470_DOCK_FIX,
7186 ALC298_FIXUP_TPT470_DOCK,
7187 ALC255_FIXUP_DUMMY_LINEOUT_VERB,
7188 ALC255_FIXUP_DELL_HEADSET_MIC,
7189 ALC256_FIXUP_HUAWEI_MACH_WX9_PINS,
7190 ALC298_FIXUP_HUAWEI_MBX_STEREO,
7191 ALC295_FIXUP_HP_X360,
7192 ALC221_FIXUP_HP_HEADSET_MIC,
7193 ALC285_FIXUP_LENOVO_HEADPHONE_NOISE,
7194 ALC295_FIXUP_HP_AUTO_MUTE,
7195 ALC286_FIXUP_ACER_AIO_MIC_NO_PRESENCE,
7196 ALC294_FIXUP_ASUS_MIC,
7197 ALC294_FIXUP_ASUS_HEADSET_MIC,
7198 ALC294_FIXUP_ASUS_SPK,
7199 ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE,
7200 ALC285_FIXUP_LENOVO_PC_BEEP_IN_NOISE,
7201 ALC255_FIXUP_ACER_HEADSET_MIC,
7202 ALC295_FIXUP_CHROME_BOOK,
7203 ALC225_FIXUP_HEADSET_JACK,
7204 ALC225_FIXUP_DELL_WYSE_AIO_MIC_NO_PRESENCE,
7205 ALC225_FIXUP_WYSE_AUTO_MUTE,
7206 ALC225_FIXUP_WYSE_DISABLE_MIC_VREF,
7207 ALC286_FIXUP_ACER_AIO_HEADSET_MIC,
7208 ALC256_FIXUP_ASUS_HEADSET_MIC,
7209 ALC256_FIXUP_ASUS_MIC_NO_PRESENCE,
7210 ALC299_FIXUP_PREDATOR_SPK,
7211 ALC256_FIXUP_MEDION_HEADSET_NO_PRESENCE,
7212 ALC289_FIXUP_DELL_SPK1,
7213 ALC289_FIXUP_DELL_SPK2,
7214 ALC289_FIXUP_DUAL_SPK,
7215 ALC289_FIXUP_RTK_AMP_DUAL_SPK,
7216 ALC294_FIXUP_SPK2_TO_DAC1,
7217 ALC294_FIXUP_ASUS_DUAL_SPK,
7218 ALC285_FIXUP_THINKPAD_X1_GEN7,
7219 ALC285_FIXUP_THINKPAD_HEADSET_JACK,
7220 ALC294_FIXUP_ASUS_ALLY,
7221 ALC294_FIXUP_ASUS_ALLY_PINS,
7222 ALC294_FIXUP_ASUS_ALLY_VERBS,
7223 ALC294_FIXUP_ASUS_ALLY_SPEAKER,
7224 ALC294_FIXUP_ASUS_HPE,
7225 ALC294_FIXUP_ASUS_COEF_1B,
7226 ALC294_FIXUP_ASUS_GX502_HP,
7227 ALC294_FIXUP_ASUS_GX502_PINS,
7228 ALC294_FIXUP_ASUS_GX502_VERBS,
7229 ALC294_FIXUP_ASUS_GU502_HP,
7230 ALC294_FIXUP_ASUS_GU502_PINS,
7231 ALC294_FIXUP_ASUS_GU502_VERBS,
7232 ALC294_FIXUP_ASUS_G513_PINS,
7233 ALC285_FIXUP_ASUS_G533Z_PINS,
7234 ALC285_FIXUP_HP_GPIO_LED,
7235 ALC285_FIXUP_HP_MUTE_LED,
7236 ALC285_FIXUP_HP_SPECTRE_X360_MUTE_LED,
7237 ALC236_FIXUP_HP_MUTE_LED_COEFBIT2,
7238 ALC236_FIXUP_HP_GPIO_LED,
7239 ALC236_FIXUP_HP_MUTE_LED,
7240 ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF,
7241 ALC298_FIXUP_SAMSUNG_AMP,
7242 ALC298_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET,
7243 ALC256_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET,
7244 ALC295_FIXUP_ASUS_MIC_NO_PRESENCE,
7245 ALC269VC_FIXUP_ACER_VCOPPERBOX_PINS,
7246 ALC269VC_FIXUP_ACER_HEADSET_MIC,
7247 ALC269VC_FIXUP_ACER_MIC_NO_PRESENCE,
7248 ALC289_FIXUP_ASUS_GA401,
7249 ALC289_FIXUP_ASUS_GA502,
7250 ALC256_FIXUP_ACER_MIC_NO_PRESENCE,
7251 ALC285_FIXUP_HP_GPIO_AMP_INIT,
7252 ALC269_FIXUP_CZC_B20,
7253 ALC269_FIXUP_CZC_TMI,
7254 ALC269_FIXUP_CZC_L101,
7255 ALC269_FIXUP_LEMOTE_A1802,
7256 ALC269_FIXUP_LEMOTE_A190X,
7257 ALC256_FIXUP_INTEL_NUC8_RUGGED,
7258 ALC233_FIXUP_INTEL_NUC8_DMIC,
7259 ALC233_FIXUP_INTEL_NUC8_BOOST,
7260 ALC256_FIXUP_INTEL_NUC10,
7261 ALC255_FIXUP_XIAOMI_HEADSET_MIC,
7262 ALC274_FIXUP_HP_MIC,
7263 ALC274_FIXUP_HP_HEADSET_MIC,
7264 ALC274_FIXUP_HP_ENVY_GPIO,
7265 ALC256_FIXUP_ASUS_HPE,
7266 ALC285_FIXUP_THINKPAD_NO_BASS_SPK_HEADSET_JACK,
7267 ALC287_FIXUP_HP_GPIO_LED,
7268 ALC256_FIXUP_HP_HEADSET_MIC,
7269 ALC245_FIXUP_HP_GPIO_LED,
7270 ALC236_FIXUP_DELL_AIO_HEADSET_MIC,
7271 ALC282_FIXUP_ACER_DISABLE_LINEOUT,
7272 ALC255_FIXUP_ACER_LIMIT_INT_MIC_BOOST,
7273 ALC256_FIXUP_ACER_HEADSET_MIC,
7274 ALC285_FIXUP_IDEAPAD_S740_COEF,
7275 ALC285_FIXUP_HP_LIMIT_INT_MIC_BOOST,
7276 ALC295_FIXUP_ASUS_DACS,
7277 ALC295_FIXUP_HP_OMEN,
7278 ALC285_FIXUP_HP_SPECTRE_X360,
7279 ALC287_FIXUP_IDEAPAD_BASS_SPK_AMP,
7280 ALC623_FIXUP_LENOVO_THINKSTATION_P340,
7281 ALC255_FIXUP_ACER_HEADPHONE_AND_MIC,
7282 ALC236_FIXUP_HP_LIMIT_INT_MIC_BOOST,
7283 ALC287_FIXUP_LEGION_15IMHG05_SPEAKERS,
7284 ALC287_FIXUP_LEGION_15IMHG05_AUTOMUTE,
7285 ALC287_FIXUP_YOGA7_14ITL_SPEAKERS,
7286 ALC298_FIXUP_LENOVO_C940_DUET7,
7287 ALC287_FIXUP_LENOVO_14IRP8_DUETITL,
7288 ALC287_FIXUP_13S_GEN2_SPEAKERS,
7289 ALC256_FIXUP_SET_COEF_DEFAULTS,
7290 ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE,
7291 ALC233_FIXUP_NO_AUDIO_JACK,
7292 ALC256_FIXUP_MIC_NO_PRESENCE_AND_RESUME,
7293 ALC285_FIXUP_LEGION_Y9000X_SPEAKERS,
7294 ALC285_FIXUP_LEGION_Y9000X_AUTOMUTE,
7295 ALC287_FIXUP_LEGION_16ACHG6,
7296 ALC287_FIXUP_CS35L41_I2C_2,
7297 ALC287_FIXUP_CS35L41_I2C_2_HP_GPIO_LED,
7298 ALC287_FIXUP_CS35L41_I2C_4,
7299 ALC245_FIXUP_CS35L41_SPI_2,
7300 ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED,
7301 ALC245_FIXUP_CS35L41_SPI_4,
7302 ALC245_FIXUP_CS35L41_SPI_4_HP_GPIO_LED,
7303 ALC285_FIXUP_HP_SPEAKERS_MICMUTE_LED,
7304 ALC295_FIXUP_FRAMEWORK_LAPTOP_MIC_NO_PRESENCE,
7305 ALC287_FIXUP_LEGION_16ITHG6,
7306 ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK,
7307 ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK_PIN,
7308 ALC295_FIXUP_DELL_INSPIRON_TOP_SPEAKERS,
7309 ALC236_FIXUP_DELL_DUAL_CODECS,
7310 ALC287_FIXUP_CS35L41_I2C_2_THINKPAD_ACPI,
7311 ALC287_FIXUP_TAS2781_I2C,
7312 ALC287_FIXUP_YOGA7_14ARB7_I2C,
7313 ALC245_FIXUP_HP_MUTE_LED_COEFBIT,
7314 ALC245_FIXUP_HP_X360_MUTE_LEDS,
7315 ALC287_FIXUP_THINKPAD_I2S_SPK,
7316 ALC287_FIXUP_MG_RTKC_CSAMP_CS35L41_I2C_THINKPAD,
7317 ALC2XX_FIXUP_HEADSET_MIC,
7318 ALC289_FIXUP_DELL_CS35L41_SPI_2,
7319 ALC294_FIXUP_CS35L41_I2C_2,
7320 ALC245_FIXUP_CS35L56_SPI_4_HP_GPIO_LED,
7323 /* A special fixup for Lenovo C940 and Yoga Duet 7;
7324 * both have the very same PCI SSID, and we need to apply different fixups
7325 * depending on the codec ID
7327 static void alc298_fixup_lenovo_c940_duet7(struct hda_codec *codec,
7328 const struct hda_fixup *fix,
7333 if (codec->core.vendor_id == 0x10ec0298)
7334 id = ALC298_FIXUP_LENOVO_SPK_VOLUME; /* C940 */
7336 id = ALC287_FIXUP_YOGA7_14ITL_SPEAKERS; /* Duet 7 */
7337 __snd_hda_apply_fixup(codec, id, action, 0);
7340 /* A special fixup for Lenovo Slim/Yoga Pro 9 14IRP8 and Yoga DuetITL 2021;
7341 * 14IRP8 PCI SSID will mistakenly be matched with the DuetITL codec SSID,
7342 * so we need to apply a different fixup in this case. The only DuetITL codec
7343 * SSID reported so far is the 17aa:3802 while the 14IRP8 has the 17aa:38be
7344 * and 17aa:38bf. If it weren't for the PCI SSID, the 14IRP8 models would
7345 * have matched correctly by their codecs.
7347 static void alc287_fixup_lenovo_14irp8_duetitl(struct hda_codec *codec,
7348 const struct hda_fixup *fix,
7353 if (codec->core.subsystem_id == 0x17aa3802)
7354 id = ALC287_FIXUP_YOGA7_14ITL_SPEAKERS; /* DuetITL */
7356 id = ALC287_FIXUP_TAS2781_I2C; /* 14IRP8 */
7357 __snd_hda_apply_fixup(codec, id, action, 0);
7360 static const struct hda_fixup alc269_fixups[] = {
7361 [ALC269_FIXUP_GPIO2] = {
7362 .type = HDA_FIXUP_FUNC,
7363 .v.func = alc_fixup_gpio2,
7365 [ALC269_FIXUP_SONY_VAIO] = {
7366 .type = HDA_FIXUP_PINCTLS,
7367 .v.pins = (const struct hda_pintbl[]) {
7368 {0x19, PIN_VREFGRD},
7372 [ALC275_FIXUP_SONY_VAIO_GPIO2] = {
7373 .type = HDA_FIXUP_FUNC,
7374 .v.func = alc275_fixup_gpio4_off,
7376 .chain_id = ALC269_FIXUP_SONY_VAIO
7378 [ALC269_FIXUP_DELL_M101Z] = {
7379 .type = HDA_FIXUP_VERBS,
7380 .v.verbs = (const struct hda_verb[]) {
7381 /* Enables internal speaker */
7382 {0x20, AC_VERB_SET_COEF_INDEX, 13},
7383 {0x20, AC_VERB_SET_PROC_COEF, 0x4040},
7387 [ALC269_FIXUP_SKU_IGNORE] = {
7388 .type = HDA_FIXUP_FUNC,
7389 .v.func = alc_fixup_sku_ignore,
7391 [ALC269_FIXUP_ASUS_G73JW] = {
7392 .type = HDA_FIXUP_PINS,
7393 .v.pins = (const struct hda_pintbl[]) {
7394 { 0x17, 0x99130111 }, /* subwoofer */
7398 [ALC269_FIXUP_ASUS_N7601ZM_PINS] = {
7399 .type = HDA_FIXUP_PINS,
7400 .v.pins = (const struct hda_pintbl[]) {
7401 { 0x19, 0x03A11050 },
7402 { 0x1a, 0x03A11C30 },
7403 { 0x21, 0x03211420 },
7407 [ALC269_FIXUP_ASUS_N7601ZM] = {
7408 .type = HDA_FIXUP_VERBS,
7409 .v.verbs = (const struct hda_verb[]) {
7410 {0x20, AC_VERB_SET_COEF_INDEX, 0x62},
7411 {0x20, AC_VERB_SET_PROC_COEF, 0xa007},
7412 {0x20, AC_VERB_SET_COEF_INDEX, 0x10},
7413 {0x20, AC_VERB_SET_PROC_COEF, 0x8420},
7414 {0x20, AC_VERB_SET_COEF_INDEX, 0x0f},
7415 {0x20, AC_VERB_SET_PROC_COEF, 0x7774},
7419 .chain_id = ALC269_FIXUP_ASUS_N7601ZM_PINS,
7421 [ALC269_FIXUP_LENOVO_EAPD] = {
7422 .type = HDA_FIXUP_VERBS,
7423 .v.verbs = (const struct hda_verb[]) {
7424 {0x14, AC_VERB_SET_EAPD_BTLENABLE, 0},
7428 [ALC275_FIXUP_SONY_HWEQ] = {
7429 .type = HDA_FIXUP_FUNC,
7430 .v.func = alc269_fixup_hweq,
7432 .chain_id = ALC275_FIXUP_SONY_VAIO_GPIO2
7434 [ALC275_FIXUP_SONY_DISABLE_AAMIX] = {
7435 .type = HDA_FIXUP_FUNC,
7436 .v.func = alc_fixup_disable_aamix,
7438 .chain_id = ALC269_FIXUP_SONY_VAIO
7440 [ALC271_FIXUP_DMIC] = {
7441 .type = HDA_FIXUP_FUNC,
7442 .v.func = alc271_fixup_dmic,
7444 [ALC269_FIXUP_PCM_44K] = {
7445 .type = HDA_FIXUP_FUNC,
7446 .v.func = alc269_fixup_pcm_44k,
7448 .chain_id = ALC269_FIXUP_QUANTA_MUTE
7450 [ALC269_FIXUP_STEREO_DMIC] = {
7451 .type = HDA_FIXUP_FUNC,
7452 .v.func = alc269_fixup_stereo_dmic,
7454 [ALC269_FIXUP_HEADSET_MIC] = {
7455 .type = HDA_FIXUP_FUNC,
7456 .v.func = alc269_fixup_headset_mic,
7458 [ALC269_FIXUP_QUANTA_MUTE] = {
7459 .type = HDA_FIXUP_FUNC,
7460 .v.func = alc269_fixup_quanta_mute,
7462 [ALC269_FIXUP_LIFEBOOK] = {
7463 .type = HDA_FIXUP_PINS,
7464 .v.pins = (const struct hda_pintbl[]) {
7465 { 0x1a, 0x2101103f }, /* dock line-out */
7466 { 0x1b, 0x23a11040 }, /* dock mic-in */
7470 .chain_id = ALC269_FIXUP_QUANTA_MUTE
7472 [ALC269_FIXUP_LIFEBOOK_EXTMIC] = {
7473 .type = HDA_FIXUP_PINS,
7474 .v.pins = (const struct hda_pintbl[]) {
7475 { 0x19, 0x01a1903c }, /* headset mic, with jack detect */
7479 [ALC269_FIXUP_LIFEBOOK_HP_PIN] = {
7480 .type = HDA_FIXUP_PINS,
7481 .v.pins = (const struct hda_pintbl[]) {
7482 { 0x21, 0x0221102f }, /* HP out */
7486 [ALC269_FIXUP_LIFEBOOK_NO_HP_TO_LINEOUT] = {
7487 .type = HDA_FIXUP_FUNC,
7488 .v.func = alc269_fixup_pincfg_no_hp_to_lineout,
7490 [ALC255_FIXUP_LIFEBOOK_U7x7_HEADSET_MIC] = {
7491 .type = HDA_FIXUP_FUNC,
7492 .v.func = alc269_fixup_pincfg_U7x7_headset_mic,
7494 [ALC269VB_FIXUP_CHUWI_COREBOOK_XPRO] = {
7495 .type = HDA_FIXUP_PINS,
7496 .v.pins = (const struct hda_pintbl[]) {
7497 { 0x18, 0x03a19020 }, /* headset mic */
7498 { 0x1b, 0x90170150 }, /* speaker */
7502 [ALC269_FIXUP_AMIC] = {
7503 .type = HDA_FIXUP_PINS,
7504 .v.pins = (const struct hda_pintbl[]) {
7505 { 0x14, 0x99130110 }, /* speaker */
7506 { 0x15, 0x0121401f }, /* HP out */
7507 { 0x18, 0x01a19c20 }, /* mic */
7508 { 0x19, 0x99a3092f }, /* int-mic */
7512 [ALC269_FIXUP_DMIC] = {
7513 .type = HDA_FIXUP_PINS,
7514 .v.pins = (const struct hda_pintbl[]) {
7515 { 0x12, 0x99a3092f }, /* int-mic */
7516 { 0x14, 0x99130110 }, /* speaker */
7517 { 0x15, 0x0121401f }, /* HP out */
7518 { 0x18, 0x01a19c20 }, /* mic */
7522 [ALC269VB_FIXUP_AMIC] = {
7523 .type = HDA_FIXUP_PINS,
7524 .v.pins = (const struct hda_pintbl[]) {
7525 { 0x14, 0x99130110 }, /* speaker */
7526 { 0x18, 0x01a19c20 }, /* mic */
7527 { 0x19, 0x99a3092f }, /* int-mic */
7528 { 0x21, 0x0121401f }, /* HP out */
7532 [ALC269VB_FIXUP_DMIC] = {
7533 .type = HDA_FIXUP_PINS,
7534 .v.pins = (const struct hda_pintbl[]) {
7535 { 0x12, 0x99a3092f }, /* int-mic */
7536 { 0x14, 0x99130110 }, /* speaker */
7537 { 0x18, 0x01a19c20 }, /* mic */
7538 { 0x21, 0x0121401f }, /* HP out */
7542 [ALC269_FIXUP_HP_MUTE_LED] = {
7543 .type = HDA_FIXUP_FUNC,
7544 .v.func = alc269_fixup_hp_mute_led,
7546 [ALC269_FIXUP_HP_MUTE_LED_MIC1] = {
7547 .type = HDA_FIXUP_FUNC,
7548 .v.func = alc269_fixup_hp_mute_led_mic1,
7550 [ALC269_FIXUP_HP_MUTE_LED_MIC2] = {
7551 .type = HDA_FIXUP_FUNC,
7552 .v.func = alc269_fixup_hp_mute_led_mic2,
7554 [ALC269_FIXUP_HP_MUTE_LED_MIC3] = {
7555 .type = HDA_FIXUP_FUNC,
7556 .v.func = alc269_fixup_hp_mute_led_mic3,
7558 .chain_id = ALC295_FIXUP_HP_AUTO_MUTE
7560 [ALC269_FIXUP_HP_GPIO_LED] = {
7561 .type = HDA_FIXUP_FUNC,
7562 .v.func = alc269_fixup_hp_gpio_led,
7564 [ALC269_FIXUP_HP_GPIO_MIC1_LED] = {
7565 .type = HDA_FIXUP_FUNC,
7566 .v.func = alc269_fixup_hp_gpio_mic1_led,
7568 [ALC269_FIXUP_HP_LINE1_MIC1_LED] = {
7569 .type = HDA_FIXUP_FUNC,
7570 .v.func = alc269_fixup_hp_line1_mic1_led,
7572 [ALC269_FIXUP_INV_DMIC] = {
7573 .type = HDA_FIXUP_FUNC,
7574 .v.func = alc_fixup_inv_dmic,
7576 [ALC269_FIXUP_NO_SHUTUP] = {
7577 .type = HDA_FIXUP_FUNC,
7578 .v.func = alc_fixup_no_shutup,
7580 [ALC269_FIXUP_LENOVO_DOCK] = {
7581 .type = HDA_FIXUP_PINS,
7582 .v.pins = (const struct hda_pintbl[]) {
7583 { 0x19, 0x23a11040 }, /* dock mic */
7584 { 0x1b, 0x2121103f }, /* dock headphone */
7588 .chain_id = ALC269_FIXUP_PINCFG_NO_HP_TO_LINEOUT
7590 [ALC269_FIXUP_LENOVO_DOCK_LIMIT_BOOST] = {
7591 .type = HDA_FIXUP_FUNC,
7592 .v.func = alc269_fixup_limit_int_mic_boost,
7594 .chain_id = ALC269_FIXUP_LENOVO_DOCK,
7596 [ALC269_FIXUP_PINCFG_NO_HP_TO_LINEOUT] = {
7597 .type = HDA_FIXUP_FUNC,
7598 .v.func = alc269_fixup_pincfg_no_hp_to_lineout,
7600 .chain_id = ALC269_FIXUP_THINKPAD_ACPI,
7602 [ALC269_FIXUP_DELL1_MIC_NO_PRESENCE] = {
7603 .type = HDA_FIXUP_PINS,
7604 .v.pins = (const struct hda_pintbl[]) {
7605 { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */
7606 { 0x1a, 0x01a1913d }, /* use as headphone mic, without its own jack detect */
7610 .chain_id = ALC269_FIXUP_HEADSET_MODE
7612 [ALC269_FIXUP_DELL2_MIC_NO_PRESENCE] = {
7613 .type = HDA_FIXUP_PINS,
7614 .v.pins = (const struct hda_pintbl[]) {
7615 { 0x16, 0x21014020 }, /* dock line out */
7616 { 0x19, 0x21a19030 }, /* dock mic */
7617 { 0x1a, 0x01a1913c }, /* use as headset mic, without its own jack detect */
7621 .chain_id = ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC
7623 [ALC269_FIXUP_DELL3_MIC_NO_PRESENCE] = {
7624 .type = HDA_FIXUP_PINS,
7625 .v.pins = (const struct hda_pintbl[]) {
7626 { 0x1a, 0x01a1913c }, /* use as headset mic, without its own jack detect */
7630 .chain_id = ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC
7632 [ALC269_FIXUP_DELL4_MIC_NO_PRESENCE] = {
7633 .type = HDA_FIXUP_PINS,
7634 .v.pins = (const struct hda_pintbl[]) {
7635 { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */
7636 { 0x1b, 0x01a1913d }, /* use as headphone mic, without its own jack detect */
7640 .chain_id = ALC269_FIXUP_HEADSET_MODE
7642 [ALC269_FIXUP_HEADSET_MODE] = {
7643 .type = HDA_FIXUP_FUNC,
7644 .v.func = alc_fixup_headset_mode,
7646 .chain_id = ALC255_FIXUP_MIC_MUTE_LED
7648 [ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC] = {
7649 .type = HDA_FIXUP_FUNC,
7650 .v.func = alc_fixup_headset_mode_no_hp_mic,
7652 [ALC269_FIXUP_ASPIRE_HEADSET_MIC] = {
7653 .type = HDA_FIXUP_PINS,
7654 .v.pins = (const struct hda_pintbl[]) {
7655 { 0x19, 0x01a1913c }, /* headset mic w/o jack detect */
7659 .chain_id = ALC269_FIXUP_HEADSET_MODE,
7661 [ALC286_FIXUP_SONY_MIC_NO_PRESENCE] = {
7662 .type = HDA_FIXUP_PINS,
7663 .v.pins = (const struct hda_pintbl[]) {
7664 { 0x18, 0x01a1913c }, /* use as headset mic, without its own jack detect */
7668 .chain_id = ALC269_FIXUP_HEADSET_MIC
7670 [ALC256_FIXUP_HUAWEI_MACH_WX9_PINS] = {
7671 .type = HDA_FIXUP_PINS,
7672 .v.pins = (const struct hda_pintbl[]) {
7686 .chain_id = ALC255_FIXUP_MIC_MUTE_LED
7688 [ALC298_FIXUP_HUAWEI_MBX_STEREO] = {
7689 .type = HDA_FIXUP_FUNC,
7690 .v.func = alc298_fixup_huawei_mbx_stereo,
7692 .chain_id = ALC255_FIXUP_MIC_MUTE_LED
7694 [ALC269_FIXUP_ASUS_X101_FUNC] = {
7695 .type = HDA_FIXUP_FUNC,
7696 .v.func = alc269_fixup_x101_headset_mic,
7698 [ALC269_FIXUP_ASUS_X101_VERB] = {
7699 .type = HDA_FIXUP_VERBS,
7700 .v.verbs = (const struct hda_verb[]) {
7701 {0x18, AC_VERB_SET_PIN_WIDGET_CONTROL, 0},
7702 {0x20, AC_VERB_SET_COEF_INDEX, 0x08},
7703 {0x20, AC_VERB_SET_PROC_COEF, 0x0310},
7707 .chain_id = ALC269_FIXUP_ASUS_X101_FUNC
7709 [ALC269_FIXUP_ASUS_X101] = {
7710 .type = HDA_FIXUP_PINS,
7711 .v.pins = (const struct hda_pintbl[]) {
7712 { 0x18, 0x04a1182c }, /* Headset mic */
7716 .chain_id = ALC269_FIXUP_ASUS_X101_VERB
7718 [ALC271_FIXUP_AMIC_MIC2] = {
7719 .type = HDA_FIXUP_PINS,
7720 .v.pins = (const struct hda_pintbl[]) {
7721 { 0x14, 0x99130110 }, /* speaker */
7722 { 0x19, 0x01a19c20 }, /* mic */
7723 { 0x1b, 0x99a7012f }, /* int-mic */
7724 { 0x21, 0x0121401f }, /* HP out */
7728 [ALC271_FIXUP_HP_GATE_MIC_JACK] = {
7729 .type = HDA_FIXUP_FUNC,
7730 .v.func = alc271_hp_gate_mic_jack,
7732 .chain_id = ALC271_FIXUP_AMIC_MIC2,
7734 [ALC271_FIXUP_HP_GATE_MIC_JACK_E1_572] = {
7735 .type = HDA_FIXUP_FUNC,
7736 .v.func = alc269_fixup_limit_int_mic_boost,
7738 .chain_id = ALC271_FIXUP_HP_GATE_MIC_JACK,
7740 [ALC269_FIXUP_ACER_AC700] = {
7741 .type = HDA_FIXUP_PINS,
7742 .v.pins = (const struct hda_pintbl[]) {
7743 { 0x12, 0x99a3092f }, /* int-mic */
7744 { 0x14, 0x99130110 }, /* speaker */
7745 { 0x18, 0x03a11c20 }, /* mic */
7746 { 0x1e, 0x0346101e }, /* SPDIF1 */
7747 { 0x21, 0x0321101f }, /* HP out */
7751 .chain_id = ALC271_FIXUP_DMIC,
7753 [ALC269_FIXUP_LIMIT_INT_MIC_BOOST] = {
7754 .type = HDA_FIXUP_FUNC,
7755 .v.func = alc269_fixup_limit_int_mic_boost,
7757 .chain_id = ALC269_FIXUP_THINKPAD_ACPI,
7759 [ALC269VB_FIXUP_ASUS_ZENBOOK] = {
7760 .type = HDA_FIXUP_FUNC,
7761 .v.func = alc269_fixup_limit_int_mic_boost,
7763 .chain_id = ALC269VB_FIXUP_DMIC,
7765 [ALC269VB_FIXUP_ASUS_ZENBOOK_UX31A] = {
7766 .type = HDA_FIXUP_VERBS,
7767 .v.verbs = (const struct hda_verb[]) {
7768 /* class-D output amp +5dB */
7769 { 0x20, AC_VERB_SET_COEF_INDEX, 0x12 },
7770 { 0x20, AC_VERB_SET_PROC_COEF, 0x2800 },
7774 .chain_id = ALC269VB_FIXUP_ASUS_ZENBOOK,
7776 [ALC269VB_FIXUP_ASUS_MIC_NO_PRESENCE] = {
7777 .type = HDA_FIXUP_PINS,
7778 .v.pins = (const struct hda_pintbl[]) {
7779 { 0x18, 0x01a110f0 }, /* use as headset mic */
7783 .chain_id = ALC269_FIXUP_HEADSET_MIC
7785 [ALC269_FIXUP_LIMIT_INT_MIC_BOOST_MUTE_LED] = {
7786 .type = HDA_FIXUP_FUNC,
7787 .v.func = alc269_fixup_limit_int_mic_boost,
7789 .chain_id = ALC269_FIXUP_HP_MUTE_LED_MIC1,
7791 [ALC269VB_FIXUP_ORDISSIMO_EVE2] = {
7792 .type = HDA_FIXUP_PINS,
7793 .v.pins = (const struct hda_pintbl[]) {
7794 { 0x12, 0x99a3092f }, /* int-mic */
7795 { 0x18, 0x03a11d20 }, /* mic */
7796 { 0x19, 0x411111f0 }, /* Unused bogus pin */
7800 [ALC283_FIXUP_CHROME_BOOK] = {
7801 .type = HDA_FIXUP_FUNC,
7802 .v.func = alc283_fixup_chromebook,
7804 [ALC283_FIXUP_SENSE_COMBO_JACK] = {
7805 .type = HDA_FIXUP_FUNC,
7806 .v.func = alc283_fixup_sense_combo_jack,
7808 .chain_id = ALC283_FIXUP_CHROME_BOOK,
7810 [ALC282_FIXUP_ASUS_TX300] = {
7811 .type = HDA_FIXUP_FUNC,
7812 .v.func = alc282_fixup_asus_tx300,
7814 [ALC283_FIXUP_INT_MIC] = {
7815 .type = HDA_FIXUP_VERBS,
7816 .v.verbs = (const struct hda_verb[]) {
7817 {0x20, AC_VERB_SET_COEF_INDEX, 0x1a},
7818 {0x20, AC_VERB_SET_PROC_COEF, 0x0011},
7822 .chain_id = ALC269_FIXUP_LIMIT_INT_MIC_BOOST
7824 [ALC290_FIXUP_SUBWOOFER_HSJACK] = {
7825 .type = HDA_FIXUP_PINS,
7826 .v.pins = (const struct hda_pintbl[]) {
7827 { 0x17, 0x90170112 }, /* subwoofer */
7831 .chain_id = ALC290_FIXUP_MONO_SPEAKERS_HSJACK,
7833 [ALC290_FIXUP_SUBWOOFER] = {
7834 .type = HDA_FIXUP_PINS,
7835 .v.pins = (const struct hda_pintbl[]) {
7836 { 0x17, 0x90170112 }, /* subwoofer */
7840 .chain_id = ALC290_FIXUP_MONO_SPEAKERS,
7842 [ALC290_FIXUP_MONO_SPEAKERS] = {
7843 .type = HDA_FIXUP_FUNC,
7844 .v.func = alc290_fixup_mono_speakers,
7846 [ALC290_FIXUP_MONO_SPEAKERS_HSJACK] = {
7847 .type = HDA_FIXUP_FUNC,
7848 .v.func = alc290_fixup_mono_speakers,
7850 .chain_id = ALC269_FIXUP_DELL3_MIC_NO_PRESENCE,
7852 [ALC269_FIXUP_THINKPAD_ACPI] = {
7853 .type = HDA_FIXUP_FUNC,
7854 .v.func = alc_fixup_thinkpad_acpi,
7856 .chain_id = ALC269_FIXUP_SKU_IGNORE,
7858 [ALC269_FIXUP_DMIC_THINKPAD_ACPI] = {
7859 .type = HDA_FIXUP_FUNC,
7860 .v.func = alc_fixup_inv_dmic,
7862 .chain_id = ALC269_FIXUP_THINKPAD_ACPI,
7864 [ALC255_FIXUP_ACER_MIC_NO_PRESENCE] = {
7865 .type = HDA_FIXUP_PINS,
7866 .v.pins = (const struct hda_pintbl[]) {
7867 { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */
7871 .chain_id = ALC255_FIXUP_HEADSET_MODE
7873 [ALC255_FIXUP_ASUS_MIC_NO_PRESENCE] = {
7874 .type = HDA_FIXUP_PINS,
7875 .v.pins = (const struct hda_pintbl[]) {
7876 { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */
7880 .chain_id = ALC255_FIXUP_HEADSET_MODE
7882 [ALC255_FIXUP_DELL1_MIC_NO_PRESENCE] = {
7883 .type = HDA_FIXUP_PINS,
7884 .v.pins = (const struct hda_pintbl[]) {
7885 { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */
7886 { 0x1a, 0x01a1913d }, /* use as headphone mic, without its own jack detect */
7890 .chain_id = ALC255_FIXUP_HEADSET_MODE
7892 [ALC255_FIXUP_DELL2_MIC_NO_PRESENCE] = {
7893 .type = HDA_FIXUP_PINS,
7894 .v.pins = (const struct hda_pintbl[]) {
7895 { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */
7899 .chain_id = ALC255_FIXUP_HEADSET_MODE_NO_HP_MIC
7901 [ALC255_FIXUP_HEADSET_MODE] = {
7902 .type = HDA_FIXUP_FUNC,
7903 .v.func = alc_fixup_headset_mode_alc255,
7905 .chain_id = ALC255_FIXUP_MIC_MUTE_LED
7907 [ALC255_FIXUP_HEADSET_MODE_NO_HP_MIC] = {
7908 .type = HDA_FIXUP_FUNC,
7909 .v.func = alc_fixup_headset_mode_alc255_no_hp_mic,
7911 [ALC293_FIXUP_DELL1_MIC_NO_PRESENCE] = {
7912 .type = HDA_FIXUP_PINS,
7913 .v.pins = (const struct hda_pintbl[]) {
7914 { 0x18, 0x01a1913d }, /* use as headphone mic, without its own jack detect */
7915 { 0x1a, 0x01a1913c }, /* use as headset mic, without its own jack detect */
7919 .chain_id = ALC269_FIXUP_HEADSET_MODE
7921 [ALC292_FIXUP_TPT440_DOCK] = {
7922 .type = HDA_FIXUP_FUNC,
7923 .v.func = alc_fixup_tpt440_dock,
7925 .chain_id = ALC269_FIXUP_LIMIT_INT_MIC_BOOST
7927 [ALC292_FIXUP_TPT440] = {
7928 .type = HDA_FIXUP_FUNC,
7929 .v.func = alc_fixup_disable_aamix,
7931 .chain_id = ALC292_FIXUP_TPT440_DOCK,
7933 [ALC283_FIXUP_HEADSET_MIC] = {
7934 .type = HDA_FIXUP_PINS,
7935 .v.pins = (const struct hda_pintbl[]) {
7936 { 0x19, 0x04a110f0 },
7940 [ALC255_FIXUP_MIC_MUTE_LED] = {
7941 .type = HDA_FIXUP_FUNC,
7942 .v.func = alc_fixup_micmute_led,
7944 [ALC282_FIXUP_ASPIRE_V5_PINS] = {
7945 .type = HDA_FIXUP_PINS,
7946 .v.pins = (const struct hda_pintbl[]) {
7947 { 0x12, 0x90a60130 },
7948 { 0x14, 0x90170110 },
7949 { 0x17, 0x40000008 },
7950 { 0x18, 0x411111f0 },
7951 { 0x19, 0x01a1913c },
7952 { 0x1a, 0x411111f0 },
7953 { 0x1b, 0x411111f0 },
7954 { 0x1d, 0x40f89b2d },
7955 { 0x1e, 0x411111f0 },
7956 { 0x21, 0x0321101f },
7960 [ALC269VB_FIXUP_ASPIRE_E1_COEF] = {
7961 .type = HDA_FIXUP_FUNC,
7962 .v.func = alc269vb_fixup_aspire_e1_coef,
7964 [ALC280_FIXUP_HP_GPIO4] = {
7965 .type = HDA_FIXUP_FUNC,
7966 .v.func = alc280_fixup_hp_gpio4,
7968 [ALC286_FIXUP_HP_GPIO_LED] = {
7969 .type = HDA_FIXUP_FUNC,
7970 .v.func = alc286_fixup_hp_gpio_led,
7972 [ALC280_FIXUP_HP_GPIO2_MIC_HOTKEY] = {
7973 .type = HDA_FIXUP_FUNC,
7974 .v.func = alc280_fixup_hp_gpio2_mic_hotkey,
7976 [ALC280_FIXUP_HP_DOCK_PINS] = {
7977 .type = HDA_FIXUP_PINS,
7978 .v.pins = (const struct hda_pintbl[]) {
7979 { 0x1b, 0x21011020 }, /* line-out */
7980 { 0x1a, 0x01a1903c }, /* headset mic */
7981 { 0x18, 0x2181103f }, /* line-in */
7985 .chain_id = ALC280_FIXUP_HP_GPIO4
7987 [ALC269_FIXUP_HP_DOCK_GPIO_MIC1_LED] = {
7988 .type = HDA_FIXUP_PINS,
7989 .v.pins = (const struct hda_pintbl[]) {
7990 { 0x1b, 0x21011020 }, /* line-out */
7991 { 0x18, 0x2181103f }, /* line-in */
7995 .chain_id = ALC269_FIXUP_HP_GPIO_MIC1_LED
7997 [ALC280_FIXUP_HP_9480M] = {
7998 .type = HDA_FIXUP_FUNC,
7999 .v.func = alc280_fixup_hp_9480m,
8001 [ALC245_FIXUP_HP_X360_AMP] = {
8002 .type = HDA_FIXUP_FUNC,
8003 .v.func = alc245_fixup_hp_x360_amp,
8005 .chain_id = ALC245_FIXUP_HP_GPIO_LED
8007 [ALC288_FIXUP_DELL_HEADSET_MODE] = {
8008 .type = HDA_FIXUP_FUNC,
8009 .v.func = alc_fixup_headset_mode_dell_alc288,
8011 .chain_id = ALC255_FIXUP_MIC_MUTE_LED
8013 [ALC288_FIXUP_DELL1_MIC_NO_PRESENCE] = {
8014 .type = HDA_FIXUP_PINS,
8015 .v.pins = (const struct hda_pintbl[]) {
8016 { 0x18, 0x01a1913c }, /* use as headset mic, without its own jack detect */
8017 { 0x1a, 0x01a1913d }, /* use as headphone mic, without its own jack detect */
8021 .chain_id = ALC288_FIXUP_DELL_HEADSET_MODE
8023 [ALC288_FIXUP_DISABLE_AAMIX] = {
8024 .type = HDA_FIXUP_FUNC,
8025 .v.func = alc_fixup_disable_aamix,
8027 .chain_id = ALC288_FIXUP_DELL1_MIC_NO_PRESENCE
8029 [ALC288_FIXUP_DELL_XPS_13] = {
8030 .type = HDA_FIXUP_FUNC,
8031 .v.func = alc_fixup_dell_xps13,
8033 .chain_id = ALC288_FIXUP_DISABLE_AAMIX
8035 [ALC292_FIXUP_DISABLE_AAMIX] = {
8036 .type = HDA_FIXUP_FUNC,
8037 .v.func = alc_fixup_disable_aamix,
8039 .chain_id = ALC269_FIXUP_DELL2_MIC_NO_PRESENCE
8041 [ALC293_FIXUP_DISABLE_AAMIX_MULTIJACK] = {
8042 .type = HDA_FIXUP_FUNC,
8043 .v.func = alc_fixup_disable_aamix,
8045 .chain_id = ALC293_FIXUP_DELL1_MIC_NO_PRESENCE
8047 [ALC292_FIXUP_DELL_E7X_AAMIX] = {
8048 .type = HDA_FIXUP_FUNC,
8049 .v.func = alc_fixup_dell_xps13,
8051 .chain_id = ALC292_FIXUP_DISABLE_AAMIX
8053 [ALC292_FIXUP_DELL_E7X] = {
8054 .type = HDA_FIXUP_FUNC,
8055 .v.func = alc_fixup_micmute_led,
8056 /* micmute fixup must be applied at last */
8057 .chained_before = true,
8058 .chain_id = ALC292_FIXUP_DELL_E7X_AAMIX,
8060 [ALC298_FIXUP_ALIENWARE_MIC_NO_PRESENCE] = {
8061 .type = HDA_FIXUP_PINS,
8062 .v.pins = (const struct hda_pintbl[]) {
8063 { 0x18, 0x01a1913c }, /* headset mic w/o jack detect */
8066 .chained_before = true,
8067 .chain_id = ALC269_FIXUP_HEADSET_MODE,
8069 [ALC298_FIXUP_DELL1_MIC_NO_PRESENCE] = {
8070 .type = HDA_FIXUP_PINS,
8071 .v.pins = (const struct hda_pintbl[]) {
8072 { 0x18, 0x01a1913c }, /* use as headset mic, without its own jack detect */
8073 { 0x1a, 0x01a1913d }, /* use as headphone mic, without its own jack detect */
8077 .chain_id = ALC269_FIXUP_HEADSET_MODE
8079 [ALC298_FIXUP_DELL_AIO_MIC_NO_PRESENCE] = {
8080 .type = HDA_FIXUP_PINS,
8081 .v.pins = (const struct hda_pintbl[]) {
8082 { 0x18, 0x01a1913c }, /* use as headset mic, without its own jack detect */
8086 .chain_id = ALC269_FIXUP_HEADSET_MODE
8088 [ALC275_FIXUP_DELL_XPS] = {
8089 .type = HDA_FIXUP_VERBS,
8090 .v.verbs = (const struct hda_verb[]) {
8091 /* Enables internal speaker */
8092 {0x20, AC_VERB_SET_COEF_INDEX, 0x1f},
8093 {0x20, AC_VERB_SET_PROC_COEF, 0x00c0},
8094 {0x20, AC_VERB_SET_COEF_INDEX, 0x30},
8095 {0x20, AC_VERB_SET_PROC_COEF, 0x00b1},
8099 [ALC293_FIXUP_LENOVO_SPK_NOISE] = {
8100 .type = HDA_FIXUP_FUNC,
8101 .v.func = alc_fixup_disable_aamix,
8103 .chain_id = ALC269_FIXUP_THINKPAD_ACPI
8105 [ALC233_FIXUP_LENOVO_LINE2_MIC_HOTKEY] = {
8106 .type = HDA_FIXUP_FUNC,
8107 .v.func = alc233_fixup_lenovo_line2_mic_hotkey,
8109 [ALC233_FIXUP_INTEL_NUC8_DMIC] = {
8110 .type = HDA_FIXUP_FUNC,
8111 .v.func = alc_fixup_inv_dmic,
8113 .chain_id = ALC233_FIXUP_INTEL_NUC8_BOOST,
8115 [ALC233_FIXUP_INTEL_NUC8_BOOST] = {
8116 .type = HDA_FIXUP_FUNC,
8117 .v.func = alc269_fixup_limit_int_mic_boost
8119 [ALC255_FIXUP_DELL_SPK_NOISE] = {
8120 .type = HDA_FIXUP_FUNC,
8121 .v.func = alc_fixup_disable_aamix,
8123 .chain_id = ALC255_FIXUP_DELL1_MIC_NO_PRESENCE
8125 [ALC225_FIXUP_DISABLE_MIC_VREF] = {
8126 .type = HDA_FIXUP_FUNC,
8127 .v.func = alc_fixup_disable_mic_vref,
8129 .chain_id = ALC269_FIXUP_DELL1_MIC_NO_PRESENCE
8131 [ALC225_FIXUP_DELL1_MIC_NO_PRESENCE] = {
8132 .type = HDA_FIXUP_VERBS,
8133 .v.verbs = (const struct hda_verb[]) {
8134 /* Disable pass-through path for FRONT 14h */
8135 { 0x20, AC_VERB_SET_COEF_INDEX, 0x36 },
8136 { 0x20, AC_VERB_SET_PROC_COEF, 0x57d7 },
8140 .chain_id = ALC225_FIXUP_DISABLE_MIC_VREF
8142 [ALC280_FIXUP_HP_HEADSET_MIC] = {
8143 .type = HDA_FIXUP_FUNC,
8144 .v.func = alc_fixup_disable_aamix,
8146 .chain_id = ALC269_FIXUP_HEADSET_MIC,
8148 [ALC221_FIXUP_HP_FRONT_MIC] = {
8149 .type = HDA_FIXUP_PINS,
8150 .v.pins = (const struct hda_pintbl[]) {
8151 { 0x19, 0x02a19020 }, /* Front Mic */
8155 [ALC292_FIXUP_TPT460] = {
8156 .type = HDA_FIXUP_FUNC,
8157 .v.func = alc_fixup_tpt440_dock,
8159 .chain_id = ALC293_FIXUP_LENOVO_SPK_NOISE,
8161 [ALC298_FIXUP_SPK_VOLUME] = {
8162 .type = HDA_FIXUP_FUNC,
8163 .v.func = alc298_fixup_speaker_volume,
8165 .chain_id = ALC298_FIXUP_DELL_AIO_MIC_NO_PRESENCE,
8167 [ALC298_FIXUP_LENOVO_SPK_VOLUME] = {
8168 .type = HDA_FIXUP_FUNC,
8169 .v.func = alc298_fixup_speaker_volume,
8171 [ALC295_FIXUP_DISABLE_DAC3] = {
8172 .type = HDA_FIXUP_FUNC,
8173 .v.func = alc295_fixup_disable_dac3,
8175 [ALC285_FIXUP_SPEAKER2_TO_DAC1] = {
8176 .type = HDA_FIXUP_FUNC,
8177 .v.func = alc285_fixup_speaker2_to_dac1,
8179 .chain_id = ALC269_FIXUP_THINKPAD_ACPI
8181 [ALC285_FIXUP_ASUS_SPEAKER2_TO_DAC1] = {
8182 .type = HDA_FIXUP_FUNC,
8183 .v.func = alc285_fixup_speaker2_to_dac1,
8185 .chain_id = ALC245_FIXUP_CS35L41_SPI_2
8187 [ALC285_FIXUP_ASUS_HEADSET_MIC] = {
8188 .type = HDA_FIXUP_PINS,
8189 .v.pins = (const struct hda_pintbl[]) {
8190 { 0x19, 0x03a11050 },
8191 { 0x1b, 0x03a11c30 },
8195 .chain_id = ALC285_FIXUP_ASUS_SPEAKER2_TO_DAC1
8197 [ALC285_FIXUP_ASUS_SPI_REAR_SPEAKERS] = {
8198 .type = HDA_FIXUP_PINS,
8199 .v.pins = (const struct hda_pintbl[]) {
8200 { 0x14, 0x90170120 },
8204 .chain_id = ALC285_FIXUP_ASUS_HEADSET_MIC
8206 [ALC285_FIXUP_ASUS_I2C_SPEAKER2_TO_DAC1] = {
8207 .type = HDA_FIXUP_FUNC,
8208 .v.func = alc285_fixup_speaker2_to_dac1,
8210 .chain_id = ALC287_FIXUP_CS35L41_I2C_2
8212 [ALC285_FIXUP_ASUS_I2C_HEADSET_MIC] = {
8213 .type = HDA_FIXUP_PINS,
8214 .v.pins = (const struct hda_pintbl[]) {
8215 { 0x19, 0x03a11050 },
8216 { 0x1b, 0x03a11c30 },
8220 .chain_id = ALC285_FIXUP_ASUS_I2C_SPEAKER2_TO_DAC1
8222 [ALC256_FIXUP_DELL_INSPIRON_7559_SUBWOOFER] = {
8223 .type = HDA_FIXUP_PINS,
8224 .v.pins = (const struct hda_pintbl[]) {
8225 { 0x1b, 0x90170151 },
8229 .chain_id = ALC255_FIXUP_DELL1_MIC_NO_PRESENCE
8231 [ALC269_FIXUP_ATIV_BOOK_8] = {
8232 .type = HDA_FIXUP_FUNC,
8233 .v.func = alc_fixup_auto_mute_via_amp,
8235 .chain_id = ALC269_FIXUP_NO_SHUTUP
8237 [ALC221_FIXUP_HP_288PRO_MIC_NO_PRESENCE] = {
8238 .type = HDA_FIXUP_PINS,
8239 .v.pins = (const struct hda_pintbl[]) {
8240 { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */
8241 { 0x1a, 0x01813030 }, /* use as headphone mic, without its own jack detect */
8245 .chain_id = ALC269_FIXUP_HEADSET_MODE
8247 [ALC221_FIXUP_HP_MIC_NO_PRESENCE] = {
8248 .type = HDA_FIXUP_PINS,
8249 .v.pins = (const struct hda_pintbl[]) {
8250 { 0x18, 0x01a1913c }, /* use as headset mic, without its own jack detect */
8251 { 0x1a, 0x01a1913d }, /* use as headphone mic, without its own jack detect */
8255 .chain_id = ALC269_FIXUP_HEADSET_MODE
8257 [ALC256_FIXUP_ASUS_HEADSET_MODE] = {
8258 .type = HDA_FIXUP_FUNC,
8259 .v.func = alc_fixup_headset_mode,
8261 [ALC256_FIXUP_ASUS_MIC] = {
8262 .type = HDA_FIXUP_PINS,
8263 .v.pins = (const struct hda_pintbl[]) {
8264 { 0x13, 0x90a60160 }, /* use as internal mic */
8265 { 0x19, 0x04a11120 }, /* use as headset mic, without its own jack detect */
8269 .chain_id = ALC256_FIXUP_ASUS_HEADSET_MODE
8271 [ALC256_FIXUP_ASUS_AIO_GPIO2] = {
8272 .type = HDA_FIXUP_FUNC,
8273 /* Set up GPIO2 for the speaker amp */
8274 .v.func = alc_fixup_gpio4,
8276 [ALC233_FIXUP_ASUS_MIC_NO_PRESENCE] = {
8277 .type = HDA_FIXUP_PINS,
8278 .v.pins = (const struct hda_pintbl[]) {
8279 { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */
8283 .chain_id = ALC269_FIXUP_HEADSET_MIC
8285 [ALC233_FIXUP_EAPD_COEF_AND_MIC_NO_PRESENCE] = {
8286 .type = HDA_FIXUP_VERBS,
8287 .v.verbs = (const struct hda_verb[]) {
8288 /* Enables internal speaker */
8289 {0x20, AC_VERB_SET_COEF_INDEX, 0x40},
8290 {0x20, AC_VERB_SET_PROC_COEF, 0x8800},
8294 .chain_id = ALC233_FIXUP_ASUS_MIC_NO_PRESENCE
8296 [ALC233_FIXUP_LENOVO_MULTI_CODECS] = {
8297 .type = HDA_FIXUP_FUNC,
8298 .v.func = alc233_alc662_fixup_lenovo_dual_codecs,
8300 .chain_id = ALC269_FIXUP_GPIO2
8302 [ALC233_FIXUP_ACER_HEADSET_MIC] = {
8303 .type = HDA_FIXUP_VERBS,
8304 .v.verbs = (const struct hda_verb[]) {
8305 { 0x20, AC_VERB_SET_COEF_INDEX, 0x45 },
8306 { 0x20, AC_VERB_SET_PROC_COEF, 0x5089 },
8310 .chain_id = ALC233_FIXUP_ASUS_MIC_NO_PRESENCE
8312 [ALC294_FIXUP_LENOVO_MIC_LOCATION] = {
8313 .type = HDA_FIXUP_PINS,
8314 .v.pins = (const struct hda_pintbl[]) {
8315 /* Change the mic location from front to right, otherwise there are
8316 two front mics with the same name, pulseaudio can't handle them.
8317 This is just a temporary workaround, after applying this fixup,
8318 there will be one "Front Mic" and one "Mic" in this machine.
8320 { 0x1a, 0x04a19040 },
8324 [ALC225_FIXUP_DELL_WYSE_MIC_NO_PRESENCE] = {
8325 .type = HDA_FIXUP_PINS,
8326 .v.pins = (const struct hda_pintbl[]) {
8327 { 0x16, 0x0101102f }, /* Rear Headset HP */
8328 { 0x19, 0x02a1913c }, /* use as Front headset mic, without its own jack detect */
8329 { 0x1a, 0x01a19030 }, /* Rear Headset MIC */
8330 { 0x1b, 0x02011020 },
8334 .chain_id = ALC225_FIXUP_S3_POP_NOISE
8336 [ALC225_FIXUP_S3_POP_NOISE] = {
8337 .type = HDA_FIXUP_FUNC,
8338 .v.func = alc225_fixup_s3_pop_noise,
8340 .chain_id = ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC
8342 [ALC700_FIXUP_INTEL_REFERENCE] = {
8343 .type = HDA_FIXUP_VERBS,
8344 .v.verbs = (const struct hda_verb[]) {
8345 /* Enables internal speaker */
8346 {0x20, AC_VERB_SET_COEF_INDEX, 0x45},
8347 {0x20, AC_VERB_SET_PROC_COEF, 0x5289},
8348 {0x20, AC_VERB_SET_COEF_INDEX, 0x4A},
8349 {0x20, AC_VERB_SET_PROC_COEF, 0x001b},
8350 {0x58, AC_VERB_SET_COEF_INDEX, 0x00},
8351 {0x58, AC_VERB_SET_PROC_COEF, 0x3888},
8352 {0x20, AC_VERB_SET_COEF_INDEX, 0x6f},
8353 {0x20, AC_VERB_SET_PROC_COEF, 0x2c0b},
8357 [ALC274_FIXUP_DELL_BIND_DACS] = {
8358 .type = HDA_FIXUP_FUNC,
8359 .v.func = alc274_fixup_bind_dacs,
8361 .chain_id = ALC269_FIXUP_DELL1_MIC_NO_PRESENCE
8363 [ALC274_FIXUP_DELL_AIO_LINEOUT_VERB] = {
8364 .type = HDA_FIXUP_PINS,
8365 .v.pins = (const struct hda_pintbl[]) {
8366 { 0x1b, 0x0401102f },
8370 .chain_id = ALC274_FIXUP_DELL_BIND_DACS
8372 [ALC298_FIXUP_TPT470_DOCK_FIX] = {
8373 .type = HDA_FIXUP_FUNC,
8374 .v.func = alc_fixup_tpt470_dock,
8376 .chain_id = ALC293_FIXUP_LENOVO_SPK_NOISE
8378 [ALC298_FIXUP_TPT470_DOCK] = {
8379 .type = HDA_FIXUP_FUNC,
8380 .v.func = alc_fixup_tpt470_dacs,
8382 .chain_id = ALC298_FIXUP_TPT470_DOCK_FIX
8384 [ALC255_FIXUP_DUMMY_LINEOUT_VERB] = {
8385 .type = HDA_FIXUP_PINS,
8386 .v.pins = (const struct hda_pintbl[]) {
8387 { 0x14, 0x0201101f },
8391 .chain_id = ALC255_FIXUP_DELL1_MIC_NO_PRESENCE
8393 [ALC255_FIXUP_DELL_HEADSET_MIC] = {
8394 .type = HDA_FIXUP_PINS,
8395 .v.pins = (const struct hda_pintbl[]) {
8396 { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */
8400 .chain_id = ALC269_FIXUP_HEADSET_MIC
8402 [ALC295_FIXUP_HP_X360] = {
8403 .type = HDA_FIXUP_FUNC,
8404 .v.func = alc295_fixup_hp_top_speakers,
8406 .chain_id = ALC269_FIXUP_HP_MUTE_LED_MIC3
8408 [ALC221_FIXUP_HP_HEADSET_MIC] = {
8409 .type = HDA_FIXUP_PINS,
8410 .v.pins = (const struct hda_pintbl[]) {
8411 { 0x19, 0x0181313f},
8415 .chain_id = ALC269_FIXUP_HEADSET_MIC
8417 [ALC285_FIXUP_LENOVO_HEADPHONE_NOISE] = {
8418 .type = HDA_FIXUP_FUNC,
8419 .v.func = alc285_fixup_invalidate_dacs,
8421 .chain_id = ALC269_FIXUP_THINKPAD_ACPI
8423 [ALC295_FIXUP_HP_AUTO_MUTE] = {
8424 .type = HDA_FIXUP_FUNC,
8425 .v.func = alc_fixup_auto_mute_via_amp,
8427 [ALC286_FIXUP_ACER_AIO_MIC_NO_PRESENCE] = {
8428 .type = HDA_FIXUP_PINS,
8429 .v.pins = (const struct hda_pintbl[]) {
8430 { 0x18, 0x01a1913c }, /* use as headset mic, without its own jack detect */
8434 .chain_id = ALC269_FIXUP_HEADSET_MIC
8436 [ALC294_FIXUP_ASUS_MIC] = {
8437 .type = HDA_FIXUP_PINS,
8438 .v.pins = (const struct hda_pintbl[]) {
8439 { 0x13, 0x90a60160 }, /* use as internal mic */
8440 { 0x19, 0x04a11120 }, /* use as headset mic, without its own jack detect */
8444 .chain_id = ALC269_FIXUP_HEADSET_MIC
8446 [ALC294_FIXUP_ASUS_HEADSET_MIC] = {
8447 .type = HDA_FIXUP_PINS,
8448 .v.pins = (const struct hda_pintbl[]) {
8449 { 0x19, 0x01a1103c }, /* use as headset mic */
8453 .chain_id = ALC269_FIXUP_HEADSET_MIC
8455 [ALC294_FIXUP_ASUS_SPK] = {
8456 .type = HDA_FIXUP_VERBS,
8457 .v.verbs = (const struct hda_verb[]) {
8459 { 0x20, AC_VERB_SET_COEF_INDEX, 0x40 },
8460 { 0x20, AC_VERB_SET_PROC_COEF, 0x8800 },
8461 { 0x20, AC_VERB_SET_COEF_INDEX, 0x0f },
8462 { 0x20, AC_VERB_SET_PROC_COEF, 0x7774 },
8466 .chain_id = ALC294_FIXUP_ASUS_HEADSET_MIC
8468 [ALC295_FIXUP_CHROME_BOOK] = {
8469 .type = HDA_FIXUP_FUNC,
8470 .v.func = alc295_fixup_chromebook,
8472 .chain_id = ALC225_FIXUP_HEADSET_JACK
8474 [ALC225_FIXUP_HEADSET_JACK] = {
8475 .type = HDA_FIXUP_FUNC,
8476 .v.func = alc_fixup_headset_jack,
8478 [ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE] = {
8479 .type = HDA_FIXUP_PINS,
8480 .v.pins = (const struct hda_pintbl[]) {
8481 { 0x1a, 0x01a1913c }, /* use as headset mic, without its own jack detect */
8485 .chain_id = ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC
8487 [ALC285_FIXUP_LENOVO_PC_BEEP_IN_NOISE] = {
8488 .type = HDA_FIXUP_VERBS,
8489 .v.verbs = (const struct hda_verb[]) {
8490 /* Disable PCBEEP-IN passthrough */
8491 { 0x20, AC_VERB_SET_COEF_INDEX, 0x36 },
8492 { 0x20, AC_VERB_SET_PROC_COEF, 0x57d7 },
8496 .chain_id = ALC285_FIXUP_LENOVO_HEADPHONE_NOISE
8498 [ALC255_FIXUP_ACER_HEADSET_MIC] = {
8499 .type = HDA_FIXUP_PINS,
8500 .v.pins = (const struct hda_pintbl[]) {
8501 { 0x19, 0x03a11130 },
8502 { 0x1a, 0x90a60140 }, /* use as internal mic */
8506 .chain_id = ALC255_FIXUP_HEADSET_MODE_NO_HP_MIC
8508 [ALC225_FIXUP_DELL_WYSE_AIO_MIC_NO_PRESENCE] = {
8509 .type = HDA_FIXUP_PINS,
8510 .v.pins = (const struct hda_pintbl[]) {
8511 { 0x16, 0x01011020 }, /* Rear Line out */
8512 { 0x19, 0x01a1913c }, /* use as Front headset mic, without its own jack detect */
8516 .chain_id = ALC225_FIXUP_WYSE_AUTO_MUTE
8518 [ALC225_FIXUP_WYSE_AUTO_MUTE] = {
8519 .type = HDA_FIXUP_FUNC,
8520 .v.func = alc_fixup_auto_mute_via_amp,
8522 .chain_id = ALC225_FIXUP_WYSE_DISABLE_MIC_VREF
8524 [ALC225_FIXUP_WYSE_DISABLE_MIC_VREF] = {
8525 .type = HDA_FIXUP_FUNC,
8526 .v.func = alc_fixup_disable_mic_vref,
8528 .chain_id = ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC
8530 [ALC286_FIXUP_ACER_AIO_HEADSET_MIC] = {
8531 .type = HDA_FIXUP_VERBS,
8532 .v.verbs = (const struct hda_verb[]) {
8533 { 0x20, AC_VERB_SET_COEF_INDEX, 0x4f },
8534 { 0x20, AC_VERB_SET_PROC_COEF, 0x5029 },
8538 .chain_id = ALC286_FIXUP_ACER_AIO_MIC_NO_PRESENCE
8540 [ALC256_FIXUP_ASUS_HEADSET_MIC] = {
8541 .type = HDA_FIXUP_PINS,
8542 .v.pins = (const struct hda_pintbl[]) {
8543 { 0x19, 0x03a11020 }, /* headset mic with jack detect */
8547 .chain_id = ALC256_FIXUP_ASUS_HEADSET_MODE
8549 [ALC256_FIXUP_ASUS_MIC_NO_PRESENCE] = {
8550 .type = HDA_FIXUP_PINS,
8551 .v.pins = (const struct hda_pintbl[]) {
8552 { 0x19, 0x04a11120 }, /* use as headset mic, without its own jack detect */
8556 .chain_id = ALC256_FIXUP_ASUS_HEADSET_MODE
8558 [ALC299_FIXUP_PREDATOR_SPK] = {
8559 .type = HDA_FIXUP_PINS,
8560 .v.pins = (const struct hda_pintbl[]) {
8561 { 0x21, 0x90170150 }, /* use as headset mic, without its own jack detect */
8565 [ALC256_FIXUP_MEDION_HEADSET_NO_PRESENCE] = {
8566 .type = HDA_FIXUP_PINS,
8567 .v.pins = (const struct hda_pintbl[]) {
8568 { 0x19, 0x04a11040 },
8569 { 0x21, 0x04211020 },
8573 .chain_id = ALC256_FIXUP_ASUS_HEADSET_MODE
8575 [ALC289_FIXUP_DELL_SPK1] = {
8576 .type = HDA_FIXUP_PINS,
8577 .v.pins = (const struct hda_pintbl[]) {
8578 { 0x14, 0x90170140 },
8582 .chain_id = ALC269_FIXUP_DELL4_MIC_NO_PRESENCE
8584 [ALC289_FIXUP_DELL_SPK2] = {
8585 .type = HDA_FIXUP_PINS,
8586 .v.pins = (const struct hda_pintbl[]) {
8587 { 0x17, 0x90170130 }, /* bass spk */
8591 .chain_id = ALC269_FIXUP_DELL4_MIC_NO_PRESENCE
8593 [ALC289_FIXUP_DUAL_SPK] = {
8594 .type = HDA_FIXUP_FUNC,
8595 .v.func = alc285_fixup_speaker2_to_dac1,
8597 .chain_id = ALC289_FIXUP_DELL_SPK2
8599 [ALC289_FIXUP_RTK_AMP_DUAL_SPK] = {
8600 .type = HDA_FIXUP_FUNC,
8601 .v.func = alc285_fixup_speaker2_to_dac1,
8603 .chain_id = ALC289_FIXUP_DELL_SPK1
8605 [ALC294_FIXUP_SPK2_TO_DAC1] = {
8606 .type = HDA_FIXUP_FUNC,
8607 .v.func = alc285_fixup_speaker2_to_dac1,
8609 .chain_id = ALC294_FIXUP_ASUS_HEADSET_MIC
8611 [ALC294_FIXUP_ASUS_DUAL_SPK] = {
8612 .type = HDA_FIXUP_FUNC,
8613 /* The GPIO must be pulled to initialize the AMP */
8614 .v.func = alc_fixup_gpio4,
8616 .chain_id = ALC294_FIXUP_SPK2_TO_DAC1
8618 [ALC294_FIXUP_ASUS_ALLY] = {
8619 .type = HDA_FIXUP_FUNC,
8620 .v.func = cs35l41_fixup_i2c_two,
8622 .chain_id = ALC294_FIXUP_ASUS_ALLY_PINS
8624 [ALC294_FIXUP_ASUS_ALLY_PINS] = {
8625 .type = HDA_FIXUP_PINS,
8626 .v.pins = (const struct hda_pintbl[]) {
8627 { 0x19, 0x03a11050 },
8628 { 0x1a, 0x03a11c30 },
8629 { 0x21, 0x03211420 },
8633 .chain_id = ALC294_FIXUP_ASUS_ALLY_VERBS
8635 [ALC294_FIXUP_ASUS_ALLY_VERBS] = {
8636 .type = HDA_FIXUP_VERBS,
8637 .v.verbs = (const struct hda_verb[]) {
8638 { 0x20, AC_VERB_SET_COEF_INDEX, 0x45 },
8639 { 0x20, AC_VERB_SET_PROC_COEF, 0x5089 },
8640 { 0x20, AC_VERB_SET_COEF_INDEX, 0x46 },
8641 { 0x20, AC_VERB_SET_PROC_COEF, 0x0004 },
8642 { 0x20, AC_VERB_SET_COEF_INDEX, 0x47 },
8643 { 0x20, AC_VERB_SET_PROC_COEF, 0xa47a },
8644 { 0x20, AC_VERB_SET_COEF_INDEX, 0x49 },
8645 { 0x20, AC_VERB_SET_PROC_COEF, 0x0049},
8646 { 0x20, AC_VERB_SET_COEF_INDEX, 0x4a },
8647 { 0x20, AC_VERB_SET_PROC_COEF, 0x201b },
8648 { 0x20, AC_VERB_SET_COEF_INDEX, 0x6b },
8649 { 0x20, AC_VERB_SET_PROC_COEF, 0x4278},
8653 .chain_id = ALC294_FIXUP_ASUS_ALLY_SPEAKER
8655 [ALC294_FIXUP_ASUS_ALLY_SPEAKER] = {
8656 .type = HDA_FIXUP_FUNC,
8657 .v.func = alc285_fixup_speaker2_to_dac1,
8659 [ALC285_FIXUP_THINKPAD_X1_GEN7] = {
8660 .type = HDA_FIXUP_FUNC,
8661 .v.func = alc285_fixup_thinkpad_x1_gen7,
8663 .chain_id = ALC269_FIXUP_THINKPAD_ACPI
8665 [ALC285_FIXUP_THINKPAD_HEADSET_JACK] = {
8666 .type = HDA_FIXUP_FUNC,
8667 .v.func = alc_fixup_headset_jack,
8669 .chain_id = ALC285_FIXUP_THINKPAD_X1_GEN7
8671 [ALC294_FIXUP_ASUS_HPE] = {
8672 .type = HDA_FIXUP_VERBS,
8673 .v.verbs = (const struct hda_verb[]) {
8675 { 0x20, AC_VERB_SET_COEF_INDEX, 0x0f },
8676 { 0x20, AC_VERB_SET_PROC_COEF, 0x7774 },
8680 .chain_id = ALC294_FIXUP_ASUS_HEADSET_MIC
8682 [ALC294_FIXUP_ASUS_GX502_PINS] = {
8683 .type = HDA_FIXUP_PINS,
8684 .v.pins = (const struct hda_pintbl[]) {
8685 { 0x19, 0x03a11050 }, /* front HP mic */
8686 { 0x1a, 0x01a11830 }, /* rear external mic */
8687 { 0x21, 0x03211020 }, /* front HP out */
8691 .chain_id = ALC294_FIXUP_ASUS_GX502_VERBS
8693 [ALC294_FIXUP_ASUS_GX502_VERBS] = {
8694 .type = HDA_FIXUP_VERBS,
8695 .v.verbs = (const struct hda_verb[]) {
8696 /* set 0x15 to HP-OUT ctrl */
8697 { 0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, 0xc0 },
8698 /* unmute the 0x15 amp */
8699 { 0x15, AC_VERB_SET_AMP_GAIN_MUTE, 0xb000 },
8703 .chain_id = ALC294_FIXUP_ASUS_GX502_HP
8705 [ALC294_FIXUP_ASUS_GX502_HP] = {
8706 .type = HDA_FIXUP_FUNC,
8707 .v.func = alc294_fixup_gx502_hp,
8709 [ALC294_FIXUP_ASUS_GU502_PINS] = {
8710 .type = HDA_FIXUP_PINS,
8711 .v.pins = (const struct hda_pintbl[]) {
8712 { 0x19, 0x01a11050 }, /* rear HP mic */
8713 { 0x1a, 0x01a11830 }, /* rear external mic */
8714 { 0x21, 0x012110f0 }, /* rear HP out */
8718 .chain_id = ALC294_FIXUP_ASUS_GU502_VERBS
8720 [ALC294_FIXUP_ASUS_GU502_VERBS] = {
8721 .type = HDA_FIXUP_VERBS,
8722 .v.verbs = (const struct hda_verb[]) {
8723 /* set 0x15 to HP-OUT ctrl */
8724 { 0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, 0xc0 },
8725 /* unmute the 0x15 amp */
8726 { 0x15, AC_VERB_SET_AMP_GAIN_MUTE, 0xb000 },
8727 /* set 0x1b to HP-OUT */
8728 { 0x1b, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x24 },
8732 .chain_id = ALC294_FIXUP_ASUS_GU502_HP
8734 [ALC294_FIXUP_ASUS_GU502_HP] = {
8735 .type = HDA_FIXUP_FUNC,
8736 .v.func = alc294_fixup_gu502_hp,
8738 [ALC294_FIXUP_ASUS_G513_PINS] = {
8739 .type = HDA_FIXUP_PINS,
8740 .v.pins = (const struct hda_pintbl[]) {
8741 { 0x19, 0x03a11050 }, /* front HP mic */
8742 { 0x1a, 0x03a11c30 }, /* rear external mic */
8743 { 0x21, 0x03211420 }, /* front HP out */
8747 [ALC285_FIXUP_ASUS_G533Z_PINS] = {
8748 .type = HDA_FIXUP_PINS,
8749 .v.pins = (const struct hda_pintbl[]) {
8750 { 0x14, 0x90170152 }, /* Speaker Surround Playback Switch */
8751 { 0x19, 0x03a19020 }, /* Mic Boost Volume */
8752 { 0x1a, 0x03a11c30 }, /* Mic Boost Volume */
8753 { 0x1e, 0x90170151 }, /* Rear jack, IN OUT EAPD Detect */
8754 { 0x21, 0x03211420 },
8758 [ALC294_FIXUP_ASUS_COEF_1B] = {
8759 .type = HDA_FIXUP_VERBS,
8760 .v.verbs = (const struct hda_verb[]) {
8761 /* Set bit 10 to correct noisy output after reboot from
8762 * Windows 10 (due to pop noise reduction?)
8764 { 0x20, AC_VERB_SET_COEF_INDEX, 0x1b },
8765 { 0x20, AC_VERB_SET_PROC_COEF, 0x4e4b },
8769 .chain_id = ALC289_FIXUP_ASUS_GA401,
8771 [ALC285_FIXUP_HP_GPIO_LED] = {
8772 .type = HDA_FIXUP_FUNC,
8773 .v.func = alc285_fixup_hp_gpio_led,
8775 [ALC285_FIXUP_HP_MUTE_LED] = {
8776 .type = HDA_FIXUP_FUNC,
8777 .v.func = alc285_fixup_hp_mute_led,
8779 [ALC285_FIXUP_HP_SPECTRE_X360_MUTE_LED] = {
8780 .type = HDA_FIXUP_FUNC,
8781 .v.func = alc285_fixup_hp_spectre_x360_mute_led,
8783 [ALC236_FIXUP_HP_MUTE_LED_COEFBIT2] = {
8784 .type = HDA_FIXUP_FUNC,
8785 .v.func = alc236_fixup_hp_mute_led_coefbit2,
8787 [ALC236_FIXUP_HP_GPIO_LED] = {
8788 .type = HDA_FIXUP_FUNC,
8789 .v.func = alc236_fixup_hp_gpio_led,
8791 [ALC236_FIXUP_HP_MUTE_LED] = {
8792 .type = HDA_FIXUP_FUNC,
8793 .v.func = alc236_fixup_hp_mute_led,
8795 [ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF] = {
8796 .type = HDA_FIXUP_FUNC,
8797 .v.func = alc236_fixup_hp_mute_led_micmute_vref,
8799 [ALC298_FIXUP_SAMSUNG_AMP] = {
8800 .type = HDA_FIXUP_FUNC,
8801 .v.func = alc298_fixup_samsung_amp,
8803 .chain_id = ALC298_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET
8805 [ALC298_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET] = {
8806 .type = HDA_FIXUP_VERBS,
8807 .v.verbs = (const struct hda_verb[]) {
8808 { 0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL, 0xc5 },
8812 [ALC256_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET] = {
8813 .type = HDA_FIXUP_VERBS,
8814 .v.verbs = (const struct hda_verb[]) {
8815 { 0x20, AC_VERB_SET_COEF_INDEX, 0x08},
8816 { 0x20, AC_VERB_SET_PROC_COEF, 0x2fcf},
8820 [ALC295_FIXUP_ASUS_MIC_NO_PRESENCE] = {
8821 .type = HDA_FIXUP_PINS,
8822 .v.pins = (const struct hda_pintbl[]) {
8823 { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */
8827 .chain_id = ALC269_FIXUP_HEADSET_MODE
8829 [ALC269VC_FIXUP_ACER_VCOPPERBOX_PINS] = {
8830 .type = HDA_FIXUP_PINS,
8831 .v.pins = (const struct hda_pintbl[]) {
8832 { 0x14, 0x90100120 }, /* use as internal speaker */
8833 { 0x18, 0x02a111f0 }, /* use as headset mic, without its own jack detect */
8834 { 0x1a, 0x01011020 }, /* use as line out */
8838 .chain_id = ALC269_FIXUP_HEADSET_MIC
8840 [ALC269VC_FIXUP_ACER_HEADSET_MIC] = {
8841 .type = HDA_FIXUP_PINS,
8842 .v.pins = (const struct hda_pintbl[]) {
8843 { 0x18, 0x02a11030 }, /* use as headset mic */
8847 .chain_id = ALC269_FIXUP_HEADSET_MIC
8849 [ALC269VC_FIXUP_ACER_MIC_NO_PRESENCE] = {
8850 .type = HDA_FIXUP_PINS,
8851 .v.pins = (const struct hda_pintbl[]) {
8852 { 0x18, 0x01a11130 }, /* use as headset mic, without its own jack detect */
8856 .chain_id = ALC269_FIXUP_HEADSET_MIC
8858 [ALC289_FIXUP_ASUS_GA401] = {
8859 .type = HDA_FIXUP_FUNC,
8860 .v.func = alc289_fixup_asus_ga401,
8862 .chain_id = ALC289_FIXUP_ASUS_GA502,
8864 [ALC289_FIXUP_ASUS_GA502] = {
8865 .type = HDA_FIXUP_PINS,
8866 .v.pins = (const struct hda_pintbl[]) {
8867 { 0x19, 0x03a11020 }, /* headset mic with jack detect */
8871 [ALC256_FIXUP_ACER_MIC_NO_PRESENCE] = {
8872 .type = HDA_FIXUP_PINS,
8873 .v.pins = (const struct hda_pintbl[]) {
8874 { 0x19, 0x02a11120 }, /* use as headset mic, without its own jack detect */
8878 .chain_id = ALC256_FIXUP_ASUS_HEADSET_MODE
8880 [ALC285_FIXUP_HP_GPIO_AMP_INIT] = {
8881 .type = HDA_FIXUP_FUNC,
8882 .v.func = alc285_fixup_hp_gpio_amp_init,
8884 .chain_id = ALC285_FIXUP_HP_GPIO_LED
8886 [ALC269_FIXUP_CZC_B20] = {
8887 .type = HDA_FIXUP_PINS,
8888 .v.pins = (const struct hda_pintbl[]) {
8889 { 0x12, 0x411111f0 },
8890 { 0x14, 0x90170110 }, /* speaker */
8891 { 0x15, 0x032f1020 }, /* HP out */
8892 { 0x17, 0x411111f0 },
8893 { 0x18, 0x03ab1040 }, /* mic */
8894 { 0x19, 0xb7a7013f },
8895 { 0x1a, 0x0181305f },
8896 { 0x1b, 0x411111f0 },
8897 { 0x1d, 0x411111f0 },
8898 { 0x1e, 0x411111f0 },
8901 .chain_id = ALC269_FIXUP_DMIC,
8903 [ALC269_FIXUP_CZC_TMI] = {
8904 .type = HDA_FIXUP_PINS,
8905 .v.pins = (const struct hda_pintbl[]) {
8906 { 0x12, 0x4000c000 },
8907 { 0x14, 0x90170110 }, /* speaker */
8908 { 0x15, 0x0421401f }, /* HP out */
8909 { 0x17, 0x411111f0 },
8910 { 0x18, 0x04a19020 }, /* mic */
8911 { 0x19, 0x411111f0 },
8912 { 0x1a, 0x411111f0 },
8913 { 0x1b, 0x411111f0 },
8914 { 0x1d, 0x40448505 },
8915 { 0x1e, 0x411111f0 },
8916 { 0x20, 0x8000ffff },
8919 .chain_id = ALC269_FIXUP_DMIC,
8921 [ALC269_FIXUP_CZC_L101] = {
8922 .type = HDA_FIXUP_PINS,
8923 .v.pins = (const struct hda_pintbl[]) {
8924 { 0x12, 0x40000000 },
8925 { 0x14, 0x01014010 }, /* speaker */
8926 { 0x15, 0x411111f0 }, /* HP out */
8927 { 0x16, 0x411111f0 },
8928 { 0x18, 0x01a19020 }, /* mic */
8929 { 0x19, 0x02a19021 },
8930 { 0x1a, 0x0181302f },
8931 { 0x1b, 0x0221401f },
8932 { 0x1c, 0x411111f0 },
8933 { 0x1d, 0x4044c601 },
8934 { 0x1e, 0x411111f0 },
8937 .chain_id = ALC269_FIXUP_DMIC,
8939 [ALC269_FIXUP_LEMOTE_A1802] = {
8940 .type = HDA_FIXUP_PINS,
8941 .v.pins = (const struct hda_pintbl[]) {
8942 { 0x12, 0x40000000 },
8943 { 0x14, 0x90170110 }, /* speaker */
8944 { 0x17, 0x411111f0 },
8945 { 0x18, 0x03a19040 }, /* mic1 */
8946 { 0x19, 0x90a70130 }, /* mic2 */
8947 { 0x1a, 0x411111f0 },
8948 { 0x1b, 0x411111f0 },
8949 { 0x1d, 0x40489d2d },
8950 { 0x1e, 0x411111f0 },
8951 { 0x20, 0x0003ffff },
8952 { 0x21, 0x03214020 },
8955 .chain_id = ALC269_FIXUP_DMIC,
8957 [ALC269_FIXUP_LEMOTE_A190X] = {
8958 .type = HDA_FIXUP_PINS,
8959 .v.pins = (const struct hda_pintbl[]) {
8960 { 0x14, 0x99130110 }, /* speaker */
8961 { 0x15, 0x0121401f }, /* HP out */
8962 { 0x18, 0x01a19c20 }, /* rear mic */
8963 { 0x19, 0x99a3092f }, /* front mic */
8964 { 0x1b, 0x0201401f }, /* front lineout */
8967 .chain_id = ALC269_FIXUP_DMIC,
8969 [ALC256_FIXUP_INTEL_NUC8_RUGGED] = {
8970 .type = HDA_FIXUP_PINS,
8971 .v.pins = (const struct hda_pintbl[]) {
8972 { 0x1b, 0x01a1913c }, /* use as headset mic, without its own jack detect */
8976 .chain_id = ALC269_FIXUP_HEADSET_MODE
8978 [ALC256_FIXUP_INTEL_NUC10] = {
8979 .type = HDA_FIXUP_PINS,
8980 .v.pins = (const struct hda_pintbl[]) {
8981 { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */
8985 .chain_id = ALC269_FIXUP_HEADSET_MODE
8987 [ALC255_FIXUP_XIAOMI_HEADSET_MIC] = {
8988 .type = HDA_FIXUP_VERBS,
8989 .v.verbs = (const struct hda_verb[]) {
8990 { 0x20, AC_VERB_SET_COEF_INDEX, 0x45 },
8991 { 0x20, AC_VERB_SET_PROC_COEF, 0x5089 },
8995 .chain_id = ALC289_FIXUP_ASUS_GA502
8997 [ALC274_FIXUP_HP_MIC] = {
8998 .type = HDA_FIXUP_VERBS,
8999 .v.verbs = (const struct hda_verb[]) {
9000 { 0x20, AC_VERB_SET_COEF_INDEX, 0x45 },
9001 { 0x20, AC_VERB_SET_PROC_COEF, 0x5089 },
9005 [ALC274_FIXUP_HP_HEADSET_MIC] = {
9006 .type = HDA_FIXUP_FUNC,
9007 .v.func = alc274_fixup_hp_headset_mic,
9009 .chain_id = ALC274_FIXUP_HP_MIC
9011 [ALC274_FIXUP_HP_ENVY_GPIO] = {
9012 .type = HDA_FIXUP_FUNC,
9013 .v.func = alc274_fixup_hp_envy_gpio,
9015 [ALC256_FIXUP_ASUS_HPE] = {
9016 .type = HDA_FIXUP_VERBS,
9017 .v.verbs = (const struct hda_verb[]) {
9019 { 0x20, AC_VERB_SET_COEF_INDEX, 0x0f },
9020 { 0x20, AC_VERB_SET_PROC_COEF, 0x7778 },
9024 .chain_id = ALC294_FIXUP_ASUS_HEADSET_MIC
9026 [ALC285_FIXUP_THINKPAD_NO_BASS_SPK_HEADSET_JACK] = {
9027 .type = HDA_FIXUP_FUNC,
9028 .v.func = alc_fixup_headset_jack,
9030 .chain_id = ALC269_FIXUP_THINKPAD_ACPI
9032 [ALC287_FIXUP_HP_GPIO_LED] = {
9033 .type = HDA_FIXUP_FUNC,
9034 .v.func = alc287_fixup_hp_gpio_led,
9036 [ALC256_FIXUP_HP_HEADSET_MIC] = {
9037 .type = HDA_FIXUP_FUNC,
9038 .v.func = alc274_fixup_hp_headset_mic,
9040 [ALC236_FIXUP_DELL_AIO_HEADSET_MIC] = {
9041 .type = HDA_FIXUP_FUNC,
9042 .v.func = alc_fixup_no_int_mic,
9044 .chain_id = ALC255_FIXUP_DELL1_MIC_NO_PRESENCE
9046 [ALC282_FIXUP_ACER_DISABLE_LINEOUT] = {
9047 .type = HDA_FIXUP_PINS,
9048 .v.pins = (const struct hda_pintbl[]) {
9049 { 0x1b, 0x411111f0 },
9050 { 0x18, 0x01a1913c }, /* use as headset mic, without its own jack detect */
9054 .chain_id = ALC269_FIXUP_HEADSET_MODE
9056 [ALC255_FIXUP_ACER_LIMIT_INT_MIC_BOOST] = {
9057 .type = HDA_FIXUP_FUNC,
9058 .v.func = alc269_fixup_limit_int_mic_boost,
9060 .chain_id = ALC255_FIXUP_ACER_MIC_NO_PRESENCE,
9062 [ALC256_FIXUP_ACER_HEADSET_MIC] = {
9063 .type = HDA_FIXUP_PINS,
9064 .v.pins = (const struct hda_pintbl[]) {
9065 { 0x19, 0x02a1113c }, /* use as headset mic, without its own jack detect */
9066 { 0x1a, 0x90a1092f }, /* use as internal mic */
9070 .chain_id = ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC
9072 [ALC285_FIXUP_IDEAPAD_S740_COEF] = {
9073 .type = HDA_FIXUP_FUNC,
9074 .v.func = alc285_fixup_ideapad_s740_coef,
9076 .chain_id = ALC269_FIXUP_THINKPAD_ACPI,
9078 [ALC285_FIXUP_HP_LIMIT_INT_MIC_BOOST] = {
9079 .type = HDA_FIXUP_FUNC,
9080 .v.func = alc269_fixup_limit_int_mic_boost,
9082 .chain_id = ALC285_FIXUP_HP_MUTE_LED,
9084 [ALC295_FIXUP_ASUS_DACS] = {
9085 .type = HDA_FIXUP_FUNC,
9086 .v.func = alc295_fixup_asus_dacs,
9088 [ALC295_FIXUP_HP_OMEN] = {
9089 .type = HDA_FIXUP_PINS,
9090 .v.pins = (const struct hda_pintbl[]) {
9091 { 0x12, 0xb7a60130 },
9092 { 0x13, 0x40000000 },
9093 { 0x14, 0x411111f0 },
9094 { 0x16, 0x411111f0 },
9095 { 0x17, 0x90170110 },
9096 { 0x18, 0x411111f0 },
9097 { 0x19, 0x02a11030 },
9098 { 0x1a, 0x411111f0 },
9099 { 0x1b, 0x04a19030 },
9100 { 0x1d, 0x40600001 },
9101 { 0x1e, 0x411111f0 },
9102 { 0x21, 0x03211020 },
9106 .chain_id = ALC269_FIXUP_HP_LINE1_MIC1_LED,
9108 [ALC285_FIXUP_HP_SPECTRE_X360] = {
9109 .type = HDA_FIXUP_FUNC,
9110 .v.func = alc285_fixup_hp_spectre_x360,
9112 [ALC285_FIXUP_HP_SPECTRE_X360_EB1] = {
9113 .type = HDA_FIXUP_FUNC,
9114 .v.func = alc285_fixup_hp_spectre_x360_eb1
9116 [ALC287_FIXUP_IDEAPAD_BASS_SPK_AMP] = {
9117 .type = HDA_FIXUP_FUNC,
9118 .v.func = alc285_fixup_ideapad_s740_coef,
9120 .chain_id = ALC285_FIXUP_THINKPAD_HEADSET_JACK,
9122 [ALC623_FIXUP_LENOVO_THINKSTATION_P340] = {
9123 .type = HDA_FIXUP_FUNC,
9124 .v.func = alc_fixup_no_shutup,
9126 .chain_id = ALC283_FIXUP_HEADSET_MIC,
9128 [ALC255_FIXUP_ACER_HEADPHONE_AND_MIC] = {
9129 .type = HDA_FIXUP_PINS,
9130 .v.pins = (const struct hda_pintbl[]) {
9131 { 0x21, 0x03211030 }, /* Change the Headphone location to Left */
9135 .chain_id = ALC255_FIXUP_XIAOMI_HEADSET_MIC
9137 [ALC236_FIXUP_HP_LIMIT_INT_MIC_BOOST] = {
9138 .type = HDA_FIXUP_FUNC,
9139 .v.func = alc269_fixup_limit_int_mic_boost,
9141 .chain_id = ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF,
9143 [ALC285_FIXUP_LEGION_Y9000X_SPEAKERS] = {
9144 .type = HDA_FIXUP_FUNC,
9145 .v.func = alc285_fixup_ideapad_s740_coef,
9147 .chain_id = ALC285_FIXUP_LEGION_Y9000X_AUTOMUTE,
9149 [ALC285_FIXUP_LEGION_Y9000X_AUTOMUTE] = {
9150 .type = HDA_FIXUP_FUNC,
9151 .v.func = alc287_fixup_legion_15imhg05_speakers,
9153 .chain_id = ALC269_FIXUP_THINKPAD_ACPI,
9155 [ALC287_FIXUP_LEGION_15IMHG05_SPEAKERS] = {
9156 .type = HDA_FIXUP_VERBS,
9157 //.v.verbs = legion_15imhg05_coefs,
9158 .v.verbs = (const struct hda_verb[]) {
9159 // set left speaker Legion 7i.
9160 { 0x20, AC_VERB_SET_COEF_INDEX, 0x24 },
9161 { 0x20, AC_VERB_SET_PROC_COEF, 0x41 },
9163 { 0x20, AC_VERB_SET_COEF_INDEX, 0x26 },
9164 { 0x20, AC_VERB_SET_PROC_COEF, 0xc },
9165 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
9166 { 0x20, AC_VERB_SET_PROC_COEF, 0x1a },
9167 { 0x20, AC_VERB_SET_PROC_COEF, 0xb020 },
9169 { 0x20, AC_VERB_SET_COEF_INDEX, 0x26 },
9170 { 0x20, AC_VERB_SET_PROC_COEF, 0x2 },
9171 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
9172 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
9173 { 0x20, AC_VERB_SET_PROC_COEF, 0xb020 },
9175 // set right speaker Legion 7i.
9176 { 0x20, AC_VERB_SET_COEF_INDEX, 0x24 },
9177 { 0x20, AC_VERB_SET_PROC_COEF, 0x42 },
9179 { 0x20, AC_VERB_SET_COEF_INDEX, 0x26 },
9180 { 0x20, AC_VERB_SET_PROC_COEF, 0xc },
9181 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
9182 { 0x20, AC_VERB_SET_PROC_COEF, 0x2a },
9183 { 0x20, AC_VERB_SET_PROC_COEF, 0xb020 },
9185 { 0x20, AC_VERB_SET_COEF_INDEX, 0x26 },
9186 { 0x20, AC_VERB_SET_PROC_COEF, 0x2 },
9187 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
9188 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
9189 { 0x20, AC_VERB_SET_PROC_COEF, 0xb020 },
9193 .chain_id = ALC287_FIXUP_LEGION_15IMHG05_AUTOMUTE,
9195 [ALC287_FIXUP_LEGION_15IMHG05_AUTOMUTE] = {
9196 .type = HDA_FIXUP_FUNC,
9197 .v.func = alc287_fixup_legion_15imhg05_speakers,
9199 .chain_id = ALC269_FIXUP_HEADSET_MODE,
9201 [ALC287_FIXUP_YOGA7_14ITL_SPEAKERS] = {
9202 .type = HDA_FIXUP_VERBS,
9203 .v.verbs = (const struct hda_verb[]) {
9204 // set left speaker Yoga 7i.
9205 { 0x20, AC_VERB_SET_COEF_INDEX, 0x24 },
9206 { 0x20, AC_VERB_SET_PROC_COEF, 0x41 },
9208 { 0x20, AC_VERB_SET_COEF_INDEX, 0x26 },
9209 { 0x20, AC_VERB_SET_PROC_COEF, 0xc },
9210 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
9211 { 0x20, AC_VERB_SET_PROC_COEF, 0x1a },
9212 { 0x20, AC_VERB_SET_PROC_COEF, 0xb020 },
9214 { 0x20, AC_VERB_SET_COEF_INDEX, 0x26 },
9215 { 0x20, AC_VERB_SET_PROC_COEF, 0x2 },
9216 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
9217 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
9218 { 0x20, AC_VERB_SET_PROC_COEF, 0xb020 },
9220 // set right speaker Yoga 7i.
9221 { 0x20, AC_VERB_SET_COEF_INDEX, 0x24 },
9222 { 0x20, AC_VERB_SET_PROC_COEF, 0x46 },
9224 { 0x20, AC_VERB_SET_COEF_INDEX, 0x26 },
9225 { 0x20, AC_VERB_SET_PROC_COEF, 0xc },
9226 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
9227 { 0x20, AC_VERB_SET_PROC_COEF, 0x2a },
9228 { 0x20, AC_VERB_SET_PROC_COEF, 0xb020 },
9230 { 0x20, AC_VERB_SET_COEF_INDEX, 0x26 },
9231 { 0x20, AC_VERB_SET_PROC_COEF, 0x2 },
9232 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
9233 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
9234 { 0x20, AC_VERB_SET_PROC_COEF, 0xb020 },
9238 .chain_id = ALC269_FIXUP_HEADSET_MODE,
9240 [ALC298_FIXUP_LENOVO_C940_DUET7] = {
9241 .type = HDA_FIXUP_FUNC,
9242 .v.func = alc298_fixup_lenovo_c940_duet7,
9244 [ALC287_FIXUP_LENOVO_14IRP8_DUETITL] = {
9245 .type = HDA_FIXUP_FUNC,
9246 .v.func = alc287_fixup_lenovo_14irp8_duetitl,
9248 [ALC287_FIXUP_13S_GEN2_SPEAKERS] = {
9249 .type = HDA_FIXUP_VERBS,
9250 .v.verbs = (const struct hda_verb[]) {
9251 { 0x20, AC_VERB_SET_COEF_INDEX, 0x24 },
9252 { 0x20, AC_VERB_SET_PROC_COEF, 0x41 },
9253 { 0x20, AC_VERB_SET_COEF_INDEX, 0x26 },
9254 { 0x20, AC_VERB_SET_PROC_COEF, 0x2 },
9255 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
9256 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
9257 { 0x20, AC_VERB_SET_PROC_COEF, 0xb020 },
9258 { 0x20, AC_VERB_SET_COEF_INDEX, 0x24 },
9259 { 0x20, AC_VERB_SET_PROC_COEF, 0x42 },
9260 { 0x20, AC_VERB_SET_COEF_INDEX, 0x26 },
9261 { 0x20, AC_VERB_SET_PROC_COEF, 0x2 },
9262 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
9263 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
9264 { 0x20, AC_VERB_SET_PROC_COEF, 0xb020 },
9268 .chain_id = ALC269_FIXUP_HEADSET_MODE,
9270 [ALC256_FIXUP_SET_COEF_DEFAULTS] = {
9271 .type = HDA_FIXUP_FUNC,
9272 .v.func = alc256_fixup_set_coef_defaults,
9274 [ALC245_FIXUP_HP_GPIO_LED] = {
9275 .type = HDA_FIXUP_FUNC,
9276 .v.func = alc245_fixup_hp_gpio_led,
9278 [ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE] = {
9279 .type = HDA_FIXUP_PINS,
9280 .v.pins = (const struct hda_pintbl[]) {
9281 { 0x19, 0x03a11120 }, /* use as headset mic, without its own jack detect */
9285 .chain_id = ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC,
9287 [ALC233_FIXUP_NO_AUDIO_JACK] = {
9288 .type = HDA_FIXUP_FUNC,
9289 .v.func = alc233_fixup_no_audio_jack,
9291 [ALC256_FIXUP_MIC_NO_PRESENCE_AND_RESUME] = {
9292 .type = HDA_FIXUP_FUNC,
9293 .v.func = alc256_fixup_mic_no_presence_and_resume,
9295 .chain_id = ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC
9297 [ALC287_FIXUP_LEGION_16ACHG6] = {
9298 .type = HDA_FIXUP_FUNC,
9299 .v.func = alc287_fixup_legion_16achg6_speakers,
9301 [ALC287_FIXUP_CS35L41_I2C_2] = {
9302 .type = HDA_FIXUP_FUNC,
9303 .v.func = cs35l41_fixup_i2c_two,
9305 [ALC287_FIXUP_CS35L41_I2C_2_HP_GPIO_LED] = {
9306 .type = HDA_FIXUP_FUNC,
9307 .v.func = cs35l41_fixup_i2c_two,
9309 .chain_id = ALC285_FIXUP_HP_MUTE_LED,
9311 [ALC287_FIXUP_CS35L41_I2C_4] = {
9312 .type = HDA_FIXUP_FUNC,
9313 .v.func = cs35l41_fixup_i2c_four,
9315 [ALC245_FIXUP_CS35L41_SPI_2] = {
9316 .type = HDA_FIXUP_FUNC,
9317 .v.func = cs35l41_fixup_spi_two,
9319 [ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED] = {
9320 .type = HDA_FIXUP_FUNC,
9321 .v.func = cs35l41_fixup_spi_two,
9323 .chain_id = ALC285_FIXUP_HP_GPIO_LED,
9325 [ALC245_FIXUP_CS35L41_SPI_4] = {
9326 .type = HDA_FIXUP_FUNC,
9327 .v.func = cs35l41_fixup_spi_four,
9329 [ALC245_FIXUP_CS35L41_SPI_4_HP_GPIO_LED] = {
9330 .type = HDA_FIXUP_FUNC,
9331 .v.func = cs35l41_fixup_spi_four,
9333 .chain_id = ALC285_FIXUP_HP_GPIO_LED,
9335 [ALC285_FIXUP_HP_SPEAKERS_MICMUTE_LED] = {
9336 .type = HDA_FIXUP_VERBS,
9337 .v.verbs = (const struct hda_verb[]) {
9338 { 0x20, AC_VERB_SET_COEF_INDEX, 0x19 },
9339 { 0x20, AC_VERB_SET_PROC_COEF, 0x8e11 },
9343 .chain_id = ALC285_FIXUP_HP_MUTE_LED,
9345 [ALC269_FIXUP_DELL4_MIC_NO_PRESENCE_QUIET] = {
9346 .type = HDA_FIXUP_FUNC,
9347 .v.func = alc_fixup_dell4_mic_no_presence_quiet,
9349 .chain_id = ALC269_FIXUP_DELL4_MIC_NO_PRESENCE,
9351 [ALC295_FIXUP_FRAMEWORK_LAPTOP_MIC_NO_PRESENCE] = {
9352 .type = HDA_FIXUP_PINS,
9353 .v.pins = (const struct hda_pintbl[]) {
9354 { 0x19, 0x02a1112c }, /* use as headset mic, without its own jack detect */
9358 .chain_id = ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC
9360 [ALC287_FIXUP_LEGION_16ITHG6] = {
9361 .type = HDA_FIXUP_FUNC,
9362 .v.func = alc287_fixup_legion_16ithg6_speakers,
9364 [ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK] = {
9365 .type = HDA_FIXUP_VERBS,
9366 .v.verbs = (const struct hda_verb[]) {
9367 // enable left speaker
9368 { 0x20, AC_VERB_SET_COEF_INDEX, 0x24 },
9369 { 0x20, AC_VERB_SET_PROC_COEF, 0x41 },
9371 { 0x20, AC_VERB_SET_COEF_INDEX, 0x26 },
9372 { 0x20, AC_VERB_SET_PROC_COEF, 0xc },
9373 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
9374 { 0x20, AC_VERB_SET_PROC_COEF, 0x1a },
9375 { 0x20, AC_VERB_SET_PROC_COEF, 0xb020 },
9377 { 0x20, AC_VERB_SET_COEF_INDEX, 0x26 },
9378 { 0x20, AC_VERB_SET_PROC_COEF, 0xf },
9379 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
9380 { 0x20, AC_VERB_SET_PROC_COEF, 0x42 },
9381 { 0x20, AC_VERB_SET_PROC_COEF, 0xb020 },
9383 { 0x20, AC_VERB_SET_COEF_INDEX, 0x26 },
9384 { 0x20, AC_VERB_SET_PROC_COEF, 0x10 },
9385 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
9386 { 0x20, AC_VERB_SET_PROC_COEF, 0x40 },
9387 { 0x20, AC_VERB_SET_PROC_COEF, 0xb020 },
9389 { 0x20, AC_VERB_SET_COEF_INDEX, 0x26 },
9390 { 0x20, AC_VERB_SET_PROC_COEF, 0x2 },
9391 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
9392 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
9393 { 0x20, AC_VERB_SET_PROC_COEF, 0xb020 },
9395 // enable right speaker
9396 { 0x20, AC_VERB_SET_COEF_INDEX, 0x24 },
9397 { 0x20, AC_VERB_SET_PROC_COEF, 0x46 },
9399 { 0x20, AC_VERB_SET_COEF_INDEX, 0x26 },
9400 { 0x20, AC_VERB_SET_PROC_COEF, 0xc },
9401 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
9402 { 0x20, AC_VERB_SET_PROC_COEF, 0x2a },
9403 { 0x20, AC_VERB_SET_PROC_COEF, 0xb020 },
9405 { 0x20, AC_VERB_SET_COEF_INDEX, 0x26 },
9406 { 0x20, AC_VERB_SET_PROC_COEF, 0xf },
9407 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
9408 { 0x20, AC_VERB_SET_PROC_COEF, 0x46 },
9409 { 0x20, AC_VERB_SET_PROC_COEF, 0xb020 },
9411 { 0x20, AC_VERB_SET_COEF_INDEX, 0x26 },
9412 { 0x20, AC_VERB_SET_PROC_COEF, 0x10 },
9413 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
9414 { 0x20, AC_VERB_SET_PROC_COEF, 0x44 },
9415 { 0x20, AC_VERB_SET_PROC_COEF, 0xb020 },
9417 { 0x20, AC_VERB_SET_COEF_INDEX, 0x26 },
9418 { 0x20, AC_VERB_SET_PROC_COEF, 0x2 },
9419 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
9420 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
9421 { 0x20, AC_VERB_SET_PROC_COEF, 0xb020 },
9426 [ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK_PIN] = {
9427 .type = HDA_FIXUP_FUNC,
9428 .v.func = alc287_fixup_yoga9_14iap7_bass_spk_pin,
9430 .chain_id = ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK,
9432 [ALC295_FIXUP_DELL_INSPIRON_TOP_SPEAKERS] = {
9433 .type = HDA_FIXUP_FUNC,
9434 .v.func = alc295_fixup_dell_inspiron_top_speakers,
9436 .chain_id = ALC269_FIXUP_DELL4_MIC_NO_PRESENCE,
9438 [ALC236_FIXUP_DELL_DUAL_CODECS] = {
9439 .type = HDA_FIXUP_PINS,
9440 .v.func = alc1220_fixup_gb_dual_codecs,
9442 .chain_id = ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
9444 [ALC287_FIXUP_CS35L41_I2C_2_THINKPAD_ACPI] = {
9445 .type = HDA_FIXUP_FUNC,
9446 .v.func = cs35l41_fixup_i2c_two,
9448 .chain_id = ALC285_FIXUP_THINKPAD_NO_BASS_SPK_HEADSET_JACK,
9450 [ALC287_FIXUP_TAS2781_I2C] = {
9451 .type = HDA_FIXUP_FUNC,
9452 .v.func = tas2781_fixup_i2c,
9454 .chain_id = ALC285_FIXUP_THINKPAD_HEADSET_JACK,
9456 [ALC287_FIXUP_YOGA7_14ARB7_I2C] = {
9457 .type = HDA_FIXUP_FUNC,
9458 .v.func = yoga7_14arb7_fixup_i2c,
9460 .chain_id = ALC285_FIXUP_THINKPAD_HEADSET_JACK,
9462 [ALC245_FIXUP_HP_MUTE_LED_COEFBIT] = {
9463 .type = HDA_FIXUP_FUNC,
9464 .v.func = alc245_fixup_hp_mute_led_coefbit,
9466 [ALC245_FIXUP_HP_X360_MUTE_LEDS] = {
9467 .type = HDA_FIXUP_FUNC,
9468 .v.func = alc245_fixup_hp_mute_led_coefbit,
9470 .chain_id = ALC245_FIXUP_HP_GPIO_LED
9472 [ALC287_FIXUP_THINKPAD_I2S_SPK] = {
9473 .type = HDA_FIXUP_FUNC,
9474 .v.func = alc287_fixup_bind_dacs,
9476 .chain_id = ALC285_FIXUP_THINKPAD_NO_BASS_SPK_HEADSET_JACK,
9478 [ALC287_FIXUP_MG_RTKC_CSAMP_CS35L41_I2C_THINKPAD] = {
9479 .type = HDA_FIXUP_FUNC,
9480 .v.func = alc287_fixup_bind_dacs,
9482 .chain_id = ALC287_FIXUP_CS35L41_I2C_2_THINKPAD_ACPI,
9484 [ALC2XX_FIXUP_HEADSET_MIC] = {
9485 .type = HDA_FIXUP_FUNC,
9486 .v.func = alc_fixup_headset_mic,
9488 [ALC289_FIXUP_DELL_CS35L41_SPI_2] = {
9489 .type = HDA_FIXUP_FUNC,
9490 .v.func = cs35l41_fixup_spi_two,
9492 .chain_id = ALC289_FIXUP_DUAL_SPK
9494 [ALC294_FIXUP_CS35L41_I2C_2] = {
9495 .type = HDA_FIXUP_FUNC,
9496 .v.func = cs35l41_fixup_i2c_two,
9498 [ALC245_FIXUP_CS35L56_SPI_4_HP_GPIO_LED] = {
9499 .type = HDA_FIXUP_FUNC,
9500 .v.func = cs35l56_fixup_spi_four,
9502 .chain_id = ALC285_FIXUP_HP_GPIO_LED,
9506 static const struct snd_pci_quirk alc269_fixup_tbl[] = {
9507 SND_PCI_QUIRK(0x1025, 0x0283, "Acer TravelMate 8371", ALC269_FIXUP_INV_DMIC),
9508 SND_PCI_QUIRK(0x1025, 0x029b, "Acer 1810TZ", ALC269_FIXUP_INV_DMIC),
9509 SND_PCI_QUIRK(0x1025, 0x0349, "Acer AOD260", ALC269_FIXUP_INV_DMIC),
9510 SND_PCI_QUIRK(0x1025, 0x047c, "Acer AC700", ALC269_FIXUP_ACER_AC700),
9511 SND_PCI_QUIRK(0x1025, 0x072d, "Acer Aspire V5-571G", ALC269_FIXUP_ASPIRE_HEADSET_MIC),
9512 SND_PCI_QUIRK(0x1025, 0x0740, "Acer AO725", ALC271_FIXUP_HP_GATE_MIC_JACK),
9513 SND_PCI_QUIRK(0x1025, 0x0742, "Acer AO756", ALC271_FIXUP_HP_GATE_MIC_JACK),
9514 SND_PCI_QUIRK(0x1025, 0x0762, "Acer Aspire E1-472", ALC271_FIXUP_HP_GATE_MIC_JACK_E1_572),
9515 SND_PCI_QUIRK(0x1025, 0x0775, "Acer Aspire E1-572", ALC271_FIXUP_HP_GATE_MIC_JACK_E1_572),
9516 SND_PCI_QUIRK(0x1025, 0x079b, "Acer Aspire V5-573G", ALC282_FIXUP_ASPIRE_V5_PINS),
9517 SND_PCI_QUIRK(0x1025, 0x080d, "Acer Aspire V5-122P", ALC269_FIXUP_ASPIRE_HEADSET_MIC),
9518 SND_PCI_QUIRK(0x1025, 0x0840, "Acer Aspire E1", ALC269VB_FIXUP_ASPIRE_E1_COEF),
9519 SND_PCI_QUIRK(0x1025, 0x101c, "Acer Veriton N2510G", ALC269_FIXUP_LIFEBOOK),
9520 SND_PCI_QUIRK(0x1025, 0x102b, "Acer Aspire C24-860", ALC286_FIXUP_ACER_AIO_MIC_NO_PRESENCE),
9521 SND_PCI_QUIRK(0x1025, 0x1065, "Acer Aspire C20-820", ALC269VC_FIXUP_ACER_HEADSET_MIC),
9522 SND_PCI_QUIRK(0x1025, 0x106d, "Acer Cloudbook 14", ALC283_FIXUP_CHROME_BOOK),
9523 SND_PCI_QUIRK(0x1025, 0x1094, "Acer Aspire E5-575T", ALC255_FIXUP_ACER_LIMIT_INT_MIC_BOOST),
9524 SND_PCI_QUIRK(0x1025, 0x1099, "Acer Aspire E5-523G", ALC255_FIXUP_ACER_MIC_NO_PRESENCE),
9525 SND_PCI_QUIRK(0x1025, 0x110e, "Acer Aspire ES1-432", ALC255_FIXUP_ACER_MIC_NO_PRESENCE),
9526 SND_PCI_QUIRK(0x1025, 0x1166, "Acer Veriton N4640G", ALC269_FIXUP_LIFEBOOK),
9527 SND_PCI_QUIRK(0x1025, 0x1167, "Acer Veriton N6640G", ALC269_FIXUP_LIFEBOOK),
9528 SND_PCI_QUIRK(0x1025, 0x1246, "Acer Predator Helios 500", ALC299_FIXUP_PREDATOR_SPK),
9529 SND_PCI_QUIRK(0x1025, 0x1247, "Acer vCopperbox", ALC269VC_FIXUP_ACER_VCOPPERBOX_PINS),
9530 SND_PCI_QUIRK(0x1025, 0x1248, "Acer Veriton N4660G", ALC269VC_FIXUP_ACER_MIC_NO_PRESENCE),
9531 SND_PCI_QUIRK(0x1025, 0x1269, "Acer SWIFT SF314-54", ALC256_FIXUP_ACER_HEADSET_MIC),
9532 SND_PCI_QUIRK(0x1025, 0x126a, "Acer Swift SF114-32", ALC256_FIXUP_ACER_MIC_NO_PRESENCE),
9533 SND_PCI_QUIRK(0x1025, 0x128f, "Acer Veriton Z6860G", ALC286_FIXUP_ACER_AIO_HEADSET_MIC),
9534 SND_PCI_QUIRK(0x1025, 0x1290, "Acer Veriton Z4860G", ALC286_FIXUP_ACER_AIO_HEADSET_MIC),
9535 SND_PCI_QUIRK(0x1025, 0x1291, "Acer Veriton Z4660G", ALC286_FIXUP_ACER_AIO_HEADSET_MIC),
9536 SND_PCI_QUIRK(0x1025, 0x129c, "Acer SWIFT SF314-55", ALC256_FIXUP_ACER_HEADSET_MIC),
9537 SND_PCI_QUIRK(0x1025, 0x129d, "Acer SWIFT SF313-51", ALC256_FIXUP_ACER_MIC_NO_PRESENCE),
9538 SND_PCI_QUIRK(0x1025, 0x1300, "Acer SWIFT SF314-56", ALC256_FIXUP_ACER_MIC_NO_PRESENCE),
9539 SND_PCI_QUIRK(0x1025, 0x1308, "Acer Aspire Z24-890", ALC286_FIXUP_ACER_AIO_HEADSET_MIC),
9540 SND_PCI_QUIRK(0x1025, 0x132a, "Acer TravelMate B114-21", ALC233_FIXUP_ACER_HEADSET_MIC),
9541 SND_PCI_QUIRK(0x1025, 0x1330, "Acer TravelMate X514-51T", ALC255_FIXUP_ACER_HEADSET_MIC),
9542 SND_PCI_QUIRK(0x1025, 0x141f, "Acer Spin SP513-54N", ALC255_FIXUP_ACER_MIC_NO_PRESENCE),
9543 SND_PCI_QUIRK(0x1025, 0x142b, "Acer Swift SF314-42", ALC255_FIXUP_ACER_MIC_NO_PRESENCE),
9544 SND_PCI_QUIRK(0x1025, 0x1430, "Acer TravelMate B311R-31", ALC256_FIXUP_ACER_MIC_NO_PRESENCE),
9545 SND_PCI_QUIRK(0x1025, 0x1466, "Acer Aspire A515-56", ALC255_FIXUP_ACER_HEADPHONE_AND_MIC),
9546 SND_PCI_QUIRK(0x1025, 0x1534, "Acer Predator PH315-54", ALC255_FIXUP_ACER_MIC_NO_PRESENCE),
9547 SND_PCI_QUIRK(0x1028, 0x0470, "Dell M101z", ALC269_FIXUP_DELL_M101Z),
9548 SND_PCI_QUIRK(0x1028, 0x053c, "Dell Latitude E5430", ALC292_FIXUP_DELL_E7X),
9549 SND_PCI_QUIRK(0x1028, 0x054b, "Dell XPS one 2710", ALC275_FIXUP_DELL_XPS),
9550 SND_PCI_QUIRK(0x1028, 0x05bd, "Dell Latitude E6440", ALC292_FIXUP_DELL_E7X),
9551 SND_PCI_QUIRK(0x1028, 0x05be, "Dell Latitude E6540", ALC292_FIXUP_DELL_E7X),
9552 SND_PCI_QUIRK(0x1028, 0x05ca, "Dell Latitude E7240", ALC292_FIXUP_DELL_E7X),
9553 SND_PCI_QUIRK(0x1028, 0x05cb, "Dell Latitude E7440", ALC292_FIXUP_DELL_E7X),
9554 SND_PCI_QUIRK(0x1028, 0x05da, "Dell Vostro 5460", ALC290_FIXUP_SUBWOOFER),
9555 SND_PCI_QUIRK(0x1028, 0x05f4, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE),
9556 SND_PCI_QUIRK(0x1028, 0x05f5, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE),
9557 SND_PCI_QUIRK(0x1028, 0x05f6, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE),
9558 SND_PCI_QUIRK(0x1028, 0x0615, "Dell Vostro 5470", ALC290_FIXUP_SUBWOOFER_HSJACK),
9559 SND_PCI_QUIRK(0x1028, 0x0616, "Dell Vostro 5470", ALC290_FIXUP_SUBWOOFER_HSJACK),
9560 SND_PCI_QUIRK(0x1028, 0x062c, "Dell Latitude E5550", ALC292_FIXUP_DELL_E7X),
9561 SND_PCI_QUIRK(0x1028, 0x062e, "Dell Latitude E7450", ALC292_FIXUP_DELL_E7X),
9562 SND_PCI_QUIRK(0x1028, 0x0638, "Dell Inspiron 5439", ALC290_FIXUP_MONO_SPEAKERS_HSJACK),
9563 SND_PCI_QUIRK(0x1028, 0x064a, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE),
9564 SND_PCI_QUIRK(0x1028, 0x064b, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE),
9565 SND_PCI_QUIRK(0x1028, 0x0665, "Dell XPS 13", ALC288_FIXUP_DELL_XPS_13),
9566 SND_PCI_QUIRK(0x1028, 0x0669, "Dell Optiplex 9020m", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE),
9567 SND_PCI_QUIRK(0x1028, 0x069a, "Dell Vostro 5480", ALC290_FIXUP_SUBWOOFER_HSJACK),
9568 SND_PCI_QUIRK(0x1028, 0x06c7, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE),
9569 SND_PCI_QUIRK(0x1028, 0x06d9, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE),
9570 SND_PCI_QUIRK(0x1028, 0x06da, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE),
9571 SND_PCI_QUIRK(0x1028, 0x06db, "Dell", ALC293_FIXUP_DISABLE_AAMIX_MULTIJACK),
9572 SND_PCI_QUIRK(0x1028, 0x06dd, "Dell", ALC293_FIXUP_DISABLE_AAMIX_MULTIJACK),
9573 SND_PCI_QUIRK(0x1028, 0x06de, "Dell", ALC293_FIXUP_DISABLE_AAMIX_MULTIJACK),
9574 SND_PCI_QUIRK(0x1028, 0x06df, "Dell", ALC293_FIXUP_DISABLE_AAMIX_MULTIJACK),
9575 SND_PCI_QUIRK(0x1028, 0x06e0, "Dell", ALC293_FIXUP_DISABLE_AAMIX_MULTIJACK),
9576 SND_PCI_QUIRK(0x1028, 0x0706, "Dell Inspiron 7559", ALC256_FIXUP_DELL_INSPIRON_7559_SUBWOOFER),
9577 SND_PCI_QUIRK(0x1028, 0x0725, "Dell Inspiron 3162", ALC255_FIXUP_DELL_SPK_NOISE),
9578 SND_PCI_QUIRK(0x1028, 0x0738, "Dell Precision 5820", ALC269_FIXUP_NO_SHUTUP),
9579 SND_PCI_QUIRK(0x1028, 0x075c, "Dell XPS 27 7760", ALC298_FIXUP_SPK_VOLUME),
9580 SND_PCI_QUIRK(0x1028, 0x075d, "Dell AIO", ALC298_FIXUP_SPK_VOLUME),
9581 SND_PCI_QUIRK(0x1028, 0x0798, "Dell Inspiron 17 7000 Gaming", ALC256_FIXUP_DELL_INSPIRON_7559_SUBWOOFER),
9582 SND_PCI_QUIRK(0x1028, 0x07b0, "Dell Precision 7520", ALC295_FIXUP_DISABLE_DAC3),
9583 SND_PCI_QUIRK(0x1028, 0x080c, "Dell WYSE", ALC225_FIXUP_DELL_WYSE_MIC_NO_PRESENCE),
9584 SND_PCI_QUIRK(0x1028, 0x084b, "Dell", ALC274_FIXUP_DELL_AIO_LINEOUT_VERB),
9585 SND_PCI_QUIRK(0x1028, 0x084e, "Dell", ALC274_FIXUP_DELL_AIO_LINEOUT_VERB),
9586 SND_PCI_QUIRK(0x1028, 0x0871, "Dell Precision 3630", ALC255_FIXUP_DELL_HEADSET_MIC),
9587 SND_PCI_QUIRK(0x1028, 0x0872, "Dell Precision 3630", ALC255_FIXUP_DELL_HEADSET_MIC),
9588 SND_PCI_QUIRK(0x1028, 0x0873, "Dell Precision 3930", ALC255_FIXUP_DUMMY_LINEOUT_VERB),
9589 SND_PCI_QUIRK(0x1028, 0x08ad, "Dell WYSE AIO", ALC225_FIXUP_DELL_WYSE_AIO_MIC_NO_PRESENCE),
9590 SND_PCI_QUIRK(0x1028, 0x08ae, "Dell WYSE NB", ALC225_FIXUP_DELL1_MIC_NO_PRESENCE),
9591 SND_PCI_QUIRK(0x1028, 0x0935, "Dell", ALC274_FIXUP_DELL_AIO_LINEOUT_VERB),
9592 SND_PCI_QUIRK(0x1028, 0x097d, "Dell Precision", ALC289_FIXUP_DUAL_SPK),
9593 SND_PCI_QUIRK(0x1028, 0x097e, "Dell Precision", ALC289_FIXUP_DUAL_SPK),
9594 SND_PCI_QUIRK(0x1028, 0x098d, "Dell Precision", ALC233_FIXUP_ASUS_MIC_NO_PRESENCE),
9595 SND_PCI_QUIRK(0x1028, 0x09bf, "Dell Precision", ALC233_FIXUP_ASUS_MIC_NO_PRESENCE),
9596 SND_PCI_QUIRK(0x1028, 0x0a2e, "Dell", ALC236_FIXUP_DELL_AIO_HEADSET_MIC),
9597 SND_PCI_QUIRK(0x1028, 0x0a30, "Dell", ALC236_FIXUP_DELL_AIO_HEADSET_MIC),
9598 SND_PCI_QUIRK(0x1028, 0x0a38, "Dell Latitude 7520", ALC269_FIXUP_DELL4_MIC_NO_PRESENCE_QUIET),
9599 SND_PCI_QUIRK(0x1028, 0x0a58, "Dell", ALC255_FIXUP_DELL_HEADSET_MIC),
9600 SND_PCI_QUIRK(0x1028, 0x0a61, "Dell XPS 15 9510", ALC289_FIXUP_DUAL_SPK),
9601 SND_PCI_QUIRK(0x1028, 0x0a62, "Dell Precision 5560", ALC289_FIXUP_DUAL_SPK),
9602 SND_PCI_QUIRK(0x1028, 0x0a9d, "Dell Latitude 5430", ALC269_FIXUP_DELL4_MIC_NO_PRESENCE),
9603 SND_PCI_QUIRK(0x1028, 0x0a9e, "Dell Latitude 5430", ALC269_FIXUP_DELL4_MIC_NO_PRESENCE),
9604 SND_PCI_QUIRK(0x1028, 0x0b19, "Dell XPS 15 9520", ALC289_FIXUP_DUAL_SPK),
9605 SND_PCI_QUIRK(0x1028, 0x0b1a, "Dell Precision 5570", ALC289_FIXUP_DUAL_SPK),
9606 SND_PCI_QUIRK(0x1028, 0x0b27, "Dell", ALC245_FIXUP_CS35L41_SPI_2),
9607 SND_PCI_QUIRK(0x1028, 0x0b28, "Dell", ALC245_FIXUP_CS35L41_SPI_2),
9608 SND_PCI_QUIRK(0x1028, 0x0b37, "Dell Inspiron 16 Plus 7620 2-in-1", ALC295_FIXUP_DELL_INSPIRON_TOP_SPEAKERS),
9609 SND_PCI_QUIRK(0x1028, 0x0b71, "Dell Inspiron 16 Plus 7620", ALC295_FIXUP_DELL_INSPIRON_TOP_SPEAKERS),
9610 SND_PCI_QUIRK(0x1028, 0x0beb, "Dell XPS 15 9530 (2023)", ALC289_FIXUP_DELL_CS35L41_SPI_2),
9611 SND_PCI_QUIRK(0x1028, 0x0c03, "Dell Precision 5340", ALC269_FIXUP_DELL4_MIC_NO_PRESENCE),
9612 SND_PCI_QUIRK(0x1028, 0x0c0b, "Dell Oasis 14 RPL-P", ALC289_FIXUP_RTK_AMP_DUAL_SPK),
9613 SND_PCI_QUIRK(0x1028, 0x0c0d, "Dell Oasis", ALC289_FIXUP_RTK_AMP_DUAL_SPK),
9614 SND_PCI_QUIRK(0x1028, 0x0c0e, "Dell Oasis 16", ALC289_FIXUP_RTK_AMP_DUAL_SPK),
9615 SND_PCI_QUIRK(0x1028, 0x0c19, "Dell Precision 3340", ALC236_FIXUP_DELL_DUAL_CODECS),
9616 SND_PCI_QUIRK(0x1028, 0x0c1a, "Dell Precision 3340", ALC236_FIXUP_DELL_DUAL_CODECS),
9617 SND_PCI_QUIRK(0x1028, 0x0c1b, "Dell Precision 3440", ALC236_FIXUP_DELL_DUAL_CODECS),
9618 SND_PCI_QUIRK(0x1028, 0x0c1c, "Dell Precision 3540", ALC236_FIXUP_DELL_DUAL_CODECS),
9619 SND_PCI_QUIRK(0x1028, 0x0c1d, "Dell Precision 3440", ALC236_FIXUP_DELL_DUAL_CODECS),
9620 SND_PCI_QUIRK(0x1028, 0x0c1e, "Dell Precision 3540", ALC236_FIXUP_DELL_DUAL_CODECS),
9621 SND_PCI_QUIRK(0x1028, 0x0c28, "Dell Inspiron 16 Plus 7630", ALC295_FIXUP_DELL_INSPIRON_TOP_SPEAKERS),
9622 SND_PCI_QUIRK(0x1028, 0x0c4d, "Dell", ALC287_FIXUP_CS35L41_I2C_4),
9623 SND_PCI_QUIRK(0x1028, 0x0cbd, "Dell Oasis 13 CS MTL-U", ALC289_FIXUP_DELL_CS35L41_SPI_2),
9624 SND_PCI_QUIRK(0x1028, 0x0cbe, "Dell Oasis 13 2-IN-1 MTL-U", ALC289_FIXUP_DELL_CS35L41_SPI_2),
9625 SND_PCI_QUIRK(0x1028, 0x0cbf, "Dell Oasis 13 Low Weight MTU-L", ALC289_FIXUP_DELL_CS35L41_SPI_2),
9626 SND_PCI_QUIRK(0x1028, 0x0cc0, "Dell Oasis 13", ALC289_FIXUP_RTK_AMP_DUAL_SPK),
9627 SND_PCI_QUIRK(0x1028, 0x0cc1, "Dell Oasis 14 MTL-H/U", ALC289_FIXUP_DELL_CS35L41_SPI_2),
9628 SND_PCI_QUIRK(0x1028, 0x0cc2, "Dell Oasis 14 2-in-1 MTL-H/U", ALC289_FIXUP_DELL_CS35L41_SPI_2),
9629 SND_PCI_QUIRK(0x1028, 0x0cc3, "Dell Oasis 14 Low Weight MTL-U", ALC289_FIXUP_DELL_CS35L41_SPI_2),
9630 SND_PCI_QUIRK(0x1028, 0x0cc4, "Dell Oasis 16 MTL-H/U", ALC289_FIXUP_DELL_CS35L41_SPI_2),
9631 SND_PCI_QUIRK(0x1028, 0x0cc5, "Dell Oasis 14", ALC289_FIXUP_RTK_AMP_DUAL_SPK),
9632 SND_PCI_QUIRK(0x1028, 0x164a, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE),
9633 SND_PCI_QUIRK(0x1028, 0x164b, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE),
9634 SND_PCI_QUIRK(0x103c, 0x1586, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC2),
9635 SND_PCI_QUIRK(0x103c, 0x18e6, "HP", ALC269_FIXUP_HP_GPIO_LED),
9636 SND_PCI_QUIRK(0x103c, 0x218b, "HP", ALC269_FIXUP_LIMIT_INT_MIC_BOOST_MUTE_LED),
9637 SND_PCI_QUIRK(0x103c, 0x21f9, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
9638 SND_PCI_QUIRK(0x103c, 0x2210, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
9639 SND_PCI_QUIRK(0x103c, 0x2214, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
9640 SND_PCI_QUIRK(0x103c, 0x221b, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED),
9641 SND_PCI_QUIRK(0x103c, 0x221c, "HP EliteBook 755 G2", ALC280_FIXUP_HP_HEADSET_MIC),
9642 SND_PCI_QUIRK(0x103c, 0x2221, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED),
9643 SND_PCI_QUIRK(0x103c, 0x2225, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED),
9644 SND_PCI_QUIRK(0x103c, 0x2236, "HP", ALC269_FIXUP_HP_LINE1_MIC1_LED),
9645 SND_PCI_QUIRK(0x103c, 0x2237, "HP", ALC269_FIXUP_HP_LINE1_MIC1_LED),
9646 SND_PCI_QUIRK(0x103c, 0x2238, "HP", ALC269_FIXUP_HP_LINE1_MIC1_LED),
9647 SND_PCI_QUIRK(0x103c, 0x2239, "HP", ALC269_FIXUP_HP_LINE1_MIC1_LED),
9648 SND_PCI_QUIRK(0x103c, 0x224b, "HP", ALC269_FIXUP_HP_LINE1_MIC1_LED),
9649 SND_PCI_QUIRK(0x103c, 0x2253, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED),
9650 SND_PCI_QUIRK(0x103c, 0x2254, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED),
9651 SND_PCI_QUIRK(0x103c, 0x2255, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED),
9652 SND_PCI_QUIRK(0x103c, 0x2256, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED),
9653 SND_PCI_QUIRK(0x103c, 0x2257, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED),
9654 SND_PCI_QUIRK(0x103c, 0x2259, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED),
9655 SND_PCI_QUIRK(0x103c, 0x225a, "HP", ALC269_FIXUP_HP_DOCK_GPIO_MIC1_LED),
9656 SND_PCI_QUIRK(0x103c, 0x225f, "HP", ALC280_FIXUP_HP_GPIO2_MIC_HOTKEY),
9657 SND_PCI_QUIRK(0x103c, 0x2260, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
9658 SND_PCI_QUIRK(0x103c, 0x2263, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
9659 SND_PCI_QUIRK(0x103c, 0x2264, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
9660 SND_PCI_QUIRK(0x103c, 0x2265, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
9661 SND_PCI_QUIRK(0x103c, 0x2268, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
9662 SND_PCI_QUIRK(0x103c, 0x226a, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
9663 SND_PCI_QUIRK(0x103c, 0x226b, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
9664 SND_PCI_QUIRK(0x103c, 0x226e, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
9665 SND_PCI_QUIRK(0x103c, 0x2271, "HP", ALC286_FIXUP_HP_GPIO_LED),
9666 SND_PCI_QUIRK(0x103c, 0x2272, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED),
9667 SND_PCI_QUIRK(0x103c, 0x2272, "HP", ALC280_FIXUP_HP_DOCK_PINS),
9668 SND_PCI_QUIRK(0x103c, 0x2273, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED),
9669 SND_PCI_QUIRK(0x103c, 0x2273, "HP", ALC280_FIXUP_HP_DOCK_PINS),
9670 SND_PCI_QUIRK(0x103c, 0x2278, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED),
9671 SND_PCI_QUIRK(0x103c, 0x227f, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
9672 SND_PCI_QUIRK(0x103c, 0x2282, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
9673 SND_PCI_QUIRK(0x103c, 0x228b, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
9674 SND_PCI_QUIRK(0x103c, 0x228e, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
9675 SND_PCI_QUIRK(0x103c, 0x229e, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
9676 SND_PCI_QUIRK(0x103c, 0x22b2, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
9677 SND_PCI_QUIRK(0x103c, 0x22b7, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
9678 SND_PCI_QUIRK(0x103c, 0x22bf, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
9679 SND_PCI_QUIRK(0x103c, 0x22c4, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
9680 SND_PCI_QUIRK(0x103c, 0x22c5, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
9681 SND_PCI_QUIRK(0x103c, 0x22c7, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
9682 SND_PCI_QUIRK(0x103c, 0x22c8, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
9683 SND_PCI_QUIRK(0x103c, 0x22cf, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
9684 SND_PCI_QUIRK(0x103c, 0x22db, "HP", ALC280_FIXUP_HP_9480M),
9685 SND_PCI_QUIRK(0x103c, 0x22dc, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED),
9686 SND_PCI_QUIRK(0x103c, 0x22fb, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED),
9687 SND_PCI_QUIRK(0x103c, 0x2334, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
9688 SND_PCI_QUIRK(0x103c, 0x2335, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
9689 SND_PCI_QUIRK(0x103c, 0x2336, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
9690 SND_PCI_QUIRK(0x103c, 0x2337, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
9691 SND_PCI_QUIRK(0x103c, 0x2b5e, "HP 288 Pro G2 MT", ALC221_FIXUP_HP_288PRO_MIC_NO_PRESENCE),
9692 SND_PCI_QUIRK(0x103c, 0x802e, "HP Z240 SFF", ALC221_FIXUP_HP_MIC_NO_PRESENCE),
9693 SND_PCI_QUIRK(0x103c, 0x802f, "HP Z240", ALC221_FIXUP_HP_MIC_NO_PRESENCE),
9694 SND_PCI_QUIRK(0x103c, 0x8077, "HP", ALC256_FIXUP_HP_HEADSET_MIC),
9695 SND_PCI_QUIRK(0x103c, 0x8158, "HP", ALC256_FIXUP_HP_HEADSET_MIC),
9696 SND_PCI_QUIRK(0x103c, 0x820d, "HP Pavilion 15", ALC295_FIXUP_HP_X360),
9697 SND_PCI_QUIRK(0x103c, 0x8256, "HP", ALC221_FIXUP_HP_FRONT_MIC),
9698 SND_PCI_QUIRK(0x103c, 0x827e, "HP x360", ALC295_FIXUP_HP_X360),
9699 SND_PCI_QUIRK(0x103c, 0x827f, "HP x360", ALC269_FIXUP_HP_MUTE_LED_MIC3),
9700 SND_PCI_QUIRK(0x103c, 0x82bf, "HP G3 mini", ALC221_FIXUP_HP_MIC_NO_PRESENCE),
9701 SND_PCI_QUIRK(0x103c, 0x82c0, "HP G3 mini premium", ALC221_FIXUP_HP_MIC_NO_PRESENCE),
9702 SND_PCI_QUIRK(0x103c, 0x83b9, "HP Spectre x360", ALC269_FIXUP_HP_MUTE_LED_MIC3),
9703 SND_PCI_QUIRK(0x103c, 0x841c, "HP Pavilion 15-CK0xx", ALC269_FIXUP_HP_MUTE_LED_MIC3),
9704 SND_PCI_QUIRK(0x103c, 0x8497, "HP Envy x360", ALC269_FIXUP_HP_MUTE_LED_MIC3),
9705 SND_PCI_QUIRK(0x103c, 0x84ae, "HP 15-db0403ng", ALC236_FIXUP_HP_MUTE_LED_COEFBIT2),
9706 SND_PCI_QUIRK(0x103c, 0x84da, "HP OMEN dc0019-ur", ALC295_FIXUP_HP_OMEN),
9707 SND_PCI_QUIRK(0x103c, 0x84e7, "HP Pavilion 15", ALC269_FIXUP_HP_MUTE_LED_MIC3),
9708 SND_PCI_QUIRK(0x103c, 0x8519, "HP Spectre x360 15-df0xxx", ALC285_FIXUP_HP_SPECTRE_X360),
9709 SND_PCI_QUIRK(0x103c, 0x8537, "HP ProBook 440 G6", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF),
9710 SND_PCI_QUIRK(0x103c, 0x860f, "HP ZBook 15 G6", ALC285_FIXUP_HP_GPIO_AMP_INIT),
9711 SND_PCI_QUIRK(0x103c, 0x861f, "HP Elite Dragonfly G1", ALC285_FIXUP_HP_GPIO_AMP_INIT),
9712 SND_PCI_QUIRK(0x103c, 0x869d, "HP", ALC236_FIXUP_HP_MUTE_LED),
9713 SND_PCI_QUIRK(0x103c, 0x86c7, "HP Envy AiO 32", ALC274_FIXUP_HP_ENVY_GPIO),
9714 SND_PCI_QUIRK(0x103c, 0x86e7, "HP Spectre x360 15-eb0xxx", ALC285_FIXUP_HP_SPECTRE_X360_EB1),
9715 SND_PCI_QUIRK(0x103c, 0x86e8, "HP Spectre x360 15-eb0xxx", ALC285_FIXUP_HP_SPECTRE_X360_EB1),
9716 SND_PCI_QUIRK(0x103c, 0x86f9, "HP Spectre x360 13-aw0xxx", ALC285_FIXUP_HP_SPECTRE_X360_MUTE_LED),
9717 SND_PCI_QUIRK(0x103c, 0x8716, "HP Elite Dragonfly G2 Notebook PC", ALC285_FIXUP_HP_GPIO_AMP_INIT),
9718 SND_PCI_QUIRK(0x103c, 0x8720, "HP EliteBook x360 1040 G8 Notebook PC", ALC285_FIXUP_HP_GPIO_AMP_INIT),
9719 SND_PCI_QUIRK(0x103c, 0x8724, "HP EliteBook 850 G7", ALC285_FIXUP_HP_GPIO_LED),
9720 SND_PCI_QUIRK(0x103c, 0x8728, "HP EliteBook 840 G7", ALC285_FIXUP_HP_GPIO_LED),
9721 SND_PCI_QUIRK(0x103c, 0x8729, "HP", ALC285_FIXUP_HP_GPIO_LED),
9722 SND_PCI_QUIRK(0x103c, 0x8730, "HP ProBook 445 G7", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF),
9723 SND_PCI_QUIRK(0x103c, 0x8735, "HP ProBook 435 G7", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF),
9724 SND_PCI_QUIRK(0x103c, 0x8736, "HP", ALC285_FIXUP_HP_GPIO_AMP_INIT),
9725 SND_PCI_QUIRK(0x103c, 0x8760, "HP", ALC285_FIXUP_HP_MUTE_LED),
9726 SND_PCI_QUIRK(0x103c, 0x876e, "HP ENVY x360 Convertible 13-ay0xxx", ALC245_FIXUP_HP_X360_MUTE_LEDS),
9727 SND_PCI_QUIRK(0x103c, 0x877a, "HP", ALC285_FIXUP_HP_MUTE_LED),
9728 SND_PCI_QUIRK(0x103c, 0x877d, "HP", ALC236_FIXUP_HP_MUTE_LED),
9729 SND_PCI_QUIRK(0x103c, 0x8780, "HP ZBook Fury 17 G7 Mobile Workstation",
9730 ALC285_FIXUP_HP_GPIO_AMP_INIT),
9731 SND_PCI_QUIRK(0x103c, 0x8783, "HP ZBook Fury 15 G7 Mobile Workstation",
9732 ALC285_FIXUP_HP_GPIO_AMP_INIT),
9733 SND_PCI_QUIRK(0x103c, 0x8786, "HP OMEN 15", ALC285_FIXUP_HP_MUTE_LED),
9734 SND_PCI_QUIRK(0x103c, 0x8787, "HP OMEN 15", ALC285_FIXUP_HP_MUTE_LED),
9735 SND_PCI_QUIRK(0x103c, 0x8788, "HP OMEN 15", ALC285_FIXUP_HP_MUTE_LED),
9736 SND_PCI_QUIRK(0x103c, 0x87b7, "HP Laptop 14-fq0xxx", ALC236_FIXUP_HP_MUTE_LED_COEFBIT2),
9737 SND_PCI_QUIRK(0x103c, 0x87c8, "HP", ALC287_FIXUP_HP_GPIO_LED),
9738 SND_PCI_QUIRK(0x103c, 0x87e5, "HP ProBook 440 G8 Notebook PC", ALC236_FIXUP_HP_GPIO_LED),
9739 SND_PCI_QUIRK(0x103c, 0x87e7, "HP ProBook 450 G8 Notebook PC", ALC236_FIXUP_HP_GPIO_LED),
9740 SND_PCI_QUIRK(0x103c, 0x87f1, "HP ProBook 630 G8 Notebook PC", ALC236_FIXUP_HP_GPIO_LED),
9741 SND_PCI_QUIRK(0x103c, 0x87f2, "HP ProBook 640 G8 Notebook PC", ALC236_FIXUP_HP_GPIO_LED),
9742 SND_PCI_QUIRK(0x103c, 0x87f4, "HP", ALC287_FIXUP_HP_GPIO_LED),
9743 SND_PCI_QUIRK(0x103c, 0x87f5, "HP", ALC287_FIXUP_HP_GPIO_LED),
9744 SND_PCI_QUIRK(0x103c, 0x87f6, "HP Spectre x360 14", ALC245_FIXUP_HP_X360_AMP),
9745 SND_PCI_QUIRK(0x103c, 0x87f7, "HP Spectre x360 14", ALC245_FIXUP_HP_X360_AMP),
9746 SND_PCI_QUIRK(0x103c, 0x87fe, "HP Laptop 15s-fq2xxx", ALC236_FIXUP_HP_MUTE_LED_COEFBIT2),
9747 SND_PCI_QUIRK(0x103c, 0x8805, "HP ProBook 650 G8 Notebook PC", ALC236_FIXUP_HP_GPIO_LED),
9748 SND_PCI_QUIRK(0x103c, 0x880d, "HP EliteBook 830 G8 Notebook PC", ALC285_FIXUP_HP_GPIO_LED),
9749 SND_PCI_QUIRK(0x103c, 0x8811, "HP Spectre x360 15-eb1xxx", ALC285_FIXUP_HP_SPECTRE_X360_EB1),
9750 SND_PCI_QUIRK(0x103c, 0x8812, "HP Spectre x360 15-eb1xxx", ALC285_FIXUP_HP_SPECTRE_X360_EB1),
9751 SND_PCI_QUIRK(0x103c, 0x881d, "HP 250 G8 Notebook PC", ALC236_FIXUP_HP_MUTE_LED_COEFBIT2),
9752 SND_PCI_QUIRK(0x103c, 0x8846, "HP EliteBook 850 G8 Notebook PC", ALC285_FIXUP_HP_GPIO_LED),
9753 SND_PCI_QUIRK(0x103c, 0x8847, "HP EliteBook x360 830 G8 Notebook PC", ALC285_FIXUP_HP_GPIO_LED),
9754 SND_PCI_QUIRK(0x103c, 0x884b, "HP EliteBook 840 Aero G8 Notebook PC", ALC285_FIXUP_HP_GPIO_LED),
9755 SND_PCI_QUIRK(0x103c, 0x884c, "HP EliteBook 840 G8 Notebook PC", ALC285_FIXUP_HP_GPIO_LED),
9756 SND_PCI_QUIRK(0x103c, 0x8862, "HP ProBook 445 G8 Notebook PC", ALC236_FIXUP_HP_LIMIT_INT_MIC_BOOST),
9757 SND_PCI_QUIRK(0x103c, 0x8863, "HP ProBook 445 G8 Notebook PC", ALC236_FIXUP_HP_LIMIT_INT_MIC_BOOST),
9758 SND_PCI_QUIRK(0x103c, 0x886d, "HP ZBook Fury 17.3 Inch G8 Mobile Workstation PC", ALC285_FIXUP_HP_GPIO_AMP_INIT),
9759 SND_PCI_QUIRK(0x103c, 0x8870, "HP ZBook Fury 15.6 Inch G8 Mobile Workstation PC", ALC285_FIXUP_HP_GPIO_AMP_INIT),
9760 SND_PCI_QUIRK(0x103c, 0x8873, "HP ZBook Studio 15.6 Inch G8 Mobile Workstation PC", ALC285_FIXUP_HP_GPIO_AMP_INIT),
9761 SND_PCI_QUIRK(0x103c, 0x887a, "HP Laptop 15s-eq2xxx", ALC236_FIXUP_HP_MUTE_LED_COEFBIT2),
9762 SND_PCI_QUIRK(0x103c, 0x888a, "HP ENVY x360 Convertible 15-eu0xxx", ALC245_FIXUP_HP_X360_MUTE_LEDS),
9763 SND_PCI_QUIRK(0x103c, 0x888d, "HP ZBook Power 15.6 inch G8 Mobile Workstation PC", ALC236_FIXUP_HP_GPIO_LED),
9764 SND_PCI_QUIRK(0x103c, 0x8895, "HP EliteBook 855 G8 Notebook PC", ALC285_FIXUP_HP_SPEAKERS_MICMUTE_LED),
9765 SND_PCI_QUIRK(0x103c, 0x8896, "HP EliteBook 855 G8 Notebook PC", ALC285_FIXUP_HP_MUTE_LED),
9766 SND_PCI_QUIRK(0x103c, 0x8898, "HP EliteBook 845 G8 Notebook PC", ALC285_FIXUP_HP_LIMIT_INT_MIC_BOOST),
9767 SND_PCI_QUIRK(0x103c, 0x88d0, "HP Pavilion 15-eh1xxx (mainboard 88D0)", ALC287_FIXUP_HP_GPIO_LED),
9768 SND_PCI_QUIRK(0x103c, 0x8902, "HP OMEN 16", ALC285_FIXUP_HP_MUTE_LED),
9769 SND_PCI_QUIRK(0x103c, 0x890e, "HP 255 G8 Notebook PC", ALC236_FIXUP_HP_MUTE_LED_COEFBIT2),
9770 SND_PCI_QUIRK(0x103c, 0x8919, "HP Pavilion Aero Laptop 13-be0xxx", ALC287_FIXUP_HP_GPIO_LED),
9771 SND_PCI_QUIRK(0x103c, 0x896d, "HP ZBook Firefly 16 G9", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
9772 SND_PCI_QUIRK(0x103c, 0x896e, "HP EliteBook x360 830 G9", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
9773 SND_PCI_QUIRK(0x103c, 0x8971, "HP EliteBook 830 G9", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
9774 SND_PCI_QUIRK(0x103c, 0x8972, "HP EliteBook 840 G9", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
9775 SND_PCI_QUIRK(0x103c, 0x8973, "HP EliteBook 860 G9", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
9776 SND_PCI_QUIRK(0x103c, 0x8974, "HP EliteBook 840 Aero G9", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
9777 SND_PCI_QUIRK(0x103c, 0x8975, "HP EliteBook x360 840 Aero G9", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
9778 SND_PCI_QUIRK(0x103c, 0x897d, "HP mt440 Mobile Thin Client U74", ALC236_FIXUP_HP_GPIO_LED),
9779 SND_PCI_QUIRK(0x103c, 0x8981, "HP Elite Dragonfly G3", ALC245_FIXUP_CS35L41_SPI_4),
9780 SND_PCI_QUIRK(0x103c, 0x898e, "HP EliteBook 835 G9", ALC287_FIXUP_CS35L41_I2C_2),
9781 SND_PCI_QUIRK(0x103c, 0x898f, "HP EliteBook 835 G9", ALC287_FIXUP_CS35L41_I2C_2),
9782 SND_PCI_QUIRK(0x103c, 0x8991, "HP EliteBook 845 G9", ALC287_FIXUP_CS35L41_I2C_2_HP_GPIO_LED),
9783 SND_PCI_QUIRK(0x103c, 0x8992, "HP EliteBook 845 G9", ALC287_FIXUP_CS35L41_I2C_2),
9784 SND_PCI_QUIRK(0x103c, 0x8994, "HP EliteBook 855 G9", ALC287_FIXUP_CS35L41_I2C_2_HP_GPIO_LED),
9785 SND_PCI_QUIRK(0x103c, 0x8995, "HP EliteBook 855 G9", ALC287_FIXUP_CS35L41_I2C_2),
9786 SND_PCI_QUIRK(0x103c, 0x89a4, "HP ProBook 440 G9", ALC236_FIXUP_HP_GPIO_LED),
9787 SND_PCI_QUIRK(0x103c, 0x89a6, "HP ProBook 450 G9", ALC236_FIXUP_HP_GPIO_LED),
9788 SND_PCI_QUIRK(0x103c, 0x89aa, "HP EliteBook 630 G9", ALC236_FIXUP_HP_GPIO_LED),
9789 SND_PCI_QUIRK(0x103c, 0x89ac, "HP EliteBook 640 G9", ALC236_FIXUP_HP_GPIO_LED),
9790 SND_PCI_QUIRK(0x103c, 0x89ae, "HP EliteBook 650 G9", ALC236_FIXUP_HP_GPIO_LED),
9791 SND_PCI_QUIRK(0x103c, 0x89c0, "HP ZBook Power 15.6 G9", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
9792 SND_PCI_QUIRK(0x103c, 0x89c3, "Zbook Studio G9", ALC245_FIXUP_CS35L41_SPI_4_HP_GPIO_LED),
9793 SND_PCI_QUIRK(0x103c, 0x89c6, "Zbook Fury 17 G9", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
9794 SND_PCI_QUIRK(0x103c, 0x89ca, "HP", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF),
9795 SND_PCI_QUIRK(0x103c, 0x89d3, "HP EliteBook 645 G9 (MB 89D2)", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF),
9796 SND_PCI_QUIRK(0x103c, 0x89e7, "HP Elite x2 G9", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
9797 SND_PCI_QUIRK(0x103c, 0x8a0f, "HP Pavilion 14-ec1xxx", ALC287_FIXUP_HP_GPIO_LED),
9798 SND_PCI_QUIRK(0x103c, 0x8a20, "HP Laptop 15s-fq5xxx", ALC236_FIXUP_HP_MUTE_LED_COEFBIT2),
9799 SND_PCI_QUIRK(0x103c, 0x8a25, "HP Victus 16-d1xxx (MB 8A25)", ALC245_FIXUP_HP_MUTE_LED_COEFBIT),
9800 SND_PCI_QUIRK(0x103c, 0x8a28, "HP Envy 13", ALC287_FIXUP_CS35L41_I2C_2),
9801 SND_PCI_QUIRK(0x103c, 0x8a29, "HP Envy 15", ALC287_FIXUP_CS35L41_I2C_2),
9802 SND_PCI_QUIRK(0x103c, 0x8a2a, "HP Envy 15", ALC287_FIXUP_CS35L41_I2C_2),
9803 SND_PCI_QUIRK(0x103c, 0x8a2b, "HP Envy 15", ALC287_FIXUP_CS35L41_I2C_2),
9804 SND_PCI_QUIRK(0x103c, 0x8a2c, "HP Envy 16", ALC287_FIXUP_CS35L41_I2C_2),
9805 SND_PCI_QUIRK(0x103c, 0x8a2d, "HP Envy 16", ALC287_FIXUP_CS35L41_I2C_2),
9806 SND_PCI_QUIRK(0x103c, 0x8a2e, "HP Envy 16", ALC287_FIXUP_CS35L41_I2C_2),
9807 SND_PCI_QUIRK(0x103c, 0x8a2e, "HP Envy 17", ALC287_FIXUP_CS35L41_I2C_2),
9808 SND_PCI_QUIRK(0x103c, 0x8a30, "HP Envy 17", ALC287_FIXUP_CS35L41_I2C_2),
9809 SND_PCI_QUIRK(0x103c, 0x8a31, "HP Envy 15", ALC287_FIXUP_CS35L41_I2C_2),
9810 SND_PCI_QUIRK(0x103c, 0x8a6e, "HP EDNA 360", ALC287_FIXUP_CS35L41_I2C_4),
9811 SND_PCI_QUIRK(0x103c, 0x8a78, "HP Dev One", ALC285_FIXUP_HP_LIMIT_INT_MIC_BOOST),
9812 SND_PCI_QUIRK(0x103c, 0x8aa0, "HP ProBook 440 G9 (MB 8A9E)", ALC236_FIXUP_HP_GPIO_LED),
9813 SND_PCI_QUIRK(0x103c, 0x8aa3, "HP ProBook 450 G9 (MB 8AA1)", ALC236_FIXUP_HP_GPIO_LED),
9814 SND_PCI_QUIRK(0x103c, 0x8aa8, "HP EliteBook 640 G9 (MB 8AA6)", ALC236_FIXUP_HP_GPIO_LED),
9815 SND_PCI_QUIRK(0x103c, 0x8aab, "HP EliteBook 650 G9 (MB 8AA9)", ALC236_FIXUP_HP_GPIO_LED),
9816 SND_PCI_QUIRK(0x103c, 0x8ab9, "HP EliteBook 840 G8 (MB 8AB8)", ALC285_FIXUP_HP_GPIO_LED),
9817 SND_PCI_QUIRK(0x103c, 0x8abb, "HP ZBook Firefly 14 G9", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
9818 SND_PCI_QUIRK(0x103c, 0x8ad1, "HP EliteBook 840 14 inch G9 Notebook PC", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
9819 SND_PCI_QUIRK(0x103c, 0x8ad2, "HP EliteBook 860 16 inch G9 Notebook PC", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
9820 SND_PCI_QUIRK(0x103c, 0x8ad8, "HP 800 G9", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
9821 SND_PCI_QUIRK(0x103c, 0x8b0f, "HP Elite mt645 G7 Mobile Thin Client U81", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF),
9822 SND_PCI_QUIRK(0x103c, 0x8b2f, "HP 255 15.6 inch G10 Notebook PC", ALC236_FIXUP_HP_MUTE_LED_COEFBIT2),
9823 SND_PCI_QUIRK(0x103c, 0x8b3a, "HP Envy 15", ALC287_FIXUP_CS35L41_I2C_2),
9824 SND_PCI_QUIRK(0x103c, 0x8b3f, "HP mt440 Mobile Thin Client U91", ALC236_FIXUP_HP_GPIO_LED),
9825 SND_PCI_QUIRK(0x103c, 0x8b42, "HP", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
9826 SND_PCI_QUIRK(0x103c, 0x8b43, "HP", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
9827 SND_PCI_QUIRK(0x103c, 0x8b44, "HP", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
9828 SND_PCI_QUIRK(0x103c, 0x8b45, "HP", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
9829 SND_PCI_QUIRK(0x103c, 0x8b46, "HP", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
9830 SND_PCI_QUIRK(0x103c, 0x8b47, "HP", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
9831 SND_PCI_QUIRK(0x103c, 0x8b59, "HP Elite mt645 G7 Mobile Thin Client U89", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF),
9832 SND_PCI_QUIRK(0x103c, 0x8b5d, "HP", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF),
9833 SND_PCI_QUIRK(0x103c, 0x8b5e, "HP", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF),
9834 SND_PCI_QUIRK(0x103c, 0x8b63, "HP Elite Dragonfly 13.5 inch G4", ALC245_FIXUP_CS35L41_SPI_4_HP_GPIO_LED),
9835 SND_PCI_QUIRK(0x103c, 0x8b65, "HP ProBook 455 15.6 inch G10 Notebook PC", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF),
9836 SND_PCI_QUIRK(0x103c, 0x8b66, "HP", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF),
9837 SND_PCI_QUIRK(0x103c, 0x8b70, "HP EliteBook 835 G10", ALC287_FIXUP_CS35L41_I2C_2_HP_GPIO_LED),
9838 SND_PCI_QUIRK(0x103c, 0x8b72, "HP EliteBook 845 G10", ALC287_FIXUP_CS35L41_I2C_2_HP_GPIO_LED),
9839 SND_PCI_QUIRK(0x103c, 0x8b74, "HP EliteBook 845W G10", ALC287_FIXUP_CS35L41_I2C_2_HP_GPIO_LED),
9840 SND_PCI_QUIRK(0x103c, 0x8b77, "HP ElieBook 865 G10", ALC287_FIXUP_CS35L41_I2C_2),
9841 SND_PCI_QUIRK(0x103c, 0x8b7a, "HP", ALC236_FIXUP_HP_GPIO_LED),
9842 SND_PCI_QUIRK(0x103c, 0x8b7d, "HP", ALC236_FIXUP_HP_GPIO_LED),
9843 SND_PCI_QUIRK(0x103c, 0x8b87, "HP", ALC236_FIXUP_HP_GPIO_LED),
9844 SND_PCI_QUIRK(0x103c, 0x8b8a, "HP", ALC236_FIXUP_HP_GPIO_LED),
9845 SND_PCI_QUIRK(0x103c, 0x8b8b, "HP", ALC236_FIXUP_HP_GPIO_LED),
9846 SND_PCI_QUIRK(0x103c, 0x8b8d, "HP", ALC236_FIXUP_HP_GPIO_LED),
9847 SND_PCI_QUIRK(0x103c, 0x8b8f, "HP", ALC245_FIXUP_CS35L41_SPI_4_HP_GPIO_LED),
9848 SND_PCI_QUIRK(0x103c, 0x8b92, "HP", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
9849 SND_PCI_QUIRK(0x103c, 0x8b96, "HP", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF),
9850 SND_PCI_QUIRK(0x103c, 0x8b97, "HP", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF),
9851 SND_PCI_QUIRK(0x103c, 0x8bdd, "HP Envy 17", ALC287_FIXUP_CS35L41_I2C_2),
9852 SND_PCI_QUIRK(0x103c, 0x8bde, "HP Envy 17", ALC287_FIXUP_CS35L41_I2C_2),
9853 SND_PCI_QUIRK(0x103c, 0x8bdf, "HP Envy 15", ALC287_FIXUP_CS35L41_I2C_2),
9854 SND_PCI_QUIRK(0x103c, 0x8be0, "HP Envy 15", ALC287_FIXUP_CS35L41_I2C_2),
9855 SND_PCI_QUIRK(0x103c, 0x8be1, "HP Envy 15", ALC287_FIXUP_CS35L41_I2C_2),
9856 SND_PCI_QUIRK(0x103c, 0x8be2, "HP Envy 15", ALC287_FIXUP_CS35L41_I2C_2),
9857 SND_PCI_QUIRK(0x103c, 0x8be3, "HP Envy 15", ALC287_FIXUP_CS35L41_I2C_2),
9858 SND_PCI_QUIRK(0x103c, 0x8be5, "HP Envy 16", ALC287_FIXUP_CS35L41_I2C_2),
9859 SND_PCI_QUIRK(0x103c, 0x8be6, "HP Envy 16", ALC287_FIXUP_CS35L41_I2C_2),
9860 SND_PCI_QUIRK(0x103c, 0x8be7, "HP Envy 17", ALC287_FIXUP_CS35L41_I2C_2),
9861 SND_PCI_QUIRK(0x103c, 0x8be8, "HP Envy 17", ALC287_FIXUP_CS35L41_I2C_2),
9862 SND_PCI_QUIRK(0x103c, 0x8be9, "HP Envy 15", ALC287_FIXUP_CS35L41_I2C_2),
9863 SND_PCI_QUIRK(0x103c, 0x8bf0, "HP", ALC236_FIXUP_HP_GPIO_LED),
9864 SND_PCI_QUIRK(0x103c, 0x8c15, "HP Spectre 14", ALC287_FIXUP_CS35L41_I2C_2),
9865 SND_PCI_QUIRK(0x103c, 0x8c16, "HP Spectre 16", ALC287_FIXUP_CS35L41_I2C_2),
9866 SND_PCI_QUIRK(0x103c, 0x8c17, "HP Spectre 16", ALC287_FIXUP_CS35L41_I2C_2),
9867 SND_PCI_QUIRK(0x103c, 0x8c46, "HP EliteBook 830 G11", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
9868 SND_PCI_QUIRK(0x103c, 0x8c47, "HP EliteBook 840 G11", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
9869 SND_PCI_QUIRK(0x103c, 0x8c48, "HP EliteBook 860 G11", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
9870 SND_PCI_QUIRK(0x103c, 0x8c49, "HP Elite x360 830 2-in-1 G11", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
9871 SND_PCI_QUIRK(0x103c, 0x8c4f, "HP Envy 15", ALC287_FIXUP_CS35L41_I2C_2),
9872 SND_PCI_QUIRK(0x103c, 0x8c50, "HP Envy 17", ALC287_FIXUP_CS35L41_I2C_2),
9873 SND_PCI_QUIRK(0x103c, 0x8c51, "HP Envy 17", ALC287_FIXUP_CS35L41_I2C_2),
9874 SND_PCI_QUIRK(0x103c, 0x8c52, "HP EliteBook 1040 G11", ALC245_FIXUP_CS35L56_SPI_4_HP_GPIO_LED),
9875 SND_PCI_QUIRK(0x103c, 0x8c53, "HP Elite x360 1040 2-in-1 G11", ALC245_FIXUP_CS35L56_SPI_4_HP_GPIO_LED),
9876 SND_PCI_QUIRK(0x103c, 0x8c66, "HP Envy 16", ALC287_FIXUP_CS35L41_I2C_2),
9877 SND_PCI_QUIRK(0x103c, 0x8c67, "HP Envy 17", ALC287_FIXUP_CS35L41_I2C_2),
9878 SND_PCI_QUIRK(0x103c, 0x8c68, "HP Envy 17", ALC287_FIXUP_CS35L41_I2C_2),
9879 SND_PCI_QUIRK(0x103c, 0x8c6a, "HP Envy 16", ALC287_FIXUP_CS35L41_I2C_2),
9880 SND_PCI_QUIRK(0x103c, 0x8c70, "HP EliteBook 835 G11", ALC287_FIXUP_CS35L41_I2C_2_HP_GPIO_LED),
9881 SND_PCI_QUIRK(0x103c, 0x8c71, "HP EliteBook 845 G11", ALC287_FIXUP_CS35L41_I2C_2_HP_GPIO_LED),
9882 SND_PCI_QUIRK(0x103c, 0x8c72, "HP EliteBook 865 G11", ALC287_FIXUP_CS35L41_I2C_2_HP_GPIO_LED),
9883 SND_PCI_QUIRK(0x103c, 0x8c8a, "HP EliteBook 630", ALC236_FIXUP_HP_GPIO_LED),
9884 SND_PCI_QUIRK(0x103c, 0x8c8c, "HP EliteBook 660", ALC236_FIXUP_HP_GPIO_LED),
9885 SND_PCI_QUIRK(0x103c, 0x8c90, "HP EliteBook 640", ALC236_FIXUP_HP_GPIO_LED),
9886 SND_PCI_QUIRK(0x103c, 0x8c91, "HP EliteBook 660", ALC236_FIXUP_HP_GPIO_LED),
9887 SND_PCI_QUIRK(0x103c, 0x8c96, "HP", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF),
9888 SND_PCI_QUIRK(0x103c, 0x8c97, "HP ZBook", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF),
9889 SND_PCI_QUIRK(0x103c, 0x8ca1, "HP ZBook Power", ALC236_FIXUP_HP_GPIO_LED),
9890 SND_PCI_QUIRK(0x103c, 0x8ca2, "HP ZBook Power", ALC236_FIXUP_HP_GPIO_LED),
9891 SND_PCI_QUIRK(0x103c, 0x8ca4, "HP ZBook Fury", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
9892 SND_PCI_QUIRK(0x103c, 0x8ca7, "HP ZBook Fury", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
9893 SND_PCI_QUIRK(0x103c, 0x8cdd, "HP Spectre", ALC287_FIXUP_CS35L41_I2C_2),
9894 SND_PCI_QUIRK(0x103c, 0x8cde, "HP Spectre", ALC287_FIXUP_CS35L41_I2C_2),
9895 SND_PCI_QUIRK(0x103c, 0x8cf5, "HP ZBook Studio 16", ALC245_FIXUP_CS35L41_SPI_4_HP_GPIO_LED),
9896 SND_PCI_QUIRK(0x1043, 0x103e, "ASUS X540SA", ALC256_FIXUP_ASUS_MIC),
9897 SND_PCI_QUIRK(0x1043, 0x103f, "ASUS TX300", ALC282_FIXUP_ASUS_TX300),
9898 SND_PCI_QUIRK(0x1043, 0x106d, "Asus K53BE", ALC269_FIXUP_LIMIT_INT_MIC_BOOST),
9899 SND_PCI_QUIRK(0x1043, 0x10a1, "ASUS UX391UA", ALC294_FIXUP_ASUS_SPK),
9900 SND_PCI_QUIRK(0x1043, 0x10c0, "ASUS X540SA", ALC256_FIXUP_ASUS_MIC),
9901 SND_PCI_QUIRK(0x1043, 0x10d0, "ASUS X540LA/X540LJ", ALC255_FIXUP_ASUS_MIC_NO_PRESENCE),
9902 SND_PCI_QUIRK(0x1043, 0x10d3, "ASUS K6500ZC", ALC294_FIXUP_ASUS_SPK),
9903 SND_PCI_QUIRK(0x1043, 0x115d, "Asus 1015E", ALC269_FIXUP_LIMIT_INT_MIC_BOOST),
9904 SND_PCI_QUIRK(0x1043, 0x11c0, "ASUS X556UR", ALC255_FIXUP_ASUS_MIC_NO_PRESENCE),
9905 SND_PCI_QUIRK(0x1043, 0x125e, "ASUS Q524UQK", ALC255_FIXUP_ASUS_MIC_NO_PRESENCE),
9906 SND_PCI_QUIRK(0x1043, 0x1271, "ASUS X430UN", ALC256_FIXUP_ASUS_MIC_NO_PRESENCE),
9907 SND_PCI_QUIRK(0x1043, 0x1290, "ASUS X441SA", ALC233_FIXUP_EAPD_COEF_AND_MIC_NO_PRESENCE),
9908 SND_PCI_QUIRK(0x1043, 0x12a0, "ASUS X441UV", ALC233_FIXUP_EAPD_COEF_AND_MIC_NO_PRESENCE),
9909 SND_PCI_QUIRK(0x1043, 0x12a3, "Asus N7691ZM", ALC269_FIXUP_ASUS_N7601ZM),
9910 SND_PCI_QUIRK(0x1043, 0x12af, "ASUS UX582ZS", ALC245_FIXUP_CS35L41_SPI_2),
9911 SND_PCI_QUIRK(0x1043, 0x12e0, "ASUS X541SA", ALC256_FIXUP_ASUS_MIC),
9912 SND_PCI_QUIRK(0x1043, 0x12f0, "ASUS X541UV", ALC256_FIXUP_ASUS_MIC),
9913 SND_PCI_QUIRK(0x1043, 0x1313, "Asus K42JZ", ALC269VB_FIXUP_ASUS_MIC_NO_PRESENCE),
9914 SND_PCI_QUIRK(0x1043, 0x13b0, "ASUS Z550SA", ALC256_FIXUP_ASUS_MIC),
9915 SND_PCI_QUIRK(0x1043, 0x1427, "Asus Zenbook UX31E", ALC269VB_FIXUP_ASUS_ZENBOOK),
9916 SND_PCI_QUIRK(0x1043, 0x1433, "ASUS GX650PY/PZ/PV/PU/PYV/PZV/PIV/PVV", ALC285_FIXUP_ASUS_I2C_HEADSET_MIC),
9917 SND_PCI_QUIRK(0x1043, 0x1463, "Asus GA402X/GA402N", ALC285_FIXUP_ASUS_I2C_HEADSET_MIC),
9918 SND_PCI_QUIRK(0x1043, 0x1473, "ASUS GU604VI/VC/VE/VG/VJ/VQ/VU/VV/VY/VZ", ALC285_FIXUP_ASUS_HEADSET_MIC),
9919 SND_PCI_QUIRK(0x1043, 0x1483, "ASUS GU603VQ/VU/VV/VJ/VI", ALC285_FIXUP_ASUS_HEADSET_MIC),
9920 SND_PCI_QUIRK(0x1043, 0x1493, "ASUS GV601VV/VU/VJ/VQ/VI", ALC285_FIXUP_ASUS_HEADSET_MIC),
9921 SND_PCI_QUIRK(0x1043, 0x14d3, "ASUS G614JY/JZ/JG", ALC245_FIXUP_CS35L41_SPI_2),
9922 SND_PCI_QUIRK(0x1043, 0x14e3, "ASUS G513PI/PU/PV", ALC287_FIXUP_CS35L41_I2C_2),
9923 SND_PCI_QUIRK(0x1043, 0x1503, "ASUS G733PY/PZ/PZV/PYV", ALC287_FIXUP_CS35L41_I2C_2),
9924 SND_PCI_QUIRK(0x1043, 0x1517, "Asus Zenbook UX31A", ALC269VB_FIXUP_ASUS_ZENBOOK_UX31A),
9925 SND_PCI_QUIRK(0x1043, 0x1533, "ASUS GV302XA/XJ/XQ/XU/XV/XI", ALC287_FIXUP_CS35L41_I2C_2),
9926 SND_PCI_QUIRK(0x1043, 0x1573, "ASUS GZ301VV/VQ/VU/VJ/VA/VC/VE/VVC/VQC/VUC/VJC/VEC/VCC", ALC285_FIXUP_ASUS_HEADSET_MIC),
9927 SND_PCI_QUIRK(0x1043, 0x1662, "ASUS GV301QH", ALC294_FIXUP_ASUS_DUAL_SPK),
9928 SND_PCI_QUIRK(0x1043, 0x1663, "ASUS GU603ZI/ZJ/ZQ/ZU/ZV", ALC285_FIXUP_ASUS_HEADSET_MIC),
9929 SND_PCI_QUIRK(0x1043, 0x1683, "ASUS UM3402YAR", ALC287_FIXUP_CS35L41_I2C_2),
9930 SND_PCI_QUIRK(0x1043, 0x16a3, "ASUS UX3402VA", ALC245_FIXUP_CS35L41_SPI_2),
9931 SND_PCI_QUIRK(0x1043, 0x16b2, "ASUS GU603", ALC289_FIXUP_ASUS_GA401),
9932 SND_PCI_QUIRK(0x1043, 0x16d3, "ASUS UX5304VA", ALC245_FIXUP_CS35L41_SPI_2),
9933 SND_PCI_QUIRK(0x1043, 0x16e3, "ASUS UX50", ALC269_FIXUP_STEREO_DMIC),
9934 SND_PCI_QUIRK(0x1043, 0x16f3, "ASUS UX7602VI/BZ", ALC245_FIXUP_CS35L41_SPI_2),
9935 SND_PCI_QUIRK(0x1043, 0x1740, "ASUS UX430UA", ALC295_FIXUP_ASUS_DACS),
9936 SND_PCI_QUIRK(0x1043, 0x17d1, "ASUS UX431FL", ALC294_FIXUP_ASUS_DUAL_SPK),
9937 SND_PCI_QUIRK(0x1043, 0x17f3, "ROG Ally NR2301L/X", ALC294_FIXUP_ASUS_ALLY),
9938 SND_PCI_QUIRK(0x1043, 0x1863, "ASUS UX6404VI/VV", ALC245_FIXUP_CS35L41_SPI_2),
9939 SND_PCI_QUIRK(0x1043, 0x1881, "ASUS Zephyrus S/M", ALC294_FIXUP_ASUS_GX502_PINS),
9940 SND_PCI_QUIRK(0x1043, 0x18b1, "Asus MJ401TA", ALC256_FIXUP_ASUS_HEADSET_MIC),
9941 SND_PCI_QUIRK(0x1043, 0x18d3, "ASUS UM3504DA", ALC294_FIXUP_CS35L41_I2C_2),
9942 SND_PCI_QUIRK(0x1043, 0x18f1, "Asus FX505DT", ALC256_FIXUP_ASUS_HEADSET_MIC),
9943 SND_PCI_QUIRK(0x1043, 0x194e, "ASUS UX563FD", ALC294_FIXUP_ASUS_HPE),
9944 SND_PCI_QUIRK(0x1043, 0x1970, "ASUS UX550VE", ALC289_FIXUP_ASUS_GA401),
9945 SND_PCI_QUIRK(0x1043, 0x1982, "ASUS B1400CEPE", ALC256_FIXUP_ASUS_HPE),
9946 SND_PCI_QUIRK(0x1043, 0x19ce, "ASUS B9450FA", ALC294_FIXUP_ASUS_HPE),
9947 SND_PCI_QUIRK(0x1043, 0x19e1, "ASUS UX581LV", ALC295_FIXUP_ASUS_MIC_NO_PRESENCE),
9948 SND_PCI_QUIRK(0x1043, 0x1a13, "Asus G73Jw", ALC269_FIXUP_ASUS_G73JW),
9949 SND_PCI_QUIRK(0x1043, 0x1a30, "ASUS X705UD", ALC256_FIXUP_ASUS_MIC),
9950 SND_PCI_QUIRK(0x1043, 0x1a63, "ASUS UX3405MA", ALC245_FIXUP_CS35L41_SPI_2),
9951 SND_PCI_QUIRK(0x1043, 0x1a83, "ASUS UM5302LA", ALC294_FIXUP_CS35L41_I2C_2),
9952 SND_PCI_QUIRK(0x1043, 0x1a8f, "ASUS UX582ZS", ALC245_FIXUP_CS35L41_SPI_2),
9953 SND_PCI_QUIRK(0x1043, 0x1b11, "ASUS UX431DA", ALC294_FIXUP_ASUS_COEF_1B),
9954 SND_PCI_QUIRK(0x1043, 0x1b13, "Asus U41SV", ALC269_FIXUP_INV_DMIC),
9955 SND_PCI_QUIRK(0x1043, 0x1b93, "ASUS G614JVR/JIR", ALC245_FIXUP_CS35L41_SPI_2),
9956 SND_PCI_QUIRK(0x1043, 0x1bbd, "ASUS Z550MA", ALC255_FIXUP_ASUS_MIC_NO_PRESENCE),
9957 SND_PCI_QUIRK(0x1043, 0x1c03, "ASUS UM3406HA", ALC287_FIXUP_CS35L41_I2C_2),
9958 SND_PCI_QUIRK(0x1043, 0x1c23, "Asus X55U", ALC269_FIXUP_LIMIT_INT_MIC_BOOST),
9959 SND_PCI_QUIRK(0x1043, 0x1c33, "ASUS UX5304MA", ALC245_FIXUP_CS35L41_SPI_2),
9960 SND_PCI_QUIRK(0x1043, 0x1c43, "ASUS UX8406MA", ALC245_FIXUP_CS35L41_SPI_2),
9961 SND_PCI_QUIRK(0x1043, 0x1c62, "ASUS GU603", ALC289_FIXUP_ASUS_GA401),
9962 SND_PCI_QUIRK(0x1043, 0x1c92, "ASUS ROG Strix G15", ALC285_FIXUP_ASUS_G533Z_PINS),
9963 SND_PCI_QUIRK(0x1043, 0x1c9f, "ASUS G614JU/JV/JI", ALC285_FIXUP_ASUS_HEADSET_MIC),
9964 SND_PCI_QUIRK(0x1043, 0x1caf, "ASUS G634JY/JZ/JI/JG", ALC285_FIXUP_ASUS_SPI_REAR_SPEAKERS),
9965 SND_PCI_QUIRK(0x1043, 0x1ccd, "ASUS X555UB", ALC256_FIXUP_ASUS_MIC),
9966 SND_PCI_QUIRK(0x1043, 0x1ccf, "ASUS G814JU/JV/JI", ALC245_FIXUP_CS35L41_SPI_2),
9967 SND_PCI_QUIRK(0x1043, 0x1cdf, "ASUS G814JY/JZ/JG", ALC245_FIXUP_CS35L41_SPI_2),
9968 SND_PCI_QUIRK(0x1043, 0x1cef, "ASUS G834JY/JZ/JI/JG", ALC285_FIXUP_ASUS_HEADSET_MIC),
9969 SND_PCI_QUIRK(0x1043, 0x1d1f, "ASUS G713PI/PU/PV/PVN", ALC287_FIXUP_CS35L41_I2C_2),
9970 SND_PCI_QUIRK(0x1043, 0x1d42, "ASUS Zephyrus G14 2022", ALC289_FIXUP_ASUS_GA401),
9971 SND_PCI_QUIRK(0x1043, 0x1d4e, "ASUS TM420", ALC256_FIXUP_ASUS_HPE),
9972 SND_PCI_QUIRK(0x1043, 0x1da2, "ASUS UP6502ZA/ZD", ALC245_FIXUP_CS35L41_SPI_2),
9973 SND_PCI_QUIRK(0x1043, 0x1e02, "ASUS UX3402ZA", ALC245_FIXUP_CS35L41_SPI_2),
9974 SND_PCI_QUIRK(0x1043, 0x1e11, "ASUS Zephyrus G15", ALC289_FIXUP_ASUS_GA502),
9975 SND_PCI_QUIRK(0x1043, 0x1e12, "ASUS UM3402", ALC287_FIXUP_CS35L41_I2C_2),
9976 SND_PCI_QUIRK(0x1043, 0x1e51, "ASUS Zephyrus M15", ALC294_FIXUP_ASUS_GU502_PINS),
9977 SND_PCI_QUIRK(0x1043, 0x1e5e, "ASUS ROG Strix G513", ALC294_FIXUP_ASUS_G513_PINS),
9978 SND_PCI_QUIRK(0x1043, 0x1e8e, "ASUS Zephyrus G15", ALC289_FIXUP_ASUS_GA401),
9979 SND_PCI_QUIRK(0x1043, 0x1ee2, "ASUS UM6702RA/RC", ALC287_FIXUP_CS35L41_I2C_2),
9980 SND_PCI_QUIRK(0x1043, 0x1c52, "ASUS Zephyrus G15 2022", ALC289_FIXUP_ASUS_GA401),
9981 SND_PCI_QUIRK(0x1043, 0x1f11, "ASUS Zephyrus G14", ALC289_FIXUP_ASUS_GA401),
9982 SND_PCI_QUIRK(0x1043, 0x1f12, "ASUS UM5302", ALC287_FIXUP_CS35L41_I2C_2),
9983 SND_PCI_QUIRK(0x1043, 0x1f1f, "ASUS H7604JI/JV/J3D", ALC245_FIXUP_CS35L41_SPI_2),
9984 SND_PCI_QUIRK(0x1043, 0x1f62, "ASUS UX7602ZM", ALC245_FIXUP_CS35L41_SPI_2),
9985 SND_PCI_QUIRK(0x1043, 0x1f92, "ASUS ROG Flow X16", ALC289_FIXUP_ASUS_GA401),
9986 SND_PCI_QUIRK(0x1043, 0x3030, "ASUS ZN270IE", ALC256_FIXUP_ASUS_AIO_GPIO2),
9987 SND_PCI_QUIRK(0x1043, 0x3a20, "ASUS G614JZR", ALC245_FIXUP_CS35L41_SPI_2),
9988 SND_PCI_QUIRK(0x1043, 0x3a30, "ASUS G814JVR/JIR", ALC245_FIXUP_CS35L41_SPI_2),
9989 SND_PCI_QUIRK(0x1043, 0x3a40, "ASUS G814JZR", ALC245_FIXUP_CS35L41_SPI_2),
9990 SND_PCI_QUIRK(0x1043, 0x3a50, "ASUS G834JYR/JZR", ALC245_FIXUP_CS35L41_SPI_2),
9991 SND_PCI_QUIRK(0x1043, 0x3a60, "ASUS G634JYR/JZR", ALC245_FIXUP_CS35L41_SPI_2),
9992 SND_PCI_QUIRK(0x1043, 0x831a, "ASUS P901", ALC269_FIXUP_STEREO_DMIC),
9993 SND_PCI_QUIRK(0x1043, 0x834a, "ASUS S101", ALC269_FIXUP_STEREO_DMIC),
9994 SND_PCI_QUIRK(0x1043, 0x8398, "ASUS P1005", ALC269_FIXUP_STEREO_DMIC),
9995 SND_PCI_QUIRK(0x1043, 0x83ce, "ASUS P1005", ALC269_FIXUP_STEREO_DMIC),
9996 SND_PCI_QUIRK(0x1043, 0x8516, "ASUS X101CH", ALC269_FIXUP_ASUS_X101),
9997 SND_PCI_QUIRK(0x104d, 0x9073, "Sony VAIO", ALC275_FIXUP_SONY_VAIO_GPIO2),
9998 SND_PCI_QUIRK(0x104d, 0x907b, "Sony VAIO", ALC275_FIXUP_SONY_HWEQ),
9999 SND_PCI_QUIRK(0x104d, 0x9084, "Sony VAIO", ALC275_FIXUP_SONY_HWEQ),
10000 SND_PCI_QUIRK(0x104d, 0x9099, "Sony VAIO S13", ALC275_FIXUP_SONY_DISABLE_AAMIX),
10001 SND_PCI_QUIRK(0x104d, 0x90b5, "Sony VAIO Pro 11", ALC286_FIXUP_SONY_MIC_NO_PRESENCE),
10002 SND_PCI_QUIRK(0x104d, 0x90b6, "Sony VAIO Pro 13", ALC286_FIXUP_SONY_MIC_NO_PRESENCE),
10003 SND_PCI_QUIRK(0x10cf, 0x1475, "Lifebook", ALC269_FIXUP_LIFEBOOK),
10004 SND_PCI_QUIRK(0x10cf, 0x159f, "Lifebook E780", ALC269_FIXUP_LIFEBOOK_NO_HP_TO_LINEOUT),
10005 SND_PCI_QUIRK(0x10cf, 0x15dc, "Lifebook T731", ALC269_FIXUP_LIFEBOOK_HP_PIN),
10006 SND_PCI_QUIRK(0x10cf, 0x1629, "Lifebook U7x7", ALC255_FIXUP_LIFEBOOK_U7x7_HEADSET_MIC),
10007 SND_PCI_QUIRK(0x10cf, 0x1757, "Lifebook E752", ALC269_FIXUP_LIFEBOOK_HP_PIN),
10008 SND_PCI_QUIRK(0x10cf, 0x1845, "Lifebook U904", ALC269_FIXUP_LIFEBOOK_EXTMIC),
10009 SND_PCI_QUIRK(0x10ec, 0x10f2, "Intel Reference board", ALC700_FIXUP_INTEL_REFERENCE),
10010 SND_PCI_QUIRK(0x10ec, 0x118c, "Medion EE4254 MD62100", ALC256_FIXUP_MEDION_HEADSET_NO_PRESENCE),
10011 SND_PCI_QUIRK(0x10ec, 0x1230, "Intel Reference board", ALC295_FIXUP_CHROME_BOOK),
10012 SND_PCI_QUIRK(0x10ec, 0x124c, "Intel Reference board", ALC295_FIXUP_CHROME_BOOK),
10013 SND_PCI_QUIRK(0x10ec, 0x1252, "Intel Reference board", ALC295_FIXUP_CHROME_BOOK),
10014 SND_PCI_QUIRK(0x10ec, 0x1254, "Intel Reference board", ALC295_FIXUP_CHROME_BOOK),
10015 SND_PCI_QUIRK(0x10ec, 0x12cc, "Intel Reference board", ALC295_FIXUP_CHROME_BOOK),
10016 SND_PCI_QUIRK(0x10ec, 0x12f6, "Intel Reference board", ALC295_FIXUP_CHROME_BOOK),
10017 SND_PCI_QUIRK(0x10f7, 0x8338, "Panasonic CF-SZ6", ALC269_FIXUP_HEADSET_MODE),
10018 SND_PCI_QUIRK(0x144d, 0xc109, "Samsung Ativ book 9 (NP900X3G)", ALC269_FIXUP_INV_DMIC),
10019 SND_PCI_QUIRK(0x144d, 0xc169, "Samsung Notebook 9 Pen (NP930SBE-K01US)", ALC298_FIXUP_SAMSUNG_AMP),
10020 SND_PCI_QUIRK(0x144d, 0xc176, "Samsung Notebook 9 Pro (NP930MBE-K04US)", ALC298_FIXUP_SAMSUNG_AMP),
10021 SND_PCI_QUIRK(0x144d, 0xc189, "Samsung Galaxy Flex Book (NT950QCG-X716)", ALC298_FIXUP_SAMSUNG_AMP),
10022 SND_PCI_QUIRK(0x144d, 0xc18a, "Samsung Galaxy Book Ion (NP930XCJ-K01US)", ALC298_FIXUP_SAMSUNG_AMP),
10023 SND_PCI_QUIRK(0x144d, 0xc1a3, "Samsung Galaxy Book Pro (NP935XDB-KC1SE)", ALC298_FIXUP_SAMSUNG_AMP),
10024 SND_PCI_QUIRK(0x144d, 0xc1a6, "Samsung Galaxy Book Pro 360 (NP930QBD)", ALC298_FIXUP_SAMSUNG_AMP),
10025 SND_PCI_QUIRK(0x144d, 0xc740, "Samsung Ativ book 8 (NP870Z5G)", ALC269_FIXUP_ATIV_BOOK_8),
10026 SND_PCI_QUIRK(0x144d, 0xc812, "Samsung Notebook Pen S (NT950SBE-X58)", ALC298_FIXUP_SAMSUNG_AMP),
10027 SND_PCI_QUIRK(0x144d, 0xc830, "Samsung Galaxy Book Ion (NT950XCJ-X716A)", ALC298_FIXUP_SAMSUNG_AMP),
10028 SND_PCI_QUIRK(0x144d, 0xc832, "Samsung Galaxy Book Flex Alpha (NP730QCJ)", ALC256_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET),
10029 SND_PCI_QUIRK(0x144d, 0xca03, "Samsung Galaxy Book2 Pro 360 (NP930QED)", ALC298_FIXUP_SAMSUNG_AMP),
10030 SND_PCI_QUIRK(0x144d, 0xc868, "Samsung Galaxy Book2 Pro (NP930XED)", ALC298_FIXUP_SAMSUNG_AMP),
10031 SND_PCI_QUIRK(0x1458, 0xfa53, "Gigabyte BXBT-2807", ALC283_FIXUP_HEADSET_MIC),
10032 SND_PCI_QUIRK(0x1462, 0xb120, "MSI Cubi MS-B120", ALC283_FIXUP_HEADSET_MIC),
10033 SND_PCI_QUIRK(0x1462, 0xb171, "Cubi N 8GL (MS-B171)", ALC283_FIXUP_HEADSET_MIC),
10034 SND_PCI_QUIRK(0x152d, 0x1082, "Quanta NL3", ALC269_FIXUP_LIFEBOOK),
10035 SND_PCI_QUIRK(0x1558, 0x1323, "Clevo N130ZU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
10036 SND_PCI_QUIRK(0x1558, 0x1325, "Clevo N15[01][CW]U", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
10037 SND_PCI_QUIRK(0x1558, 0x1401, "Clevo L140[CZ]U", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
10038 SND_PCI_QUIRK(0x1558, 0x1403, "Clevo N140CU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
10039 SND_PCI_QUIRK(0x1558, 0x1404, "Clevo N150CU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
10040 SND_PCI_QUIRK(0x1558, 0x14a1, "Clevo L141MU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
10041 SND_PCI_QUIRK(0x1558, 0x4018, "Clevo NV40M[BE]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
10042 SND_PCI_QUIRK(0x1558, 0x4019, "Clevo NV40MZ", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
10043 SND_PCI_QUIRK(0x1558, 0x4020, "Clevo NV40MB", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
10044 SND_PCI_QUIRK(0x1558, 0x4041, "Clevo NV4[15]PZ", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
10045 SND_PCI_QUIRK(0x1558, 0x40a1, "Clevo NL40GU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
10046 SND_PCI_QUIRK(0x1558, 0x40c1, "Clevo NL40[CZ]U", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
10047 SND_PCI_QUIRK(0x1558, 0x40d1, "Clevo NL41DU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
10048 SND_PCI_QUIRK(0x1558, 0x5015, "Clevo NH5[58]H[HJK]Q", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
10049 SND_PCI_QUIRK(0x1558, 0x5017, "Clevo NH7[79]H[HJK]Q", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
10050 SND_PCI_QUIRK(0x1558, 0x50a3, "Clevo NJ51GU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
10051 SND_PCI_QUIRK(0x1558, 0x50b3, "Clevo NK50S[BEZ]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
10052 SND_PCI_QUIRK(0x1558, 0x50b6, "Clevo NK50S5", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
10053 SND_PCI_QUIRK(0x1558, 0x50b8, "Clevo NK50SZ", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
10054 SND_PCI_QUIRK(0x1558, 0x50d5, "Clevo NP50D5", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
10055 SND_PCI_QUIRK(0x1558, 0x50e1, "Clevo NH5[58]HPQ", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
10056 SND_PCI_QUIRK(0x1558, 0x50e2, "Clevo NH7[79]HPQ", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
10057 SND_PCI_QUIRK(0x1558, 0x50f0, "Clevo NH50A[CDF]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
10058 SND_PCI_QUIRK(0x1558, 0x50f2, "Clevo NH50E[PR]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
10059 SND_PCI_QUIRK(0x1558, 0x50f3, "Clevo NH58DPQ", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
10060 SND_PCI_QUIRK(0x1558, 0x50f5, "Clevo NH55EPY", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
10061 SND_PCI_QUIRK(0x1558, 0x50f6, "Clevo NH55DPQ", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
10062 SND_PCI_QUIRK(0x1558, 0x5101, "Clevo S510WU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
10063 SND_PCI_QUIRK(0x1558, 0x5157, "Clevo W517GU1", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
10064 SND_PCI_QUIRK(0x1558, 0x51a1, "Clevo NS50MU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
10065 SND_PCI_QUIRK(0x1558, 0x51b1, "Clevo NS50AU", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
10066 SND_PCI_QUIRK(0x1558, 0x51b3, "Clevo NS70AU", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
10067 SND_PCI_QUIRK(0x1558, 0x5630, "Clevo NP50RNJS", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
10068 SND_PCI_QUIRK(0x1558, 0x70a1, "Clevo NB70T[HJK]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
10069 SND_PCI_QUIRK(0x1558, 0x70b3, "Clevo NK70SB", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
10070 SND_PCI_QUIRK(0x1558, 0x70f2, "Clevo NH79EPY", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
10071 SND_PCI_QUIRK(0x1558, 0x70f3, "Clevo NH77DPQ", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
10072 SND_PCI_QUIRK(0x1558, 0x70f4, "Clevo NH77EPY", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
10073 SND_PCI_QUIRK(0x1558, 0x70f6, "Clevo NH77DPQ-Y", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
10074 SND_PCI_QUIRK(0x1558, 0x7716, "Clevo NS50PU", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
10075 SND_PCI_QUIRK(0x1558, 0x7717, "Clevo NS70PU", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
10076 SND_PCI_QUIRK(0x1558, 0x7718, "Clevo L140PU", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
10077 SND_PCI_QUIRK(0x1558, 0x7724, "Clevo L140AU", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
10078 SND_PCI_QUIRK(0x1558, 0x8228, "Clevo NR40BU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
10079 SND_PCI_QUIRK(0x1558, 0x8520, "Clevo NH50D[CD]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
10080 SND_PCI_QUIRK(0x1558, 0x8521, "Clevo NH77D[CD]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
10081 SND_PCI_QUIRK(0x1558, 0x8535, "Clevo NH50D[BE]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
10082 SND_PCI_QUIRK(0x1558, 0x8536, "Clevo NH79D[BE]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
10083 SND_PCI_QUIRK(0x1558, 0x8550, "Clevo NH[57][0-9][ER][ACDH]Q", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
10084 SND_PCI_QUIRK(0x1558, 0x8551, "Clevo NH[57][0-9][ER][ACDH]Q", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
10085 SND_PCI_QUIRK(0x1558, 0x8560, "Clevo NH[57][0-9][ER][ACDH]Q", ALC269_FIXUP_HEADSET_MIC),
10086 SND_PCI_QUIRK(0x1558, 0x8561, "Clevo NH[57][0-9][ER][ACDH]Q", ALC269_FIXUP_HEADSET_MIC),
10087 SND_PCI_QUIRK(0x1558, 0x8562, "Clevo NH[57][0-9]RZ[Q]", ALC269_FIXUP_DMIC),
10088 SND_PCI_QUIRK(0x1558, 0x8668, "Clevo NP50B[BE]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
10089 SND_PCI_QUIRK(0x1558, 0x866d, "Clevo NP5[05]PN[HJK]", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
10090 SND_PCI_QUIRK(0x1558, 0x867c, "Clevo NP7[01]PNP", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
10091 SND_PCI_QUIRK(0x1558, 0x867d, "Clevo NP7[01]PN[HJK]", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
10092 SND_PCI_QUIRK(0x1558, 0x8680, "Clevo NJ50LU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
10093 SND_PCI_QUIRK(0x1558, 0x8686, "Clevo NH50[CZ]U", ALC256_FIXUP_MIC_NO_PRESENCE_AND_RESUME),
10094 SND_PCI_QUIRK(0x1558, 0x8a20, "Clevo NH55DCQ-Y", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
10095 SND_PCI_QUIRK(0x1558, 0x8a51, "Clevo NH70RCQ-Y", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
10096 SND_PCI_QUIRK(0x1558, 0x8d50, "Clevo NH55RCQ-M", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
10097 SND_PCI_QUIRK(0x1558, 0x951d, "Clevo N950T[CDF]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
10098 SND_PCI_QUIRK(0x1558, 0x9600, "Clevo N960K[PR]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
10099 SND_PCI_QUIRK(0x1558, 0x961d, "Clevo N960S[CDF]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
10100 SND_PCI_QUIRK(0x1558, 0x971d, "Clevo N970T[CDF]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
10101 SND_PCI_QUIRK(0x1558, 0xa500, "Clevo NL5[03]RU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
10102 SND_PCI_QUIRK(0x1558, 0xa600, "Clevo NL50NU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
10103 SND_PCI_QUIRK(0x1558, 0xa650, "Clevo NP[567]0SN[CD]", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
10104 SND_PCI_QUIRK(0x1558, 0xa671, "Clevo NP70SN[CDE]", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
10105 SND_PCI_QUIRK(0x1558, 0xb018, "Clevo NP50D[BE]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
10106 SND_PCI_QUIRK(0x1558, 0xb019, "Clevo NH77D[BE]Q", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
10107 SND_PCI_QUIRK(0x1558, 0xb022, "Clevo NH77D[DC][QW]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
10108 SND_PCI_QUIRK(0x1558, 0xc018, "Clevo NP50D[BE]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
10109 SND_PCI_QUIRK(0x1558, 0xc019, "Clevo NH77D[BE]Q", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
10110 SND_PCI_QUIRK(0x1558, 0xc022, "Clevo NH77[DC][QW]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
10111 SND_PCI_QUIRK(0x17aa, 0x1036, "Lenovo P520", ALC233_FIXUP_LENOVO_MULTI_CODECS),
10112 SND_PCI_QUIRK(0x17aa, 0x1048, "ThinkCentre Station", ALC623_FIXUP_LENOVO_THINKSTATION_P340),
10113 SND_PCI_QUIRK(0x17aa, 0x20f2, "Thinkpad SL410/510", ALC269_FIXUP_SKU_IGNORE),
10114 SND_PCI_QUIRK(0x17aa, 0x215e, "Thinkpad L512", ALC269_FIXUP_SKU_IGNORE),
10115 SND_PCI_QUIRK(0x17aa, 0x21b8, "Thinkpad Edge 14", ALC269_FIXUP_SKU_IGNORE),
10116 SND_PCI_QUIRK(0x17aa, 0x21ca, "Thinkpad L412", ALC269_FIXUP_SKU_IGNORE),
10117 SND_PCI_QUIRK(0x17aa, 0x21e9, "Thinkpad Edge 15", ALC269_FIXUP_SKU_IGNORE),
10118 SND_PCI_QUIRK(0x17aa, 0x21f3, "Thinkpad T430", ALC269_FIXUP_LENOVO_DOCK),
10119 SND_PCI_QUIRK(0x17aa, 0x21f6, "Thinkpad T530", ALC269_FIXUP_LENOVO_DOCK_LIMIT_BOOST),
10120 SND_PCI_QUIRK(0x17aa, 0x21fa, "Thinkpad X230", ALC269_FIXUP_LENOVO_DOCK),
10121 SND_PCI_QUIRK(0x17aa, 0x21fb, "Thinkpad T430s", ALC269_FIXUP_LENOVO_DOCK),
10122 SND_PCI_QUIRK(0x17aa, 0x2203, "Thinkpad X230 Tablet", ALC269_FIXUP_LENOVO_DOCK),
10123 SND_PCI_QUIRK(0x17aa, 0x2208, "Thinkpad T431s", ALC269_FIXUP_LENOVO_DOCK),
10124 SND_PCI_QUIRK(0x17aa, 0x220c, "Thinkpad T440s", ALC292_FIXUP_TPT440),
10125 SND_PCI_QUIRK(0x17aa, 0x220e, "Thinkpad T440p", ALC292_FIXUP_TPT440_DOCK),
10126 SND_PCI_QUIRK(0x17aa, 0x2210, "Thinkpad T540p", ALC292_FIXUP_TPT440_DOCK),
10127 SND_PCI_QUIRK(0x17aa, 0x2211, "Thinkpad W541", ALC292_FIXUP_TPT440_DOCK),
10128 SND_PCI_QUIRK(0x17aa, 0x2212, "Thinkpad T440", ALC292_FIXUP_TPT440_DOCK),
10129 SND_PCI_QUIRK(0x17aa, 0x2214, "Thinkpad X240", ALC292_FIXUP_TPT440_DOCK),
10130 SND_PCI_QUIRK(0x17aa, 0x2215, "Thinkpad", ALC269_FIXUP_LIMIT_INT_MIC_BOOST),
10131 SND_PCI_QUIRK(0x17aa, 0x2218, "Thinkpad X1 Carbon 2nd", ALC292_FIXUP_TPT440_DOCK),
10132 SND_PCI_QUIRK(0x17aa, 0x2223, "ThinkPad T550", ALC292_FIXUP_TPT440_DOCK),
10133 SND_PCI_QUIRK(0x17aa, 0x2226, "ThinkPad X250", ALC292_FIXUP_TPT440_DOCK),
10134 SND_PCI_QUIRK(0x17aa, 0x222d, "Thinkpad", ALC298_FIXUP_TPT470_DOCK),
10135 SND_PCI_QUIRK(0x17aa, 0x222e, "Thinkpad", ALC298_FIXUP_TPT470_DOCK),
10136 SND_PCI_QUIRK(0x17aa, 0x2231, "Thinkpad T560", ALC292_FIXUP_TPT460),
10137 SND_PCI_QUIRK(0x17aa, 0x2233, "Thinkpad", ALC292_FIXUP_TPT460),
10138 SND_PCI_QUIRK(0x17aa, 0x2245, "Thinkpad T470", ALC298_FIXUP_TPT470_DOCK),
10139 SND_PCI_QUIRK(0x17aa, 0x2246, "Thinkpad", ALC298_FIXUP_TPT470_DOCK),
10140 SND_PCI_QUIRK(0x17aa, 0x2247, "Thinkpad", ALC298_FIXUP_TPT470_DOCK),
10141 SND_PCI_QUIRK(0x17aa, 0x2249, "Thinkpad", ALC292_FIXUP_TPT460),
10142 SND_PCI_QUIRK(0x17aa, 0x224b, "Thinkpad", ALC298_FIXUP_TPT470_DOCK),
10143 SND_PCI_QUIRK(0x17aa, 0x224c, "Thinkpad", ALC298_FIXUP_TPT470_DOCK),
10144 SND_PCI_QUIRK(0x17aa, 0x224d, "Thinkpad", ALC298_FIXUP_TPT470_DOCK),
10145 SND_PCI_QUIRK(0x17aa, 0x225d, "Thinkpad T480", ALC269_FIXUP_LIMIT_INT_MIC_BOOST),
10146 SND_PCI_QUIRK(0x17aa, 0x2292, "Thinkpad X1 Carbon 7th", ALC285_FIXUP_THINKPAD_HEADSET_JACK),
10147 SND_PCI_QUIRK(0x17aa, 0x22be, "Thinkpad X1 Carbon 8th", ALC285_FIXUP_THINKPAD_HEADSET_JACK),
10148 SND_PCI_QUIRK(0x17aa, 0x22c1, "Thinkpad P1 Gen 3", ALC285_FIXUP_THINKPAD_NO_BASS_SPK_HEADSET_JACK),
10149 SND_PCI_QUIRK(0x17aa, 0x22c2, "Thinkpad X1 Extreme Gen 3", ALC285_FIXUP_THINKPAD_NO_BASS_SPK_HEADSET_JACK),
10150 SND_PCI_QUIRK(0x17aa, 0x22f1, "Thinkpad", ALC287_FIXUP_MG_RTKC_CSAMP_CS35L41_I2C_THINKPAD),
10151 SND_PCI_QUIRK(0x17aa, 0x22f2, "Thinkpad", ALC287_FIXUP_MG_RTKC_CSAMP_CS35L41_I2C_THINKPAD),
10152 SND_PCI_QUIRK(0x17aa, 0x22f3, "Thinkpad", ALC287_FIXUP_MG_RTKC_CSAMP_CS35L41_I2C_THINKPAD),
10153 SND_PCI_QUIRK(0x17aa, 0x2316, "Thinkpad P1 Gen 6", ALC287_FIXUP_MG_RTKC_CSAMP_CS35L41_I2C_THINKPAD),
10154 SND_PCI_QUIRK(0x17aa, 0x2317, "Thinkpad P1 Gen 6", ALC287_FIXUP_MG_RTKC_CSAMP_CS35L41_I2C_THINKPAD),
10155 SND_PCI_QUIRK(0x17aa, 0x2318, "Thinkpad Z13 Gen2", ALC287_FIXUP_MG_RTKC_CSAMP_CS35L41_I2C_THINKPAD),
10156 SND_PCI_QUIRK(0x17aa, 0x2319, "Thinkpad Z16 Gen2", ALC287_FIXUP_MG_RTKC_CSAMP_CS35L41_I2C_THINKPAD),
10157 SND_PCI_QUIRK(0x17aa, 0x231a, "Thinkpad Z16 Gen2", ALC287_FIXUP_MG_RTKC_CSAMP_CS35L41_I2C_THINKPAD),
10158 SND_PCI_QUIRK(0x17aa, 0x30bb, "ThinkCentre AIO", ALC233_FIXUP_LENOVO_LINE2_MIC_HOTKEY),
10159 SND_PCI_QUIRK(0x17aa, 0x30e2, "ThinkCentre AIO", ALC233_FIXUP_LENOVO_LINE2_MIC_HOTKEY),
10160 SND_PCI_QUIRK(0x17aa, 0x310c, "ThinkCentre Station", ALC294_FIXUP_LENOVO_MIC_LOCATION),
10161 SND_PCI_QUIRK(0x17aa, 0x3111, "ThinkCentre Station", ALC294_FIXUP_LENOVO_MIC_LOCATION),
10162 SND_PCI_QUIRK(0x17aa, 0x312a, "ThinkCentre Station", ALC294_FIXUP_LENOVO_MIC_LOCATION),
10163 SND_PCI_QUIRK(0x17aa, 0x312f, "ThinkCentre Station", ALC294_FIXUP_LENOVO_MIC_LOCATION),
10164 SND_PCI_QUIRK(0x17aa, 0x313c, "ThinkCentre Station", ALC294_FIXUP_LENOVO_MIC_LOCATION),
10165 SND_PCI_QUIRK(0x17aa, 0x3151, "ThinkCentre Station", ALC283_FIXUP_HEADSET_MIC),
10166 SND_PCI_QUIRK(0x17aa, 0x3176, "ThinkCentre Station", ALC283_FIXUP_HEADSET_MIC),
10167 SND_PCI_QUIRK(0x17aa, 0x3178, "ThinkCentre Station", ALC283_FIXUP_HEADSET_MIC),
10168 SND_PCI_QUIRK(0x17aa, 0x31af, "ThinkCentre Station", ALC623_FIXUP_LENOVO_THINKSTATION_P340),
10169 SND_PCI_QUIRK(0x17aa, 0x334b, "Lenovo ThinkCentre M70 Gen5", ALC283_FIXUP_HEADSET_MIC),
10170 SND_PCI_QUIRK(0x17aa, 0x3801, "Lenovo Yoga9 14IAP7", ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK_PIN),
10171 SND_PCI_QUIRK(0x17aa, 0x3802, "Lenovo Yoga Pro 9 14IRP8 / DuetITL 2021", ALC287_FIXUP_LENOVO_14IRP8_DUETITL),
10172 SND_PCI_QUIRK(0x17aa, 0x3813, "Legion 7i 15IMHG05", ALC287_FIXUP_LEGION_15IMHG05_SPEAKERS),
10173 SND_PCI_QUIRK(0x17aa, 0x3818, "Lenovo C940 / Yoga Duet 7", ALC298_FIXUP_LENOVO_C940_DUET7),
10174 SND_PCI_QUIRK(0x17aa, 0x3819, "Lenovo 13s Gen2 ITL", ALC287_FIXUP_13S_GEN2_SPEAKERS),
10175 SND_PCI_QUIRK(0x17aa, 0x3820, "Yoga Duet 7 13ITL6", ALC287_FIXUP_YOGA7_14ITL_SPEAKERS),
10176 SND_PCI_QUIRK(0x17aa, 0x3824, "Legion Y9000X 2020", ALC285_FIXUP_LEGION_Y9000X_SPEAKERS),
10177 SND_PCI_QUIRK(0x17aa, 0x3827, "Ideapad S740", ALC285_FIXUP_IDEAPAD_S740_COEF),
10178 SND_PCI_QUIRK(0x17aa, 0x3834, "Lenovo IdeaPad Slim 9i 14ITL5", ALC287_FIXUP_YOGA7_14ITL_SPEAKERS),
10179 SND_PCI_QUIRK(0x17aa, 0x383d, "Legion Y9000X 2019", ALC285_FIXUP_LEGION_Y9000X_SPEAKERS),
10180 SND_PCI_QUIRK(0x17aa, 0x3843, "Yoga 9i", ALC287_FIXUP_IDEAPAD_BASS_SPK_AMP),
10181 SND_PCI_QUIRK(0x17aa, 0x3847, "Legion 7 16ACHG6", ALC287_FIXUP_LEGION_16ACHG6),
10182 SND_PCI_QUIRK(0x17aa, 0x384a, "Lenovo Yoga 7 15ITL5", ALC287_FIXUP_YOGA7_14ITL_SPEAKERS),
10183 SND_PCI_QUIRK(0x17aa, 0x3852, "Lenovo Yoga 7 14ITL5", ALC287_FIXUP_YOGA7_14ITL_SPEAKERS),
10184 SND_PCI_QUIRK(0x17aa, 0x3853, "Lenovo Yoga 7 15ITL5", ALC287_FIXUP_YOGA7_14ITL_SPEAKERS),
10185 SND_PCI_QUIRK(0x17aa, 0x3855, "Legion 7 16ITHG6", ALC287_FIXUP_LEGION_16ITHG6),
10186 SND_PCI_QUIRK(0x17aa, 0x3869, "Lenovo Yoga7 14IAL7", ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK_PIN),
10187 SND_PCI_QUIRK(0x17aa, 0x386f, "Legion 7i 16IAX7", ALC287_FIXUP_CS35L41_I2C_2),
10188 SND_PCI_QUIRK(0x17aa, 0x3870, "Lenovo Yoga 7 14ARB7", ALC287_FIXUP_YOGA7_14ARB7_I2C),
10189 SND_PCI_QUIRK(0x17aa, 0x387d, "Yoga S780-16 pro Quad AAC", ALC287_FIXUP_TAS2781_I2C),
10190 SND_PCI_QUIRK(0x17aa, 0x387e, "Yoga S780-16 pro Quad YC", ALC287_FIXUP_TAS2781_I2C),
10191 SND_PCI_QUIRK(0x17aa, 0x3881, "YB9 dual power mode2 YC", ALC287_FIXUP_TAS2781_I2C),
10192 SND_PCI_QUIRK(0x17aa, 0x3882, "Lenovo Yoga Pro 7 14APH8", ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK_PIN),
10193 SND_PCI_QUIRK(0x17aa, 0x3884, "Y780 YG DUAL", ALC287_FIXUP_TAS2781_I2C),
10194 SND_PCI_QUIRK(0x17aa, 0x3886, "Y780 VECO DUAL", ALC287_FIXUP_TAS2781_I2C),
10195 SND_PCI_QUIRK(0x17aa, 0x38a7, "Y780P AMD YG dual", ALC287_FIXUP_TAS2781_I2C),
10196 SND_PCI_QUIRK(0x17aa, 0x38a8, "Y780P AMD VECO dual", ALC287_FIXUP_TAS2781_I2C),
10197 SND_PCI_QUIRK(0x17aa, 0x38a9, "Thinkbook 16P", ALC287_FIXUP_CS35L41_I2C_2),
10198 SND_PCI_QUIRK(0x17aa, 0x38ab, "Thinkbook 16P", ALC287_FIXUP_CS35L41_I2C_2),
10199 SND_PCI_QUIRK(0x17aa, 0x38b4, "Legion Slim 7 16IRH8", ALC287_FIXUP_CS35L41_I2C_2),
10200 SND_PCI_QUIRK(0x17aa, 0x38b5, "Legion Slim 7 16IRH8", ALC287_FIXUP_CS35L41_I2C_2),
10201 SND_PCI_QUIRK(0x17aa, 0x38b6, "Legion Slim 7 16APH8", ALC287_FIXUP_CS35L41_I2C_2),
10202 SND_PCI_QUIRK(0x17aa, 0x38b7, "Legion Slim 7 16APH8", ALC287_FIXUP_CS35L41_I2C_2),
10203 SND_PCI_QUIRK(0x17aa, 0x38ba, "Yoga S780-14.5 Air AMD quad YC", ALC287_FIXUP_TAS2781_I2C),
10204 SND_PCI_QUIRK(0x17aa, 0x38bb, "Yoga S780-14.5 Air AMD quad AAC", ALC287_FIXUP_TAS2781_I2C),
10205 SND_PCI_QUIRK(0x17aa, 0x38be, "Yoga S980-14.5 proX YC Dual", ALC287_FIXUP_TAS2781_I2C),
10206 SND_PCI_QUIRK(0x17aa, 0x38bf, "Yoga S980-14.5 proX LX Dual", ALC287_FIXUP_TAS2781_I2C),
10207 SND_PCI_QUIRK(0x17aa, 0x38c3, "Y980 DUAL", ALC287_FIXUP_TAS2781_I2C),
10208 SND_PCI_QUIRK(0x17aa, 0x38cb, "Y790 YG DUAL", ALC287_FIXUP_TAS2781_I2C),
10209 SND_PCI_QUIRK(0x17aa, 0x38cd, "Y790 VECO DUAL", ALC287_FIXUP_TAS2781_I2C),
10210 SND_PCI_QUIRK(0x17aa, 0x3902, "Lenovo E50-80", ALC269_FIXUP_DMIC_THINKPAD_ACPI),
10211 SND_PCI_QUIRK(0x17aa, 0x3977, "IdeaPad S210", ALC283_FIXUP_INT_MIC),
10212 SND_PCI_QUIRK(0x17aa, 0x3978, "Lenovo B50-70", ALC269_FIXUP_DMIC_THINKPAD_ACPI),
10213 SND_PCI_QUIRK(0x17aa, 0x3bf8, "Quanta FL1", ALC269_FIXUP_PCM_44K),
10214 SND_PCI_QUIRK(0x17aa, 0x5013, "Thinkpad", ALC269_FIXUP_LIMIT_INT_MIC_BOOST),
10215 SND_PCI_QUIRK(0x17aa, 0x501a, "Thinkpad", ALC283_FIXUP_INT_MIC),
10216 SND_PCI_QUIRK(0x17aa, 0x501e, "Thinkpad L440", ALC292_FIXUP_TPT440_DOCK),
10217 SND_PCI_QUIRK(0x17aa, 0x5026, "Thinkpad", ALC269_FIXUP_LIMIT_INT_MIC_BOOST),
10218 SND_PCI_QUIRK(0x17aa, 0x5034, "Thinkpad T450", ALC292_FIXUP_TPT440_DOCK),
10219 SND_PCI_QUIRK(0x17aa, 0x5036, "Thinkpad T450s", ALC292_FIXUP_TPT440_DOCK),
10220 SND_PCI_QUIRK(0x17aa, 0x503c, "Thinkpad L450", ALC292_FIXUP_TPT440_DOCK),
10221 SND_PCI_QUIRK(0x17aa, 0x504a, "ThinkPad X260", ALC292_FIXUP_TPT440_DOCK),
10222 SND_PCI_QUIRK(0x17aa, 0x504b, "Thinkpad", ALC293_FIXUP_LENOVO_SPK_NOISE),
10223 SND_PCI_QUIRK(0x17aa, 0x5050, "Thinkpad T560p", ALC292_FIXUP_TPT460),
10224 SND_PCI_QUIRK(0x17aa, 0x5051, "Thinkpad L460", ALC292_FIXUP_TPT460),
10225 SND_PCI_QUIRK(0x17aa, 0x5053, "Thinkpad T460", ALC292_FIXUP_TPT460),
10226 SND_PCI_QUIRK(0x17aa, 0x505d, "Thinkpad", ALC298_FIXUP_TPT470_DOCK),
10227 SND_PCI_QUIRK(0x17aa, 0x505f, "Thinkpad", ALC298_FIXUP_TPT470_DOCK),
10228 SND_PCI_QUIRK(0x17aa, 0x5062, "Thinkpad", ALC298_FIXUP_TPT470_DOCK),
10229 SND_PCI_QUIRK(0x17aa, 0x508b, "Thinkpad X12 Gen 1", ALC287_FIXUP_LEGION_15IMHG05_SPEAKERS),
10230 SND_PCI_QUIRK(0x17aa, 0x5109, "Thinkpad", ALC269_FIXUP_LIMIT_INT_MIC_BOOST),
10231 SND_PCI_QUIRK(0x17aa, 0x511e, "Thinkpad", ALC298_FIXUP_TPT470_DOCK),
10232 SND_PCI_QUIRK(0x17aa, 0x511f, "Thinkpad", ALC298_FIXUP_TPT470_DOCK),
10233 SND_PCI_QUIRK(0x17aa, 0x9e54, "LENOVO NB", ALC269_FIXUP_LENOVO_EAPD),
10234 SND_PCI_QUIRK(0x17aa, 0x9e56, "Lenovo ZhaoYang CF4620Z", ALC286_FIXUP_SONY_MIC_NO_PRESENCE),
10235 SND_PCI_QUIRK(0x1849, 0x1233, "ASRock NUC Box 1100", ALC233_FIXUP_NO_AUDIO_JACK),
10236 SND_PCI_QUIRK(0x1849, 0xa233, "Positivo Master C6300", ALC269_FIXUP_HEADSET_MIC),
10237 SND_PCI_QUIRK(0x19e5, 0x3204, "Huawei MACH-WX9", ALC256_FIXUP_HUAWEI_MACH_WX9_PINS),
10238 SND_PCI_QUIRK(0x19e5, 0x320f, "Huawei WRT-WX9 ", ALC256_FIXUP_ASUS_MIC_NO_PRESENCE),
10239 SND_PCI_QUIRK(0x1b35, 0x1235, "CZC B20", ALC269_FIXUP_CZC_B20),
10240 SND_PCI_QUIRK(0x1b35, 0x1236, "CZC TMI", ALC269_FIXUP_CZC_TMI),
10241 SND_PCI_QUIRK(0x1b35, 0x1237, "CZC L101", ALC269_FIXUP_CZC_L101),
10242 SND_PCI_QUIRK(0x1b7d, 0xa831, "Ordissimo EVE2 ", ALC269VB_FIXUP_ORDISSIMO_EVE2), /* Also known as Malata PC-B1303 */
10243 SND_PCI_QUIRK(0x1c06, 0x2013, "Lemote A1802", ALC269_FIXUP_LEMOTE_A1802),
10244 SND_PCI_QUIRK(0x1c06, 0x2015, "Lemote A190X", ALC269_FIXUP_LEMOTE_A190X),
10245 SND_PCI_QUIRK(0x1c6c, 0x1251, "Positivo N14KP6-TG", ALC288_FIXUP_DELL1_MIC_NO_PRESENCE),
10246 SND_PCI_QUIRK(0x1d05, 0x1132, "TongFang PHxTxX1", ALC256_FIXUP_SET_COEF_DEFAULTS),
10247 SND_PCI_QUIRK(0x1d05, 0x1096, "TongFang GMxMRxx", ALC269_FIXUP_NO_SHUTUP),
10248 SND_PCI_QUIRK(0x1d05, 0x1100, "TongFang GKxNRxx", ALC269_FIXUP_NO_SHUTUP),
10249 SND_PCI_QUIRK(0x1d05, 0x1111, "TongFang GMxZGxx", ALC269_FIXUP_NO_SHUTUP),
10250 SND_PCI_QUIRK(0x1d05, 0x1119, "TongFang GMxZGxx", ALC269_FIXUP_NO_SHUTUP),
10251 SND_PCI_QUIRK(0x1d05, 0x1129, "TongFang GMxZGxx", ALC269_FIXUP_NO_SHUTUP),
10252 SND_PCI_QUIRK(0x1d05, 0x1147, "TongFang GMxTGxx", ALC269_FIXUP_NO_SHUTUP),
10253 SND_PCI_QUIRK(0x1d05, 0x115c, "TongFang GMxTGxx", ALC269_FIXUP_NO_SHUTUP),
10254 SND_PCI_QUIRK(0x1d05, 0x121b, "TongFang GMxAGxx", ALC269_FIXUP_NO_SHUTUP),
10255 SND_PCI_QUIRK(0x1d72, 0x1602, "RedmiBook", ALC255_FIXUP_XIAOMI_HEADSET_MIC),
10256 SND_PCI_QUIRK(0x1d72, 0x1701, "XiaomiNotebook Pro", ALC298_FIXUP_DELL1_MIC_NO_PRESENCE),
10257 SND_PCI_QUIRK(0x1d72, 0x1901, "RedmiBook 14", ALC256_FIXUP_ASUS_HEADSET_MIC),
10258 SND_PCI_QUIRK(0x1d72, 0x1945, "Redmi G", ALC256_FIXUP_ASUS_HEADSET_MIC),
10259 SND_PCI_QUIRK(0x1d72, 0x1947, "RedmiBook Air", ALC255_FIXUP_XIAOMI_HEADSET_MIC),
10260 SND_PCI_QUIRK(0x2782, 0x0232, "CHUWI CoreBook XPro", ALC269VB_FIXUP_CHUWI_COREBOOK_XPRO),
10261 SND_PCI_QUIRK(0x2782, 0x1707, "Vaio VJFE-ADL", ALC298_FIXUP_SPK_VOLUME),
10262 SND_PCI_QUIRK(0x8086, 0x2074, "Intel NUC 8", ALC233_FIXUP_INTEL_NUC8_DMIC),
10263 SND_PCI_QUIRK(0x8086, 0x2080, "Intel NUC 8 Rugged", ALC256_FIXUP_INTEL_NUC8_RUGGED),
10264 SND_PCI_QUIRK(0x8086, 0x2081, "Intel NUC 10", ALC256_FIXUP_INTEL_NUC10),
10265 SND_PCI_QUIRK(0x8086, 0x3038, "Intel NUC 13", ALC295_FIXUP_CHROME_BOOK),
10266 SND_PCI_QUIRK(0xf111, 0x0001, "Framework Laptop", ALC295_FIXUP_FRAMEWORK_LAPTOP_MIC_NO_PRESENCE),
10267 SND_PCI_QUIRK(0xf111, 0x0005, "Framework Laptop", ALC295_FIXUP_FRAMEWORK_LAPTOP_MIC_NO_PRESENCE),
10268 SND_PCI_QUIRK(0xf111, 0x0006, "Framework Laptop", ALC295_FIXUP_FRAMEWORK_LAPTOP_MIC_NO_PRESENCE),
10271 /* Below is a quirk table taken from the old code.
10272 * Basically the device should work as is without the fixup table.
10273 * If BIOS doesn't give a proper info, enable the corresponding
10276 SND_PCI_QUIRK(0x1043, 0x8330, "ASUS Eeepc P703 P900A",
10277 ALC269_FIXUP_AMIC),
10278 SND_PCI_QUIRK(0x1043, 0x1013, "ASUS N61Da", ALC269_FIXUP_AMIC),
10279 SND_PCI_QUIRK(0x1043, 0x1143, "ASUS B53f", ALC269_FIXUP_AMIC),
10280 SND_PCI_QUIRK(0x1043, 0x1133, "ASUS UJ20ft", ALC269_FIXUP_AMIC),
10281 SND_PCI_QUIRK(0x1043, 0x1183, "ASUS K72DR", ALC269_FIXUP_AMIC),
10282 SND_PCI_QUIRK(0x1043, 0x11b3, "ASUS K52DR", ALC269_FIXUP_AMIC),
10283 SND_PCI_QUIRK(0x1043, 0x11e3, "ASUS U33Jc", ALC269_FIXUP_AMIC),
10284 SND_PCI_QUIRK(0x1043, 0x1273, "ASUS UL80Jt", ALC269_FIXUP_AMIC),
10285 SND_PCI_QUIRK(0x1043, 0x1283, "ASUS U53Jc", ALC269_FIXUP_AMIC),
10286 SND_PCI_QUIRK(0x1043, 0x12b3, "ASUS N82JV", ALC269_FIXUP_AMIC),
10287 SND_PCI_QUIRK(0x1043, 0x12d3, "ASUS N61Jv", ALC269_FIXUP_AMIC),
10288 SND_PCI_QUIRK(0x1043, 0x13a3, "ASUS UL30Vt", ALC269_FIXUP_AMIC),
10289 SND_PCI_QUIRK(0x1043, 0x1373, "ASUS G73JX", ALC269_FIXUP_AMIC),
10290 SND_PCI_QUIRK(0x1043, 0x1383, "ASUS UJ30Jc", ALC269_FIXUP_AMIC),
10291 SND_PCI_QUIRK(0x1043, 0x13d3, "ASUS N61JA", ALC269_FIXUP_AMIC),
10292 SND_PCI_QUIRK(0x1043, 0x1413, "ASUS UL50", ALC269_FIXUP_AMIC),
10293 SND_PCI_QUIRK(0x1043, 0x1443, "ASUS UL30", ALC269_FIXUP_AMIC),
10294 SND_PCI_QUIRK(0x1043, 0x1453, "ASUS M60Jv", ALC269_FIXUP_AMIC),
10295 SND_PCI_QUIRK(0x1043, 0x1483, "ASUS UL80", ALC269_FIXUP_AMIC),
10296 SND_PCI_QUIRK(0x1043, 0x14f3, "ASUS F83Vf", ALC269_FIXUP_AMIC),
10297 SND_PCI_QUIRK(0x1043, 0x14e3, "ASUS UL20", ALC269_FIXUP_AMIC),
10298 SND_PCI_QUIRK(0x1043, 0x1513, "ASUS UX30", ALC269_FIXUP_AMIC),
10299 SND_PCI_QUIRK(0x1043, 0x1593, "ASUS N51Vn", ALC269_FIXUP_AMIC),
10300 SND_PCI_QUIRK(0x1043, 0x15a3, "ASUS N60Jv", ALC269_FIXUP_AMIC),
10301 SND_PCI_QUIRK(0x1043, 0x15b3, "ASUS N60Dp", ALC269_FIXUP_AMIC),
10302 SND_PCI_QUIRK(0x1043, 0x15c3, "ASUS N70De", ALC269_FIXUP_AMIC),
10303 SND_PCI_QUIRK(0x1043, 0x15e3, "ASUS F83T", ALC269_FIXUP_AMIC),
10304 SND_PCI_QUIRK(0x1043, 0x1643, "ASUS M60J", ALC269_FIXUP_AMIC),
10305 SND_PCI_QUIRK(0x1043, 0x1653, "ASUS U50", ALC269_FIXUP_AMIC),
10306 SND_PCI_QUIRK(0x1043, 0x1693, "ASUS F50N", ALC269_FIXUP_AMIC),
10307 SND_PCI_QUIRK(0x1043, 0x16a3, "ASUS F5Q", ALC269_FIXUP_AMIC),
10308 SND_PCI_QUIRK(0x1043, 0x1723, "ASUS P80", ALC269_FIXUP_AMIC),
10309 SND_PCI_QUIRK(0x1043, 0x1743, "ASUS U80", ALC269_FIXUP_AMIC),
10310 SND_PCI_QUIRK(0x1043, 0x1773, "ASUS U20A", ALC269_FIXUP_AMIC),
10311 SND_PCI_QUIRK(0x1043, 0x1883, "ASUS F81Se", ALC269_FIXUP_AMIC),
10312 SND_PCI_QUIRK(0x152d, 0x1778, "Quanta ON1", ALC269_FIXUP_DMIC),
10313 SND_PCI_QUIRK(0x17aa, 0x3be9, "Quanta Wistron", ALC269_FIXUP_AMIC),
10314 SND_PCI_QUIRK(0x17aa, 0x3bf8, "Quanta FL1", ALC269_FIXUP_AMIC),
10315 SND_PCI_QUIRK(0x17ff, 0x059a, "Quanta EL3", ALC269_FIXUP_DMIC),
10316 SND_PCI_QUIRK(0x17ff, 0x059b, "Quanta JR1", ALC269_FIXUP_DMIC),
10321 static const struct snd_pci_quirk alc269_fixup_vendor_tbl[] = {
10322 SND_PCI_QUIRK_VENDOR(0x1025, "Acer Aspire", ALC271_FIXUP_DMIC),
10323 SND_PCI_QUIRK_VENDOR(0x103c, "HP", ALC269_FIXUP_HP_MUTE_LED),
10324 SND_PCI_QUIRK_VENDOR(0x104d, "Sony VAIO", ALC269_FIXUP_SONY_VAIO),
10325 SND_PCI_QUIRK_VENDOR(0x17aa, "Thinkpad", ALC269_FIXUP_THINKPAD_ACPI),
10326 SND_PCI_QUIRK_VENDOR(0x19e5, "Huawei Matebook", ALC255_FIXUP_MIC_MUTE_LED),
10330 static const struct hda_model_fixup alc269_fixup_models[] = {
10331 {.id = ALC269_FIXUP_AMIC, .name = "laptop-amic"},
10332 {.id = ALC269_FIXUP_DMIC, .name = "laptop-dmic"},
10333 {.id = ALC269_FIXUP_STEREO_DMIC, .name = "alc269-dmic"},
10334 {.id = ALC271_FIXUP_DMIC, .name = "alc271-dmic"},
10335 {.id = ALC269_FIXUP_INV_DMIC, .name = "inv-dmic"},
10336 {.id = ALC269_FIXUP_HEADSET_MIC, .name = "headset-mic"},
10337 {.id = ALC269_FIXUP_HEADSET_MODE, .name = "headset-mode"},
10338 {.id = ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC, .name = "headset-mode-no-hp-mic"},
10339 {.id = ALC269_FIXUP_LENOVO_DOCK, .name = "lenovo-dock"},
10340 {.id = ALC269_FIXUP_LENOVO_DOCK_LIMIT_BOOST, .name = "lenovo-dock-limit-boost"},
10341 {.id = ALC269_FIXUP_HP_GPIO_LED, .name = "hp-gpio-led"},
10342 {.id = ALC269_FIXUP_HP_DOCK_GPIO_MIC1_LED, .name = "hp-dock-gpio-mic1-led"},
10343 {.id = ALC269_FIXUP_DELL1_MIC_NO_PRESENCE, .name = "dell-headset-multi"},
10344 {.id = ALC269_FIXUP_DELL2_MIC_NO_PRESENCE, .name = "dell-headset-dock"},
10345 {.id = ALC269_FIXUP_DELL3_MIC_NO_PRESENCE, .name = "dell-headset3"},
10346 {.id = ALC269_FIXUP_DELL4_MIC_NO_PRESENCE, .name = "dell-headset4"},
10347 {.id = ALC283_FIXUP_CHROME_BOOK, .name = "alc283-dac-wcaps"},
10348 {.id = ALC283_FIXUP_SENSE_COMBO_JACK, .name = "alc283-sense-combo"},
10349 {.id = ALC292_FIXUP_TPT440_DOCK, .name = "tpt440-dock"},
10350 {.id = ALC292_FIXUP_TPT440, .name = "tpt440"},
10351 {.id = ALC292_FIXUP_TPT460, .name = "tpt460"},
10352 {.id = ALC298_FIXUP_TPT470_DOCK_FIX, .name = "tpt470-dock-fix"},
10353 {.id = ALC298_FIXUP_TPT470_DOCK, .name = "tpt470-dock"},
10354 {.id = ALC233_FIXUP_LENOVO_MULTI_CODECS, .name = "dual-codecs"},
10355 {.id = ALC700_FIXUP_INTEL_REFERENCE, .name = "alc700-ref"},
10356 {.id = ALC269_FIXUP_SONY_VAIO, .name = "vaio"},
10357 {.id = ALC269_FIXUP_DELL_M101Z, .name = "dell-m101z"},
10358 {.id = ALC269_FIXUP_ASUS_G73JW, .name = "asus-g73jw"},
10359 {.id = ALC269_FIXUP_LENOVO_EAPD, .name = "lenovo-eapd"},
10360 {.id = ALC275_FIXUP_SONY_HWEQ, .name = "sony-hweq"},
10361 {.id = ALC269_FIXUP_PCM_44K, .name = "pcm44k"},
10362 {.id = ALC269_FIXUP_LIFEBOOK, .name = "lifebook"},
10363 {.id = ALC269_FIXUP_LIFEBOOK_EXTMIC, .name = "lifebook-extmic"},
10364 {.id = ALC269_FIXUP_LIFEBOOK_HP_PIN, .name = "lifebook-hp-pin"},
10365 {.id = ALC255_FIXUP_LIFEBOOK_U7x7_HEADSET_MIC, .name = "lifebook-u7x7"},
10366 {.id = ALC269VB_FIXUP_AMIC, .name = "alc269vb-amic"},
10367 {.id = ALC269VB_FIXUP_DMIC, .name = "alc269vb-dmic"},
10368 {.id = ALC269_FIXUP_HP_MUTE_LED_MIC1, .name = "hp-mute-led-mic1"},
10369 {.id = ALC269_FIXUP_HP_MUTE_LED_MIC2, .name = "hp-mute-led-mic2"},
10370 {.id = ALC269_FIXUP_HP_MUTE_LED_MIC3, .name = "hp-mute-led-mic3"},
10371 {.id = ALC269_FIXUP_HP_GPIO_MIC1_LED, .name = "hp-gpio-mic1"},
10372 {.id = ALC269_FIXUP_HP_LINE1_MIC1_LED, .name = "hp-line1-mic1"},
10373 {.id = ALC269_FIXUP_NO_SHUTUP, .name = "noshutup"},
10374 {.id = ALC286_FIXUP_SONY_MIC_NO_PRESENCE, .name = "sony-nomic"},
10375 {.id = ALC269_FIXUP_ASPIRE_HEADSET_MIC, .name = "aspire-headset-mic"},
10376 {.id = ALC269_FIXUP_ASUS_X101, .name = "asus-x101"},
10377 {.id = ALC271_FIXUP_HP_GATE_MIC_JACK, .name = "acer-ao7xx"},
10378 {.id = ALC271_FIXUP_HP_GATE_MIC_JACK_E1_572, .name = "acer-aspire-e1"},
10379 {.id = ALC269_FIXUP_ACER_AC700, .name = "acer-ac700"},
10380 {.id = ALC269_FIXUP_LIMIT_INT_MIC_BOOST, .name = "limit-mic-boost"},
10381 {.id = ALC269VB_FIXUP_ASUS_ZENBOOK, .name = "asus-zenbook"},
10382 {.id = ALC269VB_FIXUP_ASUS_ZENBOOK_UX31A, .name = "asus-zenbook-ux31a"},
10383 {.id = ALC269VB_FIXUP_ORDISSIMO_EVE2, .name = "ordissimo"},
10384 {.id = ALC282_FIXUP_ASUS_TX300, .name = "asus-tx300"},
10385 {.id = ALC283_FIXUP_INT_MIC, .name = "alc283-int-mic"},
10386 {.id = ALC290_FIXUP_MONO_SPEAKERS_HSJACK, .name = "mono-speakers"},
10387 {.id = ALC290_FIXUP_SUBWOOFER_HSJACK, .name = "alc290-subwoofer"},
10388 {.id = ALC269_FIXUP_THINKPAD_ACPI, .name = "thinkpad"},
10389 {.id = ALC269_FIXUP_DMIC_THINKPAD_ACPI, .name = "dmic-thinkpad"},
10390 {.id = ALC255_FIXUP_ACER_MIC_NO_PRESENCE, .name = "alc255-acer"},
10391 {.id = ALC255_FIXUP_ASUS_MIC_NO_PRESENCE, .name = "alc255-asus"},
10392 {.id = ALC255_FIXUP_DELL1_MIC_NO_PRESENCE, .name = "alc255-dell1"},
10393 {.id = ALC255_FIXUP_DELL2_MIC_NO_PRESENCE, .name = "alc255-dell2"},
10394 {.id = ALC293_FIXUP_DELL1_MIC_NO_PRESENCE, .name = "alc293-dell1"},
10395 {.id = ALC283_FIXUP_HEADSET_MIC, .name = "alc283-headset"},
10396 {.id = ALC255_FIXUP_MIC_MUTE_LED, .name = "alc255-dell-mute"},
10397 {.id = ALC282_FIXUP_ASPIRE_V5_PINS, .name = "aspire-v5"},
10398 {.id = ALC269VB_FIXUP_ASPIRE_E1_COEF, .name = "aspire-e1-coef"},
10399 {.id = ALC280_FIXUP_HP_GPIO4, .name = "hp-gpio4"},
10400 {.id = ALC286_FIXUP_HP_GPIO_LED, .name = "hp-gpio-led"},
10401 {.id = ALC280_FIXUP_HP_GPIO2_MIC_HOTKEY, .name = "hp-gpio2-hotkey"},
10402 {.id = ALC280_FIXUP_HP_DOCK_PINS, .name = "hp-dock-pins"},
10403 {.id = ALC269_FIXUP_HP_DOCK_GPIO_MIC1_LED, .name = "hp-dock-gpio-mic"},
10404 {.id = ALC280_FIXUP_HP_9480M, .name = "hp-9480m"},
10405 {.id = ALC288_FIXUP_DELL_HEADSET_MODE, .name = "alc288-dell-headset"},
10406 {.id = ALC288_FIXUP_DELL1_MIC_NO_PRESENCE, .name = "alc288-dell1"},
10407 {.id = ALC288_FIXUP_DELL_XPS_13, .name = "alc288-dell-xps13"},
10408 {.id = ALC292_FIXUP_DELL_E7X, .name = "dell-e7x"},
10409 {.id = ALC293_FIXUP_DISABLE_AAMIX_MULTIJACK, .name = "alc293-dell"},
10410 {.id = ALC298_FIXUP_DELL1_MIC_NO_PRESENCE, .name = "alc298-dell1"},
10411 {.id = ALC298_FIXUP_DELL_AIO_MIC_NO_PRESENCE, .name = "alc298-dell-aio"},
10412 {.id = ALC275_FIXUP_DELL_XPS, .name = "alc275-dell-xps"},
10413 {.id = ALC293_FIXUP_LENOVO_SPK_NOISE, .name = "lenovo-spk-noise"},
10414 {.id = ALC233_FIXUP_LENOVO_LINE2_MIC_HOTKEY, .name = "lenovo-hotkey"},
10415 {.id = ALC255_FIXUP_DELL_SPK_NOISE, .name = "dell-spk-noise"},
10416 {.id = ALC225_FIXUP_DELL1_MIC_NO_PRESENCE, .name = "alc225-dell1"},
10417 {.id = ALC295_FIXUP_DISABLE_DAC3, .name = "alc295-disable-dac3"},
10418 {.id = ALC285_FIXUP_SPEAKER2_TO_DAC1, .name = "alc285-speaker2-to-dac1"},
10419 {.id = ALC280_FIXUP_HP_HEADSET_MIC, .name = "alc280-hp-headset"},
10420 {.id = ALC221_FIXUP_HP_FRONT_MIC, .name = "alc221-hp-mic"},
10421 {.id = ALC298_FIXUP_SPK_VOLUME, .name = "alc298-spk-volume"},
10422 {.id = ALC256_FIXUP_DELL_INSPIRON_7559_SUBWOOFER, .name = "dell-inspiron-7559"},
10423 {.id = ALC269_FIXUP_ATIV_BOOK_8, .name = "ativ-book"},
10424 {.id = ALC221_FIXUP_HP_MIC_NO_PRESENCE, .name = "alc221-hp-mic"},
10425 {.id = ALC256_FIXUP_ASUS_HEADSET_MODE, .name = "alc256-asus-headset"},
10426 {.id = ALC256_FIXUP_ASUS_MIC, .name = "alc256-asus-mic"},
10427 {.id = ALC256_FIXUP_ASUS_AIO_GPIO2, .name = "alc256-asus-aio"},
10428 {.id = ALC233_FIXUP_ASUS_MIC_NO_PRESENCE, .name = "alc233-asus"},
10429 {.id = ALC233_FIXUP_EAPD_COEF_AND_MIC_NO_PRESENCE, .name = "alc233-eapd"},
10430 {.id = ALC294_FIXUP_LENOVO_MIC_LOCATION, .name = "alc294-lenovo-mic"},
10431 {.id = ALC225_FIXUP_DELL_WYSE_MIC_NO_PRESENCE, .name = "alc225-wyse"},
10432 {.id = ALC274_FIXUP_DELL_AIO_LINEOUT_VERB, .name = "alc274-dell-aio"},
10433 {.id = ALC255_FIXUP_DUMMY_LINEOUT_VERB, .name = "alc255-dummy-lineout"},
10434 {.id = ALC255_FIXUP_DELL_HEADSET_MIC, .name = "alc255-dell-headset"},
10435 {.id = ALC295_FIXUP_HP_X360, .name = "alc295-hp-x360"},
10436 {.id = ALC225_FIXUP_HEADSET_JACK, .name = "alc-headset-jack"},
10437 {.id = ALC295_FIXUP_CHROME_BOOK, .name = "alc-chrome-book"},
10438 {.id = ALC299_FIXUP_PREDATOR_SPK, .name = "predator-spk"},
10439 {.id = ALC298_FIXUP_HUAWEI_MBX_STEREO, .name = "huawei-mbx-stereo"},
10440 {.id = ALC256_FIXUP_MEDION_HEADSET_NO_PRESENCE, .name = "alc256-medion-headset"},
10441 {.id = ALC298_FIXUP_SAMSUNG_AMP, .name = "alc298-samsung-amp"},
10442 {.id = ALC256_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET, .name = "alc256-samsung-headphone"},
10443 {.id = ALC255_FIXUP_XIAOMI_HEADSET_MIC, .name = "alc255-xiaomi-headset"},
10444 {.id = ALC274_FIXUP_HP_MIC, .name = "alc274-hp-mic-detect"},
10445 {.id = ALC245_FIXUP_HP_X360_AMP, .name = "alc245-hp-x360-amp"},
10446 {.id = ALC295_FIXUP_HP_OMEN, .name = "alc295-hp-omen"},
10447 {.id = ALC285_FIXUP_HP_SPECTRE_X360, .name = "alc285-hp-spectre-x360"},
10448 {.id = ALC285_FIXUP_HP_SPECTRE_X360_EB1, .name = "alc285-hp-spectre-x360-eb1"},
10449 {.id = ALC287_FIXUP_IDEAPAD_BASS_SPK_AMP, .name = "alc287-ideapad-bass-spk-amp"},
10450 {.id = ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK_PIN, .name = "alc287-yoga9-bass-spk-pin"},
10451 {.id = ALC623_FIXUP_LENOVO_THINKSTATION_P340, .name = "alc623-lenovo-thinkstation-p340"},
10452 {.id = ALC255_FIXUP_ACER_HEADPHONE_AND_MIC, .name = "alc255-acer-headphone-and-mic"},
10453 {.id = ALC285_FIXUP_HP_GPIO_AMP_INIT, .name = "alc285-hp-amp-init"},
10456 #define ALC225_STANDARD_PINS \
10459 #define ALC256_STANDARD_PINS \
10460 {0x12, 0x90a60140}, \
10461 {0x14, 0x90170110}, \
10464 #define ALC282_STANDARD_PINS \
10467 #define ALC290_STANDARD_PINS \
10470 #define ALC292_STANDARD_PINS \
10471 {0x14, 0x90170110}, \
10474 #define ALC295_STANDARD_PINS \
10475 {0x12, 0xb7a60130}, \
10476 {0x14, 0x90170110}, \
10479 #define ALC298_STANDARD_PINS \
10480 {0x12, 0x90a60130}, \
10483 static const struct snd_hda_pin_quirk alc269_pin_fixup_tbl[] = {
10484 SND_HDA_PIN_QUIRK(0x10ec0221, 0x103c, "HP Workstation", ALC221_FIXUP_HP_HEADSET_MIC,
10485 {0x14, 0x01014020},
10486 {0x17, 0x90170110},
10487 {0x18, 0x02a11030},
10488 {0x19, 0x0181303F},
10489 {0x21, 0x0221102f}),
10490 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1025, "Acer", ALC255_FIXUP_ACER_MIC_NO_PRESENCE,
10491 {0x12, 0x90a601c0},
10492 {0x14, 0x90171120},
10493 {0x21, 0x02211030}),
10494 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1043, "ASUS", ALC255_FIXUP_ASUS_MIC_NO_PRESENCE,
10495 {0x14, 0x90170110},
10496 {0x1b, 0x90a70130},
10497 {0x21, 0x03211020}),
10498 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1043, "ASUS", ALC255_FIXUP_ASUS_MIC_NO_PRESENCE,
10499 {0x1a, 0x90a70130},
10500 {0x1b, 0x90170110},
10501 {0x21, 0x03211020}),
10502 SND_HDA_PIN_QUIRK(0x10ec0225, 0x1028, "Dell", ALC225_FIXUP_DELL1_MIC_NO_PRESENCE,
10503 ALC225_STANDARD_PINS,
10504 {0x12, 0xb7a60130},
10505 {0x14, 0x901701a0}),
10506 SND_HDA_PIN_QUIRK(0x10ec0225, 0x1028, "Dell", ALC225_FIXUP_DELL1_MIC_NO_PRESENCE,
10507 ALC225_STANDARD_PINS,
10508 {0x12, 0xb7a60130},
10509 {0x14, 0x901701b0}),
10510 SND_HDA_PIN_QUIRK(0x10ec0225, 0x1028, "Dell", ALC225_FIXUP_DELL1_MIC_NO_PRESENCE,
10511 ALC225_STANDARD_PINS,
10512 {0x12, 0xb7a60150},
10513 {0x14, 0x901701a0}),
10514 SND_HDA_PIN_QUIRK(0x10ec0225, 0x1028, "Dell", ALC225_FIXUP_DELL1_MIC_NO_PRESENCE,
10515 ALC225_STANDARD_PINS,
10516 {0x12, 0xb7a60150},
10517 {0x14, 0x901701b0}),
10518 SND_HDA_PIN_QUIRK(0x10ec0225, 0x1028, "Dell", ALC225_FIXUP_DELL1_MIC_NO_PRESENCE,
10519 ALC225_STANDARD_PINS,
10520 {0x12, 0xb7a60130},
10521 {0x1b, 0x90170110}),
10522 SND_HDA_PIN_QUIRK(0x10ec0233, 0x8086, "Intel NUC Skull Canyon", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE,
10523 {0x1b, 0x01111010},
10524 {0x1e, 0x01451130},
10525 {0x21, 0x02211020}),
10526 SND_HDA_PIN_QUIRK(0x10ec0235, 0x17aa, "Lenovo", ALC233_FIXUP_LENOVO_LINE2_MIC_HOTKEY,
10527 {0x12, 0x90a60140},
10528 {0x14, 0x90170110},
10529 {0x19, 0x02a11030},
10530 {0x21, 0x02211020}),
10531 SND_HDA_PIN_QUIRK(0x10ec0235, 0x17aa, "Lenovo", ALC294_FIXUP_LENOVO_MIC_LOCATION,
10532 {0x14, 0x90170110},
10533 {0x19, 0x02a11030},
10534 {0x1a, 0x02a11040},
10535 {0x1b, 0x01014020},
10536 {0x21, 0x0221101f}),
10537 SND_HDA_PIN_QUIRK(0x10ec0235, 0x17aa, "Lenovo", ALC294_FIXUP_LENOVO_MIC_LOCATION,
10538 {0x14, 0x90170110},
10539 {0x19, 0x02a11030},
10540 {0x1a, 0x02a11040},
10541 {0x1b, 0x01011020},
10542 {0x21, 0x0221101f}),
10543 SND_HDA_PIN_QUIRK(0x10ec0235, 0x17aa, "Lenovo", ALC294_FIXUP_LENOVO_MIC_LOCATION,
10544 {0x14, 0x90170110},
10545 {0x19, 0x02a11020},
10546 {0x1a, 0x02a11030},
10547 {0x21, 0x0221101f}),
10548 SND_HDA_PIN_QUIRK(0x10ec0236, 0x1028, "Dell", ALC236_FIXUP_DELL_AIO_HEADSET_MIC,
10549 {0x21, 0x02211010}),
10550 SND_HDA_PIN_QUIRK(0x10ec0236, 0x103c, "HP", ALC256_FIXUP_HP_HEADSET_MIC,
10551 {0x14, 0x90170110},
10552 {0x19, 0x02a11020},
10553 {0x21, 0x02211030}),
10554 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL2_MIC_NO_PRESENCE,
10555 {0x14, 0x90170110},
10556 {0x21, 0x02211020}),
10557 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
10558 {0x14, 0x90170130},
10559 {0x21, 0x02211040}),
10560 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
10561 {0x12, 0x90a60140},
10562 {0x14, 0x90170110},
10563 {0x21, 0x02211020}),
10564 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
10565 {0x12, 0x90a60160},
10566 {0x14, 0x90170120},
10567 {0x21, 0x02211030}),
10568 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
10569 {0x14, 0x90170110},
10570 {0x1b, 0x02011020},
10571 {0x21, 0x0221101f}),
10572 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
10573 {0x14, 0x90170110},
10574 {0x1b, 0x01011020},
10575 {0x21, 0x0221101f}),
10576 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
10577 {0x14, 0x90170130},
10578 {0x1b, 0x01014020},
10579 {0x21, 0x0221103f}),
10580 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
10581 {0x14, 0x90170130},
10582 {0x1b, 0x01011020},
10583 {0x21, 0x0221103f}),
10584 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
10585 {0x14, 0x90170130},
10586 {0x1b, 0x02011020},
10587 {0x21, 0x0221103f}),
10588 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
10589 {0x14, 0x90170150},
10590 {0x1b, 0x02011020},
10591 {0x21, 0x0221105f}),
10592 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
10593 {0x14, 0x90170110},
10594 {0x1b, 0x01014020},
10595 {0x21, 0x0221101f}),
10596 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
10597 {0x12, 0x90a60160},
10598 {0x14, 0x90170120},
10599 {0x17, 0x90170140},
10600 {0x21, 0x0321102f}),
10601 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
10602 {0x12, 0x90a60160},
10603 {0x14, 0x90170130},
10604 {0x21, 0x02211040}),
10605 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
10606 {0x12, 0x90a60160},
10607 {0x14, 0x90170140},
10608 {0x21, 0x02211050}),
10609 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
10610 {0x12, 0x90a60170},
10611 {0x14, 0x90170120},
10612 {0x21, 0x02211030}),
10613 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
10614 {0x12, 0x90a60170},
10615 {0x14, 0x90170130},
10616 {0x21, 0x02211040}),
10617 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
10618 {0x12, 0x90a60170},
10619 {0x14, 0x90171130},
10620 {0x21, 0x02211040}),
10621 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
10622 {0x12, 0x90a60170},
10623 {0x14, 0x90170140},
10624 {0x21, 0x02211050}),
10625 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell Inspiron 5548", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
10626 {0x12, 0x90a60180},
10627 {0x14, 0x90170130},
10628 {0x21, 0x02211040}),
10629 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell Inspiron 5565", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
10630 {0x12, 0x90a60180},
10631 {0x14, 0x90170120},
10632 {0x21, 0x02211030}),
10633 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
10634 {0x1b, 0x01011020},
10635 {0x21, 0x02211010}),
10636 SND_HDA_PIN_QUIRK(0x10ec0256, 0x1043, "ASUS", ALC256_FIXUP_ASUS_MIC,
10637 {0x14, 0x90170110},
10638 {0x1b, 0x90a70130},
10639 {0x21, 0x04211020}),
10640 SND_HDA_PIN_QUIRK(0x10ec0256, 0x1043, "ASUS", ALC256_FIXUP_ASUS_MIC,
10641 {0x14, 0x90170110},
10642 {0x1b, 0x90a70130},
10643 {0x21, 0x03211020}),
10644 SND_HDA_PIN_QUIRK(0x10ec0256, 0x1043, "ASUS", ALC256_FIXUP_ASUS_MIC_NO_PRESENCE,
10645 {0x12, 0x90a60130},
10646 {0x14, 0x90170110},
10647 {0x21, 0x03211020}),
10648 SND_HDA_PIN_QUIRK(0x10ec0256, 0x1043, "ASUS", ALC256_FIXUP_ASUS_MIC_NO_PRESENCE,
10649 {0x12, 0x90a60130},
10650 {0x14, 0x90170110},
10651 {0x21, 0x04211020}),
10652 SND_HDA_PIN_QUIRK(0x10ec0256, 0x1043, "ASUS", ALC256_FIXUP_ASUS_MIC_NO_PRESENCE,
10653 {0x1a, 0x90a70130},
10654 {0x1b, 0x90170110},
10655 {0x21, 0x03211020}),
10656 SND_HDA_PIN_QUIRK(0x10ec0256, 0x103c, "HP", ALC256_FIXUP_HP_HEADSET_MIC,
10657 {0x14, 0x90170110},
10658 {0x19, 0x02a11020},
10659 {0x21, 0x0221101f}),
10660 SND_HDA_PIN_QUIRK(0x10ec0274, 0x103c, "HP", ALC274_FIXUP_HP_HEADSET_MIC,
10661 {0x17, 0x90170110},
10662 {0x19, 0x03a11030},
10663 {0x21, 0x03211020}),
10664 SND_HDA_PIN_QUIRK(0x10ec0280, 0x103c, "HP", ALC280_FIXUP_HP_GPIO4,
10665 {0x12, 0x90a60130},
10666 {0x14, 0x90170110},
10667 {0x15, 0x0421101f},
10668 {0x1a, 0x04a11020}),
10669 SND_HDA_PIN_QUIRK(0x10ec0280, 0x103c, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED,
10670 {0x12, 0x90a60140},
10671 {0x14, 0x90170110},
10672 {0x15, 0x0421101f},
10673 {0x18, 0x02811030},
10674 {0x1a, 0x04a1103f},
10675 {0x1b, 0x02011020}),
10676 SND_HDA_PIN_QUIRK(0x10ec0282, 0x103c, "HP 15 Touchsmart", ALC269_FIXUP_HP_MUTE_LED_MIC1,
10677 ALC282_STANDARD_PINS,
10678 {0x12, 0x99a30130},
10679 {0x19, 0x03a11020},
10680 {0x21, 0x0321101f}),
10681 SND_HDA_PIN_QUIRK(0x10ec0282, 0x103c, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1,
10682 ALC282_STANDARD_PINS,
10683 {0x12, 0x99a30130},
10684 {0x19, 0x03a11020},
10685 {0x21, 0x03211040}),
10686 SND_HDA_PIN_QUIRK(0x10ec0282, 0x103c, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1,
10687 ALC282_STANDARD_PINS,
10688 {0x12, 0x99a30130},
10689 {0x19, 0x03a11030},
10690 {0x21, 0x03211020}),
10691 SND_HDA_PIN_QUIRK(0x10ec0282, 0x103c, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1,
10692 ALC282_STANDARD_PINS,
10693 {0x12, 0x99a30130},
10694 {0x19, 0x04a11020},
10695 {0x21, 0x0421101f}),
10696 SND_HDA_PIN_QUIRK(0x10ec0282, 0x103c, "HP", ALC269_FIXUP_HP_LINE1_MIC1_LED,
10697 ALC282_STANDARD_PINS,
10698 {0x12, 0x90a60140},
10699 {0x19, 0x04a11030},
10700 {0x21, 0x04211020}),
10701 SND_HDA_PIN_QUIRK(0x10ec0282, 0x1025, "Acer", ALC282_FIXUP_ACER_DISABLE_LINEOUT,
10702 ALC282_STANDARD_PINS,
10703 {0x12, 0x90a609c0},
10704 {0x18, 0x03a11830},
10705 {0x19, 0x04a19831},
10706 {0x1a, 0x0481303f},
10707 {0x1b, 0x04211020},
10708 {0x21, 0x0321101f}),
10709 SND_HDA_PIN_QUIRK(0x10ec0282, 0x1025, "Acer", ALC282_FIXUP_ACER_DISABLE_LINEOUT,
10710 ALC282_STANDARD_PINS,
10711 {0x12, 0x90a60940},
10712 {0x18, 0x03a11830},
10713 {0x19, 0x04a19831},
10714 {0x1a, 0x0481303f},
10715 {0x1b, 0x04211020},
10716 {0x21, 0x0321101f}),
10717 SND_HDA_PIN_QUIRK(0x10ec0283, 0x1028, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE,
10718 ALC282_STANDARD_PINS,
10719 {0x12, 0x90a60130},
10720 {0x21, 0x0321101f}),
10721 SND_HDA_PIN_QUIRK(0x10ec0283, 0x1028, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE,
10722 {0x12, 0x90a60160},
10723 {0x14, 0x90170120},
10724 {0x21, 0x02211030}),
10725 SND_HDA_PIN_QUIRK(0x10ec0283, 0x1028, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE,
10726 ALC282_STANDARD_PINS,
10727 {0x12, 0x90a60130},
10728 {0x19, 0x03a11020},
10729 {0x21, 0x0321101f}),
10730 SND_HDA_PIN_QUIRK(0x10ec0285, 0x17aa, "Lenovo", ALC285_FIXUP_LENOVO_PC_BEEP_IN_NOISE,
10731 {0x12, 0x90a60130},
10732 {0x14, 0x90170110},
10733 {0x19, 0x04a11040},
10734 {0x21, 0x04211020}),
10735 SND_HDA_PIN_QUIRK(0x10ec0285, 0x17aa, "Lenovo", ALC285_FIXUP_LENOVO_PC_BEEP_IN_NOISE,
10736 {0x14, 0x90170110},
10737 {0x19, 0x04a11040},
10738 {0x1d, 0x40600001},
10739 {0x21, 0x04211020}),
10740 SND_HDA_PIN_QUIRK(0x10ec0285, 0x17aa, "Lenovo", ALC285_FIXUP_THINKPAD_NO_BASS_SPK_HEADSET_JACK,
10741 {0x14, 0x90170110},
10742 {0x19, 0x04a11040},
10743 {0x21, 0x04211020}),
10744 SND_HDA_PIN_QUIRK(0x10ec0287, 0x17aa, "Lenovo", ALC285_FIXUP_THINKPAD_HEADSET_JACK,
10745 {0x14, 0x90170110},
10746 {0x17, 0x90170111},
10747 {0x19, 0x03a11030},
10748 {0x21, 0x03211020}),
10749 SND_HDA_PIN_QUIRK(0x10ec0287, 0x17aa, "Lenovo", ALC287_FIXUP_THINKPAD_I2S_SPK,
10750 {0x17, 0x90170110},
10751 {0x19, 0x03a11030},
10752 {0x21, 0x03211020}),
10753 SND_HDA_PIN_QUIRK(0x10ec0287, 0x17aa, "Lenovo", ALC287_FIXUP_THINKPAD_I2S_SPK,
10754 {0x17, 0x90170110}, /* 0x231f with RTK I2S AMP */
10755 {0x19, 0x04a11040},
10756 {0x21, 0x04211020}),
10757 SND_HDA_PIN_QUIRK(0x10ec0286, 0x1025, "Acer", ALC286_FIXUP_ACER_AIO_MIC_NO_PRESENCE,
10758 {0x12, 0x90a60130},
10759 {0x17, 0x90170110},
10760 {0x21, 0x02211020}),
10761 SND_HDA_PIN_QUIRK(0x10ec0288, 0x1028, "Dell", ALC288_FIXUP_DELL1_MIC_NO_PRESENCE,
10762 {0x12, 0x90a60120},
10763 {0x14, 0x90170110},
10764 {0x21, 0x0321101f}),
10765 SND_HDA_PIN_QUIRK(0x10ec0290, 0x103c, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1,
10766 ALC290_STANDARD_PINS,
10767 {0x15, 0x04211040},
10768 {0x18, 0x90170112},
10769 {0x1a, 0x04a11020}),
10770 SND_HDA_PIN_QUIRK(0x10ec0290, 0x103c, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1,
10771 ALC290_STANDARD_PINS,
10772 {0x15, 0x04211040},
10773 {0x18, 0x90170110},
10774 {0x1a, 0x04a11020}),
10775 SND_HDA_PIN_QUIRK(0x10ec0290, 0x103c, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1,
10776 ALC290_STANDARD_PINS,
10777 {0x15, 0x0421101f},
10778 {0x1a, 0x04a11020}),
10779 SND_HDA_PIN_QUIRK(0x10ec0290, 0x103c, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1,
10780 ALC290_STANDARD_PINS,
10781 {0x15, 0x04211020},
10782 {0x1a, 0x04a11040}),
10783 SND_HDA_PIN_QUIRK(0x10ec0290, 0x103c, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1,
10784 ALC290_STANDARD_PINS,
10785 {0x14, 0x90170110},
10786 {0x15, 0x04211020},
10787 {0x1a, 0x04a11040}),
10788 SND_HDA_PIN_QUIRK(0x10ec0290, 0x103c, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1,
10789 ALC290_STANDARD_PINS,
10790 {0x14, 0x90170110},
10791 {0x15, 0x04211020},
10792 {0x1a, 0x04a11020}),
10793 SND_HDA_PIN_QUIRK(0x10ec0290, 0x103c, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1,
10794 ALC290_STANDARD_PINS,
10795 {0x14, 0x90170110},
10796 {0x15, 0x0421101f},
10797 {0x1a, 0x04a11020}),
10798 SND_HDA_PIN_QUIRK(0x10ec0292, 0x1028, "Dell", ALC269_FIXUP_DELL2_MIC_NO_PRESENCE,
10799 ALC292_STANDARD_PINS,
10800 {0x12, 0x90a60140},
10801 {0x16, 0x01014020},
10802 {0x19, 0x01a19030}),
10803 SND_HDA_PIN_QUIRK(0x10ec0292, 0x1028, "Dell", ALC269_FIXUP_DELL2_MIC_NO_PRESENCE,
10804 ALC292_STANDARD_PINS,
10805 {0x12, 0x90a60140},
10806 {0x16, 0x01014020},
10807 {0x18, 0x02a19031},
10808 {0x19, 0x01a1903e}),
10809 SND_HDA_PIN_QUIRK(0x10ec0292, 0x1028, "Dell", ALC269_FIXUP_DELL3_MIC_NO_PRESENCE,
10810 ALC292_STANDARD_PINS,
10811 {0x12, 0x90a60140}),
10812 SND_HDA_PIN_QUIRK(0x10ec0293, 0x1028, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE,
10813 ALC292_STANDARD_PINS,
10814 {0x13, 0x90a60140},
10815 {0x16, 0x21014020},
10816 {0x19, 0x21a19030}),
10817 SND_HDA_PIN_QUIRK(0x10ec0293, 0x1028, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE,
10818 ALC292_STANDARD_PINS,
10819 {0x13, 0x90a60140}),
10820 SND_HDA_PIN_QUIRK(0x10ec0294, 0x1043, "ASUS", ALC294_FIXUP_ASUS_HPE,
10821 {0x17, 0x90170110},
10822 {0x21, 0x04211020}),
10823 SND_HDA_PIN_QUIRK(0x10ec0294, 0x1043, "ASUS", ALC294_FIXUP_ASUS_MIC,
10824 {0x14, 0x90170110},
10825 {0x1b, 0x90a70130},
10826 {0x21, 0x04211020}),
10827 SND_HDA_PIN_QUIRK(0x10ec0294, 0x1043, "ASUS", ALC294_FIXUP_ASUS_SPK,
10828 {0x12, 0x90a60130},
10829 {0x17, 0x90170110},
10830 {0x21, 0x03211020}),
10831 SND_HDA_PIN_QUIRK(0x10ec0294, 0x1043, "ASUS", ALC294_FIXUP_ASUS_SPK,
10832 {0x12, 0x90a60130},
10833 {0x17, 0x90170110},
10834 {0x21, 0x04211020}),
10835 SND_HDA_PIN_QUIRK(0x10ec0295, 0x1043, "ASUS", ALC294_FIXUP_ASUS_SPK,
10836 {0x12, 0x90a60130},
10837 {0x17, 0x90170110},
10838 {0x21, 0x03211020}),
10839 SND_HDA_PIN_QUIRK(0x10ec0295, 0x1043, "ASUS", ALC295_FIXUP_ASUS_MIC_NO_PRESENCE,
10840 {0x12, 0x90a60120},
10841 {0x17, 0x90170110},
10842 {0x21, 0x04211030}),
10843 SND_HDA_PIN_QUIRK(0x10ec0295, 0x1043, "ASUS", ALC295_FIXUP_ASUS_MIC_NO_PRESENCE,
10844 {0x12, 0x90a60130},
10845 {0x17, 0x90170110},
10846 {0x21, 0x03211020}),
10847 SND_HDA_PIN_QUIRK(0x10ec0295, 0x1043, "ASUS", ALC295_FIXUP_ASUS_MIC_NO_PRESENCE,
10848 {0x12, 0x90a60130},
10849 {0x17, 0x90170110},
10850 {0x21, 0x03211020}),
10851 SND_HDA_PIN_QUIRK(0x10ec0298, 0x1028, "Dell", ALC298_FIXUP_DELL1_MIC_NO_PRESENCE,
10852 ALC298_STANDARD_PINS,
10853 {0x17, 0x90170110}),
10854 SND_HDA_PIN_QUIRK(0x10ec0298, 0x1028, "Dell", ALC298_FIXUP_DELL1_MIC_NO_PRESENCE,
10855 ALC298_STANDARD_PINS,
10856 {0x17, 0x90170140}),
10857 SND_HDA_PIN_QUIRK(0x10ec0298, 0x1028, "Dell", ALC298_FIXUP_DELL1_MIC_NO_PRESENCE,
10858 ALC298_STANDARD_PINS,
10859 {0x17, 0x90170150}),
10860 SND_HDA_PIN_QUIRK(0x10ec0298, 0x1028, "Dell", ALC298_FIXUP_SPK_VOLUME,
10861 {0x12, 0xb7a60140},
10862 {0x13, 0xb7a60150},
10863 {0x17, 0x90170110},
10864 {0x1a, 0x03011020},
10865 {0x21, 0x03211030}),
10866 SND_HDA_PIN_QUIRK(0x10ec0298, 0x1028, "Dell", ALC298_FIXUP_ALIENWARE_MIC_NO_PRESENCE,
10867 {0x12, 0xb7a60140},
10868 {0x17, 0x90170110},
10869 {0x1a, 0x03a11030},
10870 {0x21, 0x03211020}),
10871 SND_HDA_PIN_QUIRK(0x10ec0299, 0x1028, "Dell", ALC269_FIXUP_DELL4_MIC_NO_PRESENCE,
10872 ALC225_STANDARD_PINS,
10873 {0x12, 0xb7a60130},
10874 {0x17, 0x90170110}),
10875 SND_HDA_PIN_QUIRK(0x10ec0623, 0x17aa, "Lenovo", ALC283_FIXUP_HEADSET_MIC,
10876 {0x14, 0x01014010},
10877 {0x17, 0x90170120},
10878 {0x18, 0x02a11030},
10879 {0x19, 0x02a1103f},
10880 {0x21, 0x0221101f}),
10884 /* This is the fallback pin_fixup_tbl for alc269 family, to make the tbl match
10885 * more machines, don't need to match all valid pins, just need to match
10886 * all the pins defined in the tbl. Just because of this reason, it is possible
10887 * that a single machine matches multiple tbls, so there is one limitation:
10888 * at most one tbl is allowed to define for the same vendor and same codec
10890 static const struct snd_hda_pin_quirk alc269_fallback_pin_fixup_tbl[] = {
10891 SND_HDA_PIN_QUIRK(0x10ec0256, 0x1025, "Acer", ALC2XX_FIXUP_HEADSET_MIC,
10892 {0x19, 0x40000000}),
10893 SND_HDA_PIN_QUIRK(0x10ec0289, 0x1028, "Dell", ALC269_FIXUP_DELL4_MIC_NO_PRESENCE,
10894 {0x19, 0x40000000},
10895 {0x1b, 0x40000000}),
10896 SND_HDA_PIN_QUIRK(0x10ec0295, 0x1028, "Dell", ALC269_FIXUP_DELL4_MIC_NO_PRESENCE,
10897 {0x19, 0x40000000},
10898 {0x1b, 0x40000000}),
10899 SND_HDA_PIN_QUIRK(0x10ec0256, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
10900 {0x19, 0x40000000},
10901 {0x1a, 0x40000000}),
10902 SND_HDA_PIN_QUIRK(0x10ec0236, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
10903 {0x19, 0x40000000},
10904 {0x1a, 0x40000000}),
10905 SND_HDA_PIN_QUIRK(0x10ec0274, 0x1028, "Dell", ALC274_FIXUP_DELL_AIO_LINEOUT_VERB,
10906 {0x19, 0x40000000},
10907 {0x1a, 0x40000000}),
10908 SND_HDA_PIN_QUIRK(0x10ec0256, 0x1043, "ASUS", ALC2XX_FIXUP_HEADSET_MIC,
10909 {0x19, 0x40000000}),
10913 static void alc269_fill_coef(struct hda_codec *codec)
10915 struct alc_spec *spec = codec->spec;
10918 if (spec->codec_variant != ALC269_TYPE_ALC269VB)
10921 if ((alc_get_coef0(codec) & 0x00ff) < 0x015) {
10922 alc_write_coef_idx(codec, 0xf, 0x960b);
10923 alc_write_coef_idx(codec, 0xe, 0x8817);
10926 if ((alc_get_coef0(codec) & 0x00ff) == 0x016) {
10927 alc_write_coef_idx(codec, 0xf, 0x960b);
10928 alc_write_coef_idx(codec, 0xe, 0x8814);
10931 if ((alc_get_coef0(codec) & 0x00ff) == 0x017) {
10932 /* Power up output pin */
10933 alc_update_coef_idx(codec, 0x04, 0, 1<<11);
10936 if ((alc_get_coef0(codec) & 0x00ff) == 0x018) {
10937 val = alc_read_coef_idx(codec, 0xd);
10938 if (val != -1 && (val & 0x0c00) >> 10 != 0x1) {
10939 /* Capless ramp up clock control */
10940 alc_write_coef_idx(codec, 0xd, val | (1<<10));
10942 val = alc_read_coef_idx(codec, 0x17);
10943 if (val != -1 && (val & 0x01c0) >> 6 != 0x4) {
10944 /* Class D power on reset */
10945 alc_write_coef_idx(codec, 0x17, val | (1<<7));
10950 alc_update_coef_idx(codec, 0x4, 0, 1<<11);
10955 static int patch_alc269(struct hda_codec *codec)
10957 struct alc_spec *spec;
10960 err = alc_alloc_spec(codec, 0x0b);
10964 spec = codec->spec;
10965 spec->gen.shared_mic_vref_pin = 0x18;
10966 codec->power_save_node = 0;
10967 spec->en_3kpull_low = true;
10970 codec->patch_ops.suspend = alc269_suspend;
10971 codec->patch_ops.resume = alc269_resume;
10973 spec->shutup = alc_default_shutup;
10974 spec->init_hook = alc_default_init;
10976 switch (codec->core.vendor_id) {
10978 spec->codec_variant = ALC269_TYPE_ALC269VA;
10979 switch (alc_get_coef0(codec) & 0x00f0) {
10981 if (codec->bus->pci &&
10982 codec->bus->pci->subsystem_vendor == 0x1025 &&
10983 spec->cdefine.platform_type == 1)
10984 err = alc_codec_rename(codec, "ALC271X");
10985 spec->codec_variant = ALC269_TYPE_ALC269VB;
10988 if (codec->bus->pci &&
10989 codec->bus->pci->subsystem_vendor == 0x17aa &&
10990 codec->bus->pci->subsystem_device == 0x21f3)
10991 err = alc_codec_rename(codec, "ALC3202");
10992 spec->codec_variant = ALC269_TYPE_ALC269VC;
10995 spec->codec_variant = ALC269_TYPE_ALC269VD;
10998 alc_fix_pll_init(codec, 0x20, 0x04, 15);
11002 spec->shutup = alc269_shutup;
11003 spec->init_hook = alc269_fill_coef;
11004 alc269_fill_coef(codec);
11009 spec->codec_variant = ALC269_TYPE_ALC280;
11012 spec->codec_variant = ALC269_TYPE_ALC282;
11013 spec->shutup = alc282_shutup;
11014 spec->init_hook = alc282_init;
11018 spec->codec_variant = ALC269_TYPE_ALC283;
11019 spec->shutup = alc283_shutup;
11020 spec->init_hook = alc283_init;
11024 spec->codec_variant = ALC269_TYPE_ALC284;
11027 spec->codec_variant = ALC269_TYPE_ALC293;
11031 spec->codec_variant = ALC269_TYPE_ALC286;
11034 spec->codec_variant = ALC269_TYPE_ALC298;
11038 spec->codec_variant = ALC269_TYPE_ALC255;
11039 spec->shutup = alc256_shutup;
11040 spec->init_hook = alc256_init;
11046 spec->codec_variant = ALC269_TYPE_ALC256;
11047 spec->shutup = alc256_shutup;
11048 spec->init_hook = alc256_init;
11049 spec->gen.mixer_nid = 0; /* ALC256 does not have any loopback mixer path */
11050 if (codec->core.vendor_id == 0x10ec0236 &&
11051 codec->bus->pci->vendor != PCI_VENDOR_ID_AMD)
11052 spec->en_3kpull_low = false;
11055 spec->codec_variant = ALC269_TYPE_ALC257;
11056 spec->shutup = alc256_shutup;
11057 spec->init_hook = alc256_init;
11058 spec->gen.mixer_nid = 0;
11059 spec->en_3kpull_low = false;
11065 if (alc_get_coef0(codec) & 0x0010)
11066 spec->codec_variant = ALC269_TYPE_ALC245;
11068 spec->codec_variant = ALC269_TYPE_ALC215;
11069 spec->shutup = alc225_shutup;
11070 spec->init_hook = alc225_init;
11071 spec->gen.mixer_nid = 0;
11076 spec->codec_variant = ALC269_TYPE_ALC225;
11077 spec->shutup = alc225_shutup;
11078 spec->init_hook = alc225_init;
11079 spec->gen.mixer_nid = 0; /* no loopback on ALC225, ALC295 and ALC299 */
11082 spec->codec_variant = ALC269_TYPE_ALC287;
11083 spec->shutup = alc225_shutup;
11084 spec->init_hook = alc225_init;
11085 spec->gen.mixer_nid = 0; /* no loopback on ALC287 */
11090 spec->codec_variant = ALC269_TYPE_ALC294;
11091 spec->gen.mixer_nid = 0; /* ALC2x4 does not have any loopback mixer path */
11092 alc_update_coef_idx(codec, 0x6b, 0x0018, (1<<4) | (1<<3)); /* UAJ MIC Vref control by verb */
11093 spec->init_hook = alc294_init;
11096 spec->codec_variant = ALC269_TYPE_ALC300;
11097 spec->gen.mixer_nid = 0; /* no loopback on ALC300 */
11100 spec->codec_variant = ALC269_TYPE_ALC623;
11106 spec->codec_variant = ALC269_TYPE_ALC700;
11107 spec->gen.mixer_nid = 0; /* ALC700 does not have any loopback mixer path */
11108 alc_update_coef_idx(codec, 0x4a, 1 << 15, 0); /* Combo jack auto trigger control */
11109 spec->init_hook = alc294_init;
11114 if (snd_hda_codec_read(codec, 0x51, 0, AC_VERB_PARAMETERS, 0) == 0x10ec5505) {
11115 spec->has_alc5505_dsp = 1;
11116 spec->init_hook = alc5505_dsp_init;
11119 alc_pre_init(codec);
11121 snd_hda_pick_fixup(codec, alc269_fixup_models,
11122 alc269_fixup_tbl, alc269_fixups);
11123 /* FIXME: both TX300 and ROG Strix G17 have the same SSID, and
11124 * the quirk breaks the latter (bko#214101).
11125 * Clear the wrong entry.
11127 if (codec->fixup_id == ALC282_FIXUP_ASUS_TX300 &&
11128 codec->core.vendor_id == 0x10ec0294) {
11129 codec_dbg(codec, "Clear wrong fixup for ASUS ROG Strix G17\n");
11130 codec->fixup_id = HDA_FIXUP_ID_NOT_SET;
11133 snd_hda_pick_pin_fixup(codec, alc269_pin_fixup_tbl, alc269_fixups, true);
11134 snd_hda_pick_pin_fixup(codec, alc269_fallback_pin_fixup_tbl, alc269_fixups, false);
11135 snd_hda_pick_fixup(codec, NULL, alc269_fixup_vendor_tbl,
11137 snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PRE_PROBE);
11139 alc_auto_parse_customize_define(codec);
11141 if (has_cdefine_beep(codec))
11142 spec->gen.beep_nid = 0x01;
11144 /* automatic parse from the BIOS config */
11145 err = alc269_parse_auto_config(codec);
11149 if (!spec->gen.no_analog && spec->gen.beep_nid && spec->gen.mixer_nid) {
11150 err = set_beep_amp(spec, spec->gen.mixer_nid, 0x04, HDA_INPUT);
11155 snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PROBE);
11168 static int alc861_parse_auto_config(struct hda_codec *codec)
11170 static const hda_nid_t alc861_ignore[] = { 0x1d, 0 };
11171 static const hda_nid_t alc861_ssids[] = { 0x0e, 0x0f, 0x0b, 0 };
11172 return alc_parse_auto_config(codec, alc861_ignore, alc861_ssids);
11175 /* Pin config fixes */
11177 ALC861_FIXUP_FSC_AMILO_PI1505,
11178 ALC861_FIXUP_AMP_VREF_0F,
11179 ALC861_FIXUP_NO_JACK_DETECT,
11180 ALC861_FIXUP_ASUS_A6RP,
11181 ALC660_FIXUP_ASUS_W7J,
11184 /* On some laptops, VREF of pin 0x0f is abused for controlling the main amp */
11185 static void alc861_fixup_asus_amp_vref_0f(struct hda_codec *codec,
11186 const struct hda_fixup *fix, int action)
11188 struct alc_spec *spec = codec->spec;
11191 if (action != HDA_FIXUP_ACT_INIT)
11193 val = snd_hda_codec_get_pin_target(codec, 0x0f);
11194 if (!(val & (AC_PINCTL_IN_EN | AC_PINCTL_OUT_EN)))
11195 val |= AC_PINCTL_IN_EN;
11196 val |= AC_PINCTL_VREF_50;
11197 snd_hda_set_pin_ctl(codec, 0x0f, val);
11198 spec->gen.keep_vref_in_automute = 1;
11201 /* suppress the jack-detection */
11202 static void alc_fixup_no_jack_detect(struct hda_codec *codec,
11203 const struct hda_fixup *fix, int action)
11205 if (action == HDA_FIXUP_ACT_PRE_PROBE)
11206 codec->no_jack_detect = 1;
11209 static const struct hda_fixup alc861_fixups[] = {
11210 [ALC861_FIXUP_FSC_AMILO_PI1505] = {
11211 .type = HDA_FIXUP_PINS,
11212 .v.pins = (const struct hda_pintbl[]) {
11213 { 0x0b, 0x0221101f }, /* HP */
11214 { 0x0f, 0x90170310 }, /* speaker */
11218 [ALC861_FIXUP_AMP_VREF_0F] = {
11219 .type = HDA_FIXUP_FUNC,
11220 .v.func = alc861_fixup_asus_amp_vref_0f,
11222 [ALC861_FIXUP_NO_JACK_DETECT] = {
11223 .type = HDA_FIXUP_FUNC,
11224 .v.func = alc_fixup_no_jack_detect,
11226 [ALC861_FIXUP_ASUS_A6RP] = {
11227 .type = HDA_FIXUP_FUNC,
11228 .v.func = alc861_fixup_asus_amp_vref_0f,
11230 .chain_id = ALC861_FIXUP_NO_JACK_DETECT,
11232 [ALC660_FIXUP_ASUS_W7J] = {
11233 .type = HDA_FIXUP_VERBS,
11234 .v.verbs = (const struct hda_verb[]) {
11235 /* ASUS W7J needs a magic pin setup on unused NID 0x10
11236 * for enabling outputs
11238 {0x10, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x24},
11244 static const struct snd_pci_quirk alc861_fixup_tbl[] = {
11245 SND_PCI_QUIRK(0x1043, 0x1253, "ASUS W7J", ALC660_FIXUP_ASUS_W7J),
11246 SND_PCI_QUIRK(0x1043, 0x1263, "ASUS Z35HL", ALC660_FIXUP_ASUS_W7J),
11247 SND_PCI_QUIRK(0x1043, 0x1393, "ASUS A6Rp", ALC861_FIXUP_ASUS_A6RP),
11248 SND_PCI_QUIRK_VENDOR(0x1043, "ASUS laptop", ALC861_FIXUP_AMP_VREF_0F),
11249 SND_PCI_QUIRK(0x1462, 0x7254, "HP DX2200", ALC861_FIXUP_NO_JACK_DETECT),
11250 SND_PCI_QUIRK_VENDOR(0x1584, "Haier/Uniwill", ALC861_FIXUP_AMP_VREF_0F),
11251 SND_PCI_QUIRK(0x1734, 0x10c7, "FSC Amilo Pi1505", ALC861_FIXUP_FSC_AMILO_PI1505),
11257 static int patch_alc861(struct hda_codec *codec)
11259 struct alc_spec *spec;
11262 err = alc_alloc_spec(codec, 0x15);
11266 spec = codec->spec;
11267 if (has_cdefine_beep(codec))
11268 spec->gen.beep_nid = 0x23;
11271 spec->power_hook = alc_power_eapd;
11274 alc_pre_init(codec);
11276 snd_hda_pick_fixup(codec, NULL, alc861_fixup_tbl, alc861_fixups);
11277 snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PRE_PROBE);
11279 /* automatic parse from the BIOS config */
11280 err = alc861_parse_auto_config(codec);
11284 if (!spec->gen.no_analog) {
11285 err = set_beep_amp(spec, 0x23, 0, HDA_OUTPUT);
11290 snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PROBE);
11300 * ALC861-VD support
11304 * In addition, an independent DAC
11306 static int alc861vd_parse_auto_config(struct hda_codec *codec)
11308 static const hda_nid_t alc861vd_ignore[] = { 0x1d, 0 };
11309 static const hda_nid_t alc861vd_ssids[] = { 0x15, 0x1b, 0x14, 0 };
11310 return alc_parse_auto_config(codec, alc861vd_ignore, alc861vd_ssids);
11314 ALC660VD_FIX_ASUS_GPIO1,
11315 ALC861VD_FIX_DALLAS,
11318 /* exclude VREF80 */
11319 static void alc861vd_fixup_dallas(struct hda_codec *codec,
11320 const struct hda_fixup *fix, int action)
11322 if (action == HDA_FIXUP_ACT_PRE_PROBE) {
11323 snd_hda_override_pin_caps(codec, 0x18, 0x00000734);
11324 snd_hda_override_pin_caps(codec, 0x19, 0x0000073c);
11329 static void alc660vd_fixup_asus_gpio1(struct hda_codec *codec,
11330 const struct hda_fixup *fix, int action)
11332 struct alc_spec *spec = codec->spec;
11334 if (action == HDA_FIXUP_ACT_PRE_PROBE)
11335 spec->gpio_mask |= 0x02;
11336 alc_fixup_gpio(codec, action, 0x01);
11339 static const struct hda_fixup alc861vd_fixups[] = {
11340 [ALC660VD_FIX_ASUS_GPIO1] = {
11341 .type = HDA_FIXUP_FUNC,
11342 .v.func = alc660vd_fixup_asus_gpio1,
11344 [ALC861VD_FIX_DALLAS] = {
11345 .type = HDA_FIXUP_FUNC,
11346 .v.func = alc861vd_fixup_dallas,
11350 static const struct snd_pci_quirk alc861vd_fixup_tbl[] = {
11351 SND_PCI_QUIRK(0x103c, 0x30bf, "HP TX1000", ALC861VD_FIX_DALLAS),
11352 SND_PCI_QUIRK(0x1043, 0x1339, "ASUS A7-K", ALC660VD_FIX_ASUS_GPIO1),
11353 SND_PCI_QUIRK(0x1179, 0xff31, "Toshiba L30-149", ALC861VD_FIX_DALLAS),
11359 static int patch_alc861vd(struct hda_codec *codec)
11361 struct alc_spec *spec;
11364 err = alc_alloc_spec(codec, 0x0b);
11368 spec = codec->spec;
11369 if (has_cdefine_beep(codec))
11370 spec->gen.beep_nid = 0x23;
11372 spec->shutup = alc_eapd_shutup;
11374 alc_pre_init(codec);
11376 snd_hda_pick_fixup(codec, NULL, alc861vd_fixup_tbl, alc861vd_fixups);
11377 snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PRE_PROBE);
11379 /* automatic parse from the BIOS config */
11380 err = alc861vd_parse_auto_config(codec);
11384 if (!spec->gen.no_analog) {
11385 err = set_beep_amp(spec, 0x0b, 0x05, HDA_INPUT);
11390 snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PROBE);
11402 * ALC662 is almost identical with ALC880 but has cleaner and more flexible
11403 * configuration. Each pin widget can choose any input DACs and a mixer.
11404 * Each ADC is connected from a mixer of all inputs. This makes possible
11405 * 6-channel independent captures.
11407 * In addition, an independent DAC for the multi-playback (not used in this
11412 * BIOS auto configuration
11415 static int alc662_parse_auto_config(struct hda_codec *codec)
11417 static const hda_nid_t alc662_ignore[] = { 0x1d, 0 };
11418 static const hda_nid_t alc663_ssids[] = { 0x15, 0x1b, 0x14, 0x21 };
11419 static const hda_nid_t alc662_ssids[] = { 0x15, 0x1b, 0x14, 0 };
11420 const hda_nid_t *ssids;
11422 if (codec->core.vendor_id == 0x10ec0272 || codec->core.vendor_id == 0x10ec0663 ||
11423 codec->core.vendor_id == 0x10ec0665 || codec->core.vendor_id == 0x10ec0670 ||
11424 codec->core.vendor_id == 0x10ec0671)
11425 ssids = alc663_ssids;
11427 ssids = alc662_ssids;
11428 return alc_parse_auto_config(codec, alc662_ignore, ssids);
11431 static void alc272_fixup_mario(struct hda_codec *codec,
11432 const struct hda_fixup *fix, int action)
11434 if (action != HDA_FIXUP_ACT_PRE_PROBE)
11436 if (snd_hda_override_amp_caps(codec, 0x2, HDA_OUTPUT,
11437 (0x3b << AC_AMPCAP_OFFSET_SHIFT) |
11438 (0x3b << AC_AMPCAP_NUM_STEPS_SHIFT) |
11439 (0x03 << AC_AMPCAP_STEP_SIZE_SHIFT) |
11440 (0 << AC_AMPCAP_MUTE_SHIFT)))
11441 codec_warn(codec, "failed to override amp caps for NID 0x2\n");
11444 static const struct snd_pcm_chmap_elem asus_pcm_2_1_chmaps[] = {
11446 .map = { SNDRV_CHMAP_FL, SNDRV_CHMAP_FR } },
11448 .map = { SNDRV_CHMAP_FL, SNDRV_CHMAP_FR,
11449 SNDRV_CHMAP_NA, SNDRV_CHMAP_LFE } }, /* LFE only on right */
11453 /* override the 2.1 chmap */
11454 static void alc_fixup_bass_chmap(struct hda_codec *codec,
11455 const struct hda_fixup *fix, int action)
11457 if (action == HDA_FIXUP_ACT_BUILD) {
11458 struct alc_spec *spec = codec->spec;
11459 spec->gen.pcm_rec[0]->stream[0].chmap = asus_pcm_2_1_chmaps;
11463 /* avoid D3 for keeping GPIO up */
11464 static unsigned int gpio_led_power_filter(struct hda_codec *codec,
11466 unsigned int power_state)
11468 struct alc_spec *spec = codec->spec;
11469 if (nid == codec->core.afg && power_state == AC_PWRST_D3 && spec->gpio_data)
11470 return AC_PWRST_D0;
11471 return power_state;
11474 static void alc662_fixup_led_gpio1(struct hda_codec *codec,
11475 const struct hda_fixup *fix, int action)
11477 struct alc_spec *spec = codec->spec;
11479 alc_fixup_hp_gpio_led(codec, action, 0x01, 0);
11480 if (action == HDA_FIXUP_ACT_PRE_PROBE) {
11481 spec->mute_led_polarity = 1;
11482 codec->power_filter = gpio_led_power_filter;
11486 static void alc662_usi_automute_hook(struct hda_codec *codec,
11487 struct hda_jack_callback *jack)
11489 struct alc_spec *spec = codec->spec;
11492 snd_hda_gen_hp_automute(codec, jack);
11494 vref = spec->gen.hp_jack_present ? PIN_VREF80 : 0;
11496 snd_hda_codec_write(codec, 0x19, 0, AC_VERB_SET_PIN_WIDGET_CONTROL,
11500 static void alc662_fixup_usi_headset_mic(struct hda_codec *codec,
11501 const struct hda_fixup *fix, int action)
11503 struct alc_spec *spec = codec->spec;
11504 if (action == HDA_FIXUP_ACT_PRE_PROBE) {
11505 spec->parse_flags |= HDA_PINCFG_HEADSET_MIC;
11506 spec->gen.hp_automute_hook = alc662_usi_automute_hook;
11510 static void alc662_aspire_ethos_mute_speakers(struct hda_codec *codec,
11511 struct hda_jack_callback *cb)
11513 /* surround speakers at 0x1b already get muted automatically when
11514 * headphones are plugged in, but we have to mute/unmute the remaining
11515 * channels manually:
11516 * 0x15 - front left/front right
11517 * 0x18 - front center/ LFE
11519 if (snd_hda_jack_detect_state(codec, 0x1b) == HDA_JACK_PRESENT) {
11520 snd_hda_set_pin_ctl_cache(codec, 0x15, 0);
11521 snd_hda_set_pin_ctl_cache(codec, 0x18, 0);
11523 snd_hda_set_pin_ctl_cache(codec, 0x15, PIN_OUT);
11524 snd_hda_set_pin_ctl_cache(codec, 0x18, PIN_OUT);
11528 static void alc662_fixup_aspire_ethos_hp(struct hda_codec *codec,
11529 const struct hda_fixup *fix, int action)
11531 /* Pin 0x1b: shared headphones jack and surround speakers */
11532 if (!is_jack_detectable(codec, 0x1b))
11536 case HDA_FIXUP_ACT_PRE_PROBE:
11537 snd_hda_jack_detect_enable_callback(codec, 0x1b,
11538 alc662_aspire_ethos_mute_speakers);
11539 /* subwoofer needs an extra GPIO setting to become audible */
11540 alc_setup_gpio(codec, 0x02);
11542 case HDA_FIXUP_ACT_INIT:
11543 /* Make sure to start in a correct state, i.e. if
11544 * headphones have been plugged in before powering up the system
11546 alc662_aspire_ethos_mute_speakers(codec, NULL);
11551 static void alc671_fixup_hp_headset_mic2(struct hda_codec *codec,
11552 const struct hda_fixup *fix, int action)
11554 struct alc_spec *spec = codec->spec;
11556 static const struct hda_pintbl pincfgs[] = {
11557 { 0x19, 0x02a11040 }, /* use as headset mic, with its own jack detect */
11558 { 0x1b, 0x0181304f },
11563 case HDA_FIXUP_ACT_PRE_PROBE:
11564 spec->gen.mixer_nid = 0;
11565 spec->parse_flags |= HDA_PINCFG_HEADSET_MIC;
11566 snd_hda_apply_pincfgs(codec, pincfgs);
11568 case HDA_FIXUP_ACT_INIT:
11569 alc_write_coef_idx(codec, 0x19, 0xa054);
11574 static void alc897_hp_automute_hook(struct hda_codec *codec,
11575 struct hda_jack_callback *jack)
11577 struct alc_spec *spec = codec->spec;
11580 snd_hda_gen_hp_automute(codec, jack);
11581 vref = spec->gen.hp_jack_present ? (PIN_HP | AC_PINCTL_VREF_100) : PIN_HP;
11582 snd_hda_set_pin_ctl(codec, 0x1b, vref);
11585 static void alc897_fixup_lenovo_headset_mic(struct hda_codec *codec,
11586 const struct hda_fixup *fix, int action)
11588 struct alc_spec *spec = codec->spec;
11589 if (action == HDA_FIXUP_ACT_PRE_PROBE) {
11590 spec->gen.hp_automute_hook = alc897_hp_automute_hook;
11591 spec->no_shutup_pins = 1;
11593 if (action == HDA_FIXUP_ACT_PROBE) {
11594 snd_hda_set_pin_ctl_cache(codec, 0x1a, PIN_IN | AC_PINCTL_VREF_100);
11598 static void alc897_fixup_lenovo_headset_mode(struct hda_codec *codec,
11599 const struct hda_fixup *fix, int action)
11601 struct alc_spec *spec = codec->spec;
11603 if (action == HDA_FIXUP_ACT_PRE_PROBE) {
11604 spec->parse_flags |= HDA_PINCFG_HEADSET_MIC;
11605 spec->gen.hp_automute_hook = alc897_hp_automute_hook;
11609 static const struct coef_fw alc668_coefs[] = {
11610 WRITE_COEF(0x01, 0xbebe), WRITE_COEF(0x02, 0xaaaa), WRITE_COEF(0x03, 0x0),
11611 WRITE_COEF(0x04, 0x0180), WRITE_COEF(0x06, 0x0), WRITE_COEF(0x07, 0x0f80),
11612 WRITE_COEF(0x08, 0x0031), WRITE_COEF(0x0a, 0x0060), WRITE_COEF(0x0b, 0x0),
11613 WRITE_COEF(0x0c, 0x7cf7), WRITE_COEF(0x0d, 0x1080), WRITE_COEF(0x0e, 0x7f7f),
11614 WRITE_COEF(0x0f, 0xcccc), WRITE_COEF(0x10, 0xddcc), WRITE_COEF(0x11, 0x0001),
11615 WRITE_COEF(0x13, 0x0), WRITE_COEF(0x14, 0x2aa0), WRITE_COEF(0x17, 0xa940),
11616 WRITE_COEF(0x19, 0x0), WRITE_COEF(0x1a, 0x0), WRITE_COEF(0x1b, 0x0),
11617 WRITE_COEF(0x1c, 0x0), WRITE_COEF(0x1d, 0x0), WRITE_COEF(0x1e, 0x7418),
11618 WRITE_COEF(0x1f, 0x0804), WRITE_COEF(0x20, 0x4200), WRITE_COEF(0x21, 0x0468),
11619 WRITE_COEF(0x22, 0x8ccc), WRITE_COEF(0x23, 0x0250), WRITE_COEF(0x24, 0x7418),
11620 WRITE_COEF(0x27, 0x0), WRITE_COEF(0x28, 0x8ccc), WRITE_COEF(0x2a, 0xff00),
11621 WRITE_COEF(0x2b, 0x8000), WRITE_COEF(0xa7, 0xff00), WRITE_COEF(0xa8, 0x8000),
11622 WRITE_COEF(0xaa, 0x2e17), WRITE_COEF(0xab, 0xa0c0), WRITE_COEF(0xac, 0x0),
11623 WRITE_COEF(0xad, 0x0), WRITE_COEF(0xae, 0x2ac6), WRITE_COEF(0xaf, 0xa480),
11624 WRITE_COEF(0xb0, 0x0), WRITE_COEF(0xb1, 0x0), WRITE_COEF(0xb2, 0x0),
11625 WRITE_COEF(0xb3, 0x0), WRITE_COEF(0xb4, 0x0), WRITE_COEF(0xb5, 0x1040),
11626 WRITE_COEF(0xb6, 0xd697), WRITE_COEF(0xb7, 0x902b), WRITE_COEF(0xb8, 0xd697),
11627 WRITE_COEF(0xb9, 0x902b), WRITE_COEF(0xba, 0xb8ba), WRITE_COEF(0xbb, 0xaaab),
11628 WRITE_COEF(0xbc, 0xaaaf), WRITE_COEF(0xbd, 0x6aaa), WRITE_COEF(0xbe, 0x1c02),
11629 WRITE_COEF(0xc0, 0x00ff), WRITE_COEF(0xc1, 0x0fa6),
11633 static void alc668_restore_default_value(struct hda_codec *codec)
11635 alc_process_coef_fw(codec, alc668_coefs);
11639 ALC662_FIXUP_ASPIRE,
11640 ALC662_FIXUP_LED_GPIO1,
11641 ALC662_FIXUP_IDEAPAD,
11642 ALC272_FIXUP_MARIO,
11643 ALC662_FIXUP_CZC_ET26,
11644 ALC662_FIXUP_CZC_P10T,
11645 ALC662_FIXUP_SKU_IGNORE,
11646 ALC662_FIXUP_HP_RP5800,
11647 ALC662_FIXUP_ASUS_MODE1,
11648 ALC662_FIXUP_ASUS_MODE2,
11649 ALC662_FIXUP_ASUS_MODE3,
11650 ALC662_FIXUP_ASUS_MODE4,
11651 ALC662_FIXUP_ASUS_MODE5,
11652 ALC662_FIXUP_ASUS_MODE6,
11653 ALC662_FIXUP_ASUS_MODE7,
11654 ALC662_FIXUP_ASUS_MODE8,
11655 ALC662_FIXUP_NO_JACK_DETECT,
11656 ALC662_FIXUP_ZOTAC_Z68,
11657 ALC662_FIXUP_INV_DMIC,
11658 ALC662_FIXUP_DELL_MIC_NO_PRESENCE,
11659 ALC668_FIXUP_DELL_MIC_NO_PRESENCE,
11660 ALC662_FIXUP_HEADSET_MODE,
11661 ALC668_FIXUP_HEADSET_MODE,
11662 ALC662_FIXUP_BASS_MODE4_CHMAP,
11663 ALC662_FIXUP_BASS_16,
11664 ALC662_FIXUP_BASS_1A,
11665 ALC662_FIXUP_BASS_CHMAP,
11666 ALC668_FIXUP_AUTO_MUTE,
11667 ALC668_FIXUP_DELL_DISABLE_AAMIX,
11668 ALC668_FIXUP_DELL_XPS13,
11669 ALC662_FIXUP_ASUS_Nx50,
11670 ALC668_FIXUP_ASUS_Nx51_HEADSET_MODE,
11671 ALC668_FIXUP_ASUS_Nx51,
11672 ALC668_FIXUP_MIC_COEF,
11673 ALC668_FIXUP_ASUS_G751,
11674 ALC891_FIXUP_HEADSET_MODE,
11675 ALC891_FIXUP_DELL_MIC_NO_PRESENCE,
11676 ALC662_FIXUP_ACER_VERITON,
11677 ALC892_FIXUP_ASROCK_MOBO,
11678 ALC662_FIXUP_USI_FUNC,
11679 ALC662_FIXUP_USI_HEADSET_MODE,
11680 ALC662_FIXUP_LENOVO_MULTI_CODECS,
11681 ALC669_FIXUP_ACER_ASPIRE_ETHOS,
11682 ALC669_FIXUP_ACER_ASPIRE_ETHOS_HEADSET,
11683 ALC671_FIXUP_HP_HEADSET_MIC2,
11684 ALC662_FIXUP_ACER_X2660G_HEADSET_MODE,
11685 ALC662_FIXUP_ACER_NITRO_HEADSET_MODE,
11686 ALC668_FIXUP_ASUS_NO_HEADSET_MIC,
11687 ALC668_FIXUP_HEADSET_MIC,
11688 ALC668_FIXUP_MIC_DET_COEF,
11689 ALC897_FIXUP_LENOVO_HEADSET_MIC,
11690 ALC897_FIXUP_HEADSET_MIC_PIN,
11691 ALC897_FIXUP_HP_HSMIC_VERB,
11692 ALC897_FIXUP_LENOVO_HEADSET_MODE,
11693 ALC897_FIXUP_HEADSET_MIC_PIN2,
11694 ALC897_FIXUP_UNIS_H3C_X500S,
11697 static const struct hda_fixup alc662_fixups[] = {
11698 [ALC662_FIXUP_ASPIRE] = {
11699 .type = HDA_FIXUP_PINS,
11700 .v.pins = (const struct hda_pintbl[]) {
11701 { 0x15, 0x99130112 }, /* subwoofer */
11705 [ALC662_FIXUP_LED_GPIO1] = {
11706 .type = HDA_FIXUP_FUNC,
11707 .v.func = alc662_fixup_led_gpio1,
11709 [ALC662_FIXUP_IDEAPAD] = {
11710 .type = HDA_FIXUP_PINS,
11711 .v.pins = (const struct hda_pintbl[]) {
11712 { 0x17, 0x99130112 }, /* subwoofer */
11716 .chain_id = ALC662_FIXUP_LED_GPIO1,
11718 [ALC272_FIXUP_MARIO] = {
11719 .type = HDA_FIXUP_FUNC,
11720 .v.func = alc272_fixup_mario,
11722 [ALC662_FIXUP_CZC_ET26] = {
11723 .type = HDA_FIXUP_PINS,
11724 .v.pins = (const struct hda_pintbl[]) {
11725 {0x12, 0x403cc000},
11726 {0x14, 0x90170110}, /* speaker */
11727 {0x15, 0x411111f0},
11728 {0x16, 0x411111f0},
11729 {0x18, 0x01a19030}, /* mic */
11730 {0x19, 0x90a7013f}, /* int-mic */
11731 {0x1a, 0x01014020},
11732 {0x1b, 0x0121401f},
11733 {0x1c, 0x411111f0},
11734 {0x1d, 0x411111f0},
11735 {0x1e, 0x40478e35},
11739 .chain_id = ALC662_FIXUP_SKU_IGNORE
11741 [ALC662_FIXUP_CZC_P10T] = {
11742 .type = HDA_FIXUP_VERBS,
11743 .v.verbs = (const struct hda_verb[]) {
11744 {0x14, AC_VERB_SET_EAPD_BTLENABLE, 0},
11748 [ALC662_FIXUP_SKU_IGNORE] = {
11749 .type = HDA_FIXUP_FUNC,
11750 .v.func = alc_fixup_sku_ignore,
11752 [ALC662_FIXUP_HP_RP5800] = {
11753 .type = HDA_FIXUP_PINS,
11754 .v.pins = (const struct hda_pintbl[]) {
11755 { 0x14, 0x0221201f }, /* HP out */
11759 .chain_id = ALC662_FIXUP_SKU_IGNORE
11761 [ALC662_FIXUP_ASUS_MODE1] = {
11762 .type = HDA_FIXUP_PINS,
11763 .v.pins = (const struct hda_pintbl[]) {
11764 { 0x14, 0x99130110 }, /* speaker */
11765 { 0x18, 0x01a19c20 }, /* mic */
11766 { 0x19, 0x99a3092f }, /* int-mic */
11767 { 0x21, 0x0121401f }, /* HP out */
11771 .chain_id = ALC662_FIXUP_SKU_IGNORE
11773 [ALC662_FIXUP_ASUS_MODE2] = {
11774 .type = HDA_FIXUP_PINS,
11775 .v.pins = (const struct hda_pintbl[]) {
11776 { 0x14, 0x99130110 }, /* speaker */
11777 { 0x18, 0x01a19820 }, /* mic */
11778 { 0x19, 0x99a3092f }, /* int-mic */
11779 { 0x1b, 0x0121401f }, /* HP out */
11783 .chain_id = ALC662_FIXUP_SKU_IGNORE
11785 [ALC662_FIXUP_ASUS_MODE3] = {
11786 .type = HDA_FIXUP_PINS,
11787 .v.pins = (const struct hda_pintbl[]) {
11788 { 0x14, 0x99130110 }, /* speaker */
11789 { 0x15, 0x0121441f }, /* HP */
11790 { 0x18, 0x01a19840 }, /* mic */
11791 { 0x19, 0x99a3094f }, /* int-mic */
11792 { 0x21, 0x01211420 }, /* HP2 */
11796 .chain_id = ALC662_FIXUP_SKU_IGNORE
11798 [ALC662_FIXUP_ASUS_MODE4] = {
11799 .type = HDA_FIXUP_PINS,
11800 .v.pins = (const struct hda_pintbl[]) {
11801 { 0x14, 0x99130110 }, /* speaker */
11802 { 0x16, 0x99130111 }, /* speaker */
11803 { 0x18, 0x01a19840 }, /* mic */
11804 { 0x19, 0x99a3094f }, /* int-mic */
11805 { 0x21, 0x0121441f }, /* HP */
11809 .chain_id = ALC662_FIXUP_SKU_IGNORE
11811 [ALC662_FIXUP_ASUS_MODE5] = {
11812 .type = HDA_FIXUP_PINS,
11813 .v.pins = (const struct hda_pintbl[]) {
11814 { 0x14, 0x99130110 }, /* speaker */
11815 { 0x15, 0x0121441f }, /* HP */
11816 { 0x16, 0x99130111 }, /* speaker */
11817 { 0x18, 0x01a19840 }, /* mic */
11818 { 0x19, 0x99a3094f }, /* int-mic */
11822 .chain_id = ALC662_FIXUP_SKU_IGNORE
11824 [ALC662_FIXUP_ASUS_MODE6] = {
11825 .type = HDA_FIXUP_PINS,
11826 .v.pins = (const struct hda_pintbl[]) {
11827 { 0x14, 0x99130110 }, /* speaker */
11828 { 0x15, 0x01211420 }, /* HP2 */
11829 { 0x18, 0x01a19840 }, /* mic */
11830 { 0x19, 0x99a3094f }, /* int-mic */
11831 { 0x1b, 0x0121441f }, /* HP */
11835 .chain_id = ALC662_FIXUP_SKU_IGNORE
11837 [ALC662_FIXUP_ASUS_MODE7] = {
11838 .type = HDA_FIXUP_PINS,
11839 .v.pins = (const struct hda_pintbl[]) {
11840 { 0x14, 0x99130110 }, /* speaker */
11841 { 0x17, 0x99130111 }, /* speaker */
11842 { 0x18, 0x01a19840 }, /* mic */
11843 { 0x19, 0x99a3094f }, /* int-mic */
11844 { 0x1b, 0x01214020 }, /* HP */
11845 { 0x21, 0x0121401f }, /* HP */
11849 .chain_id = ALC662_FIXUP_SKU_IGNORE
11851 [ALC662_FIXUP_ASUS_MODE8] = {
11852 .type = HDA_FIXUP_PINS,
11853 .v.pins = (const struct hda_pintbl[]) {
11854 { 0x14, 0x99130110 }, /* speaker */
11855 { 0x12, 0x99a30970 }, /* int-mic */
11856 { 0x15, 0x01214020 }, /* HP */
11857 { 0x17, 0x99130111 }, /* speaker */
11858 { 0x18, 0x01a19840 }, /* mic */
11859 { 0x21, 0x0121401f }, /* HP */
11863 .chain_id = ALC662_FIXUP_SKU_IGNORE
11865 [ALC662_FIXUP_NO_JACK_DETECT] = {
11866 .type = HDA_FIXUP_FUNC,
11867 .v.func = alc_fixup_no_jack_detect,
11869 [ALC662_FIXUP_ZOTAC_Z68] = {
11870 .type = HDA_FIXUP_PINS,
11871 .v.pins = (const struct hda_pintbl[]) {
11872 { 0x1b, 0x02214020 }, /* Front HP */
11876 [ALC662_FIXUP_INV_DMIC] = {
11877 .type = HDA_FIXUP_FUNC,
11878 .v.func = alc_fixup_inv_dmic,
11880 [ALC668_FIXUP_DELL_XPS13] = {
11881 .type = HDA_FIXUP_FUNC,
11882 .v.func = alc_fixup_dell_xps13,
11884 .chain_id = ALC668_FIXUP_DELL_DISABLE_AAMIX
11886 [ALC668_FIXUP_DELL_DISABLE_AAMIX] = {
11887 .type = HDA_FIXUP_FUNC,
11888 .v.func = alc_fixup_disable_aamix,
11890 .chain_id = ALC668_FIXUP_DELL_MIC_NO_PRESENCE
11892 [ALC668_FIXUP_AUTO_MUTE] = {
11893 .type = HDA_FIXUP_FUNC,
11894 .v.func = alc_fixup_auto_mute_via_amp,
11896 .chain_id = ALC668_FIXUP_DELL_MIC_NO_PRESENCE
11898 [ALC662_FIXUP_DELL_MIC_NO_PRESENCE] = {
11899 .type = HDA_FIXUP_PINS,
11900 .v.pins = (const struct hda_pintbl[]) {
11901 { 0x19, 0x03a1113c }, /* use as headset mic, without its own jack detect */
11902 /* headphone mic by setting pin control of 0x1b (headphone out) to in + vref_50 */
11906 .chain_id = ALC662_FIXUP_HEADSET_MODE
11908 [ALC662_FIXUP_HEADSET_MODE] = {
11909 .type = HDA_FIXUP_FUNC,
11910 .v.func = alc_fixup_headset_mode_alc662,
11912 [ALC668_FIXUP_DELL_MIC_NO_PRESENCE] = {
11913 .type = HDA_FIXUP_PINS,
11914 .v.pins = (const struct hda_pintbl[]) {
11915 { 0x19, 0x03a1913d }, /* use as headphone mic, without its own jack detect */
11916 { 0x1b, 0x03a1113c }, /* use as headset mic, without its own jack detect */
11920 .chain_id = ALC668_FIXUP_HEADSET_MODE
11922 [ALC668_FIXUP_HEADSET_MODE] = {
11923 .type = HDA_FIXUP_FUNC,
11924 .v.func = alc_fixup_headset_mode_alc668,
11926 [ALC662_FIXUP_BASS_MODE4_CHMAP] = {
11927 .type = HDA_FIXUP_FUNC,
11928 .v.func = alc_fixup_bass_chmap,
11930 .chain_id = ALC662_FIXUP_ASUS_MODE4
11932 [ALC662_FIXUP_BASS_16] = {
11933 .type = HDA_FIXUP_PINS,
11934 .v.pins = (const struct hda_pintbl[]) {
11935 {0x16, 0x80106111}, /* bass speaker */
11939 .chain_id = ALC662_FIXUP_BASS_CHMAP,
11941 [ALC662_FIXUP_BASS_1A] = {
11942 .type = HDA_FIXUP_PINS,
11943 .v.pins = (const struct hda_pintbl[]) {
11944 {0x1a, 0x80106111}, /* bass speaker */
11948 .chain_id = ALC662_FIXUP_BASS_CHMAP,
11950 [ALC662_FIXUP_BASS_CHMAP] = {
11951 .type = HDA_FIXUP_FUNC,
11952 .v.func = alc_fixup_bass_chmap,
11954 [ALC662_FIXUP_ASUS_Nx50] = {
11955 .type = HDA_FIXUP_FUNC,
11956 .v.func = alc_fixup_auto_mute_via_amp,
11958 .chain_id = ALC662_FIXUP_BASS_1A
11960 [ALC668_FIXUP_ASUS_Nx51_HEADSET_MODE] = {
11961 .type = HDA_FIXUP_FUNC,
11962 .v.func = alc_fixup_headset_mode_alc668,
11963 .chain_id = ALC662_FIXUP_BASS_CHMAP
11965 [ALC668_FIXUP_ASUS_Nx51] = {
11966 .type = HDA_FIXUP_PINS,
11967 .v.pins = (const struct hda_pintbl[]) {
11968 { 0x19, 0x03a1913d }, /* use as headphone mic, without its own jack detect */
11969 { 0x1a, 0x90170151 }, /* bass speaker */
11970 { 0x1b, 0x03a1113c }, /* use as headset mic, without its own jack detect */
11974 .chain_id = ALC668_FIXUP_ASUS_Nx51_HEADSET_MODE,
11976 [ALC668_FIXUP_MIC_COEF] = {
11977 .type = HDA_FIXUP_VERBS,
11978 .v.verbs = (const struct hda_verb[]) {
11979 { 0x20, AC_VERB_SET_COEF_INDEX, 0xc3 },
11980 { 0x20, AC_VERB_SET_PROC_COEF, 0x4000 },
11984 [ALC668_FIXUP_ASUS_G751] = {
11985 .type = HDA_FIXUP_PINS,
11986 .v.pins = (const struct hda_pintbl[]) {
11987 { 0x16, 0x0421101f }, /* HP */
11991 .chain_id = ALC668_FIXUP_MIC_COEF
11993 [ALC891_FIXUP_HEADSET_MODE] = {
11994 .type = HDA_FIXUP_FUNC,
11995 .v.func = alc_fixup_headset_mode,
11997 [ALC891_FIXUP_DELL_MIC_NO_PRESENCE] = {
11998 .type = HDA_FIXUP_PINS,
11999 .v.pins = (const struct hda_pintbl[]) {
12000 { 0x19, 0x03a1913d }, /* use as headphone mic, without its own jack detect */
12001 { 0x1b, 0x03a1113c }, /* use as headset mic, without its own jack detect */
12005 .chain_id = ALC891_FIXUP_HEADSET_MODE
12007 [ALC662_FIXUP_ACER_VERITON] = {
12008 .type = HDA_FIXUP_PINS,
12009 .v.pins = (const struct hda_pintbl[]) {
12010 { 0x15, 0x50170120 }, /* no internal speaker */
12014 [ALC892_FIXUP_ASROCK_MOBO] = {
12015 .type = HDA_FIXUP_PINS,
12016 .v.pins = (const struct hda_pintbl[]) {
12017 { 0x15, 0x40f000f0 }, /* disabled */
12018 { 0x16, 0x40f000f0 }, /* disabled */
12022 [ALC662_FIXUP_USI_FUNC] = {
12023 .type = HDA_FIXUP_FUNC,
12024 .v.func = alc662_fixup_usi_headset_mic,
12026 [ALC662_FIXUP_USI_HEADSET_MODE] = {
12027 .type = HDA_FIXUP_PINS,
12028 .v.pins = (const struct hda_pintbl[]) {
12029 { 0x19, 0x02a1913c }, /* use as headset mic, without its own jack detect */
12030 { 0x18, 0x01a1903d },
12034 .chain_id = ALC662_FIXUP_USI_FUNC
12036 [ALC662_FIXUP_LENOVO_MULTI_CODECS] = {
12037 .type = HDA_FIXUP_FUNC,
12038 .v.func = alc233_alc662_fixup_lenovo_dual_codecs,
12040 [ALC669_FIXUP_ACER_ASPIRE_ETHOS_HEADSET] = {
12041 .type = HDA_FIXUP_FUNC,
12042 .v.func = alc662_fixup_aspire_ethos_hp,
12044 [ALC669_FIXUP_ACER_ASPIRE_ETHOS] = {
12045 .type = HDA_FIXUP_PINS,
12046 .v.pins = (const struct hda_pintbl[]) {
12047 { 0x15, 0x92130110 }, /* front speakers */
12048 { 0x18, 0x99130111 }, /* center/subwoofer */
12049 { 0x1b, 0x11130012 }, /* surround plus jack for HP */
12053 .chain_id = ALC669_FIXUP_ACER_ASPIRE_ETHOS_HEADSET
12055 [ALC671_FIXUP_HP_HEADSET_MIC2] = {
12056 .type = HDA_FIXUP_FUNC,
12057 .v.func = alc671_fixup_hp_headset_mic2,
12059 [ALC662_FIXUP_ACER_X2660G_HEADSET_MODE] = {
12060 .type = HDA_FIXUP_PINS,
12061 .v.pins = (const struct hda_pintbl[]) {
12062 { 0x1a, 0x02a1113c }, /* use as headset mic, without its own jack detect */
12066 .chain_id = ALC662_FIXUP_USI_FUNC
12068 [ALC662_FIXUP_ACER_NITRO_HEADSET_MODE] = {
12069 .type = HDA_FIXUP_PINS,
12070 .v.pins = (const struct hda_pintbl[]) {
12071 { 0x1a, 0x01a11140 }, /* use as headset mic, without its own jack detect */
12072 { 0x1b, 0x0221144f },
12076 .chain_id = ALC662_FIXUP_USI_FUNC
12078 [ALC668_FIXUP_ASUS_NO_HEADSET_MIC] = {
12079 .type = HDA_FIXUP_PINS,
12080 .v.pins = (const struct hda_pintbl[]) {
12081 { 0x1b, 0x04a1112c },
12085 .chain_id = ALC668_FIXUP_HEADSET_MIC
12087 [ALC668_FIXUP_HEADSET_MIC] = {
12088 .type = HDA_FIXUP_FUNC,
12089 .v.func = alc269_fixup_headset_mic,
12091 .chain_id = ALC668_FIXUP_MIC_DET_COEF
12093 [ALC668_FIXUP_MIC_DET_COEF] = {
12094 .type = HDA_FIXUP_VERBS,
12095 .v.verbs = (const struct hda_verb[]) {
12096 { 0x20, AC_VERB_SET_COEF_INDEX, 0x15 },
12097 { 0x20, AC_VERB_SET_PROC_COEF, 0x0d60 },
12101 [ALC897_FIXUP_LENOVO_HEADSET_MIC] = {
12102 .type = HDA_FIXUP_FUNC,
12103 .v.func = alc897_fixup_lenovo_headset_mic,
12105 [ALC897_FIXUP_HEADSET_MIC_PIN] = {
12106 .type = HDA_FIXUP_PINS,
12107 .v.pins = (const struct hda_pintbl[]) {
12108 { 0x1a, 0x03a11050 },
12112 .chain_id = ALC897_FIXUP_LENOVO_HEADSET_MIC
12114 [ALC897_FIXUP_HP_HSMIC_VERB] = {
12115 .type = HDA_FIXUP_PINS,
12116 .v.pins = (const struct hda_pintbl[]) {
12117 { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */
12121 [ALC897_FIXUP_LENOVO_HEADSET_MODE] = {
12122 .type = HDA_FIXUP_FUNC,
12123 .v.func = alc897_fixup_lenovo_headset_mode,
12125 [ALC897_FIXUP_HEADSET_MIC_PIN2] = {
12126 .type = HDA_FIXUP_PINS,
12127 .v.pins = (const struct hda_pintbl[]) {
12128 { 0x1a, 0x01a11140 }, /* use as headset mic, without its own jack detect */
12132 .chain_id = ALC897_FIXUP_LENOVO_HEADSET_MODE
12134 [ALC897_FIXUP_UNIS_H3C_X500S] = {
12135 .type = HDA_FIXUP_VERBS,
12136 .v.verbs = (const struct hda_verb[]) {
12137 { 0x14, AC_VERB_SET_EAPD_BTLENABLE, 0 },
12143 static const struct snd_pci_quirk alc662_fixup_tbl[] = {
12144 SND_PCI_QUIRK(0x1019, 0x9087, "ECS", ALC662_FIXUP_ASUS_MODE2),
12145 SND_PCI_QUIRK(0x1025, 0x022f, "Acer Aspire One", ALC662_FIXUP_INV_DMIC),
12146 SND_PCI_QUIRK(0x1025, 0x0241, "Packard Bell DOTS", ALC662_FIXUP_INV_DMIC),
12147 SND_PCI_QUIRK(0x1025, 0x0308, "Acer Aspire 8942G", ALC662_FIXUP_ASPIRE),
12148 SND_PCI_QUIRK(0x1025, 0x031c, "Gateway NV79", ALC662_FIXUP_SKU_IGNORE),
12149 SND_PCI_QUIRK(0x1025, 0x0349, "eMachines eM250", ALC662_FIXUP_INV_DMIC),
12150 SND_PCI_QUIRK(0x1025, 0x034a, "Gateway LT27", ALC662_FIXUP_INV_DMIC),
12151 SND_PCI_QUIRK(0x1025, 0x038b, "Acer Aspire 8943G", ALC662_FIXUP_ASPIRE),
12152 SND_PCI_QUIRK(0x1025, 0x0566, "Acer Aspire Ethos 8951G", ALC669_FIXUP_ACER_ASPIRE_ETHOS),
12153 SND_PCI_QUIRK(0x1025, 0x123c, "Acer Nitro N50-600", ALC662_FIXUP_ACER_NITRO_HEADSET_MODE),
12154 SND_PCI_QUIRK(0x1025, 0x124e, "Acer 2660G", ALC662_FIXUP_ACER_X2660G_HEADSET_MODE),
12155 SND_PCI_QUIRK(0x1028, 0x05d8, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE),
12156 SND_PCI_QUIRK(0x1028, 0x05db, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE),
12157 SND_PCI_QUIRK(0x1028, 0x05fe, "Dell XPS 15", ALC668_FIXUP_DELL_XPS13),
12158 SND_PCI_QUIRK(0x1028, 0x060a, "Dell XPS 13", ALC668_FIXUP_DELL_XPS13),
12159 SND_PCI_QUIRK(0x1028, 0x060d, "Dell M3800", ALC668_FIXUP_DELL_XPS13),
12160 SND_PCI_QUIRK(0x1028, 0x0625, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE),
12161 SND_PCI_QUIRK(0x1028, 0x0626, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE),
12162 SND_PCI_QUIRK(0x1028, 0x0696, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE),
12163 SND_PCI_QUIRK(0x1028, 0x0698, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE),
12164 SND_PCI_QUIRK(0x1028, 0x069f, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE),
12165 SND_PCI_QUIRK(0x103c, 0x1632, "HP RP5800", ALC662_FIXUP_HP_RP5800),
12166 SND_PCI_QUIRK(0x103c, 0x870c, "HP", ALC897_FIXUP_HP_HSMIC_VERB),
12167 SND_PCI_QUIRK(0x103c, 0x8719, "HP", ALC897_FIXUP_HP_HSMIC_VERB),
12168 SND_PCI_QUIRK(0x103c, 0x872b, "HP", ALC897_FIXUP_HP_HSMIC_VERB),
12169 SND_PCI_QUIRK(0x103c, 0x873e, "HP", ALC671_FIXUP_HP_HEADSET_MIC2),
12170 SND_PCI_QUIRK(0x103c, 0x8768, "HP Slim Desktop S01", ALC671_FIXUP_HP_HEADSET_MIC2),
12171 SND_PCI_QUIRK(0x103c, 0x877e, "HP 288 Pro G6", ALC671_FIXUP_HP_HEADSET_MIC2),
12172 SND_PCI_QUIRK(0x103c, 0x885f, "HP 288 Pro G8", ALC671_FIXUP_HP_HEADSET_MIC2),
12173 SND_PCI_QUIRK(0x1043, 0x1080, "Asus UX501VW", ALC668_FIXUP_HEADSET_MODE),
12174 SND_PCI_QUIRK(0x1043, 0x11cd, "Asus N550", ALC662_FIXUP_ASUS_Nx50),
12175 SND_PCI_QUIRK(0x1043, 0x129d, "Asus N750", ALC662_FIXUP_ASUS_Nx50),
12176 SND_PCI_QUIRK(0x1043, 0x12ff, "ASUS G751", ALC668_FIXUP_ASUS_G751),
12177 SND_PCI_QUIRK(0x1043, 0x13df, "Asus N550JX", ALC662_FIXUP_BASS_1A),
12178 SND_PCI_QUIRK(0x1043, 0x1477, "ASUS N56VZ", ALC662_FIXUP_BASS_MODE4_CHMAP),
12179 SND_PCI_QUIRK(0x1043, 0x15a7, "ASUS UX51VZH", ALC662_FIXUP_BASS_16),
12180 SND_PCI_QUIRK(0x1043, 0x177d, "ASUS N551", ALC668_FIXUP_ASUS_Nx51),
12181 SND_PCI_QUIRK(0x1043, 0x17bd, "ASUS N751", ALC668_FIXUP_ASUS_Nx51),
12182 SND_PCI_QUIRK(0x1043, 0x185d, "ASUS G551JW", ALC668_FIXUP_ASUS_NO_HEADSET_MIC),
12183 SND_PCI_QUIRK(0x1043, 0x1963, "ASUS X71SL", ALC662_FIXUP_ASUS_MODE8),
12184 SND_PCI_QUIRK(0x1043, 0x1b73, "ASUS N55SF", ALC662_FIXUP_BASS_16),
12185 SND_PCI_QUIRK(0x1043, 0x1bf3, "ASUS N76VZ", ALC662_FIXUP_BASS_MODE4_CHMAP),
12186 SND_PCI_QUIRK(0x1043, 0x8469, "ASUS mobo", ALC662_FIXUP_NO_JACK_DETECT),
12187 SND_PCI_QUIRK(0x105b, 0x0cd6, "Foxconn", ALC662_FIXUP_ASUS_MODE2),
12188 SND_PCI_QUIRK(0x144d, 0xc051, "Samsung R720", ALC662_FIXUP_IDEAPAD),
12189 SND_PCI_QUIRK(0x14cd, 0x5003, "USI", ALC662_FIXUP_USI_HEADSET_MODE),
12190 SND_PCI_QUIRK(0x17aa, 0x1036, "Lenovo P520", ALC662_FIXUP_LENOVO_MULTI_CODECS),
12191 SND_PCI_QUIRK(0x17aa, 0x1057, "Lenovo P360", ALC897_FIXUP_HEADSET_MIC_PIN),
12192 SND_PCI_QUIRK(0x17aa, 0x1064, "Lenovo P3 Tower", ALC897_FIXUP_HEADSET_MIC_PIN),
12193 SND_PCI_QUIRK(0x17aa, 0x32ca, "Lenovo ThinkCentre M80", ALC897_FIXUP_HEADSET_MIC_PIN),
12194 SND_PCI_QUIRK(0x17aa, 0x32cb, "Lenovo ThinkCentre M70", ALC897_FIXUP_HEADSET_MIC_PIN),
12195 SND_PCI_QUIRK(0x17aa, 0x32cf, "Lenovo ThinkCentre M950", ALC897_FIXUP_HEADSET_MIC_PIN),
12196 SND_PCI_QUIRK(0x17aa, 0x32f7, "Lenovo ThinkCentre M90", ALC897_FIXUP_HEADSET_MIC_PIN),
12197 SND_PCI_QUIRK(0x17aa, 0x3321, "Lenovo ThinkCentre M70 Gen4", ALC897_FIXUP_HEADSET_MIC_PIN),
12198 SND_PCI_QUIRK(0x17aa, 0x331b, "Lenovo ThinkCentre M90 Gen4", ALC897_FIXUP_HEADSET_MIC_PIN),
12199 SND_PCI_QUIRK(0x17aa, 0x3364, "Lenovo ThinkCentre M90 Gen5", ALC897_FIXUP_HEADSET_MIC_PIN),
12200 SND_PCI_QUIRK(0x17aa, 0x3742, "Lenovo TianYi510Pro-14IOB", ALC897_FIXUP_HEADSET_MIC_PIN2),
12201 SND_PCI_QUIRK(0x17aa, 0x38af, "Lenovo Ideapad Y550P", ALC662_FIXUP_IDEAPAD),
12202 SND_PCI_QUIRK(0x17aa, 0x3a0d, "Lenovo Ideapad Y550", ALC662_FIXUP_IDEAPAD),
12203 SND_PCI_QUIRK(0x1849, 0x5892, "ASRock B150M", ALC892_FIXUP_ASROCK_MOBO),
12204 SND_PCI_QUIRK(0x19da, 0xa130, "Zotac Z68", ALC662_FIXUP_ZOTAC_Z68),
12205 SND_PCI_QUIRK(0x1b0a, 0x01b8, "ACER Veriton", ALC662_FIXUP_ACER_VERITON),
12206 SND_PCI_QUIRK(0x1b35, 0x1234, "CZC ET26", ALC662_FIXUP_CZC_ET26),
12207 SND_PCI_QUIRK(0x1b35, 0x2206, "CZC P10T", ALC662_FIXUP_CZC_P10T),
12208 SND_PCI_QUIRK(0x1c6c, 0x1239, "Compaq N14JP6-V2", ALC897_FIXUP_HP_HSMIC_VERB),
12211 /* Below is a quirk table taken from the old code.
12212 * Basically the device should work as is without the fixup table.
12213 * If BIOS doesn't give a proper info, enable the corresponding
12216 SND_PCI_QUIRK(0x1043, 0x1000, "ASUS N50Vm", ALC662_FIXUP_ASUS_MODE1),
12217 SND_PCI_QUIRK(0x1043, 0x1092, "ASUS NB", ALC662_FIXUP_ASUS_MODE3),
12218 SND_PCI_QUIRK(0x1043, 0x1173, "ASUS K73Jn", ALC662_FIXUP_ASUS_MODE1),
12219 SND_PCI_QUIRK(0x1043, 0x11c3, "ASUS M70V", ALC662_FIXUP_ASUS_MODE3),
12220 SND_PCI_QUIRK(0x1043, 0x11d3, "ASUS NB", ALC662_FIXUP_ASUS_MODE1),
12221 SND_PCI_QUIRK(0x1043, 0x11f3, "ASUS NB", ALC662_FIXUP_ASUS_MODE2),
12222 SND_PCI_QUIRK(0x1043, 0x1203, "ASUS NB", ALC662_FIXUP_ASUS_MODE1),
12223 SND_PCI_QUIRK(0x1043, 0x1303, "ASUS G60J", ALC662_FIXUP_ASUS_MODE1),
12224 SND_PCI_QUIRK(0x1043, 0x1333, "ASUS G60Jx", ALC662_FIXUP_ASUS_MODE1),
12225 SND_PCI_QUIRK(0x1043, 0x1339, "ASUS NB", ALC662_FIXUP_ASUS_MODE2),
12226 SND_PCI_QUIRK(0x1043, 0x13e3, "ASUS N71JA", ALC662_FIXUP_ASUS_MODE7),
12227 SND_PCI_QUIRK(0x1043, 0x1463, "ASUS N71", ALC662_FIXUP_ASUS_MODE7),
12228 SND_PCI_QUIRK(0x1043, 0x14d3, "ASUS G72", ALC662_FIXUP_ASUS_MODE8),
12229 SND_PCI_QUIRK(0x1043, 0x1563, "ASUS N90", ALC662_FIXUP_ASUS_MODE3),
12230 SND_PCI_QUIRK(0x1043, 0x15d3, "ASUS N50SF F50SF", ALC662_FIXUP_ASUS_MODE1),
12231 SND_PCI_QUIRK(0x1043, 0x16c3, "ASUS NB", ALC662_FIXUP_ASUS_MODE2),
12232 SND_PCI_QUIRK(0x1043, 0x16f3, "ASUS K40C K50C", ALC662_FIXUP_ASUS_MODE2),
12233 SND_PCI_QUIRK(0x1043, 0x1733, "ASUS N81De", ALC662_FIXUP_ASUS_MODE1),
12234 SND_PCI_QUIRK(0x1043, 0x1753, "ASUS NB", ALC662_FIXUP_ASUS_MODE2),
12235 SND_PCI_QUIRK(0x1043, 0x1763, "ASUS NB", ALC662_FIXUP_ASUS_MODE6),
12236 SND_PCI_QUIRK(0x1043, 0x1765, "ASUS NB", ALC662_FIXUP_ASUS_MODE6),
12237 SND_PCI_QUIRK(0x1043, 0x1783, "ASUS NB", ALC662_FIXUP_ASUS_MODE2),
12238 SND_PCI_QUIRK(0x1043, 0x1793, "ASUS F50GX", ALC662_FIXUP_ASUS_MODE1),
12239 SND_PCI_QUIRK(0x1043, 0x17b3, "ASUS F70SL", ALC662_FIXUP_ASUS_MODE3),
12240 SND_PCI_QUIRK(0x1043, 0x17f3, "ASUS X58LE", ALC662_FIXUP_ASUS_MODE2),
12241 SND_PCI_QUIRK(0x1043, 0x1813, "ASUS NB", ALC662_FIXUP_ASUS_MODE2),
12242 SND_PCI_QUIRK(0x1043, 0x1823, "ASUS NB", ALC662_FIXUP_ASUS_MODE5),
12243 SND_PCI_QUIRK(0x1043, 0x1833, "ASUS NB", ALC662_FIXUP_ASUS_MODE6),
12244 SND_PCI_QUIRK(0x1043, 0x1843, "ASUS NB", ALC662_FIXUP_ASUS_MODE2),
12245 SND_PCI_QUIRK(0x1043, 0x1853, "ASUS F50Z", ALC662_FIXUP_ASUS_MODE1),
12246 SND_PCI_QUIRK(0x1043, 0x1864, "ASUS NB", ALC662_FIXUP_ASUS_MODE2),
12247 SND_PCI_QUIRK(0x1043, 0x1876, "ASUS NB", ALC662_FIXUP_ASUS_MODE2),
12248 SND_PCI_QUIRK(0x1043, 0x1893, "ASUS M50Vm", ALC662_FIXUP_ASUS_MODE3),
12249 SND_PCI_QUIRK(0x1043, 0x1894, "ASUS X55", ALC662_FIXUP_ASUS_MODE3),
12250 SND_PCI_QUIRK(0x1043, 0x18b3, "ASUS N80Vc", ALC662_FIXUP_ASUS_MODE1),
12251 SND_PCI_QUIRK(0x1043, 0x18c3, "ASUS VX5", ALC662_FIXUP_ASUS_MODE1),
12252 SND_PCI_QUIRK(0x1043, 0x18d3, "ASUS N81Te", ALC662_FIXUP_ASUS_MODE1),
12253 SND_PCI_QUIRK(0x1043, 0x18f3, "ASUS N505Tp", ALC662_FIXUP_ASUS_MODE1),
12254 SND_PCI_QUIRK(0x1043, 0x1903, "ASUS F5GL", ALC662_FIXUP_ASUS_MODE1),
12255 SND_PCI_QUIRK(0x1043, 0x1913, "ASUS NB", ALC662_FIXUP_ASUS_MODE2),
12256 SND_PCI_QUIRK(0x1043, 0x1933, "ASUS F80Q", ALC662_FIXUP_ASUS_MODE2),
12257 SND_PCI_QUIRK(0x1043, 0x1943, "ASUS Vx3V", ALC662_FIXUP_ASUS_MODE1),
12258 SND_PCI_QUIRK(0x1043, 0x1953, "ASUS NB", ALC662_FIXUP_ASUS_MODE1),
12259 SND_PCI_QUIRK(0x1043, 0x1963, "ASUS X71C", ALC662_FIXUP_ASUS_MODE3),
12260 SND_PCI_QUIRK(0x1043, 0x1983, "ASUS N5051A", ALC662_FIXUP_ASUS_MODE1),
12261 SND_PCI_QUIRK(0x1043, 0x1993, "ASUS N20", ALC662_FIXUP_ASUS_MODE1),
12262 SND_PCI_QUIRK(0x1043, 0x19b3, "ASUS F7Z", ALC662_FIXUP_ASUS_MODE1),
12263 SND_PCI_QUIRK(0x1043, 0x19c3, "ASUS F5Z/F6x", ALC662_FIXUP_ASUS_MODE2),
12264 SND_PCI_QUIRK(0x1043, 0x19e3, "ASUS NB", ALC662_FIXUP_ASUS_MODE1),
12265 SND_PCI_QUIRK(0x1043, 0x19f3, "ASUS NB", ALC662_FIXUP_ASUS_MODE4),
12270 static const struct hda_model_fixup alc662_fixup_models[] = {
12271 {.id = ALC662_FIXUP_ASPIRE, .name = "aspire"},
12272 {.id = ALC662_FIXUP_IDEAPAD, .name = "ideapad"},
12273 {.id = ALC272_FIXUP_MARIO, .name = "mario"},
12274 {.id = ALC662_FIXUP_HP_RP5800, .name = "hp-rp5800"},
12275 {.id = ALC662_FIXUP_ASUS_MODE1, .name = "asus-mode1"},
12276 {.id = ALC662_FIXUP_ASUS_MODE2, .name = "asus-mode2"},
12277 {.id = ALC662_FIXUP_ASUS_MODE3, .name = "asus-mode3"},
12278 {.id = ALC662_FIXUP_ASUS_MODE4, .name = "asus-mode4"},
12279 {.id = ALC662_FIXUP_ASUS_MODE5, .name = "asus-mode5"},
12280 {.id = ALC662_FIXUP_ASUS_MODE6, .name = "asus-mode6"},
12281 {.id = ALC662_FIXUP_ASUS_MODE7, .name = "asus-mode7"},
12282 {.id = ALC662_FIXUP_ASUS_MODE8, .name = "asus-mode8"},
12283 {.id = ALC662_FIXUP_ZOTAC_Z68, .name = "zotac-z68"},
12284 {.id = ALC662_FIXUP_INV_DMIC, .name = "inv-dmic"},
12285 {.id = ALC662_FIXUP_DELL_MIC_NO_PRESENCE, .name = "alc662-headset-multi"},
12286 {.id = ALC668_FIXUP_DELL_MIC_NO_PRESENCE, .name = "dell-headset-multi"},
12287 {.id = ALC662_FIXUP_HEADSET_MODE, .name = "alc662-headset"},
12288 {.id = ALC668_FIXUP_HEADSET_MODE, .name = "alc668-headset"},
12289 {.id = ALC662_FIXUP_BASS_16, .name = "bass16"},
12290 {.id = ALC662_FIXUP_BASS_1A, .name = "bass1a"},
12291 {.id = ALC668_FIXUP_AUTO_MUTE, .name = "automute"},
12292 {.id = ALC668_FIXUP_DELL_XPS13, .name = "dell-xps13"},
12293 {.id = ALC662_FIXUP_ASUS_Nx50, .name = "asus-nx50"},
12294 {.id = ALC668_FIXUP_ASUS_Nx51, .name = "asus-nx51"},
12295 {.id = ALC668_FIXUP_ASUS_G751, .name = "asus-g751"},
12296 {.id = ALC891_FIXUP_HEADSET_MODE, .name = "alc891-headset"},
12297 {.id = ALC891_FIXUP_DELL_MIC_NO_PRESENCE, .name = "alc891-headset-multi"},
12298 {.id = ALC662_FIXUP_ACER_VERITON, .name = "acer-veriton"},
12299 {.id = ALC892_FIXUP_ASROCK_MOBO, .name = "asrock-mobo"},
12300 {.id = ALC662_FIXUP_USI_HEADSET_MODE, .name = "usi-headset"},
12301 {.id = ALC662_FIXUP_LENOVO_MULTI_CODECS, .name = "dual-codecs"},
12302 {.id = ALC669_FIXUP_ACER_ASPIRE_ETHOS, .name = "aspire-ethos"},
12303 {.id = ALC897_FIXUP_UNIS_H3C_X500S, .name = "unis-h3c-x500s"},
12307 static const struct snd_hda_pin_quirk alc662_pin_fixup_tbl[] = {
12308 SND_HDA_PIN_QUIRK(0x10ec0867, 0x1028, "Dell", ALC891_FIXUP_DELL_MIC_NO_PRESENCE,
12309 {0x17, 0x02211010},
12310 {0x18, 0x01a19030},
12311 {0x1a, 0x01813040},
12312 {0x21, 0x01014020}),
12313 SND_HDA_PIN_QUIRK(0x10ec0867, 0x1028, "Dell", ALC891_FIXUP_DELL_MIC_NO_PRESENCE,
12314 {0x16, 0x01813030},
12315 {0x17, 0x02211010},
12316 {0x18, 0x01a19040},
12317 {0x21, 0x01014020}),
12318 SND_HDA_PIN_QUIRK(0x10ec0662, 0x1028, "Dell", ALC662_FIXUP_DELL_MIC_NO_PRESENCE,
12319 {0x14, 0x01014010},
12320 {0x18, 0x01a19020},
12321 {0x1a, 0x0181302f},
12322 {0x1b, 0x0221401f}),
12323 SND_HDA_PIN_QUIRK(0x10ec0668, 0x1028, "Dell", ALC668_FIXUP_AUTO_MUTE,
12324 {0x12, 0x99a30130},
12325 {0x14, 0x90170110},
12326 {0x15, 0x0321101f},
12327 {0x16, 0x03011020}),
12328 SND_HDA_PIN_QUIRK(0x10ec0668, 0x1028, "Dell", ALC668_FIXUP_AUTO_MUTE,
12329 {0x12, 0x99a30140},
12330 {0x14, 0x90170110},
12331 {0x15, 0x0321101f},
12332 {0x16, 0x03011020}),
12333 SND_HDA_PIN_QUIRK(0x10ec0668, 0x1028, "Dell", ALC668_FIXUP_AUTO_MUTE,
12334 {0x12, 0x99a30150},
12335 {0x14, 0x90170110},
12336 {0x15, 0x0321101f},
12337 {0x16, 0x03011020}),
12338 SND_HDA_PIN_QUIRK(0x10ec0668, 0x1028, "Dell", ALC668_FIXUP_AUTO_MUTE,
12339 {0x14, 0x90170110},
12340 {0x15, 0x0321101f},
12341 {0x16, 0x03011020}),
12342 SND_HDA_PIN_QUIRK(0x10ec0668, 0x1028, "Dell XPS 15", ALC668_FIXUP_AUTO_MUTE,
12343 {0x12, 0x90a60130},
12344 {0x14, 0x90170110},
12345 {0x15, 0x0321101f}),
12346 SND_HDA_PIN_QUIRK(0x10ec0671, 0x103c, "HP cPC", ALC671_FIXUP_HP_HEADSET_MIC2,
12347 {0x14, 0x01014010},
12348 {0x17, 0x90170150},
12349 {0x19, 0x02a11060},
12350 {0x1b, 0x01813030},
12351 {0x21, 0x02211020}),
12352 SND_HDA_PIN_QUIRK(0x10ec0671, 0x103c, "HP cPC", ALC671_FIXUP_HP_HEADSET_MIC2,
12353 {0x14, 0x01014010},
12354 {0x18, 0x01a19040},
12355 {0x1b, 0x01813030},
12356 {0x21, 0x02211020}),
12357 SND_HDA_PIN_QUIRK(0x10ec0671, 0x103c, "HP cPC", ALC671_FIXUP_HP_HEADSET_MIC2,
12358 {0x14, 0x01014020},
12359 {0x17, 0x90170110},
12360 {0x18, 0x01a19050},
12361 {0x1b, 0x01813040},
12362 {0x21, 0x02211030}),
12368 static int patch_alc662(struct hda_codec *codec)
12370 struct alc_spec *spec;
12373 err = alc_alloc_spec(codec, 0x0b);
12377 spec = codec->spec;
12379 spec->shutup = alc_eapd_shutup;
12381 /* handle multiple HPs as is */
12382 spec->parse_flags = HDA_PINCFG_NO_HP_FIXUP;
12384 alc_fix_pll_init(codec, 0x20, 0x04, 15);
12386 switch (codec->core.vendor_id) {
12388 spec->init_hook = alc668_restore_default_value;
12392 alc_pre_init(codec);
12394 snd_hda_pick_fixup(codec, alc662_fixup_models,
12395 alc662_fixup_tbl, alc662_fixups);
12396 snd_hda_pick_pin_fixup(codec, alc662_pin_fixup_tbl, alc662_fixups, true);
12397 snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PRE_PROBE);
12399 alc_auto_parse_customize_define(codec);
12401 if (has_cdefine_beep(codec))
12402 spec->gen.beep_nid = 0x01;
12404 if ((alc_get_coef0(codec) & (1 << 14)) &&
12405 codec->bus->pci && codec->bus->pci->subsystem_vendor == 0x1025 &&
12406 spec->cdefine.platform_type == 1) {
12407 err = alc_codec_rename(codec, "ALC272X");
12412 /* automatic parse from the BIOS config */
12413 err = alc662_parse_auto_config(codec);
12417 if (!spec->gen.no_analog && spec->gen.beep_nid) {
12418 switch (codec->core.vendor_id) {
12420 err = set_beep_amp(spec, 0x0b, 0x05, HDA_INPUT);
12426 err = set_beep_amp(spec, 0x0b, 0x04, HDA_INPUT);
12429 err = set_beep_amp(spec, 0x0b, 0x03, HDA_INPUT);
12436 snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PROBE);
12449 static int alc680_parse_auto_config(struct hda_codec *codec)
12451 return alc_parse_auto_config(codec, NULL, NULL);
12456 static int patch_alc680(struct hda_codec *codec)
12460 /* ALC680 has no aa-loopback mixer */
12461 err = alc_alloc_spec(codec, 0);
12465 /* automatic parse from the BIOS config */
12466 err = alc680_parse_auto_config(codec);
12478 static const struct hda_device_id snd_hda_id_realtek[] = {
12479 HDA_CODEC_ENTRY(0x10ec0215, "ALC215", patch_alc269),
12480 HDA_CODEC_ENTRY(0x10ec0221, "ALC221", patch_alc269),
12481 HDA_CODEC_ENTRY(0x10ec0222, "ALC222", patch_alc269),
12482 HDA_CODEC_ENTRY(0x10ec0225, "ALC225", patch_alc269),
12483 HDA_CODEC_ENTRY(0x10ec0230, "ALC236", patch_alc269),
12484 HDA_CODEC_ENTRY(0x10ec0231, "ALC231", patch_alc269),
12485 HDA_CODEC_ENTRY(0x10ec0233, "ALC233", patch_alc269),
12486 HDA_CODEC_ENTRY(0x10ec0234, "ALC234", patch_alc269),
12487 HDA_CODEC_ENTRY(0x10ec0235, "ALC233", patch_alc269),
12488 HDA_CODEC_ENTRY(0x10ec0236, "ALC236", patch_alc269),
12489 HDA_CODEC_ENTRY(0x10ec0245, "ALC245", patch_alc269),
12490 HDA_CODEC_ENTRY(0x10ec0255, "ALC255", patch_alc269),
12491 HDA_CODEC_ENTRY(0x10ec0256, "ALC256", patch_alc269),
12492 HDA_CODEC_ENTRY(0x10ec0257, "ALC257", patch_alc269),
12493 HDA_CODEC_ENTRY(0x10ec0260, "ALC260", patch_alc260),
12494 HDA_CODEC_ENTRY(0x10ec0262, "ALC262", patch_alc262),
12495 HDA_CODEC_ENTRY(0x10ec0267, "ALC267", patch_alc268),
12496 HDA_CODEC_ENTRY(0x10ec0268, "ALC268", patch_alc268),
12497 HDA_CODEC_ENTRY(0x10ec0269, "ALC269", patch_alc269),
12498 HDA_CODEC_ENTRY(0x10ec0270, "ALC270", patch_alc269),
12499 HDA_CODEC_ENTRY(0x10ec0272, "ALC272", patch_alc662),
12500 HDA_CODEC_ENTRY(0x10ec0274, "ALC274", patch_alc269),
12501 HDA_CODEC_ENTRY(0x10ec0275, "ALC275", patch_alc269),
12502 HDA_CODEC_ENTRY(0x10ec0276, "ALC276", patch_alc269),
12503 HDA_CODEC_ENTRY(0x10ec0280, "ALC280", patch_alc269),
12504 HDA_CODEC_ENTRY(0x10ec0282, "ALC282", patch_alc269),
12505 HDA_CODEC_ENTRY(0x10ec0283, "ALC283", patch_alc269),
12506 HDA_CODEC_ENTRY(0x10ec0284, "ALC284", patch_alc269),
12507 HDA_CODEC_ENTRY(0x10ec0285, "ALC285", patch_alc269),
12508 HDA_CODEC_ENTRY(0x10ec0286, "ALC286", patch_alc269),
12509 HDA_CODEC_ENTRY(0x10ec0287, "ALC287", patch_alc269),
12510 HDA_CODEC_ENTRY(0x10ec0288, "ALC288", patch_alc269),
12511 HDA_CODEC_ENTRY(0x10ec0289, "ALC289", patch_alc269),
12512 HDA_CODEC_ENTRY(0x10ec0290, "ALC290", patch_alc269),
12513 HDA_CODEC_ENTRY(0x10ec0292, "ALC292", patch_alc269),
12514 HDA_CODEC_ENTRY(0x10ec0293, "ALC293", patch_alc269),
12515 HDA_CODEC_ENTRY(0x10ec0294, "ALC294", patch_alc269),
12516 HDA_CODEC_ENTRY(0x10ec0295, "ALC295", patch_alc269),
12517 HDA_CODEC_ENTRY(0x10ec0298, "ALC298", patch_alc269),
12518 HDA_CODEC_ENTRY(0x10ec0299, "ALC299", patch_alc269),
12519 HDA_CODEC_ENTRY(0x10ec0300, "ALC300", patch_alc269),
12520 HDA_CODEC_ENTRY(0x10ec0623, "ALC623", patch_alc269),
12521 HDA_CODEC_REV_ENTRY(0x10ec0861, 0x100340, "ALC660", patch_alc861),
12522 HDA_CODEC_ENTRY(0x10ec0660, "ALC660-VD", patch_alc861vd),
12523 HDA_CODEC_ENTRY(0x10ec0861, "ALC861", patch_alc861),
12524 HDA_CODEC_ENTRY(0x10ec0862, "ALC861-VD", patch_alc861vd),
12525 HDA_CODEC_REV_ENTRY(0x10ec0662, 0x100002, "ALC662 rev2", patch_alc882),
12526 HDA_CODEC_REV_ENTRY(0x10ec0662, 0x100101, "ALC662 rev1", patch_alc662),
12527 HDA_CODEC_REV_ENTRY(0x10ec0662, 0x100300, "ALC662 rev3", patch_alc662),
12528 HDA_CODEC_ENTRY(0x10ec0663, "ALC663", patch_alc662),
12529 HDA_CODEC_ENTRY(0x10ec0665, "ALC665", patch_alc662),
12530 HDA_CODEC_ENTRY(0x10ec0667, "ALC667", patch_alc662),
12531 HDA_CODEC_ENTRY(0x10ec0668, "ALC668", patch_alc662),
12532 HDA_CODEC_ENTRY(0x10ec0670, "ALC670", patch_alc662),
12533 HDA_CODEC_ENTRY(0x10ec0671, "ALC671", patch_alc662),
12534 HDA_CODEC_ENTRY(0x10ec0680, "ALC680", patch_alc680),
12535 HDA_CODEC_ENTRY(0x10ec0700, "ALC700", patch_alc269),
12536 HDA_CODEC_ENTRY(0x10ec0701, "ALC701", patch_alc269),
12537 HDA_CODEC_ENTRY(0x10ec0703, "ALC703", patch_alc269),
12538 HDA_CODEC_ENTRY(0x10ec0711, "ALC711", patch_alc269),
12539 HDA_CODEC_ENTRY(0x10ec0867, "ALC891", patch_alc662),
12540 HDA_CODEC_ENTRY(0x10ec0880, "ALC880", patch_alc880),
12541 HDA_CODEC_ENTRY(0x10ec0882, "ALC882", patch_alc882),
12542 HDA_CODEC_ENTRY(0x10ec0883, "ALC883", patch_alc882),
12543 HDA_CODEC_REV_ENTRY(0x10ec0885, 0x100101, "ALC889A", patch_alc882),
12544 HDA_CODEC_REV_ENTRY(0x10ec0885, 0x100103, "ALC889A", patch_alc882),
12545 HDA_CODEC_ENTRY(0x10ec0885, "ALC885", patch_alc882),
12546 HDA_CODEC_ENTRY(0x10ec0887, "ALC887", patch_alc882),
12547 HDA_CODEC_REV_ENTRY(0x10ec0888, 0x100101, "ALC1200", patch_alc882),
12548 HDA_CODEC_ENTRY(0x10ec0888, "ALC888", patch_alc882),
12549 HDA_CODEC_ENTRY(0x10ec0889, "ALC889", patch_alc882),
12550 HDA_CODEC_ENTRY(0x10ec0892, "ALC892", patch_alc662),
12551 HDA_CODEC_ENTRY(0x10ec0897, "ALC897", patch_alc662),
12552 HDA_CODEC_ENTRY(0x10ec0899, "ALC898", patch_alc882),
12553 HDA_CODEC_ENTRY(0x10ec0900, "ALC1150", patch_alc882),
12554 HDA_CODEC_ENTRY(0x10ec0b00, "ALCS1200A", patch_alc882),
12555 HDA_CODEC_ENTRY(0x10ec1168, "ALC1220", patch_alc882),
12556 HDA_CODEC_ENTRY(0x10ec1220, "ALC1220", patch_alc882),
12557 HDA_CODEC_ENTRY(0x19e58326, "HW8326", patch_alc269),
12558 {} /* terminator */
12560 MODULE_DEVICE_TABLE(hdaudio, snd_hda_id_realtek);
12562 MODULE_LICENSE("GPL");
12563 MODULE_DESCRIPTION("Realtek HD-audio codec");
12564 MODULE_IMPORT_NS(SND_HDA_SCODEC_COMPONENT);
12566 static struct hda_codec_driver realtek_driver = {
12567 .id = snd_hda_id_realtek,
12570 module_hda_codec_driver(realtek_driver);