Debian Codegraph @

sound/hda/codecs/realtek/alc269.c

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