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/init.h>
14 #include <linux/delay.h>
15 #include <linux/slab.h>
16 #include <linux/pci.h>
17 #include <linux/dmi.h>
18 #include <linux/module.h>
19 #include <linux/input.h>
20 #include <linux/leds.h>
21 #include <sound/core.h>
22 #include <sound/jack.h>
23 #include <sound/hda_codec.h>
24 #include "hda_local.h"
25 #include "hda_auto_parser.h"
27 #include "hda_generic.h"
28 #include "hda_component.h"
30 /* keep halting ALC5505 DSP, for power saving */
31 #define HALT_REALTEK_ALC5505
33 /* extra amp-initialization sequence types */
41 ALC_HEADSET_MODE_UNKNOWN
,
42 ALC_HEADSET_MODE_UNPLUGGED
,
43 ALC_HEADSET_MODE_HEADSET
,
45 ALC_HEADSET_MODE_HEADPHONE
,
49 ALC_HEADSET_TYPE_UNKNOWN
,
50 ALC_HEADSET_TYPE_CTIA
,
51 ALC_HEADSET_TYPE_OMTP
,
55 ALC_KEY_MICMUTE_INDEX
,
58 struct alc_customize_define
{
60 unsigned char port_connectivity
;
61 unsigned char check_sum
;
62 unsigned char customization
;
63 unsigned char external_amp
;
64 unsigned int enable_pcbeep
:1;
65 unsigned int platform_type
:1;
67 unsigned int override
:1;
68 unsigned int fixup
:1; /* Means that this sku is set by driver, not read from hw */
79 struct hda_gen_spec gen
; /* must be at head */
81 /* codec parameterization */
82 struct alc_customize_define cdefine
;
83 unsigned int parse_flags
; /* flag for snd_hda_parse_pin_defcfg() */
86 unsigned int gpio_mask
;
87 unsigned int gpio_dir
;
88 unsigned int gpio_data
;
89 bool gpio_write_delay
; /* add a delay before writing gpio_data */
91 /* mute LED for HP laptops, see vref_mute_led_set() */
92 int mute_led_polarity
;
93 int micmute_led_polarity
;
94 hda_nid_t mute_led_nid
;
95 hda_nid_t cap_mute_led_nid
;
97 unsigned int gpio_mute_led_mask
;
98 unsigned int gpio_mic_led_mask
;
99 struct alc_coef_led mute_led_coef
;
100 struct alc_coef_led mic_led_coef
;
101 struct mutex coef_mutex
;
103 hda_nid_t headset_mic_pin
;
104 hda_nid_t headphone_mic_pin
;
105 int current_headset_mode
;
106 int current_headset_type
;
109 void (*init_hook
)(struct hda_codec
*codec
);
111 void (*power_hook
)(struct hda_codec
*codec
);
113 void (*shutup
)(struct hda_codec
*codec
);
116 int codec_variant
; /* flag for other variants */
117 unsigned int has_alc5505_dsp
:1;
118 unsigned int no_depop_delay
:1;
119 unsigned int done_hp_init
:1;
120 unsigned int no_shutup_pins
:1;
121 unsigned int ultra_low_power
:1;
122 unsigned int has_hs_key
:1;
123 unsigned int no_internal_mic_pin
:1;
127 unsigned int pll_coef_idx
, pll_coef_bit
;
129 struct input_dev
*kb_dev
;
130 u8 alc_mute_keycode_map
[1];
132 /* component binding */
133 struct component_match
*match
;
134 struct hda_component comps
[HDA_MAX_COMPONENTS
];
138 * COEF access helper functions
141 static void coef_mutex_lock(struct hda_codec
*codec
)
143 struct alc_spec
*spec
= codec
->spec
;
145 snd_hda_power_up_pm(codec
);
146 mutex_lock(&spec
->coef_mutex
);
149 static void coef_mutex_unlock(struct hda_codec
*codec
)
151 struct alc_spec
*spec
= codec
->spec
;
153 mutex_unlock(&spec
->coef_mutex
);
154 snd_hda_power_down_pm(codec
);
157 static int __alc_read_coefex_idx(struct hda_codec
*codec
, hda_nid_t nid
,
158 unsigned int coef_idx
)
162 snd_hda_codec_write(codec
, nid
, 0, AC_VERB_SET_COEF_INDEX
, coef_idx
);
163 val
= snd_hda_codec_read(codec
, nid
, 0, AC_VERB_GET_PROC_COEF
, 0);
167 static int alc_read_coefex_idx(struct hda_codec
*codec
, hda_nid_t nid
,
168 unsigned int coef_idx
)
172 coef_mutex_lock(codec
);
173 val
= __alc_read_coefex_idx(codec
, nid
, coef_idx
);
174 coef_mutex_unlock(codec
);
178 #define alc_read_coef_idx(codec, coef_idx) \
179 alc_read_coefex_idx(codec, 0x20, coef_idx)
181 static void __alc_write_coefex_idx(struct hda_codec
*codec
, hda_nid_t nid
,
182 unsigned int coef_idx
, unsigned int coef_val
)
184 snd_hda_codec_write(codec
, nid
, 0, AC_VERB_SET_COEF_INDEX
, coef_idx
);
185 snd_hda_codec_write(codec
, nid
, 0, AC_VERB_SET_PROC_COEF
, coef_val
);
188 static void alc_write_coefex_idx(struct hda_codec
*codec
, hda_nid_t nid
,
189 unsigned int coef_idx
, unsigned int coef_val
)
191 coef_mutex_lock(codec
);
192 __alc_write_coefex_idx(codec
, nid
, coef_idx
, coef_val
);
193 coef_mutex_unlock(codec
);
196 #define alc_write_coef_idx(codec, coef_idx, coef_val) \
197 alc_write_coefex_idx(codec, 0x20, coef_idx, coef_val)
199 static void __alc_update_coefex_idx(struct hda_codec
*codec
, hda_nid_t nid
,
200 unsigned int coef_idx
, unsigned int mask
,
201 unsigned int bits_set
)
203 unsigned int val
= __alc_read_coefex_idx(codec
, nid
, coef_idx
);
206 __alc_write_coefex_idx(codec
, nid
, coef_idx
,
207 (val
& ~mask
) | bits_set
);
210 static void alc_update_coefex_idx(struct hda_codec
*codec
, hda_nid_t nid
,
211 unsigned int coef_idx
, unsigned int mask
,
212 unsigned int bits_set
)
214 coef_mutex_lock(codec
);
215 __alc_update_coefex_idx(codec
, nid
, coef_idx
, mask
, bits_set
);
216 coef_mutex_unlock(codec
);
219 #define alc_update_coef_idx(codec, coef_idx, mask, bits_set) \
220 alc_update_coefex_idx(codec, 0x20, coef_idx, mask, bits_set)
222 /* a special bypass for COEF 0; read the cached value at the second time */
223 static unsigned int alc_get_coef0(struct hda_codec
*codec
)
225 struct alc_spec
*spec
= codec
->spec
;
228 spec
->coef0
= alc_read_coef_idx(codec
, 0);
232 /* coef writes/updates batch */
240 #define UPDATE_COEFEX(_nid, _idx, _mask, _val) \
241 { .nid = (_nid), .idx = (_idx), .mask = (_mask), .val = (_val) }
242 #define WRITE_COEFEX(_nid, _idx, _val) UPDATE_COEFEX(_nid, _idx, -1, _val)
243 #define WRITE_COEF(_idx, _val) WRITE_COEFEX(0x20, _idx, _val)
244 #define UPDATE_COEF(_idx, _mask, _val) UPDATE_COEFEX(0x20, _idx, _mask, _val)
246 static void alc_process_coef_fw(struct hda_codec
*codec
,
247 const struct coef_fw
*fw
)
249 coef_mutex_lock(codec
);
250 for (; fw
->nid
; fw
++) {
251 if (fw
->mask
== (unsigned short)-1)
252 __alc_write_coefex_idx(codec
, fw
->nid
, fw
->idx
, fw
->val
);
254 __alc_update_coefex_idx(codec
, fw
->nid
, fw
->idx
,
257 coef_mutex_unlock(codec
);
261 * GPIO setup tables, used in initialization
264 /* Enable GPIO mask and set output */
265 static void alc_setup_gpio(struct hda_codec
*codec
, unsigned int mask
)
267 struct alc_spec
*spec
= codec
->spec
;
269 spec
->gpio_mask
|= mask
;
270 spec
->gpio_dir
|= mask
;
271 spec
->gpio_data
|= mask
;
274 static void alc_write_gpio_data(struct hda_codec
*codec
)
276 struct alc_spec
*spec
= codec
->spec
;
278 snd_hda_codec_write(codec
, 0x01, 0, AC_VERB_SET_GPIO_DATA
,
282 static void alc_update_gpio_data(struct hda_codec
*codec
, unsigned int mask
,
285 struct alc_spec
*spec
= codec
->spec
;
286 unsigned int oldval
= spec
->gpio_data
;
289 spec
->gpio_data
|= mask
;
291 spec
->gpio_data
&= ~mask
;
292 if (oldval
!= spec
->gpio_data
)
293 alc_write_gpio_data(codec
);
296 static void alc_write_gpio(struct hda_codec
*codec
)
298 struct alc_spec
*spec
= codec
->spec
;
300 if (!spec
->gpio_mask
)
303 snd_hda_codec_write(codec
, codec
->core
.afg
, 0,
304 AC_VERB_SET_GPIO_MASK
, spec
->gpio_mask
);
305 snd_hda_codec_write(codec
, codec
->core
.afg
, 0,
306 AC_VERB_SET_GPIO_DIRECTION
, spec
->gpio_dir
);
307 if (spec
->gpio_write_delay
)
309 alc_write_gpio_data(codec
);
312 static void alc_fixup_gpio(struct hda_codec
*codec
, int action
,
315 if (action
== HDA_FIXUP_ACT_PRE_PROBE
)
316 alc_setup_gpio(codec
, mask
);
319 static void alc_fixup_gpio1(struct hda_codec
*codec
,
320 const struct hda_fixup
*fix
, int action
)
322 alc_fixup_gpio(codec
, action
, 0x01);
325 static void alc_fixup_gpio2(struct hda_codec
*codec
,
326 const struct hda_fixup
*fix
, int action
)
328 alc_fixup_gpio(codec
, action
, 0x02);
331 static void alc_fixup_gpio3(struct hda_codec
*codec
,
332 const struct hda_fixup
*fix
, int action
)
334 alc_fixup_gpio(codec
, action
, 0x03);
337 static void alc_fixup_gpio4(struct hda_codec
*codec
,
338 const struct hda_fixup
*fix
, int action
)
340 alc_fixup_gpio(codec
, action
, 0x04);
343 static void alc_fixup_micmute_led(struct hda_codec
*codec
,
344 const struct hda_fixup
*fix
, int action
)
346 if (action
== HDA_FIXUP_ACT_PRE_PROBE
)
347 snd_hda_gen_add_micmute_led_cdev(codec
, NULL
);
351 * Fix hardware PLL issue
352 * On some codecs, the analog PLL gating control must be off while
353 * the default value is 1.
355 static void alc_fix_pll(struct hda_codec
*codec
)
357 struct alc_spec
*spec
= codec
->spec
;
360 alc_update_coefex_idx(codec
, spec
->pll_nid
, spec
->pll_coef_idx
,
361 1 << spec
->pll_coef_bit
, 0);
364 static void alc_fix_pll_init(struct hda_codec
*codec
, hda_nid_t nid
,
365 unsigned int coef_idx
, unsigned int coef_bit
)
367 struct alc_spec
*spec
= codec
->spec
;
369 spec
->pll_coef_idx
= coef_idx
;
370 spec
->pll_coef_bit
= coef_bit
;
374 /* update the master volume per volume-knob's unsol event */
375 static void alc_update_knob_master(struct hda_codec
*codec
,
376 struct hda_jack_callback
*jack
)
379 struct snd_kcontrol
*kctl
;
380 struct snd_ctl_elem_value
*uctl
;
382 kctl
= snd_hda_find_mixer_ctl(codec
, "Master Playback Volume");
385 uctl
= kzalloc(sizeof(*uctl
), GFP_KERNEL
);
388 val
= snd_hda_codec_read(codec
, jack
->nid
, 0,
389 AC_VERB_GET_VOLUME_KNOB_CONTROL
, 0);
390 val
&= HDA_AMP_VOLMASK
;
391 uctl
->value
.integer
.value
[0] = val
;
392 uctl
->value
.integer
.value
[1] = val
;
393 kctl
->put(kctl
, uctl
);
397 static void alc880_unsol_event(struct hda_codec
*codec
, unsigned int res
)
399 /* For some reason, the res given from ALC880 is broken.
400 Here we adjust it properly. */
401 snd_hda_jack_unsol_event(codec
, res
>> 2);
404 /* Change EAPD to verb control */
405 static void alc_fill_eapd_coef(struct hda_codec
*codec
)
409 coef
= alc_get_coef0(codec
);
411 switch (codec
->core
.vendor_id
) {
413 alc_update_coef_idx(codec
, 0x7, 0, 1<<5);
417 alc_update_coef_idx(codec
, 0x7, 0, 1<<13);
420 if ((coef
& 0x00f0) == 0x0010)
421 alc_update_coef_idx(codec
, 0xd, 0, 1<<14);
422 if ((coef
& 0x00f0) == 0x0020)
423 alc_update_coef_idx(codec
, 0x4, 1<<15, 0);
424 if ((coef
& 0x00f0) == 0x0030)
425 alc_update_coef_idx(codec
, 0x10, 1<<9, 0);
431 alc_update_coef_idx(codec
, 0x4, 1<<15, 0);
436 alc_update_coef_idx(codec
, 0x67, 0xf000, 0x3000);
456 alc_update_coef_idx(codec
, 0x10, 1<<9, 0);
459 alc_update_coef_idx(codec
, 0xe, 0, 1<<0);
462 alc_update_coef_idx(codec
, 0x10, 1<<9, 0);
463 alc_write_coef_idx(codec
, 0x8, 0x4ab7);
466 alc_update_coef_idx(codec
, 0xa, 1<<13, 0);
475 alc_update_coef_idx(codec
, 0x10, 1<<15, 0);
478 if ((coef
& 0x00f0) == 0x0030)
479 alc_update_coef_idx(codec
, 0x4, 1<<10, 0); /* EAPD Ctrl */
488 alc_update_coef_idx(codec
, 0xd, 0, 1<<14); /* EAPD Ctrl */
492 alc_update_coef_idx(codec
, 0x19, 1<<13, 0);
495 alc_update_coef_idx(codec
, 0x7, 3<<13, 0);
498 alc_update_coef_idx(codec
, 0x4, 1<<10, 0);
501 if ((coef
& 0x00f0) == 0x0020 || (coef
& 0x00f0) == 0x0030)
502 alc_update_coef_idx(codec
, 0x7, 1<<5, 0);
506 alc_update_coef_idx(codec
, 0x7, 1<<5, 0);
513 alc_update_coef_idx(codec
, 0x7, 1<<1, 0);
518 /* additional initialization for ALC888 variants */
519 static void alc888_coef_init(struct hda_codec
*codec
)
521 switch (alc_get_coef0(codec
) & 0x00f0) {
526 alc_update_coef_idx(codec
, 7, 0, 0x2030); /* Turn EAPD to High */
531 /* turn on/off EAPD control (only if available) */
532 static void set_eapd(struct hda_codec
*codec
, hda_nid_t nid
, int on
)
534 if (get_wcaps_type(get_wcaps(codec
, nid
)) != AC_WID_PIN
)
536 if (snd_hda_query_pin_caps(codec
, nid
) & AC_PINCAP_EAPD
)
537 snd_hda_codec_write(codec
, nid
, 0, AC_VERB_SET_EAPD_BTLENABLE
,
541 /* turn on/off EAPD controls of the codec */
542 static void alc_auto_setup_eapd(struct hda_codec
*codec
, bool on
)
544 /* We currently only handle front, HP */
545 static const hda_nid_t pins
[] = {
546 0x0f, 0x10, 0x14, 0x15, 0x17, 0
549 for (p
= pins
; *p
; p
++)
550 set_eapd(codec
, *p
, on
);
553 static int find_ext_mic_pin(struct hda_codec
*codec
);
555 static void alc_headset_mic_no_shutup(struct hda_codec
*codec
)
557 const struct hda_pincfg
*pin
;
558 int mic_pin
= find_ext_mic_pin(codec
);
561 /* don't shut up pins when unloading the driver; otherwise it breaks
562 * the default pin setup at the next load of the driver
564 if (codec
->bus
->shutdown
)
567 snd_array_for_each(&codec
->init_pins
, i
, pin
) {
568 /* use read here for syncing after issuing each verb */
569 if (pin
->nid
!= mic_pin
)
570 snd_hda_codec_read(codec
, pin
->nid
, 0,
571 AC_VERB_SET_PIN_WIDGET_CONTROL
, 0);
574 codec
->pins_shutup
= 1;
577 static void alc_shutup_pins(struct hda_codec
*codec
)
579 struct alc_spec
*spec
= codec
->spec
;
581 switch (codec
->core
.vendor_id
) {
589 alc_headset_mic_no_shutup(codec
);
592 if (!spec
->no_shutup_pins
)
593 snd_hda_shutup_pins(codec
);
598 /* generic shutup callback;
599 * just turning off EAPD and a little pause for avoiding pop-noise
601 static void alc_eapd_shutup(struct hda_codec
*codec
)
603 struct alc_spec
*spec
= codec
->spec
;
605 alc_auto_setup_eapd(codec
, false);
606 if (!spec
->no_depop_delay
)
608 alc_shutup_pins(codec
);
611 /* generic EAPD initialization */
612 static void alc_auto_init_amp(struct hda_codec
*codec
, int type
)
614 alc_auto_setup_eapd(codec
, true);
615 alc_write_gpio(codec
);
617 case ALC_INIT_DEFAULT
:
618 switch (codec
->core
.vendor_id
) {
620 alc_update_coefex_idx(codec
, 0x1a, 7, 0, 0x2010);
626 alc_update_coef_idx(codec
, 7, 0, 0x2030);
629 alc888_coef_init(codec
);
636 /* get a primary headphone pin if available */
637 static hda_nid_t
alc_get_hp_pin(struct alc_spec
*spec
)
639 if (spec
->gen
.autocfg
.hp_pins
[0])
640 return spec
->gen
.autocfg
.hp_pins
[0];
641 if (spec
->gen
.autocfg
.line_out_type
== AC_JACK_HP_OUT
)
642 return spec
->gen
.autocfg
.line_out_pins
[0];
647 * Realtek SSID verification
650 /* Could be any non-zero and even value. When used as fixup, tells
651 * the driver to ignore any present sku defines.
653 #define ALC_FIXUP_SKU_IGNORE (2)
655 static void alc_fixup_sku_ignore(struct hda_codec
*codec
,
656 const struct hda_fixup
*fix
, int action
)
658 struct alc_spec
*spec
= codec
->spec
;
659 if (action
== HDA_FIXUP_ACT_PRE_PROBE
) {
660 spec
->cdefine
.fixup
= 1;
661 spec
->cdefine
.sku_cfg
= ALC_FIXUP_SKU_IGNORE
;
665 static void alc_fixup_no_depop_delay(struct hda_codec
*codec
,
666 const struct hda_fixup
*fix
, int action
)
668 struct alc_spec
*spec
= codec
->spec
;
670 if (action
== HDA_FIXUP_ACT_PROBE
) {
671 spec
->no_depop_delay
= 1;
672 codec
->depop_delay
= 0;
676 static int alc_auto_parse_customize_define(struct hda_codec
*codec
)
678 unsigned int ass
, tmp
, i
;
680 struct alc_spec
*spec
= codec
->spec
;
682 spec
->cdefine
.enable_pcbeep
= 1; /* assume always enabled */
684 if (spec
->cdefine
.fixup
) {
685 ass
= spec
->cdefine
.sku_cfg
;
686 if (ass
== ALC_FIXUP_SKU_IGNORE
)
691 if (!codec
->bus
->pci
)
693 ass
= codec
->core
.subsystem_id
& 0xffff;
694 if (ass
!= codec
->bus
->pci
->subsystem_device
&& (ass
& 1))
698 if (codec
->core
.vendor_id
== 0x10ec0260)
700 ass
= snd_hda_codec_get_pincfg(codec
, nid
);
703 codec_info(codec
, "%s: SKU not ready 0x%08x\n",
704 codec
->core
.chip_name
, ass
);
710 for (i
= 1; i
< 16; i
++) {
714 if (((ass
>> 16) & 0xf) != tmp
)
717 spec
->cdefine
.port_connectivity
= ass
>> 30;
718 spec
->cdefine
.enable_pcbeep
= (ass
& 0x100000) >> 20;
719 spec
->cdefine
.check_sum
= (ass
>> 16) & 0xf;
720 spec
->cdefine
.customization
= ass
>> 8;
722 spec
->cdefine
.sku_cfg
= ass
;
723 spec
->cdefine
.external_amp
= (ass
& 0x38) >> 3;
724 spec
->cdefine
.platform_type
= (ass
& 0x4) >> 2;
725 spec
->cdefine
.swap
= (ass
& 0x2) >> 1;
726 spec
->cdefine
.override
= ass
& 0x1;
728 codec_dbg(codec
, "SKU: Nid=0x%x sku_cfg=0x%08x\n",
729 nid
, spec
->cdefine
.sku_cfg
);
730 codec_dbg(codec
, "SKU: port_connectivity=0x%x\n",
731 spec
->cdefine
.port_connectivity
);
732 codec_dbg(codec
, "SKU: enable_pcbeep=0x%x\n", spec
->cdefine
.enable_pcbeep
);
733 codec_dbg(codec
, "SKU: check_sum=0x%08x\n", spec
->cdefine
.check_sum
);
734 codec_dbg(codec
, "SKU: customization=0x%08x\n", spec
->cdefine
.customization
);
735 codec_dbg(codec
, "SKU: external_amp=0x%x\n", spec
->cdefine
.external_amp
);
736 codec_dbg(codec
, "SKU: platform_type=0x%x\n", spec
->cdefine
.platform_type
);
737 codec_dbg(codec
, "SKU: swap=0x%x\n", spec
->cdefine
.swap
);
738 codec_dbg(codec
, "SKU: override=0x%x\n", spec
->cdefine
.override
);
743 /* return the position of NID in the list, or -1 if not found */
744 static int find_idx_in_nid_list(hda_nid_t nid
, const hda_nid_t
*list
, int nums
)
747 for (i
= 0; i
< nums
; i
++)
752 /* return true if the given NID is found in the list */
753 static bool found_in_nid_list(hda_nid_t nid
, const hda_nid_t
*list
, int nums
)
755 return find_idx_in_nid_list(nid
, list
, nums
) >= 0;
758 /* check subsystem ID and set up device-specific initialization;
759 * return 1 if initialized, 0 if invalid SSID
761 /* 32-bit subsystem ID for BIOS loading in HD Audio codec.
762 * 31 ~ 16 : Manufacture ID
764 * 7 ~ 0 : Assembly ID
765 * port-A --> pin 39/41, port-E --> pin 14/15, port-D --> pin 35/36
767 static int alc_subsystem_id(struct hda_codec
*codec
, const hda_nid_t
*ports
)
769 unsigned int ass
, tmp
, i
;
771 struct alc_spec
*spec
= codec
->spec
;
773 if (spec
->cdefine
.fixup
) {
774 ass
= spec
->cdefine
.sku_cfg
;
775 if (ass
== ALC_FIXUP_SKU_IGNORE
)
780 ass
= codec
->core
.subsystem_id
& 0xffff;
781 if (codec
->bus
->pci
&&
782 ass
!= codec
->bus
->pci
->subsystem_device
&& (ass
& 1))
785 /* invalid SSID, check the special NID pin defcfg instead */
787 * 31~30 : port connectivity
790 * 19~16 : Check sum (15:1)
795 if (codec
->core
.vendor_id
== 0x10ec0260)
797 ass
= snd_hda_codec_get_pincfg(codec
, nid
);
799 "realtek: No valid SSID, checking pincfg 0x%08x for NID 0x%x\n",
803 if ((ass
>> 30) != 1) /* no physical connection */
808 for (i
= 1; i
< 16; i
++) {
812 if (((ass
>> 16) & 0xf) != tmp
)
815 codec_dbg(codec
, "realtek: Enabling init ASM_ID=0x%04x CODEC_ID=%08x\n",
816 ass
& 0xffff, codec
->core
.vendor_id
);
820 * 2 : 0 --> Desktop, 1 --> Laptop
821 * 3~5 : External Amplifier control
824 tmp
= (ass
& 0x38) >> 3; /* external Amp control */
825 if (spec
->init_amp
== ALC_INIT_UNDEFINED
) {
828 alc_setup_gpio(codec
, 0x01);
831 alc_setup_gpio(codec
, 0x02);
834 alc_setup_gpio(codec
, 0x03);
838 spec
->init_amp
= ALC_INIT_DEFAULT
;
843 /* is laptop or Desktop and enable the function "Mute internal speaker
844 * when the external headphone out jack is plugged"
849 * 10~8 : Jack location
850 * 12~11: Headphone out -> 00: PortA, 01: PortE, 02: PortD, 03: Resvered
852 * 15 : 1 --> enable the function "Mute internal speaker
853 * when the external headphone out jack is plugged"
855 if (!alc_get_hp_pin(spec
)) {
857 tmp
= (ass
>> 11) & 0x3; /* HP to chassis */
859 if (found_in_nid_list(nid
, spec
->gen
.autocfg
.line_out_pins
,
860 spec
->gen
.autocfg
.line_outs
))
862 spec
->gen
.autocfg
.hp_pins
[0] = nid
;
867 /* Check the validity of ALC subsystem-id
868 * ports contains an array of 4 pin NIDs for port-A, E, D and I */
869 static void alc_ssid_check(struct hda_codec
*codec
, const hda_nid_t
*ports
)
871 if (!alc_subsystem_id(codec
, ports
)) {
872 struct alc_spec
*spec
= codec
->spec
;
873 if (spec
->init_amp
== ALC_INIT_UNDEFINED
) {
875 "realtek: Enable default setup for auto mode as fallback\n");
876 spec
->init_amp
= ALC_INIT_DEFAULT
;
884 static void alc_fixup_inv_dmic(struct hda_codec
*codec
,
885 const struct hda_fixup
*fix
, int action
)
887 struct alc_spec
*spec
= codec
->spec
;
889 spec
->gen
.inv_dmic_split
= 1;
893 static int alc_build_controls(struct hda_codec
*codec
)
897 err
= snd_hda_gen_build_controls(codec
);
901 snd_hda_apply_fixup(codec
, HDA_FIXUP_ACT_BUILD
);
910 static void alc_pre_init(struct hda_codec
*codec
)
912 alc_fill_eapd_coef(codec
);
915 #define is_s3_resume(codec) \
916 ((codec)->core.dev.power.power_state.event == PM_EVENT_RESUME)
917 #define is_s4_resume(codec) \
918 ((codec)->core.dev.power.power_state.event == PM_EVENT_RESTORE)
920 static int alc_init(struct hda_codec
*codec
)
922 struct alc_spec
*spec
= codec
->spec
;
924 /* hibernation resume needs the full chip initialization */
925 if (is_s4_resume(codec
))
929 spec
->init_hook(codec
);
931 spec
->gen
.skip_verbs
= 1; /* applied in below */
932 snd_hda_gen_init(codec
);
934 alc_auto_init_amp(codec
, spec
->init_amp
);
935 snd_hda_apply_verbs(codec
); /* apply verbs here after own init */
937 snd_hda_apply_fixup(codec
, HDA_FIXUP_ACT_INIT
);
942 #define alc_free snd_hda_gen_free
945 static inline void alc_shutup(struct hda_codec
*codec
)
947 struct alc_spec
*spec
= codec
->spec
;
949 if (!snd_hda_get_bool_hint(codec
, "shutup"))
950 return; /* disabled explicitly by hints */
952 if (spec
&& spec
->shutup
)
955 alc_shutup_pins(codec
);
958 static void alc_power_eapd(struct hda_codec
*codec
)
960 alc_auto_setup_eapd(codec
, false);
963 static int alc_suspend(struct hda_codec
*codec
)
965 struct alc_spec
*spec
= codec
->spec
;
967 if (spec
&& spec
->power_hook
)
968 spec
->power_hook(codec
);
972 static int alc_resume(struct hda_codec
*codec
)
974 struct alc_spec
*spec
= codec
->spec
;
976 if (!spec
->no_depop_delay
)
977 msleep(150); /* to avoid pop noise */
978 codec
->patch_ops
.init(codec
);
979 snd_hda_regmap_sync(codec
);
980 hda_call_check_power_status(codec
, 0x01);
987 static const struct hda_codec_ops alc_patch_ops
= {
988 .build_controls
= alc_build_controls
,
989 .build_pcms
= snd_hda_gen_build_pcms
,
992 .unsol_event
= snd_hda_jack_unsol_event
,
994 .resume
= alc_resume
,
995 .suspend
= alc_suspend
,
996 .check_power_status
= snd_hda_gen_check_power_status
,
1001 #define alc_codec_rename(codec, name) snd_hda_codec_set_name(codec, name)
1004 * Rename codecs appropriately from COEF value or subvendor id
1006 struct alc_codec_rename_table
{
1007 unsigned int vendor_id
;
1008 unsigned short coef_mask
;
1009 unsigned short coef_bits
;
1013 struct alc_codec_rename_pci_table
{
1014 unsigned int codec_vendor_id
;
1015 unsigned short pci_subvendor
;
1016 unsigned short pci_subdevice
;
1020 static const struct alc_codec_rename_table rename_tbl
[] = {
1021 { 0x10ec0221, 0xf00f, 0x1003, "ALC231" },
1022 { 0x10ec0269, 0xfff0, 0x3010, "ALC277" },
1023 { 0x10ec0269, 0xf0f0, 0x2010, "ALC259" },
1024 { 0x10ec0269, 0xf0f0, 0x3010, "ALC258" },
1025 { 0x10ec0269, 0x00f0, 0x0010, "ALC269VB" },
1026 { 0x10ec0269, 0xffff, 0xa023, "ALC259" },
1027 { 0x10ec0269, 0xffff, 0x6023, "ALC281X" },
1028 { 0x10ec0269, 0x00f0, 0x0020, "ALC269VC" },
1029 { 0x10ec0269, 0x00f0, 0x0030, "ALC269VD" },
1030 { 0x10ec0662, 0xffff, 0x4020, "ALC656" },
1031 { 0x10ec0887, 0x00f0, 0x0030, "ALC887-VD" },
1032 { 0x10ec0888, 0x00f0, 0x0030, "ALC888-VD" },
1033 { 0x10ec0888, 0xf0f0, 0x3020, "ALC886" },
1034 { 0x10ec0899, 0x2000, 0x2000, "ALC899" },
1035 { 0x10ec0892, 0xffff, 0x8020, "ALC661" },
1036 { 0x10ec0892, 0xffff, 0x8011, "ALC661" },
1037 { 0x10ec0892, 0xffff, 0x4011, "ALC656" },
1038 { } /* terminator */
1041 static const struct alc_codec_rename_pci_table rename_pci_tbl
[] = {
1042 { 0x10ec0280, 0x1028, 0, "ALC3220" },
1043 { 0x10ec0282, 0x1028, 0, "ALC3221" },
1044 { 0x10ec0283, 0x1028, 0, "ALC3223" },
1045 { 0x10ec0288, 0x1028, 0, "ALC3263" },
1046 { 0x10ec0292, 0x1028, 0, "ALC3226" },
1047 { 0x10ec0293, 0x1028, 0, "ALC3235" },
1048 { 0x10ec0255, 0x1028, 0, "ALC3234" },
1049 { 0x10ec0668, 0x1028, 0, "ALC3661" },
1050 { 0x10ec0275, 0x1028, 0, "ALC3260" },
1051 { 0x10ec0899, 0x1028, 0, "ALC3861" },
1052 { 0x10ec0298, 0x1028, 0, "ALC3266" },
1053 { 0x10ec0236, 0x1028, 0, "ALC3204" },
1054 { 0x10ec0256, 0x1028, 0, "ALC3246" },
1055 { 0x10ec0225, 0x1028, 0, "ALC3253" },
1056 { 0x10ec0295, 0x1028, 0, "ALC3254" },
1057 { 0x10ec0299, 0x1028, 0, "ALC3271" },
1058 { 0x10ec0670, 0x1025, 0, "ALC669X" },
1059 { 0x10ec0676, 0x1025, 0, "ALC679X" },
1060 { 0x10ec0282, 0x1043, 0, "ALC3229" },
1061 { 0x10ec0233, 0x1043, 0, "ALC3236" },
1062 { 0x10ec0280, 0x103c, 0, "ALC3228" },
1063 { 0x10ec0282, 0x103c, 0, "ALC3227" },
1064 { 0x10ec0286, 0x103c, 0, "ALC3242" },
1065 { 0x10ec0290, 0x103c, 0, "ALC3241" },
1066 { 0x10ec0668, 0x103c, 0, "ALC3662" },
1067 { 0x10ec0283, 0x17aa, 0, "ALC3239" },
1068 { 0x10ec0292, 0x17aa, 0, "ALC3232" },
1069 { } /* terminator */
1072 static int alc_codec_rename_from_preset(struct hda_codec
*codec
)
1074 const struct alc_codec_rename_table
*p
;
1075 const struct alc_codec_rename_pci_table
*q
;
1077 for (p
= rename_tbl
; p
->vendor_id
; p
++) {
1078 if (p
->vendor_id
!= codec
->core
.vendor_id
)
1080 if ((alc_get_coef0(codec
) & p
->coef_mask
) == p
->coef_bits
)
1081 return alc_codec_rename(codec
, p
->name
);
1084 if (!codec
->bus
->pci
)
1086 for (q
= rename_pci_tbl
; q
->codec_vendor_id
; q
++) {
1087 if (q
->codec_vendor_id
!= codec
->core
.vendor_id
)
1089 if (q
->pci_subvendor
!= codec
->bus
->pci
->subsystem_vendor
)
1091 if (!q
->pci_subdevice
||
1092 q
->pci_subdevice
== codec
->bus
->pci
->subsystem_device
)
1093 return alc_codec_rename(codec
, q
->name
);
1101 * Digital-beep handlers
1103 #ifdef CONFIG_SND_HDA_INPUT_BEEP
1105 /* additional beep mixers; private_value will be overwritten */
1106 static const struct snd_kcontrol_new alc_beep_mixer
[] = {
1107 HDA_CODEC_VOLUME("Beep Playback Volume", 0, 0, HDA_INPUT
),
1108 HDA_CODEC_MUTE_BEEP("Beep Playback Switch", 0, 0, HDA_INPUT
),
1111 /* set up and create beep controls */
1112 static int set_beep_amp(struct alc_spec
*spec
, hda_nid_t nid
,
1115 struct snd_kcontrol_new
*knew
;
1116 unsigned int beep_amp
= HDA_COMPOSE_AMP_VAL(nid
, 3, idx
, dir
);
1119 for (i
= 0; i
< ARRAY_SIZE(alc_beep_mixer
); i
++) {
1120 knew
= snd_hda_gen_add_kctl(&spec
->gen
, NULL
,
1121 &alc_beep_mixer
[i
]);
1124 knew
->private_value
= beep_amp
;
1129 static const struct snd_pci_quirk beep_allow_list
[] = {
1130 SND_PCI_QUIRK(0x1043, 0x103c, "ASUS", 1),
1131 SND_PCI_QUIRK(0x1043, 0x115d, "ASUS", 1),
1132 SND_PCI_QUIRK(0x1043, 0x829f, "ASUS", 1),
1133 SND_PCI_QUIRK(0x1043, 0x8376, "EeePC", 1),
1134 SND_PCI_QUIRK(0x1043, 0x83ce, "EeePC", 1),
1135 SND_PCI_QUIRK(0x1043, 0x831a, "EeePC", 1),
1136 SND_PCI_QUIRK(0x1043, 0x834a, "EeePC", 1),
1137 SND_PCI_QUIRK(0x1458, 0xa002, "GA-MA790X", 1),
1138 SND_PCI_QUIRK(0x8086, 0xd613, "Intel", 1),
1139 /* denylist -- no beep available */
1140 SND_PCI_QUIRK(0x17aa, 0x309e, "Lenovo ThinkCentre M73", 0),
1141 SND_PCI_QUIRK(0x17aa, 0x30a3, "Lenovo ThinkCentre M93", 0),
1145 static inline int has_cdefine_beep(struct hda_codec
*codec
)
1147 struct alc_spec
*spec
= codec
->spec
;
1148 const struct snd_pci_quirk
*q
;
1149 q
= snd_pci_quirk_lookup(codec
->bus
->pci
, beep_allow_list
);
1152 return spec
->cdefine
.enable_pcbeep
;
1155 #define set_beep_amp(spec, nid, idx, dir) 0
1156 #define has_cdefine_beep(codec) 0
1159 /* parse the BIOS configuration and set up the alc_spec */
1160 /* return 1 if successful, 0 if the proper config is not found,
1161 * or a negative error code
1163 static int alc_parse_auto_config(struct hda_codec
*codec
,
1164 const hda_nid_t
*ignore_nids
,
1165 const hda_nid_t
*ssid_nids
)
1167 struct alc_spec
*spec
= codec
->spec
;
1168 struct auto_pin_cfg
*cfg
= &spec
->gen
.autocfg
;
1171 err
= snd_hda_parse_pin_defcfg(codec
, cfg
, ignore_nids
,
1177 alc_ssid_check(codec
, ssid_nids
);
1179 err
= snd_hda_gen_parse_auto_config(codec
, cfg
);
1186 /* common preparation job for alc_spec */
1187 static int alc_alloc_spec(struct hda_codec
*codec
, hda_nid_t mixer_nid
)
1189 struct alc_spec
*spec
= kzalloc(sizeof(*spec
), GFP_KERNEL
);
1195 snd_hda_gen_spec_init(&spec
->gen
);
1196 spec
->gen
.mixer_nid
= mixer_nid
;
1197 spec
->gen
.own_eapd_ctl
= 1;
1198 codec
->single_adc_amp
= 1;
1199 /* FIXME: do we need this for all Realtek codec models? */
1200 codec
->spdif_status_reset
= 1;
1201 codec
->forced_resume
= 1;
1202 codec
->patch_ops
= alc_patch_ops
;
1203 mutex_init(&spec
->coef_mutex
);
1205 err
= alc_codec_rename_from_preset(codec
);
1213 static int alc880_parse_auto_config(struct hda_codec
*codec
)
1215 static const hda_nid_t alc880_ignore
[] = { 0x1d, 0 };
1216 static const hda_nid_t alc880_ssids
[] = { 0x15, 0x1b, 0x14, 0 };
1217 return alc_parse_auto_config(codec
, alc880_ignore
, alc880_ssids
);
1226 ALC880_FIXUP_MEDION_RIM
,
1228 ALC880_FIXUP_LG_LW25
,
1230 ALC880_FIXUP_EAPD_COEF
,
1231 ALC880_FIXUP_TCL_S700
,
1232 ALC880_FIXUP_VOL_KNOB
,
1233 ALC880_FIXUP_FUJITSU
,
1235 ALC880_FIXUP_UNIWILL
,
1236 ALC880_FIXUP_UNIWILL_DIG
,
1238 ALC880_FIXUP_ASUS_W5A
,
1239 ALC880_FIXUP_3ST_BASE
,
1241 ALC880_FIXUP_3ST_DIG
,
1242 ALC880_FIXUP_5ST_BASE
,
1244 ALC880_FIXUP_5ST_DIG
,
1245 ALC880_FIXUP_6ST_BASE
,
1247 ALC880_FIXUP_6ST_DIG
,
1248 ALC880_FIXUP_6ST_AUTOMUTE
,
1251 /* enable the volume-knob widget support on NID 0x21 */
1252 static void alc880_fixup_vol_knob(struct hda_codec
*codec
,
1253 const struct hda_fixup
*fix
, int action
)
1255 if (action
== HDA_FIXUP_ACT_PROBE
)
1256 snd_hda_jack_detect_enable_callback(codec
, 0x21,
1257 alc_update_knob_master
);
1260 static const struct hda_fixup alc880_fixups
[] = {
1261 [ALC880_FIXUP_GPIO1
] = {
1262 .type
= HDA_FIXUP_FUNC
,
1263 .v
.func
= alc_fixup_gpio1
,
1265 [ALC880_FIXUP_GPIO2
] = {
1266 .type
= HDA_FIXUP_FUNC
,
1267 .v
.func
= alc_fixup_gpio2
,
1269 [ALC880_FIXUP_MEDION_RIM
] = {
1270 .type
= HDA_FIXUP_VERBS
,
1271 .v
.verbs
= (const struct hda_verb
[]) {
1272 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x07 },
1273 { 0x20, AC_VERB_SET_PROC_COEF
, 0x3060 },
1277 .chain_id
= ALC880_FIXUP_GPIO2
,
1279 [ALC880_FIXUP_LG
] = {
1280 .type
= HDA_FIXUP_PINS
,
1281 .v
.pins
= (const struct hda_pintbl
[]) {
1282 /* disable bogus unused pins */
1283 { 0x16, 0x411111f0 },
1284 { 0x18, 0x411111f0 },
1285 { 0x1a, 0x411111f0 },
1289 [ALC880_FIXUP_LG_LW25
] = {
1290 .type
= HDA_FIXUP_PINS
,
1291 .v
.pins
= (const struct hda_pintbl
[]) {
1292 { 0x1a, 0x0181344f }, /* line-in */
1293 { 0x1b, 0x0321403f }, /* headphone */
1297 [ALC880_FIXUP_W810
] = {
1298 .type
= HDA_FIXUP_PINS
,
1299 .v
.pins
= (const struct hda_pintbl
[]) {
1300 /* disable bogus unused pins */
1301 { 0x17, 0x411111f0 },
1305 .chain_id
= ALC880_FIXUP_GPIO2
,
1307 [ALC880_FIXUP_EAPD_COEF
] = {
1308 .type
= HDA_FIXUP_VERBS
,
1309 .v
.verbs
= (const struct hda_verb
[]) {
1310 /* change to EAPD mode */
1311 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x07 },
1312 { 0x20, AC_VERB_SET_PROC_COEF
, 0x3060 },
1316 [ALC880_FIXUP_TCL_S700
] = {
1317 .type
= HDA_FIXUP_VERBS
,
1318 .v
.verbs
= (const struct hda_verb
[]) {
1319 /* change to EAPD mode */
1320 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x07 },
1321 { 0x20, AC_VERB_SET_PROC_COEF
, 0x3070 },
1325 .chain_id
= ALC880_FIXUP_GPIO2
,
1327 [ALC880_FIXUP_VOL_KNOB
] = {
1328 .type
= HDA_FIXUP_FUNC
,
1329 .v
.func
= alc880_fixup_vol_knob
,
1331 [ALC880_FIXUP_FUJITSU
] = {
1332 /* override all pins as BIOS on old Amilo is broken */
1333 .type
= HDA_FIXUP_PINS
,
1334 .v
.pins
= (const struct hda_pintbl
[]) {
1335 { 0x14, 0x0121401f }, /* HP */
1336 { 0x15, 0x99030120 }, /* speaker */
1337 { 0x16, 0x99030130 }, /* bass speaker */
1338 { 0x17, 0x411111f0 }, /* N/A */
1339 { 0x18, 0x411111f0 }, /* N/A */
1340 { 0x19, 0x01a19950 }, /* mic-in */
1341 { 0x1a, 0x411111f0 }, /* N/A */
1342 { 0x1b, 0x411111f0 }, /* N/A */
1343 { 0x1c, 0x411111f0 }, /* N/A */
1344 { 0x1d, 0x411111f0 }, /* N/A */
1345 { 0x1e, 0x01454140 }, /* SPDIF out */
1349 .chain_id
= ALC880_FIXUP_VOL_KNOB
,
1351 [ALC880_FIXUP_F1734
] = {
1352 /* almost compatible with FUJITSU, but no bass and SPDIF */
1353 .type
= HDA_FIXUP_PINS
,
1354 .v
.pins
= (const struct hda_pintbl
[]) {
1355 { 0x14, 0x0121401f }, /* HP */
1356 { 0x15, 0x99030120 }, /* speaker */
1357 { 0x16, 0x411111f0 }, /* N/A */
1358 { 0x17, 0x411111f0 }, /* N/A */
1359 { 0x18, 0x411111f0 }, /* N/A */
1360 { 0x19, 0x01a19950 }, /* mic-in */
1361 { 0x1a, 0x411111f0 }, /* N/A */
1362 { 0x1b, 0x411111f0 }, /* N/A */
1363 { 0x1c, 0x411111f0 }, /* N/A */
1364 { 0x1d, 0x411111f0 }, /* N/A */
1365 { 0x1e, 0x411111f0 }, /* N/A */
1369 .chain_id
= ALC880_FIXUP_VOL_KNOB
,
1371 [ALC880_FIXUP_UNIWILL
] = {
1372 /* need to fix HP and speaker pins to be parsed correctly */
1373 .type
= HDA_FIXUP_PINS
,
1374 .v
.pins
= (const struct hda_pintbl
[]) {
1375 { 0x14, 0x0121411f }, /* HP */
1376 { 0x15, 0x99030120 }, /* speaker */
1377 { 0x16, 0x99030130 }, /* bass speaker */
1381 [ALC880_FIXUP_UNIWILL_DIG
] = {
1382 .type
= HDA_FIXUP_PINS
,
1383 .v
.pins
= (const struct hda_pintbl
[]) {
1384 /* disable bogus unused pins */
1385 { 0x17, 0x411111f0 },
1386 { 0x19, 0x411111f0 },
1387 { 0x1b, 0x411111f0 },
1388 { 0x1f, 0x411111f0 },
1392 [ALC880_FIXUP_Z71V
] = {
1393 .type
= HDA_FIXUP_PINS
,
1394 .v
.pins
= (const struct hda_pintbl
[]) {
1395 /* set up the whole pins as BIOS is utterly broken */
1396 { 0x14, 0x99030120 }, /* speaker */
1397 { 0x15, 0x0121411f }, /* HP */
1398 { 0x16, 0x411111f0 }, /* N/A */
1399 { 0x17, 0x411111f0 }, /* N/A */
1400 { 0x18, 0x01a19950 }, /* mic-in */
1401 { 0x19, 0x411111f0 }, /* N/A */
1402 { 0x1a, 0x01813031 }, /* line-in */
1403 { 0x1b, 0x411111f0 }, /* N/A */
1404 { 0x1c, 0x411111f0 }, /* N/A */
1405 { 0x1d, 0x411111f0 }, /* N/A */
1406 { 0x1e, 0x0144111e }, /* SPDIF */
1410 [ALC880_FIXUP_ASUS_W5A
] = {
1411 .type
= HDA_FIXUP_PINS
,
1412 .v
.pins
= (const struct hda_pintbl
[]) {
1413 /* set up the whole pins as BIOS is utterly broken */
1414 { 0x14, 0x0121411f }, /* HP */
1415 { 0x15, 0x411111f0 }, /* N/A */
1416 { 0x16, 0x411111f0 }, /* N/A */
1417 { 0x17, 0x411111f0 }, /* N/A */
1418 { 0x18, 0x90a60160 }, /* mic */
1419 { 0x19, 0x411111f0 }, /* N/A */
1420 { 0x1a, 0x411111f0 }, /* N/A */
1421 { 0x1b, 0x411111f0 }, /* N/A */
1422 { 0x1c, 0x411111f0 }, /* N/A */
1423 { 0x1d, 0x411111f0 }, /* N/A */
1424 { 0x1e, 0xb743111e }, /* SPDIF out */
1428 .chain_id
= ALC880_FIXUP_GPIO1
,
1430 [ALC880_FIXUP_3ST_BASE
] = {
1431 .type
= HDA_FIXUP_PINS
,
1432 .v
.pins
= (const struct hda_pintbl
[]) {
1433 { 0x14, 0x01014010 }, /* line-out */
1434 { 0x15, 0x411111f0 }, /* N/A */
1435 { 0x16, 0x411111f0 }, /* N/A */
1436 { 0x17, 0x411111f0 }, /* N/A */
1437 { 0x18, 0x01a19c30 }, /* mic-in */
1438 { 0x19, 0x0121411f }, /* HP */
1439 { 0x1a, 0x01813031 }, /* line-in */
1440 { 0x1b, 0x02a19c40 }, /* front-mic */
1441 { 0x1c, 0x411111f0 }, /* N/A */
1442 { 0x1d, 0x411111f0 }, /* N/A */
1443 /* 0x1e is filled in below */
1444 { 0x1f, 0x411111f0 }, /* N/A */
1448 [ALC880_FIXUP_3ST
] = {
1449 .type
= HDA_FIXUP_PINS
,
1450 .v
.pins
= (const struct hda_pintbl
[]) {
1451 { 0x1e, 0x411111f0 }, /* N/A */
1455 .chain_id
= ALC880_FIXUP_3ST_BASE
,
1457 [ALC880_FIXUP_3ST_DIG
] = {
1458 .type
= HDA_FIXUP_PINS
,
1459 .v
.pins
= (const struct hda_pintbl
[]) {
1460 { 0x1e, 0x0144111e }, /* SPDIF */
1464 .chain_id
= ALC880_FIXUP_3ST_BASE
,
1466 [ALC880_FIXUP_5ST_BASE
] = {
1467 .type
= HDA_FIXUP_PINS
,
1468 .v
.pins
= (const struct hda_pintbl
[]) {
1469 { 0x14, 0x01014010 }, /* front */
1470 { 0x15, 0x411111f0 }, /* N/A */
1471 { 0x16, 0x01011411 }, /* CLFE */
1472 { 0x17, 0x01016412 }, /* surr */
1473 { 0x18, 0x01a19c30 }, /* mic-in */
1474 { 0x19, 0x0121411f }, /* HP */
1475 { 0x1a, 0x01813031 }, /* line-in */
1476 { 0x1b, 0x02a19c40 }, /* front-mic */
1477 { 0x1c, 0x411111f0 }, /* N/A */
1478 { 0x1d, 0x411111f0 }, /* N/A */
1479 /* 0x1e is filled in below */
1480 { 0x1f, 0x411111f0 }, /* N/A */
1484 [ALC880_FIXUP_5ST
] = {
1485 .type
= HDA_FIXUP_PINS
,
1486 .v
.pins
= (const struct hda_pintbl
[]) {
1487 { 0x1e, 0x411111f0 }, /* N/A */
1491 .chain_id
= ALC880_FIXUP_5ST_BASE
,
1493 [ALC880_FIXUP_5ST_DIG
] = {
1494 .type
= HDA_FIXUP_PINS
,
1495 .v
.pins
= (const struct hda_pintbl
[]) {
1496 { 0x1e, 0x0144111e }, /* SPDIF */
1500 .chain_id
= ALC880_FIXUP_5ST_BASE
,
1502 [ALC880_FIXUP_6ST_BASE
] = {
1503 .type
= HDA_FIXUP_PINS
,
1504 .v
.pins
= (const struct hda_pintbl
[]) {
1505 { 0x14, 0x01014010 }, /* front */
1506 { 0x15, 0x01016412 }, /* surr */
1507 { 0x16, 0x01011411 }, /* CLFE */
1508 { 0x17, 0x01012414 }, /* side */
1509 { 0x18, 0x01a19c30 }, /* mic-in */
1510 { 0x19, 0x02a19c40 }, /* front-mic */
1511 { 0x1a, 0x01813031 }, /* line-in */
1512 { 0x1b, 0x0121411f }, /* HP */
1513 { 0x1c, 0x411111f0 }, /* N/A */
1514 { 0x1d, 0x411111f0 }, /* N/A */
1515 /* 0x1e is filled in below */
1516 { 0x1f, 0x411111f0 }, /* N/A */
1520 [ALC880_FIXUP_6ST
] = {
1521 .type
= HDA_FIXUP_PINS
,
1522 .v
.pins
= (const struct hda_pintbl
[]) {
1523 { 0x1e, 0x411111f0 }, /* N/A */
1527 .chain_id
= ALC880_FIXUP_6ST_BASE
,
1529 [ALC880_FIXUP_6ST_DIG
] = {
1530 .type
= HDA_FIXUP_PINS
,
1531 .v
.pins
= (const struct hda_pintbl
[]) {
1532 { 0x1e, 0x0144111e }, /* SPDIF */
1536 .chain_id
= ALC880_FIXUP_6ST_BASE
,
1538 [ALC880_FIXUP_6ST_AUTOMUTE
] = {
1539 .type
= HDA_FIXUP_PINS
,
1540 .v
.pins
= (const struct hda_pintbl
[]) {
1541 { 0x1b, 0x0121401f }, /* HP with jack detect */
1544 .chained_before
= true,
1545 .chain_id
= ALC880_FIXUP_6ST_BASE
,
1549 static const struct snd_pci_quirk alc880_fixup_tbl
[] = {
1550 SND_PCI_QUIRK(0x1019, 0x0f69, "Coeus G610P", ALC880_FIXUP_W810
),
1551 SND_PCI_QUIRK(0x1043, 0x10c3, "ASUS W5A", ALC880_FIXUP_ASUS_W5A
),
1552 SND_PCI_QUIRK(0x1043, 0x1964, "ASUS Z71V", ALC880_FIXUP_Z71V
),
1553 SND_PCI_QUIRK_VENDOR(0x1043, "ASUS", ALC880_FIXUP_GPIO1
),
1554 SND_PCI_QUIRK(0x147b, 0x1045, "ABit AA8XE", ALC880_FIXUP_6ST_AUTOMUTE
),
1555 SND_PCI_QUIRK(0x1558, 0x5401, "Clevo GPIO2", ALC880_FIXUP_GPIO2
),
1556 SND_PCI_QUIRK_VENDOR(0x1558, "Clevo", ALC880_FIXUP_EAPD_COEF
),
1557 SND_PCI_QUIRK(0x1584, 0x9050, "Uniwill", ALC880_FIXUP_UNIWILL_DIG
),
1558 SND_PCI_QUIRK(0x1584, 0x9054, "Uniwill", ALC880_FIXUP_F1734
),
1559 SND_PCI_QUIRK(0x1584, 0x9070, "Uniwill", ALC880_FIXUP_UNIWILL
),
1560 SND_PCI_QUIRK(0x1584, 0x9077, "Uniwill P53", ALC880_FIXUP_VOL_KNOB
),
1561 SND_PCI_QUIRK(0x161f, 0x203d, "W810", ALC880_FIXUP_W810
),
1562 SND_PCI_QUIRK(0x161f, 0x205d, "Medion Rim 2150", ALC880_FIXUP_MEDION_RIM
),
1563 SND_PCI_QUIRK(0x1631, 0xe011, "PB 13201056", ALC880_FIXUP_6ST_AUTOMUTE
),
1564 SND_PCI_QUIRK(0x1734, 0x107c, "FSC Amilo M1437", ALC880_FIXUP_FUJITSU
),
1565 SND_PCI_QUIRK(0x1734, 0x1094, "FSC Amilo M1451G", ALC880_FIXUP_FUJITSU
),
1566 SND_PCI_QUIRK(0x1734, 0x10ac, "FSC AMILO Xi 1526", ALC880_FIXUP_F1734
),
1567 SND_PCI_QUIRK(0x1734, 0x10b0, "FSC Amilo Pi1556", ALC880_FIXUP_FUJITSU
),
1568 SND_PCI_QUIRK(0x1854, 0x003b, "LG", ALC880_FIXUP_LG
),
1569 SND_PCI_QUIRK(0x1854, 0x005f, "LG P1 Express", ALC880_FIXUP_LG
),
1570 SND_PCI_QUIRK(0x1854, 0x0068, "LG w1", ALC880_FIXUP_LG
),
1571 SND_PCI_QUIRK(0x1854, 0x0077, "LG LW25", ALC880_FIXUP_LG_LW25
),
1572 SND_PCI_QUIRK(0x19db, 0x4188, "TCL S700", ALC880_FIXUP_TCL_S700
),
1574 /* Below is the copied entries from alc880_quirks.c.
1575 * It's not quite sure whether BIOS sets the correct pin-config table
1576 * on these machines, thus they are kept to be compatible with
1577 * the old static quirks. Once when it's confirmed to work without
1578 * these overrides, it'd be better to remove.
1580 SND_PCI_QUIRK(0x1019, 0xa880, "ECS", ALC880_FIXUP_5ST_DIG
),
1581 SND_PCI_QUIRK(0x1019, 0xa884, "Acer APFV", ALC880_FIXUP_6ST
),
1582 SND_PCI_QUIRK(0x1025, 0x0070, "ULI", ALC880_FIXUP_3ST_DIG
),
1583 SND_PCI_QUIRK(0x1025, 0x0077, "ULI", ALC880_FIXUP_6ST_DIG
),
1584 SND_PCI_QUIRK(0x1025, 0x0078, "ULI", ALC880_FIXUP_6ST_DIG
),
1585 SND_PCI_QUIRK(0x1025, 0x0087, "ULI", ALC880_FIXUP_6ST_DIG
),
1586 SND_PCI_QUIRK(0x1025, 0xe309, "ULI", ALC880_FIXUP_3ST_DIG
),
1587 SND_PCI_QUIRK(0x1025, 0xe310, "ULI", ALC880_FIXUP_3ST
),
1588 SND_PCI_QUIRK(0x1039, 0x1234, NULL
, ALC880_FIXUP_6ST_DIG
),
1589 SND_PCI_QUIRK(0x104d, 0x81a0, "Sony", ALC880_FIXUP_3ST
),
1590 SND_PCI_QUIRK(0x104d, 0x81d6, "Sony", ALC880_FIXUP_3ST
),
1591 SND_PCI_QUIRK(0x107b, 0x3032, "Gateway", ALC880_FIXUP_5ST
),
1592 SND_PCI_QUIRK(0x107b, 0x3033, "Gateway", ALC880_FIXUP_5ST
),
1593 SND_PCI_QUIRK(0x107b, 0x4039, "Gateway", ALC880_FIXUP_5ST
),
1594 SND_PCI_QUIRK(0x1297, 0xc790, "Shuttle ST20G5", ALC880_FIXUP_6ST_DIG
),
1595 SND_PCI_QUIRK(0x1458, 0xa102, "Gigabyte K8", ALC880_FIXUP_6ST_DIG
),
1596 SND_PCI_QUIRK(0x1462, 0x1150, "MSI", ALC880_FIXUP_6ST_DIG
),
1597 SND_PCI_QUIRK(0x1509, 0x925d, "FIC P4M", ALC880_FIXUP_6ST_DIG
),
1598 SND_PCI_QUIRK(0x1565, 0x8202, "Biostar", ALC880_FIXUP_5ST_DIG
),
1599 SND_PCI_QUIRK(0x1695, 0x400d, "EPoX", ALC880_FIXUP_5ST_DIG
),
1600 SND_PCI_QUIRK(0x1695, 0x4012, "EPox EP-5LDA", ALC880_FIXUP_5ST_DIG
),
1601 SND_PCI_QUIRK(0x2668, 0x8086, NULL
, ALC880_FIXUP_6ST_DIG
), /* broken BIOS */
1602 SND_PCI_QUIRK(0x8086, 0x2668, NULL
, ALC880_FIXUP_6ST_DIG
),
1603 SND_PCI_QUIRK(0x8086, 0xa100, "Intel mobo", ALC880_FIXUP_5ST_DIG
),
1604 SND_PCI_QUIRK(0x8086, 0xd400, "Intel mobo", ALC880_FIXUP_5ST_DIG
),
1605 SND_PCI_QUIRK(0x8086, 0xd401, "Intel mobo", ALC880_FIXUP_5ST_DIG
),
1606 SND_PCI_QUIRK(0x8086, 0xd402, "Intel mobo", ALC880_FIXUP_3ST_DIG
),
1607 SND_PCI_QUIRK(0x8086, 0xe224, "Intel mobo", ALC880_FIXUP_5ST_DIG
),
1608 SND_PCI_QUIRK(0x8086, 0xe305, "Intel mobo", ALC880_FIXUP_3ST_DIG
),
1609 SND_PCI_QUIRK(0x8086, 0xe308, "Intel mobo", ALC880_FIXUP_3ST_DIG
),
1610 SND_PCI_QUIRK(0x8086, 0xe400, "Intel mobo", ALC880_FIXUP_5ST_DIG
),
1611 SND_PCI_QUIRK(0x8086, 0xe401, "Intel mobo", ALC880_FIXUP_5ST_DIG
),
1612 SND_PCI_QUIRK(0x8086, 0xe402, "Intel mobo", ALC880_FIXUP_5ST_DIG
),
1614 SND_PCI_QUIRK_VENDOR(0x8086, "Intel mobo", ALC880_FIXUP_3ST
),
1615 SND_PCI_QUIRK(0xa0a0, 0x0560, "AOpen i915GMm-HFS", ALC880_FIXUP_5ST_DIG
),
1616 SND_PCI_QUIRK(0xe803, 0x1019, NULL
, ALC880_FIXUP_6ST_DIG
),
1620 static const struct hda_model_fixup alc880_fixup_models
[] = {
1621 {.id
= ALC880_FIXUP_3ST
, .name
= "3stack"},
1622 {.id
= ALC880_FIXUP_3ST_DIG
, .name
= "3stack-digout"},
1623 {.id
= ALC880_FIXUP_5ST
, .name
= "5stack"},
1624 {.id
= ALC880_FIXUP_5ST_DIG
, .name
= "5stack-digout"},
1625 {.id
= ALC880_FIXUP_6ST
, .name
= "6stack"},
1626 {.id
= ALC880_FIXUP_6ST_DIG
, .name
= "6stack-digout"},
1627 {.id
= ALC880_FIXUP_6ST_AUTOMUTE
, .name
= "6stack-automute"},
1633 * OK, here we have finally the patch for ALC880
1635 static int patch_alc880(struct hda_codec
*codec
)
1637 struct alc_spec
*spec
;
1640 err
= alc_alloc_spec(codec
, 0x0b);
1645 spec
->gen
.need_dac_fix
= 1;
1646 spec
->gen
.beep_nid
= 0x01;
1648 codec
->patch_ops
.unsol_event
= alc880_unsol_event
;
1650 alc_pre_init(codec
);
1652 snd_hda_pick_fixup(codec
, alc880_fixup_models
, alc880_fixup_tbl
,
1654 snd_hda_apply_fixup(codec
, HDA_FIXUP_ACT_PRE_PROBE
);
1656 /* automatic parse from the BIOS config */
1657 err
= alc880_parse_auto_config(codec
);
1661 if (!spec
->gen
.no_analog
) {
1662 err
= set_beep_amp(spec
, 0x0b, 0x05, HDA_INPUT
);
1667 snd_hda_apply_fixup(codec
, HDA_FIXUP_ACT_PROBE
);
1680 static int alc260_parse_auto_config(struct hda_codec
*codec
)
1682 static const hda_nid_t alc260_ignore
[] = { 0x17, 0 };
1683 static const hda_nid_t alc260_ssids
[] = { 0x10, 0x15, 0x0f, 0 };
1684 return alc_parse_auto_config(codec
, alc260_ignore
, alc260_ssids
);
1691 ALC260_FIXUP_HP_DC5750
,
1692 ALC260_FIXUP_HP_PIN_0F
,
1695 ALC260_FIXUP_GPIO1_TOGGLE
,
1696 ALC260_FIXUP_REPLACER
,
1697 ALC260_FIXUP_HP_B1900
,
1699 ALC260_FIXUP_FSC_S7020
,
1700 ALC260_FIXUP_FSC_S7020_JWSE
,
1701 ALC260_FIXUP_VAIO_PINS
,
1704 static void alc260_gpio1_automute(struct hda_codec
*codec
)
1706 struct alc_spec
*spec
= codec
->spec
;
1708 alc_update_gpio_data(codec
, 0x01, spec
->gen
.hp_jack_present
);
1711 static void alc260_fixup_gpio1_toggle(struct hda_codec
*codec
,
1712 const struct hda_fixup
*fix
, int action
)
1714 struct alc_spec
*spec
= codec
->spec
;
1715 if (action
== HDA_FIXUP_ACT_PROBE
) {
1716 /* although the machine has only one output pin, we need to
1717 * toggle GPIO1 according to the jack state
1719 spec
->gen
.automute_hook
= alc260_gpio1_automute
;
1720 spec
->gen
.detect_hp
= 1;
1721 spec
->gen
.automute_speaker
= 1;
1722 spec
->gen
.autocfg
.hp_pins
[0] = 0x0f; /* copy it for automute */
1723 snd_hda_jack_detect_enable_callback(codec
, 0x0f,
1724 snd_hda_gen_hp_automute
);
1725 alc_setup_gpio(codec
, 0x01);
1729 static void alc260_fixup_kn1(struct hda_codec
*codec
,
1730 const struct hda_fixup
*fix
, int action
)
1732 struct alc_spec
*spec
= codec
->spec
;
1733 static const struct hda_pintbl pincfgs
[] = {
1734 { 0x0f, 0x02214000 }, /* HP/speaker */
1735 { 0x12, 0x90a60160 }, /* int mic */
1736 { 0x13, 0x02a19000 }, /* ext mic */
1737 { 0x18, 0x01446000 }, /* SPDIF out */
1738 /* disable bogus I/O pins */
1739 { 0x10, 0x411111f0 },
1740 { 0x11, 0x411111f0 },
1741 { 0x14, 0x411111f0 },
1742 { 0x15, 0x411111f0 },
1743 { 0x16, 0x411111f0 },
1744 { 0x17, 0x411111f0 },
1745 { 0x19, 0x411111f0 },
1750 case HDA_FIXUP_ACT_PRE_PROBE
:
1751 snd_hda_apply_pincfgs(codec
, pincfgs
);
1752 spec
->init_amp
= ALC_INIT_NONE
;
1757 static void alc260_fixup_fsc_s7020(struct hda_codec
*codec
,
1758 const struct hda_fixup
*fix
, int action
)
1760 struct alc_spec
*spec
= codec
->spec
;
1761 if (action
== HDA_FIXUP_ACT_PRE_PROBE
)
1762 spec
->init_amp
= ALC_INIT_NONE
;
1765 static void alc260_fixup_fsc_s7020_jwse(struct hda_codec
*codec
,
1766 const struct hda_fixup
*fix
, int action
)
1768 struct alc_spec
*spec
= codec
->spec
;
1769 if (action
== HDA_FIXUP_ACT_PRE_PROBE
) {
1770 spec
->gen
.add_jack_modes
= 1;
1771 spec
->gen
.hp_mic
= 1;
1775 static const struct hda_fixup alc260_fixups
[] = {
1776 [ALC260_FIXUP_HP_DC5750
] = {
1777 .type
= HDA_FIXUP_PINS
,
1778 .v
.pins
= (const struct hda_pintbl
[]) {
1779 { 0x11, 0x90130110 }, /* speaker */
1783 [ALC260_FIXUP_HP_PIN_0F
] = {
1784 .type
= HDA_FIXUP_PINS
,
1785 .v
.pins
= (const struct hda_pintbl
[]) {
1786 { 0x0f, 0x01214000 }, /* HP */
1790 [ALC260_FIXUP_COEF
] = {
1791 .type
= HDA_FIXUP_VERBS
,
1792 .v
.verbs
= (const struct hda_verb
[]) {
1793 { 0x1a, AC_VERB_SET_COEF_INDEX
, 0x07 },
1794 { 0x1a, AC_VERB_SET_PROC_COEF
, 0x3040 },
1798 [ALC260_FIXUP_GPIO1
] = {
1799 .type
= HDA_FIXUP_FUNC
,
1800 .v
.func
= alc_fixup_gpio1
,
1802 [ALC260_FIXUP_GPIO1_TOGGLE
] = {
1803 .type
= HDA_FIXUP_FUNC
,
1804 .v
.func
= alc260_fixup_gpio1_toggle
,
1806 .chain_id
= ALC260_FIXUP_HP_PIN_0F
,
1808 [ALC260_FIXUP_REPLACER
] = {
1809 .type
= HDA_FIXUP_VERBS
,
1810 .v
.verbs
= (const struct hda_verb
[]) {
1811 { 0x1a, AC_VERB_SET_COEF_INDEX
, 0x07 },
1812 { 0x1a, AC_VERB_SET_PROC_COEF
, 0x3050 },
1816 .chain_id
= ALC260_FIXUP_GPIO1_TOGGLE
,
1818 [ALC260_FIXUP_HP_B1900
] = {
1819 .type
= HDA_FIXUP_FUNC
,
1820 .v
.func
= alc260_fixup_gpio1_toggle
,
1822 .chain_id
= ALC260_FIXUP_COEF
,
1824 [ALC260_FIXUP_KN1
] = {
1825 .type
= HDA_FIXUP_FUNC
,
1826 .v
.func
= alc260_fixup_kn1
,
1828 [ALC260_FIXUP_FSC_S7020
] = {
1829 .type
= HDA_FIXUP_FUNC
,
1830 .v
.func
= alc260_fixup_fsc_s7020
,
1832 [ALC260_FIXUP_FSC_S7020_JWSE
] = {
1833 .type
= HDA_FIXUP_FUNC
,
1834 .v
.func
= alc260_fixup_fsc_s7020_jwse
,
1836 .chain_id
= ALC260_FIXUP_FSC_S7020
,
1838 [ALC260_FIXUP_VAIO_PINS
] = {
1839 .type
= HDA_FIXUP_PINS
,
1840 .v
.pins
= (const struct hda_pintbl
[]) {
1841 /* Pin configs are missing completely on some VAIOs */
1842 { 0x0f, 0x01211020 },
1843 { 0x10, 0x0001003f },
1844 { 0x11, 0x411111f0 },
1845 { 0x12, 0x01a15930 },
1846 { 0x13, 0x411111f0 },
1847 { 0x14, 0x411111f0 },
1848 { 0x15, 0x411111f0 },
1849 { 0x16, 0x411111f0 },
1850 { 0x17, 0x411111f0 },
1851 { 0x18, 0x411111f0 },
1852 { 0x19, 0x411111f0 },
1858 static const struct snd_pci_quirk alc260_fixup_tbl
[] = {
1859 SND_PCI_QUIRK(0x1025, 0x007b, "Acer C20x", ALC260_FIXUP_GPIO1
),
1860 SND_PCI_QUIRK(0x1025, 0x007f, "Acer Aspire 9500", ALC260_FIXUP_COEF
),
1861 SND_PCI_QUIRK(0x1025, 0x008f, "Acer", ALC260_FIXUP_GPIO1
),
1862 SND_PCI_QUIRK(0x103c, 0x280a, "HP dc5750", ALC260_FIXUP_HP_DC5750
),
1863 SND_PCI_QUIRK(0x103c, 0x30ba, "HP Presario B1900", ALC260_FIXUP_HP_B1900
),
1864 SND_PCI_QUIRK(0x104d, 0x81bb, "Sony VAIO", ALC260_FIXUP_VAIO_PINS
),
1865 SND_PCI_QUIRK(0x104d, 0x81e2, "Sony VAIO TX", ALC260_FIXUP_HP_PIN_0F
),
1866 SND_PCI_QUIRK(0x10cf, 0x1326, "FSC LifeBook S7020", ALC260_FIXUP_FSC_S7020
),
1867 SND_PCI_QUIRK(0x1509, 0x4540, "Favorit 100XS", ALC260_FIXUP_GPIO1
),
1868 SND_PCI_QUIRK(0x152d, 0x0729, "Quanta KN1", ALC260_FIXUP_KN1
),
1869 SND_PCI_QUIRK(0x161f, 0x2057, "Replacer 672V", ALC260_FIXUP_REPLACER
),
1870 SND_PCI_QUIRK(0x1631, 0xc017, "PB V7900", ALC260_FIXUP_COEF
),
1874 static const struct hda_model_fixup alc260_fixup_models
[] = {
1875 {.id
= ALC260_FIXUP_GPIO1
, .name
= "gpio1"},
1876 {.id
= ALC260_FIXUP_COEF
, .name
= "coef"},
1877 {.id
= ALC260_FIXUP_FSC_S7020
, .name
= "fujitsu"},
1878 {.id
= ALC260_FIXUP_FSC_S7020_JWSE
, .name
= "fujitsu-jwse"},
1884 static int patch_alc260(struct hda_codec
*codec
)
1886 struct alc_spec
*spec
;
1889 err
= alc_alloc_spec(codec
, 0x07);
1894 /* as quite a few machines require HP amp for speaker outputs,
1895 * it's easier to enable it unconditionally; even if it's unneeded,
1896 * it's almost harmless.
1898 spec
->gen
.prefer_hp_amp
= 1;
1899 spec
->gen
.beep_nid
= 0x01;
1901 spec
->shutup
= alc_eapd_shutup
;
1903 alc_pre_init(codec
);
1905 snd_hda_pick_fixup(codec
, alc260_fixup_models
, alc260_fixup_tbl
,
1907 snd_hda_apply_fixup(codec
, HDA_FIXUP_ACT_PRE_PROBE
);
1909 /* automatic parse from the BIOS config */
1910 err
= alc260_parse_auto_config(codec
);
1914 if (!spec
->gen
.no_analog
) {
1915 err
= set_beep_amp(spec
, 0x07, 0x05, HDA_INPUT
);
1920 snd_hda_apply_fixup(codec
, HDA_FIXUP_ACT_PROBE
);
1931 * ALC882/883/885/888/889 support
1933 * ALC882 is almost identical with ALC880 but has cleaner and more flexible
1934 * configuration. Each pin widget can choose any input DACs and a mixer.
1935 * Each ADC is connected from a mixer of all inputs. This makes possible
1936 * 6-channel independent captures.
1938 * In addition, an independent DAC for the multi-playback (not used in this
1946 ALC882_FIXUP_ABIT_AW9D_MAX
,
1947 ALC882_FIXUP_LENOVO_Y530
,
1948 ALC882_FIXUP_PB_M5210
,
1949 ALC882_FIXUP_ACER_ASPIRE_7736
,
1950 ALC882_FIXUP_ASUS_W90V
,
1952 ALC889_FIXUP_FRONT_HP_NO_PRESENCE
,
1953 ALC889_FIXUP_VAIO_TT
,
1954 ALC888_FIXUP_EEE1601
,
1958 ALC883_FIXUP_ACER_EAPD
,
1963 ALC882_FIXUP_ASUS_W2JC
,
1964 ALC882_FIXUP_ACER_ASPIRE_4930G
,
1965 ALC882_FIXUP_ACER_ASPIRE_8930G
,
1966 ALC882_FIXUP_ASPIRE_8930G_VERBS
,
1967 ALC885_FIXUP_MACPRO_GPIO
,
1968 ALC889_FIXUP_DAC_ROUTE
,
1969 ALC889_FIXUP_MBP_VREF
,
1970 ALC889_FIXUP_IMAC91_VREF
,
1971 ALC889_FIXUP_MBA11_VREF
,
1972 ALC889_FIXUP_MBA21_VREF
,
1973 ALC889_FIXUP_MP11_VREF
,
1974 ALC889_FIXUP_MP41_VREF
,
1975 ALC882_FIXUP_INV_DMIC
,
1976 ALC882_FIXUP_NO_PRIMARY_HP
,
1977 ALC887_FIXUP_ASUS_BASS
,
1978 ALC887_FIXUP_BASS_CHMAP
,
1979 ALC1220_FIXUP_GB_DUAL_CODECS
,
1980 ALC1220_FIXUP_GB_X570
,
1981 ALC1220_FIXUP_CLEVO_P950
,
1982 ALC1220_FIXUP_CLEVO_PB51ED
,
1983 ALC1220_FIXUP_CLEVO_PB51ED_PINS
,
1984 ALC887_FIXUP_ASUS_AUDIO
,
1985 ALC887_FIXUP_ASUS_HMIC
,
1986 ALCS1200A_FIXUP_MIC_VREF
,
1989 static void alc889_fixup_coef(struct hda_codec
*codec
,
1990 const struct hda_fixup
*fix
, int action
)
1992 if (action
!= HDA_FIXUP_ACT_INIT
)
1994 alc_update_coef_idx(codec
, 7, 0, 0x2030);
1997 /* set up GPIO at initialization */
1998 static void alc885_fixup_macpro_gpio(struct hda_codec
*codec
,
1999 const struct hda_fixup
*fix
, int action
)
2001 struct alc_spec
*spec
= codec
->spec
;
2003 spec
->gpio_write_delay
= true;
2004 alc_fixup_gpio3(codec
, fix
, action
);
2007 /* Fix the connection of some pins for ALC889:
2008 * At least, Acer Aspire 5935 shows the connections to DAC3/4 don't
2009 * work correctly (bko#42740)
2011 static void alc889_fixup_dac_route(struct hda_codec
*codec
,
2012 const struct hda_fixup
*fix
, int action
)
2014 if (action
== HDA_FIXUP_ACT_PRE_PROBE
) {
2015 /* fake the connections during parsing the tree */
2016 static const hda_nid_t conn1
[] = { 0x0c, 0x0d };
2017 static const hda_nid_t conn2
[] = { 0x0e, 0x0f };
2018 snd_hda_override_conn_list(codec
, 0x14, ARRAY_SIZE(conn1
), conn1
);
2019 snd_hda_override_conn_list(codec
, 0x15, ARRAY_SIZE(conn1
), conn1
);
2020 snd_hda_override_conn_list(codec
, 0x18, ARRAY_SIZE(conn2
), conn2
);
2021 snd_hda_override_conn_list(codec
, 0x1a, ARRAY_SIZE(conn2
), conn2
);
2022 } else if (action
== HDA_FIXUP_ACT_PROBE
) {
2023 /* restore the connections */
2024 static const hda_nid_t conn
[] = { 0x0c, 0x0d, 0x0e, 0x0f, 0x26 };
2025 snd_hda_override_conn_list(codec
, 0x14, ARRAY_SIZE(conn
), conn
);
2026 snd_hda_override_conn_list(codec
, 0x15, ARRAY_SIZE(conn
), conn
);
2027 snd_hda_override_conn_list(codec
, 0x18, ARRAY_SIZE(conn
), conn
);
2028 snd_hda_override_conn_list(codec
, 0x1a, ARRAY_SIZE(conn
), conn
);
2032 /* Set VREF on HP pin */
2033 static void alc889_fixup_mbp_vref(struct hda_codec
*codec
,
2034 const struct hda_fixup
*fix
, int action
)
2036 static const hda_nid_t nids
[] = { 0x14, 0x15, 0x19 };
2037 struct alc_spec
*spec
= codec
->spec
;
2040 if (action
!= HDA_FIXUP_ACT_INIT
)
2042 for (i
= 0; i
< ARRAY_SIZE(nids
); i
++) {
2043 unsigned int val
= snd_hda_codec_get_pincfg(codec
, nids
[i
]);
2044 if (get_defcfg_device(val
) != AC_JACK_HP_OUT
)
2046 val
= snd_hda_codec_get_pin_target(codec
, nids
[i
]);
2047 val
|= AC_PINCTL_VREF_80
;
2048 snd_hda_set_pin_ctl(codec
, nids
[i
], val
);
2049 spec
->gen
.keep_vref_in_automute
= 1;
2054 static void alc889_fixup_mac_pins(struct hda_codec
*codec
,
2055 const hda_nid_t
*nids
, int num_nids
)
2057 struct alc_spec
*spec
= codec
->spec
;
2060 for (i
= 0; i
< num_nids
; i
++) {
2062 val
= snd_hda_codec_get_pin_target(codec
, nids
[i
]);
2063 val
|= AC_PINCTL_VREF_50
;
2064 snd_hda_set_pin_ctl(codec
, nids
[i
], val
);
2066 spec
->gen
.keep_vref_in_automute
= 1;
2069 /* Set VREF on speaker pins on imac91 */
2070 static void alc889_fixup_imac91_vref(struct hda_codec
*codec
,
2071 const struct hda_fixup
*fix
, int action
)
2073 static const hda_nid_t nids
[] = { 0x18, 0x1a };
2075 if (action
== HDA_FIXUP_ACT_INIT
)
2076 alc889_fixup_mac_pins(codec
, nids
, ARRAY_SIZE(nids
));
2079 /* Set VREF on speaker pins on mba11 */
2080 static void alc889_fixup_mba11_vref(struct hda_codec
*codec
,
2081 const struct hda_fixup
*fix
, int action
)
2083 static const hda_nid_t nids
[] = { 0x18 };
2085 if (action
== HDA_FIXUP_ACT_INIT
)
2086 alc889_fixup_mac_pins(codec
, nids
, ARRAY_SIZE(nids
));
2089 /* Set VREF on speaker pins on mba21 */
2090 static void alc889_fixup_mba21_vref(struct hda_codec
*codec
,
2091 const struct hda_fixup
*fix
, int action
)
2093 static const hda_nid_t nids
[] = { 0x18, 0x19 };
2095 if (action
== HDA_FIXUP_ACT_INIT
)
2096 alc889_fixup_mac_pins(codec
, nids
, ARRAY_SIZE(nids
));
2099 /* Don't take HP output as primary
2100 * Strangely, the speaker output doesn't work on Vaio Z and some Vaio
2101 * all-in-one desktop PCs (for example VGC-LN51JGB) through DAC 0x05
2103 static void alc882_fixup_no_primary_hp(struct hda_codec
*codec
,
2104 const struct hda_fixup
*fix
, int action
)
2106 struct alc_spec
*spec
= codec
->spec
;
2107 if (action
== HDA_FIXUP_ACT_PRE_PROBE
) {
2108 spec
->gen
.no_primary_hp
= 1;
2109 spec
->gen
.no_multi_io
= 1;
2113 static void alc_fixup_bass_chmap(struct hda_codec
*codec
,
2114 const struct hda_fixup
*fix
, int action
);
2116 /* For dual-codec configuration, we need to disable some features to avoid
2117 * conflicts of kctls and PCM streams
2119 static void alc_fixup_dual_codecs(struct hda_codec
*codec
,
2120 const struct hda_fixup
*fix
, int action
)
2122 struct alc_spec
*spec
= codec
->spec
;
2124 if (action
!= HDA_FIXUP_ACT_PRE_PROBE
)
2126 /* disable vmaster */
2127 spec
->gen
.suppress_vmaster
= 1;
2128 /* auto-mute and auto-mic switch don't work with multiple codecs */
2129 spec
->gen
.suppress_auto_mute
= 1;
2130 spec
->gen
.suppress_auto_mic
= 1;
2131 /* disable aamix as well */
2132 spec
->gen
.mixer_nid
= 0;
2133 /* add location prefix to avoid conflicts */
2134 codec
->force_pin_prefix
= 1;
2137 static void rename_ctl(struct hda_codec
*codec
, const char *oldname
,
2138 const char *newname
)
2140 struct snd_kcontrol
*kctl
;
2142 kctl
= snd_hda_find_mixer_ctl(codec
, oldname
);
2144 strcpy(kctl
->id
.name
, newname
);
2147 static void alc1220_fixup_gb_dual_codecs(struct hda_codec
*codec
,
2148 const struct hda_fixup
*fix
,
2151 alc_fixup_dual_codecs(codec
, fix
, action
);
2153 case HDA_FIXUP_ACT_PRE_PROBE
:
2154 /* override card longname to provide a unique UCM profile */
2155 strcpy(codec
->card
->longname
, "HDAudio-Gigabyte-ALC1220DualCodecs");
2157 case HDA_FIXUP_ACT_BUILD
:
2158 /* rename Capture controls depending on the codec */
2159 rename_ctl(codec
, "Capture Volume",
2161 "Rear-Panel Capture Volume" :
2162 "Front-Panel Capture Volume");
2163 rename_ctl(codec
, "Capture Switch",
2165 "Rear-Panel Capture Switch" :
2166 "Front-Panel Capture Switch");
2171 static void alc1220_fixup_gb_x570(struct hda_codec
*codec
,
2172 const struct hda_fixup
*fix
,
2175 static const hda_nid_t conn1
[] = { 0x0c };
2176 static const struct coef_fw gb_x570_coefs
[] = {
2177 WRITE_COEF(0x07, 0x03c0),
2178 WRITE_COEF(0x1a, 0x01c1),
2179 WRITE_COEF(0x1b, 0x0202),
2180 WRITE_COEF(0x43, 0x3005),
2185 case HDA_FIXUP_ACT_PRE_PROBE
:
2186 snd_hda_override_conn_list(codec
, 0x14, ARRAY_SIZE(conn1
), conn1
);
2187 snd_hda_override_conn_list(codec
, 0x1b, ARRAY_SIZE(conn1
), conn1
);
2189 case HDA_FIXUP_ACT_INIT
:
2190 alc_process_coef_fw(codec
, gb_x570_coefs
);
2195 static void alc1220_fixup_clevo_p950(struct hda_codec
*codec
,
2196 const struct hda_fixup
*fix
,
2199 static const hda_nid_t conn1
[] = { 0x0c };
2201 if (action
!= HDA_FIXUP_ACT_PRE_PROBE
)
2204 alc_update_coef_idx(codec
, 0x7, 0, 0x3c3);
2205 /* We therefore want to make sure 0x14 (front headphone) and
2206 * 0x1b (speakers) use the stereo DAC 0x02
2208 snd_hda_override_conn_list(codec
, 0x14, ARRAY_SIZE(conn1
), conn1
);
2209 snd_hda_override_conn_list(codec
, 0x1b, ARRAY_SIZE(conn1
), conn1
);
2212 static void alc_fixup_headset_mode_no_hp_mic(struct hda_codec
*codec
,
2213 const struct hda_fixup
*fix
, int action
);
2215 static void alc1220_fixup_clevo_pb51ed(struct hda_codec
*codec
,
2216 const struct hda_fixup
*fix
,
2219 alc1220_fixup_clevo_p950(codec
, fix
, action
);
2220 alc_fixup_headset_mode_no_hp_mic(codec
, fix
, action
);
2223 static void alc887_asus_hp_automute_hook(struct hda_codec
*codec
,
2224 struct hda_jack_callback
*jack
)
2226 struct alc_spec
*spec
= codec
->spec
;
2229 snd_hda_gen_hp_automute(codec
, jack
);
2231 if (spec
->gen
.hp_jack_present
)
2232 vref
= AC_PINCTL_VREF_80
;
2234 vref
= AC_PINCTL_VREF_HIZ
;
2235 snd_hda_set_pin_ctl(codec
, 0x19, PIN_HP
| vref
);
2238 static void alc887_fixup_asus_jack(struct hda_codec
*codec
,
2239 const struct hda_fixup
*fix
, int action
)
2241 struct alc_spec
*spec
= codec
->spec
;
2242 if (action
!= HDA_FIXUP_ACT_PROBE
)
2244 snd_hda_set_pin_ctl_cache(codec
, 0x1b, PIN_HP
);
2245 spec
->gen
.hp_automute_hook
= alc887_asus_hp_automute_hook
;
2248 static const struct hda_fixup alc882_fixups
[] = {
2249 [ALC882_FIXUP_ABIT_AW9D_MAX
] = {
2250 .type
= HDA_FIXUP_PINS
,
2251 .v
.pins
= (const struct hda_pintbl
[]) {
2252 { 0x15, 0x01080104 }, /* side */
2253 { 0x16, 0x01011012 }, /* rear */
2254 { 0x17, 0x01016011 }, /* clfe */
2258 [ALC882_FIXUP_LENOVO_Y530
] = {
2259 .type
= HDA_FIXUP_PINS
,
2260 .v
.pins
= (const struct hda_pintbl
[]) {
2261 { 0x15, 0x99130112 }, /* rear int speakers */
2262 { 0x16, 0x99130111 }, /* subwoofer */
2266 [ALC882_FIXUP_PB_M5210
] = {
2267 .type
= HDA_FIXUP_PINCTLS
,
2268 .v
.pins
= (const struct hda_pintbl
[]) {
2269 { 0x19, PIN_VREF50
},
2273 [ALC882_FIXUP_ACER_ASPIRE_7736
] = {
2274 .type
= HDA_FIXUP_FUNC
,
2275 .v
.func
= alc_fixup_sku_ignore
,
2277 [ALC882_FIXUP_ASUS_W90V
] = {
2278 .type
= HDA_FIXUP_PINS
,
2279 .v
.pins
= (const struct hda_pintbl
[]) {
2280 { 0x16, 0x99130110 }, /* fix sequence for CLFE */
2284 [ALC889_FIXUP_CD
] = {
2285 .type
= HDA_FIXUP_PINS
,
2286 .v
.pins
= (const struct hda_pintbl
[]) {
2287 { 0x1c, 0x993301f0 }, /* CD */
2291 [ALC889_FIXUP_FRONT_HP_NO_PRESENCE
] = {
2292 .type
= HDA_FIXUP_PINS
,
2293 .v
.pins
= (const struct hda_pintbl
[]) {
2294 { 0x1b, 0x02214120 }, /* Front HP jack is flaky, disable jack detect */
2298 .chain_id
= ALC889_FIXUP_CD
,
2300 [ALC889_FIXUP_VAIO_TT
] = {
2301 .type
= HDA_FIXUP_PINS
,
2302 .v
.pins
= (const struct hda_pintbl
[]) {
2303 { 0x17, 0x90170111 }, /* hidden surround speaker */
2307 [ALC888_FIXUP_EEE1601
] = {
2308 .type
= HDA_FIXUP_VERBS
,
2309 .v
.verbs
= (const struct hda_verb
[]) {
2310 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x0b },
2311 { 0x20, AC_VERB_SET_PROC_COEF
, 0x0838 },
2315 [ALC886_FIXUP_EAPD
] = {
2316 .type
= HDA_FIXUP_VERBS
,
2317 .v
.verbs
= (const struct hda_verb
[]) {
2318 /* change to EAPD mode */
2319 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x07 },
2320 { 0x20, AC_VERB_SET_PROC_COEF
, 0x0068 },
2324 [ALC882_FIXUP_EAPD
] = {
2325 .type
= HDA_FIXUP_VERBS
,
2326 .v
.verbs
= (const struct hda_verb
[]) {
2327 /* change to EAPD mode */
2328 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x07 },
2329 { 0x20, AC_VERB_SET_PROC_COEF
, 0x3060 },
2333 [ALC883_FIXUP_EAPD
] = {
2334 .type
= HDA_FIXUP_VERBS
,
2335 .v
.verbs
= (const struct hda_verb
[]) {
2336 /* change to EAPD mode */
2337 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x07 },
2338 { 0x20, AC_VERB_SET_PROC_COEF
, 0x3070 },
2342 [ALC883_FIXUP_ACER_EAPD
] = {
2343 .type
= HDA_FIXUP_VERBS
,
2344 .v
.verbs
= (const struct hda_verb
[]) {
2345 /* eanable EAPD on Acer laptops */
2346 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x07 },
2347 { 0x20, AC_VERB_SET_PROC_COEF
, 0x3050 },
2351 [ALC882_FIXUP_GPIO1
] = {
2352 .type
= HDA_FIXUP_FUNC
,
2353 .v
.func
= alc_fixup_gpio1
,
2355 [ALC882_FIXUP_GPIO2
] = {
2356 .type
= HDA_FIXUP_FUNC
,
2357 .v
.func
= alc_fixup_gpio2
,
2359 [ALC882_FIXUP_GPIO3
] = {
2360 .type
= HDA_FIXUP_FUNC
,
2361 .v
.func
= alc_fixup_gpio3
,
2363 [ALC882_FIXUP_ASUS_W2JC
] = {
2364 .type
= HDA_FIXUP_FUNC
,
2365 .v
.func
= alc_fixup_gpio1
,
2367 .chain_id
= ALC882_FIXUP_EAPD
,
2369 [ALC889_FIXUP_COEF
] = {
2370 .type
= HDA_FIXUP_FUNC
,
2371 .v
.func
= alc889_fixup_coef
,
2373 [ALC882_FIXUP_ACER_ASPIRE_4930G
] = {
2374 .type
= HDA_FIXUP_PINS
,
2375 .v
.pins
= (const struct hda_pintbl
[]) {
2376 { 0x16, 0x99130111 }, /* CLFE speaker */
2377 { 0x17, 0x99130112 }, /* surround speaker */
2381 .chain_id
= ALC882_FIXUP_GPIO1
,
2383 [ALC882_FIXUP_ACER_ASPIRE_8930G
] = {
2384 .type
= HDA_FIXUP_PINS
,
2385 .v
.pins
= (const struct hda_pintbl
[]) {
2386 { 0x16, 0x99130111 }, /* CLFE speaker */
2387 { 0x1b, 0x99130112 }, /* surround speaker */
2391 .chain_id
= ALC882_FIXUP_ASPIRE_8930G_VERBS
,
2393 [ALC882_FIXUP_ASPIRE_8930G_VERBS
] = {
2394 /* additional init verbs for Acer Aspire 8930G */
2395 .type
= HDA_FIXUP_VERBS
,
2396 .v
.verbs
= (const struct hda_verb
[]) {
2397 /* Enable all DACs */
2398 /* DAC DISABLE/MUTE 1? */
2399 /* setting bits 1-5 disables DAC nids 0x02-0x06
2400 * apparently. Init=0x38 */
2401 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x03 },
2402 { 0x20, AC_VERB_SET_PROC_COEF
, 0x0000 },
2403 /* DAC DISABLE/MUTE 2? */
2404 /* some bit here disables the other DACs.
2406 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x08 },
2407 { 0x20, AC_VERB_SET_PROC_COEF
, 0x0000 },
2409 * This laptop has a stereo digital microphone.
2410 * The mics are only 1cm apart which makes the stereo
2411 * useless. However, either the mic or the ALC889
2412 * makes the signal become a difference/sum signal
2413 * instead of standard stereo, which is annoying.
2414 * So instead we flip this bit which makes the
2415 * codec replicate the sum signal to both channels,
2416 * turning it into a normal mono mic.
2418 /* DMIC_CONTROL? Init value = 0x0001 */
2419 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x0b },
2420 { 0x20, AC_VERB_SET_PROC_COEF
, 0x0003 },
2421 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x07 },
2422 { 0x20, AC_VERB_SET_PROC_COEF
, 0x3050 },
2426 .chain_id
= ALC882_FIXUP_GPIO1
,
2428 [ALC885_FIXUP_MACPRO_GPIO
] = {
2429 .type
= HDA_FIXUP_FUNC
,
2430 .v
.func
= alc885_fixup_macpro_gpio
,
2432 [ALC889_FIXUP_DAC_ROUTE
] = {
2433 .type
= HDA_FIXUP_FUNC
,
2434 .v
.func
= alc889_fixup_dac_route
,
2436 [ALC889_FIXUP_MBP_VREF
] = {
2437 .type
= HDA_FIXUP_FUNC
,
2438 .v
.func
= alc889_fixup_mbp_vref
,
2440 .chain_id
= ALC882_FIXUP_GPIO1
,
2442 [ALC889_FIXUP_IMAC91_VREF
] = {
2443 .type
= HDA_FIXUP_FUNC
,
2444 .v
.func
= alc889_fixup_imac91_vref
,
2446 .chain_id
= ALC882_FIXUP_GPIO1
,
2448 [ALC889_FIXUP_MBA11_VREF
] = {
2449 .type
= HDA_FIXUP_FUNC
,
2450 .v
.func
= alc889_fixup_mba11_vref
,
2452 .chain_id
= ALC889_FIXUP_MBP_VREF
,
2454 [ALC889_FIXUP_MBA21_VREF
] = {
2455 .type
= HDA_FIXUP_FUNC
,
2456 .v
.func
= alc889_fixup_mba21_vref
,
2458 .chain_id
= ALC889_FIXUP_MBP_VREF
,
2460 [ALC889_FIXUP_MP11_VREF
] = {
2461 .type
= HDA_FIXUP_FUNC
,
2462 .v
.func
= alc889_fixup_mba11_vref
,
2464 .chain_id
= ALC885_FIXUP_MACPRO_GPIO
,
2466 [ALC889_FIXUP_MP41_VREF
] = {
2467 .type
= HDA_FIXUP_FUNC
,
2468 .v
.func
= alc889_fixup_mbp_vref
,
2470 .chain_id
= ALC885_FIXUP_MACPRO_GPIO
,
2472 [ALC882_FIXUP_INV_DMIC
] = {
2473 .type
= HDA_FIXUP_FUNC
,
2474 .v
.func
= alc_fixup_inv_dmic
,
2476 [ALC882_FIXUP_NO_PRIMARY_HP
] = {
2477 .type
= HDA_FIXUP_FUNC
,
2478 .v
.func
= alc882_fixup_no_primary_hp
,
2480 [ALC887_FIXUP_ASUS_BASS
] = {
2481 .type
= HDA_FIXUP_PINS
,
2482 .v
.pins
= (const struct hda_pintbl
[]) {
2483 {0x16, 0x99130130}, /* bass speaker */
2487 .chain_id
= ALC887_FIXUP_BASS_CHMAP
,
2489 [ALC887_FIXUP_BASS_CHMAP
] = {
2490 .type
= HDA_FIXUP_FUNC
,
2491 .v
.func
= alc_fixup_bass_chmap
,
2493 [ALC1220_FIXUP_GB_DUAL_CODECS
] = {
2494 .type
= HDA_FIXUP_FUNC
,
2495 .v
.func
= alc1220_fixup_gb_dual_codecs
,
2497 [ALC1220_FIXUP_GB_X570
] = {
2498 .type
= HDA_FIXUP_FUNC
,
2499 .v
.func
= alc1220_fixup_gb_x570
,
2501 [ALC1220_FIXUP_CLEVO_P950
] = {
2502 .type
= HDA_FIXUP_FUNC
,
2503 .v
.func
= alc1220_fixup_clevo_p950
,
2505 [ALC1220_FIXUP_CLEVO_PB51ED
] = {
2506 .type
= HDA_FIXUP_FUNC
,
2507 .v
.func
= alc1220_fixup_clevo_pb51ed
,
2509 [ALC1220_FIXUP_CLEVO_PB51ED_PINS
] = {
2510 .type
= HDA_FIXUP_PINS
,
2511 .v
.pins
= (const struct hda_pintbl
[]) {
2512 { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */
2516 .chain_id
= ALC1220_FIXUP_CLEVO_PB51ED
,
2518 [ALC887_FIXUP_ASUS_AUDIO
] = {
2519 .type
= HDA_FIXUP_PINS
,
2520 .v
.pins
= (const struct hda_pintbl
[]) {
2521 { 0x15, 0x02a14150 }, /* use as headset mic, without its own jack detect */
2522 { 0x19, 0x22219420 },
2526 [ALC887_FIXUP_ASUS_HMIC
] = {
2527 .type
= HDA_FIXUP_FUNC
,
2528 .v
.func
= alc887_fixup_asus_jack
,
2530 .chain_id
= ALC887_FIXUP_ASUS_AUDIO
,
2532 [ALCS1200A_FIXUP_MIC_VREF
] = {
2533 .type
= HDA_FIXUP_PINCTLS
,
2534 .v
.pins
= (const struct hda_pintbl
[]) {
2535 { 0x18, PIN_VREF50
}, /* rear mic */
2536 { 0x19, PIN_VREF50
}, /* front mic */
2542 static const struct snd_pci_quirk alc882_fixup_tbl
[] = {
2543 SND_PCI_QUIRK(0x1025, 0x006c, "Acer Aspire 9810", ALC883_FIXUP_ACER_EAPD
),
2544 SND_PCI_QUIRK(0x1025, 0x0090, "Acer Aspire", ALC883_FIXUP_ACER_EAPD
),
2545 SND_PCI_QUIRK(0x1025, 0x0107, "Acer Aspire", ALC883_FIXUP_ACER_EAPD
),
2546 SND_PCI_QUIRK(0x1025, 0x010a, "Acer Ferrari 5000", ALC883_FIXUP_ACER_EAPD
),
2547 SND_PCI_QUIRK(0x1025, 0x0110, "Acer Aspire", ALC883_FIXUP_ACER_EAPD
),
2548 SND_PCI_QUIRK(0x1025, 0x0112, "Acer Aspire 9303", ALC883_FIXUP_ACER_EAPD
),
2549 SND_PCI_QUIRK(0x1025, 0x0121, "Acer Aspire 5920G", ALC883_FIXUP_ACER_EAPD
),
2550 SND_PCI_QUIRK(0x1025, 0x013e, "Acer Aspire 4930G",
2551 ALC882_FIXUP_ACER_ASPIRE_4930G
),
2552 SND_PCI_QUIRK(0x1025, 0x013f, "Acer Aspire 5930G",
2553 ALC882_FIXUP_ACER_ASPIRE_4930G
),
2554 SND_PCI_QUIRK(0x1025, 0x0145, "Acer Aspire 8930G",
2555 ALC882_FIXUP_ACER_ASPIRE_8930G
),
2556 SND_PCI_QUIRK(0x1025, 0x0146, "Acer Aspire 6935G",
2557 ALC882_FIXUP_ACER_ASPIRE_8930G
),
2558 SND_PCI_QUIRK(0x1025, 0x0142, "Acer Aspire 7730G",
2559 ALC882_FIXUP_ACER_ASPIRE_4930G
),
2560 SND_PCI_QUIRK(0x1025, 0x0155, "Packard-Bell M5120", ALC882_FIXUP_PB_M5210
),
2561 SND_PCI_QUIRK(0x1025, 0x015e, "Acer Aspire 6930G",
2562 ALC882_FIXUP_ACER_ASPIRE_4930G
),
2563 SND_PCI_QUIRK(0x1025, 0x0166, "Acer Aspire 6530G",
2564 ALC882_FIXUP_ACER_ASPIRE_4930G
),
2565 SND_PCI_QUIRK(0x1025, 0x021e, "Acer Aspire 5739G",
2566 ALC882_FIXUP_ACER_ASPIRE_4930G
),
2567 SND_PCI_QUIRK(0x1025, 0x0259, "Acer Aspire 5935", ALC889_FIXUP_DAC_ROUTE
),
2568 SND_PCI_QUIRK(0x1025, 0x026b, "Acer Aspire 8940G", ALC882_FIXUP_ACER_ASPIRE_8930G
),
2569 SND_PCI_QUIRK(0x1025, 0x0296, "Acer Aspire 7736z", ALC882_FIXUP_ACER_ASPIRE_7736
),
2570 SND_PCI_QUIRK(0x1043, 0x13c2, "Asus A7M", ALC882_FIXUP_EAPD
),
2571 SND_PCI_QUIRK(0x1043, 0x1873, "ASUS W90V", ALC882_FIXUP_ASUS_W90V
),
2572 SND_PCI_QUIRK(0x1043, 0x1971, "Asus W2JC", ALC882_FIXUP_ASUS_W2JC
),
2573 SND_PCI_QUIRK(0x1043, 0x2390, "Asus D700SA", ALC887_FIXUP_ASUS_HMIC
),
2574 SND_PCI_QUIRK(0x1043, 0x835f, "Asus Eee 1601", ALC888_FIXUP_EEE1601
),
2575 SND_PCI_QUIRK(0x1043, 0x84bc, "ASUS ET2700", ALC887_FIXUP_ASUS_BASS
),
2576 SND_PCI_QUIRK(0x1043, 0x8691, "ASUS ROG Ranger VIII", ALC882_FIXUP_GPIO3
),
2577 SND_PCI_QUIRK(0x1043, 0x8797, "ASUS TUF B550M-PLUS", ALCS1200A_FIXUP_MIC_VREF
),
2578 SND_PCI_QUIRK(0x104d, 0x9043, "Sony Vaio VGC-LN51JGB", ALC882_FIXUP_NO_PRIMARY_HP
),
2579 SND_PCI_QUIRK(0x104d, 0x9044, "Sony VAIO AiO", ALC882_FIXUP_NO_PRIMARY_HP
),
2580 SND_PCI_QUIRK(0x104d, 0x9047, "Sony Vaio TT", ALC889_FIXUP_VAIO_TT
),
2581 SND_PCI_QUIRK(0x104d, 0x905a, "Sony Vaio Z", ALC882_FIXUP_NO_PRIMARY_HP
),
2582 SND_PCI_QUIRK(0x104d, 0x9060, "Sony Vaio VPCL14M1R", ALC882_FIXUP_NO_PRIMARY_HP
),
2584 /* All Apple entries are in codec SSIDs */
2585 SND_PCI_QUIRK(0x106b, 0x00a0, "MacBookPro 3,1", ALC889_FIXUP_MBP_VREF
),
2586 SND_PCI_QUIRK(0x106b, 0x00a1, "Macbook", ALC889_FIXUP_MBP_VREF
),
2587 SND_PCI_QUIRK(0x106b, 0x00a4, "MacbookPro 4,1", ALC889_FIXUP_MBP_VREF
),
2588 SND_PCI_QUIRK(0x106b, 0x0c00, "Mac Pro", ALC889_FIXUP_MP11_VREF
),
2589 SND_PCI_QUIRK(0x106b, 0x1000, "iMac 24", ALC885_FIXUP_MACPRO_GPIO
),
2590 SND_PCI_QUIRK(0x106b, 0x2800, "AppleTV", ALC885_FIXUP_MACPRO_GPIO
),
2591 SND_PCI_QUIRK(0x106b, 0x2c00, "MacbookPro rev3", ALC889_FIXUP_MBP_VREF
),
2592 SND_PCI_QUIRK(0x106b, 0x3000, "iMac", ALC889_FIXUP_MBP_VREF
),
2593 SND_PCI_QUIRK(0x106b, 0x3200, "iMac 7,1 Aluminum", ALC882_FIXUP_EAPD
),
2594 SND_PCI_QUIRK(0x106b, 0x3400, "MacBookAir 1,1", ALC889_FIXUP_MBA11_VREF
),
2595 SND_PCI_QUIRK(0x106b, 0x3500, "MacBookAir 2,1", ALC889_FIXUP_MBA21_VREF
),
2596 SND_PCI_QUIRK(0x106b, 0x3600, "Macbook 3,1", ALC889_FIXUP_MBP_VREF
),
2597 SND_PCI_QUIRK(0x106b, 0x3800, "MacbookPro 4,1", ALC889_FIXUP_MBP_VREF
),
2598 SND_PCI_QUIRK(0x106b, 0x3e00, "iMac 24 Aluminum", ALC885_FIXUP_MACPRO_GPIO
),
2599 SND_PCI_QUIRK(0x106b, 0x3f00, "Macbook 5,1", ALC889_FIXUP_IMAC91_VREF
),
2600 SND_PCI_QUIRK(0x106b, 0x4000, "MacbookPro 5,1", ALC889_FIXUP_IMAC91_VREF
),
2601 SND_PCI_QUIRK(0x106b, 0x4100, "Macmini 3,1", ALC889_FIXUP_IMAC91_VREF
),
2602 SND_PCI_QUIRK(0x106b, 0x4200, "Mac Pro 4,1/5,1", ALC889_FIXUP_MP41_VREF
),
2603 SND_PCI_QUIRK(0x106b, 0x4300, "iMac 9,1", ALC889_FIXUP_IMAC91_VREF
),
2604 SND_PCI_QUIRK(0x106b, 0x4600, "MacbookPro 5,2", ALC889_FIXUP_IMAC91_VREF
),
2605 SND_PCI_QUIRK(0x106b, 0x4900, "iMac 9,1 Aluminum", ALC889_FIXUP_IMAC91_VREF
),
2606 SND_PCI_QUIRK(0x106b, 0x4a00, "Macbook 5,2", ALC889_FIXUP_MBA11_VREF
),
2608 SND_PCI_QUIRK(0x1071, 0x8258, "Evesham Voyaeger", ALC882_FIXUP_EAPD
),
2609 SND_PCI_QUIRK(0x13fe, 0x1009, "Advantech MIT-W101", ALC886_FIXUP_EAPD
),
2610 SND_PCI_QUIRK(0x1458, 0xa002, "Gigabyte EP45-DS3/Z87X-UD3H", ALC889_FIXUP_FRONT_HP_NO_PRESENCE
),
2611 SND_PCI_QUIRK(0x1458, 0xa0b8, "Gigabyte AZ370-Gaming", ALC1220_FIXUP_GB_DUAL_CODECS
),
2612 SND_PCI_QUIRK(0x1458, 0xa0cd, "Gigabyte X570 Aorus Master", ALC1220_FIXUP_GB_X570
),
2613 SND_PCI_QUIRK(0x1458, 0xa0ce, "Gigabyte X570 Aorus Xtreme", ALC1220_FIXUP_GB_X570
),
2614 SND_PCI_QUIRK(0x1458, 0xa0d5, "Gigabyte X570S Aorus Master", ALC1220_FIXUP_GB_X570
),
2615 SND_PCI_QUIRK(0x1462, 0x11f7, "MSI-GE63", ALC1220_FIXUP_CLEVO_P950
),
2616 SND_PCI_QUIRK(0x1462, 0x1228, "MSI-GP63", ALC1220_FIXUP_CLEVO_P950
),
2617 SND_PCI_QUIRK(0x1462, 0x1229, "MSI-GP73", ALC1220_FIXUP_CLEVO_P950
),
2618 SND_PCI_QUIRK(0x1462, 0x1275, "MSI-GL63", ALC1220_FIXUP_CLEVO_P950
),
2619 SND_PCI_QUIRK(0x1462, 0x1276, "MSI-GL73", ALC1220_FIXUP_CLEVO_P950
),
2620 SND_PCI_QUIRK(0x1462, 0x1293, "MSI-GP65", ALC1220_FIXUP_CLEVO_P950
),
2621 SND_PCI_QUIRK(0x1462, 0x7350, "MSI-7350", ALC889_FIXUP_CD
),
2622 SND_PCI_QUIRK(0x1462, 0xcc34, "MSI Godlike X570", ALC1220_FIXUP_GB_DUAL_CODECS
),
2623 SND_PCI_QUIRK(0x1462, 0xda57, "MSI Z270-Gaming", ALC1220_FIXUP_GB_DUAL_CODECS
),
2624 SND_PCI_QUIRK_VENDOR(0x1462, "MSI", ALC882_FIXUP_GPIO3
),
2625 SND_PCI_QUIRK(0x147b, 0x107a, "Abit AW9D-MAX", ALC882_FIXUP_ABIT_AW9D_MAX
),
2626 SND_PCI_QUIRK(0x1558, 0x50d3, "Clevo PC50[ER][CDF]", ALC1220_FIXUP_CLEVO_PB51ED_PINS
),
2627 SND_PCI_QUIRK(0x1558, 0x65d1, "Clevo PB51[ER][CDF]", ALC1220_FIXUP_CLEVO_PB51ED_PINS
),
2628 SND_PCI_QUIRK(0x1558, 0x65d2, "Clevo PB51R[CDF]", ALC1220_FIXUP_CLEVO_PB51ED_PINS
),
2629 SND_PCI_QUIRK(0x1558, 0x65e1, "Clevo PB51[ED][DF]", ALC1220_FIXUP_CLEVO_PB51ED_PINS
),
2630 SND_PCI_QUIRK(0x1558, 0x65e5, "Clevo PC50D[PRS](?:-D|-G)?", ALC1220_FIXUP_CLEVO_PB51ED_PINS
),
2631 SND_PCI_QUIRK(0x1558, 0x65f1, "Clevo PC50HS", ALC1220_FIXUP_CLEVO_PB51ED_PINS
),
2632 SND_PCI_QUIRK(0x1558, 0x65f5, "Clevo PD50PN[NRT]", ALC1220_FIXUP_CLEVO_PB51ED_PINS
),
2633 SND_PCI_QUIRK(0x1558, 0x67d1, "Clevo PB71[ER][CDF]", ALC1220_FIXUP_CLEVO_PB51ED_PINS
),
2634 SND_PCI_QUIRK(0x1558, 0x67e1, "Clevo PB71[DE][CDF]", ALC1220_FIXUP_CLEVO_PB51ED_PINS
),
2635 SND_PCI_QUIRK(0x1558, 0x67e5, "Clevo PC70D[PRS](?:-D|-G)?", ALC1220_FIXUP_CLEVO_PB51ED_PINS
),
2636 SND_PCI_QUIRK(0x1558, 0x67f1, "Clevo PC70H[PRS]", ALC1220_FIXUP_CLEVO_PB51ED_PINS
),
2637 SND_PCI_QUIRK(0x1558, 0x70d1, "Clevo PC70[ER][CDF]", ALC1220_FIXUP_CLEVO_PB51ED_PINS
),
2638 SND_PCI_QUIRK(0x1558, 0x7714, "Clevo X170SM", ALC1220_FIXUP_CLEVO_PB51ED_PINS
),
2639 SND_PCI_QUIRK(0x1558, 0x7715, "Clevo X170KM-G", ALC1220_FIXUP_CLEVO_PB51ED
),
2640 SND_PCI_QUIRK(0x1558, 0x9501, "Clevo P950HR", ALC1220_FIXUP_CLEVO_P950
),
2641 SND_PCI_QUIRK(0x1558, 0x9506, "Clevo P955HQ", ALC1220_FIXUP_CLEVO_P950
),
2642 SND_PCI_QUIRK(0x1558, 0x950a, "Clevo P955H[PR]", ALC1220_FIXUP_CLEVO_P950
),
2643 SND_PCI_QUIRK(0x1558, 0x95e1, "Clevo P95xER", ALC1220_FIXUP_CLEVO_P950
),
2644 SND_PCI_QUIRK(0x1558, 0x95e2, "Clevo P950ER", ALC1220_FIXUP_CLEVO_P950
),
2645 SND_PCI_QUIRK(0x1558, 0x95e3, "Clevo P955[ER]T", ALC1220_FIXUP_CLEVO_P950
),
2646 SND_PCI_QUIRK(0x1558, 0x95e4, "Clevo P955ER", ALC1220_FIXUP_CLEVO_P950
),
2647 SND_PCI_QUIRK(0x1558, 0x95e5, "Clevo P955EE6", ALC1220_FIXUP_CLEVO_P950
),
2648 SND_PCI_QUIRK(0x1558, 0x95e6, "Clevo P950R[CDF]", ALC1220_FIXUP_CLEVO_P950
),
2649 SND_PCI_QUIRK(0x1558, 0x96e1, "Clevo P960[ER][CDFN]-K", ALC1220_FIXUP_CLEVO_P950
),
2650 SND_PCI_QUIRK(0x1558, 0x97e1, "Clevo P970[ER][CDFN]", ALC1220_FIXUP_CLEVO_P950
),
2651 SND_PCI_QUIRK(0x1558, 0x97e2, "Clevo P970RC-M", ALC1220_FIXUP_CLEVO_P950
),
2652 SND_PCI_QUIRK_VENDOR(0x1558, "Clevo laptop", ALC882_FIXUP_EAPD
),
2653 SND_PCI_QUIRK(0x161f, 0x2054, "Medion laptop", ALC883_FIXUP_EAPD
),
2654 SND_PCI_QUIRK(0x17aa, 0x3a0d, "Lenovo Y530", ALC882_FIXUP_LENOVO_Y530
),
2655 SND_PCI_QUIRK(0x8086, 0x0022, "DX58SO", ALC889_FIXUP_COEF
),
2659 static const struct hda_model_fixup alc882_fixup_models
[] = {
2660 {.id
= ALC882_FIXUP_ABIT_AW9D_MAX
, .name
= "abit-aw9d"},
2661 {.id
= ALC882_FIXUP_LENOVO_Y530
, .name
= "lenovo-y530"},
2662 {.id
= ALC882_FIXUP_ACER_ASPIRE_7736
, .name
= "acer-aspire-7736"},
2663 {.id
= ALC882_FIXUP_ASUS_W90V
, .name
= "asus-w90v"},
2664 {.id
= ALC889_FIXUP_CD
, .name
= "cd"},
2665 {.id
= ALC889_FIXUP_FRONT_HP_NO_PRESENCE
, .name
= "no-front-hp"},
2666 {.id
= ALC889_FIXUP_VAIO_TT
, .name
= "vaio-tt"},
2667 {.id
= ALC888_FIXUP_EEE1601
, .name
= "eee1601"},
2668 {.id
= ALC882_FIXUP_EAPD
, .name
= "alc882-eapd"},
2669 {.id
= ALC883_FIXUP_EAPD
, .name
= "alc883-eapd"},
2670 {.id
= ALC882_FIXUP_GPIO1
, .name
= "gpio1"},
2671 {.id
= ALC882_FIXUP_GPIO2
, .name
= "gpio2"},
2672 {.id
= ALC882_FIXUP_GPIO3
, .name
= "gpio3"},
2673 {.id
= ALC889_FIXUP_COEF
, .name
= "alc889-coef"},
2674 {.id
= ALC882_FIXUP_ASUS_W2JC
, .name
= "asus-w2jc"},
2675 {.id
= ALC882_FIXUP_ACER_ASPIRE_4930G
, .name
= "acer-aspire-4930g"},
2676 {.id
= ALC882_FIXUP_ACER_ASPIRE_8930G
, .name
= "acer-aspire-8930g"},
2677 {.id
= ALC883_FIXUP_ACER_EAPD
, .name
= "acer-aspire"},
2678 {.id
= ALC885_FIXUP_MACPRO_GPIO
, .name
= "macpro-gpio"},
2679 {.id
= ALC889_FIXUP_DAC_ROUTE
, .name
= "dac-route"},
2680 {.id
= ALC889_FIXUP_MBP_VREF
, .name
= "mbp-vref"},
2681 {.id
= ALC889_FIXUP_IMAC91_VREF
, .name
= "imac91-vref"},
2682 {.id
= ALC889_FIXUP_MBA11_VREF
, .name
= "mba11-vref"},
2683 {.id
= ALC889_FIXUP_MBA21_VREF
, .name
= "mba21-vref"},
2684 {.id
= ALC889_FIXUP_MP11_VREF
, .name
= "mp11-vref"},
2685 {.id
= ALC889_FIXUP_MP41_VREF
, .name
= "mp41-vref"},
2686 {.id
= ALC882_FIXUP_INV_DMIC
, .name
= "inv-dmic"},
2687 {.id
= ALC882_FIXUP_NO_PRIMARY_HP
, .name
= "no-primary-hp"},
2688 {.id
= ALC887_FIXUP_ASUS_BASS
, .name
= "asus-bass"},
2689 {.id
= ALC1220_FIXUP_GB_DUAL_CODECS
, .name
= "dual-codecs"},
2690 {.id
= ALC1220_FIXUP_GB_X570
, .name
= "gb-x570"},
2691 {.id
= ALC1220_FIXUP_CLEVO_P950
, .name
= "clevo-p950"},
2695 static const struct snd_hda_pin_quirk alc882_pin_fixup_tbl
[] = {
2696 SND_HDA_PIN_QUIRK(0x10ec1220, 0x1043, "ASUS", ALC1220_FIXUP_CLEVO_P950
,
2704 {0x1e, 0x01456130}),
2705 SND_HDA_PIN_QUIRK(0x10ec1220, 0x1462, "MS-7C35", ALC1220_FIXUP_CLEVO_P950
,
2713 {0x1e, 0x01451130}),
2718 * BIOS auto configuration
2720 /* almost identical with ALC880 parser... */
2721 static int alc882_parse_auto_config(struct hda_codec
*codec
)
2723 static const hda_nid_t alc882_ignore
[] = { 0x1d, 0 };
2724 static const hda_nid_t alc882_ssids
[] = { 0x15, 0x1b, 0x14, 0 };
2725 return alc_parse_auto_config(codec
, alc882_ignore
, alc882_ssids
);
2730 static int patch_alc882(struct hda_codec
*codec
)
2732 struct alc_spec
*spec
;
2735 err
= alc_alloc_spec(codec
, 0x0b);
2741 switch (codec
->core
.vendor_id
) {
2749 /* ALC883 and variants */
2750 alc_fix_pll_init(codec
, 0x20, 0x0a, 10);
2754 alc_pre_init(codec
);
2756 snd_hda_pick_fixup(codec
, alc882_fixup_models
, alc882_fixup_tbl
,
2758 snd_hda_pick_pin_fixup(codec
, alc882_pin_fixup_tbl
, alc882_fixups
, true);
2759 snd_hda_apply_fixup(codec
, HDA_FIXUP_ACT_PRE_PROBE
);
2761 alc_auto_parse_customize_define(codec
);
2763 if (has_cdefine_beep(codec
))
2764 spec
->gen
.beep_nid
= 0x01;
2766 /* automatic parse from the BIOS config */
2767 err
= alc882_parse_auto_config(codec
);
2771 if (!spec
->gen
.no_analog
&& spec
->gen
.beep_nid
) {
2772 err
= set_beep_amp(spec
, 0x0b, 0x05, HDA_INPUT
);
2777 snd_hda_apply_fixup(codec
, HDA_FIXUP_ACT_PROBE
);
2790 static int alc262_parse_auto_config(struct hda_codec
*codec
)
2792 static const hda_nid_t alc262_ignore
[] = { 0x1d, 0 };
2793 static const hda_nid_t alc262_ssids
[] = { 0x15, 0x1b, 0x14, 0 };
2794 return alc_parse_auto_config(codec
, alc262_ignore
, alc262_ssids
);
2801 ALC262_FIXUP_FSC_H270
,
2802 ALC262_FIXUP_FSC_S7110
,
2803 ALC262_FIXUP_HP_Z200
,
2805 ALC262_FIXUP_LENOVO_3000
,
2807 ALC262_FIXUP_BENQ_T31
,
2808 ALC262_FIXUP_INV_DMIC
,
2809 ALC262_FIXUP_INTEL_BAYLEYBAY
,
2812 static const struct hda_fixup alc262_fixups
[] = {
2813 [ALC262_FIXUP_FSC_H270
] = {
2814 .type
= HDA_FIXUP_PINS
,
2815 .v
.pins
= (const struct hda_pintbl
[]) {
2816 { 0x14, 0x99130110 }, /* speaker */
2817 { 0x15, 0x0221142f }, /* front HP */
2818 { 0x1b, 0x0121141f }, /* rear HP */
2822 [ALC262_FIXUP_FSC_S7110
] = {
2823 .type
= HDA_FIXUP_PINS
,
2824 .v
.pins
= (const struct hda_pintbl
[]) {
2825 { 0x15, 0x90170110 }, /* speaker */
2829 .chain_id
= ALC262_FIXUP_BENQ
,
2831 [ALC262_FIXUP_HP_Z200
] = {
2832 .type
= HDA_FIXUP_PINS
,
2833 .v
.pins
= (const struct hda_pintbl
[]) {
2834 { 0x16, 0x99130120 }, /* internal speaker */
2838 [ALC262_FIXUP_TYAN
] = {
2839 .type
= HDA_FIXUP_PINS
,
2840 .v
.pins
= (const struct hda_pintbl
[]) {
2841 { 0x14, 0x1993e1f0 }, /* int AUX */
2845 [ALC262_FIXUP_LENOVO_3000
] = {
2846 .type
= HDA_FIXUP_PINCTLS
,
2847 .v
.pins
= (const struct hda_pintbl
[]) {
2848 { 0x19, PIN_VREF50
},
2852 .chain_id
= ALC262_FIXUP_BENQ
,
2854 [ALC262_FIXUP_BENQ
] = {
2855 .type
= HDA_FIXUP_VERBS
,
2856 .v
.verbs
= (const struct hda_verb
[]) {
2857 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x07 },
2858 { 0x20, AC_VERB_SET_PROC_COEF
, 0x3070 },
2862 [ALC262_FIXUP_BENQ_T31
] = {
2863 .type
= HDA_FIXUP_VERBS
,
2864 .v
.verbs
= (const struct hda_verb
[]) {
2865 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x07 },
2866 { 0x20, AC_VERB_SET_PROC_COEF
, 0x3050 },
2870 [ALC262_FIXUP_INV_DMIC
] = {
2871 .type
= HDA_FIXUP_FUNC
,
2872 .v
.func
= alc_fixup_inv_dmic
,
2874 [ALC262_FIXUP_INTEL_BAYLEYBAY
] = {
2875 .type
= HDA_FIXUP_FUNC
,
2876 .v
.func
= alc_fixup_no_depop_delay
,
2880 static const struct snd_pci_quirk alc262_fixup_tbl
[] = {
2881 SND_PCI_QUIRK(0x103c, 0x170b, "HP Z200", ALC262_FIXUP_HP_Z200
),
2882 SND_PCI_QUIRK(0x10cf, 0x1397, "Fujitsu Lifebook S7110", ALC262_FIXUP_FSC_S7110
),
2883 SND_PCI_QUIRK(0x10cf, 0x142d, "Fujitsu Lifebook E8410", ALC262_FIXUP_BENQ
),
2884 SND_PCI_QUIRK(0x10f1, 0x2915, "Tyan Thunder n6650W", ALC262_FIXUP_TYAN
),
2885 SND_PCI_QUIRK(0x1734, 0x1141, "FSC ESPRIMO U9210", ALC262_FIXUP_FSC_H270
),
2886 SND_PCI_QUIRK(0x1734, 0x1147, "FSC Celsius H270", ALC262_FIXUP_FSC_H270
),
2887 SND_PCI_QUIRK(0x17aa, 0x384e, "Lenovo 3000", ALC262_FIXUP_LENOVO_3000
),
2888 SND_PCI_QUIRK(0x17ff, 0x0560, "Benq ED8", ALC262_FIXUP_BENQ
),
2889 SND_PCI_QUIRK(0x17ff, 0x058d, "Benq T31-16", ALC262_FIXUP_BENQ_T31
),
2890 SND_PCI_QUIRK(0x8086, 0x7270, "BayleyBay", ALC262_FIXUP_INTEL_BAYLEYBAY
),
2894 static const struct hda_model_fixup alc262_fixup_models
[] = {
2895 {.id
= ALC262_FIXUP_INV_DMIC
, .name
= "inv-dmic"},
2896 {.id
= ALC262_FIXUP_FSC_H270
, .name
= "fsc-h270"},
2897 {.id
= ALC262_FIXUP_FSC_S7110
, .name
= "fsc-s7110"},
2898 {.id
= ALC262_FIXUP_HP_Z200
, .name
= "hp-z200"},
2899 {.id
= ALC262_FIXUP_TYAN
, .name
= "tyan"},
2900 {.id
= ALC262_FIXUP_LENOVO_3000
, .name
= "lenovo-3000"},
2901 {.id
= ALC262_FIXUP_BENQ
, .name
= "benq"},
2902 {.id
= ALC262_FIXUP_BENQ_T31
, .name
= "benq-t31"},
2903 {.id
= ALC262_FIXUP_INTEL_BAYLEYBAY
, .name
= "bayleybay"},
2909 static int patch_alc262(struct hda_codec
*codec
)
2911 struct alc_spec
*spec
;
2914 err
= alc_alloc_spec(codec
, 0x0b);
2919 spec
->gen
.shared_mic_vref_pin
= 0x18;
2921 spec
->shutup
= alc_eapd_shutup
;
2924 /* pshou 07/11/05 set a zero PCM sample to DAC when FIFO is
2927 alc_update_coefex_idx(codec
, 0x1a, 7, 0, 0x80);
2929 alc_fix_pll_init(codec
, 0x20, 0x0a, 10);
2931 alc_pre_init(codec
);
2933 snd_hda_pick_fixup(codec
, alc262_fixup_models
, alc262_fixup_tbl
,
2935 snd_hda_apply_fixup(codec
, HDA_FIXUP_ACT_PRE_PROBE
);
2937 alc_auto_parse_customize_define(codec
);
2939 if (has_cdefine_beep(codec
))
2940 spec
->gen
.beep_nid
= 0x01;
2942 /* automatic parse from the BIOS config */
2943 err
= alc262_parse_auto_config(codec
);
2947 if (!spec
->gen
.no_analog
&& spec
->gen
.beep_nid
) {
2948 err
= set_beep_amp(spec
, 0x0b, 0x05, HDA_INPUT
);
2953 snd_hda_apply_fixup(codec
, HDA_FIXUP_ACT_PROBE
);
2965 /* bind Beep switches of both NID 0x0f and 0x10 */
2966 static int alc268_beep_switch_put(struct snd_kcontrol
*kcontrol
,
2967 struct snd_ctl_elem_value
*ucontrol
)
2969 struct hda_codec
*codec
= snd_kcontrol_chip(kcontrol
);
2973 mutex_lock(&codec
->control_mutex
);
2974 pval
= kcontrol
->private_value
;
2975 kcontrol
->private_value
= (pval
& ~0xff) | 0x0f;
2976 err
= snd_hda_mixer_amp_switch_put(kcontrol
, ucontrol
);
2978 kcontrol
->private_value
= (pval
& ~0xff) | 0x10;
2979 err
= snd_hda_mixer_amp_switch_put(kcontrol
, ucontrol
);
2981 kcontrol
->private_value
= pval
;
2982 mutex_unlock(&codec
->control_mutex
);
2986 static const struct snd_kcontrol_new alc268_beep_mixer
[] = {
2987 HDA_CODEC_VOLUME("Beep Playback Volume", 0x1d, 0x0, HDA_INPUT
),
2989 .iface
= SNDRV_CTL_ELEM_IFACE_MIXER
,
2990 .name
= "Beep Playback Switch",
2991 .subdevice
= HDA_SUBDEV_AMP_FLAG
,
2992 .info
= snd_hda_mixer_amp_switch_info
,
2993 .get
= snd_hda_mixer_amp_switch_get
,
2994 .put
= alc268_beep_switch_put
,
2995 .private_value
= HDA_COMPOSE_AMP_VAL(0x0f, 3, 1, HDA_INPUT
)
2999 /* set PCBEEP vol = 0, mute connections */
3000 static const struct hda_verb alc268_beep_init_verbs
[] = {
3001 {0x1d, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_IN_UNMUTE(0)},
3002 {0x0f, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_IN_MUTE(1)},
3003 {0x10, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_IN_MUTE(1)},
3008 ALC268_FIXUP_INV_DMIC
,
3009 ALC268_FIXUP_HP_EAPD
,
3013 static const struct hda_fixup alc268_fixups
[] = {
3014 [ALC268_FIXUP_INV_DMIC
] = {
3015 .type
= HDA_FIXUP_FUNC
,
3016 .v
.func
= alc_fixup_inv_dmic
,
3018 [ALC268_FIXUP_HP_EAPD
] = {
3019 .type
= HDA_FIXUP_VERBS
,
3020 .v
.verbs
= (const struct hda_verb
[]) {
3021 {0x15, AC_VERB_SET_EAPD_BTLENABLE
, 0},
3025 [ALC268_FIXUP_SPDIF
] = {
3026 .type
= HDA_FIXUP_PINS
,
3027 .v
.pins
= (const struct hda_pintbl
[]) {
3028 { 0x1e, 0x014b1180 }, /* enable SPDIF out */
3034 static const struct hda_model_fixup alc268_fixup_models
[] = {
3035 {.id
= ALC268_FIXUP_INV_DMIC
, .name
= "inv-dmic"},
3036 {.id
= ALC268_FIXUP_HP_EAPD
, .name
= "hp-eapd"},
3037 {.id
= ALC268_FIXUP_SPDIF
, .name
= "spdif"},
3041 static const struct snd_pci_quirk alc268_fixup_tbl
[] = {
3042 SND_PCI_QUIRK(0x1025, 0x0139, "Acer TravelMate 6293", ALC268_FIXUP_SPDIF
),
3043 SND_PCI_QUIRK(0x1025, 0x015b, "Acer AOA 150 (ZG5)", ALC268_FIXUP_INV_DMIC
),
3044 /* below is codec SSID since multiple Toshiba laptops have the
3045 * same PCI SSID 1179:ff00
3047 SND_PCI_QUIRK(0x1179, 0xff06, "Toshiba P200", ALC268_FIXUP_HP_EAPD
),
3052 * BIOS auto configuration
3054 static int alc268_parse_auto_config(struct hda_codec
*codec
)
3056 static const hda_nid_t alc268_ssids
[] = { 0x15, 0x1b, 0x14, 0 };
3057 return alc_parse_auto_config(codec
, NULL
, alc268_ssids
);
3062 static int patch_alc268(struct hda_codec
*codec
)
3064 struct alc_spec
*spec
;
3067 /* ALC268 has no aa-loopback mixer */
3068 err
= alc_alloc_spec(codec
, 0);
3073 if (has_cdefine_beep(codec
))
3074 spec
->gen
.beep_nid
= 0x01;
3076 spec
->shutup
= alc_eapd_shutup
;
3078 alc_pre_init(codec
);
3080 snd_hda_pick_fixup(codec
, alc268_fixup_models
, alc268_fixup_tbl
, alc268_fixups
);
3081 snd_hda_apply_fixup(codec
, HDA_FIXUP_ACT_PRE_PROBE
);
3083 /* automatic parse from the BIOS config */
3084 err
= alc268_parse_auto_config(codec
);
3088 if (err
> 0 && !spec
->gen
.no_analog
&&
3089 spec
->gen
.autocfg
.speaker_pins
[0] != 0x1d) {
3090 for (i
= 0; i
< ARRAY_SIZE(alc268_beep_mixer
); i
++) {
3091 if (!snd_hda_gen_add_kctl(&spec
->gen
, NULL
,
3092 &alc268_beep_mixer
[i
])) {
3097 snd_hda_add_verbs(codec
, alc268_beep_init_verbs
);
3098 if (!query_amp_caps(codec
, 0x1d, HDA_INPUT
))
3099 /* override the amp caps for beep generator */
3100 snd_hda_override_amp_caps(codec
, 0x1d, HDA_INPUT
,
3101 (0x0c << AC_AMPCAP_OFFSET_SHIFT
) |
3102 (0x0c << AC_AMPCAP_NUM_STEPS_SHIFT
) |
3103 (0x07 << AC_AMPCAP_STEP_SIZE_SHIFT
) |
3104 (0 << AC_AMPCAP_MUTE_SHIFT
));
3107 snd_hda_apply_fixup(codec
, HDA_FIXUP_ACT_PROBE
);
3120 static const struct hda_pcm_stream alc269_44k_pcm_analog_playback
= {
3121 .rates
= SNDRV_PCM_RATE_44100
, /* fixed rate */
3124 static const struct hda_pcm_stream alc269_44k_pcm_analog_capture
= {
3125 .rates
= SNDRV_PCM_RATE_44100
, /* fixed rate */
3128 /* different alc269-variants */
3130 ALC269_TYPE_ALC269VA
,
3131 ALC269_TYPE_ALC269VB
,
3132 ALC269_TYPE_ALC269VC
,
3133 ALC269_TYPE_ALC269VD
,
3155 * BIOS auto configuration
3157 static int alc269_parse_auto_config(struct hda_codec
*codec
)
3159 static const hda_nid_t alc269_ignore
[] = { 0x1d, 0 };
3160 static const hda_nid_t alc269_ssids
[] = { 0, 0x1b, 0x14, 0x21 };
3161 static const hda_nid_t alc269va_ssids
[] = { 0x15, 0x1b, 0x14, 0 };
3162 struct alc_spec
*spec
= codec
->spec
;
3163 const hda_nid_t
*ssids
;
3165 switch (spec
->codec_variant
) {
3166 case ALC269_TYPE_ALC269VA
:
3167 case ALC269_TYPE_ALC269VC
:
3168 case ALC269_TYPE_ALC280
:
3169 case ALC269_TYPE_ALC284
:
3170 case ALC269_TYPE_ALC293
:
3171 ssids
= alc269va_ssids
;
3173 case ALC269_TYPE_ALC269VB
:
3174 case ALC269_TYPE_ALC269VD
:
3175 case ALC269_TYPE_ALC282
:
3176 case ALC269_TYPE_ALC283
:
3177 case ALC269_TYPE_ALC286
:
3178 case ALC269_TYPE_ALC298
:
3179 case ALC269_TYPE_ALC255
:
3180 case ALC269_TYPE_ALC256
:
3181 case ALC269_TYPE_ALC257
:
3182 case ALC269_TYPE_ALC215
:
3183 case ALC269_TYPE_ALC225
:
3184 case ALC269_TYPE_ALC245
:
3185 case ALC269_TYPE_ALC287
:
3186 case ALC269_TYPE_ALC294
:
3187 case ALC269_TYPE_ALC300
:
3188 case ALC269_TYPE_ALC623
:
3189 case ALC269_TYPE_ALC700
:
3190 ssids
= alc269_ssids
;
3193 ssids
= alc269_ssids
;
3197 return alc_parse_auto_config(codec
, alc269_ignore
, ssids
);
3200 static const struct hda_jack_keymap alc_headset_btn_keymap
[] = {
3201 { SND_JACK_BTN_0
, KEY_PLAYPAUSE
},
3202 { SND_JACK_BTN_1
, KEY_VOICECOMMAND
},
3203 { SND_JACK_BTN_2
, KEY_VOLUMEUP
},
3204 { SND_JACK_BTN_3
, KEY_VOLUMEDOWN
},
3208 static void alc_headset_btn_callback(struct hda_codec
*codec
,
3209 struct hda_jack_callback
*jack
)
3213 if (jack
->unsol_res
& (7 << 13))
3214 report
|= SND_JACK_BTN_0
;
3216 if (jack
->unsol_res
& (1 << 16 | 3 << 8))
3217 report
|= SND_JACK_BTN_1
;
3220 if (jack
->unsol_res
& (7 << 23))
3221 report
|= SND_JACK_BTN_2
;
3223 /* Volume down key */
3224 if (jack
->unsol_res
& (7 << 10))
3225 report
|= SND_JACK_BTN_3
;
3227 snd_hda_jack_set_button_state(codec
, jack
->nid
, report
);
3230 static void alc_disable_headset_jack_key(struct hda_codec
*codec
)
3232 struct alc_spec
*spec
= codec
->spec
;
3234 if (!spec
->has_hs_key
)
3237 switch (codec
->core
.vendor_id
) {
3245 alc_write_coef_idx(codec
, 0x48, 0x0);
3246 alc_update_coef_idx(codec
, 0x49, 0x0045, 0x0);
3247 alc_update_coef_idx(codec
, 0x44, 0x0045 << 8, 0x0);
3253 alc_write_coef_idx(codec
, 0x48, 0x0);
3254 alc_update_coef_idx(codec
, 0x49, 0x0045, 0x0);
3259 static void alc_enable_headset_jack_key(struct hda_codec
*codec
)
3261 struct alc_spec
*spec
= codec
->spec
;
3263 if (!spec
->has_hs_key
)
3266 switch (codec
->core
.vendor_id
) {
3274 alc_write_coef_idx(codec
, 0x48, 0xd011);
3275 alc_update_coef_idx(codec
, 0x49, 0x007f, 0x0045);
3276 alc_update_coef_idx(codec
, 0x44, 0x007f << 8, 0x0045 << 8);
3282 alc_write_coef_idx(codec
, 0x48, 0xd011);
3283 alc_update_coef_idx(codec
, 0x49, 0x007f, 0x0045);
3288 static void alc_fixup_headset_jack(struct hda_codec
*codec
,
3289 const struct hda_fixup
*fix
, int action
)
3291 struct alc_spec
*spec
= codec
->spec
;
3295 case HDA_FIXUP_ACT_PRE_PROBE
:
3296 spec
->has_hs_key
= 1;
3297 snd_hda_jack_detect_enable_callback(codec
, 0x55,
3298 alc_headset_btn_callback
);
3300 case HDA_FIXUP_ACT_BUILD
:
3301 hp_pin
= alc_get_hp_pin(spec
);
3302 if (!hp_pin
|| snd_hda_jack_bind_keymap(codec
, 0x55,
3303 alc_headset_btn_keymap
,
3305 snd_hda_jack_add_kctl(codec
, 0x55, "Headset Jack",
3306 false, SND_JACK_HEADSET
,
3307 alc_headset_btn_keymap
);
3309 alc_enable_headset_jack_key(codec
);
3314 static void alc269vb_toggle_power_output(struct hda_codec
*codec
, int power_up
)
3316 alc_update_coef_idx(codec
, 0x04, 1 << 11, power_up
? (1 << 11) : 0);
3319 static void alc269_shutup(struct hda_codec
*codec
)
3321 struct alc_spec
*spec
= codec
->spec
;
3323 if (spec
->codec_variant
== ALC269_TYPE_ALC269VB
)
3324 alc269vb_toggle_power_output(codec
, 0);
3325 if (spec
->codec_variant
== ALC269_TYPE_ALC269VB
&&
3326 (alc_get_coef0(codec
) & 0x00ff) == 0x018) {
3329 alc_shutup_pins(codec
);
3332 static const struct coef_fw alc282_coefs
[] = {
3333 WRITE_COEF(0x03, 0x0002), /* Power Down Control */
3334 UPDATE_COEF(0x05, 0xff3f, 0x0700), /* FIFO and filter clock */
3335 WRITE_COEF(0x07, 0x0200), /* DMIC control */
3336 UPDATE_COEF(0x06, 0x00f0, 0), /* Analog clock */
3337 UPDATE_COEF(0x08, 0xfffc, 0x0c2c), /* JD */
3338 WRITE_COEF(0x0a, 0xcccc), /* JD offset1 */
3339 WRITE_COEF(0x0b, 0xcccc), /* JD offset2 */
3340 WRITE_COEF(0x0e, 0x6e00), /* LDO1/2/3, DAC/ADC */
3341 UPDATE_COEF(0x0f, 0xf800, 0x1000), /* JD */
3342 UPDATE_COEF(0x10, 0xfc00, 0x0c00), /* Capless */
3343 WRITE_COEF(0x6f, 0x0), /* Class D test 4 */
3344 UPDATE_COEF(0x0c, 0xfe00, 0), /* IO power down directly */
3345 WRITE_COEF(0x34, 0xa0c0), /* ANC */
3346 UPDATE_COEF(0x16, 0x0008, 0), /* AGC MUX */
3347 UPDATE_COEF(0x1d, 0x00e0, 0), /* DAC simple content protection */
3348 UPDATE_COEF(0x1f, 0x00e0, 0), /* ADC simple content protection */
3349 WRITE_COEF(0x21, 0x8804), /* DAC ADC Zero Detection */
3350 WRITE_COEF(0x63, 0x2902), /* PLL */
3351 WRITE_COEF(0x68, 0xa080), /* capless control 2 */
3352 WRITE_COEF(0x69, 0x3400), /* capless control 3 */
3353 WRITE_COEF(0x6a, 0x2f3e), /* capless control 4 */
3354 WRITE_COEF(0x6b, 0x0), /* capless control 5 */
3355 UPDATE_COEF(0x6d, 0x0fff, 0x0900), /* class D test 2 */
3356 WRITE_COEF(0x6e, 0x110a), /* class D test 3 */
3357 UPDATE_COEF(0x70, 0x00f8, 0x00d8), /* class D test 5 */
3358 WRITE_COEF(0x71, 0x0014), /* class D test 6 */
3359 WRITE_COEF(0x72, 0xc2ba), /* classD OCP */
3360 UPDATE_COEF(0x77, 0x0f80, 0), /* classD pure DC test */
3361 WRITE_COEF(0x6c, 0xfc06), /* Class D amp control */
3365 static void alc282_restore_default_value(struct hda_codec
*codec
)
3367 alc_process_coef_fw(codec
, alc282_coefs
);
3370 static void alc282_init(struct hda_codec
*codec
)
3372 struct alc_spec
*spec
= codec
->spec
;
3373 hda_nid_t hp_pin
= alc_get_hp_pin(spec
);
3377 alc282_restore_default_value(codec
);
3381 hp_pin_sense
= snd_hda_jack_detect(codec
, hp_pin
);
3382 coef78
= alc_read_coef_idx(codec
, 0x78);
3384 /* Index 0x78 Direct Drive HP AMP LPM Control 1 */
3385 /* Headphone capless set to high power mode */
3386 alc_write_coef_idx(codec
, 0x78, 0x9004);
3391 snd_hda_codec_write(codec
, hp_pin
, 0,
3392 AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_MUTE
);
3397 snd_hda_codec_write(codec
, hp_pin
, 0,
3398 AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_OUT
);
3403 /* Headphone capless set to normal mode */
3404 alc_write_coef_idx(codec
, 0x78, coef78
);
3407 static void alc282_shutup(struct hda_codec
*codec
)
3409 struct alc_spec
*spec
= codec
->spec
;
3410 hda_nid_t hp_pin
= alc_get_hp_pin(spec
);
3415 alc269_shutup(codec
);
3419 hp_pin_sense
= snd_hda_jack_detect(codec
, hp_pin
);
3420 coef78
= alc_read_coef_idx(codec
, 0x78);
3421 alc_write_coef_idx(codec
, 0x78, 0x9004);
3426 snd_hda_codec_write(codec
, hp_pin
, 0,
3427 AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_MUTE
);
3432 if (!spec
->no_shutup_pins
)
3433 snd_hda_codec_write(codec
, hp_pin
, 0,
3434 AC_VERB_SET_PIN_WIDGET_CONTROL
, 0x0);
3439 alc_auto_setup_eapd(codec
, false);
3440 alc_shutup_pins(codec
);
3441 alc_write_coef_idx(codec
, 0x78, coef78
);
3444 static const struct coef_fw alc283_coefs
[] = {
3445 WRITE_COEF(0x03, 0x0002), /* Power Down Control */
3446 UPDATE_COEF(0x05, 0xff3f, 0x0700), /* FIFO and filter clock */
3447 WRITE_COEF(0x07, 0x0200), /* DMIC control */
3448 UPDATE_COEF(0x06, 0x00f0, 0), /* Analog clock */
3449 UPDATE_COEF(0x08, 0xfffc, 0x0c2c), /* JD */
3450 WRITE_COEF(0x0a, 0xcccc), /* JD offset1 */
3451 WRITE_COEF(0x0b, 0xcccc), /* JD offset2 */
3452 WRITE_COEF(0x0e, 0x6fc0), /* LDO1/2/3, DAC/ADC */
3453 UPDATE_COEF(0x0f, 0xf800, 0x1000), /* JD */
3454 UPDATE_COEF(0x10, 0xfc00, 0x0c00), /* Capless */
3455 WRITE_COEF(0x3a, 0x0), /* Class D test 4 */
3456 UPDATE_COEF(0x0c, 0xfe00, 0x0), /* IO power down directly */
3457 WRITE_COEF(0x22, 0xa0c0), /* ANC */
3458 UPDATE_COEFEX(0x53, 0x01, 0x000f, 0x0008), /* AGC MUX */
3459 UPDATE_COEF(0x1d, 0x00e0, 0), /* DAC simple content protection */
3460 UPDATE_COEF(0x1f, 0x00e0, 0), /* ADC simple content protection */
3461 WRITE_COEF(0x21, 0x8804), /* DAC ADC Zero Detection */
3462 WRITE_COEF(0x2e, 0x2902), /* PLL */
3463 WRITE_COEF(0x33, 0xa080), /* capless control 2 */
3464 WRITE_COEF(0x34, 0x3400), /* capless control 3 */
3465 WRITE_COEF(0x35, 0x2f3e), /* capless control 4 */
3466 WRITE_COEF(0x36, 0x0), /* capless control 5 */
3467 UPDATE_COEF(0x38, 0x0fff, 0x0900), /* class D test 2 */
3468 WRITE_COEF(0x39, 0x110a), /* class D test 3 */
3469 UPDATE_COEF(0x3b, 0x00f8, 0x00d8), /* class D test 5 */
3470 WRITE_COEF(0x3c, 0x0014), /* class D test 6 */
3471 WRITE_COEF(0x3d, 0xc2ba), /* classD OCP */
3472 UPDATE_COEF(0x42, 0x0f80, 0x0), /* classD pure DC test */
3473 WRITE_COEF(0x49, 0x0), /* test mode */
3474 UPDATE_COEF(0x40, 0xf800, 0x9800), /* Class D DC enable */
3475 UPDATE_COEF(0x42, 0xf000, 0x2000), /* DC offset */
3476 WRITE_COEF(0x37, 0xfc06), /* Class D amp control */
3477 UPDATE_COEF(0x1b, 0x8000, 0), /* HP JD control */
3481 static void alc283_restore_default_value(struct hda_codec
*codec
)
3483 alc_process_coef_fw(codec
, alc283_coefs
);
3486 static void alc283_init(struct hda_codec
*codec
)
3488 struct alc_spec
*spec
= codec
->spec
;
3489 hda_nid_t hp_pin
= alc_get_hp_pin(spec
);
3492 alc283_restore_default_value(codec
);
3498 hp_pin_sense
= snd_hda_jack_detect(codec
, hp_pin
);
3500 /* Index 0x43 Direct Drive HP AMP LPM Control 1 */
3501 /* Headphone capless set to high power mode */
3502 alc_write_coef_idx(codec
, 0x43, 0x9004);
3504 snd_hda_codec_write(codec
, hp_pin
, 0,
3505 AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_MUTE
);
3510 snd_hda_codec_write(codec
, hp_pin
, 0,
3511 AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_OUT
);
3515 /* Index 0x46 Combo jack auto switch control 2 */
3516 /* 3k pull low control for Headset jack. */
3517 alc_update_coef_idx(codec
, 0x46, 3 << 12, 0);
3518 /* Headphone capless set to normal mode */
3519 alc_write_coef_idx(codec
, 0x43, 0x9614);
3522 static void alc283_shutup(struct hda_codec
*codec
)
3524 struct alc_spec
*spec
= codec
->spec
;
3525 hda_nid_t hp_pin
= alc_get_hp_pin(spec
);
3529 alc269_shutup(codec
);
3533 hp_pin_sense
= snd_hda_jack_detect(codec
, hp_pin
);
3535 alc_write_coef_idx(codec
, 0x43, 0x9004);
3537 /*depop hp during suspend*/
3538 alc_write_coef_idx(codec
, 0x06, 0x2100);
3540 snd_hda_codec_write(codec
, hp_pin
, 0,
3541 AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_MUTE
);
3546 if (!spec
->no_shutup_pins
)
3547 snd_hda_codec_write(codec
, hp_pin
, 0,
3548 AC_VERB_SET_PIN_WIDGET_CONTROL
, 0x0);
3550 alc_update_coef_idx(codec
, 0x46, 0, 3 << 12);
3554 alc_auto_setup_eapd(codec
, false);
3555 alc_shutup_pins(codec
);
3556 alc_write_coef_idx(codec
, 0x43, 0x9614);
3559 static void alc256_init(struct hda_codec
*codec
)
3561 struct alc_spec
*spec
= codec
->spec
;
3562 hda_nid_t hp_pin
= alc_get_hp_pin(spec
);
3570 hp_pin_sense
= snd_hda_jack_detect(codec
, hp_pin
);
3575 alc_update_coefex_idx(codec
, 0x57, 0x04, 0x0007, 0x1); /* Low power */
3576 if (spec
->ultra_low_power
) {
3577 alc_update_coef_idx(codec
, 0x03, 1<<1, 1<<1);
3578 alc_update_coef_idx(codec
, 0x08, 3<<2, 3<<2);
3579 alc_update_coef_idx(codec
, 0x08, 7<<4, 0);
3580 alc_update_coef_idx(codec
, 0x3b, 1<<15, 0);
3581 alc_update_coef_idx(codec
, 0x0e, 7<<6, 7<<6);
3585 snd_hda_codec_write(codec
, hp_pin
, 0,
3586 AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_MUTE
);
3588 if (hp_pin_sense
|| spec
->ultra_low_power
)
3591 snd_hda_codec_write(codec
, hp_pin
, 0,
3592 AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_OUT
);
3594 if (hp_pin_sense
|| spec
->ultra_low_power
)
3597 alc_update_coef_idx(codec
, 0x46, 3 << 12, 0);
3598 alc_update_coefex_idx(codec
, 0x57, 0x04, 0x0007, 0x4); /* Hight power */
3599 alc_update_coefex_idx(codec
, 0x53, 0x02, 0x8000, 1 << 15); /* Clear bit */
3600 alc_update_coefex_idx(codec
, 0x53, 0x02, 0x8000, 0 << 15);
3602 * Expose headphone mic (or possibly Line In on some machines) instead
3603 * of PC Beep on 1Ah, and disable 1Ah loopback for all outputs. See
3604 * Documentation/sound/hd-audio/realtek-pc-beep.rst for details of
3607 alc_write_coef_idx(codec
, 0x36, 0x5757);
3610 static void alc256_shutup(struct hda_codec
*codec
)
3612 struct alc_spec
*spec
= codec
->spec
;
3613 hda_nid_t hp_pin
= alc_get_hp_pin(spec
);
3619 hp_pin_sense
= snd_hda_jack_detect(codec
, hp_pin
);
3624 snd_hda_codec_write(codec
, hp_pin
, 0,
3625 AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_MUTE
);
3627 if (hp_pin_sense
|| spec
->ultra_low_power
)
3630 /* 3k pull low control for Headset jack. */
3631 /* NOTE: call this before clearing the pin, otherwise codec stalls */
3632 /* If disable 3k pulldown control for alc257, the Mic detection will not work correctly
3633 * when booting with headset plugged. So skip setting it for the codec alc257
3635 if (codec
->core
.vendor_id
!= 0x10ec0236 &&
3636 codec
->core
.vendor_id
!= 0x10ec0257)
3637 alc_update_coef_idx(codec
, 0x46, 0, 3 << 12);
3639 if (!spec
->no_shutup_pins
)
3640 snd_hda_codec_write(codec
, hp_pin
, 0,
3641 AC_VERB_SET_PIN_WIDGET_CONTROL
, 0x0);
3643 if (hp_pin_sense
|| spec
->ultra_low_power
)
3646 alc_auto_setup_eapd(codec
, false);
3647 alc_shutup_pins(codec
);
3648 if (spec
->ultra_low_power
) {
3650 alc_update_coef_idx(codec
, 0x03, 1<<1, 0);
3651 alc_update_coef_idx(codec
, 0x08, 7<<4, 7<<4);
3652 alc_update_coef_idx(codec
, 0x08, 3<<2, 0);
3653 alc_update_coef_idx(codec
, 0x3b, 1<<15, 1<<15);
3654 alc_update_coef_idx(codec
, 0x0e, 7<<6, 0);
3659 static void alc285_hp_init(struct hda_codec
*codec
)
3661 struct alc_spec
*spec
= codec
->spec
;
3662 hda_nid_t hp_pin
= alc_get_hp_pin(spec
);
3664 int coef38
, coef0d
, coef36
;
3666 alc_update_coef_idx(codec
, 0x4a, 1<<15, 1<<15); /* Reset HP JD */
3667 coef38
= alc_read_coef_idx(codec
, 0x38); /* Amp control */
3668 coef0d
= alc_read_coef_idx(codec
, 0x0d); /* Digital Misc control */
3669 coef36
= alc_read_coef_idx(codec
, 0x36); /* Passthrough Control */
3670 alc_update_coef_idx(codec
, 0x38, 1<<4, 0x0);
3671 alc_update_coef_idx(codec
, 0x0d, 0x110, 0x0);
3673 alc_update_coef_idx(codec
, 0x67, 0xf000, 0x3000);
3676 snd_hda_codec_write(codec
, hp_pin
, 0,
3677 AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_MUTE
);
3680 alc_update_coef_idx(codec
, 0x36, 1<<14, 1<<14);
3681 alc_update_coef_idx(codec
, 0x36, 1<<13, 0x0);
3684 snd_hda_codec_write(codec
, hp_pin
, 0,
3685 AC_VERB_SET_PIN_WIDGET_CONTROL
, 0x0);
3687 alc_write_coef_idx(codec
, 0x67, 0x0); /* Set HP depop to manual mode */
3688 alc_write_coefex_idx(codec
, 0x58, 0x00, 0x7880);
3689 alc_write_coefex_idx(codec
, 0x58, 0x0f, 0xf049);
3690 alc_update_coefex_idx(codec
, 0x58, 0x03, 0x00f0, 0x00c0);
3692 alc_write_coefex_idx(codec
, 0x58, 0x00, 0xf888); /* HP depop procedure start */
3693 val
= alc_read_coefex_idx(codec
, 0x58, 0x00);
3694 for (i
= 0; i
< 20 && val
& 0x8000; i
++) {
3696 val
= alc_read_coefex_idx(codec
, 0x58, 0x00);
3697 } /* Wait for depop procedure finish */
3699 alc_write_coefex_idx(codec
, 0x58, 0x00, val
); /* write back the result */
3700 alc_update_coef_idx(codec
, 0x38, 1<<4, coef38
);
3701 alc_update_coef_idx(codec
, 0x0d, 0x110, coef0d
);
3702 alc_update_coef_idx(codec
, 0x36, 3<<13, coef36
);
3705 alc_update_coef_idx(codec
, 0x4a, 1<<15, 0);
3708 static void alc225_init(struct hda_codec
*codec
)
3710 struct alc_spec
*spec
= codec
->spec
;
3711 hda_nid_t hp_pin
= alc_get_hp_pin(spec
);
3712 bool hp1_pin_sense
, hp2_pin_sense
;
3714 if (spec
->codec_variant
!= ALC269_TYPE_ALC287
&&
3715 spec
->codec_variant
!= ALC269_TYPE_ALC245
)
3716 /* required only at boot or S3 and S4 resume time */
3717 if (!spec
->done_hp_init
||
3718 is_s3_resume(codec
) ||
3719 is_s4_resume(codec
)) {
3720 alc285_hp_init(codec
);
3721 spec
->done_hp_init
= true;
3728 hp1_pin_sense
= snd_hda_jack_detect(codec
, hp_pin
);
3729 hp2_pin_sense
= snd_hda_jack_detect(codec
, 0x16);
3731 if (hp1_pin_sense
|| hp2_pin_sense
)
3734 alc_update_coefex_idx(codec
, 0x57, 0x04, 0x0007, 0x1); /* Low power */
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 (hp1_pin_sense
|| spec
->ultra_low_power
)
3743 snd_hda_codec_write(codec
, hp_pin
, 0,
3744 AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_MUTE
);
3746 snd_hda_codec_write(codec
, 0x16, 0,
3747 AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_MUTE
);
3749 if (hp1_pin_sense
|| hp2_pin_sense
|| spec
->ultra_low_power
)
3752 if (hp1_pin_sense
|| spec
->ultra_low_power
)
3753 snd_hda_codec_write(codec
, hp_pin
, 0,
3754 AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_OUT
);
3756 snd_hda_codec_write(codec
, 0x16, 0,
3757 AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_OUT
);
3759 if (hp1_pin_sense
|| hp2_pin_sense
|| spec
->ultra_low_power
)
3762 alc_update_coef_idx(codec
, 0x4a, 3 << 10, 0);
3763 alc_update_coefex_idx(codec
, 0x57, 0x04, 0x0007, 0x4); /* Hight power */
3766 static void alc225_shutup(struct hda_codec
*codec
)
3768 struct alc_spec
*spec
= codec
->spec
;
3769 hda_nid_t hp_pin
= alc_get_hp_pin(spec
);
3770 bool hp1_pin_sense
, hp2_pin_sense
;
3775 alc_disable_headset_jack_key(codec
);
3776 /* 3k pull low control for Headset jack. */
3777 alc_update_coef_idx(codec
, 0x4a, 0, 3 << 10);
3779 hp1_pin_sense
= snd_hda_jack_detect(codec
, hp_pin
);
3780 hp2_pin_sense
= snd_hda_jack_detect(codec
, 0x16);
3782 if (hp1_pin_sense
|| hp2_pin_sense
)
3785 if (hp1_pin_sense
|| spec
->ultra_low_power
)
3786 snd_hda_codec_write(codec
, hp_pin
, 0,
3787 AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_MUTE
);
3789 snd_hda_codec_write(codec
, 0x16, 0,
3790 AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_MUTE
);
3792 if (hp1_pin_sense
|| hp2_pin_sense
|| spec
->ultra_low_power
)
3795 if (hp1_pin_sense
|| spec
->ultra_low_power
)
3796 snd_hda_codec_write(codec
, hp_pin
, 0,
3797 AC_VERB_SET_PIN_WIDGET_CONTROL
, 0x0);
3799 snd_hda_codec_write(codec
, 0x16, 0,
3800 AC_VERB_SET_PIN_WIDGET_CONTROL
, 0x0);
3802 if (hp1_pin_sense
|| hp2_pin_sense
|| spec
->ultra_low_power
)
3805 alc_auto_setup_eapd(codec
, false);
3806 alc_shutup_pins(codec
);
3807 if (spec
->ultra_low_power
) {
3809 alc_update_coef_idx(codec
, 0x08, 0x0f << 2, 0x0c << 2);
3810 alc_update_coef_idx(codec
, 0x0e, 7<<6, 0);
3811 alc_update_coef_idx(codec
, 0x33, 1<<11, 1<<11);
3812 alc_update_coef_idx(codec
, 0x4a, 3<<4, 2<<4);
3816 alc_update_coef_idx(codec
, 0x4a, 3 << 10, 0);
3817 alc_enable_headset_jack_key(codec
);
3820 static void alc_default_init(struct hda_codec
*codec
)
3822 struct alc_spec
*spec
= codec
->spec
;
3823 hda_nid_t hp_pin
= alc_get_hp_pin(spec
);
3831 hp_pin_sense
= snd_hda_jack_detect(codec
, hp_pin
);
3836 snd_hda_codec_write(codec
, hp_pin
, 0,
3837 AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_MUTE
);
3842 snd_hda_codec_write(codec
, hp_pin
, 0,
3843 AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_OUT
);
3849 static void alc_default_shutup(struct hda_codec
*codec
)
3851 struct alc_spec
*spec
= codec
->spec
;
3852 hda_nid_t hp_pin
= alc_get_hp_pin(spec
);
3856 alc269_shutup(codec
);
3860 hp_pin_sense
= snd_hda_jack_detect(codec
, hp_pin
);
3865 snd_hda_codec_write(codec
, hp_pin
, 0,
3866 AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_MUTE
);
3871 if (!spec
->no_shutup_pins
)
3872 snd_hda_codec_write(codec
, hp_pin
, 0,
3873 AC_VERB_SET_PIN_WIDGET_CONTROL
, 0x0);
3878 alc_auto_setup_eapd(codec
, false);
3879 alc_shutup_pins(codec
);
3882 static void alc294_hp_init(struct hda_codec
*codec
)
3884 struct alc_spec
*spec
= codec
->spec
;
3885 hda_nid_t hp_pin
= alc_get_hp_pin(spec
);
3891 snd_hda_codec_write(codec
, hp_pin
, 0,
3892 AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_MUTE
);
3896 if (!spec
->no_shutup_pins
)
3897 snd_hda_codec_write(codec
, hp_pin
, 0,
3898 AC_VERB_SET_PIN_WIDGET_CONTROL
, 0x0);
3900 alc_update_coef_idx(codec
, 0x6f, 0x000f, 0);/* Set HP depop to manual mode */
3901 alc_update_coefex_idx(codec
, 0x58, 0x00, 0x8000, 0x8000); /* HP depop procedure start */
3903 /* Wait for depop procedure finish */
3904 val
= alc_read_coefex_idx(codec
, 0x58, 0x01);
3905 for (i
= 0; i
< 20 && val
& 0x0080; i
++) {
3907 val
= alc_read_coefex_idx(codec
, 0x58, 0x01);
3909 /* Set HP depop to auto mode */
3910 alc_update_coef_idx(codec
, 0x6f, 0x000f, 0x000b);
3914 static void alc294_init(struct hda_codec
*codec
)
3916 struct alc_spec
*spec
= codec
->spec
;
3918 /* required only at boot or S4 resume time */
3919 if (!spec
->done_hp_init
||
3920 codec
->core
.dev
.power
.power_state
.event
== PM_EVENT_RESTORE
) {
3921 alc294_hp_init(codec
);
3922 spec
->done_hp_init
= true;
3924 alc_default_init(codec
);
3927 static void alc5505_coef_set(struct hda_codec
*codec
, unsigned int index_reg
,
3930 snd_hda_codec_write(codec
, 0x51, 0, AC_VERB_SET_COEF_INDEX
, index_reg
>> 1);
3931 snd_hda_codec_write(codec
, 0x51, 0, AC_VERB_SET_PROC_COEF
, val
& 0xffff); /* LSB */
3932 snd_hda_codec_write(codec
, 0x51, 0, AC_VERB_SET_PROC_COEF
, val
>> 16); /* MSB */
3935 static int alc5505_coef_get(struct hda_codec
*codec
, unsigned int index_reg
)
3939 snd_hda_codec_write(codec
, 0x51, 0, AC_VERB_SET_COEF_INDEX
, index_reg
>> 1);
3940 val
= snd_hda_codec_read(codec
, 0x51, 0, AC_VERB_GET_PROC_COEF
, 0)
3942 val
|= snd_hda_codec_read(codec
, 0x51, 0, AC_VERB_GET_PROC_COEF
, 0)
3947 static void alc5505_dsp_halt(struct hda_codec
*codec
)
3951 alc5505_coef_set(codec
, 0x3000, 0x000c); /* DSP CPU stop */
3952 alc5505_coef_set(codec
, 0x880c, 0x0008); /* DDR enter self refresh */
3953 alc5505_coef_set(codec
, 0x61c0, 0x11110080); /* Clock control for PLL and CPU */
3954 alc5505_coef_set(codec
, 0x6230, 0xfc0d4011); /* Disable Input OP */
3955 alc5505_coef_set(codec
, 0x61b4, 0x040a2b03); /* Stop PLL2 */
3956 alc5505_coef_set(codec
, 0x61b0, 0x00005b17); /* Stop PLL1 */
3957 alc5505_coef_set(codec
, 0x61b8, 0x04133303); /* Stop PLL3 */
3958 val
= alc5505_coef_get(codec
, 0x6220);
3959 alc5505_coef_set(codec
, 0x6220, (val
| 0x3000)); /* switch Ringbuffer clock to DBUS clock */
3962 static void alc5505_dsp_back_from_halt(struct hda_codec
*codec
)
3964 alc5505_coef_set(codec
, 0x61b8, 0x04133302);
3965 alc5505_coef_set(codec
, 0x61b0, 0x00005b16);
3966 alc5505_coef_set(codec
, 0x61b4, 0x040a2b02);
3967 alc5505_coef_set(codec
, 0x6230, 0xf80d4011);
3968 alc5505_coef_set(codec
, 0x6220, 0x2002010f);
3969 alc5505_coef_set(codec
, 0x880c, 0x00000004);
3972 static void alc5505_dsp_init(struct hda_codec
*codec
)
3976 alc5505_dsp_halt(codec
);
3977 alc5505_dsp_back_from_halt(codec
);
3978 alc5505_coef_set(codec
, 0x61b0, 0x5b14); /* PLL1 control */
3979 alc5505_coef_set(codec
, 0x61b0, 0x5b16);
3980 alc5505_coef_set(codec
, 0x61b4, 0x04132b00); /* PLL2 control */
3981 alc5505_coef_set(codec
, 0x61b4, 0x04132b02);
3982 alc5505_coef_set(codec
, 0x61b8, 0x041f3300); /* PLL3 control*/
3983 alc5505_coef_set(codec
, 0x61b8, 0x041f3302);
3984 snd_hda_codec_write(codec
, 0x51, 0, AC_VERB_SET_CODEC_RESET
, 0); /* Function reset */
3985 alc5505_coef_set(codec
, 0x61b8, 0x041b3302);
3986 alc5505_coef_set(codec
, 0x61b8, 0x04173302);
3987 alc5505_coef_set(codec
, 0x61b8, 0x04163302);
3988 alc5505_coef_set(codec
, 0x8800, 0x348b328b); /* DRAM control */
3989 alc5505_coef_set(codec
, 0x8808, 0x00020022); /* DRAM control */
3990 alc5505_coef_set(codec
, 0x8818, 0x00000400); /* DRAM control */
3992 val
= alc5505_coef_get(codec
, 0x6200) >> 16; /* Read revision ID */
3994 alc5505_coef_set(codec
, 0x6220, 0x2002010f); /* I/O PAD Configuration */
3996 alc5505_coef_set(codec
, 0x6220, 0x6002018f);
3998 alc5505_coef_set(codec
, 0x61ac, 0x055525f0); /**/
3999 alc5505_coef_set(codec
, 0x61c0, 0x12230080); /* Clock control */
4000 alc5505_coef_set(codec
, 0x61b4, 0x040e2b02); /* PLL2 control */
4001 alc5505_coef_set(codec
, 0x61bc, 0x010234f8); /* OSC Control */
4002 alc5505_coef_set(codec
, 0x880c, 0x00000004); /* DRAM Function control */
4003 alc5505_coef_set(codec
, 0x880c, 0x00000003);
4004 alc5505_coef_set(codec
, 0x880c, 0x00000010);
4006 #ifdef HALT_REALTEK_ALC5505
4007 alc5505_dsp_halt(codec
);
4011 #ifdef HALT_REALTEK_ALC5505
4012 #define alc5505_dsp_suspend(codec) do { } while (0) /* NOP */
4013 #define alc5505_dsp_resume(codec) do { } while (0) /* NOP */
4015 #define alc5505_dsp_suspend(codec) alc5505_dsp_halt(codec)
4016 #define alc5505_dsp_resume(codec) alc5505_dsp_back_from_halt(codec)
4020 static int alc269_suspend(struct hda_codec
*codec
)
4022 struct alc_spec
*spec
= codec
->spec
;
4024 if (spec
->has_alc5505_dsp
)
4025 alc5505_dsp_suspend(codec
);
4026 return alc_suspend(codec
);
4029 static int alc269_resume(struct hda_codec
*codec
)
4031 struct alc_spec
*spec
= codec
->spec
;
4033 if (spec
->codec_variant
== ALC269_TYPE_ALC269VB
)
4034 alc269vb_toggle_power_output(codec
, 0);
4035 if (spec
->codec_variant
== ALC269_TYPE_ALC269VB
&&
4036 (alc_get_coef0(codec
) & 0x00ff) == 0x018) {
4040 codec
->patch_ops
.init(codec
);
4042 if (spec
->codec_variant
== ALC269_TYPE_ALC269VB
)
4043 alc269vb_toggle_power_output(codec
, 1);
4044 if (spec
->codec_variant
== ALC269_TYPE_ALC269VB
&&
4045 (alc_get_coef0(codec
) & 0x00ff) == 0x017) {
4049 snd_hda_regmap_sync(codec
);
4050 hda_call_check_power_status(codec
, 0x01);
4052 /* on some machine, the BIOS will clear the codec gpio data when enter
4053 * suspend, and won't restore the data after resume, so we restore it
4056 if (spec
->gpio_data
)
4057 alc_write_gpio_data(codec
);
4059 if (spec
->has_alc5505_dsp
)
4060 alc5505_dsp_resume(codec
);
4064 #endif /* CONFIG_PM */
4066 static void alc269_fixup_pincfg_no_hp_to_lineout(struct hda_codec
*codec
,
4067 const struct hda_fixup
*fix
, int action
)
4069 struct alc_spec
*spec
= codec
->spec
;
4071 if (action
== HDA_FIXUP_ACT_PRE_PROBE
)
4072 spec
->parse_flags
= HDA_PINCFG_NO_HP_FIXUP
;
4075 static void alc269_fixup_pincfg_U7x7_headset_mic(struct hda_codec
*codec
,
4076 const struct hda_fixup
*fix
,
4079 unsigned int cfg_headphone
= snd_hda_codec_get_pincfg(codec
, 0x21);
4080 unsigned int cfg_headset_mic
= snd_hda_codec_get_pincfg(codec
, 0x19);
4082 if (cfg_headphone
&& cfg_headset_mic
== 0x411111f0)
4083 snd_hda_codec_set_pincfg(codec
, 0x19,
4084 (cfg_headphone
& ~AC_DEFCFG_DEVICE
) |
4085 (AC_JACK_MIC_IN
<< AC_DEFCFG_DEVICE_SHIFT
));
4088 static void alc269_fixup_hweq(struct hda_codec
*codec
,
4089 const struct hda_fixup
*fix
, int action
)
4091 if (action
== HDA_FIXUP_ACT_INIT
)
4092 alc_update_coef_idx(codec
, 0x1e, 0, 0x80);
4095 static void alc269_fixup_headset_mic(struct hda_codec
*codec
,
4096 const struct hda_fixup
*fix
, int action
)
4098 struct alc_spec
*spec
= codec
->spec
;
4100 if (action
== HDA_FIXUP_ACT_PRE_PROBE
)
4101 spec
->parse_flags
|= HDA_PINCFG_HEADSET_MIC
;
4104 static void alc271_fixup_dmic(struct hda_codec
*codec
,
4105 const struct hda_fixup
*fix
, int action
)
4107 static const struct hda_verb verbs
[] = {
4108 {0x20, AC_VERB_SET_COEF_INDEX
, 0x0d},
4109 {0x20, AC_VERB_SET_PROC_COEF
, 0x4000},
4114 if (strcmp(codec
->core
.chip_name
, "ALC271X") &&
4115 strcmp(codec
->core
.chip_name
, "ALC269VB"))
4117 cfg
= snd_hda_codec_get_pincfg(codec
, 0x12);
4118 if (get_defcfg_connect(cfg
) == AC_JACK_PORT_FIXED
)
4119 snd_hda_sequence_write(codec
, verbs
);
4122 /* Fix the speaker amp after resume, etc */
4123 static void alc269vb_fixup_aspire_e1_coef(struct hda_codec
*codec
,
4124 const struct hda_fixup
*fix
,
4127 if (action
== HDA_FIXUP_ACT_INIT
)
4128 alc_update_coef_idx(codec
, 0x0d, 0x6000, 0x6000);
4131 static void alc269_fixup_pcm_44k(struct hda_codec
*codec
,
4132 const struct hda_fixup
*fix
, int action
)
4134 struct alc_spec
*spec
= codec
->spec
;
4136 if (action
!= HDA_FIXUP_ACT_PROBE
)
4139 /* Due to a hardware problem on Lenovo Ideadpad, we need to
4140 * fix the sample rate of analog I/O to 44.1kHz
4142 spec
->gen
.stream_analog_playback
= &alc269_44k_pcm_analog_playback
;
4143 spec
->gen
.stream_analog_capture
= &alc269_44k_pcm_analog_capture
;
4146 static void alc269_fixup_stereo_dmic(struct hda_codec
*codec
,
4147 const struct hda_fixup
*fix
, int action
)
4149 /* The digital-mic unit sends PDM (differential signal) instead of
4150 * the standard PCM, thus you can't record a valid mono stream as is.
4151 * Below is a workaround specific to ALC269 to control the dmic
4152 * signal source as mono.
4154 if (action
== HDA_FIXUP_ACT_INIT
)
4155 alc_update_coef_idx(codec
, 0x07, 0, 0x80);
4158 static void alc269_quanta_automute(struct hda_codec
*codec
)
4160 snd_hda_gen_update_outputs(codec
);
4162 alc_write_coef_idx(codec
, 0x0c, 0x680);
4163 alc_write_coef_idx(codec
, 0x0c, 0x480);
4166 static void alc269_fixup_quanta_mute(struct hda_codec
*codec
,
4167 const struct hda_fixup
*fix
, int action
)
4169 struct alc_spec
*spec
= codec
->spec
;
4170 if (action
!= HDA_FIXUP_ACT_PROBE
)
4172 spec
->gen
.automute_hook
= alc269_quanta_automute
;
4175 static void alc269_x101_hp_automute_hook(struct hda_codec
*codec
,
4176 struct hda_jack_callback
*jack
)
4178 struct alc_spec
*spec
= codec
->spec
;
4181 snd_hda_gen_hp_automute(codec
, jack
);
4183 vref
= spec
->gen
.hp_jack_present
? PIN_VREF80
: 0;
4185 snd_hda_codec_write(codec
, 0x18, 0, AC_VERB_SET_PIN_WIDGET_CONTROL
,
4188 snd_hda_codec_write(codec
, 0x18, 0, AC_VERB_SET_PIN_WIDGET_CONTROL
,
4193 * Magic sequence to make Huawei Matebook X right speaker working (bko#197801)
4195 struct hda_alc298_mbxinit
{
4196 unsigned char value_0x23
;
4197 unsigned char value_0x25
;
4200 static void alc298_huawei_mbx_stereo_seq(struct hda_codec
*codec
,
4201 const struct hda_alc298_mbxinit
*initval
,
4204 snd_hda_codec_write(codec
, 0x06, 0, AC_VERB_SET_DIGI_CONVERT_3
, 0x0);
4205 alc_write_coef_idx(codec
, 0x26, 0xb000);
4208 snd_hda_codec_write(codec
, 0x21, 0, AC_VERB_GET_PIN_SENSE
, 0x0);
4210 snd_hda_codec_write(codec
, 0x6, 0, AC_VERB_SET_DIGI_CONVERT_3
, 0x80);
4211 alc_write_coef_idx(codec
, 0x26, 0xf000);
4212 alc_write_coef_idx(codec
, 0x23, initval
->value_0x23
);
4214 if (initval
->value_0x23
!= 0x1e)
4215 alc_write_coef_idx(codec
, 0x25, initval
->value_0x25
);
4217 snd_hda_codec_write(codec
, 0x20, 0, AC_VERB_SET_COEF_INDEX
, 0x26);
4218 snd_hda_codec_write(codec
, 0x20, 0, AC_VERB_SET_PROC_COEF
, 0xb010);
4221 static void alc298_fixup_huawei_mbx_stereo(struct hda_codec
*codec
,
4222 const struct hda_fixup
*fix
,
4225 /* Initialization magic */
4226 static const struct hda_alc298_mbxinit dac_init
[] = {
4227 {0x0c, 0x00}, {0x0d, 0x00}, {0x0e, 0x00}, {0x0f, 0x00},
4228 {0x10, 0x00}, {0x1a, 0x40}, {0x1b, 0x82}, {0x1c, 0x00},
4229 {0x1d, 0x00}, {0x1e, 0x00}, {0x1f, 0x00},
4230 {0x20, 0xc2}, {0x21, 0xc8}, {0x22, 0x26}, {0x23, 0x24},
4231 {0x27, 0xff}, {0x28, 0xff}, {0x29, 0xff}, {0x2a, 0x8f},
4232 {0x2b, 0x02}, {0x2c, 0x48}, {0x2d, 0x34}, {0x2e, 0x00},
4234 {0x30, 0x00}, {0x31, 0x00}, {0x32, 0x00}, {0x33, 0x00},
4235 {0x34, 0x00}, {0x35, 0x01}, {0x36, 0x93}, {0x37, 0x0c},
4236 {0x38, 0x00}, {0x39, 0x00}, {0x3a, 0xf8}, {0x38, 0x80},
4239 const struct hda_alc298_mbxinit
*seq
;
4241 if (action
!= HDA_FIXUP_ACT_INIT
)
4245 snd_hda_codec_write(codec
, 0x06, 0, AC_VERB_SET_DIGI_CONVERT_3
, 0x00);
4246 snd_hda_codec_write(codec
, 0x06, 0, AC_VERB_SET_DIGI_CONVERT_3
, 0x80);
4247 alc_write_coef_idx(codec
, 0x26, 0xf000);
4248 alc_write_coef_idx(codec
, 0x22, 0x31);
4249 alc_write_coef_idx(codec
, 0x23, 0x0b);
4250 alc_write_coef_idx(codec
, 0x25, 0x00);
4251 snd_hda_codec_write(codec
, 0x20, 0, AC_VERB_SET_COEF_INDEX
, 0x26);
4252 snd_hda_codec_write(codec
, 0x20, 0, AC_VERB_SET_PROC_COEF
, 0xb010);
4254 for (seq
= dac_init
; seq
->value_0x23
; seq
++)
4255 alc298_huawei_mbx_stereo_seq(codec
, seq
, seq
== dac_init
);
4258 static void alc269_fixup_x101_headset_mic(struct hda_codec
*codec
,
4259 const struct hda_fixup
*fix
, int action
)
4261 struct alc_spec
*spec
= codec
->spec
;
4262 if (action
== HDA_FIXUP_ACT_PRE_PROBE
) {
4263 spec
->parse_flags
|= HDA_PINCFG_HEADSET_MIC
;
4264 spec
->gen
.hp_automute_hook
= alc269_x101_hp_automute_hook
;
4268 static void alc_update_vref_led(struct hda_codec
*codec
, hda_nid_t pin
,
4269 bool polarity
, bool on
)
4271 unsigned int pinval
;
4277 pinval
= snd_hda_codec_get_pin_target(codec
, pin
);
4278 pinval
&= ~AC_PINCTL_VREFEN
;
4279 pinval
|= on
? AC_PINCTL_VREF_80
: AC_PINCTL_VREF_HIZ
;
4280 /* temporarily power up/down for setting VREF */
4281 snd_hda_power_up_pm(codec
);
4282 snd_hda_set_pin_ctl_cache(codec
, pin
, pinval
);
4283 snd_hda_power_down_pm(codec
);
4286 /* update mute-LED according to the speaker mute state via mic VREF pin */
4287 static int vref_mute_led_set(struct led_classdev
*led_cdev
,
4288 enum led_brightness brightness
)
4290 struct hda_codec
*codec
= dev_to_hda_codec(led_cdev
->dev
->parent
);
4291 struct alc_spec
*spec
= codec
->spec
;
4293 alc_update_vref_led(codec
, spec
->mute_led_nid
,
4294 spec
->mute_led_polarity
, brightness
);
4298 /* Make sure the led works even in runtime suspend */
4299 static unsigned int led_power_filter(struct hda_codec
*codec
,
4301 unsigned int power_state
)
4303 struct alc_spec
*spec
= codec
->spec
;
4305 if (power_state
!= AC_PWRST_D3
|| nid
== 0 ||
4306 (nid
!= spec
->mute_led_nid
&& nid
!= spec
->cap_mute_led_nid
))
4309 /* Set pin ctl again, it might have just been set to 0 */
4310 snd_hda_set_pin_ctl(codec
, nid
,
4311 snd_hda_codec_get_pin_target(codec
, nid
));
4313 return snd_hda_gen_path_power_filter(codec
, nid
, power_state
);
4316 static void alc269_fixup_hp_mute_led(struct hda_codec
*codec
,
4317 const struct hda_fixup
*fix
, int action
)
4319 struct alc_spec
*spec
= codec
->spec
;
4320 const struct dmi_device
*dev
= NULL
;
4322 if (action
!= HDA_FIXUP_ACT_PRE_PROBE
)
4325 while ((dev
= dmi_find_device(DMI_DEV_TYPE_OEM_STRING
, NULL
, dev
))) {
4327 if (sscanf(dev
->name
, "HP_Mute_LED_%d_%x", &pol
, &pin
) != 2)
4329 if (pin
< 0x0a || pin
>= 0x10)
4331 spec
->mute_led_polarity
= pol
;
4332 spec
->mute_led_nid
= pin
- 0x0a + 0x18;
4333 snd_hda_gen_add_mute_led_cdev(codec
, vref_mute_led_set
);
4334 codec
->power_filter
= led_power_filter
;
4336 "Detected mute LED for %x:%d\n", spec
->mute_led_nid
,
4337 spec
->mute_led_polarity
);
4342 static void alc269_fixup_hp_mute_led_micx(struct hda_codec
*codec
,
4343 const struct hda_fixup
*fix
,
4344 int action
, hda_nid_t pin
)
4346 struct alc_spec
*spec
= codec
->spec
;
4348 if (action
== HDA_FIXUP_ACT_PRE_PROBE
) {
4349 spec
->mute_led_polarity
= 0;
4350 spec
->mute_led_nid
= pin
;
4351 snd_hda_gen_add_mute_led_cdev(codec
, vref_mute_led_set
);
4352 codec
->power_filter
= led_power_filter
;
4356 static void alc269_fixup_hp_mute_led_mic1(struct hda_codec
*codec
,
4357 const struct hda_fixup
*fix
, int action
)
4359 alc269_fixup_hp_mute_led_micx(codec
, fix
, action
, 0x18);
4362 static void alc269_fixup_hp_mute_led_mic2(struct hda_codec
*codec
,
4363 const struct hda_fixup
*fix
, int action
)
4365 alc269_fixup_hp_mute_led_micx(codec
, fix
, action
, 0x19);
4368 static void alc269_fixup_hp_mute_led_mic3(struct hda_codec
*codec
,
4369 const struct hda_fixup
*fix
, int action
)
4371 alc269_fixup_hp_mute_led_micx(codec
, fix
, action
, 0x1b);
4374 /* update LED status via GPIO */
4375 static void alc_update_gpio_led(struct hda_codec
*codec
, unsigned int mask
,
4376 int polarity
, bool enabled
)
4380 alc_update_gpio_data(codec
, mask
, !enabled
); /* muted -> LED on */
4383 /* turn on/off mute LED via GPIO per vmaster hook */
4384 static int gpio_mute_led_set(struct led_classdev
*led_cdev
,
4385 enum led_brightness brightness
)
4387 struct hda_codec
*codec
= dev_to_hda_codec(led_cdev
->dev
->parent
);
4388 struct alc_spec
*spec
= codec
->spec
;
4390 alc_update_gpio_led(codec
, spec
->gpio_mute_led_mask
,
4391 spec
->mute_led_polarity
, !brightness
);
4395 /* turn on/off mic-mute LED via GPIO per capture hook */
4396 static int micmute_led_set(struct led_classdev
*led_cdev
,
4397 enum led_brightness brightness
)
4399 struct hda_codec
*codec
= dev_to_hda_codec(led_cdev
->dev
->parent
);
4400 struct alc_spec
*spec
= codec
->spec
;
4402 alc_update_gpio_led(codec
, spec
->gpio_mic_led_mask
,
4403 spec
->micmute_led_polarity
, !brightness
);
4407 /* setup mute and mic-mute GPIO bits, add hooks appropriately */
4408 static void alc_fixup_hp_gpio_led(struct hda_codec
*codec
,
4410 unsigned int mute_mask
,
4411 unsigned int micmute_mask
)
4413 struct alc_spec
*spec
= codec
->spec
;
4415 alc_fixup_gpio(codec
, action
, mute_mask
| micmute_mask
);
4417 if (action
!= HDA_FIXUP_ACT_PRE_PROBE
)
4420 spec
->gpio_mute_led_mask
= mute_mask
;
4421 snd_hda_gen_add_mute_led_cdev(codec
, gpio_mute_led_set
);
4424 spec
->gpio_mic_led_mask
= micmute_mask
;
4425 snd_hda_gen_add_micmute_led_cdev(codec
, micmute_led_set
);
4429 static void alc236_fixup_hp_gpio_led(struct hda_codec
*codec
,
4430 const struct hda_fixup
*fix
, int action
)
4432 alc_fixup_hp_gpio_led(codec
, action
, 0x02, 0x01);
4435 static void alc269_fixup_hp_gpio_led(struct hda_codec
*codec
,
4436 const struct hda_fixup
*fix
, int action
)
4438 alc_fixup_hp_gpio_led(codec
, action
, 0x08, 0x10);
4441 static void alc285_fixup_hp_gpio_led(struct hda_codec
*codec
,
4442 const struct hda_fixup
*fix
, int action
)
4444 alc_fixup_hp_gpio_led(codec
, action
, 0x04, 0x01);
4447 static void alc286_fixup_hp_gpio_led(struct hda_codec
*codec
,
4448 const struct hda_fixup
*fix
, int action
)
4450 alc_fixup_hp_gpio_led(codec
, action
, 0x02, 0x20);
4453 static void alc287_fixup_hp_gpio_led(struct hda_codec
*codec
,
4454 const struct hda_fixup
*fix
, int action
)
4456 alc_fixup_hp_gpio_led(codec
, action
, 0x10, 0);
4459 static void alc245_fixup_hp_gpio_led(struct hda_codec
*codec
,
4460 const struct hda_fixup
*fix
, int action
)
4462 struct alc_spec
*spec
= codec
->spec
;
4464 if (action
== HDA_FIXUP_ACT_PRE_PROBE
)
4465 spec
->micmute_led_polarity
= 1;
4466 alc_fixup_hp_gpio_led(codec
, action
, 0, 0x04);
4469 /* turn on/off mic-mute LED per capture hook via VREF change */
4470 static int vref_micmute_led_set(struct led_classdev
*led_cdev
,
4471 enum led_brightness brightness
)
4473 struct hda_codec
*codec
= dev_to_hda_codec(led_cdev
->dev
->parent
);
4474 struct alc_spec
*spec
= codec
->spec
;
4476 alc_update_vref_led(codec
, spec
->cap_mute_led_nid
,
4477 spec
->micmute_led_polarity
, brightness
);
4481 static void alc269_fixup_hp_gpio_mic1_led(struct hda_codec
*codec
,
4482 const struct hda_fixup
*fix
, int action
)
4484 struct alc_spec
*spec
= codec
->spec
;
4486 alc_fixup_hp_gpio_led(codec
, action
, 0x08, 0);
4487 if (action
== HDA_FIXUP_ACT_PRE_PROBE
) {
4488 /* Like hp_gpio_mic1_led, but also needs GPIO4 low to
4489 * enable headphone amp
4491 spec
->gpio_mask
|= 0x10;
4492 spec
->gpio_dir
|= 0x10;
4493 spec
->cap_mute_led_nid
= 0x18;
4494 snd_hda_gen_add_micmute_led_cdev(codec
, vref_micmute_led_set
);
4495 codec
->power_filter
= led_power_filter
;
4499 static void alc280_fixup_hp_gpio4(struct hda_codec
*codec
,
4500 const struct hda_fixup
*fix
, int action
)
4502 struct alc_spec
*spec
= codec
->spec
;
4504 alc_fixup_hp_gpio_led(codec
, action
, 0x08, 0);
4505 if (action
== HDA_FIXUP_ACT_PRE_PROBE
) {
4506 spec
->cap_mute_led_nid
= 0x18;
4507 snd_hda_gen_add_micmute_led_cdev(codec
, vref_micmute_led_set
);
4508 codec
->power_filter
= led_power_filter
;
4512 /* HP Spectre x360 14 model needs a unique workaround for enabling the amp;
4513 * it needs to toggle the GPIO0 once on and off at each time (bko#210633)
4515 static void alc245_fixup_hp_x360_amp(struct hda_codec
*codec
,
4516 const struct hda_fixup
*fix
, int action
)
4518 struct alc_spec
*spec
= codec
->spec
;
4521 case HDA_FIXUP_ACT_PRE_PROBE
:
4522 spec
->gpio_mask
|= 0x01;
4523 spec
->gpio_dir
|= 0x01;
4525 case HDA_FIXUP_ACT_INIT
:
4526 /* need to toggle GPIO to enable the amp */
4527 alc_update_gpio_data(codec
, 0x01, true);
4529 alc_update_gpio_data(codec
, 0x01, false);
4534 /* toggle GPIO2 at each time stream is started; we use PREPARE state instead */
4535 static void alc274_hp_envy_pcm_hook(struct hda_pcm_stream
*hinfo
,
4536 struct hda_codec
*codec
,
4537 struct snd_pcm_substream
*substream
,
4541 case HDA_GEN_PCM_ACT_PREPARE
:
4542 alc_update_gpio_data(codec
, 0x04, true);
4544 case HDA_GEN_PCM_ACT_CLEANUP
:
4545 alc_update_gpio_data(codec
, 0x04, false);
4550 static void alc274_fixup_hp_envy_gpio(struct hda_codec
*codec
,
4551 const struct hda_fixup
*fix
,
4554 struct alc_spec
*spec
= codec
->spec
;
4556 if (action
== HDA_FIXUP_ACT_PROBE
) {
4557 spec
->gpio_mask
|= 0x04;
4558 spec
->gpio_dir
|= 0x04;
4559 spec
->gen
.pcm_playback_hook
= alc274_hp_envy_pcm_hook
;
4563 static void alc_update_coef_led(struct hda_codec
*codec
,
4564 struct alc_coef_led
*led
,
4565 bool polarity
, bool on
)
4569 /* temporarily power up/down for setting COEF bit */
4570 alc_update_coef_idx(codec
, led
->idx
, led
->mask
,
4571 on
? led
->on
: led
->off
);
4574 /* update mute-LED according to the speaker mute state via COEF bit */
4575 static int coef_mute_led_set(struct led_classdev
*led_cdev
,
4576 enum led_brightness brightness
)
4578 struct hda_codec
*codec
= dev_to_hda_codec(led_cdev
->dev
->parent
);
4579 struct alc_spec
*spec
= codec
->spec
;
4581 alc_update_coef_led(codec
, &spec
->mute_led_coef
,
4582 spec
->mute_led_polarity
, brightness
);
4586 static void alc285_fixup_hp_mute_led_coefbit(struct hda_codec
*codec
,
4587 const struct hda_fixup
*fix
,
4590 struct alc_spec
*spec
= codec
->spec
;
4592 if (action
== HDA_FIXUP_ACT_PRE_PROBE
) {
4593 spec
->mute_led_polarity
= 0;
4594 spec
->mute_led_coef
.idx
= 0x0b;
4595 spec
->mute_led_coef
.mask
= 1 << 3;
4596 spec
->mute_led_coef
.on
= 1 << 3;
4597 spec
->mute_led_coef
.off
= 0;
4598 snd_hda_gen_add_mute_led_cdev(codec
, coef_mute_led_set
);
4602 static void alc236_fixup_hp_mute_led_coefbit(struct hda_codec
*codec
,
4603 const struct hda_fixup
*fix
,
4606 struct alc_spec
*spec
= codec
->spec
;
4608 if (action
== HDA_FIXUP_ACT_PRE_PROBE
) {
4609 spec
->mute_led_polarity
= 0;
4610 spec
->mute_led_coef
.idx
= 0x34;
4611 spec
->mute_led_coef
.mask
= 1 << 5;
4612 spec
->mute_led_coef
.on
= 0;
4613 spec
->mute_led_coef
.off
= 1 << 5;
4614 snd_hda_gen_add_mute_led_cdev(codec
, coef_mute_led_set
);
4618 /* turn on/off mic-mute LED per capture hook by coef bit */
4619 static int coef_micmute_led_set(struct led_classdev
*led_cdev
,
4620 enum led_brightness brightness
)
4622 struct hda_codec
*codec
= dev_to_hda_codec(led_cdev
->dev
->parent
);
4623 struct alc_spec
*spec
= codec
->spec
;
4625 alc_update_coef_led(codec
, &spec
->mic_led_coef
,
4626 spec
->micmute_led_polarity
, brightness
);
4630 static void alc285_fixup_hp_coef_micmute_led(struct hda_codec
*codec
,
4631 const struct hda_fixup
*fix
, int action
)
4633 struct alc_spec
*spec
= codec
->spec
;
4635 if (action
== HDA_FIXUP_ACT_PRE_PROBE
) {
4636 spec
->mic_led_coef
.idx
= 0x19;
4637 spec
->mic_led_coef
.mask
= 1 << 13;
4638 spec
->mic_led_coef
.on
= 1 << 13;
4639 spec
->mic_led_coef
.off
= 0;
4640 snd_hda_gen_add_micmute_led_cdev(codec
, coef_micmute_led_set
);
4644 static void alc236_fixup_hp_coef_micmute_led(struct hda_codec
*codec
,
4645 const struct hda_fixup
*fix
, int action
)
4647 struct alc_spec
*spec
= codec
->spec
;
4649 if (action
== HDA_FIXUP_ACT_PRE_PROBE
) {
4650 spec
->mic_led_coef
.idx
= 0x35;
4651 spec
->mic_led_coef
.mask
= 3 << 2;
4652 spec
->mic_led_coef
.on
= 2 << 2;
4653 spec
->mic_led_coef
.off
= 1 << 2;
4654 snd_hda_gen_add_micmute_led_cdev(codec
, coef_micmute_led_set
);
4658 static void alc285_fixup_hp_mute_led(struct hda_codec
*codec
,
4659 const struct hda_fixup
*fix
, int action
)
4661 alc285_fixup_hp_mute_led_coefbit(codec
, fix
, action
);
4662 alc285_fixup_hp_coef_micmute_led(codec
, fix
, action
);
4665 static void alc236_fixup_hp_mute_led(struct hda_codec
*codec
,
4666 const struct hda_fixup
*fix
, int action
)
4668 alc236_fixup_hp_mute_led_coefbit(codec
, fix
, action
);
4669 alc236_fixup_hp_coef_micmute_led(codec
, fix
, action
);
4672 static void alc236_fixup_hp_micmute_led_vref(struct hda_codec
*codec
,
4673 const struct hda_fixup
*fix
, int action
)
4675 struct alc_spec
*spec
= codec
->spec
;
4677 if (action
== HDA_FIXUP_ACT_PRE_PROBE
) {
4678 spec
->cap_mute_led_nid
= 0x1a;
4679 snd_hda_gen_add_micmute_led_cdev(codec
, vref_micmute_led_set
);
4680 codec
->power_filter
= led_power_filter
;
4684 static void alc236_fixup_hp_mute_led_micmute_vref(struct hda_codec
*codec
,
4685 const struct hda_fixup
*fix
, int action
)
4687 alc236_fixup_hp_mute_led_coefbit(codec
, fix
, action
);
4688 alc236_fixup_hp_micmute_led_vref(codec
, fix
, action
);
4691 #if IS_REACHABLE(CONFIG_INPUT)
4692 static void gpio2_mic_hotkey_event(struct hda_codec
*codec
,
4693 struct hda_jack_callback
*event
)
4695 struct alc_spec
*spec
= codec
->spec
;
4697 /* GPIO2 just toggles on a keypress/keyrelease cycle. Therefore
4698 send both key on and key off event for every interrupt. */
4699 input_report_key(spec
->kb_dev
, spec
->alc_mute_keycode_map
[ALC_KEY_MICMUTE_INDEX
], 1);
4700 input_sync(spec
->kb_dev
);
4701 input_report_key(spec
->kb_dev
, spec
->alc_mute_keycode_map
[ALC_KEY_MICMUTE_INDEX
], 0);
4702 input_sync(spec
->kb_dev
);
4705 static int alc_register_micmute_input_device(struct hda_codec
*codec
)
4707 struct alc_spec
*spec
= codec
->spec
;
4710 spec
->kb_dev
= input_allocate_device();
4711 if (!spec
->kb_dev
) {
4712 codec_err(codec
, "Out of memory (input_allocate_device)\n");
4716 spec
->alc_mute_keycode_map
[ALC_KEY_MICMUTE_INDEX
] = KEY_MICMUTE
;
4718 spec
->kb_dev
->name
= "Microphone Mute Button";
4719 spec
->kb_dev
->evbit
[0] = BIT_MASK(EV_KEY
);
4720 spec
->kb_dev
->keycodesize
= sizeof(spec
->alc_mute_keycode_map
[0]);
4721 spec
->kb_dev
->keycodemax
= ARRAY_SIZE(spec
->alc_mute_keycode_map
);
4722 spec
->kb_dev
->keycode
= spec
->alc_mute_keycode_map
;
4723 for (i
= 0; i
< ARRAY_SIZE(spec
->alc_mute_keycode_map
); i
++)
4724 set_bit(spec
->alc_mute_keycode_map
[i
], spec
->kb_dev
->keybit
);
4726 if (input_register_device(spec
->kb_dev
)) {
4727 codec_err(codec
, "input_register_device failed\n");
4728 input_free_device(spec
->kb_dev
);
4729 spec
->kb_dev
= NULL
;
4736 /* GPIO1 = set according to SKU external amp
4737 * GPIO2 = mic mute hotkey
4739 * GPIO4 = mic mute LED
4741 static void alc280_fixup_hp_gpio2_mic_hotkey(struct hda_codec
*codec
,
4742 const struct hda_fixup
*fix
, int action
)
4744 struct alc_spec
*spec
= codec
->spec
;
4746 alc_fixup_hp_gpio_led(codec
, action
, 0x08, 0x10);
4747 if (action
== HDA_FIXUP_ACT_PRE_PROBE
) {
4748 spec
->init_amp
= ALC_INIT_DEFAULT
;
4749 if (alc_register_micmute_input_device(codec
) != 0)
4752 spec
->gpio_mask
|= 0x06;
4753 spec
->gpio_dir
|= 0x02;
4754 spec
->gpio_data
|= 0x02;
4755 snd_hda_codec_write_cache(codec
, codec
->core
.afg
, 0,
4756 AC_VERB_SET_GPIO_UNSOLICITED_RSP_MASK
, 0x04);
4757 snd_hda_jack_detect_enable_callback(codec
, codec
->core
.afg
,
4758 gpio2_mic_hotkey_event
);
4766 case HDA_FIXUP_ACT_FREE
:
4767 input_unregister_device(spec
->kb_dev
);
4768 spec
->kb_dev
= NULL
;
4772 /* Line2 = mic mute hotkey
4773 * GPIO2 = mic mute LED
4775 static void alc233_fixup_lenovo_line2_mic_hotkey(struct hda_codec
*codec
,
4776 const struct hda_fixup
*fix
, int action
)
4778 struct alc_spec
*spec
= codec
->spec
;
4780 alc_fixup_hp_gpio_led(codec
, action
, 0, 0x04);
4781 if (action
== HDA_FIXUP_ACT_PRE_PROBE
) {
4782 spec
->init_amp
= ALC_INIT_DEFAULT
;
4783 if (alc_register_micmute_input_device(codec
) != 0)
4786 snd_hda_jack_detect_enable_callback(codec
, 0x1b,
4787 gpio2_mic_hotkey_event
);
4795 case HDA_FIXUP_ACT_FREE
:
4796 input_unregister_device(spec
->kb_dev
);
4797 spec
->kb_dev
= NULL
;
4801 #define alc280_fixup_hp_gpio2_mic_hotkey NULL
4802 #define alc233_fixup_lenovo_line2_mic_hotkey NULL
4805 static void alc269_fixup_hp_line1_mic1_led(struct hda_codec
*codec
,
4806 const struct hda_fixup
*fix
, int action
)
4808 struct alc_spec
*spec
= codec
->spec
;
4810 alc269_fixup_hp_mute_led_micx(codec
, fix
, action
, 0x1a);
4811 if (action
== HDA_FIXUP_ACT_PRE_PROBE
) {
4812 spec
->cap_mute_led_nid
= 0x18;
4813 snd_hda_gen_add_micmute_led_cdev(codec
, vref_micmute_led_set
);
4817 static const struct coef_fw alc225_pre_hsmode
[] = {
4818 UPDATE_COEF(0x4a, 1<<8, 0),
4819 UPDATE_COEFEX(0x57, 0x05, 1<<14, 0),
4820 UPDATE_COEF(0x63, 3<<14, 3<<14),
4821 UPDATE_COEF(0x4a, 3<<4, 2<<4),
4822 UPDATE_COEF(0x4a, 3<<10, 3<<10),
4823 UPDATE_COEF(0x45, 0x3f<<10, 0x34<<10),
4824 UPDATE_COEF(0x4a, 3<<10, 0),
4828 static void alc_headset_mode_unplugged(struct hda_codec
*codec
)
4830 struct alc_spec
*spec
= codec
->spec
;
4831 static const struct coef_fw coef0255
[] = {
4832 WRITE_COEF(0x1b, 0x0c0b), /* LDO and MISC control */
4833 WRITE_COEF(0x45, 0xd089), /* UAJ function set to menual mode */
4834 UPDATE_COEFEX(0x57, 0x05, 1<<14, 0), /* Direct Drive HP Amp control(Set to verb control)*/
4835 WRITE_COEF(0x06, 0x6104), /* Set MIC2 Vref gate with HP */
4836 WRITE_COEFEX(0x57, 0x03, 0x8aa6), /* Direct Drive HP Amp control */
4839 static const struct coef_fw coef0256
[] = {
4840 WRITE_COEF(0x1b, 0x0c4b), /* LDO and MISC control */
4841 WRITE_COEF(0x45, 0xd089), /* UAJ function set to menual mode */
4842 WRITE_COEF(0x06, 0x6104), /* Set MIC2 Vref gate with HP */
4843 WRITE_COEFEX(0x57, 0x03, 0x09a3), /* Direct Drive HP Amp control */
4844 UPDATE_COEFEX(0x57, 0x05, 1<<14, 0), /* Direct Drive HP Amp control(Set to verb control)*/
4847 static const struct coef_fw coef0233
[] = {
4848 WRITE_COEF(0x1b, 0x0c0b),
4849 WRITE_COEF(0x45, 0xc429),
4850 UPDATE_COEF(0x35, 0x4000, 0),
4851 WRITE_COEF(0x06, 0x2104),
4852 WRITE_COEF(0x1a, 0x0001),
4853 WRITE_COEF(0x26, 0x0004),
4854 WRITE_COEF(0x32, 0x42a3),
4857 static const struct coef_fw coef0288
[] = {
4858 UPDATE_COEF(0x4f, 0xfcc0, 0xc400),
4859 UPDATE_COEF(0x50, 0x2000, 0x2000),
4860 UPDATE_COEF(0x56, 0x0006, 0x0006),
4861 UPDATE_COEF(0x66, 0x0008, 0),
4862 UPDATE_COEF(0x67, 0x2000, 0),
4865 static const struct coef_fw coef0298
[] = {
4866 UPDATE_COEF(0x19, 0x1300, 0x0300),
4869 static const struct coef_fw coef0292
[] = {
4870 WRITE_COEF(0x76, 0x000e),
4871 WRITE_COEF(0x6c, 0x2400),
4872 WRITE_COEF(0x18, 0x7308),
4873 WRITE_COEF(0x6b, 0xc429),
4876 static const struct coef_fw coef0293
[] = {
4877 UPDATE_COEF(0x10, 7<<8, 6<<8), /* SET Line1 JD to 0 */
4878 UPDATE_COEFEX(0x57, 0x05, 1<<15|1<<13, 0x0), /* SET charge pump by verb */
4879 UPDATE_COEFEX(0x57, 0x03, 1<<10, 1<<10), /* SET EN_OSW to 1 */
4880 UPDATE_COEF(0x1a, 1<<3, 1<<3), /* Combo JD gating with LINE1-VREFO */
4881 WRITE_COEF(0x45, 0xc429), /* Set to TRS type */
4882 UPDATE_COEF(0x4a, 0x000f, 0x000e), /* Combo Jack auto detect */
4885 static const struct coef_fw coef0668
[] = {
4886 WRITE_COEF(0x15, 0x0d40),
4887 WRITE_COEF(0xb7, 0x802b),
4890 static const struct coef_fw coef0225
[] = {
4891 UPDATE_COEF(0x63, 3<<14, 0),
4894 static const struct coef_fw coef0274
[] = {
4895 UPDATE_COEF(0x4a, 0x0100, 0),
4896 UPDATE_COEFEX(0x57, 0x05, 0x4000, 0),
4897 UPDATE_COEF(0x6b, 0xf000, 0x5000),
4898 UPDATE_COEF(0x4a, 0x0010, 0),
4899 UPDATE_COEF(0x4a, 0x0c00, 0x0c00),
4900 WRITE_COEF(0x45, 0x5289),
4901 UPDATE_COEF(0x4a, 0x0c00, 0),
4905 if (spec
->no_internal_mic_pin
) {
4906 alc_update_coef_idx(codec
, 0x45, 0xf<<12 | 1<<10, 5<<12);
4910 switch (codec
->core
.vendor_id
) {
4912 alc_process_coef_fw(codec
, coef0255
);
4918 alc_process_coef_fw(codec
, coef0256
);
4923 alc_process_coef_fw(codec
, coef0274
);
4927 alc_process_coef_fw(codec
, coef0233
);
4931 alc_process_coef_fw(codec
, coef0288
);
4934 alc_process_coef_fw(codec
, coef0298
);
4935 alc_process_coef_fw(codec
, coef0288
);
4938 alc_process_coef_fw(codec
, coef0292
);
4941 alc_process_coef_fw(codec
, coef0293
);
4944 alc_process_coef_fw(codec
, coef0668
);
4952 alc_process_coef_fw(codec
, alc225_pre_hsmode
);
4953 alc_process_coef_fw(codec
, coef0225
);
4956 alc_update_coefex_idx(codec
, 0x57, 0x5, 1<<14, 0);
4959 codec_dbg(codec
, "Headset jack set to unplugged mode.\n");
4963 static void alc_headset_mode_mic_in(struct hda_codec
*codec
, hda_nid_t hp_pin
,
4966 static const struct coef_fw coef0255
[] = {
4967 WRITE_COEFEX(0x57, 0x03, 0x8aa6),
4968 WRITE_COEF(0x06, 0x6100), /* Set MIC2 Vref gate to normal */
4971 static const struct coef_fw coef0256
[] = {
4972 UPDATE_COEFEX(0x57, 0x05, 1<<14, 1<<14), /* Direct Drive HP Amp control(Set to verb control)*/
4973 WRITE_COEFEX(0x57, 0x03, 0x09a3),
4974 WRITE_COEF(0x06, 0x6100), /* Set MIC2 Vref gate to normal */
4977 static const struct coef_fw coef0233
[] = {
4978 UPDATE_COEF(0x35, 0, 1<<14),
4979 WRITE_COEF(0x06, 0x2100),
4980 WRITE_COEF(0x1a, 0x0021),
4981 WRITE_COEF(0x26, 0x008c),
4984 static const struct coef_fw coef0288
[] = {
4985 UPDATE_COEF(0x4f, 0x00c0, 0),
4986 UPDATE_COEF(0x50, 0x2000, 0),
4987 UPDATE_COEF(0x56, 0x0006, 0),
4988 UPDATE_COEF(0x4f, 0xfcc0, 0xc400),
4989 UPDATE_COEF(0x66, 0x0008, 0x0008),
4990 UPDATE_COEF(0x67, 0x2000, 0x2000),
4993 static const struct coef_fw coef0292
[] = {
4994 WRITE_COEF(0x19, 0xa208),
4995 WRITE_COEF(0x2e, 0xacf0),
4998 static const struct coef_fw coef0293
[] = {
4999 UPDATE_COEFEX(0x57, 0x05, 0, 1<<15|1<<13), /* SET charge pump by verb */
5000 UPDATE_COEFEX(0x57, 0x03, 1<<10, 0), /* SET EN_OSW to 0 */
5001 UPDATE_COEF(0x1a, 1<<3, 0), /* Combo JD gating without LINE1-VREFO */
5004 static const struct coef_fw coef0688
[] = {
5005 WRITE_COEF(0xb7, 0x802b),
5006 WRITE_COEF(0xb5, 0x1040),
5007 UPDATE_COEF(0xc3, 0, 1<<12),
5010 static const struct coef_fw coef0225
[] = {
5011 UPDATE_COEFEX(0x57, 0x05, 1<<14, 1<<14),
5012 UPDATE_COEF(0x4a, 3<<4, 2<<4),
5013 UPDATE_COEF(0x63, 3<<14, 0),
5016 static const struct coef_fw coef0274
[] = {
5017 UPDATE_COEFEX(0x57, 0x05, 0x4000, 0x4000),
5018 UPDATE_COEF(0x4a, 0x0010, 0),
5019 UPDATE_COEF(0x6b, 0xf000, 0),
5023 switch (codec
->core
.vendor_id
) {
5025 alc_write_coef_idx(codec
, 0x45, 0xc489);
5026 snd_hda_set_pin_ctl_cache(codec
, hp_pin
, 0);
5027 alc_process_coef_fw(codec
, coef0255
);
5028 snd_hda_set_pin_ctl_cache(codec
, mic_pin
, PIN_VREF50
);
5034 alc_write_coef_idx(codec
, 0x45, 0xc489);
5035 snd_hda_set_pin_ctl_cache(codec
, hp_pin
, 0);
5036 alc_process_coef_fw(codec
, coef0256
);
5037 snd_hda_set_pin_ctl_cache(codec
, mic_pin
, PIN_VREF50
);
5042 alc_write_coef_idx(codec
, 0x45, 0x4689);
5043 snd_hda_set_pin_ctl_cache(codec
, hp_pin
, 0);
5044 alc_process_coef_fw(codec
, coef0274
);
5045 snd_hda_set_pin_ctl_cache(codec
, mic_pin
, PIN_VREF50
);
5049 alc_write_coef_idx(codec
, 0x45, 0xc429);
5050 snd_hda_set_pin_ctl_cache(codec
, hp_pin
, 0);
5051 alc_process_coef_fw(codec
, coef0233
);
5052 snd_hda_set_pin_ctl_cache(codec
, mic_pin
, PIN_VREF50
);
5057 snd_hda_set_pin_ctl_cache(codec
, hp_pin
, 0);
5058 alc_process_coef_fw(codec
, coef0288
);
5059 snd_hda_set_pin_ctl_cache(codec
, mic_pin
, PIN_VREF50
);
5062 snd_hda_set_pin_ctl_cache(codec
, hp_pin
, 0);
5063 alc_process_coef_fw(codec
, coef0292
);
5066 /* Set to TRS mode */
5067 alc_write_coef_idx(codec
, 0x45, 0xc429);
5068 snd_hda_set_pin_ctl_cache(codec
, hp_pin
, 0);
5069 alc_process_coef_fw(codec
, coef0293
);
5070 snd_hda_set_pin_ctl_cache(codec
, mic_pin
, PIN_VREF50
);
5073 alc_update_coefex_idx(codec
, 0x57, 0x5, 0, 1<<14);
5077 snd_hda_set_pin_ctl_cache(codec
, hp_pin
, 0);
5078 snd_hda_set_pin_ctl_cache(codec
, mic_pin
, PIN_VREF50
);
5081 alc_write_coef_idx(codec
, 0x11, 0x0001);
5082 snd_hda_set_pin_ctl_cache(codec
, hp_pin
, 0);
5083 alc_process_coef_fw(codec
, coef0688
);
5084 snd_hda_set_pin_ctl_cache(codec
, mic_pin
, PIN_VREF50
);
5092 alc_process_coef_fw(codec
, alc225_pre_hsmode
);
5093 alc_update_coef_idx(codec
, 0x45, 0x3f<<10, 0x31<<10);
5094 snd_hda_set_pin_ctl_cache(codec
, hp_pin
, 0);
5095 alc_process_coef_fw(codec
, coef0225
);
5096 snd_hda_set_pin_ctl_cache(codec
, mic_pin
, PIN_VREF50
);
5099 codec_dbg(codec
, "Headset jack set to mic-in mode.\n");
5102 static void alc_headset_mode_default(struct hda_codec
*codec
)
5104 static const struct coef_fw coef0225
[] = {
5105 UPDATE_COEF(0x45, 0x3f<<10, 0x30<<10),
5106 UPDATE_COEF(0x45, 0x3f<<10, 0x31<<10),
5107 UPDATE_COEF(0x49, 3<<8, 0<<8),
5108 UPDATE_COEF(0x4a, 3<<4, 3<<4),
5109 UPDATE_COEF(0x63, 3<<14, 0),
5110 UPDATE_COEF(0x67, 0xf000, 0x3000),
5113 static const struct coef_fw coef0255
[] = {
5114 WRITE_COEF(0x45, 0xc089),
5115 WRITE_COEF(0x45, 0xc489),
5116 WRITE_COEFEX(0x57, 0x03, 0x8ea6),
5117 WRITE_COEF(0x49, 0x0049),
5120 static const struct coef_fw coef0256
[] = {
5121 WRITE_COEF(0x45, 0xc489),
5122 WRITE_COEFEX(0x57, 0x03, 0x0da3),
5123 WRITE_COEF(0x49, 0x0049),
5124 UPDATE_COEFEX(0x57, 0x05, 1<<14, 0), /* Direct Drive HP Amp control(Set to verb control)*/
5125 WRITE_COEF(0x06, 0x6100),
5128 static const struct coef_fw coef0233
[] = {
5129 WRITE_COEF(0x06, 0x2100),
5130 WRITE_COEF(0x32, 0x4ea3),
5133 static const struct coef_fw coef0288
[] = {
5134 UPDATE_COEF(0x4f, 0xfcc0, 0xc400), /* Set to TRS type */
5135 UPDATE_COEF(0x50, 0x2000, 0x2000),
5136 UPDATE_COEF(0x56, 0x0006, 0x0006),
5137 UPDATE_COEF(0x66, 0x0008, 0),
5138 UPDATE_COEF(0x67, 0x2000, 0),
5141 static const struct coef_fw coef0292
[] = {
5142 WRITE_COEF(0x76, 0x000e),
5143 WRITE_COEF(0x6c, 0x2400),
5144 WRITE_COEF(0x6b, 0xc429),
5145 WRITE_COEF(0x18, 0x7308),
5148 static const struct coef_fw coef0293
[] = {
5149 UPDATE_COEF(0x4a, 0x000f, 0x000e), /* Combo Jack auto detect */
5150 WRITE_COEF(0x45, 0xC429), /* Set to TRS type */
5151 UPDATE_COEF(0x1a, 1<<3, 0), /* Combo JD gating without LINE1-VREFO */
5154 static const struct coef_fw coef0688
[] = {
5155 WRITE_COEF(0x11, 0x0041),
5156 WRITE_COEF(0x15, 0x0d40),
5157 WRITE_COEF(0xb7, 0x802b),
5160 static const struct coef_fw coef0274
[] = {
5161 WRITE_COEF(0x45, 0x4289),
5162 UPDATE_COEF(0x4a, 0x0010, 0x0010),
5163 UPDATE_COEF(0x6b, 0x0f00, 0),
5164 UPDATE_COEF(0x49, 0x0300, 0x0300),
5168 switch (codec
->core
.vendor_id
) {
5175 alc_process_coef_fw(codec
, alc225_pre_hsmode
);
5176 alc_process_coef_fw(codec
, coef0225
);
5179 alc_process_coef_fw(codec
, coef0255
);
5185 alc_write_coef_idx(codec
, 0x1b, 0x0e4b);
5186 alc_write_coef_idx(codec
, 0x45, 0xc089);
5188 alc_process_coef_fw(codec
, coef0256
);
5193 alc_process_coef_fw(codec
, coef0274
);
5197 alc_process_coef_fw(codec
, coef0233
);
5202 alc_process_coef_fw(codec
, coef0288
);
5205 alc_process_coef_fw(codec
, coef0292
);
5208 alc_process_coef_fw(codec
, coef0293
);
5211 alc_process_coef_fw(codec
, coef0688
);
5214 alc_update_coefex_idx(codec
, 0x57, 0x5, 1<<14, 0);
5217 codec_dbg(codec
, "Headset jack set to headphone (default) mode.\n");
5221 static void alc_headset_mode_ctia(struct hda_codec
*codec
)
5225 static const struct coef_fw coef0255
[] = {
5226 WRITE_COEF(0x45, 0xd489), /* Set to CTIA type */
5227 WRITE_COEF(0x1b, 0x0c2b),
5228 WRITE_COEFEX(0x57, 0x03, 0x8ea6),
5231 static const struct coef_fw coef0256
[] = {
5232 WRITE_COEF(0x45, 0xd489), /* Set to CTIA type */
5233 WRITE_COEF(0x1b, 0x0e6b),
5236 static const struct coef_fw coef0233
[] = {
5237 WRITE_COEF(0x45, 0xd429),
5238 WRITE_COEF(0x1b, 0x0c2b),
5239 WRITE_COEF(0x32, 0x4ea3),
5242 static const struct coef_fw coef0288
[] = {
5243 UPDATE_COEF(0x50, 0x2000, 0x2000),
5244 UPDATE_COEF(0x56, 0x0006, 0x0006),
5245 UPDATE_COEF(0x66, 0x0008, 0),
5246 UPDATE_COEF(0x67, 0x2000, 0),
5249 static const struct coef_fw coef0292
[] = {
5250 WRITE_COEF(0x6b, 0xd429),
5251 WRITE_COEF(0x76, 0x0008),
5252 WRITE_COEF(0x18, 0x7388),
5255 static const struct coef_fw coef0293
[] = {
5256 WRITE_COEF(0x45, 0xd429), /* Set to ctia type */
5257 UPDATE_COEF(0x10, 7<<8, 7<<8), /* SET Line1 JD to 1 */
5260 static const struct coef_fw coef0688
[] = {
5261 WRITE_COEF(0x11, 0x0001),
5262 WRITE_COEF(0x15, 0x0d60),
5263 WRITE_COEF(0xc3, 0x0000),
5266 static const struct coef_fw coef0225_1
[] = {
5267 UPDATE_COEF(0x45, 0x3f<<10, 0x35<<10),
5268 UPDATE_COEF(0x63, 3<<14, 2<<14),
5271 static const struct coef_fw coef0225_2
[] = {
5272 UPDATE_COEF(0x45, 0x3f<<10, 0x35<<10),
5273 UPDATE_COEF(0x63, 3<<14, 1<<14),
5277 switch (codec
->core
.vendor_id
) {
5279 alc_process_coef_fw(codec
, coef0255
);
5285 alc_process_coef_fw(codec
, coef0256
);
5290 alc_write_coef_idx(codec
, 0x45, 0xd689);
5294 alc_process_coef_fw(codec
, coef0233
);
5297 val
= alc_read_coef_idx(codec
, 0x50);
5298 if (val
& (1 << 12)) {
5299 alc_update_coef_idx(codec
, 0x8e, 0x0070, 0x0020);
5300 alc_update_coef_idx(codec
, 0x4f, 0xfcc0, 0xd400);
5303 alc_update_coef_idx(codec
, 0x8e, 0x0070, 0x0010);
5304 alc_update_coef_idx(codec
, 0x4f, 0xfcc0, 0xd400);
5310 alc_update_coef_idx(codec
, 0x4f, 0xfcc0, 0xd400);
5312 alc_process_coef_fw(codec
, coef0288
);
5315 alc_process_coef_fw(codec
, coef0292
);
5318 alc_process_coef_fw(codec
, coef0293
);
5321 alc_process_coef_fw(codec
, coef0688
);
5329 val
= alc_read_coef_idx(codec
, 0x45);
5331 alc_process_coef_fw(codec
, coef0225_2
);
5333 alc_process_coef_fw(codec
, coef0225_1
);
5336 alc_update_coefex_idx(codec
, 0x57, 0x5, 1<<14, 0);
5339 codec_dbg(codec
, "Headset jack set to iPhone-style headset mode.\n");
5343 static void alc_headset_mode_omtp(struct hda_codec
*codec
)
5345 static const struct coef_fw coef0255
[] = {
5346 WRITE_COEF(0x45, 0xe489), /* Set to OMTP Type */
5347 WRITE_COEF(0x1b, 0x0c2b),
5348 WRITE_COEFEX(0x57, 0x03, 0x8ea6),
5351 static const struct coef_fw coef0256
[] = {
5352 WRITE_COEF(0x45, 0xe489), /* Set to OMTP Type */
5353 WRITE_COEF(0x1b, 0x0e6b),
5356 static const struct coef_fw coef0233
[] = {
5357 WRITE_COEF(0x45, 0xe429),
5358 WRITE_COEF(0x1b, 0x0c2b),
5359 WRITE_COEF(0x32, 0x4ea3),
5362 static const struct coef_fw coef0288
[] = {
5363 UPDATE_COEF(0x50, 0x2000, 0x2000),
5364 UPDATE_COEF(0x56, 0x0006, 0x0006),
5365 UPDATE_COEF(0x66, 0x0008, 0),
5366 UPDATE_COEF(0x67, 0x2000, 0),
5369 static const struct coef_fw coef0292
[] = {
5370 WRITE_COEF(0x6b, 0xe429),
5371 WRITE_COEF(0x76, 0x0008),
5372 WRITE_COEF(0x18, 0x7388),
5375 static const struct coef_fw coef0293
[] = {
5376 WRITE_COEF(0x45, 0xe429), /* Set to omtp type */
5377 UPDATE_COEF(0x10, 7<<8, 7<<8), /* SET Line1 JD to 1 */
5380 static const struct coef_fw coef0688
[] = {
5381 WRITE_COEF(0x11, 0x0001),
5382 WRITE_COEF(0x15, 0x0d50),
5383 WRITE_COEF(0xc3, 0x0000),
5386 static const struct coef_fw coef0225
[] = {
5387 UPDATE_COEF(0x45, 0x3f<<10, 0x39<<10),
5388 UPDATE_COEF(0x63, 3<<14, 2<<14),
5392 switch (codec
->core
.vendor_id
) {
5394 alc_process_coef_fw(codec
, coef0255
);
5400 alc_process_coef_fw(codec
, coef0256
);
5405 alc_write_coef_idx(codec
, 0x45, 0xe689);
5409 alc_process_coef_fw(codec
, coef0233
);
5412 alc_update_coef_idx(codec
, 0x8e, 0x0070, 0x0010);/* Headset output enable */
5413 alc_update_coef_idx(codec
, 0x4f, 0xfcc0, 0xe400);
5418 alc_update_coef_idx(codec
, 0x4f, 0xfcc0, 0xe400);
5420 alc_process_coef_fw(codec
, coef0288
);
5423 alc_process_coef_fw(codec
, coef0292
);
5426 alc_process_coef_fw(codec
, coef0293
);
5429 alc_process_coef_fw(codec
, coef0688
);
5437 alc_process_coef_fw(codec
, coef0225
);
5440 codec_dbg(codec
, "Headset jack set to Nokia-style headset mode.\n");
5443 static void alc_determine_headset_type(struct hda_codec
*codec
)
5446 bool is_ctia
= false;
5447 struct alc_spec
*spec
= codec
->spec
;
5448 static const struct coef_fw coef0255
[] = {
5449 WRITE_COEF(0x45, 0xd089), /* combo jack auto switch control(Check type)*/
5450 WRITE_COEF(0x49, 0x0149), /* combo jack auto switch control(Vref
5454 static const struct coef_fw coef0288
[] = {
5455 UPDATE_COEF(0x4f, 0xfcc0, 0xd400), /* Check Type */
5458 static const struct coef_fw coef0298
[] = {
5459 UPDATE_COEF(0x50, 0x2000, 0x2000),
5460 UPDATE_COEF(0x56, 0x0006, 0x0006),
5461 UPDATE_COEF(0x66, 0x0008, 0),
5462 UPDATE_COEF(0x67, 0x2000, 0),
5463 UPDATE_COEF(0x19, 0x1300, 0x1300),
5466 static const struct coef_fw coef0293
[] = {
5467 UPDATE_COEF(0x4a, 0x000f, 0x0008), /* Combo Jack auto detect */
5468 WRITE_COEF(0x45, 0xD429), /* Set to ctia type */
5471 static const struct coef_fw coef0688
[] = {
5472 WRITE_COEF(0x11, 0x0001),
5473 WRITE_COEF(0xb7, 0x802b),
5474 WRITE_COEF(0x15, 0x0d60),
5475 WRITE_COEF(0xc3, 0x0c00),
5478 static const struct coef_fw coef0274
[] = {
5479 UPDATE_COEF(0x4a, 0x0010, 0),
5480 UPDATE_COEF(0x4a, 0x8000, 0),
5481 WRITE_COEF(0x45, 0xd289),
5482 UPDATE_COEF(0x49, 0x0300, 0x0300),
5486 if (spec
->no_internal_mic_pin
) {
5487 alc_update_coef_idx(codec
, 0x45, 0xf<<12 | 1<<10, 5<<12);
5491 switch (codec
->core
.vendor_id
) {
5493 alc_process_coef_fw(codec
, coef0255
);
5495 val
= alc_read_coef_idx(codec
, 0x46);
5496 is_ctia
= (val
& 0x0070) == 0x0070;
5502 alc_write_coef_idx(codec
, 0x1b, 0x0e4b);
5503 alc_write_coef_idx(codec
, 0x06, 0x6104);
5504 alc_write_coefex_idx(codec
, 0x57, 0x3, 0x09a3);
5506 snd_hda_codec_write(codec
, 0x21, 0,
5507 AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_MUTE
);
5509 snd_hda_codec_write(codec
, 0x21, 0,
5510 AC_VERB_SET_PIN_WIDGET_CONTROL
, 0x0);
5512 alc_process_coef_fw(codec
, coef0255
);
5514 val
= alc_read_coef_idx(codec
, 0x46);
5515 is_ctia
= (val
& 0x0070) == 0x0070;
5517 alc_write_coefex_idx(codec
, 0x57, 0x3, 0x0da3);
5518 alc_update_coefex_idx(codec
, 0x57, 0x5, 1<<14, 0);
5520 snd_hda_codec_write(codec
, 0x21, 0,
5521 AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_OUT
);
5523 snd_hda_codec_write(codec
, 0x21, 0,
5524 AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_UNMUTE
);
5529 alc_process_coef_fw(codec
, coef0274
);
5531 val
= alc_read_coef_idx(codec
, 0x46);
5532 is_ctia
= (val
& 0x00f0) == 0x00f0;
5536 alc_write_coef_idx(codec
, 0x45, 0xd029);
5538 val
= alc_read_coef_idx(codec
, 0x46);
5539 is_ctia
= (val
& 0x0070) == 0x0070;
5542 snd_hda_codec_write(codec
, 0x21, 0,
5543 AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_MUTE
);
5545 snd_hda_codec_write(codec
, 0x21, 0,
5546 AC_VERB_SET_PIN_WIDGET_CONTROL
, 0x0);
5549 val
= alc_read_coef_idx(codec
, 0x50);
5550 if (val
& (1 << 12)) {
5551 alc_update_coef_idx(codec
, 0x8e, 0x0070, 0x0020);
5552 alc_process_coef_fw(codec
, coef0288
);
5554 val
= alc_read_coef_idx(codec
, 0x50);
5555 is_ctia
= (val
& 0x0070) == 0x0070;
5557 alc_update_coef_idx(codec
, 0x8e, 0x0070, 0x0010);
5558 alc_process_coef_fw(codec
, coef0288
);
5560 val
= alc_read_coef_idx(codec
, 0x50);
5561 is_ctia
= (val
& 0x0070) == 0x0070;
5563 alc_process_coef_fw(codec
, coef0298
);
5564 snd_hda_codec_write(codec
, 0x21, 0,
5565 AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_HP
);
5567 snd_hda_codec_write(codec
, 0x21, 0,
5568 AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_UNMUTE
);
5572 alc_process_coef_fw(codec
, coef0288
);
5574 val
= alc_read_coef_idx(codec
, 0x50);
5575 is_ctia
= (val
& 0x0070) == 0x0070;
5578 alc_write_coef_idx(codec
, 0x6b, 0xd429);
5580 val
= alc_read_coef_idx(codec
, 0x6c);
5581 is_ctia
= (val
& 0x001c) == 0x001c;
5584 alc_process_coef_fw(codec
, coef0293
);
5586 val
= alc_read_coef_idx(codec
, 0x46);
5587 is_ctia
= (val
& 0x0070) == 0x0070;
5590 alc_process_coef_fw(codec
, coef0688
);
5592 val
= alc_read_coef_idx(codec
, 0xbe);
5593 is_ctia
= (val
& 0x1c02) == 0x1c02;
5601 snd_hda_codec_write(codec
, 0x21, 0,
5602 AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_MUTE
);
5604 snd_hda_codec_write(codec
, 0x21, 0,
5605 AC_VERB_SET_PIN_WIDGET_CONTROL
, 0x0);
5607 alc_process_coef_fw(codec
, alc225_pre_hsmode
);
5608 alc_update_coef_idx(codec
, 0x67, 0xf000, 0x1000);
5609 val
= alc_read_coef_idx(codec
, 0x45);
5610 if (val
& (1 << 9)) {
5611 alc_update_coef_idx(codec
, 0x45, 0x3f<<10, 0x34<<10);
5612 alc_update_coef_idx(codec
, 0x49, 3<<8, 2<<8);
5614 val
= alc_read_coef_idx(codec
, 0x46);
5615 is_ctia
= (val
& 0x00f0) == 0x00f0;
5617 alc_update_coef_idx(codec
, 0x45, 0x3f<<10, 0x34<<10);
5618 alc_update_coef_idx(codec
, 0x49, 3<<8, 1<<8);
5620 val
= alc_read_coef_idx(codec
, 0x46);
5621 is_ctia
= (val
& 0x00f0) == 0x00f0;
5623 alc_update_coef_idx(codec
, 0x4a, 7<<6, 7<<6);
5624 alc_update_coef_idx(codec
, 0x4a, 3<<4, 3<<4);
5625 alc_update_coef_idx(codec
, 0x67, 0xf000, 0x3000);
5627 snd_hda_codec_write(codec
, 0x21, 0,
5628 AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_OUT
);
5630 snd_hda_codec_write(codec
, 0x21, 0,
5631 AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_UNMUTE
);
5638 codec_dbg(codec
, "Headset jack detected iPhone-style headset: %s\n",
5639 is_ctia
? "yes" : "no");
5640 spec
->current_headset_type
= is_ctia
? ALC_HEADSET_TYPE_CTIA
: ALC_HEADSET_TYPE_OMTP
;
5643 static void alc_update_headset_mode(struct hda_codec
*codec
)
5645 struct alc_spec
*spec
= codec
->spec
;
5647 hda_nid_t mux_pin
= spec
->gen
.imux_pins
[spec
->gen
.cur_mux
[0]];
5648 hda_nid_t hp_pin
= alc_get_hp_pin(spec
);
5650 int new_headset_mode
;
5652 if (!snd_hda_jack_detect(codec
, hp_pin
))
5653 new_headset_mode
= ALC_HEADSET_MODE_UNPLUGGED
;
5654 else if (mux_pin
== spec
->headset_mic_pin
)
5655 new_headset_mode
= ALC_HEADSET_MODE_HEADSET
;
5656 else if (mux_pin
== spec
->headphone_mic_pin
)
5657 new_headset_mode
= ALC_HEADSET_MODE_MIC
;
5659 new_headset_mode
= ALC_HEADSET_MODE_HEADPHONE
;
5661 if (new_headset_mode
== spec
->current_headset_mode
) {
5662 snd_hda_gen_update_outputs(codec
);
5666 switch (new_headset_mode
) {
5667 case ALC_HEADSET_MODE_UNPLUGGED
:
5668 alc_headset_mode_unplugged(codec
);
5669 spec
->current_headset_mode
= ALC_HEADSET_MODE_UNKNOWN
;
5670 spec
->current_headset_type
= ALC_HEADSET_TYPE_UNKNOWN
;
5671 spec
->gen
.hp_jack_present
= false;
5673 case ALC_HEADSET_MODE_HEADSET
:
5674 if (spec
->current_headset_type
== ALC_HEADSET_TYPE_UNKNOWN
)
5675 alc_determine_headset_type(codec
);
5676 if (spec
->current_headset_type
== ALC_HEADSET_TYPE_CTIA
)
5677 alc_headset_mode_ctia(codec
);
5678 else if (spec
->current_headset_type
== ALC_HEADSET_TYPE_OMTP
)
5679 alc_headset_mode_omtp(codec
);
5680 spec
->gen
.hp_jack_present
= true;
5682 case ALC_HEADSET_MODE_MIC
:
5683 alc_headset_mode_mic_in(codec
, hp_pin
, spec
->headphone_mic_pin
);
5684 spec
->gen
.hp_jack_present
= false;
5686 case ALC_HEADSET_MODE_HEADPHONE
:
5687 alc_headset_mode_default(codec
);
5688 spec
->gen
.hp_jack_present
= true;
5691 if (new_headset_mode
!= ALC_HEADSET_MODE_MIC
) {
5692 snd_hda_set_pin_ctl_cache(codec
, hp_pin
,
5693 AC_PINCTL_OUT_EN
| AC_PINCTL_HP_EN
);
5694 if (spec
->headphone_mic_pin
&& spec
->headphone_mic_pin
!= hp_pin
)
5695 snd_hda_set_pin_ctl_cache(codec
, spec
->headphone_mic_pin
,
5698 spec
->current_headset_mode
= new_headset_mode
;
5700 snd_hda_gen_update_outputs(codec
);
5703 static void alc_update_headset_mode_hook(struct hda_codec
*codec
,
5704 struct snd_kcontrol
*kcontrol
,
5705 struct snd_ctl_elem_value
*ucontrol
)
5707 alc_update_headset_mode(codec
);
5710 static void alc_update_headset_jack_cb(struct hda_codec
*codec
,
5711 struct hda_jack_callback
*jack
)
5713 snd_hda_gen_hp_automute(codec
, jack
);
5714 alc_update_headset_mode(codec
);
5717 static void alc_probe_headset_mode(struct hda_codec
*codec
)
5720 struct alc_spec
*spec
= codec
->spec
;
5721 struct auto_pin_cfg
*cfg
= &spec
->gen
.autocfg
;
5724 for (i
= 0; i
< cfg
->num_inputs
; i
++) {
5725 if (cfg
->inputs
[i
].is_headset_mic
&& !spec
->headset_mic_pin
)
5726 spec
->headset_mic_pin
= cfg
->inputs
[i
].pin
;
5727 if (cfg
->inputs
[i
].is_headphone_mic
&& !spec
->headphone_mic_pin
)
5728 spec
->headphone_mic_pin
= cfg
->inputs
[i
].pin
;
5731 WARN_ON(spec
->gen
.cap_sync_hook
);
5732 spec
->gen
.cap_sync_hook
= alc_update_headset_mode_hook
;
5733 spec
->gen
.automute_hook
= alc_update_headset_mode
;
5734 spec
->gen
.hp_automute_hook
= alc_update_headset_jack_cb
;
5737 static void alc_fixup_headset_mode(struct hda_codec
*codec
,
5738 const struct hda_fixup
*fix
, int action
)
5740 struct alc_spec
*spec
= codec
->spec
;
5743 case HDA_FIXUP_ACT_PRE_PROBE
:
5744 spec
->parse_flags
|= HDA_PINCFG_HEADSET_MIC
| HDA_PINCFG_HEADPHONE_MIC
;
5746 case HDA_FIXUP_ACT_PROBE
:
5747 alc_probe_headset_mode(codec
);
5749 case HDA_FIXUP_ACT_INIT
:
5750 if (is_s3_resume(codec
) || is_s4_resume(codec
)) {
5751 spec
->current_headset_mode
= ALC_HEADSET_MODE_UNKNOWN
;
5752 spec
->current_headset_type
= ALC_HEADSET_TYPE_UNKNOWN
;
5754 alc_update_headset_mode(codec
);
5759 static void alc_fixup_headset_mode_no_hp_mic(struct hda_codec
*codec
,
5760 const struct hda_fixup
*fix
, int action
)
5762 if (action
== HDA_FIXUP_ACT_PRE_PROBE
) {
5763 struct alc_spec
*spec
= codec
->spec
;
5764 spec
->parse_flags
|= HDA_PINCFG_HEADSET_MIC
;
5767 alc_fixup_headset_mode(codec
, fix
, action
);
5770 static void alc255_set_default_jack_type(struct hda_codec
*codec
)
5772 /* Set to iphone type */
5773 static const struct coef_fw alc255fw
[] = {
5774 WRITE_COEF(0x1b, 0x880b),
5775 WRITE_COEF(0x45, 0xd089),
5776 WRITE_COEF(0x1b, 0x080b),
5777 WRITE_COEF(0x46, 0x0004),
5778 WRITE_COEF(0x1b, 0x0c0b),
5781 static const struct coef_fw alc256fw
[] = {
5782 WRITE_COEF(0x1b, 0x884b),
5783 WRITE_COEF(0x45, 0xd089),
5784 WRITE_COEF(0x1b, 0x084b),
5785 WRITE_COEF(0x46, 0x0004),
5786 WRITE_COEF(0x1b, 0x0c4b),
5789 switch (codec
->core
.vendor_id
) {
5791 alc_process_coef_fw(codec
, alc255fw
);
5797 alc_process_coef_fw(codec
, alc256fw
);
5803 static void alc_fixup_headset_mode_alc255(struct hda_codec
*codec
,
5804 const struct hda_fixup
*fix
, int action
)
5806 if (action
== HDA_FIXUP_ACT_PRE_PROBE
) {
5807 alc255_set_default_jack_type(codec
);
5809 alc_fixup_headset_mode(codec
, fix
, action
);
5812 static void alc_fixup_headset_mode_alc255_no_hp_mic(struct hda_codec
*codec
,
5813 const struct hda_fixup
*fix
, int action
)
5815 if (action
== HDA_FIXUP_ACT_PRE_PROBE
) {
5816 struct alc_spec
*spec
= codec
->spec
;
5817 spec
->parse_flags
|= HDA_PINCFG_HEADSET_MIC
;
5818 alc255_set_default_jack_type(codec
);
5821 alc_fixup_headset_mode(codec
, fix
, action
);
5824 static void alc288_update_headset_jack_cb(struct hda_codec
*codec
,
5825 struct hda_jack_callback
*jack
)
5827 struct alc_spec
*spec
= codec
->spec
;
5829 alc_update_headset_jack_cb(codec
, jack
);
5830 /* Headset Mic enable or disable, only for Dell Dino */
5831 alc_update_gpio_data(codec
, 0x40, spec
->gen
.hp_jack_present
);
5834 static void alc_fixup_headset_mode_dell_alc288(struct hda_codec
*codec
,
5835 const struct hda_fixup
*fix
, int action
)
5837 alc_fixup_headset_mode(codec
, fix
, action
);
5838 if (action
== HDA_FIXUP_ACT_PROBE
) {
5839 struct alc_spec
*spec
= codec
->spec
;
5840 /* toggled via hp_automute_hook */
5841 spec
->gpio_mask
|= 0x40;
5842 spec
->gpio_dir
|= 0x40;
5843 spec
->gen
.hp_automute_hook
= alc288_update_headset_jack_cb
;
5847 static void alc_fixup_auto_mute_via_amp(struct hda_codec
*codec
,
5848 const struct hda_fixup
*fix
, int action
)
5850 if (action
== HDA_FIXUP_ACT_PRE_PROBE
) {
5851 struct alc_spec
*spec
= codec
->spec
;
5852 spec
->gen
.auto_mute_via_amp
= 1;
5856 static void alc_fixup_no_shutup(struct hda_codec
*codec
,
5857 const struct hda_fixup
*fix
, int action
)
5859 if (action
== HDA_FIXUP_ACT_PRE_PROBE
) {
5860 struct alc_spec
*spec
= codec
->spec
;
5861 spec
->no_shutup_pins
= 1;
5865 static void alc_fixup_disable_aamix(struct hda_codec
*codec
,
5866 const struct hda_fixup
*fix
, int action
)
5868 if (action
== HDA_FIXUP_ACT_PRE_PROBE
) {
5869 struct alc_spec
*spec
= codec
->spec
;
5870 /* Disable AA-loopback as it causes white noise */
5871 spec
->gen
.mixer_nid
= 0;
5875 /* fixup for Thinkpad docks: add dock pins, avoid HP parser fixup */
5876 static void alc_fixup_tpt440_dock(struct hda_codec
*codec
,
5877 const struct hda_fixup
*fix
, int action
)
5879 static const struct hda_pintbl pincfgs
[] = {
5880 { 0x16, 0x21211010 }, /* dock headphone */
5881 { 0x19, 0x21a11010 }, /* dock mic */
5884 struct alc_spec
*spec
= codec
->spec
;
5886 if (action
== HDA_FIXUP_ACT_PRE_PROBE
) {
5887 spec
->parse_flags
= HDA_PINCFG_NO_HP_FIXUP
;
5888 codec
->power_save_node
= 0; /* avoid click noises */
5889 snd_hda_apply_pincfgs(codec
, pincfgs
);
5893 static void alc_fixup_tpt470_dock(struct hda_codec
*codec
,
5894 const struct hda_fixup
*fix
, int action
)
5896 static const struct hda_pintbl pincfgs
[] = {
5897 { 0x17, 0x21211010 }, /* dock headphone */
5898 { 0x19, 0x21a11010 }, /* dock mic */
5901 struct alc_spec
*spec
= codec
->spec
;
5903 if (action
== HDA_FIXUP_ACT_PRE_PROBE
) {
5904 spec
->parse_flags
= HDA_PINCFG_NO_HP_FIXUP
;
5905 snd_hda_apply_pincfgs(codec
, pincfgs
);
5906 } else if (action
== HDA_FIXUP_ACT_INIT
) {
5907 /* Enable DOCK device */
5908 snd_hda_codec_write(codec
, 0x17, 0,
5909 AC_VERB_SET_CONFIG_DEFAULT_BYTES_3
, 0);
5910 /* Enable DOCK device */
5911 snd_hda_codec_write(codec
, 0x19, 0,
5912 AC_VERB_SET_CONFIG_DEFAULT_BYTES_3
, 0);
5916 static void alc_fixup_tpt470_dacs(struct hda_codec
*codec
,
5917 const struct hda_fixup
*fix
, int action
)
5919 /* Assure the speaker pin to be coupled with DAC NID 0x03; otherwise
5920 * the speaker output becomes too low by some reason on Thinkpads with
5923 static const hda_nid_t preferred_pairs
[] = {
5924 0x14, 0x03, 0x17, 0x02, 0x21, 0x02,
5927 struct alc_spec
*spec
= codec
->spec
;
5929 if (action
== HDA_FIXUP_ACT_PRE_PROBE
)
5930 spec
->gen
.preferred_dacs
= preferred_pairs
;
5933 static void alc295_fixup_asus_dacs(struct hda_codec
*codec
,
5934 const struct hda_fixup
*fix
, int action
)
5936 static const hda_nid_t preferred_pairs
[] = {
5937 0x17, 0x02, 0x21, 0x03, 0
5939 struct alc_spec
*spec
= codec
->spec
;
5941 if (action
== HDA_FIXUP_ACT_PRE_PROBE
)
5942 spec
->gen
.preferred_dacs
= preferred_pairs
;
5945 static void alc_shutup_dell_xps13(struct hda_codec
*codec
)
5947 struct alc_spec
*spec
= codec
->spec
;
5948 int hp_pin
= alc_get_hp_pin(spec
);
5950 /* Prevent pop noises when headphones are plugged in */
5951 snd_hda_codec_write(codec
, hp_pin
, 0,
5952 AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_MUTE
);
5956 static void alc_fixup_dell_xps13(struct hda_codec
*codec
,
5957 const struct hda_fixup
*fix
, int action
)
5959 struct alc_spec
*spec
= codec
->spec
;
5960 struct hda_input_mux
*imux
= &spec
->gen
.input_mux
;
5964 case HDA_FIXUP_ACT_PRE_PROBE
:
5965 /* mic pin 0x19 must be initialized with Vref Hi-Z, otherwise
5966 * it causes a click noise at start up
5968 snd_hda_codec_set_pin_target(codec
, 0x19, PIN_VREFHIZ
);
5969 spec
->shutup
= alc_shutup_dell_xps13
;
5971 case HDA_FIXUP_ACT_PROBE
:
5972 /* Make the internal mic the default input source. */
5973 for (i
= 0; i
< imux
->num_items
; i
++) {
5974 if (spec
->gen
.imux_pins
[i
] == 0x12) {
5975 spec
->gen
.cur_mux
[0] = i
;
5983 static void alc_fixup_headset_mode_alc662(struct hda_codec
*codec
,
5984 const struct hda_fixup
*fix
, int action
)
5986 struct alc_spec
*spec
= codec
->spec
;
5988 if (action
== HDA_FIXUP_ACT_PRE_PROBE
) {
5989 spec
->parse_flags
|= HDA_PINCFG_HEADSET_MIC
;
5990 spec
->gen
.hp_mic
= 1; /* Mic-in is same pin as headphone */
5992 /* Disable boost for mic-in permanently. (This code is only called
5993 from quirks that guarantee that the headphone is at NID 0x1b.) */
5994 snd_hda_codec_write(codec
, 0x1b, 0, AC_VERB_SET_AMP_GAIN_MUTE
, 0x7000);
5995 snd_hda_override_wcaps(codec
, 0x1b, get_wcaps(codec
, 0x1b) & ~AC_WCAP_IN_AMP
);
5997 alc_fixup_headset_mode(codec
, fix
, action
);
6000 static void alc_fixup_headset_mode_alc668(struct hda_codec
*codec
,
6001 const struct hda_fixup
*fix
, int action
)
6003 if (action
== HDA_FIXUP_ACT_PRE_PROBE
) {
6004 alc_write_coef_idx(codec
, 0xc4, 0x8000);
6005 alc_update_coef_idx(codec
, 0xc2, ~0xfe, 0);
6006 snd_hda_set_pin_ctl_cache(codec
, 0x18, 0);
6008 alc_fixup_headset_mode(codec
, fix
, action
);
6011 /* Returns the nid of the external mic input pin, or 0 if it cannot be found. */
6012 static int find_ext_mic_pin(struct hda_codec
*codec
)
6014 struct alc_spec
*spec
= codec
->spec
;
6015 struct auto_pin_cfg
*cfg
= &spec
->gen
.autocfg
;
6017 unsigned int defcfg
;
6020 for (i
= 0; i
< cfg
->num_inputs
; i
++) {
6021 if (cfg
->inputs
[i
].type
!= AUTO_PIN_MIC
)
6023 nid
= cfg
->inputs
[i
].pin
;
6024 defcfg
= snd_hda_codec_get_pincfg(codec
, nid
);
6025 if (snd_hda_get_input_pin_attr(defcfg
) == INPUT_PIN_ATTR_INT
)
6033 static void alc271_hp_gate_mic_jack(struct hda_codec
*codec
,
6034 const struct hda_fixup
*fix
,
6037 struct alc_spec
*spec
= codec
->spec
;
6039 if (action
== HDA_FIXUP_ACT_PROBE
) {
6040 int mic_pin
= find_ext_mic_pin(codec
);
6041 int hp_pin
= alc_get_hp_pin(spec
);
6043 if (snd_BUG_ON(!mic_pin
|| !hp_pin
))
6045 snd_hda_jack_set_gating_jack(codec
, mic_pin
, hp_pin
);
6049 static void alc269_fixup_limit_int_mic_boost(struct hda_codec
*codec
,
6050 const struct hda_fixup
*fix
,
6053 struct alc_spec
*spec
= codec
->spec
;
6054 struct auto_pin_cfg
*cfg
= &spec
->gen
.autocfg
;
6057 /* The mic boosts on level 2 and 3 are too noisy
6058 on the internal mic input.
6059 Therefore limit the boost to 0 or 1. */
6061 if (action
!= HDA_FIXUP_ACT_PROBE
)
6064 for (i
= 0; i
< cfg
->num_inputs
; i
++) {
6065 hda_nid_t nid
= cfg
->inputs
[i
].pin
;
6066 unsigned int defcfg
;
6067 if (cfg
->inputs
[i
].type
!= AUTO_PIN_MIC
)
6069 defcfg
= snd_hda_codec_get_pincfg(codec
, nid
);
6070 if (snd_hda_get_input_pin_attr(defcfg
) != INPUT_PIN_ATTR_INT
)
6073 snd_hda_override_amp_caps(codec
, nid
, HDA_INPUT
,
6074 (0x00 << AC_AMPCAP_OFFSET_SHIFT
) |
6075 (0x01 << AC_AMPCAP_NUM_STEPS_SHIFT
) |
6076 (0x2f << AC_AMPCAP_STEP_SIZE_SHIFT
) |
6077 (0 << AC_AMPCAP_MUTE_SHIFT
));
6081 static void alc283_hp_automute_hook(struct hda_codec
*codec
,
6082 struct hda_jack_callback
*jack
)
6084 struct alc_spec
*spec
= codec
->spec
;
6088 snd_hda_gen_hp_automute(codec
, jack
);
6090 vref
= spec
->gen
.hp_jack_present
? PIN_VREF80
: 0;
6093 snd_hda_codec_write(codec
, 0x19, 0, AC_VERB_SET_PIN_WIDGET_CONTROL
,
6097 static void alc283_fixup_chromebook(struct hda_codec
*codec
,
6098 const struct hda_fixup
*fix
, int action
)
6100 struct alc_spec
*spec
= codec
->spec
;
6103 case HDA_FIXUP_ACT_PRE_PROBE
:
6104 snd_hda_override_wcaps(codec
, 0x03, 0);
6105 /* Disable AA-loopback as it causes white noise */
6106 spec
->gen
.mixer_nid
= 0;
6108 case HDA_FIXUP_ACT_INIT
:
6109 /* MIC2-VREF control */
6110 /* Set to manual mode */
6111 alc_update_coef_idx(codec
, 0x06, 0x000c, 0);
6112 /* Enable Line1 input control by verb */
6113 alc_update_coef_idx(codec
, 0x1a, 0, 1 << 4);
6118 static void alc283_fixup_sense_combo_jack(struct hda_codec
*codec
,
6119 const struct hda_fixup
*fix
, int action
)
6121 struct alc_spec
*spec
= codec
->spec
;
6124 case HDA_FIXUP_ACT_PRE_PROBE
:
6125 spec
->gen
.hp_automute_hook
= alc283_hp_automute_hook
;
6127 case HDA_FIXUP_ACT_INIT
:
6128 /* MIC2-VREF control */
6129 /* Set to manual mode */
6130 alc_update_coef_idx(codec
, 0x06, 0x000c, 0);
6135 /* mute tablet speaker pin (0x14) via dock plugging in addition */
6136 static void asus_tx300_automute(struct hda_codec
*codec
)
6138 struct alc_spec
*spec
= codec
->spec
;
6139 snd_hda_gen_update_outputs(codec
);
6140 if (snd_hda_jack_detect(codec
, 0x1b))
6141 spec
->gen
.mute_bits
|= (1ULL << 0x14);
6144 static void alc282_fixup_asus_tx300(struct hda_codec
*codec
,
6145 const struct hda_fixup
*fix
, int action
)
6147 struct alc_spec
*spec
= codec
->spec
;
6148 static const struct hda_pintbl dock_pins
[] = {
6149 { 0x1b, 0x21114000 }, /* dock speaker pin */
6154 case HDA_FIXUP_ACT_PRE_PROBE
:
6155 spec
->init_amp
= ALC_INIT_DEFAULT
;
6156 /* TX300 needs to set up GPIO2 for the speaker amp */
6157 alc_setup_gpio(codec
, 0x04);
6158 snd_hda_apply_pincfgs(codec
, dock_pins
);
6159 spec
->gen
.auto_mute_via_amp
= 1;
6160 spec
->gen
.automute_hook
= asus_tx300_automute
;
6161 snd_hda_jack_detect_enable_callback(codec
, 0x1b,
6162 snd_hda_gen_hp_automute
);
6164 case HDA_FIXUP_ACT_PROBE
:
6165 spec
->init_amp
= ALC_INIT_DEFAULT
;
6167 case HDA_FIXUP_ACT_BUILD
:
6168 /* this is a bit tricky; give more sane names for the main
6169 * (tablet) speaker and the dock speaker, respectively
6171 rename_ctl(codec
, "Speaker Playback Switch",
6172 "Dock Speaker Playback Switch");
6173 rename_ctl(codec
, "Bass Speaker Playback Switch",
6174 "Speaker Playback Switch");
6179 static void alc290_fixup_mono_speakers(struct hda_codec
*codec
,
6180 const struct hda_fixup
*fix
, int action
)
6182 if (action
== HDA_FIXUP_ACT_PRE_PROBE
) {
6183 /* DAC node 0x03 is giving mono output. We therefore want to
6184 make sure 0x14 (front speaker) and 0x15 (headphones) use the
6185 stereo DAC, while leaving 0x17 (bass speaker) for node 0x03. */
6186 static const hda_nid_t conn1
[] = { 0x0c };
6187 snd_hda_override_conn_list(codec
, 0x14, ARRAY_SIZE(conn1
), conn1
);
6188 snd_hda_override_conn_list(codec
, 0x15, ARRAY_SIZE(conn1
), conn1
);
6192 static void alc298_fixup_speaker_volume(struct hda_codec
*codec
,
6193 const struct hda_fixup
*fix
, int action
)
6195 if (action
== HDA_FIXUP_ACT_PRE_PROBE
) {
6196 /* The speaker is routed to the Node 0x06 by a mistake, as a result
6197 we can't adjust the speaker's volume since this node does not has
6198 Amp-out capability. we change the speaker's route to:
6199 Node 0x02 (Audio Output) -> Node 0x0c (Audio Mixer) -> Node 0x17 (
6200 Pin Complex), since Node 0x02 has Amp-out caps, we can adjust
6201 speaker's volume now. */
6203 static const hda_nid_t conn1
[] = { 0x0c };
6204 snd_hda_override_conn_list(codec
, 0x17, ARRAY_SIZE(conn1
), conn1
);
6208 /* disable DAC3 (0x06) selection on NID 0x17 as it has no volume amp control */
6209 static void alc295_fixup_disable_dac3(struct hda_codec
*codec
,
6210 const struct hda_fixup
*fix
, int action
)
6212 if (action
== HDA_FIXUP_ACT_PRE_PROBE
) {
6213 static const hda_nid_t conn
[] = { 0x02, 0x03 };
6214 snd_hda_override_conn_list(codec
, 0x17, ARRAY_SIZE(conn
), conn
);
6218 /* force NID 0x17 (Bass Speaker) to DAC1 to share it with the main speaker */
6219 static void alc285_fixup_speaker2_to_dac1(struct hda_codec
*codec
,
6220 const struct hda_fixup
*fix
, int action
)
6222 if (action
== HDA_FIXUP_ACT_PRE_PROBE
) {
6223 static const hda_nid_t conn
[] = { 0x02 };
6224 snd_hda_override_conn_list(codec
, 0x17, ARRAY_SIZE(conn
), conn
);
6228 /* Hook to update amp GPIO4 for automute */
6229 static void alc280_hp_gpio4_automute_hook(struct hda_codec
*codec
,
6230 struct hda_jack_callback
*jack
)
6232 struct alc_spec
*spec
= codec
->spec
;
6234 snd_hda_gen_hp_automute(codec
, jack
);
6235 /* mute_led_polarity is set to 0, so we pass inverted value here */
6236 alc_update_gpio_led(codec
, 0x10, spec
->mute_led_polarity
,
6237 !spec
->gen
.hp_jack_present
);
6240 /* Manage GPIOs for HP EliteBook Folio 9480m.
6242 * GPIO4 is the headphone amplifier power control
6243 * GPIO3 is the audio output mute indicator LED
6246 static void alc280_fixup_hp_9480m(struct hda_codec
*codec
,
6247 const struct hda_fixup
*fix
,
6250 struct alc_spec
*spec
= codec
->spec
;
6252 alc_fixup_hp_gpio_led(codec
, action
, 0x08, 0);
6253 if (action
== HDA_FIXUP_ACT_PRE_PROBE
) {
6254 /* amp at GPIO4; toggled via alc280_hp_gpio4_automute_hook() */
6255 spec
->gpio_mask
|= 0x10;
6256 spec
->gpio_dir
|= 0x10;
6257 spec
->gen
.hp_automute_hook
= alc280_hp_gpio4_automute_hook
;
6261 static void alc275_fixup_gpio4_off(struct hda_codec
*codec
,
6262 const struct hda_fixup
*fix
,
6265 struct alc_spec
*spec
= codec
->spec
;
6267 if (action
== HDA_FIXUP_ACT_PRE_PROBE
) {
6268 spec
->gpio_mask
|= 0x04;
6269 spec
->gpio_dir
|= 0x04;
6270 /* set data bit low */
6274 /* Quirk for Thinkpad X1 7th and 8th Gen
6275 * The following fixed routing needed
6276 * DAC1 (NID 0x02) -> Speaker (NID 0x14); some eq applied secretly
6277 * DAC2 (NID 0x03) -> Bass (NID 0x17) & Headphone (NID 0x21); sharing a DAC
6278 * DAC3 (NID 0x06) -> Unused, due to the lack of volume amp
6280 static void alc285_fixup_thinkpad_x1_gen7(struct hda_codec
*codec
,
6281 const struct hda_fixup
*fix
, int action
)
6283 static const hda_nid_t conn
[] = { 0x02, 0x03 }; /* exclude 0x06 */
6284 static const hda_nid_t preferred_pairs
[] = {
6285 0x14, 0x02, 0x17, 0x03, 0x21, 0x03, 0
6287 struct alc_spec
*spec
= codec
->spec
;
6290 case HDA_FIXUP_ACT_PRE_PROBE
:
6291 snd_hda_override_conn_list(codec
, 0x17, ARRAY_SIZE(conn
), conn
);
6292 spec
->gen
.preferred_dacs
= preferred_pairs
;
6294 case HDA_FIXUP_ACT_BUILD
:
6295 /* The generic parser creates somewhat unintuitive volume ctls
6296 * with the fixed routing above, and the shared DAC2 may be
6298 * Rename those to unique names so that PA doesn't touch them
6299 * and use only Master volume.
6301 rename_ctl(codec
, "Front Playback Volume", "DAC1 Playback Volume");
6302 rename_ctl(codec
, "Bass Speaker Playback Volume", "DAC2 Playback Volume");
6307 static void alc233_alc662_fixup_lenovo_dual_codecs(struct hda_codec
*codec
,
6308 const struct hda_fixup
*fix
,
6311 alc_fixup_dual_codecs(codec
, fix
, action
);
6313 case HDA_FIXUP_ACT_PRE_PROBE
:
6314 /* override card longname to provide a unique UCM profile */
6315 strcpy(codec
->card
->longname
, "HDAudio-Lenovo-DualCodecs");
6317 case HDA_FIXUP_ACT_BUILD
:
6318 /* rename Capture controls depending on the codec */
6319 rename_ctl(codec
, "Capture Volume",
6321 "Rear-Panel Capture Volume" :
6322 "Front-Panel Capture Volume");
6323 rename_ctl(codec
, "Capture Switch",
6325 "Rear-Panel Capture Switch" :
6326 "Front-Panel Capture Switch");
6331 static void alc225_fixup_s3_pop_noise(struct hda_codec
*codec
,
6332 const struct hda_fixup
*fix
, int action
)
6334 if (action
!= HDA_FIXUP_ACT_PRE_PROBE
)
6337 codec
->power_save_node
= 1;
6340 /* Forcibly assign NID 0x03 to HP/LO while NID 0x02 to SPK for EQ */
6341 static void alc274_fixup_bind_dacs(struct hda_codec
*codec
,
6342 const struct hda_fixup
*fix
, int action
)
6344 struct alc_spec
*spec
= codec
->spec
;
6345 static const hda_nid_t preferred_pairs
[] = {
6346 0x21, 0x03, 0x1b, 0x03, 0x16, 0x02,
6350 if (action
!= HDA_FIXUP_ACT_PRE_PROBE
)
6353 spec
->gen
.preferred_dacs
= preferred_pairs
;
6354 spec
->gen
.auto_mute_via_amp
= 1;
6355 codec
->power_save_node
= 0;
6358 /* avoid DAC 0x06 for bass speaker 0x17; it has no volume control */
6359 static void alc289_fixup_asus_ga401(struct hda_codec
*codec
,
6360 const struct hda_fixup
*fix
, int action
)
6362 static const hda_nid_t preferred_pairs
[] = {
6363 0x14, 0x02, 0x17, 0x02, 0x21, 0x03, 0
6365 struct alc_spec
*spec
= codec
->spec
;
6367 if (action
== HDA_FIXUP_ACT_PRE_PROBE
) {
6368 spec
->gen
.preferred_dacs
= preferred_pairs
;
6369 spec
->gen
.obey_preferred_dacs
= 1;
6373 /* The DAC of NID 0x3 will introduce click/pop noise on headphones, so invalidate it */
6374 static void alc285_fixup_invalidate_dacs(struct hda_codec
*codec
,
6375 const struct hda_fixup
*fix
, int action
)
6377 if (action
!= HDA_FIXUP_ACT_PRE_PROBE
)
6380 snd_hda_override_wcaps(codec
, 0x03, 0);
6383 static void alc_combo_jack_hp_jd_restart(struct hda_codec
*codec
)
6385 switch (codec
->core
.vendor_id
) {
6391 alc_update_coef_idx(codec
, 0x4a, 0x8000, 1 << 15); /* Reset HP JD */
6392 alc_update_coef_idx(codec
, 0x4a, 0x8000, 0 << 15);
6400 alc_update_coef_idx(codec
, 0x1b, 0x8000, 1 << 15); /* Reset HP JD */
6401 alc_update_coef_idx(codec
, 0x1b, 0x8000, 0 << 15);
6406 static void alc295_fixup_chromebook(struct hda_codec
*codec
,
6407 const struct hda_fixup
*fix
, int action
)
6409 struct alc_spec
*spec
= codec
->spec
;
6412 case HDA_FIXUP_ACT_PRE_PROBE
:
6413 spec
->ultra_low_power
= true;
6415 case HDA_FIXUP_ACT_INIT
:
6416 alc_combo_jack_hp_jd_restart(codec
);
6421 static void alc_fixup_disable_mic_vref(struct hda_codec
*codec
,
6422 const struct hda_fixup
*fix
, int action
)
6424 if (action
== HDA_FIXUP_ACT_PRE_PROBE
)
6425 snd_hda_codec_set_pin_target(codec
, 0x19, PIN_VREFHIZ
);
6429 static void alc294_gx502_toggle_output(struct hda_codec
*codec
,
6430 struct hda_jack_callback
*cb
)
6432 /* The Windows driver sets the codec up in a very different way where
6433 * it appears to leave 0x10 = 0x8a20 set. For Linux we need to toggle it
6435 if (snd_hda_jack_detect_state(codec
, 0x21) == HDA_JACK_PRESENT
)
6436 alc_write_coef_idx(codec
, 0x10, 0x8a20);
6438 alc_write_coef_idx(codec
, 0x10, 0x0a20);
6441 static void alc294_fixup_gx502_hp(struct hda_codec
*codec
,
6442 const struct hda_fixup
*fix
, int action
)
6444 /* Pin 0x21: headphones/headset mic */
6445 if (!is_jack_detectable(codec
, 0x21))
6449 case HDA_FIXUP_ACT_PRE_PROBE
:
6450 snd_hda_jack_detect_enable_callback(codec
, 0x21,
6451 alc294_gx502_toggle_output
);
6453 case HDA_FIXUP_ACT_INIT
:
6454 /* Make sure to start in a correct state, i.e. if
6455 * headphones have been plugged in before powering up the system
6457 alc294_gx502_toggle_output(codec
, NULL
);
6462 static void alc294_gu502_toggle_output(struct hda_codec
*codec
,
6463 struct hda_jack_callback
*cb
)
6465 /* Windows sets 0x10 to 0x8420 for Node 0x20 which is
6466 * responsible from changes between speakers and headphones
6468 if (snd_hda_jack_detect_state(codec
, 0x21) == HDA_JACK_PRESENT
)
6469 alc_write_coef_idx(codec
, 0x10, 0x8420);
6471 alc_write_coef_idx(codec
, 0x10, 0x0a20);
6474 static void alc294_fixup_gu502_hp(struct hda_codec
*codec
,
6475 const struct hda_fixup
*fix
, int action
)
6477 if (!is_jack_detectable(codec
, 0x21))
6481 case HDA_FIXUP_ACT_PRE_PROBE
:
6482 snd_hda_jack_detect_enable_callback(codec
, 0x21,
6483 alc294_gu502_toggle_output
);
6485 case HDA_FIXUP_ACT_INIT
:
6486 alc294_gu502_toggle_output(codec
, NULL
);
6491 static void alc285_fixup_hp_gpio_amp_init(struct hda_codec
*codec
,
6492 const struct hda_fixup
*fix
, int action
)
6494 if (action
!= HDA_FIXUP_ACT_INIT
)
6498 alc_write_coef_idx(codec
, 0x65, 0x0);
6501 static void alc274_fixup_hp_headset_mic(struct hda_codec
*codec
,
6502 const struct hda_fixup
*fix
, int action
)
6505 case HDA_FIXUP_ACT_INIT
:
6506 alc_combo_jack_hp_jd_restart(codec
);
6511 static void alc_fixup_no_int_mic(struct hda_codec
*codec
,
6512 const struct hda_fixup
*fix
, int action
)
6514 struct alc_spec
*spec
= codec
->spec
;
6517 case HDA_FIXUP_ACT_PRE_PROBE
:
6518 /* Mic RING SLEEVE swap for combo jack */
6519 alc_update_coef_idx(codec
, 0x45, 0xf<<12 | 1<<10, 5<<12);
6520 spec
->no_internal_mic_pin
= true;
6522 case HDA_FIXUP_ACT_INIT
:
6523 alc_combo_jack_hp_jd_restart(codec
);
6528 /* GPIO1 = amplifier on/off
6529 * GPIO3 = mic mute LED
6531 static void alc285_fixup_hp_spectre_x360_eb1(struct hda_codec
*codec
,
6532 const struct hda_fixup
*fix
, int action
)
6534 static const hda_nid_t conn
[] = { 0x02 };
6536 struct alc_spec
*spec
= codec
->spec
;
6537 static const struct hda_pintbl pincfgs
[] = {
6538 { 0x14, 0x90170110 }, /* front/high speakers */
6539 { 0x17, 0x90170130 }, /* back/bass speakers */
6543 //enable micmute led
6544 alc_fixup_hp_gpio_led(codec
, action
, 0x00, 0x04);
6547 case HDA_FIXUP_ACT_PRE_PROBE
:
6548 spec
->micmute_led_polarity
= 1;
6549 /* needed for amp of back speakers */
6550 spec
->gpio_mask
|= 0x01;
6551 spec
->gpio_dir
|= 0x01;
6552 snd_hda_apply_pincfgs(codec
, pincfgs
);
6553 /* share DAC to have unified volume control */
6554 snd_hda_override_conn_list(codec
, 0x14, ARRAY_SIZE(conn
), conn
);
6555 snd_hda_override_conn_list(codec
, 0x17, ARRAY_SIZE(conn
), conn
);
6557 case HDA_FIXUP_ACT_INIT
:
6558 /* need to toggle GPIO to enable the amp of back speakers */
6559 alc_update_gpio_data(codec
, 0x01, true);
6561 alc_update_gpio_data(codec
, 0x01, false);
6566 static void alc285_fixup_hp_spectre_x360(struct hda_codec
*codec
,
6567 const struct hda_fixup
*fix
, int action
)
6569 static const hda_nid_t conn
[] = { 0x02 };
6570 static const struct hda_pintbl pincfgs
[] = {
6571 { 0x14, 0x90170110 }, /* rear speaker */
6576 case HDA_FIXUP_ACT_PRE_PROBE
:
6577 snd_hda_apply_pincfgs(codec
, pincfgs
);
6578 /* force front speaker to DAC1 */
6579 snd_hda_override_conn_list(codec
, 0x17, ARRAY_SIZE(conn
), conn
);
6584 /* for hda_fixup_thinkpad_acpi() */
6585 #include "thinkpad_helper.c"
6587 static void alc_fixup_thinkpad_acpi(struct hda_codec
*codec
,
6588 const struct hda_fixup
*fix
, int action
)
6590 alc_fixup_no_shutup(codec
, fix
, action
); /* reduce click noise */
6591 hda_fixup_thinkpad_acpi(codec
, fix
, action
);
6594 /* Fixup for Lenovo Legion 15IMHg05 speaker output on headset removal. */
6595 static void alc287_fixup_legion_15imhg05_speakers(struct hda_codec
*codec
,
6596 const struct hda_fixup
*fix
,
6599 struct alc_spec
*spec
= codec
->spec
;
6602 case HDA_FIXUP_ACT_PRE_PROBE
:
6603 spec
->gen
.suppress_auto_mute
= 1;
6608 static int comp_bind(struct device
*dev
)
6610 struct hda_codec
*cdc
= dev_to_hda_codec(dev
);
6611 struct alc_spec
*spec
= cdc
->spec
;
6613 return component_bind_all(dev
, spec
->comps
);
6616 static void comp_unbind(struct device
*dev
)
6618 struct hda_codec
*cdc
= dev_to_hda_codec(dev
);
6619 struct alc_spec
*spec
= cdc
->spec
;
6621 component_unbind_all(dev
, spec
->comps
);
6624 static const struct component_master_ops comp_master_ops
= {
6626 .unbind
= comp_unbind
,
6629 static void comp_generic_playback_hook(struct hda_pcm_stream
*hinfo
, struct hda_codec
*cdc
,
6630 struct snd_pcm_substream
*sub
, int action
)
6632 struct alc_spec
*spec
= cdc
->spec
;
6635 for (i
= 0; i
< HDA_MAX_COMPONENTS
; i
++) {
6636 if (spec
->comps
[i
].dev
)
6637 spec
->comps
[i
].playback_hook(spec
->comps
[i
].dev
, action
);
6641 static void cs35l41_generic_fixup(struct hda_codec
*cdc
, int action
, const char *bus
,
6642 const char *hid
, int count
)
6644 struct device
*dev
= hda_codec_dev(cdc
);
6645 struct alc_spec
*spec
= cdc
->spec
;
6650 case HDA_FIXUP_ACT_PRE_PROBE
:
6651 for (i
= 0; i
< count
; i
++) {
6652 name
= devm_kasprintf(dev
, GFP_KERNEL
,
6653 "%s-%s:00-cs35l41-hda.%d", bus
, hid
, i
);
6656 component_match_add(dev
, &spec
->match
, component_compare_dev_name
, name
);
6658 ret
= component_master_add_with_match(dev
, &comp_master_ops
, spec
->match
);
6660 codec_err(cdc
, "Fail to register component aggregator %d\n", ret
);
6662 spec
->gen
.pcm_playback_hook
= comp_generic_playback_hook
;
6667 static void cs35l41_fixup_i2c_two(struct hda_codec
*cdc
, const struct hda_fixup
*fix
, int action
)
6669 cs35l41_generic_fixup(cdc
, action
, "i2c", "CSC3551", 2);
6672 static void cs35l41_fixup_spi_two(struct hda_codec
*codec
, const struct hda_fixup
*fix
, int action
)
6674 cs35l41_generic_fixup(codec
, action
, "spi0", "CSC3551", 2);
6677 static void cs35l41_fixup_spi_four(struct hda_codec
*codec
, const struct hda_fixup
*fix
, int action
)
6679 cs35l41_generic_fixup(codec
, action
, "spi0", "CSC3551", 4);
6682 static void alc287_fixup_legion_16achg6_speakers(struct hda_codec
*cdc
, const struct hda_fixup
*fix
,
6685 cs35l41_generic_fixup(cdc
, action
, "i2c", "CLSA0100", 2);
6688 /* for alc295_fixup_hp_top_speakers */
6689 #include "hp_x360_helper.c"
6691 /* for alc285_fixup_ideapad_s740_coef() */
6692 #include "ideapad_s740_helper.c"
6694 static const struct coef_fw alc256_fixup_set_coef_defaults_coefs
[] = {
6695 WRITE_COEF(0x10, 0x0020), WRITE_COEF(0x24, 0x0000),
6696 WRITE_COEF(0x26, 0x0000), WRITE_COEF(0x29, 0x3000),
6697 WRITE_COEF(0x37, 0xfe05), WRITE_COEF(0x45, 0x5089),
6701 static void alc256_fixup_set_coef_defaults(struct hda_codec
*codec
,
6702 const struct hda_fixup
*fix
,
6706 * A certain other OS sets these coeffs to different values. On at least
6707 * one TongFang barebone these settings might survive even a cold
6708 * reboot. So to restore a clean slate the values are explicitly reset
6709 * to default here. Without this, the external microphone is always in a
6710 * plugged-in state, while the internal microphone is always in an
6711 * unplugged state, breaking the ability to use the internal microphone.
6713 alc_process_coef_fw(codec
, alc256_fixup_set_coef_defaults_coefs
);
6716 static const struct coef_fw alc233_fixup_no_audio_jack_coefs
[] = {
6717 WRITE_COEF(0x1a, 0x9003), WRITE_COEF(0x1b, 0x0e2b), WRITE_COEF(0x37, 0xfe06),
6718 WRITE_COEF(0x38, 0x4981), WRITE_COEF(0x45, 0xd489), WRITE_COEF(0x46, 0x0074),
6719 WRITE_COEF(0x49, 0x0149),
6723 static void alc233_fixup_no_audio_jack(struct hda_codec
*codec
,
6724 const struct hda_fixup
*fix
,
6728 * The audio jack input and output is not detected on the ASRock NUC Box
6729 * 1100 series when cold booting without this fix. Warm rebooting from a
6730 * certain other OS makes the audio functional, as COEF settings are
6731 * preserved in this case. This fix sets these altered COEF values as
6734 alc_process_coef_fw(codec
, alc233_fixup_no_audio_jack_coefs
);
6737 static void alc256_fixup_mic_no_presence_and_resume(struct hda_codec
*codec
,
6738 const struct hda_fixup
*fix
,
6742 * The Clevo NJ51CU comes either with the ALC293 or the ALC256 codec,
6743 * but uses the 0x8686 subproduct id in both cases. The ALC256 codec
6744 * needs an additional quirk for sound working after suspend and resume.
6746 if (codec
->core
.vendor_id
== 0x10ec0256) {
6747 alc_update_coef_idx(codec
, 0x10, 1<<9, 0);
6748 snd_hda_codec_set_pincfg(codec
, 0x19, 0x04a11120);
6750 snd_hda_codec_set_pincfg(codec
, 0x1a, 0x04a1113c);
6754 static void alc_fixup_dell4_mic_no_presence_quiet(struct hda_codec
*codec
,
6755 const struct hda_fixup
*fix
,
6758 struct alc_spec
*spec
= codec
->spec
;
6759 struct hda_input_mux
*imux
= &spec
->gen
.input_mux
;
6762 alc269_fixup_limit_int_mic_boost(codec
, fix
, action
);
6765 case HDA_FIXUP_ACT_PRE_PROBE
:
6767 * Set the vref of pin 0x19 (Headset Mic) and pin 0x1b (Headphone Mic)
6768 * to Hi-Z to avoid pop noises at startup and when plugging and
6769 * unplugging headphones.
6771 snd_hda_codec_set_pin_target(codec
, 0x19, PIN_VREFHIZ
);
6772 snd_hda_codec_set_pin_target(codec
, 0x1b, PIN_VREFHIZ
);
6774 case HDA_FIXUP_ACT_PROBE
:
6776 * Make the internal mic (0x12) the default input source to
6777 * prevent pop noises on cold boot.
6779 for (i
= 0; i
< imux
->num_items
; i
++) {
6780 if (spec
->gen
.imux_pins
[i
] == 0x12) {
6781 spec
->gen
.cur_mux
[0] = i
;
6791 ALC269_FIXUP_SONY_VAIO
,
6792 ALC275_FIXUP_SONY_VAIO_GPIO2
,
6793 ALC269_FIXUP_DELL_M101Z
,
6794 ALC269_FIXUP_SKU_IGNORE
,
6795 ALC269_FIXUP_ASUS_G73JW
,
6796 ALC269_FIXUP_LENOVO_EAPD
,
6797 ALC275_FIXUP_SONY_HWEQ
,
6798 ALC275_FIXUP_SONY_DISABLE_AAMIX
,
6800 ALC269_FIXUP_PCM_44K
,
6801 ALC269_FIXUP_STEREO_DMIC
,
6802 ALC269_FIXUP_HEADSET_MIC
,
6803 ALC269_FIXUP_QUANTA_MUTE
,
6804 ALC269_FIXUP_LIFEBOOK
,
6805 ALC269_FIXUP_LIFEBOOK_EXTMIC
,
6806 ALC269_FIXUP_LIFEBOOK_HP_PIN
,
6807 ALC269_FIXUP_LIFEBOOK_NO_HP_TO_LINEOUT
,
6808 ALC255_FIXUP_LIFEBOOK_U7x7_HEADSET_MIC
,
6811 ALC269VB_FIXUP_AMIC
,
6812 ALC269VB_FIXUP_DMIC
,
6813 ALC269_FIXUP_HP_MUTE_LED
,
6814 ALC269_FIXUP_HP_MUTE_LED_MIC1
,
6815 ALC269_FIXUP_HP_MUTE_LED_MIC2
,
6816 ALC269_FIXUP_HP_MUTE_LED_MIC3
,
6817 ALC269_FIXUP_HP_GPIO_LED
,
6818 ALC269_FIXUP_HP_GPIO_MIC1_LED
,
6819 ALC269_FIXUP_HP_LINE1_MIC1_LED
,
6820 ALC269_FIXUP_INV_DMIC
,
6821 ALC269_FIXUP_LENOVO_DOCK
,
6822 ALC269_FIXUP_LENOVO_DOCK_LIMIT_BOOST
,
6823 ALC269_FIXUP_NO_SHUTUP
,
6824 ALC286_FIXUP_SONY_MIC_NO_PRESENCE
,
6825 ALC269_FIXUP_PINCFG_NO_HP_TO_LINEOUT
,
6826 ALC269_FIXUP_DELL1_MIC_NO_PRESENCE
,
6827 ALC269_FIXUP_DELL2_MIC_NO_PRESENCE
,
6828 ALC269_FIXUP_DELL3_MIC_NO_PRESENCE
,
6829 ALC269_FIXUP_DELL4_MIC_NO_PRESENCE
,
6830 ALC269_FIXUP_DELL4_MIC_NO_PRESENCE_QUIET
,
6831 ALC269_FIXUP_HEADSET_MODE
,
6832 ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC
,
6833 ALC269_FIXUP_ASPIRE_HEADSET_MIC
,
6834 ALC269_FIXUP_ASUS_X101_FUNC
,
6835 ALC269_FIXUP_ASUS_X101_VERB
,
6836 ALC269_FIXUP_ASUS_X101
,
6837 ALC271_FIXUP_AMIC_MIC2
,
6838 ALC271_FIXUP_HP_GATE_MIC_JACK
,
6839 ALC271_FIXUP_HP_GATE_MIC_JACK_E1_572
,
6840 ALC269_FIXUP_ACER_AC700
,
6841 ALC269_FIXUP_LIMIT_INT_MIC_BOOST
,
6842 ALC269VB_FIXUP_ASUS_ZENBOOK
,
6843 ALC269VB_FIXUP_ASUS_ZENBOOK_UX31A
,
6844 ALC269_FIXUP_LIMIT_INT_MIC_BOOST_MUTE_LED
,
6845 ALC269VB_FIXUP_ORDISSIMO_EVE2
,
6846 ALC283_FIXUP_CHROME_BOOK
,
6847 ALC283_FIXUP_SENSE_COMBO_JACK
,
6848 ALC282_FIXUP_ASUS_TX300
,
6849 ALC283_FIXUP_INT_MIC
,
6850 ALC290_FIXUP_MONO_SPEAKERS
,
6851 ALC290_FIXUP_MONO_SPEAKERS_HSJACK
,
6852 ALC290_FIXUP_SUBWOOFER
,
6853 ALC290_FIXUP_SUBWOOFER_HSJACK
,
6854 ALC269_FIXUP_THINKPAD_ACPI
,
6855 ALC269_FIXUP_DMIC_THINKPAD_ACPI
,
6856 ALC255_FIXUP_ACER_MIC_NO_PRESENCE
,
6857 ALC255_FIXUP_ASUS_MIC_NO_PRESENCE
,
6858 ALC255_FIXUP_DELL1_MIC_NO_PRESENCE
,
6859 ALC255_FIXUP_DELL2_MIC_NO_PRESENCE
,
6860 ALC255_FIXUP_HEADSET_MODE
,
6861 ALC255_FIXUP_HEADSET_MODE_NO_HP_MIC
,
6862 ALC293_FIXUP_DELL1_MIC_NO_PRESENCE
,
6863 ALC292_FIXUP_TPT440_DOCK
,
6864 ALC292_FIXUP_TPT440
,
6865 ALC283_FIXUP_HEADSET_MIC
,
6866 ALC255_FIXUP_MIC_MUTE_LED
,
6867 ALC282_FIXUP_ASPIRE_V5_PINS
,
6868 ALC269VB_FIXUP_ASPIRE_E1_COEF
,
6869 ALC280_FIXUP_HP_GPIO4
,
6870 ALC286_FIXUP_HP_GPIO_LED
,
6871 ALC280_FIXUP_HP_GPIO2_MIC_HOTKEY
,
6872 ALC280_FIXUP_HP_DOCK_PINS
,
6873 ALC269_FIXUP_HP_DOCK_GPIO_MIC1_LED
,
6874 ALC280_FIXUP_HP_9480M
,
6875 ALC245_FIXUP_HP_X360_AMP
,
6876 ALC285_FIXUP_HP_SPECTRE_X360_EB1
,
6877 ALC288_FIXUP_DELL_HEADSET_MODE
,
6878 ALC288_FIXUP_DELL1_MIC_NO_PRESENCE
,
6879 ALC288_FIXUP_DELL_XPS_13
,
6880 ALC288_FIXUP_DISABLE_AAMIX
,
6881 ALC292_FIXUP_DELL_E7X_AAMIX
,
6882 ALC292_FIXUP_DELL_E7X
,
6883 ALC292_FIXUP_DISABLE_AAMIX
,
6884 ALC293_FIXUP_DISABLE_AAMIX_MULTIJACK
,
6885 ALC298_FIXUP_ALIENWARE_MIC_NO_PRESENCE
,
6886 ALC298_FIXUP_DELL1_MIC_NO_PRESENCE
,
6887 ALC298_FIXUP_DELL_AIO_MIC_NO_PRESENCE
,
6888 ALC275_FIXUP_DELL_XPS
,
6889 ALC293_FIXUP_LENOVO_SPK_NOISE
,
6890 ALC233_FIXUP_LENOVO_LINE2_MIC_HOTKEY
,
6891 ALC255_FIXUP_DELL_SPK_NOISE
,
6892 ALC225_FIXUP_DISABLE_MIC_VREF
,
6893 ALC225_FIXUP_DELL1_MIC_NO_PRESENCE
,
6894 ALC295_FIXUP_DISABLE_DAC3
,
6895 ALC285_FIXUP_SPEAKER2_TO_DAC1
,
6896 ALC280_FIXUP_HP_HEADSET_MIC
,
6897 ALC221_FIXUP_HP_FRONT_MIC
,
6898 ALC292_FIXUP_TPT460
,
6899 ALC298_FIXUP_SPK_VOLUME
,
6900 ALC298_FIXUP_LENOVO_SPK_VOLUME
,
6901 ALC256_FIXUP_DELL_INSPIRON_7559_SUBWOOFER
,
6902 ALC269_FIXUP_ATIV_BOOK_8
,
6903 ALC221_FIXUP_HP_MIC_NO_PRESENCE
,
6904 ALC256_FIXUP_ASUS_HEADSET_MODE
,
6905 ALC256_FIXUP_ASUS_MIC
,
6906 ALC256_FIXUP_ASUS_AIO_GPIO2
,
6907 ALC233_FIXUP_ASUS_MIC_NO_PRESENCE
,
6908 ALC233_FIXUP_EAPD_COEF_AND_MIC_NO_PRESENCE
,
6909 ALC233_FIXUP_LENOVO_MULTI_CODECS
,
6910 ALC233_FIXUP_ACER_HEADSET_MIC
,
6911 ALC294_FIXUP_LENOVO_MIC_LOCATION
,
6912 ALC225_FIXUP_DELL_WYSE_MIC_NO_PRESENCE
,
6913 ALC225_FIXUP_S3_POP_NOISE
,
6914 ALC700_FIXUP_INTEL_REFERENCE
,
6915 ALC274_FIXUP_DELL_BIND_DACS
,
6916 ALC274_FIXUP_DELL_AIO_LINEOUT_VERB
,
6917 ALC298_FIXUP_TPT470_DOCK_FIX
,
6918 ALC298_FIXUP_TPT470_DOCK
,
6919 ALC255_FIXUP_DUMMY_LINEOUT_VERB
,
6920 ALC255_FIXUP_DELL_HEADSET_MIC
,
6921 ALC256_FIXUP_HUAWEI_MACH_WX9_PINS
,
6922 ALC298_FIXUP_HUAWEI_MBX_STEREO
,
6923 ALC295_FIXUP_HP_X360
,
6924 ALC221_FIXUP_HP_HEADSET_MIC
,
6925 ALC285_FIXUP_LENOVO_HEADPHONE_NOISE
,
6926 ALC295_FIXUP_HP_AUTO_MUTE
,
6927 ALC286_FIXUP_ACER_AIO_MIC_NO_PRESENCE
,
6928 ALC294_FIXUP_ASUS_MIC
,
6929 ALC294_FIXUP_ASUS_HEADSET_MIC
,
6930 ALC294_FIXUP_ASUS_SPK
,
6931 ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
,
6932 ALC285_FIXUP_LENOVO_PC_BEEP_IN_NOISE
,
6933 ALC255_FIXUP_ACER_HEADSET_MIC
,
6934 ALC295_FIXUP_CHROME_BOOK
,
6935 ALC225_FIXUP_HEADSET_JACK
,
6936 ALC225_FIXUP_DELL_WYSE_AIO_MIC_NO_PRESENCE
,
6937 ALC225_FIXUP_WYSE_AUTO_MUTE
,
6938 ALC225_FIXUP_WYSE_DISABLE_MIC_VREF
,
6939 ALC286_FIXUP_ACER_AIO_HEADSET_MIC
,
6940 ALC256_FIXUP_ASUS_HEADSET_MIC
,
6941 ALC256_FIXUP_ASUS_MIC_NO_PRESENCE
,
6942 ALC299_FIXUP_PREDATOR_SPK
,
6943 ALC256_FIXUP_MEDION_HEADSET_NO_PRESENCE
,
6944 ALC289_FIXUP_DELL_SPK2
,
6945 ALC289_FIXUP_DUAL_SPK
,
6946 ALC294_FIXUP_SPK2_TO_DAC1
,
6947 ALC294_FIXUP_ASUS_DUAL_SPK
,
6948 ALC285_FIXUP_THINKPAD_X1_GEN7
,
6949 ALC285_FIXUP_THINKPAD_HEADSET_JACK
,
6950 ALC294_FIXUP_ASUS_HPE
,
6951 ALC294_FIXUP_ASUS_COEF_1B
,
6952 ALC294_FIXUP_ASUS_GX502_HP
,
6953 ALC294_FIXUP_ASUS_GX502_PINS
,
6954 ALC294_FIXUP_ASUS_GX502_VERBS
,
6955 ALC294_FIXUP_ASUS_GU502_HP
,
6956 ALC294_FIXUP_ASUS_GU502_PINS
,
6957 ALC294_FIXUP_ASUS_GU502_VERBS
,
6958 ALC285_FIXUP_HP_GPIO_LED
,
6959 ALC285_FIXUP_HP_MUTE_LED
,
6960 ALC236_FIXUP_HP_GPIO_LED
,
6961 ALC236_FIXUP_HP_MUTE_LED
,
6962 ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF
,
6963 ALC298_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET
,
6964 ALC256_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET
,
6965 ALC295_FIXUP_ASUS_MIC_NO_PRESENCE
,
6966 ALC269VC_FIXUP_ACER_VCOPPERBOX_PINS
,
6967 ALC269VC_FIXUP_ACER_HEADSET_MIC
,
6968 ALC269VC_FIXUP_ACER_MIC_NO_PRESENCE
,
6969 ALC289_FIXUP_ASUS_GA401
,
6970 ALC289_FIXUP_ASUS_GA502
,
6971 ALC256_FIXUP_ACER_MIC_NO_PRESENCE
,
6972 ALC285_FIXUP_HP_GPIO_AMP_INIT
,
6973 ALC269_FIXUP_CZC_B20
,
6974 ALC269_FIXUP_CZC_TMI
,
6975 ALC269_FIXUP_CZC_L101
,
6976 ALC269_FIXUP_LEMOTE_A1802
,
6977 ALC269_FIXUP_LEMOTE_A190X
,
6978 ALC256_FIXUP_INTEL_NUC8_RUGGED
,
6979 ALC233_FIXUP_INTEL_NUC8_DMIC
,
6980 ALC233_FIXUP_INTEL_NUC8_BOOST
,
6981 ALC256_FIXUP_INTEL_NUC10
,
6982 ALC255_FIXUP_XIAOMI_HEADSET_MIC
,
6983 ALC274_FIXUP_HP_MIC
,
6984 ALC274_FIXUP_HP_HEADSET_MIC
,
6985 ALC274_FIXUP_HP_ENVY_GPIO
,
6986 ALC256_FIXUP_ASUS_HPE
,
6987 ALC285_FIXUP_THINKPAD_NO_BASS_SPK_HEADSET_JACK
,
6988 ALC287_FIXUP_HP_GPIO_LED
,
6989 ALC256_FIXUP_HP_HEADSET_MIC
,
6990 ALC245_FIXUP_HP_GPIO_LED
,
6991 ALC236_FIXUP_DELL_AIO_HEADSET_MIC
,
6992 ALC282_FIXUP_ACER_DISABLE_LINEOUT
,
6993 ALC255_FIXUP_ACER_LIMIT_INT_MIC_BOOST
,
6994 ALC256_FIXUP_ACER_HEADSET_MIC
,
6995 ALC285_FIXUP_IDEAPAD_S740_COEF
,
6996 ALC285_FIXUP_HP_LIMIT_INT_MIC_BOOST
,
6997 ALC295_FIXUP_ASUS_DACS
,
6998 ALC295_FIXUP_HP_OMEN
,
6999 ALC285_FIXUP_HP_SPECTRE_X360
,
7000 ALC287_FIXUP_IDEAPAD_BASS_SPK_AMP
,
7001 ALC623_FIXUP_LENOVO_THINKSTATION_P340
,
7002 ALC255_FIXUP_ACER_HEADPHONE_AND_MIC
,
7003 ALC236_FIXUP_HP_LIMIT_INT_MIC_BOOST
,
7004 ALC287_FIXUP_LEGION_15IMHG05_SPEAKERS
,
7005 ALC287_FIXUP_LEGION_15IMHG05_AUTOMUTE
,
7006 ALC287_FIXUP_YOGA7_14ITL_SPEAKERS
,
7007 ALC287_FIXUP_13S_GEN2_SPEAKERS
,
7008 ALC256_FIXUP_SET_COEF_DEFAULTS
,
7009 ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE
,
7010 ALC233_FIXUP_NO_AUDIO_JACK
,
7011 ALC256_FIXUP_MIC_NO_PRESENCE_AND_RESUME
,
7012 ALC285_FIXUP_LEGION_Y9000X_SPEAKERS
,
7013 ALC285_FIXUP_LEGION_Y9000X_AUTOMUTE
,
7014 ALC287_FIXUP_LEGION_16ACHG6
,
7015 ALC287_FIXUP_CS35L41_I2C_2
,
7016 ALC287_FIXUP_CS35L41_I2C_2_HP_GPIO_LED
,
7017 ALC245_FIXUP_CS35L41_SPI_2
,
7018 ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED
,
7019 ALC245_FIXUP_CS35L41_SPI_4
,
7020 ALC245_FIXUP_CS35L41_SPI_4_HP_GPIO_LED
,
7021 ALC285_FIXUP_HP_SPEAKERS_MICMUTE_LED
,
7022 ALC295_FIXUP_FRAMEWORK_LAPTOP_MIC_NO_PRESENCE
,
7025 static const struct hda_fixup alc269_fixups
[] = {
7026 [ALC269_FIXUP_GPIO2
] = {
7027 .type
= HDA_FIXUP_FUNC
,
7028 .v
.func
= alc_fixup_gpio2
,
7030 [ALC269_FIXUP_SONY_VAIO
] = {
7031 .type
= HDA_FIXUP_PINCTLS
,
7032 .v
.pins
= (const struct hda_pintbl
[]) {
7033 {0x19, PIN_VREFGRD
},
7037 [ALC275_FIXUP_SONY_VAIO_GPIO2
] = {
7038 .type
= HDA_FIXUP_FUNC
,
7039 .v
.func
= alc275_fixup_gpio4_off
,
7041 .chain_id
= ALC269_FIXUP_SONY_VAIO
7043 [ALC269_FIXUP_DELL_M101Z
] = {
7044 .type
= HDA_FIXUP_VERBS
,
7045 .v
.verbs
= (const struct hda_verb
[]) {
7046 /* Enables internal speaker */
7047 {0x20, AC_VERB_SET_COEF_INDEX
, 13},
7048 {0x20, AC_VERB_SET_PROC_COEF
, 0x4040},
7052 [ALC269_FIXUP_SKU_IGNORE
] = {
7053 .type
= HDA_FIXUP_FUNC
,
7054 .v
.func
= alc_fixup_sku_ignore
,
7056 [ALC269_FIXUP_ASUS_G73JW
] = {
7057 .type
= HDA_FIXUP_PINS
,
7058 .v
.pins
= (const struct hda_pintbl
[]) {
7059 { 0x17, 0x99130111 }, /* subwoofer */
7063 [ALC269_FIXUP_LENOVO_EAPD
] = {
7064 .type
= HDA_FIXUP_VERBS
,
7065 .v
.verbs
= (const struct hda_verb
[]) {
7066 {0x14, AC_VERB_SET_EAPD_BTLENABLE
, 0},
7070 [ALC275_FIXUP_SONY_HWEQ
] = {
7071 .type
= HDA_FIXUP_FUNC
,
7072 .v
.func
= alc269_fixup_hweq
,
7074 .chain_id
= ALC275_FIXUP_SONY_VAIO_GPIO2
7076 [ALC275_FIXUP_SONY_DISABLE_AAMIX
] = {
7077 .type
= HDA_FIXUP_FUNC
,
7078 .v
.func
= alc_fixup_disable_aamix
,
7080 .chain_id
= ALC269_FIXUP_SONY_VAIO
7082 [ALC271_FIXUP_DMIC
] = {
7083 .type
= HDA_FIXUP_FUNC
,
7084 .v
.func
= alc271_fixup_dmic
,
7086 [ALC269_FIXUP_PCM_44K
] = {
7087 .type
= HDA_FIXUP_FUNC
,
7088 .v
.func
= alc269_fixup_pcm_44k
,
7090 .chain_id
= ALC269_FIXUP_QUANTA_MUTE
7092 [ALC269_FIXUP_STEREO_DMIC
] = {
7093 .type
= HDA_FIXUP_FUNC
,
7094 .v
.func
= alc269_fixup_stereo_dmic
,
7096 [ALC269_FIXUP_HEADSET_MIC
] = {
7097 .type
= HDA_FIXUP_FUNC
,
7098 .v
.func
= alc269_fixup_headset_mic
,
7100 [ALC269_FIXUP_QUANTA_MUTE
] = {
7101 .type
= HDA_FIXUP_FUNC
,
7102 .v
.func
= alc269_fixup_quanta_mute
,
7104 [ALC269_FIXUP_LIFEBOOK
] = {
7105 .type
= HDA_FIXUP_PINS
,
7106 .v
.pins
= (const struct hda_pintbl
[]) {
7107 { 0x1a, 0x2101103f }, /* dock line-out */
7108 { 0x1b, 0x23a11040 }, /* dock mic-in */
7112 .chain_id
= ALC269_FIXUP_QUANTA_MUTE
7114 [ALC269_FIXUP_LIFEBOOK_EXTMIC
] = {
7115 .type
= HDA_FIXUP_PINS
,
7116 .v
.pins
= (const struct hda_pintbl
[]) {
7117 { 0x19, 0x01a1903c }, /* headset mic, with jack detect */
7121 [ALC269_FIXUP_LIFEBOOK_HP_PIN
] = {
7122 .type
= HDA_FIXUP_PINS
,
7123 .v
.pins
= (const struct hda_pintbl
[]) {
7124 { 0x21, 0x0221102f }, /* HP out */
7128 [ALC269_FIXUP_LIFEBOOK_NO_HP_TO_LINEOUT
] = {
7129 .type
= HDA_FIXUP_FUNC
,
7130 .v
.func
= alc269_fixup_pincfg_no_hp_to_lineout
,
7132 [ALC255_FIXUP_LIFEBOOK_U7x7_HEADSET_MIC
] = {
7133 .type
= HDA_FIXUP_FUNC
,
7134 .v
.func
= alc269_fixup_pincfg_U7x7_headset_mic
,
7136 [ALC269_FIXUP_AMIC
] = {
7137 .type
= HDA_FIXUP_PINS
,
7138 .v
.pins
= (const struct hda_pintbl
[]) {
7139 { 0x14, 0x99130110 }, /* speaker */
7140 { 0x15, 0x0121401f }, /* HP out */
7141 { 0x18, 0x01a19c20 }, /* mic */
7142 { 0x19, 0x99a3092f }, /* int-mic */
7146 [ALC269_FIXUP_DMIC
] = {
7147 .type
= HDA_FIXUP_PINS
,
7148 .v
.pins
= (const struct hda_pintbl
[]) {
7149 { 0x12, 0x99a3092f }, /* int-mic */
7150 { 0x14, 0x99130110 }, /* speaker */
7151 { 0x15, 0x0121401f }, /* HP out */
7152 { 0x18, 0x01a19c20 }, /* mic */
7156 [ALC269VB_FIXUP_AMIC
] = {
7157 .type
= HDA_FIXUP_PINS
,
7158 .v
.pins
= (const struct hda_pintbl
[]) {
7159 { 0x14, 0x99130110 }, /* speaker */
7160 { 0x18, 0x01a19c20 }, /* mic */
7161 { 0x19, 0x99a3092f }, /* int-mic */
7162 { 0x21, 0x0121401f }, /* HP out */
7166 [ALC269VB_FIXUP_DMIC
] = {
7167 .type
= HDA_FIXUP_PINS
,
7168 .v
.pins
= (const struct hda_pintbl
[]) {
7169 { 0x12, 0x99a3092f }, /* int-mic */
7170 { 0x14, 0x99130110 }, /* speaker */
7171 { 0x18, 0x01a19c20 }, /* mic */
7172 { 0x21, 0x0121401f }, /* HP out */
7176 [ALC269_FIXUP_HP_MUTE_LED
] = {
7177 .type
= HDA_FIXUP_FUNC
,
7178 .v
.func
= alc269_fixup_hp_mute_led
,
7180 [ALC269_FIXUP_HP_MUTE_LED_MIC1
] = {
7181 .type
= HDA_FIXUP_FUNC
,
7182 .v
.func
= alc269_fixup_hp_mute_led_mic1
,
7184 [ALC269_FIXUP_HP_MUTE_LED_MIC2
] = {
7185 .type
= HDA_FIXUP_FUNC
,
7186 .v
.func
= alc269_fixup_hp_mute_led_mic2
,
7188 [ALC269_FIXUP_HP_MUTE_LED_MIC3
] = {
7189 .type
= HDA_FIXUP_FUNC
,
7190 .v
.func
= alc269_fixup_hp_mute_led_mic3
,
7192 .chain_id
= ALC295_FIXUP_HP_AUTO_MUTE
7194 [ALC269_FIXUP_HP_GPIO_LED
] = {
7195 .type
= HDA_FIXUP_FUNC
,
7196 .v
.func
= alc269_fixup_hp_gpio_led
,
7198 [ALC269_FIXUP_HP_GPIO_MIC1_LED
] = {
7199 .type
= HDA_FIXUP_FUNC
,
7200 .v
.func
= alc269_fixup_hp_gpio_mic1_led
,
7202 [ALC269_FIXUP_HP_LINE1_MIC1_LED
] = {
7203 .type
= HDA_FIXUP_FUNC
,
7204 .v
.func
= alc269_fixup_hp_line1_mic1_led
,
7206 [ALC269_FIXUP_INV_DMIC
] = {
7207 .type
= HDA_FIXUP_FUNC
,
7208 .v
.func
= alc_fixup_inv_dmic
,
7210 [ALC269_FIXUP_NO_SHUTUP
] = {
7211 .type
= HDA_FIXUP_FUNC
,
7212 .v
.func
= alc_fixup_no_shutup
,
7214 [ALC269_FIXUP_LENOVO_DOCK
] = {
7215 .type
= HDA_FIXUP_PINS
,
7216 .v
.pins
= (const struct hda_pintbl
[]) {
7217 { 0x19, 0x23a11040 }, /* dock mic */
7218 { 0x1b, 0x2121103f }, /* dock headphone */
7222 .chain_id
= ALC269_FIXUP_PINCFG_NO_HP_TO_LINEOUT
7224 [ALC269_FIXUP_LENOVO_DOCK_LIMIT_BOOST
] = {
7225 .type
= HDA_FIXUP_FUNC
,
7226 .v
.func
= alc269_fixup_limit_int_mic_boost
,
7228 .chain_id
= ALC269_FIXUP_LENOVO_DOCK
,
7230 [ALC269_FIXUP_PINCFG_NO_HP_TO_LINEOUT
] = {
7231 .type
= HDA_FIXUP_FUNC
,
7232 .v
.func
= alc269_fixup_pincfg_no_hp_to_lineout
,
7234 .chain_id
= ALC269_FIXUP_THINKPAD_ACPI
,
7236 [ALC269_FIXUP_DELL1_MIC_NO_PRESENCE
] = {
7237 .type
= HDA_FIXUP_PINS
,
7238 .v
.pins
= (const struct hda_pintbl
[]) {
7239 { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */
7240 { 0x1a, 0x01a1913d }, /* use as headphone mic, without its own jack detect */
7244 .chain_id
= ALC269_FIXUP_HEADSET_MODE
7246 [ALC269_FIXUP_DELL2_MIC_NO_PRESENCE
] = {
7247 .type
= HDA_FIXUP_PINS
,
7248 .v
.pins
= (const struct hda_pintbl
[]) {
7249 { 0x16, 0x21014020 }, /* dock line out */
7250 { 0x19, 0x21a19030 }, /* dock mic */
7251 { 0x1a, 0x01a1913c }, /* use as headset mic, without its own jack detect */
7255 .chain_id
= ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC
7257 [ALC269_FIXUP_DELL3_MIC_NO_PRESENCE
] = {
7258 .type
= HDA_FIXUP_PINS
,
7259 .v
.pins
= (const struct hda_pintbl
[]) {
7260 { 0x1a, 0x01a1913c }, /* use as headset mic, without its own jack detect */
7264 .chain_id
= ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC
7266 [ALC269_FIXUP_DELL4_MIC_NO_PRESENCE
] = {
7267 .type
= HDA_FIXUP_PINS
,
7268 .v
.pins
= (const struct hda_pintbl
[]) {
7269 { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */
7270 { 0x1b, 0x01a1913d }, /* use as headphone mic, without its own jack detect */
7274 .chain_id
= ALC269_FIXUP_HEADSET_MODE
7276 [ALC269_FIXUP_HEADSET_MODE
] = {
7277 .type
= HDA_FIXUP_FUNC
,
7278 .v
.func
= alc_fixup_headset_mode
,
7280 .chain_id
= ALC255_FIXUP_MIC_MUTE_LED
7282 [ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC
] = {
7283 .type
= HDA_FIXUP_FUNC
,
7284 .v
.func
= alc_fixup_headset_mode_no_hp_mic
,
7286 [ALC269_FIXUP_ASPIRE_HEADSET_MIC
] = {
7287 .type
= HDA_FIXUP_PINS
,
7288 .v
.pins
= (const struct hda_pintbl
[]) {
7289 { 0x19, 0x01a1913c }, /* headset mic w/o jack detect */
7293 .chain_id
= ALC269_FIXUP_HEADSET_MODE
,
7295 [ALC286_FIXUP_SONY_MIC_NO_PRESENCE
] = {
7296 .type
= HDA_FIXUP_PINS
,
7297 .v
.pins
= (const struct hda_pintbl
[]) {
7298 { 0x18, 0x01a1913c }, /* use as headset mic, without its own jack detect */
7302 .chain_id
= ALC269_FIXUP_HEADSET_MIC
7304 [ALC256_FIXUP_HUAWEI_MACH_WX9_PINS
] = {
7305 .type
= HDA_FIXUP_PINS
,
7306 .v
.pins
= (const struct hda_pintbl
[]) {
7320 .chain_id
= ALC255_FIXUP_MIC_MUTE_LED
7322 [ALC298_FIXUP_HUAWEI_MBX_STEREO
] = {
7323 .type
= HDA_FIXUP_FUNC
,
7324 .v
.func
= alc298_fixup_huawei_mbx_stereo
,
7326 .chain_id
= ALC255_FIXUP_MIC_MUTE_LED
7328 [ALC269_FIXUP_ASUS_X101_FUNC
] = {
7329 .type
= HDA_FIXUP_FUNC
,
7330 .v
.func
= alc269_fixup_x101_headset_mic
,
7332 [ALC269_FIXUP_ASUS_X101_VERB
] = {
7333 .type
= HDA_FIXUP_VERBS
,
7334 .v
.verbs
= (const struct hda_verb
[]) {
7335 {0x18, AC_VERB_SET_PIN_WIDGET_CONTROL
, 0},
7336 {0x20, AC_VERB_SET_COEF_INDEX
, 0x08},
7337 {0x20, AC_VERB_SET_PROC_COEF
, 0x0310},
7341 .chain_id
= ALC269_FIXUP_ASUS_X101_FUNC
7343 [ALC269_FIXUP_ASUS_X101
] = {
7344 .type
= HDA_FIXUP_PINS
,
7345 .v
.pins
= (const struct hda_pintbl
[]) {
7346 { 0x18, 0x04a1182c }, /* Headset mic */
7350 .chain_id
= ALC269_FIXUP_ASUS_X101_VERB
7352 [ALC271_FIXUP_AMIC_MIC2
] = {
7353 .type
= HDA_FIXUP_PINS
,
7354 .v
.pins
= (const struct hda_pintbl
[]) {
7355 { 0x14, 0x99130110 }, /* speaker */
7356 { 0x19, 0x01a19c20 }, /* mic */
7357 { 0x1b, 0x99a7012f }, /* int-mic */
7358 { 0x21, 0x0121401f }, /* HP out */
7362 [ALC271_FIXUP_HP_GATE_MIC_JACK
] = {
7363 .type
= HDA_FIXUP_FUNC
,
7364 .v
.func
= alc271_hp_gate_mic_jack
,
7366 .chain_id
= ALC271_FIXUP_AMIC_MIC2
,
7368 [ALC271_FIXUP_HP_GATE_MIC_JACK_E1_572
] = {
7369 .type
= HDA_FIXUP_FUNC
,
7370 .v
.func
= alc269_fixup_limit_int_mic_boost
,
7372 .chain_id
= ALC271_FIXUP_HP_GATE_MIC_JACK
,
7374 [ALC269_FIXUP_ACER_AC700
] = {
7375 .type
= HDA_FIXUP_PINS
,
7376 .v
.pins
= (const struct hda_pintbl
[]) {
7377 { 0x12, 0x99a3092f }, /* int-mic */
7378 { 0x14, 0x99130110 }, /* speaker */
7379 { 0x18, 0x03a11c20 }, /* mic */
7380 { 0x1e, 0x0346101e }, /* SPDIF1 */
7381 { 0x21, 0x0321101f }, /* HP out */
7385 .chain_id
= ALC271_FIXUP_DMIC
,
7387 [ALC269_FIXUP_LIMIT_INT_MIC_BOOST
] = {
7388 .type
= HDA_FIXUP_FUNC
,
7389 .v
.func
= alc269_fixup_limit_int_mic_boost
,
7391 .chain_id
= ALC269_FIXUP_THINKPAD_ACPI
,
7393 [ALC269VB_FIXUP_ASUS_ZENBOOK
] = {
7394 .type
= HDA_FIXUP_FUNC
,
7395 .v
.func
= alc269_fixup_limit_int_mic_boost
,
7397 .chain_id
= ALC269VB_FIXUP_DMIC
,
7399 [ALC269VB_FIXUP_ASUS_ZENBOOK_UX31A
] = {
7400 .type
= HDA_FIXUP_VERBS
,
7401 .v
.verbs
= (const struct hda_verb
[]) {
7402 /* class-D output amp +5dB */
7403 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x12 },
7404 { 0x20, AC_VERB_SET_PROC_COEF
, 0x2800 },
7408 .chain_id
= ALC269VB_FIXUP_ASUS_ZENBOOK
,
7410 [ALC269_FIXUP_LIMIT_INT_MIC_BOOST_MUTE_LED
] = {
7411 .type
= HDA_FIXUP_FUNC
,
7412 .v
.func
= alc269_fixup_limit_int_mic_boost
,
7414 .chain_id
= ALC269_FIXUP_HP_MUTE_LED_MIC1
,
7416 [ALC269VB_FIXUP_ORDISSIMO_EVE2
] = {
7417 .type
= HDA_FIXUP_PINS
,
7418 .v
.pins
= (const struct hda_pintbl
[]) {
7419 { 0x12, 0x99a3092f }, /* int-mic */
7420 { 0x18, 0x03a11d20 }, /* mic */
7421 { 0x19, 0x411111f0 }, /* Unused bogus pin */
7425 [ALC283_FIXUP_CHROME_BOOK
] = {
7426 .type
= HDA_FIXUP_FUNC
,
7427 .v
.func
= alc283_fixup_chromebook
,
7429 [ALC283_FIXUP_SENSE_COMBO_JACK
] = {
7430 .type
= HDA_FIXUP_FUNC
,
7431 .v
.func
= alc283_fixup_sense_combo_jack
,
7433 .chain_id
= ALC283_FIXUP_CHROME_BOOK
,
7435 [ALC282_FIXUP_ASUS_TX300
] = {
7436 .type
= HDA_FIXUP_FUNC
,
7437 .v
.func
= alc282_fixup_asus_tx300
,
7439 [ALC283_FIXUP_INT_MIC
] = {
7440 .type
= HDA_FIXUP_VERBS
,
7441 .v
.verbs
= (const struct hda_verb
[]) {
7442 {0x20, AC_VERB_SET_COEF_INDEX
, 0x1a},
7443 {0x20, AC_VERB_SET_PROC_COEF
, 0x0011},
7447 .chain_id
= ALC269_FIXUP_LIMIT_INT_MIC_BOOST
7449 [ALC290_FIXUP_SUBWOOFER_HSJACK
] = {
7450 .type
= HDA_FIXUP_PINS
,
7451 .v
.pins
= (const struct hda_pintbl
[]) {
7452 { 0x17, 0x90170112 }, /* subwoofer */
7456 .chain_id
= ALC290_FIXUP_MONO_SPEAKERS_HSJACK
,
7458 [ALC290_FIXUP_SUBWOOFER
] = {
7459 .type
= HDA_FIXUP_PINS
,
7460 .v
.pins
= (const struct hda_pintbl
[]) {
7461 { 0x17, 0x90170112 }, /* subwoofer */
7465 .chain_id
= ALC290_FIXUP_MONO_SPEAKERS
,
7467 [ALC290_FIXUP_MONO_SPEAKERS
] = {
7468 .type
= HDA_FIXUP_FUNC
,
7469 .v
.func
= alc290_fixup_mono_speakers
,
7471 [ALC290_FIXUP_MONO_SPEAKERS_HSJACK
] = {
7472 .type
= HDA_FIXUP_FUNC
,
7473 .v
.func
= alc290_fixup_mono_speakers
,
7475 .chain_id
= ALC269_FIXUP_DELL3_MIC_NO_PRESENCE
,
7477 [ALC269_FIXUP_THINKPAD_ACPI
] = {
7478 .type
= HDA_FIXUP_FUNC
,
7479 .v
.func
= alc_fixup_thinkpad_acpi
,
7481 .chain_id
= ALC269_FIXUP_SKU_IGNORE
,
7483 [ALC269_FIXUP_DMIC_THINKPAD_ACPI
] = {
7484 .type
= HDA_FIXUP_FUNC
,
7485 .v
.func
= alc_fixup_inv_dmic
,
7487 .chain_id
= ALC269_FIXUP_THINKPAD_ACPI
,
7489 [ALC255_FIXUP_ACER_MIC_NO_PRESENCE
] = {
7490 .type
= HDA_FIXUP_PINS
,
7491 .v
.pins
= (const struct hda_pintbl
[]) {
7492 { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */
7496 .chain_id
= ALC255_FIXUP_HEADSET_MODE
7498 [ALC255_FIXUP_ASUS_MIC_NO_PRESENCE
] = {
7499 .type
= HDA_FIXUP_PINS
,
7500 .v
.pins
= (const struct hda_pintbl
[]) {
7501 { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */
7505 .chain_id
= ALC255_FIXUP_HEADSET_MODE
7507 [ALC255_FIXUP_DELL1_MIC_NO_PRESENCE
] = {
7508 .type
= HDA_FIXUP_PINS
,
7509 .v
.pins
= (const struct hda_pintbl
[]) {
7510 { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */
7511 { 0x1a, 0x01a1913d }, /* use as headphone mic, without its own jack detect */
7515 .chain_id
= ALC255_FIXUP_HEADSET_MODE
7517 [ALC255_FIXUP_DELL2_MIC_NO_PRESENCE
] = {
7518 .type
= HDA_FIXUP_PINS
,
7519 .v
.pins
= (const struct hda_pintbl
[]) {
7520 { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */
7524 .chain_id
= ALC255_FIXUP_HEADSET_MODE_NO_HP_MIC
7526 [ALC255_FIXUP_HEADSET_MODE
] = {
7527 .type
= HDA_FIXUP_FUNC
,
7528 .v
.func
= alc_fixup_headset_mode_alc255
,
7530 .chain_id
= ALC255_FIXUP_MIC_MUTE_LED
7532 [ALC255_FIXUP_HEADSET_MODE_NO_HP_MIC
] = {
7533 .type
= HDA_FIXUP_FUNC
,
7534 .v
.func
= alc_fixup_headset_mode_alc255_no_hp_mic
,
7536 [ALC293_FIXUP_DELL1_MIC_NO_PRESENCE
] = {
7537 .type
= HDA_FIXUP_PINS
,
7538 .v
.pins
= (const struct hda_pintbl
[]) {
7539 { 0x18, 0x01a1913d }, /* use as headphone mic, without its own jack detect */
7540 { 0x1a, 0x01a1913c }, /* use as headset mic, without its own jack detect */
7544 .chain_id
= ALC269_FIXUP_HEADSET_MODE
7546 [ALC292_FIXUP_TPT440_DOCK
] = {
7547 .type
= HDA_FIXUP_FUNC
,
7548 .v
.func
= alc_fixup_tpt440_dock
,
7550 .chain_id
= ALC269_FIXUP_LIMIT_INT_MIC_BOOST
7552 [ALC292_FIXUP_TPT440
] = {
7553 .type
= HDA_FIXUP_FUNC
,
7554 .v
.func
= alc_fixup_disable_aamix
,
7556 .chain_id
= ALC292_FIXUP_TPT440_DOCK
,
7558 [ALC283_FIXUP_HEADSET_MIC
] = {
7559 .type
= HDA_FIXUP_PINS
,
7560 .v
.pins
= (const struct hda_pintbl
[]) {
7561 { 0x19, 0x04a110f0 },
7565 [ALC255_FIXUP_MIC_MUTE_LED
] = {
7566 .type
= HDA_FIXUP_FUNC
,
7567 .v
.func
= alc_fixup_micmute_led
,
7569 [ALC282_FIXUP_ASPIRE_V5_PINS
] = {
7570 .type
= HDA_FIXUP_PINS
,
7571 .v
.pins
= (const struct hda_pintbl
[]) {
7572 { 0x12, 0x90a60130 },
7573 { 0x14, 0x90170110 },
7574 { 0x17, 0x40000008 },
7575 { 0x18, 0x411111f0 },
7576 { 0x19, 0x01a1913c },
7577 { 0x1a, 0x411111f0 },
7578 { 0x1b, 0x411111f0 },
7579 { 0x1d, 0x40f89b2d },
7580 { 0x1e, 0x411111f0 },
7581 { 0x21, 0x0321101f },
7585 [ALC269VB_FIXUP_ASPIRE_E1_COEF
] = {
7586 .type
= HDA_FIXUP_FUNC
,
7587 .v
.func
= alc269vb_fixup_aspire_e1_coef
,
7589 [ALC280_FIXUP_HP_GPIO4
] = {
7590 .type
= HDA_FIXUP_FUNC
,
7591 .v
.func
= alc280_fixup_hp_gpio4
,
7593 [ALC286_FIXUP_HP_GPIO_LED
] = {
7594 .type
= HDA_FIXUP_FUNC
,
7595 .v
.func
= alc286_fixup_hp_gpio_led
,
7597 [ALC280_FIXUP_HP_GPIO2_MIC_HOTKEY
] = {
7598 .type
= HDA_FIXUP_FUNC
,
7599 .v
.func
= alc280_fixup_hp_gpio2_mic_hotkey
,
7601 [ALC280_FIXUP_HP_DOCK_PINS
] = {
7602 .type
= HDA_FIXUP_PINS
,
7603 .v
.pins
= (const struct hda_pintbl
[]) {
7604 { 0x1b, 0x21011020 }, /* line-out */
7605 { 0x1a, 0x01a1903c }, /* headset mic */
7606 { 0x18, 0x2181103f }, /* line-in */
7610 .chain_id
= ALC280_FIXUP_HP_GPIO4
7612 [ALC269_FIXUP_HP_DOCK_GPIO_MIC1_LED
] = {
7613 .type
= HDA_FIXUP_PINS
,
7614 .v
.pins
= (const struct hda_pintbl
[]) {
7615 { 0x1b, 0x21011020 }, /* line-out */
7616 { 0x18, 0x2181103f }, /* line-in */
7620 .chain_id
= ALC269_FIXUP_HP_GPIO_MIC1_LED
7622 [ALC280_FIXUP_HP_9480M
] = {
7623 .type
= HDA_FIXUP_FUNC
,
7624 .v
.func
= alc280_fixup_hp_9480m
,
7626 [ALC245_FIXUP_HP_X360_AMP
] = {
7627 .type
= HDA_FIXUP_FUNC
,
7628 .v
.func
= alc245_fixup_hp_x360_amp
,
7630 .chain_id
= ALC245_FIXUP_HP_GPIO_LED
7632 [ALC288_FIXUP_DELL_HEADSET_MODE
] = {
7633 .type
= HDA_FIXUP_FUNC
,
7634 .v
.func
= alc_fixup_headset_mode_dell_alc288
,
7636 .chain_id
= ALC255_FIXUP_MIC_MUTE_LED
7638 [ALC288_FIXUP_DELL1_MIC_NO_PRESENCE
] = {
7639 .type
= HDA_FIXUP_PINS
,
7640 .v
.pins
= (const struct hda_pintbl
[]) {
7641 { 0x18, 0x01a1913c }, /* use as headset mic, without its own jack detect */
7642 { 0x1a, 0x01a1913d }, /* use as headphone mic, without its own jack detect */
7646 .chain_id
= ALC288_FIXUP_DELL_HEADSET_MODE
7648 [ALC288_FIXUP_DISABLE_AAMIX
] = {
7649 .type
= HDA_FIXUP_FUNC
,
7650 .v
.func
= alc_fixup_disable_aamix
,
7652 .chain_id
= ALC288_FIXUP_DELL1_MIC_NO_PRESENCE
7654 [ALC288_FIXUP_DELL_XPS_13
] = {
7655 .type
= HDA_FIXUP_FUNC
,
7656 .v
.func
= alc_fixup_dell_xps13
,
7658 .chain_id
= ALC288_FIXUP_DISABLE_AAMIX
7660 [ALC292_FIXUP_DISABLE_AAMIX
] = {
7661 .type
= HDA_FIXUP_FUNC
,
7662 .v
.func
= alc_fixup_disable_aamix
,
7664 .chain_id
= ALC269_FIXUP_DELL2_MIC_NO_PRESENCE
7666 [ALC293_FIXUP_DISABLE_AAMIX_MULTIJACK
] = {
7667 .type
= HDA_FIXUP_FUNC
,
7668 .v
.func
= alc_fixup_disable_aamix
,
7670 .chain_id
= ALC293_FIXUP_DELL1_MIC_NO_PRESENCE
7672 [ALC292_FIXUP_DELL_E7X_AAMIX
] = {
7673 .type
= HDA_FIXUP_FUNC
,
7674 .v
.func
= alc_fixup_dell_xps13
,
7676 .chain_id
= ALC292_FIXUP_DISABLE_AAMIX
7678 [ALC292_FIXUP_DELL_E7X
] = {
7679 .type
= HDA_FIXUP_FUNC
,
7680 .v
.func
= alc_fixup_micmute_led
,
7681 /* micmute fixup must be applied at last */
7682 .chained_before
= true,
7683 .chain_id
= ALC292_FIXUP_DELL_E7X_AAMIX
,
7685 [ALC298_FIXUP_ALIENWARE_MIC_NO_PRESENCE
] = {
7686 .type
= HDA_FIXUP_PINS
,
7687 .v
.pins
= (const struct hda_pintbl
[]) {
7688 { 0x18, 0x01a1913c }, /* headset mic w/o jack detect */
7691 .chained_before
= true,
7692 .chain_id
= ALC269_FIXUP_HEADSET_MODE
,
7694 [ALC298_FIXUP_DELL1_MIC_NO_PRESENCE
] = {
7695 .type
= HDA_FIXUP_PINS
,
7696 .v
.pins
= (const struct hda_pintbl
[]) {
7697 { 0x18, 0x01a1913c }, /* use as headset mic, without its own jack detect */
7698 { 0x1a, 0x01a1913d }, /* use as headphone mic, without its own jack detect */
7702 .chain_id
= ALC269_FIXUP_HEADSET_MODE
7704 [ALC298_FIXUP_DELL_AIO_MIC_NO_PRESENCE
] = {
7705 .type
= HDA_FIXUP_PINS
,
7706 .v
.pins
= (const struct hda_pintbl
[]) {
7707 { 0x18, 0x01a1913c }, /* use as headset mic, without its own jack detect */
7711 .chain_id
= ALC269_FIXUP_HEADSET_MODE
7713 [ALC275_FIXUP_DELL_XPS
] = {
7714 .type
= HDA_FIXUP_VERBS
,
7715 .v
.verbs
= (const struct hda_verb
[]) {
7716 /* Enables internal speaker */
7717 {0x20, AC_VERB_SET_COEF_INDEX
, 0x1f},
7718 {0x20, AC_VERB_SET_PROC_COEF
, 0x00c0},
7719 {0x20, AC_VERB_SET_COEF_INDEX
, 0x30},
7720 {0x20, AC_VERB_SET_PROC_COEF
, 0x00b1},
7724 [ALC293_FIXUP_LENOVO_SPK_NOISE
] = {
7725 .type
= HDA_FIXUP_FUNC
,
7726 .v
.func
= alc_fixup_disable_aamix
,
7728 .chain_id
= ALC269_FIXUP_THINKPAD_ACPI
7730 [ALC233_FIXUP_LENOVO_LINE2_MIC_HOTKEY
] = {
7731 .type
= HDA_FIXUP_FUNC
,
7732 .v
.func
= alc233_fixup_lenovo_line2_mic_hotkey
,
7734 [ALC233_FIXUP_INTEL_NUC8_DMIC
] = {
7735 .type
= HDA_FIXUP_FUNC
,
7736 .v
.func
= alc_fixup_inv_dmic
,
7738 .chain_id
= ALC233_FIXUP_INTEL_NUC8_BOOST
,
7740 [ALC233_FIXUP_INTEL_NUC8_BOOST
] = {
7741 .type
= HDA_FIXUP_FUNC
,
7742 .v
.func
= alc269_fixup_limit_int_mic_boost
7744 [ALC255_FIXUP_DELL_SPK_NOISE
] = {
7745 .type
= HDA_FIXUP_FUNC
,
7746 .v
.func
= alc_fixup_disable_aamix
,
7748 .chain_id
= ALC255_FIXUP_DELL1_MIC_NO_PRESENCE
7750 [ALC225_FIXUP_DISABLE_MIC_VREF
] = {
7751 .type
= HDA_FIXUP_FUNC
,
7752 .v
.func
= alc_fixup_disable_mic_vref
,
7754 .chain_id
= ALC269_FIXUP_DELL1_MIC_NO_PRESENCE
7756 [ALC225_FIXUP_DELL1_MIC_NO_PRESENCE
] = {
7757 .type
= HDA_FIXUP_VERBS
,
7758 .v
.verbs
= (const struct hda_verb
[]) {
7759 /* Disable pass-through path for FRONT 14h */
7760 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x36 },
7761 { 0x20, AC_VERB_SET_PROC_COEF
, 0x57d7 },
7765 .chain_id
= ALC225_FIXUP_DISABLE_MIC_VREF
7767 [ALC280_FIXUP_HP_HEADSET_MIC
] = {
7768 .type
= HDA_FIXUP_FUNC
,
7769 .v
.func
= alc_fixup_disable_aamix
,
7771 .chain_id
= ALC269_FIXUP_HEADSET_MIC
,
7773 [ALC221_FIXUP_HP_FRONT_MIC
] = {
7774 .type
= HDA_FIXUP_PINS
,
7775 .v
.pins
= (const struct hda_pintbl
[]) {
7776 { 0x19, 0x02a19020 }, /* Front Mic */
7780 [ALC292_FIXUP_TPT460
] = {
7781 .type
= HDA_FIXUP_FUNC
,
7782 .v
.func
= alc_fixup_tpt440_dock
,
7784 .chain_id
= ALC293_FIXUP_LENOVO_SPK_NOISE
,
7786 [ALC298_FIXUP_SPK_VOLUME
] = {
7787 .type
= HDA_FIXUP_FUNC
,
7788 .v
.func
= alc298_fixup_speaker_volume
,
7790 .chain_id
= ALC298_FIXUP_DELL_AIO_MIC_NO_PRESENCE
,
7792 [ALC298_FIXUP_LENOVO_SPK_VOLUME
] = {
7793 .type
= HDA_FIXUP_FUNC
,
7794 .v
.func
= alc298_fixup_speaker_volume
,
7796 [ALC295_FIXUP_DISABLE_DAC3
] = {
7797 .type
= HDA_FIXUP_FUNC
,
7798 .v
.func
= alc295_fixup_disable_dac3
,
7800 [ALC285_FIXUP_SPEAKER2_TO_DAC1
] = {
7801 .type
= HDA_FIXUP_FUNC
,
7802 .v
.func
= alc285_fixup_speaker2_to_dac1
,
7804 .chain_id
= ALC269_FIXUP_THINKPAD_ACPI
7806 [ALC256_FIXUP_DELL_INSPIRON_7559_SUBWOOFER
] = {
7807 .type
= HDA_FIXUP_PINS
,
7808 .v
.pins
= (const struct hda_pintbl
[]) {
7809 { 0x1b, 0x90170151 },
7813 .chain_id
= ALC255_FIXUP_DELL1_MIC_NO_PRESENCE
7815 [ALC269_FIXUP_ATIV_BOOK_8
] = {
7816 .type
= HDA_FIXUP_FUNC
,
7817 .v
.func
= alc_fixup_auto_mute_via_amp
,
7819 .chain_id
= ALC269_FIXUP_NO_SHUTUP
7821 [ALC221_FIXUP_HP_MIC_NO_PRESENCE
] = {
7822 .type
= HDA_FIXUP_PINS
,
7823 .v
.pins
= (const struct hda_pintbl
[]) {
7824 { 0x18, 0x01a1913c }, /* use as headset mic, without its own jack detect */
7825 { 0x1a, 0x01a1913d }, /* use as headphone mic, without its own jack detect */
7829 .chain_id
= ALC269_FIXUP_HEADSET_MODE
7831 [ALC256_FIXUP_ASUS_HEADSET_MODE
] = {
7832 .type
= HDA_FIXUP_FUNC
,
7833 .v
.func
= alc_fixup_headset_mode
,
7835 [ALC256_FIXUP_ASUS_MIC
] = {
7836 .type
= HDA_FIXUP_PINS
,
7837 .v
.pins
= (const struct hda_pintbl
[]) {
7838 { 0x13, 0x90a60160 }, /* use as internal mic */
7839 { 0x19, 0x04a11120 }, /* use as headset mic, without its own jack detect */
7843 .chain_id
= ALC256_FIXUP_ASUS_HEADSET_MODE
7845 [ALC256_FIXUP_ASUS_AIO_GPIO2
] = {
7846 .type
= HDA_FIXUP_FUNC
,
7847 /* Set up GPIO2 for the speaker amp */
7848 .v
.func
= alc_fixup_gpio4
,
7850 [ALC233_FIXUP_ASUS_MIC_NO_PRESENCE
] = {
7851 .type
= HDA_FIXUP_PINS
,
7852 .v
.pins
= (const struct hda_pintbl
[]) {
7853 { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */
7857 .chain_id
= ALC269_FIXUP_HEADSET_MIC
7859 [ALC233_FIXUP_EAPD_COEF_AND_MIC_NO_PRESENCE
] = {
7860 .type
= HDA_FIXUP_VERBS
,
7861 .v
.verbs
= (const struct hda_verb
[]) {
7862 /* Enables internal speaker */
7863 {0x20, AC_VERB_SET_COEF_INDEX
, 0x40},
7864 {0x20, AC_VERB_SET_PROC_COEF
, 0x8800},
7868 .chain_id
= ALC233_FIXUP_ASUS_MIC_NO_PRESENCE
7870 [ALC233_FIXUP_LENOVO_MULTI_CODECS
] = {
7871 .type
= HDA_FIXUP_FUNC
,
7872 .v
.func
= alc233_alc662_fixup_lenovo_dual_codecs
,
7874 .chain_id
= ALC269_FIXUP_GPIO2
7876 [ALC233_FIXUP_ACER_HEADSET_MIC
] = {
7877 .type
= HDA_FIXUP_VERBS
,
7878 .v
.verbs
= (const struct hda_verb
[]) {
7879 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x45 },
7880 { 0x20, AC_VERB_SET_PROC_COEF
, 0x5089 },
7884 .chain_id
= ALC233_FIXUP_ASUS_MIC_NO_PRESENCE
7886 [ALC294_FIXUP_LENOVO_MIC_LOCATION
] = {
7887 .type
= HDA_FIXUP_PINS
,
7888 .v
.pins
= (const struct hda_pintbl
[]) {
7889 /* Change the mic location from front to right, otherwise there are
7890 two front mics with the same name, pulseaudio can't handle them.
7891 This is just a temporary workaround, after applying this fixup,
7892 there will be one "Front Mic" and one "Mic" in this machine.
7894 { 0x1a, 0x04a19040 },
7898 [ALC225_FIXUP_DELL_WYSE_MIC_NO_PRESENCE
] = {
7899 .type
= HDA_FIXUP_PINS
,
7900 .v
.pins
= (const struct hda_pintbl
[]) {
7901 { 0x16, 0x0101102f }, /* Rear Headset HP */
7902 { 0x19, 0x02a1913c }, /* use as Front headset mic, without its own jack detect */
7903 { 0x1a, 0x01a19030 }, /* Rear Headset MIC */
7904 { 0x1b, 0x02011020 },
7908 .chain_id
= ALC225_FIXUP_S3_POP_NOISE
7910 [ALC225_FIXUP_S3_POP_NOISE
] = {
7911 .type
= HDA_FIXUP_FUNC
,
7912 .v
.func
= alc225_fixup_s3_pop_noise
,
7914 .chain_id
= ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC
7916 [ALC700_FIXUP_INTEL_REFERENCE
] = {
7917 .type
= HDA_FIXUP_VERBS
,
7918 .v
.verbs
= (const struct hda_verb
[]) {
7919 /* Enables internal speaker */
7920 {0x20, AC_VERB_SET_COEF_INDEX
, 0x45},
7921 {0x20, AC_VERB_SET_PROC_COEF
, 0x5289},
7922 {0x20, AC_VERB_SET_COEF_INDEX
, 0x4A},
7923 {0x20, AC_VERB_SET_PROC_COEF
, 0x001b},
7924 {0x58, AC_VERB_SET_COEF_INDEX
, 0x00},
7925 {0x58, AC_VERB_SET_PROC_COEF
, 0x3888},
7926 {0x20, AC_VERB_SET_COEF_INDEX
, 0x6f},
7927 {0x20, AC_VERB_SET_PROC_COEF
, 0x2c0b},
7931 [ALC274_FIXUP_DELL_BIND_DACS
] = {
7932 .type
= HDA_FIXUP_FUNC
,
7933 .v
.func
= alc274_fixup_bind_dacs
,
7935 .chain_id
= ALC269_FIXUP_DELL1_MIC_NO_PRESENCE
7937 [ALC274_FIXUP_DELL_AIO_LINEOUT_VERB
] = {
7938 .type
= HDA_FIXUP_PINS
,
7939 .v
.pins
= (const struct hda_pintbl
[]) {
7940 { 0x1b, 0x0401102f },
7944 .chain_id
= ALC274_FIXUP_DELL_BIND_DACS
7946 [ALC298_FIXUP_TPT470_DOCK_FIX
] = {
7947 .type
= HDA_FIXUP_FUNC
,
7948 .v
.func
= alc_fixup_tpt470_dock
,
7950 .chain_id
= ALC293_FIXUP_LENOVO_SPK_NOISE
7952 [ALC298_FIXUP_TPT470_DOCK
] = {
7953 .type
= HDA_FIXUP_FUNC
,
7954 .v
.func
= alc_fixup_tpt470_dacs
,
7956 .chain_id
= ALC298_FIXUP_TPT470_DOCK_FIX
7958 [ALC255_FIXUP_DUMMY_LINEOUT_VERB
] = {
7959 .type
= HDA_FIXUP_PINS
,
7960 .v
.pins
= (const struct hda_pintbl
[]) {
7961 { 0x14, 0x0201101f },
7965 .chain_id
= ALC255_FIXUP_DELL1_MIC_NO_PRESENCE
7967 [ALC255_FIXUP_DELL_HEADSET_MIC
] = {
7968 .type
= HDA_FIXUP_PINS
,
7969 .v
.pins
= (const struct hda_pintbl
[]) {
7970 { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */
7974 .chain_id
= ALC269_FIXUP_HEADSET_MIC
7976 [ALC295_FIXUP_HP_X360
] = {
7977 .type
= HDA_FIXUP_FUNC
,
7978 .v
.func
= alc295_fixup_hp_top_speakers
,
7980 .chain_id
= ALC269_FIXUP_HP_MUTE_LED_MIC3
7982 [ALC221_FIXUP_HP_HEADSET_MIC
] = {
7983 .type
= HDA_FIXUP_PINS
,
7984 .v
.pins
= (const struct hda_pintbl
[]) {
7985 { 0x19, 0x0181313f},
7989 .chain_id
= ALC269_FIXUP_HEADSET_MIC
7991 [ALC285_FIXUP_LENOVO_HEADPHONE_NOISE
] = {
7992 .type
= HDA_FIXUP_FUNC
,
7993 .v
.func
= alc285_fixup_invalidate_dacs
,
7995 .chain_id
= ALC269_FIXUP_THINKPAD_ACPI
7997 [ALC295_FIXUP_HP_AUTO_MUTE
] = {
7998 .type
= HDA_FIXUP_FUNC
,
7999 .v
.func
= alc_fixup_auto_mute_via_amp
,
8001 [ALC286_FIXUP_ACER_AIO_MIC_NO_PRESENCE
] = {
8002 .type
= HDA_FIXUP_PINS
,
8003 .v
.pins
= (const struct hda_pintbl
[]) {
8004 { 0x18, 0x01a1913c }, /* use as headset mic, without its own jack detect */
8008 .chain_id
= ALC269_FIXUP_HEADSET_MIC
8010 [ALC294_FIXUP_ASUS_MIC
] = {
8011 .type
= HDA_FIXUP_PINS
,
8012 .v
.pins
= (const struct hda_pintbl
[]) {
8013 { 0x13, 0x90a60160 }, /* use as internal mic */
8014 { 0x19, 0x04a11120 }, /* use as headset mic, without its own jack detect */
8018 .chain_id
= ALC269_FIXUP_HEADSET_MIC
8020 [ALC294_FIXUP_ASUS_HEADSET_MIC
] = {
8021 .type
= HDA_FIXUP_PINS
,
8022 .v
.pins
= (const struct hda_pintbl
[]) {
8023 { 0x19, 0x01a1103c }, /* use as headset mic */
8027 .chain_id
= ALC269_FIXUP_HEADSET_MIC
8029 [ALC294_FIXUP_ASUS_SPK
] = {
8030 .type
= HDA_FIXUP_VERBS
,
8031 .v
.verbs
= (const struct hda_verb
[]) {
8033 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x40 },
8034 { 0x20, AC_VERB_SET_PROC_COEF
, 0x8800 },
8035 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x0f },
8036 { 0x20, AC_VERB_SET_PROC_COEF
, 0x7774 },
8040 .chain_id
= ALC294_FIXUP_ASUS_HEADSET_MIC
8042 [ALC295_FIXUP_CHROME_BOOK
] = {
8043 .type
= HDA_FIXUP_FUNC
,
8044 .v
.func
= alc295_fixup_chromebook
,
8046 .chain_id
= ALC225_FIXUP_HEADSET_JACK
8048 [ALC225_FIXUP_HEADSET_JACK
] = {
8049 .type
= HDA_FIXUP_FUNC
,
8050 .v
.func
= alc_fixup_headset_jack
,
8052 [ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
] = {
8053 .type
= HDA_FIXUP_PINS
,
8054 .v
.pins
= (const struct hda_pintbl
[]) {
8055 { 0x1a, 0x01a1913c }, /* use as headset mic, without its own jack detect */
8059 .chain_id
= ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC
8061 [ALC285_FIXUP_LENOVO_PC_BEEP_IN_NOISE
] = {
8062 .type
= HDA_FIXUP_VERBS
,
8063 .v
.verbs
= (const struct hda_verb
[]) {
8064 /* Disable PCBEEP-IN passthrough */
8065 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x36 },
8066 { 0x20, AC_VERB_SET_PROC_COEF
, 0x57d7 },
8070 .chain_id
= ALC285_FIXUP_LENOVO_HEADPHONE_NOISE
8072 [ALC255_FIXUP_ACER_HEADSET_MIC
] = {
8073 .type
= HDA_FIXUP_PINS
,
8074 .v
.pins
= (const struct hda_pintbl
[]) {
8075 { 0x19, 0x03a11130 },
8076 { 0x1a, 0x90a60140 }, /* use as internal mic */
8080 .chain_id
= ALC255_FIXUP_HEADSET_MODE_NO_HP_MIC
8082 [ALC225_FIXUP_DELL_WYSE_AIO_MIC_NO_PRESENCE
] = {
8083 .type
= HDA_FIXUP_PINS
,
8084 .v
.pins
= (const struct hda_pintbl
[]) {
8085 { 0x16, 0x01011020 }, /* Rear Line out */
8086 { 0x19, 0x01a1913c }, /* use as Front headset mic, without its own jack detect */
8090 .chain_id
= ALC225_FIXUP_WYSE_AUTO_MUTE
8092 [ALC225_FIXUP_WYSE_AUTO_MUTE
] = {
8093 .type
= HDA_FIXUP_FUNC
,
8094 .v
.func
= alc_fixup_auto_mute_via_amp
,
8096 .chain_id
= ALC225_FIXUP_WYSE_DISABLE_MIC_VREF
8098 [ALC225_FIXUP_WYSE_DISABLE_MIC_VREF
] = {
8099 .type
= HDA_FIXUP_FUNC
,
8100 .v
.func
= alc_fixup_disable_mic_vref
,
8102 .chain_id
= ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC
8104 [ALC286_FIXUP_ACER_AIO_HEADSET_MIC
] = {
8105 .type
= HDA_FIXUP_VERBS
,
8106 .v
.verbs
= (const struct hda_verb
[]) {
8107 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x4f },
8108 { 0x20, AC_VERB_SET_PROC_COEF
, 0x5029 },
8112 .chain_id
= ALC286_FIXUP_ACER_AIO_MIC_NO_PRESENCE
8114 [ALC256_FIXUP_ASUS_HEADSET_MIC
] = {
8115 .type
= HDA_FIXUP_PINS
,
8116 .v
.pins
= (const struct hda_pintbl
[]) {
8117 { 0x19, 0x03a11020 }, /* headset mic with jack detect */
8121 .chain_id
= ALC256_FIXUP_ASUS_HEADSET_MODE
8123 [ALC256_FIXUP_ASUS_MIC_NO_PRESENCE
] = {
8124 .type
= HDA_FIXUP_PINS
,
8125 .v
.pins
= (const struct hda_pintbl
[]) {
8126 { 0x19, 0x04a11120 }, /* use as headset mic, without its own jack detect */
8130 .chain_id
= ALC256_FIXUP_ASUS_HEADSET_MODE
8132 [ALC299_FIXUP_PREDATOR_SPK
] = {
8133 .type
= HDA_FIXUP_PINS
,
8134 .v
.pins
= (const struct hda_pintbl
[]) {
8135 { 0x21, 0x90170150 }, /* use as headset mic, without its own jack detect */
8139 [ALC256_FIXUP_MEDION_HEADSET_NO_PRESENCE
] = {
8140 .type
= HDA_FIXUP_PINS
,
8141 .v
.pins
= (const struct hda_pintbl
[]) {
8142 { 0x19, 0x04a11040 },
8143 { 0x21, 0x04211020 },
8147 .chain_id
= ALC256_FIXUP_ASUS_HEADSET_MODE
8149 [ALC289_FIXUP_DELL_SPK2
] = {
8150 .type
= HDA_FIXUP_PINS
,
8151 .v
.pins
= (const struct hda_pintbl
[]) {
8152 { 0x17, 0x90170130 }, /* bass spk */
8156 .chain_id
= ALC269_FIXUP_DELL4_MIC_NO_PRESENCE
8158 [ALC289_FIXUP_DUAL_SPK
] = {
8159 .type
= HDA_FIXUP_FUNC
,
8160 .v
.func
= alc285_fixup_speaker2_to_dac1
,
8162 .chain_id
= ALC289_FIXUP_DELL_SPK2
8164 [ALC294_FIXUP_SPK2_TO_DAC1
] = {
8165 .type
= HDA_FIXUP_FUNC
,
8166 .v
.func
= alc285_fixup_speaker2_to_dac1
,
8168 .chain_id
= ALC294_FIXUP_ASUS_HEADSET_MIC
8170 [ALC294_FIXUP_ASUS_DUAL_SPK
] = {
8171 .type
= HDA_FIXUP_FUNC
,
8172 /* The GPIO must be pulled to initialize the AMP */
8173 .v
.func
= alc_fixup_gpio4
,
8175 .chain_id
= ALC294_FIXUP_SPK2_TO_DAC1
8177 [ALC285_FIXUP_THINKPAD_X1_GEN7
] = {
8178 .type
= HDA_FIXUP_FUNC
,
8179 .v
.func
= alc285_fixup_thinkpad_x1_gen7
,
8181 .chain_id
= ALC269_FIXUP_THINKPAD_ACPI
8183 [ALC285_FIXUP_THINKPAD_HEADSET_JACK
] = {
8184 .type
= HDA_FIXUP_FUNC
,
8185 .v
.func
= alc_fixup_headset_jack
,
8187 .chain_id
= ALC285_FIXUP_THINKPAD_X1_GEN7
8189 [ALC294_FIXUP_ASUS_HPE
] = {
8190 .type
= HDA_FIXUP_VERBS
,
8191 .v
.verbs
= (const struct hda_verb
[]) {
8193 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x0f },
8194 { 0x20, AC_VERB_SET_PROC_COEF
, 0x7774 },
8198 .chain_id
= ALC294_FIXUP_ASUS_HEADSET_MIC
8200 [ALC294_FIXUP_ASUS_GX502_PINS
] = {
8201 .type
= HDA_FIXUP_PINS
,
8202 .v
.pins
= (const struct hda_pintbl
[]) {
8203 { 0x19, 0x03a11050 }, /* front HP mic */
8204 { 0x1a, 0x01a11830 }, /* rear external mic */
8205 { 0x21, 0x03211020 }, /* front HP out */
8209 .chain_id
= ALC294_FIXUP_ASUS_GX502_VERBS
8211 [ALC294_FIXUP_ASUS_GX502_VERBS
] = {
8212 .type
= HDA_FIXUP_VERBS
,
8213 .v
.verbs
= (const struct hda_verb
[]) {
8214 /* set 0x15 to HP-OUT ctrl */
8215 { 0x15, AC_VERB_SET_PIN_WIDGET_CONTROL
, 0xc0 },
8216 /* unmute the 0x15 amp */
8217 { 0x15, AC_VERB_SET_AMP_GAIN_MUTE
, 0xb000 },
8221 .chain_id
= ALC294_FIXUP_ASUS_GX502_HP
8223 [ALC294_FIXUP_ASUS_GX502_HP
] = {
8224 .type
= HDA_FIXUP_FUNC
,
8225 .v
.func
= alc294_fixup_gx502_hp
,
8227 [ALC294_FIXUP_ASUS_GU502_PINS
] = {
8228 .type
= HDA_FIXUP_PINS
,
8229 .v
.pins
= (const struct hda_pintbl
[]) {
8230 { 0x19, 0x01a11050 }, /* rear HP mic */
8231 { 0x1a, 0x01a11830 }, /* rear external mic */
8232 { 0x21, 0x012110f0 }, /* rear HP out */
8236 .chain_id
= ALC294_FIXUP_ASUS_GU502_VERBS
8238 [ALC294_FIXUP_ASUS_GU502_VERBS
] = {
8239 .type
= HDA_FIXUP_VERBS
,
8240 .v
.verbs
= (const struct hda_verb
[]) {
8241 /* set 0x15 to HP-OUT ctrl */
8242 { 0x15, AC_VERB_SET_PIN_WIDGET_CONTROL
, 0xc0 },
8243 /* unmute the 0x15 amp */
8244 { 0x15, AC_VERB_SET_AMP_GAIN_MUTE
, 0xb000 },
8245 /* set 0x1b to HP-OUT */
8246 { 0x1b, AC_VERB_SET_PIN_WIDGET_CONTROL
, 0x24 },
8250 .chain_id
= ALC294_FIXUP_ASUS_GU502_HP
8252 [ALC294_FIXUP_ASUS_GU502_HP
] = {
8253 .type
= HDA_FIXUP_FUNC
,
8254 .v
.func
= alc294_fixup_gu502_hp
,
8256 [ALC294_FIXUP_ASUS_COEF_1B
] = {
8257 .type
= HDA_FIXUP_VERBS
,
8258 .v
.verbs
= (const struct hda_verb
[]) {
8259 /* Set bit 10 to correct noisy output after reboot from
8260 * Windows 10 (due to pop noise reduction?)
8262 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x1b },
8263 { 0x20, AC_VERB_SET_PROC_COEF
, 0x4e4b },
8267 .chain_id
= ALC289_FIXUP_ASUS_GA401
,
8269 [ALC285_FIXUP_HP_GPIO_LED
] = {
8270 .type
= HDA_FIXUP_FUNC
,
8271 .v
.func
= alc285_fixup_hp_gpio_led
,
8273 [ALC285_FIXUP_HP_MUTE_LED
] = {
8274 .type
= HDA_FIXUP_FUNC
,
8275 .v
.func
= alc285_fixup_hp_mute_led
,
8277 [ALC236_FIXUP_HP_GPIO_LED
] = {
8278 .type
= HDA_FIXUP_FUNC
,
8279 .v
.func
= alc236_fixup_hp_gpio_led
,
8281 [ALC236_FIXUP_HP_MUTE_LED
] = {
8282 .type
= HDA_FIXUP_FUNC
,
8283 .v
.func
= alc236_fixup_hp_mute_led
,
8285 [ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF
] = {
8286 .type
= HDA_FIXUP_FUNC
,
8287 .v
.func
= alc236_fixup_hp_mute_led_micmute_vref
,
8289 [ALC298_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET
] = {
8290 .type
= HDA_FIXUP_VERBS
,
8291 .v
.verbs
= (const struct hda_verb
[]) {
8292 { 0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL
, 0xc5 },
8296 [ALC256_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET
] = {
8297 .type
= HDA_FIXUP_VERBS
,
8298 .v
.verbs
= (const struct hda_verb
[]) {
8299 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x08},
8300 { 0x20, AC_VERB_SET_PROC_COEF
, 0x2fcf},
8304 [ALC295_FIXUP_ASUS_MIC_NO_PRESENCE
] = {
8305 .type
= HDA_FIXUP_PINS
,
8306 .v
.pins
= (const struct hda_pintbl
[]) {
8307 { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */
8311 .chain_id
= ALC269_FIXUP_HEADSET_MODE
8313 [ALC269VC_FIXUP_ACER_VCOPPERBOX_PINS
] = {
8314 .type
= HDA_FIXUP_PINS
,
8315 .v
.pins
= (const struct hda_pintbl
[]) {
8316 { 0x14, 0x90100120 }, /* use as internal speaker */
8317 { 0x18, 0x02a111f0 }, /* use as headset mic, without its own jack detect */
8318 { 0x1a, 0x01011020 }, /* use as line out */
8322 .chain_id
= ALC269_FIXUP_HEADSET_MIC
8324 [ALC269VC_FIXUP_ACER_HEADSET_MIC
] = {
8325 .type
= HDA_FIXUP_PINS
,
8326 .v
.pins
= (const struct hda_pintbl
[]) {
8327 { 0x18, 0x02a11030 }, /* use as headset mic */
8331 .chain_id
= ALC269_FIXUP_HEADSET_MIC
8333 [ALC269VC_FIXUP_ACER_MIC_NO_PRESENCE
] = {
8334 .type
= HDA_FIXUP_PINS
,
8335 .v
.pins
= (const struct hda_pintbl
[]) {
8336 { 0x18, 0x01a11130 }, /* use as headset mic, without its own jack detect */
8340 .chain_id
= ALC269_FIXUP_HEADSET_MIC
8342 [ALC289_FIXUP_ASUS_GA401
] = {
8343 .type
= HDA_FIXUP_FUNC
,
8344 .v
.func
= alc289_fixup_asus_ga401
,
8346 .chain_id
= ALC289_FIXUP_ASUS_GA502
,
8348 [ALC289_FIXUP_ASUS_GA502
] = {
8349 .type
= HDA_FIXUP_PINS
,
8350 .v
.pins
= (const struct hda_pintbl
[]) {
8351 { 0x19, 0x03a11020 }, /* headset mic with jack detect */
8355 [ALC256_FIXUP_ACER_MIC_NO_PRESENCE
] = {
8356 .type
= HDA_FIXUP_PINS
,
8357 .v
.pins
= (const struct hda_pintbl
[]) {
8358 { 0x19, 0x02a11120 }, /* use as headset mic, without its own jack detect */
8362 .chain_id
= ALC256_FIXUP_ASUS_HEADSET_MODE
8364 [ALC285_FIXUP_HP_GPIO_AMP_INIT
] = {
8365 .type
= HDA_FIXUP_FUNC
,
8366 .v
.func
= alc285_fixup_hp_gpio_amp_init
,
8368 .chain_id
= ALC285_FIXUP_HP_GPIO_LED
8370 [ALC269_FIXUP_CZC_B20
] = {
8371 .type
= HDA_FIXUP_PINS
,
8372 .v
.pins
= (const struct hda_pintbl
[]) {
8373 { 0x12, 0x411111f0 },
8374 { 0x14, 0x90170110 }, /* speaker */
8375 { 0x15, 0x032f1020 }, /* HP out */
8376 { 0x17, 0x411111f0 },
8377 { 0x18, 0x03ab1040 }, /* mic */
8378 { 0x19, 0xb7a7013f },
8379 { 0x1a, 0x0181305f },
8380 { 0x1b, 0x411111f0 },
8381 { 0x1d, 0x411111f0 },
8382 { 0x1e, 0x411111f0 },
8385 .chain_id
= ALC269_FIXUP_DMIC
,
8387 [ALC269_FIXUP_CZC_TMI
] = {
8388 .type
= HDA_FIXUP_PINS
,
8389 .v
.pins
= (const struct hda_pintbl
[]) {
8390 { 0x12, 0x4000c000 },
8391 { 0x14, 0x90170110 }, /* speaker */
8392 { 0x15, 0x0421401f }, /* HP out */
8393 { 0x17, 0x411111f0 },
8394 { 0x18, 0x04a19020 }, /* mic */
8395 { 0x19, 0x411111f0 },
8396 { 0x1a, 0x411111f0 },
8397 { 0x1b, 0x411111f0 },
8398 { 0x1d, 0x40448505 },
8399 { 0x1e, 0x411111f0 },
8400 { 0x20, 0x8000ffff },
8403 .chain_id
= ALC269_FIXUP_DMIC
,
8405 [ALC269_FIXUP_CZC_L101
] = {
8406 .type
= HDA_FIXUP_PINS
,
8407 .v
.pins
= (const struct hda_pintbl
[]) {
8408 { 0x12, 0x40000000 },
8409 { 0x14, 0x01014010 }, /* speaker */
8410 { 0x15, 0x411111f0 }, /* HP out */
8411 { 0x16, 0x411111f0 },
8412 { 0x18, 0x01a19020 }, /* mic */
8413 { 0x19, 0x02a19021 },
8414 { 0x1a, 0x0181302f },
8415 { 0x1b, 0x0221401f },
8416 { 0x1c, 0x411111f0 },
8417 { 0x1d, 0x4044c601 },
8418 { 0x1e, 0x411111f0 },
8421 .chain_id
= ALC269_FIXUP_DMIC
,
8423 [ALC269_FIXUP_LEMOTE_A1802
] = {
8424 .type
= HDA_FIXUP_PINS
,
8425 .v
.pins
= (const struct hda_pintbl
[]) {
8426 { 0x12, 0x40000000 },
8427 { 0x14, 0x90170110 }, /* speaker */
8428 { 0x17, 0x411111f0 },
8429 { 0x18, 0x03a19040 }, /* mic1 */
8430 { 0x19, 0x90a70130 }, /* mic2 */
8431 { 0x1a, 0x411111f0 },
8432 { 0x1b, 0x411111f0 },
8433 { 0x1d, 0x40489d2d },
8434 { 0x1e, 0x411111f0 },
8435 { 0x20, 0x0003ffff },
8436 { 0x21, 0x03214020 },
8439 .chain_id
= ALC269_FIXUP_DMIC
,
8441 [ALC269_FIXUP_LEMOTE_A190X
] = {
8442 .type
= HDA_FIXUP_PINS
,
8443 .v
.pins
= (const struct hda_pintbl
[]) {
8444 { 0x14, 0x99130110 }, /* speaker */
8445 { 0x15, 0x0121401f }, /* HP out */
8446 { 0x18, 0x01a19c20 }, /* rear mic */
8447 { 0x19, 0x99a3092f }, /* front mic */
8448 { 0x1b, 0x0201401f }, /* front lineout */
8451 .chain_id
= ALC269_FIXUP_DMIC
,
8453 [ALC256_FIXUP_INTEL_NUC8_RUGGED
] = {
8454 .type
= HDA_FIXUP_PINS
,
8455 .v
.pins
= (const struct hda_pintbl
[]) {
8456 { 0x1b, 0x01a1913c }, /* use as headset mic, without its own jack detect */
8460 .chain_id
= ALC269_FIXUP_HEADSET_MODE
8462 [ALC256_FIXUP_INTEL_NUC10
] = {
8463 .type
= HDA_FIXUP_PINS
,
8464 .v
.pins
= (const struct hda_pintbl
[]) {
8465 { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */
8469 .chain_id
= ALC269_FIXUP_HEADSET_MODE
8471 [ALC255_FIXUP_XIAOMI_HEADSET_MIC
] = {
8472 .type
= HDA_FIXUP_VERBS
,
8473 .v
.verbs
= (const struct hda_verb
[]) {
8474 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x45 },
8475 { 0x20, AC_VERB_SET_PROC_COEF
, 0x5089 },
8479 .chain_id
= ALC289_FIXUP_ASUS_GA502
8481 [ALC274_FIXUP_HP_MIC
] = {
8482 .type
= HDA_FIXUP_VERBS
,
8483 .v
.verbs
= (const struct hda_verb
[]) {
8484 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x45 },
8485 { 0x20, AC_VERB_SET_PROC_COEF
, 0x5089 },
8489 [ALC274_FIXUP_HP_HEADSET_MIC
] = {
8490 .type
= HDA_FIXUP_FUNC
,
8491 .v
.func
= alc274_fixup_hp_headset_mic
,
8493 .chain_id
= ALC274_FIXUP_HP_MIC
8495 [ALC274_FIXUP_HP_ENVY_GPIO
] = {
8496 .type
= HDA_FIXUP_FUNC
,
8497 .v
.func
= alc274_fixup_hp_envy_gpio
,
8499 [ALC256_FIXUP_ASUS_HPE
] = {
8500 .type
= HDA_FIXUP_VERBS
,
8501 .v
.verbs
= (const struct hda_verb
[]) {
8503 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x0f },
8504 { 0x20, AC_VERB_SET_PROC_COEF
, 0x7778 },
8508 .chain_id
= ALC294_FIXUP_ASUS_HEADSET_MIC
8510 [ALC285_FIXUP_THINKPAD_NO_BASS_SPK_HEADSET_JACK
] = {
8511 .type
= HDA_FIXUP_FUNC
,
8512 .v
.func
= alc_fixup_headset_jack
,
8514 .chain_id
= ALC269_FIXUP_THINKPAD_ACPI
8516 [ALC287_FIXUP_HP_GPIO_LED
] = {
8517 .type
= HDA_FIXUP_FUNC
,
8518 .v
.func
= alc287_fixup_hp_gpio_led
,
8520 [ALC256_FIXUP_HP_HEADSET_MIC
] = {
8521 .type
= HDA_FIXUP_FUNC
,
8522 .v
.func
= alc274_fixup_hp_headset_mic
,
8524 [ALC236_FIXUP_DELL_AIO_HEADSET_MIC
] = {
8525 .type
= HDA_FIXUP_FUNC
,
8526 .v
.func
= alc_fixup_no_int_mic
,
8528 .chain_id
= ALC255_FIXUP_DELL1_MIC_NO_PRESENCE
8530 [ALC282_FIXUP_ACER_DISABLE_LINEOUT
] = {
8531 .type
= HDA_FIXUP_PINS
,
8532 .v
.pins
= (const struct hda_pintbl
[]) {
8533 { 0x1b, 0x411111f0 },
8534 { 0x18, 0x01a1913c }, /* use as headset mic, without its own jack detect */
8538 .chain_id
= ALC269_FIXUP_HEADSET_MODE
8540 [ALC255_FIXUP_ACER_LIMIT_INT_MIC_BOOST
] = {
8541 .type
= HDA_FIXUP_FUNC
,
8542 .v
.func
= alc269_fixup_limit_int_mic_boost
,
8544 .chain_id
= ALC255_FIXUP_ACER_MIC_NO_PRESENCE
,
8546 [ALC256_FIXUP_ACER_HEADSET_MIC
] = {
8547 .type
= HDA_FIXUP_PINS
,
8548 .v
.pins
= (const struct hda_pintbl
[]) {
8549 { 0x19, 0x02a1113c }, /* use as headset mic, without its own jack detect */
8550 { 0x1a, 0x90a1092f }, /* use as internal mic */
8554 .chain_id
= ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC
8556 [ALC285_FIXUP_IDEAPAD_S740_COEF
] = {
8557 .type
= HDA_FIXUP_FUNC
,
8558 .v
.func
= alc285_fixup_ideapad_s740_coef
,
8560 .chain_id
= ALC269_FIXUP_THINKPAD_ACPI
,
8562 [ALC285_FIXUP_HP_LIMIT_INT_MIC_BOOST
] = {
8563 .type
= HDA_FIXUP_FUNC
,
8564 .v
.func
= alc269_fixup_limit_int_mic_boost
,
8566 .chain_id
= ALC285_FIXUP_HP_MUTE_LED
,
8568 [ALC295_FIXUP_ASUS_DACS
] = {
8569 .type
= HDA_FIXUP_FUNC
,
8570 .v
.func
= alc295_fixup_asus_dacs
,
8572 [ALC295_FIXUP_HP_OMEN
] = {
8573 .type
= HDA_FIXUP_PINS
,
8574 .v
.pins
= (const struct hda_pintbl
[]) {
8575 { 0x12, 0xb7a60130 },
8576 { 0x13, 0x40000000 },
8577 { 0x14, 0x411111f0 },
8578 { 0x16, 0x411111f0 },
8579 { 0x17, 0x90170110 },
8580 { 0x18, 0x411111f0 },
8581 { 0x19, 0x02a11030 },
8582 { 0x1a, 0x411111f0 },
8583 { 0x1b, 0x04a19030 },
8584 { 0x1d, 0x40600001 },
8585 { 0x1e, 0x411111f0 },
8586 { 0x21, 0x03211020 },
8590 .chain_id
= ALC269_FIXUP_HP_LINE1_MIC1_LED
,
8592 [ALC285_FIXUP_HP_SPECTRE_X360
] = {
8593 .type
= HDA_FIXUP_FUNC
,
8594 .v
.func
= alc285_fixup_hp_spectre_x360
,
8596 [ALC285_FIXUP_HP_SPECTRE_X360_EB1
] = {
8597 .type
= HDA_FIXUP_FUNC
,
8598 .v
.func
= alc285_fixup_hp_spectre_x360_eb1
8600 [ALC287_FIXUP_IDEAPAD_BASS_SPK_AMP
] = {
8601 .type
= HDA_FIXUP_FUNC
,
8602 .v
.func
= alc285_fixup_ideapad_s740_coef
,
8604 .chain_id
= ALC285_FIXUP_THINKPAD_HEADSET_JACK
,
8606 [ALC623_FIXUP_LENOVO_THINKSTATION_P340
] = {
8607 .type
= HDA_FIXUP_FUNC
,
8608 .v
.func
= alc_fixup_no_shutup
,
8610 .chain_id
= ALC283_FIXUP_HEADSET_MIC
,
8612 [ALC255_FIXUP_ACER_HEADPHONE_AND_MIC
] = {
8613 .type
= HDA_FIXUP_PINS
,
8614 .v
.pins
= (const struct hda_pintbl
[]) {
8615 { 0x21, 0x03211030 }, /* Change the Headphone location to Left */
8619 .chain_id
= ALC255_FIXUP_XIAOMI_HEADSET_MIC
8621 [ALC236_FIXUP_HP_LIMIT_INT_MIC_BOOST
] = {
8622 .type
= HDA_FIXUP_FUNC
,
8623 .v
.func
= alc269_fixup_limit_int_mic_boost
,
8625 .chain_id
= ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF
,
8627 [ALC285_FIXUP_LEGION_Y9000X_SPEAKERS
] = {
8628 .type
= HDA_FIXUP_FUNC
,
8629 .v
.func
= alc285_fixup_ideapad_s740_coef
,
8631 .chain_id
= ALC285_FIXUP_LEGION_Y9000X_AUTOMUTE
,
8633 [ALC285_FIXUP_LEGION_Y9000X_AUTOMUTE
] = {
8634 .type
= HDA_FIXUP_FUNC
,
8635 .v
.func
= alc287_fixup_legion_15imhg05_speakers
,
8637 .chain_id
= ALC269_FIXUP_THINKPAD_ACPI
,
8639 [ALC287_FIXUP_LEGION_15IMHG05_SPEAKERS
] = {
8640 .type
= HDA_FIXUP_VERBS
,
8641 //.v.verbs = legion_15imhg05_coefs,
8642 .v
.verbs
= (const struct hda_verb
[]) {
8643 // set left speaker Legion 7i.
8644 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x24 },
8645 { 0x20, AC_VERB_SET_PROC_COEF
, 0x41 },
8647 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x26 },
8648 { 0x20, AC_VERB_SET_PROC_COEF
, 0xc },
8649 { 0x20, AC_VERB_SET_PROC_COEF
, 0x0 },
8650 { 0x20, AC_VERB_SET_PROC_COEF
, 0x1a },
8651 { 0x20, AC_VERB_SET_PROC_COEF
, 0xb020 },
8653 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x26 },
8654 { 0x20, AC_VERB_SET_PROC_COEF
, 0x2 },
8655 { 0x20, AC_VERB_SET_PROC_COEF
, 0x0 },
8656 { 0x20, AC_VERB_SET_PROC_COEF
, 0x0 },
8657 { 0x20, AC_VERB_SET_PROC_COEF
, 0xb020 },
8659 // set right speaker Legion 7i.
8660 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x24 },
8661 { 0x20, AC_VERB_SET_PROC_COEF
, 0x42 },
8663 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x26 },
8664 { 0x20, AC_VERB_SET_PROC_COEF
, 0xc },
8665 { 0x20, AC_VERB_SET_PROC_COEF
, 0x0 },
8666 { 0x20, AC_VERB_SET_PROC_COEF
, 0x2a },
8667 { 0x20, AC_VERB_SET_PROC_COEF
, 0xb020 },
8669 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x26 },
8670 { 0x20, AC_VERB_SET_PROC_COEF
, 0x2 },
8671 { 0x20, AC_VERB_SET_PROC_COEF
, 0x0 },
8672 { 0x20, AC_VERB_SET_PROC_COEF
, 0x0 },
8673 { 0x20, AC_VERB_SET_PROC_COEF
, 0xb020 },
8677 .chain_id
= ALC287_FIXUP_LEGION_15IMHG05_AUTOMUTE
,
8679 [ALC287_FIXUP_LEGION_15IMHG05_AUTOMUTE
] = {
8680 .type
= HDA_FIXUP_FUNC
,
8681 .v
.func
= alc287_fixup_legion_15imhg05_speakers
,
8683 .chain_id
= ALC269_FIXUP_HEADSET_MODE
,
8685 [ALC287_FIXUP_YOGA7_14ITL_SPEAKERS
] = {
8686 .type
= HDA_FIXUP_VERBS
,
8687 .v
.verbs
= (const struct hda_verb
[]) {
8688 // set left speaker Yoga 7i.
8689 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x24 },
8690 { 0x20, AC_VERB_SET_PROC_COEF
, 0x41 },
8692 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x26 },
8693 { 0x20, AC_VERB_SET_PROC_COEF
, 0xc },
8694 { 0x20, AC_VERB_SET_PROC_COEF
, 0x0 },
8695 { 0x20, AC_VERB_SET_PROC_COEF
, 0x1a },
8696 { 0x20, AC_VERB_SET_PROC_COEF
, 0xb020 },
8698 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x26 },
8699 { 0x20, AC_VERB_SET_PROC_COEF
, 0x2 },
8700 { 0x20, AC_VERB_SET_PROC_COEF
, 0x0 },
8701 { 0x20, AC_VERB_SET_PROC_COEF
, 0x0 },
8702 { 0x20, AC_VERB_SET_PROC_COEF
, 0xb020 },
8704 // set right speaker Yoga 7i.
8705 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x24 },
8706 { 0x20, AC_VERB_SET_PROC_COEF
, 0x46 },
8708 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x26 },
8709 { 0x20, AC_VERB_SET_PROC_COEF
, 0xc },
8710 { 0x20, AC_VERB_SET_PROC_COEF
, 0x0 },
8711 { 0x20, AC_VERB_SET_PROC_COEF
, 0x2a },
8712 { 0x20, AC_VERB_SET_PROC_COEF
, 0xb020 },
8714 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x26 },
8715 { 0x20, AC_VERB_SET_PROC_COEF
, 0x2 },
8716 { 0x20, AC_VERB_SET_PROC_COEF
, 0x0 },
8717 { 0x20, AC_VERB_SET_PROC_COEF
, 0x0 },
8718 { 0x20, AC_VERB_SET_PROC_COEF
, 0xb020 },
8722 .chain_id
= ALC269_FIXUP_HEADSET_MODE
,
8724 [ALC287_FIXUP_13S_GEN2_SPEAKERS
] = {
8725 .type
= HDA_FIXUP_VERBS
,
8726 .v
.verbs
= (const struct hda_verb
[]) {
8727 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x24 },
8728 { 0x20, AC_VERB_SET_PROC_COEF
, 0x41 },
8729 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x26 },
8730 { 0x20, AC_VERB_SET_PROC_COEF
, 0x2 },
8731 { 0x20, AC_VERB_SET_PROC_COEF
, 0x0 },
8732 { 0x20, AC_VERB_SET_PROC_COEF
, 0x0 },
8733 { 0x20, AC_VERB_SET_PROC_COEF
, 0xb020 },
8734 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x24 },
8735 { 0x20, AC_VERB_SET_PROC_COEF
, 0x42 },
8736 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x26 },
8737 { 0x20, AC_VERB_SET_PROC_COEF
, 0x2 },
8738 { 0x20, AC_VERB_SET_PROC_COEF
, 0x0 },
8739 { 0x20, AC_VERB_SET_PROC_COEF
, 0x0 },
8740 { 0x20, AC_VERB_SET_PROC_COEF
, 0xb020 },
8744 .chain_id
= ALC269_FIXUP_HEADSET_MODE
,
8746 [ALC256_FIXUP_SET_COEF_DEFAULTS
] = {
8747 .type
= HDA_FIXUP_FUNC
,
8748 .v
.func
= alc256_fixup_set_coef_defaults
,
8750 [ALC245_FIXUP_HP_GPIO_LED
] = {
8751 .type
= HDA_FIXUP_FUNC
,
8752 .v
.func
= alc245_fixup_hp_gpio_led
,
8754 [ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE
] = {
8755 .type
= HDA_FIXUP_PINS
,
8756 .v
.pins
= (const struct hda_pintbl
[]) {
8757 { 0x19, 0x03a11120 }, /* use as headset mic, without its own jack detect */
8761 .chain_id
= ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC
,
8763 [ALC233_FIXUP_NO_AUDIO_JACK
] = {
8764 .type
= HDA_FIXUP_FUNC
,
8765 .v
.func
= alc233_fixup_no_audio_jack
,
8767 [ALC256_FIXUP_MIC_NO_PRESENCE_AND_RESUME
] = {
8768 .type
= HDA_FIXUP_FUNC
,
8769 .v
.func
= alc256_fixup_mic_no_presence_and_resume
,
8771 .chain_id
= ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC
8773 [ALC287_FIXUP_LEGION_16ACHG6
] = {
8774 .type
= HDA_FIXUP_FUNC
,
8775 .v
.func
= alc287_fixup_legion_16achg6_speakers
,
8777 [ALC287_FIXUP_CS35L41_I2C_2
] = {
8778 .type
= HDA_FIXUP_FUNC
,
8779 .v
.func
= cs35l41_fixup_i2c_two
,
8781 .chain_id
= ALC269_FIXUP_THINKPAD_ACPI
,
8783 [ALC287_FIXUP_CS35L41_I2C_2_HP_GPIO_LED
] = {
8784 .type
= HDA_FIXUP_FUNC
,
8785 .v
.func
= cs35l41_fixup_i2c_two
,
8787 .chain_id
= ALC285_FIXUP_HP_MUTE_LED
,
8789 [ALC245_FIXUP_CS35L41_SPI_2
] = {
8790 .type
= HDA_FIXUP_FUNC
,
8791 .v
.func
= cs35l41_fixup_spi_two
,
8793 [ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED
] = {
8794 .type
= HDA_FIXUP_FUNC
,
8795 .v
.func
= cs35l41_fixup_spi_two
,
8797 .chain_id
= ALC285_FIXUP_HP_GPIO_LED
,
8799 [ALC245_FIXUP_CS35L41_SPI_4
] = {
8800 .type
= HDA_FIXUP_FUNC
,
8801 .v
.func
= cs35l41_fixup_spi_four
,
8803 [ALC245_FIXUP_CS35L41_SPI_4_HP_GPIO_LED
] = {
8804 .type
= HDA_FIXUP_FUNC
,
8805 .v
.func
= cs35l41_fixup_spi_four
,
8807 .chain_id
= ALC285_FIXUP_HP_GPIO_LED
,
8809 [ALC285_FIXUP_HP_SPEAKERS_MICMUTE_LED
] = {
8810 .type
= HDA_FIXUP_VERBS
,
8811 .v
.verbs
= (const struct hda_verb
[]) {
8812 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x19 },
8813 { 0x20, AC_VERB_SET_PROC_COEF
, 0x8e11 },
8817 .chain_id
= ALC285_FIXUP_HP_MUTE_LED
,
8819 [ALC269_FIXUP_DELL4_MIC_NO_PRESENCE_QUIET
] = {
8820 .type
= HDA_FIXUP_FUNC
,
8821 .v
.func
= alc_fixup_dell4_mic_no_presence_quiet
,
8823 .chain_id
= ALC269_FIXUP_DELL4_MIC_NO_PRESENCE
,
8825 [ALC295_FIXUP_FRAMEWORK_LAPTOP_MIC_NO_PRESENCE
] = {
8826 .type
= HDA_FIXUP_PINS
,
8827 .v
.pins
= (const struct hda_pintbl
[]) {
8828 { 0x19, 0x02a1112c }, /* use as headset mic, without its own jack detect */
8832 .chain_id
= ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC
8836 static const struct snd_pci_quirk alc269_fixup_tbl
[] = {
8837 SND_PCI_QUIRK(0x1025, 0x0283, "Acer TravelMate 8371", ALC269_FIXUP_INV_DMIC
),
8838 SND_PCI_QUIRK(0x1025, 0x029b, "Acer 1810TZ", ALC269_FIXUP_INV_DMIC
),
8839 SND_PCI_QUIRK(0x1025, 0x0349, "Acer AOD260", ALC269_FIXUP_INV_DMIC
),
8840 SND_PCI_QUIRK(0x1025, 0x047c, "Acer AC700", ALC269_FIXUP_ACER_AC700
),
8841 SND_PCI_QUIRK(0x1025, 0x072d, "Acer Aspire V5-571G", ALC269_FIXUP_ASPIRE_HEADSET_MIC
),
8842 SND_PCI_QUIRK(0x1025, 0x0740, "Acer AO725", ALC271_FIXUP_HP_GATE_MIC_JACK
),
8843 SND_PCI_QUIRK(0x1025, 0x0742, "Acer AO756", ALC271_FIXUP_HP_GATE_MIC_JACK
),
8844 SND_PCI_QUIRK(0x1025, 0x0762, "Acer Aspire E1-472", ALC271_FIXUP_HP_GATE_MIC_JACK_E1_572
),
8845 SND_PCI_QUIRK(0x1025, 0x0775, "Acer Aspire E1-572", ALC271_FIXUP_HP_GATE_MIC_JACK_E1_572
),
8846 SND_PCI_QUIRK(0x1025, 0x079b, "Acer Aspire V5-573G", ALC282_FIXUP_ASPIRE_V5_PINS
),
8847 SND_PCI_QUIRK(0x1025, 0x080d, "Acer Aspire V5-122P", ALC269_FIXUP_ASPIRE_HEADSET_MIC
),
8848 SND_PCI_QUIRK(0x1025, 0x0840, "Acer Aspire E1", ALC269VB_FIXUP_ASPIRE_E1_COEF
),
8849 SND_PCI_QUIRK(0x1025, 0x101c, "Acer Veriton N2510G", ALC269_FIXUP_LIFEBOOK
),
8850 SND_PCI_QUIRK(0x1025, 0x102b, "Acer Aspire C24-860", ALC286_FIXUP_ACER_AIO_MIC_NO_PRESENCE
),
8851 SND_PCI_QUIRK(0x1025, 0x1065, "Acer Aspire C20-820", ALC269VC_FIXUP_ACER_HEADSET_MIC
),
8852 SND_PCI_QUIRK(0x1025, 0x106d, "Acer Cloudbook 14", ALC283_FIXUP_CHROME_BOOK
),
8853 SND_PCI_QUIRK(0x1025, 0x1094, "Acer Aspire E5-575T", ALC255_FIXUP_ACER_LIMIT_INT_MIC_BOOST
),
8854 SND_PCI_QUIRK(0x1025, 0x1099, "Acer Aspire E5-523G", ALC255_FIXUP_ACER_MIC_NO_PRESENCE
),
8855 SND_PCI_QUIRK(0x1025, 0x110e, "Acer Aspire ES1-432", ALC255_FIXUP_ACER_MIC_NO_PRESENCE
),
8856 SND_PCI_QUIRK(0x1025, 0x1166, "Acer Veriton N4640G", ALC269_FIXUP_LIFEBOOK
),
8857 SND_PCI_QUIRK(0x1025, 0x1167, "Acer Veriton N6640G", ALC269_FIXUP_LIFEBOOK
),
8858 SND_PCI_QUIRK(0x1025, 0x1246, "Acer Predator Helios 500", ALC299_FIXUP_PREDATOR_SPK
),
8859 SND_PCI_QUIRK(0x1025, 0x1247, "Acer vCopperbox", ALC269VC_FIXUP_ACER_VCOPPERBOX_PINS
),
8860 SND_PCI_QUIRK(0x1025, 0x1248, "Acer Veriton N4660G", ALC269VC_FIXUP_ACER_MIC_NO_PRESENCE
),
8861 SND_PCI_QUIRK(0x1025, 0x1269, "Acer SWIFT SF314-54", ALC256_FIXUP_ACER_HEADSET_MIC
),
8862 SND_PCI_QUIRK(0x1025, 0x128f, "Acer Veriton Z6860G", ALC286_FIXUP_ACER_AIO_HEADSET_MIC
),
8863 SND_PCI_QUIRK(0x1025, 0x1290, "Acer Veriton Z4860G", ALC286_FIXUP_ACER_AIO_HEADSET_MIC
),
8864 SND_PCI_QUIRK(0x1025, 0x1291, "Acer Veriton Z4660G", ALC286_FIXUP_ACER_AIO_HEADSET_MIC
),
8865 SND_PCI_QUIRK(0x1025, 0x129c, "Acer SWIFT SF314-55", ALC256_FIXUP_ACER_HEADSET_MIC
),
8866 SND_PCI_QUIRK(0x1025, 0x1300, "Acer SWIFT SF314-56", ALC256_FIXUP_ACER_MIC_NO_PRESENCE
),
8867 SND_PCI_QUIRK(0x1025, 0x1308, "Acer Aspire Z24-890", ALC286_FIXUP_ACER_AIO_HEADSET_MIC
),
8868 SND_PCI_QUIRK(0x1025, 0x132a, "Acer TravelMate B114-21", ALC233_FIXUP_ACER_HEADSET_MIC
),
8869 SND_PCI_QUIRK(0x1025, 0x1330, "Acer TravelMate X514-51T", ALC255_FIXUP_ACER_HEADSET_MIC
),
8870 SND_PCI_QUIRK(0x1025, 0x141f, "Acer Spin SP513-54N", ALC255_FIXUP_ACER_MIC_NO_PRESENCE
),
8871 SND_PCI_QUIRK(0x1025, 0x142b, "Acer Swift SF314-42", ALC255_FIXUP_ACER_MIC_NO_PRESENCE
),
8872 SND_PCI_QUIRK(0x1025, 0x1430, "Acer TravelMate B311R-31", ALC256_FIXUP_ACER_MIC_NO_PRESENCE
),
8873 SND_PCI_QUIRK(0x1025, 0x1466, "Acer Aspire A515-56", ALC255_FIXUP_ACER_HEADPHONE_AND_MIC
),
8874 SND_PCI_QUIRK(0x1028, 0x0470, "Dell M101z", ALC269_FIXUP_DELL_M101Z
),
8875 SND_PCI_QUIRK(0x1028, 0x054b, "Dell XPS one 2710", ALC275_FIXUP_DELL_XPS
),
8876 SND_PCI_QUIRK(0x1028, 0x05bd, "Dell Latitude E6440", ALC292_FIXUP_DELL_E7X
),
8877 SND_PCI_QUIRK(0x1028, 0x05be, "Dell Latitude E6540", ALC292_FIXUP_DELL_E7X
),
8878 SND_PCI_QUIRK(0x1028, 0x05ca, "Dell Latitude E7240", ALC292_FIXUP_DELL_E7X
),
8879 SND_PCI_QUIRK(0x1028, 0x05cb, "Dell Latitude E7440", ALC292_FIXUP_DELL_E7X
),
8880 SND_PCI_QUIRK(0x1028, 0x05da, "Dell Vostro 5460", ALC290_FIXUP_SUBWOOFER
),
8881 SND_PCI_QUIRK(0x1028, 0x05f4, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE
),
8882 SND_PCI_QUIRK(0x1028, 0x05f5, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE
),
8883 SND_PCI_QUIRK(0x1028, 0x05f6, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE
),
8884 SND_PCI_QUIRK(0x1028, 0x0615, "Dell Vostro 5470", ALC290_FIXUP_SUBWOOFER_HSJACK
),
8885 SND_PCI_QUIRK(0x1028, 0x0616, "Dell Vostro 5470", ALC290_FIXUP_SUBWOOFER_HSJACK
),
8886 SND_PCI_QUIRK(0x1028, 0x062c, "Dell Latitude E5550", ALC292_FIXUP_DELL_E7X
),
8887 SND_PCI_QUIRK(0x1028, 0x062e, "Dell Latitude E7450", ALC292_FIXUP_DELL_E7X
),
8888 SND_PCI_QUIRK(0x1028, 0x0638, "Dell Inspiron 5439", ALC290_FIXUP_MONO_SPEAKERS_HSJACK
),
8889 SND_PCI_QUIRK(0x1028, 0x064a, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE
),
8890 SND_PCI_QUIRK(0x1028, 0x064b, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE
),
8891 SND_PCI_QUIRK(0x1028, 0x0665, "Dell XPS 13", ALC288_FIXUP_DELL_XPS_13
),
8892 SND_PCI_QUIRK(0x1028, 0x0669, "Dell Optiplex 9020m", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE
),
8893 SND_PCI_QUIRK(0x1028, 0x069a, "Dell Vostro 5480", ALC290_FIXUP_SUBWOOFER_HSJACK
),
8894 SND_PCI_QUIRK(0x1028, 0x06c7, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE
),
8895 SND_PCI_QUIRK(0x1028, 0x06d9, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE
),
8896 SND_PCI_QUIRK(0x1028, 0x06da, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE
),
8897 SND_PCI_QUIRK(0x1028, 0x06db, "Dell", ALC293_FIXUP_DISABLE_AAMIX_MULTIJACK
),
8898 SND_PCI_QUIRK(0x1028, 0x06dd, "Dell", ALC293_FIXUP_DISABLE_AAMIX_MULTIJACK
),
8899 SND_PCI_QUIRK(0x1028, 0x06de, "Dell", ALC293_FIXUP_DISABLE_AAMIX_MULTIJACK
),
8900 SND_PCI_QUIRK(0x1028, 0x06df, "Dell", ALC293_FIXUP_DISABLE_AAMIX_MULTIJACK
),
8901 SND_PCI_QUIRK(0x1028, 0x06e0, "Dell", ALC293_FIXUP_DISABLE_AAMIX_MULTIJACK
),
8902 SND_PCI_QUIRK(0x1028, 0x0706, "Dell Inspiron 7559", ALC256_FIXUP_DELL_INSPIRON_7559_SUBWOOFER
),
8903 SND_PCI_QUIRK(0x1028, 0x0725, "Dell Inspiron 3162", ALC255_FIXUP_DELL_SPK_NOISE
),
8904 SND_PCI_QUIRK(0x1028, 0x0738, "Dell Precision 5820", ALC269_FIXUP_NO_SHUTUP
),
8905 SND_PCI_QUIRK(0x1028, 0x075c, "Dell XPS 27 7760", ALC298_FIXUP_SPK_VOLUME
),
8906 SND_PCI_QUIRK(0x1028, 0x075d, "Dell AIO", ALC298_FIXUP_SPK_VOLUME
),
8907 SND_PCI_QUIRK(0x1028, 0x0798, "Dell Inspiron 17 7000 Gaming", ALC256_FIXUP_DELL_INSPIRON_7559_SUBWOOFER
),
8908 SND_PCI_QUIRK(0x1028, 0x07b0, "Dell Precision 7520", ALC295_FIXUP_DISABLE_DAC3
),
8909 SND_PCI_QUIRK(0x1028, 0x080c, "Dell WYSE", ALC225_FIXUP_DELL_WYSE_MIC_NO_PRESENCE
),
8910 SND_PCI_QUIRK(0x1028, 0x084b, "Dell", ALC274_FIXUP_DELL_AIO_LINEOUT_VERB
),
8911 SND_PCI_QUIRK(0x1028, 0x084e, "Dell", ALC274_FIXUP_DELL_AIO_LINEOUT_VERB
),
8912 SND_PCI_QUIRK(0x1028, 0x0871, "Dell Precision 3630", ALC255_FIXUP_DELL_HEADSET_MIC
),
8913 SND_PCI_QUIRK(0x1028, 0x0872, "Dell Precision 3630", ALC255_FIXUP_DELL_HEADSET_MIC
),
8914 SND_PCI_QUIRK(0x1028, 0x0873, "Dell Precision 3930", ALC255_FIXUP_DUMMY_LINEOUT_VERB
),
8915 SND_PCI_QUIRK(0x1028, 0x08ad, "Dell WYSE AIO", ALC225_FIXUP_DELL_WYSE_AIO_MIC_NO_PRESENCE
),
8916 SND_PCI_QUIRK(0x1028, 0x08ae, "Dell WYSE NB", ALC225_FIXUP_DELL1_MIC_NO_PRESENCE
),
8917 SND_PCI_QUIRK(0x1028, 0x0935, "Dell", ALC274_FIXUP_DELL_AIO_LINEOUT_VERB
),
8918 SND_PCI_QUIRK(0x1028, 0x097d, "Dell Precision", ALC289_FIXUP_DUAL_SPK
),
8919 SND_PCI_QUIRK(0x1028, 0x097e, "Dell Precision", ALC289_FIXUP_DUAL_SPK
),
8920 SND_PCI_QUIRK(0x1028, 0x098d, "Dell Precision", ALC233_FIXUP_ASUS_MIC_NO_PRESENCE
),
8921 SND_PCI_QUIRK(0x1028, 0x09bf, "Dell Precision", ALC233_FIXUP_ASUS_MIC_NO_PRESENCE
),
8922 SND_PCI_QUIRK(0x1028, 0x0a2e, "Dell", ALC236_FIXUP_DELL_AIO_HEADSET_MIC
),
8923 SND_PCI_QUIRK(0x1028, 0x0a30, "Dell", ALC236_FIXUP_DELL_AIO_HEADSET_MIC
),
8924 SND_PCI_QUIRK(0x1028, 0x0a38, "Dell Latitude 7520", ALC269_FIXUP_DELL4_MIC_NO_PRESENCE_QUIET
),
8925 SND_PCI_QUIRK(0x1028, 0x0a58, "Dell", ALC255_FIXUP_DELL_HEADSET_MIC
),
8926 SND_PCI_QUIRK(0x1028, 0x0a61, "Dell XPS 15 9510", ALC289_FIXUP_DUAL_SPK
),
8927 SND_PCI_QUIRK(0x1028, 0x0a62, "Dell Precision 5560", ALC289_FIXUP_DUAL_SPK
),
8928 SND_PCI_QUIRK(0x1028, 0x0a9d, "Dell Latitude 5430", ALC269_FIXUP_DELL4_MIC_NO_PRESENCE
),
8929 SND_PCI_QUIRK(0x1028, 0x0a9e, "Dell Latitude 5430", ALC269_FIXUP_DELL4_MIC_NO_PRESENCE
),
8930 SND_PCI_QUIRK(0x1028, 0x0b19, "Dell XPS 15 9520", ALC289_FIXUP_DUAL_SPK
),
8931 SND_PCI_QUIRK(0x1028, 0x164a, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE
),
8932 SND_PCI_QUIRK(0x1028, 0x164b, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE
),
8933 SND_PCI_QUIRK(0x103c, 0x1586, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC2
),
8934 SND_PCI_QUIRK(0x103c, 0x18e6, "HP", ALC269_FIXUP_HP_GPIO_LED
),
8935 SND_PCI_QUIRK(0x103c, 0x218b, "HP", ALC269_FIXUP_LIMIT_INT_MIC_BOOST_MUTE_LED
),
8936 SND_PCI_QUIRK(0x103c, 0x21f9, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1
),
8937 SND_PCI_QUIRK(0x103c, 0x2210, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1
),
8938 SND_PCI_QUIRK(0x103c, 0x2214, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1
),
8939 SND_PCI_QUIRK(0x103c, 0x221b, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED
),
8940 SND_PCI_QUIRK(0x103c, 0x221c, "HP EliteBook 755 G2", ALC280_FIXUP_HP_HEADSET_MIC
),
8941 SND_PCI_QUIRK(0x103c, 0x2221, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED
),
8942 SND_PCI_QUIRK(0x103c, 0x2225, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED
),
8943 SND_PCI_QUIRK(0x103c, 0x2236, "HP", ALC269_FIXUP_HP_LINE1_MIC1_LED
),
8944 SND_PCI_QUIRK(0x103c, 0x2237, "HP", ALC269_FIXUP_HP_LINE1_MIC1_LED
),
8945 SND_PCI_QUIRK(0x103c, 0x2238, "HP", ALC269_FIXUP_HP_LINE1_MIC1_LED
),
8946 SND_PCI_QUIRK(0x103c, 0x2239, "HP", ALC269_FIXUP_HP_LINE1_MIC1_LED
),
8947 SND_PCI_QUIRK(0x103c, 0x224b, "HP", ALC269_FIXUP_HP_LINE1_MIC1_LED
),
8948 SND_PCI_QUIRK(0x103c, 0x2253, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED
),
8949 SND_PCI_QUIRK(0x103c, 0x2254, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED
),
8950 SND_PCI_QUIRK(0x103c, 0x2255, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED
),
8951 SND_PCI_QUIRK(0x103c, 0x2256, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED
),
8952 SND_PCI_QUIRK(0x103c, 0x2257, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED
),
8953 SND_PCI_QUIRK(0x103c, 0x2259, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED
),
8954 SND_PCI_QUIRK(0x103c, 0x225a, "HP", ALC269_FIXUP_HP_DOCK_GPIO_MIC1_LED
),
8955 SND_PCI_QUIRK(0x103c, 0x225f, "HP", ALC280_FIXUP_HP_GPIO2_MIC_HOTKEY
),
8956 SND_PCI_QUIRK(0x103c, 0x2260, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1
),
8957 SND_PCI_QUIRK(0x103c, 0x2263, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1
),
8958 SND_PCI_QUIRK(0x103c, 0x2264, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1
),
8959 SND_PCI_QUIRK(0x103c, 0x2265, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1
),
8960 SND_PCI_QUIRK(0x103c, 0x2268, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1
),
8961 SND_PCI_QUIRK(0x103c, 0x226a, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1
),
8962 SND_PCI_QUIRK(0x103c, 0x226b, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1
),
8963 SND_PCI_QUIRK(0x103c, 0x226e, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1
),
8964 SND_PCI_QUIRK(0x103c, 0x2271, "HP", ALC286_FIXUP_HP_GPIO_LED
),
8965 SND_PCI_QUIRK(0x103c, 0x2272, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED
),
8966 SND_PCI_QUIRK(0x103c, 0x2272, "HP", ALC280_FIXUP_HP_DOCK_PINS
),
8967 SND_PCI_QUIRK(0x103c, 0x2273, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED
),
8968 SND_PCI_QUIRK(0x103c, 0x2273, "HP", ALC280_FIXUP_HP_DOCK_PINS
),
8969 SND_PCI_QUIRK(0x103c, 0x2278, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED
),
8970 SND_PCI_QUIRK(0x103c, 0x227f, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1
),
8971 SND_PCI_QUIRK(0x103c, 0x2282, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1
),
8972 SND_PCI_QUIRK(0x103c, 0x228b, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1
),
8973 SND_PCI_QUIRK(0x103c, 0x228e, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1
),
8974 SND_PCI_QUIRK(0x103c, 0x229e, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1
),
8975 SND_PCI_QUIRK(0x103c, 0x22b2, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1
),
8976 SND_PCI_QUIRK(0x103c, 0x22b7, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1
),
8977 SND_PCI_QUIRK(0x103c, 0x22bf, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1
),
8978 SND_PCI_QUIRK(0x103c, 0x22c4, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1
),
8979 SND_PCI_QUIRK(0x103c, 0x22c5, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1
),
8980 SND_PCI_QUIRK(0x103c, 0x22c7, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1
),
8981 SND_PCI_QUIRK(0x103c, 0x22c8, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1
),
8982 SND_PCI_QUIRK(0x103c, 0x22cf, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1
),
8983 SND_PCI_QUIRK(0x103c, 0x22db, "HP", ALC280_FIXUP_HP_9480M
),
8984 SND_PCI_QUIRK(0x103c, 0x22dc, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED
),
8985 SND_PCI_QUIRK(0x103c, 0x22fb, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED
),
8986 SND_PCI_QUIRK(0x103c, 0x2334, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1
),
8987 SND_PCI_QUIRK(0x103c, 0x2335, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1
),
8988 SND_PCI_QUIRK(0x103c, 0x2336, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1
),
8989 SND_PCI_QUIRK(0x103c, 0x2337, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1
),
8990 SND_PCI_QUIRK(0x103c, 0x802e, "HP Z240 SFF", ALC221_FIXUP_HP_MIC_NO_PRESENCE
),
8991 SND_PCI_QUIRK(0x103c, 0x802f, "HP Z240", ALC221_FIXUP_HP_MIC_NO_PRESENCE
),
8992 SND_PCI_QUIRK(0x103c, 0x8077, "HP", ALC256_FIXUP_HP_HEADSET_MIC
),
8993 SND_PCI_QUIRK(0x103c, 0x8158, "HP", ALC256_FIXUP_HP_HEADSET_MIC
),
8994 SND_PCI_QUIRK(0x103c, 0x820d, "HP Pavilion 15", ALC269_FIXUP_HP_MUTE_LED_MIC3
),
8995 SND_PCI_QUIRK(0x103c, 0x8256, "HP", ALC221_FIXUP_HP_FRONT_MIC
),
8996 SND_PCI_QUIRK(0x103c, 0x827e, "HP x360", ALC295_FIXUP_HP_X360
),
8997 SND_PCI_QUIRK(0x103c, 0x827f, "HP x360", ALC269_FIXUP_HP_MUTE_LED_MIC3
),
8998 SND_PCI_QUIRK(0x103c, 0x82bf, "HP G3 mini", ALC221_FIXUP_HP_MIC_NO_PRESENCE
),
8999 SND_PCI_QUIRK(0x103c, 0x82c0, "HP G3 mini premium", ALC221_FIXUP_HP_MIC_NO_PRESENCE
),
9000 SND_PCI_QUIRK(0x103c, 0x83b9, "HP Spectre x360", ALC269_FIXUP_HP_MUTE_LED_MIC3
),
9001 SND_PCI_QUIRK(0x103c, 0x841c, "HP Pavilion 15-CK0xx", ALC269_FIXUP_HP_MUTE_LED_MIC3
),
9002 SND_PCI_QUIRK(0x103c, 0x8497, "HP Envy x360", ALC269_FIXUP_HP_MUTE_LED_MIC3
),
9003 SND_PCI_QUIRK(0x103c, 0x84da, "HP OMEN dc0019-ur", ALC295_FIXUP_HP_OMEN
),
9004 SND_PCI_QUIRK(0x103c, 0x84e7, "HP Pavilion 15", ALC269_FIXUP_HP_MUTE_LED_MIC3
),
9005 SND_PCI_QUIRK(0x103c, 0x8519, "HP Spectre x360 15-df0xxx", ALC285_FIXUP_HP_SPECTRE_X360
),
9006 SND_PCI_QUIRK(0x103c, 0x860f, "HP ZBook 15 G6", ALC285_FIXUP_HP_GPIO_AMP_INIT
),
9007 SND_PCI_QUIRK(0x103c, 0x861f, "HP Elite Dragonfly G1", ALC285_FIXUP_HP_GPIO_AMP_INIT
),
9008 SND_PCI_QUIRK(0x103c, 0x869d, "HP", ALC236_FIXUP_HP_MUTE_LED
),
9009 SND_PCI_QUIRK(0x103c, 0x86c7, "HP Envy AiO 32", ALC274_FIXUP_HP_ENVY_GPIO
),
9010 SND_PCI_QUIRK(0x103c, 0x8716, "HP Elite Dragonfly G2 Notebook PC", ALC285_FIXUP_HP_GPIO_AMP_INIT
),
9011 SND_PCI_QUIRK(0x103c, 0x8720, "HP EliteBook x360 1040 G8 Notebook PC", ALC285_FIXUP_HP_GPIO_AMP_INIT
),
9012 SND_PCI_QUIRK(0x103c, 0x8724, "HP EliteBook 850 G7", ALC285_FIXUP_HP_GPIO_LED
),
9013 SND_PCI_QUIRK(0x103c, 0x8728, "HP EliteBook 840 G7", ALC285_FIXUP_HP_GPIO_LED
),
9014 SND_PCI_QUIRK(0x103c, 0x8729, "HP", ALC285_FIXUP_HP_GPIO_LED
),
9015 SND_PCI_QUIRK(0x103c, 0x8730, "HP ProBook 445 G7", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF
),
9016 SND_PCI_QUIRK(0x103c, 0x8735, "HP ProBook 435 G7", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF
),
9017 SND_PCI_QUIRK(0x103c, 0x8736, "HP", ALC285_FIXUP_HP_GPIO_AMP_INIT
),
9018 SND_PCI_QUIRK(0x103c, 0x8760, "HP", ALC285_FIXUP_HP_MUTE_LED
),
9019 SND_PCI_QUIRK(0x103c, 0x877a, "HP", ALC285_FIXUP_HP_MUTE_LED
),
9020 SND_PCI_QUIRK(0x103c, 0x877d, "HP", ALC236_FIXUP_HP_MUTE_LED
),
9021 SND_PCI_QUIRK(0x103c, 0x8780, "HP ZBook Fury 17 G7 Mobile Workstation",
9022 ALC285_FIXUP_HP_GPIO_AMP_INIT
),
9023 SND_PCI_QUIRK(0x103c, 0x8783, "HP ZBook Fury 15 G7 Mobile Workstation",
9024 ALC285_FIXUP_HP_GPIO_AMP_INIT
),
9025 SND_PCI_QUIRK(0x103c, 0x8788, "HP OMEN 15", ALC285_FIXUP_HP_MUTE_LED
),
9026 SND_PCI_QUIRK(0x103c, 0x87c8, "HP", ALC287_FIXUP_HP_GPIO_LED
),
9027 SND_PCI_QUIRK(0x103c, 0x87e5, "HP ProBook 440 G8 Notebook PC", ALC236_FIXUP_HP_GPIO_LED
),
9028 SND_PCI_QUIRK(0x103c, 0x87e7, "HP ProBook 450 G8 Notebook PC", ALC236_FIXUP_HP_GPIO_LED
),
9029 SND_PCI_QUIRK(0x103c, 0x87f1, "HP ProBook 630 G8 Notebook PC", ALC236_FIXUP_HP_GPIO_LED
),
9030 SND_PCI_QUIRK(0x103c, 0x87f2, "HP ProBook 640 G8 Notebook PC", ALC236_FIXUP_HP_GPIO_LED
),
9031 SND_PCI_QUIRK(0x103c, 0x87f4, "HP", ALC287_FIXUP_HP_GPIO_LED
),
9032 SND_PCI_QUIRK(0x103c, 0x87f5, "HP", ALC287_FIXUP_HP_GPIO_LED
),
9033 SND_PCI_QUIRK(0x103c, 0x87f6, "HP Spectre x360 14", ALC245_FIXUP_HP_X360_AMP
),
9034 SND_PCI_QUIRK(0x103c, 0x87f7, "HP Spectre x360 14", ALC245_FIXUP_HP_X360_AMP
),
9035 SND_PCI_QUIRK(0x103c, 0x8805, "HP ProBook 650 G8 Notebook PC", ALC236_FIXUP_HP_GPIO_LED
),
9036 SND_PCI_QUIRK(0x103c, 0x880d, "HP EliteBook 830 G8 Notebook PC", ALC285_FIXUP_HP_GPIO_LED
),
9037 SND_PCI_QUIRK(0x103c, 0x8811, "HP Spectre x360 15-eb1xxx", ALC285_FIXUP_HP_SPECTRE_X360_EB1
),
9038 SND_PCI_QUIRK(0x103c, 0x8812, "HP Spectre x360 15-eb1xxx", ALC285_FIXUP_HP_SPECTRE_X360_EB1
),
9039 SND_PCI_QUIRK(0x103c, 0x8846, "HP EliteBook 850 G8 Notebook PC", ALC285_FIXUP_HP_GPIO_LED
),
9040 SND_PCI_QUIRK(0x103c, 0x8847, "HP EliteBook x360 830 G8 Notebook PC", ALC285_FIXUP_HP_GPIO_LED
),
9041 SND_PCI_QUIRK(0x103c, 0x884b, "HP EliteBook 840 Aero G8 Notebook PC", ALC285_FIXUP_HP_GPIO_LED
),
9042 SND_PCI_QUIRK(0x103c, 0x884c, "HP EliteBook 840 G8 Notebook PC", ALC285_FIXUP_HP_GPIO_LED
),
9043 SND_PCI_QUIRK(0x103c, 0x8862, "HP ProBook 445 G8 Notebook PC", ALC236_FIXUP_HP_LIMIT_INT_MIC_BOOST
),
9044 SND_PCI_QUIRK(0x103c, 0x8863, "HP ProBook 445 G8 Notebook PC", ALC236_FIXUP_HP_LIMIT_INT_MIC_BOOST
),
9045 SND_PCI_QUIRK(0x103c, 0x886d, "HP ZBook Fury 17.3 Inch G8 Mobile Workstation PC", ALC285_FIXUP_HP_GPIO_AMP_INIT
),
9046 SND_PCI_QUIRK(0x103c, 0x8870, "HP ZBook Fury 15.6 Inch G8 Mobile Workstation PC", ALC285_FIXUP_HP_GPIO_AMP_INIT
),
9047 SND_PCI_QUIRK(0x103c, 0x8873, "HP ZBook Studio 15.6 Inch G8 Mobile Workstation PC", ALC285_FIXUP_HP_GPIO_AMP_INIT
),
9048 SND_PCI_QUIRK(0x103c, 0x888d, "HP ZBook Power 15.6 inch G8 Mobile Workstation PC", ALC236_FIXUP_HP_GPIO_LED
),
9049 SND_PCI_QUIRK(0x103c, 0x8895, "HP EliteBook 855 G8 Notebook PC", ALC285_FIXUP_HP_SPEAKERS_MICMUTE_LED
),
9050 SND_PCI_QUIRK(0x103c, 0x8896, "HP EliteBook 855 G8 Notebook PC", ALC285_FIXUP_HP_MUTE_LED
),
9051 SND_PCI_QUIRK(0x103c, 0x8898, "HP EliteBook 845 G8 Notebook PC", ALC285_FIXUP_HP_LIMIT_INT_MIC_BOOST
),
9052 SND_PCI_QUIRK(0x103c, 0x88d0, "HP Pavilion 15-eh1xxx (mainboard 88D0)", ALC287_FIXUP_HP_GPIO_LED
),
9053 SND_PCI_QUIRK(0x103c, 0x896e, "HP EliteBook x360 830 G9", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED
),
9054 SND_PCI_QUIRK(0x103c, 0x8971, "HP EliteBook 830 G9", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED
),
9055 SND_PCI_QUIRK(0x103c, 0x8972, "HP EliteBook 840 G9", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED
),
9056 SND_PCI_QUIRK(0x103c, 0x8973, "HP EliteBook 860 G9", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED
),
9057 SND_PCI_QUIRK(0x103c, 0x8974, "HP EliteBook 840 Aero G9", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED
),
9058 SND_PCI_QUIRK(0x103c, 0x8975, "HP EliteBook x360 840 Aero G9", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED
),
9059 SND_PCI_QUIRK(0x103c, 0x8981, "HP Elite Dragonfly G3", ALC245_FIXUP_CS35L41_SPI_4
),
9060 SND_PCI_QUIRK(0x103c, 0x898e, "HP EliteBook 835 G9", ALC287_FIXUP_CS35L41_I2C_2
),
9061 SND_PCI_QUIRK(0x103c, 0x898f, "HP EliteBook 835 G9", ALC287_FIXUP_CS35L41_I2C_2
),
9062 SND_PCI_QUIRK(0x103c, 0x8991, "HP EliteBook 845 G9", ALC287_FIXUP_CS35L41_I2C_2_HP_GPIO_LED
),
9063 SND_PCI_QUIRK(0x103c, 0x8992, "HP EliteBook 845 G9", ALC287_FIXUP_CS35L41_I2C_2
),
9064 SND_PCI_QUIRK(0x103c, 0x8994, "HP EliteBook 855 G9", ALC287_FIXUP_CS35L41_I2C_2_HP_GPIO_LED
),
9065 SND_PCI_QUIRK(0x103c, 0x8995, "HP EliteBook 855 G9", ALC287_FIXUP_CS35L41_I2C_2
),
9066 SND_PCI_QUIRK(0x103c, 0x89a4, "HP ProBook 440 G9", ALC236_FIXUP_HP_GPIO_LED
),
9067 SND_PCI_QUIRK(0x103c, 0x89a6, "HP ProBook 450 G9", ALC236_FIXUP_HP_GPIO_LED
),
9068 SND_PCI_QUIRK(0x103c, 0x89aa, "HP EliteBook 630 G9", ALC236_FIXUP_HP_GPIO_LED
),
9069 SND_PCI_QUIRK(0x103c, 0x89ac, "HP EliteBook 640 G9", ALC236_FIXUP_HP_GPIO_LED
),
9070 SND_PCI_QUIRK(0x103c, 0x89ae, "HP EliteBook 650 G9", ALC236_FIXUP_HP_GPIO_LED
),
9071 SND_PCI_QUIRK(0x103c, 0x89c3, "Zbook Studio G9", ALC245_FIXUP_CS35L41_SPI_4_HP_GPIO_LED
),
9072 SND_PCI_QUIRK(0x103c, 0x89c6, "Zbook Fury 17 G9", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED
),
9073 SND_PCI_QUIRK(0x103c, 0x89ca, "HP", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF
),
9074 SND_PCI_QUIRK(0x1043, 0x103e, "ASUS X540SA", ALC256_FIXUP_ASUS_MIC
),
9075 SND_PCI_QUIRK(0x1043, 0x103f, "ASUS TX300", ALC282_FIXUP_ASUS_TX300
),
9076 SND_PCI_QUIRK(0x1043, 0x106d, "Asus K53BE", ALC269_FIXUP_LIMIT_INT_MIC_BOOST
),
9077 SND_PCI_QUIRK(0x1043, 0x10a1, "ASUS UX391UA", ALC294_FIXUP_ASUS_SPK
),
9078 SND_PCI_QUIRK(0x1043, 0x10c0, "ASUS X540SA", ALC256_FIXUP_ASUS_MIC
),
9079 SND_PCI_QUIRK(0x1043, 0x10d0, "ASUS X540LA/X540LJ", ALC255_FIXUP_ASUS_MIC_NO_PRESENCE
),
9080 SND_PCI_QUIRK(0x1043, 0x115d, "Asus 1015E", ALC269_FIXUP_LIMIT_INT_MIC_BOOST
),
9081 SND_PCI_QUIRK(0x1043, 0x11c0, "ASUS X556UR", ALC255_FIXUP_ASUS_MIC_NO_PRESENCE
),
9082 SND_PCI_QUIRK(0x1043, 0x125e, "ASUS Q524UQK", ALC255_FIXUP_ASUS_MIC_NO_PRESENCE
),
9083 SND_PCI_QUIRK(0x1043, 0x1271, "ASUS X430UN", ALC256_FIXUP_ASUS_MIC_NO_PRESENCE
),
9084 SND_PCI_QUIRK(0x1043, 0x1290, "ASUS X441SA", ALC233_FIXUP_EAPD_COEF_AND_MIC_NO_PRESENCE
),
9085 SND_PCI_QUIRK(0x1043, 0x12a0, "ASUS X441UV", ALC233_FIXUP_EAPD_COEF_AND_MIC_NO_PRESENCE
),
9086 SND_PCI_QUIRK(0x1043, 0x12e0, "ASUS X541SA", ALC256_FIXUP_ASUS_MIC
),
9087 SND_PCI_QUIRK(0x1043, 0x12f0, "ASUS X541UV", ALC256_FIXUP_ASUS_MIC
),
9088 SND_PCI_QUIRK(0x1043, 0x13b0, "ASUS Z550SA", ALC256_FIXUP_ASUS_MIC
),
9089 SND_PCI_QUIRK(0x1043, 0x1427, "Asus Zenbook UX31E", ALC269VB_FIXUP_ASUS_ZENBOOK
),
9090 SND_PCI_QUIRK(0x1043, 0x1517, "Asus Zenbook UX31A", ALC269VB_FIXUP_ASUS_ZENBOOK_UX31A
),
9091 SND_PCI_QUIRK(0x1043, 0x16e3, "ASUS UX50", ALC269_FIXUP_STEREO_DMIC
),
9092 SND_PCI_QUIRK(0x1043, 0x1740, "ASUS UX430UA", ALC295_FIXUP_ASUS_DACS
),
9093 SND_PCI_QUIRK(0x1043, 0x17d1, "ASUS UX431FL", ALC294_FIXUP_ASUS_DUAL_SPK
),
9094 SND_PCI_QUIRK(0x1043, 0x1662, "ASUS GV301QH", ALC294_FIXUP_ASUS_DUAL_SPK
),
9095 SND_PCI_QUIRK(0x1043, 0x1881, "ASUS Zephyrus S/M", ALC294_FIXUP_ASUS_GX502_PINS
),
9096 SND_PCI_QUIRK(0x1043, 0x18b1, "Asus MJ401TA", ALC256_FIXUP_ASUS_HEADSET_MIC
),
9097 SND_PCI_QUIRK(0x1043, 0x18f1, "Asus FX505DT", ALC256_FIXUP_ASUS_HEADSET_MIC
),
9098 SND_PCI_QUIRK(0x1043, 0x194e, "ASUS UX563FD", ALC294_FIXUP_ASUS_HPE
),
9099 SND_PCI_QUIRK(0x1043, 0x1970, "ASUS UX550VE", ALC289_FIXUP_ASUS_GA401
),
9100 SND_PCI_QUIRK(0x1043, 0x1982, "ASUS B1400CEPE", ALC256_FIXUP_ASUS_HPE
),
9101 SND_PCI_QUIRK(0x1043, 0x19ce, "ASUS B9450FA", ALC294_FIXUP_ASUS_HPE
),
9102 SND_PCI_QUIRK(0x1043, 0x19e1, "ASUS UX581LV", ALC295_FIXUP_ASUS_MIC_NO_PRESENCE
),
9103 SND_PCI_QUIRK(0x1043, 0x1a13, "Asus G73Jw", ALC269_FIXUP_ASUS_G73JW
),
9104 SND_PCI_QUIRK(0x1043, 0x1a30, "ASUS X705UD", ALC256_FIXUP_ASUS_MIC
),
9105 SND_PCI_QUIRK(0x1043, 0x1b11, "ASUS UX431DA", ALC294_FIXUP_ASUS_COEF_1B
),
9106 SND_PCI_QUIRK(0x1043, 0x1b13, "Asus U41SV", ALC269_FIXUP_INV_DMIC
),
9107 SND_PCI_QUIRK(0x1043, 0x1bbd, "ASUS Z550MA", ALC255_FIXUP_ASUS_MIC_NO_PRESENCE
),
9108 SND_PCI_QUIRK(0x1043, 0x1c23, "Asus X55U", ALC269_FIXUP_LIMIT_INT_MIC_BOOST
),
9109 SND_PCI_QUIRK(0x1043, 0x1ccd, "ASUS X555UB", ALC256_FIXUP_ASUS_MIC
),
9110 SND_PCI_QUIRK(0x1043, 0x1d4e, "ASUS TM420", ALC256_FIXUP_ASUS_HPE
),
9111 SND_PCI_QUIRK(0x1043, 0x1e11, "ASUS Zephyrus G15", ALC289_FIXUP_ASUS_GA502
),
9112 SND_PCI_QUIRK(0x1043, 0x1e51, "ASUS Zephyrus M15", ALC294_FIXUP_ASUS_GU502_PINS
),
9113 SND_PCI_QUIRK(0x1043, 0x1e8e, "ASUS Zephyrus G15", ALC289_FIXUP_ASUS_GA401
),
9114 SND_PCI_QUIRK(0x1043, 0x1f11, "ASUS Zephyrus G14", ALC289_FIXUP_ASUS_GA401
),
9115 SND_PCI_QUIRK(0x1043, 0x1d42, "ASUS Zephyrus G14 2022", ALC289_FIXUP_ASUS_GA401
),
9116 SND_PCI_QUIRK(0x1043, 0x16b2, "ASUS GU603", ALC289_FIXUP_ASUS_GA401
),
9117 SND_PCI_QUIRK(0x1043, 0x3030, "ASUS ZN270IE", ALC256_FIXUP_ASUS_AIO_GPIO2
),
9118 SND_PCI_QUIRK(0x1043, 0x831a, "ASUS P901", ALC269_FIXUP_STEREO_DMIC
),
9119 SND_PCI_QUIRK(0x1043, 0x834a, "ASUS S101", ALC269_FIXUP_STEREO_DMIC
),
9120 SND_PCI_QUIRK(0x1043, 0x8398, "ASUS P1005", ALC269_FIXUP_STEREO_DMIC
),
9121 SND_PCI_QUIRK(0x1043, 0x83ce, "ASUS P1005", ALC269_FIXUP_STEREO_DMIC
),
9122 SND_PCI_QUIRK(0x1043, 0x8516, "ASUS X101CH", ALC269_FIXUP_ASUS_X101
),
9123 SND_PCI_QUIRK(0x104d, 0x9073, "Sony VAIO", ALC275_FIXUP_SONY_VAIO_GPIO2
),
9124 SND_PCI_QUIRK(0x104d, 0x907b, "Sony VAIO", ALC275_FIXUP_SONY_HWEQ
),
9125 SND_PCI_QUIRK(0x104d, 0x9084, "Sony VAIO", ALC275_FIXUP_SONY_HWEQ
),
9126 SND_PCI_QUIRK(0x104d, 0x9099, "Sony VAIO S13", ALC275_FIXUP_SONY_DISABLE_AAMIX
),
9127 SND_PCI_QUIRK(0x104d, 0x90b5, "Sony VAIO Pro 11", ALC286_FIXUP_SONY_MIC_NO_PRESENCE
),
9128 SND_PCI_QUIRK(0x104d, 0x90b6, "Sony VAIO Pro 13", ALC286_FIXUP_SONY_MIC_NO_PRESENCE
),
9129 SND_PCI_QUIRK(0x10cf, 0x1475, "Lifebook", ALC269_FIXUP_LIFEBOOK
),
9130 SND_PCI_QUIRK(0x10cf, 0x159f, "Lifebook E780", ALC269_FIXUP_LIFEBOOK_NO_HP_TO_LINEOUT
),
9131 SND_PCI_QUIRK(0x10cf, 0x15dc, "Lifebook T731", ALC269_FIXUP_LIFEBOOK_HP_PIN
),
9132 SND_PCI_QUIRK(0x10cf, 0x1629, "Lifebook U7x7", ALC255_FIXUP_LIFEBOOK_U7x7_HEADSET_MIC
),
9133 SND_PCI_QUIRK(0x10cf, 0x1757, "Lifebook E752", ALC269_FIXUP_LIFEBOOK_HP_PIN
),
9134 SND_PCI_QUIRK(0x10cf, 0x1845, "Lifebook U904", ALC269_FIXUP_LIFEBOOK_EXTMIC
),
9135 SND_PCI_QUIRK(0x10ec, 0x10f2, "Intel Reference board", ALC700_FIXUP_INTEL_REFERENCE
),
9136 SND_PCI_QUIRK(0x10ec, 0x118c, "Medion EE4254 MD62100", ALC256_FIXUP_MEDION_HEADSET_NO_PRESENCE
),
9137 SND_PCI_QUIRK(0x10ec, 0x1230, "Intel Reference board", ALC295_FIXUP_CHROME_BOOK
),
9138 SND_PCI_QUIRK(0x10ec, 0x1252, "Intel Reference board", ALC295_FIXUP_CHROME_BOOK
),
9139 SND_PCI_QUIRK(0x10ec, 0x1254, "Intel Reference board", ALC295_FIXUP_CHROME_BOOK
),
9140 SND_PCI_QUIRK(0x10f7, 0x8338, "Panasonic CF-SZ6", ALC269_FIXUP_HEADSET_MODE
),
9141 SND_PCI_QUIRK(0x144d, 0xc109, "Samsung Ativ book 9 (NP900X3G)", ALC269_FIXUP_INV_DMIC
),
9142 SND_PCI_QUIRK(0x144d, 0xc169, "Samsung Notebook 9 Pen (NP930SBE-K01US)", ALC298_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET
),
9143 SND_PCI_QUIRK(0x144d, 0xc176, "Samsung Notebook 9 Pro (NP930MBE-K04US)", ALC298_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET
),
9144 SND_PCI_QUIRK(0x144d, 0xc189, "Samsung Galaxy Flex Book (NT950QCG-X716)", ALC298_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET
),
9145 SND_PCI_QUIRK(0x144d, 0xc18a, "Samsung Galaxy Book Ion (NP930XCJ-K01US)", ALC298_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET
),
9146 SND_PCI_QUIRK(0x144d, 0xc740, "Samsung Ativ book 8 (NP870Z5G)", ALC269_FIXUP_ATIV_BOOK_8
),
9147 SND_PCI_QUIRK(0x144d, 0xc812, "Samsung Notebook Pen S (NT950SBE-X58)", ALC298_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET
),
9148 SND_PCI_QUIRK(0x144d, 0xc830, "Samsung Galaxy Book Ion (NT950XCJ-X716A)", ALC298_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET
),
9149 SND_PCI_QUIRK(0x144d, 0xc832, "Samsung Galaxy Book Flex Alpha (NP730QCJ)", ALC256_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET
),
9150 SND_PCI_QUIRK(0x1458, 0xfa53, "Gigabyte BXBT-2807", ALC283_FIXUP_HEADSET_MIC
),
9151 SND_PCI_QUIRK(0x1462, 0xb120, "MSI Cubi MS-B120", ALC283_FIXUP_HEADSET_MIC
),
9152 SND_PCI_QUIRK(0x1462, 0xb171, "Cubi N 8GL (MS-B171)", ALC283_FIXUP_HEADSET_MIC
),
9153 SND_PCI_QUIRK(0x152d, 0x1082, "Quanta NL3", ALC269_FIXUP_LIFEBOOK
),
9154 SND_PCI_QUIRK(0x1558, 0x1323, "Clevo N130ZU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
9155 SND_PCI_QUIRK(0x1558, 0x1325, "Clevo N15[01][CW]U", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
9156 SND_PCI_QUIRK(0x1558, 0x1401, "Clevo L140[CZ]U", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
9157 SND_PCI_QUIRK(0x1558, 0x1403, "Clevo N140CU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
9158 SND_PCI_QUIRK(0x1558, 0x1404, "Clevo N150CU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
9159 SND_PCI_QUIRK(0x1558, 0x14a1, "Clevo L141MU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
9160 SND_PCI_QUIRK(0x1558, 0x4018, "Clevo NV40M[BE]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
9161 SND_PCI_QUIRK(0x1558, 0x4019, "Clevo NV40MZ", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
9162 SND_PCI_QUIRK(0x1558, 0x4020, "Clevo NV40MB", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
9163 SND_PCI_QUIRK(0x1558, 0x40a1, "Clevo NL40GU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
9164 SND_PCI_QUIRK(0x1558, 0x40c1, "Clevo NL40[CZ]U", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
9165 SND_PCI_QUIRK(0x1558, 0x40d1, "Clevo NL41DU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
9166 SND_PCI_QUIRK(0x1558, 0x5015, "Clevo NH5[58]H[HJK]Q", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
9167 SND_PCI_QUIRK(0x1558, 0x5017, "Clevo NH7[79]H[HJK]Q", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
9168 SND_PCI_QUIRK(0x1558, 0x50a3, "Clevo NJ51GU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
9169 SND_PCI_QUIRK(0x1558, 0x50b3, "Clevo NK50S[BEZ]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
9170 SND_PCI_QUIRK(0x1558, 0x50b6, "Clevo NK50S5", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
9171 SND_PCI_QUIRK(0x1558, 0x50b8, "Clevo NK50SZ", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
9172 SND_PCI_QUIRK(0x1558, 0x50d5, "Clevo NP50D5", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
9173 SND_PCI_QUIRK(0x1558, 0x50e1, "Clevo NH5[58]HPQ", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
9174 SND_PCI_QUIRK(0x1558, 0x50e2, "Clevo NH7[79]HPQ", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
9175 SND_PCI_QUIRK(0x1558, 0x50f0, "Clevo NH50A[CDF]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
9176 SND_PCI_QUIRK(0x1558, 0x50f2, "Clevo NH50E[PR]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
9177 SND_PCI_QUIRK(0x1558, 0x50f3, "Clevo NH58DPQ", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
9178 SND_PCI_QUIRK(0x1558, 0x50f5, "Clevo NH55EPY", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
9179 SND_PCI_QUIRK(0x1558, 0x50f6, "Clevo NH55DPQ", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
9180 SND_PCI_QUIRK(0x1558, 0x5101, "Clevo S510WU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
9181 SND_PCI_QUIRK(0x1558, 0x5157, "Clevo W517GU1", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
9182 SND_PCI_QUIRK(0x1558, 0x51a1, "Clevo NS50MU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
9183 SND_PCI_QUIRK(0x1558, 0x70a1, "Clevo NB70T[HJK]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
9184 SND_PCI_QUIRK(0x1558, 0x70b3, "Clevo NK70SB", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
9185 SND_PCI_QUIRK(0x1558, 0x70f2, "Clevo NH79EPY", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
9186 SND_PCI_QUIRK(0x1558, 0x70f3, "Clevo NH77DPQ", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
9187 SND_PCI_QUIRK(0x1558, 0x70f4, "Clevo NH77EPY", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
9188 SND_PCI_QUIRK(0x1558, 0x70f6, "Clevo NH77DPQ-Y", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
9189 SND_PCI_QUIRK(0x1558, 0x8228, "Clevo NR40BU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
9190 SND_PCI_QUIRK(0x1558, 0x8520, "Clevo NH50D[CD]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
9191 SND_PCI_QUIRK(0x1558, 0x8521, "Clevo NH77D[CD]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
9192 SND_PCI_QUIRK(0x1558, 0x8535, "Clevo NH50D[BE]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
9193 SND_PCI_QUIRK(0x1558, 0x8536, "Clevo NH79D[BE]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
9194 SND_PCI_QUIRK(0x1558, 0x8550, "Clevo NH[57][0-9][ER][ACDH]Q", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
9195 SND_PCI_QUIRK(0x1558, 0x8551, "Clevo NH[57][0-9][ER][ACDH]Q", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
9196 SND_PCI_QUIRK(0x1558, 0x8560, "Clevo NH[57][0-9][ER][ACDH]Q", ALC269_FIXUP_HEADSET_MIC
),
9197 SND_PCI_QUIRK(0x1558, 0x8561, "Clevo NH[57][0-9][ER][ACDH]Q", ALC269_FIXUP_HEADSET_MIC
),
9198 SND_PCI_QUIRK(0x1558, 0x8562, "Clevo NH[57][0-9]RZ[Q]", ALC269_FIXUP_DMIC
),
9199 SND_PCI_QUIRK(0x1558, 0x8668, "Clevo NP50B[BE]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
9200 SND_PCI_QUIRK(0x1558, 0x866d, "Clevo NP5[05]PN[HJK]", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
9201 SND_PCI_QUIRK(0x1558, 0x867c, "Clevo NP7[01]PNP", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
9202 SND_PCI_QUIRK(0x1558, 0x867d, "Clevo NP7[01]PN[HJK]", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
9203 SND_PCI_QUIRK(0x1558, 0x8680, "Clevo NJ50LU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
9204 SND_PCI_QUIRK(0x1558, 0x8686, "Clevo NH50[CZ]U", ALC256_FIXUP_MIC_NO_PRESENCE_AND_RESUME
),
9205 SND_PCI_QUIRK(0x1558, 0x8a20, "Clevo NH55DCQ-Y", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
9206 SND_PCI_QUIRK(0x1558, 0x8a51, "Clevo NH70RCQ-Y", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
9207 SND_PCI_QUIRK(0x1558, 0x8d50, "Clevo NH55RCQ-M", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
9208 SND_PCI_QUIRK(0x1558, 0x951d, "Clevo N950T[CDF]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
9209 SND_PCI_QUIRK(0x1558, 0x9600, "Clevo N960K[PR]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
9210 SND_PCI_QUIRK(0x1558, 0x961d, "Clevo N960S[CDF]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
9211 SND_PCI_QUIRK(0x1558, 0x971d, "Clevo N970T[CDF]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
9212 SND_PCI_QUIRK(0x1558, 0xa500, "Clevo NL5[03]RU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
9213 SND_PCI_QUIRK(0x1558, 0xa600, "Clevo NL50NU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
9214 SND_PCI_QUIRK(0x1558, 0xb018, "Clevo NP50D[BE]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
9215 SND_PCI_QUIRK(0x1558, 0xb019, "Clevo NH77D[BE]Q", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
9216 SND_PCI_QUIRK(0x1558, 0xb022, "Clevo NH77D[DC][QW]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
9217 SND_PCI_QUIRK(0x1558, 0xc018, "Clevo NP50D[BE]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
9218 SND_PCI_QUIRK(0x1558, 0xc019, "Clevo NH77D[BE]Q", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
9219 SND_PCI_QUIRK(0x1558, 0xc022, "Clevo NH77[DC][QW]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
9220 SND_PCI_QUIRK(0x17aa, 0x1036, "Lenovo P520", ALC233_FIXUP_LENOVO_MULTI_CODECS
),
9221 SND_PCI_QUIRK(0x17aa, 0x1048, "ThinkCentre Station", ALC623_FIXUP_LENOVO_THINKSTATION_P340
),
9222 SND_PCI_QUIRK(0x17aa, 0x20f2, "Thinkpad SL410/510", ALC269_FIXUP_SKU_IGNORE
),
9223 SND_PCI_QUIRK(0x17aa, 0x215e, "Thinkpad L512", ALC269_FIXUP_SKU_IGNORE
),
9224 SND_PCI_QUIRK(0x17aa, 0x21b8, "Thinkpad Edge 14", ALC269_FIXUP_SKU_IGNORE
),
9225 SND_PCI_QUIRK(0x17aa, 0x21ca, "Thinkpad L412", ALC269_FIXUP_SKU_IGNORE
),
9226 SND_PCI_QUIRK(0x17aa, 0x21e9, "Thinkpad Edge 15", ALC269_FIXUP_SKU_IGNORE
),
9227 SND_PCI_QUIRK(0x17aa, 0x21f3, "Thinkpad T430", ALC269_FIXUP_LENOVO_DOCK
),
9228 SND_PCI_QUIRK(0x17aa, 0x21f6, "Thinkpad T530", ALC269_FIXUP_LENOVO_DOCK_LIMIT_BOOST
),
9229 SND_PCI_QUIRK(0x17aa, 0x21fa, "Thinkpad X230", ALC269_FIXUP_LENOVO_DOCK
),
9230 SND_PCI_QUIRK(0x17aa, 0x21fb, "Thinkpad T430s", ALC269_FIXUP_LENOVO_DOCK
),
9231 SND_PCI_QUIRK(0x17aa, 0x2203, "Thinkpad X230 Tablet", ALC269_FIXUP_LENOVO_DOCK
),
9232 SND_PCI_QUIRK(0x17aa, 0x2208, "Thinkpad T431s", ALC269_FIXUP_LENOVO_DOCK
),
9233 SND_PCI_QUIRK(0x17aa, 0x220c, "Thinkpad T440s", ALC292_FIXUP_TPT440
),
9234 SND_PCI_QUIRK(0x17aa, 0x220e, "Thinkpad T440p", ALC292_FIXUP_TPT440_DOCK
),
9235 SND_PCI_QUIRK(0x17aa, 0x2210, "Thinkpad T540p", ALC292_FIXUP_TPT440_DOCK
),
9236 SND_PCI_QUIRK(0x17aa, 0x2211, "Thinkpad W541", ALC292_FIXUP_TPT440_DOCK
),
9237 SND_PCI_QUIRK(0x17aa, 0x2212, "Thinkpad T440", ALC292_FIXUP_TPT440_DOCK
),
9238 SND_PCI_QUIRK(0x17aa, 0x2214, "Thinkpad X240", ALC292_FIXUP_TPT440_DOCK
),
9239 SND_PCI_QUIRK(0x17aa, 0x2215, "Thinkpad", ALC269_FIXUP_LIMIT_INT_MIC_BOOST
),
9240 SND_PCI_QUIRK(0x17aa, 0x2218, "Thinkpad X1 Carbon 2nd", ALC292_FIXUP_TPT440_DOCK
),
9241 SND_PCI_QUIRK(0x17aa, 0x2223, "ThinkPad T550", ALC292_FIXUP_TPT440_DOCK
),
9242 SND_PCI_QUIRK(0x17aa, 0x2226, "ThinkPad X250", ALC292_FIXUP_TPT440_DOCK
),
9243 SND_PCI_QUIRK(0x17aa, 0x222d, "Thinkpad", ALC298_FIXUP_TPT470_DOCK
),
9244 SND_PCI_QUIRK(0x17aa, 0x222e, "Thinkpad", ALC298_FIXUP_TPT470_DOCK
),
9245 SND_PCI_QUIRK(0x17aa, 0x2231, "Thinkpad T560", ALC292_FIXUP_TPT460
),
9246 SND_PCI_QUIRK(0x17aa, 0x2233, "Thinkpad", ALC292_FIXUP_TPT460
),
9247 SND_PCI_QUIRK(0x17aa, 0x2245, "Thinkpad T470", ALC298_FIXUP_TPT470_DOCK
),
9248 SND_PCI_QUIRK(0x17aa, 0x2246, "Thinkpad", ALC298_FIXUP_TPT470_DOCK
),
9249 SND_PCI_QUIRK(0x17aa, 0x2247, "Thinkpad", ALC298_FIXUP_TPT470_DOCK
),
9250 SND_PCI_QUIRK(0x17aa, 0x2249, "Thinkpad", ALC292_FIXUP_TPT460
),
9251 SND_PCI_QUIRK(0x17aa, 0x224b, "Thinkpad", ALC298_FIXUP_TPT470_DOCK
),
9252 SND_PCI_QUIRK(0x17aa, 0x224c, "Thinkpad", ALC298_FIXUP_TPT470_DOCK
),
9253 SND_PCI_QUIRK(0x17aa, 0x224d, "Thinkpad", ALC298_FIXUP_TPT470_DOCK
),
9254 SND_PCI_QUIRK(0x17aa, 0x225d, "Thinkpad T480", ALC269_FIXUP_LIMIT_INT_MIC_BOOST
),
9255 SND_PCI_QUIRK(0x17aa, 0x2292, "Thinkpad X1 Carbon 7th", ALC285_FIXUP_THINKPAD_HEADSET_JACK
),
9256 SND_PCI_QUIRK(0x17aa, 0x22be, "Thinkpad X1 Carbon 8th", ALC285_FIXUP_THINKPAD_HEADSET_JACK
),
9257 SND_PCI_QUIRK(0x17aa, 0x22c1, "Thinkpad P1 Gen 3", ALC285_FIXUP_THINKPAD_NO_BASS_SPK_HEADSET_JACK
),
9258 SND_PCI_QUIRK(0x17aa, 0x22c2, "Thinkpad X1 Extreme Gen 3", ALC285_FIXUP_THINKPAD_NO_BASS_SPK_HEADSET_JACK
),
9259 SND_PCI_QUIRK(0x17aa, 0x22f1, "Thinkpad", ALC287_FIXUP_CS35L41_I2C_2
),
9260 SND_PCI_QUIRK(0x17aa, 0x22f2, "Thinkpad", ALC287_FIXUP_CS35L41_I2C_2
),
9261 SND_PCI_QUIRK(0x17aa, 0x22f3, "Thinkpad", ALC287_FIXUP_CS35L41_I2C_2
),
9262 SND_PCI_QUIRK(0x17aa, 0x30bb, "ThinkCentre AIO", ALC233_FIXUP_LENOVO_LINE2_MIC_HOTKEY
),
9263 SND_PCI_QUIRK(0x17aa, 0x30e2, "ThinkCentre AIO", ALC233_FIXUP_LENOVO_LINE2_MIC_HOTKEY
),
9264 SND_PCI_QUIRK(0x17aa, 0x310c, "ThinkCentre Station", ALC294_FIXUP_LENOVO_MIC_LOCATION
),
9265 SND_PCI_QUIRK(0x17aa, 0x3111, "ThinkCentre Station", ALC294_FIXUP_LENOVO_MIC_LOCATION
),
9266 SND_PCI_QUIRK(0x17aa, 0x312a, "ThinkCentre Station", ALC294_FIXUP_LENOVO_MIC_LOCATION
),
9267 SND_PCI_QUIRK(0x17aa, 0x312f, "ThinkCentre Station", ALC294_FIXUP_LENOVO_MIC_LOCATION
),
9268 SND_PCI_QUIRK(0x17aa, 0x313c, "ThinkCentre Station", ALC294_FIXUP_LENOVO_MIC_LOCATION
),
9269 SND_PCI_QUIRK(0x17aa, 0x3151, "ThinkCentre Station", ALC283_FIXUP_HEADSET_MIC
),
9270 SND_PCI_QUIRK(0x17aa, 0x3176, "ThinkCentre Station", ALC283_FIXUP_HEADSET_MIC
),
9271 SND_PCI_QUIRK(0x17aa, 0x3178, "ThinkCentre Station", ALC283_FIXUP_HEADSET_MIC
),
9272 SND_PCI_QUIRK(0x17aa, 0x31af, "ThinkCentre Station", ALC623_FIXUP_LENOVO_THINKSTATION_P340
),
9273 SND_PCI_QUIRK(0x17aa, 0x3802, "Lenovo Yoga DuetITL 2021", ALC287_FIXUP_YOGA7_14ITL_SPEAKERS
),
9274 SND_PCI_QUIRK(0x17aa, 0x3813, "Legion 7i 15IMHG05", ALC287_FIXUP_LEGION_15IMHG05_SPEAKERS
),
9275 SND_PCI_QUIRK(0x17aa, 0x3818, "Lenovo C940", ALC298_FIXUP_LENOVO_SPK_VOLUME
),
9276 SND_PCI_QUIRK(0x17aa, 0x3819, "Lenovo 13s Gen2 ITL", ALC287_FIXUP_13S_GEN2_SPEAKERS
),
9277 SND_PCI_QUIRK(0x17aa, 0x3820, "Yoga Duet 7 13ITL6", ALC287_FIXUP_YOGA7_14ITL_SPEAKERS
),
9278 SND_PCI_QUIRK(0x17aa, 0x3824, "Legion Y9000X 2020", ALC285_FIXUP_LEGION_Y9000X_SPEAKERS
),
9279 SND_PCI_QUIRK(0x17aa, 0x3827, "Ideapad S740", ALC285_FIXUP_IDEAPAD_S740_COEF
),
9280 SND_PCI_QUIRK(0x17aa, 0x3834, "Lenovo IdeaPad Slim 9i 14ITL5", ALC287_FIXUP_YOGA7_14ITL_SPEAKERS
),
9281 SND_PCI_QUIRK(0x17aa, 0x383d, "Legion Y9000X 2019", ALC285_FIXUP_LEGION_Y9000X_SPEAKERS
),
9282 SND_PCI_QUIRK(0x17aa, 0x3843, "Yoga 9i", ALC287_FIXUP_IDEAPAD_BASS_SPK_AMP
),
9283 SND_PCI_QUIRK(0x17aa, 0x3847, "Legion 7 16ACHG6", ALC287_FIXUP_LEGION_16ACHG6
),
9284 SND_PCI_QUIRK(0x17aa, 0x384a, "Lenovo Yoga 7 15ITL5", ALC287_FIXUP_YOGA7_14ITL_SPEAKERS
),
9285 SND_PCI_QUIRK(0x17aa, 0x3852, "Lenovo Yoga 7 14ITL5", ALC287_FIXUP_YOGA7_14ITL_SPEAKERS
),
9286 SND_PCI_QUIRK(0x17aa, 0x3853, "Lenovo Yoga 7 15ITL5", ALC287_FIXUP_YOGA7_14ITL_SPEAKERS
),
9287 SND_PCI_QUIRK(0x17aa, 0x3902, "Lenovo E50-80", ALC269_FIXUP_DMIC_THINKPAD_ACPI
),
9288 SND_PCI_QUIRK(0x17aa, 0x3977, "IdeaPad S210", ALC283_FIXUP_INT_MIC
),
9289 SND_PCI_QUIRK(0x17aa, 0x3978, "Lenovo B50-70", ALC269_FIXUP_DMIC_THINKPAD_ACPI
),
9290 SND_PCI_QUIRK(0x17aa, 0x3bf8, "Quanta FL1", ALC269_FIXUP_PCM_44K
),
9291 SND_PCI_QUIRK(0x17aa, 0x5013, "Thinkpad", ALC269_FIXUP_LIMIT_INT_MIC_BOOST
),
9292 SND_PCI_QUIRK(0x17aa, 0x501a, "Thinkpad", ALC283_FIXUP_INT_MIC
),
9293 SND_PCI_QUIRK(0x17aa, 0x501e, "Thinkpad L440", ALC292_FIXUP_TPT440_DOCK
),
9294 SND_PCI_QUIRK(0x17aa, 0x5026, "Thinkpad", ALC269_FIXUP_LIMIT_INT_MIC_BOOST
),
9295 SND_PCI_QUIRK(0x17aa, 0x5034, "Thinkpad T450", ALC292_FIXUP_TPT440_DOCK
),
9296 SND_PCI_QUIRK(0x17aa, 0x5036, "Thinkpad T450s", ALC292_FIXUP_TPT440_DOCK
),
9297 SND_PCI_QUIRK(0x17aa, 0x503c, "Thinkpad L450", ALC292_FIXUP_TPT440_DOCK
),
9298 SND_PCI_QUIRK(0x17aa, 0x504a, "ThinkPad X260", ALC292_FIXUP_TPT440_DOCK
),
9299 SND_PCI_QUIRK(0x17aa, 0x504b, "Thinkpad", ALC293_FIXUP_LENOVO_SPK_NOISE
),
9300 SND_PCI_QUIRK(0x17aa, 0x5050, "Thinkpad T560p", ALC292_FIXUP_TPT460
),
9301 SND_PCI_QUIRK(0x17aa, 0x5051, "Thinkpad L460", ALC292_FIXUP_TPT460
),
9302 SND_PCI_QUIRK(0x17aa, 0x5053, "Thinkpad T460", ALC292_FIXUP_TPT460
),
9303 SND_PCI_QUIRK(0x17aa, 0x505d, "Thinkpad", ALC298_FIXUP_TPT470_DOCK
),
9304 SND_PCI_QUIRK(0x17aa, 0x505f, "Thinkpad", ALC298_FIXUP_TPT470_DOCK
),
9305 SND_PCI_QUIRK(0x17aa, 0x5062, "Thinkpad", ALC298_FIXUP_TPT470_DOCK
),
9306 SND_PCI_QUIRK(0x17aa, 0x508b, "Thinkpad X12 Gen 1", ALC287_FIXUP_LEGION_15IMHG05_SPEAKERS
),
9307 SND_PCI_QUIRK(0x17aa, 0x5109, "Thinkpad", ALC269_FIXUP_LIMIT_INT_MIC_BOOST
),
9308 SND_PCI_QUIRK(0x17aa, 0x511e, "Thinkpad", ALC298_FIXUP_TPT470_DOCK
),
9309 SND_PCI_QUIRK(0x17aa, 0x511f, "Thinkpad", ALC298_FIXUP_TPT470_DOCK
),
9310 SND_PCI_QUIRK(0x17aa, 0x9e54, "LENOVO NB", ALC269_FIXUP_LENOVO_EAPD
),
9311 SND_PCI_QUIRK(0x1849, 0x1233, "ASRock NUC Box 1100", ALC233_FIXUP_NO_AUDIO_JACK
),
9312 SND_PCI_QUIRK(0x19e5, 0x3204, "Huawei MACH-WX9", ALC256_FIXUP_HUAWEI_MACH_WX9_PINS
),
9313 SND_PCI_QUIRK(0x1b35, 0x1235, "CZC B20", ALC269_FIXUP_CZC_B20
),
9314 SND_PCI_QUIRK(0x1b35, 0x1236, "CZC TMI", ALC269_FIXUP_CZC_TMI
),
9315 SND_PCI_QUIRK(0x1b35, 0x1237, "CZC L101", ALC269_FIXUP_CZC_L101
),
9316 SND_PCI_QUIRK(0x1b7d, 0xa831, "Ordissimo EVE2 ", ALC269VB_FIXUP_ORDISSIMO_EVE2
), /* Also known as Malata PC-B1303 */
9317 SND_PCI_QUIRK(0x1c06, 0x2013, "Lemote A1802", ALC269_FIXUP_LEMOTE_A1802
),
9318 SND_PCI_QUIRK(0x1c06, 0x2015, "Lemote A190X", ALC269_FIXUP_LEMOTE_A190X
),
9319 SND_PCI_QUIRK(0x1d05, 0x1132, "TongFang PHxTxX1", ALC256_FIXUP_SET_COEF_DEFAULTS
),
9320 SND_PCI_QUIRK(0x1d05, 0x1096, "TongFang GMxMRxx", ALC269_FIXUP_NO_SHUTUP
),
9321 SND_PCI_QUIRK(0x1d05, 0x1100, "TongFang GKxNRxx", ALC269_FIXUP_NO_SHUTUP
),
9322 SND_PCI_QUIRK(0x1d05, 0x1111, "TongFang GMxZGxx", ALC269_FIXUP_NO_SHUTUP
),
9323 SND_PCI_QUIRK(0x1d05, 0x1119, "TongFang GMxZGxx", ALC269_FIXUP_NO_SHUTUP
),
9324 SND_PCI_QUIRK(0x1d05, 0x1129, "TongFang GMxZGxx", ALC269_FIXUP_NO_SHUTUP
),
9325 SND_PCI_QUIRK(0x1d05, 0x1147, "TongFang GMxTGxx", ALC269_FIXUP_NO_SHUTUP
),
9326 SND_PCI_QUIRK(0x1d05, 0x115c, "TongFang GMxTGxx", ALC269_FIXUP_NO_SHUTUP
),
9327 SND_PCI_QUIRK(0x1d05, 0x121b, "TongFang GMxAGxx", ALC269_FIXUP_NO_SHUTUP
),
9328 SND_PCI_QUIRK(0x1d72, 0x1602, "RedmiBook", ALC255_FIXUP_XIAOMI_HEADSET_MIC
),
9329 SND_PCI_QUIRK(0x1d72, 0x1701, "XiaomiNotebook Pro", ALC298_FIXUP_DELL1_MIC_NO_PRESENCE
),
9330 SND_PCI_QUIRK(0x1d72, 0x1901, "RedmiBook 14", ALC256_FIXUP_ASUS_HEADSET_MIC
),
9331 SND_PCI_QUIRK(0x1d72, 0x1947, "RedmiBook Air", ALC255_FIXUP_XIAOMI_HEADSET_MIC
),
9332 SND_PCI_QUIRK(0x8086, 0x2074, "Intel NUC 8", ALC233_FIXUP_INTEL_NUC8_DMIC
),
9333 SND_PCI_QUIRK(0x8086, 0x2080, "Intel NUC 8 Rugged", ALC256_FIXUP_INTEL_NUC8_RUGGED
),
9334 SND_PCI_QUIRK(0x8086, 0x2081, "Intel NUC 10", ALC256_FIXUP_INTEL_NUC10
),
9335 SND_PCI_QUIRK(0xf111, 0x0001, "Framework Laptop", ALC295_FIXUP_FRAMEWORK_LAPTOP_MIC_NO_PRESENCE
),
9338 /* Below is a quirk table taken from the old code.
9339 * Basically the device should work as is without the fixup table.
9340 * If BIOS doesn't give a proper info, enable the corresponding
9343 SND_PCI_QUIRK(0x1043, 0x8330, "ASUS Eeepc P703 P900A",
9345 SND_PCI_QUIRK(0x1043, 0x1013, "ASUS N61Da", ALC269_FIXUP_AMIC
),
9346 SND_PCI_QUIRK(0x1043, 0x1143, "ASUS B53f", ALC269_FIXUP_AMIC
),
9347 SND_PCI_QUIRK(0x1043, 0x1133, "ASUS UJ20ft", ALC269_FIXUP_AMIC
),
9348 SND_PCI_QUIRK(0x1043, 0x1183, "ASUS K72DR", ALC269_FIXUP_AMIC
),
9349 SND_PCI_QUIRK(0x1043, 0x11b3, "ASUS K52DR", ALC269_FIXUP_AMIC
),
9350 SND_PCI_QUIRK(0x1043, 0x11e3, "ASUS U33Jc", ALC269_FIXUP_AMIC
),
9351 SND_PCI_QUIRK(0x1043, 0x1273, "ASUS UL80Jt", ALC269_FIXUP_AMIC
),
9352 SND_PCI_QUIRK(0x1043, 0x1283, "ASUS U53Jc", ALC269_FIXUP_AMIC
),
9353 SND_PCI_QUIRK(0x1043, 0x12b3, "ASUS N82JV", ALC269_FIXUP_AMIC
),
9354 SND_PCI_QUIRK(0x1043, 0x12d3, "ASUS N61Jv", ALC269_FIXUP_AMIC
),
9355 SND_PCI_QUIRK(0x1043, 0x13a3, "ASUS UL30Vt", ALC269_FIXUP_AMIC
),
9356 SND_PCI_QUIRK(0x1043, 0x1373, "ASUS G73JX", ALC269_FIXUP_AMIC
),
9357 SND_PCI_QUIRK(0x1043, 0x1383, "ASUS UJ30Jc", ALC269_FIXUP_AMIC
),
9358 SND_PCI_QUIRK(0x1043, 0x13d3, "ASUS N61JA", ALC269_FIXUP_AMIC
),
9359 SND_PCI_QUIRK(0x1043, 0x1413, "ASUS UL50", ALC269_FIXUP_AMIC
),
9360 SND_PCI_QUIRK(0x1043, 0x1443, "ASUS UL30", ALC269_FIXUP_AMIC
),
9361 SND_PCI_QUIRK(0x1043, 0x1453, "ASUS M60Jv", ALC269_FIXUP_AMIC
),
9362 SND_PCI_QUIRK(0x1043, 0x1483, "ASUS UL80", ALC269_FIXUP_AMIC
),
9363 SND_PCI_QUIRK(0x1043, 0x14f3, "ASUS F83Vf", ALC269_FIXUP_AMIC
),
9364 SND_PCI_QUIRK(0x1043, 0x14e3, "ASUS UL20", ALC269_FIXUP_AMIC
),
9365 SND_PCI_QUIRK(0x1043, 0x1513, "ASUS UX30", ALC269_FIXUP_AMIC
),
9366 SND_PCI_QUIRK(0x1043, 0x1593, "ASUS N51Vn", ALC269_FIXUP_AMIC
),
9367 SND_PCI_QUIRK(0x1043, 0x15a3, "ASUS N60Jv", ALC269_FIXUP_AMIC
),
9368 SND_PCI_QUIRK(0x1043, 0x15b3, "ASUS N60Dp", ALC269_FIXUP_AMIC
),
9369 SND_PCI_QUIRK(0x1043, 0x15c3, "ASUS N70De", ALC269_FIXUP_AMIC
),
9370 SND_PCI_QUIRK(0x1043, 0x15e3, "ASUS F83T", ALC269_FIXUP_AMIC
),
9371 SND_PCI_QUIRK(0x1043, 0x1643, "ASUS M60J", ALC269_FIXUP_AMIC
),
9372 SND_PCI_QUIRK(0x1043, 0x1653, "ASUS U50", ALC269_FIXUP_AMIC
),
9373 SND_PCI_QUIRK(0x1043, 0x1693, "ASUS F50N", ALC269_FIXUP_AMIC
),
9374 SND_PCI_QUIRK(0x1043, 0x16a3, "ASUS F5Q", ALC269_FIXUP_AMIC
),
9375 SND_PCI_QUIRK(0x1043, 0x1723, "ASUS P80", ALC269_FIXUP_AMIC
),
9376 SND_PCI_QUIRK(0x1043, 0x1743, "ASUS U80", ALC269_FIXUP_AMIC
),
9377 SND_PCI_QUIRK(0x1043, 0x1773, "ASUS U20A", ALC269_FIXUP_AMIC
),
9378 SND_PCI_QUIRK(0x1043, 0x1883, "ASUS F81Se", ALC269_FIXUP_AMIC
),
9379 SND_PCI_QUIRK(0x152d, 0x1778, "Quanta ON1", ALC269_FIXUP_DMIC
),
9380 SND_PCI_QUIRK(0x17aa, 0x3be9, "Quanta Wistron", ALC269_FIXUP_AMIC
),
9381 SND_PCI_QUIRK(0x17aa, 0x3bf8, "Quanta FL1", ALC269_FIXUP_AMIC
),
9382 SND_PCI_QUIRK(0x17ff, 0x059a, "Quanta EL3", ALC269_FIXUP_DMIC
),
9383 SND_PCI_QUIRK(0x17ff, 0x059b, "Quanta JR1", ALC269_FIXUP_DMIC
),
9388 static const struct snd_pci_quirk alc269_fixup_vendor_tbl
[] = {
9389 SND_PCI_QUIRK_VENDOR(0x1025, "Acer Aspire", ALC271_FIXUP_DMIC
),
9390 SND_PCI_QUIRK_VENDOR(0x103c, "HP", ALC269_FIXUP_HP_MUTE_LED
),
9391 SND_PCI_QUIRK_VENDOR(0x104d, "Sony VAIO", ALC269_FIXUP_SONY_VAIO
),
9392 SND_PCI_QUIRK_VENDOR(0x17aa, "Thinkpad", ALC269_FIXUP_THINKPAD_ACPI
),
9393 SND_PCI_QUIRK_VENDOR(0x19e5, "Huawei Matebook", ALC255_FIXUP_MIC_MUTE_LED
),
9397 static const struct hda_model_fixup alc269_fixup_models
[] = {
9398 {.id
= ALC269_FIXUP_AMIC
, .name
= "laptop-amic"},
9399 {.id
= ALC269_FIXUP_DMIC
, .name
= "laptop-dmic"},
9400 {.id
= ALC269_FIXUP_STEREO_DMIC
, .name
= "alc269-dmic"},
9401 {.id
= ALC271_FIXUP_DMIC
, .name
= "alc271-dmic"},
9402 {.id
= ALC269_FIXUP_INV_DMIC
, .name
= "inv-dmic"},
9403 {.id
= ALC269_FIXUP_HEADSET_MIC
, .name
= "headset-mic"},
9404 {.id
= ALC269_FIXUP_HEADSET_MODE
, .name
= "headset-mode"},
9405 {.id
= ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC
, .name
= "headset-mode-no-hp-mic"},
9406 {.id
= ALC269_FIXUP_LENOVO_DOCK
, .name
= "lenovo-dock"},
9407 {.id
= ALC269_FIXUP_LENOVO_DOCK_LIMIT_BOOST
, .name
= "lenovo-dock-limit-boost"},
9408 {.id
= ALC269_FIXUP_HP_GPIO_LED
, .name
= "hp-gpio-led"},
9409 {.id
= ALC269_FIXUP_HP_DOCK_GPIO_MIC1_LED
, .name
= "hp-dock-gpio-mic1-led"},
9410 {.id
= ALC269_FIXUP_DELL1_MIC_NO_PRESENCE
, .name
= "dell-headset-multi"},
9411 {.id
= ALC269_FIXUP_DELL2_MIC_NO_PRESENCE
, .name
= "dell-headset-dock"},
9412 {.id
= ALC269_FIXUP_DELL3_MIC_NO_PRESENCE
, .name
= "dell-headset3"},
9413 {.id
= ALC269_FIXUP_DELL4_MIC_NO_PRESENCE
, .name
= "dell-headset4"},
9414 {.id
= ALC283_FIXUP_CHROME_BOOK
, .name
= "alc283-dac-wcaps"},
9415 {.id
= ALC283_FIXUP_SENSE_COMBO_JACK
, .name
= "alc283-sense-combo"},
9416 {.id
= ALC292_FIXUP_TPT440_DOCK
, .name
= "tpt440-dock"},
9417 {.id
= ALC292_FIXUP_TPT440
, .name
= "tpt440"},
9418 {.id
= ALC292_FIXUP_TPT460
, .name
= "tpt460"},
9419 {.id
= ALC298_FIXUP_TPT470_DOCK_FIX
, .name
= "tpt470-dock-fix"},
9420 {.id
= ALC298_FIXUP_TPT470_DOCK
, .name
= "tpt470-dock"},
9421 {.id
= ALC233_FIXUP_LENOVO_MULTI_CODECS
, .name
= "dual-codecs"},
9422 {.id
= ALC700_FIXUP_INTEL_REFERENCE
, .name
= "alc700-ref"},
9423 {.id
= ALC269_FIXUP_SONY_VAIO
, .name
= "vaio"},
9424 {.id
= ALC269_FIXUP_DELL_M101Z
, .name
= "dell-m101z"},
9425 {.id
= ALC269_FIXUP_ASUS_G73JW
, .name
= "asus-g73jw"},
9426 {.id
= ALC269_FIXUP_LENOVO_EAPD
, .name
= "lenovo-eapd"},
9427 {.id
= ALC275_FIXUP_SONY_HWEQ
, .name
= "sony-hweq"},
9428 {.id
= ALC269_FIXUP_PCM_44K
, .name
= "pcm44k"},
9429 {.id
= ALC269_FIXUP_LIFEBOOK
, .name
= "lifebook"},
9430 {.id
= ALC269_FIXUP_LIFEBOOK_EXTMIC
, .name
= "lifebook-extmic"},
9431 {.id
= ALC269_FIXUP_LIFEBOOK_HP_PIN
, .name
= "lifebook-hp-pin"},
9432 {.id
= ALC255_FIXUP_LIFEBOOK_U7x7_HEADSET_MIC
, .name
= "lifebook-u7x7"},
9433 {.id
= ALC269VB_FIXUP_AMIC
, .name
= "alc269vb-amic"},
9434 {.id
= ALC269VB_FIXUP_DMIC
, .name
= "alc269vb-dmic"},
9435 {.id
= ALC269_FIXUP_HP_MUTE_LED_MIC1
, .name
= "hp-mute-led-mic1"},
9436 {.id
= ALC269_FIXUP_HP_MUTE_LED_MIC2
, .name
= "hp-mute-led-mic2"},
9437 {.id
= ALC269_FIXUP_HP_MUTE_LED_MIC3
, .name
= "hp-mute-led-mic3"},
9438 {.id
= ALC269_FIXUP_HP_GPIO_MIC1_LED
, .name
= "hp-gpio-mic1"},
9439 {.id
= ALC269_FIXUP_HP_LINE1_MIC1_LED
, .name
= "hp-line1-mic1"},
9440 {.id
= ALC269_FIXUP_NO_SHUTUP
, .name
= "noshutup"},
9441 {.id
= ALC286_FIXUP_SONY_MIC_NO_PRESENCE
, .name
= "sony-nomic"},
9442 {.id
= ALC269_FIXUP_ASPIRE_HEADSET_MIC
, .name
= "aspire-headset-mic"},
9443 {.id
= ALC269_FIXUP_ASUS_X101
, .name
= "asus-x101"},
9444 {.id
= ALC271_FIXUP_HP_GATE_MIC_JACK
, .name
= "acer-ao7xx"},
9445 {.id
= ALC271_FIXUP_HP_GATE_MIC_JACK_E1_572
, .name
= "acer-aspire-e1"},
9446 {.id
= ALC269_FIXUP_ACER_AC700
, .name
= "acer-ac700"},
9447 {.id
= ALC269_FIXUP_LIMIT_INT_MIC_BOOST
, .name
= "limit-mic-boost"},
9448 {.id
= ALC269VB_FIXUP_ASUS_ZENBOOK
, .name
= "asus-zenbook"},
9449 {.id
= ALC269VB_FIXUP_ASUS_ZENBOOK_UX31A
, .name
= "asus-zenbook-ux31a"},
9450 {.id
= ALC269VB_FIXUP_ORDISSIMO_EVE2
, .name
= "ordissimo"},
9451 {.id
= ALC282_FIXUP_ASUS_TX300
, .name
= "asus-tx300"},
9452 {.id
= ALC283_FIXUP_INT_MIC
, .name
= "alc283-int-mic"},
9453 {.id
= ALC290_FIXUP_MONO_SPEAKERS_HSJACK
, .name
= "mono-speakers"},
9454 {.id
= ALC290_FIXUP_SUBWOOFER_HSJACK
, .name
= "alc290-subwoofer"},
9455 {.id
= ALC269_FIXUP_THINKPAD_ACPI
, .name
= "thinkpad"},
9456 {.id
= ALC269_FIXUP_DMIC_THINKPAD_ACPI
, .name
= "dmic-thinkpad"},
9457 {.id
= ALC255_FIXUP_ACER_MIC_NO_PRESENCE
, .name
= "alc255-acer"},
9458 {.id
= ALC255_FIXUP_ASUS_MIC_NO_PRESENCE
, .name
= "alc255-asus"},
9459 {.id
= ALC255_FIXUP_DELL1_MIC_NO_PRESENCE
, .name
= "alc255-dell1"},
9460 {.id
= ALC255_FIXUP_DELL2_MIC_NO_PRESENCE
, .name
= "alc255-dell2"},
9461 {.id
= ALC293_FIXUP_DELL1_MIC_NO_PRESENCE
, .name
= "alc293-dell1"},
9462 {.id
= ALC283_FIXUP_HEADSET_MIC
, .name
= "alc283-headset"},
9463 {.id
= ALC255_FIXUP_MIC_MUTE_LED
, .name
= "alc255-dell-mute"},
9464 {.id
= ALC282_FIXUP_ASPIRE_V5_PINS
, .name
= "aspire-v5"},
9465 {.id
= ALC269VB_FIXUP_ASPIRE_E1_COEF
, .name
= "aspire-e1-coef"},
9466 {.id
= ALC280_FIXUP_HP_GPIO4
, .name
= "hp-gpio4"},
9467 {.id
= ALC286_FIXUP_HP_GPIO_LED
, .name
= "hp-gpio-led"},
9468 {.id
= ALC280_FIXUP_HP_GPIO2_MIC_HOTKEY
, .name
= "hp-gpio2-hotkey"},
9469 {.id
= ALC280_FIXUP_HP_DOCK_PINS
, .name
= "hp-dock-pins"},
9470 {.id
= ALC269_FIXUP_HP_DOCK_GPIO_MIC1_LED
, .name
= "hp-dock-gpio-mic"},
9471 {.id
= ALC280_FIXUP_HP_9480M
, .name
= "hp-9480m"},
9472 {.id
= ALC288_FIXUP_DELL_HEADSET_MODE
, .name
= "alc288-dell-headset"},
9473 {.id
= ALC288_FIXUP_DELL1_MIC_NO_PRESENCE
, .name
= "alc288-dell1"},
9474 {.id
= ALC288_FIXUP_DELL_XPS_13
, .name
= "alc288-dell-xps13"},
9475 {.id
= ALC292_FIXUP_DELL_E7X
, .name
= "dell-e7x"},
9476 {.id
= ALC293_FIXUP_DISABLE_AAMIX_MULTIJACK
, .name
= "alc293-dell"},
9477 {.id
= ALC298_FIXUP_DELL1_MIC_NO_PRESENCE
, .name
= "alc298-dell1"},
9478 {.id
= ALC298_FIXUP_DELL_AIO_MIC_NO_PRESENCE
, .name
= "alc298-dell-aio"},
9479 {.id
= ALC275_FIXUP_DELL_XPS
, .name
= "alc275-dell-xps"},
9480 {.id
= ALC293_FIXUP_LENOVO_SPK_NOISE
, .name
= "lenovo-spk-noise"},
9481 {.id
= ALC233_FIXUP_LENOVO_LINE2_MIC_HOTKEY
, .name
= "lenovo-hotkey"},
9482 {.id
= ALC255_FIXUP_DELL_SPK_NOISE
, .name
= "dell-spk-noise"},
9483 {.id
= ALC225_FIXUP_DELL1_MIC_NO_PRESENCE
, .name
= "alc225-dell1"},
9484 {.id
= ALC295_FIXUP_DISABLE_DAC3
, .name
= "alc295-disable-dac3"},
9485 {.id
= ALC285_FIXUP_SPEAKER2_TO_DAC1
, .name
= "alc285-speaker2-to-dac1"},
9486 {.id
= ALC280_FIXUP_HP_HEADSET_MIC
, .name
= "alc280-hp-headset"},
9487 {.id
= ALC221_FIXUP_HP_FRONT_MIC
, .name
= "alc221-hp-mic"},
9488 {.id
= ALC298_FIXUP_SPK_VOLUME
, .name
= "alc298-spk-volume"},
9489 {.id
= ALC256_FIXUP_DELL_INSPIRON_7559_SUBWOOFER
, .name
= "dell-inspiron-7559"},
9490 {.id
= ALC269_FIXUP_ATIV_BOOK_8
, .name
= "ativ-book"},
9491 {.id
= ALC221_FIXUP_HP_MIC_NO_PRESENCE
, .name
= "alc221-hp-mic"},
9492 {.id
= ALC256_FIXUP_ASUS_HEADSET_MODE
, .name
= "alc256-asus-headset"},
9493 {.id
= ALC256_FIXUP_ASUS_MIC
, .name
= "alc256-asus-mic"},
9494 {.id
= ALC256_FIXUP_ASUS_AIO_GPIO2
, .name
= "alc256-asus-aio"},
9495 {.id
= ALC233_FIXUP_ASUS_MIC_NO_PRESENCE
, .name
= "alc233-asus"},
9496 {.id
= ALC233_FIXUP_EAPD_COEF_AND_MIC_NO_PRESENCE
, .name
= "alc233-eapd"},
9497 {.id
= ALC294_FIXUP_LENOVO_MIC_LOCATION
, .name
= "alc294-lenovo-mic"},
9498 {.id
= ALC225_FIXUP_DELL_WYSE_MIC_NO_PRESENCE
, .name
= "alc225-wyse"},
9499 {.id
= ALC274_FIXUP_DELL_AIO_LINEOUT_VERB
, .name
= "alc274-dell-aio"},
9500 {.id
= ALC255_FIXUP_DUMMY_LINEOUT_VERB
, .name
= "alc255-dummy-lineout"},
9501 {.id
= ALC255_FIXUP_DELL_HEADSET_MIC
, .name
= "alc255-dell-headset"},
9502 {.id
= ALC295_FIXUP_HP_X360
, .name
= "alc295-hp-x360"},
9503 {.id
= ALC225_FIXUP_HEADSET_JACK
, .name
= "alc-headset-jack"},
9504 {.id
= ALC295_FIXUP_CHROME_BOOK
, .name
= "alc-chrome-book"},
9505 {.id
= ALC299_FIXUP_PREDATOR_SPK
, .name
= "predator-spk"},
9506 {.id
= ALC298_FIXUP_HUAWEI_MBX_STEREO
, .name
= "huawei-mbx-stereo"},
9507 {.id
= ALC256_FIXUP_MEDION_HEADSET_NO_PRESENCE
, .name
= "alc256-medion-headset"},
9508 {.id
= ALC298_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET
, .name
= "alc298-samsung-headphone"},
9509 {.id
= ALC256_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET
, .name
= "alc256-samsung-headphone"},
9510 {.id
= ALC255_FIXUP_XIAOMI_HEADSET_MIC
, .name
= "alc255-xiaomi-headset"},
9511 {.id
= ALC274_FIXUP_HP_MIC
, .name
= "alc274-hp-mic-detect"},
9512 {.id
= ALC245_FIXUP_HP_X360_AMP
, .name
= "alc245-hp-x360-amp"},
9513 {.id
= ALC295_FIXUP_HP_OMEN
, .name
= "alc295-hp-omen"},
9514 {.id
= ALC285_FIXUP_HP_SPECTRE_X360
, .name
= "alc285-hp-spectre-x360"},
9515 {.id
= ALC285_FIXUP_HP_SPECTRE_X360_EB1
, .name
= "alc285-hp-spectre-x360-eb1"},
9516 {.id
= ALC287_FIXUP_IDEAPAD_BASS_SPK_AMP
, .name
= "alc287-ideapad-bass-spk-amp"},
9517 {.id
= ALC623_FIXUP_LENOVO_THINKSTATION_P340
, .name
= "alc623-lenovo-thinkstation-p340"},
9518 {.id
= ALC255_FIXUP_ACER_HEADPHONE_AND_MIC
, .name
= "alc255-acer-headphone-and-mic"},
9519 {.id
= ALC285_FIXUP_HP_GPIO_AMP_INIT
, .name
= "alc285-hp-amp-init"},
9522 #define ALC225_STANDARD_PINS \
9525 #define ALC256_STANDARD_PINS \
9526 {0x12, 0x90a60140}, \
9527 {0x14, 0x90170110}, \
9530 #define ALC282_STANDARD_PINS \
9533 #define ALC290_STANDARD_PINS \
9536 #define ALC292_STANDARD_PINS \
9537 {0x14, 0x90170110}, \
9540 #define ALC295_STANDARD_PINS \
9541 {0x12, 0xb7a60130}, \
9542 {0x14, 0x90170110}, \
9545 #define ALC298_STANDARD_PINS \
9546 {0x12, 0x90a60130}, \
9549 static const struct snd_hda_pin_quirk alc269_pin_fixup_tbl
[] = {
9550 SND_HDA_PIN_QUIRK(0x10ec0221, 0x103c, "HP Workstation", ALC221_FIXUP_HP_HEADSET_MIC
,
9555 {0x21, 0x0221102f}),
9556 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1025, "Acer", ALC255_FIXUP_ACER_MIC_NO_PRESENCE
,
9559 {0x21, 0x02211030}),
9560 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1043, "ASUS", ALC255_FIXUP_ASUS_MIC_NO_PRESENCE
,
9563 {0x21, 0x03211020}),
9564 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1043, "ASUS", ALC255_FIXUP_ASUS_MIC_NO_PRESENCE
,
9567 {0x21, 0x03211020}),
9568 SND_HDA_PIN_QUIRK(0x10ec0225, 0x1028, "Dell", ALC225_FIXUP_DELL1_MIC_NO_PRESENCE
,
9569 ALC225_STANDARD_PINS
,
9571 {0x14, 0x901701a0}),
9572 SND_HDA_PIN_QUIRK(0x10ec0225, 0x1028, "Dell", ALC225_FIXUP_DELL1_MIC_NO_PRESENCE
,
9573 ALC225_STANDARD_PINS
,
9575 {0x14, 0x901701b0}),
9576 SND_HDA_PIN_QUIRK(0x10ec0225, 0x1028, "Dell", ALC225_FIXUP_DELL1_MIC_NO_PRESENCE
,
9577 ALC225_STANDARD_PINS
,
9579 {0x14, 0x901701a0}),
9580 SND_HDA_PIN_QUIRK(0x10ec0225, 0x1028, "Dell", ALC225_FIXUP_DELL1_MIC_NO_PRESENCE
,
9581 ALC225_STANDARD_PINS
,
9583 {0x14, 0x901701b0}),
9584 SND_HDA_PIN_QUIRK(0x10ec0225, 0x1028, "Dell", ALC225_FIXUP_DELL1_MIC_NO_PRESENCE
,
9585 ALC225_STANDARD_PINS
,
9587 {0x1b, 0x90170110}),
9588 SND_HDA_PIN_QUIRK(0x10ec0233, 0x8086, "Intel NUC Skull Canyon", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE
,
9591 {0x21, 0x02211020}),
9592 SND_HDA_PIN_QUIRK(0x10ec0235, 0x17aa, "Lenovo", ALC233_FIXUP_LENOVO_LINE2_MIC_HOTKEY
,
9596 {0x21, 0x02211020}),
9597 SND_HDA_PIN_QUIRK(0x10ec0235, 0x17aa, "Lenovo", ALC294_FIXUP_LENOVO_MIC_LOCATION
,
9602 {0x21, 0x0221101f}),
9603 SND_HDA_PIN_QUIRK(0x10ec0235, 0x17aa, "Lenovo", ALC294_FIXUP_LENOVO_MIC_LOCATION
,
9608 {0x21, 0x0221101f}),
9609 SND_HDA_PIN_QUIRK(0x10ec0235, 0x17aa, "Lenovo", ALC294_FIXUP_LENOVO_MIC_LOCATION
,
9613 {0x21, 0x0221101f}),
9614 SND_HDA_PIN_QUIRK(0x10ec0236, 0x1028, "Dell", ALC236_FIXUP_DELL_AIO_HEADSET_MIC
,
9615 {0x21, 0x02211010}),
9616 SND_HDA_PIN_QUIRK(0x10ec0236, 0x103c, "HP", ALC256_FIXUP_HP_HEADSET_MIC
,
9619 {0x21, 0x02211030}),
9620 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL2_MIC_NO_PRESENCE
,
9622 {0x21, 0x02211020}),
9623 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE
,
9625 {0x21, 0x02211040}),
9626 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE
,
9629 {0x21, 0x02211020}),
9630 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE
,
9633 {0x21, 0x02211030}),
9634 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE
,
9637 {0x21, 0x0221101f}),
9638 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE
,
9641 {0x21, 0x0221101f}),
9642 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE
,
9645 {0x21, 0x0221103f}),
9646 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE
,
9649 {0x21, 0x0221103f}),
9650 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE
,
9653 {0x21, 0x0221103f}),
9654 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE
,
9657 {0x21, 0x0221105f}),
9658 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE
,
9661 {0x21, 0x0221101f}),
9662 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE
,
9666 {0x21, 0x0321102f}),
9667 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE
,
9670 {0x21, 0x02211040}),
9671 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE
,
9674 {0x21, 0x02211050}),
9675 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE
,
9678 {0x21, 0x02211030}),
9679 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE
,
9682 {0x21, 0x02211040}),
9683 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE
,
9686 {0x21, 0x02211040}),
9687 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE
,
9690 {0x21, 0x02211050}),
9691 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell Inspiron 5548", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE
,
9694 {0x21, 0x02211040}),
9695 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell Inspiron 5565", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE
,
9698 {0x21, 0x02211030}),
9699 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE
,
9701 {0x21, 0x02211010}),
9702 SND_HDA_PIN_QUIRK(0x10ec0256, 0x1043, "ASUS", ALC256_FIXUP_ASUS_MIC
,
9705 {0x21, 0x04211020}),
9706 SND_HDA_PIN_QUIRK(0x10ec0256, 0x1043, "ASUS", ALC256_FIXUP_ASUS_MIC
,
9709 {0x21, 0x03211020}),
9710 SND_HDA_PIN_QUIRK(0x10ec0256, 0x1043, "ASUS", ALC256_FIXUP_ASUS_MIC_NO_PRESENCE
,
9713 {0x21, 0x03211020}),
9714 SND_HDA_PIN_QUIRK(0x10ec0256, 0x1043, "ASUS", ALC256_FIXUP_ASUS_MIC_NO_PRESENCE
,
9717 {0x21, 0x04211020}),
9718 SND_HDA_PIN_QUIRK(0x10ec0256, 0x1043, "ASUS", ALC256_FIXUP_ASUS_MIC_NO_PRESENCE
,
9721 {0x21, 0x03211020}),
9722 SND_HDA_PIN_QUIRK(0x10ec0256, 0x103c, "HP", ALC256_FIXUP_HP_HEADSET_MIC
,
9725 {0x21, 0x0221101f}),
9726 SND_HDA_PIN_QUIRK(0x10ec0274, 0x103c, "HP", ALC274_FIXUP_HP_HEADSET_MIC
,
9729 {0x21, 0x03211020}),
9730 SND_HDA_PIN_QUIRK(0x10ec0280, 0x103c, "HP", ALC280_FIXUP_HP_GPIO4
,
9734 {0x1a, 0x04a11020}),
9735 SND_HDA_PIN_QUIRK(0x10ec0280, 0x103c, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED
,
9741 {0x1b, 0x02011020}),
9742 SND_HDA_PIN_QUIRK(0x10ec0282, 0x103c, "HP 15 Touchsmart", ALC269_FIXUP_HP_MUTE_LED_MIC1
,
9743 ALC282_STANDARD_PINS
,
9746 {0x21, 0x0321101f}),
9747 SND_HDA_PIN_QUIRK(0x10ec0282, 0x103c, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1
,
9748 ALC282_STANDARD_PINS
,
9751 {0x21, 0x03211040}),
9752 SND_HDA_PIN_QUIRK(0x10ec0282, 0x103c, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1
,
9753 ALC282_STANDARD_PINS
,
9756 {0x21, 0x03211020}),
9757 SND_HDA_PIN_QUIRK(0x10ec0282, 0x103c, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1
,
9758 ALC282_STANDARD_PINS
,
9761 {0x21, 0x0421101f}),
9762 SND_HDA_PIN_QUIRK(0x10ec0282, 0x103c, "HP", ALC269_FIXUP_HP_LINE1_MIC1_LED
,
9763 ALC282_STANDARD_PINS
,
9766 {0x21, 0x04211020}),
9767 SND_HDA_PIN_QUIRK(0x10ec0282, 0x1025, "Acer", ALC282_FIXUP_ACER_DISABLE_LINEOUT
,
9768 ALC282_STANDARD_PINS
,
9774 {0x21, 0x0321101f}),
9775 SND_HDA_PIN_QUIRK(0x10ec0282, 0x1025, "Acer", ALC282_FIXUP_ACER_DISABLE_LINEOUT
,
9776 ALC282_STANDARD_PINS
,
9782 {0x21, 0x0321101f}),
9783 SND_HDA_PIN_QUIRK(0x10ec0283, 0x1028, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE
,
9784 ALC282_STANDARD_PINS
,
9786 {0x21, 0x0321101f}),
9787 SND_HDA_PIN_QUIRK(0x10ec0283, 0x1028, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE
,
9790 {0x21, 0x02211030}),
9791 SND_HDA_PIN_QUIRK(0x10ec0283, 0x1028, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE
,
9792 ALC282_STANDARD_PINS
,
9795 {0x21, 0x0321101f}),
9796 SND_HDA_PIN_QUIRK(0x10ec0285, 0x17aa, "Lenovo", ALC285_FIXUP_LENOVO_PC_BEEP_IN_NOISE
,
9800 {0x21, 0x04211020}),
9801 SND_HDA_PIN_QUIRK(0x10ec0285, 0x17aa, "Lenovo", ALC285_FIXUP_LENOVO_PC_BEEP_IN_NOISE
,
9805 {0x21, 0x04211020}),
9806 SND_HDA_PIN_QUIRK(0x10ec0285, 0x17aa, "Lenovo", ALC285_FIXUP_THINKPAD_NO_BASS_SPK_HEADSET_JACK
,
9809 {0x21, 0x04211020}),
9810 SND_HDA_PIN_QUIRK(0x10ec0287, 0x17aa, "Lenovo", ALC285_FIXUP_THINKPAD_HEADSET_JACK
,
9814 {0x21, 0x03211020}),
9815 SND_HDA_PIN_QUIRK(0x10ec0286, 0x1025, "Acer", ALC286_FIXUP_ACER_AIO_MIC_NO_PRESENCE
,
9818 {0x21, 0x02211020}),
9819 SND_HDA_PIN_QUIRK(0x10ec0288, 0x1028, "Dell", ALC288_FIXUP_DELL1_MIC_NO_PRESENCE
,
9822 {0x21, 0x0321101f}),
9823 SND_HDA_PIN_QUIRK(0x10ec0290, 0x103c, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1
,
9824 ALC290_STANDARD_PINS
,
9827 {0x1a, 0x04a11020}),
9828 SND_HDA_PIN_QUIRK(0x10ec0290, 0x103c, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1
,
9829 ALC290_STANDARD_PINS
,
9832 {0x1a, 0x04a11020}),
9833 SND_HDA_PIN_QUIRK(0x10ec0290, 0x103c, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1
,
9834 ALC290_STANDARD_PINS
,
9836 {0x1a, 0x04a11020}),
9837 SND_HDA_PIN_QUIRK(0x10ec0290, 0x103c, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1
,
9838 ALC290_STANDARD_PINS
,
9840 {0x1a, 0x04a11040}),
9841 SND_HDA_PIN_QUIRK(0x10ec0290, 0x103c, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1
,
9842 ALC290_STANDARD_PINS
,
9845 {0x1a, 0x04a11040}),
9846 SND_HDA_PIN_QUIRK(0x10ec0290, 0x103c, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1
,
9847 ALC290_STANDARD_PINS
,
9850 {0x1a, 0x04a11020}),
9851 SND_HDA_PIN_QUIRK(0x10ec0290, 0x103c, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1
,
9852 ALC290_STANDARD_PINS
,
9855 {0x1a, 0x04a11020}),
9856 SND_HDA_PIN_QUIRK(0x10ec0292, 0x1028, "Dell", ALC269_FIXUP_DELL2_MIC_NO_PRESENCE
,
9857 ALC292_STANDARD_PINS
,
9860 {0x19, 0x01a19030}),
9861 SND_HDA_PIN_QUIRK(0x10ec0292, 0x1028, "Dell", ALC269_FIXUP_DELL2_MIC_NO_PRESENCE
,
9862 ALC292_STANDARD_PINS
,
9866 {0x19, 0x01a1903e}),
9867 SND_HDA_PIN_QUIRK(0x10ec0292, 0x1028, "Dell", ALC269_FIXUP_DELL3_MIC_NO_PRESENCE
,
9868 ALC292_STANDARD_PINS
,
9869 {0x12, 0x90a60140}),
9870 SND_HDA_PIN_QUIRK(0x10ec0293, 0x1028, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE
,
9871 ALC292_STANDARD_PINS
,
9874 {0x19, 0x21a19030}),
9875 SND_HDA_PIN_QUIRK(0x10ec0293, 0x1028, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE
,
9876 ALC292_STANDARD_PINS
,
9877 {0x13, 0x90a60140}),
9878 SND_HDA_PIN_QUIRK(0x10ec0294, 0x1043, "ASUS", ALC294_FIXUP_ASUS_HPE
,
9880 {0x21, 0x04211020}),
9881 SND_HDA_PIN_QUIRK(0x10ec0294, 0x1043, "ASUS", ALC294_FIXUP_ASUS_MIC
,
9884 {0x21, 0x04211020}),
9885 SND_HDA_PIN_QUIRK(0x10ec0294, 0x1043, "ASUS", ALC294_FIXUP_ASUS_SPK
,
9888 {0x21, 0x03211020}),
9889 SND_HDA_PIN_QUIRK(0x10ec0294, 0x1043, "ASUS", ALC294_FIXUP_ASUS_SPK
,
9892 {0x21, 0x04211020}),
9893 SND_HDA_PIN_QUIRK(0x10ec0295, 0x1043, "ASUS", ALC294_FIXUP_ASUS_SPK
,
9896 {0x21, 0x03211020}),
9897 SND_HDA_PIN_QUIRK(0x10ec0295, 0x1043, "ASUS", ALC295_FIXUP_ASUS_MIC_NO_PRESENCE
,
9900 {0x21, 0x04211030}),
9901 SND_HDA_PIN_QUIRK(0x10ec0295, 0x1043, "ASUS", ALC295_FIXUP_ASUS_MIC_NO_PRESENCE
,
9904 {0x21, 0x03211020}),
9905 SND_HDA_PIN_QUIRK(0x10ec0295, 0x1043, "ASUS", ALC295_FIXUP_ASUS_MIC_NO_PRESENCE
,
9908 {0x21, 0x03211020}),
9909 SND_HDA_PIN_QUIRK(0x10ec0295, 0x1028, "Dell", ALC269_FIXUP_DELL4_MIC_NO_PRESENCE
,
9911 {0x21, 0x04211020}),
9912 SND_HDA_PIN_QUIRK(0x10ec0295, 0x1028, "Dell", ALC269_FIXUP_DELL4_MIC_NO_PRESENCE
,
9914 {0x21, 0x04211030}),
9915 SND_HDA_PIN_QUIRK(0x10ec0295, 0x1028, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE
,
9916 ALC295_STANDARD_PINS
,
9918 {0x18, 0x21a19030}),
9919 SND_HDA_PIN_QUIRK(0x10ec0295, 0x1028, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE
,
9920 ALC295_STANDARD_PINS
,
9922 {0x18, 0x21a19050}),
9923 SND_HDA_PIN_QUIRK(0x10ec0295, 0x1028, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE
,
9924 ALC295_STANDARD_PINS
),
9925 SND_HDA_PIN_QUIRK(0x10ec0298, 0x1028, "Dell", ALC298_FIXUP_DELL1_MIC_NO_PRESENCE
,
9926 ALC298_STANDARD_PINS
,
9927 {0x17, 0x90170110}),
9928 SND_HDA_PIN_QUIRK(0x10ec0298, 0x1028, "Dell", ALC298_FIXUP_DELL1_MIC_NO_PRESENCE
,
9929 ALC298_STANDARD_PINS
,
9930 {0x17, 0x90170140}),
9931 SND_HDA_PIN_QUIRK(0x10ec0298, 0x1028, "Dell", ALC298_FIXUP_DELL1_MIC_NO_PRESENCE
,
9932 ALC298_STANDARD_PINS
,
9933 {0x17, 0x90170150}),
9934 SND_HDA_PIN_QUIRK(0x10ec0298, 0x1028, "Dell", ALC298_FIXUP_SPK_VOLUME
,
9939 {0x21, 0x03211030}),
9940 SND_HDA_PIN_QUIRK(0x10ec0298, 0x1028, "Dell", ALC298_FIXUP_ALIENWARE_MIC_NO_PRESENCE
,
9944 {0x21, 0x03211020}),
9945 SND_HDA_PIN_QUIRK(0x10ec0299, 0x1028, "Dell", ALC269_FIXUP_DELL4_MIC_NO_PRESENCE
,
9946 ALC225_STANDARD_PINS
,
9948 {0x17, 0x90170110}),
9949 SND_HDA_PIN_QUIRK(0x10ec0623, 0x17aa, "Lenovo", ALC283_FIXUP_HEADSET_MIC
,
9954 {0x21, 0x0221101f}),
9958 /* This is the fallback pin_fixup_tbl for alc269 family, to make the tbl match
9959 * more machines, don't need to match all valid pins, just need to match
9960 * all the pins defined in the tbl. Just because of this reason, it is possible
9961 * that a single machine matches multiple tbls, so there is one limitation:
9962 * at most one tbl is allowed to define for the same vendor and same codec
9964 static const struct snd_hda_pin_quirk alc269_fallback_pin_fixup_tbl
[] = {
9965 SND_HDA_PIN_QUIRK(0x10ec0289, 0x1028, "Dell", ALC269_FIXUP_DELL4_MIC_NO_PRESENCE
,
9967 {0x1b, 0x40000000}),
9968 SND_HDA_PIN_QUIRK(0x10ec0256, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE
,
9970 {0x1a, 0x40000000}),
9971 SND_HDA_PIN_QUIRK(0x10ec0236, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE
,
9973 {0x1a, 0x40000000}),
9974 SND_HDA_PIN_QUIRK(0x10ec0274, 0x1028, "Dell", ALC274_FIXUP_DELL_AIO_LINEOUT_VERB
,
9976 {0x1a, 0x40000000}),
9980 static void alc269_fill_coef(struct hda_codec
*codec
)
9982 struct alc_spec
*spec
= codec
->spec
;
9985 if (spec
->codec_variant
!= ALC269_TYPE_ALC269VB
)
9988 if ((alc_get_coef0(codec
) & 0x00ff) < 0x015) {
9989 alc_write_coef_idx(codec
, 0xf, 0x960b);
9990 alc_write_coef_idx(codec
, 0xe, 0x8817);
9993 if ((alc_get_coef0(codec
) & 0x00ff) == 0x016) {
9994 alc_write_coef_idx(codec
, 0xf, 0x960b);
9995 alc_write_coef_idx(codec
, 0xe, 0x8814);
9998 if ((alc_get_coef0(codec
) & 0x00ff) == 0x017) {
9999 /* Power up output pin */
10000 alc_update_coef_idx(codec
, 0x04, 0, 1<<11);
10003 if ((alc_get_coef0(codec
) & 0x00ff) == 0x018) {
10004 val
= alc_read_coef_idx(codec
, 0xd);
10005 if (val
!= -1 && (val
& 0x0c00) >> 10 != 0x1) {
10006 /* Capless ramp up clock control */
10007 alc_write_coef_idx(codec
, 0xd, val
| (1<<10));
10009 val
= alc_read_coef_idx(codec
, 0x17);
10010 if (val
!= -1 && (val
& 0x01c0) >> 6 != 0x4) {
10011 /* Class D power on reset */
10012 alc_write_coef_idx(codec
, 0x17, val
| (1<<7));
10017 alc_update_coef_idx(codec
, 0x4, 0, 1<<11);
10022 static int patch_alc269(struct hda_codec
*codec
)
10024 struct alc_spec
*spec
;
10027 err
= alc_alloc_spec(codec
, 0x0b);
10031 spec
= codec
->spec
;
10032 spec
->gen
.shared_mic_vref_pin
= 0x18;
10033 codec
->power_save_node
= 0;
10036 codec
->patch_ops
.suspend
= alc269_suspend
;
10037 codec
->patch_ops
.resume
= alc269_resume
;
10039 spec
->shutup
= alc_default_shutup
;
10040 spec
->init_hook
= alc_default_init
;
10042 switch (codec
->core
.vendor_id
) {
10044 spec
->codec_variant
= ALC269_TYPE_ALC269VA
;
10045 switch (alc_get_coef0(codec
) & 0x00f0) {
10047 if (codec
->bus
->pci
&&
10048 codec
->bus
->pci
->subsystem_vendor
== 0x1025 &&
10049 spec
->cdefine
.platform_type
== 1)
10050 err
= alc_codec_rename(codec
, "ALC271X");
10051 spec
->codec_variant
= ALC269_TYPE_ALC269VB
;
10054 if (codec
->bus
->pci
&&
10055 codec
->bus
->pci
->subsystem_vendor
== 0x17aa &&
10056 codec
->bus
->pci
->subsystem_device
== 0x21f3)
10057 err
= alc_codec_rename(codec
, "ALC3202");
10058 spec
->codec_variant
= ALC269_TYPE_ALC269VC
;
10061 spec
->codec_variant
= ALC269_TYPE_ALC269VD
;
10064 alc_fix_pll_init(codec
, 0x20, 0x04, 15);
10068 spec
->shutup
= alc269_shutup
;
10069 spec
->init_hook
= alc269_fill_coef
;
10070 alc269_fill_coef(codec
);
10075 spec
->codec_variant
= ALC269_TYPE_ALC280
;
10078 spec
->codec_variant
= ALC269_TYPE_ALC282
;
10079 spec
->shutup
= alc282_shutup
;
10080 spec
->init_hook
= alc282_init
;
10084 spec
->codec_variant
= ALC269_TYPE_ALC283
;
10085 spec
->shutup
= alc283_shutup
;
10086 spec
->init_hook
= alc283_init
;
10090 spec
->codec_variant
= ALC269_TYPE_ALC284
;
10093 spec
->codec_variant
= ALC269_TYPE_ALC293
;
10097 spec
->codec_variant
= ALC269_TYPE_ALC286
;
10100 spec
->codec_variant
= ALC269_TYPE_ALC298
;
10104 spec
->codec_variant
= ALC269_TYPE_ALC255
;
10105 spec
->shutup
= alc256_shutup
;
10106 spec
->init_hook
= alc256_init
;
10112 spec
->codec_variant
= ALC269_TYPE_ALC256
;
10113 spec
->shutup
= alc256_shutup
;
10114 spec
->init_hook
= alc256_init
;
10115 spec
->gen
.mixer_nid
= 0; /* ALC256 does not have any loopback mixer path */
10118 spec
->codec_variant
= ALC269_TYPE_ALC257
;
10119 spec
->shutup
= alc256_shutup
;
10120 spec
->init_hook
= alc256_init
;
10121 spec
->gen
.mixer_nid
= 0;
10127 if (alc_get_coef0(codec
) & 0x0010)
10128 spec
->codec_variant
= ALC269_TYPE_ALC245
;
10130 spec
->codec_variant
= ALC269_TYPE_ALC215
;
10131 spec
->shutup
= alc225_shutup
;
10132 spec
->init_hook
= alc225_init
;
10133 spec
->gen
.mixer_nid
= 0;
10138 spec
->codec_variant
= ALC269_TYPE_ALC225
;
10139 spec
->shutup
= alc225_shutup
;
10140 spec
->init_hook
= alc225_init
;
10141 spec
->gen
.mixer_nid
= 0; /* no loopback on ALC225, ALC295 and ALC299 */
10144 spec
->codec_variant
= ALC269_TYPE_ALC287
;
10145 spec
->shutup
= alc225_shutup
;
10146 spec
->init_hook
= alc225_init
;
10147 spec
->gen
.mixer_nid
= 0; /* no loopback on ALC287 */
10152 spec
->codec_variant
= ALC269_TYPE_ALC294
;
10153 spec
->gen
.mixer_nid
= 0; /* ALC2x4 does not have any loopback mixer path */
10154 alc_update_coef_idx(codec
, 0x6b, 0x0018, (1<<4) | (1<<3)); /* UAJ MIC Vref control by verb */
10155 spec
->init_hook
= alc294_init
;
10158 spec
->codec_variant
= ALC269_TYPE_ALC300
;
10159 spec
->gen
.mixer_nid
= 0; /* no loopback on ALC300 */
10162 spec
->codec_variant
= ALC269_TYPE_ALC623
;
10168 spec
->codec_variant
= ALC269_TYPE_ALC700
;
10169 spec
->gen
.mixer_nid
= 0; /* ALC700 does not have any loopback mixer path */
10170 alc_update_coef_idx(codec
, 0x4a, 1 << 15, 0); /* Combo jack auto trigger control */
10171 spec
->init_hook
= alc294_init
;
10176 if (snd_hda_codec_read(codec
, 0x51, 0, AC_VERB_PARAMETERS
, 0) == 0x10ec5505) {
10177 spec
->has_alc5505_dsp
= 1;
10178 spec
->init_hook
= alc5505_dsp_init
;
10181 alc_pre_init(codec
);
10183 snd_hda_pick_fixup(codec
, alc269_fixup_models
,
10184 alc269_fixup_tbl
, alc269_fixups
);
10185 /* FIXME: both TX300 and ROG Strix G17 have the same SSID, and
10186 * the quirk breaks the latter (bko#214101).
10187 * Clear the wrong entry.
10189 if (codec
->fixup_id
== ALC282_FIXUP_ASUS_TX300
&&
10190 codec
->core
.vendor_id
== 0x10ec0294) {
10191 codec_dbg(codec
, "Clear wrong fixup for ASUS ROG Strix G17\n");
10192 codec
->fixup_id
= HDA_FIXUP_ID_NOT_SET
;
10195 snd_hda_pick_pin_fixup(codec
, alc269_pin_fixup_tbl
, alc269_fixups
, true);
10196 snd_hda_pick_pin_fixup(codec
, alc269_fallback_pin_fixup_tbl
, alc269_fixups
, false);
10197 snd_hda_pick_fixup(codec
, NULL
, alc269_fixup_vendor_tbl
,
10199 snd_hda_apply_fixup(codec
, HDA_FIXUP_ACT_PRE_PROBE
);
10201 alc_auto_parse_customize_define(codec
);
10203 if (has_cdefine_beep(codec
))
10204 spec
->gen
.beep_nid
= 0x01;
10206 /* automatic parse from the BIOS config */
10207 err
= alc269_parse_auto_config(codec
);
10211 if (!spec
->gen
.no_analog
&& spec
->gen
.beep_nid
&& spec
->gen
.mixer_nid
) {
10212 err
= set_beep_amp(spec
, spec
->gen
.mixer_nid
, 0x04, HDA_INPUT
);
10217 snd_hda_apply_fixup(codec
, HDA_FIXUP_ACT_PROBE
);
10230 static int alc861_parse_auto_config(struct hda_codec
*codec
)
10232 static const hda_nid_t alc861_ignore
[] = { 0x1d, 0 };
10233 static const hda_nid_t alc861_ssids
[] = { 0x0e, 0x0f, 0x0b, 0 };
10234 return alc_parse_auto_config(codec
, alc861_ignore
, alc861_ssids
);
10237 /* Pin config fixes */
10239 ALC861_FIXUP_FSC_AMILO_PI1505
,
10240 ALC861_FIXUP_AMP_VREF_0F
,
10241 ALC861_FIXUP_NO_JACK_DETECT
,
10242 ALC861_FIXUP_ASUS_A6RP
,
10243 ALC660_FIXUP_ASUS_W7J
,
10246 /* On some laptops, VREF of pin 0x0f is abused for controlling the main amp */
10247 static void alc861_fixup_asus_amp_vref_0f(struct hda_codec
*codec
,
10248 const struct hda_fixup
*fix
, int action
)
10250 struct alc_spec
*spec
= codec
->spec
;
10253 if (action
!= HDA_FIXUP_ACT_INIT
)
10255 val
= snd_hda_codec_get_pin_target(codec
, 0x0f);
10256 if (!(val
& (AC_PINCTL_IN_EN
| AC_PINCTL_OUT_EN
)))
10257 val
|= AC_PINCTL_IN_EN
;
10258 val
|= AC_PINCTL_VREF_50
;
10259 snd_hda_set_pin_ctl(codec
, 0x0f, val
);
10260 spec
->gen
.keep_vref_in_automute
= 1;
10263 /* suppress the jack-detection */
10264 static void alc_fixup_no_jack_detect(struct hda_codec
*codec
,
10265 const struct hda_fixup
*fix
, int action
)
10267 if (action
== HDA_FIXUP_ACT_PRE_PROBE
)
10268 codec
->no_jack_detect
= 1;
10271 static const struct hda_fixup alc861_fixups
[] = {
10272 [ALC861_FIXUP_FSC_AMILO_PI1505
] = {
10273 .type
= HDA_FIXUP_PINS
,
10274 .v
.pins
= (const struct hda_pintbl
[]) {
10275 { 0x0b, 0x0221101f }, /* HP */
10276 { 0x0f, 0x90170310 }, /* speaker */
10280 [ALC861_FIXUP_AMP_VREF_0F
] = {
10281 .type
= HDA_FIXUP_FUNC
,
10282 .v
.func
= alc861_fixup_asus_amp_vref_0f
,
10284 [ALC861_FIXUP_NO_JACK_DETECT
] = {
10285 .type
= HDA_FIXUP_FUNC
,
10286 .v
.func
= alc_fixup_no_jack_detect
,
10288 [ALC861_FIXUP_ASUS_A6RP
] = {
10289 .type
= HDA_FIXUP_FUNC
,
10290 .v
.func
= alc861_fixup_asus_amp_vref_0f
,
10292 .chain_id
= ALC861_FIXUP_NO_JACK_DETECT
,
10294 [ALC660_FIXUP_ASUS_W7J
] = {
10295 .type
= HDA_FIXUP_VERBS
,
10296 .v
.verbs
= (const struct hda_verb
[]) {
10297 /* ASUS W7J needs a magic pin setup on unused NID 0x10
10298 * for enabling outputs
10300 {0x10, AC_VERB_SET_PIN_WIDGET_CONTROL
, 0x24},
10306 static const struct snd_pci_quirk alc861_fixup_tbl
[] = {
10307 SND_PCI_QUIRK(0x1043, 0x1253, "ASUS W7J", ALC660_FIXUP_ASUS_W7J
),
10308 SND_PCI_QUIRK(0x1043, 0x1263, "ASUS Z35HL", ALC660_FIXUP_ASUS_W7J
),
10309 SND_PCI_QUIRK(0x1043, 0x1393, "ASUS A6Rp", ALC861_FIXUP_ASUS_A6RP
),
10310 SND_PCI_QUIRK_VENDOR(0x1043, "ASUS laptop", ALC861_FIXUP_AMP_VREF_0F
),
10311 SND_PCI_QUIRK(0x1462, 0x7254, "HP DX2200", ALC861_FIXUP_NO_JACK_DETECT
),
10312 SND_PCI_QUIRK_VENDOR(0x1584, "Haier/Uniwill", ALC861_FIXUP_AMP_VREF_0F
),
10313 SND_PCI_QUIRK(0x1734, 0x10c7, "FSC Amilo Pi1505", ALC861_FIXUP_FSC_AMILO_PI1505
),
10319 static int patch_alc861(struct hda_codec
*codec
)
10321 struct alc_spec
*spec
;
10324 err
= alc_alloc_spec(codec
, 0x15);
10328 spec
= codec
->spec
;
10329 if (has_cdefine_beep(codec
))
10330 spec
->gen
.beep_nid
= 0x23;
10333 spec
->power_hook
= alc_power_eapd
;
10336 alc_pre_init(codec
);
10338 snd_hda_pick_fixup(codec
, NULL
, alc861_fixup_tbl
, alc861_fixups
);
10339 snd_hda_apply_fixup(codec
, HDA_FIXUP_ACT_PRE_PROBE
);
10341 /* automatic parse from the BIOS config */
10342 err
= alc861_parse_auto_config(codec
);
10346 if (!spec
->gen
.no_analog
) {
10347 err
= set_beep_amp(spec
, 0x23, 0, HDA_OUTPUT
);
10352 snd_hda_apply_fixup(codec
, HDA_FIXUP_ACT_PROBE
);
10362 * ALC861-VD support
10366 * In addition, an independent DAC
10368 static int alc861vd_parse_auto_config(struct hda_codec
*codec
)
10370 static const hda_nid_t alc861vd_ignore
[] = { 0x1d, 0 };
10371 static const hda_nid_t alc861vd_ssids
[] = { 0x15, 0x1b, 0x14, 0 };
10372 return alc_parse_auto_config(codec
, alc861vd_ignore
, alc861vd_ssids
);
10376 ALC660VD_FIX_ASUS_GPIO1
,
10377 ALC861VD_FIX_DALLAS
,
10380 /* exclude VREF80 */
10381 static void alc861vd_fixup_dallas(struct hda_codec
*codec
,
10382 const struct hda_fixup
*fix
, int action
)
10384 if (action
== HDA_FIXUP_ACT_PRE_PROBE
) {
10385 snd_hda_override_pin_caps(codec
, 0x18, 0x00000734);
10386 snd_hda_override_pin_caps(codec
, 0x19, 0x0000073c);
10391 static void alc660vd_fixup_asus_gpio1(struct hda_codec
*codec
,
10392 const struct hda_fixup
*fix
, int action
)
10394 struct alc_spec
*spec
= codec
->spec
;
10396 if (action
== HDA_FIXUP_ACT_PRE_PROBE
)
10397 spec
->gpio_mask
|= 0x02;
10398 alc_fixup_gpio(codec
, action
, 0x01);
10401 static const struct hda_fixup alc861vd_fixups
[] = {
10402 [ALC660VD_FIX_ASUS_GPIO1
] = {
10403 .type
= HDA_FIXUP_FUNC
,
10404 .v
.func
= alc660vd_fixup_asus_gpio1
,
10406 [ALC861VD_FIX_DALLAS
] = {
10407 .type
= HDA_FIXUP_FUNC
,
10408 .v
.func
= alc861vd_fixup_dallas
,
10412 static const struct snd_pci_quirk alc861vd_fixup_tbl
[] = {
10413 SND_PCI_QUIRK(0x103c, 0x30bf, "HP TX1000", ALC861VD_FIX_DALLAS
),
10414 SND_PCI_QUIRK(0x1043, 0x1339, "ASUS A7-K", ALC660VD_FIX_ASUS_GPIO1
),
10415 SND_PCI_QUIRK(0x1179, 0xff31, "Toshiba L30-149", ALC861VD_FIX_DALLAS
),
10421 static int patch_alc861vd(struct hda_codec
*codec
)
10423 struct alc_spec
*spec
;
10426 err
= alc_alloc_spec(codec
, 0x0b);
10430 spec
= codec
->spec
;
10431 if (has_cdefine_beep(codec
))
10432 spec
->gen
.beep_nid
= 0x23;
10434 spec
->shutup
= alc_eapd_shutup
;
10436 alc_pre_init(codec
);
10438 snd_hda_pick_fixup(codec
, NULL
, alc861vd_fixup_tbl
, alc861vd_fixups
);
10439 snd_hda_apply_fixup(codec
, HDA_FIXUP_ACT_PRE_PROBE
);
10441 /* automatic parse from the BIOS config */
10442 err
= alc861vd_parse_auto_config(codec
);
10446 if (!spec
->gen
.no_analog
) {
10447 err
= set_beep_amp(spec
, 0x0b, 0x05, HDA_INPUT
);
10452 snd_hda_apply_fixup(codec
, HDA_FIXUP_ACT_PROBE
);
10464 * ALC662 is almost identical with ALC880 but has cleaner and more flexible
10465 * configuration. Each pin widget can choose any input DACs and a mixer.
10466 * Each ADC is connected from a mixer of all inputs. This makes possible
10467 * 6-channel independent captures.
10469 * In addition, an independent DAC for the multi-playback (not used in this
10474 * BIOS auto configuration
10477 static int alc662_parse_auto_config(struct hda_codec
*codec
)
10479 static const hda_nid_t alc662_ignore
[] = { 0x1d, 0 };
10480 static const hda_nid_t alc663_ssids
[] = { 0x15, 0x1b, 0x14, 0x21 };
10481 static const hda_nid_t alc662_ssids
[] = { 0x15, 0x1b, 0x14, 0 };
10482 const hda_nid_t
*ssids
;
10484 if (codec
->core
.vendor_id
== 0x10ec0272 || codec
->core
.vendor_id
== 0x10ec0663 ||
10485 codec
->core
.vendor_id
== 0x10ec0665 || codec
->core
.vendor_id
== 0x10ec0670 ||
10486 codec
->core
.vendor_id
== 0x10ec0671)
10487 ssids
= alc663_ssids
;
10489 ssids
= alc662_ssids
;
10490 return alc_parse_auto_config(codec
, alc662_ignore
, ssids
);
10493 static void alc272_fixup_mario(struct hda_codec
*codec
,
10494 const struct hda_fixup
*fix
, int action
)
10496 if (action
!= HDA_FIXUP_ACT_PRE_PROBE
)
10498 if (snd_hda_override_amp_caps(codec
, 0x2, HDA_OUTPUT
,
10499 (0x3b << AC_AMPCAP_OFFSET_SHIFT
) |
10500 (0x3b << AC_AMPCAP_NUM_STEPS_SHIFT
) |
10501 (0x03 << AC_AMPCAP_STEP_SIZE_SHIFT
) |
10502 (0 << AC_AMPCAP_MUTE_SHIFT
)))
10503 codec_warn(codec
, "failed to override amp caps for NID 0x2\n");
10506 static const struct snd_pcm_chmap_elem asus_pcm_2_1_chmaps
[] = {
10508 .map
= { SNDRV_CHMAP_FL
, SNDRV_CHMAP_FR
} },
10510 .map
= { SNDRV_CHMAP_FL
, SNDRV_CHMAP_FR
,
10511 SNDRV_CHMAP_NA
, SNDRV_CHMAP_LFE
} }, /* LFE only on right */
10515 /* override the 2.1 chmap */
10516 static void alc_fixup_bass_chmap(struct hda_codec
*codec
,
10517 const struct hda_fixup
*fix
, int action
)
10519 if (action
== HDA_FIXUP_ACT_BUILD
) {
10520 struct alc_spec
*spec
= codec
->spec
;
10521 spec
->gen
.pcm_rec
[0]->stream
[0].chmap
= asus_pcm_2_1_chmaps
;
10525 /* avoid D3 for keeping GPIO up */
10526 static unsigned int gpio_led_power_filter(struct hda_codec
*codec
,
10528 unsigned int power_state
)
10530 struct alc_spec
*spec
= codec
->spec
;
10531 if (nid
== codec
->core
.afg
&& power_state
== AC_PWRST_D3
&& spec
->gpio_data
)
10532 return AC_PWRST_D0
;
10533 return power_state
;
10536 static void alc662_fixup_led_gpio1(struct hda_codec
*codec
,
10537 const struct hda_fixup
*fix
, int action
)
10539 struct alc_spec
*spec
= codec
->spec
;
10541 alc_fixup_hp_gpio_led(codec
, action
, 0x01, 0);
10542 if (action
== HDA_FIXUP_ACT_PRE_PROBE
) {
10543 spec
->mute_led_polarity
= 1;
10544 codec
->power_filter
= gpio_led_power_filter
;
10548 static void alc662_usi_automute_hook(struct hda_codec
*codec
,
10549 struct hda_jack_callback
*jack
)
10551 struct alc_spec
*spec
= codec
->spec
;
10554 snd_hda_gen_hp_automute(codec
, jack
);
10556 vref
= spec
->gen
.hp_jack_present
? PIN_VREF80
: 0;
10558 snd_hda_codec_write(codec
, 0x19, 0, AC_VERB_SET_PIN_WIDGET_CONTROL
,
10562 static void alc662_fixup_usi_headset_mic(struct hda_codec
*codec
,
10563 const struct hda_fixup
*fix
, int action
)
10565 struct alc_spec
*spec
= codec
->spec
;
10566 if (action
== HDA_FIXUP_ACT_PRE_PROBE
) {
10567 spec
->parse_flags
|= HDA_PINCFG_HEADSET_MIC
;
10568 spec
->gen
.hp_automute_hook
= alc662_usi_automute_hook
;
10572 static void alc662_aspire_ethos_mute_speakers(struct hda_codec
*codec
,
10573 struct hda_jack_callback
*cb
)
10575 /* surround speakers at 0x1b already get muted automatically when
10576 * headphones are plugged in, but we have to mute/unmute the remaining
10577 * channels manually:
10578 * 0x15 - front left/front right
10579 * 0x18 - front center/ LFE
10581 if (snd_hda_jack_detect_state(codec
, 0x1b) == HDA_JACK_PRESENT
) {
10582 snd_hda_set_pin_ctl_cache(codec
, 0x15, 0);
10583 snd_hda_set_pin_ctl_cache(codec
, 0x18, 0);
10585 snd_hda_set_pin_ctl_cache(codec
, 0x15, PIN_OUT
);
10586 snd_hda_set_pin_ctl_cache(codec
, 0x18, PIN_OUT
);
10590 static void alc662_fixup_aspire_ethos_hp(struct hda_codec
*codec
,
10591 const struct hda_fixup
*fix
, int action
)
10593 /* Pin 0x1b: shared headphones jack and surround speakers */
10594 if (!is_jack_detectable(codec
, 0x1b))
10598 case HDA_FIXUP_ACT_PRE_PROBE
:
10599 snd_hda_jack_detect_enable_callback(codec
, 0x1b,
10600 alc662_aspire_ethos_mute_speakers
);
10601 /* subwoofer needs an extra GPIO setting to become audible */
10602 alc_setup_gpio(codec
, 0x02);
10604 case HDA_FIXUP_ACT_INIT
:
10605 /* Make sure to start in a correct state, i.e. if
10606 * headphones have been plugged in before powering up the system
10608 alc662_aspire_ethos_mute_speakers(codec
, NULL
);
10613 static void alc671_fixup_hp_headset_mic2(struct hda_codec
*codec
,
10614 const struct hda_fixup
*fix
, int action
)
10616 struct alc_spec
*spec
= codec
->spec
;
10618 static const struct hda_pintbl pincfgs
[] = {
10619 { 0x19, 0x02a11040 }, /* use as headset mic, with its own jack detect */
10620 { 0x1b, 0x0181304f },
10625 case HDA_FIXUP_ACT_PRE_PROBE
:
10626 spec
->gen
.mixer_nid
= 0;
10627 spec
->parse_flags
|= HDA_PINCFG_HEADSET_MIC
;
10628 snd_hda_apply_pincfgs(codec
, pincfgs
);
10630 case HDA_FIXUP_ACT_INIT
:
10631 alc_write_coef_idx(codec
, 0x19, 0xa054);
10636 static void alc897_hp_automute_hook(struct hda_codec
*codec
,
10637 struct hda_jack_callback
*jack
)
10639 struct alc_spec
*spec
= codec
->spec
;
10642 snd_hda_gen_hp_automute(codec
, jack
);
10643 vref
= spec
->gen
.hp_jack_present
? (PIN_HP
| AC_PINCTL_VREF_100
) : PIN_HP
;
10644 snd_hda_codec_write(codec
, 0x1b, 0, AC_VERB_SET_PIN_WIDGET_CONTROL
,
10648 static void alc897_fixup_lenovo_headset_mic(struct hda_codec
*codec
,
10649 const struct hda_fixup
*fix
, int action
)
10651 struct alc_spec
*spec
= codec
->spec
;
10652 if (action
== HDA_FIXUP_ACT_PRE_PROBE
) {
10653 spec
->gen
.hp_automute_hook
= alc897_hp_automute_hook
;
10657 static const struct coef_fw alc668_coefs
[] = {
10658 WRITE_COEF(0x01, 0xbebe), WRITE_COEF(0x02, 0xaaaa), WRITE_COEF(0x03, 0x0),
10659 WRITE_COEF(0x04, 0x0180), WRITE_COEF(0x06, 0x0), WRITE_COEF(0x07, 0x0f80),
10660 WRITE_COEF(0x08, 0x0031), WRITE_COEF(0x0a, 0x0060), WRITE_COEF(0x0b, 0x0),
10661 WRITE_COEF(0x0c, 0x7cf7), WRITE_COEF(0x0d, 0x1080), WRITE_COEF(0x0e, 0x7f7f),
10662 WRITE_COEF(0x0f, 0xcccc), WRITE_COEF(0x10, 0xddcc), WRITE_COEF(0x11, 0x0001),
10663 WRITE_COEF(0x13, 0x0), WRITE_COEF(0x14, 0x2aa0), WRITE_COEF(0x17, 0xa940),
10664 WRITE_COEF(0x19, 0x0), WRITE_COEF(0x1a, 0x0), WRITE_COEF(0x1b, 0x0),
10665 WRITE_COEF(0x1c, 0x0), WRITE_COEF(0x1d, 0x0), WRITE_COEF(0x1e, 0x7418),
10666 WRITE_COEF(0x1f, 0x0804), WRITE_COEF(0x20, 0x4200), WRITE_COEF(0x21, 0x0468),
10667 WRITE_COEF(0x22, 0x8ccc), WRITE_COEF(0x23, 0x0250), WRITE_COEF(0x24, 0x7418),
10668 WRITE_COEF(0x27, 0x0), WRITE_COEF(0x28, 0x8ccc), WRITE_COEF(0x2a, 0xff00),
10669 WRITE_COEF(0x2b, 0x8000), WRITE_COEF(0xa7, 0xff00), WRITE_COEF(0xa8, 0x8000),
10670 WRITE_COEF(0xaa, 0x2e17), WRITE_COEF(0xab, 0xa0c0), WRITE_COEF(0xac, 0x0),
10671 WRITE_COEF(0xad, 0x0), WRITE_COEF(0xae, 0x2ac6), WRITE_COEF(0xaf, 0xa480),
10672 WRITE_COEF(0xb0, 0x0), WRITE_COEF(0xb1, 0x0), WRITE_COEF(0xb2, 0x0),
10673 WRITE_COEF(0xb3, 0x0), WRITE_COEF(0xb4, 0x0), WRITE_COEF(0xb5, 0x1040),
10674 WRITE_COEF(0xb6, 0xd697), WRITE_COEF(0xb7, 0x902b), WRITE_COEF(0xb8, 0xd697),
10675 WRITE_COEF(0xb9, 0x902b), WRITE_COEF(0xba, 0xb8ba), WRITE_COEF(0xbb, 0xaaab),
10676 WRITE_COEF(0xbc, 0xaaaf), WRITE_COEF(0xbd, 0x6aaa), WRITE_COEF(0xbe, 0x1c02),
10677 WRITE_COEF(0xc0, 0x00ff), WRITE_COEF(0xc1, 0x0fa6),
10681 static void alc668_restore_default_value(struct hda_codec
*codec
)
10683 alc_process_coef_fw(codec
, alc668_coefs
);
10687 ALC662_FIXUP_ASPIRE
,
10688 ALC662_FIXUP_LED_GPIO1
,
10689 ALC662_FIXUP_IDEAPAD
,
10690 ALC272_FIXUP_MARIO
,
10691 ALC662_FIXUP_CZC_ET26
,
10692 ALC662_FIXUP_CZC_P10T
,
10693 ALC662_FIXUP_SKU_IGNORE
,
10694 ALC662_FIXUP_HP_RP5800
,
10695 ALC662_FIXUP_ASUS_MODE1
,
10696 ALC662_FIXUP_ASUS_MODE2
,
10697 ALC662_FIXUP_ASUS_MODE3
,
10698 ALC662_FIXUP_ASUS_MODE4
,
10699 ALC662_FIXUP_ASUS_MODE5
,
10700 ALC662_FIXUP_ASUS_MODE6
,
10701 ALC662_FIXUP_ASUS_MODE7
,
10702 ALC662_FIXUP_ASUS_MODE8
,
10703 ALC662_FIXUP_NO_JACK_DETECT
,
10704 ALC662_FIXUP_ZOTAC_Z68
,
10705 ALC662_FIXUP_INV_DMIC
,
10706 ALC662_FIXUP_DELL_MIC_NO_PRESENCE
,
10707 ALC668_FIXUP_DELL_MIC_NO_PRESENCE
,
10708 ALC662_FIXUP_HEADSET_MODE
,
10709 ALC668_FIXUP_HEADSET_MODE
,
10710 ALC662_FIXUP_BASS_MODE4_CHMAP
,
10711 ALC662_FIXUP_BASS_16
,
10712 ALC662_FIXUP_BASS_1A
,
10713 ALC662_FIXUP_BASS_CHMAP
,
10714 ALC668_FIXUP_AUTO_MUTE
,
10715 ALC668_FIXUP_DELL_DISABLE_AAMIX
,
10716 ALC668_FIXUP_DELL_XPS13
,
10717 ALC662_FIXUP_ASUS_Nx50
,
10718 ALC668_FIXUP_ASUS_Nx51_HEADSET_MODE
,
10719 ALC668_FIXUP_ASUS_Nx51
,
10720 ALC668_FIXUP_MIC_COEF
,
10721 ALC668_FIXUP_ASUS_G751
,
10722 ALC891_FIXUP_HEADSET_MODE
,
10723 ALC891_FIXUP_DELL_MIC_NO_PRESENCE
,
10724 ALC662_FIXUP_ACER_VERITON
,
10725 ALC892_FIXUP_ASROCK_MOBO
,
10726 ALC662_FIXUP_USI_FUNC
,
10727 ALC662_FIXUP_USI_HEADSET_MODE
,
10728 ALC662_FIXUP_LENOVO_MULTI_CODECS
,
10729 ALC669_FIXUP_ACER_ASPIRE_ETHOS
,
10730 ALC669_FIXUP_ACER_ASPIRE_ETHOS_HEADSET
,
10731 ALC671_FIXUP_HP_HEADSET_MIC2
,
10732 ALC662_FIXUP_ACER_X2660G_HEADSET_MODE
,
10733 ALC662_FIXUP_ACER_NITRO_HEADSET_MODE
,
10734 ALC668_FIXUP_ASUS_NO_HEADSET_MIC
,
10735 ALC668_FIXUP_HEADSET_MIC
,
10736 ALC668_FIXUP_MIC_DET_COEF
,
10737 ALC897_FIXUP_LENOVO_HEADSET_MIC
,
10738 ALC897_FIXUP_HEADSET_MIC_PIN
,
10741 static const struct hda_fixup alc662_fixups
[] = {
10742 [ALC662_FIXUP_ASPIRE
] = {
10743 .type
= HDA_FIXUP_PINS
,
10744 .v
.pins
= (const struct hda_pintbl
[]) {
10745 { 0x15, 0x99130112 }, /* subwoofer */
10749 [ALC662_FIXUP_LED_GPIO1
] = {
10750 .type
= HDA_FIXUP_FUNC
,
10751 .v
.func
= alc662_fixup_led_gpio1
,
10753 [ALC662_FIXUP_IDEAPAD
] = {
10754 .type
= HDA_FIXUP_PINS
,
10755 .v
.pins
= (const struct hda_pintbl
[]) {
10756 { 0x17, 0x99130112 }, /* subwoofer */
10760 .chain_id
= ALC662_FIXUP_LED_GPIO1
,
10762 [ALC272_FIXUP_MARIO
] = {
10763 .type
= HDA_FIXUP_FUNC
,
10764 .v
.func
= alc272_fixup_mario
,
10766 [ALC662_FIXUP_CZC_ET26
] = {
10767 .type
= HDA_FIXUP_PINS
,
10768 .v
.pins
= (const struct hda_pintbl
[]) {
10769 {0x12, 0x403cc000},
10770 {0x14, 0x90170110}, /* speaker */
10771 {0x15, 0x411111f0},
10772 {0x16, 0x411111f0},
10773 {0x18, 0x01a19030}, /* mic */
10774 {0x19, 0x90a7013f}, /* int-mic */
10775 {0x1a, 0x01014020},
10776 {0x1b, 0x0121401f},
10777 {0x1c, 0x411111f0},
10778 {0x1d, 0x411111f0},
10779 {0x1e, 0x40478e35},
10783 .chain_id
= ALC662_FIXUP_SKU_IGNORE
10785 [ALC662_FIXUP_CZC_P10T
] = {
10786 .type
= HDA_FIXUP_VERBS
,
10787 .v
.verbs
= (const struct hda_verb
[]) {
10788 {0x14, AC_VERB_SET_EAPD_BTLENABLE
, 0},
10792 [ALC662_FIXUP_SKU_IGNORE
] = {
10793 .type
= HDA_FIXUP_FUNC
,
10794 .v
.func
= alc_fixup_sku_ignore
,
10796 [ALC662_FIXUP_HP_RP5800
] = {
10797 .type
= HDA_FIXUP_PINS
,
10798 .v
.pins
= (const struct hda_pintbl
[]) {
10799 { 0x14, 0x0221201f }, /* HP out */
10803 .chain_id
= ALC662_FIXUP_SKU_IGNORE
10805 [ALC662_FIXUP_ASUS_MODE1
] = {
10806 .type
= HDA_FIXUP_PINS
,
10807 .v
.pins
= (const struct hda_pintbl
[]) {
10808 { 0x14, 0x99130110 }, /* speaker */
10809 { 0x18, 0x01a19c20 }, /* mic */
10810 { 0x19, 0x99a3092f }, /* int-mic */
10811 { 0x21, 0x0121401f }, /* HP out */
10815 .chain_id
= ALC662_FIXUP_SKU_IGNORE
10817 [ALC662_FIXUP_ASUS_MODE2
] = {
10818 .type
= HDA_FIXUP_PINS
,
10819 .v
.pins
= (const struct hda_pintbl
[]) {
10820 { 0x14, 0x99130110 }, /* speaker */
10821 { 0x18, 0x01a19820 }, /* mic */
10822 { 0x19, 0x99a3092f }, /* int-mic */
10823 { 0x1b, 0x0121401f }, /* HP out */
10827 .chain_id
= ALC662_FIXUP_SKU_IGNORE
10829 [ALC662_FIXUP_ASUS_MODE3
] = {
10830 .type
= HDA_FIXUP_PINS
,
10831 .v
.pins
= (const struct hda_pintbl
[]) {
10832 { 0x14, 0x99130110 }, /* speaker */
10833 { 0x15, 0x0121441f }, /* HP */
10834 { 0x18, 0x01a19840 }, /* mic */
10835 { 0x19, 0x99a3094f }, /* int-mic */
10836 { 0x21, 0x01211420 }, /* HP2 */
10840 .chain_id
= ALC662_FIXUP_SKU_IGNORE
10842 [ALC662_FIXUP_ASUS_MODE4
] = {
10843 .type
= HDA_FIXUP_PINS
,
10844 .v
.pins
= (const struct hda_pintbl
[]) {
10845 { 0x14, 0x99130110 }, /* speaker */
10846 { 0x16, 0x99130111 }, /* speaker */
10847 { 0x18, 0x01a19840 }, /* mic */
10848 { 0x19, 0x99a3094f }, /* int-mic */
10849 { 0x21, 0x0121441f }, /* HP */
10853 .chain_id
= ALC662_FIXUP_SKU_IGNORE
10855 [ALC662_FIXUP_ASUS_MODE5
] = {
10856 .type
= HDA_FIXUP_PINS
,
10857 .v
.pins
= (const struct hda_pintbl
[]) {
10858 { 0x14, 0x99130110 }, /* speaker */
10859 { 0x15, 0x0121441f }, /* HP */
10860 { 0x16, 0x99130111 }, /* speaker */
10861 { 0x18, 0x01a19840 }, /* mic */
10862 { 0x19, 0x99a3094f }, /* int-mic */
10866 .chain_id
= ALC662_FIXUP_SKU_IGNORE
10868 [ALC662_FIXUP_ASUS_MODE6
] = {
10869 .type
= HDA_FIXUP_PINS
,
10870 .v
.pins
= (const struct hda_pintbl
[]) {
10871 { 0x14, 0x99130110 }, /* speaker */
10872 { 0x15, 0x01211420 }, /* HP2 */
10873 { 0x18, 0x01a19840 }, /* mic */
10874 { 0x19, 0x99a3094f }, /* int-mic */
10875 { 0x1b, 0x0121441f }, /* HP */
10879 .chain_id
= ALC662_FIXUP_SKU_IGNORE
10881 [ALC662_FIXUP_ASUS_MODE7
] = {
10882 .type
= HDA_FIXUP_PINS
,
10883 .v
.pins
= (const struct hda_pintbl
[]) {
10884 { 0x14, 0x99130110 }, /* speaker */
10885 { 0x17, 0x99130111 }, /* speaker */
10886 { 0x18, 0x01a19840 }, /* mic */
10887 { 0x19, 0x99a3094f }, /* int-mic */
10888 { 0x1b, 0x01214020 }, /* HP */
10889 { 0x21, 0x0121401f }, /* HP */
10893 .chain_id
= ALC662_FIXUP_SKU_IGNORE
10895 [ALC662_FIXUP_ASUS_MODE8
] = {
10896 .type
= HDA_FIXUP_PINS
,
10897 .v
.pins
= (const struct hda_pintbl
[]) {
10898 { 0x14, 0x99130110 }, /* speaker */
10899 { 0x12, 0x99a30970 }, /* int-mic */
10900 { 0x15, 0x01214020 }, /* HP */
10901 { 0x17, 0x99130111 }, /* speaker */
10902 { 0x18, 0x01a19840 }, /* mic */
10903 { 0x21, 0x0121401f }, /* HP */
10907 .chain_id
= ALC662_FIXUP_SKU_IGNORE
10909 [ALC662_FIXUP_NO_JACK_DETECT
] = {
10910 .type
= HDA_FIXUP_FUNC
,
10911 .v
.func
= alc_fixup_no_jack_detect
,
10913 [ALC662_FIXUP_ZOTAC_Z68
] = {
10914 .type
= HDA_FIXUP_PINS
,
10915 .v
.pins
= (const struct hda_pintbl
[]) {
10916 { 0x1b, 0x02214020 }, /* Front HP */
10920 [ALC662_FIXUP_INV_DMIC
] = {
10921 .type
= HDA_FIXUP_FUNC
,
10922 .v
.func
= alc_fixup_inv_dmic
,
10924 [ALC668_FIXUP_DELL_XPS13
] = {
10925 .type
= HDA_FIXUP_FUNC
,
10926 .v
.func
= alc_fixup_dell_xps13
,
10928 .chain_id
= ALC668_FIXUP_DELL_DISABLE_AAMIX
10930 [ALC668_FIXUP_DELL_DISABLE_AAMIX
] = {
10931 .type
= HDA_FIXUP_FUNC
,
10932 .v
.func
= alc_fixup_disable_aamix
,
10934 .chain_id
= ALC668_FIXUP_DELL_MIC_NO_PRESENCE
10936 [ALC668_FIXUP_AUTO_MUTE
] = {
10937 .type
= HDA_FIXUP_FUNC
,
10938 .v
.func
= alc_fixup_auto_mute_via_amp
,
10940 .chain_id
= ALC668_FIXUP_DELL_MIC_NO_PRESENCE
10942 [ALC662_FIXUP_DELL_MIC_NO_PRESENCE
] = {
10943 .type
= HDA_FIXUP_PINS
,
10944 .v
.pins
= (const struct hda_pintbl
[]) {
10945 { 0x19, 0x03a1113c }, /* use as headset mic, without its own jack detect */
10946 /* headphone mic by setting pin control of 0x1b (headphone out) to in + vref_50 */
10950 .chain_id
= ALC662_FIXUP_HEADSET_MODE
10952 [ALC662_FIXUP_HEADSET_MODE
] = {
10953 .type
= HDA_FIXUP_FUNC
,
10954 .v
.func
= alc_fixup_headset_mode_alc662
,
10956 [ALC668_FIXUP_DELL_MIC_NO_PRESENCE
] = {
10957 .type
= HDA_FIXUP_PINS
,
10958 .v
.pins
= (const struct hda_pintbl
[]) {
10959 { 0x19, 0x03a1913d }, /* use as headphone mic, without its own jack detect */
10960 { 0x1b, 0x03a1113c }, /* use as headset mic, without its own jack detect */
10964 .chain_id
= ALC668_FIXUP_HEADSET_MODE
10966 [ALC668_FIXUP_HEADSET_MODE
] = {
10967 .type
= HDA_FIXUP_FUNC
,
10968 .v
.func
= alc_fixup_headset_mode_alc668
,
10970 [ALC662_FIXUP_BASS_MODE4_CHMAP
] = {
10971 .type
= HDA_FIXUP_FUNC
,
10972 .v
.func
= alc_fixup_bass_chmap
,
10974 .chain_id
= ALC662_FIXUP_ASUS_MODE4
10976 [ALC662_FIXUP_BASS_16
] = {
10977 .type
= HDA_FIXUP_PINS
,
10978 .v
.pins
= (const struct hda_pintbl
[]) {
10979 {0x16, 0x80106111}, /* bass speaker */
10983 .chain_id
= ALC662_FIXUP_BASS_CHMAP
,
10985 [ALC662_FIXUP_BASS_1A
] = {
10986 .type
= HDA_FIXUP_PINS
,
10987 .v
.pins
= (const struct hda_pintbl
[]) {
10988 {0x1a, 0x80106111}, /* bass speaker */
10992 .chain_id
= ALC662_FIXUP_BASS_CHMAP
,
10994 [ALC662_FIXUP_BASS_CHMAP
] = {
10995 .type
= HDA_FIXUP_FUNC
,
10996 .v
.func
= alc_fixup_bass_chmap
,
10998 [ALC662_FIXUP_ASUS_Nx50
] = {
10999 .type
= HDA_FIXUP_FUNC
,
11000 .v
.func
= alc_fixup_auto_mute_via_amp
,
11002 .chain_id
= ALC662_FIXUP_BASS_1A
11004 [ALC668_FIXUP_ASUS_Nx51_HEADSET_MODE
] = {
11005 .type
= HDA_FIXUP_FUNC
,
11006 .v
.func
= alc_fixup_headset_mode_alc668
,
11007 .chain_id
= ALC662_FIXUP_BASS_CHMAP
11009 [ALC668_FIXUP_ASUS_Nx51
] = {
11010 .type
= HDA_FIXUP_PINS
,
11011 .v
.pins
= (const struct hda_pintbl
[]) {
11012 { 0x19, 0x03a1913d }, /* use as headphone mic, without its own jack detect */
11013 { 0x1a, 0x90170151 }, /* bass speaker */
11014 { 0x1b, 0x03a1113c }, /* use as headset mic, without its own jack detect */
11018 .chain_id
= ALC668_FIXUP_ASUS_Nx51_HEADSET_MODE
,
11020 [ALC668_FIXUP_MIC_COEF
] = {
11021 .type
= HDA_FIXUP_VERBS
,
11022 .v
.verbs
= (const struct hda_verb
[]) {
11023 { 0x20, AC_VERB_SET_COEF_INDEX
, 0xc3 },
11024 { 0x20, AC_VERB_SET_PROC_COEF
, 0x4000 },
11028 [ALC668_FIXUP_ASUS_G751
] = {
11029 .type
= HDA_FIXUP_PINS
,
11030 .v
.pins
= (const struct hda_pintbl
[]) {
11031 { 0x16, 0x0421101f }, /* HP */
11035 .chain_id
= ALC668_FIXUP_MIC_COEF
11037 [ALC891_FIXUP_HEADSET_MODE
] = {
11038 .type
= HDA_FIXUP_FUNC
,
11039 .v
.func
= alc_fixup_headset_mode
,
11041 [ALC891_FIXUP_DELL_MIC_NO_PRESENCE
] = {
11042 .type
= HDA_FIXUP_PINS
,
11043 .v
.pins
= (const struct hda_pintbl
[]) {
11044 { 0x19, 0x03a1913d }, /* use as headphone mic, without its own jack detect */
11045 { 0x1b, 0x03a1113c }, /* use as headset mic, without its own jack detect */
11049 .chain_id
= ALC891_FIXUP_HEADSET_MODE
11051 [ALC662_FIXUP_ACER_VERITON
] = {
11052 .type
= HDA_FIXUP_PINS
,
11053 .v
.pins
= (const struct hda_pintbl
[]) {
11054 { 0x15, 0x50170120 }, /* no internal speaker */
11058 [ALC892_FIXUP_ASROCK_MOBO
] = {
11059 .type
= HDA_FIXUP_PINS
,
11060 .v
.pins
= (const struct hda_pintbl
[]) {
11061 { 0x15, 0x40f000f0 }, /* disabled */
11062 { 0x16, 0x40f000f0 }, /* disabled */
11066 [ALC662_FIXUP_USI_FUNC
] = {
11067 .type
= HDA_FIXUP_FUNC
,
11068 .v
.func
= alc662_fixup_usi_headset_mic
,
11070 [ALC662_FIXUP_USI_HEADSET_MODE
] = {
11071 .type
= HDA_FIXUP_PINS
,
11072 .v
.pins
= (const struct hda_pintbl
[]) {
11073 { 0x19, 0x02a1913c }, /* use as headset mic, without its own jack detect */
11074 { 0x18, 0x01a1903d },
11078 .chain_id
= ALC662_FIXUP_USI_FUNC
11080 [ALC662_FIXUP_LENOVO_MULTI_CODECS
] = {
11081 .type
= HDA_FIXUP_FUNC
,
11082 .v
.func
= alc233_alc662_fixup_lenovo_dual_codecs
,
11084 [ALC669_FIXUP_ACER_ASPIRE_ETHOS_HEADSET
] = {
11085 .type
= HDA_FIXUP_FUNC
,
11086 .v
.func
= alc662_fixup_aspire_ethos_hp
,
11088 [ALC669_FIXUP_ACER_ASPIRE_ETHOS
] = {
11089 .type
= HDA_FIXUP_PINS
,
11090 .v
.pins
= (const struct hda_pintbl
[]) {
11091 { 0x15, 0x92130110 }, /* front speakers */
11092 { 0x18, 0x99130111 }, /* center/subwoofer */
11093 { 0x1b, 0x11130012 }, /* surround plus jack for HP */
11097 .chain_id
= ALC669_FIXUP_ACER_ASPIRE_ETHOS_HEADSET
11099 [ALC671_FIXUP_HP_HEADSET_MIC2
] = {
11100 .type
= HDA_FIXUP_FUNC
,
11101 .v
.func
= alc671_fixup_hp_headset_mic2
,
11103 [ALC662_FIXUP_ACER_X2660G_HEADSET_MODE
] = {
11104 .type
= HDA_FIXUP_PINS
,
11105 .v
.pins
= (const struct hda_pintbl
[]) {
11106 { 0x1a, 0x02a1113c }, /* use as headset mic, without its own jack detect */
11110 .chain_id
= ALC662_FIXUP_USI_FUNC
11112 [ALC662_FIXUP_ACER_NITRO_HEADSET_MODE
] = {
11113 .type
= HDA_FIXUP_PINS
,
11114 .v
.pins
= (const struct hda_pintbl
[]) {
11115 { 0x1a, 0x01a11140 }, /* use as headset mic, without its own jack detect */
11116 { 0x1b, 0x0221144f },
11120 .chain_id
= ALC662_FIXUP_USI_FUNC
11122 [ALC668_FIXUP_ASUS_NO_HEADSET_MIC
] = {
11123 .type
= HDA_FIXUP_PINS
,
11124 .v
.pins
= (const struct hda_pintbl
[]) {
11125 { 0x1b, 0x04a1112c },
11129 .chain_id
= ALC668_FIXUP_HEADSET_MIC
11131 [ALC668_FIXUP_HEADSET_MIC
] = {
11132 .type
= HDA_FIXUP_FUNC
,
11133 .v
.func
= alc269_fixup_headset_mic
,
11135 .chain_id
= ALC668_FIXUP_MIC_DET_COEF
11137 [ALC668_FIXUP_MIC_DET_COEF
] = {
11138 .type
= HDA_FIXUP_VERBS
,
11139 .v
.verbs
= (const struct hda_verb
[]) {
11140 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x15 },
11141 { 0x20, AC_VERB_SET_PROC_COEF
, 0x0d60 },
11145 [ALC897_FIXUP_LENOVO_HEADSET_MIC
] = {
11146 .type
= HDA_FIXUP_FUNC
,
11147 .v
.func
= alc897_fixup_lenovo_headset_mic
,
11149 [ALC897_FIXUP_HEADSET_MIC_PIN
] = {
11150 .type
= HDA_FIXUP_PINS
,
11151 .v
.pins
= (const struct hda_pintbl
[]) {
11152 { 0x1a, 0x03a11050 },
11156 .chain_id
= ALC897_FIXUP_LENOVO_HEADSET_MIC
11160 static const struct snd_pci_quirk alc662_fixup_tbl
[] = {
11161 SND_PCI_QUIRK(0x1019, 0x9087, "ECS", ALC662_FIXUP_ASUS_MODE2
),
11162 SND_PCI_QUIRK(0x1025, 0x022f, "Acer Aspire One", ALC662_FIXUP_INV_DMIC
),
11163 SND_PCI_QUIRK(0x1025, 0x0241, "Packard Bell DOTS", ALC662_FIXUP_INV_DMIC
),
11164 SND_PCI_QUIRK(0x1025, 0x0308, "Acer Aspire 8942G", ALC662_FIXUP_ASPIRE
),
11165 SND_PCI_QUIRK(0x1025, 0x031c, "Gateway NV79", ALC662_FIXUP_SKU_IGNORE
),
11166 SND_PCI_QUIRK(0x1025, 0x0349, "eMachines eM250", ALC662_FIXUP_INV_DMIC
),
11167 SND_PCI_QUIRK(0x1025, 0x034a, "Gateway LT27", ALC662_FIXUP_INV_DMIC
),
11168 SND_PCI_QUIRK(0x1025, 0x038b, "Acer Aspire 8943G", ALC662_FIXUP_ASPIRE
),
11169 SND_PCI_QUIRK(0x1025, 0x0566, "Acer Aspire Ethos 8951G", ALC669_FIXUP_ACER_ASPIRE_ETHOS
),
11170 SND_PCI_QUIRK(0x1025, 0x123c, "Acer Nitro N50-600", ALC662_FIXUP_ACER_NITRO_HEADSET_MODE
),
11171 SND_PCI_QUIRK(0x1025, 0x124e, "Acer 2660G", ALC662_FIXUP_ACER_X2660G_HEADSET_MODE
),
11172 SND_PCI_QUIRK(0x1028, 0x05d8, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE
),
11173 SND_PCI_QUIRK(0x1028, 0x05db, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE
),
11174 SND_PCI_QUIRK(0x1028, 0x05fe, "Dell XPS 15", ALC668_FIXUP_DELL_XPS13
),
11175 SND_PCI_QUIRK(0x1028, 0x060a, "Dell XPS 13", ALC668_FIXUP_DELL_XPS13
),
11176 SND_PCI_QUIRK(0x1028, 0x060d, "Dell M3800", ALC668_FIXUP_DELL_XPS13
),
11177 SND_PCI_QUIRK(0x1028, 0x0625, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE
),
11178 SND_PCI_QUIRK(0x1028, 0x0626, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE
),
11179 SND_PCI_QUIRK(0x1028, 0x0696, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE
),
11180 SND_PCI_QUIRK(0x1028, 0x0698, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE
),
11181 SND_PCI_QUIRK(0x1028, 0x069f, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE
),
11182 SND_PCI_QUIRK(0x103c, 0x1632, "HP RP5800", ALC662_FIXUP_HP_RP5800
),
11183 SND_PCI_QUIRK(0x103c, 0x873e, "HP", ALC671_FIXUP_HP_HEADSET_MIC2
),
11184 SND_PCI_QUIRK(0x103c, 0x885f, "HP 288 Pro G8", ALC671_FIXUP_HP_HEADSET_MIC2
),
11185 SND_PCI_QUIRK(0x1043, 0x1080, "Asus UX501VW", ALC668_FIXUP_HEADSET_MODE
),
11186 SND_PCI_QUIRK(0x1043, 0x11cd, "Asus N550", ALC662_FIXUP_ASUS_Nx50
),
11187 SND_PCI_QUIRK(0x1043, 0x129d, "Asus N750", ALC662_FIXUP_ASUS_Nx50
),
11188 SND_PCI_QUIRK(0x1043, 0x12ff, "ASUS G751", ALC668_FIXUP_ASUS_G751
),
11189 SND_PCI_QUIRK(0x1043, 0x13df, "Asus N550JX", ALC662_FIXUP_BASS_1A
),
11190 SND_PCI_QUIRK(0x1043, 0x1477, "ASUS N56VZ", ALC662_FIXUP_BASS_MODE4_CHMAP
),
11191 SND_PCI_QUIRK(0x1043, 0x15a7, "ASUS UX51VZH", ALC662_FIXUP_BASS_16
),
11192 SND_PCI_QUIRK(0x1043, 0x177d, "ASUS N551", ALC668_FIXUP_ASUS_Nx51
),
11193 SND_PCI_QUIRK(0x1043, 0x17bd, "ASUS N751", ALC668_FIXUP_ASUS_Nx51
),
11194 SND_PCI_QUIRK(0x1043, 0x185d, "ASUS G551JW", ALC668_FIXUP_ASUS_NO_HEADSET_MIC
),
11195 SND_PCI_QUIRK(0x1043, 0x1963, "ASUS X71SL", ALC662_FIXUP_ASUS_MODE8
),
11196 SND_PCI_QUIRK(0x1043, 0x1b73, "ASUS N55SF", ALC662_FIXUP_BASS_16
),
11197 SND_PCI_QUIRK(0x1043, 0x1bf3, "ASUS N76VZ", ALC662_FIXUP_BASS_MODE4_CHMAP
),
11198 SND_PCI_QUIRK(0x1043, 0x8469, "ASUS mobo", ALC662_FIXUP_NO_JACK_DETECT
),
11199 SND_PCI_QUIRK(0x105b, 0x0cd6, "Foxconn", ALC662_FIXUP_ASUS_MODE2
),
11200 SND_PCI_QUIRK(0x144d, 0xc051, "Samsung R720", ALC662_FIXUP_IDEAPAD
),
11201 SND_PCI_QUIRK(0x14cd, 0x5003, "USI", ALC662_FIXUP_USI_HEADSET_MODE
),
11202 SND_PCI_QUIRK(0x17aa, 0x1036, "Lenovo P520", ALC662_FIXUP_LENOVO_MULTI_CODECS
),
11203 SND_PCI_QUIRK(0x17aa, 0x1057, "Lenovo P360", ALC897_FIXUP_HEADSET_MIC_PIN
),
11204 SND_PCI_QUIRK(0x17aa, 0x32ca, "Lenovo ThinkCentre M80", ALC897_FIXUP_HEADSET_MIC_PIN
),
11205 SND_PCI_QUIRK(0x17aa, 0x32cb, "Lenovo ThinkCentre M70", ALC897_FIXUP_HEADSET_MIC_PIN
),
11206 SND_PCI_QUIRK(0x17aa, 0x32cf, "Lenovo ThinkCentre M950", ALC897_FIXUP_HEADSET_MIC_PIN
),
11207 SND_PCI_QUIRK(0x17aa, 0x32f7, "Lenovo ThinkCentre M90", ALC897_FIXUP_HEADSET_MIC_PIN
),
11208 SND_PCI_QUIRK(0x17aa, 0x38af, "Lenovo Ideapad Y550P", ALC662_FIXUP_IDEAPAD
),
11209 SND_PCI_QUIRK(0x17aa, 0x3a0d, "Lenovo Ideapad Y550", ALC662_FIXUP_IDEAPAD
),
11210 SND_PCI_QUIRK(0x1849, 0x5892, "ASRock B150M", ALC892_FIXUP_ASROCK_MOBO
),
11211 SND_PCI_QUIRK(0x19da, 0xa130, "Zotac Z68", ALC662_FIXUP_ZOTAC_Z68
),
11212 SND_PCI_QUIRK(0x1b0a, 0x01b8, "ACER Veriton", ALC662_FIXUP_ACER_VERITON
),
11213 SND_PCI_QUIRK(0x1b35, 0x1234, "CZC ET26", ALC662_FIXUP_CZC_ET26
),
11214 SND_PCI_QUIRK(0x1b35, 0x2206, "CZC P10T", ALC662_FIXUP_CZC_P10T
),
11217 /* Below is a quirk table taken from the old code.
11218 * Basically the device should work as is without the fixup table.
11219 * If BIOS doesn't give a proper info, enable the corresponding
11222 SND_PCI_QUIRK(0x1043, 0x1000, "ASUS N50Vm", ALC662_FIXUP_ASUS_MODE1
),
11223 SND_PCI_QUIRK(0x1043, 0x1092, "ASUS NB", ALC662_FIXUP_ASUS_MODE3
),
11224 SND_PCI_QUIRK(0x1043, 0x1173, "ASUS K73Jn", ALC662_FIXUP_ASUS_MODE1
),
11225 SND_PCI_QUIRK(0x1043, 0x11c3, "ASUS M70V", ALC662_FIXUP_ASUS_MODE3
),
11226 SND_PCI_QUIRK(0x1043, 0x11d3, "ASUS NB", ALC662_FIXUP_ASUS_MODE1
),
11227 SND_PCI_QUIRK(0x1043, 0x11f3, "ASUS NB", ALC662_FIXUP_ASUS_MODE2
),
11228 SND_PCI_QUIRK(0x1043, 0x1203, "ASUS NB", ALC662_FIXUP_ASUS_MODE1
),
11229 SND_PCI_QUIRK(0x1043, 0x1303, "ASUS G60J", ALC662_FIXUP_ASUS_MODE1
),
11230 SND_PCI_QUIRK(0x1043, 0x1333, "ASUS G60Jx", ALC662_FIXUP_ASUS_MODE1
),
11231 SND_PCI_QUIRK(0x1043, 0x1339, "ASUS NB", ALC662_FIXUP_ASUS_MODE2
),
11232 SND_PCI_QUIRK(0x1043, 0x13e3, "ASUS N71JA", ALC662_FIXUP_ASUS_MODE7
),
11233 SND_PCI_QUIRK(0x1043, 0x1463, "ASUS N71", ALC662_FIXUP_ASUS_MODE7
),
11234 SND_PCI_QUIRK(0x1043, 0x14d3, "ASUS G72", ALC662_FIXUP_ASUS_MODE8
),
11235 SND_PCI_QUIRK(0x1043, 0x1563, "ASUS N90", ALC662_FIXUP_ASUS_MODE3
),
11236 SND_PCI_QUIRK(0x1043, 0x15d3, "ASUS N50SF F50SF", ALC662_FIXUP_ASUS_MODE1
),
11237 SND_PCI_QUIRK(0x1043, 0x16c3, "ASUS NB", ALC662_FIXUP_ASUS_MODE2
),
11238 SND_PCI_QUIRK(0x1043, 0x16f3, "ASUS K40C K50C", ALC662_FIXUP_ASUS_MODE2
),
11239 SND_PCI_QUIRK(0x1043, 0x1733, "ASUS N81De", ALC662_FIXUP_ASUS_MODE1
),
11240 SND_PCI_QUIRK(0x1043, 0x1753, "ASUS NB", ALC662_FIXUP_ASUS_MODE2
),
11241 SND_PCI_QUIRK(0x1043, 0x1763, "ASUS NB", ALC662_FIXUP_ASUS_MODE6
),
11242 SND_PCI_QUIRK(0x1043, 0x1765, "ASUS NB", ALC662_FIXUP_ASUS_MODE6
),
11243 SND_PCI_QUIRK(0x1043, 0x1783, "ASUS NB", ALC662_FIXUP_ASUS_MODE2
),
11244 SND_PCI_QUIRK(0x1043, 0x1793, "ASUS F50GX", ALC662_FIXUP_ASUS_MODE1
),
11245 SND_PCI_QUIRK(0x1043, 0x17b3, "ASUS F70SL", ALC662_FIXUP_ASUS_MODE3
),
11246 SND_PCI_QUIRK(0x1043, 0x17f3, "ASUS X58LE", ALC662_FIXUP_ASUS_MODE2
),
11247 SND_PCI_QUIRK(0x1043, 0x1813, "ASUS NB", ALC662_FIXUP_ASUS_MODE2
),
11248 SND_PCI_QUIRK(0x1043, 0x1823, "ASUS NB", ALC662_FIXUP_ASUS_MODE5
),
11249 SND_PCI_QUIRK(0x1043, 0x1833, "ASUS NB", ALC662_FIXUP_ASUS_MODE6
),
11250 SND_PCI_QUIRK(0x1043, 0x1843, "ASUS NB", ALC662_FIXUP_ASUS_MODE2
),
11251 SND_PCI_QUIRK(0x1043, 0x1853, "ASUS F50Z", ALC662_FIXUP_ASUS_MODE1
),
11252 SND_PCI_QUIRK(0x1043, 0x1864, "ASUS NB", ALC662_FIXUP_ASUS_MODE2
),
11253 SND_PCI_QUIRK(0x1043, 0x1876, "ASUS NB", ALC662_FIXUP_ASUS_MODE2
),
11254 SND_PCI_QUIRK(0x1043, 0x1893, "ASUS M50Vm", ALC662_FIXUP_ASUS_MODE3
),
11255 SND_PCI_QUIRK(0x1043, 0x1894, "ASUS X55", ALC662_FIXUP_ASUS_MODE3
),
11256 SND_PCI_QUIRK(0x1043, 0x18b3, "ASUS N80Vc", ALC662_FIXUP_ASUS_MODE1
),
11257 SND_PCI_QUIRK(0x1043, 0x18c3, "ASUS VX5", ALC662_FIXUP_ASUS_MODE1
),
11258 SND_PCI_QUIRK(0x1043, 0x18d3, "ASUS N81Te", ALC662_FIXUP_ASUS_MODE1
),
11259 SND_PCI_QUIRK(0x1043, 0x18f3, "ASUS N505Tp", ALC662_FIXUP_ASUS_MODE1
),
11260 SND_PCI_QUIRK(0x1043, 0x1903, "ASUS F5GL", ALC662_FIXUP_ASUS_MODE1
),
11261 SND_PCI_QUIRK(0x1043, 0x1913, "ASUS NB", ALC662_FIXUP_ASUS_MODE2
),
11262 SND_PCI_QUIRK(0x1043, 0x1933, "ASUS F80Q", ALC662_FIXUP_ASUS_MODE2
),
11263 SND_PCI_QUIRK(0x1043, 0x1943, "ASUS Vx3V", ALC662_FIXUP_ASUS_MODE1
),
11264 SND_PCI_QUIRK(0x1043, 0x1953, "ASUS NB", ALC662_FIXUP_ASUS_MODE1
),
11265 SND_PCI_QUIRK(0x1043, 0x1963, "ASUS X71C", ALC662_FIXUP_ASUS_MODE3
),
11266 SND_PCI_QUIRK(0x1043, 0x1983, "ASUS N5051A", ALC662_FIXUP_ASUS_MODE1
),
11267 SND_PCI_QUIRK(0x1043, 0x1993, "ASUS N20", ALC662_FIXUP_ASUS_MODE1
),
11268 SND_PCI_QUIRK(0x1043, 0x19b3, "ASUS F7Z", ALC662_FIXUP_ASUS_MODE1
),
11269 SND_PCI_QUIRK(0x1043, 0x19c3, "ASUS F5Z/F6x", ALC662_FIXUP_ASUS_MODE2
),
11270 SND_PCI_QUIRK(0x1043, 0x19e3, "ASUS NB", ALC662_FIXUP_ASUS_MODE1
),
11271 SND_PCI_QUIRK(0x1043, 0x19f3, "ASUS NB", ALC662_FIXUP_ASUS_MODE4
),
11276 static const struct hda_model_fixup alc662_fixup_models
[] = {
11277 {.id
= ALC662_FIXUP_ASPIRE
, .name
= "aspire"},
11278 {.id
= ALC662_FIXUP_IDEAPAD
, .name
= "ideapad"},
11279 {.id
= ALC272_FIXUP_MARIO
, .name
= "mario"},
11280 {.id
= ALC662_FIXUP_HP_RP5800
, .name
= "hp-rp5800"},
11281 {.id
= ALC662_FIXUP_ASUS_MODE1
, .name
= "asus-mode1"},
11282 {.id
= ALC662_FIXUP_ASUS_MODE2
, .name
= "asus-mode2"},
11283 {.id
= ALC662_FIXUP_ASUS_MODE3
, .name
= "asus-mode3"},
11284 {.id
= ALC662_FIXUP_ASUS_MODE4
, .name
= "asus-mode4"},
11285 {.id
= ALC662_FIXUP_ASUS_MODE5
, .name
= "asus-mode5"},
11286 {.id
= ALC662_FIXUP_ASUS_MODE6
, .name
= "asus-mode6"},
11287 {.id
= ALC662_FIXUP_ASUS_MODE7
, .name
= "asus-mode7"},
11288 {.id
= ALC662_FIXUP_ASUS_MODE8
, .name
= "asus-mode8"},
11289 {.id
= ALC662_FIXUP_ZOTAC_Z68
, .name
= "zotac-z68"},
11290 {.id
= ALC662_FIXUP_INV_DMIC
, .name
= "inv-dmic"},
11291 {.id
= ALC662_FIXUP_DELL_MIC_NO_PRESENCE
, .name
= "alc662-headset-multi"},
11292 {.id
= ALC668_FIXUP_DELL_MIC_NO_PRESENCE
, .name
= "dell-headset-multi"},
11293 {.id
= ALC662_FIXUP_HEADSET_MODE
, .name
= "alc662-headset"},
11294 {.id
= ALC668_FIXUP_HEADSET_MODE
, .name
= "alc668-headset"},
11295 {.id
= ALC662_FIXUP_BASS_16
, .name
= "bass16"},
11296 {.id
= ALC662_FIXUP_BASS_1A
, .name
= "bass1a"},
11297 {.id
= ALC668_FIXUP_AUTO_MUTE
, .name
= "automute"},
11298 {.id
= ALC668_FIXUP_DELL_XPS13
, .name
= "dell-xps13"},
11299 {.id
= ALC662_FIXUP_ASUS_Nx50
, .name
= "asus-nx50"},
11300 {.id
= ALC668_FIXUP_ASUS_Nx51
, .name
= "asus-nx51"},
11301 {.id
= ALC668_FIXUP_ASUS_G751
, .name
= "asus-g751"},
11302 {.id
= ALC891_FIXUP_HEADSET_MODE
, .name
= "alc891-headset"},
11303 {.id
= ALC891_FIXUP_DELL_MIC_NO_PRESENCE
, .name
= "alc891-headset-multi"},
11304 {.id
= ALC662_FIXUP_ACER_VERITON
, .name
= "acer-veriton"},
11305 {.id
= ALC892_FIXUP_ASROCK_MOBO
, .name
= "asrock-mobo"},
11306 {.id
= ALC662_FIXUP_USI_HEADSET_MODE
, .name
= "usi-headset"},
11307 {.id
= ALC662_FIXUP_LENOVO_MULTI_CODECS
, .name
= "dual-codecs"},
11308 {.id
= ALC669_FIXUP_ACER_ASPIRE_ETHOS
, .name
= "aspire-ethos"},
11312 static const struct snd_hda_pin_quirk alc662_pin_fixup_tbl
[] = {
11313 SND_HDA_PIN_QUIRK(0x10ec0867, 0x1028, "Dell", ALC891_FIXUP_DELL_MIC_NO_PRESENCE
,
11314 {0x17, 0x02211010},
11315 {0x18, 0x01a19030},
11316 {0x1a, 0x01813040},
11317 {0x21, 0x01014020}),
11318 SND_HDA_PIN_QUIRK(0x10ec0867, 0x1028, "Dell", ALC891_FIXUP_DELL_MIC_NO_PRESENCE
,
11319 {0x16, 0x01813030},
11320 {0x17, 0x02211010},
11321 {0x18, 0x01a19040},
11322 {0x21, 0x01014020}),
11323 SND_HDA_PIN_QUIRK(0x10ec0662, 0x1028, "Dell", ALC662_FIXUP_DELL_MIC_NO_PRESENCE
,
11324 {0x14, 0x01014010},
11325 {0x18, 0x01a19020},
11326 {0x1a, 0x0181302f},
11327 {0x1b, 0x0221401f}),
11328 SND_HDA_PIN_QUIRK(0x10ec0668, 0x1028, "Dell", ALC668_FIXUP_AUTO_MUTE
,
11329 {0x12, 0x99a30130},
11330 {0x14, 0x90170110},
11331 {0x15, 0x0321101f},
11332 {0x16, 0x03011020}),
11333 SND_HDA_PIN_QUIRK(0x10ec0668, 0x1028, "Dell", ALC668_FIXUP_AUTO_MUTE
,
11334 {0x12, 0x99a30140},
11335 {0x14, 0x90170110},
11336 {0x15, 0x0321101f},
11337 {0x16, 0x03011020}),
11338 SND_HDA_PIN_QUIRK(0x10ec0668, 0x1028, "Dell", ALC668_FIXUP_AUTO_MUTE
,
11339 {0x12, 0x99a30150},
11340 {0x14, 0x90170110},
11341 {0x15, 0x0321101f},
11342 {0x16, 0x03011020}),
11343 SND_HDA_PIN_QUIRK(0x10ec0668, 0x1028, "Dell", ALC668_FIXUP_AUTO_MUTE
,
11344 {0x14, 0x90170110},
11345 {0x15, 0x0321101f},
11346 {0x16, 0x03011020}),
11347 SND_HDA_PIN_QUIRK(0x10ec0668, 0x1028, "Dell XPS 15", ALC668_FIXUP_AUTO_MUTE
,
11348 {0x12, 0x90a60130},
11349 {0x14, 0x90170110},
11350 {0x15, 0x0321101f}),
11351 SND_HDA_PIN_QUIRK(0x10ec0671, 0x103c, "HP cPC", ALC671_FIXUP_HP_HEADSET_MIC2
,
11352 {0x14, 0x01014010},
11353 {0x17, 0x90170150},
11354 {0x19, 0x02a11060},
11355 {0x1b, 0x01813030},
11356 {0x21, 0x02211020}),
11357 SND_HDA_PIN_QUIRK(0x10ec0671, 0x103c, "HP cPC", ALC671_FIXUP_HP_HEADSET_MIC2
,
11358 {0x14, 0x01014010},
11359 {0x18, 0x01a19040},
11360 {0x1b, 0x01813030},
11361 {0x21, 0x02211020}),
11362 SND_HDA_PIN_QUIRK(0x10ec0671, 0x103c, "HP cPC", ALC671_FIXUP_HP_HEADSET_MIC2
,
11363 {0x14, 0x01014020},
11364 {0x17, 0x90170110},
11365 {0x18, 0x01a19050},
11366 {0x1b, 0x01813040},
11367 {0x21, 0x02211030}),
11373 static int patch_alc662(struct hda_codec
*codec
)
11375 struct alc_spec
*spec
;
11378 err
= alc_alloc_spec(codec
, 0x0b);
11382 spec
= codec
->spec
;
11384 spec
->shutup
= alc_eapd_shutup
;
11386 /* handle multiple HPs as is */
11387 spec
->parse_flags
= HDA_PINCFG_NO_HP_FIXUP
;
11389 alc_fix_pll_init(codec
, 0x20, 0x04, 15);
11391 switch (codec
->core
.vendor_id
) {
11393 spec
->init_hook
= alc668_restore_default_value
;
11397 alc_pre_init(codec
);
11399 snd_hda_pick_fixup(codec
, alc662_fixup_models
,
11400 alc662_fixup_tbl
, alc662_fixups
);
11401 snd_hda_pick_pin_fixup(codec
, alc662_pin_fixup_tbl
, alc662_fixups
, true);
11402 snd_hda_apply_fixup(codec
, HDA_FIXUP_ACT_PRE_PROBE
);
11404 alc_auto_parse_customize_define(codec
);
11406 if (has_cdefine_beep(codec
))
11407 spec
->gen
.beep_nid
= 0x01;
11409 if ((alc_get_coef0(codec
) & (1 << 14)) &&
11410 codec
->bus
->pci
&& codec
->bus
->pci
->subsystem_vendor
== 0x1025 &&
11411 spec
->cdefine
.platform_type
== 1) {
11412 err
= alc_codec_rename(codec
, "ALC272X");
11417 /* automatic parse from the BIOS config */
11418 err
= alc662_parse_auto_config(codec
);
11422 if (!spec
->gen
.no_analog
&& spec
->gen
.beep_nid
) {
11423 switch (codec
->core
.vendor_id
) {
11425 err
= set_beep_amp(spec
, 0x0b, 0x05, HDA_INPUT
);
11431 err
= set_beep_amp(spec
, 0x0b, 0x04, HDA_INPUT
);
11434 err
= set_beep_amp(spec
, 0x0b, 0x03, HDA_INPUT
);
11441 snd_hda_apply_fixup(codec
, HDA_FIXUP_ACT_PROBE
);
11454 static int alc680_parse_auto_config(struct hda_codec
*codec
)
11456 return alc_parse_auto_config(codec
, NULL
, NULL
);
11461 static int patch_alc680(struct hda_codec
*codec
)
11465 /* ALC680 has no aa-loopback mixer */
11466 err
= alc_alloc_spec(codec
, 0);
11470 /* automatic parse from the BIOS config */
11471 err
= alc680_parse_auto_config(codec
);
11483 static const struct hda_device_id snd_hda_id_realtek
[] = {
11484 HDA_CODEC_ENTRY(0x10ec0215, "ALC215", patch_alc269
),
11485 HDA_CODEC_ENTRY(0x10ec0221, "ALC221", patch_alc269
),
11486 HDA_CODEC_ENTRY(0x10ec0222, "ALC222", patch_alc269
),
11487 HDA_CODEC_ENTRY(0x10ec0225, "ALC225", patch_alc269
),
11488 HDA_CODEC_ENTRY(0x10ec0230, "ALC236", patch_alc269
),
11489 HDA_CODEC_ENTRY(0x10ec0231, "ALC231", patch_alc269
),
11490 HDA_CODEC_ENTRY(0x10ec0233, "ALC233", patch_alc269
),
11491 HDA_CODEC_ENTRY(0x10ec0234, "ALC234", patch_alc269
),
11492 HDA_CODEC_ENTRY(0x10ec0235, "ALC233", patch_alc269
),
11493 HDA_CODEC_ENTRY(0x10ec0236, "ALC236", patch_alc269
),
11494 HDA_CODEC_ENTRY(0x10ec0245, "ALC245", patch_alc269
),
11495 HDA_CODEC_ENTRY(0x10ec0255, "ALC255", patch_alc269
),
11496 HDA_CODEC_ENTRY(0x10ec0256, "ALC256", patch_alc269
),
11497 HDA_CODEC_ENTRY(0x10ec0257, "ALC257", patch_alc269
),
11498 HDA_CODEC_ENTRY(0x10ec0260, "ALC260", patch_alc260
),
11499 HDA_CODEC_ENTRY(0x10ec0262, "ALC262", patch_alc262
),
11500 HDA_CODEC_ENTRY(0x10ec0267, "ALC267", patch_alc268
),
11501 HDA_CODEC_ENTRY(0x10ec0268, "ALC268", patch_alc268
),
11502 HDA_CODEC_ENTRY(0x10ec0269, "ALC269", patch_alc269
),
11503 HDA_CODEC_ENTRY(0x10ec0270, "ALC270", patch_alc269
),
11504 HDA_CODEC_ENTRY(0x10ec0272, "ALC272", patch_alc662
),
11505 HDA_CODEC_ENTRY(0x10ec0274, "ALC274", patch_alc269
),
11506 HDA_CODEC_ENTRY(0x10ec0275, "ALC275", patch_alc269
),
11507 HDA_CODEC_ENTRY(0x10ec0276, "ALC276", patch_alc269
),
11508 HDA_CODEC_ENTRY(0x10ec0280, "ALC280", patch_alc269
),
11509 HDA_CODEC_ENTRY(0x10ec0282, "ALC282", patch_alc269
),
11510 HDA_CODEC_ENTRY(0x10ec0283, "ALC283", patch_alc269
),
11511 HDA_CODEC_ENTRY(0x10ec0284, "ALC284", patch_alc269
),
11512 HDA_CODEC_ENTRY(0x10ec0285, "ALC285", patch_alc269
),
11513 HDA_CODEC_ENTRY(0x10ec0286, "ALC286", patch_alc269
),
11514 HDA_CODEC_ENTRY(0x10ec0287, "ALC287", patch_alc269
),
11515 HDA_CODEC_ENTRY(0x10ec0288, "ALC288", patch_alc269
),
11516 HDA_CODEC_ENTRY(0x10ec0289, "ALC289", patch_alc269
),
11517 HDA_CODEC_ENTRY(0x10ec0290, "ALC290", patch_alc269
),
11518 HDA_CODEC_ENTRY(0x10ec0292, "ALC292", patch_alc269
),
11519 HDA_CODEC_ENTRY(0x10ec0293, "ALC293", patch_alc269
),
11520 HDA_CODEC_ENTRY(0x10ec0294, "ALC294", patch_alc269
),
11521 HDA_CODEC_ENTRY(0x10ec0295, "ALC295", patch_alc269
),
11522 HDA_CODEC_ENTRY(0x10ec0298, "ALC298", patch_alc269
),
11523 HDA_CODEC_ENTRY(0x10ec0299, "ALC299", patch_alc269
),
11524 HDA_CODEC_ENTRY(0x10ec0300, "ALC300", patch_alc269
),
11525 HDA_CODEC_ENTRY(0x10ec0623, "ALC623", patch_alc269
),
11526 HDA_CODEC_REV_ENTRY(0x10ec0861, 0x100340, "ALC660", patch_alc861
),
11527 HDA_CODEC_ENTRY(0x10ec0660, "ALC660-VD", patch_alc861vd
),
11528 HDA_CODEC_ENTRY(0x10ec0861, "ALC861", patch_alc861
),
11529 HDA_CODEC_ENTRY(0x10ec0862, "ALC861-VD", patch_alc861vd
),
11530 HDA_CODEC_REV_ENTRY(0x10ec0662, 0x100002, "ALC662 rev2", patch_alc882
),
11531 HDA_CODEC_REV_ENTRY(0x10ec0662, 0x100101, "ALC662 rev1", patch_alc662
),
11532 HDA_CODEC_REV_ENTRY(0x10ec0662, 0x100300, "ALC662 rev3", patch_alc662
),
11533 HDA_CODEC_ENTRY(0x10ec0663, "ALC663", patch_alc662
),
11534 HDA_CODEC_ENTRY(0x10ec0665, "ALC665", patch_alc662
),
11535 HDA_CODEC_ENTRY(0x10ec0667, "ALC667", patch_alc662
),
11536 HDA_CODEC_ENTRY(0x10ec0668, "ALC668", patch_alc662
),
11537 HDA_CODEC_ENTRY(0x10ec0670, "ALC670", patch_alc662
),
11538 HDA_CODEC_ENTRY(0x10ec0671, "ALC671", patch_alc662
),
11539 HDA_CODEC_ENTRY(0x10ec0680, "ALC680", patch_alc680
),
11540 HDA_CODEC_ENTRY(0x10ec0700, "ALC700", patch_alc269
),
11541 HDA_CODEC_ENTRY(0x10ec0701, "ALC701", patch_alc269
),
11542 HDA_CODEC_ENTRY(0x10ec0703, "ALC703", patch_alc269
),
11543 HDA_CODEC_ENTRY(0x10ec0711, "ALC711", patch_alc269
),
11544 HDA_CODEC_ENTRY(0x10ec0867, "ALC891", patch_alc662
),
11545 HDA_CODEC_ENTRY(0x10ec0880, "ALC880", patch_alc880
),
11546 HDA_CODEC_ENTRY(0x10ec0882, "ALC882", patch_alc882
),
11547 HDA_CODEC_ENTRY(0x10ec0883, "ALC883", patch_alc882
),
11548 HDA_CODEC_REV_ENTRY(0x10ec0885, 0x100101, "ALC889A", patch_alc882
),
11549 HDA_CODEC_REV_ENTRY(0x10ec0885, 0x100103, "ALC889A", patch_alc882
),
11550 HDA_CODEC_ENTRY(0x10ec0885, "ALC885", patch_alc882
),
11551 HDA_CODEC_ENTRY(0x10ec0887, "ALC887", patch_alc882
),
11552 HDA_CODEC_REV_ENTRY(0x10ec0888, 0x100101, "ALC1200", patch_alc882
),
11553 HDA_CODEC_ENTRY(0x10ec0888, "ALC888", patch_alc882
),
11554 HDA_CODEC_ENTRY(0x10ec0889, "ALC889", patch_alc882
),
11555 HDA_CODEC_ENTRY(0x10ec0892, "ALC892", patch_alc662
),
11556 HDA_CODEC_ENTRY(0x10ec0897, "ALC897", patch_alc662
),
11557 HDA_CODEC_ENTRY(0x10ec0899, "ALC898", patch_alc882
),
11558 HDA_CODEC_ENTRY(0x10ec0900, "ALC1150", patch_alc882
),
11559 HDA_CODEC_ENTRY(0x10ec0b00, "ALCS1200A", patch_alc882
),
11560 HDA_CODEC_ENTRY(0x10ec1168, "ALC1220", patch_alc882
),
11561 HDA_CODEC_ENTRY(0x10ec1220, "ALC1220", patch_alc882
),
11562 HDA_CODEC_ENTRY(0x19e58326, "HW8326", patch_alc269
),
11563 {} /* terminator */
11565 MODULE_DEVICE_TABLE(hdaudio
, snd_hda_id_realtek
);
11567 MODULE_LICENSE("GPL");
11568 MODULE_DESCRIPTION("Realtek HD-audio codec");
11570 static struct hda_codec_driver realtek_driver
= {
11571 .id
= snd_hda_id_realtek
,
11574 module_hda_codec_driver(realtek_driver
);