xref: /linux/sound/hda/codecs/realtek/alc269.c (revision e6b9dce0aeeb91dfc0974ab87f02454e24566182)
1 // SPDX-License-Identifier: GPL-2.0-or-later
2 //
3 // Realtek ALC269 and compatible codecs
4 //
5 
6 #include <linux/init.h>
7 #include <linux/module.h>
8 #include "realtek.h"
9 
10 /* keep halting ALC5505 DSP, for power saving */
11 #define HALT_REALTEK_ALC5505
12 
13 static const struct hda_pcm_stream alc269_44k_pcm_analog_playback = {
14 	.rates = SNDRV_PCM_RATE_44100, /* fixed rate */
15 };
16 
17 static const struct hda_pcm_stream alc269_44k_pcm_analog_capture = {
18 	.rates = SNDRV_PCM_RATE_44100, /* fixed rate */
19 };
20 
21 /* different alc269-variants */
22 enum {
23 	ALC269_TYPE_ALC269VA,
24 	ALC269_TYPE_ALC269VB,
25 	ALC269_TYPE_ALC269VC,
26 	ALC269_TYPE_ALC269VD,
27 	ALC269_TYPE_ALC280,
28 	ALC269_TYPE_ALC282,
29 	ALC269_TYPE_ALC283,
30 	ALC269_TYPE_ALC284,
31 	ALC269_TYPE_ALC293,
32 	ALC269_TYPE_ALC286,
33 	ALC269_TYPE_ALC298,
34 	ALC269_TYPE_ALC255,
35 	ALC269_TYPE_ALC256,
36 	ALC269_TYPE_ALC257,
37 	ALC269_TYPE_ALC215,
38 	ALC269_TYPE_ALC225,
39 	ALC269_TYPE_ALC245,
40 	ALC269_TYPE_ALC287,
41 	ALC269_TYPE_ALC294,
42 	ALC269_TYPE_ALC300,
43 	ALC269_TYPE_ALC623,
44 	ALC269_TYPE_ALC700,
45 };
46 
47 /*
48  * BIOS auto configuration
49  */
alc269_parse_auto_config(struct hda_codec * codec)50 static int alc269_parse_auto_config(struct hda_codec *codec)
51 {
52 	static const hda_nid_t alc269_ignore[] = { 0x1d, 0 };
53 	static const hda_nid_t alc269_ssids[] = { 0, 0x1b, 0x14, 0x21 };
54 	static const hda_nid_t alc269va_ssids[] = { 0x15, 0x1b, 0x14, 0 };
55 	struct alc_spec *spec = codec->spec;
56 	const hda_nid_t *ssids;
57 
58 	switch (spec->codec_variant) {
59 	case ALC269_TYPE_ALC269VA:
60 	case ALC269_TYPE_ALC269VC:
61 	case ALC269_TYPE_ALC280:
62 	case ALC269_TYPE_ALC284:
63 	case ALC269_TYPE_ALC293:
64 		ssids = alc269va_ssids;
65 		break;
66 	case ALC269_TYPE_ALC269VB:
67 	case ALC269_TYPE_ALC269VD:
68 	case ALC269_TYPE_ALC282:
69 	case ALC269_TYPE_ALC283:
70 	case ALC269_TYPE_ALC286:
71 	case ALC269_TYPE_ALC298:
72 	case ALC269_TYPE_ALC255:
73 	case ALC269_TYPE_ALC256:
74 	case ALC269_TYPE_ALC257:
75 	case ALC269_TYPE_ALC215:
76 	case ALC269_TYPE_ALC225:
77 	case ALC269_TYPE_ALC245:
78 	case ALC269_TYPE_ALC287:
79 	case ALC269_TYPE_ALC294:
80 	case ALC269_TYPE_ALC300:
81 	case ALC269_TYPE_ALC623:
82 	case ALC269_TYPE_ALC700:
83 		ssids = alc269_ssids;
84 		break;
85 	default:
86 		ssids = alc269_ssids;
87 		break;
88 	}
89 
90 	return alc_parse_auto_config(codec, alc269_ignore, ssids);
91 }
92 
93 static const struct hda_jack_keymap alc_headset_btn_keymap[] = {
94 	{ SND_JACK_BTN_0, KEY_PLAYPAUSE },
95 	{ SND_JACK_BTN_1, KEY_VOICECOMMAND },
96 	{ SND_JACK_BTN_2, KEY_VOLUMEUP },
97 	{ SND_JACK_BTN_3, KEY_VOLUMEDOWN },
98 	{}
99 };
100 
alc_headset_btn_callback(struct hda_codec * codec,struct hda_jack_callback * jack)101 static void alc_headset_btn_callback(struct hda_codec *codec,
102 				     struct hda_jack_callback *jack)
103 {
104 	int report = 0;
105 
106 	if (jack->unsol_res & (7 << 13))
107 		report |= SND_JACK_BTN_0;
108 
109 	if (jack->unsol_res  & (1 << 16 | 3 << 8))
110 		report |= SND_JACK_BTN_1;
111 
112 	/* Volume up key */
113 	if (jack->unsol_res & (7 << 23))
114 		report |= SND_JACK_BTN_2;
115 
116 	/* Volume down key */
117 	if (jack->unsol_res & (7 << 10))
118 		report |= SND_JACK_BTN_3;
119 
120 	snd_hda_jack_set_button_state(codec, jack->nid, report);
121 }
122 
alc_disable_headset_jack_key(struct hda_codec * codec)123 static void alc_disable_headset_jack_key(struct hda_codec *codec)
124 {
125 	struct alc_spec *spec = codec->spec;
126 
127 	if (!spec->has_hs_key)
128 		return;
129 
130 	switch (codec->core.vendor_id) {
131 	case 0x10ec0215:
132 	case 0x10ec0225:
133 	case 0x10ec0285:
134 	case 0x10ec0287:
135 	case 0x10ec0295:
136 	case 0x10ec0289:
137 	case 0x10ec0299:
138 		alc_write_coef_idx(codec, 0x48, 0x0);
139 		alc_update_coef_idx(codec, 0x49, 0x0045, 0x0);
140 		alc_update_coef_idx(codec, 0x44, 0x0045 << 8, 0x0);
141 		break;
142 	case 0x10ec0230:
143 	case 0x10ec0236:
144 	case 0x10ec0256:
145 	case 0x10ec0257:
146 	case 0x19e58326:
147 		alc_write_coef_idx(codec, 0x48, 0x0);
148 		alc_update_coef_idx(codec, 0x49, 0x0045, 0x0);
149 		break;
150 	}
151 }
152 
alc_enable_headset_jack_key(struct hda_codec * codec)153 static void alc_enable_headset_jack_key(struct hda_codec *codec)
154 {
155 	struct alc_spec *spec = codec->spec;
156 
157 	if (!spec->has_hs_key)
158 		return;
159 
160 	switch (codec->core.vendor_id) {
161 	case 0x10ec0215:
162 	case 0x10ec0225:
163 	case 0x10ec0285:
164 	case 0x10ec0287:
165 	case 0x10ec0295:
166 	case 0x10ec0289:
167 	case 0x10ec0299:
168 		alc_write_coef_idx(codec, 0x48, 0xd011);
169 		alc_update_coef_idx(codec, 0x49, 0x007f, 0x0045);
170 		alc_update_coef_idx(codec, 0x44, 0x007f << 8, 0x0045 << 8);
171 		break;
172 	case 0x10ec0230:
173 	case 0x10ec0236:
174 	case 0x10ec0256:
175 	case 0x10ec0257:
176 	case 0x19e58326:
177 		alc_write_coef_idx(codec, 0x48, 0xd011);
178 		alc_update_coef_idx(codec, 0x49, 0x007f, 0x0045);
179 		break;
180 	}
181 }
182 
alc_fixup_headset_jack(struct hda_codec * codec,const struct hda_fixup * fix,int action)183 static void alc_fixup_headset_jack(struct hda_codec *codec,
184 				    const struct hda_fixup *fix, int action)
185 {
186 	struct alc_spec *spec = codec->spec;
187 	hda_nid_t hp_pin;
188 
189 	switch (action) {
190 	case HDA_FIXUP_ACT_PRE_PROBE:
191 		spec->has_hs_key = 1;
192 		snd_hda_jack_detect_enable_callback(codec, 0x55,
193 						    alc_headset_btn_callback);
194 		break;
195 	case HDA_FIXUP_ACT_BUILD:
196 		hp_pin = alc_get_hp_pin(spec);
197 		if (!hp_pin || snd_hda_jack_bind_keymap(codec, 0x55,
198 							alc_headset_btn_keymap,
199 							hp_pin))
200 			snd_hda_jack_add_kctl(codec, 0x55, "Headset Jack",
201 					      false, SND_JACK_HEADSET,
202 					      alc_headset_btn_keymap);
203 
204 		alc_enable_headset_jack_key(codec);
205 		break;
206 	}
207 }
208 
alc269vb_toggle_power_output(struct hda_codec * codec,int power_up)209 static void alc269vb_toggle_power_output(struct hda_codec *codec, int power_up)
210 {
211 	alc_update_coef_idx(codec, 0x04, 1 << 11, power_up ? (1 << 11) : 0);
212 }
213 
alc269_shutup(struct hda_codec * codec)214 static void alc269_shutup(struct hda_codec *codec)
215 {
216 	struct alc_spec *spec = codec->spec;
217 
218 	if (spec->codec_variant == ALC269_TYPE_ALC269VB)
219 		alc269vb_toggle_power_output(codec, 0);
220 	if (spec->codec_variant == ALC269_TYPE_ALC269VB &&
221 			(alc_get_coef0(codec) & 0x00ff) == 0x018) {
222 		msleep(150);
223 	}
224 	alc_shutup_pins(codec);
225 }
226 
227 static const struct coef_fw alc282_coefs[] = {
228 	WRITE_COEF(0x03, 0x0002), /* Power Down Control */
229 	UPDATE_COEF(0x05, 0xff3f, 0x0700), /* FIFO and filter clock */
230 	WRITE_COEF(0x07, 0x0200), /* DMIC control */
231 	UPDATE_COEF(0x06, 0x00f0, 0), /* Analog clock */
232 	UPDATE_COEF(0x08, 0xfffc, 0x0c2c), /* JD */
233 	WRITE_COEF(0x0a, 0xcccc), /* JD offset1 */
234 	WRITE_COEF(0x0b, 0xcccc), /* JD offset2 */
235 	WRITE_COEF(0x0e, 0x6e00), /* LDO1/2/3, DAC/ADC */
236 	UPDATE_COEF(0x0f, 0xf800, 0x1000), /* JD */
237 	UPDATE_COEF(0x10, 0xfc00, 0x0c00), /* Capless */
238 	WRITE_COEF(0x6f, 0x0), /* Class D test 4 */
239 	UPDATE_COEF(0x0c, 0xfe00, 0), /* IO power down directly */
240 	WRITE_COEF(0x34, 0xa0c0), /* ANC */
241 	UPDATE_COEF(0x16, 0x0008, 0), /* AGC MUX */
242 	UPDATE_COEF(0x1d, 0x00e0, 0), /* DAC simple content protection */
243 	UPDATE_COEF(0x1f, 0x00e0, 0), /* ADC simple content protection */
244 	WRITE_COEF(0x21, 0x8804), /* DAC ADC Zero Detection */
245 	WRITE_COEF(0x63, 0x2902), /* PLL */
246 	WRITE_COEF(0x68, 0xa080), /* capless control 2 */
247 	WRITE_COEF(0x69, 0x3400), /* capless control 3 */
248 	WRITE_COEF(0x6a, 0x2f3e), /* capless control 4 */
249 	WRITE_COEF(0x6b, 0x0), /* capless control 5 */
250 	UPDATE_COEF(0x6d, 0x0fff, 0x0900), /* class D test 2 */
251 	WRITE_COEF(0x6e, 0x110a), /* class D test 3 */
252 	UPDATE_COEF(0x70, 0x00f8, 0x00d8), /* class D test 5 */
253 	WRITE_COEF(0x71, 0x0014), /* class D test 6 */
254 	WRITE_COEF(0x72, 0xc2ba), /* classD OCP */
255 	UPDATE_COEF(0x77, 0x0f80, 0), /* classD pure DC test */
256 	WRITE_COEF(0x6c, 0xfc06), /* Class D amp control */
257 	{}
258 };
259 
alc282_restore_default_value(struct hda_codec * codec)260 static void alc282_restore_default_value(struct hda_codec *codec)
261 {
262 	alc_process_coef_fw(codec, alc282_coefs);
263 }
264 
alc282_init(struct hda_codec * codec)265 static void alc282_init(struct hda_codec *codec)
266 {
267 	struct alc_spec *spec = codec->spec;
268 	hda_nid_t hp_pin = alc_get_hp_pin(spec);
269 	bool hp_pin_sense;
270 	int coef78;
271 
272 	alc282_restore_default_value(codec);
273 
274 	if (!hp_pin)
275 		return;
276 	hp_pin_sense = snd_hda_jack_detect(codec, hp_pin);
277 	coef78 = alc_read_coef_idx(codec, 0x78);
278 
279 	/* Index 0x78 Direct Drive HP AMP LPM Control 1 */
280 	/* Headphone capless set to high power mode */
281 	alc_write_coef_idx(codec, 0x78, 0x9004);
282 
283 	if (hp_pin_sense)
284 		msleep(2);
285 
286 	snd_hda_codec_write(codec, hp_pin, 0,
287 			    AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE);
288 
289 	if (hp_pin_sense)
290 		msleep(85);
291 
292 	snd_hda_codec_write(codec, hp_pin, 0,
293 			    AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT);
294 
295 	if (hp_pin_sense)
296 		msleep(100);
297 
298 	/* Headphone capless set to normal mode */
299 	alc_write_coef_idx(codec, 0x78, coef78);
300 }
301 
alc282_shutup(struct hda_codec * codec)302 static void alc282_shutup(struct hda_codec *codec)
303 {
304 	struct alc_spec *spec = codec->spec;
305 	hda_nid_t hp_pin = alc_get_hp_pin(spec);
306 	bool hp_pin_sense;
307 	int coef78;
308 
309 	if (!hp_pin) {
310 		alc269_shutup(codec);
311 		return;
312 	}
313 
314 	hp_pin_sense = snd_hda_jack_detect(codec, hp_pin);
315 	coef78 = alc_read_coef_idx(codec, 0x78);
316 	alc_write_coef_idx(codec, 0x78, 0x9004);
317 
318 	if (hp_pin_sense)
319 		msleep(2);
320 
321 	snd_hda_codec_write(codec, hp_pin, 0,
322 			    AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE);
323 
324 	if (hp_pin_sense)
325 		msleep(85);
326 
327 	if (!spec->no_shutup_pins)
328 		snd_hda_codec_write(codec, hp_pin, 0,
329 				    AC_VERB_SET_PIN_WIDGET_CONTROL, 0x0);
330 
331 	if (hp_pin_sense)
332 		msleep(100);
333 
334 	alc_auto_setup_eapd(codec, false);
335 	alc_shutup_pins(codec);
336 	alc_write_coef_idx(codec, 0x78, coef78);
337 }
338 
339 static const struct coef_fw alc283_coefs[] = {
340 	WRITE_COEF(0x03, 0x0002), /* Power Down Control */
341 	UPDATE_COEF(0x05, 0xff3f, 0x0700), /* FIFO and filter clock */
342 	WRITE_COEF(0x07, 0x0200), /* DMIC control */
343 	UPDATE_COEF(0x06, 0x00f0, 0), /* Analog clock */
344 	UPDATE_COEF(0x08, 0xfffc, 0x0c2c), /* JD */
345 	WRITE_COEF(0x0a, 0xcccc), /* JD offset1 */
346 	WRITE_COEF(0x0b, 0xcccc), /* JD offset2 */
347 	WRITE_COEF(0x0e, 0x6fc0), /* LDO1/2/3, DAC/ADC */
348 	UPDATE_COEF(0x0f, 0xf800, 0x1000), /* JD */
349 	UPDATE_COEF(0x10, 0xfc00, 0x0c00), /* Capless */
350 	WRITE_COEF(0x3a, 0x0), /* Class D test 4 */
351 	UPDATE_COEF(0x0c, 0xfe00, 0x0), /* IO power down directly */
352 	WRITE_COEF(0x22, 0xa0c0), /* ANC */
353 	UPDATE_COEFEX(0x53, 0x01, 0x000f, 0x0008), /* AGC MUX */
354 	UPDATE_COEF(0x1d, 0x00e0, 0), /* DAC simple content protection */
355 	UPDATE_COEF(0x1f, 0x00e0, 0), /* ADC simple content protection */
356 	WRITE_COEF(0x21, 0x8804), /* DAC ADC Zero Detection */
357 	WRITE_COEF(0x2e, 0x2902), /* PLL */
358 	WRITE_COEF(0x33, 0xa080), /* capless control 2 */
359 	WRITE_COEF(0x34, 0x3400), /* capless control 3 */
360 	WRITE_COEF(0x35, 0x2f3e), /* capless control 4 */
361 	WRITE_COEF(0x36, 0x0), /* capless control 5 */
362 	UPDATE_COEF(0x38, 0x0fff, 0x0900), /* class D test 2 */
363 	WRITE_COEF(0x39, 0x110a), /* class D test 3 */
364 	UPDATE_COEF(0x3b, 0x00f8, 0x00d8), /* class D test 5 */
365 	WRITE_COEF(0x3c, 0x0014), /* class D test 6 */
366 	WRITE_COEF(0x3d, 0xc2ba), /* classD OCP */
367 	UPDATE_COEF(0x42, 0x0f80, 0x0), /* classD pure DC test */
368 	WRITE_COEF(0x49, 0x0), /* test mode */
369 	UPDATE_COEF(0x40, 0xf800, 0x9800), /* Class D DC enable */
370 	UPDATE_COEF(0x42, 0xf000, 0x2000), /* DC offset */
371 	WRITE_COEF(0x37, 0xfc06), /* Class D amp control */
372 	UPDATE_COEF(0x1b, 0x8000, 0), /* HP JD control */
373 	{}
374 };
375 
alc283_restore_default_value(struct hda_codec * codec)376 static void alc283_restore_default_value(struct hda_codec *codec)
377 {
378 	alc_process_coef_fw(codec, alc283_coefs);
379 }
380 
alc283_init(struct hda_codec * codec)381 static void alc283_init(struct hda_codec *codec)
382 {
383 	struct alc_spec *spec = codec->spec;
384 	hda_nid_t hp_pin = alc_get_hp_pin(spec);
385 	bool hp_pin_sense;
386 
387 	alc283_restore_default_value(codec);
388 
389 	if (!hp_pin)
390 		return;
391 
392 	msleep(30);
393 	hp_pin_sense = snd_hda_jack_detect(codec, hp_pin);
394 
395 	/* Index 0x43 Direct Drive HP AMP LPM Control 1 */
396 	/* Headphone capless set to high power mode */
397 	alc_write_coef_idx(codec, 0x43, 0x9004);
398 
399 	snd_hda_codec_write(codec, hp_pin, 0,
400 			    AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE);
401 
402 	if (hp_pin_sense)
403 		msleep(85);
404 
405 	snd_hda_codec_write(codec, hp_pin, 0,
406 			    AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT);
407 
408 	if (hp_pin_sense)
409 		msleep(85);
410 	/* Index 0x46 Combo jack auto switch control 2 */
411 	/* 3k pull low control for Headset jack. */
412 	alc_update_coef_idx(codec, 0x46, 3 << 12, 0);
413 	/* Headphone capless set to normal mode */
414 	alc_write_coef_idx(codec, 0x43, 0x9614);
415 }
416 
alc283_shutup(struct hda_codec * codec)417 static void alc283_shutup(struct hda_codec *codec)
418 {
419 	struct alc_spec *spec = codec->spec;
420 	hda_nid_t hp_pin = alc_get_hp_pin(spec);
421 	bool hp_pin_sense;
422 
423 	if (!hp_pin) {
424 		alc269_shutup(codec);
425 		return;
426 	}
427 
428 	hp_pin_sense = snd_hda_jack_detect(codec, hp_pin);
429 
430 	alc_write_coef_idx(codec, 0x43, 0x9004);
431 
432 	/*depop hp during suspend*/
433 	alc_write_coef_idx(codec, 0x06, 0x2100);
434 
435 	snd_hda_codec_write(codec, hp_pin, 0,
436 			    AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE);
437 
438 	if (hp_pin_sense)
439 		msleep(100);
440 
441 	if (!spec->no_shutup_pins)
442 		snd_hda_codec_write(codec, hp_pin, 0,
443 				    AC_VERB_SET_PIN_WIDGET_CONTROL, 0x0);
444 
445 	alc_update_coef_idx(codec, 0x46, 0, 3 << 12);
446 
447 	if (hp_pin_sense)
448 		msleep(100);
449 	alc_auto_setup_eapd(codec, false);
450 	alc_shutup_pins(codec);
451 	alc_write_coef_idx(codec, 0x43, 0x9614);
452 }
453 
alc256_init(struct hda_codec * codec)454 static void alc256_init(struct hda_codec *codec)
455 {
456 	struct alc_spec *spec = codec->spec;
457 	hda_nid_t hp_pin = alc_get_hp_pin(spec);
458 	bool hp_pin_sense;
459 
460 	if (spec->ultra_low_power) {
461 		alc_update_coef_idx(codec, 0x03, 1<<1, 1<<1);
462 		alc_update_coef_idx(codec, 0x08, 3<<2, 3<<2);
463 		alc_update_coef_idx(codec, 0x08, 7<<4, 0);
464 		alc_update_coef_idx(codec, 0x3b, 1<<15, 0);
465 		alc_update_coef_idx(codec, 0x0e, 7<<6, 7<<6);
466 		msleep(30);
467 	}
468 
469 	if (!hp_pin)
470 		hp_pin = 0x21;
471 
472 	msleep(30);
473 
474 	hp_pin_sense = snd_hda_jack_detect(codec, hp_pin);
475 
476 	if (hp_pin_sense) {
477 		msleep(2);
478 		alc_update_coefex_idx(codec, 0x57, 0x04, 0x0007, 0x1); /* Low power */
479 
480 		snd_hda_codec_write(codec, hp_pin, 0,
481 			    AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT);
482 
483 		msleep(75);
484 
485 		snd_hda_codec_write(codec, hp_pin, 0,
486 			    AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE);
487 
488 		msleep(75);
489 		alc_update_coefex_idx(codec, 0x57, 0x04, 0x0007, 0x4); /* Hight power */
490 	}
491 	alc_update_coef_idx(codec, 0x46, 3 << 12, 0);
492 	alc_update_coefex_idx(codec, 0x53, 0x02, 0x8000, 1 << 15); /* Clear bit */
493 	alc_update_coefex_idx(codec, 0x53, 0x02, 0x8000, 0 << 15);
494 	/*
495 	 * Expose headphone mic (or possibly Line In on some machines) instead
496 	 * of PC Beep on 1Ah, and disable 1Ah loopback for all outputs. See
497 	 * Documentation/sound/hd-audio/realtek-pc-beep.rst for details of
498 	 * this register.
499 	 */
500 	alc_write_coef_idx(codec, 0x36, 0x5757);
501 }
502 
alc256_shutup(struct hda_codec * codec)503 static void alc256_shutup(struct hda_codec *codec)
504 {
505 	struct alc_spec *spec = codec->spec;
506 	hda_nid_t hp_pin = alc_get_hp_pin(spec);
507 	bool hp_pin_sense;
508 
509 	if (!hp_pin)
510 		hp_pin = 0x21;
511 
512 	alc_update_coefex_idx(codec, 0x57, 0x04, 0x0007, 0x1); /* Low power */
513 
514 	/* 3k pull low control for Headset jack. */
515 	/* NOTE: call this before clearing the pin, otherwise codec stalls */
516 	/* If disable 3k pulldown control for alc257, the Mic detection will not work correctly
517 	 * when booting with headset plugged. So skip setting it for the codec alc257
518 	 */
519 	if (spec->en_3kpull_low)
520 		alc_update_coef_idx(codec, 0x46, 0, 3 << 12);
521 
522 	hp_pin_sense = snd_hda_jack_detect(codec, hp_pin);
523 
524 	if (hp_pin_sense) {
525 		msleep(2);
526 
527 		snd_hda_codec_write(codec, hp_pin, 0,
528 			    AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE);
529 
530 		msleep(75);
531 
532 		if (!spec->no_shutup_pins)
533 			snd_hda_codec_write(codec, hp_pin, 0,
534 				    AC_VERB_SET_PIN_WIDGET_CONTROL, 0x0);
535 
536 		msleep(75);
537 	}
538 
539 	alc_auto_setup_eapd(codec, false);
540 	alc_shutup_pins(codec);
541 	if (spec->ultra_low_power) {
542 		msleep(50);
543 		alc_update_coef_idx(codec, 0x03, 1<<1, 0);
544 		alc_update_coef_idx(codec, 0x08, 7<<4, 7<<4);
545 		alc_update_coef_idx(codec, 0x08, 3<<2, 0);
546 		alc_update_coef_idx(codec, 0x3b, 1<<15, 1<<15);
547 		alc_update_coef_idx(codec, 0x0e, 7<<6, 0);
548 		msleep(30);
549 	}
550 }
551 
alc285_hp_init(struct hda_codec * codec)552 static void alc285_hp_init(struct hda_codec *codec)
553 {
554 	struct alc_spec *spec = codec->spec;
555 	hda_nid_t hp_pin = alc_get_hp_pin(spec);
556 	int i, val;
557 	int coef38, coef0d, coef36;
558 
559 	alc_write_coefex_idx(codec, 0x58, 0x00, 0x1888); /* write default value */
560 	alc_update_coef_idx(codec, 0x4a, 1<<15, 1<<15); /* Reset HP JD */
561 	coef38 = alc_read_coef_idx(codec, 0x38); /* Amp control */
562 	coef0d = alc_read_coef_idx(codec, 0x0d); /* Digital Misc control */
563 	coef36 = alc_read_coef_idx(codec, 0x36); /* Passthrough Control */
564 	alc_update_coef_idx(codec, 0x38, 1<<4, 0x0);
565 	alc_update_coef_idx(codec, 0x0d, 0x110, 0x0);
566 
567 	alc_update_coef_idx(codec, 0x67, 0xf000, 0x3000);
568 
569 	if (hp_pin)
570 		snd_hda_codec_write(codec, hp_pin, 0,
571 			    AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE);
572 
573 	msleep(130);
574 	alc_update_coef_idx(codec, 0x36, 1<<14, 1<<14);
575 	alc_update_coef_idx(codec, 0x36, 1<<13, 0x0);
576 
577 	if (hp_pin)
578 		snd_hda_codec_write(codec, hp_pin, 0,
579 			    AC_VERB_SET_PIN_WIDGET_CONTROL, 0x0);
580 	msleep(10);
581 	alc_write_coef_idx(codec, 0x67, 0x0); /* Set HP depop to manual mode */
582 	alc_write_coefex_idx(codec, 0x58, 0x00, 0x7880);
583 	alc_write_coefex_idx(codec, 0x58, 0x0f, 0xf049);
584 	alc_update_coefex_idx(codec, 0x58, 0x03, 0x00f0, 0x00c0);
585 
586 	alc_write_coefex_idx(codec, 0x58, 0x00, 0xf888); /* HP depop procedure start */
587 	val = alc_read_coefex_idx(codec, 0x58, 0x00);
588 	for (i = 0; i < 20 && val & 0x8000; i++) {
589 		msleep(50);
590 		val = alc_read_coefex_idx(codec, 0x58, 0x00);
591 	} /* Wait for depop procedure finish  */
592 
593 	alc_write_coefex_idx(codec, 0x58, 0x00, val); /* write back the result */
594 	alc_update_coef_idx(codec, 0x38, 1<<4, coef38);
595 	alc_update_coef_idx(codec, 0x0d, 0x110, coef0d);
596 	alc_update_coef_idx(codec, 0x36, 3<<13, coef36);
597 
598 	msleep(50);
599 	alc_update_coef_idx(codec, 0x4a, 1<<15, 0);
600 }
601 
alc225_init(struct hda_codec * codec)602 static void alc225_init(struct hda_codec *codec)
603 {
604 	struct alc_spec *spec = codec->spec;
605 	hda_nid_t hp_pin = alc_get_hp_pin(spec);
606 	bool hp1_pin_sense, hp2_pin_sense;
607 
608 	if (spec->ultra_low_power) {
609 		alc_update_coef_idx(codec, 0x08, 0x0f << 2, 3<<2);
610 		alc_update_coef_idx(codec, 0x0e, 7<<6, 7<<6);
611 		alc_update_coef_idx(codec, 0x33, 1<<11, 0);
612 		msleep(30);
613 	}
614 
615 	if (spec->codec_variant != ALC269_TYPE_ALC287 &&
616 		spec->codec_variant != ALC269_TYPE_ALC245)
617 		/* required only at boot or S3 and S4 resume time */
618 		if (!spec->done_hp_init ||
619 			is_s3_resume(codec) ||
620 			is_s4_resume(codec)) {
621 			alc285_hp_init(codec);
622 			spec->done_hp_init = true;
623 		}
624 
625 	if (!hp_pin)
626 		hp_pin = 0x21;
627 	msleep(30);
628 
629 	hp1_pin_sense = snd_hda_jack_detect(codec, hp_pin);
630 	hp2_pin_sense = snd_hda_jack_detect(codec, 0x16);
631 
632 	if (hp1_pin_sense || hp2_pin_sense) {
633 		msleep(2);
634 		alc_update_coefex_idx(codec, 0x57, 0x04, 0x0007, 0x1); /* Low power */
635 
636 		if (hp1_pin_sense)
637 			snd_hda_codec_write(codec, hp_pin, 0,
638 				    AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT);
639 		if (hp2_pin_sense)
640 			snd_hda_codec_write(codec, 0x16, 0,
641 				    AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT);
642 		msleep(75);
643 
644 		if (hp1_pin_sense)
645 			snd_hda_codec_write(codec, hp_pin, 0,
646 				    AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE);
647 		if (hp2_pin_sense)
648 			snd_hda_codec_write(codec, 0x16, 0,
649 				    AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE);
650 
651 		msleep(75);
652 		alc_update_coef_idx(codec, 0x4a, 3 << 10, 0);
653 		alc_update_coefex_idx(codec, 0x57, 0x04, 0x0007, 0x4); /* Hight power */
654 	}
655 }
656 
alc225_shutup(struct hda_codec * codec)657 static void alc225_shutup(struct hda_codec *codec)
658 {
659 	struct alc_spec *spec = codec->spec;
660 	hda_nid_t hp_pin = alc_get_hp_pin(spec);
661 	bool hp1_pin_sense, hp2_pin_sense;
662 
663 	if (!hp_pin)
664 		hp_pin = 0x21;
665 
666 	hp1_pin_sense = snd_hda_jack_detect(codec, hp_pin);
667 	hp2_pin_sense = snd_hda_jack_detect(codec, 0x16);
668 
669 	if (hp1_pin_sense || hp2_pin_sense) {
670 		alc_disable_headset_jack_key(codec);
671 		/* 3k pull low control for Headset jack. */
672 		alc_update_coef_idx(codec, 0x4a, 0, 3 << 10);
673 		msleep(2);
674 
675 		if (hp1_pin_sense)
676 			snd_hda_codec_write(codec, hp_pin, 0,
677 				    AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE);
678 		if (hp2_pin_sense)
679 			snd_hda_codec_write(codec, 0x16, 0,
680 				    AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE);
681 
682 		msleep(75);
683 
684 		if (hp1_pin_sense)
685 			snd_hda_codec_write(codec, hp_pin, 0,
686 				    AC_VERB_SET_PIN_WIDGET_CONTROL, 0x0);
687 		if (hp2_pin_sense)
688 			snd_hda_codec_write(codec, 0x16, 0,
689 				    AC_VERB_SET_PIN_WIDGET_CONTROL, 0x0);
690 
691 		msleep(75);
692 		alc_update_coef_idx(codec, 0x4a, 3 << 10, 0);
693 		alc_enable_headset_jack_key(codec);
694 	}
695 	alc_auto_setup_eapd(codec, false);
696 	alc_shutup_pins(codec);
697 	if (spec->ultra_low_power) {
698 		msleep(50);
699 		alc_update_coef_idx(codec, 0x08, 0x0f << 2, 0x0c << 2);
700 		alc_update_coef_idx(codec, 0x0e, 7<<6, 0);
701 		alc_update_coef_idx(codec, 0x33, 1<<11, 1<<11);
702 		alc_update_coef_idx(codec, 0x4a, 3<<4, 2<<4);
703 		msleep(30);
704 	}
705 }
706 
alc222_init(struct hda_codec * codec)707 static void alc222_init(struct hda_codec *codec)
708 {
709 	struct alc_spec *spec = codec->spec;
710 	hda_nid_t hp_pin = alc_get_hp_pin(spec);
711 	bool hp1_pin_sense, hp2_pin_sense;
712 
713 	if (!hp_pin)
714 		return;
715 
716 	msleep(30);
717 
718 	hp1_pin_sense = snd_hda_jack_detect(codec, hp_pin);
719 	hp2_pin_sense = snd_hda_jack_detect(codec, 0x14);
720 
721 	if (hp1_pin_sense || hp2_pin_sense) {
722 		msleep(2);
723 
724 		if (hp1_pin_sense)
725 			snd_hda_codec_write(codec, hp_pin, 0,
726 				    AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT);
727 		if (hp2_pin_sense)
728 			snd_hda_codec_write(codec, 0x14, 0,
729 				    AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT);
730 		msleep(75);
731 
732 		if (hp1_pin_sense)
733 			snd_hda_codec_write(codec, hp_pin, 0,
734 				    AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE);
735 		if (hp2_pin_sense)
736 			snd_hda_codec_write(codec, 0x14, 0,
737 				    AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE);
738 
739 		msleep(75);
740 	}
741 }
742 
alc222_shutup(struct hda_codec * codec)743 static void alc222_shutup(struct hda_codec *codec)
744 {
745 	struct alc_spec *spec = codec->spec;
746 	hda_nid_t hp_pin = alc_get_hp_pin(spec);
747 	bool hp1_pin_sense, hp2_pin_sense;
748 
749 	if (!hp_pin)
750 		hp_pin = 0x21;
751 
752 	hp1_pin_sense = snd_hda_jack_detect(codec, hp_pin);
753 	hp2_pin_sense = snd_hda_jack_detect(codec, 0x14);
754 
755 	if (hp1_pin_sense || hp2_pin_sense) {
756 		msleep(2);
757 
758 		if (hp1_pin_sense)
759 			snd_hda_codec_write(codec, hp_pin, 0,
760 				    AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE);
761 		if (hp2_pin_sense)
762 			snd_hda_codec_write(codec, 0x14, 0,
763 				    AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE);
764 
765 		msleep(75);
766 
767 		if (hp1_pin_sense)
768 			snd_hda_codec_write(codec, hp_pin, 0,
769 				    AC_VERB_SET_PIN_WIDGET_CONTROL, 0x0);
770 		if (hp2_pin_sense)
771 			snd_hda_codec_write(codec, 0x14, 0,
772 				    AC_VERB_SET_PIN_WIDGET_CONTROL, 0x0);
773 
774 		msleep(75);
775 	}
776 	alc_auto_setup_eapd(codec, false);
777 	alc_shutup_pins(codec);
778 }
779 
alc_default_init(struct hda_codec * codec)780 static void alc_default_init(struct hda_codec *codec)
781 {
782 	struct alc_spec *spec = codec->spec;
783 	hda_nid_t hp_pin = alc_get_hp_pin(spec);
784 	bool hp_pin_sense;
785 
786 	if (!hp_pin)
787 		return;
788 
789 	msleep(30);
790 
791 	hp_pin_sense = snd_hda_jack_detect(codec, hp_pin);
792 
793 	if (hp_pin_sense) {
794 		msleep(2);
795 
796 		snd_hda_codec_write(codec, hp_pin, 0,
797 				    AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT);
798 
799 		msleep(75);
800 
801 		snd_hda_codec_write(codec, hp_pin, 0,
802 				    AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE);
803 		msleep(75);
804 	}
805 }
806 
alc_default_shutup(struct hda_codec * codec)807 static void alc_default_shutup(struct hda_codec *codec)
808 {
809 	struct alc_spec *spec = codec->spec;
810 	hda_nid_t hp_pin = alc_get_hp_pin(spec);
811 	bool hp_pin_sense;
812 
813 	if (!hp_pin) {
814 		alc269_shutup(codec);
815 		return;
816 	}
817 
818 	hp_pin_sense = snd_hda_jack_detect(codec, hp_pin);
819 
820 	if (hp_pin_sense) {
821 		msleep(2);
822 
823 		snd_hda_codec_write(codec, hp_pin, 0,
824 				    AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE);
825 
826 		msleep(75);
827 
828 		if (!spec->no_shutup_pins)
829 			snd_hda_codec_write(codec, hp_pin, 0,
830 					    AC_VERB_SET_PIN_WIDGET_CONTROL, 0x0);
831 
832 		msleep(75);
833 	}
834 	alc_auto_setup_eapd(codec, false);
835 	alc_shutup_pins(codec);
836 }
837 
alc294_hp_init(struct hda_codec * codec)838 static void alc294_hp_init(struct hda_codec *codec)
839 {
840 	struct alc_spec *spec = codec->spec;
841 	hda_nid_t hp_pin = alc_get_hp_pin(spec);
842 	int i, val;
843 
844 	if (!hp_pin)
845 		return;
846 
847 	snd_hda_codec_write(codec, hp_pin, 0,
848 			    AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE);
849 
850 	msleep(100);
851 
852 	if (!spec->no_shutup_pins)
853 		snd_hda_codec_write(codec, hp_pin, 0,
854 				    AC_VERB_SET_PIN_WIDGET_CONTROL, 0x0);
855 
856 	alc_update_coef_idx(codec, 0x6f, 0x000f, 0);/* Set HP depop to manual mode */
857 	alc_update_coefex_idx(codec, 0x58, 0x00, 0x8000, 0x8000); /* HP depop procedure start */
858 
859 	/* Wait for depop procedure finish  */
860 	val = alc_read_coefex_idx(codec, 0x58, 0x01);
861 	for (i = 0; i < 20 && val & 0x0080; i++) {
862 		msleep(50);
863 		val = alc_read_coefex_idx(codec, 0x58, 0x01);
864 	}
865 	/* Set HP depop to auto mode */
866 	alc_update_coef_idx(codec, 0x6f, 0x000f, 0x000b);
867 	msleep(50);
868 }
869 
alc294_init(struct hda_codec * codec)870 static void alc294_init(struct hda_codec *codec)
871 {
872 	struct alc_spec *spec = codec->spec;
873 
874 	/* required only at boot or S4 resume time */
875 	if (!spec->done_hp_init ||
876 	    codec->core.dev.power.power_state.event == PM_EVENT_RESTORE) {
877 		alc294_hp_init(codec);
878 		spec->done_hp_init = true;
879 	}
880 	alc_default_init(codec);
881 }
882 
alc5505_coef_set(struct hda_codec * codec,unsigned int index_reg,unsigned int val)883 static void alc5505_coef_set(struct hda_codec *codec, unsigned int index_reg,
884 			     unsigned int val)
885 {
886 	snd_hda_codec_write(codec, 0x51, 0, AC_VERB_SET_COEF_INDEX, index_reg >> 1);
887 	snd_hda_codec_write(codec, 0x51, 0, AC_VERB_SET_PROC_COEF, val & 0xffff); /* LSB */
888 	snd_hda_codec_write(codec, 0x51, 0, AC_VERB_SET_PROC_COEF, val >> 16); /* MSB */
889 }
890 
alc5505_coef_get(struct hda_codec * codec,unsigned int index_reg)891 static int alc5505_coef_get(struct hda_codec *codec, unsigned int index_reg)
892 {
893 	unsigned int val;
894 
895 	snd_hda_codec_write(codec, 0x51, 0, AC_VERB_SET_COEF_INDEX, index_reg >> 1);
896 	val = snd_hda_codec_read(codec, 0x51, 0, AC_VERB_GET_PROC_COEF, 0)
897 		& 0xffff;
898 	val |= snd_hda_codec_read(codec, 0x51, 0, AC_VERB_GET_PROC_COEF, 0)
899 		<< 16;
900 	return val;
901 }
902 
alc5505_dsp_halt(struct hda_codec * codec)903 static void alc5505_dsp_halt(struct hda_codec *codec)
904 {
905 	unsigned int val;
906 
907 	alc5505_coef_set(codec, 0x3000, 0x000c); /* DSP CPU stop */
908 	alc5505_coef_set(codec, 0x880c, 0x0008); /* DDR enter self refresh */
909 	alc5505_coef_set(codec, 0x61c0, 0x11110080); /* Clock control for PLL and CPU */
910 	alc5505_coef_set(codec, 0x6230, 0xfc0d4011); /* Disable Input OP */
911 	alc5505_coef_set(codec, 0x61b4, 0x040a2b03); /* Stop PLL2 */
912 	alc5505_coef_set(codec, 0x61b0, 0x00005b17); /* Stop PLL1 */
913 	alc5505_coef_set(codec, 0x61b8, 0x04133303); /* Stop PLL3 */
914 	val = alc5505_coef_get(codec, 0x6220);
915 	alc5505_coef_set(codec, 0x6220, (val | 0x3000)); /* switch Ringbuffer clock to DBUS clock */
916 }
917 
alc5505_dsp_back_from_halt(struct hda_codec * codec)918 static void alc5505_dsp_back_from_halt(struct hda_codec *codec)
919 {
920 	alc5505_coef_set(codec, 0x61b8, 0x04133302);
921 	alc5505_coef_set(codec, 0x61b0, 0x00005b16);
922 	alc5505_coef_set(codec, 0x61b4, 0x040a2b02);
923 	alc5505_coef_set(codec, 0x6230, 0xf80d4011);
924 	alc5505_coef_set(codec, 0x6220, 0x2002010f);
925 	alc5505_coef_set(codec, 0x880c, 0x00000004);
926 }
927 
alc5505_dsp_init(struct hda_codec * codec)928 static void alc5505_dsp_init(struct hda_codec *codec)
929 {
930 	unsigned int val;
931 
932 	alc5505_dsp_halt(codec);
933 	alc5505_dsp_back_from_halt(codec);
934 	alc5505_coef_set(codec, 0x61b0, 0x5b14); /* PLL1 control */
935 	alc5505_coef_set(codec, 0x61b0, 0x5b16);
936 	alc5505_coef_set(codec, 0x61b4, 0x04132b00); /* PLL2 control */
937 	alc5505_coef_set(codec, 0x61b4, 0x04132b02);
938 	alc5505_coef_set(codec, 0x61b8, 0x041f3300); /* PLL3 control*/
939 	alc5505_coef_set(codec, 0x61b8, 0x041f3302);
940 	snd_hda_codec_write(codec, 0x51, 0, AC_VERB_SET_CODEC_RESET, 0); /* Function reset */
941 	alc5505_coef_set(codec, 0x61b8, 0x041b3302);
942 	alc5505_coef_set(codec, 0x61b8, 0x04173302);
943 	alc5505_coef_set(codec, 0x61b8, 0x04163302);
944 	alc5505_coef_set(codec, 0x8800, 0x348b328b); /* DRAM control */
945 	alc5505_coef_set(codec, 0x8808, 0x00020022); /* DRAM control */
946 	alc5505_coef_set(codec, 0x8818, 0x00000400); /* DRAM control */
947 
948 	val = alc5505_coef_get(codec, 0x6200) >> 16; /* Read revision ID */
949 	if (val <= 3)
950 		alc5505_coef_set(codec, 0x6220, 0x2002010f); /* I/O PAD Configuration */
951 	else
952 		alc5505_coef_set(codec, 0x6220, 0x6002018f);
953 
954 	alc5505_coef_set(codec, 0x61ac, 0x055525f0); /**/
955 	alc5505_coef_set(codec, 0x61c0, 0x12230080); /* Clock control */
956 	alc5505_coef_set(codec, 0x61b4, 0x040e2b02); /* PLL2 control */
957 	alc5505_coef_set(codec, 0x61bc, 0x010234f8); /* OSC Control */
958 	alc5505_coef_set(codec, 0x880c, 0x00000004); /* DRAM Function control */
959 	alc5505_coef_set(codec, 0x880c, 0x00000003);
960 	alc5505_coef_set(codec, 0x880c, 0x00000010);
961 
962 #ifdef HALT_REALTEK_ALC5505
963 	alc5505_dsp_halt(codec);
964 #endif
965 }
966 
967 #ifdef HALT_REALTEK_ALC5505
968 #define alc5505_dsp_suspend(codec)	do { } while (0) /* NOP */
969 #define alc5505_dsp_resume(codec)	do { } while (0) /* NOP */
970 #else
971 #define alc5505_dsp_suspend(codec)	alc5505_dsp_halt(codec)
972 #define alc5505_dsp_resume(codec)	alc5505_dsp_back_from_halt(codec)
973 #endif
974 
alc269_suspend(struct hda_codec * codec)975 static int alc269_suspend(struct hda_codec *codec)
976 {
977 	struct alc_spec *spec = codec->spec;
978 
979 	if (spec->has_alc5505_dsp)
980 		alc5505_dsp_suspend(codec);
981 
982 	return alc_suspend(codec);
983 }
984 
alc269_resume(struct hda_codec * codec)985 static int alc269_resume(struct hda_codec *codec)
986 {
987 	struct alc_spec *spec = codec->spec;
988 
989 	if (spec->codec_variant == ALC269_TYPE_ALC269VB)
990 		alc269vb_toggle_power_output(codec, 0);
991 	if (spec->codec_variant == ALC269_TYPE_ALC269VB &&
992 			(alc_get_coef0(codec) & 0x00ff) == 0x018) {
993 		msleep(150);
994 	}
995 
996 	snd_hda_codec_init(codec);
997 
998 	if (spec->codec_variant == ALC269_TYPE_ALC269VB)
999 		alc269vb_toggle_power_output(codec, 1);
1000 	if (spec->codec_variant == ALC269_TYPE_ALC269VB &&
1001 			(alc_get_coef0(codec) & 0x00ff) == 0x017) {
1002 		msleep(200);
1003 	}
1004 
1005 	snd_hda_regmap_sync(codec);
1006 	hda_call_check_power_status(codec, 0x01);
1007 
1008 	/* on some machine, the BIOS will clear the codec gpio data when enter
1009 	 * suspend, and won't restore the data after resume, so we restore it
1010 	 * in the driver.
1011 	 */
1012 	if (spec->gpio_data)
1013 		alc_write_gpio_data(codec);
1014 
1015 	if (spec->has_alc5505_dsp)
1016 		alc5505_dsp_resume(codec);
1017 
1018 	return 0;
1019 }
1020 
alc269_fixup_pincfg_no_hp_to_lineout(struct hda_codec * codec,const struct hda_fixup * fix,int action)1021 static void alc269_fixup_pincfg_no_hp_to_lineout(struct hda_codec *codec,
1022 						 const struct hda_fixup *fix, int action)
1023 {
1024 	struct alc_spec *spec = codec->spec;
1025 
1026 	if (action == HDA_FIXUP_ACT_PRE_PROBE)
1027 		spec->parse_flags = HDA_PINCFG_NO_HP_FIXUP;
1028 }
1029 
alc269_fixup_pincfg_U7x7_headset_mic(struct hda_codec * codec,const struct hda_fixup * fix,int action)1030 static void alc269_fixup_pincfg_U7x7_headset_mic(struct hda_codec *codec,
1031 						 const struct hda_fixup *fix,
1032 						 int action)
1033 {
1034 	unsigned int cfg_headphone = snd_hda_codec_get_pincfg(codec, 0x21);
1035 	unsigned int cfg_headset_mic = snd_hda_codec_get_pincfg(codec, 0x19);
1036 
1037 	if (cfg_headphone && cfg_headset_mic == 0x411111f0)
1038 		snd_hda_codec_set_pincfg(codec, 0x19,
1039 			(cfg_headphone & ~AC_DEFCFG_DEVICE) |
1040 			(AC_JACK_MIC_IN << AC_DEFCFG_DEVICE_SHIFT));
1041 }
1042 
alc269_fixup_hweq(struct hda_codec * codec,const struct hda_fixup * fix,int action)1043 static void alc269_fixup_hweq(struct hda_codec *codec,
1044 			       const struct hda_fixup *fix, int action)
1045 {
1046 	if (action == HDA_FIXUP_ACT_INIT)
1047 		alc_update_coef_idx(codec, 0x1e, 0, 0x80);
1048 }
1049 
alc271_fixup_dmic(struct hda_codec * codec,const struct hda_fixup * fix,int action)1050 static void alc271_fixup_dmic(struct hda_codec *codec,
1051 			      const struct hda_fixup *fix, int action)
1052 {
1053 	static const struct hda_verb verbs[] = {
1054 		{0x20, AC_VERB_SET_COEF_INDEX, 0x0d},
1055 		{0x20, AC_VERB_SET_PROC_COEF, 0x4000},
1056 		{}
1057 	};
1058 	unsigned int cfg;
1059 
1060 	if (strcmp(codec->core.chip_name, "ALC271X") &&
1061 	    strcmp(codec->core.chip_name, "ALC269VB"))
1062 		return;
1063 	cfg = snd_hda_codec_get_pincfg(codec, 0x12);
1064 	if (get_defcfg_connect(cfg) == AC_JACK_PORT_FIXED)
1065 		snd_hda_sequence_write(codec, verbs);
1066 }
1067 
1068 /* Fix the speaker amp after resume, etc */
alc269vb_fixup_aspire_e1_coef(struct hda_codec * codec,const struct hda_fixup * fix,int action)1069 static void alc269vb_fixup_aspire_e1_coef(struct hda_codec *codec,
1070 					  const struct hda_fixup *fix,
1071 					  int action)
1072 {
1073 	if (action == HDA_FIXUP_ACT_INIT)
1074 		alc_update_coef_idx(codec, 0x0d, 0x6000, 0x6000);
1075 }
1076 
alc269_fixup_pcm_44k(struct hda_codec * codec,const struct hda_fixup * fix,int action)1077 static void alc269_fixup_pcm_44k(struct hda_codec *codec,
1078 				 const struct hda_fixup *fix, int action)
1079 {
1080 	struct alc_spec *spec = codec->spec;
1081 
1082 	if (action != HDA_FIXUP_ACT_PROBE)
1083 		return;
1084 
1085 	/* Due to a hardware problem on Lenovo Ideadpad, we need to
1086 	 * fix the sample rate of analog I/O to 44.1kHz
1087 	 */
1088 	spec->gen.stream_analog_playback = &alc269_44k_pcm_analog_playback;
1089 	spec->gen.stream_analog_capture = &alc269_44k_pcm_analog_capture;
1090 }
1091 
alc269_fixup_stereo_dmic(struct hda_codec * codec,const struct hda_fixup * fix,int action)1092 static void alc269_fixup_stereo_dmic(struct hda_codec *codec,
1093 				     const struct hda_fixup *fix, int action)
1094 {
1095 	/* The digital-mic unit sends PDM (differential signal) instead of
1096 	 * the standard PCM, thus you can't record a valid mono stream as is.
1097 	 * Below is a workaround specific to ALC269 to control the dmic
1098 	 * signal source as mono.
1099 	 */
1100 	if (action == HDA_FIXUP_ACT_INIT)
1101 		alc_update_coef_idx(codec, 0x07, 0, 0x80);
1102 }
1103 
alc269_quanta_automute(struct hda_codec * codec)1104 static void alc269_quanta_automute(struct hda_codec *codec)
1105 {
1106 	snd_hda_gen_update_outputs(codec);
1107 
1108 	alc_write_coef_idx(codec, 0x0c, 0x680);
1109 	alc_write_coef_idx(codec, 0x0c, 0x480);
1110 }
1111 
alc269_fixup_quanta_mute(struct hda_codec * codec,const struct hda_fixup * fix,int action)1112 static void alc269_fixup_quanta_mute(struct hda_codec *codec,
1113 				     const struct hda_fixup *fix, int action)
1114 {
1115 	struct alc_spec *spec = codec->spec;
1116 	if (action != HDA_FIXUP_ACT_PROBE)
1117 		return;
1118 	spec->gen.automute_hook = alc269_quanta_automute;
1119 }
1120 
alc269_x101_hp_automute_hook(struct hda_codec * codec,struct hda_jack_callback * jack)1121 static void alc269_x101_hp_automute_hook(struct hda_codec *codec,
1122 					 struct hda_jack_callback *jack)
1123 {
1124 	struct alc_spec *spec = codec->spec;
1125 	int vref;
1126 	msleep(200);
1127 	snd_hda_gen_hp_automute(codec, jack);
1128 
1129 	vref = spec->gen.hp_jack_present ? PIN_VREF80 : 0;
1130 	msleep(100);
1131 	snd_hda_codec_write(codec, 0x18, 0, AC_VERB_SET_PIN_WIDGET_CONTROL,
1132 			    vref);
1133 	msleep(500);
1134 	snd_hda_codec_write(codec, 0x18, 0, AC_VERB_SET_PIN_WIDGET_CONTROL,
1135 			    vref);
1136 }
1137 
1138 /*
1139  * Magic sequence to make Huawei Matebook X right speaker working (bko#197801)
1140  */
1141 struct hda_alc298_mbxinit {
1142 	unsigned char value_0x23;
1143 	unsigned char value_0x25;
1144 };
1145 
alc298_huawei_mbx_stereo_seq(struct hda_codec * codec,const struct hda_alc298_mbxinit * initval,bool first)1146 static void alc298_huawei_mbx_stereo_seq(struct hda_codec *codec,
1147 					 const struct hda_alc298_mbxinit *initval,
1148 					 bool first)
1149 {
1150 	snd_hda_codec_write(codec, 0x06, 0, AC_VERB_SET_DIGI_CONVERT_3, 0x0);
1151 	alc_write_coef_idx(codec, 0x26, 0xb000);
1152 
1153 	if (first)
1154 		snd_hda_codec_write(codec, 0x21, 0, AC_VERB_GET_PIN_SENSE, 0x0);
1155 
1156 	snd_hda_codec_write(codec, 0x6, 0, AC_VERB_SET_DIGI_CONVERT_3, 0x80);
1157 	alc_write_coef_idx(codec, 0x26, 0xf000);
1158 	alc_write_coef_idx(codec, 0x23, initval->value_0x23);
1159 
1160 	if (initval->value_0x23 != 0x1e)
1161 		alc_write_coef_idx(codec, 0x25, initval->value_0x25);
1162 
1163 	snd_hda_codec_write(codec, 0x20, 0, AC_VERB_SET_COEF_INDEX, 0x26);
1164 	snd_hda_codec_write(codec, 0x20, 0, AC_VERB_SET_PROC_COEF, 0xb010);
1165 }
1166 
alc298_fixup_huawei_mbx_stereo(struct hda_codec * codec,const struct hda_fixup * fix,int action)1167 static void alc298_fixup_huawei_mbx_stereo(struct hda_codec *codec,
1168 					   const struct hda_fixup *fix,
1169 					   int action)
1170 {
1171 	/* Initialization magic */
1172 	static const struct hda_alc298_mbxinit dac_init[] = {
1173 		{0x0c, 0x00}, {0x0d, 0x00}, {0x0e, 0x00}, {0x0f, 0x00},
1174 		{0x10, 0x00}, {0x1a, 0x40}, {0x1b, 0x82}, {0x1c, 0x00},
1175 		{0x1d, 0x00}, {0x1e, 0x00}, {0x1f, 0x00},
1176 		{0x20, 0xc2}, {0x21, 0xc8}, {0x22, 0x26}, {0x23, 0x24},
1177 		{0x27, 0xff}, {0x28, 0xff}, {0x29, 0xff}, {0x2a, 0x8f},
1178 		{0x2b, 0x02}, {0x2c, 0x48}, {0x2d, 0x34}, {0x2e, 0x00},
1179 		{0x2f, 0x00},
1180 		{0x30, 0x00}, {0x31, 0x00}, {0x32, 0x00}, {0x33, 0x00},
1181 		{0x34, 0x00}, {0x35, 0x01}, {0x36, 0x93}, {0x37, 0x0c},
1182 		{0x38, 0x00}, {0x39, 0x00}, {0x3a, 0xf8}, {0x38, 0x80},
1183 		{}
1184 	};
1185 	const struct hda_alc298_mbxinit *seq;
1186 
1187 	if (action != HDA_FIXUP_ACT_INIT)
1188 		return;
1189 
1190 	/* Start */
1191 	snd_hda_codec_write(codec, 0x06, 0, AC_VERB_SET_DIGI_CONVERT_3, 0x00);
1192 	snd_hda_codec_write(codec, 0x06, 0, AC_VERB_SET_DIGI_CONVERT_3, 0x80);
1193 	alc_write_coef_idx(codec, 0x26, 0xf000);
1194 	alc_write_coef_idx(codec, 0x22, 0x31);
1195 	alc_write_coef_idx(codec, 0x23, 0x0b);
1196 	alc_write_coef_idx(codec, 0x25, 0x00);
1197 	snd_hda_codec_write(codec, 0x20, 0, AC_VERB_SET_COEF_INDEX, 0x26);
1198 	snd_hda_codec_write(codec, 0x20, 0, AC_VERB_SET_PROC_COEF, 0xb010);
1199 
1200 	for (seq = dac_init; seq->value_0x23; seq++)
1201 		alc298_huawei_mbx_stereo_seq(codec, seq, seq == dac_init);
1202 }
1203 
alc269_fixup_x101_headset_mic(struct hda_codec * codec,const struct hda_fixup * fix,int action)1204 static void alc269_fixup_x101_headset_mic(struct hda_codec *codec,
1205 				     const struct hda_fixup *fix, int action)
1206 {
1207 	struct alc_spec *spec = codec->spec;
1208 	if (action == HDA_FIXUP_ACT_PRE_PROBE) {
1209 		spec->parse_flags |= HDA_PINCFG_HEADSET_MIC;
1210 		spec->gen.hp_automute_hook = alc269_x101_hp_automute_hook;
1211 	}
1212 }
1213 
alc_update_vref_led(struct hda_codec * codec,hda_nid_t pin,bool polarity,bool on)1214 static void alc_update_vref_led(struct hda_codec *codec, hda_nid_t pin,
1215 				bool polarity, bool on)
1216 {
1217 	unsigned int pinval;
1218 
1219 	if (!pin)
1220 		return;
1221 	if (polarity)
1222 		on = !on;
1223 	pinval = snd_hda_codec_get_pin_target(codec, pin);
1224 	pinval &= ~AC_PINCTL_VREFEN;
1225 	pinval |= on ? AC_PINCTL_VREF_80 : AC_PINCTL_VREF_HIZ;
1226 	/* temporarily power up/down for setting VREF */
1227 	snd_hda_power_up_pm(codec);
1228 	snd_hda_set_pin_ctl_cache(codec, pin, pinval);
1229 	snd_hda_power_down_pm(codec);
1230 }
1231 
1232 /* update mute-LED according to the speaker mute state via mic VREF pin */
vref_mute_led_set(struct led_classdev * led_cdev,enum led_brightness brightness)1233 static int vref_mute_led_set(struct led_classdev *led_cdev,
1234 			     enum led_brightness brightness)
1235 {
1236 	struct hda_codec *codec = dev_to_hda_codec(led_cdev->dev->parent);
1237 	struct alc_spec *spec = codec->spec;
1238 
1239 	alc_update_vref_led(codec, spec->mute_led_nid,
1240 			    spec->mute_led_polarity, brightness);
1241 	return 0;
1242 }
1243 
1244 /* Make sure the led works even in runtime suspend */
led_power_filter(struct hda_codec * codec,hda_nid_t nid,unsigned int power_state)1245 static unsigned int led_power_filter(struct hda_codec *codec,
1246 						  hda_nid_t nid,
1247 						  unsigned int power_state)
1248 {
1249 	struct alc_spec *spec = codec->spec;
1250 
1251 	if (power_state != AC_PWRST_D3 || nid == 0 ||
1252 	    (nid != spec->mute_led_nid && nid != spec->cap_mute_led_nid))
1253 		return power_state;
1254 
1255 	/* Set pin ctl again, it might have just been set to 0 */
1256 	snd_hda_set_pin_ctl(codec, nid,
1257 			    snd_hda_codec_get_pin_target(codec, nid));
1258 
1259 	return snd_hda_gen_path_power_filter(codec, nid, power_state);
1260 }
1261 
alc269_fixup_hp_mute_led(struct hda_codec * codec,const struct hda_fixup * fix,int action)1262 static void alc269_fixup_hp_mute_led(struct hda_codec *codec,
1263 				     const struct hda_fixup *fix, int action)
1264 {
1265 	struct alc_spec *spec = codec->spec;
1266 	const struct dmi_device *dev = NULL;
1267 
1268 	if (action != HDA_FIXUP_ACT_PRE_PROBE)
1269 		return;
1270 
1271 	while ((dev = dmi_find_device(DMI_DEV_TYPE_OEM_STRING, NULL, dev))) {
1272 		int pol, pin;
1273 		if (sscanf(dev->name, "HP_Mute_LED_%d_%x", &pol, &pin) != 2)
1274 			continue;
1275 		if (pin < 0x0a || pin >= 0x10)
1276 			break;
1277 		spec->mute_led_polarity = pol;
1278 		spec->mute_led_nid = pin - 0x0a + 0x18;
1279 		snd_hda_gen_add_mute_led_cdev(codec, vref_mute_led_set);
1280 		codec->power_filter = led_power_filter;
1281 		codec_dbg(codec,
1282 			  "Detected mute LED for %x:%d\n", spec->mute_led_nid,
1283 			   spec->mute_led_polarity);
1284 		break;
1285 	}
1286 }
1287 
alc269_fixup_hp_mute_led_micx(struct hda_codec * codec,const struct hda_fixup * fix,int action,hda_nid_t pin)1288 static void alc269_fixup_hp_mute_led_micx(struct hda_codec *codec,
1289 					  const struct hda_fixup *fix,
1290 					  int action, hda_nid_t pin)
1291 {
1292 	struct alc_spec *spec = codec->spec;
1293 
1294 	if (action == HDA_FIXUP_ACT_PRE_PROBE) {
1295 		spec->mute_led_polarity = 0;
1296 		spec->mute_led_nid = pin;
1297 		snd_hda_gen_add_mute_led_cdev(codec, vref_mute_led_set);
1298 		codec->power_filter = led_power_filter;
1299 	}
1300 }
1301 
alc269_fixup_hp_mute_led_mic1(struct hda_codec * codec,const struct hda_fixup * fix,int action)1302 static void alc269_fixup_hp_mute_led_mic1(struct hda_codec *codec,
1303 				const struct hda_fixup *fix, int action)
1304 {
1305 	alc269_fixup_hp_mute_led_micx(codec, fix, action, 0x18);
1306 }
1307 
alc269_fixup_hp_mute_led_mic2(struct hda_codec * codec,const struct hda_fixup * fix,int action)1308 static void alc269_fixup_hp_mute_led_mic2(struct hda_codec *codec,
1309 				const struct hda_fixup *fix, int action)
1310 {
1311 	alc269_fixup_hp_mute_led_micx(codec, fix, action, 0x19);
1312 }
1313 
alc269_fixup_hp_mute_led_mic3(struct hda_codec * codec,const struct hda_fixup * fix,int action)1314 static void alc269_fixup_hp_mute_led_mic3(struct hda_codec *codec,
1315 				const struct hda_fixup *fix, int action)
1316 {
1317 	alc269_fixup_hp_mute_led_micx(codec, fix, action, 0x1b);
1318 }
1319 
alc236_fixup_hp_gpio_led(struct hda_codec * codec,const struct hda_fixup * fix,int action)1320 static void alc236_fixup_hp_gpio_led(struct hda_codec *codec,
1321 				const struct hda_fixup *fix, int action)
1322 {
1323 	alc_fixup_hp_gpio_led(codec, action, 0x02, 0x01);
1324 }
1325 
alc269_fixup_hp_gpio_led(struct hda_codec * codec,const struct hda_fixup * fix,int action)1326 static void alc269_fixup_hp_gpio_led(struct hda_codec *codec,
1327 				const struct hda_fixup *fix, int action)
1328 {
1329 	alc_fixup_hp_gpio_led(codec, action, 0x08, 0x10);
1330 }
1331 
alc285_fixup_hp_gpio_led(struct hda_codec * codec,const struct hda_fixup * fix,int action)1332 static void alc285_fixup_hp_gpio_led(struct hda_codec *codec,
1333 				const struct hda_fixup *fix, int action)
1334 {
1335 	alc_fixup_hp_gpio_led(codec, action, 0x04, 0x01);
1336 }
1337 
alc286_fixup_hp_gpio_led(struct hda_codec * codec,const struct hda_fixup * fix,int action)1338 static void alc286_fixup_hp_gpio_led(struct hda_codec *codec,
1339 				const struct hda_fixup *fix, int action)
1340 {
1341 	alc_fixup_hp_gpio_led(codec, action, 0x02, 0x20);
1342 }
1343 
alc287_fixup_hp_gpio_led(struct hda_codec * codec,const struct hda_fixup * fix,int action)1344 static void alc287_fixup_hp_gpio_led(struct hda_codec *codec,
1345 				const struct hda_fixup *fix, int action)
1346 {
1347 	alc_fixup_hp_gpio_led(codec, action, 0x10, 0);
1348 }
1349 
alc245_fixup_hp_gpio_led(struct hda_codec * codec,const struct hda_fixup * fix,int action)1350 static void alc245_fixup_hp_gpio_led(struct hda_codec *codec,
1351 				const struct hda_fixup *fix, int action)
1352 {
1353 	struct alc_spec *spec = codec->spec;
1354 
1355 	if (action == HDA_FIXUP_ACT_PRE_PROBE)
1356 		spec->micmute_led_polarity = 1;
1357 	alc_fixup_hp_gpio_led(codec, action, 0, 0x04);
1358 }
1359 
1360 /* turn on/off mic-mute LED per capture hook via VREF change */
vref_micmute_led_set(struct led_classdev * led_cdev,enum led_brightness brightness)1361 static int vref_micmute_led_set(struct led_classdev *led_cdev,
1362 				enum led_brightness brightness)
1363 {
1364 	struct hda_codec *codec = dev_to_hda_codec(led_cdev->dev->parent);
1365 	struct alc_spec *spec = codec->spec;
1366 
1367 	alc_update_vref_led(codec, spec->cap_mute_led_nid,
1368 			    spec->micmute_led_polarity, brightness);
1369 	return 0;
1370 }
1371 
alc269_fixup_hp_gpio_mic1_led(struct hda_codec * codec,const struct hda_fixup * fix,int action)1372 static void alc269_fixup_hp_gpio_mic1_led(struct hda_codec *codec,
1373 				const struct hda_fixup *fix, int action)
1374 {
1375 	struct alc_spec *spec = codec->spec;
1376 
1377 	alc_fixup_hp_gpio_led(codec, action, 0x08, 0);
1378 	if (action == HDA_FIXUP_ACT_PRE_PROBE) {
1379 		/* Like hp_gpio_mic1_led, but also needs GPIO4 low to
1380 		 * enable headphone amp
1381 		 */
1382 		spec->gpio_mask |= 0x10;
1383 		spec->gpio_dir |= 0x10;
1384 		spec->cap_mute_led_nid = 0x18;
1385 		snd_hda_gen_add_micmute_led_cdev(codec, vref_micmute_led_set);
1386 		codec->power_filter = led_power_filter;
1387 	}
1388 }
1389 
alc280_fixup_hp_gpio4(struct hda_codec * codec,const struct hda_fixup * fix,int action)1390 static void alc280_fixup_hp_gpio4(struct hda_codec *codec,
1391 				   const struct hda_fixup *fix, int action)
1392 {
1393 	struct alc_spec *spec = codec->spec;
1394 
1395 	alc_fixup_hp_gpio_led(codec, action, 0x08, 0);
1396 	if (action == HDA_FIXUP_ACT_PRE_PROBE) {
1397 		spec->cap_mute_led_nid = 0x18;
1398 		snd_hda_gen_add_micmute_led_cdev(codec, vref_micmute_led_set);
1399 		codec->power_filter = led_power_filter;
1400 	}
1401 }
1402 
1403 /* HP Spectre x360 14 model needs a unique workaround for enabling the amp;
1404  * it needs to toggle the GPIO0 once on and off at each time (bko#210633)
1405  */
alc245_fixup_hp_x360_amp(struct hda_codec * codec,const struct hda_fixup * fix,int action)1406 static void alc245_fixup_hp_x360_amp(struct hda_codec *codec,
1407 				     const struct hda_fixup *fix, int action)
1408 {
1409 	struct alc_spec *spec = codec->spec;
1410 
1411 	switch (action) {
1412 	case HDA_FIXUP_ACT_PRE_PROBE:
1413 		spec->gpio_mask |= 0x01;
1414 		spec->gpio_dir |= 0x01;
1415 		break;
1416 	case HDA_FIXUP_ACT_INIT:
1417 		/* need to toggle GPIO to enable the amp */
1418 		alc_update_gpio_data(codec, 0x01, true);
1419 		msleep(100);
1420 		alc_update_gpio_data(codec, 0x01, false);
1421 		break;
1422 	}
1423 }
1424 
1425 /* toggle GPIO2 at each time stream is started; we use PREPARE state instead */
alc274_hp_envy_pcm_hook(struct hda_pcm_stream * hinfo,struct hda_codec * codec,struct snd_pcm_substream * substream,int action)1426 static void alc274_hp_envy_pcm_hook(struct hda_pcm_stream *hinfo,
1427 				    struct hda_codec *codec,
1428 				    struct snd_pcm_substream *substream,
1429 				    int action)
1430 {
1431 	switch (action) {
1432 	case HDA_GEN_PCM_ACT_PREPARE:
1433 		alc_update_gpio_data(codec, 0x04, true);
1434 		break;
1435 	case HDA_GEN_PCM_ACT_CLEANUP:
1436 		alc_update_gpio_data(codec, 0x04, false);
1437 		break;
1438 	}
1439 }
1440 
alc274_fixup_hp_envy_gpio(struct hda_codec * codec,const struct hda_fixup * fix,int action)1441 static void alc274_fixup_hp_envy_gpio(struct hda_codec *codec,
1442 				      const struct hda_fixup *fix,
1443 				      int action)
1444 {
1445 	struct alc_spec *spec = codec->spec;
1446 
1447 	if (action == HDA_FIXUP_ACT_PROBE) {
1448 		spec->gpio_mask |= 0x04;
1449 		spec->gpio_dir |= 0x04;
1450 		spec->gen.pcm_playback_hook = alc274_hp_envy_pcm_hook;
1451 	}
1452 }
1453 
alc_update_coef_led(struct hda_codec * codec,struct alc_coef_led * led,bool polarity,bool on)1454 static void alc_update_coef_led(struct hda_codec *codec,
1455 				struct alc_coef_led *led,
1456 				bool polarity, bool on)
1457 {
1458 	if (polarity)
1459 		on = !on;
1460 	/* temporarily power up/down for setting COEF bit */
1461 	alc_update_coef_idx(codec, led->idx, led->mask,
1462 			    on ? led->on : led->off);
1463 }
1464 
1465 /* update mute-LED according to the speaker mute state via COEF bit */
coef_mute_led_set(struct led_classdev * led_cdev,enum led_brightness brightness)1466 static int coef_mute_led_set(struct led_classdev *led_cdev,
1467 			     enum led_brightness brightness)
1468 {
1469 	struct hda_codec *codec = dev_to_hda_codec(led_cdev->dev->parent);
1470 	struct alc_spec *spec = codec->spec;
1471 
1472 	alc_update_coef_led(codec, &spec->mute_led_coef,
1473 			    spec->mute_led_polarity, brightness);
1474 	return 0;
1475 }
1476 
alc285_fixup_hp_mute_led_coefbit(struct hda_codec * codec,const struct hda_fixup * fix,int action)1477 static void alc285_fixup_hp_mute_led_coefbit(struct hda_codec *codec,
1478 					  const struct hda_fixup *fix,
1479 					  int action)
1480 {
1481 	struct alc_spec *spec = codec->spec;
1482 
1483 	if (action == HDA_FIXUP_ACT_PRE_PROBE) {
1484 		spec->mute_led_polarity = 0;
1485 		spec->mute_led_coef.idx = 0x0b;
1486 		spec->mute_led_coef.mask = 1 << 3;
1487 		spec->mute_led_coef.on = 1 << 3;
1488 		spec->mute_led_coef.off = 0;
1489 		snd_hda_gen_add_mute_led_cdev(codec, coef_mute_led_set);
1490 	}
1491 }
1492 
alc236_fixup_hp_mute_led_coefbit(struct hda_codec * codec,const struct hda_fixup * fix,int action)1493 static void alc236_fixup_hp_mute_led_coefbit(struct hda_codec *codec,
1494 					  const struct hda_fixup *fix,
1495 					  int action)
1496 {
1497 	struct alc_spec *spec = codec->spec;
1498 
1499 	if (action == HDA_FIXUP_ACT_PRE_PROBE) {
1500 		spec->mute_led_polarity = 0;
1501 		spec->mute_led_coef.idx = 0x34;
1502 		spec->mute_led_coef.mask = 1 << 5;
1503 		spec->mute_led_coef.on = 0;
1504 		spec->mute_led_coef.off = 1 << 5;
1505 		snd_hda_gen_add_mute_led_cdev(codec, coef_mute_led_set);
1506 	}
1507 }
1508 
alc236_fixup_hp_mute_led_coefbit2(struct hda_codec * codec,const struct hda_fixup * fix,int action)1509 static void alc236_fixup_hp_mute_led_coefbit2(struct hda_codec *codec,
1510 					  const struct hda_fixup *fix, int action)
1511 {
1512 	struct alc_spec *spec = codec->spec;
1513 
1514 	if (action == HDA_FIXUP_ACT_PRE_PROBE) {
1515 		spec->mute_led_polarity = 0;
1516 		spec->mute_led_coef.idx = 0x07;
1517 		spec->mute_led_coef.mask = 1;
1518 		spec->mute_led_coef.on = 1;
1519 		spec->mute_led_coef.off = 0;
1520 		snd_hda_gen_add_mute_led_cdev(codec, coef_mute_led_set);
1521 	}
1522 }
1523 
alc245_fixup_hp_mute_led_coefbit(struct hda_codec * codec,const struct hda_fixup * fix,int action)1524 static void alc245_fixup_hp_mute_led_coefbit(struct hda_codec *codec,
1525 					  const struct hda_fixup *fix,
1526 					  int action)
1527 {
1528 	struct alc_spec *spec = codec->spec;
1529 
1530 	if (action == HDA_FIXUP_ACT_PRE_PROBE) {
1531 		spec->mute_led_polarity = 0;
1532 		spec->mute_led_coef.idx = 0x0b;
1533 		spec->mute_led_coef.mask = 3 << 2;
1534 		spec->mute_led_coef.on = 2 << 2;
1535 		spec->mute_led_coef.off = 1 << 2;
1536 		snd_hda_gen_add_mute_led_cdev(codec, coef_mute_led_set);
1537 	}
1538 }
1539 
alc245_fixup_hp_mute_led_v1_coefbit(struct hda_codec * codec,const struct hda_fixup * fix,int action)1540 static void alc245_fixup_hp_mute_led_v1_coefbit(struct hda_codec *codec,
1541 					  const struct hda_fixup *fix,
1542 					  int action)
1543 {
1544 	struct alc_spec *spec = codec->spec;
1545 
1546 	if (action == HDA_FIXUP_ACT_PRE_PROBE) {
1547 		spec->mute_led_polarity = 0;
1548 		spec->mute_led_coef.idx = 0x0b;
1549 		spec->mute_led_coef.mask = 3 << 2;
1550 		spec->mute_led_coef.on = 1 << 3;
1551 		spec->mute_led_coef.off = 0;
1552 		snd_hda_gen_add_mute_led_cdev(codec, coef_mute_led_set);
1553 	}
1554 }
1555 
1556 /* turn on/off mic-mute LED per capture hook by coef bit */
coef_micmute_led_set(struct led_classdev * led_cdev,enum led_brightness brightness)1557 static int coef_micmute_led_set(struct led_classdev *led_cdev,
1558 				enum led_brightness brightness)
1559 {
1560 	struct hda_codec *codec = dev_to_hda_codec(led_cdev->dev->parent);
1561 	struct alc_spec *spec = codec->spec;
1562 
1563 	alc_update_coef_led(codec, &spec->mic_led_coef,
1564 			    spec->micmute_led_polarity, brightness);
1565 	return 0;
1566 }
1567 
alc285_fixup_hp_coef_micmute_led(struct hda_codec * codec,const struct hda_fixup * fix,int action)1568 static void alc285_fixup_hp_coef_micmute_led(struct hda_codec *codec,
1569 				const struct hda_fixup *fix, int action)
1570 {
1571 	struct alc_spec *spec = codec->spec;
1572 
1573 	if (action == HDA_FIXUP_ACT_PRE_PROBE) {
1574 		spec->mic_led_coef.idx = 0x19;
1575 		spec->mic_led_coef.mask = 1 << 13;
1576 		spec->mic_led_coef.on = 1 << 13;
1577 		spec->mic_led_coef.off = 0;
1578 		snd_hda_gen_add_micmute_led_cdev(codec, coef_micmute_led_set);
1579 	}
1580 }
1581 
alc285_fixup_hp_gpio_micmute_led(struct hda_codec * codec,const struct hda_fixup * fix,int action)1582 static void alc285_fixup_hp_gpio_micmute_led(struct hda_codec *codec,
1583 				const struct hda_fixup *fix, int action)
1584 {
1585 	struct alc_spec *spec = codec->spec;
1586 
1587 	if (action == HDA_FIXUP_ACT_PRE_PROBE)
1588 		spec->micmute_led_polarity = 1;
1589 	alc_fixup_hp_gpio_led(codec, action, 0, 0x04);
1590 }
1591 
alc236_fixup_hp_coef_micmute_led(struct hda_codec * codec,const struct hda_fixup * fix,int action)1592 static void alc236_fixup_hp_coef_micmute_led(struct hda_codec *codec,
1593 				const struct hda_fixup *fix, int action)
1594 {
1595 	struct alc_spec *spec = codec->spec;
1596 
1597 	if (action == HDA_FIXUP_ACT_PRE_PROBE) {
1598 		spec->mic_led_coef.idx = 0x35;
1599 		spec->mic_led_coef.mask = 3 << 2;
1600 		spec->mic_led_coef.on = 2 << 2;
1601 		spec->mic_led_coef.off = 1 << 2;
1602 		snd_hda_gen_add_micmute_led_cdev(codec, coef_micmute_led_set);
1603 	}
1604 }
1605 
alc295_fixup_hp_mute_led_coefbit11(struct hda_codec * codec,const struct hda_fixup * fix,int action)1606 static void alc295_fixup_hp_mute_led_coefbit11(struct hda_codec *codec,
1607 				const struct hda_fixup *fix, int action)
1608 {
1609 	struct alc_spec *spec = codec->spec;
1610 
1611 	if (action == HDA_FIXUP_ACT_PRE_PROBE) {
1612 		spec->mute_led_polarity = 0;
1613 		spec->mute_led_coef.idx = 0xb;
1614 		spec->mute_led_coef.mask = 3 << 3;
1615 		spec->mute_led_coef.on = 1 << 3;
1616 		spec->mute_led_coef.off = 1 << 4;
1617 		snd_hda_gen_add_mute_led_cdev(codec, coef_mute_led_set);
1618 	}
1619 }
1620 
alc285_fixup_hp_mute_led(struct hda_codec * codec,const struct hda_fixup * fix,int action)1621 static void alc285_fixup_hp_mute_led(struct hda_codec *codec,
1622 				const struct hda_fixup *fix, int action)
1623 {
1624 	alc285_fixup_hp_mute_led_coefbit(codec, fix, action);
1625 	alc285_fixup_hp_coef_micmute_led(codec, fix, action);
1626 }
1627 
alc285_fixup_hp_spectre_x360_mute_led(struct hda_codec * codec,const struct hda_fixup * fix,int action)1628 static void alc285_fixup_hp_spectre_x360_mute_led(struct hda_codec *codec,
1629 				const struct hda_fixup *fix, int action)
1630 {
1631 	alc285_fixup_hp_mute_led_coefbit(codec, fix, action);
1632 	alc285_fixup_hp_gpio_micmute_led(codec, fix, action);
1633 }
1634 
alc236_fixup_hp_mute_led(struct hda_codec * codec,const struct hda_fixup * fix,int action)1635 static void alc236_fixup_hp_mute_led(struct hda_codec *codec,
1636 				const struct hda_fixup *fix, int action)
1637 {
1638 	alc236_fixup_hp_mute_led_coefbit(codec, fix, action);
1639 	alc236_fixup_hp_coef_micmute_led(codec, fix, action);
1640 }
1641 
alc236_fixup_hp_micmute_led_vref(struct hda_codec * codec,const struct hda_fixup * fix,int action)1642 static void alc236_fixup_hp_micmute_led_vref(struct hda_codec *codec,
1643 				const struct hda_fixup *fix, int action)
1644 {
1645 	struct alc_spec *spec = codec->spec;
1646 
1647 	if (action == HDA_FIXUP_ACT_PRE_PROBE) {
1648 		spec->cap_mute_led_nid = 0x1a;
1649 		snd_hda_gen_add_micmute_led_cdev(codec, vref_micmute_led_set);
1650 		codec->power_filter = led_power_filter;
1651 	}
1652 }
1653 
alc236_fixup_hp_mute_led_micmute_vref(struct hda_codec * codec,const struct hda_fixup * fix,int action)1654 static void alc236_fixup_hp_mute_led_micmute_vref(struct hda_codec *codec,
1655 				const struct hda_fixup *fix, int action)
1656 {
1657 	alc236_fixup_hp_mute_led_coefbit(codec, fix, action);
1658 	alc236_fixup_hp_micmute_led_vref(codec, fix, action);
1659 }
1660 
alc298_samsung_write_coef_pack(struct hda_codec * codec,const unsigned short coefs[2])1661 static inline void alc298_samsung_write_coef_pack(struct hda_codec *codec,
1662 						  const unsigned short coefs[2])
1663 {
1664 	alc_write_coef_idx(codec, 0x23, coefs[0]);
1665 	alc_write_coef_idx(codec, 0x25, coefs[1]);
1666 	alc_write_coef_idx(codec, 0x26, 0xb011);
1667 }
1668 
1669 struct alc298_samsung_amp_desc {
1670 	unsigned char nid;
1671 	unsigned short init_seq[2][2];
1672 };
1673 
alc298_fixup_samsung_amp(struct hda_codec * codec,const struct hda_fixup * fix,int action)1674 static void alc298_fixup_samsung_amp(struct hda_codec *codec,
1675 				     const struct hda_fixup *fix, int action)
1676 {
1677 	int i, j;
1678 	static const unsigned short init_seq[][2] = {
1679 		{ 0x19, 0x00 }, { 0x20, 0xc0 }, { 0x22, 0x44 }, { 0x23, 0x08 },
1680 		{ 0x24, 0x85 }, { 0x25, 0x41 }, { 0x35, 0x40 }, { 0x36, 0x01 },
1681 		{ 0x38, 0x81 }, { 0x3a, 0x03 }, { 0x3b, 0x81 }, { 0x40, 0x3e },
1682 		{ 0x41, 0x07 }, { 0x400, 0x1 }
1683 	};
1684 	static const struct alc298_samsung_amp_desc amps[] = {
1685 		{ 0x3a, { { 0x18, 0x1 }, { 0x26, 0x0 } } },
1686 		{ 0x39, { { 0x18, 0x2 }, { 0x26, 0x1 } } }
1687 	};
1688 
1689 	if (action != HDA_FIXUP_ACT_INIT)
1690 		return;
1691 
1692 	for (i = 0; i < ARRAY_SIZE(amps); i++) {
1693 		alc_write_coef_idx(codec, 0x22, amps[i].nid);
1694 
1695 		for (j = 0; j < ARRAY_SIZE(amps[i].init_seq); j++)
1696 			alc298_samsung_write_coef_pack(codec, amps[i].init_seq[j]);
1697 
1698 		for (j = 0; j < ARRAY_SIZE(init_seq); j++)
1699 			alc298_samsung_write_coef_pack(codec, init_seq[j]);
1700 	}
1701 }
1702 
1703 struct alc298_samsung_v2_amp_desc {
1704 	unsigned short nid;
1705 	int init_seq_size;
1706 	unsigned short init_seq[18][2];
1707 };
1708 
1709 static const struct alc298_samsung_v2_amp_desc
1710 alc298_samsung_v2_amp_desc_tbl[] = {
1711 	{ 0x38, 18, {
1712 		{ 0x23e1, 0x0000 }, { 0x2012, 0x006f }, { 0x2014, 0x0000 },
1713 		{ 0x201b, 0x0001 }, { 0x201d, 0x0001 }, { 0x201f, 0x00fe },
1714 		{ 0x2021, 0x0000 }, { 0x2022, 0x0010 }, { 0x203d, 0x0005 },
1715 		{ 0x203f, 0x0003 }, { 0x2050, 0x002c }, { 0x2076, 0x000e },
1716 		{ 0x207c, 0x004a }, { 0x2081, 0x0003 }, { 0x2399, 0x0003 },
1717 		{ 0x23a4, 0x00b5 }, { 0x23a5, 0x0001 }, { 0x23ba, 0x0094 }
1718 	}},
1719 	{ 0x39, 18, {
1720 		{ 0x23e1, 0x0000 }, { 0x2012, 0x006f }, { 0x2014, 0x0000 },
1721 		{ 0x201b, 0x0002 }, { 0x201d, 0x0002 }, { 0x201f, 0x00fd },
1722 		{ 0x2021, 0x0001 }, { 0x2022, 0x0010 }, { 0x203d, 0x0005 },
1723 		{ 0x203f, 0x0003 }, { 0x2050, 0x002c }, { 0x2076, 0x000e },
1724 		{ 0x207c, 0x004a }, { 0x2081, 0x0003 }, { 0x2399, 0x0003 },
1725 		{ 0x23a4, 0x00b5 }, { 0x23a5, 0x0001 }, { 0x23ba, 0x0094 }
1726 	}},
1727 	{ 0x3c, 15, {
1728 		{ 0x23e1, 0x0000 }, { 0x2012, 0x006f }, { 0x2014, 0x0000 },
1729 		{ 0x201b, 0x0001 }, { 0x201d, 0x0001 }, { 0x201f, 0x00fe },
1730 		{ 0x2021, 0x0000 }, { 0x2022, 0x0010 }, { 0x203d, 0x0005 },
1731 		{ 0x203f, 0x0003 }, { 0x2050, 0x002c }, { 0x2076, 0x000e },
1732 		{ 0x207c, 0x004a }, { 0x2081, 0x0003 }, { 0x23ba, 0x008d }
1733 	}},
1734 	{ 0x3d, 15, {
1735 		{ 0x23e1, 0x0000 }, { 0x2012, 0x006f }, { 0x2014, 0x0000 },
1736 		{ 0x201b, 0x0002 }, { 0x201d, 0x0002 }, { 0x201f, 0x00fd },
1737 		{ 0x2021, 0x0001 }, { 0x2022, 0x0010 }, { 0x203d, 0x0005 },
1738 		{ 0x203f, 0x0003 }, { 0x2050, 0x002c }, { 0x2076, 0x000e },
1739 		{ 0x207c, 0x004a }, { 0x2081, 0x0003 }, { 0x23ba, 0x008d }
1740 	}}
1741 };
1742 
alc298_samsung_v2_enable_amps(struct hda_codec * codec)1743 static void alc298_samsung_v2_enable_amps(struct hda_codec *codec)
1744 {
1745 	struct alc_spec *spec = codec->spec;
1746 	static const unsigned short enable_seq[][2] = {
1747 		{ 0x203a, 0x0081 }, { 0x23ff, 0x0001 },
1748 	};
1749 	int i, j;
1750 
1751 	for (i = 0; i < spec->num_speaker_amps; i++) {
1752 		alc_write_coef_idx(codec, 0x22, alc298_samsung_v2_amp_desc_tbl[i].nid);
1753 		for (j = 0; j < ARRAY_SIZE(enable_seq); j++)
1754 			alc298_samsung_write_coef_pack(codec, enable_seq[j]);
1755 		codec_dbg(codec, "alc298_samsung_v2: Enabled speaker amp 0x%02x\n",
1756 				alc298_samsung_v2_amp_desc_tbl[i].nid);
1757 	}
1758 }
1759 
alc298_samsung_v2_disable_amps(struct hda_codec * codec)1760 static void alc298_samsung_v2_disable_amps(struct hda_codec *codec)
1761 {
1762 	struct alc_spec *spec = codec->spec;
1763 	static const unsigned short disable_seq[][2] = {
1764 		{ 0x23ff, 0x0000 }, { 0x203a, 0x0080 },
1765 	};
1766 	int i, j;
1767 
1768 	for (i = 0; i < spec->num_speaker_amps; i++) {
1769 		alc_write_coef_idx(codec, 0x22, alc298_samsung_v2_amp_desc_tbl[i].nid);
1770 		for (j = 0; j < ARRAY_SIZE(disable_seq); j++)
1771 			alc298_samsung_write_coef_pack(codec, disable_seq[j]);
1772 		codec_dbg(codec, "alc298_samsung_v2: Disabled speaker amp 0x%02x\n",
1773 				alc298_samsung_v2_amp_desc_tbl[i].nid);
1774 	}
1775 }
1776 
alc298_samsung_v2_playback_hook(struct hda_pcm_stream * hinfo,struct hda_codec * codec,struct snd_pcm_substream * substream,int action)1777 static void alc298_samsung_v2_playback_hook(struct hda_pcm_stream *hinfo,
1778 				struct hda_codec *codec,
1779 				struct snd_pcm_substream *substream,
1780 				int action)
1781 {
1782 	/* Dynamically enable/disable speaker amps before and after playback */
1783 	if (action == HDA_GEN_PCM_ACT_OPEN)
1784 		alc298_samsung_v2_enable_amps(codec);
1785 	if (action == HDA_GEN_PCM_ACT_CLOSE)
1786 		alc298_samsung_v2_disable_amps(codec);
1787 }
1788 
alc298_samsung_v2_init_amps(struct hda_codec * codec,int num_speaker_amps)1789 static void alc298_samsung_v2_init_amps(struct hda_codec *codec,
1790 				int num_speaker_amps)
1791 {
1792 	struct alc_spec *spec = codec->spec;
1793 	int i, j;
1794 
1795 	/* Set spec's num_speaker_amps before doing anything else */
1796 	spec->num_speaker_amps = num_speaker_amps;
1797 
1798 	/* Disable speaker amps before init to prevent any physical damage */
1799 	alc298_samsung_v2_disable_amps(codec);
1800 
1801 	/* Initialize the speaker amps */
1802 	for (i = 0; i < spec->num_speaker_amps; i++) {
1803 		alc_write_coef_idx(codec, 0x22, alc298_samsung_v2_amp_desc_tbl[i].nid);
1804 		for (j = 0; j < alc298_samsung_v2_amp_desc_tbl[i].init_seq_size; j++) {
1805 			alc298_samsung_write_coef_pack(codec,
1806 					alc298_samsung_v2_amp_desc_tbl[i].init_seq[j]);
1807 		}
1808 		alc_write_coef_idx(codec, 0x89, 0x0);
1809 		codec_dbg(codec, "alc298_samsung_v2: Initialized speaker amp 0x%02x\n",
1810 				alc298_samsung_v2_amp_desc_tbl[i].nid);
1811 	}
1812 
1813 	/* register hook to enable speaker amps only when they are needed */
1814 	spec->gen.pcm_playback_hook = alc298_samsung_v2_playback_hook;
1815 }
1816 
alc298_fixup_samsung_amp_v2_2_amps(struct hda_codec * codec,const struct hda_fixup * fix,int action)1817 static void alc298_fixup_samsung_amp_v2_2_amps(struct hda_codec *codec,
1818 				const struct hda_fixup *fix, int action)
1819 {
1820 	if (action == HDA_FIXUP_ACT_PROBE)
1821 		alc298_samsung_v2_init_amps(codec, 2);
1822 }
1823 
alc298_fixup_samsung_amp_v2_4_amps(struct hda_codec * codec,const struct hda_fixup * fix,int action)1824 static void alc298_fixup_samsung_amp_v2_4_amps(struct hda_codec *codec,
1825 				const struct hda_fixup *fix, int action)
1826 {
1827 	if (action == HDA_FIXUP_ACT_PROBE)
1828 		alc298_samsung_v2_init_amps(codec, 4);
1829 }
1830 
gpio2_mic_hotkey_event(struct hda_codec * codec,struct hda_jack_callback * event)1831 static void gpio2_mic_hotkey_event(struct hda_codec *codec,
1832 				   struct hda_jack_callback *event)
1833 {
1834 	struct alc_spec *spec = codec->spec;
1835 
1836 	/* GPIO2 just toggles on a keypress/keyrelease cycle. Therefore
1837 	   send both key on and key off event for every interrupt. */
1838 	input_report_key(spec->kb_dev, spec->alc_mute_keycode_map[ALC_KEY_MICMUTE_INDEX], 1);
1839 	input_sync(spec->kb_dev);
1840 	input_report_key(spec->kb_dev, spec->alc_mute_keycode_map[ALC_KEY_MICMUTE_INDEX], 0);
1841 	input_sync(spec->kb_dev);
1842 }
1843 
alc_register_micmute_input_device(struct hda_codec * codec)1844 static int alc_register_micmute_input_device(struct hda_codec *codec)
1845 {
1846 	struct alc_spec *spec = codec->spec;
1847 	int i;
1848 
1849 	spec->kb_dev = input_allocate_device();
1850 	if (!spec->kb_dev) {
1851 		codec_err(codec, "Out of memory (input_allocate_device)\n");
1852 		return -ENOMEM;
1853 	}
1854 
1855 	spec->alc_mute_keycode_map[ALC_KEY_MICMUTE_INDEX] = KEY_MICMUTE;
1856 
1857 	spec->kb_dev->name = "Microphone Mute Button";
1858 	spec->kb_dev->evbit[0] = BIT_MASK(EV_KEY);
1859 	spec->kb_dev->keycodesize = sizeof(spec->alc_mute_keycode_map[0]);
1860 	spec->kb_dev->keycodemax = ARRAY_SIZE(spec->alc_mute_keycode_map);
1861 	spec->kb_dev->keycode = spec->alc_mute_keycode_map;
1862 	for (i = 0; i < ARRAY_SIZE(spec->alc_mute_keycode_map); i++)
1863 		set_bit(spec->alc_mute_keycode_map[i], spec->kb_dev->keybit);
1864 
1865 	if (input_register_device(spec->kb_dev)) {
1866 		codec_err(codec, "input_register_device failed\n");
1867 		input_free_device(spec->kb_dev);
1868 		spec->kb_dev = NULL;
1869 		return -ENOMEM;
1870 	}
1871 
1872 	return 0;
1873 }
1874 
1875 /* GPIO1 = set according to SKU external amp
1876  * GPIO2 = mic mute hotkey
1877  * GPIO3 = mute LED
1878  * GPIO4 = mic mute LED
1879  */
alc280_fixup_hp_gpio2_mic_hotkey(struct hda_codec * codec,const struct hda_fixup * fix,int action)1880 static void alc280_fixup_hp_gpio2_mic_hotkey(struct hda_codec *codec,
1881 					     const struct hda_fixup *fix, int action)
1882 {
1883 	struct alc_spec *spec = codec->spec;
1884 
1885 	alc_fixup_hp_gpio_led(codec, action, 0x08, 0x10);
1886 	if (action == HDA_FIXUP_ACT_PRE_PROBE) {
1887 		spec->init_amp = ALC_INIT_DEFAULT;
1888 		if (alc_register_micmute_input_device(codec) != 0)
1889 			return;
1890 
1891 		spec->gpio_mask |= 0x06;
1892 		spec->gpio_dir |= 0x02;
1893 		spec->gpio_data |= 0x02;
1894 		snd_hda_codec_write_cache(codec, codec->core.afg, 0,
1895 					  AC_VERB_SET_GPIO_UNSOLICITED_RSP_MASK, 0x04);
1896 		snd_hda_jack_detect_enable_callback(codec, codec->core.afg,
1897 						    gpio2_mic_hotkey_event);
1898 		return;
1899 	}
1900 
1901 	if (!spec->kb_dev)
1902 		return;
1903 
1904 	switch (action) {
1905 	case HDA_FIXUP_ACT_FREE:
1906 		input_unregister_device(spec->kb_dev);
1907 		spec->kb_dev = NULL;
1908 	}
1909 }
1910 
1911 /* Line2 = mic mute hotkey
1912  * GPIO2 = mic mute LED
1913  */
alc233_fixup_lenovo_line2_mic_hotkey(struct hda_codec * codec,const struct hda_fixup * fix,int action)1914 static void alc233_fixup_lenovo_line2_mic_hotkey(struct hda_codec *codec,
1915 					     const struct hda_fixup *fix, int action)
1916 {
1917 	struct alc_spec *spec = codec->spec;
1918 
1919 	alc_fixup_hp_gpio_led(codec, action, 0, 0x04);
1920 	if (action == HDA_FIXUP_ACT_PRE_PROBE) {
1921 		spec->init_amp = ALC_INIT_DEFAULT;
1922 		if (alc_register_micmute_input_device(codec) != 0)
1923 			return;
1924 
1925 		snd_hda_jack_detect_enable_callback(codec, 0x1b,
1926 						    gpio2_mic_hotkey_event);
1927 		return;
1928 	}
1929 
1930 	if (!spec->kb_dev)
1931 		return;
1932 
1933 	switch (action) {
1934 	case HDA_FIXUP_ACT_FREE:
1935 		input_unregister_device(spec->kb_dev);
1936 		spec->kb_dev = NULL;
1937 	}
1938 }
1939 
alc269_fixup_hp_line1_mic1_led(struct hda_codec * codec,const struct hda_fixup * fix,int action)1940 static void alc269_fixup_hp_line1_mic1_led(struct hda_codec *codec,
1941 				const struct hda_fixup *fix, int action)
1942 {
1943 	struct alc_spec *spec = codec->spec;
1944 
1945 	alc269_fixup_hp_mute_led_micx(codec, fix, action, 0x1a);
1946 	if (action == HDA_FIXUP_ACT_PRE_PROBE) {
1947 		spec->cap_mute_led_nid = 0x18;
1948 		snd_hda_gen_add_micmute_led_cdev(codec, vref_micmute_led_set);
1949 	}
1950 }
1951 
alc233_fixup_lenovo_low_en_micmute_led(struct hda_codec * codec,const struct hda_fixup * fix,int action)1952 static void alc233_fixup_lenovo_low_en_micmute_led(struct hda_codec *codec,
1953 				const struct hda_fixup *fix, int action)
1954 {
1955 	struct alc_spec *spec = codec->spec;
1956 
1957 	if (action == HDA_FIXUP_ACT_PRE_PROBE)
1958 		spec->micmute_led_polarity = 1;
1959 	alc233_fixup_lenovo_line2_mic_hotkey(codec, fix, action);
1960 }
1961 
alc255_set_default_jack_type(struct hda_codec * codec)1962 static void alc255_set_default_jack_type(struct hda_codec *codec)
1963 {
1964 	/* Set to iphone type */
1965 	static const struct coef_fw alc255fw[] = {
1966 		WRITE_COEF(0x1b, 0x880b),
1967 		WRITE_COEF(0x45, 0xd089),
1968 		WRITE_COEF(0x1b, 0x080b),
1969 		WRITE_COEF(0x46, 0x0004),
1970 		WRITE_COEF(0x1b, 0x0c0b),
1971 		{}
1972 	};
1973 	static const struct coef_fw alc256fw[] = {
1974 		WRITE_COEF(0x1b, 0x884b),
1975 		WRITE_COEF(0x45, 0xd089),
1976 		WRITE_COEF(0x1b, 0x084b),
1977 		WRITE_COEF(0x46, 0x0004),
1978 		WRITE_COEF(0x1b, 0x0c4b),
1979 		{}
1980 	};
1981 	switch (codec->core.vendor_id) {
1982 	case 0x10ec0255:
1983 		alc_process_coef_fw(codec, alc255fw);
1984 		break;
1985 	case 0x10ec0230:
1986 	case 0x10ec0236:
1987 	case 0x10ec0256:
1988 	case 0x19e58326:
1989 		alc_process_coef_fw(codec, alc256fw);
1990 		break;
1991 	}
1992 	msleep(30);
1993 }
1994 
alc_fixup_headset_mode_alc255(struct hda_codec * codec,const struct hda_fixup * fix,int action)1995 static void alc_fixup_headset_mode_alc255(struct hda_codec *codec,
1996 				const struct hda_fixup *fix, int action)
1997 {
1998 	if (action == HDA_FIXUP_ACT_PRE_PROBE) {
1999 		alc255_set_default_jack_type(codec);
2000 	}
2001 	alc_fixup_headset_mode(codec, fix, action);
2002 }
2003 
alc_fixup_headset_mode_alc255_no_hp_mic(struct hda_codec * codec,const struct hda_fixup * fix,int action)2004 static void alc_fixup_headset_mode_alc255_no_hp_mic(struct hda_codec *codec,
2005 				const struct hda_fixup *fix, int action)
2006 {
2007 	if (action == HDA_FIXUP_ACT_PRE_PROBE) {
2008 		struct alc_spec *spec = codec->spec;
2009 		spec->parse_flags |= HDA_PINCFG_HEADSET_MIC;
2010 		alc255_set_default_jack_type(codec);
2011 	}
2012 	else
2013 		alc_fixup_headset_mode(codec, fix, action);
2014 }
2015 
alc288_update_headset_jack_cb(struct hda_codec * codec,struct hda_jack_callback * jack)2016 static void alc288_update_headset_jack_cb(struct hda_codec *codec,
2017 				       struct hda_jack_callback *jack)
2018 {
2019 	struct alc_spec *spec = codec->spec;
2020 
2021 	alc_update_headset_jack_cb(codec, jack);
2022 	/* Headset Mic enable or disable, only for Dell Dino */
2023 	alc_update_gpio_data(codec, 0x40, spec->gen.hp_jack_present);
2024 }
2025 
alc_fixup_headset_mode_dell_alc288(struct hda_codec * codec,const struct hda_fixup * fix,int action)2026 static void alc_fixup_headset_mode_dell_alc288(struct hda_codec *codec,
2027 				const struct hda_fixup *fix, int action)
2028 {
2029 	alc_fixup_headset_mode(codec, fix, action);
2030 	if (action == HDA_FIXUP_ACT_PROBE) {
2031 		struct alc_spec *spec = codec->spec;
2032 		/* toggled via hp_automute_hook */
2033 		spec->gpio_mask |= 0x40;
2034 		spec->gpio_dir |= 0x40;
2035 		spec->gen.hp_automute_hook = alc288_update_headset_jack_cb;
2036 	}
2037 }
2038 
alc_fixup_no_shutup(struct hda_codec * codec,const struct hda_fixup * fix,int action)2039 static void alc_fixup_no_shutup(struct hda_codec *codec,
2040 				const struct hda_fixup *fix, int action)
2041 {
2042 	if (action == HDA_FIXUP_ACT_PRE_PROBE) {
2043 		struct alc_spec *spec = codec->spec;
2044 		spec->no_shutup_pins = 1;
2045 	}
2046 }
2047 
2048 /* fixup for Thinkpad docks: add dock pins, avoid HP parser fixup */
alc_fixup_tpt440_dock(struct hda_codec * codec,const struct hda_fixup * fix,int action)2049 static void alc_fixup_tpt440_dock(struct hda_codec *codec,
2050 				  const struct hda_fixup *fix, int action)
2051 {
2052 	static const struct hda_pintbl pincfgs[] = {
2053 		{ 0x16, 0x21211010 }, /* dock headphone */
2054 		{ 0x19, 0x21a11010 }, /* dock mic */
2055 		{ }
2056 	};
2057 	struct alc_spec *spec = codec->spec;
2058 
2059 	if (action == HDA_FIXUP_ACT_PRE_PROBE) {
2060 		spec->parse_flags = HDA_PINCFG_NO_HP_FIXUP;
2061 		codec->power_save_node = 0; /* avoid click noises */
2062 		snd_hda_apply_pincfgs(codec, pincfgs);
2063 	}
2064 }
2065 
alc_fixup_tpt470_dock(struct hda_codec * codec,const struct hda_fixup * fix,int action)2066 static void alc_fixup_tpt470_dock(struct hda_codec *codec,
2067 				  const struct hda_fixup *fix, int action)
2068 {
2069 	static const struct hda_pintbl pincfgs[] = {
2070 		{ 0x17, 0x21211010 }, /* dock headphone */
2071 		{ 0x19, 0x21a11010 }, /* dock mic */
2072 		{ }
2073 	};
2074 	struct alc_spec *spec = codec->spec;
2075 
2076 	if (action == HDA_FIXUP_ACT_PRE_PROBE) {
2077 		spec->parse_flags = HDA_PINCFG_NO_HP_FIXUP;
2078 		snd_hda_apply_pincfgs(codec, pincfgs);
2079 	} else if (action == HDA_FIXUP_ACT_INIT) {
2080 		/* Enable DOCK device */
2081 		snd_hda_codec_write(codec, 0x17, 0,
2082 			    AC_VERB_SET_CONFIG_DEFAULT_BYTES_3, 0);
2083 		/* Enable DOCK device */
2084 		snd_hda_codec_write(codec, 0x19, 0,
2085 			    AC_VERB_SET_CONFIG_DEFAULT_BYTES_3, 0);
2086 	}
2087 }
2088 
alc_fixup_tpt470_dacs(struct hda_codec * codec,const struct hda_fixup * fix,int action)2089 static void alc_fixup_tpt470_dacs(struct hda_codec *codec,
2090 				  const struct hda_fixup *fix, int action)
2091 {
2092 	/* Assure the speaker pin to be coupled with DAC NID 0x03; otherwise
2093 	 * the speaker output becomes too low by some reason on Thinkpads with
2094 	 * ALC298 codec
2095 	 */
2096 	static const hda_nid_t preferred_pairs[] = {
2097 		0x14, 0x03, 0x17, 0x02, 0x21, 0x02,
2098 		0
2099 	};
2100 	struct alc_spec *spec = codec->spec;
2101 
2102 	if (action == HDA_FIXUP_ACT_PRE_PROBE)
2103 		spec->gen.preferred_dacs = preferred_pairs;
2104 }
2105 
alc295_fixup_asus_dacs(struct hda_codec * codec,const struct hda_fixup * fix,int action)2106 static void alc295_fixup_asus_dacs(struct hda_codec *codec,
2107 				   const struct hda_fixup *fix, int action)
2108 {
2109 	static const hda_nid_t preferred_pairs[] = {
2110 		0x17, 0x02, 0x21, 0x03, 0
2111 	};
2112 	struct alc_spec *spec = codec->spec;
2113 
2114 	if (action == HDA_FIXUP_ACT_PRE_PROBE)
2115 		spec->gen.preferred_dacs = preferred_pairs;
2116 }
2117 
alc271_hp_gate_mic_jack(struct hda_codec * codec,const struct hda_fixup * fix,int action)2118 static void alc271_hp_gate_mic_jack(struct hda_codec *codec,
2119 				    const struct hda_fixup *fix,
2120 				    int action)
2121 {
2122 	struct alc_spec *spec = codec->spec;
2123 
2124 	if (action == HDA_FIXUP_ACT_PROBE) {
2125 		int mic_pin = alc_find_ext_mic_pin(codec);
2126 		int hp_pin = alc_get_hp_pin(spec);
2127 
2128 		if (snd_BUG_ON(!mic_pin || !hp_pin))
2129 			return;
2130 		snd_hda_jack_set_gating_jack(codec, mic_pin, hp_pin);
2131 	}
2132 }
2133 
alc269_fixup_limit_int_mic_boost(struct hda_codec * codec,const struct hda_fixup * fix,int action)2134 static void alc269_fixup_limit_int_mic_boost(struct hda_codec *codec,
2135 					     const struct hda_fixup *fix,
2136 					     int action)
2137 {
2138 	struct alc_spec *spec = codec->spec;
2139 	struct auto_pin_cfg *cfg = &spec->gen.autocfg;
2140 	int i;
2141 
2142 	/* The mic boosts on level 2 and 3 are too noisy
2143 	   on the internal mic input.
2144 	   Therefore limit the boost to 0 or 1. */
2145 
2146 	if (action != HDA_FIXUP_ACT_PROBE)
2147 		return;
2148 
2149 	for (i = 0; i < cfg->num_inputs; i++) {
2150 		hda_nid_t nid = cfg->inputs[i].pin;
2151 		unsigned int defcfg;
2152 		if (cfg->inputs[i].type != AUTO_PIN_MIC)
2153 			continue;
2154 		defcfg = snd_hda_codec_get_pincfg(codec, nid);
2155 		if (snd_hda_get_input_pin_attr(defcfg) != INPUT_PIN_ATTR_INT)
2156 			continue;
2157 
2158 		snd_hda_override_amp_caps(codec, nid, HDA_INPUT,
2159 					  (0x00 << AC_AMPCAP_OFFSET_SHIFT) |
2160 					  (0x01 << AC_AMPCAP_NUM_STEPS_SHIFT) |
2161 					  (0x2f << AC_AMPCAP_STEP_SIZE_SHIFT) |
2162 					  (0 << AC_AMPCAP_MUTE_SHIFT));
2163 	}
2164 }
2165 
alc283_hp_automute_hook(struct hda_codec * codec,struct hda_jack_callback * jack)2166 static void alc283_hp_automute_hook(struct hda_codec *codec,
2167 				    struct hda_jack_callback *jack)
2168 {
2169 	struct alc_spec *spec = codec->spec;
2170 	int vref;
2171 
2172 	msleep(200);
2173 	snd_hda_gen_hp_automute(codec, jack);
2174 
2175 	vref = spec->gen.hp_jack_present ? PIN_VREF80 : 0;
2176 
2177 	msleep(600);
2178 	snd_hda_codec_write(codec, 0x19, 0, AC_VERB_SET_PIN_WIDGET_CONTROL,
2179 			    vref);
2180 }
2181 
alc283_fixup_chromebook(struct hda_codec * codec,const struct hda_fixup * fix,int action)2182 static void alc283_fixup_chromebook(struct hda_codec *codec,
2183 				    const struct hda_fixup *fix, int action)
2184 {
2185 	struct alc_spec *spec = codec->spec;
2186 
2187 	switch (action) {
2188 	case HDA_FIXUP_ACT_PRE_PROBE:
2189 		snd_hda_override_wcaps(codec, 0x03, 0);
2190 		/* Disable AA-loopback as it causes white noise */
2191 		spec->gen.mixer_nid = 0;
2192 		break;
2193 	case HDA_FIXUP_ACT_INIT:
2194 		/* MIC2-VREF control */
2195 		/* Set to manual mode */
2196 		alc_update_coef_idx(codec, 0x06, 0x000c, 0);
2197 		/* Enable Line1 input control by verb */
2198 		alc_update_coef_idx(codec, 0x1a, 0, 1 << 4);
2199 		break;
2200 	}
2201 }
2202 
alc283_fixup_sense_combo_jack(struct hda_codec * codec,const struct hda_fixup * fix,int action)2203 static void alc283_fixup_sense_combo_jack(struct hda_codec *codec,
2204 				    const struct hda_fixup *fix, int action)
2205 {
2206 	struct alc_spec *spec = codec->spec;
2207 
2208 	switch (action) {
2209 	case HDA_FIXUP_ACT_PRE_PROBE:
2210 		spec->gen.hp_automute_hook = alc283_hp_automute_hook;
2211 		break;
2212 	case HDA_FIXUP_ACT_INIT:
2213 		/* MIC2-VREF control */
2214 		/* Set to manual mode */
2215 		alc_update_coef_idx(codec, 0x06, 0x000c, 0);
2216 		break;
2217 	}
2218 }
2219 
2220 /* mute tablet speaker pin (0x14) via dock plugging in addition */
asus_tx300_automute(struct hda_codec * codec)2221 static void asus_tx300_automute(struct hda_codec *codec)
2222 {
2223 	struct alc_spec *spec = codec->spec;
2224 	snd_hda_gen_update_outputs(codec);
2225 	if (snd_hda_jack_detect(codec, 0x1b))
2226 		spec->gen.mute_bits |= (1ULL << 0x14);
2227 }
2228 
alc282_fixup_asus_tx300(struct hda_codec * codec,const struct hda_fixup * fix,int action)2229 static void alc282_fixup_asus_tx300(struct hda_codec *codec,
2230 				    const struct hda_fixup *fix, int action)
2231 {
2232 	struct alc_spec *spec = codec->spec;
2233 	static const struct hda_pintbl dock_pins[] = {
2234 		{ 0x1b, 0x21114000 }, /* dock speaker pin */
2235 		{}
2236 	};
2237 
2238 	switch (action) {
2239 	case HDA_FIXUP_ACT_PRE_PROBE:
2240 		spec->init_amp = ALC_INIT_DEFAULT;
2241 		/* TX300 needs to set up GPIO2 for the speaker amp */
2242 		alc_setup_gpio(codec, 0x04);
2243 		snd_hda_apply_pincfgs(codec, dock_pins);
2244 		spec->gen.auto_mute_via_amp = 1;
2245 		spec->gen.automute_hook = asus_tx300_automute;
2246 		snd_hda_jack_detect_enable_callback(codec, 0x1b,
2247 						    snd_hda_gen_hp_automute);
2248 		break;
2249 	case HDA_FIXUP_ACT_PROBE:
2250 		spec->init_amp = ALC_INIT_DEFAULT;
2251 		break;
2252 	case HDA_FIXUP_ACT_BUILD:
2253 		/* this is a bit tricky; give more sane names for the main
2254 		 * (tablet) speaker and the dock speaker, respectively
2255 		 */
2256 		rename_ctl(codec, "Speaker Playback Switch",
2257 			   "Dock Speaker Playback Switch");
2258 		rename_ctl(codec, "Bass Speaker Playback Switch",
2259 			   "Speaker Playback Switch");
2260 		break;
2261 	}
2262 }
2263 
alc290_fixup_mono_speakers(struct hda_codec * codec,const struct hda_fixup * fix,int action)2264 static void alc290_fixup_mono_speakers(struct hda_codec *codec,
2265 				       const struct hda_fixup *fix, int action)
2266 {
2267 	if (action == HDA_FIXUP_ACT_PRE_PROBE) {
2268 		/* DAC node 0x03 is giving mono output. We therefore want to
2269 		   make sure 0x14 (front speaker) and 0x15 (headphones) use the
2270 		   stereo DAC, while leaving 0x17 (bass speaker) for node 0x03. */
2271 		static const hda_nid_t conn1[] = { 0x0c };
2272 		snd_hda_override_conn_list(codec, 0x14, ARRAY_SIZE(conn1), conn1);
2273 		snd_hda_override_conn_list(codec, 0x15, ARRAY_SIZE(conn1), conn1);
2274 	}
2275 }
2276 
alc298_fixup_speaker_volume(struct hda_codec * codec,const struct hda_fixup * fix,int action)2277 static void alc298_fixup_speaker_volume(struct hda_codec *codec,
2278 					const struct hda_fixup *fix, int action)
2279 {
2280 	if (action == HDA_FIXUP_ACT_PRE_PROBE) {
2281 		/* The speaker is routed to the Node 0x06 by a mistake, as a result
2282 		   we can't adjust the speaker's volume since this node does not has
2283 		   Amp-out capability. we change the speaker's route to:
2284 		   Node 0x02 (Audio Output) -> Node 0x0c (Audio Mixer) -> Node 0x17 (
2285 		   Pin Complex), since Node 0x02 has Amp-out caps, we can adjust
2286 		   speaker's volume now. */
2287 
2288 		static const hda_nid_t conn1[] = { 0x0c };
2289 		snd_hda_override_conn_list(codec, 0x17, ARRAY_SIZE(conn1), conn1);
2290 	}
2291 }
2292 
2293 /* disable DAC3 (0x06) selection on NID 0x17 as it has no volume amp control */
alc295_fixup_disable_dac3(struct hda_codec * codec,const struct hda_fixup * fix,int action)2294 static void alc295_fixup_disable_dac3(struct hda_codec *codec,
2295 				      const struct hda_fixup *fix, int action)
2296 {
2297 	if (action == HDA_FIXUP_ACT_PRE_PROBE) {
2298 		static const hda_nid_t conn[] = { 0x02, 0x03 };
2299 		snd_hda_override_conn_list(codec, 0x17, ARRAY_SIZE(conn), conn);
2300 	}
2301 }
2302 
2303 /* force NID 0x17 (Bass Speaker) to DAC1 to share it with the main speaker */
alc285_fixup_speaker2_to_dac1(struct hda_codec * codec,const struct hda_fixup * fix,int action)2304 static void alc285_fixup_speaker2_to_dac1(struct hda_codec *codec,
2305 					  const struct hda_fixup *fix, int action)
2306 {
2307 	if (action == HDA_FIXUP_ACT_PRE_PROBE) {
2308 		static const hda_nid_t conn[] = { 0x02 };
2309 		snd_hda_override_conn_list(codec, 0x17, ARRAY_SIZE(conn), conn);
2310 	}
2311 }
2312 
2313 /* disable DAC3 (0x06) selection on NID 0x15 - share Speaker/Bass Speaker DAC 0x03 */
alc294_fixup_bass_speaker_15(struct hda_codec * codec,const struct hda_fixup * fix,int action)2314 static void alc294_fixup_bass_speaker_15(struct hda_codec *codec,
2315 					 const struct hda_fixup *fix, int action)
2316 {
2317 	if (action == HDA_FIXUP_ACT_PRE_PROBE) {
2318 		static const hda_nid_t conn[] = { 0x02, 0x03 };
2319 		snd_hda_override_conn_list(codec, 0x15, ARRAY_SIZE(conn), conn);
2320 		snd_hda_gen_add_micmute_led_cdev(codec, NULL);
2321 	}
2322 }
2323 
2324 /* Hook to update amp GPIO4 for automute */
alc280_hp_gpio4_automute_hook(struct hda_codec * codec,struct hda_jack_callback * jack)2325 static void alc280_hp_gpio4_automute_hook(struct hda_codec *codec,
2326 					  struct hda_jack_callback *jack)
2327 {
2328 	struct alc_spec *spec = codec->spec;
2329 
2330 	snd_hda_gen_hp_automute(codec, jack);
2331 	/* mute_led_polarity is set to 0, so we pass inverted value here */
2332 	alc_update_gpio_led(codec, 0x10, spec->mute_led_polarity,
2333 			    !spec->gen.hp_jack_present);
2334 }
2335 
2336 /* Manage GPIOs for HP EliteBook Folio 9480m.
2337  *
2338  * GPIO4 is the headphone amplifier power control
2339  * GPIO3 is the audio output mute indicator LED
2340  */
2341 
alc280_fixup_hp_9480m(struct hda_codec * codec,const struct hda_fixup * fix,int action)2342 static void alc280_fixup_hp_9480m(struct hda_codec *codec,
2343 				  const struct hda_fixup *fix,
2344 				  int action)
2345 {
2346 	struct alc_spec *spec = codec->spec;
2347 
2348 	alc_fixup_hp_gpio_led(codec, action, 0x08, 0);
2349 	if (action == HDA_FIXUP_ACT_PRE_PROBE) {
2350 		/* amp at GPIO4; toggled via alc280_hp_gpio4_automute_hook() */
2351 		spec->gpio_mask |= 0x10;
2352 		spec->gpio_dir |= 0x10;
2353 		spec->gen.hp_automute_hook = alc280_hp_gpio4_automute_hook;
2354 	}
2355 }
2356 
alc275_fixup_gpio4_off(struct hda_codec * codec,const struct hda_fixup * fix,int action)2357 static void alc275_fixup_gpio4_off(struct hda_codec *codec,
2358 				   const struct hda_fixup *fix,
2359 				   int action)
2360 {
2361 	struct alc_spec *spec = codec->spec;
2362 
2363 	if (action == HDA_FIXUP_ACT_PRE_PROBE) {
2364 		spec->gpio_mask |= 0x04;
2365 		spec->gpio_dir |= 0x04;
2366 		/* set data bit low */
2367 	}
2368 }
2369 
2370 /* Quirk for Thinkpad X1 7th and 8th Gen
2371  * The following fixed routing needed
2372  * DAC1 (NID 0x02) -> Speaker (NID 0x14); some eq applied secretly
2373  * DAC2 (NID 0x03) -> Bass (NID 0x17) & Headphone (NID 0x21); sharing a DAC
2374  * DAC3 (NID 0x06) -> Unused, due to the lack of volume amp
2375  */
alc285_fixup_thinkpad_x1_gen7(struct hda_codec * codec,const struct hda_fixup * fix,int action)2376 static void alc285_fixup_thinkpad_x1_gen7(struct hda_codec *codec,
2377 					  const struct hda_fixup *fix, int action)
2378 {
2379 	static const hda_nid_t conn[] = { 0x02, 0x03 }; /* exclude 0x06 */
2380 	static const hda_nid_t preferred_pairs[] = {
2381 		0x14, 0x02, 0x17, 0x03, 0x21, 0x03, 0
2382 	};
2383 	struct alc_spec *spec = codec->spec;
2384 
2385 	switch (action) {
2386 	case HDA_FIXUP_ACT_PRE_PROBE:
2387 		snd_hda_override_conn_list(codec, 0x17, ARRAY_SIZE(conn), conn);
2388 		spec->gen.preferred_dacs = preferred_pairs;
2389 		break;
2390 	case HDA_FIXUP_ACT_BUILD:
2391 		/* The generic parser creates somewhat unintuitive volume ctls
2392 		 * with the fixed routing above, and the shared DAC2 may be
2393 		 * confusing for PA.
2394 		 * Rename those to unique names so that PA doesn't touch them
2395 		 * and use only Master volume.
2396 		 */
2397 		rename_ctl(codec, "Front Playback Volume", "DAC1 Playback Volume");
2398 		rename_ctl(codec, "Bass Speaker Playback Volume", "DAC2 Playback Volume");
2399 		break;
2400 	}
2401 }
2402 
alc225_fixup_s3_pop_noise(struct hda_codec * codec,const struct hda_fixup * fix,int action)2403 static void alc225_fixup_s3_pop_noise(struct hda_codec *codec,
2404 				      const struct hda_fixup *fix, int action)
2405 {
2406 	if (action != HDA_FIXUP_ACT_PRE_PROBE)
2407 		return;
2408 
2409 	codec->power_save_node = 1;
2410 }
2411 
2412 /* Forcibly assign NID 0x03 to HP/LO while NID 0x02 to SPK for EQ */
alc274_fixup_bind_dacs(struct hda_codec * codec,const struct hda_fixup * fix,int action)2413 static void alc274_fixup_bind_dacs(struct hda_codec *codec,
2414 				    const struct hda_fixup *fix, int action)
2415 {
2416 	struct alc_spec *spec = codec->spec;
2417 	static const hda_nid_t preferred_pairs[] = {
2418 		0x21, 0x03, 0x1b, 0x03, 0x16, 0x02,
2419 		0
2420 	};
2421 
2422 	if (action != HDA_FIXUP_ACT_PRE_PROBE)
2423 		return;
2424 
2425 	spec->gen.preferred_dacs = preferred_pairs;
2426 	spec->gen.auto_mute_via_amp = 1;
2427 	codec->power_save_node = 0;
2428 }
2429 
2430 /* avoid DAC 0x06 for speaker switch 0x17; it has no volume control */
alc274_fixup_hp_aio_bind_dacs(struct hda_codec * codec,const struct hda_fixup * fix,int action)2431 static void alc274_fixup_hp_aio_bind_dacs(struct hda_codec *codec,
2432 				    const struct hda_fixup *fix, int action)
2433 {
2434 	static const hda_nid_t conn[] = { 0x02, 0x03 }; /* exclude 0x06 */
2435 	/* The speaker is routed to the Node 0x06 by a mistake, thus the
2436 	 * speaker's volume can't be adjusted since the node doesn't have
2437 	 * Amp-out capability. Assure the speaker and lineout pin to be
2438 	 * coupled with DAC NID 0x02.
2439 	 */
2440 	static const hda_nid_t preferred_pairs[] = {
2441 		0x16, 0x02, 0x17, 0x02, 0x21, 0x03, 0
2442 	};
2443 	struct alc_spec *spec = codec->spec;
2444 
2445 	snd_hda_override_conn_list(codec, 0x17, ARRAY_SIZE(conn), conn);
2446 	spec->gen.preferred_dacs = preferred_pairs;
2447 }
2448 
2449 /* avoid DAC 0x06 for bass speaker 0x17; it has no volume control */
alc289_fixup_asus_ga401(struct hda_codec * codec,const struct hda_fixup * fix,int action)2450 static void alc289_fixup_asus_ga401(struct hda_codec *codec,
2451 				    const struct hda_fixup *fix, int action)
2452 {
2453 	static const hda_nid_t preferred_pairs[] = {
2454 		0x14, 0x02, 0x17, 0x02, 0x21, 0x03, 0
2455 	};
2456 	struct alc_spec *spec = codec->spec;
2457 
2458 	if (action == HDA_FIXUP_ACT_PRE_PROBE)
2459 		spec->gen.preferred_dacs = preferred_pairs;
2460 }
2461 
2462 /* The DAC of NID 0x3 will introduce click/pop noise on headphones, so invalidate it */
alc285_fixup_invalidate_dacs(struct hda_codec * codec,const struct hda_fixup * fix,int action)2463 static void alc285_fixup_invalidate_dacs(struct hda_codec *codec,
2464 			      const struct hda_fixup *fix, int action)
2465 {
2466 	if (action != HDA_FIXUP_ACT_PRE_PROBE)
2467 		return;
2468 
2469 	snd_hda_override_wcaps(codec, 0x03, 0);
2470 }
2471 
alc_combo_jack_hp_jd_restart(struct hda_codec * codec)2472 static void alc_combo_jack_hp_jd_restart(struct hda_codec *codec)
2473 {
2474 	switch (codec->core.vendor_id) {
2475 	case 0x10ec0274:
2476 	case 0x10ec0294:
2477 	case 0x10ec0225:
2478 	case 0x10ec0295:
2479 	case 0x10ec0299:
2480 		alc_update_coef_idx(codec, 0x4a, 0x8000, 1 << 15); /* Reset HP JD */
2481 		alc_update_coef_idx(codec, 0x4a, 0x8000, 0 << 15);
2482 		break;
2483 	case 0x10ec0230:
2484 	case 0x10ec0235:
2485 	case 0x10ec0236:
2486 	case 0x10ec0255:
2487 	case 0x10ec0256:
2488 	case 0x10ec0257:
2489 	case 0x19e58326:
2490 		alc_update_coef_idx(codec, 0x1b, 0x8000, 1 << 15); /* Reset HP JD */
2491 		alc_update_coef_idx(codec, 0x1b, 0x8000, 0 << 15);
2492 		break;
2493 	}
2494 }
2495 
alc295_fixup_chromebook(struct hda_codec * codec,const struct hda_fixup * fix,int action)2496 static void alc295_fixup_chromebook(struct hda_codec *codec,
2497 				    const struct hda_fixup *fix, int action)
2498 {
2499 	struct alc_spec *spec = codec->spec;
2500 
2501 	switch (action) {
2502 	case HDA_FIXUP_ACT_PRE_PROBE:
2503 		spec->ultra_low_power = true;
2504 		break;
2505 	case HDA_FIXUP_ACT_INIT:
2506 		alc_combo_jack_hp_jd_restart(codec);
2507 		break;
2508 	}
2509 }
2510 
alc256_fixup_chromebook(struct hda_codec * codec,const struct hda_fixup * fix,int action)2511 static void alc256_fixup_chromebook(struct hda_codec *codec,
2512 				    const struct hda_fixup *fix, int action)
2513 {
2514 	struct alc_spec *spec = codec->spec;
2515 
2516 	switch (action) {
2517 	case HDA_FIXUP_ACT_PRE_PROBE:
2518 		if (codec->core.subsystem_id == 0x10280d76)
2519 			spec->gen.suppress_auto_mute = 0;
2520 		else
2521 			spec->gen.suppress_auto_mute = 1;
2522 		spec->gen.suppress_auto_mic = 1;
2523 		spec->en_3kpull_low = false;
2524 		break;
2525 	}
2526 }
2527 
alc_fixup_disable_mic_vref(struct hda_codec * codec,const struct hda_fixup * fix,int action)2528 static void alc_fixup_disable_mic_vref(struct hda_codec *codec,
2529 				  const struct hda_fixup *fix, int action)
2530 {
2531 	if (action == HDA_FIXUP_ACT_PRE_PROBE)
2532 		snd_hda_codec_set_pin_target(codec, 0x19, PIN_VREFHIZ);
2533 }
2534 
2535 
alc294_gx502_toggle_output(struct hda_codec * codec,struct hda_jack_callback * cb)2536 static void alc294_gx502_toggle_output(struct hda_codec *codec,
2537 					struct hda_jack_callback *cb)
2538 {
2539 	/* The Windows driver sets the codec up in a very different way where
2540 	 * it appears to leave 0x10 = 0x8a20 set. For Linux we need to toggle it
2541 	 */
2542 	if (snd_hda_jack_detect_state(codec, 0x21) == HDA_JACK_PRESENT)
2543 		alc_write_coef_idx(codec, 0x10, 0x8a20);
2544 	else
2545 		alc_write_coef_idx(codec, 0x10, 0x0a20);
2546 }
2547 
alc294_fixup_gx502_hp(struct hda_codec * codec,const struct hda_fixup * fix,int action)2548 static void alc294_fixup_gx502_hp(struct hda_codec *codec,
2549 					const struct hda_fixup *fix, int action)
2550 {
2551 	/* Pin 0x21: headphones/headset mic */
2552 	if (!is_jack_detectable(codec, 0x21))
2553 		return;
2554 
2555 	switch (action) {
2556 	case HDA_FIXUP_ACT_PRE_PROBE:
2557 		snd_hda_jack_detect_enable_callback(codec, 0x21,
2558 				alc294_gx502_toggle_output);
2559 		break;
2560 	case HDA_FIXUP_ACT_INIT:
2561 		/* Make sure to start in a correct state, i.e. if
2562 		 * headphones have been plugged in before powering up the system
2563 		 */
2564 		alc294_gx502_toggle_output(codec, NULL);
2565 		break;
2566 	}
2567 }
2568 
alc294_gu502_toggle_output(struct hda_codec * codec,struct hda_jack_callback * cb)2569 static void alc294_gu502_toggle_output(struct hda_codec *codec,
2570 				       struct hda_jack_callback *cb)
2571 {
2572 	/* Windows sets 0x10 to 0x8420 for Node 0x20 which is
2573 	 * responsible from changes between speakers and headphones
2574 	 */
2575 	if (snd_hda_jack_detect_state(codec, 0x21) == HDA_JACK_PRESENT)
2576 		alc_write_coef_idx(codec, 0x10, 0x8420);
2577 	else
2578 		alc_write_coef_idx(codec, 0x10, 0x0a20);
2579 }
2580 
alc294_fixup_gu502_hp(struct hda_codec * codec,const struct hda_fixup * fix,int action)2581 static void alc294_fixup_gu502_hp(struct hda_codec *codec,
2582 				  const struct hda_fixup *fix, int action)
2583 {
2584 	if (!is_jack_detectable(codec, 0x21))
2585 		return;
2586 
2587 	switch (action) {
2588 	case HDA_FIXUP_ACT_PRE_PROBE:
2589 		snd_hda_jack_detect_enable_callback(codec, 0x21,
2590 				alc294_gu502_toggle_output);
2591 		break;
2592 	case HDA_FIXUP_ACT_INIT:
2593 		alc294_gu502_toggle_output(codec, NULL);
2594 		break;
2595 	}
2596 }
2597 
alc285_fixup_hp_gpio_amp_init(struct hda_codec * codec,const struct hda_fixup * fix,int action)2598 static void  alc285_fixup_hp_gpio_amp_init(struct hda_codec *codec,
2599 			      const struct hda_fixup *fix, int action)
2600 {
2601 	if (action != HDA_FIXUP_ACT_INIT)
2602 		return;
2603 
2604 	msleep(100);
2605 	alc_write_coef_idx(codec, 0x65, 0x0);
2606 }
2607 
alc274_fixup_hp_headset_mic(struct hda_codec * codec,const struct hda_fixup * fix,int action)2608 static void alc274_fixup_hp_headset_mic(struct hda_codec *codec,
2609 				    const struct hda_fixup *fix, int action)
2610 {
2611 	switch (action) {
2612 	case HDA_FIXUP_ACT_INIT:
2613 		alc_combo_jack_hp_jd_restart(codec);
2614 		break;
2615 	}
2616 }
2617 
alc_fixup_no_int_mic(struct hda_codec * codec,const struct hda_fixup * fix,int action)2618 static void alc_fixup_no_int_mic(struct hda_codec *codec,
2619 				    const struct hda_fixup *fix, int action)
2620 {
2621 	struct alc_spec *spec = codec->spec;
2622 
2623 	switch (action) {
2624 	case HDA_FIXUP_ACT_PRE_PROBE:
2625 		/* Mic RING SLEEVE swap for combo jack */
2626 		alc_update_coef_idx(codec, 0x45, 0xf<<12 | 1<<10, 5<<12);
2627 		spec->no_internal_mic_pin = true;
2628 		break;
2629 	case HDA_FIXUP_ACT_INIT:
2630 		alc_combo_jack_hp_jd_restart(codec);
2631 		break;
2632 	}
2633 }
2634 
2635 /* GPIO1 = amplifier on/off
2636  * GPIO3 = mic mute LED
2637  */
alc285_fixup_hp_spectre_x360_eb1(struct hda_codec * codec,const struct hda_fixup * fix,int action)2638 static void alc285_fixup_hp_spectre_x360_eb1(struct hda_codec *codec,
2639 					  const struct hda_fixup *fix, int action)
2640 {
2641 	static const hda_nid_t conn[] = { 0x02 };
2642 
2643 	struct alc_spec *spec = codec->spec;
2644 	static const struct hda_pintbl pincfgs[] = {
2645 		{ 0x14, 0x90170110 },  /* front/high speakers */
2646 		{ 0x17, 0x90170130 },  /* back/bass speakers */
2647 		{ }
2648 	};
2649 
2650 	//enable micmute led
2651 	alc_fixup_hp_gpio_led(codec, action, 0x00, 0x04);
2652 
2653 	switch (action) {
2654 	case HDA_FIXUP_ACT_PRE_PROBE:
2655 		spec->micmute_led_polarity = 1;
2656 		/* needed for amp of back speakers */
2657 		spec->gpio_mask |= 0x01;
2658 		spec->gpio_dir |= 0x01;
2659 		snd_hda_apply_pincfgs(codec, pincfgs);
2660 		/* share DAC to have unified volume control */
2661 		snd_hda_override_conn_list(codec, 0x14, ARRAY_SIZE(conn), conn);
2662 		snd_hda_override_conn_list(codec, 0x17, ARRAY_SIZE(conn), conn);
2663 		break;
2664 	case HDA_FIXUP_ACT_INIT:
2665 		/* need to toggle GPIO to enable the amp of back speakers */
2666 		alc_update_gpio_data(codec, 0x01, true);
2667 		msleep(100);
2668 		alc_update_gpio_data(codec, 0x01, false);
2669 		break;
2670 	}
2671 }
2672 
2673 /* GPIO1 = amplifier on/off */
alc285_fixup_hp_spectre_x360_df1(struct hda_codec * codec,const struct hda_fixup * fix,int action)2674 static void alc285_fixup_hp_spectre_x360_df1(struct hda_codec *codec,
2675 					     const struct hda_fixup *fix,
2676 					     int action)
2677 {
2678 	struct alc_spec *spec = codec->spec;
2679 	static const hda_nid_t conn[] = { 0x02 };
2680 	static const struct hda_pintbl pincfgs[] = {
2681 		{ 0x14, 0x90170110 },  /* front/high speakers */
2682 		{ 0x17, 0x90170130 },  /* back/bass speakers */
2683 		{ }
2684 	};
2685 
2686 	// enable mute led
2687 	alc285_fixup_hp_mute_led_coefbit(codec, fix, action);
2688 
2689 	switch (action) {
2690 	case HDA_FIXUP_ACT_PRE_PROBE:
2691 		/* needed for amp of back speakers */
2692 		spec->gpio_mask |= 0x01;
2693 		spec->gpio_dir |= 0x01;
2694 		snd_hda_apply_pincfgs(codec, pincfgs);
2695 		/* share DAC to have unified volume control */
2696 		snd_hda_override_conn_list(codec, 0x14, ARRAY_SIZE(conn), conn);
2697 		snd_hda_override_conn_list(codec, 0x17, ARRAY_SIZE(conn), conn);
2698 		break;
2699 	case HDA_FIXUP_ACT_INIT:
2700 		/* need to toggle GPIO to enable the amp of back speakers */
2701 		alc_update_gpio_data(codec, 0x01, true);
2702 		msleep(100);
2703 		alc_update_gpio_data(codec, 0x01, false);
2704 		break;
2705 	}
2706 }
2707 
alc285_fixup_hp_spectre_x360(struct hda_codec * codec,const struct hda_fixup * fix,int action)2708 static void alc285_fixup_hp_spectre_x360(struct hda_codec *codec,
2709 					  const struct hda_fixup *fix, int action)
2710 {
2711 	static const hda_nid_t conn[] = { 0x02 };
2712 	static const struct hda_pintbl pincfgs[] = {
2713 		{ 0x14, 0x90170110 },  /* rear speaker */
2714 		{ }
2715 	};
2716 
2717 	switch (action) {
2718 	case HDA_FIXUP_ACT_PRE_PROBE:
2719 		snd_hda_apply_pincfgs(codec, pincfgs);
2720 		/* force front speaker to DAC1 */
2721 		snd_hda_override_conn_list(codec, 0x17, ARRAY_SIZE(conn), conn);
2722 		break;
2723 	}
2724 }
2725 
alc285_fixup_hp_envy_x360(struct hda_codec * codec,const struct hda_fixup * fix,int action)2726 static void alc285_fixup_hp_envy_x360(struct hda_codec *codec,
2727 				      const struct hda_fixup *fix,
2728 				      int action)
2729 {
2730 	static const struct coef_fw coefs[] = {
2731 		WRITE_COEF(0x08, 0x6a0c), WRITE_COEF(0x0d, 0xa023),
2732 		WRITE_COEF(0x10, 0x0320), WRITE_COEF(0x1a, 0x8c03),
2733 		WRITE_COEF(0x25, 0x1800), WRITE_COEF(0x26, 0x003a),
2734 		WRITE_COEF(0x28, 0x1dfe), WRITE_COEF(0x29, 0xb014),
2735 		WRITE_COEF(0x2b, 0x1dfe), WRITE_COEF(0x37, 0xfe15),
2736 		WRITE_COEF(0x38, 0x7909), WRITE_COEF(0x45, 0xd489),
2737 		WRITE_COEF(0x46, 0x00f4), WRITE_COEF(0x4a, 0x21e0),
2738 		WRITE_COEF(0x66, 0x03f0), WRITE_COEF(0x67, 0x1000),
2739 		WRITE_COEF(0x6e, 0x1005), { }
2740 	};
2741 
2742 	static const struct hda_pintbl pincfgs[] = {
2743 		{ 0x12, 0xb7a60130 },  /* Internal microphone*/
2744 		{ 0x14, 0x90170150 },  /* B&O soundbar speakers */
2745 		{ 0x17, 0x90170153 },  /* Side speakers */
2746 		{ 0x19, 0x03a11040 },  /* Headset microphone */
2747 		{ }
2748 	};
2749 
2750 	switch (action) {
2751 	case HDA_FIXUP_ACT_PRE_PROBE:
2752 		snd_hda_apply_pincfgs(codec, pincfgs);
2753 
2754 		/* Fixes volume control problem for side speakers */
2755 		alc295_fixup_disable_dac3(codec, fix, action);
2756 
2757 		/* Fixes no sound from headset speaker */
2758 		snd_hda_codec_amp_stereo(codec, 0x21, HDA_OUTPUT, 0, -1, 0);
2759 
2760 		/* Auto-enable headset mic when plugged */
2761 		snd_hda_jack_set_gating_jack(codec, 0x19, 0x21);
2762 
2763 		/* Headset mic volume enhancement */
2764 		snd_hda_codec_set_pin_target(codec, 0x19, PIN_VREF50);
2765 		break;
2766 	case HDA_FIXUP_ACT_INIT:
2767 		alc_process_coef_fw(codec, coefs);
2768 		break;
2769 	case HDA_FIXUP_ACT_BUILD:
2770 		rename_ctl(codec, "Bass Speaker Playback Volume",
2771 			   "B&O-Tuned Playback Volume");
2772 		rename_ctl(codec, "Front Playback Switch",
2773 			   "B&O Soundbar Playback Switch");
2774 		rename_ctl(codec, "Bass Speaker Playback Switch",
2775 			   "Side Speaker Playback Switch");
2776 		break;
2777 	}
2778 }
2779 
alc285_fixup_hp_beep(struct hda_codec * codec,const struct hda_fixup * fix,int action)2780 static void alc285_fixup_hp_beep(struct hda_codec *codec,
2781 				 const struct hda_fixup *fix, int action)
2782 {
2783 	if (action == HDA_FIXUP_ACT_PRE_PROBE) {
2784 		codec->beep_just_power_on = true;
2785 	} else  if (action == HDA_FIXUP_ACT_INIT) {
2786 #ifdef CONFIG_SND_HDA_INPUT_BEEP
2787 		/*
2788 		 * Just enable loopback to internal speaker and headphone jack.
2789 		 * Disable amplification to get about the same beep volume as
2790 		 * was on pure BIOS setup before loading the driver.
2791 		 */
2792 		alc_update_coef_idx(codec, 0x36, 0x7070, BIT(13));
2793 
2794 		snd_hda_enable_beep_device(codec, 1);
2795 
2796 #if !IS_ENABLED(CONFIG_INPUT_PCSPKR)
2797 		dev_warn_once(hda_codec_dev(codec),
2798 			      "enable CONFIG_INPUT_PCSPKR to get PC beeps\n");
2799 #endif
2800 #endif
2801 	}
2802 }
2803 
2804 /* for hda_fixup_thinkpad_acpi() */
2805 #include "../helpers/thinkpad.c"
2806 
alc_fixup_thinkpad_acpi(struct hda_codec * codec,const struct hda_fixup * fix,int action)2807 static void alc_fixup_thinkpad_acpi(struct hda_codec *codec,
2808 				    const struct hda_fixup *fix, int action)
2809 {
2810 	alc_fixup_no_shutup(codec, fix, action); /* reduce click noise */
2811 	hda_fixup_thinkpad_acpi(codec, fix, action);
2812 }
2813 
2814 /* for hda_fixup_ideapad_acpi() */
2815 #include "../helpers/ideapad_hotkey_led.c"
2816 
alc_fixup_ideapad_acpi(struct hda_codec * codec,const struct hda_fixup * fix,int action)2817 static void alc_fixup_ideapad_acpi(struct hda_codec *codec,
2818 				   const struct hda_fixup *fix, int action)
2819 {
2820 	hda_fixup_ideapad_acpi(codec, fix, action);
2821 }
2822 
2823 /* Fixup for Lenovo Legion 15IMHg05 speaker output on headset removal. */
alc287_fixup_legion_15imhg05_speakers(struct hda_codec * codec,const struct hda_fixup * fix,int action)2824 static void alc287_fixup_legion_15imhg05_speakers(struct hda_codec *codec,
2825 						  const struct hda_fixup *fix,
2826 						  int action)
2827 {
2828 	struct alc_spec *spec = codec->spec;
2829 
2830 	switch (action) {
2831 	case HDA_FIXUP_ACT_PRE_PROBE:
2832 		spec->gen.suppress_auto_mute = 1;
2833 		break;
2834 	}
2835 }
2836 
comp_acpi_device_notify(acpi_handle handle,u32 event,void * data)2837 static void comp_acpi_device_notify(acpi_handle handle, u32 event, void *data)
2838 {
2839 	struct hda_codec *cdc = data;
2840 	struct alc_spec *spec = cdc->spec;
2841 
2842 	codec_info(cdc, "ACPI Notification %d\n", event);
2843 
2844 	hda_component_acpi_device_notify(&spec->comps, handle, event, data);
2845 }
2846 
comp_bind(struct device * dev)2847 static int comp_bind(struct device *dev)
2848 {
2849 	struct hda_codec *cdc = dev_to_hda_codec(dev);
2850 	struct alc_spec *spec = cdc->spec;
2851 	int ret;
2852 
2853 	ret = hda_component_manager_bind(cdc, &spec->comps);
2854 	if (ret)
2855 		return ret;
2856 
2857 	return hda_component_manager_bind_acpi_notifications(cdc,
2858 							     &spec->comps,
2859 							     comp_acpi_device_notify, cdc);
2860 }
2861 
comp_unbind(struct device * dev)2862 static void comp_unbind(struct device *dev)
2863 {
2864 	struct hda_codec *cdc = dev_to_hda_codec(dev);
2865 	struct alc_spec *spec = cdc->spec;
2866 
2867 	hda_component_manager_unbind_acpi_notifications(cdc, &spec->comps, comp_acpi_device_notify);
2868 	hda_component_manager_unbind(cdc, &spec->comps);
2869 }
2870 
2871 static const struct component_master_ops comp_master_ops = {
2872 	.bind = comp_bind,
2873 	.unbind = comp_unbind,
2874 };
2875 
comp_generic_playback_hook(struct hda_pcm_stream * hinfo,struct hda_codec * cdc,struct snd_pcm_substream * sub,int action)2876 static void comp_generic_playback_hook(struct hda_pcm_stream *hinfo, struct hda_codec *cdc,
2877 				       struct snd_pcm_substream *sub, int action)
2878 {
2879 	struct alc_spec *spec = cdc->spec;
2880 
2881 	hda_component_manager_playback_hook(&spec->comps, action);
2882 }
2883 
comp_generic_fixup(struct hda_codec * cdc,int action,const char * bus,const char * hid,const char * match_str,int count)2884 static void comp_generic_fixup(struct hda_codec *cdc, int action, const char *bus,
2885 			       const char *hid, const char *match_str, int count)
2886 {
2887 	struct alc_spec *spec = cdc->spec;
2888 	int ret;
2889 
2890 	switch (action) {
2891 	case HDA_FIXUP_ACT_PRE_PROBE:
2892 		ret = hda_component_manager_init(cdc, &spec->comps, count, bus, hid,
2893 						 match_str, &comp_master_ops);
2894 		if (ret)
2895 			return;
2896 
2897 		spec->gen.pcm_playback_hook = comp_generic_playback_hook;
2898 		break;
2899 	case HDA_FIXUP_ACT_FREE:
2900 		hda_component_manager_free(&spec->comps, &comp_master_ops);
2901 		break;
2902 	}
2903 }
2904 
find_cirrus_companion_amps(struct hda_codec * cdc)2905 static void find_cirrus_companion_amps(struct hda_codec *cdc)
2906 {
2907 	struct device *dev = hda_codec_dev(cdc);
2908 	struct acpi_device *adev;
2909 	struct fwnode_handle *fwnode __free(fwnode_handle) = NULL;
2910 	const char *bus = NULL;
2911 	static const struct {
2912 		const char *hid;
2913 		const char *name;
2914 	} acpi_ids[] = {{ "CSC3554", "cs35l54-hda" },
2915 			{ "CSC3556", "cs35l56-hda" },
2916 			{ "CSC3557", "cs35l57-hda" }};
2917 	char *match;
2918 	int i, count = 0, count_devindex = 0;
2919 
2920 	for (i = 0; i < ARRAY_SIZE(acpi_ids); ++i) {
2921 		adev = acpi_dev_get_first_match_dev(acpi_ids[i].hid, NULL, -1);
2922 		if (adev)
2923 			break;
2924 	}
2925 	if (!adev) {
2926 		codec_dbg(cdc, "Did not find ACPI entry for a Cirrus Amp\n");
2927 		return;
2928 	}
2929 
2930 	count = i2c_acpi_client_count(adev);
2931 	if (count > 0) {
2932 		bus = "i2c";
2933 	} else {
2934 		count = acpi_spi_count_resources(adev);
2935 		if (count > 0)
2936 			bus = "spi";
2937 	}
2938 
2939 	fwnode = fwnode_handle_get(acpi_fwnode_handle(adev));
2940 	acpi_dev_put(adev);
2941 
2942 	if (!bus) {
2943 		codec_err(cdc, "Did not find any buses for %s\n", acpi_ids[i].hid);
2944 		return;
2945 	}
2946 
2947 	if (!fwnode) {
2948 		codec_err(cdc, "Could not get fwnode for %s\n", acpi_ids[i].hid);
2949 		return;
2950 	}
2951 
2952 	/*
2953 	 * When available the cirrus,dev-index property is an accurate
2954 	 * count of the amps in a system and is used in preference to
2955 	 * the count of bus devices that can contain additional address
2956 	 * alias entries.
2957 	 */
2958 	count_devindex = fwnode_property_count_u32(fwnode, "cirrus,dev-index");
2959 	if (count_devindex > 0)
2960 		count = count_devindex;
2961 
2962 	match = devm_kasprintf(dev, GFP_KERNEL, "-%%s:00-%s.%%d", acpi_ids[i].name);
2963 	if (!match)
2964 		return;
2965 	codec_info(cdc, "Found %d %s on %s (%s)\n", count, acpi_ids[i].hid, bus, match);
2966 	comp_generic_fixup(cdc, HDA_FIXUP_ACT_PRE_PROBE, bus, acpi_ids[i].hid, match, count);
2967 }
2968 
cs35l41_fixup_i2c_two(struct hda_codec * cdc,const struct hda_fixup * fix,int action)2969 static void cs35l41_fixup_i2c_two(struct hda_codec *cdc, const struct hda_fixup *fix, int action)
2970 {
2971 	comp_generic_fixup(cdc, action, "i2c", "CSC3551", "-%s:00-cs35l41-hda.%d", 2);
2972 }
2973 
cs35l41_fixup_i2c_four(struct hda_codec * cdc,const struct hda_fixup * fix,int action)2974 static void cs35l41_fixup_i2c_four(struct hda_codec *cdc, const struct hda_fixup *fix, int action)
2975 {
2976 	comp_generic_fixup(cdc, action, "i2c", "CSC3551", "-%s:00-cs35l41-hda.%d", 4);
2977 }
2978 
cs35l41_fixup_spi_two(struct hda_codec * codec,const struct hda_fixup * fix,int action)2979 static void cs35l41_fixup_spi_two(struct hda_codec *codec, const struct hda_fixup *fix, int action)
2980 {
2981 	comp_generic_fixup(codec, action, "spi", "CSC3551", "-%s:00-cs35l41-hda.%d", 2);
2982 }
2983 
cs35l41_fixup_spi_one(struct hda_codec * codec,const struct hda_fixup * fix,int action)2984 static void cs35l41_fixup_spi_one(struct hda_codec *codec, const struct hda_fixup *fix, int action)
2985 {
2986 	comp_generic_fixup(codec, action, "spi", "CSC3551", "-%s:00-cs35l41-hda.%d", 1);
2987 }
2988 
cs35l41_fixup_spi_four(struct hda_codec * codec,const struct hda_fixup * fix,int action)2989 static void cs35l41_fixup_spi_four(struct hda_codec *codec, const struct hda_fixup *fix, int action)
2990 {
2991 	comp_generic_fixup(codec, action, "spi", "CSC3551", "-%s:00-cs35l41-hda.%d", 4);
2992 }
2993 
alc287_fixup_legion_16achg6_speakers(struct hda_codec * cdc,const struct hda_fixup * fix,int action)2994 static void alc287_fixup_legion_16achg6_speakers(struct hda_codec *cdc, const struct hda_fixup *fix,
2995 						 int action)
2996 {
2997 	comp_generic_fixup(cdc, action, "i2c", "CLSA0100", "-%s:00-cs35l41-hda.%d", 2);
2998 }
2999 
alc287_fixup_legion_16ithg6_speakers(struct hda_codec * cdc,const struct hda_fixup * fix,int action)3000 static void alc287_fixup_legion_16ithg6_speakers(struct hda_codec *cdc, const struct hda_fixup *fix,
3001 						 int action)
3002 {
3003 	comp_generic_fixup(cdc, action, "i2c", "CLSA0101", "-%s:00-cs35l41-hda.%d", 2);
3004 }
3005 
alc285_fixup_asus_ga403u(struct hda_codec * cdc,const struct hda_fixup * fix,int action)3006 static void alc285_fixup_asus_ga403u(struct hda_codec *cdc, const struct hda_fixup *fix, int action)
3007 {
3008 	/*
3009 	 * The same SSID has been re-used in different hardware, they have
3010 	 * different codecs and the newer GA403U has a ALC285.
3011 	 */
3012 	if (cdc->core.vendor_id != 0x10ec0285)
3013 		alc_fixup_inv_dmic(cdc, fix, action);
3014 }
3015 
tas2781_fixup_tias_i2c(struct hda_codec * cdc,const struct hda_fixup * fix,int action)3016 static void tas2781_fixup_tias_i2c(struct hda_codec *cdc,
3017 	const struct hda_fixup *fix, int action)
3018 {
3019 	comp_generic_fixup(cdc, action, "i2c", "TIAS2781", "-%s:00", 1);
3020 }
3021 
tas2781_fixup_spi(struct hda_codec * cdc,const struct hda_fixup * fix,int action)3022 static void tas2781_fixup_spi(struct hda_codec *cdc, const struct hda_fixup *fix, int action)
3023 {
3024 	comp_generic_fixup(cdc, action, "spi", "TXNW2781", "-%s:00-tas2781-hda.%d", 2);
3025 }
3026 
tas2781_fixup_txnw_i2c(struct hda_codec * cdc,const struct hda_fixup * fix,int action)3027 static void tas2781_fixup_txnw_i2c(struct hda_codec *cdc,
3028 	const struct hda_fixup *fix, int action)
3029 {
3030 	comp_generic_fixup(cdc, action, "i2c", "TXNW2781", "-%s:00-tas2781-hda.%d", 1);
3031 }
3032 
yoga7_14arb7_fixup_i2c(struct hda_codec * cdc,const struct hda_fixup * fix,int action)3033 static void yoga7_14arb7_fixup_i2c(struct hda_codec *cdc,
3034 	const struct hda_fixup *fix, int action)
3035 {
3036 	comp_generic_fixup(cdc, action, "i2c", "INT8866", "-%s:00", 1);
3037 }
3038 
alc256_fixup_acer_sfg16_micmute_led(struct hda_codec * codec,const struct hda_fixup * fix,int action)3039 static void alc256_fixup_acer_sfg16_micmute_led(struct hda_codec *codec,
3040 	const struct hda_fixup *fix, int action)
3041 {
3042 	alc_fixup_hp_gpio_led(codec, action, 0, 0x04);
3043 }
3044 
3045 
3046 /* for alc295_fixup_hp_top_speakers */
3047 #include "../helpers/hp_x360.c"
3048 
3049 /* for alc285_fixup_ideapad_s740_coef() */
3050 #include "../helpers/ideapad_s740.c"
3051 
3052 static const struct coef_fw alc256_fixup_set_coef_defaults_coefs[] = {
3053 	WRITE_COEF(0x10, 0x0020), WRITE_COEF(0x24, 0x0000),
3054 	WRITE_COEF(0x26, 0x0000), WRITE_COEF(0x29, 0x3000),
3055 	WRITE_COEF(0x37, 0xfe05), WRITE_COEF(0x45, 0x5089),
3056 	{}
3057 };
3058 
alc256_fixup_set_coef_defaults(struct hda_codec * codec,const struct hda_fixup * fix,int action)3059 static void alc256_fixup_set_coef_defaults(struct hda_codec *codec,
3060 					   const struct hda_fixup *fix,
3061 					   int action)
3062 {
3063 	/*
3064 	 * A certain other OS sets these coeffs to different values. On at least
3065 	 * one TongFang barebone these settings might survive even a cold
3066 	 * reboot. So to restore a clean slate the values are explicitly reset
3067 	 * to default here. Without this, the external microphone is always in a
3068 	 * plugged-in state, while the internal microphone is always in an
3069 	 * unplugged state, breaking the ability to use the internal microphone.
3070 	 */
3071 	alc_process_coef_fw(codec, alc256_fixup_set_coef_defaults_coefs);
3072 }
3073 
3074 static const struct coef_fw alc233_fixup_no_audio_jack_coefs[] = {
3075 	WRITE_COEF(0x1a, 0x9003), WRITE_COEF(0x1b, 0x0e2b), WRITE_COEF(0x37, 0xfe06),
3076 	WRITE_COEF(0x38, 0x4981), WRITE_COEF(0x45, 0xd489), WRITE_COEF(0x46, 0x0074),
3077 	WRITE_COEF(0x49, 0x0149),
3078 	{}
3079 };
3080 
alc233_fixup_no_audio_jack(struct hda_codec * codec,const struct hda_fixup * fix,int action)3081 static void alc233_fixup_no_audio_jack(struct hda_codec *codec,
3082 				       const struct hda_fixup *fix,
3083 				       int action)
3084 {
3085 	/*
3086 	 * The audio jack input and output is not detected on the ASRock NUC Box
3087 	 * 1100 series when cold booting without this fix. Warm rebooting from a
3088 	 * certain other OS makes the audio functional, as COEF settings are
3089 	 * preserved in this case. This fix sets these altered COEF values as
3090 	 * the default.
3091 	 */
3092 	alc_process_coef_fw(codec, alc233_fixup_no_audio_jack_coefs);
3093 }
3094 
alc256_fixup_mic_no_presence_and_resume(struct hda_codec * codec,const struct hda_fixup * fix,int action)3095 static void alc256_fixup_mic_no_presence_and_resume(struct hda_codec *codec,
3096 						    const struct hda_fixup *fix,
3097 						    int action)
3098 {
3099 	/*
3100 	 * The Clevo NJ51CU comes either with the ALC293 or the ALC256 codec,
3101 	 * but uses the 0x8686 subproduct id in both cases. The ALC256 codec
3102 	 * needs an additional quirk for sound working after suspend and resume.
3103 	 */
3104 	if (codec->core.vendor_id == 0x10ec0256) {
3105 		alc_update_coef_idx(codec, 0x10, 1<<9, 0);
3106 		snd_hda_codec_set_pincfg(codec, 0x19, 0x04a11120);
3107 	} else {
3108 		snd_hda_codec_set_pincfg(codec, 0x1a, 0x04a1113c);
3109 	}
3110 }
3111 
alc256_decrease_headphone_amp_val(struct hda_codec * codec,const struct hda_fixup * fix,int action)3112 static void alc256_decrease_headphone_amp_val(struct hda_codec *codec,
3113 					      const struct hda_fixup *fix, int action)
3114 {
3115 	u32 caps;
3116 	u8 nsteps, offs;
3117 
3118 	if (action != HDA_FIXUP_ACT_PRE_PROBE)
3119 		return;
3120 
3121 	caps = query_amp_caps(codec, 0x3, HDA_OUTPUT);
3122 	nsteps = ((caps & AC_AMPCAP_NUM_STEPS) >> AC_AMPCAP_NUM_STEPS_SHIFT) - 10;
3123 	offs = ((caps & AC_AMPCAP_OFFSET) >> AC_AMPCAP_OFFSET_SHIFT) - 10;
3124 	caps &= ~AC_AMPCAP_NUM_STEPS & ~AC_AMPCAP_OFFSET;
3125 	caps |= (nsteps << AC_AMPCAP_NUM_STEPS_SHIFT) | (offs << AC_AMPCAP_OFFSET_SHIFT);
3126 
3127 	if (snd_hda_override_amp_caps(codec, 0x3, HDA_OUTPUT, caps))
3128 		codec_warn(codec, "failed to override amp caps for NID 0x3\n");
3129 }
3130 
alc_fixup_dell4_mic_no_presence_quiet(struct hda_codec * codec,const struct hda_fixup * fix,int action)3131 static void alc_fixup_dell4_mic_no_presence_quiet(struct hda_codec *codec,
3132 						  const struct hda_fixup *fix,
3133 						  int action)
3134 {
3135 	struct alc_spec *spec = codec->spec;
3136 	struct hda_input_mux *imux = &spec->gen.input_mux;
3137 	int i;
3138 
3139 	alc269_fixup_limit_int_mic_boost(codec, fix, action);
3140 
3141 	switch (action) {
3142 	case HDA_FIXUP_ACT_PRE_PROBE:
3143 		/**
3144 		 * Set the vref of pin 0x19 (Headset Mic) and pin 0x1b (Headphone Mic)
3145 		 * to Hi-Z to avoid pop noises at startup and when plugging and
3146 		 * unplugging headphones.
3147 		 */
3148 		snd_hda_codec_set_pin_target(codec, 0x19, PIN_VREFHIZ);
3149 		snd_hda_codec_set_pin_target(codec, 0x1b, PIN_VREFHIZ);
3150 		break;
3151 	case HDA_FIXUP_ACT_PROBE:
3152 		/**
3153 		 * Make the internal mic (0x12) the default input source to
3154 		 * prevent pop noises on cold boot.
3155 		 */
3156 		for (i = 0; i < imux->num_items; i++) {
3157 			if (spec->gen.imux_pins[i] == 0x12) {
3158 				spec->gen.cur_mux[0] = i;
3159 				break;
3160 			}
3161 		}
3162 		break;
3163 	}
3164 }
3165 
alc287_fixup_yoga9_14iap7_bass_spk_pin(struct hda_codec * codec,const struct hda_fixup * fix,int action)3166 static void alc287_fixup_yoga9_14iap7_bass_spk_pin(struct hda_codec *codec,
3167 					  const struct hda_fixup *fix, int action)
3168 {
3169 	/*
3170 	 * The Pin Complex 0x17 for the bass speakers is wrongly reported as
3171 	 * unconnected.
3172 	 */
3173 	static const struct hda_pintbl pincfgs[] = {
3174 		{ 0x17, 0x90170121 },
3175 		{ }
3176 	};
3177 	/*
3178 	 * Avoid DAC 0x06 and 0x08, as they have no volume controls.
3179 	 * DAC 0x02 and 0x03 would be fine.
3180 	 */
3181 	static const hda_nid_t conn[] = { 0x02, 0x03 };
3182 	/*
3183 	 * Prefer both speakerbar (0x14) and bass speakers (0x17) connected to DAC 0x02.
3184 	 * Headphones (0x21) are connected to DAC 0x03.
3185 	 */
3186 	static const hda_nid_t preferred_pairs[] = {
3187 		0x14, 0x02,
3188 		0x17, 0x02,
3189 		0x21, 0x03,
3190 		0
3191 	};
3192 	struct alc_spec *spec = codec->spec;
3193 
3194 	/* Support Audio mute LED and Mic mute LED on keyboard */
3195 	hda_fixup_ideapad_acpi(codec, fix, action);
3196 
3197 	switch (action) {
3198 	case HDA_FIXUP_ACT_PRE_PROBE:
3199 		snd_hda_apply_pincfgs(codec, pincfgs);
3200 		snd_hda_override_conn_list(codec, 0x17, ARRAY_SIZE(conn), conn);
3201 		spec->gen.preferred_dacs = preferred_pairs;
3202 		break;
3203 	}
3204 }
3205 
alc295_fixup_dell_inspiron_top_speakers(struct hda_codec * codec,const struct hda_fixup * fix,int action)3206 static void alc295_fixup_dell_inspiron_top_speakers(struct hda_codec *codec,
3207 					  const struct hda_fixup *fix, int action)
3208 {
3209 	static const struct hda_pintbl pincfgs[] = {
3210 		{ 0x14, 0x90170151 },
3211 		{ 0x17, 0x90170150 },
3212 		{ }
3213 	};
3214 	static const hda_nid_t conn[] = { 0x02, 0x03 };
3215 	static const hda_nid_t preferred_pairs[] = {
3216 		0x14, 0x02,
3217 		0x17, 0x03,
3218 		0x21, 0x02,
3219 		0
3220 	};
3221 	struct alc_spec *spec = codec->spec;
3222 
3223 	alc_fixup_no_shutup(codec, fix, action);
3224 
3225 	switch (action) {
3226 	case HDA_FIXUP_ACT_PRE_PROBE:
3227 		snd_hda_apply_pincfgs(codec, pincfgs);
3228 		snd_hda_override_conn_list(codec, 0x17, ARRAY_SIZE(conn), conn);
3229 		spec->gen.preferred_dacs = preferred_pairs;
3230 		break;
3231 	}
3232 }
3233 
3234 /* Forcibly assign NID 0x03 to HP while NID 0x02 to SPK */
alc287_fixup_bind_dacs(struct hda_codec * codec,const struct hda_fixup * fix,int action)3235 static void alc287_fixup_bind_dacs(struct hda_codec *codec,
3236 				    const struct hda_fixup *fix, int action)
3237 {
3238 	struct alc_spec *spec = codec->spec;
3239 	static const hda_nid_t conn[] = { 0x02, 0x03 }; /* exclude 0x06 */
3240 	static const hda_nid_t preferred_pairs[] = {
3241 		0x17, 0x02, 0x21, 0x03, 0
3242 	};
3243 
3244 	if (action != HDA_FIXUP_ACT_PRE_PROBE)
3245 		return;
3246 
3247 	snd_hda_override_conn_list(codec, 0x17, ARRAY_SIZE(conn), conn);
3248 	spec->gen.preferred_dacs = preferred_pairs;
3249 	spec->gen.auto_mute_via_amp = 1;
3250 	if (spec->gen.autocfg.speaker_pins[0] != 0x14) {
3251 		snd_hda_codec_write_cache(codec, 0x14, 0, AC_VERB_SET_PIN_WIDGET_CONTROL,
3252 					0x0); /* Make sure 0x14 was disable */
3253 	}
3254 }
3255 
3256 /* Fix none verb table of Headset Mic pin */
alc2xx_fixup_headset_mic(struct hda_codec * codec,const struct hda_fixup * fix,int action)3257 static void alc2xx_fixup_headset_mic(struct hda_codec *codec,
3258 				     const struct hda_fixup *fix, int action)
3259 {
3260 	struct alc_spec *spec = codec->spec;
3261 	static const struct hda_pintbl pincfgs[] = {
3262 		{ 0x19, 0x03a1103c },
3263 		{ }
3264 	};
3265 
3266 	switch (action) {
3267 	case HDA_FIXUP_ACT_PRE_PROBE:
3268 		snd_hda_apply_pincfgs(codec, pincfgs);
3269 		alc_update_coef_idx(codec, 0x45, 0xf<<12 | 1<<10, 5<<12);
3270 		spec->parse_flags |= HDA_PINCFG_HEADSET_MIC;
3271 		break;
3272 	}
3273 }
3274 
alc245_fixup_hp_spectre_x360_eu0xxx(struct hda_codec * codec,const struct hda_fixup * fix,int action)3275 static void alc245_fixup_hp_spectre_x360_eu0xxx(struct hda_codec *codec,
3276 					  const struct hda_fixup *fix, int action)
3277 {
3278 	/*
3279 	 * The Pin Complex 0x14 for the treble speakers is wrongly reported as
3280 	 * unconnected.
3281 	 * The Pin Complex 0x17 for the bass speakers has the lowest association
3282 	 * and sequence values so shift it up a bit to squeeze 0x14 in.
3283 	 */
3284 	static const struct hda_pintbl pincfgs[] = {
3285 		{ 0x14, 0x90170110 }, // top/treble
3286 		{ 0x17, 0x90170111 }, // bottom/bass
3287 		{ }
3288 	};
3289 
3290 	/*
3291 	 * Force DAC 0x02 for the bass speakers 0x17.
3292 	 */
3293 	static const hda_nid_t conn[] = { 0x02 };
3294 
3295 	switch (action) {
3296 	case HDA_FIXUP_ACT_PRE_PROBE:
3297 		snd_hda_apply_pincfgs(codec, pincfgs);
3298 		snd_hda_override_conn_list(codec, 0x17, ARRAY_SIZE(conn), conn);
3299 		break;
3300 	}
3301 
3302 	cs35l41_fixup_i2c_two(codec, fix, action);
3303 	alc245_fixup_hp_mute_led_coefbit(codec, fix, action);
3304 	alc245_fixup_hp_gpio_led(codec, fix, action);
3305 }
3306 
3307 /* some changes for Spectre x360 16, 2024 model */
alc245_fixup_hp_spectre_x360_16_aa0xxx(struct hda_codec * codec,const struct hda_fixup * fix,int action)3308 static void alc245_fixup_hp_spectre_x360_16_aa0xxx(struct hda_codec *codec,
3309 					  const struct hda_fixup *fix, int action)
3310 {
3311 	/*
3312 	 * The Pin Complex 0x14 for the treble speakers is wrongly reported as
3313 	 * unconnected.
3314 	 * The Pin Complex 0x17 for the bass speakers has the lowest association
3315 	 * and sequence values so shift it up a bit to squeeze 0x14 in.
3316 	 */
3317 	struct alc_spec *spec = codec->spec;
3318 	static const struct hda_pintbl pincfgs[] = {
3319 		{ 0x14, 0x90170110 }, // top/treble
3320 		{ 0x17, 0x90170111 }, // bottom/bass
3321 		{ }
3322 	};
3323 
3324 	/*
3325 	 * Force DAC 0x02 for the bass speakers 0x17.
3326 	 */
3327 	static const hda_nid_t conn[] = { 0x02 };
3328 
3329 	switch (action) {
3330 	case HDA_FIXUP_ACT_PRE_PROBE:
3331 		/* needed for amp of back speakers */
3332 		spec->gpio_mask |= 0x01;
3333 		spec->gpio_dir |= 0x01;
3334 		snd_hda_apply_pincfgs(codec, pincfgs);
3335 		snd_hda_override_conn_list(codec, 0x17, ARRAY_SIZE(conn), conn);
3336 		break;
3337 	case HDA_FIXUP_ACT_INIT:
3338 		/* need to toggle GPIO to enable the amp of back speakers */
3339 		alc_update_gpio_data(codec, 0x01, true);
3340 		msleep(100);
3341 		alc_update_gpio_data(codec, 0x01, false);
3342 		break;
3343 	}
3344 
3345 	cs35l41_fixup_i2c_two(codec, fix, action);
3346 	alc245_fixup_hp_mute_led_coefbit(codec, fix, action);
3347 	alc245_fixup_hp_gpio_led(codec, fix, action);
3348 }
3349 
alc245_fixup_hp_zbook_firefly_g12a(struct hda_codec * codec,const struct hda_fixup * fix,int action)3350 static void alc245_fixup_hp_zbook_firefly_g12a(struct hda_codec *codec,
3351 					  const struct hda_fixup *fix, int action)
3352 {
3353 	struct alc_spec *spec = codec->spec;
3354 	static const hda_nid_t conn[] = { 0x02 };
3355 
3356 	switch (action) {
3357 	case HDA_FIXUP_ACT_PRE_PROBE:
3358 		spec->gen.auto_mute_via_amp = 1;
3359 		snd_hda_override_conn_list(codec, 0x17, ARRAY_SIZE(conn), conn);
3360 		break;
3361 	}
3362 
3363 	cs35l41_fixup_i2c_two(codec, fix, action);
3364 	alc245_fixup_hp_mute_led_coefbit(codec, fix, action);
3365 	alc285_fixup_hp_coef_micmute_led(codec, fix, action);
3366 }
3367 
3368 /*
3369  * ALC287 PCM hooks
3370  */
alc287_alc1318_playback_pcm_hook(struct hda_pcm_stream * hinfo,struct hda_codec * codec,struct snd_pcm_substream * substream,int action)3371 static void alc287_alc1318_playback_pcm_hook(struct hda_pcm_stream *hinfo,
3372 				   struct hda_codec *codec,
3373 				   struct snd_pcm_substream *substream,
3374 				   int action)
3375 {
3376 	switch (action) {
3377 	case HDA_GEN_PCM_ACT_OPEN:
3378 		alc_write_coefex_idx(codec, 0x5a, 0x00, 0x954f); /* write gpio3 to high */
3379 		break;
3380 	case HDA_GEN_PCM_ACT_CLOSE:
3381 		alc_write_coefex_idx(codec, 0x5a, 0x00, 0x554f); /* write gpio3 as default value */
3382 		break;
3383 	}
3384 }
3385 
alc287_s4_power_gpio3_default(struct hda_codec * codec)3386 static void alc287_s4_power_gpio3_default(struct hda_codec *codec)
3387 {
3388 	if (is_s4_suspend(codec)) {
3389 		alc_write_coefex_idx(codec, 0x5a, 0x00, 0x554f); /* write gpio3 as default value */
3390 	}
3391 }
3392 
alc287_fixup_lenovo_thinkpad_with_alc1318(struct hda_codec * codec,const struct hda_fixup * fix,int action)3393 static void alc287_fixup_lenovo_thinkpad_with_alc1318(struct hda_codec *codec,
3394 			       const struct hda_fixup *fix, int action)
3395 {
3396 	struct alc_spec *spec = codec->spec;
3397 	static const struct coef_fw coefs[] = {
3398 		WRITE_COEF(0x24, 0x0013), WRITE_COEF(0x25, 0x0000), WRITE_COEF(0x26, 0xC300),
3399 		WRITE_COEF(0x28, 0x0001), WRITE_COEF(0x29, 0xb023),
3400 		WRITE_COEF(0x24, 0x0013), WRITE_COEF(0x25, 0x0000), WRITE_COEF(0x26, 0xC301),
3401 		WRITE_COEF(0x28, 0x0001), WRITE_COEF(0x29, 0xb023),
3402 	};
3403 
3404 	if (action != HDA_FIXUP_ACT_PRE_PROBE)
3405 		return;
3406 	alc_update_coef_idx(codec, 0x10, 1<<11, 1<<11);
3407 	alc_process_coef_fw(codec, coefs);
3408 	spec->power_hook = alc287_s4_power_gpio3_default;
3409 	spec->gen.pcm_playback_hook = alc287_alc1318_playback_pcm_hook;
3410 }
3411 
3412 /*
3413  * Clear COEF 0x0d (PCBEEP passthrough) bit 0x40 where BIOS sets it wrongly
3414  * at PM resume
3415  */
alc283_fixup_dell_hp_resume(struct hda_codec * codec,const struct hda_fixup * fix,int action)3416 static void alc283_fixup_dell_hp_resume(struct hda_codec *codec,
3417 					const struct hda_fixup *fix, int action)
3418 {
3419 	if (action == HDA_FIXUP_ACT_INIT)
3420 		alc_write_coef_idx(codec, 0xd, 0x2800);
3421 }
3422 
3423 enum {
3424 	ALC269_FIXUP_GPIO2,
3425 	ALC269_FIXUP_SONY_VAIO,
3426 	ALC275_FIXUP_SONY_VAIO_GPIO2,
3427 	ALC269_FIXUP_DELL_M101Z,
3428 	ALC269_FIXUP_SKU_IGNORE,
3429 	ALC269_FIXUP_ASUS_G73JW,
3430 	ALC269_FIXUP_ASUS_N7601ZM_PINS,
3431 	ALC269_FIXUP_ASUS_N7601ZM,
3432 	ALC269_FIXUP_LENOVO_EAPD,
3433 	ALC275_FIXUP_SONY_HWEQ,
3434 	ALC275_FIXUP_SONY_DISABLE_AAMIX,
3435 	ALC271_FIXUP_DMIC,
3436 	ALC269_FIXUP_PCM_44K,
3437 	ALC269_FIXUP_STEREO_DMIC,
3438 	ALC269_FIXUP_HEADSET_MIC,
3439 	ALC269_FIXUP_QUANTA_MUTE,
3440 	ALC269_FIXUP_LIFEBOOK,
3441 	ALC269_FIXUP_LIFEBOOK_EXTMIC,
3442 	ALC269_FIXUP_LIFEBOOK_HP_PIN,
3443 	ALC269_FIXUP_LIFEBOOK_NO_HP_TO_LINEOUT,
3444 	ALC255_FIXUP_LIFEBOOK_U7x7_HEADSET_MIC,
3445 	ALC269_FIXUP_AMIC,
3446 	ALC269_FIXUP_DMIC,
3447 	ALC269VB_FIXUP_AMIC,
3448 	ALC269VB_FIXUP_DMIC,
3449 	ALC269_FIXUP_HP_MUTE_LED,
3450 	ALC269_FIXUP_HP_MUTE_LED_MIC1,
3451 	ALC269_FIXUP_HP_MUTE_LED_MIC2,
3452 	ALC269_FIXUP_HP_MUTE_LED_MIC3,
3453 	ALC269_FIXUP_HP_GPIO_LED,
3454 	ALC269_FIXUP_HP_GPIO_MIC1_LED,
3455 	ALC269_FIXUP_HP_LINE1_MIC1_LED,
3456 	ALC269_FIXUP_INV_DMIC,
3457 	ALC269_FIXUP_LENOVO_DOCK,
3458 	ALC269_FIXUP_LENOVO_DOCK_LIMIT_BOOST,
3459 	ALC269_FIXUP_NO_SHUTUP,
3460 	ALC286_FIXUP_SONY_MIC_NO_PRESENCE,
3461 	ALC269_FIXUP_PINCFG_NO_HP_TO_LINEOUT,
3462 	ALC269_FIXUP_DELL1_MIC_NO_PRESENCE,
3463 	ALC269_FIXUP_DELL1_LIMIT_INT_MIC_BOOST,
3464 	ALC269_FIXUP_DELL2_MIC_NO_PRESENCE,
3465 	ALC269_FIXUP_DELL3_MIC_NO_PRESENCE,
3466 	ALC269_FIXUP_DELL4_MIC_NO_PRESENCE,
3467 	ALC269_FIXUP_DELL4_MIC_NO_PRESENCE_QUIET,
3468 	ALC269_FIXUP_HEADSET_MODE,
3469 	ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC,
3470 	ALC269_FIXUP_ASPIRE_HEADSET_MIC,
3471 	ALC269_FIXUP_ASUS_X101_FUNC,
3472 	ALC269_FIXUP_ASUS_X101_VERB,
3473 	ALC269_FIXUP_ASUS_X101,
3474 	ALC271_FIXUP_AMIC_MIC2,
3475 	ALC271_FIXUP_HP_GATE_MIC_JACK,
3476 	ALC271_FIXUP_HP_GATE_MIC_JACK_E1_572,
3477 	ALC269_FIXUP_ACER_AC700,
3478 	ALC269_FIXUP_LIMIT_INT_MIC_BOOST,
3479 	ALC269VB_FIXUP_ASUS_ZENBOOK,
3480 	ALC269VB_FIXUP_ASUS_ZENBOOK_UX31A,
3481 	ALC269VB_FIXUP_ASUS_MIC_NO_PRESENCE,
3482 	ALC269_FIXUP_LIMIT_INT_MIC_BOOST_MUTE_LED,
3483 	ALC269VB_FIXUP_ORDISSIMO_EVE2,
3484 	ALC283_FIXUP_CHROME_BOOK,
3485 	ALC283_FIXUP_SENSE_COMBO_JACK,
3486 	ALC282_FIXUP_ASUS_TX300,
3487 	ALC283_FIXUP_INT_MIC,
3488 	ALC290_FIXUP_MONO_SPEAKERS,
3489 	ALC290_FIXUP_MONO_SPEAKERS_HSJACK,
3490 	ALC290_FIXUP_SUBWOOFER,
3491 	ALC290_FIXUP_SUBWOOFER_HSJACK,
3492 	ALC295_FIXUP_HP_MUTE_LED_COEFBIT11,
3493 	ALC269_FIXUP_THINKPAD_ACPI,
3494 	ALC269_FIXUP_LENOVO_XPAD_ACPI,
3495 	ALC269_FIXUP_DMIC_THINKPAD_ACPI,
3496 	ALC269VB_FIXUP_INFINIX_ZERO_BOOK_13,
3497 	ALC269VC_FIXUP_INFINIX_Y4_MAX,
3498 	ALC269VB_FIXUP_CHUWI_COREBOOK_XPRO,
3499 	ALC255_FIXUP_ACER_MIC_NO_PRESENCE,
3500 	ALC255_FIXUP_ASUS_MIC_NO_PRESENCE,
3501 	ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
3502 	ALC255_FIXUP_DELL1_LIMIT_INT_MIC_BOOST,
3503 	ALC255_FIXUP_DELL2_MIC_NO_PRESENCE,
3504 	ALC255_FIXUP_HEADSET_MODE,
3505 	ALC255_FIXUP_HEADSET_MODE_NO_HP_MIC,
3506 	ALC293_FIXUP_DELL1_MIC_NO_PRESENCE,
3507 	ALC292_FIXUP_TPT440_DOCK,
3508 	ALC292_FIXUP_TPT440,
3509 	ALC283_FIXUP_HEADSET_MIC,
3510 	ALC255_FIXUP_MIC_MUTE_LED,
3511 	ALC282_FIXUP_ASPIRE_V5_PINS,
3512 	ALC269VB_FIXUP_ASPIRE_E1_COEF,
3513 	ALC280_FIXUP_HP_GPIO4,
3514 	ALC286_FIXUP_HP_GPIO_LED,
3515 	ALC280_FIXUP_HP_GPIO2_MIC_HOTKEY,
3516 	ALC280_FIXUP_HP_DOCK_PINS,
3517 	ALC269_FIXUP_HP_DOCK_GPIO_MIC1_LED,
3518 	ALC280_FIXUP_HP_9480M,
3519 	ALC245_FIXUP_HP_X360_AMP,
3520 	ALC285_FIXUP_HP_SPECTRE_X360_EB1,
3521 	ALC285_FIXUP_HP_SPECTRE_X360_DF1,
3522 	ALC285_FIXUP_HP_ENVY_X360,
3523 	ALC288_FIXUP_DELL_HEADSET_MODE,
3524 	ALC288_FIXUP_DELL1_MIC_NO_PRESENCE,
3525 	ALC288_FIXUP_DELL_XPS_13,
3526 	ALC288_FIXUP_DISABLE_AAMIX,
3527 	ALC292_FIXUP_DELL_E7X_AAMIX,
3528 	ALC292_FIXUP_DELL_E7X,
3529 	ALC292_FIXUP_DISABLE_AAMIX,
3530 	ALC293_FIXUP_DISABLE_AAMIX_MULTIJACK,
3531 	ALC298_FIXUP_ALIENWARE_MIC_NO_PRESENCE,
3532 	ALC298_FIXUP_DELL1_MIC_NO_PRESENCE,
3533 	ALC298_FIXUP_DELL_AIO_MIC_NO_PRESENCE,
3534 	ALC275_FIXUP_DELL_XPS,
3535 	ALC293_FIXUP_LENOVO_SPK_NOISE,
3536 	ALC233_FIXUP_LENOVO_LINE2_MIC_HOTKEY,
3537 	ALC233_FIXUP_LENOVO_L2MH_LOW_ENLED,
3538 	ALC255_FIXUP_DELL_SPK_NOISE,
3539 	ALC225_FIXUP_DISABLE_MIC_VREF,
3540 	ALC225_FIXUP_DELL1_MIC_NO_PRESENCE,
3541 	ALC295_FIXUP_DISABLE_DAC3,
3542 	ALC285_FIXUP_SPEAKER2_TO_DAC1,
3543 	ALC285_FIXUP_ASUS_SPEAKER2_TO_DAC1,
3544 	ALC285_FIXUP_ASUS_HEADSET_MIC,
3545 	ALC285_FIXUP_ASUS_SPI_REAR_SPEAKERS,
3546 	ALC285_FIXUP_ASUS_I2C_SPEAKER2_TO_DAC1,
3547 	ALC285_FIXUP_ASUS_I2C_HEADSET_MIC,
3548 	ALC280_FIXUP_HP_HEADSET_MIC,
3549 	ALC221_FIXUP_HP_FRONT_MIC,
3550 	ALC292_FIXUP_TPT460,
3551 	ALC298_FIXUP_SPK_VOLUME,
3552 	ALC298_FIXUP_LENOVO_SPK_VOLUME,
3553 	ALC256_FIXUP_DELL_INSPIRON_7559_SUBWOOFER,
3554 	ALC269_FIXUP_ATIV_BOOK_8,
3555 	ALC221_FIXUP_HP_288PRO_MIC_NO_PRESENCE,
3556 	ALC221_FIXUP_HP_MIC_NO_PRESENCE,
3557 	ALC256_FIXUP_ASUS_HEADSET_MODE,
3558 	ALC256_FIXUP_ASUS_MIC,
3559 	ALC256_FIXUP_ASUS_AIO_GPIO2,
3560 	ALC233_FIXUP_ASUS_MIC_NO_PRESENCE,
3561 	ALC233_FIXUP_EAPD_COEF_AND_MIC_NO_PRESENCE,
3562 	ALC233_FIXUP_LENOVO_MULTI_CODECS,
3563 	ALC233_FIXUP_ACER_HEADSET_MIC,
3564 	ALC294_FIXUP_LENOVO_MIC_LOCATION,
3565 	ALC225_FIXUP_DELL_WYSE_MIC_NO_PRESENCE,
3566 	ALC225_FIXUP_S3_POP_NOISE,
3567 	ALC700_FIXUP_INTEL_REFERENCE,
3568 	ALC274_FIXUP_DELL_BIND_DACS,
3569 	ALC274_FIXUP_DELL_AIO_LINEOUT_VERB,
3570 	ALC298_FIXUP_TPT470_DOCK_FIX,
3571 	ALC298_FIXUP_TPT470_DOCK,
3572 	ALC255_FIXUP_DUMMY_LINEOUT_VERB,
3573 	ALC255_FIXUP_DELL_HEADSET_MIC,
3574 	ALC256_FIXUP_HUAWEI_MACH_WX9_PINS,
3575 	ALC298_FIXUP_HUAWEI_MBX_STEREO,
3576 	ALC295_FIXUP_HP_X360,
3577 	ALC221_FIXUP_HP_HEADSET_MIC,
3578 	ALC285_FIXUP_LENOVO_HEADPHONE_NOISE,
3579 	ALC295_FIXUP_HP_AUTO_MUTE,
3580 	ALC286_FIXUP_ACER_AIO_MIC_NO_PRESENCE,
3581 	ALC294_FIXUP_ASUS_MIC,
3582 	ALC294_FIXUP_ASUS_HEADSET_MIC,
3583 	ALC294_FIXUP_ASUS_I2C_HEADSET_MIC,
3584 	ALC294_FIXUP_ASUS_SPK,
3585 	ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE,
3586 	ALC285_FIXUP_LENOVO_PC_BEEP_IN_NOISE,
3587 	ALC255_FIXUP_ACER_HEADSET_MIC,
3588 	ALC295_FIXUP_CHROME_BOOK,
3589 	ALC225_FIXUP_HEADSET_JACK,
3590 	ALC225_FIXUP_DELL_WYSE_AIO_MIC_NO_PRESENCE,
3591 	ALC225_FIXUP_WYSE_AUTO_MUTE,
3592 	ALC225_FIXUP_WYSE_DISABLE_MIC_VREF,
3593 	ALC286_FIXUP_ACER_AIO_HEADSET_MIC,
3594 	ALC256_FIXUP_ASUS_HEADSET_MIC,
3595 	ALC256_FIXUP_ASUS_MIC_NO_PRESENCE,
3596 	ALC255_FIXUP_PREDATOR_SUBWOOFER,
3597 	ALC299_FIXUP_PREDATOR_SPK,
3598 	ALC256_FIXUP_MEDION_HEADSET_NO_PRESENCE,
3599 	ALC289_FIXUP_DELL_SPK1,
3600 	ALC289_FIXUP_DELL_SPK2,
3601 	ALC289_FIXUP_DUAL_SPK,
3602 	ALC289_FIXUP_RTK_AMP_DUAL_SPK,
3603 	ALC294_FIXUP_SPK2_TO_DAC1,
3604 	ALC294_FIXUP_ASUS_DUAL_SPK,
3605 	ALC285_FIXUP_THINKPAD_X1_GEN7,
3606 	ALC285_FIXUP_THINKPAD_HEADSET_JACK,
3607 	ALC294_FIXUP_ASUS_ALLY,
3608 	ALC294_FIXUP_ASUS_ALLY_PINS,
3609 	ALC294_FIXUP_ASUS_ALLY_VERBS,
3610 	ALC294_FIXUP_ASUS_ALLY_SPEAKER,
3611 	ALC294_FIXUP_ASUS_HPE,
3612 	ALC294_FIXUP_ASUS_COEF_1B,
3613 	ALC294_FIXUP_ASUS_GX502_HP,
3614 	ALC294_FIXUP_ASUS_GX502_PINS,
3615 	ALC294_FIXUP_ASUS_GX502_VERBS,
3616 	ALC294_FIXUP_ASUS_GU502_HP,
3617 	ALC294_FIXUP_ASUS_GU502_PINS,
3618 	ALC294_FIXUP_ASUS_GU502_VERBS,
3619 	ALC294_FIXUP_ASUS_G513_PINS,
3620 	ALC285_FIXUP_ASUS_G533Z_PINS,
3621 	ALC285_FIXUP_HP_GPIO_LED,
3622 	ALC285_FIXUP_HP_MUTE_LED,
3623 	ALC285_FIXUP_HP_SPECTRE_X360_MUTE_LED,
3624 	ALC285_FIXUP_HP_BEEP_MICMUTE_LED,
3625 	ALC236_FIXUP_HP_MUTE_LED_COEFBIT2,
3626 	ALC236_FIXUP_HP_GPIO_LED,
3627 	ALC236_FIXUP_HP_MUTE_LED,
3628 	ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF,
3629 	ALC236_FIXUP_LENOVO_INV_DMIC,
3630 	ALC298_FIXUP_SAMSUNG_AMP,
3631 	ALC298_FIXUP_SAMSUNG_AMP_V2_2_AMPS,
3632 	ALC298_FIXUP_SAMSUNG_AMP_V2_4_AMPS,
3633 	ALC298_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET,
3634 	ALC256_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET,
3635 	ALC295_FIXUP_ASUS_MIC_NO_PRESENCE,
3636 	ALC269VC_FIXUP_ACER_VCOPPERBOX_PINS,
3637 	ALC269VC_FIXUP_ACER_HEADSET_MIC,
3638 	ALC269VC_FIXUP_ACER_MIC_NO_PRESENCE,
3639 	ALC289_FIXUP_ASUS_GA401,
3640 	ALC289_FIXUP_ASUS_GA502,
3641 	ALC256_FIXUP_ACER_MIC_NO_PRESENCE,
3642 	ALC285_FIXUP_HP_GPIO_AMP_INIT,
3643 	ALC269_FIXUP_CZC_B20,
3644 	ALC269_FIXUP_CZC_TMI,
3645 	ALC269_FIXUP_CZC_L101,
3646 	ALC269_FIXUP_LEMOTE_A1802,
3647 	ALC269_FIXUP_LEMOTE_A190X,
3648 	ALC256_FIXUP_INTEL_NUC8_RUGGED,
3649 	ALC233_FIXUP_INTEL_NUC8_DMIC,
3650 	ALC233_FIXUP_INTEL_NUC8_BOOST,
3651 	ALC256_FIXUP_INTEL_NUC10,
3652 	ALC255_FIXUP_XIAOMI_HEADSET_MIC,
3653 	ALC274_FIXUP_HP_MIC,
3654 	ALC274_FIXUP_HP_HEADSET_MIC,
3655 	ALC274_FIXUP_HP_ENVY_GPIO,
3656 	ALC274_FIXUP_ASUS_ZEN_AIO_27,
3657 	ALC256_FIXUP_ASUS_HPE,
3658 	ALC285_FIXUP_THINKPAD_NO_BASS_SPK_HEADSET_JACK,
3659 	ALC287_FIXUP_HP_GPIO_LED,
3660 	ALC256_FIXUP_HP_HEADSET_MIC,
3661 	ALC245_FIXUP_HP_GPIO_LED,
3662 	ALC236_FIXUP_DELL_AIO_HEADSET_MIC,
3663 	ALC282_FIXUP_ACER_DISABLE_LINEOUT,
3664 	ALC255_FIXUP_ACER_LIMIT_INT_MIC_BOOST,
3665 	ALC256_FIXUP_ACER_HEADSET_MIC,
3666 	ALC285_FIXUP_IDEAPAD_S740_COEF,
3667 	ALC285_FIXUP_HP_LIMIT_INT_MIC_BOOST,
3668 	ALC295_FIXUP_ASUS_DACS,
3669 	ALC295_FIXUP_HP_OMEN,
3670 	ALC285_FIXUP_HP_SPECTRE_X360,
3671 	ALC287_FIXUP_IDEAPAD_BASS_SPK_AMP,
3672 	ALC623_FIXUP_LENOVO_THINKSTATION_P340,
3673 	ALC255_FIXUP_ACER_HEADPHONE_AND_MIC,
3674 	ALC236_FIXUP_HP_LIMIT_INT_MIC_BOOST,
3675 	ALC287_FIXUP_LEGION_15IMHG05_SPEAKERS,
3676 	ALC287_FIXUP_LEGION_15IMHG05_AUTOMUTE,
3677 	ALC287_FIXUP_YOGA7_14ITL_SPEAKERS,
3678 	ALC298_FIXUP_LENOVO_C940_DUET7,
3679 	ALC287_FIXUP_13S_GEN2_SPEAKERS,
3680 	ALC256_FIXUP_SET_COEF_DEFAULTS,
3681 	ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE,
3682 	ALC233_FIXUP_NO_AUDIO_JACK,
3683 	ALC256_FIXUP_MIC_NO_PRESENCE_AND_RESUME,
3684 	ALC285_FIXUP_LEGION_Y9000X_SPEAKERS,
3685 	ALC285_FIXUP_LEGION_Y9000X_AUTOMUTE,
3686 	ALC287_FIXUP_LEGION_16ACHG6,
3687 	ALC287_FIXUP_CS35L41_I2C_2,
3688 	ALC287_FIXUP_CS35L41_I2C_2_HP_GPIO_LED,
3689 	ALC287_FIXUP_CS35L41_I2C_4,
3690 	ALC245_FIXUP_CS35L41_SPI_1,
3691 	ALC245_FIXUP_CS35L41_SPI_2,
3692 	ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED,
3693 	ALC245_FIXUP_CS35L41_SPI_4,
3694 	ALC245_FIXUP_CS35L41_SPI_4_HP_GPIO_LED,
3695 	ALC285_FIXUP_HP_SPEAKERS_MICMUTE_LED,
3696 	ALC295_FIXUP_FRAMEWORK_LAPTOP_MIC_NO_PRESENCE,
3697 	ALC287_FIXUP_LEGION_16ITHG6,
3698 	ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK,
3699 	ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK_PIN,
3700 	ALC287_FIXUP_YOGA9_14IMH9_BASS_SPK_PIN,
3701 	ALC295_FIXUP_DELL_INSPIRON_TOP_SPEAKERS,
3702 	ALC236_FIXUP_DELL_DUAL_CODECS,
3703 	ALC287_FIXUP_CS35L41_I2C_2_THINKPAD_ACPI,
3704 	ALC287_FIXUP_TAS2781_I2C,
3705 	ALC245_FIXUP_TAS2781_SPI_2,
3706 	ALC287_FIXUP_TXNW2781_I2C,
3707 	ALC287_FIXUP_YOGA7_14ARB7_I2C,
3708 	ALC245_FIXUP_HP_MUTE_LED_COEFBIT,
3709 	ALC245_FIXUP_HP_MUTE_LED_V1_COEFBIT,
3710 	ALC245_FIXUP_HP_X360_MUTE_LEDS,
3711 	ALC287_FIXUP_THINKPAD_I2S_SPK,
3712 	ALC287_FIXUP_MG_RTKC_CSAMP_CS35L41_I2C_THINKPAD,
3713 	ALC2XX_FIXUP_HEADSET_MIC,
3714 	ALC289_FIXUP_DELL_CS35L41_SPI_2,
3715 	ALC294_FIXUP_CS35L41_I2C_2,
3716 	ALC256_FIXUP_ACER_SFG16_MICMUTE_LED,
3717 	ALC256_FIXUP_HEADPHONE_AMP_VOL,
3718 	ALC245_FIXUP_HP_SPECTRE_X360_EU0XXX,
3719 	ALC245_FIXUP_HP_SPECTRE_X360_16_AA0XXX,
3720 	ALC245_FIXUP_HP_ZBOOK_FIREFLY_G12A,
3721 	ALC285_FIXUP_ASUS_GA403U,
3722 	ALC285_FIXUP_ASUS_GA403U_HEADSET_MIC,
3723 	ALC285_FIXUP_ASUS_GA403U_I2C_SPEAKER2_TO_DAC1,
3724 	ALC285_FIXUP_ASUS_GU605_SPI_2_HEADSET_MIC,
3725 	ALC285_FIXUP_ASUS_GU605_SPI_SPEAKER2_TO_DAC1,
3726 	ALC287_FIXUP_LENOVO_THKPAD_WH_ALC1318,
3727 	ALC256_FIXUP_CHROME_BOOK,
3728 	ALC245_FIXUP_CLEVO_NOISY_MIC,
3729 	ALC269_FIXUP_VAIO_VJFH52_MIC_NO_PRESENCE,
3730 	ALC233_FIXUP_MEDION_MTL_SPK,
3731 	ALC294_FIXUP_BASS_SPEAKER_15,
3732 	ALC283_FIXUP_DELL_HP_RESUME,
3733 	ALC294_FIXUP_ASUS_CS35L41_SPI_2,
3734 	ALC274_FIXUP_HP_AIO_BIND_DACS,
3735 	ALC287_FIXUP_PREDATOR_SPK_CS35L41_I2C_2,
3736 	ALC285_FIXUP_ASUS_GA605K_HEADSET_MIC,
3737 	ALC285_FIXUP_ASUS_GA605K_I2C_SPEAKER2_TO_DAC1,
3738 	ALC269_FIXUP_POSITIVO_P15X_HEADSET_MIC,
3739 };
3740 
3741 /* A special fixup for Lenovo C940 and Yoga Duet 7;
3742  * both have the very same PCI SSID, and we need to apply different fixups
3743  * depending on the codec ID
3744  */
alc298_fixup_lenovo_c940_duet7(struct hda_codec * codec,const struct hda_fixup * fix,int action)3745 static void alc298_fixup_lenovo_c940_duet7(struct hda_codec *codec,
3746 					   const struct hda_fixup *fix,
3747 					   int action)
3748 {
3749 	int id;
3750 
3751 	if (codec->core.vendor_id == 0x10ec0298)
3752 		id = ALC298_FIXUP_LENOVO_SPK_VOLUME; /* C940 */
3753 	else
3754 		id = ALC287_FIXUP_YOGA7_14ITL_SPEAKERS; /* Duet 7 */
3755 	__snd_hda_apply_fixup(codec, id, action, 0);
3756 }
3757 
3758 static const struct hda_fixup alc269_fixups[] = {
3759 	[ALC269_FIXUP_GPIO2] = {
3760 		.type = HDA_FIXUP_FUNC,
3761 		.v.func = alc_fixup_gpio2,
3762 	},
3763 	[ALC269_FIXUP_SONY_VAIO] = {
3764 		.type = HDA_FIXUP_PINCTLS,
3765 		.v.pins = (const struct hda_pintbl[]) {
3766 			{0x19, PIN_VREFGRD},
3767 			{}
3768 		}
3769 	},
3770 	[ALC275_FIXUP_SONY_VAIO_GPIO2] = {
3771 		.type = HDA_FIXUP_FUNC,
3772 		.v.func = alc275_fixup_gpio4_off,
3773 		.chained = true,
3774 		.chain_id = ALC269_FIXUP_SONY_VAIO
3775 	},
3776 	[ALC269_FIXUP_DELL_M101Z] = {
3777 		.type = HDA_FIXUP_VERBS,
3778 		.v.verbs = (const struct hda_verb[]) {
3779 			/* Enables internal speaker */
3780 			{0x20, AC_VERB_SET_COEF_INDEX, 13},
3781 			{0x20, AC_VERB_SET_PROC_COEF, 0x4040},
3782 			{}
3783 		}
3784 	},
3785 	[ALC269_FIXUP_SKU_IGNORE] = {
3786 		.type = HDA_FIXUP_FUNC,
3787 		.v.func = alc_fixup_sku_ignore,
3788 	},
3789 	[ALC269_FIXUP_ASUS_G73JW] = {
3790 		.type = HDA_FIXUP_PINS,
3791 		.v.pins = (const struct hda_pintbl[]) {
3792 			{ 0x17, 0x99130111 }, /* subwoofer */
3793 			{ }
3794 		}
3795 	},
3796 	[ALC269_FIXUP_ASUS_N7601ZM_PINS] = {
3797 		.type = HDA_FIXUP_PINS,
3798 		.v.pins = (const struct hda_pintbl[]) {
3799 			{ 0x19, 0x03A11050 },
3800 			{ 0x1a, 0x03A11C30 },
3801 			{ 0x21, 0x03211420 },
3802 			{ }
3803 		}
3804 	},
3805 	[ALC269_FIXUP_ASUS_N7601ZM] = {
3806 		.type = HDA_FIXUP_VERBS,
3807 		.v.verbs = (const struct hda_verb[]) {
3808 			{0x20, AC_VERB_SET_COEF_INDEX, 0x62},
3809 			{0x20, AC_VERB_SET_PROC_COEF, 0xa007},
3810 			{0x20, AC_VERB_SET_COEF_INDEX, 0x10},
3811 			{0x20, AC_VERB_SET_PROC_COEF, 0x8420},
3812 			{0x20, AC_VERB_SET_COEF_INDEX, 0x0f},
3813 			{0x20, AC_VERB_SET_PROC_COEF, 0x7774},
3814 			{ }
3815 		},
3816 		.chained = true,
3817 		.chain_id = ALC269_FIXUP_ASUS_N7601ZM_PINS,
3818 	},
3819 	[ALC269_FIXUP_LENOVO_EAPD] = {
3820 		.type = HDA_FIXUP_VERBS,
3821 		.v.verbs = (const struct hda_verb[]) {
3822 			{0x14, AC_VERB_SET_EAPD_BTLENABLE, 0},
3823 			{}
3824 		}
3825 	},
3826 	[ALC275_FIXUP_SONY_HWEQ] = {
3827 		.type = HDA_FIXUP_FUNC,
3828 		.v.func = alc269_fixup_hweq,
3829 		.chained = true,
3830 		.chain_id = ALC275_FIXUP_SONY_VAIO_GPIO2
3831 	},
3832 	[ALC275_FIXUP_SONY_DISABLE_AAMIX] = {
3833 		.type = HDA_FIXUP_FUNC,
3834 		.v.func = alc_fixup_disable_aamix,
3835 		.chained = true,
3836 		.chain_id = ALC269_FIXUP_SONY_VAIO
3837 	},
3838 	[ALC271_FIXUP_DMIC] = {
3839 		.type = HDA_FIXUP_FUNC,
3840 		.v.func = alc271_fixup_dmic,
3841 	},
3842 	[ALC269_FIXUP_PCM_44K] = {
3843 		.type = HDA_FIXUP_FUNC,
3844 		.v.func = alc269_fixup_pcm_44k,
3845 		.chained = true,
3846 		.chain_id = ALC269_FIXUP_QUANTA_MUTE
3847 	},
3848 	[ALC269_FIXUP_STEREO_DMIC] = {
3849 		.type = HDA_FIXUP_FUNC,
3850 		.v.func = alc269_fixup_stereo_dmic,
3851 	},
3852 	[ALC269_FIXUP_HEADSET_MIC] = {
3853 		.type = HDA_FIXUP_FUNC,
3854 		.v.func = alc_fixup_headset_mic,
3855 	},
3856 	[ALC269_FIXUP_QUANTA_MUTE] = {
3857 		.type = HDA_FIXUP_FUNC,
3858 		.v.func = alc269_fixup_quanta_mute,
3859 	},
3860 	[ALC269_FIXUP_LIFEBOOK] = {
3861 		.type = HDA_FIXUP_PINS,
3862 		.v.pins = (const struct hda_pintbl[]) {
3863 			{ 0x1a, 0x2101103f }, /* dock line-out */
3864 			{ 0x1b, 0x23a11040 }, /* dock mic-in */
3865 			{ }
3866 		},
3867 		.chained = true,
3868 		.chain_id = ALC269_FIXUP_QUANTA_MUTE
3869 	},
3870 	[ALC269_FIXUP_LIFEBOOK_EXTMIC] = {
3871 		.type = HDA_FIXUP_PINS,
3872 		.v.pins = (const struct hda_pintbl[]) {
3873 			{ 0x19, 0x01a1903c }, /* headset mic, with jack detect */
3874 			{ }
3875 		},
3876 	},
3877 	[ALC269_FIXUP_LIFEBOOK_HP_PIN] = {
3878 		.type = HDA_FIXUP_PINS,
3879 		.v.pins = (const struct hda_pintbl[]) {
3880 			{ 0x21, 0x0221102f }, /* HP out */
3881 			{ }
3882 		},
3883 	},
3884 	[ALC269_FIXUP_LIFEBOOK_NO_HP_TO_LINEOUT] = {
3885 		.type = HDA_FIXUP_FUNC,
3886 		.v.func = alc269_fixup_pincfg_no_hp_to_lineout,
3887 	},
3888 	[ALC255_FIXUP_LIFEBOOK_U7x7_HEADSET_MIC] = {
3889 		.type = HDA_FIXUP_FUNC,
3890 		.v.func = alc269_fixup_pincfg_U7x7_headset_mic,
3891 	},
3892 	[ALC269VB_FIXUP_INFINIX_ZERO_BOOK_13] = {
3893 		.type = HDA_FIXUP_PINS,
3894 		.v.pins = (const struct hda_pintbl[]) {
3895 			{ 0x14, 0x90170151 }, /* use as internal speaker (LFE) */
3896 			{ 0x1b, 0x90170152 }, /* use as internal speaker (back) */
3897 			{ }
3898 		},
3899 		.chained = true,
3900 		.chain_id = ALC269_FIXUP_LIMIT_INT_MIC_BOOST
3901 	},
3902 	[ALC269VC_FIXUP_INFINIX_Y4_MAX] = {
3903 		.type = HDA_FIXUP_PINS,
3904 		.v.pins = (const struct hda_pintbl[]) {
3905 			{ 0x1b, 0x90170150 }, /* use as internal speaker */
3906 			{ }
3907 		},
3908 		.chained = true,
3909 		.chain_id = ALC269_FIXUP_LIMIT_INT_MIC_BOOST
3910 	},
3911 	[ALC269VB_FIXUP_CHUWI_COREBOOK_XPRO] = {
3912 		.type = HDA_FIXUP_PINS,
3913 		.v.pins = (const struct hda_pintbl[]) {
3914 			{ 0x18, 0x03a19020 }, /* headset mic */
3915 			{ 0x1b, 0x90170150 }, /* speaker */
3916 			{ }
3917 		},
3918 	},
3919 	[ALC269_FIXUP_AMIC] = {
3920 		.type = HDA_FIXUP_PINS,
3921 		.v.pins = (const struct hda_pintbl[]) {
3922 			{ 0x14, 0x99130110 }, /* speaker */
3923 			{ 0x15, 0x0121401f }, /* HP out */
3924 			{ 0x18, 0x01a19c20 }, /* mic */
3925 			{ 0x19, 0x99a3092f }, /* int-mic */
3926 			{ }
3927 		},
3928 	},
3929 	[ALC269_FIXUP_DMIC] = {
3930 		.type = HDA_FIXUP_PINS,
3931 		.v.pins = (const struct hda_pintbl[]) {
3932 			{ 0x12, 0x99a3092f }, /* int-mic */
3933 			{ 0x14, 0x99130110 }, /* speaker */
3934 			{ 0x15, 0x0121401f }, /* HP out */
3935 			{ 0x18, 0x01a19c20 }, /* mic */
3936 			{ }
3937 		},
3938 	},
3939 	[ALC269VB_FIXUP_AMIC] = {
3940 		.type = HDA_FIXUP_PINS,
3941 		.v.pins = (const struct hda_pintbl[]) {
3942 			{ 0x14, 0x99130110 }, /* speaker */
3943 			{ 0x18, 0x01a19c20 }, /* mic */
3944 			{ 0x19, 0x99a3092f }, /* int-mic */
3945 			{ 0x21, 0x0121401f }, /* HP out */
3946 			{ }
3947 		},
3948 	},
3949 	[ALC269VB_FIXUP_DMIC] = {
3950 		.type = HDA_FIXUP_PINS,
3951 		.v.pins = (const struct hda_pintbl[]) {
3952 			{ 0x12, 0x99a3092f }, /* int-mic */
3953 			{ 0x14, 0x99130110 }, /* speaker */
3954 			{ 0x18, 0x01a19c20 }, /* mic */
3955 			{ 0x21, 0x0121401f }, /* HP out */
3956 			{ }
3957 		},
3958 	},
3959 	[ALC269_FIXUP_HP_MUTE_LED] = {
3960 		.type = HDA_FIXUP_FUNC,
3961 		.v.func = alc269_fixup_hp_mute_led,
3962 	},
3963 	[ALC269_FIXUP_HP_MUTE_LED_MIC1] = {
3964 		.type = HDA_FIXUP_FUNC,
3965 		.v.func = alc269_fixup_hp_mute_led_mic1,
3966 	},
3967 	[ALC269_FIXUP_HP_MUTE_LED_MIC2] = {
3968 		.type = HDA_FIXUP_FUNC,
3969 		.v.func = alc269_fixup_hp_mute_led_mic2,
3970 	},
3971 	[ALC269_FIXUP_HP_MUTE_LED_MIC3] = {
3972 		.type = HDA_FIXUP_FUNC,
3973 		.v.func = alc269_fixup_hp_mute_led_mic3,
3974 		.chained = true,
3975 		.chain_id = ALC295_FIXUP_HP_AUTO_MUTE
3976 	},
3977 	[ALC269_FIXUP_HP_GPIO_LED] = {
3978 		.type = HDA_FIXUP_FUNC,
3979 		.v.func = alc269_fixup_hp_gpio_led,
3980 	},
3981 	[ALC269_FIXUP_HP_GPIO_MIC1_LED] = {
3982 		.type = HDA_FIXUP_FUNC,
3983 		.v.func = alc269_fixup_hp_gpio_mic1_led,
3984 	},
3985 	[ALC269_FIXUP_HP_LINE1_MIC1_LED] = {
3986 		.type = HDA_FIXUP_FUNC,
3987 		.v.func = alc269_fixup_hp_line1_mic1_led,
3988 	},
3989 	[ALC269_FIXUP_INV_DMIC] = {
3990 		.type = HDA_FIXUP_FUNC,
3991 		.v.func = alc_fixup_inv_dmic,
3992 	},
3993 	[ALC269_FIXUP_NO_SHUTUP] = {
3994 		.type = HDA_FIXUP_FUNC,
3995 		.v.func = alc_fixup_no_shutup,
3996 	},
3997 	[ALC269_FIXUP_LENOVO_DOCK] = {
3998 		.type = HDA_FIXUP_PINS,
3999 		.v.pins = (const struct hda_pintbl[]) {
4000 			{ 0x19, 0x23a11040 }, /* dock mic */
4001 			{ 0x1b, 0x2121103f }, /* dock headphone */
4002 			{ }
4003 		},
4004 		.chained = true,
4005 		.chain_id = ALC269_FIXUP_PINCFG_NO_HP_TO_LINEOUT
4006 	},
4007 	[ALC269_FIXUP_LENOVO_DOCK_LIMIT_BOOST] = {
4008 		.type = HDA_FIXUP_FUNC,
4009 		.v.func = alc269_fixup_limit_int_mic_boost,
4010 		.chained = true,
4011 		.chain_id = ALC269_FIXUP_LENOVO_DOCK,
4012 	},
4013 	[ALC269_FIXUP_PINCFG_NO_HP_TO_LINEOUT] = {
4014 		.type = HDA_FIXUP_FUNC,
4015 		.v.func = alc269_fixup_pincfg_no_hp_to_lineout,
4016 		.chained = true,
4017 		.chain_id = ALC269_FIXUP_THINKPAD_ACPI,
4018 	},
4019 	[ALC269_FIXUP_DELL1_MIC_NO_PRESENCE] = {
4020 		.type = HDA_FIXUP_PINS,
4021 		.v.pins = (const struct hda_pintbl[]) {
4022 			{ 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */
4023 			{ 0x1a, 0x01a1913d }, /* use as headphone mic, without its own jack detect */
4024 			{ }
4025 		},
4026 		.chained = true,
4027 		.chain_id = ALC269_FIXUP_HEADSET_MODE
4028 	},
4029 	[ALC269_FIXUP_DELL1_LIMIT_INT_MIC_BOOST] = {
4030 		.type = HDA_FIXUP_FUNC,
4031 		.v.func = alc269_fixup_limit_int_mic_boost,
4032 		.chained = true,
4033 		.chain_id = ALC269_FIXUP_DELL1_MIC_NO_PRESENCE
4034 	},
4035 	[ALC269_FIXUP_DELL2_MIC_NO_PRESENCE] = {
4036 		.type = HDA_FIXUP_PINS,
4037 		.v.pins = (const struct hda_pintbl[]) {
4038 			{ 0x16, 0x21014020 }, /* dock line out */
4039 			{ 0x19, 0x21a19030 }, /* dock mic */
4040 			{ 0x1a, 0x01a1913c }, /* use as headset mic, without its own jack detect */
4041 			{ }
4042 		},
4043 		.chained = true,
4044 		.chain_id = ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC
4045 	},
4046 	[ALC269_FIXUP_DELL3_MIC_NO_PRESENCE] = {
4047 		.type = HDA_FIXUP_PINS,
4048 		.v.pins = (const struct hda_pintbl[]) {
4049 			{ 0x1a, 0x01a1913c }, /* use as headset mic, without its own jack detect */
4050 			{ }
4051 		},
4052 		.chained = true,
4053 		.chain_id = ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC
4054 	},
4055 	[ALC269_FIXUP_DELL4_MIC_NO_PRESENCE] = {
4056 		.type = HDA_FIXUP_PINS,
4057 		.v.pins = (const struct hda_pintbl[]) {
4058 			{ 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */
4059 			{ 0x1b, 0x01a1913d }, /* use as headphone mic, without its own jack detect */
4060 			{ }
4061 		},
4062 		.chained = true,
4063 		.chain_id = ALC269_FIXUP_HEADSET_MODE
4064 	},
4065 	[ALC269_FIXUP_HEADSET_MODE] = {
4066 		.type = HDA_FIXUP_FUNC,
4067 		.v.func = alc_fixup_headset_mode,
4068 		.chained = true,
4069 		.chain_id = ALC255_FIXUP_MIC_MUTE_LED
4070 	},
4071 	[ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC] = {
4072 		.type = HDA_FIXUP_FUNC,
4073 		.v.func = alc_fixup_headset_mode_no_hp_mic,
4074 	},
4075 	[ALC269_FIXUP_ASPIRE_HEADSET_MIC] = {
4076 		.type = HDA_FIXUP_PINS,
4077 		.v.pins = (const struct hda_pintbl[]) {
4078 			{ 0x19, 0x01a1913c }, /* headset mic w/o jack detect */
4079 			{ }
4080 		},
4081 		.chained = true,
4082 		.chain_id = ALC269_FIXUP_HEADSET_MODE,
4083 	},
4084 	[ALC286_FIXUP_SONY_MIC_NO_PRESENCE] = {
4085 		.type = HDA_FIXUP_PINS,
4086 		.v.pins = (const struct hda_pintbl[]) {
4087 			{ 0x18, 0x01a1913c }, /* use as headset mic, without its own jack detect */
4088 			{ }
4089 		},
4090 		.chained = true,
4091 		.chain_id = ALC269_FIXUP_HEADSET_MIC
4092 	},
4093 	[ALC256_FIXUP_HUAWEI_MACH_WX9_PINS] = {
4094 		.type = HDA_FIXUP_PINS,
4095 		.v.pins = (const struct hda_pintbl[]) {
4096 			{0x12, 0x90a60130},
4097 			{0x13, 0x40000000},
4098 			{0x14, 0x90170110},
4099 			{0x18, 0x411111f0},
4100 			{0x19, 0x04a11040},
4101 			{0x1a, 0x411111f0},
4102 			{0x1b, 0x90170112},
4103 			{0x1d, 0x40759a05},
4104 			{0x1e, 0x411111f0},
4105 			{0x21, 0x04211020},
4106 			{ }
4107 		},
4108 		.chained = true,
4109 		.chain_id = ALC255_FIXUP_MIC_MUTE_LED
4110 	},
4111 	[ALC298_FIXUP_HUAWEI_MBX_STEREO] = {
4112 		.type = HDA_FIXUP_FUNC,
4113 		.v.func = alc298_fixup_huawei_mbx_stereo,
4114 		.chained = true,
4115 		.chain_id = ALC255_FIXUP_MIC_MUTE_LED
4116 	},
4117 	[ALC269_FIXUP_ASUS_X101_FUNC] = {
4118 		.type = HDA_FIXUP_FUNC,
4119 		.v.func = alc269_fixup_x101_headset_mic,
4120 	},
4121 	[ALC269_FIXUP_ASUS_X101_VERB] = {
4122 		.type = HDA_FIXUP_VERBS,
4123 		.v.verbs = (const struct hda_verb[]) {
4124 			{0x18, AC_VERB_SET_PIN_WIDGET_CONTROL, 0},
4125 			{0x20, AC_VERB_SET_COEF_INDEX, 0x08},
4126 			{0x20, AC_VERB_SET_PROC_COEF,  0x0310},
4127 			{ }
4128 		},
4129 		.chained = true,
4130 		.chain_id = ALC269_FIXUP_ASUS_X101_FUNC
4131 	},
4132 	[ALC269_FIXUP_ASUS_X101] = {
4133 		.type = HDA_FIXUP_PINS,
4134 		.v.pins = (const struct hda_pintbl[]) {
4135 			{ 0x18, 0x04a1182c }, /* Headset mic */
4136 			{ }
4137 		},
4138 		.chained = true,
4139 		.chain_id = ALC269_FIXUP_ASUS_X101_VERB
4140 	},
4141 	[ALC271_FIXUP_AMIC_MIC2] = {
4142 		.type = HDA_FIXUP_PINS,
4143 		.v.pins = (const struct hda_pintbl[]) {
4144 			{ 0x14, 0x99130110 }, /* speaker */
4145 			{ 0x19, 0x01a19c20 }, /* mic */
4146 			{ 0x1b, 0x99a7012f }, /* int-mic */
4147 			{ 0x21, 0x0121401f }, /* HP out */
4148 			{ }
4149 		},
4150 	},
4151 	[ALC271_FIXUP_HP_GATE_MIC_JACK] = {
4152 		.type = HDA_FIXUP_FUNC,
4153 		.v.func = alc271_hp_gate_mic_jack,
4154 		.chained = true,
4155 		.chain_id = ALC271_FIXUP_AMIC_MIC2,
4156 	},
4157 	[ALC271_FIXUP_HP_GATE_MIC_JACK_E1_572] = {
4158 		.type = HDA_FIXUP_FUNC,
4159 		.v.func = alc269_fixup_limit_int_mic_boost,
4160 		.chained = true,
4161 		.chain_id = ALC271_FIXUP_HP_GATE_MIC_JACK,
4162 	},
4163 	[ALC269_FIXUP_ACER_AC700] = {
4164 		.type = HDA_FIXUP_PINS,
4165 		.v.pins = (const struct hda_pintbl[]) {
4166 			{ 0x12, 0x99a3092f }, /* int-mic */
4167 			{ 0x14, 0x99130110 }, /* speaker */
4168 			{ 0x18, 0x03a11c20 }, /* mic */
4169 			{ 0x1e, 0x0346101e }, /* SPDIF1 */
4170 			{ 0x21, 0x0321101f }, /* HP out */
4171 			{ }
4172 		},
4173 		.chained = true,
4174 		.chain_id = ALC271_FIXUP_DMIC,
4175 	},
4176 	[ALC269_FIXUP_LIMIT_INT_MIC_BOOST] = {
4177 		.type = HDA_FIXUP_FUNC,
4178 		.v.func = alc269_fixup_limit_int_mic_boost,
4179 		.chained = true,
4180 		.chain_id = ALC269_FIXUP_THINKPAD_ACPI,
4181 	},
4182 	[ALC269VB_FIXUP_ASUS_ZENBOOK] = {
4183 		.type = HDA_FIXUP_FUNC,
4184 		.v.func = alc269_fixup_limit_int_mic_boost,
4185 		.chained = true,
4186 		.chain_id = ALC269VB_FIXUP_DMIC,
4187 	},
4188 	[ALC269VB_FIXUP_ASUS_ZENBOOK_UX31A] = {
4189 		.type = HDA_FIXUP_VERBS,
4190 		.v.verbs = (const struct hda_verb[]) {
4191 			/* class-D output amp +5dB */
4192 			{ 0x20, AC_VERB_SET_COEF_INDEX, 0x12 },
4193 			{ 0x20, AC_VERB_SET_PROC_COEF, 0x2800 },
4194 			{}
4195 		},
4196 		.chained = true,
4197 		.chain_id = ALC269VB_FIXUP_ASUS_ZENBOOK,
4198 	},
4199 	[ALC269VB_FIXUP_ASUS_MIC_NO_PRESENCE] = {
4200 		.type = HDA_FIXUP_PINS,
4201 		.v.pins = (const struct hda_pintbl[]) {
4202 			{ 0x18, 0x01a110f0 },  /* use as headset mic */
4203 			{ }
4204 		},
4205 		.chained = true,
4206 		.chain_id = ALC269_FIXUP_HEADSET_MIC
4207 	},
4208 	[ALC269_FIXUP_LIMIT_INT_MIC_BOOST_MUTE_LED] = {
4209 		.type = HDA_FIXUP_FUNC,
4210 		.v.func = alc269_fixup_limit_int_mic_boost,
4211 		.chained = true,
4212 		.chain_id = ALC269_FIXUP_HP_MUTE_LED_MIC1,
4213 	},
4214 	[ALC269VB_FIXUP_ORDISSIMO_EVE2] = {
4215 		.type = HDA_FIXUP_PINS,
4216 		.v.pins = (const struct hda_pintbl[]) {
4217 			{ 0x12, 0x99a3092f }, /* int-mic */
4218 			{ 0x18, 0x03a11d20 }, /* mic */
4219 			{ 0x19, 0x411111f0 }, /* Unused bogus pin */
4220 			{ }
4221 		},
4222 	},
4223 	[ALC283_FIXUP_CHROME_BOOK] = {
4224 		.type = HDA_FIXUP_FUNC,
4225 		.v.func = alc283_fixup_chromebook,
4226 	},
4227 	[ALC283_FIXUP_SENSE_COMBO_JACK] = {
4228 		.type = HDA_FIXUP_FUNC,
4229 		.v.func = alc283_fixup_sense_combo_jack,
4230 		.chained = true,
4231 		.chain_id = ALC283_FIXUP_CHROME_BOOK,
4232 	},
4233 	[ALC282_FIXUP_ASUS_TX300] = {
4234 		.type = HDA_FIXUP_FUNC,
4235 		.v.func = alc282_fixup_asus_tx300,
4236 	},
4237 	[ALC283_FIXUP_INT_MIC] = {
4238 		.type = HDA_FIXUP_VERBS,
4239 		.v.verbs = (const struct hda_verb[]) {
4240 			{0x20, AC_VERB_SET_COEF_INDEX, 0x1a},
4241 			{0x20, AC_VERB_SET_PROC_COEF, 0x0011},
4242 			{ }
4243 		},
4244 		.chained = true,
4245 		.chain_id = ALC269_FIXUP_LIMIT_INT_MIC_BOOST
4246 	},
4247 	[ALC290_FIXUP_SUBWOOFER_HSJACK] = {
4248 		.type = HDA_FIXUP_PINS,
4249 		.v.pins = (const struct hda_pintbl[]) {
4250 			{ 0x17, 0x90170112 }, /* subwoofer */
4251 			{ }
4252 		},
4253 		.chained = true,
4254 		.chain_id = ALC290_FIXUP_MONO_SPEAKERS_HSJACK,
4255 	},
4256 	[ALC290_FIXUP_SUBWOOFER] = {
4257 		.type = HDA_FIXUP_PINS,
4258 		.v.pins = (const struct hda_pintbl[]) {
4259 			{ 0x17, 0x90170112 }, /* subwoofer */
4260 			{ }
4261 		},
4262 		.chained = true,
4263 		.chain_id = ALC290_FIXUP_MONO_SPEAKERS,
4264 	},
4265 	[ALC290_FIXUP_MONO_SPEAKERS] = {
4266 		.type = HDA_FIXUP_FUNC,
4267 		.v.func = alc290_fixup_mono_speakers,
4268 	},
4269 	[ALC290_FIXUP_MONO_SPEAKERS_HSJACK] = {
4270 		.type = HDA_FIXUP_FUNC,
4271 		.v.func = alc290_fixup_mono_speakers,
4272 		.chained = true,
4273 		.chain_id = ALC269_FIXUP_DELL3_MIC_NO_PRESENCE,
4274 	},
4275 	[ALC269_FIXUP_THINKPAD_ACPI] = {
4276 		.type = HDA_FIXUP_FUNC,
4277 		.v.func = alc_fixup_thinkpad_acpi,
4278 		.chained = true,
4279 		.chain_id = ALC269_FIXUP_SKU_IGNORE,
4280 	},
4281 	[ALC269_FIXUP_LENOVO_XPAD_ACPI] = {
4282 		.type = HDA_FIXUP_FUNC,
4283 		.v.func = alc_fixup_ideapad_acpi,
4284 		.chained = true,
4285 		.chain_id = ALC269_FIXUP_THINKPAD_ACPI,
4286 	},
4287 	[ALC269_FIXUP_DMIC_THINKPAD_ACPI] = {
4288 		.type = HDA_FIXUP_FUNC,
4289 		.v.func = alc_fixup_inv_dmic,
4290 		.chained = true,
4291 		.chain_id = ALC269_FIXUP_THINKPAD_ACPI,
4292 	},
4293 	[ALC255_FIXUP_ACER_MIC_NO_PRESENCE] = {
4294 		.type = HDA_FIXUP_PINS,
4295 		.v.pins = (const struct hda_pintbl[]) {
4296 			{ 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */
4297 			{ }
4298 		},
4299 		.chained = true,
4300 		.chain_id = ALC255_FIXUP_HEADSET_MODE
4301 	},
4302 	[ALC255_FIXUP_ASUS_MIC_NO_PRESENCE] = {
4303 		.type = HDA_FIXUP_PINS,
4304 		.v.pins = (const struct hda_pintbl[]) {
4305 			{ 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */
4306 			{ }
4307 		},
4308 		.chained = true,
4309 		.chain_id = ALC255_FIXUP_HEADSET_MODE
4310 	},
4311 	[ALC255_FIXUP_DELL1_MIC_NO_PRESENCE] = {
4312 		.type = HDA_FIXUP_PINS,
4313 		.v.pins = (const struct hda_pintbl[]) {
4314 			{ 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */
4315 			{ 0x1a, 0x01a1913d }, /* use as headphone mic, without its own jack detect */
4316 			{ }
4317 		},
4318 		.chained = true,
4319 		.chain_id = ALC255_FIXUP_HEADSET_MODE
4320 	},
4321 	[ALC255_FIXUP_DELL1_LIMIT_INT_MIC_BOOST] = {
4322 		.type = HDA_FIXUP_FUNC,
4323 		.v.func = alc269_fixup_limit_int_mic_boost,
4324 		.chained = true,
4325 		.chain_id = ALC255_FIXUP_DELL1_MIC_NO_PRESENCE
4326 	},
4327 	[ALC255_FIXUP_DELL2_MIC_NO_PRESENCE] = {
4328 		.type = HDA_FIXUP_PINS,
4329 		.v.pins = (const struct hda_pintbl[]) {
4330 			{ 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */
4331 			{ }
4332 		},
4333 		.chained = true,
4334 		.chain_id = ALC255_FIXUP_HEADSET_MODE_NO_HP_MIC
4335 	},
4336 	[ALC255_FIXUP_HEADSET_MODE] = {
4337 		.type = HDA_FIXUP_FUNC,
4338 		.v.func = alc_fixup_headset_mode_alc255,
4339 		.chained = true,
4340 		.chain_id = ALC255_FIXUP_MIC_MUTE_LED
4341 	},
4342 	[ALC255_FIXUP_HEADSET_MODE_NO_HP_MIC] = {
4343 		.type = HDA_FIXUP_FUNC,
4344 		.v.func = alc_fixup_headset_mode_alc255_no_hp_mic,
4345 	},
4346 	[ALC293_FIXUP_DELL1_MIC_NO_PRESENCE] = {
4347 		.type = HDA_FIXUP_PINS,
4348 		.v.pins = (const struct hda_pintbl[]) {
4349 			{ 0x18, 0x01a1913d }, /* use as headphone mic, without its own jack detect */
4350 			{ 0x1a, 0x01a1913c }, /* use as headset mic, without its own jack detect */
4351 			{ }
4352 		},
4353 		.chained = true,
4354 		.chain_id = ALC269_FIXUP_HEADSET_MODE
4355 	},
4356 	[ALC292_FIXUP_TPT440_DOCK] = {
4357 		.type = HDA_FIXUP_FUNC,
4358 		.v.func = alc_fixup_tpt440_dock,
4359 		.chained = true,
4360 		.chain_id = ALC269_FIXUP_LIMIT_INT_MIC_BOOST
4361 	},
4362 	[ALC292_FIXUP_TPT440] = {
4363 		.type = HDA_FIXUP_FUNC,
4364 		.v.func = alc_fixup_disable_aamix,
4365 		.chained = true,
4366 		.chain_id = ALC292_FIXUP_TPT440_DOCK,
4367 	},
4368 	[ALC283_FIXUP_HEADSET_MIC] = {
4369 		.type = HDA_FIXUP_PINS,
4370 		.v.pins = (const struct hda_pintbl[]) {
4371 			{ 0x19, 0x04a110f0 },
4372 			{ },
4373 		},
4374 	},
4375 	[ALC255_FIXUP_MIC_MUTE_LED] = {
4376 		.type = HDA_FIXUP_FUNC,
4377 		.v.func = alc_fixup_micmute_led,
4378 	},
4379 	[ALC282_FIXUP_ASPIRE_V5_PINS] = {
4380 		.type = HDA_FIXUP_PINS,
4381 		.v.pins = (const struct hda_pintbl[]) {
4382 			{ 0x12, 0x90a60130 },
4383 			{ 0x14, 0x90170110 },
4384 			{ 0x17, 0x40000008 },
4385 			{ 0x18, 0x411111f0 },
4386 			{ 0x19, 0x01a1913c },
4387 			{ 0x1a, 0x411111f0 },
4388 			{ 0x1b, 0x411111f0 },
4389 			{ 0x1d, 0x40f89b2d },
4390 			{ 0x1e, 0x411111f0 },
4391 			{ 0x21, 0x0321101f },
4392 			{ },
4393 		},
4394 	},
4395 	[ALC269VB_FIXUP_ASPIRE_E1_COEF] = {
4396 		.type = HDA_FIXUP_FUNC,
4397 		.v.func = alc269vb_fixup_aspire_e1_coef,
4398 	},
4399 	[ALC280_FIXUP_HP_GPIO4] = {
4400 		.type = HDA_FIXUP_FUNC,
4401 		.v.func = alc280_fixup_hp_gpio4,
4402 	},
4403 	[ALC286_FIXUP_HP_GPIO_LED] = {
4404 		.type = HDA_FIXUP_FUNC,
4405 		.v.func = alc286_fixup_hp_gpio_led,
4406 	},
4407 	[ALC280_FIXUP_HP_GPIO2_MIC_HOTKEY] = {
4408 		.type = HDA_FIXUP_FUNC,
4409 		.v.func = alc280_fixup_hp_gpio2_mic_hotkey,
4410 	},
4411 	[ALC280_FIXUP_HP_DOCK_PINS] = {
4412 		.type = HDA_FIXUP_PINS,
4413 		.v.pins = (const struct hda_pintbl[]) {
4414 			{ 0x1b, 0x21011020 }, /* line-out */
4415 			{ 0x1a, 0x01a1903c }, /* headset mic */
4416 			{ 0x18, 0x2181103f }, /* line-in */
4417 			{ },
4418 		},
4419 		.chained = true,
4420 		.chain_id = ALC280_FIXUP_HP_GPIO4
4421 	},
4422 	[ALC269_FIXUP_HP_DOCK_GPIO_MIC1_LED] = {
4423 		.type = HDA_FIXUP_PINS,
4424 		.v.pins = (const struct hda_pintbl[]) {
4425 			{ 0x1b, 0x21011020 }, /* line-out */
4426 			{ 0x18, 0x2181103f }, /* line-in */
4427 			{ },
4428 		},
4429 		.chained = true,
4430 		.chain_id = ALC269_FIXUP_HP_GPIO_MIC1_LED
4431 	},
4432 	[ALC280_FIXUP_HP_9480M] = {
4433 		.type = HDA_FIXUP_FUNC,
4434 		.v.func = alc280_fixup_hp_9480m,
4435 	},
4436 	[ALC245_FIXUP_HP_X360_AMP] = {
4437 		.type = HDA_FIXUP_FUNC,
4438 		.v.func = alc245_fixup_hp_x360_amp,
4439 		.chained = true,
4440 		.chain_id = ALC245_FIXUP_HP_GPIO_LED
4441 	},
4442 	[ALC288_FIXUP_DELL_HEADSET_MODE] = {
4443 		.type = HDA_FIXUP_FUNC,
4444 		.v.func = alc_fixup_headset_mode_dell_alc288,
4445 		.chained = true,
4446 		.chain_id = ALC255_FIXUP_MIC_MUTE_LED
4447 	},
4448 	[ALC288_FIXUP_DELL1_MIC_NO_PRESENCE] = {
4449 		.type = HDA_FIXUP_PINS,
4450 		.v.pins = (const struct hda_pintbl[]) {
4451 			{ 0x18, 0x01a1913c }, /* use as headset mic, without its own jack detect */
4452 			{ 0x1a, 0x01a1913d }, /* use as headphone mic, without its own jack detect */
4453 			{ }
4454 		},
4455 		.chained = true,
4456 		.chain_id = ALC288_FIXUP_DELL_HEADSET_MODE
4457 	},
4458 	[ALC288_FIXUP_DISABLE_AAMIX] = {
4459 		.type = HDA_FIXUP_FUNC,
4460 		.v.func = alc_fixup_disable_aamix,
4461 		.chained = true,
4462 		.chain_id = ALC288_FIXUP_DELL1_MIC_NO_PRESENCE
4463 	},
4464 	[ALC288_FIXUP_DELL_XPS_13] = {
4465 		.type = HDA_FIXUP_FUNC,
4466 		.v.func = alc_fixup_dell_xps13,
4467 		.chained = true,
4468 		.chain_id = ALC288_FIXUP_DISABLE_AAMIX
4469 	},
4470 	[ALC292_FIXUP_DISABLE_AAMIX] = {
4471 		.type = HDA_FIXUP_FUNC,
4472 		.v.func = alc_fixup_disable_aamix,
4473 		.chained = true,
4474 		.chain_id = ALC269_FIXUP_DELL2_MIC_NO_PRESENCE
4475 	},
4476 	[ALC293_FIXUP_DISABLE_AAMIX_MULTIJACK] = {
4477 		.type = HDA_FIXUP_FUNC,
4478 		.v.func = alc_fixup_disable_aamix,
4479 		.chained = true,
4480 		.chain_id = ALC293_FIXUP_DELL1_MIC_NO_PRESENCE
4481 	},
4482 	[ALC292_FIXUP_DELL_E7X_AAMIX] = {
4483 		.type = HDA_FIXUP_FUNC,
4484 		.v.func = alc_fixup_dell_xps13,
4485 		.chained = true,
4486 		.chain_id = ALC292_FIXUP_DISABLE_AAMIX
4487 	},
4488 	[ALC292_FIXUP_DELL_E7X] = {
4489 		.type = HDA_FIXUP_FUNC,
4490 		.v.func = alc_fixup_micmute_led,
4491 		/* micmute fixup must be applied at last */
4492 		.chained_before = true,
4493 		.chain_id = ALC292_FIXUP_DELL_E7X_AAMIX,
4494 	},
4495 	[ALC298_FIXUP_ALIENWARE_MIC_NO_PRESENCE] = {
4496 		.type = HDA_FIXUP_PINS,
4497 		.v.pins = (const struct hda_pintbl[]) {
4498 			{ 0x18, 0x01a1913c }, /* headset mic w/o jack detect */
4499 			{ }
4500 		},
4501 		.chained_before = true,
4502 		.chain_id = ALC269_FIXUP_HEADSET_MODE,
4503 	},
4504 	[ALC298_FIXUP_DELL1_MIC_NO_PRESENCE] = {
4505 		.type = HDA_FIXUP_PINS,
4506 		.v.pins = (const struct hda_pintbl[]) {
4507 			{ 0x18, 0x01a1913c }, /* use as headset mic, without its own jack detect */
4508 			{ 0x1a, 0x01a1913d }, /* use as headphone mic, without its own jack detect */
4509 			{ }
4510 		},
4511 		.chained = true,
4512 		.chain_id = ALC269_FIXUP_HEADSET_MODE
4513 	},
4514 	[ALC298_FIXUP_DELL_AIO_MIC_NO_PRESENCE] = {
4515 		.type = HDA_FIXUP_PINS,
4516 		.v.pins = (const struct hda_pintbl[]) {
4517 			{ 0x18, 0x01a1913c }, /* use as headset mic, without its own jack detect */
4518 			{ }
4519 		},
4520 		.chained = true,
4521 		.chain_id = ALC269_FIXUP_HEADSET_MODE
4522 	},
4523 	[ALC275_FIXUP_DELL_XPS] = {
4524 		.type = HDA_FIXUP_VERBS,
4525 		.v.verbs = (const struct hda_verb[]) {
4526 			/* Enables internal speaker */
4527 			{0x20, AC_VERB_SET_COEF_INDEX, 0x1f},
4528 			{0x20, AC_VERB_SET_PROC_COEF, 0x00c0},
4529 			{0x20, AC_VERB_SET_COEF_INDEX, 0x30},
4530 			{0x20, AC_VERB_SET_PROC_COEF, 0x00b1},
4531 			{}
4532 		}
4533 	},
4534 	[ALC293_FIXUP_LENOVO_SPK_NOISE] = {
4535 		.type = HDA_FIXUP_FUNC,
4536 		.v.func = alc_fixup_disable_aamix,
4537 		.chained = true,
4538 		.chain_id = ALC269_FIXUP_THINKPAD_ACPI
4539 	},
4540 	[ALC233_FIXUP_LENOVO_LINE2_MIC_HOTKEY] = {
4541 		.type = HDA_FIXUP_FUNC,
4542 		.v.func = alc233_fixup_lenovo_line2_mic_hotkey,
4543 	},
4544 	[ALC233_FIXUP_LENOVO_L2MH_LOW_ENLED] = {
4545 		.type = HDA_FIXUP_FUNC,
4546 		.v.func = alc233_fixup_lenovo_low_en_micmute_led,
4547 	},
4548 	[ALC233_FIXUP_INTEL_NUC8_DMIC] = {
4549 		.type = HDA_FIXUP_FUNC,
4550 		.v.func = alc_fixup_inv_dmic,
4551 		.chained = true,
4552 		.chain_id = ALC233_FIXUP_INTEL_NUC8_BOOST,
4553 	},
4554 	[ALC233_FIXUP_INTEL_NUC8_BOOST] = {
4555 		.type = HDA_FIXUP_FUNC,
4556 		.v.func = alc269_fixup_limit_int_mic_boost
4557 	},
4558 	[ALC255_FIXUP_DELL_SPK_NOISE] = {
4559 		.type = HDA_FIXUP_FUNC,
4560 		.v.func = alc_fixup_disable_aamix,
4561 		.chained = true,
4562 		.chain_id = ALC255_FIXUP_DELL1_MIC_NO_PRESENCE
4563 	},
4564 	[ALC225_FIXUP_DISABLE_MIC_VREF] = {
4565 		.type = HDA_FIXUP_FUNC,
4566 		.v.func = alc_fixup_disable_mic_vref,
4567 		.chained = true,
4568 		.chain_id = ALC269_FIXUP_DELL1_MIC_NO_PRESENCE
4569 	},
4570 	[ALC225_FIXUP_DELL1_MIC_NO_PRESENCE] = {
4571 		.type = HDA_FIXUP_VERBS,
4572 		.v.verbs = (const struct hda_verb[]) {
4573 			/* Disable pass-through path for FRONT 14h */
4574 			{ 0x20, AC_VERB_SET_COEF_INDEX, 0x36 },
4575 			{ 0x20, AC_VERB_SET_PROC_COEF, 0x57d7 },
4576 			{}
4577 		},
4578 		.chained = true,
4579 		.chain_id = ALC225_FIXUP_DISABLE_MIC_VREF
4580 	},
4581 	[ALC280_FIXUP_HP_HEADSET_MIC] = {
4582 		.type = HDA_FIXUP_FUNC,
4583 		.v.func = alc_fixup_disable_aamix,
4584 		.chained = true,
4585 		.chain_id = ALC269_FIXUP_HEADSET_MIC,
4586 	},
4587 	[ALC221_FIXUP_HP_FRONT_MIC] = {
4588 		.type = HDA_FIXUP_PINS,
4589 		.v.pins = (const struct hda_pintbl[]) {
4590 			{ 0x19, 0x02a19020 }, /* Front Mic */
4591 			{ }
4592 		},
4593 	},
4594 	[ALC292_FIXUP_TPT460] = {
4595 		.type = HDA_FIXUP_FUNC,
4596 		.v.func = alc_fixup_tpt440_dock,
4597 		.chained = true,
4598 		.chain_id = ALC293_FIXUP_LENOVO_SPK_NOISE,
4599 	},
4600 	[ALC298_FIXUP_SPK_VOLUME] = {
4601 		.type = HDA_FIXUP_FUNC,
4602 		.v.func = alc298_fixup_speaker_volume,
4603 		.chained = true,
4604 		.chain_id = ALC298_FIXUP_DELL_AIO_MIC_NO_PRESENCE,
4605 	},
4606 	[ALC298_FIXUP_LENOVO_SPK_VOLUME] = {
4607 		.type = HDA_FIXUP_FUNC,
4608 		.v.func = alc298_fixup_speaker_volume,
4609 	},
4610 	[ALC295_FIXUP_DISABLE_DAC3] = {
4611 		.type = HDA_FIXUP_FUNC,
4612 		.v.func = alc295_fixup_disable_dac3,
4613 	},
4614 	[ALC285_FIXUP_SPEAKER2_TO_DAC1] = {
4615 		.type = HDA_FIXUP_FUNC,
4616 		.v.func = alc285_fixup_speaker2_to_dac1,
4617 		.chained = true,
4618 		.chain_id = ALC269_FIXUP_THINKPAD_ACPI
4619 	},
4620 	[ALC285_FIXUP_ASUS_SPEAKER2_TO_DAC1] = {
4621 		.type = HDA_FIXUP_FUNC,
4622 		.v.func = alc285_fixup_speaker2_to_dac1,
4623 		.chained = true,
4624 		.chain_id = ALC245_FIXUP_CS35L41_SPI_2
4625 	},
4626 	[ALC285_FIXUP_ASUS_HEADSET_MIC] = {
4627 		.type = HDA_FIXUP_PINS,
4628 		.v.pins = (const struct hda_pintbl[]) {
4629 			{ 0x19, 0x03a11050 },
4630 			{ 0x1b, 0x03a11c30 },
4631 			{ }
4632 		},
4633 		.chained = true,
4634 		.chain_id = ALC285_FIXUP_ASUS_SPEAKER2_TO_DAC1
4635 	},
4636 	[ALC285_FIXUP_ASUS_SPI_REAR_SPEAKERS] = {
4637 		.type = HDA_FIXUP_PINS,
4638 		.v.pins = (const struct hda_pintbl[]) {
4639 			{ 0x14, 0x90170120 },
4640 			{ }
4641 		},
4642 		.chained = true,
4643 		.chain_id = ALC285_FIXUP_ASUS_HEADSET_MIC
4644 	},
4645 	[ALC285_FIXUP_ASUS_I2C_SPEAKER2_TO_DAC1] = {
4646 		.type = HDA_FIXUP_FUNC,
4647 		.v.func = alc285_fixup_speaker2_to_dac1,
4648 		.chained = true,
4649 		.chain_id = ALC287_FIXUP_CS35L41_I2C_2
4650 	},
4651 	[ALC285_FIXUP_ASUS_I2C_HEADSET_MIC] = {
4652 		.type = HDA_FIXUP_PINS,
4653 		.v.pins = (const struct hda_pintbl[]) {
4654 			{ 0x19, 0x03a11050 },
4655 			{ 0x1b, 0x03a11c30 },
4656 			{ }
4657 		},
4658 		.chained = true,
4659 		.chain_id = ALC285_FIXUP_ASUS_I2C_SPEAKER2_TO_DAC1
4660 	},
4661 	[ALC256_FIXUP_DELL_INSPIRON_7559_SUBWOOFER] = {
4662 		.type = HDA_FIXUP_PINS,
4663 		.v.pins = (const struct hda_pintbl[]) {
4664 			{ 0x1b, 0x90170151 },
4665 			{ }
4666 		},
4667 		.chained = true,
4668 		.chain_id = ALC255_FIXUP_DELL1_MIC_NO_PRESENCE
4669 	},
4670 	[ALC269_FIXUP_ATIV_BOOK_8] = {
4671 		.type = HDA_FIXUP_FUNC,
4672 		.v.func = alc_fixup_auto_mute_via_amp,
4673 		.chained = true,
4674 		.chain_id = ALC269_FIXUP_NO_SHUTUP
4675 	},
4676 	[ALC221_FIXUP_HP_288PRO_MIC_NO_PRESENCE] = {
4677 		.type = HDA_FIXUP_PINS,
4678 		.v.pins = (const struct hda_pintbl[]) {
4679 			{ 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */
4680 			{ 0x1a, 0x01813030 }, /* use as headphone mic, without its own jack detect */
4681 			{ }
4682 		},
4683 		.chained = true,
4684 		.chain_id = ALC269_FIXUP_HEADSET_MODE
4685 	},
4686 	[ALC221_FIXUP_HP_MIC_NO_PRESENCE] = {
4687 		.type = HDA_FIXUP_PINS,
4688 		.v.pins = (const struct hda_pintbl[]) {
4689 			{ 0x18, 0x01a1913c }, /* use as headset mic, without its own jack detect */
4690 			{ 0x1a, 0x01a1913d }, /* use as headphone mic, without its own jack detect */
4691 			{ }
4692 		},
4693 		.chained = true,
4694 		.chain_id = ALC269_FIXUP_HEADSET_MODE
4695 	},
4696 	[ALC256_FIXUP_ASUS_HEADSET_MODE] = {
4697 		.type = HDA_FIXUP_FUNC,
4698 		.v.func = alc_fixup_headset_mode,
4699 	},
4700 	[ALC256_FIXUP_ASUS_MIC] = {
4701 		.type = HDA_FIXUP_PINS,
4702 		.v.pins = (const struct hda_pintbl[]) {
4703 			{ 0x13, 0x90a60160 }, /* use as internal mic */
4704 			{ 0x19, 0x04a11120 }, /* use as headset mic, without its own jack detect */
4705 			{ }
4706 		},
4707 		.chained = true,
4708 		.chain_id = ALC256_FIXUP_ASUS_HEADSET_MODE
4709 	},
4710 	[ALC256_FIXUP_ASUS_AIO_GPIO2] = {
4711 		.type = HDA_FIXUP_FUNC,
4712 		/* Set up GPIO2 for the speaker amp */
4713 		.v.func = alc_fixup_gpio4,
4714 	},
4715 	[ALC233_FIXUP_ASUS_MIC_NO_PRESENCE] = {
4716 		.type = HDA_FIXUP_PINS,
4717 		.v.pins = (const struct hda_pintbl[]) {
4718 			{ 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */
4719 			{ }
4720 		},
4721 		.chained = true,
4722 		.chain_id = ALC269_FIXUP_HEADSET_MIC
4723 	},
4724 	[ALC233_FIXUP_EAPD_COEF_AND_MIC_NO_PRESENCE] = {
4725 		.type = HDA_FIXUP_VERBS,
4726 		.v.verbs = (const struct hda_verb[]) {
4727 			/* Enables internal speaker */
4728 			{0x20, AC_VERB_SET_COEF_INDEX, 0x40},
4729 			{0x20, AC_VERB_SET_PROC_COEF, 0x8800},
4730 			{}
4731 		},
4732 		.chained = true,
4733 		.chain_id = ALC233_FIXUP_ASUS_MIC_NO_PRESENCE
4734 	},
4735 	[ALC233_FIXUP_LENOVO_MULTI_CODECS] = {
4736 		.type = HDA_FIXUP_FUNC,
4737 		.v.func = alc233_alc662_fixup_lenovo_dual_codecs,
4738 		.chained = true,
4739 		.chain_id = ALC269_FIXUP_GPIO2
4740 	},
4741 	[ALC233_FIXUP_ACER_HEADSET_MIC] = {
4742 		.type = HDA_FIXUP_VERBS,
4743 		.v.verbs = (const struct hda_verb[]) {
4744 			{ 0x20, AC_VERB_SET_COEF_INDEX, 0x45 },
4745 			{ 0x20, AC_VERB_SET_PROC_COEF, 0x5089 },
4746 			{ }
4747 		},
4748 		.chained = true,
4749 		.chain_id = ALC233_FIXUP_ASUS_MIC_NO_PRESENCE
4750 	},
4751 	[ALC294_FIXUP_LENOVO_MIC_LOCATION] = {
4752 		.type = HDA_FIXUP_PINS,
4753 		.v.pins = (const struct hda_pintbl[]) {
4754 			/* Change the mic location from front to right, otherwise there are
4755 			   two front mics with the same name, pulseaudio can't handle them.
4756 			   This is just a temporary workaround, after applying this fixup,
4757 			   there will be one "Front Mic" and one "Mic" in this machine.
4758 			 */
4759 			{ 0x1a, 0x04a19040 },
4760 			{ }
4761 		},
4762 	},
4763 	[ALC225_FIXUP_DELL_WYSE_MIC_NO_PRESENCE] = {
4764 		.type = HDA_FIXUP_PINS,
4765 		.v.pins = (const struct hda_pintbl[]) {
4766 			{ 0x16, 0x0101102f }, /* Rear Headset HP */
4767 			{ 0x19, 0x02a1913c }, /* use as Front headset mic, without its own jack detect */
4768 			{ 0x1a, 0x01a19030 }, /* Rear Headset MIC */
4769 			{ 0x1b, 0x02011020 },
4770 			{ }
4771 		},
4772 		.chained = true,
4773 		.chain_id = ALC225_FIXUP_S3_POP_NOISE
4774 	},
4775 	[ALC225_FIXUP_S3_POP_NOISE] = {
4776 		.type = HDA_FIXUP_FUNC,
4777 		.v.func = alc225_fixup_s3_pop_noise,
4778 		.chained = true,
4779 		.chain_id = ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC
4780 	},
4781 	[ALC700_FIXUP_INTEL_REFERENCE] = {
4782 		.type = HDA_FIXUP_VERBS,
4783 		.v.verbs = (const struct hda_verb[]) {
4784 			/* Enables internal speaker */
4785 			{0x20, AC_VERB_SET_COEF_INDEX, 0x45},
4786 			{0x20, AC_VERB_SET_PROC_COEF, 0x5289},
4787 			{0x20, AC_VERB_SET_COEF_INDEX, 0x4A},
4788 			{0x20, AC_VERB_SET_PROC_COEF, 0x001b},
4789 			{0x58, AC_VERB_SET_COEF_INDEX, 0x00},
4790 			{0x58, AC_VERB_SET_PROC_COEF, 0x3888},
4791 			{0x20, AC_VERB_SET_COEF_INDEX, 0x6f},
4792 			{0x20, AC_VERB_SET_PROC_COEF, 0x2c0b},
4793 			{}
4794 		}
4795 	},
4796 	[ALC274_FIXUP_DELL_BIND_DACS] = {
4797 		.type = HDA_FIXUP_FUNC,
4798 		.v.func = alc274_fixup_bind_dacs,
4799 		.chained = true,
4800 		.chain_id = ALC269_FIXUP_DELL1_MIC_NO_PRESENCE
4801 	},
4802 	[ALC274_FIXUP_DELL_AIO_LINEOUT_VERB] = {
4803 		.type = HDA_FIXUP_PINS,
4804 		.v.pins = (const struct hda_pintbl[]) {
4805 			{ 0x1b, 0x0401102f },
4806 			{ }
4807 		},
4808 		.chained = true,
4809 		.chain_id = ALC274_FIXUP_DELL_BIND_DACS
4810 	},
4811 	[ALC298_FIXUP_TPT470_DOCK_FIX] = {
4812 		.type = HDA_FIXUP_FUNC,
4813 		.v.func = alc_fixup_tpt470_dock,
4814 		.chained = true,
4815 		.chain_id = ALC293_FIXUP_LENOVO_SPK_NOISE
4816 	},
4817 	[ALC298_FIXUP_TPT470_DOCK] = {
4818 		.type = HDA_FIXUP_FUNC,
4819 		.v.func = alc_fixup_tpt470_dacs,
4820 		.chained = true,
4821 		.chain_id = ALC298_FIXUP_TPT470_DOCK_FIX
4822 	},
4823 	[ALC255_FIXUP_DUMMY_LINEOUT_VERB] = {
4824 		.type = HDA_FIXUP_PINS,
4825 		.v.pins = (const struct hda_pintbl[]) {
4826 			{ 0x14, 0x0201101f },
4827 			{ }
4828 		},
4829 		.chained = true,
4830 		.chain_id = ALC255_FIXUP_DELL1_MIC_NO_PRESENCE
4831 	},
4832 	[ALC255_FIXUP_DELL_HEADSET_MIC] = {
4833 		.type = HDA_FIXUP_PINS,
4834 		.v.pins = (const struct hda_pintbl[]) {
4835 			{ 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */
4836 			{ }
4837 		},
4838 		.chained = true,
4839 		.chain_id = ALC269_FIXUP_HEADSET_MIC
4840 	},
4841 	[ALC295_FIXUP_HP_X360] = {
4842 		.type = HDA_FIXUP_FUNC,
4843 		.v.func = alc295_fixup_hp_top_speakers,
4844 		.chained = true,
4845 		.chain_id = ALC269_FIXUP_HP_MUTE_LED_MIC3
4846 	},
4847 	[ALC221_FIXUP_HP_HEADSET_MIC] = {
4848 		.type = HDA_FIXUP_PINS,
4849 		.v.pins = (const struct hda_pintbl[]) {
4850 			{ 0x19, 0x0181313f},
4851 			{ }
4852 		},
4853 		.chained = true,
4854 		.chain_id = ALC269_FIXUP_HEADSET_MIC
4855 	},
4856 	[ALC285_FIXUP_LENOVO_HEADPHONE_NOISE] = {
4857 		.type = HDA_FIXUP_FUNC,
4858 		.v.func = alc285_fixup_invalidate_dacs,
4859 		.chained = true,
4860 		.chain_id = ALC269_FIXUP_THINKPAD_ACPI
4861 	},
4862 	[ALC295_FIXUP_HP_AUTO_MUTE] = {
4863 		.type = HDA_FIXUP_FUNC,
4864 		.v.func = alc_fixup_auto_mute_via_amp,
4865 	},
4866 	[ALC286_FIXUP_ACER_AIO_MIC_NO_PRESENCE] = {
4867 		.type = HDA_FIXUP_PINS,
4868 		.v.pins = (const struct hda_pintbl[]) {
4869 			{ 0x18, 0x01a1913c }, /* use as headset mic, without its own jack detect */
4870 			{ }
4871 		},
4872 		.chained = true,
4873 		.chain_id = ALC269_FIXUP_HEADSET_MIC
4874 	},
4875 	[ALC294_FIXUP_ASUS_MIC] = {
4876 		.type = HDA_FIXUP_PINS,
4877 		.v.pins = (const struct hda_pintbl[]) {
4878 			{ 0x13, 0x90a60160 }, /* use as internal mic */
4879 			{ 0x19, 0x04a11120 }, /* use as headset mic, without its own jack detect */
4880 			{ }
4881 		},
4882 		.chained = true,
4883 		.chain_id = ALC269_FIXUP_HEADSET_MIC
4884 	},
4885 	[ALC294_FIXUP_ASUS_HEADSET_MIC] = {
4886 		.type = HDA_FIXUP_PINS,
4887 		.v.pins = (const struct hda_pintbl[]) {
4888 			{ 0x19, 0x01a1103c }, /* use as headset mic */
4889 			{ }
4890 		},
4891 		.chained = true,
4892 		.chain_id = ALC269_FIXUP_HEADSET_MIC
4893 	},
4894 	[ALC294_FIXUP_ASUS_I2C_HEADSET_MIC] = {
4895 		.type = HDA_FIXUP_PINS,
4896 		.v.pins = (const struct hda_pintbl[]) {
4897 			{ 0x19, 0x03a19020 }, /* use as headset mic */
4898 			{ }
4899 		},
4900 		.chained = true,
4901 		.chain_id = ALC287_FIXUP_CS35L41_I2C_2
4902 	},
4903 	[ALC294_FIXUP_ASUS_SPK] = {
4904 		.type = HDA_FIXUP_VERBS,
4905 		.v.verbs = (const struct hda_verb[]) {
4906 			/* Set EAPD high */
4907 			{ 0x20, AC_VERB_SET_COEF_INDEX, 0x40 },
4908 			{ 0x20, AC_VERB_SET_PROC_COEF, 0x8800 },
4909 			{ 0x20, AC_VERB_SET_COEF_INDEX, 0x0f },
4910 			{ 0x20, AC_VERB_SET_PROC_COEF, 0x7774 },
4911 			{ }
4912 		},
4913 		.chained = true,
4914 		.chain_id = ALC294_FIXUP_ASUS_HEADSET_MIC
4915 	},
4916 	[ALC295_FIXUP_CHROME_BOOK] = {
4917 		.type = HDA_FIXUP_FUNC,
4918 		.v.func = alc295_fixup_chromebook,
4919 		.chained = true,
4920 		.chain_id = ALC225_FIXUP_HEADSET_JACK
4921 	},
4922 	[ALC225_FIXUP_HEADSET_JACK] = {
4923 		.type = HDA_FIXUP_FUNC,
4924 		.v.func = alc_fixup_headset_jack,
4925 	},
4926 	[ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE] = {
4927 		.type = HDA_FIXUP_PINS,
4928 		.v.pins = (const struct hda_pintbl[]) {
4929 			{ 0x1a, 0x01a1913c }, /* use as headset mic, without its own jack detect */
4930 			{ }
4931 		},
4932 		.chained = true,
4933 		.chain_id = ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC
4934 	},
4935 	[ALC285_FIXUP_LENOVO_PC_BEEP_IN_NOISE] = {
4936 		.type = HDA_FIXUP_VERBS,
4937 		.v.verbs = (const struct hda_verb[]) {
4938 			/* Disable PCBEEP-IN passthrough */
4939 			{ 0x20, AC_VERB_SET_COEF_INDEX, 0x36 },
4940 			{ 0x20, AC_VERB_SET_PROC_COEF, 0x57d7 },
4941 			{ }
4942 		},
4943 		.chained = true,
4944 		.chain_id = ALC285_FIXUP_LENOVO_HEADPHONE_NOISE
4945 	},
4946 	[ALC255_FIXUP_ACER_HEADSET_MIC] = {
4947 		.type = HDA_FIXUP_PINS,
4948 		.v.pins = (const struct hda_pintbl[]) {
4949 			{ 0x19, 0x03a11130 },
4950 			{ 0x1a, 0x90a60140 }, /* use as internal mic */
4951 			{ }
4952 		},
4953 		.chained = true,
4954 		.chain_id = ALC255_FIXUP_HEADSET_MODE_NO_HP_MIC
4955 	},
4956 	[ALC225_FIXUP_DELL_WYSE_AIO_MIC_NO_PRESENCE] = {
4957 		.type = HDA_FIXUP_PINS,
4958 		.v.pins = (const struct hda_pintbl[]) {
4959 			{ 0x16, 0x01011020 }, /* Rear Line out */
4960 			{ 0x19, 0x01a1913c }, /* use as Front headset mic, without its own jack detect */
4961 			{ }
4962 		},
4963 		.chained = true,
4964 		.chain_id = ALC225_FIXUP_WYSE_AUTO_MUTE
4965 	},
4966 	[ALC225_FIXUP_WYSE_AUTO_MUTE] = {
4967 		.type = HDA_FIXUP_FUNC,
4968 		.v.func = alc_fixup_auto_mute_via_amp,
4969 		.chained = true,
4970 		.chain_id = ALC225_FIXUP_WYSE_DISABLE_MIC_VREF
4971 	},
4972 	[ALC225_FIXUP_WYSE_DISABLE_MIC_VREF] = {
4973 		.type = HDA_FIXUP_FUNC,
4974 		.v.func = alc_fixup_disable_mic_vref,
4975 		.chained = true,
4976 		.chain_id = ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC
4977 	},
4978 	[ALC286_FIXUP_ACER_AIO_HEADSET_MIC] = {
4979 		.type = HDA_FIXUP_VERBS,
4980 		.v.verbs = (const struct hda_verb[]) {
4981 			{ 0x20, AC_VERB_SET_COEF_INDEX, 0x4f },
4982 			{ 0x20, AC_VERB_SET_PROC_COEF, 0x5029 },
4983 			{ }
4984 		},
4985 		.chained = true,
4986 		.chain_id = ALC286_FIXUP_ACER_AIO_MIC_NO_PRESENCE
4987 	},
4988 	[ALC256_FIXUP_ASUS_HEADSET_MIC] = {
4989 		.type = HDA_FIXUP_PINS,
4990 		.v.pins = (const struct hda_pintbl[]) {
4991 			{ 0x19, 0x03a11020 }, /* headset mic with jack detect */
4992 			{ }
4993 		},
4994 		.chained = true,
4995 		.chain_id = ALC256_FIXUP_ASUS_HEADSET_MODE
4996 	},
4997 	[ALC256_FIXUP_ASUS_MIC_NO_PRESENCE] = {
4998 		.type = HDA_FIXUP_PINS,
4999 		.v.pins = (const struct hda_pintbl[]) {
5000 			{ 0x19, 0x04a11120 }, /* use as headset mic, without its own jack detect */
5001 			{ }
5002 		},
5003 		.chained = true,
5004 		.chain_id = ALC256_FIXUP_ASUS_HEADSET_MODE
5005 	},
5006 	[ALC255_FIXUP_PREDATOR_SUBWOOFER] = {
5007 		.type = HDA_FIXUP_PINS,
5008 		.v.pins = (const struct hda_pintbl[]) {
5009 			{ 0x17, 0x90170151 }, /* use as internal speaker (LFE) */
5010 			{ 0x1b, 0x90170152 } /* use as internal speaker (back) */
5011 		}
5012 	},
5013 	[ALC299_FIXUP_PREDATOR_SPK] = {
5014 		.type = HDA_FIXUP_PINS,
5015 		.v.pins = (const struct hda_pintbl[]) {
5016 			{ 0x21, 0x90170150 }, /* use as headset mic, without its own jack detect */
5017 			{ }
5018 		}
5019 	},
5020 	[ALC287_FIXUP_PREDATOR_SPK_CS35L41_I2C_2] = {
5021 		.type = HDA_FIXUP_FUNC,
5022 		.v.func = cs35l41_fixup_i2c_two,
5023 		.chained = true,
5024 		.chain_id = ALC255_FIXUP_PREDATOR_SUBWOOFER
5025 	},
5026 	[ALC256_FIXUP_MEDION_HEADSET_NO_PRESENCE] = {
5027 		.type = HDA_FIXUP_PINS,
5028 		.v.pins = (const struct hda_pintbl[]) {
5029 			{ 0x19, 0x04a11040 },
5030 			{ 0x21, 0x04211020 },
5031 			{ }
5032 		},
5033 		.chained = true,
5034 		.chain_id = ALC256_FIXUP_ASUS_HEADSET_MODE
5035 	},
5036 	[ALC289_FIXUP_DELL_SPK1] = {
5037 		.type = HDA_FIXUP_PINS,
5038 		.v.pins = (const struct hda_pintbl[]) {
5039 			{ 0x14, 0x90170140 },
5040 			{ }
5041 		},
5042 		.chained = true,
5043 		.chain_id = ALC269_FIXUP_DELL4_MIC_NO_PRESENCE
5044 	},
5045 	[ALC289_FIXUP_DELL_SPK2] = {
5046 		.type = HDA_FIXUP_PINS,
5047 		.v.pins = (const struct hda_pintbl[]) {
5048 			{ 0x17, 0x90170130 }, /* bass spk */
5049 			{ }
5050 		},
5051 		.chained = true,
5052 		.chain_id = ALC269_FIXUP_DELL4_MIC_NO_PRESENCE
5053 	},
5054 	[ALC289_FIXUP_DUAL_SPK] = {
5055 		.type = HDA_FIXUP_FUNC,
5056 		.v.func = alc285_fixup_speaker2_to_dac1,
5057 		.chained = true,
5058 		.chain_id = ALC289_FIXUP_DELL_SPK2
5059 	},
5060 	[ALC289_FIXUP_RTK_AMP_DUAL_SPK] = {
5061 		.type = HDA_FIXUP_FUNC,
5062 		.v.func = alc285_fixup_speaker2_to_dac1,
5063 		.chained = true,
5064 		.chain_id = ALC289_FIXUP_DELL_SPK1
5065 	},
5066 	[ALC294_FIXUP_SPK2_TO_DAC1] = {
5067 		.type = HDA_FIXUP_FUNC,
5068 		.v.func = alc285_fixup_speaker2_to_dac1,
5069 		.chained = true,
5070 		.chain_id = ALC294_FIXUP_ASUS_HEADSET_MIC
5071 	},
5072 	[ALC294_FIXUP_ASUS_DUAL_SPK] = {
5073 		.type = HDA_FIXUP_FUNC,
5074 		/* The GPIO must be pulled to initialize the AMP */
5075 		.v.func = alc_fixup_gpio4,
5076 		.chained = true,
5077 		.chain_id = ALC294_FIXUP_SPK2_TO_DAC1
5078 	},
5079 	[ALC294_FIXUP_ASUS_ALLY] = {
5080 		.type = HDA_FIXUP_FUNC,
5081 		.v.func = cs35l41_fixup_i2c_two,
5082 		.chained = true,
5083 		.chain_id = ALC294_FIXUP_ASUS_ALLY_PINS
5084 	},
5085 	[ALC294_FIXUP_ASUS_ALLY_PINS] = {
5086 		.type = HDA_FIXUP_PINS,
5087 		.v.pins = (const struct hda_pintbl[]) {
5088 			{ 0x19, 0x03a11050 },
5089 			{ 0x1a, 0x03a11c30 },
5090 			{ 0x21, 0x03211420 },
5091 			{ }
5092 		},
5093 		.chained = true,
5094 		.chain_id = ALC294_FIXUP_ASUS_ALLY_VERBS
5095 	},
5096 	[ALC294_FIXUP_ASUS_ALLY_VERBS] = {
5097 		.type = HDA_FIXUP_VERBS,
5098 		.v.verbs = (const struct hda_verb[]) {
5099 			{ 0x20, AC_VERB_SET_COEF_INDEX, 0x45 },
5100 			{ 0x20, AC_VERB_SET_PROC_COEF, 0x5089 },
5101 			{ 0x20, AC_VERB_SET_COEF_INDEX, 0x46 },
5102 			{ 0x20, AC_VERB_SET_PROC_COEF, 0x0004 },
5103 			{ 0x20, AC_VERB_SET_COEF_INDEX, 0x47 },
5104 			{ 0x20, AC_VERB_SET_PROC_COEF, 0xa47a },
5105 			{ 0x20, AC_VERB_SET_COEF_INDEX, 0x49 },
5106 			{ 0x20, AC_VERB_SET_PROC_COEF, 0x0049},
5107 			{ 0x20, AC_VERB_SET_COEF_INDEX, 0x4a },
5108 			{ 0x20, AC_VERB_SET_PROC_COEF, 0x201b },
5109 			{ 0x20, AC_VERB_SET_COEF_INDEX, 0x6b },
5110 			{ 0x20, AC_VERB_SET_PROC_COEF, 0x4278},
5111 			{ }
5112 		},
5113 		.chained = true,
5114 		.chain_id = ALC294_FIXUP_ASUS_ALLY_SPEAKER
5115 	},
5116 	[ALC294_FIXUP_ASUS_ALLY_SPEAKER] = {
5117 		.type = HDA_FIXUP_FUNC,
5118 		.v.func = alc285_fixup_speaker2_to_dac1,
5119 	},
5120 	[ALC285_FIXUP_THINKPAD_X1_GEN7] = {
5121 		.type = HDA_FIXUP_FUNC,
5122 		.v.func = alc285_fixup_thinkpad_x1_gen7,
5123 		.chained = true,
5124 		.chain_id = ALC269_FIXUP_THINKPAD_ACPI
5125 	},
5126 	[ALC285_FIXUP_THINKPAD_HEADSET_JACK] = {
5127 		.type = HDA_FIXUP_FUNC,
5128 		.v.func = alc_fixup_headset_jack,
5129 		.chained = true,
5130 		.chain_id = ALC285_FIXUP_THINKPAD_X1_GEN7
5131 	},
5132 	[ALC294_FIXUP_ASUS_HPE] = {
5133 		.type = HDA_FIXUP_VERBS,
5134 		.v.verbs = (const struct hda_verb[]) {
5135 			/* Set EAPD high */
5136 			{ 0x20, AC_VERB_SET_COEF_INDEX, 0x0f },
5137 			{ 0x20, AC_VERB_SET_PROC_COEF, 0x7774 },
5138 			{ }
5139 		},
5140 		.chained = true,
5141 		.chain_id = ALC294_FIXUP_ASUS_HEADSET_MIC
5142 	},
5143 	[ALC294_FIXUP_ASUS_GX502_PINS] = {
5144 		.type = HDA_FIXUP_PINS,
5145 		.v.pins = (const struct hda_pintbl[]) {
5146 			{ 0x19, 0x03a11050 }, /* front HP mic */
5147 			{ 0x1a, 0x01a11830 }, /* rear external mic */
5148 			{ 0x21, 0x03211020 }, /* front HP out */
5149 			{ }
5150 		},
5151 		.chained = true,
5152 		.chain_id = ALC294_FIXUP_ASUS_GX502_VERBS
5153 	},
5154 	[ALC294_FIXUP_ASUS_GX502_VERBS] = {
5155 		.type = HDA_FIXUP_VERBS,
5156 		.v.verbs = (const struct hda_verb[]) {
5157 			/* set 0x15 to HP-OUT ctrl */
5158 			{ 0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, 0xc0 },
5159 			/* unmute the 0x15 amp */
5160 			{ 0x15, AC_VERB_SET_AMP_GAIN_MUTE, 0xb000 },
5161 			{ }
5162 		},
5163 		.chained = true,
5164 		.chain_id = ALC294_FIXUP_ASUS_GX502_HP
5165 	},
5166 	[ALC294_FIXUP_ASUS_GX502_HP] = {
5167 		.type = HDA_FIXUP_FUNC,
5168 		.v.func = alc294_fixup_gx502_hp,
5169 	},
5170 	[ALC294_FIXUP_ASUS_GU502_PINS] = {
5171 		.type = HDA_FIXUP_PINS,
5172 		.v.pins = (const struct hda_pintbl[]) {
5173 			{ 0x19, 0x01a11050 }, /* rear HP mic */
5174 			{ 0x1a, 0x01a11830 }, /* rear external mic */
5175 			{ 0x21, 0x012110f0 }, /* rear HP out */
5176 			{ }
5177 		},
5178 		.chained = true,
5179 		.chain_id = ALC294_FIXUP_ASUS_GU502_VERBS
5180 	},
5181 	[ALC294_FIXUP_ASUS_GU502_VERBS] = {
5182 		.type = HDA_FIXUP_VERBS,
5183 		.v.verbs = (const struct hda_verb[]) {
5184 			/* set 0x15 to HP-OUT ctrl */
5185 			{ 0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, 0xc0 },
5186 			/* unmute the 0x15 amp */
5187 			{ 0x15, AC_VERB_SET_AMP_GAIN_MUTE, 0xb000 },
5188 			/* set 0x1b to HP-OUT */
5189 			{ 0x1b, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x24 },
5190 			{ }
5191 		},
5192 		.chained = true,
5193 		.chain_id = ALC294_FIXUP_ASUS_GU502_HP
5194 	},
5195 	[ALC294_FIXUP_ASUS_GU502_HP] = {
5196 		.type = HDA_FIXUP_FUNC,
5197 		.v.func = alc294_fixup_gu502_hp,
5198 	},
5199 	 [ALC294_FIXUP_ASUS_G513_PINS] = {
5200 		.type = HDA_FIXUP_PINS,
5201 		.v.pins = (const struct hda_pintbl[]) {
5202 				{ 0x19, 0x03a11050 }, /* front HP mic */
5203 				{ 0x1a, 0x03a11c30 }, /* rear external mic */
5204 				{ 0x21, 0x03211420 }, /* front HP out */
5205 				{ }
5206 		},
5207 	},
5208 	[ALC285_FIXUP_ASUS_G533Z_PINS] = {
5209 		.type = HDA_FIXUP_PINS,
5210 		.v.pins = (const struct hda_pintbl[]) {
5211 			{ 0x14, 0x90170152 }, /* Speaker Surround Playback Switch */
5212 			{ 0x19, 0x03a19020 }, /* Mic Boost Volume */
5213 			{ 0x1a, 0x03a11c30 }, /* Mic Boost Volume */
5214 			{ 0x1e, 0x90170151 }, /* Rear jack, IN OUT EAPD Detect */
5215 			{ 0x21, 0x03211420 },
5216 			{ }
5217 		},
5218 	},
5219 	[ALC294_FIXUP_ASUS_COEF_1B] = {
5220 		.type = HDA_FIXUP_VERBS,
5221 		.v.verbs = (const struct hda_verb[]) {
5222 			/* Set bit 10 to correct noisy output after reboot from
5223 			 * Windows 10 (due to pop noise reduction?)
5224 			 */
5225 			{ 0x20, AC_VERB_SET_COEF_INDEX, 0x1b },
5226 			{ 0x20, AC_VERB_SET_PROC_COEF, 0x4e4b },
5227 			{ }
5228 		},
5229 		.chained = true,
5230 		.chain_id = ALC289_FIXUP_ASUS_GA401,
5231 	},
5232 	[ALC285_FIXUP_HP_GPIO_LED] = {
5233 		.type = HDA_FIXUP_FUNC,
5234 		.v.func = alc285_fixup_hp_gpio_led,
5235 	},
5236 	[ALC285_FIXUP_HP_MUTE_LED] = {
5237 		.type = HDA_FIXUP_FUNC,
5238 		.v.func = alc285_fixup_hp_mute_led,
5239 	},
5240 	[ALC285_FIXUP_HP_SPECTRE_X360_MUTE_LED] = {
5241 		.type = HDA_FIXUP_FUNC,
5242 		.v.func = alc285_fixup_hp_spectre_x360_mute_led,
5243 	},
5244 	[ALC285_FIXUP_HP_BEEP_MICMUTE_LED] = {
5245 		.type = HDA_FIXUP_FUNC,
5246 		.v.func = alc285_fixup_hp_beep,
5247 		.chained = true,
5248 		.chain_id = ALC285_FIXUP_HP_MUTE_LED,
5249 	},
5250 	[ALC236_FIXUP_HP_MUTE_LED_COEFBIT2] = {
5251 	    .type = HDA_FIXUP_FUNC,
5252 	    .v.func = alc236_fixup_hp_mute_led_coefbit2,
5253 	},
5254 	[ALC236_FIXUP_HP_GPIO_LED] = {
5255 		.type = HDA_FIXUP_FUNC,
5256 		.v.func = alc236_fixup_hp_gpio_led,
5257 	},
5258 	[ALC236_FIXUP_HP_MUTE_LED] = {
5259 		.type = HDA_FIXUP_FUNC,
5260 		.v.func = alc236_fixup_hp_mute_led,
5261 	},
5262 	[ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF] = {
5263 		.type = HDA_FIXUP_FUNC,
5264 		.v.func = alc236_fixup_hp_mute_led_micmute_vref,
5265 	},
5266 	[ALC236_FIXUP_LENOVO_INV_DMIC] = {
5267 		.type = HDA_FIXUP_FUNC,
5268 		.v.func = alc_fixup_inv_dmic,
5269 		.chained = true,
5270 		.chain_id = ALC283_FIXUP_INT_MIC,
5271 	},
5272 	[ALC295_FIXUP_HP_MUTE_LED_COEFBIT11] = {
5273 		.type = HDA_FIXUP_FUNC,
5274 		.v.func = alc295_fixup_hp_mute_led_coefbit11,
5275 	},
5276 	[ALC298_FIXUP_SAMSUNG_AMP] = {
5277 		.type = HDA_FIXUP_FUNC,
5278 		.v.func = alc298_fixup_samsung_amp,
5279 		.chained = true,
5280 		.chain_id = ALC298_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET
5281 	},
5282 	[ALC298_FIXUP_SAMSUNG_AMP_V2_2_AMPS] = {
5283 		.type = HDA_FIXUP_FUNC,
5284 		.v.func = alc298_fixup_samsung_amp_v2_2_amps
5285 	},
5286 	[ALC298_FIXUP_SAMSUNG_AMP_V2_4_AMPS] = {
5287 		.type = HDA_FIXUP_FUNC,
5288 		.v.func = alc298_fixup_samsung_amp_v2_4_amps
5289 	},
5290 	[ALC298_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET] = {
5291 		.type = HDA_FIXUP_VERBS,
5292 		.v.verbs = (const struct hda_verb[]) {
5293 			{ 0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL, 0xc5 },
5294 			{ }
5295 		},
5296 	},
5297 	[ALC256_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET] = {
5298 		.type = HDA_FIXUP_VERBS,
5299 		.v.verbs = (const struct hda_verb[]) {
5300 			{ 0x20, AC_VERB_SET_COEF_INDEX, 0x08},
5301 			{ 0x20, AC_VERB_SET_PROC_COEF, 0x2fcf},
5302 			{ }
5303 		},
5304 	},
5305 	[ALC295_FIXUP_ASUS_MIC_NO_PRESENCE] = {
5306 		.type = HDA_FIXUP_PINS,
5307 		.v.pins = (const struct hda_pintbl[]) {
5308 			{ 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */
5309 			{ }
5310 		},
5311 		.chained = true,
5312 		.chain_id = ALC269_FIXUP_HEADSET_MODE
5313 	},
5314 	[ALC269VC_FIXUP_ACER_VCOPPERBOX_PINS] = {
5315 		.type = HDA_FIXUP_PINS,
5316 		.v.pins = (const struct hda_pintbl[]) {
5317 			{ 0x14, 0x90100120 }, /* use as internal speaker */
5318 			{ 0x18, 0x02a111f0 }, /* use as headset mic, without its own jack detect */
5319 			{ 0x1a, 0x01011020 }, /* use as line out */
5320 			{ },
5321 		},
5322 		.chained = true,
5323 		.chain_id = ALC269_FIXUP_HEADSET_MIC
5324 	},
5325 	[ALC269VC_FIXUP_ACER_HEADSET_MIC] = {
5326 		.type = HDA_FIXUP_PINS,
5327 		.v.pins = (const struct hda_pintbl[]) {
5328 			{ 0x18, 0x02a11030 }, /* use as headset mic */
5329 			{ }
5330 		},
5331 		.chained = true,
5332 		.chain_id = ALC269_FIXUP_HEADSET_MIC
5333 	},
5334 	[ALC269VC_FIXUP_ACER_MIC_NO_PRESENCE] = {
5335 		.type = HDA_FIXUP_PINS,
5336 		.v.pins = (const struct hda_pintbl[]) {
5337 			{ 0x18, 0x01a11130 }, /* use as headset mic, without its own jack detect */
5338 			{ }
5339 		},
5340 		.chained = true,
5341 		.chain_id = ALC269_FIXUP_HEADSET_MIC
5342 	},
5343 	[ALC289_FIXUP_ASUS_GA401] = {
5344 		.type = HDA_FIXUP_FUNC,
5345 		.v.func = alc289_fixup_asus_ga401,
5346 		.chained = true,
5347 		.chain_id = ALC289_FIXUP_ASUS_GA502,
5348 	},
5349 	[ALC289_FIXUP_ASUS_GA502] = {
5350 		.type = HDA_FIXUP_PINS,
5351 		.v.pins = (const struct hda_pintbl[]) {
5352 			{ 0x19, 0x03a11020 }, /* headset mic with jack detect */
5353 			{ }
5354 		},
5355 	},
5356 	[ALC256_FIXUP_ACER_MIC_NO_PRESENCE] = {
5357 		.type = HDA_FIXUP_PINS,
5358 		.v.pins = (const struct hda_pintbl[]) {
5359 			{ 0x19, 0x02a11120 }, /* use as headset mic, without its own jack detect */
5360 			{ }
5361 		},
5362 		.chained = true,
5363 		.chain_id = ALC256_FIXUP_ASUS_HEADSET_MODE
5364 	},
5365 	[ALC285_FIXUP_HP_GPIO_AMP_INIT] = {
5366 		.type = HDA_FIXUP_FUNC,
5367 		.v.func = alc285_fixup_hp_gpio_amp_init,
5368 		.chained = true,
5369 		.chain_id = ALC285_FIXUP_HP_GPIO_LED
5370 	},
5371 	[ALC269_FIXUP_CZC_B20] = {
5372 		.type = HDA_FIXUP_PINS,
5373 		.v.pins = (const struct hda_pintbl[]) {
5374 			{ 0x12, 0x411111f0 },
5375 			{ 0x14, 0x90170110 }, /* speaker */
5376 			{ 0x15, 0x032f1020 }, /* HP out */
5377 			{ 0x17, 0x411111f0 },
5378 			{ 0x18, 0x03ab1040 }, /* mic */
5379 			{ 0x19, 0xb7a7013f },
5380 			{ 0x1a, 0x0181305f },
5381 			{ 0x1b, 0x411111f0 },
5382 			{ 0x1d, 0x411111f0 },
5383 			{ 0x1e, 0x411111f0 },
5384 			{ }
5385 		},
5386 		.chain_id = ALC269_FIXUP_DMIC,
5387 	},
5388 	[ALC269_FIXUP_CZC_TMI] = {
5389 		.type = HDA_FIXUP_PINS,
5390 		.v.pins = (const struct hda_pintbl[]) {
5391 			{ 0x12, 0x4000c000 },
5392 			{ 0x14, 0x90170110 }, /* speaker */
5393 			{ 0x15, 0x0421401f }, /* HP out */
5394 			{ 0x17, 0x411111f0 },
5395 			{ 0x18, 0x04a19020 }, /* mic */
5396 			{ 0x19, 0x411111f0 },
5397 			{ 0x1a, 0x411111f0 },
5398 			{ 0x1b, 0x411111f0 },
5399 			{ 0x1d, 0x40448505 },
5400 			{ 0x1e, 0x411111f0 },
5401 			{ 0x20, 0x8000ffff },
5402 			{ }
5403 		},
5404 		.chain_id = ALC269_FIXUP_DMIC,
5405 	},
5406 	[ALC269_FIXUP_CZC_L101] = {
5407 		.type = HDA_FIXUP_PINS,
5408 		.v.pins = (const struct hda_pintbl[]) {
5409 			{ 0x12, 0x40000000 },
5410 			{ 0x14, 0x01014010 }, /* speaker */
5411 			{ 0x15, 0x411111f0 }, /* HP out */
5412 			{ 0x16, 0x411111f0 },
5413 			{ 0x18, 0x01a19020 }, /* mic */
5414 			{ 0x19, 0x02a19021 },
5415 			{ 0x1a, 0x0181302f },
5416 			{ 0x1b, 0x0221401f },
5417 			{ 0x1c, 0x411111f0 },
5418 			{ 0x1d, 0x4044c601 },
5419 			{ 0x1e, 0x411111f0 },
5420 			{ }
5421 		},
5422 		.chain_id = ALC269_FIXUP_DMIC,
5423 	},
5424 	[ALC269_FIXUP_LEMOTE_A1802] = {
5425 		.type = HDA_FIXUP_PINS,
5426 		.v.pins = (const struct hda_pintbl[]) {
5427 			{ 0x12, 0x40000000 },
5428 			{ 0x14, 0x90170110 }, /* speaker */
5429 			{ 0x17, 0x411111f0 },
5430 			{ 0x18, 0x03a19040 }, /* mic1 */
5431 			{ 0x19, 0x90a70130 }, /* mic2 */
5432 			{ 0x1a, 0x411111f0 },
5433 			{ 0x1b, 0x411111f0 },
5434 			{ 0x1d, 0x40489d2d },
5435 			{ 0x1e, 0x411111f0 },
5436 			{ 0x20, 0x0003ffff },
5437 			{ 0x21, 0x03214020 },
5438 			{ }
5439 		},
5440 		.chain_id = ALC269_FIXUP_DMIC,
5441 	},
5442 	[ALC269_FIXUP_LEMOTE_A190X] = {
5443 		.type = HDA_FIXUP_PINS,
5444 		.v.pins = (const struct hda_pintbl[]) {
5445 			{ 0x14, 0x99130110 }, /* speaker */
5446 			{ 0x15, 0x0121401f }, /* HP out */
5447 			{ 0x18, 0x01a19c20 }, /* rear  mic */
5448 			{ 0x19, 0x99a3092f }, /* front mic */
5449 			{ 0x1b, 0x0201401f }, /* front lineout */
5450 			{ }
5451 		},
5452 		.chain_id = ALC269_FIXUP_DMIC,
5453 	},
5454 	[ALC256_FIXUP_INTEL_NUC8_RUGGED] = {
5455 		.type = HDA_FIXUP_PINS,
5456 		.v.pins = (const struct hda_pintbl[]) {
5457 			{ 0x1b, 0x01a1913c }, /* use as headset mic, without its own jack detect */
5458 			{ }
5459 		},
5460 		.chained = true,
5461 		.chain_id = ALC269_FIXUP_HEADSET_MODE
5462 	},
5463 	[ALC256_FIXUP_INTEL_NUC10] = {
5464 		.type = HDA_FIXUP_PINS,
5465 		.v.pins = (const struct hda_pintbl[]) {
5466 			{ 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */
5467 			{ }
5468 		},
5469 		.chained = true,
5470 		.chain_id = ALC269_FIXUP_HEADSET_MODE
5471 	},
5472 	[ALC255_FIXUP_XIAOMI_HEADSET_MIC] = {
5473 		.type = HDA_FIXUP_VERBS,
5474 		.v.verbs = (const struct hda_verb[]) {
5475 			{ 0x20, AC_VERB_SET_COEF_INDEX, 0x45 },
5476 			{ 0x20, AC_VERB_SET_PROC_COEF, 0x5089 },
5477 			{ }
5478 		},
5479 		.chained = true,
5480 		.chain_id = ALC289_FIXUP_ASUS_GA502
5481 	},
5482 	[ALC274_FIXUP_HP_MIC] = {
5483 		.type = HDA_FIXUP_VERBS,
5484 		.v.verbs = (const struct hda_verb[]) {
5485 			{ 0x20, AC_VERB_SET_COEF_INDEX, 0x45 },
5486 			{ 0x20, AC_VERB_SET_PROC_COEF, 0x5089 },
5487 			{ }
5488 		},
5489 	},
5490 	[ALC274_FIXUP_HP_HEADSET_MIC] = {
5491 		.type = HDA_FIXUP_FUNC,
5492 		.v.func = alc274_fixup_hp_headset_mic,
5493 		.chained = true,
5494 		.chain_id = ALC274_FIXUP_HP_MIC
5495 	},
5496 	[ALC274_FIXUP_HP_ENVY_GPIO] = {
5497 		.type = HDA_FIXUP_FUNC,
5498 		.v.func = alc274_fixup_hp_envy_gpio,
5499 	},
5500 	[ALC274_FIXUP_ASUS_ZEN_AIO_27] = {
5501 		.type = HDA_FIXUP_VERBS,
5502 		.v.verbs = (const struct hda_verb[]) {
5503 			{ 0x20, AC_VERB_SET_COEF_INDEX, 0x10 },
5504 			{ 0x20, AC_VERB_SET_PROC_COEF, 0xc420 },
5505 			{ 0x20, AC_VERB_SET_COEF_INDEX, 0x40 },
5506 			{ 0x20, AC_VERB_SET_PROC_COEF, 0x8800 },
5507 			{ 0x20, AC_VERB_SET_COEF_INDEX, 0x49 },
5508 			{ 0x20, AC_VERB_SET_PROC_COEF, 0x0249 },
5509 			{ 0x20, AC_VERB_SET_COEF_INDEX, 0x4a },
5510 			{ 0x20, AC_VERB_SET_PROC_COEF, 0x202b },
5511 			{ 0x20, AC_VERB_SET_COEF_INDEX, 0x62 },
5512 			{ 0x20, AC_VERB_SET_PROC_COEF, 0xa007 },
5513 			{ 0x20, AC_VERB_SET_COEF_INDEX, 0x6b },
5514 			{ 0x20, AC_VERB_SET_PROC_COEF, 0x5060 },
5515 			{}
5516 		},
5517 		.chained = true,
5518 		.chain_id = ALC2XX_FIXUP_HEADSET_MIC,
5519 	},
5520 	[ALC256_FIXUP_ASUS_HPE] = {
5521 		.type = HDA_FIXUP_VERBS,
5522 		.v.verbs = (const struct hda_verb[]) {
5523 			/* Set EAPD high */
5524 			{ 0x20, AC_VERB_SET_COEF_INDEX, 0x0f },
5525 			{ 0x20, AC_VERB_SET_PROC_COEF, 0x7778 },
5526 			{ }
5527 		},
5528 		.chained = true,
5529 		.chain_id = ALC294_FIXUP_ASUS_HEADSET_MIC
5530 	},
5531 	[ALC285_FIXUP_THINKPAD_NO_BASS_SPK_HEADSET_JACK] = {
5532 		.type = HDA_FIXUP_FUNC,
5533 		.v.func = alc_fixup_headset_jack,
5534 		.chained = true,
5535 		.chain_id = ALC269_FIXUP_THINKPAD_ACPI
5536 	},
5537 	[ALC287_FIXUP_HP_GPIO_LED] = {
5538 		.type = HDA_FIXUP_FUNC,
5539 		.v.func = alc287_fixup_hp_gpio_led,
5540 	},
5541 	[ALC256_FIXUP_HP_HEADSET_MIC] = {
5542 		.type = HDA_FIXUP_FUNC,
5543 		.v.func = alc274_fixup_hp_headset_mic,
5544 	},
5545 	[ALC236_FIXUP_DELL_AIO_HEADSET_MIC] = {
5546 		.type = HDA_FIXUP_FUNC,
5547 		.v.func = alc_fixup_no_int_mic,
5548 		.chained = true,
5549 		.chain_id = ALC255_FIXUP_DELL1_MIC_NO_PRESENCE
5550 	},
5551 	[ALC282_FIXUP_ACER_DISABLE_LINEOUT] = {
5552 		.type = HDA_FIXUP_PINS,
5553 		.v.pins = (const struct hda_pintbl[]) {
5554 			{ 0x1b, 0x411111f0 },
5555 			{ 0x18, 0x01a1913c }, /* use as headset mic, without its own jack detect */
5556 			{ },
5557 		},
5558 		.chained = true,
5559 		.chain_id = ALC269_FIXUP_HEADSET_MODE
5560 	},
5561 	[ALC255_FIXUP_ACER_LIMIT_INT_MIC_BOOST] = {
5562 		.type = HDA_FIXUP_FUNC,
5563 		.v.func = alc269_fixup_limit_int_mic_boost,
5564 		.chained = true,
5565 		.chain_id = ALC255_FIXUP_ACER_MIC_NO_PRESENCE,
5566 	},
5567 	[ALC256_FIXUP_ACER_HEADSET_MIC] = {
5568 		.type = HDA_FIXUP_PINS,
5569 		.v.pins = (const struct hda_pintbl[]) {
5570 			{ 0x19, 0x02a1113c }, /* use as headset mic, without its own jack detect */
5571 			{ 0x1a, 0x90a1092f }, /* use as internal mic */
5572 			{ }
5573 		},
5574 		.chained = true,
5575 		.chain_id = ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC
5576 	},
5577 	[ALC285_FIXUP_IDEAPAD_S740_COEF] = {
5578 		.type = HDA_FIXUP_FUNC,
5579 		.v.func = alc285_fixup_ideapad_s740_coef,
5580 		.chained = true,
5581 		.chain_id = ALC269_FIXUP_THINKPAD_ACPI,
5582 	},
5583 	[ALC285_FIXUP_HP_LIMIT_INT_MIC_BOOST] = {
5584 		.type = HDA_FIXUP_FUNC,
5585 		.v.func = alc269_fixup_limit_int_mic_boost,
5586 		.chained = true,
5587 		.chain_id = ALC285_FIXUP_HP_MUTE_LED,
5588 	},
5589 	[ALC295_FIXUP_ASUS_DACS] = {
5590 		.type = HDA_FIXUP_FUNC,
5591 		.v.func = alc295_fixup_asus_dacs,
5592 	},
5593 	[ALC295_FIXUP_HP_OMEN] = {
5594 		.type = HDA_FIXUP_PINS,
5595 		.v.pins = (const struct hda_pintbl[]) {
5596 			{ 0x12, 0xb7a60130 },
5597 			{ 0x13, 0x40000000 },
5598 			{ 0x14, 0x411111f0 },
5599 			{ 0x16, 0x411111f0 },
5600 			{ 0x17, 0x90170110 },
5601 			{ 0x18, 0x411111f0 },
5602 			{ 0x19, 0x02a11030 },
5603 			{ 0x1a, 0x411111f0 },
5604 			{ 0x1b, 0x04a19030 },
5605 			{ 0x1d, 0x40600001 },
5606 			{ 0x1e, 0x411111f0 },
5607 			{ 0x21, 0x03211020 },
5608 			{}
5609 		},
5610 		.chained = true,
5611 		.chain_id = ALC269_FIXUP_HP_LINE1_MIC1_LED,
5612 	},
5613 	[ALC285_FIXUP_HP_SPECTRE_X360] = {
5614 		.type = HDA_FIXUP_FUNC,
5615 		.v.func = alc285_fixup_hp_spectre_x360,
5616 	},
5617 	[ALC285_FIXUP_HP_SPECTRE_X360_EB1] = {
5618 		.type = HDA_FIXUP_FUNC,
5619 		.v.func = alc285_fixup_hp_spectre_x360_eb1
5620 	},
5621 	[ALC285_FIXUP_HP_SPECTRE_X360_DF1] = {
5622 		.type = HDA_FIXUP_FUNC,
5623 		.v.func = alc285_fixup_hp_spectre_x360_df1
5624 	},
5625 	[ALC285_FIXUP_HP_ENVY_X360] = {
5626 		.type = HDA_FIXUP_FUNC,
5627 		.v.func = alc285_fixup_hp_envy_x360,
5628 		.chained = true,
5629 		.chain_id = ALC285_FIXUP_HP_GPIO_AMP_INIT,
5630 	},
5631 	[ALC287_FIXUP_IDEAPAD_BASS_SPK_AMP] = {
5632 		.type = HDA_FIXUP_FUNC,
5633 		.v.func = alc285_fixup_ideapad_s740_coef,
5634 		.chained = true,
5635 		.chain_id = ALC285_FIXUP_THINKPAD_HEADSET_JACK,
5636 	},
5637 	[ALC623_FIXUP_LENOVO_THINKSTATION_P340] = {
5638 		.type = HDA_FIXUP_FUNC,
5639 		.v.func = alc_fixup_no_shutup,
5640 		.chained = true,
5641 		.chain_id = ALC283_FIXUP_HEADSET_MIC,
5642 	},
5643 	[ALC255_FIXUP_ACER_HEADPHONE_AND_MIC] = {
5644 		.type = HDA_FIXUP_PINS,
5645 		.v.pins = (const struct hda_pintbl[]) {
5646 			{ 0x21, 0x03211030 }, /* Change the Headphone location to Left */
5647 			{ }
5648 		},
5649 		.chained = true,
5650 		.chain_id = ALC255_FIXUP_XIAOMI_HEADSET_MIC
5651 	},
5652 	[ALC236_FIXUP_HP_LIMIT_INT_MIC_BOOST] = {
5653 		.type = HDA_FIXUP_FUNC,
5654 		.v.func = alc269_fixup_limit_int_mic_boost,
5655 		.chained = true,
5656 		.chain_id = ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF,
5657 	},
5658 	[ALC285_FIXUP_LEGION_Y9000X_SPEAKERS] = {
5659 		.type = HDA_FIXUP_FUNC,
5660 		.v.func = alc285_fixup_ideapad_s740_coef,
5661 		.chained = true,
5662 		.chain_id = ALC285_FIXUP_LEGION_Y9000X_AUTOMUTE,
5663 	},
5664 	[ALC285_FIXUP_LEGION_Y9000X_AUTOMUTE] = {
5665 		.type = HDA_FIXUP_FUNC,
5666 		.v.func = alc287_fixup_legion_15imhg05_speakers,
5667 		.chained = true,
5668 		.chain_id = ALC269_FIXUP_THINKPAD_ACPI,
5669 	},
5670 	[ALC287_FIXUP_LEGION_15IMHG05_SPEAKERS] = {
5671 		.type = HDA_FIXUP_VERBS,
5672 		//.v.verbs = legion_15imhg05_coefs,
5673 		.v.verbs = (const struct hda_verb[]) {
5674 			 // set left speaker Legion 7i.
5675 			 { 0x20, AC_VERB_SET_COEF_INDEX, 0x24 },
5676 			 { 0x20, AC_VERB_SET_PROC_COEF, 0x41 },
5677 
5678 			 { 0x20, AC_VERB_SET_COEF_INDEX, 0x26 },
5679 			 { 0x20, AC_VERB_SET_PROC_COEF, 0xc },
5680 			 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
5681 			 { 0x20, AC_VERB_SET_PROC_COEF, 0x1a },
5682 			 { 0x20, AC_VERB_SET_PROC_COEF, 0xb020 },
5683 
5684 			 { 0x20, AC_VERB_SET_COEF_INDEX, 0x26 },
5685 			 { 0x20, AC_VERB_SET_PROC_COEF, 0x2 },
5686 			 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
5687 			 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
5688 			 { 0x20, AC_VERB_SET_PROC_COEF, 0xb020 },
5689 
5690 			 // set right speaker Legion 7i.
5691 			 { 0x20, AC_VERB_SET_COEF_INDEX, 0x24 },
5692 			 { 0x20, AC_VERB_SET_PROC_COEF, 0x42 },
5693 
5694 			 { 0x20, AC_VERB_SET_COEF_INDEX, 0x26 },
5695 			 { 0x20, AC_VERB_SET_PROC_COEF, 0xc },
5696 			 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
5697 			 { 0x20, AC_VERB_SET_PROC_COEF, 0x2a },
5698 			 { 0x20, AC_VERB_SET_PROC_COEF, 0xb020 },
5699 
5700 			 { 0x20, AC_VERB_SET_COEF_INDEX, 0x26 },
5701 			 { 0x20, AC_VERB_SET_PROC_COEF, 0x2 },
5702 			 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
5703 			 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
5704 			 { 0x20, AC_VERB_SET_PROC_COEF, 0xb020 },
5705 			 {}
5706 		},
5707 		.chained = true,
5708 		.chain_id = ALC287_FIXUP_LEGION_15IMHG05_AUTOMUTE,
5709 	},
5710 	[ALC287_FIXUP_LEGION_15IMHG05_AUTOMUTE] = {
5711 		.type = HDA_FIXUP_FUNC,
5712 		.v.func = alc287_fixup_legion_15imhg05_speakers,
5713 		.chained = true,
5714 		.chain_id = ALC269_FIXUP_HEADSET_MODE,
5715 	},
5716 	[ALC287_FIXUP_YOGA7_14ITL_SPEAKERS] = {
5717 		.type = HDA_FIXUP_VERBS,
5718 		.v.verbs = (const struct hda_verb[]) {
5719 			 // set left speaker Yoga 7i.
5720 			 { 0x20, AC_VERB_SET_COEF_INDEX, 0x24 },
5721 			 { 0x20, AC_VERB_SET_PROC_COEF, 0x41 },
5722 
5723 			 { 0x20, AC_VERB_SET_COEF_INDEX, 0x26 },
5724 			 { 0x20, AC_VERB_SET_PROC_COEF, 0xc },
5725 			 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
5726 			 { 0x20, AC_VERB_SET_PROC_COEF, 0x1a },
5727 			 { 0x20, AC_VERB_SET_PROC_COEF, 0xb020 },
5728 
5729 			 { 0x20, AC_VERB_SET_COEF_INDEX, 0x26 },
5730 			 { 0x20, AC_VERB_SET_PROC_COEF, 0x2 },
5731 			 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
5732 			 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
5733 			 { 0x20, AC_VERB_SET_PROC_COEF, 0xb020 },
5734 
5735 			 // set right speaker Yoga 7i.
5736 			 { 0x20, AC_VERB_SET_COEF_INDEX, 0x24 },
5737 			 { 0x20, AC_VERB_SET_PROC_COEF, 0x46 },
5738 
5739 			 { 0x20, AC_VERB_SET_COEF_INDEX, 0x26 },
5740 			 { 0x20, AC_VERB_SET_PROC_COEF, 0xc },
5741 			 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
5742 			 { 0x20, AC_VERB_SET_PROC_COEF, 0x2a },
5743 			 { 0x20, AC_VERB_SET_PROC_COEF, 0xb020 },
5744 
5745 			 { 0x20, AC_VERB_SET_COEF_INDEX, 0x26 },
5746 			 { 0x20, AC_VERB_SET_PROC_COEF, 0x2 },
5747 			 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
5748 			 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
5749 			 { 0x20, AC_VERB_SET_PROC_COEF, 0xb020 },
5750 			 {}
5751 		},
5752 		.chained = true,
5753 		.chain_id = ALC269_FIXUP_HEADSET_MODE,
5754 	},
5755 	[ALC298_FIXUP_LENOVO_C940_DUET7] = {
5756 		.type = HDA_FIXUP_FUNC,
5757 		.v.func = alc298_fixup_lenovo_c940_duet7,
5758 	},
5759 	[ALC287_FIXUP_13S_GEN2_SPEAKERS] = {
5760 		.type = HDA_FIXUP_VERBS,
5761 		.v.verbs = (const struct hda_verb[]) {
5762 			{ 0x20, AC_VERB_SET_COEF_INDEX, 0x24 },
5763 			{ 0x20, AC_VERB_SET_PROC_COEF, 0x41 },
5764 			{ 0x20, AC_VERB_SET_COEF_INDEX, 0x26 },
5765 			{ 0x20, AC_VERB_SET_PROC_COEF, 0x2 },
5766 			{ 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
5767 			{ 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
5768 			{ 0x20, AC_VERB_SET_PROC_COEF, 0xb020 },
5769 			{ 0x20, AC_VERB_SET_COEF_INDEX, 0x24 },
5770 			{ 0x20, AC_VERB_SET_PROC_COEF, 0x42 },
5771 			{ 0x20, AC_VERB_SET_COEF_INDEX, 0x26 },
5772 			{ 0x20, AC_VERB_SET_PROC_COEF, 0x2 },
5773 			{ 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
5774 			{ 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
5775 			{ 0x20, AC_VERB_SET_PROC_COEF, 0xb020 },
5776 			{}
5777 		},
5778 		.chained = true,
5779 		.chain_id = ALC269_FIXUP_HEADSET_MODE,
5780 	},
5781 	[ALC256_FIXUP_SET_COEF_DEFAULTS] = {
5782 		.type = HDA_FIXUP_FUNC,
5783 		.v.func = alc256_fixup_set_coef_defaults,
5784 	},
5785 	[ALC245_FIXUP_HP_GPIO_LED] = {
5786 		.type = HDA_FIXUP_FUNC,
5787 		.v.func = alc245_fixup_hp_gpio_led,
5788 	},
5789 	[ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE] = {
5790 		.type = HDA_FIXUP_PINS,
5791 		.v.pins = (const struct hda_pintbl[]) {
5792 			{ 0x19, 0x03a11120 }, /* use as headset mic, without its own jack detect */
5793 			{ }
5794 		},
5795 		.chained = true,
5796 		.chain_id = ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC,
5797 	},
5798 	[ALC233_FIXUP_NO_AUDIO_JACK] = {
5799 		.type = HDA_FIXUP_FUNC,
5800 		.v.func = alc233_fixup_no_audio_jack,
5801 	},
5802 	[ALC256_FIXUP_MIC_NO_PRESENCE_AND_RESUME] = {
5803 		.type = HDA_FIXUP_FUNC,
5804 		.v.func = alc256_fixup_mic_no_presence_and_resume,
5805 		.chained = true,
5806 		.chain_id = ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC
5807 	},
5808 	[ALC287_FIXUP_LEGION_16ACHG6] = {
5809 		.type = HDA_FIXUP_FUNC,
5810 		.v.func = alc287_fixup_legion_16achg6_speakers,
5811 	},
5812 	[ALC287_FIXUP_CS35L41_I2C_2] = {
5813 		.type = HDA_FIXUP_FUNC,
5814 		.v.func = cs35l41_fixup_i2c_two,
5815 	},
5816 	[ALC287_FIXUP_CS35L41_I2C_2_HP_GPIO_LED] = {
5817 		.type = HDA_FIXUP_FUNC,
5818 		.v.func = cs35l41_fixup_i2c_two,
5819 		.chained = true,
5820 		.chain_id = ALC285_FIXUP_HP_MUTE_LED,
5821 	},
5822 	[ALC287_FIXUP_CS35L41_I2C_4] = {
5823 		.type = HDA_FIXUP_FUNC,
5824 		.v.func = cs35l41_fixup_i2c_four,
5825 	},
5826 	[ALC245_FIXUP_CS35L41_SPI_2] = {
5827 		.type = HDA_FIXUP_FUNC,
5828 		.v.func = cs35l41_fixup_spi_two,
5829 	},
5830 	[ALC245_FIXUP_CS35L41_SPI_1] = {
5831 		.type = HDA_FIXUP_FUNC,
5832 		.v.func = cs35l41_fixup_spi_one,
5833 	},
5834 	[ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED] = {
5835 		.type = HDA_FIXUP_FUNC,
5836 		.v.func = cs35l41_fixup_spi_two,
5837 		.chained = true,
5838 		.chain_id = ALC285_FIXUP_HP_GPIO_LED,
5839 	},
5840 	[ALC245_FIXUP_CS35L41_SPI_4] = {
5841 		.type = HDA_FIXUP_FUNC,
5842 		.v.func = cs35l41_fixup_spi_four,
5843 	},
5844 	[ALC245_FIXUP_CS35L41_SPI_4_HP_GPIO_LED] = {
5845 		.type = HDA_FIXUP_FUNC,
5846 		.v.func = cs35l41_fixup_spi_four,
5847 		.chained = true,
5848 		.chain_id = ALC285_FIXUP_HP_GPIO_LED,
5849 	},
5850 	[ALC285_FIXUP_HP_SPEAKERS_MICMUTE_LED] = {
5851 		.type = HDA_FIXUP_VERBS,
5852 		.v.verbs = (const struct hda_verb[]) {
5853 			 { 0x20, AC_VERB_SET_COEF_INDEX, 0x19 },
5854 			 { 0x20, AC_VERB_SET_PROC_COEF, 0x8e11 },
5855 			 { }
5856 		},
5857 		.chained = true,
5858 		.chain_id = ALC285_FIXUP_HP_MUTE_LED,
5859 	},
5860 	[ALC269_FIXUP_DELL4_MIC_NO_PRESENCE_QUIET] = {
5861 		.type = HDA_FIXUP_FUNC,
5862 		.v.func = alc_fixup_dell4_mic_no_presence_quiet,
5863 		.chained = true,
5864 		.chain_id = ALC269_FIXUP_DELL4_MIC_NO_PRESENCE,
5865 	},
5866 	[ALC295_FIXUP_FRAMEWORK_LAPTOP_MIC_NO_PRESENCE] = {
5867 		.type = HDA_FIXUP_PINS,
5868 		.v.pins = (const struct hda_pintbl[]) {
5869 			{ 0x19, 0x02a1112c }, /* use as headset mic, without its own jack detect */
5870 			{ }
5871 		},
5872 		.chained = true,
5873 		.chain_id = ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC
5874 	},
5875 	[ALC287_FIXUP_LEGION_16ITHG6] = {
5876 		.type = HDA_FIXUP_FUNC,
5877 		.v.func = alc287_fixup_legion_16ithg6_speakers,
5878 	},
5879 	[ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK] = {
5880 		.type = HDA_FIXUP_VERBS,
5881 		.v.verbs = (const struct hda_verb[]) {
5882 			// enable left speaker
5883 			{ 0x20, AC_VERB_SET_COEF_INDEX, 0x24 },
5884 			{ 0x20, AC_VERB_SET_PROC_COEF, 0x41 },
5885 
5886 			{ 0x20, AC_VERB_SET_COEF_INDEX, 0x26 },
5887 			{ 0x20, AC_VERB_SET_PROC_COEF, 0xc },
5888 			{ 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
5889 			{ 0x20, AC_VERB_SET_PROC_COEF, 0x1a },
5890 			{ 0x20, AC_VERB_SET_PROC_COEF, 0xb020 },
5891 
5892 			{ 0x20, AC_VERB_SET_COEF_INDEX, 0x26 },
5893 			{ 0x20, AC_VERB_SET_PROC_COEF, 0xf },
5894 			{ 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
5895 			{ 0x20, AC_VERB_SET_PROC_COEF, 0x42 },
5896 			{ 0x20, AC_VERB_SET_PROC_COEF, 0xb020 },
5897 
5898 			{ 0x20, AC_VERB_SET_COEF_INDEX, 0x26 },
5899 			{ 0x20, AC_VERB_SET_PROC_COEF, 0x10 },
5900 			{ 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
5901 			{ 0x20, AC_VERB_SET_PROC_COEF, 0x40 },
5902 			{ 0x20, AC_VERB_SET_PROC_COEF, 0xb020 },
5903 
5904 			{ 0x20, AC_VERB_SET_COEF_INDEX, 0x26 },
5905 			{ 0x20, AC_VERB_SET_PROC_COEF, 0x2 },
5906 			{ 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
5907 			{ 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
5908 			{ 0x20, AC_VERB_SET_PROC_COEF, 0xb020 },
5909 
5910 			// enable right speaker
5911 			{ 0x20, AC_VERB_SET_COEF_INDEX, 0x24 },
5912 			{ 0x20, AC_VERB_SET_PROC_COEF, 0x46 },
5913 
5914 			{ 0x20, AC_VERB_SET_COEF_INDEX, 0x26 },
5915 			{ 0x20, AC_VERB_SET_PROC_COEF, 0xc },
5916 			{ 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
5917 			{ 0x20, AC_VERB_SET_PROC_COEF, 0x2a },
5918 			{ 0x20, AC_VERB_SET_PROC_COEF, 0xb020 },
5919 
5920 			{ 0x20, AC_VERB_SET_COEF_INDEX, 0x26 },
5921 			{ 0x20, AC_VERB_SET_PROC_COEF, 0xf },
5922 			{ 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
5923 			{ 0x20, AC_VERB_SET_PROC_COEF, 0x46 },
5924 			{ 0x20, AC_VERB_SET_PROC_COEF, 0xb020 },
5925 
5926 			{ 0x20, AC_VERB_SET_COEF_INDEX, 0x26 },
5927 			{ 0x20, AC_VERB_SET_PROC_COEF, 0x10 },
5928 			{ 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
5929 			{ 0x20, AC_VERB_SET_PROC_COEF, 0x44 },
5930 			{ 0x20, AC_VERB_SET_PROC_COEF, 0xb020 },
5931 
5932 			{ 0x20, AC_VERB_SET_COEF_INDEX, 0x26 },
5933 			{ 0x20, AC_VERB_SET_PROC_COEF, 0x2 },
5934 			{ 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
5935 			{ 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
5936 			{ 0x20, AC_VERB_SET_PROC_COEF, 0xb020 },
5937 
5938 			{ },
5939 		},
5940 	},
5941 	[ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK_PIN] = {
5942 		.type = HDA_FIXUP_FUNC,
5943 		.v.func = alc287_fixup_yoga9_14iap7_bass_spk_pin,
5944 		.chained = true,
5945 		.chain_id = ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK,
5946 	},
5947 	[ALC287_FIXUP_YOGA9_14IMH9_BASS_SPK_PIN] = {
5948 		.type = HDA_FIXUP_FUNC,
5949 		.v.func = alc287_fixup_yoga9_14iap7_bass_spk_pin,
5950 		.chained = true,
5951 		.chain_id = ALC287_FIXUP_CS35L41_I2C_2,
5952 	},
5953 	[ALC295_FIXUP_DELL_INSPIRON_TOP_SPEAKERS] = {
5954 		.type = HDA_FIXUP_FUNC,
5955 		.v.func = alc295_fixup_dell_inspiron_top_speakers,
5956 		.chained = true,
5957 		.chain_id = ALC269_FIXUP_DELL4_MIC_NO_PRESENCE,
5958 	},
5959 	[ALC236_FIXUP_DELL_DUAL_CODECS] = {
5960 		.type = HDA_FIXUP_PINS,
5961 		.v.func = alc1220_fixup_gb_dual_codecs,
5962 		.chained = true,
5963 		.chain_id = ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
5964 	},
5965 	[ALC287_FIXUP_CS35L41_I2C_2_THINKPAD_ACPI] = {
5966 		.type = HDA_FIXUP_FUNC,
5967 		.v.func = cs35l41_fixup_i2c_two,
5968 		.chained = true,
5969 		.chain_id = ALC285_FIXUP_THINKPAD_NO_BASS_SPK_HEADSET_JACK,
5970 	},
5971 	[ALC287_FIXUP_TAS2781_I2C] = {
5972 		.type = HDA_FIXUP_FUNC,
5973 		.v.func = tas2781_fixup_tias_i2c,
5974 		.chained = true,
5975 		.chain_id = ALC285_FIXUP_THINKPAD_HEADSET_JACK,
5976 	},
5977 	[ALC245_FIXUP_TAS2781_SPI_2] = {
5978 		.type = HDA_FIXUP_FUNC,
5979 		.v.func = tas2781_fixup_spi,
5980 		.chained = true,
5981 		.chain_id = ALC285_FIXUP_HP_GPIO_LED,
5982 	},
5983 	[ALC287_FIXUP_TXNW2781_I2C] = {
5984 		.type = HDA_FIXUP_FUNC,
5985 		.v.func = tas2781_fixup_txnw_i2c,
5986 		.chained = true,
5987 		.chain_id = ALC285_FIXUP_THINKPAD_HEADSET_JACK,
5988 	},
5989 	[ALC287_FIXUP_YOGA7_14ARB7_I2C] = {
5990 		.type = HDA_FIXUP_FUNC,
5991 		.v.func = yoga7_14arb7_fixup_i2c,
5992 		.chained = true,
5993 		.chain_id = ALC285_FIXUP_THINKPAD_HEADSET_JACK,
5994 	},
5995 	[ALC245_FIXUP_HP_MUTE_LED_COEFBIT] = {
5996 		.type = HDA_FIXUP_FUNC,
5997 		.v.func = alc245_fixup_hp_mute_led_coefbit,
5998 	},
5999 	[ALC245_FIXUP_HP_MUTE_LED_V1_COEFBIT] = {
6000 		.type = HDA_FIXUP_FUNC,
6001 		.v.func = alc245_fixup_hp_mute_led_v1_coefbit,
6002 	},
6003 	[ALC245_FIXUP_HP_X360_MUTE_LEDS] = {
6004 		.type = HDA_FIXUP_FUNC,
6005 		.v.func = alc245_fixup_hp_mute_led_coefbit,
6006 		.chained = true,
6007 		.chain_id = ALC245_FIXUP_HP_GPIO_LED
6008 	},
6009 	[ALC287_FIXUP_THINKPAD_I2S_SPK] = {
6010 		.type = HDA_FIXUP_FUNC,
6011 		.v.func = alc287_fixup_bind_dacs,
6012 		.chained = true,
6013 		.chain_id = ALC285_FIXUP_THINKPAD_NO_BASS_SPK_HEADSET_JACK,
6014 	},
6015 	[ALC287_FIXUP_MG_RTKC_CSAMP_CS35L41_I2C_THINKPAD] = {
6016 		.type = HDA_FIXUP_FUNC,
6017 		.v.func = alc287_fixup_bind_dacs,
6018 		.chained = true,
6019 		.chain_id = ALC287_FIXUP_CS35L41_I2C_2_THINKPAD_ACPI,
6020 	},
6021 	[ALC2XX_FIXUP_HEADSET_MIC] = {
6022 		.type = HDA_FIXUP_FUNC,
6023 		.v.func = alc2xx_fixup_headset_mic,
6024 	},
6025 	[ALC289_FIXUP_DELL_CS35L41_SPI_2] = {
6026 		.type = HDA_FIXUP_FUNC,
6027 		.v.func = cs35l41_fixup_spi_two,
6028 		.chained = true,
6029 		.chain_id = ALC289_FIXUP_DUAL_SPK
6030 	},
6031 	[ALC294_FIXUP_CS35L41_I2C_2] = {
6032 		.type = HDA_FIXUP_FUNC,
6033 		.v.func = cs35l41_fixup_i2c_two,
6034 	},
6035 	[ALC256_FIXUP_ACER_SFG16_MICMUTE_LED] = {
6036 		.type = HDA_FIXUP_FUNC,
6037 		.v.func = alc256_fixup_acer_sfg16_micmute_led,
6038 	},
6039 	[ALC256_FIXUP_HEADPHONE_AMP_VOL] = {
6040 		.type = HDA_FIXUP_FUNC,
6041 		.v.func = alc256_decrease_headphone_amp_val,
6042 	},
6043 	[ALC245_FIXUP_HP_SPECTRE_X360_EU0XXX] = {
6044 		.type = HDA_FIXUP_FUNC,
6045 		.v.func = alc245_fixup_hp_spectre_x360_eu0xxx,
6046 	},
6047 	[ALC245_FIXUP_HP_SPECTRE_X360_16_AA0XXX] = {
6048 		.type = HDA_FIXUP_FUNC,
6049 		.v.func = alc245_fixup_hp_spectre_x360_16_aa0xxx,
6050 	},
6051 	[ALC245_FIXUP_HP_ZBOOK_FIREFLY_G12A] = {
6052 		.type = HDA_FIXUP_FUNC,
6053 		.v.func = alc245_fixup_hp_zbook_firefly_g12a,
6054 	},
6055 	[ALC285_FIXUP_ASUS_GA403U] = {
6056 		.type = HDA_FIXUP_FUNC,
6057 		.v.func = alc285_fixup_asus_ga403u,
6058 	},
6059 	[ALC285_FIXUP_ASUS_GA403U_HEADSET_MIC] = {
6060 		.type = HDA_FIXUP_PINS,
6061 		.v.pins = (const struct hda_pintbl[]) {
6062 			{ 0x19, 0x03a11050 },
6063 			{ 0x1b, 0x03a11c30 },
6064 			{ }
6065 		},
6066 		.chained = true,
6067 		.chain_id = ALC285_FIXUP_ASUS_GA403U_I2C_SPEAKER2_TO_DAC1
6068 	},
6069 	[ALC285_FIXUP_ASUS_GU605_SPI_SPEAKER2_TO_DAC1] = {
6070 		.type = HDA_FIXUP_FUNC,
6071 		.v.func = alc285_fixup_speaker2_to_dac1,
6072 		.chained = true,
6073 		.chain_id = ALC285_FIXUP_ASUS_GU605_SPI_2_HEADSET_MIC,
6074 	},
6075 	[ALC285_FIXUP_ASUS_GU605_SPI_2_HEADSET_MIC] = {
6076 		.type = HDA_FIXUP_PINS,
6077 		.v.pins = (const struct hda_pintbl[]) {
6078 			{ 0x19, 0x03a11050 },
6079 			{ 0x1b, 0x03a11c30 },
6080 			{ }
6081 		},
6082 	},
6083 	[ALC285_FIXUP_ASUS_GA403U_I2C_SPEAKER2_TO_DAC1] = {
6084 		.type = HDA_FIXUP_FUNC,
6085 		.v.func = alc285_fixup_speaker2_to_dac1,
6086 		.chained = true,
6087 		.chain_id = ALC285_FIXUP_ASUS_GA403U,
6088 	},
6089 	[ALC287_FIXUP_LENOVO_THKPAD_WH_ALC1318] = {
6090 		.type = HDA_FIXUP_FUNC,
6091 		.v.func = alc287_fixup_lenovo_thinkpad_with_alc1318,
6092 		.chained = true,
6093 		.chain_id = ALC269_FIXUP_THINKPAD_ACPI
6094 	},
6095 	[ALC256_FIXUP_CHROME_BOOK] = {
6096 		.type = HDA_FIXUP_FUNC,
6097 		.v.func = alc256_fixup_chromebook,
6098 		.chained = true,
6099 		.chain_id = ALC225_FIXUP_HEADSET_JACK
6100 	},
6101 	[ALC245_FIXUP_CLEVO_NOISY_MIC] = {
6102 		.type = HDA_FIXUP_FUNC,
6103 		.v.func = alc269_fixup_limit_int_mic_boost,
6104 		.chained = true,
6105 		.chain_id = ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE,
6106 	},
6107 	[ALC269_FIXUP_VAIO_VJFH52_MIC_NO_PRESENCE] = {
6108 		.type = HDA_FIXUP_PINS,
6109 		.v.pins = (const struct hda_pintbl[]) {
6110 			{ 0x19, 0x03a1113c }, /* use as headset mic, without its own jack detect */
6111 			{ 0x1b, 0x20a11040 }, /* dock mic */
6112 			{ }
6113 		},
6114 		.chained = true,
6115 		.chain_id = ALC269_FIXUP_LIMIT_INT_MIC_BOOST
6116 	},
6117 	[ALC233_FIXUP_MEDION_MTL_SPK] = {
6118 		.type = HDA_FIXUP_PINS,
6119 		.v.pins = (const struct hda_pintbl[]) {
6120 			{ 0x1b, 0x90170110 },
6121 			{ }
6122 		},
6123 	},
6124 	[ALC294_FIXUP_BASS_SPEAKER_15] = {
6125 		.type = HDA_FIXUP_FUNC,
6126 		.v.func = alc294_fixup_bass_speaker_15,
6127 	},
6128 	[ALC283_FIXUP_DELL_HP_RESUME] = {
6129 		.type = HDA_FIXUP_FUNC,
6130 		.v.func = alc283_fixup_dell_hp_resume,
6131 	},
6132 	[ALC294_FIXUP_ASUS_CS35L41_SPI_2] = {
6133 		.type = HDA_FIXUP_FUNC,
6134 		.v.func = cs35l41_fixup_spi_two,
6135 		.chained = true,
6136 		.chain_id = ALC294_FIXUP_ASUS_HEADSET_MIC,
6137 	},
6138 	[ALC274_FIXUP_HP_AIO_BIND_DACS] = {
6139 		.type = HDA_FIXUP_FUNC,
6140 		.v.func = alc274_fixup_hp_aio_bind_dacs,
6141 	},
6142 	[ALC285_FIXUP_ASUS_GA605K_HEADSET_MIC] = {
6143 		.type = HDA_FIXUP_PINS,
6144 		.v.pins = (const struct hda_pintbl[]) {
6145 			{ 0x19, 0x03a11050 },
6146 			{ 0x1b, 0x03a11c30 },
6147 			{ }
6148 		},
6149 		.chained = true,
6150 		.chain_id = ALC285_FIXUP_ASUS_GA605K_I2C_SPEAKER2_TO_DAC1
6151 	},
6152 	[ALC285_FIXUP_ASUS_GA605K_I2C_SPEAKER2_TO_DAC1] = {
6153 		.type = HDA_FIXUP_FUNC,
6154 		.v.func = alc285_fixup_speaker2_to_dac1,
6155 	},
6156 	[ALC269_FIXUP_POSITIVO_P15X_HEADSET_MIC] = {
6157 		.type = HDA_FIXUP_FUNC,
6158 		.v.func = alc269_fixup_limit_int_mic_boost,
6159 		.chained = true,
6160 		.chain_id = ALC269VC_FIXUP_ACER_MIC_NO_PRESENCE,
6161 	},
6162 };
6163 
6164 static const struct hda_quirk alc269_fixup_tbl[] = {
6165 	SND_PCI_QUIRK(0x1025, 0x0283, "Acer TravelMate 8371", ALC269_FIXUP_INV_DMIC),
6166 	SND_PCI_QUIRK(0x1025, 0x029b, "Acer 1810TZ", ALC269_FIXUP_INV_DMIC),
6167 	SND_PCI_QUIRK(0x1025, 0x0349, "Acer AOD260", ALC269_FIXUP_INV_DMIC),
6168 	SND_PCI_QUIRK(0x1025, 0x047c, "Acer AC700", ALC269_FIXUP_ACER_AC700),
6169 	SND_PCI_QUIRK(0x1025, 0x072d, "Acer Aspire V5-571G", ALC269_FIXUP_ASPIRE_HEADSET_MIC),
6170 	SND_PCI_QUIRK(0x1025, 0x0740, "Acer AO725", ALC271_FIXUP_HP_GATE_MIC_JACK),
6171 	SND_PCI_QUIRK(0x1025, 0x0742, "Acer AO756", ALC271_FIXUP_HP_GATE_MIC_JACK),
6172 	SND_PCI_QUIRK(0x1025, 0x0762, "Acer Aspire E1-472", ALC271_FIXUP_HP_GATE_MIC_JACK_E1_572),
6173 	SND_PCI_QUIRK(0x1025, 0x0775, "Acer Aspire E1-572", ALC271_FIXUP_HP_GATE_MIC_JACK_E1_572),
6174 	SND_PCI_QUIRK(0x1025, 0x079b, "Acer Aspire V5-573G", ALC282_FIXUP_ASPIRE_V5_PINS),
6175 	SND_PCI_QUIRK(0x1025, 0x080d, "Acer Aspire V5-122P", ALC269_FIXUP_ASPIRE_HEADSET_MIC),
6176 	SND_PCI_QUIRK(0x1025, 0x0840, "Acer Aspire E1", ALC269VB_FIXUP_ASPIRE_E1_COEF),
6177 	SND_PCI_QUIRK(0x1025, 0x100c, "Acer Aspire E5-574G", ALC255_FIXUP_ACER_LIMIT_INT_MIC_BOOST),
6178 	SND_PCI_QUIRK(0x1025, 0x101c, "Acer Veriton N2510G", ALC269_FIXUP_LIFEBOOK),
6179 	SND_PCI_QUIRK(0x1025, 0x102b, "Acer Aspire C24-860", ALC286_FIXUP_ACER_AIO_MIC_NO_PRESENCE),
6180 	SND_PCI_QUIRK(0x1025, 0x1065, "Acer Aspire C20-820", ALC269VC_FIXUP_ACER_HEADSET_MIC),
6181 	SND_PCI_QUIRK(0x1025, 0x106d, "Acer Cloudbook 14", ALC283_FIXUP_CHROME_BOOK),
6182 	SND_PCI_QUIRK(0x1025, 0x1094, "Acer Aspire E5-575T", ALC255_FIXUP_ACER_LIMIT_INT_MIC_BOOST),
6183 	SND_PCI_QUIRK(0x1025, 0x1099, "Acer Aspire E5-523G", ALC255_FIXUP_ACER_MIC_NO_PRESENCE),
6184 	SND_PCI_QUIRK(0x1025, 0x110e, "Acer Aspire ES1-432", ALC255_FIXUP_ACER_MIC_NO_PRESENCE),
6185 	SND_PCI_QUIRK(0x1025, 0x1166, "Acer Veriton N4640G", ALC269_FIXUP_LIFEBOOK),
6186 	SND_PCI_QUIRK(0x1025, 0x1167, "Acer Veriton N6640G", ALC269_FIXUP_LIFEBOOK),
6187 	SND_PCI_QUIRK(0x1025, 0x1177, "Acer Predator G9-593", ALC255_FIXUP_PREDATOR_SUBWOOFER),
6188 	SND_PCI_QUIRK(0x1025, 0x1178, "Acer Predator G9-593", ALC255_FIXUP_PREDATOR_SUBWOOFER),
6189 	SND_PCI_QUIRK(0x1025, 0x1246, "Acer Predator Helios 500", ALC299_FIXUP_PREDATOR_SPK),
6190 	SND_PCI_QUIRK(0x1025, 0x1247, "Acer vCopperbox", ALC269VC_FIXUP_ACER_VCOPPERBOX_PINS),
6191 	SND_PCI_QUIRK(0x1025, 0x1248, "Acer Veriton N4660G", ALC269VC_FIXUP_ACER_MIC_NO_PRESENCE),
6192 	SND_PCI_QUIRK(0x1025, 0x1269, "Acer SWIFT SF314-54", ALC256_FIXUP_ACER_HEADSET_MIC),
6193 	SND_PCI_QUIRK(0x1025, 0x126a, "Acer Swift SF114-32", ALC256_FIXUP_ACER_MIC_NO_PRESENCE),
6194 	SND_PCI_QUIRK(0x1025, 0x128f, "Acer Veriton Z6860G", ALC286_FIXUP_ACER_AIO_HEADSET_MIC),
6195 	SND_PCI_QUIRK(0x1025, 0x1290, "Acer Veriton Z4860G", ALC286_FIXUP_ACER_AIO_HEADSET_MIC),
6196 	SND_PCI_QUIRK(0x1025, 0x1291, "Acer Veriton Z4660G", ALC286_FIXUP_ACER_AIO_HEADSET_MIC),
6197 	SND_PCI_QUIRK(0x1025, 0x129c, "Acer SWIFT SF314-55", ALC256_FIXUP_ACER_HEADSET_MIC),
6198 	SND_PCI_QUIRK(0x1025, 0x129d, "Acer SWIFT SF313-51", ALC256_FIXUP_ACER_MIC_NO_PRESENCE),
6199 	SND_PCI_QUIRK(0x1025, 0x1300, "Acer SWIFT SF314-56", ALC256_FIXUP_ACER_MIC_NO_PRESENCE),
6200 	SND_PCI_QUIRK(0x1025, 0x1308, "Acer Aspire Z24-890", ALC286_FIXUP_ACER_AIO_HEADSET_MIC),
6201 	SND_PCI_QUIRK(0x1025, 0x132a, "Acer TravelMate B114-21", ALC233_FIXUP_ACER_HEADSET_MIC),
6202 	SND_PCI_QUIRK(0x1025, 0x1330, "Acer TravelMate X514-51T", ALC255_FIXUP_ACER_HEADSET_MIC),
6203 	SND_PCI_QUIRK(0x1025, 0x1360, "Acer Aspire A115", ALC255_FIXUP_ACER_MIC_NO_PRESENCE),
6204 	SND_PCI_QUIRK(0x1025, 0x141f, "Acer Spin SP513-54N", ALC255_FIXUP_ACER_MIC_NO_PRESENCE),
6205 	SND_PCI_QUIRK(0x1025, 0x142b, "Acer Swift SF314-42", ALC255_FIXUP_ACER_MIC_NO_PRESENCE),
6206 	SND_PCI_QUIRK(0x1025, 0x1430, "Acer TravelMate B311R-31", ALC256_FIXUP_ACER_MIC_NO_PRESENCE),
6207 	SND_PCI_QUIRK(0x1025, 0x1466, "Acer Aspire A515-56", ALC255_FIXUP_ACER_HEADPHONE_AND_MIC),
6208 	SND_PCI_QUIRK(0x1025, 0x1534, "Acer Predator PH315-54", ALC255_FIXUP_ACER_MIC_NO_PRESENCE),
6209 	SND_PCI_QUIRK(0x1025, 0x159c, "Acer Nitro 5 AN515-58", ALC2XX_FIXUP_HEADSET_MIC),
6210 	SND_PCI_QUIRK(0x1025, 0x169a, "Acer Swift SFG16", ALC256_FIXUP_ACER_SFG16_MICMUTE_LED),
6211 	SND_PCI_QUIRK(0x1025, 0x1826, "Acer Helios ZPC", ALC287_FIXUP_PREDATOR_SPK_CS35L41_I2C_2),
6212 	SND_PCI_QUIRK(0x1025, 0x182c, "Acer Helios ZPD", ALC287_FIXUP_PREDATOR_SPK_CS35L41_I2C_2),
6213 	SND_PCI_QUIRK(0x1025, 0x1844, "Acer Helios ZPS", ALC287_FIXUP_PREDATOR_SPK_CS35L41_I2C_2),
6214 	SND_PCI_QUIRK(0x1028, 0x0470, "Dell M101z", ALC269_FIXUP_DELL_M101Z),
6215 	SND_PCI_QUIRK(0x1028, 0x053c, "Dell Latitude E5430", ALC292_FIXUP_DELL_E7X),
6216 	SND_PCI_QUIRK(0x1028, 0x054b, "Dell XPS one 2710", ALC275_FIXUP_DELL_XPS),
6217 	SND_PCI_QUIRK(0x1028, 0x05bd, "Dell Latitude E6440", ALC292_FIXUP_DELL_E7X),
6218 	SND_PCI_QUIRK(0x1028, 0x05be, "Dell Latitude E6540", ALC292_FIXUP_DELL_E7X),
6219 	SND_PCI_QUIRK(0x1028, 0x05ca, "Dell Latitude E7240", ALC292_FIXUP_DELL_E7X),
6220 	SND_PCI_QUIRK(0x1028, 0x05cb, "Dell Latitude E7440", ALC292_FIXUP_DELL_E7X),
6221 	SND_PCI_QUIRK(0x1028, 0x05da, "Dell Vostro 5460", ALC290_FIXUP_SUBWOOFER),
6222 	SND_PCI_QUIRK(0x1028, 0x05f4, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE),
6223 	SND_PCI_QUIRK(0x1028, 0x05f5, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE),
6224 	SND_PCI_QUIRK(0x1028, 0x05f6, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE),
6225 	SND_PCI_QUIRK(0x1028, 0x0604, "Dell Venue 11 Pro 7130", ALC283_FIXUP_DELL_HP_RESUME),
6226 	SND_PCI_QUIRK(0x1028, 0x0615, "Dell Vostro 5470", ALC290_FIXUP_SUBWOOFER_HSJACK),
6227 	SND_PCI_QUIRK(0x1028, 0x0616, "Dell Vostro 5470", ALC290_FIXUP_SUBWOOFER_HSJACK),
6228 	SND_PCI_QUIRK(0x1028, 0x062c, "Dell Latitude E5550", ALC292_FIXUP_DELL_E7X),
6229 	SND_PCI_QUIRK(0x1028, 0x062e, "Dell Latitude E7450", ALC292_FIXUP_DELL_E7X),
6230 	SND_PCI_QUIRK(0x1028, 0x0638, "Dell Inspiron 5439", ALC290_FIXUP_MONO_SPEAKERS_HSJACK),
6231 	SND_PCI_QUIRK(0x1028, 0x064a, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE),
6232 	SND_PCI_QUIRK(0x1028, 0x064b, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE),
6233 	SND_PCI_QUIRK(0x1028, 0x0665, "Dell XPS 13", ALC288_FIXUP_DELL_XPS_13),
6234 	SND_PCI_QUIRK(0x1028, 0x0669, "Dell Optiplex 9020m", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE),
6235 	SND_PCI_QUIRK(0x1028, 0x069a, "Dell Vostro 5480", ALC290_FIXUP_SUBWOOFER_HSJACK),
6236 	SND_PCI_QUIRK(0x1028, 0x06c7, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE),
6237 	SND_PCI_QUIRK(0x1028, 0x06d9, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE),
6238 	SND_PCI_QUIRK(0x1028, 0x06da, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE),
6239 	SND_PCI_QUIRK(0x1028, 0x06db, "Dell", ALC293_FIXUP_DISABLE_AAMIX_MULTIJACK),
6240 	SND_PCI_QUIRK(0x1028, 0x06dd, "Dell", ALC293_FIXUP_DISABLE_AAMIX_MULTIJACK),
6241 	SND_PCI_QUIRK(0x1028, 0x06de, "Dell", ALC293_FIXUP_DISABLE_AAMIX_MULTIJACK),
6242 	SND_PCI_QUIRK(0x1028, 0x06df, "Dell", ALC293_FIXUP_DISABLE_AAMIX_MULTIJACK),
6243 	SND_PCI_QUIRK(0x1028, 0x06e0, "Dell", ALC293_FIXUP_DISABLE_AAMIX_MULTIJACK),
6244 	SND_PCI_QUIRK(0x1028, 0x0706, "Dell Inspiron 7559", ALC256_FIXUP_DELL_INSPIRON_7559_SUBWOOFER),
6245 	SND_PCI_QUIRK(0x1028, 0x0725, "Dell Inspiron 3162", ALC255_FIXUP_DELL_SPK_NOISE),
6246 	SND_PCI_QUIRK(0x1028, 0x0738, "Dell Precision 5820", ALC269_FIXUP_NO_SHUTUP),
6247 	SND_PCI_QUIRK(0x1028, 0x075c, "Dell XPS 27 7760", ALC298_FIXUP_SPK_VOLUME),
6248 	SND_PCI_QUIRK(0x1028, 0x075d, "Dell AIO", ALC298_FIXUP_SPK_VOLUME),
6249 	SND_PCI_QUIRK(0x1028, 0x0798, "Dell Inspiron 17 7000 Gaming", ALC256_FIXUP_DELL_INSPIRON_7559_SUBWOOFER),
6250 	SND_PCI_QUIRK(0x1028, 0x07b0, "Dell Precision 7520", ALC295_FIXUP_DISABLE_DAC3),
6251 	SND_PCI_QUIRK(0x1028, 0x080c, "Dell WYSE", ALC225_FIXUP_DELL_WYSE_MIC_NO_PRESENCE),
6252 	SND_PCI_QUIRK(0x1028, 0x084b, "Dell", ALC274_FIXUP_DELL_AIO_LINEOUT_VERB),
6253 	SND_PCI_QUIRK(0x1028, 0x084e, "Dell", ALC274_FIXUP_DELL_AIO_LINEOUT_VERB),
6254 	SND_PCI_QUIRK(0x1028, 0x0871, "Dell Precision 3630", ALC255_FIXUP_DELL_HEADSET_MIC),
6255 	SND_PCI_QUIRK(0x1028, 0x0872, "Dell Precision 3630", ALC255_FIXUP_DELL_HEADSET_MIC),
6256 	SND_PCI_QUIRK(0x1028, 0x0873, "Dell Precision 3930", ALC255_FIXUP_DUMMY_LINEOUT_VERB),
6257 	SND_PCI_QUIRK(0x1028, 0x0879, "Dell Latitude 5420 Rugged", ALC269_FIXUP_DELL4_MIC_NO_PRESENCE),
6258 	SND_PCI_QUIRK(0x1028, 0x08ad, "Dell WYSE AIO", ALC225_FIXUP_DELL_WYSE_AIO_MIC_NO_PRESENCE),
6259 	SND_PCI_QUIRK(0x1028, 0x08ae, "Dell WYSE NB", ALC225_FIXUP_DELL1_MIC_NO_PRESENCE),
6260 	SND_PCI_QUIRK(0x1028, 0x0935, "Dell", ALC274_FIXUP_DELL_AIO_LINEOUT_VERB),
6261 	SND_PCI_QUIRK(0x1028, 0x097d, "Dell Precision", ALC289_FIXUP_DUAL_SPK),
6262 	SND_PCI_QUIRK(0x1028, 0x097e, "Dell Precision", ALC289_FIXUP_DUAL_SPK),
6263 	SND_PCI_QUIRK(0x1028, 0x098d, "Dell Precision", ALC233_FIXUP_ASUS_MIC_NO_PRESENCE),
6264 	SND_PCI_QUIRK(0x1028, 0x09bf, "Dell Precision", ALC233_FIXUP_ASUS_MIC_NO_PRESENCE),
6265 	SND_PCI_QUIRK(0x1028, 0x0a2e, "Dell", ALC236_FIXUP_DELL_AIO_HEADSET_MIC),
6266 	SND_PCI_QUIRK(0x1028, 0x0a30, "Dell", ALC236_FIXUP_DELL_AIO_HEADSET_MIC),
6267 	SND_PCI_QUIRK(0x1028, 0x0a38, "Dell Latitude 7520", ALC269_FIXUP_DELL4_MIC_NO_PRESENCE_QUIET),
6268 	SND_PCI_QUIRK(0x1028, 0x0a58, "Dell", ALC255_FIXUP_DELL_HEADSET_MIC),
6269 	SND_PCI_QUIRK(0x1028, 0x0a61, "Dell XPS 15 9510", ALC289_FIXUP_DUAL_SPK),
6270 	SND_PCI_QUIRK(0x1028, 0x0a62, "Dell Precision 5560", ALC289_FIXUP_DUAL_SPK),
6271 	SND_PCI_QUIRK(0x1028, 0x0a9d, "Dell Latitude 5430", ALC269_FIXUP_DELL4_MIC_NO_PRESENCE),
6272 	SND_PCI_QUIRK(0x1028, 0x0a9e, "Dell Latitude 5430", ALC269_FIXUP_DELL4_MIC_NO_PRESENCE),
6273 	SND_PCI_QUIRK(0x1028, 0x0b19, "Dell XPS 15 9520", ALC289_FIXUP_DUAL_SPK),
6274 	SND_PCI_QUIRK(0x1028, 0x0b1a, "Dell Precision 5570", ALC289_FIXUP_DUAL_SPK),
6275 	SND_PCI_QUIRK(0x1028, 0x0b27, "Dell", ALC245_FIXUP_CS35L41_SPI_2),
6276 	SND_PCI_QUIRK(0x1028, 0x0b28, "Dell", ALC245_FIXUP_CS35L41_SPI_2),
6277 	SND_PCI_QUIRK(0x1028, 0x0b37, "Dell Inspiron 16 Plus 7620 2-in-1", ALC295_FIXUP_DELL_INSPIRON_TOP_SPEAKERS),
6278 	SND_PCI_QUIRK(0x1028, 0x0b71, "Dell Inspiron 16 Plus 7620", ALC295_FIXUP_DELL_INSPIRON_TOP_SPEAKERS),
6279 	SND_PCI_QUIRK(0x1028, 0x0beb, "Dell XPS 15 9530 (2023)", ALC289_FIXUP_DELL_CS35L41_SPI_2),
6280 	SND_PCI_QUIRK(0x1028, 0x0c03, "Dell Precision 5340", ALC269_FIXUP_DELL4_MIC_NO_PRESENCE),
6281 	SND_PCI_QUIRK(0x1028, 0x0c0b, "Dell Oasis 14 RPL-P", ALC289_FIXUP_RTK_AMP_DUAL_SPK),
6282 	SND_PCI_QUIRK(0x1028, 0x0c0d, "Dell Oasis", ALC289_FIXUP_RTK_AMP_DUAL_SPK),
6283 	SND_PCI_QUIRK(0x1028, 0x0c0e, "Dell Oasis 16", ALC289_FIXUP_RTK_AMP_DUAL_SPK),
6284 	SND_PCI_QUIRK(0x1028, 0x0c19, "Dell Precision 3340", ALC236_FIXUP_DELL_DUAL_CODECS),
6285 	SND_PCI_QUIRK(0x1028, 0x0c1a, "Dell Precision 3340", ALC236_FIXUP_DELL_DUAL_CODECS),
6286 	SND_PCI_QUIRK(0x1028, 0x0c1b, "Dell Precision 3440", ALC236_FIXUP_DELL_DUAL_CODECS),
6287 	SND_PCI_QUIRK(0x1028, 0x0c1c, "Dell Precision 3540", ALC236_FIXUP_DELL_DUAL_CODECS),
6288 	SND_PCI_QUIRK(0x1028, 0x0c1d, "Dell Precision 3440", ALC236_FIXUP_DELL_DUAL_CODECS),
6289 	SND_PCI_QUIRK(0x1028, 0x0c1e, "Dell Precision 3540", ALC236_FIXUP_DELL_DUAL_CODECS),
6290 	SND_PCI_QUIRK(0x1028, 0x0c28, "Dell Inspiron 16 Plus 7630", ALC295_FIXUP_DELL_INSPIRON_TOP_SPEAKERS),
6291 	SND_PCI_QUIRK(0x1028, 0x0c4d, "Dell", ALC287_FIXUP_CS35L41_I2C_4),
6292 	SND_PCI_QUIRK(0x1028, 0x0c94, "Dell Polaris 3 metal", ALC287_FIXUP_TAS2781_I2C),
6293 	SND_PCI_QUIRK(0x1028, 0x0c96, "Dell Polaris 2in1", ALC287_FIXUP_TAS2781_I2C),
6294 	SND_PCI_QUIRK(0x1028, 0x0cbd, "Dell Oasis 13 CS MTL-U", ALC289_FIXUP_DELL_CS35L41_SPI_2),
6295 	SND_PCI_QUIRK(0x1028, 0x0cbe, "Dell Oasis 13 2-IN-1 MTL-U", ALC289_FIXUP_DELL_CS35L41_SPI_2),
6296 	SND_PCI_QUIRK(0x1028, 0x0cbf, "Dell Oasis 13 Low Weight MTU-L", ALC289_FIXUP_DELL_CS35L41_SPI_2),
6297 	SND_PCI_QUIRK(0x1028, 0x0cc0, "Dell Oasis 13", ALC289_FIXUP_RTK_AMP_DUAL_SPK),
6298 	SND_PCI_QUIRK(0x1028, 0x0cc1, "Dell Oasis 14 MTL-H/U", ALC289_FIXUP_DELL_CS35L41_SPI_2),
6299 	SND_PCI_QUIRK(0x1028, 0x0cc2, "Dell Oasis 14 2-in-1 MTL-H/U", ALC289_FIXUP_DELL_CS35L41_SPI_2),
6300 	SND_PCI_QUIRK(0x1028, 0x0cc3, "Dell Oasis 14 Low Weight MTL-U", ALC289_FIXUP_DELL_CS35L41_SPI_2),
6301 	SND_PCI_QUIRK(0x1028, 0x0cc4, "Dell Oasis 16 MTL-H/U", ALC289_FIXUP_DELL_CS35L41_SPI_2),
6302 	SND_PCI_QUIRK(0x1028, 0x0cc5, "Dell Oasis 14", ALC289_FIXUP_RTK_AMP_DUAL_SPK),
6303 	SND_PCI_QUIRK(0x1028, 0x164a, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE),
6304 	SND_PCI_QUIRK(0x1028, 0x164b, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE),
6305 	SND_PCI_QUIRK(0x103c, 0x1586, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC2),
6306 	SND_PCI_QUIRK(0x103c, 0x18e6, "HP", ALC269_FIXUP_HP_GPIO_LED),
6307 	SND_PCI_QUIRK(0x103c, 0x218b, "HP", ALC269_FIXUP_LIMIT_INT_MIC_BOOST_MUTE_LED),
6308 	SND_PCI_QUIRK(0x103c, 0x21f9, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
6309 	SND_PCI_QUIRK(0x103c, 0x2210, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
6310 	SND_PCI_QUIRK(0x103c, 0x2214, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
6311 	SND_PCI_QUIRK(0x103c, 0x221b, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED),
6312 	SND_PCI_QUIRK(0x103c, 0x221c, "HP EliteBook 755 G2", ALC280_FIXUP_HP_HEADSET_MIC),
6313 	SND_PCI_QUIRK(0x103c, 0x2221, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED),
6314 	SND_PCI_QUIRK(0x103c, 0x2225, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED),
6315 	SND_PCI_QUIRK(0x103c, 0x2236, "HP", ALC269_FIXUP_HP_LINE1_MIC1_LED),
6316 	SND_PCI_QUIRK(0x103c, 0x2237, "HP", ALC269_FIXUP_HP_LINE1_MIC1_LED),
6317 	SND_PCI_QUIRK(0x103c, 0x2238, "HP", ALC269_FIXUP_HP_LINE1_MIC1_LED),
6318 	SND_PCI_QUIRK(0x103c, 0x2239, "HP", ALC269_FIXUP_HP_LINE1_MIC1_LED),
6319 	SND_PCI_QUIRK(0x103c, 0x224b, "HP", ALC269_FIXUP_HP_LINE1_MIC1_LED),
6320 	SND_PCI_QUIRK(0x103c, 0x2253, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED),
6321 	SND_PCI_QUIRK(0x103c, 0x2254, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED),
6322 	SND_PCI_QUIRK(0x103c, 0x2255, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED),
6323 	SND_PCI_QUIRK(0x103c, 0x2256, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED),
6324 	SND_PCI_QUIRK(0x103c, 0x2257, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED),
6325 	SND_PCI_QUIRK(0x103c, 0x2259, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED),
6326 	SND_PCI_QUIRK(0x103c, 0x225a, "HP", ALC269_FIXUP_HP_DOCK_GPIO_MIC1_LED),
6327 	SND_PCI_QUIRK(0x103c, 0x225f, "HP", ALC280_FIXUP_HP_GPIO2_MIC_HOTKEY),
6328 	SND_PCI_QUIRK(0x103c, 0x2260, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
6329 	SND_PCI_QUIRK(0x103c, 0x2263, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
6330 	SND_PCI_QUIRK(0x103c, 0x2264, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
6331 	SND_PCI_QUIRK(0x103c, 0x2265, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
6332 	SND_PCI_QUIRK(0x103c, 0x2268, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
6333 	SND_PCI_QUIRK(0x103c, 0x226a, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
6334 	SND_PCI_QUIRK(0x103c, 0x226b, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
6335 	SND_PCI_QUIRK(0x103c, 0x226e, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
6336 	SND_PCI_QUIRK(0x103c, 0x2271, "HP", ALC286_FIXUP_HP_GPIO_LED),
6337 	SND_PCI_QUIRK(0x103c, 0x2272, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED),
6338 	SND_PCI_QUIRK(0x103c, 0x2272, "HP", ALC280_FIXUP_HP_DOCK_PINS),
6339 	SND_PCI_QUIRK(0x103c, 0x2273, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED),
6340 	SND_PCI_QUIRK(0x103c, 0x2273, "HP", ALC280_FIXUP_HP_DOCK_PINS),
6341 	SND_PCI_QUIRK(0x103c, 0x2278, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED),
6342 	SND_PCI_QUIRK(0x103c, 0x227f, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
6343 	SND_PCI_QUIRK(0x103c, 0x2282, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
6344 	SND_PCI_QUIRK(0x103c, 0x228b, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
6345 	SND_PCI_QUIRK(0x103c, 0x228e, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
6346 	SND_PCI_QUIRK(0x103c, 0x229e, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
6347 	SND_PCI_QUIRK(0x103c, 0x22b2, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
6348 	SND_PCI_QUIRK(0x103c, 0x22b7, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
6349 	SND_PCI_QUIRK(0x103c, 0x22bf, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
6350 	SND_PCI_QUIRK(0x103c, 0x22c4, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
6351 	SND_PCI_QUIRK(0x103c, 0x22c5, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
6352 	SND_PCI_QUIRK(0x103c, 0x22c7, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
6353 	SND_PCI_QUIRK(0x103c, 0x22c8, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
6354 	SND_PCI_QUIRK(0x103c, 0x22cf, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
6355 	SND_PCI_QUIRK(0x103c, 0x22db, "HP", ALC280_FIXUP_HP_9480M),
6356 	SND_PCI_QUIRK(0x103c, 0x22dc, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED),
6357 	SND_PCI_QUIRK(0x103c, 0x22fb, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED),
6358 	SND_PCI_QUIRK(0x103c, 0x2334, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
6359 	SND_PCI_QUIRK(0x103c, 0x2335, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
6360 	SND_PCI_QUIRK(0x103c, 0x2336, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
6361 	SND_PCI_QUIRK(0x103c, 0x2337, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
6362 	SND_PCI_QUIRK(0x103c, 0x2b5e, "HP 288 Pro G2 MT", ALC221_FIXUP_HP_288PRO_MIC_NO_PRESENCE),
6363 	SND_PCI_QUIRK(0x103c, 0x802e, "HP Z240 SFF", ALC221_FIXUP_HP_MIC_NO_PRESENCE),
6364 	SND_PCI_QUIRK(0x103c, 0x802f, "HP Z240", ALC221_FIXUP_HP_MIC_NO_PRESENCE),
6365 	SND_PCI_QUIRK(0x103c, 0x8077, "HP", ALC256_FIXUP_HP_HEADSET_MIC),
6366 	SND_PCI_QUIRK(0x103c, 0x8158, "HP", ALC256_FIXUP_HP_HEADSET_MIC),
6367 	SND_PCI_QUIRK(0x103c, 0x820d, "HP Pavilion 15", ALC295_FIXUP_HP_X360),
6368 	SND_PCI_QUIRK(0x103c, 0x8256, "HP", ALC221_FIXUP_HP_FRONT_MIC),
6369 	SND_PCI_QUIRK(0x103c, 0x827e, "HP x360", ALC295_FIXUP_HP_X360),
6370 	SND_PCI_QUIRK(0x103c, 0x827f, "HP x360", ALC269_FIXUP_HP_MUTE_LED_MIC3),
6371 	SND_PCI_QUIRK(0x103c, 0x82bf, "HP G3 mini", ALC221_FIXUP_HP_MIC_NO_PRESENCE),
6372 	SND_PCI_QUIRK(0x103c, 0x82c0, "HP G3 mini premium", ALC221_FIXUP_HP_MIC_NO_PRESENCE),
6373 	SND_PCI_QUIRK(0x103c, 0x83b9, "HP Spectre x360", ALC269_FIXUP_HP_MUTE_LED_MIC3),
6374 	SND_PCI_QUIRK(0x103c, 0x841c, "HP Pavilion 15-CK0xx", ALC269_FIXUP_HP_MUTE_LED_MIC3),
6375 	SND_PCI_QUIRK(0x103c, 0x8497, "HP Envy x360", ALC269_FIXUP_HP_MUTE_LED_MIC3),
6376 	SND_PCI_QUIRK(0x103c, 0x84a6, "HP 250 G7 Notebook PC", ALC269_FIXUP_HP_LINE1_MIC1_LED),
6377 	SND_PCI_QUIRK(0x103c, 0x84ae, "HP 15-db0403ng", ALC236_FIXUP_HP_MUTE_LED_COEFBIT2),
6378 	SND_PCI_QUIRK(0x103c, 0x84da, "HP OMEN dc0019-ur", ALC295_FIXUP_HP_OMEN),
6379 	SND_PCI_QUIRK(0x103c, 0x84e7, "HP Pavilion 15", ALC269_FIXUP_HP_MUTE_LED_MIC3),
6380 	SND_PCI_QUIRK(0x103c, 0x8519, "HP Spectre x360 15-df0xxx", ALC285_FIXUP_HP_SPECTRE_X360),
6381 	SND_PCI_QUIRK(0x103c, 0x8537, "HP ProBook 440 G6", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF),
6382 	SND_PCI_QUIRK(0x103c, 0x8548, "HP EliteBook x360 830 G6", ALC285_FIXUP_HP_GPIO_LED),
6383 	SND_PCI_QUIRK(0x103c, 0x854a, "HP EliteBook 830 G6", ALC285_FIXUP_HP_GPIO_LED),
6384 	SND_PCI_QUIRK(0x103c, 0x85c6, "HP Pavilion x360 Convertible 14-dy1xxx", ALC295_FIXUP_HP_MUTE_LED_COEFBIT11),
6385 	SND_PCI_QUIRK(0x103c, 0x85de, "HP Envy x360 13-ar0xxx", ALC285_FIXUP_HP_ENVY_X360),
6386 	SND_PCI_QUIRK(0x103c, 0x860f, "HP ZBook 15 G6", ALC285_FIXUP_HP_GPIO_AMP_INIT),
6387 	SND_PCI_QUIRK(0x103c, 0x861f, "HP Elite Dragonfly G1", ALC285_FIXUP_HP_GPIO_AMP_INIT),
6388 	SND_PCI_QUIRK(0x103c, 0x869d, "HP", ALC236_FIXUP_HP_MUTE_LED),
6389 	SND_PCI_QUIRK(0x103c, 0x86c1, "HP Laptop 15-da3001TU", ALC236_FIXUP_HP_MUTE_LED_COEFBIT2),
6390 	SND_PCI_QUIRK(0x103c, 0x86c7, "HP Envy AiO 32", ALC274_FIXUP_HP_ENVY_GPIO),
6391 	SND_PCI_QUIRK(0x103c, 0x86e7, "HP Spectre x360 15-eb0xxx", ALC285_FIXUP_HP_SPECTRE_X360_EB1),
6392 	SND_PCI_QUIRK(0x103c, 0x863e, "HP Spectre x360 15-df1xxx", ALC285_FIXUP_HP_SPECTRE_X360_DF1),
6393 	SND_PCI_QUIRK(0x103c, 0x86e8, "HP Spectre x360 15-eb0xxx", ALC285_FIXUP_HP_SPECTRE_X360_EB1),
6394 	SND_PCI_QUIRK(0x103c, 0x86f9, "HP Spectre x360 13-aw0xxx", ALC285_FIXUP_HP_SPECTRE_X360_MUTE_LED),
6395 	SND_PCI_QUIRK(0x103c, 0x8716, "HP Elite Dragonfly G2 Notebook PC", ALC285_FIXUP_HP_GPIO_AMP_INIT),
6396 	SND_PCI_QUIRK(0x103c, 0x8720, "HP EliteBook x360 1040 G8 Notebook PC", ALC285_FIXUP_HP_GPIO_AMP_INIT),
6397 	SND_PCI_QUIRK(0x103c, 0x8724, "HP EliteBook 850 G7", ALC285_FIXUP_HP_GPIO_LED),
6398 	SND_PCI_QUIRK(0x103c, 0x8728, "HP EliteBook 840 G7", ALC285_FIXUP_HP_GPIO_LED),
6399 	SND_PCI_QUIRK(0x103c, 0x8729, "HP", ALC285_FIXUP_HP_GPIO_LED),
6400 	SND_PCI_QUIRK(0x103c, 0x8730, "HP ProBook 445 G7", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF),
6401 	SND_PCI_QUIRK(0x103c, 0x8735, "HP ProBook 435 G7", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF),
6402 	SND_PCI_QUIRK(0x103c, 0x8736, "HP", ALC285_FIXUP_HP_GPIO_AMP_INIT),
6403 	SND_PCI_QUIRK(0x103c, 0x8760, "HP EliteBook 8{4,5}5 G7", ALC285_FIXUP_HP_BEEP_MICMUTE_LED),
6404 	SND_PCI_QUIRK(0x103c, 0x876e, "HP ENVY x360 Convertible 13-ay0xxx", ALC245_FIXUP_HP_X360_MUTE_LEDS),
6405 	SND_PCI_QUIRK(0x103c, 0x877a, "HP", ALC285_FIXUP_HP_MUTE_LED),
6406 	SND_PCI_QUIRK(0x103c, 0x877d, "HP", ALC236_FIXUP_HP_MUTE_LED),
6407 	SND_PCI_QUIRK(0x103c, 0x8780, "HP ZBook Fury 17 G7 Mobile Workstation",
6408 		      ALC285_FIXUP_HP_GPIO_AMP_INIT),
6409 	SND_PCI_QUIRK(0x103c, 0x8783, "HP ZBook Fury 15 G7 Mobile Workstation",
6410 		      ALC285_FIXUP_HP_GPIO_AMP_INIT),
6411 	SND_PCI_QUIRK(0x103c, 0x8786, "HP OMEN 15", ALC285_FIXUP_HP_MUTE_LED),
6412 	SND_PCI_QUIRK(0x103c, 0x8787, "HP OMEN 15", ALC285_FIXUP_HP_MUTE_LED),
6413 	SND_PCI_QUIRK(0x103c, 0x8788, "HP OMEN 15", ALC285_FIXUP_HP_MUTE_LED),
6414 	SND_PCI_QUIRK(0x103c, 0x87b7, "HP Laptop 14-fq0xxx", ALC236_FIXUP_HP_MUTE_LED_COEFBIT2),
6415 	SND_PCI_QUIRK(0x103c, 0x87c8, "HP", ALC287_FIXUP_HP_GPIO_LED),
6416 	SND_PCI_QUIRK(0x103c, 0x87cc, "HP Pavilion 15-eg0xxx", ALC287_FIXUP_HP_GPIO_LED),
6417 	SND_PCI_QUIRK(0x103c, 0x87d3, "HP Laptop 15-gw0xxx", ALC236_FIXUP_HP_MUTE_LED_COEFBIT2),
6418 	SND_PCI_QUIRK(0x103c, 0x87df, "HP ProBook 430 G8 Notebook PC", ALC236_FIXUP_HP_GPIO_LED),
6419 	SND_PCI_QUIRK(0x103c, 0x87e5, "HP ProBook 440 G8 Notebook PC", ALC236_FIXUP_HP_GPIO_LED),
6420 	SND_PCI_QUIRK(0x103c, 0x87e7, "HP ProBook 450 G8 Notebook PC", ALC236_FIXUP_HP_GPIO_LED),
6421 	SND_PCI_QUIRK(0x103c, 0x87f1, "HP ProBook 630 G8 Notebook PC", ALC236_FIXUP_HP_GPIO_LED),
6422 	SND_PCI_QUIRK(0x103c, 0x87f2, "HP ProBook 640 G8 Notebook PC", ALC236_FIXUP_HP_GPIO_LED),
6423 	SND_PCI_QUIRK(0x103c, 0x87f4, "HP", ALC287_FIXUP_HP_GPIO_LED),
6424 	SND_PCI_QUIRK(0x103c, 0x87f5, "HP", ALC287_FIXUP_HP_GPIO_LED),
6425 	SND_PCI_QUIRK(0x103c, 0x87f6, "HP Spectre x360 14", ALC245_FIXUP_HP_X360_AMP),
6426 	SND_PCI_QUIRK(0x103c, 0x87f7, "HP Spectre x360 14", ALC245_FIXUP_HP_X360_AMP),
6427 	SND_PCI_QUIRK(0x103c, 0x87fd, "HP Laptop 14-dq2xxx", ALC236_FIXUP_HP_MUTE_LED_COEFBIT2),
6428 	SND_PCI_QUIRK(0x103c, 0x87fe, "HP Laptop 15s-fq2xxx", ALC236_FIXUP_HP_MUTE_LED_COEFBIT2),
6429 	SND_PCI_QUIRK(0x103c, 0x8805, "HP ProBook 650 G8 Notebook PC", ALC236_FIXUP_HP_GPIO_LED),
6430 	SND_PCI_QUIRK(0x103c, 0x880d, "HP EliteBook 830 G8 Notebook PC", ALC285_FIXUP_HP_GPIO_LED),
6431 	SND_PCI_QUIRK(0x103c, 0x8811, "HP Spectre x360 15-eb1xxx", ALC285_FIXUP_HP_SPECTRE_X360_EB1),
6432 	SND_PCI_QUIRK(0x103c, 0x8812, "HP Spectre x360 15-eb1xxx", ALC285_FIXUP_HP_SPECTRE_X360_EB1),
6433 	SND_PCI_QUIRK(0x103c, 0x881d, "HP 250 G8 Notebook PC", ALC236_FIXUP_HP_MUTE_LED_COEFBIT2),
6434 	SND_PCI_QUIRK(0x103c, 0x881e, "HP Laptop 15s-du3xxx", ALC236_FIXUP_HP_MUTE_LED_COEFBIT2),
6435 	SND_PCI_QUIRK(0x103c, 0x8846, "HP EliteBook 850 G8 Notebook PC", ALC285_FIXUP_HP_GPIO_LED),
6436 	SND_PCI_QUIRK(0x103c, 0x8847, "HP EliteBook x360 830 G8 Notebook PC", ALC285_FIXUP_HP_GPIO_LED),
6437 	SND_PCI_QUIRK(0x103c, 0x884b, "HP EliteBook 840 Aero G8 Notebook PC", ALC285_FIXUP_HP_GPIO_LED),
6438 	SND_PCI_QUIRK(0x103c, 0x884c, "HP EliteBook 840 G8 Notebook PC", ALC285_FIXUP_HP_GPIO_LED),
6439 	SND_PCI_QUIRK(0x103c, 0x8862, "HP ProBook 445 G8 Notebook PC", ALC236_FIXUP_HP_LIMIT_INT_MIC_BOOST),
6440 	SND_PCI_QUIRK(0x103c, 0x8863, "HP ProBook 445 G8 Notebook PC", ALC236_FIXUP_HP_LIMIT_INT_MIC_BOOST),
6441 	SND_PCI_QUIRK(0x103c, 0x886d, "HP ZBook Fury 17.3 Inch G8 Mobile Workstation PC", ALC285_FIXUP_HP_GPIO_AMP_INIT),
6442 	SND_PCI_QUIRK(0x103c, 0x8870, "HP ZBook Fury 15.6 Inch G8 Mobile Workstation PC", ALC285_FIXUP_HP_GPIO_AMP_INIT),
6443 	SND_PCI_QUIRK(0x103c, 0x8873, "HP ZBook Studio 15.6 Inch G8 Mobile Workstation PC", ALC285_FIXUP_HP_GPIO_AMP_INIT),
6444 	SND_PCI_QUIRK(0x103c, 0x887a, "HP Laptop 15s-eq2xxx", ALC236_FIXUP_HP_MUTE_LED_COEFBIT2),
6445 	SND_PCI_QUIRK(0x103c, 0x887c, "HP Laptop 14s-fq1xxx", ALC236_FIXUP_HP_MUTE_LED_COEFBIT2),
6446 	SND_PCI_QUIRK(0x103c, 0x888a, "HP ENVY x360 Convertible 15-eu0xxx", ALC245_FIXUP_HP_X360_MUTE_LEDS),
6447 	SND_PCI_QUIRK(0x103c, 0x888d, "HP ZBook Power 15.6 inch G8 Mobile Workstation PC", ALC236_FIXUP_HP_GPIO_LED),
6448 	SND_PCI_QUIRK(0x103c, 0x8895, "HP EliteBook 855 G8 Notebook PC", ALC285_FIXUP_HP_SPEAKERS_MICMUTE_LED),
6449 	SND_PCI_QUIRK(0x103c, 0x8896, "HP EliteBook 855 G8 Notebook PC", ALC285_FIXUP_HP_MUTE_LED),
6450 	SND_PCI_QUIRK(0x103c, 0x8898, "HP EliteBook 845 G8 Notebook PC", ALC285_FIXUP_HP_LIMIT_INT_MIC_BOOST),
6451 	SND_PCI_QUIRK(0x103c, 0x88d0, "HP Pavilion 15-eh1xxx (mainboard 88D0)", ALC287_FIXUP_HP_GPIO_LED),
6452 	SND_PCI_QUIRK(0x103c, 0x88dd, "HP Pavilion 15z-ec200", ALC285_FIXUP_HP_MUTE_LED),
6453 	SND_PCI_QUIRK(0x103c, 0x8902, "HP OMEN 16", ALC285_FIXUP_HP_MUTE_LED),
6454 	SND_PCI_QUIRK(0x103c, 0x890e, "HP 255 G8 Notebook PC", ALC236_FIXUP_HP_MUTE_LED_COEFBIT2),
6455 	SND_PCI_QUIRK(0x103c, 0x8919, "HP Pavilion Aero Laptop 13-be0xxx", ALC287_FIXUP_HP_GPIO_LED),
6456 	SND_PCI_QUIRK(0x103c, 0x896d, "HP ZBook Firefly 16 G9", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
6457 	SND_PCI_QUIRK(0x103c, 0x896e, "HP EliteBook x360 830 G9", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
6458 	SND_PCI_QUIRK(0x103c, 0x8971, "HP EliteBook 830 G9", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
6459 	SND_PCI_QUIRK(0x103c, 0x8972, "HP EliteBook 840 G9", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
6460 	SND_PCI_QUIRK(0x103c, 0x8973, "HP EliteBook 860 G9", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
6461 	SND_PCI_QUIRK(0x103c, 0x8974, "HP EliteBook 840 Aero G9", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
6462 	SND_PCI_QUIRK(0x103c, 0x8975, "HP EliteBook x360 840 Aero G9", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
6463 	SND_PCI_QUIRK(0x103c, 0x897d, "HP mt440 Mobile Thin Client U74", ALC236_FIXUP_HP_GPIO_LED),
6464 	SND_PCI_QUIRK(0x103c, 0x8981, "HP Elite Dragonfly G3", ALC245_FIXUP_CS35L41_SPI_4),
6465 	SND_PCI_QUIRK(0x103c, 0x898a, "HP Pavilion 15-eg100", ALC287_FIXUP_HP_GPIO_LED),
6466 	SND_PCI_QUIRK(0x103c, 0x898e, "HP EliteBook 835 G9", ALC287_FIXUP_CS35L41_I2C_2),
6467 	SND_PCI_QUIRK(0x103c, 0x898f, "HP EliteBook 835 G9", ALC287_FIXUP_CS35L41_I2C_2),
6468 	SND_PCI_QUIRK(0x103c, 0x8991, "HP EliteBook 845 G9", ALC287_FIXUP_CS35L41_I2C_2_HP_GPIO_LED),
6469 	SND_PCI_QUIRK(0x103c, 0x8992, "HP EliteBook 845 G9", ALC287_FIXUP_CS35L41_I2C_2),
6470 	SND_PCI_QUIRK(0x103c, 0x8994, "HP EliteBook 855 G9", ALC287_FIXUP_CS35L41_I2C_2_HP_GPIO_LED),
6471 	SND_PCI_QUIRK(0x103c, 0x8995, "HP EliteBook 855 G9", ALC287_FIXUP_CS35L41_I2C_2),
6472 	SND_PCI_QUIRK(0x103c, 0x89a4, "HP ProBook 440 G9", ALC236_FIXUP_HP_GPIO_LED),
6473 	SND_PCI_QUIRK(0x103c, 0x89a6, "HP ProBook 450 G9", ALC236_FIXUP_HP_GPIO_LED),
6474 	SND_PCI_QUIRK(0x103c, 0x89aa, "HP EliteBook 630 G9", ALC236_FIXUP_HP_GPIO_LED),
6475 	SND_PCI_QUIRK(0x103c, 0x89ac, "HP EliteBook 640 G9", ALC236_FIXUP_HP_GPIO_LED),
6476 	SND_PCI_QUIRK(0x103c, 0x89ae, "HP EliteBook 650 G9", ALC236_FIXUP_HP_GPIO_LED),
6477 	SND_PCI_QUIRK(0x103c, 0x89c0, "HP ZBook Power 15.6 G9", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
6478 	SND_PCI_QUIRK(0x103c, 0x89c3, "Zbook Studio G9", ALC245_FIXUP_CS35L41_SPI_4_HP_GPIO_LED),
6479 	SND_PCI_QUIRK(0x103c, 0x89c6, "Zbook Fury 17 G9", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
6480 	SND_PCI_QUIRK(0x103c, 0x89ca, "HP", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF),
6481 	SND_PCI_QUIRK(0x103c, 0x89d3, "HP EliteBook 645 G9 (MB 89D2)", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF),
6482 	SND_PCI_QUIRK(0x103c, 0x89e7, "HP Elite x2 G9", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
6483 	SND_PCI_QUIRK(0x103c, 0x8a0f, "HP Pavilion 14-ec1xxx", ALC287_FIXUP_HP_GPIO_LED),
6484 	SND_PCI_QUIRK(0x103c, 0x8a20, "HP Laptop 15s-fq5xxx", ALC236_FIXUP_HP_MUTE_LED_COEFBIT2),
6485 	SND_PCI_QUIRK(0x103c, 0x8a25, "HP Victus 16-d1xxx (MB 8A25)", ALC245_FIXUP_HP_MUTE_LED_COEFBIT),
6486 	SND_PCI_QUIRK(0x103c, 0x8a26, "HP Victus 16-d1xxx (MB 8A26)", ALC245_FIXUP_HP_MUTE_LED_COEFBIT),
6487 	SND_PCI_QUIRK(0x103c, 0x8a28, "HP Envy 13", ALC287_FIXUP_CS35L41_I2C_2),
6488 	SND_PCI_QUIRK(0x103c, 0x8a29, "HP Envy 15", ALC287_FIXUP_CS35L41_I2C_2),
6489 	SND_PCI_QUIRK(0x103c, 0x8a2a, "HP Envy 15", ALC287_FIXUP_CS35L41_I2C_2),
6490 	SND_PCI_QUIRK(0x103c, 0x8a2b, "HP Envy 15", ALC287_FIXUP_CS35L41_I2C_2),
6491 	SND_PCI_QUIRK(0x103c, 0x8a2c, "HP Envy 16", ALC287_FIXUP_CS35L41_I2C_2),
6492 	SND_PCI_QUIRK(0x103c, 0x8a2d, "HP Envy 16", ALC287_FIXUP_CS35L41_I2C_2),
6493 	SND_PCI_QUIRK(0x103c, 0x8a2e, "HP Envy 16", ALC287_FIXUP_CS35L41_I2C_2),
6494 	SND_PCI_QUIRK(0x103c, 0x8a30, "HP Envy 17", ALC287_FIXUP_CS35L41_I2C_2),
6495 	SND_PCI_QUIRK(0x103c, 0x8a31, "HP Envy 15", ALC287_FIXUP_CS35L41_I2C_2),
6496 	SND_PCI_QUIRK(0x103c, 0x8a4f, "HP Victus 15-fa0xxx (MB 8A4F)", ALC245_FIXUP_HP_MUTE_LED_COEFBIT),
6497 	SND_PCI_QUIRK(0x103c, 0x8a6e, "HP EDNA 360", ALC287_FIXUP_CS35L41_I2C_4),
6498 	SND_PCI_QUIRK(0x103c, 0x8a74, "HP ProBook 440 G8 Notebook PC", ALC236_FIXUP_HP_GPIO_LED),
6499 	SND_PCI_QUIRK(0x103c, 0x8a78, "HP Dev One", ALC285_FIXUP_HP_LIMIT_INT_MIC_BOOST),
6500 	SND_PCI_QUIRK(0x103c, 0x8aa0, "HP ProBook 440 G9 (MB 8A9E)", ALC236_FIXUP_HP_GPIO_LED),
6501 	SND_PCI_QUIRK(0x103c, 0x8aa3, "HP ProBook 450 G9 (MB 8AA1)", ALC236_FIXUP_HP_GPIO_LED),
6502 	SND_PCI_QUIRK(0x103c, 0x8aa8, "HP EliteBook 640 G9 (MB 8AA6)", ALC236_FIXUP_HP_GPIO_LED),
6503 	SND_PCI_QUIRK(0x103c, 0x8aab, "HP EliteBook 650 G9 (MB 8AA9)", ALC236_FIXUP_HP_GPIO_LED),
6504 	SND_PCI_QUIRK(0x103c, 0x8ab9, "HP EliteBook 840 G8 (MB 8AB8)", ALC285_FIXUP_HP_GPIO_LED),
6505 	SND_PCI_QUIRK(0x103c, 0x8abb, "HP ZBook Firefly 14 G9", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
6506 	SND_PCI_QUIRK(0x103c, 0x8ad1, "HP EliteBook 840 14 inch G9 Notebook PC", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
6507 	SND_PCI_QUIRK(0x103c, 0x8ad2, "HP EliteBook 860 16 inch G9 Notebook PC", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
6508 	SND_PCI_QUIRK(0x103c, 0x8ad8, "HP 800 G9", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
6509 	SND_PCI_QUIRK(0x103c, 0x8b0f, "HP Elite mt645 G7 Mobile Thin Client U81", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF),
6510 	SND_PCI_QUIRK(0x103c, 0x8b2f, "HP 255 15.6 inch G10 Notebook PC", ALC236_FIXUP_HP_MUTE_LED_COEFBIT2),
6511 	SND_PCI_QUIRK(0x103c, 0x8b3a, "HP Envy 15", ALC287_FIXUP_CS35L41_I2C_2),
6512 	SND_PCI_QUIRK(0x103c, 0x8b3f, "HP mt440 Mobile Thin Client U91", ALC236_FIXUP_HP_GPIO_LED),
6513 	SND_PCI_QUIRK(0x103c, 0x8b42, "HP", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
6514 	SND_PCI_QUIRK(0x103c, 0x8b43, "HP", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
6515 	SND_PCI_QUIRK(0x103c, 0x8b44, "HP", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
6516 	SND_PCI_QUIRK(0x103c, 0x8b45, "HP", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
6517 	SND_PCI_QUIRK(0x103c, 0x8b46, "HP", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
6518 	SND_PCI_QUIRK(0x103c, 0x8b47, "HP", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
6519 	SND_PCI_QUIRK(0x103c, 0x8b59, "HP Elite mt645 G7 Mobile Thin Client U89", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF),
6520 	SND_PCI_QUIRK(0x103c, 0x8b5d, "HP", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF),
6521 	SND_PCI_QUIRK(0x103c, 0x8b5e, "HP", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF),
6522 	SND_PCI_QUIRK(0x103c, 0x8b5f, "HP", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF),
6523 	SND_PCI_QUIRK(0x103c, 0x8b63, "HP Elite Dragonfly 13.5 inch G4", ALC245_FIXUP_CS35L41_SPI_4_HP_GPIO_LED),
6524 	SND_PCI_QUIRK(0x103c, 0x8b65, "HP ProBook 455 15.6 inch G10 Notebook PC", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF),
6525 	SND_PCI_QUIRK(0x103c, 0x8b66, "HP", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF),
6526 	SND_PCI_QUIRK(0x103c, 0x8b70, "HP EliteBook 835 G10", ALC287_FIXUP_CS35L41_I2C_2_HP_GPIO_LED),
6527 	SND_PCI_QUIRK(0x103c, 0x8b72, "HP EliteBook 845 G10", ALC287_FIXUP_CS35L41_I2C_2_HP_GPIO_LED),
6528 	SND_PCI_QUIRK(0x103c, 0x8b74, "HP EliteBook 845W G10", ALC287_FIXUP_CS35L41_I2C_2_HP_GPIO_LED),
6529 	SND_PCI_QUIRK(0x103c, 0x8b77, "HP ElieBook 865 G10", ALC287_FIXUP_CS35L41_I2C_2),
6530 	SND_PCI_QUIRK(0x103c, 0x8b7a, "HP", ALC236_FIXUP_HP_GPIO_LED),
6531 	SND_PCI_QUIRK(0x103c, 0x8b7d, "HP", ALC236_FIXUP_HP_GPIO_LED),
6532 	SND_PCI_QUIRK(0x103c, 0x8b87, "HP", ALC236_FIXUP_HP_GPIO_LED),
6533 	SND_PCI_QUIRK(0x103c, 0x8b8a, "HP", ALC236_FIXUP_HP_GPIO_LED),
6534 	SND_PCI_QUIRK(0x103c, 0x8b8b, "HP", ALC236_FIXUP_HP_GPIO_LED),
6535 	SND_PCI_QUIRK(0x103c, 0x8b8d, "HP", ALC236_FIXUP_HP_GPIO_LED),
6536 	SND_PCI_QUIRK(0x103c, 0x8b8f, "HP", ALC245_FIXUP_CS35L41_SPI_4_HP_GPIO_LED),
6537 	SND_PCI_QUIRK(0x103c, 0x8b92, "HP", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
6538 	SND_PCI_QUIRK(0x103c, 0x8b96, "HP", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF),
6539 	SND_PCI_QUIRK(0x103c, 0x8b97, "HP", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF),
6540 	SND_PCI_QUIRK(0x103c, 0x8bb3, "HP Slim OMEN", ALC287_FIXUP_CS35L41_I2C_2),
6541 	SND_PCI_QUIRK(0x103c, 0x8bb4, "HP Slim OMEN", ALC287_FIXUP_CS35L41_I2C_2),
6542 	SND_PCI_QUIRK(0x103c, 0x8bbe, "HP Victus 16-r0xxx (MB 8BBE)", ALC245_FIXUP_HP_MUTE_LED_COEFBIT),
6543 	SND_PCI_QUIRK(0x103c, 0x8bc8, "HP Victus 15-fa1xxx", ALC245_FIXUP_HP_MUTE_LED_COEFBIT),
6544 	SND_PCI_QUIRK(0x103c, 0x8bcd, "HP Omen 16-xd0xxx", ALC245_FIXUP_HP_MUTE_LED_V1_COEFBIT),
6545 	SND_PCI_QUIRK(0x103c, 0x8bd4, "HP Victus 16-s0xxx (MB 8BD4)", ALC245_FIXUP_HP_MUTE_LED_COEFBIT),
6546 	SND_PCI_QUIRK(0x103c, 0x8bdd, "HP Envy 17", ALC287_FIXUP_CS35L41_I2C_2),
6547 	SND_PCI_QUIRK(0x103c, 0x8bde, "HP Envy 17", ALC287_FIXUP_CS35L41_I2C_2),
6548 	SND_PCI_QUIRK(0x103c, 0x8bdf, "HP Envy 15", ALC287_FIXUP_CS35L41_I2C_2),
6549 	SND_PCI_QUIRK(0x103c, 0x8be0, "HP Envy 15", ALC287_FIXUP_CS35L41_I2C_2),
6550 	SND_PCI_QUIRK(0x103c, 0x8be1, "HP Envy 15", ALC287_FIXUP_CS35L41_I2C_2),
6551 	SND_PCI_QUIRK(0x103c, 0x8be2, "HP Envy 15", ALC287_FIXUP_CS35L41_I2C_2),
6552 	SND_PCI_QUIRK(0x103c, 0x8be3, "HP Envy 15", ALC287_FIXUP_CS35L41_I2C_2),
6553 	SND_PCI_QUIRK(0x103c, 0x8be5, "HP Envy 16", ALC287_FIXUP_CS35L41_I2C_2),
6554 	SND_PCI_QUIRK(0x103c, 0x8be6, "HP Envy 16", ALC287_FIXUP_CS35L41_I2C_2),
6555 	SND_PCI_QUIRK(0x103c, 0x8be7, "HP Envy 17", ALC287_FIXUP_CS35L41_I2C_2),
6556 	SND_PCI_QUIRK(0x103c, 0x8be8, "HP Envy 17", ALC287_FIXUP_CS35L41_I2C_2),
6557 	SND_PCI_QUIRK(0x103c, 0x8be9, "HP Envy 15", ALC287_FIXUP_CS35L41_I2C_2),
6558 	SND_PCI_QUIRK(0x103c, 0x8bf0, "HP", ALC236_FIXUP_HP_GPIO_LED),
6559 	SND_PCI_QUIRK(0x103c, 0x8c15, "HP Spectre x360 2-in-1 Laptop 14-eu0xxx", ALC245_FIXUP_HP_SPECTRE_X360_EU0XXX),
6560 	SND_PCI_QUIRK(0x103c, 0x8c16, "HP Spectre x360 2-in-1 Laptop 16-aa0xxx", ALC245_FIXUP_HP_SPECTRE_X360_16_AA0XXX),
6561 	SND_PCI_QUIRK(0x103c, 0x8c17, "HP Spectre 16", ALC287_FIXUP_CS35L41_I2C_2),
6562 	SND_PCI_QUIRK(0x103c, 0x8c21, "HP Pavilion Plus Laptop 14-ey0XXX", ALC245_FIXUP_HP_X360_MUTE_LEDS),
6563 	SND_PCI_QUIRK(0x103c, 0x8c30, "HP Victus 15-fb1xxx", ALC245_FIXUP_HP_MUTE_LED_COEFBIT),
6564 	SND_PCI_QUIRK(0x103c, 0x8c46, "HP EliteBook 830 G11", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
6565 	SND_PCI_QUIRK(0x103c, 0x8c47, "HP EliteBook 840 G11", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
6566 	SND_PCI_QUIRK(0x103c, 0x8c48, "HP EliteBook 860 G11", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
6567 	SND_PCI_QUIRK(0x103c, 0x8c49, "HP Elite x360 830 2-in-1 G11", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
6568 	SND_PCI_QUIRK(0x103c, 0x8c4d, "HP Omen", ALC287_FIXUP_CS35L41_I2C_2),
6569 	SND_PCI_QUIRK(0x103c, 0x8c4e, "HP Omen", ALC287_FIXUP_CS35L41_I2C_2),
6570 	SND_PCI_QUIRK(0x103c, 0x8c4f, "HP Envy 15", ALC287_FIXUP_CS35L41_I2C_2),
6571 	SND_PCI_QUIRK(0x103c, 0x8c50, "HP Envy 17", ALC287_FIXUP_CS35L41_I2C_2),
6572 	SND_PCI_QUIRK(0x103c, 0x8c51, "HP Envy 17", ALC287_FIXUP_CS35L41_I2C_2),
6573 	SND_PCI_QUIRK(0x103c, 0x8c52, "HP EliteBook 1040 G11", ALC285_FIXUP_HP_GPIO_LED),
6574 	SND_PCI_QUIRK(0x103c, 0x8c53, "HP Elite x360 1040 2-in-1 G11", ALC285_FIXUP_HP_GPIO_LED),
6575 	SND_PCI_QUIRK(0x103c, 0x8c66, "HP Envy 16", ALC287_FIXUP_CS35L41_I2C_2),
6576 	SND_PCI_QUIRK(0x103c, 0x8c67, "HP Envy 17", ALC287_FIXUP_CS35L41_I2C_2),
6577 	SND_PCI_QUIRK(0x103c, 0x8c68, "HP Envy 17", ALC287_FIXUP_CS35L41_I2C_2),
6578 	SND_PCI_QUIRK(0x103c, 0x8c6a, "HP Envy 16", ALC287_FIXUP_CS35L41_I2C_2),
6579 	SND_PCI_QUIRK(0x103c, 0x8c70, "HP EliteBook 835 G11", ALC287_FIXUP_CS35L41_I2C_2_HP_GPIO_LED),
6580 	SND_PCI_QUIRK(0x103c, 0x8c71, "HP EliteBook 845 G11", ALC287_FIXUP_CS35L41_I2C_2_HP_GPIO_LED),
6581 	SND_PCI_QUIRK(0x103c, 0x8c72, "HP EliteBook 865 G11", ALC287_FIXUP_CS35L41_I2C_2_HP_GPIO_LED),
6582 	SND_PCI_QUIRK(0x103c, 0x8c7b, "HP ProBook 445 G11", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF),
6583 	SND_PCI_QUIRK(0x103c, 0x8c7c, "HP ProBook 445 G11", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF),
6584 	SND_PCI_QUIRK(0x103c, 0x8c7d, "HP ProBook 465 G11", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF),
6585 	SND_PCI_QUIRK(0x103c, 0x8c7e, "HP ProBook 465 G11", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF),
6586 	SND_PCI_QUIRK(0x103c, 0x8c7f, "HP EliteBook 645 G11", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF),
6587 	SND_PCI_QUIRK(0x103c, 0x8c80, "HP EliteBook 645 G11", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF),
6588 	SND_PCI_QUIRK(0x103c, 0x8c81, "HP EliteBook 665 G11", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF),
6589 	SND_PCI_QUIRK(0x103c, 0x8c89, "HP ProBook 460 G11", ALC236_FIXUP_HP_GPIO_LED),
6590 	SND_PCI_QUIRK(0x103c, 0x8c8a, "HP EliteBook 630", ALC236_FIXUP_HP_GPIO_LED),
6591 	SND_PCI_QUIRK(0x103c, 0x8c8c, "HP EliteBook 660", ALC236_FIXUP_HP_GPIO_LED),
6592 	SND_PCI_QUIRK(0x103c, 0x8c8d, "HP ProBook 440 G11", ALC236_FIXUP_HP_GPIO_LED),
6593 	SND_PCI_QUIRK(0x103c, 0x8c8e, "HP ProBook 460 G11", ALC236_FIXUP_HP_GPIO_LED),
6594 	SND_PCI_QUIRK(0x103c, 0x8c90, "HP EliteBook 640", ALC236_FIXUP_HP_GPIO_LED),
6595 	SND_PCI_QUIRK(0x103c, 0x8c91, "HP EliteBook 660", ALC236_FIXUP_HP_GPIO_LED),
6596 	SND_PCI_QUIRK(0x103c, 0x8c96, "HP", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF),
6597 	SND_PCI_QUIRK(0x103c, 0x8c97, "HP ZBook", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF),
6598 	SND_PCI_QUIRK(0x103c, 0x8c99, "HP Victus 16-r1xxx (MB 8C99)", ALC245_FIXUP_HP_MUTE_LED_COEFBIT),
6599 	SND_PCI_QUIRK(0x103c, 0x8c9c, "HP Victus 16-s1xxx (MB 8C9C)", ALC245_FIXUP_HP_MUTE_LED_COEFBIT),
6600 	SND_PCI_QUIRK(0x103c, 0x8ca1, "HP ZBook Power", ALC236_FIXUP_HP_GPIO_LED),
6601 	SND_PCI_QUIRK(0x103c, 0x8ca2, "HP ZBook Power", ALC236_FIXUP_HP_GPIO_LED),
6602 	SND_PCI_QUIRK(0x103c, 0x8ca4, "HP ZBook Fury", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
6603 	SND_PCI_QUIRK(0x103c, 0x8ca7, "HP ZBook Fury", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
6604 	SND_PCI_QUIRK(0x103c, 0x8caf, "HP Elite mt645 G8 Mobile Thin Client", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF),
6605 	SND_PCI_QUIRK(0x103c, 0x8cbd, "HP Pavilion Aero Laptop 13-bg0xxx", ALC245_FIXUP_HP_X360_MUTE_LEDS),
6606 	SND_PCI_QUIRK(0x103c, 0x8cdd, "HP Spectre", ALC245_FIXUP_HP_SPECTRE_X360_EU0XXX),
6607 	SND_PCI_QUIRK(0x103c, 0x8cde, "HP OmniBook Ultra Flip Laptop 14t", ALC245_FIXUP_HP_SPECTRE_X360_EU0XXX),
6608 	SND_PCI_QUIRK(0x103c, 0x8cdf, "HP SnowWhite", ALC287_FIXUP_CS35L41_I2C_2_HP_GPIO_LED),
6609 	SND_PCI_QUIRK(0x103c, 0x8ce0, "HP SnowWhite", ALC287_FIXUP_CS35L41_I2C_2_HP_GPIO_LED),
6610 	SND_PCI_QUIRK(0x103c, 0x8cf5, "HP ZBook Studio 16", ALC245_FIXUP_CS35L41_SPI_4_HP_GPIO_LED),
6611 	SND_PCI_QUIRK(0x103c, 0x8d01, "HP ZBook Power 14 G12", ALC285_FIXUP_HP_GPIO_LED),
6612 	SND_PCI_QUIRK(0x103c, 0x8d07, "HP Victus 15-fb2xxx (MB 8D07)", ALC245_FIXUP_HP_MUTE_LED_COEFBIT),
6613 	SND_PCI_QUIRK(0x103c, 0x8d18, "HP EliteStudio 8 AIO", ALC274_FIXUP_HP_AIO_BIND_DACS),
6614 	SND_PCI_QUIRK(0x103c, 0x8d84, "HP EliteBook X G1i", ALC285_FIXUP_HP_GPIO_LED),
6615 	SND_PCI_QUIRK(0x103c, 0x8d85, "HP EliteBook 14 G12", ALC285_FIXUP_HP_GPIO_LED),
6616 	SND_PCI_QUIRK(0x103c, 0x8d86, "HP Elite X360 14 G12", ALC285_FIXUP_HP_GPIO_LED),
6617 	SND_PCI_QUIRK(0x103c, 0x8d8c, "HP EliteBook 13 G12", ALC285_FIXUP_HP_GPIO_LED),
6618 	SND_PCI_QUIRK(0x103c, 0x8d8d, "HP Elite X360 13 G12", ALC285_FIXUP_HP_GPIO_LED),
6619 	SND_PCI_QUIRK(0x103c, 0x8d8e, "HP EliteBook 14 G12", ALC285_FIXUP_HP_GPIO_LED),
6620 	SND_PCI_QUIRK(0x103c, 0x8d8f, "HP EliteBook 14 G12", ALC285_FIXUP_HP_GPIO_LED),
6621 	SND_PCI_QUIRK(0x103c, 0x8d90, "HP EliteBook 16 G12", ALC285_FIXUP_HP_GPIO_LED),
6622 	SND_PCI_QUIRK(0x103c, 0x8d91, "HP ZBook Firefly 14 G12", ALC285_FIXUP_HP_GPIO_LED),
6623 	SND_PCI_QUIRK(0x103c, 0x8d92, "HP ZBook Firefly 16 G12", ALC285_FIXUP_HP_GPIO_LED),
6624 	SND_PCI_QUIRK(0x103c, 0x8d9b, "HP 17 Turbine OmniBook 7 UMA", ALC287_FIXUP_CS35L41_I2C_2),
6625 	SND_PCI_QUIRK(0x103c, 0x8d9c, "HP 17 Turbine OmniBook 7 DIS", ALC287_FIXUP_CS35L41_I2C_2),
6626 	SND_PCI_QUIRK(0x103c, 0x8d9d, "HP 17 Turbine OmniBook X UMA", ALC287_FIXUP_CS35L41_I2C_2),
6627 	SND_PCI_QUIRK(0x103c, 0x8d9e, "HP 17 Turbine OmniBook X DIS", ALC287_FIXUP_CS35L41_I2C_2),
6628 	SND_PCI_QUIRK(0x103c, 0x8d9f, "HP 14 Cadet (x360)", ALC287_FIXUP_CS35L41_I2C_2),
6629 	SND_PCI_QUIRK(0x103c, 0x8da0, "HP 16 Clipper OmniBook 7(X360)", ALC287_FIXUP_CS35L41_I2C_2),
6630 	SND_PCI_QUIRK(0x103c, 0x8da1, "HP 16 Clipper OmniBook X", ALC287_FIXUP_CS35L41_I2C_2),
6631 	SND_PCI_QUIRK(0x103c, 0x8da7, "HP 14 Enstrom OmniBook X", ALC287_FIXUP_CS35L41_I2C_2),
6632 	SND_PCI_QUIRK(0x103c, 0x8da8, "HP 16 Piston OmniBook X", ALC287_FIXUP_CS35L41_I2C_2),
6633 	SND_PCI_QUIRK(0x103c, 0x8dd4, "HP EliteStudio 8 AIO", ALC274_FIXUP_HP_AIO_BIND_DACS),
6634 	SND_PCI_QUIRK(0x103c, 0x8de8, "HP Gemtree", ALC245_FIXUP_TAS2781_SPI_2),
6635 	SND_PCI_QUIRK(0x103c, 0x8de9, "HP Gemtree", ALC245_FIXUP_TAS2781_SPI_2),
6636 	SND_PCI_QUIRK(0x103c, 0x8dec, "HP EliteBook 640 G12", ALC236_FIXUP_HP_GPIO_LED),
6637 	SND_PCI_QUIRK(0x103c, 0x8ded, "HP EliteBook 640 G12", ALC236_FIXUP_HP_GPIO_LED),
6638 	SND_PCI_QUIRK(0x103c, 0x8dee, "HP EliteBook 660 G12", ALC236_FIXUP_HP_GPIO_LED),
6639 	SND_PCI_QUIRK(0x103c, 0x8def, "HP EliteBook 660 G12", ALC236_FIXUP_HP_GPIO_LED),
6640 	SND_PCI_QUIRK(0x103c, 0x8df0, "HP EliteBook 630 G12", ALC236_FIXUP_HP_GPIO_LED),
6641 	SND_PCI_QUIRK(0x103c, 0x8df1, "HP EliteBook 630 G12", ALC236_FIXUP_HP_GPIO_LED),
6642 	SND_PCI_QUIRK(0x103c, 0x8dfb, "HP EliteBook 6 G1a 14", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF),
6643 	SND_PCI_QUIRK(0x103c, 0x8dfc, "HP EliteBook 645 G12", ALC236_FIXUP_HP_GPIO_LED),
6644 	SND_PCI_QUIRK(0x103c, 0x8dfd, "HP EliteBook 6 G1a 16", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF),
6645 	SND_PCI_QUIRK(0x103c, 0x8dfe, "HP EliteBook 665 G12", ALC236_FIXUP_HP_GPIO_LED),
6646 	SND_PCI_QUIRK(0x103c, 0x8e11, "HP Trekker", ALC287_FIXUP_CS35L41_I2C_2),
6647 	SND_PCI_QUIRK(0x103c, 0x8e12, "HP Trekker", ALC287_FIXUP_CS35L41_I2C_2),
6648 	SND_PCI_QUIRK(0x103c, 0x8e13, "HP Trekker", ALC287_FIXUP_CS35L41_I2C_2),
6649 	SND_PCI_QUIRK(0x103c, 0x8e14, "HP ZBook Firefly 14 G12", ALC245_FIXUP_HP_ZBOOK_FIREFLY_G12A),
6650 	SND_PCI_QUIRK(0x103c, 0x8e15, "HP ZBook Firefly 14 G12", ALC245_FIXUP_HP_ZBOOK_FIREFLY_G12A),
6651 	SND_PCI_QUIRK(0x103c, 0x8e16, "HP ZBook Firefly 14 G12", ALC245_FIXUP_HP_ZBOOK_FIREFLY_G12A),
6652 	SND_PCI_QUIRK(0x103c, 0x8e17, "HP ZBook Firefly 14 G12", ALC245_FIXUP_HP_ZBOOK_FIREFLY_G12A),
6653 	SND_PCI_QUIRK(0x103c, 0x8e18, "HP ZBook Firefly 14 G12A", ALC245_FIXUP_HP_ZBOOK_FIREFLY_G12A),
6654 	SND_PCI_QUIRK(0x103c, 0x8e19, "HP ZBook Firefly 14 G12A", ALC245_FIXUP_HP_ZBOOK_FIREFLY_G12A),
6655 	SND_PCI_QUIRK(0x103c, 0x8e1a, "HP ZBook Firefly 14 G12A", ALC245_FIXUP_HP_ZBOOK_FIREFLY_G12A),
6656 	SND_PCI_QUIRK(0x103c, 0x8e1b, "HP EliteBook G12", ALC245_FIXUP_HP_ZBOOK_FIREFLY_G12A),
6657 	SND_PCI_QUIRK(0x103c, 0x8e1c, "HP EliteBook G12", ALC245_FIXUP_HP_ZBOOK_FIREFLY_G12A),
6658 	SND_PCI_QUIRK(0x103c, 0x8e1d, "HP ZBook X Gli 16 G12", ALC236_FIXUP_HP_GPIO_LED),
6659 	SND_PCI_QUIRK(0x103c, 0x8e2c, "HP EliteBook 16 G12", ALC285_FIXUP_HP_GPIO_LED),
6660 	SND_PCI_QUIRK(0x103c, 0x8e36, "HP 14 Enstrom OmniBook X", ALC287_FIXUP_CS35L41_I2C_2),
6661 	SND_PCI_QUIRK(0x103c, 0x8e37, "HP 16 Piston OmniBook X", ALC287_FIXUP_CS35L41_I2C_2),
6662 	SND_PCI_QUIRK(0x103c, 0x8e3a, "HP Agusta", ALC287_FIXUP_CS35L41_I2C_2),
6663 	SND_PCI_QUIRK(0x103c, 0x8e3b, "HP Agusta", ALC287_FIXUP_CS35L41_I2C_2),
6664 	SND_PCI_QUIRK(0x103c, 0x8e60, "HP Trekker ", ALC287_FIXUP_CS35L41_I2C_2),
6665 	SND_PCI_QUIRK(0x103c, 0x8e61, "HP Trekker ", ALC287_FIXUP_CS35L41_I2C_2),
6666 	SND_PCI_QUIRK(0x103c, 0x8e62, "HP Trekker ", ALC287_FIXUP_CS35L41_I2C_2),
6667 	SND_PCI_QUIRK(0x1043, 0x1032, "ASUS VivoBook X513EA", ALC256_FIXUP_ASUS_MIC_NO_PRESENCE),
6668 	SND_PCI_QUIRK(0x1043, 0x1034, "ASUS GU605C", ALC285_FIXUP_ASUS_GU605_SPI_SPEAKER2_TO_DAC1),
6669 	SND_PCI_QUIRK(0x1043, 0x103e, "ASUS X540SA", ALC256_FIXUP_ASUS_MIC),
6670 	SND_PCI_QUIRK(0x1043, 0x103f, "ASUS TX300", ALC282_FIXUP_ASUS_TX300),
6671 	SND_PCI_QUIRK(0x1043, 0x1054, "ASUS G614FH/FM/FP", ALC287_FIXUP_CS35L41_I2C_2),
6672 	SND_PCI_QUIRK(0x1043, 0x106d, "Asus K53BE", ALC269_FIXUP_LIMIT_INT_MIC_BOOST),
6673 	SND_PCI_QUIRK(0x1043, 0x106f, "ASUS VivoBook X515UA", ALC256_FIXUP_ASUS_MIC_NO_PRESENCE),
6674 	SND_PCI_QUIRK(0x1043, 0x1074, "ASUS G614PH/PM/PP", ALC287_FIXUP_CS35L41_I2C_2),
6675 	SND_PCI_QUIRK(0x1043, 0x10a1, "ASUS UX391UA", ALC294_FIXUP_ASUS_SPK),
6676 	SND_PCI_QUIRK(0x1043, 0x10a4, "ASUS TP3407SA", ALC287_FIXUP_TAS2781_I2C),
6677 	SND_PCI_QUIRK(0x1043, 0x10c0, "ASUS X540SA", ALC256_FIXUP_ASUS_MIC),
6678 	SND_PCI_QUIRK(0x1043, 0x10d0, "ASUS X540LA/X540LJ", ALC255_FIXUP_ASUS_MIC_NO_PRESENCE),
6679 	SND_PCI_QUIRK(0x1043, 0x10d3, "ASUS K6500ZC", ALC294_FIXUP_ASUS_SPK),
6680 	SND_PCI_QUIRK(0x1043, 0x1154, "ASUS TP3607SH", ALC287_FIXUP_TAS2781_I2C),
6681 	SND_PCI_QUIRK(0x1043, 0x115d, "Asus 1015E", ALC269_FIXUP_LIMIT_INT_MIC_BOOST),
6682 	SND_PCI_QUIRK(0x1043, 0x1194, "ASUS UM3406KA", ALC287_FIXUP_CS35L41_I2C_2),
6683 	SND_PCI_QUIRK(0x1043, 0x11c0, "ASUS X556UR", ALC255_FIXUP_ASUS_MIC_NO_PRESENCE),
6684 	SND_PCI_QUIRK(0x1043, 0x1204, "ASUS Strix G615JHR_JMR_JPR", ALC287_FIXUP_TAS2781_I2C),
6685 	SND_PCI_QUIRK(0x1043, 0x1214, "ASUS Strix G615LH_LM_LP", ALC287_FIXUP_TAS2781_I2C),
6686 	SND_PCI_QUIRK(0x1043, 0x125e, "ASUS Q524UQK", ALC255_FIXUP_ASUS_MIC_NO_PRESENCE),
6687 	SND_PCI_QUIRK(0x1043, 0x1271, "ASUS X430UN", ALC256_FIXUP_ASUS_MIC_NO_PRESENCE),
6688 	SND_PCI_QUIRK(0x1043, 0x1290, "ASUS X441SA", ALC233_FIXUP_EAPD_COEF_AND_MIC_NO_PRESENCE),
6689 	SND_PCI_QUIRK(0x1043, 0x1294, "ASUS B3405CVA", ALC245_FIXUP_CS35L41_SPI_2),
6690 	SND_PCI_QUIRK(0x1043, 0x12a0, "ASUS X441UV", ALC233_FIXUP_EAPD_COEF_AND_MIC_NO_PRESENCE),
6691 	SND_PCI_QUIRK(0x1043, 0x12a3, "Asus N7691ZM", ALC269_FIXUP_ASUS_N7601ZM),
6692 	SND_PCI_QUIRK(0x1043, 0x12af, "ASUS UX582ZS", ALC245_FIXUP_CS35L41_SPI_2),
6693 	SND_PCI_QUIRK(0x1043, 0x12b4, "ASUS B3405CCA / P3405CCA", ALC294_FIXUP_ASUS_CS35L41_SPI_2),
6694 	SND_PCI_QUIRK(0x1043, 0x12e0, "ASUS X541SA", ALC256_FIXUP_ASUS_MIC_NO_PRESENCE),
6695 	SND_PCI_QUIRK(0x1043, 0x12f0, "ASUS X541UV", ALC256_FIXUP_ASUS_MIC_NO_PRESENCE),
6696 	SND_PCI_QUIRK(0x1043, 0x1313, "Asus K42JZ", ALC269VB_FIXUP_ASUS_MIC_NO_PRESENCE),
6697 	SND_PCI_QUIRK(0x1043, 0x1314, "ASUS GA605K", ALC285_FIXUP_ASUS_GA605K_HEADSET_MIC),
6698 	SND_PCI_QUIRK(0x1043, 0x13b0, "ASUS Z550SA", ALC256_FIXUP_ASUS_MIC_NO_PRESENCE),
6699 	SND_PCI_QUIRK(0x1043, 0x1427, "Asus Zenbook UX31E", ALC269VB_FIXUP_ASUS_ZENBOOK),
6700 	SND_PCI_QUIRK(0x1043, 0x1433, "ASUS GX650PY/PZ/PV/PU/PYV/PZV/PIV/PVV", ALC285_FIXUP_ASUS_I2C_HEADSET_MIC),
6701 	SND_PCI_QUIRK(0x1043, 0x1454, "ASUS PM3406CKA", ALC287_FIXUP_CS35L41_I2C_2),
6702 	SND_PCI_QUIRK(0x1043, 0x1460, "Asus VivoBook 15", ALC256_FIXUP_ASUS_MIC_NO_PRESENCE),
6703 	SND_PCI_QUIRK(0x1043, 0x1463, "Asus GA402X/GA402N", ALC285_FIXUP_ASUS_I2C_HEADSET_MIC),
6704 	SND_PCI_QUIRK(0x1043, 0x1473, "ASUS GU604VI/VC/VE/VG/VJ/VQ/VU/VV/VY/VZ", ALC285_FIXUP_ASUS_HEADSET_MIC),
6705 	SND_PCI_QUIRK(0x1043, 0x1483, "ASUS GU603VQ/VU/VV/VJ/VI", ALC285_FIXUP_ASUS_HEADSET_MIC),
6706 	SND_PCI_QUIRK(0x1043, 0x1493, "ASUS GV601VV/VU/VJ/VQ/VI", ALC285_FIXUP_ASUS_HEADSET_MIC),
6707 	SND_PCI_QUIRK(0x1043, 0x14d3, "ASUS G614JY/JZ/JG", ALC245_FIXUP_CS35L41_SPI_2),
6708 	SND_PCI_QUIRK(0x1043, 0x14e3, "ASUS G513PI/PU/PV", ALC287_FIXUP_CS35L41_I2C_2),
6709 	SND_PCI_QUIRK(0x1043, 0x14f2, "ASUS VivoBook X515JA", ALC256_FIXUP_ASUS_MIC_NO_PRESENCE),
6710 	SND_PCI_QUIRK(0x1043, 0x1503, "ASUS G733PY/PZ/PZV/PYV", ALC287_FIXUP_CS35L41_I2C_2),
6711 	SND_PCI_QUIRK(0x1043, 0x1517, "Asus Zenbook UX31A", ALC269VB_FIXUP_ASUS_ZENBOOK_UX31A),
6712 	SND_PCI_QUIRK(0x1043, 0x1533, "ASUS GV302XA/XJ/XQ/XU/XV/XI", ALC287_FIXUP_CS35L41_I2C_2),
6713 	SND_PCI_QUIRK(0x1043, 0x1573, "ASUS GZ301VV/VQ/VU/VJ/VA/VC/VE/VVC/VQC/VUC/VJC/VEC/VCC", ALC285_FIXUP_ASUS_HEADSET_MIC),
6714 	SND_PCI_QUIRK(0x1043, 0x1662, "ASUS GV301QH", ALC294_FIXUP_ASUS_DUAL_SPK),
6715 	SND_PCI_QUIRK(0x1043, 0x1663, "ASUS GU603ZI/ZJ/ZQ/ZU/ZV", ALC285_FIXUP_ASUS_HEADSET_MIC),
6716 	SND_PCI_QUIRK(0x1043, 0x1683, "ASUS UM3402YAR", ALC287_FIXUP_CS35L41_I2C_2),
6717 	SND_PCI_QUIRK(0x1043, 0x16a3, "ASUS UX3402VA", ALC245_FIXUP_CS35L41_SPI_2),
6718 	SND_PCI_QUIRK(0x1043, 0x16b2, "ASUS GU603", ALC289_FIXUP_ASUS_GA401),
6719 	SND_PCI_QUIRK(0x1043, 0x16d3, "ASUS UX5304VA", ALC245_FIXUP_CS35L41_SPI_2),
6720 	SND_PCI_QUIRK(0x1043, 0x16e3, "ASUS UX50", ALC269_FIXUP_STEREO_DMIC),
6721 	SND_PCI_QUIRK(0x1043, 0x16f3, "ASUS UX7602VI/BZ", ALC245_FIXUP_CS35L41_SPI_2),
6722 	SND_PCI_QUIRK(0x1043, 0x1740, "ASUS UX430UA", ALC295_FIXUP_ASUS_DACS),
6723 	SND_PCI_QUIRK(0x1043, 0x17d1, "ASUS UX431FL", ALC294_FIXUP_ASUS_DUAL_SPK),
6724 	SND_PCI_QUIRK(0x1043, 0x17f3, "ROG Ally NR2301L/X", ALC294_FIXUP_ASUS_ALLY),
6725 	SND_PCI_QUIRK(0x1043, 0x1863, "ASUS UX6404VI/VV", ALC245_FIXUP_CS35L41_SPI_2),
6726 	SND_PCI_QUIRK(0x1043, 0x1881, "ASUS Zephyrus S/M", ALC294_FIXUP_ASUS_GX502_PINS),
6727 	SND_PCI_QUIRK(0x1043, 0x18b1, "Asus MJ401TA", ALC256_FIXUP_ASUS_HEADSET_MIC),
6728 	SND_PCI_QUIRK(0x1043, 0x18d3, "ASUS UM3504DA", ALC294_FIXUP_CS35L41_I2C_2),
6729 	SND_PCI_QUIRK(0x1043, 0x18f1, "Asus FX505DT", ALC256_FIXUP_ASUS_HEADSET_MIC),
6730 	SND_PCI_QUIRK(0x1043, 0x194e, "ASUS UX563FD", ALC294_FIXUP_ASUS_HPE),
6731 	SND_PCI_QUIRK(0x1043, 0x1970, "ASUS UX550VE", ALC289_FIXUP_ASUS_GA401),
6732 	SND_PCI_QUIRK(0x1043, 0x1982, "ASUS B1400CEPE", ALC256_FIXUP_ASUS_HPE),
6733 	SND_PCI_QUIRK(0x1043, 0x19ce, "ASUS B9450FA", ALC294_FIXUP_ASUS_HPE),
6734 	SND_PCI_QUIRK(0x1043, 0x19e1, "ASUS UX581LV", ALC295_FIXUP_ASUS_MIC_NO_PRESENCE),
6735 	SND_PCI_QUIRK(0x1043, 0x1a13, "Asus G73Jw", ALC269_FIXUP_ASUS_G73JW),
6736 	SND_PCI_QUIRK(0x1043, 0x1a63, "ASUS UX3405MA", ALC245_FIXUP_CS35L41_SPI_2),
6737 	SND_PCI_QUIRK(0x1043, 0x1a83, "ASUS UM5302LA", ALC294_FIXUP_CS35L41_I2C_2),
6738 	SND_PCI_QUIRK(0x1043, 0x1a8e, "ASUS G712LWS", ALC294_FIXUP_LENOVO_MIC_LOCATION),
6739 	SND_PCI_QUIRK(0x1043, 0x1a8f, "ASUS UX582ZS", ALC245_FIXUP_CS35L41_SPI_2),
6740 	SND_PCI_QUIRK(0x1043, 0x1b11, "ASUS UX431DA", ALC294_FIXUP_ASUS_COEF_1B),
6741 	SND_PCI_QUIRK(0x1043, 0x1b13, "ASUS U41SV/GA403U", ALC285_FIXUP_ASUS_GA403U_HEADSET_MIC),
6742 	SND_PCI_QUIRK(0x1043, 0x1b93, "ASUS G614JVR/JIR", ALC245_FIXUP_CS35L41_SPI_2),
6743 	SND_PCI_QUIRK(0x1043, 0x1bbd, "ASUS Z550MA", ALC255_FIXUP_ASUS_MIC_NO_PRESENCE),
6744 	SND_PCI_QUIRK(0x1043, 0x1c03, "ASUS UM3406HA", ALC294_FIXUP_ASUS_I2C_HEADSET_MIC),
6745 	SND_PCI_QUIRK(0x1043, 0x1c23, "Asus X55U", ALC269_FIXUP_LIMIT_INT_MIC_BOOST),
6746 	SND_PCI_QUIRK(0x1043, 0x1c33, "ASUS UX5304MA", ALC245_FIXUP_CS35L41_SPI_2),
6747 	SND_PCI_QUIRK(0x1043, 0x1c43, "ASUS UX8406MA", ALC245_FIXUP_CS35L41_SPI_2),
6748 	SND_PCI_QUIRK(0x1043, 0x1c62, "ASUS GU603", ALC289_FIXUP_ASUS_GA401),
6749 	SND_PCI_QUIRK(0x1043, 0x1c63, "ASUS GU605M", ALC285_FIXUP_ASUS_GU605_SPI_SPEAKER2_TO_DAC1),
6750 	SND_PCI_QUIRK(0x1043, 0x1c80, "ASUS VivoBook TP401", ALC256_FIXUP_ASUS_MIC_NO_PRESENCE),
6751 	SND_PCI_QUIRK(0x1043, 0x1c92, "ASUS ROG Strix G15", ALC285_FIXUP_ASUS_G533Z_PINS),
6752 	SND_PCI_QUIRK(0x1043, 0x1c9f, "ASUS G614JU/JV/JI", ALC285_FIXUP_ASUS_HEADSET_MIC),
6753 	SND_PCI_QUIRK(0x1043, 0x1caf, "ASUS G634JY/JZ/JI/JG", ALC285_FIXUP_ASUS_SPI_REAR_SPEAKERS),
6754 	SND_PCI_QUIRK(0x1043, 0x1ccd, "ASUS X555UB", ALC256_FIXUP_ASUS_MIC_NO_PRESENCE),
6755 	SND_PCI_QUIRK(0x1043, 0x1ccf, "ASUS G814JU/JV/JI", ALC245_FIXUP_CS35L41_SPI_2),
6756 	SND_PCI_QUIRK(0x1043, 0x1cdf, "ASUS G814JY/JZ/JG", ALC245_FIXUP_CS35L41_SPI_2),
6757 	SND_PCI_QUIRK(0x1043, 0x1cef, "ASUS G834JY/JZ/JI/JG", ALC285_FIXUP_ASUS_HEADSET_MIC),
6758 	SND_PCI_QUIRK(0x1043, 0x1d1f, "ASUS G713PI/PU/PV/PVN", ALC287_FIXUP_CS35L41_I2C_2),
6759 	SND_PCI_QUIRK(0x1043, 0x1d42, "ASUS Zephyrus G14 2022", ALC289_FIXUP_ASUS_GA401),
6760 	SND_PCI_QUIRK(0x1043, 0x1d4e, "ASUS TM420", ALC256_FIXUP_ASUS_HPE),
6761 	SND_PCI_QUIRK(0x1043, 0x1da2, "ASUS UP6502ZA/ZD", ALC245_FIXUP_CS35L41_SPI_2),
6762 	SND_PCI_QUIRK(0x1043, 0x1df3, "ASUS UM5606WA", ALC294_FIXUP_BASS_SPEAKER_15),
6763 	SND_PCI_QUIRK(0x1043, 0x1264, "ASUS UM5606KA", ALC294_FIXUP_BASS_SPEAKER_15),
6764 	SND_PCI_QUIRK(0x1043, 0x1e02, "ASUS UX3402ZA", ALC245_FIXUP_CS35L41_SPI_2),
6765 	SND_PCI_QUIRK(0x1043, 0x1e10, "ASUS VivoBook X507UAR", ALC256_FIXUP_ASUS_MIC_NO_PRESENCE),
6766 	SND_PCI_QUIRK(0x1043, 0x1e11, "ASUS Zephyrus G15", ALC289_FIXUP_ASUS_GA502),
6767 	SND_PCI_QUIRK(0x1043, 0x1e12, "ASUS UM3402", ALC287_FIXUP_CS35L41_I2C_2),
6768 	SND_PCI_QUIRK(0x1043, 0x1e1f, "ASUS Vivobook 15 X1504VAP", ALC2XX_FIXUP_HEADSET_MIC),
6769 	SND_PCI_QUIRK(0x1043, 0x1e51, "ASUS Zephyrus M15", ALC294_FIXUP_ASUS_GU502_PINS),
6770 	SND_PCI_QUIRK(0x1043, 0x1e5e, "ASUS ROG Strix G513", ALC294_FIXUP_ASUS_G513_PINS),
6771 	SND_PCI_QUIRK(0x1043, 0x1e63, "ASUS H7606W", ALC285_FIXUP_ASUS_GU605_SPI_SPEAKER2_TO_DAC1),
6772 	SND_PCI_QUIRK(0x1043, 0x1e83, "ASUS GA605W", ALC285_FIXUP_ASUS_GU605_SPI_SPEAKER2_TO_DAC1),
6773 	SND_PCI_QUIRK(0x1043, 0x1e8e, "ASUS Zephyrus G15", ALC289_FIXUP_ASUS_GA401),
6774 	SND_PCI_QUIRK(0x1043, 0x1e93, "ASUS ExpertBook B9403CVAR", ALC294_FIXUP_ASUS_HPE),
6775 	SND_PCI_QUIRK(0x1043, 0x1eb3, "ASUS Ally RCLA72", ALC287_FIXUP_TAS2781_I2C),
6776 	SND_PCI_QUIRK(0x1043, 0x1ed3, "ASUS HN7306W", ALC287_FIXUP_CS35L41_I2C_2),
6777 	SND_PCI_QUIRK(0x1043, 0x1ee2, "ASUS UM6702RA/RC", ALC287_FIXUP_CS35L41_I2C_2),
6778 	SND_PCI_QUIRK(0x1043, 0x1c52, "ASUS Zephyrus G15 2022", ALC289_FIXUP_ASUS_GA401),
6779 	SND_PCI_QUIRK(0x1043, 0x1f11, "ASUS Zephyrus G14", ALC289_FIXUP_ASUS_GA401),
6780 	SND_PCI_QUIRK(0x1043, 0x1f12, "ASUS UM5302", ALC287_FIXUP_CS35L41_I2C_2),
6781 	SND_PCI_QUIRK(0x1043, 0x1f1f, "ASUS H7604JI/JV/J3D", ALC245_FIXUP_CS35L41_SPI_2),
6782 	SND_PCI_QUIRK(0x1043, 0x1f62, "ASUS UX7602ZM", ALC245_FIXUP_CS35L41_SPI_2),
6783 	SND_PCI_QUIRK(0x1043, 0x1f63, "ASUS P5405CSA", ALC245_FIXUP_CS35L41_SPI_2),
6784 	SND_PCI_QUIRK(0x1043, 0x1f92, "ASUS ROG Flow X16", ALC289_FIXUP_ASUS_GA401),
6785 	SND_PCI_QUIRK(0x1043, 0x1fb3, "ASUS ROG Flow Z13 GZ302EA", ALC287_FIXUP_CS35L41_I2C_2),
6786 	SND_PCI_QUIRK(0x1043, 0x3011, "ASUS B5605CVA", ALC245_FIXUP_CS35L41_SPI_2),
6787 	SND_PCI_QUIRK(0x1043, 0x3030, "ASUS ZN270IE", ALC256_FIXUP_ASUS_AIO_GPIO2),
6788 	SND_PCI_QUIRK(0x1043, 0x3061, "ASUS B3405CCA", ALC294_FIXUP_ASUS_CS35L41_SPI_2),
6789 	SND_PCI_QUIRK(0x1043, 0x3071, "ASUS B5405CCA", ALC294_FIXUP_ASUS_CS35L41_SPI_2),
6790 	SND_PCI_QUIRK(0x1043, 0x30c1, "ASUS B3605CCA / P3605CCA", ALC294_FIXUP_ASUS_CS35L41_SPI_2),
6791 	SND_PCI_QUIRK(0x1043, 0x30d1, "ASUS B5405CCA", ALC294_FIXUP_ASUS_CS35L41_SPI_2),
6792 	SND_PCI_QUIRK(0x1043, 0x30e1, "ASUS B5605CCA", ALC294_FIXUP_ASUS_CS35L41_SPI_2),
6793 	SND_PCI_QUIRK(0x1043, 0x31d0, "ASUS Zen AIO 27 Z272SD_A272SD", ALC274_FIXUP_ASUS_ZEN_AIO_27),
6794 	SND_PCI_QUIRK(0x1043, 0x31e1, "ASUS B5605CCA", ALC294_FIXUP_ASUS_CS35L41_SPI_2),
6795 	SND_PCI_QUIRK(0x1043, 0x31f1, "ASUS B3605CCA", ALC294_FIXUP_ASUS_CS35L41_SPI_2),
6796 	SND_PCI_QUIRK(0x1043, 0x3391, "ASUS PM3606CKA", ALC287_FIXUP_CS35L41_I2C_2),
6797 	SND_PCI_QUIRK(0x1043, 0x3a20, "ASUS G614JZR", ALC285_FIXUP_ASUS_SPI_REAR_SPEAKERS),
6798 	SND_PCI_QUIRK(0x1043, 0x3a30, "ASUS G814JVR/JIR", ALC285_FIXUP_ASUS_SPI_REAR_SPEAKERS),
6799 	SND_PCI_QUIRK(0x1043, 0x3a40, "ASUS G814JZR", ALC285_FIXUP_ASUS_SPI_REAR_SPEAKERS),
6800 	SND_PCI_QUIRK(0x1043, 0x3a50, "ASUS G834JYR/JZR", ALC285_FIXUP_ASUS_SPI_REAR_SPEAKERS),
6801 	SND_PCI_QUIRK(0x1043, 0x3a60, "ASUS G634JYR/JZR", ALC285_FIXUP_ASUS_SPI_REAR_SPEAKERS),
6802 	SND_PCI_QUIRK(0x1043, 0x3d78, "ASUS GA603KH", ALC287_FIXUP_CS35L41_I2C_2),
6803 	SND_PCI_QUIRK(0x1043, 0x3d88, "ASUS GA603KM", ALC287_FIXUP_CS35L41_I2C_2),
6804 	SND_PCI_QUIRK(0x1043, 0x3e00, "ASUS G814FH/FM/FP", ALC287_FIXUP_CS35L41_I2C_2),
6805 	SND_PCI_QUIRK(0x1043, 0x3e20, "ASUS G814PH/PM/PP", ALC287_FIXUP_CS35L41_I2C_2),
6806 	SND_PCI_QUIRK(0x1043, 0x3e30, "ASUS TP3607SA", ALC287_FIXUP_TAS2781_I2C),
6807 	SND_PCI_QUIRK(0x1043, 0x3ee0, "ASUS Strix G815_JHR_JMR_JPR", ALC287_FIXUP_TAS2781_I2C),
6808 	SND_PCI_QUIRK(0x1043, 0x3ef0, "ASUS Strix G635LR_LW_LX", ALC287_FIXUP_TAS2781_I2C),
6809 	SND_PCI_QUIRK(0x1043, 0x3f00, "ASUS Strix G815LH_LM_LP", ALC287_FIXUP_TAS2781_I2C),
6810 	SND_PCI_QUIRK(0x1043, 0x3f10, "ASUS Strix G835LR_LW_LX", ALC287_FIXUP_TAS2781_I2C),
6811 	SND_PCI_QUIRK(0x1043, 0x3f20, "ASUS Strix G615LR_LW", ALC287_FIXUP_TAS2781_I2C),
6812 	SND_PCI_QUIRK(0x1043, 0x3f30, "ASUS Strix G815LR_LW", ALC287_FIXUP_TAS2781_I2C),
6813 	SND_PCI_QUIRK(0x1043, 0x3fd0, "ASUS B3605CVA", ALC245_FIXUP_CS35L41_SPI_2),
6814 	SND_PCI_QUIRK(0x1043, 0x3ff0, "ASUS B5405CVA", ALC245_FIXUP_CS35L41_SPI_2),
6815 	SND_PCI_QUIRK(0x1043, 0x831a, "ASUS P901", ALC269_FIXUP_STEREO_DMIC),
6816 	SND_PCI_QUIRK(0x1043, 0x834a, "ASUS S101", ALC269_FIXUP_STEREO_DMIC),
6817 	SND_PCI_QUIRK(0x1043, 0x8398, "ASUS P1005", ALC269_FIXUP_STEREO_DMIC),
6818 	SND_PCI_QUIRK(0x1043, 0x83ce, "ASUS P1005", ALC269_FIXUP_STEREO_DMIC),
6819 	SND_PCI_QUIRK(0x1043, 0x8516, "ASUS X101CH", ALC269_FIXUP_ASUS_X101),
6820 	SND_PCI_QUIRK(0x1043, 0x88f4, "ASUS NUC14LNS", ALC245_FIXUP_CS35L41_SPI_1),
6821 	SND_PCI_QUIRK(0x104d, 0x9073, "Sony VAIO", ALC275_FIXUP_SONY_VAIO_GPIO2),
6822 	SND_PCI_QUIRK(0x104d, 0x907b, "Sony VAIO", ALC275_FIXUP_SONY_HWEQ),
6823 	SND_PCI_QUIRK(0x104d, 0x9084, "Sony VAIO", ALC275_FIXUP_SONY_HWEQ),
6824 	SND_PCI_QUIRK(0x104d, 0x9099, "Sony VAIO S13", ALC275_FIXUP_SONY_DISABLE_AAMIX),
6825 	SND_PCI_QUIRK(0x104d, 0x90b5, "Sony VAIO Pro 11", ALC286_FIXUP_SONY_MIC_NO_PRESENCE),
6826 	SND_PCI_QUIRK(0x104d, 0x90b6, "Sony VAIO Pro 13", ALC286_FIXUP_SONY_MIC_NO_PRESENCE),
6827 	SND_PCI_QUIRK(0x10cf, 0x1475, "Lifebook", ALC269_FIXUP_LIFEBOOK),
6828 	SND_PCI_QUIRK(0x10cf, 0x159f, "Lifebook E780", ALC269_FIXUP_LIFEBOOK_NO_HP_TO_LINEOUT),
6829 	SND_PCI_QUIRK(0x10cf, 0x15dc, "Lifebook T731", ALC269_FIXUP_LIFEBOOK_HP_PIN),
6830 	SND_PCI_QUIRK(0x10cf, 0x1629, "Lifebook U7x7", ALC255_FIXUP_LIFEBOOK_U7x7_HEADSET_MIC),
6831 	SND_PCI_QUIRK(0x10cf, 0x1757, "Lifebook E752", ALC269_FIXUP_LIFEBOOK_HP_PIN),
6832 	SND_PCI_QUIRK(0x10cf, 0x1845, "Lifebook U904", ALC269_FIXUP_LIFEBOOK_EXTMIC),
6833 	SND_PCI_QUIRK(0x10ec, 0x10f2, "Intel Reference board", ALC700_FIXUP_INTEL_REFERENCE),
6834 	SND_PCI_QUIRK(0x10ec, 0x118c, "Medion EE4254 MD62100", ALC256_FIXUP_MEDION_HEADSET_NO_PRESENCE),
6835 	SND_PCI_QUIRK(0x10ec, 0x119e, "Positivo SU C1400", ALC269_FIXUP_ASPIRE_HEADSET_MIC),
6836 	SND_PCI_QUIRK(0x10ec, 0x11bc, "VAIO VJFE-IL", ALC269_FIXUP_LIMIT_INT_MIC_BOOST),
6837 	SND_PCI_QUIRK(0x10ec, 0x1230, "Intel Reference board", ALC295_FIXUP_CHROME_BOOK),
6838 	SND_PCI_QUIRK(0x10ec, 0x124c, "Intel Reference board", ALC295_FIXUP_CHROME_BOOK),
6839 	SND_PCI_QUIRK(0x10ec, 0x1252, "Intel Reference board", ALC295_FIXUP_CHROME_BOOK),
6840 	SND_PCI_QUIRK(0x10ec, 0x1254, "Intel Reference board", ALC295_FIXUP_CHROME_BOOK),
6841 	SND_PCI_QUIRK(0x10ec, 0x12cc, "Intel Reference board", ALC295_FIXUP_CHROME_BOOK),
6842 	SND_PCI_QUIRK(0x10ec, 0x12f6, "Intel Reference board", ALC295_FIXUP_CHROME_BOOK),
6843 	SND_PCI_QUIRK(0x10f7, 0x8338, "Panasonic CF-SZ6", ALC269_FIXUP_ASPIRE_HEADSET_MIC),
6844 	SND_PCI_QUIRK(0x144d, 0xc109, "Samsung Ativ book 9 (NP900X3G)", ALC269_FIXUP_INV_DMIC),
6845 	SND_PCI_QUIRK(0x144d, 0xc169, "Samsung Notebook 9 Pen (NP930SBE-K01US)", ALC298_FIXUP_SAMSUNG_AMP),
6846 	SND_PCI_QUIRK(0x144d, 0xc176, "Samsung Notebook 9 Pro (NP930MBE-K04US)", ALC298_FIXUP_SAMSUNG_AMP),
6847 	SND_PCI_QUIRK(0x144d, 0xc189, "Samsung Galaxy Flex Book (NT950QCG-X716)", ALC298_FIXUP_SAMSUNG_AMP),
6848 	SND_PCI_QUIRK(0x144d, 0xc18a, "Samsung Galaxy Book Ion (NP930XCJ-K01US)", ALC298_FIXUP_SAMSUNG_AMP),
6849 	SND_PCI_QUIRK(0x144d, 0xc1a3, "Samsung Galaxy Book Pro (NP935XDB-KC1SE)", ALC298_FIXUP_SAMSUNG_AMP),
6850 	SND_PCI_QUIRK(0x144d, 0xc1a4, "Samsung Galaxy Book Pro 360 (NT935QBD)", ALC298_FIXUP_SAMSUNG_AMP),
6851 	SND_PCI_QUIRK(0x144d, 0xc1a6, "Samsung Galaxy Book Pro 360 (NP930QBD)", ALC298_FIXUP_SAMSUNG_AMP),
6852 	SND_PCI_QUIRK(0x144d, 0xc740, "Samsung Ativ book 8 (NP870Z5G)", ALC269_FIXUP_ATIV_BOOK_8),
6853 	SND_PCI_QUIRK(0x144d, 0xc812, "Samsung Notebook Pen S (NT950SBE-X58)", ALC298_FIXUP_SAMSUNG_AMP),
6854 	SND_PCI_QUIRK(0x144d, 0xc830, "Samsung Galaxy Book Ion (NT950XCJ-X716A)", ALC298_FIXUP_SAMSUNG_AMP),
6855 	SND_PCI_QUIRK(0x144d, 0xc832, "Samsung Galaxy Book Flex Alpha (NP730QCJ)", ALC256_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET),
6856 	SND_PCI_QUIRK(0x144d, 0xca03, "Samsung Galaxy Book2 Pro 360 (NP930QED)", ALC298_FIXUP_SAMSUNG_AMP),
6857 	SND_PCI_QUIRK(0x144d, 0xca06, "Samsung Galaxy Book3 360 (NP730QFG)", ALC298_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET),
6858 	SND_PCI_QUIRK(0x144d, 0xc868, "Samsung Galaxy Book2 Pro (NP930XED)", ALC298_FIXUP_SAMSUNG_AMP),
6859 	SND_PCI_QUIRK(0x144d, 0xc870, "Samsung Galaxy Book2 Pro (NP950XED)", ALC298_FIXUP_SAMSUNG_AMP_V2_2_AMPS),
6860 	SND_PCI_QUIRK(0x144d, 0xc872, "Samsung Galaxy Book2 Pro (NP950XEE)", ALC298_FIXUP_SAMSUNG_AMP_V2_2_AMPS),
6861 	SND_PCI_QUIRK(0x144d, 0xc886, "Samsung Galaxy Book3 Pro (NP964XFG)", ALC298_FIXUP_SAMSUNG_AMP_V2_4_AMPS),
6862 	SND_PCI_QUIRK(0x144d, 0xc1ca, "Samsung Galaxy Book3 Pro 360 (NP960QFG)", ALC298_FIXUP_SAMSUNG_AMP_V2_4_AMPS),
6863 	SND_PCI_QUIRK(0x144d, 0xc1cc, "Samsung Galaxy Book3 Ultra (NT960XFH)", ALC298_FIXUP_SAMSUNG_AMP_V2_4_AMPS),
6864 	SND_PCI_QUIRK(0x1458, 0xfa53, "Gigabyte BXBT-2807", ALC283_FIXUP_HEADSET_MIC),
6865 	SND_PCI_QUIRK(0x1462, 0xb120, "MSI Cubi MS-B120", ALC283_FIXUP_HEADSET_MIC),
6866 	SND_PCI_QUIRK(0x1462, 0xb171, "Cubi N 8GL (MS-B171)", ALC283_FIXUP_HEADSET_MIC),
6867 	SND_PCI_QUIRK(0x152d, 0x1082, "Quanta NL3", ALC269_FIXUP_LIFEBOOK),
6868 	SND_PCI_QUIRK(0x152d, 0x1262, "Huawei NBLB-WAX9N", ALC2XX_FIXUP_HEADSET_MIC),
6869 	SND_PCI_QUIRK(0x1558, 0x0353, "Clevo V35[05]SN[CDE]Q", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
6870 	SND_PCI_QUIRK(0x1558, 0x1323, "Clevo N130ZU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
6871 	SND_PCI_QUIRK(0x1558, 0x1325, "Clevo N15[01][CW]U", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
6872 	SND_PCI_QUIRK(0x1558, 0x1401, "Clevo L140[CZ]U", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
6873 	SND_PCI_QUIRK(0x1558, 0x1403, "Clevo N140CU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
6874 	SND_PCI_QUIRK(0x1558, 0x1404, "Clevo N150CU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
6875 	SND_PCI_QUIRK(0x1558, 0x14a1, "Clevo L141MU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
6876 	SND_PCI_QUIRK(0x1558, 0x2624, "Clevo L240TU", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
6877 	SND_PCI_QUIRK(0x1558, 0x28c1, "Clevo V370VND", ALC2XX_FIXUP_HEADSET_MIC),
6878 	SND_PCI_QUIRK(0x1558, 0x35a1, "Clevo V3[56]0EN[CDE]", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
6879 	SND_PCI_QUIRK(0x1558, 0x35b1, "Clevo V3[57]0WN[MNP]Q", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
6880 	SND_PCI_QUIRK(0x1558, 0x4018, "Clevo NV40M[BE]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
6881 	SND_PCI_QUIRK(0x1558, 0x4019, "Clevo NV40MZ", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
6882 	SND_PCI_QUIRK(0x1558, 0x4020, "Clevo NV40MB", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
6883 	SND_PCI_QUIRK(0x1558, 0x4041, "Clevo NV4[15]PZ", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
6884 	SND_PCI_QUIRK(0x1558, 0x40a1, "Clevo NL40GU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
6885 	SND_PCI_QUIRK(0x1558, 0x40c1, "Clevo NL40[CZ]U", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
6886 	SND_PCI_QUIRK(0x1558, 0x40d1, "Clevo NL41DU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
6887 	SND_PCI_QUIRK(0x1558, 0x5015, "Clevo NH5[58]H[HJK]Q", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
6888 	SND_PCI_QUIRK(0x1558, 0x5017, "Clevo NH7[79]H[HJK]Q", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
6889 	SND_PCI_QUIRK(0x1558, 0x50a3, "Clevo NJ51GU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
6890 	SND_PCI_QUIRK(0x1558, 0x50b3, "Clevo NK50S[BEZ]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
6891 	SND_PCI_QUIRK(0x1558, 0x50b6, "Clevo NK50S5", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
6892 	SND_PCI_QUIRK(0x1558, 0x50b8, "Clevo NK50SZ", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
6893 	SND_PCI_QUIRK(0x1558, 0x50d5, "Clevo NP50D5", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
6894 	SND_PCI_QUIRK(0x1558, 0x50e1, "Clevo NH5[58]HPQ", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
6895 	SND_PCI_QUIRK(0x1558, 0x50e2, "Clevo NH7[79]HPQ", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
6896 	SND_PCI_QUIRK(0x1558, 0x50f0, "Clevo NH50A[CDF]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
6897 	SND_PCI_QUIRK(0x1558, 0x50f2, "Clevo NH50E[PR]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
6898 	SND_PCI_QUIRK(0x1558, 0x50f3, "Clevo NH58DPQ", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
6899 	SND_PCI_QUIRK(0x1558, 0x50f5, "Clevo NH55EPY", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
6900 	SND_PCI_QUIRK(0x1558, 0x50f6, "Clevo NH55DPQ", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
6901 	SND_PCI_QUIRK(0x1558, 0x5101, "Clevo S510WU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
6902 	SND_PCI_QUIRK(0x1558, 0x5157, "Clevo W517GU1", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
6903 	SND_PCI_QUIRK(0x1558, 0x51a1, "Clevo NS50MU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
6904 	SND_PCI_QUIRK(0x1558, 0x51b1, "Clevo NS50AU", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
6905 	SND_PCI_QUIRK(0x1558, 0x51b3, "Clevo NS70AU", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
6906 	SND_PCI_QUIRK(0x1558, 0x5630, "Clevo NP50RNJS", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
6907 	SND_PCI_QUIRK(0x1558, 0x5700, "Clevo X560WN[RST]", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
6908 	SND_PCI_QUIRK(0x1558, 0x70a1, "Clevo NB70T[HJK]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
6909 	SND_PCI_QUIRK(0x1558, 0x70b3, "Clevo NK70SB", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
6910 	SND_PCI_QUIRK(0x1558, 0x70f2, "Clevo NH79EPY", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
6911 	SND_PCI_QUIRK(0x1558, 0x70f3, "Clevo NH77DPQ", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
6912 	SND_PCI_QUIRK(0x1558, 0x70f4, "Clevo NH77EPY", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
6913 	SND_PCI_QUIRK(0x1558, 0x70f6, "Clevo NH77DPQ-Y", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
6914 	SND_PCI_QUIRK(0x1558, 0x7716, "Clevo NS50PU", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
6915 	SND_PCI_QUIRK(0x1558, 0x7717, "Clevo NS70PU", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
6916 	SND_PCI_QUIRK(0x1558, 0x7718, "Clevo L140PU", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
6917 	SND_PCI_QUIRK(0x1558, 0x7724, "Clevo L140AU", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
6918 	SND_PCI_QUIRK(0x1558, 0x8228, "Clevo NR40BU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
6919 	SND_PCI_QUIRK(0x1558, 0x8520, "Clevo NH50D[CD]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
6920 	SND_PCI_QUIRK(0x1558, 0x8521, "Clevo NH77D[CD]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
6921 	SND_PCI_QUIRK(0x1558, 0x8535, "Clevo NH50D[BE]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
6922 	SND_PCI_QUIRK(0x1558, 0x8536, "Clevo NH79D[BE]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
6923 	SND_PCI_QUIRK(0x1558, 0x8550, "Clevo NH[57][0-9][ER][ACDH]Q", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
6924 	SND_PCI_QUIRK(0x1558, 0x8551, "Clevo NH[57][0-9][ER][ACDH]Q", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
6925 	SND_PCI_QUIRK(0x1558, 0x8560, "Clevo NH[57][0-9][ER][ACDH]Q", ALC269_FIXUP_HEADSET_MIC),
6926 	SND_PCI_QUIRK(0x1558, 0x8561, "Clevo NH[57][0-9][ER][ACDH]Q", ALC269_FIXUP_HEADSET_MIC),
6927 	SND_PCI_QUIRK(0x1558, 0x8562, "Clevo NH[57][0-9]RZ[Q]", ALC269_FIXUP_DMIC),
6928 	SND_PCI_QUIRK(0x1558, 0x8668, "Clevo NP50B[BE]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
6929 	SND_PCI_QUIRK(0x1558, 0x866d, "Clevo NP5[05]PN[HJK]", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
6930 	SND_PCI_QUIRK(0x1558, 0x867c, "Clevo NP7[01]PNP", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
6931 	SND_PCI_QUIRK(0x1558, 0x867d, "Clevo NP7[01]PN[HJK]", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
6932 	SND_PCI_QUIRK(0x1558, 0x8680, "Clevo NJ50LU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
6933 	SND_PCI_QUIRK(0x1558, 0x8686, "Clevo NH50[CZ]U", ALC256_FIXUP_MIC_NO_PRESENCE_AND_RESUME),
6934 	SND_PCI_QUIRK(0x1558, 0x8a20, "Clevo NH55DCQ-Y", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
6935 	SND_PCI_QUIRK(0x1558, 0x8a51, "Clevo NH70RCQ-Y", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
6936 	SND_PCI_QUIRK(0x1558, 0x8d50, "Clevo NH55RCQ-M", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
6937 	SND_PCI_QUIRK(0x1558, 0x951d, "Clevo N950T[CDF]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
6938 	SND_PCI_QUIRK(0x1558, 0x9600, "Clevo N960K[PR]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
6939 	SND_PCI_QUIRK(0x1558, 0x961d, "Clevo N960S[CDF]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
6940 	SND_PCI_QUIRK(0x1558, 0x971d, "Clevo N970T[CDF]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
6941 	SND_PCI_QUIRK(0x1558, 0xa500, "Clevo NL5[03]RU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
6942 	SND_PCI_QUIRK(0x1558, 0xa554, "VAIO VJFH52", ALC269_FIXUP_VAIO_VJFH52_MIC_NO_PRESENCE),
6943 	SND_PCI_QUIRK(0x1558, 0xa600, "Clevo NL50NU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
6944 	SND_PCI_QUIRK(0x1558, 0xa650, "Clevo NP[567]0SN[CD]", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
6945 	SND_PCI_QUIRK(0x1558, 0xa671, "Clevo NP70SN[CDE]", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
6946 	SND_PCI_QUIRK(0x1558, 0xa741, "Clevo V54x_6x_TNE", ALC245_FIXUP_CLEVO_NOISY_MIC),
6947 	SND_PCI_QUIRK(0x1558, 0xa743, "Clevo V54x_6x_TU", ALC245_FIXUP_CLEVO_NOISY_MIC),
6948 	SND_PCI_QUIRK(0x1558, 0xa763, "Clevo V54x_6x_TU", ALC245_FIXUP_CLEVO_NOISY_MIC),
6949 	SND_PCI_QUIRK(0x1558, 0xb018, "Clevo NP50D[BE]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
6950 	SND_PCI_QUIRK(0x1558, 0xb019, "Clevo NH77D[BE]Q", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
6951 	SND_PCI_QUIRK(0x1558, 0xb022, "Clevo NH77D[DC][QW]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
6952 	SND_PCI_QUIRK(0x1558, 0xc018, "Clevo NP50D[BE]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
6953 	SND_PCI_QUIRK(0x1558, 0xc019, "Clevo NH77D[BE]Q", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
6954 	SND_PCI_QUIRK(0x1558, 0xc022, "Clevo NH77[DC][QW]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
6955 	SND_PCI_QUIRK(0x17aa, 0x1036, "Lenovo P520", ALC233_FIXUP_LENOVO_MULTI_CODECS),
6956 	SND_PCI_QUIRK(0x17aa, 0x1048, "ThinkCentre Station", ALC623_FIXUP_LENOVO_THINKSTATION_P340),
6957 	SND_PCI_QUIRK(0x17aa, 0x20f2, "Thinkpad SL410/510", ALC269_FIXUP_SKU_IGNORE),
6958 	SND_PCI_QUIRK(0x17aa, 0x215e, "Thinkpad L512", ALC269_FIXUP_SKU_IGNORE),
6959 	SND_PCI_QUIRK(0x17aa, 0x21b8, "Thinkpad Edge 14", ALC269_FIXUP_SKU_IGNORE),
6960 	SND_PCI_QUIRK(0x17aa, 0x21ca, "Thinkpad L412", ALC269_FIXUP_SKU_IGNORE),
6961 	SND_PCI_QUIRK(0x17aa, 0x21e9, "Thinkpad Edge 15", ALC269_FIXUP_SKU_IGNORE),
6962 	SND_PCI_QUIRK(0x17aa, 0x21f3, "Thinkpad T430", ALC269_FIXUP_LENOVO_DOCK),
6963 	SND_PCI_QUIRK(0x17aa, 0x21f6, "Thinkpad T530", ALC269_FIXUP_LENOVO_DOCK_LIMIT_BOOST),
6964 	SND_PCI_QUIRK(0x17aa, 0x21fa, "Thinkpad X230", ALC269_FIXUP_LENOVO_DOCK),
6965 	SND_PCI_QUIRK(0x17aa, 0x21fb, "Thinkpad T430s", ALC269_FIXUP_LENOVO_DOCK),
6966 	SND_PCI_QUIRK(0x17aa, 0x2203, "Thinkpad X230 Tablet", ALC269_FIXUP_LENOVO_DOCK),
6967 	SND_PCI_QUIRK(0x17aa, 0x2208, "Thinkpad T431s", ALC269_FIXUP_LENOVO_DOCK),
6968 	SND_PCI_QUIRK(0x17aa, 0x220c, "Thinkpad T440s", ALC292_FIXUP_TPT440),
6969 	SND_PCI_QUIRK(0x17aa, 0x220e, "Thinkpad T440p", ALC292_FIXUP_TPT440_DOCK),
6970 	SND_PCI_QUIRK(0x17aa, 0x2210, "Thinkpad T540p", ALC292_FIXUP_TPT440_DOCK),
6971 	SND_PCI_QUIRK(0x17aa, 0x2211, "Thinkpad W541", ALC292_FIXUP_TPT440_DOCK),
6972 	SND_PCI_QUIRK(0x17aa, 0x2212, "Thinkpad T440", ALC292_FIXUP_TPT440_DOCK),
6973 	SND_PCI_QUIRK(0x17aa, 0x2214, "Thinkpad X240", ALC292_FIXUP_TPT440_DOCK),
6974 	SND_PCI_QUIRK(0x17aa, 0x2215, "Thinkpad", ALC269_FIXUP_LIMIT_INT_MIC_BOOST),
6975 	SND_PCI_QUIRK(0x17aa, 0x2218, "Thinkpad X1 Carbon 2nd", ALC292_FIXUP_TPT440_DOCK),
6976 	SND_PCI_QUIRK(0x17aa, 0x2223, "ThinkPad T550", ALC292_FIXUP_TPT440_DOCK),
6977 	SND_PCI_QUIRK(0x17aa, 0x2226, "ThinkPad X250", ALC292_FIXUP_TPT440_DOCK),
6978 	SND_PCI_QUIRK(0x17aa, 0x222d, "Thinkpad", ALC298_FIXUP_TPT470_DOCK),
6979 	SND_PCI_QUIRK(0x17aa, 0x222e, "Thinkpad", ALC298_FIXUP_TPT470_DOCK),
6980 	SND_PCI_QUIRK(0x17aa, 0x2231, "Thinkpad T560", ALC292_FIXUP_TPT460),
6981 	SND_PCI_QUIRK(0x17aa, 0x2233, "Thinkpad", ALC292_FIXUP_TPT460),
6982 	SND_PCI_QUIRK(0x17aa, 0x2234, "Thinkpad ICE-1", ALC287_FIXUP_TAS2781_I2C),
6983 	SND_PCI_QUIRK(0x17aa, 0x2245, "Thinkpad T470", ALC298_FIXUP_TPT470_DOCK),
6984 	SND_PCI_QUIRK(0x17aa, 0x2246, "Thinkpad", ALC298_FIXUP_TPT470_DOCK),
6985 	SND_PCI_QUIRK(0x17aa, 0x2247, "Thinkpad", ALC298_FIXUP_TPT470_DOCK),
6986 	SND_PCI_QUIRK(0x17aa, 0x2249, "Thinkpad", ALC292_FIXUP_TPT460),
6987 	SND_PCI_QUIRK(0x17aa, 0x224b, "Thinkpad", ALC298_FIXUP_TPT470_DOCK),
6988 	SND_PCI_QUIRK(0x17aa, 0x224c, "Thinkpad", ALC298_FIXUP_TPT470_DOCK),
6989 	SND_PCI_QUIRK(0x17aa, 0x224d, "Thinkpad", ALC298_FIXUP_TPT470_DOCK),
6990 	SND_PCI_QUIRK(0x17aa, 0x225d, "Thinkpad T480", ALC269_FIXUP_LIMIT_INT_MIC_BOOST),
6991 	SND_PCI_QUIRK(0x17aa, 0x2292, "Thinkpad X1 Carbon 7th", ALC285_FIXUP_THINKPAD_HEADSET_JACK),
6992 	SND_PCI_QUIRK(0x17aa, 0x22be, "Thinkpad X1 Carbon 8th", ALC285_FIXUP_THINKPAD_HEADSET_JACK),
6993 	SND_PCI_QUIRK(0x17aa, 0x22c1, "Thinkpad P1 Gen 3", ALC285_FIXUP_THINKPAD_NO_BASS_SPK_HEADSET_JACK),
6994 	SND_PCI_QUIRK(0x17aa, 0x22c2, "Thinkpad X1 Extreme Gen 3", ALC285_FIXUP_THINKPAD_NO_BASS_SPK_HEADSET_JACK),
6995 	SND_PCI_QUIRK(0x17aa, 0x22f1, "Thinkpad", ALC287_FIXUP_MG_RTKC_CSAMP_CS35L41_I2C_THINKPAD),
6996 	SND_PCI_QUIRK(0x17aa, 0x22f2, "Thinkpad", ALC287_FIXUP_MG_RTKC_CSAMP_CS35L41_I2C_THINKPAD),
6997 	SND_PCI_QUIRK(0x17aa, 0x22f3, "Thinkpad", ALC287_FIXUP_MG_RTKC_CSAMP_CS35L41_I2C_THINKPAD),
6998 	SND_PCI_QUIRK(0x17aa, 0x2316, "Thinkpad P1 Gen 6", ALC287_FIXUP_MG_RTKC_CSAMP_CS35L41_I2C_THINKPAD),
6999 	SND_PCI_QUIRK(0x17aa, 0x2317, "Thinkpad P1 Gen 6", ALC287_FIXUP_MG_RTKC_CSAMP_CS35L41_I2C_THINKPAD),
7000 	SND_PCI_QUIRK(0x17aa, 0x2318, "Thinkpad Z13 Gen2", ALC287_FIXUP_MG_RTKC_CSAMP_CS35L41_I2C_THINKPAD),
7001 	SND_PCI_QUIRK(0x17aa, 0x2319, "Thinkpad Z16 Gen2", ALC287_FIXUP_MG_RTKC_CSAMP_CS35L41_I2C_THINKPAD),
7002 	SND_PCI_QUIRK(0x17aa, 0x231a, "Thinkpad Z16 Gen2", ALC287_FIXUP_MG_RTKC_CSAMP_CS35L41_I2C_THINKPAD),
7003 	SND_PCI_QUIRK(0x17aa, 0x231e, "Thinkpad", ALC287_FIXUP_LENOVO_THKPAD_WH_ALC1318),
7004 	SND_PCI_QUIRK(0x17aa, 0x231f, "Thinkpad", ALC287_FIXUP_LENOVO_THKPAD_WH_ALC1318),
7005 	SND_PCI_QUIRK(0x17aa, 0x2326, "Hera2", ALC287_FIXUP_TAS2781_I2C),
7006 	SND_PCI_QUIRK(0x17aa, 0x30bb, "ThinkCentre AIO", ALC233_FIXUP_LENOVO_LINE2_MIC_HOTKEY),
7007 	SND_PCI_QUIRK(0x17aa, 0x30e2, "ThinkCentre AIO", ALC233_FIXUP_LENOVO_LINE2_MIC_HOTKEY),
7008 	SND_PCI_QUIRK(0x17aa, 0x310c, "ThinkCentre Station", ALC294_FIXUP_LENOVO_MIC_LOCATION),
7009 	SND_PCI_QUIRK(0x17aa, 0x3111, "ThinkCentre Station", ALC294_FIXUP_LENOVO_MIC_LOCATION),
7010 	SND_PCI_QUIRK(0x17aa, 0x312a, "ThinkCentre Station", ALC294_FIXUP_LENOVO_MIC_LOCATION),
7011 	SND_PCI_QUIRK(0x17aa, 0x312f, "ThinkCentre Station", ALC294_FIXUP_LENOVO_MIC_LOCATION),
7012 	SND_PCI_QUIRK(0x17aa, 0x313c, "ThinkCentre Station", ALC294_FIXUP_LENOVO_MIC_LOCATION),
7013 	SND_PCI_QUIRK(0x17aa, 0x3151, "ThinkCentre Station", ALC283_FIXUP_HEADSET_MIC),
7014 	SND_PCI_QUIRK(0x17aa, 0x3176, "ThinkCentre Station", ALC283_FIXUP_HEADSET_MIC),
7015 	SND_PCI_QUIRK(0x17aa, 0x3178, "ThinkCentre Station", ALC283_FIXUP_HEADSET_MIC),
7016 	SND_PCI_QUIRK(0x17aa, 0x31af, "ThinkCentre Station", ALC623_FIXUP_LENOVO_THINKSTATION_P340),
7017 	SND_PCI_QUIRK(0x17aa, 0x334b, "Lenovo ThinkCentre M70 Gen5", ALC283_FIXUP_HEADSET_MIC),
7018 	SND_PCI_QUIRK(0x17aa, 0x3384, "ThinkCentre M90a PRO", ALC233_FIXUP_LENOVO_L2MH_LOW_ENLED),
7019 	SND_PCI_QUIRK(0x17aa, 0x3386, "ThinkCentre M90a Gen6", ALC233_FIXUP_LENOVO_L2MH_LOW_ENLED),
7020 	SND_PCI_QUIRK(0x17aa, 0x3387, "ThinkCentre M70a Gen6", ALC233_FIXUP_LENOVO_L2MH_LOW_ENLED),
7021 	SND_PCI_QUIRK(0x17aa, 0x3801, "Lenovo Yoga9 14IAP7", ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK_PIN),
7022 	HDA_CODEC_QUIRK(0x17aa, 0x3802, "DuetITL 2021", ALC287_FIXUP_YOGA7_14ITL_SPEAKERS),
7023 	SND_PCI_QUIRK(0x17aa, 0x3802, "Lenovo Yoga Pro 9 14IRP8", ALC287_FIXUP_TAS2781_I2C),
7024 	SND_PCI_QUIRK(0x17aa, 0x3813, "Legion 7i 15IMHG05", ALC287_FIXUP_LEGION_15IMHG05_SPEAKERS),
7025 	SND_PCI_QUIRK(0x17aa, 0x3818, "Lenovo C940 / Yoga Duet 7", ALC298_FIXUP_LENOVO_C940_DUET7),
7026 	SND_PCI_QUIRK(0x17aa, 0x3819, "Lenovo 13s Gen2 ITL", ALC287_FIXUP_13S_GEN2_SPEAKERS),
7027 	HDA_CODEC_QUIRK(0x17aa, 0x3820, "IdeaPad 330-17IKB 81DM", ALC269_FIXUP_ASPIRE_HEADSET_MIC),
7028 	SND_PCI_QUIRK(0x17aa, 0x3820, "Yoga Duet 7 13ITL6", ALC287_FIXUP_YOGA7_14ITL_SPEAKERS),
7029 	SND_PCI_QUIRK(0x17aa, 0x3824, "Legion Y9000X 2020", ALC285_FIXUP_LEGION_Y9000X_SPEAKERS),
7030 	SND_PCI_QUIRK(0x17aa, 0x3827, "Ideapad S740", ALC285_FIXUP_IDEAPAD_S740_COEF),
7031 	SND_PCI_QUIRK(0x17aa, 0x3834, "Lenovo IdeaPad Slim 9i 14ITL5", ALC287_FIXUP_YOGA7_14ITL_SPEAKERS),
7032 	SND_PCI_QUIRK(0x17aa, 0x383d, "Legion Y9000X 2019", ALC285_FIXUP_LEGION_Y9000X_SPEAKERS),
7033 	SND_PCI_QUIRK(0x17aa, 0x3843, "Yoga 9i", ALC287_FIXUP_IDEAPAD_BASS_SPK_AMP),
7034 	SND_PCI_QUIRK(0x17aa, 0x3847, "Legion 7 16ACHG6", ALC287_FIXUP_LEGION_16ACHG6),
7035 	SND_PCI_QUIRK(0x17aa, 0x384a, "Lenovo Yoga 7 15ITL5", ALC287_FIXUP_YOGA7_14ITL_SPEAKERS),
7036 	SND_PCI_QUIRK(0x17aa, 0x3852, "Lenovo Yoga 7 14ITL5", ALC287_FIXUP_YOGA7_14ITL_SPEAKERS),
7037 	SND_PCI_QUIRK(0x17aa, 0x3853, "Lenovo Yoga 7 15ITL5", ALC287_FIXUP_YOGA7_14ITL_SPEAKERS),
7038 	SND_PCI_QUIRK(0x17aa, 0x3855, "Legion 7 16ITHG6", ALC287_FIXUP_LEGION_16ITHG6),
7039 	SND_PCI_QUIRK(0x17aa, 0x3865, "Lenovo 13X", ALC287_FIXUP_CS35L41_I2C_2),
7040 	SND_PCI_QUIRK(0x17aa, 0x3866, "Lenovo 13X", ALC287_FIXUP_CS35L41_I2C_2),
7041 	SND_PCI_QUIRK(0x17aa, 0x3869, "Lenovo Yoga7 14IAL7", ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK_PIN),
7042 	HDA_CODEC_QUIRK(0x17aa, 0x386e, "Legion Y9000X 2022 IAH7", ALC287_FIXUP_CS35L41_I2C_2),
7043 	SND_PCI_QUIRK(0x17aa, 0x386e, "Yoga Pro 7 14ARP8", ALC285_FIXUP_SPEAKER2_TO_DAC1),
7044 	HDA_CODEC_QUIRK(0x17aa, 0x38a8, "Legion Pro 7 16ARX8H", ALC287_FIXUP_TAS2781_I2C), /* this must match before PCI SSID 17aa:386f below */
7045 	SND_PCI_QUIRK(0x17aa, 0x386f, "Legion Pro 7i 16IAX7", ALC287_FIXUP_CS35L41_I2C_2),
7046 	SND_PCI_QUIRK(0x17aa, 0x3870, "Lenovo Yoga 7 14ARB7", ALC287_FIXUP_YOGA7_14ARB7_I2C),
7047 	SND_PCI_QUIRK(0x17aa, 0x3877, "Lenovo Legion 7 Slim 16ARHA7", ALC287_FIXUP_CS35L41_I2C_2),
7048 	SND_PCI_QUIRK(0x17aa, 0x3878, "Lenovo Legion 7 Slim 16ARHA7", ALC287_FIXUP_CS35L41_I2C_2),
7049 	SND_PCI_QUIRK(0x17aa, 0x387d, "Yoga S780-16 pro Quad AAC", ALC287_FIXUP_TAS2781_I2C),
7050 	SND_PCI_QUIRK(0x17aa, 0x387e, "Yoga S780-16 pro Quad YC", ALC287_FIXUP_TAS2781_I2C),
7051 	SND_PCI_QUIRK(0x17aa, 0x387f, "Yoga S780-16 pro dual LX", ALC287_FIXUP_TAS2781_I2C),
7052 	SND_PCI_QUIRK(0x17aa, 0x3880, "Yoga S780-16 pro dual YC", ALC287_FIXUP_TAS2781_I2C),
7053 	SND_PCI_QUIRK(0x17aa, 0x3881, "YB9 dual power mode2 YC", ALC287_FIXUP_TAS2781_I2C),
7054 	SND_PCI_QUIRK(0x17aa, 0x3882, "Lenovo Yoga Pro 7 14APH8", ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK_PIN),
7055 	SND_PCI_QUIRK(0x17aa, 0x3884, "Y780 YG DUAL", ALC287_FIXUP_TAS2781_I2C),
7056 	SND_PCI_QUIRK(0x17aa, 0x3886, "Y780 VECO DUAL", ALC287_FIXUP_TAS2781_I2C),
7057 	SND_PCI_QUIRK(0x17aa, 0x3891, "Lenovo Yoga Pro 7 14AHP9", ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK_PIN),
7058 	SND_PCI_QUIRK(0x17aa, 0x38a5, "Y580P AMD dual", ALC287_FIXUP_TAS2781_I2C),
7059 	SND_PCI_QUIRK(0x17aa, 0x38a7, "Y780P AMD YG dual", ALC287_FIXUP_TAS2781_I2C),
7060 	SND_PCI_QUIRK(0x17aa, 0x38a8, "Y780P AMD VECO dual", ALC287_FIXUP_TAS2781_I2C),
7061 	SND_PCI_QUIRK(0x17aa, 0x38a9, "Thinkbook 16P", ALC287_FIXUP_MG_RTKC_CSAMP_CS35L41_I2C_THINKPAD),
7062 	SND_PCI_QUIRK(0x17aa, 0x38ab, "Thinkbook 16P", ALC287_FIXUP_MG_RTKC_CSAMP_CS35L41_I2C_THINKPAD),
7063 	SND_PCI_QUIRK(0x17aa, 0x38b4, "Legion Slim 7 16IRH8", ALC287_FIXUP_CS35L41_I2C_2),
7064 	SND_PCI_QUIRK(0x17aa, 0x38b5, "Legion Slim 7 16IRH8", ALC287_FIXUP_CS35L41_I2C_2),
7065 	SND_PCI_QUIRK(0x17aa, 0x38b6, "Legion Slim 7 16APH8", ALC287_FIXUP_CS35L41_I2C_2),
7066 	SND_PCI_QUIRK(0x17aa, 0x38b7, "Legion Slim 7 16APH8", ALC287_FIXUP_CS35L41_I2C_2),
7067 	SND_PCI_QUIRK(0x17aa, 0x38b8, "Yoga S780-14.5 proX AMD YC Dual", ALC287_FIXUP_TAS2781_I2C),
7068 	SND_PCI_QUIRK(0x17aa, 0x38b9, "Yoga S780-14.5 proX AMD LX Dual", ALC287_FIXUP_TAS2781_I2C),
7069 	SND_PCI_QUIRK(0x17aa, 0x38ba, "Yoga S780-14.5 Air AMD quad YC", ALC287_FIXUP_TAS2781_I2C),
7070 	SND_PCI_QUIRK(0x17aa, 0x38bb, "Yoga S780-14.5 Air AMD quad AAC", ALC287_FIXUP_TAS2781_I2C),
7071 	SND_PCI_QUIRK(0x17aa, 0x38be, "Yoga S980-14.5 proX YC Dual", ALC287_FIXUP_TAS2781_I2C),
7072 	SND_PCI_QUIRK(0x17aa, 0x38bf, "Yoga S980-14.5 proX LX Dual", ALC287_FIXUP_TAS2781_I2C),
7073 	SND_PCI_QUIRK(0x17aa, 0x38c3, "Y980 DUAL", ALC287_FIXUP_TAS2781_I2C),
7074 	SND_PCI_QUIRK(0x17aa, 0x38c7, "Thinkbook 13x Gen 4", ALC287_FIXUP_CS35L41_I2C_4),
7075 	SND_PCI_QUIRK(0x17aa, 0x38c8, "Thinkbook 13x Gen 4", ALC287_FIXUP_CS35L41_I2C_4),
7076 	SND_PCI_QUIRK(0x17aa, 0x38cb, "Y790 YG DUAL", ALC287_FIXUP_TAS2781_I2C),
7077 	SND_PCI_QUIRK(0x17aa, 0x38cd, "Y790 VECO DUAL", ALC287_FIXUP_TAS2781_I2C),
7078 	SND_PCI_QUIRK(0x17aa, 0x38d2, "Lenovo Yoga 9 14IMH9", ALC287_FIXUP_YOGA9_14IMH9_BASS_SPK_PIN),
7079 	SND_PCI_QUIRK(0x17aa, 0x38d3, "Yoga S990-16 Pro IMH YC Dual", ALC287_FIXUP_TAS2781_I2C),
7080 	SND_PCI_QUIRK(0x17aa, 0x38d4, "Yoga S990-16 Pro IMH VECO Dual", ALC287_FIXUP_TAS2781_I2C),
7081 	SND_PCI_QUIRK(0x17aa, 0x38d5, "Yoga S990-16 Pro IMH YC Quad", ALC287_FIXUP_TAS2781_I2C),
7082 	SND_PCI_QUIRK(0x17aa, 0x38d6, "Yoga S990-16 Pro IMH VECO Quad", ALC287_FIXUP_TAS2781_I2C),
7083 	SND_PCI_QUIRK(0x17aa, 0x38d7, "Lenovo Yoga 9 14IMH9", ALC287_FIXUP_YOGA9_14IMH9_BASS_SPK_PIN),
7084 	SND_PCI_QUIRK(0x17aa, 0x38df, "Yoga Y990 Intel YC Dual", ALC287_FIXUP_TAS2781_I2C),
7085 	SND_PCI_QUIRK(0x17aa, 0x38e0, "Yoga Y990 Intel VECO Dual", ALC287_FIXUP_TAS2781_I2C),
7086 	SND_PCI_QUIRK(0x17aa, 0x38f8, "Yoga Book 9i", ALC287_FIXUP_TAS2781_I2C),
7087 	SND_PCI_QUIRK(0x17aa, 0x38df, "Y990 YG DUAL", ALC287_FIXUP_TAS2781_I2C),
7088 	SND_PCI_QUIRK(0x17aa, 0x38f9, "Thinkbook 16P Gen5", ALC287_FIXUP_MG_RTKC_CSAMP_CS35L41_I2C_THINKPAD),
7089 	SND_PCI_QUIRK(0x17aa, 0x38fa, "Thinkbook 16P Gen5", ALC287_FIXUP_MG_RTKC_CSAMP_CS35L41_I2C_THINKPAD),
7090 	SND_PCI_QUIRK(0x17aa, 0x38fd, "ThinkBook plus Gen5 Hybrid", ALC287_FIXUP_TAS2781_I2C),
7091 	SND_PCI_QUIRK(0x17aa, 0x3902, "Lenovo E50-80", ALC269_FIXUP_DMIC_THINKPAD_ACPI),
7092 	SND_PCI_QUIRK(0x17aa, 0x390d, "Lenovo Yoga Pro 7 14ASP10", ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK_PIN),
7093 	SND_PCI_QUIRK(0x17aa, 0x3913, "Lenovo 145", ALC236_FIXUP_LENOVO_INV_DMIC),
7094 	SND_PCI_QUIRK(0x17aa, 0x391f, "Yoga S990-16 pro Quad YC Quad", ALC287_FIXUP_TXNW2781_I2C),
7095 	SND_PCI_QUIRK(0x17aa, 0x3920, "Yoga S990-16 pro Quad VECO Quad", ALC287_FIXUP_TXNW2781_I2C),
7096 	SND_PCI_QUIRK(0x17aa, 0x3977, "IdeaPad S210", ALC283_FIXUP_INT_MIC),
7097 	SND_PCI_QUIRK(0x17aa, 0x3978, "Lenovo B50-70", ALC269_FIXUP_DMIC_THINKPAD_ACPI),
7098 	SND_PCI_QUIRK(0x17aa, 0x3bf8, "Quanta FL1", ALC269_FIXUP_PCM_44K),
7099 	SND_PCI_QUIRK(0x17aa, 0x5013, "Thinkpad", ALC269_FIXUP_LIMIT_INT_MIC_BOOST),
7100 	SND_PCI_QUIRK(0x17aa, 0x501a, "Thinkpad", ALC283_FIXUP_INT_MIC),
7101 	SND_PCI_QUIRK(0x17aa, 0x501e, "Thinkpad L440", ALC292_FIXUP_TPT440_DOCK),
7102 	SND_PCI_QUIRK(0x17aa, 0x5026, "Thinkpad", ALC269_FIXUP_LIMIT_INT_MIC_BOOST),
7103 	SND_PCI_QUIRK(0x17aa, 0x5034, "Thinkpad T450", ALC292_FIXUP_TPT440_DOCK),
7104 	SND_PCI_QUIRK(0x17aa, 0x5036, "Thinkpad T450s", ALC292_FIXUP_TPT440_DOCK),
7105 	SND_PCI_QUIRK(0x17aa, 0x503c, "Thinkpad L450", ALC292_FIXUP_TPT440_DOCK),
7106 	SND_PCI_QUIRK(0x17aa, 0x504a, "ThinkPad X260", ALC292_FIXUP_TPT440_DOCK),
7107 	SND_PCI_QUIRK(0x17aa, 0x504b, "Thinkpad", ALC293_FIXUP_LENOVO_SPK_NOISE),
7108 	SND_PCI_QUIRK(0x17aa, 0x5050, "Thinkpad T560p", ALC292_FIXUP_TPT460),
7109 	SND_PCI_QUIRK(0x17aa, 0x5051, "Thinkpad L460", ALC292_FIXUP_TPT460),
7110 	SND_PCI_QUIRK(0x17aa, 0x5053, "Thinkpad T460", ALC292_FIXUP_TPT460),
7111 	SND_PCI_QUIRK(0x17aa, 0x505d, "Thinkpad", ALC298_FIXUP_TPT470_DOCK),
7112 	SND_PCI_QUIRK(0x17aa, 0x505f, "Thinkpad", ALC298_FIXUP_TPT470_DOCK),
7113 	SND_PCI_QUIRK(0x17aa, 0x5062, "Thinkpad", ALC298_FIXUP_TPT470_DOCK),
7114 	SND_PCI_QUIRK(0x17aa, 0x508b, "Thinkpad X12 Gen 1", ALC287_FIXUP_LEGION_15IMHG05_SPEAKERS),
7115 	SND_PCI_QUIRK(0x17aa, 0x5109, "Thinkpad", ALC269_FIXUP_LIMIT_INT_MIC_BOOST),
7116 	SND_PCI_QUIRK(0x17aa, 0x511e, "Thinkpad", ALC298_FIXUP_TPT470_DOCK),
7117 	SND_PCI_QUIRK(0x17aa, 0x511f, "Thinkpad", ALC298_FIXUP_TPT470_DOCK),
7118 	SND_PCI_QUIRK(0x17aa, 0x9e54, "LENOVO NB", ALC269_FIXUP_LENOVO_EAPD),
7119 	SND_PCI_QUIRK(0x17aa, 0x9e56, "Lenovo ZhaoYang CF4620Z", ALC286_FIXUP_SONY_MIC_NO_PRESENCE),
7120 	SND_PCI_QUIRK(0x1849, 0x0269, "Positivo Master C6400", ALC269VB_FIXUP_ASUS_ZENBOOK),
7121 	SND_PCI_QUIRK(0x1849, 0x1233, "ASRock NUC Box 1100", ALC233_FIXUP_NO_AUDIO_JACK),
7122 	SND_PCI_QUIRK(0x1849, 0xa233, "Positivo Master C6300", ALC269_FIXUP_HEADSET_MIC),
7123 	SND_PCI_QUIRK(0x1854, 0x0440, "LG CQ6", ALC256_FIXUP_HEADPHONE_AMP_VOL),
7124 	SND_PCI_QUIRK(0x1854, 0x0441, "LG CQ6 AIO", ALC256_FIXUP_HEADPHONE_AMP_VOL),
7125 	SND_PCI_QUIRK(0x1854, 0x0488, "LG gram 16 (16Z90R)", ALC298_FIXUP_SAMSUNG_AMP_V2_4_AMPS),
7126 	SND_PCI_QUIRK(0x1854, 0x0489, "LG gram 16 (16Z90R-A)", ALC298_FIXUP_SAMSUNG_AMP_V2_4_AMPS),
7127 	SND_PCI_QUIRK(0x1854, 0x048a, "LG gram 17 (17ZD90R)", ALC298_FIXUP_SAMSUNG_AMP_V2_4_AMPS),
7128 	SND_PCI_QUIRK(0x19e5, 0x3204, "Huawei MACH-WX9", ALC256_FIXUP_HUAWEI_MACH_WX9_PINS),
7129 	SND_PCI_QUIRK(0x19e5, 0x320f, "Huawei WRT-WX9 ", ALC256_FIXUP_ASUS_MIC_NO_PRESENCE),
7130 	SND_PCI_QUIRK(0x19e5, 0x3212, "Huawei KLV-WX9 ", ALC256_FIXUP_ACER_HEADSET_MIC),
7131 	SND_PCI_QUIRK(0x1b35, 0x1235, "CZC B20", ALC269_FIXUP_CZC_B20),
7132 	SND_PCI_QUIRK(0x1b35, 0x1236, "CZC TMI", ALC269_FIXUP_CZC_TMI),
7133 	SND_PCI_QUIRK(0x1b35, 0x1237, "CZC L101", ALC269_FIXUP_CZC_L101),
7134 	SND_PCI_QUIRK(0x1b7d, 0xa831, "Ordissimo EVE2 ", ALC269VB_FIXUP_ORDISSIMO_EVE2), /* Also known as Malata PC-B1303 */
7135 	SND_PCI_QUIRK(0x1c06, 0x2013, "Lemote A1802", ALC269_FIXUP_LEMOTE_A1802),
7136 	SND_PCI_QUIRK(0x1c06, 0x2015, "Lemote A190X", ALC269_FIXUP_LEMOTE_A190X),
7137 	SND_PCI_QUIRK(0x1c6c, 0x122a, "Positivo N14AP7", ALC269_FIXUP_LIMIT_INT_MIC_BOOST),
7138 	SND_PCI_QUIRK(0x1c6c, 0x1251, "Positivo N14KP6-TG", ALC288_FIXUP_DELL1_MIC_NO_PRESENCE),
7139 	SND_PCI_QUIRK(0x1d05, 0x1132, "TongFang PHxTxX1", ALC256_FIXUP_SET_COEF_DEFAULTS),
7140 	SND_PCI_QUIRK(0x1d05, 0x1096, "TongFang GMxMRxx", ALC269_FIXUP_NO_SHUTUP),
7141 	SND_PCI_QUIRK(0x1d05, 0x1100, "TongFang GKxNRxx", ALC269_FIXUP_NO_SHUTUP),
7142 	SND_PCI_QUIRK(0x1d05, 0x1111, "TongFang GMxZGxx", ALC269_FIXUP_NO_SHUTUP),
7143 	SND_PCI_QUIRK(0x1d05, 0x1119, "TongFang GMxZGxx", ALC269_FIXUP_NO_SHUTUP),
7144 	SND_PCI_QUIRK(0x1d05, 0x1129, "TongFang GMxZGxx", ALC269_FIXUP_NO_SHUTUP),
7145 	SND_PCI_QUIRK(0x1d05, 0x1147, "TongFang GMxTGxx", ALC269_FIXUP_NO_SHUTUP),
7146 	SND_PCI_QUIRK(0x1d05, 0x115c, "TongFang GMxTGxx", ALC269_FIXUP_NO_SHUTUP),
7147 	SND_PCI_QUIRK(0x1d05, 0x121b, "TongFang GMxAGxx", ALC269_FIXUP_NO_SHUTUP),
7148 	SND_PCI_QUIRK(0x1d05, 0x1387, "TongFang GMxIXxx", ALC2XX_FIXUP_HEADSET_MIC),
7149 	SND_PCI_QUIRK(0x1d05, 0x1409, "TongFang GMxIXxx", ALC2XX_FIXUP_HEADSET_MIC),
7150 	SND_PCI_QUIRK(0x1d05, 0x300f, "TongFang X6AR5xxY", ALC2XX_FIXUP_HEADSET_MIC),
7151 	SND_PCI_QUIRK(0x1d05, 0x3019, "TongFang X6FR5xxY", ALC2XX_FIXUP_HEADSET_MIC),
7152 	SND_PCI_QUIRK(0x1d17, 0x3288, "Haier Boyue G42", ALC269VC_FIXUP_ACER_VCOPPERBOX_PINS),
7153 	SND_PCI_QUIRK(0x1d72, 0x1602, "RedmiBook", ALC255_FIXUP_XIAOMI_HEADSET_MIC),
7154 	SND_PCI_QUIRK(0x1d72, 0x1701, "XiaomiNotebook Pro", ALC298_FIXUP_DELL1_MIC_NO_PRESENCE),
7155 	SND_PCI_QUIRK(0x1d72, 0x1901, "RedmiBook 14", ALC256_FIXUP_ASUS_HEADSET_MIC),
7156 	SND_PCI_QUIRK(0x1d72, 0x1945, "Redmi G", ALC256_FIXUP_ASUS_HEADSET_MIC),
7157 	SND_PCI_QUIRK(0x1d72, 0x1947, "RedmiBook Air", ALC255_FIXUP_XIAOMI_HEADSET_MIC),
7158 	SND_PCI_QUIRK(0x1ee7, 0x2078, "HONOR BRB-X M1010", ALC2XX_FIXUP_HEADSET_MIC),
7159 	SND_PCI_QUIRK(0x1f66, 0x0105, "Ayaneo Portable Game Player", ALC287_FIXUP_CS35L41_I2C_2),
7160 	SND_PCI_QUIRK(0x2014, 0x800a, "Positivo ARN50", ALC269_FIXUP_LIMIT_INT_MIC_BOOST),
7161 	SND_PCI_QUIRK(0x2782, 0x0214, "VAIO VJFE-CL", ALC269_FIXUP_LIMIT_INT_MIC_BOOST),
7162 	SND_PCI_QUIRK(0x2782, 0x0228, "Infinix ZERO BOOK 13", ALC269VB_FIXUP_INFINIX_ZERO_BOOK_13),
7163 	SND_PCI_QUIRK(0x2782, 0x0232, "CHUWI CoreBook XPro", ALC269VB_FIXUP_CHUWI_COREBOOK_XPRO),
7164 	SND_PCI_QUIRK(0x2782, 0x1407, "Positivo P15X", ALC269_FIXUP_POSITIVO_P15X_HEADSET_MIC),
7165 	SND_PCI_QUIRK(0x2782, 0x1409, "Positivo K116J", ALC269_FIXUP_POSITIVO_P15X_HEADSET_MIC),
7166 	SND_PCI_QUIRK(0x2782, 0x1701, "Infinix Y4 Max", ALC269VC_FIXUP_INFINIX_Y4_MAX),
7167 	SND_PCI_QUIRK(0x2782, 0x1705, "MEDION E15433", ALC269VC_FIXUP_INFINIX_Y4_MAX),
7168 	SND_PCI_QUIRK(0x2782, 0x1707, "Vaio VJFE-ADL", ALC298_FIXUP_SPK_VOLUME),
7169 	SND_PCI_QUIRK(0x2782, 0x4900, "MEDION E15443", ALC233_FIXUP_MEDION_MTL_SPK),
7170 	SND_PCI_QUIRK(0x8086, 0x2074, "Intel NUC 8", ALC233_FIXUP_INTEL_NUC8_DMIC),
7171 	SND_PCI_QUIRK(0x8086, 0x2080, "Intel NUC 8 Rugged", ALC256_FIXUP_INTEL_NUC8_RUGGED),
7172 	SND_PCI_QUIRK(0x8086, 0x2081, "Intel NUC 10", ALC256_FIXUP_INTEL_NUC10),
7173 	SND_PCI_QUIRK(0x8086, 0x3038, "Intel NUC 13", ALC295_FIXUP_CHROME_BOOK),
7174 	SND_PCI_QUIRK(0xf111, 0x0001, "Framework Laptop", ALC295_FIXUP_FRAMEWORK_LAPTOP_MIC_NO_PRESENCE),
7175 	SND_PCI_QUIRK(0xf111, 0x0006, "Framework Laptop", ALC295_FIXUP_FRAMEWORK_LAPTOP_MIC_NO_PRESENCE),
7176 	SND_PCI_QUIRK(0xf111, 0x0009, "Framework Laptop", ALC295_FIXUP_FRAMEWORK_LAPTOP_MIC_NO_PRESENCE),
7177 	SND_PCI_QUIRK(0xf111, 0x000b, "Framework Laptop", ALC295_FIXUP_FRAMEWORK_LAPTOP_MIC_NO_PRESENCE),
7178 	SND_PCI_QUIRK(0xf111, 0x000c, "Framework Laptop", ALC295_FIXUP_FRAMEWORK_LAPTOP_MIC_NO_PRESENCE),
7179 
7180 #if 0
7181 	/* Below is a quirk table taken from the old code.
7182 	 * Basically the device should work as is without the fixup table.
7183 	 * If BIOS doesn't give a proper info, enable the corresponding
7184 	 * fixup entry.
7185 	 */
7186 	SND_PCI_QUIRK(0x1043, 0x8330, "ASUS Eeepc P703 P900A",
7187 		      ALC269_FIXUP_AMIC),
7188 	SND_PCI_QUIRK(0x1043, 0x1013, "ASUS N61Da", ALC269_FIXUP_AMIC),
7189 	SND_PCI_QUIRK(0x1043, 0x1143, "ASUS B53f", ALC269_FIXUP_AMIC),
7190 	SND_PCI_QUIRK(0x1043, 0x1133, "ASUS UJ20ft", ALC269_FIXUP_AMIC),
7191 	SND_PCI_QUIRK(0x1043, 0x1183, "ASUS K72DR", ALC269_FIXUP_AMIC),
7192 	SND_PCI_QUIRK(0x1043, 0x11b3, "ASUS K52DR", ALC269_FIXUP_AMIC),
7193 	SND_PCI_QUIRK(0x1043, 0x11e3, "ASUS U33Jc", ALC269_FIXUP_AMIC),
7194 	SND_PCI_QUIRK(0x1043, 0x1273, "ASUS UL80Jt", ALC269_FIXUP_AMIC),
7195 	SND_PCI_QUIRK(0x1043, 0x1283, "ASUS U53Jc", ALC269_FIXUP_AMIC),
7196 	SND_PCI_QUIRK(0x1043, 0x12b3, "ASUS N82JV", ALC269_FIXUP_AMIC),
7197 	SND_PCI_QUIRK(0x1043, 0x12d3, "ASUS N61Jv", ALC269_FIXUP_AMIC),
7198 	SND_PCI_QUIRK(0x1043, 0x13a3, "ASUS UL30Vt", ALC269_FIXUP_AMIC),
7199 	SND_PCI_QUIRK(0x1043, 0x1373, "ASUS G73JX", ALC269_FIXUP_AMIC),
7200 	SND_PCI_QUIRK(0x1043, 0x1383, "ASUS UJ30Jc", ALC269_FIXUP_AMIC),
7201 	SND_PCI_QUIRK(0x1043, 0x13d3, "ASUS N61JA", ALC269_FIXUP_AMIC),
7202 	SND_PCI_QUIRK(0x1043, 0x1413, "ASUS UL50", ALC269_FIXUP_AMIC),
7203 	SND_PCI_QUIRK(0x1043, 0x1443, "ASUS UL30", ALC269_FIXUP_AMIC),
7204 	SND_PCI_QUIRK(0x1043, 0x1453, "ASUS M60Jv", ALC269_FIXUP_AMIC),
7205 	SND_PCI_QUIRK(0x1043, 0x1483, "ASUS UL80", ALC269_FIXUP_AMIC),
7206 	SND_PCI_QUIRK(0x1043, 0x14f3, "ASUS F83Vf", ALC269_FIXUP_AMIC),
7207 	SND_PCI_QUIRK(0x1043, 0x14e3, "ASUS UL20", ALC269_FIXUP_AMIC),
7208 	SND_PCI_QUIRK(0x1043, 0x1513, "ASUS UX30", ALC269_FIXUP_AMIC),
7209 	SND_PCI_QUIRK(0x1043, 0x1593, "ASUS N51Vn", ALC269_FIXUP_AMIC),
7210 	SND_PCI_QUIRK(0x1043, 0x15a3, "ASUS N60Jv", ALC269_FIXUP_AMIC),
7211 	SND_PCI_QUIRK(0x1043, 0x15b3, "ASUS N60Dp", ALC269_FIXUP_AMIC),
7212 	SND_PCI_QUIRK(0x1043, 0x15c3, "ASUS N70De", ALC269_FIXUP_AMIC),
7213 	SND_PCI_QUIRK(0x1043, 0x15e3, "ASUS F83T", ALC269_FIXUP_AMIC),
7214 	SND_PCI_QUIRK(0x1043, 0x1643, "ASUS M60J", ALC269_FIXUP_AMIC),
7215 	SND_PCI_QUIRK(0x1043, 0x1653, "ASUS U50", ALC269_FIXUP_AMIC),
7216 	SND_PCI_QUIRK(0x1043, 0x1693, "ASUS F50N", ALC269_FIXUP_AMIC),
7217 	SND_PCI_QUIRK(0x1043, 0x16a3, "ASUS F5Q", ALC269_FIXUP_AMIC),
7218 	SND_PCI_QUIRK(0x1043, 0x1723, "ASUS P80", ALC269_FIXUP_AMIC),
7219 	SND_PCI_QUIRK(0x1043, 0x1743, "ASUS U80", ALC269_FIXUP_AMIC),
7220 	SND_PCI_QUIRK(0x1043, 0x1773, "ASUS U20A", ALC269_FIXUP_AMIC),
7221 	SND_PCI_QUIRK(0x1043, 0x1883, "ASUS F81Se", ALC269_FIXUP_AMIC),
7222 	SND_PCI_QUIRK(0x152d, 0x1778, "Quanta ON1", ALC269_FIXUP_DMIC),
7223 	SND_PCI_QUIRK(0x17aa, 0x3be9, "Quanta Wistron", ALC269_FIXUP_AMIC),
7224 	SND_PCI_QUIRK(0x17aa, 0x3bf8, "Quanta FL1", ALC269_FIXUP_AMIC),
7225 	SND_PCI_QUIRK(0x17ff, 0x059a, "Quanta EL3", ALC269_FIXUP_DMIC),
7226 	SND_PCI_QUIRK(0x17ff, 0x059b, "Quanta JR1", ALC269_FIXUP_DMIC),
7227 #endif
7228 	{}
7229 };
7230 
7231 static const struct hda_quirk alc269_fixup_vendor_tbl[] = {
7232 	SND_PCI_QUIRK_VENDOR(0x1025, "Acer Aspire", ALC271_FIXUP_DMIC),
7233 	SND_PCI_QUIRK_VENDOR(0x103c, "HP", ALC269_FIXUP_HP_MUTE_LED),
7234 	SND_PCI_QUIRK_VENDOR(0x104d, "Sony VAIO", ALC269_FIXUP_SONY_VAIO),
7235 	SND_PCI_QUIRK_VENDOR(0x17aa, "Lenovo XPAD", ALC269_FIXUP_LENOVO_XPAD_ACPI),
7236 	SND_PCI_QUIRK_VENDOR(0x19e5, "Huawei Matebook", ALC255_FIXUP_MIC_MUTE_LED),
7237 	{}
7238 };
7239 
7240 static const struct hda_model_fixup alc269_fixup_models[] = {
7241 	{.id = ALC269_FIXUP_AMIC, .name = "laptop-amic"},
7242 	{.id = ALC269_FIXUP_DMIC, .name = "laptop-dmic"},
7243 	{.id = ALC269_FIXUP_STEREO_DMIC, .name = "alc269-dmic"},
7244 	{.id = ALC271_FIXUP_DMIC, .name = "alc271-dmic"},
7245 	{.id = ALC269_FIXUP_INV_DMIC, .name = "inv-dmic"},
7246 	{.id = ALC269_FIXUP_HEADSET_MIC, .name = "headset-mic"},
7247 	{.id = ALC269_FIXUP_HEADSET_MODE, .name = "headset-mode"},
7248 	{.id = ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC, .name = "headset-mode-no-hp-mic"},
7249 	{.id = ALC269_FIXUP_LENOVO_DOCK, .name = "lenovo-dock"},
7250 	{.id = ALC269_FIXUP_LENOVO_DOCK_LIMIT_BOOST, .name = "lenovo-dock-limit-boost"},
7251 	{.id = ALC269_FIXUP_HP_GPIO_LED, .name = "hp-gpio-led"},
7252 	{.id = ALC269_FIXUP_HP_DOCK_GPIO_MIC1_LED, .name = "hp-dock-gpio-mic1-led"},
7253 	{.id = ALC269_FIXUP_DELL1_MIC_NO_PRESENCE, .name = "dell-headset-multi"},
7254 	{.id = ALC269_FIXUP_DELL2_MIC_NO_PRESENCE, .name = "dell-headset-dock"},
7255 	{.id = ALC269_FIXUP_DELL3_MIC_NO_PRESENCE, .name = "dell-headset3"},
7256 	{.id = ALC269_FIXUP_DELL4_MIC_NO_PRESENCE, .name = "dell-headset4"},
7257 	{.id = ALC269_FIXUP_DELL4_MIC_NO_PRESENCE_QUIET, .name = "dell-headset4-quiet"},
7258 	{.id = ALC283_FIXUP_CHROME_BOOK, .name = "alc283-dac-wcaps"},
7259 	{.id = ALC283_FIXUP_SENSE_COMBO_JACK, .name = "alc283-sense-combo"},
7260 	{.id = ALC292_FIXUP_TPT440_DOCK, .name = "tpt440-dock"},
7261 	{.id = ALC292_FIXUP_TPT440, .name = "tpt440"},
7262 	{.id = ALC292_FIXUP_TPT460, .name = "tpt460"},
7263 	{.id = ALC298_FIXUP_TPT470_DOCK_FIX, .name = "tpt470-dock-fix"},
7264 	{.id = ALC298_FIXUP_TPT470_DOCK, .name = "tpt470-dock"},
7265 	{.id = ALC233_FIXUP_LENOVO_MULTI_CODECS, .name = "dual-codecs"},
7266 	{.id = ALC700_FIXUP_INTEL_REFERENCE, .name = "alc700-ref"},
7267 	{.id = ALC269_FIXUP_SONY_VAIO, .name = "vaio"},
7268 	{.id = ALC269_FIXUP_DELL_M101Z, .name = "dell-m101z"},
7269 	{.id = ALC269_FIXUP_ASUS_G73JW, .name = "asus-g73jw"},
7270 	{.id = ALC269_FIXUP_LENOVO_EAPD, .name = "lenovo-eapd"},
7271 	{.id = ALC275_FIXUP_SONY_HWEQ, .name = "sony-hweq"},
7272 	{.id = ALC269_FIXUP_PCM_44K, .name = "pcm44k"},
7273 	{.id = ALC269_FIXUP_LIFEBOOK, .name = "lifebook"},
7274 	{.id = ALC269_FIXUP_LIFEBOOK_EXTMIC, .name = "lifebook-extmic"},
7275 	{.id = ALC269_FIXUP_LIFEBOOK_HP_PIN, .name = "lifebook-hp-pin"},
7276 	{.id = ALC255_FIXUP_LIFEBOOK_U7x7_HEADSET_MIC, .name = "lifebook-u7x7"},
7277 	{.id = ALC269VB_FIXUP_AMIC, .name = "alc269vb-amic"},
7278 	{.id = ALC269VB_FIXUP_DMIC, .name = "alc269vb-dmic"},
7279 	{.id = ALC269_FIXUP_HP_MUTE_LED_MIC1, .name = "hp-mute-led-mic1"},
7280 	{.id = ALC269_FIXUP_HP_MUTE_LED_MIC2, .name = "hp-mute-led-mic2"},
7281 	{.id = ALC269_FIXUP_HP_MUTE_LED_MIC3, .name = "hp-mute-led-mic3"},
7282 	{.id = ALC269_FIXUP_HP_GPIO_MIC1_LED, .name = "hp-gpio-mic1"},
7283 	{.id = ALC269_FIXUP_HP_LINE1_MIC1_LED, .name = "hp-line1-mic1"},
7284 	{.id = ALC269_FIXUP_NO_SHUTUP, .name = "noshutup"},
7285 	{.id = ALC286_FIXUP_SONY_MIC_NO_PRESENCE, .name = "sony-nomic"},
7286 	{.id = ALC269_FIXUP_ASPIRE_HEADSET_MIC, .name = "aspire-headset-mic"},
7287 	{.id = ALC269_FIXUP_ASUS_X101, .name = "asus-x101"},
7288 	{.id = ALC271_FIXUP_HP_GATE_MIC_JACK, .name = "acer-ao7xx"},
7289 	{.id = ALC271_FIXUP_HP_GATE_MIC_JACK_E1_572, .name = "acer-aspire-e1"},
7290 	{.id = ALC269_FIXUP_ACER_AC700, .name = "acer-ac700"},
7291 	{.id = ALC269_FIXUP_LIMIT_INT_MIC_BOOST, .name = "limit-mic-boost"},
7292 	{.id = ALC269VB_FIXUP_ASUS_ZENBOOK, .name = "asus-zenbook"},
7293 	{.id = ALC269VB_FIXUP_ASUS_ZENBOOK_UX31A, .name = "asus-zenbook-ux31a"},
7294 	{.id = ALC269VB_FIXUP_ORDISSIMO_EVE2, .name = "ordissimo"},
7295 	{.id = ALC282_FIXUP_ASUS_TX300, .name = "asus-tx300"},
7296 	{.id = ALC283_FIXUP_INT_MIC, .name = "alc283-int-mic"},
7297 	{.id = ALC290_FIXUP_MONO_SPEAKERS_HSJACK, .name = "mono-speakers"},
7298 	{.id = ALC290_FIXUP_SUBWOOFER_HSJACK, .name = "alc290-subwoofer"},
7299 	{.id = ALC269_FIXUP_THINKPAD_ACPI, .name = "thinkpad"},
7300 	{.id = ALC269_FIXUP_LENOVO_XPAD_ACPI, .name = "lenovo-xpad-led"},
7301 	{.id = ALC269_FIXUP_DMIC_THINKPAD_ACPI, .name = "dmic-thinkpad"},
7302 	{.id = ALC255_FIXUP_ACER_MIC_NO_PRESENCE, .name = "alc255-acer"},
7303 	{.id = ALC255_FIXUP_ASUS_MIC_NO_PRESENCE, .name = "alc255-asus"},
7304 	{.id = ALC255_FIXUP_DELL1_MIC_NO_PRESENCE, .name = "alc255-dell1"},
7305 	{.id = ALC255_FIXUP_DELL2_MIC_NO_PRESENCE, .name = "alc255-dell2"},
7306 	{.id = ALC293_FIXUP_DELL1_MIC_NO_PRESENCE, .name = "alc293-dell1"},
7307 	{.id = ALC283_FIXUP_HEADSET_MIC, .name = "alc283-headset"},
7308 	{.id = ALC255_FIXUP_MIC_MUTE_LED, .name = "alc255-dell-mute"},
7309 	{.id = ALC282_FIXUP_ASPIRE_V5_PINS, .name = "aspire-v5"},
7310 	{.id = ALC269VB_FIXUP_ASPIRE_E1_COEF, .name = "aspire-e1-coef"},
7311 	{.id = ALC280_FIXUP_HP_GPIO4, .name = "hp-gpio4"},
7312 	{.id = ALC286_FIXUP_HP_GPIO_LED, .name = "hp-gpio-led"},
7313 	{.id = ALC280_FIXUP_HP_GPIO2_MIC_HOTKEY, .name = "hp-gpio2-hotkey"},
7314 	{.id = ALC280_FIXUP_HP_DOCK_PINS, .name = "hp-dock-pins"},
7315 	{.id = ALC269_FIXUP_HP_DOCK_GPIO_MIC1_LED, .name = "hp-dock-gpio-mic"},
7316 	{.id = ALC280_FIXUP_HP_9480M, .name = "hp-9480m"},
7317 	{.id = ALC288_FIXUP_DELL_HEADSET_MODE, .name = "alc288-dell-headset"},
7318 	{.id = ALC288_FIXUP_DELL1_MIC_NO_PRESENCE, .name = "alc288-dell1"},
7319 	{.id = ALC288_FIXUP_DELL_XPS_13, .name = "alc288-dell-xps13"},
7320 	{.id = ALC292_FIXUP_DELL_E7X, .name = "dell-e7x"},
7321 	{.id = ALC293_FIXUP_DISABLE_AAMIX_MULTIJACK, .name = "alc293-dell"},
7322 	{.id = ALC298_FIXUP_DELL1_MIC_NO_PRESENCE, .name = "alc298-dell1"},
7323 	{.id = ALC298_FIXUP_DELL_AIO_MIC_NO_PRESENCE, .name = "alc298-dell-aio"},
7324 	{.id = ALC275_FIXUP_DELL_XPS, .name = "alc275-dell-xps"},
7325 	{.id = ALC293_FIXUP_LENOVO_SPK_NOISE, .name = "lenovo-spk-noise"},
7326 	{.id = ALC233_FIXUP_LENOVO_LINE2_MIC_HOTKEY, .name = "lenovo-hotkey"},
7327 	{.id = ALC255_FIXUP_DELL_SPK_NOISE, .name = "dell-spk-noise"},
7328 	{.id = ALC225_FIXUP_DELL1_MIC_NO_PRESENCE, .name = "alc225-dell1"},
7329 	{.id = ALC295_FIXUP_DISABLE_DAC3, .name = "alc295-disable-dac3"},
7330 	{.id = ALC285_FIXUP_SPEAKER2_TO_DAC1, .name = "alc285-speaker2-to-dac1"},
7331 	{.id = ALC280_FIXUP_HP_HEADSET_MIC, .name = "alc280-hp-headset"},
7332 	{.id = ALC221_FIXUP_HP_FRONT_MIC, .name = "alc221-hp-mic"},
7333 	{.id = ALC298_FIXUP_SPK_VOLUME, .name = "alc298-spk-volume"},
7334 	{.id = ALC256_FIXUP_DELL_INSPIRON_7559_SUBWOOFER, .name = "dell-inspiron-7559"},
7335 	{.id = ALC269_FIXUP_ATIV_BOOK_8, .name = "ativ-book"},
7336 	{.id = ALC221_FIXUP_HP_MIC_NO_PRESENCE, .name = "alc221-hp-mic"},
7337 	{.id = ALC256_FIXUP_ASUS_HEADSET_MODE, .name = "alc256-asus-headset"},
7338 	{.id = ALC256_FIXUP_ASUS_MIC, .name = "alc256-asus-mic"},
7339 	{.id = ALC256_FIXUP_ASUS_AIO_GPIO2, .name = "alc256-asus-aio"},
7340 	{.id = ALC233_FIXUP_ASUS_MIC_NO_PRESENCE, .name = "alc233-asus"},
7341 	{.id = ALC233_FIXUP_EAPD_COEF_AND_MIC_NO_PRESENCE, .name = "alc233-eapd"},
7342 	{.id = ALC294_FIXUP_LENOVO_MIC_LOCATION, .name = "alc294-lenovo-mic"},
7343 	{.id = ALC225_FIXUP_DELL_WYSE_MIC_NO_PRESENCE, .name = "alc225-wyse"},
7344 	{.id = ALC274_FIXUP_DELL_AIO_LINEOUT_VERB, .name = "alc274-dell-aio"},
7345 	{.id = ALC255_FIXUP_DUMMY_LINEOUT_VERB, .name = "alc255-dummy-lineout"},
7346 	{.id = ALC255_FIXUP_DELL_HEADSET_MIC, .name = "alc255-dell-headset"},
7347 	{.id = ALC295_FIXUP_HP_X360, .name = "alc295-hp-x360"},
7348 	{.id = ALC225_FIXUP_HEADSET_JACK, .name = "alc-headset-jack"},
7349 	{.id = ALC295_FIXUP_CHROME_BOOK, .name = "alc-chrome-book"},
7350 	{.id = ALC256_FIXUP_CHROME_BOOK, .name = "alc-2024y-chromebook"},
7351 	{.id = ALC299_FIXUP_PREDATOR_SPK, .name = "predator-spk"},
7352 	{.id = ALC298_FIXUP_HUAWEI_MBX_STEREO, .name = "huawei-mbx-stereo"},
7353 	{.id = ALC256_FIXUP_MEDION_HEADSET_NO_PRESENCE, .name = "alc256-medion-headset"},
7354 	{.id = ALC298_FIXUP_SAMSUNG_AMP, .name = "alc298-samsung-amp"},
7355 	{.id = ALC298_FIXUP_SAMSUNG_AMP_V2_2_AMPS, .name = "alc298-samsung-amp-v2-2-amps"},
7356 	{.id = ALC298_FIXUP_SAMSUNG_AMP_V2_4_AMPS, .name = "alc298-samsung-amp-v2-4-amps"},
7357 	{.id = ALC256_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET, .name = "alc256-samsung-headphone"},
7358 	{.id = ALC255_FIXUP_XIAOMI_HEADSET_MIC, .name = "alc255-xiaomi-headset"},
7359 	{.id = ALC274_FIXUP_HP_MIC, .name = "alc274-hp-mic-detect"},
7360 	{.id = ALC245_FIXUP_HP_X360_AMP, .name = "alc245-hp-x360-amp"},
7361 	{.id = ALC295_FIXUP_HP_OMEN, .name = "alc295-hp-omen"},
7362 	{.id = ALC285_FIXUP_HP_SPECTRE_X360, .name = "alc285-hp-spectre-x360"},
7363 	{.id = ALC285_FIXUP_HP_SPECTRE_X360_EB1, .name = "alc285-hp-spectre-x360-eb1"},
7364 	{.id = ALC285_FIXUP_HP_SPECTRE_X360_DF1, .name = "alc285-hp-spectre-x360-df1"},
7365 	{.id = ALC285_FIXUP_HP_ENVY_X360, .name = "alc285-hp-envy-x360"},
7366 	{.id = ALC287_FIXUP_IDEAPAD_BASS_SPK_AMP, .name = "alc287-ideapad-bass-spk-amp"},
7367 	{.id = ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK_PIN, .name = "alc287-yoga9-bass-spk-pin"},
7368 	{.id = ALC623_FIXUP_LENOVO_THINKSTATION_P340, .name = "alc623-lenovo-thinkstation-p340"},
7369 	{.id = ALC255_FIXUP_ACER_HEADPHONE_AND_MIC, .name = "alc255-acer-headphone-and-mic"},
7370 	{.id = ALC285_FIXUP_HP_GPIO_AMP_INIT, .name = "alc285-hp-amp-init"},
7371 	{.id = ALC236_FIXUP_LENOVO_INV_DMIC, .name = "alc236-fixup-lenovo-inv-mic"},
7372 	{.id = ALC2XX_FIXUP_HEADSET_MIC, .name = "alc2xx-fixup-headset-mic"},
7373 	{}
7374 };
7375 #define ALC225_STANDARD_PINS \
7376 	{0x21, 0x04211020}
7377 
7378 #define ALC256_STANDARD_PINS \
7379 	{0x12, 0x90a60140}, \
7380 	{0x14, 0x90170110}, \
7381 	{0x21, 0x02211020}
7382 
7383 #define ALC282_STANDARD_PINS \
7384 	{0x14, 0x90170110}
7385 
7386 #define ALC290_STANDARD_PINS \
7387 	{0x12, 0x99a30130}
7388 
7389 #define ALC292_STANDARD_PINS \
7390 	{0x14, 0x90170110}, \
7391 	{0x15, 0x0221401f}
7392 
7393 #define ALC295_STANDARD_PINS \
7394 	{0x12, 0xb7a60130}, \
7395 	{0x14, 0x90170110}, \
7396 	{0x21, 0x04211020}
7397 
7398 #define ALC298_STANDARD_PINS \
7399 	{0x12, 0x90a60130}, \
7400 	{0x21, 0x03211020}
7401 
7402 static const struct snd_hda_pin_quirk alc269_pin_fixup_tbl[] = {
7403 	SND_HDA_PIN_QUIRK(0x10ec0221, 0x103c, "HP Workstation", ALC221_FIXUP_HP_HEADSET_MIC,
7404 		{0x14, 0x01014020},
7405 		{0x17, 0x90170110},
7406 		{0x18, 0x02a11030},
7407 		{0x19, 0x0181303F},
7408 		{0x21, 0x0221102f}),
7409 	SND_HDA_PIN_QUIRK(0x10ec0255, 0x1025, "Acer", ALC255_FIXUP_ACER_MIC_NO_PRESENCE,
7410 		{0x12, 0x90a601c0},
7411 		{0x14, 0x90171120},
7412 		{0x21, 0x02211030}),
7413 	SND_HDA_PIN_QUIRK(0x10ec0255, 0x1043, "ASUS", ALC255_FIXUP_ASUS_MIC_NO_PRESENCE,
7414 		{0x14, 0x90170110},
7415 		{0x1b, 0x90a70130},
7416 		{0x21, 0x03211020}),
7417 	SND_HDA_PIN_QUIRK(0x10ec0255, 0x1043, "ASUS", ALC255_FIXUP_ASUS_MIC_NO_PRESENCE,
7418 		{0x1a, 0x90a70130},
7419 		{0x1b, 0x90170110},
7420 		{0x21, 0x03211020}),
7421 	SND_HDA_PIN_QUIRK(0x10ec0225, 0x1028, "Dell", ALC225_FIXUP_DELL1_MIC_NO_PRESENCE,
7422 		ALC225_STANDARD_PINS,
7423 		{0x12, 0xb7a60130},
7424 		{0x14, 0x901701a0}),
7425 	SND_HDA_PIN_QUIRK(0x10ec0225, 0x1028, "Dell", ALC225_FIXUP_DELL1_MIC_NO_PRESENCE,
7426 		ALC225_STANDARD_PINS,
7427 		{0x12, 0xb7a60130},
7428 		{0x14, 0x901701b0}),
7429 	SND_HDA_PIN_QUIRK(0x10ec0225, 0x1028, "Dell", ALC225_FIXUP_DELL1_MIC_NO_PRESENCE,
7430 		ALC225_STANDARD_PINS,
7431 		{0x12, 0xb7a60150},
7432 		{0x14, 0x901701a0}),
7433 	SND_HDA_PIN_QUIRK(0x10ec0225, 0x1028, "Dell", ALC225_FIXUP_DELL1_MIC_NO_PRESENCE,
7434 		ALC225_STANDARD_PINS,
7435 		{0x12, 0xb7a60150},
7436 		{0x14, 0x901701b0}),
7437 	SND_HDA_PIN_QUIRK(0x10ec0225, 0x1028, "Dell", ALC225_FIXUP_DELL1_MIC_NO_PRESENCE,
7438 		ALC225_STANDARD_PINS,
7439 		{0x12, 0xb7a60130},
7440 		{0x1b, 0x90170110}),
7441 	SND_HDA_PIN_QUIRK(0x10ec0233, 0x8086, "Intel NUC Skull Canyon", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE,
7442 		{0x1b, 0x01111010},
7443 		{0x1e, 0x01451130},
7444 		{0x21, 0x02211020}),
7445 	SND_HDA_PIN_QUIRK(0x10ec0235, 0x17aa, "Lenovo", ALC233_FIXUP_LENOVO_LINE2_MIC_HOTKEY,
7446 		{0x12, 0x90a60140},
7447 		{0x14, 0x90170110},
7448 		{0x19, 0x02a11030},
7449 		{0x21, 0x02211020}),
7450 	SND_HDA_PIN_QUIRK(0x10ec0235, 0x17aa, "Lenovo", ALC294_FIXUP_LENOVO_MIC_LOCATION,
7451 		{0x14, 0x90170110},
7452 		{0x19, 0x02a11030},
7453 		{0x1a, 0x02a11040},
7454 		{0x1b, 0x01014020},
7455 		{0x21, 0x0221101f}),
7456 	SND_HDA_PIN_QUIRK(0x10ec0235, 0x17aa, "Lenovo", ALC294_FIXUP_LENOVO_MIC_LOCATION,
7457 		{0x14, 0x90170110},
7458 		{0x19, 0x02a11030},
7459 		{0x1a, 0x02a11040},
7460 		{0x1b, 0x01011020},
7461 		{0x21, 0x0221101f}),
7462 	SND_HDA_PIN_QUIRK(0x10ec0235, 0x17aa, "Lenovo", ALC294_FIXUP_LENOVO_MIC_LOCATION,
7463 		{0x14, 0x90170110},
7464 		{0x19, 0x02a11020},
7465 		{0x1a, 0x02a11030},
7466 		{0x21, 0x0221101f}),
7467 	SND_HDA_PIN_QUIRK(0x10ec0236, 0x1028, "Dell", ALC236_FIXUP_DELL_AIO_HEADSET_MIC,
7468 		{0x21, 0x02211010}),
7469 	SND_HDA_PIN_QUIRK(0x10ec0236, 0x103c, "HP", ALC256_FIXUP_HP_HEADSET_MIC,
7470 		{0x14, 0x90170110},
7471 		{0x19, 0x02a11020},
7472 		{0x21, 0x02211030}),
7473 	SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL2_MIC_NO_PRESENCE,
7474 		{0x14, 0x90170110},
7475 		{0x21, 0x02211020}),
7476 	SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
7477 		{0x14, 0x90170130},
7478 		{0x21, 0x02211040}),
7479 	SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
7480 		{0x12, 0x90a60140},
7481 		{0x14, 0x90170110},
7482 		{0x21, 0x02211020}),
7483 	SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
7484 		{0x12, 0x90a60160},
7485 		{0x14, 0x90170120},
7486 		{0x21, 0x02211030}),
7487 	SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
7488 		{0x14, 0x90170110},
7489 		{0x1b, 0x02011020},
7490 		{0x21, 0x0221101f}),
7491 	SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
7492 		{0x14, 0x90170110},
7493 		{0x1b, 0x01011020},
7494 		{0x21, 0x0221101f}),
7495 	SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
7496 		{0x14, 0x90170130},
7497 		{0x1b, 0x01014020},
7498 		{0x21, 0x0221103f}),
7499 	SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
7500 		{0x14, 0x90170130},
7501 		{0x1b, 0x01011020},
7502 		{0x21, 0x0221103f}),
7503 	SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
7504 		{0x14, 0x90170130},
7505 		{0x1b, 0x02011020},
7506 		{0x21, 0x0221103f}),
7507 	SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
7508 		{0x14, 0x90170150},
7509 		{0x1b, 0x02011020},
7510 		{0x21, 0x0221105f}),
7511 	SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
7512 		{0x14, 0x90170110},
7513 		{0x1b, 0x01014020},
7514 		{0x21, 0x0221101f}),
7515 	SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
7516 		{0x12, 0x90a60160},
7517 		{0x14, 0x90170120},
7518 		{0x17, 0x90170140},
7519 		{0x21, 0x0321102f}),
7520 	SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
7521 		{0x12, 0x90a60160},
7522 		{0x14, 0x90170130},
7523 		{0x21, 0x02211040}),
7524 	SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
7525 		{0x12, 0x90a60160},
7526 		{0x14, 0x90170140},
7527 		{0x21, 0x02211050}),
7528 	SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
7529 		{0x12, 0x90a60170},
7530 		{0x14, 0x90170120},
7531 		{0x21, 0x02211030}),
7532 	SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
7533 		{0x12, 0x90a60170},
7534 		{0x14, 0x90170130},
7535 		{0x21, 0x02211040}),
7536 	SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
7537 		{0x12, 0x90a60170},
7538 		{0x14, 0x90171130},
7539 		{0x21, 0x02211040}),
7540 	SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
7541 		{0x12, 0x90a60170},
7542 		{0x14, 0x90170140},
7543 		{0x21, 0x02211050}),
7544 	SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell Inspiron 5548", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
7545 		{0x12, 0x90a60180},
7546 		{0x14, 0x90170130},
7547 		{0x21, 0x02211040}),
7548 	SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell Inspiron 5565", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
7549 		{0x12, 0x90a60180},
7550 		{0x14, 0x90170120},
7551 		{0x21, 0x02211030}),
7552 	SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
7553 		{0x1b, 0x01011020},
7554 		{0x21, 0x02211010}),
7555 	SND_HDA_PIN_QUIRK(0x10ec0256, 0x1043, "ASUS", ALC256_FIXUP_ASUS_MIC,
7556 		{0x14, 0x90170110},
7557 		{0x1b, 0x90a70130},
7558 		{0x21, 0x04211020}),
7559 	SND_HDA_PIN_QUIRK(0x10ec0256, 0x1043, "ASUS", ALC256_FIXUP_ASUS_MIC,
7560 		{0x14, 0x90170110},
7561 		{0x1b, 0x90a70130},
7562 		{0x21, 0x03211020}),
7563 	SND_HDA_PIN_QUIRK(0x10ec0256, 0x1043, "ASUS", ALC256_FIXUP_ASUS_MIC_NO_PRESENCE,
7564 		{0x12, 0x90a60130},
7565 		{0x14, 0x90170110},
7566 		{0x21, 0x03211020}),
7567 	SND_HDA_PIN_QUIRK(0x10ec0256, 0x1043, "ASUS", ALC256_FIXUP_ASUS_MIC_NO_PRESENCE,
7568 		{0x12, 0x90a60130},
7569 		{0x14, 0x90170110},
7570 		{0x21, 0x04211020}),
7571 	SND_HDA_PIN_QUIRK(0x10ec0256, 0x1043, "ASUS", ALC256_FIXUP_ASUS_MIC_NO_PRESENCE,
7572 		{0x1a, 0x90a70130},
7573 		{0x1b, 0x90170110},
7574 		{0x21, 0x03211020}),
7575        SND_HDA_PIN_QUIRK(0x10ec0256, 0x103c, "HP", ALC256_FIXUP_HP_HEADSET_MIC,
7576 		{0x14, 0x90170110},
7577 		{0x19, 0x02a11020},
7578 		{0x21, 0x0221101f}),
7579        SND_HDA_PIN_QUIRK(0x10ec0274, 0x103c, "HP", ALC274_FIXUP_HP_HEADSET_MIC,
7580 		{0x17, 0x90170110},
7581 		{0x19, 0x03a11030},
7582 		{0x21, 0x03211020}),
7583 	SND_HDA_PIN_QUIRK(0x10ec0280, 0x103c, "HP", ALC280_FIXUP_HP_GPIO4,
7584 		{0x12, 0x90a60130},
7585 		{0x14, 0x90170110},
7586 		{0x15, 0x0421101f},
7587 		{0x1a, 0x04a11020}),
7588 	SND_HDA_PIN_QUIRK(0x10ec0280, 0x103c, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED,
7589 		{0x12, 0x90a60140},
7590 		{0x14, 0x90170110},
7591 		{0x15, 0x0421101f},
7592 		{0x18, 0x02811030},
7593 		{0x1a, 0x04a1103f},
7594 		{0x1b, 0x02011020}),
7595 	SND_HDA_PIN_QUIRK(0x10ec0282, 0x103c, "HP 15 Touchsmart", ALC269_FIXUP_HP_MUTE_LED_MIC1,
7596 		ALC282_STANDARD_PINS,
7597 		{0x12, 0x99a30130},
7598 		{0x19, 0x03a11020},
7599 		{0x21, 0x0321101f}),
7600 	SND_HDA_PIN_QUIRK(0x10ec0282, 0x103c, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1,
7601 		ALC282_STANDARD_PINS,
7602 		{0x12, 0x99a30130},
7603 		{0x19, 0x03a11020},
7604 		{0x21, 0x03211040}),
7605 	SND_HDA_PIN_QUIRK(0x10ec0282, 0x103c, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1,
7606 		ALC282_STANDARD_PINS,
7607 		{0x12, 0x99a30130},
7608 		{0x19, 0x03a11030},
7609 		{0x21, 0x03211020}),
7610 	SND_HDA_PIN_QUIRK(0x10ec0282, 0x103c, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1,
7611 		ALC282_STANDARD_PINS,
7612 		{0x12, 0x99a30130},
7613 		{0x19, 0x04a11020},
7614 		{0x21, 0x0421101f}),
7615 	SND_HDA_PIN_QUIRK(0x10ec0282, 0x103c, "HP", ALC269_FIXUP_HP_LINE1_MIC1_LED,
7616 		ALC282_STANDARD_PINS,
7617 		{0x12, 0x90a60140},
7618 		{0x19, 0x04a11030},
7619 		{0x21, 0x04211020}),
7620 	SND_HDA_PIN_QUIRK(0x10ec0282, 0x1025, "Acer", ALC282_FIXUP_ACER_DISABLE_LINEOUT,
7621 		ALC282_STANDARD_PINS,
7622 		{0x12, 0x90a609c0},
7623 		{0x18, 0x03a11830},
7624 		{0x19, 0x04a19831},
7625 		{0x1a, 0x0481303f},
7626 		{0x1b, 0x04211020},
7627 		{0x21, 0x0321101f}),
7628 	SND_HDA_PIN_QUIRK(0x10ec0282, 0x1025, "Acer", ALC282_FIXUP_ACER_DISABLE_LINEOUT,
7629 		ALC282_STANDARD_PINS,
7630 		{0x12, 0x90a60940},
7631 		{0x18, 0x03a11830},
7632 		{0x19, 0x04a19831},
7633 		{0x1a, 0x0481303f},
7634 		{0x1b, 0x04211020},
7635 		{0x21, 0x0321101f}),
7636 	SND_HDA_PIN_QUIRK(0x10ec0283, 0x1028, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE,
7637 		ALC282_STANDARD_PINS,
7638 		{0x12, 0x90a60130},
7639 		{0x21, 0x0321101f}),
7640 	SND_HDA_PIN_QUIRK(0x10ec0283, 0x1028, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE,
7641 		{0x12, 0x90a60160},
7642 		{0x14, 0x90170120},
7643 		{0x21, 0x02211030}),
7644 	SND_HDA_PIN_QUIRK(0x10ec0283, 0x1028, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE,
7645 		ALC282_STANDARD_PINS,
7646 		{0x12, 0x90a60130},
7647 		{0x19, 0x03a11020},
7648 		{0x21, 0x0321101f}),
7649 	SND_HDA_PIN_QUIRK(0x10ec0285, 0x17aa, "Lenovo", ALC285_FIXUP_LENOVO_PC_BEEP_IN_NOISE,
7650 		{0x12, 0x90a60130},
7651 		{0x14, 0x90170110},
7652 		{0x19, 0x04a11040},
7653 		{0x21, 0x04211020}),
7654 	SND_HDA_PIN_QUIRK(0x10ec0285, 0x17aa, "Lenovo", ALC285_FIXUP_LENOVO_PC_BEEP_IN_NOISE,
7655 		{0x14, 0x90170110},
7656 		{0x19, 0x04a11040},
7657 		{0x1d, 0x40600001},
7658 		{0x21, 0x04211020}),
7659 	SND_HDA_PIN_QUIRK(0x10ec0285, 0x17aa, "Lenovo", ALC285_FIXUP_THINKPAD_NO_BASS_SPK_HEADSET_JACK,
7660 		{0x14, 0x90170110},
7661 		{0x19, 0x04a11040},
7662 		{0x21, 0x04211020}),
7663 	SND_HDA_PIN_QUIRK(0x10ec0287, 0x17aa, "Lenovo", ALC285_FIXUP_THINKPAD_HEADSET_JACK,
7664 		{0x14, 0x90170110},
7665 		{0x17, 0x90170111},
7666 		{0x19, 0x03a11030},
7667 		{0x21, 0x03211020}),
7668 	SND_HDA_PIN_QUIRK(0x10ec0287, 0x17aa, "Lenovo", ALC287_FIXUP_THINKPAD_I2S_SPK,
7669 		{0x17, 0x90170110},
7670 		{0x19, 0x03a11030},
7671 		{0x21, 0x03211020}),
7672 	SND_HDA_PIN_QUIRK(0x10ec0287, 0x17aa, "Lenovo", ALC287_FIXUP_THINKPAD_I2S_SPK,
7673 		{0x17, 0x90170110}, /* 0x231f with RTK I2S AMP */
7674 		{0x19, 0x04a11040},
7675 		{0x21, 0x04211020}),
7676 	SND_HDA_PIN_QUIRK(0x10ec0286, 0x1025, "Acer", ALC286_FIXUP_ACER_AIO_MIC_NO_PRESENCE,
7677 		{0x12, 0x90a60130},
7678 		{0x17, 0x90170110},
7679 		{0x21, 0x02211020}),
7680 	SND_HDA_PIN_QUIRK(0x10ec0288, 0x1028, "Dell", ALC288_FIXUP_DELL1_MIC_NO_PRESENCE,
7681 		{0x12, 0x90a60120},
7682 		{0x14, 0x90170110},
7683 		{0x21, 0x0321101f}),
7684 	SND_HDA_PIN_QUIRK(0x10ec0290, 0x103c, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1,
7685 		ALC290_STANDARD_PINS,
7686 		{0x15, 0x04211040},
7687 		{0x18, 0x90170112},
7688 		{0x1a, 0x04a11020}),
7689 	SND_HDA_PIN_QUIRK(0x10ec0290, 0x103c, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1,
7690 		ALC290_STANDARD_PINS,
7691 		{0x15, 0x04211040},
7692 		{0x18, 0x90170110},
7693 		{0x1a, 0x04a11020}),
7694 	SND_HDA_PIN_QUIRK(0x10ec0290, 0x103c, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1,
7695 		ALC290_STANDARD_PINS,
7696 		{0x15, 0x0421101f},
7697 		{0x1a, 0x04a11020}),
7698 	SND_HDA_PIN_QUIRK(0x10ec0290, 0x103c, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1,
7699 		ALC290_STANDARD_PINS,
7700 		{0x15, 0x04211020},
7701 		{0x1a, 0x04a11040}),
7702 	SND_HDA_PIN_QUIRK(0x10ec0290, 0x103c, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1,
7703 		ALC290_STANDARD_PINS,
7704 		{0x14, 0x90170110},
7705 		{0x15, 0x04211020},
7706 		{0x1a, 0x04a11040}),
7707 	SND_HDA_PIN_QUIRK(0x10ec0290, 0x103c, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1,
7708 		ALC290_STANDARD_PINS,
7709 		{0x14, 0x90170110},
7710 		{0x15, 0x04211020},
7711 		{0x1a, 0x04a11020}),
7712 	SND_HDA_PIN_QUIRK(0x10ec0290, 0x103c, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1,
7713 		ALC290_STANDARD_PINS,
7714 		{0x14, 0x90170110},
7715 		{0x15, 0x0421101f},
7716 		{0x1a, 0x04a11020}),
7717 	SND_HDA_PIN_QUIRK(0x10ec0292, 0x1028, "Dell", ALC269_FIXUP_DELL2_MIC_NO_PRESENCE,
7718 		ALC292_STANDARD_PINS,
7719 		{0x12, 0x90a60140},
7720 		{0x16, 0x01014020},
7721 		{0x19, 0x01a19030}),
7722 	SND_HDA_PIN_QUIRK(0x10ec0292, 0x1028, "Dell", ALC269_FIXUP_DELL2_MIC_NO_PRESENCE,
7723 		ALC292_STANDARD_PINS,
7724 		{0x12, 0x90a60140},
7725 		{0x16, 0x01014020},
7726 		{0x18, 0x02a19031},
7727 		{0x19, 0x01a1903e}),
7728 	SND_HDA_PIN_QUIRK(0x10ec0292, 0x1028, "Dell", ALC269_FIXUP_DELL3_MIC_NO_PRESENCE,
7729 		ALC292_STANDARD_PINS,
7730 		{0x12, 0x90a60140}),
7731 	SND_HDA_PIN_QUIRK(0x10ec0293, 0x1028, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE,
7732 		ALC292_STANDARD_PINS,
7733 		{0x13, 0x90a60140},
7734 		{0x16, 0x21014020},
7735 		{0x19, 0x21a19030}),
7736 	SND_HDA_PIN_QUIRK(0x10ec0293, 0x1028, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE,
7737 		ALC292_STANDARD_PINS,
7738 		{0x13, 0x90a60140}),
7739 	SND_HDA_PIN_QUIRK(0x10ec0294, 0x1043, "ASUS", ALC294_FIXUP_ASUS_HPE,
7740 		{0x17, 0x90170110},
7741 		{0x21, 0x04211020}),
7742 	SND_HDA_PIN_QUIRK(0x10ec0294, 0x1043, "ASUS", ALC294_FIXUP_ASUS_MIC,
7743 		{0x14, 0x90170110},
7744 		{0x1b, 0x90a70130},
7745 		{0x21, 0x04211020}),
7746 	SND_HDA_PIN_QUIRK(0x10ec0294, 0x1043, "ASUS", ALC294_FIXUP_ASUS_SPK,
7747 		{0x12, 0x90a60130},
7748 		{0x17, 0x90170110},
7749 		{0x21, 0x03211020}),
7750 	SND_HDA_PIN_QUIRK(0x10ec0294, 0x1043, "ASUS", ALC294_FIXUP_ASUS_SPK,
7751 		{0x12, 0x90a60130},
7752 		{0x17, 0x90170110},
7753 		{0x21, 0x04211020}),
7754 	SND_HDA_PIN_QUIRK(0x10ec0295, 0x1043, "ASUS", ALC294_FIXUP_ASUS_SPK,
7755 		{0x12, 0x90a60130},
7756 		{0x17, 0x90170110},
7757 		{0x21, 0x03211020}),
7758 	SND_HDA_PIN_QUIRK(0x10ec0295, 0x1043, "ASUS", ALC295_FIXUP_ASUS_MIC_NO_PRESENCE,
7759 		{0x12, 0x90a60120},
7760 		{0x17, 0x90170110},
7761 		{0x21, 0x04211030}),
7762 	SND_HDA_PIN_QUIRK(0x10ec0295, 0x1043, "ASUS", ALC295_FIXUP_ASUS_MIC_NO_PRESENCE,
7763 		{0x12, 0x90a60130},
7764 		{0x17, 0x90170110},
7765 		{0x21, 0x03211020}),
7766 	SND_HDA_PIN_QUIRK(0x10ec0295, 0x1043, "ASUS", ALC295_FIXUP_ASUS_MIC_NO_PRESENCE,
7767 		{0x12, 0x90a60130},
7768 		{0x17, 0x90170110},
7769 		{0x21, 0x03211020}),
7770 	SND_HDA_PIN_QUIRK(0x10ec0298, 0x1028, "Dell", ALC298_FIXUP_DELL1_MIC_NO_PRESENCE,
7771 		ALC298_STANDARD_PINS,
7772 		{0x17, 0x90170110}),
7773 	SND_HDA_PIN_QUIRK(0x10ec0298, 0x1028, "Dell", ALC298_FIXUP_DELL1_MIC_NO_PRESENCE,
7774 		ALC298_STANDARD_PINS,
7775 		{0x17, 0x90170140}),
7776 	SND_HDA_PIN_QUIRK(0x10ec0298, 0x1028, "Dell", ALC298_FIXUP_DELL1_MIC_NO_PRESENCE,
7777 		ALC298_STANDARD_PINS,
7778 		{0x17, 0x90170150}),
7779 	SND_HDA_PIN_QUIRK(0x10ec0298, 0x1028, "Dell", ALC298_FIXUP_SPK_VOLUME,
7780 		{0x12, 0xb7a60140},
7781 		{0x13, 0xb7a60150},
7782 		{0x17, 0x90170110},
7783 		{0x1a, 0x03011020},
7784 		{0x21, 0x03211030}),
7785 	SND_HDA_PIN_QUIRK(0x10ec0298, 0x1028, "Dell", ALC298_FIXUP_ALIENWARE_MIC_NO_PRESENCE,
7786 		{0x12, 0xb7a60140},
7787 		{0x17, 0x90170110},
7788 		{0x1a, 0x03a11030},
7789 		{0x21, 0x03211020}),
7790 	SND_HDA_PIN_QUIRK(0x10ec0299, 0x1028, "Dell", ALC269_FIXUP_DELL4_MIC_NO_PRESENCE,
7791 		ALC225_STANDARD_PINS,
7792 		{0x12, 0xb7a60130},
7793 		{0x17, 0x90170110}),
7794 	SND_HDA_PIN_QUIRK(0x10ec0623, 0x17aa, "Lenovo", ALC283_FIXUP_HEADSET_MIC,
7795 		{0x14, 0x01014010},
7796 		{0x17, 0x90170120},
7797 		{0x18, 0x02a11030},
7798 		{0x19, 0x02a1103f},
7799 		{0x21, 0x0221101f}),
7800 	{}
7801 };
7802 
7803 /* This is the fallback pin_fixup_tbl for alc269 family, to make the tbl match
7804  * more machines, don't need to match all valid pins, just need to match
7805  * all the pins defined in the tbl. Just because of this reason, it is possible
7806  * that a single machine matches multiple tbls, so there is one limitation:
7807  *   at most one tbl is allowed to define for the same vendor and same codec
7808  */
7809 static const struct snd_hda_pin_quirk alc269_fallback_pin_fixup_tbl[] = {
7810 	SND_HDA_PIN_QUIRK(0x10ec0256, 0x1025, "Acer", ALC2XX_FIXUP_HEADSET_MIC,
7811 		{0x19, 0x40000000}),
7812 	SND_HDA_PIN_QUIRK(0x10ec0289, 0x1028, "Dell", ALC269_FIXUP_DELL4_MIC_NO_PRESENCE,
7813 		{0x19, 0x40000000},
7814 		{0x1b, 0x40000000}),
7815 	SND_HDA_PIN_QUIRK(0x10ec0295, 0x1028, "Dell", ALC269_FIXUP_DELL4_MIC_NO_PRESENCE_QUIET,
7816 		{0x19, 0x40000000},
7817 		{0x1b, 0x40000000}),
7818 	SND_HDA_PIN_QUIRK(0x10ec0256, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
7819 		{0x19, 0x40000000},
7820 		{0x1a, 0x40000000}),
7821 	SND_HDA_PIN_QUIRK(0x10ec0236, 0x1028, "Dell", ALC255_FIXUP_DELL1_LIMIT_INT_MIC_BOOST,
7822 		{0x19, 0x40000000},
7823 		{0x1a, 0x40000000}),
7824 	SND_HDA_PIN_QUIRK(0x10ec0274, 0x1028, "Dell", ALC269_FIXUP_DELL1_LIMIT_INT_MIC_BOOST,
7825 		{0x19, 0x40000000},
7826 		{0x1a, 0x40000000}),
7827 	SND_HDA_PIN_QUIRK(0x10ec0256, 0x1043, "ASUS", ALC2XX_FIXUP_HEADSET_MIC,
7828 		{0x19, 0x40000000}),
7829 	SND_HDA_PIN_QUIRK(0x10ec0255, 0x1558, "Clevo", ALC2XX_FIXUP_HEADSET_MIC,
7830 		{0x19, 0x40000000}),
7831 	{}
7832 };
7833 
alc269_fill_coef(struct hda_codec * codec)7834 static void alc269_fill_coef(struct hda_codec *codec)
7835 {
7836 	struct alc_spec *spec = codec->spec;
7837 	int val;
7838 
7839 	if (spec->codec_variant != ALC269_TYPE_ALC269VB)
7840 		return;
7841 
7842 	if ((alc_get_coef0(codec) & 0x00ff) < 0x015) {
7843 		alc_write_coef_idx(codec, 0xf, 0x960b);
7844 		alc_write_coef_idx(codec, 0xe, 0x8817);
7845 	}
7846 
7847 	if ((alc_get_coef0(codec) & 0x00ff) == 0x016) {
7848 		alc_write_coef_idx(codec, 0xf, 0x960b);
7849 		alc_write_coef_idx(codec, 0xe, 0x8814);
7850 	}
7851 
7852 	if ((alc_get_coef0(codec) & 0x00ff) == 0x017) {
7853 		/* Power up output pin */
7854 		alc_update_coef_idx(codec, 0x04, 0, 1<<11);
7855 	}
7856 
7857 	if ((alc_get_coef0(codec) & 0x00ff) == 0x018) {
7858 		val = alc_read_coef_idx(codec, 0xd);
7859 		if (val != -1 && (val & 0x0c00) >> 10 != 0x1) {
7860 			/* Capless ramp up clock control */
7861 			alc_write_coef_idx(codec, 0xd, val | (1<<10));
7862 		}
7863 		val = alc_read_coef_idx(codec, 0x17);
7864 		if (val != -1 && (val & 0x01c0) >> 6 != 0x4) {
7865 			/* Class D power on reset */
7866 			alc_write_coef_idx(codec, 0x17, val | (1<<7));
7867 		}
7868 	}
7869 
7870 	/* HP */
7871 	alc_update_coef_idx(codec, 0x4, 0, 1<<11);
7872 }
7873 
alc269_remove(struct hda_codec * codec)7874 static void alc269_remove(struct hda_codec *codec)
7875 {
7876 	struct alc_spec *spec = codec->spec;
7877 
7878 	if (spec)
7879 		hda_component_manager_free(&spec->comps, &comp_master_ops);
7880 
7881 	snd_hda_gen_remove(codec);
7882 }
7883 
7884 /*
7885  */
alc269_probe(struct hda_codec * codec,const struct hda_device_id * id)7886 static int alc269_probe(struct hda_codec *codec, const struct hda_device_id *id)
7887 {
7888 	struct alc_spec *spec;
7889 	int err;
7890 
7891 	err = alc_alloc_spec(codec, 0x0b);
7892 	if (err < 0)
7893 		return err;
7894 
7895 	spec = codec->spec;
7896 	spec->gen.shared_mic_vref_pin = 0x18;
7897 	codec->power_save_node = 0;
7898 	spec->en_3kpull_low = true;
7899 
7900 	spec->shutup = alc_default_shutup;
7901 	spec->init_hook = alc_default_init;
7902 
7903 	switch (codec->core.vendor_id) {
7904 	case 0x10ec0269:
7905 		spec->codec_variant = ALC269_TYPE_ALC269VA;
7906 		switch (alc_get_coef0(codec) & 0x00f0) {
7907 		case 0x0010:
7908 			if (codec->bus->pci &&
7909 			    codec->bus->pci->subsystem_vendor == 0x1025 &&
7910 			    spec->cdefine.platform_type == 1)
7911 				err = alc_codec_rename(codec, "ALC271X");
7912 			spec->codec_variant = ALC269_TYPE_ALC269VB;
7913 			break;
7914 		case 0x0020:
7915 			if (codec->bus->pci &&
7916 			    codec->bus->pci->subsystem_vendor == 0x17aa &&
7917 			    codec->bus->pci->subsystem_device == 0x21f3)
7918 				err = alc_codec_rename(codec, "ALC3202");
7919 			spec->codec_variant = ALC269_TYPE_ALC269VC;
7920 			break;
7921 		case 0x0030:
7922 			spec->codec_variant = ALC269_TYPE_ALC269VD;
7923 			break;
7924 		default:
7925 			alc_fix_pll_init(codec, 0x20, 0x04, 15);
7926 		}
7927 		if (err < 0)
7928 			goto error;
7929 		spec->shutup = alc269_shutup;
7930 		spec->init_hook = alc269_fill_coef;
7931 		alc269_fill_coef(codec);
7932 		break;
7933 
7934 	case 0x10ec0280:
7935 	case 0x10ec0290:
7936 		spec->codec_variant = ALC269_TYPE_ALC280;
7937 		break;
7938 	case 0x10ec0282:
7939 		spec->codec_variant = ALC269_TYPE_ALC282;
7940 		spec->shutup = alc282_shutup;
7941 		spec->init_hook = alc282_init;
7942 		break;
7943 	case 0x10ec0233:
7944 	case 0x10ec0283:
7945 		spec->codec_variant = ALC269_TYPE_ALC283;
7946 		spec->shutup = alc283_shutup;
7947 		spec->init_hook = alc283_init;
7948 		break;
7949 	case 0x10ec0284:
7950 	case 0x10ec0292:
7951 		spec->codec_variant = ALC269_TYPE_ALC284;
7952 		break;
7953 	case 0x10ec0293:
7954 		spec->codec_variant = ALC269_TYPE_ALC293;
7955 		break;
7956 	case 0x10ec0286:
7957 	case 0x10ec0288:
7958 		spec->codec_variant = ALC269_TYPE_ALC286;
7959 		break;
7960 	case 0x10ec0298:
7961 		spec->codec_variant = ALC269_TYPE_ALC298;
7962 		break;
7963 	case 0x10ec0235:
7964 	case 0x10ec0255:
7965 		spec->codec_variant = ALC269_TYPE_ALC255;
7966 		spec->shutup = alc256_shutup;
7967 		spec->init_hook = alc256_init;
7968 		break;
7969 	case 0x10ec0230:
7970 	case 0x10ec0236:
7971 	case 0x10ec0256:
7972 	case 0x19e58326:
7973 		spec->codec_variant = ALC269_TYPE_ALC256;
7974 		spec->shutup = alc256_shutup;
7975 		spec->init_hook = alc256_init;
7976 		spec->gen.mixer_nid = 0; /* ALC256 does not have any loopback mixer path */
7977 		if (codec->core.vendor_id == 0x10ec0236 &&
7978 		    codec->bus->pci->vendor != PCI_VENDOR_ID_AMD)
7979 			spec->en_3kpull_low = false;
7980 		break;
7981 	case 0x10ec0257:
7982 		spec->codec_variant = ALC269_TYPE_ALC257;
7983 		spec->shutup = alc256_shutup;
7984 		spec->init_hook = alc256_init;
7985 		spec->gen.mixer_nid = 0;
7986 		spec->en_3kpull_low = false;
7987 		break;
7988 	case 0x10ec0215:
7989 	case 0x10ec0245:
7990 	case 0x10ec0285:
7991 	case 0x10ec0289:
7992 		if (alc_get_coef0(codec) & 0x0010)
7993 			spec->codec_variant = ALC269_TYPE_ALC245;
7994 		else
7995 			spec->codec_variant = ALC269_TYPE_ALC215;
7996 		spec->shutup = alc225_shutup;
7997 		spec->init_hook = alc225_init;
7998 		spec->gen.mixer_nid = 0;
7999 		break;
8000 	case 0x10ec0225:
8001 	case 0x10ec0295:
8002 	case 0x10ec0299:
8003 		spec->codec_variant = ALC269_TYPE_ALC225;
8004 		spec->shutup = alc225_shutup;
8005 		spec->init_hook = alc225_init;
8006 		spec->gen.mixer_nid = 0; /* no loopback on ALC225, ALC295 and ALC299 */
8007 		break;
8008 	case 0x10ec0287:
8009 		spec->codec_variant = ALC269_TYPE_ALC287;
8010 		spec->shutup = alc225_shutup;
8011 		spec->init_hook = alc225_init;
8012 		spec->gen.mixer_nid = 0; /* no loopback on ALC287 */
8013 		break;
8014 	case 0x10ec0234:
8015 	case 0x10ec0274:
8016 	case 0x10ec0294:
8017 		spec->codec_variant = ALC269_TYPE_ALC294;
8018 		spec->gen.mixer_nid = 0; /* ALC2x4 does not have any loopback mixer path */
8019 		alc_update_coef_idx(codec, 0x6b, 0x0018, (1<<4) | (1<<3)); /* UAJ MIC Vref control by verb */
8020 		spec->init_hook = alc294_init;
8021 		break;
8022 	case 0x10ec0300:
8023 		spec->codec_variant = ALC269_TYPE_ALC300;
8024 		spec->gen.mixer_nid = 0; /* no loopback on ALC300 */
8025 		break;
8026 	case 0x10ec0222:
8027 	case 0x10ec0623:
8028 		spec->codec_variant = ALC269_TYPE_ALC623;
8029 		spec->shutup = alc222_shutup;
8030 		spec->init_hook = alc222_init;
8031 		break;
8032 	case 0x10ec0700:
8033 	case 0x10ec0701:
8034 	case 0x10ec0703:
8035 	case 0x10ec0711:
8036 		spec->codec_variant = ALC269_TYPE_ALC700;
8037 		spec->gen.mixer_nid = 0; /* ALC700 does not have any loopback mixer path */
8038 		alc_update_coef_idx(codec, 0x4a, 1 << 15, 0); /* Combo jack auto trigger control */
8039 		spec->init_hook = alc294_init;
8040 		break;
8041 
8042 	}
8043 
8044 	if (snd_hda_codec_read(codec, 0x51, 0, AC_VERB_PARAMETERS, 0) == 0x10ec5505) {
8045 		spec->has_alc5505_dsp = 1;
8046 		spec->init_hook = alc5505_dsp_init;
8047 	}
8048 
8049 	alc_pre_init(codec);
8050 
8051 	snd_hda_pick_fixup(codec, alc269_fixup_models,
8052 		       alc269_fixup_tbl, alc269_fixups);
8053 	/* FIXME: both TX300 and ROG Strix G17 have the same SSID, and
8054 	 * the quirk breaks the latter (bko#214101).
8055 	 * Clear the wrong entry.
8056 	 */
8057 	if (codec->fixup_id == ALC282_FIXUP_ASUS_TX300 &&
8058 	    codec->core.vendor_id == 0x10ec0294) {
8059 		codec_dbg(codec, "Clear wrong fixup for ASUS ROG Strix G17\n");
8060 		codec->fixup_id = HDA_FIXUP_ID_NOT_SET;
8061 	}
8062 
8063 	snd_hda_pick_pin_fixup(codec, alc269_pin_fixup_tbl, alc269_fixups, true);
8064 	snd_hda_pick_pin_fixup(codec, alc269_fallback_pin_fixup_tbl, alc269_fixups, false);
8065 	snd_hda_pick_fixup(codec, NULL,	alc269_fixup_vendor_tbl,
8066 			   alc269_fixups);
8067 
8068 	/*
8069 	 * Check whether ACPI describes companion amplifiers that require
8070 	 * component binding
8071 	 */
8072 	find_cirrus_companion_amps(codec);
8073 
8074 	snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PRE_PROBE);
8075 
8076 	alc_auto_parse_customize_define(codec);
8077 
8078 	if (has_cdefine_beep(codec))
8079 		spec->gen.beep_nid = 0x01;
8080 
8081 	/* automatic parse from the BIOS config */
8082 	err = alc269_parse_auto_config(codec);
8083 	if (err < 0)
8084 		goto error;
8085 
8086 	if (!spec->gen.no_analog && spec->gen.beep_nid && spec->gen.mixer_nid) {
8087 		err = set_beep_amp(spec, spec->gen.mixer_nid, 0x04, HDA_INPUT);
8088 		if (err < 0)
8089 			goto error;
8090 	}
8091 
8092 	snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PROBE);
8093 
8094 	return 0;
8095 
8096  error:
8097 	alc269_remove(codec);
8098 	return err;
8099 }
8100 
8101 static const struct hda_codec_ops alc269_codec_ops = {
8102 	.probe = alc269_probe,
8103 	.remove = alc269_remove,
8104 	.build_controls = alc_build_controls,
8105 	.build_pcms = snd_hda_gen_build_pcms,
8106 	.init = alc_init,
8107 	.unsol_event = snd_hda_jack_unsol_event,
8108 	.suspend = alc269_suspend,
8109 	.resume = alc269_resume,
8110 	.check_power_status = snd_hda_gen_check_power_status,
8111 	.stream_pm = snd_hda_gen_stream_pm,
8112 };
8113 
8114 /*
8115  * driver entries
8116  */
8117 static const struct hda_device_id snd_hda_id_alc269[] = {
8118 	HDA_CODEC_ID(0x10ec0215, "ALC215"),
8119 	HDA_CODEC_ID(0x10ec0221, "ALC221"),
8120 	HDA_CODEC_ID(0x10ec0222, "ALC222"),
8121 	HDA_CODEC_ID(0x10ec0225, "ALC225"),
8122 	HDA_CODEC_ID(0x10ec0230, "ALC236"),
8123 	HDA_CODEC_ID(0x10ec0231, "ALC231"),
8124 	HDA_CODEC_ID(0x10ec0233, "ALC233"),
8125 	HDA_CODEC_ID(0x10ec0234, "ALC234"),
8126 	HDA_CODEC_ID(0x10ec0235, "ALC233"),
8127 	HDA_CODEC_ID(0x10ec0236, "ALC236"),
8128 	HDA_CODEC_ID(0x10ec0245, "ALC245"),
8129 	HDA_CODEC_ID(0x10ec0255, "ALC255"),
8130 	HDA_CODEC_ID(0x10ec0256, "ALC256"),
8131 	HDA_CODEC_ID(0x10ec0257, "ALC257"),
8132 	HDA_CODEC_ID(0x10ec0269, "ALC269"),
8133 	HDA_CODEC_ID(0x10ec0270, "ALC270"),
8134 	HDA_CODEC_ID(0x10ec0274, "ALC274"),
8135 	HDA_CODEC_ID(0x10ec0275, "ALC275"),
8136 	HDA_CODEC_ID(0x10ec0276, "ALC276"),
8137 	HDA_CODEC_ID(0x10ec0280, "ALC280"),
8138 	HDA_CODEC_ID(0x10ec0282, "ALC282"),
8139 	HDA_CODEC_ID(0x10ec0283, "ALC283"),
8140 	HDA_CODEC_ID(0x10ec0284, "ALC284"),
8141 	HDA_CODEC_ID(0x10ec0285, "ALC285"),
8142 	HDA_CODEC_ID(0x10ec0286, "ALC286"),
8143 	HDA_CODEC_ID(0x10ec0287, "ALC287"),
8144 	HDA_CODEC_ID(0x10ec0288, "ALC288"),
8145 	HDA_CODEC_ID(0x10ec0289, "ALC289"),
8146 	HDA_CODEC_ID(0x10ec0290, "ALC290"),
8147 	HDA_CODEC_ID(0x10ec0292, "ALC292"),
8148 	HDA_CODEC_ID(0x10ec0293, "ALC293"),
8149 	HDA_CODEC_ID(0x10ec0294, "ALC294"),
8150 	HDA_CODEC_ID(0x10ec0295, "ALC295"),
8151 	HDA_CODEC_ID(0x10ec0298, "ALC298"),
8152 	HDA_CODEC_ID(0x10ec0299, "ALC299"),
8153 	HDA_CODEC_ID(0x10ec0300, "ALC300"),
8154 	HDA_CODEC_ID(0x10ec0623, "ALC623"),
8155 	HDA_CODEC_ID(0x10ec0700, "ALC700"),
8156 	HDA_CODEC_ID(0x10ec0701, "ALC701"),
8157 	HDA_CODEC_ID(0x10ec0703, "ALC703"),
8158 	HDA_CODEC_ID(0x10ec0711, "ALC711"),
8159 	HDA_CODEC_ID(0x19e58326, "HW8326"),
8160 	{} /* terminator */
8161 };
8162 MODULE_DEVICE_TABLE(hdaudio, snd_hda_id_alc269);
8163 
8164 MODULE_LICENSE("GPL");
8165 MODULE_DESCRIPTION("Realtek ALC269 and compatible HD-audio codecs");
8166 MODULE_IMPORT_NS("SND_HDA_CODEC_REALTEK");
8167 MODULE_IMPORT_NS("SND_HDA_SCODEC_COMPONENT");
8168 
8169 static struct hda_codec_driver alc269_driver = {
8170 	.id = snd_hda_id_alc269,
8171 	.ops = &alc269_codec_ops,
8172 };
8173 
8174 module_hda_codec_driver(alc269_driver);
8175