1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * Universal Interface for Intel High Definition Audio Codec
5 * HD audio interface patch for Realtek ALC codecs
7 * Copyright (c) 2004 Kailang Yang <kailang@realtek.com.tw>
8 * PeiSen Hou <pshou@realtek.com.tw>
9 * Takashi Iwai <tiwai@suse.de>
10 * Jonathan Woithe <jwoithe@just42.net>
13 #include <linux/init.h>
14 #include <linux/delay.h>
15 #include <linux/slab.h>
16 #include <linux/pci.h>
17 #include <linux/dmi.h>
18 #include <linux/module.h>
19 #include <linux/input.h>
20 #include <linux/leds.h>
21 #include <sound/core.h>
22 #include <sound/jack.h>
23 #include <sound/hda_codec.h>
24 #include "hda_local.h"
25 #include "hda_auto_parser.h"
27 #include "hda_generic.h"
29 /* keep halting ALC5505 DSP, for power saving */
30 #define HALT_REALTEK_ALC5505
32 /* extra amp-initialization sequence types */
40 ALC_HEADSET_MODE_UNKNOWN
,
41 ALC_HEADSET_MODE_UNPLUGGED
,
42 ALC_HEADSET_MODE_HEADSET
,
44 ALC_HEADSET_MODE_HEADPHONE
,
48 ALC_HEADSET_TYPE_UNKNOWN
,
49 ALC_HEADSET_TYPE_CTIA
,
50 ALC_HEADSET_TYPE_OMTP
,
54 ALC_KEY_MICMUTE_INDEX
,
57 struct alc_customize_define
{
59 unsigned char port_connectivity
;
60 unsigned char check_sum
;
61 unsigned char customization
;
62 unsigned char external_amp
;
63 unsigned int enable_pcbeep
:1;
64 unsigned int platform_type
:1;
66 unsigned int override
:1;
67 unsigned int fixup
:1; /* Means that this sku is set by driver, not read from hw */
78 struct hda_gen_spec gen
; /* must be at head */
80 /* codec parameterization */
81 struct alc_customize_define cdefine
;
82 unsigned int parse_flags
; /* flag for snd_hda_parse_pin_defcfg() */
85 unsigned int gpio_mask
;
86 unsigned int gpio_dir
;
87 unsigned int gpio_data
;
88 bool gpio_write_delay
; /* add a delay before writing gpio_data */
90 /* mute LED for HP laptops, see vref_mute_led_set() */
91 int mute_led_polarity
;
92 int micmute_led_polarity
;
93 hda_nid_t mute_led_nid
;
94 hda_nid_t cap_mute_led_nid
;
96 unsigned int gpio_mute_led_mask
;
97 unsigned int gpio_mic_led_mask
;
98 struct alc_coef_led mute_led_coef
;
99 struct alc_coef_led mic_led_coef
;
101 hda_nid_t headset_mic_pin
;
102 hda_nid_t headphone_mic_pin
;
103 int current_headset_mode
;
104 int current_headset_type
;
107 void (*init_hook
)(struct hda_codec
*codec
);
109 void (*power_hook
)(struct hda_codec
*codec
);
111 void (*shutup
)(struct hda_codec
*codec
);
114 int codec_variant
; /* flag for other variants */
115 unsigned int has_alc5505_dsp
:1;
116 unsigned int no_depop_delay
:1;
117 unsigned int done_hp_init
:1;
118 unsigned int no_shutup_pins
:1;
119 unsigned int ultra_low_power
:1;
120 unsigned int has_hs_key
:1;
121 unsigned int no_internal_mic_pin
:1;
125 unsigned int pll_coef_idx
, pll_coef_bit
;
127 struct input_dev
*kb_dev
;
128 u8 alc_mute_keycode_map
[1];
132 * COEF access helper functions
135 static int alc_read_coefex_idx(struct hda_codec
*codec
, hda_nid_t nid
,
136 unsigned int coef_idx
)
140 snd_hda_codec_write(codec
, nid
, 0, AC_VERB_SET_COEF_INDEX
, coef_idx
);
141 val
= snd_hda_codec_read(codec
, nid
, 0, AC_VERB_GET_PROC_COEF
, 0);
145 #define alc_read_coef_idx(codec, coef_idx) \
146 alc_read_coefex_idx(codec, 0x20, coef_idx)
148 static void alc_write_coefex_idx(struct hda_codec
*codec
, hda_nid_t nid
,
149 unsigned int coef_idx
, unsigned int coef_val
)
151 snd_hda_codec_write(codec
, nid
, 0, AC_VERB_SET_COEF_INDEX
, coef_idx
);
152 snd_hda_codec_write(codec
, nid
, 0, AC_VERB_SET_PROC_COEF
, coef_val
);
155 #define alc_write_coef_idx(codec, coef_idx, coef_val) \
156 alc_write_coefex_idx(codec, 0x20, coef_idx, coef_val)
158 static void alc_update_coefex_idx(struct hda_codec
*codec
, hda_nid_t nid
,
159 unsigned int coef_idx
, unsigned int mask
,
160 unsigned int bits_set
)
162 unsigned int val
= alc_read_coefex_idx(codec
, nid
, coef_idx
);
165 alc_write_coefex_idx(codec
, nid
, coef_idx
,
166 (val
& ~mask
) | bits_set
);
169 #define alc_update_coef_idx(codec, coef_idx, mask, bits_set) \
170 alc_update_coefex_idx(codec, 0x20, coef_idx, mask, bits_set)
172 /* a special bypass for COEF 0; read the cached value at the second time */
173 static unsigned int alc_get_coef0(struct hda_codec
*codec
)
175 struct alc_spec
*spec
= codec
->spec
;
178 spec
->coef0
= alc_read_coef_idx(codec
, 0);
182 /* coef writes/updates batch */
190 #define UPDATE_COEFEX(_nid, _idx, _mask, _val) \
191 { .nid = (_nid), .idx = (_idx), .mask = (_mask), .val = (_val) }
192 #define WRITE_COEFEX(_nid, _idx, _val) UPDATE_COEFEX(_nid, _idx, -1, _val)
193 #define WRITE_COEF(_idx, _val) WRITE_COEFEX(0x20, _idx, _val)
194 #define UPDATE_COEF(_idx, _mask, _val) UPDATE_COEFEX(0x20, _idx, _mask, _val)
196 static void alc_process_coef_fw(struct hda_codec
*codec
,
197 const struct coef_fw
*fw
)
199 for (; fw
->nid
; fw
++) {
200 if (fw
->mask
== (unsigned short)-1)
201 alc_write_coefex_idx(codec
, fw
->nid
, fw
->idx
, fw
->val
);
203 alc_update_coefex_idx(codec
, fw
->nid
, fw
->idx
,
209 * GPIO setup tables, used in initialization
212 /* Enable GPIO mask and set output */
213 static void alc_setup_gpio(struct hda_codec
*codec
, unsigned int mask
)
215 struct alc_spec
*spec
= codec
->spec
;
217 spec
->gpio_mask
|= mask
;
218 spec
->gpio_dir
|= mask
;
219 spec
->gpio_data
|= mask
;
222 static void alc_write_gpio_data(struct hda_codec
*codec
)
224 struct alc_spec
*spec
= codec
->spec
;
226 snd_hda_codec_write(codec
, 0x01, 0, AC_VERB_SET_GPIO_DATA
,
230 static void alc_update_gpio_data(struct hda_codec
*codec
, unsigned int mask
,
233 struct alc_spec
*spec
= codec
->spec
;
234 unsigned int oldval
= spec
->gpio_data
;
237 spec
->gpio_data
|= mask
;
239 spec
->gpio_data
&= ~mask
;
240 if (oldval
!= spec
->gpio_data
)
241 alc_write_gpio_data(codec
);
244 static void alc_write_gpio(struct hda_codec
*codec
)
246 struct alc_spec
*spec
= codec
->spec
;
248 if (!spec
->gpio_mask
)
251 snd_hda_codec_write(codec
, codec
->core
.afg
, 0,
252 AC_VERB_SET_GPIO_MASK
, spec
->gpio_mask
);
253 snd_hda_codec_write(codec
, codec
->core
.afg
, 0,
254 AC_VERB_SET_GPIO_DIRECTION
, spec
->gpio_dir
);
255 if (spec
->gpio_write_delay
)
257 alc_write_gpio_data(codec
);
260 static void alc_fixup_gpio(struct hda_codec
*codec
, int action
,
263 if (action
== HDA_FIXUP_ACT_PRE_PROBE
)
264 alc_setup_gpio(codec
, mask
);
267 static void alc_fixup_gpio1(struct hda_codec
*codec
,
268 const struct hda_fixup
*fix
, int action
)
270 alc_fixup_gpio(codec
, action
, 0x01);
273 static void alc_fixup_gpio2(struct hda_codec
*codec
,
274 const struct hda_fixup
*fix
, int action
)
276 alc_fixup_gpio(codec
, action
, 0x02);
279 static void alc_fixup_gpio3(struct hda_codec
*codec
,
280 const struct hda_fixup
*fix
, int action
)
282 alc_fixup_gpio(codec
, action
, 0x03);
285 static void alc_fixup_gpio4(struct hda_codec
*codec
,
286 const struct hda_fixup
*fix
, int action
)
288 alc_fixup_gpio(codec
, action
, 0x04);
291 static void alc_fixup_micmute_led(struct hda_codec
*codec
,
292 const struct hda_fixup
*fix
, int action
)
294 if (action
== HDA_FIXUP_ACT_PRE_PROBE
)
295 snd_hda_gen_add_micmute_led_cdev(codec
, NULL
);
299 * Fix hardware PLL issue
300 * On some codecs, the analog PLL gating control must be off while
301 * the default value is 1.
303 static void alc_fix_pll(struct hda_codec
*codec
)
305 struct alc_spec
*spec
= codec
->spec
;
308 alc_update_coefex_idx(codec
, spec
->pll_nid
, spec
->pll_coef_idx
,
309 1 << spec
->pll_coef_bit
, 0);
312 static void alc_fix_pll_init(struct hda_codec
*codec
, hda_nid_t nid
,
313 unsigned int coef_idx
, unsigned int coef_bit
)
315 struct alc_spec
*spec
= codec
->spec
;
317 spec
->pll_coef_idx
= coef_idx
;
318 spec
->pll_coef_bit
= coef_bit
;
322 /* update the master volume per volume-knob's unsol event */
323 static void alc_update_knob_master(struct hda_codec
*codec
,
324 struct hda_jack_callback
*jack
)
327 struct snd_kcontrol
*kctl
;
328 struct snd_ctl_elem_value
*uctl
;
330 kctl
= snd_hda_find_mixer_ctl(codec
, "Master Playback Volume");
333 uctl
= kzalloc(sizeof(*uctl
), GFP_KERNEL
);
336 val
= snd_hda_codec_read(codec
, jack
->nid
, 0,
337 AC_VERB_GET_VOLUME_KNOB_CONTROL
, 0);
338 val
&= HDA_AMP_VOLMASK
;
339 uctl
->value
.integer
.value
[0] = val
;
340 uctl
->value
.integer
.value
[1] = val
;
341 kctl
->put(kctl
, uctl
);
345 static void alc880_unsol_event(struct hda_codec
*codec
, unsigned int res
)
347 /* For some reason, the res given from ALC880 is broken.
348 Here we adjust it properly. */
349 snd_hda_jack_unsol_event(codec
, res
>> 2);
352 /* Change EAPD to verb control */
353 static void alc_fill_eapd_coef(struct hda_codec
*codec
)
357 coef
= alc_get_coef0(codec
);
359 switch (codec
->core
.vendor_id
) {
361 alc_update_coef_idx(codec
, 0x7, 0, 1<<5);
365 alc_update_coef_idx(codec
, 0x7, 0, 1<<13);
368 if ((coef
& 0x00f0) == 0x0010)
369 alc_update_coef_idx(codec
, 0xd, 0, 1<<14);
370 if ((coef
& 0x00f0) == 0x0020)
371 alc_update_coef_idx(codec
, 0x4, 1<<15, 0);
372 if ((coef
& 0x00f0) == 0x0030)
373 alc_update_coef_idx(codec
, 0x10, 1<<9, 0);
379 alc_update_coef_idx(codec
, 0x4, 1<<15, 0);
384 alc_update_coef_idx(codec
, 0x67, 0xf000, 0x3000);
403 alc_update_coef_idx(codec
, 0x10, 1<<9, 0);
406 alc_update_coef_idx(codec
, 0xe, 0, 1<<0);
409 alc_update_coef_idx(codec
, 0x10, 1<<9, 0);
410 alc_write_coef_idx(codec
, 0x8, 0x4ab7);
413 alc_update_coef_idx(codec
, 0xa, 1<<13, 0);
422 alc_update_coef_idx(codec
, 0x10, 1<<15, 0);
425 if ((coef
& 0x00f0) == 0x0030)
426 alc_update_coef_idx(codec
, 0x4, 1<<10, 0); /* EAPD Ctrl */
435 alc_update_coef_idx(codec
, 0xd, 0, 1<<14); /* EAPD Ctrl */
439 alc_update_coef_idx(codec
, 0x19, 1<<13, 0);
442 alc_update_coef_idx(codec
, 0x7, 3<<13, 0);
445 alc_update_coef_idx(codec
, 0x4, 1<<10, 0);
448 if ((coef
& 0x00f0) == 0x0020 || (coef
& 0x00f0) == 0x0030)
449 alc_update_coef_idx(codec
, 0x7, 1<<5, 0);
453 alc_update_coef_idx(codec
, 0x7, 1<<5, 0);
460 alc_update_coef_idx(codec
, 0x7, 1<<1, 0);
465 /* additional initialization for ALC888 variants */
466 static void alc888_coef_init(struct hda_codec
*codec
)
468 switch (alc_get_coef0(codec
) & 0x00f0) {
473 alc_update_coef_idx(codec
, 7, 0, 0x2030); /* Turn EAPD to High */
478 /* turn on/off EAPD control (only if available) */
479 static void set_eapd(struct hda_codec
*codec
, hda_nid_t nid
, int on
)
481 if (get_wcaps_type(get_wcaps(codec
, nid
)) != AC_WID_PIN
)
483 if (snd_hda_query_pin_caps(codec
, nid
) & AC_PINCAP_EAPD
)
484 snd_hda_codec_write(codec
, nid
, 0, AC_VERB_SET_EAPD_BTLENABLE
,
488 /* turn on/off EAPD controls of the codec */
489 static void alc_auto_setup_eapd(struct hda_codec
*codec
, bool on
)
491 /* We currently only handle front, HP */
492 static const hda_nid_t pins
[] = {
493 0x0f, 0x10, 0x14, 0x15, 0x17, 0
496 for (p
= pins
; *p
; p
++)
497 set_eapd(codec
, *p
, on
);
500 static int find_ext_mic_pin(struct hda_codec
*codec
);
502 static void alc_headset_mic_no_shutup(struct hda_codec
*codec
)
504 const struct hda_pincfg
*pin
;
505 int mic_pin
= find_ext_mic_pin(codec
);
508 /* don't shut up pins when unloading the driver; otherwise it breaks
509 * the default pin setup at the next load of the driver
511 if (codec
->bus
->shutdown
)
514 snd_array_for_each(&codec
->init_pins
, i
, pin
) {
515 /* use read here for syncing after issuing each verb */
516 if (pin
->nid
!= mic_pin
)
517 snd_hda_codec_read(codec
, pin
->nid
, 0,
518 AC_VERB_SET_PIN_WIDGET_CONTROL
, 0);
521 codec
->pins_shutup
= 1;
524 static void alc_shutup_pins(struct hda_codec
*codec
)
526 struct alc_spec
*spec
= codec
->spec
;
528 switch (codec
->core
.vendor_id
) {
535 alc_headset_mic_no_shutup(codec
);
538 if (!spec
->no_shutup_pins
)
539 snd_hda_shutup_pins(codec
);
544 /* generic shutup callback;
545 * just turning off EAPD and a little pause for avoiding pop-noise
547 static void alc_eapd_shutup(struct hda_codec
*codec
)
549 struct alc_spec
*spec
= codec
->spec
;
551 alc_auto_setup_eapd(codec
, false);
552 if (!spec
->no_depop_delay
)
554 alc_shutup_pins(codec
);
557 /* generic EAPD initialization */
558 static void alc_auto_init_amp(struct hda_codec
*codec
, int type
)
560 alc_auto_setup_eapd(codec
, true);
561 alc_write_gpio(codec
);
563 case ALC_INIT_DEFAULT
:
564 switch (codec
->core
.vendor_id
) {
566 alc_update_coefex_idx(codec
, 0x1a, 7, 0, 0x2010);
572 alc_update_coef_idx(codec
, 7, 0, 0x2030);
575 alc888_coef_init(codec
);
582 /* get a primary headphone pin if available */
583 static hda_nid_t
alc_get_hp_pin(struct alc_spec
*spec
)
585 if (spec
->gen
.autocfg
.hp_pins
[0])
586 return spec
->gen
.autocfg
.hp_pins
[0];
587 if (spec
->gen
.autocfg
.line_out_type
== AC_JACK_HP_OUT
)
588 return spec
->gen
.autocfg
.line_out_pins
[0];
593 * Realtek SSID verification
596 /* Could be any non-zero and even value. When used as fixup, tells
597 * the driver to ignore any present sku defines.
599 #define ALC_FIXUP_SKU_IGNORE (2)
601 static void alc_fixup_sku_ignore(struct hda_codec
*codec
,
602 const struct hda_fixup
*fix
, int action
)
604 struct alc_spec
*spec
= codec
->spec
;
605 if (action
== HDA_FIXUP_ACT_PRE_PROBE
) {
606 spec
->cdefine
.fixup
= 1;
607 spec
->cdefine
.sku_cfg
= ALC_FIXUP_SKU_IGNORE
;
611 static void alc_fixup_no_depop_delay(struct hda_codec
*codec
,
612 const struct hda_fixup
*fix
, int action
)
614 struct alc_spec
*spec
= codec
->spec
;
616 if (action
== HDA_FIXUP_ACT_PROBE
) {
617 spec
->no_depop_delay
= 1;
618 codec
->depop_delay
= 0;
622 static int alc_auto_parse_customize_define(struct hda_codec
*codec
)
624 unsigned int ass
, tmp
, i
;
626 struct alc_spec
*spec
= codec
->spec
;
628 spec
->cdefine
.enable_pcbeep
= 1; /* assume always enabled */
630 if (spec
->cdefine
.fixup
) {
631 ass
= spec
->cdefine
.sku_cfg
;
632 if (ass
== ALC_FIXUP_SKU_IGNORE
)
637 if (!codec
->bus
->pci
)
639 ass
= codec
->core
.subsystem_id
& 0xffff;
640 if (ass
!= codec
->bus
->pci
->subsystem_device
&& (ass
& 1))
644 if (codec
->core
.vendor_id
== 0x10ec0260)
646 ass
= snd_hda_codec_get_pincfg(codec
, nid
);
649 codec_info(codec
, "%s: SKU not ready 0x%08x\n",
650 codec
->core
.chip_name
, ass
);
656 for (i
= 1; i
< 16; i
++) {
660 if (((ass
>> 16) & 0xf) != tmp
)
663 spec
->cdefine
.port_connectivity
= ass
>> 30;
664 spec
->cdefine
.enable_pcbeep
= (ass
& 0x100000) >> 20;
665 spec
->cdefine
.check_sum
= (ass
>> 16) & 0xf;
666 spec
->cdefine
.customization
= ass
>> 8;
668 spec
->cdefine
.sku_cfg
= ass
;
669 spec
->cdefine
.external_amp
= (ass
& 0x38) >> 3;
670 spec
->cdefine
.platform_type
= (ass
& 0x4) >> 2;
671 spec
->cdefine
.swap
= (ass
& 0x2) >> 1;
672 spec
->cdefine
.override
= ass
& 0x1;
674 codec_dbg(codec
, "SKU: Nid=0x%x sku_cfg=0x%08x\n",
675 nid
, spec
->cdefine
.sku_cfg
);
676 codec_dbg(codec
, "SKU: port_connectivity=0x%x\n",
677 spec
->cdefine
.port_connectivity
);
678 codec_dbg(codec
, "SKU: enable_pcbeep=0x%x\n", spec
->cdefine
.enable_pcbeep
);
679 codec_dbg(codec
, "SKU: check_sum=0x%08x\n", spec
->cdefine
.check_sum
);
680 codec_dbg(codec
, "SKU: customization=0x%08x\n", spec
->cdefine
.customization
);
681 codec_dbg(codec
, "SKU: external_amp=0x%x\n", spec
->cdefine
.external_amp
);
682 codec_dbg(codec
, "SKU: platform_type=0x%x\n", spec
->cdefine
.platform_type
);
683 codec_dbg(codec
, "SKU: swap=0x%x\n", spec
->cdefine
.swap
);
684 codec_dbg(codec
, "SKU: override=0x%x\n", spec
->cdefine
.override
);
689 /* return the position of NID in the list, or -1 if not found */
690 static int find_idx_in_nid_list(hda_nid_t nid
, const hda_nid_t
*list
, int nums
)
693 for (i
= 0; i
< nums
; i
++)
698 /* return true if the given NID is found in the list */
699 static bool found_in_nid_list(hda_nid_t nid
, const hda_nid_t
*list
, int nums
)
701 return find_idx_in_nid_list(nid
, list
, nums
) >= 0;
704 /* check subsystem ID and set up device-specific initialization;
705 * return 1 if initialized, 0 if invalid SSID
707 /* 32-bit subsystem ID for BIOS loading in HD Audio codec.
708 * 31 ~ 16 : Manufacture ID
710 * 7 ~ 0 : Assembly ID
711 * port-A --> pin 39/41, port-E --> pin 14/15, port-D --> pin 35/36
713 static int alc_subsystem_id(struct hda_codec
*codec
, const hda_nid_t
*ports
)
715 unsigned int ass
, tmp
, i
;
717 struct alc_spec
*spec
= codec
->spec
;
719 if (spec
->cdefine
.fixup
) {
720 ass
= spec
->cdefine
.sku_cfg
;
721 if (ass
== ALC_FIXUP_SKU_IGNORE
)
726 ass
= codec
->core
.subsystem_id
& 0xffff;
727 if (codec
->bus
->pci
&&
728 ass
!= codec
->bus
->pci
->subsystem_device
&& (ass
& 1))
731 /* invalid SSID, check the special NID pin defcfg instead */
733 * 31~30 : port connectivity
736 * 19~16 : Check sum (15:1)
741 if (codec
->core
.vendor_id
== 0x10ec0260)
743 ass
= snd_hda_codec_get_pincfg(codec
, nid
);
745 "realtek: No valid SSID, checking pincfg 0x%08x for NID 0x%x\n",
749 if ((ass
>> 30) != 1) /* no physical connection */
754 for (i
= 1; i
< 16; i
++) {
758 if (((ass
>> 16) & 0xf) != tmp
)
761 codec_dbg(codec
, "realtek: Enabling init ASM_ID=0x%04x CODEC_ID=%08x\n",
762 ass
& 0xffff, codec
->core
.vendor_id
);
766 * 2 : 0 --> Desktop, 1 --> Laptop
767 * 3~5 : External Amplifier control
770 tmp
= (ass
& 0x38) >> 3; /* external Amp control */
771 if (spec
->init_amp
== ALC_INIT_UNDEFINED
) {
774 alc_setup_gpio(codec
, 0x01);
777 alc_setup_gpio(codec
, 0x02);
780 alc_setup_gpio(codec
, 0x03);
784 spec
->init_amp
= ALC_INIT_DEFAULT
;
789 /* is laptop or Desktop and enable the function "Mute internal speaker
790 * when the external headphone out jack is plugged"
795 * 10~8 : Jack location
796 * 12~11: Headphone out -> 00: PortA, 01: PortE, 02: PortD, 03: Resvered
798 * 15 : 1 --> enable the function "Mute internal speaker
799 * when the external headphone out jack is plugged"
801 if (!alc_get_hp_pin(spec
)) {
803 tmp
= (ass
>> 11) & 0x3; /* HP to chassis */
805 if (found_in_nid_list(nid
, spec
->gen
.autocfg
.line_out_pins
,
806 spec
->gen
.autocfg
.line_outs
))
808 spec
->gen
.autocfg
.hp_pins
[0] = nid
;
813 /* Check the validity of ALC subsystem-id
814 * ports contains an array of 4 pin NIDs for port-A, E, D and I */
815 static void alc_ssid_check(struct hda_codec
*codec
, const hda_nid_t
*ports
)
817 if (!alc_subsystem_id(codec
, ports
)) {
818 struct alc_spec
*spec
= codec
->spec
;
819 if (spec
->init_amp
== ALC_INIT_UNDEFINED
) {
821 "realtek: Enable default setup for auto mode as fallback\n");
822 spec
->init_amp
= ALC_INIT_DEFAULT
;
830 static void alc_fixup_inv_dmic(struct hda_codec
*codec
,
831 const struct hda_fixup
*fix
, int action
)
833 struct alc_spec
*spec
= codec
->spec
;
835 spec
->gen
.inv_dmic_split
= 1;
839 static int alc_build_controls(struct hda_codec
*codec
)
843 err
= snd_hda_gen_build_controls(codec
);
847 snd_hda_apply_fixup(codec
, HDA_FIXUP_ACT_BUILD
);
856 static void alc_pre_init(struct hda_codec
*codec
)
858 alc_fill_eapd_coef(codec
);
861 #define is_s3_resume(codec) \
862 ((codec)->core.dev.power.power_state.event == PM_EVENT_RESUME)
863 #define is_s4_resume(codec) \
864 ((codec)->core.dev.power.power_state.event == PM_EVENT_RESTORE)
866 static int alc_init(struct hda_codec
*codec
)
868 struct alc_spec
*spec
= codec
->spec
;
870 /* hibernation resume needs the full chip initialization */
871 if (is_s4_resume(codec
))
875 spec
->init_hook(codec
);
877 spec
->gen
.skip_verbs
= 1; /* applied in below */
878 snd_hda_gen_init(codec
);
880 alc_auto_init_amp(codec
, spec
->init_amp
);
881 snd_hda_apply_verbs(codec
); /* apply verbs here after own init */
883 snd_hda_apply_fixup(codec
, HDA_FIXUP_ACT_INIT
);
888 static inline void alc_shutup(struct hda_codec
*codec
)
890 struct alc_spec
*spec
= codec
->spec
;
892 if (!snd_hda_get_bool_hint(codec
, "shutup"))
893 return; /* disabled explicitly by hints */
895 if (spec
&& spec
->shutup
)
898 alc_shutup_pins(codec
);
901 #define alc_free snd_hda_gen_free
904 static void alc_power_eapd(struct hda_codec
*codec
)
906 alc_auto_setup_eapd(codec
, false);
909 static int alc_suspend(struct hda_codec
*codec
)
911 struct alc_spec
*spec
= codec
->spec
;
913 if (spec
&& spec
->power_hook
)
914 spec
->power_hook(codec
);
920 static int alc_resume(struct hda_codec
*codec
)
922 struct alc_spec
*spec
= codec
->spec
;
924 if (!spec
->no_depop_delay
)
925 msleep(150); /* to avoid pop noise */
926 codec
->patch_ops
.init(codec
);
927 snd_hda_regmap_sync(codec
);
928 hda_call_check_power_status(codec
, 0x01);
935 static const struct hda_codec_ops alc_patch_ops
= {
936 .build_controls
= alc_build_controls
,
937 .build_pcms
= snd_hda_gen_build_pcms
,
940 .unsol_event
= snd_hda_jack_unsol_event
,
942 .resume
= alc_resume
,
943 .suspend
= alc_suspend
,
944 .check_power_status
= snd_hda_gen_check_power_status
,
949 #define alc_codec_rename(codec, name) snd_hda_codec_set_name(codec, name)
952 * Rename codecs appropriately from COEF value or subvendor id
954 struct alc_codec_rename_table
{
955 unsigned int vendor_id
;
956 unsigned short coef_mask
;
957 unsigned short coef_bits
;
961 struct alc_codec_rename_pci_table
{
962 unsigned int codec_vendor_id
;
963 unsigned short pci_subvendor
;
964 unsigned short pci_subdevice
;
968 static const struct alc_codec_rename_table rename_tbl
[] = {
969 { 0x10ec0221, 0xf00f, 0x1003, "ALC231" },
970 { 0x10ec0269, 0xfff0, 0x3010, "ALC277" },
971 { 0x10ec0269, 0xf0f0, 0x2010, "ALC259" },
972 { 0x10ec0269, 0xf0f0, 0x3010, "ALC258" },
973 { 0x10ec0269, 0x00f0, 0x0010, "ALC269VB" },
974 { 0x10ec0269, 0xffff, 0xa023, "ALC259" },
975 { 0x10ec0269, 0xffff, 0x6023, "ALC281X" },
976 { 0x10ec0269, 0x00f0, 0x0020, "ALC269VC" },
977 { 0x10ec0269, 0x00f0, 0x0030, "ALC269VD" },
978 { 0x10ec0662, 0xffff, 0x4020, "ALC656" },
979 { 0x10ec0887, 0x00f0, 0x0030, "ALC887-VD" },
980 { 0x10ec0888, 0x00f0, 0x0030, "ALC888-VD" },
981 { 0x10ec0888, 0xf0f0, 0x3020, "ALC886" },
982 { 0x10ec0899, 0x2000, 0x2000, "ALC899" },
983 { 0x10ec0892, 0xffff, 0x8020, "ALC661" },
984 { 0x10ec0892, 0xffff, 0x8011, "ALC661" },
985 { 0x10ec0892, 0xffff, 0x4011, "ALC656" },
989 static const struct alc_codec_rename_pci_table rename_pci_tbl
[] = {
990 { 0x10ec0280, 0x1028, 0, "ALC3220" },
991 { 0x10ec0282, 0x1028, 0, "ALC3221" },
992 { 0x10ec0283, 0x1028, 0, "ALC3223" },
993 { 0x10ec0288, 0x1028, 0, "ALC3263" },
994 { 0x10ec0292, 0x1028, 0, "ALC3226" },
995 { 0x10ec0293, 0x1028, 0, "ALC3235" },
996 { 0x10ec0255, 0x1028, 0, "ALC3234" },
997 { 0x10ec0668, 0x1028, 0, "ALC3661" },
998 { 0x10ec0275, 0x1028, 0, "ALC3260" },
999 { 0x10ec0899, 0x1028, 0, "ALC3861" },
1000 { 0x10ec0298, 0x1028, 0, "ALC3266" },
1001 { 0x10ec0236, 0x1028, 0, "ALC3204" },
1002 { 0x10ec0256, 0x1028, 0, "ALC3246" },
1003 { 0x10ec0225, 0x1028, 0, "ALC3253" },
1004 { 0x10ec0295, 0x1028, 0, "ALC3254" },
1005 { 0x10ec0299, 0x1028, 0, "ALC3271" },
1006 { 0x10ec0670, 0x1025, 0, "ALC669X" },
1007 { 0x10ec0676, 0x1025, 0, "ALC679X" },
1008 { 0x10ec0282, 0x1043, 0, "ALC3229" },
1009 { 0x10ec0233, 0x1043, 0, "ALC3236" },
1010 { 0x10ec0280, 0x103c, 0, "ALC3228" },
1011 { 0x10ec0282, 0x103c, 0, "ALC3227" },
1012 { 0x10ec0286, 0x103c, 0, "ALC3242" },
1013 { 0x10ec0290, 0x103c, 0, "ALC3241" },
1014 { 0x10ec0668, 0x103c, 0, "ALC3662" },
1015 { 0x10ec0283, 0x17aa, 0, "ALC3239" },
1016 { 0x10ec0292, 0x17aa, 0, "ALC3232" },
1017 { } /* terminator */
1020 static int alc_codec_rename_from_preset(struct hda_codec
*codec
)
1022 const struct alc_codec_rename_table
*p
;
1023 const struct alc_codec_rename_pci_table
*q
;
1025 for (p
= rename_tbl
; p
->vendor_id
; p
++) {
1026 if (p
->vendor_id
!= codec
->core
.vendor_id
)
1028 if ((alc_get_coef0(codec
) & p
->coef_mask
) == p
->coef_bits
)
1029 return alc_codec_rename(codec
, p
->name
);
1032 if (!codec
->bus
->pci
)
1034 for (q
= rename_pci_tbl
; q
->codec_vendor_id
; q
++) {
1035 if (q
->codec_vendor_id
!= codec
->core
.vendor_id
)
1037 if (q
->pci_subvendor
!= codec
->bus
->pci
->subsystem_vendor
)
1039 if (!q
->pci_subdevice
||
1040 q
->pci_subdevice
== codec
->bus
->pci
->subsystem_device
)
1041 return alc_codec_rename(codec
, q
->name
);
1049 * Digital-beep handlers
1051 #ifdef CONFIG_SND_HDA_INPUT_BEEP
1053 /* additional beep mixers; private_value will be overwritten */
1054 static const struct snd_kcontrol_new alc_beep_mixer
[] = {
1055 HDA_CODEC_VOLUME("Beep Playback Volume", 0, 0, HDA_INPUT
),
1056 HDA_CODEC_MUTE_BEEP("Beep Playback Switch", 0, 0, HDA_INPUT
),
1059 /* set up and create beep controls */
1060 static int set_beep_amp(struct alc_spec
*spec
, hda_nid_t nid
,
1063 struct snd_kcontrol_new
*knew
;
1064 unsigned int beep_amp
= HDA_COMPOSE_AMP_VAL(nid
, 3, idx
, dir
);
1067 for (i
= 0; i
< ARRAY_SIZE(alc_beep_mixer
); i
++) {
1068 knew
= snd_hda_gen_add_kctl(&spec
->gen
, NULL
,
1069 &alc_beep_mixer
[i
]);
1072 knew
->private_value
= beep_amp
;
1077 static const struct snd_pci_quirk beep_allow_list
[] = {
1078 SND_PCI_QUIRK(0x1043, 0x103c, "ASUS", 1),
1079 SND_PCI_QUIRK(0x1043, 0x115d, "ASUS", 1),
1080 SND_PCI_QUIRK(0x1043, 0x829f, "ASUS", 1),
1081 SND_PCI_QUIRK(0x1043, 0x8376, "EeePC", 1),
1082 SND_PCI_QUIRK(0x1043, 0x83ce, "EeePC", 1),
1083 SND_PCI_QUIRK(0x1043, 0x831a, "EeePC", 1),
1084 SND_PCI_QUIRK(0x1043, 0x834a, "EeePC", 1),
1085 SND_PCI_QUIRK(0x1458, 0xa002, "GA-MA790X", 1),
1086 SND_PCI_QUIRK(0x8086, 0xd613, "Intel", 1),
1087 /* denylist -- no beep available */
1088 SND_PCI_QUIRK(0x17aa, 0x309e, "Lenovo ThinkCentre M73", 0),
1089 SND_PCI_QUIRK(0x17aa, 0x30a3, "Lenovo ThinkCentre M93", 0),
1093 static inline int has_cdefine_beep(struct hda_codec
*codec
)
1095 struct alc_spec
*spec
= codec
->spec
;
1096 const struct snd_pci_quirk
*q
;
1097 q
= snd_pci_quirk_lookup(codec
->bus
->pci
, beep_allow_list
);
1100 return spec
->cdefine
.enable_pcbeep
;
1103 #define set_beep_amp(spec, nid, idx, dir) 0
1104 #define has_cdefine_beep(codec) 0
1107 /* parse the BIOS configuration and set up the alc_spec */
1108 /* return 1 if successful, 0 if the proper config is not found,
1109 * or a negative error code
1111 static int alc_parse_auto_config(struct hda_codec
*codec
,
1112 const hda_nid_t
*ignore_nids
,
1113 const hda_nid_t
*ssid_nids
)
1115 struct alc_spec
*spec
= codec
->spec
;
1116 struct auto_pin_cfg
*cfg
= &spec
->gen
.autocfg
;
1119 err
= snd_hda_parse_pin_defcfg(codec
, cfg
, ignore_nids
,
1125 alc_ssid_check(codec
, ssid_nids
);
1127 err
= snd_hda_gen_parse_auto_config(codec
, cfg
);
1134 /* common preparation job for alc_spec */
1135 static int alc_alloc_spec(struct hda_codec
*codec
, hda_nid_t mixer_nid
)
1137 struct alc_spec
*spec
= kzalloc(sizeof(*spec
), GFP_KERNEL
);
1143 snd_hda_gen_spec_init(&spec
->gen
);
1144 spec
->gen
.mixer_nid
= mixer_nid
;
1145 spec
->gen
.own_eapd_ctl
= 1;
1146 codec
->single_adc_amp
= 1;
1147 /* FIXME: do we need this for all Realtek codec models? */
1148 codec
->spdif_status_reset
= 1;
1149 codec
->forced_resume
= 1;
1150 codec
->patch_ops
= alc_patch_ops
;
1152 err
= alc_codec_rename_from_preset(codec
);
1160 static int alc880_parse_auto_config(struct hda_codec
*codec
)
1162 static const hda_nid_t alc880_ignore
[] = { 0x1d, 0 };
1163 static const hda_nid_t alc880_ssids
[] = { 0x15, 0x1b, 0x14, 0 };
1164 return alc_parse_auto_config(codec
, alc880_ignore
, alc880_ssids
);
1173 ALC880_FIXUP_MEDION_RIM
,
1175 ALC880_FIXUP_LG_LW25
,
1177 ALC880_FIXUP_EAPD_COEF
,
1178 ALC880_FIXUP_TCL_S700
,
1179 ALC880_FIXUP_VOL_KNOB
,
1180 ALC880_FIXUP_FUJITSU
,
1182 ALC880_FIXUP_UNIWILL
,
1183 ALC880_FIXUP_UNIWILL_DIG
,
1185 ALC880_FIXUP_ASUS_W5A
,
1186 ALC880_FIXUP_3ST_BASE
,
1188 ALC880_FIXUP_3ST_DIG
,
1189 ALC880_FIXUP_5ST_BASE
,
1191 ALC880_FIXUP_5ST_DIG
,
1192 ALC880_FIXUP_6ST_BASE
,
1194 ALC880_FIXUP_6ST_DIG
,
1195 ALC880_FIXUP_6ST_AUTOMUTE
,
1198 /* enable the volume-knob widget support on NID 0x21 */
1199 static void alc880_fixup_vol_knob(struct hda_codec
*codec
,
1200 const struct hda_fixup
*fix
, int action
)
1202 if (action
== HDA_FIXUP_ACT_PROBE
)
1203 snd_hda_jack_detect_enable_callback(codec
, 0x21,
1204 alc_update_knob_master
);
1207 static const struct hda_fixup alc880_fixups
[] = {
1208 [ALC880_FIXUP_GPIO1
] = {
1209 .type
= HDA_FIXUP_FUNC
,
1210 .v
.func
= alc_fixup_gpio1
,
1212 [ALC880_FIXUP_GPIO2
] = {
1213 .type
= HDA_FIXUP_FUNC
,
1214 .v
.func
= alc_fixup_gpio2
,
1216 [ALC880_FIXUP_MEDION_RIM
] = {
1217 .type
= HDA_FIXUP_VERBS
,
1218 .v
.verbs
= (const struct hda_verb
[]) {
1219 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x07 },
1220 { 0x20, AC_VERB_SET_PROC_COEF
, 0x3060 },
1224 .chain_id
= ALC880_FIXUP_GPIO2
,
1226 [ALC880_FIXUP_LG
] = {
1227 .type
= HDA_FIXUP_PINS
,
1228 .v
.pins
= (const struct hda_pintbl
[]) {
1229 /* disable bogus unused pins */
1230 { 0x16, 0x411111f0 },
1231 { 0x18, 0x411111f0 },
1232 { 0x1a, 0x411111f0 },
1236 [ALC880_FIXUP_LG_LW25
] = {
1237 .type
= HDA_FIXUP_PINS
,
1238 .v
.pins
= (const struct hda_pintbl
[]) {
1239 { 0x1a, 0x0181344f }, /* line-in */
1240 { 0x1b, 0x0321403f }, /* headphone */
1244 [ALC880_FIXUP_W810
] = {
1245 .type
= HDA_FIXUP_PINS
,
1246 .v
.pins
= (const struct hda_pintbl
[]) {
1247 /* disable bogus unused pins */
1248 { 0x17, 0x411111f0 },
1252 .chain_id
= ALC880_FIXUP_GPIO2
,
1254 [ALC880_FIXUP_EAPD_COEF
] = {
1255 .type
= HDA_FIXUP_VERBS
,
1256 .v
.verbs
= (const struct hda_verb
[]) {
1257 /* change to EAPD mode */
1258 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x07 },
1259 { 0x20, AC_VERB_SET_PROC_COEF
, 0x3060 },
1263 [ALC880_FIXUP_TCL_S700
] = {
1264 .type
= HDA_FIXUP_VERBS
,
1265 .v
.verbs
= (const struct hda_verb
[]) {
1266 /* change to EAPD mode */
1267 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x07 },
1268 { 0x20, AC_VERB_SET_PROC_COEF
, 0x3070 },
1272 .chain_id
= ALC880_FIXUP_GPIO2
,
1274 [ALC880_FIXUP_VOL_KNOB
] = {
1275 .type
= HDA_FIXUP_FUNC
,
1276 .v
.func
= alc880_fixup_vol_knob
,
1278 [ALC880_FIXUP_FUJITSU
] = {
1279 /* override all pins as BIOS on old Amilo is broken */
1280 .type
= HDA_FIXUP_PINS
,
1281 .v
.pins
= (const struct hda_pintbl
[]) {
1282 { 0x14, 0x0121401f }, /* HP */
1283 { 0x15, 0x99030120 }, /* speaker */
1284 { 0x16, 0x99030130 }, /* bass speaker */
1285 { 0x17, 0x411111f0 }, /* N/A */
1286 { 0x18, 0x411111f0 }, /* N/A */
1287 { 0x19, 0x01a19950 }, /* mic-in */
1288 { 0x1a, 0x411111f0 }, /* N/A */
1289 { 0x1b, 0x411111f0 }, /* N/A */
1290 { 0x1c, 0x411111f0 }, /* N/A */
1291 { 0x1d, 0x411111f0 }, /* N/A */
1292 { 0x1e, 0x01454140 }, /* SPDIF out */
1296 .chain_id
= ALC880_FIXUP_VOL_KNOB
,
1298 [ALC880_FIXUP_F1734
] = {
1299 /* almost compatible with FUJITSU, but no bass and SPDIF */
1300 .type
= HDA_FIXUP_PINS
,
1301 .v
.pins
= (const struct hda_pintbl
[]) {
1302 { 0x14, 0x0121401f }, /* HP */
1303 { 0x15, 0x99030120 }, /* speaker */
1304 { 0x16, 0x411111f0 }, /* N/A */
1305 { 0x17, 0x411111f0 }, /* N/A */
1306 { 0x18, 0x411111f0 }, /* N/A */
1307 { 0x19, 0x01a19950 }, /* mic-in */
1308 { 0x1a, 0x411111f0 }, /* N/A */
1309 { 0x1b, 0x411111f0 }, /* N/A */
1310 { 0x1c, 0x411111f0 }, /* N/A */
1311 { 0x1d, 0x411111f0 }, /* N/A */
1312 { 0x1e, 0x411111f0 }, /* N/A */
1316 .chain_id
= ALC880_FIXUP_VOL_KNOB
,
1318 [ALC880_FIXUP_UNIWILL
] = {
1319 /* need to fix HP and speaker pins to be parsed correctly */
1320 .type
= HDA_FIXUP_PINS
,
1321 .v
.pins
= (const struct hda_pintbl
[]) {
1322 { 0x14, 0x0121411f }, /* HP */
1323 { 0x15, 0x99030120 }, /* speaker */
1324 { 0x16, 0x99030130 }, /* bass speaker */
1328 [ALC880_FIXUP_UNIWILL_DIG
] = {
1329 .type
= HDA_FIXUP_PINS
,
1330 .v
.pins
= (const struct hda_pintbl
[]) {
1331 /* disable bogus unused pins */
1332 { 0x17, 0x411111f0 },
1333 { 0x19, 0x411111f0 },
1334 { 0x1b, 0x411111f0 },
1335 { 0x1f, 0x411111f0 },
1339 [ALC880_FIXUP_Z71V
] = {
1340 .type
= HDA_FIXUP_PINS
,
1341 .v
.pins
= (const struct hda_pintbl
[]) {
1342 /* set up the whole pins as BIOS is utterly broken */
1343 { 0x14, 0x99030120 }, /* speaker */
1344 { 0x15, 0x0121411f }, /* HP */
1345 { 0x16, 0x411111f0 }, /* N/A */
1346 { 0x17, 0x411111f0 }, /* N/A */
1347 { 0x18, 0x01a19950 }, /* mic-in */
1348 { 0x19, 0x411111f0 }, /* N/A */
1349 { 0x1a, 0x01813031 }, /* line-in */
1350 { 0x1b, 0x411111f0 }, /* N/A */
1351 { 0x1c, 0x411111f0 }, /* N/A */
1352 { 0x1d, 0x411111f0 }, /* N/A */
1353 { 0x1e, 0x0144111e }, /* SPDIF */
1357 [ALC880_FIXUP_ASUS_W5A
] = {
1358 .type
= HDA_FIXUP_PINS
,
1359 .v
.pins
= (const struct hda_pintbl
[]) {
1360 /* set up the whole pins as BIOS is utterly broken */
1361 { 0x14, 0x0121411f }, /* HP */
1362 { 0x15, 0x411111f0 }, /* N/A */
1363 { 0x16, 0x411111f0 }, /* N/A */
1364 { 0x17, 0x411111f0 }, /* N/A */
1365 { 0x18, 0x90a60160 }, /* mic */
1366 { 0x19, 0x411111f0 }, /* N/A */
1367 { 0x1a, 0x411111f0 }, /* N/A */
1368 { 0x1b, 0x411111f0 }, /* N/A */
1369 { 0x1c, 0x411111f0 }, /* N/A */
1370 { 0x1d, 0x411111f0 }, /* N/A */
1371 { 0x1e, 0xb743111e }, /* SPDIF out */
1375 .chain_id
= ALC880_FIXUP_GPIO1
,
1377 [ALC880_FIXUP_3ST_BASE
] = {
1378 .type
= HDA_FIXUP_PINS
,
1379 .v
.pins
= (const struct hda_pintbl
[]) {
1380 { 0x14, 0x01014010 }, /* line-out */
1381 { 0x15, 0x411111f0 }, /* N/A */
1382 { 0x16, 0x411111f0 }, /* N/A */
1383 { 0x17, 0x411111f0 }, /* N/A */
1384 { 0x18, 0x01a19c30 }, /* mic-in */
1385 { 0x19, 0x0121411f }, /* HP */
1386 { 0x1a, 0x01813031 }, /* line-in */
1387 { 0x1b, 0x02a19c40 }, /* front-mic */
1388 { 0x1c, 0x411111f0 }, /* N/A */
1389 { 0x1d, 0x411111f0 }, /* N/A */
1390 /* 0x1e is filled in below */
1391 { 0x1f, 0x411111f0 }, /* N/A */
1395 [ALC880_FIXUP_3ST
] = {
1396 .type
= HDA_FIXUP_PINS
,
1397 .v
.pins
= (const struct hda_pintbl
[]) {
1398 { 0x1e, 0x411111f0 }, /* N/A */
1402 .chain_id
= ALC880_FIXUP_3ST_BASE
,
1404 [ALC880_FIXUP_3ST_DIG
] = {
1405 .type
= HDA_FIXUP_PINS
,
1406 .v
.pins
= (const struct hda_pintbl
[]) {
1407 { 0x1e, 0x0144111e }, /* SPDIF */
1411 .chain_id
= ALC880_FIXUP_3ST_BASE
,
1413 [ALC880_FIXUP_5ST_BASE
] = {
1414 .type
= HDA_FIXUP_PINS
,
1415 .v
.pins
= (const struct hda_pintbl
[]) {
1416 { 0x14, 0x01014010 }, /* front */
1417 { 0x15, 0x411111f0 }, /* N/A */
1418 { 0x16, 0x01011411 }, /* CLFE */
1419 { 0x17, 0x01016412 }, /* surr */
1420 { 0x18, 0x01a19c30 }, /* mic-in */
1421 { 0x19, 0x0121411f }, /* HP */
1422 { 0x1a, 0x01813031 }, /* line-in */
1423 { 0x1b, 0x02a19c40 }, /* front-mic */
1424 { 0x1c, 0x411111f0 }, /* N/A */
1425 { 0x1d, 0x411111f0 }, /* N/A */
1426 /* 0x1e is filled in below */
1427 { 0x1f, 0x411111f0 }, /* N/A */
1431 [ALC880_FIXUP_5ST
] = {
1432 .type
= HDA_FIXUP_PINS
,
1433 .v
.pins
= (const struct hda_pintbl
[]) {
1434 { 0x1e, 0x411111f0 }, /* N/A */
1438 .chain_id
= ALC880_FIXUP_5ST_BASE
,
1440 [ALC880_FIXUP_5ST_DIG
] = {
1441 .type
= HDA_FIXUP_PINS
,
1442 .v
.pins
= (const struct hda_pintbl
[]) {
1443 { 0x1e, 0x0144111e }, /* SPDIF */
1447 .chain_id
= ALC880_FIXUP_5ST_BASE
,
1449 [ALC880_FIXUP_6ST_BASE
] = {
1450 .type
= HDA_FIXUP_PINS
,
1451 .v
.pins
= (const struct hda_pintbl
[]) {
1452 { 0x14, 0x01014010 }, /* front */
1453 { 0x15, 0x01016412 }, /* surr */
1454 { 0x16, 0x01011411 }, /* CLFE */
1455 { 0x17, 0x01012414 }, /* side */
1456 { 0x18, 0x01a19c30 }, /* mic-in */
1457 { 0x19, 0x02a19c40 }, /* front-mic */
1458 { 0x1a, 0x01813031 }, /* line-in */
1459 { 0x1b, 0x0121411f }, /* HP */
1460 { 0x1c, 0x411111f0 }, /* N/A */
1461 { 0x1d, 0x411111f0 }, /* N/A */
1462 /* 0x1e is filled in below */
1463 { 0x1f, 0x411111f0 }, /* N/A */
1467 [ALC880_FIXUP_6ST
] = {
1468 .type
= HDA_FIXUP_PINS
,
1469 .v
.pins
= (const struct hda_pintbl
[]) {
1470 { 0x1e, 0x411111f0 }, /* N/A */
1474 .chain_id
= ALC880_FIXUP_6ST_BASE
,
1476 [ALC880_FIXUP_6ST_DIG
] = {
1477 .type
= HDA_FIXUP_PINS
,
1478 .v
.pins
= (const struct hda_pintbl
[]) {
1479 { 0x1e, 0x0144111e }, /* SPDIF */
1483 .chain_id
= ALC880_FIXUP_6ST_BASE
,
1485 [ALC880_FIXUP_6ST_AUTOMUTE
] = {
1486 .type
= HDA_FIXUP_PINS
,
1487 .v
.pins
= (const struct hda_pintbl
[]) {
1488 { 0x1b, 0x0121401f }, /* HP with jack detect */
1491 .chained_before
= true,
1492 .chain_id
= ALC880_FIXUP_6ST_BASE
,
1496 static const struct snd_pci_quirk alc880_fixup_tbl
[] = {
1497 SND_PCI_QUIRK(0x1019, 0x0f69, "Coeus G610P", ALC880_FIXUP_W810
),
1498 SND_PCI_QUIRK(0x1043, 0x10c3, "ASUS W5A", ALC880_FIXUP_ASUS_W5A
),
1499 SND_PCI_QUIRK(0x1043, 0x1964, "ASUS Z71V", ALC880_FIXUP_Z71V
),
1500 SND_PCI_QUIRK_VENDOR(0x1043, "ASUS", ALC880_FIXUP_GPIO1
),
1501 SND_PCI_QUIRK(0x147b, 0x1045, "ABit AA8XE", ALC880_FIXUP_6ST_AUTOMUTE
),
1502 SND_PCI_QUIRK(0x1558, 0x5401, "Clevo GPIO2", ALC880_FIXUP_GPIO2
),
1503 SND_PCI_QUIRK_VENDOR(0x1558, "Clevo", ALC880_FIXUP_EAPD_COEF
),
1504 SND_PCI_QUIRK(0x1584, 0x9050, "Uniwill", ALC880_FIXUP_UNIWILL_DIG
),
1505 SND_PCI_QUIRK(0x1584, 0x9054, "Uniwill", ALC880_FIXUP_F1734
),
1506 SND_PCI_QUIRK(0x1584, 0x9070, "Uniwill", ALC880_FIXUP_UNIWILL
),
1507 SND_PCI_QUIRK(0x1584, 0x9077, "Uniwill P53", ALC880_FIXUP_VOL_KNOB
),
1508 SND_PCI_QUIRK(0x161f, 0x203d, "W810", ALC880_FIXUP_W810
),
1509 SND_PCI_QUIRK(0x161f, 0x205d, "Medion Rim 2150", ALC880_FIXUP_MEDION_RIM
),
1510 SND_PCI_QUIRK(0x1631, 0xe011, "PB 13201056", ALC880_FIXUP_6ST_AUTOMUTE
),
1511 SND_PCI_QUIRK(0x1734, 0x107c, "FSC Amilo M1437", ALC880_FIXUP_FUJITSU
),
1512 SND_PCI_QUIRK(0x1734, 0x1094, "FSC Amilo M1451G", ALC880_FIXUP_FUJITSU
),
1513 SND_PCI_QUIRK(0x1734, 0x10ac, "FSC AMILO Xi 1526", ALC880_FIXUP_F1734
),
1514 SND_PCI_QUIRK(0x1734, 0x10b0, "FSC Amilo Pi1556", ALC880_FIXUP_FUJITSU
),
1515 SND_PCI_QUIRK(0x1854, 0x003b, "LG", ALC880_FIXUP_LG
),
1516 SND_PCI_QUIRK(0x1854, 0x005f, "LG P1 Express", ALC880_FIXUP_LG
),
1517 SND_PCI_QUIRK(0x1854, 0x0068, "LG w1", ALC880_FIXUP_LG
),
1518 SND_PCI_QUIRK(0x1854, 0x0077, "LG LW25", ALC880_FIXUP_LG_LW25
),
1519 SND_PCI_QUIRK(0x19db, 0x4188, "TCL S700", ALC880_FIXUP_TCL_S700
),
1521 /* Below is the copied entries from alc880_quirks.c.
1522 * It's not quite sure whether BIOS sets the correct pin-config table
1523 * on these machines, thus they are kept to be compatible with
1524 * the old static quirks. Once when it's confirmed to work without
1525 * these overrides, it'd be better to remove.
1527 SND_PCI_QUIRK(0x1019, 0xa880, "ECS", ALC880_FIXUP_5ST_DIG
),
1528 SND_PCI_QUIRK(0x1019, 0xa884, "Acer APFV", ALC880_FIXUP_6ST
),
1529 SND_PCI_QUIRK(0x1025, 0x0070, "ULI", ALC880_FIXUP_3ST_DIG
),
1530 SND_PCI_QUIRK(0x1025, 0x0077, "ULI", ALC880_FIXUP_6ST_DIG
),
1531 SND_PCI_QUIRK(0x1025, 0x0078, "ULI", ALC880_FIXUP_6ST_DIG
),
1532 SND_PCI_QUIRK(0x1025, 0x0087, "ULI", ALC880_FIXUP_6ST_DIG
),
1533 SND_PCI_QUIRK(0x1025, 0xe309, "ULI", ALC880_FIXUP_3ST_DIG
),
1534 SND_PCI_QUIRK(0x1025, 0xe310, "ULI", ALC880_FIXUP_3ST
),
1535 SND_PCI_QUIRK(0x1039, 0x1234, NULL
, ALC880_FIXUP_6ST_DIG
),
1536 SND_PCI_QUIRK(0x104d, 0x81a0, "Sony", ALC880_FIXUP_3ST
),
1537 SND_PCI_QUIRK(0x104d, 0x81d6, "Sony", ALC880_FIXUP_3ST
),
1538 SND_PCI_QUIRK(0x107b, 0x3032, "Gateway", ALC880_FIXUP_5ST
),
1539 SND_PCI_QUIRK(0x107b, 0x3033, "Gateway", ALC880_FIXUP_5ST
),
1540 SND_PCI_QUIRK(0x107b, 0x4039, "Gateway", ALC880_FIXUP_5ST
),
1541 SND_PCI_QUIRK(0x1297, 0xc790, "Shuttle ST20G5", ALC880_FIXUP_6ST_DIG
),
1542 SND_PCI_QUIRK(0x1458, 0xa102, "Gigabyte K8", ALC880_FIXUP_6ST_DIG
),
1543 SND_PCI_QUIRK(0x1462, 0x1150, "MSI", ALC880_FIXUP_6ST_DIG
),
1544 SND_PCI_QUIRK(0x1509, 0x925d, "FIC P4M", ALC880_FIXUP_6ST_DIG
),
1545 SND_PCI_QUIRK(0x1565, 0x8202, "Biostar", ALC880_FIXUP_5ST_DIG
),
1546 SND_PCI_QUIRK(0x1695, 0x400d, "EPoX", ALC880_FIXUP_5ST_DIG
),
1547 SND_PCI_QUIRK(0x1695, 0x4012, "EPox EP-5LDA", ALC880_FIXUP_5ST_DIG
),
1548 SND_PCI_QUIRK(0x2668, 0x8086, NULL
, ALC880_FIXUP_6ST_DIG
), /* broken BIOS */
1549 SND_PCI_QUIRK(0x8086, 0x2668, NULL
, ALC880_FIXUP_6ST_DIG
),
1550 SND_PCI_QUIRK(0x8086, 0xa100, "Intel mobo", ALC880_FIXUP_5ST_DIG
),
1551 SND_PCI_QUIRK(0x8086, 0xd400, "Intel mobo", ALC880_FIXUP_5ST_DIG
),
1552 SND_PCI_QUIRK(0x8086, 0xd401, "Intel mobo", ALC880_FIXUP_5ST_DIG
),
1553 SND_PCI_QUIRK(0x8086, 0xd402, "Intel mobo", ALC880_FIXUP_3ST_DIG
),
1554 SND_PCI_QUIRK(0x8086, 0xe224, "Intel mobo", ALC880_FIXUP_5ST_DIG
),
1555 SND_PCI_QUIRK(0x8086, 0xe305, "Intel mobo", ALC880_FIXUP_3ST_DIG
),
1556 SND_PCI_QUIRK(0x8086, 0xe308, "Intel mobo", ALC880_FIXUP_3ST_DIG
),
1557 SND_PCI_QUIRK(0x8086, 0xe400, "Intel mobo", ALC880_FIXUP_5ST_DIG
),
1558 SND_PCI_QUIRK(0x8086, 0xe401, "Intel mobo", ALC880_FIXUP_5ST_DIG
),
1559 SND_PCI_QUIRK(0x8086, 0xe402, "Intel mobo", ALC880_FIXUP_5ST_DIG
),
1561 SND_PCI_QUIRK_VENDOR(0x8086, "Intel mobo", ALC880_FIXUP_3ST
),
1562 SND_PCI_QUIRK(0xa0a0, 0x0560, "AOpen i915GMm-HFS", ALC880_FIXUP_5ST_DIG
),
1563 SND_PCI_QUIRK(0xe803, 0x1019, NULL
, ALC880_FIXUP_6ST_DIG
),
1567 static const struct hda_model_fixup alc880_fixup_models
[] = {
1568 {.id
= ALC880_FIXUP_3ST
, .name
= "3stack"},
1569 {.id
= ALC880_FIXUP_3ST_DIG
, .name
= "3stack-digout"},
1570 {.id
= ALC880_FIXUP_5ST
, .name
= "5stack"},
1571 {.id
= ALC880_FIXUP_5ST_DIG
, .name
= "5stack-digout"},
1572 {.id
= ALC880_FIXUP_6ST
, .name
= "6stack"},
1573 {.id
= ALC880_FIXUP_6ST_DIG
, .name
= "6stack-digout"},
1574 {.id
= ALC880_FIXUP_6ST_AUTOMUTE
, .name
= "6stack-automute"},
1580 * OK, here we have finally the patch for ALC880
1582 static int patch_alc880(struct hda_codec
*codec
)
1584 struct alc_spec
*spec
;
1587 err
= alc_alloc_spec(codec
, 0x0b);
1592 spec
->gen
.need_dac_fix
= 1;
1593 spec
->gen
.beep_nid
= 0x01;
1595 codec
->patch_ops
.unsol_event
= alc880_unsol_event
;
1597 alc_pre_init(codec
);
1599 snd_hda_pick_fixup(codec
, alc880_fixup_models
, alc880_fixup_tbl
,
1601 snd_hda_apply_fixup(codec
, HDA_FIXUP_ACT_PRE_PROBE
);
1603 /* automatic parse from the BIOS config */
1604 err
= alc880_parse_auto_config(codec
);
1608 if (!spec
->gen
.no_analog
) {
1609 err
= set_beep_amp(spec
, 0x0b, 0x05, HDA_INPUT
);
1614 snd_hda_apply_fixup(codec
, HDA_FIXUP_ACT_PROBE
);
1627 static int alc260_parse_auto_config(struct hda_codec
*codec
)
1629 static const hda_nid_t alc260_ignore
[] = { 0x17, 0 };
1630 static const hda_nid_t alc260_ssids
[] = { 0x10, 0x15, 0x0f, 0 };
1631 return alc_parse_auto_config(codec
, alc260_ignore
, alc260_ssids
);
1638 ALC260_FIXUP_HP_DC5750
,
1639 ALC260_FIXUP_HP_PIN_0F
,
1642 ALC260_FIXUP_GPIO1_TOGGLE
,
1643 ALC260_FIXUP_REPLACER
,
1644 ALC260_FIXUP_HP_B1900
,
1646 ALC260_FIXUP_FSC_S7020
,
1647 ALC260_FIXUP_FSC_S7020_JWSE
,
1648 ALC260_FIXUP_VAIO_PINS
,
1651 static void alc260_gpio1_automute(struct hda_codec
*codec
)
1653 struct alc_spec
*spec
= codec
->spec
;
1655 alc_update_gpio_data(codec
, 0x01, spec
->gen
.hp_jack_present
);
1658 static void alc260_fixup_gpio1_toggle(struct hda_codec
*codec
,
1659 const struct hda_fixup
*fix
, int action
)
1661 struct alc_spec
*spec
= codec
->spec
;
1662 if (action
== HDA_FIXUP_ACT_PROBE
) {
1663 /* although the machine has only one output pin, we need to
1664 * toggle GPIO1 according to the jack state
1666 spec
->gen
.automute_hook
= alc260_gpio1_automute
;
1667 spec
->gen
.detect_hp
= 1;
1668 spec
->gen
.automute_speaker
= 1;
1669 spec
->gen
.autocfg
.hp_pins
[0] = 0x0f; /* copy it for automute */
1670 snd_hda_jack_detect_enable_callback(codec
, 0x0f,
1671 snd_hda_gen_hp_automute
);
1672 alc_setup_gpio(codec
, 0x01);
1676 static void alc260_fixup_kn1(struct hda_codec
*codec
,
1677 const struct hda_fixup
*fix
, int action
)
1679 struct alc_spec
*spec
= codec
->spec
;
1680 static const struct hda_pintbl pincfgs
[] = {
1681 { 0x0f, 0x02214000 }, /* HP/speaker */
1682 { 0x12, 0x90a60160 }, /* int mic */
1683 { 0x13, 0x02a19000 }, /* ext mic */
1684 { 0x18, 0x01446000 }, /* SPDIF out */
1685 /* disable bogus I/O pins */
1686 { 0x10, 0x411111f0 },
1687 { 0x11, 0x411111f0 },
1688 { 0x14, 0x411111f0 },
1689 { 0x15, 0x411111f0 },
1690 { 0x16, 0x411111f0 },
1691 { 0x17, 0x411111f0 },
1692 { 0x19, 0x411111f0 },
1697 case HDA_FIXUP_ACT_PRE_PROBE
:
1698 snd_hda_apply_pincfgs(codec
, pincfgs
);
1699 spec
->init_amp
= ALC_INIT_NONE
;
1704 static void alc260_fixup_fsc_s7020(struct hda_codec
*codec
,
1705 const struct hda_fixup
*fix
, int action
)
1707 struct alc_spec
*spec
= codec
->spec
;
1708 if (action
== HDA_FIXUP_ACT_PRE_PROBE
)
1709 spec
->init_amp
= ALC_INIT_NONE
;
1712 static void alc260_fixup_fsc_s7020_jwse(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_PRE_PROBE
) {
1717 spec
->gen
.add_jack_modes
= 1;
1718 spec
->gen
.hp_mic
= 1;
1722 static const struct hda_fixup alc260_fixups
[] = {
1723 [ALC260_FIXUP_HP_DC5750
] = {
1724 .type
= HDA_FIXUP_PINS
,
1725 .v
.pins
= (const struct hda_pintbl
[]) {
1726 { 0x11, 0x90130110 }, /* speaker */
1730 [ALC260_FIXUP_HP_PIN_0F
] = {
1731 .type
= HDA_FIXUP_PINS
,
1732 .v
.pins
= (const struct hda_pintbl
[]) {
1733 { 0x0f, 0x01214000 }, /* HP */
1737 [ALC260_FIXUP_COEF
] = {
1738 .type
= HDA_FIXUP_VERBS
,
1739 .v
.verbs
= (const struct hda_verb
[]) {
1740 { 0x1a, AC_VERB_SET_COEF_INDEX
, 0x07 },
1741 { 0x1a, AC_VERB_SET_PROC_COEF
, 0x3040 },
1745 [ALC260_FIXUP_GPIO1
] = {
1746 .type
= HDA_FIXUP_FUNC
,
1747 .v
.func
= alc_fixup_gpio1
,
1749 [ALC260_FIXUP_GPIO1_TOGGLE
] = {
1750 .type
= HDA_FIXUP_FUNC
,
1751 .v
.func
= alc260_fixup_gpio1_toggle
,
1753 .chain_id
= ALC260_FIXUP_HP_PIN_0F
,
1755 [ALC260_FIXUP_REPLACER
] = {
1756 .type
= HDA_FIXUP_VERBS
,
1757 .v
.verbs
= (const struct hda_verb
[]) {
1758 { 0x1a, AC_VERB_SET_COEF_INDEX
, 0x07 },
1759 { 0x1a, AC_VERB_SET_PROC_COEF
, 0x3050 },
1763 .chain_id
= ALC260_FIXUP_GPIO1_TOGGLE
,
1765 [ALC260_FIXUP_HP_B1900
] = {
1766 .type
= HDA_FIXUP_FUNC
,
1767 .v
.func
= alc260_fixup_gpio1_toggle
,
1769 .chain_id
= ALC260_FIXUP_COEF
,
1771 [ALC260_FIXUP_KN1
] = {
1772 .type
= HDA_FIXUP_FUNC
,
1773 .v
.func
= alc260_fixup_kn1
,
1775 [ALC260_FIXUP_FSC_S7020
] = {
1776 .type
= HDA_FIXUP_FUNC
,
1777 .v
.func
= alc260_fixup_fsc_s7020
,
1779 [ALC260_FIXUP_FSC_S7020_JWSE
] = {
1780 .type
= HDA_FIXUP_FUNC
,
1781 .v
.func
= alc260_fixup_fsc_s7020_jwse
,
1783 .chain_id
= ALC260_FIXUP_FSC_S7020
,
1785 [ALC260_FIXUP_VAIO_PINS
] = {
1786 .type
= HDA_FIXUP_PINS
,
1787 .v
.pins
= (const struct hda_pintbl
[]) {
1788 /* Pin configs are missing completely on some VAIOs */
1789 { 0x0f, 0x01211020 },
1790 { 0x10, 0x0001003f },
1791 { 0x11, 0x411111f0 },
1792 { 0x12, 0x01a15930 },
1793 { 0x13, 0x411111f0 },
1794 { 0x14, 0x411111f0 },
1795 { 0x15, 0x411111f0 },
1796 { 0x16, 0x411111f0 },
1797 { 0x17, 0x411111f0 },
1798 { 0x18, 0x411111f0 },
1799 { 0x19, 0x411111f0 },
1805 static const struct snd_pci_quirk alc260_fixup_tbl
[] = {
1806 SND_PCI_QUIRK(0x1025, 0x007b, "Acer C20x", ALC260_FIXUP_GPIO1
),
1807 SND_PCI_QUIRK(0x1025, 0x007f, "Acer Aspire 9500", ALC260_FIXUP_COEF
),
1808 SND_PCI_QUIRK(0x1025, 0x008f, "Acer", ALC260_FIXUP_GPIO1
),
1809 SND_PCI_QUIRK(0x103c, 0x280a, "HP dc5750", ALC260_FIXUP_HP_DC5750
),
1810 SND_PCI_QUIRK(0x103c, 0x30ba, "HP Presario B1900", ALC260_FIXUP_HP_B1900
),
1811 SND_PCI_QUIRK(0x104d, 0x81bb, "Sony VAIO", ALC260_FIXUP_VAIO_PINS
),
1812 SND_PCI_QUIRK(0x104d, 0x81e2, "Sony VAIO TX", ALC260_FIXUP_HP_PIN_0F
),
1813 SND_PCI_QUIRK(0x10cf, 0x1326, "FSC LifeBook S7020", ALC260_FIXUP_FSC_S7020
),
1814 SND_PCI_QUIRK(0x1509, 0x4540, "Favorit 100XS", ALC260_FIXUP_GPIO1
),
1815 SND_PCI_QUIRK(0x152d, 0x0729, "Quanta KN1", ALC260_FIXUP_KN1
),
1816 SND_PCI_QUIRK(0x161f, 0x2057, "Replacer 672V", ALC260_FIXUP_REPLACER
),
1817 SND_PCI_QUIRK(0x1631, 0xc017, "PB V7900", ALC260_FIXUP_COEF
),
1821 static const struct hda_model_fixup alc260_fixup_models
[] = {
1822 {.id
= ALC260_FIXUP_GPIO1
, .name
= "gpio1"},
1823 {.id
= ALC260_FIXUP_COEF
, .name
= "coef"},
1824 {.id
= ALC260_FIXUP_FSC_S7020
, .name
= "fujitsu"},
1825 {.id
= ALC260_FIXUP_FSC_S7020_JWSE
, .name
= "fujitsu-jwse"},
1831 static int patch_alc260(struct hda_codec
*codec
)
1833 struct alc_spec
*spec
;
1836 err
= alc_alloc_spec(codec
, 0x07);
1841 /* as quite a few machines require HP amp for speaker outputs,
1842 * it's easier to enable it unconditionally; even if it's unneeded,
1843 * it's almost harmless.
1845 spec
->gen
.prefer_hp_amp
= 1;
1846 spec
->gen
.beep_nid
= 0x01;
1848 spec
->shutup
= alc_eapd_shutup
;
1850 alc_pre_init(codec
);
1852 snd_hda_pick_fixup(codec
, alc260_fixup_models
, alc260_fixup_tbl
,
1854 snd_hda_apply_fixup(codec
, HDA_FIXUP_ACT_PRE_PROBE
);
1856 /* automatic parse from the BIOS config */
1857 err
= alc260_parse_auto_config(codec
);
1861 if (!spec
->gen
.no_analog
) {
1862 err
= set_beep_amp(spec
, 0x07, 0x05, HDA_INPUT
);
1867 snd_hda_apply_fixup(codec
, HDA_FIXUP_ACT_PROBE
);
1878 * ALC882/883/885/888/889 support
1880 * ALC882 is almost identical with ALC880 but has cleaner and more flexible
1881 * configuration. Each pin widget can choose any input DACs and a mixer.
1882 * Each ADC is connected from a mixer of all inputs. This makes possible
1883 * 6-channel independent captures.
1885 * In addition, an independent DAC for the multi-playback (not used in this
1893 ALC882_FIXUP_ABIT_AW9D_MAX
,
1894 ALC882_FIXUP_LENOVO_Y530
,
1895 ALC882_FIXUP_PB_M5210
,
1896 ALC882_FIXUP_ACER_ASPIRE_7736
,
1897 ALC882_FIXUP_ASUS_W90V
,
1899 ALC889_FIXUP_FRONT_HP_NO_PRESENCE
,
1900 ALC889_FIXUP_VAIO_TT
,
1901 ALC888_FIXUP_EEE1601
,
1905 ALC883_FIXUP_ACER_EAPD
,
1910 ALC882_FIXUP_ASUS_W2JC
,
1911 ALC882_FIXUP_ACER_ASPIRE_4930G
,
1912 ALC882_FIXUP_ACER_ASPIRE_8930G
,
1913 ALC882_FIXUP_ASPIRE_8930G_VERBS
,
1914 ALC885_FIXUP_MACPRO_GPIO
,
1915 ALC889_FIXUP_DAC_ROUTE
,
1916 ALC889_FIXUP_MBP_VREF
,
1917 ALC889_FIXUP_IMAC91_VREF
,
1918 ALC889_FIXUP_MBA11_VREF
,
1919 ALC889_FIXUP_MBA21_VREF
,
1920 ALC889_FIXUP_MP11_VREF
,
1921 ALC889_FIXUP_MP41_VREF
,
1922 ALC882_FIXUP_INV_DMIC
,
1923 ALC882_FIXUP_NO_PRIMARY_HP
,
1924 ALC887_FIXUP_ASUS_BASS
,
1925 ALC887_FIXUP_BASS_CHMAP
,
1926 ALC1220_FIXUP_GB_DUAL_CODECS
,
1927 ALC1220_FIXUP_CLEVO_P950
,
1928 ALC1220_FIXUP_CLEVO_PB51ED
,
1929 ALC1220_FIXUP_CLEVO_PB51ED_PINS
,
1930 ALC887_FIXUP_ASUS_AUDIO
,
1931 ALC887_FIXUP_ASUS_HMIC
,
1934 static void alc889_fixup_coef(struct hda_codec
*codec
,
1935 const struct hda_fixup
*fix
, int action
)
1937 if (action
!= HDA_FIXUP_ACT_INIT
)
1939 alc_update_coef_idx(codec
, 7, 0, 0x2030);
1942 /* set up GPIO at initialization */
1943 static void alc885_fixup_macpro_gpio(struct hda_codec
*codec
,
1944 const struct hda_fixup
*fix
, int action
)
1946 struct alc_spec
*spec
= codec
->spec
;
1948 spec
->gpio_write_delay
= true;
1949 alc_fixup_gpio3(codec
, fix
, action
);
1952 /* Fix the connection of some pins for ALC889:
1953 * At least, Acer Aspire 5935 shows the connections to DAC3/4 don't
1954 * work correctly (bko#42740)
1956 static void alc889_fixup_dac_route(struct hda_codec
*codec
,
1957 const struct hda_fixup
*fix
, int action
)
1959 if (action
== HDA_FIXUP_ACT_PRE_PROBE
) {
1960 /* fake the connections during parsing the tree */
1961 static const hda_nid_t conn1
[] = { 0x0c, 0x0d };
1962 static const hda_nid_t conn2
[] = { 0x0e, 0x0f };
1963 snd_hda_override_conn_list(codec
, 0x14, ARRAY_SIZE(conn1
), conn1
);
1964 snd_hda_override_conn_list(codec
, 0x15, ARRAY_SIZE(conn1
), conn1
);
1965 snd_hda_override_conn_list(codec
, 0x18, ARRAY_SIZE(conn2
), conn2
);
1966 snd_hda_override_conn_list(codec
, 0x1a, ARRAY_SIZE(conn2
), conn2
);
1967 } else if (action
== HDA_FIXUP_ACT_PROBE
) {
1968 /* restore the connections */
1969 static const hda_nid_t conn
[] = { 0x0c, 0x0d, 0x0e, 0x0f, 0x26 };
1970 snd_hda_override_conn_list(codec
, 0x14, ARRAY_SIZE(conn
), conn
);
1971 snd_hda_override_conn_list(codec
, 0x15, ARRAY_SIZE(conn
), conn
);
1972 snd_hda_override_conn_list(codec
, 0x18, ARRAY_SIZE(conn
), conn
);
1973 snd_hda_override_conn_list(codec
, 0x1a, ARRAY_SIZE(conn
), conn
);
1977 /* Set VREF on HP pin */
1978 static void alc889_fixup_mbp_vref(struct hda_codec
*codec
,
1979 const struct hda_fixup
*fix
, int action
)
1981 static const hda_nid_t nids
[] = { 0x14, 0x15, 0x19 };
1982 struct alc_spec
*spec
= codec
->spec
;
1985 if (action
!= HDA_FIXUP_ACT_INIT
)
1987 for (i
= 0; i
< ARRAY_SIZE(nids
); i
++) {
1988 unsigned int val
= snd_hda_codec_get_pincfg(codec
, nids
[i
]);
1989 if (get_defcfg_device(val
) != AC_JACK_HP_OUT
)
1991 val
= snd_hda_codec_get_pin_target(codec
, nids
[i
]);
1992 val
|= AC_PINCTL_VREF_80
;
1993 snd_hda_set_pin_ctl(codec
, nids
[i
], val
);
1994 spec
->gen
.keep_vref_in_automute
= 1;
1999 static void alc889_fixup_mac_pins(struct hda_codec
*codec
,
2000 const hda_nid_t
*nids
, int num_nids
)
2002 struct alc_spec
*spec
= codec
->spec
;
2005 for (i
= 0; i
< num_nids
; i
++) {
2007 val
= snd_hda_codec_get_pin_target(codec
, nids
[i
]);
2008 val
|= AC_PINCTL_VREF_50
;
2009 snd_hda_set_pin_ctl(codec
, nids
[i
], val
);
2011 spec
->gen
.keep_vref_in_automute
= 1;
2014 /* Set VREF on speaker pins on imac91 */
2015 static void alc889_fixup_imac91_vref(struct hda_codec
*codec
,
2016 const struct hda_fixup
*fix
, int action
)
2018 static const hda_nid_t nids
[] = { 0x18, 0x1a };
2020 if (action
== HDA_FIXUP_ACT_INIT
)
2021 alc889_fixup_mac_pins(codec
, nids
, ARRAY_SIZE(nids
));
2024 /* Set VREF on speaker pins on mba11 */
2025 static void alc889_fixup_mba11_vref(struct hda_codec
*codec
,
2026 const struct hda_fixup
*fix
, int action
)
2028 static const hda_nid_t nids
[] = { 0x18 };
2030 if (action
== HDA_FIXUP_ACT_INIT
)
2031 alc889_fixup_mac_pins(codec
, nids
, ARRAY_SIZE(nids
));
2034 /* Set VREF on speaker pins on mba21 */
2035 static void alc889_fixup_mba21_vref(struct hda_codec
*codec
,
2036 const struct hda_fixup
*fix
, int action
)
2038 static const hda_nid_t nids
[] = { 0x18, 0x19 };
2040 if (action
== HDA_FIXUP_ACT_INIT
)
2041 alc889_fixup_mac_pins(codec
, nids
, ARRAY_SIZE(nids
));
2044 /* Don't take HP output as primary
2045 * Strangely, the speaker output doesn't work on Vaio Z and some Vaio
2046 * all-in-one desktop PCs (for example VGC-LN51JGB) through DAC 0x05
2048 static void alc882_fixup_no_primary_hp(struct hda_codec
*codec
,
2049 const struct hda_fixup
*fix
, int action
)
2051 struct alc_spec
*spec
= codec
->spec
;
2052 if (action
== HDA_FIXUP_ACT_PRE_PROBE
) {
2053 spec
->gen
.no_primary_hp
= 1;
2054 spec
->gen
.no_multi_io
= 1;
2058 static void alc_fixup_bass_chmap(struct hda_codec
*codec
,
2059 const struct hda_fixup
*fix
, int action
);
2061 /* For dual-codec configuration, we need to disable some features to avoid
2062 * conflicts of kctls and PCM streams
2064 static void alc_fixup_dual_codecs(struct hda_codec
*codec
,
2065 const struct hda_fixup
*fix
, int action
)
2067 struct alc_spec
*spec
= codec
->spec
;
2069 if (action
!= HDA_FIXUP_ACT_PRE_PROBE
)
2071 /* disable vmaster */
2072 spec
->gen
.suppress_vmaster
= 1;
2073 /* auto-mute and auto-mic switch don't work with multiple codecs */
2074 spec
->gen
.suppress_auto_mute
= 1;
2075 spec
->gen
.suppress_auto_mic
= 1;
2076 /* disable aamix as well */
2077 spec
->gen
.mixer_nid
= 0;
2078 /* add location prefix to avoid conflicts */
2079 codec
->force_pin_prefix
= 1;
2082 static void rename_ctl(struct hda_codec
*codec
, const char *oldname
,
2083 const char *newname
)
2085 struct snd_kcontrol
*kctl
;
2087 kctl
= snd_hda_find_mixer_ctl(codec
, oldname
);
2089 strcpy(kctl
->id
.name
, newname
);
2092 static void alc1220_fixup_gb_dual_codecs(struct hda_codec
*codec
,
2093 const struct hda_fixup
*fix
,
2096 alc_fixup_dual_codecs(codec
, fix
, action
);
2098 case HDA_FIXUP_ACT_PRE_PROBE
:
2099 /* override card longname to provide a unique UCM profile */
2100 strcpy(codec
->card
->longname
, "HDAudio-Gigabyte-ALC1220DualCodecs");
2102 case HDA_FIXUP_ACT_BUILD
:
2103 /* rename Capture controls depending on the codec */
2104 rename_ctl(codec
, "Capture Volume",
2106 "Rear-Panel Capture Volume" :
2107 "Front-Panel Capture Volume");
2108 rename_ctl(codec
, "Capture Switch",
2110 "Rear-Panel Capture Switch" :
2111 "Front-Panel Capture Switch");
2116 static void alc1220_fixup_clevo_p950(struct hda_codec
*codec
,
2117 const struct hda_fixup
*fix
,
2120 static const hda_nid_t conn1
[] = { 0x0c };
2122 if (action
!= HDA_FIXUP_ACT_PRE_PROBE
)
2125 alc_update_coef_idx(codec
, 0x7, 0, 0x3c3);
2126 /* We therefore want to make sure 0x14 (front headphone) and
2127 * 0x1b (speakers) use the stereo DAC 0x02
2129 snd_hda_override_conn_list(codec
, 0x14, ARRAY_SIZE(conn1
), conn1
);
2130 snd_hda_override_conn_list(codec
, 0x1b, ARRAY_SIZE(conn1
), conn1
);
2133 static void alc_fixup_headset_mode_no_hp_mic(struct hda_codec
*codec
,
2134 const struct hda_fixup
*fix
, int action
);
2136 static void alc1220_fixup_clevo_pb51ed(struct hda_codec
*codec
,
2137 const struct hda_fixup
*fix
,
2140 alc1220_fixup_clevo_p950(codec
, fix
, action
);
2141 alc_fixup_headset_mode_no_hp_mic(codec
, fix
, action
);
2144 static void alc887_asus_hp_automute_hook(struct hda_codec
*codec
,
2145 struct hda_jack_callback
*jack
)
2147 struct alc_spec
*spec
= codec
->spec
;
2150 snd_hda_gen_hp_automute(codec
, jack
);
2152 if (spec
->gen
.hp_jack_present
)
2153 vref
= AC_PINCTL_VREF_80
;
2155 vref
= AC_PINCTL_VREF_HIZ
;
2156 snd_hda_set_pin_ctl(codec
, 0x19, PIN_HP
| vref
);
2159 static void alc887_fixup_asus_jack(struct hda_codec
*codec
,
2160 const struct hda_fixup
*fix
, int action
)
2162 struct alc_spec
*spec
= codec
->spec
;
2163 if (action
!= HDA_FIXUP_ACT_PROBE
)
2165 snd_hda_set_pin_ctl_cache(codec
, 0x1b, PIN_HP
);
2166 spec
->gen
.hp_automute_hook
= alc887_asus_hp_automute_hook
;
2169 static const struct hda_fixup alc882_fixups
[] = {
2170 [ALC882_FIXUP_ABIT_AW9D_MAX
] = {
2171 .type
= HDA_FIXUP_PINS
,
2172 .v
.pins
= (const struct hda_pintbl
[]) {
2173 { 0x15, 0x01080104 }, /* side */
2174 { 0x16, 0x01011012 }, /* rear */
2175 { 0x17, 0x01016011 }, /* clfe */
2179 [ALC882_FIXUP_LENOVO_Y530
] = {
2180 .type
= HDA_FIXUP_PINS
,
2181 .v
.pins
= (const struct hda_pintbl
[]) {
2182 { 0x15, 0x99130112 }, /* rear int speakers */
2183 { 0x16, 0x99130111 }, /* subwoofer */
2187 [ALC882_FIXUP_PB_M5210
] = {
2188 .type
= HDA_FIXUP_PINCTLS
,
2189 .v
.pins
= (const struct hda_pintbl
[]) {
2190 { 0x19, PIN_VREF50
},
2194 [ALC882_FIXUP_ACER_ASPIRE_7736
] = {
2195 .type
= HDA_FIXUP_FUNC
,
2196 .v
.func
= alc_fixup_sku_ignore
,
2198 [ALC882_FIXUP_ASUS_W90V
] = {
2199 .type
= HDA_FIXUP_PINS
,
2200 .v
.pins
= (const struct hda_pintbl
[]) {
2201 { 0x16, 0x99130110 }, /* fix sequence for CLFE */
2205 [ALC889_FIXUP_CD
] = {
2206 .type
= HDA_FIXUP_PINS
,
2207 .v
.pins
= (const struct hda_pintbl
[]) {
2208 { 0x1c, 0x993301f0 }, /* CD */
2212 [ALC889_FIXUP_FRONT_HP_NO_PRESENCE
] = {
2213 .type
= HDA_FIXUP_PINS
,
2214 .v
.pins
= (const struct hda_pintbl
[]) {
2215 { 0x1b, 0x02214120 }, /* Front HP jack is flaky, disable jack detect */
2219 .chain_id
= ALC889_FIXUP_CD
,
2221 [ALC889_FIXUP_VAIO_TT
] = {
2222 .type
= HDA_FIXUP_PINS
,
2223 .v
.pins
= (const struct hda_pintbl
[]) {
2224 { 0x17, 0x90170111 }, /* hidden surround speaker */
2228 [ALC888_FIXUP_EEE1601
] = {
2229 .type
= HDA_FIXUP_VERBS
,
2230 .v
.verbs
= (const struct hda_verb
[]) {
2231 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x0b },
2232 { 0x20, AC_VERB_SET_PROC_COEF
, 0x0838 },
2236 [ALC886_FIXUP_EAPD
] = {
2237 .type
= HDA_FIXUP_VERBS
,
2238 .v
.verbs
= (const struct hda_verb
[]) {
2239 /* change to EAPD mode */
2240 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x07 },
2241 { 0x20, AC_VERB_SET_PROC_COEF
, 0x0068 },
2245 [ALC882_FIXUP_EAPD
] = {
2246 .type
= HDA_FIXUP_VERBS
,
2247 .v
.verbs
= (const struct hda_verb
[]) {
2248 /* change to EAPD mode */
2249 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x07 },
2250 { 0x20, AC_VERB_SET_PROC_COEF
, 0x3060 },
2254 [ALC883_FIXUP_EAPD
] = {
2255 .type
= HDA_FIXUP_VERBS
,
2256 .v
.verbs
= (const struct hda_verb
[]) {
2257 /* change to EAPD mode */
2258 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x07 },
2259 { 0x20, AC_VERB_SET_PROC_COEF
, 0x3070 },
2263 [ALC883_FIXUP_ACER_EAPD
] = {
2264 .type
= HDA_FIXUP_VERBS
,
2265 .v
.verbs
= (const struct hda_verb
[]) {
2266 /* eanable EAPD on Acer laptops */
2267 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x07 },
2268 { 0x20, AC_VERB_SET_PROC_COEF
, 0x3050 },
2272 [ALC882_FIXUP_GPIO1
] = {
2273 .type
= HDA_FIXUP_FUNC
,
2274 .v
.func
= alc_fixup_gpio1
,
2276 [ALC882_FIXUP_GPIO2
] = {
2277 .type
= HDA_FIXUP_FUNC
,
2278 .v
.func
= alc_fixup_gpio2
,
2280 [ALC882_FIXUP_GPIO3
] = {
2281 .type
= HDA_FIXUP_FUNC
,
2282 .v
.func
= alc_fixup_gpio3
,
2284 [ALC882_FIXUP_ASUS_W2JC
] = {
2285 .type
= HDA_FIXUP_FUNC
,
2286 .v
.func
= alc_fixup_gpio1
,
2288 .chain_id
= ALC882_FIXUP_EAPD
,
2290 [ALC889_FIXUP_COEF
] = {
2291 .type
= HDA_FIXUP_FUNC
,
2292 .v
.func
= alc889_fixup_coef
,
2294 [ALC882_FIXUP_ACER_ASPIRE_4930G
] = {
2295 .type
= HDA_FIXUP_PINS
,
2296 .v
.pins
= (const struct hda_pintbl
[]) {
2297 { 0x16, 0x99130111 }, /* CLFE speaker */
2298 { 0x17, 0x99130112 }, /* surround speaker */
2302 .chain_id
= ALC882_FIXUP_GPIO1
,
2304 [ALC882_FIXUP_ACER_ASPIRE_8930G
] = {
2305 .type
= HDA_FIXUP_PINS
,
2306 .v
.pins
= (const struct hda_pintbl
[]) {
2307 { 0x16, 0x99130111 }, /* CLFE speaker */
2308 { 0x1b, 0x99130112 }, /* surround speaker */
2312 .chain_id
= ALC882_FIXUP_ASPIRE_8930G_VERBS
,
2314 [ALC882_FIXUP_ASPIRE_8930G_VERBS
] = {
2315 /* additional init verbs for Acer Aspire 8930G */
2316 .type
= HDA_FIXUP_VERBS
,
2317 .v
.verbs
= (const struct hda_verb
[]) {
2318 /* Enable all DACs */
2319 /* DAC DISABLE/MUTE 1? */
2320 /* setting bits 1-5 disables DAC nids 0x02-0x06
2321 * apparently. Init=0x38 */
2322 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x03 },
2323 { 0x20, AC_VERB_SET_PROC_COEF
, 0x0000 },
2324 /* DAC DISABLE/MUTE 2? */
2325 /* some bit here disables the other DACs.
2327 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x08 },
2328 { 0x20, AC_VERB_SET_PROC_COEF
, 0x0000 },
2330 * This laptop has a stereo digital microphone.
2331 * The mics are only 1cm apart which makes the stereo
2332 * useless. However, either the mic or the ALC889
2333 * makes the signal become a difference/sum signal
2334 * instead of standard stereo, which is annoying.
2335 * So instead we flip this bit which makes the
2336 * codec replicate the sum signal to both channels,
2337 * turning it into a normal mono mic.
2339 /* DMIC_CONTROL? Init value = 0x0001 */
2340 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x0b },
2341 { 0x20, AC_VERB_SET_PROC_COEF
, 0x0003 },
2342 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x07 },
2343 { 0x20, AC_VERB_SET_PROC_COEF
, 0x3050 },
2347 .chain_id
= ALC882_FIXUP_GPIO1
,
2349 [ALC885_FIXUP_MACPRO_GPIO
] = {
2350 .type
= HDA_FIXUP_FUNC
,
2351 .v
.func
= alc885_fixup_macpro_gpio
,
2353 [ALC889_FIXUP_DAC_ROUTE
] = {
2354 .type
= HDA_FIXUP_FUNC
,
2355 .v
.func
= alc889_fixup_dac_route
,
2357 [ALC889_FIXUP_MBP_VREF
] = {
2358 .type
= HDA_FIXUP_FUNC
,
2359 .v
.func
= alc889_fixup_mbp_vref
,
2361 .chain_id
= ALC882_FIXUP_GPIO1
,
2363 [ALC889_FIXUP_IMAC91_VREF
] = {
2364 .type
= HDA_FIXUP_FUNC
,
2365 .v
.func
= alc889_fixup_imac91_vref
,
2367 .chain_id
= ALC882_FIXUP_GPIO1
,
2369 [ALC889_FIXUP_MBA11_VREF
] = {
2370 .type
= HDA_FIXUP_FUNC
,
2371 .v
.func
= alc889_fixup_mba11_vref
,
2373 .chain_id
= ALC889_FIXUP_MBP_VREF
,
2375 [ALC889_FIXUP_MBA21_VREF
] = {
2376 .type
= HDA_FIXUP_FUNC
,
2377 .v
.func
= alc889_fixup_mba21_vref
,
2379 .chain_id
= ALC889_FIXUP_MBP_VREF
,
2381 [ALC889_FIXUP_MP11_VREF
] = {
2382 .type
= HDA_FIXUP_FUNC
,
2383 .v
.func
= alc889_fixup_mba11_vref
,
2385 .chain_id
= ALC885_FIXUP_MACPRO_GPIO
,
2387 [ALC889_FIXUP_MP41_VREF
] = {
2388 .type
= HDA_FIXUP_FUNC
,
2389 .v
.func
= alc889_fixup_mbp_vref
,
2391 .chain_id
= ALC885_FIXUP_MACPRO_GPIO
,
2393 [ALC882_FIXUP_INV_DMIC
] = {
2394 .type
= HDA_FIXUP_FUNC
,
2395 .v
.func
= alc_fixup_inv_dmic
,
2397 [ALC882_FIXUP_NO_PRIMARY_HP
] = {
2398 .type
= HDA_FIXUP_FUNC
,
2399 .v
.func
= alc882_fixup_no_primary_hp
,
2401 [ALC887_FIXUP_ASUS_BASS
] = {
2402 .type
= HDA_FIXUP_PINS
,
2403 .v
.pins
= (const struct hda_pintbl
[]) {
2404 {0x16, 0x99130130}, /* bass speaker */
2408 .chain_id
= ALC887_FIXUP_BASS_CHMAP
,
2410 [ALC887_FIXUP_BASS_CHMAP
] = {
2411 .type
= HDA_FIXUP_FUNC
,
2412 .v
.func
= alc_fixup_bass_chmap
,
2414 [ALC1220_FIXUP_GB_DUAL_CODECS
] = {
2415 .type
= HDA_FIXUP_FUNC
,
2416 .v
.func
= alc1220_fixup_gb_dual_codecs
,
2418 [ALC1220_FIXUP_CLEVO_P950
] = {
2419 .type
= HDA_FIXUP_FUNC
,
2420 .v
.func
= alc1220_fixup_clevo_p950
,
2422 [ALC1220_FIXUP_CLEVO_PB51ED
] = {
2423 .type
= HDA_FIXUP_FUNC
,
2424 .v
.func
= alc1220_fixup_clevo_pb51ed
,
2426 [ALC1220_FIXUP_CLEVO_PB51ED_PINS
] = {
2427 .type
= HDA_FIXUP_PINS
,
2428 .v
.pins
= (const struct hda_pintbl
[]) {
2429 { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */
2433 .chain_id
= ALC1220_FIXUP_CLEVO_PB51ED
,
2435 [ALC887_FIXUP_ASUS_AUDIO
] = {
2436 .type
= HDA_FIXUP_PINS
,
2437 .v
.pins
= (const struct hda_pintbl
[]) {
2438 { 0x15, 0x02a14150 }, /* use as headset mic, without its own jack detect */
2439 { 0x19, 0x22219420 },
2443 [ALC887_FIXUP_ASUS_HMIC
] = {
2444 .type
= HDA_FIXUP_FUNC
,
2445 .v
.func
= alc887_fixup_asus_jack
,
2447 .chain_id
= ALC887_FIXUP_ASUS_AUDIO
,
2451 static const struct snd_pci_quirk alc882_fixup_tbl
[] = {
2452 SND_PCI_QUIRK(0x1025, 0x006c, "Acer Aspire 9810", ALC883_FIXUP_ACER_EAPD
),
2453 SND_PCI_QUIRK(0x1025, 0x0090, "Acer Aspire", ALC883_FIXUP_ACER_EAPD
),
2454 SND_PCI_QUIRK(0x1025, 0x0107, "Acer Aspire", ALC883_FIXUP_ACER_EAPD
),
2455 SND_PCI_QUIRK(0x1025, 0x010a, "Acer Ferrari 5000", ALC883_FIXUP_ACER_EAPD
),
2456 SND_PCI_QUIRK(0x1025, 0x0110, "Acer Aspire", ALC883_FIXUP_ACER_EAPD
),
2457 SND_PCI_QUIRK(0x1025, 0x0112, "Acer Aspire 9303", ALC883_FIXUP_ACER_EAPD
),
2458 SND_PCI_QUIRK(0x1025, 0x0121, "Acer Aspire 5920G", ALC883_FIXUP_ACER_EAPD
),
2459 SND_PCI_QUIRK(0x1025, 0x013e, "Acer Aspire 4930G",
2460 ALC882_FIXUP_ACER_ASPIRE_4930G
),
2461 SND_PCI_QUIRK(0x1025, 0x013f, "Acer Aspire 5930G",
2462 ALC882_FIXUP_ACER_ASPIRE_4930G
),
2463 SND_PCI_QUIRK(0x1025, 0x0145, "Acer Aspire 8930G",
2464 ALC882_FIXUP_ACER_ASPIRE_8930G
),
2465 SND_PCI_QUIRK(0x1025, 0x0146, "Acer Aspire 6935G",
2466 ALC882_FIXUP_ACER_ASPIRE_8930G
),
2467 SND_PCI_QUIRK(0x1025, 0x0142, "Acer Aspire 7730G",
2468 ALC882_FIXUP_ACER_ASPIRE_4930G
),
2469 SND_PCI_QUIRK(0x1025, 0x0155, "Packard-Bell M5120", ALC882_FIXUP_PB_M5210
),
2470 SND_PCI_QUIRK(0x1025, 0x015e, "Acer Aspire 6930G",
2471 ALC882_FIXUP_ACER_ASPIRE_4930G
),
2472 SND_PCI_QUIRK(0x1025, 0x0166, "Acer Aspire 6530G",
2473 ALC882_FIXUP_ACER_ASPIRE_4930G
),
2474 SND_PCI_QUIRK(0x1025, 0x021e, "Acer Aspire 5739G",
2475 ALC882_FIXUP_ACER_ASPIRE_4930G
),
2476 SND_PCI_QUIRK(0x1025, 0x0259, "Acer Aspire 5935", ALC889_FIXUP_DAC_ROUTE
),
2477 SND_PCI_QUIRK(0x1025, 0x026b, "Acer Aspire 8940G", ALC882_FIXUP_ACER_ASPIRE_8930G
),
2478 SND_PCI_QUIRK(0x1025, 0x0296, "Acer Aspire 7736z", ALC882_FIXUP_ACER_ASPIRE_7736
),
2479 SND_PCI_QUIRK(0x1043, 0x13c2, "Asus A7M", ALC882_FIXUP_EAPD
),
2480 SND_PCI_QUIRK(0x1043, 0x1873, "ASUS W90V", ALC882_FIXUP_ASUS_W90V
),
2481 SND_PCI_QUIRK(0x1043, 0x1971, "Asus W2JC", ALC882_FIXUP_ASUS_W2JC
),
2482 SND_PCI_QUIRK(0x1043, 0x2390, "Asus D700SA", ALC887_FIXUP_ASUS_HMIC
),
2483 SND_PCI_QUIRK(0x1043, 0x835f, "Asus Eee 1601", ALC888_FIXUP_EEE1601
),
2484 SND_PCI_QUIRK(0x1043, 0x84bc, "ASUS ET2700", ALC887_FIXUP_ASUS_BASS
),
2485 SND_PCI_QUIRK(0x1043, 0x8691, "ASUS ROG Ranger VIII", ALC882_FIXUP_GPIO3
),
2486 SND_PCI_QUIRK(0x104d, 0x9043, "Sony Vaio VGC-LN51JGB", ALC882_FIXUP_NO_PRIMARY_HP
),
2487 SND_PCI_QUIRK(0x104d, 0x9044, "Sony VAIO AiO", ALC882_FIXUP_NO_PRIMARY_HP
),
2488 SND_PCI_QUIRK(0x104d, 0x9047, "Sony Vaio TT", ALC889_FIXUP_VAIO_TT
),
2489 SND_PCI_QUIRK(0x104d, 0x905a, "Sony Vaio Z", ALC882_FIXUP_NO_PRIMARY_HP
),
2490 SND_PCI_QUIRK(0x104d, 0x9060, "Sony Vaio VPCL14M1R", ALC882_FIXUP_NO_PRIMARY_HP
),
2492 /* All Apple entries are in codec SSIDs */
2493 SND_PCI_QUIRK(0x106b, 0x00a0, "MacBookPro 3,1", ALC889_FIXUP_MBP_VREF
),
2494 SND_PCI_QUIRK(0x106b, 0x00a1, "Macbook", ALC889_FIXUP_MBP_VREF
),
2495 SND_PCI_QUIRK(0x106b, 0x00a4, "MacbookPro 4,1", ALC889_FIXUP_MBP_VREF
),
2496 SND_PCI_QUIRK(0x106b, 0x0c00, "Mac Pro", ALC889_FIXUP_MP11_VREF
),
2497 SND_PCI_QUIRK(0x106b, 0x1000, "iMac 24", ALC885_FIXUP_MACPRO_GPIO
),
2498 SND_PCI_QUIRK(0x106b, 0x2800, "AppleTV", ALC885_FIXUP_MACPRO_GPIO
),
2499 SND_PCI_QUIRK(0x106b, 0x2c00, "MacbookPro rev3", ALC889_FIXUP_MBP_VREF
),
2500 SND_PCI_QUIRK(0x106b, 0x3000, "iMac", ALC889_FIXUP_MBP_VREF
),
2501 SND_PCI_QUIRK(0x106b, 0x3200, "iMac 7,1 Aluminum", ALC882_FIXUP_EAPD
),
2502 SND_PCI_QUIRK(0x106b, 0x3400, "MacBookAir 1,1", ALC889_FIXUP_MBA11_VREF
),
2503 SND_PCI_QUIRK(0x106b, 0x3500, "MacBookAir 2,1", ALC889_FIXUP_MBA21_VREF
),
2504 SND_PCI_QUIRK(0x106b, 0x3600, "Macbook 3,1", ALC889_FIXUP_MBP_VREF
),
2505 SND_PCI_QUIRK(0x106b, 0x3800, "MacbookPro 4,1", ALC889_FIXUP_MBP_VREF
),
2506 SND_PCI_QUIRK(0x106b, 0x3e00, "iMac 24 Aluminum", ALC885_FIXUP_MACPRO_GPIO
),
2507 SND_PCI_QUIRK(0x106b, 0x3f00, "Macbook 5,1", ALC889_FIXUP_IMAC91_VREF
),
2508 SND_PCI_QUIRK(0x106b, 0x4000, "MacbookPro 5,1", ALC889_FIXUP_IMAC91_VREF
),
2509 SND_PCI_QUIRK(0x106b, 0x4100, "Macmini 3,1", ALC889_FIXUP_IMAC91_VREF
),
2510 SND_PCI_QUIRK(0x106b, 0x4200, "Mac Pro 4,1/5,1", ALC889_FIXUP_MP41_VREF
),
2511 SND_PCI_QUIRK(0x106b, 0x4300, "iMac 9,1", ALC889_FIXUP_IMAC91_VREF
),
2512 SND_PCI_QUIRK(0x106b, 0x4600, "MacbookPro 5,2", ALC889_FIXUP_IMAC91_VREF
),
2513 SND_PCI_QUIRK(0x106b, 0x4900, "iMac 9,1 Aluminum", ALC889_FIXUP_IMAC91_VREF
),
2514 SND_PCI_QUIRK(0x106b, 0x4a00, "Macbook 5,2", ALC889_FIXUP_MBA11_VREF
),
2516 SND_PCI_QUIRK(0x1071, 0x8258, "Evesham Voyaeger", ALC882_FIXUP_EAPD
),
2517 SND_PCI_QUIRK(0x13fe, 0x1009, "Advantech MIT-W101", ALC886_FIXUP_EAPD
),
2518 SND_PCI_QUIRK(0x1458, 0xa002, "Gigabyte EP45-DS3/Z87X-UD3H", ALC889_FIXUP_FRONT_HP_NO_PRESENCE
),
2519 SND_PCI_QUIRK(0x1458, 0xa0b8, "Gigabyte AZ370-Gaming", ALC1220_FIXUP_GB_DUAL_CODECS
),
2520 SND_PCI_QUIRK(0x1458, 0xa0cd, "Gigabyte X570 Aorus Master", ALC1220_FIXUP_CLEVO_P950
),
2521 SND_PCI_QUIRK(0x1458, 0xa0ce, "Gigabyte X570 Aorus Xtreme", ALC1220_FIXUP_CLEVO_P950
),
2522 SND_PCI_QUIRK(0x1462, 0x11f7, "MSI-GE63", ALC1220_FIXUP_CLEVO_P950
),
2523 SND_PCI_QUIRK(0x1462, 0x1228, "MSI-GP63", ALC1220_FIXUP_CLEVO_P950
),
2524 SND_PCI_QUIRK(0x1462, 0x1229, "MSI-GP73", ALC1220_FIXUP_CLEVO_P950
),
2525 SND_PCI_QUIRK(0x1462, 0x1275, "MSI-GL63", ALC1220_FIXUP_CLEVO_P950
),
2526 SND_PCI_QUIRK(0x1462, 0x1276, "MSI-GL73", ALC1220_FIXUP_CLEVO_P950
),
2527 SND_PCI_QUIRK(0x1462, 0x1293, "MSI-GP65", ALC1220_FIXUP_CLEVO_P950
),
2528 SND_PCI_QUIRK(0x1462, 0x7350, "MSI-7350", ALC889_FIXUP_CD
),
2529 SND_PCI_QUIRK(0x1462, 0xcc34, "MSI Godlike X570", ALC1220_FIXUP_GB_DUAL_CODECS
),
2530 SND_PCI_QUIRK(0x1462, 0xda57, "MSI Z270-Gaming", ALC1220_FIXUP_GB_DUAL_CODECS
),
2531 SND_PCI_QUIRK_VENDOR(0x1462, "MSI", ALC882_FIXUP_GPIO3
),
2532 SND_PCI_QUIRK(0x147b, 0x107a, "Abit AW9D-MAX", ALC882_FIXUP_ABIT_AW9D_MAX
),
2533 SND_PCI_QUIRK(0x1558, 0x50d3, "Clevo PC50[ER][CDF]", ALC1220_FIXUP_CLEVO_PB51ED_PINS
),
2534 SND_PCI_QUIRK(0x1558, 0x65d1, "Clevo PB51[ER][CDF]", ALC1220_FIXUP_CLEVO_PB51ED_PINS
),
2535 SND_PCI_QUIRK(0x1558, 0x65d2, "Clevo PB51R[CDF]", ALC1220_FIXUP_CLEVO_PB51ED_PINS
),
2536 SND_PCI_QUIRK(0x1558, 0x65e1, "Clevo PB51[ED][DF]", ALC1220_FIXUP_CLEVO_PB51ED_PINS
),
2537 SND_PCI_QUIRK(0x1558, 0x65e5, "Clevo PC50D[PRS](?:-D|-G)?", ALC1220_FIXUP_CLEVO_PB51ED_PINS
),
2538 SND_PCI_QUIRK(0x1558, 0x65f1, "Clevo PC50HS", ALC1220_FIXUP_CLEVO_PB51ED_PINS
),
2539 SND_PCI_QUIRK(0x1558, 0x67d1, "Clevo PB71[ER][CDF]", ALC1220_FIXUP_CLEVO_PB51ED_PINS
),
2540 SND_PCI_QUIRK(0x1558, 0x67e1, "Clevo PB71[DE][CDF]", ALC1220_FIXUP_CLEVO_PB51ED_PINS
),
2541 SND_PCI_QUIRK(0x1558, 0x67e5, "Clevo PC70D[PRS](?:-D|-G)?", ALC1220_FIXUP_CLEVO_PB51ED_PINS
),
2542 SND_PCI_QUIRK(0x1558, 0x70d1, "Clevo PC70[ER][CDF]", ALC1220_FIXUP_CLEVO_PB51ED_PINS
),
2543 SND_PCI_QUIRK(0x1558, 0x7714, "Clevo X170SM", ALC1220_FIXUP_CLEVO_PB51ED_PINS
),
2544 SND_PCI_QUIRK(0x1558, 0x7715, "Clevo X170KM-G", ALC1220_FIXUP_CLEVO_PB51ED
),
2545 SND_PCI_QUIRK(0x1558, 0x9501, "Clevo P950HR", ALC1220_FIXUP_CLEVO_P950
),
2546 SND_PCI_QUIRK(0x1558, 0x9506, "Clevo P955HQ", ALC1220_FIXUP_CLEVO_P950
),
2547 SND_PCI_QUIRK(0x1558, 0x950a, "Clevo P955H[PR]", ALC1220_FIXUP_CLEVO_P950
),
2548 SND_PCI_QUIRK(0x1558, 0x95e1, "Clevo P95xER", ALC1220_FIXUP_CLEVO_P950
),
2549 SND_PCI_QUIRK(0x1558, 0x95e2, "Clevo P950ER", ALC1220_FIXUP_CLEVO_P950
),
2550 SND_PCI_QUIRK(0x1558, 0x95e3, "Clevo P955[ER]T", ALC1220_FIXUP_CLEVO_P950
),
2551 SND_PCI_QUIRK(0x1558, 0x95e4, "Clevo P955ER", ALC1220_FIXUP_CLEVO_P950
),
2552 SND_PCI_QUIRK(0x1558, 0x95e5, "Clevo P955EE6", ALC1220_FIXUP_CLEVO_P950
),
2553 SND_PCI_QUIRK(0x1558, 0x95e6, "Clevo P950R[CDF]", ALC1220_FIXUP_CLEVO_P950
),
2554 SND_PCI_QUIRK(0x1558, 0x96e1, "Clevo P960[ER][CDFN]-K", ALC1220_FIXUP_CLEVO_P950
),
2555 SND_PCI_QUIRK(0x1558, 0x97e1, "Clevo P970[ER][CDFN]", ALC1220_FIXUP_CLEVO_P950
),
2556 SND_PCI_QUIRK(0x1558, 0x97e2, "Clevo P970RC-M", ALC1220_FIXUP_CLEVO_P950
),
2557 SND_PCI_QUIRK_VENDOR(0x1558, "Clevo laptop", ALC882_FIXUP_EAPD
),
2558 SND_PCI_QUIRK(0x161f, 0x2054, "Medion laptop", ALC883_FIXUP_EAPD
),
2559 SND_PCI_QUIRK(0x17aa, 0x3a0d, "Lenovo Y530", ALC882_FIXUP_LENOVO_Y530
),
2560 SND_PCI_QUIRK(0x8086, 0x0022, "DX58SO", ALC889_FIXUP_COEF
),
2564 static const struct hda_model_fixup alc882_fixup_models
[] = {
2565 {.id
= ALC882_FIXUP_ABIT_AW9D_MAX
, .name
= "abit-aw9d"},
2566 {.id
= ALC882_FIXUP_LENOVO_Y530
, .name
= "lenovo-y530"},
2567 {.id
= ALC882_FIXUP_ACER_ASPIRE_7736
, .name
= "acer-aspire-7736"},
2568 {.id
= ALC882_FIXUP_ASUS_W90V
, .name
= "asus-w90v"},
2569 {.id
= ALC889_FIXUP_CD
, .name
= "cd"},
2570 {.id
= ALC889_FIXUP_FRONT_HP_NO_PRESENCE
, .name
= "no-front-hp"},
2571 {.id
= ALC889_FIXUP_VAIO_TT
, .name
= "vaio-tt"},
2572 {.id
= ALC888_FIXUP_EEE1601
, .name
= "eee1601"},
2573 {.id
= ALC882_FIXUP_EAPD
, .name
= "alc882-eapd"},
2574 {.id
= ALC883_FIXUP_EAPD
, .name
= "alc883-eapd"},
2575 {.id
= ALC882_FIXUP_GPIO1
, .name
= "gpio1"},
2576 {.id
= ALC882_FIXUP_GPIO2
, .name
= "gpio2"},
2577 {.id
= ALC882_FIXUP_GPIO3
, .name
= "gpio3"},
2578 {.id
= ALC889_FIXUP_COEF
, .name
= "alc889-coef"},
2579 {.id
= ALC882_FIXUP_ASUS_W2JC
, .name
= "asus-w2jc"},
2580 {.id
= ALC882_FIXUP_ACER_ASPIRE_4930G
, .name
= "acer-aspire-4930g"},
2581 {.id
= ALC882_FIXUP_ACER_ASPIRE_8930G
, .name
= "acer-aspire-8930g"},
2582 {.id
= ALC883_FIXUP_ACER_EAPD
, .name
= "acer-aspire"},
2583 {.id
= ALC885_FIXUP_MACPRO_GPIO
, .name
= "macpro-gpio"},
2584 {.id
= ALC889_FIXUP_DAC_ROUTE
, .name
= "dac-route"},
2585 {.id
= ALC889_FIXUP_MBP_VREF
, .name
= "mbp-vref"},
2586 {.id
= ALC889_FIXUP_IMAC91_VREF
, .name
= "imac91-vref"},
2587 {.id
= ALC889_FIXUP_MBA11_VREF
, .name
= "mba11-vref"},
2588 {.id
= ALC889_FIXUP_MBA21_VREF
, .name
= "mba21-vref"},
2589 {.id
= ALC889_FIXUP_MP11_VREF
, .name
= "mp11-vref"},
2590 {.id
= ALC889_FIXUP_MP41_VREF
, .name
= "mp41-vref"},
2591 {.id
= ALC882_FIXUP_INV_DMIC
, .name
= "inv-dmic"},
2592 {.id
= ALC882_FIXUP_NO_PRIMARY_HP
, .name
= "no-primary-hp"},
2593 {.id
= ALC887_FIXUP_ASUS_BASS
, .name
= "asus-bass"},
2594 {.id
= ALC1220_FIXUP_GB_DUAL_CODECS
, .name
= "dual-codecs"},
2595 {.id
= ALC1220_FIXUP_CLEVO_P950
, .name
= "clevo-p950"},
2599 static const struct snd_hda_pin_quirk alc882_pin_fixup_tbl
[] = {
2600 SND_HDA_PIN_QUIRK(0x10ec1220, 0x1043, "ASUS", ALC1220_FIXUP_CLEVO_P950
,
2608 {0x1e, 0x01456130}),
2609 SND_HDA_PIN_QUIRK(0x10ec1220, 0x1462, "MS-7C35", ALC1220_FIXUP_CLEVO_P950
,
2617 {0x1e, 0x01451130}),
2622 * BIOS auto configuration
2624 /* almost identical with ALC880 parser... */
2625 static int alc882_parse_auto_config(struct hda_codec
*codec
)
2627 static const hda_nid_t alc882_ignore
[] = { 0x1d, 0 };
2628 static const hda_nid_t alc882_ssids
[] = { 0x15, 0x1b, 0x14, 0 };
2629 return alc_parse_auto_config(codec
, alc882_ignore
, alc882_ssids
);
2634 static int patch_alc882(struct hda_codec
*codec
)
2636 struct alc_spec
*spec
;
2639 err
= alc_alloc_spec(codec
, 0x0b);
2645 switch (codec
->core
.vendor_id
) {
2653 /* ALC883 and variants */
2654 alc_fix_pll_init(codec
, 0x20, 0x0a, 10);
2658 alc_pre_init(codec
);
2660 snd_hda_pick_fixup(codec
, alc882_fixup_models
, alc882_fixup_tbl
,
2662 snd_hda_pick_pin_fixup(codec
, alc882_pin_fixup_tbl
, alc882_fixups
, true);
2663 snd_hda_apply_fixup(codec
, HDA_FIXUP_ACT_PRE_PROBE
);
2665 alc_auto_parse_customize_define(codec
);
2667 if (has_cdefine_beep(codec
))
2668 spec
->gen
.beep_nid
= 0x01;
2670 /* automatic parse from the BIOS config */
2671 err
= alc882_parse_auto_config(codec
);
2675 if (!spec
->gen
.no_analog
&& spec
->gen
.beep_nid
) {
2676 err
= set_beep_amp(spec
, 0x0b, 0x05, HDA_INPUT
);
2681 snd_hda_apply_fixup(codec
, HDA_FIXUP_ACT_PROBE
);
2694 static int alc262_parse_auto_config(struct hda_codec
*codec
)
2696 static const hda_nid_t alc262_ignore
[] = { 0x1d, 0 };
2697 static const hda_nid_t alc262_ssids
[] = { 0x15, 0x1b, 0x14, 0 };
2698 return alc_parse_auto_config(codec
, alc262_ignore
, alc262_ssids
);
2705 ALC262_FIXUP_FSC_H270
,
2706 ALC262_FIXUP_FSC_S7110
,
2707 ALC262_FIXUP_HP_Z200
,
2709 ALC262_FIXUP_LENOVO_3000
,
2711 ALC262_FIXUP_BENQ_T31
,
2712 ALC262_FIXUP_INV_DMIC
,
2713 ALC262_FIXUP_INTEL_BAYLEYBAY
,
2716 static const struct hda_fixup alc262_fixups
[] = {
2717 [ALC262_FIXUP_FSC_H270
] = {
2718 .type
= HDA_FIXUP_PINS
,
2719 .v
.pins
= (const struct hda_pintbl
[]) {
2720 { 0x14, 0x99130110 }, /* speaker */
2721 { 0x15, 0x0221142f }, /* front HP */
2722 { 0x1b, 0x0121141f }, /* rear HP */
2726 [ALC262_FIXUP_FSC_S7110
] = {
2727 .type
= HDA_FIXUP_PINS
,
2728 .v
.pins
= (const struct hda_pintbl
[]) {
2729 { 0x15, 0x90170110 }, /* speaker */
2733 .chain_id
= ALC262_FIXUP_BENQ
,
2735 [ALC262_FIXUP_HP_Z200
] = {
2736 .type
= HDA_FIXUP_PINS
,
2737 .v
.pins
= (const struct hda_pintbl
[]) {
2738 { 0x16, 0x99130120 }, /* internal speaker */
2742 [ALC262_FIXUP_TYAN
] = {
2743 .type
= HDA_FIXUP_PINS
,
2744 .v
.pins
= (const struct hda_pintbl
[]) {
2745 { 0x14, 0x1993e1f0 }, /* int AUX */
2749 [ALC262_FIXUP_LENOVO_3000
] = {
2750 .type
= HDA_FIXUP_PINCTLS
,
2751 .v
.pins
= (const struct hda_pintbl
[]) {
2752 { 0x19, PIN_VREF50
},
2756 .chain_id
= ALC262_FIXUP_BENQ
,
2758 [ALC262_FIXUP_BENQ
] = {
2759 .type
= HDA_FIXUP_VERBS
,
2760 .v
.verbs
= (const struct hda_verb
[]) {
2761 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x07 },
2762 { 0x20, AC_VERB_SET_PROC_COEF
, 0x3070 },
2766 [ALC262_FIXUP_BENQ_T31
] = {
2767 .type
= HDA_FIXUP_VERBS
,
2768 .v
.verbs
= (const struct hda_verb
[]) {
2769 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x07 },
2770 { 0x20, AC_VERB_SET_PROC_COEF
, 0x3050 },
2774 [ALC262_FIXUP_INV_DMIC
] = {
2775 .type
= HDA_FIXUP_FUNC
,
2776 .v
.func
= alc_fixup_inv_dmic
,
2778 [ALC262_FIXUP_INTEL_BAYLEYBAY
] = {
2779 .type
= HDA_FIXUP_FUNC
,
2780 .v
.func
= alc_fixup_no_depop_delay
,
2784 static const struct snd_pci_quirk alc262_fixup_tbl
[] = {
2785 SND_PCI_QUIRK(0x103c, 0x170b, "HP Z200", ALC262_FIXUP_HP_Z200
),
2786 SND_PCI_QUIRK(0x10cf, 0x1397, "Fujitsu Lifebook S7110", ALC262_FIXUP_FSC_S7110
),
2787 SND_PCI_QUIRK(0x10cf, 0x142d, "Fujitsu Lifebook E8410", ALC262_FIXUP_BENQ
),
2788 SND_PCI_QUIRK(0x10f1, 0x2915, "Tyan Thunder n6650W", ALC262_FIXUP_TYAN
),
2789 SND_PCI_QUIRK(0x1734, 0x1141, "FSC ESPRIMO U9210", ALC262_FIXUP_FSC_H270
),
2790 SND_PCI_QUIRK(0x1734, 0x1147, "FSC Celsius H270", ALC262_FIXUP_FSC_H270
),
2791 SND_PCI_QUIRK(0x17aa, 0x384e, "Lenovo 3000", ALC262_FIXUP_LENOVO_3000
),
2792 SND_PCI_QUIRK(0x17ff, 0x0560, "Benq ED8", ALC262_FIXUP_BENQ
),
2793 SND_PCI_QUIRK(0x17ff, 0x058d, "Benq T31-16", ALC262_FIXUP_BENQ_T31
),
2794 SND_PCI_QUIRK(0x8086, 0x7270, "BayleyBay", ALC262_FIXUP_INTEL_BAYLEYBAY
),
2798 static const struct hda_model_fixup alc262_fixup_models
[] = {
2799 {.id
= ALC262_FIXUP_INV_DMIC
, .name
= "inv-dmic"},
2800 {.id
= ALC262_FIXUP_FSC_H270
, .name
= "fsc-h270"},
2801 {.id
= ALC262_FIXUP_FSC_S7110
, .name
= "fsc-s7110"},
2802 {.id
= ALC262_FIXUP_HP_Z200
, .name
= "hp-z200"},
2803 {.id
= ALC262_FIXUP_TYAN
, .name
= "tyan"},
2804 {.id
= ALC262_FIXUP_LENOVO_3000
, .name
= "lenovo-3000"},
2805 {.id
= ALC262_FIXUP_BENQ
, .name
= "benq"},
2806 {.id
= ALC262_FIXUP_BENQ_T31
, .name
= "benq-t31"},
2807 {.id
= ALC262_FIXUP_INTEL_BAYLEYBAY
, .name
= "bayleybay"},
2813 static int patch_alc262(struct hda_codec
*codec
)
2815 struct alc_spec
*spec
;
2818 err
= alc_alloc_spec(codec
, 0x0b);
2823 spec
->gen
.shared_mic_vref_pin
= 0x18;
2825 spec
->shutup
= alc_eapd_shutup
;
2828 /* pshou 07/11/05 set a zero PCM sample to DAC when FIFO is
2831 alc_update_coefex_idx(codec
, 0x1a, 7, 0, 0x80);
2833 alc_fix_pll_init(codec
, 0x20, 0x0a, 10);
2835 alc_pre_init(codec
);
2837 snd_hda_pick_fixup(codec
, alc262_fixup_models
, alc262_fixup_tbl
,
2839 snd_hda_apply_fixup(codec
, HDA_FIXUP_ACT_PRE_PROBE
);
2841 alc_auto_parse_customize_define(codec
);
2843 if (has_cdefine_beep(codec
))
2844 spec
->gen
.beep_nid
= 0x01;
2846 /* automatic parse from the BIOS config */
2847 err
= alc262_parse_auto_config(codec
);
2851 if (!spec
->gen
.no_analog
&& spec
->gen
.beep_nid
) {
2852 err
= set_beep_amp(spec
, 0x0b, 0x05, HDA_INPUT
);
2857 snd_hda_apply_fixup(codec
, HDA_FIXUP_ACT_PROBE
);
2869 /* bind Beep switches of both NID 0x0f and 0x10 */
2870 static int alc268_beep_switch_put(struct snd_kcontrol
*kcontrol
,
2871 struct snd_ctl_elem_value
*ucontrol
)
2873 struct hda_codec
*codec
= snd_kcontrol_chip(kcontrol
);
2877 mutex_lock(&codec
->control_mutex
);
2878 pval
= kcontrol
->private_value
;
2879 kcontrol
->private_value
= (pval
& ~0xff) | 0x0f;
2880 err
= snd_hda_mixer_amp_switch_put(kcontrol
, ucontrol
);
2882 kcontrol
->private_value
= (pval
& ~0xff) | 0x10;
2883 err
= snd_hda_mixer_amp_switch_put(kcontrol
, ucontrol
);
2885 kcontrol
->private_value
= pval
;
2886 mutex_unlock(&codec
->control_mutex
);
2890 static const struct snd_kcontrol_new alc268_beep_mixer
[] = {
2891 HDA_CODEC_VOLUME("Beep Playback Volume", 0x1d, 0x0, HDA_INPUT
),
2893 .iface
= SNDRV_CTL_ELEM_IFACE_MIXER
,
2894 .name
= "Beep Playback Switch",
2895 .subdevice
= HDA_SUBDEV_AMP_FLAG
,
2896 .info
= snd_hda_mixer_amp_switch_info
,
2897 .get
= snd_hda_mixer_amp_switch_get
,
2898 .put
= alc268_beep_switch_put
,
2899 .private_value
= HDA_COMPOSE_AMP_VAL(0x0f, 3, 1, HDA_INPUT
)
2903 /* set PCBEEP vol = 0, mute connections */
2904 static const struct hda_verb alc268_beep_init_verbs
[] = {
2905 {0x1d, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_IN_UNMUTE(0)},
2906 {0x0f, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_IN_MUTE(1)},
2907 {0x10, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_IN_MUTE(1)},
2912 ALC268_FIXUP_INV_DMIC
,
2913 ALC268_FIXUP_HP_EAPD
,
2917 static const struct hda_fixup alc268_fixups
[] = {
2918 [ALC268_FIXUP_INV_DMIC
] = {
2919 .type
= HDA_FIXUP_FUNC
,
2920 .v
.func
= alc_fixup_inv_dmic
,
2922 [ALC268_FIXUP_HP_EAPD
] = {
2923 .type
= HDA_FIXUP_VERBS
,
2924 .v
.verbs
= (const struct hda_verb
[]) {
2925 {0x15, AC_VERB_SET_EAPD_BTLENABLE
, 0},
2929 [ALC268_FIXUP_SPDIF
] = {
2930 .type
= HDA_FIXUP_PINS
,
2931 .v
.pins
= (const struct hda_pintbl
[]) {
2932 { 0x1e, 0x014b1180 }, /* enable SPDIF out */
2938 static const struct hda_model_fixup alc268_fixup_models
[] = {
2939 {.id
= ALC268_FIXUP_INV_DMIC
, .name
= "inv-dmic"},
2940 {.id
= ALC268_FIXUP_HP_EAPD
, .name
= "hp-eapd"},
2941 {.id
= ALC268_FIXUP_SPDIF
, .name
= "spdif"},
2945 static const struct snd_pci_quirk alc268_fixup_tbl
[] = {
2946 SND_PCI_QUIRK(0x1025, 0x0139, "Acer TravelMate 6293", ALC268_FIXUP_SPDIF
),
2947 SND_PCI_QUIRK(0x1025, 0x015b, "Acer AOA 150 (ZG5)", ALC268_FIXUP_INV_DMIC
),
2948 /* below is codec SSID since multiple Toshiba laptops have the
2949 * same PCI SSID 1179:ff00
2951 SND_PCI_QUIRK(0x1179, 0xff06, "Toshiba P200", ALC268_FIXUP_HP_EAPD
),
2956 * BIOS auto configuration
2958 static int alc268_parse_auto_config(struct hda_codec
*codec
)
2960 static const hda_nid_t alc268_ssids
[] = { 0x15, 0x1b, 0x14, 0 };
2961 return alc_parse_auto_config(codec
, NULL
, alc268_ssids
);
2966 static int patch_alc268(struct hda_codec
*codec
)
2968 struct alc_spec
*spec
;
2971 /* ALC268 has no aa-loopback mixer */
2972 err
= alc_alloc_spec(codec
, 0);
2977 if (has_cdefine_beep(codec
))
2978 spec
->gen
.beep_nid
= 0x01;
2980 spec
->shutup
= alc_eapd_shutup
;
2982 alc_pre_init(codec
);
2984 snd_hda_pick_fixup(codec
, alc268_fixup_models
, alc268_fixup_tbl
, alc268_fixups
);
2985 snd_hda_apply_fixup(codec
, HDA_FIXUP_ACT_PRE_PROBE
);
2987 /* automatic parse from the BIOS config */
2988 err
= alc268_parse_auto_config(codec
);
2992 if (err
> 0 && !spec
->gen
.no_analog
&&
2993 spec
->gen
.autocfg
.speaker_pins
[0] != 0x1d) {
2994 for (i
= 0; i
< ARRAY_SIZE(alc268_beep_mixer
); i
++) {
2995 if (!snd_hda_gen_add_kctl(&spec
->gen
, NULL
,
2996 &alc268_beep_mixer
[i
])) {
3001 snd_hda_add_verbs(codec
, alc268_beep_init_verbs
);
3002 if (!query_amp_caps(codec
, 0x1d, HDA_INPUT
))
3003 /* override the amp caps for beep generator */
3004 snd_hda_override_amp_caps(codec
, 0x1d, HDA_INPUT
,
3005 (0x0c << AC_AMPCAP_OFFSET_SHIFT
) |
3006 (0x0c << AC_AMPCAP_NUM_STEPS_SHIFT
) |
3007 (0x07 << AC_AMPCAP_STEP_SIZE_SHIFT
) |
3008 (0 << AC_AMPCAP_MUTE_SHIFT
));
3011 snd_hda_apply_fixup(codec
, HDA_FIXUP_ACT_PROBE
);
3024 static const struct hda_pcm_stream alc269_44k_pcm_analog_playback
= {
3025 .rates
= SNDRV_PCM_RATE_44100
, /* fixed rate */
3028 static const struct hda_pcm_stream alc269_44k_pcm_analog_capture
= {
3029 .rates
= SNDRV_PCM_RATE_44100
, /* fixed rate */
3032 /* different alc269-variants */
3034 ALC269_TYPE_ALC269VA
,
3035 ALC269_TYPE_ALC269VB
,
3036 ALC269_TYPE_ALC269VC
,
3037 ALC269_TYPE_ALC269VD
,
3058 * BIOS auto configuration
3060 static int alc269_parse_auto_config(struct hda_codec
*codec
)
3062 static const hda_nid_t alc269_ignore
[] = { 0x1d, 0 };
3063 static const hda_nid_t alc269_ssids
[] = { 0, 0x1b, 0x14, 0x21 };
3064 static const hda_nid_t alc269va_ssids
[] = { 0x15, 0x1b, 0x14, 0 };
3065 struct alc_spec
*spec
= codec
->spec
;
3066 const hda_nid_t
*ssids
;
3068 switch (spec
->codec_variant
) {
3069 case ALC269_TYPE_ALC269VA
:
3070 case ALC269_TYPE_ALC269VC
:
3071 case ALC269_TYPE_ALC280
:
3072 case ALC269_TYPE_ALC284
:
3073 case ALC269_TYPE_ALC293
:
3074 ssids
= alc269va_ssids
;
3076 case ALC269_TYPE_ALC269VB
:
3077 case ALC269_TYPE_ALC269VD
:
3078 case ALC269_TYPE_ALC282
:
3079 case ALC269_TYPE_ALC283
:
3080 case ALC269_TYPE_ALC286
:
3081 case ALC269_TYPE_ALC298
:
3082 case ALC269_TYPE_ALC255
:
3083 case ALC269_TYPE_ALC256
:
3084 case ALC269_TYPE_ALC257
:
3085 case ALC269_TYPE_ALC215
:
3086 case ALC269_TYPE_ALC225
:
3087 case ALC269_TYPE_ALC287
:
3088 case ALC269_TYPE_ALC294
:
3089 case ALC269_TYPE_ALC300
:
3090 case ALC269_TYPE_ALC623
:
3091 case ALC269_TYPE_ALC700
:
3092 ssids
= alc269_ssids
;
3095 ssids
= alc269_ssids
;
3099 return alc_parse_auto_config(codec
, alc269_ignore
, ssids
);
3102 static const struct hda_jack_keymap alc_headset_btn_keymap
[] = {
3103 { SND_JACK_BTN_0
, KEY_PLAYPAUSE
},
3104 { SND_JACK_BTN_1
, KEY_VOICECOMMAND
},
3105 { SND_JACK_BTN_2
, KEY_VOLUMEUP
},
3106 { SND_JACK_BTN_3
, KEY_VOLUMEDOWN
},
3110 static void alc_headset_btn_callback(struct hda_codec
*codec
,
3111 struct hda_jack_callback
*jack
)
3115 if (jack
->unsol_res
& (7 << 13))
3116 report
|= SND_JACK_BTN_0
;
3118 if (jack
->unsol_res
& (1 << 16 | 3 << 8))
3119 report
|= SND_JACK_BTN_1
;
3122 if (jack
->unsol_res
& (7 << 23))
3123 report
|= SND_JACK_BTN_2
;
3125 /* Volume down key */
3126 if (jack
->unsol_res
& (7 << 10))
3127 report
|= SND_JACK_BTN_3
;
3129 snd_hda_jack_set_button_state(codec
, jack
->nid
, report
);
3132 static void alc_disable_headset_jack_key(struct hda_codec
*codec
)
3134 struct alc_spec
*spec
= codec
->spec
;
3136 if (!spec
->has_hs_key
)
3139 switch (codec
->core
.vendor_id
) {
3147 alc_write_coef_idx(codec
, 0x48, 0x0);
3148 alc_update_coef_idx(codec
, 0x49, 0x0045, 0x0);
3149 alc_update_coef_idx(codec
, 0x44, 0x0045 << 8, 0x0);
3154 alc_write_coef_idx(codec
, 0x48, 0x0);
3155 alc_update_coef_idx(codec
, 0x49, 0x0045, 0x0);
3160 static void alc_enable_headset_jack_key(struct hda_codec
*codec
)
3162 struct alc_spec
*spec
= codec
->spec
;
3164 if (!spec
->has_hs_key
)
3167 switch (codec
->core
.vendor_id
) {
3175 alc_write_coef_idx(codec
, 0x48, 0xd011);
3176 alc_update_coef_idx(codec
, 0x49, 0x007f, 0x0045);
3177 alc_update_coef_idx(codec
, 0x44, 0x007f << 8, 0x0045 << 8);
3182 alc_write_coef_idx(codec
, 0x48, 0xd011);
3183 alc_update_coef_idx(codec
, 0x49, 0x007f, 0x0045);
3188 static void alc_fixup_headset_jack(struct hda_codec
*codec
,
3189 const struct hda_fixup
*fix
, int action
)
3191 struct alc_spec
*spec
= codec
->spec
;
3195 case HDA_FIXUP_ACT_PRE_PROBE
:
3196 spec
->has_hs_key
= 1;
3197 snd_hda_jack_detect_enable_callback(codec
, 0x55,
3198 alc_headset_btn_callback
);
3200 case HDA_FIXUP_ACT_BUILD
:
3201 hp_pin
= alc_get_hp_pin(spec
);
3202 if (!hp_pin
|| snd_hda_jack_bind_keymap(codec
, 0x55,
3203 alc_headset_btn_keymap
,
3205 snd_hda_jack_add_kctl(codec
, 0x55, "Headset Jack",
3206 false, SND_JACK_HEADSET
,
3207 alc_headset_btn_keymap
);
3209 alc_enable_headset_jack_key(codec
);
3214 static void alc269vb_toggle_power_output(struct hda_codec
*codec
, int power_up
)
3216 alc_update_coef_idx(codec
, 0x04, 1 << 11, power_up
? (1 << 11) : 0);
3219 static void alc269_shutup(struct hda_codec
*codec
)
3221 struct alc_spec
*spec
= codec
->spec
;
3223 if (spec
->codec_variant
== ALC269_TYPE_ALC269VB
)
3224 alc269vb_toggle_power_output(codec
, 0);
3225 if (spec
->codec_variant
== ALC269_TYPE_ALC269VB
&&
3226 (alc_get_coef0(codec
) & 0x00ff) == 0x018) {
3229 alc_shutup_pins(codec
);
3232 static const struct coef_fw alc282_coefs
[] = {
3233 WRITE_COEF(0x03, 0x0002), /* Power Down Control */
3234 UPDATE_COEF(0x05, 0xff3f, 0x0700), /* FIFO and filter clock */
3235 WRITE_COEF(0x07, 0x0200), /* DMIC control */
3236 UPDATE_COEF(0x06, 0x00f0, 0), /* Analog clock */
3237 UPDATE_COEF(0x08, 0xfffc, 0x0c2c), /* JD */
3238 WRITE_COEF(0x0a, 0xcccc), /* JD offset1 */
3239 WRITE_COEF(0x0b, 0xcccc), /* JD offset2 */
3240 WRITE_COEF(0x0e, 0x6e00), /* LDO1/2/3, DAC/ADC */
3241 UPDATE_COEF(0x0f, 0xf800, 0x1000), /* JD */
3242 UPDATE_COEF(0x10, 0xfc00, 0x0c00), /* Capless */
3243 WRITE_COEF(0x6f, 0x0), /* Class D test 4 */
3244 UPDATE_COEF(0x0c, 0xfe00, 0), /* IO power down directly */
3245 WRITE_COEF(0x34, 0xa0c0), /* ANC */
3246 UPDATE_COEF(0x16, 0x0008, 0), /* AGC MUX */
3247 UPDATE_COEF(0x1d, 0x00e0, 0), /* DAC simple content protection */
3248 UPDATE_COEF(0x1f, 0x00e0, 0), /* ADC simple content protection */
3249 WRITE_COEF(0x21, 0x8804), /* DAC ADC Zero Detection */
3250 WRITE_COEF(0x63, 0x2902), /* PLL */
3251 WRITE_COEF(0x68, 0xa080), /* capless control 2 */
3252 WRITE_COEF(0x69, 0x3400), /* capless control 3 */
3253 WRITE_COEF(0x6a, 0x2f3e), /* capless control 4 */
3254 WRITE_COEF(0x6b, 0x0), /* capless control 5 */
3255 UPDATE_COEF(0x6d, 0x0fff, 0x0900), /* class D test 2 */
3256 WRITE_COEF(0x6e, 0x110a), /* class D test 3 */
3257 UPDATE_COEF(0x70, 0x00f8, 0x00d8), /* class D test 5 */
3258 WRITE_COEF(0x71, 0x0014), /* class D test 6 */
3259 WRITE_COEF(0x72, 0xc2ba), /* classD OCP */
3260 UPDATE_COEF(0x77, 0x0f80, 0), /* classD pure DC test */
3261 WRITE_COEF(0x6c, 0xfc06), /* Class D amp control */
3265 static void alc282_restore_default_value(struct hda_codec
*codec
)
3267 alc_process_coef_fw(codec
, alc282_coefs
);
3270 static void alc282_init(struct hda_codec
*codec
)
3272 struct alc_spec
*spec
= codec
->spec
;
3273 hda_nid_t hp_pin
= alc_get_hp_pin(spec
);
3277 alc282_restore_default_value(codec
);
3281 hp_pin_sense
= snd_hda_jack_detect(codec
, hp_pin
);
3282 coef78
= alc_read_coef_idx(codec
, 0x78);
3284 /* Index 0x78 Direct Drive HP AMP LPM Control 1 */
3285 /* Headphone capless set to high power mode */
3286 alc_write_coef_idx(codec
, 0x78, 0x9004);
3291 snd_hda_codec_write(codec
, hp_pin
, 0,
3292 AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_MUTE
);
3297 snd_hda_codec_write(codec
, hp_pin
, 0,
3298 AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_OUT
);
3303 /* Headphone capless set to normal mode */
3304 alc_write_coef_idx(codec
, 0x78, coef78
);
3307 static void alc282_shutup(struct hda_codec
*codec
)
3309 struct alc_spec
*spec
= codec
->spec
;
3310 hda_nid_t hp_pin
= alc_get_hp_pin(spec
);
3315 alc269_shutup(codec
);
3319 hp_pin_sense
= snd_hda_jack_detect(codec
, hp_pin
);
3320 coef78
= alc_read_coef_idx(codec
, 0x78);
3321 alc_write_coef_idx(codec
, 0x78, 0x9004);
3326 snd_hda_codec_write(codec
, hp_pin
, 0,
3327 AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_MUTE
);
3332 if (!spec
->no_shutup_pins
)
3333 snd_hda_codec_write(codec
, hp_pin
, 0,
3334 AC_VERB_SET_PIN_WIDGET_CONTROL
, 0x0);
3339 alc_auto_setup_eapd(codec
, false);
3340 alc_shutup_pins(codec
);
3341 alc_write_coef_idx(codec
, 0x78, coef78
);
3344 static const struct coef_fw alc283_coefs
[] = {
3345 WRITE_COEF(0x03, 0x0002), /* Power Down Control */
3346 UPDATE_COEF(0x05, 0xff3f, 0x0700), /* FIFO and filter clock */
3347 WRITE_COEF(0x07, 0x0200), /* DMIC control */
3348 UPDATE_COEF(0x06, 0x00f0, 0), /* Analog clock */
3349 UPDATE_COEF(0x08, 0xfffc, 0x0c2c), /* JD */
3350 WRITE_COEF(0x0a, 0xcccc), /* JD offset1 */
3351 WRITE_COEF(0x0b, 0xcccc), /* JD offset2 */
3352 WRITE_COEF(0x0e, 0x6fc0), /* LDO1/2/3, DAC/ADC */
3353 UPDATE_COEF(0x0f, 0xf800, 0x1000), /* JD */
3354 UPDATE_COEF(0x10, 0xfc00, 0x0c00), /* Capless */
3355 WRITE_COEF(0x3a, 0x0), /* Class D test 4 */
3356 UPDATE_COEF(0x0c, 0xfe00, 0x0), /* IO power down directly */
3357 WRITE_COEF(0x22, 0xa0c0), /* ANC */
3358 UPDATE_COEFEX(0x53, 0x01, 0x000f, 0x0008), /* AGC MUX */
3359 UPDATE_COEF(0x1d, 0x00e0, 0), /* DAC simple content protection */
3360 UPDATE_COEF(0x1f, 0x00e0, 0), /* ADC simple content protection */
3361 WRITE_COEF(0x21, 0x8804), /* DAC ADC Zero Detection */
3362 WRITE_COEF(0x2e, 0x2902), /* PLL */
3363 WRITE_COEF(0x33, 0xa080), /* capless control 2 */
3364 WRITE_COEF(0x34, 0x3400), /* capless control 3 */
3365 WRITE_COEF(0x35, 0x2f3e), /* capless control 4 */
3366 WRITE_COEF(0x36, 0x0), /* capless control 5 */
3367 UPDATE_COEF(0x38, 0x0fff, 0x0900), /* class D test 2 */
3368 WRITE_COEF(0x39, 0x110a), /* class D test 3 */
3369 UPDATE_COEF(0x3b, 0x00f8, 0x00d8), /* class D test 5 */
3370 WRITE_COEF(0x3c, 0x0014), /* class D test 6 */
3371 WRITE_COEF(0x3d, 0xc2ba), /* classD OCP */
3372 UPDATE_COEF(0x42, 0x0f80, 0x0), /* classD pure DC test */
3373 WRITE_COEF(0x49, 0x0), /* test mode */
3374 UPDATE_COEF(0x40, 0xf800, 0x9800), /* Class D DC enable */
3375 UPDATE_COEF(0x42, 0xf000, 0x2000), /* DC offset */
3376 WRITE_COEF(0x37, 0xfc06), /* Class D amp control */
3377 UPDATE_COEF(0x1b, 0x8000, 0), /* HP JD control */
3381 static void alc283_restore_default_value(struct hda_codec
*codec
)
3383 alc_process_coef_fw(codec
, alc283_coefs
);
3386 static void alc283_init(struct hda_codec
*codec
)
3388 struct alc_spec
*spec
= codec
->spec
;
3389 hda_nid_t hp_pin
= alc_get_hp_pin(spec
);
3392 alc283_restore_default_value(codec
);
3398 hp_pin_sense
= snd_hda_jack_detect(codec
, hp_pin
);
3400 /* Index 0x43 Direct Drive HP AMP LPM Control 1 */
3401 /* Headphone capless set to high power mode */
3402 alc_write_coef_idx(codec
, 0x43, 0x9004);
3404 snd_hda_codec_write(codec
, hp_pin
, 0,
3405 AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_MUTE
);
3410 snd_hda_codec_write(codec
, hp_pin
, 0,
3411 AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_OUT
);
3415 /* Index 0x46 Combo jack auto switch control 2 */
3416 /* 3k pull low control for Headset jack. */
3417 alc_update_coef_idx(codec
, 0x46, 3 << 12, 0);
3418 /* Headphone capless set to normal mode */
3419 alc_write_coef_idx(codec
, 0x43, 0x9614);
3422 static void alc283_shutup(struct hda_codec
*codec
)
3424 struct alc_spec
*spec
= codec
->spec
;
3425 hda_nid_t hp_pin
= alc_get_hp_pin(spec
);
3429 alc269_shutup(codec
);
3433 hp_pin_sense
= snd_hda_jack_detect(codec
, hp_pin
);
3435 alc_write_coef_idx(codec
, 0x43, 0x9004);
3437 /*depop hp during suspend*/
3438 alc_write_coef_idx(codec
, 0x06, 0x2100);
3440 snd_hda_codec_write(codec
, hp_pin
, 0,
3441 AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_MUTE
);
3446 if (!spec
->no_shutup_pins
)
3447 snd_hda_codec_write(codec
, hp_pin
, 0,
3448 AC_VERB_SET_PIN_WIDGET_CONTROL
, 0x0);
3450 alc_update_coef_idx(codec
, 0x46, 0, 3 << 12);
3454 alc_auto_setup_eapd(codec
, false);
3455 alc_shutup_pins(codec
);
3456 alc_write_coef_idx(codec
, 0x43, 0x9614);
3459 static void alc256_init(struct hda_codec
*codec
)
3461 struct alc_spec
*spec
= codec
->spec
;
3462 hda_nid_t hp_pin
= alc_get_hp_pin(spec
);
3470 hp_pin_sense
= snd_hda_jack_detect(codec
, hp_pin
);
3475 alc_update_coefex_idx(codec
, 0x57, 0x04, 0x0007, 0x1); /* Low power */
3476 if (spec
->ultra_low_power
) {
3477 alc_update_coef_idx(codec
, 0x03, 1<<1, 1<<1);
3478 alc_update_coef_idx(codec
, 0x08, 3<<2, 3<<2);
3479 alc_update_coef_idx(codec
, 0x08, 7<<4, 0);
3480 alc_update_coef_idx(codec
, 0x3b, 1<<15, 0);
3481 alc_update_coef_idx(codec
, 0x0e, 7<<6, 7<<6);
3485 snd_hda_codec_write(codec
, hp_pin
, 0,
3486 AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_MUTE
);
3488 if (hp_pin_sense
|| spec
->ultra_low_power
)
3491 snd_hda_codec_write(codec
, hp_pin
, 0,
3492 AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_OUT
);
3494 if (hp_pin_sense
|| spec
->ultra_low_power
)
3497 alc_update_coef_idx(codec
, 0x46, 3 << 12, 0);
3498 alc_update_coefex_idx(codec
, 0x57, 0x04, 0x0007, 0x4); /* Hight power */
3499 alc_update_coefex_idx(codec
, 0x53, 0x02, 0x8000, 1 << 15); /* Clear bit */
3500 alc_update_coefex_idx(codec
, 0x53, 0x02, 0x8000, 0 << 15);
3502 * Expose headphone mic (or possibly Line In on some machines) instead
3503 * of PC Beep on 1Ah, and disable 1Ah loopback for all outputs. See
3504 * Documentation/sound/hd-audio/realtek-pc-beep.rst for details of
3507 alc_write_coef_idx(codec
, 0x36, 0x5757);
3510 static void alc256_shutup(struct hda_codec
*codec
)
3512 struct alc_spec
*spec
= codec
->spec
;
3513 hda_nid_t hp_pin
= alc_get_hp_pin(spec
);
3519 hp_pin_sense
= snd_hda_jack_detect(codec
, hp_pin
);
3524 snd_hda_codec_write(codec
, hp_pin
, 0,
3525 AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_MUTE
);
3527 if (hp_pin_sense
|| spec
->ultra_low_power
)
3530 /* 3k pull low control for Headset jack. */
3531 /* NOTE: call this before clearing the pin, otherwise codec stalls */
3532 /* If disable 3k pulldown control for alc257, the Mic detection will not work correctly
3533 * when booting with headset plugged. So skip setting it for the codec alc257
3535 if (spec
->codec_variant
!= ALC269_TYPE_ALC257
&&
3536 spec
->codec_variant
!= ALC269_TYPE_ALC256
)
3537 alc_update_coef_idx(codec
, 0x46, 0, 3 << 12);
3539 if (!spec
->no_shutup_pins
)
3540 snd_hda_codec_write(codec
, hp_pin
, 0,
3541 AC_VERB_SET_PIN_WIDGET_CONTROL
, 0x0);
3543 if (hp_pin_sense
|| spec
->ultra_low_power
)
3546 alc_auto_setup_eapd(codec
, false);
3547 alc_shutup_pins(codec
);
3548 if (spec
->ultra_low_power
) {
3550 alc_update_coef_idx(codec
, 0x03, 1<<1, 0);
3551 alc_update_coef_idx(codec
, 0x08, 7<<4, 7<<4);
3552 alc_update_coef_idx(codec
, 0x08, 3<<2, 0);
3553 alc_update_coef_idx(codec
, 0x3b, 1<<15, 1<<15);
3554 alc_update_coef_idx(codec
, 0x0e, 7<<6, 0);
3559 static void alc285_hp_init(struct hda_codec
*codec
)
3561 struct alc_spec
*spec
= codec
->spec
;
3562 hda_nid_t hp_pin
= alc_get_hp_pin(spec
);
3564 int coef38
, coef0d
, coef36
;
3566 alc_update_coef_idx(codec
, 0x4a, 1<<15, 1<<15); /* Reset HP JD */
3567 coef38
= alc_read_coef_idx(codec
, 0x38); /* Amp control */
3568 coef0d
= alc_read_coef_idx(codec
, 0x0d); /* Digital Misc control */
3569 coef36
= alc_read_coef_idx(codec
, 0x36); /* Passthrough Control */
3570 alc_update_coef_idx(codec
, 0x38, 1<<4, 0x0);
3571 alc_update_coef_idx(codec
, 0x0d, 0x110, 0x0);
3573 alc_update_coef_idx(codec
, 0x67, 0xf000, 0x3000);
3576 snd_hda_codec_write(codec
, hp_pin
, 0,
3577 AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_MUTE
);
3580 alc_update_coef_idx(codec
, 0x36, 1<<14, 1<<14);
3581 alc_update_coef_idx(codec
, 0x36, 1<<13, 0x0);
3584 snd_hda_codec_write(codec
, hp_pin
, 0,
3585 AC_VERB_SET_PIN_WIDGET_CONTROL
, 0x0);
3587 alc_write_coef_idx(codec
, 0x67, 0x0); /* Set HP depop to manual mode */
3588 alc_write_coefex_idx(codec
, 0x58, 0x00, 0x7880);
3589 alc_write_coefex_idx(codec
, 0x58, 0x0f, 0xf049);
3590 alc_update_coefex_idx(codec
, 0x58, 0x03, 0x00f0, 0x00c0);
3592 alc_write_coefex_idx(codec
, 0x58, 0x00, 0xf888); /* HP depop procedure start */
3593 val
= alc_read_coefex_idx(codec
, 0x58, 0x00);
3594 for (i
= 0; i
< 20 && val
& 0x8000; i
++) {
3596 val
= alc_read_coefex_idx(codec
, 0x58, 0x00);
3597 } /* Wait for depop procedure finish */
3599 alc_write_coefex_idx(codec
, 0x58, 0x00, val
); /* write back the result */
3600 alc_update_coef_idx(codec
, 0x38, 1<<4, coef38
);
3601 alc_update_coef_idx(codec
, 0x0d, 0x110, coef0d
);
3602 alc_update_coef_idx(codec
, 0x36, 3<<13, coef36
);
3605 alc_update_coef_idx(codec
, 0x4a, 1<<15, 0);
3608 static void alc225_init(struct hda_codec
*codec
)
3610 struct alc_spec
*spec
= codec
->spec
;
3611 hda_nid_t hp_pin
= alc_get_hp_pin(spec
);
3612 bool hp1_pin_sense
, hp2_pin_sense
;
3614 if (spec
->codec_variant
!= ALC269_TYPE_ALC287
)
3615 /* required only at boot or S3 and S4 resume time */
3616 if (!spec
->done_hp_init
||
3617 is_s3_resume(codec
) ||
3618 is_s4_resume(codec
)) {
3619 alc285_hp_init(codec
);
3620 spec
->done_hp_init
= true;
3627 hp1_pin_sense
= snd_hda_jack_detect(codec
, hp_pin
);
3628 hp2_pin_sense
= snd_hda_jack_detect(codec
, 0x16);
3630 if (hp1_pin_sense
|| hp2_pin_sense
)
3633 alc_update_coefex_idx(codec
, 0x57, 0x04, 0x0007, 0x1); /* Low power */
3634 if (spec
->ultra_low_power
) {
3635 alc_update_coef_idx(codec
, 0x08, 0x0f << 2, 3<<2);
3636 alc_update_coef_idx(codec
, 0x0e, 7<<6, 7<<6);
3637 alc_update_coef_idx(codec
, 0x33, 1<<11, 0);
3641 if (hp1_pin_sense
|| spec
->ultra_low_power
)
3642 snd_hda_codec_write(codec
, hp_pin
, 0,
3643 AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_MUTE
);
3645 snd_hda_codec_write(codec
, 0x16, 0,
3646 AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_MUTE
);
3648 if (hp1_pin_sense
|| hp2_pin_sense
|| spec
->ultra_low_power
)
3651 if (hp1_pin_sense
|| spec
->ultra_low_power
)
3652 snd_hda_codec_write(codec
, hp_pin
, 0,
3653 AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_OUT
);
3655 snd_hda_codec_write(codec
, 0x16, 0,
3656 AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_OUT
);
3658 if (hp1_pin_sense
|| hp2_pin_sense
|| spec
->ultra_low_power
)
3661 alc_update_coef_idx(codec
, 0x4a, 3 << 10, 0);
3662 alc_update_coefex_idx(codec
, 0x57, 0x04, 0x0007, 0x4); /* Hight power */
3665 static void alc225_shutup(struct hda_codec
*codec
)
3667 struct alc_spec
*spec
= codec
->spec
;
3668 hda_nid_t hp_pin
= alc_get_hp_pin(spec
);
3669 bool hp1_pin_sense
, hp2_pin_sense
;
3674 alc_disable_headset_jack_key(codec
);
3675 /* 3k pull low control for Headset jack. */
3676 alc_update_coef_idx(codec
, 0x4a, 0, 3 << 10);
3678 hp1_pin_sense
= snd_hda_jack_detect(codec
, hp_pin
);
3679 hp2_pin_sense
= snd_hda_jack_detect(codec
, 0x16);
3681 if (hp1_pin_sense
|| hp2_pin_sense
)
3684 if (hp1_pin_sense
|| spec
->ultra_low_power
)
3685 snd_hda_codec_write(codec
, hp_pin
, 0,
3686 AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_MUTE
);
3688 snd_hda_codec_write(codec
, 0x16, 0,
3689 AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_MUTE
);
3691 if (hp1_pin_sense
|| hp2_pin_sense
|| spec
->ultra_low_power
)
3694 if (hp1_pin_sense
|| spec
->ultra_low_power
)
3695 snd_hda_codec_write(codec
, hp_pin
, 0,
3696 AC_VERB_SET_PIN_WIDGET_CONTROL
, 0x0);
3698 snd_hda_codec_write(codec
, 0x16, 0,
3699 AC_VERB_SET_PIN_WIDGET_CONTROL
, 0x0);
3701 if (hp1_pin_sense
|| hp2_pin_sense
|| spec
->ultra_low_power
)
3704 alc_auto_setup_eapd(codec
, false);
3705 alc_shutup_pins(codec
);
3706 if (spec
->ultra_low_power
) {
3708 alc_update_coef_idx(codec
, 0x08, 0x0f << 2, 0x0c << 2);
3709 alc_update_coef_idx(codec
, 0x0e, 7<<6, 0);
3710 alc_update_coef_idx(codec
, 0x33, 1<<11, 1<<11);
3711 alc_update_coef_idx(codec
, 0x4a, 3<<4, 2<<4);
3715 alc_update_coef_idx(codec
, 0x4a, 3 << 10, 0);
3716 alc_enable_headset_jack_key(codec
);
3719 static void alc_default_init(struct hda_codec
*codec
)
3721 struct alc_spec
*spec
= codec
->spec
;
3722 hda_nid_t hp_pin
= alc_get_hp_pin(spec
);
3730 hp_pin_sense
= snd_hda_jack_detect(codec
, hp_pin
);
3735 snd_hda_codec_write(codec
, hp_pin
, 0,
3736 AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_MUTE
);
3741 snd_hda_codec_write(codec
, hp_pin
, 0,
3742 AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_OUT
);
3748 static void alc_default_shutup(struct hda_codec
*codec
)
3750 struct alc_spec
*spec
= codec
->spec
;
3751 hda_nid_t hp_pin
= alc_get_hp_pin(spec
);
3755 alc269_shutup(codec
);
3759 hp_pin_sense
= snd_hda_jack_detect(codec
, hp_pin
);
3764 snd_hda_codec_write(codec
, hp_pin
, 0,
3765 AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_MUTE
);
3770 if (!spec
->no_shutup_pins
)
3771 snd_hda_codec_write(codec
, hp_pin
, 0,
3772 AC_VERB_SET_PIN_WIDGET_CONTROL
, 0x0);
3777 alc_auto_setup_eapd(codec
, false);
3778 alc_shutup_pins(codec
);
3781 static void alc294_hp_init(struct hda_codec
*codec
)
3783 struct alc_spec
*spec
= codec
->spec
;
3784 hda_nid_t hp_pin
= alc_get_hp_pin(spec
);
3790 snd_hda_codec_write(codec
, hp_pin
, 0,
3791 AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_MUTE
);
3795 if (!spec
->no_shutup_pins
)
3796 snd_hda_codec_write(codec
, hp_pin
, 0,
3797 AC_VERB_SET_PIN_WIDGET_CONTROL
, 0x0);
3799 alc_update_coef_idx(codec
, 0x6f, 0x000f, 0);/* Set HP depop to manual mode */
3800 alc_update_coefex_idx(codec
, 0x58, 0x00, 0x8000, 0x8000); /* HP depop procedure start */
3802 /* Wait for depop procedure finish */
3803 val
= alc_read_coefex_idx(codec
, 0x58, 0x01);
3804 for (i
= 0; i
< 20 && val
& 0x0080; i
++) {
3806 val
= alc_read_coefex_idx(codec
, 0x58, 0x01);
3808 /* Set HP depop to auto mode */
3809 alc_update_coef_idx(codec
, 0x6f, 0x000f, 0x000b);
3813 static void alc294_init(struct hda_codec
*codec
)
3815 struct alc_spec
*spec
= codec
->spec
;
3817 /* required only at boot or S4 resume time */
3818 if (!spec
->done_hp_init
||
3819 codec
->core
.dev
.power
.power_state
.event
== PM_EVENT_RESTORE
) {
3820 alc294_hp_init(codec
);
3821 spec
->done_hp_init
= true;
3823 alc_default_init(codec
);
3826 static void alc5505_coef_set(struct hda_codec
*codec
, unsigned int index_reg
,
3829 snd_hda_codec_write(codec
, 0x51, 0, AC_VERB_SET_COEF_INDEX
, index_reg
>> 1);
3830 snd_hda_codec_write(codec
, 0x51, 0, AC_VERB_SET_PROC_COEF
, val
& 0xffff); /* LSB */
3831 snd_hda_codec_write(codec
, 0x51, 0, AC_VERB_SET_PROC_COEF
, val
>> 16); /* MSB */
3834 static int alc5505_coef_get(struct hda_codec
*codec
, unsigned int index_reg
)
3838 snd_hda_codec_write(codec
, 0x51, 0, AC_VERB_SET_COEF_INDEX
, index_reg
>> 1);
3839 val
= snd_hda_codec_read(codec
, 0x51, 0, AC_VERB_GET_PROC_COEF
, 0)
3841 val
|= snd_hda_codec_read(codec
, 0x51, 0, AC_VERB_GET_PROC_COEF
, 0)
3846 static void alc5505_dsp_halt(struct hda_codec
*codec
)
3850 alc5505_coef_set(codec
, 0x3000, 0x000c); /* DSP CPU stop */
3851 alc5505_coef_set(codec
, 0x880c, 0x0008); /* DDR enter self refresh */
3852 alc5505_coef_set(codec
, 0x61c0, 0x11110080); /* Clock control for PLL and CPU */
3853 alc5505_coef_set(codec
, 0x6230, 0xfc0d4011); /* Disable Input OP */
3854 alc5505_coef_set(codec
, 0x61b4, 0x040a2b03); /* Stop PLL2 */
3855 alc5505_coef_set(codec
, 0x61b0, 0x00005b17); /* Stop PLL1 */
3856 alc5505_coef_set(codec
, 0x61b8, 0x04133303); /* Stop PLL3 */
3857 val
= alc5505_coef_get(codec
, 0x6220);
3858 alc5505_coef_set(codec
, 0x6220, (val
| 0x3000)); /* switch Ringbuffer clock to DBUS clock */
3861 static void alc5505_dsp_back_from_halt(struct hda_codec
*codec
)
3863 alc5505_coef_set(codec
, 0x61b8, 0x04133302);
3864 alc5505_coef_set(codec
, 0x61b0, 0x00005b16);
3865 alc5505_coef_set(codec
, 0x61b4, 0x040a2b02);
3866 alc5505_coef_set(codec
, 0x6230, 0xf80d4011);
3867 alc5505_coef_set(codec
, 0x6220, 0x2002010f);
3868 alc5505_coef_set(codec
, 0x880c, 0x00000004);
3871 static void alc5505_dsp_init(struct hda_codec
*codec
)
3875 alc5505_dsp_halt(codec
);
3876 alc5505_dsp_back_from_halt(codec
);
3877 alc5505_coef_set(codec
, 0x61b0, 0x5b14); /* PLL1 control */
3878 alc5505_coef_set(codec
, 0x61b0, 0x5b16);
3879 alc5505_coef_set(codec
, 0x61b4, 0x04132b00); /* PLL2 control */
3880 alc5505_coef_set(codec
, 0x61b4, 0x04132b02);
3881 alc5505_coef_set(codec
, 0x61b8, 0x041f3300); /* PLL3 control*/
3882 alc5505_coef_set(codec
, 0x61b8, 0x041f3302);
3883 snd_hda_codec_write(codec
, 0x51, 0, AC_VERB_SET_CODEC_RESET
, 0); /* Function reset */
3884 alc5505_coef_set(codec
, 0x61b8, 0x041b3302);
3885 alc5505_coef_set(codec
, 0x61b8, 0x04173302);
3886 alc5505_coef_set(codec
, 0x61b8, 0x04163302);
3887 alc5505_coef_set(codec
, 0x8800, 0x348b328b); /* DRAM control */
3888 alc5505_coef_set(codec
, 0x8808, 0x00020022); /* DRAM control */
3889 alc5505_coef_set(codec
, 0x8818, 0x00000400); /* DRAM control */
3891 val
= alc5505_coef_get(codec
, 0x6200) >> 16; /* Read revision ID */
3893 alc5505_coef_set(codec
, 0x6220, 0x2002010f); /* I/O PAD Configuration */
3895 alc5505_coef_set(codec
, 0x6220, 0x6002018f);
3897 alc5505_coef_set(codec
, 0x61ac, 0x055525f0); /**/
3898 alc5505_coef_set(codec
, 0x61c0, 0x12230080); /* Clock control */
3899 alc5505_coef_set(codec
, 0x61b4, 0x040e2b02); /* PLL2 control */
3900 alc5505_coef_set(codec
, 0x61bc, 0x010234f8); /* OSC Control */
3901 alc5505_coef_set(codec
, 0x880c, 0x00000004); /* DRAM Function control */
3902 alc5505_coef_set(codec
, 0x880c, 0x00000003);
3903 alc5505_coef_set(codec
, 0x880c, 0x00000010);
3905 #ifdef HALT_REALTEK_ALC5505
3906 alc5505_dsp_halt(codec
);
3910 #ifdef HALT_REALTEK_ALC5505
3911 #define alc5505_dsp_suspend(codec) do { } while (0) /* NOP */
3912 #define alc5505_dsp_resume(codec) do { } while (0) /* NOP */
3914 #define alc5505_dsp_suspend(codec) alc5505_dsp_halt(codec)
3915 #define alc5505_dsp_resume(codec) alc5505_dsp_back_from_halt(codec)
3919 static int alc269_suspend(struct hda_codec
*codec
)
3921 struct alc_spec
*spec
= codec
->spec
;
3923 if (spec
->has_alc5505_dsp
)
3924 alc5505_dsp_suspend(codec
);
3925 return alc_suspend(codec
);
3928 static int alc269_resume(struct hda_codec
*codec
)
3930 struct alc_spec
*spec
= codec
->spec
;
3932 if (spec
->codec_variant
== ALC269_TYPE_ALC269VB
)
3933 alc269vb_toggle_power_output(codec
, 0);
3934 if (spec
->codec_variant
== ALC269_TYPE_ALC269VB
&&
3935 (alc_get_coef0(codec
) & 0x00ff) == 0x018) {
3939 codec
->patch_ops
.init(codec
);
3941 if (spec
->codec_variant
== ALC269_TYPE_ALC269VB
)
3942 alc269vb_toggle_power_output(codec
, 1);
3943 if (spec
->codec_variant
== ALC269_TYPE_ALC269VB
&&
3944 (alc_get_coef0(codec
) & 0x00ff) == 0x017) {
3948 snd_hda_regmap_sync(codec
);
3949 hda_call_check_power_status(codec
, 0x01);
3951 /* on some machine, the BIOS will clear the codec gpio data when enter
3952 * suspend, and won't restore the data after resume, so we restore it
3955 if (spec
->gpio_data
)
3956 alc_write_gpio_data(codec
);
3958 if (spec
->has_alc5505_dsp
)
3959 alc5505_dsp_resume(codec
);
3963 #endif /* CONFIG_PM */
3965 static void alc269_fixup_pincfg_no_hp_to_lineout(struct hda_codec
*codec
,
3966 const struct hda_fixup
*fix
, int action
)
3968 struct alc_spec
*spec
= codec
->spec
;
3970 if (action
== HDA_FIXUP_ACT_PRE_PROBE
)
3971 spec
->parse_flags
= HDA_PINCFG_NO_HP_FIXUP
;
3974 static void alc269_fixup_pincfg_U7x7_headset_mic(struct hda_codec
*codec
,
3975 const struct hda_fixup
*fix
,
3978 unsigned int cfg_headphone
= snd_hda_codec_get_pincfg(codec
, 0x21);
3979 unsigned int cfg_headset_mic
= snd_hda_codec_get_pincfg(codec
, 0x19);
3981 if (cfg_headphone
&& cfg_headset_mic
== 0x411111f0)
3982 snd_hda_codec_set_pincfg(codec
, 0x19,
3983 (cfg_headphone
& ~AC_DEFCFG_DEVICE
) |
3984 (AC_JACK_MIC_IN
<< AC_DEFCFG_DEVICE_SHIFT
));
3987 static void alc269_fixup_hweq(struct hda_codec
*codec
,
3988 const struct hda_fixup
*fix
, int action
)
3990 if (action
== HDA_FIXUP_ACT_INIT
)
3991 alc_update_coef_idx(codec
, 0x1e, 0, 0x80);
3994 static void alc269_fixup_headset_mic(struct hda_codec
*codec
,
3995 const struct hda_fixup
*fix
, int action
)
3997 struct alc_spec
*spec
= codec
->spec
;
3999 if (action
== HDA_FIXUP_ACT_PRE_PROBE
)
4000 spec
->parse_flags
|= HDA_PINCFG_HEADSET_MIC
;
4003 static void alc271_fixup_dmic(struct hda_codec
*codec
,
4004 const struct hda_fixup
*fix
, int action
)
4006 static const struct hda_verb verbs
[] = {
4007 {0x20, AC_VERB_SET_COEF_INDEX
, 0x0d},
4008 {0x20, AC_VERB_SET_PROC_COEF
, 0x4000},
4013 if (strcmp(codec
->core
.chip_name
, "ALC271X") &&
4014 strcmp(codec
->core
.chip_name
, "ALC269VB"))
4016 cfg
= snd_hda_codec_get_pincfg(codec
, 0x12);
4017 if (get_defcfg_connect(cfg
) == AC_JACK_PORT_FIXED
)
4018 snd_hda_sequence_write(codec
, verbs
);
4021 /* Fix the speaker amp after resume, etc */
4022 static void alc269vb_fixup_aspire_e1_coef(struct hda_codec
*codec
,
4023 const struct hda_fixup
*fix
,
4026 if (action
== HDA_FIXUP_ACT_INIT
)
4027 alc_update_coef_idx(codec
, 0x0d, 0x6000, 0x6000);
4030 static void alc269_fixup_pcm_44k(struct hda_codec
*codec
,
4031 const struct hda_fixup
*fix
, int action
)
4033 struct alc_spec
*spec
= codec
->spec
;
4035 if (action
!= HDA_FIXUP_ACT_PROBE
)
4038 /* Due to a hardware problem on Lenovo Ideadpad, we need to
4039 * fix the sample rate of analog I/O to 44.1kHz
4041 spec
->gen
.stream_analog_playback
= &alc269_44k_pcm_analog_playback
;
4042 spec
->gen
.stream_analog_capture
= &alc269_44k_pcm_analog_capture
;
4045 static void alc269_fixup_stereo_dmic(struct hda_codec
*codec
,
4046 const struct hda_fixup
*fix
, int action
)
4048 /* The digital-mic unit sends PDM (differential signal) instead of
4049 * the standard PCM, thus you can't record a valid mono stream as is.
4050 * Below is a workaround specific to ALC269 to control the dmic
4051 * signal source as mono.
4053 if (action
== HDA_FIXUP_ACT_INIT
)
4054 alc_update_coef_idx(codec
, 0x07, 0, 0x80);
4057 static void alc269_quanta_automute(struct hda_codec
*codec
)
4059 snd_hda_gen_update_outputs(codec
);
4061 alc_write_coef_idx(codec
, 0x0c, 0x680);
4062 alc_write_coef_idx(codec
, 0x0c, 0x480);
4065 static void alc269_fixup_quanta_mute(struct hda_codec
*codec
,
4066 const struct hda_fixup
*fix
, int action
)
4068 struct alc_spec
*spec
= codec
->spec
;
4069 if (action
!= HDA_FIXUP_ACT_PROBE
)
4071 spec
->gen
.automute_hook
= alc269_quanta_automute
;
4074 static void alc269_x101_hp_automute_hook(struct hda_codec
*codec
,
4075 struct hda_jack_callback
*jack
)
4077 struct alc_spec
*spec
= codec
->spec
;
4080 snd_hda_gen_hp_automute(codec
, jack
);
4082 vref
= spec
->gen
.hp_jack_present
? PIN_VREF80
: 0;
4084 snd_hda_codec_write(codec
, 0x18, 0, AC_VERB_SET_PIN_WIDGET_CONTROL
,
4087 snd_hda_codec_write(codec
, 0x18, 0, AC_VERB_SET_PIN_WIDGET_CONTROL
,
4092 * Magic sequence to make Huawei Matebook X right speaker working (bko#197801)
4094 struct hda_alc298_mbxinit
{
4095 unsigned char value_0x23
;
4096 unsigned char value_0x25
;
4099 static void alc298_huawei_mbx_stereo_seq(struct hda_codec
*codec
,
4100 const struct hda_alc298_mbxinit
*initval
,
4103 snd_hda_codec_write(codec
, 0x06, 0, AC_VERB_SET_DIGI_CONVERT_3
, 0x0);
4104 alc_write_coef_idx(codec
, 0x26, 0xb000);
4107 snd_hda_codec_write(codec
, 0x21, 0, AC_VERB_GET_PIN_SENSE
, 0x0);
4109 snd_hda_codec_write(codec
, 0x6, 0, AC_VERB_SET_DIGI_CONVERT_3
, 0x80);
4110 alc_write_coef_idx(codec
, 0x26, 0xf000);
4111 alc_write_coef_idx(codec
, 0x23, initval
->value_0x23
);
4113 if (initval
->value_0x23
!= 0x1e)
4114 alc_write_coef_idx(codec
, 0x25, initval
->value_0x25
);
4116 snd_hda_codec_write(codec
, 0x20, 0, AC_VERB_SET_COEF_INDEX
, 0x26);
4117 snd_hda_codec_write(codec
, 0x20, 0, AC_VERB_SET_PROC_COEF
, 0xb010);
4120 static void alc298_fixup_huawei_mbx_stereo(struct hda_codec
*codec
,
4121 const struct hda_fixup
*fix
,
4124 /* Initialization magic */
4125 static const struct hda_alc298_mbxinit dac_init
[] = {
4126 {0x0c, 0x00}, {0x0d, 0x00}, {0x0e, 0x00}, {0x0f, 0x00},
4127 {0x10, 0x00}, {0x1a, 0x40}, {0x1b, 0x82}, {0x1c, 0x00},
4128 {0x1d, 0x00}, {0x1e, 0x00}, {0x1f, 0x00},
4129 {0x20, 0xc2}, {0x21, 0xc8}, {0x22, 0x26}, {0x23, 0x24},
4130 {0x27, 0xff}, {0x28, 0xff}, {0x29, 0xff}, {0x2a, 0x8f},
4131 {0x2b, 0x02}, {0x2c, 0x48}, {0x2d, 0x34}, {0x2e, 0x00},
4133 {0x30, 0x00}, {0x31, 0x00}, {0x32, 0x00}, {0x33, 0x00},
4134 {0x34, 0x00}, {0x35, 0x01}, {0x36, 0x93}, {0x37, 0x0c},
4135 {0x38, 0x00}, {0x39, 0x00}, {0x3a, 0xf8}, {0x38, 0x80},
4138 const struct hda_alc298_mbxinit
*seq
;
4140 if (action
!= HDA_FIXUP_ACT_INIT
)
4144 snd_hda_codec_write(codec
, 0x06, 0, AC_VERB_SET_DIGI_CONVERT_3
, 0x00);
4145 snd_hda_codec_write(codec
, 0x06, 0, AC_VERB_SET_DIGI_CONVERT_3
, 0x80);
4146 alc_write_coef_idx(codec
, 0x26, 0xf000);
4147 alc_write_coef_idx(codec
, 0x22, 0x31);
4148 alc_write_coef_idx(codec
, 0x23, 0x0b);
4149 alc_write_coef_idx(codec
, 0x25, 0x00);
4150 snd_hda_codec_write(codec
, 0x20, 0, AC_VERB_SET_COEF_INDEX
, 0x26);
4151 snd_hda_codec_write(codec
, 0x20, 0, AC_VERB_SET_PROC_COEF
, 0xb010);
4153 for (seq
= dac_init
; seq
->value_0x23
; seq
++)
4154 alc298_huawei_mbx_stereo_seq(codec
, seq
, seq
== dac_init
);
4157 static void alc269_fixup_x101_headset_mic(struct hda_codec
*codec
,
4158 const struct hda_fixup
*fix
, int action
)
4160 struct alc_spec
*spec
= codec
->spec
;
4161 if (action
== HDA_FIXUP_ACT_PRE_PROBE
) {
4162 spec
->parse_flags
|= HDA_PINCFG_HEADSET_MIC
;
4163 spec
->gen
.hp_automute_hook
= alc269_x101_hp_automute_hook
;
4167 static void alc_update_vref_led(struct hda_codec
*codec
, hda_nid_t pin
,
4168 bool polarity
, bool on
)
4170 unsigned int pinval
;
4176 pinval
= snd_hda_codec_get_pin_target(codec
, pin
);
4177 pinval
&= ~AC_PINCTL_VREFEN
;
4178 pinval
|= on
? AC_PINCTL_VREF_80
: AC_PINCTL_VREF_HIZ
;
4179 /* temporarily power up/down for setting VREF */
4180 snd_hda_power_up_pm(codec
);
4181 snd_hda_set_pin_ctl_cache(codec
, pin
, pinval
);
4182 snd_hda_power_down_pm(codec
);
4185 /* update mute-LED according to the speaker mute state via mic VREF pin */
4186 static int vref_mute_led_set(struct led_classdev
*led_cdev
,
4187 enum led_brightness brightness
)
4189 struct hda_codec
*codec
= dev_to_hda_codec(led_cdev
->dev
->parent
);
4190 struct alc_spec
*spec
= codec
->spec
;
4192 alc_update_vref_led(codec
, spec
->mute_led_nid
,
4193 spec
->mute_led_polarity
, brightness
);
4197 /* Make sure the led works even in runtime suspend */
4198 static unsigned int led_power_filter(struct hda_codec
*codec
,
4200 unsigned int power_state
)
4202 struct alc_spec
*spec
= codec
->spec
;
4204 if (power_state
!= AC_PWRST_D3
|| nid
== 0 ||
4205 (nid
!= spec
->mute_led_nid
&& nid
!= spec
->cap_mute_led_nid
))
4208 /* Set pin ctl again, it might have just been set to 0 */
4209 snd_hda_set_pin_ctl(codec
, nid
,
4210 snd_hda_codec_get_pin_target(codec
, nid
));
4212 return snd_hda_gen_path_power_filter(codec
, nid
, power_state
);
4215 static void alc269_fixup_hp_mute_led(struct hda_codec
*codec
,
4216 const struct hda_fixup
*fix
, int action
)
4218 struct alc_spec
*spec
= codec
->spec
;
4219 const struct dmi_device
*dev
= NULL
;
4221 if (action
!= HDA_FIXUP_ACT_PRE_PROBE
)
4224 while ((dev
= dmi_find_device(DMI_DEV_TYPE_OEM_STRING
, NULL
, dev
))) {
4226 if (sscanf(dev
->name
, "HP_Mute_LED_%d_%x", &pol
, &pin
) != 2)
4228 if (pin
< 0x0a || pin
>= 0x10)
4230 spec
->mute_led_polarity
= pol
;
4231 spec
->mute_led_nid
= pin
- 0x0a + 0x18;
4232 snd_hda_gen_add_mute_led_cdev(codec
, vref_mute_led_set
);
4233 codec
->power_filter
= led_power_filter
;
4235 "Detected mute LED for %x:%d\n", spec
->mute_led_nid
,
4236 spec
->mute_led_polarity
);
4241 static void alc269_fixup_hp_mute_led_micx(struct hda_codec
*codec
,
4242 const struct hda_fixup
*fix
,
4243 int action
, hda_nid_t pin
)
4245 struct alc_spec
*spec
= codec
->spec
;
4247 if (action
== HDA_FIXUP_ACT_PRE_PROBE
) {
4248 spec
->mute_led_polarity
= 0;
4249 spec
->mute_led_nid
= pin
;
4250 snd_hda_gen_add_mute_led_cdev(codec
, vref_mute_led_set
);
4251 codec
->power_filter
= led_power_filter
;
4255 static void alc269_fixup_hp_mute_led_mic1(struct hda_codec
*codec
,
4256 const struct hda_fixup
*fix
, int action
)
4258 alc269_fixup_hp_mute_led_micx(codec
, fix
, action
, 0x18);
4261 static void alc269_fixup_hp_mute_led_mic2(struct hda_codec
*codec
,
4262 const struct hda_fixup
*fix
, int action
)
4264 alc269_fixup_hp_mute_led_micx(codec
, fix
, action
, 0x19);
4267 static void alc269_fixup_hp_mute_led_mic3(struct hda_codec
*codec
,
4268 const struct hda_fixup
*fix
, int action
)
4270 alc269_fixup_hp_mute_led_micx(codec
, fix
, action
, 0x1b);
4273 /* update LED status via GPIO */
4274 static void alc_update_gpio_led(struct hda_codec
*codec
, unsigned int mask
,
4275 int polarity
, bool enabled
)
4279 alc_update_gpio_data(codec
, mask
, !enabled
); /* muted -> LED on */
4282 /* turn on/off mute LED via GPIO per vmaster hook */
4283 static int gpio_mute_led_set(struct led_classdev
*led_cdev
,
4284 enum led_brightness brightness
)
4286 struct hda_codec
*codec
= dev_to_hda_codec(led_cdev
->dev
->parent
);
4287 struct alc_spec
*spec
= codec
->spec
;
4289 alc_update_gpio_led(codec
, spec
->gpio_mute_led_mask
,
4290 spec
->mute_led_polarity
, !brightness
);
4294 /* turn on/off mic-mute LED via GPIO per capture hook */
4295 static int micmute_led_set(struct led_classdev
*led_cdev
,
4296 enum led_brightness brightness
)
4298 struct hda_codec
*codec
= dev_to_hda_codec(led_cdev
->dev
->parent
);
4299 struct alc_spec
*spec
= codec
->spec
;
4301 alc_update_gpio_led(codec
, spec
->gpio_mic_led_mask
,
4302 spec
->micmute_led_polarity
, !brightness
);
4306 /* setup mute and mic-mute GPIO bits, add hooks appropriately */
4307 static void alc_fixup_hp_gpio_led(struct hda_codec
*codec
,
4309 unsigned int mute_mask
,
4310 unsigned int micmute_mask
)
4312 struct alc_spec
*spec
= codec
->spec
;
4314 alc_fixup_gpio(codec
, action
, mute_mask
| micmute_mask
);
4316 if (action
!= HDA_FIXUP_ACT_PRE_PROBE
)
4319 spec
->gpio_mute_led_mask
= mute_mask
;
4320 snd_hda_gen_add_mute_led_cdev(codec
, gpio_mute_led_set
);
4323 spec
->gpio_mic_led_mask
= micmute_mask
;
4324 snd_hda_gen_add_micmute_led_cdev(codec
, micmute_led_set
);
4328 static void alc236_fixup_hp_gpio_led(struct hda_codec
*codec
,
4329 const struct hda_fixup
*fix
, int action
)
4331 alc_fixup_hp_gpio_led(codec
, action
, 0x02, 0x01);
4334 static void alc269_fixup_hp_gpio_led(struct hda_codec
*codec
,
4335 const struct hda_fixup
*fix
, int action
)
4337 alc_fixup_hp_gpio_led(codec
, action
, 0x08, 0x10);
4340 static void alc285_fixup_hp_gpio_led(struct hda_codec
*codec
,
4341 const struct hda_fixup
*fix
, int action
)
4343 alc_fixup_hp_gpio_led(codec
, action
, 0x04, 0x01);
4346 static void alc286_fixup_hp_gpio_led(struct hda_codec
*codec
,
4347 const struct hda_fixup
*fix
, int action
)
4349 alc_fixup_hp_gpio_led(codec
, action
, 0x02, 0x20);
4352 static void alc287_fixup_hp_gpio_led(struct hda_codec
*codec
,
4353 const struct hda_fixup
*fix
, int action
)
4355 alc_fixup_hp_gpio_led(codec
, action
, 0x10, 0);
4358 /* turn on/off mic-mute LED per capture hook via VREF change */
4359 static int vref_micmute_led_set(struct led_classdev
*led_cdev
,
4360 enum led_brightness brightness
)
4362 struct hda_codec
*codec
= dev_to_hda_codec(led_cdev
->dev
->parent
);
4363 struct alc_spec
*spec
= codec
->spec
;
4365 alc_update_vref_led(codec
, spec
->cap_mute_led_nid
,
4366 spec
->micmute_led_polarity
, brightness
);
4370 static void alc269_fixup_hp_gpio_mic1_led(struct hda_codec
*codec
,
4371 const struct hda_fixup
*fix
, int action
)
4373 struct alc_spec
*spec
= codec
->spec
;
4375 alc_fixup_hp_gpio_led(codec
, action
, 0x08, 0);
4376 if (action
== HDA_FIXUP_ACT_PRE_PROBE
) {
4377 /* Like hp_gpio_mic1_led, but also needs GPIO4 low to
4378 * enable headphone amp
4380 spec
->gpio_mask
|= 0x10;
4381 spec
->gpio_dir
|= 0x10;
4382 spec
->cap_mute_led_nid
= 0x18;
4383 snd_hda_gen_add_micmute_led_cdev(codec
, vref_micmute_led_set
);
4384 codec
->power_filter
= led_power_filter
;
4388 static void alc280_fixup_hp_gpio4(struct hda_codec
*codec
,
4389 const struct hda_fixup
*fix
, int action
)
4391 struct alc_spec
*spec
= codec
->spec
;
4393 alc_fixup_hp_gpio_led(codec
, action
, 0x08, 0);
4394 if (action
== HDA_FIXUP_ACT_PRE_PROBE
) {
4395 spec
->cap_mute_led_nid
= 0x18;
4396 snd_hda_gen_add_micmute_led_cdev(codec
, vref_micmute_led_set
);
4397 codec
->power_filter
= led_power_filter
;
4401 /* HP Spectre x360 14 model needs a unique workaround for enabling the amp;
4402 * it needs to toggle the GPIO0 once on and off at each time (bko#210633)
4404 static void alc245_fixup_hp_x360_amp(struct hda_codec
*codec
,
4405 const struct hda_fixup
*fix
, int action
)
4407 struct alc_spec
*spec
= codec
->spec
;
4410 case HDA_FIXUP_ACT_PRE_PROBE
:
4411 spec
->gpio_mask
|= 0x01;
4412 spec
->gpio_dir
|= 0x01;
4414 case HDA_FIXUP_ACT_INIT
:
4415 /* need to toggle GPIO to enable the amp */
4416 alc_update_gpio_data(codec
, 0x01, true);
4418 alc_update_gpio_data(codec
, 0x01, false);
4423 /* toggle GPIO2 at each time stream is started; we use PREPARE state instead */
4424 static void alc274_hp_envy_pcm_hook(struct hda_pcm_stream
*hinfo
,
4425 struct hda_codec
*codec
,
4426 struct snd_pcm_substream
*substream
,
4430 case HDA_GEN_PCM_ACT_PREPARE
:
4431 alc_update_gpio_data(codec
, 0x04, true);
4433 case HDA_GEN_PCM_ACT_CLEANUP
:
4434 alc_update_gpio_data(codec
, 0x04, false);
4439 static void alc274_fixup_hp_envy_gpio(struct hda_codec
*codec
,
4440 const struct hda_fixup
*fix
,
4443 struct alc_spec
*spec
= codec
->spec
;
4445 if (action
== HDA_FIXUP_ACT_PROBE
) {
4446 spec
->gpio_mask
|= 0x04;
4447 spec
->gpio_dir
|= 0x04;
4448 spec
->gen
.pcm_playback_hook
= alc274_hp_envy_pcm_hook
;
4452 static void alc_update_coef_led(struct hda_codec
*codec
,
4453 struct alc_coef_led
*led
,
4454 bool polarity
, bool on
)
4458 /* temporarily power up/down for setting COEF bit */
4459 alc_update_coef_idx(codec
, led
->idx
, led
->mask
,
4460 on
? led
->on
: led
->off
);
4463 /* update mute-LED according to the speaker mute state via COEF bit */
4464 static int coef_mute_led_set(struct led_classdev
*led_cdev
,
4465 enum led_brightness brightness
)
4467 struct hda_codec
*codec
= dev_to_hda_codec(led_cdev
->dev
->parent
);
4468 struct alc_spec
*spec
= codec
->spec
;
4470 alc_update_coef_led(codec
, &spec
->mute_led_coef
,
4471 spec
->mute_led_polarity
, brightness
);
4475 static void alc285_fixup_hp_mute_led_coefbit(struct hda_codec
*codec
,
4476 const struct hda_fixup
*fix
,
4479 struct alc_spec
*spec
= codec
->spec
;
4481 if (action
== HDA_FIXUP_ACT_PRE_PROBE
) {
4482 spec
->mute_led_polarity
= 0;
4483 spec
->mute_led_coef
.idx
= 0x0b;
4484 spec
->mute_led_coef
.mask
= 1 << 3;
4485 spec
->mute_led_coef
.on
= 1 << 3;
4486 spec
->mute_led_coef
.off
= 0;
4487 snd_hda_gen_add_mute_led_cdev(codec
, coef_mute_led_set
);
4491 static void alc236_fixup_hp_mute_led_coefbit(struct hda_codec
*codec
,
4492 const struct hda_fixup
*fix
,
4495 struct alc_spec
*spec
= codec
->spec
;
4497 if (action
== HDA_FIXUP_ACT_PRE_PROBE
) {
4498 spec
->mute_led_polarity
= 0;
4499 spec
->mute_led_coef
.idx
= 0x34;
4500 spec
->mute_led_coef
.mask
= 1 << 5;
4501 spec
->mute_led_coef
.on
= 0;
4502 spec
->mute_led_coef
.off
= 1 << 5;
4503 snd_hda_gen_add_mute_led_cdev(codec
, coef_mute_led_set
);
4507 /* turn on/off mic-mute LED per capture hook by coef bit */
4508 static int coef_micmute_led_set(struct led_classdev
*led_cdev
,
4509 enum led_brightness brightness
)
4511 struct hda_codec
*codec
= dev_to_hda_codec(led_cdev
->dev
->parent
);
4512 struct alc_spec
*spec
= codec
->spec
;
4514 alc_update_coef_led(codec
, &spec
->mic_led_coef
,
4515 spec
->micmute_led_polarity
, brightness
);
4519 static void alc285_fixup_hp_coef_micmute_led(struct hda_codec
*codec
,
4520 const struct hda_fixup
*fix
, int action
)
4522 struct alc_spec
*spec
= codec
->spec
;
4524 if (action
== HDA_FIXUP_ACT_PRE_PROBE
) {
4525 spec
->mic_led_coef
.idx
= 0x19;
4526 spec
->mic_led_coef
.mask
= 1 << 13;
4527 spec
->mic_led_coef
.on
= 1 << 13;
4528 spec
->mic_led_coef
.off
= 0;
4529 snd_hda_gen_add_micmute_led_cdev(codec
, coef_micmute_led_set
);
4533 static void alc236_fixup_hp_coef_micmute_led(struct hda_codec
*codec
,
4534 const struct hda_fixup
*fix
, int action
)
4536 struct alc_spec
*spec
= codec
->spec
;
4538 if (action
== HDA_FIXUP_ACT_PRE_PROBE
) {
4539 spec
->mic_led_coef
.idx
= 0x35;
4540 spec
->mic_led_coef
.mask
= 3 << 2;
4541 spec
->mic_led_coef
.on
= 2 << 2;
4542 spec
->mic_led_coef
.off
= 1 << 2;
4543 snd_hda_gen_add_micmute_led_cdev(codec
, coef_micmute_led_set
);
4547 static void alc285_fixup_hp_mute_led(struct hda_codec
*codec
,
4548 const struct hda_fixup
*fix
, int action
)
4550 alc285_fixup_hp_mute_led_coefbit(codec
, fix
, action
);
4551 alc285_fixup_hp_coef_micmute_led(codec
, fix
, action
);
4554 static void alc236_fixup_hp_mute_led(struct hda_codec
*codec
,
4555 const struct hda_fixup
*fix
, int action
)
4557 alc236_fixup_hp_mute_led_coefbit(codec
, fix
, action
);
4558 alc236_fixup_hp_coef_micmute_led(codec
, fix
, action
);
4561 static void alc236_fixup_hp_micmute_led_vref(struct hda_codec
*codec
,
4562 const struct hda_fixup
*fix
, int action
)
4564 struct alc_spec
*spec
= codec
->spec
;
4566 if (action
== HDA_FIXUP_ACT_PRE_PROBE
) {
4567 spec
->cap_mute_led_nid
= 0x1a;
4568 snd_hda_gen_add_micmute_led_cdev(codec
, vref_micmute_led_set
);
4569 codec
->power_filter
= led_power_filter
;
4573 static void alc236_fixup_hp_mute_led_micmute_vref(struct hda_codec
*codec
,
4574 const struct hda_fixup
*fix
, int action
)
4576 alc236_fixup_hp_mute_led_coefbit(codec
, fix
, action
);
4577 alc236_fixup_hp_micmute_led_vref(codec
, fix
, action
);
4580 #if IS_REACHABLE(CONFIG_INPUT)
4581 static void gpio2_mic_hotkey_event(struct hda_codec
*codec
,
4582 struct hda_jack_callback
*event
)
4584 struct alc_spec
*spec
= codec
->spec
;
4586 /* GPIO2 just toggles on a keypress/keyrelease cycle. Therefore
4587 send both key on and key off event for every interrupt. */
4588 input_report_key(spec
->kb_dev
, spec
->alc_mute_keycode_map
[ALC_KEY_MICMUTE_INDEX
], 1);
4589 input_sync(spec
->kb_dev
);
4590 input_report_key(spec
->kb_dev
, spec
->alc_mute_keycode_map
[ALC_KEY_MICMUTE_INDEX
], 0);
4591 input_sync(spec
->kb_dev
);
4594 static int alc_register_micmute_input_device(struct hda_codec
*codec
)
4596 struct alc_spec
*spec
= codec
->spec
;
4599 spec
->kb_dev
= input_allocate_device();
4600 if (!spec
->kb_dev
) {
4601 codec_err(codec
, "Out of memory (input_allocate_device)\n");
4605 spec
->alc_mute_keycode_map
[ALC_KEY_MICMUTE_INDEX
] = KEY_MICMUTE
;
4607 spec
->kb_dev
->name
= "Microphone Mute Button";
4608 spec
->kb_dev
->evbit
[0] = BIT_MASK(EV_KEY
);
4609 spec
->kb_dev
->keycodesize
= sizeof(spec
->alc_mute_keycode_map
[0]);
4610 spec
->kb_dev
->keycodemax
= ARRAY_SIZE(spec
->alc_mute_keycode_map
);
4611 spec
->kb_dev
->keycode
= spec
->alc_mute_keycode_map
;
4612 for (i
= 0; i
< ARRAY_SIZE(spec
->alc_mute_keycode_map
); i
++)
4613 set_bit(spec
->alc_mute_keycode_map
[i
], spec
->kb_dev
->keybit
);
4615 if (input_register_device(spec
->kb_dev
)) {
4616 codec_err(codec
, "input_register_device failed\n");
4617 input_free_device(spec
->kb_dev
);
4618 spec
->kb_dev
= NULL
;
4625 /* GPIO1 = set according to SKU external amp
4626 * GPIO2 = mic mute hotkey
4628 * GPIO4 = mic mute LED
4630 static void alc280_fixup_hp_gpio2_mic_hotkey(struct hda_codec
*codec
,
4631 const struct hda_fixup
*fix
, int action
)
4633 struct alc_spec
*spec
= codec
->spec
;
4635 alc_fixup_hp_gpio_led(codec
, action
, 0x08, 0x10);
4636 if (action
== HDA_FIXUP_ACT_PRE_PROBE
) {
4637 spec
->init_amp
= ALC_INIT_DEFAULT
;
4638 if (alc_register_micmute_input_device(codec
) != 0)
4641 spec
->gpio_mask
|= 0x06;
4642 spec
->gpio_dir
|= 0x02;
4643 spec
->gpio_data
|= 0x02;
4644 snd_hda_codec_write_cache(codec
, codec
->core
.afg
, 0,
4645 AC_VERB_SET_GPIO_UNSOLICITED_RSP_MASK
, 0x04);
4646 snd_hda_jack_detect_enable_callback(codec
, codec
->core
.afg
,
4647 gpio2_mic_hotkey_event
);
4655 case HDA_FIXUP_ACT_FREE
:
4656 input_unregister_device(spec
->kb_dev
);
4657 spec
->kb_dev
= NULL
;
4661 /* Line2 = mic mute hotkey
4662 * GPIO2 = mic mute LED
4664 static void alc233_fixup_lenovo_line2_mic_hotkey(struct hda_codec
*codec
,
4665 const struct hda_fixup
*fix
, int action
)
4667 struct alc_spec
*spec
= codec
->spec
;
4669 alc_fixup_hp_gpio_led(codec
, action
, 0, 0x04);
4670 if (action
== HDA_FIXUP_ACT_PRE_PROBE
) {
4671 spec
->init_amp
= ALC_INIT_DEFAULT
;
4672 if (alc_register_micmute_input_device(codec
) != 0)
4675 snd_hda_jack_detect_enable_callback(codec
, 0x1b,
4676 gpio2_mic_hotkey_event
);
4684 case HDA_FIXUP_ACT_FREE
:
4685 input_unregister_device(spec
->kb_dev
);
4686 spec
->kb_dev
= NULL
;
4690 #define alc280_fixup_hp_gpio2_mic_hotkey NULL
4691 #define alc233_fixup_lenovo_line2_mic_hotkey NULL
4694 static void alc269_fixup_hp_line1_mic1_led(struct hda_codec
*codec
,
4695 const struct hda_fixup
*fix
, int action
)
4697 struct alc_spec
*spec
= codec
->spec
;
4699 alc269_fixup_hp_mute_led_micx(codec
, fix
, action
, 0x1a);
4700 if (action
== HDA_FIXUP_ACT_PRE_PROBE
) {
4701 spec
->cap_mute_led_nid
= 0x18;
4702 snd_hda_gen_add_micmute_led_cdev(codec
, vref_micmute_led_set
);
4706 static const struct coef_fw alc225_pre_hsmode
[] = {
4707 UPDATE_COEF(0x4a, 1<<8, 0),
4708 UPDATE_COEFEX(0x57, 0x05, 1<<14, 0),
4709 UPDATE_COEF(0x63, 3<<14, 3<<14),
4710 UPDATE_COEF(0x4a, 3<<4, 2<<4),
4711 UPDATE_COEF(0x4a, 3<<10, 3<<10),
4712 UPDATE_COEF(0x45, 0x3f<<10, 0x34<<10),
4713 UPDATE_COEF(0x4a, 3<<10, 0),
4717 static void alc_headset_mode_unplugged(struct hda_codec
*codec
)
4719 struct alc_spec
*spec
= codec
->spec
;
4720 static const struct coef_fw coef0255
[] = {
4721 WRITE_COEF(0x1b, 0x0c0b), /* LDO and MISC control */
4722 WRITE_COEF(0x45, 0xd089), /* UAJ function set to menual mode */
4723 UPDATE_COEFEX(0x57, 0x05, 1<<14, 0), /* Direct Drive HP Amp control(Set to verb control)*/
4724 WRITE_COEF(0x06, 0x6104), /* Set MIC2 Vref gate with HP */
4725 WRITE_COEFEX(0x57, 0x03, 0x8aa6), /* Direct Drive HP Amp control */
4728 static const struct coef_fw coef0256
[] = {
4729 WRITE_COEF(0x1b, 0x0c4b), /* LDO and MISC control */
4730 WRITE_COEF(0x45, 0xd089), /* UAJ function set to menual mode */
4731 WRITE_COEF(0x06, 0x6104), /* Set MIC2 Vref gate with HP */
4732 WRITE_COEFEX(0x57, 0x03, 0x09a3), /* Direct Drive HP Amp control */
4733 UPDATE_COEFEX(0x57, 0x05, 1<<14, 0), /* Direct Drive HP Amp control(Set to verb control)*/
4736 static const struct coef_fw coef0233
[] = {
4737 WRITE_COEF(0x1b, 0x0c0b),
4738 WRITE_COEF(0x45, 0xc429),
4739 UPDATE_COEF(0x35, 0x4000, 0),
4740 WRITE_COEF(0x06, 0x2104),
4741 WRITE_COEF(0x1a, 0x0001),
4742 WRITE_COEF(0x26, 0x0004),
4743 WRITE_COEF(0x32, 0x42a3),
4746 static const struct coef_fw coef0288
[] = {
4747 UPDATE_COEF(0x4f, 0xfcc0, 0xc400),
4748 UPDATE_COEF(0x50, 0x2000, 0x2000),
4749 UPDATE_COEF(0x56, 0x0006, 0x0006),
4750 UPDATE_COEF(0x66, 0x0008, 0),
4751 UPDATE_COEF(0x67, 0x2000, 0),
4754 static const struct coef_fw coef0298
[] = {
4755 UPDATE_COEF(0x19, 0x1300, 0x0300),
4758 static const struct coef_fw coef0292
[] = {
4759 WRITE_COEF(0x76, 0x000e),
4760 WRITE_COEF(0x6c, 0x2400),
4761 WRITE_COEF(0x18, 0x7308),
4762 WRITE_COEF(0x6b, 0xc429),
4765 static const struct coef_fw coef0293
[] = {
4766 UPDATE_COEF(0x10, 7<<8, 6<<8), /* SET Line1 JD to 0 */
4767 UPDATE_COEFEX(0x57, 0x05, 1<<15|1<<13, 0x0), /* SET charge pump by verb */
4768 UPDATE_COEFEX(0x57, 0x03, 1<<10, 1<<10), /* SET EN_OSW to 1 */
4769 UPDATE_COEF(0x1a, 1<<3, 1<<3), /* Combo JD gating with LINE1-VREFO */
4770 WRITE_COEF(0x45, 0xc429), /* Set to TRS type */
4771 UPDATE_COEF(0x4a, 0x000f, 0x000e), /* Combo Jack auto detect */
4774 static const struct coef_fw coef0668
[] = {
4775 WRITE_COEF(0x15, 0x0d40),
4776 WRITE_COEF(0xb7, 0x802b),
4779 static const struct coef_fw coef0225
[] = {
4780 UPDATE_COEF(0x63, 3<<14, 0),
4783 static const struct coef_fw coef0274
[] = {
4784 UPDATE_COEF(0x4a, 0x0100, 0),
4785 UPDATE_COEFEX(0x57, 0x05, 0x4000, 0),
4786 UPDATE_COEF(0x6b, 0xf000, 0x5000),
4787 UPDATE_COEF(0x4a, 0x0010, 0),
4788 UPDATE_COEF(0x4a, 0x0c00, 0x0c00),
4789 WRITE_COEF(0x45, 0x5289),
4790 UPDATE_COEF(0x4a, 0x0c00, 0),
4794 if (spec
->no_internal_mic_pin
) {
4795 alc_update_coef_idx(codec
, 0x45, 0xf<<12 | 1<<10, 5<<12);
4799 switch (codec
->core
.vendor_id
) {
4801 alc_process_coef_fw(codec
, coef0255
);
4806 alc_process_coef_fw(codec
, coef0256
);
4811 alc_process_coef_fw(codec
, coef0274
);
4815 alc_process_coef_fw(codec
, coef0233
);
4819 alc_process_coef_fw(codec
, coef0288
);
4822 alc_process_coef_fw(codec
, coef0298
);
4823 alc_process_coef_fw(codec
, coef0288
);
4826 alc_process_coef_fw(codec
, coef0292
);
4829 alc_process_coef_fw(codec
, coef0293
);
4832 alc_process_coef_fw(codec
, coef0668
);
4840 alc_process_coef_fw(codec
, alc225_pre_hsmode
);
4841 alc_process_coef_fw(codec
, coef0225
);
4844 alc_update_coefex_idx(codec
, 0x57, 0x5, 1<<14, 0);
4847 codec_dbg(codec
, "Headset jack set to unplugged mode.\n");
4851 static void alc_headset_mode_mic_in(struct hda_codec
*codec
, hda_nid_t hp_pin
,
4854 static const struct coef_fw coef0255
[] = {
4855 WRITE_COEFEX(0x57, 0x03, 0x8aa6),
4856 WRITE_COEF(0x06, 0x6100), /* Set MIC2 Vref gate to normal */
4859 static const struct coef_fw coef0256
[] = {
4860 UPDATE_COEFEX(0x57, 0x05, 1<<14, 1<<14), /* Direct Drive HP Amp control(Set to verb control)*/
4861 WRITE_COEFEX(0x57, 0x03, 0x09a3),
4862 WRITE_COEF(0x06, 0x6100), /* Set MIC2 Vref gate to normal */
4865 static const struct coef_fw coef0233
[] = {
4866 UPDATE_COEF(0x35, 0, 1<<14),
4867 WRITE_COEF(0x06, 0x2100),
4868 WRITE_COEF(0x1a, 0x0021),
4869 WRITE_COEF(0x26, 0x008c),
4872 static const struct coef_fw coef0288
[] = {
4873 UPDATE_COEF(0x4f, 0x00c0, 0),
4874 UPDATE_COEF(0x50, 0x2000, 0),
4875 UPDATE_COEF(0x56, 0x0006, 0),
4876 UPDATE_COEF(0x4f, 0xfcc0, 0xc400),
4877 UPDATE_COEF(0x66, 0x0008, 0x0008),
4878 UPDATE_COEF(0x67, 0x2000, 0x2000),
4881 static const struct coef_fw coef0292
[] = {
4882 WRITE_COEF(0x19, 0xa208),
4883 WRITE_COEF(0x2e, 0xacf0),
4886 static const struct coef_fw coef0293
[] = {
4887 UPDATE_COEFEX(0x57, 0x05, 0, 1<<15|1<<13), /* SET charge pump by verb */
4888 UPDATE_COEFEX(0x57, 0x03, 1<<10, 0), /* SET EN_OSW to 0 */
4889 UPDATE_COEF(0x1a, 1<<3, 0), /* Combo JD gating without LINE1-VREFO */
4892 static const struct coef_fw coef0688
[] = {
4893 WRITE_COEF(0xb7, 0x802b),
4894 WRITE_COEF(0xb5, 0x1040),
4895 UPDATE_COEF(0xc3, 0, 1<<12),
4898 static const struct coef_fw coef0225
[] = {
4899 UPDATE_COEFEX(0x57, 0x05, 1<<14, 1<<14),
4900 UPDATE_COEF(0x4a, 3<<4, 2<<4),
4901 UPDATE_COEF(0x63, 3<<14, 0),
4904 static const struct coef_fw coef0274
[] = {
4905 UPDATE_COEFEX(0x57, 0x05, 0x4000, 0x4000),
4906 UPDATE_COEF(0x4a, 0x0010, 0),
4907 UPDATE_COEF(0x6b, 0xf000, 0),
4911 switch (codec
->core
.vendor_id
) {
4913 alc_write_coef_idx(codec
, 0x45, 0xc489);
4914 snd_hda_set_pin_ctl_cache(codec
, hp_pin
, 0);
4915 alc_process_coef_fw(codec
, coef0255
);
4916 snd_hda_set_pin_ctl_cache(codec
, mic_pin
, PIN_VREF50
);
4921 alc_write_coef_idx(codec
, 0x45, 0xc489);
4922 snd_hda_set_pin_ctl_cache(codec
, hp_pin
, 0);
4923 alc_process_coef_fw(codec
, coef0256
);
4924 snd_hda_set_pin_ctl_cache(codec
, mic_pin
, PIN_VREF50
);
4929 alc_write_coef_idx(codec
, 0x45, 0x4689);
4930 snd_hda_set_pin_ctl_cache(codec
, hp_pin
, 0);
4931 alc_process_coef_fw(codec
, coef0274
);
4932 snd_hda_set_pin_ctl_cache(codec
, mic_pin
, PIN_VREF50
);
4936 alc_write_coef_idx(codec
, 0x45, 0xc429);
4937 snd_hda_set_pin_ctl_cache(codec
, hp_pin
, 0);
4938 alc_process_coef_fw(codec
, coef0233
);
4939 snd_hda_set_pin_ctl_cache(codec
, mic_pin
, PIN_VREF50
);
4944 snd_hda_set_pin_ctl_cache(codec
, hp_pin
, 0);
4945 alc_process_coef_fw(codec
, coef0288
);
4946 snd_hda_set_pin_ctl_cache(codec
, mic_pin
, PIN_VREF50
);
4949 snd_hda_set_pin_ctl_cache(codec
, hp_pin
, 0);
4950 alc_process_coef_fw(codec
, coef0292
);
4953 /* Set to TRS mode */
4954 alc_write_coef_idx(codec
, 0x45, 0xc429);
4955 snd_hda_set_pin_ctl_cache(codec
, hp_pin
, 0);
4956 alc_process_coef_fw(codec
, coef0293
);
4957 snd_hda_set_pin_ctl_cache(codec
, mic_pin
, PIN_VREF50
);
4960 alc_update_coefex_idx(codec
, 0x57, 0x5, 0, 1<<14);
4964 snd_hda_set_pin_ctl_cache(codec
, hp_pin
, 0);
4965 snd_hda_set_pin_ctl_cache(codec
, mic_pin
, PIN_VREF50
);
4968 alc_write_coef_idx(codec
, 0x11, 0x0001);
4969 snd_hda_set_pin_ctl_cache(codec
, hp_pin
, 0);
4970 alc_process_coef_fw(codec
, coef0688
);
4971 snd_hda_set_pin_ctl_cache(codec
, mic_pin
, PIN_VREF50
);
4979 alc_process_coef_fw(codec
, alc225_pre_hsmode
);
4980 alc_update_coef_idx(codec
, 0x45, 0x3f<<10, 0x31<<10);
4981 snd_hda_set_pin_ctl_cache(codec
, hp_pin
, 0);
4982 alc_process_coef_fw(codec
, coef0225
);
4983 snd_hda_set_pin_ctl_cache(codec
, mic_pin
, PIN_VREF50
);
4986 codec_dbg(codec
, "Headset jack set to mic-in mode.\n");
4989 static void alc_headset_mode_default(struct hda_codec
*codec
)
4991 static const struct coef_fw coef0225
[] = {
4992 UPDATE_COEF(0x45, 0x3f<<10, 0x30<<10),
4993 UPDATE_COEF(0x45, 0x3f<<10, 0x31<<10),
4994 UPDATE_COEF(0x49, 3<<8, 0<<8),
4995 UPDATE_COEF(0x4a, 3<<4, 3<<4),
4996 UPDATE_COEF(0x63, 3<<14, 0),
4997 UPDATE_COEF(0x67, 0xf000, 0x3000),
5000 static const struct coef_fw coef0255
[] = {
5001 WRITE_COEF(0x45, 0xc089),
5002 WRITE_COEF(0x45, 0xc489),
5003 WRITE_COEFEX(0x57, 0x03, 0x8ea6),
5004 WRITE_COEF(0x49, 0x0049),
5007 static const struct coef_fw coef0256
[] = {
5008 WRITE_COEF(0x45, 0xc489),
5009 WRITE_COEFEX(0x57, 0x03, 0x0da3),
5010 WRITE_COEF(0x49, 0x0049),
5011 UPDATE_COEFEX(0x57, 0x05, 1<<14, 0), /* Direct Drive HP Amp control(Set to verb control)*/
5012 WRITE_COEF(0x06, 0x6100),
5015 static const struct coef_fw coef0233
[] = {
5016 WRITE_COEF(0x06, 0x2100),
5017 WRITE_COEF(0x32, 0x4ea3),
5020 static const struct coef_fw coef0288
[] = {
5021 UPDATE_COEF(0x4f, 0xfcc0, 0xc400), /* Set to TRS type */
5022 UPDATE_COEF(0x50, 0x2000, 0x2000),
5023 UPDATE_COEF(0x56, 0x0006, 0x0006),
5024 UPDATE_COEF(0x66, 0x0008, 0),
5025 UPDATE_COEF(0x67, 0x2000, 0),
5028 static const struct coef_fw coef0292
[] = {
5029 WRITE_COEF(0x76, 0x000e),
5030 WRITE_COEF(0x6c, 0x2400),
5031 WRITE_COEF(0x6b, 0xc429),
5032 WRITE_COEF(0x18, 0x7308),
5035 static const struct coef_fw coef0293
[] = {
5036 UPDATE_COEF(0x4a, 0x000f, 0x000e), /* Combo Jack auto detect */
5037 WRITE_COEF(0x45, 0xC429), /* Set to TRS type */
5038 UPDATE_COEF(0x1a, 1<<3, 0), /* Combo JD gating without LINE1-VREFO */
5041 static const struct coef_fw coef0688
[] = {
5042 WRITE_COEF(0x11, 0x0041),
5043 WRITE_COEF(0x15, 0x0d40),
5044 WRITE_COEF(0xb7, 0x802b),
5047 static const struct coef_fw coef0274
[] = {
5048 WRITE_COEF(0x45, 0x4289),
5049 UPDATE_COEF(0x4a, 0x0010, 0x0010),
5050 UPDATE_COEF(0x6b, 0x0f00, 0),
5051 UPDATE_COEF(0x49, 0x0300, 0x0300),
5055 switch (codec
->core
.vendor_id
) {
5062 alc_process_coef_fw(codec
, alc225_pre_hsmode
);
5063 alc_process_coef_fw(codec
, coef0225
);
5066 alc_process_coef_fw(codec
, coef0255
);
5071 alc_write_coef_idx(codec
, 0x1b, 0x0e4b);
5072 alc_write_coef_idx(codec
, 0x45, 0xc089);
5074 alc_process_coef_fw(codec
, coef0256
);
5079 alc_process_coef_fw(codec
, coef0274
);
5083 alc_process_coef_fw(codec
, coef0233
);
5088 alc_process_coef_fw(codec
, coef0288
);
5091 alc_process_coef_fw(codec
, coef0292
);
5094 alc_process_coef_fw(codec
, coef0293
);
5097 alc_process_coef_fw(codec
, coef0688
);
5100 alc_update_coefex_idx(codec
, 0x57, 0x5, 1<<14, 0);
5103 codec_dbg(codec
, "Headset jack set to headphone (default) mode.\n");
5107 static void alc_headset_mode_ctia(struct hda_codec
*codec
)
5111 static const struct coef_fw coef0255
[] = {
5112 WRITE_COEF(0x45, 0xd489), /* Set to CTIA type */
5113 WRITE_COEF(0x1b, 0x0c2b),
5114 WRITE_COEFEX(0x57, 0x03, 0x8ea6),
5117 static const struct coef_fw coef0256
[] = {
5118 WRITE_COEF(0x45, 0xd489), /* Set to CTIA type */
5119 WRITE_COEF(0x1b, 0x0e6b),
5122 static const struct coef_fw coef0233
[] = {
5123 WRITE_COEF(0x45, 0xd429),
5124 WRITE_COEF(0x1b, 0x0c2b),
5125 WRITE_COEF(0x32, 0x4ea3),
5128 static const struct coef_fw coef0288
[] = {
5129 UPDATE_COEF(0x50, 0x2000, 0x2000),
5130 UPDATE_COEF(0x56, 0x0006, 0x0006),
5131 UPDATE_COEF(0x66, 0x0008, 0),
5132 UPDATE_COEF(0x67, 0x2000, 0),
5135 static const struct coef_fw coef0292
[] = {
5136 WRITE_COEF(0x6b, 0xd429),
5137 WRITE_COEF(0x76, 0x0008),
5138 WRITE_COEF(0x18, 0x7388),
5141 static const struct coef_fw coef0293
[] = {
5142 WRITE_COEF(0x45, 0xd429), /* Set to ctia type */
5143 UPDATE_COEF(0x10, 7<<8, 7<<8), /* SET Line1 JD to 1 */
5146 static const struct coef_fw coef0688
[] = {
5147 WRITE_COEF(0x11, 0x0001),
5148 WRITE_COEF(0x15, 0x0d60),
5149 WRITE_COEF(0xc3, 0x0000),
5152 static const struct coef_fw coef0225_1
[] = {
5153 UPDATE_COEF(0x45, 0x3f<<10, 0x35<<10),
5154 UPDATE_COEF(0x63, 3<<14, 2<<14),
5157 static const struct coef_fw coef0225_2
[] = {
5158 UPDATE_COEF(0x45, 0x3f<<10, 0x35<<10),
5159 UPDATE_COEF(0x63, 3<<14, 1<<14),
5163 switch (codec
->core
.vendor_id
) {
5165 alc_process_coef_fw(codec
, coef0255
);
5170 alc_process_coef_fw(codec
, coef0256
);
5175 alc_write_coef_idx(codec
, 0x45, 0xd689);
5179 alc_process_coef_fw(codec
, coef0233
);
5182 val
= alc_read_coef_idx(codec
, 0x50);
5183 if (val
& (1 << 12)) {
5184 alc_update_coef_idx(codec
, 0x8e, 0x0070, 0x0020);
5185 alc_update_coef_idx(codec
, 0x4f, 0xfcc0, 0xd400);
5188 alc_update_coef_idx(codec
, 0x8e, 0x0070, 0x0010);
5189 alc_update_coef_idx(codec
, 0x4f, 0xfcc0, 0xd400);
5195 alc_update_coef_idx(codec
, 0x4f, 0xfcc0, 0xd400);
5197 alc_process_coef_fw(codec
, coef0288
);
5200 alc_process_coef_fw(codec
, coef0292
);
5203 alc_process_coef_fw(codec
, coef0293
);
5206 alc_process_coef_fw(codec
, coef0688
);
5214 val
= alc_read_coef_idx(codec
, 0x45);
5216 alc_process_coef_fw(codec
, coef0225_2
);
5218 alc_process_coef_fw(codec
, coef0225_1
);
5221 alc_update_coefex_idx(codec
, 0x57, 0x5, 1<<14, 0);
5224 codec_dbg(codec
, "Headset jack set to iPhone-style headset mode.\n");
5228 static void alc_headset_mode_omtp(struct hda_codec
*codec
)
5230 static const struct coef_fw coef0255
[] = {
5231 WRITE_COEF(0x45, 0xe489), /* Set to OMTP Type */
5232 WRITE_COEF(0x1b, 0x0c2b),
5233 WRITE_COEFEX(0x57, 0x03, 0x8ea6),
5236 static const struct coef_fw coef0256
[] = {
5237 WRITE_COEF(0x45, 0xe489), /* Set to OMTP Type */
5238 WRITE_COEF(0x1b, 0x0e6b),
5241 static const struct coef_fw coef0233
[] = {
5242 WRITE_COEF(0x45, 0xe429),
5243 WRITE_COEF(0x1b, 0x0c2b),
5244 WRITE_COEF(0x32, 0x4ea3),
5247 static const struct coef_fw coef0288
[] = {
5248 UPDATE_COEF(0x50, 0x2000, 0x2000),
5249 UPDATE_COEF(0x56, 0x0006, 0x0006),
5250 UPDATE_COEF(0x66, 0x0008, 0),
5251 UPDATE_COEF(0x67, 0x2000, 0),
5254 static const struct coef_fw coef0292
[] = {
5255 WRITE_COEF(0x6b, 0xe429),
5256 WRITE_COEF(0x76, 0x0008),
5257 WRITE_COEF(0x18, 0x7388),
5260 static const struct coef_fw coef0293
[] = {
5261 WRITE_COEF(0x45, 0xe429), /* Set to omtp type */
5262 UPDATE_COEF(0x10, 7<<8, 7<<8), /* SET Line1 JD to 1 */
5265 static const struct coef_fw coef0688
[] = {
5266 WRITE_COEF(0x11, 0x0001),
5267 WRITE_COEF(0x15, 0x0d50),
5268 WRITE_COEF(0xc3, 0x0000),
5271 static const struct coef_fw coef0225
[] = {
5272 UPDATE_COEF(0x45, 0x3f<<10, 0x39<<10),
5273 UPDATE_COEF(0x63, 3<<14, 2<<14),
5277 switch (codec
->core
.vendor_id
) {
5279 alc_process_coef_fw(codec
, coef0255
);
5284 alc_process_coef_fw(codec
, coef0256
);
5289 alc_write_coef_idx(codec
, 0x45, 0xe689);
5293 alc_process_coef_fw(codec
, coef0233
);
5296 alc_update_coef_idx(codec
, 0x8e, 0x0070, 0x0010);/* Headset output enable */
5297 alc_update_coef_idx(codec
, 0x4f, 0xfcc0, 0xe400);
5302 alc_update_coef_idx(codec
, 0x4f, 0xfcc0, 0xe400);
5304 alc_process_coef_fw(codec
, coef0288
);
5307 alc_process_coef_fw(codec
, coef0292
);
5310 alc_process_coef_fw(codec
, coef0293
);
5313 alc_process_coef_fw(codec
, coef0688
);
5321 alc_process_coef_fw(codec
, coef0225
);
5324 codec_dbg(codec
, "Headset jack set to Nokia-style headset mode.\n");
5327 static void alc_determine_headset_type(struct hda_codec
*codec
)
5330 bool is_ctia
= false;
5331 struct alc_spec
*spec
= codec
->spec
;
5332 static const struct coef_fw coef0255
[] = {
5333 WRITE_COEF(0x45, 0xd089), /* combo jack auto switch control(Check type)*/
5334 WRITE_COEF(0x49, 0x0149), /* combo jack auto switch control(Vref
5338 static const struct coef_fw coef0288
[] = {
5339 UPDATE_COEF(0x4f, 0xfcc0, 0xd400), /* Check Type */
5342 static const struct coef_fw coef0298
[] = {
5343 UPDATE_COEF(0x50, 0x2000, 0x2000),
5344 UPDATE_COEF(0x56, 0x0006, 0x0006),
5345 UPDATE_COEF(0x66, 0x0008, 0),
5346 UPDATE_COEF(0x67, 0x2000, 0),
5347 UPDATE_COEF(0x19, 0x1300, 0x1300),
5350 static const struct coef_fw coef0293
[] = {
5351 UPDATE_COEF(0x4a, 0x000f, 0x0008), /* Combo Jack auto detect */
5352 WRITE_COEF(0x45, 0xD429), /* Set to ctia type */
5355 static const struct coef_fw coef0688
[] = {
5356 WRITE_COEF(0x11, 0x0001),
5357 WRITE_COEF(0xb7, 0x802b),
5358 WRITE_COEF(0x15, 0x0d60),
5359 WRITE_COEF(0xc3, 0x0c00),
5362 static const struct coef_fw coef0274
[] = {
5363 UPDATE_COEF(0x4a, 0x0010, 0),
5364 UPDATE_COEF(0x4a, 0x8000, 0),
5365 WRITE_COEF(0x45, 0xd289),
5366 UPDATE_COEF(0x49, 0x0300, 0x0300),
5370 if (spec
->no_internal_mic_pin
) {
5371 alc_update_coef_idx(codec
, 0x45, 0xf<<12 | 1<<10, 5<<12);
5375 switch (codec
->core
.vendor_id
) {
5377 alc_process_coef_fw(codec
, coef0255
);
5379 val
= alc_read_coef_idx(codec
, 0x46);
5380 is_ctia
= (val
& 0x0070) == 0x0070;
5385 alc_write_coef_idx(codec
, 0x1b, 0x0e4b);
5386 alc_write_coef_idx(codec
, 0x06, 0x6104);
5387 alc_write_coefex_idx(codec
, 0x57, 0x3, 0x09a3);
5389 snd_hda_codec_write(codec
, 0x21, 0,
5390 AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_MUTE
);
5392 snd_hda_codec_write(codec
, 0x21, 0,
5393 AC_VERB_SET_PIN_WIDGET_CONTROL
, 0x0);
5395 alc_process_coef_fw(codec
, coef0255
);
5397 val
= alc_read_coef_idx(codec
, 0x46);
5398 is_ctia
= (val
& 0x0070) == 0x0070;
5400 alc_write_coefex_idx(codec
, 0x57, 0x3, 0x0da3);
5401 alc_update_coefex_idx(codec
, 0x57, 0x5, 1<<14, 0);
5403 snd_hda_codec_write(codec
, 0x21, 0,
5404 AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_OUT
);
5406 snd_hda_codec_write(codec
, 0x21, 0,
5407 AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_UNMUTE
);
5412 alc_process_coef_fw(codec
, coef0274
);
5414 val
= alc_read_coef_idx(codec
, 0x46);
5415 is_ctia
= (val
& 0x00f0) == 0x00f0;
5419 alc_write_coef_idx(codec
, 0x45, 0xd029);
5421 val
= alc_read_coef_idx(codec
, 0x46);
5422 is_ctia
= (val
& 0x0070) == 0x0070;
5425 snd_hda_codec_write(codec
, 0x21, 0,
5426 AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_MUTE
);
5428 snd_hda_codec_write(codec
, 0x21, 0,
5429 AC_VERB_SET_PIN_WIDGET_CONTROL
, 0x0);
5432 val
= alc_read_coef_idx(codec
, 0x50);
5433 if (val
& (1 << 12)) {
5434 alc_update_coef_idx(codec
, 0x8e, 0x0070, 0x0020);
5435 alc_process_coef_fw(codec
, coef0288
);
5437 val
= alc_read_coef_idx(codec
, 0x50);
5438 is_ctia
= (val
& 0x0070) == 0x0070;
5440 alc_update_coef_idx(codec
, 0x8e, 0x0070, 0x0010);
5441 alc_process_coef_fw(codec
, coef0288
);
5443 val
= alc_read_coef_idx(codec
, 0x50);
5444 is_ctia
= (val
& 0x0070) == 0x0070;
5446 alc_process_coef_fw(codec
, coef0298
);
5447 snd_hda_codec_write(codec
, 0x21, 0,
5448 AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_HP
);
5450 snd_hda_codec_write(codec
, 0x21, 0,
5451 AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_UNMUTE
);
5455 alc_process_coef_fw(codec
, coef0288
);
5457 val
= alc_read_coef_idx(codec
, 0x50);
5458 is_ctia
= (val
& 0x0070) == 0x0070;
5461 alc_write_coef_idx(codec
, 0x6b, 0xd429);
5463 val
= alc_read_coef_idx(codec
, 0x6c);
5464 is_ctia
= (val
& 0x001c) == 0x001c;
5467 alc_process_coef_fw(codec
, coef0293
);
5469 val
= alc_read_coef_idx(codec
, 0x46);
5470 is_ctia
= (val
& 0x0070) == 0x0070;
5473 alc_process_coef_fw(codec
, coef0688
);
5475 val
= alc_read_coef_idx(codec
, 0xbe);
5476 is_ctia
= (val
& 0x1c02) == 0x1c02;
5484 snd_hda_codec_write(codec
, 0x21, 0,
5485 AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_MUTE
);
5487 snd_hda_codec_write(codec
, 0x21, 0,
5488 AC_VERB_SET_PIN_WIDGET_CONTROL
, 0x0);
5490 alc_process_coef_fw(codec
, alc225_pre_hsmode
);
5491 alc_update_coef_idx(codec
, 0x67, 0xf000, 0x1000);
5492 val
= alc_read_coef_idx(codec
, 0x45);
5493 if (val
& (1 << 9)) {
5494 alc_update_coef_idx(codec
, 0x45, 0x3f<<10, 0x34<<10);
5495 alc_update_coef_idx(codec
, 0x49, 3<<8, 2<<8);
5497 val
= alc_read_coef_idx(codec
, 0x46);
5498 is_ctia
= (val
& 0x00f0) == 0x00f0;
5500 alc_update_coef_idx(codec
, 0x45, 0x3f<<10, 0x34<<10);
5501 alc_update_coef_idx(codec
, 0x49, 3<<8, 1<<8);
5503 val
= alc_read_coef_idx(codec
, 0x46);
5504 is_ctia
= (val
& 0x00f0) == 0x00f0;
5506 alc_update_coef_idx(codec
, 0x4a, 7<<6, 7<<6);
5507 alc_update_coef_idx(codec
, 0x4a, 3<<4, 3<<4);
5508 alc_update_coef_idx(codec
, 0x67, 0xf000, 0x3000);
5510 snd_hda_codec_write(codec
, 0x21, 0,
5511 AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_OUT
);
5513 snd_hda_codec_write(codec
, 0x21, 0,
5514 AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_UNMUTE
);
5521 codec_dbg(codec
, "Headset jack detected iPhone-style headset: %s\n",
5522 is_ctia
? "yes" : "no");
5523 spec
->current_headset_type
= is_ctia
? ALC_HEADSET_TYPE_CTIA
: ALC_HEADSET_TYPE_OMTP
;
5526 static void alc_update_headset_mode(struct hda_codec
*codec
)
5528 struct alc_spec
*spec
= codec
->spec
;
5530 hda_nid_t mux_pin
= spec
->gen
.imux_pins
[spec
->gen
.cur_mux
[0]];
5531 hda_nid_t hp_pin
= alc_get_hp_pin(spec
);
5533 int new_headset_mode
;
5535 if (!snd_hda_jack_detect(codec
, hp_pin
))
5536 new_headset_mode
= ALC_HEADSET_MODE_UNPLUGGED
;
5537 else if (mux_pin
== spec
->headset_mic_pin
)
5538 new_headset_mode
= ALC_HEADSET_MODE_HEADSET
;
5539 else if (mux_pin
== spec
->headphone_mic_pin
)
5540 new_headset_mode
= ALC_HEADSET_MODE_MIC
;
5542 new_headset_mode
= ALC_HEADSET_MODE_HEADPHONE
;
5544 if (new_headset_mode
== spec
->current_headset_mode
) {
5545 snd_hda_gen_update_outputs(codec
);
5549 switch (new_headset_mode
) {
5550 case ALC_HEADSET_MODE_UNPLUGGED
:
5551 alc_headset_mode_unplugged(codec
);
5552 spec
->current_headset_mode
= ALC_HEADSET_MODE_UNKNOWN
;
5553 spec
->current_headset_type
= ALC_HEADSET_TYPE_UNKNOWN
;
5554 spec
->gen
.hp_jack_present
= false;
5556 case ALC_HEADSET_MODE_HEADSET
:
5557 if (spec
->current_headset_type
== ALC_HEADSET_TYPE_UNKNOWN
)
5558 alc_determine_headset_type(codec
);
5559 if (spec
->current_headset_type
== ALC_HEADSET_TYPE_CTIA
)
5560 alc_headset_mode_ctia(codec
);
5561 else if (spec
->current_headset_type
== ALC_HEADSET_TYPE_OMTP
)
5562 alc_headset_mode_omtp(codec
);
5563 spec
->gen
.hp_jack_present
= true;
5565 case ALC_HEADSET_MODE_MIC
:
5566 alc_headset_mode_mic_in(codec
, hp_pin
, spec
->headphone_mic_pin
);
5567 spec
->gen
.hp_jack_present
= false;
5569 case ALC_HEADSET_MODE_HEADPHONE
:
5570 alc_headset_mode_default(codec
);
5571 spec
->gen
.hp_jack_present
= true;
5574 if (new_headset_mode
!= ALC_HEADSET_MODE_MIC
) {
5575 snd_hda_set_pin_ctl_cache(codec
, hp_pin
,
5576 AC_PINCTL_OUT_EN
| AC_PINCTL_HP_EN
);
5577 if (spec
->headphone_mic_pin
&& spec
->headphone_mic_pin
!= hp_pin
)
5578 snd_hda_set_pin_ctl_cache(codec
, spec
->headphone_mic_pin
,
5581 spec
->current_headset_mode
= new_headset_mode
;
5583 snd_hda_gen_update_outputs(codec
);
5586 static void alc_update_headset_mode_hook(struct hda_codec
*codec
,
5587 struct snd_kcontrol
*kcontrol
,
5588 struct snd_ctl_elem_value
*ucontrol
)
5590 alc_update_headset_mode(codec
);
5593 static void alc_update_headset_jack_cb(struct hda_codec
*codec
,
5594 struct hda_jack_callback
*jack
)
5596 snd_hda_gen_hp_automute(codec
, jack
);
5597 alc_update_headset_mode(codec
);
5600 static void alc_probe_headset_mode(struct hda_codec
*codec
)
5603 struct alc_spec
*spec
= codec
->spec
;
5604 struct auto_pin_cfg
*cfg
= &spec
->gen
.autocfg
;
5607 for (i
= 0; i
< cfg
->num_inputs
; i
++) {
5608 if (cfg
->inputs
[i
].is_headset_mic
&& !spec
->headset_mic_pin
)
5609 spec
->headset_mic_pin
= cfg
->inputs
[i
].pin
;
5610 if (cfg
->inputs
[i
].is_headphone_mic
&& !spec
->headphone_mic_pin
)
5611 spec
->headphone_mic_pin
= cfg
->inputs
[i
].pin
;
5614 WARN_ON(spec
->gen
.cap_sync_hook
);
5615 spec
->gen
.cap_sync_hook
= alc_update_headset_mode_hook
;
5616 spec
->gen
.automute_hook
= alc_update_headset_mode
;
5617 spec
->gen
.hp_automute_hook
= alc_update_headset_jack_cb
;
5620 static void alc_fixup_headset_mode(struct hda_codec
*codec
,
5621 const struct hda_fixup
*fix
, int action
)
5623 struct alc_spec
*spec
= codec
->spec
;
5626 case HDA_FIXUP_ACT_PRE_PROBE
:
5627 spec
->parse_flags
|= HDA_PINCFG_HEADSET_MIC
| HDA_PINCFG_HEADPHONE_MIC
;
5629 case HDA_FIXUP_ACT_PROBE
:
5630 alc_probe_headset_mode(codec
);
5632 case HDA_FIXUP_ACT_INIT
:
5633 if (is_s3_resume(codec
) || is_s4_resume(codec
)) {
5634 spec
->current_headset_mode
= ALC_HEADSET_MODE_UNKNOWN
;
5635 spec
->current_headset_type
= ALC_HEADSET_TYPE_UNKNOWN
;
5637 alc_update_headset_mode(codec
);
5642 static void alc_fixup_headset_mode_no_hp_mic(struct hda_codec
*codec
,
5643 const struct hda_fixup
*fix
, int action
)
5645 if (action
== HDA_FIXUP_ACT_PRE_PROBE
) {
5646 struct alc_spec
*spec
= codec
->spec
;
5647 spec
->parse_flags
|= HDA_PINCFG_HEADSET_MIC
;
5650 alc_fixup_headset_mode(codec
, fix
, action
);
5653 static void alc255_set_default_jack_type(struct hda_codec
*codec
)
5655 /* Set to iphone type */
5656 static const struct coef_fw alc255fw
[] = {
5657 WRITE_COEF(0x1b, 0x880b),
5658 WRITE_COEF(0x45, 0xd089),
5659 WRITE_COEF(0x1b, 0x080b),
5660 WRITE_COEF(0x46, 0x0004),
5661 WRITE_COEF(0x1b, 0x0c0b),
5664 static const struct coef_fw alc256fw
[] = {
5665 WRITE_COEF(0x1b, 0x884b),
5666 WRITE_COEF(0x45, 0xd089),
5667 WRITE_COEF(0x1b, 0x084b),
5668 WRITE_COEF(0x46, 0x0004),
5669 WRITE_COEF(0x1b, 0x0c4b),
5672 switch (codec
->core
.vendor_id
) {
5674 alc_process_coef_fw(codec
, alc255fw
);
5679 alc_process_coef_fw(codec
, alc256fw
);
5685 static void alc_fixup_headset_mode_alc255(struct hda_codec
*codec
,
5686 const struct hda_fixup
*fix
, int action
)
5688 if (action
== HDA_FIXUP_ACT_PRE_PROBE
) {
5689 alc255_set_default_jack_type(codec
);
5691 alc_fixup_headset_mode(codec
, fix
, action
);
5694 static void alc_fixup_headset_mode_alc255_no_hp_mic(struct hda_codec
*codec
,
5695 const struct hda_fixup
*fix
, int action
)
5697 if (action
== HDA_FIXUP_ACT_PRE_PROBE
) {
5698 struct alc_spec
*spec
= codec
->spec
;
5699 spec
->parse_flags
|= HDA_PINCFG_HEADSET_MIC
;
5700 alc255_set_default_jack_type(codec
);
5703 alc_fixup_headset_mode(codec
, fix
, action
);
5706 static void alc288_update_headset_jack_cb(struct hda_codec
*codec
,
5707 struct hda_jack_callback
*jack
)
5709 struct alc_spec
*spec
= codec
->spec
;
5711 alc_update_headset_jack_cb(codec
, jack
);
5712 /* Headset Mic enable or disable, only for Dell Dino */
5713 alc_update_gpio_data(codec
, 0x40, spec
->gen
.hp_jack_present
);
5716 static void alc_fixup_headset_mode_dell_alc288(struct hda_codec
*codec
,
5717 const struct hda_fixup
*fix
, int action
)
5719 alc_fixup_headset_mode(codec
, fix
, action
);
5720 if (action
== HDA_FIXUP_ACT_PROBE
) {
5721 struct alc_spec
*spec
= codec
->spec
;
5722 /* toggled via hp_automute_hook */
5723 spec
->gpio_mask
|= 0x40;
5724 spec
->gpio_dir
|= 0x40;
5725 spec
->gen
.hp_automute_hook
= alc288_update_headset_jack_cb
;
5729 static void alc_fixup_auto_mute_via_amp(struct hda_codec
*codec
,
5730 const struct hda_fixup
*fix
, int action
)
5732 if (action
== HDA_FIXUP_ACT_PRE_PROBE
) {
5733 struct alc_spec
*spec
= codec
->spec
;
5734 spec
->gen
.auto_mute_via_amp
= 1;
5738 static void alc_fixup_no_shutup(struct hda_codec
*codec
,
5739 const struct hda_fixup
*fix
, int action
)
5741 if (action
== HDA_FIXUP_ACT_PRE_PROBE
) {
5742 struct alc_spec
*spec
= codec
->spec
;
5743 spec
->no_shutup_pins
= 1;
5747 static void alc_fixup_disable_aamix(struct hda_codec
*codec
,
5748 const struct hda_fixup
*fix
, int action
)
5750 if (action
== HDA_FIXUP_ACT_PRE_PROBE
) {
5751 struct alc_spec
*spec
= codec
->spec
;
5752 /* Disable AA-loopback as it causes white noise */
5753 spec
->gen
.mixer_nid
= 0;
5757 /* fixup for Thinkpad docks: add dock pins, avoid HP parser fixup */
5758 static void alc_fixup_tpt440_dock(struct hda_codec
*codec
,
5759 const struct hda_fixup
*fix
, int action
)
5761 static const struct hda_pintbl pincfgs
[] = {
5762 { 0x16, 0x21211010 }, /* dock headphone */
5763 { 0x19, 0x21a11010 }, /* dock mic */
5766 struct alc_spec
*spec
= codec
->spec
;
5768 if (action
== HDA_FIXUP_ACT_PRE_PROBE
) {
5769 spec
->parse_flags
= HDA_PINCFG_NO_HP_FIXUP
;
5770 codec
->power_save_node
= 0; /* avoid click noises */
5771 snd_hda_apply_pincfgs(codec
, pincfgs
);
5775 static void alc_fixup_tpt470_dock(struct hda_codec
*codec
,
5776 const struct hda_fixup
*fix
, int action
)
5778 static const struct hda_pintbl pincfgs
[] = {
5779 { 0x17, 0x21211010 }, /* dock headphone */
5780 { 0x19, 0x21a11010 }, /* dock mic */
5783 struct alc_spec
*spec
= codec
->spec
;
5785 if (action
== HDA_FIXUP_ACT_PRE_PROBE
) {
5786 spec
->parse_flags
= HDA_PINCFG_NO_HP_FIXUP
;
5787 snd_hda_apply_pincfgs(codec
, pincfgs
);
5788 } else if (action
== HDA_FIXUP_ACT_INIT
) {
5789 /* Enable DOCK device */
5790 snd_hda_codec_write(codec
, 0x17, 0,
5791 AC_VERB_SET_CONFIG_DEFAULT_BYTES_3
, 0);
5792 /* Enable DOCK device */
5793 snd_hda_codec_write(codec
, 0x19, 0,
5794 AC_VERB_SET_CONFIG_DEFAULT_BYTES_3
, 0);
5798 static void alc_fixup_tpt470_dacs(struct hda_codec
*codec
,
5799 const struct hda_fixup
*fix
, int action
)
5801 /* Assure the speaker pin to be coupled with DAC NID 0x03; otherwise
5802 * the speaker output becomes too low by some reason on Thinkpads with
5805 static const hda_nid_t preferred_pairs
[] = {
5806 0x14, 0x03, 0x17, 0x02, 0x21, 0x02,
5809 struct alc_spec
*spec
= codec
->spec
;
5811 if (action
== HDA_FIXUP_ACT_PRE_PROBE
)
5812 spec
->gen
.preferred_dacs
= preferred_pairs
;
5815 static void alc295_fixup_asus_dacs(struct hda_codec
*codec
,
5816 const struct hda_fixup
*fix
, int action
)
5818 static const hda_nid_t preferred_pairs
[] = {
5819 0x17, 0x02, 0x21, 0x03, 0
5821 struct alc_spec
*spec
= codec
->spec
;
5823 if (action
== HDA_FIXUP_ACT_PRE_PROBE
)
5824 spec
->gen
.preferred_dacs
= preferred_pairs
;
5827 static void alc_shutup_dell_xps13(struct hda_codec
*codec
)
5829 struct alc_spec
*spec
= codec
->spec
;
5830 int hp_pin
= alc_get_hp_pin(spec
);
5832 /* Prevent pop noises when headphones are plugged in */
5833 snd_hda_codec_write(codec
, hp_pin
, 0,
5834 AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_MUTE
);
5838 static void alc_fixup_dell_xps13(struct hda_codec
*codec
,
5839 const struct hda_fixup
*fix
, int action
)
5841 struct alc_spec
*spec
= codec
->spec
;
5842 struct hda_input_mux
*imux
= &spec
->gen
.input_mux
;
5846 case HDA_FIXUP_ACT_PRE_PROBE
:
5847 /* mic pin 0x19 must be initialized with Vref Hi-Z, otherwise
5848 * it causes a click noise at start up
5850 snd_hda_codec_set_pin_target(codec
, 0x19, PIN_VREFHIZ
);
5851 spec
->shutup
= alc_shutup_dell_xps13
;
5853 case HDA_FIXUP_ACT_PROBE
:
5854 /* Make the internal mic the default input source. */
5855 for (i
= 0; i
< imux
->num_items
; i
++) {
5856 if (spec
->gen
.imux_pins
[i
] == 0x12) {
5857 spec
->gen
.cur_mux
[0] = i
;
5865 static void alc_fixup_headset_mode_alc662(struct hda_codec
*codec
,
5866 const struct hda_fixup
*fix
, int action
)
5868 struct alc_spec
*spec
= codec
->spec
;
5870 if (action
== HDA_FIXUP_ACT_PRE_PROBE
) {
5871 spec
->parse_flags
|= HDA_PINCFG_HEADSET_MIC
;
5872 spec
->gen
.hp_mic
= 1; /* Mic-in is same pin as headphone */
5874 /* Disable boost for mic-in permanently. (This code is only called
5875 from quirks that guarantee that the headphone is at NID 0x1b.) */
5876 snd_hda_codec_write(codec
, 0x1b, 0, AC_VERB_SET_AMP_GAIN_MUTE
, 0x7000);
5877 snd_hda_override_wcaps(codec
, 0x1b, get_wcaps(codec
, 0x1b) & ~AC_WCAP_IN_AMP
);
5879 alc_fixup_headset_mode(codec
, fix
, action
);
5882 static void alc_fixup_headset_mode_alc668(struct hda_codec
*codec
,
5883 const struct hda_fixup
*fix
, int action
)
5885 if (action
== HDA_FIXUP_ACT_PRE_PROBE
) {
5886 alc_write_coef_idx(codec
, 0xc4, 0x8000);
5887 alc_update_coef_idx(codec
, 0xc2, ~0xfe, 0);
5888 snd_hda_set_pin_ctl_cache(codec
, 0x18, 0);
5890 alc_fixup_headset_mode(codec
, fix
, action
);
5893 /* Returns the nid of the external mic input pin, or 0 if it cannot be found. */
5894 static int find_ext_mic_pin(struct hda_codec
*codec
)
5896 struct alc_spec
*spec
= codec
->spec
;
5897 struct auto_pin_cfg
*cfg
= &spec
->gen
.autocfg
;
5899 unsigned int defcfg
;
5902 for (i
= 0; i
< cfg
->num_inputs
; i
++) {
5903 if (cfg
->inputs
[i
].type
!= AUTO_PIN_MIC
)
5905 nid
= cfg
->inputs
[i
].pin
;
5906 defcfg
= snd_hda_codec_get_pincfg(codec
, nid
);
5907 if (snd_hda_get_input_pin_attr(defcfg
) == INPUT_PIN_ATTR_INT
)
5915 static void alc271_hp_gate_mic_jack(struct hda_codec
*codec
,
5916 const struct hda_fixup
*fix
,
5919 struct alc_spec
*spec
= codec
->spec
;
5921 if (action
== HDA_FIXUP_ACT_PROBE
) {
5922 int mic_pin
= find_ext_mic_pin(codec
);
5923 int hp_pin
= alc_get_hp_pin(spec
);
5925 if (snd_BUG_ON(!mic_pin
|| !hp_pin
))
5927 snd_hda_jack_set_gating_jack(codec
, mic_pin
, hp_pin
);
5931 static void alc269_fixup_limit_int_mic_boost(struct hda_codec
*codec
,
5932 const struct hda_fixup
*fix
,
5935 struct alc_spec
*spec
= codec
->spec
;
5936 struct auto_pin_cfg
*cfg
= &spec
->gen
.autocfg
;
5939 /* The mic boosts on level 2 and 3 are too noisy
5940 on the internal mic input.
5941 Therefore limit the boost to 0 or 1. */
5943 if (action
!= HDA_FIXUP_ACT_PROBE
)
5946 for (i
= 0; i
< cfg
->num_inputs
; i
++) {
5947 hda_nid_t nid
= cfg
->inputs
[i
].pin
;
5948 unsigned int defcfg
;
5949 if (cfg
->inputs
[i
].type
!= AUTO_PIN_MIC
)
5951 defcfg
= snd_hda_codec_get_pincfg(codec
, nid
);
5952 if (snd_hda_get_input_pin_attr(defcfg
) != INPUT_PIN_ATTR_INT
)
5955 snd_hda_override_amp_caps(codec
, nid
, HDA_INPUT
,
5956 (0x00 << AC_AMPCAP_OFFSET_SHIFT
) |
5957 (0x01 << AC_AMPCAP_NUM_STEPS_SHIFT
) |
5958 (0x2f << AC_AMPCAP_STEP_SIZE_SHIFT
) |
5959 (0 << AC_AMPCAP_MUTE_SHIFT
));
5963 static void alc283_hp_automute_hook(struct hda_codec
*codec
,
5964 struct hda_jack_callback
*jack
)
5966 struct alc_spec
*spec
= codec
->spec
;
5970 snd_hda_gen_hp_automute(codec
, jack
);
5972 vref
= spec
->gen
.hp_jack_present
? PIN_VREF80
: 0;
5975 snd_hda_codec_write(codec
, 0x19, 0, AC_VERB_SET_PIN_WIDGET_CONTROL
,
5979 static void alc283_fixup_chromebook(struct hda_codec
*codec
,
5980 const struct hda_fixup
*fix
, int action
)
5982 struct alc_spec
*spec
= codec
->spec
;
5985 case HDA_FIXUP_ACT_PRE_PROBE
:
5986 snd_hda_override_wcaps(codec
, 0x03, 0);
5987 /* Disable AA-loopback as it causes white noise */
5988 spec
->gen
.mixer_nid
= 0;
5990 case HDA_FIXUP_ACT_INIT
:
5991 /* MIC2-VREF control */
5992 /* Set to manual mode */
5993 alc_update_coef_idx(codec
, 0x06, 0x000c, 0);
5994 /* Enable Line1 input control by verb */
5995 alc_update_coef_idx(codec
, 0x1a, 0, 1 << 4);
6000 static void alc283_fixup_sense_combo_jack(struct hda_codec
*codec
,
6001 const struct hda_fixup
*fix
, int action
)
6003 struct alc_spec
*spec
= codec
->spec
;
6006 case HDA_FIXUP_ACT_PRE_PROBE
:
6007 spec
->gen
.hp_automute_hook
= alc283_hp_automute_hook
;
6009 case HDA_FIXUP_ACT_INIT
:
6010 /* MIC2-VREF control */
6011 /* Set to manual mode */
6012 alc_update_coef_idx(codec
, 0x06, 0x000c, 0);
6017 /* mute tablet speaker pin (0x14) via dock plugging in addition */
6018 static void asus_tx300_automute(struct hda_codec
*codec
)
6020 struct alc_spec
*spec
= codec
->spec
;
6021 snd_hda_gen_update_outputs(codec
);
6022 if (snd_hda_jack_detect(codec
, 0x1b))
6023 spec
->gen
.mute_bits
|= (1ULL << 0x14);
6026 static void alc282_fixup_asus_tx300(struct hda_codec
*codec
,
6027 const struct hda_fixup
*fix
, int action
)
6029 struct alc_spec
*spec
= codec
->spec
;
6030 static const struct hda_pintbl dock_pins
[] = {
6031 { 0x1b, 0x21114000 }, /* dock speaker pin */
6036 case HDA_FIXUP_ACT_PRE_PROBE
:
6037 spec
->init_amp
= ALC_INIT_DEFAULT
;
6038 /* TX300 needs to set up GPIO2 for the speaker amp */
6039 alc_setup_gpio(codec
, 0x04);
6040 snd_hda_apply_pincfgs(codec
, dock_pins
);
6041 spec
->gen
.auto_mute_via_amp
= 1;
6042 spec
->gen
.automute_hook
= asus_tx300_automute
;
6043 snd_hda_jack_detect_enable_callback(codec
, 0x1b,
6044 snd_hda_gen_hp_automute
);
6046 case HDA_FIXUP_ACT_PROBE
:
6047 spec
->init_amp
= ALC_INIT_DEFAULT
;
6049 case HDA_FIXUP_ACT_BUILD
:
6050 /* this is a bit tricky; give more sane names for the main
6051 * (tablet) speaker and the dock speaker, respectively
6053 rename_ctl(codec
, "Speaker Playback Switch",
6054 "Dock Speaker Playback Switch");
6055 rename_ctl(codec
, "Bass Speaker Playback Switch",
6056 "Speaker Playback Switch");
6061 static void alc290_fixup_mono_speakers(struct hda_codec
*codec
,
6062 const struct hda_fixup
*fix
, int action
)
6064 if (action
== HDA_FIXUP_ACT_PRE_PROBE
) {
6065 /* DAC node 0x03 is giving mono output. We therefore want to
6066 make sure 0x14 (front speaker) and 0x15 (headphones) use the
6067 stereo DAC, while leaving 0x17 (bass speaker) for node 0x03. */
6068 static const hda_nid_t conn1
[] = { 0x0c };
6069 snd_hda_override_conn_list(codec
, 0x14, ARRAY_SIZE(conn1
), conn1
);
6070 snd_hda_override_conn_list(codec
, 0x15, ARRAY_SIZE(conn1
), conn1
);
6074 static void alc298_fixup_speaker_volume(struct hda_codec
*codec
,
6075 const struct hda_fixup
*fix
, int action
)
6077 if (action
== HDA_FIXUP_ACT_PRE_PROBE
) {
6078 /* The speaker is routed to the Node 0x06 by a mistake, as a result
6079 we can't adjust the speaker's volume since this node does not has
6080 Amp-out capability. we change the speaker's route to:
6081 Node 0x02 (Audio Output) -> Node 0x0c (Audio Mixer) -> Node 0x17 (
6082 Pin Complex), since Node 0x02 has Amp-out caps, we can adjust
6083 speaker's volume now. */
6085 static const hda_nid_t conn1
[] = { 0x0c };
6086 snd_hda_override_conn_list(codec
, 0x17, ARRAY_SIZE(conn1
), conn1
);
6090 /* disable DAC3 (0x06) selection on NID 0x17 as it has no volume amp control */
6091 static void alc295_fixup_disable_dac3(struct hda_codec
*codec
,
6092 const struct hda_fixup
*fix
, int action
)
6094 if (action
== HDA_FIXUP_ACT_PRE_PROBE
) {
6095 static const hda_nid_t conn
[] = { 0x02, 0x03 };
6096 snd_hda_override_conn_list(codec
, 0x17, ARRAY_SIZE(conn
), conn
);
6100 /* force NID 0x17 (Bass Speaker) to DAC1 to share it with the main speaker */
6101 static void alc285_fixup_speaker2_to_dac1(struct hda_codec
*codec
,
6102 const struct hda_fixup
*fix
, int action
)
6104 if (action
== HDA_FIXUP_ACT_PRE_PROBE
) {
6105 static const hda_nid_t conn
[] = { 0x02 };
6106 snd_hda_override_conn_list(codec
, 0x17, ARRAY_SIZE(conn
), conn
);
6110 /* Hook to update amp GPIO4 for automute */
6111 static void alc280_hp_gpio4_automute_hook(struct hda_codec
*codec
,
6112 struct hda_jack_callback
*jack
)
6114 struct alc_spec
*spec
= codec
->spec
;
6116 snd_hda_gen_hp_automute(codec
, jack
);
6117 /* mute_led_polarity is set to 0, so we pass inverted value here */
6118 alc_update_gpio_led(codec
, 0x10, spec
->mute_led_polarity
,
6119 !spec
->gen
.hp_jack_present
);
6122 /* Manage GPIOs for HP EliteBook Folio 9480m.
6124 * GPIO4 is the headphone amplifier power control
6125 * GPIO3 is the audio output mute indicator LED
6128 static void alc280_fixup_hp_9480m(struct hda_codec
*codec
,
6129 const struct hda_fixup
*fix
,
6132 struct alc_spec
*spec
= codec
->spec
;
6134 alc_fixup_hp_gpio_led(codec
, action
, 0x08, 0);
6135 if (action
== HDA_FIXUP_ACT_PRE_PROBE
) {
6136 /* amp at GPIO4; toggled via alc280_hp_gpio4_automute_hook() */
6137 spec
->gpio_mask
|= 0x10;
6138 spec
->gpio_dir
|= 0x10;
6139 spec
->gen
.hp_automute_hook
= alc280_hp_gpio4_automute_hook
;
6143 static void alc275_fixup_gpio4_off(struct hda_codec
*codec
,
6144 const struct hda_fixup
*fix
,
6147 struct alc_spec
*spec
= codec
->spec
;
6149 if (action
== HDA_FIXUP_ACT_PRE_PROBE
) {
6150 spec
->gpio_mask
|= 0x04;
6151 spec
->gpio_dir
|= 0x04;
6152 /* set data bit low */
6156 /* Quirk for Thinkpad X1 7th and 8th Gen
6157 * The following fixed routing needed
6158 * DAC1 (NID 0x02) -> Speaker (NID 0x14); some eq applied secretly
6159 * DAC2 (NID 0x03) -> Bass (NID 0x17) & Headphone (NID 0x21); sharing a DAC
6160 * DAC3 (NID 0x06) -> Unused, due to the lack of volume amp
6162 static void alc285_fixup_thinkpad_x1_gen7(struct hda_codec
*codec
,
6163 const struct hda_fixup
*fix
, int action
)
6165 static const hda_nid_t conn
[] = { 0x02, 0x03 }; /* exclude 0x06 */
6166 static const hda_nid_t preferred_pairs
[] = {
6167 0x14, 0x02, 0x17, 0x03, 0x21, 0x03, 0
6169 struct alc_spec
*spec
= codec
->spec
;
6172 case HDA_FIXUP_ACT_PRE_PROBE
:
6173 snd_hda_override_conn_list(codec
, 0x17, ARRAY_SIZE(conn
), conn
);
6174 spec
->gen
.preferred_dacs
= preferred_pairs
;
6176 case HDA_FIXUP_ACT_BUILD
:
6177 /* The generic parser creates somewhat unintuitive volume ctls
6178 * with the fixed routing above, and the shared DAC2 may be
6180 * Rename those to unique names so that PA doesn't touch them
6181 * and use only Master volume.
6183 rename_ctl(codec
, "Front Playback Volume", "DAC1 Playback Volume");
6184 rename_ctl(codec
, "Bass Speaker Playback Volume", "DAC2 Playback Volume");
6189 static void alc233_alc662_fixup_lenovo_dual_codecs(struct hda_codec
*codec
,
6190 const struct hda_fixup
*fix
,
6193 alc_fixup_dual_codecs(codec
, fix
, action
);
6195 case HDA_FIXUP_ACT_PRE_PROBE
:
6196 /* override card longname to provide a unique UCM profile */
6197 strcpy(codec
->card
->longname
, "HDAudio-Lenovo-DualCodecs");
6199 case HDA_FIXUP_ACT_BUILD
:
6200 /* rename Capture controls depending on the codec */
6201 rename_ctl(codec
, "Capture Volume",
6203 "Rear-Panel Capture Volume" :
6204 "Front-Panel Capture Volume");
6205 rename_ctl(codec
, "Capture Switch",
6207 "Rear-Panel Capture Switch" :
6208 "Front-Panel Capture Switch");
6213 static void alc225_fixup_s3_pop_noise(struct hda_codec
*codec
,
6214 const struct hda_fixup
*fix
, int action
)
6216 if (action
!= HDA_FIXUP_ACT_PRE_PROBE
)
6219 codec
->power_save_node
= 1;
6222 /* Forcibly assign NID 0x03 to HP/LO while NID 0x02 to SPK for EQ */
6223 static void alc274_fixup_bind_dacs(struct hda_codec
*codec
,
6224 const struct hda_fixup
*fix
, int action
)
6226 struct alc_spec
*spec
= codec
->spec
;
6227 static const hda_nid_t preferred_pairs
[] = {
6228 0x21, 0x03, 0x1b, 0x03, 0x16, 0x02,
6232 if (action
!= HDA_FIXUP_ACT_PRE_PROBE
)
6235 spec
->gen
.preferred_dacs
= preferred_pairs
;
6236 spec
->gen
.auto_mute_via_amp
= 1;
6237 codec
->power_save_node
= 0;
6240 /* avoid DAC 0x06 for bass speaker 0x17; it has no volume control */
6241 static void alc289_fixup_asus_ga401(struct hda_codec
*codec
,
6242 const struct hda_fixup
*fix
, int action
)
6244 static const hda_nid_t preferred_pairs
[] = {
6245 0x14, 0x02, 0x17, 0x02, 0x21, 0x03, 0
6247 struct alc_spec
*spec
= codec
->spec
;
6249 if (action
== HDA_FIXUP_ACT_PRE_PROBE
) {
6250 spec
->gen
.preferred_dacs
= preferred_pairs
;
6251 spec
->gen
.obey_preferred_dacs
= 1;
6255 /* The DAC of NID 0x3 will introduce click/pop noise on headphones, so invalidate it */
6256 static void alc285_fixup_invalidate_dacs(struct hda_codec
*codec
,
6257 const struct hda_fixup
*fix
, int action
)
6259 if (action
!= HDA_FIXUP_ACT_PRE_PROBE
)
6262 snd_hda_override_wcaps(codec
, 0x03, 0);
6265 static void alc_combo_jack_hp_jd_restart(struct hda_codec
*codec
)
6267 switch (codec
->core
.vendor_id
) {
6273 alc_update_coef_idx(codec
, 0x4a, 0x8000, 1 << 15); /* Reset HP JD */
6274 alc_update_coef_idx(codec
, 0x4a, 0x8000, 0 << 15);
6281 alc_update_coef_idx(codec
, 0x1b, 0x8000, 1 << 15); /* Reset HP JD */
6282 alc_update_coef_idx(codec
, 0x1b, 0x8000, 0 << 15);
6287 static void alc295_fixup_chromebook(struct hda_codec
*codec
,
6288 const struct hda_fixup
*fix
, int action
)
6290 struct alc_spec
*spec
= codec
->spec
;
6293 case HDA_FIXUP_ACT_PRE_PROBE
:
6294 spec
->ultra_low_power
= true;
6296 case HDA_FIXUP_ACT_INIT
:
6297 alc_combo_jack_hp_jd_restart(codec
);
6302 static void alc_fixup_disable_mic_vref(struct hda_codec
*codec
,
6303 const struct hda_fixup
*fix
, int action
)
6305 if (action
== HDA_FIXUP_ACT_PRE_PROBE
)
6306 snd_hda_codec_set_pin_target(codec
, 0x19, PIN_VREFHIZ
);
6310 static void alc294_gx502_toggle_output(struct hda_codec
*codec
,
6311 struct hda_jack_callback
*cb
)
6313 /* The Windows driver sets the codec up in a very different way where
6314 * it appears to leave 0x10 = 0x8a20 set. For Linux we need to toggle it
6316 if (snd_hda_jack_detect_state(codec
, 0x21) == HDA_JACK_PRESENT
)
6317 alc_write_coef_idx(codec
, 0x10, 0x8a20);
6319 alc_write_coef_idx(codec
, 0x10, 0x0a20);
6322 static void alc294_fixup_gx502_hp(struct hda_codec
*codec
,
6323 const struct hda_fixup
*fix
, int action
)
6325 /* Pin 0x21: headphones/headset mic */
6326 if (!is_jack_detectable(codec
, 0x21))
6330 case HDA_FIXUP_ACT_PRE_PROBE
:
6331 snd_hda_jack_detect_enable_callback(codec
, 0x21,
6332 alc294_gx502_toggle_output
);
6334 case HDA_FIXUP_ACT_INIT
:
6335 /* Make sure to start in a correct state, i.e. if
6336 * headphones have been plugged in before powering up the system
6338 alc294_gx502_toggle_output(codec
, NULL
);
6343 static void alc294_gu502_toggle_output(struct hda_codec
*codec
,
6344 struct hda_jack_callback
*cb
)
6346 /* Windows sets 0x10 to 0x8420 for Node 0x20 which is
6347 * responsible from changes between speakers and headphones
6349 if (snd_hda_jack_detect_state(codec
, 0x21) == HDA_JACK_PRESENT
)
6350 alc_write_coef_idx(codec
, 0x10, 0x8420);
6352 alc_write_coef_idx(codec
, 0x10, 0x0a20);
6355 static void alc294_fixup_gu502_hp(struct hda_codec
*codec
,
6356 const struct hda_fixup
*fix
, int action
)
6358 if (!is_jack_detectable(codec
, 0x21))
6362 case HDA_FIXUP_ACT_PRE_PROBE
:
6363 snd_hda_jack_detect_enable_callback(codec
, 0x21,
6364 alc294_gu502_toggle_output
);
6366 case HDA_FIXUP_ACT_INIT
:
6367 alc294_gu502_toggle_output(codec
, NULL
);
6372 static void alc285_fixup_hp_gpio_amp_init(struct hda_codec
*codec
,
6373 const struct hda_fixup
*fix
, int action
)
6375 if (action
!= HDA_FIXUP_ACT_INIT
)
6379 alc_write_coef_idx(codec
, 0x65, 0x0);
6382 static void alc274_fixup_hp_headset_mic(struct hda_codec
*codec
,
6383 const struct hda_fixup
*fix
, int action
)
6386 case HDA_FIXUP_ACT_INIT
:
6387 alc_combo_jack_hp_jd_restart(codec
);
6392 static void alc_fixup_no_int_mic(struct hda_codec
*codec
,
6393 const struct hda_fixup
*fix
, int action
)
6395 struct alc_spec
*spec
= codec
->spec
;
6398 case HDA_FIXUP_ACT_PRE_PROBE
:
6399 /* Mic RING SLEEVE swap for combo jack */
6400 alc_update_coef_idx(codec
, 0x45, 0xf<<12 | 1<<10, 5<<12);
6401 spec
->no_internal_mic_pin
= true;
6403 case HDA_FIXUP_ACT_INIT
:
6404 alc_combo_jack_hp_jd_restart(codec
);
6409 static void alc285_fixup_hp_spectre_x360(struct hda_codec
*codec
,
6410 const struct hda_fixup
*fix
, int action
)
6412 static const hda_nid_t conn
[] = { 0x02 };
6413 static const struct hda_pintbl pincfgs
[] = {
6414 { 0x14, 0x90170110 }, /* rear speaker */
6419 case HDA_FIXUP_ACT_PRE_PROBE
:
6420 snd_hda_apply_pincfgs(codec
, pincfgs
);
6421 /* force front speaker to DAC1 */
6422 snd_hda_override_conn_list(codec
, 0x17, ARRAY_SIZE(conn
), conn
);
6427 /* for hda_fixup_thinkpad_acpi() */
6428 #include "thinkpad_helper.c"
6430 static void alc_fixup_thinkpad_acpi(struct hda_codec
*codec
,
6431 const struct hda_fixup
*fix
, int action
)
6433 alc_fixup_no_shutup(codec
, fix
, action
); /* reduce click noise */
6434 hda_fixup_thinkpad_acpi(codec
, fix
, action
);
6437 /* Fixup for Lenovo Legion 15IMHg05 speaker output on headset removal. */
6438 static void alc287_fixup_legion_15imhg05_speakers(struct hda_codec
*codec
,
6439 const struct hda_fixup
*fix
,
6442 struct alc_spec
*spec
= codec
->spec
;
6445 case HDA_FIXUP_ACT_PRE_PROBE
:
6446 spec
->gen
.suppress_auto_mute
= 1;
6451 /* for alc295_fixup_hp_top_speakers */
6452 #include "hp_x360_helper.c"
6454 /* for alc285_fixup_ideapad_s740_coef() */
6455 #include "ideapad_s740_helper.c"
6457 static void alc256_fixup_tongfang_reset_persistent_settings(struct hda_codec
*codec
,
6458 const struct hda_fixup
*fix
,
6462 * A certain other OS sets these coeffs to different values. On at least one TongFang
6463 * barebone these settings might survive even a cold reboot. So to restore a clean slate the
6464 * values are explicitly reset to default here. Without this, the external microphone is
6465 * always in a plugged-in state, while the internal microphone is always in an unplugged
6466 * state, breaking the ability to use the internal microphone.
6468 alc_write_coef_idx(codec
, 0x24, 0x0000);
6469 alc_write_coef_idx(codec
, 0x26, 0x0000);
6470 alc_write_coef_idx(codec
, 0x29, 0x3000);
6471 alc_write_coef_idx(codec
, 0x37, 0xfe05);
6472 alc_write_coef_idx(codec
, 0x45, 0x5089);
6477 ALC269_FIXUP_SONY_VAIO
,
6478 ALC275_FIXUP_SONY_VAIO_GPIO2
,
6479 ALC269_FIXUP_DELL_M101Z
,
6480 ALC269_FIXUP_SKU_IGNORE
,
6481 ALC269_FIXUP_ASUS_G73JW
,
6482 ALC269_FIXUP_LENOVO_EAPD
,
6483 ALC275_FIXUP_SONY_HWEQ
,
6484 ALC275_FIXUP_SONY_DISABLE_AAMIX
,
6486 ALC269_FIXUP_PCM_44K
,
6487 ALC269_FIXUP_STEREO_DMIC
,
6488 ALC269_FIXUP_HEADSET_MIC
,
6489 ALC269_FIXUP_QUANTA_MUTE
,
6490 ALC269_FIXUP_LIFEBOOK
,
6491 ALC269_FIXUP_LIFEBOOK_EXTMIC
,
6492 ALC269_FIXUP_LIFEBOOK_HP_PIN
,
6493 ALC269_FIXUP_LIFEBOOK_NO_HP_TO_LINEOUT
,
6494 ALC255_FIXUP_LIFEBOOK_U7x7_HEADSET_MIC
,
6497 ALC269VB_FIXUP_AMIC
,
6498 ALC269VB_FIXUP_DMIC
,
6499 ALC269_FIXUP_HP_MUTE_LED
,
6500 ALC269_FIXUP_HP_MUTE_LED_MIC1
,
6501 ALC269_FIXUP_HP_MUTE_LED_MIC2
,
6502 ALC269_FIXUP_HP_MUTE_LED_MIC3
,
6503 ALC269_FIXUP_HP_GPIO_LED
,
6504 ALC269_FIXUP_HP_GPIO_MIC1_LED
,
6505 ALC269_FIXUP_HP_LINE1_MIC1_LED
,
6506 ALC269_FIXUP_INV_DMIC
,
6507 ALC269_FIXUP_LENOVO_DOCK
,
6508 ALC269_FIXUP_LENOVO_DOCK_LIMIT_BOOST
,
6509 ALC269_FIXUP_NO_SHUTUP
,
6510 ALC286_FIXUP_SONY_MIC_NO_PRESENCE
,
6511 ALC269_FIXUP_PINCFG_NO_HP_TO_LINEOUT
,
6512 ALC269_FIXUP_DELL1_MIC_NO_PRESENCE
,
6513 ALC269_FIXUP_DELL2_MIC_NO_PRESENCE
,
6514 ALC269_FIXUP_DELL3_MIC_NO_PRESENCE
,
6515 ALC269_FIXUP_DELL4_MIC_NO_PRESENCE
,
6516 ALC269_FIXUP_HEADSET_MODE
,
6517 ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC
,
6518 ALC269_FIXUP_ASPIRE_HEADSET_MIC
,
6519 ALC269_FIXUP_ASUS_X101_FUNC
,
6520 ALC269_FIXUP_ASUS_X101_VERB
,
6521 ALC269_FIXUP_ASUS_X101
,
6522 ALC271_FIXUP_AMIC_MIC2
,
6523 ALC271_FIXUP_HP_GATE_MIC_JACK
,
6524 ALC271_FIXUP_HP_GATE_MIC_JACK_E1_572
,
6525 ALC269_FIXUP_ACER_AC700
,
6526 ALC269_FIXUP_LIMIT_INT_MIC_BOOST
,
6527 ALC269VB_FIXUP_ASUS_ZENBOOK
,
6528 ALC269VB_FIXUP_ASUS_ZENBOOK_UX31A
,
6529 ALC269_FIXUP_LIMIT_INT_MIC_BOOST_MUTE_LED
,
6530 ALC269VB_FIXUP_ORDISSIMO_EVE2
,
6531 ALC283_FIXUP_CHROME_BOOK
,
6532 ALC283_FIXUP_SENSE_COMBO_JACK
,
6533 ALC282_FIXUP_ASUS_TX300
,
6534 ALC283_FIXUP_INT_MIC
,
6535 ALC290_FIXUP_MONO_SPEAKERS
,
6536 ALC290_FIXUP_MONO_SPEAKERS_HSJACK
,
6537 ALC290_FIXUP_SUBWOOFER
,
6538 ALC290_FIXUP_SUBWOOFER_HSJACK
,
6539 ALC269_FIXUP_THINKPAD_ACPI
,
6540 ALC269_FIXUP_DMIC_THINKPAD_ACPI
,
6541 ALC255_FIXUP_ACER_MIC_NO_PRESENCE
,
6542 ALC255_FIXUP_ASUS_MIC_NO_PRESENCE
,
6543 ALC255_FIXUP_DELL1_MIC_NO_PRESENCE
,
6544 ALC255_FIXUP_DELL2_MIC_NO_PRESENCE
,
6545 ALC255_FIXUP_HEADSET_MODE
,
6546 ALC255_FIXUP_HEADSET_MODE_NO_HP_MIC
,
6547 ALC293_FIXUP_DELL1_MIC_NO_PRESENCE
,
6548 ALC292_FIXUP_TPT440_DOCK
,
6549 ALC292_FIXUP_TPT440
,
6550 ALC283_FIXUP_HEADSET_MIC
,
6551 ALC255_FIXUP_MIC_MUTE_LED
,
6552 ALC282_FIXUP_ASPIRE_V5_PINS
,
6553 ALC269VB_FIXUP_ASPIRE_E1_COEF
,
6554 ALC280_FIXUP_HP_GPIO4
,
6555 ALC286_FIXUP_HP_GPIO_LED
,
6556 ALC280_FIXUP_HP_GPIO2_MIC_HOTKEY
,
6557 ALC280_FIXUP_HP_DOCK_PINS
,
6558 ALC269_FIXUP_HP_DOCK_GPIO_MIC1_LED
,
6559 ALC280_FIXUP_HP_9480M
,
6560 ALC245_FIXUP_HP_X360_AMP
,
6561 ALC288_FIXUP_DELL_HEADSET_MODE
,
6562 ALC288_FIXUP_DELL1_MIC_NO_PRESENCE
,
6563 ALC288_FIXUP_DELL_XPS_13
,
6564 ALC288_FIXUP_DISABLE_AAMIX
,
6565 ALC292_FIXUP_DELL_E7X_AAMIX
,
6566 ALC292_FIXUP_DELL_E7X
,
6567 ALC292_FIXUP_DISABLE_AAMIX
,
6568 ALC293_FIXUP_DISABLE_AAMIX_MULTIJACK
,
6569 ALC298_FIXUP_ALIENWARE_MIC_NO_PRESENCE
,
6570 ALC298_FIXUP_DELL1_MIC_NO_PRESENCE
,
6571 ALC298_FIXUP_DELL_AIO_MIC_NO_PRESENCE
,
6572 ALC275_FIXUP_DELL_XPS
,
6573 ALC293_FIXUP_LENOVO_SPK_NOISE
,
6574 ALC233_FIXUP_LENOVO_LINE2_MIC_HOTKEY
,
6575 ALC255_FIXUP_DELL_SPK_NOISE
,
6576 ALC225_FIXUP_DISABLE_MIC_VREF
,
6577 ALC225_FIXUP_DELL1_MIC_NO_PRESENCE
,
6578 ALC295_FIXUP_DISABLE_DAC3
,
6579 ALC285_FIXUP_SPEAKER2_TO_DAC1
,
6580 ALC280_FIXUP_HP_HEADSET_MIC
,
6581 ALC221_FIXUP_HP_FRONT_MIC
,
6582 ALC292_FIXUP_TPT460
,
6583 ALC298_FIXUP_SPK_VOLUME
,
6584 ALC298_FIXUP_LENOVO_SPK_VOLUME
,
6585 ALC256_FIXUP_DELL_INSPIRON_7559_SUBWOOFER
,
6586 ALC269_FIXUP_ATIV_BOOK_8
,
6587 ALC221_FIXUP_HP_MIC_NO_PRESENCE
,
6588 ALC256_FIXUP_ASUS_HEADSET_MODE
,
6589 ALC256_FIXUP_ASUS_MIC
,
6590 ALC256_FIXUP_ASUS_AIO_GPIO2
,
6591 ALC233_FIXUP_ASUS_MIC_NO_PRESENCE
,
6592 ALC233_FIXUP_EAPD_COEF_AND_MIC_NO_PRESENCE
,
6593 ALC233_FIXUP_LENOVO_MULTI_CODECS
,
6594 ALC233_FIXUP_ACER_HEADSET_MIC
,
6595 ALC294_FIXUP_LENOVO_MIC_LOCATION
,
6596 ALC225_FIXUP_DELL_WYSE_MIC_NO_PRESENCE
,
6597 ALC225_FIXUP_S3_POP_NOISE
,
6598 ALC700_FIXUP_INTEL_REFERENCE
,
6599 ALC274_FIXUP_DELL_BIND_DACS
,
6600 ALC274_FIXUP_DELL_AIO_LINEOUT_VERB
,
6601 ALC298_FIXUP_TPT470_DOCK_FIX
,
6602 ALC298_FIXUP_TPT470_DOCK
,
6603 ALC255_FIXUP_DUMMY_LINEOUT_VERB
,
6604 ALC255_FIXUP_DELL_HEADSET_MIC
,
6605 ALC256_FIXUP_HUAWEI_MACH_WX9_PINS
,
6606 ALC298_FIXUP_HUAWEI_MBX_STEREO
,
6607 ALC295_FIXUP_HP_X360
,
6608 ALC221_FIXUP_HP_HEADSET_MIC
,
6609 ALC285_FIXUP_LENOVO_HEADPHONE_NOISE
,
6610 ALC295_FIXUP_HP_AUTO_MUTE
,
6611 ALC286_FIXUP_ACER_AIO_MIC_NO_PRESENCE
,
6612 ALC294_FIXUP_ASUS_MIC
,
6613 ALC294_FIXUP_ASUS_HEADSET_MIC
,
6614 ALC294_FIXUP_ASUS_SPK
,
6615 ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
,
6616 ALC285_FIXUP_LENOVO_PC_BEEP_IN_NOISE
,
6617 ALC255_FIXUP_ACER_HEADSET_MIC
,
6618 ALC295_FIXUP_CHROME_BOOK
,
6619 ALC225_FIXUP_HEADSET_JACK
,
6620 ALC225_FIXUP_DELL_WYSE_AIO_MIC_NO_PRESENCE
,
6621 ALC225_FIXUP_WYSE_AUTO_MUTE
,
6622 ALC225_FIXUP_WYSE_DISABLE_MIC_VREF
,
6623 ALC286_FIXUP_ACER_AIO_HEADSET_MIC
,
6624 ALC256_FIXUP_ASUS_HEADSET_MIC
,
6625 ALC256_FIXUP_ASUS_MIC_NO_PRESENCE
,
6626 ALC299_FIXUP_PREDATOR_SPK
,
6627 ALC256_FIXUP_MEDION_HEADSET_NO_PRESENCE
,
6628 ALC289_FIXUP_DELL_SPK2
,
6629 ALC289_FIXUP_DUAL_SPK
,
6630 ALC294_FIXUP_SPK2_TO_DAC1
,
6631 ALC294_FIXUP_ASUS_DUAL_SPK
,
6632 ALC285_FIXUP_THINKPAD_X1_GEN7
,
6633 ALC285_FIXUP_THINKPAD_HEADSET_JACK
,
6634 ALC294_FIXUP_ASUS_HPE
,
6635 ALC294_FIXUP_ASUS_COEF_1B
,
6636 ALC294_FIXUP_ASUS_GX502_HP
,
6637 ALC294_FIXUP_ASUS_GX502_PINS
,
6638 ALC294_FIXUP_ASUS_GX502_VERBS
,
6639 ALC294_FIXUP_ASUS_GU502_HP
,
6640 ALC294_FIXUP_ASUS_GU502_PINS
,
6641 ALC294_FIXUP_ASUS_GU502_VERBS
,
6642 ALC285_FIXUP_HP_GPIO_LED
,
6643 ALC285_FIXUP_HP_MUTE_LED
,
6644 ALC236_FIXUP_HP_GPIO_LED
,
6645 ALC236_FIXUP_HP_MUTE_LED
,
6646 ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF
,
6647 ALC298_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET
,
6648 ALC295_FIXUP_ASUS_MIC_NO_PRESENCE
,
6649 ALC269VC_FIXUP_ACER_VCOPPERBOX_PINS
,
6650 ALC269VC_FIXUP_ACER_HEADSET_MIC
,
6651 ALC269VC_FIXUP_ACER_MIC_NO_PRESENCE
,
6652 ALC289_FIXUP_ASUS_GA401
,
6653 ALC289_FIXUP_ASUS_GA502
,
6654 ALC256_FIXUP_ACER_MIC_NO_PRESENCE
,
6655 ALC285_FIXUP_HP_GPIO_AMP_INIT
,
6656 ALC269_FIXUP_CZC_B20
,
6657 ALC269_FIXUP_CZC_TMI
,
6658 ALC269_FIXUP_CZC_L101
,
6659 ALC269_FIXUP_LEMOTE_A1802
,
6660 ALC269_FIXUP_LEMOTE_A190X
,
6661 ALC256_FIXUP_INTEL_NUC8_RUGGED
,
6662 ALC233_FIXUP_INTEL_NUC8_DMIC
,
6663 ALC233_FIXUP_INTEL_NUC8_BOOST
,
6664 ALC256_FIXUP_INTEL_NUC10
,
6665 ALC255_FIXUP_XIAOMI_HEADSET_MIC
,
6666 ALC274_FIXUP_HP_MIC
,
6667 ALC274_FIXUP_HP_HEADSET_MIC
,
6668 ALC274_FIXUP_HP_ENVY_GPIO
,
6669 ALC256_FIXUP_ASUS_HPE
,
6670 ALC285_FIXUP_THINKPAD_NO_BASS_SPK_HEADSET_JACK
,
6671 ALC287_FIXUP_HP_GPIO_LED
,
6672 ALC256_FIXUP_HP_HEADSET_MIC
,
6673 ALC236_FIXUP_DELL_AIO_HEADSET_MIC
,
6674 ALC282_FIXUP_ACER_DISABLE_LINEOUT
,
6675 ALC255_FIXUP_ACER_LIMIT_INT_MIC_BOOST
,
6676 ALC256_FIXUP_ACER_HEADSET_MIC
,
6677 ALC285_FIXUP_IDEAPAD_S740_COEF
,
6678 ALC285_FIXUP_HP_LIMIT_INT_MIC_BOOST
,
6679 ALC295_FIXUP_ASUS_DACS
,
6680 ALC295_FIXUP_HP_OMEN
,
6681 ALC285_FIXUP_HP_SPECTRE_X360
,
6682 ALC287_FIXUP_IDEAPAD_BASS_SPK_AMP
,
6683 ALC623_FIXUP_LENOVO_THINKSTATION_P340
,
6684 ALC255_FIXUP_ACER_HEADPHONE_AND_MIC
,
6685 ALC236_FIXUP_HP_LIMIT_INT_MIC_BOOST
,
6686 ALC287_FIXUP_LEGION_15IMHG05_SPEAKERS
,
6687 ALC287_FIXUP_LEGION_15IMHG05_AUTOMUTE
,
6688 ALC287_FIXUP_YOGA7_14ITL_SPEAKERS
,
6689 ALC287_FIXUP_13S_GEN2_SPEAKERS
,
6690 ALC256_FIXUP_TONGFANG_RESET_PERSISTENT_SETTINGS
,
6693 static const struct hda_fixup alc269_fixups
[] = {
6694 [ALC269_FIXUP_GPIO2
] = {
6695 .type
= HDA_FIXUP_FUNC
,
6696 .v
.func
= alc_fixup_gpio2
,
6698 [ALC269_FIXUP_SONY_VAIO
] = {
6699 .type
= HDA_FIXUP_PINCTLS
,
6700 .v
.pins
= (const struct hda_pintbl
[]) {
6701 {0x19, PIN_VREFGRD
},
6705 [ALC275_FIXUP_SONY_VAIO_GPIO2
] = {
6706 .type
= HDA_FIXUP_FUNC
,
6707 .v
.func
= alc275_fixup_gpio4_off
,
6709 .chain_id
= ALC269_FIXUP_SONY_VAIO
6711 [ALC269_FIXUP_DELL_M101Z
] = {
6712 .type
= HDA_FIXUP_VERBS
,
6713 .v
.verbs
= (const struct hda_verb
[]) {
6714 /* Enables internal speaker */
6715 {0x20, AC_VERB_SET_COEF_INDEX
, 13},
6716 {0x20, AC_VERB_SET_PROC_COEF
, 0x4040},
6720 [ALC269_FIXUP_SKU_IGNORE
] = {
6721 .type
= HDA_FIXUP_FUNC
,
6722 .v
.func
= alc_fixup_sku_ignore
,
6724 [ALC269_FIXUP_ASUS_G73JW
] = {
6725 .type
= HDA_FIXUP_PINS
,
6726 .v
.pins
= (const struct hda_pintbl
[]) {
6727 { 0x17, 0x99130111 }, /* subwoofer */
6731 [ALC269_FIXUP_LENOVO_EAPD
] = {
6732 .type
= HDA_FIXUP_VERBS
,
6733 .v
.verbs
= (const struct hda_verb
[]) {
6734 {0x14, AC_VERB_SET_EAPD_BTLENABLE
, 0},
6738 [ALC275_FIXUP_SONY_HWEQ
] = {
6739 .type
= HDA_FIXUP_FUNC
,
6740 .v
.func
= alc269_fixup_hweq
,
6742 .chain_id
= ALC275_FIXUP_SONY_VAIO_GPIO2
6744 [ALC275_FIXUP_SONY_DISABLE_AAMIX
] = {
6745 .type
= HDA_FIXUP_FUNC
,
6746 .v
.func
= alc_fixup_disable_aamix
,
6748 .chain_id
= ALC269_FIXUP_SONY_VAIO
6750 [ALC271_FIXUP_DMIC
] = {
6751 .type
= HDA_FIXUP_FUNC
,
6752 .v
.func
= alc271_fixup_dmic
,
6754 [ALC269_FIXUP_PCM_44K
] = {
6755 .type
= HDA_FIXUP_FUNC
,
6756 .v
.func
= alc269_fixup_pcm_44k
,
6758 .chain_id
= ALC269_FIXUP_QUANTA_MUTE
6760 [ALC269_FIXUP_STEREO_DMIC
] = {
6761 .type
= HDA_FIXUP_FUNC
,
6762 .v
.func
= alc269_fixup_stereo_dmic
,
6764 [ALC269_FIXUP_HEADSET_MIC
] = {
6765 .type
= HDA_FIXUP_FUNC
,
6766 .v
.func
= alc269_fixup_headset_mic
,
6768 [ALC269_FIXUP_QUANTA_MUTE
] = {
6769 .type
= HDA_FIXUP_FUNC
,
6770 .v
.func
= alc269_fixup_quanta_mute
,
6772 [ALC269_FIXUP_LIFEBOOK
] = {
6773 .type
= HDA_FIXUP_PINS
,
6774 .v
.pins
= (const struct hda_pintbl
[]) {
6775 { 0x1a, 0x2101103f }, /* dock line-out */
6776 { 0x1b, 0x23a11040 }, /* dock mic-in */
6780 .chain_id
= ALC269_FIXUP_QUANTA_MUTE
6782 [ALC269_FIXUP_LIFEBOOK_EXTMIC
] = {
6783 .type
= HDA_FIXUP_PINS
,
6784 .v
.pins
= (const struct hda_pintbl
[]) {
6785 { 0x19, 0x01a1903c }, /* headset mic, with jack detect */
6789 [ALC269_FIXUP_LIFEBOOK_HP_PIN
] = {
6790 .type
= HDA_FIXUP_PINS
,
6791 .v
.pins
= (const struct hda_pintbl
[]) {
6792 { 0x21, 0x0221102f }, /* HP out */
6796 [ALC269_FIXUP_LIFEBOOK_NO_HP_TO_LINEOUT
] = {
6797 .type
= HDA_FIXUP_FUNC
,
6798 .v
.func
= alc269_fixup_pincfg_no_hp_to_lineout
,
6800 [ALC255_FIXUP_LIFEBOOK_U7x7_HEADSET_MIC
] = {
6801 .type
= HDA_FIXUP_FUNC
,
6802 .v
.func
= alc269_fixup_pincfg_U7x7_headset_mic
,
6804 [ALC269_FIXUP_AMIC
] = {
6805 .type
= HDA_FIXUP_PINS
,
6806 .v
.pins
= (const struct hda_pintbl
[]) {
6807 { 0x14, 0x99130110 }, /* speaker */
6808 { 0x15, 0x0121401f }, /* HP out */
6809 { 0x18, 0x01a19c20 }, /* mic */
6810 { 0x19, 0x99a3092f }, /* int-mic */
6814 [ALC269_FIXUP_DMIC
] = {
6815 .type
= HDA_FIXUP_PINS
,
6816 .v
.pins
= (const struct hda_pintbl
[]) {
6817 { 0x12, 0x99a3092f }, /* int-mic */
6818 { 0x14, 0x99130110 }, /* speaker */
6819 { 0x15, 0x0121401f }, /* HP out */
6820 { 0x18, 0x01a19c20 }, /* mic */
6824 [ALC269VB_FIXUP_AMIC
] = {
6825 .type
= HDA_FIXUP_PINS
,
6826 .v
.pins
= (const struct hda_pintbl
[]) {
6827 { 0x14, 0x99130110 }, /* speaker */
6828 { 0x18, 0x01a19c20 }, /* mic */
6829 { 0x19, 0x99a3092f }, /* int-mic */
6830 { 0x21, 0x0121401f }, /* HP out */
6834 [ALC269VB_FIXUP_DMIC
] = {
6835 .type
= HDA_FIXUP_PINS
,
6836 .v
.pins
= (const struct hda_pintbl
[]) {
6837 { 0x12, 0x99a3092f }, /* int-mic */
6838 { 0x14, 0x99130110 }, /* speaker */
6839 { 0x18, 0x01a19c20 }, /* mic */
6840 { 0x21, 0x0121401f }, /* HP out */
6844 [ALC269_FIXUP_HP_MUTE_LED
] = {
6845 .type
= HDA_FIXUP_FUNC
,
6846 .v
.func
= alc269_fixup_hp_mute_led
,
6848 [ALC269_FIXUP_HP_MUTE_LED_MIC1
] = {
6849 .type
= HDA_FIXUP_FUNC
,
6850 .v
.func
= alc269_fixup_hp_mute_led_mic1
,
6852 [ALC269_FIXUP_HP_MUTE_LED_MIC2
] = {
6853 .type
= HDA_FIXUP_FUNC
,
6854 .v
.func
= alc269_fixup_hp_mute_led_mic2
,
6856 [ALC269_FIXUP_HP_MUTE_LED_MIC3
] = {
6857 .type
= HDA_FIXUP_FUNC
,
6858 .v
.func
= alc269_fixup_hp_mute_led_mic3
,
6860 .chain_id
= ALC295_FIXUP_HP_AUTO_MUTE
6862 [ALC269_FIXUP_HP_GPIO_LED
] = {
6863 .type
= HDA_FIXUP_FUNC
,
6864 .v
.func
= alc269_fixup_hp_gpio_led
,
6866 [ALC269_FIXUP_HP_GPIO_MIC1_LED
] = {
6867 .type
= HDA_FIXUP_FUNC
,
6868 .v
.func
= alc269_fixup_hp_gpio_mic1_led
,
6870 [ALC269_FIXUP_HP_LINE1_MIC1_LED
] = {
6871 .type
= HDA_FIXUP_FUNC
,
6872 .v
.func
= alc269_fixup_hp_line1_mic1_led
,
6874 [ALC269_FIXUP_INV_DMIC
] = {
6875 .type
= HDA_FIXUP_FUNC
,
6876 .v
.func
= alc_fixup_inv_dmic
,
6878 [ALC269_FIXUP_NO_SHUTUP
] = {
6879 .type
= HDA_FIXUP_FUNC
,
6880 .v
.func
= alc_fixup_no_shutup
,
6882 [ALC269_FIXUP_LENOVO_DOCK
] = {
6883 .type
= HDA_FIXUP_PINS
,
6884 .v
.pins
= (const struct hda_pintbl
[]) {
6885 { 0x19, 0x23a11040 }, /* dock mic */
6886 { 0x1b, 0x2121103f }, /* dock headphone */
6890 .chain_id
= ALC269_FIXUP_PINCFG_NO_HP_TO_LINEOUT
6892 [ALC269_FIXUP_LENOVO_DOCK_LIMIT_BOOST
] = {
6893 .type
= HDA_FIXUP_FUNC
,
6894 .v
.func
= alc269_fixup_limit_int_mic_boost
,
6896 .chain_id
= ALC269_FIXUP_LENOVO_DOCK
,
6898 [ALC269_FIXUP_PINCFG_NO_HP_TO_LINEOUT
] = {
6899 .type
= HDA_FIXUP_FUNC
,
6900 .v
.func
= alc269_fixup_pincfg_no_hp_to_lineout
,
6902 .chain_id
= ALC269_FIXUP_THINKPAD_ACPI
,
6904 [ALC269_FIXUP_DELL1_MIC_NO_PRESENCE
] = {
6905 .type
= HDA_FIXUP_PINS
,
6906 .v
.pins
= (const struct hda_pintbl
[]) {
6907 { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */
6908 { 0x1a, 0x01a1913d }, /* use as headphone mic, without its own jack detect */
6912 .chain_id
= ALC269_FIXUP_HEADSET_MODE
6914 [ALC269_FIXUP_DELL2_MIC_NO_PRESENCE
] = {
6915 .type
= HDA_FIXUP_PINS
,
6916 .v
.pins
= (const struct hda_pintbl
[]) {
6917 { 0x16, 0x21014020 }, /* dock line out */
6918 { 0x19, 0x21a19030 }, /* dock mic */
6919 { 0x1a, 0x01a1913c }, /* use as headset mic, without its own jack detect */
6923 .chain_id
= ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC
6925 [ALC269_FIXUP_DELL3_MIC_NO_PRESENCE
] = {
6926 .type
= HDA_FIXUP_PINS
,
6927 .v
.pins
= (const struct hda_pintbl
[]) {
6928 { 0x1a, 0x01a1913c }, /* use as headset mic, without its own jack detect */
6932 .chain_id
= ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC
6934 [ALC269_FIXUP_DELL4_MIC_NO_PRESENCE
] = {
6935 .type
= HDA_FIXUP_PINS
,
6936 .v
.pins
= (const struct hda_pintbl
[]) {
6937 { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */
6938 { 0x1b, 0x01a1913d }, /* use as headphone mic, without its own jack detect */
6942 .chain_id
= ALC269_FIXUP_HEADSET_MODE
6944 [ALC269_FIXUP_HEADSET_MODE
] = {
6945 .type
= HDA_FIXUP_FUNC
,
6946 .v
.func
= alc_fixup_headset_mode
,
6948 .chain_id
= ALC255_FIXUP_MIC_MUTE_LED
6950 [ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC
] = {
6951 .type
= HDA_FIXUP_FUNC
,
6952 .v
.func
= alc_fixup_headset_mode_no_hp_mic
,
6954 [ALC269_FIXUP_ASPIRE_HEADSET_MIC
] = {
6955 .type
= HDA_FIXUP_PINS
,
6956 .v
.pins
= (const struct hda_pintbl
[]) {
6957 { 0x19, 0x01a1913c }, /* headset mic w/o jack detect */
6961 .chain_id
= ALC269_FIXUP_HEADSET_MODE
,
6963 [ALC286_FIXUP_SONY_MIC_NO_PRESENCE
] = {
6964 .type
= HDA_FIXUP_PINS
,
6965 .v
.pins
= (const struct hda_pintbl
[]) {
6966 { 0x18, 0x01a1913c }, /* use as headset mic, without its own jack detect */
6970 .chain_id
= ALC269_FIXUP_HEADSET_MIC
6972 [ALC256_FIXUP_HUAWEI_MACH_WX9_PINS
] = {
6973 .type
= HDA_FIXUP_PINS
,
6974 .v
.pins
= (const struct hda_pintbl
[]) {
6988 .chain_id
= ALC255_FIXUP_MIC_MUTE_LED
6990 [ALC298_FIXUP_HUAWEI_MBX_STEREO
] = {
6991 .type
= HDA_FIXUP_FUNC
,
6992 .v
.func
= alc298_fixup_huawei_mbx_stereo
,
6994 .chain_id
= ALC255_FIXUP_MIC_MUTE_LED
6996 [ALC269_FIXUP_ASUS_X101_FUNC
] = {
6997 .type
= HDA_FIXUP_FUNC
,
6998 .v
.func
= alc269_fixup_x101_headset_mic
,
7000 [ALC269_FIXUP_ASUS_X101_VERB
] = {
7001 .type
= HDA_FIXUP_VERBS
,
7002 .v
.verbs
= (const struct hda_verb
[]) {
7003 {0x18, AC_VERB_SET_PIN_WIDGET_CONTROL
, 0},
7004 {0x20, AC_VERB_SET_COEF_INDEX
, 0x08},
7005 {0x20, AC_VERB_SET_PROC_COEF
, 0x0310},
7009 .chain_id
= ALC269_FIXUP_ASUS_X101_FUNC
7011 [ALC269_FIXUP_ASUS_X101
] = {
7012 .type
= HDA_FIXUP_PINS
,
7013 .v
.pins
= (const struct hda_pintbl
[]) {
7014 { 0x18, 0x04a1182c }, /* Headset mic */
7018 .chain_id
= ALC269_FIXUP_ASUS_X101_VERB
7020 [ALC271_FIXUP_AMIC_MIC2
] = {
7021 .type
= HDA_FIXUP_PINS
,
7022 .v
.pins
= (const struct hda_pintbl
[]) {
7023 { 0x14, 0x99130110 }, /* speaker */
7024 { 0x19, 0x01a19c20 }, /* mic */
7025 { 0x1b, 0x99a7012f }, /* int-mic */
7026 { 0x21, 0x0121401f }, /* HP out */
7030 [ALC271_FIXUP_HP_GATE_MIC_JACK
] = {
7031 .type
= HDA_FIXUP_FUNC
,
7032 .v
.func
= alc271_hp_gate_mic_jack
,
7034 .chain_id
= ALC271_FIXUP_AMIC_MIC2
,
7036 [ALC271_FIXUP_HP_GATE_MIC_JACK_E1_572
] = {
7037 .type
= HDA_FIXUP_FUNC
,
7038 .v
.func
= alc269_fixup_limit_int_mic_boost
,
7040 .chain_id
= ALC271_FIXUP_HP_GATE_MIC_JACK
,
7042 [ALC269_FIXUP_ACER_AC700
] = {
7043 .type
= HDA_FIXUP_PINS
,
7044 .v
.pins
= (const struct hda_pintbl
[]) {
7045 { 0x12, 0x99a3092f }, /* int-mic */
7046 { 0x14, 0x99130110 }, /* speaker */
7047 { 0x18, 0x03a11c20 }, /* mic */
7048 { 0x1e, 0x0346101e }, /* SPDIF1 */
7049 { 0x21, 0x0321101f }, /* HP out */
7053 .chain_id
= ALC271_FIXUP_DMIC
,
7055 [ALC269_FIXUP_LIMIT_INT_MIC_BOOST
] = {
7056 .type
= HDA_FIXUP_FUNC
,
7057 .v
.func
= alc269_fixup_limit_int_mic_boost
,
7059 .chain_id
= ALC269_FIXUP_THINKPAD_ACPI
,
7061 [ALC269VB_FIXUP_ASUS_ZENBOOK
] = {
7062 .type
= HDA_FIXUP_FUNC
,
7063 .v
.func
= alc269_fixup_limit_int_mic_boost
,
7065 .chain_id
= ALC269VB_FIXUP_DMIC
,
7067 [ALC269VB_FIXUP_ASUS_ZENBOOK_UX31A
] = {
7068 .type
= HDA_FIXUP_VERBS
,
7069 .v
.verbs
= (const struct hda_verb
[]) {
7070 /* class-D output amp +5dB */
7071 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x12 },
7072 { 0x20, AC_VERB_SET_PROC_COEF
, 0x2800 },
7076 .chain_id
= ALC269VB_FIXUP_ASUS_ZENBOOK
,
7078 [ALC269_FIXUP_LIMIT_INT_MIC_BOOST_MUTE_LED
] = {
7079 .type
= HDA_FIXUP_FUNC
,
7080 .v
.func
= alc269_fixup_limit_int_mic_boost
,
7082 .chain_id
= ALC269_FIXUP_HP_MUTE_LED_MIC1
,
7084 [ALC269VB_FIXUP_ORDISSIMO_EVE2
] = {
7085 .type
= HDA_FIXUP_PINS
,
7086 .v
.pins
= (const struct hda_pintbl
[]) {
7087 { 0x12, 0x99a3092f }, /* int-mic */
7088 { 0x18, 0x03a11d20 }, /* mic */
7089 { 0x19, 0x411111f0 }, /* Unused bogus pin */
7093 [ALC283_FIXUP_CHROME_BOOK
] = {
7094 .type
= HDA_FIXUP_FUNC
,
7095 .v
.func
= alc283_fixup_chromebook
,
7097 [ALC283_FIXUP_SENSE_COMBO_JACK
] = {
7098 .type
= HDA_FIXUP_FUNC
,
7099 .v
.func
= alc283_fixup_sense_combo_jack
,
7101 .chain_id
= ALC283_FIXUP_CHROME_BOOK
,
7103 [ALC282_FIXUP_ASUS_TX300
] = {
7104 .type
= HDA_FIXUP_FUNC
,
7105 .v
.func
= alc282_fixup_asus_tx300
,
7107 [ALC283_FIXUP_INT_MIC
] = {
7108 .type
= HDA_FIXUP_VERBS
,
7109 .v
.verbs
= (const struct hda_verb
[]) {
7110 {0x20, AC_VERB_SET_COEF_INDEX
, 0x1a},
7111 {0x20, AC_VERB_SET_PROC_COEF
, 0x0011},
7115 .chain_id
= ALC269_FIXUP_LIMIT_INT_MIC_BOOST
7117 [ALC290_FIXUP_SUBWOOFER_HSJACK
] = {
7118 .type
= HDA_FIXUP_PINS
,
7119 .v
.pins
= (const struct hda_pintbl
[]) {
7120 { 0x17, 0x90170112 }, /* subwoofer */
7124 .chain_id
= ALC290_FIXUP_MONO_SPEAKERS_HSJACK
,
7126 [ALC290_FIXUP_SUBWOOFER
] = {
7127 .type
= HDA_FIXUP_PINS
,
7128 .v
.pins
= (const struct hda_pintbl
[]) {
7129 { 0x17, 0x90170112 }, /* subwoofer */
7133 .chain_id
= ALC290_FIXUP_MONO_SPEAKERS
,
7135 [ALC290_FIXUP_MONO_SPEAKERS
] = {
7136 .type
= HDA_FIXUP_FUNC
,
7137 .v
.func
= alc290_fixup_mono_speakers
,
7139 [ALC290_FIXUP_MONO_SPEAKERS_HSJACK
] = {
7140 .type
= HDA_FIXUP_FUNC
,
7141 .v
.func
= alc290_fixup_mono_speakers
,
7143 .chain_id
= ALC269_FIXUP_DELL3_MIC_NO_PRESENCE
,
7145 [ALC269_FIXUP_THINKPAD_ACPI
] = {
7146 .type
= HDA_FIXUP_FUNC
,
7147 .v
.func
= alc_fixup_thinkpad_acpi
,
7149 .chain_id
= ALC269_FIXUP_SKU_IGNORE
,
7151 [ALC269_FIXUP_DMIC_THINKPAD_ACPI
] = {
7152 .type
= HDA_FIXUP_FUNC
,
7153 .v
.func
= alc_fixup_inv_dmic
,
7155 .chain_id
= ALC269_FIXUP_THINKPAD_ACPI
,
7157 [ALC255_FIXUP_ACER_MIC_NO_PRESENCE
] = {
7158 .type
= HDA_FIXUP_PINS
,
7159 .v
.pins
= (const struct hda_pintbl
[]) {
7160 { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */
7164 .chain_id
= ALC255_FIXUP_HEADSET_MODE
7166 [ALC255_FIXUP_ASUS_MIC_NO_PRESENCE
] = {
7167 .type
= HDA_FIXUP_PINS
,
7168 .v
.pins
= (const struct hda_pintbl
[]) {
7169 { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */
7173 .chain_id
= ALC255_FIXUP_HEADSET_MODE
7175 [ALC255_FIXUP_DELL1_MIC_NO_PRESENCE
] = {
7176 .type
= HDA_FIXUP_PINS
,
7177 .v
.pins
= (const struct hda_pintbl
[]) {
7178 { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */
7179 { 0x1a, 0x01a1913d }, /* use as headphone mic, without its own jack detect */
7183 .chain_id
= ALC255_FIXUP_HEADSET_MODE
7185 [ALC255_FIXUP_DELL2_MIC_NO_PRESENCE
] = {
7186 .type
= HDA_FIXUP_PINS
,
7187 .v
.pins
= (const struct hda_pintbl
[]) {
7188 { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */
7192 .chain_id
= ALC255_FIXUP_HEADSET_MODE_NO_HP_MIC
7194 [ALC255_FIXUP_HEADSET_MODE
] = {
7195 .type
= HDA_FIXUP_FUNC
,
7196 .v
.func
= alc_fixup_headset_mode_alc255
,
7198 .chain_id
= ALC255_FIXUP_MIC_MUTE_LED
7200 [ALC255_FIXUP_HEADSET_MODE_NO_HP_MIC
] = {
7201 .type
= HDA_FIXUP_FUNC
,
7202 .v
.func
= alc_fixup_headset_mode_alc255_no_hp_mic
,
7204 [ALC293_FIXUP_DELL1_MIC_NO_PRESENCE
] = {
7205 .type
= HDA_FIXUP_PINS
,
7206 .v
.pins
= (const struct hda_pintbl
[]) {
7207 { 0x18, 0x01a1913d }, /* use as headphone mic, without its own jack detect */
7208 { 0x1a, 0x01a1913c }, /* use as headset mic, without its own jack detect */
7212 .chain_id
= ALC269_FIXUP_HEADSET_MODE
7214 [ALC292_FIXUP_TPT440_DOCK
] = {
7215 .type
= HDA_FIXUP_FUNC
,
7216 .v
.func
= alc_fixup_tpt440_dock
,
7218 .chain_id
= ALC269_FIXUP_LIMIT_INT_MIC_BOOST
7220 [ALC292_FIXUP_TPT440
] = {
7221 .type
= HDA_FIXUP_FUNC
,
7222 .v
.func
= alc_fixup_disable_aamix
,
7224 .chain_id
= ALC292_FIXUP_TPT440_DOCK
,
7226 [ALC283_FIXUP_HEADSET_MIC
] = {
7227 .type
= HDA_FIXUP_PINS
,
7228 .v
.pins
= (const struct hda_pintbl
[]) {
7229 { 0x19, 0x04a110f0 },
7233 [ALC255_FIXUP_MIC_MUTE_LED
] = {
7234 .type
= HDA_FIXUP_FUNC
,
7235 .v
.func
= alc_fixup_micmute_led
,
7237 [ALC282_FIXUP_ASPIRE_V5_PINS
] = {
7238 .type
= HDA_FIXUP_PINS
,
7239 .v
.pins
= (const struct hda_pintbl
[]) {
7240 { 0x12, 0x90a60130 },
7241 { 0x14, 0x90170110 },
7242 { 0x17, 0x40000008 },
7243 { 0x18, 0x411111f0 },
7244 { 0x19, 0x01a1913c },
7245 { 0x1a, 0x411111f0 },
7246 { 0x1b, 0x411111f0 },
7247 { 0x1d, 0x40f89b2d },
7248 { 0x1e, 0x411111f0 },
7249 { 0x21, 0x0321101f },
7253 [ALC269VB_FIXUP_ASPIRE_E1_COEF
] = {
7254 .type
= HDA_FIXUP_FUNC
,
7255 .v
.func
= alc269vb_fixup_aspire_e1_coef
,
7257 [ALC280_FIXUP_HP_GPIO4
] = {
7258 .type
= HDA_FIXUP_FUNC
,
7259 .v
.func
= alc280_fixup_hp_gpio4
,
7261 [ALC286_FIXUP_HP_GPIO_LED
] = {
7262 .type
= HDA_FIXUP_FUNC
,
7263 .v
.func
= alc286_fixup_hp_gpio_led
,
7265 [ALC280_FIXUP_HP_GPIO2_MIC_HOTKEY
] = {
7266 .type
= HDA_FIXUP_FUNC
,
7267 .v
.func
= alc280_fixup_hp_gpio2_mic_hotkey
,
7269 [ALC280_FIXUP_HP_DOCK_PINS
] = {
7270 .type
= HDA_FIXUP_PINS
,
7271 .v
.pins
= (const struct hda_pintbl
[]) {
7272 { 0x1b, 0x21011020 }, /* line-out */
7273 { 0x1a, 0x01a1903c }, /* headset mic */
7274 { 0x18, 0x2181103f }, /* line-in */
7278 .chain_id
= ALC280_FIXUP_HP_GPIO4
7280 [ALC269_FIXUP_HP_DOCK_GPIO_MIC1_LED
] = {
7281 .type
= HDA_FIXUP_PINS
,
7282 .v
.pins
= (const struct hda_pintbl
[]) {
7283 { 0x1b, 0x21011020 }, /* line-out */
7284 { 0x18, 0x2181103f }, /* line-in */
7288 .chain_id
= ALC269_FIXUP_HP_GPIO_MIC1_LED
7290 [ALC280_FIXUP_HP_9480M
] = {
7291 .type
= HDA_FIXUP_FUNC
,
7292 .v
.func
= alc280_fixup_hp_9480m
,
7294 [ALC245_FIXUP_HP_X360_AMP
] = {
7295 .type
= HDA_FIXUP_FUNC
,
7296 .v
.func
= alc245_fixup_hp_x360_amp
,
7298 [ALC288_FIXUP_DELL_HEADSET_MODE
] = {
7299 .type
= HDA_FIXUP_FUNC
,
7300 .v
.func
= alc_fixup_headset_mode_dell_alc288
,
7302 .chain_id
= ALC255_FIXUP_MIC_MUTE_LED
7304 [ALC288_FIXUP_DELL1_MIC_NO_PRESENCE
] = {
7305 .type
= HDA_FIXUP_PINS
,
7306 .v
.pins
= (const struct hda_pintbl
[]) {
7307 { 0x18, 0x01a1913c }, /* use as headset mic, without its own jack detect */
7308 { 0x1a, 0x01a1913d }, /* use as headphone mic, without its own jack detect */
7312 .chain_id
= ALC288_FIXUP_DELL_HEADSET_MODE
7314 [ALC288_FIXUP_DISABLE_AAMIX
] = {
7315 .type
= HDA_FIXUP_FUNC
,
7316 .v
.func
= alc_fixup_disable_aamix
,
7318 .chain_id
= ALC288_FIXUP_DELL1_MIC_NO_PRESENCE
7320 [ALC288_FIXUP_DELL_XPS_13
] = {
7321 .type
= HDA_FIXUP_FUNC
,
7322 .v
.func
= alc_fixup_dell_xps13
,
7324 .chain_id
= ALC288_FIXUP_DISABLE_AAMIX
7326 [ALC292_FIXUP_DISABLE_AAMIX
] = {
7327 .type
= HDA_FIXUP_FUNC
,
7328 .v
.func
= alc_fixup_disable_aamix
,
7330 .chain_id
= ALC269_FIXUP_DELL2_MIC_NO_PRESENCE
7332 [ALC293_FIXUP_DISABLE_AAMIX_MULTIJACK
] = {
7333 .type
= HDA_FIXUP_FUNC
,
7334 .v
.func
= alc_fixup_disable_aamix
,
7336 .chain_id
= ALC293_FIXUP_DELL1_MIC_NO_PRESENCE
7338 [ALC292_FIXUP_DELL_E7X_AAMIX
] = {
7339 .type
= HDA_FIXUP_FUNC
,
7340 .v
.func
= alc_fixup_dell_xps13
,
7342 .chain_id
= ALC292_FIXUP_DISABLE_AAMIX
7344 [ALC292_FIXUP_DELL_E7X
] = {
7345 .type
= HDA_FIXUP_FUNC
,
7346 .v
.func
= alc_fixup_micmute_led
,
7347 /* micmute fixup must be applied at last */
7348 .chained_before
= true,
7349 .chain_id
= ALC292_FIXUP_DELL_E7X_AAMIX
,
7351 [ALC298_FIXUP_ALIENWARE_MIC_NO_PRESENCE
] = {
7352 .type
= HDA_FIXUP_PINS
,
7353 .v
.pins
= (const struct hda_pintbl
[]) {
7354 { 0x18, 0x01a1913c }, /* headset mic w/o jack detect */
7357 .chained_before
= true,
7358 .chain_id
= ALC269_FIXUP_HEADSET_MODE
,
7360 [ALC298_FIXUP_DELL1_MIC_NO_PRESENCE
] = {
7361 .type
= HDA_FIXUP_PINS
,
7362 .v
.pins
= (const struct hda_pintbl
[]) {
7363 { 0x18, 0x01a1913c }, /* use as headset mic, without its own jack detect */
7364 { 0x1a, 0x01a1913d }, /* use as headphone mic, without its own jack detect */
7368 .chain_id
= ALC269_FIXUP_HEADSET_MODE
7370 [ALC298_FIXUP_DELL_AIO_MIC_NO_PRESENCE
] = {
7371 .type
= HDA_FIXUP_PINS
,
7372 .v
.pins
= (const struct hda_pintbl
[]) {
7373 { 0x18, 0x01a1913c }, /* use as headset mic, without its own jack detect */
7377 .chain_id
= ALC269_FIXUP_HEADSET_MODE
7379 [ALC275_FIXUP_DELL_XPS
] = {
7380 .type
= HDA_FIXUP_VERBS
,
7381 .v
.verbs
= (const struct hda_verb
[]) {
7382 /* Enables internal speaker */
7383 {0x20, AC_VERB_SET_COEF_INDEX
, 0x1f},
7384 {0x20, AC_VERB_SET_PROC_COEF
, 0x00c0},
7385 {0x20, AC_VERB_SET_COEF_INDEX
, 0x30},
7386 {0x20, AC_VERB_SET_PROC_COEF
, 0x00b1},
7390 [ALC293_FIXUP_LENOVO_SPK_NOISE
] = {
7391 .type
= HDA_FIXUP_FUNC
,
7392 .v
.func
= alc_fixup_disable_aamix
,
7394 .chain_id
= ALC269_FIXUP_THINKPAD_ACPI
7396 [ALC233_FIXUP_LENOVO_LINE2_MIC_HOTKEY
] = {
7397 .type
= HDA_FIXUP_FUNC
,
7398 .v
.func
= alc233_fixup_lenovo_line2_mic_hotkey
,
7400 [ALC233_FIXUP_INTEL_NUC8_DMIC
] = {
7401 .type
= HDA_FIXUP_FUNC
,
7402 .v
.func
= alc_fixup_inv_dmic
,
7404 .chain_id
= ALC233_FIXUP_INTEL_NUC8_BOOST
,
7406 [ALC233_FIXUP_INTEL_NUC8_BOOST
] = {
7407 .type
= HDA_FIXUP_FUNC
,
7408 .v
.func
= alc269_fixup_limit_int_mic_boost
7410 [ALC255_FIXUP_DELL_SPK_NOISE
] = {
7411 .type
= HDA_FIXUP_FUNC
,
7412 .v
.func
= alc_fixup_disable_aamix
,
7414 .chain_id
= ALC255_FIXUP_DELL1_MIC_NO_PRESENCE
7416 [ALC225_FIXUP_DISABLE_MIC_VREF
] = {
7417 .type
= HDA_FIXUP_FUNC
,
7418 .v
.func
= alc_fixup_disable_mic_vref
,
7420 .chain_id
= ALC269_FIXUP_DELL1_MIC_NO_PRESENCE
7422 [ALC225_FIXUP_DELL1_MIC_NO_PRESENCE
] = {
7423 .type
= HDA_FIXUP_VERBS
,
7424 .v
.verbs
= (const struct hda_verb
[]) {
7425 /* Disable pass-through path for FRONT 14h */
7426 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x36 },
7427 { 0x20, AC_VERB_SET_PROC_COEF
, 0x57d7 },
7431 .chain_id
= ALC225_FIXUP_DISABLE_MIC_VREF
7433 [ALC280_FIXUP_HP_HEADSET_MIC
] = {
7434 .type
= HDA_FIXUP_FUNC
,
7435 .v
.func
= alc_fixup_disable_aamix
,
7437 .chain_id
= ALC269_FIXUP_HEADSET_MIC
,
7439 [ALC221_FIXUP_HP_FRONT_MIC
] = {
7440 .type
= HDA_FIXUP_PINS
,
7441 .v
.pins
= (const struct hda_pintbl
[]) {
7442 { 0x19, 0x02a19020 }, /* Front Mic */
7446 [ALC292_FIXUP_TPT460
] = {
7447 .type
= HDA_FIXUP_FUNC
,
7448 .v
.func
= alc_fixup_tpt440_dock
,
7450 .chain_id
= ALC293_FIXUP_LENOVO_SPK_NOISE
,
7452 [ALC298_FIXUP_SPK_VOLUME
] = {
7453 .type
= HDA_FIXUP_FUNC
,
7454 .v
.func
= alc298_fixup_speaker_volume
,
7456 .chain_id
= ALC298_FIXUP_DELL_AIO_MIC_NO_PRESENCE
,
7458 [ALC298_FIXUP_LENOVO_SPK_VOLUME
] = {
7459 .type
= HDA_FIXUP_FUNC
,
7460 .v
.func
= alc298_fixup_speaker_volume
,
7462 [ALC295_FIXUP_DISABLE_DAC3
] = {
7463 .type
= HDA_FIXUP_FUNC
,
7464 .v
.func
= alc295_fixup_disable_dac3
,
7466 [ALC285_FIXUP_SPEAKER2_TO_DAC1
] = {
7467 .type
= HDA_FIXUP_FUNC
,
7468 .v
.func
= alc285_fixup_speaker2_to_dac1
,
7470 .chain_id
= ALC269_FIXUP_THINKPAD_ACPI
7472 [ALC256_FIXUP_DELL_INSPIRON_7559_SUBWOOFER
] = {
7473 .type
= HDA_FIXUP_PINS
,
7474 .v
.pins
= (const struct hda_pintbl
[]) {
7475 { 0x1b, 0x90170151 },
7479 .chain_id
= ALC255_FIXUP_DELL1_MIC_NO_PRESENCE
7481 [ALC269_FIXUP_ATIV_BOOK_8
] = {
7482 .type
= HDA_FIXUP_FUNC
,
7483 .v
.func
= alc_fixup_auto_mute_via_amp
,
7485 .chain_id
= ALC269_FIXUP_NO_SHUTUP
7487 [ALC221_FIXUP_HP_MIC_NO_PRESENCE
] = {
7488 .type
= HDA_FIXUP_PINS
,
7489 .v
.pins
= (const struct hda_pintbl
[]) {
7490 { 0x18, 0x01a1913c }, /* use as headset mic, without its own jack detect */
7491 { 0x1a, 0x01a1913d }, /* use as headphone mic, without its own jack detect */
7495 .chain_id
= ALC269_FIXUP_HEADSET_MODE
7497 [ALC256_FIXUP_ASUS_HEADSET_MODE
] = {
7498 .type
= HDA_FIXUP_FUNC
,
7499 .v
.func
= alc_fixup_headset_mode
,
7501 [ALC256_FIXUP_ASUS_MIC
] = {
7502 .type
= HDA_FIXUP_PINS
,
7503 .v
.pins
= (const struct hda_pintbl
[]) {
7504 { 0x13, 0x90a60160 }, /* use as internal mic */
7505 { 0x19, 0x04a11120 }, /* use as headset mic, without its own jack detect */
7509 .chain_id
= ALC256_FIXUP_ASUS_HEADSET_MODE
7511 [ALC256_FIXUP_ASUS_AIO_GPIO2
] = {
7512 .type
= HDA_FIXUP_FUNC
,
7513 /* Set up GPIO2 for the speaker amp */
7514 .v
.func
= alc_fixup_gpio4
,
7516 [ALC233_FIXUP_ASUS_MIC_NO_PRESENCE
] = {
7517 .type
= HDA_FIXUP_PINS
,
7518 .v
.pins
= (const struct hda_pintbl
[]) {
7519 { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */
7523 .chain_id
= ALC269_FIXUP_HEADSET_MIC
7525 [ALC233_FIXUP_EAPD_COEF_AND_MIC_NO_PRESENCE
] = {
7526 .type
= HDA_FIXUP_VERBS
,
7527 .v
.verbs
= (const struct hda_verb
[]) {
7528 /* Enables internal speaker */
7529 {0x20, AC_VERB_SET_COEF_INDEX
, 0x40},
7530 {0x20, AC_VERB_SET_PROC_COEF
, 0x8800},
7534 .chain_id
= ALC233_FIXUP_ASUS_MIC_NO_PRESENCE
7536 [ALC233_FIXUP_LENOVO_MULTI_CODECS
] = {
7537 .type
= HDA_FIXUP_FUNC
,
7538 .v
.func
= alc233_alc662_fixup_lenovo_dual_codecs
,
7540 .chain_id
= ALC269_FIXUP_GPIO2
7542 [ALC233_FIXUP_ACER_HEADSET_MIC
] = {
7543 .type
= HDA_FIXUP_VERBS
,
7544 .v
.verbs
= (const struct hda_verb
[]) {
7545 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x45 },
7546 { 0x20, AC_VERB_SET_PROC_COEF
, 0x5089 },
7550 .chain_id
= ALC233_FIXUP_ASUS_MIC_NO_PRESENCE
7552 [ALC294_FIXUP_LENOVO_MIC_LOCATION
] = {
7553 .type
= HDA_FIXUP_PINS
,
7554 .v
.pins
= (const struct hda_pintbl
[]) {
7555 /* Change the mic location from front to right, otherwise there are
7556 two front mics with the same name, pulseaudio can't handle them.
7557 This is just a temporary workaround, after applying this fixup,
7558 there will be one "Front Mic" and one "Mic" in this machine.
7560 { 0x1a, 0x04a19040 },
7564 [ALC225_FIXUP_DELL_WYSE_MIC_NO_PRESENCE
] = {
7565 .type
= HDA_FIXUP_PINS
,
7566 .v
.pins
= (const struct hda_pintbl
[]) {
7567 { 0x16, 0x0101102f }, /* Rear Headset HP */
7568 { 0x19, 0x02a1913c }, /* use as Front headset mic, without its own jack detect */
7569 { 0x1a, 0x01a19030 }, /* Rear Headset MIC */
7570 { 0x1b, 0x02011020 },
7574 .chain_id
= ALC225_FIXUP_S3_POP_NOISE
7576 [ALC225_FIXUP_S3_POP_NOISE
] = {
7577 .type
= HDA_FIXUP_FUNC
,
7578 .v
.func
= alc225_fixup_s3_pop_noise
,
7580 .chain_id
= ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC
7582 [ALC700_FIXUP_INTEL_REFERENCE
] = {
7583 .type
= HDA_FIXUP_VERBS
,
7584 .v
.verbs
= (const struct hda_verb
[]) {
7585 /* Enables internal speaker */
7586 {0x20, AC_VERB_SET_COEF_INDEX
, 0x45},
7587 {0x20, AC_VERB_SET_PROC_COEF
, 0x5289},
7588 {0x20, AC_VERB_SET_COEF_INDEX
, 0x4A},
7589 {0x20, AC_VERB_SET_PROC_COEF
, 0x001b},
7590 {0x58, AC_VERB_SET_COEF_INDEX
, 0x00},
7591 {0x58, AC_VERB_SET_PROC_COEF
, 0x3888},
7592 {0x20, AC_VERB_SET_COEF_INDEX
, 0x6f},
7593 {0x20, AC_VERB_SET_PROC_COEF
, 0x2c0b},
7597 [ALC274_FIXUP_DELL_BIND_DACS
] = {
7598 .type
= HDA_FIXUP_FUNC
,
7599 .v
.func
= alc274_fixup_bind_dacs
,
7601 .chain_id
= ALC269_FIXUP_DELL1_MIC_NO_PRESENCE
7603 [ALC274_FIXUP_DELL_AIO_LINEOUT_VERB
] = {
7604 .type
= HDA_FIXUP_PINS
,
7605 .v
.pins
= (const struct hda_pintbl
[]) {
7606 { 0x1b, 0x0401102f },
7610 .chain_id
= ALC274_FIXUP_DELL_BIND_DACS
7612 [ALC298_FIXUP_TPT470_DOCK_FIX
] = {
7613 .type
= HDA_FIXUP_FUNC
,
7614 .v
.func
= alc_fixup_tpt470_dock
,
7616 .chain_id
= ALC293_FIXUP_LENOVO_SPK_NOISE
7618 [ALC298_FIXUP_TPT470_DOCK
] = {
7619 .type
= HDA_FIXUP_FUNC
,
7620 .v
.func
= alc_fixup_tpt470_dacs
,
7622 .chain_id
= ALC298_FIXUP_TPT470_DOCK_FIX
7624 [ALC255_FIXUP_DUMMY_LINEOUT_VERB
] = {
7625 .type
= HDA_FIXUP_PINS
,
7626 .v
.pins
= (const struct hda_pintbl
[]) {
7627 { 0x14, 0x0201101f },
7631 .chain_id
= ALC255_FIXUP_DELL1_MIC_NO_PRESENCE
7633 [ALC255_FIXUP_DELL_HEADSET_MIC
] = {
7634 .type
= HDA_FIXUP_PINS
,
7635 .v
.pins
= (const struct hda_pintbl
[]) {
7636 { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */
7640 .chain_id
= ALC269_FIXUP_HEADSET_MIC
7642 [ALC295_FIXUP_HP_X360
] = {
7643 .type
= HDA_FIXUP_FUNC
,
7644 .v
.func
= alc295_fixup_hp_top_speakers
,
7646 .chain_id
= ALC269_FIXUP_HP_MUTE_LED_MIC3
7648 [ALC221_FIXUP_HP_HEADSET_MIC
] = {
7649 .type
= HDA_FIXUP_PINS
,
7650 .v
.pins
= (const struct hda_pintbl
[]) {
7651 { 0x19, 0x0181313f},
7655 .chain_id
= ALC269_FIXUP_HEADSET_MIC
7657 [ALC285_FIXUP_LENOVO_HEADPHONE_NOISE
] = {
7658 .type
= HDA_FIXUP_FUNC
,
7659 .v
.func
= alc285_fixup_invalidate_dacs
,
7661 .chain_id
= ALC269_FIXUP_THINKPAD_ACPI
7663 [ALC295_FIXUP_HP_AUTO_MUTE
] = {
7664 .type
= HDA_FIXUP_FUNC
,
7665 .v
.func
= alc_fixup_auto_mute_via_amp
,
7667 [ALC286_FIXUP_ACER_AIO_MIC_NO_PRESENCE
] = {
7668 .type
= HDA_FIXUP_PINS
,
7669 .v
.pins
= (const struct hda_pintbl
[]) {
7670 { 0x18, 0x01a1913c }, /* use as headset mic, without its own jack detect */
7674 .chain_id
= ALC269_FIXUP_HEADSET_MIC
7676 [ALC294_FIXUP_ASUS_MIC
] = {
7677 .type
= HDA_FIXUP_PINS
,
7678 .v
.pins
= (const struct hda_pintbl
[]) {
7679 { 0x13, 0x90a60160 }, /* use as internal mic */
7680 { 0x19, 0x04a11120 }, /* use as headset mic, without its own jack detect */
7684 .chain_id
= ALC269_FIXUP_HEADSET_MIC
7686 [ALC294_FIXUP_ASUS_HEADSET_MIC
] = {
7687 .type
= HDA_FIXUP_PINS
,
7688 .v
.pins
= (const struct hda_pintbl
[]) {
7689 { 0x19, 0x01a1103c }, /* use as headset mic */
7693 .chain_id
= ALC269_FIXUP_HEADSET_MIC
7695 [ALC294_FIXUP_ASUS_SPK
] = {
7696 .type
= HDA_FIXUP_VERBS
,
7697 .v
.verbs
= (const struct hda_verb
[]) {
7699 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x40 },
7700 { 0x20, AC_VERB_SET_PROC_COEF
, 0x8800 },
7701 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x0f },
7702 { 0x20, AC_VERB_SET_PROC_COEF
, 0x7774 },
7706 .chain_id
= ALC294_FIXUP_ASUS_HEADSET_MIC
7708 [ALC295_FIXUP_CHROME_BOOK
] = {
7709 .type
= HDA_FIXUP_FUNC
,
7710 .v
.func
= alc295_fixup_chromebook
,
7712 .chain_id
= ALC225_FIXUP_HEADSET_JACK
7714 [ALC225_FIXUP_HEADSET_JACK
] = {
7715 .type
= HDA_FIXUP_FUNC
,
7716 .v
.func
= alc_fixup_headset_jack
,
7718 [ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
] = {
7719 .type
= HDA_FIXUP_PINS
,
7720 .v
.pins
= (const struct hda_pintbl
[]) {
7721 { 0x1a, 0x01a1913c }, /* use as headset mic, without its own jack detect */
7725 .chain_id
= ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC
7727 [ALC285_FIXUP_LENOVO_PC_BEEP_IN_NOISE
] = {
7728 .type
= HDA_FIXUP_VERBS
,
7729 .v
.verbs
= (const struct hda_verb
[]) {
7730 /* Disable PCBEEP-IN passthrough */
7731 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x36 },
7732 { 0x20, AC_VERB_SET_PROC_COEF
, 0x57d7 },
7736 .chain_id
= ALC285_FIXUP_LENOVO_HEADPHONE_NOISE
7738 [ALC255_FIXUP_ACER_HEADSET_MIC
] = {
7739 .type
= HDA_FIXUP_PINS
,
7740 .v
.pins
= (const struct hda_pintbl
[]) {
7741 { 0x19, 0x03a11130 },
7742 { 0x1a, 0x90a60140 }, /* use as internal mic */
7746 .chain_id
= ALC255_FIXUP_HEADSET_MODE_NO_HP_MIC
7748 [ALC225_FIXUP_DELL_WYSE_AIO_MIC_NO_PRESENCE
] = {
7749 .type
= HDA_FIXUP_PINS
,
7750 .v
.pins
= (const struct hda_pintbl
[]) {
7751 { 0x16, 0x01011020 }, /* Rear Line out */
7752 { 0x19, 0x01a1913c }, /* use as Front headset mic, without its own jack detect */
7756 .chain_id
= ALC225_FIXUP_WYSE_AUTO_MUTE
7758 [ALC225_FIXUP_WYSE_AUTO_MUTE
] = {
7759 .type
= HDA_FIXUP_FUNC
,
7760 .v
.func
= alc_fixup_auto_mute_via_amp
,
7762 .chain_id
= ALC225_FIXUP_WYSE_DISABLE_MIC_VREF
7764 [ALC225_FIXUP_WYSE_DISABLE_MIC_VREF
] = {
7765 .type
= HDA_FIXUP_FUNC
,
7766 .v
.func
= alc_fixup_disable_mic_vref
,
7768 .chain_id
= ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC
7770 [ALC286_FIXUP_ACER_AIO_HEADSET_MIC
] = {
7771 .type
= HDA_FIXUP_VERBS
,
7772 .v
.verbs
= (const struct hda_verb
[]) {
7773 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x4f },
7774 { 0x20, AC_VERB_SET_PROC_COEF
, 0x5029 },
7778 .chain_id
= ALC286_FIXUP_ACER_AIO_MIC_NO_PRESENCE
7780 [ALC256_FIXUP_ASUS_HEADSET_MIC
] = {
7781 .type
= HDA_FIXUP_PINS
,
7782 .v
.pins
= (const struct hda_pintbl
[]) {
7783 { 0x19, 0x03a11020 }, /* headset mic with jack detect */
7787 .chain_id
= ALC256_FIXUP_ASUS_HEADSET_MODE
7789 [ALC256_FIXUP_ASUS_MIC_NO_PRESENCE
] = {
7790 .type
= HDA_FIXUP_PINS
,
7791 .v
.pins
= (const struct hda_pintbl
[]) {
7792 { 0x19, 0x04a11120 }, /* use as headset mic, without its own jack detect */
7796 .chain_id
= ALC256_FIXUP_ASUS_HEADSET_MODE
7798 [ALC299_FIXUP_PREDATOR_SPK
] = {
7799 .type
= HDA_FIXUP_PINS
,
7800 .v
.pins
= (const struct hda_pintbl
[]) {
7801 { 0x21, 0x90170150 }, /* use as headset mic, without its own jack detect */
7805 [ALC256_FIXUP_MEDION_HEADSET_NO_PRESENCE
] = {
7806 .type
= HDA_FIXUP_PINS
,
7807 .v
.pins
= (const struct hda_pintbl
[]) {
7808 { 0x19, 0x04a11040 },
7809 { 0x21, 0x04211020 },
7813 .chain_id
= ALC256_FIXUP_ASUS_HEADSET_MODE
7815 [ALC289_FIXUP_DELL_SPK2
] = {
7816 .type
= HDA_FIXUP_PINS
,
7817 .v
.pins
= (const struct hda_pintbl
[]) {
7818 { 0x17, 0x90170130 }, /* bass spk */
7822 .chain_id
= ALC269_FIXUP_DELL4_MIC_NO_PRESENCE
7824 [ALC289_FIXUP_DUAL_SPK
] = {
7825 .type
= HDA_FIXUP_FUNC
,
7826 .v
.func
= alc285_fixup_speaker2_to_dac1
,
7828 .chain_id
= ALC289_FIXUP_DELL_SPK2
7830 [ALC294_FIXUP_SPK2_TO_DAC1
] = {
7831 .type
= HDA_FIXUP_FUNC
,
7832 .v
.func
= alc285_fixup_speaker2_to_dac1
,
7834 .chain_id
= ALC294_FIXUP_ASUS_HEADSET_MIC
7836 [ALC294_FIXUP_ASUS_DUAL_SPK
] = {
7837 .type
= HDA_FIXUP_FUNC
,
7838 /* The GPIO must be pulled to initialize the AMP */
7839 .v
.func
= alc_fixup_gpio4
,
7841 .chain_id
= ALC294_FIXUP_SPK2_TO_DAC1
7843 [ALC285_FIXUP_THINKPAD_X1_GEN7
] = {
7844 .type
= HDA_FIXUP_FUNC
,
7845 .v
.func
= alc285_fixup_thinkpad_x1_gen7
,
7847 .chain_id
= ALC269_FIXUP_THINKPAD_ACPI
7849 [ALC285_FIXUP_THINKPAD_HEADSET_JACK
] = {
7850 .type
= HDA_FIXUP_FUNC
,
7851 .v
.func
= alc_fixup_headset_jack
,
7853 .chain_id
= ALC285_FIXUP_THINKPAD_X1_GEN7
7855 [ALC294_FIXUP_ASUS_HPE
] = {
7856 .type
= HDA_FIXUP_VERBS
,
7857 .v
.verbs
= (const struct hda_verb
[]) {
7859 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x0f },
7860 { 0x20, AC_VERB_SET_PROC_COEF
, 0x7774 },
7864 .chain_id
= ALC294_FIXUP_ASUS_HEADSET_MIC
7866 [ALC294_FIXUP_ASUS_GX502_PINS
] = {
7867 .type
= HDA_FIXUP_PINS
,
7868 .v
.pins
= (const struct hda_pintbl
[]) {
7869 { 0x19, 0x03a11050 }, /* front HP mic */
7870 { 0x1a, 0x01a11830 }, /* rear external mic */
7871 { 0x21, 0x03211020 }, /* front HP out */
7875 .chain_id
= ALC294_FIXUP_ASUS_GX502_VERBS
7877 [ALC294_FIXUP_ASUS_GX502_VERBS
] = {
7878 .type
= HDA_FIXUP_VERBS
,
7879 .v
.verbs
= (const struct hda_verb
[]) {
7880 /* set 0x15 to HP-OUT ctrl */
7881 { 0x15, AC_VERB_SET_PIN_WIDGET_CONTROL
, 0xc0 },
7882 /* unmute the 0x15 amp */
7883 { 0x15, AC_VERB_SET_AMP_GAIN_MUTE
, 0xb000 },
7887 .chain_id
= ALC294_FIXUP_ASUS_GX502_HP
7889 [ALC294_FIXUP_ASUS_GX502_HP
] = {
7890 .type
= HDA_FIXUP_FUNC
,
7891 .v
.func
= alc294_fixup_gx502_hp
,
7893 [ALC294_FIXUP_ASUS_GU502_PINS
] = {
7894 .type
= HDA_FIXUP_PINS
,
7895 .v
.pins
= (const struct hda_pintbl
[]) {
7896 { 0x19, 0x01a11050 }, /* rear HP mic */
7897 { 0x1a, 0x01a11830 }, /* rear external mic */
7898 { 0x21, 0x012110f0 }, /* rear HP out */
7902 .chain_id
= ALC294_FIXUP_ASUS_GU502_VERBS
7904 [ALC294_FIXUP_ASUS_GU502_VERBS
] = {
7905 .type
= HDA_FIXUP_VERBS
,
7906 .v
.verbs
= (const struct hda_verb
[]) {
7907 /* set 0x15 to HP-OUT ctrl */
7908 { 0x15, AC_VERB_SET_PIN_WIDGET_CONTROL
, 0xc0 },
7909 /* unmute the 0x15 amp */
7910 { 0x15, AC_VERB_SET_AMP_GAIN_MUTE
, 0xb000 },
7911 /* set 0x1b to HP-OUT */
7912 { 0x1b, AC_VERB_SET_PIN_WIDGET_CONTROL
, 0x24 },
7916 .chain_id
= ALC294_FIXUP_ASUS_GU502_HP
7918 [ALC294_FIXUP_ASUS_GU502_HP
] = {
7919 .type
= HDA_FIXUP_FUNC
,
7920 .v
.func
= alc294_fixup_gu502_hp
,
7922 [ALC294_FIXUP_ASUS_COEF_1B
] = {
7923 .type
= HDA_FIXUP_VERBS
,
7924 .v
.verbs
= (const struct hda_verb
[]) {
7925 /* Set bit 10 to correct noisy output after reboot from
7926 * Windows 10 (due to pop noise reduction?)
7928 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x1b },
7929 { 0x20, AC_VERB_SET_PROC_COEF
, 0x4e4b },
7933 .chain_id
= ALC289_FIXUP_ASUS_GA401
,
7935 [ALC285_FIXUP_HP_GPIO_LED
] = {
7936 .type
= HDA_FIXUP_FUNC
,
7937 .v
.func
= alc285_fixup_hp_gpio_led
,
7939 [ALC285_FIXUP_HP_MUTE_LED
] = {
7940 .type
= HDA_FIXUP_FUNC
,
7941 .v
.func
= alc285_fixup_hp_mute_led
,
7943 [ALC236_FIXUP_HP_GPIO_LED
] = {
7944 .type
= HDA_FIXUP_FUNC
,
7945 .v
.func
= alc236_fixup_hp_gpio_led
,
7947 [ALC236_FIXUP_HP_MUTE_LED
] = {
7948 .type
= HDA_FIXUP_FUNC
,
7949 .v
.func
= alc236_fixup_hp_mute_led
,
7951 [ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF
] = {
7952 .type
= HDA_FIXUP_FUNC
,
7953 .v
.func
= alc236_fixup_hp_mute_led_micmute_vref
,
7955 [ALC298_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET
] = {
7956 .type
= HDA_FIXUP_VERBS
,
7957 .v
.verbs
= (const struct hda_verb
[]) {
7958 { 0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL
, 0xc5 },
7962 [ALC295_FIXUP_ASUS_MIC_NO_PRESENCE
] = {
7963 .type
= HDA_FIXUP_PINS
,
7964 .v
.pins
= (const struct hda_pintbl
[]) {
7965 { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */
7969 .chain_id
= ALC269_FIXUP_HEADSET_MODE
7971 [ALC269VC_FIXUP_ACER_VCOPPERBOX_PINS
] = {
7972 .type
= HDA_FIXUP_PINS
,
7973 .v
.pins
= (const struct hda_pintbl
[]) {
7974 { 0x14, 0x90100120 }, /* use as internal speaker */
7975 { 0x18, 0x02a111f0 }, /* use as headset mic, without its own jack detect */
7976 { 0x1a, 0x01011020 }, /* use as line out */
7980 .chain_id
= ALC269_FIXUP_HEADSET_MIC
7982 [ALC269VC_FIXUP_ACER_HEADSET_MIC
] = {
7983 .type
= HDA_FIXUP_PINS
,
7984 .v
.pins
= (const struct hda_pintbl
[]) {
7985 { 0x18, 0x02a11030 }, /* use as headset mic */
7989 .chain_id
= ALC269_FIXUP_HEADSET_MIC
7991 [ALC269VC_FIXUP_ACER_MIC_NO_PRESENCE
] = {
7992 .type
= HDA_FIXUP_PINS
,
7993 .v
.pins
= (const struct hda_pintbl
[]) {
7994 { 0x18, 0x01a11130 }, /* use as headset mic, without its own jack detect */
7998 .chain_id
= ALC269_FIXUP_HEADSET_MIC
8000 [ALC289_FIXUP_ASUS_GA401
] = {
8001 .type
= HDA_FIXUP_FUNC
,
8002 .v
.func
= alc289_fixup_asus_ga401
,
8004 .chain_id
= ALC289_FIXUP_ASUS_GA502
,
8006 [ALC289_FIXUP_ASUS_GA502
] = {
8007 .type
= HDA_FIXUP_PINS
,
8008 .v
.pins
= (const struct hda_pintbl
[]) {
8009 { 0x19, 0x03a11020 }, /* headset mic with jack detect */
8013 [ALC256_FIXUP_ACER_MIC_NO_PRESENCE
] = {
8014 .type
= HDA_FIXUP_PINS
,
8015 .v
.pins
= (const struct hda_pintbl
[]) {
8016 { 0x19, 0x02a11120 }, /* use as headset mic, without its own jack detect */
8020 .chain_id
= ALC256_FIXUP_ASUS_HEADSET_MODE
8022 [ALC285_FIXUP_HP_GPIO_AMP_INIT
] = {
8023 .type
= HDA_FIXUP_FUNC
,
8024 .v
.func
= alc285_fixup_hp_gpio_amp_init
,
8026 .chain_id
= ALC285_FIXUP_HP_GPIO_LED
8028 [ALC269_FIXUP_CZC_B20
] = {
8029 .type
= HDA_FIXUP_PINS
,
8030 .v
.pins
= (const struct hda_pintbl
[]) {
8031 { 0x12, 0x411111f0 },
8032 { 0x14, 0x90170110 }, /* speaker */
8033 { 0x15, 0x032f1020 }, /* HP out */
8034 { 0x17, 0x411111f0 },
8035 { 0x18, 0x03ab1040 }, /* mic */
8036 { 0x19, 0xb7a7013f },
8037 { 0x1a, 0x0181305f },
8038 { 0x1b, 0x411111f0 },
8039 { 0x1d, 0x411111f0 },
8040 { 0x1e, 0x411111f0 },
8043 .chain_id
= ALC269_FIXUP_DMIC
,
8045 [ALC269_FIXUP_CZC_TMI
] = {
8046 .type
= HDA_FIXUP_PINS
,
8047 .v
.pins
= (const struct hda_pintbl
[]) {
8048 { 0x12, 0x4000c000 },
8049 { 0x14, 0x90170110 }, /* speaker */
8050 { 0x15, 0x0421401f }, /* HP out */
8051 { 0x17, 0x411111f0 },
8052 { 0x18, 0x04a19020 }, /* mic */
8053 { 0x19, 0x411111f0 },
8054 { 0x1a, 0x411111f0 },
8055 { 0x1b, 0x411111f0 },
8056 { 0x1d, 0x40448505 },
8057 { 0x1e, 0x411111f0 },
8058 { 0x20, 0x8000ffff },
8061 .chain_id
= ALC269_FIXUP_DMIC
,
8063 [ALC269_FIXUP_CZC_L101
] = {
8064 .type
= HDA_FIXUP_PINS
,
8065 .v
.pins
= (const struct hda_pintbl
[]) {
8066 { 0x12, 0x40000000 },
8067 { 0x14, 0x01014010 }, /* speaker */
8068 { 0x15, 0x411111f0 }, /* HP out */
8069 { 0x16, 0x411111f0 },
8070 { 0x18, 0x01a19020 }, /* mic */
8071 { 0x19, 0x02a19021 },
8072 { 0x1a, 0x0181302f },
8073 { 0x1b, 0x0221401f },
8074 { 0x1c, 0x411111f0 },
8075 { 0x1d, 0x4044c601 },
8076 { 0x1e, 0x411111f0 },
8079 .chain_id
= ALC269_FIXUP_DMIC
,
8081 [ALC269_FIXUP_LEMOTE_A1802
] = {
8082 .type
= HDA_FIXUP_PINS
,
8083 .v
.pins
= (const struct hda_pintbl
[]) {
8084 { 0x12, 0x40000000 },
8085 { 0x14, 0x90170110 }, /* speaker */
8086 { 0x17, 0x411111f0 },
8087 { 0x18, 0x03a19040 }, /* mic1 */
8088 { 0x19, 0x90a70130 }, /* mic2 */
8089 { 0x1a, 0x411111f0 },
8090 { 0x1b, 0x411111f0 },
8091 { 0x1d, 0x40489d2d },
8092 { 0x1e, 0x411111f0 },
8093 { 0x20, 0x0003ffff },
8094 { 0x21, 0x03214020 },
8097 .chain_id
= ALC269_FIXUP_DMIC
,
8099 [ALC269_FIXUP_LEMOTE_A190X
] = {
8100 .type
= HDA_FIXUP_PINS
,
8101 .v
.pins
= (const struct hda_pintbl
[]) {
8102 { 0x14, 0x99130110 }, /* speaker */
8103 { 0x15, 0x0121401f }, /* HP out */
8104 { 0x18, 0x01a19c20 }, /* rear mic */
8105 { 0x19, 0x99a3092f }, /* front mic */
8106 { 0x1b, 0x0201401f }, /* front lineout */
8109 .chain_id
= ALC269_FIXUP_DMIC
,
8111 [ALC256_FIXUP_INTEL_NUC8_RUGGED
] = {
8112 .type
= HDA_FIXUP_PINS
,
8113 .v
.pins
= (const struct hda_pintbl
[]) {
8114 { 0x1b, 0x01a1913c }, /* use as headset mic, without its own jack detect */
8118 .chain_id
= ALC269_FIXUP_HEADSET_MODE
8120 [ALC256_FIXUP_INTEL_NUC10
] = {
8121 .type
= HDA_FIXUP_PINS
,
8122 .v
.pins
= (const struct hda_pintbl
[]) {
8123 { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */
8127 .chain_id
= ALC269_FIXUP_HEADSET_MODE
8129 [ALC255_FIXUP_XIAOMI_HEADSET_MIC
] = {
8130 .type
= HDA_FIXUP_VERBS
,
8131 .v
.verbs
= (const struct hda_verb
[]) {
8132 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x45 },
8133 { 0x20, AC_VERB_SET_PROC_COEF
, 0x5089 },
8137 .chain_id
= ALC289_FIXUP_ASUS_GA502
8139 [ALC274_FIXUP_HP_MIC
] = {
8140 .type
= HDA_FIXUP_VERBS
,
8141 .v
.verbs
= (const struct hda_verb
[]) {
8142 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x45 },
8143 { 0x20, AC_VERB_SET_PROC_COEF
, 0x5089 },
8147 [ALC274_FIXUP_HP_HEADSET_MIC
] = {
8148 .type
= HDA_FIXUP_FUNC
,
8149 .v
.func
= alc274_fixup_hp_headset_mic
,
8151 .chain_id
= ALC274_FIXUP_HP_MIC
8153 [ALC274_FIXUP_HP_ENVY_GPIO
] = {
8154 .type
= HDA_FIXUP_FUNC
,
8155 .v
.func
= alc274_fixup_hp_envy_gpio
,
8157 [ALC256_FIXUP_ASUS_HPE
] = {
8158 .type
= HDA_FIXUP_VERBS
,
8159 .v
.verbs
= (const struct hda_verb
[]) {
8161 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x0f },
8162 { 0x20, AC_VERB_SET_PROC_COEF
, 0x7778 },
8166 .chain_id
= ALC294_FIXUP_ASUS_HEADSET_MIC
8168 [ALC285_FIXUP_THINKPAD_NO_BASS_SPK_HEADSET_JACK
] = {
8169 .type
= HDA_FIXUP_FUNC
,
8170 .v
.func
= alc_fixup_headset_jack
,
8172 .chain_id
= ALC269_FIXUP_THINKPAD_ACPI
8174 [ALC287_FIXUP_HP_GPIO_LED
] = {
8175 .type
= HDA_FIXUP_FUNC
,
8176 .v
.func
= alc287_fixup_hp_gpio_led
,
8178 [ALC256_FIXUP_HP_HEADSET_MIC
] = {
8179 .type
= HDA_FIXUP_FUNC
,
8180 .v
.func
= alc274_fixup_hp_headset_mic
,
8182 [ALC236_FIXUP_DELL_AIO_HEADSET_MIC
] = {
8183 .type
= HDA_FIXUP_FUNC
,
8184 .v
.func
= alc_fixup_no_int_mic
,
8186 .chain_id
= ALC255_FIXUP_DELL1_MIC_NO_PRESENCE
8188 [ALC282_FIXUP_ACER_DISABLE_LINEOUT
] = {
8189 .type
= HDA_FIXUP_PINS
,
8190 .v
.pins
= (const struct hda_pintbl
[]) {
8191 { 0x1b, 0x411111f0 },
8192 { 0x18, 0x01a1913c }, /* use as headset mic, without its own jack detect */
8196 .chain_id
= ALC269_FIXUP_HEADSET_MODE
8198 [ALC255_FIXUP_ACER_LIMIT_INT_MIC_BOOST
] = {
8199 .type
= HDA_FIXUP_FUNC
,
8200 .v
.func
= alc269_fixup_limit_int_mic_boost
,
8202 .chain_id
= ALC255_FIXUP_ACER_MIC_NO_PRESENCE
,
8204 [ALC256_FIXUP_ACER_HEADSET_MIC
] = {
8205 .type
= HDA_FIXUP_PINS
,
8206 .v
.pins
= (const struct hda_pintbl
[]) {
8207 { 0x19, 0x02a1113c }, /* use as headset mic, without its own jack detect */
8208 { 0x1a, 0x90a1092f }, /* use as internal mic */
8212 .chain_id
= ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC
8214 [ALC285_FIXUP_IDEAPAD_S740_COEF
] = {
8215 .type
= HDA_FIXUP_FUNC
,
8216 .v
.func
= alc285_fixup_ideapad_s740_coef
,
8218 .chain_id
= ALC269_FIXUP_THINKPAD_ACPI
,
8220 [ALC285_FIXUP_HP_LIMIT_INT_MIC_BOOST
] = {
8221 .type
= HDA_FIXUP_FUNC
,
8222 .v
.func
= alc269_fixup_limit_int_mic_boost
,
8224 .chain_id
= ALC285_FIXUP_HP_MUTE_LED
,
8226 [ALC295_FIXUP_ASUS_DACS
] = {
8227 .type
= HDA_FIXUP_FUNC
,
8228 .v
.func
= alc295_fixup_asus_dacs
,
8230 [ALC295_FIXUP_HP_OMEN
] = {
8231 .type
= HDA_FIXUP_PINS
,
8232 .v
.pins
= (const struct hda_pintbl
[]) {
8233 { 0x12, 0xb7a60130 },
8234 { 0x13, 0x40000000 },
8235 { 0x14, 0x411111f0 },
8236 { 0x16, 0x411111f0 },
8237 { 0x17, 0x90170110 },
8238 { 0x18, 0x411111f0 },
8239 { 0x19, 0x02a11030 },
8240 { 0x1a, 0x411111f0 },
8241 { 0x1b, 0x04a19030 },
8242 { 0x1d, 0x40600001 },
8243 { 0x1e, 0x411111f0 },
8244 { 0x21, 0x03211020 },
8248 .chain_id
= ALC269_FIXUP_HP_LINE1_MIC1_LED
,
8250 [ALC285_FIXUP_HP_SPECTRE_X360
] = {
8251 .type
= HDA_FIXUP_FUNC
,
8252 .v
.func
= alc285_fixup_hp_spectre_x360
,
8254 [ALC287_FIXUP_IDEAPAD_BASS_SPK_AMP
] = {
8255 .type
= HDA_FIXUP_FUNC
,
8256 .v
.func
= alc285_fixup_ideapad_s740_coef
,
8258 .chain_id
= ALC285_FIXUP_THINKPAD_HEADSET_JACK
,
8260 [ALC623_FIXUP_LENOVO_THINKSTATION_P340
] = {
8261 .type
= HDA_FIXUP_FUNC
,
8262 .v
.func
= alc_fixup_no_shutup
,
8264 .chain_id
= ALC283_FIXUP_HEADSET_MIC
,
8266 [ALC255_FIXUP_ACER_HEADPHONE_AND_MIC
] = {
8267 .type
= HDA_FIXUP_PINS
,
8268 .v
.pins
= (const struct hda_pintbl
[]) {
8269 { 0x21, 0x03211030 }, /* Change the Headphone location to Left */
8273 .chain_id
= ALC255_FIXUP_XIAOMI_HEADSET_MIC
8275 [ALC236_FIXUP_HP_LIMIT_INT_MIC_BOOST
] = {
8276 .type
= HDA_FIXUP_FUNC
,
8277 .v
.func
= alc269_fixup_limit_int_mic_boost
,
8279 .chain_id
= ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF
,
8281 [ALC287_FIXUP_LEGION_15IMHG05_SPEAKERS
] = {
8282 .type
= HDA_FIXUP_VERBS
,
8283 //.v.verbs = legion_15imhg05_coefs,
8284 .v
.verbs
= (const struct hda_verb
[]) {
8285 // set left speaker Legion 7i.
8286 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x24 },
8287 { 0x20, AC_VERB_SET_PROC_COEF
, 0x41 },
8289 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x26 },
8290 { 0x20, AC_VERB_SET_PROC_COEF
, 0xc },
8291 { 0x20, AC_VERB_SET_PROC_COEF
, 0x0 },
8292 { 0x20, AC_VERB_SET_PROC_COEF
, 0x1a },
8293 { 0x20, AC_VERB_SET_PROC_COEF
, 0xb020 },
8295 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x26 },
8296 { 0x20, AC_VERB_SET_PROC_COEF
, 0x2 },
8297 { 0x20, AC_VERB_SET_PROC_COEF
, 0x0 },
8298 { 0x20, AC_VERB_SET_PROC_COEF
, 0x0 },
8299 { 0x20, AC_VERB_SET_PROC_COEF
, 0xb020 },
8301 // set right speaker Legion 7i.
8302 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x24 },
8303 { 0x20, AC_VERB_SET_PROC_COEF
, 0x42 },
8305 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x26 },
8306 { 0x20, AC_VERB_SET_PROC_COEF
, 0xc },
8307 { 0x20, AC_VERB_SET_PROC_COEF
, 0x0 },
8308 { 0x20, AC_VERB_SET_PROC_COEF
, 0x2a },
8309 { 0x20, AC_VERB_SET_PROC_COEF
, 0xb020 },
8311 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x26 },
8312 { 0x20, AC_VERB_SET_PROC_COEF
, 0x2 },
8313 { 0x20, AC_VERB_SET_PROC_COEF
, 0x0 },
8314 { 0x20, AC_VERB_SET_PROC_COEF
, 0x0 },
8315 { 0x20, AC_VERB_SET_PROC_COEF
, 0xb020 },
8319 .chain_id
= ALC287_FIXUP_LEGION_15IMHG05_AUTOMUTE
,
8321 [ALC287_FIXUP_LEGION_15IMHG05_AUTOMUTE
] = {
8322 .type
= HDA_FIXUP_FUNC
,
8323 .v
.func
= alc287_fixup_legion_15imhg05_speakers
,
8325 .chain_id
= ALC269_FIXUP_HEADSET_MODE
,
8327 [ALC287_FIXUP_YOGA7_14ITL_SPEAKERS
] = {
8328 .type
= HDA_FIXUP_VERBS
,
8329 .v
.verbs
= (const struct hda_verb
[]) {
8330 // set left speaker Yoga 7i.
8331 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x24 },
8332 { 0x20, AC_VERB_SET_PROC_COEF
, 0x41 },
8334 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x26 },
8335 { 0x20, AC_VERB_SET_PROC_COEF
, 0xc },
8336 { 0x20, AC_VERB_SET_PROC_COEF
, 0x0 },
8337 { 0x20, AC_VERB_SET_PROC_COEF
, 0x1a },
8338 { 0x20, AC_VERB_SET_PROC_COEF
, 0xb020 },
8340 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x26 },
8341 { 0x20, AC_VERB_SET_PROC_COEF
, 0x2 },
8342 { 0x20, AC_VERB_SET_PROC_COEF
, 0x0 },
8343 { 0x20, AC_VERB_SET_PROC_COEF
, 0x0 },
8344 { 0x20, AC_VERB_SET_PROC_COEF
, 0xb020 },
8346 // set right speaker Yoga 7i.
8347 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x24 },
8348 { 0x20, AC_VERB_SET_PROC_COEF
, 0x46 },
8350 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x26 },
8351 { 0x20, AC_VERB_SET_PROC_COEF
, 0xc },
8352 { 0x20, AC_VERB_SET_PROC_COEF
, 0x0 },
8353 { 0x20, AC_VERB_SET_PROC_COEF
, 0x2a },
8354 { 0x20, AC_VERB_SET_PROC_COEF
, 0xb020 },
8356 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x26 },
8357 { 0x20, AC_VERB_SET_PROC_COEF
, 0x2 },
8358 { 0x20, AC_VERB_SET_PROC_COEF
, 0x0 },
8359 { 0x20, AC_VERB_SET_PROC_COEF
, 0x0 },
8360 { 0x20, AC_VERB_SET_PROC_COEF
, 0xb020 },
8364 .chain_id
= ALC269_FIXUP_HEADSET_MODE
,
8366 [ALC287_FIXUP_13S_GEN2_SPEAKERS
] = {
8367 .type
= HDA_FIXUP_VERBS
,
8368 .v
.verbs
= (const struct hda_verb
[]) {
8369 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x24 },
8370 { 0x20, AC_VERB_SET_PROC_COEF
, 0x41 },
8371 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x26 },
8372 { 0x20, AC_VERB_SET_PROC_COEF
, 0x2 },
8373 { 0x20, AC_VERB_SET_PROC_COEF
, 0x0 },
8374 { 0x20, AC_VERB_SET_PROC_COEF
, 0x0 },
8375 { 0x20, AC_VERB_SET_PROC_COEF
, 0xb020 },
8376 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x24 },
8377 { 0x20, AC_VERB_SET_PROC_COEF
, 0x42 },
8378 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x26 },
8379 { 0x20, AC_VERB_SET_PROC_COEF
, 0x2 },
8380 { 0x20, AC_VERB_SET_PROC_COEF
, 0x0 },
8381 { 0x20, AC_VERB_SET_PROC_COEF
, 0x0 },
8382 { 0x20, AC_VERB_SET_PROC_COEF
, 0xb020 },
8386 .chain_id
= ALC269_FIXUP_HEADSET_MODE
,
8388 [ALC256_FIXUP_TONGFANG_RESET_PERSISTENT_SETTINGS
] = {
8389 .type
= HDA_FIXUP_FUNC
,
8390 .v
.func
= alc256_fixup_tongfang_reset_persistent_settings
,
8394 static const struct snd_pci_quirk alc269_fixup_tbl
[] = {
8395 SND_PCI_QUIRK(0x1025, 0x0283, "Acer TravelMate 8371", ALC269_FIXUP_INV_DMIC
),
8396 SND_PCI_QUIRK(0x1025, 0x029b, "Acer 1810TZ", ALC269_FIXUP_INV_DMIC
),
8397 SND_PCI_QUIRK(0x1025, 0x0349, "Acer AOD260", ALC269_FIXUP_INV_DMIC
),
8398 SND_PCI_QUIRK(0x1025, 0x047c, "Acer AC700", ALC269_FIXUP_ACER_AC700
),
8399 SND_PCI_QUIRK(0x1025, 0x072d, "Acer Aspire V5-571G", ALC269_FIXUP_ASPIRE_HEADSET_MIC
),
8400 SND_PCI_QUIRK(0x1025, 0x0740, "Acer AO725", ALC271_FIXUP_HP_GATE_MIC_JACK
),
8401 SND_PCI_QUIRK(0x1025, 0x0742, "Acer AO756", ALC271_FIXUP_HP_GATE_MIC_JACK
),
8402 SND_PCI_QUIRK(0x1025, 0x0762, "Acer Aspire E1-472", ALC271_FIXUP_HP_GATE_MIC_JACK_E1_572
),
8403 SND_PCI_QUIRK(0x1025, 0x0775, "Acer Aspire E1-572", ALC271_FIXUP_HP_GATE_MIC_JACK_E1_572
),
8404 SND_PCI_QUIRK(0x1025, 0x079b, "Acer Aspire V5-573G", ALC282_FIXUP_ASPIRE_V5_PINS
),
8405 SND_PCI_QUIRK(0x1025, 0x080d, "Acer Aspire V5-122P", ALC269_FIXUP_ASPIRE_HEADSET_MIC
),
8406 SND_PCI_QUIRK(0x1025, 0x0840, "Acer Aspire E1", ALC269VB_FIXUP_ASPIRE_E1_COEF
),
8407 SND_PCI_QUIRK(0x1025, 0x101c, "Acer Veriton N2510G", ALC269_FIXUP_LIFEBOOK
),
8408 SND_PCI_QUIRK(0x1025, 0x102b, "Acer Aspire C24-860", ALC286_FIXUP_ACER_AIO_MIC_NO_PRESENCE
),
8409 SND_PCI_QUIRK(0x1025, 0x1065, "Acer Aspire C20-820", ALC269VC_FIXUP_ACER_HEADSET_MIC
),
8410 SND_PCI_QUIRK(0x1025, 0x106d, "Acer Cloudbook 14", ALC283_FIXUP_CHROME_BOOK
),
8411 SND_PCI_QUIRK(0x1025, 0x1094, "Acer Aspire E5-575T", ALC255_FIXUP_ACER_LIMIT_INT_MIC_BOOST
),
8412 SND_PCI_QUIRK(0x1025, 0x1099, "Acer Aspire E5-523G", ALC255_FIXUP_ACER_MIC_NO_PRESENCE
),
8413 SND_PCI_QUIRK(0x1025, 0x110e, "Acer Aspire ES1-432", ALC255_FIXUP_ACER_MIC_NO_PRESENCE
),
8414 SND_PCI_QUIRK(0x1025, 0x1166, "Acer Veriton N4640G", ALC269_FIXUP_LIFEBOOK
),
8415 SND_PCI_QUIRK(0x1025, 0x1167, "Acer Veriton N6640G", ALC269_FIXUP_LIFEBOOK
),
8416 SND_PCI_QUIRK(0x1025, 0x1246, "Acer Predator Helios 500", ALC299_FIXUP_PREDATOR_SPK
),
8417 SND_PCI_QUIRK(0x1025, 0x1247, "Acer vCopperbox", ALC269VC_FIXUP_ACER_VCOPPERBOX_PINS
),
8418 SND_PCI_QUIRK(0x1025, 0x1248, "Acer Veriton N4660G", ALC269VC_FIXUP_ACER_MIC_NO_PRESENCE
),
8419 SND_PCI_QUIRK(0x1025, 0x1269, "Acer SWIFT SF314-54", ALC256_FIXUP_ACER_HEADSET_MIC
),
8420 SND_PCI_QUIRK(0x1025, 0x128f, "Acer Veriton Z6860G", ALC286_FIXUP_ACER_AIO_HEADSET_MIC
),
8421 SND_PCI_QUIRK(0x1025, 0x1290, "Acer Veriton Z4860G", ALC286_FIXUP_ACER_AIO_HEADSET_MIC
),
8422 SND_PCI_QUIRK(0x1025, 0x1291, "Acer Veriton Z4660G", ALC286_FIXUP_ACER_AIO_HEADSET_MIC
),
8423 SND_PCI_QUIRK(0x1025, 0x129c, "Acer SWIFT SF314-55", ALC256_FIXUP_ACER_HEADSET_MIC
),
8424 SND_PCI_QUIRK(0x1025, 0x1300, "Acer SWIFT SF314-56", ALC256_FIXUP_ACER_MIC_NO_PRESENCE
),
8425 SND_PCI_QUIRK(0x1025, 0x1308, "Acer Aspire Z24-890", ALC286_FIXUP_ACER_AIO_HEADSET_MIC
),
8426 SND_PCI_QUIRK(0x1025, 0x132a, "Acer TravelMate B114-21", ALC233_FIXUP_ACER_HEADSET_MIC
),
8427 SND_PCI_QUIRK(0x1025, 0x1330, "Acer TravelMate X514-51T", ALC255_FIXUP_ACER_HEADSET_MIC
),
8428 SND_PCI_QUIRK(0x1025, 0x142b, "Acer Swift SF314-42", ALC255_FIXUP_ACER_MIC_NO_PRESENCE
),
8429 SND_PCI_QUIRK(0x1025, 0x1430, "Acer TravelMate B311R-31", ALC256_FIXUP_ACER_MIC_NO_PRESENCE
),
8430 SND_PCI_QUIRK(0x1025, 0x1466, "Acer Aspire A515-56", ALC255_FIXUP_ACER_HEADPHONE_AND_MIC
),
8431 SND_PCI_QUIRK(0x1028, 0x0470, "Dell M101z", ALC269_FIXUP_DELL_M101Z
),
8432 SND_PCI_QUIRK(0x1028, 0x054b, "Dell XPS one 2710", ALC275_FIXUP_DELL_XPS
),
8433 SND_PCI_QUIRK(0x1028, 0x05bd, "Dell Latitude E6440", ALC292_FIXUP_DELL_E7X
),
8434 SND_PCI_QUIRK(0x1028, 0x05be, "Dell Latitude E6540", ALC292_FIXUP_DELL_E7X
),
8435 SND_PCI_QUIRK(0x1028, 0x05ca, "Dell Latitude E7240", ALC292_FIXUP_DELL_E7X
),
8436 SND_PCI_QUIRK(0x1028, 0x05cb, "Dell Latitude E7440", ALC292_FIXUP_DELL_E7X
),
8437 SND_PCI_QUIRK(0x1028, 0x05da, "Dell Vostro 5460", ALC290_FIXUP_SUBWOOFER
),
8438 SND_PCI_QUIRK(0x1028, 0x05f4, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE
),
8439 SND_PCI_QUIRK(0x1028, 0x05f5, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE
),
8440 SND_PCI_QUIRK(0x1028, 0x05f6, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE
),
8441 SND_PCI_QUIRK(0x1028, 0x0615, "Dell Vostro 5470", ALC290_FIXUP_SUBWOOFER_HSJACK
),
8442 SND_PCI_QUIRK(0x1028, 0x0616, "Dell Vostro 5470", ALC290_FIXUP_SUBWOOFER_HSJACK
),
8443 SND_PCI_QUIRK(0x1028, 0x062c, "Dell Latitude E5550", ALC292_FIXUP_DELL_E7X
),
8444 SND_PCI_QUIRK(0x1028, 0x062e, "Dell Latitude E7450", ALC292_FIXUP_DELL_E7X
),
8445 SND_PCI_QUIRK(0x1028, 0x0638, "Dell Inspiron 5439", ALC290_FIXUP_MONO_SPEAKERS_HSJACK
),
8446 SND_PCI_QUIRK(0x1028, 0x064a, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE
),
8447 SND_PCI_QUIRK(0x1028, 0x064b, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE
),
8448 SND_PCI_QUIRK(0x1028, 0x0665, "Dell XPS 13", ALC288_FIXUP_DELL_XPS_13
),
8449 SND_PCI_QUIRK(0x1028, 0x0669, "Dell Optiplex 9020m", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE
),
8450 SND_PCI_QUIRK(0x1028, 0x069a, "Dell Vostro 5480", ALC290_FIXUP_SUBWOOFER_HSJACK
),
8451 SND_PCI_QUIRK(0x1028, 0x06c7, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE
),
8452 SND_PCI_QUIRK(0x1028, 0x06d9, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE
),
8453 SND_PCI_QUIRK(0x1028, 0x06da, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE
),
8454 SND_PCI_QUIRK(0x1028, 0x06db, "Dell", ALC293_FIXUP_DISABLE_AAMIX_MULTIJACK
),
8455 SND_PCI_QUIRK(0x1028, 0x06dd, "Dell", ALC293_FIXUP_DISABLE_AAMIX_MULTIJACK
),
8456 SND_PCI_QUIRK(0x1028, 0x06de, "Dell", ALC293_FIXUP_DISABLE_AAMIX_MULTIJACK
),
8457 SND_PCI_QUIRK(0x1028, 0x06df, "Dell", ALC293_FIXUP_DISABLE_AAMIX_MULTIJACK
),
8458 SND_PCI_QUIRK(0x1028, 0x06e0, "Dell", ALC293_FIXUP_DISABLE_AAMIX_MULTIJACK
),
8459 SND_PCI_QUIRK(0x1028, 0x0706, "Dell Inspiron 7559", ALC256_FIXUP_DELL_INSPIRON_7559_SUBWOOFER
),
8460 SND_PCI_QUIRK(0x1028, 0x0725, "Dell Inspiron 3162", ALC255_FIXUP_DELL_SPK_NOISE
),
8461 SND_PCI_QUIRK(0x1028, 0x0738, "Dell Precision 5820", ALC269_FIXUP_NO_SHUTUP
),
8462 SND_PCI_QUIRK(0x1028, 0x075c, "Dell XPS 27 7760", ALC298_FIXUP_SPK_VOLUME
),
8463 SND_PCI_QUIRK(0x1028, 0x075d, "Dell AIO", ALC298_FIXUP_SPK_VOLUME
),
8464 SND_PCI_QUIRK(0x1028, 0x0798, "Dell Inspiron 17 7000 Gaming", ALC256_FIXUP_DELL_INSPIRON_7559_SUBWOOFER
),
8465 SND_PCI_QUIRK(0x1028, 0x07b0, "Dell Precision 7520", ALC295_FIXUP_DISABLE_DAC3
),
8466 SND_PCI_QUIRK(0x1028, 0x080c, "Dell WYSE", ALC225_FIXUP_DELL_WYSE_MIC_NO_PRESENCE
),
8467 SND_PCI_QUIRK(0x1028, 0x084b, "Dell", ALC274_FIXUP_DELL_AIO_LINEOUT_VERB
),
8468 SND_PCI_QUIRK(0x1028, 0x084e, "Dell", ALC274_FIXUP_DELL_AIO_LINEOUT_VERB
),
8469 SND_PCI_QUIRK(0x1028, 0x0871, "Dell Precision 3630", ALC255_FIXUP_DELL_HEADSET_MIC
),
8470 SND_PCI_QUIRK(0x1028, 0x0872, "Dell Precision 3630", ALC255_FIXUP_DELL_HEADSET_MIC
),
8471 SND_PCI_QUIRK(0x1028, 0x0873, "Dell Precision 3930", ALC255_FIXUP_DUMMY_LINEOUT_VERB
),
8472 SND_PCI_QUIRK(0x1028, 0x08ad, "Dell WYSE AIO", ALC225_FIXUP_DELL_WYSE_AIO_MIC_NO_PRESENCE
),
8473 SND_PCI_QUIRK(0x1028, 0x08ae, "Dell WYSE NB", ALC225_FIXUP_DELL1_MIC_NO_PRESENCE
),
8474 SND_PCI_QUIRK(0x1028, 0x0935, "Dell", ALC274_FIXUP_DELL_AIO_LINEOUT_VERB
),
8475 SND_PCI_QUIRK(0x1028, 0x097d, "Dell Precision", ALC289_FIXUP_DUAL_SPK
),
8476 SND_PCI_QUIRK(0x1028, 0x097e, "Dell Precision", ALC289_FIXUP_DUAL_SPK
),
8477 SND_PCI_QUIRK(0x1028, 0x098d, "Dell Precision", ALC233_FIXUP_ASUS_MIC_NO_PRESENCE
),
8478 SND_PCI_QUIRK(0x1028, 0x09bf, "Dell Precision", ALC233_FIXUP_ASUS_MIC_NO_PRESENCE
),
8479 SND_PCI_QUIRK(0x1028, 0x0a2e, "Dell", ALC236_FIXUP_DELL_AIO_HEADSET_MIC
),
8480 SND_PCI_QUIRK(0x1028, 0x0a30, "Dell", ALC236_FIXUP_DELL_AIO_HEADSET_MIC
),
8481 SND_PCI_QUIRK(0x1028, 0x0a58, "Dell", ALC255_FIXUP_DELL_HEADSET_MIC
),
8482 SND_PCI_QUIRK(0x1028, 0x0a61, "Dell XPS 15 9510", ALC289_FIXUP_DUAL_SPK
),
8483 SND_PCI_QUIRK(0x1028, 0x0a62, "Dell Precision 5560", ALC289_FIXUP_DUAL_SPK
),
8484 SND_PCI_QUIRK(0x1028, 0x0a9d, "Dell Latitude 5430", ALC269_FIXUP_DELL4_MIC_NO_PRESENCE
),
8485 SND_PCI_QUIRK(0x1028, 0x0a9e, "Dell Latitude 5430", ALC269_FIXUP_DELL4_MIC_NO_PRESENCE
),
8486 SND_PCI_QUIRK(0x1028, 0x164a, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE
),
8487 SND_PCI_QUIRK(0x1028, 0x164b, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE
),
8488 SND_PCI_QUIRK(0x103c, 0x1586, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC2
),
8489 SND_PCI_QUIRK(0x103c, 0x18e6, "HP", ALC269_FIXUP_HP_GPIO_LED
),
8490 SND_PCI_QUIRK(0x103c, 0x218b, "HP", ALC269_FIXUP_LIMIT_INT_MIC_BOOST_MUTE_LED
),
8491 SND_PCI_QUIRK(0x103c, 0x21f9, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1
),
8492 SND_PCI_QUIRK(0x103c, 0x2210, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1
),
8493 SND_PCI_QUIRK(0x103c, 0x2214, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1
),
8494 SND_PCI_QUIRK(0x103c, 0x221b, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED
),
8495 SND_PCI_QUIRK(0x103c, 0x221c, "HP EliteBook 755 G2", ALC280_FIXUP_HP_HEADSET_MIC
),
8496 SND_PCI_QUIRK(0x103c, 0x2221, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED
),
8497 SND_PCI_QUIRK(0x103c, 0x2225, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED
),
8498 SND_PCI_QUIRK(0x103c, 0x2236, "HP", ALC269_FIXUP_HP_LINE1_MIC1_LED
),
8499 SND_PCI_QUIRK(0x103c, 0x2237, "HP", ALC269_FIXUP_HP_LINE1_MIC1_LED
),
8500 SND_PCI_QUIRK(0x103c, 0x2238, "HP", ALC269_FIXUP_HP_LINE1_MIC1_LED
),
8501 SND_PCI_QUIRK(0x103c, 0x2239, "HP", ALC269_FIXUP_HP_LINE1_MIC1_LED
),
8502 SND_PCI_QUIRK(0x103c, 0x224b, "HP", ALC269_FIXUP_HP_LINE1_MIC1_LED
),
8503 SND_PCI_QUIRK(0x103c, 0x2253, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED
),
8504 SND_PCI_QUIRK(0x103c, 0x2254, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED
),
8505 SND_PCI_QUIRK(0x103c, 0x2255, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED
),
8506 SND_PCI_QUIRK(0x103c, 0x2256, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED
),
8507 SND_PCI_QUIRK(0x103c, 0x2257, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED
),
8508 SND_PCI_QUIRK(0x103c, 0x2259, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED
),
8509 SND_PCI_QUIRK(0x103c, 0x225a, "HP", ALC269_FIXUP_HP_DOCK_GPIO_MIC1_LED
),
8510 SND_PCI_QUIRK(0x103c, 0x225f, "HP", ALC280_FIXUP_HP_GPIO2_MIC_HOTKEY
),
8511 SND_PCI_QUIRK(0x103c, 0x2260, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1
),
8512 SND_PCI_QUIRK(0x103c, 0x2263, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1
),
8513 SND_PCI_QUIRK(0x103c, 0x2264, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1
),
8514 SND_PCI_QUIRK(0x103c, 0x2265, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1
),
8515 SND_PCI_QUIRK(0x103c, 0x2268, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1
),
8516 SND_PCI_QUIRK(0x103c, 0x226a, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1
),
8517 SND_PCI_QUIRK(0x103c, 0x226b, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1
),
8518 SND_PCI_QUIRK(0x103c, 0x226e, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1
),
8519 SND_PCI_QUIRK(0x103c, 0x2271, "HP", ALC286_FIXUP_HP_GPIO_LED
),
8520 SND_PCI_QUIRK(0x103c, 0x2272, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED
),
8521 SND_PCI_QUIRK(0x103c, 0x2272, "HP", ALC280_FIXUP_HP_DOCK_PINS
),
8522 SND_PCI_QUIRK(0x103c, 0x2273, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED
),
8523 SND_PCI_QUIRK(0x103c, 0x2273, "HP", ALC280_FIXUP_HP_DOCK_PINS
),
8524 SND_PCI_QUIRK(0x103c, 0x2278, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED
),
8525 SND_PCI_QUIRK(0x103c, 0x227f, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1
),
8526 SND_PCI_QUIRK(0x103c, 0x2282, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1
),
8527 SND_PCI_QUIRK(0x103c, 0x228b, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1
),
8528 SND_PCI_QUIRK(0x103c, 0x228e, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1
),
8529 SND_PCI_QUIRK(0x103c, 0x229e, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1
),
8530 SND_PCI_QUIRK(0x103c, 0x22b2, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1
),
8531 SND_PCI_QUIRK(0x103c, 0x22b7, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1
),
8532 SND_PCI_QUIRK(0x103c, 0x22bf, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1
),
8533 SND_PCI_QUIRK(0x103c, 0x22c4, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1
),
8534 SND_PCI_QUIRK(0x103c, 0x22c5, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1
),
8535 SND_PCI_QUIRK(0x103c, 0x22c7, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1
),
8536 SND_PCI_QUIRK(0x103c, 0x22c8, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1
),
8537 SND_PCI_QUIRK(0x103c, 0x22cf, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1
),
8538 SND_PCI_QUIRK(0x103c, 0x22db, "HP", ALC280_FIXUP_HP_9480M
),
8539 SND_PCI_QUIRK(0x103c, 0x22dc, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED
),
8540 SND_PCI_QUIRK(0x103c, 0x22fb, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED
),
8541 SND_PCI_QUIRK(0x103c, 0x2334, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1
),
8542 SND_PCI_QUIRK(0x103c, 0x2335, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1
),
8543 SND_PCI_QUIRK(0x103c, 0x2336, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1
),
8544 SND_PCI_QUIRK(0x103c, 0x2337, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1
),
8545 SND_PCI_QUIRK(0x103c, 0x802e, "HP Z240 SFF", ALC221_FIXUP_HP_MIC_NO_PRESENCE
),
8546 SND_PCI_QUIRK(0x103c, 0x802f, "HP Z240", ALC221_FIXUP_HP_MIC_NO_PRESENCE
),
8547 SND_PCI_QUIRK(0x103c, 0x8077, "HP", ALC256_FIXUP_HP_HEADSET_MIC
),
8548 SND_PCI_QUIRK(0x103c, 0x8158, "HP", ALC256_FIXUP_HP_HEADSET_MIC
),
8549 SND_PCI_QUIRK(0x103c, 0x820d, "HP Pavilion 15", ALC269_FIXUP_HP_MUTE_LED_MIC3
),
8550 SND_PCI_QUIRK(0x103c, 0x8256, "HP", ALC221_FIXUP_HP_FRONT_MIC
),
8551 SND_PCI_QUIRK(0x103c, 0x827e, "HP x360", ALC295_FIXUP_HP_X360
),
8552 SND_PCI_QUIRK(0x103c, 0x827f, "HP x360", ALC269_FIXUP_HP_MUTE_LED_MIC3
),
8553 SND_PCI_QUIRK(0x103c, 0x82bf, "HP G3 mini", ALC221_FIXUP_HP_MIC_NO_PRESENCE
),
8554 SND_PCI_QUIRK(0x103c, 0x82c0, "HP G3 mini premium", ALC221_FIXUP_HP_MIC_NO_PRESENCE
),
8555 SND_PCI_QUIRK(0x103c, 0x83b9, "HP Spectre x360", ALC269_FIXUP_HP_MUTE_LED_MIC3
),
8556 SND_PCI_QUIRK(0x103c, 0x841c, "HP Pavilion 15-CK0xx", ALC269_FIXUP_HP_MUTE_LED_MIC3
),
8557 SND_PCI_QUIRK(0x103c, 0x8497, "HP Envy x360", ALC269_FIXUP_HP_MUTE_LED_MIC3
),
8558 SND_PCI_QUIRK(0x103c, 0x84da, "HP OMEN dc0019-ur", ALC295_FIXUP_HP_OMEN
),
8559 SND_PCI_QUIRK(0x103c, 0x84e7, "HP Pavilion 15", ALC269_FIXUP_HP_MUTE_LED_MIC3
),
8560 SND_PCI_QUIRK(0x103c, 0x8519, "HP Spectre x360 15-df0xxx", ALC285_FIXUP_HP_SPECTRE_X360
),
8561 SND_PCI_QUIRK(0x103c, 0x861f, "HP Elite Dragonfly G1", ALC285_FIXUP_HP_GPIO_AMP_INIT
),
8562 SND_PCI_QUIRK(0x103c, 0x869d, "HP", ALC236_FIXUP_HP_MUTE_LED
),
8563 SND_PCI_QUIRK(0x103c, 0x86c7, "HP Envy AiO 32", ALC274_FIXUP_HP_ENVY_GPIO
),
8564 SND_PCI_QUIRK(0x103c, 0x8716, "HP Elite Dragonfly G2 Notebook PC", ALC285_FIXUP_HP_GPIO_AMP_INIT
),
8565 SND_PCI_QUIRK(0x103c, 0x8720, "HP EliteBook x360 1040 G8 Notebook PC", ALC285_FIXUP_HP_GPIO_AMP_INIT
),
8566 SND_PCI_QUIRK(0x103c, 0x8724, "HP EliteBook 850 G7", ALC285_FIXUP_HP_GPIO_LED
),
8567 SND_PCI_QUIRK(0x103c, 0x8729, "HP", ALC285_FIXUP_HP_GPIO_LED
),
8568 SND_PCI_QUIRK(0x103c, 0x8730, "HP ProBook 445 G7", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF
),
8569 SND_PCI_QUIRK(0x103c, 0x8736, "HP", ALC285_FIXUP_HP_GPIO_AMP_INIT
),
8570 SND_PCI_QUIRK(0x103c, 0x8760, "HP", ALC285_FIXUP_HP_MUTE_LED
),
8571 SND_PCI_QUIRK(0x103c, 0x877a, "HP", ALC285_FIXUP_HP_MUTE_LED
),
8572 SND_PCI_QUIRK(0x103c, 0x877d, "HP", ALC236_FIXUP_HP_MUTE_LED
),
8573 SND_PCI_QUIRK(0x103c, 0x8780, "HP ZBook Fury 17 G7 Mobile Workstation",
8574 ALC285_FIXUP_HP_GPIO_AMP_INIT
),
8575 SND_PCI_QUIRK(0x103c, 0x8783, "HP ZBook Fury 15 G7 Mobile Workstation",
8576 ALC285_FIXUP_HP_GPIO_AMP_INIT
),
8577 SND_PCI_QUIRK(0x103c, 0x87c8, "HP", ALC287_FIXUP_HP_GPIO_LED
),
8578 SND_PCI_QUIRK(0x103c, 0x87e5, "HP ProBook 440 G8 Notebook PC", ALC236_FIXUP_HP_GPIO_LED
),
8579 SND_PCI_QUIRK(0x103c, 0x87e7, "HP ProBook 450 G8 Notebook PC", ALC236_FIXUP_HP_GPIO_LED
),
8580 SND_PCI_QUIRK(0x103c, 0x87f1, "HP ProBook 630 G8 Notebook PC", ALC236_FIXUP_HP_GPIO_LED
),
8581 SND_PCI_QUIRK(0x103c, 0x87f2, "HP ProBook 640 G8 Notebook PC", ALC236_FIXUP_HP_GPIO_LED
),
8582 SND_PCI_QUIRK(0x103c, 0x87f4, "HP", ALC287_FIXUP_HP_GPIO_LED
),
8583 SND_PCI_QUIRK(0x103c, 0x87f5, "HP", ALC287_FIXUP_HP_GPIO_LED
),
8584 SND_PCI_QUIRK(0x103c, 0x87f6, "HP Spectre x360 14", ALC245_FIXUP_HP_X360_AMP
),
8585 SND_PCI_QUIRK(0x103c, 0x87f7, "HP Spectre x360 14", ALC245_FIXUP_HP_X360_AMP
),
8586 SND_PCI_QUIRK(0x103c, 0x8805, "HP ProBook 650 G8 Notebook PC", ALC236_FIXUP_HP_GPIO_LED
),
8587 SND_PCI_QUIRK(0x103c, 0x880d, "HP EliteBook 830 G8 Notebook PC", ALC285_FIXUP_HP_GPIO_LED
),
8588 SND_PCI_QUIRK(0x103c, 0x8846, "HP EliteBook 850 G8 Notebook PC", ALC285_FIXUP_HP_GPIO_LED
),
8589 SND_PCI_QUIRK(0x103c, 0x8847, "HP EliteBook x360 830 G8 Notebook PC", ALC285_FIXUP_HP_GPIO_LED
),
8590 SND_PCI_QUIRK(0x103c, 0x884b, "HP EliteBook 840 Aero G8 Notebook PC", ALC285_FIXUP_HP_GPIO_LED
),
8591 SND_PCI_QUIRK(0x103c, 0x884c, "HP EliteBook 840 G8 Notebook PC", ALC285_FIXUP_HP_GPIO_LED
),
8592 SND_PCI_QUIRK(0x103c, 0x8862, "HP ProBook 445 G8 Notebook PC", ALC236_FIXUP_HP_LIMIT_INT_MIC_BOOST
),
8593 SND_PCI_QUIRK(0x103c, 0x8863, "HP ProBook 445 G8 Notebook PC", ALC236_FIXUP_HP_LIMIT_INT_MIC_BOOST
),
8594 SND_PCI_QUIRK(0x103c, 0x886d, "HP ZBook Fury 17.3 Inch G8 Mobile Workstation PC", ALC285_FIXUP_HP_GPIO_AMP_INIT
),
8595 SND_PCI_QUIRK(0x103c, 0x8870, "HP ZBook Fury 15.6 Inch G8 Mobile Workstation PC", ALC285_FIXUP_HP_GPIO_AMP_INIT
),
8596 SND_PCI_QUIRK(0x103c, 0x8873, "HP ZBook Studio 15.6 Inch G8 Mobile Workstation PC", ALC285_FIXUP_HP_GPIO_AMP_INIT
),
8597 SND_PCI_QUIRK(0x103c, 0x888d, "HP ZBook Power 15.6 inch G8 Mobile Workstation PC", ALC236_FIXUP_HP_GPIO_LED
),
8598 SND_PCI_QUIRK(0x103c, 0x8896, "HP EliteBook 855 G8 Notebook PC", ALC285_FIXUP_HP_MUTE_LED
),
8599 SND_PCI_QUIRK(0x103c, 0x8898, "HP EliteBook 845 G8 Notebook PC", ALC285_FIXUP_HP_LIMIT_INT_MIC_BOOST
),
8600 SND_PCI_QUIRK(0x103c, 0x88d0, "HP Pavilion 15-eh1xxx (mainboard 88D0)", ALC287_FIXUP_HP_GPIO_LED
),
8601 SND_PCI_QUIRK(0x1043, 0x103e, "ASUS X540SA", ALC256_FIXUP_ASUS_MIC
),
8602 SND_PCI_QUIRK(0x1043, 0x103f, "ASUS TX300", ALC282_FIXUP_ASUS_TX300
),
8603 SND_PCI_QUIRK(0x1043, 0x106d, "Asus K53BE", ALC269_FIXUP_LIMIT_INT_MIC_BOOST
),
8604 SND_PCI_QUIRK(0x1043, 0x10a1, "ASUS UX391UA", ALC294_FIXUP_ASUS_SPK
),
8605 SND_PCI_QUIRK(0x1043, 0x10c0, "ASUS X540SA", ALC256_FIXUP_ASUS_MIC
),
8606 SND_PCI_QUIRK(0x1043, 0x10d0, "ASUS X540LA/X540LJ", ALC255_FIXUP_ASUS_MIC_NO_PRESENCE
),
8607 SND_PCI_QUIRK(0x1043, 0x115d, "Asus 1015E", ALC269_FIXUP_LIMIT_INT_MIC_BOOST
),
8608 SND_PCI_QUIRK(0x1043, 0x11c0, "ASUS X556UR", ALC255_FIXUP_ASUS_MIC_NO_PRESENCE
),
8609 SND_PCI_QUIRK(0x1043, 0x125e, "ASUS Q524UQK", ALC255_FIXUP_ASUS_MIC_NO_PRESENCE
),
8610 SND_PCI_QUIRK(0x1043, 0x1271, "ASUS X430UN", ALC256_FIXUP_ASUS_MIC_NO_PRESENCE
),
8611 SND_PCI_QUIRK(0x1043, 0x1290, "ASUS X441SA", ALC233_FIXUP_EAPD_COEF_AND_MIC_NO_PRESENCE
),
8612 SND_PCI_QUIRK(0x1043, 0x12a0, "ASUS X441UV", ALC233_FIXUP_EAPD_COEF_AND_MIC_NO_PRESENCE
),
8613 SND_PCI_QUIRK(0x1043, 0x12e0, "ASUS X541SA", ALC256_FIXUP_ASUS_MIC
),
8614 SND_PCI_QUIRK(0x1043, 0x12f0, "ASUS X541UV", ALC256_FIXUP_ASUS_MIC
),
8615 SND_PCI_QUIRK(0x1043, 0x13b0, "ASUS Z550SA", ALC256_FIXUP_ASUS_MIC
),
8616 SND_PCI_QUIRK(0x1043, 0x1427, "Asus Zenbook UX31E", ALC269VB_FIXUP_ASUS_ZENBOOK
),
8617 SND_PCI_QUIRK(0x1043, 0x1517, "Asus Zenbook UX31A", ALC269VB_FIXUP_ASUS_ZENBOOK_UX31A
),
8618 SND_PCI_QUIRK(0x1043, 0x16e3, "ASUS UX50", ALC269_FIXUP_STEREO_DMIC
),
8619 SND_PCI_QUIRK(0x1043, 0x1740, "ASUS UX430UA", ALC295_FIXUP_ASUS_DACS
),
8620 SND_PCI_QUIRK(0x1043, 0x17d1, "ASUS UX431FL", ALC294_FIXUP_ASUS_DUAL_SPK
),
8621 SND_PCI_QUIRK(0x1043, 0x1662, "ASUS GV301QH", ALC294_FIXUP_ASUS_DUAL_SPK
),
8622 SND_PCI_QUIRK(0x1043, 0x1881, "ASUS Zephyrus S/M", ALC294_FIXUP_ASUS_GX502_PINS
),
8623 SND_PCI_QUIRK(0x1043, 0x18b1, "Asus MJ401TA", ALC256_FIXUP_ASUS_HEADSET_MIC
),
8624 SND_PCI_QUIRK(0x1043, 0x18f1, "Asus FX505DT", ALC256_FIXUP_ASUS_HEADSET_MIC
),
8625 SND_PCI_QUIRK(0x1043, 0x194e, "ASUS UX563FD", ALC294_FIXUP_ASUS_HPE
),
8626 SND_PCI_QUIRK(0x1043, 0x1982, "ASUS B1400CEPE", ALC256_FIXUP_ASUS_HPE
),
8627 SND_PCI_QUIRK(0x1043, 0x19ce, "ASUS B9450FA", ALC294_FIXUP_ASUS_HPE
),
8628 SND_PCI_QUIRK(0x1043, 0x19e1, "ASUS UX581LV", ALC295_FIXUP_ASUS_MIC_NO_PRESENCE
),
8629 SND_PCI_QUIRK(0x1043, 0x1a13, "Asus G73Jw", ALC269_FIXUP_ASUS_G73JW
),
8630 SND_PCI_QUIRK(0x1043, 0x1a30, "ASUS X705UD", ALC256_FIXUP_ASUS_MIC
),
8631 SND_PCI_QUIRK(0x1043, 0x1b11, "ASUS UX431DA", ALC294_FIXUP_ASUS_COEF_1B
),
8632 SND_PCI_QUIRK(0x1043, 0x1b13, "Asus U41SV", ALC269_FIXUP_INV_DMIC
),
8633 SND_PCI_QUIRK(0x1043, 0x1bbd, "ASUS Z550MA", ALC255_FIXUP_ASUS_MIC_NO_PRESENCE
),
8634 SND_PCI_QUIRK(0x1043, 0x1c23, "Asus X55U", ALC269_FIXUP_LIMIT_INT_MIC_BOOST
),
8635 SND_PCI_QUIRK(0x1043, 0x1ccd, "ASUS X555UB", ALC256_FIXUP_ASUS_MIC
),
8636 SND_PCI_QUIRK(0x1043, 0x1d4e, "ASUS TM420", ALC256_FIXUP_ASUS_HPE
),
8637 SND_PCI_QUIRK(0x1043, 0x1e11, "ASUS Zephyrus G15", ALC289_FIXUP_ASUS_GA502
),
8638 SND_PCI_QUIRK(0x1043, 0x1e51, "ASUS Zephyrus M15", ALC294_FIXUP_ASUS_GU502_PINS
),
8639 SND_PCI_QUIRK(0x1043, 0x1e8e, "ASUS Zephyrus G15", ALC289_FIXUP_ASUS_GA401
),
8640 SND_PCI_QUIRK(0x1043, 0x1f11, "ASUS Zephyrus G14", ALC289_FIXUP_ASUS_GA401
),
8641 SND_PCI_QUIRK(0x1043, 0x3030, "ASUS ZN270IE", ALC256_FIXUP_ASUS_AIO_GPIO2
),
8642 SND_PCI_QUIRK(0x1043, 0x831a, "ASUS P901", ALC269_FIXUP_STEREO_DMIC
),
8643 SND_PCI_QUIRK(0x1043, 0x834a, "ASUS S101", ALC269_FIXUP_STEREO_DMIC
),
8644 SND_PCI_QUIRK(0x1043, 0x8398, "ASUS P1005", ALC269_FIXUP_STEREO_DMIC
),
8645 SND_PCI_QUIRK(0x1043, 0x83ce, "ASUS P1005", ALC269_FIXUP_STEREO_DMIC
),
8646 SND_PCI_QUIRK(0x1043, 0x8516, "ASUS X101CH", ALC269_FIXUP_ASUS_X101
),
8647 SND_PCI_QUIRK(0x104d, 0x9073, "Sony VAIO", ALC275_FIXUP_SONY_VAIO_GPIO2
),
8648 SND_PCI_QUIRK(0x104d, 0x907b, "Sony VAIO", ALC275_FIXUP_SONY_HWEQ
),
8649 SND_PCI_QUIRK(0x104d, 0x9084, "Sony VAIO", ALC275_FIXUP_SONY_HWEQ
),
8650 SND_PCI_QUIRK(0x104d, 0x9099, "Sony VAIO S13", ALC275_FIXUP_SONY_DISABLE_AAMIX
),
8651 SND_PCI_QUIRK(0x104d, 0x90b5, "Sony VAIO Pro 11", ALC286_FIXUP_SONY_MIC_NO_PRESENCE
),
8652 SND_PCI_QUIRK(0x104d, 0x90b6, "Sony VAIO Pro 13", ALC286_FIXUP_SONY_MIC_NO_PRESENCE
),
8653 SND_PCI_QUIRK(0x10cf, 0x1475, "Lifebook", ALC269_FIXUP_LIFEBOOK
),
8654 SND_PCI_QUIRK(0x10cf, 0x159f, "Lifebook E780", ALC269_FIXUP_LIFEBOOK_NO_HP_TO_LINEOUT
),
8655 SND_PCI_QUIRK(0x10cf, 0x15dc, "Lifebook T731", ALC269_FIXUP_LIFEBOOK_HP_PIN
),
8656 SND_PCI_QUIRK(0x10cf, 0x1629, "Lifebook U7x7", ALC255_FIXUP_LIFEBOOK_U7x7_HEADSET_MIC
),
8657 SND_PCI_QUIRK(0x10cf, 0x1757, "Lifebook E752", ALC269_FIXUP_LIFEBOOK_HP_PIN
),
8658 SND_PCI_QUIRK(0x10cf, 0x1845, "Lifebook U904", ALC269_FIXUP_LIFEBOOK_EXTMIC
),
8659 SND_PCI_QUIRK(0x10ec, 0x10f2, "Intel Reference board", ALC700_FIXUP_INTEL_REFERENCE
),
8660 SND_PCI_QUIRK(0x10ec, 0x118c, "Medion EE4254 MD62100", ALC256_FIXUP_MEDION_HEADSET_NO_PRESENCE
),
8661 SND_PCI_QUIRK(0x10ec, 0x1230, "Intel Reference board", ALC295_FIXUP_CHROME_BOOK
),
8662 SND_PCI_QUIRK(0x10ec, 0x1252, "Intel Reference board", ALC295_FIXUP_CHROME_BOOK
),
8663 SND_PCI_QUIRK(0x10ec, 0x1254, "Intel Reference board", ALC295_FIXUP_CHROME_BOOK
),
8664 SND_PCI_QUIRK(0x10f7, 0x8338, "Panasonic CF-SZ6", ALC269_FIXUP_HEADSET_MODE
),
8665 SND_PCI_QUIRK(0x144d, 0xc109, "Samsung Ativ book 9 (NP900X3G)", ALC269_FIXUP_INV_DMIC
),
8666 SND_PCI_QUIRK(0x144d, 0xc169, "Samsung Notebook 9 Pen (NP930SBE-K01US)", ALC298_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET
),
8667 SND_PCI_QUIRK(0x144d, 0xc176, "Samsung Notebook 9 Pro (NP930MBE-K04US)", ALC298_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET
),
8668 SND_PCI_QUIRK(0x144d, 0xc189, "Samsung Galaxy Flex Book (NT950QCG-X716)", ALC298_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET
),
8669 SND_PCI_QUIRK(0x144d, 0xc18a, "Samsung Galaxy Book Ion (NP930XCJ-K01US)", ALC298_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET
),
8670 SND_PCI_QUIRK(0x144d, 0xc740, "Samsung Ativ book 8 (NP870Z5G)", ALC269_FIXUP_ATIV_BOOK_8
),
8671 SND_PCI_QUIRK(0x144d, 0xc812, "Samsung Notebook Pen S (NT950SBE-X58)", ALC298_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET
),
8672 SND_PCI_QUIRK(0x144d, 0xc830, "Samsung Galaxy Book Ion (NT950XCJ-X716A)", ALC298_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET
),
8673 SND_PCI_QUIRK(0x1458, 0xfa53, "Gigabyte BXBT-2807", ALC283_FIXUP_HEADSET_MIC
),
8674 SND_PCI_QUIRK(0x1462, 0xb120, "MSI Cubi MS-B120", ALC283_FIXUP_HEADSET_MIC
),
8675 SND_PCI_QUIRK(0x1462, 0xb171, "Cubi N 8GL (MS-B171)", ALC283_FIXUP_HEADSET_MIC
),
8676 SND_PCI_QUIRK(0x152d, 0x1082, "Quanta NL3", ALC269_FIXUP_LIFEBOOK
),
8677 SND_PCI_QUIRK(0x1558, 0x1323, "Clevo N130ZU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
8678 SND_PCI_QUIRK(0x1558, 0x1325, "Clevo N15[01][CW]U", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
8679 SND_PCI_QUIRK(0x1558, 0x1401, "Clevo L140[CZ]U", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
8680 SND_PCI_QUIRK(0x1558, 0x1403, "Clevo N140CU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
8681 SND_PCI_QUIRK(0x1558, 0x1404, "Clevo N150CU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
8682 SND_PCI_QUIRK(0x1558, 0x14a1, "Clevo L141MU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
8683 SND_PCI_QUIRK(0x1558, 0x4018, "Clevo NV40M[BE]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
8684 SND_PCI_QUIRK(0x1558, 0x4019, "Clevo NV40MZ", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
8685 SND_PCI_QUIRK(0x1558, 0x4020, "Clevo NV40MB", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
8686 SND_PCI_QUIRK(0x1558, 0x40a1, "Clevo NL40GU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
8687 SND_PCI_QUIRK(0x1558, 0x40c1, "Clevo NL40[CZ]U", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
8688 SND_PCI_QUIRK(0x1558, 0x40d1, "Clevo NL41DU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
8689 SND_PCI_QUIRK(0x1558, 0x50a3, "Clevo NJ51GU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
8690 SND_PCI_QUIRK(0x1558, 0x50b3, "Clevo NK50S[BEZ]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
8691 SND_PCI_QUIRK(0x1558, 0x50b6, "Clevo NK50S5", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
8692 SND_PCI_QUIRK(0x1558, 0x50b8, "Clevo NK50SZ", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
8693 SND_PCI_QUIRK(0x1558, 0x50d5, "Clevo NP50D5", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
8694 SND_PCI_QUIRK(0x1558, 0x50f0, "Clevo NH50A[CDF]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
8695 SND_PCI_QUIRK(0x1558, 0x50f2, "Clevo NH50E[PR]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
8696 SND_PCI_QUIRK(0x1558, 0x50f3, "Clevo NH58DPQ", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
8697 SND_PCI_QUIRK(0x1558, 0x50f5, "Clevo NH55EPY", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
8698 SND_PCI_QUIRK(0x1558, 0x50f6, "Clevo NH55DPQ", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
8699 SND_PCI_QUIRK(0x1558, 0x5101, "Clevo S510WU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
8700 SND_PCI_QUIRK(0x1558, 0x5157, "Clevo W517GU1", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
8701 SND_PCI_QUIRK(0x1558, 0x51a1, "Clevo NS50MU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
8702 SND_PCI_QUIRK(0x1558, 0x70a1, "Clevo NB70T[HJK]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
8703 SND_PCI_QUIRK(0x1558, 0x70b3, "Clevo NK70SB", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
8704 SND_PCI_QUIRK(0x1558, 0x70f2, "Clevo NH79EPY", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
8705 SND_PCI_QUIRK(0x1558, 0x70f3, "Clevo NH77DPQ", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
8706 SND_PCI_QUIRK(0x1558, 0x70f4, "Clevo NH77EPY", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
8707 SND_PCI_QUIRK(0x1558, 0x70f6, "Clevo NH77DPQ-Y", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
8708 SND_PCI_QUIRK(0x1558, 0x8228, "Clevo NR40BU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
8709 SND_PCI_QUIRK(0x1558, 0x8520, "Clevo NH50D[CD]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
8710 SND_PCI_QUIRK(0x1558, 0x8521, "Clevo NH77D[CD]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
8711 SND_PCI_QUIRK(0x1558, 0x8535, "Clevo NH50D[BE]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
8712 SND_PCI_QUIRK(0x1558, 0x8536, "Clevo NH79D[BE]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
8713 SND_PCI_QUIRK(0x1558, 0x8550, "Clevo NH[57][0-9][ER][ACDH]Q", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
8714 SND_PCI_QUIRK(0x1558, 0x8551, "Clevo NH[57][0-9][ER][ACDH]Q", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
8715 SND_PCI_QUIRK(0x1558, 0x8560, "Clevo NH[57][0-9][ER][ACDH]Q", ALC269_FIXUP_HEADSET_MIC
),
8716 SND_PCI_QUIRK(0x1558, 0x8561, "Clevo NH[57][0-9][ER][ACDH]Q", ALC269_FIXUP_HEADSET_MIC
),
8717 SND_PCI_QUIRK(0x1558, 0x8562, "Clevo NH[57][0-9]RZ[Q]", ALC269_FIXUP_DMIC
),
8718 SND_PCI_QUIRK(0x1558, 0x8668, "Clevo NP50B[BE]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
8719 SND_PCI_QUIRK(0x1558, 0x8680, "Clevo NJ50LU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
8720 SND_PCI_QUIRK(0x1558, 0x8686, "Clevo NH50[CZ]U", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
8721 SND_PCI_QUIRK(0x1558, 0x8a20, "Clevo NH55DCQ-Y", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
8722 SND_PCI_QUIRK(0x1558, 0x8a51, "Clevo NH70RCQ-Y", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
8723 SND_PCI_QUIRK(0x1558, 0x8d50, "Clevo NH55RCQ-M", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
8724 SND_PCI_QUIRK(0x1558, 0x951d, "Clevo N950T[CDF]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
8725 SND_PCI_QUIRK(0x1558, 0x9600, "Clevo N960K[PR]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
8726 SND_PCI_QUIRK(0x1558, 0x961d, "Clevo N960S[CDF]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
8727 SND_PCI_QUIRK(0x1558, 0x971d, "Clevo N970T[CDF]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
8728 SND_PCI_QUIRK(0x1558, 0xa500, "Clevo NL5[03]RU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
8729 SND_PCI_QUIRK(0x1558, 0xa600, "Clevo NL50NU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
8730 SND_PCI_QUIRK(0x1558, 0xb018, "Clevo NP50D[BE]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
8731 SND_PCI_QUIRK(0x1558, 0xb019, "Clevo NH77D[BE]Q", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
8732 SND_PCI_QUIRK(0x1558, 0xb022, "Clevo NH77D[DC][QW]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
8733 SND_PCI_QUIRK(0x1558, 0xc018, "Clevo NP50D[BE]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
8734 SND_PCI_QUIRK(0x1558, 0xc019, "Clevo NH77D[BE]Q", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
8735 SND_PCI_QUIRK(0x1558, 0xc022, "Clevo NH77[DC][QW]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
8736 SND_PCI_QUIRK(0x17aa, 0x1036, "Lenovo P520", ALC233_FIXUP_LENOVO_MULTI_CODECS
),
8737 SND_PCI_QUIRK(0x17aa, 0x1048, "ThinkCentre Station", ALC623_FIXUP_LENOVO_THINKSTATION_P340
),
8738 SND_PCI_QUIRK(0x17aa, 0x20f2, "Thinkpad SL410/510", ALC269_FIXUP_SKU_IGNORE
),
8739 SND_PCI_QUIRK(0x17aa, 0x215e, "Thinkpad L512", ALC269_FIXUP_SKU_IGNORE
),
8740 SND_PCI_QUIRK(0x17aa, 0x21b8, "Thinkpad Edge 14", ALC269_FIXUP_SKU_IGNORE
),
8741 SND_PCI_QUIRK(0x17aa, 0x21ca, "Thinkpad L412", ALC269_FIXUP_SKU_IGNORE
),
8742 SND_PCI_QUIRK(0x17aa, 0x21e9, "Thinkpad Edge 15", ALC269_FIXUP_SKU_IGNORE
),
8743 SND_PCI_QUIRK(0x17aa, 0x21f3, "Thinkpad T430", ALC269_FIXUP_LENOVO_DOCK
),
8744 SND_PCI_QUIRK(0x17aa, 0x21f6, "Thinkpad T530", ALC269_FIXUP_LENOVO_DOCK_LIMIT_BOOST
),
8745 SND_PCI_QUIRK(0x17aa, 0x21fa, "Thinkpad X230", ALC269_FIXUP_LENOVO_DOCK
),
8746 SND_PCI_QUIRK(0x17aa, 0x21fb, "Thinkpad T430s", ALC269_FIXUP_LENOVO_DOCK
),
8747 SND_PCI_QUIRK(0x17aa, 0x2203, "Thinkpad X230 Tablet", ALC269_FIXUP_LENOVO_DOCK
),
8748 SND_PCI_QUIRK(0x17aa, 0x2208, "Thinkpad T431s", ALC269_FIXUP_LENOVO_DOCK
),
8749 SND_PCI_QUIRK(0x17aa, 0x220c, "Thinkpad T440s", ALC292_FIXUP_TPT440
),
8750 SND_PCI_QUIRK(0x17aa, 0x220e, "Thinkpad T440p", ALC292_FIXUP_TPT440_DOCK
),
8751 SND_PCI_QUIRK(0x17aa, 0x2210, "Thinkpad T540p", ALC292_FIXUP_TPT440_DOCK
),
8752 SND_PCI_QUIRK(0x17aa, 0x2211, "Thinkpad W541", ALC292_FIXUP_TPT440_DOCK
),
8753 SND_PCI_QUIRK(0x17aa, 0x2212, "Thinkpad T440", ALC292_FIXUP_TPT440_DOCK
),
8754 SND_PCI_QUIRK(0x17aa, 0x2214, "Thinkpad X240", ALC292_FIXUP_TPT440_DOCK
),
8755 SND_PCI_QUIRK(0x17aa, 0x2215, "Thinkpad", ALC269_FIXUP_LIMIT_INT_MIC_BOOST
),
8756 SND_PCI_QUIRK(0x17aa, 0x2218, "Thinkpad X1 Carbon 2nd", ALC292_FIXUP_TPT440_DOCK
),
8757 SND_PCI_QUIRK(0x17aa, 0x2223, "ThinkPad T550", ALC292_FIXUP_TPT440_DOCK
),
8758 SND_PCI_QUIRK(0x17aa, 0x2226, "ThinkPad X250", ALC292_FIXUP_TPT440_DOCK
),
8759 SND_PCI_QUIRK(0x17aa, 0x222d, "Thinkpad", ALC298_FIXUP_TPT470_DOCK
),
8760 SND_PCI_QUIRK(0x17aa, 0x222e, "Thinkpad", ALC298_FIXUP_TPT470_DOCK
),
8761 SND_PCI_QUIRK(0x17aa, 0x2231, "Thinkpad T560", ALC292_FIXUP_TPT460
),
8762 SND_PCI_QUIRK(0x17aa, 0x2233, "Thinkpad", ALC292_FIXUP_TPT460
),
8763 SND_PCI_QUIRK(0x17aa, 0x2245, "Thinkpad T470", ALC298_FIXUP_TPT470_DOCK
),
8764 SND_PCI_QUIRK(0x17aa, 0x2246, "Thinkpad", ALC298_FIXUP_TPT470_DOCK
),
8765 SND_PCI_QUIRK(0x17aa, 0x2247, "Thinkpad", ALC298_FIXUP_TPT470_DOCK
),
8766 SND_PCI_QUIRK(0x17aa, 0x2249, "Thinkpad", ALC292_FIXUP_TPT460
),
8767 SND_PCI_QUIRK(0x17aa, 0x224b, "Thinkpad", ALC298_FIXUP_TPT470_DOCK
),
8768 SND_PCI_QUIRK(0x17aa, 0x224c, "Thinkpad", ALC298_FIXUP_TPT470_DOCK
),
8769 SND_PCI_QUIRK(0x17aa, 0x224d, "Thinkpad", ALC298_FIXUP_TPT470_DOCK
),
8770 SND_PCI_QUIRK(0x17aa, 0x225d, "Thinkpad T480", ALC269_FIXUP_LIMIT_INT_MIC_BOOST
),
8771 SND_PCI_QUIRK(0x17aa, 0x2292, "Thinkpad X1 Carbon 7th", ALC285_FIXUP_THINKPAD_HEADSET_JACK
),
8772 SND_PCI_QUIRK(0x17aa, 0x22be, "Thinkpad X1 Carbon 8th", ALC285_FIXUP_THINKPAD_HEADSET_JACK
),
8773 SND_PCI_QUIRK(0x17aa, 0x22c1, "Thinkpad P1 Gen 3", ALC285_FIXUP_THINKPAD_NO_BASS_SPK_HEADSET_JACK
),
8774 SND_PCI_QUIRK(0x17aa, 0x22c2, "Thinkpad X1 Extreme Gen 3", ALC285_FIXUP_THINKPAD_NO_BASS_SPK_HEADSET_JACK
),
8775 SND_PCI_QUIRK(0x17aa, 0x30bb, "ThinkCentre AIO", ALC233_FIXUP_LENOVO_LINE2_MIC_HOTKEY
),
8776 SND_PCI_QUIRK(0x17aa, 0x30e2, "ThinkCentre AIO", ALC233_FIXUP_LENOVO_LINE2_MIC_HOTKEY
),
8777 SND_PCI_QUIRK(0x17aa, 0x310c, "ThinkCentre Station", ALC294_FIXUP_LENOVO_MIC_LOCATION
),
8778 SND_PCI_QUIRK(0x17aa, 0x3111, "ThinkCentre Station", ALC294_FIXUP_LENOVO_MIC_LOCATION
),
8779 SND_PCI_QUIRK(0x17aa, 0x312a, "ThinkCentre Station", ALC294_FIXUP_LENOVO_MIC_LOCATION
),
8780 SND_PCI_QUIRK(0x17aa, 0x312f, "ThinkCentre Station", ALC294_FIXUP_LENOVO_MIC_LOCATION
),
8781 SND_PCI_QUIRK(0x17aa, 0x313c, "ThinkCentre Station", ALC294_FIXUP_LENOVO_MIC_LOCATION
),
8782 SND_PCI_QUIRK(0x17aa, 0x3151, "ThinkCentre Station", ALC283_FIXUP_HEADSET_MIC
),
8783 SND_PCI_QUIRK(0x17aa, 0x3176, "ThinkCentre Station", ALC283_FIXUP_HEADSET_MIC
),
8784 SND_PCI_QUIRK(0x17aa, 0x3178, "ThinkCentre Station", ALC283_FIXUP_HEADSET_MIC
),
8785 SND_PCI_QUIRK(0x17aa, 0x31af, "ThinkCentre Station", ALC623_FIXUP_LENOVO_THINKSTATION_P340
),
8786 SND_PCI_QUIRK(0x17aa, 0x3818, "Lenovo C940", ALC298_FIXUP_LENOVO_SPK_VOLUME
),
8787 SND_PCI_QUIRK(0x17aa, 0x3827, "Ideapad S740", ALC285_FIXUP_IDEAPAD_S740_COEF
),
8788 SND_PCI_QUIRK(0x17aa, 0x3843, "Yoga 9i", ALC287_FIXUP_IDEAPAD_BASS_SPK_AMP
),
8789 SND_PCI_QUIRK(0x17aa, 0x3813, "Legion 7i 15IMHG05", ALC287_FIXUP_LEGION_15IMHG05_SPEAKERS
),
8790 SND_PCI_QUIRK(0x17aa, 0x3852, "Lenovo Yoga 7 14ITL5", ALC287_FIXUP_YOGA7_14ITL_SPEAKERS
),
8791 SND_PCI_QUIRK(0x17aa, 0x3853, "Lenovo Yoga 7 15ITL5", ALC287_FIXUP_YOGA7_14ITL_SPEAKERS
),
8792 SND_PCI_QUIRK(0x17aa, 0x3819, "Lenovo 13s Gen2 ITL", ALC287_FIXUP_13S_GEN2_SPEAKERS
),
8793 SND_PCI_QUIRK(0x17aa, 0x3902, "Lenovo E50-80", ALC269_FIXUP_DMIC_THINKPAD_ACPI
),
8794 SND_PCI_QUIRK(0x17aa, 0x3977, "IdeaPad S210", ALC283_FIXUP_INT_MIC
),
8795 SND_PCI_QUIRK(0x17aa, 0x3978, "Lenovo B50-70", ALC269_FIXUP_DMIC_THINKPAD_ACPI
),
8796 SND_PCI_QUIRK(0x17aa, 0x3bf8, "Quanta FL1", ALC269_FIXUP_PCM_44K
),
8797 SND_PCI_QUIRK(0x17aa, 0x5013, "Thinkpad", ALC269_FIXUP_LIMIT_INT_MIC_BOOST
),
8798 SND_PCI_QUIRK(0x17aa, 0x501a, "Thinkpad", ALC283_FIXUP_INT_MIC
),
8799 SND_PCI_QUIRK(0x17aa, 0x501e, "Thinkpad L440", ALC292_FIXUP_TPT440_DOCK
),
8800 SND_PCI_QUIRK(0x17aa, 0x5026, "Thinkpad", ALC269_FIXUP_LIMIT_INT_MIC_BOOST
),
8801 SND_PCI_QUIRK(0x17aa, 0x5034, "Thinkpad T450", ALC292_FIXUP_TPT440_DOCK
),
8802 SND_PCI_QUIRK(0x17aa, 0x5036, "Thinkpad T450s", ALC292_FIXUP_TPT440_DOCK
),
8803 SND_PCI_QUIRK(0x17aa, 0x503c, "Thinkpad L450", ALC292_FIXUP_TPT440_DOCK
),
8804 SND_PCI_QUIRK(0x17aa, 0x504a, "ThinkPad X260", ALC292_FIXUP_TPT440_DOCK
),
8805 SND_PCI_QUIRK(0x17aa, 0x504b, "Thinkpad", ALC293_FIXUP_LENOVO_SPK_NOISE
),
8806 SND_PCI_QUIRK(0x17aa, 0x5050, "Thinkpad T560p", ALC292_FIXUP_TPT460
),
8807 SND_PCI_QUIRK(0x17aa, 0x5051, "Thinkpad L460", ALC292_FIXUP_TPT460
),
8808 SND_PCI_QUIRK(0x17aa, 0x5053, "Thinkpad T460", ALC292_FIXUP_TPT460
),
8809 SND_PCI_QUIRK(0x17aa, 0x505d, "Thinkpad", ALC298_FIXUP_TPT470_DOCK
),
8810 SND_PCI_QUIRK(0x17aa, 0x505f, "Thinkpad", ALC298_FIXUP_TPT470_DOCK
),
8811 SND_PCI_QUIRK(0x17aa, 0x5062, "Thinkpad", ALC298_FIXUP_TPT470_DOCK
),
8812 SND_PCI_QUIRK(0x17aa, 0x5109, "Thinkpad", ALC269_FIXUP_LIMIT_INT_MIC_BOOST
),
8813 SND_PCI_QUIRK(0x17aa, 0x511e, "Thinkpad", ALC298_FIXUP_TPT470_DOCK
),
8814 SND_PCI_QUIRK(0x17aa, 0x511f, "Thinkpad", ALC298_FIXUP_TPT470_DOCK
),
8815 SND_PCI_QUIRK(0x17aa, 0x9e54, "LENOVO NB", ALC269_FIXUP_LENOVO_EAPD
),
8816 SND_PCI_QUIRK(0x19e5, 0x3204, "Huawei MACH-WX9", ALC256_FIXUP_HUAWEI_MACH_WX9_PINS
),
8817 SND_PCI_QUIRK(0x1b35, 0x1235, "CZC B20", ALC269_FIXUP_CZC_B20
),
8818 SND_PCI_QUIRK(0x1b35, 0x1236, "CZC TMI", ALC269_FIXUP_CZC_TMI
),
8819 SND_PCI_QUIRK(0x1b35, 0x1237, "CZC L101", ALC269_FIXUP_CZC_L101
),
8820 SND_PCI_QUIRK(0x1b7d, 0xa831, "Ordissimo EVE2 ", ALC269VB_FIXUP_ORDISSIMO_EVE2
), /* Also known as Malata PC-B1303 */
8821 SND_PCI_QUIRK(0x1c06, 0x2013, "Lemote A1802", ALC269_FIXUP_LEMOTE_A1802
),
8822 SND_PCI_QUIRK(0x1c06, 0x2015, "Lemote A190X", ALC269_FIXUP_LEMOTE_A190X
),
8823 SND_PCI_QUIRK(0x1d05, 0x1132, "TongFang PHxTxX1", ALC256_FIXUP_TONGFANG_RESET_PERSISTENT_SETTINGS
),
8824 SND_PCI_QUIRK(0x1d72, 0x1602, "RedmiBook", ALC255_FIXUP_XIAOMI_HEADSET_MIC
),
8825 SND_PCI_QUIRK(0x1d72, 0x1701, "XiaomiNotebook Pro", ALC298_FIXUP_DELL1_MIC_NO_PRESENCE
),
8826 SND_PCI_QUIRK(0x1d72, 0x1901, "RedmiBook 14", ALC256_FIXUP_ASUS_HEADSET_MIC
),
8827 SND_PCI_QUIRK(0x1d72, 0x1947, "RedmiBook Air", ALC255_FIXUP_XIAOMI_HEADSET_MIC
),
8828 SND_PCI_QUIRK(0x8086, 0x2074, "Intel NUC 8", ALC233_FIXUP_INTEL_NUC8_DMIC
),
8829 SND_PCI_QUIRK(0x8086, 0x2080, "Intel NUC 8 Rugged", ALC256_FIXUP_INTEL_NUC8_RUGGED
),
8830 SND_PCI_QUIRK(0x8086, 0x2081, "Intel NUC 10", ALC256_FIXUP_INTEL_NUC10
),
8833 /* Below is a quirk table taken from the old code.
8834 * Basically the device should work as is without the fixup table.
8835 * If BIOS doesn't give a proper info, enable the corresponding
8838 SND_PCI_QUIRK(0x1043, 0x8330, "ASUS Eeepc P703 P900A",
8840 SND_PCI_QUIRK(0x1043, 0x1013, "ASUS N61Da", ALC269_FIXUP_AMIC
),
8841 SND_PCI_QUIRK(0x1043, 0x1143, "ASUS B53f", ALC269_FIXUP_AMIC
),
8842 SND_PCI_QUIRK(0x1043, 0x1133, "ASUS UJ20ft", ALC269_FIXUP_AMIC
),
8843 SND_PCI_QUIRK(0x1043, 0x1183, "ASUS K72DR", ALC269_FIXUP_AMIC
),
8844 SND_PCI_QUIRK(0x1043, 0x11b3, "ASUS K52DR", ALC269_FIXUP_AMIC
),
8845 SND_PCI_QUIRK(0x1043, 0x11e3, "ASUS U33Jc", ALC269_FIXUP_AMIC
),
8846 SND_PCI_QUIRK(0x1043, 0x1273, "ASUS UL80Jt", ALC269_FIXUP_AMIC
),
8847 SND_PCI_QUIRK(0x1043, 0x1283, "ASUS U53Jc", ALC269_FIXUP_AMIC
),
8848 SND_PCI_QUIRK(0x1043, 0x12b3, "ASUS N82JV", ALC269_FIXUP_AMIC
),
8849 SND_PCI_QUIRK(0x1043, 0x12d3, "ASUS N61Jv", ALC269_FIXUP_AMIC
),
8850 SND_PCI_QUIRK(0x1043, 0x13a3, "ASUS UL30Vt", ALC269_FIXUP_AMIC
),
8851 SND_PCI_QUIRK(0x1043, 0x1373, "ASUS G73JX", ALC269_FIXUP_AMIC
),
8852 SND_PCI_QUIRK(0x1043, 0x1383, "ASUS UJ30Jc", ALC269_FIXUP_AMIC
),
8853 SND_PCI_QUIRK(0x1043, 0x13d3, "ASUS N61JA", ALC269_FIXUP_AMIC
),
8854 SND_PCI_QUIRK(0x1043, 0x1413, "ASUS UL50", ALC269_FIXUP_AMIC
),
8855 SND_PCI_QUIRK(0x1043, 0x1443, "ASUS UL30", ALC269_FIXUP_AMIC
),
8856 SND_PCI_QUIRK(0x1043, 0x1453, "ASUS M60Jv", ALC269_FIXUP_AMIC
),
8857 SND_PCI_QUIRK(0x1043, 0x1483, "ASUS UL80", ALC269_FIXUP_AMIC
),
8858 SND_PCI_QUIRK(0x1043, 0x14f3, "ASUS F83Vf", ALC269_FIXUP_AMIC
),
8859 SND_PCI_QUIRK(0x1043, 0x14e3, "ASUS UL20", ALC269_FIXUP_AMIC
),
8860 SND_PCI_QUIRK(0x1043, 0x1513, "ASUS UX30", ALC269_FIXUP_AMIC
),
8861 SND_PCI_QUIRK(0x1043, 0x1593, "ASUS N51Vn", ALC269_FIXUP_AMIC
),
8862 SND_PCI_QUIRK(0x1043, 0x15a3, "ASUS N60Jv", ALC269_FIXUP_AMIC
),
8863 SND_PCI_QUIRK(0x1043, 0x15b3, "ASUS N60Dp", ALC269_FIXUP_AMIC
),
8864 SND_PCI_QUIRK(0x1043, 0x15c3, "ASUS N70De", ALC269_FIXUP_AMIC
),
8865 SND_PCI_QUIRK(0x1043, 0x15e3, "ASUS F83T", ALC269_FIXUP_AMIC
),
8866 SND_PCI_QUIRK(0x1043, 0x1643, "ASUS M60J", ALC269_FIXUP_AMIC
),
8867 SND_PCI_QUIRK(0x1043, 0x1653, "ASUS U50", ALC269_FIXUP_AMIC
),
8868 SND_PCI_QUIRK(0x1043, 0x1693, "ASUS F50N", ALC269_FIXUP_AMIC
),
8869 SND_PCI_QUIRK(0x1043, 0x16a3, "ASUS F5Q", ALC269_FIXUP_AMIC
),
8870 SND_PCI_QUIRK(0x1043, 0x1723, "ASUS P80", ALC269_FIXUP_AMIC
),
8871 SND_PCI_QUIRK(0x1043, 0x1743, "ASUS U80", ALC269_FIXUP_AMIC
),
8872 SND_PCI_QUIRK(0x1043, 0x1773, "ASUS U20A", ALC269_FIXUP_AMIC
),
8873 SND_PCI_QUIRK(0x1043, 0x1883, "ASUS F81Se", ALC269_FIXUP_AMIC
),
8874 SND_PCI_QUIRK(0x152d, 0x1778, "Quanta ON1", ALC269_FIXUP_DMIC
),
8875 SND_PCI_QUIRK(0x17aa, 0x3be9, "Quanta Wistron", ALC269_FIXUP_AMIC
),
8876 SND_PCI_QUIRK(0x17aa, 0x3bf8, "Quanta FL1", ALC269_FIXUP_AMIC
),
8877 SND_PCI_QUIRK(0x17ff, 0x059a, "Quanta EL3", ALC269_FIXUP_DMIC
),
8878 SND_PCI_QUIRK(0x17ff, 0x059b, "Quanta JR1", ALC269_FIXUP_DMIC
),
8883 static const struct snd_pci_quirk alc269_fixup_vendor_tbl
[] = {
8884 SND_PCI_QUIRK_VENDOR(0x1025, "Acer Aspire", ALC271_FIXUP_DMIC
),
8885 SND_PCI_QUIRK_VENDOR(0x103c, "HP", ALC269_FIXUP_HP_MUTE_LED
),
8886 SND_PCI_QUIRK_VENDOR(0x104d, "Sony VAIO", ALC269_FIXUP_SONY_VAIO
),
8887 SND_PCI_QUIRK_VENDOR(0x17aa, "Thinkpad", ALC269_FIXUP_THINKPAD_ACPI
),
8888 SND_PCI_QUIRK_VENDOR(0x19e5, "Huawei Matebook", ALC255_FIXUP_MIC_MUTE_LED
),
8892 static const struct hda_model_fixup alc269_fixup_models
[] = {
8893 {.id
= ALC269_FIXUP_AMIC
, .name
= "laptop-amic"},
8894 {.id
= ALC269_FIXUP_DMIC
, .name
= "laptop-dmic"},
8895 {.id
= ALC269_FIXUP_STEREO_DMIC
, .name
= "alc269-dmic"},
8896 {.id
= ALC271_FIXUP_DMIC
, .name
= "alc271-dmic"},
8897 {.id
= ALC269_FIXUP_INV_DMIC
, .name
= "inv-dmic"},
8898 {.id
= ALC269_FIXUP_HEADSET_MIC
, .name
= "headset-mic"},
8899 {.id
= ALC269_FIXUP_HEADSET_MODE
, .name
= "headset-mode"},
8900 {.id
= ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC
, .name
= "headset-mode-no-hp-mic"},
8901 {.id
= ALC269_FIXUP_LENOVO_DOCK
, .name
= "lenovo-dock"},
8902 {.id
= ALC269_FIXUP_LENOVO_DOCK_LIMIT_BOOST
, .name
= "lenovo-dock-limit-boost"},
8903 {.id
= ALC269_FIXUP_HP_GPIO_LED
, .name
= "hp-gpio-led"},
8904 {.id
= ALC269_FIXUP_HP_DOCK_GPIO_MIC1_LED
, .name
= "hp-dock-gpio-mic1-led"},
8905 {.id
= ALC269_FIXUP_DELL1_MIC_NO_PRESENCE
, .name
= "dell-headset-multi"},
8906 {.id
= ALC269_FIXUP_DELL2_MIC_NO_PRESENCE
, .name
= "dell-headset-dock"},
8907 {.id
= ALC269_FIXUP_DELL3_MIC_NO_PRESENCE
, .name
= "dell-headset3"},
8908 {.id
= ALC269_FIXUP_DELL4_MIC_NO_PRESENCE
, .name
= "dell-headset4"},
8909 {.id
= ALC283_FIXUP_CHROME_BOOK
, .name
= "alc283-dac-wcaps"},
8910 {.id
= ALC283_FIXUP_SENSE_COMBO_JACK
, .name
= "alc283-sense-combo"},
8911 {.id
= ALC292_FIXUP_TPT440_DOCK
, .name
= "tpt440-dock"},
8912 {.id
= ALC292_FIXUP_TPT440
, .name
= "tpt440"},
8913 {.id
= ALC292_FIXUP_TPT460
, .name
= "tpt460"},
8914 {.id
= ALC298_FIXUP_TPT470_DOCK_FIX
, .name
= "tpt470-dock-fix"},
8915 {.id
= ALC298_FIXUP_TPT470_DOCK
, .name
= "tpt470-dock"},
8916 {.id
= ALC233_FIXUP_LENOVO_MULTI_CODECS
, .name
= "dual-codecs"},
8917 {.id
= ALC700_FIXUP_INTEL_REFERENCE
, .name
= "alc700-ref"},
8918 {.id
= ALC269_FIXUP_SONY_VAIO
, .name
= "vaio"},
8919 {.id
= ALC269_FIXUP_DELL_M101Z
, .name
= "dell-m101z"},
8920 {.id
= ALC269_FIXUP_ASUS_G73JW
, .name
= "asus-g73jw"},
8921 {.id
= ALC269_FIXUP_LENOVO_EAPD
, .name
= "lenovo-eapd"},
8922 {.id
= ALC275_FIXUP_SONY_HWEQ
, .name
= "sony-hweq"},
8923 {.id
= ALC269_FIXUP_PCM_44K
, .name
= "pcm44k"},
8924 {.id
= ALC269_FIXUP_LIFEBOOK
, .name
= "lifebook"},
8925 {.id
= ALC269_FIXUP_LIFEBOOK_EXTMIC
, .name
= "lifebook-extmic"},
8926 {.id
= ALC269_FIXUP_LIFEBOOK_HP_PIN
, .name
= "lifebook-hp-pin"},
8927 {.id
= ALC255_FIXUP_LIFEBOOK_U7x7_HEADSET_MIC
, .name
= "lifebook-u7x7"},
8928 {.id
= ALC269VB_FIXUP_AMIC
, .name
= "alc269vb-amic"},
8929 {.id
= ALC269VB_FIXUP_DMIC
, .name
= "alc269vb-dmic"},
8930 {.id
= ALC269_FIXUP_HP_MUTE_LED_MIC1
, .name
= "hp-mute-led-mic1"},
8931 {.id
= ALC269_FIXUP_HP_MUTE_LED_MIC2
, .name
= "hp-mute-led-mic2"},
8932 {.id
= ALC269_FIXUP_HP_MUTE_LED_MIC3
, .name
= "hp-mute-led-mic3"},
8933 {.id
= ALC269_FIXUP_HP_GPIO_MIC1_LED
, .name
= "hp-gpio-mic1"},
8934 {.id
= ALC269_FIXUP_HP_LINE1_MIC1_LED
, .name
= "hp-line1-mic1"},
8935 {.id
= ALC269_FIXUP_NO_SHUTUP
, .name
= "noshutup"},
8936 {.id
= ALC286_FIXUP_SONY_MIC_NO_PRESENCE
, .name
= "sony-nomic"},
8937 {.id
= ALC269_FIXUP_ASPIRE_HEADSET_MIC
, .name
= "aspire-headset-mic"},
8938 {.id
= ALC269_FIXUP_ASUS_X101
, .name
= "asus-x101"},
8939 {.id
= ALC271_FIXUP_HP_GATE_MIC_JACK
, .name
= "acer-ao7xx"},
8940 {.id
= ALC271_FIXUP_HP_GATE_MIC_JACK_E1_572
, .name
= "acer-aspire-e1"},
8941 {.id
= ALC269_FIXUP_ACER_AC700
, .name
= "acer-ac700"},
8942 {.id
= ALC269_FIXUP_LIMIT_INT_MIC_BOOST
, .name
= "limit-mic-boost"},
8943 {.id
= ALC269VB_FIXUP_ASUS_ZENBOOK
, .name
= "asus-zenbook"},
8944 {.id
= ALC269VB_FIXUP_ASUS_ZENBOOK_UX31A
, .name
= "asus-zenbook-ux31a"},
8945 {.id
= ALC269VB_FIXUP_ORDISSIMO_EVE2
, .name
= "ordissimo"},
8946 {.id
= ALC282_FIXUP_ASUS_TX300
, .name
= "asus-tx300"},
8947 {.id
= ALC283_FIXUP_INT_MIC
, .name
= "alc283-int-mic"},
8948 {.id
= ALC290_FIXUP_MONO_SPEAKERS_HSJACK
, .name
= "mono-speakers"},
8949 {.id
= ALC290_FIXUP_SUBWOOFER_HSJACK
, .name
= "alc290-subwoofer"},
8950 {.id
= ALC269_FIXUP_THINKPAD_ACPI
, .name
= "thinkpad"},
8951 {.id
= ALC269_FIXUP_DMIC_THINKPAD_ACPI
, .name
= "dmic-thinkpad"},
8952 {.id
= ALC255_FIXUP_ACER_MIC_NO_PRESENCE
, .name
= "alc255-acer"},
8953 {.id
= ALC255_FIXUP_ASUS_MIC_NO_PRESENCE
, .name
= "alc255-asus"},
8954 {.id
= ALC255_FIXUP_DELL1_MIC_NO_PRESENCE
, .name
= "alc255-dell1"},
8955 {.id
= ALC255_FIXUP_DELL2_MIC_NO_PRESENCE
, .name
= "alc255-dell2"},
8956 {.id
= ALC293_FIXUP_DELL1_MIC_NO_PRESENCE
, .name
= "alc293-dell1"},
8957 {.id
= ALC283_FIXUP_HEADSET_MIC
, .name
= "alc283-headset"},
8958 {.id
= ALC255_FIXUP_MIC_MUTE_LED
, .name
= "alc255-dell-mute"},
8959 {.id
= ALC282_FIXUP_ASPIRE_V5_PINS
, .name
= "aspire-v5"},
8960 {.id
= ALC269VB_FIXUP_ASPIRE_E1_COEF
, .name
= "aspire-e1-coef"},
8961 {.id
= ALC280_FIXUP_HP_GPIO4
, .name
= "hp-gpio4"},
8962 {.id
= ALC286_FIXUP_HP_GPIO_LED
, .name
= "hp-gpio-led"},
8963 {.id
= ALC280_FIXUP_HP_GPIO2_MIC_HOTKEY
, .name
= "hp-gpio2-hotkey"},
8964 {.id
= ALC280_FIXUP_HP_DOCK_PINS
, .name
= "hp-dock-pins"},
8965 {.id
= ALC269_FIXUP_HP_DOCK_GPIO_MIC1_LED
, .name
= "hp-dock-gpio-mic"},
8966 {.id
= ALC280_FIXUP_HP_9480M
, .name
= "hp-9480m"},
8967 {.id
= ALC288_FIXUP_DELL_HEADSET_MODE
, .name
= "alc288-dell-headset"},
8968 {.id
= ALC288_FIXUP_DELL1_MIC_NO_PRESENCE
, .name
= "alc288-dell1"},
8969 {.id
= ALC288_FIXUP_DELL_XPS_13
, .name
= "alc288-dell-xps13"},
8970 {.id
= ALC292_FIXUP_DELL_E7X
, .name
= "dell-e7x"},
8971 {.id
= ALC293_FIXUP_DISABLE_AAMIX_MULTIJACK
, .name
= "alc293-dell"},
8972 {.id
= ALC298_FIXUP_DELL1_MIC_NO_PRESENCE
, .name
= "alc298-dell1"},
8973 {.id
= ALC298_FIXUP_DELL_AIO_MIC_NO_PRESENCE
, .name
= "alc298-dell-aio"},
8974 {.id
= ALC275_FIXUP_DELL_XPS
, .name
= "alc275-dell-xps"},
8975 {.id
= ALC293_FIXUP_LENOVO_SPK_NOISE
, .name
= "lenovo-spk-noise"},
8976 {.id
= ALC233_FIXUP_LENOVO_LINE2_MIC_HOTKEY
, .name
= "lenovo-hotkey"},
8977 {.id
= ALC255_FIXUP_DELL_SPK_NOISE
, .name
= "dell-spk-noise"},
8978 {.id
= ALC225_FIXUP_DELL1_MIC_NO_PRESENCE
, .name
= "alc225-dell1"},
8979 {.id
= ALC295_FIXUP_DISABLE_DAC3
, .name
= "alc295-disable-dac3"},
8980 {.id
= ALC285_FIXUP_SPEAKER2_TO_DAC1
, .name
= "alc285-speaker2-to-dac1"},
8981 {.id
= ALC280_FIXUP_HP_HEADSET_MIC
, .name
= "alc280-hp-headset"},
8982 {.id
= ALC221_FIXUP_HP_FRONT_MIC
, .name
= "alc221-hp-mic"},
8983 {.id
= ALC298_FIXUP_SPK_VOLUME
, .name
= "alc298-spk-volume"},
8984 {.id
= ALC256_FIXUP_DELL_INSPIRON_7559_SUBWOOFER
, .name
= "dell-inspiron-7559"},
8985 {.id
= ALC269_FIXUP_ATIV_BOOK_8
, .name
= "ativ-book"},
8986 {.id
= ALC221_FIXUP_HP_MIC_NO_PRESENCE
, .name
= "alc221-hp-mic"},
8987 {.id
= ALC256_FIXUP_ASUS_HEADSET_MODE
, .name
= "alc256-asus-headset"},
8988 {.id
= ALC256_FIXUP_ASUS_MIC
, .name
= "alc256-asus-mic"},
8989 {.id
= ALC256_FIXUP_ASUS_AIO_GPIO2
, .name
= "alc256-asus-aio"},
8990 {.id
= ALC233_FIXUP_ASUS_MIC_NO_PRESENCE
, .name
= "alc233-asus"},
8991 {.id
= ALC233_FIXUP_EAPD_COEF_AND_MIC_NO_PRESENCE
, .name
= "alc233-eapd"},
8992 {.id
= ALC294_FIXUP_LENOVO_MIC_LOCATION
, .name
= "alc294-lenovo-mic"},
8993 {.id
= ALC225_FIXUP_DELL_WYSE_MIC_NO_PRESENCE
, .name
= "alc225-wyse"},
8994 {.id
= ALC274_FIXUP_DELL_AIO_LINEOUT_VERB
, .name
= "alc274-dell-aio"},
8995 {.id
= ALC255_FIXUP_DUMMY_LINEOUT_VERB
, .name
= "alc255-dummy-lineout"},
8996 {.id
= ALC255_FIXUP_DELL_HEADSET_MIC
, .name
= "alc255-dell-headset"},
8997 {.id
= ALC295_FIXUP_HP_X360
, .name
= "alc295-hp-x360"},
8998 {.id
= ALC225_FIXUP_HEADSET_JACK
, .name
= "alc-headset-jack"},
8999 {.id
= ALC295_FIXUP_CHROME_BOOK
, .name
= "alc-chrome-book"},
9000 {.id
= ALC299_FIXUP_PREDATOR_SPK
, .name
= "predator-spk"},
9001 {.id
= ALC298_FIXUP_HUAWEI_MBX_STEREO
, .name
= "huawei-mbx-stereo"},
9002 {.id
= ALC256_FIXUP_MEDION_HEADSET_NO_PRESENCE
, .name
= "alc256-medion-headset"},
9003 {.id
= ALC298_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET
, .name
= "alc298-samsung-headphone"},
9004 {.id
= ALC255_FIXUP_XIAOMI_HEADSET_MIC
, .name
= "alc255-xiaomi-headset"},
9005 {.id
= ALC274_FIXUP_HP_MIC
, .name
= "alc274-hp-mic-detect"},
9006 {.id
= ALC245_FIXUP_HP_X360_AMP
, .name
= "alc245-hp-x360-amp"},
9007 {.id
= ALC295_FIXUP_HP_OMEN
, .name
= "alc295-hp-omen"},
9008 {.id
= ALC285_FIXUP_HP_SPECTRE_X360
, .name
= "alc285-hp-spectre-x360"},
9009 {.id
= ALC287_FIXUP_IDEAPAD_BASS_SPK_AMP
, .name
= "alc287-ideapad-bass-spk-amp"},
9010 {.id
= ALC623_FIXUP_LENOVO_THINKSTATION_P340
, .name
= "alc623-lenovo-thinkstation-p340"},
9011 {.id
= ALC255_FIXUP_ACER_HEADPHONE_AND_MIC
, .name
= "alc255-acer-headphone-and-mic"},
9014 #define ALC225_STANDARD_PINS \
9017 #define ALC256_STANDARD_PINS \
9018 {0x12, 0x90a60140}, \
9019 {0x14, 0x90170110}, \
9022 #define ALC282_STANDARD_PINS \
9025 #define ALC290_STANDARD_PINS \
9028 #define ALC292_STANDARD_PINS \
9029 {0x14, 0x90170110}, \
9032 #define ALC295_STANDARD_PINS \
9033 {0x12, 0xb7a60130}, \
9034 {0x14, 0x90170110}, \
9037 #define ALC298_STANDARD_PINS \
9038 {0x12, 0x90a60130}, \
9041 static const struct snd_hda_pin_quirk alc269_pin_fixup_tbl
[] = {
9042 SND_HDA_PIN_QUIRK(0x10ec0221, 0x103c, "HP Workstation", ALC221_FIXUP_HP_HEADSET_MIC
,
9047 {0x21, 0x0221102f}),
9048 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1025, "Acer", ALC255_FIXUP_ACER_MIC_NO_PRESENCE
,
9051 {0x21, 0x02211030}),
9052 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1043, "ASUS", ALC255_FIXUP_ASUS_MIC_NO_PRESENCE
,
9055 {0x21, 0x03211020}),
9056 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1043, "ASUS", ALC255_FIXUP_ASUS_MIC_NO_PRESENCE
,
9059 {0x21, 0x03211020}),
9060 SND_HDA_PIN_QUIRK(0x10ec0225, 0x1028, "Dell", ALC225_FIXUP_DELL1_MIC_NO_PRESENCE
,
9061 ALC225_STANDARD_PINS
,
9063 {0x14, 0x901701a0}),
9064 SND_HDA_PIN_QUIRK(0x10ec0225, 0x1028, "Dell", ALC225_FIXUP_DELL1_MIC_NO_PRESENCE
,
9065 ALC225_STANDARD_PINS
,
9067 {0x14, 0x901701b0}),
9068 SND_HDA_PIN_QUIRK(0x10ec0225, 0x1028, "Dell", ALC225_FIXUP_DELL1_MIC_NO_PRESENCE
,
9069 ALC225_STANDARD_PINS
,
9071 {0x14, 0x901701a0}),
9072 SND_HDA_PIN_QUIRK(0x10ec0225, 0x1028, "Dell", ALC225_FIXUP_DELL1_MIC_NO_PRESENCE
,
9073 ALC225_STANDARD_PINS
,
9075 {0x14, 0x901701b0}),
9076 SND_HDA_PIN_QUIRK(0x10ec0225, 0x1028, "Dell", ALC225_FIXUP_DELL1_MIC_NO_PRESENCE
,
9077 ALC225_STANDARD_PINS
,
9079 {0x1b, 0x90170110}),
9080 SND_HDA_PIN_QUIRK(0x10ec0233, 0x8086, "Intel NUC Skull Canyon", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE
,
9083 {0x21, 0x02211020}),
9084 SND_HDA_PIN_QUIRK(0x10ec0235, 0x17aa, "Lenovo", ALC233_FIXUP_LENOVO_LINE2_MIC_HOTKEY
,
9088 {0x21, 0x02211020}),
9089 SND_HDA_PIN_QUIRK(0x10ec0235, 0x17aa, "Lenovo", ALC294_FIXUP_LENOVO_MIC_LOCATION
,
9094 {0x21, 0x0221101f}),
9095 SND_HDA_PIN_QUIRK(0x10ec0235, 0x17aa, "Lenovo", ALC294_FIXUP_LENOVO_MIC_LOCATION
,
9100 {0x21, 0x0221101f}),
9101 SND_HDA_PIN_QUIRK(0x10ec0235, 0x17aa, "Lenovo", ALC294_FIXUP_LENOVO_MIC_LOCATION
,
9105 {0x21, 0x0221101f}),
9106 SND_HDA_PIN_QUIRK(0x10ec0236, 0x1028, "Dell", ALC236_FIXUP_DELL_AIO_HEADSET_MIC
,
9107 {0x21, 0x02211010}),
9108 SND_HDA_PIN_QUIRK(0x10ec0236, 0x103c, "HP", ALC256_FIXUP_HP_HEADSET_MIC
,
9111 {0x21, 0x02211030}),
9112 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL2_MIC_NO_PRESENCE
,
9114 {0x21, 0x02211020}),
9115 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE
,
9117 {0x21, 0x02211040}),
9118 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE
,
9121 {0x21, 0x02211020}),
9122 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE
,
9125 {0x21, 0x02211030}),
9126 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE
,
9129 {0x21, 0x0221101f}),
9130 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE
,
9133 {0x21, 0x0221101f}),
9134 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE
,
9137 {0x21, 0x0221103f}),
9138 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE
,
9141 {0x21, 0x0221103f}),
9142 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE
,
9145 {0x21, 0x0221103f}),
9146 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE
,
9149 {0x21, 0x0221105f}),
9150 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE
,
9153 {0x21, 0x0221101f}),
9154 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE
,
9158 {0x21, 0x0321102f}),
9159 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE
,
9162 {0x21, 0x02211040}),
9163 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE
,
9166 {0x21, 0x02211050}),
9167 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE
,
9170 {0x21, 0x02211030}),
9171 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE
,
9174 {0x21, 0x02211040}),
9175 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE
,
9178 {0x21, 0x02211040}),
9179 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE
,
9182 {0x21, 0x02211050}),
9183 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell Inspiron 5548", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE
,
9186 {0x21, 0x02211040}),
9187 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell Inspiron 5565", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE
,
9190 {0x21, 0x02211030}),
9191 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE
,
9193 {0x21, 0x02211010}),
9194 SND_HDA_PIN_QUIRK(0x10ec0256, 0x1043, "ASUS", ALC256_FIXUP_ASUS_MIC
,
9197 {0x21, 0x04211020}),
9198 SND_HDA_PIN_QUIRK(0x10ec0256, 0x1043, "ASUS", ALC256_FIXUP_ASUS_MIC
,
9201 {0x21, 0x03211020}),
9202 SND_HDA_PIN_QUIRK(0x10ec0256, 0x1043, "ASUS", ALC256_FIXUP_ASUS_MIC_NO_PRESENCE
,
9205 {0x21, 0x03211020}),
9206 SND_HDA_PIN_QUIRK(0x10ec0256, 0x1043, "ASUS", ALC256_FIXUP_ASUS_MIC_NO_PRESENCE
,
9209 {0x21, 0x04211020}),
9210 SND_HDA_PIN_QUIRK(0x10ec0256, 0x1043, "ASUS", ALC256_FIXUP_ASUS_MIC_NO_PRESENCE
,
9213 {0x21, 0x03211020}),
9214 SND_HDA_PIN_QUIRK(0x10ec0256, 0x103c, "HP", ALC256_FIXUP_HP_HEADSET_MIC
,
9217 {0x21, 0x0221101f}),
9218 SND_HDA_PIN_QUIRK(0x10ec0274, 0x103c, "HP", ALC274_FIXUP_HP_HEADSET_MIC
,
9221 {0x21, 0x03211020}),
9222 SND_HDA_PIN_QUIRK(0x10ec0280, 0x103c, "HP", ALC280_FIXUP_HP_GPIO4
,
9226 {0x1a, 0x04a11020}),
9227 SND_HDA_PIN_QUIRK(0x10ec0280, 0x103c, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED
,
9233 {0x1b, 0x02011020}),
9234 SND_HDA_PIN_QUIRK(0x10ec0282, 0x103c, "HP 15 Touchsmart", ALC269_FIXUP_HP_MUTE_LED_MIC1
,
9235 ALC282_STANDARD_PINS
,
9238 {0x21, 0x0321101f}),
9239 SND_HDA_PIN_QUIRK(0x10ec0282, 0x103c, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1
,
9240 ALC282_STANDARD_PINS
,
9243 {0x21, 0x03211040}),
9244 SND_HDA_PIN_QUIRK(0x10ec0282, 0x103c, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1
,
9245 ALC282_STANDARD_PINS
,
9248 {0x21, 0x03211020}),
9249 SND_HDA_PIN_QUIRK(0x10ec0282, 0x103c, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1
,
9250 ALC282_STANDARD_PINS
,
9253 {0x21, 0x0421101f}),
9254 SND_HDA_PIN_QUIRK(0x10ec0282, 0x103c, "HP", ALC269_FIXUP_HP_LINE1_MIC1_LED
,
9255 ALC282_STANDARD_PINS
,
9258 {0x21, 0x04211020}),
9259 SND_HDA_PIN_QUIRK(0x10ec0282, 0x1025, "Acer", ALC282_FIXUP_ACER_DISABLE_LINEOUT
,
9260 ALC282_STANDARD_PINS
,
9266 {0x21, 0x0321101f}),
9267 SND_HDA_PIN_QUIRK(0x10ec0282, 0x1025, "Acer", ALC282_FIXUP_ACER_DISABLE_LINEOUT
,
9268 ALC282_STANDARD_PINS
,
9274 {0x21, 0x0321101f}),
9275 SND_HDA_PIN_QUIRK(0x10ec0283, 0x1028, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE
,
9276 ALC282_STANDARD_PINS
,
9278 {0x21, 0x0321101f}),
9279 SND_HDA_PIN_QUIRK(0x10ec0283, 0x1028, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE
,
9282 {0x21, 0x02211030}),
9283 SND_HDA_PIN_QUIRK(0x10ec0283, 0x1028, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE
,
9284 ALC282_STANDARD_PINS
,
9287 {0x21, 0x0321101f}),
9288 SND_HDA_PIN_QUIRK(0x10ec0285, 0x17aa, "Lenovo", ALC285_FIXUP_LENOVO_PC_BEEP_IN_NOISE
,
9292 {0x21, 0x04211020}),
9293 SND_HDA_PIN_QUIRK(0x10ec0285, 0x17aa, "Lenovo", ALC285_FIXUP_LENOVO_PC_BEEP_IN_NOISE
,
9297 {0x21, 0x04211020}),
9298 SND_HDA_PIN_QUIRK(0x10ec0285, 0x17aa, "Lenovo", ALC285_FIXUP_THINKPAD_NO_BASS_SPK_HEADSET_JACK
,
9301 {0x21, 0x04211020}),
9302 SND_HDA_PIN_QUIRK(0x10ec0287, 0x17aa, "Lenovo", ALC285_FIXUP_THINKPAD_HEADSET_JACK
,
9306 {0x21, 0x03211020}),
9307 SND_HDA_PIN_QUIRK(0x10ec0286, 0x1025, "Acer", ALC286_FIXUP_ACER_AIO_MIC_NO_PRESENCE
,
9310 {0x21, 0x02211020}),
9311 SND_HDA_PIN_QUIRK(0x10ec0288, 0x1028, "Dell", ALC288_FIXUP_DELL1_MIC_NO_PRESENCE
,
9314 {0x21, 0x0321101f}),
9315 SND_HDA_PIN_QUIRK(0x10ec0290, 0x103c, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1
,
9316 ALC290_STANDARD_PINS
,
9319 {0x1a, 0x04a11020}),
9320 SND_HDA_PIN_QUIRK(0x10ec0290, 0x103c, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1
,
9321 ALC290_STANDARD_PINS
,
9324 {0x1a, 0x04a11020}),
9325 SND_HDA_PIN_QUIRK(0x10ec0290, 0x103c, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1
,
9326 ALC290_STANDARD_PINS
,
9328 {0x1a, 0x04a11020}),
9329 SND_HDA_PIN_QUIRK(0x10ec0290, 0x103c, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1
,
9330 ALC290_STANDARD_PINS
,
9332 {0x1a, 0x04a11040}),
9333 SND_HDA_PIN_QUIRK(0x10ec0290, 0x103c, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1
,
9334 ALC290_STANDARD_PINS
,
9337 {0x1a, 0x04a11040}),
9338 SND_HDA_PIN_QUIRK(0x10ec0290, 0x103c, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1
,
9339 ALC290_STANDARD_PINS
,
9342 {0x1a, 0x04a11020}),
9343 SND_HDA_PIN_QUIRK(0x10ec0290, 0x103c, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1
,
9344 ALC290_STANDARD_PINS
,
9347 {0x1a, 0x04a11020}),
9348 SND_HDA_PIN_QUIRK(0x10ec0292, 0x1028, "Dell", ALC269_FIXUP_DELL2_MIC_NO_PRESENCE
,
9349 ALC292_STANDARD_PINS
,
9352 {0x19, 0x01a19030}),
9353 SND_HDA_PIN_QUIRK(0x10ec0292, 0x1028, "Dell", ALC269_FIXUP_DELL2_MIC_NO_PRESENCE
,
9354 ALC292_STANDARD_PINS
,
9358 {0x19, 0x01a1903e}),
9359 SND_HDA_PIN_QUIRK(0x10ec0292, 0x1028, "Dell", ALC269_FIXUP_DELL3_MIC_NO_PRESENCE
,
9360 ALC292_STANDARD_PINS
,
9361 {0x12, 0x90a60140}),
9362 SND_HDA_PIN_QUIRK(0x10ec0293, 0x1028, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE
,
9363 ALC292_STANDARD_PINS
,
9366 {0x19, 0x21a19030}),
9367 SND_HDA_PIN_QUIRK(0x10ec0293, 0x1028, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE
,
9368 ALC292_STANDARD_PINS
,
9369 {0x13, 0x90a60140}),
9370 SND_HDA_PIN_QUIRK(0x10ec0294, 0x1043, "ASUS", ALC294_FIXUP_ASUS_HPE
,
9372 {0x21, 0x04211020}),
9373 SND_HDA_PIN_QUIRK(0x10ec0294, 0x1043, "ASUS", ALC294_FIXUP_ASUS_MIC
,
9376 {0x21, 0x04211020}),
9377 SND_HDA_PIN_QUIRK(0x10ec0294, 0x1043, "ASUS", ALC294_FIXUP_ASUS_SPK
,
9380 {0x21, 0x03211020}),
9381 SND_HDA_PIN_QUIRK(0x10ec0294, 0x1043, "ASUS", ALC294_FIXUP_ASUS_SPK
,
9384 {0x21, 0x04211020}),
9385 SND_HDA_PIN_QUIRK(0x10ec0295, 0x1043, "ASUS", ALC294_FIXUP_ASUS_SPK
,
9388 {0x21, 0x03211020}),
9389 SND_HDA_PIN_QUIRK(0x10ec0295, 0x1043, "ASUS", ALC295_FIXUP_ASUS_MIC_NO_PRESENCE
,
9392 {0x21, 0x04211030}),
9393 SND_HDA_PIN_QUIRK(0x10ec0295, 0x1043, "ASUS", ALC295_FIXUP_ASUS_MIC_NO_PRESENCE
,
9396 {0x21, 0x03211020}),
9397 SND_HDA_PIN_QUIRK(0x10ec0295, 0x1043, "ASUS", ALC295_FIXUP_ASUS_MIC_NO_PRESENCE
,
9400 {0x21, 0x03211020}),
9401 SND_HDA_PIN_QUIRK(0x10ec0295, 0x1028, "Dell", ALC269_FIXUP_DELL4_MIC_NO_PRESENCE
,
9403 {0x21, 0x04211020}),
9404 SND_HDA_PIN_QUIRK(0x10ec0295, 0x1028, "Dell", ALC269_FIXUP_DELL4_MIC_NO_PRESENCE
,
9406 {0x21, 0x04211030}),
9407 SND_HDA_PIN_QUIRK(0x10ec0295, 0x1028, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE
,
9408 ALC295_STANDARD_PINS
,
9410 {0x18, 0x21a19030}),
9411 SND_HDA_PIN_QUIRK(0x10ec0295, 0x1028, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE
,
9412 ALC295_STANDARD_PINS
,
9414 {0x18, 0x21a19050}),
9415 SND_HDA_PIN_QUIRK(0x10ec0295, 0x1028, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE
,
9416 ALC295_STANDARD_PINS
),
9417 SND_HDA_PIN_QUIRK(0x10ec0298, 0x1028, "Dell", ALC298_FIXUP_DELL1_MIC_NO_PRESENCE
,
9418 ALC298_STANDARD_PINS
,
9419 {0x17, 0x90170110}),
9420 SND_HDA_PIN_QUIRK(0x10ec0298, 0x1028, "Dell", ALC298_FIXUP_DELL1_MIC_NO_PRESENCE
,
9421 ALC298_STANDARD_PINS
,
9422 {0x17, 0x90170140}),
9423 SND_HDA_PIN_QUIRK(0x10ec0298, 0x1028, "Dell", ALC298_FIXUP_DELL1_MIC_NO_PRESENCE
,
9424 ALC298_STANDARD_PINS
,
9425 {0x17, 0x90170150}),
9426 SND_HDA_PIN_QUIRK(0x10ec0298, 0x1028, "Dell", ALC298_FIXUP_SPK_VOLUME
,
9431 {0x21, 0x03211030}),
9432 SND_HDA_PIN_QUIRK(0x10ec0298, 0x1028, "Dell", ALC298_FIXUP_ALIENWARE_MIC_NO_PRESENCE
,
9436 {0x21, 0x03211020}),
9437 SND_HDA_PIN_QUIRK(0x10ec0299, 0x1028, "Dell", ALC269_FIXUP_DELL4_MIC_NO_PRESENCE
,
9438 ALC225_STANDARD_PINS
,
9440 {0x17, 0x90170110}),
9441 SND_HDA_PIN_QUIRK(0x10ec0623, 0x17aa, "Lenovo", ALC283_FIXUP_HEADSET_MIC
,
9446 {0x21, 0x0221101f}),
9450 /* This is the fallback pin_fixup_tbl for alc269 family, to make the tbl match
9451 * more machines, don't need to match all valid pins, just need to match
9452 * all the pins defined in the tbl. Just because of this reason, it is possible
9453 * that a single machine matches multiple tbls, so there is one limitation:
9454 * at most one tbl is allowed to define for the same vendor and same codec
9456 static const struct snd_hda_pin_quirk alc269_fallback_pin_fixup_tbl
[] = {
9457 SND_HDA_PIN_QUIRK(0x10ec0289, 0x1028, "Dell", ALC269_FIXUP_DELL4_MIC_NO_PRESENCE
,
9459 {0x1b, 0x40000000}),
9460 SND_HDA_PIN_QUIRK(0x10ec0256, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE
,
9462 {0x1a, 0x40000000}),
9463 SND_HDA_PIN_QUIRK(0x10ec0236, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE
,
9465 {0x1a, 0x40000000}),
9466 SND_HDA_PIN_QUIRK(0x10ec0274, 0x1028, "Dell", ALC274_FIXUP_DELL_AIO_LINEOUT_VERB
,
9468 {0x1a, 0x40000000}),
9472 static void alc269_fill_coef(struct hda_codec
*codec
)
9474 struct alc_spec
*spec
= codec
->spec
;
9477 if (spec
->codec_variant
!= ALC269_TYPE_ALC269VB
)
9480 if ((alc_get_coef0(codec
) & 0x00ff) < 0x015) {
9481 alc_write_coef_idx(codec
, 0xf, 0x960b);
9482 alc_write_coef_idx(codec
, 0xe, 0x8817);
9485 if ((alc_get_coef0(codec
) & 0x00ff) == 0x016) {
9486 alc_write_coef_idx(codec
, 0xf, 0x960b);
9487 alc_write_coef_idx(codec
, 0xe, 0x8814);
9490 if ((alc_get_coef0(codec
) & 0x00ff) == 0x017) {
9491 /* Power up output pin */
9492 alc_update_coef_idx(codec
, 0x04, 0, 1<<11);
9495 if ((alc_get_coef0(codec
) & 0x00ff) == 0x018) {
9496 val
= alc_read_coef_idx(codec
, 0xd);
9497 if (val
!= -1 && (val
& 0x0c00) >> 10 != 0x1) {
9498 /* Capless ramp up clock control */
9499 alc_write_coef_idx(codec
, 0xd, val
| (1<<10));
9501 val
= alc_read_coef_idx(codec
, 0x17);
9502 if (val
!= -1 && (val
& 0x01c0) >> 6 != 0x4) {
9503 /* Class D power on reset */
9504 alc_write_coef_idx(codec
, 0x17, val
| (1<<7));
9509 alc_update_coef_idx(codec
, 0x4, 0, 1<<11);
9514 static int patch_alc269(struct hda_codec
*codec
)
9516 struct alc_spec
*spec
;
9519 err
= alc_alloc_spec(codec
, 0x0b);
9524 spec
->gen
.shared_mic_vref_pin
= 0x18;
9525 codec
->power_save_node
= 0;
9528 codec
->patch_ops
.suspend
= alc269_suspend
;
9529 codec
->patch_ops
.resume
= alc269_resume
;
9531 spec
->shutup
= alc_default_shutup
;
9532 spec
->init_hook
= alc_default_init
;
9534 switch (codec
->core
.vendor_id
) {
9536 spec
->codec_variant
= ALC269_TYPE_ALC269VA
;
9537 switch (alc_get_coef0(codec
) & 0x00f0) {
9539 if (codec
->bus
->pci
&&
9540 codec
->bus
->pci
->subsystem_vendor
== 0x1025 &&
9541 spec
->cdefine
.platform_type
== 1)
9542 err
= alc_codec_rename(codec
, "ALC271X");
9543 spec
->codec_variant
= ALC269_TYPE_ALC269VB
;
9546 if (codec
->bus
->pci
&&
9547 codec
->bus
->pci
->subsystem_vendor
== 0x17aa &&
9548 codec
->bus
->pci
->subsystem_device
== 0x21f3)
9549 err
= alc_codec_rename(codec
, "ALC3202");
9550 spec
->codec_variant
= ALC269_TYPE_ALC269VC
;
9553 spec
->codec_variant
= ALC269_TYPE_ALC269VD
;
9556 alc_fix_pll_init(codec
, 0x20, 0x04, 15);
9560 spec
->shutup
= alc269_shutup
;
9561 spec
->init_hook
= alc269_fill_coef
;
9562 alc269_fill_coef(codec
);
9567 spec
->codec_variant
= ALC269_TYPE_ALC280
;
9570 spec
->codec_variant
= ALC269_TYPE_ALC282
;
9571 spec
->shutup
= alc282_shutup
;
9572 spec
->init_hook
= alc282_init
;
9576 spec
->codec_variant
= ALC269_TYPE_ALC283
;
9577 spec
->shutup
= alc283_shutup
;
9578 spec
->init_hook
= alc283_init
;
9582 spec
->codec_variant
= ALC269_TYPE_ALC284
;
9585 spec
->codec_variant
= ALC269_TYPE_ALC293
;
9589 spec
->codec_variant
= ALC269_TYPE_ALC286
;
9592 spec
->codec_variant
= ALC269_TYPE_ALC298
;
9596 spec
->codec_variant
= ALC269_TYPE_ALC255
;
9597 spec
->shutup
= alc256_shutup
;
9598 spec
->init_hook
= alc256_init
;
9603 spec
->codec_variant
= ALC269_TYPE_ALC256
;
9604 spec
->shutup
= alc256_shutup
;
9605 spec
->init_hook
= alc256_init
;
9606 spec
->gen
.mixer_nid
= 0; /* ALC256 does not have any loopback mixer path */
9609 spec
->codec_variant
= ALC269_TYPE_ALC257
;
9610 spec
->shutup
= alc256_shutup
;
9611 spec
->init_hook
= alc256_init
;
9612 spec
->gen
.mixer_nid
= 0;
9618 spec
->codec_variant
= ALC269_TYPE_ALC215
;
9619 spec
->shutup
= alc225_shutup
;
9620 spec
->init_hook
= alc225_init
;
9621 spec
->gen
.mixer_nid
= 0;
9626 spec
->codec_variant
= ALC269_TYPE_ALC225
;
9627 spec
->shutup
= alc225_shutup
;
9628 spec
->init_hook
= alc225_init
;
9629 spec
->gen
.mixer_nid
= 0; /* no loopback on ALC225, ALC295 and ALC299 */
9632 spec
->codec_variant
= ALC269_TYPE_ALC287
;
9633 spec
->shutup
= alc225_shutup
;
9634 spec
->init_hook
= alc225_init
;
9635 spec
->gen
.mixer_nid
= 0; /* no loopback on ALC287 */
9640 spec
->codec_variant
= ALC269_TYPE_ALC294
;
9641 spec
->gen
.mixer_nid
= 0; /* ALC2x4 does not have any loopback mixer path */
9642 alc_update_coef_idx(codec
, 0x6b, 0x0018, (1<<4) | (1<<3)); /* UAJ MIC Vref control by verb */
9643 spec
->init_hook
= alc294_init
;
9646 spec
->codec_variant
= ALC269_TYPE_ALC300
;
9647 spec
->gen
.mixer_nid
= 0; /* no loopback on ALC300 */
9650 spec
->codec_variant
= ALC269_TYPE_ALC623
;
9656 spec
->codec_variant
= ALC269_TYPE_ALC700
;
9657 spec
->gen
.mixer_nid
= 0; /* ALC700 does not have any loopback mixer path */
9658 alc_update_coef_idx(codec
, 0x4a, 1 << 15, 0); /* Combo jack auto trigger control */
9659 spec
->init_hook
= alc294_init
;
9664 if (snd_hda_codec_read(codec
, 0x51, 0, AC_VERB_PARAMETERS
, 0) == 0x10ec5505) {
9665 spec
->has_alc5505_dsp
= 1;
9666 spec
->init_hook
= alc5505_dsp_init
;
9669 alc_pre_init(codec
);
9671 snd_hda_pick_fixup(codec
, alc269_fixup_models
,
9672 alc269_fixup_tbl
, alc269_fixups
);
9673 /* FIXME: both TX300 and ROG Strix G17 have the same SSID, and
9674 * the quirk breaks the latter (bko#214101).
9675 * Clear the wrong entry.
9677 if (codec
->fixup_id
== ALC282_FIXUP_ASUS_TX300
&&
9678 codec
->core
.vendor_id
== 0x10ec0294) {
9679 codec_dbg(codec
, "Clear wrong fixup for ASUS ROG Strix G17\n");
9680 codec
->fixup_id
= HDA_FIXUP_ID_NOT_SET
;
9683 snd_hda_pick_pin_fixup(codec
, alc269_pin_fixup_tbl
, alc269_fixups
, true);
9684 snd_hda_pick_pin_fixup(codec
, alc269_fallback_pin_fixup_tbl
, alc269_fixups
, false);
9685 snd_hda_pick_fixup(codec
, NULL
, alc269_fixup_vendor_tbl
,
9687 snd_hda_apply_fixup(codec
, HDA_FIXUP_ACT_PRE_PROBE
);
9689 alc_auto_parse_customize_define(codec
);
9691 if (has_cdefine_beep(codec
))
9692 spec
->gen
.beep_nid
= 0x01;
9694 /* automatic parse from the BIOS config */
9695 err
= alc269_parse_auto_config(codec
);
9699 if (!spec
->gen
.no_analog
&& spec
->gen
.beep_nid
&& spec
->gen
.mixer_nid
) {
9700 err
= set_beep_amp(spec
, spec
->gen
.mixer_nid
, 0x04, HDA_INPUT
);
9705 snd_hda_apply_fixup(codec
, HDA_FIXUP_ACT_PROBE
);
9718 static int alc861_parse_auto_config(struct hda_codec
*codec
)
9720 static const hda_nid_t alc861_ignore
[] = { 0x1d, 0 };
9721 static const hda_nid_t alc861_ssids
[] = { 0x0e, 0x0f, 0x0b, 0 };
9722 return alc_parse_auto_config(codec
, alc861_ignore
, alc861_ssids
);
9725 /* Pin config fixes */
9727 ALC861_FIXUP_FSC_AMILO_PI1505
,
9728 ALC861_FIXUP_AMP_VREF_0F
,
9729 ALC861_FIXUP_NO_JACK_DETECT
,
9730 ALC861_FIXUP_ASUS_A6RP
,
9731 ALC660_FIXUP_ASUS_W7J
,
9734 /* On some laptops, VREF of pin 0x0f is abused for controlling the main amp */
9735 static void alc861_fixup_asus_amp_vref_0f(struct hda_codec
*codec
,
9736 const struct hda_fixup
*fix
, int action
)
9738 struct alc_spec
*spec
= codec
->spec
;
9741 if (action
!= HDA_FIXUP_ACT_INIT
)
9743 val
= snd_hda_codec_get_pin_target(codec
, 0x0f);
9744 if (!(val
& (AC_PINCTL_IN_EN
| AC_PINCTL_OUT_EN
)))
9745 val
|= AC_PINCTL_IN_EN
;
9746 val
|= AC_PINCTL_VREF_50
;
9747 snd_hda_set_pin_ctl(codec
, 0x0f, val
);
9748 spec
->gen
.keep_vref_in_automute
= 1;
9751 /* suppress the jack-detection */
9752 static void alc_fixup_no_jack_detect(struct hda_codec
*codec
,
9753 const struct hda_fixup
*fix
, int action
)
9755 if (action
== HDA_FIXUP_ACT_PRE_PROBE
)
9756 codec
->no_jack_detect
= 1;
9759 static const struct hda_fixup alc861_fixups
[] = {
9760 [ALC861_FIXUP_FSC_AMILO_PI1505
] = {
9761 .type
= HDA_FIXUP_PINS
,
9762 .v
.pins
= (const struct hda_pintbl
[]) {
9763 { 0x0b, 0x0221101f }, /* HP */
9764 { 0x0f, 0x90170310 }, /* speaker */
9768 [ALC861_FIXUP_AMP_VREF_0F
] = {
9769 .type
= HDA_FIXUP_FUNC
,
9770 .v
.func
= alc861_fixup_asus_amp_vref_0f
,
9772 [ALC861_FIXUP_NO_JACK_DETECT
] = {
9773 .type
= HDA_FIXUP_FUNC
,
9774 .v
.func
= alc_fixup_no_jack_detect
,
9776 [ALC861_FIXUP_ASUS_A6RP
] = {
9777 .type
= HDA_FIXUP_FUNC
,
9778 .v
.func
= alc861_fixup_asus_amp_vref_0f
,
9780 .chain_id
= ALC861_FIXUP_NO_JACK_DETECT
,
9782 [ALC660_FIXUP_ASUS_W7J
] = {
9783 .type
= HDA_FIXUP_VERBS
,
9784 .v
.verbs
= (const struct hda_verb
[]) {
9785 /* ASUS W7J needs a magic pin setup on unused NID 0x10
9786 * for enabling outputs
9788 {0x10, AC_VERB_SET_PIN_WIDGET_CONTROL
, 0x24},
9794 static const struct snd_pci_quirk alc861_fixup_tbl
[] = {
9795 SND_PCI_QUIRK(0x1043, 0x1253, "ASUS W7J", ALC660_FIXUP_ASUS_W7J
),
9796 SND_PCI_QUIRK(0x1043, 0x1263, "ASUS Z35HL", ALC660_FIXUP_ASUS_W7J
),
9797 SND_PCI_QUIRK(0x1043, 0x1393, "ASUS A6Rp", ALC861_FIXUP_ASUS_A6RP
),
9798 SND_PCI_QUIRK_VENDOR(0x1043, "ASUS laptop", ALC861_FIXUP_AMP_VREF_0F
),
9799 SND_PCI_QUIRK(0x1462, 0x7254, "HP DX2200", ALC861_FIXUP_NO_JACK_DETECT
),
9800 SND_PCI_QUIRK_VENDOR(0x1584, "Haier/Uniwill", ALC861_FIXUP_AMP_VREF_0F
),
9801 SND_PCI_QUIRK(0x1734, 0x10c7, "FSC Amilo Pi1505", ALC861_FIXUP_FSC_AMILO_PI1505
),
9807 static int patch_alc861(struct hda_codec
*codec
)
9809 struct alc_spec
*spec
;
9812 err
= alc_alloc_spec(codec
, 0x15);
9817 if (has_cdefine_beep(codec
))
9818 spec
->gen
.beep_nid
= 0x23;
9821 spec
->power_hook
= alc_power_eapd
;
9824 alc_pre_init(codec
);
9826 snd_hda_pick_fixup(codec
, NULL
, alc861_fixup_tbl
, alc861_fixups
);
9827 snd_hda_apply_fixup(codec
, HDA_FIXUP_ACT_PRE_PROBE
);
9829 /* automatic parse from the BIOS config */
9830 err
= alc861_parse_auto_config(codec
);
9834 if (!spec
->gen
.no_analog
) {
9835 err
= set_beep_amp(spec
, 0x23, 0, HDA_OUTPUT
);
9840 snd_hda_apply_fixup(codec
, HDA_FIXUP_ACT_PROBE
);
9854 * In addition, an independent DAC
9856 static int alc861vd_parse_auto_config(struct hda_codec
*codec
)
9858 static const hda_nid_t alc861vd_ignore
[] = { 0x1d, 0 };
9859 static const hda_nid_t alc861vd_ssids
[] = { 0x15, 0x1b, 0x14, 0 };
9860 return alc_parse_auto_config(codec
, alc861vd_ignore
, alc861vd_ssids
);
9864 ALC660VD_FIX_ASUS_GPIO1
,
9865 ALC861VD_FIX_DALLAS
,
9868 /* exclude VREF80 */
9869 static void alc861vd_fixup_dallas(struct hda_codec
*codec
,
9870 const struct hda_fixup
*fix
, int action
)
9872 if (action
== HDA_FIXUP_ACT_PRE_PROBE
) {
9873 snd_hda_override_pin_caps(codec
, 0x18, 0x00000734);
9874 snd_hda_override_pin_caps(codec
, 0x19, 0x0000073c);
9879 static void alc660vd_fixup_asus_gpio1(struct hda_codec
*codec
,
9880 const struct hda_fixup
*fix
, int action
)
9882 struct alc_spec
*spec
= codec
->spec
;
9884 if (action
== HDA_FIXUP_ACT_PRE_PROBE
)
9885 spec
->gpio_mask
|= 0x02;
9886 alc_fixup_gpio(codec
, action
, 0x01);
9889 static const struct hda_fixup alc861vd_fixups
[] = {
9890 [ALC660VD_FIX_ASUS_GPIO1
] = {
9891 .type
= HDA_FIXUP_FUNC
,
9892 .v
.func
= alc660vd_fixup_asus_gpio1
,
9894 [ALC861VD_FIX_DALLAS
] = {
9895 .type
= HDA_FIXUP_FUNC
,
9896 .v
.func
= alc861vd_fixup_dallas
,
9900 static const struct snd_pci_quirk alc861vd_fixup_tbl
[] = {
9901 SND_PCI_QUIRK(0x103c, 0x30bf, "HP TX1000", ALC861VD_FIX_DALLAS
),
9902 SND_PCI_QUIRK(0x1043, 0x1339, "ASUS A7-K", ALC660VD_FIX_ASUS_GPIO1
),
9903 SND_PCI_QUIRK(0x1179, 0xff31, "Toshiba L30-149", ALC861VD_FIX_DALLAS
),
9909 static int patch_alc861vd(struct hda_codec
*codec
)
9911 struct alc_spec
*spec
;
9914 err
= alc_alloc_spec(codec
, 0x0b);
9919 if (has_cdefine_beep(codec
))
9920 spec
->gen
.beep_nid
= 0x23;
9922 spec
->shutup
= alc_eapd_shutup
;
9924 alc_pre_init(codec
);
9926 snd_hda_pick_fixup(codec
, NULL
, alc861vd_fixup_tbl
, alc861vd_fixups
);
9927 snd_hda_apply_fixup(codec
, HDA_FIXUP_ACT_PRE_PROBE
);
9929 /* automatic parse from the BIOS config */
9930 err
= alc861vd_parse_auto_config(codec
);
9934 if (!spec
->gen
.no_analog
) {
9935 err
= set_beep_amp(spec
, 0x0b, 0x05, HDA_INPUT
);
9940 snd_hda_apply_fixup(codec
, HDA_FIXUP_ACT_PROBE
);
9952 * ALC662 is almost identical with ALC880 but has cleaner and more flexible
9953 * configuration. Each pin widget can choose any input DACs and a mixer.
9954 * Each ADC is connected from a mixer of all inputs. This makes possible
9955 * 6-channel independent captures.
9957 * In addition, an independent DAC for the multi-playback (not used in this
9962 * BIOS auto configuration
9965 static int alc662_parse_auto_config(struct hda_codec
*codec
)
9967 static const hda_nid_t alc662_ignore
[] = { 0x1d, 0 };
9968 static const hda_nid_t alc663_ssids
[] = { 0x15, 0x1b, 0x14, 0x21 };
9969 static const hda_nid_t alc662_ssids
[] = { 0x15, 0x1b, 0x14, 0 };
9970 const hda_nid_t
*ssids
;
9972 if (codec
->core
.vendor_id
== 0x10ec0272 || codec
->core
.vendor_id
== 0x10ec0663 ||
9973 codec
->core
.vendor_id
== 0x10ec0665 || codec
->core
.vendor_id
== 0x10ec0670 ||
9974 codec
->core
.vendor_id
== 0x10ec0671)
9975 ssids
= alc663_ssids
;
9977 ssids
= alc662_ssids
;
9978 return alc_parse_auto_config(codec
, alc662_ignore
, ssids
);
9981 static void alc272_fixup_mario(struct hda_codec
*codec
,
9982 const struct hda_fixup
*fix
, int action
)
9984 if (action
!= HDA_FIXUP_ACT_PRE_PROBE
)
9986 if (snd_hda_override_amp_caps(codec
, 0x2, HDA_OUTPUT
,
9987 (0x3b << AC_AMPCAP_OFFSET_SHIFT
) |
9988 (0x3b << AC_AMPCAP_NUM_STEPS_SHIFT
) |
9989 (0x03 << AC_AMPCAP_STEP_SIZE_SHIFT
) |
9990 (0 << AC_AMPCAP_MUTE_SHIFT
)))
9991 codec_warn(codec
, "failed to override amp caps for NID 0x2\n");
9994 static const struct snd_pcm_chmap_elem asus_pcm_2_1_chmaps
[] = {
9996 .map
= { SNDRV_CHMAP_FL
, SNDRV_CHMAP_FR
} },
9998 .map
= { SNDRV_CHMAP_FL
, SNDRV_CHMAP_FR
,
9999 SNDRV_CHMAP_NA
, SNDRV_CHMAP_LFE
} }, /* LFE only on right */
10003 /* override the 2.1 chmap */
10004 static void alc_fixup_bass_chmap(struct hda_codec
*codec
,
10005 const struct hda_fixup
*fix
, int action
)
10007 if (action
== HDA_FIXUP_ACT_BUILD
) {
10008 struct alc_spec
*spec
= codec
->spec
;
10009 spec
->gen
.pcm_rec
[0]->stream
[0].chmap
= asus_pcm_2_1_chmaps
;
10013 /* avoid D3 for keeping GPIO up */
10014 static unsigned int gpio_led_power_filter(struct hda_codec
*codec
,
10016 unsigned int power_state
)
10018 struct alc_spec
*spec
= codec
->spec
;
10019 if (nid
== codec
->core
.afg
&& power_state
== AC_PWRST_D3
&& spec
->gpio_data
)
10020 return AC_PWRST_D0
;
10021 return power_state
;
10024 static void alc662_fixup_led_gpio1(struct hda_codec
*codec
,
10025 const struct hda_fixup
*fix
, int action
)
10027 struct alc_spec
*spec
= codec
->spec
;
10029 alc_fixup_hp_gpio_led(codec
, action
, 0x01, 0);
10030 if (action
== HDA_FIXUP_ACT_PRE_PROBE
) {
10031 spec
->mute_led_polarity
= 1;
10032 codec
->power_filter
= gpio_led_power_filter
;
10036 static void alc662_usi_automute_hook(struct hda_codec
*codec
,
10037 struct hda_jack_callback
*jack
)
10039 struct alc_spec
*spec
= codec
->spec
;
10042 snd_hda_gen_hp_automute(codec
, jack
);
10044 vref
= spec
->gen
.hp_jack_present
? PIN_VREF80
: 0;
10046 snd_hda_codec_write(codec
, 0x19, 0, AC_VERB_SET_PIN_WIDGET_CONTROL
,
10050 static void alc662_fixup_usi_headset_mic(struct hda_codec
*codec
,
10051 const struct hda_fixup
*fix
, int action
)
10053 struct alc_spec
*spec
= codec
->spec
;
10054 if (action
== HDA_FIXUP_ACT_PRE_PROBE
) {
10055 spec
->parse_flags
|= HDA_PINCFG_HEADSET_MIC
;
10056 spec
->gen
.hp_automute_hook
= alc662_usi_automute_hook
;
10060 static void alc662_aspire_ethos_mute_speakers(struct hda_codec
*codec
,
10061 struct hda_jack_callback
*cb
)
10063 /* surround speakers at 0x1b already get muted automatically when
10064 * headphones are plugged in, but we have to mute/unmute the remaining
10065 * channels manually:
10066 * 0x15 - front left/front right
10067 * 0x18 - front center/ LFE
10069 if (snd_hda_jack_detect_state(codec
, 0x1b) == HDA_JACK_PRESENT
) {
10070 snd_hda_set_pin_ctl_cache(codec
, 0x15, 0);
10071 snd_hda_set_pin_ctl_cache(codec
, 0x18, 0);
10073 snd_hda_set_pin_ctl_cache(codec
, 0x15, PIN_OUT
);
10074 snd_hda_set_pin_ctl_cache(codec
, 0x18, PIN_OUT
);
10078 static void alc662_fixup_aspire_ethos_hp(struct hda_codec
*codec
,
10079 const struct hda_fixup
*fix
, int action
)
10081 /* Pin 0x1b: shared headphones jack and surround speakers */
10082 if (!is_jack_detectable(codec
, 0x1b))
10086 case HDA_FIXUP_ACT_PRE_PROBE
:
10087 snd_hda_jack_detect_enable_callback(codec
, 0x1b,
10088 alc662_aspire_ethos_mute_speakers
);
10089 /* subwoofer needs an extra GPIO setting to become audible */
10090 alc_setup_gpio(codec
, 0x02);
10092 case HDA_FIXUP_ACT_INIT
:
10093 /* Make sure to start in a correct state, i.e. if
10094 * headphones have been plugged in before powering up the system
10096 alc662_aspire_ethos_mute_speakers(codec
, NULL
);
10101 static void alc671_fixup_hp_headset_mic2(struct hda_codec
*codec
,
10102 const struct hda_fixup
*fix
, int action
)
10104 struct alc_spec
*spec
= codec
->spec
;
10106 static const struct hda_pintbl pincfgs
[] = {
10107 { 0x19, 0x02a11040 }, /* use as headset mic, with its own jack detect */
10108 { 0x1b, 0x0181304f },
10113 case HDA_FIXUP_ACT_PRE_PROBE
:
10114 spec
->gen
.mixer_nid
= 0;
10115 spec
->parse_flags
|= HDA_PINCFG_HEADSET_MIC
;
10116 snd_hda_apply_pincfgs(codec
, pincfgs
);
10118 case HDA_FIXUP_ACT_INIT
:
10119 alc_write_coef_idx(codec
, 0x19, 0xa054);
10124 static const struct coef_fw alc668_coefs
[] = {
10125 WRITE_COEF(0x01, 0xbebe), WRITE_COEF(0x02, 0xaaaa), WRITE_COEF(0x03, 0x0),
10126 WRITE_COEF(0x04, 0x0180), WRITE_COEF(0x06, 0x0), WRITE_COEF(0x07, 0x0f80),
10127 WRITE_COEF(0x08, 0x0031), WRITE_COEF(0x0a, 0x0060), WRITE_COEF(0x0b, 0x0),
10128 WRITE_COEF(0x0c, 0x7cf7), WRITE_COEF(0x0d, 0x1080), WRITE_COEF(0x0e, 0x7f7f),
10129 WRITE_COEF(0x0f, 0xcccc), WRITE_COEF(0x10, 0xddcc), WRITE_COEF(0x11, 0x0001),
10130 WRITE_COEF(0x13, 0x0), WRITE_COEF(0x14, 0x2aa0), WRITE_COEF(0x17, 0xa940),
10131 WRITE_COEF(0x19, 0x0), WRITE_COEF(0x1a, 0x0), WRITE_COEF(0x1b, 0x0),
10132 WRITE_COEF(0x1c, 0x0), WRITE_COEF(0x1d, 0x0), WRITE_COEF(0x1e, 0x7418),
10133 WRITE_COEF(0x1f, 0x0804), WRITE_COEF(0x20, 0x4200), WRITE_COEF(0x21, 0x0468),
10134 WRITE_COEF(0x22, 0x8ccc), WRITE_COEF(0x23, 0x0250), WRITE_COEF(0x24, 0x7418),
10135 WRITE_COEF(0x27, 0x0), WRITE_COEF(0x28, 0x8ccc), WRITE_COEF(0x2a, 0xff00),
10136 WRITE_COEF(0x2b, 0x8000), WRITE_COEF(0xa7, 0xff00), WRITE_COEF(0xa8, 0x8000),
10137 WRITE_COEF(0xaa, 0x2e17), WRITE_COEF(0xab, 0xa0c0), WRITE_COEF(0xac, 0x0),
10138 WRITE_COEF(0xad, 0x0), WRITE_COEF(0xae, 0x2ac6), WRITE_COEF(0xaf, 0xa480),
10139 WRITE_COEF(0xb0, 0x0), WRITE_COEF(0xb1, 0x0), WRITE_COEF(0xb2, 0x0),
10140 WRITE_COEF(0xb3, 0x0), WRITE_COEF(0xb4, 0x0), WRITE_COEF(0xb5, 0x1040),
10141 WRITE_COEF(0xb6, 0xd697), WRITE_COEF(0xb7, 0x902b), WRITE_COEF(0xb8, 0xd697),
10142 WRITE_COEF(0xb9, 0x902b), WRITE_COEF(0xba, 0xb8ba), WRITE_COEF(0xbb, 0xaaab),
10143 WRITE_COEF(0xbc, 0xaaaf), WRITE_COEF(0xbd, 0x6aaa), WRITE_COEF(0xbe, 0x1c02),
10144 WRITE_COEF(0xc0, 0x00ff), WRITE_COEF(0xc1, 0x0fa6),
10148 static void alc668_restore_default_value(struct hda_codec
*codec
)
10150 alc_process_coef_fw(codec
, alc668_coefs
);
10154 ALC662_FIXUP_ASPIRE
,
10155 ALC662_FIXUP_LED_GPIO1
,
10156 ALC662_FIXUP_IDEAPAD
,
10157 ALC272_FIXUP_MARIO
,
10158 ALC662_FIXUP_CZC_ET26
,
10159 ALC662_FIXUP_CZC_P10T
,
10160 ALC662_FIXUP_SKU_IGNORE
,
10161 ALC662_FIXUP_HP_RP5800
,
10162 ALC662_FIXUP_ASUS_MODE1
,
10163 ALC662_FIXUP_ASUS_MODE2
,
10164 ALC662_FIXUP_ASUS_MODE3
,
10165 ALC662_FIXUP_ASUS_MODE4
,
10166 ALC662_FIXUP_ASUS_MODE5
,
10167 ALC662_FIXUP_ASUS_MODE6
,
10168 ALC662_FIXUP_ASUS_MODE7
,
10169 ALC662_FIXUP_ASUS_MODE8
,
10170 ALC662_FIXUP_NO_JACK_DETECT
,
10171 ALC662_FIXUP_ZOTAC_Z68
,
10172 ALC662_FIXUP_INV_DMIC
,
10173 ALC662_FIXUP_DELL_MIC_NO_PRESENCE
,
10174 ALC668_FIXUP_DELL_MIC_NO_PRESENCE
,
10175 ALC662_FIXUP_HEADSET_MODE
,
10176 ALC668_FIXUP_HEADSET_MODE
,
10177 ALC662_FIXUP_BASS_MODE4_CHMAP
,
10178 ALC662_FIXUP_BASS_16
,
10179 ALC662_FIXUP_BASS_1A
,
10180 ALC662_FIXUP_BASS_CHMAP
,
10181 ALC668_FIXUP_AUTO_MUTE
,
10182 ALC668_FIXUP_DELL_DISABLE_AAMIX
,
10183 ALC668_FIXUP_DELL_XPS13
,
10184 ALC662_FIXUP_ASUS_Nx50
,
10185 ALC668_FIXUP_ASUS_Nx51_HEADSET_MODE
,
10186 ALC668_FIXUP_ASUS_Nx51
,
10187 ALC668_FIXUP_MIC_COEF
,
10188 ALC668_FIXUP_ASUS_G751
,
10189 ALC891_FIXUP_HEADSET_MODE
,
10190 ALC891_FIXUP_DELL_MIC_NO_PRESENCE
,
10191 ALC662_FIXUP_ACER_VERITON
,
10192 ALC892_FIXUP_ASROCK_MOBO
,
10193 ALC662_FIXUP_USI_FUNC
,
10194 ALC662_FIXUP_USI_HEADSET_MODE
,
10195 ALC662_FIXUP_LENOVO_MULTI_CODECS
,
10196 ALC669_FIXUP_ACER_ASPIRE_ETHOS
,
10197 ALC669_FIXUP_ACER_ASPIRE_ETHOS_HEADSET
,
10198 ALC671_FIXUP_HP_HEADSET_MIC2
,
10199 ALC662_FIXUP_ACER_X2660G_HEADSET_MODE
,
10200 ALC662_FIXUP_ACER_NITRO_HEADSET_MODE
,
10201 ALC668_FIXUP_ASUS_NO_HEADSET_MIC
,
10202 ALC668_FIXUP_HEADSET_MIC
,
10203 ALC668_FIXUP_MIC_DET_COEF
,
10206 static const struct hda_fixup alc662_fixups
[] = {
10207 [ALC662_FIXUP_ASPIRE
] = {
10208 .type
= HDA_FIXUP_PINS
,
10209 .v
.pins
= (const struct hda_pintbl
[]) {
10210 { 0x15, 0x99130112 }, /* subwoofer */
10214 [ALC662_FIXUP_LED_GPIO1
] = {
10215 .type
= HDA_FIXUP_FUNC
,
10216 .v
.func
= alc662_fixup_led_gpio1
,
10218 [ALC662_FIXUP_IDEAPAD
] = {
10219 .type
= HDA_FIXUP_PINS
,
10220 .v
.pins
= (const struct hda_pintbl
[]) {
10221 { 0x17, 0x99130112 }, /* subwoofer */
10225 .chain_id
= ALC662_FIXUP_LED_GPIO1
,
10227 [ALC272_FIXUP_MARIO
] = {
10228 .type
= HDA_FIXUP_FUNC
,
10229 .v
.func
= alc272_fixup_mario
,
10231 [ALC662_FIXUP_CZC_ET26
] = {
10232 .type
= HDA_FIXUP_PINS
,
10233 .v
.pins
= (const struct hda_pintbl
[]) {
10234 {0x12, 0x403cc000},
10235 {0x14, 0x90170110}, /* speaker */
10236 {0x15, 0x411111f0},
10237 {0x16, 0x411111f0},
10238 {0x18, 0x01a19030}, /* mic */
10239 {0x19, 0x90a7013f}, /* int-mic */
10240 {0x1a, 0x01014020},
10241 {0x1b, 0x0121401f},
10242 {0x1c, 0x411111f0},
10243 {0x1d, 0x411111f0},
10244 {0x1e, 0x40478e35},
10248 .chain_id
= ALC662_FIXUP_SKU_IGNORE
10250 [ALC662_FIXUP_CZC_P10T
] = {
10251 .type
= HDA_FIXUP_VERBS
,
10252 .v
.verbs
= (const struct hda_verb
[]) {
10253 {0x14, AC_VERB_SET_EAPD_BTLENABLE
, 0},
10257 [ALC662_FIXUP_SKU_IGNORE
] = {
10258 .type
= HDA_FIXUP_FUNC
,
10259 .v
.func
= alc_fixup_sku_ignore
,
10261 [ALC662_FIXUP_HP_RP5800
] = {
10262 .type
= HDA_FIXUP_PINS
,
10263 .v
.pins
= (const struct hda_pintbl
[]) {
10264 { 0x14, 0x0221201f }, /* HP out */
10268 .chain_id
= ALC662_FIXUP_SKU_IGNORE
10270 [ALC662_FIXUP_ASUS_MODE1
] = {
10271 .type
= HDA_FIXUP_PINS
,
10272 .v
.pins
= (const struct hda_pintbl
[]) {
10273 { 0x14, 0x99130110 }, /* speaker */
10274 { 0x18, 0x01a19c20 }, /* mic */
10275 { 0x19, 0x99a3092f }, /* int-mic */
10276 { 0x21, 0x0121401f }, /* HP out */
10280 .chain_id
= ALC662_FIXUP_SKU_IGNORE
10282 [ALC662_FIXUP_ASUS_MODE2
] = {
10283 .type
= HDA_FIXUP_PINS
,
10284 .v
.pins
= (const struct hda_pintbl
[]) {
10285 { 0x14, 0x99130110 }, /* speaker */
10286 { 0x18, 0x01a19820 }, /* mic */
10287 { 0x19, 0x99a3092f }, /* int-mic */
10288 { 0x1b, 0x0121401f }, /* HP out */
10292 .chain_id
= ALC662_FIXUP_SKU_IGNORE
10294 [ALC662_FIXUP_ASUS_MODE3
] = {
10295 .type
= HDA_FIXUP_PINS
,
10296 .v
.pins
= (const struct hda_pintbl
[]) {
10297 { 0x14, 0x99130110 }, /* speaker */
10298 { 0x15, 0x0121441f }, /* HP */
10299 { 0x18, 0x01a19840 }, /* mic */
10300 { 0x19, 0x99a3094f }, /* int-mic */
10301 { 0x21, 0x01211420 }, /* HP2 */
10305 .chain_id
= ALC662_FIXUP_SKU_IGNORE
10307 [ALC662_FIXUP_ASUS_MODE4
] = {
10308 .type
= HDA_FIXUP_PINS
,
10309 .v
.pins
= (const struct hda_pintbl
[]) {
10310 { 0x14, 0x99130110 }, /* speaker */
10311 { 0x16, 0x99130111 }, /* speaker */
10312 { 0x18, 0x01a19840 }, /* mic */
10313 { 0x19, 0x99a3094f }, /* int-mic */
10314 { 0x21, 0x0121441f }, /* HP */
10318 .chain_id
= ALC662_FIXUP_SKU_IGNORE
10320 [ALC662_FIXUP_ASUS_MODE5
] = {
10321 .type
= HDA_FIXUP_PINS
,
10322 .v
.pins
= (const struct hda_pintbl
[]) {
10323 { 0x14, 0x99130110 }, /* speaker */
10324 { 0x15, 0x0121441f }, /* HP */
10325 { 0x16, 0x99130111 }, /* speaker */
10326 { 0x18, 0x01a19840 }, /* mic */
10327 { 0x19, 0x99a3094f }, /* int-mic */
10331 .chain_id
= ALC662_FIXUP_SKU_IGNORE
10333 [ALC662_FIXUP_ASUS_MODE6
] = {
10334 .type
= HDA_FIXUP_PINS
,
10335 .v
.pins
= (const struct hda_pintbl
[]) {
10336 { 0x14, 0x99130110 }, /* speaker */
10337 { 0x15, 0x01211420 }, /* HP2 */
10338 { 0x18, 0x01a19840 }, /* mic */
10339 { 0x19, 0x99a3094f }, /* int-mic */
10340 { 0x1b, 0x0121441f }, /* HP */
10344 .chain_id
= ALC662_FIXUP_SKU_IGNORE
10346 [ALC662_FIXUP_ASUS_MODE7
] = {
10347 .type
= HDA_FIXUP_PINS
,
10348 .v
.pins
= (const struct hda_pintbl
[]) {
10349 { 0x14, 0x99130110 }, /* speaker */
10350 { 0x17, 0x99130111 }, /* speaker */
10351 { 0x18, 0x01a19840 }, /* mic */
10352 { 0x19, 0x99a3094f }, /* int-mic */
10353 { 0x1b, 0x01214020 }, /* HP */
10354 { 0x21, 0x0121401f }, /* HP */
10358 .chain_id
= ALC662_FIXUP_SKU_IGNORE
10360 [ALC662_FIXUP_ASUS_MODE8
] = {
10361 .type
= HDA_FIXUP_PINS
,
10362 .v
.pins
= (const struct hda_pintbl
[]) {
10363 { 0x14, 0x99130110 }, /* speaker */
10364 { 0x12, 0x99a30970 }, /* int-mic */
10365 { 0x15, 0x01214020 }, /* HP */
10366 { 0x17, 0x99130111 }, /* speaker */
10367 { 0x18, 0x01a19840 }, /* mic */
10368 { 0x21, 0x0121401f }, /* HP */
10372 .chain_id
= ALC662_FIXUP_SKU_IGNORE
10374 [ALC662_FIXUP_NO_JACK_DETECT
] = {
10375 .type
= HDA_FIXUP_FUNC
,
10376 .v
.func
= alc_fixup_no_jack_detect
,
10378 [ALC662_FIXUP_ZOTAC_Z68
] = {
10379 .type
= HDA_FIXUP_PINS
,
10380 .v
.pins
= (const struct hda_pintbl
[]) {
10381 { 0x1b, 0x02214020 }, /* Front HP */
10385 [ALC662_FIXUP_INV_DMIC
] = {
10386 .type
= HDA_FIXUP_FUNC
,
10387 .v
.func
= alc_fixup_inv_dmic
,
10389 [ALC668_FIXUP_DELL_XPS13
] = {
10390 .type
= HDA_FIXUP_FUNC
,
10391 .v
.func
= alc_fixup_dell_xps13
,
10393 .chain_id
= ALC668_FIXUP_DELL_DISABLE_AAMIX
10395 [ALC668_FIXUP_DELL_DISABLE_AAMIX
] = {
10396 .type
= HDA_FIXUP_FUNC
,
10397 .v
.func
= alc_fixup_disable_aamix
,
10399 .chain_id
= ALC668_FIXUP_DELL_MIC_NO_PRESENCE
10401 [ALC668_FIXUP_AUTO_MUTE
] = {
10402 .type
= HDA_FIXUP_FUNC
,
10403 .v
.func
= alc_fixup_auto_mute_via_amp
,
10405 .chain_id
= ALC668_FIXUP_DELL_MIC_NO_PRESENCE
10407 [ALC662_FIXUP_DELL_MIC_NO_PRESENCE
] = {
10408 .type
= HDA_FIXUP_PINS
,
10409 .v
.pins
= (const struct hda_pintbl
[]) {
10410 { 0x19, 0x03a1113c }, /* use as headset mic, without its own jack detect */
10411 /* headphone mic by setting pin control of 0x1b (headphone out) to in + vref_50 */
10415 .chain_id
= ALC662_FIXUP_HEADSET_MODE
10417 [ALC662_FIXUP_HEADSET_MODE
] = {
10418 .type
= HDA_FIXUP_FUNC
,
10419 .v
.func
= alc_fixup_headset_mode_alc662
,
10421 [ALC668_FIXUP_DELL_MIC_NO_PRESENCE
] = {
10422 .type
= HDA_FIXUP_PINS
,
10423 .v
.pins
= (const struct hda_pintbl
[]) {
10424 { 0x19, 0x03a1913d }, /* use as headphone mic, without its own jack detect */
10425 { 0x1b, 0x03a1113c }, /* use as headset mic, without its own jack detect */
10429 .chain_id
= ALC668_FIXUP_HEADSET_MODE
10431 [ALC668_FIXUP_HEADSET_MODE
] = {
10432 .type
= HDA_FIXUP_FUNC
,
10433 .v
.func
= alc_fixup_headset_mode_alc668
,
10435 [ALC662_FIXUP_BASS_MODE4_CHMAP
] = {
10436 .type
= HDA_FIXUP_FUNC
,
10437 .v
.func
= alc_fixup_bass_chmap
,
10439 .chain_id
= ALC662_FIXUP_ASUS_MODE4
10441 [ALC662_FIXUP_BASS_16
] = {
10442 .type
= HDA_FIXUP_PINS
,
10443 .v
.pins
= (const struct hda_pintbl
[]) {
10444 {0x16, 0x80106111}, /* bass speaker */
10448 .chain_id
= ALC662_FIXUP_BASS_CHMAP
,
10450 [ALC662_FIXUP_BASS_1A
] = {
10451 .type
= HDA_FIXUP_PINS
,
10452 .v
.pins
= (const struct hda_pintbl
[]) {
10453 {0x1a, 0x80106111}, /* bass speaker */
10457 .chain_id
= ALC662_FIXUP_BASS_CHMAP
,
10459 [ALC662_FIXUP_BASS_CHMAP
] = {
10460 .type
= HDA_FIXUP_FUNC
,
10461 .v
.func
= alc_fixup_bass_chmap
,
10463 [ALC662_FIXUP_ASUS_Nx50
] = {
10464 .type
= HDA_FIXUP_FUNC
,
10465 .v
.func
= alc_fixup_auto_mute_via_amp
,
10467 .chain_id
= ALC662_FIXUP_BASS_1A
10469 [ALC668_FIXUP_ASUS_Nx51_HEADSET_MODE
] = {
10470 .type
= HDA_FIXUP_FUNC
,
10471 .v
.func
= alc_fixup_headset_mode_alc668
,
10472 .chain_id
= ALC662_FIXUP_BASS_CHMAP
10474 [ALC668_FIXUP_ASUS_Nx51
] = {
10475 .type
= HDA_FIXUP_PINS
,
10476 .v
.pins
= (const struct hda_pintbl
[]) {
10477 { 0x19, 0x03a1913d }, /* use as headphone mic, without its own jack detect */
10478 { 0x1a, 0x90170151 }, /* bass speaker */
10479 { 0x1b, 0x03a1113c }, /* use as headset mic, without its own jack detect */
10483 .chain_id
= ALC668_FIXUP_ASUS_Nx51_HEADSET_MODE
,
10485 [ALC668_FIXUP_MIC_COEF
] = {
10486 .type
= HDA_FIXUP_VERBS
,
10487 .v
.verbs
= (const struct hda_verb
[]) {
10488 { 0x20, AC_VERB_SET_COEF_INDEX
, 0xc3 },
10489 { 0x20, AC_VERB_SET_PROC_COEF
, 0x4000 },
10493 [ALC668_FIXUP_ASUS_G751
] = {
10494 .type
= HDA_FIXUP_PINS
,
10495 .v
.pins
= (const struct hda_pintbl
[]) {
10496 { 0x16, 0x0421101f }, /* HP */
10500 .chain_id
= ALC668_FIXUP_MIC_COEF
10502 [ALC891_FIXUP_HEADSET_MODE
] = {
10503 .type
= HDA_FIXUP_FUNC
,
10504 .v
.func
= alc_fixup_headset_mode
,
10506 [ALC891_FIXUP_DELL_MIC_NO_PRESENCE
] = {
10507 .type
= HDA_FIXUP_PINS
,
10508 .v
.pins
= (const struct hda_pintbl
[]) {
10509 { 0x19, 0x03a1913d }, /* use as headphone mic, without its own jack detect */
10510 { 0x1b, 0x03a1113c }, /* use as headset mic, without its own jack detect */
10514 .chain_id
= ALC891_FIXUP_HEADSET_MODE
10516 [ALC662_FIXUP_ACER_VERITON
] = {
10517 .type
= HDA_FIXUP_PINS
,
10518 .v
.pins
= (const struct hda_pintbl
[]) {
10519 { 0x15, 0x50170120 }, /* no internal speaker */
10523 [ALC892_FIXUP_ASROCK_MOBO
] = {
10524 .type
= HDA_FIXUP_PINS
,
10525 .v
.pins
= (const struct hda_pintbl
[]) {
10526 { 0x15, 0x40f000f0 }, /* disabled */
10527 { 0x16, 0x40f000f0 }, /* disabled */
10531 [ALC662_FIXUP_USI_FUNC
] = {
10532 .type
= HDA_FIXUP_FUNC
,
10533 .v
.func
= alc662_fixup_usi_headset_mic
,
10535 [ALC662_FIXUP_USI_HEADSET_MODE
] = {
10536 .type
= HDA_FIXUP_PINS
,
10537 .v
.pins
= (const struct hda_pintbl
[]) {
10538 { 0x19, 0x02a1913c }, /* use as headset mic, without its own jack detect */
10539 { 0x18, 0x01a1903d },
10543 .chain_id
= ALC662_FIXUP_USI_FUNC
10545 [ALC662_FIXUP_LENOVO_MULTI_CODECS
] = {
10546 .type
= HDA_FIXUP_FUNC
,
10547 .v
.func
= alc233_alc662_fixup_lenovo_dual_codecs
,
10549 [ALC669_FIXUP_ACER_ASPIRE_ETHOS_HEADSET
] = {
10550 .type
= HDA_FIXUP_FUNC
,
10551 .v
.func
= alc662_fixup_aspire_ethos_hp
,
10553 [ALC669_FIXUP_ACER_ASPIRE_ETHOS
] = {
10554 .type
= HDA_FIXUP_PINS
,
10555 .v
.pins
= (const struct hda_pintbl
[]) {
10556 { 0x15, 0x92130110 }, /* front speakers */
10557 { 0x18, 0x99130111 }, /* center/subwoofer */
10558 { 0x1b, 0x11130012 }, /* surround plus jack for HP */
10562 .chain_id
= ALC669_FIXUP_ACER_ASPIRE_ETHOS_HEADSET
10564 [ALC671_FIXUP_HP_HEADSET_MIC2
] = {
10565 .type
= HDA_FIXUP_FUNC
,
10566 .v
.func
= alc671_fixup_hp_headset_mic2
,
10568 [ALC662_FIXUP_ACER_X2660G_HEADSET_MODE
] = {
10569 .type
= HDA_FIXUP_PINS
,
10570 .v
.pins
= (const struct hda_pintbl
[]) {
10571 { 0x1a, 0x02a1113c }, /* use as headset mic, without its own jack detect */
10575 .chain_id
= ALC662_FIXUP_USI_FUNC
10577 [ALC662_FIXUP_ACER_NITRO_HEADSET_MODE
] = {
10578 .type
= HDA_FIXUP_PINS
,
10579 .v
.pins
= (const struct hda_pintbl
[]) {
10580 { 0x1a, 0x01a11140 }, /* use as headset mic, without its own jack detect */
10581 { 0x1b, 0x0221144f },
10585 .chain_id
= ALC662_FIXUP_USI_FUNC
10587 [ALC668_FIXUP_ASUS_NO_HEADSET_MIC
] = {
10588 .type
= HDA_FIXUP_PINS
,
10589 .v
.pins
= (const struct hda_pintbl
[]) {
10590 { 0x1b, 0x04a1112c },
10594 .chain_id
= ALC668_FIXUP_HEADSET_MIC
10596 [ALC668_FIXUP_HEADSET_MIC
] = {
10597 .type
= HDA_FIXUP_FUNC
,
10598 .v
.func
= alc269_fixup_headset_mic
,
10600 .chain_id
= ALC668_FIXUP_MIC_DET_COEF
10602 [ALC668_FIXUP_MIC_DET_COEF
] = {
10603 .type
= HDA_FIXUP_VERBS
,
10604 .v
.verbs
= (const struct hda_verb
[]) {
10605 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x15 },
10606 { 0x20, AC_VERB_SET_PROC_COEF
, 0x0d60 },
10612 static const struct snd_pci_quirk alc662_fixup_tbl
[] = {
10613 SND_PCI_QUIRK(0x1019, 0x9087, "ECS", ALC662_FIXUP_ASUS_MODE2
),
10614 SND_PCI_QUIRK(0x1025, 0x022f, "Acer Aspire One", ALC662_FIXUP_INV_DMIC
),
10615 SND_PCI_QUIRK(0x1025, 0x0241, "Packard Bell DOTS", ALC662_FIXUP_INV_DMIC
),
10616 SND_PCI_QUIRK(0x1025, 0x0308, "Acer Aspire 8942G", ALC662_FIXUP_ASPIRE
),
10617 SND_PCI_QUIRK(0x1025, 0x031c, "Gateway NV79", ALC662_FIXUP_SKU_IGNORE
),
10618 SND_PCI_QUIRK(0x1025, 0x0349, "eMachines eM250", ALC662_FIXUP_INV_DMIC
),
10619 SND_PCI_QUIRK(0x1025, 0x034a, "Gateway LT27", ALC662_FIXUP_INV_DMIC
),
10620 SND_PCI_QUIRK(0x1025, 0x038b, "Acer Aspire 8943G", ALC662_FIXUP_ASPIRE
),
10621 SND_PCI_QUIRK(0x1025, 0x0566, "Acer Aspire Ethos 8951G", ALC669_FIXUP_ACER_ASPIRE_ETHOS
),
10622 SND_PCI_QUIRK(0x1025, 0x123c, "Acer Nitro N50-600", ALC662_FIXUP_ACER_NITRO_HEADSET_MODE
),
10623 SND_PCI_QUIRK(0x1025, 0x124e, "Acer 2660G", ALC662_FIXUP_ACER_X2660G_HEADSET_MODE
),
10624 SND_PCI_QUIRK(0x1028, 0x05d8, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE
),
10625 SND_PCI_QUIRK(0x1028, 0x05db, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE
),
10626 SND_PCI_QUIRK(0x1028, 0x05fe, "Dell XPS 15", ALC668_FIXUP_DELL_XPS13
),
10627 SND_PCI_QUIRK(0x1028, 0x060a, "Dell XPS 13", ALC668_FIXUP_DELL_XPS13
),
10628 SND_PCI_QUIRK(0x1028, 0x060d, "Dell M3800", ALC668_FIXUP_DELL_XPS13
),
10629 SND_PCI_QUIRK(0x1028, 0x0625, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE
),
10630 SND_PCI_QUIRK(0x1028, 0x0626, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE
),
10631 SND_PCI_QUIRK(0x1028, 0x0696, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE
),
10632 SND_PCI_QUIRK(0x1028, 0x0698, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE
),
10633 SND_PCI_QUIRK(0x1028, 0x069f, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE
),
10634 SND_PCI_QUIRK(0x103c, 0x1632, "HP RP5800", ALC662_FIXUP_HP_RP5800
),
10635 SND_PCI_QUIRK(0x103c, 0x873e, "HP", ALC671_FIXUP_HP_HEADSET_MIC2
),
10636 SND_PCI_QUIRK(0x1043, 0x1080, "Asus UX501VW", ALC668_FIXUP_HEADSET_MODE
),
10637 SND_PCI_QUIRK(0x1043, 0x11cd, "Asus N550", ALC662_FIXUP_ASUS_Nx50
),
10638 SND_PCI_QUIRK(0x1043, 0x129d, "Asus N750", ALC662_FIXUP_ASUS_Nx50
),
10639 SND_PCI_QUIRK(0x1043, 0x12ff, "ASUS G751", ALC668_FIXUP_ASUS_G751
),
10640 SND_PCI_QUIRK(0x1043, 0x13df, "Asus N550JX", ALC662_FIXUP_BASS_1A
),
10641 SND_PCI_QUIRK(0x1043, 0x1477, "ASUS N56VZ", ALC662_FIXUP_BASS_MODE4_CHMAP
),
10642 SND_PCI_QUIRK(0x1043, 0x15a7, "ASUS UX51VZH", ALC662_FIXUP_BASS_16
),
10643 SND_PCI_QUIRK(0x1043, 0x177d, "ASUS N551", ALC668_FIXUP_ASUS_Nx51
),
10644 SND_PCI_QUIRK(0x1043, 0x17bd, "ASUS N751", ALC668_FIXUP_ASUS_Nx51
),
10645 SND_PCI_QUIRK(0x1043, 0x185d, "ASUS G551JW", ALC668_FIXUP_ASUS_NO_HEADSET_MIC
),
10646 SND_PCI_QUIRK(0x1043, 0x1963, "ASUS X71SL", ALC662_FIXUP_ASUS_MODE8
),
10647 SND_PCI_QUIRK(0x1043, 0x1b73, "ASUS N55SF", ALC662_FIXUP_BASS_16
),
10648 SND_PCI_QUIRK(0x1043, 0x1bf3, "ASUS N76VZ", ALC662_FIXUP_BASS_MODE4_CHMAP
),
10649 SND_PCI_QUIRK(0x1043, 0x8469, "ASUS mobo", ALC662_FIXUP_NO_JACK_DETECT
),
10650 SND_PCI_QUIRK(0x105b, 0x0cd6, "Foxconn", ALC662_FIXUP_ASUS_MODE2
),
10651 SND_PCI_QUIRK(0x144d, 0xc051, "Samsung R720", ALC662_FIXUP_IDEAPAD
),
10652 SND_PCI_QUIRK(0x14cd, 0x5003, "USI", ALC662_FIXUP_USI_HEADSET_MODE
),
10653 SND_PCI_QUIRK(0x17aa, 0x1036, "Lenovo P520", ALC662_FIXUP_LENOVO_MULTI_CODECS
),
10654 SND_PCI_QUIRK(0x17aa, 0x38af, "Lenovo Ideapad Y550P", ALC662_FIXUP_IDEAPAD
),
10655 SND_PCI_QUIRK(0x17aa, 0x3a0d, "Lenovo Ideapad Y550", ALC662_FIXUP_IDEAPAD
),
10656 SND_PCI_QUIRK(0x1849, 0x5892, "ASRock B150M", ALC892_FIXUP_ASROCK_MOBO
),
10657 SND_PCI_QUIRK(0x19da, 0xa130, "Zotac Z68", ALC662_FIXUP_ZOTAC_Z68
),
10658 SND_PCI_QUIRK(0x1b0a, 0x01b8, "ACER Veriton", ALC662_FIXUP_ACER_VERITON
),
10659 SND_PCI_QUIRK(0x1b35, 0x1234, "CZC ET26", ALC662_FIXUP_CZC_ET26
),
10660 SND_PCI_QUIRK(0x1b35, 0x2206, "CZC P10T", ALC662_FIXUP_CZC_P10T
),
10663 /* Below is a quirk table taken from the old code.
10664 * Basically the device should work as is without the fixup table.
10665 * If BIOS doesn't give a proper info, enable the corresponding
10668 SND_PCI_QUIRK(0x1043, 0x1000, "ASUS N50Vm", ALC662_FIXUP_ASUS_MODE1
),
10669 SND_PCI_QUIRK(0x1043, 0x1092, "ASUS NB", ALC662_FIXUP_ASUS_MODE3
),
10670 SND_PCI_QUIRK(0x1043, 0x1173, "ASUS K73Jn", ALC662_FIXUP_ASUS_MODE1
),
10671 SND_PCI_QUIRK(0x1043, 0x11c3, "ASUS M70V", ALC662_FIXUP_ASUS_MODE3
),
10672 SND_PCI_QUIRK(0x1043, 0x11d3, "ASUS NB", ALC662_FIXUP_ASUS_MODE1
),
10673 SND_PCI_QUIRK(0x1043, 0x11f3, "ASUS NB", ALC662_FIXUP_ASUS_MODE2
),
10674 SND_PCI_QUIRK(0x1043, 0x1203, "ASUS NB", ALC662_FIXUP_ASUS_MODE1
),
10675 SND_PCI_QUIRK(0x1043, 0x1303, "ASUS G60J", ALC662_FIXUP_ASUS_MODE1
),
10676 SND_PCI_QUIRK(0x1043, 0x1333, "ASUS G60Jx", ALC662_FIXUP_ASUS_MODE1
),
10677 SND_PCI_QUIRK(0x1043, 0x1339, "ASUS NB", ALC662_FIXUP_ASUS_MODE2
),
10678 SND_PCI_QUIRK(0x1043, 0x13e3, "ASUS N71JA", ALC662_FIXUP_ASUS_MODE7
),
10679 SND_PCI_QUIRK(0x1043, 0x1463, "ASUS N71", ALC662_FIXUP_ASUS_MODE7
),
10680 SND_PCI_QUIRK(0x1043, 0x14d3, "ASUS G72", ALC662_FIXUP_ASUS_MODE8
),
10681 SND_PCI_QUIRK(0x1043, 0x1563, "ASUS N90", ALC662_FIXUP_ASUS_MODE3
),
10682 SND_PCI_QUIRK(0x1043, 0x15d3, "ASUS N50SF F50SF", ALC662_FIXUP_ASUS_MODE1
),
10683 SND_PCI_QUIRK(0x1043, 0x16c3, "ASUS NB", ALC662_FIXUP_ASUS_MODE2
),
10684 SND_PCI_QUIRK(0x1043, 0x16f3, "ASUS K40C K50C", ALC662_FIXUP_ASUS_MODE2
),
10685 SND_PCI_QUIRK(0x1043, 0x1733, "ASUS N81De", ALC662_FIXUP_ASUS_MODE1
),
10686 SND_PCI_QUIRK(0x1043, 0x1753, "ASUS NB", ALC662_FIXUP_ASUS_MODE2
),
10687 SND_PCI_QUIRK(0x1043, 0x1763, "ASUS NB", ALC662_FIXUP_ASUS_MODE6
),
10688 SND_PCI_QUIRK(0x1043, 0x1765, "ASUS NB", ALC662_FIXUP_ASUS_MODE6
),
10689 SND_PCI_QUIRK(0x1043, 0x1783, "ASUS NB", ALC662_FIXUP_ASUS_MODE2
),
10690 SND_PCI_QUIRK(0x1043, 0x1793, "ASUS F50GX", ALC662_FIXUP_ASUS_MODE1
),
10691 SND_PCI_QUIRK(0x1043, 0x17b3, "ASUS F70SL", ALC662_FIXUP_ASUS_MODE3
),
10692 SND_PCI_QUIRK(0x1043, 0x17f3, "ASUS X58LE", ALC662_FIXUP_ASUS_MODE2
),
10693 SND_PCI_QUIRK(0x1043, 0x1813, "ASUS NB", ALC662_FIXUP_ASUS_MODE2
),
10694 SND_PCI_QUIRK(0x1043, 0x1823, "ASUS NB", ALC662_FIXUP_ASUS_MODE5
),
10695 SND_PCI_QUIRK(0x1043, 0x1833, "ASUS NB", ALC662_FIXUP_ASUS_MODE6
),
10696 SND_PCI_QUIRK(0x1043, 0x1843, "ASUS NB", ALC662_FIXUP_ASUS_MODE2
),
10697 SND_PCI_QUIRK(0x1043, 0x1853, "ASUS F50Z", ALC662_FIXUP_ASUS_MODE1
),
10698 SND_PCI_QUIRK(0x1043, 0x1864, "ASUS NB", ALC662_FIXUP_ASUS_MODE2
),
10699 SND_PCI_QUIRK(0x1043, 0x1876, "ASUS NB", ALC662_FIXUP_ASUS_MODE2
),
10700 SND_PCI_QUIRK(0x1043, 0x1893, "ASUS M50Vm", ALC662_FIXUP_ASUS_MODE3
),
10701 SND_PCI_QUIRK(0x1043, 0x1894, "ASUS X55", ALC662_FIXUP_ASUS_MODE3
),
10702 SND_PCI_QUIRK(0x1043, 0x18b3, "ASUS N80Vc", ALC662_FIXUP_ASUS_MODE1
),
10703 SND_PCI_QUIRK(0x1043, 0x18c3, "ASUS VX5", ALC662_FIXUP_ASUS_MODE1
),
10704 SND_PCI_QUIRK(0x1043, 0x18d3, "ASUS N81Te", ALC662_FIXUP_ASUS_MODE1
),
10705 SND_PCI_QUIRK(0x1043, 0x18f3, "ASUS N505Tp", ALC662_FIXUP_ASUS_MODE1
),
10706 SND_PCI_QUIRK(0x1043, 0x1903, "ASUS F5GL", ALC662_FIXUP_ASUS_MODE1
),
10707 SND_PCI_QUIRK(0x1043, 0x1913, "ASUS NB", ALC662_FIXUP_ASUS_MODE2
),
10708 SND_PCI_QUIRK(0x1043, 0x1933, "ASUS F80Q", ALC662_FIXUP_ASUS_MODE2
),
10709 SND_PCI_QUIRK(0x1043, 0x1943, "ASUS Vx3V", ALC662_FIXUP_ASUS_MODE1
),
10710 SND_PCI_QUIRK(0x1043, 0x1953, "ASUS NB", ALC662_FIXUP_ASUS_MODE1
),
10711 SND_PCI_QUIRK(0x1043, 0x1963, "ASUS X71C", ALC662_FIXUP_ASUS_MODE3
),
10712 SND_PCI_QUIRK(0x1043, 0x1983, "ASUS N5051A", ALC662_FIXUP_ASUS_MODE1
),
10713 SND_PCI_QUIRK(0x1043, 0x1993, "ASUS N20", ALC662_FIXUP_ASUS_MODE1
),
10714 SND_PCI_QUIRK(0x1043, 0x19b3, "ASUS F7Z", ALC662_FIXUP_ASUS_MODE1
),
10715 SND_PCI_QUIRK(0x1043, 0x19c3, "ASUS F5Z/F6x", ALC662_FIXUP_ASUS_MODE2
),
10716 SND_PCI_QUIRK(0x1043, 0x19e3, "ASUS NB", ALC662_FIXUP_ASUS_MODE1
),
10717 SND_PCI_QUIRK(0x1043, 0x19f3, "ASUS NB", ALC662_FIXUP_ASUS_MODE4
),
10722 static const struct hda_model_fixup alc662_fixup_models
[] = {
10723 {.id
= ALC662_FIXUP_ASPIRE
, .name
= "aspire"},
10724 {.id
= ALC662_FIXUP_IDEAPAD
, .name
= "ideapad"},
10725 {.id
= ALC272_FIXUP_MARIO
, .name
= "mario"},
10726 {.id
= ALC662_FIXUP_HP_RP5800
, .name
= "hp-rp5800"},
10727 {.id
= ALC662_FIXUP_ASUS_MODE1
, .name
= "asus-mode1"},
10728 {.id
= ALC662_FIXUP_ASUS_MODE2
, .name
= "asus-mode2"},
10729 {.id
= ALC662_FIXUP_ASUS_MODE3
, .name
= "asus-mode3"},
10730 {.id
= ALC662_FIXUP_ASUS_MODE4
, .name
= "asus-mode4"},
10731 {.id
= ALC662_FIXUP_ASUS_MODE5
, .name
= "asus-mode5"},
10732 {.id
= ALC662_FIXUP_ASUS_MODE6
, .name
= "asus-mode6"},
10733 {.id
= ALC662_FIXUP_ASUS_MODE7
, .name
= "asus-mode7"},
10734 {.id
= ALC662_FIXUP_ASUS_MODE8
, .name
= "asus-mode8"},
10735 {.id
= ALC662_FIXUP_ZOTAC_Z68
, .name
= "zotac-z68"},
10736 {.id
= ALC662_FIXUP_INV_DMIC
, .name
= "inv-dmic"},
10737 {.id
= ALC662_FIXUP_DELL_MIC_NO_PRESENCE
, .name
= "alc662-headset-multi"},
10738 {.id
= ALC668_FIXUP_DELL_MIC_NO_PRESENCE
, .name
= "dell-headset-multi"},
10739 {.id
= ALC662_FIXUP_HEADSET_MODE
, .name
= "alc662-headset"},
10740 {.id
= ALC668_FIXUP_HEADSET_MODE
, .name
= "alc668-headset"},
10741 {.id
= ALC662_FIXUP_BASS_16
, .name
= "bass16"},
10742 {.id
= ALC662_FIXUP_BASS_1A
, .name
= "bass1a"},
10743 {.id
= ALC668_FIXUP_AUTO_MUTE
, .name
= "automute"},
10744 {.id
= ALC668_FIXUP_DELL_XPS13
, .name
= "dell-xps13"},
10745 {.id
= ALC662_FIXUP_ASUS_Nx50
, .name
= "asus-nx50"},
10746 {.id
= ALC668_FIXUP_ASUS_Nx51
, .name
= "asus-nx51"},
10747 {.id
= ALC668_FIXUP_ASUS_G751
, .name
= "asus-g751"},
10748 {.id
= ALC891_FIXUP_HEADSET_MODE
, .name
= "alc891-headset"},
10749 {.id
= ALC891_FIXUP_DELL_MIC_NO_PRESENCE
, .name
= "alc891-headset-multi"},
10750 {.id
= ALC662_FIXUP_ACER_VERITON
, .name
= "acer-veriton"},
10751 {.id
= ALC892_FIXUP_ASROCK_MOBO
, .name
= "asrock-mobo"},
10752 {.id
= ALC662_FIXUP_USI_HEADSET_MODE
, .name
= "usi-headset"},
10753 {.id
= ALC662_FIXUP_LENOVO_MULTI_CODECS
, .name
= "dual-codecs"},
10754 {.id
= ALC669_FIXUP_ACER_ASPIRE_ETHOS
, .name
= "aspire-ethos"},
10758 static const struct snd_hda_pin_quirk alc662_pin_fixup_tbl
[] = {
10759 SND_HDA_PIN_QUIRK(0x10ec0867, 0x1028, "Dell", ALC891_FIXUP_DELL_MIC_NO_PRESENCE
,
10760 {0x17, 0x02211010},
10761 {0x18, 0x01a19030},
10762 {0x1a, 0x01813040},
10763 {0x21, 0x01014020}),
10764 SND_HDA_PIN_QUIRK(0x10ec0867, 0x1028, "Dell", ALC891_FIXUP_DELL_MIC_NO_PRESENCE
,
10765 {0x16, 0x01813030},
10766 {0x17, 0x02211010},
10767 {0x18, 0x01a19040},
10768 {0x21, 0x01014020}),
10769 SND_HDA_PIN_QUIRK(0x10ec0662, 0x1028, "Dell", ALC662_FIXUP_DELL_MIC_NO_PRESENCE
,
10770 {0x14, 0x01014010},
10771 {0x18, 0x01a19020},
10772 {0x1a, 0x0181302f},
10773 {0x1b, 0x0221401f}),
10774 SND_HDA_PIN_QUIRK(0x10ec0668, 0x1028, "Dell", ALC668_FIXUP_AUTO_MUTE
,
10775 {0x12, 0x99a30130},
10776 {0x14, 0x90170110},
10777 {0x15, 0x0321101f},
10778 {0x16, 0x03011020}),
10779 SND_HDA_PIN_QUIRK(0x10ec0668, 0x1028, "Dell", ALC668_FIXUP_AUTO_MUTE
,
10780 {0x12, 0x99a30140},
10781 {0x14, 0x90170110},
10782 {0x15, 0x0321101f},
10783 {0x16, 0x03011020}),
10784 SND_HDA_PIN_QUIRK(0x10ec0668, 0x1028, "Dell", ALC668_FIXUP_AUTO_MUTE
,
10785 {0x12, 0x99a30150},
10786 {0x14, 0x90170110},
10787 {0x15, 0x0321101f},
10788 {0x16, 0x03011020}),
10789 SND_HDA_PIN_QUIRK(0x10ec0668, 0x1028, "Dell", ALC668_FIXUP_AUTO_MUTE
,
10790 {0x14, 0x90170110},
10791 {0x15, 0x0321101f},
10792 {0x16, 0x03011020}),
10793 SND_HDA_PIN_QUIRK(0x10ec0668, 0x1028, "Dell XPS 15", ALC668_FIXUP_AUTO_MUTE
,
10794 {0x12, 0x90a60130},
10795 {0x14, 0x90170110},
10796 {0x15, 0x0321101f}),
10797 SND_HDA_PIN_QUIRK(0x10ec0671, 0x103c, "HP cPC", ALC671_FIXUP_HP_HEADSET_MIC2
,
10798 {0x14, 0x01014010},
10799 {0x17, 0x90170150},
10800 {0x19, 0x02a11060},
10801 {0x1b, 0x01813030},
10802 {0x21, 0x02211020}),
10803 SND_HDA_PIN_QUIRK(0x10ec0671, 0x103c, "HP cPC", ALC671_FIXUP_HP_HEADSET_MIC2
,
10804 {0x14, 0x01014010},
10805 {0x18, 0x01a19040},
10806 {0x1b, 0x01813030},
10807 {0x21, 0x02211020}),
10808 SND_HDA_PIN_QUIRK(0x10ec0671, 0x103c, "HP cPC", ALC671_FIXUP_HP_HEADSET_MIC2
,
10809 {0x14, 0x01014020},
10810 {0x17, 0x90170110},
10811 {0x18, 0x01a19050},
10812 {0x1b, 0x01813040},
10813 {0x21, 0x02211030}),
10819 static int patch_alc662(struct hda_codec
*codec
)
10821 struct alc_spec
*spec
;
10824 err
= alc_alloc_spec(codec
, 0x0b);
10828 spec
= codec
->spec
;
10830 spec
->shutup
= alc_eapd_shutup
;
10832 /* handle multiple HPs as is */
10833 spec
->parse_flags
= HDA_PINCFG_NO_HP_FIXUP
;
10835 alc_fix_pll_init(codec
, 0x20, 0x04, 15);
10837 switch (codec
->core
.vendor_id
) {
10839 spec
->init_hook
= alc668_restore_default_value
;
10843 alc_pre_init(codec
);
10845 snd_hda_pick_fixup(codec
, alc662_fixup_models
,
10846 alc662_fixup_tbl
, alc662_fixups
);
10847 snd_hda_pick_pin_fixup(codec
, alc662_pin_fixup_tbl
, alc662_fixups
, true);
10848 snd_hda_apply_fixup(codec
, HDA_FIXUP_ACT_PRE_PROBE
);
10850 alc_auto_parse_customize_define(codec
);
10852 if (has_cdefine_beep(codec
))
10853 spec
->gen
.beep_nid
= 0x01;
10855 if ((alc_get_coef0(codec
) & (1 << 14)) &&
10856 codec
->bus
->pci
&& codec
->bus
->pci
->subsystem_vendor
== 0x1025 &&
10857 spec
->cdefine
.platform_type
== 1) {
10858 err
= alc_codec_rename(codec
, "ALC272X");
10863 /* automatic parse from the BIOS config */
10864 err
= alc662_parse_auto_config(codec
);
10868 if (!spec
->gen
.no_analog
&& spec
->gen
.beep_nid
) {
10869 switch (codec
->core
.vendor_id
) {
10871 err
= set_beep_amp(spec
, 0x0b, 0x05, HDA_INPUT
);
10877 err
= set_beep_amp(spec
, 0x0b, 0x04, HDA_INPUT
);
10880 err
= set_beep_amp(spec
, 0x0b, 0x03, HDA_INPUT
);
10887 snd_hda_apply_fixup(codec
, HDA_FIXUP_ACT_PROBE
);
10900 static int alc680_parse_auto_config(struct hda_codec
*codec
)
10902 return alc_parse_auto_config(codec
, NULL
, NULL
);
10907 static int patch_alc680(struct hda_codec
*codec
)
10911 /* ALC680 has no aa-loopback mixer */
10912 err
= alc_alloc_spec(codec
, 0);
10916 /* automatic parse from the BIOS config */
10917 err
= alc680_parse_auto_config(codec
);
10929 static const struct hda_device_id snd_hda_id_realtek
[] = {
10930 HDA_CODEC_ENTRY(0x10ec0215, "ALC215", patch_alc269
),
10931 HDA_CODEC_ENTRY(0x10ec0221, "ALC221", patch_alc269
),
10932 HDA_CODEC_ENTRY(0x10ec0222, "ALC222", patch_alc269
),
10933 HDA_CODEC_ENTRY(0x10ec0225, "ALC225", patch_alc269
),
10934 HDA_CODEC_ENTRY(0x10ec0230, "ALC236", patch_alc269
),
10935 HDA_CODEC_ENTRY(0x10ec0231, "ALC231", patch_alc269
),
10936 HDA_CODEC_ENTRY(0x10ec0233, "ALC233", patch_alc269
),
10937 HDA_CODEC_ENTRY(0x10ec0234, "ALC234", patch_alc269
),
10938 HDA_CODEC_ENTRY(0x10ec0235, "ALC233", patch_alc269
),
10939 HDA_CODEC_ENTRY(0x10ec0236, "ALC236", patch_alc269
),
10940 HDA_CODEC_ENTRY(0x10ec0245, "ALC245", patch_alc269
),
10941 HDA_CODEC_ENTRY(0x10ec0255, "ALC255", patch_alc269
),
10942 HDA_CODEC_ENTRY(0x10ec0256, "ALC256", patch_alc269
),
10943 HDA_CODEC_ENTRY(0x10ec0257, "ALC257", patch_alc269
),
10944 HDA_CODEC_ENTRY(0x10ec0260, "ALC260", patch_alc260
),
10945 HDA_CODEC_ENTRY(0x10ec0262, "ALC262", patch_alc262
),
10946 HDA_CODEC_ENTRY(0x10ec0267, "ALC267", patch_alc268
),
10947 HDA_CODEC_ENTRY(0x10ec0268, "ALC268", patch_alc268
),
10948 HDA_CODEC_ENTRY(0x10ec0269, "ALC269", patch_alc269
),
10949 HDA_CODEC_ENTRY(0x10ec0270, "ALC270", patch_alc269
),
10950 HDA_CODEC_ENTRY(0x10ec0272, "ALC272", patch_alc662
),
10951 HDA_CODEC_ENTRY(0x10ec0274, "ALC274", patch_alc269
),
10952 HDA_CODEC_ENTRY(0x10ec0275, "ALC275", patch_alc269
),
10953 HDA_CODEC_ENTRY(0x10ec0276, "ALC276", patch_alc269
),
10954 HDA_CODEC_ENTRY(0x10ec0280, "ALC280", patch_alc269
),
10955 HDA_CODEC_ENTRY(0x10ec0282, "ALC282", patch_alc269
),
10956 HDA_CODEC_ENTRY(0x10ec0283, "ALC283", patch_alc269
),
10957 HDA_CODEC_ENTRY(0x10ec0284, "ALC284", patch_alc269
),
10958 HDA_CODEC_ENTRY(0x10ec0285, "ALC285", patch_alc269
),
10959 HDA_CODEC_ENTRY(0x10ec0286, "ALC286", patch_alc269
),
10960 HDA_CODEC_ENTRY(0x10ec0287, "ALC287", patch_alc269
),
10961 HDA_CODEC_ENTRY(0x10ec0288, "ALC288", patch_alc269
),
10962 HDA_CODEC_ENTRY(0x10ec0289, "ALC289", patch_alc269
),
10963 HDA_CODEC_ENTRY(0x10ec0290, "ALC290", patch_alc269
),
10964 HDA_CODEC_ENTRY(0x10ec0292, "ALC292", patch_alc269
),
10965 HDA_CODEC_ENTRY(0x10ec0293, "ALC293", patch_alc269
),
10966 HDA_CODEC_ENTRY(0x10ec0294, "ALC294", patch_alc269
),
10967 HDA_CODEC_ENTRY(0x10ec0295, "ALC295", patch_alc269
),
10968 HDA_CODEC_ENTRY(0x10ec0298, "ALC298", patch_alc269
),
10969 HDA_CODEC_ENTRY(0x10ec0299, "ALC299", patch_alc269
),
10970 HDA_CODEC_ENTRY(0x10ec0300, "ALC300", patch_alc269
),
10971 HDA_CODEC_ENTRY(0x10ec0623, "ALC623", patch_alc269
),
10972 HDA_CODEC_REV_ENTRY(0x10ec0861, 0x100340, "ALC660", patch_alc861
),
10973 HDA_CODEC_ENTRY(0x10ec0660, "ALC660-VD", patch_alc861vd
),
10974 HDA_CODEC_ENTRY(0x10ec0861, "ALC861", patch_alc861
),
10975 HDA_CODEC_ENTRY(0x10ec0862, "ALC861-VD", patch_alc861vd
),
10976 HDA_CODEC_REV_ENTRY(0x10ec0662, 0x100002, "ALC662 rev2", patch_alc882
),
10977 HDA_CODEC_REV_ENTRY(0x10ec0662, 0x100101, "ALC662 rev1", patch_alc662
),
10978 HDA_CODEC_REV_ENTRY(0x10ec0662, 0x100300, "ALC662 rev3", patch_alc662
),
10979 HDA_CODEC_ENTRY(0x10ec0663, "ALC663", patch_alc662
),
10980 HDA_CODEC_ENTRY(0x10ec0665, "ALC665", patch_alc662
),
10981 HDA_CODEC_ENTRY(0x10ec0667, "ALC667", patch_alc662
),
10982 HDA_CODEC_ENTRY(0x10ec0668, "ALC668", patch_alc662
),
10983 HDA_CODEC_ENTRY(0x10ec0670, "ALC670", patch_alc662
),
10984 HDA_CODEC_ENTRY(0x10ec0671, "ALC671", patch_alc662
),
10985 HDA_CODEC_ENTRY(0x10ec0680, "ALC680", patch_alc680
),
10986 HDA_CODEC_ENTRY(0x10ec0700, "ALC700", patch_alc269
),
10987 HDA_CODEC_ENTRY(0x10ec0701, "ALC701", patch_alc269
),
10988 HDA_CODEC_ENTRY(0x10ec0703, "ALC703", patch_alc269
),
10989 HDA_CODEC_ENTRY(0x10ec0711, "ALC711", patch_alc269
),
10990 HDA_CODEC_ENTRY(0x10ec0867, "ALC891", patch_alc662
),
10991 HDA_CODEC_ENTRY(0x10ec0880, "ALC880", patch_alc880
),
10992 HDA_CODEC_ENTRY(0x10ec0882, "ALC882", patch_alc882
),
10993 HDA_CODEC_ENTRY(0x10ec0883, "ALC883", patch_alc882
),
10994 HDA_CODEC_REV_ENTRY(0x10ec0885, 0x100101, "ALC889A", patch_alc882
),
10995 HDA_CODEC_REV_ENTRY(0x10ec0885, 0x100103, "ALC889A", patch_alc882
),
10996 HDA_CODEC_ENTRY(0x10ec0885, "ALC885", patch_alc882
),
10997 HDA_CODEC_ENTRY(0x10ec0887, "ALC887", patch_alc882
),
10998 HDA_CODEC_REV_ENTRY(0x10ec0888, 0x100101, "ALC1200", patch_alc882
),
10999 HDA_CODEC_ENTRY(0x10ec0888, "ALC888", patch_alc882
),
11000 HDA_CODEC_ENTRY(0x10ec0889, "ALC889", patch_alc882
),
11001 HDA_CODEC_ENTRY(0x10ec0892, "ALC892", patch_alc662
),
11002 HDA_CODEC_ENTRY(0x10ec0897, "ALC897", patch_alc662
),
11003 HDA_CODEC_ENTRY(0x10ec0899, "ALC898", patch_alc882
),
11004 HDA_CODEC_ENTRY(0x10ec0900, "ALC1150", patch_alc882
),
11005 HDA_CODEC_ENTRY(0x10ec0b00, "ALCS1200A", patch_alc882
),
11006 HDA_CODEC_ENTRY(0x10ec1168, "ALC1220", patch_alc882
),
11007 HDA_CODEC_ENTRY(0x10ec1220, "ALC1220", patch_alc882
),
11008 {} /* terminator */
11010 MODULE_DEVICE_TABLE(hdaudio
, snd_hda_id_realtek
);
11012 MODULE_LICENSE("GPL");
11013 MODULE_DESCRIPTION("Realtek HD-audio codec");
11015 static struct hda_codec_driver realtek_driver
= {
11016 .id
= snd_hda_id_realtek
,
11019 module_hda_codec_driver(realtek_driver
);