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 <linux/ctype.h>
22 #include <sound/core.h>
23 #include <sound/jack.h>
24 #include <sound/hda_codec.h>
25 #include "hda_local.h"
26 #include "hda_auto_parser.h"
28 #include "hda_generic.h"
29 #include "hda_component.h"
31 /* keep halting ALC5505 DSP, for power saving */
32 #define HALT_REALTEK_ALC5505
34 /* extra amp-initialization sequence types */
42 ALC_HEADSET_MODE_UNKNOWN
,
43 ALC_HEADSET_MODE_UNPLUGGED
,
44 ALC_HEADSET_MODE_HEADSET
,
46 ALC_HEADSET_MODE_HEADPHONE
,
50 ALC_HEADSET_TYPE_UNKNOWN
,
51 ALC_HEADSET_TYPE_CTIA
,
52 ALC_HEADSET_TYPE_OMTP
,
56 ALC_KEY_MICMUTE_INDEX
,
59 struct alc_customize_define
{
61 unsigned char port_connectivity
;
62 unsigned char check_sum
;
63 unsigned char customization
;
64 unsigned char external_amp
;
65 unsigned int enable_pcbeep
:1;
66 unsigned int platform_type
:1;
68 unsigned int override
:1;
69 unsigned int fixup
:1; /* Means that this sku is set by driver, not read from hw */
80 struct hda_gen_spec gen
; /* must be at head */
82 /* codec parameterization */
83 struct alc_customize_define cdefine
;
84 unsigned int parse_flags
; /* flag for snd_hda_parse_pin_defcfg() */
87 unsigned int gpio_mask
;
88 unsigned int gpio_dir
;
89 unsigned int gpio_data
;
90 bool gpio_write_delay
; /* add a delay before writing gpio_data */
92 /* mute LED for HP laptops, see vref_mute_led_set() */
93 int mute_led_polarity
;
94 int micmute_led_polarity
;
95 hda_nid_t mute_led_nid
;
96 hda_nid_t cap_mute_led_nid
;
98 unsigned int gpio_mute_led_mask
;
99 unsigned int gpio_mic_led_mask
;
100 struct alc_coef_led mute_led_coef
;
101 struct alc_coef_led mic_led_coef
;
102 struct mutex coef_mutex
;
104 hda_nid_t headset_mic_pin
;
105 hda_nid_t headphone_mic_pin
;
106 int current_headset_mode
;
107 int current_headset_type
;
110 void (*init_hook
)(struct hda_codec
*codec
);
112 void (*power_hook
)(struct hda_codec
*codec
);
114 void (*shutup
)(struct hda_codec
*codec
);
117 int codec_variant
; /* flag for other variants */
118 unsigned int has_alc5505_dsp
:1;
119 unsigned int no_depop_delay
:1;
120 unsigned int done_hp_init
:1;
121 unsigned int no_shutup_pins
:1;
122 unsigned int ultra_low_power
:1;
123 unsigned int has_hs_key
:1;
124 unsigned int no_internal_mic_pin
:1;
128 unsigned int pll_coef_idx
, pll_coef_bit
;
130 struct input_dev
*kb_dev
;
131 u8 alc_mute_keycode_map
[1];
133 /* component binding */
134 struct component_match
*match
;
135 struct hda_component comps
[HDA_MAX_COMPONENTS
];
139 * COEF access helper functions
142 static void coef_mutex_lock(struct hda_codec
*codec
)
144 struct alc_spec
*spec
= codec
->spec
;
146 snd_hda_power_up_pm(codec
);
147 mutex_lock(&spec
->coef_mutex
);
150 static void coef_mutex_unlock(struct hda_codec
*codec
)
152 struct alc_spec
*spec
= codec
->spec
;
154 mutex_unlock(&spec
->coef_mutex
);
155 snd_hda_power_down_pm(codec
);
158 static int __alc_read_coefex_idx(struct hda_codec
*codec
, hda_nid_t nid
,
159 unsigned int coef_idx
)
163 snd_hda_codec_write(codec
, nid
, 0, AC_VERB_SET_COEF_INDEX
, coef_idx
);
164 val
= snd_hda_codec_read(codec
, nid
, 0, AC_VERB_GET_PROC_COEF
, 0);
168 static int alc_read_coefex_idx(struct hda_codec
*codec
, hda_nid_t nid
,
169 unsigned int coef_idx
)
173 coef_mutex_lock(codec
);
174 val
= __alc_read_coefex_idx(codec
, nid
, coef_idx
);
175 coef_mutex_unlock(codec
);
179 #define alc_read_coef_idx(codec, coef_idx) \
180 alc_read_coefex_idx(codec, 0x20, coef_idx)
182 static void __alc_write_coefex_idx(struct hda_codec
*codec
, hda_nid_t nid
,
183 unsigned int coef_idx
, unsigned int coef_val
)
185 snd_hda_codec_write(codec
, nid
, 0, AC_VERB_SET_COEF_INDEX
, coef_idx
);
186 snd_hda_codec_write(codec
, nid
, 0, AC_VERB_SET_PROC_COEF
, coef_val
);
189 static void alc_write_coefex_idx(struct hda_codec
*codec
, hda_nid_t nid
,
190 unsigned int coef_idx
, unsigned int coef_val
)
192 coef_mutex_lock(codec
);
193 __alc_write_coefex_idx(codec
, nid
, coef_idx
, coef_val
);
194 coef_mutex_unlock(codec
);
197 #define alc_write_coef_idx(codec, coef_idx, coef_val) \
198 alc_write_coefex_idx(codec, 0x20, coef_idx, coef_val)
200 static void __alc_update_coefex_idx(struct hda_codec
*codec
, hda_nid_t nid
,
201 unsigned int coef_idx
, unsigned int mask
,
202 unsigned int bits_set
)
204 unsigned int val
= __alc_read_coefex_idx(codec
, nid
, coef_idx
);
207 __alc_write_coefex_idx(codec
, nid
, coef_idx
,
208 (val
& ~mask
) | bits_set
);
211 static void alc_update_coefex_idx(struct hda_codec
*codec
, hda_nid_t nid
,
212 unsigned int coef_idx
, unsigned int mask
,
213 unsigned int bits_set
)
215 coef_mutex_lock(codec
);
216 __alc_update_coefex_idx(codec
, nid
, coef_idx
, mask
, bits_set
);
217 coef_mutex_unlock(codec
);
220 #define alc_update_coef_idx(codec, coef_idx, mask, bits_set) \
221 alc_update_coefex_idx(codec, 0x20, coef_idx, mask, bits_set)
223 /* a special bypass for COEF 0; read the cached value at the second time */
224 static unsigned int alc_get_coef0(struct hda_codec
*codec
)
226 struct alc_spec
*spec
= codec
->spec
;
229 spec
->coef0
= alc_read_coef_idx(codec
, 0);
233 /* coef writes/updates batch */
241 #define UPDATE_COEFEX(_nid, _idx, _mask, _val) \
242 { .nid = (_nid), .idx = (_idx), .mask = (_mask), .val = (_val) }
243 #define WRITE_COEFEX(_nid, _idx, _val) UPDATE_COEFEX(_nid, _idx, -1, _val)
244 #define WRITE_COEF(_idx, _val) WRITE_COEFEX(0x20, _idx, _val)
245 #define UPDATE_COEF(_idx, _mask, _val) UPDATE_COEFEX(0x20, _idx, _mask, _val)
247 static void alc_process_coef_fw(struct hda_codec
*codec
,
248 const struct coef_fw
*fw
)
250 coef_mutex_lock(codec
);
251 for (; fw
->nid
; fw
++) {
252 if (fw
->mask
== (unsigned short)-1)
253 __alc_write_coefex_idx(codec
, fw
->nid
, fw
->idx
, fw
->val
);
255 __alc_update_coefex_idx(codec
, fw
->nid
, fw
->idx
,
258 coef_mutex_unlock(codec
);
262 * GPIO setup tables, used in initialization
265 /* Enable GPIO mask and set output */
266 static void alc_setup_gpio(struct hda_codec
*codec
, unsigned int mask
)
268 struct alc_spec
*spec
= codec
->spec
;
270 spec
->gpio_mask
|= mask
;
271 spec
->gpio_dir
|= mask
;
272 spec
->gpio_data
|= mask
;
275 static void alc_write_gpio_data(struct hda_codec
*codec
)
277 struct alc_spec
*spec
= codec
->spec
;
279 snd_hda_codec_write(codec
, 0x01, 0, AC_VERB_SET_GPIO_DATA
,
283 static void alc_update_gpio_data(struct hda_codec
*codec
, unsigned int mask
,
286 struct alc_spec
*spec
= codec
->spec
;
287 unsigned int oldval
= spec
->gpio_data
;
290 spec
->gpio_data
|= mask
;
292 spec
->gpio_data
&= ~mask
;
293 if (oldval
!= spec
->gpio_data
)
294 alc_write_gpio_data(codec
);
297 static void alc_write_gpio(struct hda_codec
*codec
)
299 struct alc_spec
*spec
= codec
->spec
;
301 if (!spec
->gpio_mask
)
304 snd_hda_codec_write(codec
, codec
->core
.afg
, 0,
305 AC_VERB_SET_GPIO_MASK
, spec
->gpio_mask
);
306 snd_hda_codec_write(codec
, codec
->core
.afg
, 0,
307 AC_VERB_SET_GPIO_DIRECTION
, spec
->gpio_dir
);
308 if (spec
->gpio_write_delay
)
310 alc_write_gpio_data(codec
);
313 static void alc_fixup_gpio(struct hda_codec
*codec
, int action
,
316 if (action
== HDA_FIXUP_ACT_PRE_PROBE
)
317 alc_setup_gpio(codec
, mask
);
320 static void alc_fixup_gpio1(struct hda_codec
*codec
,
321 const struct hda_fixup
*fix
, int action
)
323 alc_fixup_gpio(codec
, action
, 0x01);
326 static void alc_fixup_gpio2(struct hda_codec
*codec
,
327 const struct hda_fixup
*fix
, int action
)
329 alc_fixup_gpio(codec
, action
, 0x02);
332 static void alc_fixup_gpio3(struct hda_codec
*codec
,
333 const struct hda_fixup
*fix
, int action
)
335 alc_fixup_gpio(codec
, action
, 0x03);
338 static void alc_fixup_gpio4(struct hda_codec
*codec
,
339 const struct hda_fixup
*fix
, int action
)
341 alc_fixup_gpio(codec
, action
, 0x04);
344 static void alc_fixup_micmute_led(struct hda_codec
*codec
,
345 const struct hda_fixup
*fix
, int action
)
347 if (action
== HDA_FIXUP_ACT_PRE_PROBE
)
348 snd_hda_gen_add_micmute_led_cdev(codec
, NULL
);
352 * Fix hardware PLL issue
353 * On some codecs, the analog PLL gating control must be off while
354 * the default value is 1.
356 static void alc_fix_pll(struct hda_codec
*codec
)
358 struct alc_spec
*spec
= codec
->spec
;
361 alc_update_coefex_idx(codec
, spec
->pll_nid
, spec
->pll_coef_idx
,
362 1 << spec
->pll_coef_bit
, 0);
365 static void alc_fix_pll_init(struct hda_codec
*codec
, hda_nid_t nid
,
366 unsigned int coef_idx
, unsigned int coef_bit
)
368 struct alc_spec
*spec
= codec
->spec
;
370 spec
->pll_coef_idx
= coef_idx
;
371 spec
->pll_coef_bit
= coef_bit
;
375 /* update the master volume per volume-knob's unsol event */
376 static void alc_update_knob_master(struct hda_codec
*codec
,
377 struct hda_jack_callback
*jack
)
380 struct snd_kcontrol
*kctl
;
381 struct snd_ctl_elem_value
*uctl
;
383 kctl
= snd_hda_find_mixer_ctl(codec
, "Master Playback Volume");
386 uctl
= kzalloc(sizeof(*uctl
), GFP_KERNEL
);
389 val
= snd_hda_codec_read(codec
, jack
->nid
, 0,
390 AC_VERB_GET_VOLUME_KNOB_CONTROL
, 0);
391 val
&= HDA_AMP_VOLMASK
;
392 uctl
->value
.integer
.value
[0] = val
;
393 uctl
->value
.integer
.value
[1] = val
;
394 kctl
->put(kctl
, uctl
);
398 static void alc880_unsol_event(struct hda_codec
*codec
, unsigned int res
)
400 /* For some reason, the res given from ALC880 is broken.
401 Here we adjust it properly. */
402 snd_hda_jack_unsol_event(codec
, res
>> 2);
405 /* Change EAPD to verb control */
406 static void alc_fill_eapd_coef(struct hda_codec
*codec
)
410 coef
= alc_get_coef0(codec
);
412 switch (codec
->core
.vendor_id
) {
414 alc_update_coef_idx(codec
, 0x7, 0, 1<<5);
418 alc_update_coef_idx(codec
, 0x7, 0, 1<<13);
421 if ((coef
& 0x00f0) == 0x0010)
422 alc_update_coef_idx(codec
, 0xd, 0, 1<<14);
423 if ((coef
& 0x00f0) == 0x0020)
424 alc_update_coef_idx(codec
, 0x4, 1<<15, 0);
425 if ((coef
& 0x00f0) == 0x0030)
426 alc_update_coef_idx(codec
, 0x10, 1<<9, 0);
432 alc_update_coef_idx(codec
, 0x4, 1<<15, 0);
437 alc_update_coef_idx(codec
, 0x67, 0xf000, 0x3000);
457 alc_update_coef_idx(codec
, 0x10, 1<<9, 0);
460 alc_update_coef_idx(codec
, 0xe, 0, 1<<0);
463 alc_update_coef_idx(codec
, 0x10, 1<<9, 0);
464 alc_write_coef_idx(codec
, 0x8, 0x4ab7);
467 alc_update_coef_idx(codec
, 0xa, 1<<13, 0);
476 alc_update_coef_idx(codec
, 0x10, 1<<15, 0);
479 if ((coef
& 0x00f0) == 0x0030)
480 alc_update_coef_idx(codec
, 0x4, 1<<10, 0); /* EAPD Ctrl */
489 alc_update_coef_idx(codec
, 0xd, 0, 1<<14); /* EAPD Ctrl */
493 alc_update_coef_idx(codec
, 0x19, 1<<13, 0);
496 alc_update_coef_idx(codec
, 0x7, 3<<13, 0);
499 alc_update_coef_idx(codec
, 0x4, 1<<10, 0);
502 if ((coef
& 0x00f0) == 0x0020 || (coef
& 0x00f0) == 0x0030)
503 alc_update_coef_idx(codec
, 0x7, 1<<5, 0);
507 alc_update_coef_idx(codec
, 0x7, 1<<5, 0);
514 alc_update_coef_idx(codec
, 0x7, 1<<1, 0);
519 /* additional initialization for ALC888 variants */
520 static void alc888_coef_init(struct hda_codec
*codec
)
522 switch (alc_get_coef0(codec
) & 0x00f0) {
527 alc_update_coef_idx(codec
, 7, 0, 0x2030); /* Turn EAPD to High */
532 /* turn on/off EAPD control (only if available) */
533 static void set_eapd(struct hda_codec
*codec
, hda_nid_t nid
, int on
)
535 if (get_wcaps_type(get_wcaps(codec
, nid
)) != AC_WID_PIN
)
537 if (snd_hda_query_pin_caps(codec
, nid
) & AC_PINCAP_EAPD
)
538 snd_hda_codec_write(codec
, nid
, 0, AC_VERB_SET_EAPD_BTLENABLE
,
542 /* turn on/off EAPD controls of the codec */
543 static void alc_auto_setup_eapd(struct hda_codec
*codec
, bool on
)
545 /* We currently only handle front, HP */
546 static const hda_nid_t pins
[] = {
547 0x0f, 0x10, 0x14, 0x15, 0x17, 0
550 for (p
= pins
; *p
; p
++)
551 set_eapd(codec
, *p
, on
);
554 static int find_ext_mic_pin(struct hda_codec
*codec
);
556 static void alc_headset_mic_no_shutup(struct hda_codec
*codec
)
558 const struct hda_pincfg
*pin
;
559 int mic_pin
= find_ext_mic_pin(codec
);
562 /* don't shut up pins when unloading the driver; otherwise it breaks
563 * the default pin setup at the next load of the driver
565 if (codec
->bus
->shutdown
)
568 snd_array_for_each(&codec
->init_pins
, i
, pin
) {
569 /* use read here for syncing after issuing each verb */
570 if (pin
->nid
!= mic_pin
)
571 snd_hda_codec_read(codec
, pin
->nid
, 0,
572 AC_VERB_SET_PIN_WIDGET_CONTROL
, 0);
575 codec
->pins_shutup
= 1;
578 static void alc_shutup_pins(struct hda_codec
*codec
)
580 struct alc_spec
*spec
= codec
->spec
;
582 switch (codec
->core
.vendor_id
) {
590 alc_headset_mic_no_shutup(codec
);
593 if (!spec
->no_shutup_pins
)
594 snd_hda_shutup_pins(codec
);
599 /* generic shutup callback;
600 * just turning off EAPD and a little pause for avoiding pop-noise
602 static void alc_eapd_shutup(struct hda_codec
*codec
)
604 struct alc_spec
*spec
= codec
->spec
;
606 alc_auto_setup_eapd(codec
, false);
607 if (!spec
->no_depop_delay
)
609 alc_shutup_pins(codec
);
612 /* generic EAPD initialization */
613 static void alc_auto_init_amp(struct hda_codec
*codec
, int type
)
615 alc_auto_setup_eapd(codec
, true);
616 alc_write_gpio(codec
);
618 case ALC_INIT_DEFAULT
:
619 switch (codec
->core
.vendor_id
) {
621 alc_update_coefex_idx(codec
, 0x1a, 7, 0, 0x2010);
627 alc_update_coef_idx(codec
, 7, 0, 0x2030);
630 alc888_coef_init(codec
);
637 /* get a primary headphone pin if available */
638 static hda_nid_t
alc_get_hp_pin(struct alc_spec
*spec
)
640 if (spec
->gen
.autocfg
.hp_pins
[0])
641 return spec
->gen
.autocfg
.hp_pins
[0];
642 if (spec
->gen
.autocfg
.line_out_type
== AC_JACK_HP_OUT
)
643 return spec
->gen
.autocfg
.line_out_pins
[0];
648 * Realtek SSID verification
651 /* Could be any non-zero and even value. When used as fixup, tells
652 * the driver to ignore any present sku defines.
654 #define ALC_FIXUP_SKU_IGNORE (2)
656 static void alc_fixup_sku_ignore(struct hda_codec
*codec
,
657 const struct hda_fixup
*fix
, int action
)
659 struct alc_spec
*spec
= codec
->spec
;
660 if (action
== HDA_FIXUP_ACT_PRE_PROBE
) {
661 spec
->cdefine
.fixup
= 1;
662 spec
->cdefine
.sku_cfg
= ALC_FIXUP_SKU_IGNORE
;
666 static void alc_fixup_no_depop_delay(struct hda_codec
*codec
,
667 const struct hda_fixup
*fix
, int action
)
669 struct alc_spec
*spec
= codec
->spec
;
671 if (action
== HDA_FIXUP_ACT_PROBE
) {
672 spec
->no_depop_delay
= 1;
673 codec
->depop_delay
= 0;
677 static int alc_auto_parse_customize_define(struct hda_codec
*codec
)
679 unsigned int ass
, tmp
, i
;
681 struct alc_spec
*spec
= codec
->spec
;
683 spec
->cdefine
.enable_pcbeep
= 1; /* assume always enabled */
685 if (spec
->cdefine
.fixup
) {
686 ass
= spec
->cdefine
.sku_cfg
;
687 if (ass
== ALC_FIXUP_SKU_IGNORE
)
692 if (!codec
->bus
->pci
)
694 ass
= codec
->core
.subsystem_id
& 0xffff;
695 if (ass
!= codec
->bus
->pci
->subsystem_device
&& (ass
& 1))
699 if (codec
->core
.vendor_id
== 0x10ec0260)
701 ass
= snd_hda_codec_get_pincfg(codec
, nid
);
704 codec_info(codec
, "%s: SKU not ready 0x%08x\n",
705 codec
->core
.chip_name
, ass
);
711 for (i
= 1; i
< 16; i
++) {
715 if (((ass
>> 16) & 0xf) != tmp
)
718 spec
->cdefine
.port_connectivity
= ass
>> 30;
719 spec
->cdefine
.enable_pcbeep
= (ass
& 0x100000) >> 20;
720 spec
->cdefine
.check_sum
= (ass
>> 16) & 0xf;
721 spec
->cdefine
.customization
= ass
>> 8;
723 spec
->cdefine
.sku_cfg
= ass
;
724 spec
->cdefine
.external_amp
= (ass
& 0x38) >> 3;
725 spec
->cdefine
.platform_type
= (ass
& 0x4) >> 2;
726 spec
->cdefine
.swap
= (ass
& 0x2) >> 1;
727 spec
->cdefine
.override
= ass
& 0x1;
729 codec_dbg(codec
, "SKU: Nid=0x%x sku_cfg=0x%08x\n",
730 nid
, spec
->cdefine
.sku_cfg
);
731 codec_dbg(codec
, "SKU: port_connectivity=0x%x\n",
732 spec
->cdefine
.port_connectivity
);
733 codec_dbg(codec
, "SKU: enable_pcbeep=0x%x\n", spec
->cdefine
.enable_pcbeep
);
734 codec_dbg(codec
, "SKU: check_sum=0x%08x\n", spec
->cdefine
.check_sum
);
735 codec_dbg(codec
, "SKU: customization=0x%08x\n", spec
->cdefine
.customization
);
736 codec_dbg(codec
, "SKU: external_amp=0x%x\n", spec
->cdefine
.external_amp
);
737 codec_dbg(codec
, "SKU: platform_type=0x%x\n", spec
->cdefine
.platform_type
);
738 codec_dbg(codec
, "SKU: swap=0x%x\n", spec
->cdefine
.swap
);
739 codec_dbg(codec
, "SKU: override=0x%x\n", spec
->cdefine
.override
);
744 /* return the position of NID in the list, or -1 if not found */
745 static int find_idx_in_nid_list(hda_nid_t nid
, const hda_nid_t
*list
, int nums
)
748 for (i
= 0; i
< nums
; i
++)
753 /* return true if the given NID is found in the list */
754 static bool found_in_nid_list(hda_nid_t nid
, const hda_nid_t
*list
, int nums
)
756 return find_idx_in_nid_list(nid
, list
, nums
) >= 0;
759 /* check subsystem ID and set up device-specific initialization;
760 * return 1 if initialized, 0 if invalid SSID
762 /* 32-bit subsystem ID for BIOS loading in HD Audio codec.
763 * 31 ~ 16 : Manufacture ID
765 * 7 ~ 0 : Assembly ID
766 * port-A --> pin 39/41, port-E --> pin 14/15, port-D --> pin 35/36
768 static int alc_subsystem_id(struct hda_codec
*codec
, const hda_nid_t
*ports
)
770 unsigned int ass
, tmp
, i
;
772 struct alc_spec
*spec
= codec
->spec
;
774 if (spec
->cdefine
.fixup
) {
775 ass
= spec
->cdefine
.sku_cfg
;
776 if (ass
== ALC_FIXUP_SKU_IGNORE
)
781 ass
= codec
->core
.subsystem_id
& 0xffff;
782 if (codec
->bus
->pci
&&
783 ass
!= codec
->bus
->pci
->subsystem_device
&& (ass
& 1))
786 /* invalid SSID, check the special NID pin defcfg instead */
788 * 31~30 : port connectivity
791 * 19~16 : Check sum (15:1)
796 if (codec
->core
.vendor_id
== 0x10ec0260)
798 ass
= snd_hda_codec_get_pincfg(codec
, nid
);
800 "realtek: No valid SSID, checking pincfg 0x%08x for NID 0x%x\n",
804 if ((ass
>> 30) != 1) /* no physical connection */
809 for (i
= 1; i
< 16; i
++) {
813 if (((ass
>> 16) & 0xf) != tmp
)
816 codec_dbg(codec
, "realtek: Enabling init ASM_ID=0x%04x CODEC_ID=%08x\n",
817 ass
& 0xffff, codec
->core
.vendor_id
);
821 * 2 : 0 --> Desktop, 1 --> Laptop
822 * 3~5 : External Amplifier control
825 tmp
= (ass
& 0x38) >> 3; /* external Amp control */
826 if (spec
->init_amp
== ALC_INIT_UNDEFINED
) {
829 alc_setup_gpio(codec
, 0x01);
832 alc_setup_gpio(codec
, 0x02);
835 alc_setup_gpio(codec
, 0x03);
839 spec
->init_amp
= ALC_INIT_DEFAULT
;
844 /* is laptop or Desktop and enable the function "Mute internal speaker
845 * when the external headphone out jack is plugged"
850 * 10~8 : Jack location
851 * 12~11: Headphone out -> 00: PortA, 01: PortE, 02: PortD, 03: Resvered
853 * 15 : 1 --> enable the function "Mute internal speaker
854 * when the external headphone out jack is plugged"
856 if (!alc_get_hp_pin(spec
)) {
858 tmp
= (ass
>> 11) & 0x3; /* HP to chassis */
860 if (found_in_nid_list(nid
, spec
->gen
.autocfg
.line_out_pins
,
861 spec
->gen
.autocfg
.line_outs
))
863 spec
->gen
.autocfg
.hp_pins
[0] = nid
;
868 /* Check the validity of ALC subsystem-id
869 * ports contains an array of 4 pin NIDs for port-A, E, D and I */
870 static void alc_ssid_check(struct hda_codec
*codec
, const hda_nid_t
*ports
)
872 if (!alc_subsystem_id(codec
, ports
)) {
873 struct alc_spec
*spec
= codec
->spec
;
874 if (spec
->init_amp
== ALC_INIT_UNDEFINED
) {
876 "realtek: Enable default setup for auto mode as fallback\n");
877 spec
->init_amp
= ALC_INIT_DEFAULT
;
885 static void alc_fixup_inv_dmic(struct hda_codec
*codec
,
886 const struct hda_fixup
*fix
, int action
)
888 struct alc_spec
*spec
= codec
->spec
;
890 spec
->gen
.inv_dmic_split
= 1;
894 static int alc_build_controls(struct hda_codec
*codec
)
898 err
= snd_hda_gen_build_controls(codec
);
902 snd_hda_apply_fixup(codec
, HDA_FIXUP_ACT_BUILD
);
911 static void alc_pre_init(struct hda_codec
*codec
)
913 alc_fill_eapd_coef(codec
);
916 #define is_s3_resume(codec) \
917 ((codec)->core.dev.power.power_state.event == PM_EVENT_RESUME)
918 #define is_s4_resume(codec) \
919 ((codec)->core.dev.power.power_state.event == PM_EVENT_RESTORE)
921 static int alc_init(struct hda_codec
*codec
)
923 struct alc_spec
*spec
= codec
->spec
;
925 /* hibernation resume needs the full chip initialization */
926 if (is_s4_resume(codec
))
930 spec
->init_hook(codec
);
932 spec
->gen
.skip_verbs
= 1; /* applied in below */
933 snd_hda_gen_init(codec
);
935 alc_auto_init_amp(codec
, spec
->init_amp
);
936 snd_hda_apply_verbs(codec
); /* apply verbs here after own init */
938 snd_hda_apply_fixup(codec
, HDA_FIXUP_ACT_INIT
);
943 #define alc_free snd_hda_gen_free
946 static inline void alc_shutup(struct hda_codec
*codec
)
948 struct alc_spec
*spec
= codec
->spec
;
950 if (!snd_hda_get_bool_hint(codec
, "shutup"))
951 return; /* disabled explicitly by hints */
953 if (spec
&& spec
->shutup
)
956 alc_shutup_pins(codec
);
959 static void alc_power_eapd(struct hda_codec
*codec
)
961 alc_auto_setup_eapd(codec
, false);
964 static int alc_suspend(struct hda_codec
*codec
)
966 struct alc_spec
*spec
= codec
->spec
;
968 if (spec
&& spec
->power_hook
)
969 spec
->power_hook(codec
);
973 static int alc_resume(struct hda_codec
*codec
)
975 struct alc_spec
*spec
= codec
->spec
;
977 if (!spec
->no_depop_delay
)
978 msleep(150); /* to avoid pop noise */
979 codec
->patch_ops
.init(codec
);
980 snd_hda_regmap_sync(codec
);
981 hda_call_check_power_status(codec
, 0x01);
988 static const struct hda_codec_ops alc_patch_ops
= {
989 .build_controls
= alc_build_controls
,
990 .build_pcms
= snd_hda_gen_build_pcms
,
993 .unsol_event
= snd_hda_jack_unsol_event
,
995 .resume
= alc_resume
,
996 .suspend
= alc_suspend
,
997 .check_power_status
= snd_hda_gen_check_power_status
,
1002 #define alc_codec_rename(codec, name) snd_hda_codec_set_name(codec, name)
1005 * Rename codecs appropriately from COEF value or subvendor id
1007 struct alc_codec_rename_table
{
1008 unsigned int vendor_id
;
1009 unsigned short coef_mask
;
1010 unsigned short coef_bits
;
1014 struct alc_codec_rename_pci_table
{
1015 unsigned int codec_vendor_id
;
1016 unsigned short pci_subvendor
;
1017 unsigned short pci_subdevice
;
1021 static const struct alc_codec_rename_table rename_tbl
[] = {
1022 { 0x10ec0221, 0xf00f, 0x1003, "ALC231" },
1023 { 0x10ec0269, 0xfff0, 0x3010, "ALC277" },
1024 { 0x10ec0269, 0xf0f0, 0x2010, "ALC259" },
1025 { 0x10ec0269, 0xf0f0, 0x3010, "ALC258" },
1026 { 0x10ec0269, 0x00f0, 0x0010, "ALC269VB" },
1027 { 0x10ec0269, 0xffff, 0xa023, "ALC259" },
1028 { 0x10ec0269, 0xffff, 0x6023, "ALC281X" },
1029 { 0x10ec0269, 0x00f0, 0x0020, "ALC269VC" },
1030 { 0x10ec0269, 0x00f0, 0x0030, "ALC269VD" },
1031 { 0x10ec0662, 0xffff, 0x4020, "ALC656" },
1032 { 0x10ec0887, 0x00f0, 0x0030, "ALC887-VD" },
1033 { 0x10ec0888, 0x00f0, 0x0030, "ALC888-VD" },
1034 { 0x10ec0888, 0xf0f0, 0x3020, "ALC886" },
1035 { 0x10ec0899, 0x2000, 0x2000, "ALC899" },
1036 { 0x10ec0892, 0xffff, 0x8020, "ALC661" },
1037 { 0x10ec0892, 0xffff, 0x8011, "ALC661" },
1038 { 0x10ec0892, 0xffff, 0x4011, "ALC656" },
1039 { } /* terminator */
1042 static const struct alc_codec_rename_pci_table rename_pci_tbl
[] = {
1043 { 0x10ec0280, 0x1028, 0, "ALC3220" },
1044 { 0x10ec0282, 0x1028, 0, "ALC3221" },
1045 { 0x10ec0283, 0x1028, 0, "ALC3223" },
1046 { 0x10ec0288, 0x1028, 0, "ALC3263" },
1047 { 0x10ec0292, 0x1028, 0, "ALC3226" },
1048 { 0x10ec0293, 0x1028, 0, "ALC3235" },
1049 { 0x10ec0255, 0x1028, 0, "ALC3234" },
1050 { 0x10ec0668, 0x1028, 0, "ALC3661" },
1051 { 0x10ec0275, 0x1028, 0, "ALC3260" },
1052 { 0x10ec0899, 0x1028, 0, "ALC3861" },
1053 { 0x10ec0298, 0x1028, 0, "ALC3266" },
1054 { 0x10ec0236, 0x1028, 0, "ALC3204" },
1055 { 0x10ec0256, 0x1028, 0, "ALC3246" },
1056 { 0x10ec0225, 0x1028, 0, "ALC3253" },
1057 { 0x10ec0295, 0x1028, 0, "ALC3254" },
1058 { 0x10ec0299, 0x1028, 0, "ALC3271" },
1059 { 0x10ec0670, 0x1025, 0, "ALC669X" },
1060 { 0x10ec0676, 0x1025, 0, "ALC679X" },
1061 { 0x10ec0282, 0x1043, 0, "ALC3229" },
1062 { 0x10ec0233, 0x1043, 0, "ALC3236" },
1063 { 0x10ec0280, 0x103c, 0, "ALC3228" },
1064 { 0x10ec0282, 0x103c, 0, "ALC3227" },
1065 { 0x10ec0286, 0x103c, 0, "ALC3242" },
1066 { 0x10ec0290, 0x103c, 0, "ALC3241" },
1067 { 0x10ec0668, 0x103c, 0, "ALC3662" },
1068 { 0x10ec0283, 0x17aa, 0, "ALC3239" },
1069 { 0x10ec0292, 0x17aa, 0, "ALC3232" },
1070 { } /* terminator */
1073 static int alc_codec_rename_from_preset(struct hda_codec
*codec
)
1075 const struct alc_codec_rename_table
*p
;
1076 const struct alc_codec_rename_pci_table
*q
;
1078 for (p
= rename_tbl
; p
->vendor_id
; p
++) {
1079 if (p
->vendor_id
!= codec
->core
.vendor_id
)
1081 if ((alc_get_coef0(codec
) & p
->coef_mask
) == p
->coef_bits
)
1082 return alc_codec_rename(codec
, p
->name
);
1085 if (!codec
->bus
->pci
)
1087 for (q
= rename_pci_tbl
; q
->codec_vendor_id
; q
++) {
1088 if (q
->codec_vendor_id
!= codec
->core
.vendor_id
)
1090 if (q
->pci_subvendor
!= codec
->bus
->pci
->subsystem_vendor
)
1092 if (!q
->pci_subdevice
||
1093 q
->pci_subdevice
== codec
->bus
->pci
->subsystem_device
)
1094 return alc_codec_rename(codec
, q
->name
);
1102 * Digital-beep handlers
1104 #ifdef CONFIG_SND_HDA_INPUT_BEEP
1106 /* additional beep mixers; private_value will be overwritten */
1107 static const struct snd_kcontrol_new alc_beep_mixer
[] = {
1108 HDA_CODEC_VOLUME("Beep Playback Volume", 0, 0, HDA_INPUT
),
1109 HDA_CODEC_MUTE_BEEP("Beep Playback Switch", 0, 0, HDA_INPUT
),
1112 /* set up and create beep controls */
1113 static int set_beep_amp(struct alc_spec
*spec
, hda_nid_t nid
,
1116 struct snd_kcontrol_new
*knew
;
1117 unsigned int beep_amp
= HDA_COMPOSE_AMP_VAL(nid
, 3, idx
, dir
);
1120 for (i
= 0; i
< ARRAY_SIZE(alc_beep_mixer
); i
++) {
1121 knew
= snd_hda_gen_add_kctl(&spec
->gen
, NULL
,
1122 &alc_beep_mixer
[i
]);
1125 knew
->private_value
= beep_amp
;
1130 static const struct snd_pci_quirk beep_allow_list
[] = {
1131 SND_PCI_QUIRK(0x1043, 0x103c, "ASUS", 1),
1132 SND_PCI_QUIRK(0x1043, 0x115d, "ASUS", 1),
1133 SND_PCI_QUIRK(0x1043, 0x829f, "ASUS", 1),
1134 SND_PCI_QUIRK(0x1043, 0x8376, "EeePC", 1),
1135 SND_PCI_QUIRK(0x1043, 0x83ce, "EeePC", 1),
1136 SND_PCI_QUIRK(0x1043, 0x831a, "EeePC", 1),
1137 SND_PCI_QUIRK(0x1043, 0x834a, "EeePC", 1),
1138 SND_PCI_QUIRK(0x1458, 0xa002, "GA-MA790X", 1),
1139 SND_PCI_QUIRK(0x8086, 0xd613, "Intel", 1),
1140 /* denylist -- no beep available */
1141 SND_PCI_QUIRK(0x17aa, 0x309e, "Lenovo ThinkCentre M73", 0),
1142 SND_PCI_QUIRK(0x17aa, 0x30a3, "Lenovo ThinkCentre M93", 0),
1146 static inline int has_cdefine_beep(struct hda_codec
*codec
)
1148 struct alc_spec
*spec
= codec
->spec
;
1149 const struct snd_pci_quirk
*q
;
1150 q
= snd_pci_quirk_lookup(codec
->bus
->pci
, beep_allow_list
);
1153 return spec
->cdefine
.enable_pcbeep
;
1156 #define set_beep_amp(spec, nid, idx, dir) 0
1157 #define has_cdefine_beep(codec) 0
1160 /* parse the BIOS configuration and set up the alc_spec */
1161 /* return 1 if successful, 0 if the proper config is not found,
1162 * or a negative error code
1164 static int alc_parse_auto_config(struct hda_codec
*codec
,
1165 const hda_nid_t
*ignore_nids
,
1166 const hda_nid_t
*ssid_nids
)
1168 struct alc_spec
*spec
= codec
->spec
;
1169 struct auto_pin_cfg
*cfg
= &spec
->gen
.autocfg
;
1172 err
= snd_hda_parse_pin_defcfg(codec
, cfg
, ignore_nids
,
1178 alc_ssid_check(codec
, ssid_nids
);
1180 err
= snd_hda_gen_parse_auto_config(codec
, cfg
);
1187 /* common preparation job for alc_spec */
1188 static int alc_alloc_spec(struct hda_codec
*codec
, hda_nid_t mixer_nid
)
1190 struct alc_spec
*spec
= kzalloc(sizeof(*spec
), GFP_KERNEL
);
1196 snd_hda_gen_spec_init(&spec
->gen
);
1197 spec
->gen
.mixer_nid
= mixer_nid
;
1198 spec
->gen
.own_eapd_ctl
= 1;
1199 codec
->single_adc_amp
= 1;
1200 /* FIXME: do we need this for all Realtek codec models? */
1201 codec
->spdif_status_reset
= 1;
1202 codec
->forced_resume
= 1;
1203 codec
->patch_ops
= alc_patch_ops
;
1204 mutex_init(&spec
->coef_mutex
);
1206 err
= alc_codec_rename_from_preset(codec
);
1214 static int alc880_parse_auto_config(struct hda_codec
*codec
)
1216 static const hda_nid_t alc880_ignore
[] = { 0x1d, 0 };
1217 static const hda_nid_t alc880_ssids
[] = { 0x15, 0x1b, 0x14, 0 };
1218 return alc_parse_auto_config(codec
, alc880_ignore
, alc880_ssids
);
1227 ALC880_FIXUP_MEDION_RIM
,
1229 ALC880_FIXUP_LG_LW25
,
1231 ALC880_FIXUP_EAPD_COEF
,
1232 ALC880_FIXUP_TCL_S700
,
1233 ALC880_FIXUP_VOL_KNOB
,
1234 ALC880_FIXUP_FUJITSU
,
1236 ALC880_FIXUP_UNIWILL
,
1237 ALC880_FIXUP_UNIWILL_DIG
,
1239 ALC880_FIXUP_ASUS_W5A
,
1240 ALC880_FIXUP_3ST_BASE
,
1242 ALC880_FIXUP_3ST_DIG
,
1243 ALC880_FIXUP_5ST_BASE
,
1245 ALC880_FIXUP_5ST_DIG
,
1246 ALC880_FIXUP_6ST_BASE
,
1248 ALC880_FIXUP_6ST_DIG
,
1249 ALC880_FIXUP_6ST_AUTOMUTE
,
1252 /* enable the volume-knob widget support on NID 0x21 */
1253 static void alc880_fixup_vol_knob(struct hda_codec
*codec
,
1254 const struct hda_fixup
*fix
, int action
)
1256 if (action
== HDA_FIXUP_ACT_PROBE
)
1257 snd_hda_jack_detect_enable_callback(codec
, 0x21,
1258 alc_update_knob_master
);
1261 static const struct hda_fixup alc880_fixups
[] = {
1262 [ALC880_FIXUP_GPIO1
] = {
1263 .type
= HDA_FIXUP_FUNC
,
1264 .v
.func
= alc_fixup_gpio1
,
1266 [ALC880_FIXUP_GPIO2
] = {
1267 .type
= HDA_FIXUP_FUNC
,
1268 .v
.func
= alc_fixup_gpio2
,
1270 [ALC880_FIXUP_MEDION_RIM
] = {
1271 .type
= HDA_FIXUP_VERBS
,
1272 .v
.verbs
= (const struct hda_verb
[]) {
1273 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x07 },
1274 { 0x20, AC_VERB_SET_PROC_COEF
, 0x3060 },
1278 .chain_id
= ALC880_FIXUP_GPIO2
,
1280 [ALC880_FIXUP_LG
] = {
1281 .type
= HDA_FIXUP_PINS
,
1282 .v
.pins
= (const struct hda_pintbl
[]) {
1283 /* disable bogus unused pins */
1284 { 0x16, 0x411111f0 },
1285 { 0x18, 0x411111f0 },
1286 { 0x1a, 0x411111f0 },
1290 [ALC880_FIXUP_LG_LW25
] = {
1291 .type
= HDA_FIXUP_PINS
,
1292 .v
.pins
= (const struct hda_pintbl
[]) {
1293 { 0x1a, 0x0181344f }, /* line-in */
1294 { 0x1b, 0x0321403f }, /* headphone */
1298 [ALC880_FIXUP_W810
] = {
1299 .type
= HDA_FIXUP_PINS
,
1300 .v
.pins
= (const struct hda_pintbl
[]) {
1301 /* disable bogus unused pins */
1302 { 0x17, 0x411111f0 },
1306 .chain_id
= ALC880_FIXUP_GPIO2
,
1308 [ALC880_FIXUP_EAPD_COEF
] = {
1309 .type
= HDA_FIXUP_VERBS
,
1310 .v
.verbs
= (const struct hda_verb
[]) {
1311 /* change to EAPD mode */
1312 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x07 },
1313 { 0x20, AC_VERB_SET_PROC_COEF
, 0x3060 },
1317 [ALC880_FIXUP_TCL_S700
] = {
1318 .type
= HDA_FIXUP_VERBS
,
1319 .v
.verbs
= (const struct hda_verb
[]) {
1320 /* change to EAPD mode */
1321 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x07 },
1322 { 0x20, AC_VERB_SET_PROC_COEF
, 0x3070 },
1326 .chain_id
= ALC880_FIXUP_GPIO2
,
1328 [ALC880_FIXUP_VOL_KNOB
] = {
1329 .type
= HDA_FIXUP_FUNC
,
1330 .v
.func
= alc880_fixup_vol_knob
,
1332 [ALC880_FIXUP_FUJITSU
] = {
1333 /* override all pins as BIOS on old Amilo is broken */
1334 .type
= HDA_FIXUP_PINS
,
1335 .v
.pins
= (const struct hda_pintbl
[]) {
1336 { 0x14, 0x0121401f }, /* HP */
1337 { 0x15, 0x99030120 }, /* speaker */
1338 { 0x16, 0x99030130 }, /* bass speaker */
1339 { 0x17, 0x411111f0 }, /* N/A */
1340 { 0x18, 0x411111f0 }, /* N/A */
1341 { 0x19, 0x01a19950 }, /* mic-in */
1342 { 0x1a, 0x411111f0 }, /* N/A */
1343 { 0x1b, 0x411111f0 }, /* N/A */
1344 { 0x1c, 0x411111f0 }, /* N/A */
1345 { 0x1d, 0x411111f0 }, /* N/A */
1346 { 0x1e, 0x01454140 }, /* SPDIF out */
1350 .chain_id
= ALC880_FIXUP_VOL_KNOB
,
1352 [ALC880_FIXUP_F1734
] = {
1353 /* almost compatible with FUJITSU, but no bass and SPDIF */
1354 .type
= HDA_FIXUP_PINS
,
1355 .v
.pins
= (const struct hda_pintbl
[]) {
1356 { 0x14, 0x0121401f }, /* HP */
1357 { 0x15, 0x99030120 }, /* speaker */
1358 { 0x16, 0x411111f0 }, /* N/A */
1359 { 0x17, 0x411111f0 }, /* N/A */
1360 { 0x18, 0x411111f0 }, /* N/A */
1361 { 0x19, 0x01a19950 }, /* mic-in */
1362 { 0x1a, 0x411111f0 }, /* N/A */
1363 { 0x1b, 0x411111f0 }, /* N/A */
1364 { 0x1c, 0x411111f0 }, /* N/A */
1365 { 0x1d, 0x411111f0 }, /* N/A */
1366 { 0x1e, 0x411111f0 }, /* N/A */
1370 .chain_id
= ALC880_FIXUP_VOL_KNOB
,
1372 [ALC880_FIXUP_UNIWILL
] = {
1373 /* need to fix HP and speaker pins to be parsed correctly */
1374 .type
= HDA_FIXUP_PINS
,
1375 .v
.pins
= (const struct hda_pintbl
[]) {
1376 { 0x14, 0x0121411f }, /* HP */
1377 { 0x15, 0x99030120 }, /* speaker */
1378 { 0x16, 0x99030130 }, /* bass speaker */
1382 [ALC880_FIXUP_UNIWILL_DIG
] = {
1383 .type
= HDA_FIXUP_PINS
,
1384 .v
.pins
= (const struct hda_pintbl
[]) {
1385 /* disable bogus unused pins */
1386 { 0x17, 0x411111f0 },
1387 { 0x19, 0x411111f0 },
1388 { 0x1b, 0x411111f0 },
1389 { 0x1f, 0x411111f0 },
1393 [ALC880_FIXUP_Z71V
] = {
1394 .type
= HDA_FIXUP_PINS
,
1395 .v
.pins
= (const struct hda_pintbl
[]) {
1396 /* set up the whole pins as BIOS is utterly broken */
1397 { 0x14, 0x99030120 }, /* speaker */
1398 { 0x15, 0x0121411f }, /* HP */
1399 { 0x16, 0x411111f0 }, /* N/A */
1400 { 0x17, 0x411111f0 }, /* N/A */
1401 { 0x18, 0x01a19950 }, /* mic-in */
1402 { 0x19, 0x411111f0 }, /* N/A */
1403 { 0x1a, 0x01813031 }, /* line-in */
1404 { 0x1b, 0x411111f0 }, /* N/A */
1405 { 0x1c, 0x411111f0 }, /* N/A */
1406 { 0x1d, 0x411111f0 }, /* N/A */
1407 { 0x1e, 0x0144111e }, /* SPDIF */
1411 [ALC880_FIXUP_ASUS_W5A
] = {
1412 .type
= HDA_FIXUP_PINS
,
1413 .v
.pins
= (const struct hda_pintbl
[]) {
1414 /* set up the whole pins as BIOS is utterly broken */
1415 { 0x14, 0x0121411f }, /* HP */
1416 { 0x15, 0x411111f0 }, /* N/A */
1417 { 0x16, 0x411111f0 }, /* N/A */
1418 { 0x17, 0x411111f0 }, /* N/A */
1419 { 0x18, 0x90a60160 }, /* mic */
1420 { 0x19, 0x411111f0 }, /* N/A */
1421 { 0x1a, 0x411111f0 }, /* N/A */
1422 { 0x1b, 0x411111f0 }, /* N/A */
1423 { 0x1c, 0x411111f0 }, /* N/A */
1424 { 0x1d, 0x411111f0 }, /* N/A */
1425 { 0x1e, 0xb743111e }, /* SPDIF out */
1429 .chain_id
= ALC880_FIXUP_GPIO1
,
1431 [ALC880_FIXUP_3ST_BASE
] = {
1432 .type
= HDA_FIXUP_PINS
,
1433 .v
.pins
= (const struct hda_pintbl
[]) {
1434 { 0x14, 0x01014010 }, /* line-out */
1435 { 0x15, 0x411111f0 }, /* N/A */
1436 { 0x16, 0x411111f0 }, /* N/A */
1437 { 0x17, 0x411111f0 }, /* N/A */
1438 { 0x18, 0x01a19c30 }, /* mic-in */
1439 { 0x19, 0x0121411f }, /* HP */
1440 { 0x1a, 0x01813031 }, /* line-in */
1441 { 0x1b, 0x02a19c40 }, /* front-mic */
1442 { 0x1c, 0x411111f0 }, /* N/A */
1443 { 0x1d, 0x411111f0 }, /* N/A */
1444 /* 0x1e is filled in below */
1445 { 0x1f, 0x411111f0 }, /* N/A */
1449 [ALC880_FIXUP_3ST
] = {
1450 .type
= HDA_FIXUP_PINS
,
1451 .v
.pins
= (const struct hda_pintbl
[]) {
1452 { 0x1e, 0x411111f0 }, /* N/A */
1456 .chain_id
= ALC880_FIXUP_3ST_BASE
,
1458 [ALC880_FIXUP_3ST_DIG
] = {
1459 .type
= HDA_FIXUP_PINS
,
1460 .v
.pins
= (const struct hda_pintbl
[]) {
1461 { 0x1e, 0x0144111e }, /* SPDIF */
1465 .chain_id
= ALC880_FIXUP_3ST_BASE
,
1467 [ALC880_FIXUP_5ST_BASE
] = {
1468 .type
= HDA_FIXUP_PINS
,
1469 .v
.pins
= (const struct hda_pintbl
[]) {
1470 { 0x14, 0x01014010 }, /* front */
1471 { 0x15, 0x411111f0 }, /* N/A */
1472 { 0x16, 0x01011411 }, /* CLFE */
1473 { 0x17, 0x01016412 }, /* surr */
1474 { 0x18, 0x01a19c30 }, /* mic-in */
1475 { 0x19, 0x0121411f }, /* HP */
1476 { 0x1a, 0x01813031 }, /* line-in */
1477 { 0x1b, 0x02a19c40 }, /* front-mic */
1478 { 0x1c, 0x411111f0 }, /* N/A */
1479 { 0x1d, 0x411111f0 }, /* N/A */
1480 /* 0x1e is filled in below */
1481 { 0x1f, 0x411111f0 }, /* N/A */
1485 [ALC880_FIXUP_5ST
] = {
1486 .type
= HDA_FIXUP_PINS
,
1487 .v
.pins
= (const struct hda_pintbl
[]) {
1488 { 0x1e, 0x411111f0 }, /* N/A */
1492 .chain_id
= ALC880_FIXUP_5ST_BASE
,
1494 [ALC880_FIXUP_5ST_DIG
] = {
1495 .type
= HDA_FIXUP_PINS
,
1496 .v
.pins
= (const struct hda_pintbl
[]) {
1497 { 0x1e, 0x0144111e }, /* SPDIF */
1501 .chain_id
= ALC880_FIXUP_5ST_BASE
,
1503 [ALC880_FIXUP_6ST_BASE
] = {
1504 .type
= HDA_FIXUP_PINS
,
1505 .v
.pins
= (const struct hda_pintbl
[]) {
1506 { 0x14, 0x01014010 }, /* front */
1507 { 0x15, 0x01016412 }, /* surr */
1508 { 0x16, 0x01011411 }, /* CLFE */
1509 { 0x17, 0x01012414 }, /* side */
1510 { 0x18, 0x01a19c30 }, /* mic-in */
1511 { 0x19, 0x02a19c40 }, /* front-mic */
1512 { 0x1a, 0x01813031 }, /* line-in */
1513 { 0x1b, 0x0121411f }, /* HP */
1514 { 0x1c, 0x411111f0 }, /* N/A */
1515 { 0x1d, 0x411111f0 }, /* N/A */
1516 /* 0x1e is filled in below */
1517 { 0x1f, 0x411111f0 }, /* N/A */
1521 [ALC880_FIXUP_6ST
] = {
1522 .type
= HDA_FIXUP_PINS
,
1523 .v
.pins
= (const struct hda_pintbl
[]) {
1524 { 0x1e, 0x411111f0 }, /* N/A */
1528 .chain_id
= ALC880_FIXUP_6ST_BASE
,
1530 [ALC880_FIXUP_6ST_DIG
] = {
1531 .type
= HDA_FIXUP_PINS
,
1532 .v
.pins
= (const struct hda_pintbl
[]) {
1533 { 0x1e, 0x0144111e }, /* SPDIF */
1537 .chain_id
= ALC880_FIXUP_6ST_BASE
,
1539 [ALC880_FIXUP_6ST_AUTOMUTE
] = {
1540 .type
= HDA_FIXUP_PINS
,
1541 .v
.pins
= (const struct hda_pintbl
[]) {
1542 { 0x1b, 0x0121401f }, /* HP with jack detect */
1545 .chained_before
= true,
1546 .chain_id
= ALC880_FIXUP_6ST_BASE
,
1550 static const struct snd_pci_quirk alc880_fixup_tbl
[] = {
1551 SND_PCI_QUIRK(0x1019, 0x0f69, "Coeus G610P", ALC880_FIXUP_W810
),
1552 SND_PCI_QUIRK(0x1043, 0x10c3, "ASUS W5A", ALC880_FIXUP_ASUS_W5A
),
1553 SND_PCI_QUIRK(0x1043, 0x1964, "ASUS Z71V", ALC880_FIXUP_Z71V
),
1554 SND_PCI_QUIRK_VENDOR(0x1043, "ASUS", ALC880_FIXUP_GPIO1
),
1555 SND_PCI_QUIRK(0x147b, 0x1045, "ABit AA8XE", ALC880_FIXUP_6ST_AUTOMUTE
),
1556 SND_PCI_QUIRK(0x1558, 0x5401, "Clevo GPIO2", ALC880_FIXUP_GPIO2
),
1557 SND_PCI_QUIRK_VENDOR(0x1558, "Clevo", ALC880_FIXUP_EAPD_COEF
),
1558 SND_PCI_QUIRK(0x1584, 0x9050, "Uniwill", ALC880_FIXUP_UNIWILL_DIG
),
1559 SND_PCI_QUIRK(0x1584, 0x9054, "Uniwill", ALC880_FIXUP_F1734
),
1560 SND_PCI_QUIRK(0x1584, 0x9070, "Uniwill", ALC880_FIXUP_UNIWILL
),
1561 SND_PCI_QUIRK(0x1584, 0x9077, "Uniwill P53", ALC880_FIXUP_VOL_KNOB
),
1562 SND_PCI_QUIRK(0x161f, 0x203d, "W810", ALC880_FIXUP_W810
),
1563 SND_PCI_QUIRK(0x161f, 0x205d, "Medion Rim 2150", ALC880_FIXUP_MEDION_RIM
),
1564 SND_PCI_QUIRK(0x1631, 0xe011, "PB 13201056", ALC880_FIXUP_6ST_AUTOMUTE
),
1565 SND_PCI_QUIRK(0x1734, 0x107c, "FSC Amilo M1437", ALC880_FIXUP_FUJITSU
),
1566 SND_PCI_QUIRK(0x1734, 0x1094, "FSC Amilo M1451G", ALC880_FIXUP_FUJITSU
),
1567 SND_PCI_QUIRK(0x1734, 0x10ac, "FSC AMILO Xi 1526", ALC880_FIXUP_F1734
),
1568 SND_PCI_QUIRK(0x1734, 0x10b0, "FSC Amilo Pi1556", ALC880_FIXUP_FUJITSU
),
1569 SND_PCI_QUIRK(0x1854, 0x003b, "LG", ALC880_FIXUP_LG
),
1570 SND_PCI_QUIRK(0x1854, 0x005f, "LG P1 Express", ALC880_FIXUP_LG
),
1571 SND_PCI_QUIRK(0x1854, 0x0068, "LG w1", ALC880_FIXUP_LG
),
1572 SND_PCI_QUIRK(0x1854, 0x0077, "LG LW25", ALC880_FIXUP_LG_LW25
),
1573 SND_PCI_QUIRK(0x19db, 0x4188, "TCL S700", ALC880_FIXUP_TCL_S700
),
1575 /* Below is the copied entries from alc880_quirks.c.
1576 * It's not quite sure whether BIOS sets the correct pin-config table
1577 * on these machines, thus they are kept to be compatible with
1578 * the old static quirks. Once when it's confirmed to work without
1579 * these overrides, it'd be better to remove.
1581 SND_PCI_QUIRK(0x1019, 0xa880, "ECS", ALC880_FIXUP_5ST_DIG
),
1582 SND_PCI_QUIRK(0x1019, 0xa884, "Acer APFV", ALC880_FIXUP_6ST
),
1583 SND_PCI_QUIRK(0x1025, 0x0070, "ULI", ALC880_FIXUP_3ST_DIG
),
1584 SND_PCI_QUIRK(0x1025, 0x0077, "ULI", ALC880_FIXUP_6ST_DIG
),
1585 SND_PCI_QUIRK(0x1025, 0x0078, "ULI", ALC880_FIXUP_6ST_DIG
),
1586 SND_PCI_QUIRK(0x1025, 0x0087, "ULI", ALC880_FIXUP_6ST_DIG
),
1587 SND_PCI_QUIRK(0x1025, 0xe309, "ULI", ALC880_FIXUP_3ST_DIG
),
1588 SND_PCI_QUIRK(0x1025, 0xe310, "ULI", ALC880_FIXUP_3ST
),
1589 SND_PCI_QUIRK(0x1039, 0x1234, NULL
, ALC880_FIXUP_6ST_DIG
),
1590 SND_PCI_QUIRK(0x104d, 0x81a0, "Sony", ALC880_FIXUP_3ST
),
1591 SND_PCI_QUIRK(0x104d, 0x81d6, "Sony", ALC880_FIXUP_3ST
),
1592 SND_PCI_QUIRK(0x107b, 0x3032, "Gateway", ALC880_FIXUP_5ST
),
1593 SND_PCI_QUIRK(0x107b, 0x3033, "Gateway", ALC880_FIXUP_5ST
),
1594 SND_PCI_QUIRK(0x107b, 0x4039, "Gateway", ALC880_FIXUP_5ST
),
1595 SND_PCI_QUIRK(0x1297, 0xc790, "Shuttle ST20G5", ALC880_FIXUP_6ST_DIG
),
1596 SND_PCI_QUIRK(0x1458, 0xa102, "Gigabyte K8", ALC880_FIXUP_6ST_DIG
),
1597 SND_PCI_QUIRK(0x1462, 0x1150, "MSI", ALC880_FIXUP_6ST_DIG
),
1598 SND_PCI_QUIRK(0x1509, 0x925d, "FIC P4M", ALC880_FIXUP_6ST_DIG
),
1599 SND_PCI_QUIRK(0x1565, 0x8202, "Biostar", ALC880_FIXUP_5ST_DIG
),
1600 SND_PCI_QUIRK(0x1695, 0x400d, "EPoX", ALC880_FIXUP_5ST_DIG
),
1601 SND_PCI_QUIRK(0x1695, 0x4012, "EPox EP-5LDA", ALC880_FIXUP_5ST_DIG
),
1602 SND_PCI_QUIRK(0x2668, 0x8086, NULL
, ALC880_FIXUP_6ST_DIG
), /* broken BIOS */
1603 SND_PCI_QUIRK(0x8086, 0x2668, NULL
, ALC880_FIXUP_6ST_DIG
),
1604 SND_PCI_QUIRK(0x8086, 0xa100, "Intel mobo", ALC880_FIXUP_5ST_DIG
),
1605 SND_PCI_QUIRK(0x8086, 0xd400, "Intel mobo", ALC880_FIXUP_5ST_DIG
),
1606 SND_PCI_QUIRK(0x8086, 0xd401, "Intel mobo", ALC880_FIXUP_5ST_DIG
),
1607 SND_PCI_QUIRK(0x8086, 0xd402, "Intel mobo", ALC880_FIXUP_3ST_DIG
),
1608 SND_PCI_QUIRK(0x8086, 0xe224, "Intel mobo", ALC880_FIXUP_5ST_DIG
),
1609 SND_PCI_QUIRK(0x8086, 0xe305, "Intel mobo", ALC880_FIXUP_3ST_DIG
),
1610 SND_PCI_QUIRK(0x8086, 0xe308, "Intel mobo", ALC880_FIXUP_3ST_DIG
),
1611 SND_PCI_QUIRK(0x8086, 0xe400, "Intel mobo", ALC880_FIXUP_5ST_DIG
),
1612 SND_PCI_QUIRK(0x8086, 0xe401, "Intel mobo", ALC880_FIXUP_5ST_DIG
),
1613 SND_PCI_QUIRK(0x8086, 0xe402, "Intel mobo", ALC880_FIXUP_5ST_DIG
),
1615 SND_PCI_QUIRK_VENDOR(0x8086, "Intel mobo", ALC880_FIXUP_3ST
),
1616 SND_PCI_QUIRK(0xa0a0, 0x0560, "AOpen i915GMm-HFS", ALC880_FIXUP_5ST_DIG
),
1617 SND_PCI_QUIRK(0xe803, 0x1019, NULL
, ALC880_FIXUP_6ST_DIG
),
1621 static const struct hda_model_fixup alc880_fixup_models
[] = {
1622 {.id
= ALC880_FIXUP_3ST
, .name
= "3stack"},
1623 {.id
= ALC880_FIXUP_3ST_DIG
, .name
= "3stack-digout"},
1624 {.id
= ALC880_FIXUP_5ST
, .name
= "5stack"},
1625 {.id
= ALC880_FIXUP_5ST_DIG
, .name
= "5stack-digout"},
1626 {.id
= ALC880_FIXUP_6ST
, .name
= "6stack"},
1627 {.id
= ALC880_FIXUP_6ST_DIG
, .name
= "6stack-digout"},
1628 {.id
= ALC880_FIXUP_6ST_AUTOMUTE
, .name
= "6stack-automute"},
1634 * OK, here we have finally the patch for ALC880
1636 static int patch_alc880(struct hda_codec
*codec
)
1638 struct alc_spec
*spec
;
1641 err
= alc_alloc_spec(codec
, 0x0b);
1646 spec
->gen
.need_dac_fix
= 1;
1647 spec
->gen
.beep_nid
= 0x01;
1649 codec
->patch_ops
.unsol_event
= alc880_unsol_event
;
1651 alc_pre_init(codec
);
1653 snd_hda_pick_fixup(codec
, alc880_fixup_models
, alc880_fixup_tbl
,
1655 snd_hda_apply_fixup(codec
, HDA_FIXUP_ACT_PRE_PROBE
);
1657 /* automatic parse from the BIOS config */
1658 err
= alc880_parse_auto_config(codec
);
1662 if (!spec
->gen
.no_analog
) {
1663 err
= set_beep_amp(spec
, 0x0b, 0x05, HDA_INPUT
);
1668 snd_hda_apply_fixup(codec
, HDA_FIXUP_ACT_PROBE
);
1681 static int alc260_parse_auto_config(struct hda_codec
*codec
)
1683 static const hda_nid_t alc260_ignore
[] = { 0x17, 0 };
1684 static const hda_nid_t alc260_ssids
[] = { 0x10, 0x15, 0x0f, 0 };
1685 return alc_parse_auto_config(codec
, alc260_ignore
, alc260_ssids
);
1692 ALC260_FIXUP_HP_DC5750
,
1693 ALC260_FIXUP_HP_PIN_0F
,
1696 ALC260_FIXUP_GPIO1_TOGGLE
,
1697 ALC260_FIXUP_REPLACER
,
1698 ALC260_FIXUP_HP_B1900
,
1700 ALC260_FIXUP_FSC_S7020
,
1701 ALC260_FIXUP_FSC_S7020_JWSE
,
1702 ALC260_FIXUP_VAIO_PINS
,
1705 static void alc260_gpio1_automute(struct hda_codec
*codec
)
1707 struct alc_spec
*spec
= codec
->spec
;
1709 alc_update_gpio_data(codec
, 0x01, spec
->gen
.hp_jack_present
);
1712 static void alc260_fixup_gpio1_toggle(struct hda_codec
*codec
,
1713 const struct hda_fixup
*fix
, int action
)
1715 struct alc_spec
*spec
= codec
->spec
;
1716 if (action
== HDA_FIXUP_ACT_PROBE
) {
1717 /* although the machine has only one output pin, we need to
1718 * toggle GPIO1 according to the jack state
1720 spec
->gen
.automute_hook
= alc260_gpio1_automute
;
1721 spec
->gen
.detect_hp
= 1;
1722 spec
->gen
.automute_speaker
= 1;
1723 spec
->gen
.autocfg
.hp_pins
[0] = 0x0f; /* copy it for automute */
1724 snd_hda_jack_detect_enable_callback(codec
, 0x0f,
1725 snd_hda_gen_hp_automute
);
1726 alc_setup_gpio(codec
, 0x01);
1730 static void alc260_fixup_kn1(struct hda_codec
*codec
,
1731 const struct hda_fixup
*fix
, int action
)
1733 struct alc_spec
*spec
= codec
->spec
;
1734 static const struct hda_pintbl pincfgs
[] = {
1735 { 0x0f, 0x02214000 }, /* HP/speaker */
1736 { 0x12, 0x90a60160 }, /* int mic */
1737 { 0x13, 0x02a19000 }, /* ext mic */
1738 { 0x18, 0x01446000 }, /* SPDIF out */
1739 /* disable bogus I/O pins */
1740 { 0x10, 0x411111f0 },
1741 { 0x11, 0x411111f0 },
1742 { 0x14, 0x411111f0 },
1743 { 0x15, 0x411111f0 },
1744 { 0x16, 0x411111f0 },
1745 { 0x17, 0x411111f0 },
1746 { 0x19, 0x411111f0 },
1751 case HDA_FIXUP_ACT_PRE_PROBE
:
1752 snd_hda_apply_pincfgs(codec
, pincfgs
);
1753 spec
->init_amp
= ALC_INIT_NONE
;
1758 static void alc260_fixup_fsc_s7020(struct hda_codec
*codec
,
1759 const struct hda_fixup
*fix
, int action
)
1761 struct alc_spec
*spec
= codec
->spec
;
1762 if (action
== HDA_FIXUP_ACT_PRE_PROBE
)
1763 spec
->init_amp
= ALC_INIT_NONE
;
1766 static void alc260_fixup_fsc_s7020_jwse(struct hda_codec
*codec
,
1767 const struct hda_fixup
*fix
, int action
)
1769 struct alc_spec
*spec
= codec
->spec
;
1770 if (action
== HDA_FIXUP_ACT_PRE_PROBE
) {
1771 spec
->gen
.add_jack_modes
= 1;
1772 spec
->gen
.hp_mic
= 1;
1776 static const struct hda_fixup alc260_fixups
[] = {
1777 [ALC260_FIXUP_HP_DC5750
] = {
1778 .type
= HDA_FIXUP_PINS
,
1779 .v
.pins
= (const struct hda_pintbl
[]) {
1780 { 0x11, 0x90130110 }, /* speaker */
1784 [ALC260_FIXUP_HP_PIN_0F
] = {
1785 .type
= HDA_FIXUP_PINS
,
1786 .v
.pins
= (const struct hda_pintbl
[]) {
1787 { 0x0f, 0x01214000 }, /* HP */
1791 [ALC260_FIXUP_COEF
] = {
1792 .type
= HDA_FIXUP_VERBS
,
1793 .v
.verbs
= (const struct hda_verb
[]) {
1794 { 0x1a, AC_VERB_SET_COEF_INDEX
, 0x07 },
1795 { 0x1a, AC_VERB_SET_PROC_COEF
, 0x3040 },
1799 [ALC260_FIXUP_GPIO1
] = {
1800 .type
= HDA_FIXUP_FUNC
,
1801 .v
.func
= alc_fixup_gpio1
,
1803 [ALC260_FIXUP_GPIO1_TOGGLE
] = {
1804 .type
= HDA_FIXUP_FUNC
,
1805 .v
.func
= alc260_fixup_gpio1_toggle
,
1807 .chain_id
= ALC260_FIXUP_HP_PIN_0F
,
1809 [ALC260_FIXUP_REPLACER
] = {
1810 .type
= HDA_FIXUP_VERBS
,
1811 .v
.verbs
= (const struct hda_verb
[]) {
1812 { 0x1a, AC_VERB_SET_COEF_INDEX
, 0x07 },
1813 { 0x1a, AC_VERB_SET_PROC_COEF
, 0x3050 },
1817 .chain_id
= ALC260_FIXUP_GPIO1_TOGGLE
,
1819 [ALC260_FIXUP_HP_B1900
] = {
1820 .type
= HDA_FIXUP_FUNC
,
1821 .v
.func
= alc260_fixup_gpio1_toggle
,
1823 .chain_id
= ALC260_FIXUP_COEF
,
1825 [ALC260_FIXUP_KN1
] = {
1826 .type
= HDA_FIXUP_FUNC
,
1827 .v
.func
= alc260_fixup_kn1
,
1829 [ALC260_FIXUP_FSC_S7020
] = {
1830 .type
= HDA_FIXUP_FUNC
,
1831 .v
.func
= alc260_fixup_fsc_s7020
,
1833 [ALC260_FIXUP_FSC_S7020_JWSE
] = {
1834 .type
= HDA_FIXUP_FUNC
,
1835 .v
.func
= alc260_fixup_fsc_s7020_jwse
,
1837 .chain_id
= ALC260_FIXUP_FSC_S7020
,
1839 [ALC260_FIXUP_VAIO_PINS
] = {
1840 .type
= HDA_FIXUP_PINS
,
1841 .v
.pins
= (const struct hda_pintbl
[]) {
1842 /* Pin configs are missing completely on some VAIOs */
1843 { 0x0f, 0x01211020 },
1844 { 0x10, 0x0001003f },
1845 { 0x11, 0x411111f0 },
1846 { 0x12, 0x01a15930 },
1847 { 0x13, 0x411111f0 },
1848 { 0x14, 0x411111f0 },
1849 { 0x15, 0x411111f0 },
1850 { 0x16, 0x411111f0 },
1851 { 0x17, 0x411111f0 },
1852 { 0x18, 0x411111f0 },
1853 { 0x19, 0x411111f0 },
1859 static const struct snd_pci_quirk alc260_fixup_tbl
[] = {
1860 SND_PCI_QUIRK(0x1025, 0x007b, "Acer C20x", ALC260_FIXUP_GPIO1
),
1861 SND_PCI_QUIRK(0x1025, 0x007f, "Acer Aspire 9500", ALC260_FIXUP_COEF
),
1862 SND_PCI_QUIRK(0x1025, 0x008f, "Acer", ALC260_FIXUP_GPIO1
),
1863 SND_PCI_QUIRK(0x103c, 0x280a, "HP dc5750", ALC260_FIXUP_HP_DC5750
),
1864 SND_PCI_QUIRK(0x103c, 0x30ba, "HP Presario B1900", ALC260_FIXUP_HP_B1900
),
1865 SND_PCI_QUIRK(0x104d, 0x81bb, "Sony VAIO", ALC260_FIXUP_VAIO_PINS
),
1866 SND_PCI_QUIRK(0x104d, 0x81e2, "Sony VAIO TX", ALC260_FIXUP_HP_PIN_0F
),
1867 SND_PCI_QUIRK(0x10cf, 0x1326, "FSC LifeBook S7020", ALC260_FIXUP_FSC_S7020
),
1868 SND_PCI_QUIRK(0x1509, 0x4540, "Favorit 100XS", ALC260_FIXUP_GPIO1
),
1869 SND_PCI_QUIRK(0x152d, 0x0729, "Quanta KN1", ALC260_FIXUP_KN1
),
1870 SND_PCI_QUIRK(0x161f, 0x2057, "Replacer 672V", ALC260_FIXUP_REPLACER
),
1871 SND_PCI_QUIRK(0x1631, 0xc017, "PB V7900", ALC260_FIXUP_COEF
),
1875 static const struct hda_model_fixup alc260_fixup_models
[] = {
1876 {.id
= ALC260_FIXUP_GPIO1
, .name
= "gpio1"},
1877 {.id
= ALC260_FIXUP_COEF
, .name
= "coef"},
1878 {.id
= ALC260_FIXUP_FSC_S7020
, .name
= "fujitsu"},
1879 {.id
= ALC260_FIXUP_FSC_S7020_JWSE
, .name
= "fujitsu-jwse"},
1885 static int patch_alc260(struct hda_codec
*codec
)
1887 struct alc_spec
*spec
;
1890 err
= alc_alloc_spec(codec
, 0x07);
1895 /* as quite a few machines require HP amp for speaker outputs,
1896 * it's easier to enable it unconditionally; even if it's unneeded,
1897 * it's almost harmless.
1899 spec
->gen
.prefer_hp_amp
= 1;
1900 spec
->gen
.beep_nid
= 0x01;
1902 spec
->shutup
= alc_eapd_shutup
;
1904 alc_pre_init(codec
);
1906 snd_hda_pick_fixup(codec
, alc260_fixup_models
, alc260_fixup_tbl
,
1908 snd_hda_apply_fixup(codec
, HDA_FIXUP_ACT_PRE_PROBE
);
1910 /* automatic parse from the BIOS config */
1911 err
= alc260_parse_auto_config(codec
);
1915 if (!spec
->gen
.no_analog
) {
1916 err
= set_beep_amp(spec
, 0x07, 0x05, HDA_INPUT
);
1921 snd_hda_apply_fixup(codec
, HDA_FIXUP_ACT_PROBE
);
1932 * ALC882/883/885/888/889 support
1934 * ALC882 is almost identical with ALC880 but has cleaner and more flexible
1935 * configuration. Each pin widget can choose any input DACs and a mixer.
1936 * Each ADC is connected from a mixer of all inputs. This makes possible
1937 * 6-channel independent captures.
1939 * In addition, an independent DAC for the multi-playback (not used in this
1947 ALC882_FIXUP_ABIT_AW9D_MAX
,
1948 ALC882_FIXUP_LENOVO_Y530
,
1949 ALC882_FIXUP_PB_M5210
,
1950 ALC882_FIXUP_ACER_ASPIRE_7736
,
1951 ALC882_FIXUP_ASUS_W90V
,
1953 ALC889_FIXUP_FRONT_HP_NO_PRESENCE
,
1954 ALC889_FIXUP_VAIO_TT
,
1955 ALC888_FIXUP_EEE1601
,
1959 ALC883_FIXUP_ACER_EAPD
,
1964 ALC882_FIXUP_ASUS_W2JC
,
1965 ALC882_FIXUP_ACER_ASPIRE_4930G
,
1966 ALC882_FIXUP_ACER_ASPIRE_8930G
,
1967 ALC882_FIXUP_ASPIRE_8930G_VERBS
,
1968 ALC885_FIXUP_MACPRO_GPIO
,
1969 ALC889_FIXUP_DAC_ROUTE
,
1970 ALC889_FIXUP_MBP_VREF
,
1971 ALC889_FIXUP_IMAC91_VREF
,
1972 ALC889_FIXUP_MBA11_VREF
,
1973 ALC889_FIXUP_MBA21_VREF
,
1974 ALC889_FIXUP_MP11_VREF
,
1975 ALC889_FIXUP_MP41_VREF
,
1976 ALC882_FIXUP_INV_DMIC
,
1977 ALC882_FIXUP_NO_PRIMARY_HP
,
1978 ALC887_FIXUP_ASUS_BASS
,
1979 ALC887_FIXUP_BASS_CHMAP
,
1980 ALC1220_FIXUP_GB_DUAL_CODECS
,
1981 ALC1220_FIXUP_GB_X570
,
1982 ALC1220_FIXUP_CLEVO_P950
,
1983 ALC1220_FIXUP_CLEVO_PB51ED
,
1984 ALC1220_FIXUP_CLEVO_PB51ED_PINS
,
1985 ALC887_FIXUP_ASUS_AUDIO
,
1986 ALC887_FIXUP_ASUS_HMIC
,
1987 ALCS1200A_FIXUP_MIC_VREF
,
1990 static void alc889_fixup_coef(struct hda_codec
*codec
,
1991 const struct hda_fixup
*fix
, int action
)
1993 if (action
!= HDA_FIXUP_ACT_INIT
)
1995 alc_update_coef_idx(codec
, 7, 0, 0x2030);
1998 /* set up GPIO at initialization */
1999 static void alc885_fixup_macpro_gpio(struct hda_codec
*codec
,
2000 const struct hda_fixup
*fix
, int action
)
2002 struct alc_spec
*spec
= codec
->spec
;
2004 spec
->gpio_write_delay
= true;
2005 alc_fixup_gpio3(codec
, fix
, action
);
2008 /* Fix the connection of some pins for ALC889:
2009 * At least, Acer Aspire 5935 shows the connections to DAC3/4 don't
2010 * work correctly (bko#42740)
2012 static void alc889_fixup_dac_route(struct hda_codec
*codec
,
2013 const struct hda_fixup
*fix
, int action
)
2015 if (action
== HDA_FIXUP_ACT_PRE_PROBE
) {
2016 /* fake the connections during parsing the tree */
2017 static const hda_nid_t conn1
[] = { 0x0c, 0x0d };
2018 static const hda_nid_t conn2
[] = { 0x0e, 0x0f };
2019 snd_hda_override_conn_list(codec
, 0x14, ARRAY_SIZE(conn1
), conn1
);
2020 snd_hda_override_conn_list(codec
, 0x15, ARRAY_SIZE(conn1
), conn1
);
2021 snd_hda_override_conn_list(codec
, 0x18, ARRAY_SIZE(conn2
), conn2
);
2022 snd_hda_override_conn_list(codec
, 0x1a, ARRAY_SIZE(conn2
), conn2
);
2023 } else if (action
== HDA_FIXUP_ACT_PROBE
) {
2024 /* restore the connections */
2025 static const hda_nid_t conn
[] = { 0x0c, 0x0d, 0x0e, 0x0f, 0x26 };
2026 snd_hda_override_conn_list(codec
, 0x14, ARRAY_SIZE(conn
), conn
);
2027 snd_hda_override_conn_list(codec
, 0x15, ARRAY_SIZE(conn
), conn
);
2028 snd_hda_override_conn_list(codec
, 0x18, ARRAY_SIZE(conn
), conn
);
2029 snd_hda_override_conn_list(codec
, 0x1a, ARRAY_SIZE(conn
), conn
);
2033 /* Set VREF on HP pin */
2034 static void alc889_fixup_mbp_vref(struct hda_codec
*codec
,
2035 const struct hda_fixup
*fix
, int action
)
2037 static const hda_nid_t nids
[] = { 0x14, 0x15, 0x19 };
2038 struct alc_spec
*spec
= codec
->spec
;
2041 if (action
!= HDA_FIXUP_ACT_INIT
)
2043 for (i
= 0; i
< ARRAY_SIZE(nids
); i
++) {
2044 unsigned int val
= snd_hda_codec_get_pincfg(codec
, nids
[i
]);
2045 if (get_defcfg_device(val
) != AC_JACK_HP_OUT
)
2047 val
= snd_hda_codec_get_pin_target(codec
, nids
[i
]);
2048 val
|= AC_PINCTL_VREF_80
;
2049 snd_hda_set_pin_ctl(codec
, nids
[i
], val
);
2050 spec
->gen
.keep_vref_in_automute
= 1;
2055 static void alc889_fixup_mac_pins(struct hda_codec
*codec
,
2056 const hda_nid_t
*nids
, int num_nids
)
2058 struct alc_spec
*spec
= codec
->spec
;
2061 for (i
= 0; i
< num_nids
; i
++) {
2063 val
= snd_hda_codec_get_pin_target(codec
, nids
[i
]);
2064 val
|= AC_PINCTL_VREF_50
;
2065 snd_hda_set_pin_ctl(codec
, nids
[i
], val
);
2067 spec
->gen
.keep_vref_in_automute
= 1;
2070 /* Set VREF on speaker pins on imac91 */
2071 static void alc889_fixup_imac91_vref(struct hda_codec
*codec
,
2072 const struct hda_fixup
*fix
, int action
)
2074 static const hda_nid_t nids
[] = { 0x18, 0x1a };
2076 if (action
== HDA_FIXUP_ACT_INIT
)
2077 alc889_fixup_mac_pins(codec
, nids
, ARRAY_SIZE(nids
));
2080 /* Set VREF on speaker pins on mba11 */
2081 static void alc889_fixup_mba11_vref(struct hda_codec
*codec
,
2082 const struct hda_fixup
*fix
, int action
)
2084 static const hda_nid_t nids
[] = { 0x18 };
2086 if (action
== HDA_FIXUP_ACT_INIT
)
2087 alc889_fixup_mac_pins(codec
, nids
, ARRAY_SIZE(nids
));
2090 /* Set VREF on speaker pins on mba21 */
2091 static void alc889_fixup_mba21_vref(struct hda_codec
*codec
,
2092 const struct hda_fixup
*fix
, int action
)
2094 static const hda_nid_t nids
[] = { 0x18, 0x19 };
2096 if (action
== HDA_FIXUP_ACT_INIT
)
2097 alc889_fixup_mac_pins(codec
, nids
, ARRAY_SIZE(nids
));
2100 /* Don't take HP output as primary
2101 * Strangely, the speaker output doesn't work on Vaio Z and some Vaio
2102 * all-in-one desktop PCs (for example VGC-LN51JGB) through DAC 0x05
2104 static void alc882_fixup_no_primary_hp(struct hda_codec
*codec
,
2105 const struct hda_fixup
*fix
, int action
)
2107 struct alc_spec
*spec
= codec
->spec
;
2108 if (action
== HDA_FIXUP_ACT_PRE_PROBE
) {
2109 spec
->gen
.no_primary_hp
= 1;
2110 spec
->gen
.no_multi_io
= 1;
2114 static void alc_fixup_bass_chmap(struct hda_codec
*codec
,
2115 const struct hda_fixup
*fix
, int action
);
2117 /* For dual-codec configuration, we need to disable some features to avoid
2118 * conflicts of kctls and PCM streams
2120 static void alc_fixup_dual_codecs(struct hda_codec
*codec
,
2121 const struct hda_fixup
*fix
, int action
)
2123 struct alc_spec
*spec
= codec
->spec
;
2125 if (action
!= HDA_FIXUP_ACT_PRE_PROBE
)
2127 /* disable vmaster */
2128 spec
->gen
.suppress_vmaster
= 1;
2129 /* auto-mute and auto-mic switch don't work with multiple codecs */
2130 spec
->gen
.suppress_auto_mute
= 1;
2131 spec
->gen
.suppress_auto_mic
= 1;
2132 /* disable aamix as well */
2133 spec
->gen
.mixer_nid
= 0;
2134 /* add location prefix to avoid conflicts */
2135 codec
->force_pin_prefix
= 1;
2138 static void rename_ctl(struct hda_codec
*codec
, const char *oldname
,
2139 const char *newname
)
2141 struct snd_kcontrol
*kctl
;
2143 kctl
= snd_hda_find_mixer_ctl(codec
, oldname
);
2145 strcpy(kctl
->id
.name
, newname
);
2148 static void alc1220_fixup_gb_dual_codecs(struct hda_codec
*codec
,
2149 const struct hda_fixup
*fix
,
2152 alc_fixup_dual_codecs(codec
, fix
, action
);
2154 case HDA_FIXUP_ACT_PRE_PROBE
:
2155 /* override card longname to provide a unique UCM profile */
2156 strcpy(codec
->card
->longname
, "HDAudio-Gigabyte-ALC1220DualCodecs");
2158 case HDA_FIXUP_ACT_BUILD
:
2159 /* rename Capture controls depending on the codec */
2160 rename_ctl(codec
, "Capture Volume",
2162 "Rear-Panel Capture Volume" :
2163 "Front-Panel Capture Volume");
2164 rename_ctl(codec
, "Capture Switch",
2166 "Rear-Panel Capture Switch" :
2167 "Front-Panel Capture Switch");
2172 static void alc1220_fixup_gb_x570(struct hda_codec
*codec
,
2173 const struct hda_fixup
*fix
,
2176 static const hda_nid_t conn1
[] = { 0x0c };
2177 static const struct coef_fw gb_x570_coefs
[] = {
2178 WRITE_COEF(0x07, 0x03c0),
2179 WRITE_COEF(0x1a, 0x01c1),
2180 WRITE_COEF(0x1b, 0x0202),
2181 WRITE_COEF(0x43, 0x3005),
2186 case HDA_FIXUP_ACT_PRE_PROBE
:
2187 snd_hda_override_conn_list(codec
, 0x14, ARRAY_SIZE(conn1
), conn1
);
2188 snd_hda_override_conn_list(codec
, 0x1b, ARRAY_SIZE(conn1
), conn1
);
2190 case HDA_FIXUP_ACT_INIT
:
2191 alc_process_coef_fw(codec
, gb_x570_coefs
);
2196 static void alc1220_fixup_clevo_p950(struct hda_codec
*codec
,
2197 const struct hda_fixup
*fix
,
2200 static const hda_nid_t conn1
[] = { 0x0c };
2202 if (action
!= HDA_FIXUP_ACT_PRE_PROBE
)
2205 alc_update_coef_idx(codec
, 0x7, 0, 0x3c3);
2206 /* We therefore want to make sure 0x14 (front headphone) and
2207 * 0x1b (speakers) use the stereo DAC 0x02
2209 snd_hda_override_conn_list(codec
, 0x14, ARRAY_SIZE(conn1
), conn1
);
2210 snd_hda_override_conn_list(codec
, 0x1b, ARRAY_SIZE(conn1
), conn1
);
2213 static void alc_fixup_headset_mode_no_hp_mic(struct hda_codec
*codec
,
2214 const struct hda_fixup
*fix
, int action
);
2216 static void alc1220_fixup_clevo_pb51ed(struct hda_codec
*codec
,
2217 const struct hda_fixup
*fix
,
2220 alc1220_fixup_clevo_p950(codec
, fix
, action
);
2221 alc_fixup_headset_mode_no_hp_mic(codec
, fix
, action
);
2224 static void alc887_asus_hp_automute_hook(struct hda_codec
*codec
,
2225 struct hda_jack_callback
*jack
)
2227 struct alc_spec
*spec
= codec
->spec
;
2230 snd_hda_gen_hp_automute(codec
, jack
);
2232 if (spec
->gen
.hp_jack_present
)
2233 vref
= AC_PINCTL_VREF_80
;
2235 vref
= AC_PINCTL_VREF_HIZ
;
2236 snd_hda_set_pin_ctl(codec
, 0x19, PIN_HP
| vref
);
2239 static void alc887_fixup_asus_jack(struct hda_codec
*codec
,
2240 const struct hda_fixup
*fix
, int action
)
2242 struct alc_spec
*spec
= codec
->spec
;
2243 if (action
!= HDA_FIXUP_ACT_PROBE
)
2245 snd_hda_set_pin_ctl_cache(codec
, 0x1b, PIN_HP
);
2246 spec
->gen
.hp_automute_hook
= alc887_asus_hp_automute_hook
;
2249 static const struct hda_fixup alc882_fixups
[] = {
2250 [ALC882_FIXUP_ABIT_AW9D_MAX
] = {
2251 .type
= HDA_FIXUP_PINS
,
2252 .v
.pins
= (const struct hda_pintbl
[]) {
2253 { 0x15, 0x01080104 }, /* side */
2254 { 0x16, 0x01011012 }, /* rear */
2255 { 0x17, 0x01016011 }, /* clfe */
2259 [ALC882_FIXUP_LENOVO_Y530
] = {
2260 .type
= HDA_FIXUP_PINS
,
2261 .v
.pins
= (const struct hda_pintbl
[]) {
2262 { 0x15, 0x99130112 }, /* rear int speakers */
2263 { 0x16, 0x99130111 }, /* subwoofer */
2267 [ALC882_FIXUP_PB_M5210
] = {
2268 .type
= HDA_FIXUP_PINCTLS
,
2269 .v
.pins
= (const struct hda_pintbl
[]) {
2270 { 0x19, PIN_VREF50
},
2274 [ALC882_FIXUP_ACER_ASPIRE_7736
] = {
2275 .type
= HDA_FIXUP_FUNC
,
2276 .v
.func
= alc_fixup_sku_ignore
,
2278 [ALC882_FIXUP_ASUS_W90V
] = {
2279 .type
= HDA_FIXUP_PINS
,
2280 .v
.pins
= (const struct hda_pintbl
[]) {
2281 { 0x16, 0x99130110 }, /* fix sequence for CLFE */
2285 [ALC889_FIXUP_CD
] = {
2286 .type
= HDA_FIXUP_PINS
,
2287 .v
.pins
= (const struct hda_pintbl
[]) {
2288 { 0x1c, 0x993301f0 }, /* CD */
2292 [ALC889_FIXUP_FRONT_HP_NO_PRESENCE
] = {
2293 .type
= HDA_FIXUP_PINS
,
2294 .v
.pins
= (const struct hda_pintbl
[]) {
2295 { 0x1b, 0x02214120 }, /* Front HP jack is flaky, disable jack detect */
2299 .chain_id
= ALC889_FIXUP_CD
,
2301 [ALC889_FIXUP_VAIO_TT
] = {
2302 .type
= HDA_FIXUP_PINS
,
2303 .v
.pins
= (const struct hda_pintbl
[]) {
2304 { 0x17, 0x90170111 }, /* hidden surround speaker */
2308 [ALC888_FIXUP_EEE1601
] = {
2309 .type
= HDA_FIXUP_VERBS
,
2310 .v
.verbs
= (const struct hda_verb
[]) {
2311 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x0b },
2312 { 0x20, AC_VERB_SET_PROC_COEF
, 0x0838 },
2316 [ALC886_FIXUP_EAPD
] = {
2317 .type
= HDA_FIXUP_VERBS
,
2318 .v
.verbs
= (const struct hda_verb
[]) {
2319 /* change to EAPD mode */
2320 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x07 },
2321 { 0x20, AC_VERB_SET_PROC_COEF
, 0x0068 },
2325 [ALC882_FIXUP_EAPD
] = {
2326 .type
= HDA_FIXUP_VERBS
,
2327 .v
.verbs
= (const struct hda_verb
[]) {
2328 /* change to EAPD mode */
2329 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x07 },
2330 { 0x20, AC_VERB_SET_PROC_COEF
, 0x3060 },
2334 [ALC883_FIXUP_EAPD
] = {
2335 .type
= HDA_FIXUP_VERBS
,
2336 .v
.verbs
= (const struct hda_verb
[]) {
2337 /* change to EAPD mode */
2338 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x07 },
2339 { 0x20, AC_VERB_SET_PROC_COEF
, 0x3070 },
2343 [ALC883_FIXUP_ACER_EAPD
] = {
2344 .type
= HDA_FIXUP_VERBS
,
2345 .v
.verbs
= (const struct hda_verb
[]) {
2346 /* eanable EAPD on Acer laptops */
2347 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x07 },
2348 { 0x20, AC_VERB_SET_PROC_COEF
, 0x3050 },
2352 [ALC882_FIXUP_GPIO1
] = {
2353 .type
= HDA_FIXUP_FUNC
,
2354 .v
.func
= alc_fixup_gpio1
,
2356 [ALC882_FIXUP_GPIO2
] = {
2357 .type
= HDA_FIXUP_FUNC
,
2358 .v
.func
= alc_fixup_gpio2
,
2360 [ALC882_FIXUP_GPIO3
] = {
2361 .type
= HDA_FIXUP_FUNC
,
2362 .v
.func
= alc_fixup_gpio3
,
2364 [ALC882_FIXUP_ASUS_W2JC
] = {
2365 .type
= HDA_FIXUP_FUNC
,
2366 .v
.func
= alc_fixup_gpio1
,
2368 .chain_id
= ALC882_FIXUP_EAPD
,
2370 [ALC889_FIXUP_COEF
] = {
2371 .type
= HDA_FIXUP_FUNC
,
2372 .v
.func
= alc889_fixup_coef
,
2374 [ALC882_FIXUP_ACER_ASPIRE_4930G
] = {
2375 .type
= HDA_FIXUP_PINS
,
2376 .v
.pins
= (const struct hda_pintbl
[]) {
2377 { 0x16, 0x99130111 }, /* CLFE speaker */
2378 { 0x17, 0x99130112 }, /* surround speaker */
2382 .chain_id
= ALC882_FIXUP_GPIO1
,
2384 [ALC882_FIXUP_ACER_ASPIRE_8930G
] = {
2385 .type
= HDA_FIXUP_PINS
,
2386 .v
.pins
= (const struct hda_pintbl
[]) {
2387 { 0x16, 0x99130111 }, /* CLFE speaker */
2388 { 0x1b, 0x99130112 }, /* surround speaker */
2392 .chain_id
= ALC882_FIXUP_ASPIRE_8930G_VERBS
,
2394 [ALC882_FIXUP_ASPIRE_8930G_VERBS
] = {
2395 /* additional init verbs for Acer Aspire 8930G */
2396 .type
= HDA_FIXUP_VERBS
,
2397 .v
.verbs
= (const struct hda_verb
[]) {
2398 /* Enable all DACs */
2399 /* DAC DISABLE/MUTE 1? */
2400 /* setting bits 1-5 disables DAC nids 0x02-0x06
2401 * apparently. Init=0x38 */
2402 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x03 },
2403 { 0x20, AC_VERB_SET_PROC_COEF
, 0x0000 },
2404 /* DAC DISABLE/MUTE 2? */
2405 /* some bit here disables the other DACs.
2407 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x08 },
2408 { 0x20, AC_VERB_SET_PROC_COEF
, 0x0000 },
2410 * This laptop has a stereo digital microphone.
2411 * The mics are only 1cm apart which makes the stereo
2412 * useless. However, either the mic or the ALC889
2413 * makes the signal become a difference/sum signal
2414 * instead of standard stereo, which is annoying.
2415 * So instead we flip this bit which makes the
2416 * codec replicate the sum signal to both channels,
2417 * turning it into a normal mono mic.
2419 /* DMIC_CONTROL? Init value = 0x0001 */
2420 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x0b },
2421 { 0x20, AC_VERB_SET_PROC_COEF
, 0x0003 },
2422 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x07 },
2423 { 0x20, AC_VERB_SET_PROC_COEF
, 0x3050 },
2427 .chain_id
= ALC882_FIXUP_GPIO1
,
2429 [ALC885_FIXUP_MACPRO_GPIO
] = {
2430 .type
= HDA_FIXUP_FUNC
,
2431 .v
.func
= alc885_fixup_macpro_gpio
,
2433 [ALC889_FIXUP_DAC_ROUTE
] = {
2434 .type
= HDA_FIXUP_FUNC
,
2435 .v
.func
= alc889_fixup_dac_route
,
2437 [ALC889_FIXUP_MBP_VREF
] = {
2438 .type
= HDA_FIXUP_FUNC
,
2439 .v
.func
= alc889_fixup_mbp_vref
,
2441 .chain_id
= ALC882_FIXUP_GPIO1
,
2443 [ALC889_FIXUP_IMAC91_VREF
] = {
2444 .type
= HDA_FIXUP_FUNC
,
2445 .v
.func
= alc889_fixup_imac91_vref
,
2447 .chain_id
= ALC882_FIXUP_GPIO1
,
2449 [ALC889_FIXUP_MBA11_VREF
] = {
2450 .type
= HDA_FIXUP_FUNC
,
2451 .v
.func
= alc889_fixup_mba11_vref
,
2453 .chain_id
= ALC889_FIXUP_MBP_VREF
,
2455 [ALC889_FIXUP_MBA21_VREF
] = {
2456 .type
= HDA_FIXUP_FUNC
,
2457 .v
.func
= alc889_fixup_mba21_vref
,
2459 .chain_id
= ALC889_FIXUP_MBP_VREF
,
2461 [ALC889_FIXUP_MP11_VREF
] = {
2462 .type
= HDA_FIXUP_FUNC
,
2463 .v
.func
= alc889_fixup_mba11_vref
,
2465 .chain_id
= ALC885_FIXUP_MACPRO_GPIO
,
2467 [ALC889_FIXUP_MP41_VREF
] = {
2468 .type
= HDA_FIXUP_FUNC
,
2469 .v
.func
= alc889_fixup_mbp_vref
,
2471 .chain_id
= ALC885_FIXUP_MACPRO_GPIO
,
2473 [ALC882_FIXUP_INV_DMIC
] = {
2474 .type
= HDA_FIXUP_FUNC
,
2475 .v
.func
= alc_fixup_inv_dmic
,
2477 [ALC882_FIXUP_NO_PRIMARY_HP
] = {
2478 .type
= HDA_FIXUP_FUNC
,
2479 .v
.func
= alc882_fixup_no_primary_hp
,
2481 [ALC887_FIXUP_ASUS_BASS
] = {
2482 .type
= HDA_FIXUP_PINS
,
2483 .v
.pins
= (const struct hda_pintbl
[]) {
2484 {0x16, 0x99130130}, /* bass speaker */
2488 .chain_id
= ALC887_FIXUP_BASS_CHMAP
,
2490 [ALC887_FIXUP_BASS_CHMAP
] = {
2491 .type
= HDA_FIXUP_FUNC
,
2492 .v
.func
= alc_fixup_bass_chmap
,
2494 [ALC1220_FIXUP_GB_DUAL_CODECS
] = {
2495 .type
= HDA_FIXUP_FUNC
,
2496 .v
.func
= alc1220_fixup_gb_dual_codecs
,
2498 [ALC1220_FIXUP_GB_X570
] = {
2499 .type
= HDA_FIXUP_FUNC
,
2500 .v
.func
= alc1220_fixup_gb_x570
,
2502 [ALC1220_FIXUP_CLEVO_P950
] = {
2503 .type
= HDA_FIXUP_FUNC
,
2504 .v
.func
= alc1220_fixup_clevo_p950
,
2506 [ALC1220_FIXUP_CLEVO_PB51ED
] = {
2507 .type
= HDA_FIXUP_FUNC
,
2508 .v
.func
= alc1220_fixup_clevo_pb51ed
,
2510 [ALC1220_FIXUP_CLEVO_PB51ED_PINS
] = {
2511 .type
= HDA_FIXUP_PINS
,
2512 .v
.pins
= (const struct hda_pintbl
[]) {
2513 { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */
2517 .chain_id
= ALC1220_FIXUP_CLEVO_PB51ED
,
2519 [ALC887_FIXUP_ASUS_AUDIO
] = {
2520 .type
= HDA_FIXUP_PINS
,
2521 .v
.pins
= (const struct hda_pintbl
[]) {
2522 { 0x15, 0x02a14150 }, /* use as headset mic, without its own jack detect */
2523 { 0x19, 0x22219420 },
2527 [ALC887_FIXUP_ASUS_HMIC
] = {
2528 .type
= HDA_FIXUP_FUNC
,
2529 .v
.func
= alc887_fixup_asus_jack
,
2531 .chain_id
= ALC887_FIXUP_ASUS_AUDIO
,
2533 [ALCS1200A_FIXUP_MIC_VREF
] = {
2534 .type
= HDA_FIXUP_PINCTLS
,
2535 .v
.pins
= (const struct hda_pintbl
[]) {
2536 { 0x18, PIN_VREF50
}, /* rear mic */
2537 { 0x19, PIN_VREF50
}, /* front mic */
2543 static const struct snd_pci_quirk alc882_fixup_tbl
[] = {
2544 SND_PCI_QUIRK(0x1025, 0x006c, "Acer Aspire 9810", ALC883_FIXUP_ACER_EAPD
),
2545 SND_PCI_QUIRK(0x1025, 0x0090, "Acer Aspire", ALC883_FIXUP_ACER_EAPD
),
2546 SND_PCI_QUIRK(0x1025, 0x0107, "Acer Aspire", ALC883_FIXUP_ACER_EAPD
),
2547 SND_PCI_QUIRK(0x1025, 0x010a, "Acer Ferrari 5000", ALC883_FIXUP_ACER_EAPD
),
2548 SND_PCI_QUIRK(0x1025, 0x0110, "Acer Aspire", ALC883_FIXUP_ACER_EAPD
),
2549 SND_PCI_QUIRK(0x1025, 0x0112, "Acer Aspire 9303", ALC883_FIXUP_ACER_EAPD
),
2550 SND_PCI_QUIRK(0x1025, 0x0121, "Acer Aspire 5920G", ALC883_FIXUP_ACER_EAPD
),
2551 SND_PCI_QUIRK(0x1025, 0x013e, "Acer Aspire 4930G",
2552 ALC882_FIXUP_ACER_ASPIRE_4930G
),
2553 SND_PCI_QUIRK(0x1025, 0x013f, "Acer Aspire 5930G",
2554 ALC882_FIXUP_ACER_ASPIRE_4930G
),
2555 SND_PCI_QUIRK(0x1025, 0x0145, "Acer Aspire 8930G",
2556 ALC882_FIXUP_ACER_ASPIRE_8930G
),
2557 SND_PCI_QUIRK(0x1025, 0x0146, "Acer Aspire 6935G",
2558 ALC882_FIXUP_ACER_ASPIRE_8930G
),
2559 SND_PCI_QUIRK(0x1025, 0x0142, "Acer Aspire 7730G",
2560 ALC882_FIXUP_ACER_ASPIRE_4930G
),
2561 SND_PCI_QUIRK(0x1025, 0x0155, "Packard-Bell M5120", ALC882_FIXUP_PB_M5210
),
2562 SND_PCI_QUIRK(0x1025, 0x015e, "Acer Aspire 6930G",
2563 ALC882_FIXUP_ACER_ASPIRE_4930G
),
2564 SND_PCI_QUIRK(0x1025, 0x0166, "Acer Aspire 6530G",
2565 ALC882_FIXUP_ACER_ASPIRE_4930G
),
2566 SND_PCI_QUIRK(0x1025, 0x021e, "Acer Aspire 5739G",
2567 ALC882_FIXUP_ACER_ASPIRE_4930G
),
2568 SND_PCI_QUIRK(0x1025, 0x0259, "Acer Aspire 5935", ALC889_FIXUP_DAC_ROUTE
),
2569 SND_PCI_QUIRK(0x1025, 0x026b, "Acer Aspire 8940G", ALC882_FIXUP_ACER_ASPIRE_8930G
),
2570 SND_PCI_QUIRK(0x1025, 0x0296, "Acer Aspire 7736z", ALC882_FIXUP_ACER_ASPIRE_7736
),
2571 SND_PCI_QUIRK(0x1043, 0x13c2, "Asus A7M", ALC882_FIXUP_EAPD
),
2572 SND_PCI_QUIRK(0x1043, 0x1873, "ASUS W90V", ALC882_FIXUP_ASUS_W90V
),
2573 SND_PCI_QUIRK(0x1043, 0x1971, "Asus W2JC", ALC882_FIXUP_ASUS_W2JC
),
2574 SND_PCI_QUIRK(0x1043, 0x2390, "Asus D700SA", ALC887_FIXUP_ASUS_HMIC
),
2575 SND_PCI_QUIRK(0x1043, 0x835f, "Asus Eee 1601", ALC888_FIXUP_EEE1601
),
2576 SND_PCI_QUIRK(0x1043, 0x84bc, "ASUS ET2700", ALC887_FIXUP_ASUS_BASS
),
2577 SND_PCI_QUIRK(0x1043, 0x8691, "ASUS ROG Ranger VIII", ALC882_FIXUP_GPIO3
),
2578 SND_PCI_QUIRK(0x1043, 0x8797, "ASUS TUF B550M-PLUS", ALCS1200A_FIXUP_MIC_VREF
),
2579 SND_PCI_QUIRK(0x104d, 0x9043, "Sony Vaio VGC-LN51JGB", ALC882_FIXUP_NO_PRIMARY_HP
),
2580 SND_PCI_QUIRK(0x104d, 0x9044, "Sony VAIO AiO", ALC882_FIXUP_NO_PRIMARY_HP
),
2581 SND_PCI_QUIRK(0x104d, 0x9047, "Sony Vaio TT", ALC889_FIXUP_VAIO_TT
),
2582 SND_PCI_QUIRK(0x104d, 0x905a, "Sony Vaio Z", ALC882_FIXUP_NO_PRIMARY_HP
),
2583 SND_PCI_QUIRK(0x104d, 0x9060, "Sony Vaio VPCL14M1R", ALC882_FIXUP_NO_PRIMARY_HP
),
2585 /* All Apple entries are in codec SSIDs */
2586 SND_PCI_QUIRK(0x106b, 0x00a0, "MacBookPro 3,1", ALC889_FIXUP_MBP_VREF
),
2587 SND_PCI_QUIRK(0x106b, 0x00a1, "Macbook", ALC889_FIXUP_MBP_VREF
),
2588 SND_PCI_QUIRK(0x106b, 0x00a4, "MacbookPro 4,1", ALC889_FIXUP_MBP_VREF
),
2589 SND_PCI_QUIRK(0x106b, 0x0c00, "Mac Pro", ALC889_FIXUP_MP11_VREF
),
2590 SND_PCI_QUIRK(0x106b, 0x1000, "iMac 24", ALC885_FIXUP_MACPRO_GPIO
),
2591 SND_PCI_QUIRK(0x106b, 0x2800, "AppleTV", ALC885_FIXUP_MACPRO_GPIO
),
2592 SND_PCI_QUIRK(0x106b, 0x2c00, "MacbookPro rev3", ALC889_FIXUP_MBP_VREF
),
2593 SND_PCI_QUIRK(0x106b, 0x3000, "iMac", ALC889_FIXUP_MBP_VREF
),
2594 SND_PCI_QUIRK(0x106b, 0x3200, "iMac 7,1 Aluminum", ALC882_FIXUP_EAPD
),
2595 SND_PCI_QUIRK(0x106b, 0x3400, "MacBookAir 1,1", ALC889_FIXUP_MBA11_VREF
),
2596 SND_PCI_QUIRK(0x106b, 0x3500, "MacBookAir 2,1", ALC889_FIXUP_MBA21_VREF
),
2597 SND_PCI_QUIRK(0x106b, 0x3600, "Macbook 3,1", ALC889_FIXUP_MBP_VREF
),
2598 SND_PCI_QUIRK(0x106b, 0x3800, "MacbookPro 4,1", ALC889_FIXUP_MBP_VREF
),
2599 SND_PCI_QUIRK(0x106b, 0x3e00, "iMac 24 Aluminum", ALC885_FIXUP_MACPRO_GPIO
),
2600 SND_PCI_QUIRK(0x106b, 0x3f00, "Macbook 5,1", ALC889_FIXUP_IMAC91_VREF
),
2601 SND_PCI_QUIRK(0x106b, 0x4000, "MacbookPro 5,1", ALC889_FIXUP_IMAC91_VREF
),
2602 SND_PCI_QUIRK(0x106b, 0x4100, "Macmini 3,1", ALC889_FIXUP_IMAC91_VREF
),
2603 SND_PCI_QUIRK(0x106b, 0x4200, "Mac Pro 4,1/5,1", ALC889_FIXUP_MP41_VREF
),
2604 SND_PCI_QUIRK(0x106b, 0x4300, "iMac 9,1", ALC889_FIXUP_IMAC91_VREF
),
2605 SND_PCI_QUIRK(0x106b, 0x4600, "MacbookPro 5,2", ALC889_FIXUP_IMAC91_VREF
),
2606 SND_PCI_QUIRK(0x106b, 0x4900, "iMac 9,1 Aluminum", ALC889_FIXUP_IMAC91_VREF
),
2607 SND_PCI_QUIRK(0x106b, 0x4a00, "Macbook 5,2", ALC889_FIXUP_MBA11_VREF
),
2609 SND_PCI_QUIRK(0x1071, 0x8258, "Evesham Voyaeger", ALC882_FIXUP_EAPD
),
2610 SND_PCI_QUIRK(0x13fe, 0x1009, "Advantech MIT-W101", ALC886_FIXUP_EAPD
),
2611 SND_PCI_QUIRK(0x1458, 0xa002, "Gigabyte EP45-DS3/Z87X-UD3H", ALC889_FIXUP_FRONT_HP_NO_PRESENCE
),
2612 SND_PCI_QUIRK(0x1458, 0xa0b8, "Gigabyte AZ370-Gaming", ALC1220_FIXUP_GB_DUAL_CODECS
),
2613 SND_PCI_QUIRK(0x1458, 0xa0cd, "Gigabyte X570 Aorus Master", ALC1220_FIXUP_GB_X570
),
2614 SND_PCI_QUIRK(0x1458, 0xa0ce, "Gigabyte X570 Aorus Xtreme", ALC1220_FIXUP_GB_X570
),
2615 SND_PCI_QUIRK(0x1458, 0xa0d5, "Gigabyte X570S Aorus Master", ALC1220_FIXUP_GB_X570
),
2616 SND_PCI_QUIRK(0x1462, 0x11f7, "MSI-GE63", ALC1220_FIXUP_CLEVO_P950
),
2617 SND_PCI_QUIRK(0x1462, 0x1228, "MSI-GP63", ALC1220_FIXUP_CLEVO_P950
),
2618 SND_PCI_QUIRK(0x1462, 0x1229, "MSI-GP73", ALC1220_FIXUP_CLEVO_P950
),
2619 SND_PCI_QUIRK(0x1462, 0x1275, "MSI-GL63", ALC1220_FIXUP_CLEVO_P950
),
2620 SND_PCI_QUIRK(0x1462, 0x1276, "MSI-GL73", ALC1220_FIXUP_CLEVO_P950
),
2621 SND_PCI_QUIRK(0x1462, 0x1293, "MSI-GP65", ALC1220_FIXUP_CLEVO_P950
),
2622 SND_PCI_QUIRK(0x1462, 0x7350, "MSI-7350", ALC889_FIXUP_CD
),
2623 SND_PCI_QUIRK(0x1462, 0xcc34, "MSI Godlike X570", ALC1220_FIXUP_GB_DUAL_CODECS
),
2624 SND_PCI_QUIRK(0x1462, 0xda57, "MSI Z270-Gaming", ALC1220_FIXUP_GB_DUAL_CODECS
),
2625 SND_PCI_QUIRK_VENDOR(0x1462, "MSI", ALC882_FIXUP_GPIO3
),
2626 SND_PCI_QUIRK(0x147b, 0x107a, "Abit AW9D-MAX", ALC882_FIXUP_ABIT_AW9D_MAX
),
2627 SND_PCI_QUIRK(0x1558, 0x50d3, "Clevo PC50[ER][CDF]", ALC1220_FIXUP_CLEVO_PB51ED_PINS
),
2628 SND_PCI_QUIRK(0x1558, 0x65d1, "Clevo PB51[ER][CDF]", ALC1220_FIXUP_CLEVO_PB51ED_PINS
),
2629 SND_PCI_QUIRK(0x1558, 0x65d2, "Clevo PB51R[CDF]", ALC1220_FIXUP_CLEVO_PB51ED_PINS
),
2630 SND_PCI_QUIRK(0x1558, 0x65e1, "Clevo PB51[ED][DF]", ALC1220_FIXUP_CLEVO_PB51ED_PINS
),
2631 SND_PCI_QUIRK(0x1558, 0x65e5, "Clevo PC50D[PRS](?:-D|-G)?", ALC1220_FIXUP_CLEVO_PB51ED_PINS
),
2632 SND_PCI_QUIRK(0x1558, 0x65f1, "Clevo PC50HS", ALC1220_FIXUP_CLEVO_PB51ED_PINS
),
2633 SND_PCI_QUIRK(0x1558, 0x65f5, "Clevo PD50PN[NRT]", ALC1220_FIXUP_CLEVO_PB51ED_PINS
),
2634 SND_PCI_QUIRK(0x1558, 0x67d1, "Clevo PB71[ER][CDF]", ALC1220_FIXUP_CLEVO_PB51ED_PINS
),
2635 SND_PCI_QUIRK(0x1558, 0x67e1, "Clevo PB71[DE][CDF]", ALC1220_FIXUP_CLEVO_PB51ED_PINS
),
2636 SND_PCI_QUIRK(0x1558, 0x67e5, "Clevo PC70D[PRS](?:-D|-G)?", ALC1220_FIXUP_CLEVO_PB51ED_PINS
),
2637 SND_PCI_QUIRK(0x1558, 0x67f1, "Clevo PC70H[PRS]", ALC1220_FIXUP_CLEVO_PB51ED_PINS
),
2638 SND_PCI_QUIRK(0x1558, 0x67f5, "Clevo PD70PN[NRT]", ALC1220_FIXUP_CLEVO_PB51ED_PINS
),
2639 SND_PCI_QUIRK(0x1558, 0x70d1, "Clevo PC70[ER][CDF]", ALC1220_FIXUP_CLEVO_PB51ED_PINS
),
2640 SND_PCI_QUIRK(0x1558, 0x7714, "Clevo X170SM", ALC1220_FIXUP_CLEVO_PB51ED_PINS
),
2641 SND_PCI_QUIRK(0x1558, 0x7715, "Clevo X170KM-G", ALC1220_FIXUP_CLEVO_PB51ED
),
2642 SND_PCI_QUIRK(0x1558, 0x9501, "Clevo P950HR", ALC1220_FIXUP_CLEVO_P950
),
2643 SND_PCI_QUIRK(0x1558, 0x9506, "Clevo P955HQ", ALC1220_FIXUP_CLEVO_P950
),
2644 SND_PCI_QUIRK(0x1558, 0x950a, "Clevo P955H[PR]", ALC1220_FIXUP_CLEVO_P950
),
2645 SND_PCI_QUIRK(0x1558, 0x95e1, "Clevo P95xER", ALC1220_FIXUP_CLEVO_P950
),
2646 SND_PCI_QUIRK(0x1558, 0x95e2, "Clevo P950ER", ALC1220_FIXUP_CLEVO_P950
),
2647 SND_PCI_QUIRK(0x1558, 0x95e3, "Clevo P955[ER]T", ALC1220_FIXUP_CLEVO_P950
),
2648 SND_PCI_QUIRK(0x1558, 0x95e4, "Clevo P955ER", ALC1220_FIXUP_CLEVO_P950
),
2649 SND_PCI_QUIRK(0x1558, 0x95e5, "Clevo P955EE6", ALC1220_FIXUP_CLEVO_P950
),
2650 SND_PCI_QUIRK(0x1558, 0x95e6, "Clevo P950R[CDF]", ALC1220_FIXUP_CLEVO_P950
),
2651 SND_PCI_QUIRK(0x1558, 0x96e1, "Clevo P960[ER][CDFN]-K", ALC1220_FIXUP_CLEVO_P950
),
2652 SND_PCI_QUIRK(0x1558, 0x97e1, "Clevo P970[ER][CDFN]", ALC1220_FIXUP_CLEVO_P950
),
2653 SND_PCI_QUIRK(0x1558, 0x97e2, "Clevo P970RC-M", ALC1220_FIXUP_CLEVO_P950
),
2654 SND_PCI_QUIRK_VENDOR(0x1558, "Clevo laptop", ALC882_FIXUP_EAPD
),
2655 SND_PCI_QUIRK(0x161f, 0x2054, "Medion laptop", ALC883_FIXUP_EAPD
),
2656 SND_PCI_QUIRK(0x17aa, 0x3a0d, "Lenovo Y530", ALC882_FIXUP_LENOVO_Y530
),
2657 SND_PCI_QUIRK(0x8086, 0x0022, "DX58SO", ALC889_FIXUP_COEF
),
2661 static const struct hda_model_fixup alc882_fixup_models
[] = {
2662 {.id
= ALC882_FIXUP_ABIT_AW9D_MAX
, .name
= "abit-aw9d"},
2663 {.id
= ALC882_FIXUP_LENOVO_Y530
, .name
= "lenovo-y530"},
2664 {.id
= ALC882_FIXUP_ACER_ASPIRE_7736
, .name
= "acer-aspire-7736"},
2665 {.id
= ALC882_FIXUP_ASUS_W90V
, .name
= "asus-w90v"},
2666 {.id
= ALC889_FIXUP_CD
, .name
= "cd"},
2667 {.id
= ALC889_FIXUP_FRONT_HP_NO_PRESENCE
, .name
= "no-front-hp"},
2668 {.id
= ALC889_FIXUP_VAIO_TT
, .name
= "vaio-tt"},
2669 {.id
= ALC888_FIXUP_EEE1601
, .name
= "eee1601"},
2670 {.id
= ALC882_FIXUP_EAPD
, .name
= "alc882-eapd"},
2671 {.id
= ALC883_FIXUP_EAPD
, .name
= "alc883-eapd"},
2672 {.id
= ALC882_FIXUP_GPIO1
, .name
= "gpio1"},
2673 {.id
= ALC882_FIXUP_GPIO2
, .name
= "gpio2"},
2674 {.id
= ALC882_FIXUP_GPIO3
, .name
= "gpio3"},
2675 {.id
= ALC889_FIXUP_COEF
, .name
= "alc889-coef"},
2676 {.id
= ALC882_FIXUP_ASUS_W2JC
, .name
= "asus-w2jc"},
2677 {.id
= ALC882_FIXUP_ACER_ASPIRE_4930G
, .name
= "acer-aspire-4930g"},
2678 {.id
= ALC882_FIXUP_ACER_ASPIRE_8930G
, .name
= "acer-aspire-8930g"},
2679 {.id
= ALC883_FIXUP_ACER_EAPD
, .name
= "acer-aspire"},
2680 {.id
= ALC885_FIXUP_MACPRO_GPIO
, .name
= "macpro-gpio"},
2681 {.id
= ALC889_FIXUP_DAC_ROUTE
, .name
= "dac-route"},
2682 {.id
= ALC889_FIXUP_MBP_VREF
, .name
= "mbp-vref"},
2683 {.id
= ALC889_FIXUP_IMAC91_VREF
, .name
= "imac91-vref"},
2684 {.id
= ALC889_FIXUP_MBA11_VREF
, .name
= "mba11-vref"},
2685 {.id
= ALC889_FIXUP_MBA21_VREF
, .name
= "mba21-vref"},
2686 {.id
= ALC889_FIXUP_MP11_VREF
, .name
= "mp11-vref"},
2687 {.id
= ALC889_FIXUP_MP41_VREF
, .name
= "mp41-vref"},
2688 {.id
= ALC882_FIXUP_INV_DMIC
, .name
= "inv-dmic"},
2689 {.id
= ALC882_FIXUP_NO_PRIMARY_HP
, .name
= "no-primary-hp"},
2690 {.id
= ALC887_FIXUP_ASUS_BASS
, .name
= "asus-bass"},
2691 {.id
= ALC1220_FIXUP_GB_DUAL_CODECS
, .name
= "dual-codecs"},
2692 {.id
= ALC1220_FIXUP_GB_X570
, .name
= "gb-x570"},
2693 {.id
= ALC1220_FIXUP_CLEVO_P950
, .name
= "clevo-p950"},
2697 static const struct snd_hda_pin_quirk alc882_pin_fixup_tbl
[] = {
2698 SND_HDA_PIN_QUIRK(0x10ec1220, 0x1043, "ASUS", ALC1220_FIXUP_CLEVO_P950
,
2706 {0x1e, 0x01456130}),
2707 SND_HDA_PIN_QUIRK(0x10ec1220, 0x1462, "MS-7C35", ALC1220_FIXUP_CLEVO_P950
,
2715 {0x1e, 0x01451130}),
2720 * BIOS auto configuration
2722 /* almost identical with ALC880 parser... */
2723 static int alc882_parse_auto_config(struct hda_codec
*codec
)
2725 static const hda_nid_t alc882_ignore
[] = { 0x1d, 0 };
2726 static const hda_nid_t alc882_ssids
[] = { 0x15, 0x1b, 0x14, 0 };
2727 return alc_parse_auto_config(codec
, alc882_ignore
, alc882_ssids
);
2732 static int patch_alc882(struct hda_codec
*codec
)
2734 struct alc_spec
*spec
;
2737 err
= alc_alloc_spec(codec
, 0x0b);
2743 switch (codec
->core
.vendor_id
) {
2751 /* ALC883 and variants */
2752 alc_fix_pll_init(codec
, 0x20, 0x0a, 10);
2756 alc_pre_init(codec
);
2758 snd_hda_pick_fixup(codec
, alc882_fixup_models
, alc882_fixup_tbl
,
2760 snd_hda_pick_pin_fixup(codec
, alc882_pin_fixup_tbl
, alc882_fixups
, true);
2761 snd_hda_apply_fixup(codec
, HDA_FIXUP_ACT_PRE_PROBE
);
2763 alc_auto_parse_customize_define(codec
);
2765 if (has_cdefine_beep(codec
))
2766 spec
->gen
.beep_nid
= 0x01;
2768 /* automatic parse from the BIOS config */
2769 err
= alc882_parse_auto_config(codec
);
2773 if (!spec
->gen
.no_analog
&& spec
->gen
.beep_nid
) {
2774 err
= set_beep_amp(spec
, 0x0b, 0x05, HDA_INPUT
);
2779 snd_hda_apply_fixup(codec
, HDA_FIXUP_ACT_PROBE
);
2792 static int alc262_parse_auto_config(struct hda_codec
*codec
)
2794 static const hda_nid_t alc262_ignore
[] = { 0x1d, 0 };
2795 static const hda_nid_t alc262_ssids
[] = { 0x15, 0x1b, 0x14, 0 };
2796 return alc_parse_auto_config(codec
, alc262_ignore
, alc262_ssids
);
2803 ALC262_FIXUP_FSC_H270
,
2804 ALC262_FIXUP_FSC_S7110
,
2805 ALC262_FIXUP_HP_Z200
,
2807 ALC262_FIXUP_LENOVO_3000
,
2809 ALC262_FIXUP_BENQ_T31
,
2810 ALC262_FIXUP_INV_DMIC
,
2811 ALC262_FIXUP_INTEL_BAYLEYBAY
,
2814 static const struct hda_fixup alc262_fixups
[] = {
2815 [ALC262_FIXUP_FSC_H270
] = {
2816 .type
= HDA_FIXUP_PINS
,
2817 .v
.pins
= (const struct hda_pintbl
[]) {
2818 { 0x14, 0x99130110 }, /* speaker */
2819 { 0x15, 0x0221142f }, /* front HP */
2820 { 0x1b, 0x0121141f }, /* rear HP */
2824 [ALC262_FIXUP_FSC_S7110
] = {
2825 .type
= HDA_FIXUP_PINS
,
2826 .v
.pins
= (const struct hda_pintbl
[]) {
2827 { 0x15, 0x90170110 }, /* speaker */
2831 .chain_id
= ALC262_FIXUP_BENQ
,
2833 [ALC262_FIXUP_HP_Z200
] = {
2834 .type
= HDA_FIXUP_PINS
,
2835 .v
.pins
= (const struct hda_pintbl
[]) {
2836 { 0x16, 0x99130120 }, /* internal speaker */
2840 [ALC262_FIXUP_TYAN
] = {
2841 .type
= HDA_FIXUP_PINS
,
2842 .v
.pins
= (const struct hda_pintbl
[]) {
2843 { 0x14, 0x1993e1f0 }, /* int AUX */
2847 [ALC262_FIXUP_LENOVO_3000
] = {
2848 .type
= HDA_FIXUP_PINCTLS
,
2849 .v
.pins
= (const struct hda_pintbl
[]) {
2850 { 0x19, PIN_VREF50
},
2854 .chain_id
= ALC262_FIXUP_BENQ
,
2856 [ALC262_FIXUP_BENQ
] = {
2857 .type
= HDA_FIXUP_VERBS
,
2858 .v
.verbs
= (const struct hda_verb
[]) {
2859 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x07 },
2860 { 0x20, AC_VERB_SET_PROC_COEF
, 0x3070 },
2864 [ALC262_FIXUP_BENQ_T31
] = {
2865 .type
= HDA_FIXUP_VERBS
,
2866 .v
.verbs
= (const struct hda_verb
[]) {
2867 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x07 },
2868 { 0x20, AC_VERB_SET_PROC_COEF
, 0x3050 },
2872 [ALC262_FIXUP_INV_DMIC
] = {
2873 .type
= HDA_FIXUP_FUNC
,
2874 .v
.func
= alc_fixup_inv_dmic
,
2876 [ALC262_FIXUP_INTEL_BAYLEYBAY
] = {
2877 .type
= HDA_FIXUP_FUNC
,
2878 .v
.func
= alc_fixup_no_depop_delay
,
2882 static const struct snd_pci_quirk alc262_fixup_tbl
[] = {
2883 SND_PCI_QUIRK(0x103c, 0x170b, "HP Z200", ALC262_FIXUP_HP_Z200
),
2884 SND_PCI_QUIRK(0x10cf, 0x1397, "Fujitsu Lifebook S7110", ALC262_FIXUP_FSC_S7110
),
2885 SND_PCI_QUIRK(0x10cf, 0x142d, "Fujitsu Lifebook E8410", ALC262_FIXUP_BENQ
),
2886 SND_PCI_QUIRK(0x10f1, 0x2915, "Tyan Thunder n6650W", ALC262_FIXUP_TYAN
),
2887 SND_PCI_QUIRK(0x1734, 0x1141, "FSC ESPRIMO U9210", ALC262_FIXUP_FSC_H270
),
2888 SND_PCI_QUIRK(0x1734, 0x1147, "FSC Celsius H270", ALC262_FIXUP_FSC_H270
),
2889 SND_PCI_QUIRK(0x17aa, 0x384e, "Lenovo 3000", ALC262_FIXUP_LENOVO_3000
),
2890 SND_PCI_QUIRK(0x17ff, 0x0560, "Benq ED8", ALC262_FIXUP_BENQ
),
2891 SND_PCI_QUIRK(0x17ff, 0x058d, "Benq T31-16", ALC262_FIXUP_BENQ_T31
),
2892 SND_PCI_QUIRK(0x8086, 0x7270, "BayleyBay", ALC262_FIXUP_INTEL_BAYLEYBAY
),
2896 static const struct hda_model_fixup alc262_fixup_models
[] = {
2897 {.id
= ALC262_FIXUP_INV_DMIC
, .name
= "inv-dmic"},
2898 {.id
= ALC262_FIXUP_FSC_H270
, .name
= "fsc-h270"},
2899 {.id
= ALC262_FIXUP_FSC_S7110
, .name
= "fsc-s7110"},
2900 {.id
= ALC262_FIXUP_HP_Z200
, .name
= "hp-z200"},
2901 {.id
= ALC262_FIXUP_TYAN
, .name
= "tyan"},
2902 {.id
= ALC262_FIXUP_LENOVO_3000
, .name
= "lenovo-3000"},
2903 {.id
= ALC262_FIXUP_BENQ
, .name
= "benq"},
2904 {.id
= ALC262_FIXUP_BENQ_T31
, .name
= "benq-t31"},
2905 {.id
= ALC262_FIXUP_INTEL_BAYLEYBAY
, .name
= "bayleybay"},
2911 static int patch_alc262(struct hda_codec
*codec
)
2913 struct alc_spec
*spec
;
2916 err
= alc_alloc_spec(codec
, 0x0b);
2921 spec
->gen
.shared_mic_vref_pin
= 0x18;
2923 spec
->shutup
= alc_eapd_shutup
;
2926 /* pshou 07/11/05 set a zero PCM sample to DAC when FIFO is
2929 alc_update_coefex_idx(codec
, 0x1a, 7, 0, 0x80);
2931 alc_fix_pll_init(codec
, 0x20, 0x0a, 10);
2933 alc_pre_init(codec
);
2935 snd_hda_pick_fixup(codec
, alc262_fixup_models
, alc262_fixup_tbl
,
2937 snd_hda_apply_fixup(codec
, HDA_FIXUP_ACT_PRE_PROBE
);
2939 alc_auto_parse_customize_define(codec
);
2941 if (has_cdefine_beep(codec
))
2942 spec
->gen
.beep_nid
= 0x01;
2944 /* automatic parse from the BIOS config */
2945 err
= alc262_parse_auto_config(codec
);
2949 if (!spec
->gen
.no_analog
&& spec
->gen
.beep_nid
) {
2950 err
= set_beep_amp(spec
, 0x0b, 0x05, HDA_INPUT
);
2955 snd_hda_apply_fixup(codec
, HDA_FIXUP_ACT_PROBE
);
2967 /* bind Beep switches of both NID 0x0f and 0x10 */
2968 static int alc268_beep_switch_put(struct snd_kcontrol
*kcontrol
,
2969 struct snd_ctl_elem_value
*ucontrol
)
2971 struct hda_codec
*codec
= snd_kcontrol_chip(kcontrol
);
2975 mutex_lock(&codec
->control_mutex
);
2976 pval
= kcontrol
->private_value
;
2977 kcontrol
->private_value
= (pval
& ~0xff) | 0x0f;
2978 err
= snd_hda_mixer_amp_switch_put(kcontrol
, ucontrol
);
2980 kcontrol
->private_value
= (pval
& ~0xff) | 0x10;
2981 err
= snd_hda_mixer_amp_switch_put(kcontrol
, ucontrol
);
2983 kcontrol
->private_value
= pval
;
2984 mutex_unlock(&codec
->control_mutex
);
2988 static const struct snd_kcontrol_new alc268_beep_mixer
[] = {
2989 HDA_CODEC_VOLUME("Beep Playback Volume", 0x1d, 0x0, HDA_INPUT
),
2991 .iface
= SNDRV_CTL_ELEM_IFACE_MIXER
,
2992 .name
= "Beep Playback Switch",
2993 .subdevice
= HDA_SUBDEV_AMP_FLAG
,
2994 .info
= snd_hda_mixer_amp_switch_info
,
2995 .get
= snd_hda_mixer_amp_switch_get
,
2996 .put
= alc268_beep_switch_put
,
2997 .private_value
= HDA_COMPOSE_AMP_VAL(0x0f, 3, 1, HDA_INPUT
)
3001 /* set PCBEEP vol = 0, mute connections */
3002 static const struct hda_verb alc268_beep_init_verbs
[] = {
3003 {0x1d, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_IN_UNMUTE(0)},
3004 {0x0f, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_IN_MUTE(1)},
3005 {0x10, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_IN_MUTE(1)},
3010 ALC268_FIXUP_INV_DMIC
,
3011 ALC268_FIXUP_HP_EAPD
,
3015 static const struct hda_fixup alc268_fixups
[] = {
3016 [ALC268_FIXUP_INV_DMIC
] = {
3017 .type
= HDA_FIXUP_FUNC
,
3018 .v
.func
= alc_fixup_inv_dmic
,
3020 [ALC268_FIXUP_HP_EAPD
] = {
3021 .type
= HDA_FIXUP_VERBS
,
3022 .v
.verbs
= (const struct hda_verb
[]) {
3023 {0x15, AC_VERB_SET_EAPD_BTLENABLE
, 0},
3027 [ALC268_FIXUP_SPDIF
] = {
3028 .type
= HDA_FIXUP_PINS
,
3029 .v
.pins
= (const struct hda_pintbl
[]) {
3030 { 0x1e, 0x014b1180 }, /* enable SPDIF out */
3036 static const struct hda_model_fixup alc268_fixup_models
[] = {
3037 {.id
= ALC268_FIXUP_INV_DMIC
, .name
= "inv-dmic"},
3038 {.id
= ALC268_FIXUP_HP_EAPD
, .name
= "hp-eapd"},
3039 {.id
= ALC268_FIXUP_SPDIF
, .name
= "spdif"},
3043 static const struct snd_pci_quirk alc268_fixup_tbl
[] = {
3044 SND_PCI_QUIRK(0x1025, 0x0139, "Acer TravelMate 6293", ALC268_FIXUP_SPDIF
),
3045 SND_PCI_QUIRK(0x1025, 0x015b, "Acer AOA 150 (ZG5)", ALC268_FIXUP_INV_DMIC
),
3046 /* below is codec SSID since multiple Toshiba laptops have the
3047 * same PCI SSID 1179:ff00
3049 SND_PCI_QUIRK(0x1179, 0xff06, "Toshiba P200", ALC268_FIXUP_HP_EAPD
),
3054 * BIOS auto configuration
3056 static int alc268_parse_auto_config(struct hda_codec
*codec
)
3058 static const hda_nid_t alc268_ssids
[] = { 0x15, 0x1b, 0x14, 0 };
3059 return alc_parse_auto_config(codec
, NULL
, alc268_ssids
);
3064 static int patch_alc268(struct hda_codec
*codec
)
3066 struct alc_spec
*spec
;
3069 /* ALC268 has no aa-loopback mixer */
3070 err
= alc_alloc_spec(codec
, 0);
3075 if (has_cdefine_beep(codec
))
3076 spec
->gen
.beep_nid
= 0x01;
3078 spec
->shutup
= alc_eapd_shutup
;
3080 alc_pre_init(codec
);
3082 snd_hda_pick_fixup(codec
, alc268_fixup_models
, alc268_fixup_tbl
, alc268_fixups
);
3083 snd_hda_apply_fixup(codec
, HDA_FIXUP_ACT_PRE_PROBE
);
3085 /* automatic parse from the BIOS config */
3086 err
= alc268_parse_auto_config(codec
);
3090 if (err
> 0 && !spec
->gen
.no_analog
&&
3091 spec
->gen
.autocfg
.speaker_pins
[0] != 0x1d) {
3092 for (i
= 0; i
< ARRAY_SIZE(alc268_beep_mixer
); i
++) {
3093 if (!snd_hda_gen_add_kctl(&spec
->gen
, NULL
,
3094 &alc268_beep_mixer
[i
])) {
3099 snd_hda_add_verbs(codec
, alc268_beep_init_verbs
);
3100 if (!query_amp_caps(codec
, 0x1d, HDA_INPUT
))
3101 /* override the amp caps for beep generator */
3102 snd_hda_override_amp_caps(codec
, 0x1d, HDA_INPUT
,
3103 (0x0c << AC_AMPCAP_OFFSET_SHIFT
) |
3104 (0x0c << AC_AMPCAP_NUM_STEPS_SHIFT
) |
3105 (0x07 << AC_AMPCAP_STEP_SIZE_SHIFT
) |
3106 (0 << AC_AMPCAP_MUTE_SHIFT
));
3109 snd_hda_apply_fixup(codec
, HDA_FIXUP_ACT_PROBE
);
3122 static const struct hda_pcm_stream alc269_44k_pcm_analog_playback
= {
3123 .rates
= SNDRV_PCM_RATE_44100
, /* fixed rate */
3126 static const struct hda_pcm_stream alc269_44k_pcm_analog_capture
= {
3127 .rates
= SNDRV_PCM_RATE_44100
, /* fixed rate */
3130 /* different alc269-variants */
3132 ALC269_TYPE_ALC269VA
,
3133 ALC269_TYPE_ALC269VB
,
3134 ALC269_TYPE_ALC269VC
,
3135 ALC269_TYPE_ALC269VD
,
3157 * BIOS auto configuration
3159 static int alc269_parse_auto_config(struct hda_codec
*codec
)
3161 static const hda_nid_t alc269_ignore
[] = { 0x1d, 0 };
3162 static const hda_nid_t alc269_ssids
[] = { 0, 0x1b, 0x14, 0x21 };
3163 static const hda_nid_t alc269va_ssids
[] = { 0x15, 0x1b, 0x14, 0 };
3164 struct alc_spec
*spec
= codec
->spec
;
3165 const hda_nid_t
*ssids
;
3167 switch (spec
->codec_variant
) {
3168 case ALC269_TYPE_ALC269VA
:
3169 case ALC269_TYPE_ALC269VC
:
3170 case ALC269_TYPE_ALC280
:
3171 case ALC269_TYPE_ALC284
:
3172 case ALC269_TYPE_ALC293
:
3173 ssids
= alc269va_ssids
;
3175 case ALC269_TYPE_ALC269VB
:
3176 case ALC269_TYPE_ALC269VD
:
3177 case ALC269_TYPE_ALC282
:
3178 case ALC269_TYPE_ALC283
:
3179 case ALC269_TYPE_ALC286
:
3180 case ALC269_TYPE_ALC298
:
3181 case ALC269_TYPE_ALC255
:
3182 case ALC269_TYPE_ALC256
:
3183 case ALC269_TYPE_ALC257
:
3184 case ALC269_TYPE_ALC215
:
3185 case ALC269_TYPE_ALC225
:
3186 case ALC269_TYPE_ALC245
:
3187 case ALC269_TYPE_ALC287
:
3188 case ALC269_TYPE_ALC294
:
3189 case ALC269_TYPE_ALC300
:
3190 case ALC269_TYPE_ALC623
:
3191 case ALC269_TYPE_ALC700
:
3192 ssids
= alc269_ssids
;
3195 ssids
= alc269_ssids
;
3199 return alc_parse_auto_config(codec
, alc269_ignore
, ssids
);
3202 static const struct hda_jack_keymap alc_headset_btn_keymap
[] = {
3203 { SND_JACK_BTN_0
, KEY_PLAYPAUSE
},
3204 { SND_JACK_BTN_1
, KEY_VOICECOMMAND
},
3205 { SND_JACK_BTN_2
, KEY_VOLUMEUP
},
3206 { SND_JACK_BTN_3
, KEY_VOLUMEDOWN
},
3210 static void alc_headset_btn_callback(struct hda_codec
*codec
,
3211 struct hda_jack_callback
*jack
)
3215 if (jack
->unsol_res
& (7 << 13))
3216 report
|= SND_JACK_BTN_0
;
3218 if (jack
->unsol_res
& (1 << 16 | 3 << 8))
3219 report
|= SND_JACK_BTN_1
;
3222 if (jack
->unsol_res
& (7 << 23))
3223 report
|= SND_JACK_BTN_2
;
3225 /* Volume down key */
3226 if (jack
->unsol_res
& (7 << 10))
3227 report
|= SND_JACK_BTN_3
;
3229 snd_hda_jack_set_button_state(codec
, jack
->nid
, report
);
3232 static void alc_disable_headset_jack_key(struct hda_codec
*codec
)
3234 struct alc_spec
*spec
= codec
->spec
;
3236 if (!spec
->has_hs_key
)
3239 switch (codec
->core
.vendor_id
) {
3247 alc_write_coef_idx(codec
, 0x48, 0x0);
3248 alc_update_coef_idx(codec
, 0x49, 0x0045, 0x0);
3249 alc_update_coef_idx(codec
, 0x44, 0x0045 << 8, 0x0);
3255 alc_write_coef_idx(codec
, 0x48, 0x0);
3256 alc_update_coef_idx(codec
, 0x49, 0x0045, 0x0);
3261 static void alc_enable_headset_jack_key(struct hda_codec
*codec
)
3263 struct alc_spec
*spec
= codec
->spec
;
3265 if (!spec
->has_hs_key
)
3268 switch (codec
->core
.vendor_id
) {
3276 alc_write_coef_idx(codec
, 0x48, 0xd011);
3277 alc_update_coef_idx(codec
, 0x49, 0x007f, 0x0045);
3278 alc_update_coef_idx(codec
, 0x44, 0x007f << 8, 0x0045 << 8);
3284 alc_write_coef_idx(codec
, 0x48, 0xd011);
3285 alc_update_coef_idx(codec
, 0x49, 0x007f, 0x0045);
3290 static void alc_fixup_headset_jack(struct hda_codec
*codec
,
3291 const struct hda_fixup
*fix
, int action
)
3293 struct alc_spec
*spec
= codec
->spec
;
3297 case HDA_FIXUP_ACT_PRE_PROBE
:
3298 spec
->has_hs_key
= 1;
3299 snd_hda_jack_detect_enable_callback(codec
, 0x55,
3300 alc_headset_btn_callback
);
3302 case HDA_FIXUP_ACT_BUILD
:
3303 hp_pin
= alc_get_hp_pin(spec
);
3304 if (!hp_pin
|| snd_hda_jack_bind_keymap(codec
, 0x55,
3305 alc_headset_btn_keymap
,
3307 snd_hda_jack_add_kctl(codec
, 0x55, "Headset Jack",
3308 false, SND_JACK_HEADSET
,
3309 alc_headset_btn_keymap
);
3311 alc_enable_headset_jack_key(codec
);
3316 static void alc269vb_toggle_power_output(struct hda_codec
*codec
, int power_up
)
3318 alc_update_coef_idx(codec
, 0x04, 1 << 11, power_up
? (1 << 11) : 0);
3321 static void alc269_shutup(struct hda_codec
*codec
)
3323 struct alc_spec
*spec
= codec
->spec
;
3325 if (spec
->codec_variant
== ALC269_TYPE_ALC269VB
)
3326 alc269vb_toggle_power_output(codec
, 0);
3327 if (spec
->codec_variant
== ALC269_TYPE_ALC269VB
&&
3328 (alc_get_coef0(codec
) & 0x00ff) == 0x018) {
3331 alc_shutup_pins(codec
);
3334 static const struct coef_fw alc282_coefs
[] = {
3335 WRITE_COEF(0x03, 0x0002), /* Power Down Control */
3336 UPDATE_COEF(0x05, 0xff3f, 0x0700), /* FIFO and filter clock */
3337 WRITE_COEF(0x07, 0x0200), /* DMIC control */
3338 UPDATE_COEF(0x06, 0x00f0, 0), /* Analog clock */
3339 UPDATE_COEF(0x08, 0xfffc, 0x0c2c), /* JD */
3340 WRITE_COEF(0x0a, 0xcccc), /* JD offset1 */
3341 WRITE_COEF(0x0b, 0xcccc), /* JD offset2 */
3342 WRITE_COEF(0x0e, 0x6e00), /* LDO1/2/3, DAC/ADC */
3343 UPDATE_COEF(0x0f, 0xf800, 0x1000), /* JD */
3344 UPDATE_COEF(0x10, 0xfc00, 0x0c00), /* Capless */
3345 WRITE_COEF(0x6f, 0x0), /* Class D test 4 */
3346 UPDATE_COEF(0x0c, 0xfe00, 0), /* IO power down directly */
3347 WRITE_COEF(0x34, 0xa0c0), /* ANC */
3348 UPDATE_COEF(0x16, 0x0008, 0), /* AGC MUX */
3349 UPDATE_COEF(0x1d, 0x00e0, 0), /* DAC simple content protection */
3350 UPDATE_COEF(0x1f, 0x00e0, 0), /* ADC simple content protection */
3351 WRITE_COEF(0x21, 0x8804), /* DAC ADC Zero Detection */
3352 WRITE_COEF(0x63, 0x2902), /* PLL */
3353 WRITE_COEF(0x68, 0xa080), /* capless control 2 */
3354 WRITE_COEF(0x69, 0x3400), /* capless control 3 */
3355 WRITE_COEF(0x6a, 0x2f3e), /* capless control 4 */
3356 WRITE_COEF(0x6b, 0x0), /* capless control 5 */
3357 UPDATE_COEF(0x6d, 0x0fff, 0x0900), /* class D test 2 */
3358 WRITE_COEF(0x6e, 0x110a), /* class D test 3 */
3359 UPDATE_COEF(0x70, 0x00f8, 0x00d8), /* class D test 5 */
3360 WRITE_COEF(0x71, 0x0014), /* class D test 6 */
3361 WRITE_COEF(0x72, 0xc2ba), /* classD OCP */
3362 UPDATE_COEF(0x77, 0x0f80, 0), /* classD pure DC test */
3363 WRITE_COEF(0x6c, 0xfc06), /* Class D amp control */
3367 static void alc282_restore_default_value(struct hda_codec
*codec
)
3369 alc_process_coef_fw(codec
, alc282_coefs
);
3372 static void alc282_init(struct hda_codec
*codec
)
3374 struct alc_spec
*spec
= codec
->spec
;
3375 hda_nid_t hp_pin
= alc_get_hp_pin(spec
);
3379 alc282_restore_default_value(codec
);
3383 hp_pin_sense
= snd_hda_jack_detect(codec
, hp_pin
);
3384 coef78
= alc_read_coef_idx(codec
, 0x78);
3386 /* Index 0x78 Direct Drive HP AMP LPM Control 1 */
3387 /* Headphone capless set to high power mode */
3388 alc_write_coef_idx(codec
, 0x78, 0x9004);
3393 snd_hda_codec_write(codec
, hp_pin
, 0,
3394 AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_MUTE
);
3399 snd_hda_codec_write(codec
, hp_pin
, 0,
3400 AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_OUT
);
3405 /* Headphone capless set to normal mode */
3406 alc_write_coef_idx(codec
, 0x78, coef78
);
3409 static void alc282_shutup(struct hda_codec
*codec
)
3411 struct alc_spec
*spec
= codec
->spec
;
3412 hda_nid_t hp_pin
= alc_get_hp_pin(spec
);
3417 alc269_shutup(codec
);
3421 hp_pin_sense
= snd_hda_jack_detect(codec
, hp_pin
);
3422 coef78
= alc_read_coef_idx(codec
, 0x78);
3423 alc_write_coef_idx(codec
, 0x78, 0x9004);
3428 snd_hda_codec_write(codec
, hp_pin
, 0,
3429 AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_MUTE
);
3434 if (!spec
->no_shutup_pins
)
3435 snd_hda_codec_write(codec
, hp_pin
, 0,
3436 AC_VERB_SET_PIN_WIDGET_CONTROL
, 0x0);
3441 alc_auto_setup_eapd(codec
, false);
3442 alc_shutup_pins(codec
);
3443 alc_write_coef_idx(codec
, 0x78, coef78
);
3446 static const struct coef_fw alc283_coefs
[] = {
3447 WRITE_COEF(0x03, 0x0002), /* Power Down Control */
3448 UPDATE_COEF(0x05, 0xff3f, 0x0700), /* FIFO and filter clock */
3449 WRITE_COEF(0x07, 0x0200), /* DMIC control */
3450 UPDATE_COEF(0x06, 0x00f0, 0), /* Analog clock */
3451 UPDATE_COEF(0x08, 0xfffc, 0x0c2c), /* JD */
3452 WRITE_COEF(0x0a, 0xcccc), /* JD offset1 */
3453 WRITE_COEF(0x0b, 0xcccc), /* JD offset2 */
3454 WRITE_COEF(0x0e, 0x6fc0), /* LDO1/2/3, DAC/ADC */
3455 UPDATE_COEF(0x0f, 0xf800, 0x1000), /* JD */
3456 UPDATE_COEF(0x10, 0xfc00, 0x0c00), /* Capless */
3457 WRITE_COEF(0x3a, 0x0), /* Class D test 4 */
3458 UPDATE_COEF(0x0c, 0xfe00, 0x0), /* IO power down directly */
3459 WRITE_COEF(0x22, 0xa0c0), /* ANC */
3460 UPDATE_COEFEX(0x53, 0x01, 0x000f, 0x0008), /* AGC MUX */
3461 UPDATE_COEF(0x1d, 0x00e0, 0), /* DAC simple content protection */
3462 UPDATE_COEF(0x1f, 0x00e0, 0), /* ADC simple content protection */
3463 WRITE_COEF(0x21, 0x8804), /* DAC ADC Zero Detection */
3464 WRITE_COEF(0x2e, 0x2902), /* PLL */
3465 WRITE_COEF(0x33, 0xa080), /* capless control 2 */
3466 WRITE_COEF(0x34, 0x3400), /* capless control 3 */
3467 WRITE_COEF(0x35, 0x2f3e), /* capless control 4 */
3468 WRITE_COEF(0x36, 0x0), /* capless control 5 */
3469 UPDATE_COEF(0x38, 0x0fff, 0x0900), /* class D test 2 */
3470 WRITE_COEF(0x39, 0x110a), /* class D test 3 */
3471 UPDATE_COEF(0x3b, 0x00f8, 0x00d8), /* class D test 5 */
3472 WRITE_COEF(0x3c, 0x0014), /* class D test 6 */
3473 WRITE_COEF(0x3d, 0xc2ba), /* classD OCP */
3474 UPDATE_COEF(0x42, 0x0f80, 0x0), /* classD pure DC test */
3475 WRITE_COEF(0x49, 0x0), /* test mode */
3476 UPDATE_COEF(0x40, 0xf800, 0x9800), /* Class D DC enable */
3477 UPDATE_COEF(0x42, 0xf000, 0x2000), /* DC offset */
3478 WRITE_COEF(0x37, 0xfc06), /* Class D amp control */
3479 UPDATE_COEF(0x1b, 0x8000, 0), /* HP JD control */
3483 static void alc283_restore_default_value(struct hda_codec
*codec
)
3485 alc_process_coef_fw(codec
, alc283_coefs
);
3488 static void alc283_init(struct hda_codec
*codec
)
3490 struct alc_spec
*spec
= codec
->spec
;
3491 hda_nid_t hp_pin
= alc_get_hp_pin(spec
);
3494 alc283_restore_default_value(codec
);
3500 hp_pin_sense
= snd_hda_jack_detect(codec
, hp_pin
);
3502 /* Index 0x43 Direct Drive HP AMP LPM Control 1 */
3503 /* Headphone capless set to high power mode */
3504 alc_write_coef_idx(codec
, 0x43, 0x9004);
3506 snd_hda_codec_write(codec
, hp_pin
, 0,
3507 AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_MUTE
);
3512 snd_hda_codec_write(codec
, hp_pin
, 0,
3513 AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_OUT
);
3517 /* Index 0x46 Combo jack auto switch control 2 */
3518 /* 3k pull low control for Headset jack. */
3519 alc_update_coef_idx(codec
, 0x46, 3 << 12, 0);
3520 /* Headphone capless set to normal mode */
3521 alc_write_coef_idx(codec
, 0x43, 0x9614);
3524 static void alc283_shutup(struct hda_codec
*codec
)
3526 struct alc_spec
*spec
= codec
->spec
;
3527 hda_nid_t hp_pin
= alc_get_hp_pin(spec
);
3531 alc269_shutup(codec
);
3535 hp_pin_sense
= snd_hda_jack_detect(codec
, hp_pin
);
3537 alc_write_coef_idx(codec
, 0x43, 0x9004);
3539 /*depop hp during suspend*/
3540 alc_write_coef_idx(codec
, 0x06, 0x2100);
3542 snd_hda_codec_write(codec
, hp_pin
, 0,
3543 AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_MUTE
);
3548 if (!spec
->no_shutup_pins
)
3549 snd_hda_codec_write(codec
, hp_pin
, 0,
3550 AC_VERB_SET_PIN_WIDGET_CONTROL
, 0x0);
3552 alc_update_coef_idx(codec
, 0x46, 0, 3 << 12);
3556 alc_auto_setup_eapd(codec
, false);
3557 alc_shutup_pins(codec
);
3558 alc_write_coef_idx(codec
, 0x43, 0x9614);
3561 static void alc256_init(struct hda_codec
*codec
)
3563 struct alc_spec
*spec
= codec
->spec
;
3564 hda_nid_t hp_pin
= alc_get_hp_pin(spec
);
3572 hp_pin_sense
= snd_hda_jack_detect(codec
, hp_pin
);
3577 alc_update_coefex_idx(codec
, 0x57, 0x04, 0x0007, 0x1); /* Low power */
3578 if (spec
->ultra_low_power
) {
3579 alc_update_coef_idx(codec
, 0x03, 1<<1, 1<<1);
3580 alc_update_coef_idx(codec
, 0x08, 3<<2, 3<<2);
3581 alc_update_coef_idx(codec
, 0x08, 7<<4, 0);
3582 alc_update_coef_idx(codec
, 0x3b, 1<<15, 0);
3583 alc_update_coef_idx(codec
, 0x0e, 7<<6, 7<<6);
3587 snd_hda_codec_write(codec
, hp_pin
, 0,
3588 AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_MUTE
);
3590 if (hp_pin_sense
|| spec
->ultra_low_power
)
3593 snd_hda_codec_write(codec
, hp_pin
, 0,
3594 AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_OUT
);
3596 if (hp_pin_sense
|| spec
->ultra_low_power
)
3599 alc_update_coef_idx(codec
, 0x46, 3 << 12, 0);
3600 alc_update_coefex_idx(codec
, 0x57, 0x04, 0x0007, 0x4); /* Hight power */
3601 alc_update_coefex_idx(codec
, 0x53, 0x02, 0x8000, 1 << 15); /* Clear bit */
3602 alc_update_coefex_idx(codec
, 0x53, 0x02, 0x8000, 0 << 15);
3604 * Expose headphone mic (or possibly Line In on some machines) instead
3605 * of PC Beep on 1Ah, and disable 1Ah loopback for all outputs. See
3606 * Documentation/sound/hd-audio/realtek-pc-beep.rst for details of
3609 alc_write_coef_idx(codec
, 0x36, 0x5757);
3612 static void alc256_shutup(struct hda_codec
*codec
)
3614 struct alc_spec
*spec
= codec
->spec
;
3615 hda_nid_t hp_pin
= alc_get_hp_pin(spec
);
3621 hp_pin_sense
= snd_hda_jack_detect(codec
, hp_pin
);
3626 snd_hda_codec_write(codec
, hp_pin
, 0,
3627 AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_MUTE
);
3629 if (hp_pin_sense
|| spec
->ultra_low_power
)
3632 /* 3k pull low control for Headset jack. */
3633 /* NOTE: call this before clearing the pin, otherwise codec stalls */
3634 /* If disable 3k pulldown control for alc257, the Mic detection will not work correctly
3635 * when booting with headset plugged. So skip setting it for the codec alc257
3637 if (codec
->core
.vendor_id
!= 0x10ec0236 &&
3638 codec
->core
.vendor_id
!= 0x10ec0257)
3639 alc_update_coef_idx(codec
, 0x46, 0, 3 << 12);
3641 if (!spec
->no_shutup_pins
)
3642 snd_hda_codec_write(codec
, hp_pin
, 0,
3643 AC_VERB_SET_PIN_WIDGET_CONTROL
, 0x0);
3645 if (hp_pin_sense
|| spec
->ultra_low_power
)
3648 alc_auto_setup_eapd(codec
, false);
3649 alc_shutup_pins(codec
);
3650 if (spec
->ultra_low_power
) {
3652 alc_update_coef_idx(codec
, 0x03, 1<<1, 0);
3653 alc_update_coef_idx(codec
, 0x08, 7<<4, 7<<4);
3654 alc_update_coef_idx(codec
, 0x08, 3<<2, 0);
3655 alc_update_coef_idx(codec
, 0x3b, 1<<15, 1<<15);
3656 alc_update_coef_idx(codec
, 0x0e, 7<<6, 0);
3661 static void alc285_hp_init(struct hda_codec
*codec
)
3663 struct alc_spec
*spec
= codec
->spec
;
3664 hda_nid_t hp_pin
= alc_get_hp_pin(spec
);
3666 int coef38
, coef0d
, coef36
;
3668 alc_update_coef_idx(codec
, 0x4a, 1<<15, 1<<15); /* Reset HP JD */
3669 coef38
= alc_read_coef_idx(codec
, 0x38); /* Amp control */
3670 coef0d
= alc_read_coef_idx(codec
, 0x0d); /* Digital Misc control */
3671 coef36
= alc_read_coef_idx(codec
, 0x36); /* Passthrough Control */
3672 alc_update_coef_idx(codec
, 0x38, 1<<4, 0x0);
3673 alc_update_coef_idx(codec
, 0x0d, 0x110, 0x0);
3675 alc_update_coef_idx(codec
, 0x67, 0xf000, 0x3000);
3678 snd_hda_codec_write(codec
, hp_pin
, 0,
3679 AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_MUTE
);
3682 alc_update_coef_idx(codec
, 0x36, 1<<14, 1<<14);
3683 alc_update_coef_idx(codec
, 0x36, 1<<13, 0x0);
3686 snd_hda_codec_write(codec
, hp_pin
, 0,
3687 AC_VERB_SET_PIN_WIDGET_CONTROL
, 0x0);
3689 alc_write_coef_idx(codec
, 0x67, 0x0); /* Set HP depop to manual mode */
3690 alc_write_coefex_idx(codec
, 0x58, 0x00, 0x7880);
3691 alc_write_coefex_idx(codec
, 0x58, 0x0f, 0xf049);
3692 alc_update_coefex_idx(codec
, 0x58, 0x03, 0x00f0, 0x00c0);
3694 alc_write_coefex_idx(codec
, 0x58, 0x00, 0xf888); /* HP depop procedure start */
3695 val
= alc_read_coefex_idx(codec
, 0x58, 0x00);
3696 for (i
= 0; i
< 20 && val
& 0x8000; i
++) {
3698 val
= alc_read_coefex_idx(codec
, 0x58, 0x00);
3699 } /* Wait for depop procedure finish */
3701 alc_write_coefex_idx(codec
, 0x58, 0x00, val
); /* write back the result */
3702 alc_update_coef_idx(codec
, 0x38, 1<<4, coef38
);
3703 alc_update_coef_idx(codec
, 0x0d, 0x110, coef0d
);
3704 alc_update_coef_idx(codec
, 0x36, 3<<13, coef36
);
3707 alc_update_coef_idx(codec
, 0x4a, 1<<15, 0);
3710 static void alc225_init(struct hda_codec
*codec
)
3712 struct alc_spec
*spec
= codec
->spec
;
3713 hda_nid_t hp_pin
= alc_get_hp_pin(spec
);
3714 bool hp1_pin_sense
, hp2_pin_sense
;
3716 if (spec
->codec_variant
!= ALC269_TYPE_ALC287
&&
3717 spec
->codec_variant
!= ALC269_TYPE_ALC245
)
3718 /* required only at boot or S3 and S4 resume time */
3719 if (!spec
->done_hp_init
||
3720 is_s3_resume(codec
) ||
3721 is_s4_resume(codec
)) {
3722 alc285_hp_init(codec
);
3723 spec
->done_hp_init
= true;
3730 hp1_pin_sense
= snd_hda_jack_detect(codec
, hp_pin
);
3731 hp2_pin_sense
= snd_hda_jack_detect(codec
, 0x16);
3733 if (hp1_pin_sense
|| hp2_pin_sense
)
3736 alc_update_coefex_idx(codec
, 0x57, 0x04, 0x0007, 0x1); /* Low power */
3737 if (spec
->ultra_low_power
) {
3738 alc_update_coef_idx(codec
, 0x08, 0x0f << 2, 3<<2);
3739 alc_update_coef_idx(codec
, 0x0e, 7<<6, 7<<6);
3740 alc_update_coef_idx(codec
, 0x33, 1<<11, 0);
3744 if (hp1_pin_sense
|| spec
->ultra_low_power
)
3745 snd_hda_codec_write(codec
, hp_pin
, 0,
3746 AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_MUTE
);
3748 snd_hda_codec_write(codec
, 0x16, 0,
3749 AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_MUTE
);
3751 if (hp1_pin_sense
|| hp2_pin_sense
|| spec
->ultra_low_power
)
3754 if (hp1_pin_sense
|| spec
->ultra_low_power
)
3755 snd_hda_codec_write(codec
, hp_pin
, 0,
3756 AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_OUT
);
3758 snd_hda_codec_write(codec
, 0x16, 0,
3759 AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_OUT
);
3761 if (hp1_pin_sense
|| hp2_pin_sense
|| spec
->ultra_low_power
)
3764 alc_update_coef_idx(codec
, 0x4a, 3 << 10, 0);
3765 alc_update_coefex_idx(codec
, 0x57, 0x04, 0x0007, 0x4); /* Hight power */
3768 static void alc225_shutup(struct hda_codec
*codec
)
3770 struct alc_spec
*spec
= codec
->spec
;
3771 hda_nid_t hp_pin
= alc_get_hp_pin(spec
);
3772 bool hp1_pin_sense
, hp2_pin_sense
;
3777 alc_disable_headset_jack_key(codec
);
3778 /* 3k pull low control for Headset jack. */
3779 alc_update_coef_idx(codec
, 0x4a, 0, 3 << 10);
3781 hp1_pin_sense
= snd_hda_jack_detect(codec
, hp_pin
);
3782 hp2_pin_sense
= snd_hda_jack_detect(codec
, 0x16);
3784 if (hp1_pin_sense
|| hp2_pin_sense
)
3787 if (hp1_pin_sense
|| spec
->ultra_low_power
)
3788 snd_hda_codec_write(codec
, hp_pin
, 0,
3789 AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_MUTE
);
3791 snd_hda_codec_write(codec
, 0x16, 0,
3792 AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_MUTE
);
3794 if (hp1_pin_sense
|| hp2_pin_sense
|| spec
->ultra_low_power
)
3797 if (hp1_pin_sense
|| spec
->ultra_low_power
)
3798 snd_hda_codec_write(codec
, hp_pin
, 0,
3799 AC_VERB_SET_PIN_WIDGET_CONTROL
, 0x0);
3801 snd_hda_codec_write(codec
, 0x16, 0,
3802 AC_VERB_SET_PIN_WIDGET_CONTROL
, 0x0);
3804 if (hp1_pin_sense
|| hp2_pin_sense
|| spec
->ultra_low_power
)
3807 alc_auto_setup_eapd(codec
, false);
3808 alc_shutup_pins(codec
);
3809 if (spec
->ultra_low_power
) {
3811 alc_update_coef_idx(codec
, 0x08, 0x0f << 2, 0x0c << 2);
3812 alc_update_coef_idx(codec
, 0x0e, 7<<6, 0);
3813 alc_update_coef_idx(codec
, 0x33, 1<<11, 1<<11);
3814 alc_update_coef_idx(codec
, 0x4a, 3<<4, 2<<4);
3818 alc_update_coef_idx(codec
, 0x4a, 3 << 10, 0);
3819 alc_enable_headset_jack_key(codec
);
3822 static void alc_default_init(struct hda_codec
*codec
)
3824 struct alc_spec
*spec
= codec
->spec
;
3825 hda_nid_t hp_pin
= alc_get_hp_pin(spec
);
3833 hp_pin_sense
= snd_hda_jack_detect(codec
, hp_pin
);
3838 snd_hda_codec_write(codec
, hp_pin
, 0,
3839 AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_MUTE
);
3844 snd_hda_codec_write(codec
, hp_pin
, 0,
3845 AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_OUT
);
3851 static void alc_default_shutup(struct hda_codec
*codec
)
3853 struct alc_spec
*spec
= codec
->spec
;
3854 hda_nid_t hp_pin
= alc_get_hp_pin(spec
);
3858 alc269_shutup(codec
);
3862 hp_pin_sense
= snd_hda_jack_detect(codec
, hp_pin
);
3867 snd_hda_codec_write(codec
, hp_pin
, 0,
3868 AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_MUTE
);
3873 if (!spec
->no_shutup_pins
)
3874 snd_hda_codec_write(codec
, hp_pin
, 0,
3875 AC_VERB_SET_PIN_WIDGET_CONTROL
, 0x0);
3880 alc_auto_setup_eapd(codec
, false);
3881 alc_shutup_pins(codec
);
3884 static void alc294_hp_init(struct hda_codec
*codec
)
3886 struct alc_spec
*spec
= codec
->spec
;
3887 hda_nid_t hp_pin
= alc_get_hp_pin(spec
);
3893 snd_hda_codec_write(codec
, hp_pin
, 0,
3894 AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_MUTE
);
3898 if (!spec
->no_shutup_pins
)
3899 snd_hda_codec_write(codec
, hp_pin
, 0,
3900 AC_VERB_SET_PIN_WIDGET_CONTROL
, 0x0);
3902 alc_update_coef_idx(codec
, 0x6f, 0x000f, 0);/* Set HP depop to manual mode */
3903 alc_update_coefex_idx(codec
, 0x58, 0x00, 0x8000, 0x8000); /* HP depop procedure start */
3905 /* Wait for depop procedure finish */
3906 val
= alc_read_coefex_idx(codec
, 0x58, 0x01);
3907 for (i
= 0; i
< 20 && val
& 0x0080; i
++) {
3909 val
= alc_read_coefex_idx(codec
, 0x58, 0x01);
3911 /* Set HP depop to auto mode */
3912 alc_update_coef_idx(codec
, 0x6f, 0x000f, 0x000b);
3916 static void alc294_init(struct hda_codec
*codec
)
3918 struct alc_spec
*spec
= codec
->spec
;
3920 /* required only at boot or S4 resume time */
3921 if (!spec
->done_hp_init
||
3922 codec
->core
.dev
.power
.power_state
.event
== PM_EVENT_RESTORE
) {
3923 alc294_hp_init(codec
);
3924 spec
->done_hp_init
= true;
3926 alc_default_init(codec
);
3929 static void alc5505_coef_set(struct hda_codec
*codec
, unsigned int index_reg
,
3932 snd_hda_codec_write(codec
, 0x51, 0, AC_VERB_SET_COEF_INDEX
, index_reg
>> 1);
3933 snd_hda_codec_write(codec
, 0x51, 0, AC_VERB_SET_PROC_COEF
, val
& 0xffff); /* LSB */
3934 snd_hda_codec_write(codec
, 0x51, 0, AC_VERB_SET_PROC_COEF
, val
>> 16); /* MSB */
3937 static int alc5505_coef_get(struct hda_codec
*codec
, unsigned int index_reg
)
3941 snd_hda_codec_write(codec
, 0x51, 0, AC_VERB_SET_COEF_INDEX
, index_reg
>> 1);
3942 val
= snd_hda_codec_read(codec
, 0x51, 0, AC_VERB_GET_PROC_COEF
, 0)
3944 val
|= snd_hda_codec_read(codec
, 0x51, 0, AC_VERB_GET_PROC_COEF
, 0)
3949 static void alc5505_dsp_halt(struct hda_codec
*codec
)
3953 alc5505_coef_set(codec
, 0x3000, 0x000c); /* DSP CPU stop */
3954 alc5505_coef_set(codec
, 0x880c, 0x0008); /* DDR enter self refresh */
3955 alc5505_coef_set(codec
, 0x61c0, 0x11110080); /* Clock control for PLL and CPU */
3956 alc5505_coef_set(codec
, 0x6230, 0xfc0d4011); /* Disable Input OP */
3957 alc5505_coef_set(codec
, 0x61b4, 0x040a2b03); /* Stop PLL2 */
3958 alc5505_coef_set(codec
, 0x61b0, 0x00005b17); /* Stop PLL1 */
3959 alc5505_coef_set(codec
, 0x61b8, 0x04133303); /* Stop PLL3 */
3960 val
= alc5505_coef_get(codec
, 0x6220);
3961 alc5505_coef_set(codec
, 0x6220, (val
| 0x3000)); /* switch Ringbuffer clock to DBUS clock */
3964 static void alc5505_dsp_back_from_halt(struct hda_codec
*codec
)
3966 alc5505_coef_set(codec
, 0x61b8, 0x04133302);
3967 alc5505_coef_set(codec
, 0x61b0, 0x00005b16);
3968 alc5505_coef_set(codec
, 0x61b4, 0x040a2b02);
3969 alc5505_coef_set(codec
, 0x6230, 0xf80d4011);
3970 alc5505_coef_set(codec
, 0x6220, 0x2002010f);
3971 alc5505_coef_set(codec
, 0x880c, 0x00000004);
3974 static void alc5505_dsp_init(struct hda_codec
*codec
)
3978 alc5505_dsp_halt(codec
);
3979 alc5505_dsp_back_from_halt(codec
);
3980 alc5505_coef_set(codec
, 0x61b0, 0x5b14); /* PLL1 control */
3981 alc5505_coef_set(codec
, 0x61b0, 0x5b16);
3982 alc5505_coef_set(codec
, 0x61b4, 0x04132b00); /* PLL2 control */
3983 alc5505_coef_set(codec
, 0x61b4, 0x04132b02);
3984 alc5505_coef_set(codec
, 0x61b8, 0x041f3300); /* PLL3 control*/
3985 alc5505_coef_set(codec
, 0x61b8, 0x041f3302);
3986 snd_hda_codec_write(codec
, 0x51, 0, AC_VERB_SET_CODEC_RESET
, 0); /* Function reset */
3987 alc5505_coef_set(codec
, 0x61b8, 0x041b3302);
3988 alc5505_coef_set(codec
, 0x61b8, 0x04173302);
3989 alc5505_coef_set(codec
, 0x61b8, 0x04163302);
3990 alc5505_coef_set(codec
, 0x8800, 0x348b328b); /* DRAM control */
3991 alc5505_coef_set(codec
, 0x8808, 0x00020022); /* DRAM control */
3992 alc5505_coef_set(codec
, 0x8818, 0x00000400); /* DRAM control */
3994 val
= alc5505_coef_get(codec
, 0x6200) >> 16; /* Read revision ID */
3996 alc5505_coef_set(codec
, 0x6220, 0x2002010f); /* I/O PAD Configuration */
3998 alc5505_coef_set(codec
, 0x6220, 0x6002018f);
4000 alc5505_coef_set(codec
, 0x61ac, 0x055525f0); /**/
4001 alc5505_coef_set(codec
, 0x61c0, 0x12230080); /* Clock control */
4002 alc5505_coef_set(codec
, 0x61b4, 0x040e2b02); /* PLL2 control */
4003 alc5505_coef_set(codec
, 0x61bc, 0x010234f8); /* OSC Control */
4004 alc5505_coef_set(codec
, 0x880c, 0x00000004); /* DRAM Function control */
4005 alc5505_coef_set(codec
, 0x880c, 0x00000003);
4006 alc5505_coef_set(codec
, 0x880c, 0x00000010);
4008 #ifdef HALT_REALTEK_ALC5505
4009 alc5505_dsp_halt(codec
);
4013 #ifdef HALT_REALTEK_ALC5505
4014 #define alc5505_dsp_suspend(codec) do { } while (0) /* NOP */
4015 #define alc5505_dsp_resume(codec) do { } while (0) /* NOP */
4017 #define alc5505_dsp_suspend(codec) alc5505_dsp_halt(codec)
4018 #define alc5505_dsp_resume(codec) alc5505_dsp_back_from_halt(codec)
4022 static int alc269_suspend(struct hda_codec
*codec
)
4024 struct alc_spec
*spec
= codec
->spec
;
4027 if (spec
->has_alc5505_dsp
)
4028 alc5505_dsp_suspend(codec
);
4030 for (i
= 0; i
< HDA_MAX_COMPONENTS
; i
++)
4031 if (spec
->comps
[i
].suspend_hook
)
4032 spec
->comps
[i
].suspend_hook(spec
->comps
[i
].dev
);
4034 return alc_suspend(codec
);
4037 static int alc269_resume(struct hda_codec
*codec
)
4039 struct alc_spec
*spec
= codec
->spec
;
4042 if (spec
->codec_variant
== ALC269_TYPE_ALC269VB
)
4043 alc269vb_toggle_power_output(codec
, 0);
4044 if (spec
->codec_variant
== ALC269_TYPE_ALC269VB
&&
4045 (alc_get_coef0(codec
) & 0x00ff) == 0x018) {
4049 codec
->patch_ops
.init(codec
);
4051 if (spec
->codec_variant
== ALC269_TYPE_ALC269VB
)
4052 alc269vb_toggle_power_output(codec
, 1);
4053 if (spec
->codec_variant
== ALC269_TYPE_ALC269VB
&&
4054 (alc_get_coef0(codec
) & 0x00ff) == 0x017) {
4058 snd_hda_regmap_sync(codec
);
4059 hda_call_check_power_status(codec
, 0x01);
4061 /* on some machine, the BIOS will clear the codec gpio data when enter
4062 * suspend, and won't restore the data after resume, so we restore it
4065 if (spec
->gpio_data
)
4066 alc_write_gpio_data(codec
);
4068 if (spec
->has_alc5505_dsp
)
4069 alc5505_dsp_resume(codec
);
4071 for (i
= 0; i
< HDA_MAX_COMPONENTS
; i
++)
4072 if (spec
->comps
[i
].resume_hook
)
4073 spec
->comps
[i
].resume_hook(spec
->comps
[i
].dev
);
4077 #endif /* CONFIG_PM */
4079 static void alc269_fixup_pincfg_no_hp_to_lineout(struct hda_codec
*codec
,
4080 const struct hda_fixup
*fix
, int action
)
4082 struct alc_spec
*spec
= codec
->spec
;
4084 if (action
== HDA_FIXUP_ACT_PRE_PROBE
)
4085 spec
->parse_flags
= HDA_PINCFG_NO_HP_FIXUP
;
4088 static void alc269_fixup_pincfg_U7x7_headset_mic(struct hda_codec
*codec
,
4089 const struct hda_fixup
*fix
,
4092 unsigned int cfg_headphone
= snd_hda_codec_get_pincfg(codec
, 0x21);
4093 unsigned int cfg_headset_mic
= snd_hda_codec_get_pincfg(codec
, 0x19);
4095 if (cfg_headphone
&& cfg_headset_mic
== 0x411111f0)
4096 snd_hda_codec_set_pincfg(codec
, 0x19,
4097 (cfg_headphone
& ~AC_DEFCFG_DEVICE
) |
4098 (AC_JACK_MIC_IN
<< AC_DEFCFG_DEVICE_SHIFT
));
4101 static void alc269_fixup_hweq(struct hda_codec
*codec
,
4102 const struct hda_fixup
*fix
, int action
)
4104 if (action
== HDA_FIXUP_ACT_INIT
)
4105 alc_update_coef_idx(codec
, 0x1e, 0, 0x80);
4108 static void alc269_fixup_headset_mic(struct hda_codec
*codec
,
4109 const struct hda_fixup
*fix
, int action
)
4111 struct alc_spec
*spec
= codec
->spec
;
4113 if (action
== HDA_FIXUP_ACT_PRE_PROBE
)
4114 spec
->parse_flags
|= HDA_PINCFG_HEADSET_MIC
;
4117 static void alc271_fixup_dmic(struct hda_codec
*codec
,
4118 const struct hda_fixup
*fix
, int action
)
4120 static const struct hda_verb verbs
[] = {
4121 {0x20, AC_VERB_SET_COEF_INDEX
, 0x0d},
4122 {0x20, AC_VERB_SET_PROC_COEF
, 0x4000},
4127 if (strcmp(codec
->core
.chip_name
, "ALC271X") &&
4128 strcmp(codec
->core
.chip_name
, "ALC269VB"))
4130 cfg
= snd_hda_codec_get_pincfg(codec
, 0x12);
4131 if (get_defcfg_connect(cfg
) == AC_JACK_PORT_FIXED
)
4132 snd_hda_sequence_write(codec
, verbs
);
4135 /* Fix the speaker amp after resume, etc */
4136 static void alc269vb_fixup_aspire_e1_coef(struct hda_codec
*codec
,
4137 const struct hda_fixup
*fix
,
4140 if (action
== HDA_FIXUP_ACT_INIT
)
4141 alc_update_coef_idx(codec
, 0x0d, 0x6000, 0x6000);
4144 static void alc269_fixup_pcm_44k(struct hda_codec
*codec
,
4145 const struct hda_fixup
*fix
, int action
)
4147 struct alc_spec
*spec
= codec
->spec
;
4149 if (action
!= HDA_FIXUP_ACT_PROBE
)
4152 /* Due to a hardware problem on Lenovo Ideadpad, we need to
4153 * fix the sample rate of analog I/O to 44.1kHz
4155 spec
->gen
.stream_analog_playback
= &alc269_44k_pcm_analog_playback
;
4156 spec
->gen
.stream_analog_capture
= &alc269_44k_pcm_analog_capture
;
4159 static void alc269_fixup_stereo_dmic(struct hda_codec
*codec
,
4160 const struct hda_fixup
*fix
, int action
)
4162 /* The digital-mic unit sends PDM (differential signal) instead of
4163 * the standard PCM, thus you can't record a valid mono stream as is.
4164 * Below is a workaround specific to ALC269 to control the dmic
4165 * signal source as mono.
4167 if (action
== HDA_FIXUP_ACT_INIT
)
4168 alc_update_coef_idx(codec
, 0x07, 0, 0x80);
4171 static void alc269_quanta_automute(struct hda_codec
*codec
)
4173 snd_hda_gen_update_outputs(codec
);
4175 alc_write_coef_idx(codec
, 0x0c, 0x680);
4176 alc_write_coef_idx(codec
, 0x0c, 0x480);
4179 static void alc269_fixup_quanta_mute(struct hda_codec
*codec
,
4180 const struct hda_fixup
*fix
, int action
)
4182 struct alc_spec
*spec
= codec
->spec
;
4183 if (action
!= HDA_FIXUP_ACT_PROBE
)
4185 spec
->gen
.automute_hook
= alc269_quanta_automute
;
4188 static void alc269_x101_hp_automute_hook(struct hda_codec
*codec
,
4189 struct hda_jack_callback
*jack
)
4191 struct alc_spec
*spec
= codec
->spec
;
4194 snd_hda_gen_hp_automute(codec
, jack
);
4196 vref
= spec
->gen
.hp_jack_present
? PIN_VREF80
: 0;
4198 snd_hda_codec_write(codec
, 0x18, 0, AC_VERB_SET_PIN_WIDGET_CONTROL
,
4201 snd_hda_codec_write(codec
, 0x18, 0, AC_VERB_SET_PIN_WIDGET_CONTROL
,
4206 * Magic sequence to make Huawei Matebook X right speaker working (bko#197801)
4208 struct hda_alc298_mbxinit
{
4209 unsigned char value_0x23
;
4210 unsigned char value_0x25
;
4213 static void alc298_huawei_mbx_stereo_seq(struct hda_codec
*codec
,
4214 const struct hda_alc298_mbxinit
*initval
,
4217 snd_hda_codec_write(codec
, 0x06, 0, AC_VERB_SET_DIGI_CONVERT_3
, 0x0);
4218 alc_write_coef_idx(codec
, 0x26, 0xb000);
4221 snd_hda_codec_write(codec
, 0x21, 0, AC_VERB_GET_PIN_SENSE
, 0x0);
4223 snd_hda_codec_write(codec
, 0x6, 0, AC_VERB_SET_DIGI_CONVERT_3
, 0x80);
4224 alc_write_coef_idx(codec
, 0x26, 0xf000);
4225 alc_write_coef_idx(codec
, 0x23, initval
->value_0x23
);
4227 if (initval
->value_0x23
!= 0x1e)
4228 alc_write_coef_idx(codec
, 0x25, initval
->value_0x25
);
4230 snd_hda_codec_write(codec
, 0x20, 0, AC_VERB_SET_COEF_INDEX
, 0x26);
4231 snd_hda_codec_write(codec
, 0x20, 0, AC_VERB_SET_PROC_COEF
, 0xb010);
4234 static void alc298_fixup_huawei_mbx_stereo(struct hda_codec
*codec
,
4235 const struct hda_fixup
*fix
,
4238 /* Initialization magic */
4239 static const struct hda_alc298_mbxinit dac_init
[] = {
4240 {0x0c, 0x00}, {0x0d, 0x00}, {0x0e, 0x00}, {0x0f, 0x00},
4241 {0x10, 0x00}, {0x1a, 0x40}, {0x1b, 0x82}, {0x1c, 0x00},
4242 {0x1d, 0x00}, {0x1e, 0x00}, {0x1f, 0x00},
4243 {0x20, 0xc2}, {0x21, 0xc8}, {0x22, 0x26}, {0x23, 0x24},
4244 {0x27, 0xff}, {0x28, 0xff}, {0x29, 0xff}, {0x2a, 0x8f},
4245 {0x2b, 0x02}, {0x2c, 0x48}, {0x2d, 0x34}, {0x2e, 0x00},
4247 {0x30, 0x00}, {0x31, 0x00}, {0x32, 0x00}, {0x33, 0x00},
4248 {0x34, 0x00}, {0x35, 0x01}, {0x36, 0x93}, {0x37, 0x0c},
4249 {0x38, 0x00}, {0x39, 0x00}, {0x3a, 0xf8}, {0x38, 0x80},
4252 const struct hda_alc298_mbxinit
*seq
;
4254 if (action
!= HDA_FIXUP_ACT_INIT
)
4258 snd_hda_codec_write(codec
, 0x06, 0, AC_VERB_SET_DIGI_CONVERT_3
, 0x00);
4259 snd_hda_codec_write(codec
, 0x06, 0, AC_VERB_SET_DIGI_CONVERT_3
, 0x80);
4260 alc_write_coef_idx(codec
, 0x26, 0xf000);
4261 alc_write_coef_idx(codec
, 0x22, 0x31);
4262 alc_write_coef_idx(codec
, 0x23, 0x0b);
4263 alc_write_coef_idx(codec
, 0x25, 0x00);
4264 snd_hda_codec_write(codec
, 0x20, 0, AC_VERB_SET_COEF_INDEX
, 0x26);
4265 snd_hda_codec_write(codec
, 0x20, 0, AC_VERB_SET_PROC_COEF
, 0xb010);
4267 for (seq
= dac_init
; seq
->value_0x23
; seq
++)
4268 alc298_huawei_mbx_stereo_seq(codec
, seq
, seq
== dac_init
);
4271 static void alc269_fixup_x101_headset_mic(struct hda_codec
*codec
,
4272 const struct hda_fixup
*fix
, int action
)
4274 struct alc_spec
*spec
= codec
->spec
;
4275 if (action
== HDA_FIXUP_ACT_PRE_PROBE
) {
4276 spec
->parse_flags
|= HDA_PINCFG_HEADSET_MIC
;
4277 spec
->gen
.hp_automute_hook
= alc269_x101_hp_automute_hook
;
4281 static void alc_update_vref_led(struct hda_codec
*codec
, hda_nid_t pin
,
4282 bool polarity
, bool on
)
4284 unsigned int pinval
;
4290 pinval
= snd_hda_codec_get_pin_target(codec
, pin
);
4291 pinval
&= ~AC_PINCTL_VREFEN
;
4292 pinval
|= on
? AC_PINCTL_VREF_80
: AC_PINCTL_VREF_HIZ
;
4293 /* temporarily power up/down for setting VREF */
4294 snd_hda_power_up_pm(codec
);
4295 snd_hda_set_pin_ctl_cache(codec
, pin
, pinval
);
4296 snd_hda_power_down_pm(codec
);
4299 /* update mute-LED according to the speaker mute state via mic VREF pin */
4300 static int vref_mute_led_set(struct led_classdev
*led_cdev
,
4301 enum led_brightness brightness
)
4303 struct hda_codec
*codec
= dev_to_hda_codec(led_cdev
->dev
->parent
);
4304 struct alc_spec
*spec
= codec
->spec
;
4306 alc_update_vref_led(codec
, spec
->mute_led_nid
,
4307 spec
->mute_led_polarity
, brightness
);
4311 /* Make sure the led works even in runtime suspend */
4312 static unsigned int led_power_filter(struct hda_codec
*codec
,
4314 unsigned int power_state
)
4316 struct alc_spec
*spec
= codec
->spec
;
4318 if (power_state
!= AC_PWRST_D3
|| nid
== 0 ||
4319 (nid
!= spec
->mute_led_nid
&& nid
!= spec
->cap_mute_led_nid
))
4322 /* Set pin ctl again, it might have just been set to 0 */
4323 snd_hda_set_pin_ctl(codec
, nid
,
4324 snd_hda_codec_get_pin_target(codec
, nid
));
4326 return snd_hda_gen_path_power_filter(codec
, nid
, power_state
);
4329 static void alc269_fixup_hp_mute_led(struct hda_codec
*codec
,
4330 const struct hda_fixup
*fix
, int action
)
4332 struct alc_spec
*spec
= codec
->spec
;
4333 const struct dmi_device
*dev
= NULL
;
4335 if (action
!= HDA_FIXUP_ACT_PRE_PROBE
)
4338 while ((dev
= dmi_find_device(DMI_DEV_TYPE_OEM_STRING
, NULL
, dev
))) {
4340 if (sscanf(dev
->name
, "HP_Mute_LED_%d_%x", &pol
, &pin
) != 2)
4342 if (pin
< 0x0a || pin
>= 0x10)
4344 spec
->mute_led_polarity
= pol
;
4345 spec
->mute_led_nid
= pin
- 0x0a + 0x18;
4346 snd_hda_gen_add_mute_led_cdev(codec
, vref_mute_led_set
);
4347 codec
->power_filter
= led_power_filter
;
4349 "Detected mute LED for %x:%d\n", spec
->mute_led_nid
,
4350 spec
->mute_led_polarity
);
4355 static void alc269_fixup_hp_mute_led_micx(struct hda_codec
*codec
,
4356 const struct hda_fixup
*fix
,
4357 int action
, hda_nid_t pin
)
4359 struct alc_spec
*spec
= codec
->spec
;
4361 if (action
== HDA_FIXUP_ACT_PRE_PROBE
) {
4362 spec
->mute_led_polarity
= 0;
4363 spec
->mute_led_nid
= pin
;
4364 snd_hda_gen_add_mute_led_cdev(codec
, vref_mute_led_set
);
4365 codec
->power_filter
= led_power_filter
;
4369 static void alc269_fixup_hp_mute_led_mic1(struct hda_codec
*codec
,
4370 const struct hda_fixup
*fix
, int action
)
4372 alc269_fixup_hp_mute_led_micx(codec
, fix
, action
, 0x18);
4375 static void alc269_fixup_hp_mute_led_mic2(struct hda_codec
*codec
,
4376 const struct hda_fixup
*fix
, int action
)
4378 alc269_fixup_hp_mute_led_micx(codec
, fix
, action
, 0x19);
4381 static void alc269_fixup_hp_mute_led_mic3(struct hda_codec
*codec
,
4382 const struct hda_fixup
*fix
, int action
)
4384 alc269_fixup_hp_mute_led_micx(codec
, fix
, action
, 0x1b);
4387 /* update LED status via GPIO */
4388 static void alc_update_gpio_led(struct hda_codec
*codec
, unsigned int mask
,
4389 int polarity
, bool enabled
)
4393 alc_update_gpio_data(codec
, mask
, !enabled
); /* muted -> LED on */
4396 /* turn on/off mute LED via GPIO per vmaster hook */
4397 static int gpio_mute_led_set(struct led_classdev
*led_cdev
,
4398 enum led_brightness brightness
)
4400 struct hda_codec
*codec
= dev_to_hda_codec(led_cdev
->dev
->parent
);
4401 struct alc_spec
*spec
= codec
->spec
;
4403 alc_update_gpio_led(codec
, spec
->gpio_mute_led_mask
,
4404 spec
->mute_led_polarity
, !brightness
);
4408 /* turn on/off mic-mute LED via GPIO per capture hook */
4409 static int micmute_led_set(struct led_classdev
*led_cdev
,
4410 enum led_brightness brightness
)
4412 struct hda_codec
*codec
= dev_to_hda_codec(led_cdev
->dev
->parent
);
4413 struct alc_spec
*spec
= codec
->spec
;
4415 alc_update_gpio_led(codec
, spec
->gpio_mic_led_mask
,
4416 spec
->micmute_led_polarity
, !brightness
);
4420 /* setup mute and mic-mute GPIO bits, add hooks appropriately */
4421 static void alc_fixup_hp_gpio_led(struct hda_codec
*codec
,
4423 unsigned int mute_mask
,
4424 unsigned int micmute_mask
)
4426 struct alc_spec
*spec
= codec
->spec
;
4428 alc_fixup_gpio(codec
, action
, mute_mask
| micmute_mask
);
4430 if (action
!= HDA_FIXUP_ACT_PRE_PROBE
)
4433 spec
->gpio_mute_led_mask
= mute_mask
;
4434 snd_hda_gen_add_mute_led_cdev(codec
, gpio_mute_led_set
);
4437 spec
->gpio_mic_led_mask
= micmute_mask
;
4438 snd_hda_gen_add_micmute_led_cdev(codec
, micmute_led_set
);
4442 static void alc236_fixup_hp_gpio_led(struct hda_codec
*codec
,
4443 const struct hda_fixup
*fix
, int action
)
4445 alc_fixup_hp_gpio_led(codec
, action
, 0x02, 0x01);
4448 static void alc269_fixup_hp_gpio_led(struct hda_codec
*codec
,
4449 const struct hda_fixup
*fix
, int action
)
4451 alc_fixup_hp_gpio_led(codec
, action
, 0x08, 0x10);
4454 static void alc285_fixup_hp_gpio_led(struct hda_codec
*codec
,
4455 const struct hda_fixup
*fix
, int action
)
4457 alc_fixup_hp_gpio_led(codec
, action
, 0x04, 0x01);
4460 static void alc286_fixup_hp_gpio_led(struct hda_codec
*codec
,
4461 const struct hda_fixup
*fix
, int action
)
4463 alc_fixup_hp_gpio_led(codec
, action
, 0x02, 0x20);
4466 static void alc287_fixup_hp_gpio_led(struct hda_codec
*codec
,
4467 const struct hda_fixup
*fix
, int action
)
4469 alc_fixup_hp_gpio_led(codec
, action
, 0x10, 0);
4472 static void alc245_fixup_hp_gpio_led(struct hda_codec
*codec
,
4473 const struct hda_fixup
*fix
, int action
)
4475 struct alc_spec
*spec
= codec
->spec
;
4477 if (action
== HDA_FIXUP_ACT_PRE_PROBE
)
4478 spec
->micmute_led_polarity
= 1;
4479 alc_fixup_hp_gpio_led(codec
, action
, 0, 0x04);
4482 /* turn on/off mic-mute LED per capture hook via VREF change */
4483 static int vref_micmute_led_set(struct led_classdev
*led_cdev
,
4484 enum led_brightness brightness
)
4486 struct hda_codec
*codec
= dev_to_hda_codec(led_cdev
->dev
->parent
);
4487 struct alc_spec
*spec
= codec
->spec
;
4489 alc_update_vref_led(codec
, spec
->cap_mute_led_nid
,
4490 spec
->micmute_led_polarity
, brightness
);
4494 static void alc269_fixup_hp_gpio_mic1_led(struct hda_codec
*codec
,
4495 const struct hda_fixup
*fix
, int action
)
4497 struct alc_spec
*spec
= codec
->spec
;
4499 alc_fixup_hp_gpio_led(codec
, action
, 0x08, 0);
4500 if (action
== HDA_FIXUP_ACT_PRE_PROBE
) {
4501 /* Like hp_gpio_mic1_led, but also needs GPIO4 low to
4502 * enable headphone amp
4504 spec
->gpio_mask
|= 0x10;
4505 spec
->gpio_dir
|= 0x10;
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 static void alc280_fixup_hp_gpio4(struct hda_codec
*codec
,
4513 const struct hda_fixup
*fix
, int action
)
4515 struct alc_spec
*spec
= codec
->spec
;
4517 alc_fixup_hp_gpio_led(codec
, action
, 0x08, 0);
4518 if (action
== HDA_FIXUP_ACT_PRE_PROBE
) {
4519 spec
->cap_mute_led_nid
= 0x18;
4520 snd_hda_gen_add_micmute_led_cdev(codec
, vref_micmute_led_set
);
4521 codec
->power_filter
= led_power_filter
;
4525 /* HP Spectre x360 14 model needs a unique workaround for enabling the amp;
4526 * it needs to toggle the GPIO0 once on and off at each time (bko#210633)
4528 static void alc245_fixup_hp_x360_amp(struct hda_codec
*codec
,
4529 const struct hda_fixup
*fix
, int action
)
4531 struct alc_spec
*spec
= codec
->spec
;
4534 case HDA_FIXUP_ACT_PRE_PROBE
:
4535 spec
->gpio_mask
|= 0x01;
4536 spec
->gpio_dir
|= 0x01;
4538 case HDA_FIXUP_ACT_INIT
:
4539 /* need to toggle GPIO to enable the amp */
4540 alc_update_gpio_data(codec
, 0x01, true);
4542 alc_update_gpio_data(codec
, 0x01, false);
4547 /* toggle GPIO2 at each time stream is started; we use PREPARE state instead */
4548 static void alc274_hp_envy_pcm_hook(struct hda_pcm_stream
*hinfo
,
4549 struct hda_codec
*codec
,
4550 struct snd_pcm_substream
*substream
,
4554 case HDA_GEN_PCM_ACT_PREPARE
:
4555 alc_update_gpio_data(codec
, 0x04, true);
4557 case HDA_GEN_PCM_ACT_CLEANUP
:
4558 alc_update_gpio_data(codec
, 0x04, false);
4563 static void alc274_fixup_hp_envy_gpio(struct hda_codec
*codec
,
4564 const struct hda_fixup
*fix
,
4567 struct alc_spec
*spec
= codec
->spec
;
4569 if (action
== HDA_FIXUP_ACT_PROBE
) {
4570 spec
->gpio_mask
|= 0x04;
4571 spec
->gpio_dir
|= 0x04;
4572 spec
->gen
.pcm_playback_hook
= alc274_hp_envy_pcm_hook
;
4576 static void alc_update_coef_led(struct hda_codec
*codec
,
4577 struct alc_coef_led
*led
,
4578 bool polarity
, bool on
)
4582 /* temporarily power up/down for setting COEF bit */
4583 alc_update_coef_idx(codec
, led
->idx
, led
->mask
,
4584 on
? led
->on
: led
->off
);
4587 /* update mute-LED according to the speaker mute state via COEF bit */
4588 static int coef_mute_led_set(struct led_classdev
*led_cdev
,
4589 enum led_brightness brightness
)
4591 struct hda_codec
*codec
= dev_to_hda_codec(led_cdev
->dev
->parent
);
4592 struct alc_spec
*spec
= codec
->spec
;
4594 alc_update_coef_led(codec
, &spec
->mute_led_coef
,
4595 spec
->mute_led_polarity
, brightness
);
4599 static void alc285_fixup_hp_mute_led_coefbit(struct hda_codec
*codec
,
4600 const struct hda_fixup
*fix
,
4603 struct alc_spec
*spec
= codec
->spec
;
4605 if (action
== HDA_FIXUP_ACT_PRE_PROBE
) {
4606 spec
->mute_led_polarity
= 0;
4607 spec
->mute_led_coef
.idx
= 0x0b;
4608 spec
->mute_led_coef
.mask
= 1 << 3;
4609 spec
->mute_led_coef
.on
= 1 << 3;
4610 spec
->mute_led_coef
.off
= 0;
4611 snd_hda_gen_add_mute_led_cdev(codec
, coef_mute_led_set
);
4615 static void alc236_fixup_hp_mute_led_coefbit(struct hda_codec
*codec
,
4616 const struct hda_fixup
*fix
,
4619 struct alc_spec
*spec
= codec
->spec
;
4621 if (action
== HDA_FIXUP_ACT_PRE_PROBE
) {
4622 spec
->mute_led_polarity
= 0;
4623 spec
->mute_led_coef
.idx
= 0x34;
4624 spec
->mute_led_coef
.mask
= 1 << 5;
4625 spec
->mute_led_coef
.on
= 0;
4626 spec
->mute_led_coef
.off
= 1 << 5;
4627 snd_hda_gen_add_mute_led_cdev(codec
, coef_mute_led_set
);
4631 /* turn on/off mic-mute LED per capture hook by coef bit */
4632 static int coef_micmute_led_set(struct led_classdev
*led_cdev
,
4633 enum led_brightness brightness
)
4635 struct hda_codec
*codec
= dev_to_hda_codec(led_cdev
->dev
->parent
);
4636 struct alc_spec
*spec
= codec
->spec
;
4638 alc_update_coef_led(codec
, &spec
->mic_led_coef
,
4639 spec
->micmute_led_polarity
, brightness
);
4643 static void alc285_fixup_hp_coef_micmute_led(struct hda_codec
*codec
,
4644 const struct hda_fixup
*fix
, int action
)
4646 struct alc_spec
*spec
= codec
->spec
;
4648 if (action
== HDA_FIXUP_ACT_PRE_PROBE
) {
4649 spec
->mic_led_coef
.idx
= 0x19;
4650 spec
->mic_led_coef
.mask
= 1 << 13;
4651 spec
->mic_led_coef
.on
= 1 << 13;
4652 spec
->mic_led_coef
.off
= 0;
4653 snd_hda_gen_add_micmute_led_cdev(codec
, coef_micmute_led_set
);
4657 static void alc236_fixup_hp_coef_micmute_led(struct hda_codec
*codec
,
4658 const struct hda_fixup
*fix
, int action
)
4660 struct alc_spec
*spec
= codec
->spec
;
4662 if (action
== HDA_FIXUP_ACT_PRE_PROBE
) {
4663 spec
->mic_led_coef
.idx
= 0x35;
4664 spec
->mic_led_coef
.mask
= 3 << 2;
4665 spec
->mic_led_coef
.on
= 2 << 2;
4666 spec
->mic_led_coef
.off
= 1 << 2;
4667 snd_hda_gen_add_micmute_led_cdev(codec
, coef_micmute_led_set
);
4671 static void alc285_fixup_hp_mute_led(struct hda_codec
*codec
,
4672 const struct hda_fixup
*fix
, int action
)
4674 alc285_fixup_hp_mute_led_coefbit(codec
, fix
, action
);
4675 alc285_fixup_hp_coef_micmute_led(codec
, fix
, action
);
4678 static void alc236_fixup_hp_mute_led(struct hda_codec
*codec
,
4679 const struct hda_fixup
*fix
, int action
)
4681 alc236_fixup_hp_mute_led_coefbit(codec
, fix
, action
);
4682 alc236_fixup_hp_coef_micmute_led(codec
, fix
, action
);
4685 static void alc236_fixup_hp_micmute_led_vref(struct hda_codec
*codec
,
4686 const struct hda_fixup
*fix
, int action
)
4688 struct alc_spec
*spec
= codec
->spec
;
4690 if (action
== HDA_FIXUP_ACT_PRE_PROBE
) {
4691 spec
->cap_mute_led_nid
= 0x1a;
4692 snd_hda_gen_add_micmute_led_cdev(codec
, vref_micmute_led_set
);
4693 codec
->power_filter
= led_power_filter
;
4697 static void alc236_fixup_hp_mute_led_micmute_vref(struct hda_codec
*codec
,
4698 const struct hda_fixup
*fix
, int action
)
4700 alc236_fixup_hp_mute_led_coefbit(codec
, fix
, action
);
4701 alc236_fixup_hp_micmute_led_vref(codec
, fix
, action
);
4704 static inline void alc298_samsung_write_coef_pack(struct hda_codec
*codec
,
4705 const unsigned short coefs
[2])
4707 alc_write_coef_idx(codec
, 0x23, coefs
[0]);
4708 alc_write_coef_idx(codec
, 0x25, coefs
[1]);
4709 alc_write_coef_idx(codec
, 0x26, 0xb011);
4712 struct alc298_samsung_amp_desc
{
4714 unsigned short init_seq
[2][2];
4717 static void alc298_fixup_samsung_amp(struct hda_codec
*codec
,
4718 const struct hda_fixup
*fix
, int action
)
4721 static const unsigned short init_seq
[][2] = {
4722 { 0x19, 0x00 }, { 0x20, 0xc0 }, { 0x22, 0x44 }, { 0x23, 0x08 },
4723 { 0x24, 0x85 }, { 0x25, 0x41 }, { 0x35, 0x40 }, { 0x36, 0x01 },
4724 { 0x38, 0x81 }, { 0x3a, 0x03 }, { 0x3b, 0x81 }, { 0x40, 0x3e },
4725 { 0x41, 0x07 }, { 0x400, 0x1 }
4727 static const struct alc298_samsung_amp_desc amps
[] = {
4728 { 0x3a, { { 0x18, 0x1 }, { 0x26, 0x0 } } },
4729 { 0x39, { { 0x18, 0x2 }, { 0x26, 0x1 } } }
4732 if (action
!= HDA_FIXUP_ACT_INIT
)
4735 for (i
= 0; i
< ARRAY_SIZE(amps
); i
++) {
4736 alc_write_coef_idx(codec
, 0x22, amps
[i
].nid
);
4738 for (j
= 0; j
< ARRAY_SIZE(amps
[i
].init_seq
); j
++)
4739 alc298_samsung_write_coef_pack(codec
, amps
[i
].init_seq
[j
]);
4741 for (j
= 0; j
< ARRAY_SIZE(init_seq
); j
++)
4742 alc298_samsung_write_coef_pack(codec
, init_seq
[j
]);
4746 #if IS_REACHABLE(CONFIG_INPUT)
4747 static void gpio2_mic_hotkey_event(struct hda_codec
*codec
,
4748 struct hda_jack_callback
*event
)
4750 struct alc_spec
*spec
= codec
->spec
;
4752 /* GPIO2 just toggles on a keypress/keyrelease cycle. Therefore
4753 send both key on and key off event for every interrupt. */
4754 input_report_key(spec
->kb_dev
, spec
->alc_mute_keycode_map
[ALC_KEY_MICMUTE_INDEX
], 1);
4755 input_sync(spec
->kb_dev
);
4756 input_report_key(spec
->kb_dev
, spec
->alc_mute_keycode_map
[ALC_KEY_MICMUTE_INDEX
], 0);
4757 input_sync(spec
->kb_dev
);
4760 static int alc_register_micmute_input_device(struct hda_codec
*codec
)
4762 struct alc_spec
*spec
= codec
->spec
;
4765 spec
->kb_dev
= input_allocate_device();
4766 if (!spec
->kb_dev
) {
4767 codec_err(codec
, "Out of memory (input_allocate_device)\n");
4771 spec
->alc_mute_keycode_map
[ALC_KEY_MICMUTE_INDEX
] = KEY_MICMUTE
;
4773 spec
->kb_dev
->name
= "Microphone Mute Button";
4774 spec
->kb_dev
->evbit
[0] = BIT_MASK(EV_KEY
);
4775 spec
->kb_dev
->keycodesize
= sizeof(spec
->alc_mute_keycode_map
[0]);
4776 spec
->kb_dev
->keycodemax
= ARRAY_SIZE(spec
->alc_mute_keycode_map
);
4777 spec
->kb_dev
->keycode
= spec
->alc_mute_keycode_map
;
4778 for (i
= 0; i
< ARRAY_SIZE(spec
->alc_mute_keycode_map
); i
++)
4779 set_bit(spec
->alc_mute_keycode_map
[i
], spec
->kb_dev
->keybit
);
4781 if (input_register_device(spec
->kb_dev
)) {
4782 codec_err(codec
, "input_register_device failed\n");
4783 input_free_device(spec
->kb_dev
);
4784 spec
->kb_dev
= NULL
;
4791 /* GPIO1 = set according to SKU external amp
4792 * GPIO2 = mic mute hotkey
4794 * GPIO4 = mic mute LED
4796 static void alc280_fixup_hp_gpio2_mic_hotkey(struct hda_codec
*codec
,
4797 const struct hda_fixup
*fix
, int action
)
4799 struct alc_spec
*spec
= codec
->spec
;
4801 alc_fixup_hp_gpio_led(codec
, action
, 0x08, 0x10);
4802 if (action
== HDA_FIXUP_ACT_PRE_PROBE
) {
4803 spec
->init_amp
= ALC_INIT_DEFAULT
;
4804 if (alc_register_micmute_input_device(codec
) != 0)
4807 spec
->gpio_mask
|= 0x06;
4808 spec
->gpio_dir
|= 0x02;
4809 spec
->gpio_data
|= 0x02;
4810 snd_hda_codec_write_cache(codec
, codec
->core
.afg
, 0,
4811 AC_VERB_SET_GPIO_UNSOLICITED_RSP_MASK
, 0x04);
4812 snd_hda_jack_detect_enable_callback(codec
, codec
->core
.afg
,
4813 gpio2_mic_hotkey_event
);
4821 case HDA_FIXUP_ACT_FREE
:
4822 input_unregister_device(spec
->kb_dev
);
4823 spec
->kb_dev
= NULL
;
4827 /* Line2 = mic mute hotkey
4828 * GPIO2 = mic mute LED
4830 static void alc233_fixup_lenovo_line2_mic_hotkey(struct hda_codec
*codec
,
4831 const struct hda_fixup
*fix
, int action
)
4833 struct alc_spec
*spec
= codec
->spec
;
4835 alc_fixup_hp_gpio_led(codec
, action
, 0, 0x04);
4836 if (action
== HDA_FIXUP_ACT_PRE_PROBE
) {
4837 spec
->init_amp
= ALC_INIT_DEFAULT
;
4838 if (alc_register_micmute_input_device(codec
) != 0)
4841 snd_hda_jack_detect_enable_callback(codec
, 0x1b,
4842 gpio2_mic_hotkey_event
);
4850 case HDA_FIXUP_ACT_FREE
:
4851 input_unregister_device(spec
->kb_dev
);
4852 spec
->kb_dev
= NULL
;
4856 #define alc280_fixup_hp_gpio2_mic_hotkey NULL
4857 #define alc233_fixup_lenovo_line2_mic_hotkey NULL
4860 static void alc269_fixup_hp_line1_mic1_led(struct hda_codec
*codec
,
4861 const struct hda_fixup
*fix
, int action
)
4863 struct alc_spec
*spec
= codec
->spec
;
4865 alc269_fixup_hp_mute_led_micx(codec
, fix
, action
, 0x1a);
4866 if (action
== HDA_FIXUP_ACT_PRE_PROBE
) {
4867 spec
->cap_mute_led_nid
= 0x18;
4868 snd_hda_gen_add_micmute_led_cdev(codec
, vref_micmute_led_set
);
4872 static const struct coef_fw alc225_pre_hsmode
[] = {
4873 UPDATE_COEF(0x4a, 1<<8, 0),
4874 UPDATE_COEFEX(0x57, 0x05, 1<<14, 0),
4875 UPDATE_COEF(0x63, 3<<14, 3<<14),
4876 UPDATE_COEF(0x4a, 3<<4, 2<<4),
4877 UPDATE_COEF(0x4a, 3<<10, 3<<10),
4878 UPDATE_COEF(0x45, 0x3f<<10, 0x34<<10),
4879 UPDATE_COEF(0x4a, 3<<10, 0),
4883 static void alc_headset_mode_unplugged(struct hda_codec
*codec
)
4885 struct alc_spec
*spec
= codec
->spec
;
4886 static const struct coef_fw coef0255
[] = {
4887 WRITE_COEF(0x1b, 0x0c0b), /* LDO and MISC control */
4888 WRITE_COEF(0x45, 0xd089), /* UAJ function set to menual mode */
4889 UPDATE_COEFEX(0x57, 0x05, 1<<14, 0), /* Direct Drive HP Amp control(Set to verb control)*/
4890 WRITE_COEF(0x06, 0x6104), /* Set MIC2 Vref gate with HP */
4891 WRITE_COEFEX(0x57, 0x03, 0x8aa6), /* Direct Drive HP Amp control */
4894 static const struct coef_fw coef0256
[] = {
4895 WRITE_COEF(0x1b, 0x0c4b), /* LDO and MISC control */
4896 WRITE_COEF(0x45, 0xd089), /* UAJ function set to menual mode */
4897 WRITE_COEF(0x06, 0x6104), /* Set MIC2 Vref gate with HP */
4898 WRITE_COEFEX(0x57, 0x03, 0x09a3), /* Direct Drive HP Amp control */
4899 UPDATE_COEFEX(0x57, 0x05, 1<<14, 0), /* Direct Drive HP Amp control(Set to verb control)*/
4902 static const struct coef_fw coef0233
[] = {
4903 WRITE_COEF(0x1b, 0x0c0b),
4904 WRITE_COEF(0x45, 0xc429),
4905 UPDATE_COEF(0x35, 0x4000, 0),
4906 WRITE_COEF(0x06, 0x2104),
4907 WRITE_COEF(0x1a, 0x0001),
4908 WRITE_COEF(0x26, 0x0004),
4909 WRITE_COEF(0x32, 0x42a3),
4912 static const struct coef_fw coef0288
[] = {
4913 UPDATE_COEF(0x4f, 0xfcc0, 0xc400),
4914 UPDATE_COEF(0x50, 0x2000, 0x2000),
4915 UPDATE_COEF(0x56, 0x0006, 0x0006),
4916 UPDATE_COEF(0x66, 0x0008, 0),
4917 UPDATE_COEF(0x67, 0x2000, 0),
4920 static const struct coef_fw coef0298
[] = {
4921 UPDATE_COEF(0x19, 0x1300, 0x0300),
4924 static const struct coef_fw coef0292
[] = {
4925 WRITE_COEF(0x76, 0x000e),
4926 WRITE_COEF(0x6c, 0x2400),
4927 WRITE_COEF(0x18, 0x7308),
4928 WRITE_COEF(0x6b, 0xc429),
4931 static const struct coef_fw coef0293
[] = {
4932 UPDATE_COEF(0x10, 7<<8, 6<<8), /* SET Line1 JD to 0 */
4933 UPDATE_COEFEX(0x57, 0x05, 1<<15|1<<13, 0x0), /* SET charge pump by verb */
4934 UPDATE_COEFEX(0x57, 0x03, 1<<10, 1<<10), /* SET EN_OSW to 1 */
4935 UPDATE_COEF(0x1a, 1<<3, 1<<3), /* Combo JD gating with LINE1-VREFO */
4936 WRITE_COEF(0x45, 0xc429), /* Set to TRS type */
4937 UPDATE_COEF(0x4a, 0x000f, 0x000e), /* Combo Jack auto detect */
4940 static const struct coef_fw coef0668
[] = {
4941 WRITE_COEF(0x15, 0x0d40),
4942 WRITE_COEF(0xb7, 0x802b),
4945 static const struct coef_fw coef0225
[] = {
4946 UPDATE_COEF(0x63, 3<<14, 0),
4949 static const struct coef_fw coef0274
[] = {
4950 UPDATE_COEF(0x4a, 0x0100, 0),
4951 UPDATE_COEFEX(0x57, 0x05, 0x4000, 0),
4952 UPDATE_COEF(0x6b, 0xf000, 0x5000),
4953 UPDATE_COEF(0x4a, 0x0010, 0),
4954 UPDATE_COEF(0x4a, 0x0c00, 0x0c00),
4955 WRITE_COEF(0x45, 0x5289),
4956 UPDATE_COEF(0x4a, 0x0c00, 0),
4960 if (spec
->no_internal_mic_pin
) {
4961 alc_update_coef_idx(codec
, 0x45, 0xf<<12 | 1<<10, 5<<12);
4965 switch (codec
->core
.vendor_id
) {
4967 alc_process_coef_fw(codec
, coef0255
);
4973 alc_process_coef_fw(codec
, coef0256
);
4978 alc_process_coef_fw(codec
, coef0274
);
4982 alc_process_coef_fw(codec
, coef0233
);
4986 alc_process_coef_fw(codec
, coef0288
);
4989 alc_process_coef_fw(codec
, coef0298
);
4990 alc_process_coef_fw(codec
, coef0288
);
4993 alc_process_coef_fw(codec
, coef0292
);
4996 alc_process_coef_fw(codec
, coef0293
);
4999 alc_process_coef_fw(codec
, coef0668
);
5007 alc_process_coef_fw(codec
, alc225_pre_hsmode
);
5008 alc_process_coef_fw(codec
, coef0225
);
5011 alc_update_coefex_idx(codec
, 0x57, 0x5, 1<<14, 0);
5014 codec_dbg(codec
, "Headset jack set to unplugged mode.\n");
5018 static void alc_headset_mode_mic_in(struct hda_codec
*codec
, hda_nid_t hp_pin
,
5021 static const struct coef_fw coef0255
[] = {
5022 WRITE_COEFEX(0x57, 0x03, 0x8aa6),
5023 WRITE_COEF(0x06, 0x6100), /* Set MIC2 Vref gate to normal */
5026 static const struct coef_fw coef0256
[] = {
5027 UPDATE_COEFEX(0x57, 0x05, 1<<14, 1<<14), /* Direct Drive HP Amp control(Set to verb control)*/
5028 WRITE_COEFEX(0x57, 0x03, 0x09a3),
5029 WRITE_COEF(0x06, 0x6100), /* Set MIC2 Vref gate to normal */
5032 static const struct coef_fw coef0233
[] = {
5033 UPDATE_COEF(0x35, 0, 1<<14),
5034 WRITE_COEF(0x06, 0x2100),
5035 WRITE_COEF(0x1a, 0x0021),
5036 WRITE_COEF(0x26, 0x008c),
5039 static const struct coef_fw coef0288
[] = {
5040 UPDATE_COEF(0x4f, 0x00c0, 0),
5041 UPDATE_COEF(0x50, 0x2000, 0),
5042 UPDATE_COEF(0x56, 0x0006, 0),
5043 UPDATE_COEF(0x4f, 0xfcc0, 0xc400),
5044 UPDATE_COEF(0x66, 0x0008, 0x0008),
5045 UPDATE_COEF(0x67, 0x2000, 0x2000),
5048 static const struct coef_fw coef0292
[] = {
5049 WRITE_COEF(0x19, 0xa208),
5050 WRITE_COEF(0x2e, 0xacf0),
5053 static const struct coef_fw coef0293
[] = {
5054 UPDATE_COEFEX(0x57, 0x05, 0, 1<<15|1<<13), /* SET charge pump by verb */
5055 UPDATE_COEFEX(0x57, 0x03, 1<<10, 0), /* SET EN_OSW to 0 */
5056 UPDATE_COEF(0x1a, 1<<3, 0), /* Combo JD gating without LINE1-VREFO */
5059 static const struct coef_fw coef0688
[] = {
5060 WRITE_COEF(0xb7, 0x802b),
5061 WRITE_COEF(0xb5, 0x1040),
5062 UPDATE_COEF(0xc3, 0, 1<<12),
5065 static const struct coef_fw coef0225
[] = {
5066 UPDATE_COEFEX(0x57, 0x05, 1<<14, 1<<14),
5067 UPDATE_COEF(0x4a, 3<<4, 2<<4),
5068 UPDATE_COEF(0x63, 3<<14, 0),
5071 static const struct coef_fw coef0274
[] = {
5072 UPDATE_COEFEX(0x57, 0x05, 0x4000, 0x4000),
5073 UPDATE_COEF(0x4a, 0x0010, 0),
5074 UPDATE_COEF(0x6b, 0xf000, 0),
5078 switch (codec
->core
.vendor_id
) {
5080 alc_write_coef_idx(codec
, 0x45, 0xc489);
5081 snd_hda_set_pin_ctl_cache(codec
, hp_pin
, 0);
5082 alc_process_coef_fw(codec
, coef0255
);
5083 snd_hda_set_pin_ctl_cache(codec
, mic_pin
, PIN_VREF50
);
5089 alc_write_coef_idx(codec
, 0x45, 0xc489);
5090 snd_hda_set_pin_ctl_cache(codec
, hp_pin
, 0);
5091 alc_process_coef_fw(codec
, coef0256
);
5092 snd_hda_set_pin_ctl_cache(codec
, mic_pin
, PIN_VREF50
);
5097 alc_write_coef_idx(codec
, 0x45, 0x4689);
5098 snd_hda_set_pin_ctl_cache(codec
, hp_pin
, 0);
5099 alc_process_coef_fw(codec
, coef0274
);
5100 snd_hda_set_pin_ctl_cache(codec
, mic_pin
, PIN_VREF50
);
5104 alc_write_coef_idx(codec
, 0x45, 0xc429);
5105 snd_hda_set_pin_ctl_cache(codec
, hp_pin
, 0);
5106 alc_process_coef_fw(codec
, coef0233
);
5107 snd_hda_set_pin_ctl_cache(codec
, mic_pin
, PIN_VREF50
);
5112 snd_hda_set_pin_ctl_cache(codec
, hp_pin
, 0);
5113 alc_process_coef_fw(codec
, coef0288
);
5114 snd_hda_set_pin_ctl_cache(codec
, mic_pin
, PIN_VREF50
);
5117 snd_hda_set_pin_ctl_cache(codec
, hp_pin
, 0);
5118 alc_process_coef_fw(codec
, coef0292
);
5121 /* Set to TRS mode */
5122 alc_write_coef_idx(codec
, 0x45, 0xc429);
5123 snd_hda_set_pin_ctl_cache(codec
, hp_pin
, 0);
5124 alc_process_coef_fw(codec
, coef0293
);
5125 snd_hda_set_pin_ctl_cache(codec
, mic_pin
, PIN_VREF50
);
5128 alc_update_coefex_idx(codec
, 0x57, 0x5, 0, 1<<14);
5132 snd_hda_set_pin_ctl_cache(codec
, hp_pin
, 0);
5133 snd_hda_set_pin_ctl_cache(codec
, mic_pin
, PIN_VREF50
);
5136 alc_write_coef_idx(codec
, 0x11, 0x0001);
5137 snd_hda_set_pin_ctl_cache(codec
, hp_pin
, 0);
5138 alc_process_coef_fw(codec
, coef0688
);
5139 snd_hda_set_pin_ctl_cache(codec
, mic_pin
, PIN_VREF50
);
5147 alc_process_coef_fw(codec
, alc225_pre_hsmode
);
5148 alc_update_coef_idx(codec
, 0x45, 0x3f<<10, 0x31<<10);
5149 snd_hda_set_pin_ctl_cache(codec
, hp_pin
, 0);
5150 alc_process_coef_fw(codec
, coef0225
);
5151 snd_hda_set_pin_ctl_cache(codec
, mic_pin
, PIN_VREF50
);
5154 codec_dbg(codec
, "Headset jack set to mic-in mode.\n");
5157 static void alc_headset_mode_default(struct hda_codec
*codec
)
5159 static const struct coef_fw coef0225
[] = {
5160 UPDATE_COEF(0x45, 0x3f<<10, 0x30<<10),
5161 UPDATE_COEF(0x45, 0x3f<<10, 0x31<<10),
5162 UPDATE_COEF(0x49, 3<<8, 0<<8),
5163 UPDATE_COEF(0x4a, 3<<4, 3<<4),
5164 UPDATE_COEF(0x63, 3<<14, 0),
5165 UPDATE_COEF(0x67, 0xf000, 0x3000),
5168 static const struct coef_fw coef0255
[] = {
5169 WRITE_COEF(0x45, 0xc089),
5170 WRITE_COEF(0x45, 0xc489),
5171 WRITE_COEFEX(0x57, 0x03, 0x8ea6),
5172 WRITE_COEF(0x49, 0x0049),
5175 static const struct coef_fw coef0256
[] = {
5176 WRITE_COEF(0x45, 0xc489),
5177 WRITE_COEFEX(0x57, 0x03, 0x0da3),
5178 WRITE_COEF(0x49, 0x0049),
5179 UPDATE_COEFEX(0x57, 0x05, 1<<14, 0), /* Direct Drive HP Amp control(Set to verb control)*/
5180 WRITE_COEF(0x06, 0x6100),
5183 static const struct coef_fw coef0233
[] = {
5184 WRITE_COEF(0x06, 0x2100),
5185 WRITE_COEF(0x32, 0x4ea3),
5188 static const struct coef_fw coef0288
[] = {
5189 UPDATE_COEF(0x4f, 0xfcc0, 0xc400), /* Set to TRS type */
5190 UPDATE_COEF(0x50, 0x2000, 0x2000),
5191 UPDATE_COEF(0x56, 0x0006, 0x0006),
5192 UPDATE_COEF(0x66, 0x0008, 0),
5193 UPDATE_COEF(0x67, 0x2000, 0),
5196 static const struct coef_fw coef0292
[] = {
5197 WRITE_COEF(0x76, 0x000e),
5198 WRITE_COEF(0x6c, 0x2400),
5199 WRITE_COEF(0x6b, 0xc429),
5200 WRITE_COEF(0x18, 0x7308),
5203 static const struct coef_fw coef0293
[] = {
5204 UPDATE_COEF(0x4a, 0x000f, 0x000e), /* Combo Jack auto detect */
5205 WRITE_COEF(0x45, 0xC429), /* Set to TRS type */
5206 UPDATE_COEF(0x1a, 1<<3, 0), /* Combo JD gating without LINE1-VREFO */
5209 static const struct coef_fw coef0688
[] = {
5210 WRITE_COEF(0x11, 0x0041),
5211 WRITE_COEF(0x15, 0x0d40),
5212 WRITE_COEF(0xb7, 0x802b),
5215 static const struct coef_fw coef0274
[] = {
5216 WRITE_COEF(0x45, 0x4289),
5217 UPDATE_COEF(0x4a, 0x0010, 0x0010),
5218 UPDATE_COEF(0x6b, 0x0f00, 0),
5219 UPDATE_COEF(0x49, 0x0300, 0x0300),
5223 switch (codec
->core
.vendor_id
) {
5230 alc_process_coef_fw(codec
, alc225_pre_hsmode
);
5231 alc_process_coef_fw(codec
, coef0225
);
5234 alc_process_coef_fw(codec
, coef0255
);
5240 alc_write_coef_idx(codec
, 0x1b, 0x0e4b);
5241 alc_write_coef_idx(codec
, 0x45, 0xc089);
5243 alc_process_coef_fw(codec
, coef0256
);
5248 alc_process_coef_fw(codec
, coef0274
);
5252 alc_process_coef_fw(codec
, coef0233
);
5257 alc_process_coef_fw(codec
, coef0288
);
5260 alc_process_coef_fw(codec
, coef0292
);
5263 alc_process_coef_fw(codec
, coef0293
);
5266 alc_process_coef_fw(codec
, coef0688
);
5269 alc_update_coefex_idx(codec
, 0x57, 0x5, 1<<14, 0);
5272 codec_dbg(codec
, "Headset jack set to headphone (default) mode.\n");
5276 static void alc_headset_mode_ctia(struct hda_codec
*codec
)
5280 static const struct coef_fw coef0255
[] = {
5281 WRITE_COEF(0x45, 0xd489), /* Set to CTIA type */
5282 WRITE_COEF(0x1b, 0x0c2b),
5283 WRITE_COEFEX(0x57, 0x03, 0x8ea6),
5286 static const struct coef_fw coef0256
[] = {
5287 WRITE_COEF(0x45, 0xd489), /* Set to CTIA type */
5288 WRITE_COEF(0x1b, 0x0e6b),
5291 static const struct coef_fw coef0233
[] = {
5292 WRITE_COEF(0x45, 0xd429),
5293 WRITE_COEF(0x1b, 0x0c2b),
5294 WRITE_COEF(0x32, 0x4ea3),
5297 static const struct coef_fw coef0288
[] = {
5298 UPDATE_COEF(0x50, 0x2000, 0x2000),
5299 UPDATE_COEF(0x56, 0x0006, 0x0006),
5300 UPDATE_COEF(0x66, 0x0008, 0),
5301 UPDATE_COEF(0x67, 0x2000, 0),
5304 static const struct coef_fw coef0292
[] = {
5305 WRITE_COEF(0x6b, 0xd429),
5306 WRITE_COEF(0x76, 0x0008),
5307 WRITE_COEF(0x18, 0x7388),
5310 static const struct coef_fw coef0293
[] = {
5311 WRITE_COEF(0x45, 0xd429), /* Set to ctia type */
5312 UPDATE_COEF(0x10, 7<<8, 7<<8), /* SET Line1 JD to 1 */
5315 static const struct coef_fw coef0688
[] = {
5316 WRITE_COEF(0x11, 0x0001),
5317 WRITE_COEF(0x15, 0x0d60),
5318 WRITE_COEF(0xc3, 0x0000),
5321 static const struct coef_fw coef0225_1
[] = {
5322 UPDATE_COEF(0x45, 0x3f<<10, 0x35<<10),
5323 UPDATE_COEF(0x63, 3<<14, 2<<14),
5326 static const struct coef_fw coef0225_2
[] = {
5327 UPDATE_COEF(0x45, 0x3f<<10, 0x35<<10),
5328 UPDATE_COEF(0x63, 3<<14, 1<<14),
5332 switch (codec
->core
.vendor_id
) {
5334 alc_process_coef_fw(codec
, coef0255
);
5340 alc_process_coef_fw(codec
, coef0256
);
5345 alc_write_coef_idx(codec
, 0x45, 0xd689);
5349 alc_process_coef_fw(codec
, coef0233
);
5352 val
= alc_read_coef_idx(codec
, 0x50);
5353 if (val
& (1 << 12)) {
5354 alc_update_coef_idx(codec
, 0x8e, 0x0070, 0x0020);
5355 alc_update_coef_idx(codec
, 0x4f, 0xfcc0, 0xd400);
5358 alc_update_coef_idx(codec
, 0x8e, 0x0070, 0x0010);
5359 alc_update_coef_idx(codec
, 0x4f, 0xfcc0, 0xd400);
5365 alc_update_coef_idx(codec
, 0x4f, 0xfcc0, 0xd400);
5367 alc_process_coef_fw(codec
, coef0288
);
5370 alc_process_coef_fw(codec
, coef0292
);
5373 alc_process_coef_fw(codec
, coef0293
);
5376 alc_process_coef_fw(codec
, coef0688
);
5384 val
= alc_read_coef_idx(codec
, 0x45);
5386 alc_process_coef_fw(codec
, coef0225_2
);
5388 alc_process_coef_fw(codec
, coef0225_1
);
5391 alc_update_coefex_idx(codec
, 0x57, 0x5, 1<<14, 0);
5394 codec_dbg(codec
, "Headset jack set to iPhone-style headset mode.\n");
5398 static void alc_headset_mode_omtp(struct hda_codec
*codec
)
5400 static const struct coef_fw coef0255
[] = {
5401 WRITE_COEF(0x45, 0xe489), /* Set to OMTP Type */
5402 WRITE_COEF(0x1b, 0x0c2b),
5403 WRITE_COEFEX(0x57, 0x03, 0x8ea6),
5406 static const struct coef_fw coef0256
[] = {
5407 WRITE_COEF(0x45, 0xe489), /* Set to OMTP Type */
5408 WRITE_COEF(0x1b, 0x0e6b),
5411 static const struct coef_fw coef0233
[] = {
5412 WRITE_COEF(0x45, 0xe429),
5413 WRITE_COEF(0x1b, 0x0c2b),
5414 WRITE_COEF(0x32, 0x4ea3),
5417 static const struct coef_fw coef0288
[] = {
5418 UPDATE_COEF(0x50, 0x2000, 0x2000),
5419 UPDATE_COEF(0x56, 0x0006, 0x0006),
5420 UPDATE_COEF(0x66, 0x0008, 0),
5421 UPDATE_COEF(0x67, 0x2000, 0),
5424 static const struct coef_fw coef0292
[] = {
5425 WRITE_COEF(0x6b, 0xe429),
5426 WRITE_COEF(0x76, 0x0008),
5427 WRITE_COEF(0x18, 0x7388),
5430 static const struct coef_fw coef0293
[] = {
5431 WRITE_COEF(0x45, 0xe429), /* Set to omtp type */
5432 UPDATE_COEF(0x10, 7<<8, 7<<8), /* SET Line1 JD to 1 */
5435 static const struct coef_fw coef0688
[] = {
5436 WRITE_COEF(0x11, 0x0001),
5437 WRITE_COEF(0x15, 0x0d50),
5438 WRITE_COEF(0xc3, 0x0000),
5441 static const struct coef_fw coef0225
[] = {
5442 UPDATE_COEF(0x45, 0x3f<<10, 0x39<<10),
5443 UPDATE_COEF(0x63, 3<<14, 2<<14),
5447 switch (codec
->core
.vendor_id
) {
5449 alc_process_coef_fw(codec
, coef0255
);
5455 alc_process_coef_fw(codec
, coef0256
);
5460 alc_write_coef_idx(codec
, 0x45, 0xe689);
5464 alc_process_coef_fw(codec
, coef0233
);
5467 alc_update_coef_idx(codec
, 0x8e, 0x0070, 0x0010);/* Headset output enable */
5468 alc_update_coef_idx(codec
, 0x4f, 0xfcc0, 0xe400);
5473 alc_update_coef_idx(codec
, 0x4f, 0xfcc0, 0xe400);
5475 alc_process_coef_fw(codec
, coef0288
);
5478 alc_process_coef_fw(codec
, coef0292
);
5481 alc_process_coef_fw(codec
, coef0293
);
5484 alc_process_coef_fw(codec
, coef0688
);
5492 alc_process_coef_fw(codec
, coef0225
);
5495 codec_dbg(codec
, "Headset jack set to Nokia-style headset mode.\n");
5498 static void alc_determine_headset_type(struct hda_codec
*codec
)
5501 bool is_ctia
= false;
5502 struct alc_spec
*spec
= codec
->spec
;
5503 static const struct coef_fw coef0255
[] = {
5504 WRITE_COEF(0x45, 0xd089), /* combo jack auto switch control(Check type)*/
5505 WRITE_COEF(0x49, 0x0149), /* combo jack auto switch control(Vref
5509 static const struct coef_fw coef0288
[] = {
5510 UPDATE_COEF(0x4f, 0xfcc0, 0xd400), /* Check Type */
5513 static const struct coef_fw coef0298
[] = {
5514 UPDATE_COEF(0x50, 0x2000, 0x2000),
5515 UPDATE_COEF(0x56, 0x0006, 0x0006),
5516 UPDATE_COEF(0x66, 0x0008, 0),
5517 UPDATE_COEF(0x67, 0x2000, 0),
5518 UPDATE_COEF(0x19, 0x1300, 0x1300),
5521 static const struct coef_fw coef0293
[] = {
5522 UPDATE_COEF(0x4a, 0x000f, 0x0008), /* Combo Jack auto detect */
5523 WRITE_COEF(0x45, 0xD429), /* Set to ctia type */
5526 static const struct coef_fw coef0688
[] = {
5527 WRITE_COEF(0x11, 0x0001),
5528 WRITE_COEF(0xb7, 0x802b),
5529 WRITE_COEF(0x15, 0x0d60),
5530 WRITE_COEF(0xc3, 0x0c00),
5533 static const struct coef_fw coef0274
[] = {
5534 UPDATE_COEF(0x4a, 0x0010, 0),
5535 UPDATE_COEF(0x4a, 0x8000, 0),
5536 WRITE_COEF(0x45, 0xd289),
5537 UPDATE_COEF(0x49, 0x0300, 0x0300),
5541 if (spec
->no_internal_mic_pin
) {
5542 alc_update_coef_idx(codec
, 0x45, 0xf<<12 | 1<<10, 5<<12);
5546 switch (codec
->core
.vendor_id
) {
5548 alc_process_coef_fw(codec
, coef0255
);
5550 val
= alc_read_coef_idx(codec
, 0x46);
5551 is_ctia
= (val
& 0x0070) == 0x0070;
5557 alc_write_coef_idx(codec
, 0x1b, 0x0e4b);
5558 alc_write_coef_idx(codec
, 0x06, 0x6104);
5559 alc_write_coefex_idx(codec
, 0x57, 0x3, 0x09a3);
5561 snd_hda_codec_write(codec
, 0x21, 0,
5562 AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_MUTE
);
5564 snd_hda_codec_write(codec
, 0x21, 0,
5565 AC_VERB_SET_PIN_WIDGET_CONTROL
, 0x0);
5567 alc_process_coef_fw(codec
, coef0255
);
5569 val
= alc_read_coef_idx(codec
, 0x46);
5570 is_ctia
= (val
& 0x0070) == 0x0070;
5572 alc_write_coefex_idx(codec
, 0x57, 0x3, 0x0da3);
5573 alc_update_coefex_idx(codec
, 0x57, 0x5, 1<<14, 0);
5575 snd_hda_codec_write(codec
, 0x21, 0,
5576 AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_OUT
);
5578 snd_hda_codec_write(codec
, 0x21, 0,
5579 AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_UNMUTE
);
5584 alc_process_coef_fw(codec
, coef0274
);
5586 val
= alc_read_coef_idx(codec
, 0x46);
5587 is_ctia
= (val
& 0x00f0) == 0x00f0;
5591 alc_write_coef_idx(codec
, 0x45, 0xd029);
5593 val
= alc_read_coef_idx(codec
, 0x46);
5594 is_ctia
= (val
& 0x0070) == 0x0070;
5597 snd_hda_codec_write(codec
, 0x21, 0,
5598 AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_MUTE
);
5600 snd_hda_codec_write(codec
, 0x21, 0,
5601 AC_VERB_SET_PIN_WIDGET_CONTROL
, 0x0);
5604 val
= alc_read_coef_idx(codec
, 0x50);
5605 if (val
& (1 << 12)) {
5606 alc_update_coef_idx(codec
, 0x8e, 0x0070, 0x0020);
5607 alc_process_coef_fw(codec
, coef0288
);
5609 val
= alc_read_coef_idx(codec
, 0x50);
5610 is_ctia
= (val
& 0x0070) == 0x0070;
5612 alc_update_coef_idx(codec
, 0x8e, 0x0070, 0x0010);
5613 alc_process_coef_fw(codec
, coef0288
);
5615 val
= alc_read_coef_idx(codec
, 0x50);
5616 is_ctia
= (val
& 0x0070) == 0x0070;
5618 alc_process_coef_fw(codec
, coef0298
);
5619 snd_hda_codec_write(codec
, 0x21, 0,
5620 AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_HP
);
5622 snd_hda_codec_write(codec
, 0x21, 0,
5623 AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_UNMUTE
);
5627 alc_process_coef_fw(codec
, coef0288
);
5629 val
= alc_read_coef_idx(codec
, 0x50);
5630 is_ctia
= (val
& 0x0070) == 0x0070;
5633 alc_write_coef_idx(codec
, 0x6b, 0xd429);
5635 val
= alc_read_coef_idx(codec
, 0x6c);
5636 is_ctia
= (val
& 0x001c) == 0x001c;
5639 alc_process_coef_fw(codec
, coef0293
);
5641 val
= alc_read_coef_idx(codec
, 0x46);
5642 is_ctia
= (val
& 0x0070) == 0x0070;
5645 alc_process_coef_fw(codec
, coef0688
);
5647 val
= alc_read_coef_idx(codec
, 0xbe);
5648 is_ctia
= (val
& 0x1c02) == 0x1c02;
5656 snd_hda_codec_write(codec
, 0x21, 0,
5657 AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_MUTE
);
5659 snd_hda_codec_write(codec
, 0x21, 0,
5660 AC_VERB_SET_PIN_WIDGET_CONTROL
, 0x0);
5662 alc_process_coef_fw(codec
, alc225_pre_hsmode
);
5663 alc_update_coef_idx(codec
, 0x67, 0xf000, 0x1000);
5664 val
= alc_read_coef_idx(codec
, 0x45);
5665 if (val
& (1 << 9)) {
5666 alc_update_coef_idx(codec
, 0x45, 0x3f<<10, 0x34<<10);
5667 alc_update_coef_idx(codec
, 0x49, 3<<8, 2<<8);
5669 val
= alc_read_coef_idx(codec
, 0x46);
5670 is_ctia
= (val
& 0x00f0) == 0x00f0;
5672 alc_update_coef_idx(codec
, 0x45, 0x3f<<10, 0x34<<10);
5673 alc_update_coef_idx(codec
, 0x49, 3<<8, 1<<8);
5675 val
= alc_read_coef_idx(codec
, 0x46);
5676 is_ctia
= (val
& 0x00f0) == 0x00f0;
5678 alc_update_coef_idx(codec
, 0x4a, 7<<6, 7<<6);
5679 alc_update_coef_idx(codec
, 0x4a, 3<<4, 3<<4);
5680 alc_update_coef_idx(codec
, 0x67, 0xf000, 0x3000);
5682 snd_hda_codec_write(codec
, 0x21, 0,
5683 AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_OUT
);
5685 snd_hda_codec_write(codec
, 0x21, 0,
5686 AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_UNMUTE
);
5693 codec_dbg(codec
, "Headset jack detected iPhone-style headset: %s\n",
5694 is_ctia
? "yes" : "no");
5695 spec
->current_headset_type
= is_ctia
? ALC_HEADSET_TYPE_CTIA
: ALC_HEADSET_TYPE_OMTP
;
5698 static void alc_update_headset_mode(struct hda_codec
*codec
)
5700 struct alc_spec
*spec
= codec
->spec
;
5702 hda_nid_t mux_pin
= spec
->gen
.imux_pins
[spec
->gen
.cur_mux
[0]];
5703 hda_nid_t hp_pin
= alc_get_hp_pin(spec
);
5705 int new_headset_mode
;
5707 if (!snd_hda_jack_detect(codec
, hp_pin
))
5708 new_headset_mode
= ALC_HEADSET_MODE_UNPLUGGED
;
5709 else if (mux_pin
== spec
->headset_mic_pin
)
5710 new_headset_mode
= ALC_HEADSET_MODE_HEADSET
;
5711 else if (mux_pin
== spec
->headphone_mic_pin
)
5712 new_headset_mode
= ALC_HEADSET_MODE_MIC
;
5714 new_headset_mode
= ALC_HEADSET_MODE_HEADPHONE
;
5716 if (new_headset_mode
== spec
->current_headset_mode
) {
5717 snd_hda_gen_update_outputs(codec
);
5721 switch (new_headset_mode
) {
5722 case ALC_HEADSET_MODE_UNPLUGGED
:
5723 alc_headset_mode_unplugged(codec
);
5724 spec
->current_headset_mode
= ALC_HEADSET_MODE_UNKNOWN
;
5725 spec
->current_headset_type
= ALC_HEADSET_TYPE_UNKNOWN
;
5726 spec
->gen
.hp_jack_present
= false;
5728 case ALC_HEADSET_MODE_HEADSET
:
5729 if (spec
->current_headset_type
== ALC_HEADSET_TYPE_UNKNOWN
)
5730 alc_determine_headset_type(codec
);
5731 if (spec
->current_headset_type
== ALC_HEADSET_TYPE_CTIA
)
5732 alc_headset_mode_ctia(codec
);
5733 else if (spec
->current_headset_type
== ALC_HEADSET_TYPE_OMTP
)
5734 alc_headset_mode_omtp(codec
);
5735 spec
->gen
.hp_jack_present
= true;
5737 case ALC_HEADSET_MODE_MIC
:
5738 alc_headset_mode_mic_in(codec
, hp_pin
, spec
->headphone_mic_pin
);
5739 spec
->gen
.hp_jack_present
= false;
5741 case ALC_HEADSET_MODE_HEADPHONE
:
5742 alc_headset_mode_default(codec
);
5743 spec
->gen
.hp_jack_present
= true;
5746 if (new_headset_mode
!= ALC_HEADSET_MODE_MIC
) {
5747 snd_hda_set_pin_ctl_cache(codec
, hp_pin
,
5748 AC_PINCTL_OUT_EN
| AC_PINCTL_HP_EN
);
5749 if (spec
->headphone_mic_pin
&& spec
->headphone_mic_pin
!= hp_pin
)
5750 snd_hda_set_pin_ctl_cache(codec
, spec
->headphone_mic_pin
,
5753 spec
->current_headset_mode
= new_headset_mode
;
5755 snd_hda_gen_update_outputs(codec
);
5758 static void alc_update_headset_mode_hook(struct hda_codec
*codec
,
5759 struct snd_kcontrol
*kcontrol
,
5760 struct snd_ctl_elem_value
*ucontrol
)
5762 alc_update_headset_mode(codec
);
5765 static void alc_update_headset_jack_cb(struct hda_codec
*codec
,
5766 struct hda_jack_callback
*jack
)
5768 snd_hda_gen_hp_automute(codec
, jack
);
5769 alc_update_headset_mode(codec
);
5772 static void alc_probe_headset_mode(struct hda_codec
*codec
)
5775 struct alc_spec
*spec
= codec
->spec
;
5776 struct auto_pin_cfg
*cfg
= &spec
->gen
.autocfg
;
5779 for (i
= 0; i
< cfg
->num_inputs
; i
++) {
5780 if (cfg
->inputs
[i
].is_headset_mic
&& !spec
->headset_mic_pin
)
5781 spec
->headset_mic_pin
= cfg
->inputs
[i
].pin
;
5782 if (cfg
->inputs
[i
].is_headphone_mic
&& !spec
->headphone_mic_pin
)
5783 spec
->headphone_mic_pin
= cfg
->inputs
[i
].pin
;
5786 WARN_ON(spec
->gen
.cap_sync_hook
);
5787 spec
->gen
.cap_sync_hook
= alc_update_headset_mode_hook
;
5788 spec
->gen
.automute_hook
= alc_update_headset_mode
;
5789 spec
->gen
.hp_automute_hook
= alc_update_headset_jack_cb
;
5792 static void alc_fixup_headset_mode(struct hda_codec
*codec
,
5793 const struct hda_fixup
*fix
, int action
)
5795 struct alc_spec
*spec
= codec
->spec
;
5798 case HDA_FIXUP_ACT_PRE_PROBE
:
5799 spec
->parse_flags
|= HDA_PINCFG_HEADSET_MIC
| HDA_PINCFG_HEADPHONE_MIC
;
5801 case HDA_FIXUP_ACT_PROBE
:
5802 alc_probe_headset_mode(codec
);
5804 case HDA_FIXUP_ACT_INIT
:
5805 if (is_s3_resume(codec
) || is_s4_resume(codec
)) {
5806 spec
->current_headset_mode
= ALC_HEADSET_MODE_UNKNOWN
;
5807 spec
->current_headset_type
= ALC_HEADSET_TYPE_UNKNOWN
;
5809 alc_update_headset_mode(codec
);
5814 static void alc_fixup_headset_mode_no_hp_mic(struct hda_codec
*codec
,
5815 const struct hda_fixup
*fix
, int action
)
5817 if (action
== HDA_FIXUP_ACT_PRE_PROBE
) {
5818 struct alc_spec
*spec
= codec
->spec
;
5819 spec
->parse_flags
|= HDA_PINCFG_HEADSET_MIC
;
5822 alc_fixup_headset_mode(codec
, fix
, action
);
5825 static void alc255_set_default_jack_type(struct hda_codec
*codec
)
5827 /* Set to iphone type */
5828 static const struct coef_fw alc255fw
[] = {
5829 WRITE_COEF(0x1b, 0x880b),
5830 WRITE_COEF(0x45, 0xd089),
5831 WRITE_COEF(0x1b, 0x080b),
5832 WRITE_COEF(0x46, 0x0004),
5833 WRITE_COEF(0x1b, 0x0c0b),
5836 static const struct coef_fw alc256fw
[] = {
5837 WRITE_COEF(0x1b, 0x884b),
5838 WRITE_COEF(0x45, 0xd089),
5839 WRITE_COEF(0x1b, 0x084b),
5840 WRITE_COEF(0x46, 0x0004),
5841 WRITE_COEF(0x1b, 0x0c4b),
5844 switch (codec
->core
.vendor_id
) {
5846 alc_process_coef_fw(codec
, alc255fw
);
5852 alc_process_coef_fw(codec
, alc256fw
);
5858 static void alc_fixup_headset_mode_alc255(struct hda_codec
*codec
,
5859 const struct hda_fixup
*fix
, int action
)
5861 if (action
== HDA_FIXUP_ACT_PRE_PROBE
) {
5862 alc255_set_default_jack_type(codec
);
5864 alc_fixup_headset_mode(codec
, fix
, action
);
5867 static void alc_fixup_headset_mode_alc255_no_hp_mic(struct hda_codec
*codec
,
5868 const struct hda_fixup
*fix
, int action
)
5870 if (action
== HDA_FIXUP_ACT_PRE_PROBE
) {
5871 struct alc_spec
*spec
= codec
->spec
;
5872 spec
->parse_flags
|= HDA_PINCFG_HEADSET_MIC
;
5873 alc255_set_default_jack_type(codec
);
5876 alc_fixup_headset_mode(codec
, fix
, action
);
5879 static void alc288_update_headset_jack_cb(struct hda_codec
*codec
,
5880 struct hda_jack_callback
*jack
)
5882 struct alc_spec
*spec
= codec
->spec
;
5884 alc_update_headset_jack_cb(codec
, jack
);
5885 /* Headset Mic enable or disable, only for Dell Dino */
5886 alc_update_gpio_data(codec
, 0x40, spec
->gen
.hp_jack_present
);
5889 static void alc_fixup_headset_mode_dell_alc288(struct hda_codec
*codec
,
5890 const struct hda_fixup
*fix
, int action
)
5892 alc_fixup_headset_mode(codec
, fix
, action
);
5893 if (action
== HDA_FIXUP_ACT_PROBE
) {
5894 struct alc_spec
*spec
= codec
->spec
;
5895 /* toggled via hp_automute_hook */
5896 spec
->gpio_mask
|= 0x40;
5897 spec
->gpio_dir
|= 0x40;
5898 spec
->gen
.hp_automute_hook
= alc288_update_headset_jack_cb
;
5902 static void alc_fixup_auto_mute_via_amp(struct hda_codec
*codec
,
5903 const struct hda_fixup
*fix
, int action
)
5905 if (action
== HDA_FIXUP_ACT_PRE_PROBE
) {
5906 struct alc_spec
*spec
= codec
->spec
;
5907 spec
->gen
.auto_mute_via_amp
= 1;
5911 static void alc_fixup_no_shutup(struct hda_codec
*codec
,
5912 const struct hda_fixup
*fix
, int action
)
5914 if (action
== HDA_FIXUP_ACT_PRE_PROBE
) {
5915 struct alc_spec
*spec
= codec
->spec
;
5916 spec
->no_shutup_pins
= 1;
5920 static void alc_fixup_disable_aamix(struct hda_codec
*codec
,
5921 const struct hda_fixup
*fix
, int action
)
5923 if (action
== HDA_FIXUP_ACT_PRE_PROBE
) {
5924 struct alc_spec
*spec
= codec
->spec
;
5925 /* Disable AA-loopback as it causes white noise */
5926 spec
->gen
.mixer_nid
= 0;
5930 /* fixup for Thinkpad docks: add dock pins, avoid HP parser fixup */
5931 static void alc_fixup_tpt440_dock(struct hda_codec
*codec
,
5932 const struct hda_fixup
*fix
, int action
)
5934 static const struct hda_pintbl pincfgs
[] = {
5935 { 0x16, 0x21211010 }, /* dock headphone */
5936 { 0x19, 0x21a11010 }, /* dock mic */
5939 struct alc_spec
*spec
= codec
->spec
;
5941 if (action
== HDA_FIXUP_ACT_PRE_PROBE
) {
5942 spec
->parse_flags
= HDA_PINCFG_NO_HP_FIXUP
;
5943 codec
->power_save_node
= 0; /* avoid click noises */
5944 snd_hda_apply_pincfgs(codec
, pincfgs
);
5948 static void alc_fixup_tpt470_dock(struct hda_codec
*codec
,
5949 const struct hda_fixup
*fix
, int action
)
5951 static const struct hda_pintbl pincfgs
[] = {
5952 { 0x17, 0x21211010 }, /* dock headphone */
5953 { 0x19, 0x21a11010 }, /* dock mic */
5956 struct alc_spec
*spec
= codec
->spec
;
5958 if (action
== HDA_FIXUP_ACT_PRE_PROBE
) {
5959 spec
->parse_flags
= HDA_PINCFG_NO_HP_FIXUP
;
5960 snd_hda_apply_pincfgs(codec
, pincfgs
);
5961 } else if (action
== HDA_FIXUP_ACT_INIT
) {
5962 /* Enable DOCK device */
5963 snd_hda_codec_write(codec
, 0x17, 0,
5964 AC_VERB_SET_CONFIG_DEFAULT_BYTES_3
, 0);
5965 /* Enable DOCK device */
5966 snd_hda_codec_write(codec
, 0x19, 0,
5967 AC_VERB_SET_CONFIG_DEFAULT_BYTES_3
, 0);
5971 static void alc_fixup_tpt470_dacs(struct hda_codec
*codec
,
5972 const struct hda_fixup
*fix
, int action
)
5974 /* Assure the speaker pin to be coupled with DAC NID 0x03; otherwise
5975 * the speaker output becomes too low by some reason on Thinkpads with
5978 static const hda_nid_t preferred_pairs
[] = {
5979 0x14, 0x03, 0x17, 0x02, 0x21, 0x02,
5982 struct alc_spec
*spec
= codec
->spec
;
5984 if (action
== HDA_FIXUP_ACT_PRE_PROBE
)
5985 spec
->gen
.preferred_dacs
= preferred_pairs
;
5988 static void alc295_fixup_asus_dacs(struct hda_codec
*codec
,
5989 const struct hda_fixup
*fix
, int action
)
5991 static const hda_nid_t preferred_pairs
[] = {
5992 0x17, 0x02, 0x21, 0x03, 0
5994 struct alc_spec
*spec
= codec
->spec
;
5996 if (action
== HDA_FIXUP_ACT_PRE_PROBE
)
5997 spec
->gen
.preferred_dacs
= preferred_pairs
;
6000 static void alc_shutup_dell_xps13(struct hda_codec
*codec
)
6002 struct alc_spec
*spec
= codec
->spec
;
6003 int hp_pin
= alc_get_hp_pin(spec
);
6005 /* Prevent pop noises when headphones are plugged in */
6006 snd_hda_codec_write(codec
, hp_pin
, 0,
6007 AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_MUTE
);
6011 static void alc_fixup_dell_xps13(struct hda_codec
*codec
,
6012 const struct hda_fixup
*fix
, int action
)
6014 struct alc_spec
*spec
= codec
->spec
;
6015 struct hda_input_mux
*imux
= &spec
->gen
.input_mux
;
6019 case HDA_FIXUP_ACT_PRE_PROBE
:
6020 /* mic pin 0x19 must be initialized with Vref Hi-Z, otherwise
6021 * it causes a click noise at start up
6023 snd_hda_codec_set_pin_target(codec
, 0x19, PIN_VREFHIZ
);
6024 spec
->shutup
= alc_shutup_dell_xps13
;
6026 case HDA_FIXUP_ACT_PROBE
:
6027 /* Make the internal mic the default input source. */
6028 for (i
= 0; i
< imux
->num_items
; i
++) {
6029 if (spec
->gen
.imux_pins
[i
] == 0x12) {
6030 spec
->gen
.cur_mux
[0] = i
;
6038 static void alc_fixup_headset_mode_alc662(struct hda_codec
*codec
,
6039 const struct hda_fixup
*fix
, int action
)
6041 struct alc_spec
*spec
= codec
->spec
;
6043 if (action
== HDA_FIXUP_ACT_PRE_PROBE
) {
6044 spec
->parse_flags
|= HDA_PINCFG_HEADSET_MIC
;
6045 spec
->gen
.hp_mic
= 1; /* Mic-in is same pin as headphone */
6047 /* Disable boost for mic-in permanently. (This code is only called
6048 from quirks that guarantee that the headphone is at NID 0x1b.) */
6049 snd_hda_codec_write(codec
, 0x1b, 0, AC_VERB_SET_AMP_GAIN_MUTE
, 0x7000);
6050 snd_hda_override_wcaps(codec
, 0x1b, get_wcaps(codec
, 0x1b) & ~AC_WCAP_IN_AMP
);
6052 alc_fixup_headset_mode(codec
, fix
, action
);
6055 static void alc_fixup_headset_mode_alc668(struct hda_codec
*codec
,
6056 const struct hda_fixup
*fix
, int action
)
6058 if (action
== HDA_FIXUP_ACT_PRE_PROBE
) {
6059 alc_write_coef_idx(codec
, 0xc4, 0x8000);
6060 alc_update_coef_idx(codec
, 0xc2, ~0xfe, 0);
6061 snd_hda_set_pin_ctl_cache(codec
, 0x18, 0);
6063 alc_fixup_headset_mode(codec
, fix
, action
);
6066 /* Returns the nid of the external mic input pin, or 0 if it cannot be found. */
6067 static int find_ext_mic_pin(struct hda_codec
*codec
)
6069 struct alc_spec
*spec
= codec
->spec
;
6070 struct auto_pin_cfg
*cfg
= &spec
->gen
.autocfg
;
6072 unsigned int defcfg
;
6075 for (i
= 0; i
< cfg
->num_inputs
; i
++) {
6076 if (cfg
->inputs
[i
].type
!= AUTO_PIN_MIC
)
6078 nid
= cfg
->inputs
[i
].pin
;
6079 defcfg
= snd_hda_codec_get_pincfg(codec
, nid
);
6080 if (snd_hda_get_input_pin_attr(defcfg
) == INPUT_PIN_ATTR_INT
)
6088 static void alc271_hp_gate_mic_jack(struct hda_codec
*codec
,
6089 const struct hda_fixup
*fix
,
6092 struct alc_spec
*spec
= codec
->spec
;
6094 if (action
== HDA_FIXUP_ACT_PROBE
) {
6095 int mic_pin
= find_ext_mic_pin(codec
);
6096 int hp_pin
= alc_get_hp_pin(spec
);
6098 if (snd_BUG_ON(!mic_pin
|| !hp_pin
))
6100 snd_hda_jack_set_gating_jack(codec
, mic_pin
, hp_pin
);
6104 static void alc269_fixup_limit_int_mic_boost(struct hda_codec
*codec
,
6105 const struct hda_fixup
*fix
,
6108 struct alc_spec
*spec
= codec
->spec
;
6109 struct auto_pin_cfg
*cfg
= &spec
->gen
.autocfg
;
6112 /* The mic boosts on level 2 and 3 are too noisy
6113 on the internal mic input.
6114 Therefore limit the boost to 0 or 1. */
6116 if (action
!= HDA_FIXUP_ACT_PROBE
)
6119 for (i
= 0; i
< cfg
->num_inputs
; i
++) {
6120 hda_nid_t nid
= cfg
->inputs
[i
].pin
;
6121 unsigned int defcfg
;
6122 if (cfg
->inputs
[i
].type
!= AUTO_PIN_MIC
)
6124 defcfg
= snd_hda_codec_get_pincfg(codec
, nid
);
6125 if (snd_hda_get_input_pin_attr(defcfg
) != INPUT_PIN_ATTR_INT
)
6128 snd_hda_override_amp_caps(codec
, nid
, HDA_INPUT
,
6129 (0x00 << AC_AMPCAP_OFFSET_SHIFT
) |
6130 (0x01 << AC_AMPCAP_NUM_STEPS_SHIFT
) |
6131 (0x2f << AC_AMPCAP_STEP_SIZE_SHIFT
) |
6132 (0 << AC_AMPCAP_MUTE_SHIFT
));
6136 static void alc283_hp_automute_hook(struct hda_codec
*codec
,
6137 struct hda_jack_callback
*jack
)
6139 struct alc_spec
*spec
= codec
->spec
;
6143 snd_hda_gen_hp_automute(codec
, jack
);
6145 vref
= spec
->gen
.hp_jack_present
? PIN_VREF80
: 0;
6148 snd_hda_codec_write(codec
, 0x19, 0, AC_VERB_SET_PIN_WIDGET_CONTROL
,
6152 static void alc283_fixup_chromebook(struct hda_codec
*codec
,
6153 const struct hda_fixup
*fix
, int action
)
6155 struct alc_spec
*spec
= codec
->spec
;
6158 case HDA_FIXUP_ACT_PRE_PROBE
:
6159 snd_hda_override_wcaps(codec
, 0x03, 0);
6160 /* Disable AA-loopback as it causes white noise */
6161 spec
->gen
.mixer_nid
= 0;
6163 case HDA_FIXUP_ACT_INIT
:
6164 /* MIC2-VREF control */
6165 /* Set to manual mode */
6166 alc_update_coef_idx(codec
, 0x06, 0x000c, 0);
6167 /* Enable Line1 input control by verb */
6168 alc_update_coef_idx(codec
, 0x1a, 0, 1 << 4);
6173 static void alc283_fixup_sense_combo_jack(struct hda_codec
*codec
,
6174 const struct hda_fixup
*fix
, int action
)
6176 struct alc_spec
*spec
= codec
->spec
;
6179 case HDA_FIXUP_ACT_PRE_PROBE
:
6180 spec
->gen
.hp_automute_hook
= alc283_hp_automute_hook
;
6182 case HDA_FIXUP_ACT_INIT
:
6183 /* MIC2-VREF control */
6184 /* Set to manual mode */
6185 alc_update_coef_idx(codec
, 0x06, 0x000c, 0);
6190 /* mute tablet speaker pin (0x14) via dock plugging in addition */
6191 static void asus_tx300_automute(struct hda_codec
*codec
)
6193 struct alc_spec
*spec
= codec
->spec
;
6194 snd_hda_gen_update_outputs(codec
);
6195 if (snd_hda_jack_detect(codec
, 0x1b))
6196 spec
->gen
.mute_bits
|= (1ULL << 0x14);
6199 static void alc282_fixup_asus_tx300(struct hda_codec
*codec
,
6200 const struct hda_fixup
*fix
, int action
)
6202 struct alc_spec
*spec
= codec
->spec
;
6203 static const struct hda_pintbl dock_pins
[] = {
6204 { 0x1b, 0x21114000 }, /* dock speaker pin */
6209 case HDA_FIXUP_ACT_PRE_PROBE
:
6210 spec
->init_amp
= ALC_INIT_DEFAULT
;
6211 /* TX300 needs to set up GPIO2 for the speaker amp */
6212 alc_setup_gpio(codec
, 0x04);
6213 snd_hda_apply_pincfgs(codec
, dock_pins
);
6214 spec
->gen
.auto_mute_via_amp
= 1;
6215 spec
->gen
.automute_hook
= asus_tx300_automute
;
6216 snd_hda_jack_detect_enable_callback(codec
, 0x1b,
6217 snd_hda_gen_hp_automute
);
6219 case HDA_FIXUP_ACT_PROBE
:
6220 spec
->init_amp
= ALC_INIT_DEFAULT
;
6222 case HDA_FIXUP_ACT_BUILD
:
6223 /* this is a bit tricky; give more sane names for the main
6224 * (tablet) speaker and the dock speaker, respectively
6226 rename_ctl(codec
, "Speaker Playback Switch",
6227 "Dock Speaker Playback Switch");
6228 rename_ctl(codec
, "Bass Speaker Playback Switch",
6229 "Speaker Playback Switch");
6234 static void alc290_fixup_mono_speakers(struct hda_codec
*codec
,
6235 const struct hda_fixup
*fix
, int action
)
6237 if (action
== HDA_FIXUP_ACT_PRE_PROBE
) {
6238 /* DAC node 0x03 is giving mono output. We therefore want to
6239 make sure 0x14 (front speaker) and 0x15 (headphones) use the
6240 stereo DAC, while leaving 0x17 (bass speaker) for node 0x03. */
6241 static const hda_nid_t conn1
[] = { 0x0c };
6242 snd_hda_override_conn_list(codec
, 0x14, ARRAY_SIZE(conn1
), conn1
);
6243 snd_hda_override_conn_list(codec
, 0x15, ARRAY_SIZE(conn1
), conn1
);
6247 static void alc298_fixup_speaker_volume(struct hda_codec
*codec
,
6248 const struct hda_fixup
*fix
, int action
)
6250 if (action
== HDA_FIXUP_ACT_PRE_PROBE
) {
6251 /* The speaker is routed to the Node 0x06 by a mistake, as a result
6252 we can't adjust the speaker's volume since this node does not has
6253 Amp-out capability. we change the speaker's route to:
6254 Node 0x02 (Audio Output) -> Node 0x0c (Audio Mixer) -> Node 0x17 (
6255 Pin Complex), since Node 0x02 has Amp-out caps, we can adjust
6256 speaker's volume now. */
6258 static const hda_nid_t conn1
[] = { 0x0c };
6259 snd_hda_override_conn_list(codec
, 0x17, ARRAY_SIZE(conn1
), conn1
);
6263 /* disable DAC3 (0x06) selection on NID 0x17 as it has no volume amp control */
6264 static void alc295_fixup_disable_dac3(struct hda_codec
*codec
,
6265 const struct hda_fixup
*fix
, int action
)
6267 if (action
== HDA_FIXUP_ACT_PRE_PROBE
) {
6268 static const hda_nid_t conn
[] = { 0x02, 0x03 };
6269 snd_hda_override_conn_list(codec
, 0x17, ARRAY_SIZE(conn
), conn
);
6273 /* force NID 0x17 (Bass Speaker) to DAC1 to share it with the main speaker */
6274 static void alc285_fixup_speaker2_to_dac1(struct hda_codec
*codec
,
6275 const struct hda_fixup
*fix
, int action
)
6277 if (action
== HDA_FIXUP_ACT_PRE_PROBE
) {
6278 static const hda_nid_t conn
[] = { 0x02 };
6279 snd_hda_override_conn_list(codec
, 0x17, ARRAY_SIZE(conn
), conn
);
6283 /* Hook to update amp GPIO4 for automute */
6284 static void alc280_hp_gpio4_automute_hook(struct hda_codec
*codec
,
6285 struct hda_jack_callback
*jack
)
6287 struct alc_spec
*spec
= codec
->spec
;
6289 snd_hda_gen_hp_automute(codec
, jack
);
6290 /* mute_led_polarity is set to 0, so we pass inverted value here */
6291 alc_update_gpio_led(codec
, 0x10, spec
->mute_led_polarity
,
6292 !spec
->gen
.hp_jack_present
);
6295 /* Manage GPIOs for HP EliteBook Folio 9480m.
6297 * GPIO4 is the headphone amplifier power control
6298 * GPIO3 is the audio output mute indicator LED
6301 static void alc280_fixup_hp_9480m(struct hda_codec
*codec
,
6302 const struct hda_fixup
*fix
,
6305 struct alc_spec
*spec
= codec
->spec
;
6307 alc_fixup_hp_gpio_led(codec
, action
, 0x08, 0);
6308 if (action
== HDA_FIXUP_ACT_PRE_PROBE
) {
6309 /* amp at GPIO4; toggled via alc280_hp_gpio4_automute_hook() */
6310 spec
->gpio_mask
|= 0x10;
6311 spec
->gpio_dir
|= 0x10;
6312 spec
->gen
.hp_automute_hook
= alc280_hp_gpio4_automute_hook
;
6316 static void alc275_fixup_gpio4_off(struct hda_codec
*codec
,
6317 const struct hda_fixup
*fix
,
6320 struct alc_spec
*spec
= codec
->spec
;
6322 if (action
== HDA_FIXUP_ACT_PRE_PROBE
) {
6323 spec
->gpio_mask
|= 0x04;
6324 spec
->gpio_dir
|= 0x04;
6325 /* set data bit low */
6329 /* Quirk for Thinkpad X1 7th and 8th Gen
6330 * The following fixed routing needed
6331 * DAC1 (NID 0x02) -> Speaker (NID 0x14); some eq applied secretly
6332 * DAC2 (NID 0x03) -> Bass (NID 0x17) & Headphone (NID 0x21); sharing a DAC
6333 * DAC3 (NID 0x06) -> Unused, due to the lack of volume amp
6335 static void alc285_fixup_thinkpad_x1_gen7(struct hda_codec
*codec
,
6336 const struct hda_fixup
*fix
, int action
)
6338 static const hda_nid_t conn
[] = { 0x02, 0x03 }; /* exclude 0x06 */
6339 static const hda_nid_t preferred_pairs
[] = {
6340 0x14, 0x02, 0x17, 0x03, 0x21, 0x03, 0
6342 struct alc_spec
*spec
= codec
->spec
;
6345 case HDA_FIXUP_ACT_PRE_PROBE
:
6346 snd_hda_override_conn_list(codec
, 0x17, ARRAY_SIZE(conn
), conn
);
6347 spec
->gen
.preferred_dacs
= preferred_pairs
;
6349 case HDA_FIXUP_ACT_BUILD
:
6350 /* The generic parser creates somewhat unintuitive volume ctls
6351 * with the fixed routing above, and the shared DAC2 may be
6353 * Rename those to unique names so that PA doesn't touch them
6354 * and use only Master volume.
6356 rename_ctl(codec
, "Front Playback Volume", "DAC1 Playback Volume");
6357 rename_ctl(codec
, "Bass Speaker Playback Volume", "DAC2 Playback Volume");
6362 static void alc233_alc662_fixup_lenovo_dual_codecs(struct hda_codec
*codec
,
6363 const struct hda_fixup
*fix
,
6366 alc_fixup_dual_codecs(codec
, fix
, action
);
6368 case HDA_FIXUP_ACT_PRE_PROBE
:
6369 /* override card longname to provide a unique UCM profile */
6370 strcpy(codec
->card
->longname
, "HDAudio-Lenovo-DualCodecs");
6372 case HDA_FIXUP_ACT_BUILD
:
6373 /* rename Capture controls depending on the codec */
6374 rename_ctl(codec
, "Capture Volume",
6376 "Rear-Panel Capture Volume" :
6377 "Front-Panel Capture Volume");
6378 rename_ctl(codec
, "Capture Switch",
6380 "Rear-Panel Capture Switch" :
6381 "Front-Panel Capture Switch");
6386 static void alc225_fixup_s3_pop_noise(struct hda_codec
*codec
,
6387 const struct hda_fixup
*fix
, int action
)
6389 if (action
!= HDA_FIXUP_ACT_PRE_PROBE
)
6392 codec
->power_save_node
= 1;
6395 /* Forcibly assign NID 0x03 to HP/LO while NID 0x02 to SPK for EQ */
6396 static void alc274_fixup_bind_dacs(struct hda_codec
*codec
,
6397 const struct hda_fixup
*fix
, int action
)
6399 struct alc_spec
*spec
= codec
->spec
;
6400 static const hda_nid_t preferred_pairs
[] = {
6401 0x21, 0x03, 0x1b, 0x03, 0x16, 0x02,
6405 if (action
!= HDA_FIXUP_ACT_PRE_PROBE
)
6408 spec
->gen
.preferred_dacs
= preferred_pairs
;
6409 spec
->gen
.auto_mute_via_amp
= 1;
6410 codec
->power_save_node
= 0;
6413 /* avoid DAC 0x06 for bass speaker 0x17; it has no volume control */
6414 static void alc289_fixup_asus_ga401(struct hda_codec
*codec
,
6415 const struct hda_fixup
*fix
, int action
)
6417 static const hda_nid_t preferred_pairs
[] = {
6418 0x14, 0x02, 0x17, 0x02, 0x21, 0x03, 0
6420 struct alc_spec
*spec
= codec
->spec
;
6422 if (action
== HDA_FIXUP_ACT_PRE_PROBE
) {
6423 spec
->gen
.preferred_dacs
= preferred_pairs
;
6424 spec
->gen
.obey_preferred_dacs
= 1;
6428 /* The DAC of NID 0x3 will introduce click/pop noise on headphones, so invalidate it */
6429 static void alc285_fixup_invalidate_dacs(struct hda_codec
*codec
,
6430 const struct hda_fixup
*fix
, int action
)
6432 if (action
!= HDA_FIXUP_ACT_PRE_PROBE
)
6435 snd_hda_override_wcaps(codec
, 0x03, 0);
6438 static void alc_combo_jack_hp_jd_restart(struct hda_codec
*codec
)
6440 switch (codec
->core
.vendor_id
) {
6446 alc_update_coef_idx(codec
, 0x4a, 0x8000, 1 << 15); /* Reset HP JD */
6447 alc_update_coef_idx(codec
, 0x4a, 0x8000, 0 << 15);
6455 alc_update_coef_idx(codec
, 0x1b, 0x8000, 1 << 15); /* Reset HP JD */
6456 alc_update_coef_idx(codec
, 0x1b, 0x8000, 0 << 15);
6461 static void alc295_fixup_chromebook(struct hda_codec
*codec
,
6462 const struct hda_fixup
*fix
, int action
)
6464 struct alc_spec
*spec
= codec
->spec
;
6467 case HDA_FIXUP_ACT_PRE_PROBE
:
6468 spec
->ultra_low_power
= true;
6470 case HDA_FIXUP_ACT_INIT
:
6471 alc_combo_jack_hp_jd_restart(codec
);
6476 static void alc_fixup_disable_mic_vref(struct hda_codec
*codec
,
6477 const struct hda_fixup
*fix
, int action
)
6479 if (action
== HDA_FIXUP_ACT_PRE_PROBE
)
6480 snd_hda_codec_set_pin_target(codec
, 0x19, PIN_VREFHIZ
);
6484 static void alc294_gx502_toggle_output(struct hda_codec
*codec
,
6485 struct hda_jack_callback
*cb
)
6487 /* The Windows driver sets the codec up in a very different way where
6488 * it appears to leave 0x10 = 0x8a20 set. For Linux we need to toggle it
6490 if (snd_hda_jack_detect_state(codec
, 0x21) == HDA_JACK_PRESENT
)
6491 alc_write_coef_idx(codec
, 0x10, 0x8a20);
6493 alc_write_coef_idx(codec
, 0x10, 0x0a20);
6496 static void alc294_fixup_gx502_hp(struct hda_codec
*codec
,
6497 const struct hda_fixup
*fix
, int action
)
6499 /* Pin 0x21: headphones/headset mic */
6500 if (!is_jack_detectable(codec
, 0x21))
6504 case HDA_FIXUP_ACT_PRE_PROBE
:
6505 snd_hda_jack_detect_enable_callback(codec
, 0x21,
6506 alc294_gx502_toggle_output
);
6508 case HDA_FIXUP_ACT_INIT
:
6509 /* Make sure to start in a correct state, i.e. if
6510 * headphones have been plugged in before powering up the system
6512 alc294_gx502_toggle_output(codec
, NULL
);
6517 static void alc294_gu502_toggle_output(struct hda_codec
*codec
,
6518 struct hda_jack_callback
*cb
)
6520 /* Windows sets 0x10 to 0x8420 for Node 0x20 which is
6521 * responsible from changes between speakers and headphones
6523 if (snd_hda_jack_detect_state(codec
, 0x21) == HDA_JACK_PRESENT
)
6524 alc_write_coef_idx(codec
, 0x10, 0x8420);
6526 alc_write_coef_idx(codec
, 0x10, 0x0a20);
6529 static void alc294_fixup_gu502_hp(struct hda_codec
*codec
,
6530 const struct hda_fixup
*fix
, int action
)
6532 if (!is_jack_detectable(codec
, 0x21))
6536 case HDA_FIXUP_ACT_PRE_PROBE
:
6537 snd_hda_jack_detect_enable_callback(codec
, 0x21,
6538 alc294_gu502_toggle_output
);
6540 case HDA_FIXUP_ACT_INIT
:
6541 alc294_gu502_toggle_output(codec
, NULL
);
6546 static void alc285_fixup_hp_gpio_amp_init(struct hda_codec
*codec
,
6547 const struct hda_fixup
*fix
, int action
)
6549 if (action
!= HDA_FIXUP_ACT_INIT
)
6553 alc_write_coef_idx(codec
, 0x65, 0x0);
6556 static void alc274_fixup_hp_headset_mic(struct hda_codec
*codec
,
6557 const struct hda_fixup
*fix
, int action
)
6560 case HDA_FIXUP_ACT_INIT
:
6561 alc_combo_jack_hp_jd_restart(codec
);
6566 static void alc_fixup_no_int_mic(struct hda_codec
*codec
,
6567 const struct hda_fixup
*fix
, int action
)
6569 struct alc_spec
*spec
= codec
->spec
;
6572 case HDA_FIXUP_ACT_PRE_PROBE
:
6573 /* Mic RING SLEEVE swap for combo jack */
6574 alc_update_coef_idx(codec
, 0x45, 0xf<<12 | 1<<10, 5<<12);
6575 spec
->no_internal_mic_pin
= true;
6577 case HDA_FIXUP_ACT_INIT
:
6578 alc_combo_jack_hp_jd_restart(codec
);
6583 /* GPIO1 = amplifier on/off
6584 * GPIO3 = mic mute LED
6586 static void alc285_fixup_hp_spectre_x360_eb1(struct hda_codec
*codec
,
6587 const struct hda_fixup
*fix
, int action
)
6589 static const hda_nid_t conn
[] = { 0x02 };
6591 struct alc_spec
*spec
= codec
->spec
;
6592 static const struct hda_pintbl pincfgs
[] = {
6593 { 0x14, 0x90170110 }, /* front/high speakers */
6594 { 0x17, 0x90170130 }, /* back/bass speakers */
6598 //enable micmute led
6599 alc_fixup_hp_gpio_led(codec
, action
, 0x00, 0x04);
6602 case HDA_FIXUP_ACT_PRE_PROBE
:
6603 spec
->micmute_led_polarity
= 1;
6604 /* needed for amp of back speakers */
6605 spec
->gpio_mask
|= 0x01;
6606 spec
->gpio_dir
|= 0x01;
6607 snd_hda_apply_pincfgs(codec
, pincfgs
);
6608 /* share DAC to have unified volume control */
6609 snd_hda_override_conn_list(codec
, 0x14, ARRAY_SIZE(conn
), conn
);
6610 snd_hda_override_conn_list(codec
, 0x17, ARRAY_SIZE(conn
), conn
);
6612 case HDA_FIXUP_ACT_INIT
:
6613 /* need to toggle GPIO to enable the amp of back speakers */
6614 alc_update_gpio_data(codec
, 0x01, true);
6616 alc_update_gpio_data(codec
, 0x01, false);
6621 static void alc285_fixup_hp_spectre_x360(struct hda_codec
*codec
,
6622 const struct hda_fixup
*fix
, int action
)
6624 static const hda_nid_t conn
[] = { 0x02 };
6625 static const struct hda_pintbl pincfgs
[] = {
6626 { 0x14, 0x90170110 }, /* rear speaker */
6631 case HDA_FIXUP_ACT_PRE_PROBE
:
6632 snd_hda_apply_pincfgs(codec
, pincfgs
);
6633 /* force front speaker to DAC1 */
6634 snd_hda_override_conn_list(codec
, 0x17, ARRAY_SIZE(conn
), conn
);
6639 /* for hda_fixup_thinkpad_acpi() */
6640 #include "thinkpad_helper.c"
6642 static void alc_fixup_thinkpad_acpi(struct hda_codec
*codec
,
6643 const struct hda_fixup
*fix
, int action
)
6645 alc_fixup_no_shutup(codec
, fix
, action
); /* reduce click noise */
6646 hda_fixup_thinkpad_acpi(codec
, fix
, action
);
6649 /* Fixup for Lenovo Legion 15IMHg05 speaker output on headset removal. */
6650 static void alc287_fixup_legion_15imhg05_speakers(struct hda_codec
*codec
,
6651 const struct hda_fixup
*fix
,
6654 struct alc_spec
*spec
= codec
->spec
;
6657 case HDA_FIXUP_ACT_PRE_PROBE
:
6658 spec
->gen
.suppress_auto_mute
= 1;
6663 static int comp_bind(struct device
*dev
)
6665 struct hda_codec
*cdc
= dev_to_hda_codec(dev
);
6666 struct alc_spec
*spec
= cdc
->spec
;
6669 ret
= component_bind_all(dev
, spec
->comps
);
6673 if (snd_hdac_is_power_on(&cdc
->core
)) {
6674 codec_dbg(cdc
, "Resuming after bind.\n");
6675 for (i
= 0; i
< HDA_MAX_COMPONENTS
; i
++)
6676 if (spec
->comps
[i
].resume_hook
)
6677 spec
->comps
[i
].resume_hook(spec
->comps
[i
].dev
);
6683 static void comp_unbind(struct device
*dev
)
6685 struct hda_codec
*cdc
= dev_to_hda_codec(dev
);
6686 struct alc_spec
*spec
= cdc
->spec
;
6688 component_unbind_all(dev
, spec
->comps
);
6691 static const struct component_master_ops comp_master_ops
= {
6693 .unbind
= comp_unbind
,
6696 static void comp_generic_playback_hook(struct hda_pcm_stream
*hinfo
, struct hda_codec
*cdc
,
6697 struct snd_pcm_substream
*sub
, int action
)
6699 struct alc_spec
*spec
= cdc
->spec
;
6702 for (i
= 0; i
< HDA_MAX_COMPONENTS
; i
++) {
6703 if (spec
->comps
[i
].dev
)
6704 spec
->comps
[i
].playback_hook(spec
->comps
[i
].dev
, action
);
6708 struct cs35l41_dev_name
{
6714 /* match the device name in a slightly relaxed manner */
6715 static int comp_match_cs35l41_dev_name(struct device
*dev
, void *data
)
6717 struct cs35l41_dev_name
*p
= data
;
6718 const char *d
= dev_name(dev
);
6719 int n
= strlen(p
->bus
);
6722 /* check the bus name */
6723 if (strncmp(d
, p
->bus
, n
))
6725 /* skip the bus number */
6728 /* the rest must be exact matching */
6729 snprintf(tmp
, sizeof(tmp
), "-%s:00-cs35l41-hda.%d", p
->hid
, p
->index
);
6730 return !strcmp(d
+ n
, tmp
);
6733 static void cs35l41_generic_fixup(struct hda_codec
*cdc
, int action
, const char *bus
,
6734 const char *hid
, int count
)
6736 struct device
*dev
= hda_codec_dev(cdc
);
6737 struct alc_spec
*spec
= cdc
->spec
;
6738 struct cs35l41_dev_name
*rec
;
6742 case HDA_FIXUP_ACT_PRE_PROBE
:
6743 for (i
= 0; i
< count
; i
++) {
6744 rec
= devm_kmalloc(dev
, sizeof(*rec
), GFP_KERNEL
);
6750 spec
->comps
[i
].codec
= cdc
;
6751 component_match_add(dev
, &spec
->match
,
6752 comp_match_cs35l41_dev_name
, rec
);
6754 ret
= component_master_add_with_match(dev
, &comp_master_ops
, spec
->match
);
6756 codec_err(cdc
, "Fail to register component aggregator %d\n", ret
);
6758 spec
->gen
.pcm_playback_hook
= comp_generic_playback_hook
;
6763 static void cs35l41_fixup_i2c_two(struct hda_codec
*cdc
, const struct hda_fixup
*fix
, int action
)
6765 cs35l41_generic_fixup(cdc
, action
, "i2c", "CSC3551", 2);
6768 static void cs35l41_fixup_spi_two(struct hda_codec
*codec
, const struct hda_fixup
*fix
, int action
)
6770 cs35l41_generic_fixup(codec
, action
, "spi", "CSC3551", 2);
6773 static void cs35l41_fixup_spi_four(struct hda_codec
*codec
, const struct hda_fixup
*fix
, int action
)
6775 cs35l41_generic_fixup(codec
, action
, "spi", "CSC3551", 4);
6778 static void alc287_fixup_legion_16achg6_speakers(struct hda_codec
*cdc
, const struct hda_fixup
*fix
,
6781 cs35l41_generic_fixup(cdc
, action
, "i2c", "CLSA0100", 2);
6784 static void alc287_fixup_legion_16ithg6_speakers(struct hda_codec
*cdc
, const struct hda_fixup
*fix
,
6787 cs35l41_generic_fixup(cdc
, action
, "i2c", "CLSA0101", 2);
6790 /* for alc295_fixup_hp_top_speakers */
6791 #include "hp_x360_helper.c"
6793 /* for alc285_fixup_ideapad_s740_coef() */
6794 #include "ideapad_s740_helper.c"
6796 static const struct coef_fw alc256_fixup_set_coef_defaults_coefs
[] = {
6797 WRITE_COEF(0x10, 0x0020), WRITE_COEF(0x24, 0x0000),
6798 WRITE_COEF(0x26, 0x0000), WRITE_COEF(0x29, 0x3000),
6799 WRITE_COEF(0x37, 0xfe05), WRITE_COEF(0x45, 0x5089),
6803 static void alc256_fixup_set_coef_defaults(struct hda_codec
*codec
,
6804 const struct hda_fixup
*fix
,
6808 * A certain other OS sets these coeffs to different values. On at least
6809 * one TongFang barebone these settings might survive even a cold
6810 * reboot. So to restore a clean slate the values are explicitly reset
6811 * to default here. Without this, the external microphone is always in a
6812 * plugged-in state, while the internal microphone is always in an
6813 * unplugged state, breaking the ability to use the internal microphone.
6815 alc_process_coef_fw(codec
, alc256_fixup_set_coef_defaults_coefs
);
6818 static const struct coef_fw alc233_fixup_no_audio_jack_coefs
[] = {
6819 WRITE_COEF(0x1a, 0x9003), WRITE_COEF(0x1b, 0x0e2b), WRITE_COEF(0x37, 0xfe06),
6820 WRITE_COEF(0x38, 0x4981), WRITE_COEF(0x45, 0xd489), WRITE_COEF(0x46, 0x0074),
6821 WRITE_COEF(0x49, 0x0149),
6825 static void alc233_fixup_no_audio_jack(struct hda_codec
*codec
,
6826 const struct hda_fixup
*fix
,
6830 * The audio jack input and output is not detected on the ASRock NUC Box
6831 * 1100 series when cold booting without this fix. Warm rebooting from a
6832 * certain other OS makes the audio functional, as COEF settings are
6833 * preserved in this case. This fix sets these altered COEF values as
6836 alc_process_coef_fw(codec
, alc233_fixup_no_audio_jack_coefs
);
6839 static void alc256_fixup_mic_no_presence_and_resume(struct hda_codec
*codec
,
6840 const struct hda_fixup
*fix
,
6844 * The Clevo NJ51CU comes either with the ALC293 or the ALC256 codec,
6845 * but uses the 0x8686 subproduct id in both cases. The ALC256 codec
6846 * needs an additional quirk for sound working after suspend and resume.
6848 if (codec
->core
.vendor_id
== 0x10ec0256) {
6849 alc_update_coef_idx(codec
, 0x10, 1<<9, 0);
6850 snd_hda_codec_set_pincfg(codec
, 0x19, 0x04a11120);
6852 snd_hda_codec_set_pincfg(codec
, 0x1a, 0x04a1113c);
6856 static void alc_fixup_dell4_mic_no_presence_quiet(struct hda_codec
*codec
,
6857 const struct hda_fixup
*fix
,
6860 struct alc_spec
*spec
= codec
->spec
;
6861 struct hda_input_mux
*imux
= &spec
->gen
.input_mux
;
6864 alc269_fixup_limit_int_mic_boost(codec
, fix
, action
);
6867 case HDA_FIXUP_ACT_PRE_PROBE
:
6869 * Set the vref of pin 0x19 (Headset Mic) and pin 0x1b (Headphone Mic)
6870 * to Hi-Z to avoid pop noises at startup and when plugging and
6871 * unplugging headphones.
6873 snd_hda_codec_set_pin_target(codec
, 0x19, PIN_VREFHIZ
);
6874 snd_hda_codec_set_pin_target(codec
, 0x1b, PIN_VREFHIZ
);
6876 case HDA_FIXUP_ACT_PROBE
:
6878 * Make the internal mic (0x12) the default input source to
6879 * prevent pop noises on cold boot.
6881 for (i
= 0; i
< imux
->num_items
; i
++) {
6882 if (spec
->gen
.imux_pins
[i
] == 0x12) {
6883 spec
->gen
.cur_mux
[0] = i
;
6891 static void alc287_fixup_yoga9_14iap7_bass_spk_pin(struct hda_codec
*codec
,
6892 const struct hda_fixup
*fix
, int action
)
6895 * The Pin Complex 0x17 for the bass speakers is wrongly reported as
6898 static const struct hda_pintbl pincfgs
[] = {
6899 { 0x17, 0x90170121 },
6903 * Avoid DAC 0x06 and 0x08, as they have no volume controls.
6904 * DAC 0x02 and 0x03 would be fine.
6906 static const hda_nid_t conn
[] = { 0x02, 0x03 };
6908 * Prefer both speakerbar (0x14) and bass speakers (0x17) connected to DAC 0x02.
6909 * Headphones (0x21) are connected to DAC 0x03.
6911 static const hda_nid_t preferred_pairs
[] = {
6917 struct alc_spec
*spec
= codec
->spec
;
6920 case HDA_FIXUP_ACT_PRE_PROBE
:
6921 snd_hda_apply_pincfgs(codec
, pincfgs
);
6922 snd_hda_override_conn_list(codec
, 0x17, ARRAY_SIZE(conn
), conn
);
6923 spec
->gen
.preferred_dacs
= preferred_pairs
;
6930 ALC269_FIXUP_SONY_VAIO
,
6931 ALC275_FIXUP_SONY_VAIO_GPIO2
,
6932 ALC269_FIXUP_DELL_M101Z
,
6933 ALC269_FIXUP_SKU_IGNORE
,
6934 ALC269_FIXUP_ASUS_G73JW
,
6935 ALC269_FIXUP_LENOVO_EAPD
,
6936 ALC275_FIXUP_SONY_HWEQ
,
6937 ALC275_FIXUP_SONY_DISABLE_AAMIX
,
6939 ALC269_FIXUP_PCM_44K
,
6940 ALC269_FIXUP_STEREO_DMIC
,
6941 ALC269_FIXUP_HEADSET_MIC
,
6942 ALC269_FIXUP_QUANTA_MUTE
,
6943 ALC269_FIXUP_LIFEBOOK
,
6944 ALC269_FIXUP_LIFEBOOK_EXTMIC
,
6945 ALC269_FIXUP_LIFEBOOK_HP_PIN
,
6946 ALC269_FIXUP_LIFEBOOK_NO_HP_TO_LINEOUT
,
6947 ALC255_FIXUP_LIFEBOOK_U7x7_HEADSET_MIC
,
6950 ALC269VB_FIXUP_AMIC
,
6951 ALC269VB_FIXUP_DMIC
,
6952 ALC269_FIXUP_HP_MUTE_LED
,
6953 ALC269_FIXUP_HP_MUTE_LED_MIC1
,
6954 ALC269_FIXUP_HP_MUTE_LED_MIC2
,
6955 ALC269_FIXUP_HP_MUTE_LED_MIC3
,
6956 ALC269_FIXUP_HP_GPIO_LED
,
6957 ALC269_FIXUP_HP_GPIO_MIC1_LED
,
6958 ALC269_FIXUP_HP_LINE1_MIC1_LED
,
6959 ALC269_FIXUP_INV_DMIC
,
6960 ALC269_FIXUP_LENOVO_DOCK
,
6961 ALC269_FIXUP_LENOVO_DOCK_LIMIT_BOOST
,
6962 ALC269_FIXUP_NO_SHUTUP
,
6963 ALC286_FIXUP_SONY_MIC_NO_PRESENCE
,
6964 ALC269_FIXUP_PINCFG_NO_HP_TO_LINEOUT
,
6965 ALC269_FIXUP_DELL1_MIC_NO_PRESENCE
,
6966 ALC269_FIXUP_DELL2_MIC_NO_PRESENCE
,
6967 ALC269_FIXUP_DELL3_MIC_NO_PRESENCE
,
6968 ALC269_FIXUP_DELL4_MIC_NO_PRESENCE
,
6969 ALC269_FIXUP_DELL4_MIC_NO_PRESENCE_QUIET
,
6970 ALC269_FIXUP_HEADSET_MODE
,
6971 ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC
,
6972 ALC269_FIXUP_ASPIRE_HEADSET_MIC
,
6973 ALC269_FIXUP_ASUS_X101_FUNC
,
6974 ALC269_FIXUP_ASUS_X101_VERB
,
6975 ALC269_FIXUP_ASUS_X101
,
6976 ALC271_FIXUP_AMIC_MIC2
,
6977 ALC271_FIXUP_HP_GATE_MIC_JACK
,
6978 ALC271_FIXUP_HP_GATE_MIC_JACK_E1_572
,
6979 ALC269_FIXUP_ACER_AC700
,
6980 ALC269_FIXUP_LIMIT_INT_MIC_BOOST
,
6981 ALC269VB_FIXUP_ASUS_ZENBOOK
,
6982 ALC269VB_FIXUP_ASUS_ZENBOOK_UX31A
,
6983 ALC269VB_FIXUP_ASUS_MIC_NO_PRESENCE
,
6984 ALC269_FIXUP_LIMIT_INT_MIC_BOOST_MUTE_LED
,
6985 ALC269VB_FIXUP_ORDISSIMO_EVE2
,
6986 ALC283_FIXUP_CHROME_BOOK
,
6987 ALC283_FIXUP_SENSE_COMBO_JACK
,
6988 ALC282_FIXUP_ASUS_TX300
,
6989 ALC283_FIXUP_INT_MIC
,
6990 ALC290_FIXUP_MONO_SPEAKERS
,
6991 ALC290_FIXUP_MONO_SPEAKERS_HSJACK
,
6992 ALC290_FIXUP_SUBWOOFER
,
6993 ALC290_FIXUP_SUBWOOFER_HSJACK
,
6994 ALC269_FIXUP_THINKPAD_ACPI
,
6995 ALC269_FIXUP_DMIC_THINKPAD_ACPI
,
6996 ALC255_FIXUP_ACER_MIC_NO_PRESENCE
,
6997 ALC255_FIXUP_ASUS_MIC_NO_PRESENCE
,
6998 ALC255_FIXUP_DELL1_MIC_NO_PRESENCE
,
6999 ALC255_FIXUP_DELL2_MIC_NO_PRESENCE
,
7000 ALC255_FIXUP_HEADSET_MODE
,
7001 ALC255_FIXUP_HEADSET_MODE_NO_HP_MIC
,
7002 ALC293_FIXUP_DELL1_MIC_NO_PRESENCE
,
7003 ALC292_FIXUP_TPT440_DOCK
,
7004 ALC292_FIXUP_TPT440
,
7005 ALC283_FIXUP_HEADSET_MIC
,
7006 ALC255_FIXUP_MIC_MUTE_LED
,
7007 ALC282_FIXUP_ASPIRE_V5_PINS
,
7008 ALC269VB_FIXUP_ASPIRE_E1_COEF
,
7009 ALC280_FIXUP_HP_GPIO4
,
7010 ALC286_FIXUP_HP_GPIO_LED
,
7011 ALC280_FIXUP_HP_GPIO2_MIC_HOTKEY
,
7012 ALC280_FIXUP_HP_DOCK_PINS
,
7013 ALC269_FIXUP_HP_DOCK_GPIO_MIC1_LED
,
7014 ALC280_FIXUP_HP_9480M
,
7015 ALC245_FIXUP_HP_X360_AMP
,
7016 ALC285_FIXUP_HP_SPECTRE_X360_EB1
,
7017 ALC288_FIXUP_DELL_HEADSET_MODE
,
7018 ALC288_FIXUP_DELL1_MIC_NO_PRESENCE
,
7019 ALC288_FIXUP_DELL_XPS_13
,
7020 ALC288_FIXUP_DISABLE_AAMIX
,
7021 ALC292_FIXUP_DELL_E7X_AAMIX
,
7022 ALC292_FIXUP_DELL_E7X
,
7023 ALC292_FIXUP_DISABLE_AAMIX
,
7024 ALC293_FIXUP_DISABLE_AAMIX_MULTIJACK
,
7025 ALC298_FIXUP_ALIENWARE_MIC_NO_PRESENCE
,
7026 ALC298_FIXUP_DELL1_MIC_NO_PRESENCE
,
7027 ALC298_FIXUP_DELL_AIO_MIC_NO_PRESENCE
,
7028 ALC275_FIXUP_DELL_XPS
,
7029 ALC293_FIXUP_LENOVO_SPK_NOISE
,
7030 ALC233_FIXUP_LENOVO_LINE2_MIC_HOTKEY
,
7031 ALC255_FIXUP_DELL_SPK_NOISE
,
7032 ALC225_FIXUP_DISABLE_MIC_VREF
,
7033 ALC225_FIXUP_DELL1_MIC_NO_PRESENCE
,
7034 ALC295_FIXUP_DISABLE_DAC3
,
7035 ALC285_FIXUP_SPEAKER2_TO_DAC1
,
7036 ALC280_FIXUP_HP_HEADSET_MIC
,
7037 ALC221_FIXUP_HP_FRONT_MIC
,
7038 ALC292_FIXUP_TPT460
,
7039 ALC298_FIXUP_SPK_VOLUME
,
7040 ALC298_FIXUP_LENOVO_SPK_VOLUME
,
7041 ALC256_FIXUP_DELL_INSPIRON_7559_SUBWOOFER
,
7042 ALC269_FIXUP_ATIV_BOOK_8
,
7043 ALC221_FIXUP_HP_288PRO_MIC_NO_PRESENCE
,
7044 ALC221_FIXUP_HP_MIC_NO_PRESENCE
,
7045 ALC256_FIXUP_ASUS_HEADSET_MODE
,
7046 ALC256_FIXUP_ASUS_MIC
,
7047 ALC256_FIXUP_ASUS_AIO_GPIO2
,
7048 ALC233_FIXUP_ASUS_MIC_NO_PRESENCE
,
7049 ALC233_FIXUP_EAPD_COEF_AND_MIC_NO_PRESENCE
,
7050 ALC233_FIXUP_LENOVO_MULTI_CODECS
,
7051 ALC233_FIXUP_ACER_HEADSET_MIC
,
7052 ALC294_FIXUP_LENOVO_MIC_LOCATION
,
7053 ALC225_FIXUP_DELL_WYSE_MIC_NO_PRESENCE
,
7054 ALC225_FIXUP_S3_POP_NOISE
,
7055 ALC700_FIXUP_INTEL_REFERENCE
,
7056 ALC274_FIXUP_DELL_BIND_DACS
,
7057 ALC274_FIXUP_DELL_AIO_LINEOUT_VERB
,
7058 ALC298_FIXUP_TPT470_DOCK_FIX
,
7059 ALC298_FIXUP_TPT470_DOCK
,
7060 ALC255_FIXUP_DUMMY_LINEOUT_VERB
,
7061 ALC255_FIXUP_DELL_HEADSET_MIC
,
7062 ALC256_FIXUP_HUAWEI_MACH_WX9_PINS
,
7063 ALC298_FIXUP_HUAWEI_MBX_STEREO
,
7064 ALC295_FIXUP_HP_X360
,
7065 ALC221_FIXUP_HP_HEADSET_MIC
,
7066 ALC285_FIXUP_LENOVO_HEADPHONE_NOISE
,
7067 ALC295_FIXUP_HP_AUTO_MUTE
,
7068 ALC286_FIXUP_ACER_AIO_MIC_NO_PRESENCE
,
7069 ALC294_FIXUP_ASUS_MIC
,
7070 ALC294_FIXUP_ASUS_HEADSET_MIC
,
7071 ALC294_FIXUP_ASUS_SPK
,
7072 ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
,
7073 ALC285_FIXUP_LENOVO_PC_BEEP_IN_NOISE
,
7074 ALC255_FIXUP_ACER_HEADSET_MIC
,
7075 ALC295_FIXUP_CHROME_BOOK
,
7076 ALC225_FIXUP_HEADSET_JACK
,
7077 ALC225_FIXUP_DELL_WYSE_AIO_MIC_NO_PRESENCE
,
7078 ALC225_FIXUP_WYSE_AUTO_MUTE
,
7079 ALC225_FIXUP_WYSE_DISABLE_MIC_VREF
,
7080 ALC286_FIXUP_ACER_AIO_HEADSET_MIC
,
7081 ALC256_FIXUP_ASUS_HEADSET_MIC
,
7082 ALC256_FIXUP_ASUS_MIC_NO_PRESENCE
,
7083 ALC299_FIXUP_PREDATOR_SPK
,
7084 ALC256_FIXUP_MEDION_HEADSET_NO_PRESENCE
,
7085 ALC289_FIXUP_DELL_SPK2
,
7086 ALC289_FIXUP_DUAL_SPK
,
7087 ALC294_FIXUP_SPK2_TO_DAC1
,
7088 ALC294_FIXUP_ASUS_DUAL_SPK
,
7089 ALC285_FIXUP_THINKPAD_X1_GEN7
,
7090 ALC285_FIXUP_THINKPAD_HEADSET_JACK
,
7091 ALC294_FIXUP_ASUS_HPE
,
7092 ALC294_FIXUP_ASUS_COEF_1B
,
7093 ALC294_FIXUP_ASUS_GX502_HP
,
7094 ALC294_FIXUP_ASUS_GX502_PINS
,
7095 ALC294_FIXUP_ASUS_GX502_VERBS
,
7096 ALC294_FIXUP_ASUS_GU502_HP
,
7097 ALC294_FIXUP_ASUS_GU502_PINS
,
7098 ALC294_FIXUP_ASUS_GU502_VERBS
,
7099 ALC294_FIXUP_ASUS_G513_PINS
,
7100 ALC285_FIXUP_ASUS_G533Z_PINS
,
7101 ALC285_FIXUP_HP_GPIO_LED
,
7102 ALC285_FIXUP_HP_MUTE_LED
,
7103 ALC236_FIXUP_HP_GPIO_LED
,
7104 ALC236_FIXUP_HP_MUTE_LED
,
7105 ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF
,
7106 ALC298_FIXUP_SAMSUNG_AMP
,
7107 ALC298_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET
,
7108 ALC256_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET
,
7109 ALC295_FIXUP_ASUS_MIC_NO_PRESENCE
,
7110 ALC269VC_FIXUP_ACER_VCOPPERBOX_PINS
,
7111 ALC269VC_FIXUP_ACER_HEADSET_MIC
,
7112 ALC269VC_FIXUP_ACER_MIC_NO_PRESENCE
,
7113 ALC289_FIXUP_ASUS_GA401
,
7114 ALC289_FIXUP_ASUS_GA502
,
7115 ALC256_FIXUP_ACER_MIC_NO_PRESENCE
,
7116 ALC285_FIXUP_HP_GPIO_AMP_INIT
,
7117 ALC269_FIXUP_CZC_B20
,
7118 ALC269_FIXUP_CZC_TMI
,
7119 ALC269_FIXUP_CZC_L101
,
7120 ALC269_FIXUP_LEMOTE_A1802
,
7121 ALC269_FIXUP_LEMOTE_A190X
,
7122 ALC256_FIXUP_INTEL_NUC8_RUGGED
,
7123 ALC233_FIXUP_INTEL_NUC8_DMIC
,
7124 ALC233_FIXUP_INTEL_NUC8_BOOST
,
7125 ALC256_FIXUP_INTEL_NUC10
,
7126 ALC255_FIXUP_XIAOMI_HEADSET_MIC
,
7127 ALC274_FIXUP_HP_MIC
,
7128 ALC274_FIXUP_HP_HEADSET_MIC
,
7129 ALC274_FIXUP_HP_ENVY_GPIO
,
7130 ALC256_FIXUP_ASUS_HPE
,
7131 ALC285_FIXUP_THINKPAD_NO_BASS_SPK_HEADSET_JACK
,
7132 ALC287_FIXUP_HP_GPIO_LED
,
7133 ALC256_FIXUP_HP_HEADSET_MIC
,
7134 ALC245_FIXUP_HP_GPIO_LED
,
7135 ALC236_FIXUP_DELL_AIO_HEADSET_MIC
,
7136 ALC282_FIXUP_ACER_DISABLE_LINEOUT
,
7137 ALC255_FIXUP_ACER_LIMIT_INT_MIC_BOOST
,
7138 ALC256_FIXUP_ACER_HEADSET_MIC
,
7139 ALC285_FIXUP_IDEAPAD_S740_COEF
,
7140 ALC285_FIXUP_HP_LIMIT_INT_MIC_BOOST
,
7141 ALC295_FIXUP_ASUS_DACS
,
7142 ALC295_FIXUP_HP_OMEN
,
7143 ALC285_FIXUP_HP_SPECTRE_X360
,
7144 ALC287_FIXUP_IDEAPAD_BASS_SPK_AMP
,
7145 ALC623_FIXUP_LENOVO_THINKSTATION_P340
,
7146 ALC255_FIXUP_ACER_HEADPHONE_AND_MIC
,
7147 ALC236_FIXUP_HP_LIMIT_INT_MIC_BOOST
,
7148 ALC287_FIXUP_LEGION_15IMHG05_SPEAKERS
,
7149 ALC287_FIXUP_LEGION_15IMHG05_AUTOMUTE
,
7150 ALC287_FIXUP_YOGA7_14ITL_SPEAKERS
,
7151 ALC298_FIXUP_LENOVO_C940_DUET7
,
7152 ALC287_FIXUP_13S_GEN2_SPEAKERS
,
7153 ALC256_FIXUP_SET_COEF_DEFAULTS
,
7154 ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE
,
7155 ALC233_FIXUP_NO_AUDIO_JACK
,
7156 ALC256_FIXUP_MIC_NO_PRESENCE_AND_RESUME
,
7157 ALC285_FIXUP_LEGION_Y9000X_SPEAKERS
,
7158 ALC285_FIXUP_LEGION_Y9000X_AUTOMUTE
,
7159 ALC287_FIXUP_LEGION_16ACHG6
,
7160 ALC287_FIXUP_CS35L41_I2C_2
,
7161 ALC287_FIXUP_CS35L41_I2C_2_HP_GPIO_LED
,
7162 ALC245_FIXUP_CS35L41_SPI_2
,
7163 ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED
,
7164 ALC245_FIXUP_CS35L41_SPI_4
,
7165 ALC245_FIXUP_CS35L41_SPI_4_HP_GPIO_LED
,
7166 ALC285_FIXUP_HP_SPEAKERS_MICMUTE_LED
,
7167 ALC295_FIXUP_FRAMEWORK_LAPTOP_MIC_NO_PRESENCE
,
7168 ALC287_FIXUP_LEGION_16ITHG6
,
7169 ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK
,
7170 ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK_PIN
,
7173 /* A special fixup for Lenovo C940 and Yoga Duet 7;
7174 * both have the very same PCI SSID, and we need to apply different fixups
7175 * depending on the codec ID
7177 static void alc298_fixup_lenovo_c940_duet7(struct hda_codec
*codec
,
7178 const struct hda_fixup
*fix
,
7183 if (codec
->core
.vendor_id
== 0x10ec0298)
7184 id
= ALC298_FIXUP_LENOVO_SPK_VOLUME
; /* C940 */
7186 id
= ALC287_FIXUP_YOGA7_14ITL_SPEAKERS
; /* Duet 7 */
7187 __snd_hda_apply_fixup(codec
, id
, action
, 0);
7190 static const struct hda_fixup alc269_fixups
[] = {
7191 [ALC269_FIXUP_GPIO2
] = {
7192 .type
= HDA_FIXUP_FUNC
,
7193 .v
.func
= alc_fixup_gpio2
,
7195 [ALC269_FIXUP_SONY_VAIO
] = {
7196 .type
= HDA_FIXUP_PINCTLS
,
7197 .v
.pins
= (const struct hda_pintbl
[]) {
7198 {0x19, PIN_VREFGRD
},
7202 [ALC275_FIXUP_SONY_VAIO_GPIO2
] = {
7203 .type
= HDA_FIXUP_FUNC
,
7204 .v
.func
= alc275_fixup_gpio4_off
,
7206 .chain_id
= ALC269_FIXUP_SONY_VAIO
7208 [ALC269_FIXUP_DELL_M101Z
] = {
7209 .type
= HDA_FIXUP_VERBS
,
7210 .v
.verbs
= (const struct hda_verb
[]) {
7211 /* Enables internal speaker */
7212 {0x20, AC_VERB_SET_COEF_INDEX
, 13},
7213 {0x20, AC_VERB_SET_PROC_COEF
, 0x4040},
7217 [ALC269_FIXUP_SKU_IGNORE
] = {
7218 .type
= HDA_FIXUP_FUNC
,
7219 .v
.func
= alc_fixup_sku_ignore
,
7221 [ALC269_FIXUP_ASUS_G73JW
] = {
7222 .type
= HDA_FIXUP_PINS
,
7223 .v
.pins
= (const struct hda_pintbl
[]) {
7224 { 0x17, 0x99130111 }, /* subwoofer */
7228 [ALC269_FIXUP_LENOVO_EAPD
] = {
7229 .type
= HDA_FIXUP_VERBS
,
7230 .v
.verbs
= (const struct hda_verb
[]) {
7231 {0x14, AC_VERB_SET_EAPD_BTLENABLE
, 0},
7235 [ALC275_FIXUP_SONY_HWEQ
] = {
7236 .type
= HDA_FIXUP_FUNC
,
7237 .v
.func
= alc269_fixup_hweq
,
7239 .chain_id
= ALC275_FIXUP_SONY_VAIO_GPIO2
7241 [ALC275_FIXUP_SONY_DISABLE_AAMIX
] = {
7242 .type
= HDA_FIXUP_FUNC
,
7243 .v
.func
= alc_fixup_disable_aamix
,
7245 .chain_id
= ALC269_FIXUP_SONY_VAIO
7247 [ALC271_FIXUP_DMIC
] = {
7248 .type
= HDA_FIXUP_FUNC
,
7249 .v
.func
= alc271_fixup_dmic
,
7251 [ALC269_FIXUP_PCM_44K
] = {
7252 .type
= HDA_FIXUP_FUNC
,
7253 .v
.func
= alc269_fixup_pcm_44k
,
7255 .chain_id
= ALC269_FIXUP_QUANTA_MUTE
7257 [ALC269_FIXUP_STEREO_DMIC
] = {
7258 .type
= HDA_FIXUP_FUNC
,
7259 .v
.func
= alc269_fixup_stereo_dmic
,
7261 [ALC269_FIXUP_HEADSET_MIC
] = {
7262 .type
= HDA_FIXUP_FUNC
,
7263 .v
.func
= alc269_fixup_headset_mic
,
7265 [ALC269_FIXUP_QUANTA_MUTE
] = {
7266 .type
= HDA_FIXUP_FUNC
,
7267 .v
.func
= alc269_fixup_quanta_mute
,
7269 [ALC269_FIXUP_LIFEBOOK
] = {
7270 .type
= HDA_FIXUP_PINS
,
7271 .v
.pins
= (const struct hda_pintbl
[]) {
7272 { 0x1a, 0x2101103f }, /* dock line-out */
7273 { 0x1b, 0x23a11040 }, /* dock mic-in */
7277 .chain_id
= ALC269_FIXUP_QUANTA_MUTE
7279 [ALC269_FIXUP_LIFEBOOK_EXTMIC
] = {
7280 .type
= HDA_FIXUP_PINS
,
7281 .v
.pins
= (const struct hda_pintbl
[]) {
7282 { 0x19, 0x01a1903c }, /* headset mic, with jack detect */
7286 [ALC269_FIXUP_LIFEBOOK_HP_PIN
] = {
7287 .type
= HDA_FIXUP_PINS
,
7288 .v
.pins
= (const struct hda_pintbl
[]) {
7289 { 0x21, 0x0221102f }, /* HP out */
7293 [ALC269_FIXUP_LIFEBOOK_NO_HP_TO_LINEOUT
] = {
7294 .type
= HDA_FIXUP_FUNC
,
7295 .v
.func
= alc269_fixup_pincfg_no_hp_to_lineout
,
7297 [ALC255_FIXUP_LIFEBOOK_U7x7_HEADSET_MIC
] = {
7298 .type
= HDA_FIXUP_FUNC
,
7299 .v
.func
= alc269_fixup_pincfg_U7x7_headset_mic
,
7301 [ALC269_FIXUP_AMIC
] = {
7302 .type
= HDA_FIXUP_PINS
,
7303 .v
.pins
= (const struct hda_pintbl
[]) {
7304 { 0x14, 0x99130110 }, /* speaker */
7305 { 0x15, 0x0121401f }, /* HP out */
7306 { 0x18, 0x01a19c20 }, /* mic */
7307 { 0x19, 0x99a3092f }, /* int-mic */
7311 [ALC269_FIXUP_DMIC
] = {
7312 .type
= HDA_FIXUP_PINS
,
7313 .v
.pins
= (const struct hda_pintbl
[]) {
7314 { 0x12, 0x99a3092f }, /* int-mic */
7315 { 0x14, 0x99130110 }, /* speaker */
7316 { 0x15, 0x0121401f }, /* HP out */
7317 { 0x18, 0x01a19c20 }, /* mic */
7321 [ALC269VB_FIXUP_AMIC
] = {
7322 .type
= HDA_FIXUP_PINS
,
7323 .v
.pins
= (const struct hda_pintbl
[]) {
7324 { 0x14, 0x99130110 }, /* speaker */
7325 { 0x18, 0x01a19c20 }, /* mic */
7326 { 0x19, 0x99a3092f }, /* int-mic */
7327 { 0x21, 0x0121401f }, /* HP out */
7331 [ALC269VB_FIXUP_DMIC
] = {
7332 .type
= HDA_FIXUP_PINS
,
7333 .v
.pins
= (const struct hda_pintbl
[]) {
7334 { 0x12, 0x99a3092f }, /* int-mic */
7335 { 0x14, 0x99130110 }, /* speaker */
7336 { 0x18, 0x01a19c20 }, /* mic */
7337 { 0x21, 0x0121401f }, /* HP out */
7341 [ALC269_FIXUP_HP_MUTE_LED
] = {
7342 .type
= HDA_FIXUP_FUNC
,
7343 .v
.func
= alc269_fixup_hp_mute_led
,
7345 [ALC269_FIXUP_HP_MUTE_LED_MIC1
] = {
7346 .type
= HDA_FIXUP_FUNC
,
7347 .v
.func
= alc269_fixup_hp_mute_led_mic1
,
7349 [ALC269_FIXUP_HP_MUTE_LED_MIC2
] = {
7350 .type
= HDA_FIXUP_FUNC
,
7351 .v
.func
= alc269_fixup_hp_mute_led_mic2
,
7353 [ALC269_FIXUP_HP_MUTE_LED_MIC3
] = {
7354 .type
= HDA_FIXUP_FUNC
,
7355 .v
.func
= alc269_fixup_hp_mute_led_mic3
,
7357 .chain_id
= ALC295_FIXUP_HP_AUTO_MUTE
7359 [ALC269_FIXUP_HP_GPIO_LED
] = {
7360 .type
= HDA_FIXUP_FUNC
,
7361 .v
.func
= alc269_fixup_hp_gpio_led
,
7363 [ALC269_FIXUP_HP_GPIO_MIC1_LED
] = {
7364 .type
= HDA_FIXUP_FUNC
,
7365 .v
.func
= alc269_fixup_hp_gpio_mic1_led
,
7367 [ALC269_FIXUP_HP_LINE1_MIC1_LED
] = {
7368 .type
= HDA_FIXUP_FUNC
,
7369 .v
.func
= alc269_fixup_hp_line1_mic1_led
,
7371 [ALC269_FIXUP_INV_DMIC
] = {
7372 .type
= HDA_FIXUP_FUNC
,
7373 .v
.func
= alc_fixup_inv_dmic
,
7375 [ALC269_FIXUP_NO_SHUTUP
] = {
7376 .type
= HDA_FIXUP_FUNC
,
7377 .v
.func
= alc_fixup_no_shutup
,
7379 [ALC269_FIXUP_LENOVO_DOCK
] = {
7380 .type
= HDA_FIXUP_PINS
,
7381 .v
.pins
= (const struct hda_pintbl
[]) {
7382 { 0x19, 0x23a11040 }, /* dock mic */
7383 { 0x1b, 0x2121103f }, /* dock headphone */
7387 .chain_id
= ALC269_FIXUP_PINCFG_NO_HP_TO_LINEOUT
7389 [ALC269_FIXUP_LENOVO_DOCK_LIMIT_BOOST
] = {
7390 .type
= HDA_FIXUP_FUNC
,
7391 .v
.func
= alc269_fixup_limit_int_mic_boost
,
7393 .chain_id
= ALC269_FIXUP_LENOVO_DOCK
,
7395 [ALC269_FIXUP_PINCFG_NO_HP_TO_LINEOUT
] = {
7396 .type
= HDA_FIXUP_FUNC
,
7397 .v
.func
= alc269_fixup_pincfg_no_hp_to_lineout
,
7399 .chain_id
= ALC269_FIXUP_THINKPAD_ACPI
,
7401 [ALC269_FIXUP_DELL1_MIC_NO_PRESENCE
] = {
7402 .type
= HDA_FIXUP_PINS
,
7403 .v
.pins
= (const struct hda_pintbl
[]) {
7404 { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */
7405 { 0x1a, 0x01a1913d }, /* use as headphone mic, without its own jack detect */
7409 .chain_id
= ALC269_FIXUP_HEADSET_MODE
7411 [ALC269_FIXUP_DELL2_MIC_NO_PRESENCE
] = {
7412 .type
= HDA_FIXUP_PINS
,
7413 .v
.pins
= (const struct hda_pintbl
[]) {
7414 { 0x16, 0x21014020 }, /* dock line out */
7415 { 0x19, 0x21a19030 }, /* dock mic */
7416 { 0x1a, 0x01a1913c }, /* use as headset mic, without its own jack detect */
7420 .chain_id
= ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC
7422 [ALC269_FIXUP_DELL3_MIC_NO_PRESENCE
] = {
7423 .type
= HDA_FIXUP_PINS
,
7424 .v
.pins
= (const struct hda_pintbl
[]) {
7425 { 0x1a, 0x01a1913c }, /* use as headset mic, without its own jack detect */
7429 .chain_id
= ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC
7431 [ALC269_FIXUP_DELL4_MIC_NO_PRESENCE
] = {
7432 .type
= HDA_FIXUP_PINS
,
7433 .v
.pins
= (const struct hda_pintbl
[]) {
7434 { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */
7435 { 0x1b, 0x01a1913d }, /* use as headphone mic, without its own jack detect */
7439 .chain_id
= ALC269_FIXUP_HEADSET_MODE
7441 [ALC269_FIXUP_HEADSET_MODE
] = {
7442 .type
= HDA_FIXUP_FUNC
,
7443 .v
.func
= alc_fixup_headset_mode
,
7445 .chain_id
= ALC255_FIXUP_MIC_MUTE_LED
7447 [ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC
] = {
7448 .type
= HDA_FIXUP_FUNC
,
7449 .v
.func
= alc_fixup_headset_mode_no_hp_mic
,
7451 [ALC269_FIXUP_ASPIRE_HEADSET_MIC
] = {
7452 .type
= HDA_FIXUP_PINS
,
7453 .v
.pins
= (const struct hda_pintbl
[]) {
7454 { 0x19, 0x01a1913c }, /* headset mic w/o jack detect */
7458 .chain_id
= ALC269_FIXUP_HEADSET_MODE
,
7460 [ALC286_FIXUP_SONY_MIC_NO_PRESENCE
] = {
7461 .type
= HDA_FIXUP_PINS
,
7462 .v
.pins
= (const struct hda_pintbl
[]) {
7463 { 0x18, 0x01a1913c }, /* use as headset mic, without its own jack detect */
7467 .chain_id
= ALC269_FIXUP_HEADSET_MIC
7469 [ALC256_FIXUP_HUAWEI_MACH_WX9_PINS
] = {
7470 .type
= HDA_FIXUP_PINS
,
7471 .v
.pins
= (const struct hda_pintbl
[]) {
7485 .chain_id
= ALC255_FIXUP_MIC_MUTE_LED
7487 [ALC298_FIXUP_HUAWEI_MBX_STEREO
] = {
7488 .type
= HDA_FIXUP_FUNC
,
7489 .v
.func
= alc298_fixup_huawei_mbx_stereo
,
7491 .chain_id
= ALC255_FIXUP_MIC_MUTE_LED
7493 [ALC269_FIXUP_ASUS_X101_FUNC
] = {
7494 .type
= HDA_FIXUP_FUNC
,
7495 .v
.func
= alc269_fixup_x101_headset_mic
,
7497 [ALC269_FIXUP_ASUS_X101_VERB
] = {
7498 .type
= HDA_FIXUP_VERBS
,
7499 .v
.verbs
= (const struct hda_verb
[]) {
7500 {0x18, AC_VERB_SET_PIN_WIDGET_CONTROL
, 0},
7501 {0x20, AC_VERB_SET_COEF_INDEX
, 0x08},
7502 {0x20, AC_VERB_SET_PROC_COEF
, 0x0310},
7506 .chain_id
= ALC269_FIXUP_ASUS_X101_FUNC
7508 [ALC269_FIXUP_ASUS_X101
] = {
7509 .type
= HDA_FIXUP_PINS
,
7510 .v
.pins
= (const struct hda_pintbl
[]) {
7511 { 0x18, 0x04a1182c }, /* Headset mic */
7515 .chain_id
= ALC269_FIXUP_ASUS_X101_VERB
7517 [ALC271_FIXUP_AMIC_MIC2
] = {
7518 .type
= HDA_FIXUP_PINS
,
7519 .v
.pins
= (const struct hda_pintbl
[]) {
7520 { 0x14, 0x99130110 }, /* speaker */
7521 { 0x19, 0x01a19c20 }, /* mic */
7522 { 0x1b, 0x99a7012f }, /* int-mic */
7523 { 0x21, 0x0121401f }, /* HP out */
7527 [ALC271_FIXUP_HP_GATE_MIC_JACK
] = {
7528 .type
= HDA_FIXUP_FUNC
,
7529 .v
.func
= alc271_hp_gate_mic_jack
,
7531 .chain_id
= ALC271_FIXUP_AMIC_MIC2
,
7533 [ALC271_FIXUP_HP_GATE_MIC_JACK_E1_572
] = {
7534 .type
= HDA_FIXUP_FUNC
,
7535 .v
.func
= alc269_fixup_limit_int_mic_boost
,
7537 .chain_id
= ALC271_FIXUP_HP_GATE_MIC_JACK
,
7539 [ALC269_FIXUP_ACER_AC700
] = {
7540 .type
= HDA_FIXUP_PINS
,
7541 .v
.pins
= (const struct hda_pintbl
[]) {
7542 { 0x12, 0x99a3092f }, /* int-mic */
7543 { 0x14, 0x99130110 }, /* speaker */
7544 { 0x18, 0x03a11c20 }, /* mic */
7545 { 0x1e, 0x0346101e }, /* SPDIF1 */
7546 { 0x21, 0x0321101f }, /* HP out */
7550 .chain_id
= ALC271_FIXUP_DMIC
,
7552 [ALC269_FIXUP_LIMIT_INT_MIC_BOOST
] = {
7553 .type
= HDA_FIXUP_FUNC
,
7554 .v
.func
= alc269_fixup_limit_int_mic_boost
,
7556 .chain_id
= ALC269_FIXUP_THINKPAD_ACPI
,
7558 [ALC269VB_FIXUP_ASUS_ZENBOOK
] = {
7559 .type
= HDA_FIXUP_FUNC
,
7560 .v
.func
= alc269_fixup_limit_int_mic_boost
,
7562 .chain_id
= ALC269VB_FIXUP_DMIC
,
7564 [ALC269VB_FIXUP_ASUS_ZENBOOK_UX31A
] = {
7565 .type
= HDA_FIXUP_VERBS
,
7566 .v
.verbs
= (const struct hda_verb
[]) {
7567 /* class-D output amp +5dB */
7568 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x12 },
7569 { 0x20, AC_VERB_SET_PROC_COEF
, 0x2800 },
7573 .chain_id
= ALC269VB_FIXUP_ASUS_ZENBOOK
,
7575 [ALC269VB_FIXUP_ASUS_MIC_NO_PRESENCE
] = {
7576 .type
= HDA_FIXUP_PINS
,
7577 .v
.pins
= (const struct hda_pintbl
[]) {
7578 { 0x18, 0x01a110f0 }, /* use as headset mic */
7582 .chain_id
= ALC269_FIXUP_HEADSET_MIC
7584 [ALC269_FIXUP_LIMIT_INT_MIC_BOOST_MUTE_LED
] = {
7585 .type
= HDA_FIXUP_FUNC
,
7586 .v
.func
= alc269_fixup_limit_int_mic_boost
,
7588 .chain_id
= ALC269_FIXUP_HP_MUTE_LED_MIC1
,
7590 [ALC269VB_FIXUP_ORDISSIMO_EVE2
] = {
7591 .type
= HDA_FIXUP_PINS
,
7592 .v
.pins
= (const struct hda_pintbl
[]) {
7593 { 0x12, 0x99a3092f }, /* int-mic */
7594 { 0x18, 0x03a11d20 }, /* mic */
7595 { 0x19, 0x411111f0 }, /* Unused bogus pin */
7599 [ALC283_FIXUP_CHROME_BOOK
] = {
7600 .type
= HDA_FIXUP_FUNC
,
7601 .v
.func
= alc283_fixup_chromebook
,
7603 [ALC283_FIXUP_SENSE_COMBO_JACK
] = {
7604 .type
= HDA_FIXUP_FUNC
,
7605 .v
.func
= alc283_fixup_sense_combo_jack
,
7607 .chain_id
= ALC283_FIXUP_CHROME_BOOK
,
7609 [ALC282_FIXUP_ASUS_TX300
] = {
7610 .type
= HDA_FIXUP_FUNC
,
7611 .v
.func
= alc282_fixup_asus_tx300
,
7613 [ALC283_FIXUP_INT_MIC
] = {
7614 .type
= HDA_FIXUP_VERBS
,
7615 .v
.verbs
= (const struct hda_verb
[]) {
7616 {0x20, AC_VERB_SET_COEF_INDEX
, 0x1a},
7617 {0x20, AC_VERB_SET_PROC_COEF
, 0x0011},
7621 .chain_id
= ALC269_FIXUP_LIMIT_INT_MIC_BOOST
7623 [ALC290_FIXUP_SUBWOOFER_HSJACK
] = {
7624 .type
= HDA_FIXUP_PINS
,
7625 .v
.pins
= (const struct hda_pintbl
[]) {
7626 { 0x17, 0x90170112 }, /* subwoofer */
7630 .chain_id
= ALC290_FIXUP_MONO_SPEAKERS_HSJACK
,
7632 [ALC290_FIXUP_SUBWOOFER
] = {
7633 .type
= HDA_FIXUP_PINS
,
7634 .v
.pins
= (const struct hda_pintbl
[]) {
7635 { 0x17, 0x90170112 }, /* subwoofer */
7639 .chain_id
= ALC290_FIXUP_MONO_SPEAKERS
,
7641 [ALC290_FIXUP_MONO_SPEAKERS
] = {
7642 .type
= HDA_FIXUP_FUNC
,
7643 .v
.func
= alc290_fixup_mono_speakers
,
7645 [ALC290_FIXUP_MONO_SPEAKERS_HSJACK
] = {
7646 .type
= HDA_FIXUP_FUNC
,
7647 .v
.func
= alc290_fixup_mono_speakers
,
7649 .chain_id
= ALC269_FIXUP_DELL3_MIC_NO_PRESENCE
,
7651 [ALC269_FIXUP_THINKPAD_ACPI
] = {
7652 .type
= HDA_FIXUP_FUNC
,
7653 .v
.func
= alc_fixup_thinkpad_acpi
,
7655 .chain_id
= ALC269_FIXUP_SKU_IGNORE
,
7657 [ALC269_FIXUP_DMIC_THINKPAD_ACPI
] = {
7658 .type
= HDA_FIXUP_FUNC
,
7659 .v
.func
= alc_fixup_inv_dmic
,
7661 .chain_id
= ALC269_FIXUP_THINKPAD_ACPI
,
7663 [ALC255_FIXUP_ACER_MIC_NO_PRESENCE
] = {
7664 .type
= HDA_FIXUP_PINS
,
7665 .v
.pins
= (const struct hda_pintbl
[]) {
7666 { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */
7670 .chain_id
= ALC255_FIXUP_HEADSET_MODE
7672 [ALC255_FIXUP_ASUS_MIC_NO_PRESENCE
] = {
7673 .type
= HDA_FIXUP_PINS
,
7674 .v
.pins
= (const struct hda_pintbl
[]) {
7675 { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */
7679 .chain_id
= ALC255_FIXUP_HEADSET_MODE
7681 [ALC255_FIXUP_DELL1_MIC_NO_PRESENCE
] = {
7682 .type
= HDA_FIXUP_PINS
,
7683 .v
.pins
= (const struct hda_pintbl
[]) {
7684 { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */
7685 { 0x1a, 0x01a1913d }, /* use as headphone mic, without its own jack detect */
7689 .chain_id
= ALC255_FIXUP_HEADSET_MODE
7691 [ALC255_FIXUP_DELL2_MIC_NO_PRESENCE
] = {
7692 .type
= HDA_FIXUP_PINS
,
7693 .v
.pins
= (const struct hda_pintbl
[]) {
7694 { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */
7698 .chain_id
= ALC255_FIXUP_HEADSET_MODE_NO_HP_MIC
7700 [ALC255_FIXUP_HEADSET_MODE
] = {
7701 .type
= HDA_FIXUP_FUNC
,
7702 .v
.func
= alc_fixup_headset_mode_alc255
,
7704 .chain_id
= ALC255_FIXUP_MIC_MUTE_LED
7706 [ALC255_FIXUP_HEADSET_MODE_NO_HP_MIC
] = {
7707 .type
= HDA_FIXUP_FUNC
,
7708 .v
.func
= alc_fixup_headset_mode_alc255_no_hp_mic
,
7710 [ALC293_FIXUP_DELL1_MIC_NO_PRESENCE
] = {
7711 .type
= HDA_FIXUP_PINS
,
7712 .v
.pins
= (const struct hda_pintbl
[]) {
7713 { 0x18, 0x01a1913d }, /* use as headphone mic, without its own jack detect */
7714 { 0x1a, 0x01a1913c }, /* use as headset mic, without its own jack detect */
7718 .chain_id
= ALC269_FIXUP_HEADSET_MODE
7720 [ALC292_FIXUP_TPT440_DOCK
] = {
7721 .type
= HDA_FIXUP_FUNC
,
7722 .v
.func
= alc_fixup_tpt440_dock
,
7724 .chain_id
= ALC269_FIXUP_LIMIT_INT_MIC_BOOST
7726 [ALC292_FIXUP_TPT440
] = {
7727 .type
= HDA_FIXUP_FUNC
,
7728 .v
.func
= alc_fixup_disable_aamix
,
7730 .chain_id
= ALC292_FIXUP_TPT440_DOCK
,
7732 [ALC283_FIXUP_HEADSET_MIC
] = {
7733 .type
= HDA_FIXUP_PINS
,
7734 .v
.pins
= (const struct hda_pintbl
[]) {
7735 { 0x19, 0x04a110f0 },
7739 [ALC255_FIXUP_MIC_MUTE_LED
] = {
7740 .type
= HDA_FIXUP_FUNC
,
7741 .v
.func
= alc_fixup_micmute_led
,
7743 [ALC282_FIXUP_ASPIRE_V5_PINS
] = {
7744 .type
= HDA_FIXUP_PINS
,
7745 .v
.pins
= (const struct hda_pintbl
[]) {
7746 { 0x12, 0x90a60130 },
7747 { 0x14, 0x90170110 },
7748 { 0x17, 0x40000008 },
7749 { 0x18, 0x411111f0 },
7750 { 0x19, 0x01a1913c },
7751 { 0x1a, 0x411111f0 },
7752 { 0x1b, 0x411111f0 },
7753 { 0x1d, 0x40f89b2d },
7754 { 0x1e, 0x411111f0 },
7755 { 0x21, 0x0321101f },
7759 [ALC269VB_FIXUP_ASPIRE_E1_COEF
] = {
7760 .type
= HDA_FIXUP_FUNC
,
7761 .v
.func
= alc269vb_fixup_aspire_e1_coef
,
7763 [ALC280_FIXUP_HP_GPIO4
] = {
7764 .type
= HDA_FIXUP_FUNC
,
7765 .v
.func
= alc280_fixup_hp_gpio4
,
7767 [ALC286_FIXUP_HP_GPIO_LED
] = {
7768 .type
= HDA_FIXUP_FUNC
,
7769 .v
.func
= alc286_fixup_hp_gpio_led
,
7771 [ALC280_FIXUP_HP_GPIO2_MIC_HOTKEY
] = {
7772 .type
= HDA_FIXUP_FUNC
,
7773 .v
.func
= alc280_fixup_hp_gpio2_mic_hotkey
,
7775 [ALC280_FIXUP_HP_DOCK_PINS
] = {
7776 .type
= HDA_FIXUP_PINS
,
7777 .v
.pins
= (const struct hda_pintbl
[]) {
7778 { 0x1b, 0x21011020 }, /* line-out */
7779 { 0x1a, 0x01a1903c }, /* headset mic */
7780 { 0x18, 0x2181103f }, /* line-in */
7784 .chain_id
= ALC280_FIXUP_HP_GPIO4
7786 [ALC269_FIXUP_HP_DOCK_GPIO_MIC1_LED
] = {
7787 .type
= HDA_FIXUP_PINS
,
7788 .v
.pins
= (const struct hda_pintbl
[]) {
7789 { 0x1b, 0x21011020 }, /* line-out */
7790 { 0x18, 0x2181103f }, /* line-in */
7794 .chain_id
= ALC269_FIXUP_HP_GPIO_MIC1_LED
7796 [ALC280_FIXUP_HP_9480M
] = {
7797 .type
= HDA_FIXUP_FUNC
,
7798 .v
.func
= alc280_fixup_hp_9480m
,
7800 [ALC245_FIXUP_HP_X360_AMP
] = {
7801 .type
= HDA_FIXUP_FUNC
,
7802 .v
.func
= alc245_fixup_hp_x360_amp
,
7804 .chain_id
= ALC245_FIXUP_HP_GPIO_LED
7806 [ALC288_FIXUP_DELL_HEADSET_MODE
] = {
7807 .type
= HDA_FIXUP_FUNC
,
7808 .v
.func
= alc_fixup_headset_mode_dell_alc288
,
7810 .chain_id
= ALC255_FIXUP_MIC_MUTE_LED
7812 [ALC288_FIXUP_DELL1_MIC_NO_PRESENCE
] = {
7813 .type
= HDA_FIXUP_PINS
,
7814 .v
.pins
= (const struct hda_pintbl
[]) {
7815 { 0x18, 0x01a1913c }, /* use as headset mic, without its own jack detect */
7816 { 0x1a, 0x01a1913d }, /* use as headphone mic, without its own jack detect */
7820 .chain_id
= ALC288_FIXUP_DELL_HEADSET_MODE
7822 [ALC288_FIXUP_DISABLE_AAMIX
] = {
7823 .type
= HDA_FIXUP_FUNC
,
7824 .v
.func
= alc_fixup_disable_aamix
,
7826 .chain_id
= ALC288_FIXUP_DELL1_MIC_NO_PRESENCE
7828 [ALC288_FIXUP_DELL_XPS_13
] = {
7829 .type
= HDA_FIXUP_FUNC
,
7830 .v
.func
= alc_fixup_dell_xps13
,
7832 .chain_id
= ALC288_FIXUP_DISABLE_AAMIX
7834 [ALC292_FIXUP_DISABLE_AAMIX
] = {
7835 .type
= HDA_FIXUP_FUNC
,
7836 .v
.func
= alc_fixup_disable_aamix
,
7838 .chain_id
= ALC269_FIXUP_DELL2_MIC_NO_PRESENCE
7840 [ALC293_FIXUP_DISABLE_AAMIX_MULTIJACK
] = {
7841 .type
= HDA_FIXUP_FUNC
,
7842 .v
.func
= alc_fixup_disable_aamix
,
7844 .chain_id
= ALC293_FIXUP_DELL1_MIC_NO_PRESENCE
7846 [ALC292_FIXUP_DELL_E7X_AAMIX
] = {
7847 .type
= HDA_FIXUP_FUNC
,
7848 .v
.func
= alc_fixup_dell_xps13
,
7850 .chain_id
= ALC292_FIXUP_DISABLE_AAMIX
7852 [ALC292_FIXUP_DELL_E7X
] = {
7853 .type
= HDA_FIXUP_FUNC
,
7854 .v
.func
= alc_fixup_micmute_led
,
7855 /* micmute fixup must be applied at last */
7856 .chained_before
= true,
7857 .chain_id
= ALC292_FIXUP_DELL_E7X_AAMIX
,
7859 [ALC298_FIXUP_ALIENWARE_MIC_NO_PRESENCE
] = {
7860 .type
= HDA_FIXUP_PINS
,
7861 .v
.pins
= (const struct hda_pintbl
[]) {
7862 { 0x18, 0x01a1913c }, /* headset mic w/o jack detect */
7865 .chained_before
= true,
7866 .chain_id
= ALC269_FIXUP_HEADSET_MODE
,
7868 [ALC298_FIXUP_DELL1_MIC_NO_PRESENCE
] = {
7869 .type
= HDA_FIXUP_PINS
,
7870 .v
.pins
= (const struct hda_pintbl
[]) {
7871 { 0x18, 0x01a1913c }, /* use as headset mic, without its own jack detect */
7872 { 0x1a, 0x01a1913d }, /* use as headphone mic, without its own jack detect */
7876 .chain_id
= ALC269_FIXUP_HEADSET_MODE
7878 [ALC298_FIXUP_DELL_AIO_MIC_NO_PRESENCE
] = {
7879 .type
= HDA_FIXUP_PINS
,
7880 .v
.pins
= (const struct hda_pintbl
[]) {
7881 { 0x18, 0x01a1913c }, /* use as headset mic, without its own jack detect */
7885 .chain_id
= ALC269_FIXUP_HEADSET_MODE
7887 [ALC275_FIXUP_DELL_XPS
] = {
7888 .type
= HDA_FIXUP_VERBS
,
7889 .v
.verbs
= (const struct hda_verb
[]) {
7890 /* Enables internal speaker */
7891 {0x20, AC_VERB_SET_COEF_INDEX
, 0x1f},
7892 {0x20, AC_VERB_SET_PROC_COEF
, 0x00c0},
7893 {0x20, AC_VERB_SET_COEF_INDEX
, 0x30},
7894 {0x20, AC_VERB_SET_PROC_COEF
, 0x00b1},
7898 [ALC293_FIXUP_LENOVO_SPK_NOISE
] = {
7899 .type
= HDA_FIXUP_FUNC
,
7900 .v
.func
= alc_fixup_disable_aamix
,
7902 .chain_id
= ALC269_FIXUP_THINKPAD_ACPI
7904 [ALC233_FIXUP_LENOVO_LINE2_MIC_HOTKEY
] = {
7905 .type
= HDA_FIXUP_FUNC
,
7906 .v
.func
= alc233_fixup_lenovo_line2_mic_hotkey
,
7908 [ALC233_FIXUP_INTEL_NUC8_DMIC
] = {
7909 .type
= HDA_FIXUP_FUNC
,
7910 .v
.func
= alc_fixup_inv_dmic
,
7912 .chain_id
= ALC233_FIXUP_INTEL_NUC8_BOOST
,
7914 [ALC233_FIXUP_INTEL_NUC8_BOOST
] = {
7915 .type
= HDA_FIXUP_FUNC
,
7916 .v
.func
= alc269_fixup_limit_int_mic_boost
7918 [ALC255_FIXUP_DELL_SPK_NOISE
] = {
7919 .type
= HDA_FIXUP_FUNC
,
7920 .v
.func
= alc_fixup_disable_aamix
,
7922 .chain_id
= ALC255_FIXUP_DELL1_MIC_NO_PRESENCE
7924 [ALC225_FIXUP_DISABLE_MIC_VREF
] = {
7925 .type
= HDA_FIXUP_FUNC
,
7926 .v
.func
= alc_fixup_disable_mic_vref
,
7928 .chain_id
= ALC269_FIXUP_DELL1_MIC_NO_PRESENCE
7930 [ALC225_FIXUP_DELL1_MIC_NO_PRESENCE
] = {
7931 .type
= HDA_FIXUP_VERBS
,
7932 .v
.verbs
= (const struct hda_verb
[]) {
7933 /* Disable pass-through path for FRONT 14h */
7934 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x36 },
7935 { 0x20, AC_VERB_SET_PROC_COEF
, 0x57d7 },
7939 .chain_id
= ALC225_FIXUP_DISABLE_MIC_VREF
7941 [ALC280_FIXUP_HP_HEADSET_MIC
] = {
7942 .type
= HDA_FIXUP_FUNC
,
7943 .v
.func
= alc_fixup_disable_aamix
,
7945 .chain_id
= ALC269_FIXUP_HEADSET_MIC
,
7947 [ALC221_FIXUP_HP_FRONT_MIC
] = {
7948 .type
= HDA_FIXUP_PINS
,
7949 .v
.pins
= (const struct hda_pintbl
[]) {
7950 { 0x19, 0x02a19020 }, /* Front Mic */
7954 [ALC292_FIXUP_TPT460
] = {
7955 .type
= HDA_FIXUP_FUNC
,
7956 .v
.func
= alc_fixup_tpt440_dock
,
7958 .chain_id
= ALC293_FIXUP_LENOVO_SPK_NOISE
,
7960 [ALC298_FIXUP_SPK_VOLUME
] = {
7961 .type
= HDA_FIXUP_FUNC
,
7962 .v
.func
= alc298_fixup_speaker_volume
,
7964 .chain_id
= ALC298_FIXUP_DELL_AIO_MIC_NO_PRESENCE
,
7966 [ALC298_FIXUP_LENOVO_SPK_VOLUME
] = {
7967 .type
= HDA_FIXUP_FUNC
,
7968 .v
.func
= alc298_fixup_speaker_volume
,
7970 [ALC295_FIXUP_DISABLE_DAC3
] = {
7971 .type
= HDA_FIXUP_FUNC
,
7972 .v
.func
= alc295_fixup_disable_dac3
,
7974 [ALC285_FIXUP_SPEAKER2_TO_DAC1
] = {
7975 .type
= HDA_FIXUP_FUNC
,
7976 .v
.func
= alc285_fixup_speaker2_to_dac1
,
7978 .chain_id
= ALC269_FIXUP_THINKPAD_ACPI
7980 [ALC256_FIXUP_DELL_INSPIRON_7559_SUBWOOFER
] = {
7981 .type
= HDA_FIXUP_PINS
,
7982 .v
.pins
= (const struct hda_pintbl
[]) {
7983 { 0x1b, 0x90170151 },
7987 .chain_id
= ALC255_FIXUP_DELL1_MIC_NO_PRESENCE
7989 [ALC269_FIXUP_ATIV_BOOK_8
] = {
7990 .type
= HDA_FIXUP_FUNC
,
7991 .v
.func
= alc_fixup_auto_mute_via_amp
,
7993 .chain_id
= ALC269_FIXUP_NO_SHUTUP
7995 [ALC221_FIXUP_HP_288PRO_MIC_NO_PRESENCE
] = {
7996 .type
= HDA_FIXUP_PINS
,
7997 .v
.pins
= (const struct hda_pintbl
[]) {
7998 { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */
7999 { 0x1a, 0x01813030 }, /* use as headphone mic, without its own jack detect */
8003 .chain_id
= ALC269_FIXUP_HEADSET_MODE
8005 [ALC221_FIXUP_HP_MIC_NO_PRESENCE
] = {
8006 .type
= HDA_FIXUP_PINS
,
8007 .v
.pins
= (const struct hda_pintbl
[]) {
8008 { 0x18, 0x01a1913c }, /* use as headset mic, without its own jack detect */
8009 { 0x1a, 0x01a1913d }, /* use as headphone mic, without its own jack detect */
8013 .chain_id
= ALC269_FIXUP_HEADSET_MODE
8015 [ALC256_FIXUP_ASUS_HEADSET_MODE
] = {
8016 .type
= HDA_FIXUP_FUNC
,
8017 .v
.func
= alc_fixup_headset_mode
,
8019 [ALC256_FIXUP_ASUS_MIC
] = {
8020 .type
= HDA_FIXUP_PINS
,
8021 .v
.pins
= (const struct hda_pintbl
[]) {
8022 { 0x13, 0x90a60160 }, /* use as internal mic */
8023 { 0x19, 0x04a11120 }, /* use as headset mic, without its own jack detect */
8027 .chain_id
= ALC256_FIXUP_ASUS_HEADSET_MODE
8029 [ALC256_FIXUP_ASUS_AIO_GPIO2
] = {
8030 .type
= HDA_FIXUP_FUNC
,
8031 /* Set up GPIO2 for the speaker amp */
8032 .v
.func
= alc_fixup_gpio4
,
8034 [ALC233_FIXUP_ASUS_MIC_NO_PRESENCE
] = {
8035 .type
= HDA_FIXUP_PINS
,
8036 .v
.pins
= (const struct hda_pintbl
[]) {
8037 { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */
8041 .chain_id
= ALC269_FIXUP_HEADSET_MIC
8043 [ALC233_FIXUP_EAPD_COEF_AND_MIC_NO_PRESENCE
] = {
8044 .type
= HDA_FIXUP_VERBS
,
8045 .v
.verbs
= (const struct hda_verb
[]) {
8046 /* Enables internal speaker */
8047 {0x20, AC_VERB_SET_COEF_INDEX
, 0x40},
8048 {0x20, AC_VERB_SET_PROC_COEF
, 0x8800},
8052 .chain_id
= ALC233_FIXUP_ASUS_MIC_NO_PRESENCE
8054 [ALC233_FIXUP_LENOVO_MULTI_CODECS
] = {
8055 .type
= HDA_FIXUP_FUNC
,
8056 .v
.func
= alc233_alc662_fixup_lenovo_dual_codecs
,
8058 .chain_id
= ALC269_FIXUP_GPIO2
8060 [ALC233_FIXUP_ACER_HEADSET_MIC
] = {
8061 .type
= HDA_FIXUP_VERBS
,
8062 .v
.verbs
= (const struct hda_verb
[]) {
8063 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x45 },
8064 { 0x20, AC_VERB_SET_PROC_COEF
, 0x5089 },
8068 .chain_id
= ALC233_FIXUP_ASUS_MIC_NO_PRESENCE
8070 [ALC294_FIXUP_LENOVO_MIC_LOCATION
] = {
8071 .type
= HDA_FIXUP_PINS
,
8072 .v
.pins
= (const struct hda_pintbl
[]) {
8073 /* Change the mic location from front to right, otherwise there are
8074 two front mics with the same name, pulseaudio can't handle them.
8075 This is just a temporary workaround, after applying this fixup,
8076 there will be one "Front Mic" and one "Mic" in this machine.
8078 { 0x1a, 0x04a19040 },
8082 [ALC225_FIXUP_DELL_WYSE_MIC_NO_PRESENCE
] = {
8083 .type
= HDA_FIXUP_PINS
,
8084 .v
.pins
= (const struct hda_pintbl
[]) {
8085 { 0x16, 0x0101102f }, /* Rear Headset HP */
8086 { 0x19, 0x02a1913c }, /* use as Front headset mic, without its own jack detect */
8087 { 0x1a, 0x01a19030 }, /* Rear Headset MIC */
8088 { 0x1b, 0x02011020 },
8092 .chain_id
= ALC225_FIXUP_S3_POP_NOISE
8094 [ALC225_FIXUP_S3_POP_NOISE
] = {
8095 .type
= HDA_FIXUP_FUNC
,
8096 .v
.func
= alc225_fixup_s3_pop_noise
,
8098 .chain_id
= ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC
8100 [ALC700_FIXUP_INTEL_REFERENCE
] = {
8101 .type
= HDA_FIXUP_VERBS
,
8102 .v
.verbs
= (const struct hda_verb
[]) {
8103 /* Enables internal speaker */
8104 {0x20, AC_VERB_SET_COEF_INDEX
, 0x45},
8105 {0x20, AC_VERB_SET_PROC_COEF
, 0x5289},
8106 {0x20, AC_VERB_SET_COEF_INDEX
, 0x4A},
8107 {0x20, AC_VERB_SET_PROC_COEF
, 0x001b},
8108 {0x58, AC_VERB_SET_COEF_INDEX
, 0x00},
8109 {0x58, AC_VERB_SET_PROC_COEF
, 0x3888},
8110 {0x20, AC_VERB_SET_COEF_INDEX
, 0x6f},
8111 {0x20, AC_VERB_SET_PROC_COEF
, 0x2c0b},
8115 [ALC274_FIXUP_DELL_BIND_DACS
] = {
8116 .type
= HDA_FIXUP_FUNC
,
8117 .v
.func
= alc274_fixup_bind_dacs
,
8119 .chain_id
= ALC269_FIXUP_DELL1_MIC_NO_PRESENCE
8121 [ALC274_FIXUP_DELL_AIO_LINEOUT_VERB
] = {
8122 .type
= HDA_FIXUP_PINS
,
8123 .v
.pins
= (const struct hda_pintbl
[]) {
8124 { 0x1b, 0x0401102f },
8128 .chain_id
= ALC274_FIXUP_DELL_BIND_DACS
8130 [ALC298_FIXUP_TPT470_DOCK_FIX
] = {
8131 .type
= HDA_FIXUP_FUNC
,
8132 .v
.func
= alc_fixup_tpt470_dock
,
8134 .chain_id
= ALC293_FIXUP_LENOVO_SPK_NOISE
8136 [ALC298_FIXUP_TPT470_DOCK
] = {
8137 .type
= HDA_FIXUP_FUNC
,
8138 .v
.func
= alc_fixup_tpt470_dacs
,
8140 .chain_id
= ALC298_FIXUP_TPT470_DOCK_FIX
8142 [ALC255_FIXUP_DUMMY_LINEOUT_VERB
] = {
8143 .type
= HDA_FIXUP_PINS
,
8144 .v
.pins
= (const struct hda_pintbl
[]) {
8145 { 0x14, 0x0201101f },
8149 .chain_id
= ALC255_FIXUP_DELL1_MIC_NO_PRESENCE
8151 [ALC255_FIXUP_DELL_HEADSET_MIC
] = {
8152 .type
= HDA_FIXUP_PINS
,
8153 .v
.pins
= (const struct hda_pintbl
[]) {
8154 { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */
8158 .chain_id
= ALC269_FIXUP_HEADSET_MIC
8160 [ALC295_FIXUP_HP_X360
] = {
8161 .type
= HDA_FIXUP_FUNC
,
8162 .v
.func
= alc295_fixup_hp_top_speakers
,
8164 .chain_id
= ALC269_FIXUP_HP_MUTE_LED_MIC3
8166 [ALC221_FIXUP_HP_HEADSET_MIC
] = {
8167 .type
= HDA_FIXUP_PINS
,
8168 .v
.pins
= (const struct hda_pintbl
[]) {
8169 { 0x19, 0x0181313f},
8173 .chain_id
= ALC269_FIXUP_HEADSET_MIC
8175 [ALC285_FIXUP_LENOVO_HEADPHONE_NOISE
] = {
8176 .type
= HDA_FIXUP_FUNC
,
8177 .v
.func
= alc285_fixup_invalidate_dacs
,
8179 .chain_id
= ALC269_FIXUP_THINKPAD_ACPI
8181 [ALC295_FIXUP_HP_AUTO_MUTE
] = {
8182 .type
= HDA_FIXUP_FUNC
,
8183 .v
.func
= alc_fixup_auto_mute_via_amp
,
8185 [ALC286_FIXUP_ACER_AIO_MIC_NO_PRESENCE
] = {
8186 .type
= HDA_FIXUP_PINS
,
8187 .v
.pins
= (const struct hda_pintbl
[]) {
8188 { 0x18, 0x01a1913c }, /* use as headset mic, without its own jack detect */
8192 .chain_id
= ALC269_FIXUP_HEADSET_MIC
8194 [ALC294_FIXUP_ASUS_MIC
] = {
8195 .type
= HDA_FIXUP_PINS
,
8196 .v
.pins
= (const struct hda_pintbl
[]) {
8197 { 0x13, 0x90a60160 }, /* use as internal mic */
8198 { 0x19, 0x04a11120 }, /* use as headset mic, without its own jack detect */
8202 .chain_id
= ALC269_FIXUP_HEADSET_MIC
8204 [ALC294_FIXUP_ASUS_HEADSET_MIC
] = {
8205 .type
= HDA_FIXUP_PINS
,
8206 .v
.pins
= (const struct hda_pintbl
[]) {
8207 { 0x19, 0x01a1103c }, /* use as headset mic */
8211 .chain_id
= ALC269_FIXUP_HEADSET_MIC
8213 [ALC294_FIXUP_ASUS_SPK
] = {
8214 .type
= HDA_FIXUP_VERBS
,
8215 .v
.verbs
= (const struct hda_verb
[]) {
8217 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x40 },
8218 { 0x20, AC_VERB_SET_PROC_COEF
, 0x8800 },
8219 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x0f },
8220 { 0x20, AC_VERB_SET_PROC_COEF
, 0x7774 },
8224 .chain_id
= ALC294_FIXUP_ASUS_HEADSET_MIC
8226 [ALC295_FIXUP_CHROME_BOOK
] = {
8227 .type
= HDA_FIXUP_FUNC
,
8228 .v
.func
= alc295_fixup_chromebook
,
8230 .chain_id
= ALC225_FIXUP_HEADSET_JACK
8232 [ALC225_FIXUP_HEADSET_JACK
] = {
8233 .type
= HDA_FIXUP_FUNC
,
8234 .v
.func
= alc_fixup_headset_jack
,
8236 [ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
] = {
8237 .type
= HDA_FIXUP_PINS
,
8238 .v
.pins
= (const struct hda_pintbl
[]) {
8239 { 0x1a, 0x01a1913c }, /* use as headset mic, without its own jack detect */
8243 .chain_id
= ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC
8245 [ALC285_FIXUP_LENOVO_PC_BEEP_IN_NOISE
] = {
8246 .type
= HDA_FIXUP_VERBS
,
8247 .v
.verbs
= (const struct hda_verb
[]) {
8248 /* Disable PCBEEP-IN passthrough */
8249 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x36 },
8250 { 0x20, AC_VERB_SET_PROC_COEF
, 0x57d7 },
8254 .chain_id
= ALC285_FIXUP_LENOVO_HEADPHONE_NOISE
8256 [ALC255_FIXUP_ACER_HEADSET_MIC
] = {
8257 .type
= HDA_FIXUP_PINS
,
8258 .v
.pins
= (const struct hda_pintbl
[]) {
8259 { 0x19, 0x03a11130 },
8260 { 0x1a, 0x90a60140 }, /* use as internal mic */
8264 .chain_id
= ALC255_FIXUP_HEADSET_MODE_NO_HP_MIC
8266 [ALC225_FIXUP_DELL_WYSE_AIO_MIC_NO_PRESENCE
] = {
8267 .type
= HDA_FIXUP_PINS
,
8268 .v
.pins
= (const struct hda_pintbl
[]) {
8269 { 0x16, 0x01011020 }, /* Rear Line out */
8270 { 0x19, 0x01a1913c }, /* use as Front headset mic, without its own jack detect */
8274 .chain_id
= ALC225_FIXUP_WYSE_AUTO_MUTE
8276 [ALC225_FIXUP_WYSE_AUTO_MUTE
] = {
8277 .type
= HDA_FIXUP_FUNC
,
8278 .v
.func
= alc_fixup_auto_mute_via_amp
,
8280 .chain_id
= ALC225_FIXUP_WYSE_DISABLE_MIC_VREF
8282 [ALC225_FIXUP_WYSE_DISABLE_MIC_VREF
] = {
8283 .type
= HDA_FIXUP_FUNC
,
8284 .v
.func
= alc_fixup_disable_mic_vref
,
8286 .chain_id
= ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC
8288 [ALC286_FIXUP_ACER_AIO_HEADSET_MIC
] = {
8289 .type
= HDA_FIXUP_VERBS
,
8290 .v
.verbs
= (const struct hda_verb
[]) {
8291 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x4f },
8292 { 0x20, AC_VERB_SET_PROC_COEF
, 0x5029 },
8296 .chain_id
= ALC286_FIXUP_ACER_AIO_MIC_NO_PRESENCE
8298 [ALC256_FIXUP_ASUS_HEADSET_MIC
] = {
8299 .type
= HDA_FIXUP_PINS
,
8300 .v
.pins
= (const struct hda_pintbl
[]) {
8301 { 0x19, 0x03a11020 }, /* headset mic with jack detect */
8305 .chain_id
= ALC256_FIXUP_ASUS_HEADSET_MODE
8307 [ALC256_FIXUP_ASUS_MIC_NO_PRESENCE
] = {
8308 .type
= HDA_FIXUP_PINS
,
8309 .v
.pins
= (const struct hda_pintbl
[]) {
8310 { 0x19, 0x04a11120 }, /* use as headset mic, without its own jack detect */
8314 .chain_id
= ALC256_FIXUP_ASUS_HEADSET_MODE
8316 [ALC299_FIXUP_PREDATOR_SPK
] = {
8317 .type
= HDA_FIXUP_PINS
,
8318 .v
.pins
= (const struct hda_pintbl
[]) {
8319 { 0x21, 0x90170150 }, /* use as headset mic, without its own jack detect */
8323 [ALC256_FIXUP_MEDION_HEADSET_NO_PRESENCE
] = {
8324 .type
= HDA_FIXUP_PINS
,
8325 .v
.pins
= (const struct hda_pintbl
[]) {
8326 { 0x19, 0x04a11040 },
8327 { 0x21, 0x04211020 },
8331 .chain_id
= ALC256_FIXUP_ASUS_HEADSET_MODE
8333 [ALC289_FIXUP_DELL_SPK2
] = {
8334 .type
= HDA_FIXUP_PINS
,
8335 .v
.pins
= (const struct hda_pintbl
[]) {
8336 { 0x17, 0x90170130 }, /* bass spk */
8340 .chain_id
= ALC269_FIXUP_DELL4_MIC_NO_PRESENCE
8342 [ALC289_FIXUP_DUAL_SPK
] = {
8343 .type
= HDA_FIXUP_FUNC
,
8344 .v
.func
= alc285_fixup_speaker2_to_dac1
,
8346 .chain_id
= ALC289_FIXUP_DELL_SPK2
8348 [ALC294_FIXUP_SPK2_TO_DAC1
] = {
8349 .type
= HDA_FIXUP_FUNC
,
8350 .v
.func
= alc285_fixup_speaker2_to_dac1
,
8352 .chain_id
= ALC294_FIXUP_ASUS_HEADSET_MIC
8354 [ALC294_FIXUP_ASUS_DUAL_SPK
] = {
8355 .type
= HDA_FIXUP_FUNC
,
8356 /* The GPIO must be pulled to initialize the AMP */
8357 .v
.func
= alc_fixup_gpio4
,
8359 .chain_id
= ALC294_FIXUP_SPK2_TO_DAC1
8361 [ALC285_FIXUP_THINKPAD_X1_GEN7
] = {
8362 .type
= HDA_FIXUP_FUNC
,
8363 .v
.func
= alc285_fixup_thinkpad_x1_gen7
,
8365 .chain_id
= ALC269_FIXUP_THINKPAD_ACPI
8367 [ALC285_FIXUP_THINKPAD_HEADSET_JACK
] = {
8368 .type
= HDA_FIXUP_FUNC
,
8369 .v
.func
= alc_fixup_headset_jack
,
8371 .chain_id
= ALC285_FIXUP_THINKPAD_X1_GEN7
8373 [ALC294_FIXUP_ASUS_HPE
] = {
8374 .type
= HDA_FIXUP_VERBS
,
8375 .v
.verbs
= (const struct hda_verb
[]) {
8377 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x0f },
8378 { 0x20, AC_VERB_SET_PROC_COEF
, 0x7774 },
8382 .chain_id
= ALC294_FIXUP_ASUS_HEADSET_MIC
8384 [ALC294_FIXUP_ASUS_GX502_PINS
] = {
8385 .type
= HDA_FIXUP_PINS
,
8386 .v
.pins
= (const struct hda_pintbl
[]) {
8387 { 0x19, 0x03a11050 }, /* front HP mic */
8388 { 0x1a, 0x01a11830 }, /* rear external mic */
8389 { 0x21, 0x03211020 }, /* front HP out */
8393 .chain_id
= ALC294_FIXUP_ASUS_GX502_VERBS
8395 [ALC294_FIXUP_ASUS_GX502_VERBS
] = {
8396 .type
= HDA_FIXUP_VERBS
,
8397 .v
.verbs
= (const struct hda_verb
[]) {
8398 /* set 0x15 to HP-OUT ctrl */
8399 { 0x15, AC_VERB_SET_PIN_WIDGET_CONTROL
, 0xc0 },
8400 /* unmute the 0x15 amp */
8401 { 0x15, AC_VERB_SET_AMP_GAIN_MUTE
, 0xb000 },
8405 .chain_id
= ALC294_FIXUP_ASUS_GX502_HP
8407 [ALC294_FIXUP_ASUS_GX502_HP
] = {
8408 .type
= HDA_FIXUP_FUNC
,
8409 .v
.func
= alc294_fixup_gx502_hp
,
8411 [ALC294_FIXUP_ASUS_GU502_PINS
] = {
8412 .type
= HDA_FIXUP_PINS
,
8413 .v
.pins
= (const struct hda_pintbl
[]) {
8414 { 0x19, 0x01a11050 }, /* rear HP mic */
8415 { 0x1a, 0x01a11830 }, /* rear external mic */
8416 { 0x21, 0x012110f0 }, /* rear HP out */
8420 .chain_id
= ALC294_FIXUP_ASUS_GU502_VERBS
8422 [ALC294_FIXUP_ASUS_GU502_VERBS
] = {
8423 .type
= HDA_FIXUP_VERBS
,
8424 .v
.verbs
= (const struct hda_verb
[]) {
8425 /* set 0x15 to HP-OUT ctrl */
8426 { 0x15, AC_VERB_SET_PIN_WIDGET_CONTROL
, 0xc0 },
8427 /* unmute the 0x15 amp */
8428 { 0x15, AC_VERB_SET_AMP_GAIN_MUTE
, 0xb000 },
8429 /* set 0x1b to HP-OUT */
8430 { 0x1b, AC_VERB_SET_PIN_WIDGET_CONTROL
, 0x24 },
8434 .chain_id
= ALC294_FIXUP_ASUS_GU502_HP
8436 [ALC294_FIXUP_ASUS_GU502_HP
] = {
8437 .type
= HDA_FIXUP_FUNC
,
8438 .v
.func
= alc294_fixup_gu502_hp
,
8440 [ALC294_FIXUP_ASUS_G513_PINS
] = {
8441 .type
= HDA_FIXUP_PINS
,
8442 .v
.pins
= (const struct hda_pintbl
[]) {
8443 { 0x19, 0x03a11050 }, /* front HP mic */
8444 { 0x1a, 0x03a11c30 }, /* rear external mic */
8445 { 0x21, 0x03211420 }, /* front HP out */
8449 [ALC285_FIXUP_ASUS_G533Z_PINS
] = {
8450 .type
= HDA_FIXUP_PINS
,
8451 .v
.pins
= (const struct hda_pintbl
[]) {
8452 { 0x14, 0x90170120 },
8456 .chain_id
= ALC294_FIXUP_ASUS_G513_PINS
,
8458 [ALC294_FIXUP_ASUS_COEF_1B
] = {
8459 .type
= HDA_FIXUP_VERBS
,
8460 .v
.verbs
= (const struct hda_verb
[]) {
8461 /* Set bit 10 to correct noisy output after reboot from
8462 * Windows 10 (due to pop noise reduction?)
8464 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x1b },
8465 { 0x20, AC_VERB_SET_PROC_COEF
, 0x4e4b },
8469 .chain_id
= ALC289_FIXUP_ASUS_GA401
,
8471 [ALC285_FIXUP_HP_GPIO_LED
] = {
8472 .type
= HDA_FIXUP_FUNC
,
8473 .v
.func
= alc285_fixup_hp_gpio_led
,
8475 [ALC285_FIXUP_HP_MUTE_LED
] = {
8476 .type
= HDA_FIXUP_FUNC
,
8477 .v
.func
= alc285_fixup_hp_mute_led
,
8479 [ALC236_FIXUP_HP_GPIO_LED
] = {
8480 .type
= HDA_FIXUP_FUNC
,
8481 .v
.func
= alc236_fixup_hp_gpio_led
,
8483 [ALC236_FIXUP_HP_MUTE_LED
] = {
8484 .type
= HDA_FIXUP_FUNC
,
8485 .v
.func
= alc236_fixup_hp_mute_led
,
8487 [ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF
] = {
8488 .type
= HDA_FIXUP_FUNC
,
8489 .v
.func
= alc236_fixup_hp_mute_led_micmute_vref
,
8491 [ALC298_FIXUP_SAMSUNG_AMP
] = {
8492 .type
= HDA_FIXUP_FUNC
,
8493 .v
.func
= alc298_fixup_samsung_amp
,
8495 .chain_id
= ALC298_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET
8497 [ALC298_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET
] = {
8498 .type
= HDA_FIXUP_VERBS
,
8499 .v
.verbs
= (const struct hda_verb
[]) {
8500 { 0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL
, 0xc5 },
8504 [ALC256_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET
] = {
8505 .type
= HDA_FIXUP_VERBS
,
8506 .v
.verbs
= (const struct hda_verb
[]) {
8507 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x08},
8508 { 0x20, AC_VERB_SET_PROC_COEF
, 0x2fcf},
8512 [ALC295_FIXUP_ASUS_MIC_NO_PRESENCE
] = {
8513 .type
= HDA_FIXUP_PINS
,
8514 .v
.pins
= (const struct hda_pintbl
[]) {
8515 { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */
8519 .chain_id
= ALC269_FIXUP_HEADSET_MODE
8521 [ALC269VC_FIXUP_ACER_VCOPPERBOX_PINS
] = {
8522 .type
= HDA_FIXUP_PINS
,
8523 .v
.pins
= (const struct hda_pintbl
[]) {
8524 { 0x14, 0x90100120 }, /* use as internal speaker */
8525 { 0x18, 0x02a111f0 }, /* use as headset mic, without its own jack detect */
8526 { 0x1a, 0x01011020 }, /* use as line out */
8530 .chain_id
= ALC269_FIXUP_HEADSET_MIC
8532 [ALC269VC_FIXUP_ACER_HEADSET_MIC
] = {
8533 .type
= HDA_FIXUP_PINS
,
8534 .v
.pins
= (const struct hda_pintbl
[]) {
8535 { 0x18, 0x02a11030 }, /* use as headset mic */
8539 .chain_id
= ALC269_FIXUP_HEADSET_MIC
8541 [ALC269VC_FIXUP_ACER_MIC_NO_PRESENCE
] = {
8542 .type
= HDA_FIXUP_PINS
,
8543 .v
.pins
= (const struct hda_pintbl
[]) {
8544 { 0x18, 0x01a11130 }, /* use as headset mic, without its own jack detect */
8548 .chain_id
= ALC269_FIXUP_HEADSET_MIC
8550 [ALC289_FIXUP_ASUS_GA401
] = {
8551 .type
= HDA_FIXUP_FUNC
,
8552 .v
.func
= alc289_fixup_asus_ga401
,
8554 .chain_id
= ALC289_FIXUP_ASUS_GA502
,
8556 [ALC289_FIXUP_ASUS_GA502
] = {
8557 .type
= HDA_FIXUP_PINS
,
8558 .v
.pins
= (const struct hda_pintbl
[]) {
8559 { 0x19, 0x03a11020 }, /* headset mic with jack detect */
8563 [ALC256_FIXUP_ACER_MIC_NO_PRESENCE
] = {
8564 .type
= HDA_FIXUP_PINS
,
8565 .v
.pins
= (const struct hda_pintbl
[]) {
8566 { 0x19, 0x02a11120 }, /* use as headset mic, without its own jack detect */
8570 .chain_id
= ALC256_FIXUP_ASUS_HEADSET_MODE
8572 [ALC285_FIXUP_HP_GPIO_AMP_INIT
] = {
8573 .type
= HDA_FIXUP_FUNC
,
8574 .v
.func
= alc285_fixup_hp_gpio_amp_init
,
8576 .chain_id
= ALC285_FIXUP_HP_GPIO_LED
8578 [ALC269_FIXUP_CZC_B20
] = {
8579 .type
= HDA_FIXUP_PINS
,
8580 .v
.pins
= (const struct hda_pintbl
[]) {
8581 { 0x12, 0x411111f0 },
8582 { 0x14, 0x90170110 }, /* speaker */
8583 { 0x15, 0x032f1020 }, /* HP out */
8584 { 0x17, 0x411111f0 },
8585 { 0x18, 0x03ab1040 }, /* mic */
8586 { 0x19, 0xb7a7013f },
8587 { 0x1a, 0x0181305f },
8588 { 0x1b, 0x411111f0 },
8589 { 0x1d, 0x411111f0 },
8590 { 0x1e, 0x411111f0 },
8593 .chain_id
= ALC269_FIXUP_DMIC
,
8595 [ALC269_FIXUP_CZC_TMI
] = {
8596 .type
= HDA_FIXUP_PINS
,
8597 .v
.pins
= (const struct hda_pintbl
[]) {
8598 { 0x12, 0x4000c000 },
8599 { 0x14, 0x90170110 }, /* speaker */
8600 { 0x15, 0x0421401f }, /* HP out */
8601 { 0x17, 0x411111f0 },
8602 { 0x18, 0x04a19020 }, /* mic */
8603 { 0x19, 0x411111f0 },
8604 { 0x1a, 0x411111f0 },
8605 { 0x1b, 0x411111f0 },
8606 { 0x1d, 0x40448505 },
8607 { 0x1e, 0x411111f0 },
8608 { 0x20, 0x8000ffff },
8611 .chain_id
= ALC269_FIXUP_DMIC
,
8613 [ALC269_FIXUP_CZC_L101
] = {
8614 .type
= HDA_FIXUP_PINS
,
8615 .v
.pins
= (const struct hda_pintbl
[]) {
8616 { 0x12, 0x40000000 },
8617 { 0x14, 0x01014010 }, /* speaker */
8618 { 0x15, 0x411111f0 }, /* HP out */
8619 { 0x16, 0x411111f0 },
8620 { 0x18, 0x01a19020 }, /* mic */
8621 { 0x19, 0x02a19021 },
8622 { 0x1a, 0x0181302f },
8623 { 0x1b, 0x0221401f },
8624 { 0x1c, 0x411111f0 },
8625 { 0x1d, 0x4044c601 },
8626 { 0x1e, 0x411111f0 },
8629 .chain_id
= ALC269_FIXUP_DMIC
,
8631 [ALC269_FIXUP_LEMOTE_A1802
] = {
8632 .type
= HDA_FIXUP_PINS
,
8633 .v
.pins
= (const struct hda_pintbl
[]) {
8634 { 0x12, 0x40000000 },
8635 { 0x14, 0x90170110 }, /* speaker */
8636 { 0x17, 0x411111f0 },
8637 { 0x18, 0x03a19040 }, /* mic1 */
8638 { 0x19, 0x90a70130 }, /* mic2 */
8639 { 0x1a, 0x411111f0 },
8640 { 0x1b, 0x411111f0 },
8641 { 0x1d, 0x40489d2d },
8642 { 0x1e, 0x411111f0 },
8643 { 0x20, 0x0003ffff },
8644 { 0x21, 0x03214020 },
8647 .chain_id
= ALC269_FIXUP_DMIC
,
8649 [ALC269_FIXUP_LEMOTE_A190X
] = {
8650 .type
= HDA_FIXUP_PINS
,
8651 .v
.pins
= (const struct hda_pintbl
[]) {
8652 { 0x14, 0x99130110 }, /* speaker */
8653 { 0x15, 0x0121401f }, /* HP out */
8654 { 0x18, 0x01a19c20 }, /* rear mic */
8655 { 0x19, 0x99a3092f }, /* front mic */
8656 { 0x1b, 0x0201401f }, /* front lineout */
8659 .chain_id
= ALC269_FIXUP_DMIC
,
8661 [ALC256_FIXUP_INTEL_NUC8_RUGGED
] = {
8662 .type
= HDA_FIXUP_PINS
,
8663 .v
.pins
= (const struct hda_pintbl
[]) {
8664 { 0x1b, 0x01a1913c }, /* use as headset mic, without its own jack detect */
8668 .chain_id
= ALC269_FIXUP_HEADSET_MODE
8670 [ALC256_FIXUP_INTEL_NUC10
] = {
8671 .type
= HDA_FIXUP_PINS
,
8672 .v
.pins
= (const struct hda_pintbl
[]) {
8673 { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */
8677 .chain_id
= ALC269_FIXUP_HEADSET_MODE
8679 [ALC255_FIXUP_XIAOMI_HEADSET_MIC
] = {
8680 .type
= HDA_FIXUP_VERBS
,
8681 .v
.verbs
= (const struct hda_verb
[]) {
8682 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x45 },
8683 { 0x20, AC_VERB_SET_PROC_COEF
, 0x5089 },
8687 .chain_id
= ALC289_FIXUP_ASUS_GA502
8689 [ALC274_FIXUP_HP_MIC
] = {
8690 .type
= HDA_FIXUP_VERBS
,
8691 .v
.verbs
= (const struct hda_verb
[]) {
8692 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x45 },
8693 { 0x20, AC_VERB_SET_PROC_COEF
, 0x5089 },
8697 [ALC274_FIXUP_HP_HEADSET_MIC
] = {
8698 .type
= HDA_FIXUP_FUNC
,
8699 .v
.func
= alc274_fixup_hp_headset_mic
,
8701 .chain_id
= ALC274_FIXUP_HP_MIC
8703 [ALC274_FIXUP_HP_ENVY_GPIO
] = {
8704 .type
= HDA_FIXUP_FUNC
,
8705 .v
.func
= alc274_fixup_hp_envy_gpio
,
8707 [ALC256_FIXUP_ASUS_HPE
] = {
8708 .type
= HDA_FIXUP_VERBS
,
8709 .v
.verbs
= (const struct hda_verb
[]) {
8711 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x0f },
8712 { 0x20, AC_VERB_SET_PROC_COEF
, 0x7778 },
8716 .chain_id
= ALC294_FIXUP_ASUS_HEADSET_MIC
8718 [ALC285_FIXUP_THINKPAD_NO_BASS_SPK_HEADSET_JACK
] = {
8719 .type
= HDA_FIXUP_FUNC
,
8720 .v
.func
= alc_fixup_headset_jack
,
8722 .chain_id
= ALC269_FIXUP_THINKPAD_ACPI
8724 [ALC287_FIXUP_HP_GPIO_LED
] = {
8725 .type
= HDA_FIXUP_FUNC
,
8726 .v
.func
= alc287_fixup_hp_gpio_led
,
8728 [ALC256_FIXUP_HP_HEADSET_MIC
] = {
8729 .type
= HDA_FIXUP_FUNC
,
8730 .v
.func
= alc274_fixup_hp_headset_mic
,
8732 [ALC236_FIXUP_DELL_AIO_HEADSET_MIC
] = {
8733 .type
= HDA_FIXUP_FUNC
,
8734 .v
.func
= alc_fixup_no_int_mic
,
8736 .chain_id
= ALC255_FIXUP_DELL1_MIC_NO_PRESENCE
8738 [ALC282_FIXUP_ACER_DISABLE_LINEOUT
] = {
8739 .type
= HDA_FIXUP_PINS
,
8740 .v
.pins
= (const struct hda_pintbl
[]) {
8741 { 0x1b, 0x411111f0 },
8742 { 0x18, 0x01a1913c }, /* use as headset mic, without its own jack detect */
8746 .chain_id
= ALC269_FIXUP_HEADSET_MODE
8748 [ALC255_FIXUP_ACER_LIMIT_INT_MIC_BOOST
] = {
8749 .type
= HDA_FIXUP_FUNC
,
8750 .v
.func
= alc269_fixup_limit_int_mic_boost
,
8752 .chain_id
= ALC255_FIXUP_ACER_MIC_NO_PRESENCE
,
8754 [ALC256_FIXUP_ACER_HEADSET_MIC
] = {
8755 .type
= HDA_FIXUP_PINS
,
8756 .v
.pins
= (const struct hda_pintbl
[]) {
8757 { 0x19, 0x02a1113c }, /* use as headset mic, without its own jack detect */
8758 { 0x1a, 0x90a1092f }, /* use as internal mic */
8762 .chain_id
= ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC
8764 [ALC285_FIXUP_IDEAPAD_S740_COEF
] = {
8765 .type
= HDA_FIXUP_FUNC
,
8766 .v
.func
= alc285_fixup_ideapad_s740_coef
,
8768 .chain_id
= ALC269_FIXUP_THINKPAD_ACPI
,
8770 [ALC285_FIXUP_HP_LIMIT_INT_MIC_BOOST
] = {
8771 .type
= HDA_FIXUP_FUNC
,
8772 .v
.func
= alc269_fixup_limit_int_mic_boost
,
8774 .chain_id
= ALC285_FIXUP_HP_MUTE_LED
,
8776 [ALC295_FIXUP_ASUS_DACS
] = {
8777 .type
= HDA_FIXUP_FUNC
,
8778 .v
.func
= alc295_fixup_asus_dacs
,
8780 [ALC295_FIXUP_HP_OMEN
] = {
8781 .type
= HDA_FIXUP_PINS
,
8782 .v
.pins
= (const struct hda_pintbl
[]) {
8783 { 0x12, 0xb7a60130 },
8784 { 0x13, 0x40000000 },
8785 { 0x14, 0x411111f0 },
8786 { 0x16, 0x411111f0 },
8787 { 0x17, 0x90170110 },
8788 { 0x18, 0x411111f0 },
8789 { 0x19, 0x02a11030 },
8790 { 0x1a, 0x411111f0 },
8791 { 0x1b, 0x04a19030 },
8792 { 0x1d, 0x40600001 },
8793 { 0x1e, 0x411111f0 },
8794 { 0x21, 0x03211020 },
8798 .chain_id
= ALC269_FIXUP_HP_LINE1_MIC1_LED
,
8800 [ALC285_FIXUP_HP_SPECTRE_X360
] = {
8801 .type
= HDA_FIXUP_FUNC
,
8802 .v
.func
= alc285_fixup_hp_spectre_x360
,
8804 [ALC285_FIXUP_HP_SPECTRE_X360_EB1
] = {
8805 .type
= HDA_FIXUP_FUNC
,
8806 .v
.func
= alc285_fixup_hp_spectre_x360_eb1
8808 [ALC287_FIXUP_IDEAPAD_BASS_SPK_AMP
] = {
8809 .type
= HDA_FIXUP_FUNC
,
8810 .v
.func
= alc285_fixup_ideapad_s740_coef
,
8812 .chain_id
= ALC285_FIXUP_THINKPAD_HEADSET_JACK
,
8814 [ALC623_FIXUP_LENOVO_THINKSTATION_P340
] = {
8815 .type
= HDA_FIXUP_FUNC
,
8816 .v
.func
= alc_fixup_no_shutup
,
8818 .chain_id
= ALC283_FIXUP_HEADSET_MIC
,
8820 [ALC255_FIXUP_ACER_HEADPHONE_AND_MIC
] = {
8821 .type
= HDA_FIXUP_PINS
,
8822 .v
.pins
= (const struct hda_pintbl
[]) {
8823 { 0x21, 0x03211030 }, /* Change the Headphone location to Left */
8827 .chain_id
= ALC255_FIXUP_XIAOMI_HEADSET_MIC
8829 [ALC236_FIXUP_HP_LIMIT_INT_MIC_BOOST
] = {
8830 .type
= HDA_FIXUP_FUNC
,
8831 .v
.func
= alc269_fixup_limit_int_mic_boost
,
8833 .chain_id
= ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF
,
8835 [ALC285_FIXUP_LEGION_Y9000X_SPEAKERS
] = {
8836 .type
= HDA_FIXUP_FUNC
,
8837 .v
.func
= alc285_fixup_ideapad_s740_coef
,
8839 .chain_id
= ALC285_FIXUP_LEGION_Y9000X_AUTOMUTE
,
8841 [ALC285_FIXUP_LEGION_Y9000X_AUTOMUTE
] = {
8842 .type
= HDA_FIXUP_FUNC
,
8843 .v
.func
= alc287_fixup_legion_15imhg05_speakers
,
8845 .chain_id
= ALC269_FIXUP_THINKPAD_ACPI
,
8847 [ALC287_FIXUP_LEGION_15IMHG05_SPEAKERS
] = {
8848 .type
= HDA_FIXUP_VERBS
,
8849 //.v.verbs = legion_15imhg05_coefs,
8850 .v
.verbs
= (const struct hda_verb
[]) {
8851 // set left speaker Legion 7i.
8852 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x24 },
8853 { 0x20, AC_VERB_SET_PROC_COEF
, 0x41 },
8855 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x26 },
8856 { 0x20, AC_VERB_SET_PROC_COEF
, 0xc },
8857 { 0x20, AC_VERB_SET_PROC_COEF
, 0x0 },
8858 { 0x20, AC_VERB_SET_PROC_COEF
, 0x1a },
8859 { 0x20, AC_VERB_SET_PROC_COEF
, 0xb020 },
8861 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x26 },
8862 { 0x20, AC_VERB_SET_PROC_COEF
, 0x2 },
8863 { 0x20, AC_VERB_SET_PROC_COEF
, 0x0 },
8864 { 0x20, AC_VERB_SET_PROC_COEF
, 0x0 },
8865 { 0x20, AC_VERB_SET_PROC_COEF
, 0xb020 },
8867 // set right speaker Legion 7i.
8868 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x24 },
8869 { 0x20, AC_VERB_SET_PROC_COEF
, 0x42 },
8871 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x26 },
8872 { 0x20, AC_VERB_SET_PROC_COEF
, 0xc },
8873 { 0x20, AC_VERB_SET_PROC_COEF
, 0x0 },
8874 { 0x20, AC_VERB_SET_PROC_COEF
, 0x2a },
8875 { 0x20, AC_VERB_SET_PROC_COEF
, 0xb020 },
8877 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x26 },
8878 { 0x20, AC_VERB_SET_PROC_COEF
, 0x2 },
8879 { 0x20, AC_VERB_SET_PROC_COEF
, 0x0 },
8880 { 0x20, AC_VERB_SET_PROC_COEF
, 0x0 },
8881 { 0x20, AC_VERB_SET_PROC_COEF
, 0xb020 },
8885 .chain_id
= ALC287_FIXUP_LEGION_15IMHG05_AUTOMUTE
,
8887 [ALC287_FIXUP_LEGION_15IMHG05_AUTOMUTE
] = {
8888 .type
= HDA_FIXUP_FUNC
,
8889 .v
.func
= alc287_fixup_legion_15imhg05_speakers
,
8891 .chain_id
= ALC269_FIXUP_HEADSET_MODE
,
8893 [ALC287_FIXUP_YOGA7_14ITL_SPEAKERS
] = {
8894 .type
= HDA_FIXUP_VERBS
,
8895 .v
.verbs
= (const struct hda_verb
[]) {
8896 // set left speaker Yoga 7i.
8897 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x24 },
8898 { 0x20, AC_VERB_SET_PROC_COEF
, 0x41 },
8900 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x26 },
8901 { 0x20, AC_VERB_SET_PROC_COEF
, 0xc },
8902 { 0x20, AC_VERB_SET_PROC_COEF
, 0x0 },
8903 { 0x20, AC_VERB_SET_PROC_COEF
, 0x1a },
8904 { 0x20, AC_VERB_SET_PROC_COEF
, 0xb020 },
8906 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x26 },
8907 { 0x20, AC_VERB_SET_PROC_COEF
, 0x2 },
8908 { 0x20, AC_VERB_SET_PROC_COEF
, 0x0 },
8909 { 0x20, AC_VERB_SET_PROC_COEF
, 0x0 },
8910 { 0x20, AC_VERB_SET_PROC_COEF
, 0xb020 },
8912 // set right speaker Yoga 7i.
8913 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x24 },
8914 { 0x20, AC_VERB_SET_PROC_COEF
, 0x46 },
8916 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x26 },
8917 { 0x20, AC_VERB_SET_PROC_COEF
, 0xc },
8918 { 0x20, AC_VERB_SET_PROC_COEF
, 0x0 },
8919 { 0x20, AC_VERB_SET_PROC_COEF
, 0x2a },
8920 { 0x20, AC_VERB_SET_PROC_COEF
, 0xb020 },
8922 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x26 },
8923 { 0x20, AC_VERB_SET_PROC_COEF
, 0x2 },
8924 { 0x20, AC_VERB_SET_PROC_COEF
, 0x0 },
8925 { 0x20, AC_VERB_SET_PROC_COEF
, 0x0 },
8926 { 0x20, AC_VERB_SET_PROC_COEF
, 0xb020 },
8930 .chain_id
= ALC269_FIXUP_HEADSET_MODE
,
8932 [ALC298_FIXUP_LENOVO_C940_DUET7
] = {
8933 .type
= HDA_FIXUP_FUNC
,
8934 .v
.func
= alc298_fixup_lenovo_c940_duet7
,
8936 [ALC287_FIXUP_13S_GEN2_SPEAKERS
] = {
8937 .type
= HDA_FIXUP_VERBS
,
8938 .v
.verbs
= (const struct hda_verb
[]) {
8939 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x24 },
8940 { 0x20, AC_VERB_SET_PROC_COEF
, 0x41 },
8941 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x26 },
8942 { 0x20, AC_VERB_SET_PROC_COEF
, 0x2 },
8943 { 0x20, AC_VERB_SET_PROC_COEF
, 0x0 },
8944 { 0x20, AC_VERB_SET_PROC_COEF
, 0x0 },
8945 { 0x20, AC_VERB_SET_PROC_COEF
, 0xb020 },
8946 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x24 },
8947 { 0x20, AC_VERB_SET_PROC_COEF
, 0x42 },
8948 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x26 },
8949 { 0x20, AC_VERB_SET_PROC_COEF
, 0x2 },
8950 { 0x20, AC_VERB_SET_PROC_COEF
, 0x0 },
8951 { 0x20, AC_VERB_SET_PROC_COEF
, 0x0 },
8952 { 0x20, AC_VERB_SET_PROC_COEF
, 0xb020 },
8956 .chain_id
= ALC269_FIXUP_HEADSET_MODE
,
8958 [ALC256_FIXUP_SET_COEF_DEFAULTS
] = {
8959 .type
= HDA_FIXUP_FUNC
,
8960 .v
.func
= alc256_fixup_set_coef_defaults
,
8962 [ALC245_FIXUP_HP_GPIO_LED
] = {
8963 .type
= HDA_FIXUP_FUNC
,
8964 .v
.func
= alc245_fixup_hp_gpio_led
,
8966 [ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE
] = {
8967 .type
= HDA_FIXUP_PINS
,
8968 .v
.pins
= (const struct hda_pintbl
[]) {
8969 { 0x19, 0x03a11120 }, /* use as headset mic, without its own jack detect */
8973 .chain_id
= ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC
,
8975 [ALC233_FIXUP_NO_AUDIO_JACK
] = {
8976 .type
= HDA_FIXUP_FUNC
,
8977 .v
.func
= alc233_fixup_no_audio_jack
,
8979 [ALC256_FIXUP_MIC_NO_PRESENCE_AND_RESUME
] = {
8980 .type
= HDA_FIXUP_FUNC
,
8981 .v
.func
= alc256_fixup_mic_no_presence_and_resume
,
8983 .chain_id
= ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC
8985 [ALC287_FIXUP_LEGION_16ACHG6
] = {
8986 .type
= HDA_FIXUP_FUNC
,
8987 .v
.func
= alc287_fixup_legion_16achg6_speakers
,
8989 [ALC287_FIXUP_CS35L41_I2C_2
] = {
8990 .type
= HDA_FIXUP_FUNC
,
8991 .v
.func
= cs35l41_fixup_i2c_two
,
8993 .chain_id
= ALC269_FIXUP_THINKPAD_ACPI
,
8995 [ALC287_FIXUP_CS35L41_I2C_2_HP_GPIO_LED
] = {
8996 .type
= HDA_FIXUP_FUNC
,
8997 .v
.func
= cs35l41_fixup_i2c_two
,
8999 .chain_id
= ALC285_FIXUP_HP_MUTE_LED
,
9001 [ALC245_FIXUP_CS35L41_SPI_2
] = {
9002 .type
= HDA_FIXUP_FUNC
,
9003 .v
.func
= cs35l41_fixup_spi_two
,
9005 [ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED
] = {
9006 .type
= HDA_FIXUP_FUNC
,
9007 .v
.func
= cs35l41_fixup_spi_two
,
9009 .chain_id
= ALC285_FIXUP_HP_GPIO_LED
,
9011 [ALC245_FIXUP_CS35L41_SPI_4
] = {
9012 .type
= HDA_FIXUP_FUNC
,
9013 .v
.func
= cs35l41_fixup_spi_four
,
9015 [ALC245_FIXUP_CS35L41_SPI_4_HP_GPIO_LED
] = {
9016 .type
= HDA_FIXUP_FUNC
,
9017 .v
.func
= cs35l41_fixup_spi_four
,
9019 .chain_id
= ALC285_FIXUP_HP_GPIO_LED
,
9021 [ALC285_FIXUP_HP_SPEAKERS_MICMUTE_LED
] = {
9022 .type
= HDA_FIXUP_VERBS
,
9023 .v
.verbs
= (const struct hda_verb
[]) {
9024 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x19 },
9025 { 0x20, AC_VERB_SET_PROC_COEF
, 0x8e11 },
9029 .chain_id
= ALC285_FIXUP_HP_MUTE_LED
,
9031 [ALC269_FIXUP_DELL4_MIC_NO_PRESENCE_QUIET
] = {
9032 .type
= HDA_FIXUP_FUNC
,
9033 .v
.func
= alc_fixup_dell4_mic_no_presence_quiet
,
9035 .chain_id
= ALC269_FIXUP_DELL4_MIC_NO_PRESENCE
,
9037 [ALC295_FIXUP_FRAMEWORK_LAPTOP_MIC_NO_PRESENCE
] = {
9038 .type
= HDA_FIXUP_PINS
,
9039 .v
.pins
= (const struct hda_pintbl
[]) {
9040 { 0x19, 0x02a1112c }, /* use as headset mic, without its own jack detect */
9044 .chain_id
= ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC
9046 [ALC287_FIXUP_LEGION_16ITHG6
] = {
9047 .type
= HDA_FIXUP_FUNC
,
9048 .v
.func
= alc287_fixup_legion_16ithg6_speakers
,
9050 [ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK
] = {
9051 .type
= HDA_FIXUP_VERBS
,
9052 .v
.verbs
= (const struct hda_verb
[]) {
9053 // enable left speaker
9054 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x24 },
9055 { 0x20, AC_VERB_SET_PROC_COEF
, 0x41 },
9057 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x26 },
9058 { 0x20, AC_VERB_SET_PROC_COEF
, 0xc },
9059 { 0x20, AC_VERB_SET_PROC_COEF
, 0x0 },
9060 { 0x20, AC_VERB_SET_PROC_COEF
, 0x1a },
9061 { 0x20, AC_VERB_SET_PROC_COEF
, 0xb020 },
9063 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x26 },
9064 { 0x20, AC_VERB_SET_PROC_COEF
, 0xf },
9065 { 0x20, AC_VERB_SET_PROC_COEF
, 0x0 },
9066 { 0x20, AC_VERB_SET_PROC_COEF
, 0x42 },
9067 { 0x20, AC_VERB_SET_PROC_COEF
, 0xb020 },
9069 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x26 },
9070 { 0x20, AC_VERB_SET_PROC_COEF
, 0x10 },
9071 { 0x20, AC_VERB_SET_PROC_COEF
, 0x0 },
9072 { 0x20, AC_VERB_SET_PROC_COEF
, 0x40 },
9073 { 0x20, AC_VERB_SET_PROC_COEF
, 0xb020 },
9075 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x26 },
9076 { 0x20, AC_VERB_SET_PROC_COEF
, 0x2 },
9077 { 0x20, AC_VERB_SET_PROC_COEF
, 0x0 },
9078 { 0x20, AC_VERB_SET_PROC_COEF
, 0x0 },
9079 { 0x20, AC_VERB_SET_PROC_COEF
, 0xb020 },
9081 // enable right speaker
9082 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x24 },
9083 { 0x20, AC_VERB_SET_PROC_COEF
, 0x46 },
9085 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x26 },
9086 { 0x20, AC_VERB_SET_PROC_COEF
, 0xc },
9087 { 0x20, AC_VERB_SET_PROC_COEF
, 0x0 },
9088 { 0x20, AC_VERB_SET_PROC_COEF
, 0x2a },
9089 { 0x20, AC_VERB_SET_PROC_COEF
, 0xb020 },
9091 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x26 },
9092 { 0x20, AC_VERB_SET_PROC_COEF
, 0xf },
9093 { 0x20, AC_VERB_SET_PROC_COEF
, 0x0 },
9094 { 0x20, AC_VERB_SET_PROC_COEF
, 0x46 },
9095 { 0x20, AC_VERB_SET_PROC_COEF
, 0xb020 },
9097 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x26 },
9098 { 0x20, AC_VERB_SET_PROC_COEF
, 0x10 },
9099 { 0x20, AC_VERB_SET_PROC_COEF
, 0x0 },
9100 { 0x20, AC_VERB_SET_PROC_COEF
, 0x44 },
9101 { 0x20, AC_VERB_SET_PROC_COEF
, 0xb020 },
9103 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x26 },
9104 { 0x20, AC_VERB_SET_PROC_COEF
, 0x2 },
9105 { 0x20, AC_VERB_SET_PROC_COEF
, 0x0 },
9106 { 0x20, AC_VERB_SET_PROC_COEF
, 0x0 },
9107 { 0x20, AC_VERB_SET_PROC_COEF
, 0xb020 },
9112 [ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK_PIN
] = {
9113 .type
= HDA_FIXUP_FUNC
,
9114 .v
.func
= alc287_fixup_yoga9_14iap7_bass_spk_pin
,
9116 .chain_id
= ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK
,
9120 static const struct snd_pci_quirk alc269_fixup_tbl
[] = {
9121 SND_PCI_QUIRK(0x1025, 0x0283, "Acer TravelMate 8371", ALC269_FIXUP_INV_DMIC
),
9122 SND_PCI_QUIRK(0x1025, 0x029b, "Acer 1810TZ", ALC269_FIXUP_INV_DMIC
),
9123 SND_PCI_QUIRK(0x1025, 0x0349, "Acer AOD260", ALC269_FIXUP_INV_DMIC
),
9124 SND_PCI_QUIRK(0x1025, 0x047c, "Acer AC700", ALC269_FIXUP_ACER_AC700
),
9125 SND_PCI_QUIRK(0x1025, 0x072d, "Acer Aspire V5-571G", ALC269_FIXUP_ASPIRE_HEADSET_MIC
),
9126 SND_PCI_QUIRK(0x1025, 0x0740, "Acer AO725", ALC271_FIXUP_HP_GATE_MIC_JACK
),
9127 SND_PCI_QUIRK(0x1025, 0x0742, "Acer AO756", ALC271_FIXUP_HP_GATE_MIC_JACK
),
9128 SND_PCI_QUIRK(0x1025, 0x0762, "Acer Aspire E1-472", ALC271_FIXUP_HP_GATE_MIC_JACK_E1_572
),
9129 SND_PCI_QUIRK(0x1025, 0x0775, "Acer Aspire E1-572", ALC271_FIXUP_HP_GATE_MIC_JACK_E1_572
),
9130 SND_PCI_QUIRK(0x1025, 0x079b, "Acer Aspire V5-573G", ALC282_FIXUP_ASPIRE_V5_PINS
),
9131 SND_PCI_QUIRK(0x1025, 0x080d, "Acer Aspire V5-122P", ALC269_FIXUP_ASPIRE_HEADSET_MIC
),
9132 SND_PCI_QUIRK(0x1025, 0x0840, "Acer Aspire E1", ALC269VB_FIXUP_ASPIRE_E1_COEF
),
9133 SND_PCI_QUIRK(0x1025, 0x101c, "Acer Veriton N2510G", ALC269_FIXUP_LIFEBOOK
),
9134 SND_PCI_QUIRK(0x1025, 0x102b, "Acer Aspire C24-860", ALC286_FIXUP_ACER_AIO_MIC_NO_PRESENCE
),
9135 SND_PCI_QUIRK(0x1025, 0x1065, "Acer Aspire C20-820", ALC269VC_FIXUP_ACER_HEADSET_MIC
),
9136 SND_PCI_QUIRK(0x1025, 0x106d, "Acer Cloudbook 14", ALC283_FIXUP_CHROME_BOOK
),
9137 SND_PCI_QUIRK(0x1025, 0x1094, "Acer Aspire E5-575T", ALC255_FIXUP_ACER_LIMIT_INT_MIC_BOOST
),
9138 SND_PCI_QUIRK(0x1025, 0x1099, "Acer Aspire E5-523G", ALC255_FIXUP_ACER_MIC_NO_PRESENCE
),
9139 SND_PCI_QUIRK(0x1025, 0x110e, "Acer Aspire ES1-432", ALC255_FIXUP_ACER_MIC_NO_PRESENCE
),
9140 SND_PCI_QUIRK(0x1025, 0x1166, "Acer Veriton N4640G", ALC269_FIXUP_LIFEBOOK
),
9141 SND_PCI_QUIRK(0x1025, 0x1167, "Acer Veriton N6640G", ALC269_FIXUP_LIFEBOOK
),
9142 SND_PCI_QUIRK(0x1025, 0x1246, "Acer Predator Helios 500", ALC299_FIXUP_PREDATOR_SPK
),
9143 SND_PCI_QUIRK(0x1025, 0x1247, "Acer vCopperbox", ALC269VC_FIXUP_ACER_VCOPPERBOX_PINS
),
9144 SND_PCI_QUIRK(0x1025, 0x1248, "Acer Veriton N4660G", ALC269VC_FIXUP_ACER_MIC_NO_PRESENCE
),
9145 SND_PCI_QUIRK(0x1025, 0x1269, "Acer SWIFT SF314-54", ALC256_FIXUP_ACER_HEADSET_MIC
),
9146 SND_PCI_QUIRK(0x1025, 0x128f, "Acer Veriton Z6860G", ALC286_FIXUP_ACER_AIO_HEADSET_MIC
),
9147 SND_PCI_QUIRK(0x1025, 0x1290, "Acer Veriton Z4860G", ALC286_FIXUP_ACER_AIO_HEADSET_MIC
),
9148 SND_PCI_QUIRK(0x1025, 0x1291, "Acer Veriton Z4660G", ALC286_FIXUP_ACER_AIO_HEADSET_MIC
),
9149 SND_PCI_QUIRK(0x1025, 0x129c, "Acer SWIFT SF314-55", ALC256_FIXUP_ACER_HEADSET_MIC
),
9150 SND_PCI_QUIRK(0x1025, 0x129d, "Acer SWIFT SF313-51", ALC256_FIXUP_ACER_MIC_NO_PRESENCE
),
9151 SND_PCI_QUIRK(0x1025, 0x1300, "Acer SWIFT SF314-56", ALC256_FIXUP_ACER_MIC_NO_PRESENCE
),
9152 SND_PCI_QUIRK(0x1025, 0x1308, "Acer Aspire Z24-890", ALC286_FIXUP_ACER_AIO_HEADSET_MIC
),
9153 SND_PCI_QUIRK(0x1025, 0x132a, "Acer TravelMate B114-21", ALC233_FIXUP_ACER_HEADSET_MIC
),
9154 SND_PCI_QUIRK(0x1025, 0x1330, "Acer TravelMate X514-51T", ALC255_FIXUP_ACER_HEADSET_MIC
),
9155 SND_PCI_QUIRK(0x1025, 0x141f, "Acer Spin SP513-54N", ALC255_FIXUP_ACER_MIC_NO_PRESENCE
),
9156 SND_PCI_QUIRK(0x1025, 0x142b, "Acer Swift SF314-42", ALC255_FIXUP_ACER_MIC_NO_PRESENCE
),
9157 SND_PCI_QUIRK(0x1025, 0x1430, "Acer TravelMate B311R-31", ALC256_FIXUP_ACER_MIC_NO_PRESENCE
),
9158 SND_PCI_QUIRK(0x1025, 0x1466, "Acer Aspire A515-56", ALC255_FIXUP_ACER_HEADPHONE_AND_MIC
),
9159 SND_PCI_QUIRK(0x1028, 0x0470, "Dell M101z", ALC269_FIXUP_DELL_M101Z
),
9160 SND_PCI_QUIRK(0x1028, 0x053c, "Dell Latitude E5430", ALC292_FIXUP_DELL_E7X
),
9161 SND_PCI_QUIRK(0x1028, 0x054b, "Dell XPS one 2710", ALC275_FIXUP_DELL_XPS
),
9162 SND_PCI_QUIRK(0x1028, 0x05bd, "Dell Latitude E6440", ALC292_FIXUP_DELL_E7X
),
9163 SND_PCI_QUIRK(0x1028, 0x05be, "Dell Latitude E6540", ALC292_FIXUP_DELL_E7X
),
9164 SND_PCI_QUIRK(0x1028, 0x05ca, "Dell Latitude E7240", ALC292_FIXUP_DELL_E7X
),
9165 SND_PCI_QUIRK(0x1028, 0x05cb, "Dell Latitude E7440", ALC292_FIXUP_DELL_E7X
),
9166 SND_PCI_QUIRK(0x1028, 0x05da, "Dell Vostro 5460", ALC290_FIXUP_SUBWOOFER
),
9167 SND_PCI_QUIRK(0x1028, 0x05f4, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE
),
9168 SND_PCI_QUIRK(0x1028, 0x05f5, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE
),
9169 SND_PCI_QUIRK(0x1028, 0x05f6, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE
),
9170 SND_PCI_QUIRK(0x1028, 0x0615, "Dell Vostro 5470", ALC290_FIXUP_SUBWOOFER_HSJACK
),
9171 SND_PCI_QUIRK(0x1028, 0x0616, "Dell Vostro 5470", ALC290_FIXUP_SUBWOOFER_HSJACK
),
9172 SND_PCI_QUIRK(0x1028, 0x062c, "Dell Latitude E5550", ALC292_FIXUP_DELL_E7X
),
9173 SND_PCI_QUIRK(0x1028, 0x062e, "Dell Latitude E7450", ALC292_FIXUP_DELL_E7X
),
9174 SND_PCI_QUIRK(0x1028, 0x0638, "Dell Inspiron 5439", ALC290_FIXUP_MONO_SPEAKERS_HSJACK
),
9175 SND_PCI_QUIRK(0x1028, 0x064a, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE
),
9176 SND_PCI_QUIRK(0x1028, 0x064b, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE
),
9177 SND_PCI_QUIRK(0x1028, 0x0665, "Dell XPS 13", ALC288_FIXUP_DELL_XPS_13
),
9178 SND_PCI_QUIRK(0x1028, 0x0669, "Dell Optiplex 9020m", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE
),
9179 SND_PCI_QUIRK(0x1028, 0x069a, "Dell Vostro 5480", ALC290_FIXUP_SUBWOOFER_HSJACK
),
9180 SND_PCI_QUIRK(0x1028, 0x06c7, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE
),
9181 SND_PCI_QUIRK(0x1028, 0x06d9, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE
),
9182 SND_PCI_QUIRK(0x1028, 0x06da, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE
),
9183 SND_PCI_QUIRK(0x1028, 0x06db, "Dell", ALC293_FIXUP_DISABLE_AAMIX_MULTIJACK
),
9184 SND_PCI_QUIRK(0x1028, 0x06dd, "Dell", ALC293_FIXUP_DISABLE_AAMIX_MULTIJACK
),
9185 SND_PCI_QUIRK(0x1028, 0x06de, "Dell", ALC293_FIXUP_DISABLE_AAMIX_MULTIJACK
),
9186 SND_PCI_QUIRK(0x1028, 0x06df, "Dell", ALC293_FIXUP_DISABLE_AAMIX_MULTIJACK
),
9187 SND_PCI_QUIRK(0x1028, 0x06e0, "Dell", ALC293_FIXUP_DISABLE_AAMIX_MULTIJACK
),
9188 SND_PCI_QUIRK(0x1028, 0x0706, "Dell Inspiron 7559", ALC256_FIXUP_DELL_INSPIRON_7559_SUBWOOFER
),
9189 SND_PCI_QUIRK(0x1028, 0x0725, "Dell Inspiron 3162", ALC255_FIXUP_DELL_SPK_NOISE
),
9190 SND_PCI_QUIRK(0x1028, 0x0738, "Dell Precision 5820", ALC269_FIXUP_NO_SHUTUP
),
9191 SND_PCI_QUIRK(0x1028, 0x075c, "Dell XPS 27 7760", ALC298_FIXUP_SPK_VOLUME
),
9192 SND_PCI_QUIRK(0x1028, 0x075d, "Dell AIO", ALC298_FIXUP_SPK_VOLUME
),
9193 SND_PCI_QUIRK(0x1028, 0x0798, "Dell Inspiron 17 7000 Gaming", ALC256_FIXUP_DELL_INSPIRON_7559_SUBWOOFER
),
9194 SND_PCI_QUIRK(0x1028, 0x07b0, "Dell Precision 7520", ALC295_FIXUP_DISABLE_DAC3
),
9195 SND_PCI_QUIRK(0x1028, 0x080c, "Dell WYSE", ALC225_FIXUP_DELL_WYSE_MIC_NO_PRESENCE
),
9196 SND_PCI_QUIRK(0x1028, 0x084b, "Dell", ALC274_FIXUP_DELL_AIO_LINEOUT_VERB
),
9197 SND_PCI_QUIRK(0x1028, 0x084e, "Dell", ALC274_FIXUP_DELL_AIO_LINEOUT_VERB
),
9198 SND_PCI_QUIRK(0x1028, 0x0871, "Dell Precision 3630", ALC255_FIXUP_DELL_HEADSET_MIC
),
9199 SND_PCI_QUIRK(0x1028, 0x0872, "Dell Precision 3630", ALC255_FIXUP_DELL_HEADSET_MIC
),
9200 SND_PCI_QUIRK(0x1028, 0x0873, "Dell Precision 3930", ALC255_FIXUP_DUMMY_LINEOUT_VERB
),
9201 SND_PCI_QUIRK(0x1028, 0x087d, "Dell Precision 5530", ALC289_FIXUP_DUAL_SPK
),
9202 SND_PCI_QUIRK(0x1028, 0x08ad, "Dell WYSE AIO", ALC225_FIXUP_DELL_WYSE_AIO_MIC_NO_PRESENCE
),
9203 SND_PCI_QUIRK(0x1028, 0x08ae, "Dell WYSE NB", ALC225_FIXUP_DELL1_MIC_NO_PRESENCE
),
9204 SND_PCI_QUIRK(0x1028, 0x0935, "Dell", ALC274_FIXUP_DELL_AIO_LINEOUT_VERB
),
9205 SND_PCI_QUIRK(0x1028, 0x097d, "Dell Precision", ALC289_FIXUP_DUAL_SPK
),
9206 SND_PCI_QUIRK(0x1028, 0x097e, "Dell Precision", ALC289_FIXUP_DUAL_SPK
),
9207 SND_PCI_QUIRK(0x1028, 0x098d, "Dell Precision", ALC233_FIXUP_ASUS_MIC_NO_PRESENCE
),
9208 SND_PCI_QUIRK(0x1028, 0x09bf, "Dell Precision", ALC233_FIXUP_ASUS_MIC_NO_PRESENCE
),
9209 SND_PCI_QUIRK(0x1028, 0x0a2e, "Dell", ALC236_FIXUP_DELL_AIO_HEADSET_MIC
),
9210 SND_PCI_QUIRK(0x1028, 0x0a30, "Dell", ALC236_FIXUP_DELL_AIO_HEADSET_MIC
),
9211 SND_PCI_QUIRK(0x1028, 0x0a38, "Dell Latitude 7520", ALC269_FIXUP_DELL4_MIC_NO_PRESENCE_QUIET
),
9212 SND_PCI_QUIRK(0x1028, 0x0a58, "Dell", ALC255_FIXUP_DELL_HEADSET_MIC
),
9213 SND_PCI_QUIRK(0x1028, 0x0a61, "Dell XPS 15 9510", ALC289_FIXUP_DUAL_SPK
),
9214 SND_PCI_QUIRK(0x1028, 0x0a62, "Dell Precision 5560", ALC289_FIXUP_DUAL_SPK
),
9215 SND_PCI_QUIRK(0x1028, 0x0a9d, "Dell Latitude 5430", ALC269_FIXUP_DELL4_MIC_NO_PRESENCE
),
9216 SND_PCI_QUIRK(0x1028, 0x0a9e, "Dell Latitude 5430", ALC269_FIXUP_DELL4_MIC_NO_PRESENCE
),
9217 SND_PCI_QUIRK(0x1028, 0x0b19, "Dell XPS 15 9520", ALC289_FIXUP_DUAL_SPK
),
9218 SND_PCI_QUIRK(0x1028, 0x0b1a, "Dell Precision 5570", ALC289_FIXUP_DUAL_SPK
),
9219 SND_PCI_QUIRK(0x1028, 0x164a, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE
),
9220 SND_PCI_QUIRK(0x1028, 0x164b, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE
),
9221 SND_PCI_QUIRK(0x103c, 0x1586, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC2
),
9222 SND_PCI_QUIRK(0x103c, 0x18e6, "HP", ALC269_FIXUP_HP_GPIO_LED
),
9223 SND_PCI_QUIRK(0x103c, 0x218b, "HP", ALC269_FIXUP_LIMIT_INT_MIC_BOOST_MUTE_LED
),
9224 SND_PCI_QUIRK(0x103c, 0x21f9, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1
),
9225 SND_PCI_QUIRK(0x103c, 0x2210, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1
),
9226 SND_PCI_QUIRK(0x103c, 0x2214, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1
),
9227 SND_PCI_QUIRK(0x103c, 0x221b, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED
),
9228 SND_PCI_QUIRK(0x103c, 0x221c, "HP EliteBook 755 G2", ALC280_FIXUP_HP_HEADSET_MIC
),
9229 SND_PCI_QUIRK(0x103c, 0x2221, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED
),
9230 SND_PCI_QUIRK(0x103c, 0x2225, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED
),
9231 SND_PCI_QUIRK(0x103c, 0x2236, "HP", ALC269_FIXUP_HP_LINE1_MIC1_LED
),
9232 SND_PCI_QUIRK(0x103c, 0x2237, "HP", ALC269_FIXUP_HP_LINE1_MIC1_LED
),
9233 SND_PCI_QUIRK(0x103c, 0x2238, "HP", ALC269_FIXUP_HP_LINE1_MIC1_LED
),
9234 SND_PCI_QUIRK(0x103c, 0x2239, "HP", ALC269_FIXUP_HP_LINE1_MIC1_LED
),
9235 SND_PCI_QUIRK(0x103c, 0x224b, "HP", ALC269_FIXUP_HP_LINE1_MIC1_LED
),
9236 SND_PCI_QUIRK(0x103c, 0x2253, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED
),
9237 SND_PCI_QUIRK(0x103c, 0x2254, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED
),
9238 SND_PCI_QUIRK(0x103c, 0x2255, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED
),
9239 SND_PCI_QUIRK(0x103c, 0x2256, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED
),
9240 SND_PCI_QUIRK(0x103c, 0x2257, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED
),
9241 SND_PCI_QUIRK(0x103c, 0x2259, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED
),
9242 SND_PCI_QUIRK(0x103c, 0x225a, "HP", ALC269_FIXUP_HP_DOCK_GPIO_MIC1_LED
),
9243 SND_PCI_QUIRK(0x103c, 0x225f, "HP", ALC280_FIXUP_HP_GPIO2_MIC_HOTKEY
),
9244 SND_PCI_QUIRK(0x103c, 0x2260, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1
),
9245 SND_PCI_QUIRK(0x103c, 0x2263, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1
),
9246 SND_PCI_QUIRK(0x103c, 0x2264, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1
),
9247 SND_PCI_QUIRK(0x103c, 0x2265, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1
),
9248 SND_PCI_QUIRK(0x103c, 0x2268, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1
),
9249 SND_PCI_QUIRK(0x103c, 0x226a, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1
),
9250 SND_PCI_QUIRK(0x103c, 0x226b, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1
),
9251 SND_PCI_QUIRK(0x103c, 0x226e, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1
),
9252 SND_PCI_QUIRK(0x103c, 0x2271, "HP", ALC286_FIXUP_HP_GPIO_LED
),
9253 SND_PCI_QUIRK(0x103c, 0x2272, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED
),
9254 SND_PCI_QUIRK(0x103c, 0x2272, "HP", ALC280_FIXUP_HP_DOCK_PINS
),
9255 SND_PCI_QUIRK(0x103c, 0x2273, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED
),
9256 SND_PCI_QUIRK(0x103c, 0x2273, "HP", ALC280_FIXUP_HP_DOCK_PINS
),
9257 SND_PCI_QUIRK(0x103c, 0x2278, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED
),
9258 SND_PCI_QUIRK(0x103c, 0x227f, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1
),
9259 SND_PCI_QUIRK(0x103c, 0x2282, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1
),
9260 SND_PCI_QUIRK(0x103c, 0x228b, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1
),
9261 SND_PCI_QUIRK(0x103c, 0x228e, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1
),
9262 SND_PCI_QUIRK(0x103c, 0x229e, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1
),
9263 SND_PCI_QUIRK(0x103c, 0x22b2, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1
),
9264 SND_PCI_QUIRK(0x103c, 0x22b7, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1
),
9265 SND_PCI_QUIRK(0x103c, 0x22bf, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1
),
9266 SND_PCI_QUIRK(0x103c, 0x22c4, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1
),
9267 SND_PCI_QUIRK(0x103c, 0x22c5, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1
),
9268 SND_PCI_QUIRK(0x103c, 0x22c7, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1
),
9269 SND_PCI_QUIRK(0x103c, 0x22c8, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1
),
9270 SND_PCI_QUIRK(0x103c, 0x22cf, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1
),
9271 SND_PCI_QUIRK(0x103c, 0x22db, "HP", ALC280_FIXUP_HP_9480M
),
9272 SND_PCI_QUIRK(0x103c, 0x22dc, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED
),
9273 SND_PCI_QUIRK(0x103c, 0x22fb, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED
),
9274 SND_PCI_QUIRK(0x103c, 0x2334, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1
),
9275 SND_PCI_QUIRK(0x103c, 0x2335, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1
),
9276 SND_PCI_QUIRK(0x103c, 0x2336, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1
),
9277 SND_PCI_QUIRK(0x103c, 0x2337, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1
),
9278 SND_PCI_QUIRK(0x103c, 0x2b5e, "HP 288 Pro G2 MT", ALC221_FIXUP_HP_288PRO_MIC_NO_PRESENCE
),
9279 SND_PCI_QUIRK(0x103c, 0x802e, "HP Z240 SFF", ALC221_FIXUP_HP_MIC_NO_PRESENCE
),
9280 SND_PCI_QUIRK(0x103c, 0x802f, "HP Z240", ALC221_FIXUP_HP_MIC_NO_PRESENCE
),
9281 SND_PCI_QUIRK(0x103c, 0x8077, "HP", ALC256_FIXUP_HP_HEADSET_MIC
),
9282 SND_PCI_QUIRK(0x103c, 0x8158, "HP", ALC256_FIXUP_HP_HEADSET_MIC
),
9283 SND_PCI_QUIRK(0x103c, 0x820d, "HP Pavilion 15", ALC269_FIXUP_HP_MUTE_LED_MIC3
),
9284 SND_PCI_QUIRK(0x103c, 0x8256, "HP", ALC221_FIXUP_HP_FRONT_MIC
),
9285 SND_PCI_QUIRK(0x103c, 0x827e, "HP x360", ALC295_FIXUP_HP_X360
),
9286 SND_PCI_QUIRK(0x103c, 0x827f, "HP x360", ALC269_FIXUP_HP_MUTE_LED_MIC3
),
9287 SND_PCI_QUIRK(0x103c, 0x82bf, "HP G3 mini", ALC221_FIXUP_HP_MIC_NO_PRESENCE
),
9288 SND_PCI_QUIRK(0x103c, 0x82c0, "HP G3 mini premium", ALC221_FIXUP_HP_MIC_NO_PRESENCE
),
9289 SND_PCI_QUIRK(0x103c, 0x83b9, "HP Spectre x360", ALC269_FIXUP_HP_MUTE_LED_MIC3
),
9290 SND_PCI_QUIRK(0x103c, 0x841c, "HP Pavilion 15-CK0xx", ALC269_FIXUP_HP_MUTE_LED_MIC3
),
9291 SND_PCI_QUIRK(0x103c, 0x8497, "HP Envy x360", ALC269_FIXUP_HP_MUTE_LED_MIC3
),
9292 SND_PCI_QUIRK(0x103c, 0x84da, "HP OMEN dc0019-ur", ALC295_FIXUP_HP_OMEN
),
9293 SND_PCI_QUIRK(0x103c, 0x84e7, "HP Pavilion 15", ALC269_FIXUP_HP_MUTE_LED_MIC3
),
9294 SND_PCI_QUIRK(0x103c, 0x8519, "HP Spectre x360 15-df0xxx", ALC285_FIXUP_HP_SPECTRE_X360
),
9295 SND_PCI_QUIRK(0x103c, 0x860f, "HP ZBook 15 G6", ALC285_FIXUP_HP_GPIO_AMP_INIT
),
9296 SND_PCI_QUIRK(0x103c, 0x861f, "HP Elite Dragonfly G1", ALC285_FIXUP_HP_GPIO_AMP_INIT
),
9297 SND_PCI_QUIRK(0x103c, 0x869d, "HP", ALC236_FIXUP_HP_MUTE_LED
),
9298 SND_PCI_QUIRK(0x103c, 0x86c7, "HP Envy AiO 32", ALC274_FIXUP_HP_ENVY_GPIO
),
9299 SND_PCI_QUIRK(0x103c, 0x86e7, "HP Spectre x360 15-eb0xxx", ALC285_FIXUP_HP_SPECTRE_X360_EB1
),
9300 SND_PCI_QUIRK(0x103c, 0x86e8, "HP Spectre x360 15-eb0xxx", ALC285_FIXUP_HP_SPECTRE_X360_EB1
),
9301 SND_PCI_QUIRK(0x103c, 0x8716, "HP Elite Dragonfly G2 Notebook PC", ALC285_FIXUP_HP_GPIO_AMP_INIT
),
9302 SND_PCI_QUIRK(0x103c, 0x8720, "HP EliteBook x360 1040 G8 Notebook PC", ALC285_FIXUP_HP_GPIO_AMP_INIT
),
9303 SND_PCI_QUIRK(0x103c, 0x8724, "HP EliteBook 850 G7", ALC285_FIXUP_HP_GPIO_LED
),
9304 SND_PCI_QUIRK(0x103c, 0x8728, "HP EliteBook 840 G7", ALC285_FIXUP_HP_GPIO_LED
),
9305 SND_PCI_QUIRK(0x103c, 0x8729, "HP", ALC285_FIXUP_HP_GPIO_LED
),
9306 SND_PCI_QUIRK(0x103c, 0x8730, "HP ProBook 445 G7", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF
),
9307 SND_PCI_QUIRK(0x103c, 0x8735, "HP ProBook 435 G7", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF
),
9308 SND_PCI_QUIRK(0x103c, 0x8736, "HP", ALC285_FIXUP_HP_GPIO_AMP_INIT
),
9309 SND_PCI_QUIRK(0x103c, 0x8760, "HP", ALC285_FIXUP_HP_MUTE_LED
),
9310 SND_PCI_QUIRK(0x103c, 0x877a, "HP", ALC285_FIXUP_HP_MUTE_LED
),
9311 SND_PCI_QUIRK(0x103c, 0x877d, "HP", ALC236_FIXUP_HP_MUTE_LED
),
9312 SND_PCI_QUIRK(0x103c, 0x8780, "HP ZBook Fury 17 G7 Mobile Workstation",
9313 ALC285_FIXUP_HP_GPIO_AMP_INIT
),
9314 SND_PCI_QUIRK(0x103c, 0x8783, "HP ZBook Fury 15 G7 Mobile Workstation",
9315 ALC285_FIXUP_HP_GPIO_AMP_INIT
),
9316 SND_PCI_QUIRK(0x103c, 0x8786, "HP OMEN 15", ALC285_FIXUP_HP_MUTE_LED
),
9317 SND_PCI_QUIRK(0x103c, 0x8787, "HP OMEN 15", ALC285_FIXUP_HP_MUTE_LED
),
9318 SND_PCI_QUIRK(0x103c, 0x8788, "HP OMEN 15", ALC285_FIXUP_HP_MUTE_LED
),
9319 SND_PCI_QUIRK(0x103c, 0x87c8, "HP", ALC287_FIXUP_HP_GPIO_LED
),
9320 SND_PCI_QUIRK(0x103c, 0x87e5, "HP ProBook 440 G8 Notebook PC", ALC236_FIXUP_HP_GPIO_LED
),
9321 SND_PCI_QUIRK(0x103c, 0x87e7, "HP ProBook 450 G8 Notebook PC", ALC236_FIXUP_HP_GPIO_LED
),
9322 SND_PCI_QUIRK(0x103c, 0x87f1, "HP ProBook 630 G8 Notebook PC", ALC236_FIXUP_HP_GPIO_LED
),
9323 SND_PCI_QUIRK(0x103c, 0x87f2, "HP ProBook 640 G8 Notebook PC", ALC236_FIXUP_HP_GPIO_LED
),
9324 SND_PCI_QUIRK(0x103c, 0x87f4, "HP", ALC287_FIXUP_HP_GPIO_LED
),
9325 SND_PCI_QUIRK(0x103c, 0x87f5, "HP", ALC287_FIXUP_HP_GPIO_LED
),
9326 SND_PCI_QUIRK(0x103c, 0x87f6, "HP Spectre x360 14", ALC245_FIXUP_HP_X360_AMP
),
9327 SND_PCI_QUIRK(0x103c, 0x87f7, "HP Spectre x360 14", ALC245_FIXUP_HP_X360_AMP
),
9328 SND_PCI_QUIRK(0x103c, 0x8805, "HP ProBook 650 G8 Notebook PC", ALC236_FIXUP_HP_GPIO_LED
),
9329 SND_PCI_QUIRK(0x103c, 0x880d, "HP EliteBook 830 G8 Notebook PC", ALC285_FIXUP_HP_GPIO_LED
),
9330 SND_PCI_QUIRK(0x103c, 0x8811, "HP Spectre x360 15-eb1xxx", ALC285_FIXUP_HP_SPECTRE_X360_EB1
),
9331 SND_PCI_QUIRK(0x103c, 0x8812, "HP Spectre x360 15-eb1xxx", ALC285_FIXUP_HP_SPECTRE_X360_EB1
),
9332 SND_PCI_QUIRK(0x103c, 0x8846, "HP EliteBook 850 G8 Notebook PC", ALC285_FIXUP_HP_GPIO_LED
),
9333 SND_PCI_QUIRK(0x103c, 0x8847, "HP EliteBook x360 830 G8 Notebook PC", ALC285_FIXUP_HP_GPIO_LED
),
9334 SND_PCI_QUIRK(0x103c, 0x884b, "HP EliteBook 840 Aero G8 Notebook PC", ALC285_FIXUP_HP_GPIO_LED
),
9335 SND_PCI_QUIRK(0x103c, 0x884c, "HP EliteBook 840 G8 Notebook PC", ALC285_FIXUP_HP_GPIO_LED
),
9336 SND_PCI_QUIRK(0x103c, 0x8862, "HP ProBook 445 G8 Notebook PC", ALC236_FIXUP_HP_LIMIT_INT_MIC_BOOST
),
9337 SND_PCI_QUIRK(0x103c, 0x8863, "HP ProBook 445 G8 Notebook PC", ALC236_FIXUP_HP_LIMIT_INT_MIC_BOOST
),
9338 SND_PCI_QUIRK(0x103c, 0x886d, "HP ZBook Fury 17.3 Inch G8 Mobile Workstation PC", ALC285_FIXUP_HP_GPIO_AMP_INIT
),
9339 SND_PCI_QUIRK(0x103c, 0x8870, "HP ZBook Fury 15.6 Inch G8 Mobile Workstation PC", ALC285_FIXUP_HP_GPIO_AMP_INIT
),
9340 SND_PCI_QUIRK(0x103c, 0x8873, "HP ZBook Studio 15.6 Inch G8 Mobile Workstation PC", ALC285_FIXUP_HP_GPIO_AMP_INIT
),
9341 SND_PCI_QUIRK(0x103c, 0x888d, "HP ZBook Power 15.6 inch G8 Mobile Workstation PC", ALC236_FIXUP_HP_GPIO_LED
),
9342 SND_PCI_QUIRK(0x103c, 0x8895, "HP EliteBook 855 G8 Notebook PC", ALC285_FIXUP_HP_SPEAKERS_MICMUTE_LED
),
9343 SND_PCI_QUIRK(0x103c, 0x8896, "HP EliteBook 855 G8 Notebook PC", ALC285_FIXUP_HP_MUTE_LED
),
9344 SND_PCI_QUIRK(0x103c, 0x8898, "HP EliteBook 845 G8 Notebook PC", ALC285_FIXUP_HP_LIMIT_INT_MIC_BOOST
),
9345 SND_PCI_QUIRK(0x103c, 0x88d0, "HP Pavilion 15-eh1xxx (mainboard 88D0)", ALC287_FIXUP_HP_GPIO_LED
),
9346 SND_PCI_QUIRK(0x103c, 0x8902, "HP OMEN 16", ALC285_FIXUP_HP_MUTE_LED
),
9347 SND_PCI_QUIRK(0x103c, 0x896e, "HP EliteBook x360 830 G9", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED
),
9348 SND_PCI_QUIRK(0x103c, 0x8971, "HP EliteBook 830 G9", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED
),
9349 SND_PCI_QUIRK(0x103c, 0x8972, "HP EliteBook 840 G9", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED
),
9350 SND_PCI_QUIRK(0x103c, 0x8973, "HP EliteBook 860 G9", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED
),
9351 SND_PCI_QUIRK(0x103c, 0x8974, "HP EliteBook 840 Aero G9", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED
),
9352 SND_PCI_QUIRK(0x103c, 0x8975, "HP EliteBook x360 840 Aero G9", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED
),
9353 SND_PCI_QUIRK(0x103c, 0x8981, "HP Elite Dragonfly G3", ALC245_FIXUP_CS35L41_SPI_4
),
9354 SND_PCI_QUIRK(0x103c, 0x898e, "HP EliteBook 835 G9", ALC287_FIXUP_CS35L41_I2C_2
),
9355 SND_PCI_QUIRK(0x103c, 0x898f, "HP EliteBook 835 G9", ALC287_FIXUP_CS35L41_I2C_2
),
9356 SND_PCI_QUIRK(0x103c, 0x8991, "HP EliteBook 845 G9", ALC287_FIXUP_CS35L41_I2C_2_HP_GPIO_LED
),
9357 SND_PCI_QUIRK(0x103c, 0x8992, "HP EliteBook 845 G9", ALC287_FIXUP_CS35L41_I2C_2
),
9358 SND_PCI_QUIRK(0x103c, 0x8994, "HP EliteBook 855 G9", ALC287_FIXUP_CS35L41_I2C_2_HP_GPIO_LED
),
9359 SND_PCI_QUIRK(0x103c, 0x8995, "HP EliteBook 855 G9", ALC287_FIXUP_CS35L41_I2C_2
),
9360 SND_PCI_QUIRK(0x103c, 0x89a4, "HP ProBook 440 G9", ALC236_FIXUP_HP_GPIO_LED
),
9361 SND_PCI_QUIRK(0x103c, 0x89a6, "HP ProBook 450 G9", ALC236_FIXUP_HP_GPIO_LED
),
9362 SND_PCI_QUIRK(0x103c, 0x89aa, "HP EliteBook 630 G9", ALC236_FIXUP_HP_GPIO_LED
),
9363 SND_PCI_QUIRK(0x103c, 0x89ac, "HP EliteBook 640 G9", ALC236_FIXUP_HP_GPIO_LED
),
9364 SND_PCI_QUIRK(0x103c, 0x89ae, "HP EliteBook 650 G9", ALC236_FIXUP_HP_GPIO_LED
),
9365 SND_PCI_QUIRK(0x103c, 0x89c3, "Zbook Studio G9", ALC245_FIXUP_CS35L41_SPI_4_HP_GPIO_LED
),
9366 SND_PCI_QUIRK(0x103c, 0x89c6, "Zbook Fury 17 G9", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED
),
9367 SND_PCI_QUIRK(0x103c, 0x89ca, "HP", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF
),
9368 SND_PCI_QUIRK(0x103c, 0x8a78, "HP Dev One", ALC285_FIXUP_HP_LIMIT_INT_MIC_BOOST
),
9369 SND_PCI_QUIRK(0x103c, 0x8aa0, "HP ProBook 440 G9 (MB 8A9E)", ALC236_FIXUP_HP_GPIO_LED
),
9370 SND_PCI_QUIRK(0x103c, 0x8aa3, "HP ProBook 450 G9 (MB 8AA1)", ALC236_FIXUP_HP_GPIO_LED
),
9371 SND_PCI_QUIRK(0x103c, 0x8aa8, "HP EliteBook 640 G9 (MB 8AA6)", ALC236_FIXUP_HP_GPIO_LED
),
9372 SND_PCI_QUIRK(0x103c, 0x8aab, "HP EliteBook 650 G9 (MB 8AA9)", ALC236_FIXUP_HP_GPIO_LED
),
9373 SND_PCI_QUIRK(0x103c, 0x8abb, "HP ZBook Firefly 14 G9", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED
),
9374 SND_PCI_QUIRK(0x103c, 0x8ad1, "HP EliteBook 840 14 inch G9 Notebook PC", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED
),
9375 SND_PCI_QUIRK(0x103c, 0x8ad2, "HP EliteBook 860 16 inch G9 Notebook PC", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED
),
9376 SND_PCI_QUIRK(0x1043, 0x103e, "ASUS X540SA", ALC256_FIXUP_ASUS_MIC
),
9377 SND_PCI_QUIRK(0x1043, 0x103f, "ASUS TX300", ALC282_FIXUP_ASUS_TX300
),
9378 SND_PCI_QUIRK(0x1043, 0x106d, "Asus K53BE", ALC269_FIXUP_LIMIT_INT_MIC_BOOST
),
9379 SND_PCI_QUIRK(0x1043, 0x10a1, "ASUS UX391UA", ALC294_FIXUP_ASUS_SPK
),
9380 SND_PCI_QUIRK(0x1043, 0x10c0, "ASUS X540SA", ALC256_FIXUP_ASUS_MIC
),
9381 SND_PCI_QUIRK(0x1043, 0x10d0, "ASUS X540LA/X540LJ", ALC255_FIXUP_ASUS_MIC_NO_PRESENCE
),
9382 SND_PCI_QUIRK(0x1043, 0x115d, "Asus 1015E", ALC269_FIXUP_LIMIT_INT_MIC_BOOST
),
9383 SND_PCI_QUIRK(0x1043, 0x11c0, "ASUS X556UR", ALC255_FIXUP_ASUS_MIC_NO_PRESENCE
),
9384 SND_PCI_QUIRK(0x1043, 0x125e, "ASUS Q524UQK", ALC255_FIXUP_ASUS_MIC_NO_PRESENCE
),
9385 SND_PCI_QUIRK(0x1043, 0x1271, "ASUS X430UN", ALC256_FIXUP_ASUS_MIC_NO_PRESENCE
),
9386 SND_PCI_QUIRK(0x1043, 0x1290, "ASUS X441SA", ALC233_FIXUP_EAPD_COEF_AND_MIC_NO_PRESENCE
),
9387 SND_PCI_QUIRK(0x1043, 0x12a0, "ASUS X441UV", ALC233_FIXUP_EAPD_COEF_AND_MIC_NO_PRESENCE
),
9388 SND_PCI_QUIRK(0x1043, 0x12af, "ASUS UX582ZS", ALC245_FIXUP_CS35L41_SPI_2
),
9389 SND_PCI_QUIRK(0x1043, 0x12e0, "ASUS X541SA", ALC256_FIXUP_ASUS_MIC
),
9390 SND_PCI_QUIRK(0x1043, 0x12f0, "ASUS X541UV", ALC256_FIXUP_ASUS_MIC
),
9391 SND_PCI_QUIRK(0x1043, 0x1313, "Asus K42JZ", ALC269VB_FIXUP_ASUS_MIC_NO_PRESENCE
),
9392 SND_PCI_QUIRK(0x1043, 0x13b0, "ASUS Z550SA", ALC256_FIXUP_ASUS_MIC
),
9393 SND_PCI_QUIRK(0x1043, 0x1427, "Asus Zenbook UX31E", ALC269VB_FIXUP_ASUS_ZENBOOK
),
9394 SND_PCI_QUIRK(0x1043, 0x1517, "Asus Zenbook UX31A", ALC269VB_FIXUP_ASUS_ZENBOOK_UX31A
),
9395 SND_PCI_QUIRK(0x1043, 0x1662, "ASUS GV301QH", ALC294_FIXUP_ASUS_DUAL_SPK
),
9396 SND_PCI_QUIRK(0x1043, 0x16b2, "ASUS GU603", ALC289_FIXUP_ASUS_GA401
),
9397 SND_PCI_QUIRK(0x1043, 0x16e3, "ASUS UX50", ALC269_FIXUP_STEREO_DMIC
),
9398 SND_PCI_QUIRK(0x1043, 0x1740, "ASUS UX430UA", ALC295_FIXUP_ASUS_DACS
),
9399 SND_PCI_QUIRK(0x1043, 0x17d1, "ASUS UX431FL", ALC294_FIXUP_ASUS_DUAL_SPK
),
9400 SND_PCI_QUIRK(0x1043, 0x1881, "ASUS Zephyrus S/M", ALC294_FIXUP_ASUS_GX502_PINS
),
9401 SND_PCI_QUIRK(0x1043, 0x18b1, "Asus MJ401TA", ALC256_FIXUP_ASUS_HEADSET_MIC
),
9402 SND_PCI_QUIRK(0x1043, 0x18f1, "Asus FX505DT", ALC256_FIXUP_ASUS_HEADSET_MIC
),
9403 SND_PCI_QUIRK(0x1043, 0x194e, "ASUS UX563FD", ALC294_FIXUP_ASUS_HPE
),
9404 SND_PCI_QUIRK(0x1043, 0x1970, "ASUS UX550VE", ALC289_FIXUP_ASUS_GA401
),
9405 SND_PCI_QUIRK(0x1043, 0x1982, "ASUS B1400CEPE", ALC256_FIXUP_ASUS_HPE
),
9406 SND_PCI_QUIRK(0x1043, 0x19ce, "ASUS B9450FA", ALC294_FIXUP_ASUS_HPE
),
9407 SND_PCI_QUIRK(0x1043, 0x19e1, "ASUS UX581LV", ALC295_FIXUP_ASUS_MIC_NO_PRESENCE
),
9408 SND_PCI_QUIRK(0x1043, 0x1a13, "Asus G73Jw", ALC269_FIXUP_ASUS_G73JW
),
9409 SND_PCI_QUIRK(0x1043, 0x1a30, "ASUS X705UD", ALC256_FIXUP_ASUS_MIC
),
9410 SND_PCI_QUIRK(0x1043, 0x1a8f, "ASUS UX582ZS", ALC245_FIXUP_CS35L41_SPI_2
),
9411 SND_PCI_QUIRK(0x1043, 0x1b11, "ASUS UX431DA", ALC294_FIXUP_ASUS_COEF_1B
),
9412 SND_PCI_QUIRK(0x1043, 0x1b13, "Asus U41SV", ALC269_FIXUP_INV_DMIC
),
9413 SND_PCI_QUIRK(0x1043, 0x1bbd, "ASUS Z550MA", ALC255_FIXUP_ASUS_MIC_NO_PRESENCE
),
9414 SND_PCI_QUIRK(0x1043, 0x1c23, "Asus X55U", ALC269_FIXUP_LIMIT_INT_MIC_BOOST
),
9415 SND_PCI_QUIRK(0x1043, 0x1c92, "ASUS ROG Strix G15", ALC285_FIXUP_ASUS_G533Z_PINS
),
9416 SND_PCI_QUIRK(0x1043, 0x1ccd, "ASUS X555UB", ALC256_FIXUP_ASUS_MIC
),
9417 SND_PCI_QUIRK(0x1043, 0x1d42, "ASUS Zephyrus G14 2022", ALC289_FIXUP_ASUS_GA401
),
9418 SND_PCI_QUIRK(0x1043, 0x1d4e, "ASUS TM420", ALC256_FIXUP_ASUS_HPE
),
9419 SND_PCI_QUIRK(0x1043, 0x1e11, "ASUS Zephyrus G15", ALC289_FIXUP_ASUS_GA502
),
9420 SND_PCI_QUIRK(0x1043, 0x1e51, "ASUS Zephyrus M15", ALC294_FIXUP_ASUS_GU502_PINS
),
9421 SND_PCI_QUIRK(0x1043, 0x1e5e, "ASUS ROG Strix G513", ALC294_FIXUP_ASUS_G513_PINS
),
9422 SND_PCI_QUIRK(0x1043, 0x1e8e, "ASUS Zephyrus G15", ALC289_FIXUP_ASUS_GA401
),
9423 SND_PCI_QUIRK(0x1043, 0x1c52, "ASUS Zephyrus G15 2022", ALC289_FIXUP_ASUS_GA401
),
9424 SND_PCI_QUIRK(0x1043, 0x1f11, "ASUS Zephyrus G14", ALC289_FIXUP_ASUS_GA401
),
9425 SND_PCI_QUIRK(0x1043, 0x3030, "ASUS ZN270IE", ALC256_FIXUP_ASUS_AIO_GPIO2
),
9426 SND_PCI_QUIRK(0x1043, 0x831a, "ASUS P901", ALC269_FIXUP_STEREO_DMIC
),
9427 SND_PCI_QUIRK(0x1043, 0x834a, "ASUS S101", ALC269_FIXUP_STEREO_DMIC
),
9428 SND_PCI_QUIRK(0x1043, 0x8398, "ASUS P1005", ALC269_FIXUP_STEREO_DMIC
),
9429 SND_PCI_QUIRK(0x1043, 0x83ce, "ASUS P1005", ALC269_FIXUP_STEREO_DMIC
),
9430 SND_PCI_QUIRK(0x1043, 0x8516, "ASUS X101CH", ALC269_FIXUP_ASUS_X101
),
9431 SND_PCI_QUIRK(0x104d, 0x9073, "Sony VAIO", ALC275_FIXUP_SONY_VAIO_GPIO2
),
9432 SND_PCI_QUIRK(0x104d, 0x907b, "Sony VAIO", ALC275_FIXUP_SONY_HWEQ
),
9433 SND_PCI_QUIRK(0x104d, 0x9084, "Sony VAIO", ALC275_FIXUP_SONY_HWEQ
),
9434 SND_PCI_QUIRK(0x104d, 0x9099, "Sony VAIO S13", ALC275_FIXUP_SONY_DISABLE_AAMIX
),
9435 SND_PCI_QUIRK(0x104d, 0x90b5, "Sony VAIO Pro 11", ALC286_FIXUP_SONY_MIC_NO_PRESENCE
),
9436 SND_PCI_QUIRK(0x104d, 0x90b6, "Sony VAIO Pro 13", ALC286_FIXUP_SONY_MIC_NO_PRESENCE
),
9437 SND_PCI_QUIRK(0x10cf, 0x1475, "Lifebook", ALC269_FIXUP_LIFEBOOK
),
9438 SND_PCI_QUIRK(0x10cf, 0x159f, "Lifebook E780", ALC269_FIXUP_LIFEBOOK_NO_HP_TO_LINEOUT
),
9439 SND_PCI_QUIRK(0x10cf, 0x15dc, "Lifebook T731", ALC269_FIXUP_LIFEBOOK_HP_PIN
),
9440 SND_PCI_QUIRK(0x10cf, 0x1629, "Lifebook U7x7", ALC255_FIXUP_LIFEBOOK_U7x7_HEADSET_MIC
),
9441 SND_PCI_QUIRK(0x10cf, 0x1757, "Lifebook E752", ALC269_FIXUP_LIFEBOOK_HP_PIN
),
9442 SND_PCI_QUIRK(0x10cf, 0x1845, "Lifebook U904", ALC269_FIXUP_LIFEBOOK_EXTMIC
),
9443 SND_PCI_QUIRK(0x10ec, 0x10f2, "Intel Reference board", ALC700_FIXUP_INTEL_REFERENCE
),
9444 SND_PCI_QUIRK(0x10ec, 0x118c, "Medion EE4254 MD62100", ALC256_FIXUP_MEDION_HEADSET_NO_PRESENCE
),
9445 SND_PCI_QUIRK(0x10ec, 0x1230, "Intel Reference board", ALC295_FIXUP_CHROME_BOOK
),
9446 SND_PCI_QUIRK(0x10ec, 0x1252, "Intel Reference board", ALC295_FIXUP_CHROME_BOOK
),
9447 SND_PCI_QUIRK(0x10ec, 0x1254, "Intel Reference board", ALC295_FIXUP_CHROME_BOOK
),
9448 SND_PCI_QUIRK(0x10f7, 0x8338, "Panasonic CF-SZ6", ALC269_FIXUP_HEADSET_MODE
),
9449 SND_PCI_QUIRK(0x144d, 0xc109, "Samsung Ativ book 9 (NP900X3G)", ALC269_FIXUP_INV_DMIC
),
9450 SND_PCI_QUIRK(0x144d, 0xc169, "Samsung Notebook 9 Pen (NP930SBE-K01US)", ALC298_FIXUP_SAMSUNG_AMP
),
9451 SND_PCI_QUIRK(0x144d, 0xc176, "Samsung Notebook 9 Pro (NP930MBE-K04US)", ALC298_FIXUP_SAMSUNG_AMP
),
9452 SND_PCI_QUIRK(0x144d, 0xc189, "Samsung Galaxy Flex Book (NT950QCG-X716)", ALC298_FIXUP_SAMSUNG_AMP
),
9453 SND_PCI_QUIRK(0x144d, 0xc18a, "Samsung Galaxy Book Ion (NP930XCJ-K01US)", ALC298_FIXUP_SAMSUNG_AMP
),
9454 SND_PCI_QUIRK(0x144d, 0xc740, "Samsung Ativ book 8 (NP870Z5G)", ALC269_FIXUP_ATIV_BOOK_8
),
9455 SND_PCI_QUIRK(0x144d, 0xc812, "Samsung Notebook Pen S (NT950SBE-X58)", ALC298_FIXUP_SAMSUNG_AMP
),
9456 SND_PCI_QUIRK(0x144d, 0xc830, "Samsung Galaxy Book Ion (NT950XCJ-X716A)", ALC298_FIXUP_SAMSUNG_AMP
),
9457 SND_PCI_QUIRK(0x144d, 0xc832, "Samsung Galaxy Book Flex Alpha (NP730QCJ)", ALC256_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET
),
9458 SND_PCI_QUIRK(0x1458, 0xfa53, "Gigabyte BXBT-2807", ALC283_FIXUP_HEADSET_MIC
),
9459 SND_PCI_QUIRK(0x1462, 0xb120, "MSI Cubi MS-B120", ALC283_FIXUP_HEADSET_MIC
),
9460 SND_PCI_QUIRK(0x1462, 0xb171, "Cubi N 8GL (MS-B171)", ALC283_FIXUP_HEADSET_MIC
),
9461 SND_PCI_QUIRK(0x152d, 0x1082, "Quanta NL3", ALC269_FIXUP_LIFEBOOK
),
9462 SND_PCI_QUIRK(0x1558, 0x1323, "Clevo N130ZU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
9463 SND_PCI_QUIRK(0x1558, 0x1325, "Clevo N15[01][CW]U", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
9464 SND_PCI_QUIRK(0x1558, 0x1401, "Clevo L140[CZ]U", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
9465 SND_PCI_QUIRK(0x1558, 0x1403, "Clevo N140CU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
9466 SND_PCI_QUIRK(0x1558, 0x1404, "Clevo N150CU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
9467 SND_PCI_QUIRK(0x1558, 0x14a1, "Clevo L141MU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
9468 SND_PCI_QUIRK(0x1558, 0x4018, "Clevo NV40M[BE]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
9469 SND_PCI_QUIRK(0x1558, 0x4019, "Clevo NV40MZ", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
9470 SND_PCI_QUIRK(0x1558, 0x4020, "Clevo NV40MB", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
9471 SND_PCI_QUIRK(0x1558, 0x4041, "Clevo NV4[15]PZ", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
9472 SND_PCI_QUIRK(0x1558, 0x40a1, "Clevo NL40GU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
9473 SND_PCI_QUIRK(0x1558, 0x40c1, "Clevo NL40[CZ]U", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
9474 SND_PCI_QUIRK(0x1558, 0x40d1, "Clevo NL41DU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
9475 SND_PCI_QUIRK(0x1558, 0x5015, "Clevo NH5[58]H[HJK]Q", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
9476 SND_PCI_QUIRK(0x1558, 0x5017, "Clevo NH7[79]H[HJK]Q", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
9477 SND_PCI_QUIRK(0x1558, 0x50a3, "Clevo NJ51GU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
9478 SND_PCI_QUIRK(0x1558, 0x50b3, "Clevo NK50S[BEZ]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
9479 SND_PCI_QUIRK(0x1558, 0x50b6, "Clevo NK50S5", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
9480 SND_PCI_QUIRK(0x1558, 0x50b8, "Clevo NK50SZ", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
9481 SND_PCI_QUIRK(0x1558, 0x50d5, "Clevo NP50D5", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
9482 SND_PCI_QUIRK(0x1558, 0x50e1, "Clevo NH5[58]HPQ", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
9483 SND_PCI_QUIRK(0x1558, 0x50e2, "Clevo NH7[79]HPQ", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
9484 SND_PCI_QUIRK(0x1558, 0x50f0, "Clevo NH50A[CDF]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
9485 SND_PCI_QUIRK(0x1558, 0x50f2, "Clevo NH50E[PR]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
9486 SND_PCI_QUIRK(0x1558, 0x50f3, "Clevo NH58DPQ", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
9487 SND_PCI_QUIRK(0x1558, 0x50f5, "Clevo NH55EPY", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
9488 SND_PCI_QUIRK(0x1558, 0x50f6, "Clevo NH55DPQ", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
9489 SND_PCI_QUIRK(0x1558, 0x5101, "Clevo S510WU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
9490 SND_PCI_QUIRK(0x1558, 0x5157, "Clevo W517GU1", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
9491 SND_PCI_QUIRK(0x1558, 0x51a1, "Clevo NS50MU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
9492 SND_PCI_QUIRK(0x1558, 0x70a1, "Clevo NB70T[HJK]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
9493 SND_PCI_QUIRK(0x1558, 0x70b3, "Clevo NK70SB", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
9494 SND_PCI_QUIRK(0x1558, 0x70f2, "Clevo NH79EPY", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
9495 SND_PCI_QUIRK(0x1558, 0x70f3, "Clevo NH77DPQ", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
9496 SND_PCI_QUIRK(0x1558, 0x70f4, "Clevo NH77EPY", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
9497 SND_PCI_QUIRK(0x1558, 0x70f6, "Clevo NH77DPQ-Y", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
9498 SND_PCI_QUIRK(0x1558, 0x7716, "Clevo NS50PU", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
9499 SND_PCI_QUIRK(0x1558, 0x7717, "Clevo NS70PU", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
9500 SND_PCI_QUIRK(0x1558, 0x7718, "Clevo L140PU", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
9501 SND_PCI_QUIRK(0x1558, 0x8228, "Clevo NR40BU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
9502 SND_PCI_QUIRK(0x1558, 0x8520, "Clevo NH50D[CD]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
9503 SND_PCI_QUIRK(0x1558, 0x8521, "Clevo NH77D[CD]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
9504 SND_PCI_QUIRK(0x1558, 0x8535, "Clevo NH50D[BE]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
9505 SND_PCI_QUIRK(0x1558, 0x8536, "Clevo NH79D[BE]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
9506 SND_PCI_QUIRK(0x1558, 0x8550, "Clevo NH[57][0-9][ER][ACDH]Q", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
9507 SND_PCI_QUIRK(0x1558, 0x8551, "Clevo NH[57][0-9][ER][ACDH]Q", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
9508 SND_PCI_QUIRK(0x1558, 0x8560, "Clevo NH[57][0-9][ER][ACDH]Q", ALC269_FIXUP_HEADSET_MIC
),
9509 SND_PCI_QUIRK(0x1558, 0x8561, "Clevo NH[57][0-9][ER][ACDH]Q", ALC269_FIXUP_HEADSET_MIC
),
9510 SND_PCI_QUIRK(0x1558, 0x8562, "Clevo NH[57][0-9]RZ[Q]", ALC269_FIXUP_DMIC
),
9511 SND_PCI_QUIRK(0x1558, 0x8668, "Clevo NP50B[BE]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
9512 SND_PCI_QUIRK(0x1558, 0x866d, "Clevo NP5[05]PN[HJK]", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
9513 SND_PCI_QUIRK(0x1558, 0x867c, "Clevo NP7[01]PNP", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
9514 SND_PCI_QUIRK(0x1558, 0x867d, "Clevo NP7[01]PN[HJK]", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
9515 SND_PCI_QUIRK(0x1558, 0x8680, "Clevo NJ50LU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
9516 SND_PCI_QUIRK(0x1558, 0x8686, "Clevo NH50[CZ]U", ALC256_FIXUP_MIC_NO_PRESENCE_AND_RESUME
),
9517 SND_PCI_QUIRK(0x1558, 0x8a20, "Clevo NH55DCQ-Y", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
9518 SND_PCI_QUIRK(0x1558, 0x8a51, "Clevo NH70RCQ-Y", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
9519 SND_PCI_QUIRK(0x1558, 0x8d50, "Clevo NH55RCQ-M", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
9520 SND_PCI_QUIRK(0x1558, 0x951d, "Clevo N950T[CDF]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
9521 SND_PCI_QUIRK(0x1558, 0x9600, "Clevo N960K[PR]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
9522 SND_PCI_QUIRK(0x1558, 0x961d, "Clevo N960S[CDF]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
9523 SND_PCI_QUIRK(0x1558, 0x971d, "Clevo N970T[CDF]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
9524 SND_PCI_QUIRK(0x1558, 0xa500, "Clevo NL5[03]RU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
9525 SND_PCI_QUIRK(0x1558, 0xa600, "Clevo NL50NU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
9526 SND_PCI_QUIRK(0x1558, 0xb018, "Clevo NP50D[BE]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
9527 SND_PCI_QUIRK(0x1558, 0xb019, "Clevo NH77D[BE]Q", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
9528 SND_PCI_QUIRK(0x1558, 0xb022, "Clevo NH77D[DC][QW]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
9529 SND_PCI_QUIRK(0x1558, 0xc018, "Clevo NP50D[BE]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
9530 SND_PCI_QUIRK(0x1558, 0xc019, "Clevo NH77D[BE]Q", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
9531 SND_PCI_QUIRK(0x1558, 0xc022, "Clevo NH77[DC][QW]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
9532 SND_PCI_QUIRK(0x17aa, 0x1036, "Lenovo P520", ALC233_FIXUP_LENOVO_MULTI_CODECS
),
9533 SND_PCI_QUIRK(0x17aa, 0x1048, "ThinkCentre Station", ALC623_FIXUP_LENOVO_THINKSTATION_P340
),
9534 SND_PCI_QUIRK(0x17aa, 0x20f2, "Thinkpad SL410/510", ALC269_FIXUP_SKU_IGNORE
),
9535 SND_PCI_QUIRK(0x17aa, 0x215e, "Thinkpad L512", ALC269_FIXUP_SKU_IGNORE
),
9536 SND_PCI_QUIRK(0x17aa, 0x21b8, "Thinkpad Edge 14", ALC269_FIXUP_SKU_IGNORE
),
9537 SND_PCI_QUIRK(0x17aa, 0x21ca, "Thinkpad L412", ALC269_FIXUP_SKU_IGNORE
),
9538 SND_PCI_QUIRK(0x17aa, 0x21e9, "Thinkpad Edge 15", ALC269_FIXUP_SKU_IGNORE
),
9539 SND_PCI_QUIRK(0x17aa, 0x21f3, "Thinkpad T430", ALC269_FIXUP_LENOVO_DOCK
),
9540 SND_PCI_QUIRK(0x17aa, 0x21f6, "Thinkpad T530", ALC269_FIXUP_LENOVO_DOCK_LIMIT_BOOST
),
9541 SND_PCI_QUIRK(0x17aa, 0x21fa, "Thinkpad X230", ALC269_FIXUP_LENOVO_DOCK
),
9542 SND_PCI_QUIRK(0x17aa, 0x21fb, "Thinkpad T430s", ALC269_FIXUP_LENOVO_DOCK
),
9543 SND_PCI_QUIRK(0x17aa, 0x2203, "Thinkpad X230 Tablet", ALC269_FIXUP_LENOVO_DOCK
),
9544 SND_PCI_QUIRK(0x17aa, 0x2208, "Thinkpad T431s", ALC269_FIXUP_LENOVO_DOCK
),
9545 SND_PCI_QUIRK(0x17aa, 0x220c, "Thinkpad T440s", ALC292_FIXUP_TPT440
),
9546 SND_PCI_QUIRK(0x17aa, 0x220e, "Thinkpad T440p", ALC292_FIXUP_TPT440_DOCK
),
9547 SND_PCI_QUIRK(0x17aa, 0x2210, "Thinkpad T540p", ALC292_FIXUP_TPT440_DOCK
),
9548 SND_PCI_QUIRK(0x17aa, 0x2211, "Thinkpad W541", ALC292_FIXUP_TPT440_DOCK
),
9549 SND_PCI_QUIRK(0x17aa, 0x2212, "Thinkpad T440", ALC292_FIXUP_TPT440_DOCK
),
9550 SND_PCI_QUIRK(0x17aa, 0x2214, "Thinkpad X240", ALC292_FIXUP_TPT440_DOCK
),
9551 SND_PCI_QUIRK(0x17aa, 0x2215, "Thinkpad", ALC269_FIXUP_LIMIT_INT_MIC_BOOST
),
9552 SND_PCI_QUIRK(0x17aa, 0x2218, "Thinkpad X1 Carbon 2nd", ALC292_FIXUP_TPT440_DOCK
),
9553 SND_PCI_QUIRK(0x17aa, 0x2223, "ThinkPad T550", ALC292_FIXUP_TPT440_DOCK
),
9554 SND_PCI_QUIRK(0x17aa, 0x2226, "ThinkPad X250", ALC292_FIXUP_TPT440_DOCK
),
9555 SND_PCI_QUIRK(0x17aa, 0x222d, "Thinkpad", ALC298_FIXUP_TPT470_DOCK
),
9556 SND_PCI_QUIRK(0x17aa, 0x222e, "Thinkpad", ALC298_FIXUP_TPT470_DOCK
),
9557 SND_PCI_QUIRK(0x17aa, 0x2231, "Thinkpad T560", ALC292_FIXUP_TPT460
),
9558 SND_PCI_QUIRK(0x17aa, 0x2233, "Thinkpad", ALC292_FIXUP_TPT460
),
9559 SND_PCI_QUIRK(0x17aa, 0x2245, "Thinkpad T470", ALC298_FIXUP_TPT470_DOCK
),
9560 SND_PCI_QUIRK(0x17aa, 0x2246, "Thinkpad", ALC298_FIXUP_TPT470_DOCK
),
9561 SND_PCI_QUIRK(0x17aa, 0x2247, "Thinkpad", ALC298_FIXUP_TPT470_DOCK
),
9562 SND_PCI_QUIRK(0x17aa, 0x2249, "Thinkpad", ALC292_FIXUP_TPT460
),
9563 SND_PCI_QUIRK(0x17aa, 0x224b, "Thinkpad", ALC298_FIXUP_TPT470_DOCK
),
9564 SND_PCI_QUIRK(0x17aa, 0x224c, "Thinkpad", ALC298_FIXUP_TPT470_DOCK
),
9565 SND_PCI_QUIRK(0x17aa, 0x224d, "Thinkpad", ALC298_FIXUP_TPT470_DOCK
),
9566 SND_PCI_QUIRK(0x17aa, 0x225d, "Thinkpad T480", ALC269_FIXUP_LIMIT_INT_MIC_BOOST
),
9567 SND_PCI_QUIRK(0x17aa, 0x2292, "Thinkpad X1 Carbon 7th", ALC285_FIXUP_THINKPAD_HEADSET_JACK
),
9568 SND_PCI_QUIRK(0x17aa, 0x22be, "Thinkpad X1 Carbon 8th", ALC285_FIXUP_THINKPAD_HEADSET_JACK
),
9569 SND_PCI_QUIRK(0x17aa, 0x22c1, "Thinkpad P1 Gen 3", ALC285_FIXUP_THINKPAD_NO_BASS_SPK_HEADSET_JACK
),
9570 SND_PCI_QUIRK(0x17aa, 0x22c2, "Thinkpad X1 Extreme Gen 3", ALC285_FIXUP_THINKPAD_NO_BASS_SPK_HEADSET_JACK
),
9571 SND_PCI_QUIRK(0x17aa, 0x22f1, "Thinkpad", ALC287_FIXUP_CS35L41_I2C_2
),
9572 SND_PCI_QUIRK(0x17aa, 0x22f2, "Thinkpad", ALC287_FIXUP_CS35L41_I2C_2
),
9573 SND_PCI_QUIRK(0x17aa, 0x22f3, "Thinkpad", ALC287_FIXUP_CS35L41_I2C_2
),
9574 SND_PCI_QUIRK(0x17aa, 0x30bb, "ThinkCentre AIO", ALC233_FIXUP_LENOVO_LINE2_MIC_HOTKEY
),
9575 SND_PCI_QUIRK(0x17aa, 0x30e2, "ThinkCentre AIO", ALC233_FIXUP_LENOVO_LINE2_MIC_HOTKEY
),
9576 SND_PCI_QUIRK(0x17aa, 0x310c, "ThinkCentre Station", ALC294_FIXUP_LENOVO_MIC_LOCATION
),
9577 SND_PCI_QUIRK(0x17aa, 0x3111, "ThinkCentre Station", ALC294_FIXUP_LENOVO_MIC_LOCATION
),
9578 SND_PCI_QUIRK(0x17aa, 0x312a, "ThinkCentre Station", ALC294_FIXUP_LENOVO_MIC_LOCATION
),
9579 SND_PCI_QUIRK(0x17aa, 0x312f, "ThinkCentre Station", ALC294_FIXUP_LENOVO_MIC_LOCATION
),
9580 SND_PCI_QUIRK(0x17aa, 0x313c, "ThinkCentre Station", ALC294_FIXUP_LENOVO_MIC_LOCATION
),
9581 SND_PCI_QUIRK(0x17aa, 0x3151, "ThinkCentre Station", ALC283_FIXUP_HEADSET_MIC
),
9582 SND_PCI_QUIRK(0x17aa, 0x3176, "ThinkCentre Station", ALC283_FIXUP_HEADSET_MIC
),
9583 SND_PCI_QUIRK(0x17aa, 0x3178, "ThinkCentre Station", ALC283_FIXUP_HEADSET_MIC
),
9584 SND_PCI_QUIRK(0x17aa, 0x31af, "ThinkCentre Station", ALC623_FIXUP_LENOVO_THINKSTATION_P340
),
9585 SND_PCI_QUIRK(0x17aa, 0x3801, "Lenovo Yoga9 14IAP7", ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK_PIN
),
9586 SND_PCI_QUIRK(0x17aa, 0x3802, "Lenovo Yoga DuetITL 2021", ALC287_FIXUP_YOGA7_14ITL_SPEAKERS
),
9587 SND_PCI_QUIRK(0x17aa, 0x3813, "Legion 7i 15IMHG05", ALC287_FIXUP_LEGION_15IMHG05_SPEAKERS
),
9588 SND_PCI_QUIRK(0x17aa, 0x3818, "Lenovo C940 / Yoga Duet 7", ALC298_FIXUP_LENOVO_C940_DUET7
),
9589 SND_PCI_QUIRK(0x17aa, 0x3819, "Lenovo 13s Gen2 ITL", ALC287_FIXUP_13S_GEN2_SPEAKERS
),
9590 SND_PCI_QUIRK(0x17aa, 0x3820, "Yoga Duet 7 13ITL6", ALC287_FIXUP_YOGA7_14ITL_SPEAKERS
),
9591 SND_PCI_QUIRK(0x17aa, 0x3824, "Legion Y9000X 2020", ALC285_FIXUP_LEGION_Y9000X_SPEAKERS
),
9592 SND_PCI_QUIRK(0x17aa, 0x3827, "Ideapad S740", ALC285_FIXUP_IDEAPAD_S740_COEF
),
9593 SND_PCI_QUIRK(0x17aa, 0x3834, "Lenovo IdeaPad Slim 9i 14ITL5", ALC287_FIXUP_YOGA7_14ITL_SPEAKERS
),
9594 SND_PCI_QUIRK(0x17aa, 0x383d, "Legion Y9000X 2019", ALC285_FIXUP_LEGION_Y9000X_SPEAKERS
),
9595 SND_PCI_QUIRK(0x17aa, 0x3843, "Yoga 9i", ALC287_FIXUP_IDEAPAD_BASS_SPK_AMP
),
9596 SND_PCI_QUIRK(0x17aa, 0x3847, "Legion 7 16ACHG6", ALC287_FIXUP_LEGION_16ACHG6
),
9597 SND_PCI_QUIRK(0x17aa, 0x384a, "Lenovo Yoga 7 15ITL5", ALC287_FIXUP_YOGA7_14ITL_SPEAKERS
),
9598 SND_PCI_QUIRK(0x17aa, 0x3852, "Lenovo Yoga 7 14ITL5", ALC287_FIXUP_YOGA7_14ITL_SPEAKERS
),
9599 SND_PCI_QUIRK(0x17aa, 0x3853, "Lenovo Yoga 7 15ITL5", ALC287_FIXUP_YOGA7_14ITL_SPEAKERS
),
9600 SND_PCI_QUIRK(0x17aa, 0x3855, "Legion 7 16ITHG6", ALC287_FIXUP_LEGION_16ITHG6
),
9601 SND_PCI_QUIRK(0x17aa, 0x3869, "Lenovo Yoga7 14IAL7", ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK_PIN
),
9602 SND_PCI_QUIRK(0x17aa, 0x3902, "Lenovo E50-80", ALC269_FIXUP_DMIC_THINKPAD_ACPI
),
9603 SND_PCI_QUIRK(0x17aa, 0x3977, "IdeaPad S210", ALC283_FIXUP_INT_MIC
),
9604 SND_PCI_QUIRK(0x17aa, 0x3978, "Lenovo B50-70", ALC269_FIXUP_DMIC_THINKPAD_ACPI
),
9605 SND_PCI_QUIRK(0x17aa, 0x3bf8, "Quanta FL1", ALC269_FIXUP_PCM_44K
),
9606 SND_PCI_QUIRK(0x17aa, 0x5013, "Thinkpad", ALC269_FIXUP_LIMIT_INT_MIC_BOOST
),
9607 SND_PCI_QUIRK(0x17aa, 0x501a, "Thinkpad", ALC283_FIXUP_INT_MIC
),
9608 SND_PCI_QUIRK(0x17aa, 0x501e, "Thinkpad L440", ALC292_FIXUP_TPT440_DOCK
),
9609 SND_PCI_QUIRK(0x17aa, 0x5026, "Thinkpad", ALC269_FIXUP_LIMIT_INT_MIC_BOOST
),
9610 SND_PCI_QUIRK(0x17aa, 0x5034, "Thinkpad T450", ALC292_FIXUP_TPT440_DOCK
),
9611 SND_PCI_QUIRK(0x17aa, 0x5036, "Thinkpad T450s", ALC292_FIXUP_TPT440_DOCK
),
9612 SND_PCI_QUIRK(0x17aa, 0x503c, "Thinkpad L450", ALC292_FIXUP_TPT440_DOCK
),
9613 SND_PCI_QUIRK(0x17aa, 0x504a, "ThinkPad X260", ALC292_FIXUP_TPT440_DOCK
),
9614 SND_PCI_QUIRK(0x17aa, 0x504b, "Thinkpad", ALC293_FIXUP_LENOVO_SPK_NOISE
),
9615 SND_PCI_QUIRK(0x17aa, 0x5050, "Thinkpad T560p", ALC292_FIXUP_TPT460
),
9616 SND_PCI_QUIRK(0x17aa, 0x5051, "Thinkpad L460", ALC292_FIXUP_TPT460
),
9617 SND_PCI_QUIRK(0x17aa, 0x5053, "Thinkpad T460", ALC292_FIXUP_TPT460
),
9618 SND_PCI_QUIRK(0x17aa, 0x505d, "Thinkpad", ALC298_FIXUP_TPT470_DOCK
),
9619 SND_PCI_QUIRK(0x17aa, 0x505f, "Thinkpad", ALC298_FIXUP_TPT470_DOCK
),
9620 SND_PCI_QUIRK(0x17aa, 0x5062, "Thinkpad", ALC298_FIXUP_TPT470_DOCK
),
9621 SND_PCI_QUIRK(0x17aa, 0x508b, "Thinkpad X12 Gen 1", ALC287_FIXUP_LEGION_15IMHG05_SPEAKERS
),
9622 SND_PCI_QUIRK(0x17aa, 0x5109, "Thinkpad", ALC269_FIXUP_LIMIT_INT_MIC_BOOST
),
9623 SND_PCI_QUIRK(0x17aa, 0x511e, "Thinkpad", ALC298_FIXUP_TPT470_DOCK
),
9624 SND_PCI_QUIRK(0x17aa, 0x511f, "Thinkpad", ALC298_FIXUP_TPT470_DOCK
),
9625 SND_PCI_QUIRK(0x17aa, 0x9e54, "LENOVO NB", ALC269_FIXUP_LENOVO_EAPD
),
9626 SND_PCI_QUIRK(0x1849, 0x1233, "ASRock NUC Box 1100", ALC233_FIXUP_NO_AUDIO_JACK
),
9627 SND_PCI_QUIRK(0x19e5, 0x3204, "Huawei MACH-WX9", ALC256_FIXUP_HUAWEI_MACH_WX9_PINS
),
9628 SND_PCI_QUIRK(0x19e5, 0x320f, "Huawei WRT-WX9 ", ALC256_FIXUP_ASUS_MIC_NO_PRESENCE
),
9629 SND_PCI_QUIRK(0x1b35, 0x1235, "CZC B20", ALC269_FIXUP_CZC_B20
),
9630 SND_PCI_QUIRK(0x1b35, 0x1236, "CZC TMI", ALC269_FIXUP_CZC_TMI
),
9631 SND_PCI_QUIRK(0x1b35, 0x1237, "CZC L101", ALC269_FIXUP_CZC_L101
),
9632 SND_PCI_QUIRK(0x1b7d, 0xa831, "Ordissimo EVE2 ", ALC269VB_FIXUP_ORDISSIMO_EVE2
), /* Also known as Malata PC-B1303 */
9633 SND_PCI_QUIRK(0x1c06, 0x2013, "Lemote A1802", ALC269_FIXUP_LEMOTE_A1802
),
9634 SND_PCI_QUIRK(0x1c06, 0x2015, "Lemote A190X", ALC269_FIXUP_LEMOTE_A190X
),
9635 SND_PCI_QUIRK(0x1d05, 0x1132, "TongFang PHxTxX1", ALC256_FIXUP_SET_COEF_DEFAULTS
),
9636 SND_PCI_QUIRK(0x1d05, 0x1096, "TongFang GMxMRxx", ALC269_FIXUP_NO_SHUTUP
),
9637 SND_PCI_QUIRK(0x1d05, 0x1100, "TongFang GKxNRxx", ALC269_FIXUP_NO_SHUTUP
),
9638 SND_PCI_QUIRK(0x1d05, 0x1111, "TongFang GMxZGxx", ALC269_FIXUP_NO_SHUTUP
),
9639 SND_PCI_QUIRK(0x1d05, 0x1119, "TongFang GMxZGxx", ALC269_FIXUP_NO_SHUTUP
),
9640 SND_PCI_QUIRK(0x1d05, 0x1129, "TongFang GMxZGxx", ALC269_FIXUP_NO_SHUTUP
),
9641 SND_PCI_QUIRK(0x1d05, 0x1147, "TongFang GMxTGxx", ALC269_FIXUP_NO_SHUTUP
),
9642 SND_PCI_QUIRK(0x1d05, 0x115c, "TongFang GMxTGxx", ALC269_FIXUP_NO_SHUTUP
),
9643 SND_PCI_QUIRK(0x1d05, 0x121b, "TongFang GMxAGxx", ALC269_FIXUP_NO_SHUTUP
),
9644 SND_PCI_QUIRK(0x1d72, 0x1602, "RedmiBook", ALC255_FIXUP_XIAOMI_HEADSET_MIC
),
9645 SND_PCI_QUIRK(0x1d72, 0x1701, "XiaomiNotebook Pro", ALC298_FIXUP_DELL1_MIC_NO_PRESENCE
),
9646 SND_PCI_QUIRK(0x1d72, 0x1901, "RedmiBook 14", ALC256_FIXUP_ASUS_HEADSET_MIC
),
9647 SND_PCI_QUIRK(0x1d72, 0x1945, "Redmi G", ALC256_FIXUP_ASUS_HEADSET_MIC
),
9648 SND_PCI_QUIRK(0x1d72, 0x1947, "RedmiBook Air", ALC255_FIXUP_XIAOMI_HEADSET_MIC
),
9649 SND_PCI_QUIRK(0x8086, 0x2074, "Intel NUC 8", ALC233_FIXUP_INTEL_NUC8_DMIC
),
9650 SND_PCI_QUIRK(0x8086, 0x2080, "Intel NUC 8 Rugged", ALC256_FIXUP_INTEL_NUC8_RUGGED
),
9651 SND_PCI_QUIRK(0x8086, 0x2081, "Intel NUC 10", ALC256_FIXUP_INTEL_NUC10
),
9652 SND_PCI_QUIRK(0xf111, 0x0001, "Framework Laptop", ALC295_FIXUP_FRAMEWORK_LAPTOP_MIC_NO_PRESENCE
),
9655 /* Below is a quirk table taken from the old code.
9656 * Basically the device should work as is without the fixup table.
9657 * If BIOS doesn't give a proper info, enable the corresponding
9660 SND_PCI_QUIRK(0x1043, 0x8330, "ASUS Eeepc P703 P900A",
9662 SND_PCI_QUIRK(0x1043, 0x1013, "ASUS N61Da", ALC269_FIXUP_AMIC
),
9663 SND_PCI_QUIRK(0x1043, 0x1143, "ASUS B53f", ALC269_FIXUP_AMIC
),
9664 SND_PCI_QUIRK(0x1043, 0x1133, "ASUS UJ20ft", ALC269_FIXUP_AMIC
),
9665 SND_PCI_QUIRK(0x1043, 0x1183, "ASUS K72DR", ALC269_FIXUP_AMIC
),
9666 SND_PCI_QUIRK(0x1043, 0x11b3, "ASUS K52DR", ALC269_FIXUP_AMIC
),
9667 SND_PCI_QUIRK(0x1043, 0x11e3, "ASUS U33Jc", ALC269_FIXUP_AMIC
),
9668 SND_PCI_QUIRK(0x1043, 0x1273, "ASUS UL80Jt", ALC269_FIXUP_AMIC
),
9669 SND_PCI_QUIRK(0x1043, 0x1283, "ASUS U53Jc", ALC269_FIXUP_AMIC
),
9670 SND_PCI_QUIRK(0x1043, 0x12b3, "ASUS N82JV", ALC269_FIXUP_AMIC
),
9671 SND_PCI_QUIRK(0x1043, 0x12d3, "ASUS N61Jv", ALC269_FIXUP_AMIC
),
9672 SND_PCI_QUIRK(0x1043, 0x13a3, "ASUS UL30Vt", ALC269_FIXUP_AMIC
),
9673 SND_PCI_QUIRK(0x1043, 0x1373, "ASUS G73JX", ALC269_FIXUP_AMIC
),
9674 SND_PCI_QUIRK(0x1043, 0x1383, "ASUS UJ30Jc", ALC269_FIXUP_AMIC
),
9675 SND_PCI_QUIRK(0x1043, 0x13d3, "ASUS N61JA", ALC269_FIXUP_AMIC
),
9676 SND_PCI_QUIRK(0x1043, 0x1413, "ASUS UL50", ALC269_FIXUP_AMIC
),
9677 SND_PCI_QUIRK(0x1043, 0x1443, "ASUS UL30", ALC269_FIXUP_AMIC
),
9678 SND_PCI_QUIRK(0x1043, 0x1453, "ASUS M60Jv", ALC269_FIXUP_AMIC
),
9679 SND_PCI_QUIRK(0x1043, 0x1483, "ASUS UL80", ALC269_FIXUP_AMIC
),
9680 SND_PCI_QUIRK(0x1043, 0x14f3, "ASUS F83Vf", ALC269_FIXUP_AMIC
),
9681 SND_PCI_QUIRK(0x1043, 0x14e3, "ASUS UL20", ALC269_FIXUP_AMIC
),
9682 SND_PCI_QUIRK(0x1043, 0x1513, "ASUS UX30", ALC269_FIXUP_AMIC
),
9683 SND_PCI_QUIRK(0x1043, 0x1593, "ASUS N51Vn", ALC269_FIXUP_AMIC
),
9684 SND_PCI_QUIRK(0x1043, 0x15a3, "ASUS N60Jv", ALC269_FIXUP_AMIC
),
9685 SND_PCI_QUIRK(0x1043, 0x15b3, "ASUS N60Dp", ALC269_FIXUP_AMIC
),
9686 SND_PCI_QUIRK(0x1043, 0x15c3, "ASUS N70De", ALC269_FIXUP_AMIC
),
9687 SND_PCI_QUIRK(0x1043, 0x15e3, "ASUS F83T", ALC269_FIXUP_AMIC
),
9688 SND_PCI_QUIRK(0x1043, 0x1643, "ASUS M60J", ALC269_FIXUP_AMIC
),
9689 SND_PCI_QUIRK(0x1043, 0x1653, "ASUS U50", ALC269_FIXUP_AMIC
),
9690 SND_PCI_QUIRK(0x1043, 0x1693, "ASUS F50N", ALC269_FIXUP_AMIC
),
9691 SND_PCI_QUIRK(0x1043, 0x16a3, "ASUS F5Q", ALC269_FIXUP_AMIC
),
9692 SND_PCI_QUIRK(0x1043, 0x1723, "ASUS P80", ALC269_FIXUP_AMIC
),
9693 SND_PCI_QUIRK(0x1043, 0x1743, "ASUS U80", ALC269_FIXUP_AMIC
),
9694 SND_PCI_QUIRK(0x1043, 0x1773, "ASUS U20A", ALC269_FIXUP_AMIC
),
9695 SND_PCI_QUIRK(0x1043, 0x1883, "ASUS F81Se", ALC269_FIXUP_AMIC
),
9696 SND_PCI_QUIRK(0x152d, 0x1778, "Quanta ON1", ALC269_FIXUP_DMIC
),
9697 SND_PCI_QUIRK(0x17aa, 0x3be9, "Quanta Wistron", ALC269_FIXUP_AMIC
),
9698 SND_PCI_QUIRK(0x17aa, 0x3bf8, "Quanta FL1", ALC269_FIXUP_AMIC
),
9699 SND_PCI_QUIRK(0x17ff, 0x059a, "Quanta EL3", ALC269_FIXUP_DMIC
),
9700 SND_PCI_QUIRK(0x17ff, 0x059b, "Quanta JR1", ALC269_FIXUP_DMIC
),
9705 static const struct snd_pci_quirk alc269_fixup_vendor_tbl
[] = {
9706 SND_PCI_QUIRK_VENDOR(0x1025, "Acer Aspire", ALC271_FIXUP_DMIC
),
9707 SND_PCI_QUIRK_VENDOR(0x103c, "HP", ALC269_FIXUP_HP_MUTE_LED
),
9708 SND_PCI_QUIRK_VENDOR(0x104d, "Sony VAIO", ALC269_FIXUP_SONY_VAIO
),
9709 SND_PCI_QUIRK_VENDOR(0x17aa, "Thinkpad", ALC269_FIXUP_THINKPAD_ACPI
),
9710 SND_PCI_QUIRK_VENDOR(0x19e5, "Huawei Matebook", ALC255_FIXUP_MIC_MUTE_LED
),
9714 static const struct hda_model_fixup alc269_fixup_models
[] = {
9715 {.id
= ALC269_FIXUP_AMIC
, .name
= "laptop-amic"},
9716 {.id
= ALC269_FIXUP_DMIC
, .name
= "laptop-dmic"},
9717 {.id
= ALC269_FIXUP_STEREO_DMIC
, .name
= "alc269-dmic"},
9718 {.id
= ALC271_FIXUP_DMIC
, .name
= "alc271-dmic"},
9719 {.id
= ALC269_FIXUP_INV_DMIC
, .name
= "inv-dmic"},
9720 {.id
= ALC269_FIXUP_HEADSET_MIC
, .name
= "headset-mic"},
9721 {.id
= ALC269_FIXUP_HEADSET_MODE
, .name
= "headset-mode"},
9722 {.id
= ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC
, .name
= "headset-mode-no-hp-mic"},
9723 {.id
= ALC269_FIXUP_LENOVO_DOCK
, .name
= "lenovo-dock"},
9724 {.id
= ALC269_FIXUP_LENOVO_DOCK_LIMIT_BOOST
, .name
= "lenovo-dock-limit-boost"},
9725 {.id
= ALC269_FIXUP_HP_GPIO_LED
, .name
= "hp-gpio-led"},
9726 {.id
= ALC269_FIXUP_HP_DOCK_GPIO_MIC1_LED
, .name
= "hp-dock-gpio-mic1-led"},
9727 {.id
= ALC269_FIXUP_DELL1_MIC_NO_PRESENCE
, .name
= "dell-headset-multi"},
9728 {.id
= ALC269_FIXUP_DELL2_MIC_NO_PRESENCE
, .name
= "dell-headset-dock"},
9729 {.id
= ALC269_FIXUP_DELL3_MIC_NO_PRESENCE
, .name
= "dell-headset3"},
9730 {.id
= ALC269_FIXUP_DELL4_MIC_NO_PRESENCE
, .name
= "dell-headset4"},
9731 {.id
= ALC283_FIXUP_CHROME_BOOK
, .name
= "alc283-dac-wcaps"},
9732 {.id
= ALC283_FIXUP_SENSE_COMBO_JACK
, .name
= "alc283-sense-combo"},
9733 {.id
= ALC292_FIXUP_TPT440_DOCK
, .name
= "tpt440-dock"},
9734 {.id
= ALC292_FIXUP_TPT440
, .name
= "tpt440"},
9735 {.id
= ALC292_FIXUP_TPT460
, .name
= "tpt460"},
9736 {.id
= ALC298_FIXUP_TPT470_DOCK_FIX
, .name
= "tpt470-dock-fix"},
9737 {.id
= ALC298_FIXUP_TPT470_DOCK
, .name
= "tpt470-dock"},
9738 {.id
= ALC233_FIXUP_LENOVO_MULTI_CODECS
, .name
= "dual-codecs"},
9739 {.id
= ALC700_FIXUP_INTEL_REFERENCE
, .name
= "alc700-ref"},
9740 {.id
= ALC269_FIXUP_SONY_VAIO
, .name
= "vaio"},
9741 {.id
= ALC269_FIXUP_DELL_M101Z
, .name
= "dell-m101z"},
9742 {.id
= ALC269_FIXUP_ASUS_G73JW
, .name
= "asus-g73jw"},
9743 {.id
= ALC269_FIXUP_LENOVO_EAPD
, .name
= "lenovo-eapd"},
9744 {.id
= ALC275_FIXUP_SONY_HWEQ
, .name
= "sony-hweq"},
9745 {.id
= ALC269_FIXUP_PCM_44K
, .name
= "pcm44k"},
9746 {.id
= ALC269_FIXUP_LIFEBOOK
, .name
= "lifebook"},
9747 {.id
= ALC269_FIXUP_LIFEBOOK_EXTMIC
, .name
= "lifebook-extmic"},
9748 {.id
= ALC269_FIXUP_LIFEBOOK_HP_PIN
, .name
= "lifebook-hp-pin"},
9749 {.id
= ALC255_FIXUP_LIFEBOOK_U7x7_HEADSET_MIC
, .name
= "lifebook-u7x7"},
9750 {.id
= ALC269VB_FIXUP_AMIC
, .name
= "alc269vb-amic"},
9751 {.id
= ALC269VB_FIXUP_DMIC
, .name
= "alc269vb-dmic"},
9752 {.id
= ALC269_FIXUP_HP_MUTE_LED_MIC1
, .name
= "hp-mute-led-mic1"},
9753 {.id
= ALC269_FIXUP_HP_MUTE_LED_MIC2
, .name
= "hp-mute-led-mic2"},
9754 {.id
= ALC269_FIXUP_HP_MUTE_LED_MIC3
, .name
= "hp-mute-led-mic3"},
9755 {.id
= ALC269_FIXUP_HP_GPIO_MIC1_LED
, .name
= "hp-gpio-mic1"},
9756 {.id
= ALC269_FIXUP_HP_LINE1_MIC1_LED
, .name
= "hp-line1-mic1"},
9757 {.id
= ALC269_FIXUP_NO_SHUTUP
, .name
= "noshutup"},
9758 {.id
= ALC286_FIXUP_SONY_MIC_NO_PRESENCE
, .name
= "sony-nomic"},
9759 {.id
= ALC269_FIXUP_ASPIRE_HEADSET_MIC
, .name
= "aspire-headset-mic"},
9760 {.id
= ALC269_FIXUP_ASUS_X101
, .name
= "asus-x101"},
9761 {.id
= ALC271_FIXUP_HP_GATE_MIC_JACK
, .name
= "acer-ao7xx"},
9762 {.id
= ALC271_FIXUP_HP_GATE_MIC_JACK_E1_572
, .name
= "acer-aspire-e1"},
9763 {.id
= ALC269_FIXUP_ACER_AC700
, .name
= "acer-ac700"},
9764 {.id
= ALC269_FIXUP_LIMIT_INT_MIC_BOOST
, .name
= "limit-mic-boost"},
9765 {.id
= ALC269VB_FIXUP_ASUS_ZENBOOK
, .name
= "asus-zenbook"},
9766 {.id
= ALC269VB_FIXUP_ASUS_ZENBOOK_UX31A
, .name
= "asus-zenbook-ux31a"},
9767 {.id
= ALC269VB_FIXUP_ORDISSIMO_EVE2
, .name
= "ordissimo"},
9768 {.id
= ALC282_FIXUP_ASUS_TX300
, .name
= "asus-tx300"},
9769 {.id
= ALC283_FIXUP_INT_MIC
, .name
= "alc283-int-mic"},
9770 {.id
= ALC290_FIXUP_MONO_SPEAKERS_HSJACK
, .name
= "mono-speakers"},
9771 {.id
= ALC290_FIXUP_SUBWOOFER_HSJACK
, .name
= "alc290-subwoofer"},
9772 {.id
= ALC269_FIXUP_THINKPAD_ACPI
, .name
= "thinkpad"},
9773 {.id
= ALC269_FIXUP_DMIC_THINKPAD_ACPI
, .name
= "dmic-thinkpad"},
9774 {.id
= ALC255_FIXUP_ACER_MIC_NO_PRESENCE
, .name
= "alc255-acer"},
9775 {.id
= ALC255_FIXUP_ASUS_MIC_NO_PRESENCE
, .name
= "alc255-asus"},
9776 {.id
= ALC255_FIXUP_DELL1_MIC_NO_PRESENCE
, .name
= "alc255-dell1"},
9777 {.id
= ALC255_FIXUP_DELL2_MIC_NO_PRESENCE
, .name
= "alc255-dell2"},
9778 {.id
= ALC293_FIXUP_DELL1_MIC_NO_PRESENCE
, .name
= "alc293-dell1"},
9779 {.id
= ALC283_FIXUP_HEADSET_MIC
, .name
= "alc283-headset"},
9780 {.id
= ALC255_FIXUP_MIC_MUTE_LED
, .name
= "alc255-dell-mute"},
9781 {.id
= ALC282_FIXUP_ASPIRE_V5_PINS
, .name
= "aspire-v5"},
9782 {.id
= ALC269VB_FIXUP_ASPIRE_E1_COEF
, .name
= "aspire-e1-coef"},
9783 {.id
= ALC280_FIXUP_HP_GPIO4
, .name
= "hp-gpio4"},
9784 {.id
= ALC286_FIXUP_HP_GPIO_LED
, .name
= "hp-gpio-led"},
9785 {.id
= ALC280_FIXUP_HP_GPIO2_MIC_HOTKEY
, .name
= "hp-gpio2-hotkey"},
9786 {.id
= ALC280_FIXUP_HP_DOCK_PINS
, .name
= "hp-dock-pins"},
9787 {.id
= ALC269_FIXUP_HP_DOCK_GPIO_MIC1_LED
, .name
= "hp-dock-gpio-mic"},
9788 {.id
= ALC280_FIXUP_HP_9480M
, .name
= "hp-9480m"},
9789 {.id
= ALC288_FIXUP_DELL_HEADSET_MODE
, .name
= "alc288-dell-headset"},
9790 {.id
= ALC288_FIXUP_DELL1_MIC_NO_PRESENCE
, .name
= "alc288-dell1"},
9791 {.id
= ALC288_FIXUP_DELL_XPS_13
, .name
= "alc288-dell-xps13"},
9792 {.id
= ALC292_FIXUP_DELL_E7X
, .name
= "dell-e7x"},
9793 {.id
= ALC293_FIXUP_DISABLE_AAMIX_MULTIJACK
, .name
= "alc293-dell"},
9794 {.id
= ALC298_FIXUP_DELL1_MIC_NO_PRESENCE
, .name
= "alc298-dell1"},
9795 {.id
= ALC298_FIXUP_DELL_AIO_MIC_NO_PRESENCE
, .name
= "alc298-dell-aio"},
9796 {.id
= ALC275_FIXUP_DELL_XPS
, .name
= "alc275-dell-xps"},
9797 {.id
= ALC293_FIXUP_LENOVO_SPK_NOISE
, .name
= "lenovo-spk-noise"},
9798 {.id
= ALC233_FIXUP_LENOVO_LINE2_MIC_HOTKEY
, .name
= "lenovo-hotkey"},
9799 {.id
= ALC255_FIXUP_DELL_SPK_NOISE
, .name
= "dell-spk-noise"},
9800 {.id
= ALC225_FIXUP_DELL1_MIC_NO_PRESENCE
, .name
= "alc225-dell1"},
9801 {.id
= ALC295_FIXUP_DISABLE_DAC3
, .name
= "alc295-disable-dac3"},
9802 {.id
= ALC285_FIXUP_SPEAKER2_TO_DAC1
, .name
= "alc285-speaker2-to-dac1"},
9803 {.id
= ALC280_FIXUP_HP_HEADSET_MIC
, .name
= "alc280-hp-headset"},
9804 {.id
= ALC221_FIXUP_HP_FRONT_MIC
, .name
= "alc221-hp-mic"},
9805 {.id
= ALC298_FIXUP_SPK_VOLUME
, .name
= "alc298-spk-volume"},
9806 {.id
= ALC256_FIXUP_DELL_INSPIRON_7559_SUBWOOFER
, .name
= "dell-inspiron-7559"},
9807 {.id
= ALC269_FIXUP_ATIV_BOOK_8
, .name
= "ativ-book"},
9808 {.id
= ALC221_FIXUP_HP_MIC_NO_PRESENCE
, .name
= "alc221-hp-mic"},
9809 {.id
= ALC256_FIXUP_ASUS_HEADSET_MODE
, .name
= "alc256-asus-headset"},
9810 {.id
= ALC256_FIXUP_ASUS_MIC
, .name
= "alc256-asus-mic"},
9811 {.id
= ALC256_FIXUP_ASUS_AIO_GPIO2
, .name
= "alc256-asus-aio"},
9812 {.id
= ALC233_FIXUP_ASUS_MIC_NO_PRESENCE
, .name
= "alc233-asus"},
9813 {.id
= ALC233_FIXUP_EAPD_COEF_AND_MIC_NO_PRESENCE
, .name
= "alc233-eapd"},
9814 {.id
= ALC294_FIXUP_LENOVO_MIC_LOCATION
, .name
= "alc294-lenovo-mic"},
9815 {.id
= ALC225_FIXUP_DELL_WYSE_MIC_NO_PRESENCE
, .name
= "alc225-wyse"},
9816 {.id
= ALC274_FIXUP_DELL_AIO_LINEOUT_VERB
, .name
= "alc274-dell-aio"},
9817 {.id
= ALC255_FIXUP_DUMMY_LINEOUT_VERB
, .name
= "alc255-dummy-lineout"},
9818 {.id
= ALC255_FIXUP_DELL_HEADSET_MIC
, .name
= "alc255-dell-headset"},
9819 {.id
= ALC295_FIXUP_HP_X360
, .name
= "alc295-hp-x360"},
9820 {.id
= ALC225_FIXUP_HEADSET_JACK
, .name
= "alc-headset-jack"},
9821 {.id
= ALC295_FIXUP_CHROME_BOOK
, .name
= "alc-chrome-book"},
9822 {.id
= ALC299_FIXUP_PREDATOR_SPK
, .name
= "predator-spk"},
9823 {.id
= ALC298_FIXUP_HUAWEI_MBX_STEREO
, .name
= "huawei-mbx-stereo"},
9824 {.id
= ALC256_FIXUP_MEDION_HEADSET_NO_PRESENCE
, .name
= "alc256-medion-headset"},
9825 {.id
= ALC298_FIXUP_SAMSUNG_AMP
, .name
= "alc298-samsung-amp"},
9826 {.id
= ALC256_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET
, .name
= "alc256-samsung-headphone"},
9827 {.id
= ALC255_FIXUP_XIAOMI_HEADSET_MIC
, .name
= "alc255-xiaomi-headset"},
9828 {.id
= ALC274_FIXUP_HP_MIC
, .name
= "alc274-hp-mic-detect"},
9829 {.id
= ALC245_FIXUP_HP_X360_AMP
, .name
= "alc245-hp-x360-amp"},
9830 {.id
= ALC295_FIXUP_HP_OMEN
, .name
= "alc295-hp-omen"},
9831 {.id
= ALC285_FIXUP_HP_SPECTRE_X360
, .name
= "alc285-hp-spectre-x360"},
9832 {.id
= ALC285_FIXUP_HP_SPECTRE_X360_EB1
, .name
= "alc285-hp-spectre-x360-eb1"},
9833 {.id
= ALC287_FIXUP_IDEAPAD_BASS_SPK_AMP
, .name
= "alc287-ideapad-bass-spk-amp"},
9834 {.id
= ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK_PIN
, .name
= "alc287-yoga9-bass-spk-pin"},
9835 {.id
= ALC623_FIXUP_LENOVO_THINKSTATION_P340
, .name
= "alc623-lenovo-thinkstation-p340"},
9836 {.id
= ALC255_FIXUP_ACER_HEADPHONE_AND_MIC
, .name
= "alc255-acer-headphone-and-mic"},
9837 {.id
= ALC285_FIXUP_HP_GPIO_AMP_INIT
, .name
= "alc285-hp-amp-init"},
9840 #define ALC225_STANDARD_PINS \
9843 #define ALC256_STANDARD_PINS \
9844 {0x12, 0x90a60140}, \
9845 {0x14, 0x90170110}, \
9848 #define ALC282_STANDARD_PINS \
9851 #define ALC290_STANDARD_PINS \
9854 #define ALC292_STANDARD_PINS \
9855 {0x14, 0x90170110}, \
9858 #define ALC295_STANDARD_PINS \
9859 {0x12, 0xb7a60130}, \
9860 {0x14, 0x90170110}, \
9863 #define ALC298_STANDARD_PINS \
9864 {0x12, 0x90a60130}, \
9867 static const struct snd_hda_pin_quirk alc269_pin_fixup_tbl
[] = {
9868 SND_HDA_PIN_QUIRK(0x10ec0221, 0x103c, "HP Workstation", ALC221_FIXUP_HP_HEADSET_MIC
,
9873 {0x21, 0x0221102f}),
9874 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1025, "Acer", ALC255_FIXUP_ACER_MIC_NO_PRESENCE
,
9877 {0x21, 0x02211030}),
9878 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1043, "ASUS", ALC255_FIXUP_ASUS_MIC_NO_PRESENCE
,
9881 {0x21, 0x03211020}),
9882 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1043, "ASUS", ALC255_FIXUP_ASUS_MIC_NO_PRESENCE
,
9885 {0x21, 0x03211020}),
9886 SND_HDA_PIN_QUIRK(0x10ec0225, 0x1028, "Dell", ALC225_FIXUP_DELL1_MIC_NO_PRESENCE
,
9887 ALC225_STANDARD_PINS
,
9889 {0x14, 0x901701a0}),
9890 SND_HDA_PIN_QUIRK(0x10ec0225, 0x1028, "Dell", ALC225_FIXUP_DELL1_MIC_NO_PRESENCE
,
9891 ALC225_STANDARD_PINS
,
9893 {0x14, 0x901701b0}),
9894 SND_HDA_PIN_QUIRK(0x10ec0225, 0x1028, "Dell", ALC225_FIXUP_DELL1_MIC_NO_PRESENCE
,
9895 ALC225_STANDARD_PINS
,
9897 {0x14, 0x901701a0}),
9898 SND_HDA_PIN_QUIRK(0x10ec0225, 0x1028, "Dell", ALC225_FIXUP_DELL1_MIC_NO_PRESENCE
,
9899 ALC225_STANDARD_PINS
,
9901 {0x14, 0x901701b0}),
9902 SND_HDA_PIN_QUIRK(0x10ec0225, 0x1028, "Dell", ALC225_FIXUP_DELL1_MIC_NO_PRESENCE
,
9903 ALC225_STANDARD_PINS
,
9905 {0x1b, 0x90170110}),
9906 SND_HDA_PIN_QUIRK(0x10ec0233, 0x8086, "Intel NUC Skull Canyon", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE
,
9909 {0x21, 0x02211020}),
9910 SND_HDA_PIN_QUIRK(0x10ec0235, 0x17aa, "Lenovo", ALC233_FIXUP_LENOVO_LINE2_MIC_HOTKEY
,
9914 {0x21, 0x02211020}),
9915 SND_HDA_PIN_QUIRK(0x10ec0235, 0x17aa, "Lenovo", ALC294_FIXUP_LENOVO_MIC_LOCATION
,
9920 {0x21, 0x0221101f}),
9921 SND_HDA_PIN_QUIRK(0x10ec0235, 0x17aa, "Lenovo", ALC294_FIXUP_LENOVO_MIC_LOCATION
,
9926 {0x21, 0x0221101f}),
9927 SND_HDA_PIN_QUIRK(0x10ec0235, 0x17aa, "Lenovo", ALC294_FIXUP_LENOVO_MIC_LOCATION
,
9931 {0x21, 0x0221101f}),
9932 SND_HDA_PIN_QUIRK(0x10ec0236, 0x1028, "Dell", ALC236_FIXUP_DELL_AIO_HEADSET_MIC
,
9933 {0x21, 0x02211010}),
9934 SND_HDA_PIN_QUIRK(0x10ec0236, 0x103c, "HP", ALC256_FIXUP_HP_HEADSET_MIC
,
9937 {0x21, 0x02211030}),
9938 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL2_MIC_NO_PRESENCE
,
9940 {0x21, 0x02211020}),
9941 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE
,
9943 {0x21, 0x02211040}),
9944 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE
,
9947 {0x21, 0x02211020}),
9948 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE
,
9951 {0x21, 0x02211030}),
9952 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE
,
9955 {0x21, 0x0221101f}),
9956 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE
,
9959 {0x21, 0x0221101f}),
9960 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE
,
9963 {0x21, 0x0221103f}),
9964 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE
,
9967 {0x21, 0x0221103f}),
9968 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE
,
9971 {0x21, 0x0221103f}),
9972 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE
,
9975 {0x21, 0x0221105f}),
9976 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE
,
9979 {0x21, 0x0221101f}),
9980 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE
,
9984 {0x21, 0x0321102f}),
9985 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE
,
9988 {0x21, 0x02211040}),
9989 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE
,
9992 {0x21, 0x02211050}),
9993 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE
,
9996 {0x21, 0x02211030}),
9997 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE
,
10000 {0x21, 0x02211040}),
10001 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE
,
10002 {0x12, 0x90a60170},
10003 {0x14, 0x90171130},
10004 {0x21, 0x02211040}),
10005 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE
,
10006 {0x12, 0x90a60170},
10007 {0x14, 0x90170140},
10008 {0x21, 0x02211050}),
10009 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell Inspiron 5548", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE
,
10010 {0x12, 0x90a60180},
10011 {0x14, 0x90170130},
10012 {0x21, 0x02211040}),
10013 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell Inspiron 5565", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE
,
10014 {0x12, 0x90a60180},
10015 {0x14, 0x90170120},
10016 {0x21, 0x02211030}),
10017 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE
,
10018 {0x1b, 0x01011020},
10019 {0x21, 0x02211010}),
10020 SND_HDA_PIN_QUIRK(0x10ec0256, 0x1043, "ASUS", ALC256_FIXUP_ASUS_MIC
,
10021 {0x14, 0x90170110},
10022 {0x1b, 0x90a70130},
10023 {0x21, 0x04211020}),
10024 SND_HDA_PIN_QUIRK(0x10ec0256, 0x1043, "ASUS", ALC256_FIXUP_ASUS_MIC
,
10025 {0x14, 0x90170110},
10026 {0x1b, 0x90a70130},
10027 {0x21, 0x03211020}),
10028 SND_HDA_PIN_QUIRK(0x10ec0256, 0x1043, "ASUS", ALC256_FIXUP_ASUS_MIC_NO_PRESENCE
,
10029 {0x12, 0x90a60130},
10030 {0x14, 0x90170110},
10031 {0x21, 0x03211020}),
10032 SND_HDA_PIN_QUIRK(0x10ec0256, 0x1043, "ASUS", ALC256_FIXUP_ASUS_MIC_NO_PRESENCE
,
10033 {0x12, 0x90a60130},
10034 {0x14, 0x90170110},
10035 {0x21, 0x04211020}),
10036 SND_HDA_PIN_QUIRK(0x10ec0256, 0x1043, "ASUS", ALC256_FIXUP_ASUS_MIC_NO_PRESENCE
,
10037 {0x1a, 0x90a70130},
10038 {0x1b, 0x90170110},
10039 {0x21, 0x03211020}),
10040 SND_HDA_PIN_QUIRK(0x10ec0256, 0x103c, "HP", ALC256_FIXUP_HP_HEADSET_MIC
,
10041 {0x14, 0x90170110},
10042 {0x19, 0x02a11020},
10043 {0x21, 0x0221101f}),
10044 SND_HDA_PIN_QUIRK(0x10ec0274, 0x103c, "HP", ALC274_FIXUP_HP_HEADSET_MIC
,
10045 {0x17, 0x90170110},
10046 {0x19, 0x03a11030},
10047 {0x21, 0x03211020}),
10048 SND_HDA_PIN_QUIRK(0x10ec0280, 0x103c, "HP", ALC280_FIXUP_HP_GPIO4
,
10049 {0x12, 0x90a60130},
10050 {0x14, 0x90170110},
10051 {0x15, 0x0421101f},
10052 {0x1a, 0x04a11020}),
10053 SND_HDA_PIN_QUIRK(0x10ec0280, 0x103c, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED
,
10054 {0x12, 0x90a60140},
10055 {0x14, 0x90170110},
10056 {0x15, 0x0421101f},
10057 {0x18, 0x02811030},
10058 {0x1a, 0x04a1103f},
10059 {0x1b, 0x02011020}),
10060 SND_HDA_PIN_QUIRK(0x10ec0282, 0x103c, "HP 15 Touchsmart", ALC269_FIXUP_HP_MUTE_LED_MIC1
,
10061 ALC282_STANDARD_PINS
,
10062 {0x12, 0x99a30130},
10063 {0x19, 0x03a11020},
10064 {0x21, 0x0321101f}),
10065 SND_HDA_PIN_QUIRK(0x10ec0282, 0x103c, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1
,
10066 ALC282_STANDARD_PINS
,
10067 {0x12, 0x99a30130},
10068 {0x19, 0x03a11020},
10069 {0x21, 0x03211040}),
10070 SND_HDA_PIN_QUIRK(0x10ec0282, 0x103c, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1
,
10071 ALC282_STANDARD_PINS
,
10072 {0x12, 0x99a30130},
10073 {0x19, 0x03a11030},
10074 {0x21, 0x03211020}),
10075 SND_HDA_PIN_QUIRK(0x10ec0282, 0x103c, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1
,
10076 ALC282_STANDARD_PINS
,
10077 {0x12, 0x99a30130},
10078 {0x19, 0x04a11020},
10079 {0x21, 0x0421101f}),
10080 SND_HDA_PIN_QUIRK(0x10ec0282, 0x103c, "HP", ALC269_FIXUP_HP_LINE1_MIC1_LED
,
10081 ALC282_STANDARD_PINS
,
10082 {0x12, 0x90a60140},
10083 {0x19, 0x04a11030},
10084 {0x21, 0x04211020}),
10085 SND_HDA_PIN_QUIRK(0x10ec0282, 0x1025, "Acer", ALC282_FIXUP_ACER_DISABLE_LINEOUT
,
10086 ALC282_STANDARD_PINS
,
10087 {0x12, 0x90a609c0},
10088 {0x18, 0x03a11830},
10089 {0x19, 0x04a19831},
10090 {0x1a, 0x0481303f},
10091 {0x1b, 0x04211020},
10092 {0x21, 0x0321101f}),
10093 SND_HDA_PIN_QUIRK(0x10ec0282, 0x1025, "Acer", ALC282_FIXUP_ACER_DISABLE_LINEOUT
,
10094 ALC282_STANDARD_PINS
,
10095 {0x12, 0x90a60940},
10096 {0x18, 0x03a11830},
10097 {0x19, 0x04a19831},
10098 {0x1a, 0x0481303f},
10099 {0x1b, 0x04211020},
10100 {0x21, 0x0321101f}),
10101 SND_HDA_PIN_QUIRK(0x10ec0283, 0x1028, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE
,
10102 ALC282_STANDARD_PINS
,
10103 {0x12, 0x90a60130},
10104 {0x21, 0x0321101f}),
10105 SND_HDA_PIN_QUIRK(0x10ec0283, 0x1028, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE
,
10106 {0x12, 0x90a60160},
10107 {0x14, 0x90170120},
10108 {0x21, 0x02211030}),
10109 SND_HDA_PIN_QUIRK(0x10ec0283, 0x1028, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE
,
10110 ALC282_STANDARD_PINS
,
10111 {0x12, 0x90a60130},
10112 {0x19, 0x03a11020},
10113 {0x21, 0x0321101f}),
10114 SND_HDA_PIN_QUIRK(0x10ec0285, 0x17aa, "Lenovo", ALC285_FIXUP_LENOVO_PC_BEEP_IN_NOISE
,
10115 {0x12, 0x90a60130},
10116 {0x14, 0x90170110},
10117 {0x19, 0x04a11040},
10118 {0x21, 0x04211020}),
10119 SND_HDA_PIN_QUIRK(0x10ec0285, 0x17aa, "Lenovo", ALC285_FIXUP_LENOVO_PC_BEEP_IN_NOISE
,
10120 {0x14, 0x90170110},
10121 {0x19, 0x04a11040},
10122 {0x1d, 0x40600001},
10123 {0x21, 0x04211020}),
10124 SND_HDA_PIN_QUIRK(0x10ec0285, 0x17aa, "Lenovo", ALC285_FIXUP_THINKPAD_NO_BASS_SPK_HEADSET_JACK
,
10125 {0x14, 0x90170110},
10126 {0x19, 0x04a11040},
10127 {0x21, 0x04211020}),
10128 SND_HDA_PIN_QUIRK(0x10ec0287, 0x17aa, "Lenovo", ALC285_FIXUP_THINKPAD_HEADSET_JACK
,
10129 {0x14, 0x90170110},
10130 {0x17, 0x90170111},
10131 {0x19, 0x03a11030},
10132 {0x21, 0x03211020}),
10133 SND_HDA_PIN_QUIRK(0x10ec0286, 0x1025, "Acer", ALC286_FIXUP_ACER_AIO_MIC_NO_PRESENCE
,
10134 {0x12, 0x90a60130},
10135 {0x17, 0x90170110},
10136 {0x21, 0x02211020}),
10137 SND_HDA_PIN_QUIRK(0x10ec0288, 0x1028, "Dell", ALC288_FIXUP_DELL1_MIC_NO_PRESENCE
,
10138 {0x12, 0x90a60120},
10139 {0x14, 0x90170110},
10140 {0x21, 0x0321101f}),
10141 SND_HDA_PIN_QUIRK(0x10ec0290, 0x103c, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1
,
10142 ALC290_STANDARD_PINS
,
10143 {0x15, 0x04211040},
10144 {0x18, 0x90170112},
10145 {0x1a, 0x04a11020}),
10146 SND_HDA_PIN_QUIRK(0x10ec0290, 0x103c, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1
,
10147 ALC290_STANDARD_PINS
,
10148 {0x15, 0x04211040},
10149 {0x18, 0x90170110},
10150 {0x1a, 0x04a11020}),
10151 SND_HDA_PIN_QUIRK(0x10ec0290, 0x103c, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1
,
10152 ALC290_STANDARD_PINS
,
10153 {0x15, 0x0421101f},
10154 {0x1a, 0x04a11020}),
10155 SND_HDA_PIN_QUIRK(0x10ec0290, 0x103c, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1
,
10156 ALC290_STANDARD_PINS
,
10157 {0x15, 0x04211020},
10158 {0x1a, 0x04a11040}),
10159 SND_HDA_PIN_QUIRK(0x10ec0290, 0x103c, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1
,
10160 ALC290_STANDARD_PINS
,
10161 {0x14, 0x90170110},
10162 {0x15, 0x04211020},
10163 {0x1a, 0x04a11040}),
10164 SND_HDA_PIN_QUIRK(0x10ec0290, 0x103c, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1
,
10165 ALC290_STANDARD_PINS
,
10166 {0x14, 0x90170110},
10167 {0x15, 0x04211020},
10168 {0x1a, 0x04a11020}),
10169 SND_HDA_PIN_QUIRK(0x10ec0290, 0x103c, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1
,
10170 ALC290_STANDARD_PINS
,
10171 {0x14, 0x90170110},
10172 {0x15, 0x0421101f},
10173 {0x1a, 0x04a11020}),
10174 SND_HDA_PIN_QUIRK(0x10ec0292, 0x1028, "Dell", ALC269_FIXUP_DELL2_MIC_NO_PRESENCE
,
10175 ALC292_STANDARD_PINS
,
10176 {0x12, 0x90a60140},
10177 {0x16, 0x01014020},
10178 {0x19, 0x01a19030}),
10179 SND_HDA_PIN_QUIRK(0x10ec0292, 0x1028, "Dell", ALC269_FIXUP_DELL2_MIC_NO_PRESENCE
,
10180 ALC292_STANDARD_PINS
,
10181 {0x12, 0x90a60140},
10182 {0x16, 0x01014020},
10183 {0x18, 0x02a19031},
10184 {0x19, 0x01a1903e}),
10185 SND_HDA_PIN_QUIRK(0x10ec0292, 0x1028, "Dell", ALC269_FIXUP_DELL3_MIC_NO_PRESENCE
,
10186 ALC292_STANDARD_PINS
,
10187 {0x12, 0x90a60140}),
10188 SND_HDA_PIN_QUIRK(0x10ec0293, 0x1028, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE
,
10189 ALC292_STANDARD_PINS
,
10190 {0x13, 0x90a60140},
10191 {0x16, 0x21014020},
10192 {0x19, 0x21a19030}),
10193 SND_HDA_PIN_QUIRK(0x10ec0293, 0x1028, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE
,
10194 ALC292_STANDARD_PINS
,
10195 {0x13, 0x90a60140}),
10196 SND_HDA_PIN_QUIRK(0x10ec0294, 0x1043, "ASUS", ALC294_FIXUP_ASUS_HPE
,
10197 {0x17, 0x90170110},
10198 {0x21, 0x04211020}),
10199 SND_HDA_PIN_QUIRK(0x10ec0294, 0x1043, "ASUS", ALC294_FIXUP_ASUS_MIC
,
10200 {0x14, 0x90170110},
10201 {0x1b, 0x90a70130},
10202 {0x21, 0x04211020}),
10203 SND_HDA_PIN_QUIRK(0x10ec0294, 0x1043, "ASUS", ALC294_FIXUP_ASUS_SPK
,
10204 {0x12, 0x90a60130},
10205 {0x17, 0x90170110},
10206 {0x21, 0x03211020}),
10207 SND_HDA_PIN_QUIRK(0x10ec0294, 0x1043, "ASUS", ALC294_FIXUP_ASUS_SPK
,
10208 {0x12, 0x90a60130},
10209 {0x17, 0x90170110},
10210 {0x21, 0x04211020}),
10211 SND_HDA_PIN_QUIRK(0x10ec0295, 0x1043, "ASUS", ALC294_FIXUP_ASUS_SPK
,
10212 {0x12, 0x90a60130},
10213 {0x17, 0x90170110},
10214 {0x21, 0x03211020}),
10215 SND_HDA_PIN_QUIRK(0x10ec0295, 0x1043, "ASUS", ALC295_FIXUP_ASUS_MIC_NO_PRESENCE
,
10216 {0x12, 0x90a60120},
10217 {0x17, 0x90170110},
10218 {0x21, 0x04211030}),
10219 SND_HDA_PIN_QUIRK(0x10ec0295, 0x1043, "ASUS", ALC295_FIXUP_ASUS_MIC_NO_PRESENCE
,
10220 {0x12, 0x90a60130},
10221 {0x17, 0x90170110},
10222 {0x21, 0x03211020}),
10223 SND_HDA_PIN_QUIRK(0x10ec0295, 0x1043, "ASUS", ALC295_FIXUP_ASUS_MIC_NO_PRESENCE
,
10224 {0x12, 0x90a60130},
10225 {0x17, 0x90170110},
10226 {0x21, 0x03211020}),
10227 SND_HDA_PIN_QUIRK(0x10ec0295, 0x1028, "Dell", ALC269_FIXUP_DELL4_MIC_NO_PRESENCE
,
10228 {0x14, 0x90170110},
10229 {0x21, 0x04211020}),
10230 SND_HDA_PIN_QUIRK(0x10ec0295, 0x1028, "Dell", ALC269_FIXUP_DELL4_MIC_NO_PRESENCE
,
10231 {0x14, 0x90170110},
10232 {0x21, 0x04211030}),
10233 SND_HDA_PIN_QUIRK(0x10ec0295, 0x1028, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE
,
10234 ALC295_STANDARD_PINS
,
10235 {0x17, 0x21014020},
10236 {0x18, 0x21a19030}),
10237 SND_HDA_PIN_QUIRK(0x10ec0295, 0x1028, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE
,
10238 ALC295_STANDARD_PINS
,
10239 {0x17, 0x21014040},
10240 {0x18, 0x21a19050}),
10241 SND_HDA_PIN_QUIRK(0x10ec0295, 0x1028, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE
,
10242 ALC295_STANDARD_PINS
),
10243 SND_HDA_PIN_QUIRK(0x10ec0298, 0x1028, "Dell", ALC298_FIXUP_DELL1_MIC_NO_PRESENCE
,
10244 ALC298_STANDARD_PINS
,
10245 {0x17, 0x90170110}),
10246 SND_HDA_PIN_QUIRK(0x10ec0298, 0x1028, "Dell", ALC298_FIXUP_DELL1_MIC_NO_PRESENCE
,
10247 ALC298_STANDARD_PINS
,
10248 {0x17, 0x90170140}),
10249 SND_HDA_PIN_QUIRK(0x10ec0298, 0x1028, "Dell", ALC298_FIXUP_DELL1_MIC_NO_PRESENCE
,
10250 ALC298_STANDARD_PINS
,
10251 {0x17, 0x90170150}),
10252 SND_HDA_PIN_QUIRK(0x10ec0298, 0x1028, "Dell", ALC298_FIXUP_SPK_VOLUME
,
10253 {0x12, 0xb7a60140},
10254 {0x13, 0xb7a60150},
10255 {0x17, 0x90170110},
10256 {0x1a, 0x03011020},
10257 {0x21, 0x03211030}),
10258 SND_HDA_PIN_QUIRK(0x10ec0298, 0x1028, "Dell", ALC298_FIXUP_ALIENWARE_MIC_NO_PRESENCE
,
10259 {0x12, 0xb7a60140},
10260 {0x17, 0x90170110},
10261 {0x1a, 0x03a11030},
10262 {0x21, 0x03211020}),
10263 SND_HDA_PIN_QUIRK(0x10ec0299, 0x1028, "Dell", ALC269_FIXUP_DELL4_MIC_NO_PRESENCE
,
10264 ALC225_STANDARD_PINS
,
10265 {0x12, 0xb7a60130},
10266 {0x17, 0x90170110}),
10267 SND_HDA_PIN_QUIRK(0x10ec0623, 0x17aa, "Lenovo", ALC283_FIXUP_HEADSET_MIC
,
10268 {0x14, 0x01014010},
10269 {0x17, 0x90170120},
10270 {0x18, 0x02a11030},
10271 {0x19, 0x02a1103f},
10272 {0x21, 0x0221101f}),
10276 /* This is the fallback pin_fixup_tbl for alc269 family, to make the tbl match
10277 * more machines, don't need to match all valid pins, just need to match
10278 * all the pins defined in the tbl. Just because of this reason, it is possible
10279 * that a single machine matches multiple tbls, so there is one limitation:
10280 * at most one tbl is allowed to define for the same vendor and same codec
10282 static const struct snd_hda_pin_quirk alc269_fallback_pin_fixup_tbl
[] = {
10283 SND_HDA_PIN_QUIRK(0x10ec0289, 0x1028, "Dell", ALC269_FIXUP_DELL4_MIC_NO_PRESENCE
,
10284 {0x19, 0x40000000},
10285 {0x1b, 0x40000000}),
10286 SND_HDA_PIN_QUIRK(0x10ec0256, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE
,
10287 {0x19, 0x40000000},
10288 {0x1a, 0x40000000}),
10289 SND_HDA_PIN_QUIRK(0x10ec0236, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE
,
10290 {0x19, 0x40000000},
10291 {0x1a, 0x40000000}),
10292 SND_HDA_PIN_QUIRK(0x10ec0274, 0x1028, "Dell", ALC274_FIXUP_DELL_AIO_LINEOUT_VERB
,
10293 {0x19, 0x40000000},
10294 {0x1a, 0x40000000}),
10298 static void alc269_fill_coef(struct hda_codec
*codec
)
10300 struct alc_spec
*spec
= codec
->spec
;
10303 if (spec
->codec_variant
!= ALC269_TYPE_ALC269VB
)
10306 if ((alc_get_coef0(codec
) & 0x00ff) < 0x015) {
10307 alc_write_coef_idx(codec
, 0xf, 0x960b);
10308 alc_write_coef_idx(codec
, 0xe, 0x8817);
10311 if ((alc_get_coef0(codec
) & 0x00ff) == 0x016) {
10312 alc_write_coef_idx(codec
, 0xf, 0x960b);
10313 alc_write_coef_idx(codec
, 0xe, 0x8814);
10316 if ((alc_get_coef0(codec
) & 0x00ff) == 0x017) {
10317 /* Power up output pin */
10318 alc_update_coef_idx(codec
, 0x04, 0, 1<<11);
10321 if ((alc_get_coef0(codec
) & 0x00ff) == 0x018) {
10322 val
= alc_read_coef_idx(codec
, 0xd);
10323 if (val
!= -1 && (val
& 0x0c00) >> 10 != 0x1) {
10324 /* Capless ramp up clock control */
10325 alc_write_coef_idx(codec
, 0xd, val
| (1<<10));
10327 val
= alc_read_coef_idx(codec
, 0x17);
10328 if (val
!= -1 && (val
& 0x01c0) >> 6 != 0x4) {
10329 /* Class D power on reset */
10330 alc_write_coef_idx(codec
, 0x17, val
| (1<<7));
10335 alc_update_coef_idx(codec
, 0x4, 0, 1<<11);
10340 static int patch_alc269(struct hda_codec
*codec
)
10342 struct alc_spec
*spec
;
10345 err
= alc_alloc_spec(codec
, 0x0b);
10349 spec
= codec
->spec
;
10350 spec
->gen
.shared_mic_vref_pin
= 0x18;
10351 codec
->power_save_node
= 0;
10354 codec
->patch_ops
.suspend
= alc269_suspend
;
10355 codec
->patch_ops
.resume
= alc269_resume
;
10357 spec
->shutup
= alc_default_shutup
;
10358 spec
->init_hook
= alc_default_init
;
10360 switch (codec
->core
.vendor_id
) {
10362 spec
->codec_variant
= ALC269_TYPE_ALC269VA
;
10363 switch (alc_get_coef0(codec
) & 0x00f0) {
10365 if (codec
->bus
->pci
&&
10366 codec
->bus
->pci
->subsystem_vendor
== 0x1025 &&
10367 spec
->cdefine
.platform_type
== 1)
10368 err
= alc_codec_rename(codec
, "ALC271X");
10369 spec
->codec_variant
= ALC269_TYPE_ALC269VB
;
10372 if (codec
->bus
->pci
&&
10373 codec
->bus
->pci
->subsystem_vendor
== 0x17aa &&
10374 codec
->bus
->pci
->subsystem_device
== 0x21f3)
10375 err
= alc_codec_rename(codec
, "ALC3202");
10376 spec
->codec_variant
= ALC269_TYPE_ALC269VC
;
10379 spec
->codec_variant
= ALC269_TYPE_ALC269VD
;
10382 alc_fix_pll_init(codec
, 0x20, 0x04, 15);
10386 spec
->shutup
= alc269_shutup
;
10387 spec
->init_hook
= alc269_fill_coef
;
10388 alc269_fill_coef(codec
);
10393 spec
->codec_variant
= ALC269_TYPE_ALC280
;
10396 spec
->codec_variant
= ALC269_TYPE_ALC282
;
10397 spec
->shutup
= alc282_shutup
;
10398 spec
->init_hook
= alc282_init
;
10402 spec
->codec_variant
= ALC269_TYPE_ALC283
;
10403 spec
->shutup
= alc283_shutup
;
10404 spec
->init_hook
= alc283_init
;
10408 spec
->codec_variant
= ALC269_TYPE_ALC284
;
10411 spec
->codec_variant
= ALC269_TYPE_ALC293
;
10415 spec
->codec_variant
= ALC269_TYPE_ALC286
;
10418 spec
->codec_variant
= ALC269_TYPE_ALC298
;
10422 spec
->codec_variant
= ALC269_TYPE_ALC255
;
10423 spec
->shutup
= alc256_shutup
;
10424 spec
->init_hook
= alc256_init
;
10430 spec
->codec_variant
= ALC269_TYPE_ALC256
;
10431 spec
->shutup
= alc256_shutup
;
10432 spec
->init_hook
= alc256_init
;
10433 spec
->gen
.mixer_nid
= 0; /* ALC256 does not have any loopback mixer path */
10436 spec
->codec_variant
= ALC269_TYPE_ALC257
;
10437 spec
->shutup
= alc256_shutup
;
10438 spec
->init_hook
= alc256_init
;
10439 spec
->gen
.mixer_nid
= 0;
10445 if (alc_get_coef0(codec
) & 0x0010)
10446 spec
->codec_variant
= ALC269_TYPE_ALC245
;
10448 spec
->codec_variant
= ALC269_TYPE_ALC215
;
10449 spec
->shutup
= alc225_shutup
;
10450 spec
->init_hook
= alc225_init
;
10451 spec
->gen
.mixer_nid
= 0;
10456 spec
->codec_variant
= ALC269_TYPE_ALC225
;
10457 spec
->shutup
= alc225_shutup
;
10458 spec
->init_hook
= alc225_init
;
10459 spec
->gen
.mixer_nid
= 0; /* no loopback on ALC225, ALC295 and ALC299 */
10462 spec
->codec_variant
= ALC269_TYPE_ALC287
;
10463 spec
->shutup
= alc225_shutup
;
10464 spec
->init_hook
= alc225_init
;
10465 spec
->gen
.mixer_nid
= 0; /* no loopback on ALC287 */
10470 spec
->codec_variant
= ALC269_TYPE_ALC294
;
10471 spec
->gen
.mixer_nid
= 0; /* ALC2x4 does not have any loopback mixer path */
10472 alc_update_coef_idx(codec
, 0x6b, 0x0018, (1<<4) | (1<<3)); /* UAJ MIC Vref control by verb */
10473 spec
->init_hook
= alc294_init
;
10476 spec
->codec_variant
= ALC269_TYPE_ALC300
;
10477 spec
->gen
.mixer_nid
= 0; /* no loopback on ALC300 */
10480 spec
->codec_variant
= ALC269_TYPE_ALC623
;
10486 spec
->codec_variant
= ALC269_TYPE_ALC700
;
10487 spec
->gen
.mixer_nid
= 0; /* ALC700 does not have any loopback mixer path */
10488 alc_update_coef_idx(codec
, 0x4a, 1 << 15, 0); /* Combo jack auto trigger control */
10489 spec
->init_hook
= alc294_init
;
10494 if (snd_hda_codec_read(codec
, 0x51, 0, AC_VERB_PARAMETERS
, 0) == 0x10ec5505) {
10495 spec
->has_alc5505_dsp
= 1;
10496 spec
->init_hook
= alc5505_dsp_init
;
10499 alc_pre_init(codec
);
10501 snd_hda_pick_fixup(codec
, alc269_fixup_models
,
10502 alc269_fixup_tbl
, alc269_fixups
);
10503 /* FIXME: both TX300 and ROG Strix G17 have the same SSID, and
10504 * the quirk breaks the latter (bko#214101).
10505 * Clear the wrong entry.
10507 if (codec
->fixup_id
== ALC282_FIXUP_ASUS_TX300
&&
10508 codec
->core
.vendor_id
== 0x10ec0294) {
10509 codec_dbg(codec
, "Clear wrong fixup for ASUS ROG Strix G17\n");
10510 codec
->fixup_id
= HDA_FIXUP_ID_NOT_SET
;
10513 snd_hda_pick_pin_fixup(codec
, alc269_pin_fixup_tbl
, alc269_fixups
, true);
10514 snd_hda_pick_pin_fixup(codec
, alc269_fallback_pin_fixup_tbl
, alc269_fixups
, false);
10515 snd_hda_pick_fixup(codec
, NULL
, alc269_fixup_vendor_tbl
,
10517 snd_hda_apply_fixup(codec
, HDA_FIXUP_ACT_PRE_PROBE
);
10519 alc_auto_parse_customize_define(codec
);
10521 if (has_cdefine_beep(codec
))
10522 spec
->gen
.beep_nid
= 0x01;
10524 /* automatic parse from the BIOS config */
10525 err
= alc269_parse_auto_config(codec
);
10529 if (!spec
->gen
.no_analog
&& spec
->gen
.beep_nid
&& spec
->gen
.mixer_nid
) {
10530 err
= set_beep_amp(spec
, spec
->gen
.mixer_nid
, 0x04, HDA_INPUT
);
10535 snd_hda_apply_fixup(codec
, HDA_FIXUP_ACT_PROBE
);
10548 static int alc861_parse_auto_config(struct hda_codec
*codec
)
10550 static const hda_nid_t alc861_ignore
[] = { 0x1d, 0 };
10551 static const hda_nid_t alc861_ssids
[] = { 0x0e, 0x0f, 0x0b, 0 };
10552 return alc_parse_auto_config(codec
, alc861_ignore
, alc861_ssids
);
10555 /* Pin config fixes */
10557 ALC861_FIXUP_FSC_AMILO_PI1505
,
10558 ALC861_FIXUP_AMP_VREF_0F
,
10559 ALC861_FIXUP_NO_JACK_DETECT
,
10560 ALC861_FIXUP_ASUS_A6RP
,
10561 ALC660_FIXUP_ASUS_W7J
,
10564 /* On some laptops, VREF of pin 0x0f is abused for controlling the main amp */
10565 static void alc861_fixup_asus_amp_vref_0f(struct hda_codec
*codec
,
10566 const struct hda_fixup
*fix
, int action
)
10568 struct alc_spec
*spec
= codec
->spec
;
10571 if (action
!= HDA_FIXUP_ACT_INIT
)
10573 val
= snd_hda_codec_get_pin_target(codec
, 0x0f);
10574 if (!(val
& (AC_PINCTL_IN_EN
| AC_PINCTL_OUT_EN
)))
10575 val
|= AC_PINCTL_IN_EN
;
10576 val
|= AC_PINCTL_VREF_50
;
10577 snd_hda_set_pin_ctl(codec
, 0x0f, val
);
10578 spec
->gen
.keep_vref_in_automute
= 1;
10581 /* suppress the jack-detection */
10582 static void alc_fixup_no_jack_detect(struct hda_codec
*codec
,
10583 const struct hda_fixup
*fix
, int action
)
10585 if (action
== HDA_FIXUP_ACT_PRE_PROBE
)
10586 codec
->no_jack_detect
= 1;
10589 static const struct hda_fixup alc861_fixups
[] = {
10590 [ALC861_FIXUP_FSC_AMILO_PI1505
] = {
10591 .type
= HDA_FIXUP_PINS
,
10592 .v
.pins
= (const struct hda_pintbl
[]) {
10593 { 0x0b, 0x0221101f }, /* HP */
10594 { 0x0f, 0x90170310 }, /* speaker */
10598 [ALC861_FIXUP_AMP_VREF_0F
] = {
10599 .type
= HDA_FIXUP_FUNC
,
10600 .v
.func
= alc861_fixup_asus_amp_vref_0f
,
10602 [ALC861_FIXUP_NO_JACK_DETECT
] = {
10603 .type
= HDA_FIXUP_FUNC
,
10604 .v
.func
= alc_fixup_no_jack_detect
,
10606 [ALC861_FIXUP_ASUS_A6RP
] = {
10607 .type
= HDA_FIXUP_FUNC
,
10608 .v
.func
= alc861_fixup_asus_amp_vref_0f
,
10610 .chain_id
= ALC861_FIXUP_NO_JACK_DETECT
,
10612 [ALC660_FIXUP_ASUS_W7J
] = {
10613 .type
= HDA_FIXUP_VERBS
,
10614 .v
.verbs
= (const struct hda_verb
[]) {
10615 /* ASUS W7J needs a magic pin setup on unused NID 0x10
10616 * for enabling outputs
10618 {0x10, AC_VERB_SET_PIN_WIDGET_CONTROL
, 0x24},
10624 static const struct snd_pci_quirk alc861_fixup_tbl
[] = {
10625 SND_PCI_QUIRK(0x1043, 0x1253, "ASUS W7J", ALC660_FIXUP_ASUS_W7J
),
10626 SND_PCI_QUIRK(0x1043, 0x1263, "ASUS Z35HL", ALC660_FIXUP_ASUS_W7J
),
10627 SND_PCI_QUIRK(0x1043, 0x1393, "ASUS A6Rp", ALC861_FIXUP_ASUS_A6RP
),
10628 SND_PCI_QUIRK_VENDOR(0x1043, "ASUS laptop", ALC861_FIXUP_AMP_VREF_0F
),
10629 SND_PCI_QUIRK(0x1462, 0x7254, "HP DX2200", ALC861_FIXUP_NO_JACK_DETECT
),
10630 SND_PCI_QUIRK_VENDOR(0x1584, "Haier/Uniwill", ALC861_FIXUP_AMP_VREF_0F
),
10631 SND_PCI_QUIRK(0x1734, 0x10c7, "FSC Amilo Pi1505", ALC861_FIXUP_FSC_AMILO_PI1505
),
10637 static int patch_alc861(struct hda_codec
*codec
)
10639 struct alc_spec
*spec
;
10642 err
= alc_alloc_spec(codec
, 0x15);
10646 spec
= codec
->spec
;
10647 if (has_cdefine_beep(codec
))
10648 spec
->gen
.beep_nid
= 0x23;
10651 spec
->power_hook
= alc_power_eapd
;
10654 alc_pre_init(codec
);
10656 snd_hda_pick_fixup(codec
, NULL
, alc861_fixup_tbl
, alc861_fixups
);
10657 snd_hda_apply_fixup(codec
, HDA_FIXUP_ACT_PRE_PROBE
);
10659 /* automatic parse from the BIOS config */
10660 err
= alc861_parse_auto_config(codec
);
10664 if (!spec
->gen
.no_analog
) {
10665 err
= set_beep_amp(spec
, 0x23, 0, HDA_OUTPUT
);
10670 snd_hda_apply_fixup(codec
, HDA_FIXUP_ACT_PROBE
);
10680 * ALC861-VD support
10684 * In addition, an independent DAC
10686 static int alc861vd_parse_auto_config(struct hda_codec
*codec
)
10688 static const hda_nid_t alc861vd_ignore
[] = { 0x1d, 0 };
10689 static const hda_nid_t alc861vd_ssids
[] = { 0x15, 0x1b, 0x14, 0 };
10690 return alc_parse_auto_config(codec
, alc861vd_ignore
, alc861vd_ssids
);
10694 ALC660VD_FIX_ASUS_GPIO1
,
10695 ALC861VD_FIX_DALLAS
,
10698 /* exclude VREF80 */
10699 static void alc861vd_fixup_dallas(struct hda_codec
*codec
,
10700 const struct hda_fixup
*fix
, int action
)
10702 if (action
== HDA_FIXUP_ACT_PRE_PROBE
) {
10703 snd_hda_override_pin_caps(codec
, 0x18, 0x00000734);
10704 snd_hda_override_pin_caps(codec
, 0x19, 0x0000073c);
10709 static void alc660vd_fixup_asus_gpio1(struct hda_codec
*codec
,
10710 const struct hda_fixup
*fix
, int action
)
10712 struct alc_spec
*spec
= codec
->spec
;
10714 if (action
== HDA_FIXUP_ACT_PRE_PROBE
)
10715 spec
->gpio_mask
|= 0x02;
10716 alc_fixup_gpio(codec
, action
, 0x01);
10719 static const struct hda_fixup alc861vd_fixups
[] = {
10720 [ALC660VD_FIX_ASUS_GPIO1
] = {
10721 .type
= HDA_FIXUP_FUNC
,
10722 .v
.func
= alc660vd_fixup_asus_gpio1
,
10724 [ALC861VD_FIX_DALLAS
] = {
10725 .type
= HDA_FIXUP_FUNC
,
10726 .v
.func
= alc861vd_fixup_dallas
,
10730 static const struct snd_pci_quirk alc861vd_fixup_tbl
[] = {
10731 SND_PCI_QUIRK(0x103c, 0x30bf, "HP TX1000", ALC861VD_FIX_DALLAS
),
10732 SND_PCI_QUIRK(0x1043, 0x1339, "ASUS A7-K", ALC660VD_FIX_ASUS_GPIO1
),
10733 SND_PCI_QUIRK(0x1179, 0xff31, "Toshiba L30-149", ALC861VD_FIX_DALLAS
),
10739 static int patch_alc861vd(struct hda_codec
*codec
)
10741 struct alc_spec
*spec
;
10744 err
= alc_alloc_spec(codec
, 0x0b);
10748 spec
= codec
->spec
;
10749 if (has_cdefine_beep(codec
))
10750 spec
->gen
.beep_nid
= 0x23;
10752 spec
->shutup
= alc_eapd_shutup
;
10754 alc_pre_init(codec
);
10756 snd_hda_pick_fixup(codec
, NULL
, alc861vd_fixup_tbl
, alc861vd_fixups
);
10757 snd_hda_apply_fixup(codec
, HDA_FIXUP_ACT_PRE_PROBE
);
10759 /* automatic parse from the BIOS config */
10760 err
= alc861vd_parse_auto_config(codec
);
10764 if (!spec
->gen
.no_analog
) {
10765 err
= set_beep_amp(spec
, 0x0b, 0x05, HDA_INPUT
);
10770 snd_hda_apply_fixup(codec
, HDA_FIXUP_ACT_PROBE
);
10782 * ALC662 is almost identical with ALC880 but has cleaner and more flexible
10783 * configuration. Each pin widget can choose any input DACs and a mixer.
10784 * Each ADC is connected from a mixer of all inputs. This makes possible
10785 * 6-channel independent captures.
10787 * In addition, an independent DAC for the multi-playback (not used in this
10792 * BIOS auto configuration
10795 static int alc662_parse_auto_config(struct hda_codec
*codec
)
10797 static const hda_nid_t alc662_ignore
[] = { 0x1d, 0 };
10798 static const hda_nid_t alc663_ssids
[] = { 0x15, 0x1b, 0x14, 0x21 };
10799 static const hda_nid_t alc662_ssids
[] = { 0x15, 0x1b, 0x14, 0 };
10800 const hda_nid_t
*ssids
;
10802 if (codec
->core
.vendor_id
== 0x10ec0272 || codec
->core
.vendor_id
== 0x10ec0663 ||
10803 codec
->core
.vendor_id
== 0x10ec0665 || codec
->core
.vendor_id
== 0x10ec0670 ||
10804 codec
->core
.vendor_id
== 0x10ec0671)
10805 ssids
= alc663_ssids
;
10807 ssids
= alc662_ssids
;
10808 return alc_parse_auto_config(codec
, alc662_ignore
, ssids
);
10811 static void alc272_fixup_mario(struct hda_codec
*codec
,
10812 const struct hda_fixup
*fix
, int action
)
10814 if (action
!= HDA_FIXUP_ACT_PRE_PROBE
)
10816 if (snd_hda_override_amp_caps(codec
, 0x2, HDA_OUTPUT
,
10817 (0x3b << AC_AMPCAP_OFFSET_SHIFT
) |
10818 (0x3b << AC_AMPCAP_NUM_STEPS_SHIFT
) |
10819 (0x03 << AC_AMPCAP_STEP_SIZE_SHIFT
) |
10820 (0 << AC_AMPCAP_MUTE_SHIFT
)))
10821 codec_warn(codec
, "failed to override amp caps for NID 0x2\n");
10824 static const struct snd_pcm_chmap_elem asus_pcm_2_1_chmaps
[] = {
10826 .map
= { SNDRV_CHMAP_FL
, SNDRV_CHMAP_FR
} },
10828 .map
= { SNDRV_CHMAP_FL
, SNDRV_CHMAP_FR
,
10829 SNDRV_CHMAP_NA
, SNDRV_CHMAP_LFE
} }, /* LFE only on right */
10833 /* override the 2.1 chmap */
10834 static void alc_fixup_bass_chmap(struct hda_codec
*codec
,
10835 const struct hda_fixup
*fix
, int action
)
10837 if (action
== HDA_FIXUP_ACT_BUILD
) {
10838 struct alc_spec
*spec
= codec
->spec
;
10839 spec
->gen
.pcm_rec
[0]->stream
[0].chmap
= asus_pcm_2_1_chmaps
;
10843 /* avoid D3 for keeping GPIO up */
10844 static unsigned int gpio_led_power_filter(struct hda_codec
*codec
,
10846 unsigned int power_state
)
10848 struct alc_spec
*spec
= codec
->spec
;
10849 if (nid
== codec
->core
.afg
&& power_state
== AC_PWRST_D3
&& spec
->gpio_data
)
10850 return AC_PWRST_D0
;
10851 return power_state
;
10854 static void alc662_fixup_led_gpio1(struct hda_codec
*codec
,
10855 const struct hda_fixup
*fix
, int action
)
10857 struct alc_spec
*spec
= codec
->spec
;
10859 alc_fixup_hp_gpio_led(codec
, action
, 0x01, 0);
10860 if (action
== HDA_FIXUP_ACT_PRE_PROBE
) {
10861 spec
->mute_led_polarity
= 1;
10862 codec
->power_filter
= gpio_led_power_filter
;
10866 static void alc662_usi_automute_hook(struct hda_codec
*codec
,
10867 struct hda_jack_callback
*jack
)
10869 struct alc_spec
*spec
= codec
->spec
;
10872 snd_hda_gen_hp_automute(codec
, jack
);
10874 vref
= spec
->gen
.hp_jack_present
? PIN_VREF80
: 0;
10876 snd_hda_codec_write(codec
, 0x19, 0, AC_VERB_SET_PIN_WIDGET_CONTROL
,
10880 static void alc662_fixup_usi_headset_mic(struct hda_codec
*codec
,
10881 const struct hda_fixup
*fix
, int action
)
10883 struct alc_spec
*spec
= codec
->spec
;
10884 if (action
== HDA_FIXUP_ACT_PRE_PROBE
) {
10885 spec
->parse_flags
|= HDA_PINCFG_HEADSET_MIC
;
10886 spec
->gen
.hp_automute_hook
= alc662_usi_automute_hook
;
10890 static void alc662_aspire_ethos_mute_speakers(struct hda_codec
*codec
,
10891 struct hda_jack_callback
*cb
)
10893 /* surround speakers at 0x1b already get muted automatically when
10894 * headphones are plugged in, but we have to mute/unmute the remaining
10895 * channels manually:
10896 * 0x15 - front left/front right
10897 * 0x18 - front center/ LFE
10899 if (snd_hda_jack_detect_state(codec
, 0x1b) == HDA_JACK_PRESENT
) {
10900 snd_hda_set_pin_ctl_cache(codec
, 0x15, 0);
10901 snd_hda_set_pin_ctl_cache(codec
, 0x18, 0);
10903 snd_hda_set_pin_ctl_cache(codec
, 0x15, PIN_OUT
);
10904 snd_hda_set_pin_ctl_cache(codec
, 0x18, PIN_OUT
);
10908 static void alc662_fixup_aspire_ethos_hp(struct hda_codec
*codec
,
10909 const struct hda_fixup
*fix
, int action
)
10911 /* Pin 0x1b: shared headphones jack and surround speakers */
10912 if (!is_jack_detectable(codec
, 0x1b))
10916 case HDA_FIXUP_ACT_PRE_PROBE
:
10917 snd_hda_jack_detect_enable_callback(codec
, 0x1b,
10918 alc662_aspire_ethos_mute_speakers
);
10919 /* subwoofer needs an extra GPIO setting to become audible */
10920 alc_setup_gpio(codec
, 0x02);
10922 case HDA_FIXUP_ACT_INIT
:
10923 /* Make sure to start in a correct state, i.e. if
10924 * headphones have been plugged in before powering up the system
10926 alc662_aspire_ethos_mute_speakers(codec
, NULL
);
10931 static void alc671_fixup_hp_headset_mic2(struct hda_codec
*codec
,
10932 const struct hda_fixup
*fix
, int action
)
10934 struct alc_spec
*spec
= codec
->spec
;
10936 static const struct hda_pintbl pincfgs
[] = {
10937 { 0x19, 0x02a11040 }, /* use as headset mic, with its own jack detect */
10938 { 0x1b, 0x0181304f },
10943 case HDA_FIXUP_ACT_PRE_PROBE
:
10944 spec
->gen
.mixer_nid
= 0;
10945 spec
->parse_flags
|= HDA_PINCFG_HEADSET_MIC
;
10946 snd_hda_apply_pincfgs(codec
, pincfgs
);
10948 case HDA_FIXUP_ACT_INIT
:
10949 alc_write_coef_idx(codec
, 0x19, 0xa054);
10954 static void alc897_hp_automute_hook(struct hda_codec
*codec
,
10955 struct hda_jack_callback
*jack
)
10957 struct alc_spec
*spec
= codec
->spec
;
10960 snd_hda_gen_hp_automute(codec
, jack
);
10961 vref
= spec
->gen
.hp_jack_present
? (PIN_HP
| AC_PINCTL_VREF_100
) : PIN_HP
;
10962 snd_hda_codec_write(codec
, 0x1b, 0, AC_VERB_SET_PIN_WIDGET_CONTROL
,
10966 static void alc897_fixup_lenovo_headset_mic(struct hda_codec
*codec
,
10967 const struct hda_fixup
*fix
, int action
)
10969 struct alc_spec
*spec
= codec
->spec
;
10970 if (action
== HDA_FIXUP_ACT_PRE_PROBE
) {
10971 spec
->gen
.hp_automute_hook
= alc897_hp_automute_hook
;
10975 static const struct coef_fw alc668_coefs
[] = {
10976 WRITE_COEF(0x01, 0xbebe), WRITE_COEF(0x02, 0xaaaa), WRITE_COEF(0x03, 0x0),
10977 WRITE_COEF(0x04, 0x0180), WRITE_COEF(0x06, 0x0), WRITE_COEF(0x07, 0x0f80),
10978 WRITE_COEF(0x08, 0x0031), WRITE_COEF(0x0a, 0x0060), WRITE_COEF(0x0b, 0x0),
10979 WRITE_COEF(0x0c, 0x7cf7), WRITE_COEF(0x0d, 0x1080), WRITE_COEF(0x0e, 0x7f7f),
10980 WRITE_COEF(0x0f, 0xcccc), WRITE_COEF(0x10, 0xddcc), WRITE_COEF(0x11, 0x0001),
10981 WRITE_COEF(0x13, 0x0), WRITE_COEF(0x14, 0x2aa0), WRITE_COEF(0x17, 0xa940),
10982 WRITE_COEF(0x19, 0x0), WRITE_COEF(0x1a, 0x0), WRITE_COEF(0x1b, 0x0),
10983 WRITE_COEF(0x1c, 0x0), WRITE_COEF(0x1d, 0x0), WRITE_COEF(0x1e, 0x7418),
10984 WRITE_COEF(0x1f, 0x0804), WRITE_COEF(0x20, 0x4200), WRITE_COEF(0x21, 0x0468),
10985 WRITE_COEF(0x22, 0x8ccc), WRITE_COEF(0x23, 0x0250), WRITE_COEF(0x24, 0x7418),
10986 WRITE_COEF(0x27, 0x0), WRITE_COEF(0x28, 0x8ccc), WRITE_COEF(0x2a, 0xff00),
10987 WRITE_COEF(0x2b, 0x8000), WRITE_COEF(0xa7, 0xff00), WRITE_COEF(0xa8, 0x8000),
10988 WRITE_COEF(0xaa, 0x2e17), WRITE_COEF(0xab, 0xa0c0), WRITE_COEF(0xac, 0x0),
10989 WRITE_COEF(0xad, 0x0), WRITE_COEF(0xae, 0x2ac6), WRITE_COEF(0xaf, 0xa480),
10990 WRITE_COEF(0xb0, 0x0), WRITE_COEF(0xb1, 0x0), WRITE_COEF(0xb2, 0x0),
10991 WRITE_COEF(0xb3, 0x0), WRITE_COEF(0xb4, 0x0), WRITE_COEF(0xb5, 0x1040),
10992 WRITE_COEF(0xb6, 0xd697), WRITE_COEF(0xb7, 0x902b), WRITE_COEF(0xb8, 0xd697),
10993 WRITE_COEF(0xb9, 0x902b), WRITE_COEF(0xba, 0xb8ba), WRITE_COEF(0xbb, 0xaaab),
10994 WRITE_COEF(0xbc, 0xaaaf), WRITE_COEF(0xbd, 0x6aaa), WRITE_COEF(0xbe, 0x1c02),
10995 WRITE_COEF(0xc0, 0x00ff), WRITE_COEF(0xc1, 0x0fa6),
10999 static void alc668_restore_default_value(struct hda_codec
*codec
)
11001 alc_process_coef_fw(codec
, alc668_coefs
);
11005 ALC662_FIXUP_ASPIRE
,
11006 ALC662_FIXUP_LED_GPIO1
,
11007 ALC662_FIXUP_IDEAPAD
,
11008 ALC272_FIXUP_MARIO
,
11009 ALC662_FIXUP_CZC_ET26
,
11010 ALC662_FIXUP_CZC_P10T
,
11011 ALC662_FIXUP_SKU_IGNORE
,
11012 ALC662_FIXUP_HP_RP5800
,
11013 ALC662_FIXUP_ASUS_MODE1
,
11014 ALC662_FIXUP_ASUS_MODE2
,
11015 ALC662_FIXUP_ASUS_MODE3
,
11016 ALC662_FIXUP_ASUS_MODE4
,
11017 ALC662_FIXUP_ASUS_MODE5
,
11018 ALC662_FIXUP_ASUS_MODE6
,
11019 ALC662_FIXUP_ASUS_MODE7
,
11020 ALC662_FIXUP_ASUS_MODE8
,
11021 ALC662_FIXUP_NO_JACK_DETECT
,
11022 ALC662_FIXUP_ZOTAC_Z68
,
11023 ALC662_FIXUP_INV_DMIC
,
11024 ALC662_FIXUP_DELL_MIC_NO_PRESENCE
,
11025 ALC668_FIXUP_DELL_MIC_NO_PRESENCE
,
11026 ALC662_FIXUP_HEADSET_MODE
,
11027 ALC668_FIXUP_HEADSET_MODE
,
11028 ALC662_FIXUP_BASS_MODE4_CHMAP
,
11029 ALC662_FIXUP_BASS_16
,
11030 ALC662_FIXUP_BASS_1A
,
11031 ALC662_FIXUP_BASS_CHMAP
,
11032 ALC668_FIXUP_AUTO_MUTE
,
11033 ALC668_FIXUP_DELL_DISABLE_AAMIX
,
11034 ALC668_FIXUP_DELL_XPS13
,
11035 ALC662_FIXUP_ASUS_Nx50
,
11036 ALC668_FIXUP_ASUS_Nx51_HEADSET_MODE
,
11037 ALC668_FIXUP_ASUS_Nx51
,
11038 ALC668_FIXUP_MIC_COEF
,
11039 ALC668_FIXUP_ASUS_G751
,
11040 ALC891_FIXUP_HEADSET_MODE
,
11041 ALC891_FIXUP_DELL_MIC_NO_PRESENCE
,
11042 ALC662_FIXUP_ACER_VERITON
,
11043 ALC892_FIXUP_ASROCK_MOBO
,
11044 ALC662_FIXUP_USI_FUNC
,
11045 ALC662_FIXUP_USI_HEADSET_MODE
,
11046 ALC662_FIXUP_LENOVO_MULTI_CODECS
,
11047 ALC669_FIXUP_ACER_ASPIRE_ETHOS
,
11048 ALC669_FIXUP_ACER_ASPIRE_ETHOS_HEADSET
,
11049 ALC671_FIXUP_HP_HEADSET_MIC2
,
11050 ALC662_FIXUP_ACER_X2660G_HEADSET_MODE
,
11051 ALC662_FIXUP_ACER_NITRO_HEADSET_MODE
,
11052 ALC668_FIXUP_ASUS_NO_HEADSET_MIC
,
11053 ALC668_FIXUP_HEADSET_MIC
,
11054 ALC668_FIXUP_MIC_DET_COEF
,
11055 ALC897_FIXUP_LENOVO_HEADSET_MIC
,
11056 ALC897_FIXUP_HEADSET_MIC_PIN
,
11057 ALC897_FIXUP_HP_HSMIC_VERB
,
11060 static const struct hda_fixup alc662_fixups
[] = {
11061 [ALC662_FIXUP_ASPIRE
] = {
11062 .type
= HDA_FIXUP_PINS
,
11063 .v
.pins
= (const struct hda_pintbl
[]) {
11064 { 0x15, 0x99130112 }, /* subwoofer */
11068 [ALC662_FIXUP_LED_GPIO1
] = {
11069 .type
= HDA_FIXUP_FUNC
,
11070 .v
.func
= alc662_fixup_led_gpio1
,
11072 [ALC662_FIXUP_IDEAPAD
] = {
11073 .type
= HDA_FIXUP_PINS
,
11074 .v
.pins
= (const struct hda_pintbl
[]) {
11075 { 0x17, 0x99130112 }, /* subwoofer */
11079 .chain_id
= ALC662_FIXUP_LED_GPIO1
,
11081 [ALC272_FIXUP_MARIO
] = {
11082 .type
= HDA_FIXUP_FUNC
,
11083 .v
.func
= alc272_fixup_mario
,
11085 [ALC662_FIXUP_CZC_ET26
] = {
11086 .type
= HDA_FIXUP_PINS
,
11087 .v
.pins
= (const struct hda_pintbl
[]) {
11088 {0x12, 0x403cc000},
11089 {0x14, 0x90170110}, /* speaker */
11090 {0x15, 0x411111f0},
11091 {0x16, 0x411111f0},
11092 {0x18, 0x01a19030}, /* mic */
11093 {0x19, 0x90a7013f}, /* int-mic */
11094 {0x1a, 0x01014020},
11095 {0x1b, 0x0121401f},
11096 {0x1c, 0x411111f0},
11097 {0x1d, 0x411111f0},
11098 {0x1e, 0x40478e35},
11102 .chain_id
= ALC662_FIXUP_SKU_IGNORE
11104 [ALC662_FIXUP_CZC_P10T
] = {
11105 .type
= HDA_FIXUP_VERBS
,
11106 .v
.verbs
= (const struct hda_verb
[]) {
11107 {0x14, AC_VERB_SET_EAPD_BTLENABLE
, 0},
11111 [ALC662_FIXUP_SKU_IGNORE
] = {
11112 .type
= HDA_FIXUP_FUNC
,
11113 .v
.func
= alc_fixup_sku_ignore
,
11115 [ALC662_FIXUP_HP_RP5800
] = {
11116 .type
= HDA_FIXUP_PINS
,
11117 .v
.pins
= (const struct hda_pintbl
[]) {
11118 { 0x14, 0x0221201f }, /* HP out */
11122 .chain_id
= ALC662_FIXUP_SKU_IGNORE
11124 [ALC662_FIXUP_ASUS_MODE1
] = {
11125 .type
= HDA_FIXUP_PINS
,
11126 .v
.pins
= (const struct hda_pintbl
[]) {
11127 { 0x14, 0x99130110 }, /* speaker */
11128 { 0x18, 0x01a19c20 }, /* mic */
11129 { 0x19, 0x99a3092f }, /* int-mic */
11130 { 0x21, 0x0121401f }, /* HP out */
11134 .chain_id
= ALC662_FIXUP_SKU_IGNORE
11136 [ALC662_FIXUP_ASUS_MODE2
] = {
11137 .type
= HDA_FIXUP_PINS
,
11138 .v
.pins
= (const struct hda_pintbl
[]) {
11139 { 0x14, 0x99130110 }, /* speaker */
11140 { 0x18, 0x01a19820 }, /* mic */
11141 { 0x19, 0x99a3092f }, /* int-mic */
11142 { 0x1b, 0x0121401f }, /* HP out */
11146 .chain_id
= ALC662_FIXUP_SKU_IGNORE
11148 [ALC662_FIXUP_ASUS_MODE3
] = {
11149 .type
= HDA_FIXUP_PINS
,
11150 .v
.pins
= (const struct hda_pintbl
[]) {
11151 { 0x14, 0x99130110 }, /* speaker */
11152 { 0x15, 0x0121441f }, /* HP */
11153 { 0x18, 0x01a19840 }, /* mic */
11154 { 0x19, 0x99a3094f }, /* int-mic */
11155 { 0x21, 0x01211420 }, /* HP2 */
11159 .chain_id
= ALC662_FIXUP_SKU_IGNORE
11161 [ALC662_FIXUP_ASUS_MODE4
] = {
11162 .type
= HDA_FIXUP_PINS
,
11163 .v
.pins
= (const struct hda_pintbl
[]) {
11164 { 0x14, 0x99130110 }, /* speaker */
11165 { 0x16, 0x99130111 }, /* speaker */
11166 { 0x18, 0x01a19840 }, /* mic */
11167 { 0x19, 0x99a3094f }, /* int-mic */
11168 { 0x21, 0x0121441f }, /* HP */
11172 .chain_id
= ALC662_FIXUP_SKU_IGNORE
11174 [ALC662_FIXUP_ASUS_MODE5
] = {
11175 .type
= HDA_FIXUP_PINS
,
11176 .v
.pins
= (const struct hda_pintbl
[]) {
11177 { 0x14, 0x99130110 }, /* speaker */
11178 { 0x15, 0x0121441f }, /* HP */
11179 { 0x16, 0x99130111 }, /* speaker */
11180 { 0x18, 0x01a19840 }, /* mic */
11181 { 0x19, 0x99a3094f }, /* int-mic */
11185 .chain_id
= ALC662_FIXUP_SKU_IGNORE
11187 [ALC662_FIXUP_ASUS_MODE6
] = {
11188 .type
= HDA_FIXUP_PINS
,
11189 .v
.pins
= (const struct hda_pintbl
[]) {
11190 { 0x14, 0x99130110 }, /* speaker */
11191 { 0x15, 0x01211420 }, /* HP2 */
11192 { 0x18, 0x01a19840 }, /* mic */
11193 { 0x19, 0x99a3094f }, /* int-mic */
11194 { 0x1b, 0x0121441f }, /* HP */
11198 .chain_id
= ALC662_FIXUP_SKU_IGNORE
11200 [ALC662_FIXUP_ASUS_MODE7
] = {
11201 .type
= HDA_FIXUP_PINS
,
11202 .v
.pins
= (const struct hda_pintbl
[]) {
11203 { 0x14, 0x99130110 }, /* speaker */
11204 { 0x17, 0x99130111 }, /* speaker */
11205 { 0x18, 0x01a19840 }, /* mic */
11206 { 0x19, 0x99a3094f }, /* int-mic */
11207 { 0x1b, 0x01214020 }, /* HP */
11208 { 0x21, 0x0121401f }, /* HP */
11212 .chain_id
= ALC662_FIXUP_SKU_IGNORE
11214 [ALC662_FIXUP_ASUS_MODE8
] = {
11215 .type
= HDA_FIXUP_PINS
,
11216 .v
.pins
= (const struct hda_pintbl
[]) {
11217 { 0x14, 0x99130110 }, /* speaker */
11218 { 0x12, 0x99a30970 }, /* int-mic */
11219 { 0x15, 0x01214020 }, /* HP */
11220 { 0x17, 0x99130111 }, /* speaker */
11221 { 0x18, 0x01a19840 }, /* mic */
11222 { 0x21, 0x0121401f }, /* HP */
11226 .chain_id
= ALC662_FIXUP_SKU_IGNORE
11228 [ALC662_FIXUP_NO_JACK_DETECT
] = {
11229 .type
= HDA_FIXUP_FUNC
,
11230 .v
.func
= alc_fixup_no_jack_detect
,
11232 [ALC662_FIXUP_ZOTAC_Z68
] = {
11233 .type
= HDA_FIXUP_PINS
,
11234 .v
.pins
= (const struct hda_pintbl
[]) {
11235 { 0x1b, 0x02214020 }, /* Front HP */
11239 [ALC662_FIXUP_INV_DMIC
] = {
11240 .type
= HDA_FIXUP_FUNC
,
11241 .v
.func
= alc_fixup_inv_dmic
,
11243 [ALC668_FIXUP_DELL_XPS13
] = {
11244 .type
= HDA_FIXUP_FUNC
,
11245 .v
.func
= alc_fixup_dell_xps13
,
11247 .chain_id
= ALC668_FIXUP_DELL_DISABLE_AAMIX
11249 [ALC668_FIXUP_DELL_DISABLE_AAMIX
] = {
11250 .type
= HDA_FIXUP_FUNC
,
11251 .v
.func
= alc_fixup_disable_aamix
,
11253 .chain_id
= ALC668_FIXUP_DELL_MIC_NO_PRESENCE
11255 [ALC668_FIXUP_AUTO_MUTE
] = {
11256 .type
= HDA_FIXUP_FUNC
,
11257 .v
.func
= alc_fixup_auto_mute_via_amp
,
11259 .chain_id
= ALC668_FIXUP_DELL_MIC_NO_PRESENCE
11261 [ALC662_FIXUP_DELL_MIC_NO_PRESENCE
] = {
11262 .type
= HDA_FIXUP_PINS
,
11263 .v
.pins
= (const struct hda_pintbl
[]) {
11264 { 0x19, 0x03a1113c }, /* use as headset mic, without its own jack detect */
11265 /* headphone mic by setting pin control of 0x1b (headphone out) to in + vref_50 */
11269 .chain_id
= ALC662_FIXUP_HEADSET_MODE
11271 [ALC662_FIXUP_HEADSET_MODE
] = {
11272 .type
= HDA_FIXUP_FUNC
,
11273 .v
.func
= alc_fixup_headset_mode_alc662
,
11275 [ALC668_FIXUP_DELL_MIC_NO_PRESENCE
] = {
11276 .type
= HDA_FIXUP_PINS
,
11277 .v
.pins
= (const struct hda_pintbl
[]) {
11278 { 0x19, 0x03a1913d }, /* use as headphone mic, without its own jack detect */
11279 { 0x1b, 0x03a1113c }, /* use as headset mic, without its own jack detect */
11283 .chain_id
= ALC668_FIXUP_HEADSET_MODE
11285 [ALC668_FIXUP_HEADSET_MODE
] = {
11286 .type
= HDA_FIXUP_FUNC
,
11287 .v
.func
= alc_fixup_headset_mode_alc668
,
11289 [ALC662_FIXUP_BASS_MODE4_CHMAP
] = {
11290 .type
= HDA_FIXUP_FUNC
,
11291 .v
.func
= alc_fixup_bass_chmap
,
11293 .chain_id
= ALC662_FIXUP_ASUS_MODE4
11295 [ALC662_FIXUP_BASS_16
] = {
11296 .type
= HDA_FIXUP_PINS
,
11297 .v
.pins
= (const struct hda_pintbl
[]) {
11298 {0x16, 0x80106111}, /* bass speaker */
11302 .chain_id
= ALC662_FIXUP_BASS_CHMAP
,
11304 [ALC662_FIXUP_BASS_1A
] = {
11305 .type
= HDA_FIXUP_PINS
,
11306 .v
.pins
= (const struct hda_pintbl
[]) {
11307 {0x1a, 0x80106111}, /* bass speaker */
11311 .chain_id
= ALC662_FIXUP_BASS_CHMAP
,
11313 [ALC662_FIXUP_BASS_CHMAP
] = {
11314 .type
= HDA_FIXUP_FUNC
,
11315 .v
.func
= alc_fixup_bass_chmap
,
11317 [ALC662_FIXUP_ASUS_Nx50
] = {
11318 .type
= HDA_FIXUP_FUNC
,
11319 .v
.func
= alc_fixup_auto_mute_via_amp
,
11321 .chain_id
= ALC662_FIXUP_BASS_1A
11323 [ALC668_FIXUP_ASUS_Nx51_HEADSET_MODE
] = {
11324 .type
= HDA_FIXUP_FUNC
,
11325 .v
.func
= alc_fixup_headset_mode_alc668
,
11326 .chain_id
= ALC662_FIXUP_BASS_CHMAP
11328 [ALC668_FIXUP_ASUS_Nx51
] = {
11329 .type
= HDA_FIXUP_PINS
,
11330 .v
.pins
= (const struct hda_pintbl
[]) {
11331 { 0x19, 0x03a1913d }, /* use as headphone mic, without its own jack detect */
11332 { 0x1a, 0x90170151 }, /* bass speaker */
11333 { 0x1b, 0x03a1113c }, /* use as headset mic, without its own jack detect */
11337 .chain_id
= ALC668_FIXUP_ASUS_Nx51_HEADSET_MODE
,
11339 [ALC668_FIXUP_MIC_COEF
] = {
11340 .type
= HDA_FIXUP_VERBS
,
11341 .v
.verbs
= (const struct hda_verb
[]) {
11342 { 0x20, AC_VERB_SET_COEF_INDEX
, 0xc3 },
11343 { 0x20, AC_VERB_SET_PROC_COEF
, 0x4000 },
11347 [ALC668_FIXUP_ASUS_G751
] = {
11348 .type
= HDA_FIXUP_PINS
,
11349 .v
.pins
= (const struct hda_pintbl
[]) {
11350 { 0x16, 0x0421101f }, /* HP */
11354 .chain_id
= ALC668_FIXUP_MIC_COEF
11356 [ALC891_FIXUP_HEADSET_MODE
] = {
11357 .type
= HDA_FIXUP_FUNC
,
11358 .v
.func
= alc_fixup_headset_mode
,
11360 [ALC891_FIXUP_DELL_MIC_NO_PRESENCE
] = {
11361 .type
= HDA_FIXUP_PINS
,
11362 .v
.pins
= (const struct hda_pintbl
[]) {
11363 { 0x19, 0x03a1913d }, /* use as headphone mic, without its own jack detect */
11364 { 0x1b, 0x03a1113c }, /* use as headset mic, without its own jack detect */
11368 .chain_id
= ALC891_FIXUP_HEADSET_MODE
11370 [ALC662_FIXUP_ACER_VERITON
] = {
11371 .type
= HDA_FIXUP_PINS
,
11372 .v
.pins
= (const struct hda_pintbl
[]) {
11373 { 0x15, 0x50170120 }, /* no internal speaker */
11377 [ALC892_FIXUP_ASROCK_MOBO
] = {
11378 .type
= HDA_FIXUP_PINS
,
11379 .v
.pins
= (const struct hda_pintbl
[]) {
11380 { 0x15, 0x40f000f0 }, /* disabled */
11381 { 0x16, 0x40f000f0 }, /* disabled */
11385 [ALC662_FIXUP_USI_FUNC
] = {
11386 .type
= HDA_FIXUP_FUNC
,
11387 .v
.func
= alc662_fixup_usi_headset_mic
,
11389 [ALC662_FIXUP_USI_HEADSET_MODE
] = {
11390 .type
= HDA_FIXUP_PINS
,
11391 .v
.pins
= (const struct hda_pintbl
[]) {
11392 { 0x19, 0x02a1913c }, /* use as headset mic, without its own jack detect */
11393 { 0x18, 0x01a1903d },
11397 .chain_id
= ALC662_FIXUP_USI_FUNC
11399 [ALC662_FIXUP_LENOVO_MULTI_CODECS
] = {
11400 .type
= HDA_FIXUP_FUNC
,
11401 .v
.func
= alc233_alc662_fixup_lenovo_dual_codecs
,
11403 [ALC669_FIXUP_ACER_ASPIRE_ETHOS_HEADSET
] = {
11404 .type
= HDA_FIXUP_FUNC
,
11405 .v
.func
= alc662_fixup_aspire_ethos_hp
,
11407 [ALC669_FIXUP_ACER_ASPIRE_ETHOS
] = {
11408 .type
= HDA_FIXUP_PINS
,
11409 .v
.pins
= (const struct hda_pintbl
[]) {
11410 { 0x15, 0x92130110 }, /* front speakers */
11411 { 0x18, 0x99130111 }, /* center/subwoofer */
11412 { 0x1b, 0x11130012 }, /* surround plus jack for HP */
11416 .chain_id
= ALC669_FIXUP_ACER_ASPIRE_ETHOS_HEADSET
11418 [ALC671_FIXUP_HP_HEADSET_MIC2
] = {
11419 .type
= HDA_FIXUP_FUNC
,
11420 .v
.func
= alc671_fixup_hp_headset_mic2
,
11422 [ALC662_FIXUP_ACER_X2660G_HEADSET_MODE
] = {
11423 .type
= HDA_FIXUP_PINS
,
11424 .v
.pins
= (const struct hda_pintbl
[]) {
11425 { 0x1a, 0x02a1113c }, /* use as headset mic, without its own jack detect */
11429 .chain_id
= ALC662_FIXUP_USI_FUNC
11431 [ALC662_FIXUP_ACER_NITRO_HEADSET_MODE
] = {
11432 .type
= HDA_FIXUP_PINS
,
11433 .v
.pins
= (const struct hda_pintbl
[]) {
11434 { 0x1a, 0x01a11140 }, /* use as headset mic, without its own jack detect */
11435 { 0x1b, 0x0221144f },
11439 .chain_id
= ALC662_FIXUP_USI_FUNC
11441 [ALC668_FIXUP_ASUS_NO_HEADSET_MIC
] = {
11442 .type
= HDA_FIXUP_PINS
,
11443 .v
.pins
= (const struct hda_pintbl
[]) {
11444 { 0x1b, 0x04a1112c },
11448 .chain_id
= ALC668_FIXUP_HEADSET_MIC
11450 [ALC668_FIXUP_HEADSET_MIC
] = {
11451 .type
= HDA_FIXUP_FUNC
,
11452 .v
.func
= alc269_fixup_headset_mic
,
11454 .chain_id
= ALC668_FIXUP_MIC_DET_COEF
11456 [ALC668_FIXUP_MIC_DET_COEF
] = {
11457 .type
= HDA_FIXUP_VERBS
,
11458 .v
.verbs
= (const struct hda_verb
[]) {
11459 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x15 },
11460 { 0x20, AC_VERB_SET_PROC_COEF
, 0x0d60 },
11464 [ALC897_FIXUP_LENOVO_HEADSET_MIC
] = {
11465 .type
= HDA_FIXUP_FUNC
,
11466 .v
.func
= alc897_fixup_lenovo_headset_mic
,
11468 [ALC897_FIXUP_HEADSET_MIC_PIN
] = {
11469 .type
= HDA_FIXUP_PINS
,
11470 .v
.pins
= (const struct hda_pintbl
[]) {
11471 { 0x1a, 0x03a11050 },
11475 .chain_id
= ALC897_FIXUP_LENOVO_HEADSET_MIC
11477 [ALC897_FIXUP_HP_HSMIC_VERB
] = {
11478 .type
= HDA_FIXUP_PINS
,
11479 .v
.pins
= (const struct hda_pintbl
[]) {
11480 { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */
11486 static const struct snd_pci_quirk alc662_fixup_tbl
[] = {
11487 SND_PCI_QUIRK(0x1019, 0x9087, "ECS", ALC662_FIXUP_ASUS_MODE2
),
11488 SND_PCI_QUIRK(0x1025, 0x022f, "Acer Aspire One", ALC662_FIXUP_INV_DMIC
),
11489 SND_PCI_QUIRK(0x1025, 0x0241, "Packard Bell DOTS", ALC662_FIXUP_INV_DMIC
),
11490 SND_PCI_QUIRK(0x1025, 0x0308, "Acer Aspire 8942G", ALC662_FIXUP_ASPIRE
),
11491 SND_PCI_QUIRK(0x1025, 0x031c, "Gateway NV79", ALC662_FIXUP_SKU_IGNORE
),
11492 SND_PCI_QUIRK(0x1025, 0x0349, "eMachines eM250", ALC662_FIXUP_INV_DMIC
),
11493 SND_PCI_QUIRK(0x1025, 0x034a, "Gateway LT27", ALC662_FIXUP_INV_DMIC
),
11494 SND_PCI_QUIRK(0x1025, 0x038b, "Acer Aspire 8943G", ALC662_FIXUP_ASPIRE
),
11495 SND_PCI_QUIRK(0x1025, 0x0566, "Acer Aspire Ethos 8951G", ALC669_FIXUP_ACER_ASPIRE_ETHOS
),
11496 SND_PCI_QUIRK(0x1025, 0x123c, "Acer Nitro N50-600", ALC662_FIXUP_ACER_NITRO_HEADSET_MODE
),
11497 SND_PCI_QUIRK(0x1025, 0x124e, "Acer 2660G", ALC662_FIXUP_ACER_X2660G_HEADSET_MODE
),
11498 SND_PCI_QUIRK(0x1028, 0x05d8, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE
),
11499 SND_PCI_QUIRK(0x1028, 0x05db, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE
),
11500 SND_PCI_QUIRK(0x1028, 0x05fe, "Dell XPS 15", ALC668_FIXUP_DELL_XPS13
),
11501 SND_PCI_QUIRK(0x1028, 0x060a, "Dell XPS 13", ALC668_FIXUP_DELL_XPS13
),
11502 SND_PCI_QUIRK(0x1028, 0x060d, "Dell M3800", ALC668_FIXUP_DELL_XPS13
),
11503 SND_PCI_QUIRK(0x1028, 0x0625, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE
),
11504 SND_PCI_QUIRK(0x1028, 0x0626, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE
),
11505 SND_PCI_QUIRK(0x1028, 0x0696, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE
),
11506 SND_PCI_QUIRK(0x1028, 0x0698, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE
),
11507 SND_PCI_QUIRK(0x1028, 0x069f, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE
),
11508 SND_PCI_QUIRK(0x103c, 0x1632, "HP RP5800", ALC662_FIXUP_HP_RP5800
),
11509 SND_PCI_QUIRK(0x103c, 0x8719, "HP", ALC897_FIXUP_HP_HSMIC_VERB
),
11510 SND_PCI_QUIRK(0x103c, 0x873e, "HP", ALC671_FIXUP_HP_HEADSET_MIC2
),
11511 SND_PCI_QUIRK(0x103c, 0x877e, "HP 288 Pro G6", ALC671_FIXUP_HP_HEADSET_MIC2
),
11512 SND_PCI_QUIRK(0x103c, 0x885f, "HP 288 Pro G8", ALC671_FIXUP_HP_HEADSET_MIC2
),
11513 SND_PCI_QUIRK(0x1043, 0x1080, "Asus UX501VW", ALC668_FIXUP_HEADSET_MODE
),
11514 SND_PCI_QUIRK(0x1043, 0x11cd, "Asus N550", ALC662_FIXUP_ASUS_Nx50
),
11515 SND_PCI_QUIRK(0x1043, 0x129d, "Asus N750", ALC662_FIXUP_ASUS_Nx50
),
11516 SND_PCI_QUIRK(0x1043, 0x12ff, "ASUS G751", ALC668_FIXUP_ASUS_G751
),
11517 SND_PCI_QUIRK(0x1043, 0x13df, "Asus N550JX", ALC662_FIXUP_BASS_1A
),
11518 SND_PCI_QUIRK(0x1043, 0x1477, "ASUS N56VZ", ALC662_FIXUP_BASS_MODE4_CHMAP
),
11519 SND_PCI_QUIRK(0x1043, 0x15a7, "ASUS UX51VZH", ALC662_FIXUP_BASS_16
),
11520 SND_PCI_QUIRK(0x1043, 0x177d, "ASUS N551", ALC668_FIXUP_ASUS_Nx51
),
11521 SND_PCI_QUIRK(0x1043, 0x17bd, "ASUS N751", ALC668_FIXUP_ASUS_Nx51
),
11522 SND_PCI_QUIRK(0x1043, 0x185d, "ASUS G551JW", ALC668_FIXUP_ASUS_NO_HEADSET_MIC
),
11523 SND_PCI_QUIRK(0x1043, 0x1963, "ASUS X71SL", ALC662_FIXUP_ASUS_MODE8
),
11524 SND_PCI_QUIRK(0x1043, 0x1b73, "ASUS N55SF", ALC662_FIXUP_BASS_16
),
11525 SND_PCI_QUIRK(0x1043, 0x1bf3, "ASUS N76VZ", ALC662_FIXUP_BASS_MODE4_CHMAP
),
11526 SND_PCI_QUIRK(0x1043, 0x8469, "ASUS mobo", ALC662_FIXUP_NO_JACK_DETECT
),
11527 SND_PCI_QUIRK(0x105b, 0x0cd6, "Foxconn", ALC662_FIXUP_ASUS_MODE2
),
11528 SND_PCI_QUIRK(0x144d, 0xc051, "Samsung R720", ALC662_FIXUP_IDEAPAD
),
11529 SND_PCI_QUIRK(0x14cd, 0x5003, "USI", ALC662_FIXUP_USI_HEADSET_MODE
),
11530 SND_PCI_QUIRK(0x17aa, 0x1036, "Lenovo P520", ALC662_FIXUP_LENOVO_MULTI_CODECS
),
11531 SND_PCI_QUIRK(0x17aa, 0x1057, "Lenovo P360", ALC897_FIXUP_HEADSET_MIC_PIN
),
11532 SND_PCI_QUIRK(0x17aa, 0x32ca, "Lenovo ThinkCentre M80", ALC897_FIXUP_HEADSET_MIC_PIN
),
11533 SND_PCI_QUIRK(0x17aa, 0x32cb, "Lenovo ThinkCentre M70", ALC897_FIXUP_HEADSET_MIC_PIN
),
11534 SND_PCI_QUIRK(0x17aa, 0x32cf, "Lenovo ThinkCentre M950", ALC897_FIXUP_HEADSET_MIC_PIN
),
11535 SND_PCI_QUIRK(0x17aa, 0x32f7, "Lenovo ThinkCentre M90", ALC897_FIXUP_HEADSET_MIC_PIN
),
11536 SND_PCI_QUIRK(0x17aa, 0x38af, "Lenovo Ideapad Y550P", ALC662_FIXUP_IDEAPAD
),
11537 SND_PCI_QUIRK(0x17aa, 0x3a0d, "Lenovo Ideapad Y550", ALC662_FIXUP_IDEAPAD
),
11538 SND_PCI_QUIRK(0x1849, 0x5892, "ASRock B150M", ALC892_FIXUP_ASROCK_MOBO
),
11539 SND_PCI_QUIRK(0x19da, 0xa130, "Zotac Z68", ALC662_FIXUP_ZOTAC_Z68
),
11540 SND_PCI_QUIRK(0x1b0a, 0x01b8, "ACER Veriton", ALC662_FIXUP_ACER_VERITON
),
11541 SND_PCI_QUIRK(0x1b35, 0x1234, "CZC ET26", ALC662_FIXUP_CZC_ET26
),
11542 SND_PCI_QUIRK(0x1b35, 0x2206, "CZC P10T", ALC662_FIXUP_CZC_P10T
),
11545 /* Below is a quirk table taken from the old code.
11546 * Basically the device should work as is without the fixup table.
11547 * If BIOS doesn't give a proper info, enable the corresponding
11550 SND_PCI_QUIRK(0x1043, 0x1000, "ASUS N50Vm", ALC662_FIXUP_ASUS_MODE1
),
11551 SND_PCI_QUIRK(0x1043, 0x1092, "ASUS NB", ALC662_FIXUP_ASUS_MODE3
),
11552 SND_PCI_QUIRK(0x1043, 0x1173, "ASUS K73Jn", ALC662_FIXUP_ASUS_MODE1
),
11553 SND_PCI_QUIRK(0x1043, 0x11c3, "ASUS M70V", ALC662_FIXUP_ASUS_MODE3
),
11554 SND_PCI_QUIRK(0x1043, 0x11d3, "ASUS NB", ALC662_FIXUP_ASUS_MODE1
),
11555 SND_PCI_QUIRK(0x1043, 0x11f3, "ASUS NB", ALC662_FIXUP_ASUS_MODE2
),
11556 SND_PCI_QUIRK(0x1043, 0x1203, "ASUS NB", ALC662_FIXUP_ASUS_MODE1
),
11557 SND_PCI_QUIRK(0x1043, 0x1303, "ASUS G60J", ALC662_FIXUP_ASUS_MODE1
),
11558 SND_PCI_QUIRK(0x1043, 0x1333, "ASUS G60Jx", ALC662_FIXUP_ASUS_MODE1
),
11559 SND_PCI_QUIRK(0x1043, 0x1339, "ASUS NB", ALC662_FIXUP_ASUS_MODE2
),
11560 SND_PCI_QUIRK(0x1043, 0x13e3, "ASUS N71JA", ALC662_FIXUP_ASUS_MODE7
),
11561 SND_PCI_QUIRK(0x1043, 0x1463, "ASUS N71", ALC662_FIXUP_ASUS_MODE7
),
11562 SND_PCI_QUIRK(0x1043, 0x14d3, "ASUS G72", ALC662_FIXUP_ASUS_MODE8
),
11563 SND_PCI_QUIRK(0x1043, 0x1563, "ASUS N90", ALC662_FIXUP_ASUS_MODE3
),
11564 SND_PCI_QUIRK(0x1043, 0x15d3, "ASUS N50SF F50SF", ALC662_FIXUP_ASUS_MODE1
),
11565 SND_PCI_QUIRK(0x1043, 0x16c3, "ASUS NB", ALC662_FIXUP_ASUS_MODE2
),
11566 SND_PCI_QUIRK(0x1043, 0x16f3, "ASUS K40C K50C", ALC662_FIXUP_ASUS_MODE2
),
11567 SND_PCI_QUIRK(0x1043, 0x1733, "ASUS N81De", ALC662_FIXUP_ASUS_MODE1
),
11568 SND_PCI_QUIRK(0x1043, 0x1753, "ASUS NB", ALC662_FIXUP_ASUS_MODE2
),
11569 SND_PCI_QUIRK(0x1043, 0x1763, "ASUS NB", ALC662_FIXUP_ASUS_MODE6
),
11570 SND_PCI_QUIRK(0x1043, 0x1765, "ASUS NB", ALC662_FIXUP_ASUS_MODE6
),
11571 SND_PCI_QUIRK(0x1043, 0x1783, "ASUS NB", ALC662_FIXUP_ASUS_MODE2
),
11572 SND_PCI_QUIRK(0x1043, 0x1793, "ASUS F50GX", ALC662_FIXUP_ASUS_MODE1
),
11573 SND_PCI_QUIRK(0x1043, 0x17b3, "ASUS F70SL", ALC662_FIXUP_ASUS_MODE3
),
11574 SND_PCI_QUIRK(0x1043, 0x17f3, "ASUS X58LE", ALC662_FIXUP_ASUS_MODE2
),
11575 SND_PCI_QUIRK(0x1043, 0x1813, "ASUS NB", ALC662_FIXUP_ASUS_MODE2
),
11576 SND_PCI_QUIRK(0x1043, 0x1823, "ASUS NB", ALC662_FIXUP_ASUS_MODE5
),
11577 SND_PCI_QUIRK(0x1043, 0x1833, "ASUS NB", ALC662_FIXUP_ASUS_MODE6
),
11578 SND_PCI_QUIRK(0x1043, 0x1843, "ASUS NB", ALC662_FIXUP_ASUS_MODE2
),
11579 SND_PCI_QUIRK(0x1043, 0x1853, "ASUS F50Z", ALC662_FIXUP_ASUS_MODE1
),
11580 SND_PCI_QUIRK(0x1043, 0x1864, "ASUS NB", ALC662_FIXUP_ASUS_MODE2
),
11581 SND_PCI_QUIRK(0x1043, 0x1876, "ASUS NB", ALC662_FIXUP_ASUS_MODE2
),
11582 SND_PCI_QUIRK(0x1043, 0x1893, "ASUS M50Vm", ALC662_FIXUP_ASUS_MODE3
),
11583 SND_PCI_QUIRK(0x1043, 0x1894, "ASUS X55", ALC662_FIXUP_ASUS_MODE3
),
11584 SND_PCI_QUIRK(0x1043, 0x18b3, "ASUS N80Vc", ALC662_FIXUP_ASUS_MODE1
),
11585 SND_PCI_QUIRK(0x1043, 0x18c3, "ASUS VX5", ALC662_FIXUP_ASUS_MODE1
),
11586 SND_PCI_QUIRK(0x1043, 0x18d3, "ASUS N81Te", ALC662_FIXUP_ASUS_MODE1
),
11587 SND_PCI_QUIRK(0x1043, 0x18f3, "ASUS N505Tp", ALC662_FIXUP_ASUS_MODE1
),
11588 SND_PCI_QUIRK(0x1043, 0x1903, "ASUS F5GL", ALC662_FIXUP_ASUS_MODE1
),
11589 SND_PCI_QUIRK(0x1043, 0x1913, "ASUS NB", ALC662_FIXUP_ASUS_MODE2
),
11590 SND_PCI_QUIRK(0x1043, 0x1933, "ASUS F80Q", ALC662_FIXUP_ASUS_MODE2
),
11591 SND_PCI_QUIRK(0x1043, 0x1943, "ASUS Vx3V", ALC662_FIXUP_ASUS_MODE1
),
11592 SND_PCI_QUIRK(0x1043, 0x1953, "ASUS NB", ALC662_FIXUP_ASUS_MODE1
),
11593 SND_PCI_QUIRK(0x1043, 0x1963, "ASUS X71C", ALC662_FIXUP_ASUS_MODE3
),
11594 SND_PCI_QUIRK(0x1043, 0x1983, "ASUS N5051A", ALC662_FIXUP_ASUS_MODE1
),
11595 SND_PCI_QUIRK(0x1043, 0x1993, "ASUS N20", ALC662_FIXUP_ASUS_MODE1
),
11596 SND_PCI_QUIRK(0x1043, 0x19b3, "ASUS F7Z", ALC662_FIXUP_ASUS_MODE1
),
11597 SND_PCI_QUIRK(0x1043, 0x19c3, "ASUS F5Z/F6x", ALC662_FIXUP_ASUS_MODE2
),
11598 SND_PCI_QUIRK(0x1043, 0x19e3, "ASUS NB", ALC662_FIXUP_ASUS_MODE1
),
11599 SND_PCI_QUIRK(0x1043, 0x19f3, "ASUS NB", ALC662_FIXUP_ASUS_MODE4
),
11604 static const struct hda_model_fixup alc662_fixup_models
[] = {
11605 {.id
= ALC662_FIXUP_ASPIRE
, .name
= "aspire"},
11606 {.id
= ALC662_FIXUP_IDEAPAD
, .name
= "ideapad"},
11607 {.id
= ALC272_FIXUP_MARIO
, .name
= "mario"},
11608 {.id
= ALC662_FIXUP_HP_RP5800
, .name
= "hp-rp5800"},
11609 {.id
= ALC662_FIXUP_ASUS_MODE1
, .name
= "asus-mode1"},
11610 {.id
= ALC662_FIXUP_ASUS_MODE2
, .name
= "asus-mode2"},
11611 {.id
= ALC662_FIXUP_ASUS_MODE3
, .name
= "asus-mode3"},
11612 {.id
= ALC662_FIXUP_ASUS_MODE4
, .name
= "asus-mode4"},
11613 {.id
= ALC662_FIXUP_ASUS_MODE5
, .name
= "asus-mode5"},
11614 {.id
= ALC662_FIXUP_ASUS_MODE6
, .name
= "asus-mode6"},
11615 {.id
= ALC662_FIXUP_ASUS_MODE7
, .name
= "asus-mode7"},
11616 {.id
= ALC662_FIXUP_ASUS_MODE8
, .name
= "asus-mode8"},
11617 {.id
= ALC662_FIXUP_ZOTAC_Z68
, .name
= "zotac-z68"},
11618 {.id
= ALC662_FIXUP_INV_DMIC
, .name
= "inv-dmic"},
11619 {.id
= ALC662_FIXUP_DELL_MIC_NO_PRESENCE
, .name
= "alc662-headset-multi"},
11620 {.id
= ALC668_FIXUP_DELL_MIC_NO_PRESENCE
, .name
= "dell-headset-multi"},
11621 {.id
= ALC662_FIXUP_HEADSET_MODE
, .name
= "alc662-headset"},
11622 {.id
= ALC668_FIXUP_HEADSET_MODE
, .name
= "alc668-headset"},
11623 {.id
= ALC662_FIXUP_BASS_16
, .name
= "bass16"},
11624 {.id
= ALC662_FIXUP_BASS_1A
, .name
= "bass1a"},
11625 {.id
= ALC668_FIXUP_AUTO_MUTE
, .name
= "automute"},
11626 {.id
= ALC668_FIXUP_DELL_XPS13
, .name
= "dell-xps13"},
11627 {.id
= ALC662_FIXUP_ASUS_Nx50
, .name
= "asus-nx50"},
11628 {.id
= ALC668_FIXUP_ASUS_Nx51
, .name
= "asus-nx51"},
11629 {.id
= ALC668_FIXUP_ASUS_G751
, .name
= "asus-g751"},
11630 {.id
= ALC891_FIXUP_HEADSET_MODE
, .name
= "alc891-headset"},
11631 {.id
= ALC891_FIXUP_DELL_MIC_NO_PRESENCE
, .name
= "alc891-headset-multi"},
11632 {.id
= ALC662_FIXUP_ACER_VERITON
, .name
= "acer-veriton"},
11633 {.id
= ALC892_FIXUP_ASROCK_MOBO
, .name
= "asrock-mobo"},
11634 {.id
= ALC662_FIXUP_USI_HEADSET_MODE
, .name
= "usi-headset"},
11635 {.id
= ALC662_FIXUP_LENOVO_MULTI_CODECS
, .name
= "dual-codecs"},
11636 {.id
= ALC669_FIXUP_ACER_ASPIRE_ETHOS
, .name
= "aspire-ethos"},
11640 static const struct snd_hda_pin_quirk alc662_pin_fixup_tbl
[] = {
11641 SND_HDA_PIN_QUIRK(0x10ec0867, 0x1028, "Dell", ALC891_FIXUP_DELL_MIC_NO_PRESENCE
,
11642 {0x17, 0x02211010},
11643 {0x18, 0x01a19030},
11644 {0x1a, 0x01813040},
11645 {0x21, 0x01014020}),
11646 SND_HDA_PIN_QUIRK(0x10ec0867, 0x1028, "Dell", ALC891_FIXUP_DELL_MIC_NO_PRESENCE
,
11647 {0x16, 0x01813030},
11648 {0x17, 0x02211010},
11649 {0x18, 0x01a19040},
11650 {0x21, 0x01014020}),
11651 SND_HDA_PIN_QUIRK(0x10ec0662, 0x1028, "Dell", ALC662_FIXUP_DELL_MIC_NO_PRESENCE
,
11652 {0x14, 0x01014010},
11653 {0x18, 0x01a19020},
11654 {0x1a, 0x0181302f},
11655 {0x1b, 0x0221401f}),
11656 SND_HDA_PIN_QUIRK(0x10ec0668, 0x1028, "Dell", ALC668_FIXUP_AUTO_MUTE
,
11657 {0x12, 0x99a30130},
11658 {0x14, 0x90170110},
11659 {0x15, 0x0321101f},
11660 {0x16, 0x03011020}),
11661 SND_HDA_PIN_QUIRK(0x10ec0668, 0x1028, "Dell", ALC668_FIXUP_AUTO_MUTE
,
11662 {0x12, 0x99a30140},
11663 {0x14, 0x90170110},
11664 {0x15, 0x0321101f},
11665 {0x16, 0x03011020}),
11666 SND_HDA_PIN_QUIRK(0x10ec0668, 0x1028, "Dell", ALC668_FIXUP_AUTO_MUTE
,
11667 {0x12, 0x99a30150},
11668 {0x14, 0x90170110},
11669 {0x15, 0x0321101f},
11670 {0x16, 0x03011020}),
11671 SND_HDA_PIN_QUIRK(0x10ec0668, 0x1028, "Dell", ALC668_FIXUP_AUTO_MUTE
,
11672 {0x14, 0x90170110},
11673 {0x15, 0x0321101f},
11674 {0x16, 0x03011020}),
11675 SND_HDA_PIN_QUIRK(0x10ec0668, 0x1028, "Dell XPS 15", ALC668_FIXUP_AUTO_MUTE
,
11676 {0x12, 0x90a60130},
11677 {0x14, 0x90170110},
11678 {0x15, 0x0321101f}),
11679 SND_HDA_PIN_QUIRK(0x10ec0671, 0x103c, "HP cPC", ALC671_FIXUP_HP_HEADSET_MIC2
,
11680 {0x14, 0x01014010},
11681 {0x17, 0x90170150},
11682 {0x19, 0x02a11060},
11683 {0x1b, 0x01813030},
11684 {0x21, 0x02211020}),
11685 SND_HDA_PIN_QUIRK(0x10ec0671, 0x103c, "HP cPC", ALC671_FIXUP_HP_HEADSET_MIC2
,
11686 {0x14, 0x01014010},
11687 {0x18, 0x01a19040},
11688 {0x1b, 0x01813030},
11689 {0x21, 0x02211020}),
11690 SND_HDA_PIN_QUIRK(0x10ec0671, 0x103c, "HP cPC", ALC671_FIXUP_HP_HEADSET_MIC2
,
11691 {0x14, 0x01014020},
11692 {0x17, 0x90170110},
11693 {0x18, 0x01a19050},
11694 {0x1b, 0x01813040},
11695 {0x21, 0x02211030}),
11701 static int patch_alc662(struct hda_codec
*codec
)
11703 struct alc_spec
*spec
;
11706 err
= alc_alloc_spec(codec
, 0x0b);
11710 spec
= codec
->spec
;
11712 spec
->shutup
= alc_eapd_shutup
;
11714 /* handle multiple HPs as is */
11715 spec
->parse_flags
= HDA_PINCFG_NO_HP_FIXUP
;
11717 alc_fix_pll_init(codec
, 0x20, 0x04, 15);
11719 switch (codec
->core
.vendor_id
) {
11721 spec
->init_hook
= alc668_restore_default_value
;
11725 alc_pre_init(codec
);
11727 snd_hda_pick_fixup(codec
, alc662_fixup_models
,
11728 alc662_fixup_tbl
, alc662_fixups
);
11729 snd_hda_pick_pin_fixup(codec
, alc662_pin_fixup_tbl
, alc662_fixups
, true);
11730 snd_hda_apply_fixup(codec
, HDA_FIXUP_ACT_PRE_PROBE
);
11732 alc_auto_parse_customize_define(codec
);
11734 if (has_cdefine_beep(codec
))
11735 spec
->gen
.beep_nid
= 0x01;
11737 if ((alc_get_coef0(codec
) & (1 << 14)) &&
11738 codec
->bus
->pci
&& codec
->bus
->pci
->subsystem_vendor
== 0x1025 &&
11739 spec
->cdefine
.platform_type
== 1) {
11740 err
= alc_codec_rename(codec
, "ALC272X");
11745 /* automatic parse from the BIOS config */
11746 err
= alc662_parse_auto_config(codec
);
11750 if (!spec
->gen
.no_analog
&& spec
->gen
.beep_nid
) {
11751 switch (codec
->core
.vendor_id
) {
11753 err
= set_beep_amp(spec
, 0x0b, 0x05, HDA_INPUT
);
11759 err
= set_beep_amp(spec
, 0x0b, 0x04, HDA_INPUT
);
11762 err
= set_beep_amp(spec
, 0x0b, 0x03, HDA_INPUT
);
11769 snd_hda_apply_fixup(codec
, HDA_FIXUP_ACT_PROBE
);
11782 static int alc680_parse_auto_config(struct hda_codec
*codec
)
11784 return alc_parse_auto_config(codec
, NULL
, NULL
);
11789 static int patch_alc680(struct hda_codec
*codec
)
11793 /* ALC680 has no aa-loopback mixer */
11794 err
= alc_alloc_spec(codec
, 0);
11798 /* automatic parse from the BIOS config */
11799 err
= alc680_parse_auto_config(codec
);
11811 static const struct hda_device_id snd_hda_id_realtek
[] = {
11812 HDA_CODEC_ENTRY(0x10ec0215, "ALC215", patch_alc269
),
11813 HDA_CODEC_ENTRY(0x10ec0221, "ALC221", patch_alc269
),
11814 HDA_CODEC_ENTRY(0x10ec0222, "ALC222", patch_alc269
),
11815 HDA_CODEC_ENTRY(0x10ec0225, "ALC225", patch_alc269
),
11816 HDA_CODEC_ENTRY(0x10ec0230, "ALC236", patch_alc269
),
11817 HDA_CODEC_ENTRY(0x10ec0231, "ALC231", patch_alc269
),
11818 HDA_CODEC_ENTRY(0x10ec0233, "ALC233", patch_alc269
),
11819 HDA_CODEC_ENTRY(0x10ec0234, "ALC234", patch_alc269
),
11820 HDA_CODEC_ENTRY(0x10ec0235, "ALC233", patch_alc269
),
11821 HDA_CODEC_ENTRY(0x10ec0236, "ALC236", patch_alc269
),
11822 HDA_CODEC_ENTRY(0x10ec0245, "ALC245", patch_alc269
),
11823 HDA_CODEC_ENTRY(0x10ec0255, "ALC255", patch_alc269
),
11824 HDA_CODEC_ENTRY(0x10ec0256, "ALC256", patch_alc269
),
11825 HDA_CODEC_ENTRY(0x10ec0257, "ALC257", patch_alc269
),
11826 HDA_CODEC_ENTRY(0x10ec0260, "ALC260", patch_alc260
),
11827 HDA_CODEC_ENTRY(0x10ec0262, "ALC262", patch_alc262
),
11828 HDA_CODEC_ENTRY(0x10ec0267, "ALC267", patch_alc268
),
11829 HDA_CODEC_ENTRY(0x10ec0268, "ALC268", patch_alc268
),
11830 HDA_CODEC_ENTRY(0x10ec0269, "ALC269", patch_alc269
),
11831 HDA_CODEC_ENTRY(0x10ec0270, "ALC270", patch_alc269
),
11832 HDA_CODEC_ENTRY(0x10ec0272, "ALC272", patch_alc662
),
11833 HDA_CODEC_ENTRY(0x10ec0274, "ALC274", patch_alc269
),
11834 HDA_CODEC_ENTRY(0x10ec0275, "ALC275", patch_alc269
),
11835 HDA_CODEC_ENTRY(0x10ec0276, "ALC276", patch_alc269
),
11836 HDA_CODEC_ENTRY(0x10ec0280, "ALC280", patch_alc269
),
11837 HDA_CODEC_ENTRY(0x10ec0282, "ALC282", patch_alc269
),
11838 HDA_CODEC_ENTRY(0x10ec0283, "ALC283", patch_alc269
),
11839 HDA_CODEC_ENTRY(0x10ec0284, "ALC284", patch_alc269
),
11840 HDA_CODEC_ENTRY(0x10ec0285, "ALC285", patch_alc269
),
11841 HDA_CODEC_ENTRY(0x10ec0286, "ALC286", patch_alc269
),
11842 HDA_CODEC_ENTRY(0x10ec0287, "ALC287", patch_alc269
),
11843 HDA_CODEC_ENTRY(0x10ec0288, "ALC288", patch_alc269
),
11844 HDA_CODEC_ENTRY(0x10ec0289, "ALC289", patch_alc269
),
11845 HDA_CODEC_ENTRY(0x10ec0290, "ALC290", patch_alc269
),
11846 HDA_CODEC_ENTRY(0x10ec0292, "ALC292", patch_alc269
),
11847 HDA_CODEC_ENTRY(0x10ec0293, "ALC293", patch_alc269
),
11848 HDA_CODEC_ENTRY(0x10ec0294, "ALC294", patch_alc269
),
11849 HDA_CODEC_ENTRY(0x10ec0295, "ALC295", patch_alc269
),
11850 HDA_CODEC_ENTRY(0x10ec0298, "ALC298", patch_alc269
),
11851 HDA_CODEC_ENTRY(0x10ec0299, "ALC299", patch_alc269
),
11852 HDA_CODEC_ENTRY(0x10ec0300, "ALC300", patch_alc269
),
11853 HDA_CODEC_ENTRY(0x10ec0623, "ALC623", patch_alc269
),
11854 HDA_CODEC_REV_ENTRY(0x10ec0861, 0x100340, "ALC660", patch_alc861
),
11855 HDA_CODEC_ENTRY(0x10ec0660, "ALC660-VD", patch_alc861vd
),
11856 HDA_CODEC_ENTRY(0x10ec0861, "ALC861", patch_alc861
),
11857 HDA_CODEC_ENTRY(0x10ec0862, "ALC861-VD", patch_alc861vd
),
11858 HDA_CODEC_REV_ENTRY(0x10ec0662, 0x100002, "ALC662 rev2", patch_alc882
),
11859 HDA_CODEC_REV_ENTRY(0x10ec0662, 0x100101, "ALC662 rev1", patch_alc662
),
11860 HDA_CODEC_REV_ENTRY(0x10ec0662, 0x100300, "ALC662 rev3", patch_alc662
),
11861 HDA_CODEC_ENTRY(0x10ec0663, "ALC663", patch_alc662
),
11862 HDA_CODEC_ENTRY(0x10ec0665, "ALC665", patch_alc662
),
11863 HDA_CODEC_ENTRY(0x10ec0667, "ALC667", patch_alc662
),
11864 HDA_CODEC_ENTRY(0x10ec0668, "ALC668", patch_alc662
),
11865 HDA_CODEC_ENTRY(0x10ec0670, "ALC670", patch_alc662
),
11866 HDA_CODEC_ENTRY(0x10ec0671, "ALC671", patch_alc662
),
11867 HDA_CODEC_ENTRY(0x10ec0680, "ALC680", patch_alc680
),
11868 HDA_CODEC_ENTRY(0x10ec0700, "ALC700", patch_alc269
),
11869 HDA_CODEC_ENTRY(0x10ec0701, "ALC701", patch_alc269
),
11870 HDA_CODEC_ENTRY(0x10ec0703, "ALC703", patch_alc269
),
11871 HDA_CODEC_ENTRY(0x10ec0711, "ALC711", patch_alc269
),
11872 HDA_CODEC_ENTRY(0x10ec0867, "ALC891", patch_alc662
),
11873 HDA_CODEC_ENTRY(0x10ec0880, "ALC880", patch_alc880
),
11874 HDA_CODEC_ENTRY(0x10ec0882, "ALC882", patch_alc882
),
11875 HDA_CODEC_ENTRY(0x10ec0883, "ALC883", patch_alc882
),
11876 HDA_CODEC_REV_ENTRY(0x10ec0885, 0x100101, "ALC889A", patch_alc882
),
11877 HDA_CODEC_REV_ENTRY(0x10ec0885, 0x100103, "ALC889A", patch_alc882
),
11878 HDA_CODEC_ENTRY(0x10ec0885, "ALC885", patch_alc882
),
11879 HDA_CODEC_ENTRY(0x10ec0887, "ALC887", patch_alc882
),
11880 HDA_CODEC_REV_ENTRY(0x10ec0888, 0x100101, "ALC1200", patch_alc882
),
11881 HDA_CODEC_ENTRY(0x10ec0888, "ALC888", patch_alc882
),
11882 HDA_CODEC_ENTRY(0x10ec0889, "ALC889", patch_alc882
),
11883 HDA_CODEC_ENTRY(0x10ec0892, "ALC892", patch_alc662
),
11884 HDA_CODEC_ENTRY(0x10ec0897, "ALC897", patch_alc662
),
11885 HDA_CODEC_ENTRY(0x10ec0899, "ALC898", patch_alc882
),
11886 HDA_CODEC_ENTRY(0x10ec0900, "ALC1150", patch_alc882
),
11887 HDA_CODEC_ENTRY(0x10ec0b00, "ALCS1200A", patch_alc882
),
11888 HDA_CODEC_ENTRY(0x10ec1168, "ALC1220", patch_alc882
),
11889 HDA_CODEC_ENTRY(0x10ec1220, "ALC1220", patch_alc882
),
11890 HDA_CODEC_ENTRY(0x19e58326, "HW8326", patch_alc269
),
11891 {} /* terminator */
11893 MODULE_DEVICE_TABLE(hdaudio
, snd_hda_id_realtek
);
11895 MODULE_LICENSE("GPL");
11896 MODULE_DESCRIPTION("Realtek HD-audio codec");
11898 static struct hda_codec_driver realtek_driver
= {
11899 .id
= snd_hda_id_realtek
,
11902 module_hda_codec_driver(realtek_driver
);