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