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