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
);
112 void (*reboot_notify
)(struct hda_codec
*codec
);
115 int codec_variant
; /* flag for other variants */
116 unsigned int has_alc5505_dsp
:1;
117 unsigned int no_depop_delay
:1;
118 unsigned int done_hp_init
:1;
119 unsigned int no_shutup_pins
:1;
120 unsigned int ultra_low_power
:1;
121 unsigned int has_hs_key
:1;
122 unsigned int no_internal_mic_pin
:1;
126 unsigned int pll_coef_idx
, pll_coef_bit
;
128 struct input_dev
*kb_dev
;
129 u8 alc_mute_keycode_map
[1];
133 * COEF access helper functions
136 static int alc_read_coefex_idx(struct hda_codec
*codec
, hda_nid_t nid
,
137 unsigned int coef_idx
)
141 snd_hda_codec_write(codec
, nid
, 0, AC_VERB_SET_COEF_INDEX
, coef_idx
);
142 val
= snd_hda_codec_read(codec
, nid
, 0, AC_VERB_GET_PROC_COEF
, 0);
146 #define alc_read_coef_idx(codec, coef_idx) \
147 alc_read_coefex_idx(codec, 0x20, coef_idx)
149 static void alc_write_coefex_idx(struct hda_codec
*codec
, hda_nid_t nid
,
150 unsigned int coef_idx
, unsigned int coef_val
)
152 snd_hda_codec_write(codec
, nid
, 0, AC_VERB_SET_COEF_INDEX
, coef_idx
);
153 snd_hda_codec_write(codec
, nid
, 0, AC_VERB_SET_PROC_COEF
, coef_val
);
156 #define alc_write_coef_idx(codec, coef_idx, coef_val) \
157 alc_write_coefex_idx(codec, 0x20, coef_idx, coef_val)
159 static void alc_update_coefex_idx(struct hda_codec
*codec
, hda_nid_t nid
,
160 unsigned int coef_idx
, unsigned int mask
,
161 unsigned int bits_set
)
163 unsigned int val
= alc_read_coefex_idx(codec
, nid
, coef_idx
);
166 alc_write_coefex_idx(codec
, nid
, coef_idx
,
167 (val
& ~mask
) | bits_set
);
170 #define alc_update_coef_idx(codec, coef_idx, mask, bits_set) \
171 alc_update_coefex_idx(codec, 0x20, coef_idx, mask, bits_set)
173 /* a special bypass for COEF 0; read the cached value at the second time */
174 static unsigned int alc_get_coef0(struct hda_codec
*codec
)
176 struct alc_spec
*spec
= codec
->spec
;
179 spec
->coef0
= alc_read_coef_idx(codec
, 0);
183 /* coef writes/updates batch */
191 #define UPDATE_COEFEX(_nid, _idx, _mask, _val) \
192 { .nid = (_nid), .idx = (_idx), .mask = (_mask), .val = (_val) }
193 #define WRITE_COEFEX(_nid, _idx, _val) UPDATE_COEFEX(_nid, _idx, -1, _val)
194 #define WRITE_COEF(_idx, _val) WRITE_COEFEX(0x20, _idx, _val)
195 #define UPDATE_COEF(_idx, _mask, _val) UPDATE_COEFEX(0x20, _idx, _mask, _val)
197 static void alc_process_coef_fw(struct hda_codec
*codec
,
198 const struct coef_fw
*fw
)
200 for (; fw
->nid
; fw
++) {
201 if (fw
->mask
== (unsigned short)-1)
202 alc_write_coefex_idx(codec
, fw
->nid
, fw
->idx
, fw
->val
);
204 alc_update_coefex_idx(codec
, fw
->nid
, fw
->idx
,
210 * GPIO setup tables, used in initialization
213 /* Enable GPIO mask and set output */
214 static void alc_setup_gpio(struct hda_codec
*codec
, unsigned int mask
)
216 struct alc_spec
*spec
= codec
->spec
;
218 spec
->gpio_mask
|= mask
;
219 spec
->gpio_dir
|= mask
;
220 spec
->gpio_data
|= mask
;
223 static void alc_write_gpio_data(struct hda_codec
*codec
)
225 struct alc_spec
*spec
= codec
->spec
;
227 snd_hda_codec_write(codec
, 0x01, 0, AC_VERB_SET_GPIO_DATA
,
231 static void alc_update_gpio_data(struct hda_codec
*codec
, unsigned int mask
,
234 struct alc_spec
*spec
= codec
->spec
;
235 unsigned int oldval
= spec
->gpio_data
;
238 spec
->gpio_data
|= mask
;
240 spec
->gpio_data
&= ~mask
;
241 if (oldval
!= spec
->gpio_data
)
242 alc_write_gpio_data(codec
);
245 static void alc_write_gpio(struct hda_codec
*codec
)
247 struct alc_spec
*spec
= codec
->spec
;
249 if (!spec
->gpio_mask
)
252 snd_hda_codec_write(codec
, codec
->core
.afg
, 0,
253 AC_VERB_SET_GPIO_MASK
, spec
->gpio_mask
);
254 snd_hda_codec_write(codec
, codec
->core
.afg
, 0,
255 AC_VERB_SET_GPIO_DIRECTION
, spec
->gpio_dir
);
256 if (spec
->gpio_write_delay
)
258 alc_write_gpio_data(codec
);
261 static void alc_fixup_gpio(struct hda_codec
*codec
, int action
,
264 if (action
== HDA_FIXUP_ACT_PRE_PROBE
)
265 alc_setup_gpio(codec
, mask
);
268 static void alc_fixup_gpio1(struct hda_codec
*codec
,
269 const struct hda_fixup
*fix
, int action
)
271 alc_fixup_gpio(codec
, action
, 0x01);
274 static void alc_fixup_gpio2(struct hda_codec
*codec
,
275 const struct hda_fixup
*fix
, int action
)
277 alc_fixup_gpio(codec
, action
, 0x02);
280 static void alc_fixup_gpio3(struct hda_codec
*codec
,
281 const struct hda_fixup
*fix
, int action
)
283 alc_fixup_gpio(codec
, action
, 0x03);
286 static void alc_fixup_gpio4(struct hda_codec
*codec
,
287 const struct hda_fixup
*fix
, int action
)
289 alc_fixup_gpio(codec
, action
, 0x04);
292 static void alc_fixup_micmute_led(struct hda_codec
*codec
,
293 const struct hda_fixup
*fix
, int action
)
295 if (action
== HDA_FIXUP_ACT_PROBE
)
296 snd_hda_gen_add_micmute_led_cdev(codec
, NULL
);
300 * Fix hardware PLL issue
301 * On some codecs, the analog PLL gating control must be off while
302 * the default value is 1.
304 static void alc_fix_pll(struct hda_codec
*codec
)
306 struct alc_spec
*spec
= codec
->spec
;
309 alc_update_coefex_idx(codec
, spec
->pll_nid
, spec
->pll_coef_idx
,
310 1 << spec
->pll_coef_bit
, 0);
313 static void alc_fix_pll_init(struct hda_codec
*codec
, hda_nid_t nid
,
314 unsigned int coef_idx
, unsigned int coef_bit
)
316 struct alc_spec
*spec
= codec
->spec
;
318 spec
->pll_coef_idx
= coef_idx
;
319 spec
->pll_coef_bit
= coef_bit
;
323 /* update the master volume per volume-knob's unsol event */
324 static void alc_update_knob_master(struct hda_codec
*codec
,
325 struct hda_jack_callback
*jack
)
328 struct snd_kcontrol
*kctl
;
329 struct snd_ctl_elem_value
*uctl
;
331 kctl
= snd_hda_find_mixer_ctl(codec
, "Master Playback Volume");
334 uctl
= kzalloc(sizeof(*uctl
), GFP_KERNEL
);
337 val
= snd_hda_codec_read(codec
, jack
->nid
, 0,
338 AC_VERB_GET_VOLUME_KNOB_CONTROL
, 0);
339 val
&= HDA_AMP_VOLMASK
;
340 uctl
->value
.integer
.value
[0] = val
;
341 uctl
->value
.integer
.value
[1] = val
;
342 kctl
->put(kctl
, uctl
);
346 static void alc880_unsol_event(struct hda_codec
*codec
, unsigned int res
)
348 /* For some reason, the res given from ALC880 is broken.
349 Here we adjust it properly. */
350 snd_hda_jack_unsol_event(codec
, res
>> 2);
353 /* Change EAPD to verb control */
354 static void alc_fill_eapd_coef(struct hda_codec
*codec
)
358 coef
= alc_get_coef0(codec
);
360 switch (codec
->core
.vendor_id
) {
362 alc_update_coef_idx(codec
, 0x7, 0, 1<<5);
366 alc_update_coef_idx(codec
, 0x7, 0, 1<<13);
369 if ((coef
& 0x00f0) == 0x0010)
370 alc_update_coef_idx(codec
, 0xd, 0, 1<<14);
371 if ((coef
& 0x00f0) == 0x0020)
372 alc_update_coef_idx(codec
, 0x4, 1<<15, 0);
373 if ((coef
& 0x00f0) == 0x0030)
374 alc_update_coef_idx(codec
, 0x10, 1<<9, 0);
380 alc_update_coef_idx(codec
, 0x4, 1<<15, 0);
385 alc_update_coef_idx(codec
, 0x67, 0xf000, 0x3000);
404 alc_update_coef_idx(codec
, 0x10, 1<<9, 0);
407 alc_update_coef_idx(codec
, 0xe, 0, 1<<0);
410 alc_update_coef_idx(codec
, 0xa, 1<<13, 0);
419 alc_update_coef_idx(codec
, 0x10, 1<<15, 0);
422 if ((coef
& 0x00f0) == 0x0030)
423 alc_update_coef_idx(codec
, 0x4, 1<<10, 0); /* EAPD Ctrl */
432 alc_update_coef_idx(codec
, 0xd, 0, 1<<14); /* EAPD Ctrl */
436 alc_update_coef_idx(codec
, 0x19, 1<<13, 0);
439 alc_update_coef_idx(codec
, 0x7, 3<<13, 0);
442 alc_update_coef_idx(codec
, 0x4, 1<<10, 0);
445 if ((coef
& 0x00f0) == 0x0020 || (coef
& 0x00f0) == 0x0030)
446 alc_update_coef_idx(codec
, 0x7, 1<<5, 0);
450 alc_update_coef_idx(codec
, 0x7, 1<<5, 0);
457 alc_update_coef_idx(codec
, 0x7, 1<<1, 0);
462 /* additional initialization for ALC888 variants */
463 static void alc888_coef_init(struct hda_codec
*codec
)
465 switch (alc_get_coef0(codec
) & 0x00f0) {
470 alc_update_coef_idx(codec
, 7, 0, 0x2030); /* Turn EAPD to High */
475 /* turn on/off EAPD control (only if available) */
476 static void set_eapd(struct hda_codec
*codec
, hda_nid_t nid
, int on
)
478 if (get_wcaps_type(get_wcaps(codec
, nid
)) != AC_WID_PIN
)
480 if (snd_hda_query_pin_caps(codec
, nid
) & AC_PINCAP_EAPD
)
481 snd_hda_codec_write(codec
, nid
, 0, AC_VERB_SET_EAPD_BTLENABLE
,
485 /* turn on/off EAPD controls of the codec */
486 static void alc_auto_setup_eapd(struct hda_codec
*codec
, bool on
)
488 /* We currently only handle front, HP */
489 static const hda_nid_t pins
[] = {
490 0x0f, 0x10, 0x14, 0x15, 0x17, 0
493 for (p
= pins
; *p
; p
++)
494 set_eapd(codec
, *p
, on
);
497 static int find_ext_mic_pin(struct hda_codec
*codec
);
499 static void alc_headset_mic_no_shutup(struct hda_codec
*codec
)
501 const struct hda_pincfg
*pin
;
502 int mic_pin
= find_ext_mic_pin(codec
);
505 /* don't shut up pins when unloading the driver; otherwise it breaks
506 * the default pin setup at the next load of the driver
508 if (codec
->bus
->shutdown
)
511 snd_array_for_each(&codec
->init_pins
, i
, pin
) {
512 /* use read here for syncing after issuing each verb */
513 if (pin
->nid
!= mic_pin
)
514 snd_hda_codec_read(codec
, pin
->nid
, 0,
515 AC_VERB_SET_PIN_WIDGET_CONTROL
, 0);
518 codec
->pins_shutup
= 1;
521 static void alc_shutup_pins(struct hda_codec
*codec
)
523 struct alc_spec
*spec
= codec
->spec
;
525 switch (codec
->core
.vendor_id
) {
530 alc_headset_mic_no_shutup(codec
);
533 if (!spec
->no_shutup_pins
)
534 snd_hda_shutup_pins(codec
);
539 /* generic shutup callback;
540 * just turning off EAPD and a little pause for avoiding pop-noise
542 static void alc_eapd_shutup(struct hda_codec
*codec
)
544 struct alc_spec
*spec
= codec
->spec
;
546 alc_auto_setup_eapd(codec
, false);
547 if (!spec
->no_depop_delay
)
549 alc_shutup_pins(codec
);
552 /* generic EAPD initialization */
553 static void alc_auto_init_amp(struct hda_codec
*codec
, int type
)
555 alc_auto_setup_eapd(codec
, true);
556 alc_write_gpio(codec
);
558 case ALC_INIT_DEFAULT
:
559 switch (codec
->core
.vendor_id
) {
561 alc_update_coefex_idx(codec
, 0x1a, 7, 0, 0x2010);
567 alc_update_coef_idx(codec
, 7, 0, 0x2030);
570 alc888_coef_init(codec
);
577 /* get a primary headphone pin if available */
578 static hda_nid_t
alc_get_hp_pin(struct alc_spec
*spec
)
580 if (spec
->gen
.autocfg
.hp_pins
[0])
581 return spec
->gen
.autocfg
.hp_pins
[0];
582 if (spec
->gen
.autocfg
.line_out_type
== AC_JACK_HP_OUT
)
583 return spec
->gen
.autocfg
.line_out_pins
[0];
588 * Realtek SSID verification
591 /* Could be any non-zero and even value. When used as fixup, tells
592 * the driver to ignore any present sku defines.
594 #define ALC_FIXUP_SKU_IGNORE (2)
596 static void alc_fixup_sku_ignore(struct hda_codec
*codec
,
597 const struct hda_fixup
*fix
, int action
)
599 struct alc_spec
*spec
= codec
->spec
;
600 if (action
== HDA_FIXUP_ACT_PRE_PROBE
) {
601 spec
->cdefine
.fixup
= 1;
602 spec
->cdefine
.sku_cfg
= ALC_FIXUP_SKU_IGNORE
;
606 static void alc_fixup_no_depop_delay(struct hda_codec
*codec
,
607 const struct hda_fixup
*fix
, int action
)
609 struct alc_spec
*spec
= codec
->spec
;
611 if (action
== HDA_FIXUP_ACT_PROBE
) {
612 spec
->no_depop_delay
= 1;
613 codec
->depop_delay
= 0;
617 static int alc_auto_parse_customize_define(struct hda_codec
*codec
)
619 unsigned int ass
, tmp
, i
;
621 struct alc_spec
*spec
= codec
->spec
;
623 spec
->cdefine
.enable_pcbeep
= 1; /* assume always enabled */
625 if (spec
->cdefine
.fixup
) {
626 ass
= spec
->cdefine
.sku_cfg
;
627 if (ass
== ALC_FIXUP_SKU_IGNORE
)
632 if (!codec
->bus
->pci
)
634 ass
= codec
->core
.subsystem_id
& 0xffff;
635 if (ass
!= codec
->bus
->pci
->subsystem_device
&& (ass
& 1))
639 if (codec
->core
.vendor_id
== 0x10ec0260)
641 ass
= snd_hda_codec_get_pincfg(codec
, nid
);
644 codec_info(codec
, "%s: SKU not ready 0x%08x\n",
645 codec
->core
.chip_name
, ass
);
651 for (i
= 1; i
< 16; i
++) {
655 if (((ass
>> 16) & 0xf) != tmp
)
658 spec
->cdefine
.port_connectivity
= ass
>> 30;
659 spec
->cdefine
.enable_pcbeep
= (ass
& 0x100000) >> 20;
660 spec
->cdefine
.check_sum
= (ass
>> 16) & 0xf;
661 spec
->cdefine
.customization
= ass
>> 8;
663 spec
->cdefine
.sku_cfg
= ass
;
664 spec
->cdefine
.external_amp
= (ass
& 0x38) >> 3;
665 spec
->cdefine
.platform_type
= (ass
& 0x4) >> 2;
666 spec
->cdefine
.swap
= (ass
& 0x2) >> 1;
667 spec
->cdefine
.override
= ass
& 0x1;
669 codec_dbg(codec
, "SKU: Nid=0x%x sku_cfg=0x%08x\n",
670 nid
, spec
->cdefine
.sku_cfg
);
671 codec_dbg(codec
, "SKU: port_connectivity=0x%x\n",
672 spec
->cdefine
.port_connectivity
);
673 codec_dbg(codec
, "SKU: enable_pcbeep=0x%x\n", spec
->cdefine
.enable_pcbeep
);
674 codec_dbg(codec
, "SKU: check_sum=0x%08x\n", spec
->cdefine
.check_sum
);
675 codec_dbg(codec
, "SKU: customization=0x%08x\n", spec
->cdefine
.customization
);
676 codec_dbg(codec
, "SKU: external_amp=0x%x\n", spec
->cdefine
.external_amp
);
677 codec_dbg(codec
, "SKU: platform_type=0x%x\n", spec
->cdefine
.platform_type
);
678 codec_dbg(codec
, "SKU: swap=0x%x\n", spec
->cdefine
.swap
);
679 codec_dbg(codec
, "SKU: override=0x%x\n", spec
->cdefine
.override
);
684 /* return the position of NID in the list, or -1 if not found */
685 static int find_idx_in_nid_list(hda_nid_t nid
, const hda_nid_t
*list
, int nums
)
688 for (i
= 0; i
< nums
; i
++)
693 /* return true if the given NID is found in the list */
694 static bool found_in_nid_list(hda_nid_t nid
, const hda_nid_t
*list
, int nums
)
696 return find_idx_in_nid_list(nid
, list
, nums
) >= 0;
699 /* check subsystem ID and set up device-specific initialization;
700 * return 1 if initialized, 0 if invalid SSID
702 /* 32-bit subsystem ID for BIOS loading in HD Audio codec.
703 * 31 ~ 16 : Manufacture ID
705 * 7 ~ 0 : Assembly ID
706 * port-A --> pin 39/41, port-E --> pin 14/15, port-D --> pin 35/36
708 static int alc_subsystem_id(struct hda_codec
*codec
, const hda_nid_t
*ports
)
710 unsigned int ass
, tmp
, i
;
712 struct alc_spec
*spec
= codec
->spec
;
714 if (spec
->cdefine
.fixup
) {
715 ass
= spec
->cdefine
.sku_cfg
;
716 if (ass
== ALC_FIXUP_SKU_IGNORE
)
721 ass
= codec
->core
.subsystem_id
& 0xffff;
722 if (codec
->bus
->pci
&&
723 ass
!= codec
->bus
->pci
->subsystem_device
&& (ass
& 1))
726 /* invalid SSID, check the special NID pin defcfg instead */
728 * 31~30 : port connectivity
731 * 19~16 : Check sum (15:1)
736 if (codec
->core
.vendor_id
== 0x10ec0260)
738 ass
= snd_hda_codec_get_pincfg(codec
, nid
);
740 "realtek: No valid SSID, checking pincfg 0x%08x for NID 0x%x\n",
744 if ((ass
>> 30) != 1) /* no physical connection */
749 for (i
= 1; i
< 16; i
++) {
753 if (((ass
>> 16) & 0xf) != tmp
)
756 codec_dbg(codec
, "realtek: Enabling init ASM_ID=0x%04x CODEC_ID=%08x\n",
757 ass
& 0xffff, codec
->core
.vendor_id
);
761 * 2 : 0 --> Desktop, 1 --> Laptop
762 * 3~5 : External Amplifier control
765 tmp
= (ass
& 0x38) >> 3; /* external Amp control */
766 if (spec
->init_amp
== ALC_INIT_UNDEFINED
) {
769 alc_setup_gpio(codec
, 0x01);
772 alc_setup_gpio(codec
, 0x02);
775 alc_setup_gpio(codec
, 0x03);
779 spec
->init_amp
= ALC_INIT_DEFAULT
;
784 /* is laptop or Desktop and enable the function "Mute internal speaker
785 * when the external headphone out jack is plugged"
790 * 10~8 : Jack location
791 * 12~11: Headphone out -> 00: PortA, 01: PortE, 02: PortD, 03: Resvered
793 * 15 : 1 --> enable the function "Mute internal speaker
794 * when the external headphone out jack is plugged"
796 if (!alc_get_hp_pin(spec
)) {
798 tmp
= (ass
>> 11) & 0x3; /* HP to chassis */
800 if (found_in_nid_list(nid
, spec
->gen
.autocfg
.line_out_pins
,
801 spec
->gen
.autocfg
.line_outs
))
803 spec
->gen
.autocfg
.hp_pins
[0] = nid
;
808 /* Check the validity of ALC subsystem-id
809 * ports contains an array of 4 pin NIDs for port-A, E, D and I */
810 static void alc_ssid_check(struct hda_codec
*codec
, const hda_nid_t
*ports
)
812 if (!alc_subsystem_id(codec
, ports
)) {
813 struct alc_spec
*spec
= codec
->spec
;
814 if (spec
->init_amp
== ALC_INIT_UNDEFINED
) {
816 "realtek: Enable default setup for auto mode as fallback\n");
817 spec
->init_amp
= ALC_INIT_DEFAULT
;
825 static void alc_fixup_inv_dmic(struct hda_codec
*codec
,
826 const struct hda_fixup
*fix
, int action
)
828 struct alc_spec
*spec
= codec
->spec
;
830 spec
->gen
.inv_dmic_split
= 1;
834 static int alc_build_controls(struct hda_codec
*codec
)
838 err
= snd_hda_gen_build_controls(codec
);
842 snd_hda_apply_fixup(codec
, HDA_FIXUP_ACT_BUILD
);
851 static void alc_pre_init(struct hda_codec
*codec
)
853 alc_fill_eapd_coef(codec
);
856 #define is_s3_resume(codec) \
857 ((codec)->core.dev.power.power_state.event == PM_EVENT_RESUME)
858 #define is_s4_resume(codec) \
859 ((codec)->core.dev.power.power_state.event == PM_EVENT_RESTORE)
861 static int alc_init(struct hda_codec
*codec
)
863 struct alc_spec
*spec
= codec
->spec
;
865 /* hibernation resume needs the full chip initialization */
866 if (is_s4_resume(codec
))
870 spec
->init_hook(codec
);
872 spec
->gen
.skip_verbs
= 1; /* applied in below */
873 snd_hda_gen_init(codec
);
875 alc_auto_init_amp(codec
, spec
->init_amp
);
876 snd_hda_apply_verbs(codec
); /* apply verbs here after own init */
878 snd_hda_apply_fixup(codec
, HDA_FIXUP_ACT_INIT
);
883 static inline void alc_shutup(struct hda_codec
*codec
)
885 struct alc_spec
*spec
= codec
->spec
;
887 if (!snd_hda_get_bool_hint(codec
, "shutup"))
888 return; /* disabled explicitly by hints */
890 if (spec
&& spec
->shutup
)
893 alc_shutup_pins(codec
);
896 static void alc_reboot_notify(struct hda_codec
*codec
)
898 struct alc_spec
*spec
= codec
->spec
;
900 if (spec
&& spec
->reboot_notify
)
901 spec
->reboot_notify(codec
);
906 #define alc_free snd_hda_gen_free
909 static void alc_power_eapd(struct hda_codec
*codec
)
911 alc_auto_setup_eapd(codec
, false);
914 static int alc_suspend(struct hda_codec
*codec
)
916 struct alc_spec
*spec
= codec
->spec
;
918 if (spec
&& spec
->power_hook
)
919 spec
->power_hook(codec
);
925 static int alc_resume(struct hda_codec
*codec
)
927 struct alc_spec
*spec
= codec
->spec
;
929 if (!spec
->no_depop_delay
)
930 msleep(150); /* to avoid pop noise */
931 codec
->patch_ops
.init(codec
);
932 snd_hda_regmap_sync(codec
);
933 hda_call_check_power_status(codec
, 0x01);
940 static const struct hda_codec_ops alc_patch_ops
= {
941 .build_controls
= alc_build_controls
,
942 .build_pcms
= snd_hda_gen_build_pcms
,
945 .unsol_event
= snd_hda_jack_unsol_event
,
947 .resume
= alc_resume
,
948 .suspend
= alc_suspend
,
949 .check_power_status
= snd_hda_gen_check_power_status
,
951 .reboot_notify
= alc_reboot_notify
,
955 #define alc_codec_rename(codec, name) snd_hda_codec_set_name(codec, name)
958 * Rename codecs appropriately from COEF value or subvendor id
960 struct alc_codec_rename_table
{
961 unsigned int vendor_id
;
962 unsigned short coef_mask
;
963 unsigned short coef_bits
;
967 struct alc_codec_rename_pci_table
{
968 unsigned int codec_vendor_id
;
969 unsigned short pci_subvendor
;
970 unsigned short pci_subdevice
;
974 static const struct alc_codec_rename_table rename_tbl
[] = {
975 { 0x10ec0221, 0xf00f, 0x1003, "ALC231" },
976 { 0x10ec0269, 0xfff0, 0x3010, "ALC277" },
977 { 0x10ec0269, 0xf0f0, 0x2010, "ALC259" },
978 { 0x10ec0269, 0xf0f0, 0x3010, "ALC258" },
979 { 0x10ec0269, 0x00f0, 0x0010, "ALC269VB" },
980 { 0x10ec0269, 0xffff, 0xa023, "ALC259" },
981 { 0x10ec0269, 0xffff, 0x6023, "ALC281X" },
982 { 0x10ec0269, 0x00f0, 0x0020, "ALC269VC" },
983 { 0x10ec0269, 0x00f0, 0x0030, "ALC269VD" },
984 { 0x10ec0662, 0xffff, 0x4020, "ALC656" },
985 { 0x10ec0887, 0x00f0, 0x0030, "ALC887-VD" },
986 { 0x10ec0888, 0x00f0, 0x0030, "ALC888-VD" },
987 { 0x10ec0888, 0xf0f0, 0x3020, "ALC886" },
988 { 0x10ec0899, 0x2000, 0x2000, "ALC899" },
989 { 0x10ec0892, 0xffff, 0x8020, "ALC661" },
990 { 0x10ec0892, 0xffff, 0x8011, "ALC661" },
991 { 0x10ec0892, 0xffff, 0x4011, "ALC656" },
995 static const struct alc_codec_rename_pci_table rename_pci_tbl
[] = {
996 { 0x10ec0280, 0x1028, 0, "ALC3220" },
997 { 0x10ec0282, 0x1028, 0, "ALC3221" },
998 { 0x10ec0283, 0x1028, 0, "ALC3223" },
999 { 0x10ec0288, 0x1028, 0, "ALC3263" },
1000 { 0x10ec0292, 0x1028, 0, "ALC3226" },
1001 { 0x10ec0293, 0x1028, 0, "ALC3235" },
1002 { 0x10ec0255, 0x1028, 0, "ALC3234" },
1003 { 0x10ec0668, 0x1028, 0, "ALC3661" },
1004 { 0x10ec0275, 0x1028, 0, "ALC3260" },
1005 { 0x10ec0899, 0x1028, 0, "ALC3861" },
1006 { 0x10ec0298, 0x1028, 0, "ALC3266" },
1007 { 0x10ec0236, 0x1028, 0, "ALC3204" },
1008 { 0x10ec0256, 0x1028, 0, "ALC3246" },
1009 { 0x10ec0225, 0x1028, 0, "ALC3253" },
1010 { 0x10ec0295, 0x1028, 0, "ALC3254" },
1011 { 0x10ec0299, 0x1028, 0, "ALC3271" },
1012 { 0x10ec0670, 0x1025, 0, "ALC669X" },
1013 { 0x10ec0676, 0x1025, 0, "ALC679X" },
1014 { 0x10ec0282, 0x1043, 0, "ALC3229" },
1015 { 0x10ec0233, 0x1043, 0, "ALC3236" },
1016 { 0x10ec0280, 0x103c, 0, "ALC3228" },
1017 { 0x10ec0282, 0x103c, 0, "ALC3227" },
1018 { 0x10ec0286, 0x103c, 0, "ALC3242" },
1019 { 0x10ec0290, 0x103c, 0, "ALC3241" },
1020 { 0x10ec0668, 0x103c, 0, "ALC3662" },
1021 { 0x10ec0283, 0x17aa, 0, "ALC3239" },
1022 { 0x10ec0292, 0x17aa, 0, "ALC3232" },
1023 { } /* terminator */
1026 static int alc_codec_rename_from_preset(struct hda_codec
*codec
)
1028 const struct alc_codec_rename_table
*p
;
1029 const struct alc_codec_rename_pci_table
*q
;
1031 for (p
= rename_tbl
; p
->vendor_id
; p
++) {
1032 if (p
->vendor_id
!= codec
->core
.vendor_id
)
1034 if ((alc_get_coef0(codec
) & p
->coef_mask
) == p
->coef_bits
)
1035 return alc_codec_rename(codec
, p
->name
);
1038 if (!codec
->bus
->pci
)
1040 for (q
= rename_pci_tbl
; q
->codec_vendor_id
; q
++) {
1041 if (q
->codec_vendor_id
!= codec
->core
.vendor_id
)
1043 if (q
->pci_subvendor
!= codec
->bus
->pci
->subsystem_vendor
)
1045 if (!q
->pci_subdevice
||
1046 q
->pci_subdevice
== codec
->bus
->pci
->subsystem_device
)
1047 return alc_codec_rename(codec
, q
->name
);
1055 * Digital-beep handlers
1057 #ifdef CONFIG_SND_HDA_INPUT_BEEP
1059 /* additional beep mixers; private_value will be overwritten */
1060 static const struct snd_kcontrol_new alc_beep_mixer
[] = {
1061 HDA_CODEC_VOLUME("Beep Playback Volume", 0, 0, HDA_INPUT
),
1062 HDA_CODEC_MUTE_BEEP("Beep Playback Switch", 0, 0, HDA_INPUT
),
1065 /* set up and create beep controls */
1066 static int set_beep_amp(struct alc_spec
*spec
, hda_nid_t nid
,
1069 struct snd_kcontrol_new
*knew
;
1070 unsigned int beep_amp
= HDA_COMPOSE_AMP_VAL(nid
, 3, idx
, dir
);
1073 for (i
= 0; i
< ARRAY_SIZE(alc_beep_mixer
); i
++) {
1074 knew
= snd_hda_gen_add_kctl(&spec
->gen
, NULL
,
1075 &alc_beep_mixer
[i
]);
1078 knew
->private_value
= beep_amp
;
1083 static const struct snd_pci_quirk beep_allow_list
[] = {
1084 SND_PCI_QUIRK(0x1043, 0x103c, "ASUS", 1),
1085 SND_PCI_QUIRK(0x1043, 0x115d, "ASUS", 1),
1086 SND_PCI_QUIRK(0x1043, 0x829f, "ASUS", 1),
1087 SND_PCI_QUIRK(0x1043, 0x8376, "EeePC", 1),
1088 SND_PCI_QUIRK(0x1043, 0x83ce, "EeePC", 1),
1089 SND_PCI_QUIRK(0x1043, 0x831a, "EeePC", 1),
1090 SND_PCI_QUIRK(0x1043, 0x834a, "EeePC", 1),
1091 SND_PCI_QUIRK(0x1458, 0xa002, "GA-MA790X", 1),
1092 SND_PCI_QUIRK(0x8086, 0xd613, "Intel", 1),
1093 /* denylist -- no beep available */
1094 SND_PCI_QUIRK(0x17aa, 0x309e, "Lenovo ThinkCentre M73", 0),
1095 SND_PCI_QUIRK(0x17aa, 0x30a3, "Lenovo ThinkCentre M93", 0),
1099 static inline int has_cdefine_beep(struct hda_codec
*codec
)
1101 struct alc_spec
*spec
= codec
->spec
;
1102 const struct snd_pci_quirk
*q
;
1103 q
= snd_pci_quirk_lookup(codec
->bus
->pci
, beep_allow_list
);
1106 return spec
->cdefine
.enable_pcbeep
;
1109 #define set_beep_amp(spec, nid, idx, dir) 0
1110 #define has_cdefine_beep(codec) 0
1113 /* parse the BIOS configuration and set up the alc_spec */
1114 /* return 1 if successful, 0 if the proper config is not found,
1115 * or a negative error code
1117 static int alc_parse_auto_config(struct hda_codec
*codec
,
1118 const hda_nid_t
*ignore_nids
,
1119 const hda_nid_t
*ssid_nids
)
1121 struct alc_spec
*spec
= codec
->spec
;
1122 struct auto_pin_cfg
*cfg
= &spec
->gen
.autocfg
;
1125 err
= snd_hda_parse_pin_defcfg(codec
, cfg
, ignore_nids
,
1131 alc_ssid_check(codec
, ssid_nids
);
1133 err
= snd_hda_gen_parse_auto_config(codec
, cfg
);
1140 /* common preparation job for alc_spec */
1141 static int alc_alloc_spec(struct hda_codec
*codec
, hda_nid_t mixer_nid
)
1143 struct alc_spec
*spec
= kzalloc(sizeof(*spec
), GFP_KERNEL
);
1149 snd_hda_gen_spec_init(&spec
->gen
);
1150 spec
->gen
.mixer_nid
= mixer_nid
;
1151 spec
->gen
.own_eapd_ctl
= 1;
1152 codec
->single_adc_amp
= 1;
1153 /* FIXME: do we need this for all Realtek codec models? */
1154 codec
->spdif_status_reset
= 1;
1155 codec
->forced_resume
= 1;
1156 codec
->patch_ops
= alc_patch_ops
;
1158 err
= alc_codec_rename_from_preset(codec
);
1166 static int alc880_parse_auto_config(struct hda_codec
*codec
)
1168 static const hda_nid_t alc880_ignore
[] = { 0x1d, 0 };
1169 static const hda_nid_t alc880_ssids
[] = { 0x15, 0x1b, 0x14, 0 };
1170 return alc_parse_auto_config(codec
, alc880_ignore
, alc880_ssids
);
1179 ALC880_FIXUP_MEDION_RIM
,
1181 ALC880_FIXUP_LG_LW25
,
1183 ALC880_FIXUP_EAPD_COEF
,
1184 ALC880_FIXUP_TCL_S700
,
1185 ALC880_FIXUP_VOL_KNOB
,
1186 ALC880_FIXUP_FUJITSU
,
1188 ALC880_FIXUP_UNIWILL
,
1189 ALC880_FIXUP_UNIWILL_DIG
,
1191 ALC880_FIXUP_ASUS_W5A
,
1192 ALC880_FIXUP_3ST_BASE
,
1194 ALC880_FIXUP_3ST_DIG
,
1195 ALC880_FIXUP_5ST_BASE
,
1197 ALC880_FIXUP_5ST_DIG
,
1198 ALC880_FIXUP_6ST_BASE
,
1200 ALC880_FIXUP_6ST_DIG
,
1201 ALC880_FIXUP_6ST_AUTOMUTE
,
1204 /* enable the volume-knob widget support on NID 0x21 */
1205 static void alc880_fixup_vol_knob(struct hda_codec
*codec
,
1206 const struct hda_fixup
*fix
, int action
)
1208 if (action
== HDA_FIXUP_ACT_PROBE
)
1209 snd_hda_jack_detect_enable_callback(codec
, 0x21,
1210 alc_update_knob_master
);
1213 static const struct hda_fixup alc880_fixups
[] = {
1214 [ALC880_FIXUP_GPIO1
] = {
1215 .type
= HDA_FIXUP_FUNC
,
1216 .v
.func
= alc_fixup_gpio1
,
1218 [ALC880_FIXUP_GPIO2
] = {
1219 .type
= HDA_FIXUP_FUNC
,
1220 .v
.func
= alc_fixup_gpio2
,
1222 [ALC880_FIXUP_MEDION_RIM
] = {
1223 .type
= HDA_FIXUP_VERBS
,
1224 .v
.verbs
= (const struct hda_verb
[]) {
1225 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x07 },
1226 { 0x20, AC_VERB_SET_PROC_COEF
, 0x3060 },
1230 .chain_id
= ALC880_FIXUP_GPIO2
,
1232 [ALC880_FIXUP_LG
] = {
1233 .type
= HDA_FIXUP_PINS
,
1234 .v
.pins
= (const struct hda_pintbl
[]) {
1235 /* disable bogus unused pins */
1236 { 0x16, 0x411111f0 },
1237 { 0x18, 0x411111f0 },
1238 { 0x1a, 0x411111f0 },
1242 [ALC880_FIXUP_LG_LW25
] = {
1243 .type
= HDA_FIXUP_PINS
,
1244 .v
.pins
= (const struct hda_pintbl
[]) {
1245 { 0x1a, 0x0181344f }, /* line-in */
1246 { 0x1b, 0x0321403f }, /* headphone */
1250 [ALC880_FIXUP_W810
] = {
1251 .type
= HDA_FIXUP_PINS
,
1252 .v
.pins
= (const struct hda_pintbl
[]) {
1253 /* disable bogus unused pins */
1254 { 0x17, 0x411111f0 },
1258 .chain_id
= ALC880_FIXUP_GPIO2
,
1260 [ALC880_FIXUP_EAPD_COEF
] = {
1261 .type
= HDA_FIXUP_VERBS
,
1262 .v
.verbs
= (const struct hda_verb
[]) {
1263 /* change to EAPD mode */
1264 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x07 },
1265 { 0x20, AC_VERB_SET_PROC_COEF
, 0x3060 },
1269 [ALC880_FIXUP_TCL_S700
] = {
1270 .type
= HDA_FIXUP_VERBS
,
1271 .v
.verbs
= (const struct hda_verb
[]) {
1272 /* change to EAPD mode */
1273 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x07 },
1274 { 0x20, AC_VERB_SET_PROC_COEF
, 0x3070 },
1278 .chain_id
= ALC880_FIXUP_GPIO2
,
1280 [ALC880_FIXUP_VOL_KNOB
] = {
1281 .type
= HDA_FIXUP_FUNC
,
1282 .v
.func
= alc880_fixup_vol_knob
,
1284 [ALC880_FIXUP_FUJITSU
] = {
1285 /* override all pins as BIOS on old Amilo is broken */
1286 .type
= HDA_FIXUP_PINS
,
1287 .v
.pins
= (const struct hda_pintbl
[]) {
1288 { 0x14, 0x0121401f }, /* HP */
1289 { 0x15, 0x99030120 }, /* speaker */
1290 { 0x16, 0x99030130 }, /* bass speaker */
1291 { 0x17, 0x411111f0 }, /* N/A */
1292 { 0x18, 0x411111f0 }, /* N/A */
1293 { 0x19, 0x01a19950 }, /* mic-in */
1294 { 0x1a, 0x411111f0 }, /* N/A */
1295 { 0x1b, 0x411111f0 }, /* N/A */
1296 { 0x1c, 0x411111f0 }, /* N/A */
1297 { 0x1d, 0x411111f0 }, /* N/A */
1298 { 0x1e, 0x01454140 }, /* SPDIF out */
1302 .chain_id
= ALC880_FIXUP_VOL_KNOB
,
1304 [ALC880_FIXUP_F1734
] = {
1305 /* almost compatible with FUJITSU, but no bass and SPDIF */
1306 .type
= HDA_FIXUP_PINS
,
1307 .v
.pins
= (const struct hda_pintbl
[]) {
1308 { 0x14, 0x0121401f }, /* HP */
1309 { 0x15, 0x99030120 }, /* speaker */
1310 { 0x16, 0x411111f0 }, /* N/A */
1311 { 0x17, 0x411111f0 }, /* N/A */
1312 { 0x18, 0x411111f0 }, /* N/A */
1313 { 0x19, 0x01a19950 }, /* mic-in */
1314 { 0x1a, 0x411111f0 }, /* N/A */
1315 { 0x1b, 0x411111f0 }, /* N/A */
1316 { 0x1c, 0x411111f0 }, /* N/A */
1317 { 0x1d, 0x411111f0 }, /* N/A */
1318 { 0x1e, 0x411111f0 }, /* N/A */
1322 .chain_id
= ALC880_FIXUP_VOL_KNOB
,
1324 [ALC880_FIXUP_UNIWILL
] = {
1325 /* need to fix HP and speaker pins to be parsed correctly */
1326 .type
= HDA_FIXUP_PINS
,
1327 .v
.pins
= (const struct hda_pintbl
[]) {
1328 { 0x14, 0x0121411f }, /* HP */
1329 { 0x15, 0x99030120 }, /* speaker */
1330 { 0x16, 0x99030130 }, /* bass speaker */
1334 [ALC880_FIXUP_UNIWILL_DIG
] = {
1335 .type
= HDA_FIXUP_PINS
,
1336 .v
.pins
= (const struct hda_pintbl
[]) {
1337 /* disable bogus unused pins */
1338 { 0x17, 0x411111f0 },
1339 { 0x19, 0x411111f0 },
1340 { 0x1b, 0x411111f0 },
1341 { 0x1f, 0x411111f0 },
1345 [ALC880_FIXUP_Z71V
] = {
1346 .type
= HDA_FIXUP_PINS
,
1347 .v
.pins
= (const struct hda_pintbl
[]) {
1348 /* set up the whole pins as BIOS is utterly broken */
1349 { 0x14, 0x99030120 }, /* speaker */
1350 { 0x15, 0x0121411f }, /* HP */
1351 { 0x16, 0x411111f0 }, /* N/A */
1352 { 0x17, 0x411111f0 }, /* N/A */
1353 { 0x18, 0x01a19950 }, /* mic-in */
1354 { 0x19, 0x411111f0 }, /* N/A */
1355 { 0x1a, 0x01813031 }, /* line-in */
1356 { 0x1b, 0x411111f0 }, /* N/A */
1357 { 0x1c, 0x411111f0 }, /* N/A */
1358 { 0x1d, 0x411111f0 }, /* N/A */
1359 { 0x1e, 0x0144111e }, /* SPDIF */
1363 [ALC880_FIXUP_ASUS_W5A
] = {
1364 .type
= HDA_FIXUP_PINS
,
1365 .v
.pins
= (const struct hda_pintbl
[]) {
1366 /* set up the whole pins as BIOS is utterly broken */
1367 { 0x14, 0x0121411f }, /* HP */
1368 { 0x15, 0x411111f0 }, /* N/A */
1369 { 0x16, 0x411111f0 }, /* N/A */
1370 { 0x17, 0x411111f0 }, /* N/A */
1371 { 0x18, 0x90a60160 }, /* mic */
1372 { 0x19, 0x411111f0 }, /* N/A */
1373 { 0x1a, 0x411111f0 }, /* N/A */
1374 { 0x1b, 0x411111f0 }, /* N/A */
1375 { 0x1c, 0x411111f0 }, /* N/A */
1376 { 0x1d, 0x411111f0 }, /* N/A */
1377 { 0x1e, 0xb743111e }, /* SPDIF out */
1381 .chain_id
= ALC880_FIXUP_GPIO1
,
1383 [ALC880_FIXUP_3ST_BASE
] = {
1384 .type
= HDA_FIXUP_PINS
,
1385 .v
.pins
= (const struct hda_pintbl
[]) {
1386 { 0x14, 0x01014010 }, /* line-out */
1387 { 0x15, 0x411111f0 }, /* N/A */
1388 { 0x16, 0x411111f0 }, /* N/A */
1389 { 0x17, 0x411111f0 }, /* N/A */
1390 { 0x18, 0x01a19c30 }, /* mic-in */
1391 { 0x19, 0x0121411f }, /* HP */
1392 { 0x1a, 0x01813031 }, /* line-in */
1393 { 0x1b, 0x02a19c40 }, /* front-mic */
1394 { 0x1c, 0x411111f0 }, /* N/A */
1395 { 0x1d, 0x411111f0 }, /* N/A */
1396 /* 0x1e is filled in below */
1397 { 0x1f, 0x411111f0 }, /* N/A */
1401 [ALC880_FIXUP_3ST
] = {
1402 .type
= HDA_FIXUP_PINS
,
1403 .v
.pins
= (const struct hda_pintbl
[]) {
1404 { 0x1e, 0x411111f0 }, /* N/A */
1408 .chain_id
= ALC880_FIXUP_3ST_BASE
,
1410 [ALC880_FIXUP_3ST_DIG
] = {
1411 .type
= HDA_FIXUP_PINS
,
1412 .v
.pins
= (const struct hda_pintbl
[]) {
1413 { 0x1e, 0x0144111e }, /* SPDIF */
1417 .chain_id
= ALC880_FIXUP_3ST_BASE
,
1419 [ALC880_FIXUP_5ST_BASE
] = {
1420 .type
= HDA_FIXUP_PINS
,
1421 .v
.pins
= (const struct hda_pintbl
[]) {
1422 { 0x14, 0x01014010 }, /* front */
1423 { 0x15, 0x411111f0 }, /* N/A */
1424 { 0x16, 0x01011411 }, /* CLFE */
1425 { 0x17, 0x01016412 }, /* surr */
1426 { 0x18, 0x01a19c30 }, /* mic-in */
1427 { 0x19, 0x0121411f }, /* HP */
1428 { 0x1a, 0x01813031 }, /* line-in */
1429 { 0x1b, 0x02a19c40 }, /* front-mic */
1430 { 0x1c, 0x411111f0 }, /* N/A */
1431 { 0x1d, 0x411111f0 }, /* N/A */
1432 /* 0x1e is filled in below */
1433 { 0x1f, 0x411111f0 }, /* N/A */
1437 [ALC880_FIXUP_5ST
] = {
1438 .type
= HDA_FIXUP_PINS
,
1439 .v
.pins
= (const struct hda_pintbl
[]) {
1440 { 0x1e, 0x411111f0 }, /* N/A */
1444 .chain_id
= ALC880_FIXUP_5ST_BASE
,
1446 [ALC880_FIXUP_5ST_DIG
] = {
1447 .type
= HDA_FIXUP_PINS
,
1448 .v
.pins
= (const struct hda_pintbl
[]) {
1449 { 0x1e, 0x0144111e }, /* SPDIF */
1453 .chain_id
= ALC880_FIXUP_5ST_BASE
,
1455 [ALC880_FIXUP_6ST_BASE
] = {
1456 .type
= HDA_FIXUP_PINS
,
1457 .v
.pins
= (const struct hda_pintbl
[]) {
1458 { 0x14, 0x01014010 }, /* front */
1459 { 0x15, 0x01016412 }, /* surr */
1460 { 0x16, 0x01011411 }, /* CLFE */
1461 { 0x17, 0x01012414 }, /* side */
1462 { 0x18, 0x01a19c30 }, /* mic-in */
1463 { 0x19, 0x02a19c40 }, /* front-mic */
1464 { 0x1a, 0x01813031 }, /* line-in */
1465 { 0x1b, 0x0121411f }, /* HP */
1466 { 0x1c, 0x411111f0 }, /* N/A */
1467 { 0x1d, 0x411111f0 }, /* N/A */
1468 /* 0x1e is filled in below */
1469 { 0x1f, 0x411111f0 }, /* N/A */
1473 [ALC880_FIXUP_6ST
] = {
1474 .type
= HDA_FIXUP_PINS
,
1475 .v
.pins
= (const struct hda_pintbl
[]) {
1476 { 0x1e, 0x411111f0 }, /* N/A */
1480 .chain_id
= ALC880_FIXUP_6ST_BASE
,
1482 [ALC880_FIXUP_6ST_DIG
] = {
1483 .type
= HDA_FIXUP_PINS
,
1484 .v
.pins
= (const struct hda_pintbl
[]) {
1485 { 0x1e, 0x0144111e }, /* SPDIF */
1489 .chain_id
= ALC880_FIXUP_6ST_BASE
,
1491 [ALC880_FIXUP_6ST_AUTOMUTE
] = {
1492 .type
= HDA_FIXUP_PINS
,
1493 .v
.pins
= (const struct hda_pintbl
[]) {
1494 { 0x1b, 0x0121401f }, /* HP with jack detect */
1497 .chained_before
= true,
1498 .chain_id
= ALC880_FIXUP_6ST_BASE
,
1502 static const struct snd_pci_quirk alc880_fixup_tbl
[] = {
1503 SND_PCI_QUIRK(0x1019, 0x0f69, "Coeus G610P", ALC880_FIXUP_W810
),
1504 SND_PCI_QUIRK(0x1043, 0x10c3, "ASUS W5A", ALC880_FIXUP_ASUS_W5A
),
1505 SND_PCI_QUIRK(0x1043, 0x1964, "ASUS Z71V", ALC880_FIXUP_Z71V
),
1506 SND_PCI_QUIRK_VENDOR(0x1043, "ASUS", ALC880_FIXUP_GPIO1
),
1507 SND_PCI_QUIRK(0x147b, 0x1045, "ABit AA8XE", ALC880_FIXUP_6ST_AUTOMUTE
),
1508 SND_PCI_QUIRK(0x1558, 0x5401, "Clevo GPIO2", ALC880_FIXUP_GPIO2
),
1509 SND_PCI_QUIRK_VENDOR(0x1558, "Clevo", ALC880_FIXUP_EAPD_COEF
),
1510 SND_PCI_QUIRK(0x1584, 0x9050, "Uniwill", ALC880_FIXUP_UNIWILL_DIG
),
1511 SND_PCI_QUIRK(0x1584, 0x9054, "Uniwill", ALC880_FIXUP_F1734
),
1512 SND_PCI_QUIRK(0x1584, 0x9070, "Uniwill", ALC880_FIXUP_UNIWILL
),
1513 SND_PCI_QUIRK(0x1584, 0x9077, "Uniwill P53", ALC880_FIXUP_VOL_KNOB
),
1514 SND_PCI_QUIRK(0x161f, 0x203d, "W810", ALC880_FIXUP_W810
),
1515 SND_PCI_QUIRK(0x161f, 0x205d, "Medion Rim 2150", ALC880_FIXUP_MEDION_RIM
),
1516 SND_PCI_QUIRK(0x1631, 0xe011, "PB 13201056", ALC880_FIXUP_6ST_AUTOMUTE
),
1517 SND_PCI_QUIRK(0x1734, 0x107c, "FSC Amilo M1437", ALC880_FIXUP_FUJITSU
),
1518 SND_PCI_QUIRK(0x1734, 0x1094, "FSC Amilo M1451G", ALC880_FIXUP_FUJITSU
),
1519 SND_PCI_QUIRK(0x1734, 0x10ac, "FSC AMILO Xi 1526", ALC880_FIXUP_F1734
),
1520 SND_PCI_QUIRK(0x1734, 0x10b0, "FSC Amilo Pi1556", ALC880_FIXUP_FUJITSU
),
1521 SND_PCI_QUIRK(0x1854, 0x003b, "LG", ALC880_FIXUP_LG
),
1522 SND_PCI_QUIRK(0x1854, 0x005f, "LG P1 Express", ALC880_FIXUP_LG
),
1523 SND_PCI_QUIRK(0x1854, 0x0068, "LG w1", ALC880_FIXUP_LG
),
1524 SND_PCI_QUIRK(0x1854, 0x0077, "LG LW25", ALC880_FIXUP_LG_LW25
),
1525 SND_PCI_QUIRK(0x19db, 0x4188, "TCL S700", ALC880_FIXUP_TCL_S700
),
1527 /* Below is the copied entries from alc880_quirks.c.
1528 * It's not quite sure whether BIOS sets the correct pin-config table
1529 * on these machines, thus they are kept to be compatible with
1530 * the old static quirks. Once when it's confirmed to work without
1531 * these overrides, it'd be better to remove.
1533 SND_PCI_QUIRK(0x1019, 0xa880, "ECS", ALC880_FIXUP_5ST_DIG
),
1534 SND_PCI_QUIRK(0x1019, 0xa884, "Acer APFV", ALC880_FIXUP_6ST
),
1535 SND_PCI_QUIRK(0x1025, 0x0070, "ULI", ALC880_FIXUP_3ST_DIG
),
1536 SND_PCI_QUIRK(0x1025, 0x0077, "ULI", ALC880_FIXUP_6ST_DIG
),
1537 SND_PCI_QUIRK(0x1025, 0x0078, "ULI", ALC880_FIXUP_6ST_DIG
),
1538 SND_PCI_QUIRK(0x1025, 0x0087, "ULI", ALC880_FIXUP_6ST_DIG
),
1539 SND_PCI_QUIRK(0x1025, 0xe309, "ULI", ALC880_FIXUP_3ST_DIG
),
1540 SND_PCI_QUIRK(0x1025, 0xe310, "ULI", ALC880_FIXUP_3ST
),
1541 SND_PCI_QUIRK(0x1039, 0x1234, NULL
, ALC880_FIXUP_6ST_DIG
),
1542 SND_PCI_QUIRK(0x104d, 0x81a0, "Sony", ALC880_FIXUP_3ST
),
1543 SND_PCI_QUIRK(0x104d, 0x81d6, "Sony", ALC880_FIXUP_3ST
),
1544 SND_PCI_QUIRK(0x107b, 0x3032, "Gateway", ALC880_FIXUP_5ST
),
1545 SND_PCI_QUIRK(0x107b, 0x3033, "Gateway", ALC880_FIXUP_5ST
),
1546 SND_PCI_QUIRK(0x107b, 0x4039, "Gateway", ALC880_FIXUP_5ST
),
1547 SND_PCI_QUIRK(0x1297, 0xc790, "Shuttle ST20G5", ALC880_FIXUP_6ST_DIG
),
1548 SND_PCI_QUIRK(0x1458, 0xa102, "Gigabyte K8", ALC880_FIXUP_6ST_DIG
),
1549 SND_PCI_QUIRK(0x1462, 0x1150, "MSI", ALC880_FIXUP_6ST_DIG
),
1550 SND_PCI_QUIRK(0x1509, 0x925d, "FIC P4M", ALC880_FIXUP_6ST_DIG
),
1551 SND_PCI_QUIRK(0x1565, 0x8202, "Biostar", ALC880_FIXUP_5ST_DIG
),
1552 SND_PCI_QUIRK(0x1695, 0x400d, "EPoX", ALC880_FIXUP_5ST_DIG
),
1553 SND_PCI_QUIRK(0x1695, 0x4012, "EPox EP-5LDA", ALC880_FIXUP_5ST_DIG
),
1554 SND_PCI_QUIRK(0x2668, 0x8086, NULL
, ALC880_FIXUP_6ST_DIG
), /* broken BIOS */
1555 SND_PCI_QUIRK(0x8086, 0x2668, NULL
, ALC880_FIXUP_6ST_DIG
),
1556 SND_PCI_QUIRK(0x8086, 0xa100, "Intel mobo", ALC880_FIXUP_5ST_DIG
),
1557 SND_PCI_QUIRK(0x8086, 0xd400, "Intel mobo", ALC880_FIXUP_5ST_DIG
),
1558 SND_PCI_QUIRK(0x8086, 0xd401, "Intel mobo", ALC880_FIXUP_5ST_DIG
),
1559 SND_PCI_QUIRK(0x8086, 0xd402, "Intel mobo", ALC880_FIXUP_3ST_DIG
),
1560 SND_PCI_QUIRK(0x8086, 0xe224, "Intel mobo", ALC880_FIXUP_5ST_DIG
),
1561 SND_PCI_QUIRK(0x8086, 0xe305, "Intel mobo", ALC880_FIXUP_3ST_DIG
),
1562 SND_PCI_QUIRK(0x8086, 0xe308, "Intel mobo", ALC880_FIXUP_3ST_DIG
),
1563 SND_PCI_QUIRK(0x8086, 0xe400, "Intel mobo", ALC880_FIXUP_5ST_DIG
),
1564 SND_PCI_QUIRK(0x8086, 0xe401, "Intel mobo", ALC880_FIXUP_5ST_DIG
),
1565 SND_PCI_QUIRK(0x8086, 0xe402, "Intel mobo", ALC880_FIXUP_5ST_DIG
),
1567 SND_PCI_QUIRK_VENDOR(0x8086, "Intel mobo", ALC880_FIXUP_3ST
),
1568 SND_PCI_QUIRK(0xa0a0, 0x0560, "AOpen i915GMm-HFS", ALC880_FIXUP_5ST_DIG
),
1569 SND_PCI_QUIRK(0xe803, 0x1019, NULL
, ALC880_FIXUP_6ST_DIG
),
1573 static const struct hda_model_fixup alc880_fixup_models
[] = {
1574 {.id
= ALC880_FIXUP_3ST
, .name
= "3stack"},
1575 {.id
= ALC880_FIXUP_3ST_DIG
, .name
= "3stack-digout"},
1576 {.id
= ALC880_FIXUP_5ST
, .name
= "5stack"},
1577 {.id
= ALC880_FIXUP_5ST_DIG
, .name
= "5stack-digout"},
1578 {.id
= ALC880_FIXUP_6ST
, .name
= "6stack"},
1579 {.id
= ALC880_FIXUP_6ST_DIG
, .name
= "6stack-digout"},
1580 {.id
= ALC880_FIXUP_6ST_AUTOMUTE
, .name
= "6stack-automute"},
1586 * OK, here we have finally the patch for ALC880
1588 static int patch_alc880(struct hda_codec
*codec
)
1590 struct alc_spec
*spec
;
1593 err
= alc_alloc_spec(codec
, 0x0b);
1598 spec
->gen
.need_dac_fix
= 1;
1599 spec
->gen
.beep_nid
= 0x01;
1601 codec
->patch_ops
.unsol_event
= alc880_unsol_event
;
1603 alc_pre_init(codec
);
1605 snd_hda_pick_fixup(codec
, alc880_fixup_models
, alc880_fixup_tbl
,
1607 snd_hda_apply_fixup(codec
, HDA_FIXUP_ACT_PRE_PROBE
);
1609 /* automatic parse from the BIOS config */
1610 err
= alc880_parse_auto_config(codec
);
1614 if (!spec
->gen
.no_analog
) {
1615 err
= set_beep_amp(spec
, 0x0b, 0x05, HDA_INPUT
);
1620 snd_hda_apply_fixup(codec
, HDA_FIXUP_ACT_PROBE
);
1633 static int alc260_parse_auto_config(struct hda_codec
*codec
)
1635 static const hda_nid_t alc260_ignore
[] = { 0x17, 0 };
1636 static const hda_nid_t alc260_ssids
[] = { 0x10, 0x15, 0x0f, 0 };
1637 return alc_parse_auto_config(codec
, alc260_ignore
, alc260_ssids
);
1644 ALC260_FIXUP_HP_DC5750
,
1645 ALC260_FIXUP_HP_PIN_0F
,
1648 ALC260_FIXUP_GPIO1_TOGGLE
,
1649 ALC260_FIXUP_REPLACER
,
1650 ALC260_FIXUP_HP_B1900
,
1652 ALC260_FIXUP_FSC_S7020
,
1653 ALC260_FIXUP_FSC_S7020_JWSE
,
1654 ALC260_FIXUP_VAIO_PINS
,
1657 static void alc260_gpio1_automute(struct hda_codec
*codec
)
1659 struct alc_spec
*spec
= codec
->spec
;
1661 alc_update_gpio_data(codec
, 0x01, spec
->gen
.hp_jack_present
);
1664 static void alc260_fixup_gpio1_toggle(struct hda_codec
*codec
,
1665 const struct hda_fixup
*fix
, int action
)
1667 struct alc_spec
*spec
= codec
->spec
;
1668 if (action
== HDA_FIXUP_ACT_PROBE
) {
1669 /* although the machine has only one output pin, we need to
1670 * toggle GPIO1 according to the jack state
1672 spec
->gen
.automute_hook
= alc260_gpio1_automute
;
1673 spec
->gen
.detect_hp
= 1;
1674 spec
->gen
.automute_speaker
= 1;
1675 spec
->gen
.autocfg
.hp_pins
[0] = 0x0f; /* copy it for automute */
1676 snd_hda_jack_detect_enable_callback(codec
, 0x0f,
1677 snd_hda_gen_hp_automute
);
1678 alc_setup_gpio(codec
, 0x01);
1682 static void alc260_fixup_kn1(struct hda_codec
*codec
,
1683 const struct hda_fixup
*fix
, int action
)
1685 struct alc_spec
*spec
= codec
->spec
;
1686 static const struct hda_pintbl pincfgs
[] = {
1687 { 0x0f, 0x02214000 }, /* HP/speaker */
1688 { 0x12, 0x90a60160 }, /* int mic */
1689 { 0x13, 0x02a19000 }, /* ext mic */
1690 { 0x18, 0x01446000 }, /* SPDIF out */
1691 /* disable bogus I/O pins */
1692 { 0x10, 0x411111f0 },
1693 { 0x11, 0x411111f0 },
1694 { 0x14, 0x411111f0 },
1695 { 0x15, 0x411111f0 },
1696 { 0x16, 0x411111f0 },
1697 { 0x17, 0x411111f0 },
1698 { 0x19, 0x411111f0 },
1703 case HDA_FIXUP_ACT_PRE_PROBE
:
1704 snd_hda_apply_pincfgs(codec
, pincfgs
);
1705 spec
->init_amp
= ALC_INIT_NONE
;
1710 static void alc260_fixup_fsc_s7020(struct hda_codec
*codec
,
1711 const struct hda_fixup
*fix
, int action
)
1713 struct alc_spec
*spec
= codec
->spec
;
1714 if (action
== HDA_FIXUP_ACT_PRE_PROBE
)
1715 spec
->init_amp
= ALC_INIT_NONE
;
1718 static void alc260_fixup_fsc_s7020_jwse(struct hda_codec
*codec
,
1719 const struct hda_fixup
*fix
, int action
)
1721 struct alc_spec
*spec
= codec
->spec
;
1722 if (action
== HDA_FIXUP_ACT_PRE_PROBE
) {
1723 spec
->gen
.add_jack_modes
= 1;
1724 spec
->gen
.hp_mic
= 1;
1728 static const struct hda_fixup alc260_fixups
[] = {
1729 [ALC260_FIXUP_HP_DC5750
] = {
1730 .type
= HDA_FIXUP_PINS
,
1731 .v
.pins
= (const struct hda_pintbl
[]) {
1732 { 0x11, 0x90130110 }, /* speaker */
1736 [ALC260_FIXUP_HP_PIN_0F
] = {
1737 .type
= HDA_FIXUP_PINS
,
1738 .v
.pins
= (const struct hda_pintbl
[]) {
1739 { 0x0f, 0x01214000 }, /* HP */
1743 [ALC260_FIXUP_COEF
] = {
1744 .type
= HDA_FIXUP_VERBS
,
1745 .v
.verbs
= (const struct hda_verb
[]) {
1746 { 0x1a, AC_VERB_SET_COEF_INDEX
, 0x07 },
1747 { 0x1a, AC_VERB_SET_PROC_COEF
, 0x3040 },
1751 [ALC260_FIXUP_GPIO1
] = {
1752 .type
= HDA_FIXUP_FUNC
,
1753 .v
.func
= alc_fixup_gpio1
,
1755 [ALC260_FIXUP_GPIO1_TOGGLE
] = {
1756 .type
= HDA_FIXUP_FUNC
,
1757 .v
.func
= alc260_fixup_gpio1_toggle
,
1759 .chain_id
= ALC260_FIXUP_HP_PIN_0F
,
1761 [ALC260_FIXUP_REPLACER
] = {
1762 .type
= HDA_FIXUP_VERBS
,
1763 .v
.verbs
= (const struct hda_verb
[]) {
1764 { 0x1a, AC_VERB_SET_COEF_INDEX
, 0x07 },
1765 { 0x1a, AC_VERB_SET_PROC_COEF
, 0x3050 },
1769 .chain_id
= ALC260_FIXUP_GPIO1_TOGGLE
,
1771 [ALC260_FIXUP_HP_B1900
] = {
1772 .type
= HDA_FIXUP_FUNC
,
1773 .v
.func
= alc260_fixup_gpio1_toggle
,
1775 .chain_id
= ALC260_FIXUP_COEF
,
1777 [ALC260_FIXUP_KN1
] = {
1778 .type
= HDA_FIXUP_FUNC
,
1779 .v
.func
= alc260_fixup_kn1
,
1781 [ALC260_FIXUP_FSC_S7020
] = {
1782 .type
= HDA_FIXUP_FUNC
,
1783 .v
.func
= alc260_fixup_fsc_s7020
,
1785 [ALC260_FIXUP_FSC_S7020_JWSE
] = {
1786 .type
= HDA_FIXUP_FUNC
,
1787 .v
.func
= alc260_fixup_fsc_s7020_jwse
,
1789 .chain_id
= ALC260_FIXUP_FSC_S7020
,
1791 [ALC260_FIXUP_VAIO_PINS
] = {
1792 .type
= HDA_FIXUP_PINS
,
1793 .v
.pins
= (const struct hda_pintbl
[]) {
1794 /* Pin configs are missing completely on some VAIOs */
1795 { 0x0f, 0x01211020 },
1796 { 0x10, 0x0001003f },
1797 { 0x11, 0x411111f0 },
1798 { 0x12, 0x01a15930 },
1799 { 0x13, 0x411111f0 },
1800 { 0x14, 0x411111f0 },
1801 { 0x15, 0x411111f0 },
1802 { 0x16, 0x411111f0 },
1803 { 0x17, 0x411111f0 },
1804 { 0x18, 0x411111f0 },
1805 { 0x19, 0x411111f0 },
1811 static const struct snd_pci_quirk alc260_fixup_tbl
[] = {
1812 SND_PCI_QUIRK(0x1025, 0x007b, "Acer C20x", ALC260_FIXUP_GPIO1
),
1813 SND_PCI_QUIRK(0x1025, 0x007f, "Acer Aspire 9500", ALC260_FIXUP_COEF
),
1814 SND_PCI_QUIRK(0x1025, 0x008f, "Acer", ALC260_FIXUP_GPIO1
),
1815 SND_PCI_QUIRK(0x103c, 0x280a, "HP dc5750", ALC260_FIXUP_HP_DC5750
),
1816 SND_PCI_QUIRK(0x103c, 0x30ba, "HP Presario B1900", ALC260_FIXUP_HP_B1900
),
1817 SND_PCI_QUIRK(0x104d, 0x81bb, "Sony VAIO", ALC260_FIXUP_VAIO_PINS
),
1818 SND_PCI_QUIRK(0x104d, 0x81e2, "Sony VAIO TX", ALC260_FIXUP_HP_PIN_0F
),
1819 SND_PCI_QUIRK(0x10cf, 0x1326, "FSC LifeBook S7020", ALC260_FIXUP_FSC_S7020
),
1820 SND_PCI_QUIRK(0x1509, 0x4540, "Favorit 100XS", ALC260_FIXUP_GPIO1
),
1821 SND_PCI_QUIRK(0x152d, 0x0729, "Quanta KN1", ALC260_FIXUP_KN1
),
1822 SND_PCI_QUIRK(0x161f, 0x2057, "Replacer 672V", ALC260_FIXUP_REPLACER
),
1823 SND_PCI_QUIRK(0x1631, 0xc017, "PB V7900", ALC260_FIXUP_COEF
),
1827 static const struct hda_model_fixup alc260_fixup_models
[] = {
1828 {.id
= ALC260_FIXUP_GPIO1
, .name
= "gpio1"},
1829 {.id
= ALC260_FIXUP_COEF
, .name
= "coef"},
1830 {.id
= ALC260_FIXUP_FSC_S7020
, .name
= "fujitsu"},
1831 {.id
= ALC260_FIXUP_FSC_S7020_JWSE
, .name
= "fujitsu-jwse"},
1837 static int patch_alc260(struct hda_codec
*codec
)
1839 struct alc_spec
*spec
;
1842 err
= alc_alloc_spec(codec
, 0x07);
1847 /* as quite a few machines require HP amp for speaker outputs,
1848 * it's easier to enable it unconditionally; even if it's unneeded,
1849 * it's almost harmless.
1851 spec
->gen
.prefer_hp_amp
= 1;
1852 spec
->gen
.beep_nid
= 0x01;
1854 spec
->shutup
= alc_eapd_shutup
;
1856 alc_pre_init(codec
);
1858 snd_hda_pick_fixup(codec
, alc260_fixup_models
, alc260_fixup_tbl
,
1860 snd_hda_apply_fixup(codec
, HDA_FIXUP_ACT_PRE_PROBE
);
1862 /* automatic parse from the BIOS config */
1863 err
= alc260_parse_auto_config(codec
);
1867 if (!spec
->gen
.no_analog
) {
1868 err
= set_beep_amp(spec
, 0x07, 0x05, HDA_INPUT
);
1873 snd_hda_apply_fixup(codec
, HDA_FIXUP_ACT_PROBE
);
1884 * ALC882/883/885/888/889 support
1886 * ALC882 is almost identical with ALC880 but has cleaner and more flexible
1887 * configuration. Each pin widget can choose any input DACs and a mixer.
1888 * Each ADC is connected from a mixer of all inputs. This makes possible
1889 * 6-channel independent captures.
1891 * In addition, an independent DAC for the multi-playback (not used in this
1899 ALC882_FIXUP_ABIT_AW9D_MAX
,
1900 ALC882_FIXUP_LENOVO_Y530
,
1901 ALC882_FIXUP_PB_M5210
,
1902 ALC882_FIXUP_ACER_ASPIRE_7736
,
1903 ALC882_FIXUP_ASUS_W90V
,
1905 ALC889_FIXUP_FRONT_HP_NO_PRESENCE
,
1906 ALC889_FIXUP_VAIO_TT
,
1907 ALC888_FIXUP_EEE1601
,
1911 ALC883_FIXUP_ACER_EAPD
,
1916 ALC882_FIXUP_ASUS_W2JC
,
1917 ALC882_FIXUP_ACER_ASPIRE_4930G
,
1918 ALC882_FIXUP_ACER_ASPIRE_8930G
,
1919 ALC882_FIXUP_ASPIRE_8930G_VERBS
,
1920 ALC885_FIXUP_MACPRO_GPIO
,
1921 ALC889_FIXUP_DAC_ROUTE
,
1922 ALC889_FIXUP_MBP_VREF
,
1923 ALC889_FIXUP_IMAC91_VREF
,
1924 ALC889_FIXUP_MBA11_VREF
,
1925 ALC889_FIXUP_MBA21_VREF
,
1926 ALC889_FIXUP_MP11_VREF
,
1927 ALC889_FIXUP_MP41_VREF
,
1928 ALC882_FIXUP_INV_DMIC
,
1929 ALC882_FIXUP_NO_PRIMARY_HP
,
1930 ALC887_FIXUP_ASUS_BASS
,
1931 ALC887_FIXUP_BASS_CHMAP
,
1932 ALC1220_FIXUP_GB_DUAL_CODECS
,
1933 ALC1220_FIXUP_CLEVO_P950
,
1934 ALC1220_FIXUP_CLEVO_PB51ED
,
1935 ALC1220_FIXUP_CLEVO_PB51ED_PINS
,
1936 ALC887_FIXUP_ASUS_AUDIO
,
1937 ALC887_FIXUP_ASUS_HMIC
,
1940 static void alc889_fixup_coef(struct hda_codec
*codec
,
1941 const struct hda_fixup
*fix
, int action
)
1943 if (action
!= HDA_FIXUP_ACT_INIT
)
1945 alc_update_coef_idx(codec
, 7, 0, 0x2030);
1948 /* set up GPIO at initialization */
1949 static void alc885_fixup_macpro_gpio(struct hda_codec
*codec
,
1950 const struct hda_fixup
*fix
, int action
)
1952 struct alc_spec
*spec
= codec
->spec
;
1954 spec
->gpio_write_delay
= true;
1955 alc_fixup_gpio3(codec
, fix
, action
);
1958 /* Fix the connection of some pins for ALC889:
1959 * At least, Acer Aspire 5935 shows the connections to DAC3/4 don't
1960 * work correctly (bko#42740)
1962 static void alc889_fixup_dac_route(struct hda_codec
*codec
,
1963 const struct hda_fixup
*fix
, int action
)
1965 if (action
== HDA_FIXUP_ACT_PRE_PROBE
) {
1966 /* fake the connections during parsing the tree */
1967 static const hda_nid_t conn1
[] = { 0x0c, 0x0d };
1968 static const hda_nid_t conn2
[] = { 0x0e, 0x0f };
1969 snd_hda_override_conn_list(codec
, 0x14, ARRAY_SIZE(conn1
), conn1
);
1970 snd_hda_override_conn_list(codec
, 0x15, ARRAY_SIZE(conn1
), conn1
);
1971 snd_hda_override_conn_list(codec
, 0x18, ARRAY_SIZE(conn2
), conn2
);
1972 snd_hda_override_conn_list(codec
, 0x1a, ARRAY_SIZE(conn2
), conn2
);
1973 } else if (action
== HDA_FIXUP_ACT_PROBE
) {
1974 /* restore the connections */
1975 static const hda_nid_t conn
[] = { 0x0c, 0x0d, 0x0e, 0x0f, 0x26 };
1976 snd_hda_override_conn_list(codec
, 0x14, ARRAY_SIZE(conn
), conn
);
1977 snd_hda_override_conn_list(codec
, 0x15, ARRAY_SIZE(conn
), conn
);
1978 snd_hda_override_conn_list(codec
, 0x18, ARRAY_SIZE(conn
), conn
);
1979 snd_hda_override_conn_list(codec
, 0x1a, ARRAY_SIZE(conn
), conn
);
1983 /* Set VREF on HP pin */
1984 static void alc889_fixup_mbp_vref(struct hda_codec
*codec
,
1985 const struct hda_fixup
*fix
, int action
)
1987 static const hda_nid_t nids
[] = { 0x14, 0x15, 0x19 };
1988 struct alc_spec
*spec
= codec
->spec
;
1991 if (action
!= HDA_FIXUP_ACT_INIT
)
1993 for (i
= 0; i
< ARRAY_SIZE(nids
); i
++) {
1994 unsigned int val
= snd_hda_codec_get_pincfg(codec
, nids
[i
]);
1995 if (get_defcfg_device(val
) != AC_JACK_HP_OUT
)
1997 val
= snd_hda_codec_get_pin_target(codec
, nids
[i
]);
1998 val
|= AC_PINCTL_VREF_80
;
1999 snd_hda_set_pin_ctl(codec
, nids
[i
], val
);
2000 spec
->gen
.keep_vref_in_automute
= 1;
2005 static void alc889_fixup_mac_pins(struct hda_codec
*codec
,
2006 const hda_nid_t
*nids
, int num_nids
)
2008 struct alc_spec
*spec
= codec
->spec
;
2011 for (i
= 0; i
< num_nids
; i
++) {
2013 val
= snd_hda_codec_get_pin_target(codec
, nids
[i
]);
2014 val
|= AC_PINCTL_VREF_50
;
2015 snd_hda_set_pin_ctl(codec
, nids
[i
], val
);
2017 spec
->gen
.keep_vref_in_automute
= 1;
2020 /* Set VREF on speaker pins on imac91 */
2021 static void alc889_fixup_imac91_vref(struct hda_codec
*codec
,
2022 const struct hda_fixup
*fix
, int action
)
2024 static const hda_nid_t nids
[] = { 0x18, 0x1a };
2026 if (action
== HDA_FIXUP_ACT_INIT
)
2027 alc889_fixup_mac_pins(codec
, nids
, ARRAY_SIZE(nids
));
2030 /* Set VREF on speaker pins on mba11 */
2031 static void alc889_fixup_mba11_vref(struct hda_codec
*codec
,
2032 const struct hda_fixup
*fix
, int action
)
2034 static const hda_nid_t nids
[] = { 0x18 };
2036 if (action
== HDA_FIXUP_ACT_INIT
)
2037 alc889_fixup_mac_pins(codec
, nids
, ARRAY_SIZE(nids
));
2040 /* Set VREF on speaker pins on mba21 */
2041 static void alc889_fixup_mba21_vref(struct hda_codec
*codec
,
2042 const struct hda_fixup
*fix
, int action
)
2044 static const hda_nid_t nids
[] = { 0x18, 0x19 };
2046 if (action
== HDA_FIXUP_ACT_INIT
)
2047 alc889_fixup_mac_pins(codec
, nids
, ARRAY_SIZE(nids
));
2050 /* Don't take HP output as primary
2051 * Strangely, the speaker output doesn't work on Vaio Z and some Vaio
2052 * all-in-one desktop PCs (for example VGC-LN51JGB) through DAC 0x05
2054 static void alc882_fixup_no_primary_hp(struct hda_codec
*codec
,
2055 const struct hda_fixup
*fix
, int action
)
2057 struct alc_spec
*spec
= codec
->spec
;
2058 if (action
== HDA_FIXUP_ACT_PRE_PROBE
) {
2059 spec
->gen
.no_primary_hp
= 1;
2060 spec
->gen
.no_multi_io
= 1;
2064 static void alc_fixup_bass_chmap(struct hda_codec
*codec
,
2065 const struct hda_fixup
*fix
, int action
);
2067 /* For dual-codec configuration, we need to disable some features to avoid
2068 * conflicts of kctls and PCM streams
2070 static void alc_fixup_dual_codecs(struct hda_codec
*codec
,
2071 const struct hda_fixup
*fix
, int action
)
2073 struct alc_spec
*spec
= codec
->spec
;
2075 if (action
!= HDA_FIXUP_ACT_PRE_PROBE
)
2077 /* disable vmaster */
2078 spec
->gen
.suppress_vmaster
= 1;
2079 /* auto-mute and auto-mic switch don't work with multiple codecs */
2080 spec
->gen
.suppress_auto_mute
= 1;
2081 spec
->gen
.suppress_auto_mic
= 1;
2082 /* disable aamix as well */
2083 spec
->gen
.mixer_nid
= 0;
2084 /* add location prefix to avoid conflicts */
2085 codec
->force_pin_prefix
= 1;
2088 static void rename_ctl(struct hda_codec
*codec
, const char *oldname
,
2089 const char *newname
)
2091 struct snd_kcontrol
*kctl
;
2093 kctl
= snd_hda_find_mixer_ctl(codec
, oldname
);
2095 strcpy(kctl
->id
.name
, newname
);
2098 static void alc1220_fixup_gb_dual_codecs(struct hda_codec
*codec
,
2099 const struct hda_fixup
*fix
,
2102 alc_fixup_dual_codecs(codec
, fix
, action
);
2104 case HDA_FIXUP_ACT_PRE_PROBE
:
2105 /* override card longname to provide a unique UCM profile */
2106 strcpy(codec
->card
->longname
, "HDAudio-Gigabyte-ALC1220DualCodecs");
2108 case HDA_FIXUP_ACT_BUILD
:
2109 /* rename Capture controls depending on the codec */
2110 rename_ctl(codec
, "Capture Volume",
2112 "Rear-Panel Capture Volume" :
2113 "Front-Panel Capture Volume");
2114 rename_ctl(codec
, "Capture Switch",
2116 "Rear-Panel Capture Switch" :
2117 "Front-Panel Capture Switch");
2122 static void alc1220_fixup_clevo_p950(struct hda_codec
*codec
,
2123 const struct hda_fixup
*fix
,
2126 static const hda_nid_t conn1
[] = { 0x0c };
2128 if (action
!= HDA_FIXUP_ACT_PRE_PROBE
)
2131 alc_update_coef_idx(codec
, 0x7, 0, 0x3c3);
2132 /* We therefore want to make sure 0x14 (front headphone) and
2133 * 0x1b (speakers) use the stereo DAC 0x02
2135 snd_hda_override_conn_list(codec
, 0x14, ARRAY_SIZE(conn1
), conn1
);
2136 snd_hda_override_conn_list(codec
, 0x1b, ARRAY_SIZE(conn1
), conn1
);
2139 static void alc_fixup_headset_mode_no_hp_mic(struct hda_codec
*codec
,
2140 const struct hda_fixup
*fix
, int action
);
2142 static void alc1220_fixup_clevo_pb51ed(struct hda_codec
*codec
,
2143 const struct hda_fixup
*fix
,
2146 alc1220_fixup_clevo_p950(codec
, fix
, action
);
2147 alc_fixup_headset_mode_no_hp_mic(codec
, fix
, action
);
2150 static void alc887_asus_hp_automute_hook(struct hda_codec
*codec
,
2151 struct hda_jack_callback
*jack
)
2153 struct alc_spec
*spec
= codec
->spec
;
2156 snd_hda_gen_hp_automute(codec
, jack
);
2158 if (spec
->gen
.hp_jack_present
)
2159 vref
= AC_PINCTL_VREF_80
;
2161 vref
= AC_PINCTL_VREF_HIZ
;
2162 snd_hda_set_pin_ctl(codec
, 0x19, PIN_HP
| vref
);
2165 static void alc887_fixup_asus_jack(struct hda_codec
*codec
,
2166 const struct hda_fixup
*fix
, int action
)
2168 struct alc_spec
*spec
= codec
->spec
;
2169 if (action
!= HDA_FIXUP_ACT_PROBE
)
2171 snd_hda_set_pin_ctl_cache(codec
, 0x1b, PIN_HP
);
2172 spec
->gen
.hp_automute_hook
= alc887_asus_hp_automute_hook
;
2175 static const struct hda_fixup alc882_fixups
[] = {
2176 [ALC882_FIXUP_ABIT_AW9D_MAX
] = {
2177 .type
= HDA_FIXUP_PINS
,
2178 .v
.pins
= (const struct hda_pintbl
[]) {
2179 { 0x15, 0x01080104 }, /* side */
2180 { 0x16, 0x01011012 }, /* rear */
2181 { 0x17, 0x01016011 }, /* clfe */
2185 [ALC882_FIXUP_LENOVO_Y530
] = {
2186 .type
= HDA_FIXUP_PINS
,
2187 .v
.pins
= (const struct hda_pintbl
[]) {
2188 { 0x15, 0x99130112 }, /* rear int speakers */
2189 { 0x16, 0x99130111 }, /* subwoofer */
2193 [ALC882_FIXUP_PB_M5210
] = {
2194 .type
= HDA_FIXUP_PINCTLS
,
2195 .v
.pins
= (const struct hda_pintbl
[]) {
2196 { 0x19, PIN_VREF50
},
2200 [ALC882_FIXUP_ACER_ASPIRE_7736
] = {
2201 .type
= HDA_FIXUP_FUNC
,
2202 .v
.func
= alc_fixup_sku_ignore
,
2204 [ALC882_FIXUP_ASUS_W90V
] = {
2205 .type
= HDA_FIXUP_PINS
,
2206 .v
.pins
= (const struct hda_pintbl
[]) {
2207 { 0x16, 0x99130110 }, /* fix sequence for CLFE */
2211 [ALC889_FIXUP_CD
] = {
2212 .type
= HDA_FIXUP_PINS
,
2213 .v
.pins
= (const struct hda_pintbl
[]) {
2214 { 0x1c, 0x993301f0 }, /* CD */
2218 [ALC889_FIXUP_FRONT_HP_NO_PRESENCE
] = {
2219 .type
= HDA_FIXUP_PINS
,
2220 .v
.pins
= (const struct hda_pintbl
[]) {
2221 { 0x1b, 0x02214120 }, /* Front HP jack is flaky, disable jack detect */
2225 .chain_id
= ALC889_FIXUP_CD
,
2227 [ALC889_FIXUP_VAIO_TT
] = {
2228 .type
= HDA_FIXUP_PINS
,
2229 .v
.pins
= (const struct hda_pintbl
[]) {
2230 { 0x17, 0x90170111 }, /* hidden surround speaker */
2234 [ALC888_FIXUP_EEE1601
] = {
2235 .type
= HDA_FIXUP_VERBS
,
2236 .v
.verbs
= (const struct hda_verb
[]) {
2237 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x0b },
2238 { 0x20, AC_VERB_SET_PROC_COEF
, 0x0838 },
2242 [ALC886_FIXUP_EAPD
] = {
2243 .type
= HDA_FIXUP_VERBS
,
2244 .v
.verbs
= (const struct hda_verb
[]) {
2245 /* change to EAPD mode */
2246 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x07 },
2247 { 0x20, AC_VERB_SET_PROC_COEF
, 0x0068 },
2251 [ALC882_FIXUP_EAPD
] = {
2252 .type
= HDA_FIXUP_VERBS
,
2253 .v
.verbs
= (const struct hda_verb
[]) {
2254 /* change to EAPD mode */
2255 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x07 },
2256 { 0x20, AC_VERB_SET_PROC_COEF
, 0x3060 },
2260 [ALC883_FIXUP_EAPD
] = {
2261 .type
= HDA_FIXUP_VERBS
,
2262 .v
.verbs
= (const struct hda_verb
[]) {
2263 /* change to EAPD mode */
2264 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x07 },
2265 { 0x20, AC_VERB_SET_PROC_COEF
, 0x3070 },
2269 [ALC883_FIXUP_ACER_EAPD
] = {
2270 .type
= HDA_FIXUP_VERBS
,
2271 .v
.verbs
= (const struct hda_verb
[]) {
2272 /* eanable EAPD on Acer laptops */
2273 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x07 },
2274 { 0x20, AC_VERB_SET_PROC_COEF
, 0x3050 },
2278 [ALC882_FIXUP_GPIO1
] = {
2279 .type
= HDA_FIXUP_FUNC
,
2280 .v
.func
= alc_fixup_gpio1
,
2282 [ALC882_FIXUP_GPIO2
] = {
2283 .type
= HDA_FIXUP_FUNC
,
2284 .v
.func
= alc_fixup_gpio2
,
2286 [ALC882_FIXUP_GPIO3
] = {
2287 .type
= HDA_FIXUP_FUNC
,
2288 .v
.func
= alc_fixup_gpio3
,
2290 [ALC882_FIXUP_ASUS_W2JC
] = {
2291 .type
= HDA_FIXUP_FUNC
,
2292 .v
.func
= alc_fixup_gpio1
,
2294 .chain_id
= ALC882_FIXUP_EAPD
,
2296 [ALC889_FIXUP_COEF
] = {
2297 .type
= HDA_FIXUP_FUNC
,
2298 .v
.func
= alc889_fixup_coef
,
2300 [ALC882_FIXUP_ACER_ASPIRE_4930G
] = {
2301 .type
= HDA_FIXUP_PINS
,
2302 .v
.pins
= (const struct hda_pintbl
[]) {
2303 { 0x16, 0x99130111 }, /* CLFE speaker */
2304 { 0x17, 0x99130112 }, /* surround speaker */
2308 .chain_id
= ALC882_FIXUP_GPIO1
,
2310 [ALC882_FIXUP_ACER_ASPIRE_8930G
] = {
2311 .type
= HDA_FIXUP_PINS
,
2312 .v
.pins
= (const struct hda_pintbl
[]) {
2313 { 0x16, 0x99130111 }, /* CLFE speaker */
2314 { 0x1b, 0x99130112 }, /* surround speaker */
2318 .chain_id
= ALC882_FIXUP_ASPIRE_8930G_VERBS
,
2320 [ALC882_FIXUP_ASPIRE_8930G_VERBS
] = {
2321 /* additional init verbs for Acer Aspire 8930G */
2322 .type
= HDA_FIXUP_VERBS
,
2323 .v
.verbs
= (const struct hda_verb
[]) {
2324 /* Enable all DACs */
2325 /* DAC DISABLE/MUTE 1? */
2326 /* setting bits 1-5 disables DAC nids 0x02-0x06
2327 * apparently. Init=0x38 */
2328 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x03 },
2329 { 0x20, AC_VERB_SET_PROC_COEF
, 0x0000 },
2330 /* DAC DISABLE/MUTE 2? */
2331 /* some bit here disables the other DACs.
2333 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x08 },
2334 { 0x20, AC_VERB_SET_PROC_COEF
, 0x0000 },
2336 * This laptop has a stereo digital microphone.
2337 * The mics are only 1cm apart which makes the stereo
2338 * useless. However, either the mic or the ALC889
2339 * makes the signal become a difference/sum signal
2340 * instead of standard stereo, which is annoying.
2341 * So instead we flip this bit which makes the
2342 * codec replicate the sum signal to both channels,
2343 * turning it into a normal mono mic.
2345 /* DMIC_CONTROL? Init value = 0x0001 */
2346 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x0b },
2347 { 0x20, AC_VERB_SET_PROC_COEF
, 0x0003 },
2348 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x07 },
2349 { 0x20, AC_VERB_SET_PROC_COEF
, 0x3050 },
2353 .chain_id
= ALC882_FIXUP_GPIO1
,
2355 [ALC885_FIXUP_MACPRO_GPIO
] = {
2356 .type
= HDA_FIXUP_FUNC
,
2357 .v
.func
= alc885_fixup_macpro_gpio
,
2359 [ALC889_FIXUP_DAC_ROUTE
] = {
2360 .type
= HDA_FIXUP_FUNC
,
2361 .v
.func
= alc889_fixup_dac_route
,
2363 [ALC889_FIXUP_MBP_VREF
] = {
2364 .type
= HDA_FIXUP_FUNC
,
2365 .v
.func
= alc889_fixup_mbp_vref
,
2367 .chain_id
= ALC882_FIXUP_GPIO1
,
2369 [ALC889_FIXUP_IMAC91_VREF
] = {
2370 .type
= HDA_FIXUP_FUNC
,
2371 .v
.func
= alc889_fixup_imac91_vref
,
2373 .chain_id
= ALC882_FIXUP_GPIO1
,
2375 [ALC889_FIXUP_MBA11_VREF
] = {
2376 .type
= HDA_FIXUP_FUNC
,
2377 .v
.func
= alc889_fixup_mba11_vref
,
2379 .chain_id
= ALC889_FIXUP_MBP_VREF
,
2381 [ALC889_FIXUP_MBA21_VREF
] = {
2382 .type
= HDA_FIXUP_FUNC
,
2383 .v
.func
= alc889_fixup_mba21_vref
,
2385 .chain_id
= ALC889_FIXUP_MBP_VREF
,
2387 [ALC889_FIXUP_MP11_VREF
] = {
2388 .type
= HDA_FIXUP_FUNC
,
2389 .v
.func
= alc889_fixup_mba11_vref
,
2391 .chain_id
= ALC885_FIXUP_MACPRO_GPIO
,
2393 [ALC889_FIXUP_MP41_VREF
] = {
2394 .type
= HDA_FIXUP_FUNC
,
2395 .v
.func
= alc889_fixup_mbp_vref
,
2397 .chain_id
= ALC885_FIXUP_MACPRO_GPIO
,
2399 [ALC882_FIXUP_INV_DMIC
] = {
2400 .type
= HDA_FIXUP_FUNC
,
2401 .v
.func
= alc_fixup_inv_dmic
,
2403 [ALC882_FIXUP_NO_PRIMARY_HP
] = {
2404 .type
= HDA_FIXUP_FUNC
,
2405 .v
.func
= alc882_fixup_no_primary_hp
,
2407 [ALC887_FIXUP_ASUS_BASS
] = {
2408 .type
= HDA_FIXUP_PINS
,
2409 .v
.pins
= (const struct hda_pintbl
[]) {
2410 {0x16, 0x99130130}, /* bass speaker */
2414 .chain_id
= ALC887_FIXUP_BASS_CHMAP
,
2416 [ALC887_FIXUP_BASS_CHMAP
] = {
2417 .type
= HDA_FIXUP_FUNC
,
2418 .v
.func
= alc_fixup_bass_chmap
,
2420 [ALC1220_FIXUP_GB_DUAL_CODECS
] = {
2421 .type
= HDA_FIXUP_FUNC
,
2422 .v
.func
= alc1220_fixup_gb_dual_codecs
,
2424 [ALC1220_FIXUP_CLEVO_P950
] = {
2425 .type
= HDA_FIXUP_FUNC
,
2426 .v
.func
= alc1220_fixup_clevo_p950
,
2428 [ALC1220_FIXUP_CLEVO_PB51ED
] = {
2429 .type
= HDA_FIXUP_FUNC
,
2430 .v
.func
= alc1220_fixup_clevo_pb51ed
,
2432 [ALC1220_FIXUP_CLEVO_PB51ED_PINS
] = {
2433 .type
= HDA_FIXUP_PINS
,
2434 .v
.pins
= (const struct hda_pintbl
[]) {
2435 { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */
2439 .chain_id
= ALC1220_FIXUP_CLEVO_PB51ED
,
2441 [ALC887_FIXUP_ASUS_AUDIO
] = {
2442 .type
= HDA_FIXUP_PINS
,
2443 .v
.pins
= (const struct hda_pintbl
[]) {
2444 { 0x15, 0x02a14150 }, /* use as headset mic, without its own jack detect */
2445 { 0x19, 0x22219420 },
2449 [ALC887_FIXUP_ASUS_HMIC
] = {
2450 .type
= HDA_FIXUP_FUNC
,
2451 .v
.func
= alc887_fixup_asus_jack
,
2453 .chain_id
= ALC887_FIXUP_ASUS_AUDIO
,
2457 static const struct snd_pci_quirk alc882_fixup_tbl
[] = {
2458 SND_PCI_QUIRK(0x1025, 0x006c, "Acer Aspire 9810", ALC883_FIXUP_ACER_EAPD
),
2459 SND_PCI_QUIRK(0x1025, 0x0090, "Acer Aspire", ALC883_FIXUP_ACER_EAPD
),
2460 SND_PCI_QUIRK(0x1025, 0x0107, "Acer Aspire", ALC883_FIXUP_ACER_EAPD
),
2461 SND_PCI_QUIRK(0x1025, 0x010a, "Acer Ferrari 5000", ALC883_FIXUP_ACER_EAPD
),
2462 SND_PCI_QUIRK(0x1025, 0x0110, "Acer Aspire", ALC883_FIXUP_ACER_EAPD
),
2463 SND_PCI_QUIRK(0x1025, 0x0112, "Acer Aspire 9303", ALC883_FIXUP_ACER_EAPD
),
2464 SND_PCI_QUIRK(0x1025, 0x0121, "Acer Aspire 5920G", ALC883_FIXUP_ACER_EAPD
),
2465 SND_PCI_QUIRK(0x1025, 0x013e, "Acer Aspire 4930G",
2466 ALC882_FIXUP_ACER_ASPIRE_4930G
),
2467 SND_PCI_QUIRK(0x1025, 0x013f, "Acer Aspire 5930G",
2468 ALC882_FIXUP_ACER_ASPIRE_4930G
),
2469 SND_PCI_QUIRK(0x1025, 0x0145, "Acer Aspire 8930G",
2470 ALC882_FIXUP_ACER_ASPIRE_8930G
),
2471 SND_PCI_QUIRK(0x1025, 0x0146, "Acer Aspire 6935G",
2472 ALC882_FIXUP_ACER_ASPIRE_8930G
),
2473 SND_PCI_QUIRK(0x1025, 0x0142, "Acer Aspire 7730G",
2474 ALC882_FIXUP_ACER_ASPIRE_4930G
),
2475 SND_PCI_QUIRK(0x1025, 0x0155, "Packard-Bell M5120", ALC882_FIXUP_PB_M5210
),
2476 SND_PCI_QUIRK(0x1025, 0x015e, "Acer Aspire 6930G",
2477 ALC882_FIXUP_ACER_ASPIRE_4930G
),
2478 SND_PCI_QUIRK(0x1025, 0x0166, "Acer Aspire 6530G",
2479 ALC882_FIXUP_ACER_ASPIRE_4930G
),
2480 SND_PCI_QUIRK(0x1025, 0x021e, "Acer Aspire 5739G",
2481 ALC882_FIXUP_ACER_ASPIRE_4930G
),
2482 SND_PCI_QUIRK(0x1025, 0x0259, "Acer Aspire 5935", ALC889_FIXUP_DAC_ROUTE
),
2483 SND_PCI_QUIRK(0x1025, 0x026b, "Acer Aspire 8940G", ALC882_FIXUP_ACER_ASPIRE_8930G
),
2484 SND_PCI_QUIRK(0x1025, 0x0296, "Acer Aspire 7736z", ALC882_FIXUP_ACER_ASPIRE_7736
),
2485 SND_PCI_QUIRK(0x1043, 0x13c2, "Asus A7M", ALC882_FIXUP_EAPD
),
2486 SND_PCI_QUIRK(0x1043, 0x1873, "ASUS W90V", ALC882_FIXUP_ASUS_W90V
),
2487 SND_PCI_QUIRK(0x1043, 0x1971, "Asus W2JC", ALC882_FIXUP_ASUS_W2JC
),
2488 SND_PCI_QUIRK(0x1043, 0x2390, "Asus D700SA", ALC887_FIXUP_ASUS_HMIC
),
2489 SND_PCI_QUIRK(0x1043, 0x835f, "Asus Eee 1601", ALC888_FIXUP_EEE1601
),
2490 SND_PCI_QUIRK(0x1043, 0x84bc, "ASUS ET2700", ALC887_FIXUP_ASUS_BASS
),
2491 SND_PCI_QUIRK(0x1043, 0x8691, "ASUS ROG Ranger VIII", ALC882_FIXUP_GPIO3
),
2492 SND_PCI_QUIRK(0x104d, 0x9043, "Sony Vaio VGC-LN51JGB", ALC882_FIXUP_NO_PRIMARY_HP
),
2493 SND_PCI_QUIRK(0x104d, 0x9044, "Sony VAIO AiO", ALC882_FIXUP_NO_PRIMARY_HP
),
2494 SND_PCI_QUIRK(0x104d, 0x9047, "Sony Vaio TT", ALC889_FIXUP_VAIO_TT
),
2495 SND_PCI_QUIRK(0x104d, 0x905a, "Sony Vaio Z", ALC882_FIXUP_NO_PRIMARY_HP
),
2496 SND_PCI_QUIRK(0x104d, 0x9060, "Sony Vaio VPCL14M1R", ALC882_FIXUP_NO_PRIMARY_HP
),
2498 /* All Apple entries are in codec SSIDs */
2499 SND_PCI_QUIRK(0x106b, 0x00a0, "MacBookPro 3,1", ALC889_FIXUP_MBP_VREF
),
2500 SND_PCI_QUIRK(0x106b, 0x00a1, "Macbook", ALC889_FIXUP_MBP_VREF
),
2501 SND_PCI_QUIRK(0x106b, 0x00a4, "MacbookPro 4,1", ALC889_FIXUP_MBP_VREF
),
2502 SND_PCI_QUIRK(0x106b, 0x0c00, "Mac Pro", ALC889_FIXUP_MP11_VREF
),
2503 SND_PCI_QUIRK(0x106b, 0x1000, "iMac 24", ALC885_FIXUP_MACPRO_GPIO
),
2504 SND_PCI_QUIRK(0x106b, 0x2800, "AppleTV", ALC885_FIXUP_MACPRO_GPIO
),
2505 SND_PCI_QUIRK(0x106b, 0x2c00, "MacbookPro rev3", ALC889_FIXUP_MBP_VREF
),
2506 SND_PCI_QUIRK(0x106b, 0x3000, "iMac", ALC889_FIXUP_MBP_VREF
),
2507 SND_PCI_QUIRK(0x106b, 0x3200, "iMac 7,1 Aluminum", ALC882_FIXUP_EAPD
),
2508 SND_PCI_QUIRK(0x106b, 0x3400, "MacBookAir 1,1", ALC889_FIXUP_MBA11_VREF
),
2509 SND_PCI_QUIRK(0x106b, 0x3500, "MacBookAir 2,1", ALC889_FIXUP_MBA21_VREF
),
2510 SND_PCI_QUIRK(0x106b, 0x3600, "Macbook 3,1", ALC889_FIXUP_MBP_VREF
),
2511 SND_PCI_QUIRK(0x106b, 0x3800, "MacbookPro 4,1", ALC889_FIXUP_MBP_VREF
),
2512 SND_PCI_QUIRK(0x106b, 0x3e00, "iMac 24 Aluminum", ALC885_FIXUP_MACPRO_GPIO
),
2513 SND_PCI_QUIRK(0x106b, 0x3f00, "Macbook 5,1", ALC889_FIXUP_IMAC91_VREF
),
2514 SND_PCI_QUIRK(0x106b, 0x4000, "MacbookPro 5,1", ALC889_FIXUP_IMAC91_VREF
),
2515 SND_PCI_QUIRK(0x106b, 0x4100, "Macmini 3,1", ALC889_FIXUP_IMAC91_VREF
),
2516 SND_PCI_QUIRK(0x106b, 0x4200, "Mac Pro 4,1/5,1", ALC889_FIXUP_MP41_VREF
),
2517 SND_PCI_QUIRK(0x106b, 0x4300, "iMac 9,1", ALC889_FIXUP_IMAC91_VREF
),
2518 SND_PCI_QUIRK(0x106b, 0x4600, "MacbookPro 5,2", ALC889_FIXUP_IMAC91_VREF
),
2519 SND_PCI_QUIRK(0x106b, 0x4900, "iMac 9,1 Aluminum", ALC889_FIXUP_IMAC91_VREF
),
2520 SND_PCI_QUIRK(0x106b, 0x4a00, "Macbook 5,2", ALC889_FIXUP_MBA11_VREF
),
2522 SND_PCI_QUIRK(0x1071, 0x8258, "Evesham Voyaeger", ALC882_FIXUP_EAPD
),
2523 SND_PCI_QUIRK(0x13fe, 0x1009, "Advantech MIT-W101", ALC886_FIXUP_EAPD
),
2524 SND_PCI_QUIRK(0x1458, 0xa002, "Gigabyte EP45-DS3/Z87X-UD3H", ALC889_FIXUP_FRONT_HP_NO_PRESENCE
),
2525 SND_PCI_QUIRK(0x1458, 0xa0b8, "Gigabyte AZ370-Gaming", ALC1220_FIXUP_GB_DUAL_CODECS
),
2526 SND_PCI_QUIRK(0x1458, 0xa0cd, "Gigabyte X570 Aorus Master", ALC1220_FIXUP_CLEVO_P950
),
2527 SND_PCI_QUIRK(0x1458, 0xa0ce, "Gigabyte X570 Aorus Xtreme", ALC1220_FIXUP_CLEVO_P950
),
2528 SND_PCI_QUIRK(0x1462, 0x11f7, "MSI-GE63", ALC1220_FIXUP_CLEVO_P950
),
2529 SND_PCI_QUIRK(0x1462, 0x1228, "MSI-GP63", ALC1220_FIXUP_CLEVO_P950
),
2530 SND_PCI_QUIRK(0x1462, 0x1229, "MSI-GP73", ALC1220_FIXUP_CLEVO_P950
),
2531 SND_PCI_QUIRK(0x1462, 0x1275, "MSI-GL63", ALC1220_FIXUP_CLEVO_P950
),
2532 SND_PCI_QUIRK(0x1462, 0x1276, "MSI-GL73", ALC1220_FIXUP_CLEVO_P950
),
2533 SND_PCI_QUIRK(0x1462, 0x1293, "MSI-GP65", ALC1220_FIXUP_CLEVO_P950
),
2534 SND_PCI_QUIRK(0x1462, 0x7350, "MSI-7350", ALC889_FIXUP_CD
),
2535 SND_PCI_QUIRK(0x1462, 0xcc34, "MSI Godlike X570", ALC1220_FIXUP_GB_DUAL_CODECS
),
2536 SND_PCI_QUIRK(0x1462, 0xda57, "MSI Z270-Gaming", ALC1220_FIXUP_GB_DUAL_CODECS
),
2537 SND_PCI_QUIRK_VENDOR(0x1462, "MSI", ALC882_FIXUP_GPIO3
),
2538 SND_PCI_QUIRK(0x147b, 0x107a, "Abit AW9D-MAX", ALC882_FIXUP_ABIT_AW9D_MAX
),
2539 SND_PCI_QUIRK(0x1558, 0x50d3, "Clevo PC50[ER][CDF]", ALC1220_FIXUP_CLEVO_PB51ED_PINS
),
2540 SND_PCI_QUIRK(0x1558, 0x65d1, "Clevo PB51[ER][CDF]", ALC1220_FIXUP_CLEVO_PB51ED_PINS
),
2541 SND_PCI_QUIRK(0x1558, 0x65d2, "Clevo PB51R[CDF]", ALC1220_FIXUP_CLEVO_PB51ED_PINS
),
2542 SND_PCI_QUIRK(0x1558, 0x65e1, "Clevo PB51[ED][DF]", ALC1220_FIXUP_CLEVO_PB51ED_PINS
),
2543 SND_PCI_QUIRK(0x1558, 0x65e5, "Clevo PC50D[PRS](?:-D|-G)?", ALC1220_FIXUP_CLEVO_PB51ED_PINS
),
2544 SND_PCI_QUIRK(0x1558, 0x67d1, "Clevo PB71[ER][CDF]", ALC1220_FIXUP_CLEVO_PB51ED_PINS
),
2545 SND_PCI_QUIRK(0x1558, 0x67e1, "Clevo PB71[DE][CDF]", ALC1220_FIXUP_CLEVO_PB51ED_PINS
),
2546 SND_PCI_QUIRK(0x1558, 0x67e5, "Clevo PC70D[PRS](?:-D|-G)?", ALC1220_FIXUP_CLEVO_PB51ED_PINS
),
2547 SND_PCI_QUIRK(0x1558, 0x70d1, "Clevo PC70[ER][CDF]", ALC1220_FIXUP_CLEVO_PB51ED_PINS
),
2548 SND_PCI_QUIRK(0x1558, 0x7714, "Clevo X170", ALC1220_FIXUP_CLEVO_PB51ED_PINS
),
2549 SND_PCI_QUIRK(0x1558, 0x9501, "Clevo P950HR", ALC1220_FIXUP_CLEVO_P950
),
2550 SND_PCI_QUIRK(0x1558, 0x9506, "Clevo P955HQ", ALC1220_FIXUP_CLEVO_P950
),
2551 SND_PCI_QUIRK(0x1558, 0x950a, "Clevo P955H[PR]", ALC1220_FIXUP_CLEVO_P950
),
2552 SND_PCI_QUIRK(0x1558, 0x95e1, "Clevo P95xER", ALC1220_FIXUP_CLEVO_P950
),
2553 SND_PCI_QUIRK(0x1558, 0x95e2, "Clevo P950ER", ALC1220_FIXUP_CLEVO_P950
),
2554 SND_PCI_QUIRK(0x1558, 0x95e3, "Clevo P955[ER]T", ALC1220_FIXUP_CLEVO_P950
),
2555 SND_PCI_QUIRK(0x1558, 0x95e4, "Clevo P955ER", ALC1220_FIXUP_CLEVO_P950
),
2556 SND_PCI_QUIRK(0x1558, 0x95e5, "Clevo P955EE6", ALC1220_FIXUP_CLEVO_P950
),
2557 SND_PCI_QUIRK(0x1558, 0x95e6, "Clevo P950R[CDF]", ALC1220_FIXUP_CLEVO_P950
),
2558 SND_PCI_QUIRK(0x1558, 0x96e1, "Clevo P960[ER][CDFN]-K", ALC1220_FIXUP_CLEVO_P950
),
2559 SND_PCI_QUIRK(0x1558, 0x97e1, "Clevo P970[ER][CDFN]", ALC1220_FIXUP_CLEVO_P950
),
2560 SND_PCI_QUIRK(0x1558, 0x97e2, "Clevo P970RC-M", ALC1220_FIXUP_CLEVO_P950
),
2561 SND_PCI_QUIRK_VENDOR(0x1558, "Clevo laptop", ALC882_FIXUP_EAPD
),
2562 SND_PCI_QUIRK(0x161f, 0x2054, "Medion laptop", ALC883_FIXUP_EAPD
),
2563 SND_PCI_QUIRK(0x17aa, 0x3a0d, "Lenovo Y530", ALC882_FIXUP_LENOVO_Y530
),
2564 SND_PCI_QUIRK(0x8086, 0x0022, "DX58SO", ALC889_FIXUP_COEF
),
2568 static const struct hda_model_fixup alc882_fixup_models
[] = {
2569 {.id
= ALC882_FIXUP_ABIT_AW9D_MAX
, .name
= "abit-aw9d"},
2570 {.id
= ALC882_FIXUP_LENOVO_Y530
, .name
= "lenovo-y530"},
2571 {.id
= ALC882_FIXUP_ACER_ASPIRE_7736
, .name
= "acer-aspire-7736"},
2572 {.id
= ALC882_FIXUP_ASUS_W90V
, .name
= "asus-w90v"},
2573 {.id
= ALC889_FIXUP_CD
, .name
= "cd"},
2574 {.id
= ALC889_FIXUP_FRONT_HP_NO_PRESENCE
, .name
= "no-front-hp"},
2575 {.id
= ALC889_FIXUP_VAIO_TT
, .name
= "vaio-tt"},
2576 {.id
= ALC888_FIXUP_EEE1601
, .name
= "eee1601"},
2577 {.id
= ALC882_FIXUP_EAPD
, .name
= "alc882-eapd"},
2578 {.id
= ALC883_FIXUP_EAPD
, .name
= "alc883-eapd"},
2579 {.id
= ALC882_FIXUP_GPIO1
, .name
= "gpio1"},
2580 {.id
= ALC882_FIXUP_GPIO2
, .name
= "gpio2"},
2581 {.id
= ALC882_FIXUP_GPIO3
, .name
= "gpio3"},
2582 {.id
= ALC889_FIXUP_COEF
, .name
= "alc889-coef"},
2583 {.id
= ALC882_FIXUP_ASUS_W2JC
, .name
= "asus-w2jc"},
2584 {.id
= ALC882_FIXUP_ACER_ASPIRE_4930G
, .name
= "acer-aspire-4930g"},
2585 {.id
= ALC882_FIXUP_ACER_ASPIRE_8930G
, .name
= "acer-aspire-8930g"},
2586 {.id
= ALC883_FIXUP_ACER_EAPD
, .name
= "acer-aspire"},
2587 {.id
= ALC885_FIXUP_MACPRO_GPIO
, .name
= "macpro-gpio"},
2588 {.id
= ALC889_FIXUP_DAC_ROUTE
, .name
= "dac-route"},
2589 {.id
= ALC889_FIXUP_MBP_VREF
, .name
= "mbp-vref"},
2590 {.id
= ALC889_FIXUP_IMAC91_VREF
, .name
= "imac91-vref"},
2591 {.id
= ALC889_FIXUP_MBA11_VREF
, .name
= "mba11-vref"},
2592 {.id
= ALC889_FIXUP_MBA21_VREF
, .name
= "mba21-vref"},
2593 {.id
= ALC889_FIXUP_MP11_VREF
, .name
= "mp11-vref"},
2594 {.id
= ALC889_FIXUP_MP41_VREF
, .name
= "mp41-vref"},
2595 {.id
= ALC882_FIXUP_INV_DMIC
, .name
= "inv-dmic"},
2596 {.id
= ALC882_FIXUP_NO_PRIMARY_HP
, .name
= "no-primary-hp"},
2597 {.id
= ALC887_FIXUP_ASUS_BASS
, .name
= "asus-bass"},
2598 {.id
= ALC1220_FIXUP_GB_DUAL_CODECS
, .name
= "dual-codecs"},
2599 {.id
= ALC1220_FIXUP_CLEVO_P950
, .name
= "clevo-p950"},
2604 * BIOS auto configuration
2606 /* almost identical with ALC880 parser... */
2607 static int alc882_parse_auto_config(struct hda_codec
*codec
)
2609 static const hda_nid_t alc882_ignore
[] = { 0x1d, 0 };
2610 static const hda_nid_t alc882_ssids
[] = { 0x15, 0x1b, 0x14, 0 };
2611 return alc_parse_auto_config(codec
, alc882_ignore
, alc882_ssids
);
2616 static int patch_alc882(struct hda_codec
*codec
)
2618 struct alc_spec
*spec
;
2621 err
= alc_alloc_spec(codec
, 0x0b);
2627 switch (codec
->core
.vendor_id
) {
2635 /* ALC883 and variants */
2636 alc_fix_pll_init(codec
, 0x20, 0x0a, 10);
2640 alc_pre_init(codec
);
2642 snd_hda_pick_fixup(codec
, alc882_fixup_models
, alc882_fixup_tbl
,
2644 snd_hda_apply_fixup(codec
, HDA_FIXUP_ACT_PRE_PROBE
);
2646 alc_auto_parse_customize_define(codec
);
2648 if (has_cdefine_beep(codec
))
2649 spec
->gen
.beep_nid
= 0x01;
2651 /* automatic parse from the BIOS config */
2652 err
= alc882_parse_auto_config(codec
);
2656 if (!spec
->gen
.no_analog
&& spec
->gen
.beep_nid
) {
2657 err
= set_beep_amp(spec
, 0x0b, 0x05, HDA_INPUT
);
2662 snd_hda_apply_fixup(codec
, HDA_FIXUP_ACT_PROBE
);
2675 static int alc262_parse_auto_config(struct hda_codec
*codec
)
2677 static const hda_nid_t alc262_ignore
[] = { 0x1d, 0 };
2678 static const hda_nid_t alc262_ssids
[] = { 0x15, 0x1b, 0x14, 0 };
2679 return alc_parse_auto_config(codec
, alc262_ignore
, alc262_ssids
);
2686 ALC262_FIXUP_FSC_H270
,
2687 ALC262_FIXUP_FSC_S7110
,
2688 ALC262_FIXUP_HP_Z200
,
2690 ALC262_FIXUP_LENOVO_3000
,
2692 ALC262_FIXUP_BENQ_T31
,
2693 ALC262_FIXUP_INV_DMIC
,
2694 ALC262_FIXUP_INTEL_BAYLEYBAY
,
2697 static const struct hda_fixup alc262_fixups
[] = {
2698 [ALC262_FIXUP_FSC_H270
] = {
2699 .type
= HDA_FIXUP_PINS
,
2700 .v
.pins
= (const struct hda_pintbl
[]) {
2701 { 0x14, 0x99130110 }, /* speaker */
2702 { 0x15, 0x0221142f }, /* front HP */
2703 { 0x1b, 0x0121141f }, /* rear HP */
2707 [ALC262_FIXUP_FSC_S7110
] = {
2708 .type
= HDA_FIXUP_PINS
,
2709 .v
.pins
= (const struct hda_pintbl
[]) {
2710 { 0x15, 0x90170110 }, /* speaker */
2714 .chain_id
= ALC262_FIXUP_BENQ
,
2716 [ALC262_FIXUP_HP_Z200
] = {
2717 .type
= HDA_FIXUP_PINS
,
2718 .v
.pins
= (const struct hda_pintbl
[]) {
2719 { 0x16, 0x99130120 }, /* internal speaker */
2723 [ALC262_FIXUP_TYAN
] = {
2724 .type
= HDA_FIXUP_PINS
,
2725 .v
.pins
= (const struct hda_pintbl
[]) {
2726 { 0x14, 0x1993e1f0 }, /* int AUX */
2730 [ALC262_FIXUP_LENOVO_3000
] = {
2731 .type
= HDA_FIXUP_PINCTLS
,
2732 .v
.pins
= (const struct hda_pintbl
[]) {
2733 { 0x19, PIN_VREF50
},
2737 .chain_id
= ALC262_FIXUP_BENQ
,
2739 [ALC262_FIXUP_BENQ
] = {
2740 .type
= HDA_FIXUP_VERBS
,
2741 .v
.verbs
= (const struct hda_verb
[]) {
2742 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x07 },
2743 { 0x20, AC_VERB_SET_PROC_COEF
, 0x3070 },
2747 [ALC262_FIXUP_BENQ_T31
] = {
2748 .type
= HDA_FIXUP_VERBS
,
2749 .v
.verbs
= (const struct hda_verb
[]) {
2750 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x07 },
2751 { 0x20, AC_VERB_SET_PROC_COEF
, 0x3050 },
2755 [ALC262_FIXUP_INV_DMIC
] = {
2756 .type
= HDA_FIXUP_FUNC
,
2757 .v
.func
= alc_fixup_inv_dmic
,
2759 [ALC262_FIXUP_INTEL_BAYLEYBAY
] = {
2760 .type
= HDA_FIXUP_FUNC
,
2761 .v
.func
= alc_fixup_no_depop_delay
,
2765 static const struct snd_pci_quirk alc262_fixup_tbl
[] = {
2766 SND_PCI_QUIRK(0x103c, 0x170b, "HP Z200", ALC262_FIXUP_HP_Z200
),
2767 SND_PCI_QUIRK(0x10cf, 0x1397, "Fujitsu Lifebook S7110", ALC262_FIXUP_FSC_S7110
),
2768 SND_PCI_QUIRK(0x10cf, 0x142d, "Fujitsu Lifebook E8410", ALC262_FIXUP_BENQ
),
2769 SND_PCI_QUIRK(0x10f1, 0x2915, "Tyan Thunder n6650W", ALC262_FIXUP_TYAN
),
2770 SND_PCI_QUIRK(0x1734, 0x1141, "FSC ESPRIMO U9210", ALC262_FIXUP_FSC_H270
),
2771 SND_PCI_QUIRK(0x1734, 0x1147, "FSC Celsius H270", ALC262_FIXUP_FSC_H270
),
2772 SND_PCI_QUIRK(0x17aa, 0x384e, "Lenovo 3000", ALC262_FIXUP_LENOVO_3000
),
2773 SND_PCI_QUIRK(0x17ff, 0x0560, "Benq ED8", ALC262_FIXUP_BENQ
),
2774 SND_PCI_QUIRK(0x17ff, 0x058d, "Benq T31-16", ALC262_FIXUP_BENQ_T31
),
2775 SND_PCI_QUIRK(0x8086, 0x7270, "BayleyBay", ALC262_FIXUP_INTEL_BAYLEYBAY
),
2779 static const struct hda_model_fixup alc262_fixup_models
[] = {
2780 {.id
= ALC262_FIXUP_INV_DMIC
, .name
= "inv-dmic"},
2781 {.id
= ALC262_FIXUP_FSC_H270
, .name
= "fsc-h270"},
2782 {.id
= ALC262_FIXUP_FSC_S7110
, .name
= "fsc-s7110"},
2783 {.id
= ALC262_FIXUP_HP_Z200
, .name
= "hp-z200"},
2784 {.id
= ALC262_FIXUP_TYAN
, .name
= "tyan"},
2785 {.id
= ALC262_FIXUP_LENOVO_3000
, .name
= "lenovo-3000"},
2786 {.id
= ALC262_FIXUP_BENQ
, .name
= "benq"},
2787 {.id
= ALC262_FIXUP_BENQ_T31
, .name
= "benq-t31"},
2788 {.id
= ALC262_FIXUP_INTEL_BAYLEYBAY
, .name
= "bayleybay"},
2794 static int patch_alc262(struct hda_codec
*codec
)
2796 struct alc_spec
*spec
;
2799 err
= alc_alloc_spec(codec
, 0x0b);
2804 spec
->gen
.shared_mic_vref_pin
= 0x18;
2806 spec
->shutup
= alc_eapd_shutup
;
2809 /* pshou 07/11/05 set a zero PCM sample to DAC when FIFO is
2812 alc_update_coefex_idx(codec
, 0x1a, 7, 0, 0x80);
2814 alc_fix_pll_init(codec
, 0x20, 0x0a, 10);
2816 alc_pre_init(codec
);
2818 snd_hda_pick_fixup(codec
, alc262_fixup_models
, alc262_fixup_tbl
,
2820 snd_hda_apply_fixup(codec
, HDA_FIXUP_ACT_PRE_PROBE
);
2822 alc_auto_parse_customize_define(codec
);
2824 if (has_cdefine_beep(codec
))
2825 spec
->gen
.beep_nid
= 0x01;
2827 /* automatic parse from the BIOS config */
2828 err
= alc262_parse_auto_config(codec
);
2832 if (!spec
->gen
.no_analog
&& spec
->gen
.beep_nid
) {
2833 err
= set_beep_amp(spec
, 0x0b, 0x05, HDA_INPUT
);
2838 snd_hda_apply_fixup(codec
, HDA_FIXUP_ACT_PROBE
);
2850 /* bind Beep switches of both NID 0x0f and 0x10 */
2851 static int alc268_beep_switch_put(struct snd_kcontrol
*kcontrol
,
2852 struct snd_ctl_elem_value
*ucontrol
)
2854 struct hda_codec
*codec
= snd_kcontrol_chip(kcontrol
);
2858 mutex_lock(&codec
->control_mutex
);
2859 pval
= kcontrol
->private_value
;
2860 kcontrol
->private_value
= (pval
& ~0xff) | 0x0f;
2861 err
= snd_hda_mixer_amp_switch_put(kcontrol
, ucontrol
);
2863 kcontrol
->private_value
= (pval
& ~0xff) | 0x10;
2864 err
= snd_hda_mixer_amp_switch_put(kcontrol
, ucontrol
);
2866 kcontrol
->private_value
= pval
;
2867 mutex_unlock(&codec
->control_mutex
);
2871 static const struct snd_kcontrol_new alc268_beep_mixer
[] = {
2872 HDA_CODEC_VOLUME("Beep Playback Volume", 0x1d, 0x0, HDA_INPUT
),
2874 .iface
= SNDRV_CTL_ELEM_IFACE_MIXER
,
2875 .name
= "Beep Playback Switch",
2876 .subdevice
= HDA_SUBDEV_AMP_FLAG
,
2877 .info
= snd_hda_mixer_amp_switch_info
,
2878 .get
= snd_hda_mixer_amp_switch_get
,
2879 .put
= alc268_beep_switch_put
,
2880 .private_value
= HDA_COMPOSE_AMP_VAL(0x0f, 3, 1, HDA_INPUT
)
2884 /* set PCBEEP vol = 0, mute connections */
2885 static const struct hda_verb alc268_beep_init_verbs
[] = {
2886 {0x1d, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_IN_UNMUTE(0)},
2887 {0x0f, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_IN_MUTE(1)},
2888 {0x10, AC_VERB_SET_AMP_GAIN_MUTE
, AMP_IN_MUTE(1)},
2893 ALC268_FIXUP_INV_DMIC
,
2894 ALC268_FIXUP_HP_EAPD
,
2898 static const struct hda_fixup alc268_fixups
[] = {
2899 [ALC268_FIXUP_INV_DMIC
] = {
2900 .type
= HDA_FIXUP_FUNC
,
2901 .v
.func
= alc_fixup_inv_dmic
,
2903 [ALC268_FIXUP_HP_EAPD
] = {
2904 .type
= HDA_FIXUP_VERBS
,
2905 .v
.verbs
= (const struct hda_verb
[]) {
2906 {0x15, AC_VERB_SET_EAPD_BTLENABLE
, 0},
2910 [ALC268_FIXUP_SPDIF
] = {
2911 .type
= HDA_FIXUP_PINS
,
2912 .v
.pins
= (const struct hda_pintbl
[]) {
2913 { 0x1e, 0x014b1180 }, /* enable SPDIF out */
2919 static const struct hda_model_fixup alc268_fixup_models
[] = {
2920 {.id
= ALC268_FIXUP_INV_DMIC
, .name
= "inv-dmic"},
2921 {.id
= ALC268_FIXUP_HP_EAPD
, .name
= "hp-eapd"},
2922 {.id
= ALC268_FIXUP_SPDIF
, .name
= "spdif"},
2926 static const struct snd_pci_quirk alc268_fixup_tbl
[] = {
2927 SND_PCI_QUIRK(0x1025, 0x0139, "Acer TravelMate 6293", ALC268_FIXUP_SPDIF
),
2928 SND_PCI_QUIRK(0x1025, 0x015b, "Acer AOA 150 (ZG5)", ALC268_FIXUP_INV_DMIC
),
2929 /* below is codec SSID since multiple Toshiba laptops have the
2930 * same PCI SSID 1179:ff00
2932 SND_PCI_QUIRK(0x1179, 0xff06, "Toshiba P200", ALC268_FIXUP_HP_EAPD
),
2937 * BIOS auto configuration
2939 static int alc268_parse_auto_config(struct hda_codec
*codec
)
2941 static const hda_nid_t alc268_ssids
[] = { 0x15, 0x1b, 0x14, 0 };
2942 return alc_parse_auto_config(codec
, NULL
, alc268_ssids
);
2947 static int patch_alc268(struct hda_codec
*codec
)
2949 struct alc_spec
*spec
;
2952 /* ALC268 has no aa-loopback mixer */
2953 err
= alc_alloc_spec(codec
, 0);
2958 if (has_cdefine_beep(codec
))
2959 spec
->gen
.beep_nid
= 0x01;
2961 spec
->shutup
= alc_eapd_shutup
;
2963 alc_pre_init(codec
);
2965 snd_hda_pick_fixup(codec
, alc268_fixup_models
, alc268_fixup_tbl
, alc268_fixups
);
2966 snd_hda_apply_fixup(codec
, HDA_FIXUP_ACT_PRE_PROBE
);
2968 /* automatic parse from the BIOS config */
2969 err
= alc268_parse_auto_config(codec
);
2973 if (err
> 0 && !spec
->gen
.no_analog
&&
2974 spec
->gen
.autocfg
.speaker_pins
[0] != 0x1d) {
2975 for (i
= 0; i
< ARRAY_SIZE(alc268_beep_mixer
); i
++) {
2976 if (!snd_hda_gen_add_kctl(&spec
->gen
, NULL
,
2977 &alc268_beep_mixer
[i
])) {
2982 snd_hda_add_verbs(codec
, alc268_beep_init_verbs
);
2983 if (!query_amp_caps(codec
, 0x1d, HDA_INPUT
))
2984 /* override the amp caps for beep generator */
2985 snd_hda_override_amp_caps(codec
, 0x1d, HDA_INPUT
,
2986 (0x0c << AC_AMPCAP_OFFSET_SHIFT
) |
2987 (0x0c << AC_AMPCAP_NUM_STEPS_SHIFT
) |
2988 (0x07 << AC_AMPCAP_STEP_SIZE_SHIFT
) |
2989 (0 << AC_AMPCAP_MUTE_SHIFT
));
2992 snd_hda_apply_fixup(codec
, HDA_FIXUP_ACT_PROBE
);
3005 static const struct hda_pcm_stream alc269_44k_pcm_analog_playback
= {
3006 .rates
= SNDRV_PCM_RATE_44100
, /* fixed rate */
3009 static const struct hda_pcm_stream alc269_44k_pcm_analog_capture
= {
3010 .rates
= SNDRV_PCM_RATE_44100
, /* fixed rate */
3013 /* different alc269-variants */
3015 ALC269_TYPE_ALC269VA
,
3016 ALC269_TYPE_ALC269VB
,
3017 ALC269_TYPE_ALC269VC
,
3018 ALC269_TYPE_ALC269VD
,
3038 * BIOS auto configuration
3040 static int alc269_parse_auto_config(struct hda_codec
*codec
)
3042 static const hda_nid_t alc269_ignore
[] = { 0x1d, 0 };
3043 static const hda_nid_t alc269_ssids
[] = { 0, 0x1b, 0x14, 0x21 };
3044 static const hda_nid_t alc269va_ssids
[] = { 0x15, 0x1b, 0x14, 0 };
3045 struct alc_spec
*spec
= codec
->spec
;
3046 const hda_nid_t
*ssids
;
3048 switch (spec
->codec_variant
) {
3049 case ALC269_TYPE_ALC269VA
:
3050 case ALC269_TYPE_ALC269VC
:
3051 case ALC269_TYPE_ALC280
:
3052 case ALC269_TYPE_ALC284
:
3053 case ALC269_TYPE_ALC293
:
3054 ssids
= alc269va_ssids
;
3056 case ALC269_TYPE_ALC269VB
:
3057 case ALC269_TYPE_ALC269VD
:
3058 case ALC269_TYPE_ALC282
:
3059 case ALC269_TYPE_ALC283
:
3060 case ALC269_TYPE_ALC286
:
3061 case ALC269_TYPE_ALC298
:
3062 case ALC269_TYPE_ALC255
:
3063 case ALC269_TYPE_ALC256
:
3064 case ALC269_TYPE_ALC257
:
3065 case ALC269_TYPE_ALC215
:
3066 case ALC269_TYPE_ALC225
:
3067 case ALC269_TYPE_ALC294
:
3068 case ALC269_TYPE_ALC300
:
3069 case ALC269_TYPE_ALC623
:
3070 case ALC269_TYPE_ALC700
:
3071 ssids
= alc269_ssids
;
3074 ssids
= alc269_ssids
;
3078 return alc_parse_auto_config(codec
, alc269_ignore
, ssids
);
3081 static const struct hda_jack_keymap alc_headset_btn_keymap
[] = {
3082 { SND_JACK_BTN_0
, KEY_PLAYPAUSE
},
3083 { SND_JACK_BTN_1
, KEY_VOICECOMMAND
},
3084 { SND_JACK_BTN_2
, KEY_VOLUMEUP
},
3085 { SND_JACK_BTN_3
, KEY_VOLUMEDOWN
},
3089 static void alc_headset_btn_callback(struct hda_codec
*codec
,
3090 struct hda_jack_callback
*jack
)
3094 if (jack
->unsol_res
& (7 << 13))
3095 report
|= SND_JACK_BTN_0
;
3097 if (jack
->unsol_res
& (1 << 16 | 3 << 8))
3098 report
|= SND_JACK_BTN_1
;
3101 if (jack
->unsol_res
& (7 << 23))
3102 report
|= SND_JACK_BTN_2
;
3104 /* Volume down key */
3105 if (jack
->unsol_res
& (7 << 10))
3106 report
|= SND_JACK_BTN_3
;
3108 jack
->jack
->button_state
= report
;
3111 static void alc_disable_headset_jack_key(struct hda_codec
*codec
)
3113 struct alc_spec
*spec
= codec
->spec
;
3115 if (!spec
->has_hs_key
)
3118 switch (codec
->core
.vendor_id
) {
3126 alc_write_coef_idx(codec
, 0x48, 0x0);
3127 alc_update_coef_idx(codec
, 0x49, 0x0045, 0x0);
3128 alc_update_coef_idx(codec
, 0x44, 0x0045 << 8, 0x0);
3132 alc_write_coef_idx(codec
, 0x48, 0x0);
3133 alc_update_coef_idx(codec
, 0x49, 0x0045, 0x0);
3138 static void alc_enable_headset_jack_key(struct hda_codec
*codec
)
3140 struct alc_spec
*spec
= codec
->spec
;
3142 if (!spec
->has_hs_key
)
3145 switch (codec
->core
.vendor_id
) {
3153 alc_write_coef_idx(codec
, 0x48, 0xd011);
3154 alc_update_coef_idx(codec
, 0x49, 0x007f, 0x0045);
3155 alc_update_coef_idx(codec
, 0x44, 0x007f << 8, 0x0045 << 8);
3159 alc_write_coef_idx(codec
, 0x48, 0xd011);
3160 alc_update_coef_idx(codec
, 0x49, 0x007f, 0x0045);
3165 static void alc_fixup_headset_jack(struct hda_codec
*codec
,
3166 const struct hda_fixup
*fix
, int action
)
3168 struct alc_spec
*spec
= codec
->spec
;
3171 case HDA_FIXUP_ACT_PRE_PROBE
:
3172 spec
->has_hs_key
= 1;
3173 snd_hda_jack_detect_enable_callback(codec
, 0x55,
3174 alc_headset_btn_callback
);
3175 snd_hda_jack_add_kctl(codec
, 0x55, "Headset Jack", false,
3176 SND_JACK_HEADSET
, alc_headset_btn_keymap
);
3178 case HDA_FIXUP_ACT_INIT
:
3179 alc_enable_headset_jack_key(codec
);
3184 static void alc269vb_toggle_power_output(struct hda_codec
*codec
, int power_up
)
3186 alc_update_coef_idx(codec
, 0x04, 1 << 11, power_up
? (1 << 11) : 0);
3189 static void alc269_shutup(struct hda_codec
*codec
)
3191 struct alc_spec
*spec
= codec
->spec
;
3193 if (spec
->codec_variant
== ALC269_TYPE_ALC269VB
)
3194 alc269vb_toggle_power_output(codec
, 0);
3195 if (spec
->codec_variant
== ALC269_TYPE_ALC269VB
&&
3196 (alc_get_coef0(codec
) & 0x00ff) == 0x018) {
3199 alc_shutup_pins(codec
);
3202 static const struct coef_fw alc282_coefs
[] = {
3203 WRITE_COEF(0x03, 0x0002), /* Power Down Control */
3204 UPDATE_COEF(0x05, 0xff3f, 0x0700), /* FIFO and filter clock */
3205 WRITE_COEF(0x07, 0x0200), /* DMIC control */
3206 UPDATE_COEF(0x06, 0x00f0, 0), /* Analog clock */
3207 UPDATE_COEF(0x08, 0xfffc, 0x0c2c), /* JD */
3208 WRITE_COEF(0x0a, 0xcccc), /* JD offset1 */
3209 WRITE_COEF(0x0b, 0xcccc), /* JD offset2 */
3210 WRITE_COEF(0x0e, 0x6e00), /* LDO1/2/3, DAC/ADC */
3211 UPDATE_COEF(0x0f, 0xf800, 0x1000), /* JD */
3212 UPDATE_COEF(0x10, 0xfc00, 0x0c00), /* Capless */
3213 WRITE_COEF(0x6f, 0x0), /* Class D test 4 */
3214 UPDATE_COEF(0x0c, 0xfe00, 0), /* IO power down directly */
3215 WRITE_COEF(0x34, 0xa0c0), /* ANC */
3216 UPDATE_COEF(0x16, 0x0008, 0), /* AGC MUX */
3217 UPDATE_COEF(0x1d, 0x00e0, 0), /* DAC simple content protection */
3218 UPDATE_COEF(0x1f, 0x00e0, 0), /* ADC simple content protection */
3219 WRITE_COEF(0x21, 0x8804), /* DAC ADC Zero Detection */
3220 WRITE_COEF(0x63, 0x2902), /* PLL */
3221 WRITE_COEF(0x68, 0xa080), /* capless control 2 */
3222 WRITE_COEF(0x69, 0x3400), /* capless control 3 */
3223 WRITE_COEF(0x6a, 0x2f3e), /* capless control 4 */
3224 WRITE_COEF(0x6b, 0x0), /* capless control 5 */
3225 UPDATE_COEF(0x6d, 0x0fff, 0x0900), /* class D test 2 */
3226 WRITE_COEF(0x6e, 0x110a), /* class D test 3 */
3227 UPDATE_COEF(0x70, 0x00f8, 0x00d8), /* class D test 5 */
3228 WRITE_COEF(0x71, 0x0014), /* class D test 6 */
3229 WRITE_COEF(0x72, 0xc2ba), /* classD OCP */
3230 UPDATE_COEF(0x77, 0x0f80, 0), /* classD pure DC test */
3231 WRITE_COEF(0x6c, 0xfc06), /* Class D amp control */
3235 static void alc282_restore_default_value(struct hda_codec
*codec
)
3237 alc_process_coef_fw(codec
, alc282_coefs
);
3240 static void alc282_init(struct hda_codec
*codec
)
3242 struct alc_spec
*spec
= codec
->spec
;
3243 hda_nid_t hp_pin
= alc_get_hp_pin(spec
);
3247 alc282_restore_default_value(codec
);
3251 hp_pin_sense
= snd_hda_jack_detect(codec
, hp_pin
);
3252 coef78
= alc_read_coef_idx(codec
, 0x78);
3254 /* Index 0x78 Direct Drive HP AMP LPM Control 1 */
3255 /* Headphone capless set to high power mode */
3256 alc_write_coef_idx(codec
, 0x78, 0x9004);
3261 snd_hda_codec_write(codec
, hp_pin
, 0,
3262 AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_MUTE
);
3267 snd_hda_codec_write(codec
, hp_pin
, 0,
3268 AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_OUT
);
3273 /* Headphone capless set to normal mode */
3274 alc_write_coef_idx(codec
, 0x78, coef78
);
3277 static void alc282_shutup(struct hda_codec
*codec
)
3279 struct alc_spec
*spec
= codec
->spec
;
3280 hda_nid_t hp_pin
= alc_get_hp_pin(spec
);
3285 alc269_shutup(codec
);
3289 hp_pin_sense
= snd_hda_jack_detect(codec
, hp_pin
);
3290 coef78
= alc_read_coef_idx(codec
, 0x78);
3291 alc_write_coef_idx(codec
, 0x78, 0x9004);
3296 snd_hda_codec_write(codec
, hp_pin
, 0,
3297 AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_MUTE
);
3302 if (!spec
->no_shutup_pins
)
3303 snd_hda_codec_write(codec
, hp_pin
, 0,
3304 AC_VERB_SET_PIN_WIDGET_CONTROL
, 0x0);
3309 alc_auto_setup_eapd(codec
, false);
3310 alc_shutup_pins(codec
);
3311 alc_write_coef_idx(codec
, 0x78, coef78
);
3314 static const struct coef_fw alc283_coefs
[] = {
3315 WRITE_COEF(0x03, 0x0002), /* Power Down Control */
3316 UPDATE_COEF(0x05, 0xff3f, 0x0700), /* FIFO and filter clock */
3317 WRITE_COEF(0x07, 0x0200), /* DMIC control */
3318 UPDATE_COEF(0x06, 0x00f0, 0), /* Analog clock */
3319 UPDATE_COEF(0x08, 0xfffc, 0x0c2c), /* JD */
3320 WRITE_COEF(0x0a, 0xcccc), /* JD offset1 */
3321 WRITE_COEF(0x0b, 0xcccc), /* JD offset2 */
3322 WRITE_COEF(0x0e, 0x6fc0), /* LDO1/2/3, DAC/ADC */
3323 UPDATE_COEF(0x0f, 0xf800, 0x1000), /* JD */
3324 UPDATE_COEF(0x10, 0xfc00, 0x0c00), /* Capless */
3325 WRITE_COEF(0x3a, 0x0), /* Class D test 4 */
3326 UPDATE_COEF(0x0c, 0xfe00, 0x0), /* IO power down directly */
3327 WRITE_COEF(0x22, 0xa0c0), /* ANC */
3328 UPDATE_COEFEX(0x53, 0x01, 0x000f, 0x0008), /* AGC MUX */
3329 UPDATE_COEF(0x1d, 0x00e0, 0), /* DAC simple content protection */
3330 UPDATE_COEF(0x1f, 0x00e0, 0), /* ADC simple content protection */
3331 WRITE_COEF(0x21, 0x8804), /* DAC ADC Zero Detection */
3332 WRITE_COEF(0x2e, 0x2902), /* PLL */
3333 WRITE_COEF(0x33, 0xa080), /* capless control 2 */
3334 WRITE_COEF(0x34, 0x3400), /* capless control 3 */
3335 WRITE_COEF(0x35, 0x2f3e), /* capless control 4 */
3336 WRITE_COEF(0x36, 0x0), /* capless control 5 */
3337 UPDATE_COEF(0x38, 0x0fff, 0x0900), /* class D test 2 */
3338 WRITE_COEF(0x39, 0x110a), /* class D test 3 */
3339 UPDATE_COEF(0x3b, 0x00f8, 0x00d8), /* class D test 5 */
3340 WRITE_COEF(0x3c, 0x0014), /* class D test 6 */
3341 WRITE_COEF(0x3d, 0xc2ba), /* classD OCP */
3342 UPDATE_COEF(0x42, 0x0f80, 0x0), /* classD pure DC test */
3343 WRITE_COEF(0x49, 0x0), /* test mode */
3344 UPDATE_COEF(0x40, 0xf800, 0x9800), /* Class D DC enable */
3345 UPDATE_COEF(0x42, 0xf000, 0x2000), /* DC offset */
3346 WRITE_COEF(0x37, 0xfc06), /* Class D amp control */
3347 UPDATE_COEF(0x1b, 0x8000, 0), /* HP JD control */
3351 static void alc283_restore_default_value(struct hda_codec
*codec
)
3353 alc_process_coef_fw(codec
, alc283_coefs
);
3356 static void alc283_init(struct hda_codec
*codec
)
3358 struct alc_spec
*spec
= codec
->spec
;
3359 hda_nid_t hp_pin
= alc_get_hp_pin(spec
);
3362 alc283_restore_default_value(codec
);
3368 hp_pin_sense
= snd_hda_jack_detect(codec
, hp_pin
);
3370 /* Index 0x43 Direct Drive HP AMP LPM Control 1 */
3371 /* Headphone capless set to high power mode */
3372 alc_write_coef_idx(codec
, 0x43, 0x9004);
3374 snd_hda_codec_write(codec
, hp_pin
, 0,
3375 AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_MUTE
);
3380 snd_hda_codec_write(codec
, hp_pin
, 0,
3381 AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_OUT
);
3385 /* Index 0x46 Combo jack auto switch control 2 */
3386 /* 3k pull low control for Headset jack. */
3387 alc_update_coef_idx(codec
, 0x46, 3 << 12, 0);
3388 /* Headphone capless set to normal mode */
3389 alc_write_coef_idx(codec
, 0x43, 0x9614);
3392 static void alc283_shutup(struct hda_codec
*codec
)
3394 struct alc_spec
*spec
= codec
->spec
;
3395 hda_nid_t hp_pin
= alc_get_hp_pin(spec
);
3399 alc269_shutup(codec
);
3403 hp_pin_sense
= snd_hda_jack_detect(codec
, hp_pin
);
3405 alc_write_coef_idx(codec
, 0x43, 0x9004);
3407 /*depop hp during suspend*/
3408 alc_write_coef_idx(codec
, 0x06, 0x2100);
3410 snd_hda_codec_write(codec
, hp_pin
, 0,
3411 AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_MUTE
);
3416 if (!spec
->no_shutup_pins
)
3417 snd_hda_codec_write(codec
, hp_pin
, 0,
3418 AC_VERB_SET_PIN_WIDGET_CONTROL
, 0x0);
3420 alc_update_coef_idx(codec
, 0x46, 0, 3 << 12);
3424 alc_auto_setup_eapd(codec
, false);
3425 alc_shutup_pins(codec
);
3426 alc_write_coef_idx(codec
, 0x43, 0x9614);
3429 static void alc256_init(struct hda_codec
*codec
)
3431 struct alc_spec
*spec
= codec
->spec
;
3432 hda_nid_t hp_pin
= alc_get_hp_pin(spec
);
3440 hp_pin_sense
= snd_hda_jack_detect(codec
, hp_pin
);
3445 alc_update_coefex_idx(codec
, 0x57, 0x04, 0x0007, 0x1); /* Low power */
3446 if (spec
->ultra_low_power
) {
3447 alc_update_coef_idx(codec
, 0x03, 1<<1, 1<<1);
3448 alc_update_coef_idx(codec
, 0x08, 3<<2, 3<<2);
3449 alc_update_coef_idx(codec
, 0x08, 7<<4, 0);
3450 alc_update_coef_idx(codec
, 0x3b, 1<<15, 0);
3451 alc_update_coef_idx(codec
, 0x0e, 7<<6, 7<<6);
3455 snd_hda_codec_write(codec
, hp_pin
, 0,
3456 AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_MUTE
);
3458 if (hp_pin_sense
|| spec
->ultra_low_power
)
3461 snd_hda_codec_write(codec
, hp_pin
, 0,
3462 AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_OUT
);
3464 if (hp_pin_sense
|| spec
->ultra_low_power
)
3467 alc_update_coef_idx(codec
, 0x46, 3 << 12, 0);
3468 alc_update_coefex_idx(codec
, 0x57, 0x04, 0x0007, 0x4); /* Hight power */
3469 alc_update_coefex_idx(codec
, 0x53, 0x02, 0x8000, 1 << 15); /* Clear bit */
3470 alc_update_coefex_idx(codec
, 0x53, 0x02, 0x8000, 0 << 15);
3472 * Expose headphone mic (or possibly Line In on some machines) instead
3473 * of PC Beep on 1Ah, and disable 1Ah loopback for all outputs. See
3474 * Documentation/sound/hd-audio/realtek-pc-beep.rst for details of
3477 alc_write_coef_idx(codec
, 0x36, 0x5757);
3480 static void alc256_shutup(struct hda_codec
*codec
)
3482 struct alc_spec
*spec
= codec
->spec
;
3483 hda_nid_t hp_pin
= alc_get_hp_pin(spec
);
3489 hp_pin_sense
= snd_hda_jack_detect(codec
, hp_pin
);
3494 snd_hda_codec_write(codec
, hp_pin
, 0,
3495 AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_MUTE
);
3497 if (hp_pin_sense
|| spec
->ultra_low_power
)
3500 /* 3k pull low control for Headset jack. */
3501 /* NOTE: call this before clearing the pin, otherwise codec stalls */
3502 /* If disable 3k pulldown control for alc257, the Mic detection will not work correctly
3503 * when booting with headset plugged. So skip setting it for the codec alc257
3505 if (codec
->core
.vendor_id
!= 0x10ec0257)
3506 alc_update_coef_idx(codec
, 0x46, 0, 3 << 12);
3508 if (!spec
->no_shutup_pins
)
3509 snd_hda_codec_write(codec
, hp_pin
, 0,
3510 AC_VERB_SET_PIN_WIDGET_CONTROL
, 0x0);
3512 if (hp_pin_sense
|| spec
->ultra_low_power
)
3515 alc_auto_setup_eapd(codec
, false);
3516 alc_shutup_pins(codec
);
3517 if (spec
->ultra_low_power
) {
3519 alc_update_coef_idx(codec
, 0x03, 1<<1, 0);
3520 alc_update_coef_idx(codec
, 0x08, 7<<4, 7<<4);
3521 alc_update_coef_idx(codec
, 0x08, 3<<2, 0);
3522 alc_update_coef_idx(codec
, 0x3b, 1<<15, 1<<15);
3523 alc_update_coef_idx(codec
, 0x0e, 7<<6, 0);
3528 static void alc225_init(struct hda_codec
*codec
)
3530 struct alc_spec
*spec
= codec
->spec
;
3531 hda_nid_t hp_pin
= alc_get_hp_pin(spec
);
3532 bool hp1_pin_sense
, hp2_pin_sense
;
3538 hp1_pin_sense
= snd_hda_jack_detect(codec
, hp_pin
);
3539 hp2_pin_sense
= snd_hda_jack_detect(codec
, 0x16);
3541 if (hp1_pin_sense
|| hp2_pin_sense
)
3544 alc_update_coefex_idx(codec
, 0x57, 0x04, 0x0007, 0x1); /* Low power */
3545 if (spec
->ultra_low_power
) {
3546 alc_update_coef_idx(codec
, 0x08, 0x0f << 2, 3<<2);
3547 alc_update_coef_idx(codec
, 0x0e, 7<<6, 7<<6);
3548 alc_update_coef_idx(codec
, 0x33, 1<<11, 0);
3552 if (hp1_pin_sense
|| spec
->ultra_low_power
)
3553 snd_hda_codec_write(codec
, hp_pin
, 0,
3554 AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_MUTE
);
3556 snd_hda_codec_write(codec
, 0x16, 0,
3557 AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_MUTE
);
3559 if (hp1_pin_sense
|| hp2_pin_sense
|| spec
->ultra_low_power
)
3562 if (hp1_pin_sense
|| spec
->ultra_low_power
)
3563 snd_hda_codec_write(codec
, hp_pin
, 0,
3564 AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_OUT
);
3566 snd_hda_codec_write(codec
, 0x16, 0,
3567 AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_OUT
);
3569 if (hp1_pin_sense
|| hp2_pin_sense
|| spec
->ultra_low_power
)
3572 alc_update_coef_idx(codec
, 0x4a, 3 << 10, 0);
3573 alc_update_coefex_idx(codec
, 0x57, 0x04, 0x0007, 0x4); /* Hight power */
3576 static void alc225_shutup(struct hda_codec
*codec
)
3578 struct alc_spec
*spec
= codec
->spec
;
3579 hda_nid_t hp_pin
= alc_get_hp_pin(spec
);
3580 bool hp1_pin_sense
, hp2_pin_sense
;
3585 alc_disable_headset_jack_key(codec
);
3586 /* 3k pull low control for Headset jack. */
3587 alc_update_coef_idx(codec
, 0x4a, 0, 3 << 10);
3589 hp1_pin_sense
= snd_hda_jack_detect(codec
, hp_pin
);
3590 hp2_pin_sense
= snd_hda_jack_detect(codec
, 0x16);
3592 if (hp1_pin_sense
|| hp2_pin_sense
)
3595 if (hp1_pin_sense
|| spec
->ultra_low_power
)
3596 snd_hda_codec_write(codec
, hp_pin
, 0,
3597 AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_MUTE
);
3599 snd_hda_codec_write(codec
, 0x16, 0,
3600 AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_MUTE
);
3602 if (hp1_pin_sense
|| hp2_pin_sense
|| spec
->ultra_low_power
)
3605 if (hp1_pin_sense
|| spec
->ultra_low_power
)
3606 snd_hda_codec_write(codec
, hp_pin
, 0,
3607 AC_VERB_SET_PIN_WIDGET_CONTROL
, 0x0);
3609 snd_hda_codec_write(codec
, 0x16, 0,
3610 AC_VERB_SET_PIN_WIDGET_CONTROL
, 0x0);
3612 if (hp1_pin_sense
|| hp2_pin_sense
|| spec
->ultra_low_power
)
3615 alc_auto_setup_eapd(codec
, false);
3616 alc_shutup_pins(codec
);
3617 if (spec
->ultra_low_power
) {
3619 alc_update_coef_idx(codec
, 0x08, 0x0f << 2, 0x0c << 2);
3620 alc_update_coef_idx(codec
, 0x0e, 7<<6, 0);
3621 alc_update_coef_idx(codec
, 0x33, 1<<11, 1<<11);
3622 alc_update_coef_idx(codec
, 0x4a, 3<<4, 2<<4);
3626 alc_update_coef_idx(codec
, 0x4a, 3 << 10, 0);
3627 alc_enable_headset_jack_key(codec
);
3630 static void alc_default_init(struct hda_codec
*codec
)
3632 struct alc_spec
*spec
= codec
->spec
;
3633 hda_nid_t hp_pin
= alc_get_hp_pin(spec
);
3641 hp_pin_sense
= snd_hda_jack_detect(codec
, hp_pin
);
3646 snd_hda_codec_write(codec
, hp_pin
, 0,
3647 AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_MUTE
);
3652 snd_hda_codec_write(codec
, hp_pin
, 0,
3653 AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_OUT
);
3659 static void alc_default_shutup(struct hda_codec
*codec
)
3661 struct alc_spec
*spec
= codec
->spec
;
3662 hda_nid_t hp_pin
= alc_get_hp_pin(spec
);
3666 alc269_shutup(codec
);
3670 hp_pin_sense
= snd_hda_jack_detect(codec
, hp_pin
);
3675 snd_hda_codec_write(codec
, hp_pin
, 0,
3676 AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_MUTE
);
3681 if (!spec
->no_shutup_pins
)
3682 snd_hda_codec_write(codec
, hp_pin
, 0,
3683 AC_VERB_SET_PIN_WIDGET_CONTROL
, 0x0);
3688 alc_auto_setup_eapd(codec
, false);
3689 alc_shutup_pins(codec
);
3692 static void alc294_hp_init(struct hda_codec
*codec
)
3694 struct alc_spec
*spec
= codec
->spec
;
3695 hda_nid_t hp_pin
= alc_get_hp_pin(spec
);
3701 snd_hda_codec_write(codec
, hp_pin
, 0,
3702 AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_MUTE
);
3706 if (!spec
->no_shutup_pins
)
3707 snd_hda_codec_write(codec
, hp_pin
, 0,
3708 AC_VERB_SET_PIN_WIDGET_CONTROL
, 0x0);
3710 alc_update_coef_idx(codec
, 0x6f, 0x000f, 0);/* Set HP depop to manual mode */
3711 alc_update_coefex_idx(codec
, 0x58, 0x00, 0x8000, 0x8000); /* HP depop procedure start */
3713 /* Wait for depop procedure finish */
3714 val
= alc_read_coefex_idx(codec
, 0x58, 0x01);
3715 for (i
= 0; i
< 20 && val
& 0x0080; i
++) {
3717 val
= alc_read_coefex_idx(codec
, 0x58, 0x01);
3719 /* Set HP depop to auto mode */
3720 alc_update_coef_idx(codec
, 0x6f, 0x000f, 0x000b);
3724 static void alc294_init(struct hda_codec
*codec
)
3726 struct alc_spec
*spec
= codec
->spec
;
3728 /* required only at boot or S4 resume time */
3729 if (!spec
->done_hp_init
||
3730 codec
->core
.dev
.power
.power_state
.event
== PM_EVENT_RESTORE
) {
3731 alc294_hp_init(codec
);
3732 spec
->done_hp_init
= true;
3734 alc_default_init(codec
);
3737 static void alc5505_coef_set(struct hda_codec
*codec
, unsigned int index_reg
,
3740 snd_hda_codec_write(codec
, 0x51, 0, AC_VERB_SET_COEF_INDEX
, index_reg
>> 1);
3741 snd_hda_codec_write(codec
, 0x51, 0, AC_VERB_SET_PROC_COEF
, val
& 0xffff); /* LSB */
3742 snd_hda_codec_write(codec
, 0x51, 0, AC_VERB_SET_PROC_COEF
, val
>> 16); /* MSB */
3745 static int alc5505_coef_get(struct hda_codec
*codec
, unsigned int index_reg
)
3749 snd_hda_codec_write(codec
, 0x51, 0, AC_VERB_SET_COEF_INDEX
, index_reg
>> 1);
3750 val
= snd_hda_codec_read(codec
, 0x51, 0, AC_VERB_GET_PROC_COEF
, 0)
3752 val
|= snd_hda_codec_read(codec
, 0x51, 0, AC_VERB_GET_PROC_COEF
, 0)
3757 static void alc5505_dsp_halt(struct hda_codec
*codec
)
3761 alc5505_coef_set(codec
, 0x3000, 0x000c); /* DSP CPU stop */
3762 alc5505_coef_set(codec
, 0x880c, 0x0008); /* DDR enter self refresh */
3763 alc5505_coef_set(codec
, 0x61c0, 0x11110080); /* Clock control for PLL and CPU */
3764 alc5505_coef_set(codec
, 0x6230, 0xfc0d4011); /* Disable Input OP */
3765 alc5505_coef_set(codec
, 0x61b4, 0x040a2b03); /* Stop PLL2 */
3766 alc5505_coef_set(codec
, 0x61b0, 0x00005b17); /* Stop PLL1 */
3767 alc5505_coef_set(codec
, 0x61b8, 0x04133303); /* Stop PLL3 */
3768 val
= alc5505_coef_get(codec
, 0x6220);
3769 alc5505_coef_set(codec
, 0x6220, (val
| 0x3000)); /* switch Ringbuffer clock to DBUS clock */
3772 static void alc5505_dsp_back_from_halt(struct hda_codec
*codec
)
3774 alc5505_coef_set(codec
, 0x61b8, 0x04133302);
3775 alc5505_coef_set(codec
, 0x61b0, 0x00005b16);
3776 alc5505_coef_set(codec
, 0x61b4, 0x040a2b02);
3777 alc5505_coef_set(codec
, 0x6230, 0xf80d4011);
3778 alc5505_coef_set(codec
, 0x6220, 0x2002010f);
3779 alc5505_coef_set(codec
, 0x880c, 0x00000004);
3782 static void alc5505_dsp_init(struct hda_codec
*codec
)
3786 alc5505_dsp_halt(codec
);
3787 alc5505_dsp_back_from_halt(codec
);
3788 alc5505_coef_set(codec
, 0x61b0, 0x5b14); /* PLL1 control */
3789 alc5505_coef_set(codec
, 0x61b0, 0x5b16);
3790 alc5505_coef_set(codec
, 0x61b4, 0x04132b00); /* PLL2 control */
3791 alc5505_coef_set(codec
, 0x61b4, 0x04132b02);
3792 alc5505_coef_set(codec
, 0x61b8, 0x041f3300); /* PLL3 control*/
3793 alc5505_coef_set(codec
, 0x61b8, 0x041f3302);
3794 snd_hda_codec_write(codec
, 0x51, 0, AC_VERB_SET_CODEC_RESET
, 0); /* Function reset */
3795 alc5505_coef_set(codec
, 0x61b8, 0x041b3302);
3796 alc5505_coef_set(codec
, 0x61b8, 0x04173302);
3797 alc5505_coef_set(codec
, 0x61b8, 0x04163302);
3798 alc5505_coef_set(codec
, 0x8800, 0x348b328b); /* DRAM control */
3799 alc5505_coef_set(codec
, 0x8808, 0x00020022); /* DRAM control */
3800 alc5505_coef_set(codec
, 0x8818, 0x00000400); /* DRAM control */
3802 val
= alc5505_coef_get(codec
, 0x6200) >> 16; /* Read revision ID */
3804 alc5505_coef_set(codec
, 0x6220, 0x2002010f); /* I/O PAD Configuration */
3806 alc5505_coef_set(codec
, 0x6220, 0x6002018f);
3808 alc5505_coef_set(codec
, 0x61ac, 0x055525f0); /**/
3809 alc5505_coef_set(codec
, 0x61c0, 0x12230080); /* Clock control */
3810 alc5505_coef_set(codec
, 0x61b4, 0x040e2b02); /* PLL2 control */
3811 alc5505_coef_set(codec
, 0x61bc, 0x010234f8); /* OSC Control */
3812 alc5505_coef_set(codec
, 0x880c, 0x00000004); /* DRAM Function control */
3813 alc5505_coef_set(codec
, 0x880c, 0x00000003);
3814 alc5505_coef_set(codec
, 0x880c, 0x00000010);
3816 #ifdef HALT_REALTEK_ALC5505
3817 alc5505_dsp_halt(codec
);
3821 #ifdef HALT_REALTEK_ALC5505
3822 #define alc5505_dsp_suspend(codec) do { } while (0) /* NOP */
3823 #define alc5505_dsp_resume(codec) do { } while (0) /* NOP */
3825 #define alc5505_dsp_suspend(codec) alc5505_dsp_halt(codec)
3826 #define alc5505_dsp_resume(codec) alc5505_dsp_back_from_halt(codec)
3830 static int alc269_suspend(struct hda_codec
*codec
)
3832 struct alc_spec
*spec
= codec
->spec
;
3834 if (spec
->has_alc5505_dsp
)
3835 alc5505_dsp_suspend(codec
);
3836 return alc_suspend(codec
);
3839 static int alc269_resume(struct hda_codec
*codec
)
3841 struct alc_spec
*spec
= codec
->spec
;
3843 if (spec
->codec_variant
== ALC269_TYPE_ALC269VB
)
3844 alc269vb_toggle_power_output(codec
, 0);
3845 if (spec
->codec_variant
== ALC269_TYPE_ALC269VB
&&
3846 (alc_get_coef0(codec
) & 0x00ff) == 0x018) {
3850 codec
->patch_ops
.init(codec
);
3852 if (spec
->codec_variant
== ALC269_TYPE_ALC269VB
)
3853 alc269vb_toggle_power_output(codec
, 1);
3854 if (spec
->codec_variant
== ALC269_TYPE_ALC269VB
&&
3855 (alc_get_coef0(codec
) & 0x00ff) == 0x017) {
3859 snd_hda_regmap_sync(codec
);
3860 hda_call_check_power_status(codec
, 0x01);
3862 /* on some machine, the BIOS will clear the codec gpio data when enter
3863 * suspend, and won't restore the data after resume, so we restore it
3866 if (spec
->gpio_data
)
3867 alc_write_gpio_data(codec
);
3869 if (spec
->has_alc5505_dsp
)
3870 alc5505_dsp_resume(codec
);
3874 #endif /* CONFIG_PM */
3876 static void alc269_fixup_pincfg_no_hp_to_lineout(struct hda_codec
*codec
,
3877 const struct hda_fixup
*fix
, int action
)
3879 struct alc_spec
*spec
= codec
->spec
;
3881 if (action
== HDA_FIXUP_ACT_PRE_PROBE
)
3882 spec
->parse_flags
= HDA_PINCFG_NO_HP_FIXUP
;
3885 static void alc269_fixup_pincfg_U7x7_headset_mic(struct hda_codec
*codec
,
3886 const struct hda_fixup
*fix
,
3889 unsigned int cfg_headphone
= snd_hda_codec_get_pincfg(codec
, 0x21);
3890 unsigned int cfg_headset_mic
= snd_hda_codec_get_pincfg(codec
, 0x19);
3892 if (cfg_headphone
&& cfg_headset_mic
== 0x411111f0)
3893 snd_hda_codec_set_pincfg(codec
, 0x19,
3894 (cfg_headphone
& ~AC_DEFCFG_DEVICE
) |
3895 (AC_JACK_MIC_IN
<< AC_DEFCFG_DEVICE_SHIFT
));
3898 static void alc269_fixup_hweq(struct hda_codec
*codec
,
3899 const struct hda_fixup
*fix
, int action
)
3901 if (action
== HDA_FIXUP_ACT_INIT
)
3902 alc_update_coef_idx(codec
, 0x1e, 0, 0x80);
3905 static void alc269_fixup_headset_mic(struct hda_codec
*codec
,
3906 const struct hda_fixup
*fix
, int action
)
3908 struct alc_spec
*spec
= codec
->spec
;
3910 if (action
== HDA_FIXUP_ACT_PRE_PROBE
)
3911 spec
->parse_flags
|= HDA_PINCFG_HEADSET_MIC
;
3914 static void alc271_fixup_dmic(struct hda_codec
*codec
,
3915 const struct hda_fixup
*fix
, int action
)
3917 static const struct hda_verb verbs
[] = {
3918 {0x20, AC_VERB_SET_COEF_INDEX
, 0x0d},
3919 {0x20, AC_VERB_SET_PROC_COEF
, 0x4000},
3924 if (strcmp(codec
->core
.chip_name
, "ALC271X") &&
3925 strcmp(codec
->core
.chip_name
, "ALC269VB"))
3927 cfg
= snd_hda_codec_get_pincfg(codec
, 0x12);
3928 if (get_defcfg_connect(cfg
) == AC_JACK_PORT_FIXED
)
3929 snd_hda_sequence_write(codec
, verbs
);
3932 /* Fix the speaker amp after resume, etc */
3933 static void alc269vb_fixup_aspire_e1_coef(struct hda_codec
*codec
,
3934 const struct hda_fixup
*fix
,
3937 if (action
== HDA_FIXUP_ACT_INIT
)
3938 alc_update_coef_idx(codec
, 0x0d, 0x6000, 0x6000);
3941 static void alc269_fixup_pcm_44k(struct hda_codec
*codec
,
3942 const struct hda_fixup
*fix
, int action
)
3944 struct alc_spec
*spec
= codec
->spec
;
3946 if (action
!= HDA_FIXUP_ACT_PROBE
)
3949 /* Due to a hardware problem on Lenovo Ideadpad, we need to
3950 * fix the sample rate of analog I/O to 44.1kHz
3952 spec
->gen
.stream_analog_playback
= &alc269_44k_pcm_analog_playback
;
3953 spec
->gen
.stream_analog_capture
= &alc269_44k_pcm_analog_capture
;
3956 static void alc269_fixup_stereo_dmic(struct hda_codec
*codec
,
3957 const struct hda_fixup
*fix
, int action
)
3959 /* The digital-mic unit sends PDM (differential signal) instead of
3960 * the standard PCM, thus you can't record a valid mono stream as is.
3961 * Below is a workaround specific to ALC269 to control the dmic
3962 * signal source as mono.
3964 if (action
== HDA_FIXUP_ACT_INIT
)
3965 alc_update_coef_idx(codec
, 0x07, 0, 0x80);
3968 static void alc269_quanta_automute(struct hda_codec
*codec
)
3970 snd_hda_gen_update_outputs(codec
);
3972 alc_write_coef_idx(codec
, 0x0c, 0x680);
3973 alc_write_coef_idx(codec
, 0x0c, 0x480);
3976 static void alc269_fixup_quanta_mute(struct hda_codec
*codec
,
3977 const struct hda_fixup
*fix
, int action
)
3979 struct alc_spec
*spec
= codec
->spec
;
3980 if (action
!= HDA_FIXUP_ACT_PROBE
)
3982 spec
->gen
.automute_hook
= alc269_quanta_automute
;
3985 static void alc269_x101_hp_automute_hook(struct hda_codec
*codec
,
3986 struct hda_jack_callback
*jack
)
3988 struct alc_spec
*spec
= codec
->spec
;
3991 snd_hda_gen_hp_automute(codec
, jack
);
3993 vref
= spec
->gen
.hp_jack_present
? PIN_VREF80
: 0;
3995 snd_hda_codec_write(codec
, 0x18, 0, AC_VERB_SET_PIN_WIDGET_CONTROL
,
3998 snd_hda_codec_write(codec
, 0x18, 0, AC_VERB_SET_PIN_WIDGET_CONTROL
,
4003 * Magic sequence to make Huawei Matebook X right speaker working (bko#197801)
4005 struct hda_alc298_mbxinit
{
4006 unsigned char value_0x23
;
4007 unsigned char value_0x25
;
4010 static void alc298_huawei_mbx_stereo_seq(struct hda_codec
*codec
,
4011 const struct hda_alc298_mbxinit
*initval
,
4014 snd_hda_codec_write(codec
, 0x06, 0, AC_VERB_SET_DIGI_CONVERT_3
, 0x0);
4015 alc_write_coef_idx(codec
, 0x26, 0xb000);
4018 snd_hda_codec_write(codec
, 0x21, 0, AC_VERB_GET_PIN_SENSE
, 0x0);
4020 snd_hda_codec_write(codec
, 0x6, 0, AC_VERB_SET_DIGI_CONVERT_3
, 0x80);
4021 alc_write_coef_idx(codec
, 0x26, 0xf000);
4022 alc_write_coef_idx(codec
, 0x23, initval
->value_0x23
);
4024 if (initval
->value_0x23
!= 0x1e)
4025 alc_write_coef_idx(codec
, 0x25, initval
->value_0x25
);
4027 snd_hda_codec_write(codec
, 0x20, 0, AC_VERB_SET_COEF_INDEX
, 0x26);
4028 snd_hda_codec_write(codec
, 0x20, 0, AC_VERB_SET_PROC_COEF
, 0xb010);
4031 static void alc298_fixup_huawei_mbx_stereo(struct hda_codec
*codec
,
4032 const struct hda_fixup
*fix
,
4035 /* Initialization magic */
4036 static const struct hda_alc298_mbxinit dac_init
[] = {
4037 {0x0c, 0x00}, {0x0d, 0x00}, {0x0e, 0x00}, {0x0f, 0x00},
4038 {0x10, 0x00}, {0x1a, 0x40}, {0x1b, 0x82}, {0x1c, 0x00},
4039 {0x1d, 0x00}, {0x1e, 0x00}, {0x1f, 0x00},
4040 {0x20, 0xc2}, {0x21, 0xc8}, {0x22, 0x26}, {0x23, 0x24},
4041 {0x27, 0xff}, {0x28, 0xff}, {0x29, 0xff}, {0x2a, 0x8f},
4042 {0x2b, 0x02}, {0x2c, 0x48}, {0x2d, 0x34}, {0x2e, 0x00},
4044 {0x30, 0x00}, {0x31, 0x00}, {0x32, 0x00}, {0x33, 0x00},
4045 {0x34, 0x00}, {0x35, 0x01}, {0x36, 0x93}, {0x37, 0x0c},
4046 {0x38, 0x00}, {0x39, 0x00}, {0x3a, 0xf8}, {0x38, 0x80},
4049 const struct hda_alc298_mbxinit
*seq
;
4051 if (action
!= HDA_FIXUP_ACT_INIT
)
4055 snd_hda_codec_write(codec
, 0x06, 0, AC_VERB_SET_DIGI_CONVERT_3
, 0x00);
4056 snd_hda_codec_write(codec
, 0x06, 0, AC_VERB_SET_DIGI_CONVERT_3
, 0x80);
4057 alc_write_coef_idx(codec
, 0x26, 0xf000);
4058 alc_write_coef_idx(codec
, 0x22, 0x31);
4059 alc_write_coef_idx(codec
, 0x23, 0x0b);
4060 alc_write_coef_idx(codec
, 0x25, 0x00);
4061 snd_hda_codec_write(codec
, 0x20, 0, AC_VERB_SET_COEF_INDEX
, 0x26);
4062 snd_hda_codec_write(codec
, 0x20, 0, AC_VERB_SET_PROC_COEF
, 0xb010);
4064 for (seq
= dac_init
; seq
->value_0x23
; seq
++)
4065 alc298_huawei_mbx_stereo_seq(codec
, seq
, seq
== dac_init
);
4068 static void alc269_fixup_x101_headset_mic(struct hda_codec
*codec
,
4069 const struct hda_fixup
*fix
, int action
)
4071 struct alc_spec
*spec
= codec
->spec
;
4072 if (action
== HDA_FIXUP_ACT_PRE_PROBE
) {
4073 spec
->parse_flags
|= HDA_PINCFG_HEADSET_MIC
;
4074 spec
->gen
.hp_automute_hook
= alc269_x101_hp_automute_hook
;
4078 static void alc_update_vref_led(struct hda_codec
*codec
, hda_nid_t pin
,
4079 bool polarity
, bool on
)
4081 unsigned int pinval
;
4087 pinval
= snd_hda_codec_get_pin_target(codec
, pin
);
4088 pinval
&= ~AC_PINCTL_VREFEN
;
4089 pinval
|= on
? AC_PINCTL_VREF_80
: AC_PINCTL_VREF_HIZ
;
4090 /* temporarily power up/down for setting VREF */
4091 snd_hda_power_up_pm(codec
);
4092 snd_hda_set_pin_ctl_cache(codec
, pin
, pinval
);
4093 snd_hda_power_down_pm(codec
);
4096 /* update mute-LED according to the speaker mute state via mic VREF pin */
4097 static int vref_mute_led_set(struct led_classdev
*led_cdev
,
4098 enum led_brightness brightness
)
4100 struct hda_codec
*codec
= dev_to_hda_codec(led_cdev
->dev
->parent
);
4101 struct alc_spec
*spec
= codec
->spec
;
4103 alc_update_vref_led(codec
, spec
->mute_led_nid
,
4104 spec
->mute_led_polarity
, brightness
);
4108 /* Make sure the led works even in runtime suspend */
4109 static unsigned int led_power_filter(struct hda_codec
*codec
,
4111 unsigned int power_state
)
4113 struct alc_spec
*spec
= codec
->spec
;
4115 if (power_state
!= AC_PWRST_D3
|| nid
== 0 ||
4116 (nid
!= spec
->mute_led_nid
&& nid
!= spec
->cap_mute_led_nid
))
4119 /* Set pin ctl again, it might have just been set to 0 */
4120 snd_hda_set_pin_ctl(codec
, nid
,
4121 snd_hda_codec_get_pin_target(codec
, nid
));
4123 return snd_hda_gen_path_power_filter(codec
, nid
, power_state
);
4126 static void alc269_fixup_hp_mute_led(struct hda_codec
*codec
,
4127 const struct hda_fixup
*fix
, int action
)
4129 struct alc_spec
*spec
= codec
->spec
;
4130 const struct dmi_device
*dev
= NULL
;
4132 if (action
!= HDA_FIXUP_ACT_PRE_PROBE
)
4135 while ((dev
= dmi_find_device(DMI_DEV_TYPE_OEM_STRING
, NULL
, dev
))) {
4137 if (sscanf(dev
->name
, "HP_Mute_LED_%d_%x", &pol
, &pin
) != 2)
4139 if (pin
< 0x0a || pin
>= 0x10)
4141 spec
->mute_led_polarity
= pol
;
4142 spec
->mute_led_nid
= pin
- 0x0a + 0x18;
4143 snd_hda_gen_add_mute_led_cdev(codec
, vref_mute_led_set
);
4144 codec
->power_filter
= led_power_filter
;
4146 "Detected mute LED for %x:%d\n", spec
->mute_led_nid
,
4147 spec
->mute_led_polarity
);
4152 static void alc269_fixup_hp_mute_led_micx(struct hda_codec
*codec
,
4153 const struct hda_fixup
*fix
,
4154 int action
, hda_nid_t pin
)
4156 struct alc_spec
*spec
= codec
->spec
;
4158 if (action
== HDA_FIXUP_ACT_PRE_PROBE
) {
4159 spec
->mute_led_polarity
= 0;
4160 spec
->mute_led_nid
= pin
;
4161 snd_hda_gen_add_mute_led_cdev(codec
, vref_mute_led_set
);
4162 codec
->power_filter
= led_power_filter
;
4166 static void alc269_fixup_hp_mute_led_mic1(struct hda_codec
*codec
,
4167 const struct hda_fixup
*fix
, int action
)
4169 alc269_fixup_hp_mute_led_micx(codec
, fix
, action
, 0x18);
4172 static void alc269_fixup_hp_mute_led_mic2(struct hda_codec
*codec
,
4173 const struct hda_fixup
*fix
, int action
)
4175 alc269_fixup_hp_mute_led_micx(codec
, fix
, action
, 0x19);
4178 static void alc269_fixup_hp_mute_led_mic3(struct hda_codec
*codec
,
4179 const struct hda_fixup
*fix
, int action
)
4181 alc269_fixup_hp_mute_led_micx(codec
, fix
, action
, 0x1b);
4184 /* update LED status via GPIO */
4185 static void alc_update_gpio_led(struct hda_codec
*codec
, unsigned int mask
,
4186 int polarity
, bool enabled
)
4190 alc_update_gpio_data(codec
, mask
, !enabled
); /* muted -> LED on */
4193 /* turn on/off mute LED via GPIO per vmaster hook */
4194 static int gpio_mute_led_set(struct led_classdev
*led_cdev
,
4195 enum led_brightness brightness
)
4197 struct hda_codec
*codec
= dev_to_hda_codec(led_cdev
->dev
->parent
);
4198 struct alc_spec
*spec
= codec
->spec
;
4200 alc_update_gpio_led(codec
, spec
->gpio_mute_led_mask
,
4201 spec
->mute_led_polarity
, !brightness
);
4205 /* turn on/off mic-mute LED via GPIO per capture hook */
4206 static int micmute_led_set(struct led_classdev
*led_cdev
,
4207 enum led_brightness brightness
)
4209 struct hda_codec
*codec
= dev_to_hda_codec(led_cdev
->dev
->parent
);
4210 struct alc_spec
*spec
= codec
->spec
;
4212 alc_update_gpio_led(codec
, spec
->gpio_mic_led_mask
,
4213 spec
->micmute_led_polarity
, !brightness
);
4217 /* setup mute and mic-mute GPIO bits, add hooks appropriately */
4218 static void alc_fixup_hp_gpio_led(struct hda_codec
*codec
,
4220 unsigned int mute_mask
,
4221 unsigned int micmute_mask
)
4223 struct alc_spec
*spec
= codec
->spec
;
4225 alc_fixup_gpio(codec
, action
, mute_mask
| micmute_mask
);
4227 if (action
!= HDA_FIXUP_ACT_PRE_PROBE
)
4230 spec
->gpio_mute_led_mask
= mute_mask
;
4231 snd_hda_gen_add_mute_led_cdev(codec
, gpio_mute_led_set
);
4234 spec
->gpio_mic_led_mask
= micmute_mask
;
4235 snd_hda_gen_add_micmute_led_cdev(codec
, micmute_led_set
);
4239 static void alc236_fixup_hp_gpio_led(struct hda_codec
*codec
,
4240 const struct hda_fixup
*fix
, int action
)
4242 alc_fixup_hp_gpio_led(codec
, action
, 0x02, 0x01);
4245 static void alc269_fixup_hp_gpio_led(struct hda_codec
*codec
,
4246 const struct hda_fixup
*fix
, int action
)
4248 alc_fixup_hp_gpio_led(codec
, action
, 0x08, 0x10);
4251 static void alc285_fixup_hp_gpio_led(struct hda_codec
*codec
,
4252 const struct hda_fixup
*fix
, int action
)
4254 alc_fixup_hp_gpio_led(codec
, action
, 0x04, 0x01);
4257 static void alc286_fixup_hp_gpio_led(struct hda_codec
*codec
,
4258 const struct hda_fixup
*fix
, int action
)
4260 alc_fixup_hp_gpio_led(codec
, action
, 0x02, 0x20);
4263 static void alc287_fixup_hp_gpio_led(struct hda_codec
*codec
,
4264 const struct hda_fixup
*fix
, int action
)
4266 alc_fixup_hp_gpio_led(codec
, action
, 0x10, 0);
4269 /* turn on/off mic-mute LED per capture hook via VREF change */
4270 static int vref_micmute_led_set(struct led_classdev
*led_cdev
,
4271 enum led_brightness brightness
)
4273 struct hda_codec
*codec
= dev_to_hda_codec(led_cdev
->dev
->parent
);
4274 struct alc_spec
*spec
= codec
->spec
;
4276 alc_update_vref_led(codec
, spec
->cap_mute_led_nid
,
4277 spec
->micmute_led_polarity
, brightness
);
4281 static void alc269_fixup_hp_gpio_mic1_led(struct hda_codec
*codec
,
4282 const struct hda_fixup
*fix
, int action
)
4284 struct alc_spec
*spec
= codec
->spec
;
4286 alc_fixup_hp_gpio_led(codec
, action
, 0x08, 0);
4287 if (action
== HDA_FIXUP_ACT_PRE_PROBE
) {
4288 /* Like hp_gpio_mic1_led, but also needs GPIO4 low to
4289 * enable headphone amp
4291 spec
->gpio_mask
|= 0x10;
4292 spec
->gpio_dir
|= 0x10;
4293 spec
->cap_mute_led_nid
= 0x18;
4294 snd_hda_gen_add_micmute_led_cdev(codec
, vref_micmute_led_set
);
4295 codec
->power_filter
= led_power_filter
;
4299 static void alc280_fixup_hp_gpio4(struct hda_codec
*codec
,
4300 const struct hda_fixup
*fix
, int action
)
4302 struct alc_spec
*spec
= codec
->spec
;
4304 alc_fixup_hp_gpio_led(codec
, action
, 0x08, 0);
4305 if (action
== HDA_FIXUP_ACT_PRE_PROBE
) {
4306 spec
->cap_mute_led_nid
= 0x18;
4307 snd_hda_gen_add_micmute_led_cdev(codec
, vref_micmute_led_set
);
4308 codec
->power_filter
= led_power_filter
;
4312 /* HP Spectre x360 14 model needs a unique workaround for enabling the amp;
4313 * it needs to toggle the GPIO0 once on and off at each time (bko#210633)
4315 static void alc245_fixup_hp_x360_amp(struct hda_codec
*codec
,
4316 const struct hda_fixup
*fix
, int action
)
4318 struct alc_spec
*spec
= codec
->spec
;
4321 case HDA_FIXUP_ACT_PRE_PROBE
:
4322 spec
->gpio_mask
|= 0x01;
4323 spec
->gpio_dir
|= 0x01;
4325 case HDA_FIXUP_ACT_INIT
:
4326 /* need to toggle GPIO to enable the amp */
4327 alc_update_gpio_data(codec
, 0x01, true);
4329 alc_update_gpio_data(codec
, 0x01, false);
4334 /* toggle GPIO2 at each time stream is started; we use PREPARE state instead */
4335 static void alc274_hp_envy_pcm_hook(struct hda_pcm_stream
*hinfo
,
4336 struct hda_codec
*codec
,
4337 struct snd_pcm_substream
*substream
,
4341 case HDA_GEN_PCM_ACT_PREPARE
:
4342 alc_update_gpio_data(codec
, 0x04, true);
4344 case HDA_GEN_PCM_ACT_CLEANUP
:
4345 alc_update_gpio_data(codec
, 0x04, false);
4350 static void alc274_fixup_hp_envy_gpio(struct hda_codec
*codec
,
4351 const struct hda_fixup
*fix
,
4354 struct alc_spec
*spec
= codec
->spec
;
4356 if (action
== HDA_FIXUP_ACT_PROBE
) {
4357 spec
->gpio_mask
|= 0x04;
4358 spec
->gpio_dir
|= 0x04;
4359 spec
->gen
.pcm_playback_hook
= alc274_hp_envy_pcm_hook
;
4363 static void alc_update_coef_led(struct hda_codec
*codec
,
4364 struct alc_coef_led
*led
,
4365 bool polarity
, bool on
)
4369 /* temporarily power up/down for setting COEF bit */
4370 alc_update_coef_idx(codec
, led
->idx
, led
->mask
,
4371 on
? led
->on
: led
->off
);
4374 /* update mute-LED according to the speaker mute state via COEF bit */
4375 static int coef_mute_led_set(struct led_classdev
*led_cdev
,
4376 enum led_brightness brightness
)
4378 struct hda_codec
*codec
= dev_to_hda_codec(led_cdev
->dev
->parent
);
4379 struct alc_spec
*spec
= codec
->spec
;
4381 alc_update_coef_led(codec
, &spec
->mute_led_coef
,
4382 spec
->mute_led_polarity
, brightness
);
4386 static void alc285_fixup_hp_mute_led_coefbit(struct hda_codec
*codec
,
4387 const struct hda_fixup
*fix
,
4390 struct alc_spec
*spec
= codec
->spec
;
4392 if (action
== HDA_FIXUP_ACT_PRE_PROBE
) {
4393 spec
->mute_led_polarity
= 0;
4394 spec
->mute_led_coef
.idx
= 0x0b;
4395 spec
->mute_led_coef
.mask
= 1 << 3;
4396 spec
->mute_led_coef
.on
= 1 << 3;
4397 spec
->mute_led_coef
.off
= 0;
4398 snd_hda_gen_add_mute_led_cdev(codec
, coef_mute_led_set
);
4402 static void alc236_fixup_hp_mute_led_coefbit(struct hda_codec
*codec
,
4403 const struct hda_fixup
*fix
,
4406 struct alc_spec
*spec
= codec
->spec
;
4408 if (action
== HDA_FIXUP_ACT_PRE_PROBE
) {
4409 spec
->mute_led_polarity
= 0;
4410 spec
->mute_led_coef
.idx
= 0x34;
4411 spec
->mute_led_coef
.mask
= 1 << 5;
4412 spec
->mute_led_coef
.on
= 0;
4413 spec
->mute_led_coef
.off
= 1 << 5;
4414 snd_hda_gen_add_mute_led_cdev(codec
, coef_mute_led_set
);
4418 /* turn on/off mic-mute LED per capture hook by coef bit */
4419 static int coef_micmute_led_set(struct led_classdev
*led_cdev
,
4420 enum led_brightness brightness
)
4422 struct hda_codec
*codec
= dev_to_hda_codec(led_cdev
->dev
->parent
);
4423 struct alc_spec
*spec
= codec
->spec
;
4425 alc_update_coef_led(codec
, &spec
->mic_led_coef
,
4426 spec
->micmute_led_polarity
, brightness
);
4430 static void alc285_fixup_hp_coef_micmute_led(struct hda_codec
*codec
,
4431 const struct hda_fixup
*fix
, int action
)
4433 struct alc_spec
*spec
= codec
->spec
;
4435 if (action
== HDA_FIXUP_ACT_PRE_PROBE
) {
4436 spec
->mic_led_coef
.idx
= 0x19;
4437 spec
->mic_led_coef
.mask
= 1 << 13;
4438 spec
->mic_led_coef
.on
= 1 << 13;
4439 spec
->mic_led_coef
.off
= 0;
4440 snd_hda_gen_add_micmute_led_cdev(codec
, coef_micmute_led_set
);
4444 static void alc236_fixup_hp_coef_micmute_led(struct hda_codec
*codec
,
4445 const struct hda_fixup
*fix
, int action
)
4447 struct alc_spec
*spec
= codec
->spec
;
4449 if (action
== HDA_FIXUP_ACT_PRE_PROBE
) {
4450 spec
->mic_led_coef
.idx
= 0x35;
4451 spec
->mic_led_coef
.mask
= 3 << 2;
4452 spec
->mic_led_coef
.on
= 2 << 2;
4453 spec
->mic_led_coef
.off
= 1 << 2;
4454 snd_hda_gen_add_micmute_led_cdev(codec
, coef_micmute_led_set
);
4458 static void alc285_fixup_hp_mute_led(struct hda_codec
*codec
,
4459 const struct hda_fixup
*fix
, int action
)
4461 alc285_fixup_hp_mute_led_coefbit(codec
, fix
, action
);
4462 alc285_fixup_hp_coef_micmute_led(codec
, fix
, action
);
4465 static void alc236_fixup_hp_mute_led(struct hda_codec
*codec
,
4466 const struct hda_fixup
*fix
, int action
)
4468 alc236_fixup_hp_mute_led_coefbit(codec
, fix
, action
);
4469 alc236_fixup_hp_coef_micmute_led(codec
, fix
, action
);
4472 static void alc236_fixup_hp_micmute_led_vref(struct hda_codec
*codec
,
4473 const struct hda_fixup
*fix
, int action
)
4475 struct alc_spec
*spec
= codec
->spec
;
4477 if (action
== HDA_FIXUP_ACT_PRE_PROBE
) {
4478 spec
->cap_mute_led_nid
= 0x1a;
4479 snd_hda_gen_add_micmute_led_cdev(codec
, vref_micmute_led_set
);
4480 codec
->power_filter
= led_power_filter
;
4484 static void alc236_fixup_hp_mute_led_micmute_vref(struct hda_codec
*codec
,
4485 const struct hda_fixup
*fix
, int action
)
4487 alc236_fixup_hp_mute_led_coefbit(codec
, fix
, action
);
4488 alc236_fixup_hp_micmute_led_vref(codec
, fix
, action
);
4491 #if IS_REACHABLE(CONFIG_INPUT)
4492 static void gpio2_mic_hotkey_event(struct hda_codec
*codec
,
4493 struct hda_jack_callback
*event
)
4495 struct alc_spec
*spec
= codec
->spec
;
4497 /* GPIO2 just toggles on a keypress/keyrelease cycle. Therefore
4498 send both key on and key off event for every interrupt. */
4499 input_report_key(spec
->kb_dev
, spec
->alc_mute_keycode_map
[ALC_KEY_MICMUTE_INDEX
], 1);
4500 input_sync(spec
->kb_dev
);
4501 input_report_key(spec
->kb_dev
, spec
->alc_mute_keycode_map
[ALC_KEY_MICMUTE_INDEX
], 0);
4502 input_sync(spec
->kb_dev
);
4505 static int alc_register_micmute_input_device(struct hda_codec
*codec
)
4507 struct alc_spec
*spec
= codec
->spec
;
4510 spec
->kb_dev
= input_allocate_device();
4511 if (!spec
->kb_dev
) {
4512 codec_err(codec
, "Out of memory (input_allocate_device)\n");
4516 spec
->alc_mute_keycode_map
[ALC_KEY_MICMUTE_INDEX
] = KEY_MICMUTE
;
4518 spec
->kb_dev
->name
= "Microphone Mute Button";
4519 spec
->kb_dev
->evbit
[0] = BIT_MASK(EV_KEY
);
4520 spec
->kb_dev
->keycodesize
= sizeof(spec
->alc_mute_keycode_map
[0]);
4521 spec
->kb_dev
->keycodemax
= ARRAY_SIZE(spec
->alc_mute_keycode_map
);
4522 spec
->kb_dev
->keycode
= spec
->alc_mute_keycode_map
;
4523 for (i
= 0; i
< ARRAY_SIZE(spec
->alc_mute_keycode_map
); i
++)
4524 set_bit(spec
->alc_mute_keycode_map
[i
], spec
->kb_dev
->keybit
);
4526 if (input_register_device(spec
->kb_dev
)) {
4527 codec_err(codec
, "input_register_device failed\n");
4528 input_free_device(spec
->kb_dev
);
4529 spec
->kb_dev
= NULL
;
4536 /* GPIO1 = set according to SKU external amp
4537 * GPIO2 = mic mute hotkey
4539 * GPIO4 = mic mute LED
4541 static void alc280_fixup_hp_gpio2_mic_hotkey(struct hda_codec
*codec
,
4542 const struct hda_fixup
*fix
, int action
)
4544 struct alc_spec
*spec
= codec
->spec
;
4546 alc_fixup_hp_gpio_led(codec
, action
, 0x08, 0x10);
4547 if (action
== HDA_FIXUP_ACT_PRE_PROBE
) {
4548 spec
->init_amp
= ALC_INIT_DEFAULT
;
4549 if (alc_register_micmute_input_device(codec
) != 0)
4552 spec
->gpio_mask
|= 0x06;
4553 spec
->gpio_dir
|= 0x02;
4554 spec
->gpio_data
|= 0x02;
4555 snd_hda_codec_write_cache(codec
, codec
->core
.afg
, 0,
4556 AC_VERB_SET_GPIO_UNSOLICITED_RSP_MASK
, 0x04);
4557 snd_hda_jack_detect_enable_callback(codec
, codec
->core
.afg
,
4558 gpio2_mic_hotkey_event
);
4566 case HDA_FIXUP_ACT_FREE
:
4567 input_unregister_device(spec
->kb_dev
);
4568 spec
->kb_dev
= NULL
;
4572 /* Line2 = mic mute hotkey
4573 * GPIO2 = mic mute LED
4575 static void alc233_fixup_lenovo_line2_mic_hotkey(struct hda_codec
*codec
,
4576 const struct hda_fixup
*fix
, int action
)
4578 struct alc_spec
*spec
= codec
->spec
;
4580 alc_fixup_hp_gpio_led(codec
, action
, 0, 0x04);
4581 if (action
== HDA_FIXUP_ACT_PRE_PROBE
) {
4582 spec
->init_amp
= ALC_INIT_DEFAULT
;
4583 if (alc_register_micmute_input_device(codec
) != 0)
4586 snd_hda_jack_detect_enable_callback(codec
, 0x1b,
4587 gpio2_mic_hotkey_event
);
4595 case HDA_FIXUP_ACT_FREE
:
4596 input_unregister_device(spec
->kb_dev
);
4597 spec
->kb_dev
= NULL
;
4601 #define alc280_fixup_hp_gpio2_mic_hotkey NULL
4602 #define alc233_fixup_lenovo_line2_mic_hotkey NULL
4605 static void alc269_fixup_hp_line1_mic1_led(struct hda_codec
*codec
,
4606 const struct hda_fixup
*fix
, int action
)
4608 struct alc_spec
*spec
= codec
->spec
;
4610 alc269_fixup_hp_mute_led_micx(codec
, fix
, action
, 0x1a);
4611 if (action
== HDA_FIXUP_ACT_PRE_PROBE
) {
4612 spec
->cap_mute_led_nid
= 0x18;
4613 snd_hda_gen_add_micmute_led_cdev(codec
, vref_micmute_led_set
);
4617 static const struct coef_fw alc225_pre_hsmode
[] = {
4618 UPDATE_COEF(0x4a, 1<<8, 0),
4619 UPDATE_COEFEX(0x57, 0x05, 1<<14, 0),
4620 UPDATE_COEF(0x63, 3<<14, 3<<14),
4621 UPDATE_COEF(0x4a, 3<<4, 2<<4),
4622 UPDATE_COEF(0x4a, 3<<10, 3<<10),
4623 UPDATE_COEF(0x45, 0x3f<<10, 0x34<<10),
4624 UPDATE_COEF(0x4a, 3<<10, 0),
4628 static void alc_headset_mode_unplugged(struct hda_codec
*codec
)
4630 struct alc_spec
*spec
= codec
->spec
;
4631 static const struct coef_fw coef0255
[] = {
4632 WRITE_COEF(0x1b, 0x0c0b), /* LDO and MISC control */
4633 WRITE_COEF(0x45, 0xd089), /* UAJ function set to menual mode */
4634 UPDATE_COEFEX(0x57, 0x05, 1<<14, 0), /* Direct Drive HP Amp control(Set to verb control)*/
4635 WRITE_COEF(0x06, 0x6104), /* Set MIC2 Vref gate with HP */
4636 WRITE_COEFEX(0x57, 0x03, 0x8aa6), /* Direct Drive HP Amp control */
4639 static const struct coef_fw coef0256
[] = {
4640 WRITE_COEF(0x1b, 0x0c4b), /* LDO and MISC control */
4641 WRITE_COEF(0x45, 0xd089), /* UAJ function set to menual mode */
4642 WRITE_COEF(0x06, 0x6104), /* Set MIC2 Vref gate with HP */
4643 WRITE_COEFEX(0x57, 0x03, 0x09a3), /* Direct Drive HP Amp control */
4644 UPDATE_COEFEX(0x57, 0x05, 1<<14, 0), /* Direct Drive HP Amp control(Set to verb control)*/
4647 static const struct coef_fw coef0233
[] = {
4648 WRITE_COEF(0x1b, 0x0c0b),
4649 WRITE_COEF(0x45, 0xc429),
4650 UPDATE_COEF(0x35, 0x4000, 0),
4651 WRITE_COEF(0x06, 0x2104),
4652 WRITE_COEF(0x1a, 0x0001),
4653 WRITE_COEF(0x26, 0x0004),
4654 WRITE_COEF(0x32, 0x42a3),
4657 static const struct coef_fw coef0288
[] = {
4658 UPDATE_COEF(0x4f, 0xfcc0, 0xc400),
4659 UPDATE_COEF(0x50, 0x2000, 0x2000),
4660 UPDATE_COEF(0x56, 0x0006, 0x0006),
4661 UPDATE_COEF(0x66, 0x0008, 0),
4662 UPDATE_COEF(0x67, 0x2000, 0),
4665 static const struct coef_fw coef0298
[] = {
4666 UPDATE_COEF(0x19, 0x1300, 0x0300),
4669 static const struct coef_fw coef0292
[] = {
4670 WRITE_COEF(0x76, 0x000e),
4671 WRITE_COEF(0x6c, 0x2400),
4672 WRITE_COEF(0x18, 0x7308),
4673 WRITE_COEF(0x6b, 0xc429),
4676 static const struct coef_fw coef0293
[] = {
4677 UPDATE_COEF(0x10, 7<<8, 6<<8), /* SET Line1 JD to 0 */
4678 UPDATE_COEFEX(0x57, 0x05, 1<<15|1<<13, 0x0), /* SET charge pump by verb */
4679 UPDATE_COEFEX(0x57, 0x03, 1<<10, 1<<10), /* SET EN_OSW to 1 */
4680 UPDATE_COEF(0x1a, 1<<3, 1<<3), /* Combo JD gating with LINE1-VREFO */
4681 WRITE_COEF(0x45, 0xc429), /* Set to TRS type */
4682 UPDATE_COEF(0x4a, 0x000f, 0x000e), /* Combo Jack auto detect */
4685 static const struct coef_fw coef0668
[] = {
4686 WRITE_COEF(0x15, 0x0d40),
4687 WRITE_COEF(0xb7, 0x802b),
4690 static const struct coef_fw coef0225
[] = {
4691 UPDATE_COEF(0x63, 3<<14, 0),
4694 static const struct coef_fw coef0274
[] = {
4695 UPDATE_COEF(0x4a, 0x0100, 0),
4696 UPDATE_COEFEX(0x57, 0x05, 0x4000, 0),
4697 UPDATE_COEF(0x6b, 0xf000, 0x5000),
4698 UPDATE_COEF(0x4a, 0x0010, 0),
4699 UPDATE_COEF(0x4a, 0x0c00, 0x0c00),
4700 WRITE_COEF(0x45, 0x5289),
4701 UPDATE_COEF(0x4a, 0x0c00, 0),
4705 if (spec
->no_internal_mic_pin
) {
4706 alc_update_coef_idx(codec
, 0x45, 0xf<<12 | 1<<10, 5<<12);
4710 switch (codec
->core
.vendor_id
) {
4712 alc_process_coef_fw(codec
, coef0255
);
4716 alc_process_coef_fw(codec
, coef0256
);
4721 alc_process_coef_fw(codec
, coef0274
);
4725 alc_process_coef_fw(codec
, coef0233
);
4729 alc_process_coef_fw(codec
, coef0288
);
4732 alc_process_coef_fw(codec
, coef0298
);
4733 alc_process_coef_fw(codec
, coef0288
);
4736 alc_process_coef_fw(codec
, coef0292
);
4739 alc_process_coef_fw(codec
, coef0293
);
4742 alc_process_coef_fw(codec
, coef0668
);
4750 alc_process_coef_fw(codec
, alc225_pre_hsmode
);
4751 alc_process_coef_fw(codec
, coef0225
);
4754 alc_update_coefex_idx(codec
, 0x57, 0x5, 1<<14, 0);
4757 codec_dbg(codec
, "Headset jack set to unplugged mode.\n");
4761 static void alc_headset_mode_mic_in(struct hda_codec
*codec
, hda_nid_t hp_pin
,
4764 static const struct coef_fw coef0255
[] = {
4765 WRITE_COEFEX(0x57, 0x03, 0x8aa6),
4766 WRITE_COEF(0x06, 0x6100), /* Set MIC2 Vref gate to normal */
4769 static const struct coef_fw coef0256
[] = {
4770 UPDATE_COEFEX(0x57, 0x05, 1<<14, 1<<14), /* Direct Drive HP Amp control(Set to verb control)*/
4771 WRITE_COEFEX(0x57, 0x03, 0x09a3),
4772 WRITE_COEF(0x06, 0x6100), /* Set MIC2 Vref gate to normal */
4775 static const struct coef_fw coef0233
[] = {
4776 UPDATE_COEF(0x35, 0, 1<<14),
4777 WRITE_COEF(0x06, 0x2100),
4778 WRITE_COEF(0x1a, 0x0021),
4779 WRITE_COEF(0x26, 0x008c),
4782 static const struct coef_fw coef0288
[] = {
4783 UPDATE_COEF(0x4f, 0x00c0, 0),
4784 UPDATE_COEF(0x50, 0x2000, 0),
4785 UPDATE_COEF(0x56, 0x0006, 0),
4786 UPDATE_COEF(0x4f, 0xfcc0, 0xc400),
4787 UPDATE_COEF(0x66, 0x0008, 0x0008),
4788 UPDATE_COEF(0x67, 0x2000, 0x2000),
4791 static const struct coef_fw coef0292
[] = {
4792 WRITE_COEF(0x19, 0xa208),
4793 WRITE_COEF(0x2e, 0xacf0),
4796 static const struct coef_fw coef0293
[] = {
4797 UPDATE_COEFEX(0x57, 0x05, 0, 1<<15|1<<13), /* SET charge pump by verb */
4798 UPDATE_COEFEX(0x57, 0x03, 1<<10, 0), /* SET EN_OSW to 0 */
4799 UPDATE_COEF(0x1a, 1<<3, 0), /* Combo JD gating without LINE1-VREFO */
4802 static const struct coef_fw coef0688
[] = {
4803 WRITE_COEF(0xb7, 0x802b),
4804 WRITE_COEF(0xb5, 0x1040),
4805 UPDATE_COEF(0xc3, 0, 1<<12),
4808 static const struct coef_fw coef0225
[] = {
4809 UPDATE_COEFEX(0x57, 0x05, 1<<14, 1<<14),
4810 UPDATE_COEF(0x4a, 3<<4, 2<<4),
4811 UPDATE_COEF(0x63, 3<<14, 0),
4814 static const struct coef_fw coef0274
[] = {
4815 UPDATE_COEFEX(0x57, 0x05, 0x4000, 0x4000),
4816 UPDATE_COEF(0x4a, 0x0010, 0),
4817 UPDATE_COEF(0x6b, 0xf000, 0),
4821 switch (codec
->core
.vendor_id
) {
4823 alc_write_coef_idx(codec
, 0x45, 0xc489);
4824 snd_hda_set_pin_ctl_cache(codec
, hp_pin
, 0);
4825 alc_process_coef_fw(codec
, coef0255
);
4826 snd_hda_set_pin_ctl_cache(codec
, mic_pin
, PIN_VREF50
);
4830 alc_write_coef_idx(codec
, 0x45, 0xc489);
4831 snd_hda_set_pin_ctl_cache(codec
, hp_pin
, 0);
4832 alc_process_coef_fw(codec
, coef0256
);
4833 snd_hda_set_pin_ctl_cache(codec
, mic_pin
, PIN_VREF50
);
4838 alc_write_coef_idx(codec
, 0x45, 0x4689);
4839 snd_hda_set_pin_ctl_cache(codec
, hp_pin
, 0);
4840 alc_process_coef_fw(codec
, coef0274
);
4841 snd_hda_set_pin_ctl_cache(codec
, mic_pin
, PIN_VREF50
);
4845 alc_write_coef_idx(codec
, 0x45, 0xc429);
4846 snd_hda_set_pin_ctl_cache(codec
, hp_pin
, 0);
4847 alc_process_coef_fw(codec
, coef0233
);
4848 snd_hda_set_pin_ctl_cache(codec
, mic_pin
, PIN_VREF50
);
4853 snd_hda_set_pin_ctl_cache(codec
, hp_pin
, 0);
4854 alc_process_coef_fw(codec
, coef0288
);
4855 snd_hda_set_pin_ctl_cache(codec
, mic_pin
, PIN_VREF50
);
4858 snd_hda_set_pin_ctl_cache(codec
, hp_pin
, 0);
4859 alc_process_coef_fw(codec
, coef0292
);
4862 /* Set to TRS mode */
4863 alc_write_coef_idx(codec
, 0x45, 0xc429);
4864 snd_hda_set_pin_ctl_cache(codec
, hp_pin
, 0);
4865 alc_process_coef_fw(codec
, coef0293
);
4866 snd_hda_set_pin_ctl_cache(codec
, mic_pin
, PIN_VREF50
);
4869 alc_update_coefex_idx(codec
, 0x57, 0x5, 0, 1<<14);
4873 snd_hda_set_pin_ctl_cache(codec
, hp_pin
, 0);
4874 snd_hda_set_pin_ctl_cache(codec
, mic_pin
, PIN_VREF50
);
4877 alc_write_coef_idx(codec
, 0x11, 0x0001);
4878 snd_hda_set_pin_ctl_cache(codec
, hp_pin
, 0);
4879 alc_process_coef_fw(codec
, coef0688
);
4880 snd_hda_set_pin_ctl_cache(codec
, mic_pin
, PIN_VREF50
);
4888 alc_process_coef_fw(codec
, alc225_pre_hsmode
);
4889 alc_update_coef_idx(codec
, 0x45, 0x3f<<10, 0x31<<10);
4890 snd_hda_set_pin_ctl_cache(codec
, hp_pin
, 0);
4891 alc_process_coef_fw(codec
, coef0225
);
4892 snd_hda_set_pin_ctl_cache(codec
, mic_pin
, PIN_VREF50
);
4895 codec_dbg(codec
, "Headset jack set to mic-in mode.\n");
4898 static void alc_headset_mode_default(struct hda_codec
*codec
)
4900 static const struct coef_fw coef0225
[] = {
4901 UPDATE_COEF(0x45, 0x3f<<10, 0x30<<10),
4902 UPDATE_COEF(0x45, 0x3f<<10, 0x31<<10),
4903 UPDATE_COEF(0x49, 3<<8, 0<<8),
4904 UPDATE_COEF(0x4a, 3<<4, 3<<4),
4905 UPDATE_COEF(0x63, 3<<14, 0),
4906 UPDATE_COEF(0x67, 0xf000, 0x3000),
4909 static const struct coef_fw coef0255
[] = {
4910 WRITE_COEF(0x45, 0xc089),
4911 WRITE_COEF(0x45, 0xc489),
4912 WRITE_COEFEX(0x57, 0x03, 0x8ea6),
4913 WRITE_COEF(0x49, 0x0049),
4916 static const struct coef_fw coef0256
[] = {
4917 WRITE_COEF(0x45, 0xc489),
4918 WRITE_COEFEX(0x57, 0x03, 0x0da3),
4919 WRITE_COEF(0x49, 0x0049),
4920 UPDATE_COEFEX(0x57, 0x05, 1<<14, 0), /* Direct Drive HP Amp control(Set to verb control)*/
4921 WRITE_COEF(0x06, 0x6100),
4924 static const struct coef_fw coef0233
[] = {
4925 WRITE_COEF(0x06, 0x2100),
4926 WRITE_COEF(0x32, 0x4ea3),
4929 static const struct coef_fw coef0288
[] = {
4930 UPDATE_COEF(0x4f, 0xfcc0, 0xc400), /* Set to TRS type */
4931 UPDATE_COEF(0x50, 0x2000, 0x2000),
4932 UPDATE_COEF(0x56, 0x0006, 0x0006),
4933 UPDATE_COEF(0x66, 0x0008, 0),
4934 UPDATE_COEF(0x67, 0x2000, 0),
4937 static const struct coef_fw coef0292
[] = {
4938 WRITE_COEF(0x76, 0x000e),
4939 WRITE_COEF(0x6c, 0x2400),
4940 WRITE_COEF(0x6b, 0xc429),
4941 WRITE_COEF(0x18, 0x7308),
4944 static const struct coef_fw coef0293
[] = {
4945 UPDATE_COEF(0x4a, 0x000f, 0x000e), /* Combo Jack auto detect */
4946 WRITE_COEF(0x45, 0xC429), /* Set to TRS type */
4947 UPDATE_COEF(0x1a, 1<<3, 0), /* Combo JD gating without LINE1-VREFO */
4950 static const struct coef_fw coef0688
[] = {
4951 WRITE_COEF(0x11, 0x0041),
4952 WRITE_COEF(0x15, 0x0d40),
4953 WRITE_COEF(0xb7, 0x802b),
4956 static const struct coef_fw coef0274
[] = {
4957 WRITE_COEF(0x45, 0x4289),
4958 UPDATE_COEF(0x4a, 0x0010, 0x0010),
4959 UPDATE_COEF(0x6b, 0x0f00, 0),
4960 UPDATE_COEF(0x49, 0x0300, 0x0300),
4964 switch (codec
->core
.vendor_id
) {
4971 alc_process_coef_fw(codec
, alc225_pre_hsmode
);
4972 alc_process_coef_fw(codec
, coef0225
);
4975 alc_process_coef_fw(codec
, coef0255
);
4979 alc_write_coef_idx(codec
, 0x1b, 0x0e4b);
4980 alc_write_coef_idx(codec
, 0x45, 0xc089);
4982 alc_process_coef_fw(codec
, coef0256
);
4987 alc_process_coef_fw(codec
, coef0274
);
4991 alc_process_coef_fw(codec
, coef0233
);
4996 alc_process_coef_fw(codec
, coef0288
);
4999 alc_process_coef_fw(codec
, coef0292
);
5002 alc_process_coef_fw(codec
, coef0293
);
5005 alc_process_coef_fw(codec
, coef0688
);
5008 alc_update_coefex_idx(codec
, 0x57, 0x5, 1<<14, 0);
5011 codec_dbg(codec
, "Headset jack set to headphone (default) mode.\n");
5015 static void alc_headset_mode_ctia(struct hda_codec
*codec
)
5019 static const struct coef_fw coef0255
[] = {
5020 WRITE_COEF(0x45, 0xd489), /* Set to CTIA type */
5021 WRITE_COEF(0x1b, 0x0c2b),
5022 WRITE_COEFEX(0x57, 0x03, 0x8ea6),
5025 static const struct coef_fw coef0256
[] = {
5026 WRITE_COEF(0x45, 0xd489), /* Set to CTIA type */
5027 WRITE_COEF(0x1b, 0x0e6b),
5030 static const struct coef_fw coef0233
[] = {
5031 WRITE_COEF(0x45, 0xd429),
5032 WRITE_COEF(0x1b, 0x0c2b),
5033 WRITE_COEF(0x32, 0x4ea3),
5036 static const struct coef_fw coef0288
[] = {
5037 UPDATE_COEF(0x50, 0x2000, 0x2000),
5038 UPDATE_COEF(0x56, 0x0006, 0x0006),
5039 UPDATE_COEF(0x66, 0x0008, 0),
5040 UPDATE_COEF(0x67, 0x2000, 0),
5043 static const struct coef_fw coef0292
[] = {
5044 WRITE_COEF(0x6b, 0xd429),
5045 WRITE_COEF(0x76, 0x0008),
5046 WRITE_COEF(0x18, 0x7388),
5049 static const struct coef_fw coef0293
[] = {
5050 WRITE_COEF(0x45, 0xd429), /* Set to ctia type */
5051 UPDATE_COEF(0x10, 7<<8, 7<<8), /* SET Line1 JD to 1 */
5054 static const struct coef_fw coef0688
[] = {
5055 WRITE_COEF(0x11, 0x0001),
5056 WRITE_COEF(0x15, 0x0d60),
5057 WRITE_COEF(0xc3, 0x0000),
5060 static const struct coef_fw coef0225_1
[] = {
5061 UPDATE_COEF(0x45, 0x3f<<10, 0x35<<10),
5062 UPDATE_COEF(0x63, 3<<14, 2<<14),
5065 static const struct coef_fw coef0225_2
[] = {
5066 UPDATE_COEF(0x45, 0x3f<<10, 0x35<<10),
5067 UPDATE_COEF(0x63, 3<<14, 1<<14),
5071 switch (codec
->core
.vendor_id
) {
5073 alc_process_coef_fw(codec
, coef0255
);
5077 alc_process_coef_fw(codec
, coef0256
);
5082 alc_write_coef_idx(codec
, 0x45, 0xd689);
5086 alc_process_coef_fw(codec
, coef0233
);
5089 val
= alc_read_coef_idx(codec
, 0x50);
5090 if (val
& (1 << 12)) {
5091 alc_update_coef_idx(codec
, 0x8e, 0x0070, 0x0020);
5092 alc_update_coef_idx(codec
, 0x4f, 0xfcc0, 0xd400);
5095 alc_update_coef_idx(codec
, 0x8e, 0x0070, 0x0010);
5096 alc_update_coef_idx(codec
, 0x4f, 0xfcc0, 0xd400);
5102 alc_update_coef_idx(codec
, 0x4f, 0xfcc0, 0xd400);
5104 alc_process_coef_fw(codec
, coef0288
);
5107 alc_process_coef_fw(codec
, coef0292
);
5110 alc_process_coef_fw(codec
, coef0293
);
5113 alc_process_coef_fw(codec
, coef0688
);
5121 val
= alc_read_coef_idx(codec
, 0x45);
5123 alc_process_coef_fw(codec
, coef0225_2
);
5125 alc_process_coef_fw(codec
, coef0225_1
);
5128 alc_update_coefex_idx(codec
, 0x57, 0x5, 1<<14, 0);
5131 codec_dbg(codec
, "Headset jack set to iPhone-style headset mode.\n");
5135 static void alc_headset_mode_omtp(struct hda_codec
*codec
)
5137 static const struct coef_fw coef0255
[] = {
5138 WRITE_COEF(0x45, 0xe489), /* Set to OMTP Type */
5139 WRITE_COEF(0x1b, 0x0c2b),
5140 WRITE_COEFEX(0x57, 0x03, 0x8ea6),
5143 static const struct coef_fw coef0256
[] = {
5144 WRITE_COEF(0x45, 0xe489), /* Set to OMTP Type */
5145 WRITE_COEF(0x1b, 0x0e6b),
5148 static const struct coef_fw coef0233
[] = {
5149 WRITE_COEF(0x45, 0xe429),
5150 WRITE_COEF(0x1b, 0x0c2b),
5151 WRITE_COEF(0x32, 0x4ea3),
5154 static const struct coef_fw coef0288
[] = {
5155 UPDATE_COEF(0x50, 0x2000, 0x2000),
5156 UPDATE_COEF(0x56, 0x0006, 0x0006),
5157 UPDATE_COEF(0x66, 0x0008, 0),
5158 UPDATE_COEF(0x67, 0x2000, 0),
5161 static const struct coef_fw coef0292
[] = {
5162 WRITE_COEF(0x6b, 0xe429),
5163 WRITE_COEF(0x76, 0x0008),
5164 WRITE_COEF(0x18, 0x7388),
5167 static const struct coef_fw coef0293
[] = {
5168 WRITE_COEF(0x45, 0xe429), /* Set to omtp type */
5169 UPDATE_COEF(0x10, 7<<8, 7<<8), /* SET Line1 JD to 1 */
5172 static const struct coef_fw coef0688
[] = {
5173 WRITE_COEF(0x11, 0x0001),
5174 WRITE_COEF(0x15, 0x0d50),
5175 WRITE_COEF(0xc3, 0x0000),
5178 static const struct coef_fw coef0225
[] = {
5179 UPDATE_COEF(0x45, 0x3f<<10, 0x39<<10),
5180 UPDATE_COEF(0x63, 3<<14, 2<<14),
5184 switch (codec
->core
.vendor_id
) {
5186 alc_process_coef_fw(codec
, coef0255
);
5190 alc_process_coef_fw(codec
, coef0256
);
5195 alc_write_coef_idx(codec
, 0x45, 0xe689);
5199 alc_process_coef_fw(codec
, coef0233
);
5202 alc_update_coef_idx(codec
, 0x8e, 0x0070, 0x0010);/* Headset output enable */
5203 alc_update_coef_idx(codec
, 0x4f, 0xfcc0, 0xe400);
5208 alc_update_coef_idx(codec
, 0x4f, 0xfcc0, 0xe400);
5210 alc_process_coef_fw(codec
, coef0288
);
5213 alc_process_coef_fw(codec
, coef0292
);
5216 alc_process_coef_fw(codec
, coef0293
);
5219 alc_process_coef_fw(codec
, coef0688
);
5227 alc_process_coef_fw(codec
, coef0225
);
5230 codec_dbg(codec
, "Headset jack set to Nokia-style headset mode.\n");
5233 static void alc_determine_headset_type(struct hda_codec
*codec
)
5236 bool is_ctia
= false;
5237 struct alc_spec
*spec
= codec
->spec
;
5238 static const struct coef_fw coef0255
[] = {
5239 WRITE_COEF(0x45, 0xd089), /* combo jack auto switch control(Check type)*/
5240 WRITE_COEF(0x49, 0x0149), /* combo jack auto switch control(Vref
5244 static const struct coef_fw coef0288
[] = {
5245 UPDATE_COEF(0x4f, 0xfcc0, 0xd400), /* Check Type */
5248 static const struct coef_fw coef0298
[] = {
5249 UPDATE_COEF(0x50, 0x2000, 0x2000),
5250 UPDATE_COEF(0x56, 0x0006, 0x0006),
5251 UPDATE_COEF(0x66, 0x0008, 0),
5252 UPDATE_COEF(0x67, 0x2000, 0),
5253 UPDATE_COEF(0x19, 0x1300, 0x1300),
5256 static const struct coef_fw coef0293
[] = {
5257 UPDATE_COEF(0x4a, 0x000f, 0x0008), /* Combo Jack auto detect */
5258 WRITE_COEF(0x45, 0xD429), /* Set to ctia type */
5261 static const struct coef_fw coef0688
[] = {
5262 WRITE_COEF(0x11, 0x0001),
5263 WRITE_COEF(0xb7, 0x802b),
5264 WRITE_COEF(0x15, 0x0d60),
5265 WRITE_COEF(0xc3, 0x0c00),
5268 static const struct coef_fw coef0274
[] = {
5269 UPDATE_COEF(0x4a, 0x0010, 0),
5270 UPDATE_COEF(0x4a, 0x8000, 0),
5271 WRITE_COEF(0x45, 0xd289),
5272 UPDATE_COEF(0x49, 0x0300, 0x0300),
5276 if (spec
->no_internal_mic_pin
) {
5277 alc_update_coef_idx(codec
, 0x45, 0xf<<12 | 1<<10, 5<<12);
5281 switch (codec
->core
.vendor_id
) {
5283 alc_process_coef_fw(codec
, coef0255
);
5285 val
= alc_read_coef_idx(codec
, 0x46);
5286 is_ctia
= (val
& 0x0070) == 0x0070;
5290 alc_write_coef_idx(codec
, 0x1b, 0x0e4b);
5291 alc_write_coef_idx(codec
, 0x06, 0x6104);
5292 alc_write_coefex_idx(codec
, 0x57, 0x3, 0x09a3);
5294 snd_hda_codec_write(codec
, 0x21, 0,
5295 AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_MUTE
);
5297 snd_hda_codec_write(codec
, 0x21, 0,
5298 AC_VERB_SET_PIN_WIDGET_CONTROL
, 0x0);
5300 alc_process_coef_fw(codec
, coef0255
);
5302 val
= alc_read_coef_idx(codec
, 0x46);
5303 is_ctia
= (val
& 0x0070) == 0x0070;
5305 alc_write_coefex_idx(codec
, 0x57, 0x3, 0x0da3);
5306 alc_update_coefex_idx(codec
, 0x57, 0x5, 1<<14, 0);
5308 snd_hda_codec_write(codec
, 0x21, 0,
5309 AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_OUT
);
5311 snd_hda_codec_write(codec
, 0x21, 0,
5312 AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_UNMUTE
);
5317 alc_process_coef_fw(codec
, coef0274
);
5319 val
= alc_read_coef_idx(codec
, 0x46);
5320 is_ctia
= (val
& 0x00f0) == 0x00f0;
5324 alc_write_coef_idx(codec
, 0x45, 0xd029);
5326 val
= alc_read_coef_idx(codec
, 0x46);
5327 is_ctia
= (val
& 0x0070) == 0x0070;
5330 snd_hda_codec_write(codec
, 0x21, 0,
5331 AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_MUTE
);
5333 snd_hda_codec_write(codec
, 0x21, 0,
5334 AC_VERB_SET_PIN_WIDGET_CONTROL
, 0x0);
5337 val
= alc_read_coef_idx(codec
, 0x50);
5338 if (val
& (1 << 12)) {
5339 alc_update_coef_idx(codec
, 0x8e, 0x0070, 0x0020);
5340 alc_process_coef_fw(codec
, coef0288
);
5342 val
= alc_read_coef_idx(codec
, 0x50);
5343 is_ctia
= (val
& 0x0070) == 0x0070;
5345 alc_update_coef_idx(codec
, 0x8e, 0x0070, 0x0010);
5346 alc_process_coef_fw(codec
, coef0288
);
5348 val
= alc_read_coef_idx(codec
, 0x50);
5349 is_ctia
= (val
& 0x0070) == 0x0070;
5351 alc_process_coef_fw(codec
, coef0298
);
5352 snd_hda_codec_write(codec
, 0x21, 0,
5353 AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_HP
);
5355 snd_hda_codec_write(codec
, 0x21, 0,
5356 AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_UNMUTE
);
5360 alc_process_coef_fw(codec
, coef0288
);
5362 val
= alc_read_coef_idx(codec
, 0x50);
5363 is_ctia
= (val
& 0x0070) == 0x0070;
5366 alc_write_coef_idx(codec
, 0x6b, 0xd429);
5368 val
= alc_read_coef_idx(codec
, 0x6c);
5369 is_ctia
= (val
& 0x001c) == 0x001c;
5372 alc_process_coef_fw(codec
, coef0293
);
5374 val
= alc_read_coef_idx(codec
, 0x46);
5375 is_ctia
= (val
& 0x0070) == 0x0070;
5378 alc_process_coef_fw(codec
, coef0688
);
5380 val
= alc_read_coef_idx(codec
, 0xbe);
5381 is_ctia
= (val
& 0x1c02) == 0x1c02;
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
, alc225_pre_hsmode
);
5396 alc_update_coef_idx(codec
, 0x67, 0xf000, 0x1000);
5397 val
= alc_read_coef_idx(codec
, 0x45);
5398 if (val
& (1 << 9)) {
5399 alc_update_coef_idx(codec
, 0x45, 0x3f<<10, 0x34<<10);
5400 alc_update_coef_idx(codec
, 0x49, 3<<8, 2<<8);
5402 val
= alc_read_coef_idx(codec
, 0x46);
5403 is_ctia
= (val
& 0x00f0) == 0x00f0;
5405 alc_update_coef_idx(codec
, 0x45, 0x3f<<10, 0x34<<10);
5406 alc_update_coef_idx(codec
, 0x49, 3<<8, 1<<8);
5408 val
= alc_read_coef_idx(codec
, 0x46);
5409 is_ctia
= (val
& 0x00f0) == 0x00f0;
5411 alc_update_coef_idx(codec
, 0x4a, 7<<6, 7<<6);
5412 alc_update_coef_idx(codec
, 0x4a, 3<<4, 3<<4);
5413 alc_update_coef_idx(codec
, 0x67, 0xf000, 0x3000);
5415 snd_hda_codec_write(codec
, 0x21, 0,
5416 AC_VERB_SET_PIN_WIDGET_CONTROL
, PIN_OUT
);
5418 snd_hda_codec_write(codec
, 0x21, 0,
5419 AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_UNMUTE
);
5426 codec_dbg(codec
, "Headset jack detected iPhone-style headset: %s\n",
5427 is_ctia
? "yes" : "no");
5428 spec
->current_headset_type
= is_ctia
? ALC_HEADSET_TYPE_CTIA
: ALC_HEADSET_TYPE_OMTP
;
5431 static void alc_update_headset_mode(struct hda_codec
*codec
)
5433 struct alc_spec
*spec
= codec
->spec
;
5435 hda_nid_t mux_pin
= spec
->gen
.imux_pins
[spec
->gen
.cur_mux
[0]];
5436 hda_nid_t hp_pin
= alc_get_hp_pin(spec
);
5438 int new_headset_mode
;
5440 if (!snd_hda_jack_detect(codec
, hp_pin
))
5441 new_headset_mode
= ALC_HEADSET_MODE_UNPLUGGED
;
5442 else if (mux_pin
== spec
->headset_mic_pin
)
5443 new_headset_mode
= ALC_HEADSET_MODE_HEADSET
;
5444 else if (mux_pin
== spec
->headphone_mic_pin
)
5445 new_headset_mode
= ALC_HEADSET_MODE_MIC
;
5447 new_headset_mode
= ALC_HEADSET_MODE_HEADPHONE
;
5449 if (new_headset_mode
== spec
->current_headset_mode
) {
5450 snd_hda_gen_update_outputs(codec
);
5454 switch (new_headset_mode
) {
5455 case ALC_HEADSET_MODE_UNPLUGGED
:
5456 alc_headset_mode_unplugged(codec
);
5457 spec
->current_headset_mode
= ALC_HEADSET_MODE_UNKNOWN
;
5458 spec
->current_headset_type
= ALC_HEADSET_TYPE_UNKNOWN
;
5459 spec
->gen
.hp_jack_present
= false;
5461 case ALC_HEADSET_MODE_HEADSET
:
5462 if (spec
->current_headset_type
== ALC_HEADSET_TYPE_UNKNOWN
)
5463 alc_determine_headset_type(codec
);
5464 if (spec
->current_headset_type
== ALC_HEADSET_TYPE_CTIA
)
5465 alc_headset_mode_ctia(codec
);
5466 else if (spec
->current_headset_type
== ALC_HEADSET_TYPE_OMTP
)
5467 alc_headset_mode_omtp(codec
);
5468 spec
->gen
.hp_jack_present
= true;
5470 case ALC_HEADSET_MODE_MIC
:
5471 alc_headset_mode_mic_in(codec
, hp_pin
, spec
->headphone_mic_pin
);
5472 spec
->gen
.hp_jack_present
= false;
5474 case ALC_HEADSET_MODE_HEADPHONE
:
5475 alc_headset_mode_default(codec
);
5476 spec
->gen
.hp_jack_present
= true;
5479 if (new_headset_mode
!= ALC_HEADSET_MODE_MIC
) {
5480 snd_hda_set_pin_ctl_cache(codec
, hp_pin
,
5481 AC_PINCTL_OUT_EN
| AC_PINCTL_HP_EN
);
5482 if (spec
->headphone_mic_pin
&& spec
->headphone_mic_pin
!= hp_pin
)
5483 snd_hda_set_pin_ctl_cache(codec
, spec
->headphone_mic_pin
,
5486 spec
->current_headset_mode
= new_headset_mode
;
5488 snd_hda_gen_update_outputs(codec
);
5491 static void alc_update_headset_mode_hook(struct hda_codec
*codec
,
5492 struct snd_kcontrol
*kcontrol
,
5493 struct snd_ctl_elem_value
*ucontrol
)
5495 alc_update_headset_mode(codec
);
5498 static void alc_update_headset_jack_cb(struct hda_codec
*codec
,
5499 struct hda_jack_callback
*jack
)
5501 snd_hda_gen_hp_automute(codec
, jack
);
5502 alc_update_headset_mode(codec
);
5505 static void alc_probe_headset_mode(struct hda_codec
*codec
)
5508 struct alc_spec
*spec
= codec
->spec
;
5509 struct auto_pin_cfg
*cfg
= &spec
->gen
.autocfg
;
5512 for (i
= 0; i
< cfg
->num_inputs
; i
++) {
5513 if (cfg
->inputs
[i
].is_headset_mic
&& !spec
->headset_mic_pin
)
5514 spec
->headset_mic_pin
= cfg
->inputs
[i
].pin
;
5515 if (cfg
->inputs
[i
].is_headphone_mic
&& !spec
->headphone_mic_pin
)
5516 spec
->headphone_mic_pin
= cfg
->inputs
[i
].pin
;
5519 WARN_ON(spec
->gen
.cap_sync_hook
);
5520 spec
->gen
.cap_sync_hook
= alc_update_headset_mode_hook
;
5521 spec
->gen
.automute_hook
= alc_update_headset_mode
;
5522 spec
->gen
.hp_automute_hook
= alc_update_headset_jack_cb
;
5525 static void alc_fixup_headset_mode(struct hda_codec
*codec
,
5526 const struct hda_fixup
*fix
, int action
)
5528 struct alc_spec
*spec
= codec
->spec
;
5531 case HDA_FIXUP_ACT_PRE_PROBE
:
5532 spec
->parse_flags
|= HDA_PINCFG_HEADSET_MIC
| HDA_PINCFG_HEADPHONE_MIC
;
5534 case HDA_FIXUP_ACT_PROBE
:
5535 alc_probe_headset_mode(codec
);
5537 case HDA_FIXUP_ACT_INIT
:
5538 if (is_s3_resume(codec
) || is_s4_resume(codec
)) {
5539 spec
->current_headset_mode
= ALC_HEADSET_MODE_UNKNOWN
;
5540 spec
->current_headset_type
= ALC_HEADSET_TYPE_UNKNOWN
;
5542 alc_update_headset_mode(codec
);
5547 static void alc_fixup_headset_mode_no_hp_mic(struct hda_codec
*codec
,
5548 const struct hda_fixup
*fix
, int action
)
5550 if (action
== HDA_FIXUP_ACT_PRE_PROBE
) {
5551 struct alc_spec
*spec
= codec
->spec
;
5552 spec
->parse_flags
|= HDA_PINCFG_HEADSET_MIC
;
5555 alc_fixup_headset_mode(codec
, fix
, action
);
5558 static void alc255_set_default_jack_type(struct hda_codec
*codec
)
5560 /* Set to iphone type */
5561 static const struct coef_fw alc255fw
[] = {
5562 WRITE_COEF(0x1b, 0x880b),
5563 WRITE_COEF(0x45, 0xd089),
5564 WRITE_COEF(0x1b, 0x080b),
5565 WRITE_COEF(0x46, 0x0004),
5566 WRITE_COEF(0x1b, 0x0c0b),
5569 static const struct coef_fw alc256fw
[] = {
5570 WRITE_COEF(0x1b, 0x884b),
5571 WRITE_COEF(0x45, 0xd089),
5572 WRITE_COEF(0x1b, 0x084b),
5573 WRITE_COEF(0x46, 0x0004),
5574 WRITE_COEF(0x1b, 0x0c4b),
5577 switch (codec
->core
.vendor_id
) {
5579 alc_process_coef_fw(codec
, alc255fw
);
5583 alc_process_coef_fw(codec
, alc256fw
);
5589 static void alc_fixup_headset_mode_alc255(struct hda_codec
*codec
,
5590 const struct hda_fixup
*fix
, int action
)
5592 if (action
== HDA_FIXUP_ACT_PRE_PROBE
) {
5593 alc255_set_default_jack_type(codec
);
5595 alc_fixup_headset_mode(codec
, fix
, action
);
5598 static void alc_fixup_headset_mode_alc255_no_hp_mic(struct hda_codec
*codec
,
5599 const struct hda_fixup
*fix
, int action
)
5601 if (action
== HDA_FIXUP_ACT_PRE_PROBE
) {
5602 struct alc_spec
*spec
= codec
->spec
;
5603 spec
->parse_flags
|= HDA_PINCFG_HEADSET_MIC
;
5604 alc255_set_default_jack_type(codec
);
5607 alc_fixup_headset_mode(codec
, fix
, action
);
5610 static void alc288_update_headset_jack_cb(struct hda_codec
*codec
,
5611 struct hda_jack_callback
*jack
)
5613 struct alc_spec
*spec
= codec
->spec
;
5615 alc_update_headset_jack_cb(codec
, jack
);
5616 /* Headset Mic enable or disable, only for Dell Dino */
5617 alc_update_gpio_data(codec
, 0x40, spec
->gen
.hp_jack_present
);
5620 static void alc_fixup_headset_mode_dell_alc288(struct hda_codec
*codec
,
5621 const struct hda_fixup
*fix
, int action
)
5623 alc_fixup_headset_mode(codec
, fix
, action
);
5624 if (action
== HDA_FIXUP_ACT_PROBE
) {
5625 struct alc_spec
*spec
= codec
->spec
;
5626 /* toggled via hp_automute_hook */
5627 spec
->gpio_mask
|= 0x40;
5628 spec
->gpio_dir
|= 0x40;
5629 spec
->gen
.hp_automute_hook
= alc288_update_headset_jack_cb
;
5633 static void alc_fixup_auto_mute_via_amp(struct hda_codec
*codec
,
5634 const struct hda_fixup
*fix
, int action
)
5636 if (action
== HDA_FIXUP_ACT_PRE_PROBE
) {
5637 struct alc_spec
*spec
= codec
->spec
;
5638 spec
->gen
.auto_mute_via_amp
= 1;
5642 static void alc_fixup_no_shutup(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
->no_shutup_pins
= 1;
5651 static void alc_fixup_disable_aamix(struct hda_codec
*codec
,
5652 const struct hda_fixup
*fix
, int action
)
5654 if (action
== HDA_FIXUP_ACT_PRE_PROBE
) {
5655 struct alc_spec
*spec
= codec
->spec
;
5656 /* Disable AA-loopback as it causes white noise */
5657 spec
->gen
.mixer_nid
= 0;
5661 /* fixup for Thinkpad docks: add dock pins, avoid HP parser fixup */
5662 static void alc_fixup_tpt440_dock(struct hda_codec
*codec
,
5663 const struct hda_fixup
*fix
, int action
)
5665 static const struct hda_pintbl pincfgs
[] = {
5666 { 0x16, 0x21211010 }, /* dock headphone */
5667 { 0x19, 0x21a11010 }, /* dock mic */
5670 struct alc_spec
*spec
= codec
->spec
;
5672 if (action
== HDA_FIXUP_ACT_PRE_PROBE
) {
5673 spec
->reboot_notify
= snd_hda_gen_reboot_notify
; /* reduce noise */
5674 spec
->parse_flags
= HDA_PINCFG_NO_HP_FIXUP
;
5675 codec
->power_save_node
= 0; /* avoid click noises */
5676 snd_hda_apply_pincfgs(codec
, pincfgs
);
5680 static void alc_fixup_tpt470_dock(struct hda_codec
*codec
,
5681 const struct hda_fixup
*fix
, int action
)
5683 static const struct hda_pintbl pincfgs
[] = {
5684 { 0x17, 0x21211010 }, /* dock headphone */
5685 { 0x19, 0x21a11010 }, /* dock mic */
5688 struct alc_spec
*spec
= codec
->spec
;
5690 if (action
== HDA_FIXUP_ACT_PRE_PROBE
) {
5691 spec
->parse_flags
= HDA_PINCFG_NO_HP_FIXUP
;
5692 snd_hda_apply_pincfgs(codec
, pincfgs
);
5693 } else if (action
== HDA_FIXUP_ACT_INIT
) {
5694 /* Enable DOCK device */
5695 snd_hda_codec_write(codec
, 0x17, 0,
5696 AC_VERB_SET_CONFIG_DEFAULT_BYTES_3
, 0);
5697 /* Enable DOCK device */
5698 snd_hda_codec_write(codec
, 0x19, 0,
5699 AC_VERB_SET_CONFIG_DEFAULT_BYTES_3
, 0);
5703 static void alc_fixup_tpt470_dacs(struct hda_codec
*codec
,
5704 const struct hda_fixup
*fix
, int action
)
5706 /* Assure the speaker pin to be coupled with DAC NID 0x03; otherwise
5707 * the speaker output becomes too low by some reason on Thinkpads with
5710 static const hda_nid_t preferred_pairs
[] = {
5711 0x14, 0x03, 0x17, 0x02, 0x21, 0x02,
5714 struct alc_spec
*spec
= codec
->spec
;
5716 if (action
== HDA_FIXUP_ACT_PRE_PROBE
)
5717 spec
->gen
.preferred_dacs
= preferred_pairs
;
5720 static void alc_shutup_dell_xps13(struct hda_codec
*codec
)
5722 struct alc_spec
*spec
= codec
->spec
;
5723 int hp_pin
= alc_get_hp_pin(spec
);
5725 /* Prevent pop noises when headphones are plugged in */
5726 snd_hda_codec_write(codec
, hp_pin
, 0,
5727 AC_VERB_SET_AMP_GAIN_MUTE
, AMP_OUT_MUTE
);
5731 static void alc_fixup_dell_xps13(struct hda_codec
*codec
,
5732 const struct hda_fixup
*fix
, int action
)
5734 struct alc_spec
*spec
= codec
->spec
;
5735 struct hda_input_mux
*imux
= &spec
->gen
.input_mux
;
5739 case HDA_FIXUP_ACT_PRE_PROBE
:
5740 /* mic pin 0x19 must be initialized with Vref Hi-Z, otherwise
5741 * it causes a click noise at start up
5743 snd_hda_codec_set_pin_target(codec
, 0x19, PIN_VREFHIZ
);
5744 spec
->shutup
= alc_shutup_dell_xps13
;
5746 case HDA_FIXUP_ACT_PROBE
:
5747 /* Make the internal mic the default input source. */
5748 for (i
= 0; i
< imux
->num_items
; i
++) {
5749 if (spec
->gen
.imux_pins
[i
] == 0x12) {
5750 spec
->gen
.cur_mux
[0] = i
;
5758 static void alc_fixup_headset_mode_alc662(struct hda_codec
*codec
,
5759 const struct hda_fixup
*fix
, int action
)
5761 struct alc_spec
*spec
= codec
->spec
;
5763 if (action
== HDA_FIXUP_ACT_PRE_PROBE
) {
5764 spec
->parse_flags
|= HDA_PINCFG_HEADSET_MIC
;
5765 spec
->gen
.hp_mic
= 1; /* Mic-in is same pin as headphone */
5767 /* Disable boost for mic-in permanently. (This code is only called
5768 from quirks that guarantee that the headphone is at NID 0x1b.) */
5769 snd_hda_codec_write(codec
, 0x1b, 0, AC_VERB_SET_AMP_GAIN_MUTE
, 0x7000);
5770 snd_hda_override_wcaps(codec
, 0x1b, get_wcaps(codec
, 0x1b) & ~AC_WCAP_IN_AMP
);
5772 alc_fixup_headset_mode(codec
, fix
, action
);
5775 static void alc_fixup_headset_mode_alc668(struct hda_codec
*codec
,
5776 const struct hda_fixup
*fix
, int action
)
5778 if (action
== HDA_FIXUP_ACT_PRE_PROBE
) {
5779 alc_write_coef_idx(codec
, 0xc4, 0x8000);
5780 alc_update_coef_idx(codec
, 0xc2, ~0xfe, 0);
5781 snd_hda_set_pin_ctl_cache(codec
, 0x18, 0);
5783 alc_fixup_headset_mode(codec
, fix
, action
);
5786 /* Returns the nid of the external mic input pin, or 0 if it cannot be found. */
5787 static int find_ext_mic_pin(struct hda_codec
*codec
)
5789 struct alc_spec
*spec
= codec
->spec
;
5790 struct auto_pin_cfg
*cfg
= &spec
->gen
.autocfg
;
5792 unsigned int defcfg
;
5795 for (i
= 0; i
< cfg
->num_inputs
; i
++) {
5796 if (cfg
->inputs
[i
].type
!= AUTO_PIN_MIC
)
5798 nid
= cfg
->inputs
[i
].pin
;
5799 defcfg
= snd_hda_codec_get_pincfg(codec
, nid
);
5800 if (snd_hda_get_input_pin_attr(defcfg
) == INPUT_PIN_ATTR_INT
)
5808 static void alc271_hp_gate_mic_jack(struct hda_codec
*codec
,
5809 const struct hda_fixup
*fix
,
5812 struct alc_spec
*spec
= codec
->spec
;
5814 if (action
== HDA_FIXUP_ACT_PROBE
) {
5815 int mic_pin
= find_ext_mic_pin(codec
);
5816 int hp_pin
= alc_get_hp_pin(spec
);
5818 if (snd_BUG_ON(!mic_pin
|| !hp_pin
))
5820 snd_hda_jack_set_gating_jack(codec
, mic_pin
, hp_pin
);
5824 static void alc269_fixup_limit_int_mic_boost(struct hda_codec
*codec
,
5825 const struct hda_fixup
*fix
,
5828 struct alc_spec
*spec
= codec
->spec
;
5829 struct auto_pin_cfg
*cfg
= &spec
->gen
.autocfg
;
5832 /* The mic boosts on level 2 and 3 are too noisy
5833 on the internal mic input.
5834 Therefore limit the boost to 0 or 1. */
5836 if (action
!= HDA_FIXUP_ACT_PROBE
)
5839 for (i
= 0; i
< cfg
->num_inputs
; i
++) {
5840 hda_nid_t nid
= cfg
->inputs
[i
].pin
;
5841 unsigned int defcfg
;
5842 if (cfg
->inputs
[i
].type
!= AUTO_PIN_MIC
)
5844 defcfg
= snd_hda_codec_get_pincfg(codec
, nid
);
5845 if (snd_hda_get_input_pin_attr(defcfg
) != INPUT_PIN_ATTR_INT
)
5848 snd_hda_override_amp_caps(codec
, nid
, HDA_INPUT
,
5849 (0x00 << AC_AMPCAP_OFFSET_SHIFT
) |
5850 (0x01 << AC_AMPCAP_NUM_STEPS_SHIFT
) |
5851 (0x2f << AC_AMPCAP_STEP_SIZE_SHIFT
) |
5852 (0 << AC_AMPCAP_MUTE_SHIFT
));
5856 static void alc283_hp_automute_hook(struct hda_codec
*codec
,
5857 struct hda_jack_callback
*jack
)
5859 struct alc_spec
*spec
= codec
->spec
;
5863 snd_hda_gen_hp_automute(codec
, jack
);
5865 vref
= spec
->gen
.hp_jack_present
? PIN_VREF80
: 0;
5868 snd_hda_codec_write(codec
, 0x19, 0, AC_VERB_SET_PIN_WIDGET_CONTROL
,
5872 static void alc283_fixup_chromebook(struct hda_codec
*codec
,
5873 const struct hda_fixup
*fix
, int action
)
5875 struct alc_spec
*spec
= codec
->spec
;
5878 case HDA_FIXUP_ACT_PRE_PROBE
:
5879 snd_hda_override_wcaps(codec
, 0x03, 0);
5880 /* Disable AA-loopback as it causes white noise */
5881 spec
->gen
.mixer_nid
= 0;
5883 case HDA_FIXUP_ACT_INIT
:
5884 /* MIC2-VREF control */
5885 /* Set to manual mode */
5886 alc_update_coef_idx(codec
, 0x06, 0x000c, 0);
5887 /* Enable Line1 input control by verb */
5888 alc_update_coef_idx(codec
, 0x1a, 0, 1 << 4);
5893 static void alc283_fixup_sense_combo_jack(struct hda_codec
*codec
,
5894 const struct hda_fixup
*fix
, int action
)
5896 struct alc_spec
*spec
= codec
->spec
;
5899 case HDA_FIXUP_ACT_PRE_PROBE
:
5900 spec
->gen
.hp_automute_hook
= alc283_hp_automute_hook
;
5902 case HDA_FIXUP_ACT_INIT
:
5903 /* MIC2-VREF control */
5904 /* Set to manual mode */
5905 alc_update_coef_idx(codec
, 0x06, 0x000c, 0);
5910 /* mute tablet speaker pin (0x14) via dock plugging in addition */
5911 static void asus_tx300_automute(struct hda_codec
*codec
)
5913 struct alc_spec
*spec
= codec
->spec
;
5914 snd_hda_gen_update_outputs(codec
);
5915 if (snd_hda_jack_detect(codec
, 0x1b))
5916 spec
->gen
.mute_bits
|= (1ULL << 0x14);
5919 static void alc282_fixup_asus_tx300(struct hda_codec
*codec
,
5920 const struct hda_fixup
*fix
, int action
)
5922 struct alc_spec
*spec
= codec
->spec
;
5923 static const struct hda_pintbl dock_pins
[] = {
5924 { 0x1b, 0x21114000 }, /* dock speaker pin */
5929 case HDA_FIXUP_ACT_PRE_PROBE
:
5930 spec
->init_amp
= ALC_INIT_DEFAULT
;
5931 /* TX300 needs to set up GPIO2 for the speaker amp */
5932 alc_setup_gpio(codec
, 0x04);
5933 snd_hda_apply_pincfgs(codec
, dock_pins
);
5934 spec
->gen
.auto_mute_via_amp
= 1;
5935 spec
->gen
.automute_hook
= asus_tx300_automute
;
5936 snd_hda_jack_detect_enable_callback(codec
, 0x1b,
5937 snd_hda_gen_hp_automute
);
5939 case HDA_FIXUP_ACT_PROBE
:
5940 spec
->init_amp
= ALC_INIT_DEFAULT
;
5942 case HDA_FIXUP_ACT_BUILD
:
5943 /* this is a bit tricky; give more sane names for the main
5944 * (tablet) speaker and the dock speaker, respectively
5946 rename_ctl(codec
, "Speaker Playback Switch",
5947 "Dock Speaker Playback Switch");
5948 rename_ctl(codec
, "Bass Speaker Playback Switch",
5949 "Speaker Playback Switch");
5954 static void alc290_fixup_mono_speakers(struct hda_codec
*codec
,
5955 const struct hda_fixup
*fix
, int action
)
5957 if (action
== HDA_FIXUP_ACT_PRE_PROBE
) {
5958 /* DAC node 0x03 is giving mono output. We therefore want to
5959 make sure 0x14 (front speaker) and 0x15 (headphones) use the
5960 stereo DAC, while leaving 0x17 (bass speaker) for node 0x03. */
5961 static const hda_nid_t conn1
[] = { 0x0c };
5962 snd_hda_override_conn_list(codec
, 0x14, ARRAY_SIZE(conn1
), conn1
);
5963 snd_hda_override_conn_list(codec
, 0x15, ARRAY_SIZE(conn1
), conn1
);
5967 static void alc298_fixup_speaker_volume(struct hda_codec
*codec
,
5968 const struct hda_fixup
*fix
, int action
)
5970 if (action
== HDA_FIXUP_ACT_PRE_PROBE
) {
5971 /* The speaker is routed to the Node 0x06 by a mistake, as a result
5972 we can't adjust the speaker's volume since this node does not has
5973 Amp-out capability. we change the speaker's route to:
5974 Node 0x02 (Audio Output) -> Node 0x0c (Audio Mixer) -> Node 0x17 (
5975 Pin Complex), since Node 0x02 has Amp-out caps, we can adjust
5976 speaker's volume now. */
5978 static const hda_nid_t conn1
[] = { 0x0c };
5979 snd_hda_override_conn_list(codec
, 0x17, ARRAY_SIZE(conn1
), conn1
);
5983 /* disable DAC3 (0x06) selection on NID 0x17 as it has no volume amp control */
5984 static void alc295_fixup_disable_dac3(struct hda_codec
*codec
,
5985 const struct hda_fixup
*fix
, int action
)
5987 if (action
== HDA_FIXUP_ACT_PRE_PROBE
) {
5988 static const hda_nid_t conn
[] = { 0x02, 0x03 };
5989 snd_hda_override_conn_list(codec
, 0x17, ARRAY_SIZE(conn
), conn
);
5993 /* force NID 0x17 (Bass Speaker) to DAC1 to share it with the main speaker */
5994 static void alc285_fixup_speaker2_to_dac1(struct hda_codec
*codec
,
5995 const struct hda_fixup
*fix
, int action
)
5997 if (action
== HDA_FIXUP_ACT_PRE_PROBE
) {
5998 static const hda_nid_t conn
[] = { 0x02 };
5999 snd_hda_override_conn_list(codec
, 0x17, ARRAY_SIZE(conn
), conn
);
6003 /* Hook to update amp GPIO4 for automute */
6004 static void alc280_hp_gpio4_automute_hook(struct hda_codec
*codec
,
6005 struct hda_jack_callback
*jack
)
6007 struct alc_spec
*spec
= codec
->spec
;
6009 snd_hda_gen_hp_automute(codec
, jack
);
6010 /* mute_led_polarity is set to 0, so we pass inverted value here */
6011 alc_update_gpio_led(codec
, 0x10, spec
->mute_led_polarity
,
6012 !spec
->gen
.hp_jack_present
);
6015 /* Manage GPIOs for HP EliteBook Folio 9480m.
6017 * GPIO4 is the headphone amplifier power control
6018 * GPIO3 is the audio output mute indicator LED
6021 static void alc280_fixup_hp_9480m(struct hda_codec
*codec
,
6022 const struct hda_fixup
*fix
,
6025 struct alc_spec
*spec
= codec
->spec
;
6027 alc_fixup_hp_gpio_led(codec
, action
, 0x08, 0);
6028 if (action
== HDA_FIXUP_ACT_PRE_PROBE
) {
6029 /* amp at GPIO4; toggled via alc280_hp_gpio4_automute_hook() */
6030 spec
->gpio_mask
|= 0x10;
6031 spec
->gpio_dir
|= 0x10;
6032 spec
->gen
.hp_automute_hook
= alc280_hp_gpio4_automute_hook
;
6036 static void alc275_fixup_gpio4_off(struct hda_codec
*codec
,
6037 const struct hda_fixup
*fix
,
6040 struct alc_spec
*spec
= codec
->spec
;
6042 if (action
== HDA_FIXUP_ACT_PRE_PROBE
) {
6043 spec
->gpio_mask
|= 0x04;
6044 spec
->gpio_dir
|= 0x04;
6045 /* set data bit low */
6049 /* Quirk for Thinkpad X1 7th and 8th Gen
6050 * The following fixed routing needed
6051 * DAC1 (NID 0x02) -> Speaker (NID 0x14); some eq applied secretly
6052 * DAC2 (NID 0x03) -> Bass (NID 0x17) & Headphone (NID 0x21); sharing a DAC
6053 * DAC3 (NID 0x06) -> Unused, due to the lack of volume amp
6055 static void alc285_fixup_thinkpad_x1_gen7(struct hda_codec
*codec
,
6056 const struct hda_fixup
*fix
, int action
)
6058 static const hda_nid_t conn
[] = { 0x02, 0x03 }; /* exclude 0x06 */
6059 static const hda_nid_t preferred_pairs
[] = {
6060 0x14, 0x02, 0x17, 0x03, 0x21, 0x03, 0
6062 struct alc_spec
*spec
= codec
->spec
;
6065 case HDA_FIXUP_ACT_PRE_PROBE
:
6066 snd_hda_override_conn_list(codec
, 0x17, ARRAY_SIZE(conn
), conn
);
6067 spec
->gen
.preferred_dacs
= preferred_pairs
;
6069 case HDA_FIXUP_ACT_BUILD
:
6070 /* The generic parser creates somewhat unintuitive volume ctls
6071 * with the fixed routing above, and the shared DAC2 may be
6073 * Rename those to unique names so that PA doesn't touch them
6074 * and use only Master volume.
6076 rename_ctl(codec
, "Front Playback Volume", "DAC1 Playback Volume");
6077 rename_ctl(codec
, "Bass Speaker Playback Volume", "DAC2 Playback Volume");
6082 static void alc233_alc662_fixup_lenovo_dual_codecs(struct hda_codec
*codec
,
6083 const struct hda_fixup
*fix
,
6086 alc_fixup_dual_codecs(codec
, fix
, action
);
6088 case HDA_FIXUP_ACT_PRE_PROBE
:
6089 /* override card longname to provide a unique UCM profile */
6090 strcpy(codec
->card
->longname
, "HDAudio-Lenovo-DualCodecs");
6092 case HDA_FIXUP_ACT_BUILD
:
6093 /* rename Capture controls depending on the codec */
6094 rename_ctl(codec
, "Capture Volume",
6096 "Rear-Panel Capture Volume" :
6097 "Front-Panel Capture Volume");
6098 rename_ctl(codec
, "Capture Switch",
6100 "Rear-Panel Capture Switch" :
6101 "Front-Panel Capture Switch");
6106 static void alc225_fixup_s3_pop_noise(struct hda_codec
*codec
,
6107 const struct hda_fixup
*fix
, int action
)
6109 if (action
!= HDA_FIXUP_ACT_PRE_PROBE
)
6112 codec
->power_save_node
= 1;
6115 /* Forcibly assign NID 0x03 to HP/LO while NID 0x02 to SPK for EQ */
6116 static void alc274_fixup_bind_dacs(struct hda_codec
*codec
,
6117 const struct hda_fixup
*fix
, int action
)
6119 struct alc_spec
*spec
= codec
->spec
;
6120 static const hda_nid_t preferred_pairs
[] = {
6121 0x21, 0x03, 0x1b, 0x03, 0x16, 0x02,
6125 if (action
!= HDA_FIXUP_ACT_PRE_PROBE
)
6128 spec
->gen
.preferred_dacs
= preferred_pairs
;
6129 spec
->gen
.auto_mute_via_amp
= 1;
6130 codec
->power_save_node
= 0;
6133 /* avoid DAC 0x06 for bass speaker 0x17; it has no volume control */
6134 static void alc289_fixup_asus_ga401(struct hda_codec
*codec
,
6135 const struct hda_fixup
*fix
, int action
)
6137 static const hda_nid_t preferred_pairs
[] = {
6138 0x14, 0x02, 0x17, 0x02, 0x21, 0x03, 0
6140 struct alc_spec
*spec
= codec
->spec
;
6142 if (action
== HDA_FIXUP_ACT_PRE_PROBE
) {
6143 spec
->gen
.preferred_dacs
= preferred_pairs
;
6144 spec
->gen
.obey_preferred_dacs
= 1;
6148 /* The DAC of NID 0x3 will introduce click/pop noise on headphones, so invalidate it */
6149 static void alc285_fixup_invalidate_dacs(struct hda_codec
*codec
,
6150 const struct hda_fixup
*fix
, int action
)
6152 if (action
!= HDA_FIXUP_ACT_PRE_PROBE
)
6155 snd_hda_override_wcaps(codec
, 0x03, 0);
6158 static void alc_combo_jack_hp_jd_restart(struct hda_codec
*codec
)
6160 switch (codec
->core
.vendor_id
) {
6166 alc_update_coef_idx(codec
, 0x4a, 0x8000, 1 << 15); /* Reset HP JD */
6167 alc_update_coef_idx(codec
, 0x4a, 0x8000, 0 << 15);
6173 alc_update_coef_idx(codec
, 0x1b, 0x8000, 1 << 15); /* Reset HP JD */
6174 alc_update_coef_idx(codec
, 0x1b, 0x8000, 0 << 15);
6179 static void alc295_fixup_chromebook(struct hda_codec
*codec
,
6180 const struct hda_fixup
*fix
, int action
)
6182 struct alc_spec
*spec
= codec
->spec
;
6185 case HDA_FIXUP_ACT_PRE_PROBE
:
6186 spec
->ultra_low_power
= true;
6188 case HDA_FIXUP_ACT_INIT
:
6189 alc_combo_jack_hp_jd_restart(codec
);
6194 static void alc_fixup_disable_mic_vref(struct hda_codec
*codec
,
6195 const struct hda_fixup
*fix
, int action
)
6197 if (action
== HDA_FIXUP_ACT_PRE_PROBE
)
6198 snd_hda_codec_set_pin_target(codec
, 0x19, PIN_VREFHIZ
);
6202 static void alc294_gx502_toggle_output(struct hda_codec
*codec
,
6203 struct hda_jack_callback
*cb
)
6205 /* The Windows driver sets the codec up in a very different way where
6206 * it appears to leave 0x10 = 0x8a20 set. For Linux we need to toggle it
6208 if (snd_hda_jack_detect_state(codec
, 0x21) == HDA_JACK_PRESENT
)
6209 alc_write_coef_idx(codec
, 0x10, 0x8a20);
6211 alc_write_coef_idx(codec
, 0x10, 0x0a20);
6214 static void alc294_fixup_gx502_hp(struct hda_codec
*codec
,
6215 const struct hda_fixup
*fix
, int action
)
6217 /* Pin 0x21: headphones/headset mic */
6218 if (!is_jack_detectable(codec
, 0x21))
6222 case HDA_FIXUP_ACT_PRE_PROBE
:
6223 snd_hda_jack_detect_enable_callback(codec
, 0x21,
6224 alc294_gx502_toggle_output
);
6226 case HDA_FIXUP_ACT_INIT
:
6227 /* Make sure to start in a correct state, i.e. if
6228 * headphones have been plugged in before powering up the system
6230 alc294_gx502_toggle_output(codec
, NULL
);
6235 static void alc285_fixup_hp_gpio_amp_init(struct hda_codec
*codec
,
6236 const struct hda_fixup
*fix
, int action
)
6238 if (action
!= HDA_FIXUP_ACT_INIT
)
6242 alc_write_coef_idx(codec
, 0x65, 0x0);
6245 static void alc274_fixup_hp_headset_mic(struct hda_codec
*codec
,
6246 const struct hda_fixup
*fix
, int action
)
6249 case HDA_FIXUP_ACT_INIT
:
6250 alc_combo_jack_hp_jd_restart(codec
);
6255 static void alc_fixup_no_int_mic(struct hda_codec
*codec
,
6256 const struct hda_fixup
*fix
, int action
)
6258 struct alc_spec
*spec
= codec
->spec
;
6261 case HDA_FIXUP_ACT_PRE_PROBE
:
6262 /* Mic RING SLEEVE swap for combo jack */
6263 alc_update_coef_idx(codec
, 0x45, 0xf<<12 | 1<<10, 5<<12);
6264 spec
->no_internal_mic_pin
= true;
6266 case HDA_FIXUP_ACT_INIT
:
6267 alc_combo_jack_hp_jd_restart(codec
);
6272 /* for hda_fixup_thinkpad_acpi() */
6273 #include "thinkpad_helper.c"
6275 static void alc_fixup_thinkpad_acpi(struct hda_codec
*codec
,
6276 const struct hda_fixup
*fix
, int action
)
6278 alc_fixup_no_shutup(codec
, fix
, action
); /* reduce click noise */
6279 hda_fixup_thinkpad_acpi(codec
, fix
, action
);
6282 /* for alc295_fixup_hp_top_speakers */
6283 #include "hp_x360_helper.c"
6285 /* for alc285_fixup_ideapad_s740_coef() */
6286 #include "ideapad_s740_helper.c"
6290 ALC269_FIXUP_SONY_VAIO
,
6291 ALC275_FIXUP_SONY_VAIO_GPIO2
,
6292 ALC269_FIXUP_DELL_M101Z
,
6293 ALC269_FIXUP_SKU_IGNORE
,
6294 ALC269_FIXUP_ASUS_G73JW
,
6295 ALC269_FIXUP_LENOVO_EAPD
,
6296 ALC275_FIXUP_SONY_HWEQ
,
6297 ALC275_FIXUP_SONY_DISABLE_AAMIX
,
6299 ALC269_FIXUP_PCM_44K
,
6300 ALC269_FIXUP_STEREO_DMIC
,
6301 ALC269_FIXUP_HEADSET_MIC
,
6302 ALC269_FIXUP_QUANTA_MUTE
,
6303 ALC269_FIXUP_LIFEBOOK
,
6304 ALC269_FIXUP_LIFEBOOK_EXTMIC
,
6305 ALC269_FIXUP_LIFEBOOK_HP_PIN
,
6306 ALC269_FIXUP_LIFEBOOK_NO_HP_TO_LINEOUT
,
6307 ALC255_FIXUP_LIFEBOOK_U7x7_HEADSET_MIC
,
6310 ALC269VB_FIXUP_AMIC
,
6311 ALC269VB_FIXUP_DMIC
,
6312 ALC269_FIXUP_HP_MUTE_LED
,
6313 ALC269_FIXUP_HP_MUTE_LED_MIC1
,
6314 ALC269_FIXUP_HP_MUTE_LED_MIC2
,
6315 ALC269_FIXUP_HP_MUTE_LED_MIC3
,
6316 ALC269_FIXUP_HP_GPIO_LED
,
6317 ALC269_FIXUP_HP_GPIO_MIC1_LED
,
6318 ALC269_FIXUP_HP_LINE1_MIC1_LED
,
6319 ALC269_FIXUP_INV_DMIC
,
6320 ALC269_FIXUP_LENOVO_DOCK
,
6321 ALC269_FIXUP_LENOVO_DOCK_LIMIT_BOOST
,
6322 ALC269_FIXUP_NO_SHUTUP
,
6323 ALC286_FIXUP_SONY_MIC_NO_PRESENCE
,
6324 ALC269_FIXUP_PINCFG_NO_HP_TO_LINEOUT
,
6325 ALC269_FIXUP_DELL1_MIC_NO_PRESENCE
,
6326 ALC269_FIXUP_DELL2_MIC_NO_PRESENCE
,
6327 ALC269_FIXUP_DELL3_MIC_NO_PRESENCE
,
6328 ALC269_FIXUP_DELL4_MIC_NO_PRESENCE
,
6329 ALC269_FIXUP_HEADSET_MODE
,
6330 ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC
,
6331 ALC269_FIXUP_ASPIRE_HEADSET_MIC
,
6332 ALC269_FIXUP_ASUS_X101_FUNC
,
6333 ALC269_FIXUP_ASUS_X101_VERB
,
6334 ALC269_FIXUP_ASUS_X101
,
6335 ALC271_FIXUP_AMIC_MIC2
,
6336 ALC271_FIXUP_HP_GATE_MIC_JACK
,
6337 ALC271_FIXUP_HP_GATE_MIC_JACK_E1_572
,
6338 ALC269_FIXUP_ACER_AC700
,
6339 ALC269_FIXUP_LIMIT_INT_MIC_BOOST
,
6340 ALC269VB_FIXUP_ASUS_ZENBOOK
,
6341 ALC269VB_FIXUP_ASUS_ZENBOOK_UX31A
,
6342 ALC269_FIXUP_LIMIT_INT_MIC_BOOST_MUTE_LED
,
6343 ALC269VB_FIXUP_ORDISSIMO_EVE2
,
6344 ALC283_FIXUP_CHROME_BOOK
,
6345 ALC283_FIXUP_SENSE_COMBO_JACK
,
6346 ALC282_FIXUP_ASUS_TX300
,
6347 ALC283_FIXUP_INT_MIC
,
6348 ALC290_FIXUP_MONO_SPEAKERS
,
6349 ALC290_FIXUP_MONO_SPEAKERS_HSJACK
,
6350 ALC290_FIXUP_SUBWOOFER
,
6351 ALC290_FIXUP_SUBWOOFER_HSJACK
,
6352 ALC269_FIXUP_THINKPAD_ACPI
,
6353 ALC269_FIXUP_DMIC_THINKPAD_ACPI
,
6354 ALC255_FIXUP_ACER_MIC_NO_PRESENCE
,
6355 ALC255_FIXUP_ASUS_MIC_NO_PRESENCE
,
6356 ALC255_FIXUP_DELL1_MIC_NO_PRESENCE
,
6357 ALC255_FIXUP_DELL2_MIC_NO_PRESENCE
,
6358 ALC255_FIXUP_HEADSET_MODE
,
6359 ALC255_FIXUP_HEADSET_MODE_NO_HP_MIC
,
6360 ALC293_FIXUP_DELL1_MIC_NO_PRESENCE
,
6361 ALC292_FIXUP_TPT440_DOCK
,
6362 ALC292_FIXUP_TPT440
,
6363 ALC283_FIXUP_HEADSET_MIC
,
6364 ALC255_FIXUP_MIC_MUTE_LED
,
6365 ALC282_FIXUP_ASPIRE_V5_PINS
,
6366 ALC269VB_FIXUP_ASPIRE_E1_COEF
,
6367 ALC280_FIXUP_HP_GPIO4
,
6368 ALC286_FIXUP_HP_GPIO_LED
,
6369 ALC280_FIXUP_HP_GPIO2_MIC_HOTKEY
,
6370 ALC280_FIXUP_HP_DOCK_PINS
,
6371 ALC269_FIXUP_HP_DOCK_GPIO_MIC1_LED
,
6372 ALC280_FIXUP_HP_9480M
,
6373 ALC245_FIXUP_HP_X360_AMP
,
6374 ALC288_FIXUP_DELL_HEADSET_MODE
,
6375 ALC288_FIXUP_DELL1_MIC_NO_PRESENCE
,
6376 ALC288_FIXUP_DELL_XPS_13
,
6377 ALC288_FIXUP_DISABLE_AAMIX
,
6378 ALC292_FIXUP_DELL_E7X_AAMIX
,
6379 ALC292_FIXUP_DELL_E7X
,
6380 ALC292_FIXUP_DISABLE_AAMIX
,
6381 ALC293_FIXUP_DISABLE_AAMIX_MULTIJACK
,
6382 ALC298_FIXUP_ALIENWARE_MIC_NO_PRESENCE
,
6383 ALC298_FIXUP_DELL1_MIC_NO_PRESENCE
,
6384 ALC298_FIXUP_DELL_AIO_MIC_NO_PRESENCE
,
6385 ALC275_FIXUP_DELL_XPS
,
6386 ALC293_FIXUP_LENOVO_SPK_NOISE
,
6387 ALC233_FIXUP_LENOVO_LINE2_MIC_HOTKEY
,
6388 ALC255_FIXUP_DELL_SPK_NOISE
,
6389 ALC225_FIXUP_DISABLE_MIC_VREF
,
6390 ALC225_FIXUP_DELL1_MIC_NO_PRESENCE
,
6391 ALC295_FIXUP_DISABLE_DAC3
,
6392 ALC285_FIXUP_SPEAKER2_TO_DAC1
,
6393 ALC280_FIXUP_HP_HEADSET_MIC
,
6394 ALC221_FIXUP_HP_FRONT_MIC
,
6395 ALC292_FIXUP_TPT460
,
6396 ALC298_FIXUP_SPK_VOLUME
,
6397 ALC298_FIXUP_LENOVO_SPK_VOLUME
,
6398 ALC256_FIXUP_DELL_INSPIRON_7559_SUBWOOFER
,
6399 ALC269_FIXUP_ATIV_BOOK_8
,
6400 ALC221_FIXUP_HP_MIC_NO_PRESENCE
,
6401 ALC256_FIXUP_ASUS_HEADSET_MODE
,
6402 ALC256_FIXUP_ASUS_MIC
,
6403 ALC256_FIXUP_ASUS_AIO_GPIO2
,
6404 ALC233_FIXUP_ASUS_MIC_NO_PRESENCE
,
6405 ALC233_FIXUP_EAPD_COEF_AND_MIC_NO_PRESENCE
,
6406 ALC233_FIXUP_LENOVO_MULTI_CODECS
,
6407 ALC233_FIXUP_ACER_HEADSET_MIC
,
6408 ALC294_FIXUP_LENOVO_MIC_LOCATION
,
6409 ALC225_FIXUP_DELL_WYSE_MIC_NO_PRESENCE
,
6410 ALC225_FIXUP_S3_POP_NOISE
,
6411 ALC700_FIXUP_INTEL_REFERENCE
,
6412 ALC274_FIXUP_DELL_BIND_DACS
,
6413 ALC274_FIXUP_DELL_AIO_LINEOUT_VERB
,
6414 ALC298_FIXUP_TPT470_DOCK_FIX
,
6415 ALC298_FIXUP_TPT470_DOCK
,
6416 ALC255_FIXUP_DUMMY_LINEOUT_VERB
,
6417 ALC255_FIXUP_DELL_HEADSET_MIC
,
6418 ALC256_FIXUP_HUAWEI_MACH_WX9_PINS
,
6419 ALC298_FIXUP_HUAWEI_MBX_STEREO
,
6420 ALC295_FIXUP_HP_X360
,
6421 ALC221_FIXUP_HP_HEADSET_MIC
,
6422 ALC285_FIXUP_LENOVO_HEADPHONE_NOISE
,
6423 ALC295_FIXUP_HP_AUTO_MUTE
,
6424 ALC286_FIXUP_ACER_AIO_MIC_NO_PRESENCE
,
6425 ALC294_FIXUP_ASUS_MIC
,
6426 ALC294_FIXUP_ASUS_HEADSET_MIC
,
6427 ALC294_FIXUP_ASUS_SPK
,
6428 ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
,
6429 ALC285_FIXUP_LENOVO_PC_BEEP_IN_NOISE
,
6430 ALC255_FIXUP_ACER_HEADSET_MIC
,
6431 ALC295_FIXUP_CHROME_BOOK
,
6432 ALC225_FIXUP_HEADSET_JACK
,
6433 ALC225_FIXUP_DELL_WYSE_AIO_MIC_NO_PRESENCE
,
6434 ALC225_FIXUP_WYSE_AUTO_MUTE
,
6435 ALC225_FIXUP_WYSE_DISABLE_MIC_VREF
,
6436 ALC286_FIXUP_ACER_AIO_HEADSET_MIC
,
6437 ALC256_FIXUP_ASUS_HEADSET_MIC
,
6438 ALC256_FIXUP_ASUS_MIC_NO_PRESENCE
,
6439 ALC299_FIXUP_PREDATOR_SPK
,
6440 ALC256_FIXUP_MEDION_HEADSET_NO_PRESENCE
,
6441 ALC289_FIXUP_DELL_SPK2
,
6442 ALC289_FIXUP_DUAL_SPK
,
6443 ALC294_FIXUP_SPK2_TO_DAC1
,
6444 ALC294_FIXUP_ASUS_DUAL_SPK
,
6445 ALC285_FIXUP_THINKPAD_X1_GEN7
,
6446 ALC285_FIXUP_THINKPAD_HEADSET_JACK
,
6447 ALC294_FIXUP_ASUS_HPE
,
6448 ALC294_FIXUP_ASUS_COEF_1B
,
6449 ALC294_FIXUP_ASUS_GX502_HP
,
6450 ALC294_FIXUP_ASUS_GX502_PINS
,
6451 ALC294_FIXUP_ASUS_GX502_VERBS
,
6452 ALC285_FIXUP_HP_GPIO_LED
,
6453 ALC285_FIXUP_HP_MUTE_LED
,
6454 ALC236_FIXUP_HP_GPIO_LED
,
6455 ALC236_FIXUP_HP_MUTE_LED
,
6456 ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF
,
6457 ALC298_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET
,
6458 ALC295_FIXUP_ASUS_MIC_NO_PRESENCE
,
6459 ALC269VC_FIXUP_ACER_VCOPPERBOX_PINS
,
6460 ALC269VC_FIXUP_ACER_HEADSET_MIC
,
6461 ALC269VC_FIXUP_ACER_MIC_NO_PRESENCE
,
6462 ALC289_FIXUP_ASUS_GA401
,
6463 ALC289_FIXUP_ASUS_GA502
,
6464 ALC256_FIXUP_ACER_MIC_NO_PRESENCE
,
6465 ALC285_FIXUP_HP_GPIO_AMP_INIT
,
6466 ALC269_FIXUP_CZC_B20
,
6467 ALC269_FIXUP_CZC_TMI
,
6468 ALC269_FIXUP_CZC_L101
,
6469 ALC269_FIXUP_LEMOTE_A1802
,
6470 ALC269_FIXUP_LEMOTE_A190X
,
6471 ALC256_FIXUP_INTEL_NUC8_RUGGED
,
6472 ALC233_FIXUP_INTEL_NUC8_DMIC
,
6473 ALC233_FIXUP_INTEL_NUC8_BOOST
,
6474 ALC256_FIXUP_INTEL_NUC10
,
6475 ALC255_FIXUP_XIAOMI_HEADSET_MIC
,
6476 ALC274_FIXUP_HP_MIC
,
6477 ALC274_FIXUP_HP_HEADSET_MIC
,
6478 ALC274_FIXUP_HP_ENVY_GPIO
,
6479 ALC256_FIXUP_ASUS_HPE
,
6480 ALC285_FIXUP_THINKPAD_NO_BASS_SPK_HEADSET_JACK
,
6481 ALC287_FIXUP_HP_GPIO_LED
,
6482 ALC256_FIXUP_HP_HEADSET_MIC
,
6483 ALC285_FIXUP_IDEAPAD_S740_COEF
,
6484 ALC236_FIXUP_DELL_AIO_HEADSET_MIC
,
6485 ALC282_FIXUP_ACER_DISABLE_LINEOUT
,
6486 ALC255_FIXUP_ACER_LIMIT_INT_MIC_BOOST
,
6487 ALC256_FIXUP_ACER_HEADSET_MIC
,
6488 ALC285_FIXUP_HP_LIMIT_INT_MIC_BOOST
,
6491 static const struct hda_fixup alc269_fixups
[] = {
6492 [ALC269_FIXUP_GPIO2
] = {
6493 .type
= HDA_FIXUP_FUNC
,
6494 .v
.func
= alc_fixup_gpio2
,
6496 [ALC269_FIXUP_SONY_VAIO
] = {
6497 .type
= HDA_FIXUP_PINCTLS
,
6498 .v
.pins
= (const struct hda_pintbl
[]) {
6499 {0x19, PIN_VREFGRD
},
6503 [ALC275_FIXUP_SONY_VAIO_GPIO2
] = {
6504 .type
= HDA_FIXUP_FUNC
,
6505 .v
.func
= alc275_fixup_gpio4_off
,
6507 .chain_id
= ALC269_FIXUP_SONY_VAIO
6509 [ALC269_FIXUP_DELL_M101Z
] = {
6510 .type
= HDA_FIXUP_VERBS
,
6511 .v
.verbs
= (const struct hda_verb
[]) {
6512 /* Enables internal speaker */
6513 {0x20, AC_VERB_SET_COEF_INDEX
, 13},
6514 {0x20, AC_VERB_SET_PROC_COEF
, 0x4040},
6518 [ALC269_FIXUP_SKU_IGNORE
] = {
6519 .type
= HDA_FIXUP_FUNC
,
6520 .v
.func
= alc_fixup_sku_ignore
,
6522 [ALC269_FIXUP_ASUS_G73JW
] = {
6523 .type
= HDA_FIXUP_PINS
,
6524 .v
.pins
= (const struct hda_pintbl
[]) {
6525 { 0x17, 0x99130111 }, /* subwoofer */
6529 [ALC269_FIXUP_LENOVO_EAPD
] = {
6530 .type
= HDA_FIXUP_VERBS
,
6531 .v
.verbs
= (const struct hda_verb
[]) {
6532 {0x14, AC_VERB_SET_EAPD_BTLENABLE
, 0},
6536 [ALC275_FIXUP_SONY_HWEQ
] = {
6537 .type
= HDA_FIXUP_FUNC
,
6538 .v
.func
= alc269_fixup_hweq
,
6540 .chain_id
= ALC275_FIXUP_SONY_VAIO_GPIO2
6542 [ALC275_FIXUP_SONY_DISABLE_AAMIX
] = {
6543 .type
= HDA_FIXUP_FUNC
,
6544 .v
.func
= alc_fixup_disable_aamix
,
6546 .chain_id
= ALC269_FIXUP_SONY_VAIO
6548 [ALC271_FIXUP_DMIC
] = {
6549 .type
= HDA_FIXUP_FUNC
,
6550 .v
.func
= alc271_fixup_dmic
,
6552 [ALC269_FIXUP_PCM_44K
] = {
6553 .type
= HDA_FIXUP_FUNC
,
6554 .v
.func
= alc269_fixup_pcm_44k
,
6556 .chain_id
= ALC269_FIXUP_QUANTA_MUTE
6558 [ALC269_FIXUP_STEREO_DMIC
] = {
6559 .type
= HDA_FIXUP_FUNC
,
6560 .v
.func
= alc269_fixup_stereo_dmic
,
6562 [ALC269_FIXUP_HEADSET_MIC
] = {
6563 .type
= HDA_FIXUP_FUNC
,
6564 .v
.func
= alc269_fixup_headset_mic
,
6566 [ALC269_FIXUP_QUANTA_MUTE
] = {
6567 .type
= HDA_FIXUP_FUNC
,
6568 .v
.func
= alc269_fixup_quanta_mute
,
6570 [ALC269_FIXUP_LIFEBOOK
] = {
6571 .type
= HDA_FIXUP_PINS
,
6572 .v
.pins
= (const struct hda_pintbl
[]) {
6573 { 0x1a, 0x2101103f }, /* dock line-out */
6574 { 0x1b, 0x23a11040 }, /* dock mic-in */
6578 .chain_id
= ALC269_FIXUP_QUANTA_MUTE
6580 [ALC269_FIXUP_LIFEBOOK_EXTMIC
] = {
6581 .type
= HDA_FIXUP_PINS
,
6582 .v
.pins
= (const struct hda_pintbl
[]) {
6583 { 0x19, 0x01a1903c }, /* headset mic, with jack detect */
6587 [ALC269_FIXUP_LIFEBOOK_HP_PIN
] = {
6588 .type
= HDA_FIXUP_PINS
,
6589 .v
.pins
= (const struct hda_pintbl
[]) {
6590 { 0x21, 0x0221102f }, /* HP out */
6594 [ALC269_FIXUP_LIFEBOOK_NO_HP_TO_LINEOUT
] = {
6595 .type
= HDA_FIXUP_FUNC
,
6596 .v
.func
= alc269_fixup_pincfg_no_hp_to_lineout
,
6598 [ALC255_FIXUP_LIFEBOOK_U7x7_HEADSET_MIC
] = {
6599 .type
= HDA_FIXUP_FUNC
,
6600 .v
.func
= alc269_fixup_pincfg_U7x7_headset_mic
,
6602 [ALC269_FIXUP_AMIC
] = {
6603 .type
= HDA_FIXUP_PINS
,
6604 .v
.pins
= (const struct hda_pintbl
[]) {
6605 { 0x14, 0x99130110 }, /* speaker */
6606 { 0x15, 0x0121401f }, /* HP out */
6607 { 0x18, 0x01a19c20 }, /* mic */
6608 { 0x19, 0x99a3092f }, /* int-mic */
6612 [ALC269_FIXUP_DMIC
] = {
6613 .type
= HDA_FIXUP_PINS
,
6614 .v
.pins
= (const struct hda_pintbl
[]) {
6615 { 0x12, 0x99a3092f }, /* int-mic */
6616 { 0x14, 0x99130110 }, /* speaker */
6617 { 0x15, 0x0121401f }, /* HP out */
6618 { 0x18, 0x01a19c20 }, /* mic */
6622 [ALC269VB_FIXUP_AMIC
] = {
6623 .type
= HDA_FIXUP_PINS
,
6624 .v
.pins
= (const struct hda_pintbl
[]) {
6625 { 0x14, 0x99130110 }, /* speaker */
6626 { 0x18, 0x01a19c20 }, /* mic */
6627 { 0x19, 0x99a3092f }, /* int-mic */
6628 { 0x21, 0x0121401f }, /* HP out */
6632 [ALC269VB_FIXUP_DMIC
] = {
6633 .type
= HDA_FIXUP_PINS
,
6634 .v
.pins
= (const struct hda_pintbl
[]) {
6635 { 0x12, 0x99a3092f }, /* int-mic */
6636 { 0x14, 0x99130110 }, /* speaker */
6637 { 0x18, 0x01a19c20 }, /* mic */
6638 { 0x21, 0x0121401f }, /* HP out */
6642 [ALC269_FIXUP_HP_MUTE_LED
] = {
6643 .type
= HDA_FIXUP_FUNC
,
6644 .v
.func
= alc269_fixup_hp_mute_led
,
6646 [ALC269_FIXUP_HP_MUTE_LED_MIC1
] = {
6647 .type
= HDA_FIXUP_FUNC
,
6648 .v
.func
= alc269_fixup_hp_mute_led_mic1
,
6650 [ALC269_FIXUP_HP_MUTE_LED_MIC2
] = {
6651 .type
= HDA_FIXUP_FUNC
,
6652 .v
.func
= alc269_fixup_hp_mute_led_mic2
,
6654 [ALC269_FIXUP_HP_MUTE_LED_MIC3
] = {
6655 .type
= HDA_FIXUP_FUNC
,
6656 .v
.func
= alc269_fixup_hp_mute_led_mic3
,
6658 .chain_id
= ALC295_FIXUP_HP_AUTO_MUTE
6660 [ALC269_FIXUP_HP_GPIO_LED
] = {
6661 .type
= HDA_FIXUP_FUNC
,
6662 .v
.func
= alc269_fixup_hp_gpio_led
,
6664 [ALC269_FIXUP_HP_GPIO_MIC1_LED
] = {
6665 .type
= HDA_FIXUP_FUNC
,
6666 .v
.func
= alc269_fixup_hp_gpio_mic1_led
,
6668 [ALC269_FIXUP_HP_LINE1_MIC1_LED
] = {
6669 .type
= HDA_FIXUP_FUNC
,
6670 .v
.func
= alc269_fixup_hp_line1_mic1_led
,
6672 [ALC269_FIXUP_INV_DMIC
] = {
6673 .type
= HDA_FIXUP_FUNC
,
6674 .v
.func
= alc_fixup_inv_dmic
,
6676 [ALC269_FIXUP_NO_SHUTUP
] = {
6677 .type
= HDA_FIXUP_FUNC
,
6678 .v
.func
= alc_fixup_no_shutup
,
6680 [ALC269_FIXUP_LENOVO_DOCK
] = {
6681 .type
= HDA_FIXUP_PINS
,
6682 .v
.pins
= (const struct hda_pintbl
[]) {
6683 { 0x19, 0x23a11040 }, /* dock mic */
6684 { 0x1b, 0x2121103f }, /* dock headphone */
6688 .chain_id
= ALC269_FIXUP_PINCFG_NO_HP_TO_LINEOUT
6690 [ALC269_FIXUP_LENOVO_DOCK_LIMIT_BOOST
] = {
6691 .type
= HDA_FIXUP_FUNC
,
6692 .v
.func
= alc269_fixup_limit_int_mic_boost
,
6694 .chain_id
= ALC269_FIXUP_LENOVO_DOCK
,
6696 [ALC269_FIXUP_PINCFG_NO_HP_TO_LINEOUT
] = {
6697 .type
= HDA_FIXUP_FUNC
,
6698 .v
.func
= alc269_fixup_pincfg_no_hp_to_lineout
,
6700 .chain_id
= ALC269_FIXUP_THINKPAD_ACPI
,
6702 [ALC269_FIXUP_DELL1_MIC_NO_PRESENCE
] = {
6703 .type
= HDA_FIXUP_PINS
,
6704 .v
.pins
= (const struct hda_pintbl
[]) {
6705 { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */
6706 { 0x1a, 0x01a1913d }, /* use as headphone mic, without its own jack detect */
6710 .chain_id
= ALC269_FIXUP_HEADSET_MODE
6712 [ALC269_FIXUP_DELL2_MIC_NO_PRESENCE
] = {
6713 .type
= HDA_FIXUP_PINS
,
6714 .v
.pins
= (const struct hda_pintbl
[]) {
6715 { 0x16, 0x21014020 }, /* dock line out */
6716 { 0x19, 0x21a19030 }, /* dock mic */
6717 { 0x1a, 0x01a1913c }, /* use as headset mic, without its own jack detect */
6721 .chain_id
= ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC
6723 [ALC269_FIXUP_DELL3_MIC_NO_PRESENCE
] = {
6724 .type
= HDA_FIXUP_PINS
,
6725 .v
.pins
= (const struct hda_pintbl
[]) {
6726 { 0x1a, 0x01a1913c }, /* use as headset mic, without its own jack detect */
6730 .chain_id
= ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC
6732 [ALC269_FIXUP_DELL4_MIC_NO_PRESENCE
] = {
6733 .type
= HDA_FIXUP_PINS
,
6734 .v
.pins
= (const struct hda_pintbl
[]) {
6735 { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */
6736 { 0x1b, 0x01a1913d }, /* use as headphone mic, without its own jack detect */
6740 .chain_id
= ALC269_FIXUP_HEADSET_MODE
6742 [ALC269_FIXUP_HEADSET_MODE
] = {
6743 .type
= HDA_FIXUP_FUNC
,
6744 .v
.func
= alc_fixup_headset_mode
,
6746 .chain_id
= ALC255_FIXUP_MIC_MUTE_LED
6748 [ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC
] = {
6749 .type
= HDA_FIXUP_FUNC
,
6750 .v
.func
= alc_fixup_headset_mode_no_hp_mic
,
6752 [ALC269_FIXUP_ASPIRE_HEADSET_MIC
] = {
6753 .type
= HDA_FIXUP_PINS
,
6754 .v
.pins
= (const struct hda_pintbl
[]) {
6755 { 0x19, 0x01a1913c }, /* headset mic w/o jack detect */
6759 .chain_id
= ALC269_FIXUP_HEADSET_MODE
,
6761 [ALC286_FIXUP_SONY_MIC_NO_PRESENCE
] = {
6762 .type
= HDA_FIXUP_PINS
,
6763 .v
.pins
= (const struct hda_pintbl
[]) {
6764 { 0x18, 0x01a1913c }, /* use as headset mic, without its own jack detect */
6768 .chain_id
= ALC269_FIXUP_HEADSET_MIC
6770 [ALC256_FIXUP_HUAWEI_MACH_WX9_PINS
] = {
6771 .type
= HDA_FIXUP_PINS
,
6772 .v
.pins
= (const struct hda_pintbl
[]) {
6786 .chain_id
= ALC255_FIXUP_MIC_MUTE_LED
6788 [ALC298_FIXUP_HUAWEI_MBX_STEREO
] = {
6789 .type
= HDA_FIXUP_FUNC
,
6790 .v
.func
= alc298_fixup_huawei_mbx_stereo
,
6792 .chain_id
= ALC255_FIXUP_MIC_MUTE_LED
6794 [ALC269_FIXUP_ASUS_X101_FUNC
] = {
6795 .type
= HDA_FIXUP_FUNC
,
6796 .v
.func
= alc269_fixup_x101_headset_mic
,
6798 [ALC269_FIXUP_ASUS_X101_VERB
] = {
6799 .type
= HDA_FIXUP_VERBS
,
6800 .v
.verbs
= (const struct hda_verb
[]) {
6801 {0x18, AC_VERB_SET_PIN_WIDGET_CONTROL
, 0},
6802 {0x20, AC_VERB_SET_COEF_INDEX
, 0x08},
6803 {0x20, AC_VERB_SET_PROC_COEF
, 0x0310},
6807 .chain_id
= ALC269_FIXUP_ASUS_X101_FUNC
6809 [ALC269_FIXUP_ASUS_X101
] = {
6810 .type
= HDA_FIXUP_PINS
,
6811 .v
.pins
= (const struct hda_pintbl
[]) {
6812 { 0x18, 0x04a1182c }, /* Headset mic */
6816 .chain_id
= ALC269_FIXUP_ASUS_X101_VERB
6818 [ALC271_FIXUP_AMIC_MIC2
] = {
6819 .type
= HDA_FIXUP_PINS
,
6820 .v
.pins
= (const struct hda_pintbl
[]) {
6821 { 0x14, 0x99130110 }, /* speaker */
6822 { 0x19, 0x01a19c20 }, /* mic */
6823 { 0x1b, 0x99a7012f }, /* int-mic */
6824 { 0x21, 0x0121401f }, /* HP out */
6828 [ALC271_FIXUP_HP_GATE_MIC_JACK
] = {
6829 .type
= HDA_FIXUP_FUNC
,
6830 .v
.func
= alc271_hp_gate_mic_jack
,
6832 .chain_id
= ALC271_FIXUP_AMIC_MIC2
,
6834 [ALC271_FIXUP_HP_GATE_MIC_JACK_E1_572
] = {
6835 .type
= HDA_FIXUP_FUNC
,
6836 .v
.func
= alc269_fixup_limit_int_mic_boost
,
6838 .chain_id
= ALC271_FIXUP_HP_GATE_MIC_JACK
,
6840 [ALC269_FIXUP_ACER_AC700
] = {
6841 .type
= HDA_FIXUP_PINS
,
6842 .v
.pins
= (const struct hda_pintbl
[]) {
6843 { 0x12, 0x99a3092f }, /* int-mic */
6844 { 0x14, 0x99130110 }, /* speaker */
6845 { 0x18, 0x03a11c20 }, /* mic */
6846 { 0x1e, 0x0346101e }, /* SPDIF1 */
6847 { 0x21, 0x0321101f }, /* HP out */
6851 .chain_id
= ALC271_FIXUP_DMIC
,
6853 [ALC269_FIXUP_LIMIT_INT_MIC_BOOST
] = {
6854 .type
= HDA_FIXUP_FUNC
,
6855 .v
.func
= alc269_fixup_limit_int_mic_boost
,
6857 .chain_id
= ALC269_FIXUP_THINKPAD_ACPI
,
6859 [ALC269VB_FIXUP_ASUS_ZENBOOK
] = {
6860 .type
= HDA_FIXUP_FUNC
,
6861 .v
.func
= alc269_fixup_limit_int_mic_boost
,
6863 .chain_id
= ALC269VB_FIXUP_DMIC
,
6865 [ALC269VB_FIXUP_ASUS_ZENBOOK_UX31A
] = {
6866 .type
= HDA_FIXUP_VERBS
,
6867 .v
.verbs
= (const struct hda_verb
[]) {
6868 /* class-D output amp +5dB */
6869 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x12 },
6870 { 0x20, AC_VERB_SET_PROC_COEF
, 0x2800 },
6874 .chain_id
= ALC269VB_FIXUP_ASUS_ZENBOOK
,
6876 [ALC269_FIXUP_LIMIT_INT_MIC_BOOST_MUTE_LED
] = {
6877 .type
= HDA_FIXUP_FUNC
,
6878 .v
.func
= alc269_fixup_limit_int_mic_boost
,
6880 .chain_id
= ALC269_FIXUP_HP_MUTE_LED_MIC1
,
6882 [ALC269VB_FIXUP_ORDISSIMO_EVE2
] = {
6883 .type
= HDA_FIXUP_PINS
,
6884 .v
.pins
= (const struct hda_pintbl
[]) {
6885 { 0x12, 0x99a3092f }, /* int-mic */
6886 { 0x18, 0x03a11d20 }, /* mic */
6887 { 0x19, 0x411111f0 }, /* Unused bogus pin */
6891 [ALC283_FIXUP_CHROME_BOOK
] = {
6892 .type
= HDA_FIXUP_FUNC
,
6893 .v
.func
= alc283_fixup_chromebook
,
6895 [ALC283_FIXUP_SENSE_COMBO_JACK
] = {
6896 .type
= HDA_FIXUP_FUNC
,
6897 .v
.func
= alc283_fixup_sense_combo_jack
,
6899 .chain_id
= ALC283_FIXUP_CHROME_BOOK
,
6901 [ALC282_FIXUP_ASUS_TX300
] = {
6902 .type
= HDA_FIXUP_FUNC
,
6903 .v
.func
= alc282_fixup_asus_tx300
,
6905 [ALC283_FIXUP_INT_MIC
] = {
6906 .type
= HDA_FIXUP_VERBS
,
6907 .v
.verbs
= (const struct hda_verb
[]) {
6908 {0x20, AC_VERB_SET_COEF_INDEX
, 0x1a},
6909 {0x20, AC_VERB_SET_PROC_COEF
, 0x0011},
6913 .chain_id
= ALC269_FIXUP_LIMIT_INT_MIC_BOOST
6915 [ALC290_FIXUP_SUBWOOFER_HSJACK
] = {
6916 .type
= HDA_FIXUP_PINS
,
6917 .v
.pins
= (const struct hda_pintbl
[]) {
6918 { 0x17, 0x90170112 }, /* subwoofer */
6922 .chain_id
= ALC290_FIXUP_MONO_SPEAKERS_HSJACK
,
6924 [ALC290_FIXUP_SUBWOOFER
] = {
6925 .type
= HDA_FIXUP_PINS
,
6926 .v
.pins
= (const struct hda_pintbl
[]) {
6927 { 0x17, 0x90170112 }, /* subwoofer */
6931 .chain_id
= ALC290_FIXUP_MONO_SPEAKERS
,
6933 [ALC290_FIXUP_MONO_SPEAKERS
] = {
6934 .type
= HDA_FIXUP_FUNC
,
6935 .v
.func
= alc290_fixup_mono_speakers
,
6937 [ALC290_FIXUP_MONO_SPEAKERS_HSJACK
] = {
6938 .type
= HDA_FIXUP_FUNC
,
6939 .v
.func
= alc290_fixup_mono_speakers
,
6941 .chain_id
= ALC269_FIXUP_DELL3_MIC_NO_PRESENCE
,
6943 [ALC269_FIXUP_THINKPAD_ACPI
] = {
6944 .type
= HDA_FIXUP_FUNC
,
6945 .v
.func
= alc_fixup_thinkpad_acpi
,
6947 .chain_id
= ALC269_FIXUP_SKU_IGNORE
,
6949 [ALC269_FIXUP_DMIC_THINKPAD_ACPI
] = {
6950 .type
= HDA_FIXUP_FUNC
,
6951 .v
.func
= alc_fixup_inv_dmic
,
6953 .chain_id
= ALC269_FIXUP_THINKPAD_ACPI
,
6955 [ALC255_FIXUP_ACER_MIC_NO_PRESENCE
] = {
6956 .type
= HDA_FIXUP_PINS
,
6957 .v
.pins
= (const struct hda_pintbl
[]) {
6958 { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */
6962 .chain_id
= ALC255_FIXUP_HEADSET_MODE
6964 [ALC255_FIXUP_ASUS_MIC_NO_PRESENCE
] = {
6965 .type
= HDA_FIXUP_PINS
,
6966 .v
.pins
= (const struct hda_pintbl
[]) {
6967 { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */
6971 .chain_id
= ALC255_FIXUP_HEADSET_MODE
6973 [ALC255_FIXUP_DELL1_MIC_NO_PRESENCE
] = {
6974 .type
= HDA_FIXUP_PINS
,
6975 .v
.pins
= (const struct hda_pintbl
[]) {
6976 { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */
6977 { 0x1a, 0x01a1913d }, /* use as headphone mic, without its own jack detect */
6981 .chain_id
= ALC255_FIXUP_HEADSET_MODE
6983 [ALC255_FIXUP_DELL2_MIC_NO_PRESENCE
] = {
6984 .type
= HDA_FIXUP_PINS
,
6985 .v
.pins
= (const struct hda_pintbl
[]) {
6986 { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */
6990 .chain_id
= ALC255_FIXUP_HEADSET_MODE_NO_HP_MIC
6992 [ALC255_FIXUP_HEADSET_MODE
] = {
6993 .type
= HDA_FIXUP_FUNC
,
6994 .v
.func
= alc_fixup_headset_mode_alc255
,
6996 .chain_id
= ALC255_FIXUP_MIC_MUTE_LED
6998 [ALC255_FIXUP_HEADSET_MODE_NO_HP_MIC
] = {
6999 .type
= HDA_FIXUP_FUNC
,
7000 .v
.func
= alc_fixup_headset_mode_alc255_no_hp_mic
,
7002 [ALC293_FIXUP_DELL1_MIC_NO_PRESENCE
] = {
7003 .type
= HDA_FIXUP_PINS
,
7004 .v
.pins
= (const struct hda_pintbl
[]) {
7005 { 0x18, 0x01a1913d }, /* use as headphone mic, without its own jack detect */
7006 { 0x1a, 0x01a1913c }, /* use as headset mic, without its own jack detect */
7010 .chain_id
= ALC269_FIXUP_HEADSET_MODE
7012 [ALC292_FIXUP_TPT440_DOCK
] = {
7013 .type
= HDA_FIXUP_FUNC
,
7014 .v
.func
= alc_fixup_tpt440_dock
,
7016 .chain_id
= ALC269_FIXUP_LIMIT_INT_MIC_BOOST
7018 [ALC292_FIXUP_TPT440
] = {
7019 .type
= HDA_FIXUP_FUNC
,
7020 .v
.func
= alc_fixup_disable_aamix
,
7022 .chain_id
= ALC292_FIXUP_TPT440_DOCK
,
7024 [ALC283_FIXUP_HEADSET_MIC
] = {
7025 .type
= HDA_FIXUP_PINS
,
7026 .v
.pins
= (const struct hda_pintbl
[]) {
7027 { 0x19, 0x04a110f0 },
7031 [ALC255_FIXUP_MIC_MUTE_LED
] = {
7032 .type
= HDA_FIXUP_FUNC
,
7033 .v
.func
= alc_fixup_micmute_led
,
7035 [ALC282_FIXUP_ASPIRE_V5_PINS
] = {
7036 .type
= HDA_FIXUP_PINS
,
7037 .v
.pins
= (const struct hda_pintbl
[]) {
7038 { 0x12, 0x90a60130 },
7039 { 0x14, 0x90170110 },
7040 { 0x17, 0x40000008 },
7041 { 0x18, 0x411111f0 },
7042 { 0x19, 0x01a1913c },
7043 { 0x1a, 0x411111f0 },
7044 { 0x1b, 0x411111f0 },
7045 { 0x1d, 0x40f89b2d },
7046 { 0x1e, 0x411111f0 },
7047 { 0x21, 0x0321101f },
7051 [ALC269VB_FIXUP_ASPIRE_E1_COEF
] = {
7052 .type
= HDA_FIXUP_FUNC
,
7053 .v
.func
= alc269vb_fixup_aspire_e1_coef
,
7055 [ALC280_FIXUP_HP_GPIO4
] = {
7056 .type
= HDA_FIXUP_FUNC
,
7057 .v
.func
= alc280_fixup_hp_gpio4
,
7059 [ALC286_FIXUP_HP_GPIO_LED
] = {
7060 .type
= HDA_FIXUP_FUNC
,
7061 .v
.func
= alc286_fixup_hp_gpio_led
,
7063 [ALC280_FIXUP_HP_GPIO2_MIC_HOTKEY
] = {
7064 .type
= HDA_FIXUP_FUNC
,
7065 .v
.func
= alc280_fixup_hp_gpio2_mic_hotkey
,
7067 [ALC280_FIXUP_HP_DOCK_PINS
] = {
7068 .type
= HDA_FIXUP_PINS
,
7069 .v
.pins
= (const struct hda_pintbl
[]) {
7070 { 0x1b, 0x21011020 }, /* line-out */
7071 { 0x1a, 0x01a1903c }, /* headset mic */
7072 { 0x18, 0x2181103f }, /* line-in */
7076 .chain_id
= ALC280_FIXUP_HP_GPIO4
7078 [ALC269_FIXUP_HP_DOCK_GPIO_MIC1_LED
] = {
7079 .type
= HDA_FIXUP_PINS
,
7080 .v
.pins
= (const struct hda_pintbl
[]) {
7081 { 0x1b, 0x21011020 }, /* line-out */
7082 { 0x18, 0x2181103f }, /* line-in */
7086 .chain_id
= ALC269_FIXUP_HP_GPIO_MIC1_LED
7088 [ALC280_FIXUP_HP_9480M
] = {
7089 .type
= HDA_FIXUP_FUNC
,
7090 .v
.func
= alc280_fixup_hp_9480m
,
7092 [ALC245_FIXUP_HP_X360_AMP
] = {
7093 .type
= HDA_FIXUP_FUNC
,
7094 .v
.func
= alc245_fixup_hp_x360_amp
,
7096 [ALC288_FIXUP_DELL_HEADSET_MODE
] = {
7097 .type
= HDA_FIXUP_FUNC
,
7098 .v
.func
= alc_fixup_headset_mode_dell_alc288
,
7100 .chain_id
= ALC255_FIXUP_MIC_MUTE_LED
7102 [ALC288_FIXUP_DELL1_MIC_NO_PRESENCE
] = {
7103 .type
= HDA_FIXUP_PINS
,
7104 .v
.pins
= (const struct hda_pintbl
[]) {
7105 { 0x18, 0x01a1913c }, /* use as headset mic, without its own jack detect */
7106 { 0x1a, 0x01a1913d }, /* use as headphone mic, without its own jack detect */
7110 .chain_id
= ALC288_FIXUP_DELL_HEADSET_MODE
7112 [ALC288_FIXUP_DISABLE_AAMIX
] = {
7113 .type
= HDA_FIXUP_FUNC
,
7114 .v
.func
= alc_fixup_disable_aamix
,
7116 .chain_id
= ALC288_FIXUP_DELL1_MIC_NO_PRESENCE
7118 [ALC288_FIXUP_DELL_XPS_13
] = {
7119 .type
= HDA_FIXUP_FUNC
,
7120 .v
.func
= alc_fixup_dell_xps13
,
7122 .chain_id
= ALC288_FIXUP_DISABLE_AAMIX
7124 [ALC292_FIXUP_DISABLE_AAMIX
] = {
7125 .type
= HDA_FIXUP_FUNC
,
7126 .v
.func
= alc_fixup_disable_aamix
,
7128 .chain_id
= ALC269_FIXUP_DELL2_MIC_NO_PRESENCE
7130 [ALC293_FIXUP_DISABLE_AAMIX_MULTIJACK
] = {
7131 .type
= HDA_FIXUP_FUNC
,
7132 .v
.func
= alc_fixup_disable_aamix
,
7134 .chain_id
= ALC293_FIXUP_DELL1_MIC_NO_PRESENCE
7136 [ALC292_FIXUP_DELL_E7X_AAMIX
] = {
7137 .type
= HDA_FIXUP_FUNC
,
7138 .v
.func
= alc_fixup_dell_xps13
,
7140 .chain_id
= ALC292_FIXUP_DISABLE_AAMIX
7142 [ALC292_FIXUP_DELL_E7X
] = {
7143 .type
= HDA_FIXUP_FUNC
,
7144 .v
.func
= alc_fixup_micmute_led
,
7145 /* micmute fixup must be applied at last */
7146 .chained_before
= true,
7147 .chain_id
= ALC292_FIXUP_DELL_E7X_AAMIX
,
7149 [ALC298_FIXUP_ALIENWARE_MIC_NO_PRESENCE
] = {
7150 .type
= HDA_FIXUP_PINS
,
7151 .v
.pins
= (const struct hda_pintbl
[]) {
7152 { 0x18, 0x01a1913c }, /* headset mic w/o jack detect */
7155 .chained_before
= true,
7156 .chain_id
= ALC269_FIXUP_HEADSET_MODE
,
7158 [ALC298_FIXUP_DELL1_MIC_NO_PRESENCE
] = {
7159 .type
= HDA_FIXUP_PINS
,
7160 .v
.pins
= (const struct hda_pintbl
[]) {
7161 { 0x18, 0x01a1913c }, /* use as headset mic, without its own jack detect */
7162 { 0x1a, 0x01a1913d }, /* use as headphone mic, without its own jack detect */
7166 .chain_id
= ALC269_FIXUP_HEADSET_MODE
7168 [ALC298_FIXUP_DELL_AIO_MIC_NO_PRESENCE
] = {
7169 .type
= HDA_FIXUP_PINS
,
7170 .v
.pins
= (const struct hda_pintbl
[]) {
7171 { 0x18, 0x01a1913c }, /* use as headset mic, without its own jack detect */
7175 .chain_id
= ALC269_FIXUP_HEADSET_MODE
7177 [ALC275_FIXUP_DELL_XPS
] = {
7178 .type
= HDA_FIXUP_VERBS
,
7179 .v
.verbs
= (const struct hda_verb
[]) {
7180 /* Enables internal speaker */
7181 {0x20, AC_VERB_SET_COEF_INDEX
, 0x1f},
7182 {0x20, AC_VERB_SET_PROC_COEF
, 0x00c0},
7183 {0x20, AC_VERB_SET_COEF_INDEX
, 0x30},
7184 {0x20, AC_VERB_SET_PROC_COEF
, 0x00b1},
7188 [ALC293_FIXUP_LENOVO_SPK_NOISE
] = {
7189 .type
= HDA_FIXUP_FUNC
,
7190 .v
.func
= alc_fixup_disable_aamix
,
7192 .chain_id
= ALC269_FIXUP_THINKPAD_ACPI
7194 [ALC233_FIXUP_LENOVO_LINE2_MIC_HOTKEY
] = {
7195 .type
= HDA_FIXUP_FUNC
,
7196 .v
.func
= alc233_fixup_lenovo_line2_mic_hotkey
,
7198 [ALC233_FIXUP_INTEL_NUC8_DMIC
] = {
7199 .type
= HDA_FIXUP_FUNC
,
7200 .v
.func
= alc_fixup_inv_dmic
,
7202 .chain_id
= ALC233_FIXUP_INTEL_NUC8_BOOST
,
7204 [ALC233_FIXUP_INTEL_NUC8_BOOST
] = {
7205 .type
= HDA_FIXUP_FUNC
,
7206 .v
.func
= alc269_fixup_limit_int_mic_boost
7208 [ALC255_FIXUP_DELL_SPK_NOISE
] = {
7209 .type
= HDA_FIXUP_FUNC
,
7210 .v
.func
= alc_fixup_disable_aamix
,
7212 .chain_id
= ALC255_FIXUP_DELL1_MIC_NO_PRESENCE
7214 [ALC225_FIXUP_DISABLE_MIC_VREF
] = {
7215 .type
= HDA_FIXUP_FUNC
,
7216 .v
.func
= alc_fixup_disable_mic_vref
,
7218 .chain_id
= ALC269_FIXUP_DELL1_MIC_NO_PRESENCE
7220 [ALC225_FIXUP_DELL1_MIC_NO_PRESENCE
] = {
7221 .type
= HDA_FIXUP_VERBS
,
7222 .v
.verbs
= (const struct hda_verb
[]) {
7223 /* Disable pass-through path for FRONT 14h */
7224 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x36 },
7225 { 0x20, AC_VERB_SET_PROC_COEF
, 0x57d7 },
7229 .chain_id
= ALC225_FIXUP_DISABLE_MIC_VREF
7231 [ALC280_FIXUP_HP_HEADSET_MIC
] = {
7232 .type
= HDA_FIXUP_FUNC
,
7233 .v
.func
= alc_fixup_disable_aamix
,
7235 .chain_id
= ALC269_FIXUP_HEADSET_MIC
,
7237 [ALC221_FIXUP_HP_FRONT_MIC
] = {
7238 .type
= HDA_FIXUP_PINS
,
7239 .v
.pins
= (const struct hda_pintbl
[]) {
7240 { 0x19, 0x02a19020 }, /* Front Mic */
7244 [ALC292_FIXUP_TPT460
] = {
7245 .type
= HDA_FIXUP_FUNC
,
7246 .v
.func
= alc_fixup_tpt440_dock
,
7248 .chain_id
= ALC293_FIXUP_LENOVO_SPK_NOISE
,
7250 [ALC298_FIXUP_SPK_VOLUME
] = {
7251 .type
= HDA_FIXUP_FUNC
,
7252 .v
.func
= alc298_fixup_speaker_volume
,
7254 .chain_id
= ALC298_FIXUP_DELL_AIO_MIC_NO_PRESENCE
,
7256 [ALC298_FIXUP_LENOVO_SPK_VOLUME
] = {
7257 .type
= HDA_FIXUP_FUNC
,
7258 .v
.func
= alc298_fixup_speaker_volume
,
7260 [ALC295_FIXUP_DISABLE_DAC3
] = {
7261 .type
= HDA_FIXUP_FUNC
,
7262 .v
.func
= alc295_fixup_disable_dac3
,
7264 [ALC285_FIXUP_SPEAKER2_TO_DAC1
] = {
7265 .type
= HDA_FIXUP_FUNC
,
7266 .v
.func
= alc285_fixup_speaker2_to_dac1
,
7268 .chain_id
= ALC269_FIXUP_THINKPAD_ACPI
7270 [ALC256_FIXUP_DELL_INSPIRON_7559_SUBWOOFER
] = {
7271 .type
= HDA_FIXUP_PINS
,
7272 .v
.pins
= (const struct hda_pintbl
[]) {
7273 { 0x1b, 0x90170151 },
7277 .chain_id
= ALC255_FIXUP_DELL1_MIC_NO_PRESENCE
7279 [ALC269_FIXUP_ATIV_BOOK_8
] = {
7280 .type
= HDA_FIXUP_FUNC
,
7281 .v
.func
= alc_fixup_auto_mute_via_amp
,
7283 .chain_id
= ALC269_FIXUP_NO_SHUTUP
7285 [ALC221_FIXUP_HP_MIC_NO_PRESENCE
] = {
7286 .type
= HDA_FIXUP_PINS
,
7287 .v
.pins
= (const struct hda_pintbl
[]) {
7288 { 0x18, 0x01a1913c }, /* use as headset mic, without its own jack detect */
7289 { 0x1a, 0x01a1913d }, /* use as headphone mic, without its own jack detect */
7293 .chain_id
= ALC269_FIXUP_HEADSET_MODE
7295 [ALC256_FIXUP_ASUS_HEADSET_MODE
] = {
7296 .type
= HDA_FIXUP_FUNC
,
7297 .v
.func
= alc_fixup_headset_mode
,
7299 [ALC256_FIXUP_ASUS_MIC
] = {
7300 .type
= HDA_FIXUP_PINS
,
7301 .v
.pins
= (const struct hda_pintbl
[]) {
7302 { 0x13, 0x90a60160 }, /* use as internal mic */
7303 { 0x19, 0x04a11120 }, /* use as headset mic, without its own jack detect */
7307 .chain_id
= ALC256_FIXUP_ASUS_HEADSET_MODE
7309 [ALC256_FIXUP_ASUS_AIO_GPIO2
] = {
7310 .type
= HDA_FIXUP_FUNC
,
7311 /* Set up GPIO2 for the speaker amp */
7312 .v
.func
= alc_fixup_gpio4
,
7314 [ALC233_FIXUP_ASUS_MIC_NO_PRESENCE
] = {
7315 .type
= HDA_FIXUP_PINS
,
7316 .v
.pins
= (const struct hda_pintbl
[]) {
7317 { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */
7321 .chain_id
= ALC269_FIXUP_HEADSET_MIC
7323 [ALC233_FIXUP_EAPD_COEF_AND_MIC_NO_PRESENCE
] = {
7324 .type
= HDA_FIXUP_VERBS
,
7325 .v
.verbs
= (const struct hda_verb
[]) {
7326 /* Enables internal speaker */
7327 {0x20, AC_VERB_SET_COEF_INDEX
, 0x40},
7328 {0x20, AC_VERB_SET_PROC_COEF
, 0x8800},
7332 .chain_id
= ALC233_FIXUP_ASUS_MIC_NO_PRESENCE
7334 [ALC233_FIXUP_LENOVO_MULTI_CODECS
] = {
7335 .type
= HDA_FIXUP_FUNC
,
7336 .v
.func
= alc233_alc662_fixup_lenovo_dual_codecs
,
7338 .chain_id
= ALC269_FIXUP_GPIO2
7340 [ALC233_FIXUP_ACER_HEADSET_MIC
] = {
7341 .type
= HDA_FIXUP_VERBS
,
7342 .v
.verbs
= (const struct hda_verb
[]) {
7343 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x45 },
7344 { 0x20, AC_VERB_SET_PROC_COEF
, 0x5089 },
7348 .chain_id
= ALC233_FIXUP_ASUS_MIC_NO_PRESENCE
7350 [ALC294_FIXUP_LENOVO_MIC_LOCATION
] = {
7351 .type
= HDA_FIXUP_PINS
,
7352 .v
.pins
= (const struct hda_pintbl
[]) {
7353 /* Change the mic location from front to right, otherwise there are
7354 two front mics with the same name, pulseaudio can't handle them.
7355 This is just a temporary workaround, after applying this fixup,
7356 there will be one "Front Mic" and one "Mic" in this machine.
7358 { 0x1a, 0x04a19040 },
7362 [ALC225_FIXUP_DELL_WYSE_MIC_NO_PRESENCE
] = {
7363 .type
= HDA_FIXUP_PINS
,
7364 .v
.pins
= (const struct hda_pintbl
[]) {
7365 { 0x16, 0x0101102f }, /* Rear Headset HP */
7366 { 0x19, 0x02a1913c }, /* use as Front headset mic, without its own jack detect */
7367 { 0x1a, 0x01a19030 }, /* Rear Headset MIC */
7368 { 0x1b, 0x02011020 },
7372 .chain_id
= ALC225_FIXUP_S3_POP_NOISE
7374 [ALC225_FIXUP_S3_POP_NOISE
] = {
7375 .type
= HDA_FIXUP_FUNC
,
7376 .v
.func
= alc225_fixup_s3_pop_noise
,
7378 .chain_id
= ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC
7380 [ALC700_FIXUP_INTEL_REFERENCE
] = {
7381 .type
= HDA_FIXUP_VERBS
,
7382 .v
.verbs
= (const struct hda_verb
[]) {
7383 /* Enables internal speaker */
7384 {0x20, AC_VERB_SET_COEF_INDEX
, 0x45},
7385 {0x20, AC_VERB_SET_PROC_COEF
, 0x5289},
7386 {0x20, AC_VERB_SET_COEF_INDEX
, 0x4A},
7387 {0x20, AC_VERB_SET_PROC_COEF
, 0x001b},
7388 {0x58, AC_VERB_SET_COEF_INDEX
, 0x00},
7389 {0x58, AC_VERB_SET_PROC_COEF
, 0x3888},
7390 {0x20, AC_VERB_SET_COEF_INDEX
, 0x6f},
7391 {0x20, AC_VERB_SET_PROC_COEF
, 0x2c0b},
7395 [ALC274_FIXUP_DELL_BIND_DACS
] = {
7396 .type
= HDA_FIXUP_FUNC
,
7397 .v
.func
= alc274_fixup_bind_dacs
,
7399 .chain_id
= ALC269_FIXUP_DELL1_MIC_NO_PRESENCE
7401 [ALC274_FIXUP_DELL_AIO_LINEOUT_VERB
] = {
7402 .type
= HDA_FIXUP_PINS
,
7403 .v
.pins
= (const struct hda_pintbl
[]) {
7404 { 0x1b, 0x0401102f },
7408 .chain_id
= ALC274_FIXUP_DELL_BIND_DACS
7410 [ALC298_FIXUP_TPT470_DOCK_FIX
] = {
7411 .type
= HDA_FIXUP_FUNC
,
7412 .v
.func
= alc_fixup_tpt470_dock
,
7414 .chain_id
= ALC293_FIXUP_LENOVO_SPK_NOISE
7416 [ALC298_FIXUP_TPT470_DOCK
] = {
7417 .type
= HDA_FIXUP_FUNC
,
7418 .v
.func
= alc_fixup_tpt470_dacs
,
7420 .chain_id
= ALC298_FIXUP_TPT470_DOCK_FIX
7422 [ALC255_FIXUP_DUMMY_LINEOUT_VERB
] = {
7423 .type
= HDA_FIXUP_PINS
,
7424 .v
.pins
= (const struct hda_pintbl
[]) {
7425 { 0x14, 0x0201101f },
7429 .chain_id
= ALC255_FIXUP_DELL1_MIC_NO_PRESENCE
7431 [ALC255_FIXUP_DELL_HEADSET_MIC
] = {
7432 .type
= HDA_FIXUP_PINS
,
7433 .v
.pins
= (const struct hda_pintbl
[]) {
7434 { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */
7438 .chain_id
= ALC269_FIXUP_HEADSET_MIC
7440 [ALC295_FIXUP_HP_X360
] = {
7441 .type
= HDA_FIXUP_FUNC
,
7442 .v
.func
= alc295_fixup_hp_top_speakers
,
7444 .chain_id
= ALC269_FIXUP_HP_MUTE_LED_MIC3
7446 [ALC221_FIXUP_HP_HEADSET_MIC
] = {
7447 .type
= HDA_FIXUP_PINS
,
7448 .v
.pins
= (const struct hda_pintbl
[]) {
7449 { 0x19, 0x0181313f},
7453 .chain_id
= ALC269_FIXUP_HEADSET_MIC
7455 [ALC285_FIXUP_LENOVO_HEADPHONE_NOISE
] = {
7456 .type
= HDA_FIXUP_FUNC
,
7457 .v
.func
= alc285_fixup_invalidate_dacs
,
7459 .chain_id
= ALC269_FIXUP_THINKPAD_ACPI
7461 [ALC295_FIXUP_HP_AUTO_MUTE
] = {
7462 .type
= HDA_FIXUP_FUNC
,
7463 .v
.func
= alc_fixup_auto_mute_via_amp
,
7465 [ALC286_FIXUP_ACER_AIO_MIC_NO_PRESENCE
] = {
7466 .type
= HDA_FIXUP_PINS
,
7467 .v
.pins
= (const struct hda_pintbl
[]) {
7468 { 0x18, 0x01a1913c }, /* use as headset mic, without its own jack detect */
7472 .chain_id
= ALC269_FIXUP_HEADSET_MIC
7474 [ALC294_FIXUP_ASUS_MIC
] = {
7475 .type
= HDA_FIXUP_PINS
,
7476 .v
.pins
= (const struct hda_pintbl
[]) {
7477 { 0x13, 0x90a60160 }, /* use as internal mic */
7478 { 0x19, 0x04a11120 }, /* use as headset mic, without its own jack detect */
7482 .chain_id
= ALC269_FIXUP_HEADSET_MIC
7484 [ALC294_FIXUP_ASUS_HEADSET_MIC
] = {
7485 .type
= HDA_FIXUP_PINS
,
7486 .v
.pins
= (const struct hda_pintbl
[]) {
7487 { 0x19, 0x01a1103c }, /* use as headset mic */
7491 .chain_id
= ALC269_FIXUP_HEADSET_MIC
7493 [ALC294_FIXUP_ASUS_SPK
] = {
7494 .type
= HDA_FIXUP_VERBS
,
7495 .v
.verbs
= (const struct hda_verb
[]) {
7497 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x40 },
7498 { 0x20, AC_VERB_SET_PROC_COEF
, 0x8800 },
7499 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x0f },
7500 { 0x20, AC_VERB_SET_PROC_COEF
, 0x7774 },
7504 .chain_id
= ALC294_FIXUP_ASUS_HEADSET_MIC
7506 [ALC295_FIXUP_CHROME_BOOK
] = {
7507 .type
= HDA_FIXUP_FUNC
,
7508 .v
.func
= alc295_fixup_chromebook
,
7510 .chain_id
= ALC225_FIXUP_HEADSET_JACK
7512 [ALC225_FIXUP_HEADSET_JACK
] = {
7513 .type
= HDA_FIXUP_FUNC
,
7514 .v
.func
= alc_fixup_headset_jack
,
7516 [ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
] = {
7517 .type
= HDA_FIXUP_PINS
,
7518 .v
.pins
= (const struct hda_pintbl
[]) {
7519 { 0x1a, 0x01a1913c }, /* use as headset mic, without its own jack detect */
7523 .chain_id
= ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC
7525 [ALC285_FIXUP_LENOVO_PC_BEEP_IN_NOISE
] = {
7526 .type
= HDA_FIXUP_VERBS
,
7527 .v
.verbs
= (const struct hda_verb
[]) {
7528 /* Disable PCBEEP-IN passthrough */
7529 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x36 },
7530 { 0x20, AC_VERB_SET_PROC_COEF
, 0x57d7 },
7534 .chain_id
= ALC285_FIXUP_LENOVO_HEADPHONE_NOISE
7536 [ALC255_FIXUP_ACER_HEADSET_MIC
] = {
7537 .type
= HDA_FIXUP_PINS
,
7538 .v
.pins
= (const struct hda_pintbl
[]) {
7539 { 0x19, 0x03a11130 },
7540 { 0x1a, 0x90a60140 }, /* use as internal mic */
7544 .chain_id
= ALC255_FIXUP_HEADSET_MODE_NO_HP_MIC
7546 [ALC225_FIXUP_DELL_WYSE_AIO_MIC_NO_PRESENCE
] = {
7547 .type
= HDA_FIXUP_PINS
,
7548 .v
.pins
= (const struct hda_pintbl
[]) {
7549 { 0x16, 0x01011020 }, /* Rear Line out */
7550 { 0x19, 0x01a1913c }, /* use as Front headset mic, without its own jack detect */
7554 .chain_id
= ALC225_FIXUP_WYSE_AUTO_MUTE
7556 [ALC225_FIXUP_WYSE_AUTO_MUTE
] = {
7557 .type
= HDA_FIXUP_FUNC
,
7558 .v
.func
= alc_fixup_auto_mute_via_amp
,
7560 .chain_id
= ALC225_FIXUP_WYSE_DISABLE_MIC_VREF
7562 [ALC225_FIXUP_WYSE_DISABLE_MIC_VREF
] = {
7563 .type
= HDA_FIXUP_FUNC
,
7564 .v
.func
= alc_fixup_disable_mic_vref
,
7566 .chain_id
= ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC
7568 [ALC286_FIXUP_ACER_AIO_HEADSET_MIC
] = {
7569 .type
= HDA_FIXUP_VERBS
,
7570 .v
.verbs
= (const struct hda_verb
[]) {
7571 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x4f },
7572 { 0x20, AC_VERB_SET_PROC_COEF
, 0x5029 },
7576 .chain_id
= ALC286_FIXUP_ACER_AIO_MIC_NO_PRESENCE
7578 [ALC256_FIXUP_ASUS_HEADSET_MIC
] = {
7579 .type
= HDA_FIXUP_PINS
,
7580 .v
.pins
= (const struct hda_pintbl
[]) {
7581 { 0x19, 0x03a11020 }, /* headset mic with jack detect */
7585 .chain_id
= ALC256_FIXUP_ASUS_HEADSET_MODE
7587 [ALC256_FIXUP_ASUS_MIC_NO_PRESENCE
] = {
7588 .type
= HDA_FIXUP_PINS
,
7589 .v
.pins
= (const struct hda_pintbl
[]) {
7590 { 0x19, 0x04a11120 }, /* use as headset mic, without its own jack detect */
7594 .chain_id
= ALC256_FIXUP_ASUS_HEADSET_MODE
7596 [ALC299_FIXUP_PREDATOR_SPK
] = {
7597 .type
= HDA_FIXUP_PINS
,
7598 .v
.pins
= (const struct hda_pintbl
[]) {
7599 { 0x21, 0x90170150 }, /* use as headset mic, without its own jack detect */
7603 [ALC256_FIXUP_MEDION_HEADSET_NO_PRESENCE
] = {
7604 .type
= HDA_FIXUP_PINS
,
7605 .v
.pins
= (const struct hda_pintbl
[]) {
7606 { 0x19, 0x04a11040 },
7607 { 0x21, 0x04211020 },
7611 .chain_id
= ALC256_FIXUP_ASUS_HEADSET_MODE
7613 [ALC289_FIXUP_DELL_SPK2
] = {
7614 .type
= HDA_FIXUP_PINS
,
7615 .v
.pins
= (const struct hda_pintbl
[]) {
7616 { 0x17, 0x90170130 }, /* bass spk */
7620 .chain_id
= ALC269_FIXUP_DELL4_MIC_NO_PRESENCE
7622 [ALC289_FIXUP_DUAL_SPK
] = {
7623 .type
= HDA_FIXUP_FUNC
,
7624 .v
.func
= alc285_fixup_speaker2_to_dac1
,
7626 .chain_id
= ALC289_FIXUP_DELL_SPK2
7628 [ALC294_FIXUP_SPK2_TO_DAC1
] = {
7629 .type
= HDA_FIXUP_FUNC
,
7630 .v
.func
= alc285_fixup_speaker2_to_dac1
,
7632 .chain_id
= ALC294_FIXUP_ASUS_HEADSET_MIC
7634 [ALC294_FIXUP_ASUS_DUAL_SPK
] = {
7635 .type
= HDA_FIXUP_FUNC
,
7636 /* The GPIO must be pulled to initialize the AMP */
7637 .v
.func
= alc_fixup_gpio4
,
7639 .chain_id
= ALC294_FIXUP_SPK2_TO_DAC1
7641 [ALC285_FIXUP_THINKPAD_X1_GEN7
] = {
7642 .type
= HDA_FIXUP_FUNC
,
7643 .v
.func
= alc285_fixup_thinkpad_x1_gen7
,
7645 .chain_id
= ALC269_FIXUP_THINKPAD_ACPI
7647 [ALC285_FIXUP_THINKPAD_HEADSET_JACK
] = {
7648 .type
= HDA_FIXUP_FUNC
,
7649 .v
.func
= alc_fixup_headset_jack
,
7651 .chain_id
= ALC285_FIXUP_THINKPAD_X1_GEN7
7653 [ALC294_FIXUP_ASUS_HPE
] = {
7654 .type
= HDA_FIXUP_VERBS
,
7655 .v
.verbs
= (const struct hda_verb
[]) {
7657 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x0f },
7658 { 0x20, AC_VERB_SET_PROC_COEF
, 0x7774 },
7662 .chain_id
= ALC294_FIXUP_ASUS_HEADSET_MIC
7664 [ALC294_FIXUP_ASUS_GX502_PINS
] = {
7665 .type
= HDA_FIXUP_PINS
,
7666 .v
.pins
= (const struct hda_pintbl
[]) {
7667 { 0x19, 0x03a11050 }, /* front HP mic */
7668 { 0x1a, 0x01a11830 }, /* rear external mic */
7669 { 0x21, 0x03211020 }, /* front HP out */
7673 .chain_id
= ALC294_FIXUP_ASUS_GX502_VERBS
7675 [ALC294_FIXUP_ASUS_GX502_VERBS
] = {
7676 .type
= HDA_FIXUP_VERBS
,
7677 .v
.verbs
= (const struct hda_verb
[]) {
7678 /* set 0x15 to HP-OUT ctrl */
7679 { 0x15, AC_VERB_SET_PIN_WIDGET_CONTROL
, 0xc0 },
7680 /* unmute the 0x15 amp */
7681 { 0x15, AC_VERB_SET_AMP_GAIN_MUTE
, 0xb000 },
7685 .chain_id
= ALC294_FIXUP_ASUS_GX502_HP
7687 [ALC294_FIXUP_ASUS_GX502_HP
] = {
7688 .type
= HDA_FIXUP_FUNC
,
7689 .v
.func
= alc294_fixup_gx502_hp
,
7691 [ALC294_FIXUP_ASUS_COEF_1B
] = {
7692 .type
= HDA_FIXUP_VERBS
,
7693 .v
.verbs
= (const struct hda_verb
[]) {
7694 /* Set bit 10 to correct noisy output after reboot from
7695 * Windows 10 (due to pop noise reduction?)
7697 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x1b },
7698 { 0x20, AC_VERB_SET_PROC_COEF
, 0x4e4b },
7702 [ALC285_FIXUP_HP_GPIO_LED
] = {
7703 .type
= HDA_FIXUP_FUNC
,
7704 .v
.func
= alc285_fixup_hp_gpio_led
,
7706 [ALC285_FIXUP_HP_MUTE_LED
] = {
7707 .type
= HDA_FIXUP_FUNC
,
7708 .v
.func
= alc285_fixup_hp_mute_led
,
7710 [ALC236_FIXUP_HP_GPIO_LED
] = {
7711 .type
= HDA_FIXUP_FUNC
,
7712 .v
.func
= alc236_fixup_hp_gpio_led
,
7714 [ALC236_FIXUP_HP_MUTE_LED
] = {
7715 .type
= HDA_FIXUP_FUNC
,
7716 .v
.func
= alc236_fixup_hp_mute_led
,
7718 [ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF
] = {
7719 .type
= HDA_FIXUP_FUNC
,
7720 .v
.func
= alc236_fixup_hp_mute_led_micmute_vref
,
7722 [ALC298_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET
] = {
7723 .type
= HDA_FIXUP_VERBS
,
7724 .v
.verbs
= (const struct hda_verb
[]) {
7725 { 0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL
, 0xc5 },
7729 [ALC295_FIXUP_ASUS_MIC_NO_PRESENCE
] = {
7730 .type
= HDA_FIXUP_PINS
,
7731 .v
.pins
= (const struct hda_pintbl
[]) {
7732 { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */
7736 .chain_id
= ALC269_FIXUP_HEADSET_MODE
7738 [ALC269VC_FIXUP_ACER_VCOPPERBOX_PINS
] = {
7739 .type
= HDA_FIXUP_PINS
,
7740 .v
.pins
= (const struct hda_pintbl
[]) {
7741 { 0x14, 0x90100120 }, /* use as internal speaker */
7742 { 0x18, 0x02a111f0 }, /* use as headset mic, without its own jack detect */
7743 { 0x1a, 0x01011020 }, /* use as line out */
7747 .chain_id
= ALC269_FIXUP_HEADSET_MIC
7749 [ALC269VC_FIXUP_ACER_HEADSET_MIC
] = {
7750 .type
= HDA_FIXUP_PINS
,
7751 .v
.pins
= (const struct hda_pintbl
[]) {
7752 { 0x18, 0x02a11030 }, /* use as headset mic */
7756 .chain_id
= ALC269_FIXUP_HEADSET_MIC
7758 [ALC269VC_FIXUP_ACER_MIC_NO_PRESENCE
] = {
7759 .type
= HDA_FIXUP_PINS
,
7760 .v
.pins
= (const struct hda_pintbl
[]) {
7761 { 0x18, 0x01a11130 }, /* use as headset mic, without its own jack detect */
7765 .chain_id
= ALC269_FIXUP_HEADSET_MIC
7767 [ALC289_FIXUP_ASUS_GA401
] = {
7768 .type
= HDA_FIXUP_FUNC
,
7769 .v
.func
= alc289_fixup_asus_ga401
,
7771 .chain_id
= ALC289_FIXUP_ASUS_GA502
,
7773 [ALC289_FIXUP_ASUS_GA502
] = {
7774 .type
= HDA_FIXUP_PINS
,
7775 .v
.pins
= (const struct hda_pintbl
[]) {
7776 { 0x19, 0x03a11020 }, /* headset mic with jack detect */
7780 [ALC256_FIXUP_ACER_MIC_NO_PRESENCE
] = {
7781 .type
= HDA_FIXUP_PINS
,
7782 .v
.pins
= (const struct hda_pintbl
[]) {
7783 { 0x19, 0x02a11120 }, /* use as headset mic, without its own jack detect */
7787 .chain_id
= ALC256_FIXUP_ASUS_HEADSET_MODE
7789 [ALC285_FIXUP_HP_GPIO_AMP_INIT
] = {
7790 .type
= HDA_FIXUP_FUNC
,
7791 .v
.func
= alc285_fixup_hp_gpio_amp_init
,
7793 .chain_id
= ALC285_FIXUP_HP_GPIO_LED
7795 [ALC269_FIXUP_CZC_B20
] = {
7796 .type
= HDA_FIXUP_PINS
,
7797 .v
.pins
= (const struct hda_pintbl
[]) {
7798 { 0x12, 0x411111f0 },
7799 { 0x14, 0x90170110 }, /* speaker */
7800 { 0x15, 0x032f1020 }, /* HP out */
7801 { 0x17, 0x411111f0 },
7802 { 0x18, 0x03ab1040 }, /* mic */
7803 { 0x19, 0xb7a7013f },
7804 { 0x1a, 0x0181305f },
7805 { 0x1b, 0x411111f0 },
7806 { 0x1d, 0x411111f0 },
7807 { 0x1e, 0x411111f0 },
7810 .chain_id
= ALC269_FIXUP_DMIC
,
7812 [ALC269_FIXUP_CZC_TMI
] = {
7813 .type
= HDA_FIXUP_PINS
,
7814 .v
.pins
= (const struct hda_pintbl
[]) {
7815 { 0x12, 0x4000c000 },
7816 { 0x14, 0x90170110 }, /* speaker */
7817 { 0x15, 0x0421401f }, /* HP out */
7818 { 0x17, 0x411111f0 },
7819 { 0x18, 0x04a19020 }, /* mic */
7820 { 0x19, 0x411111f0 },
7821 { 0x1a, 0x411111f0 },
7822 { 0x1b, 0x411111f0 },
7823 { 0x1d, 0x40448505 },
7824 { 0x1e, 0x411111f0 },
7825 { 0x20, 0x8000ffff },
7828 .chain_id
= ALC269_FIXUP_DMIC
,
7830 [ALC269_FIXUP_CZC_L101
] = {
7831 .type
= HDA_FIXUP_PINS
,
7832 .v
.pins
= (const struct hda_pintbl
[]) {
7833 { 0x12, 0x40000000 },
7834 { 0x14, 0x01014010 }, /* speaker */
7835 { 0x15, 0x411111f0 }, /* HP out */
7836 { 0x16, 0x411111f0 },
7837 { 0x18, 0x01a19020 }, /* mic */
7838 { 0x19, 0x02a19021 },
7839 { 0x1a, 0x0181302f },
7840 { 0x1b, 0x0221401f },
7841 { 0x1c, 0x411111f0 },
7842 { 0x1d, 0x4044c601 },
7843 { 0x1e, 0x411111f0 },
7846 .chain_id
= ALC269_FIXUP_DMIC
,
7848 [ALC269_FIXUP_LEMOTE_A1802
] = {
7849 .type
= HDA_FIXUP_PINS
,
7850 .v
.pins
= (const struct hda_pintbl
[]) {
7851 { 0x12, 0x40000000 },
7852 { 0x14, 0x90170110 }, /* speaker */
7853 { 0x17, 0x411111f0 },
7854 { 0x18, 0x03a19040 }, /* mic1 */
7855 { 0x19, 0x90a70130 }, /* mic2 */
7856 { 0x1a, 0x411111f0 },
7857 { 0x1b, 0x411111f0 },
7858 { 0x1d, 0x40489d2d },
7859 { 0x1e, 0x411111f0 },
7860 { 0x20, 0x0003ffff },
7861 { 0x21, 0x03214020 },
7864 .chain_id
= ALC269_FIXUP_DMIC
,
7866 [ALC269_FIXUP_LEMOTE_A190X
] = {
7867 .type
= HDA_FIXUP_PINS
,
7868 .v
.pins
= (const struct hda_pintbl
[]) {
7869 { 0x14, 0x99130110 }, /* speaker */
7870 { 0x15, 0x0121401f }, /* HP out */
7871 { 0x18, 0x01a19c20 }, /* rear mic */
7872 { 0x19, 0x99a3092f }, /* front mic */
7873 { 0x1b, 0x0201401f }, /* front lineout */
7876 .chain_id
= ALC269_FIXUP_DMIC
,
7878 [ALC256_FIXUP_INTEL_NUC8_RUGGED
] = {
7879 .type
= HDA_FIXUP_PINS
,
7880 .v
.pins
= (const struct hda_pintbl
[]) {
7881 { 0x1b, 0x01a1913c }, /* use as headset mic, without its own jack detect */
7885 .chain_id
= ALC269_FIXUP_HEADSET_MODE
7887 [ALC256_FIXUP_INTEL_NUC10
] = {
7888 .type
= HDA_FIXUP_PINS
,
7889 .v
.pins
= (const struct hda_pintbl
[]) {
7890 { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */
7894 .chain_id
= ALC269_FIXUP_HEADSET_MODE
7896 [ALC255_FIXUP_XIAOMI_HEADSET_MIC
] = {
7897 .type
= HDA_FIXUP_VERBS
,
7898 .v
.verbs
= (const struct hda_verb
[]) {
7899 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x45 },
7900 { 0x20, AC_VERB_SET_PROC_COEF
, 0x5089 },
7904 .chain_id
= ALC289_FIXUP_ASUS_GA502
7906 [ALC274_FIXUP_HP_MIC
] = {
7907 .type
= HDA_FIXUP_VERBS
,
7908 .v
.verbs
= (const struct hda_verb
[]) {
7909 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x45 },
7910 { 0x20, AC_VERB_SET_PROC_COEF
, 0x5089 },
7914 [ALC274_FIXUP_HP_HEADSET_MIC
] = {
7915 .type
= HDA_FIXUP_FUNC
,
7916 .v
.func
= alc274_fixup_hp_headset_mic
,
7918 .chain_id
= ALC274_FIXUP_HP_MIC
7920 [ALC274_FIXUP_HP_ENVY_GPIO
] = {
7921 .type
= HDA_FIXUP_FUNC
,
7922 .v
.func
= alc274_fixup_hp_envy_gpio
,
7924 [ALC256_FIXUP_ASUS_HPE
] = {
7925 .type
= HDA_FIXUP_VERBS
,
7926 .v
.verbs
= (const struct hda_verb
[]) {
7928 { 0x20, AC_VERB_SET_COEF_INDEX
, 0x0f },
7929 { 0x20, AC_VERB_SET_PROC_COEF
, 0x7778 },
7933 .chain_id
= ALC294_FIXUP_ASUS_HEADSET_MIC
7935 [ALC285_FIXUP_THINKPAD_NO_BASS_SPK_HEADSET_JACK
] = {
7936 .type
= HDA_FIXUP_FUNC
,
7937 .v
.func
= alc_fixup_headset_jack
,
7939 .chain_id
= ALC269_FIXUP_THINKPAD_ACPI
7941 [ALC287_FIXUP_HP_GPIO_LED
] = {
7942 .type
= HDA_FIXUP_FUNC
,
7943 .v
.func
= alc287_fixup_hp_gpio_led
,
7945 [ALC256_FIXUP_HP_HEADSET_MIC
] = {
7946 .type
= HDA_FIXUP_FUNC
,
7947 .v
.func
= alc274_fixup_hp_headset_mic
,
7949 [ALC236_FIXUP_DELL_AIO_HEADSET_MIC
] = {
7950 .type
= HDA_FIXUP_FUNC
,
7951 .v
.func
= alc_fixup_no_int_mic
,
7953 .chain_id
= ALC255_FIXUP_DELL1_MIC_NO_PRESENCE
7955 [ALC282_FIXUP_ACER_DISABLE_LINEOUT
] = {
7956 .type
= HDA_FIXUP_PINS
,
7957 .v
.pins
= (const struct hda_pintbl
[]) {
7958 { 0x1b, 0x411111f0 },
7959 { 0x18, 0x01a1913c }, /* use as headset mic, without its own jack detect */
7963 .chain_id
= ALC269_FIXUP_HEADSET_MODE
7965 [ALC255_FIXUP_ACER_LIMIT_INT_MIC_BOOST
] = {
7966 .type
= HDA_FIXUP_FUNC
,
7967 .v
.func
= alc269_fixup_limit_int_mic_boost
,
7969 .chain_id
= ALC255_FIXUP_ACER_MIC_NO_PRESENCE
,
7971 [ALC256_FIXUP_ACER_HEADSET_MIC
] = {
7972 .type
= HDA_FIXUP_PINS
,
7973 .v
.pins
= (const struct hda_pintbl
[]) {
7974 { 0x19, 0x02a1113c }, /* use as headset mic, without its own jack detect */
7975 { 0x1a, 0x90a1092f }, /* use as internal mic */
7979 .chain_id
= ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC
7981 [ALC285_FIXUP_HP_LIMIT_INT_MIC_BOOST
] = {
7982 .type
= HDA_FIXUP_FUNC
,
7983 .v
.func
= alc269_fixup_limit_int_mic_boost
,
7985 .chain_id
= ALC285_FIXUP_HP_MUTE_LED
,
7987 [ALC285_FIXUP_IDEAPAD_S740_COEF
] = {
7988 .type
= HDA_FIXUP_FUNC
,
7989 .v
.func
= alc285_fixup_ideapad_s740_coef
,
7991 .chain_id
= ALC269_FIXUP_THINKPAD_ACPI
,
7995 static const struct snd_pci_quirk alc269_fixup_tbl
[] = {
7996 SND_PCI_QUIRK(0x1025, 0x0283, "Acer TravelMate 8371", ALC269_FIXUP_INV_DMIC
),
7997 SND_PCI_QUIRK(0x1025, 0x029b, "Acer 1810TZ", ALC269_FIXUP_INV_DMIC
),
7998 SND_PCI_QUIRK(0x1025, 0x0349, "Acer AOD260", ALC269_FIXUP_INV_DMIC
),
7999 SND_PCI_QUIRK(0x1025, 0x047c, "Acer AC700", ALC269_FIXUP_ACER_AC700
),
8000 SND_PCI_QUIRK(0x1025, 0x072d, "Acer Aspire V5-571G", ALC269_FIXUP_ASPIRE_HEADSET_MIC
),
8001 SND_PCI_QUIRK(0x1025, 0x0740, "Acer AO725", ALC271_FIXUP_HP_GATE_MIC_JACK
),
8002 SND_PCI_QUIRK(0x1025, 0x0742, "Acer AO756", ALC271_FIXUP_HP_GATE_MIC_JACK
),
8003 SND_PCI_QUIRK(0x1025, 0x0762, "Acer Aspire E1-472", ALC271_FIXUP_HP_GATE_MIC_JACK_E1_572
),
8004 SND_PCI_QUIRK(0x1025, 0x0775, "Acer Aspire E1-572", ALC271_FIXUP_HP_GATE_MIC_JACK_E1_572
),
8005 SND_PCI_QUIRK(0x1025, 0x079b, "Acer Aspire V5-573G", ALC282_FIXUP_ASPIRE_V5_PINS
),
8006 SND_PCI_QUIRK(0x1025, 0x080d, "Acer Aspire V5-122P", ALC269_FIXUP_ASPIRE_HEADSET_MIC
),
8007 SND_PCI_QUIRK(0x1025, 0x0840, "Acer Aspire E1", ALC269VB_FIXUP_ASPIRE_E1_COEF
),
8008 SND_PCI_QUIRK(0x1025, 0x101c, "Acer Veriton N2510G", ALC269_FIXUP_LIFEBOOK
),
8009 SND_PCI_QUIRK(0x1025, 0x102b, "Acer Aspire C24-860", ALC286_FIXUP_ACER_AIO_MIC_NO_PRESENCE
),
8010 SND_PCI_QUIRK(0x1025, 0x1065, "Acer Aspire C20-820", ALC269VC_FIXUP_ACER_HEADSET_MIC
),
8011 SND_PCI_QUIRK(0x1025, 0x106d, "Acer Cloudbook 14", ALC283_FIXUP_CHROME_BOOK
),
8012 SND_PCI_QUIRK(0x1025, 0x1094, "Acer Aspire E5-575T", ALC255_FIXUP_ACER_LIMIT_INT_MIC_BOOST
),
8013 SND_PCI_QUIRK(0x1025, 0x1099, "Acer Aspire E5-523G", ALC255_FIXUP_ACER_MIC_NO_PRESENCE
),
8014 SND_PCI_QUIRK(0x1025, 0x110e, "Acer Aspire ES1-432", ALC255_FIXUP_ACER_MIC_NO_PRESENCE
),
8015 SND_PCI_QUIRK(0x1025, 0x1166, "Acer Veriton N4640G", ALC269_FIXUP_LIFEBOOK
),
8016 SND_PCI_QUIRK(0x1025, 0x1167, "Acer Veriton N6640G", ALC269_FIXUP_LIFEBOOK
),
8017 SND_PCI_QUIRK(0x1025, 0x1246, "Acer Predator Helios 500", ALC299_FIXUP_PREDATOR_SPK
),
8018 SND_PCI_QUIRK(0x1025, 0x1247, "Acer vCopperbox", ALC269VC_FIXUP_ACER_VCOPPERBOX_PINS
),
8019 SND_PCI_QUIRK(0x1025, 0x1248, "Acer Veriton N4660G", ALC269VC_FIXUP_ACER_MIC_NO_PRESENCE
),
8020 SND_PCI_QUIRK(0x1025, 0x1269, "Acer SWIFT SF314-54", ALC256_FIXUP_ACER_HEADSET_MIC
),
8021 SND_PCI_QUIRK(0x1025, 0x128f, "Acer Veriton Z6860G", ALC286_FIXUP_ACER_AIO_HEADSET_MIC
),
8022 SND_PCI_QUIRK(0x1025, 0x1290, "Acer Veriton Z4860G", ALC286_FIXUP_ACER_AIO_HEADSET_MIC
),
8023 SND_PCI_QUIRK(0x1025, 0x1291, "Acer Veriton Z4660G", ALC286_FIXUP_ACER_AIO_HEADSET_MIC
),
8024 SND_PCI_QUIRK(0x1025, 0x129c, "Acer SWIFT SF314-55", ALC256_FIXUP_ACER_HEADSET_MIC
),
8025 SND_PCI_QUIRK(0x1025, 0x1308, "Acer Aspire Z24-890", ALC286_FIXUP_ACER_AIO_HEADSET_MIC
),
8026 SND_PCI_QUIRK(0x1025, 0x132a, "Acer TravelMate B114-21", ALC233_FIXUP_ACER_HEADSET_MIC
),
8027 SND_PCI_QUIRK(0x1025, 0x1330, "Acer TravelMate X514-51T", ALC255_FIXUP_ACER_HEADSET_MIC
),
8028 SND_PCI_QUIRK(0x1025, 0x1430, "Acer TravelMate B311R-31", ALC256_FIXUP_ACER_MIC_NO_PRESENCE
),
8029 SND_PCI_QUIRK(0x1028, 0x0470, "Dell M101z", ALC269_FIXUP_DELL_M101Z
),
8030 SND_PCI_QUIRK(0x1028, 0x054b, "Dell XPS one 2710", ALC275_FIXUP_DELL_XPS
),
8031 SND_PCI_QUIRK(0x1028, 0x05bd, "Dell Latitude E6440", ALC292_FIXUP_DELL_E7X
),
8032 SND_PCI_QUIRK(0x1028, 0x05be, "Dell Latitude E6540", ALC292_FIXUP_DELL_E7X
),
8033 SND_PCI_QUIRK(0x1028, 0x05ca, "Dell Latitude E7240", ALC292_FIXUP_DELL_E7X
),
8034 SND_PCI_QUIRK(0x1028, 0x05cb, "Dell Latitude E7440", ALC292_FIXUP_DELL_E7X
),
8035 SND_PCI_QUIRK(0x1028, 0x05da, "Dell Vostro 5460", ALC290_FIXUP_SUBWOOFER
),
8036 SND_PCI_QUIRK(0x1028, 0x05f4, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE
),
8037 SND_PCI_QUIRK(0x1028, 0x05f5, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE
),
8038 SND_PCI_QUIRK(0x1028, 0x05f6, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE
),
8039 SND_PCI_QUIRK(0x1028, 0x0615, "Dell Vostro 5470", ALC290_FIXUP_SUBWOOFER_HSJACK
),
8040 SND_PCI_QUIRK(0x1028, 0x0616, "Dell Vostro 5470", ALC290_FIXUP_SUBWOOFER_HSJACK
),
8041 SND_PCI_QUIRK(0x1028, 0x062c, "Dell Latitude E5550", ALC292_FIXUP_DELL_E7X
),
8042 SND_PCI_QUIRK(0x1028, 0x062e, "Dell Latitude E7450", ALC292_FIXUP_DELL_E7X
),
8043 SND_PCI_QUIRK(0x1028, 0x0638, "Dell Inspiron 5439", ALC290_FIXUP_MONO_SPEAKERS_HSJACK
),
8044 SND_PCI_QUIRK(0x1028, 0x064a, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE
),
8045 SND_PCI_QUIRK(0x1028, 0x064b, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE
),
8046 SND_PCI_QUIRK(0x1028, 0x0665, "Dell XPS 13", ALC288_FIXUP_DELL_XPS_13
),
8047 SND_PCI_QUIRK(0x1028, 0x0669, "Dell Optiplex 9020m", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE
),
8048 SND_PCI_QUIRK(0x1028, 0x069a, "Dell Vostro 5480", ALC290_FIXUP_SUBWOOFER_HSJACK
),
8049 SND_PCI_QUIRK(0x1028, 0x06c7, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE
),
8050 SND_PCI_QUIRK(0x1028, 0x06d9, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE
),
8051 SND_PCI_QUIRK(0x1028, 0x06da, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE
),
8052 SND_PCI_QUIRK(0x1028, 0x06db, "Dell", ALC293_FIXUP_DISABLE_AAMIX_MULTIJACK
),
8053 SND_PCI_QUIRK(0x1028, 0x06dd, "Dell", ALC293_FIXUP_DISABLE_AAMIX_MULTIJACK
),
8054 SND_PCI_QUIRK(0x1028, 0x06de, "Dell", ALC293_FIXUP_DISABLE_AAMIX_MULTIJACK
),
8055 SND_PCI_QUIRK(0x1028, 0x06df, "Dell", ALC293_FIXUP_DISABLE_AAMIX_MULTIJACK
),
8056 SND_PCI_QUIRK(0x1028, 0x06e0, "Dell", ALC293_FIXUP_DISABLE_AAMIX_MULTIJACK
),
8057 SND_PCI_QUIRK(0x1028, 0x0706, "Dell Inspiron 7559", ALC256_FIXUP_DELL_INSPIRON_7559_SUBWOOFER
),
8058 SND_PCI_QUIRK(0x1028, 0x0725, "Dell Inspiron 3162", ALC255_FIXUP_DELL_SPK_NOISE
),
8059 SND_PCI_QUIRK(0x1028, 0x0738, "Dell Precision 5820", ALC269_FIXUP_NO_SHUTUP
),
8060 SND_PCI_QUIRK(0x1028, 0x075c, "Dell XPS 27 7760", ALC298_FIXUP_SPK_VOLUME
),
8061 SND_PCI_QUIRK(0x1028, 0x075d, "Dell AIO", ALC298_FIXUP_SPK_VOLUME
),
8062 SND_PCI_QUIRK(0x1028, 0x0798, "Dell Inspiron 17 7000 Gaming", ALC256_FIXUP_DELL_INSPIRON_7559_SUBWOOFER
),
8063 SND_PCI_QUIRK(0x1028, 0x07b0, "Dell Precision 7520", ALC295_FIXUP_DISABLE_DAC3
),
8064 SND_PCI_QUIRK(0x1028, 0x080c, "Dell WYSE", ALC225_FIXUP_DELL_WYSE_MIC_NO_PRESENCE
),
8065 SND_PCI_QUIRK(0x1028, 0x084b, "Dell", ALC274_FIXUP_DELL_AIO_LINEOUT_VERB
),
8066 SND_PCI_QUIRK(0x1028, 0x084e, "Dell", ALC274_FIXUP_DELL_AIO_LINEOUT_VERB
),
8067 SND_PCI_QUIRK(0x1028, 0x0871, "Dell Precision 3630", ALC255_FIXUP_DELL_HEADSET_MIC
),
8068 SND_PCI_QUIRK(0x1028, 0x0872, "Dell Precision 3630", ALC255_FIXUP_DELL_HEADSET_MIC
),
8069 SND_PCI_QUIRK(0x1028, 0x0873, "Dell Precision 3930", ALC255_FIXUP_DUMMY_LINEOUT_VERB
),
8070 SND_PCI_QUIRK(0x1028, 0x08ad, "Dell WYSE AIO", ALC225_FIXUP_DELL_WYSE_AIO_MIC_NO_PRESENCE
),
8071 SND_PCI_QUIRK(0x1028, 0x08ae, "Dell WYSE NB", ALC225_FIXUP_DELL1_MIC_NO_PRESENCE
),
8072 SND_PCI_QUIRK(0x1028, 0x0935, "Dell", ALC274_FIXUP_DELL_AIO_LINEOUT_VERB
),
8073 SND_PCI_QUIRK(0x1028, 0x097d, "Dell Precision", ALC289_FIXUP_DUAL_SPK
),
8074 SND_PCI_QUIRK(0x1028, 0x097e, "Dell Precision", ALC289_FIXUP_DUAL_SPK
),
8075 SND_PCI_QUIRK(0x1028, 0x098d, "Dell Precision", ALC233_FIXUP_ASUS_MIC_NO_PRESENCE
),
8076 SND_PCI_QUIRK(0x1028, 0x09bf, "Dell Precision", ALC233_FIXUP_ASUS_MIC_NO_PRESENCE
),
8077 SND_PCI_QUIRK(0x1028, 0x0a2e, "Dell", ALC236_FIXUP_DELL_AIO_HEADSET_MIC
),
8078 SND_PCI_QUIRK(0x1028, 0x0a30, "Dell", ALC236_FIXUP_DELL_AIO_HEADSET_MIC
),
8079 SND_PCI_QUIRK(0x1028, 0x0a58, "Dell", ALC255_FIXUP_DELL_HEADSET_MIC
),
8080 SND_PCI_QUIRK(0x1028, 0x164a, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE
),
8081 SND_PCI_QUIRK(0x1028, 0x164b, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE
),
8082 SND_PCI_QUIRK(0x103c, 0x1586, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC2
),
8083 SND_PCI_QUIRK(0x103c, 0x18e6, "HP", ALC269_FIXUP_HP_GPIO_LED
),
8084 SND_PCI_QUIRK(0x103c, 0x218b, "HP", ALC269_FIXUP_LIMIT_INT_MIC_BOOST_MUTE_LED
),
8085 SND_PCI_QUIRK(0x103c, 0x21f9, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1
),
8086 SND_PCI_QUIRK(0x103c, 0x2210, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1
),
8087 SND_PCI_QUIRK(0x103c, 0x2214, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1
),
8088 SND_PCI_QUIRK(0x103c, 0x221b, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED
),
8089 SND_PCI_QUIRK(0x103c, 0x221c, "HP EliteBook 755 G2", ALC280_FIXUP_HP_HEADSET_MIC
),
8090 SND_PCI_QUIRK(0x103c, 0x2221, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED
),
8091 SND_PCI_QUIRK(0x103c, 0x2225, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED
),
8092 SND_PCI_QUIRK(0x103c, 0x2236, "HP", ALC269_FIXUP_HP_LINE1_MIC1_LED
),
8093 SND_PCI_QUIRK(0x103c, 0x2237, "HP", ALC269_FIXUP_HP_LINE1_MIC1_LED
),
8094 SND_PCI_QUIRK(0x103c, 0x2238, "HP", ALC269_FIXUP_HP_LINE1_MIC1_LED
),
8095 SND_PCI_QUIRK(0x103c, 0x2239, "HP", ALC269_FIXUP_HP_LINE1_MIC1_LED
),
8096 SND_PCI_QUIRK(0x103c, 0x224b, "HP", ALC269_FIXUP_HP_LINE1_MIC1_LED
),
8097 SND_PCI_QUIRK(0x103c, 0x2253, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED
),
8098 SND_PCI_QUIRK(0x103c, 0x2254, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED
),
8099 SND_PCI_QUIRK(0x103c, 0x2255, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED
),
8100 SND_PCI_QUIRK(0x103c, 0x2256, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED
),
8101 SND_PCI_QUIRK(0x103c, 0x2257, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED
),
8102 SND_PCI_QUIRK(0x103c, 0x2259, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED
),
8103 SND_PCI_QUIRK(0x103c, 0x225a, "HP", ALC269_FIXUP_HP_DOCK_GPIO_MIC1_LED
),
8104 SND_PCI_QUIRK(0x103c, 0x225f, "HP", ALC280_FIXUP_HP_GPIO2_MIC_HOTKEY
),
8105 SND_PCI_QUIRK(0x103c, 0x2260, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1
),
8106 SND_PCI_QUIRK(0x103c, 0x2263, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1
),
8107 SND_PCI_QUIRK(0x103c, 0x2264, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1
),
8108 SND_PCI_QUIRK(0x103c, 0x2265, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1
),
8109 SND_PCI_QUIRK(0x103c, 0x2268, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1
),
8110 SND_PCI_QUIRK(0x103c, 0x226a, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1
),
8111 SND_PCI_QUIRK(0x103c, 0x226b, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1
),
8112 SND_PCI_QUIRK(0x103c, 0x226e, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1
),
8113 SND_PCI_QUIRK(0x103c, 0x2271, "HP", ALC286_FIXUP_HP_GPIO_LED
),
8114 SND_PCI_QUIRK(0x103c, 0x2272, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED
),
8115 SND_PCI_QUIRK(0x103c, 0x2272, "HP", ALC280_FIXUP_HP_DOCK_PINS
),
8116 SND_PCI_QUIRK(0x103c, 0x2273, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED
),
8117 SND_PCI_QUIRK(0x103c, 0x2273, "HP", ALC280_FIXUP_HP_DOCK_PINS
),
8118 SND_PCI_QUIRK(0x103c, 0x2278, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED
),
8119 SND_PCI_QUIRK(0x103c, 0x227f, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1
),
8120 SND_PCI_QUIRK(0x103c, 0x2282, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1
),
8121 SND_PCI_QUIRK(0x103c, 0x228b, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1
),
8122 SND_PCI_QUIRK(0x103c, 0x228e, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1
),
8123 SND_PCI_QUIRK(0x103c, 0x229e, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1
),
8124 SND_PCI_QUIRK(0x103c, 0x22b2, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1
),
8125 SND_PCI_QUIRK(0x103c, 0x22b7, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1
),
8126 SND_PCI_QUIRK(0x103c, 0x22bf, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1
),
8127 SND_PCI_QUIRK(0x103c, 0x22c4, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1
),
8128 SND_PCI_QUIRK(0x103c, 0x22c5, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1
),
8129 SND_PCI_QUIRK(0x103c, 0x22c7, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1
),
8130 SND_PCI_QUIRK(0x103c, 0x22c8, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1
),
8131 SND_PCI_QUIRK(0x103c, 0x22cf, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1
),
8132 SND_PCI_QUIRK(0x103c, 0x22db, "HP", ALC280_FIXUP_HP_9480M
),
8133 SND_PCI_QUIRK(0x103c, 0x22dc, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED
),
8134 SND_PCI_QUIRK(0x103c, 0x22fb, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED
),
8135 SND_PCI_QUIRK(0x103c, 0x2334, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1
),
8136 SND_PCI_QUIRK(0x103c, 0x2335, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1
),
8137 SND_PCI_QUIRK(0x103c, 0x2336, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1
),
8138 SND_PCI_QUIRK(0x103c, 0x2337, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1
),
8139 SND_PCI_QUIRK(0x103c, 0x802e, "HP Z240 SFF", ALC221_FIXUP_HP_MIC_NO_PRESENCE
),
8140 SND_PCI_QUIRK(0x103c, 0x802f, "HP Z240", ALC221_FIXUP_HP_MIC_NO_PRESENCE
),
8141 SND_PCI_QUIRK(0x103c, 0x8077, "HP", ALC256_FIXUP_HP_HEADSET_MIC
),
8142 SND_PCI_QUIRK(0x103c, 0x8158, "HP", ALC256_FIXUP_HP_HEADSET_MIC
),
8143 SND_PCI_QUIRK(0x103c, 0x820d, "HP Pavilion 15", ALC269_FIXUP_HP_MUTE_LED_MIC3
),
8144 SND_PCI_QUIRK(0x103c, 0x8256, "HP", ALC221_FIXUP_HP_FRONT_MIC
),
8145 SND_PCI_QUIRK(0x103c, 0x827e, "HP x360", ALC295_FIXUP_HP_X360
),
8146 SND_PCI_QUIRK(0x103c, 0x827f, "HP x360", ALC269_FIXUP_HP_MUTE_LED_MIC3
),
8147 SND_PCI_QUIRK(0x103c, 0x82bf, "HP G3 mini", ALC221_FIXUP_HP_MIC_NO_PRESENCE
),
8148 SND_PCI_QUIRK(0x103c, 0x82c0, "HP G3 mini premium", ALC221_FIXUP_HP_MIC_NO_PRESENCE
),
8149 SND_PCI_QUIRK(0x103c, 0x83b9, "HP Spectre x360", ALC269_FIXUP_HP_MUTE_LED_MIC3
),
8150 SND_PCI_QUIRK(0x103c, 0x8497, "HP Envy x360", ALC269_FIXUP_HP_MUTE_LED_MIC3
),
8151 SND_PCI_QUIRK(0x103c, 0x84e7, "HP Pavilion 15", ALC269_FIXUP_HP_MUTE_LED_MIC3
),
8152 SND_PCI_QUIRK(0x103c, 0x869d, "HP", ALC236_FIXUP_HP_MUTE_LED
),
8153 SND_PCI_QUIRK(0x103c, 0x86c7, "HP Envy AiO 32", ALC274_FIXUP_HP_ENVY_GPIO
),
8154 SND_PCI_QUIRK(0x103c, 0x8716, "HP Elite Dragonfly G2 Notebook PC", ALC285_FIXUP_HP_GPIO_AMP_INIT
),
8155 SND_PCI_QUIRK(0x103c, 0x8720, "HP EliteBook x360 1040 G8 Notebook PC", ALC285_FIXUP_HP_GPIO_AMP_INIT
),
8156 SND_PCI_QUIRK(0x103c, 0x8724, "HP EliteBook 850 G7", ALC285_FIXUP_HP_GPIO_LED
),
8157 SND_PCI_QUIRK(0x103c, 0x8729, "HP", ALC285_FIXUP_HP_GPIO_LED
),
8158 SND_PCI_QUIRK(0x103c, 0x8730, "HP ProBook 445 G7", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF
),
8159 SND_PCI_QUIRK(0x103c, 0x8736, "HP", ALC285_FIXUP_HP_GPIO_AMP_INIT
),
8160 SND_PCI_QUIRK(0x103c, 0x8760, "HP", ALC285_FIXUP_HP_MUTE_LED
),
8161 SND_PCI_QUIRK(0x103c, 0x877a, "HP", ALC285_FIXUP_HP_MUTE_LED
),
8162 SND_PCI_QUIRK(0x103c, 0x877d, "HP", ALC236_FIXUP_HP_MUTE_LED
),
8163 SND_PCI_QUIRK(0x103c, 0x8780, "HP ZBook Fury 17 G7 Mobile Workstation",
8164 ALC285_FIXUP_HP_GPIO_AMP_INIT
),
8165 SND_PCI_QUIRK(0x103c, 0x8783, "HP ZBook Fury 15 G7 Mobile Workstation",
8166 ALC285_FIXUP_HP_GPIO_AMP_INIT
),
8167 SND_PCI_QUIRK(0x103c, 0x87c8, "HP", ALC287_FIXUP_HP_GPIO_LED
),
8168 SND_PCI_QUIRK(0x103c, 0x87e5, "HP ProBook 440 G8 Notebook PC", ALC236_FIXUP_HP_GPIO_LED
),
8169 SND_PCI_QUIRK(0x103c, 0x87f2, "HP ProBook 640 G8 Notebook PC", ALC236_FIXUP_HP_GPIO_LED
),
8170 SND_PCI_QUIRK(0x103c, 0x87f4, "HP", ALC287_FIXUP_HP_GPIO_LED
),
8171 SND_PCI_QUIRK(0x103c, 0x87f5, "HP", ALC287_FIXUP_HP_GPIO_LED
),
8172 SND_PCI_QUIRK(0x103c, 0x87f7, "HP Spectre x360 14", ALC245_FIXUP_HP_X360_AMP
),
8173 SND_PCI_QUIRK(0x103c, 0x8846, "HP EliteBook 850 G8 Notebook PC", ALC285_FIXUP_HP_GPIO_LED
),
8174 SND_PCI_QUIRK(0x103c, 0x884b, "HP EliteBook 840 Aero G8 Notebook PC", ALC285_FIXUP_HP_GPIO_LED
),
8175 SND_PCI_QUIRK(0x103c, 0x884c, "HP EliteBook 840 G8 Notebook PC", ALC285_FIXUP_HP_GPIO_LED
),
8176 SND_PCI_QUIRK(0x103c, 0x886d, "HP ZBook Fury 17.3 Inch G8 Mobile Workstation PC", ALC285_FIXUP_HP_GPIO_AMP_INIT
),
8177 SND_PCI_QUIRK(0x103c, 0x8870, "HP ZBook Fury 15.6 Inch G8 Mobile Workstation PC", ALC285_FIXUP_HP_GPIO_AMP_INIT
),
8178 SND_PCI_QUIRK(0x103c, 0x8873, "HP ZBook Studio 15.6 Inch G8 Mobile Workstation PC", ALC285_FIXUP_HP_GPIO_AMP_INIT
),
8179 SND_PCI_QUIRK(0x103c, 0x8896, "HP EliteBook 855 G8 Notebook PC", ALC285_FIXUP_HP_MUTE_LED
),
8180 SND_PCI_QUIRK(0x103c, 0x8898, "HP EliteBook 845 G8 Notebook PC", ALC285_FIXUP_HP_LIMIT_INT_MIC_BOOST
),
8181 SND_PCI_QUIRK(0x1043, 0x103e, "ASUS X540SA", ALC256_FIXUP_ASUS_MIC
),
8182 SND_PCI_QUIRK(0x1043, 0x103f, "ASUS TX300", ALC282_FIXUP_ASUS_TX300
),
8183 SND_PCI_QUIRK(0x1043, 0x106d, "Asus K53BE", ALC269_FIXUP_LIMIT_INT_MIC_BOOST
),
8184 SND_PCI_QUIRK(0x1043, 0x10a1, "ASUS UX391UA", ALC294_FIXUP_ASUS_SPK
),
8185 SND_PCI_QUIRK(0x1043, 0x10c0, "ASUS X540SA", ALC256_FIXUP_ASUS_MIC
),
8186 SND_PCI_QUIRK(0x1043, 0x10d0, "ASUS X540LA/X540LJ", ALC255_FIXUP_ASUS_MIC_NO_PRESENCE
),
8187 SND_PCI_QUIRK(0x1043, 0x115d, "Asus 1015E", ALC269_FIXUP_LIMIT_INT_MIC_BOOST
),
8188 SND_PCI_QUIRK(0x1043, 0x11c0, "ASUS X556UR", ALC255_FIXUP_ASUS_MIC_NO_PRESENCE
),
8189 SND_PCI_QUIRK(0x1043, 0x125e, "ASUS Q524UQK", ALC255_FIXUP_ASUS_MIC_NO_PRESENCE
),
8190 SND_PCI_QUIRK(0x1043, 0x1271, "ASUS X430UN", ALC256_FIXUP_ASUS_MIC_NO_PRESENCE
),
8191 SND_PCI_QUIRK(0x1043, 0x1290, "ASUS X441SA", ALC233_FIXUP_EAPD_COEF_AND_MIC_NO_PRESENCE
),
8192 SND_PCI_QUIRK(0x1043, 0x12a0, "ASUS X441UV", ALC233_FIXUP_EAPD_COEF_AND_MIC_NO_PRESENCE
),
8193 SND_PCI_QUIRK(0x1043, 0x12e0, "ASUS X541SA", ALC256_FIXUP_ASUS_MIC
),
8194 SND_PCI_QUIRK(0x1043, 0x12f0, "ASUS X541UV", ALC256_FIXUP_ASUS_MIC
),
8195 SND_PCI_QUIRK(0x1043, 0x13b0, "ASUS Z550SA", ALC256_FIXUP_ASUS_MIC
),
8196 SND_PCI_QUIRK(0x1043, 0x1427, "Asus Zenbook UX31E", ALC269VB_FIXUP_ASUS_ZENBOOK
),
8197 SND_PCI_QUIRK(0x1043, 0x1517, "Asus Zenbook UX31A", ALC269VB_FIXUP_ASUS_ZENBOOK_UX31A
),
8198 SND_PCI_QUIRK(0x1043, 0x16e3, "ASUS UX50", ALC269_FIXUP_STEREO_DMIC
),
8199 SND_PCI_QUIRK(0x1043, 0x17d1, "ASUS UX431FL", ALC294_FIXUP_ASUS_DUAL_SPK
),
8200 SND_PCI_QUIRK(0x1043, 0x1881, "ASUS Zephyrus S/M", ALC294_FIXUP_ASUS_GX502_PINS
),
8201 SND_PCI_QUIRK(0x1043, 0x18b1, "Asus MJ401TA", ALC256_FIXUP_ASUS_HEADSET_MIC
),
8202 SND_PCI_QUIRK(0x1043, 0x18f1, "Asus FX505DT", ALC256_FIXUP_ASUS_HEADSET_MIC
),
8203 SND_PCI_QUIRK(0x1043, 0x194e, "ASUS UX563FD", ALC294_FIXUP_ASUS_HPE
),
8204 SND_PCI_QUIRK(0x1043, 0x1982, "ASUS B1400CEPE", ALC256_FIXUP_ASUS_HPE
),
8205 SND_PCI_QUIRK(0x1043, 0x19ce, "ASUS B9450FA", ALC294_FIXUP_ASUS_HPE
),
8206 SND_PCI_QUIRK(0x1043, 0x19e1, "ASUS UX581LV", ALC295_FIXUP_ASUS_MIC_NO_PRESENCE
),
8207 SND_PCI_QUIRK(0x1043, 0x1a13, "Asus G73Jw", ALC269_FIXUP_ASUS_G73JW
),
8208 SND_PCI_QUIRK(0x1043, 0x1a30, "ASUS X705UD", ALC256_FIXUP_ASUS_MIC
),
8209 SND_PCI_QUIRK(0x1043, 0x1b11, "ASUS UX431DA", ALC294_FIXUP_ASUS_COEF_1B
),
8210 SND_PCI_QUIRK(0x1043, 0x1b13, "Asus U41SV", ALC269_FIXUP_INV_DMIC
),
8211 SND_PCI_QUIRK(0x1043, 0x1bbd, "ASUS Z550MA", ALC255_FIXUP_ASUS_MIC_NO_PRESENCE
),
8212 SND_PCI_QUIRK(0x1043, 0x1c23, "Asus X55U", ALC269_FIXUP_LIMIT_INT_MIC_BOOST
),
8213 SND_PCI_QUIRK(0x1043, 0x1ccd, "ASUS X555UB", ALC256_FIXUP_ASUS_MIC
),
8214 SND_PCI_QUIRK(0x1043, 0x1d4e, "ASUS TM420", ALC256_FIXUP_ASUS_HPE
),
8215 SND_PCI_QUIRK(0x1043, 0x1e11, "ASUS Zephyrus G15", ALC289_FIXUP_ASUS_GA502
),
8216 SND_PCI_QUIRK(0x1043, 0x1e8e, "ASUS Zephyrus G15", ALC289_FIXUP_ASUS_GA401
),
8217 SND_PCI_QUIRK(0x1043, 0x1f11, "ASUS Zephyrus G14", ALC289_FIXUP_ASUS_GA401
),
8218 SND_PCI_QUIRK(0x1043, 0x3030, "ASUS ZN270IE", ALC256_FIXUP_ASUS_AIO_GPIO2
),
8219 SND_PCI_QUIRK(0x1043, 0x831a, "ASUS P901", ALC269_FIXUP_STEREO_DMIC
),
8220 SND_PCI_QUIRK(0x1043, 0x834a, "ASUS S101", ALC269_FIXUP_STEREO_DMIC
),
8221 SND_PCI_QUIRK(0x1043, 0x8398, "ASUS P1005", ALC269_FIXUP_STEREO_DMIC
),
8222 SND_PCI_QUIRK(0x1043, 0x83ce, "ASUS P1005", ALC269_FIXUP_STEREO_DMIC
),
8223 SND_PCI_QUIRK(0x1043, 0x8516, "ASUS X101CH", ALC269_FIXUP_ASUS_X101
),
8224 SND_PCI_QUIRK(0x104d, 0x9073, "Sony VAIO", ALC275_FIXUP_SONY_VAIO_GPIO2
),
8225 SND_PCI_QUIRK(0x104d, 0x907b, "Sony VAIO", ALC275_FIXUP_SONY_HWEQ
),
8226 SND_PCI_QUIRK(0x104d, 0x9084, "Sony VAIO", ALC275_FIXUP_SONY_HWEQ
),
8227 SND_PCI_QUIRK(0x104d, 0x9099, "Sony VAIO S13", ALC275_FIXUP_SONY_DISABLE_AAMIX
),
8228 SND_PCI_QUIRK(0x104d, 0x90b5, "Sony VAIO Pro 11", ALC286_FIXUP_SONY_MIC_NO_PRESENCE
),
8229 SND_PCI_QUIRK(0x104d, 0x90b6, "Sony VAIO Pro 13", ALC286_FIXUP_SONY_MIC_NO_PRESENCE
),
8230 SND_PCI_QUIRK(0x10cf, 0x1475, "Lifebook", ALC269_FIXUP_LIFEBOOK
),
8231 SND_PCI_QUIRK(0x10cf, 0x159f, "Lifebook E780", ALC269_FIXUP_LIFEBOOK_NO_HP_TO_LINEOUT
),
8232 SND_PCI_QUIRK(0x10cf, 0x15dc, "Lifebook T731", ALC269_FIXUP_LIFEBOOK_HP_PIN
),
8233 SND_PCI_QUIRK(0x10cf, 0x1629, "Lifebook U7x7", ALC255_FIXUP_LIFEBOOK_U7x7_HEADSET_MIC
),
8234 SND_PCI_QUIRK(0x10cf, 0x1757, "Lifebook E752", ALC269_FIXUP_LIFEBOOK_HP_PIN
),
8235 SND_PCI_QUIRK(0x10cf, 0x1845, "Lifebook U904", ALC269_FIXUP_LIFEBOOK_EXTMIC
),
8236 SND_PCI_QUIRK(0x10ec, 0x10f2, "Intel Reference board", ALC700_FIXUP_INTEL_REFERENCE
),
8237 SND_PCI_QUIRK(0x10ec, 0x118c, "Medion EE4254 MD62100", ALC256_FIXUP_MEDION_HEADSET_NO_PRESENCE
),
8238 SND_PCI_QUIRK(0x10ec, 0x1230, "Intel Reference board", ALC295_FIXUP_CHROME_BOOK
),
8239 SND_PCI_QUIRK(0x10ec, 0x1252, "Intel Reference board", ALC295_FIXUP_CHROME_BOOK
),
8240 SND_PCI_QUIRK(0x10ec, 0x1254, "Intel Reference board", ALC295_FIXUP_CHROME_BOOK
),
8241 SND_PCI_QUIRK(0x10f7, 0x8338, "Panasonic CF-SZ6", ALC269_FIXUP_HEADSET_MODE
),
8242 SND_PCI_QUIRK(0x144d, 0xc109, "Samsung Ativ book 9 (NP900X3G)", ALC269_FIXUP_INV_DMIC
),
8243 SND_PCI_QUIRK(0x144d, 0xc169, "Samsung Notebook 9 Pen (NP930SBE-K01US)", ALC298_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET
),
8244 SND_PCI_QUIRK(0x144d, 0xc176, "Samsung Notebook 9 Pro (NP930MBE-K04US)", ALC298_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET
),
8245 SND_PCI_QUIRK(0x144d, 0xc189, "Samsung Galaxy Flex Book (NT950QCG-X716)", ALC298_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET
),
8246 SND_PCI_QUIRK(0x144d, 0xc18a, "Samsung Galaxy Book Ion (NP930XCJ-K01US)", ALC298_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET
),
8247 SND_PCI_QUIRK(0x144d, 0xc740, "Samsung Ativ book 8 (NP870Z5G)", ALC269_FIXUP_ATIV_BOOK_8
),
8248 SND_PCI_QUIRK(0x144d, 0xc812, "Samsung Notebook Pen S (NT950SBE-X58)", ALC298_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET
),
8249 SND_PCI_QUIRK(0x144d, 0xc830, "Samsung Galaxy Book Ion (NT950XCJ-X716A)", ALC298_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET
),
8250 SND_PCI_QUIRK(0x1458, 0xfa53, "Gigabyte BXBT-2807", ALC283_FIXUP_HEADSET_MIC
),
8251 SND_PCI_QUIRK(0x1462, 0xb120, "MSI Cubi MS-B120", ALC283_FIXUP_HEADSET_MIC
),
8252 SND_PCI_QUIRK(0x1462, 0xb171, "Cubi N 8GL (MS-B171)", ALC283_FIXUP_HEADSET_MIC
),
8253 SND_PCI_QUIRK(0x152d, 0x1082, "Quanta NL3", ALC269_FIXUP_LIFEBOOK
),
8254 SND_PCI_QUIRK(0x1558, 0x1323, "Clevo N130ZU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
8255 SND_PCI_QUIRK(0x1558, 0x1325, "System76 Darter Pro (darp5)", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
8256 SND_PCI_QUIRK(0x1558, 0x1401, "Clevo L140[CZ]U", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
8257 SND_PCI_QUIRK(0x1558, 0x1403, "Clevo N140CU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
8258 SND_PCI_QUIRK(0x1558, 0x1404, "Clevo N150CU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
8259 SND_PCI_QUIRK(0x1558, 0x14a1, "Clevo L141MU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
8260 SND_PCI_QUIRK(0x1558, 0x4018, "Clevo NV40M[BE]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
8261 SND_PCI_QUIRK(0x1558, 0x4019, "Clevo NV40MZ", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
8262 SND_PCI_QUIRK(0x1558, 0x4020, "Clevo NV40MB", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
8263 SND_PCI_QUIRK(0x1558, 0x40a1, "Clevo NL40GU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
8264 SND_PCI_QUIRK(0x1558, 0x40c1, "Clevo NL40[CZ]U", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
8265 SND_PCI_QUIRK(0x1558, 0x40d1, "Clevo NL41DU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
8266 SND_PCI_QUIRK(0x1558, 0x50a3, "Clevo NJ51GU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
8267 SND_PCI_QUIRK(0x1558, 0x50b3, "Clevo NK50S[BEZ]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
8268 SND_PCI_QUIRK(0x1558, 0x50b6, "Clevo NK50S5", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
8269 SND_PCI_QUIRK(0x1558, 0x50b8, "Clevo NK50SZ", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
8270 SND_PCI_QUIRK(0x1558, 0x50d5, "Clevo NP50D5", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
8271 SND_PCI_QUIRK(0x1558, 0x50f0, "Clevo NH50A[CDF]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
8272 SND_PCI_QUIRK(0x1558, 0x50f3, "Clevo NH58DPQ", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
8273 SND_PCI_QUIRK(0x1558, 0x5101, "Clevo S510WU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
8274 SND_PCI_QUIRK(0x1558, 0x5157, "Clevo W517GU1", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
8275 SND_PCI_QUIRK(0x1558, 0x51a1, "Clevo NS50MU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
8276 SND_PCI_QUIRK(0x1558, 0x70a1, "Clevo NB70T[HJK]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
8277 SND_PCI_QUIRK(0x1558, 0x70b3, "Clevo NK70SB", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
8278 SND_PCI_QUIRK(0x1558, 0x8228, "Clevo NR40BU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
8279 SND_PCI_QUIRK(0x1558, 0x8520, "Clevo NH50D[CD]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
8280 SND_PCI_QUIRK(0x1558, 0x8521, "Clevo NH77D[CD]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
8281 SND_PCI_QUIRK(0x1558, 0x8535, "Clevo NH50D[BE]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
8282 SND_PCI_QUIRK(0x1558, 0x8536, "Clevo NH79D[BE]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
8283 SND_PCI_QUIRK(0x1558, 0x8550, "System76 Gazelle (gaze14)", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
8284 SND_PCI_QUIRK(0x1558, 0x8551, "System76 Gazelle (gaze14)", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
8285 SND_PCI_QUIRK(0x1558, 0x8560, "System76 Gazelle (gaze14)", ALC269_FIXUP_HEADSET_MIC
),
8286 SND_PCI_QUIRK(0x1558, 0x8561, "System76 Gazelle (gaze14)", ALC269_FIXUP_HEADSET_MIC
),
8287 SND_PCI_QUIRK(0x1558, 0x8562, "Clevo NH[5|7][0-9]RZ[Q]", ALC269_FIXUP_DMIC
),
8288 SND_PCI_QUIRK(0x1558, 0x8668, "Clevo NP50B[BE]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
8289 SND_PCI_QUIRK(0x1558, 0x8680, "Clevo NJ50LU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
8290 SND_PCI_QUIRK(0x1558, 0x8686, "Clevo NH50[CZ]U", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
8291 SND_PCI_QUIRK(0x1558, 0x8a20, "Clevo NH55DCQ-Y", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
8292 SND_PCI_QUIRK(0x1558, 0x8a51, "Clevo NH70RCQ-Y", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
8293 SND_PCI_QUIRK(0x1558, 0x8d50, "Clevo NH55RCQ-M", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
8294 SND_PCI_QUIRK(0x1558, 0x951d, "Clevo N950T[CDF]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
8295 SND_PCI_QUIRK(0x1558, 0x961d, "Clevo N960S[CDF]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
8296 SND_PCI_QUIRK(0x1558, 0x971d, "Clevo N970T[CDF]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
8297 SND_PCI_QUIRK(0x1558, 0xa500, "Clevo NL53RU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE
),
8298 SND_PCI_QUIRK(0x17aa, 0x1036, "Lenovo P520", ALC233_FIXUP_LENOVO_MULTI_CODECS
),
8299 SND_PCI_QUIRK(0x17aa, 0x1048, "ThinkCentre Station", ALC283_FIXUP_HEADSET_MIC
),
8300 SND_PCI_QUIRK(0x17aa, 0x20f2, "Thinkpad SL410/510", ALC269_FIXUP_SKU_IGNORE
),
8301 SND_PCI_QUIRK(0x17aa, 0x215e, "Thinkpad L512", ALC269_FIXUP_SKU_IGNORE
),
8302 SND_PCI_QUIRK(0x17aa, 0x21b8, "Thinkpad Edge 14", ALC269_FIXUP_SKU_IGNORE
),
8303 SND_PCI_QUIRK(0x17aa, 0x21ca, "Thinkpad L412", ALC269_FIXUP_SKU_IGNORE
),
8304 SND_PCI_QUIRK(0x17aa, 0x21e9, "Thinkpad Edge 15", ALC269_FIXUP_SKU_IGNORE
),
8305 SND_PCI_QUIRK(0x17aa, 0x21f3, "Thinkpad T430", ALC269_FIXUP_LENOVO_DOCK
),
8306 SND_PCI_QUIRK(0x17aa, 0x21f6, "Thinkpad T530", ALC269_FIXUP_LENOVO_DOCK_LIMIT_BOOST
),
8307 SND_PCI_QUIRK(0x17aa, 0x21fa, "Thinkpad X230", ALC269_FIXUP_LENOVO_DOCK
),
8308 SND_PCI_QUIRK(0x17aa, 0x21fb, "Thinkpad T430s", ALC269_FIXUP_LENOVO_DOCK
),
8309 SND_PCI_QUIRK(0x17aa, 0x2203, "Thinkpad X230 Tablet", ALC269_FIXUP_LENOVO_DOCK
),
8310 SND_PCI_QUIRK(0x17aa, 0x2208, "Thinkpad T431s", ALC269_FIXUP_LENOVO_DOCK
),
8311 SND_PCI_QUIRK(0x17aa, 0x220c, "Thinkpad T440s", ALC292_FIXUP_TPT440
),
8312 SND_PCI_QUIRK(0x17aa, 0x220e, "Thinkpad T440p", ALC292_FIXUP_TPT440_DOCK
),
8313 SND_PCI_QUIRK(0x17aa, 0x2210, "Thinkpad T540p", ALC292_FIXUP_TPT440_DOCK
),
8314 SND_PCI_QUIRK(0x17aa, 0x2211, "Thinkpad W541", ALC292_FIXUP_TPT440_DOCK
),
8315 SND_PCI_QUIRK(0x17aa, 0x2212, "Thinkpad T440", ALC292_FIXUP_TPT440_DOCK
),
8316 SND_PCI_QUIRK(0x17aa, 0x2214, "Thinkpad X240", ALC292_FIXUP_TPT440_DOCK
),
8317 SND_PCI_QUIRK(0x17aa, 0x2215, "Thinkpad", ALC269_FIXUP_LIMIT_INT_MIC_BOOST
),
8318 SND_PCI_QUIRK(0x17aa, 0x2218, "Thinkpad X1 Carbon 2nd", ALC292_FIXUP_TPT440_DOCK
),
8319 SND_PCI_QUIRK(0x17aa, 0x2223, "ThinkPad T550", ALC292_FIXUP_TPT440_DOCK
),
8320 SND_PCI_QUIRK(0x17aa, 0x2226, "ThinkPad X250", ALC292_FIXUP_TPT440_DOCK
),
8321 SND_PCI_QUIRK(0x17aa, 0x222d, "Thinkpad", ALC298_FIXUP_TPT470_DOCK
),
8322 SND_PCI_QUIRK(0x17aa, 0x222e, "Thinkpad", ALC298_FIXUP_TPT470_DOCK
),
8323 SND_PCI_QUIRK(0x17aa, 0x2231, "Thinkpad T560", ALC292_FIXUP_TPT460
),
8324 SND_PCI_QUIRK(0x17aa, 0x2233, "Thinkpad", ALC292_FIXUP_TPT460
),
8325 SND_PCI_QUIRK(0x17aa, 0x2245, "Thinkpad T470", ALC298_FIXUP_TPT470_DOCK
),
8326 SND_PCI_QUIRK(0x17aa, 0x2246, "Thinkpad", ALC298_FIXUP_TPT470_DOCK
),
8327 SND_PCI_QUIRK(0x17aa, 0x2247, "Thinkpad", ALC298_FIXUP_TPT470_DOCK
),
8328 SND_PCI_QUIRK(0x17aa, 0x2249, "Thinkpad", ALC292_FIXUP_TPT460
),
8329 SND_PCI_QUIRK(0x17aa, 0x224b, "Thinkpad", ALC298_FIXUP_TPT470_DOCK
),
8330 SND_PCI_QUIRK(0x17aa, 0x224c, "Thinkpad", ALC298_FIXUP_TPT470_DOCK
),
8331 SND_PCI_QUIRK(0x17aa, 0x224d, "Thinkpad", ALC298_FIXUP_TPT470_DOCK
),
8332 SND_PCI_QUIRK(0x17aa, 0x225d, "Thinkpad T480", ALC269_FIXUP_LIMIT_INT_MIC_BOOST
),
8333 SND_PCI_QUIRK(0x17aa, 0x2292, "Thinkpad X1 Carbon 7th", ALC285_FIXUP_THINKPAD_HEADSET_JACK
),
8334 SND_PCI_QUIRK(0x17aa, 0x22be, "Thinkpad X1 Carbon 8th", ALC285_FIXUP_THINKPAD_HEADSET_JACK
),
8335 SND_PCI_QUIRK(0x17aa, 0x22c1, "Thinkpad P1 Gen 3", ALC285_FIXUP_THINKPAD_NO_BASS_SPK_HEADSET_JACK
),
8336 SND_PCI_QUIRK(0x17aa, 0x22c2, "Thinkpad X1 Extreme Gen 3", ALC285_FIXUP_THINKPAD_NO_BASS_SPK_HEADSET_JACK
),
8337 SND_PCI_QUIRK(0x17aa, 0x30bb, "ThinkCentre AIO", ALC233_FIXUP_LENOVO_LINE2_MIC_HOTKEY
),
8338 SND_PCI_QUIRK(0x17aa, 0x30e2, "ThinkCentre AIO", ALC233_FIXUP_LENOVO_LINE2_MIC_HOTKEY
),
8339 SND_PCI_QUIRK(0x17aa, 0x310c, "ThinkCentre Station", ALC294_FIXUP_LENOVO_MIC_LOCATION
),
8340 SND_PCI_QUIRK(0x17aa, 0x3111, "ThinkCentre Station", ALC294_FIXUP_LENOVO_MIC_LOCATION
),
8341 SND_PCI_QUIRK(0x17aa, 0x312a, "ThinkCentre Station", ALC294_FIXUP_LENOVO_MIC_LOCATION
),
8342 SND_PCI_QUIRK(0x17aa, 0x312f, "ThinkCentre Station", ALC294_FIXUP_LENOVO_MIC_LOCATION
),
8343 SND_PCI_QUIRK(0x17aa, 0x313c, "ThinkCentre Station", ALC294_FIXUP_LENOVO_MIC_LOCATION
),
8344 SND_PCI_QUIRK(0x17aa, 0x3151, "ThinkCentre Station", ALC283_FIXUP_HEADSET_MIC
),
8345 SND_PCI_QUIRK(0x17aa, 0x3176, "ThinkCentre Station", ALC283_FIXUP_HEADSET_MIC
),
8346 SND_PCI_QUIRK(0x17aa, 0x3178, "ThinkCentre Station", ALC283_FIXUP_HEADSET_MIC
),
8347 SND_PCI_QUIRK(0x17aa, 0x3818, "Lenovo C940", ALC298_FIXUP_LENOVO_SPK_VOLUME
),
8348 SND_PCI_QUIRK(0x17aa, 0x3827, "Ideapad S740", ALC285_FIXUP_IDEAPAD_S740_COEF
),
8349 SND_PCI_QUIRK(0x17aa, 0x3902, "Lenovo E50-80", ALC269_FIXUP_DMIC_THINKPAD_ACPI
),
8350 SND_PCI_QUIRK(0x17aa, 0x3977, "IdeaPad S210", ALC283_FIXUP_INT_MIC
),
8351 SND_PCI_QUIRK(0x17aa, 0x3978, "Lenovo B50-70", ALC269_FIXUP_DMIC_THINKPAD_ACPI
),
8352 SND_PCI_QUIRK(0x17aa, 0x3bf8, "Quanta FL1", ALC269_FIXUP_PCM_44K
),
8353 SND_PCI_QUIRK(0x17aa, 0x5013, "Thinkpad", ALC269_FIXUP_LIMIT_INT_MIC_BOOST
),
8354 SND_PCI_QUIRK(0x17aa, 0x501a, "Thinkpad", ALC283_FIXUP_INT_MIC
),
8355 SND_PCI_QUIRK(0x17aa, 0x501e, "Thinkpad L440", ALC292_FIXUP_TPT440_DOCK
),
8356 SND_PCI_QUIRK(0x17aa, 0x5026, "Thinkpad", ALC269_FIXUP_LIMIT_INT_MIC_BOOST
),
8357 SND_PCI_QUIRK(0x17aa, 0x5034, "Thinkpad T450", ALC292_FIXUP_TPT440_DOCK
),
8358 SND_PCI_QUIRK(0x17aa, 0x5036, "Thinkpad T450s", ALC292_FIXUP_TPT440_DOCK
),
8359 SND_PCI_QUIRK(0x17aa, 0x503c, "Thinkpad L450", ALC292_FIXUP_TPT440_DOCK
),
8360 SND_PCI_QUIRK(0x17aa, 0x504a, "ThinkPad X260", ALC292_FIXUP_TPT440_DOCK
),
8361 SND_PCI_QUIRK(0x17aa, 0x504b, "Thinkpad", ALC293_FIXUP_LENOVO_SPK_NOISE
),
8362 SND_PCI_QUIRK(0x17aa, 0x5050, "Thinkpad T560p", ALC292_FIXUP_TPT460
),
8363 SND_PCI_QUIRK(0x17aa, 0x5051, "Thinkpad L460", ALC292_FIXUP_TPT460
),
8364 SND_PCI_QUIRK(0x17aa, 0x5053, "Thinkpad T460", ALC292_FIXUP_TPT460
),
8365 SND_PCI_QUIRK(0x17aa, 0x505d, "Thinkpad", ALC298_FIXUP_TPT470_DOCK
),
8366 SND_PCI_QUIRK(0x17aa, 0x505f, "Thinkpad", ALC298_FIXUP_TPT470_DOCK
),
8367 SND_PCI_QUIRK(0x17aa, 0x5062, "Thinkpad", ALC298_FIXUP_TPT470_DOCK
),
8368 SND_PCI_QUIRK(0x17aa, 0x5109, "Thinkpad", ALC269_FIXUP_LIMIT_INT_MIC_BOOST
),
8369 SND_PCI_QUIRK(0x17aa, 0x511e, "Thinkpad", ALC298_FIXUP_TPT470_DOCK
),
8370 SND_PCI_QUIRK(0x17aa, 0x511f, "Thinkpad", ALC298_FIXUP_TPT470_DOCK
),
8371 SND_PCI_QUIRK(0x17aa, 0x9e54, "LENOVO NB", ALC269_FIXUP_LENOVO_EAPD
),
8372 SND_PCI_QUIRK(0x19e5, 0x3204, "Huawei MACH-WX9", ALC256_FIXUP_HUAWEI_MACH_WX9_PINS
),
8373 SND_PCI_QUIRK(0x1b35, 0x1235, "CZC B20", ALC269_FIXUP_CZC_B20
),
8374 SND_PCI_QUIRK(0x1b35, 0x1236, "CZC TMI", ALC269_FIXUP_CZC_TMI
),
8375 SND_PCI_QUIRK(0x1b35, 0x1237, "CZC L101", ALC269_FIXUP_CZC_L101
),
8376 SND_PCI_QUIRK(0x1b7d, 0xa831, "Ordissimo EVE2 ", ALC269VB_FIXUP_ORDISSIMO_EVE2
), /* Also known as Malata PC-B1303 */
8377 SND_PCI_QUIRK(0x1c06, 0x2013, "Lemote A1802", ALC269_FIXUP_LEMOTE_A1802
),
8378 SND_PCI_QUIRK(0x1c06, 0x2015, "Lemote A190X", ALC269_FIXUP_LEMOTE_A190X
),
8379 SND_PCI_QUIRK(0x1d72, 0x1602, "RedmiBook", ALC255_FIXUP_XIAOMI_HEADSET_MIC
),
8380 SND_PCI_QUIRK(0x1d72, 0x1701, "XiaomiNotebook Pro", ALC298_FIXUP_DELL1_MIC_NO_PRESENCE
),
8381 SND_PCI_QUIRK(0x1d72, 0x1901, "RedmiBook 14", ALC256_FIXUP_ASUS_HEADSET_MIC
),
8382 SND_PCI_QUIRK(0x1d72, 0x1947, "RedmiBook Air", ALC255_FIXUP_XIAOMI_HEADSET_MIC
),
8383 SND_PCI_QUIRK(0x8086, 0x2074, "Intel NUC 8", ALC233_FIXUP_INTEL_NUC8_DMIC
),
8384 SND_PCI_QUIRK(0x8086, 0x2080, "Intel NUC 8 Rugged", ALC256_FIXUP_INTEL_NUC8_RUGGED
),
8385 SND_PCI_QUIRK(0x8086, 0x2081, "Intel NUC 10", ALC256_FIXUP_INTEL_NUC10
),
8388 /* Below is a quirk table taken from the old code.
8389 * Basically the device should work as is without the fixup table.
8390 * If BIOS doesn't give a proper info, enable the corresponding
8393 SND_PCI_QUIRK(0x1043, 0x8330, "ASUS Eeepc P703 P900A",
8395 SND_PCI_QUIRK(0x1043, 0x1013, "ASUS N61Da", ALC269_FIXUP_AMIC
),
8396 SND_PCI_QUIRK(0x1043, 0x1143, "ASUS B53f", ALC269_FIXUP_AMIC
),
8397 SND_PCI_QUIRK(0x1043, 0x1133, "ASUS UJ20ft", ALC269_FIXUP_AMIC
),
8398 SND_PCI_QUIRK(0x1043, 0x1183, "ASUS K72DR", ALC269_FIXUP_AMIC
),
8399 SND_PCI_QUIRK(0x1043, 0x11b3, "ASUS K52DR", ALC269_FIXUP_AMIC
),
8400 SND_PCI_QUIRK(0x1043, 0x11e3, "ASUS U33Jc", ALC269_FIXUP_AMIC
),
8401 SND_PCI_QUIRK(0x1043, 0x1273, "ASUS UL80Jt", ALC269_FIXUP_AMIC
),
8402 SND_PCI_QUIRK(0x1043, 0x1283, "ASUS U53Jc", ALC269_FIXUP_AMIC
),
8403 SND_PCI_QUIRK(0x1043, 0x12b3, "ASUS N82JV", ALC269_FIXUP_AMIC
),
8404 SND_PCI_QUIRK(0x1043, 0x12d3, "ASUS N61Jv", ALC269_FIXUP_AMIC
),
8405 SND_PCI_QUIRK(0x1043, 0x13a3, "ASUS UL30Vt", ALC269_FIXUP_AMIC
),
8406 SND_PCI_QUIRK(0x1043, 0x1373, "ASUS G73JX", ALC269_FIXUP_AMIC
),
8407 SND_PCI_QUIRK(0x1043, 0x1383, "ASUS UJ30Jc", ALC269_FIXUP_AMIC
),
8408 SND_PCI_QUIRK(0x1043, 0x13d3, "ASUS N61JA", ALC269_FIXUP_AMIC
),
8409 SND_PCI_QUIRK(0x1043, 0x1413, "ASUS UL50", ALC269_FIXUP_AMIC
),
8410 SND_PCI_QUIRK(0x1043, 0x1443, "ASUS UL30", ALC269_FIXUP_AMIC
),
8411 SND_PCI_QUIRK(0x1043, 0x1453, "ASUS M60Jv", ALC269_FIXUP_AMIC
),
8412 SND_PCI_QUIRK(0x1043, 0x1483, "ASUS UL80", ALC269_FIXUP_AMIC
),
8413 SND_PCI_QUIRK(0x1043, 0x14f3, "ASUS F83Vf", ALC269_FIXUP_AMIC
),
8414 SND_PCI_QUIRK(0x1043, 0x14e3, "ASUS UL20", ALC269_FIXUP_AMIC
),
8415 SND_PCI_QUIRK(0x1043, 0x1513, "ASUS UX30", ALC269_FIXUP_AMIC
),
8416 SND_PCI_QUIRK(0x1043, 0x1593, "ASUS N51Vn", ALC269_FIXUP_AMIC
),
8417 SND_PCI_QUIRK(0x1043, 0x15a3, "ASUS N60Jv", ALC269_FIXUP_AMIC
),
8418 SND_PCI_QUIRK(0x1043, 0x15b3, "ASUS N60Dp", ALC269_FIXUP_AMIC
),
8419 SND_PCI_QUIRK(0x1043, 0x15c3, "ASUS N70De", ALC269_FIXUP_AMIC
),
8420 SND_PCI_QUIRK(0x1043, 0x15e3, "ASUS F83T", ALC269_FIXUP_AMIC
),
8421 SND_PCI_QUIRK(0x1043, 0x1643, "ASUS M60J", ALC269_FIXUP_AMIC
),
8422 SND_PCI_QUIRK(0x1043, 0x1653, "ASUS U50", ALC269_FIXUP_AMIC
),
8423 SND_PCI_QUIRK(0x1043, 0x1693, "ASUS F50N", ALC269_FIXUP_AMIC
),
8424 SND_PCI_QUIRK(0x1043, 0x16a3, "ASUS F5Q", ALC269_FIXUP_AMIC
),
8425 SND_PCI_QUIRK(0x1043, 0x1723, "ASUS P80", ALC269_FIXUP_AMIC
),
8426 SND_PCI_QUIRK(0x1043, 0x1743, "ASUS U80", ALC269_FIXUP_AMIC
),
8427 SND_PCI_QUIRK(0x1043, 0x1773, "ASUS U20A", ALC269_FIXUP_AMIC
),
8428 SND_PCI_QUIRK(0x1043, 0x1883, "ASUS F81Se", ALC269_FIXUP_AMIC
),
8429 SND_PCI_QUIRK(0x152d, 0x1778, "Quanta ON1", ALC269_FIXUP_DMIC
),
8430 SND_PCI_QUIRK(0x17aa, 0x3be9, "Quanta Wistron", ALC269_FIXUP_AMIC
),
8431 SND_PCI_QUIRK(0x17aa, 0x3bf8, "Quanta FL1", ALC269_FIXUP_AMIC
),
8432 SND_PCI_QUIRK(0x17ff, 0x059a, "Quanta EL3", ALC269_FIXUP_DMIC
),
8433 SND_PCI_QUIRK(0x17ff, 0x059b, "Quanta JR1", ALC269_FIXUP_DMIC
),
8438 static const struct snd_pci_quirk alc269_fixup_vendor_tbl
[] = {
8439 SND_PCI_QUIRK_VENDOR(0x1025, "Acer Aspire", ALC271_FIXUP_DMIC
),
8440 SND_PCI_QUIRK_VENDOR(0x103c, "HP", ALC269_FIXUP_HP_MUTE_LED
),
8441 SND_PCI_QUIRK_VENDOR(0x104d, "Sony VAIO", ALC269_FIXUP_SONY_VAIO
),
8442 SND_PCI_QUIRK_VENDOR(0x17aa, "Thinkpad", ALC269_FIXUP_THINKPAD_ACPI
),
8443 SND_PCI_QUIRK_VENDOR(0x19e5, "Huawei Matebook", ALC255_FIXUP_MIC_MUTE_LED
),
8447 static const struct hda_model_fixup alc269_fixup_models
[] = {
8448 {.id
= ALC269_FIXUP_AMIC
, .name
= "laptop-amic"},
8449 {.id
= ALC269_FIXUP_DMIC
, .name
= "laptop-dmic"},
8450 {.id
= ALC269_FIXUP_STEREO_DMIC
, .name
= "alc269-dmic"},
8451 {.id
= ALC271_FIXUP_DMIC
, .name
= "alc271-dmic"},
8452 {.id
= ALC269_FIXUP_INV_DMIC
, .name
= "inv-dmic"},
8453 {.id
= ALC269_FIXUP_HEADSET_MIC
, .name
= "headset-mic"},
8454 {.id
= ALC269_FIXUP_HEADSET_MODE
, .name
= "headset-mode"},
8455 {.id
= ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC
, .name
= "headset-mode-no-hp-mic"},
8456 {.id
= ALC269_FIXUP_LENOVO_DOCK
, .name
= "lenovo-dock"},
8457 {.id
= ALC269_FIXUP_LENOVO_DOCK_LIMIT_BOOST
, .name
= "lenovo-dock-limit-boost"},
8458 {.id
= ALC269_FIXUP_HP_GPIO_LED
, .name
= "hp-gpio-led"},
8459 {.id
= ALC269_FIXUP_HP_DOCK_GPIO_MIC1_LED
, .name
= "hp-dock-gpio-mic1-led"},
8460 {.id
= ALC269_FIXUP_DELL1_MIC_NO_PRESENCE
, .name
= "dell-headset-multi"},
8461 {.id
= ALC269_FIXUP_DELL2_MIC_NO_PRESENCE
, .name
= "dell-headset-dock"},
8462 {.id
= ALC269_FIXUP_DELL3_MIC_NO_PRESENCE
, .name
= "dell-headset3"},
8463 {.id
= ALC269_FIXUP_DELL4_MIC_NO_PRESENCE
, .name
= "dell-headset4"},
8464 {.id
= ALC283_FIXUP_CHROME_BOOK
, .name
= "alc283-dac-wcaps"},
8465 {.id
= ALC283_FIXUP_SENSE_COMBO_JACK
, .name
= "alc283-sense-combo"},
8466 {.id
= ALC292_FIXUP_TPT440_DOCK
, .name
= "tpt440-dock"},
8467 {.id
= ALC292_FIXUP_TPT440
, .name
= "tpt440"},
8468 {.id
= ALC292_FIXUP_TPT460
, .name
= "tpt460"},
8469 {.id
= ALC298_FIXUP_TPT470_DOCK_FIX
, .name
= "tpt470-dock-fix"},
8470 {.id
= ALC298_FIXUP_TPT470_DOCK
, .name
= "tpt470-dock"},
8471 {.id
= ALC233_FIXUP_LENOVO_MULTI_CODECS
, .name
= "dual-codecs"},
8472 {.id
= ALC700_FIXUP_INTEL_REFERENCE
, .name
= "alc700-ref"},
8473 {.id
= ALC269_FIXUP_SONY_VAIO
, .name
= "vaio"},
8474 {.id
= ALC269_FIXUP_DELL_M101Z
, .name
= "dell-m101z"},
8475 {.id
= ALC269_FIXUP_ASUS_G73JW
, .name
= "asus-g73jw"},
8476 {.id
= ALC269_FIXUP_LENOVO_EAPD
, .name
= "lenovo-eapd"},
8477 {.id
= ALC275_FIXUP_SONY_HWEQ
, .name
= "sony-hweq"},
8478 {.id
= ALC269_FIXUP_PCM_44K
, .name
= "pcm44k"},
8479 {.id
= ALC269_FIXUP_LIFEBOOK
, .name
= "lifebook"},
8480 {.id
= ALC269_FIXUP_LIFEBOOK_EXTMIC
, .name
= "lifebook-extmic"},
8481 {.id
= ALC269_FIXUP_LIFEBOOK_HP_PIN
, .name
= "lifebook-hp-pin"},
8482 {.id
= ALC255_FIXUP_LIFEBOOK_U7x7_HEADSET_MIC
, .name
= "lifebook-u7x7"},
8483 {.id
= ALC269VB_FIXUP_AMIC
, .name
= "alc269vb-amic"},
8484 {.id
= ALC269VB_FIXUP_DMIC
, .name
= "alc269vb-dmic"},
8485 {.id
= ALC269_FIXUP_HP_MUTE_LED_MIC1
, .name
= "hp-mute-led-mic1"},
8486 {.id
= ALC269_FIXUP_HP_MUTE_LED_MIC2
, .name
= "hp-mute-led-mic2"},
8487 {.id
= ALC269_FIXUP_HP_MUTE_LED_MIC3
, .name
= "hp-mute-led-mic3"},
8488 {.id
= ALC269_FIXUP_HP_GPIO_MIC1_LED
, .name
= "hp-gpio-mic1"},
8489 {.id
= ALC269_FIXUP_HP_LINE1_MIC1_LED
, .name
= "hp-line1-mic1"},
8490 {.id
= ALC269_FIXUP_NO_SHUTUP
, .name
= "noshutup"},
8491 {.id
= ALC286_FIXUP_SONY_MIC_NO_PRESENCE
, .name
= "sony-nomic"},
8492 {.id
= ALC269_FIXUP_ASPIRE_HEADSET_MIC
, .name
= "aspire-headset-mic"},
8493 {.id
= ALC269_FIXUP_ASUS_X101
, .name
= "asus-x101"},
8494 {.id
= ALC271_FIXUP_HP_GATE_MIC_JACK
, .name
= "acer-ao7xx"},
8495 {.id
= ALC271_FIXUP_HP_GATE_MIC_JACK_E1_572
, .name
= "acer-aspire-e1"},
8496 {.id
= ALC269_FIXUP_ACER_AC700
, .name
= "acer-ac700"},
8497 {.id
= ALC269_FIXUP_LIMIT_INT_MIC_BOOST
, .name
= "limit-mic-boost"},
8498 {.id
= ALC269VB_FIXUP_ASUS_ZENBOOK
, .name
= "asus-zenbook"},
8499 {.id
= ALC269VB_FIXUP_ASUS_ZENBOOK_UX31A
, .name
= "asus-zenbook-ux31a"},
8500 {.id
= ALC269VB_FIXUP_ORDISSIMO_EVE2
, .name
= "ordissimo"},
8501 {.id
= ALC282_FIXUP_ASUS_TX300
, .name
= "asus-tx300"},
8502 {.id
= ALC283_FIXUP_INT_MIC
, .name
= "alc283-int-mic"},
8503 {.id
= ALC290_FIXUP_MONO_SPEAKERS_HSJACK
, .name
= "mono-speakers"},
8504 {.id
= ALC290_FIXUP_SUBWOOFER_HSJACK
, .name
= "alc290-subwoofer"},
8505 {.id
= ALC269_FIXUP_THINKPAD_ACPI
, .name
= "thinkpad"},
8506 {.id
= ALC269_FIXUP_DMIC_THINKPAD_ACPI
, .name
= "dmic-thinkpad"},
8507 {.id
= ALC255_FIXUP_ACER_MIC_NO_PRESENCE
, .name
= "alc255-acer"},
8508 {.id
= ALC255_FIXUP_ASUS_MIC_NO_PRESENCE
, .name
= "alc255-asus"},
8509 {.id
= ALC255_FIXUP_DELL1_MIC_NO_PRESENCE
, .name
= "alc255-dell1"},
8510 {.id
= ALC255_FIXUP_DELL2_MIC_NO_PRESENCE
, .name
= "alc255-dell2"},
8511 {.id
= ALC293_FIXUP_DELL1_MIC_NO_PRESENCE
, .name
= "alc293-dell1"},
8512 {.id
= ALC283_FIXUP_HEADSET_MIC
, .name
= "alc283-headset"},
8513 {.id
= ALC255_FIXUP_MIC_MUTE_LED
, .name
= "alc255-dell-mute"},
8514 {.id
= ALC282_FIXUP_ASPIRE_V5_PINS
, .name
= "aspire-v5"},
8515 {.id
= ALC269VB_FIXUP_ASPIRE_E1_COEF
, .name
= "aspire-e1-coef"},
8516 {.id
= ALC280_FIXUP_HP_GPIO4
, .name
= "hp-gpio4"},
8517 {.id
= ALC286_FIXUP_HP_GPIO_LED
, .name
= "hp-gpio-led"},
8518 {.id
= ALC280_FIXUP_HP_GPIO2_MIC_HOTKEY
, .name
= "hp-gpio2-hotkey"},
8519 {.id
= ALC280_FIXUP_HP_DOCK_PINS
, .name
= "hp-dock-pins"},
8520 {.id
= ALC269_FIXUP_HP_DOCK_GPIO_MIC1_LED
, .name
= "hp-dock-gpio-mic"},
8521 {.id
= ALC280_FIXUP_HP_9480M
, .name
= "hp-9480m"},
8522 {.id
= ALC288_FIXUP_DELL_HEADSET_MODE
, .name
= "alc288-dell-headset"},
8523 {.id
= ALC288_FIXUP_DELL1_MIC_NO_PRESENCE
, .name
= "alc288-dell1"},
8524 {.id
= ALC288_FIXUP_DELL_XPS_13
, .name
= "alc288-dell-xps13"},
8525 {.id
= ALC292_FIXUP_DELL_E7X
, .name
= "dell-e7x"},
8526 {.id
= ALC293_FIXUP_DISABLE_AAMIX_MULTIJACK
, .name
= "alc293-dell"},
8527 {.id
= ALC298_FIXUP_DELL1_MIC_NO_PRESENCE
, .name
= "alc298-dell1"},
8528 {.id
= ALC298_FIXUP_DELL_AIO_MIC_NO_PRESENCE
, .name
= "alc298-dell-aio"},
8529 {.id
= ALC275_FIXUP_DELL_XPS
, .name
= "alc275-dell-xps"},
8530 {.id
= ALC293_FIXUP_LENOVO_SPK_NOISE
, .name
= "lenovo-spk-noise"},
8531 {.id
= ALC233_FIXUP_LENOVO_LINE2_MIC_HOTKEY
, .name
= "lenovo-hotkey"},
8532 {.id
= ALC255_FIXUP_DELL_SPK_NOISE
, .name
= "dell-spk-noise"},
8533 {.id
= ALC225_FIXUP_DELL1_MIC_NO_PRESENCE
, .name
= "alc225-dell1"},
8534 {.id
= ALC295_FIXUP_DISABLE_DAC3
, .name
= "alc295-disable-dac3"},
8535 {.id
= ALC285_FIXUP_SPEAKER2_TO_DAC1
, .name
= "alc285-speaker2-to-dac1"},
8536 {.id
= ALC280_FIXUP_HP_HEADSET_MIC
, .name
= "alc280-hp-headset"},
8537 {.id
= ALC221_FIXUP_HP_FRONT_MIC
, .name
= "alc221-hp-mic"},
8538 {.id
= ALC298_FIXUP_SPK_VOLUME
, .name
= "alc298-spk-volume"},
8539 {.id
= ALC256_FIXUP_DELL_INSPIRON_7559_SUBWOOFER
, .name
= "dell-inspiron-7559"},
8540 {.id
= ALC269_FIXUP_ATIV_BOOK_8
, .name
= "ativ-book"},
8541 {.id
= ALC221_FIXUP_HP_MIC_NO_PRESENCE
, .name
= "alc221-hp-mic"},
8542 {.id
= ALC256_FIXUP_ASUS_HEADSET_MODE
, .name
= "alc256-asus-headset"},
8543 {.id
= ALC256_FIXUP_ASUS_MIC
, .name
= "alc256-asus-mic"},
8544 {.id
= ALC256_FIXUP_ASUS_AIO_GPIO2
, .name
= "alc256-asus-aio"},
8545 {.id
= ALC233_FIXUP_ASUS_MIC_NO_PRESENCE
, .name
= "alc233-asus"},
8546 {.id
= ALC233_FIXUP_EAPD_COEF_AND_MIC_NO_PRESENCE
, .name
= "alc233-eapd"},
8547 {.id
= ALC294_FIXUP_LENOVO_MIC_LOCATION
, .name
= "alc294-lenovo-mic"},
8548 {.id
= ALC225_FIXUP_DELL_WYSE_MIC_NO_PRESENCE
, .name
= "alc225-wyse"},
8549 {.id
= ALC274_FIXUP_DELL_AIO_LINEOUT_VERB
, .name
= "alc274-dell-aio"},
8550 {.id
= ALC255_FIXUP_DUMMY_LINEOUT_VERB
, .name
= "alc255-dummy-lineout"},
8551 {.id
= ALC255_FIXUP_DELL_HEADSET_MIC
, .name
= "alc255-dell-headset"},
8552 {.id
= ALC295_FIXUP_HP_X360
, .name
= "alc295-hp-x360"},
8553 {.id
= ALC225_FIXUP_HEADSET_JACK
, .name
= "alc-headset-jack"},
8554 {.id
= ALC295_FIXUP_CHROME_BOOK
, .name
= "alc-chrome-book"},
8555 {.id
= ALC299_FIXUP_PREDATOR_SPK
, .name
= "predator-spk"},
8556 {.id
= ALC298_FIXUP_HUAWEI_MBX_STEREO
, .name
= "huawei-mbx-stereo"},
8557 {.id
= ALC256_FIXUP_MEDION_HEADSET_NO_PRESENCE
, .name
= "alc256-medion-headset"},
8558 {.id
= ALC298_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET
, .name
= "alc298-samsung-headphone"},
8559 {.id
= ALC255_FIXUP_XIAOMI_HEADSET_MIC
, .name
= "alc255-xiaomi-headset"},
8560 {.id
= ALC274_FIXUP_HP_MIC
, .name
= "alc274-hp-mic-detect"},
8561 {.id
= ALC245_FIXUP_HP_X360_AMP
, .name
= "alc245-hp-x360-amp"},
8564 #define ALC225_STANDARD_PINS \
8567 #define ALC256_STANDARD_PINS \
8568 {0x12, 0x90a60140}, \
8569 {0x14, 0x90170110}, \
8572 #define ALC282_STANDARD_PINS \
8575 #define ALC290_STANDARD_PINS \
8578 #define ALC292_STANDARD_PINS \
8579 {0x14, 0x90170110}, \
8582 #define ALC295_STANDARD_PINS \
8583 {0x12, 0xb7a60130}, \
8584 {0x14, 0x90170110}, \
8587 #define ALC298_STANDARD_PINS \
8588 {0x12, 0x90a60130}, \
8591 static const struct snd_hda_pin_quirk alc269_pin_fixup_tbl
[] = {
8592 SND_HDA_PIN_QUIRK(0x10ec0221, 0x103c, "HP Workstation", ALC221_FIXUP_HP_HEADSET_MIC
,
8597 {0x21, 0x0221102f}),
8598 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1025, "Acer", ALC255_FIXUP_ACER_MIC_NO_PRESENCE
,
8601 {0x21, 0x02211030}),
8602 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1043, "ASUS", ALC255_FIXUP_ASUS_MIC_NO_PRESENCE
,
8605 {0x21, 0x03211020}),
8606 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1043, "ASUS", ALC255_FIXUP_ASUS_MIC_NO_PRESENCE
,
8609 {0x21, 0x03211020}),
8610 SND_HDA_PIN_QUIRK(0x10ec0225, 0x1028, "Dell", ALC225_FIXUP_DELL1_MIC_NO_PRESENCE
,
8611 ALC225_STANDARD_PINS
,
8613 {0x14, 0x901701a0}),
8614 SND_HDA_PIN_QUIRK(0x10ec0225, 0x1028, "Dell", ALC225_FIXUP_DELL1_MIC_NO_PRESENCE
,
8615 ALC225_STANDARD_PINS
,
8617 {0x14, 0x901701b0}),
8618 SND_HDA_PIN_QUIRK(0x10ec0225, 0x1028, "Dell", ALC225_FIXUP_DELL1_MIC_NO_PRESENCE
,
8619 ALC225_STANDARD_PINS
,
8621 {0x14, 0x901701a0}),
8622 SND_HDA_PIN_QUIRK(0x10ec0225, 0x1028, "Dell", ALC225_FIXUP_DELL1_MIC_NO_PRESENCE
,
8623 ALC225_STANDARD_PINS
,
8625 {0x14, 0x901701b0}),
8626 SND_HDA_PIN_QUIRK(0x10ec0225, 0x1028, "Dell", ALC225_FIXUP_DELL1_MIC_NO_PRESENCE
,
8627 ALC225_STANDARD_PINS
,
8629 {0x1b, 0x90170110}),
8630 SND_HDA_PIN_QUIRK(0x10ec0233, 0x8086, "Intel NUC Skull Canyon", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE
,
8633 {0x21, 0x02211020}),
8634 SND_HDA_PIN_QUIRK(0x10ec0235, 0x17aa, "Lenovo", ALC233_FIXUP_LENOVO_LINE2_MIC_HOTKEY
,
8638 {0x21, 0x02211020}),
8639 SND_HDA_PIN_QUIRK(0x10ec0235, 0x17aa, "Lenovo", ALC294_FIXUP_LENOVO_MIC_LOCATION
,
8644 {0x21, 0x0221101f}),
8645 SND_HDA_PIN_QUIRK(0x10ec0235, 0x17aa, "Lenovo", ALC294_FIXUP_LENOVO_MIC_LOCATION
,
8650 {0x21, 0x0221101f}),
8651 SND_HDA_PIN_QUIRK(0x10ec0235, 0x17aa, "Lenovo", ALC294_FIXUP_LENOVO_MIC_LOCATION
,
8655 {0x21, 0x0221101f}),
8656 SND_HDA_PIN_QUIRK(0x10ec0236, 0x1028, "Dell", ALC236_FIXUP_DELL_AIO_HEADSET_MIC
,
8657 {0x21, 0x02211010}),
8658 SND_HDA_PIN_QUIRK(0x10ec0236, 0x103c, "HP", ALC256_FIXUP_HP_HEADSET_MIC
,
8661 {0x21, 0x02211030}),
8662 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL2_MIC_NO_PRESENCE
,
8664 {0x21, 0x02211020}),
8665 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE
,
8667 {0x21, 0x02211040}),
8668 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE
,
8671 {0x21, 0x02211020}),
8672 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE
,
8675 {0x21, 0x02211030}),
8676 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE
,
8679 {0x21, 0x0221101f}),
8680 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE
,
8683 {0x21, 0x0221101f}),
8684 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE
,
8687 {0x21, 0x0221103f}),
8688 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE
,
8691 {0x21, 0x0221103f}),
8692 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE
,
8695 {0x21, 0x0221103f}),
8696 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE
,
8699 {0x21, 0x0221105f}),
8700 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE
,
8703 {0x21, 0x0221101f}),
8704 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE
,
8708 {0x21, 0x0321102f}),
8709 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE
,
8712 {0x21, 0x02211040}),
8713 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE
,
8716 {0x21, 0x02211050}),
8717 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE
,
8720 {0x21, 0x02211030}),
8721 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE
,
8724 {0x21, 0x02211040}),
8725 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE
,
8728 {0x21, 0x02211040}),
8729 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE
,
8732 {0x21, 0x02211050}),
8733 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell Inspiron 5548", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE
,
8736 {0x21, 0x02211040}),
8737 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell Inspiron 5565", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE
,
8740 {0x21, 0x02211030}),
8741 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE
,
8743 {0x21, 0x02211010}),
8744 SND_HDA_PIN_QUIRK(0x10ec0256, 0x1043, "ASUS", ALC256_FIXUP_ASUS_MIC
,
8747 {0x21, 0x04211020}),
8748 SND_HDA_PIN_QUIRK(0x10ec0256, 0x1043, "ASUS", ALC256_FIXUP_ASUS_MIC
,
8751 {0x21, 0x03211020}),
8752 SND_HDA_PIN_QUIRK(0x10ec0256, 0x1043, "ASUS", ALC256_FIXUP_ASUS_MIC_NO_PRESENCE
,
8755 {0x21, 0x03211020}),
8756 SND_HDA_PIN_QUIRK(0x10ec0256, 0x1043, "ASUS", ALC256_FIXUP_ASUS_MIC_NO_PRESENCE
,
8759 {0x21, 0x04211020}),
8760 SND_HDA_PIN_QUIRK(0x10ec0256, 0x1043, "ASUS", ALC256_FIXUP_ASUS_MIC_NO_PRESENCE
,
8763 {0x21, 0x03211020}),
8764 SND_HDA_PIN_QUIRK(0x10ec0256, 0x103c, "HP", ALC256_FIXUP_HP_HEADSET_MIC
,
8767 {0x21, 0x0221101f}),
8768 SND_HDA_PIN_QUIRK(0x10ec0274, 0x103c, "HP", ALC274_FIXUP_HP_HEADSET_MIC
,
8771 {0x21, 0x03211020}),
8772 SND_HDA_PIN_QUIRK(0x10ec0280, 0x103c, "HP", ALC280_FIXUP_HP_GPIO4
,
8776 {0x1a, 0x04a11020}),
8777 SND_HDA_PIN_QUIRK(0x10ec0280, 0x103c, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED
,
8783 {0x1b, 0x02011020}),
8784 SND_HDA_PIN_QUIRK(0x10ec0282, 0x103c, "HP 15 Touchsmart", ALC269_FIXUP_HP_MUTE_LED_MIC1
,
8785 ALC282_STANDARD_PINS
,
8788 {0x21, 0x0321101f}),
8789 SND_HDA_PIN_QUIRK(0x10ec0282, 0x103c, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1
,
8790 ALC282_STANDARD_PINS
,
8793 {0x21, 0x03211040}),
8794 SND_HDA_PIN_QUIRK(0x10ec0282, 0x103c, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1
,
8795 ALC282_STANDARD_PINS
,
8798 {0x21, 0x03211020}),
8799 SND_HDA_PIN_QUIRK(0x10ec0282, 0x103c, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1
,
8800 ALC282_STANDARD_PINS
,
8803 {0x21, 0x0421101f}),
8804 SND_HDA_PIN_QUIRK(0x10ec0282, 0x103c, "HP", ALC269_FIXUP_HP_LINE1_MIC1_LED
,
8805 ALC282_STANDARD_PINS
,
8808 {0x21, 0x04211020}),
8809 SND_HDA_PIN_QUIRK(0x10ec0282, 0x1025, "Acer", ALC282_FIXUP_ACER_DISABLE_LINEOUT
,
8810 ALC282_STANDARD_PINS
,
8816 {0x21, 0x0321101f}),
8817 SND_HDA_PIN_QUIRK(0x10ec0282, 0x1025, "Acer", ALC282_FIXUP_ACER_DISABLE_LINEOUT
,
8818 ALC282_STANDARD_PINS
,
8824 {0x21, 0x0321101f}),
8825 SND_HDA_PIN_QUIRK(0x10ec0283, 0x1028, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE
,
8826 ALC282_STANDARD_PINS
,
8828 {0x21, 0x0321101f}),
8829 SND_HDA_PIN_QUIRK(0x10ec0283, 0x1028, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE
,
8832 {0x21, 0x02211030}),
8833 SND_HDA_PIN_QUIRK(0x10ec0283, 0x1028, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE
,
8834 ALC282_STANDARD_PINS
,
8837 {0x21, 0x0321101f}),
8838 SND_HDA_PIN_QUIRK(0x10ec0285, 0x17aa, "Lenovo", ALC285_FIXUP_LENOVO_PC_BEEP_IN_NOISE
,
8842 {0x21, 0x04211020}),
8843 SND_HDA_PIN_QUIRK(0x10ec0285, 0x17aa, "Lenovo", ALC285_FIXUP_LENOVO_PC_BEEP_IN_NOISE
,
8847 {0x21, 0x04211020}),
8848 SND_HDA_PIN_QUIRK(0x10ec0285, 0x17aa, "Lenovo", ALC285_FIXUP_THINKPAD_NO_BASS_SPK_HEADSET_JACK
,
8851 {0x21, 0x04211020}),
8852 SND_HDA_PIN_QUIRK(0x10ec0287, 0x17aa, "Lenovo", ALC285_FIXUP_THINKPAD_HEADSET_JACK
,
8856 {0x21, 0x03211020}),
8857 SND_HDA_PIN_QUIRK(0x10ec0286, 0x1025, "Acer", ALC286_FIXUP_ACER_AIO_MIC_NO_PRESENCE
,
8860 {0x21, 0x02211020}),
8861 SND_HDA_PIN_QUIRK(0x10ec0288, 0x1028, "Dell", ALC288_FIXUP_DELL1_MIC_NO_PRESENCE
,
8864 {0x21, 0x0321101f}),
8865 SND_HDA_PIN_QUIRK(0x10ec0290, 0x103c, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1
,
8866 ALC290_STANDARD_PINS
,
8869 {0x1a, 0x04a11020}),
8870 SND_HDA_PIN_QUIRK(0x10ec0290, 0x103c, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1
,
8871 ALC290_STANDARD_PINS
,
8874 {0x1a, 0x04a11020}),
8875 SND_HDA_PIN_QUIRK(0x10ec0290, 0x103c, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1
,
8876 ALC290_STANDARD_PINS
,
8878 {0x1a, 0x04a11020}),
8879 SND_HDA_PIN_QUIRK(0x10ec0290, 0x103c, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1
,
8880 ALC290_STANDARD_PINS
,
8882 {0x1a, 0x04a11040}),
8883 SND_HDA_PIN_QUIRK(0x10ec0290, 0x103c, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1
,
8884 ALC290_STANDARD_PINS
,
8887 {0x1a, 0x04a11040}),
8888 SND_HDA_PIN_QUIRK(0x10ec0290, 0x103c, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1
,
8889 ALC290_STANDARD_PINS
,
8892 {0x1a, 0x04a11020}),
8893 SND_HDA_PIN_QUIRK(0x10ec0290, 0x103c, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1
,
8894 ALC290_STANDARD_PINS
,
8897 {0x1a, 0x04a11020}),
8898 SND_HDA_PIN_QUIRK(0x10ec0292, 0x1028, "Dell", ALC269_FIXUP_DELL2_MIC_NO_PRESENCE
,
8899 ALC292_STANDARD_PINS
,
8902 {0x19, 0x01a19030}),
8903 SND_HDA_PIN_QUIRK(0x10ec0292, 0x1028, "Dell", ALC269_FIXUP_DELL2_MIC_NO_PRESENCE
,
8904 ALC292_STANDARD_PINS
,
8908 {0x19, 0x01a1903e}),
8909 SND_HDA_PIN_QUIRK(0x10ec0292, 0x1028, "Dell", ALC269_FIXUP_DELL3_MIC_NO_PRESENCE
,
8910 ALC292_STANDARD_PINS
,
8911 {0x12, 0x90a60140}),
8912 SND_HDA_PIN_QUIRK(0x10ec0293, 0x1028, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE
,
8913 ALC292_STANDARD_PINS
,
8916 {0x19, 0x21a19030}),
8917 SND_HDA_PIN_QUIRK(0x10ec0293, 0x1028, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE
,
8918 ALC292_STANDARD_PINS
,
8919 {0x13, 0x90a60140}),
8920 SND_HDA_PIN_QUIRK(0x10ec0294, 0x1043, "ASUS", ALC294_FIXUP_ASUS_HPE
,
8922 {0x21, 0x04211020}),
8923 SND_HDA_PIN_QUIRK(0x10ec0294, 0x1043, "ASUS", ALC294_FIXUP_ASUS_MIC
,
8926 {0x21, 0x04211020}),
8927 SND_HDA_PIN_QUIRK(0x10ec0294, 0x1043, "ASUS", ALC294_FIXUP_ASUS_SPK
,
8930 {0x21, 0x03211020}),
8931 SND_HDA_PIN_QUIRK(0x10ec0294, 0x1043, "ASUS", ALC294_FIXUP_ASUS_SPK
,
8934 {0x21, 0x04211020}),
8935 SND_HDA_PIN_QUIRK(0x10ec0295, 0x1043, "ASUS", ALC294_FIXUP_ASUS_SPK
,
8938 {0x21, 0x03211020}),
8939 SND_HDA_PIN_QUIRK(0x10ec0295, 0x1043, "ASUS", ALC295_FIXUP_ASUS_MIC_NO_PRESENCE
,
8942 {0x21, 0x04211030}),
8943 SND_HDA_PIN_QUIRK(0x10ec0295, 0x1043, "ASUS", ALC295_FIXUP_ASUS_MIC_NO_PRESENCE
,
8946 {0x21, 0x03211020}),
8947 SND_HDA_PIN_QUIRK(0x10ec0295, 0x1043, "ASUS", ALC295_FIXUP_ASUS_MIC_NO_PRESENCE
,
8950 {0x21, 0x03211020}),
8951 SND_HDA_PIN_QUIRK(0x10ec0295, 0x1028, "Dell", ALC269_FIXUP_DELL4_MIC_NO_PRESENCE
,
8953 {0x21, 0x04211020}),
8954 SND_HDA_PIN_QUIRK(0x10ec0295, 0x1028, "Dell", ALC269_FIXUP_DELL4_MIC_NO_PRESENCE
,
8956 {0x21, 0x04211030}),
8957 SND_HDA_PIN_QUIRK(0x10ec0295, 0x1028, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE
,
8958 ALC295_STANDARD_PINS
,
8960 {0x18, 0x21a19030}),
8961 SND_HDA_PIN_QUIRK(0x10ec0295, 0x1028, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE
,
8962 ALC295_STANDARD_PINS
,
8964 {0x18, 0x21a19050}),
8965 SND_HDA_PIN_QUIRK(0x10ec0295, 0x1028, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE
,
8966 ALC295_STANDARD_PINS
),
8967 SND_HDA_PIN_QUIRK(0x10ec0298, 0x1028, "Dell", ALC298_FIXUP_DELL1_MIC_NO_PRESENCE
,
8968 ALC298_STANDARD_PINS
,
8969 {0x17, 0x90170110}),
8970 SND_HDA_PIN_QUIRK(0x10ec0298, 0x1028, "Dell", ALC298_FIXUP_DELL1_MIC_NO_PRESENCE
,
8971 ALC298_STANDARD_PINS
,
8972 {0x17, 0x90170140}),
8973 SND_HDA_PIN_QUIRK(0x10ec0298, 0x1028, "Dell", ALC298_FIXUP_DELL1_MIC_NO_PRESENCE
,
8974 ALC298_STANDARD_PINS
,
8975 {0x17, 0x90170150}),
8976 SND_HDA_PIN_QUIRK(0x10ec0298, 0x1028, "Dell", ALC298_FIXUP_SPK_VOLUME
,
8981 {0x21, 0x03211030}),
8982 SND_HDA_PIN_QUIRK(0x10ec0298, 0x1028, "Dell", ALC298_FIXUP_ALIENWARE_MIC_NO_PRESENCE
,
8986 {0x21, 0x03211020}),
8987 SND_HDA_PIN_QUIRK(0x10ec0299, 0x1028, "Dell", ALC269_FIXUP_DELL4_MIC_NO_PRESENCE
,
8988 ALC225_STANDARD_PINS
,
8990 {0x17, 0x90170110}),
8991 SND_HDA_PIN_QUIRK(0x10ec0623, 0x17aa, "Lenovo", ALC283_FIXUP_HEADSET_MIC
,
8996 {0x21, 0x0221101f}),
9000 /* This is the fallback pin_fixup_tbl for alc269 family, to make the tbl match
9001 * more machines, don't need to match all valid pins, just need to match
9002 * all the pins defined in the tbl. Just because of this reason, it is possible
9003 * that a single machine matches multiple tbls, so there is one limitation:
9004 * at most one tbl is allowed to define for the same vendor and same codec
9006 static const struct snd_hda_pin_quirk alc269_fallback_pin_fixup_tbl
[] = {
9007 SND_HDA_PIN_QUIRK(0x10ec0289, 0x1028, "Dell", ALC269_FIXUP_DELL4_MIC_NO_PRESENCE
,
9009 {0x1b, 0x40000000}),
9010 SND_HDA_PIN_QUIRK(0x10ec0256, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE
,
9012 {0x1a, 0x40000000}),
9013 SND_HDA_PIN_QUIRK(0x10ec0236, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE
,
9015 {0x1a, 0x40000000}),
9016 SND_HDA_PIN_QUIRK(0x10ec0274, 0x1028, "Dell", ALC274_FIXUP_DELL_AIO_LINEOUT_VERB
,
9018 {0x1a, 0x40000000}),
9022 static void alc269_fill_coef(struct hda_codec
*codec
)
9024 struct alc_spec
*spec
= codec
->spec
;
9027 if (spec
->codec_variant
!= ALC269_TYPE_ALC269VB
)
9030 if ((alc_get_coef0(codec
) & 0x00ff) < 0x015) {
9031 alc_write_coef_idx(codec
, 0xf, 0x960b);
9032 alc_write_coef_idx(codec
, 0xe, 0x8817);
9035 if ((alc_get_coef0(codec
) & 0x00ff) == 0x016) {
9036 alc_write_coef_idx(codec
, 0xf, 0x960b);
9037 alc_write_coef_idx(codec
, 0xe, 0x8814);
9040 if ((alc_get_coef0(codec
) & 0x00ff) == 0x017) {
9041 /* Power up output pin */
9042 alc_update_coef_idx(codec
, 0x04, 0, 1<<11);
9045 if ((alc_get_coef0(codec
) & 0x00ff) == 0x018) {
9046 val
= alc_read_coef_idx(codec
, 0xd);
9047 if (val
!= -1 && (val
& 0x0c00) >> 10 != 0x1) {
9048 /* Capless ramp up clock control */
9049 alc_write_coef_idx(codec
, 0xd, val
| (1<<10));
9051 val
= alc_read_coef_idx(codec
, 0x17);
9052 if (val
!= -1 && (val
& 0x01c0) >> 6 != 0x4) {
9053 /* Class D power on reset */
9054 alc_write_coef_idx(codec
, 0x17, val
| (1<<7));
9059 alc_update_coef_idx(codec
, 0x4, 0, 1<<11);
9064 static int patch_alc269(struct hda_codec
*codec
)
9066 struct alc_spec
*spec
;
9069 err
= alc_alloc_spec(codec
, 0x0b);
9074 spec
->gen
.shared_mic_vref_pin
= 0x18;
9075 codec
->power_save_node
= 0;
9078 codec
->patch_ops
.suspend
= alc269_suspend
;
9079 codec
->patch_ops
.resume
= alc269_resume
;
9081 spec
->shutup
= alc_default_shutup
;
9082 spec
->init_hook
= alc_default_init
;
9084 switch (codec
->core
.vendor_id
) {
9086 spec
->codec_variant
= ALC269_TYPE_ALC269VA
;
9087 switch (alc_get_coef0(codec
) & 0x00f0) {
9089 if (codec
->bus
->pci
&&
9090 codec
->bus
->pci
->subsystem_vendor
== 0x1025 &&
9091 spec
->cdefine
.platform_type
== 1)
9092 err
= alc_codec_rename(codec
, "ALC271X");
9093 spec
->codec_variant
= ALC269_TYPE_ALC269VB
;
9096 if (codec
->bus
->pci
&&
9097 codec
->bus
->pci
->subsystem_vendor
== 0x17aa &&
9098 codec
->bus
->pci
->subsystem_device
== 0x21f3)
9099 err
= alc_codec_rename(codec
, "ALC3202");
9100 spec
->codec_variant
= ALC269_TYPE_ALC269VC
;
9103 spec
->codec_variant
= ALC269_TYPE_ALC269VD
;
9106 alc_fix_pll_init(codec
, 0x20, 0x04, 15);
9110 spec
->shutup
= alc269_shutup
;
9111 spec
->init_hook
= alc269_fill_coef
;
9112 alc269_fill_coef(codec
);
9117 spec
->codec_variant
= ALC269_TYPE_ALC280
;
9120 spec
->codec_variant
= ALC269_TYPE_ALC282
;
9121 spec
->shutup
= alc282_shutup
;
9122 spec
->init_hook
= alc282_init
;
9126 spec
->codec_variant
= ALC269_TYPE_ALC283
;
9127 spec
->shutup
= alc283_shutup
;
9128 spec
->init_hook
= alc283_init
;
9132 spec
->codec_variant
= ALC269_TYPE_ALC284
;
9135 spec
->codec_variant
= ALC269_TYPE_ALC293
;
9139 spec
->codec_variant
= ALC269_TYPE_ALC286
;
9142 spec
->codec_variant
= ALC269_TYPE_ALC298
;
9146 spec
->codec_variant
= ALC269_TYPE_ALC255
;
9147 spec
->shutup
= alc256_shutup
;
9148 spec
->init_hook
= alc256_init
;
9152 spec
->codec_variant
= ALC269_TYPE_ALC256
;
9153 spec
->shutup
= alc256_shutup
;
9154 spec
->init_hook
= alc256_init
;
9155 spec
->gen
.mixer_nid
= 0; /* ALC256 does not have any loopback mixer path */
9158 spec
->codec_variant
= ALC269_TYPE_ALC257
;
9159 spec
->shutup
= alc256_shutup
;
9160 spec
->init_hook
= alc256_init
;
9161 spec
->gen
.mixer_nid
= 0;
9168 spec
->codec_variant
= ALC269_TYPE_ALC215
;
9169 spec
->shutup
= alc225_shutup
;
9170 spec
->init_hook
= alc225_init
;
9171 spec
->gen
.mixer_nid
= 0;
9176 spec
->codec_variant
= ALC269_TYPE_ALC225
;
9177 spec
->shutup
= alc225_shutup
;
9178 spec
->init_hook
= alc225_init
;
9179 spec
->gen
.mixer_nid
= 0; /* no loopback on ALC225, ALC295 and ALC299 */
9184 spec
->codec_variant
= ALC269_TYPE_ALC294
;
9185 spec
->gen
.mixer_nid
= 0; /* ALC2x4 does not have any loopback mixer path */
9186 alc_update_coef_idx(codec
, 0x6b, 0x0018, (1<<4) | (1<<3)); /* UAJ MIC Vref control by verb */
9187 spec
->init_hook
= alc294_init
;
9190 spec
->codec_variant
= ALC269_TYPE_ALC300
;
9191 spec
->gen
.mixer_nid
= 0; /* no loopback on ALC300 */
9194 spec
->codec_variant
= ALC269_TYPE_ALC623
;
9200 spec
->codec_variant
= ALC269_TYPE_ALC700
;
9201 spec
->gen
.mixer_nid
= 0; /* ALC700 does not have any loopback mixer path */
9202 alc_update_coef_idx(codec
, 0x4a, 1 << 15, 0); /* Combo jack auto trigger control */
9203 spec
->init_hook
= alc294_init
;
9208 if (snd_hda_codec_read(codec
, 0x51, 0, AC_VERB_PARAMETERS
, 0) == 0x10ec5505) {
9209 spec
->has_alc5505_dsp
= 1;
9210 spec
->init_hook
= alc5505_dsp_init
;
9213 alc_pre_init(codec
);
9215 snd_hda_pick_fixup(codec
, alc269_fixup_models
,
9216 alc269_fixup_tbl
, alc269_fixups
);
9217 snd_hda_pick_pin_fixup(codec
, alc269_pin_fixup_tbl
, alc269_fixups
, true);
9218 snd_hda_pick_pin_fixup(codec
, alc269_fallback_pin_fixup_tbl
, alc269_fixups
, false);
9219 snd_hda_pick_fixup(codec
, NULL
, alc269_fixup_vendor_tbl
,
9221 snd_hda_apply_fixup(codec
, HDA_FIXUP_ACT_PRE_PROBE
);
9223 alc_auto_parse_customize_define(codec
);
9225 if (has_cdefine_beep(codec
))
9226 spec
->gen
.beep_nid
= 0x01;
9228 /* automatic parse from the BIOS config */
9229 err
= alc269_parse_auto_config(codec
);
9233 if (!spec
->gen
.no_analog
&& spec
->gen
.beep_nid
&& spec
->gen
.mixer_nid
) {
9234 err
= set_beep_amp(spec
, spec
->gen
.mixer_nid
, 0x04, HDA_INPUT
);
9239 snd_hda_apply_fixup(codec
, HDA_FIXUP_ACT_PROBE
);
9252 static int alc861_parse_auto_config(struct hda_codec
*codec
)
9254 static const hda_nid_t alc861_ignore
[] = { 0x1d, 0 };
9255 static const hda_nid_t alc861_ssids
[] = { 0x0e, 0x0f, 0x0b, 0 };
9256 return alc_parse_auto_config(codec
, alc861_ignore
, alc861_ssids
);
9259 /* Pin config fixes */
9261 ALC861_FIXUP_FSC_AMILO_PI1505
,
9262 ALC861_FIXUP_AMP_VREF_0F
,
9263 ALC861_FIXUP_NO_JACK_DETECT
,
9264 ALC861_FIXUP_ASUS_A6RP
,
9265 ALC660_FIXUP_ASUS_W7J
,
9268 /* On some laptops, VREF of pin 0x0f is abused for controlling the main amp */
9269 static void alc861_fixup_asus_amp_vref_0f(struct hda_codec
*codec
,
9270 const struct hda_fixup
*fix
, int action
)
9272 struct alc_spec
*spec
= codec
->spec
;
9275 if (action
!= HDA_FIXUP_ACT_INIT
)
9277 val
= snd_hda_codec_get_pin_target(codec
, 0x0f);
9278 if (!(val
& (AC_PINCTL_IN_EN
| AC_PINCTL_OUT_EN
)))
9279 val
|= AC_PINCTL_IN_EN
;
9280 val
|= AC_PINCTL_VREF_50
;
9281 snd_hda_set_pin_ctl(codec
, 0x0f, val
);
9282 spec
->gen
.keep_vref_in_automute
= 1;
9285 /* suppress the jack-detection */
9286 static void alc_fixup_no_jack_detect(struct hda_codec
*codec
,
9287 const struct hda_fixup
*fix
, int action
)
9289 if (action
== HDA_FIXUP_ACT_PRE_PROBE
)
9290 codec
->no_jack_detect
= 1;
9293 static const struct hda_fixup alc861_fixups
[] = {
9294 [ALC861_FIXUP_FSC_AMILO_PI1505
] = {
9295 .type
= HDA_FIXUP_PINS
,
9296 .v
.pins
= (const struct hda_pintbl
[]) {
9297 { 0x0b, 0x0221101f }, /* HP */
9298 { 0x0f, 0x90170310 }, /* speaker */
9302 [ALC861_FIXUP_AMP_VREF_0F
] = {
9303 .type
= HDA_FIXUP_FUNC
,
9304 .v
.func
= alc861_fixup_asus_amp_vref_0f
,
9306 [ALC861_FIXUP_NO_JACK_DETECT
] = {
9307 .type
= HDA_FIXUP_FUNC
,
9308 .v
.func
= alc_fixup_no_jack_detect
,
9310 [ALC861_FIXUP_ASUS_A6RP
] = {
9311 .type
= HDA_FIXUP_FUNC
,
9312 .v
.func
= alc861_fixup_asus_amp_vref_0f
,
9314 .chain_id
= ALC861_FIXUP_NO_JACK_DETECT
,
9316 [ALC660_FIXUP_ASUS_W7J
] = {
9317 .type
= HDA_FIXUP_VERBS
,
9318 .v
.verbs
= (const struct hda_verb
[]) {
9319 /* ASUS W7J needs a magic pin setup on unused NID 0x10
9320 * for enabling outputs
9322 {0x10, AC_VERB_SET_PIN_WIDGET_CONTROL
, 0x24},
9328 static const struct snd_pci_quirk alc861_fixup_tbl
[] = {
9329 SND_PCI_QUIRK(0x1043, 0x1253, "ASUS W7J", ALC660_FIXUP_ASUS_W7J
),
9330 SND_PCI_QUIRK(0x1043, 0x1263, "ASUS Z35HL", ALC660_FIXUP_ASUS_W7J
),
9331 SND_PCI_QUIRK(0x1043, 0x1393, "ASUS A6Rp", ALC861_FIXUP_ASUS_A6RP
),
9332 SND_PCI_QUIRK_VENDOR(0x1043, "ASUS laptop", ALC861_FIXUP_AMP_VREF_0F
),
9333 SND_PCI_QUIRK(0x1462, 0x7254, "HP DX2200", ALC861_FIXUP_NO_JACK_DETECT
),
9334 SND_PCI_QUIRK_VENDOR(0x1584, "Haier/Uniwill", ALC861_FIXUP_AMP_VREF_0F
),
9335 SND_PCI_QUIRK(0x1734, 0x10c7, "FSC Amilo Pi1505", ALC861_FIXUP_FSC_AMILO_PI1505
),
9341 static int patch_alc861(struct hda_codec
*codec
)
9343 struct alc_spec
*spec
;
9346 err
= alc_alloc_spec(codec
, 0x15);
9351 if (has_cdefine_beep(codec
))
9352 spec
->gen
.beep_nid
= 0x23;
9355 spec
->power_hook
= alc_power_eapd
;
9358 alc_pre_init(codec
);
9360 snd_hda_pick_fixup(codec
, NULL
, alc861_fixup_tbl
, alc861_fixups
);
9361 snd_hda_apply_fixup(codec
, HDA_FIXUP_ACT_PRE_PROBE
);
9363 /* automatic parse from the BIOS config */
9364 err
= alc861_parse_auto_config(codec
);
9368 if (!spec
->gen
.no_analog
) {
9369 err
= set_beep_amp(spec
, 0x23, 0, HDA_OUTPUT
);
9374 snd_hda_apply_fixup(codec
, HDA_FIXUP_ACT_PROBE
);
9388 * In addition, an independent DAC
9390 static int alc861vd_parse_auto_config(struct hda_codec
*codec
)
9392 static const hda_nid_t alc861vd_ignore
[] = { 0x1d, 0 };
9393 static const hda_nid_t alc861vd_ssids
[] = { 0x15, 0x1b, 0x14, 0 };
9394 return alc_parse_auto_config(codec
, alc861vd_ignore
, alc861vd_ssids
);
9398 ALC660VD_FIX_ASUS_GPIO1
,
9399 ALC861VD_FIX_DALLAS
,
9402 /* exclude VREF80 */
9403 static void alc861vd_fixup_dallas(struct hda_codec
*codec
,
9404 const struct hda_fixup
*fix
, int action
)
9406 if (action
== HDA_FIXUP_ACT_PRE_PROBE
) {
9407 snd_hda_override_pin_caps(codec
, 0x18, 0x00000734);
9408 snd_hda_override_pin_caps(codec
, 0x19, 0x0000073c);
9413 static void alc660vd_fixup_asus_gpio1(struct hda_codec
*codec
,
9414 const struct hda_fixup
*fix
, int action
)
9416 struct alc_spec
*spec
= codec
->spec
;
9418 if (action
== HDA_FIXUP_ACT_PRE_PROBE
)
9419 spec
->gpio_mask
|= 0x02;
9420 alc_fixup_gpio(codec
, action
, 0x01);
9423 static const struct hda_fixup alc861vd_fixups
[] = {
9424 [ALC660VD_FIX_ASUS_GPIO1
] = {
9425 .type
= HDA_FIXUP_FUNC
,
9426 .v
.func
= alc660vd_fixup_asus_gpio1
,
9428 [ALC861VD_FIX_DALLAS
] = {
9429 .type
= HDA_FIXUP_FUNC
,
9430 .v
.func
= alc861vd_fixup_dallas
,
9434 static const struct snd_pci_quirk alc861vd_fixup_tbl
[] = {
9435 SND_PCI_QUIRK(0x103c, 0x30bf, "HP TX1000", ALC861VD_FIX_DALLAS
),
9436 SND_PCI_QUIRK(0x1043, 0x1339, "ASUS A7-K", ALC660VD_FIX_ASUS_GPIO1
),
9437 SND_PCI_QUIRK(0x1179, 0xff31, "Toshiba L30-149", ALC861VD_FIX_DALLAS
),
9443 static int patch_alc861vd(struct hda_codec
*codec
)
9445 struct alc_spec
*spec
;
9448 err
= alc_alloc_spec(codec
, 0x0b);
9453 if (has_cdefine_beep(codec
))
9454 spec
->gen
.beep_nid
= 0x23;
9456 spec
->shutup
= alc_eapd_shutup
;
9458 alc_pre_init(codec
);
9460 snd_hda_pick_fixup(codec
, NULL
, alc861vd_fixup_tbl
, alc861vd_fixups
);
9461 snd_hda_apply_fixup(codec
, HDA_FIXUP_ACT_PRE_PROBE
);
9463 /* automatic parse from the BIOS config */
9464 err
= alc861vd_parse_auto_config(codec
);
9468 if (!spec
->gen
.no_analog
) {
9469 err
= set_beep_amp(spec
, 0x0b, 0x05, HDA_INPUT
);
9474 snd_hda_apply_fixup(codec
, HDA_FIXUP_ACT_PROBE
);
9486 * ALC662 is almost identical with ALC880 but has cleaner and more flexible
9487 * configuration. Each pin widget can choose any input DACs and a mixer.
9488 * Each ADC is connected from a mixer of all inputs. This makes possible
9489 * 6-channel independent captures.
9491 * In addition, an independent DAC for the multi-playback (not used in this
9496 * BIOS auto configuration
9499 static int alc662_parse_auto_config(struct hda_codec
*codec
)
9501 static const hda_nid_t alc662_ignore
[] = { 0x1d, 0 };
9502 static const hda_nid_t alc663_ssids
[] = { 0x15, 0x1b, 0x14, 0x21 };
9503 static const hda_nid_t alc662_ssids
[] = { 0x15, 0x1b, 0x14, 0 };
9504 const hda_nid_t
*ssids
;
9506 if (codec
->core
.vendor_id
== 0x10ec0272 || codec
->core
.vendor_id
== 0x10ec0663 ||
9507 codec
->core
.vendor_id
== 0x10ec0665 || codec
->core
.vendor_id
== 0x10ec0670 ||
9508 codec
->core
.vendor_id
== 0x10ec0671)
9509 ssids
= alc663_ssids
;
9511 ssids
= alc662_ssids
;
9512 return alc_parse_auto_config(codec
, alc662_ignore
, ssids
);
9515 static void alc272_fixup_mario(struct hda_codec
*codec
,
9516 const struct hda_fixup
*fix
, int action
)
9518 if (action
!= HDA_FIXUP_ACT_PRE_PROBE
)
9520 if (snd_hda_override_amp_caps(codec
, 0x2, HDA_OUTPUT
,
9521 (0x3b << AC_AMPCAP_OFFSET_SHIFT
) |
9522 (0x3b << AC_AMPCAP_NUM_STEPS_SHIFT
) |
9523 (0x03 << AC_AMPCAP_STEP_SIZE_SHIFT
) |
9524 (0 << AC_AMPCAP_MUTE_SHIFT
)))
9525 codec_warn(codec
, "failed to override amp caps for NID 0x2\n");
9528 static const struct snd_pcm_chmap_elem asus_pcm_2_1_chmaps
[] = {
9530 .map
= { SNDRV_CHMAP_FL
, SNDRV_CHMAP_FR
} },
9532 .map
= { SNDRV_CHMAP_FL
, SNDRV_CHMAP_FR
,
9533 SNDRV_CHMAP_NA
, SNDRV_CHMAP_LFE
} }, /* LFE only on right */
9537 /* override the 2.1 chmap */
9538 static void alc_fixup_bass_chmap(struct hda_codec
*codec
,
9539 const struct hda_fixup
*fix
, int action
)
9541 if (action
== HDA_FIXUP_ACT_BUILD
) {
9542 struct alc_spec
*spec
= codec
->spec
;
9543 spec
->gen
.pcm_rec
[0]->stream
[0].chmap
= asus_pcm_2_1_chmaps
;
9547 /* avoid D3 for keeping GPIO up */
9548 static unsigned int gpio_led_power_filter(struct hda_codec
*codec
,
9550 unsigned int power_state
)
9552 struct alc_spec
*spec
= codec
->spec
;
9553 if (nid
== codec
->core
.afg
&& power_state
== AC_PWRST_D3
&& spec
->gpio_data
)
9558 static void alc662_fixup_led_gpio1(struct hda_codec
*codec
,
9559 const struct hda_fixup
*fix
, int action
)
9561 struct alc_spec
*spec
= codec
->spec
;
9563 alc_fixup_hp_gpio_led(codec
, action
, 0x01, 0);
9564 if (action
== HDA_FIXUP_ACT_PRE_PROBE
) {
9565 spec
->mute_led_polarity
= 1;
9566 codec
->power_filter
= gpio_led_power_filter
;
9570 static void alc662_usi_automute_hook(struct hda_codec
*codec
,
9571 struct hda_jack_callback
*jack
)
9573 struct alc_spec
*spec
= codec
->spec
;
9576 snd_hda_gen_hp_automute(codec
, jack
);
9578 vref
= spec
->gen
.hp_jack_present
? PIN_VREF80
: 0;
9580 snd_hda_codec_write(codec
, 0x19, 0, AC_VERB_SET_PIN_WIDGET_CONTROL
,
9584 static void alc662_fixup_usi_headset_mic(struct hda_codec
*codec
,
9585 const struct hda_fixup
*fix
, int action
)
9587 struct alc_spec
*spec
= codec
->spec
;
9588 if (action
== HDA_FIXUP_ACT_PRE_PROBE
) {
9589 spec
->parse_flags
|= HDA_PINCFG_HEADSET_MIC
;
9590 spec
->gen
.hp_automute_hook
= alc662_usi_automute_hook
;
9594 static void alc662_aspire_ethos_mute_speakers(struct hda_codec
*codec
,
9595 struct hda_jack_callback
*cb
)
9597 /* surround speakers at 0x1b already get muted automatically when
9598 * headphones are plugged in, but we have to mute/unmute the remaining
9599 * channels manually:
9600 * 0x15 - front left/front right
9601 * 0x18 - front center/ LFE
9603 if (snd_hda_jack_detect_state(codec
, 0x1b) == HDA_JACK_PRESENT
) {
9604 snd_hda_set_pin_ctl_cache(codec
, 0x15, 0);
9605 snd_hda_set_pin_ctl_cache(codec
, 0x18, 0);
9607 snd_hda_set_pin_ctl_cache(codec
, 0x15, PIN_OUT
);
9608 snd_hda_set_pin_ctl_cache(codec
, 0x18, PIN_OUT
);
9612 static void alc662_fixup_aspire_ethos_hp(struct hda_codec
*codec
,
9613 const struct hda_fixup
*fix
, int action
)
9615 /* Pin 0x1b: shared headphones jack and surround speakers */
9616 if (!is_jack_detectable(codec
, 0x1b))
9620 case HDA_FIXUP_ACT_PRE_PROBE
:
9621 snd_hda_jack_detect_enable_callback(codec
, 0x1b,
9622 alc662_aspire_ethos_mute_speakers
);
9623 /* subwoofer needs an extra GPIO setting to become audible */
9624 alc_setup_gpio(codec
, 0x02);
9626 case HDA_FIXUP_ACT_INIT
:
9627 /* Make sure to start in a correct state, i.e. if
9628 * headphones have been plugged in before powering up the system
9630 alc662_aspire_ethos_mute_speakers(codec
, NULL
);
9635 static void alc671_fixup_hp_headset_mic2(struct hda_codec
*codec
,
9636 const struct hda_fixup
*fix
, int action
)
9638 struct alc_spec
*spec
= codec
->spec
;
9640 static const struct hda_pintbl pincfgs
[] = {
9641 { 0x19, 0x02a11040 }, /* use as headset mic, with its own jack detect */
9642 { 0x1b, 0x0181304f },
9647 case HDA_FIXUP_ACT_PRE_PROBE
:
9648 spec
->gen
.mixer_nid
= 0;
9649 spec
->parse_flags
|= HDA_PINCFG_HEADSET_MIC
;
9650 snd_hda_apply_pincfgs(codec
, pincfgs
);
9652 case HDA_FIXUP_ACT_INIT
:
9653 alc_write_coef_idx(codec
, 0x19, 0xa054);
9658 static const struct coef_fw alc668_coefs
[] = {
9659 WRITE_COEF(0x01, 0xbebe), WRITE_COEF(0x02, 0xaaaa), WRITE_COEF(0x03, 0x0),
9660 WRITE_COEF(0x04, 0x0180), WRITE_COEF(0x06, 0x0), WRITE_COEF(0x07, 0x0f80),
9661 WRITE_COEF(0x08, 0x0031), WRITE_COEF(0x0a, 0x0060), WRITE_COEF(0x0b, 0x0),
9662 WRITE_COEF(0x0c, 0x7cf7), WRITE_COEF(0x0d, 0x1080), WRITE_COEF(0x0e, 0x7f7f),
9663 WRITE_COEF(0x0f, 0xcccc), WRITE_COEF(0x10, 0xddcc), WRITE_COEF(0x11, 0x0001),
9664 WRITE_COEF(0x13, 0x0), WRITE_COEF(0x14, 0x2aa0), WRITE_COEF(0x17, 0xa940),
9665 WRITE_COEF(0x19, 0x0), WRITE_COEF(0x1a, 0x0), WRITE_COEF(0x1b, 0x0),
9666 WRITE_COEF(0x1c, 0x0), WRITE_COEF(0x1d, 0x0), WRITE_COEF(0x1e, 0x7418),
9667 WRITE_COEF(0x1f, 0x0804), WRITE_COEF(0x20, 0x4200), WRITE_COEF(0x21, 0x0468),
9668 WRITE_COEF(0x22, 0x8ccc), WRITE_COEF(0x23, 0x0250), WRITE_COEF(0x24, 0x7418),
9669 WRITE_COEF(0x27, 0x0), WRITE_COEF(0x28, 0x8ccc), WRITE_COEF(0x2a, 0xff00),
9670 WRITE_COEF(0x2b, 0x8000), WRITE_COEF(0xa7, 0xff00), WRITE_COEF(0xa8, 0x8000),
9671 WRITE_COEF(0xaa, 0x2e17), WRITE_COEF(0xab, 0xa0c0), WRITE_COEF(0xac, 0x0),
9672 WRITE_COEF(0xad, 0x0), WRITE_COEF(0xae, 0x2ac6), WRITE_COEF(0xaf, 0xa480),
9673 WRITE_COEF(0xb0, 0x0), WRITE_COEF(0xb1, 0x0), WRITE_COEF(0xb2, 0x0),
9674 WRITE_COEF(0xb3, 0x0), WRITE_COEF(0xb4, 0x0), WRITE_COEF(0xb5, 0x1040),
9675 WRITE_COEF(0xb6, 0xd697), WRITE_COEF(0xb7, 0x902b), WRITE_COEF(0xb8, 0xd697),
9676 WRITE_COEF(0xb9, 0x902b), WRITE_COEF(0xba, 0xb8ba), WRITE_COEF(0xbb, 0xaaab),
9677 WRITE_COEF(0xbc, 0xaaaf), WRITE_COEF(0xbd, 0x6aaa), WRITE_COEF(0xbe, 0x1c02),
9678 WRITE_COEF(0xc0, 0x00ff), WRITE_COEF(0xc1, 0x0fa6),
9682 static void alc668_restore_default_value(struct hda_codec
*codec
)
9684 alc_process_coef_fw(codec
, alc668_coefs
);
9688 ALC662_FIXUP_ASPIRE
,
9689 ALC662_FIXUP_LED_GPIO1
,
9690 ALC662_FIXUP_IDEAPAD
,
9692 ALC662_FIXUP_CZC_ET26
,
9693 ALC662_FIXUP_CZC_P10T
,
9694 ALC662_FIXUP_SKU_IGNORE
,
9695 ALC662_FIXUP_HP_RP5800
,
9696 ALC662_FIXUP_ASUS_MODE1
,
9697 ALC662_FIXUP_ASUS_MODE2
,
9698 ALC662_FIXUP_ASUS_MODE3
,
9699 ALC662_FIXUP_ASUS_MODE4
,
9700 ALC662_FIXUP_ASUS_MODE5
,
9701 ALC662_FIXUP_ASUS_MODE6
,
9702 ALC662_FIXUP_ASUS_MODE7
,
9703 ALC662_FIXUP_ASUS_MODE8
,
9704 ALC662_FIXUP_NO_JACK_DETECT
,
9705 ALC662_FIXUP_ZOTAC_Z68
,
9706 ALC662_FIXUP_INV_DMIC
,
9707 ALC662_FIXUP_DELL_MIC_NO_PRESENCE
,
9708 ALC668_FIXUP_DELL_MIC_NO_PRESENCE
,
9709 ALC662_FIXUP_HEADSET_MODE
,
9710 ALC668_FIXUP_HEADSET_MODE
,
9711 ALC662_FIXUP_BASS_MODE4_CHMAP
,
9712 ALC662_FIXUP_BASS_16
,
9713 ALC662_FIXUP_BASS_1A
,
9714 ALC662_FIXUP_BASS_CHMAP
,
9715 ALC668_FIXUP_AUTO_MUTE
,
9716 ALC668_FIXUP_DELL_DISABLE_AAMIX
,
9717 ALC668_FIXUP_DELL_XPS13
,
9718 ALC662_FIXUP_ASUS_Nx50
,
9719 ALC668_FIXUP_ASUS_Nx51_HEADSET_MODE
,
9720 ALC668_FIXUP_ASUS_Nx51
,
9721 ALC668_FIXUP_MIC_COEF
,
9722 ALC668_FIXUP_ASUS_G751
,
9723 ALC891_FIXUP_HEADSET_MODE
,
9724 ALC891_FIXUP_DELL_MIC_NO_PRESENCE
,
9725 ALC662_FIXUP_ACER_VERITON
,
9726 ALC892_FIXUP_ASROCK_MOBO
,
9727 ALC662_FIXUP_USI_FUNC
,
9728 ALC662_FIXUP_USI_HEADSET_MODE
,
9729 ALC662_FIXUP_LENOVO_MULTI_CODECS
,
9730 ALC669_FIXUP_ACER_ASPIRE_ETHOS
,
9731 ALC669_FIXUP_ACER_ASPIRE_ETHOS_HEADSET
,
9732 ALC671_FIXUP_HP_HEADSET_MIC2
,
9733 ALC662_FIXUP_ACER_X2660G_HEADSET_MODE
,
9734 ALC662_FIXUP_ACER_NITRO_HEADSET_MODE
,
9737 static const struct hda_fixup alc662_fixups
[] = {
9738 [ALC662_FIXUP_ASPIRE
] = {
9739 .type
= HDA_FIXUP_PINS
,
9740 .v
.pins
= (const struct hda_pintbl
[]) {
9741 { 0x15, 0x99130112 }, /* subwoofer */
9745 [ALC662_FIXUP_LED_GPIO1
] = {
9746 .type
= HDA_FIXUP_FUNC
,
9747 .v
.func
= alc662_fixup_led_gpio1
,
9749 [ALC662_FIXUP_IDEAPAD
] = {
9750 .type
= HDA_FIXUP_PINS
,
9751 .v
.pins
= (const struct hda_pintbl
[]) {
9752 { 0x17, 0x99130112 }, /* subwoofer */
9756 .chain_id
= ALC662_FIXUP_LED_GPIO1
,
9758 [ALC272_FIXUP_MARIO
] = {
9759 .type
= HDA_FIXUP_FUNC
,
9760 .v
.func
= alc272_fixup_mario
,
9762 [ALC662_FIXUP_CZC_ET26
] = {
9763 .type
= HDA_FIXUP_PINS
,
9764 .v
.pins
= (const struct hda_pintbl
[]) {
9766 {0x14, 0x90170110}, /* speaker */
9769 {0x18, 0x01a19030}, /* mic */
9770 {0x19, 0x90a7013f}, /* int-mic */
9779 .chain_id
= ALC662_FIXUP_SKU_IGNORE
9781 [ALC662_FIXUP_CZC_P10T
] = {
9782 .type
= HDA_FIXUP_VERBS
,
9783 .v
.verbs
= (const struct hda_verb
[]) {
9784 {0x14, AC_VERB_SET_EAPD_BTLENABLE
, 0},
9788 [ALC662_FIXUP_SKU_IGNORE
] = {
9789 .type
= HDA_FIXUP_FUNC
,
9790 .v
.func
= alc_fixup_sku_ignore
,
9792 [ALC662_FIXUP_HP_RP5800
] = {
9793 .type
= HDA_FIXUP_PINS
,
9794 .v
.pins
= (const struct hda_pintbl
[]) {
9795 { 0x14, 0x0221201f }, /* HP out */
9799 .chain_id
= ALC662_FIXUP_SKU_IGNORE
9801 [ALC662_FIXUP_ASUS_MODE1
] = {
9802 .type
= HDA_FIXUP_PINS
,
9803 .v
.pins
= (const struct hda_pintbl
[]) {
9804 { 0x14, 0x99130110 }, /* speaker */
9805 { 0x18, 0x01a19c20 }, /* mic */
9806 { 0x19, 0x99a3092f }, /* int-mic */
9807 { 0x21, 0x0121401f }, /* HP out */
9811 .chain_id
= ALC662_FIXUP_SKU_IGNORE
9813 [ALC662_FIXUP_ASUS_MODE2
] = {
9814 .type
= HDA_FIXUP_PINS
,
9815 .v
.pins
= (const struct hda_pintbl
[]) {
9816 { 0x14, 0x99130110 }, /* speaker */
9817 { 0x18, 0x01a19820 }, /* mic */
9818 { 0x19, 0x99a3092f }, /* int-mic */
9819 { 0x1b, 0x0121401f }, /* HP out */
9823 .chain_id
= ALC662_FIXUP_SKU_IGNORE
9825 [ALC662_FIXUP_ASUS_MODE3
] = {
9826 .type
= HDA_FIXUP_PINS
,
9827 .v
.pins
= (const struct hda_pintbl
[]) {
9828 { 0x14, 0x99130110 }, /* speaker */
9829 { 0x15, 0x0121441f }, /* HP */
9830 { 0x18, 0x01a19840 }, /* mic */
9831 { 0x19, 0x99a3094f }, /* int-mic */
9832 { 0x21, 0x01211420 }, /* HP2 */
9836 .chain_id
= ALC662_FIXUP_SKU_IGNORE
9838 [ALC662_FIXUP_ASUS_MODE4
] = {
9839 .type
= HDA_FIXUP_PINS
,
9840 .v
.pins
= (const struct hda_pintbl
[]) {
9841 { 0x14, 0x99130110 }, /* speaker */
9842 { 0x16, 0x99130111 }, /* speaker */
9843 { 0x18, 0x01a19840 }, /* mic */
9844 { 0x19, 0x99a3094f }, /* int-mic */
9845 { 0x21, 0x0121441f }, /* HP */
9849 .chain_id
= ALC662_FIXUP_SKU_IGNORE
9851 [ALC662_FIXUP_ASUS_MODE5
] = {
9852 .type
= HDA_FIXUP_PINS
,
9853 .v
.pins
= (const struct hda_pintbl
[]) {
9854 { 0x14, 0x99130110 }, /* speaker */
9855 { 0x15, 0x0121441f }, /* HP */
9856 { 0x16, 0x99130111 }, /* speaker */
9857 { 0x18, 0x01a19840 }, /* mic */
9858 { 0x19, 0x99a3094f }, /* int-mic */
9862 .chain_id
= ALC662_FIXUP_SKU_IGNORE
9864 [ALC662_FIXUP_ASUS_MODE6
] = {
9865 .type
= HDA_FIXUP_PINS
,
9866 .v
.pins
= (const struct hda_pintbl
[]) {
9867 { 0x14, 0x99130110 }, /* speaker */
9868 { 0x15, 0x01211420 }, /* HP2 */
9869 { 0x18, 0x01a19840 }, /* mic */
9870 { 0x19, 0x99a3094f }, /* int-mic */
9871 { 0x1b, 0x0121441f }, /* HP */
9875 .chain_id
= ALC662_FIXUP_SKU_IGNORE
9877 [ALC662_FIXUP_ASUS_MODE7
] = {
9878 .type
= HDA_FIXUP_PINS
,
9879 .v
.pins
= (const struct hda_pintbl
[]) {
9880 { 0x14, 0x99130110 }, /* speaker */
9881 { 0x17, 0x99130111 }, /* speaker */
9882 { 0x18, 0x01a19840 }, /* mic */
9883 { 0x19, 0x99a3094f }, /* int-mic */
9884 { 0x1b, 0x01214020 }, /* HP */
9885 { 0x21, 0x0121401f }, /* HP */
9889 .chain_id
= ALC662_FIXUP_SKU_IGNORE
9891 [ALC662_FIXUP_ASUS_MODE8
] = {
9892 .type
= HDA_FIXUP_PINS
,
9893 .v
.pins
= (const struct hda_pintbl
[]) {
9894 { 0x14, 0x99130110 }, /* speaker */
9895 { 0x12, 0x99a30970 }, /* int-mic */
9896 { 0x15, 0x01214020 }, /* HP */
9897 { 0x17, 0x99130111 }, /* speaker */
9898 { 0x18, 0x01a19840 }, /* mic */
9899 { 0x21, 0x0121401f }, /* HP */
9903 .chain_id
= ALC662_FIXUP_SKU_IGNORE
9905 [ALC662_FIXUP_NO_JACK_DETECT
] = {
9906 .type
= HDA_FIXUP_FUNC
,
9907 .v
.func
= alc_fixup_no_jack_detect
,
9909 [ALC662_FIXUP_ZOTAC_Z68
] = {
9910 .type
= HDA_FIXUP_PINS
,
9911 .v
.pins
= (const struct hda_pintbl
[]) {
9912 { 0x1b, 0x02214020 }, /* Front HP */
9916 [ALC662_FIXUP_INV_DMIC
] = {
9917 .type
= HDA_FIXUP_FUNC
,
9918 .v
.func
= alc_fixup_inv_dmic
,
9920 [ALC668_FIXUP_DELL_XPS13
] = {
9921 .type
= HDA_FIXUP_FUNC
,
9922 .v
.func
= alc_fixup_dell_xps13
,
9924 .chain_id
= ALC668_FIXUP_DELL_DISABLE_AAMIX
9926 [ALC668_FIXUP_DELL_DISABLE_AAMIX
] = {
9927 .type
= HDA_FIXUP_FUNC
,
9928 .v
.func
= alc_fixup_disable_aamix
,
9930 .chain_id
= ALC668_FIXUP_DELL_MIC_NO_PRESENCE
9932 [ALC668_FIXUP_AUTO_MUTE
] = {
9933 .type
= HDA_FIXUP_FUNC
,
9934 .v
.func
= alc_fixup_auto_mute_via_amp
,
9936 .chain_id
= ALC668_FIXUP_DELL_MIC_NO_PRESENCE
9938 [ALC662_FIXUP_DELL_MIC_NO_PRESENCE
] = {
9939 .type
= HDA_FIXUP_PINS
,
9940 .v
.pins
= (const struct hda_pintbl
[]) {
9941 { 0x19, 0x03a1113c }, /* use as headset mic, without its own jack detect */
9942 /* headphone mic by setting pin control of 0x1b (headphone out) to in + vref_50 */
9946 .chain_id
= ALC662_FIXUP_HEADSET_MODE
9948 [ALC662_FIXUP_HEADSET_MODE
] = {
9949 .type
= HDA_FIXUP_FUNC
,
9950 .v
.func
= alc_fixup_headset_mode_alc662
,
9952 [ALC668_FIXUP_DELL_MIC_NO_PRESENCE
] = {
9953 .type
= HDA_FIXUP_PINS
,
9954 .v
.pins
= (const struct hda_pintbl
[]) {
9955 { 0x19, 0x03a1913d }, /* use as headphone mic, without its own jack detect */
9956 { 0x1b, 0x03a1113c }, /* use as headset mic, without its own jack detect */
9960 .chain_id
= ALC668_FIXUP_HEADSET_MODE
9962 [ALC668_FIXUP_HEADSET_MODE
] = {
9963 .type
= HDA_FIXUP_FUNC
,
9964 .v
.func
= alc_fixup_headset_mode_alc668
,
9966 [ALC662_FIXUP_BASS_MODE4_CHMAP
] = {
9967 .type
= HDA_FIXUP_FUNC
,
9968 .v
.func
= alc_fixup_bass_chmap
,
9970 .chain_id
= ALC662_FIXUP_ASUS_MODE4
9972 [ALC662_FIXUP_BASS_16
] = {
9973 .type
= HDA_FIXUP_PINS
,
9974 .v
.pins
= (const struct hda_pintbl
[]) {
9975 {0x16, 0x80106111}, /* bass speaker */
9979 .chain_id
= ALC662_FIXUP_BASS_CHMAP
,
9981 [ALC662_FIXUP_BASS_1A
] = {
9982 .type
= HDA_FIXUP_PINS
,
9983 .v
.pins
= (const struct hda_pintbl
[]) {
9984 {0x1a, 0x80106111}, /* bass speaker */
9988 .chain_id
= ALC662_FIXUP_BASS_CHMAP
,
9990 [ALC662_FIXUP_BASS_CHMAP
] = {
9991 .type
= HDA_FIXUP_FUNC
,
9992 .v
.func
= alc_fixup_bass_chmap
,
9994 [ALC662_FIXUP_ASUS_Nx50
] = {
9995 .type
= HDA_FIXUP_FUNC
,
9996 .v
.func
= alc_fixup_auto_mute_via_amp
,
9998 .chain_id
= ALC662_FIXUP_BASS_1A
10000 [ALC668_FIXUP_ASUS_Nx51_HEADSET_MODE
] = {
10001 .type
= HDA_FIXUP_FUNC
,
10002 .v
.func
= alc_fixup_headset_mode_alc668
,
10003 .chain_id
= ALC662_FIXUP_BASS_CHMAP
10005 [ALC668_FIXUP_ASUS_Nx51
] = {
10006 .type
= HDA_FIXUP_PINS
,
10007 .v
.pins
= (const struct hda_pintbl
[]) {
10008 { 0x19, 0x03a1913d }, /* use as headphone mic, without its own jack detect */
10009 { 0x1a, 0x90170151 }, /* bass speaker */
10010 { 0x1b, 0x03a1113c }, /* use as headset mic, without its own jack detect */
10014 .chain_id
= ALC668_FIXUP_ASUS_Nx51_HEADSET_MODE
,
10016 [ALC668_FIXUP_MIC_COEF
] = {
10017 .type
= HDA_FIXUP_VERBS
,
10018 .v
.verbs
= (const struct hda_verb
[]) {
10019 { 0x20, AC_VERB_SET_COEF_INDEX
, 0xc3 },
10020 { 0x20, AC_VERB_SET_PROC_COEF
, 0x4000 },
10024 [ALC668_FIXUP_ASUS_G751
] = {
10025 .type
= HDA_FIXUP_PINS
,
10026 .v
.pins
= (const struct hda_pintbl
[]) {
10027 { 0x16, 0x0421101f }, /* HP */
10031 .chain_id
= ALC668_FIXUP_MIC_COEF
10033 [ALC891_FIXUP_HEADSET_MODE
] = {
10034 .type
= HDA_FIXUP_FUNC
,
10035 .v
.func
= alc_fixup_headset_mode
,
10037 [ALC891_FIXUP_DELL_MIC_NO_PRESENCE
] = {
10038 .type
= HDA_FIXUP_PINS
,
10039 .v
.pins
= (const struct hda_pintbl
[]) {
10040 { 0x19, 0x03a1913d }, /* use as headphone mic, without its own jack detect */
10041 { 0x1b, 0x03a1113c }, /* use as headset mic, without its own jack detect */
10045 .chain_id
= ALC891_FIXUP_HEADSET_MODE
10047 [ALC662_FIXUP_ACER_VERITON
] = {
10048 .type
= HDA_FIXUP_PINS
,
10049 .v
.pins
= (const struct hda_pintbl
[]) {
10050 { 0x15, 0x50170120 }, /* no internal speaker */
10054 [ALC892_FIXUP_ASROCK_MOBO
] = {
10055 .type
= HDA_FIXUP_PINS
,
10056 .v
.pins
= (const struct hda_pintbl
[]) {
10057 { 0x15, 0x40f000f0 }, /* disabled */
10058 { 0x16, 0x40f000f0 }, /* disabled */
10062 [ALC662_FIXUP_USI_FUNC
] = {
10063 .type
= HDA_FIXUP_FUNC
,
10064 .v
.func
= alc662_fixup_usi_headset_mic
,
10066 [ALC662_FIXUP_USI_HEADSET_MODE
] = {
10067 .type
= HDA_FIXUP_PINS
,
10068 .v
.pins
= (const struct hda_pintbl
[]) {
10069 { 0x19, 0x02a1913c }, /* use as headset mic, without its own jack detect */
10070 { 0x18, 0x01a1903d },
10074 .chain_id
= ALC662_FIXUP_USI_FUNC
10076 [ALC662_FIXUP_LENOVO_MULTI_CODECS
] = {
10077 .type
= HDA_FIXUP_FUNC
,
10078 .v
.func
= alc233_alc662_fixup_lenovo_dual_codecs
,
10080 [ALC669_FIXUP_ACER_ASPIRE_ETHOS_HEADSET
] = {
10081 .type
= HDA_FIXUP_FUNC
,
10082 .v
.func
= alc662_fixup_aspire_ethos_hp
,
10084 [ALC669_FIXUP_ACER_ASPIRE_ETHOS
] = {
10085 .type
= HDA_FIXUP_PINS
,
10086 .v
.pins
= (const struct hda_pintbl
[]) {
10087 { 0x15, 0x92130110 }, /* front speakers */
10088 { 0x18, 0x99130111 }, /* center/subwoofer */
10089 { 0x1b, 0x11130012 }, /* surround plus jack for HP */
10093 .chain_id
= ALC669_FIXUP_ACER_ASPIRE_ETHOS_HEADSET
10095 [ALC671_FIXUP_HP_HEADSET_MIC2
] = {
10096 .type
= HDA_FIXUP_FUNC
,
10097 .v
.func
= alc671_fixup_hp_headset_mic2
,
10099 [ALC662_FIXUP_ACER_X2660G_HEADSET_MODE
] = {
10100 .type
= HDA_FIXUP_PINS
,
10101 .v
.pins
= (const struct hda_pintbl
[]) {
10102 { 0x1a, 0x02a1113c }, /* use as headset mic, without its own jack detect */
10106 .chain_id
= ALC662_FIXUP_USI_FUNC
10108 [ALC662_FIXUP_ACER_NITRO_HEADSET_MODE
] = {
10109 .type
= HDA_FIXUP_PINS
,
10110 .v
.pins
= (const struct hda_pintbl
[]) {
10111 { 0x1a, 0x01a11140 }, /* use as headset mic, without its own jack detect */
10112 { 0x1b, 0x0221144f },
10116 .chain_id
= ALC662_FIXUP_USI_FUNC
10120 static const struct snd_pci_quirk alc662_fixup_tbl
[] = {
10121 SND_PCI_QUIRK(0x1019, 0x9087, "ECS", ALC662_FIXUP_ASUS_MODE2
),
10122 SND_PCI_QUIRK(0x1025, 0x022f, "Acer Aspire One", ALC662_FIXUP_INV_DMIC
),
10123 SND_PCI_QUIRK(0x1025, 0x0241, "Packard Bell DOTS", ALC662_FIXUP_INV_DMIC
),
10124 SND_PCI_QUIRK(0x1025, 0x0308, "Acer Aspire 8942G", ALC662_FIXUP_ASPIRE
),
10125 SND_PCI_QUIRK(0x1025, 0x031c, "Gateway NV79", ALC662_FIXUP_SKU_IGNORE
),
10126 SND_PCI_QUIRK(0x1025, 0x0349, "eMachines eM250", ALC662_FIXUP_INV_DMIC
),
10127 SND_PCI_QUIRK(0x1025, 0x034a, "Gateway LT27", ALC662_FIXUP_INV_DMIC
),
10128 SND_PCI_QUIRK(0x1025, 0x038b, "Acer Aspire 8943G", ALC662_FIXUP_ASPIRE
),
10129 SND_PCI_QUIRK(0x1025, 0x0566, "Acer Aspire Ethos 8951G", ALC669_FIXUP_ACER_ASPIRE_ETHOS
),
10130 SND_PCI_QUIRK(0x1025, 0x123c, "Acer Nitro N50-600", ALC662_FIXUP_ACER_NITRO_HEADSET_MODE
),
10131 SND_PCI_QUIRK(0x1025, 0x124e, "Acer 2660G", ALC662_FIXUP_ACER_X2660G_HEADSET_MODE
),
10132 SND_PCI_QUIRK(0x1028, 0x05d8, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE
),
10133 SND_PCI_QUIRK(0x1028, 0x05db, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE
),
10134 SND_PCI_QUIRK(0x1028, 0x05fe, "Dell XPS 15", ALC668_FIXUP_DELL_XPS13
),
10135 SND_PCI_QUIRK(0x1028, 0x060a, "Dell XPS 13", ALC668_FIXUP_DELL_XPS13
),
10136 SND_PCI_QUIRK(0x1028, 0x060d, "Dell M3800", ALC668_FIXUP_DELL_XPS13
),
10137 SND_PCI_QUIRK(0x1028, 0x0625, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE
),
10138 SND_PCI_QUIRK(0x1028, 0x0626, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE
),
10139 SND_PCI_QUIRK(0x1028, 0x0696, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE
),
10140 SND_PCI_QUIRK(0x1028, 0x0698, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE
),
10141 SND_PCI_QUIRK(0x1028, 0x069f, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE
),
10142 SND_PCI_QUIRK(0x103c, 0x1632, "HP RP5800", ALC662_FIXUP_HP_RP5800
),
10143 SND_PCI_QUIRK(0x103c, 0x873e, "HP", ALC671_FIXUP_HP_HEADSET_MIC2
),
10144 SND_PCI_QUIRK(0x1043, 0x1080, "Asus UX501VW", ALC668_FIXUP_HEADSET_MODE
),
10145 SND_PCI_QUIRK(0x1043, 0x11cd, "Asus N550", ALC662_FIXUP_ASUS_Nx50
),
10146 SND_PCI_QUIRK(0x1043, 0x129d, "Asus N750", ALC662_FIXUP_ASUS_Nx50
),
10147 SND_PCI_QUIRK(0x1043, 0x12ff, "ASUS G751", ALC668_FIXUP_ASUS_G751
),
10148 SND_PCI_QUIRK(0x1043, 0x13df, "Asus N550JX", ALC662_FIXUP_BASS_1A
),
10149 SND_PCI_QUIRK(0x1043, 0x1477, "ASUS N56VZ", ALC662_FIXUP_BASS_MODE4_CHMAP
),
10150 SND_PCI_QUIRK(0x1043, 0x15a7, "ASUS UX51VZH", ALC662_FIXUP_BASS_16
),
10151 SND_PCI_QUIRK(0x1043, 0x177d, "ASUS N551", ALC668_FIXUP_ASUS_Nx51
),
10152 SND_PCI_QUIRK(0x1043, 0x17bd, "ASUS N751", ALC668_FIXUP_ASUS_Nx51
),
10153 SND_PCI_QUIRK(0x1043, 0x1963, "ASUS X71SL", ALC662_FIXUP_ASUS_MODE8
),
10154 SND_PCI_QUIRK(0x1043, 0x1b73, "ASUS N55SF", ALC662_FIXUP_BASS_16
),
10155 SND_PCI_QUIRK(0x1043, 0x1bf3, "ASUS N76VZ", ALC662_FIXUP_BASS_MODE4_CHMAP
),
10156 SND_PCI_QUIRK(0x1043, 0x8469, "ASUS mobo", ALC662_FIXUP_NO_JACK_DETECT
),
10157 SND_PCI_QUIRK(0x105b, 0x0cd6, "Foxconn", ALC662_FIXUP_ASUS_MODE2
),
10158 SND_PCI_QUIRK(0x144d, 0xc051, "Samsung R720", ALC662_FIXUP_IDEAPAD
),
10159 SND_PCI_QUIRK(0x14cd, 0x5003, "USI", ALC662_FIXUP_USI_HEADSET_MODE
),
10160 SND_PCI_QUIRK(0x17aa, 0x1036, "Lenovo P520", ALC662_FIXUP_LENOVO_MULTI_CODECS
),
10161 SND_PCI_QUIRK(0x17aa, 0x38af, "Lenovo Ideapad Y550P", ALC662_FIXUP_IDEAPAD
),
10162 SND_PCI_QUIRK(0x17aa, 0x3a0d, "Lenovo Ideapad Y550", ALC662_FIXUP_IDEAPAD
),
10163 SND_PCI_QUIRK(0x1849, 0x5892, "ASRock B150M", ALC892_FIXUP_ASROCK_MOBO
),
10164 SND_PCI_QUIRK(0x19da, 0xa130, "Zotac Z68", ALC662_FIXUP_ZOTAC_Z68
),
10165 SND_PCI_QUIRK(0x1b0a, 0x01b8, "ACER Veriton", ALC662_FIXUP_ACER_VERITON
),
10166 SND_PCI_QUIRK(0x1b35, 0x1234, "CZC ET26", ALC662_FIXUP_CZC_ET26
),
10167 SND_PCI_QUIRK(0x1b35, 0x2206, "CZC P10T", ALC662_FIXUP_CZC_P10T
),
10170 /* Below is a quirk table taken from the old code.
10171 * Basically the device should work as is without the fixup table.
10172 * If BIOS doesn't give a proper info, enable the corresponding
10175 SND_PCI_QUIRK(0x1043, 0x1000, "ASUS N50Vm", ALC662_FIXUP_ASUS_MODE1
),
10176 SND_PCI_QUIRK(0x1043, 0x1092, "ASUS NB", ALC662_FIXUP_ASUS_MODE3
),
10177 SND_PCI_QUIRK(0x1043, 0x1173, "ASUS K73Jn", ALC662_FIXUP_ASUS_MODE1
),
10178 SND_PCI_QUIRK(0x1043, 0x11c3, "ASUS M70V", ALC662_FIXUP_ASUS_MODE3
),
10179 SND_PCI_QUIRK(0x1043, 0x11d3, "ASUS NB", ALC662_FIXUP_ASUS_MODE1
),
10180 SND_PCI_QUIRK(0x1043, 0x11f3, "ASUS NB", ALC662_FIXUP_ASUS_MODE2
),
10181 SND_PCI_QUIRK(0x1043, 0x1203, "ASUS NB", ALC662_FIXUP_ASUS_MODE1
),
10182 SND_PCI_QUIRK(0x1043, 0x1303, "ASUS G60J", ALC662_FIXUP_ASUS_MODE1
),
10183 SND_PCI_QUIRK(0x1043, 0x1333, "ASUS G60Jx", ALC662_FIXUP_ASUS_MODE1
),
10184 SND_PCI_QUIRK(0x1043, 0x1339, "ASUS NB", ALC662_FIXUP_ASUS_MODE2
),
10185 SND_PCI_QUIRK(0x1043, 0x13e3, "ASUS N71JA", ALC662_FIXUP_ASUS_MODE7
),
10186 SND_PCI_QUIRK(0x1043, 0x1463, "ASUS N71", ALC662_FIXUP_ASUS_MODE7
),
10187 SND_PCI_QUIRK(0x1043, 0x14d3, "ASUS G72", ALC662_FIXUP_ASUS_MODE8
),
10188 SND_PCI_QUIRK(0x1043, 0x1563, "ASUS N90", ALC662_FIXUP_ASUS_MODE3
),
10189 SND_PCI_QUIRK(0x1043, 0x15d3, "ASUS N50SF F50SF", ALC662_FIXUP_ASUS_MODE1
),
10190 SND_PCI_QUIRK(0x1043, 0x16c3, "ASUS NB", ALC662_FIXUP_ASUS_MODE2
),
10191 SND_PCI_QUIRK(0x1043, 0x16f3, "ASUS K40C K50C", ALC662_FIXUP_ASUS_MODE2
),
10192 SND_PCI_QUIRK(0x1043, 0x1733, "ASUS N81De", ALC662_FIXUP_ASUS_MODE1
),
10193 SND_PCI_QUIRK(0x1043, 0x1753, "ASUS NB", ALC662_FIXUP_ASUS_MODE2
),
10194 SND_PCI_QUIRK(0x1043, 0x1763, "ASUS NB", ALC662_FIXUP_ASUS_MODE6
),
10195 SND_PCI_QUIRK(0x1043, 0x1765, "ASUS NB", ALC662_FIXUP_ASUS_MODE6
),
10196 SND_PCI_QUIRK(0x1043, 0x1783, "ASUS NB", ALC662_FIXUP_ASUS_MODE2
),
10197 SND_PCI_QUIRK(0x1043, 0x1793, "ASUS F50GX", ALC662_FIXUP_ASUS_MODE1
),
10198 SND_PCI_QUIRK(0x1043, 0x17b3, "ASUS F70SL", ALC662_FIXUP_ASUS_MODE3
),
10199 SND_PCI_QUIRK(0x1043, 0x17f3, "ASUS X58LE", ALC662_FIXUP_ASUS_MODE2
),
10200 SND_PCI_QUIRK(0x1043, 0x1813, "ASUS NB", ALC662_FIXUP_ASUS_MODE2
),
10201 SND_PCI_QUIRK(0x1043, 0x1823, "ASUS NB", ALC662_FIXUP_ASUS_MODE5
),
10202 SND_PCI_QUIRK(0x1043, 0x1833, "ASUS NB", ALC662_FIXUP_ASUS_MODE6
),
10203 SND_PCI_QUIRK(0x1043, 0x1843, "ASUS NB", ALC662_FIXUP_ASUS_MODE2
),
10204 SND_PCI_QUIRK(0x1043, 0x1853, "ASUS F50Z", ALC662_FIXUP_ASUS_MODE1
),
10205 SND_PCI_QUIRK(0x1043, 0x1864, "ASUS NB", ALC662_FIXUP_ASUS_MODE2
),
10206 SND_PCI_QUIRK(0x1043, 0x1876, "ASUS NB", ALC662_FIXUP_ASUS_MODE2
),
10207 SND_PCI_QUIRK(0x1043, 0x1893, "ASUS M50Vm", ALC662_FIXUP_ASUS_MODE3
),
10208 SND_PCI_QUIRK(0x1043, 0x1894, "ASUS X55", ALC662_FIXUP_ASUS_MODE3
),
10209 SND_PCI_QUIRK(0x1043, 0x18b3, "ASUS N80Vc", ALC662_FIXUP_ASUS_MODE1
),
10210 SND_PCI_QUIRK(0x1043, 0x18c3, "ASUS VX5", ALC662_FIXUP_ASUS_MODE1
),
10211 SND_PCI_QUIRK(0x1043, 0x18d3, "ASUS N81Te", ALC662_FIXUP_ASUS_MODE1
),
10212 SND_PCI_QUIRK(0x1043, 0x18f3, "ASUS N505Tp", ALC662_FIXUP_ASUS_MODE1
),
10213 SND_PCI_QUIRK(0x1043, 0x1903, "ASUS F5GL", ALC662_FIXUP_ASUS_MODE1
),
10214 SND_PCI_QUIRK(0x1043, 0x1913, "ASUS NB", ALC662_FIXUP_ASUS_MODE2
),
10215 SND_PCI_QUIRK(0x1043, 0x1933, "ASUS F80Q", ALC662_FIXUP_ASUS_MODE2
),
10216 SND_PCI_QUIRK(0x1043, 0x1943, "ASUS Vx3V", ALC662_FIXUP_ASUS_MODE1
),
10217 SND_PCI_QUIRK(0x1043, 0x1953, "ASUS NB", ALC662_FIXUP_ASUS_MODE1
),
10218 SND_PCI_QUIRK(0x1043, 0x1963, "ASUS X71C", ALC662_FIXUP_ASUS_MODE3
),
10219 SND_PCI_QUIRK(0x1043, 0x1983, "ASUS N5051A", ALC662_FIXUP_ASUS_MODE1
),
10220 SND_PCI_QUIRK(0x1043, 0x1993, "ASUS N20", ALC662_FIXUP_ASUS_MODE1
),
10221 SND_PCI_QUIRK(0x1043, 0x19b3, "ASUS F7Z", ALC662_FIXUP_ASUS_MODE1
),
10222 SND_PCI_QUIRK(0x1043, 0x19c3, "ASUS F5Z/F6x", ALC662_FIXUP_ASUS_MODE2
),
10223 SND_PCI_QUIRK(0x1043, 0x19e3, "ASUS NB", ALC662_FIXUP_ASUS_MODE1
),
10224 SND_PCI_QUIRK(0x1043, 0x19f3, "ASUS NB", ALC662_FIXUP_ASUS_MODE4
),
10229 static const struct hda_model_fixup alc662_fixup_models
[] = {
10230 {.id
= ALC662_FIXUP_ASPIRE
, .name
= "aspire"},
10231 {.id
= ALC662_FIXUP_IDEAPAD
, .name
= "ideapad"},
10232 {.id
= ALC272_FIXUP_MARIO
, .name
= "mario"},
10233 {.id
= ALC662_FIXUP_HP_RP5800
, .name
= "hp-rp5800"},
10234 {.id
= ALC662_FIXUP_ASUS_MODE1
, .name
= "asus-mode1"},
10235 {.id
= ALC662_FIXUP_ASUS_MODE2
, .name
= "asus-mode2"},
10236 {.id
= ALC662_FIXUP_ASUS_MODE3
, .name
= "asus-mode3"},
10237 {.id
= ALC662_FIXUP_ASUS_MODE4
, .name
= "asus-mode4"},
10238 {.id
= ALC662_FIXUP_ASUS_MODE5
, .name
= "asus-mode5"},
10239 {.id
= ALC662_FIXUP_ASUS_MODE6
, .name
= "asus-mode6"},
10240 {.id
= ALC662_FIXUP_ASUS_MODE7
, .name
= "asus-mode7"},
10241 {.id
= ALC662_FIXUP_ASUS_MODE8
, .name
= "asus-mode8"},
10242 {.id
= ALC662_FIXUP_ZOTAC_Z68
, .name
= "zotac-z68"},
10243 {.id
= ALC662_FIXUP_INV_DMIC
, .name
= "inv-dmic"},
10244 {.id
= ALC662_FIXUP_DELL_MIC_NO_PRESENCE
, .name
= "alc662-headset-multi"},
10245 {.id
= ALC668_FIXUP_DELL_MIC_NO_PRESENCE
, .name
= "dell-headset-multi"},
10246 {.id
= ALC662_FIXUP_HEADSET_MODE
, .name
= "alc662-headset"},
10247 {.id
= ALC668_FIXUP_HEADSET_MODE
, .name
= "alc668-headset"},
10248 {.id
= ALC662_FIXUP_BASS_16
, .name
= "bass16"},
10249 {.id
= ALC662_FIXUP_BASS_1A
, .name
= "bass1a"},
10250 {.id
= ALC668_FIXUP_AUTO_MUTE
, .name
= "automute"},
10251 {.id
= ALC668_FIXUP_DELL_XPS13
, .name
= "dell-xps13"},
10252 {.id
= ALC662_FIXUP_ASUS_Nx50
, .name
= "asus-nx50"},
10253 {.id
= ALC668_FIXUP_ASUS_Nx51
, .name
= "asus-nx51"},
10254 {.id
= ALC668_FIXUP_ASUS_G751
, .name
= "asus-g751"},
10255 {.id
= ALC891_FIXUP_HEADSET_MODE
, .name
= "alc891-headset"},
10256 {.id
= ALC891_FIXUP_DELL_MIC_NO_PRESENCE
, .name
= "alc891-headset-multi"},
10257 {.id
= ALC662_FIXUP_ACER_VERITON
, .name
= "acer-veriton"},
10258 {.id
= ALC892_FIXUP_ASROCK_MOBO
, .name
= "asrock-mobo"},
10259 {.id
= ALC662_FIXUP_USI_HEADSET_MODE
, .name
= "usi-headset"},
10260 {.id
= ALC662_FIXUP_LENOVO_MULTI_CODECS
, .name
= "dual-codecs"},
10261 {.id
= ALC669_FIXUP_ACER_ASPIRE_ETHOS
, .name
= "aspire-ethos"},
10265 static const struct snd_hda_pin_quirk alc662_pin_fixup_tbl
[] = {
10266 SND_HDA_PIN_QUIRK(0x10ec0867, 0x1028, "Dell", ALC891_FIXUP_DELL_MIC_NO_PRESENCE
,
10267 {0x17, 0x02211010},
10268 {0x18, 0x01a19030},
10269 {0x1a, 0x01813040},
10270 {0x21, 0x01014020}),
10271 SND_HDA_PIN_QUIRK(0x10ec0867, 0x1028, "Dell", ALC891_FIXUP_DELL_MIC_NO_PRESENCE
,
10272 {0x16, 0x01813030},
10273 {0x17, 0x02211010},
10274 {0x18, 0x01a19040},
10275 {0x21, 0x01014020}),
10276 SND_HDA_PIN_QUIRK(0x10ec0662, 0x1028, "Dell", ALC662_FIXUP_DELL_MIC_NO_PRESENCE
,
10277 {0x14, 0x01014010},
10278 {0x18, 0x01a19020},
10279 {0x1a, 0x0181302f},
10280 {0x1b, 0x0221401f}),
10281 SND_HDA_PIN_QUIRK(0x10ec0668, 0x1028, "Dell", ALC668_FIXUP_AUTO_MUTE
,
10282 {0x12, 0x99a30130},
10283 {0x14, 0x90170110},
10284 {0x15, 0x0321101f},
10285 {0x16, 0x03011020}),
10286 SND_HDA_PIN_QUIRK(0x10ec0668, 0x1028, "Dell", ALC668_FIXUP_AUTO_MUTE
,
10287 {0x12, 0x99a30140},
10288 {0x14, 0x90170110},
10289 {0x15, 0x0321101f},
10290 {0x16, 0x03011020}),
10291 SND_HDA_PIN_QUIRK(0x10ec0668, 0x1028, "Dell", ALC668_FIXUP_AUTO_MUTE
,
10292 {0x12, 0x99a30150},
10293 {0x14, 0x90170110},
10294 {0x15, 0x0321101f},
10295 {0x16, 0x03011020}),
10296 SND_HDA_PIN_QUIRK(0x10ec0668, 0x1028, "Dell", ALC668_FIXUP_AUTO_MUTE
,
10297 {0x14, 0x90170110},
10298 {0x15, 0x0321101f},
10299 {0x16, 0x03011020}),
10300 SND_HDA_PIN_QUIRK(0x10ec0668, 0x1028, "Dell XPS 15", ALC668_FIXUP_AUTO_MUTE
,
10301 {0x12, 0x90a60130},
10302 {0x14, 0x90170110},
10303 {0x15, 0x0321101f}),
10304 SND_HDA_PIN_QUIRK(0x10ec0671, 0x103c, "HP cPC", ALC671_FIXUP_HP_HEADSET_MIC2
,
10305 {0x14, 0x01014010},
10306 {0x17, 0x90170150},
10307 {0x19, 0x02a11060},
10308 {0x1b, 0x01813030},
10309 {0x21, 0x02211020}),
10310 SND_HDA_PIN_QUIRK(0x10ec0671, 0x103c, "HP cPC", ALC671_FIXUP_HP_HEADSET_MIC2
,
10311 {0x14, 0x01014010},
10312 {0x18, 0x01a19040},
10313 {0x1b, 0x01813030},
10314 {0x21, 0x02211020}),
10315 SND_HDA_PIN_QUIRK(0x10ec0671, 0x103c, "HP cPC", ALC671_FIXUP_HP_HEADSET_MIC2
,
10316 {0x14, 0x01014020},
10317 {0x17, 0x90170110},
10318 {0x18, 0x01a19050},
10319 {0x1b, 0x01813040},
10320 {0x21, 0x02211030}),
10326 static int patch_alc662(struct hda_codec
*codec
)
10328 struct alc_spec
*spec
;
10331 err
= alc_alloc_spec(codec
, 0x0b);
10335 spec
= codec
->spec
;
10337 spec
->shutup
= alc_eapd_shutup
;
10339 /* handle multiple HPs as is */
10340 spec
->parse_flags
= HDA_PINCFG_NO_HP_FIXUP
;
10342 alc_fix_pll_init(codec
, 0x20, 0x04, 15);
10344 switch (codec
->core
.vendor_id
) {
10346 spec
->init_hook
= alc668_restore_default_value
;
10350 alc_pre_init(codec
);
10352 snd_hda_pick_fixup(codec
, alc662_fixup_models
,
10353 alc662_fixup_tbl
, alc662_fixups
);
10354 snd_hda_pick_pin_fixup(codec
, alc662_pin_fixup_tbl
, alc662_fixups
, true);
10355 snd_hda_apply_fixup(codec
, HDA_FIXUP_ACT_PRE_PROBE
);
10357 alc_auto_parse_customize_define(codec
);
10359 if (has_cdefine_beep(codec
))
10360 spec
->gen
.beep_nid
= 0x01;
10362 if ((alc_get_coef0(codec
) & (1 << 14)) &&
10363 codec
->bus
->pci
&& codec
->bus
->pci
->subsystem_vendor
== 0x1025 &&
10364 spec
->cdefine
.platform_type
== 1) {
10365 err
= alc_codec_rename(codec
, "ALC272X");
10370 /* automatic parse from the BIOS config */
10371 err
= alc662_parse_auto_config(codec
);
10375 if (!spec
->gen
.no_analog
&& spec
->gen
.beep_nid
) {
10376 switch (codec
->core
.vendor_id
) {
10378 err
= set_beep_amp(spec
, 0x0b, 0x05, HDA_INPUT
);
10384 err
= set_beep_amp(spec
, 0x0b, 0x04, HDA_INPUT
);
10387 err
= set_beep_amp(spec
, 0x0b, 0x03, HDA_INPUT
);
10394 snd_hda_apply_fixup(codec
, HDA_FIXUP_ACT_PROBE
);
10407 static int alc680_parse_auto_config(struct hda_codec
*codec
)
10409 return alc_parse_auto_config(codec
, NULL
, NULL
);
10414 static int patch_alc680(struct hda_codec
*codec
)
10418 /* ALC680 has no aa-loopback mixer */
10419 err
= alc_alloc_spec(codec
, 0);
10423 /* automatic parse from the BIOS config */
10424 err
= alc680_parse_auto_config(codec
);
10436 static const struct hda_device_id snd_hda_id_realtek
[] = {
10437 HDA_CODEC_ENTRY(0x10ec0215, "ALC215", patch_alc269
),
10438 HDA_CODEC_ENTRY(0x10ec0221, "ALC221", patch_alc269
),
10439 HDA_CODEC_ENTRY(0x10ec0222, "ALC222", patch_alc269
),
10440 HDA_CODEC_ENTRY(0x10ec0225, "ALC225", patch_alc269
),
10441 HDA_CODEC_ENTRY(0x10ec0231, "ALC231", patch_alc269
),
10442 HDA_CODEC_ENTRY(0x10ec0233, "ALC233", patch_alc269
),
10443 HDA_CODEC_ENTRY(0x10ec0234, "ALC234", patch_alc269
),
10444 HDA_CODEC_ENTRY(0x10ec0235, "ALC233", patch_alc269
),
10445 HDA_CODEC_ENTRY(0x10ec0236, "ALC236", patch_alc269
),
10446 HDA_CODEC_ENTRY(0x10ec0245, "ALC245", patch_alc269
),
10447 HDA_CODEC_ENTRY(0x10ec0255, "ALC255", patch_alc269
),
10448 HDA_CODEC_ENTRY(0x10ec0256, "ALC256", patch_alc269
),
10449 HDA_CODEC_ENTRY(0x10ec0257, "ALC257", patch_alc269
),
10450 HDA_CODEC_ENTRY(0x10ec0260, "ALC260", patch_alc260
),
10451 HDA_CODEC_ENTRY(0x10ec0262, "ALC262", patch_alc262
),
10452 HDA_CODEC_ENTRY(0x10ec0267, "ALC267", patch_alc268
),
10453 HDA_CODEC_ENTRY(0x10ec0268, "ALC268", patch_alc268
),
10454 HDA_CODEC_ENTRY(0x10ec0269, "ALC269", patch_alc269
),
10455 HDA_CODEC_ENTRY(0x10ec0270, "ALC270", patch_alc269
),
10456 HDA_CODEC_ENTRY(0x10ec0272, "ALC272", patch_alc662
),
10457 HDA_CODEC_ENTRY(0x10ec0274, "ALC274", patch_alc269
),
10458 HDA_CODEC_ENTRY(0x10ec0275, "ALC275", patch_alc269
),
10459 HDA_CODEC_ENTRY(0x10ec0276, "ALC276", patch_alc269
),
10460 HDA_CODEC_ENTRY(0x10ec0280, "ALC280", patch_alc269
),
10461 HDA_CODEC_ENTRY(0x10ec0282, "ALC282", patch_alc269
),
10462 HDA_CODEC_ENTRY(0x10ec0283, "ALC283", patch_alc269
),
10463 HDA_CODEC_ENTRY(0x10ec0284, "ALC284", patch_alc269
),
10464 HDA_CODEC_ENTRY(0x10ec0285, "ALC285", patch_alc269
),
10465 HDA_CODEC_ENTRY(0x10ec0286, "ALC286", patch_alc269
),
10466 HDA_CODEC_ENTRY(0x10ec0287, "ALC287", patch_alc269
),
10467 HDA_CODEC_ENTRY(0x10ec0288, "ALC288", patch_alc269
),
10468 HDA_CODEC_ENTRY(0x10ec0289, "ALC289", patch_alc269
),
10469 HDA_CODEC_ENTRY(0x10ec0290, "ALC290", patch_alc269
),
10470 HDA_CODEC_ENTRY(0x10ec0292, "ALC292", patch_alc269
),
10471 HDA_CODEC_ENTRY(0x10ec0293, "ALC293", patch_alc269
),
10472 HDA_CODEC_ENTRY(0x10ec0294, "ALC294", patch_alc269
),
10473 HDA_CODEC_ENTRY(0x10ec0295, "ALC295", patch_alc269
),
10474 HDA_CODEC_ENTRY(0x10ec0298, "ALC298", patch_alc269
),
10475 HDA_CODEC_ENTRY(0x10ec0299, "ALC299", patch_alc269
),
10476 HDA_CODEC_ENTRY(0x10ec0300, "ALC300", patch_alc269
),
10477 HDA_CODEC_ENTRY(0x10ec0623, "ALC623", patch_alc269
),
10478 HDA_CODEC_REV_ENTRY(0x10ec0861, 0x100340, "ALC660", patch_alc861
),
10479 HDA_CODEC_ENTRY(0x10ec0660, "ALC660-VD", patch_alc861vd
),
10480 HDA_CODEC_ENTRY(0x10ec0861, "ALC861", patch_alc861
),
10481 HDA_CODEC_ENTRY(0x10ec0862, "ALC861-VD", patch_alc861vd
),
10482 HDA_CODEC_REV_ENTRY(0x10ec0662, 0x100002, "ALC662 rev2", patch_alc882
),
10483 HDA_CODEC_REV_ENTRY(0x10ec0662, 0x100101, "ALC662 rev1", patch_alc662
),
10484 HDA_CODEC_REV_ENTRY(0x10ec0662, 0x100300, "ALC662 rev3", patch_alc662
),
10485 HDA_CODEC_ENTRY(0x10ec0663, "ALC663", patch_alc662
),
10486 HDA_CODEC_ENTRY(0x10ec0665, "ALC665", patch_alc662
),
10487 HDA_CODEC_ENTRY(0x10ec0667, "ALC667", patch_alc662
),
10488 HDA_CODEC_ENTRY(0x10ec0668, "ALC668", patch_alc662
),
10489 HDA_CODEC_ENTRY(0x10ec0670, "ALC670", patch_alc662
),
10490 HDA_CODEC_ENTRY(0x10ec0671, "ALC671", patch_alc662
),
10491 HDA_CODEC_ENTRY(0x10ec0680, "ALC680", patch_alc680
),
10492 HDA_CODEC_ENTRY(0x10ec0700, "ALC700", patch_alc269
),
10493 HDA_CODEC_ENTRY(0x10ec0701, "ALC701", patch_alc269
),
10494 HDA_CODEC_ENTRY(0x10ec0703, "ALC703", patch_alc269
),
10495 HDA_CODEC_ENTRY(0x10ec0711, "ALC711", patch_alc269
),
10496 HDA_CODEC_ENTRY(0x10ec0867, "ALC891", patch_alc662
),
10497 HDA_CODEC_ENTRY(0x10ec0880, "ALC880", patch_alc880
),
10498 HDA_CODEC_ENTRY(0x10ec0882, "ALC882", patch_alc882
),
10499 HDA_CODEC_ENTRY(0x10ec0883, "ALC883", patch_alc882
),
10500 HDA_CODEC_REV_ENTRY(0x10ec0885, 0x100101, "ALC889A", patch_alc882
),
10501 HDA_CODEC_REV_ENTRY(0x10ec0885, 0x100103, "ALC889A", patch_alc882
),
10502 HDA_CODEC_ENTRY(0x10ec0885, "ALC885", patch_alc882
),
10503 HDA_CODEC_ENTRY(0x10ec0887, "ALC887", patch_alc882
),
10504 HDA_CODEC_REV_ENTRY(0x10ec0888, 0x100101, "ALC1200", patch_alc882
),
10505 HDA_CODEC_ENTRY(0x10ec0888, "ALC888", patch_alc882
),
10506 HDA_CODEC_ENTRY(0x10ec0889, "ALC889", patch_alc882
),
10507 HDA_CODEC_ENTRY(0x10ec0892, "ALC892", patch_alc662
),
10508 HDA_CODEC_ENTRY(0x10ec0897, "ALC897", patch_alc662
),
10509 HDA_CODEC_ENTRY(0x10ec0899, "ALC898", patch_alc882
),
10510 HDA_CODEC_ENTRY(0x10ec0900, "ALC1150", patch_alc882
),
10511 HDA_CODEC_ENTRY(0x10ec0b00, "ALCS1200A", patch_alc882
),
10512 HDA_CODEC_ENTRY(0x10ec1168, "ALC1220", patch_alc882
),
10513 HDA_CODEC_ENTRY(0x10ec1220, "ALC1220", patch_alc882
),
10514 {} /* terminator */
10516 MODULE_DEVICE_TABLE(hdaudio
, snd_hda_id_realtek
);
10518 MODULE_LICENSE("GPL");
10519 MODULE_DESCRIPTION("Realtek HD-audio codec");
10521 static struct hda_codec_driver realtek_driver
= {
10522 .id
= snd_hda_id_realtek
,
10525 module_hda_codec_driver(realtek_driver
);