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 ALC269_FIXUP_SKU_IGNORE,
4029 ALC269_FIXUP_ASUS_G73JW,
4030 ALC269_FIXUP_ASUS_N7601ZM_PINS,
4031 ALC269_FIXUP_ASUS_N7601ZM,
4032 ALC269_FIXUP_LENOVO_EAPD,
4033 ALC275_FIXUP_SONY_HWEQ,
4034 ALC275_FIXUP_SONY_DISABLE_AAMIX,
4035 ALC271_FIXUP_DMIC,
4036 ALC269_FIXUP_PCM_44K,
4037 ALC269_FIXUP_STEREO_DMIC,
4038 ALC269_FIXUP_HEADSET_MIC,
4039 ALC269_FIXUP_QUANTA_MUTE,
4040 ALC269_FIXUP_LIFEBOOK,
4041 ALC269_FIXUP_LIFEBOOK_EXTMIC,
4042 ALC269_FIXUP_LIFEBOOK_HP_PIN,
4043 ALC269_FIXUP_LIFEBOOK_NO_HP_TO_LINEOUT,
4044 ALC255_FIXUP_LIFEBOOK_U7x7_HEADSET_MIC,
4045 ALC269_FIXUP_AMIC,
4046 ALC269_FIXUP_DMIC,
4047 ALC269VB_FIXUP_AMIC,
4048 ALC269VB_FIXUP_DMIC,
4049 ALC269_FIXUP_HP_MUTE_LED,
4050 ALC269_FIXUP_HP_MUTE_LED_MIC1,
4051 ALC269_FIXUP_HP_MUTE_LED_MIC2,
4052 ALC269_FIXUP_HP_MUTE_LED_MIC3,
4053 ALC269_FIXUP_HP_GPIO_LED,
4054 ALC269_FIXUP_HP_GPIO_MIC1_LED,
4055 ALC269_FIXUP_HP_LINE1_MIC1_LED,
4056 ALC269_FIXUP_INV_DMIC,
4057 ALC269_FIXUP_LENOVO_DOCK,
4058 ALC269_FIXUP_LENOVO_DOCK_LIMIT_BOOST,
4059 ALC269_FIXUP_NO_SHUTUP,
4060 ALC286_FIXUP_SONY_MIC_NO_PRESENCE,
4061 ALC269_FIXUP_PINCFG_NO_HP_TO_LINEOUT,
4062 ALC269_FIXUP_DELL1_MIC_NO_PRESENCE,
4063 ALC269_FIXUP_DELL1_LIMIT_INT_MIC_BOOST,
4064 ALC269_FIXUP_DELL2_MIC_NO_PRESENCE,
4065 ALC269_FIXUP_DELL3_MIC_NO_PRESENCE,
4066 ALC269_FIXUP_DELL4_MIC_NO_PRESENCE,
4067 ALC269_FIXUP_DELL4_MIC_NO_PRESENCE_QUIET,
4068 ALC269_FIXUP_HEADSET_MODE,
4069 ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC,
4070 ALC269_FIXUP_ASPIRE_HEADSET_MIC,
4071 ALC269_FIXUP_ASUS_X101_FUNC,
4072 ALC269_FIXUP_ASUS_X101_VERB,
4073 ALC269_FIXUP_ASUS_X101,
4074 ALC271_FIXUP_AMIC_MIC2,
4075 ALC271_FIXUP_HP_GATE_MIC_JACK,
4076 ALC271_FIXUP_HP_GATE_MIC_JACK_E1_572,
4077 ALC269_FIXUP_ACER_AC700,
4078 ALC269_FIXUP_LIMIT_INT_MIC_BOOST,
4079 ALC269_FIXUP_THINKPAD_LIMIT_INT_MIC_BOOST,
4080 ALC269VB_FIXUP_ASUS_ZENBOOK,
4081 ALC269VB_FIXUP_ASUS_ZENBOOK_UX31A,
4082 ALC269VB_FIXUP_ASUS_MIC_NO_PRESENCE,
4083 ALC269_FIXUP_LIMIT_INT_MIC_BOOST_MUTE_LED,
4084 ALC269VB_FIXUP_ORDISSIMO_EVE2,
4085 ALC283_FIXUP_CHROME_BOOK,
4086 ALC283_FIXUP_SENSE_COMBO_JACK,
4087 ALC282_FIXUP_ASUS_TX300,
4088 ALC283_FIXUP_INT_MIC,
4089 ALC290_FIXUP_MONO_SPEAKERS,
4090 ALC290_FIXUP_MONO_SPEAKERS_HSJACK,
4091 ALC290_FIXUP_SUBWOOFER,
4092 ALC290_FIXUP_SUBWOOFER_HSJACK,
4093 ALC295_FIXUP_HP_MUTE_LED_COEFBIT11,
4094 ALC295_FIXUP_HP_PAVILION_MUTE_LED_1B,
4095 ALC269_FIXUP_THINKPAD_ACPI,
4096 ALC269_FIXUP_LENOVO_XPAD_ACPI,
4097 ALC269_FIXUP_DMIC_THINKPAD_ACPI,
4098 ALC269VB_FIXUP_INFINIX_ZERO_BOOK_13,
4099 ALC269VC_FIXUP_INFINIX_Y4_MAX,
4100 ALC269VB_FIXUP_INFINIX_INBOOK_X3_SLIM,
4101 ALC269VC_FIXUP_LUNNEN_GROUND_14,
4102 ALC269VB_FIXUP_CHUWI_COREBOOK_XPRO,
4103 ALC255_FIXUP_ACER_MIC_NO_PRESENCE,
4104 ALC255_FIXUP_ASUS_MIC_NO_PRESENCE,
4105 ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
4106 ALC255_FIXUP_DELL1_LIMIT_INT_MIC_BOOST,
4107 ALC255_FIXUP_DELL2_MIC_NO_PRESENCE,
4108 ALC255_FIXUP_HEADSET_MODE,
4109 ALC255_FIXUP_HEADSET_MODE_NO_HP_MIC,
4110 ALC293_FIXUP_DELL1_MIC_NO_PRESENCE,
4111 ALC292_FIXUP_TPT440_DOCK,
4112 ALC292_FIXUP_TPT440,
4113 ALC283_FIXUP_HEADSET_MIC,
4114 ALC255_FIXUP_MIC_MUTE_LED,
4115 ALC282_FIXUP_ASPIRE_V5_PINS,
4116 ALC269VB_FIXUP_ASPIRE_E1_COEF,
4117 ALC280_FIXUP_HP_GPIO4,
4118 ALC286_FIXUP_HP_GPIO_LED,
4119 ALC280_FIXUP_HP_GPIO2_MIC_HOTKEY,
4120 ALC280_FIXUP_HP_DOCK_PINS,
4121 ALC269_FIXUP_HP_DOCK_GPIO_MIC1_LED,
4122 ALC280_FIXUP_HP_9480M,
4123 ALC245_FIXUP_HP_X360_AMP,
4124 ALC285_FIXUP_HP_SPECTRE_X360_EB1,
4125 ALC285_FIXUP_HP_SPECTRE_X360_DF1,
4126 ALC285_FIXUP_HP_ENVY_X360,
4127 ALC288_FIXUP_DELL_HEADSET_MODE,
4128 ALC288_FIXUP_DELL1_MIC_NO_PRESENCE,
4129 ALC288_FIXUP_DELL_XPS_13,
4130 ALC288_FIXUP_DISABLE_AAMIX,
4131 ALC292_FIXUP_DELL_E7X_AAMIX,
4132 ALC292_FIXUP_DELL_E7X,
4133 ALC292_FIXUP_DISABLE_AAMIX,
4134 ALC293_FIXUP_DISABLE_AAMIX_MULTIJACK,
4135 ALC298_FIXUP_ALIENWARE_MIC_NO_PRESENCE,
4136 ALC298_FIXUP_DELL1_MIC_NO_PRESENCE,
4137 ALC298_FIXUP_DELL_AIO_MIC_NO_PRESENCE,
4138 ALC275_FIXUP_DELL_XPS,
4139 ALC293_FIXUP_LENOVO_SPK_NOISE,
4140 ALC233_FIXUP_LENOVO_LINE2_MIC_HOTKEY,
4141 ALC233_FIXUP_WUJIE_SPEAKERS,
4142 ALC233_FIXUP_LENOVO_L2MH_LOW_ENLED,
4143 ALC255_FIXUP_DELL_SPK_NOISE,
4144 ALC225_FIXUP_DISABLE_MIC_VREF,
4145 ALC225_FIXUP_DELL1_MIC_NO_PRESENCE,
4146 ALC295_FIXUP_DISABLE_DAC3,
4147 ALC285_FIXUP_SPEAKER2_TO_DAC1,
4148 ALC285_FIXUP_YOGA_SPEAKER2_TO_DAC1,
4149 ALC285_FIXUP_ASUS_SPEAKER2_TO_DAC1,
4150 ALC285_FIXUP_ASUS_HEADSET_MIC,
4151 ALC285_FIXUP_ASUS_SPI_REAR_SPEAKERS,
4152 ALC285_FIXUP_ASUS_I2C_SPEAKER2_TO_DAC1,
4153 ALC285_FIXUP_ASUS_I2C_HEADSET_MIC,
4154 ALC280_FIXUP_HP_HEADSET_MIC,
4155 ALC221_FIXUP_HP_FRONT_MIC,
4156 ALC292_FIXUP_TPT460,
4157 ALC298_FIXUP_SPK_VOLUME,
4158 ALC298_FIXUP_LENOVO_SPK_VOLUME,
4159 ALC256_FIXUP_DELL_INSPIRON_7559_SUBWOOFER,
4160 ALC269_FIXUP_ATIV_BOOK_8,
4161 ALC221_FIXUP_HP_288PRO_MIC_NO_PRESENCE,
4162 ALC221_FIXUP_HP_MIC_NO_PRESENCE,
4163 ALC256_FIXUP_ASUS_HEADSET_MODE,
4164 ALC256_FIXUP_ASUS_MIC,
4165 ALC256_FIXUP_ASUS_AIO_GPIO2,
4166 ALC233_FIXUP_ASUS_MIC_NO_PRESENCE,
4167 ALC233_FIXUP_EAPD_COEF_AND_MIC_NO_PRESENCE,
4168 ALC233_FIXUP_LENOVO_MULTI_CODECS,
4169 ALC233_FIXUP_ACER_HEADSET_MIC,
4170 ALC294_FIXUP_LENOVO_MIC_LOCATION,
4171 ALC225_FIXUP_DELL_WYSE_MIC_NO_PRESENCE,
4172 ALC225_FIXUP_S3_POP_NOISE,
4173 ALC700_FIXUP_INTEL_REFERENCE,
4174 ALC700_FIXUP_INTEL_HADES_CANYON,
4175 ALC274_FIXUP_DELL_BIND_DACS,
4176 ALC274_FIXUP_DELL_AIO_LINEOUT_VERB,
4177 ALC298_FIXUP_TPT470_DOCK_FIX,
4178 ALC298_FIXUP_TPT470_DOCK,
4179 ALC255_FIXUP_DUMMY_LINEOUT_VERB,
4180 ALC255_FIXUP_DELL_HEADSET_MIC,
4181 ALC256_FIXUP_HUAWEI_MACH_WX9_PINS,
4182 ALC298_FIXUP_HUAWEI_MBX_STEREO,
4183 ALC295_FIXUP_HP_X360,
4184 ALC295_FIXUP_HP_PAVILION_X360,
4185 ALC221_FIXUP_HP_HEADSET_MIC,
4186 ALC285_FIXUP_LENOVO_HEADPHONE_NOISE,
4187 ALC295_FIXUP_HP_AUTO_MUTE,
4188 ALC286_FIXUP_ACER_AIO_MIC_NO_PRESENCE,
4189 ALC294_FIXUP_ASUS_MIC,
4190 ALC294_FIXUP_ASUS_HEADSET_MIC,
4191 ALC294_FIXUP_ASUS_I2C_HEADSET_MIC,
4192 ALC294_FIXUP_ASUS_SPI_HEADSET_MIC,
4193 ALC294_FIXUP_ASUS_SPK,
4194 ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE,
4195 ALC285_FIXUP_LENOVO_PC_BEEP_IN_NOISE,
4196 ALC255_FIXUP_ACER_HEADSET_MIC,
4197 ALC295_FIXUP_CHROME_BOOK,
4198 ALC225_FIXUP_HEADSET_JACK,
4199 ALC225_FIXUP_DELL_WYSE_AIO_MIC_NO_PRESENCE,
4200 ALC225_FIXUP_WYSE_AUTO_MUTE,
4201 ALC225_FIXUP_WYSE_DISABLE_MIC_VREF,
4202 ALC286_FIXUP_ACER_AIO_HEADSET_MIC,
4203 ALC256_FIXUP_ASUS_HEADSET_MIC,
4204 ALC256_FIXUP_ASUS_MIC_NO_PRESENCE,
4205 ALC255_FIXUP_PREDATOR_SUBWOOFER,
4206 ALC299_FIXUP_PREDATOR_SPK,
4207 ALC256_FIXUP_MEDION_HEADSET_NO_PRESENCE,
4208 ALC289_FIXUP_DELL_SPK1,
4209 ALC289_FIXUP_DELL_SPK2,
4210 ALC289_FIXUP_DUAL_SPK,
4211 ALC289_FIXUP_RTK_AMP_DUAL_SPK,
4212 ALC294_FIXUP_SPK2_TO_DAC1,
4213 ALC294_FIXUP_ASUS_DUAL_SPK,
4214 ALC285_FIXUP_THINKPAD_X1_GEN7,
4215 ALC285_FIXUP_THINKPAD_HEADSET_JACK,
4216 ALC294_FIXUP_ASUS_ALLY,
4217 ALC294_FIXUP_ASUS_ALLY_PINS,
4218 ALC294_FIXUP_ASUS_ALLY_VERBS,
4219 ALC294_FIXUP_ASUS_HPE,
4220 ALC294_FIXUP_ASUS_COEF_1B,
4221 ALC294_FIXUP_ASUS_GX502_HP,
4222 ALC294_FIXUP_ASUS_GX502_PINS,
4223 ALC294_FIXUP_ASUS_GX502_VERBS,
4224 ALC294_FIXUP_ASUS_GU502_HP,
4225 ALC294_FIXUP_ASUS_GU502_PINS,
4226 ALC294_FIXUP_ASUS_GU502_VERBS,
4227 ALC294_FIXUP_ASUS_G513_PINS,
4228 ALC285_FIXUP_ASUS_G533Z_PINS,
4229 ALC285_FIXUP_HP_GPIO_LED,
4230 ALC285_FIXUP_HP_MUTE_LED,
4231 ALC285_FIXUP_HP_SPECTRE_X360_MUTE_LED,
4232 ALC245_FIXUP_HP_ENVY_X360_MUTE_LED,
4233 ALC285_FIXUP_HP_BEEP_MICMUTE_LED,
4234 ALC236_FIXUP_HP_MUTE_LED_COEFBIT2,
4235 ALC236_FIXUP_HP_GPIO_LED,
4236 ALC236_FIXUP_HP_MUTE_LED,
4237 ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF,
4238 ALC236_FIXUP_HP_15_FD0XXX,
4239 ALC236_FIXUP_LENOVO_INV_DMIC,
4240 ALC298_FIXUP_SAMSUNG_AMP,
4241 ALC298_FIXUP_SAMSUNG_AMP_V2_2_AMPS,
4242 ALC298_FIXUP_SAMSUNG_AMP_V2_4_AMPS,
4243 ALC298_FIXUP_LG_GRAM_STYLE_14,
4244 ALC298_FIXUP_RAZER_BLADE16_2025_PINS,
4245 ALC298_FIXUP_RAZER_BLADE16_2025,
4246 ALC298_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET,
4247 ALC256_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET,
4248 ALC295_FIXUP_ASUS_MIC_NO_PRESENCE,
4249 ALC269VC_FIXUP_ACER_VCOPPERBOX_PINS,
4250 ALC269VC_FIXUP_ACER_HEADSET_MIC,
4251 ALC269VC_FIXUP_ACER_MIC_NO_PRESENCE,
4252 ALC289_FIXUP_ASUS_GA401,
4253 ALC289_FIXUP_ASUS_GA502,
4254 ALC256_FIXUP_ACER_MIC_NO_PRESENCE,
4255 ALC285_FIXUP_HP_GPIO_AMP_INIT,
4256 ALC269_FIXUP_CZC_B20,
4257 ALC269_FIXUP_CZC_TMI,
4258 ALC269_FIXUP_CZC_L101,
4259 ALC269_FIXUP_LEMOTE_A1802,
4260 ALC269_FIXUP_LEMOTE_A190X,
4261 ALC256_FIXUP_INTEL_NUC8_RUGGED,
4262 ALC233_FIXUP_INTEL_NUC8_DMIC,
4263 ALC256_FIXUP_INTEL_NUC10,
4264 ALC255_FIXUP_XIAOMI_HEADSET_MIC,
4265 ALC274_FIXUP_HP_MIC,
4266 ALC274_FIXUP_HP_HEADSET_MIC,
4267 ALC274_FIXUP_HP_ENVY_GPIO,
4268 ALC274_FIXUP_ASUS_ZEN_AIO_27,
4269 ALC256_FIXUP_ASUS_HPE,
4270 ALC285_FIXUP_THINKPAD_NO_BASS_SPK_HEADSET_JACK,
4271 ALC287_FIXUP_HP_GPIO_LED,
4272 ALC256_FIXUP_HP_HEADSET_MIC,
4273 ALC245_FIXUP_HP_GPIO_LED,
4274 ALC236_FIXUP_DELL_AIO_HEADSET_MIC,
4275 ALC282_FIXUP_ACER_DISABLE_LINEOUT,
4276 ALC255_FIXUP_ACER_LIMIT_INT_MIC_BOOST,
4277 ALC256_FIXUP_ACER_HEADSET_MIC,
4278 ALC256_FIXUP_ACER_COLDBOOT,
4279 ALC285_FIXUP_IDEAPAD_S740_COEF,
4280 ALC285_FIXUP_HP_LIMIT_INT_MIC_BOOST,
4281 ALC295_FIXUP_ASUS_DACS,
4282 ALC295_FIXUP_HP_OMEN,
4283 ALC285_FIXUP_HP_SPECTRE_X360,
4284 ALC287_FIXUP_IDEAPAD_BASS_SPK_AMP,
4285 ALC623_FIXUP_LENOVO_THINKSTATION_P340,
4286 ALC255_FIXUP_ACER_HEADPHONE_AND_MIC,
4287 ALC236_FIXUP_HP_LIMIT_INT_MIC_BOOST,
4288 ALC287_FIXUP_LEGION_15IMHG05_SPEAKERS,
4289 ALC287_FIXUP_LEGION_15IMHG05_AUTOMUTE,
4290 ALC287_FIXUP_YOGA7_14ITL_SPEAKERS,
4291 ALC298_FIXUP_LENOVO_C940_DUET7,
4292 ALC287_FIXUP_LENOVO_YOGA_BOOK_9I,
4293 ALC287_FIXUP_LENOVO_YOGA_PRO7,
4294 ALC287_FIXUP_LENOVO_XPAD_HEADSET_JACK,
4295 ALC287_FIXUP_13S_GEN2_SPEAKERS,
4296 ALC256_FIXUP_SET_COEF_DEFAULTS,
4297 ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE,
4298 ALC233_FIXUP_NO_AUDIO_JACK,
4299 ALC256_FIXUP_MIC_NO_PRESENCE_AND_RESUME,
4300 ALC256_FIXUP_XIAOMI_PRO15_RESUME,
4301 ALC285_FIXUP_LEGION_Y9000X_SPEAKERS,
4302 ALC285_FIXUP_LEGION_Y9000X_AUTOMUTE,
4303 ALC287_FIXUP_LEGION_16ACHG6,
4304 ALC287_FIXUP_CS35L41_I2C_2,
4305 ALC287_FIXUP_CS35L41_I2C_2_HP_GPIO_LED,
4306 ALC287_FIXUP_CS35L41_I2C_2_HP_MUTE_LEDS,
4307 ALC287_FIXUP_CS35L41_I2C_4,
4308 ALC245_FIXUP_CS35L41_SPI_1,
4309 ALC245_FIXUP_CS35L41_SPI_2,
4310 ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED,
4311 ALC245_FIXUP_CS35L41_SPI_4,
4312 ALC245_FIXUP_CS35L41_SPI_4_HP_GPIO_LED,
4313 ALC285_FIXUP_HP_SPEAKERS_MICMUTE_LED,
4314 ALC295_FIXUP_FRAMEWORK_LAPTOP_MIC_NO_PRESENCE,
4315 ALC295_FIXUP_FRAMEWORK_LAPTOP_LIMIT_INT_MIC_BOOST,
4316 ALC287_FIXUP_LEGION_16ITHG6,
4317 ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK,
4318 ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK_PIN,
4319 ALC287_FIXUP_YOGA9_14IMH9_BASS_SPK_PIN,
4320 ALC295_FIXUP_DELL_INSPIRON_TOP_SPEAKERS,
4321 ALC236_FIXUP_DELL_DUAL_CODECS,
4322 ALC287_FIXUP_CS35L41_I2C_2_THINKPAD_ACPI,
4323 ALC287_FIXUP_TAS2781_I2C,
4324 ALC287_FIXUP_ASUS_ALLY_X,
4325 ALC287_FIXUP_ASUS_ALLY_X_SPEAKER,
4326 ALC287_FIXUP_ASUS_ALLY_X_I2C,
4327 ALC295_FIXUP_DELL_TAS2781_I2C,
4328 ALC245_FIXUP_TAS2781_SPI_2,
4329 ALC287_FIXUP_TXNW2781_I2C,
4330 ALC287_FIXUP_TXNW2781_I2C_ASUS,
4331 ALC287_FIXUP_YOGA7_14ARB7_I2C,
4332 ALC245_FIXUP_HP_MUTE_LED_COEFBIT,
4333 ALC245_FIXUP_HP_MUTE_LED_V1_COEFBIT,
4334 ALC245_FIXUP_HP_MUTE_LED_V2_COEFBIT,
4335 ALC245_FIXUP_HP_X360_MUTE_LEDS,
4336 ALC287_FIXUP_THINKPAD_I2S_SPK,
4337 ALC287_FIXUP_MG_RTKC_CSAMP_CS35L41_I2C_THINKPAD,
4338 ALC2XX_FIXUP_HEADSET_MIC,
4339 ALC289_FIXUP_DELL_CS35L41_SPI_2,
4340 ALC256_FIXUP_ACER_SFG16_MICMUTE_LED,
4341 ALC256_FIXUP_HEADPHONE_AMP_VOL,
4342 ALC245_FIXUP_HP_SPECTRE_X360_EU0XXX,
4343 ALC245_FIXUP_HP_SPECTRE_X360_16_AA0XXX,
4344 ALC245_FIXUP_HP_ZBOOK_FIREFLY_G12A,
4345 ALC285_FIXUP_ASUS_GA403U,
4346 ALC285_FIXUP_ASUS_GA403U_HEADSET_MIC,
4347 ALC285_FIXUP_ASUS_GA403U_I2C_SPEAKER2_TO_DAC1,
4348 ALC285_FIXUP_ASUS_GU605_SPI_2_HEADSET_MIC,
4349 ALC285_FIXUP_ASUS_GU605_SPI_SPEAKER2_TO_DAC1,
4350 ALC287_FIXUP_LENOVO_THKPAD_WH_ALC1318,
4351 ALC256_FIXUP_CHROME_BOOK,
4352 ALC245_FIXUP_CLEVO_NOISY_MIC,
4353 ALC245_FIXUP_MINISFORUM_JACK_DETECT,
4354 ALC269_FIXUP_VAIO_VJFH52_MIC_NO_PRESENCE,
4355 ALC233_FIXUP_MEDION_MTL_SPK,
4356 ALC233_FIXUP_STARLABS_STARFIGHTER,
4357 ALC294_FIXUP_BASS_SPEAKER_15,
4358 ALC283_FIXUP_DELL_HP_RESUME,
4359 ALC294_FIXUP_ASUS_CS35L41_SPI_2,
4360 ALC274_FIXUP_HP_AIO_BIND_DACS,
4361 ALC287_FIXUP_PREDATOR_SPK_CS35L41_I2C_2,
4362 ALC285_FIXUP_ASUS_GA605K_HEADSET_MIC,
4363 ALC269_FIXUP_POSITIVO_P15X_HEADSET_MIC,
4364 ALC289_FIXUP_ASUS_ZEPHYRUS_DUAL_SPK,
4365 ALC256_FIXUP_VAIO_RPL_MIC_NO_PRESENCE,
4366 ALC245_FIXUP_HP_TAS2781_SPI_MUTE_LED,
4367 ALC245_FIXUP_HP_TAS2781_I2C_MUTE_LED,
4368 ALC245_FIXUP_HP_TAS2781_I2C_MUTE_LED_INVERTED,
4369 ALC288_FIXUP_SURFACE_SWAP_DACS,
4370 ALC236_FIXUP_HP_MUTE_LED_MICMUTE_GPIO,
4371 ALC233_FIXUP_LENOVO_GPIO2_MIC_HOTKEY,
4372 ALC245_FIXUP_BASS_HP_DAC,
4373 ALC245_FIXUP_ACER_MICMUTE_LED,
4374 ALC245_FIXUP_CS35L41_I2C_2_MUTE_LED,
4375 ALC236_FIXUP_HP_DMIC,
4376 ALC256_FIXUP_HONOR_MRB_XXX_M1020_AUDIO,
4377 ALC245_FIXUP_HP_ENVY_X360_15_FH0XXX,
4378 ALC287_FIXUP_ACER_MICMUTE_LED,
4379 ALC236_FIXUP_DELL_HP_POP_NOISE,
4380 ALC274_FIXUP_HP_89E9_GPIO,
4381 ALC274_FIXUP_HP_VERBS,
4382 ALC287_FIXUP_AW88399_I2C_2,
4383 ALC287_FIXUP_LENOVO_LEGION_AW88399,
4384 ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK_PIN_HEADSET,
4385 ALC285_LENOVO_DAC_RENAME,
4386 ALC287_FIXUP_YOGA9_SPEAKER2_TO_DAC1,
4387 };
4388
4389 /* A special fixup for Lenovo C940 and Yoga Duet 7;
4390 * both have the very same PCI SSID, and we need to apply different fixups
4391 * depending on the codec ID
4392 */
alc298_fixup_lenovo_c940_duet7(struct hda_codec * codec,const struct hda_fixup * fix,int action)4393 static void alc298_fixup_lenovo_c940_duet7(struct hda_codec *codec,
4394 const struct hda_fixup *fix,
4395 int action)
4396 {
4397 int id;
4398
4399 if (codec->core.vendor_id == 0x10ec0298)
4400 id = ALC298_FIXUP_LENOVO_SPK_VOLUME; /* C940 */
4401 else
4402 id = ALC287_FIXUP_YOGA7_14ITL_SPEAKERS; /* Duet 7 */
4403 __snd_hda_apply_fixup(codec, id, action, 0);
4404 }
4405
4406 /* A special fixup for Lenovo Yoga 9i and Yoga Book 9i 13IRU8
4407 * both have the very same PCI SSID and vendor ID, so we need
4408 * to apply different fixups depending on the subsystem ID
4409 */
alc287_fixup_lenovo_yoga_book_9i(struct hda_codec * codec,const struct hda_fixup * fix,int action)4410 static void alc287_fixup_lenovo_yoga_book_9i(struct hda_codec *codec,
4411 const struct hda_fixup *fix,
4412 int action)
4413 {
4414 int id;
4415
4416 if (codec->core.subsystem_id == 0x17aa3881)
4417 id = ALC287_FIXUP_TAS2781_I2C; /* Yoga Book 9i 13IRU8 */
4418 else
4419 id = ALC287_FIXUP_IDEAPAD_BASS_SPK_AMP; /* Yoga 9i */
4420 __snd_hda_apply_fixup(codec, id, action, 0);
4421 }
4422
alc700_fixup_intel_hades_canyon(struct hda_codec * codec,const struct hda_fixup * fix,int action)4423 static void alc700_fixup_intel_hades_canyon(struct hda_codec *codec,
4424 const struct hda_fixup *fix,
4425 int action)
4426 {
4427 /*
4428 * Windows may leave coef 0x1b bit 0x0400 cleared, causing broken
4429 * analog playback after rebooting into Linux. Restore the bit
4430 * during codec initialization.
4431 */
4432 if (action == HDA_FIXUP_ACT_INIT)
4433 alc_update_coef_idx(codec, 0x1b, 0x0400, 0x0400);
4434 }
4435
4436 static const struct hda_fixup alc269_fixups[] = {
4437 [ALC298_FIXUP_RAZER_BLADE16_2025_PINS] = {
4438 .type = HDA_FIXUP_PINS,
4439 .v.pins = (const struct hda_pintbl[]) {
4440 { 0x14, 0x90170121 }, /* tweeter as internal speaker, seq 1 */
4441 { 0x17, 0x90170120 }, /* woofer as internal speaker, seq 0 */
4442 { }
4443 },
4444 .chained = true,
4445 .chain_id = ALC298_FIXUP_RAZER_BLADE16_2025,
4446 },
4447 [ALC298_FIXUP_RAZER_BLADE16_2025] = {
4448 .type = HDA_FIXUP_FUNC,
4449 .v.func = alc298_fixup_razer_blade16_2025,
4450 },
4451 [ALC233_FIXUP_WUJIE_SPEAKERS] = {
4452 .type = HDA_FIXUP_PINS,
4453 .v.pins = (const struct hda_pintbl[]) {
4454 { 0x1b, 0x90170150 }, /* internal speaker */
4455 { }
4456 },
4457 },
4458 [ALC269_FIXUP_GPIO2] = {
4459 .type = HDA_FIXUP_FUNC,
4460 .v.func = alc_fixup_gpio2,
4461 },
4462 [ALC269_FIXUP_SONY_VAIO] = {
4463 .type = HDA_FIXUP_PINCTLS,
4464 .v.pins = (const struct hda_pintbl[]) {
4465 {0x19, PIN_VREFGRD},
4466 {}
4467 }
4468 },
4469 [ALC275_FIXUP_SONY_VAIO_GPIO2] = {
4470 .type = HDA_FIXUP_FUNC,
4471 .v.func = alc275_fixup_gpio4_off,
4472 .chained = true,
4473 .chain_id = ALC269_FIXUP_SONY_VAIO
4474 },
4475 [ALC269_FIXUP_DELL_M101Z] = {
4476 .type = HDA_FIXUP_VERBS,
4477 .v.verbs = (const struct hda_verb[]) {
4478 /* Enables internal speaker */
4479 {0x20, AC_VERB_SET_COEF_INDEX, 13},
4480 {0x20, AC_VERB_SET_PROC_COEF, 0x4040},
4481 {}
4482 }
4483 },
4484 [ALC269_FIXUP_SKU_IGNORE] = {
4485 .type = HDA_FIXUP_FUNC,
4486 .v.func = alc_fixup_sku_ignore,
4487 },
4488 [ALC269_FIXUP_ASUS_G73JW] = {
4489 .type = HDA_FIXUP_PINS,
4490 .v.pins = (const struct hda_pintbl[]) {
4491 { 0x17, 0x99130111 }, /* subwoofer */
4492 { }
4493 }
4494 },
4495 [ALC269_FIXUP_ASUS_N7601ZM_PINS] = {
4496 .type = HDA_FIXUP_PINS,
4497 .v.pins = (const struct hda_pintbl[]) {
4498 { 0x19, 0x03A11050 },
4499 { 0x1a, 0x03A11C30 },
4500 { 0x21, 0x03211420 },
4501 { }
4502 }
4503 },
4504 [ALC269_FIXUP_ASUS_N7601ZM] = {
4505 .type = HDA_FIXUP_VERBS,
4506 .v.verbs = (const struct hda_verb[]) {
4507 {0x20, AC_VERB_SET_COEF_INDEX, 0x62},
4508 {0x20, AC_VERB_SET_PROC_COEF, 0xa007},
4509 {0x20, AC_VERB_SET_COEF_INDEX, 0x10},
4510 {0x20, AC_VERB_SET_PROC_COEF, 0x8420},
4511 {0x20, AC_VERB_SET_COEF_INDEX, 0x0f},
4512 {0x20, AC_VERB_SET_PROC_COEF, 0x7774},
4513 { }
4514 },
4515 .chained = true,
4516 .chain_id = ALC269_FIXUP_ASUS_N7601ZM_PINS,
4517 },
4518 [ALC269_FIXUP_LENOVO_EAPD] = {
4519 .type = HDA_FIXUP_VERBS,
4520 .v.verbs = (const struct hda_verb[]) {
4521 {0x14, AC_VERB_SET_EAPD_BTLENABLE, 0},
4522 {}
4523 }
4524 },
4525 [ALC275_FIXUP_SONY_HWEQ] = {
4526 .type = HDA_FIXUP_FUNC,
4527 .v.func = alc269_fixup_hweq,
4528 .chained = true,
4529 .chain_id = ALC275_FIXUP_SONY_VAIO_GPIO2
4530 },
4531 [ALC275_FIXUP_SONY_DISABLE_AAMIX] = {
4532 .type = HDA_FIXUP_FUNC,
4533 .v.func = alc_fixup_disable_aamix,
4534 .chained = true,
4535 .chain_id = ALC269_FIXUP_SONY_VAIO
4536 },
4537 [ALC271_FIXUP_DMIC] = {
4538 .type = HDA_FIXUP_FUNC,
4539 .v.func = alc271_fixup_dmic,
4540 },
4541 [ALC269_FIXUP_PCM_44K] = {
4542 .type = HDA_FIXUP_FUNC,
4543 .v.func = alc269_fixup_pcm_44k,
4544 .chained = true,
4545 .chain_id = ALC269_FIXUP_QUANTA_MUTE
4546 },
4547 [ALC269_FIXUP_STEREO_DMIC] = {
4548 .type = HDA_FIXUP_FUNC,
4549 .v.func = alc269_fixup_stereo_dmic,
4550 },
4551 [ALC269_FIXUP_HEADSET_MIC] = {
4552 .type = HDA_FIXUP_FUNC,
4553 .v.func = alc_fixup_headset_mic,
4554 },
4555 [ALC269_FIXUP_QUANTA_MUTE] = {
4556 .type = HDA_FIXUP_FUNC,
4557 .v.func = alc269_fixup_quanta_mute,
4558 },
4559 [ALC269_FIXUP_LIFEBOOK] = {
4560 .type = HDA_FIXUP_PINS,
4561 .v.pins = (const struct hda_pintbl[]) {
4562 { 0x1a, 0x2101103f }, /* dock line-out */
4563 { 0x1b, 0x23a11040 }, /* dock mic-in */
4564 { }
4565 },
4566 .chained = true,
4567 .chain_id = ALC269_FIXUP_QUANTA_MUTE
4568 },
4569 [ALC269_FIXUP_LIFEBOOK_EXTMIC] = {
4570 .type = HDA_FIXUP_PINS,
4571 .v.pins = (const struct hda_pintbl[]) {
4572 { 0x19, 0x01a1903c }, /* headset mic, with jack detect */
4573 { }
4574 },
4575 },
4576 [ALC269_FIXUP_LIFEBOOK_HP_PIN] = {
4577 .type = HDA_FIXUP_PINS,
4578 .v.pins = (const struct hda_pintbl[]) {
4579 { 0x21, 0x0221102f }, /* HP out */
4580 { }
4581 },
4582 },
4583 [ALC269_FIXUP_LIFEBOOK_NO_HP_TO_LINEOUT] = {
4584 .type = HDA_FIXUP_FUNC,
4585 .v.func = alc269_fixup_pincfg_no_hp_to_lineout,
4586 },
4587 [ALC255_FIXUP_LIFEBOOK_U7x7_HEADSET_MIC] = {
4588 .type = HDA_FIXUP_FUNC,
4589 .v.func = alc269_fixup_pincfg_U7x7_headset_mic,
4590 },
4591 [ALC269VB_FIXUP_INFINIX_ZERO_BOOK_13] = {
4592 .type = HDA_FIXUP_PINS,
4593 .v.pins = (const struct hda_pintbl[]) {
4594 { 0x14, 0x90170151 }, /* use as internal speaker (LFE) */
4595 { 0x1b, 0x90170152 }, /* use as internal speaker (back) */
4596 { }
4597 },
4598 .chained = true,
4599 .chain_id = ALC269_FIXUP_LIMIT_INT_MIC_BOOST
4600 },
4601 [ALC269VC_FIXUP_INFINIX_Y4_MAX] = {
4602 .type = HDA_FIXUP_PINS,
4603 .v.pins = (const struct hda_pintbl[]) {
4604 { 0x1b, 0x90170150 }, /* use as internal speaker */
4605 { }
4606 },
4607 .chained = true,
4608 .chain_id = ALC269_FIXUP_LIMIT_INT_MIC_BOOST
4609 },
4610 [ALC269VB_FIXUP_INFINIX_INBOOK_X3_SLIM] = {
4611 .type = HDA_FIXUP_PINS,
4612 .v.pins = (const struct hda_pintbl[]) {
4613 { 0x14, 0x411111f0 }, /* disable, not connected */
4614 { 0x1b, 0x90170110 }, /* use as internal speaker */
4615 { }
4616 },
4617 },
4618 [ALC269VC_FIXUP_LUNNEN_GROUND_14] = {
4619 .type = HDA_FIXUP_PINS,
4620 .v.pins = (const struct hda_pintbl[]) {
4621 { 0x1b, 0x90170150 }, /* internal speaker */
4622 { }
4623 },
4624 },
4625 [ALC269VB_FIXUP_CHUWI_COREBOOK_XPRO] = {
4626 .type = HDA_FIXUP_PINS,
4627 .v.pins = (const struct hda_pintbl[]) {
4628 { 0x18, 0x03a19020 }, /* headset mic */
4629 { 0x1b, 0x90170150 }, /* speaker */
4630 { }
4631 },
4632 },
4633 [ALC269_FIXUP_AMIC] = {
4634 .type = HDA_FIXUP_PINS,
4635 .v.pins = (const struct hda_pintbl[]) {
4636 { 0x14, 0x99130110 }, /* speaker */
4637 { 0x15, 0x0121401f }, /* HP out */
4638 { 0x18, 0x01a19c20 }, /* mic */
4639 { 0x19, 0x99a3092f }, /* int-mic */
4640 { }
4641 },
4642 },
4643 [ALC269_FIXUP_DMIC] = {
4644 .type = HDA_FIXUP_PINS,
4645 .v.pins = (const struct hda_pintbl[]) {
4646 { 0x12, 0x99a3092f }, /* int-mic */
4647 { 0x14, 0x99130110 }, /* speaker */
4648 { 0x15, 0x0121401f }, /* HP out */
4649 { 0x18, 0x01a19c20 }, /* mic */
4650 { }
4651 },
4652 },
4653 [ALC269VB_FIXUP_AMIC] = {
4654 .type = HDA_FIXUP_PINS,
4655 .v.pins = (const struct hda_pintbl[]) {
4656 { 0x14, 0x99130110 }, /* speaker */
4657 { 0x18, 0x01a19c20 }, /* mic */
4658 { 0x19, 0x99a3092f }, /* int-mic */
4659 { 0x21, 0x0121401f }, /* HP out */
4660 { }
4661 },
4662 },
4663 [ALC269VB_FIXUP_DMIC] = {
4664 .type = HDA_FIXUP_PINS,
4665 .v.pins = (const struct hda_pintbl[]) {
4666 { 0x12, 0x99a3092f }, /* int-mic */
4667 { 0x14, 0x99130110 }, /* speaker */
4668 { 0x18, 0x01a19c20 }, /* mic */
4669 { 0x21, 0x0121401f }, /* HP out */
4670 { }
4671 },
4672 },
4673 [ALC269_FIXUP_HP_MUTE_LED] = {
4674 .type = HDA_FIXUP_FUNC,
4675 .v.func = alc269_fixup_hp_mute_led,
4676 },
4677 [ALC269_FIXUP_HP_MUTE_LED_MIC1] = {
4678 .type = HDA_FIXUP_FUNC,
4679 .v.func = alc269_fixup_hp_mute_led_mic1,
4680 },
4681 [ALC269_FIXUP_HP_MUTE_LED_MIC2] = {
4682 .type = HDA_FIXUP_FUNC,
4683 .v.func = alc269_fixup_hp_mute_led_mic2,
4684 },
4685 [ALC269_FIXUP_HP_MUTE_LED_MIC3] = {
4686 .type = HDA_FIXUP_FUNC,
4687 .v.func = alc269_fixup_hp_mute_led_mic3,
4688 .chained = true,
4689 .chain_id = ALC295_FIXUP_HP_AUTO_MUTE
4690 },
4691 [ALC269_FIXUP_HP_GPIO_LED] = {
4692 .type = HDA_FIXUP_FUNC,
4693 .v.func = alc269_fixup_hp_gpio_led,
4694 },
4695 [ALC269_FIXUP_HP_GPIO_MIC1_LED] = {
4696 .type = HDA_FIXUP_FUNC,
4697 .v.func = alc269_fixup_hp_gpio_mic1_led,
4698 },
4699 [ALC269_FIXUP_HP_LINE1_MIC1_LED] = {
4700 .type = HDA_FIXUP_FUNC,
4701 .v.func = alc269_fixup_hp_line1_mic1_led,
4702 },
4703 [ALC269_FIXUP_INV_DMIC] = {
4704 .type = HDA_FIXUP_FUNC,
4705 .v.func = alc_fixup_inv_dmic,
4706 },
4707 [ALC269_FIXUP_NO_SHUTUP] = {
4708 .type = HDA_FIXUP_FUNC,
4709 .v.func = alc_fixup_no_shutup,
4710 },
4711 [ALC269_FIXUP_LENOVO_DOCK] = {
4712 .type = HDA_FIXUP_PINS,
4713 .v.pins = (const struct hda_pintbl[]) {
4714 { 0x19, 0x23a11040 }, /* dock mic */
4715 { 0x1b, 0x2121103f }, /* dock headphone */
4716 { }
4717 },
4718 .chained = true,
4719 .chain_id = ALC269_FIXUP_PINCFG_NO_HP_TO_LINEOUT
4720 },
4721 [ALC269_FIXUP_LENOVO_DOCK_LIMIT_BOOST] = {
4722 .type = HDA_FIXUP_FUNC,
4723 .v.func = alc269_fixup_limit_int_mic_boost,
4724 .chained = true,
4725 .chain_id = ALC269_FIXUP_LENOVO_DOCK,
4726 },
4727 [ALC269_FIXUP_PINCFG_NO_HP_TO_LINEOUT] = {
4728 .type = HDA_FIXUP_FUNC,
4729 .v.func = alc269_fixup_pincfg_no_hp_to_lineout,
4730 .chained = true,
4731 .chain_id = ALC269_FIXUP_THINKPAD_ACPI,
4732 },
4733 [ALC269_FIXUP_DELL1_MIC_NO_PRESENCE] = {
4734 .type = HDA_FIXUP_PINS,
4735 .v.pins = (const struct hda_pintbl[]) {
4736 { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */
4737 { 0x1a, 0x01a1913d }, /* use as headphone mic, without its own jack detect */
4738 { }
4739 },
4740 .chained = true,
4741 .chain_id = ALC269_FIXUP_HEADSET_MODE
4742 },
4743 [ALC269_FIXUP_DELL1_LIMIT_INT_MIC_BOOST] = {
4744 .type = HDA_FIXUP_FUNC,
4745 .v.func = alc269_fixup_limit_int_mic_boost,
4746 .chained = true,
4747 .chain_id = ALC269_FIXUP_DELL1_MIC_NO_PRESENCE
4748 },
4749 [ALC269_FIXUP_DELL2_MIC_NO_PRESENCE] = {
4750 .type = HDA_FIXUP_PINS,
4751 .v.pins = (const struct hda_pintbl[]) {
4752 { 0x16, 0x21014020 }, /* dock line out */
4753 { 0x19, 0x21a19030 }, /* dock mic */
4754 { 0x1a, 0x01a1913c }, /* use as headset mic, without its own jack detect */
4755 { }
4756 },
4757 .chained = true,
4758 .chain_id = ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC
4759 },
4760 [ALC269_FIXUP_DELL3_MIC_NO_PRESENCE] = {
4761 .type = HDA_FIXUP_PINS,
4762 .v.pins = (const struct hda_pintbl[]) {
4763 { 0x1a, 0x01a1913c }, /* use as headset mic, without its own jack detect */
4764 { }
4765 },
4766 .chained = true,
4767 .chain_id = ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC
4768 },
4769 [ALC269_FIXUP_DELL4_MIC_NO_PRESENCE] = {
4770 .type = HDA_FIXUP_PINS,
4771 .v.pins = (const struct hda_pintbl[]) {
4772 { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */
4773 { 0x1b, 0x01a1913d }, /* use as headphone mic, without its own jack detect */
4774 { }
4775 },
4776 .chained = true,
4777 .chain_id = ALC269_FIXUP_HEADSET_MODE
4778 },
4779 [ALC269_FIXUP_HEADSET_MODE] = {
4780 .type = HDA_FIXUP_FUNC,
4781 .v.func = alc_fixup_headset_mode,
4782 .chained = true,
4783 .chain_id = ALC255_FIXUP_MIC_MUTE_LED
4784 },
4785 [ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC] = {
4786 .type = HDA_FIXUP_FUNC,
4787 .v.func = alc_fixup_headset_mode_no_hp_mic,
4788 },
4789 [ALC269_FIXUP_ASPIRE_HEADSET_MIC] = {
4790 .type = HDA_FIXUP_PINS,
4791 .v.pins = (const struct hda_pintbl[]) {
4792 { 0x19, 0x01a1913c }, /* headset mic w/o jack detect */
4793 { }
4794 },
4795 .chained = true,
4796 .chain_id = ALC269_FIXUP_HEADSET_MODE,
4797 },
4798 [ALC286_FIXUP_SONY_MIC_NO_PRESENCE] = {
4799 .type = HDA_FIXUP_PINS,
4800 .v.pins = (const struct hda_pintbl[]) {
4801 { 0x18, 0x01a1913c }, /* use as headset mic, without its own jack detect */
4802 { }
4803 },
4804 .chained = true,
4805 .chain_id = ALC269_FIXUP_HEADSET_MIC
4806 },
4807 [ALC256_FIXUP_HUAWEI_MACH_WX9_PINS] = {
4808 .type = HDA_FIXUP_PINS,
4809 .v.pins = (const struct hda_pintbl[]) {
4810 {0x12, 0x90a60130},
4811 {0x13, 0x40000000},
4812 {0x14, 0x90170110},
4813 {0x18, 0x411111f0},
4814 {0x19, 0x04a11040},
4815 {0x1a, 0x411111f0},
4816 {0x1b, 0x90170112},
4817 {0x1d, 0x40759a05},
4818 {0x1e, 0x411111f0},
4819 {0x21, 0x04211020},
4820 { }
4821 },
4822 .chained = true,
4823 .chain_id = ALC255_FIXUP_MIC_MUTE_LED
4824 },
4825 [ALC298_FIXUP_HUAWEI_MBX_STEREO] = {
4826 .type = HDA_FIXUP_FUNC,
4827 .v.func = alc298_fixup_huawei_mbx_stereo,
4828 .chained = true,
4829 .chain_id = ALC255_FIXUP_MIC_MUTE_LED
4830 },
4831 [ALC269_FIXUP_ASUS_X101_FUNC] = {
4832 .type = HDA_FIXUP_FUNC,
4833 .v.func = alc269_fixup_x101_headset_mic,
4834 },
4835 [ALC269_FIXUP_ASUS_X101_VERB] = {
4836 .type = HDA_FIXUP_VERBS,
4837 .v.verbs = (const struct hda_verb[]) {
4838 {0x18, AC_VERB_SET_PIN_WIDGET_CONTROL, 0},
4839 {0x20, AC_VERB_SET_COEF_INDEX, 0x08},
4840 {0x20, AC_VERB_SET_PROC_COEF, 0x0310},
4841 { }
4842 },
4843 .chained = true,
4844 .chain_id = ALC269_FIXUP_ASUS_X101_FUNC
4845 },
4846 [ALC269_FIXUP_ASUS_X101] = {
4847 .type = HDA_FIXUP_PINS,
4848 .v.pins = (const struct hda_pintbl[]) {
4849 { 0x18, 0x04a1182c }, /* Headset mic */
4850 { }
4851 },
4852 .chained = true,
4853 .chain_id = ALC269_FIXUP_ASUS_X101_VERB
4854 },
4855 [ALC271_FIXUP_AMIC_MIC2] = {
4856 .type = HDA_FIXUP_PINS,
4857 .v.pins = (const struct hda_pintbl[]) {
4858 { 0x14, 0x99130110 }, /* speaker */
4859 { 0x19, 0x01a19c20 }, /* mic */
4860 { 0x1b, 0x99a7012f }, /* int-mic */
4861 { 0x21, 0x0121401f }, /* HP out */
4862 { }
4863 },
4864 },
4865 [ALC271_FIXUP_HP_GATE_MIC_JACK] = {
4866 .type = HDA_FIXUP_FUNC,
4867 .v.func = alc271_hp_gate_mic_jack,
4868 .chained = true,
4869 .chain_id = ALC271_FIXUP_AMIC_MIC2,
4870 },
4871 [ALC271_FIXUP_HP_GATE_MIC_JACK_E1_572] = {
4872 .type = HDA_FIXUP_FUNC,
4873 .v.func = alc269_fixup_limit_int_mic_boost,
4874 .chained = true,
4875 .chain_id = ALC271_FIXUP_HP_GATE_MIC_JACK,
4876 },
4877 [ALC269_FIXUP_ACER_AC700] = {
4878 .type = HDA_FIXUP_PINS,
4879 .v.pins = (const struct hda_pintbl[]) {
4880 { 0x12, 0x99a3092f }, /* int-mic */
4881 { 0x14, 0x99130110 }, /* speaker */
4882 { 0x18, 0x03a11c20 }, /* mic */
4883 { 0x1e, 0x0346101e }, /* SPDIF1 */
4884 { 0x21, 0x0321101f }, /* HP out */
4885 { }
4886 },
4887 .chained = true,
4888 .chain_id = ALC271_FIXUP_DMIC,
4889 },
4890 [ALC269_FIXUP_LIMIT_INT_MIC_BOOST] = {
4891 .type = HDA_FIXUP_FUNC,
4892 .v.func = alc269_fixup_limit_int_mic_boost
4893 },
4894 [ALC269_FIXUP_THINKPAD_LIMIT_INT_MIC_BOOST] = {
4895 .type = HDA_FIXUP_FUNC,
4896 .v.func = alc269_fixup_limit_int_mic_boost,
4897 .chained = true,
4898 .chain_id = ALC269_FIXUP_THINKPAD_ACPI,
4899 },
4900 [ALC269VB_FIXUP_ASUS_ZENBOOK] = {
4901 .type = HDA_FIXUP_FUNC,
4902 .v.func = alc269_fixup_limit_int_mic_boost,
4903 .chained = true,
4904 .chain_id = ALC269VB_FIXUP_DMIC,
4905 },
4906 [ALC269VB_FIXUP_ASUS_ZENBOOK_UX31A] = {
4907 .type = HDA_FIXUP_VERBS,
4908 .v.verbs = (const struct hda_verb[]) {
4909 /* class-D output amp +5dB */
4910 { 0x20, AC_VERB_SET_COEF_INDEX, 0x12 },
4911 { 0x20, AC_VERB_SET_PROC_COEF, 0x2800 },
4912 {}
4913 },
4914 .chained = true,
4915 .chain_id = ALC269VB_FIXUP_ASUS_ZENBOOK,
4916 },
4917 [ALC269VB_FIXUP_ASUS_MIC_NO_PRESENCE] = {
4918 .type = HDA_FIXUP_PINS,
4919 .v.pins = (const struct hda_pintbl[]) {
4920 { 0x18, 0x01a110f0 }, /* use as headset mic */
4921 { }
4922 },
4923 .chained = true,
4924 .chain_id = ALC269_FIXUP_HEADSET_MIC
4925 },
4926 [ALC269_FIXUP_LIMIT_INT_MIC_BOOST_MUTE_LED] = {
4927 .type = HDA_FIXUP_FUNC,
4928 .v.func = alc269_fixup_limit_int_mic_boost,
4929 .chained = true,
4930 .chain_id = ALC269_FIXUP_HP_MUTE_LED_MIC1,
4931 },
4932 [ALC269VB_FIXUP_ORDISSIMO_EVE2] = {
4933 .type = HDA_FIXUP_PINS,
4934 .v.pins = (const struct hda_pintbl[]) {
4935 { 0x12, 0x99a3092f }, /* int-mic */
4936 { 0x18, 0x03a11d20 }, /* mic */
4937 { 0x19, 0x411111f0 }, /* Unused bogus pin */
4938 { }
4939 },
4940 },
4941 [ALC283_FIXUP_CHROME_BOOK] = {
4942 .type = HDA_FIXUP_FUNC,
4943 .v.func = alc283_fixup_chromebook,
4944 },
4945 [ALC283_FIXUP_SENSE_COMBO_JACK] = {
4946 .type = HDA_FIXUP_FUNC,
4947 .v.func = alc283_fixup_sense_combo_jack,
4948 .chained = true,
4949 .chain_id = ALC283_FIXUP_CHROME_BOOK,
4950 },
4951 [ALC282_FIXUP_ASUS_TX300] = {
4952 .type = HDA_FIXUP_FUNC,
4953 .v.func = alc282_fixup_asus_tx300,
4954 },
4955 [ALC283_FIXUP_INT_MIC] = {
4956 .type = HDA_FIXUP_VERBS,
4957 .v.verbs = (const struct hda_verb[]) {
4958 {0x20, AC_VERB_SET_COEF_INDEX, 0x1a},
4959 {0x20, AC_VERB_SET_PROC_COEF, 0x0011},
4960 { }
4961 },
4962 .chained = true,
4963 .chain_id = ALC269_FIXUP_LIMIT_INT_MIC_BOOST
4964 },
4965 [ALC290_FIXUP_SUBWOOFER_HSJACK] = {
4966 .type = HDA_FIXUP_PINS,
4967 .v.pins = (const struct hda_pintbl[]) {
4968 { 0x17, 0x90170112 }, /* subwoofer */
4969 { }
4970 },
4971 .chained = true,
4972 .chain_id = ALC290_FIXUP_MONO_SPEAKERS_HSJACK,
4973 },
4974 [ALC290_FIXUP_SUBWOOFER] = {
4975 .type = HDA_FIXUP_PINS,
4976 .v.pins = (const struct hda_pintbl[]) {
4977 { 0x17, 0x90170112 }, /* subwoofer */
4978 { }
4979 },
4980 .chained = true,
4981 .chain_id = ALC290_FIXUP_MONO_SPEAKERS,
4982 },
4983 [ALC290_FIXUP_MONO_SPEAKERS] = {
4984 .type = HDA_FIXUP_FUNC,
4985 .v.func = alc290_fixup_mono_speakers,
4986 },
4987 [ALC290_FIXUP_MONO_SPEAKERS_HSJACK] = {
4988 .type = HDA_FIXUP_FUNC,
4989 .v.func = alc290_fixup_mono_speakers,
4990 .chained = true,
4991 .chain_id = ALC269_FIXUP_DELL3_MIC_NO_PRESENCE,
4992 },
4993 [ALC269_FIXUP_THINKPAD_ACPI] = {
4994 .type = HDA_FIXUP_FUNC,
4995 .v.func = alc_fixup_thinkpad_acpi,
4996 .chained = true,
4997 .chain_id = ALC269_FIXUP_SKU_IGNORE,
4998 },
4999 [ALC269_FIXUP_LENOVO_XPAD_ACPI] = {
5000 .type = HDA_FIXUP_FUNC,
5001 .v.func = alc_fixup_ideapad_acpi,
5002 .chained = true,
5003 .chain_id = ALC269_FIXUP_THINKPAD_ACPI,
5004 },
5005 [ALC269_FIXUP_DMIC_THINKPAD_ACPI] = {
5006 .type = HDA_FIXUP_FUNC,
5007 .v.func = alc_fixup_inv_dmic,
5008 .chained = true,
5009 .chain_id = ALC269_FIXUP_THINKPAD_ACPI,
5010 },
5011 [ALC255_FIXUP_ACER_MIC_NO_PRESENCE] = {
5012 .type = HDA_FIXUP_PINS,
5013 .v.pins = (const struct hda_pintbl[]) {
5014 { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */
5015 { }
5016 },
5017 .chained = true,
5018 .chain_id = ALC255_FIXUP_HEADSET_MODE
5019 },
5020 [ALC255_FIXUP_ASUS_MIC_NO_PRESENCE] = {
5021 .type = HDA_FIXUP_PINS,
5022 .v.pins = (const struct hda_pintbl[]) {
5023 { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */
5024 { }
5025 },
5026 .chained = true,
5027 .chain_id = ALC255_FIXUP_HEADSET_MODE
5028 },
5029 [ALC255_FIXUP_DELL1_MIC_NO_PRESENCE] = {
5030 .type = HDA_FIXUP_PINS,
5031 .v.pins = (const struct hda_pintbl[]) {
5032 { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */
5033 { 0x1a, 0x01a1913d }, /* use as headphone mic, without its own jack detect */
5034 { }
5035 },
5036 .chained = true,
5037 .chain_id = ALC255_FIXUP_HEADSET_MODE
5038 },
5039 [ALC255_FIXUP_DELL1_LIMIT_INT_MIC_BOOST] = {
5040 .type = HDA_FIXUP_FUNC,
5041 .v.func = alc269_fixup_limit_int_mic_boost,
5042 .chained = true,
5043 .chain_id = ALC255_FIXUP_DELL1_MIC_NO_PRESENCE
5044 },
5045 [ALC255_FIXUP_DELL2_MIC_NO_PRESENCE] = {
5046 .type = HDA_FIXUP_PINS,
5047 .v.pins = (const struct hda_pintbl[]) {
5048 { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */
5049 { }
5050 },
5051 .chained = true,
5052 .chain_id = ALC255_FIXUP_HEADSET_MODE_NO_HP_MIC
5053 },
5054 [ALC255_FIXUP_HEADSET_MODE] = {
5055 .type = HDA_FIXUP_FUNC,
5056 .v.func = alc_fixup_headset_mode_alc255,
5057 .chained = true,
5058 .chain_id = ALC255_FIXUP_MIC_MUTE_LED
5059 },
5060 [ALC255_FIXUP_HEADSET_MODE_NO_HP_MIC] = {
5061 .type = HDA_FIXUP_FUNC,
5062 .v.func = alc_fixup_headset_mode_alc255_no_hp_mic,
5063 },
5064 [ALC293_FIXUP_DELL1_MIC_NO_PRESENCE] = {
5065 .type = HDA_FIXUP_PINS,
5066 .v.pins = (const struct hda_pintbl[]) {
5067 { 0x18, 0x01a1913d }, /* use as headphone mic, without its own jack detect */
5068 { 0x1a, 0x01a1913c }, /* use as headset mic, without its own jack detect */
5069 { }
5070 },
5071 .chained = true,
5072 .chain_id = ALC269_FIXUP_HEADSET_MODE
5073 },
5074 [ALC292_FIXUP_TPT440_DOCK] = {
5075 .type = HDA_FIXUP_FUNC,
5076 .v.func = alc_fixup_tpt440_dock,
5077 .chained = true,
5078 .chain_id = ALC269_FIXUP_LIMIT_INT_MIC_BOOST
5079 },
5080 [ALC292_FIXUP_TPT440] = {
5081 .type = HDA_FIXUP_FUNC,
5082 .v.func = alc_fixup_disable_aamix,
5083 .chained = true,
5084 .chain_id = ALC292_FIXUP_TPT440_DOCK,
5085 },
5086 [ALC283_FIXUP_HEADSET_MIC] = {
5087 .type = HDA_FIXUP_PINS,
5088 .v.pins = (const struct hda_pintbl[]) {
5089 { 0x19, 0x04a110f0 },
5090 { },
5091 },
5092 },
5093 [ALC255_FIXUP_MIC_MUTE_LED] = {
5094 .type = HDA_FIXUP_FUNC,
5095 .v.func = alc_fixup_micmute_led,
5096 },
5097 [ALC282_FIXUP_ASPIRE_V5_PINS] = {
5098 .type = HDA_FIXUP_PINS,
5099 .v.pins = (const struct hda_pintbl[]) {
5100 { 0x12, 0x90a60130 },
5101 { 0x14, 0x90170110 },
5102 { 0x17, 0x40000008 },
5103 { 0x18, 0x411111f0 },
5104 { 0x19, 0x01a1913c },
5105 { 0x1a, 0x411111f0 },
5106 { 0x1b, 0x411111f0 },
5107 { 0x1d, 0x40f89b2d },
5108 { 0x1e, 0x411111f0 },
5109 { 0x21, 0x0321101f },
5110 { },
5111 },
5112 },
5113 [ALC269VB_FIXUP_ASPIRE_E1_COEF] = {
5114 .type = HDA_FIXUP_FUNC,
5115 .v.func = alc269vb_fixup_aspire_e1_coef,
5116 },
5117 [ALC280_FIXUP_HP_GPIO4] = {
5118 .type = HDA_FIXUP_FUNC,
5119 .v.func = alc280_fixup_hp_gpio4,
5120 },
5121 [ALC286_FIXUP_HP_GPIO_LED] = {
5122 .type = HDA_FIXUP_FUNC,
5123 .v.func = alc286_fixup_hp_gpio_led,
5124 },
5125 [ALC280_FIXUP_HP_GPIO2_MIC_HOTKEY] = {
5126 .type = HDA_FIXUP_FUNC,
5127 .v.func = alc280_fixup_hp_gpio2_mic_hotkey,
5128 },
5129 [ALC280_FIXUP_HP_DOCK_PINS] = {
5130 .type = HDA_FIXUP_PINS,
5131 .v.pins = (const struct hda_pintbl[]) {
5132 { 0x1b, 0x21011020 }, /* line-out */
5133 { 0x1a, 0x01a1903c }, /* headset mic */
5134 { 0x18, 0x2181103f }, /* line-in */
5135 { },
5136 },
5137 .chained = true,
5138 .chain_id = ALC280_FIXUP_HP_GPIO4
5139 },
5140 [ALC269_FIXUP_HP_DOCK_GPIO_MIC1_LED] = {
5141 .type = HDA_FIXUP_PINS,
5142 .v.pins = (const struct hda_pintbl[]) {
5143 { 0x1b, 0x21011020 }, /* line-out */
5144 { 0x18, 0x2181103f }, /* line-in */
5145 { },
5146 },
5147 .chained = true,
5148 .chain_id = ALC269_FIXUP_HP_GPIO_MIC1_LED
5149 },
5150 [ALC280_FIXUP_HP_9480M] = {
5151 .type = HDA_FIXUP_FUNC,
5152 .v.func = alc280_fixup_hp_9480m,
5153 },
5154 [ALC245_FIXUP_HP_X360_AMP] = {
5155 .type = HDA_FIXUP_FUNC,
5156 .v.func = alc245_fixup_hp_x360_amp,
5157 .chained = true,
5158 .chain_id = ALC245_FIXUP_HP_GPIO_LED
5159 },
5160 [ALC288_FIXUP_DELL_HEADSET_MODE] = {
5161 .type = HDA_FIXUP_FUNC,
5162 .v.func = alc_fixup_headset_mode_dell_alc288,
5163 .chained = true,
5164 .chain_id = ALC255_FIXUP_MIC_MUTE_LED
5165 },
5166 [ALC288_FIXUP_DELL1_MIC_NO_PRESENCE] = {
5167 .type = HDA_FIXUP_PINS,
5168 .v.pins = (const struct hda_pintbl[]) {
5169 { 0x18, 0x01a1913c }, /* use as headset mic, without its own jack detect */
5170 { 0x1a, 0x01a1913d }, /* use as headphone mic, without its own jack detect */
5171 { }
5172 },
5173 .chained = true,
5174 .chain_id = ALC288_FIXUP_DELL_HEADSET_MODE
5175 },
5176 [ALC288_FIXUP_DISABLE_AAMIX] = {
5177 .type = HDA_FIXUP_FUNC,
5178 .v.func = alc_fixup_disable_aamix,
5179 .chained = true,
5180 .chain_id = ALC288_FIXUP_DELL1_MIC_NO_PRESENCE
5181 },
5182 [ALC288_FIXUP_DELL_XPS_13] = {
5183 .type = HDA_FIXUP_FUNC,
5184 .v.func = alc_fixup_dell_xps13,
5185 .chained = true,
5186 .chain_id = ALC288_FIXUP_DISABLE_AAMIX
5187 },
5188 [ALC292_FIXUP_DISABLE_AAMIX] = {
5189 .type = HDA_FIXUP_FUNC,
5190 .v.func = alc_fixup_disable_aamix,
5191 .chained = true,
5192 .chain_id = ALC269_FIXUP_DELL2_MIC_NO_PRESENCE
5193 },
5194 [ALC293_FIXUP_DISABLE_AAMIX_MULTIJACK] = {
5195 .type = HDA_FIXUP_FUNC,
5196 .v.func = alc_fixup_disable_aamix,
5197 .chained = true,
5198 .chain_id = ALC293_FIXUP_DELL1_MIC_NO_PRESENCE
5199 },
5200 [ALC292_FIXUP_DELL_E7X_AAMIX] = {
5201 .type = HDA_FIXUP_FUNC,
5202 .v.func = alc_fixup_dell_xps13,
5203 .chained = true,
5204 .chain_id = ALC292_FIXUP_DISABLE_AAMIX
5205 },
5206 [ALC292_FIXUP_DELL_E7X] = {
5207 .type = HDA_FIXUP_FUNC,
5208 .v.func = alc_fixup_micmute_led,
5209 /* micmute fixup must be applied at last */
5210 .chained_before = true,
5211 .chain_id = ALC292_FIXUP_DELL_E7X_AAMIX,
5212 },
5213 [ALC298_FIXUP_ALIENWARE_MIC_NO_PRESENCE] = {
5214 .type = HDA_FIXUP_PINS,
5215 .v.pins = (const struct hda_pintbl[]) {
5216 { 0x18, 0x01a1913c }, /* headset mic w/o jack detect */
5217 { }
5218 },
5219 .chained_before = true,
5220 .chain_id = ALC269_FIXUP_HEADSET_MODE,
5221 },
5222 [ALC298_FIXUP_DELL1_MIC_NO_PRESENCE] = {
5223 .type = HDA_FIXUP_PINS,
5224 .v.pins = (const struct hda_pintbl[]) {
5225 { 0x18, 0x01a1913c }, /* use as headset mic, without its own jack detect */
5226 { 0x1a, 0x01a1913d }, /* use as headphone mic, without its own jack detect */
5227 { }
5228 },
5229 .chained = true,
5230 .chain_id = ALC269_FIXUP_HEADSET_MODE
5231 },
5232 [ALC298_FIXUP_DELL_AIO_MIC_NO_PRESENCE] = {
5233 .type = HDA_FIXUP_PINS,
5234 .v.pins = (const struct hda_pintbl[]) {
5235 { 0x18, 0x01a1913c }, /* use as headset mic, without its own jack detect */
5236 { }
5237 },
5238 .chained = true,
5239 .chain_id = ALC269_FIXUP_HEADSET_MODE
5240 },
5241 [ALC275_FIXUP_DELL_XPS] = {
5242 .type = HDA_FIXUP_VERBS,
5243 .v.verbs = (const struct hda_verb[]) {
5244 /* Enables internal speaker */
5245 {0x20, AC_VERB_SET_COEF_INDEX, 0x1f},
5246 {0x20, AC_VERB_SET_PROC_COEF, 0x00c0},
5247 {0x20, AC_VERB_SET_COEF_INDEX, 0x30},
5248 {0x20, AC_VERB_SET_PROC_COEF, 0x00b1},
5249 {}
5250 }
5251 },
5252 [ALC293_FIXUP_LENOVO_SPK_NOISE] = {
5253 .type = HDA_FIXUP_FUNC,
5254 .v.func = alc_fixup_disable_aamix,
5255 .chained = true,
5256 .chain_id = ALC269_FIXUP_THINKPAD_ACPI
5257 },
5258 [ALC233_FIXUP_LENOVO_LINE2_MIC_HOTKEY] = {
5259 .type = HDA_FIXUP_FUNC,
5260 .v.func = alc233_fixup_lenovo_line2_mic_hotkey,
5261 },
5262 [ALC233_FIXUP_LENOVO_L2MH_LOW_ENLED] = {
5263 .type = HDA_FIXUP_FUNC,
5264 .v.func = alc233_fixup_lenovo_low_en_micmute_led,
5265 },
5266 [ALC233_FIXUP_INTEL_NUC8_DMIC] = {
5267 .type = HDA_FIXUP_FUNC,
5268 .v.func = alc_fixup_inv_dmic,
5269 .chained = true,
5270 .chain_id = ALC269_FIXUP_LIMIT_INT_MIC_BOOST,
5271 },
5272 [ALC255_FIXUP_DELL_SPK_NOISE] = {
5273 .type = HDA_FIXUP_FUNC,
5274 .v.func = alc_fixup_disable_aamix,
5275 .chained = true,
5276 .chain_id = ALC255_FIXUP_DELL1_MIC_NO_PRESENCE
5277 },
5278 [ALC225_FIXUP_DISABLE_MIC_VREF] = {
5279 .type = HDA_FIXUP_FUNC,
5280 .v.func = alc_fixup_disable_mic_vref,
5281 .chained = true,
5282 .chain_id = ALC269_FIXUP_DELL1_MIC_NO_PRESENCE
5283 },
5284 [ALC225_FIXUP_DELL1_MIC_NO_PRESENCE] = {
5285 .type = HDA_FIXUP_VERBS,
5286 .v.verbs = (const struct hda_verb[]) {
5287 /* Disable pass-through path for FRONT 14h */
5288 { 0x20, AC_VERB_SET_COEF_INDEX, 0x36 },
5289 { 0x20, AC_VERB_SET_PROC_COEF, 0x57d7 },
5290 {}
5291 },
5292 .chained = true,
5293 .chain_id = ALC225_FIXUP_DISABLE_MIC_VREF
5294 },
5295 [ALC280_FIXUP_HP_HEADSET_MIC] = {
5296 .type = HDA_FIXUP_FUNC,
5297 .v.func = alc_fixup_disable_aamix,
5298 .chained = true,
5299 .chain_id = ALC269_FIXUP_HEADSET_MIC,
5300 },
5301 [ALC221_FIXUP_HP_FRONT_MIC] = {
5302 .type = HDA_FIXUP_PINS,
5303 .v.pins = (const struct hda_pintbl[]) {
5304 { 0x19, 0x02a19020 }, /* Front Mic */
5305 { }
5306 },
5307 },
5308 [ALC292_FIXUP_TPT460] = {
5309 .type = HDA_FIXUP_FUNC,
5310 .v.func = alc_fixup_tpt440_dock,
5311 .chained = true,
5312 .chain_id = ALC293_FIXUP_LENOVO_SPK_NOISE,
5313 },
5314 [ALC298_FIXUP_SPK_VOLUME] = {
5315 .type = HDA_FIXUP_FUNC,
5316 .v.func = alc298_fixup_speaker_volume,
5317 .chained = true,
5318 .chain_id = ALC298_FIXUP_DELL_AIO_MIC_NO_PRESENCE,
5319 },
5320 [ALC298_FIXUP_LENOVO_SPK_VOLUME] = {
5321 .type = HDA_FIXUP_FUNC,
5322 .v.func = alc298_fixup_speaker_volume,
5323 },
5324 [ALC295_FIXUP_DISABLE_DAC3] = {
5325 .type = HDA_FIXUP_FUNC,
5326 .v.func = alc295_fixup_disable_dac3,
5327 },
5328 [ALC285_FIXUP_SPEAKER2_TO_DAC1] = {
5329 .type = HDA_FIXUP_FUNC,
5330 .v.func = alc285_fixup_speaker2_to_dac1,
5331 },
5332 [ALC285_FIXUP_YOGA_SPEAKER2_TO_DAC1] = {
5333 .type = HDA_FIXUP_FUNC,
5334 .v.func = alc285_fixup_speaker2_to_dac1,
5335 .chained = true,
5336 .chain_id = ALC269_FIXUP_THINKPAD_ACPI
5337 },
5338 [ALC285_FIXUP_ASUS_SPEAKER2_TO_DAC1] = {
5339 .type = HDA_FIXUP_FUNC,
5340 .v.func = alc285_fixup_speaker2_to_dac1,
5341 .chained = true,
5342 .chain_id = ALC245_FIXUP_CS35L41_SPI_2
5343 },
5344 [ALC285_FIXUP_ASUS_HEADSET_MIC] = {
5345 .type = HDA_FIXUP_PINS,
5346 .v.pins = (const struct hda_pintbl[]) {
5347 { 0x19, 0x03a11050 },
5348 { 0x1b, 0x03a11c30 },
5349 { }
5350 },
5351 .chained = true,
5352 .chain_id = ALC285_FIXUP_ASUS_SPEAKER2_TO_DAC1
5353 },
5354 [ALC285_FIXUP_ASUS_SPI_REAR_SPEAKERS] = {
5355 .type = HDA_FIXUP_PINS,
5356 .v.pins = (const struct hda_pintbl[]) {
5357 { 0x14, 0x90170120 },
5358 { }
5359 },
5360 .chained = true,
5361 .chain_id = ALC285_FIXUP_ASUS_HEADSET_MIC
5362 },
5363 [ALC285_FIXUP_ASUS_I2C_SPEAKER2_TO_DAC1] = {
5364 .type = HDA_FIXUP_FUNC,
5365 .v.func = alc285_fixup_speaker2_to_dac1,
5366 .chained = true,
5367 .chain_id = ALC287_FIXUP_CS35L41_I2C_2
5368 },
5369 [ALC285_FIXUP_ASUS_I2C_HEADSET_MIC] = {
5370 .type = HDA_FIXUP_PINS,
5371 .v.pins = (const struct hda_pintbl[]) {
5372 { 0x19, 0x03a11050 },
5373 { 0x1b, 0x03a11c30 },
5374 { }
5375 },
5376 .chained = true,
5377 .chain_id = ALC285_FIXUP_ASUS_I2C_SPEAKER2_TO_DAC1
5378 },
5379 [ALC256_FIXUP_DELL_INSPIRON_7559_SUBWOOFER] = {
5380 .type = HDA_FIXUP_PINS,
5381 .v.pins = (const struct hda_pintbl[]) {
5382 { 0x1b, 0x90170151 },
5383 { }
5384 },
5385 .chained = true,
5386 .chain_id = ALC255_FIXUP_DELL1_MIC_NO_PRESENCE
5387 },
5388 [ALC269_FIXUP_ATIV_BOOK_8] = {
5389 .type = HDA_FIXUP_FUNC,
5390 .v.func = alc_fixup_auto_mute_via_amp,
5391 .chained = true,
5392 .chain_id = ALC269_FIXUP_NO_SHUTUP
5393 },
5394 [ALC221_FIXUP_HP_288PRO_MIC_NO_PRESENCE] = {
5395 .type = HDA_FIXUP_PINS,
5396 .v.pins = (const struct hda_pintbl[]) {
5397 { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */
5398 { 0x1a, 0x01813030 }, /* use as headphone mic, without its own jack detect */
5399 { }
5400 },
5401 .chained = true,
5402 .chain_id = ALC269_FIXUP_HEADSET_MODE
5403 },
5404 [ALC221_FIXUP_HP_MIC_NO_PRESENCE] = {
5405 .type = HDA_FIXUP_PINS,
5406 .v.pins = (const struct hda_pintbl[]) {
5407 { 0x18, 0x01a1913c }, /* use as headset mic, without its own jack detect */
5408 { 0x1a, 0x01a1913d }, /* use as headphone mic, without its own jack detect */
5409 { }
5410 },
5411 .chained = true,
5412 .chain_id = ALC269_FIXUP_HEADSET_MODE
5413 },
5414 [ALC256_FIXUP_ASUS_HEADSET_MODE] = {
5415 .type = HDA_FIXUP_FUNC,
5416 .v.func = alc_fixup_headset_mode,
5417 },
5418 [ALC256_FIXUP_ASUS_MIC] = {
5419 .type = HDA_FIXUP_PINS,
5420 .v.pins = (const struct hda_pintbl[]) {
5421 { 0x13, 0x90a60160 }, /* use as internal mic */
5422 { 0x19, 0x04a11120 }, /* use as headset mic, without its own jack detect */
5423 { }
5424 },
5425 .chained = true,
5426 .chain_id = ALC256_FIXUP_ASUS_HEADSET_MODE
5427 },
5428 [ALC256_FIXUP_ASUS_AIO_GPIO2] = {
5429 .type = HDA_FIXUP_FUNC,
5430 /* Set up GPIO2 for the speaker amp */
5431 .v.func = alc_fixup_gpio4,
5432 },
5433 [ALC233_FIXUP_ASUS_MIC_NO_PRESENCE] = {
5434 .type = HDA_FIXUP_PINS,
5435 .v.pins = (const struct hda_pintbl[]) {
5436 { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */
5437 { }
5438 },
5439 .chained = true,
5440 .chain_id = ALC269_FIXUP_HEADSET_MIC
5441 },
5442 [ALC233_FIXUP_EAPD_COEF_AND_MIC_NO_PRESENCE] = {
5443 .type = HDA_FIXUP_VERBS,
5444 .v.verbs = (const struct hda_verb[]) {
5445 /* Enables internal speaker */
5446 {0x20, AC_VERB_SET_COEF_INDEX, 0x40},
5447 {0x20, AC_VERB_SET_PROC_COEF, 0x8800},
5448 {}
5449 },
5450 .chained = true,
5451 .chain_id = ALC233_FIXUP_ASUS_MIC_NO_PRESENCE
5452 },
5453 [ALC233_FIXUP_LENOVO_MULTI_CODECS] = {
5454 .type = HDA_FIXUP_FUNC,
5455 .v.func = alc233_alc662_fixup_lenovo_dual_codecs,
5456 .chained = true,
5457 .chain_id = ALC269_FIXUP_GPIO2
5458 },
5459 [ALC233_FIXUP_ACER_HEADSET_MIC] = {
5460 .type = HDA_FIXUP_VERBS,
5461 .v.verbs = (const struct hda_verb[]) {
5462 { 0x20, AC_VERB_SET_COEF_INDEX, 0x45 },
5463 { 0x20, AC_VERB_SET_PROC_COEF, 0x5089 },
5464 { }
5465 },
5466 .chained = true,
5467 .chain_id = ALC233_FIXUP_ASUS_MIC_NO_PRESENCE
5468 },
5469 [ALC294_FIXUP_LENOVO_MIC_LOCATION] = {
5470 .type = HDA_FIXUP_PINS,
5471 .v.pins = (const struct hda_pintbl[]) {
5472 /* Change the mic location from front to right, otherwise there are
5473 two front mics with the same name, pulseaudio can't handle them.
5474 This is just a temporary workaround, after applying this fixup,
5475 there will be one "Front Mic" and one "Mic" in this machine.
5476 */
5477 { 0x1a, 0x04a19040 },
5478 { }
5479 },
5480 },
5481 [ALC225_FIXUP_DELL_WYSE_MIC_NO_PRESENCE] = {
5482 .type = HDA_FIXUP_PINS,
5483 .v.pins = (const struct hda_pintbl[]) {
5484 { 0x16, 0x0101102f }, /* Rear Headset HP */
5485 { 0x19, 0x02a1913c }, /* use as Front headset mic, without its own jack detect */
5486 { 0x1a, 0x01a19030 }, /* Rear Headset MIC */
5487 { 0x1b, 0x02011020 },
5488 { }
5489 },
5490 .chained = true,
5491 .chain_id = ALC225_FIXUP_S3_POP_NOISE
5492 },
5493 [ALC225_FIXUP_S3_POP_NOISE] = {
5494 .type = HDA_FIXUP_FUNC,
5495 .v.func = alc225_fixup_s3_pop_noise,
5496 .chained = true,
5497 .chain_id = ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC
5498 },
5499 [ALC700_FIXUP_INTEL_REFERENCE] = {
5500 .type = HDA_FIXUP_VERBS,
5501 .v.verbs = (const struct hda_verb[]) {
5502 /* Enables internal speaker */
5503 {0x20, AC_VERB_SET_COEF_INDEX, 0x45},
5504 {0x20, AC_VERB_SET_PROC_COEF, 0x5289},
5505 {0x20, AC_VERB_SET_COEF_INDEX, 0x4A},
5506 {0x20, AC_VERB_SET_PROC_COEF, 0x001b},
5507 {0x58, AC_VERB_SET_COEF_INDEX, 0x00},
5508 {0x58, AC_VERB_SET_PROC_COEF, 0x3888},
5509 {0x20, AC_VERB_SET_COEF_INDEX, 0x6f},
5510 {0x20, AC_VERB_SET_PROC_COEF, 0x2c0b},
5511 {}
5512 }
5513 },
5514 [ALC700_FIXUP_INTEL_HADES_CANYON] = {
5515 .type = HDA_FIXUP_FUNC,
5516 .v.func = alc700_fixup_intel_hades_canyon,
5517 },
5518 [ALC274_FIXUP_DELL_BIND_DACS] = {
5519 .type = HDA_FIXUP_FUNC,
5520 .v.func = alc274_fixup_bind_dacs,
5521 .chained = true,
5522 .chain_id = ALC269_FIXUP_DELL1_MIC_NO_PRESENCE
5523 },
5524 [ALC274_FIXUP_DELL_AIO_LINEOUT_VERB] = {
5525 .type = HDA_FIXUP_PINS,
5526 .v.pins = (const struct hda_pintbl[]) {
5527 { 0x1b, 0x0401102f },
5528 { }
5529 },
5530 .chained = true,
5531 .chain_id = ALC274_FIXUP_DELL_BIND_DACS
5532 },
5533 [ALC298_FIXUP_TPT470_DOCK_FIX] = {
5534 .type = HDA_FIXUP_FUNC,
5535 .v.func = alc_fixup_tpt470_dock,
5536 .chained = true,
5537 .chain_id = ALC293_FIXUP_LENOVO_SPK_NOISE
5538 },
5539 [ALC298_FIXUP_TPT470_DOCK] = {
5540 .type = HDA_FIXUP_FUNC,
5541 .v.func = alc_fixup_tpt470_dacs,
5542 .chained = true,
5543 .chain_id = ALC298_FIXUP_TPT470_DOCK_FIX
5544 },
5545 [ALC255_FIXUP_DUMMY_LINEOUT_VERB] = {
5546 .type = HDA_FIXUP_PINS,
5547 .v.pins = (const struct hda_pintbl[]) {
5548 { 0x14, 0x0201101f },
5549 { }
5550 },
5551 .chained = true,
5552 .chain_id = ALC255_FIXUP_DELL1_MIC_NO_PRESENCE
5553 },
5554 [ALC255_FIXUP_DELL_HEADSET_MIC] = {
5555 .type = HDA_FIXUP_PINS,
5556 .v.pins = (const struct hda_pintbl[]) {
5557 { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */
5558 { }
5559 },
5560 .chained = true,
5561 .chain_id = ALC269_FIXUP_HEADSET_MIC
5562 },
5563 [ALC295_FIXUP_HP_X360] = {
5564 .type = HDA_FIXUP_FUNC,
5565 .v.func = alc295_fixup_hp_top_speakers,
5566 .chained = true,
5567 .chain_id = ALC269_FIXUP_HP_MUTE_LED_MIC3
5568 },
5569 [ALC295_FIXUP_HP_PAVILION_X360] = {
5570 .type = HDA_FIXUP_VERBS,
5571 .v.verbs = (const struct hda_verb[]) {
5572 /* force amp gain and processing state */
5573 { 0x20, AC_VERB_SET_COEF_INDEX, 0x07 },
5574 { 0x20, AC_VERB_SET_PROC_COEF, 0x7770 },
5575 { 0x20, AC_VERB_SET_COEF_INDEX, 0x0d },
5576 { 0x20, AC_VERB_SET_PROC_COEF, 0x3000 },
5577 {}
5578 },
5579 .chained = true,
5580 .chain_id = ALC295_FIXUP_HP_X360
5581 },
5582 [ALC221_FIXUP_HP_HEADSET_MIC] = {
5583 .type = HDA_FIXUP_PINS,
5584 .v.pins = (const struct hda_pintbl[]) {
5585 { 0x19, 0x0181313f},
5586 { }
5587 },
5588 .chained = true,
5589 .chain_id = ALC269_FIXUP_HEADSET_MIC
5590 },
5591 [ALC285_FIXUP_LENOVO_HEADPHONE_NOISE] = {
5592 .type = HDA_FIXUP_FUNC,
5593 .v.func = alc285_fixup_invalidate_dacs,
5594 .chained = true,
5595 .chain_id = ALC269_FIXUP_THINKPAD_ACPI
5596 },
5597 [ALC295_FIXUP_HP_AUTO_MUTE] = {
5598 .type = HDA_FIXUP_FUNC,
5599 .v.func = alc_fixup_auto_mute_via_amp,
5600 },
5601 [ALC286_FIXUP_ACER_AIO_MIC_NO_PRESENCE] = {
5602 .type = HDA_FIXUP_PINS,
5603 .v.pins = (const struct hda_pintbl[]) {
5604 { 0x18, 0x01a1913c }, /* use as headset mic, without its own jack detect */
5605 { }
5606 },
5607 .chained = true,
5608 .chain_id = ALC269_FIXUP_HEADSET_MIC
5609 },
5610 [ALC294_FIXUP_ASUS_MIC] = {
5611 .type = HDA_FIXUP_PINS,
5612 .v.pins = (const struct hda_pintbl[]) {
5613 { 0x13, 0x90a60160 }, /* use as internal mic */
5614 { 0x19, 0x04a11120 }, /* use as headset mic, without its own jack detect */
5615 { }
5616 },
5617 .chained = true,
5618 .chain_id = ALC269_FIXUP_HEADSET_MIC
5619 },
5620 [ALC294_FIXUP_ASUS_HEADSET_MIC] = {
5621 .type = HDA_FIXUP_PINS,
5622 .v.pins = (const struct hda_pintbl[]) {
5623 { 0x19, 0x01a1103c }, /* use as headset mic */
5624 { }
5625 },
5626 .chained = true,
5627 .chain_id = ALC269_FIXUP_HEADSET_MIC
5628 },
5629 [ALC294_FIXUP_ASUS_I2C_HEADSET_MIC] = {
5630 .type = HDA_FIXUP_PINS,
5631 .v.pins = (const struct hda_pintbl[]) {
5632 { 0x19, 0x03a19020 }, /* use as headset mic */
5633 { }
5634 },
5635 .chained = true,
5636 .chain_id = ALC287_FIXUP_CS35L41_I2C_2
5637 },
5638 [ALC294_FIXUP_ASUS_SPI_HEADSET_MIC] = {
5639 .type = HDA_FIXUP_PINS,
5640 .v.pins = (const struct hda_pintbl[]) {
5641 { 0x19, 0x04a11020 }, /* use as headset mic */
5642 { }
5643 },
5644 .chained = true,
5645 .chain_id = ALC245_FIXUP_CS35L41_SPI_2
5646 },
5647 [ALC294_FIXUP_ASUS_SPK] = {
5648 .type = HDA_FIXUP_VERBS,
5649 .v.verbs = (const struct hda_verb[]) {
5650 /* Set EAPD high */
5651 { 0x20, AC_VERB_SET_COEF_INDEX, 0x40 },
5652 { 0x20, AC_VERB_SET_PROC_COEF, 0x8800 },
5653 { 0x20, AC_VERB_SET_COEF_INDEX, 0x0f },
5654 { 0x20, AC_VERB_SET_PROC_COEF, 0x7774 },
5655 { }
5656 },
5657 .chained = true,
5658 .chain_id = ALC294_FIXUP_ASUS_HEADSET_MIC
5659 },
5660 [ALC295_FIXUP_CHROME_BOOK] = {
5661 .type = HDA_FIXUP_FUNC,
5662 .v.func = alc295_fixup_chromebook,
5663 .chained = true,
5664 .chain_id = ALC225_FIXUP_HEADSET_JACK
5665 },
5666 [ALC225_FIXUP_HEADSET_JACK] = {
5667 .type = HDA_FIXUP_FUNC,
5668 .v.func = alc_fixup_headset_jack,
5669 },
5670 [ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE] = {
5671 .type = HDA_FIXUP_PINS,
5672 .v.pins = (const struct hda_pintbl[]) {
5673 { 0x1a, 0x01a1913c }, /* use as headset mic, without its own jack detect */
5674 { }
5675 },
5676 .chained = true,
5677 .chain_id = ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC
5678 },
5679 [ALC285_FIXUP_LENOVO_PC_BEEP_IN_NOISE] = {
5680 .type = HDA_FIXUP_VERBS,
5681 .v.verbs = (const struct hda_verb[]) {
5682 /* Disable PCBEEP-IN passthrough */
5683 { 0x20, AC_VERB_SET_COEF_INDEX, 0x36 },
5684 { 0x20, AC_VERB_SET_PROC_COEF, 0x57d7 },
5685 { }
5686 },
5687 .chained = true,
5688 .chain_id = ALC285_FIXUP_LENOVO_HEADPHONE_NOISE
5689 },
5690 [ALC255_FIXUP_ACER_HEADSET_MIC] = {
5691 .type = HDA_FIXUP_PINS,
5692 .v.pins = (const struct hda_pintbl[]) {
5693 { 0x19, 0x03a11130 },
5694 { 0x1a, 0x90a60140 }, /* use as internal mic */
5695 { }
5696 },
5697 .chained = true,
5698 .chain_id = ALC255_FIXUP_HEADSET_MODE_NO_HP_MIC
5699 },
5700 [ALC225_FIXUP_DELL_WYSE_AIO_MIC_NO_PRESENCE] = {
5701 .type = HDA_FIXUP_PINS,
5702 .v.pins = (const struct hda_pintbl[]) {
5703 { 0x16, 0x01011020 }, /* Rear Line out */
5704 { 0x19, 0x01a1913c }, /* use as Front headset mic, without its own jack detect */
5705 { }
5706 },
5707 .chained = true,
5708 .chain_id = ALC225_FIXUP_WYSE_AUTO_MUTE
5709 },
5710 [ALC225_FIXUP_WYSE_AUTO_MUTE] = {
5711 .type = HDA_FIXUP_FUNC,
5712 .v.func = alc_fixup_auto_mute_via_amp,
5713 .chained = true,
5714 .chain_id = ALC225_FIXUP_WYSE_DISABLE_MIC_VREF
5715 },
5716 [ALC225_FIXUP_WYSE_DISABLE_MIC_VREF] = {
5717 .type = HDA_FIXUP_FUNC,
5718 .v.func = alc_fixup_disable_mic_vref,
5719 .chained = true,
5720 .chain_id = ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC
5721 },
5722 [ALC286_FIXUP_ACER_AIO_HEADSET_MIC] = {
5723 .type = HDA_FIXUP_VERBS,
5724 .v.verbs = (const struct hda_verb[]) {
5725 { 0x20, AC_VERB_SET_COEF_INDEX, 0x4f },
5726 { 0x20, AC_VERB_SET_PROC_COEF, 0x5029 },
5727 { }
5728 },
5729 .chained = true,
5730 .chain_id = ALC286_FIXUP_ACER_AIO_MIC_NO_PRESENCE
5731 },
5732 [ALC256_FIXUP_ASUS_HEADSET_MIC] = {
5733 .type = HDA_FIXUP_PINS,
5734 .v.pins = (const struct hda_pintbl[]) {
5735 { 0x19, 0x03a11020 }, /* headset mic with jack detect */
5736 { }
5737 },
5738 .chained = true,
5739 .chain_id = ALC256_FIXUP_ASUS_HEADSET_MODE
5740 },
5741 [ALC256_FIXUP_ASUS_MIC_NO_PRESENCE] = {
5742 .type = HDA_FIXUP_PINS,
5743 .v.pins = (const struct hda_pintbl[]) {
5744 { 0x19, 0x04a11120 }, /* use as headset mic, without its own jack detect */
5745 { }
5746 },
5747 .chained = true,
5748 .chain_id = ALC256_FIXUP_ASUS_HEADSET_MODE
5749 },
5750 [ALC255_FIXUP_PREDATOR_SUBWOOFER] = {
5751 .type = HDA_FIXUP_PINS,
5752 .v.pins = (const struct hda_pintbl[]) {
5753 { 0x17, 0x90170151 }, /* use as internal speaker (LFE) */
5754 { 0x1b, 0x90170152 } /* use as internal speaker (back) */
5755 }
5756 },
5757 [ALC299_FIXUP_PREDATOR_SPK] = {
5758 .type = HDA_FIXUP_PINS,
5759 .v.pins = (const struct hda_pintbl[]) {
5760 { 0x21, 0x90170150 }, /* use as internal speaker */
5761 { }
5762 }
5763 },
5764 [ALC287_FIXUP_PREDATOR_SPK_CS35L41_I2C_2] = {
5765 .type = HDA_FIXUP_FUNC,
5766 .v.func = cs35l41_fixup_i2c_two,
5767 .chained = true,
5768 .chain_id = ALC255_FIXUP_PREDATOR_SUBWOOFER
5769 },
5770 [ALC256_FIXUP_MEDION_HEADSET_NO_PRESENCE] = {
5771 .type = HDA_FIXUP_PINS,
5772 .v.pins = (const struct hda_pintbl[]) {
5773 { 0x19, 0x04a11040 },
5774 { 0x21, 0x04211020 },
5775 { }
5776 },
5777 .chained = true,
5778 .chain_id = ALC256_FIXUP_ASUS_HEADSET_MODE
5779 },
5780 [ALC289_FIXUP_DELL_SPK1] = {
5781 .type = HDA_FIXUP_PINS,
5782 .v.pins = (const struct hda_pintbl[]) {
5783 { 0x14, 0x90170140 },
5784 { }
5785 },
5786 .chained = true,
5787 .chain_id = ALC269_FIXUP_DELL4_MIC_NO_PRESENCE
5788 },
5789 [ALC289_FIXUP_DELL_SPK2] = {
5790 .type = HDA_FIXUP_PINS,
5791 .v.pins = (const struct hda_pintbl[]) {
5792 { 0x17, 0x90170130 }, /* bass spk */
5793 { }
5794 },
5795 .chained = true,
5796 .chain_id = ALC269_FIXUP_DELL4_MIC_NO_PRESENCE
5797 },
5798 [ALC289_FIXUP_DUAL_SPK] = {
5799 .type = HDA_FIXUP_FUNC,
5800 .v.func = alc285_fixup_speaker2_to_dac1,
5801 .chained = true,
5802 .chain_id = ALC289_FIXUP_DELL_SPK2
5803 },
5804 [ALC289_FIXUP_RTK_AMP_DUAL_SPK] = {
5805 .type = HDA_FIXUP_FUNC,
5806 .v.func = alc285_fixup_speaker2_to_dac1,
5807 .chained = true,
5808 .chain_id = ALC289_FIXUP_DELL_SPK1
5809 },
5810 [ALC294_FIXUP_SPK2_TO_DAC1] = {
5811 .type = HDA_FIXUP_FUNC,
5812 .v.func = alc285_fixup_speaker2_to_dac1,
5813 .chained = true,
5814 .chain_id = ALC294_FIXUP_ASUS_HEADSET_MIC
5815 },
5816 [ALC294_FIXUP_ASUS_DUAL_SPK] = {
5817 .type = HDA_FIXUP_FUNC,
5818 /* The GPIO must be pulled to initialize the AMP */
5819 .v.func = alc_fixup_gpio4,
5820 .chained = true,
5821 .chain_id = ALC294_FIXUP_SPK2_TO_DAC1
5822 },
5823 [ALC294_FIXUP_ASUS_ALLY] = {
5824 .type = HDA_FIXUP_FUNC,
5825 .v.func = cs35l41_fixup_i2c_two,
5826 .chained = true,
5827 .chain_id = ALC294_FIXUP_ASUS_ALLY_PINS
5828 },
5829 [ALC294_FIXUP_ASUS_ALLY_PINS] = {
5830 .type = HDA_FIXUP_PINS,
5831 .v.pins = (const struct hda_pintbl[]) {
5832 { 0x19, 0x03a11050 },
5833 { 0x1a, 0x03a11c30 },
5834 { 0x21, 0x03211420 },
5835 { }
5836 },
5837 .chained = true,
5838 .chain_id = ALC294_FIXUP_ASUS_ALLY_VERBS
5839 },
5840 [ALC294_FIXUP_ASUS_ALLY_VERBS] = {
5841 .type = HDA_FIXUP_VERBS,
5842 .v.verbs = (const struct hda_verb[]) {
5843 { 0x20, AC_VERB_SET_COEF_INDEX, 0x45 },
5844 { 0x20, AC_VERB_SET_PROC_COEF, 0x5089 },
5845 { 0x20, AC_VERB_SET_COEF_INDEX, 0x46 },
5846 { 0x20, AC_VERB_SET_PROC_COEF, 0x0004 },
5847 { 0x20, AC_VERB_SET_COEF_INDEX, 0x47 },
5848 { 0x20, AC_VERB_SET_PROC_COEF, 0xa47a },
5849 { 0x20, AC_VERB_SET_COEF_INDEX, 0x49 },
5850 { 0x20, AC_VERB_SET_PROC_COEF, 0x0049},
5851 { 0x20, AC_VERB_SET_COEF_INDEX, 0x4a },
5852 { 0x20, AC_VERB_SET_PROC_COEF, 0x201b },
5853 { 0x20, AC_VERB_SET_COEF_INDEX, 0x6b },
5854 { 0x20, AC_VERB_SET_PROC_COEF, 0x4278},
5855 { }
5856 },
5857 .chained = true,
5858 .chain_id = ALC285_FIXUP_SPEAKER2_TO_DAC1
5859 },
5860 [ALC285_FIXUP_THINKPAD_X1_GEN7] = {
5861 .type = HDA_FIXUP_FUNC,
5862 .v.func = alc285_fixup_thinkpad_x1_gen7,
5863 .chained = true,
5864 .chain_id = ALC269_FIXUP_THINKPAD_ACPI
5865 },
5866 [ALC285_FIXUP_THINKPAD_HEADSET_JACK] = {
5867 .type = HDA_FIXUP_FUNC,
5868 .v.func = alc_fixup_headset_jack,
5869 .chained = true,
5870 .chain_id = ALC285_FIXUP_THINKPAD_X1_GEN7
5871 },
5872 [ALC294_FIXUP_ASUS_HPE] = {
5873 .type = HDA_FIXUP_VERBS,
5874 .v.verbs = (const struct hda_verb[]) {
5875 /* Set EAPD high */
5876 { 0x20, AC_VERB_SET_COEF_INDEX, 0x0f },
5877 { 0x20, AC_VERB_SET_PROC_COEF, 0x7774 },
5878 { }
5879 },
5880 .chained = true,
5881 .chain_id = ALC294_FIXUP_ASUS_HEADSET_MIC
5882 },
5883 [ALC294_FIXUP_ASUS_GX502_PINS] = {
5884 .type = HDA_FIXUP_PINS,
5885 .v.pins = (const struct hda_pintbl[]) {
5886 { 0x19, 0x03a11050 }, /* front HP mic */
5887 { 0x1a, 0x01a11830 }, /* rear external mic */
5888 { 0x21, 0x03211020 }, /* front HP out */
5889 { }
5890 },
5891 .chained = true,
5892 .chain_id = ALC294_FIXUP_ASUS_GX502_VERBS
5893 },
5894 [ALC294_FIXUP_ASUS_GX502_VERBS] = {
5895 .type = HDA_FIXUP_VERBS,
5896 .v.verbs = (const struct hda_verb[]) {
5897 /* set 0x15 to HP-OUT ctrl */
5898 { 0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, 0xc0 },
5899 /* unmute the 0x15 amp */
5900 { 0x15, AC_VERB_SET_AMP_GAIN_MUTE, 0xb000 },
5901 { }
5902 },
5903 .chained = true,
5904 .chain_id = ALC294_FIXUP_ASUS_GX502_HP
5905 },
5906 [ALC294_FIXUP_ASUS_GX502_HP] = {
5907 .type = HDA_FIXUP_FUNC,
5908 .v.func = alc294_fixup_gx502_hp,
5909 },
5910 [ALC295_FIXUP_DELL_TAS2781_I2C] = {
5911 .type = HDA_FIXUP_FUNC,
5912 .v.func = tas2781_fixup_tias_i2c,
5913 .chained = true,
5914 .chain_id = ALC289_FIXUP_DUAL_SPK
5915 },
5916 [ALC294_FIXUP_ASUS_GU502_PINS] = {
5917 .type = HDA_FIXUP_PINS,
5918 .v.pins = (const struct hda_pintbl[]) {
5919 { 0x19, 0x01a11050 }, /* rear HP mic */
5920 { 0x1a, 0x01a11830 }, /* rear external mic */
5921 { 0x21, 0x012110f0 }, /* rear HP out */
5922 { }
5923 },
5924 .chained = true,
5925 .chain_id = ALC294_FIXUP_ASUS_GU502_VERBS
5926 },
5927 [ALC294_FIXUP_ASUS_GU502_VERBS] = {
5928 .type = HDA_FIXUP_VERBS,
5929 .v.verbs = (const struct hda_verb[]) {
5930 /* set 0x15 to HP-OUT ctrl */
5931 { 0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, 0xc0 },
5932 /* unmute the 0x15 amp */
5933 { 0x15, AC_VERB_SET_AMP_GAIN_MUTE, 0xb000 },
5934 /* set 0x1b to HP-OUT */
5935 { 0x1b, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x24 },
5936 { }
5937 },
5938 .chained = true,
5939 .chain_id = ALC294_FIXUP_ASUS_GU502_HP
5940 },
5941 [ALC294_FIXUP_ASUS_GU502_HP] = {
5942 .type = HDA_FIXUP_FUNC,
5943 .v.func = alc294_fixup_gu502_hp,
5944 },
5945 [ALC294_FIXUP_ASUS_G513_PINS] = {
5946 .type = HDA_FIXUP_PINS,
5947 .v.pins = (const struct hda_pintbl[]) {
5948 { 0x19, 0x03a11050 }, /* front HP mic */
5949 { 0x1a, 0x03a11c30 }, /* rear external mic */
5950 { 0x21, 0x03211420 }, /* front HP out */
5951 { }
5952 },
5953 },
5954 [ALC285_FIXUP_ASUS_G533Z_PINS] = {
5955 .type = HDA_FIXUP_PINS,
5956 .v.pins = (const struct hda_pintbl[]) {
5957 { 0x14, 0x90170152 }, /* Speaker Surround Playback Switch */
5958 { 0x19, 0x03a19020 }, /* Mic Boost Volume */
5959 { 0x1a, 0x03a11c30 }, /* Mic Boost Volume */
5960 { 0x1e, 0x90170151 }, /* Rear jack, IN OUT EAPD Detect */
5961 { 0x21, 0x03211420 },
5962 { }
5963 },
5964 },
5965 [ALC294_FIXUP_ASUS_COEF_1B] = {
5966 .type = HDA_FIXUP_VERBS,
5967 .v.verbs = (const struct hda_verb[]) {
5968 /* Set bit 10 to correct noisy output after reboot from
5969 * Windows 10 (due to pop noise reduction?)
5970 */
5971 { 0x20, AC_VERB_SET_COEF_INDEX, 0x1b },
5972 { 0x20, AC_VERB_SET_PROC_COEF, 0x4e4b },
5973 { }
5974 },
5975 .chained = true,
5976 .chain_id = ALC289_FIXUP_ASUS_GA401,
5977 },
5978 [ALC285_FIXUP_HP_GPIO_LED] = {
5979 .type = HDA_FIXUP_FUNC,
5980 .v.func = alc285_fixup_hp_gpio_led,
5981 },
5982 [ALC285_FIXUP_HP_MUTE_LED] = {
5983 .type = HDA_FIXUP_FUNC,
5984 .v.func = alc285_fixup_hp_mute_led,
5985 },
5986 [ALC285_FIXUP_HP_SPECTRE_X360_MUTE_LED] = {
5987 .type = HDA_FIXUP_FUNC,
5988 .v.func = alc285_fixup_hp_spectre_x360_mute_led,
5989 },
5990 [ALC245_FIXUP_HP_ENVY_X360_MUTE_LED] = {
5991 .type = HDA_FIXUP_FUNC,
5992 .v.func = alc245_fixup_hp_envy_x360_mute_led,
5993 },
5994 [ALC285_FIXUP_HP_BEEP_MICMUTE_LED] = {
5995 .type = HDA_FIXUP_FUNC,
5996 .v.func = alc285_fixup_hp_beep,
5997 .chained = true,
5998 .chain_id = ALC285_FIXUP_HP_MUTE_LED,
5999 },
6000 [ALC236_FIXUP_HP_MUTE_LED_COEFBIT2] = {
6001 .type = HDA_FIXUP_FUNC,
6002 .v.func = alc236_fixup_hp_mute_led_coefbit2,
6003 },
6004 [ALC236_FIXUP_HP_GPIO_LED] = {
6005 .type = HDA_FIXUP_FUNC,
6006 .v.func = alc236_fixup_hp_gpio_led,
6007 },
6008 [ALC236_FIXUP_HP_MUTE_LED] = {
6009 .type = HDA_FIXUP_FUNC,
6010 .v.func = alc236_fixup_hp_mute_led,
6011 },
6012 [ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF] = {
6013 .type = HDA_FIXUP_FUNC,
6014 .v.func = alc236_fixup_hp_mute_led_micmute_vref,
6015 },
6016 [ALC236_FIXUP_HP_MUTE_LED_MICMUTE_GPIO] = {
6017 .type = HDA_FIXUP_FUNC,
6018 .v.func = alc236_fixup_hp_mute_led_micmute_gpio,
6019 },
6020 [ALC236_FIXUP_HP_15_FD0XXX] = {
6021 .type = HDA_FIXUP_FUNC,
6022 .v.func = alc236_fixup_hp_15_fd0xxx,
6023 },
6024 [ALC236_FIXUP_LENOVO_INV_DMIC] = {
6025 .type = HDA_FIXUP_FUNC,
6026 .v.func = alc_fixup_inv_dmic,
6027 .chained = true,
6028 .chain_id = ALC283_FIXUP_INT_MIC,
6029 },
6030 [ALC295_FIXUP_HP_MUTE_LED_COEFBIT11] = {
6031 .type = HDA_FIXUP_FUNC,
6032 .v.func = alc295_fixup_hp_mute_led_coefbit11,
6033 },
6034 [ALC295_FIXUP_HP_PAVILION_MUTE_LED_1B] = {
6035 .type = HDA_FIXUP_FUNC,
6036 .v.func = alc295_fixup_hp_pavilion_mute_led_1b,
6037 },
6038 [ALC298_FIXUP_SAMSUNG_AMP] = {
6039 .type = HDA_FIXUP_FUNC,
6040 .v.func = alc298_fixup_samsung_amp,
6041 .chained = true,
6042 .chain_id = ALC298_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET
6043 },
6044 [ALC298_FIXUP_SAMSUNG_AMP_V2_2_AMPS] = {
6045 .type = HDA_FIXUP_FUNC,
6046 .v.func = alc298_fixup_samsung_amp_v2_2_amps
6047 },
6048 [ALC298_FIXUP_SAMSUNG_AMP_V2_4_AMPS] = {
6049 .type = HDA_FIXUP_FUNC,
6050 .v.func = alc298_fixup_samsung_amp_v2_4_amps
6051 },
6052 [ALC298_FIXUP_LG_GRAM_STYLE_14] = {
6053 .type = HDA_FIXUP_FUNC,
6054 .v.func = alc298_fixup_lg_gram_style_14
6055 },
6056 [ALC298_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET] = {
6057 .type = HDA_FIXUP_VERBS,
6058 .v.verbs = (const struct hda_verb[]) {
6059 { 0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL, 0xc5 },
6060 { }
6061 },
6062 },
6063 [ALC256_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET] = {
6064 .type = HDA_FIXUP_VERBS,
6065 .v.verbs = (const struct hda_verb[]) {
6066 { 0x20, AC_VERB_SET_COEF_INDEX, 0x08},
6067 { 0x20, AC_VERB_SET_PROC_COEF, 0x2fcf},
6068 { }
6069 },
6070 },
6071 [ALC295_FIXUP_ASUS_MIC_NO_PRESENCE] = {
6072 .type = HDA_FIXUP_PINS,
6073 .v.pins = (const struct hda_pintbl[]) {
6074 { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */
6075 { }
6076 },
6077 .chained = true,
6078 .chain_id = ALC269_FIXUP_HEADSET_MODE
6079 },
6080 [ALC269VC_FIXUP_ACER_VCOPPERBOX_PINS] = {
6081 .type = HDA_FIXUP_PINS,
6082 .v.pins = (const struct hda_pintbl[]) {
6083 { 0x14, 0x90100120 }, /* use as internal speaker */
6084 { 0x18, 0x02a111f0 }, /* use as headset mic, without its own jack detect */
6085 { 0x1a, 0x01011020 }, /* use as line out */
6086 { },
6087 },
6088 .chained = true,
6089 .chain_id = ALC269_FIXUP_HEADSET_MIC
6090 },
6091 [ALC269VC_FIXUP_ACER_HEADSET_MIC] = {
6092 .type = HDA_FIXUP_PINS,
6093 .v.pins = (const struct hda_pintbl[]) {
6094 { 0x18, 0x02a11030 }, /* use as headset mic */
6095 { }
6096 },
6097 .chained = true,
6098 .chain_id = ALC269_FIXUP_HEADSET_MIC
6099 },
6100 [ALC269VC_FIXUP_ACER_MIC_NO_PRESENCE] = {
6101 .type = HDA_FIXUP_PINS,
6102 .v.pins = (const struct hda_pintbl[]) {
6103 { 0x18, 0x01a11130 }, /* use as headset mic, without its own jack detect */
6104 { }
6105 },
6106 .chained = true,
6107 .chain_id = ALC269_FIXUP_HEADSET_MIC
6108 },
6109 [ALC289_FIXUP_ASUS_GA401] = {
6110 .type = HDA_FIXUP_FUNC,
6111 .v.func = alc289_fixup_asus_ga401,
6112 .chained = true,
6113 .chain_id = ALC289_FIXUP_ASUS_GA502,
6114 },
6115 [ALC289_FIXUP_ASUS_GA502] = {
6116 .type = HDA_FIXUP_PINS,
6117 .v.pins = (const struct hda_pintbl[]) {
6118 { 0x19, 0x03a11020 }, /* headset mic with jack detect */
6119 { }
6120 },
6121 },
6122 [ALC256_FIXUP_ACER_MIC_NO_PRESENCE] = {
6123 .type = HDA_FIXUP_PINS,
6124 .v.pins = (const struct hda_pintbl[]) {
6125 { 0x19, 0x02a11120 }, /* use as headset mic, without its own jack detect */
6126 { }
6127 },
6128 .chained = true,
6129 .chain_id = ALC256_FIXUP_ASUS_HEADSET_MODE
6130 },
6131 [ALC285_FIXUP_HP_GPIO_AMP_INIT] = {
6132 .type = HDA_FIXUP_FUNC,
6133 .v.func = alc285_fixup_hp_gpio_amp_init,
6134 .chained = true,
6135 .chain_id = ALC285_FIXUP_HP_GPIO_LED
6136 },
6137 [ALC269_FIXUP_CZC_B20] = {
6138 .type = HDA_FIXUP_PINS,
6139 .v.pins = (const struct hda_pintbl[]) {
6140 { 0x12, 0x411111f0 },
6141 { 0x14, 0x90170110 }, /* speaker */
6142 { 0x15, 0x032f1020 }, /* HP out */
6143 { 0x17, 0x411111f0 },
6144 { 0x18, 0x03ab1040 }, /* mic */
6145 { 0x19, 0xb7a7013f },
6146 { 0x1a, 0x0181305f },
6147 { 0x1b, 0x411111f0 },
6148 { 0x1d, 0x411111f0 },
6149 { 0x1e, 0x411111f0 },
6150 { }
6151 },
6152 .chain_id = ALC269_FIXUP_DMIC,
6153 },
6154 [ALC269_FIXUP_CZC_TMI] = {
6155 .type = HDA_FIXUP_PINS,
6156 .v.pins = (const struct hda_pintbl[]) {
6157 { 0x12, 0x4000c000 },
6158 { 0x14, 0x90170110 }, /* speaker */
6159 { 0x15, 0x0421401f }, /* HP out */
6160 { 0x17, 0x411111f0 },
6161 { 0x18, 0x04a19020 }, /* mic */
6162 { 0x19, 0x411111f0 },
6163 { 0x1a, 0x411111f0 },
6164 { 0x1b, 0x411111f0 },
6165 { 0x1d, 0x40448505 },
6166 { 0x1e, 0x411111f0 },
6167 { 0x20, 0x8000ffff },
6168 { }
6169 },
6170 .chain_id = ALC269_FIXUP_DMIC,
6171 },
6172 [ALC269_FIXUP_CZC_L101] = {
6173 .type = HDA_FIXUP_PINS,
6174 .v.pins = (const struct hda_pintbl[]) {
6175 { 0x12, 0x40000000 },
6176 { 0x14, 0x01014010 }, /* speaker */
6177 { 0x15, 0x411111f0 }, /* HP out */
6178 { 0x16, 0x411111f0 },
6179 { 0x18, 0x01a19020 }, /* mic */
6180 { 0x19, 0x02a19021 },
6181 { 0x1a, 0x0181302f },
6182 { 0x1b, 0x0221401f },
6183 { 0x1c, 0x411111f0 },
6184 { 0x1d, 0x4044c601 },
6185 { 0x1e, 0x411111f0 },
6186 { }
6187 },
6188 .chain_id = ALC269_FIXUP_DMIC,
6189 },
6190 [ALC269_FIXUP_LEMOTE_A1802] = {
6191 .type = HDA_FIXUP_PINS,
6192 .v.pins = (const struct hda_pintbl[]) {
6193 { 0x12, 0x40000000 },
6194 { 0x14, 0x90170110 }, /* speaker */
6195 { 0x17, 0x411111f0 },
6196 { 0x18, 0x03a19040 }, /* mic1 */
6197 { 0x19, 0x90a70130 }, /* mic2 */
6198 { 0x1a, 0x411111f0 },
6199 { 0x1b, 0x411111f0 },
6200 { 0x1d, 0x40489d2d },
6201 { 0x1e, 0x411111f0 },
6202 { 0x20, 0x0003ffff },
6203 { 0x21, 0x03214020 },
6204 { }
6205 },
6206 .chain_id = ALC269_FIXUP_DMIC,
6207 },
6208 [ALC269_FIXUP_LEMOTE_A190X] = {
6209 .type = HDA_FIXUP_PINS,
6210 .v.pins = (const struct hda_pintbl[]) {
6211 { 0x14, 0x99130110 }, /* speaker */
6212 { 0x15, 0x0121401f }, /* HP out */
6213 { 0x18, 0x01a19c20 }, /* rear mic */
6214 { 0x19, 0x99a3092f }, /* front mic */
6215 { 0x1b, 0x0201401f }, /* front lineout */
6216 { }
6217 },
6218 .chain_id = ALC269_FIXUP_DMIC,
6219 },
6220 [ALC256_FIXUP_INTEL_NUC8_RUGGED] = {
6221 .type = HDA_FIXUP_PINS,
6222 .v.pins = (const struct hda_pintbl[]) {
6223 { 0x1b, 0x01a1913c }, /* use as headset mic, without its own jack detect */
6224 { }
6225 },
6226 .chained = true,
6227 .chain_id = ALC269_FIXUP_HEADSET_MODE
6228 },
6229 [ALC256_FIXUP_INTEL_NUC10] = {
6230 .type = HDA_FIXUP_PINS,
6231 .v.pins = (const struct hda_pintbl[]) {
6232 { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */
6233 { }
6234 },
6235 .chained = true,
6236 .chain_id = ALC269_FIXUP_HEADSET_MODE
6237 },
6238 [ALC255_FIXUP_XIAOMI_HEADSET_MIC] = {
6239 .type = HDA_FIXUP_VERBS,
6240 .v.verbs = (const struct hda_verb[]) {
6241 { 0x20, AC_VERB_SET_COEF_INDEX, 0x45 },
6242 { 0x20, AC_VERB_SET_PROC_COEF, 0x5089 },
6243 { }
6244 },
6245 .chained = true,
6246 .chain_id = ALC289_FIXUP_ASUS_GA502
6247 },
6248 [ALC274_FIXUP_HP_MIC] = {
6249 .type = HDA_FIXUP_VERBS,
6250 .v.verbs = (const struct hda_verb[]) {
6251 { 0x20, AC_VERB_SET_COEF_INDEX, 0x45 },
6252 { 0x20, AC_VERB_SET_PROC_COEF, 0x5089 },
6253 { }
6254 },
6255 },
6256 [ALC274_FIXUP_HP_HEADSET_MIC] = {
6257 .type = HDA_FIXUP_FUNC,
6258 .v.func = alc274_fixup_hp_headset_mic,
6259 .chained = true,
6260 .chain_id = ALC274_FIXUP_HP_MIC
6261 },
6262 [ALC274_FIXUP_HP_ENVY_GPIO] = {
6263 .type = HDA_FIXUP_FUNC,
6264 .v.func = alc274_fixup_hp_envy_gpio,
6265 },
6266 [ALC274_FIXUP_ASUS_ZEN_AIO_27] = {
6267 .type = HDA_FIXUP_VERBS,
6268 .v.verbs = (const struct hda_verb[]) {
6269 { 0x20, AC_VERB_SET_COEF_INDEX, 0x10 },
6270 { 0x20, AC_VERB_SET_PROC_COEF, 0xc420 },
6271 { 0x20, AC_VERB_SET_COEF_INDEX, 0x40 },
6272 { 0x20, AC_VERB_SET_PROC_COEF, 0x8800 },
6273 { 0x20, AC_VERB_SET_COEF_INDEX, 0x49 },
6274 { 0x20, AC_VERB_SET_PROC_COEF, 0x0249 },
6275 { 0x20, AC_VERB_SET_COEF_INDEX, 0x4a },
6276 { 0x20, AC_VERB_SET_PROC_COEF, 0x202b },
6277 { 0x20, AC_VERB_SET_COEF_INDEX, 0x62 },
6278 { 0x20, AC_VERB_SET_PROC_COEF, 0xa007 },
6279 { 0x20, AC_VERB_SET_COEF_INDEX, 0x6b },
6280 { 0x20, AC_VERB_SET_PROC_COEF, 0x5060 },
6281 {}
6282 },
6283 .chained = true,
6284 .chain_id = ALC2XX_FIXUP_HEADSET_MIC,
6285 },
6286 [ALC256_FIXUP_ASUS_HPE] = {
6287 .type = HDA_FIXUP_VERBS,
6288 .v.verbs = (const struct hda_verb[]) {
6289 /* Set EAPD high */
6290 { 0x20, AC_VERB_SET_COEF_INDEX, 0x0f },
6291 { 0x20, AC_VERB_SET_PROC_COEF, 0x7778 },
6292 { }
6293 },
6294 .chained = true,
6295 .chain_id = ALC294_FIXUP_ASUS_HEADSET_MIC
6296 },
6297 [ALC285_FIXUP_THINKPAD_NO_BASS_SPK_HEADSET_JACK] = {
6298 .type = HDA_FIXUP_FUNC,
6299 .v.func = alc_fixup_headset_jack,
6300 .chained = true,
6301 .chain_id = ALC269_FIXUP_THINKPAD_ACPI
6302 },
6303 [ALC287_FIXUP_HP_GPIO_LED] = {
6304 .type = HDA_FIXUP_FUNC,
6305 .v.func = alc287_fixup_hp_gpio_led,
6306 },
6307 [ALC256_FIXUP_HP_HEADSET_MIC] = {
6308 .type = HDA_FIXUP_FUNC,
6309 .v.func = alc274_fixup_hp_headset_mic,
6310 },
6311 [ALC236_FIXUP_DELL_AIO_HEADSET_MIC] = {
6312 .type = HDA_FIXUP_FUNC,
6313 .v.func = alc_fixup_no_int_mic,
6314 .chained = true,
6315 .chain_id = ALC255_FIXUP_DELL1_MIC_NO_PRESENCE
6316 },
6317 [ALC282_FIXUP_ACER_DISABLE_LINEOUT] = {
6318 .type = HDA_FIXUP_PINS,
6319 .v.pins = (const struct hda_pintbl[]) {
6320 { 0x1b, 0x411111f0 },
6321 { 0x18, 0x01a1913c }, /* use as headset mic, without its own jack detect */
6322 { },
6323 },
6324 .chained = true,
6325 .chain_id = ALC269_FIXUP_HEADSET_MODE
6326 },
6327 [ALC255_FIXUP_ACER_LIMIT_INT_MIC_BOOST] = {
6328 .type = HDA_FIXUP_FUNC,
6329 .v.func = alc269_fixup_limit_int_mic_boost,
6330 .chained = true,
6331 .chain_id = ALC255_FIXUP_ACER_MIC_NO_PRESENCE,
6332 },
6333 [ALC256_FIXUP_ACER_HEADSET_MIC] = {
6334 .type = HDA_FIXUP_PINS,
6335 .v.pins = (const struct hda_pintbl[]) {
6336 { 0x19, 0x02a1113c }, /* use as headset mic, without its own jack detect */
6337 { 0x1a, 0x90a1092f }, /* use as internal mic */
6338 { }
6339 },
6340 .chained = true,
6341 .chain_id = ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC
6342 },
6343 [ALC256_FIXUP_ACER_COLDBOOT] = {
6344 .type = HDA_FIXUP_FUNC,
6345 .v.func = alc_fixup_headset_mode_acer_coldboot,
6346 .chained = true,
6347 .chain_id = ALC256_FIXUP_ACER_SFG16_MICMUTE_LED,
6348 },
6349 [ALC285_FIXUP_IDEAPAD_S740_COEF] = {
6350 .type = HDA_FIXUP_FUNC,
6351 .v.func = alc285_fixup_ideapad_s740_coef,
6352 .chained = true,
6353 .chain_id = ALC269_FIXUP_THINKPAD_ACPI,
6354 },
6355 [ALC285_FIXUP_HP_LIMIT_INT_MIC_BOOST] = {
6356 .type = HDA_FIXUP_FUNC,
6357 .v.func = alc269_fixup_limit_int_mic_boost,
6358 .chained = true,
6359 .chain_id = ALC285_FIXUP_HP_MUTE_LED,
6360 },
6361 [ALC295_FIXUP_ASUS_DACS] = {
6362 .type = HDA_FIXUP_FUNC,
6363 .v.func = alc295_fixup_asus_dacs,
6364 },
6365 [ALC295_FIXUP_HP_OMEN] = {
6366 .type = HDA_FIXUP_PINS,
6367 .v.pins = (const struct hda_pintbl[]) {
6368 { 0x12, 0xb7a60130 },
6369 { 0x13, 0x40000000 },
6370 { 0x14, 0x411111f0 },
6371 { 0x16, 0x411111f0 },
6372 { 0x17, 0x90170110 },
6373 { 0x18, 0x411111f0 },
6374 { 0x19, 0x02a11030 },
6375 { 0x1a, 0x411111f0 },
6376 { 0x1b, 0x04a19030 },
6377 { 0x1d, 0x40600001 },
6378 { 0x1e, 0x411111f0 },
6379 { 0x21, 0x03211020 },
6380 {}
6381 },
6382 .chained = true,
6383 .chain_id = ALC269_FIXUP_HP_LINE1_MIC1_LED,
6384 },
6385 [ALC285_FIXUP_HP_SPECTRE_X360] = {
6386 .type = HDA_FIXUP_FUNC,
6387 .v.func = alc285_fixup_hp_spectre_x360,
6388 },
6389 [ALC285_FIXUP_HP_SPECTRE_X360_EB1] = {
6390 .type = HDA_FIXUP_FUNC,
6391 .v.func = alc285_fixup_hp_spectre_x360_eb1
6392 },
6393 [ALC285_FIXUP_HP_SPECTRE_X360_DF1] = {
6394 .type = HDA_FIXUP_FUNC,
6395 .v.func = alc285_fixup_hp_spectre_x360_df1
6396 },
6397 [ALC285_FIXUP_HP_ENVY_X360] = {
6398 .type = HDA_FIXUP_FUNC,
6399 .v.func = alc285_fixup_hp_envy_x360,
6400 .chained = true,
6401 .chain_id = ALC285_FIXUP_HP_GPIO_AMP_INIT,
6402 },
6403 [ALC287_FIXUP_IDEAPAD_BASS_SPK_AMP] = {
6404 .type = HDA_FIXUP_FUNC,
6405 .v.func = alc285_fixup_ideapad_s740_coef,
6406 .chained = true,
6407 .chain_id = ALC285_FIXUP_THINKPAD_HEADSET_JACK,
6408 },
6409 [ALC287_FIXUP_LENOVO_YOGA_PRO7] = {
6410 .type = HDA_FIXUP_FUNC,
6411 .v.func = alc_fixup_yoga_pro7_audio,
6412 .chained = true,
6413 .chain_id = ALC269_FIXUP_LENOVO_XPAD_ACPI,
6414 },
6415 [ALC287_FIXUP_LENOVO_XPAD_HEADSET_JACK] = {
6416 .type = HDA_FIXUP_FUNC,
6417 .v.func = alc_fixup_headset_jack,
6418 .chained = true,
6419 /* Same as ALC285_FIXUP_THINKPAD_HEADSET_JACK, except that the
6420 * mute LEDs are driven through ideapad_laptop rather than
6421 * thinkpad_acpi.
6422 */
6423 .chain_id = ALC287_FIXUP_LENOVO_YOGA_PRO7,
6424 },
6425 [ALC623_FIXUP_LENOVO_THINKSTATION_P340] = {
6426 .type = HDA_FIXUP_FUNC,
6427 .v.func = alc_fixup_no_shutup,
6428 .chained = true,
6429 .chain_id = ALC283_FIXUP_HEADSET_MIC,
6430 },
6431 [ALC255_FIXUP_ACER_HEADPHONE_AND_MIC] = {
6432 .type = HDA_FIXUP_PINS,
6433 .v.pins = (const struct hda_pintbl[]) {
6434 { 0x21, 0x03211030 }, /* Change the Headphone location to Left */
6435 { }
6436 },
6437 .chained = true,
6438 .chain_id = ALC255_FIXUP_XIAOMI_HEADSET_MIC
6439 },
6440 [ALC236_FIXUP_HP_LIMIT_INT_MIC_BOOST] = {
6441 .type = HDA_FIXUP_FUNC,
6442 .v.func = alc269_fixup_limit_int_mic_boost,
6443 .chained = true,
6444 .chain_id = ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF,
6445 },
6446 [ALC285_FIXUP_LEGION_Y9000X_SPEAKERS] = {
6447 .type = HDA_FIXUP_FUNC,
6448 .v.func = alc285_fixup_ideapad_s740_coef,
6449 .chained = true,
6450 .chain_id = ALC285_FIXUP_LEGION_Y9000X_AUTOMUTE,
6451 },
6452 [ALC285_FIXUP_LEGION_Y9000X_AUTOMUTE] = {
6453 .type = HDA_FIXUP_FUNC,
6454 .v.func = alc287_fixup_legion_15imhg05_speakers,
6455 .chained = true,
6456 .chain_id = ALC269_FIXUP_THINKPAD_ACPI,
6457 },
6458 [ALC287_FIXUP_LEGION_15IMHG05_SPEAKERS] = {
6459 .type = HDA_FIXUP_VERBS,
6460 //.v.verbs = legion_15imhg05_coefs,
6461 .v.verbs = (const struct hda_verb[]) {
6462 // set left speaker Legion 7i.
6463 { 0x20, AC_VERB_SET_COEF_INDEX, 0x24 },
6464 { 0x20, AC_VERB_SET_PROC_COEF, 0x41 },
6465
6466 { 0x20, AC_VERB_SET_COEF_INDEX, 0x26 },
6467 { 0x20, AC_VERB_SET_PROC_COEF, 0xc },
6468 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
6469 { 0x20, AC_VERB_SET_PROC_COEF, 0x1a },
6470 { 0x20, AC_VERB_SET_PROC_COEF, 0xb020 },
6471
6472 { 0x20, AC_VERB_SET_COEF_INDEX, 0x26 },
6473 { 0x20, AC_VERB_SET_PROC_COEF, 0x2 },
6474 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
6475 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
6476 { 0x20, AC_VERB_SET_PROC_COEF, 0xb020 },
6477
6478 // set right speaker Legion 7i.
6479 { 0x20, AC_VERB_SET_COEF_INDEX, 0x24 },
6480 { 0x20, AC_VERB_SET_PROC_COEF, 0x42 },
6481
6482 { 0x20, AC_VERB_SET_COEF_INDEX, 0x26 },
6483 { 0x20, AC_VERB_SET_PROC_COEF, 0xc },
6484 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
6485 { 0x20, AC_VERB_SET_PROC_COEF, 0x2a },
6486 { 0x20, AC_VERB_SET_PROC_COEF, 0xb020 },
6487
6488 { 0x20, AC_VERB_SET_COEF_INDEX, 0x26 },
6489 { 0x20, AC_VERB_SET_PROC_COEF, 0x2 },
6490 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
6491 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
6492 { 0x20, AC_VERB_SET_PROC_COEF, 0xb020 },
6493 {}
6494 },
6495 .chained = true,
6496 .chain_id = ALC287_FIXUP_LEGION_15IMHG05_AUTOMUTE,
6497 },
6498 [ALC287_FIXUP_LEGION_15IMHG05_AUTOMUTE] = {
6499 .type = HDA_FIXUP_FUNC,
6500 .v.func = alc287_fixup_legion_15imhg05_speakers,
6501 .chained = true,
6502 .chain_id = ALC269_FIXUP_HEADSET_MODE,
6503 },
6504 [ALC287_FIXUP_YOGA7_14ITL_SPEAKERS] = {
6505 .type = HDA_FIXUP_VERBS,
6506 .v.verbs = (const struct hda_verb[]) {
6507 // set left speaker Yoga 7i.
6508 { 0x20, AC_VERB_SET_COEF_INDEX, 0x24 },
6509 { 0x20, AC_VERB_SET_PROC_COEF, 0x41 },
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, 0x1a },
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 // set right speaker Yoga 7i.
6524 { 0x20, AC_VERB_SET_COEF_INDEX, 0x24 },
6525 { 0x20, AC_VERB_SET_PROC_COEF, 0x46 },
6526
6527 { 0x20, AC_VERB_SET_COEF_INDEX, 0x26 },
6528 { 0x20, AC_VERB_SET_PROC_COEF, 0xc },
6529 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
6530 { 0x20, AC_VERB_SET_PROC_COEF, 0x2a },
6531 { 0x20, AC_VERB_SET_PROC_COEF, 0xb020 },
6532
6533 { 0x20, AC_VERB_SET_COEF_INDEX, 0x26 },
6534 { 0x20, AC_VERB_SET_PROC_COEF, 0x2 },
6535 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
6536 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
6537 { 0x20, AC_VERB_SET_PROC_COEF, 0xb020 },
6538 {}
6539 },
6540 .chained = true,
6541 .chain_id = ALC269_FIXUP_HEADSET_MODE,
6542 },
6543 [ALC298_FIXUP_LENOVO_C940_DUET7] = {
6544 .type = HDA_FIXUP_FUNC,
6545 .v.func = alc298_fixup_lenovo_c940_duet7,
6546 },
6547 [ALC287_FIXUP_LENOVO_YOGA_BOOK_9I] = {
6548 .type = HDA_FIXUP_FUNC,
6549 .v.func = alc287_fixup_lenovo_yoga_book_9i,
6550 },
6551 [ALC287_FIXUP_13S_GEN2_SPEAKERS] = {
6552 .type = HDA_FIXUP_VERBS,
6553 .v.verbs = (const struct hda_verb[]) {
6554 { 0x20, AC_VERB_SET_COEF_INDEX, 0x24 },
6555 { 0x20, AC_VERB_SET_PROC_COEF, 0x41 },
6556 { 0x20, AC_VERB_SET_COEF_INDEX, 0x26 },
6557 { 0x20, AC_VERB_SET_PROC_COEF, 0x2 },
6558 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
6559 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
6560 { 0x20, AC_VERB_SET_PROC_COEF, 0xb020 },
6561 { 0x20, AC_VERB_SET_COEF_INDEX, 0x24 },
6562 { 0x20, AC_VERB_SET_PROC_COEF, 0x42 },
6563 { 0x20, AC_VERB_SET_COEF_INDEX, 0x26 },
6564 { 0x20, AC_VERB_SET_PROC_COEF, 0x2 },
6565 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
6566 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
6567 { 0x20, AC_VERB_SET_PROC_COEF, 0xb020 },
6568 {}
6569 },
6570 .chained = true,
6571 .chain_id = ALC269_FIXUP_HEADSET_MODE,
6572 },
6573 [ALC256_FIXUP_SET_COEF_DEFAULTS] = {
6574 .type = HDA_FIXUP_FUNC,
6575 .v.func = alc256_fixup_set_coef_defaults,
6576 },
6577 [ALC245_FIXUP_HP_GPIO_LED] = {
6578 .type = HDA_FIXUP_FUNC,
6579 .v.func = alc245_fixup_hp_gpio_led,
6580 },
6581 [ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE] = {
6582 .type = HDA_FIXUP_PINS,
6583 .v.pins = (const struct hda_pintbl[]) {
6584 { 0x19, 0x03a11120 }, /* use as headset mic, without its own jack detect */
6585 { }
6586 },
6587 .chained = true,
6588 .chain_id = ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC,
6589 },
6590 [ALC233_FIXUP_NO_AUDIO_JACK] = {
6591 .type = HDA_FIXUP_FUNC,
6592 .v.func = alc233_fixup_no_audio_jack,
6593 },
6594 [ALC256_FIXUP_MIC_NO_PRESENCE_AND_RESUME] = {
6595 .type = HDA_FIXUP_FUNC,
6596 .v.func = alc256_fixup_mic_no_presence_and_resume,
6597 .chained = true,
6598 .chain_id = ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC
6599 },
6600 [ALC256_FIXUP_XIAOMI_PRO15_RESUME] = {
6601 .type = HDA_FIXUP_FUNC,
6602 .v.func = alc256_fixup_xiaomi_pro15_resume,
6603 },
6604 [ALC287_FIXUP_LEGION_16ACHG6] = {
6605 .type = HDA_FIXUP_FUNC,
6606 .v.func = alc287_fixup_legion_16achg6_speakers,
6607 },
6608 [ALC287_FIXUP_CS35L41_I2C_2] = {
6609 .type = HDA_FIXUP_FUNC,
6610 .v.func = cs35l41_fixup_i2c_two,
6611 },
6612 [ALC287_FIXUP_CS35L41_I2C_2_HP_GPIO_LED] = {
6613 .type = HDA_FIXUP_FUNC,
6614 .v.func = cs35l41_fixup_i2c_two,
6615 .chained = true,
6616 .chain_id = ALC285_FIXUP_HP_MUTE_LED,
6617 },
6618 [ALC287_FIXUP_CS35L41_I2C_2_HP_MUTE_LEDS] = {
6619 .type = HDA_FIXUP_FUNC,
6620 .v.func = cs35l41_fixup_i2c_two,
6621 .chained = true,
6622 .chain_id = ALC245_FIXUP_HP_X360_MUTE_LEDS,
6623 },
6624 [ALC287_FIXUP_CS35L41_I2C_4] = {
6625 .type = HDA_FIXUP_FUNC,
6626 .v.func = cs35l41_fixup_i2c_four,
6627 },
6628 [ALC245_FIXUP_CS35L41_SPI_2] = {
6629 .type = HDA_FIXUP_FUNC,
6630 .v.func = cs35l41_fixup_spi_two,
6631 },
6632 [ALC245_FIXUP_CS35L41_SPI_1] = {
6633 .type = HDA_FIXUP_FUNC,
6634 .v.func = cs35l41_fixup_spi_one,
6635 },
6636 [ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED] = {
6637 .type = HDA_FIXUP_FUNC,
6638 .v.func = cs35l41_fixup_spi_two,
6639 .chained = true,
6640 .chain_id = ALC285_FIXUP_HP_GPIO_LED,
6641 },
6642 [ALC245_FIXUP_CS35L41_SPI_4] = {
6643 .type = HDA_FIXUP_FUNC,
6644 .v.func = cs35l41_fixup_spi_four,
6645 },
6646 [ALC245_FIXUP_CS35L41_SPI_4_HP_GPIO_LED] = {
6647 .type = HDA_FIXUP_FUNC,
6648 .v.func = cs35l41_fixup_spi_four,
6649 .chained = true,
6650 .chain_id = ALC285_FIXUP_HP_GPIO_LED,
6651 },
6652 [ALC285_FIXUP_HP_SPEAKERS_MICMUTE_LED] = {
6653 .type = HDA_FIXUP_VERBS,
6654 .v.verbs = (const struct hda_verb[]) {
6655 { 0x20, AC_VERB_SET_COEF_INDEX, 0x19 },
6656 { 0x20, AC_VERB_SET_PROC_COEF, 0x8e11 },
6657 { }
6658 },
6659 .chained = true,
6660 .chain_id = ALC285_FIXUP_HP_MUTE_LED,
6661 },
6662 [ALC269_FIXUP_DELL4_MIC_NO_PRESENCE_QUIET] = {
6663 .type = HDA_FIXUP_FUNC,
6664 .v.func = alc_fixup_dell4_mic_no_presence_quiet,
6665 .chained = true,
6666 .chain_id = ALC269_FIXUP_DELL4_MIC_NO_PRESENCE,
6667 },
6668 [ALC295_FIXUP_FRAMEWORK_LAPTOP_MIC_NO_PRESENCE] = {
6669 .type = HDA_FIXUP_PINS,
6670 .v.pins = (const struct hda_pintbl[]) {
6671 { 0x19, 0x02a1112c }, /* use as headset mic, without its own jack detect */
6672 { }
6673 },
6674 .chained = true,
6675 .chain_id = ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC
6676 },
6677 [ALC295_FIXUP_FRAMEWORK_LAPTOP_LIMIT_INT_MIC_BOOST] = {
6678 .type = HDA_FIXUP_FUNC,
6679 .v.func = alc269_fixup_limit_int_mic_boost,
6680 .chained = true,
6681 .chain_id = ALC295_FIXUP_FRAMEWORK_LAPTOP_MIC_NO_PRESENCE,
6682 },
6683 [ALC287_FIXUP_LEGION_16ITHG6] = {
6684 .type = HDA_FIXUP_FUNC,
6685 .v.func = alc287_fixup_legion_16ithg6_speakers,
6686 },
6687 [ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK] = {
6688 .type = HDA_FIXUP_VERBS,
6689 .v.verbs = (const struct hda_verb[]) {
6690 // enable left speaker
6691 { 0x20, AC_VERB_SET_COEF_INDEX, 0x24 },
6692 { 0x20, AC_VERB_SET_PROC_COEF, 0x41 },
6693
6694 { 0x20, AC_VERB_SET_COEF_INDEX, 0x26 },
6695 { 0x20, AC_VERB_SET_PROC_COEF, 0xc },
6696 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
6697 { 0x20, AC_VERB_SET_PROC_COEF, 0x1a },
6698 { 0x20, AC_VERB_SET_PROC_COEF, 0xb020 },
6699
6700 { 0x20, AC_VERB_SET_COEF_INDEX, 0x26 },
6701 { 0x20, AC_VERB_SET_PROC_COEF, 0xf },
6702 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
6703 { 0x20, AC_VERB_SET_PROC_COEF, 0x42 },
6704 { 0x20, AC_VERB_SET_PROC_COEF, 0xb020 },
6705
6706 { 0x20, AC_VERB_SET_COEF_INDEX, 0x26 },
6707 { 0x20, AC_VERB_SET_PROC_COEF, 0x10 },
6708 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
6709 { 0x20, AC_VERB_SET_PROC_COEF, 0x40 },
6710 { 0x20, AC_VERB_SET_PROC_COEF, 0xb020 },
6711
6712 { 0x20, AC_VERB_SET_COEF_INDEX, 0x26 },
6713 { 0x20, AC_VERB_SET_PROC_COEF, 0x2 },
6714 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
6715 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
6716 { 0x20, AC_VERB_SET_PROC_COEF, 0xb020 },
6717
6718 // enable right speaker
6719 { 0x20, AC_VERB_SET_COEF_INDEX, 0x24 },
6720 { 0x20, AC_VERB_SET_PROC_COEF, 0x46 },
6721
6722 { 0x20, AC_VERB_SET_COEF_INDEX, 0x26 },
6723 { 0x20, AC_VERB_SET_PROC_COEF, 0xc },
6724 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
6725 { 0x20, AC_VERB_SET_PROC_COEF, 0x2a },
6726 { 0x20, AC_VERB_SET_PROC_COEF, 0xb020 },
6727
6728 { 0x20, AC_VERB_SET_COEF_INDEX, 0x26 },
6729 { 0x20, AC_VERB_SET_PROC_COEF, 0xf },
6730 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
6731 { 0x20, AC_VERB_SET_PROC_COEF, 0x46 },
6732 { 0x20, AC_VERB_SET_PROC_COEF, 0xb020 },
6733
6734 { 0x20, AC_VERB_SET_COEF_INDEX, 0x26 },
6735 { 0x20, AC_VERB_SET_PROC_COEF, 0x10 },
6736 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
6737 { 0x20, AC_VERB_SET_PROC_COEF, 0x44 },
6738 { 0x20, AC_VERB_SET_PROC_COEF, 0xb020 },
6739
6740 { 0x20, AC_VERB_SET_COEF_INDEX, 0x26 },
6741 { 0x20, AC_VERB_SET_PROC_COEF, 0x2 },
6742 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
6743 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
6744 { 0x20, AC_VERB_SET_PROC_COEF, 0xb020 },
6745
6746 { },
6747 },
6748 },
6749 [ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK_PIN] = {
6750 .type = HDA_FIXUP_FUNC,
6751 .v.func = alc287_fixup_yoga9_14iap7_bass_spk_pin,
6752 .chained = true,
6753 .chain_id = ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK,
6754 },
6755 [ALC287_FIXUP_YOGA9_14IMH9_BASS_SPK_PIN] = {
6756 .type = HDA_FIXUP_FUNC,
6757 .v.func = alc287_fixup_yoga9_14iap7_bass_spk_pin,
6758 .chained = true,
6759 .chain_id = ALC287_FIXUP_CS35L41_I2C_2,
6760 },
6761 [ALC295_FIXUP_DELL_INSPIRON_TOP_SPEAKERS] = {
6762 .type = HDA_FIXUP_FUNC,
6763 .v.func = alc295_fixup_dell_inspiron_top_speakers,
6764 .chained = true,
6765 .chain_id = ALC269_FIXUP_DELL4_MIC_NO_PRESENCE,
6766 },
6767 [ALC236_FIXUP_DELL_DUAL_CODECS] = {
6768 .type = HDA_FIXUP_PINS,
6769 .v.func = alc1220_fixup_gb_dual_codecs,
6770 .chained = true,
6771 .chain_id = ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
6772 },
6773 [ALC287_FIXUP_CS35L41_I2C_2_THINKPAD_ACPI] = {
6774 .type = HDA_FIXUP_FUNC,
6775 .v.func = cs35l41_fixup_i2c_two,
6776 .chained = true,
6777 .chain_id = ALC285_FIXUP_THINKPAD_NO_BASS_SPK_HEADSET_JACK,
6778 },
6779 [ALC287_FIXUP_TAS2781_I2C] = {
6780 .type = HDA_FIXUP_FUNC,
6781 .v.func = tas2781_fixup_tias_i2c,
6782 .chained = true,
6783 .chain_id = ALC285_FIXUP_THINKPAD_HEADSET_JACK,
6784 },
6785 [ALC287_FIXUP_ASUS_ALLY_X] = {
6786 .type = HDA_FIXUP_PINS,
6787 .v.pins = (const struct hda_pintbl[]) {
6788 { 0x19, 0x03a11050 }, /* headset mic */
6789 { }
6790 },
6791 .chained = true,
6792 .chain_id = ALC287_FIXUP_ASUS_ALLY_X_SPEAKER,
6793 },
6794 [ALC287_FIXUP_ASUS_ALLY_X_SPEAKER] = {
6795 .type = HDA_FIXUP_FUNC,
6796 .v.func = alc285_fixup_speaker2_to_dac1,
6797 .chained = true,
6798 .chain_id = ALC287_FIXUP_ASUS_ALLY_X_I2C,
6799 },
6800 [ALC287_FIXUP_ASUS_ALLY_X_I2C] = {
6801 .type = HDA_FIXUP_FUNC,
6802 .v.func = tas2781_fixup_tias_i2c,
6803 .chained = true,
6804 .chain_id = ALC225_FIXUP_HEADSET_JACK,
6805 },
6806 [ALC245_FIXUP_TAS2781_SPI_2] = {
6807 .type = HDA_FIXUP_FUNC,
6808 .v.func = tas2781_fixup_spi,
6809 .chained = true,
6810 .chain_id = ALC285_FIXUP_HP_GPIO_LED,
6811 },
6812 [ALC287_FIXUP_TXNW2781_I2C] = {
6813 .type = HDA_FIXUP_FUNC,
6814 .v.func = tas2781_fixup_txnw_i2c,
6815 .chained = true,
6816 .chain_id = ALC285_FIXUP_THINKPAD_HEADSET_JACK,
6817 },
6818 [ALC287_FIXUP_TXNW2781_I2C_ASUS] = {
6819 .type = HDA_FIXUP_FUNC,
6820 .v.func = tas2781_fixup_txnw_i2c,
6821 .chained = true,
6822 .chain_id = ALC294_FIXUP_ASUS_SPK,
6823 },
6824 [ALC287_FIXUP_YOGA7_14ARB7_I2C] = {
6825 .type = HDA_FIXUP_FUNC,
6826 .v.func = yoga7_14arb7_fixup_i2c,
6827 .chained = true,
6828 .chain_id = ALC285_FIXUP_THINKPAD_HEADSET_JACK,
6829 },
6830 [ALC245_FIXUP_HP_MUTE_LED_COEFBIT] = {
6831 .type = HDA_FIXUP_FUNC,
6832 .v.func = alc245_fixup_hp_mute_led_coefbit,
6833 },
6834 [ALC245_FIXUP_HP_MUTE_LED_V1_COEFBIT] = {
6835 .type = HDA_FIXUP_FUNC,
6836 .v.func = alc245_fixup_hp_mute_led_v1_coefbit,
6837 },
6838 [ALC245_FIXUP_HP_MUTE_LED_V2_COEFBIT] = {
6839 .type = HDA_FIXUP_FUNC,
6840 .v.func = alc245_fixup_hp_mute_led_v2_coefbit,
6841 },
6842 [ALC245_FIXUP_HP_X360_MUTE_LEDS] = {
6843 .type = HDA_FIXUP_FUNC,
6844 .v.func = alc245_fixup_hp_mute_led_coefbit,
6845 .chained = true,
6846 .chain_id = ALC245_FIXUP_HP_GPIO_LED
6847 },
6848 [ALC287_FIXUP_THINKPAD_I2S_SPK] = {
6849 .type = HDA_FIXUP_FUNC,
6850 .v.func = alc287_fixup_bind_dacs,
6851 .chained = true,
6852 .chain_id = ALC285_FIXUP_THINKPAD_NO_BASS_SPK_HEADSET_JACK,
6853 },
6854 [ALC287_FIXUP_MG_RTKC_CSAMP_CS35L41_I2C_THINKPAD] = {
6855 .type = HDA_FIXUP_FUNC,
6856 .v.func = alc287_fixup_tb_vmaster_led,
6857 .chained = true,
6858 .chain_id = ALC287_FIXUP_CS35L41_I2C_2_THINKPAD_ACPI,
6859 },
6860 [ALC2XX_FIXUP_HEADSET_MIC] = {
6861 .type = HDA_FIXUP_FUNC,
6862 .v.func = alc2xx_fixup_headset_mic,
6863 },
6864 [ALC289_FIXUP_DELL_CS35L41_SPI_2] = {
6865 .type = HDA_FIXUP_FUNC,
6866 .v.func = cs35l41_fixup_spi_two,
6867 .chained = true,
6868 .chain_id = ALC289_FIXUP_DUAL_SPK
6869 },
6870 [ALC256_FIXUP_ACER_SFG16_MICMUTE_LED] = {
6871 .type = HDA_FIXUP_FUNC,
6872 .v.func = alc256_fixup_acer_sfg16_micmute_led,
6873 },
6874 [ALC256_FIXUP_HEADPHONE_AMP_VOL] = {
6875 .type = HDA_FIXUP_FUNC,
6876 .v.func = alc256_decrease_headphone_amp_val,
6877 },
6878 [ALC245_FIXUP_HP_SPECTRE_X360_EU0XXX] = {
6879 .type = HDA_FIXUP_FUNC,
6880 .v.func = alc245_fixup_hp_spectre_x360_eu0xxx,
6881 },
6882 [ALC245_FIXUP_HP_SPECTRE_X360_16_AA0XXX] = {
6883 .type = HDA_FIXUP_FUNC,
6884 .v.func = alc245_fixup_hp_spectre_x360_16_aa0xxx,
6885 },
6886 [ALC245_FIXUP_HP_ZBOOK_FIREFLY_G12A] = {
6887 .type = HDA_FIXUP_FUNC,
6888 .v.func = alc245_fixup_hp_zbook_firefly_g12a,
6889 },
6890 [ALC285_FIXUP_ASUS_GA403U] = {
6891 .type = HDA_FIXUP_FUNC,
6892 .v.func = alc285_fixup_asus_ga403u,
6893 },
6894 [ALC285_FIXUP_ASUS_GA403U_HEADSET_MIC] = {
6895 .type = HDA_FIXUP_PINS,
6896 .v.pins = (const struct hda_pintbl[]) {
6897 { 0x19, 0x03a11050 },
6898 { 0x1b, 0x03a11c30 },
6899 { }
6900 },
6901 .chained = true,
6902 .chain_id = ALC285_FIXUP_ASUS_GA403U_I2C_SPEAKER2_TO_DAC1
6903 },
6904 [ALC285_FIXUP_ASUS_GU605_SPI_SPEAKER2_TO_DAC1] = {
6905 .type = HDA_FIXUP_FUNC,
6906 .v.func = alc285_fixup_speaker2_to_dac1,
6907 .chained = true,
6908 .chain_id = ALC285_FIXUP_ASUS_GU605_SPI_2_HEADSET_MIC,
6909 },
6910 [ALC285_FIXUP_ASUS_GU605_SPI_2_HEADSET_MIC] = {
6911 .type = HDA_FIXUP_PINS,
6912 .v.pins = (const struct hda_pintbl[]) {
6913 { 0x19, 0x03a11050 },
6914 { 0x1b, 0x03a11c30 },
6915 { }
6916 },
6917 },
6918 [ALC285_FIXUP_ASUS_GA403U_I2C_SPEAKER2_TO_DAC1] = {
6919 .type = HDA_FIXUP_FUNC,
6920 .v.func = alc285_fixup_speaker2_to_dac1,
6921 .chained = true,
6922 .chain_id = ALC285_FIXUP_ASUS_GA403U,
6923 },
6924 [ALC287_FIXUP_LENOVO_THKPAD_WH_ALC1318] = {
6925 .type = HDA_FIXUP_FUNC,
6926 .v.func = alc287_fixup_lenovo_thinkpad_with_alc1318,
6927 .chained = true,
6928 .chain_id = ALC269_FIXUP_THINKPAD_ACPI
6929 },
6930 [ALC256_FIXUP_CHROME_BOOK] = {
6931 .type = HDA_FIXUP_FUNC,
6932 .v.func = alc256_fixup_chromebook,
6933 .chained = true,
6934 .chain_id = ALC225_FIXUP_HEADSET_JACK
6935 },
6936 [ALC245_FIXUP_CLEVO_NOISY_MIC] = {
6937 .type = HDA_FIXUP_FUNC,
6938 .v.func = alc269_fixup_limit_int_mic_boost,
6939 .chained = true,
6940 .chain_id = ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE,
6941 },
6942 [ALC245_FIXUP_MINISFORUM_JACK_DETECT] = {
6943 .type = HDA_FIXUP_FUNC,
6944 .v.func = alc245_fixup_minisforum_jack_detect,
6945 },
6946 [ALC269_FIXUP_VAIO_VJFH52_MIC_NO_PRESENCE] = {
6947 .type = HDA_FIXUP_PINS,
6948 .v.pins = (const struct hda_pintbl[]) {
6949 { 0x19, 0x03a1113c }, /* use as headset mic, without its own jack detect */
6950 { 0x1b, 0x20a11040 }, /* dock mic */
6951 { }
6952 },
6953 .chained = true,
6954 .chain_id = ALC269_FIXUP_LIMIT_INT_MIC_BOOST
6955 },
6956 [ALC233_FIXUP_MEDION_MTL_SPK] = {
6957 .type = HDA_FIXUP_PINS,
6958 .v.pins = (const struct hda_pintbl[]) {
6959 { 0x1b, 0x90170110 },
6960 { }
6961 },
6962 },
6963 [ALC233_FIXUP_STARLABS_STARFIGHTER] = {
6964 .type = HDA_FIXUP_FUNC,
6965 .v.func = alc233_fixup_starlabs_starfighter,
6966 .chained = true,
6967 .chain_id = ALC269_FIXUP_LIMIT_INT_MIC_BOOST,
6968 },
6969 [ALC294_FIXUP_BASS_SPEAKER_15] = {
6970 .type = HDA_FIXUP_FUNC,
6971 .v.func = alc294_fixup_bass_speaker_15,
6972 },
6973 [ALC283_FIXUP_DELL_HP_RESUME] = {
6974 .type = HDA_FIXUP_FUNC,
6975 .v.func = alc283_fixup_dell_hp_resume,
6976 },
6977 [ALC294_FIXUP_ASUS_CS35L41_SPI_2] = {
6978 .type = HDA_FIXUP_FUNC,
6979 .v.func = cs35l41_fixup_spi_two,
6980 .chained = true,
6981 .chain_id = ALC294_FIXUP_ASUS_HEADSET_MIC,
6982 },
6983 [ALC274_FIXUP_HP_AIO_BIND_DACS] = {
6984 .type = HDA_FIXUP_FUNC,
6985 .v.func = alc274_fixup_hp_aio_bind_dacs,
6986 },
6987 [ALC285_FIXUP_ASUS_GA605K_HEADSET_MIC] = {
6988 .type = HDA_FIXUP_PINS,
6989 .v.pins = (const struct hda_pintbl[]) {
6990 { 0x19, 0x03a11050 },
6991 { 0x1b, 0x03a11c30 },
6992 { }
6993 },
6994 .chained = true,
6995 .chain_id = ALC285_FIXUP_SPEAKER2_TO_DAC1
6996 },
6997 [ALC269_FIXUP_POSITIVO_P15X_HEADSET_MIC] = {
6998 .type = HDA_FIXUP_FUNC,
6999 .v.func = alc269_fixup_limit_int_mic_boost,
7000 .chained = true,
7001 .chain_id = ALC269VC_FIXUP_ACER_MIC_NO_PRESENCE,
7002 },
7003 [ALC289_FIXUP_ASUS_ZEPHYRUS_DUAL_SPK] = {
7004 .type = HDA_FIXUP_PINS,
7005 .v.pins = (const struct hda_pintbl[]) {
7006 { 0x17, 0x90170151 }, /* Internal Speaker LFE */
7007 { 0x1e, 0x90170150 }, /* Internal Speaker */
7008 { }
7009 },
7010 },
7011 [ALC256_FIXUP_VAIO_RPL_MIC_NO_PRESENCE] = {
7012 .type = HDA_FIXUP_PINS,
7013 .v.pins = (const struct hda_pintbl[]) {
7014 { 0x19, 0x03a1113c }, /* use as headset mic, without its own jack detect */
7015 { 0x1a, 0x22a190a0 }, /* dock mic */
7016 { }
7017 },
7018 .chained = true,
7019 .chain_id = ALC269_FIXUP_LIMIT_INT_MIC_BOOST
7020 },
7021 [ALC245_FIXUP_HP_TAS2781_SPI_MUTE_LED] = {
7022 .type = HDA_FIXUP_FUNC,
7023 .v.func = alc245_tas2781_spi_hp_fixup_muteled,
7024 },
7025 [ALC245_FIXUP_HP_TAS2781_I2C_MUTE_LED] = {
7026 .type = HDA_FIXUP_FUNC,
7027 .v.func = alc245_tas2781_i2c_hp_fixup_muteled,
7028 },
7029 [ALC245_FIXUP_HP_TAS2781_I2C_MUTE_LED_INVERTED] = {
7030 .type = HDA_FIXUP_FUNC,
7031 .v.func = alc245_tas2781_i2c_hp_fixup_muteled_inverted,
7032 },
7033 [ALC288_FIXUP_SURFACE_SWAP_DACS] = {
7034 .type = HDA_FIXUP_FUNC,
7035 .v.func = alc288_fixup_surface_swap_dacs,
7036 },
7037 [ALC233_FIXUP_LENOVO_GPIO2_MIC_HOTKEY] = {
7038 .type = HDA_FIXUP_FUNC,
7039 .v.func = alc233_fixup_lenovo_gpio2_mic_hotkey,
7040 },
7041 [ALC245_FIXUP_BASS_HP_DAC] = {
7042 .type = HDA_FIXUP_FUNC,
7043 /* Borrow the DAC routing selected for those Thinkpads */
7044 .v.func = alc285_fixup_thinkpad_x1_gen7,
7045 },
7046 [ALC245_FIXUP_ACER_MICMUTE_LED] = {
7047 .type = HDA_FIXUP_FUNC,
7048 .v.func = alc285_fixup_hp_coef_micmute_led,
7049 .chained = true,
7050 .chain_id = ALC2XX_FIXUP_HEADSET_MIC,
7051 },
7052 [ALC245_FIXUP_CS35L41_I2C_2_MUTE_LED] = {
7053 .type = HDA_FIXUP_FUNC,
7054 .v.func = alc245_fixup_hp_mute_led_coefbit,
7055 .chained = true,
7056 .chain_id = ALC287_FIXUP_CS35L41_I2C_2,
7057 },
7058 [ALC236_FIXUP_HP_DMIC] = {
7059 .type = HDA_FIXUP_PINS,
7060 .v.pins = (const struct hda_pintbl[]) {
7061 { 0x12, 0x90a60160 }, /* use as internal mic */
7062 { }
7063 },
7064 },
7065 [ALC256_FIXUP_HONOR_MRB_XXX_M1020_AUDIO] = {
7066 .type = HDA_FIXUP_PINS,
7067 .v.pins = (const struct hda_pintbl[]) {
7068 { 0x14, 0x90170111 },
7069 { 0x19, 0x03a1113c },
7070 { 0x1a, 0x22a190a0 },
7071 { 0x1b, 0x90170110 },
7072 { }
7073 }
7074 },
7075 [ALC245_FIXUP_HP_ENVY_X360_15_FH0XXX] = {
7076 .type = HDA_FIXUP_FUNC,
7077 .v.func = cs35l41_fixup_i2c_two,
7078 .chained = true,
7079 .chain_id = ALC245_FIXUP_HP_X360_MUTE_LEDS
7080 },
7081 [ALC287_FIXUP_ACER_MICMUTE_LED] = {
7082 .type = HDA_FIXUP_FUNC,
7083 .v.func = alc287_fixup_acer_micmute_led,
7084 .chained = true,
7085 .chain_id = ALC2XX_FIXUP_HEADSET_MIC,
7086 },
7087 [ALC236_FIXUP_DELL_HP_POP_NOISE] = {
7088 .type = HDA_FIXUP_FUNC,
7089 .v.func = alc285_fixup_invalidate_dacs,
7090 },
7091 [ALC274_FIXUP_HP_89E9_GPIO] = {
7092 .type = HDA_FIXUP_FUNC,
7093 .v.func = alc274_fixup_hp_89e9_amp,
7094 },
7095 [ALC274_FIXUP_HP_VERBS] = {
7096 .type = HDA_FIXUP_VERBS,
7097 .v.verbs = (const struct hda_verb[]) {
7098 { 0x20, AC_VERB_SET_COEF_INDEX, 0x0b },
7099 { 0x20, AC_VERB_SET_PROC_COEF, 0x7778 },
7100 { 0x20, AC_VERB_SET_COEF_INDEX, 0x10 },
7101 { 0x20, AC_VERB_SET_PROC_COEF, 0xc580 },
7102 { 0x20, AC_VERB_SET_COEF_INDEX, 0x26 },
7103 { 0x20, AC_VERB_SET_PROC_COEF, 0x5757 },
7104 { 0x20, AC_VERB_SET_COEF_INDEX, 0x62 },
7105 { 0x20, AC_VERB_SET_PROC_COEF, 0xa007 },
7106 { 0x20, AC_VERB_SET_COEF_INDEX, 0x6b },
7107 { 0x20, AC_VERB_SET_PROC_COEF, 0x0060 },
7108 { }
7109 },
7110 .chained = true,
7111 .chain_id = ALC274_FIXUP_HP_89E9_GPIO,
7112 },
7113 [ALC287_FIXUP_AW88399_I2C_2] = {
7114 .type = HDA_FIXUP_FUNC,
7115 .v.func = aw88399_fixup_i2c_two,
7116 },
7117 [ALC287_FIXUP_LENOVO_LEGION_AW88399] = {
7118 .type = HDA_FIXUP_FUNC,
7119 .v.func = alc287_fixup_legion_16iax10h_aw88399,
7120 .chained = true,
7121 .chain_id = ALC287_FIXUP_AW88399_I2C_2,
7122 },
7123 [ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK_PIN_HEADSET] = {
7124 .type = HDA_FIXUP_FUNC,
7125 .v.func = alc_fixup_headset_jack,
7126 .chained = true,
7127 .chain_id = ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK_PIN,
7128 },
7129 [ALC285_LENOVO_DAC_RENAME] = {
7130 .type = HDA_FIXUP_FUNC,
7131 .v.func = alc285_lenovo_dac_rename,
7132 },
7133 [ALC287_FIXUP_YOGA9_SPEAKER2_TO_DAC1] = {
7134 .type = HDA_FIXUP_FUNC,
7135 .v.func = alc285_fixup_speaker2_to_dac1,
7136 .chained = true,
7137 .chain_id = ALC287_FIXUP_TXNW2781_I2C,
7138 },
7139 };
7140
7141 static const struct hda_quirk alc269_fixup_tbl[] = {
7142 SND_PCI_QUIRK(0x1025, 0x0283, "Acer TravelMate 8371", ALC269_FIXUP_INV_DMIC),
7143 SND_PCI_QUIRK(0x1025, 0x029b, "Acer 1810TZ", ALC269_FIXUP_INV_DMIC),
7144 SND_PCI_QUIRK(0x1025, 0x0349, "Acer AOD260", ALC269_FIXUP_INV_DMIC),
7145 SND_PCI_QUIRK(0x1025, 0x047c, "Acer AC700", ALC269_FIXUP_ACER_AC700),
7146 SND_PCI_QUIRK(0x1025, 0x072d, "Acer Aspire V5-571G", ALC269_FIXUP_ASPIRE_HEADSET_MIC),
7147 SND_PCI_QUIRK(0x1025, 0x0740, "Acer AO725", ALC271_FIXUP_HP_GATE_MIC_JACK),
7148 SND_PCI_QUIRK(0x1025, 0x0742, "Acer AO756", ALC271_FIXUP_HP_GATE_MIC_JACK),
7149 SND_PCI_QUIRK(0x1025, 0x0762, "Acer Aspire E1-472", ALC271_FIXUP_HP_GATE_MIC_JACK_E1_572),
7150 SND_PCI_QUIRK(0x1025, 0x0775, "Acer Aspire E1-572", ALC271_FIXUP_HP_GATE_MIC_JACK_E1_572),
7151 SND_PCI_QUIRK(0x1025, 0x079b, "Acer Aspire V5-573G", ALC282_FIXUP_ASPIRE_V5_PINS),
7152 SND_PCI_QUIRK(0x1025, 0x080d, "Acer Aspire V5-122P", ALC269_FIXUP_ASPIRE_HEADSET_MIC),
7153 SND_PCI_QUIRK(0x1025, 0x0840, "Acer Aspire E1", ALC269VB_FIXUP_ASPIRE_E1_COEF),
7154 SND_PCI_QUIRK(0x1025, 0x0943, "Acer Aspire V3-572G", ALC269_FIXUP_ASPIRE_HEADSET_MIC),
7155 SND_PCI_QUIRK(0x1025, 0x100c, "Acer Aspire E5-574G", ALC255_FIXUP_ACER_LIMIT_INT_MIC_BOOST),
7156 SND_PCI_QUIRK(0x1025, 0x101c, "Acer Veriton N2510G", ALC269_FIXUP_LIFEBOOK),
7157 SND_PCI_QUIRK(0x1025, 0x102b, "Acer Aspire C24-860", ALC286_FIXUP_ACER_AIO_MIC_NO_PRESENCE),
7158 SND_PCI_QUIRK(0x1025, 0x1065, "Acer Aspire C20-820", ALC269VC_FIXUP_ACER_HEADSET_MIC),
7159 SND_PCI_QUIRK(0x1025, 0x106d, "Acer Cloudbook 14", ALC283_FIXUP_CHROME_BOOK),
7160 SND_PCI_QUIRK(0x1025, 0x1094, "Acer Aspire E5-575T", ALC255_FIXUP_ACER_LIMIT_INT_MIC_BOOST),
7161 SND_PCI_QUIRK(0x1025, 0x1099, "Acer Aspire E5-523G", ALC255_FIXUP_ACER_MIC_NO_PRESENCE),
7162 SND_PCI_QUIRK(0x1025, 0x110e, "Acer Aspire ES1-432", ALC255_FIXUP_ACER_MIC_NO_PRESENCE),
7163 SND_PCI_QUIRK(0x1025, 0x1166, "Acer Veriton N4640G", ALC269_FIXUP_LIFEBOOK),
7164 SND_PCI_QUIRK(0x1025, 0x1167, "Acer Veriton N6640G", ALC269_FIXUP_LIFEBOOK),
7165 SND_PCI_QUIRK(0x1025, 0x1177, "Acer Predator G9-593", ALC255_FIXUP_PREDATOR_SUBWOOFER),
7166 SND_PCI_QUIRK(0x1025, 0x1178, "Acer Predator G9-593", ALC255_FIXUP_PREDATOR_SUBWOOFER),
7167 SND_PCI_QUIRK(0x1025, 0x1246, "Acer Predator Helios 500", ALC299_FIXUP_PREDATOR_SPK),
7168 SND_PCI_QUIRK(0x1025, 0x1247, "Acer vCopperbox", ALC269VC_FIXUP_ACER_VCOPPERBOX_PINS),
7169 SND_PCI_QUIRK(0x1025, 0x1248, "Acer Veriton N4660G", ALC269VC_FIXUP_ACER_MIC_NO_PRESENCE),
7170 SND_PCI_QUIRK(0x1025, 0x1269, "Acer SWIFT SF314-54", ALC256_FIXUP_ACER_HEADSET_MIC),
7171 SND_PCI_QUIRK(0x1025, 0x126a, "Acer Swift SF114-32", ALC256_FIXUP_ACER_MIC_NO_PRESENCE),
7172 SND_PCI_QUIRK(0x1025, 0x128f, "Acer Veriton Z6860G", ALC286_FIXUP_ACER_AIO_HEADSET_MIC),
7173 SND_PCI_QUIRK(0x1025, 0x1290, "Acer Veriton Z4860G", ALC286_FIXUP_ACER_AIO_HEADSET_MIC),
7174 SND_PCI_QUIRK(0x1025, 0x1291, "Acer Veriton Z4660G", ALC286_FIXUP_ACER_AIO_HEADSET_MIC),
7175 SND_PCI_QUIRK(0x1025, 0x129c, "Acer SWIFT SF314-55", ALC256_FIXUP_ACER_HEADSET_MIC),
7176 SND_PCI_QUIRK(0x1025, 0x129d, "Acer SWIFT SF313-51", ALC256_FIXUP_ACER_MIC_NO_PRESENCE),
7177 SND_PCI_QUIRK(0x1025, 0x1300, "Acer SWIFT SF314-56", ALC256_FIXUP_ACER_MIC_NO_PRESENCE),
7178 SND_PCI_QUIRK(0x1025, 0x1308, "Acer Aspire Z24-890", ALC286_FIXUP_ACER_AIO_HEADSET_MIC),
7179 SND_PCI_QUIRK(0x1025, 0x132a, "Acer TravelMate B114-21", ALC233_FIXUP_ACER_HEADSET_MIC),
7180 SND_PCI_QUIRK(0x1025, 0x1330, "Acer TravelMate X514-51T", ALC255_FIXUP_ACER_HEADSET_MIC),
7181 SND_PCI_QUIRK(0x1025, 0x1360, "Acer Aspire A115", ALC255_FIXUP_ACER_MIC_NO_PRESENCE),
7182 SND_PCI_QUIRK(0x1025, 0x141f, "Acer Spin SP513-54N", ALC255_FIXUP_ACER_MIC_NO_PRESENCE),
7183 SND_PCI_QUIRK(0x1025, 0x142b, "Acer Swift SF314-42", ALC255_FIXUP_ACER_MIC_NO_PRESENCE),
7184 SND_PCI_QUIRK(0x1025, 0x1430, "Acer TravelMate B311R-31", ALC256_FIXUP_ACER_MIC_NO_PRESENCE),
7185 SND_PCI_QUIRK(0x1025, 0x1466, "Acer Aspire A515-56", ALC255_FIXUP_ACER_HEADPHONE_AND_MIC),
7186 SND_PCI_QUIRK(0x1025, 0x1534, "Acer Predator PH315-54", ALC255_FIXUP_ACER_MIC_NO_PRESENCE),
7187 SND_PCI_QUIRK(0x1025, 0x1539, "Acer Nitro 5 AN515-57", ALC2XX_FIXUP_HEADSET_MIC),
7188 SND_PCI_QUIRK(0x1025, 0x159c, "Acer Nitro 5 AN515-58", ALC287_FIXUP_ACER_MICMUTE_LED),
7189 SND_PCI_QUIRK(0x1025, 0x1597, "Acer Nitro 5 AN517-55", ALC2XX_FIXUP_HEADSET_MIC),
7190 SND_PCI_QUIRK(0x1025, 0x159e, "Acer Nitro 5 AN515-46", ALC2XX_FIXUP_HEADSET_MIC),
7191 SND_PCI_QUIRK(0x1025, 0x160e, "Acer PT316-51S", ALC2XX_FIXUP_HEADSET_MIC),
7192 SND_PCI_QUIRK(0x1025, 0x1616, "Acer Aspire A515-57", ALC256_FIXUP_ACER_COLDBOOT),
7193 SND_PCI_QUIRK(0x1025, 0x161f, "Acer S40-54", ALC256_FIXUP_ACER_MIC_NO_PRESENCE),
7194 SND_PCI_QUIRK(0x1025, 0x1640, "Acer Aspire A315-44P", ALC256_FIXUP_ACER_SFG16_MICMUTE_LED),
7195 SND_PCI_QUIRK(0x1025, 0x166c, "Acer Predator PH16-71", ALC2XX_FIXUP_HEADSET_MIC),
7196 SND_PCI_QUIRK(0x1025, 0x1679, "Acer Nitro 16 AN16-41", ALC2XX_FIXUP_HEADSET_MIC),
7197 SND_PCI_QUIRK(0x1025, 0x169a, "Acer Swift SFG16", ALC256_FIXUP_ACER_SFG16_MICMUTE_LED),
7198 SND_PCI_QUIRK(0x1025, 0x171e, "Acer Nitro ANV15-51", ALC245_FIXUP_ACER_MICMUTE_LED),
7199 SND_PCI_QUIRK(0x1025, 0x1731, "Acer Predator PHN16-72", ALC2XX_FIXUP_HEADSET_MIC),
7200 SND_PCI_QUIRK(0x1025, 0x173a, "Acer Swift SFG14-73", ALC245_FIXUP_ACER_MICMUTE_LED),
7201 SND_PCI_QUIRK(0x1025, 0x1758, "Acer Nitro ANV15-41", ALC245_FIXUP_ACER_MICMUTE_LED),
7202 SND_PCI_QUIRK(0x1025, 0x1826, "Acer Helios ZPC", ALC287_FIXUP_PREDATOR_SPK_CS35L41_I2C_2),
7203 SND_PCI_QUIRK(0x1025, 0x182c, "Acer Helios ZPD", ALC287_FIXUP_PREDATOR_SPK_CS35L41_I2C_2),
7204 SND_PCI_QUIRK(0x1025, 0x1844, "Acer Helios ZPS", ALC287_FIXUP_PREDATOR_SPK_CS35L41_I2C_2),
7205 SND_PCI_QUIRK(0x1025, 0x1909, "Acer Nitro ANV16-42", ALC2XX_FIXUP_HEADSET_MIC),
7206 SND_PCI_QUIRK(0x1028, 0x0470, "Dell M101z", ALC269_FIXUP_DELL_M101Z),
7207 SND_PCI_QUIRK(0x1028, 0x053c, "Dell Latitude E5430", ALC292_FIXUP_DELL_E7X),
7208 SND_PCI_QUIRK(0x1028, 0x054b, "Dell XPS one 2710", ALC275_FIXUP_DELL_XPS),
7209 SND_PCI_QUIRK(0x1028, 0x05bd, "Dell Latitude E6440", ALC292_FIXUP_DELL_E7X),
7210 SND_PCI_QUIRK(0x1028, 0x05be, "Dell Latitude E6540", ALC292_FIXUP_DELL_E7X),
7211 SND_PCI_QUIRK(0x1028, 0x05ca, "Dell Latitude E7240", ALC292_FIXUP_DELL_E7X),
7212 SND_PCI_QUIRK(0x1028, 0x05cb, "Dell Latitude E7440", ALC292_FIXUP_DELL_E7X),
7213 SND_PCI_QUIRK(0x1028, 0x05da, "Dell Vostro 5460", ALC290_FIXUP_SUBWOOFER),
7214 SND_PCI_QUIRK(0x1028, 0x05f4, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE),
7215 SND_PCI_QUIRK(0x1028, 0x05f5, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE),
7216 SND_PCI_QUIRK(0x1028, 0x05f6, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE),
7217 SND_PCI_QUIRK(0x1028, 0x0604, "Dell Venue 11 Pro 7130", ALC283_FIXUP_DELL_HP_RESUME),
7218 SND_PCI_QUIRK(0x1028, 0x0615, "Dell Vostro 5470", ALC290_FIXUP_SUBWOOFER_HSJACK),
7219 SND_PCI_QUIRK(0x1028, 0x0616, "Dell Vostro 5470", ALC290_FIXUP_SUBWOOFER_HSJACK),
7220 SND_PCI_QUIRK(0x1028, 0x062c, "Dell Latitude E5550", ALC292_FIXUP_DELL_E7X),
7221 SND_PCI_QUIRK(0x1028, 0x062e, "Dell Latitude E7450", ALC292_FIXUP_DELL_E7X),
7222 SND_PCI_QUIRK(0x1028, 0x0638, "Dell Inspiron 5439", ALC290_FIXUP_MONO_SPEAKERS_HSJACK),
7223 SND_PCI_QUIRK(0x1028, 0x064a, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE),
7224 SND_PCI_QUIRK(0x1028, 0x064b, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE),
7225 SND_PCI_QUIRK(0x1028, 0x0665, "Dell XPS 13", ALC288_FIXUP_DELL_XPS_13),
7226 SND_PCI_QUIRK(0x1028, 0x0669, "Dell Optiplex 9020m", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE),
7227 SND_PCI_QUIRK(0x1028, 0x069a, "Dell Vostro 5480", ALC290_FIXUP_SUBWOOFER_HSJACK),
7228 SND_PCI_QUIRK(0x1028, 0x06c7, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE),
7229 SND_PCI_QUIRK(0x1028, 0x06d9, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE),
7230 SND_PCI_QUIRK(0x1028, 0x06da, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE),
7231 SND_PCI_QUIRK(0x1028, 0x06db, "Dell", ALC293_FIXUP_DISABLE_AAMIX_MULTIJACK),
7232 SND_PCI_QUIRK(0x1028, 0x06dd, "Dell", ALC293_FIXUP_DISABLE_AAMIX_MULTIJACK),
7233 SND_PCI_QUIRK(0x1028, 0x06de, "Dell", ALC293_FIXUP_DISABLE_AAMIX_MULTIJACK),
7234 SND_PCI_QUIRK(0x1028, 0x06df, "Dell", ALC293_FIXUP_DISABLE_AAMIX_MULTIJACK),
7235 SND_PCI_QUIRK(0x1028, 0x06e0, "Dell", ALC293_FIXUP_DISABLE_AAMIX_MULTIJACK),
7236 SND_PCI_QUIRK(0x1028, 0x0706, "Dell Inspiron 7559", ALC256_FIXUP_DELL_INSPIRON_7559_SUBWOOFER),
7237 SND_PCI_QUIRK(0x1028, 0x0725, "Dell Inspiron 3162", ALC255_FIXUP_DELL_SPK_NOISE),
7238 SND_PCI_QUIRK(0x1028, 0x0738, "Dell Precision 5820", ALC269_FIXUP_NO_SHUTUP),
7239 SND_PCI_QUIRK(0x1028, 0x075c, "Dell XPS 27 7760", ALC298_FIXUP_SPK_VOLUME),
7240 SND_PCI_QUIRK(0x1028, 0x075d, "Dell AIO", ALC298_FIXUP_SPK_VOLUME),
7241 SND_PCI_QUIRK(0x1028, 0x0798, "Dell Inspiron 17 7000 Gaming", ALC256_FIXUP_DELL_INSPIRON_7559_SUBWOOFER),
7242 SND_PCI_QUIRK(0x1028, 0x07b0, "Dell Precision 7520", ALC295_FIXUP_DISABLE_DAC3),
7243 SND_PCI_QUIRK(0x1028, 0x080c, "Dell WYSE", ALC225_FIXUP_DELL_WYSE_MIC_NO_PRESENCE),
7244 SND_PCI_QUIRK(0x1028, 0x084b, "Dell", ALC274_FIXUP_DELL_AIO_LINEOUT_VERB),
7245 SND_PCI_QUIRK(0x1028, 0x084e, "Dell", ALC274_FIXUP_DELL_AIO_LINEOUT_VERB),
7246 SND_PCI_QUIRK(0x1028, 0x0871, "Dell Precision 3630", ALC255_FIXUP_DELL_HEADSET_MIC),
7247 SND_PCI_QUIRK(0x1028, 0x0872, "Dell Precision 3630", ALC255_FIXUP_DELL_HEADSET_MIC),
7248 SND_PCI_QUIRK(0x1028, 0x0873, "Dell Precision 3930", ALC255_FIXUP_DUMMY_LINEOUT_VERB),
7249 SND_PCI_QUIRK(0x1028, 0x0879, "Dell Latitude 5420 Rugged", ALC269_FIXUP_DELL4_MIC_NO_PRESENCE),
7250 SND_PCI_QUIRK(0x1028, 0x08ad, "Dell WYSE AIO", ALC225_FIXUP_DELL_WYSE_AIO_MIC_NO_PRESENCE),
7251 SND_PCI_QUIRK(0x1028, 0x08ae, "Dell WYSE NB", ALC225_FIXUP_DELL1_MIC_NO_PRESENCE),
7252 SND_PCI_QUIRK(0x1028, 0x0935, "Dell", ALC274_FIXUP_DELL_AIO_LINEOUT_VERB),
7253 SND_PCI_QUIRK(0x1028, 0x097d, "Dell Precision", ALC289_FIXUP_DUAL_SPK),
7254 SND_PCI_QUIRK(0x1028, 0x097e, "Dell Precision", ALC289_FIXUP_DUAL_SPK),
7255 SND_PCI_QUIRK(0x1028, 0x098d, "Dell Precision", ALC233_FIXUP_ASUS_MIC_NO_PRESENCE),
7256 SND_PCI_QUIRK(0x1028, 0x09bf, "Dell Precision", ALC233_FIXUP_ASUS_MIC_NO_PRESENCE),
7257 SND_PCI_QUIRK(0x1028, 0x0a2e, "Dell", ALC236_FIXUP_DELL_AIO_HEADSET_MIC),
7258 SND_PCI_QUIRK(0x1028, 0x0a30, "Dell", ALC236_FIXUP_DELL_AIO_HEADSET_MIC),
7259 SND_PCI_QUIRK(0x1028, 0x0a38, "Dell Latitude 7520", ALC269_FIXUP_DELL4_MIC_NO_PRESENCE_QUIET),
7260 SND_PCI_QUIRK(0x1028, 0x0a58, "Dell", ALC255_FIXUP_DELL_HEADSET_MIC),
7261 SND_PCI_QUIRK(0x1028, 0x0a61, "Dell XPS 15 9510", ALC289_FIXUP_DUAL_SPK),
7262 SND_PCI_QUIRK(0x1028, 0x0a62, "Dell Precision 5560", ALC289_FIXUP_DUAL_SPK),
7263 SND_PCI_QUIRK(0x1028, 0x0a9d, "Dell Latitude 5430", ALC269_FIXUP_DELL4_MIC_NO_PRESENCE),
7264 SND_PCI_QUIRK(0x1028, 0x0a9e, "Dell Latitude 5430", ALC269_FIXUP_DELL4_MIC_NO_PRESENCE),
7265 SND_PCI_QUIRK(0x1028, 0x0b19, "Dell XPS 15 9520", ALC289_FIXUP_DUAL_SPK),
7266 SND_PCI_QUIRK(0x1028, 0x0b1a, "Dell Precision 5570", ALC289_FIXUP_DUAL_SPK),
7267 SND_PCI_QUIRK(0x1028, 0x0b27, "Dell", ALC245_FIXUP_CS35L41_SPI_2),
7268 SND_PCI_QUIRK(0x1028, 0x0b28, "Dell", ALC245_FIXUP_CS35L41_SPI_2),
7269 SND_PCI_QUIRK(0x1028, 0x0b37, "Dell Inspiron 16 Plus 7620 2-in-1", ALC295_FIXUP_DELL_INSPIRON_TOP_SPEAKERS),
7270 SND_PCI_QUIRK(0x1028, 0x0b71, "Dell Inspiron 16 Plus 7620", ALC295_FIXUP_DELL_INSPIRON_TOP_SPEAKERS),
7271 SND_PCI_QUIRK(0x1028, 0x0beb, "Dell XPS 15 9530 (2023)", ALC289_FIXUP_DELL_CS35L41_SPI_2),
7272 SND_PCI_QUIRK(0x1028, 0x0c03, "Dell Precision 5340", ALC269_FIXUP_DELL4_MIC_NO_PRESENCE),
7273 SND_PCI_QUIRK(0x1028, 0x0c0b, "Dell Oasis 14 RPL-P", ALC289_FIXUP_RTK_AMP_DUAL_SPK),
7274 SND_PCI_QUIRK(0x1028, 0x0c0d, "Dell Oasis", ALC289_FIXUP_RTK_AMP_DUAL_SPK),
7275 SND_PCI_QUIRK(0x1028, 0x0c0e, "Dell Oasis 16", ALC289_FIXUP_RTK_AMP_DUAL_SPK),
7276 SND_PCI_QUIRK(0x1028, 0x0c19, "Dell Precision 3340", ALC236_FIXUP_DELL_DUAL_CODECS),
7277 SND_PCI_QUIRK(0x1028, 0x0c1a, "Dell Precision 3340", ALC236_FIXUP_DELL_DUAL_CODECS),
7278 SND_PCI_QUIRK(0x1028, 0x0c1b, "Dell Precision 3440", ALC236_FIXUP_DELL_DUAL_CODECS),
7279 SND_PCI_QUIRK(0x1028, 0x0c1c, "Dell Precision 3540", ALC236_FIXUP_DELL_DUAL_CODECS),
7280 SND_PCI_QUIRK(0x1028, 0x0c1d, "Dell Precision 3440", ALC236_FIXUP_DELL_DUAL_CODECS),
7281 SND_PCI_QUIRK(0x1028, 0x0c1e, "Dell Precision 3540", ALC236_FIXUP_DELL_DUAL_CODECS),
7282 SND_PCI_QUIRK(0x1028, 0x0c28, "Dell Inspiron 16 Plus 7630", ALC295_FIXUP_DELL_INSPIRON_TOP_SPEAKERS),
7283 SND_PCI_QUIRK(0x1028, 0x0c4d, "Dell", ALC287_FIXUP_CS35L41_I2C_4),
7284 SND_PCI_QUIRK(0x1028, 0x0c90, "Alienware x16 R2", ALC289_FIXUP_DUAL_SPK),
7285 SND_PCI_QUIRK(0x1028, 0x0c94, "Dell Polaris 3 metal", ALC295_FIXUP_DELL_TAS2781_I2C),
7286 SND_PCI_QUIRK(0x1028, 0x0c96, "Dell Polaris 2in1", ALC295_FIXUP_DELL_TAS2781_I2C),
7287 SND_PCI_QUIRK(0x1028, 0x0cbd, "Dell Oasis 13 CS MTL-U", ALC289_FIXUP_DELL_CS35L41_SPI_2),
7288 SND_PCI_QUIRK(0x1028, 0x0cbe, "Dell Oasis 13 2-IN-1 MTL-U", ALC289_FIXUP_DELL_CS35L41_SPI_2),
7289 SND_PCI_QUIRK(0x1028, 0x0cbf, "Dell Oasis 13 Low Weight MTU-L", ALC289_FIXUP_DELL_CS35L41_SPI_2),
7290 SND_PCI_QUIRK(0x1028, 0x0cc0, "Dell Oasis 13", ALC289_FIXUP_RTK_AMP_DUAL_SPK),
7291 SND_PCI_QUIRK(0x1028, 0x0cc1, "Dell Oasis 14 MTL-H/U", ALC289_FIXUP_DELL_CS35L41_SPI_2),
7292 SND_PCI_QUIRK(0x1028, 0x0cc2, "Dell Oasis 14 2-in-1 MTL-H/U", ALC289_FIXUP_DELL_CS35L41_SPI_2),
7293 SND_PCI_QUIRK(0x1028, 0x0cc3, "Dell Oasis 14 Low Weight MTL-U", ALC289_FIXUP_DELL_CS35L41_SPI_2),
7294 SND_PCI_QUIRK(0x1028, 0x0cc4, "Dell Oasis 16 MTL-H/U", ALC289_FIXUP_DELL_CS35L41_SPI_2),
7295 SND_PCI_QUIRK(0x1028, 0x0cc5, "Dell Oasis 14", ALC289_FIXUP_RTK_AMP_DUAL_SPK),
7296 SND_PCI_QUIRK(0x1028, 0x0d56, "Dell Pro Tower QCT1255", ALC236_FIXUP_DELL_HP_POP_NOISE),
7297 SND_PCI_QUIRK(0x1028, 0x0d58, "Dell Pro Micro QCM1255", ALC236_FIXUP_DELL_HP_POP_NOISE),
7298 SND_PCI_QUIRK(0x1028, 0x0d5a, "Dell Pro Slim QCS1255", ALC236_FIXUP_DELL_HP_POP_NOISE),
7299 SND_PCI_QUIRK(0x1028, 0x0e6b, "Dell Pro Tower QCT1255", ALC236_FIXUP_DELL_HP_POP_NOISE),
7300 SND_PCI_QUIRK(0x1028, 0x0e6c, "Dell Pro Slim QCS1255", ALC236_FIXUP_DELL_HP_POP_NOISE),
7301 SND_PCI_QUIRK(0x1028, 0x0e6d, "Dell Pro Micro QCM1255", ALC236_FIXUP_DELL_HP_POP_NOISE),
7302 SND_PCI_QUIRK(0x1028, 0x164a, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE),
7303 SND_PCI_QUIRK(0x1028, 0x164b, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE),
7304 SND_PCI_QUIRK(0x103c, 0x1586, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC2),
7305 SND_PCI_QUIRK(0x103c, 0x18e6, "HP", ALC269_FIXUP_HP_GPIO_LED),
7306 SND_PCI_QUIRK(0x103c, 0x218b, "HP", ALC269_FIXUP_LIMIT_INT_MIC_BOOST_MUTE_LED),
7307 SND_PCI_QUIRK(0x103c, 0x21f9, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
7308 SND_PCI_QUIRK(0x103c, 0x2210, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
7309 SND_PCI_QUIRK(0x103c, 0x2214, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
7310 SND_PCI_QUIRK(0x103c, 0x221b, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED),
7311 SND_PCI_QUIRK(0x103c, 0x221c, "HP EliteBook 755 G2", ALC280_FIXUP_HP_HEADSET_MIC),
7312 SND_PCI_QUIRK(0x103c, 0x2221, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED),
7313 SND_PCI_QUIRK(0x103c, 0x2225, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED),
7314 SND_PCI_QUIRK(0x103c, 0x2236, "HP", ALC269_FIXUP_HP_LINE1_MIC1_LED),
7315 SND_PCI_QUIRK(0x103c, 0x2237, "HP", ALC269_FIXUP_HP_LINE1_MIC1_LED),
7316 SND_PCI_QUIRK(0x103c, 0x2238, "HP", ALC269_FIXUP_HP_LINE1_MIC1_LED),
7317 SND_PCI_QUIRK(0x103c, 0x2239, "HP", ALC269_FIXUP_HP_LINE1_MIC1_LED),
7318 SND_PCI_QUIRK(0x103c, 0x224b, "HP", ALC269_FIXUP_HP_LINE1_MIC1_LED),
7319 SND_PCI_QUIRK(0x103c, 0x2253, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED),
7320 SND_PCI_QUIRK(0x103c, 0x2254, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED),
7321 SND_PCI_QUIRK(0x103c, 0x2255, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED),
7322 SND_PCI_QUIRK(0x103c, 0x2256, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED),
7323 SND_PCI_QUIRK(0x103c, 0x2257, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED),
7324 SND_PCI_QUIRK(0x103c, 0x2259, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED),
7325 SND_PCI_QUIRK(0x103c, 0x225a, "HP", ALC269_FIXUP_HP_DOCK_GPIO_MIC1_LED),
7326 SND_PCI_QUIRK(0x103c, 0x225f, "HP", ALC280_FIXUP_HP_GPIO2_MIC_HOTKEY),
7327 SND_PCI_QUIRK(0x103c, 0x2260, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
7328 SND_PCI_QUIRK(0x103c, 0x2263, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
7329 SND_PCI_QUIRK(0x103c, 0x2264, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
7330 SND_PCI_QUIRK(0x103c, 0x2265, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
7331 SND_PCI_QUIRK(0x103c, 0x2268, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
7332 SND_PCI_QUIRK(0x103c, 0x226a, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
7333 SND_PCI_QUIRK(0x103c, 0x226b, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
7334 SND_PCI_QUIRK(0x103c, 0x226e, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
7335 SND_PCI_QUIRK(0x103c, 0x2271, "HP", ALC286_FIXUP_HP_GPIO_LED),
7336 SND_PCI_QUIRK(0x103c, 0x2272, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED),
7337 SND_PCI_QUIRK(0x103c, 0x2272, "HP", ALC280_FIXUP_HP_DOCK_PINS),
7338 SND_PCI_QUIRK(0x103c, 0x2273, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED),
7339 SND_PCI_QUIRK(0x103c, 0x2273, "HP", ALC280_FIXUP_HP_DOCK_PINS),
7340 SND_PCI_QUIRK(0x103c, 0x2278, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED),
7341 SND_PCI_QUIRK(0x103c, 0x227f, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
7342 SND_PCI_QUIRK(0x103c, 0x2282, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
7343 SND_PCI_QUIRK(0x103c, 0x228b, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
7344 SND_PCI_QUIRK(0x103c, 0x228e, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
7345 SND_PCI_QUIRK(0x103c, 0x229e, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
7346 SND_PCI_QUIRK(0x103c, 0x22b2, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
7347 SND_PCI_QUIRK(0x103c, 0x22b7, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
7348 SND_PCI_QUIRK(0x103c, 0x22bf, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
7349 SND_PCI_QUIRK(0x103c, 0x22c4, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
7350 SND_PCI_QUIRK(0x103c, 0x22c5, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
7351 SND_PCI_QUIRK(0x103c, 0x22c7, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
7352 SND_PCI_QUIRK(0x103c, 0x22c8, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
7353 SND_PCI_QUIRK(0x103c, 0x22cf, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
7354 SND_PCI_QUIRK(0x103c, 0x22db, "HP", ALC280_FIXUP_HP_9480M),
7355 SND_PCI_QUIRK(0x103c, 0x22dc, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED),
7356 SND_PCI_QUIRK(0x103c, 0x22fb, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED),
7357 SND_PCI_QUIRK(0x103c, 0x2334, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
7358 SND_PCI_QUIRK(0x103c, 0x2335, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
7359 SND_PCI_QUIRK(0x103c, 0x2336, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
7360 SND_PCI_QUIRK(0x103c, 0x2337, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
7361 SND_PCI_QUIRK(0x103c, 0x2b5e, "HP 288 Pro G2 MT", ALC221_FIXUP_HP_288PRO_MIC_NO_PRESENCE),
7362 SND_PCI_QUIRK(0x103c, 0x802e, "HP Z240 SFF", ALC221_FIXUP_HP_MIC_NO_PRESENCE),
7363 SND_PCI_QUIRK(0x103c, 0x802f, "HP Z240", ALC221_FIXUP_HP_MIC_NO_PRESENCE),
7364 SND_PCI_QUIRK(0x103c, 0x8077, "HP", ALC256_FIXUP_HP_HEADSET_MIC),
7365 SND_PCI_QUIRK(0x103c, 0x8158, "HP", ALC256_FIXUP_HP_HEADSET_MIC),
7366 SND_PCI_QUIRK(0x103c, 0x820d, "HP Pavilion 15", ALC295_FIXUP_HP_X360),
7367 SND_PCI_QUIRK(0x103c, 0x8256, "HP", ALC221_FIXUP_HP_FRONT_MIC),
7368 SND_PCI_QUIRK(0x103c, 0x8259, "HP OMEN 15-ax202nf", ALC269_FIXUP_HP_MUTE_LED_MIC3),
7369 SND_PCI_QUIRK(0x103c, 0x827e, "HP x360", ALC295_FIXUP_HP_X360),
7370 SND_PCI_QUIRK(0x103c, 0x827f, "HP x360", ALC269_FIXUP_HP_MUTE_LED_MIC3),
7371 SND_PCI_QUIRK(0x103c, 0x82bf, "HP G3 mini", ALC221_FIXUP_HP_MIC_NO_PRESENCE),
7372 SND_PCI_QUIRK(0x103c, 0x82c0, "HP G3 mini premium", ALC221_FIXUP_HP_MIC_NO_PRESENCE),
7373 SND_PCI_QUIRK(0x103c, 0x83b9, "HP Spectre x360", ALC269_FIXUP_HP_MUTE_LED_MIC3),
7374 SND_PCI_QUIRK(0x103c, 0x841c, "HP Pavilion 15-CK0xx", ALC269_FIXUP_HP_MUTE_LED_MIC3),
7375 HDA_CODEC_QUIRK(0x103c, 0x8486, "HP Pavilion x360", ALC295_FIXUP_HP_PAVILION_X360),
7376 SND_PCI_QUIRK(0x103c, 0x8497, "HP Envy x360", ALC269_FIXUP_HP_MUTE_LED_MIC3),
7377 SND_PCI_QUIRK(0x103c, 0x84a6, "HP 250 G7 Notebook PC", ALC269_FIXUP_HP_LINE1_MIC1_LED),
7378 SND_PCI_QUIRK(0x103c, 0x84ae, "HP 15-db0403ng", ALC236_FIXUP_HP_MUTE_LED_COEFBIT2),
7379 SND_PCI_QUIRK(0x103c, 0x84da, "HP OMEN dc0019-ur", ALC295_FIXUP_HP_OMEN),
7380 SND_PCI_QUIRK(0x103c, 0x84e7, "HP Pavilion 15", ALC269_FIXUP_HP_MUTE_LED_MIC3),
7381 SND_PCI_QUIRK(0x103c, 0x8519, "HP Spectre x360 15-df0xxx", ALC285_FIXUP_HP_SPECTRE_X360),
7382 SND_PCI_QUIRK(0x103c, 0x8536, "HP ProBook 430 G6", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF),
7383 SND_PCI_QUIRK(0x103c, 0x8537, "HP ProBook 440 G6", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF),
7384 SND_PCI_QUIRK(0x103c, 0x8548, "HP EliteBook x360 830 G6", ALC285_FIXUP_HP_GPIO_LED),
7385 SND_PCI_QUIRK(0x103c, 0x854a, "HP EliteBook 830 G6", ALC285_FIXUP_HP_GPIO_LED),
7386 SND_PCI_QUIRK(0x103c, 0x854d, "HP EliteBook 840 G6", ALC285_FIXUP_HP_GPIO_LED),
7387 SND_PCI_QUIRK(0x103c, 0x856a, "HP Pavilion 15-cs1xxx", ALC295_FIXUP_HP_PAVILION_MUTE_LED_1B),
7388 SND_PCI_QUIRK(0x103c, 0x85c6, "HP Pavilion x360 Convertible 14-dy1xxx", ALC295_FIXUP_HP_MUTE_LED_COEFBIT11),
7389 SND_PCI_QUIRK(0x103c, 0x85de, "HP Envy x360 13-ar0xxx", ALC285_FIXUP_HP_ENVY_X360),
7390 SND_PCI_QUIRK(0x103c, 0x85f0, "HP Laptop 15-dw0xxx", ALC236_FIXUP_HP_MUTE_LED_COEFBIT2),
7391 SND_PCI_QUIRK(0x103c, 0x85f3, "HP 250 G8 Notebook PC", ALC236_FIXUP_HP_MUTE_LED_COEFBIT2),
7392 SND_PCI_QUIRK(0x103c, 0x8603, "HP Omen 17-cb0xxx", ALC285_FIXUP_HP_MUTE_LED),
7393 SND_PCI_QUIRK(0x103c, 0x860c, "HP ZBook 17 G6", ALC285_FIXUP_HP_GPIO_AMP_INIT),
7394 SND_PCI_QUIRK(0x103c, 0x860f, "HP ZBook 15 G6", ALC285_FIXUP_HP_GPIO_AMP_INIT),
7395 SND_PCI_QUIRK(0x103c, 0x861f, "HP Elite Dragonfly G1", ALC285_FIXUP_HP_GPIO_AMP_INIT),
7396 SND_PCI_QUIRK(0x103c, 0x864f, "HP Laptop 15-dy0xxx", ALC236_FIXUP_HP_MUTE_LED_COEFBIT2),
7397 SND_PCI_QUIRK(0x103c, 0x869d, "HP", ALC236_FIXUP_HP_MUTE_LED),
7398 SND_PCI_QUIRK(0x103c, 0x86c1, "HP Laptop 15-da3001TU", ALC236_FIXUP_HP_MUTE_LED_COEFBIT2),
7399 SND_PCI_QUIRK(0x103c, 0x86c7, "HP Envy AiO 32", ALC274_FIXUP_HP_ENVY_GPIO),
7400 SND_PCI_QUIRK(0x103c, 0x86c8, "HP Laptop 14s-dr1xxx", ALC236_FIXUP_HP_MUTE_LED_COEFBIT2),
7401 SND_PCI_QUIRK(0x103c, 0x86e7, "HP Spectre x360 15-eb0xxx", ALC285_FIXUP_HP_SPECTRE_X360_EB1),
7402 SND_PCI_QUIRK(0x103c, 0x863e, "HP Spectre x360 15-df1xxx", ALC285_FIXUP_HP_SPECTRE_X360_DF1),
7403 SND_PCI_QUIRK(0x103c, 0x86e8, "HP Spectre x360 15-eb0xxx", ALC285_FIXUP_HP_SPECTRE_X360_EB1),
7404 SND_PCI_QUIRK(0x103c, 0x86f9, "HP Spectre x360 13-aw0xxx", ALC285_FIXUP_HP_SPECTRE_X360_MUTE_LED),
7405 SND_PCI_QUIRK(0x103c, 0x8706, "HP Laptop 15s-eq1xxx", ALC236_FIXUP_HP_MUTE_LED_COEFBIT2),
7406 SND_PCI_QUIRK(0x103c, 0x8716, "HP Elite Dragonfly G2 Notebook PC", ALC285_FIXUP_HP_GPIO_AMP_INIT),
7407 SND_PCI_QUIRK(0x103c, 0x8720, "HP EliteBook x360 1040 G8 Notebook PC", ALC285_FIXUP_HP_GPIO_AMP_INIT),
7408 SND_PCI_QUIRK(0x103c, 0x8724, "HP EliteBook 850 G7", ALC285_FIXUP_HP_GPIO_LED),
7409 SND_PCI_QUIRK(0x103c, 0x8728, "HP EliteBook 840 G7", ALC285_FIXUP_HP_GPIO_LED),
7410 SND_PCI_QUIRK(0x103c, 0x8729, "HP", ALC285_FIXUP_HP_GPIO_LED),
7411 SND_PCI_QUIRK(0x103c, 0x8730, "HP ProBook 445 G7", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF),
7412 SND_PCI_QUIRK(0x103c, 0x8735, "HP ProBook 435 G7", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF),
7413 SND_PCI_QUIRK(0x103c, 0x8736, "HP", ALC285_FIXUP_HP_GPIO_AMP_INIT),
7414 SND_PCI_QUIRK(0x103c, 0x8756, "HP ENVY Laptop 13-ba0xxx", ALC245_FIXUP_HP_X360_MUTE_LEDS),
7415 SND_PCI_QUIRK(0x103c, 0x8760, "HP EliteBook 8{4,5}5 G7", ALC285_FIXUP_HP_BEEP_MICMUTE_LED),
7416 SND_PCI_QUIRK(0x103c, 0x876e, "HP ENVY x360 Convertible 13-ay0xxx", ALC245_FIXUP_HP_X360_MUTE_LEDS),
7417 SND_PCI_QUIRK(0x103c, 0x877a, "HP", ALC285_FIXUP_HP_MUTE_LED),
7418 SND_PCI_QUIRK(0x103c, 0x877d, "HP", ALC236_FIXUP_HP_MUTE_LED),
7419 SND_PCI_QUIRK(0x103c, 0x8780, "HP ZBook Fury 17 G7 Mobile Workstation",
7420 ALC285_FIXUP_HP_GPIO_AMP_INIT),
7421 SND_PCI_QUIRK(0x103c, 0x8783, "HP ZBook Fury 15 G7 Mobile Workstation",
7422 ALC285_FIXUP_HP_GPIO_AMP_INIT),
7423 SND_PCI_QUIRK(0x103c, 0x8786, "HP OMEN 15", ALC285_FIXUP_HP_MUTE_LED),
7424 SND_PCI_QUIRK(0x103c, 0x8787, "HP OMEN 15", ALC285_FIXUP_HP_MUTE_LED),
7425 SND_PCI_QUIRK(0x103c, 0x8788, "HP OMEN 15", ALC285_FIXUP_HP_MUTE_LED),
7426 SND_PCI_QUIRK(0x103c, 0x87b7, "HP Laptop 14-fq0xxx", ALC236_FIXUP_HP_MUTE_LED_COEFBIT2),
7427 SND_PCI_QUIRK(0x103c, 0x87c8, "HP", ALC287_FIXUP_HP_GPIO_LED),
7428 SND_PCI_QUIRK(0x103c, 0x87cb, "HP Pavilion 15-eg0xxx", ALC287_FIXUP_HP_GPIO_LED),
7429 SND_PCI_QUIRK(0x103c, 0x87cc, "HP Pavilion 15-eg0xxx", ALC287_FIXUP_HP_GPIO_LED),
7430 SND_PCI_QUIRK(0x103c, 0x87d3, "HP Laptop 15-gw0xxx", ALC236_FIXUP_HP_MUTE_LED_COEFBIT2),
7431 SND_PCI_QUIRK(0x103c, 0x87df, "HP ProBook 430 G8 Notebook PC", ALC236_FIXUP_HP_GPIO_LED),
7432 SND_PCI_QUIRK(0x103c, 0x87e5, "HP ProBook 440 G8 Notebook PC", ALC236_FIXUP_HP_GPIO_LED),
7433 SND_PCI_QUIRK(0x103c, 0x87e7, "HP ProBook 450 G8 Notebook PC", ALC236_FIXUP_HP_GPIO_LED),
7434 SND_PCI_QUIRK(0x103c, 0x87f1, "HP ProBook 630 G8 Notebook PC", ALC236_FIXUP_HP_GPIO_LED),
7435 SND_PCI_QUIRK(0x103c, 0x87f2, "HP ProBook 640 G8 Notebook PC", ALC236_FIXUP_HP_GPIO_LED),
7436 SND_PCI_QUIRK(0x103c, 0x87f4, "HP", ALC287_FIXUP_HP_GPIO_LED),
7437 SND_PCI_QUIRK(0x103c, 0x87f5, "HP", ALC287_FIXUP_HP_GPIO_LED),
7438 SND_PCI_QUIRK(0x103c, 0x87f6, "HP Spectre x360 14", ALC245_FIXUP_HP_X360_AMP),
7439 SND_PCI_QUIRK(0x103c, 0x87f7, "HP Spectre x360 14", ALC245_FIXUP_HP_X360_AMP),
7440 SND_PCI_QUIRK(0x103c, 0x87fd, "HP Laptop 14-dq2xxx", ALC236_FIXUP_HP_MUTE_LED_COEFBIT2),
7441 SND_PCI_QUIRK(0x103c, 0x87fe, "HP Laptop 15s-fq2xxx", ALC236_FIXUP_HP_MUTE_LED_COEFBIT2),
7442 SND_PCI_QUIRK(0x103c, 0x8805, "HP ProBook 650 G8 Notebook PC", ALC236_FIXUP_HP_GPIO_LED),
7443 SND_PCI_QUIRK(0x103c, 0x880d, "HP EliteBook 830 G8 Notebook PC", ALC285_FIXUP_HP_GPIO_LED),
7444 SND_PCI_QUIRK(0x103c, 0x8811, "HP Spectre x360 15-eb1xxx", ALC285_FIXUP_HP_SPECTRE_X360_EB1),
7445 SND_PCI_QUIRK(0x103c, 0x8812, "HP Spectre x360 15-eb1xxx", ALC285_FIXUP_HP_SPECTRE_X360_EB1),
7446 SND_PCI_QUIRK(0x103c, 0x881d, "HP 250 G8 Notebook PC", ALC236_FIXUP_HP_MUTE_LED_COEFBIT2),
7447 SND_PCI_QUIRK(0x103c, 0x881e, "HP Laptop 15s-du3xxx", ALC236_FIXUP_HP_MUTE_LED_COEFBIT2),
7448 SND_PCI_QUIRK(0x103c, 0x8846, "HP EliteBook 850 G8 Notebook PC", ALC285_FIXUP_HP_GPIO_LED),
7449 SND_PCI_QUIRK(0x103c, 0x8847, "HP EliteBook x360 830 G8 Notebook PC", ALC285_FIXUP_HP_GPIO_LED),
7450 SND_PCI_QUIRK(0x103c, 0x884b, "HP EliteBook 840 Aero G8 Notebook PC", ALC285_FIXUP_HP_GPIO_LED),
7451 SND_PCI_QUIRK(0x103c, 0x884c, "HP EliteBook 840 G8 Notebook PC", ALC285_FIXUP_HP_GPIO_LED),
7452 HDA_CODEC_QUIRK(0x103c, 0x885b, "HP Spectre x360 14-ea", ALC245_FIXUP_HP_X360_AMP),
7453 SND_PCI_QUIRK(0x103c, 0x8862, "HP ProBook 445 G8 Notebook PC", ALC236_FIXUP_HP_LIMIT_INT_MIC_BOOST),
7454 SND_PCI_QUIRK(0x103c, 0x8863, "HP ProBook 445 G8 Notebook PC", ALC236_FIXUP_HP_LIMIT_INT_MIC_BOOST),
7455 SND_PCI_QUIRK(0x103c, 0x886d, "HP ZBook Fury 17.3 Inch G8 Mobile Workstation PC", ALC285_FIXUP_HP_GPIO_AMP_INIT),
7456 SND_PCI_QUIRK(0x103c, 0x8870, "HP ZBook Fury 15.6 Inch G8 Mobile Workstation PC", ALC285_FIXUP_HP_GPIO_AMP_INIT),
7457 SND_PCI_QUIRK(0x103c, 0x8873, "HP ZBook Studio 15.6 Inch G8 Mobile Workstation PC", ALC285_FIXUP_HP_GPIO_AMP_INIT),
7458 SND_PCI_QUIRK(0x103c, 0x887a, "HP Laptop 15s-eq2xxx", ALC236_FIXUP_HP_MUTE_LED_COEFBIT2),
7459 SND_PCI_QUIRK(0x103c, 0x887c, "HP Laptop 14s-fq1xxx", ALC236_FIXUP_HP_MUTE_LED_COEFBIT2),
7460 SND_PCI_QUIRK(0x103c, 0x888a, "HP ENVY x360 Convertible 15-eu0xxx", ALC245_FIXUP_HP_X360_MUTE_LEDS),
7461 SND_PCI_QUIRK(0x103c, 0x888d, "HP ZBook Power 15.6 inch G8 Mobile Workstation PC", ALC236_FIXUP_HP_GPIO_LED),
7462 SND_PCI_QUIRK(0x103c, 0x8890, "HP Elite Dragonfly Max G2 Notebook PC", ALC285_FIXUP_HP_GPIO_AMP_INIT),
7463 SND_PCI_QUIRK(0x103c, 0x8895, "HP EliteBook 855 G8 Notebook PC", ALC285_FIXUP_HP_SPEAKERS_MICMUTE_LED),
7464 SND_PCI_QUIRK(0x103c, 0x8896, "HP EliteBook 855 G8 Notebook PC", ALC285_FIXUP_HP_MUTE_LED),
7465 SND_PCI_QUIRK(0x103c, 0x8898, "HP EliteBook 845 G8 Notebook PC", ALC285_FIXUP_HP_LIMIT_INT_MIC_BOOST),
7466 SND_PCI_QUIRK(0x103c, 0x88b3, "HP ENVY x360 Convertible 15-es0xxx", ALC245_FIXUP_HP_ENVY_X360_MUTE_LED),
7467 SND_PCI_QUIRK(0x103c, 0x88d0, "HP Pavilion 15-eh1xxx (mainboard 88D0)", ALC287_FIXUP_HP_GPIO_LED),
7468 SND_PCI_QUIRK(0x103c, 0x88d1, "HP Pavilion 15-eh1xxx (mainboard 88D1)", ALC245_FIXUP_HP_MUTE_LED_V1_COEFBIT),
7469 SND_PCI_QUIRK(0x103c, 0x88dd, "HP Pavilion 15z-ec200", ALC285_FIXUP_HP_MUTE_LED),
7470 SND_PCI_QUIRK(0x103c, 0x88eb, "HP Victus 16-e0xxx", ALC245_FIXUP_HP_MUTE_LED_V2_COEFBIT),
7471 SND_PCI_QUIRK(0x103c, 0x88ed, "HP Victus 16-e0xxx (MB 88ED)",
7472 ALC245_FIXUP_HP_MUTE_LED_V2_COEFBIT),
7473 SND_PCI_QUIRK(0x103c, 0x88ee, "HP Victus 16-e0xxx (MB 88EE)", ALC245_FIXUP_HP_MUTE_LED_COEFBIT),
7474 SND_PCI_QUIRK(0x103c, 0x8902, "HP OMEN 16", ALC285_FIXUP_HP_MUTE_LED),
7475 SND_PCI_QUIRK(0x103c, 0x890e, "HP 255 G8 Notebook PC", ALC236_FIXUP_HP_MUTE_LED_COEFBIT2),
7476 SND_PCI_QUIRK(0x103c, 0x8919, "HP Pavilion Aero Laptop 13-be0xxx", ALC287_FIXUP_HP_GPIO_LED),
7477 SND_PCI_QUIRK(0x103c, 0x896d, "HP ZBook Firefly 16 G9", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
7478 SND_PCI_QUIRK(0x103c, 0x896e, "HP EliteBook x360 830 G9", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
7479 SND_PCI_QUIRK(0x103c, 0x8971, "HP EliteBook 830 G9", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
7480 SND_PCI_QUIRK(0x103c, 0x8972, "HP EliteBook 840 G9", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
7481 SND_PCI_QUIRK(0x103c, 0x8973, "HP EliteBook 860 G9", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
7482 SND_PCI_QUIRK(0x103c, 0x8974, "HP EliteBook 840 Aero G9", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
7483 SND_PCI_QUIRK(0x103c, 0x8975, "HP EliteBook x360 840 Aero G9", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
7484 SND_PCI_QUIRK(0x103c, 0x897d, "HP mt440 Mobile Thin Client U74", ALC236_FIXUP_HP_GPIO_LED),
7485 SND_PCI_QUIRK(0x103c, 0x8981, "HP Elite Dragonfly G3", ALC245_FIXUP_CS35L41_SPI_4),
7486 SND_PCI_QUIRK(0x103c, 0x898a, "HP Pavilion 15-eg100", ALC287_FIXUP_HP_GPIO_LED),
7487 SND_PCI_QUIRK(0x103c, 0x898e, "HP EliteBook 835 G9", ALC287_FIXUP_CS35L41_I2C_2),
7488 SND_PCI_QUIRK(0x103c, 0x898f, "HP EliteBook 835 G9", ALC287_FIXUP_CS35L41_I2C_2),
7489 SND_PCI_QUIRK(0x103c, 0x8991, "HP EliteBook 845 G9", ALC287_FIXUP_CS35L41_I2C_2_HP_GPIO_LED),
7490 SND_PCI_QUIRK(0x103c, 0x8992, "HP EliteBook 845 G9", ALC287_FIXUP_CS35L41_I2C_2),
7491 SND_PCI_QUIRK(0x103c, 0x8994, "HP EliteBook 855 G9", ALC287_FIXUP_CS35L41_I2C_2_HP_GPIO_LED),
7492 SND_PCI_QUIRK(0x103c, 0x8995, "HP EliteBook 855 G9", ALC287_FIXUP_CS35L41_I2C_2),
7493 SND_PCI_QUIRK(0x103c, 0x89a0, "HP Laptop 15-dw4xxx", ALC236_FIXUP_HP_MUTE_LED_COEFBIT2),
7494 SND_PCI_QUIRK(0x103c, 0x89a4, "HP ProBook 440 G9", ALC236_FIXUP_HP_GPIO_LED),
7495 SND_PCI_QUIRK(0x103c, 0x89a6, "HP ProBook 450 G9", ALC236_FIXUP_HP_GPIO_LED),
7496 SND_PCI_QUIRK(0x103c, 0x89aa, "HP EliteBook 630 G9", ALC236_FIXUP_HP_GPIO_LED),
7497 SND_PCI_QUIRK(0x103c, 0x89ac, "HP EliteBook 640 G9", ALC236_FIXUP_HP_GPIO_LED),
7498 SND_PCI_QUIRK(0x103c, 0x89ae, "HP EliteBook 650 G9", ALC236_FIXUP_HP_GPIO_LED),
7499 SND_PCI_QUIRK(0x103c, 0x89c0, "HP ZBook Power 15.6 G9", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
7500 SND_PCI_QUIRK(0x103c, 0x89c3, "Zbook Studio G9", ALC245_FIXUP_CS35L41_SPI_4_HP_GPIO_LED),
7501 SND_PCI_QUIRK(0x103c, 0x89c6, "Zbook Fury 17 G9", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
7502 SND_PCI_QUIRK(0x103c, 0x89ca, "HP", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF),
7503 SND_PCI_QUIRK(0x103c, 0x89d3, "HP EliteBook 645 G9 (MB 89D2)", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF),
7504 SND_PCI_QUIRK(0x103c, 0x89da, "HP Spectre x360 14t-ea100", ALC245_FIXUP_HP_SPECTRE_X360_EU0XXX),
7505 SND_PCI_QUIRK(0x103c, 0x89e7, "HP Elite x2 G9", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
7506 SND_PCI_QUIRK(0x103c, 0x8a05, "HP Dragonfly Folio G3 2-in-1", ALC245_FIXUP_CS35L41_SPI_4_HP_GPIO_LED),
7507 SND_PCI_QUIRK(0x103c, 0x8a06, "HP Dragonfly Folio G3 2-in-1", ALC245_FIXUP_CS35L41_SPI_4_HP_GPIO_LED),
7508 SND_PCI_QUIRK(0x103c, 0x8a0e, "HP Pavilion Laptop 15-eh2xxx", ALC287_FIXUP_HP_GPIO_LED),
7509 SND_PCI_QUIRK(0x103c, 0x8a0f, "HP Pavilion 14-ec1xxx", ALC287_FIXUP_HP_GPIO_LED),
7510 SND_PCI_QUIRK(0x103c, 0x8a1b, "HP 255 15.6 inch G9 Notebook PC", ALC236_FIXUP_HP_MUTE_LED_COEFBIT2),
7511 SND_PCI_QUIRK(0x103c, 0x8a1f, "HP Laptop 14s-dr5xxx", ALC236_FIXUP_HP_MUTE_LED_COEFBIT2),
7512 SND_PCI_QUIRK(0x103c, 0x8a20, "HP Laptop 15s-fq5xxx", ALC236_FIXUP_HP_MUTE_LED_COEFBIT2),
7513 SND_PCI_QUIRK(0x103c, 0x8a25, "HP Victus 16-d1xxx (MB 8A25)", ALC245_FIXUP_HP_MUTE_LED_COEFBIT),
7514 SND_PCI_QUIRK(0x103c, 0x8a26, "HP Victus 16-d1xxx (MB 8A26)", ALC245_FIXUP_HP_MUTE_LED_COEFBIT),
7515 SND_PCI_QUIRK(0x103c, 0x8a28, "HP Envy 13", ALC287_FIXUP_CS35L41_I2C_2),
7516 SND_PCI_QUIRK(0x103c, 0x8a29, "HP Envy 15", ALC287_FIXUP_CS35L41_I2C_2),
7517 SND_PCI_QUIRK(0x103c, 0x8a2a, "HP Envy 15", ALC287_FIXUP_CS35L41_I2C_2),
7518 SND_PCI_QUIRK(0x103c, 0x8a2b, "HP Envy 15", ALC287_FIXUP_CS35L41_I2C_2),
7519 SND_PCI_QUIRK(0x103c, 0x8a2c, "HP Envy 16", ALC287_FIXUP_CS35L41_I2C_2),
7520 SND_PCI_QUIRK(0x103c, 0x8a2d, "HP Envy 16", ALC287_FIXUP_CS35L41_I2C_2),
7521 SND_PCI_QUIRK(0x103c, 0x8a2e, "HP Envy 16", ALC287_FIXUP_CS35L41_I2C_2),
7522 SND_PCI_QUIRK(0x103c, 0x8a30, "HP Envy 17", ALC287_FIXUP_CS35L41_I2C_2),
7523 SND_PCI_QUIRK(0x103c, 0x8a31, "HP Envy 15", ALC287_FIXUP_CS35L41_I2C_2),
7524 SND_PCI_QUIRK(0x103c, 0x8a34, "HP Pavilion x360 2-in-1 Laptop 14-ek0xxx", ALC245_FIXUP_HP_MUTE_LED_COEFBIT),
7525 SND_PCI_QUIRK(0x103c, 0x8a36, "HP Pavilion Plus 14-eh0xxx", ALC245_FIXUP_HP_MUTE_LED_COEFBIT),
7526 SND_PCI_QUIRK(0x103c, 0x8a3d, "HP Victus 15-fb0xxx (MB 8A3D)", ALC245_FIXUP_HP_MUTE_LED_V2_COEFBIT),
7527 SND_PCI_QUIRK(0x103c, 0x8a4f, "HP Victus 15-fa0xxx (MB 8A4F)", ALC245_FIXUP_HP_MUTE_LED_COEFBIT),
7528 SND_PCI_QUIRK(0x103c, 0x8a50, "HP Victus 15-fa0xxx (MB 8A50)", ALC245_FIXUP_HP_MUTE_LED_COEFBIT),
7529 SND_PCI_QUIRK(0x103c, 0x8a6b, "HP Pavilion All-in-One Desktop 27-ca1xxx", ALC274_FIXUP_HP_VERBS),
7530 SND_PCI_QUIRK(0x103c, 0x8a6e, "HP EDNA 360", ALC287_FIXUP_CS35L41_I2C_4),
7531 SND_PCI_QUIRK(0x103c, 0x8a74, "HP ProBook 440 G8 Notebook PC", ALC236_FIXUP_HP_GPIO_LED),
7532 SND_PCI_QUIRK(0x103c, 0x8a75, "HP ProBook 450 G8 Notebook PC", ALC236_FIXUP_HP_GPIO_LED),
7533 SND_PCI_QUIRK(0x103c, 0x8a76, "HP ProBook 440 G8 Notebook PC", ALC236_FIXUP_HP_GPIO_LED),
7534 SND_PCI_QUIRK(0x103c, 0x8a77, "HP ProBook 450 G8 Notebook PC", ALC236_FIXUP_HP_GPIO_LED),
7535 SND_PCI_QUIRK(0x103c, 0x8a78, "HP Dev One", ALC285_FIXUP_HP_LIMIT_INT_MIC_BOOST),
7536 SND_PCI_QUIRK(0x103c, 0x8aa0, "HP ProBook 440 G9 (MB 8A9E)", ALC236_FIXUP_HP_GPIO_LED),
7537 SND_PCI_QUIRK(0x103c, 0x8aa3, "HP ProBook 450 G9 (MB 8AA1)", ALC236_FIXUP_HP_GPIO_LED),
7538 SND_PCI_QUIRK(0x103c, 0x8aa8, "HP EliteBook 640 G9 (MB 8AA6)", ALC236_FIXUP_HP_GPIO_LED),
7539 SND_PCI_QUIRK(0x103c, 0x8aab, "HP EliteBook 650 G9 (MB 8AA9)", ALC236_FIXUP_HP_GPIO_LED),
7540 SND_PCI_QUIRK(0x103c, 0x8ab8, "HP EliteBook 830 G8 Notebook PC (MB 8AB8)", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
7541 SND_PCI_QUIRK(0x103c, 0x8ab9, "HP EliteBook 840 G8 (MB 8AB8)", ALC285_FIXUP_HP_GPIO_LED),
7542 SND_PCI_QUIRK(0x103c, 0x8abb, "HP ZBook Firefly 14 G9", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
7543 SND_PCI_QUIRK(0x103c, 0x8ad1, "HP EliteBook 840 14 inch G9 Notebook PC", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
7544 SND_PCI_QUIRK(0x103c, 0x8ad2, "HP EliteBook 860 16 inch G9 Notebook PC", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
7545 SND_PCI_QUIRK(0x103c, 0x8ad8, "HP 800 G9", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
7546 SND_PCI_QUIRK(0x103c, 0x8b0f, "HP Elite mt645 G7 Mobile Thin Client U81", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF),
7547 SND_PCI_QUIRK(0x103c, 0x8b2f, "HP 255 15.6 inch G10 Notebook PC", ALC236_FIXUP_HP_MUTE_LED_COEFBIT2),
7548 SND_PCI_QUIRK(0x103c, 0x8b34, "HP 250 15.6 inch G10 Notebook PC", ALC236_FIXUP_HP_MUTE_LED_COEFBIT2),
7549 SND_PCI_QUIRK(0x103c, 0x8b3a, "HP Envy 15", ALC287_FIXUP_CS35L41_I2C_2),
7550 SND_PCI_QUIRK(0x103c, 0x8b3f, "HP mt440 Mobile Thin Client U91", ALC236_FIXUP_HP_GPIO_LED),
7551 SND_PCI_QUIRK(0x103c, 0x8b42, "HP", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
7552 SND_PCI_QUIRK(0x103c, 0x8b43, "HP", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
7553 SND_PCI_QUIRK(0x103c, 0x8b44, "HP", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
7554 SND_PCI_QUIRK(0x103c, 0x8b45, "HP", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
7555 SND_PCI_QUIRK(0x103c, 0x8b46, "HP", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
7556 SND_PCI_QUIRK(0x103c, 0x8b47, "HP", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
7557 SND_PCI_QUIRK(0x103c, 0x8b59, "HP Elite mt645 G7 Mobile Thin Client U89", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF),
7558 SND_PCI_QUIRK(0x103c, 0x8b5d, "HP", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF),
7559 SND_PCI_QUIRK(0x103c, 0x8b5e, "HP", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF),
7560 SND_PCI_QUIRK(0x103c, 0x8b5f, "HP", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF),
7561 SND_PCI_QUIRK(0x103c, 0x8b63, "HP Elite Dragonfly 13.5 inch G4", ALC245_FIXUP_CS35L41_SPI_4_HP_GPIO_LED),
7562 SND_PCI_QUIRK(0x103c, 0x8b65, "HP ProBook 455 15.6 inch G10 Notebook PC", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF),
7563 SND_PCI_QUIRK(0x103c, 0x8b66, "HP", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF),
7564 SND_PCI_QUIRK(0x103c, 0x8b70, "HP EliteBook 835 G10", ALC287_FIXUP_CS35L41_I2C_2_HP_GPIO_LED),
7565 SND_PCI_QUIRK(0x103c, 0x8b72, "HP EliteBook 845 G10", ALC287_FIXUP_CS35L41_I2C_2_HP_GPIO_LED),
7566 SND_PCI_QUIRK(0x103c, 0x8b74, "HP EliteBook 845W G10", ALC287_FIXUP_CS35L41_I2C_2_HP_GPIO_LED),
7567 SND_PCI_QUIRK(0x103c, 0x8b77, "HP ElieBook 865 G10", ALC287_FIXUP_CS35L41_I2C_2),
7568 SND_PCI_QUIRK(0x103c, 0x8b7a, "HP", ALC236_FIXUP_HP_GPIO_LED),
7569 SND_PCI_QUIRK(0x103c, 0x8b7d, "HP", ALC236_FIXUP_HP_GPIO_LED),
7570 SND_PCI_QUIRK(0x103c, 0x8b87, "HP", ALC236_FIXUP_HP_GPIO_LED),
7571 SND_PCI_QUIRK(0x103c, 0x8b8a, "HP", ALC236_FIXUP_HP_GPIO_LED),
7572 SND_PCI_QUIRK(0x103c, 0x8b8b, "HP", ALC236_FIXUP_HP_GPIO_LED),
7573 SND_PCI_QUIRK(0x103c, 0x8b8d, "HP", ALC236_FIXUP_HP_GPIO_LED),
7574 SND_PCI_QUIRK(0x103c, 0x8b8f, "HP", ALC245_FIXUP_CS35L41_SPI_4_HP_GPIO_LED),
7575 SND_PCI_QUIRK(0x103c, 0x8b92, "HP", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
7576 SND_PCI_QUIRK(0x103c, 0x8b96, "HP", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF),
7577 SND_PCI_QUIRK(0x103c, 0x8b97, "HP", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF),
7578 SND_PCI_QUIRK(0x103c, 0x8ba9, "HP Omen 16-wd0xxx", ALC245_FIXUP_HP_MUTE_LED_V1_COEFBIT),
7579 SND_PCI_QUIRK(0x103c, 0x8bb1, "HP Victus 15-fa1xxx (MB 8BB1)", ALC245_FIXUP_HP_MUTE_LED_COEFBIT),
7580 SND_PCI_QUIRK(0x103c, 0x8bb3, "HP Slim OMEN", ALC287_FIXUP_CS35L41_I2C_2),
7581 SND_PCI_QUIRK(0x103c, 0x8bb4, "HP Slim OMEN", ALC287_FIXUP_CS35L41_I2C_2),
7582 SND_PCI_QUIRK(0x103c, 0x8bb6, "HP Laptop 15-fd0039nt", ALC236_FIXUP_HP_15_FD0XXX),
7583 SND_PCI_QUIRK(0x103c, 0x8bbe, "HP Victus 16-r0xxx (MB 8BBE)", ALC245_FIXUP_HP_MUTE_LED_COEFBIT),
7584 SND_PCI_QUIRK(0x103c, 0x8bc8, "HP Victus 15-fa1xxx", ALC245_FIXUP_HP_MUTE_LED_COEFBIT),
7585 SND_PCI_QUIRK(0x103c, 0x8bcd, "HP Omen 16-xd0xxx", ALC245_FIXUP_HP_MUTE_LED_V1_COEFBIT),
7586 SND_PCI_QUIRK(0x103c, 0x8bd4, "HP Victus 16-s0xxx (MB 8BD4)", ALC245_FIXUP_HP_MUTE_LED_COEFBIT),
7587 SND_PCI_QUIRK(0x103c, 0x8bd6, "HP Pavilion Aero Laptop 13z-be200", ALC287_FIXUP_HP_GPIO_LED),
7588 SND_PCI_QUIRK(0x103c, 0x8bdd, "HP Envy 17", ALC287_FIXUP_CS35L41_I2C_2),
7589 SND_PCI_QUIRK(0x103c, 0x8bde, "HP Envy 17", ALC287_FIXUP_CS35L41_I2C_2),
7590 SND_PCI_QUIRK(0x103c, 0x8bdf, "HP Envy 15", ALC287_FIXUP_CS35L41_I2C_2),
7591 SND_PCI_QUIRK(0x103c, 0x8be0, "HP Envy 15", ALC287_FIXUP_CS35L41_I2C_2),
7592 SND_PCI_QUIRK(0x103c, 0x8be1, "HP Envy 15", ALC287_FIXUP_CS35L41_I2C_2),
7593 SND_PCI_QUIRK(0x103c, 0x8be2, "HP Envy 15", ALC287_FIXUP_CS35L41_I2C_2),
7594 SND_PCI_QUIRK(0x103c, 0x8be3, "HP Envy 15", ALC287_FIXUP_CS35L41_I2C_2),
7595 SND_PCI_QUIRK(0x103c, 0x8be5, "HP Envy 16", ALC287_FIXUP_CS35L41_I2C_2),
7596 SND_PCI_QUIRK(0x103c, 0x8be6, "HP Envy 16", ALC287_FIXUP_CS35L41_I2C_2),
7597 SND_PCI_QUIRK(0x103c, 0x8be7, "HP Envy 17", ALC287_FIXUP_CS35L41_I2C_2),
7598 SND_PCI_QUIRK(0x103c, 0x8be8, "HP Envy 17", ALC287_FIXUP_CS35L41_I2C_2),
7599 SND_PCI_QUIRK(0x103c, 0x8be9, "HP Envy x360 2-in-1 Laptop 15-fh0xxx", ALC245_FIXUP_HP_ENVY_X360_15_FH0XXX),
7600 SND_PCI_QUIRK(0x103c, 0x8bf0, "HP", ALC236_FIXUP_HP_GPIO_LED),
7601 SND_PCI_QUIRK(0x103c, 0x8c15, "HP Spectre x360 2-in-1 Laptop 14-eu0xxx", ALC245_FIXUP_HP_SPECTRE_X360_EU0XXX),
7602 SND_PCI_QUIRK(0x103c, 0x8c16, "HP Spectre x360 2-in-1 Laptop 16-aa0xxx", ALC245_FIXUP_HP_SPECTRE_X360_16_AA0XXX),
7603 SND_PCI_QUIRK(0x103c, 0x8c17, "HP Spectre x360 2-in-1 Laptop 16-aa0xxx", ALC245_FIXUP_HP_SPECTRE_X360_16_AA0XXX),
7604 SND_PCI_QUIRK(0x103c, 0x8c21, "HP Pavilion Plus Laptop 14-ey0XXX", ALC245_FIXUP_HP_X360_MUTE_LEDS),
7605 SND_PCI_QUIRK(0x103c, 0x8c2d, "HP Victus 15-fa1xxx (MB 8C2D)", ALC245_FIXUP_HP_MUTE_LED_COEFBIT),
7606 SND_PCI_QUIRK(0x103c, 0x8c30, "HP Victus 15-fb1xxx", ALC245_FIXUP_HP_MUTE_LED_COEFBIT),
7607 SND_PCI_QUIRK(0x103c, 0x8c3f, "HP Victus 15-fa1xxx (MB 8C3F)", ALC245_FIXUP_HP_MUTE_LED_COEFBIT),
7608 SND_PCI_QUIRK(0x103c, 0x8c46, "HP EliteBook 830 G11", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
7609 SND_PCI_QUIRK(0x103c, 0x8c47, "HP EliteBook 840 G11", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
7610 SND_PCI_QUIRK(0x103c, 0x8c48, "HP EliteBook 860 G11", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
7611 SND_PCI_QUIRK(0x103c, 0x8c49, "HP Elite x360 830 2-in-1 G11", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
7612 SND_PCI_QUIRK(0x103c, 0x8c4d, "HP Omen", ALC287_FIXUP_CS35L41_I2C_2),
7613 SND_PCI_QUIRK(0x103c, 0x8c4e, "HP Omen", ALC287_FIXUP_CS35L41_I2C_2),
7614 SND_PCI_QUIRK(0x103c, 0x8c4f, "HP Envy 15", ALC287_FIXUP_CS35L41_I2C_2),
7615 SND_PCI_QUIRK(0x103c, 0x8c50, "HP Envy 17", ALC287_FIXUP_CS35L41_I2C_2),
7616 SND_PCI_QUIRK(0x103c, 0x8c51, "HP Envy 17", ALC287_FIXUP_CS35L41_I2C_2),
7617 SND_PCI_QUIRK(0x103c, 0x8c52, "HP EliteBook 1040 G11", ALC285_FIXUP_HP_GPIO_LED),
7618 SND_PCI_QUIRK(0x103c, 0x8c53, "HP Elite x360 1040 2-in-1 G11", ALC285_FIXUP_HP_GPIO_LED),
7619 SND_PCI_QUIRK(0x103c, 0x8c66, "HP Envy 16", ALC287_FIXUP_CS35L41_I2C_2),
7620 SND_PCI_QUIRK(0x103c, 0x8c67, "HP Envy 17", ALC287_FIXUP_CS35L41_I2C_2),
7621 SND_PCI_QUIRK(0x103c, 0x8c68, "HP Envy 17", ALC287_FIXUP_CS35L41_I2C_2),
7622 SND_PCI_QUIRK(0x103c, 0x8c6a, "HP Envy 16", ALC287_FIXUP_CS35L41_I2C_2),
7623 SND_PCI_QUIRK(0x103c, 0x8c70, "HP EliteBook 835 G11", ALC287_FIXUP_CS35L41_I2C_2_HP_GPIO_LED),
7624 SND_PCI_QUIRK(0x103c, 0x8c71, "HP EliteBook 845 G11", ALC287_FIXUP_CS35L41_I2C_2_HP_GPIO_LED),
7625 SND_PCI_QUIRK(0x103c, 0x8c72, "HP EliteBook 865 G11", ALC287_FIXUP_CS35L41_I2C_2_HP_GPIO_LED),
7626 SND_PCI_QUIRK(0x103c, 0x8c7b, "HP ProBook 445 G11", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF),
7627 SND_PCI_QUIRK(0x103c, 0x8c7c, "HP ProBook 445 G11", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF),
7628 SND_PCI_QUIRK(0x103c, 0x8c7d, "HP ProBook 465 G11", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF),
7629 SND_PCI_QUIRK(0x103c, 0x8c7e, "HP ProBook 465 G11", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF),
7630 SND_PCI_QUIRK(0x103c, 0x8c7f, "HP EliteBook 645 G11", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF),
7631 SND_PCI_QUIRK(0x103c, 0x8c80, "HP EliteBook 645 G11", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF),
7632 SND_PCI_QUIRK(0x103c, 0x8c81, "HP EliteBook 665 G11", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF),
7633 SND_PCI_QUIRK(0x103c, 0x8c89, "HP ProBook 460 G11", ALC236_FIXUP_HP_GPIO_LED),
7634 SND_PCI_QUIRK(0x103c, 0x8c8a, "HP EliteBook 630", ALC236_FIXUP_HP_GPIO_LED),
7635 SND_PCI_QUIRK(0x103c, 0x8c8c, "HP EliteBook 660", ALC236_FIXUP_HP_GPIO_LED),
7636 SND_PCI_QUIRK(0x103c, 0x8c8d, "HP ProBook 440 G11", ALC236_FIXUP_HP_GPIO_LED),
7637 SND_PCI_QUIRK(0x103c, 0x8c8e, "HP ProBook 460 G11", ALC236_FIXUP_HP_GPIO_LED),
7638 SND_PCI_QUIRK(0x103c, 0x8c8f, "HP EliteBook 630 G11", ALC236_FIXUP_HP_GPIO_LED),
7639 SND_PCI_QUIRK(0x103c, 0x8c90, "HP EliteBook 640", ALC236_FIXUP_HP_GPIO_LED),
7640 SND_PCI_QUIRK(0x103c, 0x8c91, "HP EliteBook 660", ALC236_FIXUP_HP_GPIO_LED),
7641 SND_PCI_QUIRK(0x103c, 0x8c96, "HP", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF),
7642 SND_PCI_QUIRK(0x103c, 0x8c97, "HP ZBook", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF),
7643 SND_PCI_QUIRK(0x103c, 0x8c99, "HP Victus 16-r1xxx (MB 8C99)", ALC245_FIXUP_HP_MUTE_LED_COEFBIT),
7644 SND_PCI_QUIRK(0x103c, 0x8c9c, "HP Victus 16-s1xxx (MB 8C9C)", ALC245_FIXUP_HP_MUTE_LED_COEFBIT),
7645 SND_PCI_QUIRK(0x103c, 0x8ca1, "HP ZBook Power", ALC236_FIXUP_HP_GPIO_LED),
7646 SND_PCI_QUIRK(0x103c, 0x8ca2, "HP ZBook Power", ALC236_FIXUP_HP_GPIO_LED),
7647 SND_PCI_QUIRK(0x103c, 0x8ca4, "HP ZBook Fury", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
7648 SND_PCI_QUIRK(0x103c, 0x8ca7, "HP ZBook Fury", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
7649 SND_PCI_QUIRK(0x103c, 0x8caf, "HP Elite mt645 G8 Mobile Thin Client", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF),
7650 SND_PCI_QUIRK(0x103c, 0x8cbc, "HP Pavilion Laptop 16-ag0xxx", ALC245_FIXUP_HP_X360_MUTE_LEDS),
7651 SND_PCI_QUIRK(0x103c, 0x8cbd, "HP Pavilion Aero Laptop 13-bg0xxx", ALC245_FIXUP_HP_X360_MUTE_LEDS),
7652 SND_PCI_QUIRK(0x103c, 0x8cdd, "HP Spectre", ALC245_FIXUP_HP_SPECTRE_X360_EU0XXX),
7653 SND_PCI_QUIRK(0x103c, 0x8cde, "HP OmniBook Ultra Flip Laptop 14t", ALC245_FIXUP_HP_SPECTRE_X360_EU0XXX),
7654 SND_PCI_QUIRK(0x103c, 0x8cdf, "HP SnowWhite", ALC287_FIXUP_CS35L41_I2C_2_HP_GPIO_LED),
7655 SND_PCI_QUIRK(0x103c, 0x8ce0, "HP SnowWhite", ALC287_FIXUP_CS35L41_I2C_2_HP_GPIO_LED),
7656 SND_PCI_QUIRK(0x103c, 0x8cf5, "HP ZBook Studio 16", ALC245_FIXUP_CS35L41_SPI_4_HP_GPIO_LED),
7657 SND_PCI_QUIRK(0x103c, 0x8d01, "HP ZBook Power 14 G12", ALC285_FIXUP_HP_GPIO_LED),
7658 SND_PCI_QUIRK(0x103c, 0x8d07, "HP Victus 15-fb2xxx (MB 8D07)", ALC245_FIXUP_HP_MUTE_LED_COEFBIT),
7659 SND_PCI_QUIRK(0x103c, 0x8d18, "HP EliteStudio 8 AIO", ALC274_FIXUP_HP_AIO_BIND_DACS),
7660 SND_PCI_QUIRK(0x103c, 0x8d84, "HP EliteBook X G1i", ALC285_FIXUP_HP_GPIO_LED),
7661 SND_PCI_QUIRK(0x103c, 0x8d85, "HP EliteBook 14 G12", ALC285_FIXUP_HP_GPIO_LED),
7662 SND_PCI_QUIRK(0x103c, 0x8d86, "HP Elite X360 14 G12", ALC285_FIXUP_HP_GPIO_LED),
7663 SND_PCI_QUIRK(0x103c, 0x8d8c, "HP EliteBook 13 G12", ALC285_FIXUP_HP_GPIO_LED),
7664 SND_PCI_QUIRK(0x103c, 0x8d8d, "HP Elite X360 13 G12", ALC285_FIXUP_HP_GPIO_LED),
7665 SND_PCI_QUIRK(0x103c, 0x8d8e, "HP EliteBook 14 G12", ALC285_FIXUP_HP_GPIO_LED),
7666 SND_PCI_QUIRK(0x103c, 0x8d8f, "HP EliteBook 14 G12", ALC285_FIXUP_HP_GPIO_LED),
7667 SND_PCI_QUIRK(0x103c, 0x8d90, "HP EliteBook 16 G12", ALC285_FIXUP_HP_GPIO_LED),
7668 SND_PCI_QUIRK(0x103c, 0x8d91, "HP ZBook Firefly 14 G12", ALC285_FIXUP_HP_GPIO_LED),
7669 SND_PCI_QUIRK(0x103c, 0x8d92, "HP ZBook Firefly 16 G12", ALC285_FIXUP_HP_GPIO_LED),
7670 SND_PCI_QUIRK(0x103c, 0x8dcd, "HP Victus 15-fa2xxx", ALC245_FIXUP_HP_MUTE_LED_COEFBIT),
7671 SND_PCI_QUIRK(0x103c, 0x8d9b, "HP 17 Turbine OmniBook 7 UMA", ALC287_FIXUP_CS35L41_I2C_2),
7672 SND_PCI_QUIRK(0x103c, 0x8d9c, "HP 17 Turbine OmniBook 7 DIS", ALC287_FIXUP_CS35L41_I2C_2_HP_MUTE_LEDS),
7673 SND_PCI_QUIRK(0x103c, 0x8d9d, "HP 17 Turbine OmniBook X UMA", ALC287_FIXUP_CS35L41_I2C_2),
7674 SND_PCI_QUIRK(0x103c, 0x8d9e, "HP 17 Turbine OmniBook X DIS", ALC287_FIXUP_CS35L41_I2C_2),
7675 SND_PCI_QUIRK(0x103c, 0x8d9f, "HP 14 Cadet (x360)", ALC287_FIXUP_CS35L41_I2C_2),
7676 SND_PCI_QUIRK(0x103c, 0x8da0, "HP 16 Clipper OmniBook 7(X360)", ALC287_FIXUP_CS35L41_I2C_2),
7677 SND_PCI_QUIRK(0x103c, 0x8da1, "HP 16 Clipper OmniBook X", ALC287_FIXUP_CS35L41_I2C_2),
7678 SND_PCI_QUIRK(0x103c, 0x8da7, "HP 14 Enstrom OmniBook X", ALC287_FIXUP_CS35L41_I2C_2),
7679 SND_PCI_QUIRK(0x103c, 0x8da8, "HP 16 Piston OmniBook X", ALC245_FIXUP_HP_ENVY_X360_15_FH0XXX),
7680 SND_PCI_QUIRK(0x103c, 0x8dc9, "HP Laptop 15-fc0xxx", ALC236_FIXUP_HP_DMIC),
7681 SND_PCI_QUIRK(0x103c, 0x8dd4, "HP EliteStudio 8 AIO", ALC274_FIXUP_HP_AIO_BIND_DACS),
7682 SND_PCI_QUIRK(0x103c, 0x8dd7, "HP Laptop 15-fd0xxx", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_GPIO),
7683 SND_PCI_QUIRK(0x103c, 0x8de8, "HP Gemtree", ALC245_FIXUP_TAS2781_SPI_2),
7684 SND_PCI_QUIRK(0x103c, 0x8de9, "HP Gemtree", ALC245_FIXUP_TAS2781_SPI_2),
7685 SND_PCI_QUIRK(0x103c, 0x8dec, "HP EliteBook 640 G12", ALC236_FIXUP_HP_GPIO_LED),
7686 SND_PCI_QUIRK(0x103c, 0x8ded, "HP EliteBook 640 G12", ALC236_FIXUP_HP_GPIO_LED),
7687 SND_PCI_QUIRK(0x103c, 0x8dee, "HP EliteBook 660 G12", ALC236_FIXUP_HP_GPIO_LED),
7688 SND_PCI_QUIRK(0x103c, 0x8def, "HP EliteBook 660 G12", ALC236_FIXUP_HP_GPIO_LED),
7689 SND_PCI_QUIRK(0x103c, 0x8df0, "HP EliteBook 630 G12", ALC236_FIXUP_HP_GPIO_LED),
7690 SND_PCI_QUIRK(0x103c, 0x8df1, "HP EliteBook 630 G12", ALC236_FIXUP_HP_GPIO_LED),
7691 SND_PCI_QUIRK(0x103c, 0x8df7, "HP Z66 G6", ALC236_FIXUP_HP_GPIO_LED),
7692 SND_PCI_QUIRK(0x103c, 0x8dfb, "HP EliteBook 6 G1a 14", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF),
7693 SND_PCI_QUIRK(0x103c, 0x8dfc, "HP EliteBook 645 G12", ALC236_FIXUP_HP_GPIO_LED),
7694 SND_PCI_QUIRK(0x103c, 0x8dfd, "HP EliteBook 6 G1a 16", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF),
7695 SND_PCI_QUIRK(0x103c, 0x8dfe, "HP EliteBook 665 G12", ALC236_FIXUP_HP_GPIO_LED),
7696 SND_PCI_QUIRK(0x103c, 0x8e0d, "HP EliteBook 6 G1a 14 (AD3Q9ET#UUG)", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF),
7697 SND_PCI_QUIRK(0x103c, 0x8e11, "HP Trekker", ALC287_FIXUP_CS35L41_I2C_2),
7698 SND_PCI_QUIRK(0x103c, 0x8e12, "HP Trekker", ALC287_FIXUP_CS35L41_I2C_2),
7699 SND_PCI_QUIRK(0x103c, 0x8e13, "HP Trekker", ALC287_FIXUP_CS35L41_I2C_2),
7700 SND_PCI_QUIRK(0x103c, 0x8e14, "HP ZBook Firefly 14 G12", ALC245_FIXUP_HP_ZBOOK_FIREFLY_G12A),
7701 SND_PCI_QUIRK(0x103c, 0x8e15, "HP ZBook Firefly 14 G12", ALC245_FIXUP_HP_ZBOOK_FIREFLY_G12A),
7702 SND_PCI_QUIRK(0x103c, 0x8e16, "HP ZBook Firefly 14 G12", ALC245_FIXUP_HP_ZBOOK_FIREFLY_G12A),
7703 SND_PCI_QUIRK(0x103c, 0x8e17, "HP ZBook Firefly 14 G12", ALC245_FIXUP_HP_ZBOOK_FIREFLY_G12A),
7704 SND_PCI_QUIRK(0x103c, 0x8e18, "HP ZBook Firefly 14 G12A", ALC245_FIXUP_HP_ZBOOK_FIREFLY_G12A),
7705 SND_PCI_QUIRK(0x103c, 0x8e19, "HP ZBook Firefly 14 G12A", ALC245_FIXUP_HP_ZBOOK_FIREFLY_G12A),
7706 SND_PCI_QUIRK(0x103c, 0x8e1a, "HP ZBook Firefly 14 G12A", ALC245_FIXUP_HP_ZBOOK_FIREFLY_G12A),
7707 SND_PCI_QUIRK(0x103c, 0x8e1b, "HP EliteBook G12", ALC245_FIXUP_HP_ZBOOK_FIREFLY_G12A),
7708 SND_PCI_QUIRK(0x103c, 0x8e1c, "HP EliteBook G12", ALC245_FIXUP_HP_ZBOOK_FIREFLY_G12A),
7709 SND_PCI_QUIRK(0x103c, 0x8e1d, "HP ZBook X Gli 16 G12", ALC236_FIXUP_HP_GPIO_LED),
7710 SND_PCI_QUIRK(0x103c, 0x8e2c, "HP EliteBook 16 G12", ALC285_FIXUP_HP_GPIO_LED),
7711 SND_PCI_QUIRK(0x103c, 0x8e36, "HP 14 Enstrom OmniBook X", ALC287_FIXUP_CS35L41_I2C_2),
7712 SND_PCI_QUIRK(0x103c, 0x8e37, "HP 16 Piston OmniBook X", ALC287_FIXUP_CS35L41_I2C_2),
7713 SND_PCI_QUIRK(0x103c, 0x8e3a, "HP Agusta", ALC287_FIXUP_CS35L41_I2C_2),
7714 SND_PCI_QUIRK(0x103c, 0x8e3b, "HP Agusta", ALC287_FIXUP_CS35L41_I2C_2),
7715 SND_PCI_QUIRK(0x103c, 0x8e60, "HP OmniBook 7 Laptop 16-bh0xxx", ALC245_FIXUP_CS35L41_I2C_2_MUTE_LED),
7716 SND_PCI_QUIRK(0x103c, 0x8e61, "HP Trekker ", ALC287_FIXUP_CS35L41_I2C_2),
7717 SND_PCI_QUIRK(0x103c, 0x8e62, "HP Trekker ", ALC287_FIXUP_CS35L41_I2C_2),
7718 SND_PCI_QUIRK(0x103c, 0x8e75, "HP Trekker G7JC", ALC287_FIXUP_CS35L41_I2C_2),
7719 SND_PCI_QUIRK(0x103c, 0x8e8a, "HP NexusX", ALC245_FIXUP_HP_TAS2781_I2C_MUTE_LED),
7720 SND_PCI_QUIRK(0x103c, 0x8e9c, "HP 16 Clipper OmniBook X X360", ALC287_FIXUP_CS35L41_I2C_2),
7721 SND_PCI_QUIRK(0x103c, 0x8e9d, "HP 17 Turbine OmniBook X UMA", ALC287_FIXUP_CS35L41_I2C_2),
7722 SND_PCI_QUIRK(0x103c, 0x8e9e, "HP 17 Turbine OmniBook X UMA", ALC287_FIXUP_CS35L41_I2C_2),
7723 SND_PCI_QUIRK(0x103c, 0x8eb6, "HP Abe A6U", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_GPIO),
7724 SND_PCI_QUIRK(0x103c, 0x8eb8, "HP Abe A6U", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_GPIO),
7725 SND_PCI_QUIRK(0x103c, 0x8ec1, "HP 200 G2i", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_GPIO),
7726 SND_PCI_QUIRK(0x103c, 0x8ec4, "HP Bantie I6U", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_GPIO),
7727 SND_PCI_QUIRK(0x103c, 0x8ec5, "HP Bantie I6U", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_GPIO),
7728 SND_PCI_QUIRK(0x103c, 0x8ece, "HP Abe I6U", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_GPIO),
7729 SND_PCI_QUIRK(0x103c, 0x8ecf, "HP Abe I6U", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_GPIO),
7730 SND_PCI_QUIRK(0x103c, 0x8ed2, "HP Abe I6U", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_GPIO),
7731 SND_PCI_QUIRK(0x103c, 0x8ed5, "HP EliteBook 8 Flip G2i 13", ALC245_FIXUP_HP_TAS2781_SPI_MUTE_LED),
7732 SND_PCI_QUIRK(0x103c, 0x8ed6, "HP EliteBook 8 G2i 13", ALC245_FIXUP_HP_TAS2781_SPI_MUTE_LED),
7733 SND_PCI_QUIRK(0x103c, 0x8ed7, "HP EliteBook 8 G2i 14", ALC245_FIXUP_HP_TAS2781_SPI_MUTE_LED),
7734 SND_PCI_QUIRK(0x103c, 0x8ed8, "HP EliteBook 8 G2i 16", ALC245_FIXUP_HP_TAS2781_SPI_MUTE_LED),
7735 SND_PCI_QUIRK(0x103c, 0x8ed9, "HP ZBook Firefly 14W", ALC245_FIXUP_HP_TAS2781_SPI_MUTE_LED),
7736 SND_PCI_QUIRK(0x103c, 0x8eda, "HP ZBook Firefly 16W", ALC245_FIXUP_HP_TAS2781_SPI_MUTE_LED),
7737 SND_PCI_QUIRK(0x103c, 0x8ee4, "HP Bantie A6U", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_GPIO),
7738 SND_PCI_QUIRK(0x103c, 0x8ee5, "HP Bantie A6U", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_GPIO),
7739 SND_PCI_QUIRK(0x103c, 0x8ee7, "HP Abe A6U", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_GPIO),
7740 SND_PCI_QUIRK(0x103c, 0x8f07, "HP Agusta G7KX", ALC287_FIXUP_CS35L41_I2C_2),
7741 SND_PCI_QUIRK(0x103c, 0x8f0c, "HP ZBook X G2i 16W", ALC236_FIXUP_HP_GPIO_LED),
7742 SND_PCI_QUIRK(0x103c, 0x8f0e, "HP ZBook X G2i 16W", ALC236_FIXUP_HP_GPIO_LED),
7743 SND_PCI_QUIRK(0x103c, 0x8f2d, "HP Auster 14", ALC287_FIXUP_CS35L41_I2C_2),
7744 SND_PCI_QUIRK(0x103c, 0x8f2e, "HP Auster 14", ALC287_FIXUP_CS35L41_I2C_2),
7745 SND_PCI_QUIRK(0x103c, 0x8f37, "HP EliteBook 6 G2i", ALC236_FIXUP_HP_GPIO_LED),
7746 SND_PCI_QUIRK(0x103c, 0x8f38, "HP EliteBook 6 G2i", ALC236_FIXUP_HP_GPIO_LED),
7747 SND_PCI_QUIRK(0x103c, 0x8f39, "HP EliteBook 6 G2i", ALC236_FIXUP_HP_GPIO_LED),
7748 SND_PCI_QUIRK(0x103c, 0x8f3a, "HP EliteBook 6 G2i", ALC236_FIXUP_HP_GPIO_LED),
7749 SND_PCI_QUIRK(0x103c, 0x8f3c, "HP EliteBook 6 G2a", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF),
7750 SND_PCI_QUIRK(0x103c, 0x8f3d, "HP EliteBook 6 G2a", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF),
7751 SND_PCI_QUIRK(0x103c, 0x8f40, "HP ZBook 8 G2a 14", ALC245_FIXUP_HP_TAS2781_I2C_MUTE_LED),
7752 SND_PCI_QUIRK(0x103c, 0x8f41, "HP ZBook 8 G2a 16", ALC245_FIXUP_HP_TAS2781_I2C_MUTE_LED),
7753 SND_PCI_QUIRK(0x103c, 0x8f42, "HP ZBook 8 G2a 14W", ALC245_FIXUP_HP_TAS2781_I2C_MUTE_LED),
7754 SND_PCI_QUIRK(0x103c, 0x8f57, "HP Trekker G7JC", ALC287_FIXUP_CS35L41_I2C_2),
7755 SND_PCI_QUIRK(0x103c, 0x8f62, "HP ZBook 8 G2a 16W", ALC245_FIXUP_HP_TAS2781_I2C_MUTE_LED),
7756 SND_PCI_QUIRK(0x103c, 0x8f7e, "HP Messi", ALC245_FIXUP_HP_TAS2781_I2C_MUTE_LED),
7757 SND_PCI_QUIRK(0x103c, 0x8f94, "HP ZBook 8 G2a 14", ALC245_FIXUP_HP_TAS2781_I2C_MUTE_LED_INVERTED),
7758 SND_PCI_QUIRK(0x103c, 0x8f95, "HP ZBook 8 G2a 16", ALC245_FIXUP_HP_TAS2781_I2C_MUTE_LED_INVERTED),
7759 SND_PCI_QUIRK(0x1043, 0x1024, "ASUS Zephyrus G14 2025", ALC285_FIXUP_ASUS_GA403U_HEADSET_MIC),
7760 SND_PCI_QUIRK(0x1043, 0x1032, "ASUS VivoBook X513EA", ALC256_FIXUP_ASUS_MIC_NO_PRESENCE),
7761 SND_PCI_QUIRK(0x1043, 0x1034, "ASUS GU605C", ALC285_FIXUP_ASUS_GU605_SPI_SPEAKER2_TO_DAC1),
7762 SND_PCI_QUIRK(0x1043, 0x103e, "ASUS X540SA", ALC256_FIXUP_ASUS_MIC),
7763 SND_PCI_QUIRK(0x1043, 0x103f, "ASUS TX300", ALC282_FIXUP_ASUS_TX300),
7764 SND_PCI_QUIRK(0x1043, 0x1044, "ASUS GA403UM", ALC285_FIXUP_ASUS_GA403U_HEADSET_MIC),
7765 SND_PCI_QUIRK(0x1043, 0x1054, "ASUS G614FH/FM/FP", ALC287_FIXUP_CS35L41_I2C_2),
7766 SND_PCI_QUIRK(0x1043, 0x106d, "Asus K53BE", ALC269_FIXUP_LIMIT_INT_MIC_BOOST),
7767 SND_PCI_QUIRK(0x1043, 0x106f, "ASUS VivoBook X515UA", ALC256_FIXUP_ASUS_MIC_NO_PRESENCE),
7768 SND_PCI_QUIRK(0x1043, 0x1074, "ASUS G614PH/PM/PP", ALC287_FIXUP_CS35L41_I2C_2),
7769 SND_PCI_QUIRK(0x1043, 0x10a1, "ASUS UX391UA", ALC294_FIXUP_ASUS_SPK),
7770 SND_PCI_QUIRK(0x1043, 0x10a4, "ASUS TP3407SA", ALC287_FIXUP_TAS2781_I2C),
7771 SND_PCI_QUIRK(0x1043, 0x10c0, "ASUS X540SA", ALC256_FIXUP_ASUS_MIC),
7772 SND_PCI_QUIRK(0x1043, 0x10c4, "ASUS Vivobook S14 S5406SA", ALC2XX_FIXUP_HEADSET_MIC),
7773 SND_PCI_QUIRK(0x1043, 0x10d0, "ASUS X540LA/X540LJ", ALC255_FIXUP_ASUS_MIC_NO_PRESENCE),
7774 SND_PCI_QUIRK(0x1043, 0x10d3, "ASUS K6500ZC", ALC294_FIXUP_ASUS_SPK),
7775 SND_PCI_QUIRK(0x1043, 0x1154, "ASUS TP3607SH", ALC287_FIXUP_TAS2781_I2C),
7776 SND_PCI_QUIRK(0x1043, 0x115d, "Asus 1015E", ALC269_FIXUP_LIMIT_INT_MIC_BOOST),
7777 SND_PCI_QUIRK(0x1043, 0x1194, "ASUS UM3406KA", ALC287_FIXUP_CS35L41_I2C_2),
7778 SND_PCI_QUIRK(0x1043, 0x11c0, "ASUS X556UR", ALC255_FIXUP_ASUS_MIC_NO_PRESENCE),
7779 SND_PCI_QUIRK(0x1043, 0x1204, "ASUS Strix G615JHR_JMR_JPR", ALC287_FIXUP_TXNW2781_I2C_ASUS),
7780 SND_PCI_QUIRK(0x1043, 0x1214, "ASUS Strix G615LH_LM_LP", ALC287_FIXUP_TXNW2781_I2C_ASUS),
7781 SND_PCI_QUIRK(0x1043, 0x125e, "ASUS Q524UQK", ALC255_FIXUP_ASUS_MIC_NO_PRESENCE),
7782 SND_PCI_QUIRK(0x1043, 0x1271, "ASUS X430UN", ALC256_FIXUP_ASUS_MIC_NO_PRESENCE),
7783 SND_PCI_QUIRK(0x1043, 0x1290, "ASUS X441SA", ALC233_FIXUP_EAPD_COEF_AND_MIC_NO_PRESENCE),
7784 SND_PCI_QUIRK(0x1043, 0x1294, "ASUS B3405CVA", ALC245_FIXUP_CS35L41_SPI_2),
7785 SND_PCI_QUIRK(0x1043, 0x12a0, "ASUS X441UV", ALC233_FIXUP_EAPD_COEF_AND_MIC_NO_PRESENCE),
7786 SND_PCI_QUIRK(0x1043, 0x12a3, "Asus N7691ZM", ALC269_FIXUP_ASUS_N7601ZM),
7787 SND_PCI_QUIRK(0x1043, 0x12af, "ASUS UX582ZS", ALC245_FIXUP_CS35L41_SPI_2),
7788 SND_PCI_QUIRK(0x1043, 0x12b4, "ASUS B3405CCA / P3405CCA", ALC294_FIXUP_ASUS_CS35L41_SPI_2),
7789 SND_PCI_QUIRK(0x1043, 0x12e0, "ASUS X541SA", ALC256_FIXUP_ASUS_MIC_NO_PRESENCE),
7790 SND_PCI_QUIRK(0x1043, 0x12f0, "ASUS X541UV", ALC256_FIXUP_ASUS_MIC_NO_PRESENCE),
7791 SND_PCI_QUIRK(0x1043, 0x1313, "Asus K42JZ", ALC269VB_FIXUP_ASUS_MIC_NO_PRESENCE),
7792 SND_PCI_QUIRK(0x1043, 0x1314, "ASUS GA605K", ALC285_FIXUP_ASUS_GA605K_HEADSET_MIC),
7793 SND_PCI_QUIRK(0x1043, 0x1384, "ASUS RC73XA", ALC287_FIXUP_TXNW2781_I2C_ASUS),
7794 SND_PCI_QUIRK(0x1043, 0x1394, "ASUS RC73YA", ALC287_FIXUP_TXNW2781_I2C_ASUS),
7795 SND_PCI_QUIRK(0x1043, 0x13b0, "ASUS Z550SA", ALC256_FIXUP_ASUS_MIC_NO_PRESENCE),
7796 SND_PCI_QUIRK(0x1043, 0x1427, "Asus Zenbook UX31E", ALC269VB_FIXUP_ASUS_ZENBOOK),
7797 SND_PCI_QUIRK(0x1043, 0x1433, "ASUS GX650PY/PZ/PV/PU/PYV/PZV/PIV/PVV", ALC285_FIXUP_ASUS_I2C_HEADSET_MIC),
7798 SND_PCI_QUIRK(0x1043, 0x1454, "ASUS PM3406CKA", ALC287_FIXUP_CS35L41_I2C_2),
7799 SND_PCI_QUIRK(0x1043, 0x1460, "Asus VivoBook 15", ALC256_FIXUP_ASUS_MIC_NO_PRESENCE),
7800 SND_PCI_QUIRK(0x1043, 0x1463, "Asus GA402X/GA402N", ALC285_FIXUP_ASUS_I2C_HEADSET_MIC),
7801 SND_PCI_QUIRK(0x1043, 0x1473, "ASUS GU604VI/VC/VE/VG/VJ/VQ/VU/VV/VY/VZ", ALC285_FIXUP_ASUS_HEADSET_MIC),
7802 SND_PCI_QUIRK(0x1043, 0x1483, "ASUS GU603VQ/VU/VV/VJ/VI", ALC285_FIXUP_ASUS_HEADSET_MIC),
7803 SND_PCI_QUIRK(0x1043, 0x1493, "ASUS GV601VV/VU/VJ/VQ/VI", ALC285_FIXUP_ASUS_HEADSET_MIC),
7804 SND_PCI_QUIRK(0x1043, 0x14d3, "ASUS G614JY/JZ/JG", ALC245_FIXUP_CS35L41_SPI_2),
7805 SND_PCI_QUIRK(0x1043, 0x14e3, "ASUS G513PI/PU/PV", ALC287_FIXUP_CS35L41_I2C_2),
7806 SND_PCI_QUIRK(0x1043, 0x14f2, "ASUS VivoBook X515JA", ALC256_FIXUP_ASUS_MIC_NO_PRESENCE),
7807 SND_PCI_QUIRK(0x1043, 0x1503, "ASUS G733PY/PZ/PZV/PYV", ALC287_FIXUP_CS35L41_I2C_2),
7808 SND_PCI_QUIRK(0x1043, 0x1514, "ASUS ROG Flow Z13 GZ302EAC", ALC287_FIXUP_CS35L41_I2C_2),
7809 SND_PCI_QUIRK(0x1043, 0x1517, "Asus Zenbook UX31A", ALC269VB_FIXUP_ASUS_ZENBOOK_UX31A),
7810 SND_PCI_QUIRK(0x1043, 0x1533, "ASUS GV302XA/XJ/XQ/XU/XV/XI", ALC287_FIXUP_CS35L41_I2C_2),
7811 SND_PCI_QUIRK(0x1043, 0x1573, "ASUS GZ301VV/VQ/VU/VJ/VA/VC/VE/VVC/VQC/VUC/VJC/VEC/VCC", ALC285_FIXUP_ASUS_HEADSET_MIC),
7812 SND_PCI_QUIRK(0x1043, 0x1584, "ASUS UM3406GA ", ALC287_FIXUP_CS35L41_I2C_2),
7813 SND_PCI_QUIRK(0x1043, 0x1602, "ASUS ROG Strix SCAR 15", ALC285_FIXUP_ASUS_G533Z_PINS),
7814 SND_PCI_QUIRK(0x1043, 0x1652, "ASUS ROG Zephyrus Do 15 SE", ALC289_FIXUP_ASUS_ZEPHYRUS_DUAL_SPK),
7815 SND_PCI_QUIRK(0x1043, 0x1662, "ASUS GV301QH", ALC294_FIXUP_ASUS_DUAL_SPK),
7816 SND_PCI_QUIRK(0x1043, 0x1663, "ASUS GU603ZI/ZJ/ZQ/ZU/ZV", ALC285_FIXUP_ASUS_HEADSET_MIC),
7817 SND_PCI_QUIRK(0x1043, 0x1683, "ASUS UM3402YAR", ALC287_FIXUP_CS35L41_I2C_2),
7818 SND_PCI_QUIRK(0x1043, 0x16a3, "ASUS UX3402VA", ALC245_FIXUP_CS35L41_SPI_2),
7819 SND_PCI_QUIRK(0x1043, 0x16b2, "ASUS GU603", ALC289_FIXUP_ASUS_GA401),
7820 SND_PCI_QUIRK(0x1043, 0x16d3, "ASUS UX5304VA", ALC245_FIXUP_CS35L41_SPI_2),
7821 SND_PCI_QUIRK(0x1043, 0x16e3, "ASUS UX50", ALC269_FIXUP_STEREO_DMIC),
7822 SND_PCI_QUIRK(0x1043, 0x16f3, "ASUS UX7602VI/BZ", ALC245_FIXUP_CS35L41_SPI_2),
7823 SND_PCI_QUIRK(0x1043, 0x1740, "ASUS UX430UA", ALC295_FIXUP_ASUS_DACS),
7824 SND_PCI_QUIRK(0x1043, 0x17d1, "ASUS UX431FL", ALC294_FIXUP_ASUS_DUAL_SPK),
7825 SND_PCI_QUIRK(0x1043, 0x17f3, "ROG Ally NR2301L/X", ALC294_FIXUP_ASUS_ALLY),
7826 SND_PCI_QUIRK(0x1043, 0x1863, "ASUS UX6404VI/VV", ALC245_FIXUP_CS35L41_SPI_2),
7827 SND_PCI_QUIRK(0x1043, 0x1881, "ASUS Zephyrus S/M", ALC294_FIXUP_ASUS_GX502_PINS),
7828 SND_PCI_QUIRK(0x1043, 0x18b1, "Asus MJ401TA", ALC256_FIXUP_ASUS_HEADSET_MIC),
7829 SND_PCI_QUIRK(0x1043, 0x18d3, "ASUS UM3504DA", ALC287_FIXUP_CS35L41_I2C_2),
7830 SND_PCI_QUIRK(0x1043, 0x18f1, "Asus FX505DT", ALC256_FIXUP_ASUS_HEADSET_MIC),
7831 SND_PCI_QUIRK(0x1043, 0x194e, "ASUS UX563FD", ALC294_FIXUP_ASUS_HPE),
7832 SND_PCI_QUIRK(0x1043, 0x1970, "ASUS UX550VE", ALC289_FIXUP_ASUS_GA401),
7833 SND_PCI_QUIRK(0x1043, 0x197e, "ASUS VivoBook X509DAP", ALC256_FIXUP_ASUS_MIC_NO_PRESENCE),
7834 SND_PCI_QUIRK(0x1043, 0x1982, "ASUS B1400CEPE", ALC256_FIXUP_ASUS_HPE),
7835 SND_PCI_QUIRK(0x1043, 0x19ce, "ASUS B9450FA", ALC294_FIXUP_ASUS_HPE),
7836 SND_PCI_QUIRK(0x1043, 0x19e1, "ASUS UX581LV", ALC295_FIXUP_ASUS_MIC_NO_PRESENCE),
7837 SND_PCI_QUIRK(0x1043, 0x19f4, "ASUS UM3405GA", ALC294_FIXUP_ASUS_I2C_HEADSET_MIC),
7838 SND_PCI_QUIRK(0x1043, 0x1a13, "Asus G73Jw", ALC269_FIXUP_ASUS_G73JW),
7839 SND_PCI_QUIRK(0x1043, 0x1a63, "ASUS UX3405MA", ALC294_FIXUP_ASUS_SPI_HEADSET_MIC),
7840 SND_PCI_QUIRK(0x1043, 0x1a83, "ASUS UM5302LA", ALC287_FIXUP_CS35L41_I2C_2),
7841 SND_PCI_QUIRK(0x1043, 0x1a8e, "ASUS G712LWS", ALC294_FIXUP_LENOVO_MIC_LOCATION),
7842 SND_PCI_QUIRK(0x1043, 0x1a8f, "ASUS UX582ZS", ALC245_FIXUP_CS35L41_SPI_2),
7843 SND_PCI_QUIRK(0x1043, 0x1b11, "ASUS UX431DA", ALC294_FIXUP_ASUS_COEF_1B),
7844 SND_PCI_QUIRK(0x1043, 0x1b13, "ASUS U41SV/GA403U", ALC285_FIXUP_ASUS_GA403U_HEADSET_MIC),
7845 SND_PCI_QUIRK(0x1043, 0x1b93, "ASUS G614JVR/JIR", ALC245_FIXUP_CS35L41_SPI_2),
7846 SND_PCI_QUIRK(0x1043, 0x1bbd, "ASUS Z550MA", ALC255_FIXUP_ASUS_MIC_NO_PRESENCE),
7847 SND_PCI_QUIRK(0x1043, 0x1c03, "ASUS UM3406HA", ALC294_FIXUP_ASUS_I2C_HEADSET_MIC),
7848 SND_PCI_QUIRK(0x1043, 0x1c23, "Asus X55U", ALC269_FIXUP_LIMIT_INT_MIC_BOOST),
7849 SND_PCI_QUIRK(0x1043, 0x1c33, "ASUS UX5304MA", ALC245_FIXUP_CS35L41_SPI_2),
7850 SND_PCI_QUIRK(0x1043, 0x1c43, "ASUS UX8406MA", ALC245_FIXUP_CS35L41_SPI_2),
7851 SND_PCI_QUIRK(0x1043, 0x1c62, "ASUS GU603", ALC289_FIXUP_ASUS_GA401),
7852 SND_PCI_QUIRK(0x1043, 0x1c63, "ASUS GU605M", ALC285_FIXUP_ASUS_GU605_SPI_SPEAKER2_TO_DAC1),
7853 SND_PCI_QUIRK(0x1043, 0x1c80, "ASUS VivoBook TP401", ALC256_FIXUP_ASUS_MIC_NO_PRESENCE),
7854 SND_PCI_QUIRK(0x1043, 0x1c92, "ASUS ROG Strix G15", ALC285_FIXUP_ASUS_G533Z_PINS),
7855 SND_PCI_QUIRK(0x1043, 0x1c9f, "ASUS G614JU/JV/JI", ALC285_FIXUP_ASUS_HEADSET_MIC),
7856 SND_PCI_QUIRK(0x1043, 0x1caf, "ASUS G634JY/JZ/JI/JG", ALC285_FIXUP_ASUS_SPI_REAR_SPEAKERS),
7857 SND_PCI_QUIRK(0x1043, 0x1ccd, "ASUS X555UB", ALC256_FIXUP_ASUS_MIC_NO_PRESENCE),
7858 SND_PCI_QUIRK(0x1043, 0x1ccf, "ASUS G814JU/JV/JI", ALC245_FIXUP_CS35L41_SPI_2),
7859 SND_PCI_QUIRK(0x1043, 0x1cdf, "ASUS G814JY/JZ/JG", ALC245_FIXUP_CS35L41_SPI_2),
7860 SND_PCI_QUIRK(0x1043, 0x1cef, "ASUS G834JY/JZ/JI/JG", ALC285_FIXUP_ASUS_HEADSET_MIC),
7861 SND_PCI_QUIRK(0x1043, 0x1d1f, "ASUS G713PI/PU/PV/PVN", ALC287_FIXUP_CS35L41_I2C_2),
7862 SND_PCI_QUIRK(0x1043, 0x1d42, "ASUS Zephyrus G14 2022", ALC289_FIXUP_ASUS_GA401),
7863 SND_PCI_QUIRK(0x1043, 0x1d4e, "ASUS TM420", ALC256_FIXUP_ASUS_HPE),
7864 SND_PCI_QUIRK(0x1043, 0x1da2, "ASUS UP6502ZA/ZD", ALC245_FIXUP_CS35L41_SPI_2),
7865 SND_PCI_QUIRK(0x1043, 0x1df3, "ASUS UM5606WA", ALC294_FIXUP_BASS_SPEAKER_15),
7866 SND_PCI_QUIRK(0x1043, 0x1264, "ASUS UM5606KA", ALC294_FIXUP_BASS_SPEAKER_15),
7867 SND_PCI_QUIRK(0x1043, 0x1e02, "ASUS UX3402ZA", ALC245_FIXUP_CS35L41_SPI_2),
7868 SND_PCI_QUIRK(0x1043, 0x1e10, "ASUS VivoBook X507UAR", ALC256_FIXUP_ASUS_MIC_NO_PRESENCE),
7869 SND_PCI_QUIRK(0x1043, 0x1e3e, "ASUS VivoBook M515DA/X515DAP", ALC256_FIXUP_ASUS_MIC_NO_PRESENCE),
7870 SND_PCI_QUIRK(0x1043, 0x1e11, "ASUS Zephyrus G15", ALC289_FIXUP_ASUS_GA502),
7871 SND_PCI_QUIRK(0x1043, 0x1e12, "ASUS UM3402", ALC287_FIXUP_CS35L41_I2C_2),
7872 SND_PCI_QUIRK(0x1043, 0x1e1f, "ASUS Vivobook 15 X1504VAP", ALC2XX_FIXUP_HEADSET_MIC),
7873 SND_PCI_QUIRK(0x1043, 0x1e51, "ASUS Zephyrus M15", ALC294_FIXUP_ASUS_GU502_PINS),
7874 SND_PCI_QUIRK(0x1043, 0x1e5e, "ASUS ROG Strix G513", ALC294_FIXUP_ASUS_G513_PINS),
7875 SND_PCI_QUIRK(0x1043, 0x1e63, "ASUS H7606W", ALC285_FIXUP_ASUS_GU605_SPI_SPEAKER2_TO_DAC1),
7876 SND_PCI_QUIRK(0x1043, 0x1e83, "ASUS GA605W", ALC285_FIXUP_ASUS_GU605_SPI_SPEAKER2_TO_DAC1),
7877 SND_PCI_QUIRK(0x1043, 0x1e8e, "ASUS Zephyrus G15", ALC289_FIXUP_ASUS_GA401),
7878 SND_PCI_QUIRK(0x1043, 0x1e93, "ASUS ExpertBook B9403CVAR", ALC294_FIXUP_ASUS_HPE),
7879 SND_PCI_QUIRK(0x1043, 0x1eb3, "ASUS Ally RC72LA", ALC287_FIXUP_ASUS_ALLY_X),
7880 SND_PCI_QUIRK(0x1043, 0x1ed3, "ASUS HN7306W", ALC287_FIXUP_CS35L41_I2C_2),
7881 SND_PCI_QUIRK(0x1043, 0x1ee2, "ASUS UM6702RA/RC", ALC285_FIXUP_ASUS_I2C_SPEAKER2_TO_DAC1),
7882 SND_PCI_QUIRK(0x1043, 0x1c52, "ASUS Zephyrus G15 2022", ALC289_FIXUP_ASUS_GA401),
7883 SND_PCI_QUIRK(0x1043, 0x1f11, "ASUS Zephyrus G14", ALC289_FIXUP_ASUS_GA401),
7884 SND_PCI_QUIRK(0x1043, 0x1f12, "ASUS UM5302", ALC287_FIXUP_CS35L41_I2C_2),
7885 SND_PCI_QUIRK(0x1043, 0x1f1f, "ASUS H7604JI/JV/J3D", ALC245_FIXUP_CS35L41_SPI_2),
7886 SND_PCI_QUIRK(0x1043, 0x1f62, "ASUS UX7602ZM", ALC245_FIXUP_CS35L41_SPI_2),
7887 SND_PCI_QUIRK(0x1043, 0x1f63, "ASUS P5405CSA", ALC245_FIXUP_CS35L41_SPI_2),
7888 SND_PCI_QUIRK(0x1043, 0x1f92, "ASUS ROG Flow X16", ALC289_FIXUP_ASUS_GA401),
7889 SND_PCI_QUIRK(0x1043, 0x1fb3, "ASUS ROG Flow Z13 GZ302EA", ALC287_FIXUP_CS35L41_I2C_2),
7890 SND_PCI_QUIRK(0x1043, 0x3011, "ASUS B5605CVA", ALC245_FIXUP_CS35L41_SPI_2),
7891 SND_PCI_QUIRK(0x1043, 0x3030, "ASUS ZN270IE", ALC256_FIXUP_ASUS_AIO_GPIO2),
7892 SND_PCI_QUIRK(0x1043, 0x3061, "ASUS B3405CCA", ALC294_FIXUP_ASUS_CS35L41_SPI_2),
7893 SND_PCI_QUIRK(0x1043, 0x3071, "ASUS B5405CCA", ALC294_FIXUP_ASUS_CS35L41_SPI_2),
7894 SND_PCI_QUIRK(0x1043, 0x30c1, "ASUS B3605CCA / P3605CCA", ALC294_FIXUP_ASUS_CS35L41_SPI_2),
7895 SND_PCI_QUIRK(0x1043, 0x30d1, "ASUS B5405CCA", ALC294_FIXUP_ASUS_CS35L41_SPI_2),
7896 SND_PCI_QUIRK(0x1043, 0x30e1, "ASUS B5605CCA", ALC294_FIXUP_ASUS_CS35L41_SPI_2),
7897 SND_PCI_QUIRK(0x1043, 0x31d0, "ASUS Zen AIO 27 Z272SD_A272SD", ALC274_FIXUP_ASUS_ZEN_AIO_27),
7898 SND_PCI_QUIRK(0x1043, 0x31e1, "ASUS B5605CCA", ALC294_FIXUP_ASUS_CS35L41_SPI_2),
7899 SND_PCI_QUIRK(0x1043, 0x31f1, "ASUS B3605CCA", ALC294_FIXUP_ASUS_CS35L41_SPI_2),
7900 SND_PCI_QUIRK(0x1043, 0x3391, "ASUS PM3606CKA", ALC287_FIXUP_CS35L41_I2C_2),
7901 SND_PCI_QUIRK(0x1043, 0x3601, "ASUS PM5406CGA", ALC287_FIXUP_CS35L41_I2C_2),
7902 SND_PCI_QUIRK(0x1043, 0x3611, "ASUS PM5606CGA", ALC287_FIXUP_CS35L41_I2C_2),
7903 SND_PCI_QUIRK(0x1043, 0x3701, "ASUS P5406CCA", ALC245_FIXUP_CS35L41_SPI_2),
7904 SND_PCI_QUIRK(0x1043, 0x3711, "ASUS P5606CCA", ALC245_FIXUP_CS35L41_SPI_2),
7905 SND_PCI_QUIRK(0x1043, 0x3a20, "ASUS G614JZR", ALC285_FIXUP_ASUS_SPI_REAR_SPEAKERS),
7906 SND_PCI_QUIRK(0x1043, 0x3a30, "ASUS G814JVR/JIR", ALC285_FIXUP_ASUS_SPI_REAR_SPEAKERS),
7907 SND_PCI_QUIRK(0x1043, 0x3a40, "ASUS G814JZR", ALC285_FIXUP_ASUS_SPI_REAR_SPEAKERS),
7908 SND_PCI_QUIRK(0x1043, 0x3a50, "ASUS G834JYR/JZR", ALC285_FIXUP_ASUS_SPI_REAR_SPEAKERS),
7909 SND_PCI_QUIRK(0x1043, 0x3a60, "ASUS G634JYR/JZR", ALC285_FIXUP_ASUS_SPI_REAR_SPEAKERS),
7910 SND_PCI_QUIRK(0x1043, 0x3d78, "ASUS GA603KH", ALC287_FIXUP_CS35L41_I2C_2),
7911 SND_PCI_QUIRK(0x1043, 0x3d88, "ASUS GA603KM", ALC287_FIXUP_CS35L41_I2C_2),
7912 SND_PCI_QUIRK(0x1043, 0x3e00, "ASUS G814FH/FM/FP", ALC287_FIXUP_CS35L41_I2C_2),
7913 SND_PCI_QUIRK(0x1043, 0x3e20, "ASUS G814PH/PM/PP", ALC287_FIXUP_CS35L41_I2C_2),
7914 SND_PCI_QUIRK(0x1043, 0x3e30, "ASUS TP3607SA", ALC287_FIXUP_TAS2781_I2C),
7915 SND_PCI_QUIRK(0x1043, 0x3ee0, "ASUS Strix G815_JHR_JMR_JPR", ALC287_FIXUP_TXNW2781_I2C),
7916 SND_PCI_QUIRK(0x1043, 0x3ef0, "ASUS Strix G635LR_LW_LX", ALC287_FIXUP_TXNW2781_I2C),
7917 SND_PCI_QUIRK(0x1043, 0x3f00, "ASUS Strix G815LH_LM_LP", ALC287_FIXUP_TXNW2781_I2C),
7918 SND_PCI_QUIRK(0x1043, 0x3f10, "ASUS Strix G835LR_LW_LX", ALC287_FIXUP_TXNW2781_I2C),
7919 SND_PCI_QUIRK(0x1043, 0x3f20, "ASUS Strix G615LR_LW", ALC287_FIXUP_TXNW2781_I2C),
7920 SND_PCI_QUIRK(0x1043, 0x3f30, "ASUS Strix G815LR_LW", ALC287_FIXUP_TXNW2781_I2C),
7921 SND_PCI_QUIRK(0x1043, 0x3fd0, "ASUS B3605CVA", ALC245_FIXUP_CS35L41_SPI_2),
7922 SND_PCI_QUIRK(0x1043, 0x3ff0, "ASUS B5405CVA", ALC245_FIXUP_CS35L41_SPI_2),
7923 SND_PCI_QUIRK(0x1043, 0x831a, "ASUS P901", ALC269_FIXUP_STEREO_DMIC),
7924 SND_PCI_QUIRK(0x1043, 0x834a, "ASUS S101", ALC269_FIXUP_STEREO_DMIC),
7925 SND_PCI_QUIRK(0x1043, 0x8398, "ASUS P1005", ALC269_FIXUP_STEREO_DMIC),
7926 SND_PCI_QUIRK(0x1043, 0x83ce, "ASUS P1005", ALC269_FIXUP_STEREO_DMIC),
7927 SND_PCI_QUIRK(0x1043, 0x8516, "ASUS X101CH", ALC269_FIXUP_ASUS_X101),
7928 SND_PCI_QUIRK(0x1043, 0x88f4, "ASUS NUC14LNS", ALC245_FIXUP_CS35L41_SPI_1),
7929 SND_PCI_QUIRK(0x104d, 0x9073, "Sony VAIO", ALC275_FIXUP_SONY_VAIO_GPIO2),
7930 SND_PCI_QUIRK(0x104d, 0x907b, "Sony VAIO", ALC275_FIXUP_SONY_HWEQ),
7931 SND_PCI_QUIRK(0x104d, 0x9084, "Sony VAIO", ALC275_FIXUP_SONY_HWEQ),
7932 SND_PCI_QUIRK(0x104d, 0x9099, "Sony VAIO S13", ALC275_FIXUP_SONY_DISABLE_AAMIX),
7933 SND_PCI_QUIRK(0x104d, 0x90b5, "Sony VAIO Pro 11", ALC286_FIXUP_SONY_MIC_NO_PRESENCE),
7934 SND_PCI_QUIRK(0x104d, 0x90b6, "Sony VAIO Pro 13", ALC286_FIXUP_SONY_MIC_NO_PRESENCE),
7935 SND_PCI_QUIRK(0x10cf, 0x1475, "Lifebook", ALC269_FIXUP_LIFEBOOK),
7936 SND_PCI_QUIRK(0x10cf, 0x159f, "Lifebook E780", ALC269_FIXUP_LIFEBOOK_NO_HP_TO_LINEOUT),
7937 SND_PCI_QUIRK(0x10cf, 0x15dc, "Lifebook T731", ALC269_FIXUP_LIFEBOOK_HP_PIN),
7938 SND_PCI_QUIRK(0x10cf, 0x1629, "Lifebook U7x7", ALC255_FIXUP_LIFEBOOK_U7x7_HEADSET_MIC),
7939 SND_PCI_QUIRK(0x10cf, 0x1757, "Lifebook E752", ALC269_FIXUP_LIFEBOOK_HP_PIN),
7940 SND_PCI_QUIRK(0x10cf, 0x1845, "Lifebook U904", ALC269_FIXUP_LIFEBOOK_EXTMIC),
7941 SND_PCI_QUIRK(0x10ec, 0x10f2, "Intel Reference board", ALC700_FIXUP_INTEL_REFERENCE),
7942 SND_PCI_QUIRK(0x10ec, 0x118c, "Medion EE4254 MD62100", ALC256_FIXUP_MEDION_HEADSET_NO_PRESENCE),
7943 SND_PCI_QUIRK(0x10ec, 0x119e, "Positivo SU C1400", ALC269_FIXUP_ASPIRE_HEADSET_MIC),
7944 SND_PCI_QUIRK(0x10ec, 0x11bc, "VAIO VJFE-IL", ALC269_FIXUP_LIMIT_INT_MIC_BOOST),
7945 SND_PCI_QUIRK(0x10ec, 0x1230, "Intel Reference board", ALC295_FIXUP_CHROME_BOOK),
7946 SND_PCI_QUIRK(0x10ec, 0x124c, "Intel Reference board", ALC295_FIXUP_CHROME_BOOK),
7947 SND_PCI_QUIRK(0x10ec, 0x1252, "Intel Reference board", ALC295_FIXUP_CHROME_BOOK),
7948 SND_PCI_QUIRK(0x10ec, 0x1254, "Intel Reference board", ALC295_FIXUP_CHROME_BOOK),
7949 SND_PCI_QUIRK(0x10ec, 0x12cc, "Intel Reference board", ALC295_FIXUP_CHROME_BOOK),
7950 SND_PCI_QUIRK(0x10ec, 0x12f6, "Intel Reference board", ALC295_FIXUP_CHROME_BOOK),
7951 SND_PCI_QUIRK(0x10f7, 0x8338, "Panasonic CF-SZ6", ALC269_FIXUP_ASPIRE_HEADSET_MIC),
7952 SND_PCI_QUIRK(0x1414, 0x9c20, "Microsoft Surface Pro 2/3", ALC288_FIXUP_SURFACE_SWAP_DACS),
7953 SND_PCI_QUIRK(0x144d, 0xc109, "Samsung Ativ book 9 (NP900X3G)", ALC269_FIXUP_INV_DMIC),
7954 SND_PCI_QUIRK(0x144d, 0xc169, "Samsung Notebook 9 Pen (NP930SBE-K01US)", ALC298_FIXUP_SAMSUNG_AMP),
7955 SND_PCI_QUIRK(0x144d, 0xc176, "Samsung Notebook 9 Pro (NP930MBE-K04US)", ALC298_FIXUP_SAMSUNG_AMP),
7956 SND_PCI_QUIRK(0x144d, 0xc188, "Samsung Galaxy Book Flex (NT950QCT-A38A)", ALC298_FIXUP_SAMSUNG_AMP),
7957 SND_PCI_QUIRK(0x144d, 0xc189, "Samsung Galaxy Book Flex (NT950QCG-X716)", ALC298_FIXUP_SAMSUNG_AMP),
7958 SND_PCI_QUIRK(0x144d, 0xc18a, "Samsung Galaxy Book Ion (NP930XCJ-K01US)", ALC298_FIXUP_SAMSUNG_AMP),
7959 SND_PCI_QUIRK(0x144d, 0xc1ac, "Samsung Galaxy Book2 Pro 360 (NP950QED)", ALC298_FIXUP_SAMSUNG_AMP_V2_2_AMPS),
7960 SND_PCI_QUIRK(0x144d, 0xc1a3, "Samsung Galaxy Book Pro (NP935XDB-KC1SE)", ALC298_FIXUP_SAMSUNG_AMP),
7961 SND_PCI_QUIRK(0x144d, 0xc1a4, "Samsung Galaxy Book Pro 360 (NT935QBD)", ALC298_FIXUP_SAMSUNG_AMP),
7962 SND_PCI_QUIRK(0x144d, 0xc1a6, "Samsung Galaxy Book Pro 360 (NP930QBD)", ALC298_FIXUP_SAMSUNG_AMP),
7963 SND_PCI_QUIRK(0x144d, 0xc740, "Samsung Ativ book 8 (NP870Z5G)", ALC269_FIXUP_ATIV_BOOK_8),
7964 SND_PCI_QUIRK(0x144d, 0xc812, "Samsung Notebook Pen S (NT950SBE-X58)", ALC298_FIXUP_SAMSUNG_AMP),
7965 HDA_CODEC_QUIRK(0x144d, 0xc824, "Samsung ELECTRONICS (750XBE/730XBE)", ALC298_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET),
7966 SND_PCI_QUIRK(0x144d, 0xc830, "Samsung Galaxy Book Ion (NT950XCJ-X716A)", ALC298_FIXUP_SAMSUNG_AMP),
7967 SND_PCI_QUIRK(0x144d, 0xc832, "Samsung Galaxy Book Flex Alpha (NP730QCJ)", ALC256_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET),
7968 SND_PCI_QUIRK(0x144d, 0xc876, "Samsung 730QED (NP730QED-KA2US)", ALC256_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET),
7969 SND_PCI_QUIRK(0x144d, 0xca03, "Samsung Galaxy Book2 Pro 360 (NP930QED)", ALC298_FIXUP_SAMSUNG_AMP),
7970 SND_PCI_QUIRK(0x144d, 0xca06, "Samsung Galaxy Book3 360 (NP730QFG)", ALC298_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET),
7971 SND_PCI_QUIRK(0x144d, 0xc868, "Samsung Galaxy Book2 Pro (NP930XED)", ALC298_FIXUP_SAMSUNG_AMP),
7972 SND_PCI_QUIRK(0x144d, 0xc870, "Samsung Galaxy Book2 Pro (NP950XED)", ALC298_FIXUP_SAMSUNG_AMP_V2_2_AMPS),
7973 SND_PCI_QUIRK(0x144d, 0xc872, "Samsung Galaxy Book2 Pro (NP950XEE)", ALC298_FIXUP_SAMSUNG_AMP_V2_2_AMPS),
7974 SND_PCI_QUIRK(0x144d, 0xc886, "Samsung Galaxy Book3 Pro (NP964XFG)", ALC298_FIXUP_SAMSUNG_AMP_V2_4_AMPS),
7975 SND_PCI_QUIRK(0x144d, 0xc902, "Samsung Galaxy Book5 360 (NP750QHA)", ALC256_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET),
7976 SND_PCI_QUIRK(0x144d, 0xc1ca, "Samsung Galaxy Book3 Pro 360 (NP960QFG)", ALC298_FIXUP_SAMSUNG_AMP_V2_4_AMPS),
7977 SND_PCI_QUIRK(0x144d, 0xc1cb, "Samsung Galaxy Book3 Pro 360 (NP965QFG)", ALC298_FIXUP_SAMSUNG_AMP_V2_4_AMPS),
7978 SND_PCI_QUIRK(0x144d, 0xc1cc, "Samsung Galaxy Book3 Ultra (NT960XFH)", ALC298_FIXUP_SAMSUNG_AMP_V2_4_AMPS),
7979 SND_PCI_QUIRK(0x1458, 0x900e, "Gigabyte G5 KF5 (2023)", ALC2XX_FIXUP_HEADSET_MIC),
7980 SND_PCI_QUIRK(0x1458, 0xfa53, "Gigabyte BXBT-2807", ALC283_FIXUP_HEADSET_MIC),
7981 SND_PCI_QUIRK(0x1462, 0xb120, "MSI Cubi MS-B120", ALC283_FIXUP_HEADSET_MIC),
7982 SND_PCI_QUIRK(0x1462, 0xb171, "Cubi N 8GL (MS-B171)", ALC283_FIXUP_HEADSET_MIC),
7983 SND_PCI_QUIRK(0x152d, 0x1082, "Quanta NL3", ALC269_FIXUP_LIFEBOOK),
7984 SND_PCI_QUIRK(0x152d, 0x1262, "Huawei NBLB-WAX9N", ALC2XX_FIXUP_HEADSET_MIC),
7985 SND_PCI_QUIRK(0x1558, 0x0353, "Clevo V35[05]SN[CDE]Q", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
7986 SND_PCI_QUIRK(0x1558, 0x1323, "Clevo N130ZU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
7987 SND_PCI_QUIRK(0x1558, 0x1325, "Clevo N15[01][CW]U", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
7988 SND_PCI_QUIRK(0x1558, 0x1401, "Clevo L140[CZ]U", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
7989 SND_PCI_QUIRK(0x1558, 0x1403, "Clevo N140CU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
7990 SND_PCI_QUIRK(0x1558, 0x1404, "Clevo N150CU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
7991 SND_PCI_QUIRK(0x1558, 0x14a1, "Clevo L141MU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
7992 SND_PCI_QUIRK(0x1558, 0x2624, "Clevo L240TU", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
7993 SND_PCI_QUIRK(0x1558, 0x28c1, "Clevo V370VND", ALC2XX_FIXUP_HEADSET_MIC),
7994 SND_PCI_QUIRK(0x1558, 0x35a1, "Clevo V3[56]0EN[CDE]", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
7995 SND_PCI_QUIRK(0x1558, 0x35b1, "Clevo V3[57]0WN[MNP]Q", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
7996 SND_PCI_QUIRK(0x1558, 0x4018, "Clevo NV40M[BE]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
7997 SND_PCI_QUIRK(0x1558, 0x4019, "Clevo NV40MZ", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
7998 SND_PCI_QUIRK(0x1558, 0x4020, "Clevo NV40MB", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
7999 SND_PCI_QUIRK(0x1558, 0x4041, "Clevo NV4[15]PZ", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
8000 SND_PCI_QUIRK(0x1558, 0x40a1, "Clevo NL40GU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
8001 SND_PCI_QUIRK(0x1558, 0x40c1, "Clevo NL40[CZ]U", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
8002 SND_PCI_QUIRK(0x1558, 0x40d1, "Clevo NL41DU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
8003 SND_PCI_QUIRK(0x1558, 0x5015, "Clevo NH5[58]H[HJK]Q", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
8004 SND_PCI_QUIRK(0x1558, 0x5017, "Clevo NH7[79]H[HJK]Q", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
8005 SND_PCI_QUIRK(0x1558, 0x50a3, "Clevo NJ51GU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
8006 SND_PCI_QUIRK(0x1558, 0x50b3, "Clevo NK50S[BEZ]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
8007 SND_PCI_QUIRK(0x1558, 0x50b6, "Clevo NK50S5", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
8008 SND_PCI_QUIRK(0x1558, 0x50b8, "Clevo NK50SZ", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
8009 SND_PCI_QUIRK(0x1558, 0x50d5, "Clevo NP50D5", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
8010 SND_PCI_QUIRK(0x1558, 0x50e1, "Clevo NH5[58]HPQ", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
8011 SND_PCI_QUIRK(0x1558, 0x50e2, "Clevo NH7[79]HPQ", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
8012 SND_PCI_QUIRK(0x1558, 0x50f0, "Clevo NH50A[CDF]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
8013 SND_PCI_QUIRK(0x1558, 0x50f2, "Clevo NH50E[PR]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
8014 SND_PCI_QUIRK(0x1558, 0x50f3, "Clevo NH58DPQ", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
8015 SND_PCI_QUIRK(0x1558, 0x50f5, "Clevo NH55EPY", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
8016 SND_PCI_QUIRK(0x1558, 0x50f6, "Clevo NH55DPQ", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
8017 SND_PCI_QUIRK(0x1558, 0x5101, "Clevo S510WU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
8018 SND_PCI_QUIRK(0x1558, 0x5157, "Clevo W517GU1", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
8019 SND_PCI_QUIRK(0x1558, 0x51a1, "Clevo NS50MU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
8020 SND_PCI_QUIRK(0x1558, 0x51b1, "Clevo NS50AU", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
8021 SND_PCI_QUIRK(0x1558, 0x51b3, "Clevo NS70AU", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
8022 SND_PCI_QUIRK(0x1558, 0x5630, "Clevo NP50RNJS", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
8023 SND_PCI_QUIRK(0x1558, 0x5700, "Clevo X560WN[RST]", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
8024 SND_PCI_QUIRK(0x1558, 0x6480, "Clevo V6xxAW", ALC245_FIXUP_CLEVO_NOISY_MIC),
8025 SND_PCI_QUIRK(0x1558, 0x70a1, "Clevo NB70T[HJK]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
8026 SND_PCI_QUIRK(0x1558, 0x70b3, "Clevo NK70SB", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
8027 SND_PCI_QUIRK(0x1558, 0x70f2, "Clevo NH79EPY", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
8028 SND_PCI_QUIRK(0x1558, 0x70f3, "Clevo NH77DPQ", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
8029 SND_PCI_QUIRK(0x1558, 0x70f4, "Clevo NH77EPY", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
8030 SND_PCI_QUIRK(0x1558, 0x70f6, "Clevo NH77DPQ-Y", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
8031 SND_PCI_QUIRK(0x1558, 0x7716, "Clevo NS50PU", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
8032 SND_PCI_QUIRK(0x1558, 0x7717, "Clevo NS70PU", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
8033 SND_PCI_QUIRK(0x1558, 0x7718, "Clevo L140PU", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
8034 SND_PCI_QUIRK(0x1558, 0x7724, "Clevo L140AU", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
8035 SND_PCI_QUIRK(0x1558, 0x8228, "Clevo NR40BU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
8036 SND_PCI_QUIRK(0x1558, 0x8520, "Clevo NH50D[CD]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
8037 SND_PCI_QUIRK(0x1558, 0x8521, "Clevo NH77D[CD]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
8038 SND_PCI_QUIRK(0x1558, 0x8535, "Clevo NH50D[BE]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
8039 SND_PCI_QUIRK(0x1558, 0x8536, "Clevo NH79D[BE]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
8040 SND_PCI_QUIRK(0x1558, 0x8550, "Clevo NH[57][0-9][ER][ACDH]Q", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
8041 SND_PCI_QUIRK(0x1558, 0x8551, "Clevo NH[57][0-9][ER][ACDH]Q", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
8042 SND_PCI_QUIRK(0x1558, 0x8560, "Clevo NH[57][0-9][ER][ACDH]Q", ALC269_FIXUP_HEADSET_MIC),
8043 SND_PCI_QUIRK(0x1558, 0x8561, "Clevo NH[57][0-9][ER][ACDH]Q", ALC269_FIXUP_HEADSET_MIC),
8044 SND_PCI_QUIRK(0x1558, 0x8562, "Clevo NH[57][0-9]RZ[Q]", ALC269_FIXUP_DMIC),
8045 SND_PCI_QUIRK(0x1558, 0x8668, "Clevo NP50B[BE]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
8046 SND_PCI_QUIRK(0x1558, 0x866d, "Clevo NP5[05]PN[HJK]", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
8047 SND_PCI_QUIRK(0x1558, 0x867c, "Clevo NP7[01]PNP", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
8048 SND_PCI_QUIRK(0x1558, 0x867d, "Clevo NP7[01]PN[HJK]", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
8049 SND_PCI_QUIRK(0x1558, 0x8680, "Clevo NJ50LU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
8050 SND_PCI_QUIRK(0x1558, 0x8686, "Clevo NH50[CZ]U", ALC256_FIXUP_MIC_NO_PRESENCE_AND_RESUME),
8051 SND_PCI_QUIRK(0x1558, 0x8a20, "Clevo NH55DCQ-Y", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
8052 SND_PCI_QUIRK(0x1558, 0x8a51, "Clevo NH70RCQ-Y", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
8053 SND_PCI_QUIRK(0x1558, 0x8d50, "Clevo NH55RCQ-M", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
8054 SND_PCI_QUIRK(0x1558, 0x951d, "Clevo N950T[CDF]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
8055 SND_PCI_QUIRK(0x1558, 0x9600, "Clevo N960K[PR]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
8056 SND_PCI_QUIRK(0x1558, 0x961d, "Clevo N960S[CDF]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
8057 SND_PCI_QUIRK(0x1558, 0x971d, "Clevo N970T[CDF]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
8058 SND_PCI_QUIRK(0x1558, 0xa500, "Clevo NL5[03]RU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
8059 SND_PCI_QUIRK(0x1558, 0xa554, "VAIO VJFH52", ALC269_FIXUP_VAIO_VJFH52_MIC_NO_PRESENCE),
8060 SND_PCI_QUIRK(0x1558, 0xa559, "VAIO RPL", ALC256_FIXUP_VAIO_RPL_MIC_NO_PRESENCE),
8061 SND_PCI_QUIRK(0x1558, 0xa600, "Clevo NL50NU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
8062 SND_PCI_QUIRK(0x1558, 0xa650, "Clevo NP[567]0SN[CD]", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
8063 SND_PCI_QUIRK(0x1558, 0xa671, "Clevo NP70SN[CDE]", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
8064 SND_PCI_QUIRK(0x1558, 0xa741, "Clevo V54x_6x_TNE", ALC245_FIXUP_CLEVO_NOISY_MIC),
8065 SND_PCI_QUIRK(0x1558, 0xa743, "Clevo V54x_6x_TU", ALC245_FIXUP_CLEVO_NOISY_MIC),
8066 SND_PCI_QUIRK(0x1558, 0xa763, "Clevo V54x_6x_TU", ALC245_FIXUP_CLEVO_NOISY_MIC),
8067 SND_PCI_QUIRK(0x1558, 0xb018, "Clevo NP50D[BE]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
8068 SND_PCI_QUIRK(0x1558, 0xb019, "Clevo NH77D[BE]Q", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
8069 SND_PCI_QUIRK(0x1558, 0xb022, "Clevo NH77D[DC][QW]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
8070 SND_PCI_QUIRK(0x1558, 0xc018, "Clevo NP50D[BE]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
8071 SND_PCI_QUIRK(0x1558, 0xc019, "Clevo NH77D[BE]Q", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
8072 SND_PCI_QUIRK(0x1558, 0xc022, "Clevo NH77[DC][QW]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
8073 SND_PCI_QUIRK(0x17aa, 0x1036, "Lenovo P520", ALC233_FIXUP_LENOVO_MULTI_CODECS),
8074 SND_PCI_QUIRK(0x17aa, 0x1048, "ThinkCentre Station", ALC623_FIXUP_LENOVO_THINKSTATION_P340),
8075 SND_PCI_QUIRK(0x17aa, 0x20f2, "Thinkpad SL410/510", ALC269_FIXUP_SKU_IGNORE),
8076 SND_PCI_QUIRK(0x17aa, 0x215e, "Thinkpad L512", ALC269_FIXUP_SKU_IGNORE),
8077 SND_PCI_QUIRK(0x17aa, 0x21b8, "Thinkpad Edge 14", ALC269_FIXUP_SKU_IGNORE),
8078 SND_PCI_QUIRK(0x17aa, 0x21ca, "Thinkpad L412", ALC269_FIXUP_SKU_IGNORE),
8079 SND_PCI_QUIRK(0x17aa, 0x21e9, "Thinkpad Edge 15", ALC269_FIXUP_SKU_IGNORE),
8080 SND_PCI_QUIRK(0x17aa, 0x21f3, "Thinkpad T430", ALC269_FIXUP_LENOVO_DOCK),
8081 SND_PCI_QUIRK(0x17aa, 0x21f6, "Thinkpad T530", ALC269_FIXUP_LENOVO_DOCK_LIMIT_BOOST),
8082 SND_PCI_QUIRK(0x17aa, 0x21fa, "Thinkpad X230", ALC269_FIXUP_LENOVO_DOCK),
8083 SND_PCI_QUIRK(0x17aa, 0x21fb, "Thinkpad T430s", ALC269_FIXUP_LENOVO_DOCK),
8084 SND_PCI_QUIRK(0x17aa, 0x2203, "Thinkpad X230 Tablet", ALC269_FIXUP_LENOVO_DOCK),
8085 SND_PCI_QUIRK(0x17aa, 0x2208, "Thinkpad T431s", ALC269_FIXUP_LENOVO_DOCK),
8086 SND_PCI_QUIRK(0x17aa, 0x220c, "Thinkpad T440s", ALC292_FIXUP_TPT440),
8087 SND_PCI_QUIRK(0x17aa, 0x220e, "Thinkpad T440p", ALC292_FIXUP_TPT440_DOCK),
8088 SND_PCI_QUIRK(0x17aa, 0x2210, "Thinkpad T540p", ALC292_FIXUP_TPT440_DOCK),
8089 SND_PCI_QUIRK(0x17aa, 0x2211, "Thinkpad W541", ALC292_FIXUP_TPT440_DOCK),
8090 SND_PCI_QUIRK(0x17aa, 0x2212, "Thinkpad T440", ALC292_FIXUP_TPT440_DOCK),
8091 SND_PCI_QUIRK(0x17aa, 0x2214, "Thinkpad X240", ALC292_FIXUP_TPT440_DOCK),
8092 SND_PCI_QUIRK(0x17aa, 0x2215, "Thinkpad", ALC269_FIXUP_THINKPAD_LIMIT_INT_MIC_BOOST),
8093 SND_PCI_QUIRK(0x17aa, 0x2218, "Thinkpad X1 Carbon 2nd", ALC292_FIXUP_TPT440_DOCK),
8094 SND_PCI_QUIRK(0x17aa, 0x2223, "ThinkPad T550", ALC292_FIXUP_TPT440_DOCK),
8095 SND_PCI_QUIRK(0x17aa, 0x2226, "ThinkPad X250", ALC292_FIXUP_TPT440_DOCK),
8096 SND_PCI_QUIRK(0x17aa, 0x222d, "Thinkpad", ALC298_FIXUP_TPT470_DOCK),
8097 SND_PCI_QUIRK(0x17aa, 0x222e, "Thinkpad", ALC298_FIXUP_TPT470_DOCK),
8098 SND_PCI_QUIRK(0x17aa, 0x2231, "Thinkpad T560", ALC292_FIXUP_TPT460),
8099 SND_PCI_QUIRK(0x17aa, 0x2233, "Thinkpad", ALC292_FIXUP_TPT460),
8100 SND_PCI_QUIRK(0x17aa, 0x2234, "Thinkpad ICE-1", ALC287_FIXUP_TAS2781_I2C),
8101 SND_PCI_QUIRK(0x17aa, 0x2245, "Thinkpad T470", ALC298_FIXUP_TPT470_DOCK),
8102 SND_PCI_QUIRK(0x17aa, 0x2246, "Thinkpad", ALC298_FIXUP_TPT470_DOCK),
8103 SND_PCI_QUIRK(0x17aa, 0x2247, "Thinkpad", ALC298_FIXUP_TPT470_DOCK),
8104 SND_PCI_QUIRK(0x17aa, 0x2249, "Thinkpad", ALC292_FIXUP_TPT460),
8105 SND_PCI_QUIRK(0x17aa, 0x224b, "Thinkpad", ALC298_FIXUP_TPT470_DOCK),
8106 SND_PCI_QUIRK(0x17aa, 0x224c, "Thinkpad", ALC298_FIXUP_TPT470_DOCK),
8107 SND_PCI_QUIRK(0x17aa, 0x224d, "Thinkpad", ALC298_FIXUP_TPT470_DOCK),
8108 SND_PCI_QUIRK(0x17aa, 0x225c, "Lenovo ThinkPad X1 Carbon 6th Gen", ALC285_LENOVO_DAC_RENAME),
8109 SND_PCI_QUIRK(0x17aa, 0x225d, "Thinkpad T480", ALC269_FIXUP_THINKPAD_LIMIT_INT_MIC_BOOST),
8110 SND_PCI_QUIRK(0x17aa, 0x2288, "Thinkpad X390", ALC285_FIXUP_THINKPAD_NO_BASS_SPK_HEADSET_JACK),
8111 SND_PCI_QUIRK(0x17aa, 0x2292, "Thinkpad X1 Carbon 7th", ALC285_FIXUP_THINKPAD_HEADSET_JACK),
8112 SND_PCI_QUIRK(0x17aa, 0x22be, "Thinkpad X1 Carbon 8th", ALC285_FIXUP_THINKPAD_HEADSET_JACK),
8113 SND_PCI_QUIRK(0x17aa, 0x22c1, "Thinkpad P1 Gen 3", ALC285_FIXUP_THINKPAD_NO_BASS_SPK_HEADSET_JACK),
8114 SND_PCI_QUIRK(0x17aa, 0x22c2, "Thinkpad X1 Extreme Gen 3", ALC285_FIXUP_THINKPAD_NO_BASS_SPK_HEADSET_JACK),
8115 SND_PCI_QUIRK(0x17aa, 0x22f1, "Thinkpad", ALC287_FIXUP_MG_RTKC_CSAMP_CS35L41_I2C_THINKPAD),
8116 SND_PCI_QUIRK(0x17aa, 0x22f2, "Thinkpad", ALC287_FIXUP_MG_RTKC_CSAMP_CS35L41_I2C_THINKPAD),
8117 SND_PCI_QUIRK(0x17aa, 0x22f3, "Thinkpad", ALC287_FIXUP_MG_RTKC_CSAMP_CS35L41_I2C_THINKPAD),
8118 SND_PCI_QUIRK(0x17aa, 0x2316, "Thinkpad P1 Gen 6", ALC287_FIXUP_MG_RTKC_CSAMP_CS35L41_I2C_THINKPAD),
8119 SND_PCI_QUIRK(0x17aa, 0x2317, "Thinkpad P1 Gen 6", ALC287_FIXUP_MG_RTKC_CSAMP_CS35L41_I2C_THINKPAD),
8120 SND_PCI_QUIRK(0x17aa, 0x2318, "Thinkpad Z13 Gen2", ALC287_FIXUP_MG_RTKC_CSAMP_CS35L41_I2C_THINKPAD),
8121 SND_PCI_QUIRK(0x17aa, 0x2319, "Thinkpad Z16 Gen2", ALC287_FIXUP_MG_RTKC_CSAMP_CS35L41_I2C_THINKPAD),
8122 SND_PCI_QUIRK(0x17aa, 0x231a, "Thinkpad Z16 Gen2", ALC287_FIXUP_MG_RTKC_CSAMP_CS35L41_I2C_THINKPAD),
8123 SND_PCI_QUIRK(0x17aa, 0x231e, "Thinkpad", ALC287_FIXUP_LENOVO_THKPAD_WH_ALC1318),
8124 SND_PCI_QUIRK(0x17aa, 0x231f, "Thinkpad", ALC287_FIXUP_LENOVO_THKPAD_WH_ALC1318),
8125 SND_PCI_QUIRK(0x17aa, 0x2326, "Hera2", ALC287_FIXUP_TAS2781_I2C),
8126 SND_PCI_QUIRK(0x17aa, 0x30bb, "ThinkCentre AIO", ALC233_FIXUP_LENOVO_LINE2_MIC_HOTKEY),
8127 SND_PCI_QUIRK(0x17aa, 0x30e2, "ThinkCentre AIO", ALC233_FIXUP_LENOVO_LINE2_MIC_HOTKEY),
8128 SND_PCI_QUIRK(0x17aa, 0x310c, "ThinkCentre Station", ALC294_FIXUP_LENOVO_MIC_LOCATION),
8129 SND_PCI_QUIRK(0x17aa, 0x3111, "ThinkCentre Station", ALC294_FIXUP_LENOVO_MIC_LOCATION),
8130 SND_PCI_QUIRK(0x17aa, 0x312a, "ThinkCentre Station", ALC294_FIXUP_LENOVO_MIC_LOCATION),
8131 SND_PCI_QUIRK(0x17aa, 0x312f, "ThinkCentre Station", ALC294_FIXUP_LENOVO_MIC_LOCATION),
8132 SND_PCI_QUIRK(0x17aa, 0x313c, "ThinkCentre Station", ALC294_FIXUP_LENOVO_MIC_LOCATION),
8133 SND_PCI_QUIRK(0x17aa, 0x3151, "ThinkCentre Station", ALC283_FIXUP_HEADSET_MIC),
8134 SND_PCI_QUIRK(0x17aa, 0x3176, "ThinkCentre Station", ALC283_FIXUP_HEADSET_MIC),
8135 SND_PCI_QUIRK(0x17aa, 0x3178, "ThinkCentre Station", ALC283_FIXUP_HEADSET_MIC),
8136 SND_PCI_QUIRK(0x17aa, 0x31af, "ThinkCentre Station", ALC623_FIXUP_LENOVO_THINKSTATION_P340),
8137 SND_PCI_QUIRK(0x17aa, 0x3341, "Lenovo ThinkCentre M90 Gen4", ALC233_FIXUP_LENOVO_GPIO2_MIC_HOTKEY),
8138 SND_PCI_QUIRK(0x17aa, 0x3342, "Lenovo ThinkCentre M90 Gen4", ALC233_FIXUP_LENOVO_GPIO2_MIC_HOTKEY),
8139 SND_PCI_QUIRK(0x17aa, 0x3343, "Lenovo ThinkCentre M70 Gen4", ALC233_FIXUP_LENOVO_GPIO2_MIC_HOTKEY),
8140 SND_PCI_QUIRK(0x17aa, 0x3344, "Lenovo ThinkCentre M70 Gen4", ALC233_FIXUP_LENOVO_GPIO2_MIC_HOTKEY),
8141 SND_PCI_QUIRK(0x17aa, 0x334b, "Lenovo ThinkCentre M70 Gen5", ALC283_FIXUP_HEADSET_MIC),
8142 SND_PCI_QUIRK(0x17aa, 0x334f, "Lenovo ThinkCentre M90a Gen5", ALC233_FIXUP_LENOVO_GPIO2_MIC_HOTKEY),
8143 SND_PCI_QUIRK(0x17aa, 0x3384, "ThinkCentre M90a PRO", ALC233_FIXUP_LENOVO_L2MH_LOW_ENLED),
8144 SND_PCI_QUIRK(0x17aa, 0x3386, "ThinkCentre M90a Gen6", ALC233_FIXUP_LENOVO_L2MH_LOW_ENLED),
8145 SND_PCI_QUIRK(0x17aa, 0x3387, "ThinkCentre M70a Gen6", ALC233_FIXUP_LENOVO_L2MH_LOW_ENLED),
8146 SND_PCI_QUIRK(0x17aa, 0x3801, "Lenovo Yoga9 14IAP7", ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK_PIN),
8147 HDA_CODEC_QUIRK(0x17aa, 0x3802, "DuetITL 2021", ALC287_FIXUP_YOGA7_14ITL_SPEAKERS),
8148 SND_PCI_QUIRK(0x17aa, 0x3802, "Lenovo Yoga Pro 9 14IRP8", ALC287_FIXUP_TAS2781_I2C),
8149 SND_PCI_QUIRK(0x17aa, 0x380b, "Lenovo Yoga Slim 9 14ILL10", ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK_PIN),
8150 /* Yoga Pro 9 16IMH9 and Legion 7 16ITHG6 share PCI SSID 17aa:3811
8151 * with Legion S7 15IMH05; use codec SSID to distinguish them
8152 */
8153 HDA_CODEC_QUIRK(0x17aa, 0x38d5, "Lenovo Yoga Pro 9 16IMH9", ALC287_FIXUP_TAS2781_I2C),
8154 HDA_CODEC_QUIRK(0x17aa, 0x38d6, "Lenovo Yoga Pro 9 16IMH9", ALC287_FIXUP_TAS2781_I2C),
8155 HDA_CODEC_QUIRK(0x17aa, 0x3855, "Legion 7 16ITHG6", ALC287_FIXUP_LEGION_16ITHG6),
8156 SND_PCI_QUIRK(0x17aa, 0x3811, "Legion S7 15IMH05", ALC287_FIXUP_LEGION_15IMHG05_SPEAKERS),
8157 SND_PCI_QUIRK(0x17aa, 0x3813, "Legion 7i 15IMHG05", ALC287_FIXUP_LEGION_15IMHG05_SPEAKERS),
8158 SND_PCI_QUIRK(0x17aa, 0x3818, "Lenovo C940 / Yoga Duet 7", ALC298_FIXUP_LENOVO_C940_DUET7),
8159 SND_PCI_QUIRK(0x17aa, 0x3819, "Lenovo 13s Gen2 ITL", ALC287_FIXUP_13S_GEN2_SPEAKERS),
8160 HDA_CODEC_QUIRK(0x17aa, 0x3820, "IdeaPad 330-17IKB 81DM", ALC269_FIXUP_ASPIRE_HEADSET_MIC),
8161 SND_PCI_QUIRK(0x17aa, 0x3820, "Yoga Duet 7 13ITL6", ALC287_FIXUP_YOGA7_14ITL_SPEAKERS),
8162 SND_PCI_QUIRK(0x17aa, 0x3824, "Legion Y9000X 2020", ALC285_FIXUP_LEGION_Y9000X_SPEAKERS),
8163 SND_PCI_QUIRK(0x17aa, 0x3827, "Ideapad S740", ALC285_FIXUP_IDEAPAD_S740_COEF),
8164 SND_PCI_QUIRK(0x17aa, 0x3834, "Lenovo IdeaPad Slim 9i 14ITL5", ALC287_FIXUP_YOGA7_14ITL_SPEAKERS),
8165 SND_PCI_QUIRK(0x17aa, 0x383d, "Legion Y9000X 2019", ALC285_FIXUP_LEGION_Y9000X_SPEAKERS),
8166 SND_PCI_QUIRK(0x17aa, 0x3843, "Lenovo Yoga 9i / Yoga Book 9i", ALC287_FIXUP_LENOVO_YOGA_BOOK_9I),
8167 SND_PCI_QUIRK(0x17aa, 0x3846, "Lenovo Yoga Pro 9 16IAH10", ALC287_FIXUP_YOGA9_SPEAKER2_TO_DAC1),
8168 /* Yoga Pro 7 14IMH9 shares PCI SSID 17aa:3847 with Legion 7 16ACHG6;
8169 * use codec SSID to distinguish them
8170 */
8171 HDA_CODEC_QUIRK(0x17aa, 0x38cf, "Lenovo Yoga Pro 7 14IMH9", ALC287_FIXUP_YOGA9_14IMH9_BASS_SPK_PIN),
8172 SND_PCI_QUIRK(0x17aa, 0x3847, "Legion 7 16ACHG6", ALC287_FIXUP_LEGION_16ACHG6),
8173 SND_PCI_QUIRK(0x17aa, 0x384a, "Lenovo Yoga 7 15ITL5", ALC287_FIXUP_YOGA7_14ITL_SPEAKERS),
8174 /* Yoga Pro 7 14IRH8 shares PCI SSID 17aa:3852 with Yoga 7 14ITL5;
8175 * use codec SSID to distinguish them
8176 */
8177 HDA_CODEC_QUIRK(0x17aa, 0x38b1, "Lenovo Yoga Pro 7 14IRH8", ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK_PIN),
8178 SND_PCI_QUIRK(0x17aa, 0x3852, "Lenovo Yoga 7 14ITL5", ALC287_FIXUP_YOGA7_14ITL_SPEAKERS),
8179 SND_PCI_QUIRK(0x17aa, 0x3853, "Lenovo Yoga 7 15ITL5", ALC287_FIXUP_YOGA7_14ITL_SPEAKERS),
8180 SND_PCI_QUIRK(0x17aa, 0x3855, "Legion 7 16ITHG6", ALC287_FIXUP_LEGION_16ITHG6),
8181 SND_PCI_QUIRK(0x17aa, 0x3862, "Lenovo IdeaPad Slim 3 15ABR8", ALC269_FIXUP_LIMIT_INT_MIC_BOOST),
8182 SND_PCI_QUIRK(0x17aa, 0x3865, "Lenovo 13X", ALC287_FIXUP_CS35L41_I2C_2),
8183 SND_PCI_QUIRK(0x17aa, 0x3866, "Lenovo 13X", ALC287_FIXUP_CS35L41_I2C_2),
8184 SND_PCI_QUIRK(0x17aa, 0x3869, "Lenovo Yoga7 14IAL7", ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK_PIN),
8185 HDA_CODEC_QUIRK(0x17aa, 0x386a, "Lenovo Yoga 7 16IAP7", ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK_PIN),
8186 HDA_CODEC_QUIRK(0x17aa, 0x386e, "Legion Y9000X 2022 IAH7", ALC287_FIXUP_CS35L41_I2C_2),
8187 SND_PCI_QUIRK(0x17aa, 0x386e, "Yoga Pro 7 14ARP8", ALC285_FIXUP_YOGA_SPEAKER2_TO_DAC1),
8188 HDA_CODEC_QUIRK(0x17aa, 0x38a7, "Legion Pro 7 16ARX8H", ALC287_FIXUP_TAS2781_I2C), /* this must match before PCI SSID 17aa:386f below */
8189 HDA_CODEC_QUIRK(0x17aa, 0x38a8, "Legion Pro 7 16ARX8H", ALC287_FIXUP_TAS2781_I2C), /* this must match before PCI SSID 17aa:386f below */
8190 SND_PCI_QUIRK(0x17aa, 0x386f, "Legion Pro 7i 16IAX7", ALC287_FIXUP_CS35L41_I2C_2),
8191 SND_PCI_QUIRK(0x17aa, 0x3870, "Lenovo Yoga 7 14ARB7", ALC287_FIXUP_YOGA7_14ARB7_I2C),
8192 SND_PCI_QUIRK(0x17aa, 0x3874, "Legion 7i 16IAX7", ALC287_FIXUP_CS35L41_I2C_2),
8193 SND_PCI_QUIRK(0x17aa, 0x3877, "Lenovo Legion 7 Slim 16ARHA7", ALC287_FIXUP_CS35L41_I2C_2),
8194 SND_PCI_QUIRK(0x17aa, 0x3878, "Lenovo Legion 7 Slim 16ARHA7", ALC287_FIXUP_CS35L41_I2C_2),
8195 SND_PCI_QUIRK(0x17aa, 0x387d, "Yoga S780-16 pro Quad AAC", ALC287_FIXUP_TAS2781_I2C),
8196 SND_PCI_QUIRK(0x17aa, 0x387e, "Yoga S780-16 pro Quad YC", ALC287_FIXUP_TAS2781_I2C),
8197 SND_PCI_QUIRK(0x17aa, 0x387f, "Yoga S780-16 pro dual LX", ALC287_FIXUP_TAS2781_I2C),
8198 SND_PCI_QUIRK(0x17aa, 0x3880, "Yoga S780-16 pro dual YC", ALC287_FIXUP_TAS2781_I2C),
8199 SND_PCI_QUIRK(0x17aa, 0x3881, "YB9 dual power mode2 YC", ALC287_FIXUP_TAS2781_I2C),
8200 SND_PCI_QUIRK(0x17aa, 0x3882, "Lenovo Yoga Pro 7 14APH8", ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK_PIN),
8201 SND_PCI_QUIRK(0x17aa, 0x3884, "Y780 YG DUAL", ALC287_FIXUP_TAS2781_I2C),
8202 SND_PCI_QUIRK(0x17aa, 0x3886, "Y780 VECO DUAL", ALC287_FIXUP_TAS2781_I2C),
8203 SND_PCI_QUIRK(0x17aa, 0x3891, "Lenovo Yoga Pro 7 14AHP9", ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK_PIN),
8204 SND_PCI_QUIRK(0x17aa, 0x38a5, "Y580P AMD dual", ALC287_FIXUP_TAS2781_I2C),
8205 SND_PCI_QUIRK(0x17aa, 0x38a7, "Y780P AMD YG dual", ALC287_FIXUP_TAS2781_I2C),
8206 SND_PCI_QUIRK(0x17aa, 0x38a8, "Y780P AMD VECO dual", ALC287_FIXUP_TAS2781_I2C),
8207 SND_PCI_QUIRK(0x17aa, 0x38a9, "Thinkbook 16P", ALC287_FIXUP_MG_RTKC_CSAMP_CS35L41_I2C_THINKPAD),
8208 SND_PCI_QUIRK(0x17aa, 0x38ab, "Thinkbook 16P", ALC287_FIXUP_MG_RTKC_CSAMP_CS35L41_I2C_THINKPAD),
8209 /* Lenovo Yoga Slim 7 14AKP10 shares PCI SSID 17aa:38b4 with Legion Slim 7
8210 * 16IRH8; use codec SSID to distinguish them
8211 */
8212 HDA_CODEC_QUIRK(0x17aa, 0x391a, "Lenovo Yoga Slim 7 14AKP10", ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK_PIN),
8213 SND_PCI_QUIRK(0x17aa, 0x38b4, "Legion Slim 7 16IRH8", ALC287_FIXUP_CS35L41_I2C_2),
8214 HDA_CODEC_QUIRK(0x17aa, 0x391c, "Lenovo Yoga 7 2-in-1 14AKP10", ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK_PIN),
8215 HDA_CODEC_QUIRK(0x17aa, 0x391d, "Lenovo Yoga 7 2-in-1 16AKP10", ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK_PIN),
8216 SND_PCI_QUIRK(0x17aa, 0x38b5, "Legion Slim 7 16IRH8", ALC287_FIXUP_CS35L41_I2C_2),
8217 SND_PCI_QUIRK(0x17aa, 0x38b6, "Legion Slim 7 16APH8", ALC287_FIXUP_CS35L41_I2C_2),
8218 SND_PCI_QUIRK(0x17aa, 0x38b7, "Legion Slim 7 16APH8", ALC287_FIXUP_CS35L41_I2C_2),
8219 SND_PCI_QUIRK(0x17aa, 0x38b8, "Yoga S780-14.5 proX AMD YC Dual", ALC287_FIXUP_TAS2781_I2C),
8220 SND_PCI_QUIRK(0x17aa, 0x38b9, "Yoga S780-14.5 proX AMD LX Dual", ALC287_FIXUP_TAS2781_I2C),
8221 SND_PCI_QUIRK(0x17aa, 0x38ba, "Yoga S780-14.5 Air AMD quad YC", ALC287_FIXUP_TAS2781_I2C),
8222 HDA_CODEC_QUIRK(0x17aa, 0x3926, "Legion Pro 5 16ADR10", ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK_PIN),
8223 /* Legion R9000P ADR10 shares PCI SSID 17aa:38bb with Yoga S780-14.5 Air AMD quad AAC;
8224 * use codec SSID to distinguish them
8225 */
8226 HDA_CODEC_QUIRK(0x17aa, 0x3927, "Legion R9000P ADR10", ALC287_FIXUP_LENOVO_LEGION_AW88399),
8227 HDA_CODEC_QUIRK(0x17aa, 0x3928, "Legion R9000P ADR10", ALC287_FIXUP_LENOVO_LEGION_AW88399),
8228 SND_PCI_QUIRK(0x17aa, 0x38bb, "Yoga S780-14.5 Air AMD quad AAC", ALC287_FIXUP_TAS2781_I2C),
8229 SND_PCI_QUIRK(0x17aa, 0x38be, "Yoga S980-14.5 proX YC Dual", ALC287_FIXUP_TAS2781_I2C),
8230 SND_PCI_QUIRK(0x17aa, 0x38bf, "Yoga S980-14.5 proX LX Dual", ALC287_FIXUP_TAS2781_I2C),
8231 SND_PCI_QUIRK(0x17aa, 0x38c3, "Y980 DUAL", ALC287_FIXUP_TAS2781_I2C),
8232 SND_PCI_QUIRK(0x17aa, 0x38c7, "Thinkbook 13x Gen 4", ALC287_FIXUP_MG_RTKC_CSAMP_CS35L41_I2C_THINKPAD),
8233 SND_PCI_QUIRK(0x17aa, 0x38c8, "Thinkbook 13x Gen 4", ALC287_FIXUP_MG_RTKC_CSAMP_CS35L41_I2C_THINKPAD),
8234 SND_PCI_QUIRK(0x17aa, 0x38cb, "Y790 YG DUAL", ALC287_FIXUP_TAS2781_I2C),
8235 SND_PCI_QUIRK(0x17aa, 0x38cd, "Y790 VECO DUAL", ALC287_FIXUP_TAS2781_I2C),
8236 SND_PCI_QUIRK(0x17aa, 0x38d2, "Lenovo Yoga 9 14IMH9", ALC287_FIXUP_YOGA9_14IMH9_BASS_SPK_PIN),
8237 SND_PCI_QUIRK(0x17aa, 0x38d3, "Yoga S990-16 Pro IMH YC Dual", ALC287_FIXUP_TAS2781_I2C),
8238 SND_PCI_QUIRK(0x17aa, 0x38d4, "Yoga S990-16 Pro IMH VECO Dual", ALC287_FIXUP_TAS2781_I2C),
8239 SND_PCI_QUIRK(0x17aa, 0x38d5, "Yoga S990-16 Pro IMH YC Quad", ALC287_FIXUP_TAS2781_I2C),
8240 SND_PCI_QUIRK(0x17aa, 0x38d6, "Yoga S990-16 Pro IMH VECO Quad", ALC287_FIXUP_TAS2781_I2C),
8241 SND_PCI_QUIRK(0x17aa, 0x38d7, "Lenovo Yoga 9 14IMH9", ALC287_FIXUP_YOGA9_14IMH9_BASS_SPK_PIN),
8242 SND_PCI_QUIRK(0x17aa, 0x38df, "Yoga Y990 Intel YC Dual", ALC287_FIXUP_TAS2781_I2C),
8243 SND_PCI_QUIRK(0x17aa, 0x38e0, "Yoga Y990 Intel VECO Dual", ALC287_FIXUP_TAS2781_I2C),
8244 SND_PCI_QUIRK(0x17aa, 0x38f8, "Yoga Book 9i", ALC287_FIXUP_TAS2781_I2C),
8245 /* Legion 7 15ASH11 shares PCI SSID 17aa:38f9 with Thinkbook 16P Gen5;
8246 * use codec SSID to distinguish them
8247 */
8248 HDA_CODEC_QUIRK(0x17aa, 0x395b, "Lenovo Legion 7 15ASH11", ALC287_FIXUP_LENOVO_YOGA_PRO7),
8249 SND_PCI_QUIRK(0x17aa, 0x38f9, "Thinkbook 16P Gen5", ALC287_FIXUP_MG_RTKC_CSAMP_CS35L41_I2C_THINKPAD),
8250 SND_PCI_QUIRK(0x17aa, 0x38fa, "Thinkbook 16P Gen5", ALC287_FIXUP_MG_RTKC_CSAMP_CS35L41_I2C_THINKPAD),
8251 SND_PCI_QUIRK(0x17aa, 0x38fc, "Lenovo Yoga Pro 7 15ASH11", ALC287_FIXUP_LENOVO_YOGA_PRO7),
8252 SND_PCI_QUIRK(0x17aa, 0x38fd, "ThinkBook plus Gen5 Hybrid", ALC287_FIXUP_TAS2781_I2C),
8253 SND_PCI_QUIRK(0x17aa, 0x3902, "Lenovo E50-80", ALC269_FIXUP_DMIC_THINKPAD_ACPI),
8254 HDA_CODEC_QUIRK(0x17aa, 0x3906, "Legion Pro 7i 16IAX10H / Y9000P IAX10", ALC287_FIXUP_LENOVO_LEGION_AW88399),
8255 HDA_CODEC_QUIRK(0x17aa, 0x3907, "Legion Pro 7i 16IAX10H / Y9000P IAX10", ALC287_FIXUP_LENOVO_LEGION_AW88399),
8256 SND_PCI_QUIRK(0x17aa, 0x390d, "Lenovo Yoga Pro 7 14ASP10", ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK_PIN_HEADSET),
8257 SND_PCI_QUIRK(0x17aa, 0x3911, "Lenovo Yoga Pro 7 14IAH10", ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK_PIN),
8258 SND_PCI_QUIRK(0x17aa, 0x3912, "Lenovo Xiaoxin 14 GT", ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK_PIN),
8259 SND_PCI_QUIRK(0x17aa, 0x3913, "Lenovo 145", ALC236_FIXUP_LENOVO_INV_DMIC),
8260 SND_PCI_QUIRK(0x17aa, 0x391f, "Yoga S990-16 pro Quad YC Quad", ALC287_FIXUP_TXNW2781_I2C),
8261 SND_PCI_QUIRK(0x17aa, 0x3920, "Yoga S990-16 pro Quad VECO Quad", ALC287_FIXUP_TXNW2781_I2C),
8262 SND_PCI_QUIRK(0x17aa, 0x3929, "Thinkbook 13x Gen 5", ALC287_FIXUP_MG_RTKC_CSAMP_CS35L41_I2C_THINKPAD),
8263 SND_PCI_QUIRK(0x17aa, 0x392b, "Thinkbook 13x Gen 5", ALC287_FIXUP_MG_RTKC_CSAMP_CS35L41_I2C_THINKPAD),
8264 HDA_CODEC_QUIRK(0x17aa, 0x3936, "Legion R9000P ADR10H", ALC287_FIXUP_LENOVO_LEGION_AW88399),
8265 HDA_CODEC_QUIRK(0x17aa, 0x3937, "Legion R9000P ADR10H", ALC287_FIXUP_LENOVO_LEGION_AW88399),
8266 HDA_CODEC_QUIRK(0x17aa, 0x3938, "Legion Pro 7 16AFR10H", ALC287_FIXUP_LENOVO_LEGION_AW88399),
8267 HDA_CODEC_QUIRK(0x17aa, 0x3939, "Legion Pro 7 16AFR10H", ALC287_FIXUP_LENOVO_LEGION_AW88399),
8268 SND_PCI_QUIRK(0x17aa, 0x393e, "Lenovo ThinkBook 14 G8+ IPH", ALC287_FIXUP_LENOVO_XPAD_HEADSET_JACK),
8269 HDA_CODEC_QUIRK(0x17aa, 0x394c, "Lenovo Yoga Slim 7 14AGP11", ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK_PIN),
8270 SND_PCI_QUIRK(0x17aa, 0x3977, "IdeaPad S210", ALC283_FIXUP_INT_MIC),
8271 SND_PCI_QUIRK(0x17aa, 0x3978, "Lenovo B50-70", ALC269_FIXUP_DMIC_THINKPAD_ACPI),
8272 SND_PCI_QUIRK(0x17aa, 0x3bf8, "Quanta FL1", ALC269_FIXUP_PCM_44K),
8273 SND_PCI_QUIRK(0x17aa, 0x5013, "Thinkpad", ALC269_FIXUP_THINKPAD_LIMIT_INT_MIC_BOOST),
8274 SND_PCI_QUIRK(0x17aa, 0x501a, "Thinkpad", ALC283_FIXUP_INT_MIC),
8275 SND_PCI_QUIRK(0x17aa, 0x501e, "Thinkpad L440", ALC292_FIXUP_TPT440_DOCK),
8276 SND_PCI_QUIRK(0x17aa, 0x5026, "Thinkpad", ALC269_FIXUP_THINKPAD_LIMIT_INT_MIC_BOOST),
8277 SND_PCI_QUIRK(0x17aa, 0x5034, "Thinkpad T450", ALC292_FIXUP_TPT440_DOCK),
8278 SND_PCI_QUIRK(0x17aa, 0x5036, "Thinkpad T450s", ALC292_FIXUP_TPT440_DOCK),
8279 SND_PCI_QUIRK(0x17aa, 0x503c, "Thinkpad L450", ALC292_FIXUP_TPT440_DOCK),
8280 SND_PCI_QUIRK(0x17aa, 0x504a, "ThinkPad X260", ALC292_FIXUP_TPT440_DOCK),
8281 SND_PCI_QUIRK(0x17aa, 0x504b, "Thinkpad", ALC293_FIXUP_LENOVO_SPK_NOISE),
8282 SND_PCI_QUIRK(0x17aa, 0x5050, "Thinkpad T560p", ALC292_FIXUP_TPT460),
8283 SND_PCI_QUIRK(0x17aa, 0x5051, "Thinkpad L460", ALC292_FIXUP_TPT460),
8284 SND_PCI_QUIRK(0x17aa, 0x5053, "Thinkpad T460", ALC292_FIXUP_TPT460),
8285 SND_PCI_QUIRK(0x17aa, 0x505d, "Thinkpad", ALC298_FIXUP_TPT470_DOCK),
8286 SND_PCI_QUIRK(0x17aa, 0x505f, "Thinkpad", ALC298_FIXUP_TPT470_DOCK),
8287 SND_PCI_QUIRK(0x17aa, 0x5062, "Thinkpad", ALC298_FIXUP_TPT470_DOCK),
8288 SND_PCI_QUIRK(0x17aa, 0x508b, "Thinkpad X12 Gen 1", ALC287_FIXUP_LEGION_15IMHG05_SPEAKERS),
8289 SND_PCI_QUIRK(0x17aa, 0x5109, "Thinkpad", ALC269_FIXUP_THINKPAD_LIMIT_INT_MIC_BOOST),
8290 SND_PCI_QUIRK(0x17aa, 0x511e, "Thinkpad", ALC298_FIXUP_TPT470_DOCK),
8291 SND_PCI_QUIRK(0x17aa, 0x511f, "Thinkpad", ALC298_FIXUP_TPT470_DOCK),
8292 SND_PCI_QUIRK(0x17aa, 0x9e54, "LENOVO NB", ALC269_FIXUP_LENOVO_EAPD),
8293 SND_PCI_QUIRK(0x17aa, 0x9e56, "Lenovo ZhaoYang CF4620Z", ALC286_FIXUP_SONY_MIC_NO_PRESENCE),
8294 SND_PCI_QUIRK(0x1849, 0x0269, "Positivo Master C6400", ALC269VB_FIXUP_ASUS_ZENBOOK),
8295 SND_PCI_QUIRK(0x1849, 0x1233, "ASRock NUC Box 1100", ALC233_FIXUP_NO_AUDIO_JACK),
8296 SND_PCI_QUIRK(0x1849, 0xa233, "Positivo Master C6300", ALC269_FIXUP_HEADSET_MIC),
8297 SND_PCI_QUIRK(0x1854, 0x0440, "LG CQ6", ALC256_FIXUP_HEADPHONE_AMP_VOL),
8298 SND_PCI_QUIRK(0x1854, 0x0441, "LG CQ6 AIO", ALC256_FIXUP_HEADPHONE_AMP_VOL),
8299 SND_PCI_QUIRK(0x1854, 0x0488, "LG gram 16 (16Z90R)", ALC298_FIXUP_SAMSUNG_AMP_V2_4_AMPS),
8300 SND_PCI_QUIRK(0x1854, 0x0489, "LG gram 16 (16Z90R-A)", ALC298_FIXUP_SAMSUNG_AMP_V2_4_AMPS),
8301 SND_PCI_QUIRK(0x1854, 0x048a, "LG gram 17 (17ZD90R)", ALC298_FIXUP_SAMSUNG_AMP_V2_4_AMPS),
8302 SND_PCI_QUIRK(0x1854, 0x0490, "LG Gram Style 14 (14Z90RS)", ALC298_FIXUP_LG_GRAM_STYLE_14),
8303 SND_PCI_QUIRK(0x1854, 0x0554, "LG gram 16 (16Z90TR)", ALC298_FIXUP_SAMSUNG_AMP_V2_2_AMPS),
8304 SND_PCI_QUIRK(0x19e5, 0x3204, "Huawei MACH-WX9", ALC256_FIXUP_HUAWEI_MACH_WX9_PINS),
8305 SND_PCI_QUIRK(0x19e5, 0x320f, "Huawei WRT-WX9 ", ALC256_FIXUP_ASUS_MIC_NO_PRESENCE),
8306 SND_PCI_QUIRK(0x19e5, 0x3212, "Huawei KLV-WX9 ", ALC256_FIXUP_ACER_HEADSET_MIC),
8307 SND_PCI_QUIRK(0x1a58, 0x2023, "Razer Blade 16 (2025)",
8308 ALC298_FIXUP_RAZER_BLADE16_2025_PINS),
8309 SND_PCI_QUIRK(0x1a58, 0x300e, "Razer Blade 16 (2025)",
8310 ALC298_FIXUP_RAZER_BLADE16_2025_PINS),
8311 SND_PCI_QUIRK(0x1b35, 0x1235, "CZC B20", ALC269_FIXUP_CZC_B20),
8312 SND_PCI_QUIRK(0x1b35, 0x1236, "CZC TMI", ALC269_FIXUP_CZC_TMI),
8313 SND_PCI_QUIRK(0x1b35, 0x1237, "CZC L101", ALC269_FIXUP_CZC_L101),
8314 SND_PCI_QUIRK(0x1b7d, 0xa831, "Ordissimo EVE2 ", ALC269VB_FIXUP_ORDISSIMO_EVE2), /* Also known as Malata PC-B1303 */
8315 SND_PCI_QUIRK(0x1c06, 0x2013, "Lemote A1802", ALC269_FIXUP_LEMOTE_A1802),
8316 SND_PCI_QUIRK(0x1c06, 0x2015, "Lemote A190X", ALC269_FIXUP_LEMOTE_A190X),
8317 SND_PCI_QUIRK(0x1c6c, 0x122a, "Positivo N14AP7", ALC269_FIXUP_LIMIT_INT_MIC_BOOST),
8318 SND_PCI_QUIRK(0x1c6c, 0x1251, "Positivo N14KP6-TG", ALC288_FIXUP_DELL1_MIC_NO_PRESENCE),
8319 SND_PCI_QUIRK(0x1d05, 0x1132, "TongFang PHxTxX1", ALC256_FIXUP_SET_COEF_DEFAULTS),
8320 SND_PCI_QUIRK(0x1d05, 0x1096, "TongFang GMxMRxx", ALC269_FIXUP_NO_SHUTUP),
8321 SND_PCI_QUIRK(0x1d05, 0x1100, "TongFang GKxNRxx", ALC269_FIXUP_NO_SHUTUP),
8322 SND_PCI_QUIRK(0x1d05, 0x1111, "TongFang GMxZGxx", ALC269_FIXUP_NO_SHUTUP),
8323 SND_PCI_QUIRK(0x1d05, 0x1119, "TongFang GMxZGxx", ALC269_FIXUP_NO_SHUTUP),
8324 SND_PCI_QUIRK(0x1d05, 0x1129, "TongFang GMxZGxx", ALC269_FIXUP_NO_SHUTUP),
8325 SND_PCI_QUIRK(0x1d05, 0x1147, "TongFang GMxTGxx", ALC269_FIXUP_NO_SHUTUP),
8326 SND_PCI_QUIRK(0x1d05, 0x115c, "TongFang GMxTGxx", ALC269_FIXUP_NO_SHUTUP),
8327 SND_PCI_QUIRK(0x1d05, 0x121b, "TongFang GMxAGxx", ALC269_FIXUP_NO_SHUTUP),
8328 SND_PCI_QUIRK(0x1d05, 0x1387, "TongFang GMxIXxx", ALC2XX_FIXUP_HEADSET_MIC),
8329 SND_PCI_QUIRK(0x1d05, 0x1409, "TongFang GMxIXxx", ALC2XX_FIXUP_HEADSET_MIC),
8330 SND_PCI_QUIRK(0x1d05, 0x300f, "TongFang X6AR5xxY", ALC2XX_FIXUP_HEADSET_MIC),
8331 SND_PCI_QUIRK(0x1d05, 0x3019, "TongFang X6FR5xxY", ALC2XX_FIXUP_HEADSET_MIC),
8332 SND_PCI_QUIRK(0x1d05, 0x3031, "TongFang X6AR55xU", ALC2XX_FIXUP_HEADSET_MIC),
8333 SND_PCI_QUIRK(0x1d05, 0x3033, "TongFang X6SP45xU", ALC2XX_FIXUP_HEADSET_MIC),
8334 SND_PCI_QUIRK(0x1d05, 0x3034, "TongFang X6KK45xU", ALC2XX_FIXUP_HEADSET_MIC),
8335 SND_PCI_QUIRK(0x1d05, 0x30ba, "TongFang XxAF5xxx", ALC2XX_FIXUP_HEADSET_MIC),
8336 SND_PCI_QUIRK(0x1d17, 0x3288, "Haier Boyue G42", ALC269VC_FIXUP_ACER_VCOPPERBOX_PINS),
8337 SND_PCI_QUIRK(0x1d19, 0x0006, "VAIO VJS131", ALC233_FIXUP_ASUS_MIC_NO_PRESENCE),
8338 SND_PCI_QUIRK(0x1d72, 0x1602, "RedmiBook", ALC255_FIXUP_XIAOMI_HEADSET_MIC),
8339 SND_PCI_QUIRK(0x1d72, 0x1701, "XiaomiNotebook Pro", ALC298_FIXUP_DELL1_MIC_NO_PRESENCE),
8340 SND_PCI_QUIRK(0x1d72, 0x1901, "RedmiBook 14", ALC256_FIXUP_ASUS_HEADSET_MIC),
8341 SND_PCI_QUIRK(0x1d72, 0x1905, "Xiaomi Mi Laptop Pro 15", ALC256_FIXUP_XIAOMI_PRO15_RESUME),
8342 SND_PCI_QUIRK(0x1d72, 0x1945, "Redmi G", ALC256_FIXUP_ASUS_HEADSET_MIC),
8343 SND_PCI_QUIRK(0x1d72, 0x1947, "RedmiBook Air", ALC255_FIXUP_XIAOMI_HEADSET_MIC),
8344 SND_PCI_QUIRK(0x1e39, 0xca14, "MEDION NM14LNL", ALC233_FIXUP_MEDION_MTL_SPK),
8345 SND_PCI_QUIRK(0x1e50, 0x7007, "Positivo DN50E", ALC269_FIXUP_LIMIT_INT_MIC_BOOST),
8346 SND_PCI_QUIRK(0x1e50, 0x7036, "Acer Gadget E10 ETBook", ALC233_FIXUP_WUJIE_SPEAKERS),
8347 SND_PCI_QUIRK(0x1e50, 0x7038, "Positivo DN140", ALC269_FIXUP_LIMIT_INT_MIC_BOOST),
8348 SND_PCI_QUIRK(0x1ee7, 0x2078, "HONOR BRB-X M1010", ALC2XX_FIXUP_HEADSET_MIC),
8349 SND_PCI_QUIRK(0x1ee7, 0x2081, "HONOR MRB-XXX M1020", ALC256_FIXUP_HONOR_MRB_XXX_M1020_AUDIO),
8350 SND_PCI_QUIRK(0x1f4c, 0xb020, "Minisforum AI X1 Pro",
8351 ALC245_FIXUP_MINISFORUM_JACK_DETECT),
8352 SND_PCI_QUIRK(0x1f4c, 0xe001, "Minisforum V3 (SE)", ALC245_FIXUP_BASS_HP_DAC),
8353 SND_PCI_QUIRK(0x1f66, 0x0105, "Ayaneo Portable Game Player", ALC287_FIXUP_CS35L41_I2C_2),
8354 SND_PCI_QUIRK(0x2014, 0x800a, "Positivo ARN50", ALC269_FIXUP_LIMIT_INT_MIC_BOOST),
8355 SND_PCI_QUIRK(0x2039, 0x0001, "Inspur S14-G1", ALC295_FIXUP_CHROME_BOOK),
8356 SND_PCI_QUIRK(0x2145, 0x0001, "Star Labs StarFighter", ALC233_FIXUP_STARLABS_STARFIGHTER),
8357 SND_PCI_QUIRK(0x2782, 0x0214, "VAIO VJFE-CL", ALC269_FIXUP_LIMIT_INT_MIC_BOOST),
8358 SND_PCI_QUIRK(0x2782, 0x0228, "Infinix ZERO BOOK 13", ALC269VB_FIXUP_INFINIX_ZERO_BOOK_13),
8359 SND_PCI_QUIRK(0x2782, 0x0232, "CHUWI CoreBook XPro", ALC269VB_FIXUP_CHUWI_COREBOOK_XPRO),
8360 SND_PCI_QUIRK(0x2782, 0x0250, "Infinix INBOOK X3 Slim", ALC269VB_FIXUP_INFINIX_INBOOK_X3_SLIM),
8361 SND_PCI_QUIRK(0x2782, 0x1407, "Positivo P15X", ALC269_FIXUP_POSITIVO_P15X_HEADSET_MIC),
8362 SND_PCI_QUIRK(0x2782, 0x1409, "Positivo K116J", ALC269_FIXUP_POSITIVO_P15X_HEADSET_MIC),
8363 SND_PCI_QUIRK(0x2782, 0x1701, "Infinix Y4 Max", ALC269VC_FIXUP_INFINIX_Y4_MAX),
8364 SND_PCI_QUIRK(0x2782, 0x1705, "MEDION E15433", ALC269VC_FIXUP_INFINIX_Y4_MAX),
8365 SND_PCI_QUIRK(0x2782, 0x1707, "Vaio VJFE-ADL", ALC298_FIXUP_SPK_VOLUME),
8366 SND_PCI_QUIRK(0x2782, 0x4900, "MEDION E15443", ALC233_FIXUP_MEDION_MTL_SPK),
8367 SND_PCI_QUIRK(0x2782, 0xa128, "Positivo N15RPE-S", ALC269_FIXUP_LIMIT_INT_MIC_BOOST),
8368 SND_PCI_QUIRK(0x2782, 0xa212, "Lunnen Ground 14", ALC269VC_FIXUP_LUNNEN_GROUND_14),
8369 SND_PCI_QUIRK(0x7017, 0x2014, "Star Labs StarFighter", ALC233_FIXUP_STARLABS_STARFIGHTER),
8370 SND_PCI_QUIRK(0x8086, 0x2073, "Intel NUC 8 Hades Canyon",
8371 ALC700_FIXUP_INTEL_HADES_CANYON),
8372 SND_PCI_QUIRK(0x8086, 0x2074, "Intel NUC 8", ALC233_FIXUP_INTEL_NUC8_DMIC),
8373 SND_PCI_QUIRK(0x8086, 0x2080, "Intel NUC 8 Rugged", ALC256_FIXUP_INTEL_NUC8_RUGGED),
8374 SND_PCI_QUIRK(0x8086, 0x2081, "Intel NUC 10", ALC256_FIXUP_INTEL_NUC10),
8375 SND_PCI_QUIRK(0x8086, 0x3038, "Intel NUC 13", ALC295_FIXUP_CHROME_BOOK),
8376 SND_PCI_QUIRK(0xc011, 0x1d05, "MECHREVO WUJIE Series", ALC233_FIXUP_WUJIE_SPEAKERS),
8377 SND_PCI_QUIRK(0xf111, 0x0001, "Framework Laptop", ALC295_FIXUP_FRAMEWORK_LAPTOP_MIC_NO_PRESENCE),
8378 SND_PCI_QUIRK(0xf111, 0x0006, "Framework Laptop", ALC295_FIXUP_FRAMEWORK_LAPTOP_MIC_NO_PRESENCE),
8379 SND_PCI_QUIRK(0xf111, 0x0009, "Framework Laptop", ALC295_FIXUP_FRAMEWORK_LAPTOP_MIC_NO_PRESENCE),
8380 SND_PCI_QUIRK(0xf111, 0x000b, "Framework Laptop", ALC295_FIXUP_FRAMEWORK_LAPTOP_MIC_NO_PRESENCE),
8381 SND_PCI_QUIRK(0xf111, 0x000c, "Framework Laptop", ALC295_FIXUP_FRAMEWORK_LAPTOP_MIC_NO_PRESENCE),
8382 SND_PCI_QUIRK(0xf111, 0x000f, "Framework Laptop 13 Pro PTL", ALC295_FIXUP_FRAMEWORK_LAPTOP_LIMIT_INT_MIC_BOOST),
8383 SND_PCI_QUIRK(0xf111, 0x010f, "Framework Laptop 13 PTL", ALC295_FIXUP_FRAMEWORK_LAPTOP_LIMIT_INT_MIC_BOOST),
8384 SND_PCI_QUIRK(0xf111, 0x0010, "Framework Laptop", ALC295_FIXUP_FRAMEWORK_LAPTOP_LIMIT_INT_MIC_BOOST),
8385
8386 #if 0
8387 /* Below is a quirk table taken from the old code.
8388 * Basically the device should work as is without the fixup table.
8389 * If BIOS doesn't give a proper info, enable the corresponding
8390 * fixup entry.
8391 */
8392 SND_PCI_QUIRK(0x1043, 0x8330, "ASUS Eeepc P703 P900A",
8393 ALC269_FIXUP_AMIC),
8394 SND_PCI_QUIRK(0x1043, 0x1013, "ASUS N61Da", ALC269_FIXUP_AMIC),
8395 SND_PCI_QUIRK(0x1043, 0x1143, "ASUS B53f", ALC269_FIXUP_AMIC),
8396 SND_PCI_QUIRK(0x1043, 0x1133, "ASUS UJ20ft", ALC269_FIXUP_AMIC),
8397 SND_PCI_QUIRK(0x1043, 0x1183, "ASUS K72DR", ALC269_FIXUP_AMIC),
8398 SND_PCI_QUIRK(0x1043, 0x11b3, "ASUS K52DR", ALC269_FIXUP_AMIC),
8399 SND_PCI_QUIRK(0x1043, 0x11e3, "ASUS U33Jc", ALC269_FIXUP_AMIC),
8400 SND_PCI_QUIRK(0x1043, 0x1273, "ASUS UL80Jt", ALC269_FIXUP_AMIC),
8401 SND_PCI_QUIRK(0x1043, 0x1283, "ASUS U53Jc", ALC269_FIXUP_AMIC),
8402 SND_PCI_QUIRK(0x1043, 0x12b3, "ASUS N82JV", ALC269_FIXUP_AMIC),
8403 SND_PCI_QUIRK(0x1043, 0x12d3, "ASUS N61Jv", ALC269_FIXUP_AMIC),
8404 SND_PCI_QUIRK(0x1043, 0x13a3, "ASUS UL30Vt", ALC269_FIXUP_AMIC),
8405 SND_PCI_QUIRK(0x1043, 0x1373, "ASUS G73JX", ALC269_FIXUP_AMIC),
8406 SND_PCI_QUIRK(0x1043, 0x1383, "ASUS UJ30Jc", ALC269_FIXUP_AMIC),
8407 SND_PCI_QUIRK(0x1043, 0x13d3, "ASUS N61JA", ALC269_FIXUP_AMIC),
8408 SND_PCI_QUIRK(0x1043, 0x1413, "ASUS UL50", ALC269_FIXUP_AMIC),
8409 SND_PCI_QUIRK(0x1043, 0x1443, "ASUS UL30", ALC269_FIXUP_AMIC),
8410 SND_PCI_QUIRK(0x1043, 0x1453, "ASUS M60Jv", ALC269_FIXUP_AMIC),
8411 SND_PCI_QUIRK(0x1043, 0x1483, "ASUS UL80", ALC269_FIXUP_AMIC),
8412 SND_PCI_QUIRK(0x1043, 0x14f3, "ASUS F83Vf", ALC269_FIXUP_AMIC),
8413 SND_PCI_QUIRK(0x1043, 0x14e3, "ASUS UL20", ALC269_FIXUP_AMIC),
8414 SND_PCI_QUIRK(0x1043, 0x1513, "ASUS UX30", ALC269_FIXUP_AMIC),
8415 SND_PCI_QUIRK(0x1043, 0x1593, "ASUS N51Vn", ALC269_FIXUP_AMIC),
8416 SND_PCI_QUIRK(0x1043, 0x15a3, "ASUS N60Jv", ALC269_FIXUP_AMIC),
8417 SND_PCI_QUIRK(0x1043, 0x15b3, "ASUS N60Dp", ALC269_FIXUP_AMIC),
8418 SND_PCI_QUIRK(0x1043, 0x15c3, "ASUS N70De", ALC269_FIXUP_AMIC),
8419 SND_PCI_QUIRK(0x1043, 0x15e3, "ASUS F83T", ALC269_FIXUP_AMIC),
8420 SND_PCI_QUIRK(0x1043, 0x1643, "ASUS M60J", ALC269_FIXUP_AMIC),
8421 SND_PCI_QUIRK(0x1043, 0x1653, "ASUS U50", ALC269_FIXUP_AMIC),
8422 SND_PCI_QUIRK(0x1043, 0x1693, "ASUS F50N", ALC269_FIXUP_AMIC),
8423 SND_PCI_QUIRK(0x1043, 0x16a3, "ASUS F5Q", ALC269_FIXUP_AMIC),
8424 SND_PCI_QUIRK(0x1043, 0x1723, "ASUS P80", ALC269_FIXUP_AMIC),
8425 SND_PCI_QUIRK(0x1043, 0x1743, "ASUS U80", ALC269_FIXUP_AMIC),
8426 SND_PCI_QUIRK(0x1043, 0x1773, "ASUS U20A", ALC269_FIXUP_AMIC),
8427 SND_PCI_QUIRK(0x1043, 0x1883, "ASUS F81Se", ALC269_FIXUP_AMIC),
8428 SND_PCI_QUIRK(0x152d, 0x1778, "Quanta ON1", ALC269_FIXUP_DMIC),
8429 SND_PCI_QUIRK(0x17aa, 0x3be9, "Quanta Wistron", ALC269_FIXUP_AMIC),
8430 SND_PCI_QUIRK(0x17aa, 0x3bf8, "Quanta FL1", ALC269_FIXUP_AMIC),
8431 SND_PCI_QUIRK(0x17ff, 0x059a, "Quanta EL3", ALC269_FIXUP_DMIC),
8432 SND_PCI_QUIRK(0x17ff, 0x059b, "Quanta JR1", ALC269_FIXUP_DMIC),
8433 #endif
8434 {}
8435 };
8436
8437 static const struct hda_quirk alc269_fixup_vendor_tbl[] = {
8438 SND_PCI_QUIRK_VENDOR(0x1025, "Acer Aspire", ALC271_FIXUP_DMIC),
8439 SND_PCI_QUIRK_VENDOR(0x103c, "HP", ALC269_FIXUP_HP_MUTE_LED),
8440 SND_PCI_QUIRK_VENDOR(0x104d, "Sony VAIO", ALC269_FIXUP_SONY_VAIO),
8441 SND_PCI_QUIRK_VENDOR(0x17aa, "Lenovo XPAD", ALC269_FIXUP_LENOVO_XPAD_ACPI),
8442 SND_PCI_QUIRK_VENDOR(0x19e5, "Huawei Matebook", ALC255_FIXUP_MIC_MUTE_LED),
8443 SND_PCI_QUIRK_VENDOR(0x2145, "Star Labs", ALC269_FIXUP_LIMIT_INT_MIC_BOOST),
8444 {}
8445 };
8446
8447 static const struct hda_model_fixup alc269_fixup_models[] = {
8448 {.id = ALC269_FIXUP_AMIC, .name = "laptop-amic"},
8449 {.id = ALC269_FIXUP_DMIC, .name = "laptop-dmic"},
8450 {.id = ALC269_FIXUP_STEREO_DMIC, .name = "alc269-dmic"},
8451 {.id = ALC271_FIXUP_DMIC, .name = "alc271-dmic"},
8452 {.id = ALC269_FIXUP_INV_DMIC, .name = "inv-dmic"},
8453 {.id = ALC269_FIXUP_HEADSET_MIC, .name = "headset-mic"},
8454 {.id = ALC269_FIXUP_HEADSET_MODE, .name = "headset-mode"},
8455 {.id = ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC, .name = "headset-mode-no-hp-mic"},
8456 {.id = ALC269_FIXUP_LENOVO_DOCK, .name = "lenovo-dock"},
8457 {.id = ALC269_FIXUP_LENOVO_DOCK_LIMIT_BOOST, .name = "lenovo-dock-limit-boost"},
8458 {.id = ALC269_FIXUP_HP_GPIO_LED, .name = "hp-gpio-led"},
8459 {.id = ALC269_FIXUP_HP_DOCK_GPIO_MIC1_LED, .name = "hp-dock-gpio-mic1-led"},
8460 {.id = ALC269_FIXUP_DELL1_MIC_NO_PRESENCE, .name = "dell-headset-multi"},
8461 {.id = ALC269_FIXUP_DELL2_MIC_NO_PRESENCE, .name = "dell-headset-dock"},
8462 {.id = ALC269_FIXUP_DELL3_MIC_NO_PRESENCE, .name = "dell-headset3"},
8463 {.id = ALC269_FIXUP_DELL4_MIC_NO_PRESENCE, .name = "dell-headset4"},
8464 {.id = ALC269_FIXUP_DELL4_MIC_NO_PRESENCE_QUIET, .name = "dell-headset4-quiet"},
8465 {.id = ALC283_FIXUP_CHROME_BOOK, .name = "alc283-dac-wcaps"},
8466 {.id = ALC283_FIXUP_SENSE_COMBO_JACK, .name = "alc283-sense-combo"},
8467 {.id = ALC292_FIXUP_TPT440_DOCK, .name = "tpt440-dock"},
8468 {.id = ALC292_FIXUP_TPT440, .name = "tpt440"},
8469 {.id = ALC292_FIXUP_TPT460, .name = "tpt460"},
8470 {.id = ALC298_FIXUP_TPT470_DOCK_FIX, .name = "tpt470-dock-fix"},
8471 {.id = ALC298_FIXUP_TPT470_DOCK, .name = "tpt470-dock"},
8472 {.id = ALC233_FIXUP_LENOVO_MULTI_CODECS, .name = "dual-codecs"},
8473 {.id = ALC233_FIXUP_STARLABS_STARFIGHTER, .name = "starlabs-starfighter"},
8474 {.id = ALC700_FIXUP_INTEL_REFERENCE, .name = "alc700-ref"},
8475 {.id = ALC269_FIXUP_SONY_VAIO, .name = "vaio"},
8476 {.id = ALC269_FIXUP_DELL_M101Z, .name = "dell-m101z"},
8477 {.id = ALC269_FIXUP_ASUS_G73JW, .name = "asus-g73jw"},
8478 {.id = ALC269_FIXUP_LENOVO_EAPD, .name = "lenovo-eapd"},
8479 {.id = ALC275_FIXUP_SONY_HWEQ, .name = "sony-hweq"},
8480 {.id = ALC269_FIXUP_PCM_44K, .name = "pcm44k"},
8481 {.id = ALC269_FIXUP_LIFEBOOK, .name = "lifebook"},
8482 {.id = ALC269_FIXUP_LIFEBOOK_EXTMIC, .name = "lifebook-extmic"},
8483 {.id = ALC269_FIXUP_LIFEBOOK_HP_PIN, .name = "lifebook-hp-pin"},
8484 {.id = ALC255_FIXUP_LIFEBOOK_U7x7_HEADSET_MIC, .name = "lifebook-u7x7"},
8485 {.id = ALC269VB_FIXUP_AMIC, .name = "alc269vb-amic"},
8486 {.id = ALC269VB_FIXUP_DMIC, .name = "alc269vb-dmic"},
8487 {.id = ALC269_FIXUP_HP_MUTE_LED_MIC1, .name = "hp-mute-led-mic1"},
8488 {.id = ALC269_FIXUP_HP_MUTE_LED_MIC2, .name = "hp-mute-led-mic2"},
8489 {.id = ALC269_FIXUP_HP_MUTE_LED_MIC3, .name = "hp-mute-led-mic3"},
8490 {.id = ALC269_FIXUP_HP_GPIO_MIC1_LED, .name = "hp-gpio-mic1"},
8491 {.id = ALC269_FIXUP_HP_LINE1_MIC1_LED, .name = "hp-line1-mic1"},
8492 {.id = ALC269_FIXUP_NO_SHUTUP, .name = "noshutup"},
8493 {.id = ALC286_FIXUP_SONY_MIC_NO_PRESENCE, .name = "sony-nomic"},
8494 {.id = ALC269_FIXUP_ASPIRE_HEADSET_MIC, .name = "aspire-headset-mic"},
8495 {.id = ALC269_FIXUP_ASUS_X101, .name = "asus-x101"},
8496 {.id = ALC271_FIXUP_HP_GATE_MIC_JACK, .name = "acer-ao7xx"},
8497 {.id = ALC271_FIXUP_HP_GATE_MIC_JACK_E1_572, .name = "acer-aspire-e1"},
8498 {.id = ALC269_FIXUP_ACER_AC700, .name = "acer-ac700"},
8499 {.id = ALC269_FIXUP_LIMIT_INT_MIC_BOOST, .name = "limit-mic-boost"},
8500 {.id = ALC269VB_FIXUP_ASUS_ZENBOOK, .name = "asus-zenbook"},
8501 {.id = ALC269VB_FIXUP_ASUS_ZENBOOK_UX31A, .name = "asus-zenbook-ux31a"},
8502 {.id = ALC269VB_FIXUP_ORDISSIMO_EVE2, .name = "ordissimo"},
8503 {.id = ALC282_FIXUP_ASUS_TX300, .name = "asus-tx300"},
8504 {.id = ALC283_FIXUP_INT_MIC, .name = "alc283-int-mic"},
8505 {.id = ALC290_FIXUP_MONO_SPEAKERS_HSJACK, .name = "mono-speakers"},
8506 {.id = ALC290_FIXUP_SUBWOOFER_HSJACK, .name = "alc290-subwoofer"},
8507 {.id = ALC269_FIXUP_THINKPAD_ACPI, .name = "thinkpad"},
8508 {.id = ALC269_FIXUP_LENOVO_XPAD_ACPI, .name = "lenovo-xpad-led"},
8509 {.id = ALC269_FIXUP_DMIC_THINKPAD_ACPI, .name = "dmic-thinkpad"},
8510 {.id = ALC255_FIXUP_ACER_MIC_NO_PRESENCE, .name = "alc255-acer"},
8511 {.id = ALC255_FIXUP_ASUS_MIC_NO_PRESENCE, .name = "alc255-asus"},
8512 {.id = ALC255_FIXUP_DELL1_MIC_NO_PRESENCE, .name = "alc255-dell1"},
8513 {.id = ALC255_FIXUP_DELL2_MIC_NO_PRESENCE, .name = "alc255-dell2"},
8514 {.id = ALC293_FIXUP_DELL1_MIC_NO_PRESENCE, .name = "alc293-dell1"},
8515 {.id = ALC283_FIXUP_HEADSET_MIC, .name = "alc283-headset"},
8516 {.id = ALC255_FIXUP_MIC_MUTE_LED, .name = "alc255-dell-mute"},
8517 {.id = ALC282_FIXUP_ASPIRE_V5_PINS, .name = "aspire-v5"},
8518 {.id = ALC269VB_FIXUP_ASPIRE_E1_COEF, .name = "aspire-e1-coef"},
8519 {.id = ALC280_FIXUP_HP_GPIO4, .name = "hp-gpio4"},
8520 {.id = ALC286_FIXUP_HP_GPIO_LED, .name = "hp-gpio-led"},
8521 {.id = ALC280_FIXUP_HP_GPIO2_MIC_HOTKEY, .name = "hp-gpio2-hotkey"},
8522 {.id = ALC280_FIXUP_HP_DOCK_PINS, .name = "hp-dock-pins"},
8523 {.id = ALC269_FIXUP_HP_DOCK_GPIO_MIC1_LED, .name = "hp-dock-gpio-mic"},
8524 {.id = ALC280_FIXUP_HP_9480M, .name = "hp-9480m"},
8525 {.id = ALC288_FIXUP_DELL_HEADSET_MODE, .name = "alc288-dell-headset"},
8526 {.id = ALC288_FIXUP_DELL1_MIC_NO_PRESENCE, .name = "alc288-dell1"},
8527 {.id = ALC288_FIXUP_DELL_XPS_13, .name = "alc288-dell-xps13"},
8528 {.id = ALC292_FIXUP_DELL_E7X, .name = "dell-e7x"},
8529 {.id = ALC293_FIXUP_DISABLE_AAMIX_MULTIJACK, .name = "alc293-dell"},
8530 {.id = ALC298_FIXUP_DELL1_MIC_NO_PRESENCE, .name = "alc298-dell1"},
8531 {.id = ALC298_FIXUP_DELL_AIO_MIC_NO_PRESENCE, .name = "alc298-dell-aio"},
8532 {.id = ALC275_FIXUP_DELL_XPS, .name = "alc275-dell-xps"},
8533 {.id = ALC293_FIXUP_LENOVO_SPK_NOISE, .name = "lenovo-spk-noise"},
8534 {.id = ALC233_FIXUP_LENOVO_LINE2_MIC_HOTKEY, .name = "lenovo-hotkey"},
8535 {.id = ALC255_FIXUP_DELL_SPK_NOISE, .name = "dell-spk-noise"},
8536 {.id = ALC225_FIXUP_DELL1_MIC_NO_PRESENCE, .name = "alc225-dell1"},
8537 {.id = ALC295_FIXUP_DISABLE_DAC3, .name = "alc295-disable-dac3"},
8538 {.id = ALC285_FIXUP_SPEAKER2_TO_DAC1, .name = "alc285-speaker2-to-dac1"},
8539 {.id = ALC280_FIXUP_HP_HEADSET_MIC, .name = "alc280-hp-headset"},
8540 {.id = ALC221_FIXUP_HP_FRONT_MIC, .name = "alc221-hp-mic"},
8541 {.id = ALC298_FIXUP_SPK_VOLUME, .name = "alc298-spk-volume"},
8542 {.id = ALC256_FIXUP_DELL_INSPIRON_7559_SUBWOOFER, .name = "dell-inspiron-7559"},
8543 {.id = ALC269_FIXUP_ATIV_BOOK_8, .name = "ativ-book"},
8544 {.id = ALC221_FIXUP_HP_MIC_NO_PRESENCE, .name = "alc221-hp-mic"},
8545 {.id = ALC256_FIXUP_ASUS_HEADSET_MODE, .name = "alc256-asus-headset"},
8546 {.id = ALC256_FIXUP_ASUS_MIC, .name = "alc256-asus-mic"},
8547 {.id = ALC256_FIXUP_ASUS_AIO_GPIO2, .name = "alc256-asus-aio"},
8548 {.id = ALC233_FIXUP_ASUS_MIC_NO_PRESENCE, .name = "alc233-asus"},
8549 {.id = ALC233_FIXUP_EAPD_COEF_AND_MIC_NO_PRESENCE, .name = "alc233-eapd"},
8550 {.id = ALC294_FIXUP_LENOVO_MIC_LOCATION, .name = "alc294-lenovo-mic"},
8551 {.id = ALC225_FIXUP_DELL_WYSE_MIC_NO_PRESENCE, .name = "alc225-wyse"},
8552 {.id = ALC274_FIXUP_DELL_AIO_LINEOUT_VERB, .name = "alc274-dell-aio"},
8553 {.id = ALC255_FIXUP_DUMMY_LINEOUT_VERB, .name = "alc255-dummy-lineout"},
8554 {.id = ALC255_FIXUP_DELL_HEADSET_MIC, .name = "alc255-dell-headset"},
8555 {.id = ALC295_FIXUP_HP_X360, .name = "alc295-hp-x360"},
8556 {.id = ALC225_FIXUP_HEADSET_JACK, .name = "alc-headset-jack"},
8557 {.id = ALC295_FIXUP_CHROME_BOOK, .name = "alc-chrome-book"},
8558 {.id = ALC256_FIXUP_CHROME_BOOK, .name = "alc-2024y-chromebook"},
8559 {.id = ALC299_FIXUP_PREDATOR_SPK, .name = "predator-spk"},
8560 {.id = ALC298_FIXUP_HUAWEI_MBX_STEREO, .name = "huawei-mbx-stereo"},
8561 {.id = ALC256_FIXUP_MEDION_HEADSET_NO_PRESENCE, .name = "alc256-medion-headset"},
8562 {.id = ALC298_FIXUP_SAMSUNG_AMP, .name = "alc298-samsung-amp"},
8563 {.id = ALC298_FIXUP_SAMSUNG_AMP_V2_2_AMPS, .name = "alc298-samsung-amp-v2-2-amps"},
8564 {.id = ALC298_FIXUP_SAMSUNG_AMP_V2_4_AMPS, .name = "alc298-samsung-amp-v2-4-amps"},
8565 {.id = ALC256_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET, .name = "alc256-samsung-headphone"},
8566 {.id = ALC255_FIXUP_XIAOMI_HEADSET_MIC, .name = "alc255-xiaomi-headset"},
8567 {.id = ALC274_FIXUP_HP_MIC, .name = "alc274-hp-mic-detect"},
8568 {.id = ALC245_FIXUP_HP_X360_AMP, .name = "alc245-hp-x360-amp"},
8569 {.id = ALC295_FIXUP_HP_OMEN, .name = "alc295-hp-omen"},
8570 {.id = ALC285_FIXUP_HP_SPECTRE_X360, .name = "alc285-hp-spectre-x360"},
8571 {.id = ALC285_FIXUP_HP_SPECTRE_X360_EB1, .name = "alc285-hp-spectre-x360-eb1"},
8572 {.id = ALC285_FIXUP_HP_SPECTRE_X360_DF1, .name = "alc285-hp-spectre-x360-df1"},
8573 {.id = ALC285_FIXUP_HP_ENVY_X360, .name = "alc285-hp-envy-x360"},
8574 {.id = ALC287_FIXUP_IDEAPAD_BASS_SPK_AMP, .name = "alc287-ideapad-bass-spk-amp"},
8575 {.id = ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK_PIN, .name = "alc287-yoga9-bass-spk-pin"},
8576 {.id = ALC623_FIXUP_LENOVO_THINKSTATION_P340, .name = "alc623-lenovo-thinkstation-p340"},
8577 {.id = ALC255_FIXUP_ACER_HEADPHONE_AND_MIC, .name = "alc255-acer-headphone-and-mic"},
8578 {.id = ALC285_FIXUP_HP_GPIO_AMP_INIT, .name = "alc285-hp-amp-init"},
8579 {.id = ALC236_FIXUP_LENOVO_INV_DMIC, .name = "alc236-fixup-lenovo-inv-mic"},
8580 {.id = ALC2XX_FIXUP_HEADSET_MIC, .name = "alc2xx-fixup-headset-mic"},
8581 {.id = ALC245_FIXUP_BASS_HP_DAC, .name = "alc245-fixup-bass-hp-dac"},
8582 {.id = ALC256_FIXUP_HONOR_MRB_XXX_M1020_AUDIO, .name = "alc256-honor-mrb-xxx-m1020-audio"},
8583 {.id = ALC287_FIXUP_LENOVO_LEGION_AW88399, .name = "alc287-lenovo-legion-aw88399"},
8584 {}
8585 };
8586 #define ALC225_STANDARD_PINS \
8587 {0x21, 0x04211020}
8588
8589 #define ALC256_STANDARD_PINS \
8590 {0x12, 0x90a60140}, \
8591 {0x14, 0x90170110}, \
8592 {0x21, 0x02211020}
8593
8594 #define ALC282_STANDARD_PINS \
8595 {0x14, 0x90170110}
8596
8597 #define ALC290_STANDARD_PINS \
8598 {0x12, 0x99a30130}
8599
8600 #define ALC292_STANDARD_PINS \
8601 {0x14, 0x90170110}, \
8602 {0x15, 0x0221401f}
8603
8604 #define ALC295_STANDARD_PINS \
8605 {0x12, 0xb7a60130}, \
8606 {0x14, 0x90170110}, \
8607 {0x21, 0x04211020}
8608
8609 #define ALC298_STANDARD_PINS \
8610 {0x12, 0x90a60130}, \
8611 {0x21, 0x03211020}
8612
8613 static const struct snd_hda_pin_quirk alc269_pin_fixup_tbl[] = {
8614 SND_HDA_PIN_QUIRK(0x10ec0221, 0x103c, "HP Workstation", ALC221_FIXUP_HP_HEADSET_MIC,
8615 {0x14, 0x01014020},
8616 {0x17, 0x90170110},
8617 {0x18, 0x02a11030},
8618 {0x19, 0x0181303F},
8619 {0x21, 0x0221102f}),
8620 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1025, "Acer", ALC255_FIXUP_ACER_MIC_NO_PRESENCE,
8621 {0x12, 0x90a601c0},
8622 {0x14, 0x90171120},
8623 {0x21, 0x02211030}),
8624 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1043, "ASUS", ALC255_FIXUP_ASUS_MIC_NO_PRESENCE,
8625 {0x14, 0x90170110},
8626 {0x1b, 0x90a70130},
8627 {0x21, 0x03211020}),
8628 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1043, "ASUS", ALC255_FIXUP_ASUS_MIC_NO_PRESENCE,
8629 {0x1a, 0x90a70130},
8630 {0x1b, 0x90170110},
8631 {0x21, 0x03211020}),
8632 SND_HDA_PIN_QUIRK(0x10ec0225, 0x1028, "Dell", ALC225_FIXUP_DELL1_MIC_NO_PRESENCE,
8633 ALC225_STANDARD_PINS,
8634 {0x12, 0xb7a60130},
8635 {0x14, 0x901701a0}),
8636 SND_HDA_PIN_QUIRK(0x10ec0225, 0x1028, "Dell", ALC225_FIXUP_DELL1_MIC_NO_PRESENCE,
8637 ALC225_STANDARD_PINS,
8638 {0x12, 0xb7a60130},
8639 {0x14, 0x901701b0}),
8640 SND_HDA_PIN_QUIRK(0x10ec0225, 0x1028, "Dell", ALC225_FIXUP_DELL1_MIC_NO_PRESENCE,
8641 ALC225_STANDARD_PINS,
8642 {0x12, 0xb7a60150},
8643 {0x14, 0x901701a0}),
8644 SND_HDA_PIN_QUIRK(0x10ec0225, 0x1028, "Dell", ALC225_FIXUP_DELL1_MIC_NO_PRESENCE,
8645 ALC225_STANDARD_PINS,
8646 {0x12, 0xb7a60150},
8647 {0x14, 0x901701b0}),
8648 SND_HDA_PIN_QUIRK(0x10ec0225, 0x1028, "Dell", ALC225_FIXUP_DELL1_MIC_NO_PRESENCE,
8649 ALC225_STANDARD_PINS,
8650 {0x12, 0xb7a60130},
8651 {0x1b, 0x90170110}),
8652 SND_HDA_PIN_QUIRK(0x10ec0233, 0x8086, "Intel NUC Skull Canyon", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE,
8653 {0x1b, 0x01111010},
8654 {0x1e, 0x01451130},
8655 {0x21, 0x02211020}),
8656 SND_HDA_PIN_QUIRK(0x10ec0235, 0x17aa, "Lenovo", ALC233_FIXUP_LENOVO_LINE2_MIC_HOTKEY,
8657 {0x12, 0x90a60140},
8658 {0x14, 0x90170110},
8659 {0x19, 0x02a11030},
8660 {0x21, 0x02211020}),
8661 SND_HDA_PIN_QUIRK(0x10ec0235, 0x17aa, "Lenovo", ALC294_FIXUP_LENOVO_MIC_LOCATION,
8662 {0x14, 0x90170110},
8663 {0x19, 0x02a11030},
8664 {0x1a, 0x02a11040},
8665 {0x1b, 0x01014020},
8666 {0x21, 0x0221101f}),
8667 SND_HDA_PIN_QUIRK(0x10ec0235, 0x17aa, "Lenovo", ALC294_FIXUP_LENOVO_MIC_LOCATION,
8668 {0x14, 0x90170110},
8669 {0x19, 0x02a11030},
8670 {0x1a, 0x02a11040},
8671 {0x1b, 0x01011020},
8672 {0x21, 0x0221101f}),
8673 SND_HDA_PIN_QUIRK(0x10ec0235, 0x17aa, "Lenovo", ALC294_FIXUP_LENOVO_MIC_LOCATION,
8674 {0x14, 0x90170110},
8675 {0x19, 0x02a11020},
8676 {0x1a, 0x02a11030},
8677 {0x21, 0x0221101f}),
8678 SND_HDA_PIN_QUIRK(0x10ec0236, 0x1028, "Dell", ALC236_FIXUP_DELL_AIO_HEADSET_MIC,
8679 {0x21, 0x02211010}),
8680 SND_HDA_PIN_QUIRK(0x10ec0236, 0x103c, "HP", ALC256_FIXUP_HP_HEADSET_MIC,
8681 {0x14, 0x90170110},
8682 {0x19, 0x02a11020},
8683 {0x21, 0x02211030}),
8684 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL2_MIC_NO_PRESENCE,
8685 {0x14, 0x90170110},
8686 {0x21, 0x02211020}),
8687 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
8688 {0x14, 0x90170130},
8689 {0x21, 0x02211040}),
8690 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
8691 {0x12, 0x90a60140},
8692 {0x14, 0x90170110},
8693 {0x21, 0x02211020}),
8694 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
8695 {0x12, 0x90a60160},
8696 {0x14, 0x90170120},
8697 {0x21, 0x02211030}),
8698 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
8699 {0x14, 0x90170110},
8700 {0x1b, 0x02011020},
8701 {0x21, 0x0221101f}),
8702 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
8703 {0x14, 0x90170110},
8704 {0x1b, 0x01011020},
8705 {0x21, 0x0221101f}),
8706 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
8707 {0x14, 0x90170130},
8708 {0x1b, 0x01014020},
8709 {0x21, 0x0221103f}),
8710 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
8711 {0x14, 0x90170130},
8712 {0x1b, 0x01011020},
8713 {0x21, 0x0221103f}),
8714 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
8715 {0x14, 0x90170130},
8716 {0x1b, 0x02011020},
8717 {0x21, 0x0221103f}),
8718 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
8719 {0x14, 0x90170150},
8720 {0x1b, 0x02011020},
8721 {0x21, 0x0221105f}),
8722 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
8723 {0x14, 0x90170110},
8724 {0x1b, 0x01014020},
8725 {0x21, 0x0221101f}),
8726 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
8727 {0x12, 0x90a60160},
8728 {0x14, 0x90170120},
8729 {0x17, 0x90170140},
8730 {0x21, 0x0321102f}),
8731 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
8732 {0x12, 0x90a60160},
8733 {0x14, 0x90170130},
8734 {0x21, 0x02211040}),
8735 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
8736 {0x12, 0x90a60160},
8737 {0x14, 0x90170140},
8738 {0x21, 0x02211050}),
8739 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
8740 {0x12, 0x90a60170},
8741 {0x14, 0x90170120},
8742 {0x21, 0x02211030}),
8743 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
8744 {0x12, 0x90a60170},
8745 {0x14, 0x90170130},
8746 {0x21, 0x02211040}),
8747 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
8748 {0x12, 0x90a60170},
8749 {0x14, 0x90171130},
8750 {0x21, 0x02211040}),
8751 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
8752 {0x12, 0x90a60170},
8753 {0x14, 0x90170140},
8754 {0x21, 0x02211050}),
8755 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell Inspiron 5548", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
8756 {0x12, 0x90a60180},
8757 {0x14, 0x90170130},
8758 {0x21, 0x02211040}),
8759 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell Inspiron 5565", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
8760 {0x12, 0x90a60180},
8761 {0x14, 0x90170120},
8762 {0x21, 0x02211030}),
8763 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
8764 {0x1b, 0x01011020},
8765 {0x21, 0x02211010}),
8766 SND_HDA_PIN_QUIRK(0x10ec0256, 0x1043, "ASUS", ALC256_FIXUP_ASUS_MIC,
8767 {0x14, 0x90170110},
8768 {0x1b, 0x90a70130},
8769 {0x21, 0x04211020}),
8770 SND_HDA_PIN_QUIRK(0x10ec0256, 0x1043, "ASUS", ALC256_FIXUP_ASUS_MIC,
8771 {0x14, 0x90170110},
8772 {0x1b, 0x90a70130},
8773 {0x21, 0x03211020}),
8774 SND_HDA_PIN_QUIRK(0x10ec0256, 0x1043, "ASUS", ALC256_FIXUP_ASUS_MIC_NO_PRESENCE,
8775 {0x12, 0x90a60130},
8776 {0x14, 0x90170110},
8777 {0x21, 0x03211020}),
8778 SND_HDA_PIN_QUIRK(0x10ec0256, 0x1043, "ASUS", ALC256_FIXUP_ASUS_MIC_NO_PRESENCE,
8779 {0x12, 0x90a60130},
8780 {0x14, 0x90170110},
8781 {0x21, 0x04211020}),
8782 SND_HDA_PIN_QUIRK(0x10ec0256, 0x1043, "ASUS", ALC256_FIXUP_ASUS_MIC_NO_PRESENCE,
8783 {0x1a, 0x90a70130},
8784 {0x1b, 0x90170110},
8785 {0x21, 0x03211020}),
8786 SND_HDA_PIN_QUIRK(0x10ec0256, 0x103c, "HP", ALC256_FIXUP_HP_HEADSET_MIC,
8787 {0x14, 0x90170110},
8788 {0x19, 0x02a11020},
8789 {0x21, 0x0221101f}),
8790 SND_HDA_PIN_QUIRK(0x10ec0274, 0x103c, "HP", ALC274_FIXUP_HP_HEADSET_MIC,
8791 {0x17, 0x90170110},
8792 {0x19, 0x03a11030},
8793 {0x21, 0x03211020}),
8794 SND_HDA_PIN_QUIRK(0x10ec0280, 0x103c, "HP", ALC280_FIXUP_HP_GPIO4,
8795 {0x12, 0x90a60130},
8796 {0x14, 0x90170110},
8797 {0x15, 0x0421101f},
8798 {0x1a, 0x04a11020}),
8799 SND_HDA_PIN_QUIRK(0x10ec0280, 0x103c, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED,
8800 {0x12, 0x90a60140},
8801 {0x14, 0x90170110},
8802 {0x15, 0x0421101f},
8803 {0x18, 0x02811030},
8804 {0x1a, 0x04a1103f},
8805 {0x1b, 0x02011020}),
8806 SND_HDA_PIN_QUIRK(0x10ec0282, 0x103c, "HP 15 Touchsmart", ALC269_FIXUP_HP_MUTE_LED_MIC1,
8807 ALC282_STANDARD_PINS,
8808 {0x12, 0x99a30130},
8809 {0x19, 0x03a11020},
8810 {0x21, 0x0321101f}),
8811 SND_HDA_PIN_QUIRK(0x10ec0282, 0x103c, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1,
8812 ALC282_STANDARD_PINS,
8813 {0x12, 0x99a30130},
8814 {0x19, 0x03a11020},
8815 {0x21, 0x03211040}),
8816 SND_HDA_PIN_QUIRK(0x10ec0282, 0x103c, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1,
8817 ALC282_STANDARD_PINS,
8818 {0x12, 0x99a30130},
8819 {0x19, 0x03a11030},
8820 {0x21, 0x03211020}),
8821 SND_HDA_PIN_QUIRK(0x10ec0282, 0x103c, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1,
8822 ALC282_STANDARD_PINS,
8823 {0x12, 0x99a30130},
8824 {0x19, 0x04a11020},
8825 {0x21, 0x0421101f}),
8826 SND_HDA_PIN_QUIRK(0x10ec0282, 0x103c, "HP", ALC269_FIXUP_HP_LINE1_MIC1_LED,
8827 ALC282_STANDARD_PINS,
8828 {0x12, 0x90a60140},
8829 {0x19, 0x04a11030},
8830 {0x21, 0x04211020}),
8831 SND_HDA_PIN_QUIRK(0x10ec0282, 0x1025, "Acer", ALC282_FIXUP_ACER_DISABLE_LINEOUT,
8832 ALC282_STANDARD_PINS,
8833 {0x12, 0x90a609c0},
8834 {0x18, 0x03a11830},
8835 {0x19, 0x04a19831},
8836 {0x1a, 0x0481303f},
8837 {0x1b, 0x04211020},
8838 {0x21, 0x0321101f}),
8839 SND_HDA_PIN_QUIRK(0x10ec0282, 0x1025, "Acer", ALC282_FIXUP_ACER_DISABLE_LINEOUT,
8840 ALC282_STANDARD_PINS,
8841 {0x12, 0x90a60940},
8842 {0x18, 0x03a11830},
8843 {0x19, 0x04a19831},
8844 {0x1a, 0x0481303f},
8845 {0x1b, 0x04211020},
8846 {0x21, 0x0321101f}),
8847 SND_HDA_PIN_QUIRK(0x10ec0283, 0x1028, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE,
8848 ALC282_STANDARD_PINS,
8849 {0x12, 0x90a60130},
8850 {0x21, 0x0321101f}),
8851 SND_HDA_PIN_QUIRK(0x10ec0283, 0x1028, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE,
8852 {0x12, 0x90a60160},
8853 {0x14, 0x90170120},
8854 {0x21, 0x02211030}),
8855 SND_HDA_PIN_QUIRK(0x10ec0283, 0x1028, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE,
8856 ALC282_STANDARD_PINS,
8857 {0x12, 0x90a60130},
8858 {0x19, 0x03a11020},
8859 {0x21, 0x0321101f}),
8860 SND_HDA_PIN_QUIRK(0x10ec0285, 0x17aa, "Lenovo", ALC285_FIXUP_LENOVO_PC_BEEP_IN_NOISE,
8861 {0x12, 0x90a60130},
8862 {0x14, 0x90170110},
8863 {0x19, 0x04a11040},
8864 {0x21, 0x04211020}),
8865 SND_HDA_PIN_QUIRK(0x10ec0285, 0x17aa, "Lenovo", ALC285_FIXUP_LENOVO_PC_BEEP_IN_NOISE,
8866 {0x14, 0x90170110},
8867 {0x19, 0x04a11040},
8868 {0x1d, 0x40600001},
8869 {0x21, 0x04211020}),
8870 SND_HDA_PIN_QUIRK(0x10ec0285, 0x17aa, "Lenovo", ALC285_FIXUP_THINKPAD_NO_BASS_SPK_HEADSET_JACK,
8871 {0x14, 0x90170110},
8872 {0x19, 0x04a11040},
8873 {0x21, 0x04211020}),
8874 SND_HDA_PIN_QUIRK(0x10ec0287, 0x17aa, "Lenovo", ALC285_FIXUP_THINKPAD_HEADSET_JACK,
8875 {0x14, 0x90170110},
8876 {0x17, 0x90170111},
8877 {0x19, 0x03a11030},
8878 {0x21, 0x03211020}),
8879 SND_HDA_PIN_QUIRK(0x10ec0287, 0x17aa, "Lenovo", ALC287_FIXUP_THINKPAD_I2S_SPK,
8880 {0x17, 0x90170110},
8881 {0x19, 0x03a11030},
8882 {0x21, 0x03211020}),
8883 SND_HDA_PIN_QUIRK(0x10ec0287, 0x17aa, "Lenovo", ALC287_FIXUP_THINKPAD_I2S_SPK,
8884 {0x17, 0x90170110}, /* 0x231f with RTK I2S AMP */
8885 {0x19, 0x04a11040},
8886 {0x21, 0x04211020}),
8887 SND_HDA_PIN_QUIRK(0x10ec0286, 0x1025, "Acer", ALC286_FIXUP_ACER_AIO_MIC_NO_PRESENCE,
8888 {0x12, 0x90a60130},
8889 {0x17, 0x90170110},
8890 {0x21, 0x02211020}),
8891 SND_HDA_PIN_QUIRK(0x10ec0288, 0x1028, "Dell", ALC288_FIXUP_DELL1_MIC_NO_PRESENCE,
8892 {0x12, 0x90a60120},
8893 {0x14, 0x90170110},
8894 {0x21, 0x0321101f}),
8895 SND_HDA_PIN_QUIRK(0x10ec0290, 0x103c, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1,
8896 ALC290_STANDARD_PINS,
8897 {0x15, 0x04211040},
8898 {0x18, 0x90170112},
8899 {0x1a, 0x04a11020}),
8900 SND_HDA_PIN_QUIRK(0x10ec0290, 0x103c, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1,
8901 ALC290_STANDARD_PINS,
8902 {0x15, 0x04211040},
8903 {0x18, 0x90170110},
8904 {0x1a, 0x04a11020}),
8905 SND_HDA_PIN_QUIRK(0x10ec0290, 0x103c, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1,
8906 ALC290_STANDARD_PINS,
8907 {0x15, 0x0421101f},
8908 {0x1a, 0x04a11020}),
8909 SND_HDA_PIN_QUIRK(0x10ec0290, 0x103c, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1,
8910 ALC290_STANDARD_PINS,
8911 {0x15, 0x04211020},
8912 {0x1a, 0x04a11040}),
8913 SND_HDA_PIN_QUIRK(0x10ec0290, 0x103c, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1,
8914 ALC290_STANDARD_PINS,
8915 {0x14, 0x90170110},
8916 {0x15, 0x04211020},
8917 {0x1a, 0x04a11040}),
8918 SND_HDA_PIN_QUIRK(0x10ec0290, 0x103c, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1,
8919 ALC290_STANDARD_PINS,
8920 {0x14, 0x90170110},
8921 {0x15, 0x04211020},
8922 {0x1a, 0x04a11020}),
8923 SND_HDA_PIN_QUIRK(0x10ec0290, 0x103c, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1,
8924 ALC290_STANDARD_PINS,
8925 {0x14, 0x90170110},
8926 {0x15, 0x0421101f},
8927 {0x1a, 0x04a11020}),
8928 SND_HDA_PIN_QUIRK(0x10ec0292, 0x1028, "Dell", ALC269_FIXUP_DELL2_MIC_NO_PRESENCE,
8929 ALC292_STANDARD_PINS,
8930 {0x12, 0x90a60140},
8931 {0x16, 0x01014020},
8932 {0x19, 0x01a19030}),
8933 SND_HDA_PIN_QUIRK(0x10ec0292, 0x1028, "Dell", ALC269_FIXUP_DELL2_MIC_NO_PRESENCE,
8934 ALC292_STANDARD_PINS,
8935 {0x12, 0x90a60140},
8936 {0x16, 0x01014020},
8937 {0x18, 0x02a19031},
8938 {0x19, 0x01a1903e}),
8939 SND_HDA_PIN_QUIRK(0x10ec0292, 0x1028, "Dell", ALC269_FIXUP_DELL3_MIC_NO_PRESENCE,
8940 ALC292_STANDARD_PINS,
8941 {0x12, 0x90a60140}),
8942 SND_HDA_PIN_QUIRK(0x10ec0293, 0x1028, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE,
8943 ALC292_STANDARD_PINS,
8944 {0x13, 0x90a60140},
8945 {0x16, 0x21014020},
8946 {0x19, 0x21a19030}),
8947 SND_HDA_PIN_QUIRK(0x10ec0293, 0x1028, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE,
8948 ALC292_STANDARD_PINS,
8949 {0x13, 0x90a60140}),
8950 SND_HDA_PIN_QUIRK(0x10ec0294, 0x1043, "ASUS", ALC294_FIXUP_ASUS_HPE,
8951 {0x17, 0x90170110},
8952 {0x21, 0x04211020}),
8953 SND_HDA_PIN_QUIRK(0x10ec0294, 0x1043, "ASUS", ALC294_FIXUP_ASUS_MIC,
8954 {0x14, 0x90170110},
8955 {0x1b, 0x90a70130},
8956 {0x21, 0x04211020}),
8957 SND_HDA_PIN_QUIRK(0x10ec0294, 0x1043, "ASUS", ALC294_FIXUP_ASUS_SPK,
8958 {0x12, 0x90a60130},
8959 {0x17, 0x90170110},
8960 {0x21, 0x03211020}),
8961 SND_HDA_PIN_QUIRK(0x10ec0294, 0x1043, "ASUS", ALC294_FIXUP_ASUS_SPK,
8962 {0x12, 0x90a60130},
8963 {0x17, 0x90170110},
8964 {0x21, 0x04211020}),
8965 SND_HDA_PIN_QUIRK(0x10ec0295, 0x1043, "ASUS", ALC294_FIXUP_ASUS_SPK,
8966 {0x12, 0x90a60130},
8967 {0x17, 0x90170110},
8968 {0x21, 0x03211020}),
8969 SND_HDA_PIN_QUIRK(0x10ec0295, 0x1043, "ASUS", ALC295_FIXUP_ASUS_MIC_NO_PRESENCE,
8970 {0x12, 0x90a60120},
8971 {0x17, 0x90170110},
8972 {0x21, 0x04211030}),
8973 SND_HDA_PIN_QUIRK(0x10ec0295, 0x1043, "ASUS", ALC295_FIXUP_ASUS_MIC_NO_PRESENCE,
8974 {0x12, 0x90a60130},
8975 {0x17, 0x90170110},
8976 {0x21, 0x03211020}),
8977 SND_HDA_PIN_QUIRK(0x10ec0295, 0x1043, "ASUS", ALC295_FIXUP_ASUS_MIC_NO_PRESENCE,
8978 {0x12, 0x90a60130},
8979 {0x17, 0x90170110},
8980 {0x21, 0x03211020}),
8981 SND_HDA_PIN_QUIRK(0x10ec0298, 0x1028, "Dell", ALC298_FIXUP_DELL1_MIC_NO_PRESENCE,
8982 ALC298_STANDARD_PINS,
8983 {0x17, 0x90170110}),
8984 SND_HDA_PIN_QUIRK(0x10ec0298, 0x1028, "Dell", ALC298_FIXUP_DELL1_MIC_NO_PRESENCE,
8985 ALC298_STANDARD_PINS,
8986 {0x17, 0x90170140}),
8987 SND_HDA_PIN_QUIRK(0x10ec0298, 0x1028, "Dell", ALC298_FIXUP_DELL1_MIC_NO_PRESENCE,
8988 ALC298_STANDARD_PINS,
8989 {0x17, 0x90170150}),
8990 SND_HDA_PIN_QUIRK(0x10ec0298, 0x1028, "Dell", ALC298_FIXUP_SPK_VOLUME,
8991 {0x12, 0xb7a60140},
8992 {0x13, 0xb7a60150},
8993 {0x17, 0x90170110},
8994 {0x1a, 0x03011020},
8995 {0x21, 0x03211030}),
8996 SND_HDA_PIN_QUIRK(0x10ec0298, 0x1028, "Dell", ALC298_FIXUP_ALIENWARE_MIC_NO_PRESENCE,
8997 {0x12, 0xb7a60140},
8998 {0x17, 0x90170110},
8999 {0x1a, 0x03a11030},
9000 {0x21, 0x03211020}),
9001 SND_HDA_PIN_QUIRK(0x10ec0299, 0x1028, "Dell", ALC269_FIXUP_DELL4_MIC_NO_PRESENCE,
9002 ALC225_STANDARD_PINS,
9003 {0x12, 0xb7a60130},
9004 {0x17, 0x90170110}),
9005 SND_HDA_PIN_QUIRK(0x10ec0623, 0x17aa, "Lenovo", ALC283_FIXUP_HEADSET_MIC,
9006 {0x14, 0x01014010},
9007 {0x17, 0x90170120},
9008 {0x18, 0x02a11030},
9009 {0x19, 0x02a1103f},
9010 {0x21, 0x0221101f}),
9011 {}
9012 };
9013
9014 /* This is the fallback pin_fixup_tbl for alc269 family, to make the tbl match
9015 * more machines, don't need to match all valid pins, just need to match
9016 * all the pins defined in the tbl. Just because of this reason, it is possible
9017 * that a single machine matches multiple tbls, so there is one limitation:
9018 * at most one tbl is allowed to define for the same vendor and same codec
9019 */
9020 static const struct snd_hda_pin_quirk alc269_fallback_pin_fixup_tbl[] = {
9021 SND_HDA_PIN_QUIRK(0x10ec0256, 0x1025, "Acer", ALC2XX_FIXUP_HEADSET_MIC,
9022 {0x19, 0x40000000}),
9023 SND_HDA_PIN_QUIRK(0x10ec0289, 0x1028, "Dell", ALC269_FIXUP_DELL4_MIC_NO_PRESENCE,
9024 {0x19, 0x40000000},
9025 {0x1b, 0x40000000}),
9026 SND_HDA_PIN_QUIRK(0x10ec0295, 0x1028, "Dell", ALC269_FIXUP_DELL4_MIC_NO_PRESENCE_QUIET,
9027 {0x19, 0x40000000},
9028 {0x1b, 0x40000000}),
9029 SND_HDA_PIN_QUIRK(0x10ec0256, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
9030 {0x19, 0x40000000},
9031 {0x1a, 0x40000000}),
9032 SND_HDA_PIN_QUIRK(0x10ec0236, 0x1028, "Dell", ALC255_FIXUP_DELL1_LIMIT_INT_MIC_BOOST,
9033 {0x19, 0x40000000},
9034 {0x1a, 0x40000000}),
9035 SND_HDA_PIN_QUIRK(0x10ec0274, 0x1028, "Dell", ALC269_FIXUP_DELL1_LIMIT_INT_MIC_BOOST,
9036 {0x19, 0x40000000},
9037 {0x1a, 0x40000000}),
9038 SND_HDA_PIN_QUIRK(0x10ec0256, 0x1043, "ASUS", ALC2XX_FIXUP_HEADSET_MIC,
9039 {0x19, 0x40000000}),
9040 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1558, "Clevo", ALC2XX_FIXUP_HEADSET_MIC,
9041 {0x19, 0x40000000}),
9042 {}
9043 };
9044
alc269_fill_coef(struct hda_codec * codec)9045 static void alc269_fill_coef(struct hda_codec *codec)
9046 {
9047 struct alc_spec *spec = codec->spec;
9048 int val;
9049
9050 if (spec->codec_variant != ALC269_TYPE_ALC269VB)
9051 return;
9052
9053 if ((alc_get_coef0(codec) & 0x00ff) < 0x015) {
9054 alc_write_coef_idx(codec, 0xf, 0x960b);
9055 alc_write_coef_idx(codec, 0xe, 0x8817);
9056 }
9057
9058 if ((alc_get_coef0(codec) & 0x00ff) == 0x016) {
9059 alc_write_coef_idx(codec, 0xf, 0x960b);
9060 alc_write_coef_idx(codec, 0xe, 0x8814);
9061 }
9062
9063 if ((alc_get_coef0(codec) & 0x00ff) == 0x017) {
9064 /* Power up output pin */
9065 alc_update_coef_idx(codec, 0x04, 0, 1<<11);
9066 }
9067
9068 if ((alc_get_coef0(codec) & 0x00ff) == 0x018) {
9069 val = alc_read_coef_idx(codec, 0xd);
9070 if (val != -1 && (val & 0x0c00) >> 10 != 0x1) {
9071 /* Capless ramp up clock control */
9072 alc_write_coef_idx(codec, 0xd, val | (1<<10));
9073 }
9074 val = alc_read_coef_idx(codec, 0x17);
9075 if (val != -1 && (val & 0x01c0) >> 6 != 0x4) {
9076 /* Class D power on reset */
9077 alc_write_coef_idx(codec, 0x17, val | (1<<7));
9078 }
9079 }
9080
9081 /* HP */
9082 alc_update_coef_idx(codec, 0x4, 0, 1<<11);
9083 }
9084
alc269_remove(struct hda_codec * codec)9085 static void alc269_remove(struct hda_codec *codec)
9086 {
9087 struct alc_spec *spec = codec->spec;
9088
9089 if (spec)
9090 hda_component_manager_free(&spec->comps, &comp_master_ops);
9091
9092 snd_hda_gen_remove(codec);
9093 }
9094
9095 /*
9096 */
alc269_probe(struct hda_codec * codec,const struct hda_device_id * id)9097 static int alc269_probe(struct hda_codec *codec, const struct hda_device_id *id)
9098 {
9099 struct alc_spec *spec;
9100 int err;
9101
9102 err = alc_alloc_spec(codec, 0x0b);
9103 if (err < 0)
9104 return err;
9105
9106 spec = codec->spec;
9107 spec->gen.shared_mic_vref_pin = 0x18;
9108 codec->power_save_node = 0;
9109 spec->en_3kpull_low = true;
9110
9111 spec->shutup = alc_default_shutup;
9112 spec->init_hook = alc_default_init;
9113
9114 switch (codec->core.vendor_id) {
9115 case 0x10ec0269:
9116 spec->codec_variant = ALC269_TYPE_ALC269VA;
9117 switch (alc_get_coef0(codec) & 0x00f0) {
9118 case 0x0010:
9119 if (codec->bus->pci &&
9120 codec->bus->pci->subsystem_vendor == 0x1025 &&
9121 spec->cdefine.platform_type == 1)
9122 err = alc_codec_rename(codec, "ALC271X");
9123 spec->codec_variant = ALC269_TYPE_ALC269VB;
9124 break;
9125 case 0x0020:
9126 if (codec->bus->pci &&
9127 codec->bus->pci->subsystem_vendor == 0x17aa &&
9128 codec->bus->pci->subsystem_device == 0x21f3)
9129 err = alc_codec_rename(codec, "ALC3202");
9130 spec->codec_variant = ALC269_TYPE_ALC269VC;
9131 break;
9132 case 0x0030:
9133 spec->codec_variant = ALC269_TYPE_ALC269VD;
9134 break;
9135 default:
9136 alc_fix_pll_init(codec, 0x20, 0x04, 15);
9137 }
9138 if (err < 0)
9139 goto error;
9140 spec->shutup = alc269_shutup;
9141 spec->init_hook = alc269_fill_coef;
9142 alc269_fill_coef(codec);
9143 break;
9144
9145 case 0x10ec0280:
9146 case 0x10ec0290:
9147 spec->codec_variant = ALC269_TYPE_ALC280;
9148 break;
9149 case 0x10ec0282:
9150 spec->codec_variant = ALC269_TYPE_ALC282;
9151 spec->shutup = alc282_shutup;
9152 spec->init_hook = alc282_init;
9153 break;
9154 case 0x10ec0233:
9155 case 0x10ec0283:
9156 spec->codec_variant = ALC269_TYPE_ALC283;
9157 spec->shutup = alc283_shutup;
9158 spec->init_hook = alc283_init;
9159 break;
9160 case 0x10ec0284:
9161 case 0x10ec0292:
9162 spec->codec_variant = ALC269_TYPE_ALC284;
9163 break;
9164 case 0x10ec0293:
9165 spec->codec_variant = ALC269_TYPE_ALC293;
9166 break;
9167 case 0x10ec0286:
9168 case 0x10ec0288:
9169 spec->codec_variant = ALC269_TYPE_ALC286;
9170 break;
9171 case 0x10ec0298:
9172 spec->codec_variant = ALC269_TYPE_ALC298;
9173 break;
9174 case 0x10ec0235:
9175 case 0x10ec0255:
9176 spec->codec_variant = ALC269_TYPE_ALC255;
9177 spec->shutup = alc256_shutup;
9178 spec->init_hook = alc256_init;
9179 break;
9180 case 0x10ec0230:
9181 case 0x10ec0236:
9182 case 0x10ec0256:
9183 case 0x19e58326:
9184 spec->codec_variant = ALC269_TYPE_ALC256;
9185 spec->shutup = alc256_shutup;
9186 spec->init_hook = alc256_init;
9187 spec->gen.mixer_nid = 0; /* ALC256 does not have any loopback mixer path */
9188 if (codec->core.vendor_id == 0x10ec0236 &&
9189 codec->bus->pci &&
9190 codec->bus->pci->vendor != PCI_VENDOR_ID_AMD)
9191 spec->en_3kpull_low = false;
9192 break;
9193 case 0x10ec0257:
9194 spec->codec_variant = ALC269_TYPE_ALC257;
9195 spec->shutup = alc256_shutup;
9196 spec->init_hook = alc256_init;
9197 spec->gen.mixer_nid = 0;
9198 spec->en_3kpull_low = false;
9199 break;
9200 case 0x10ec0215:
9201 case 0x10ec0245:
9202 case 0x10ec0285:
9203 case 0x10ec0289:
9204 if (alc_get_coef0(codec) & 0x0010)
9205 spec->codec_variant = ALC269_TYPE_ALC245;
9206 else
9207 spec->codec_variant = ALC269_TYPE_ALC215;
9208 spec->shutup = alc225_shutup;
9209 spec->init_hook = alc225_init;
9210 spec->gen.mixer_nid = 0;
9211 break;
9212 case 0x10ec0225:
9213 case 0x10ec0295:
9214 case 0x10ec0299:
9215 spec->codec_variant = ALC269_TYPE_ALC225;
9216 spec->shutup = alc225_shutup;
9217 spec->init_hook = alc225_init;
9218 spec->gen.mixer_nid = 0; /* no loopback on ALC225, ALC295 and ALC299 */
9219 break;
9220 case 0x10ec0287:
9221 spec->codec_variant = ALC269_TYPE_ALC287;
9222 spec->shutup = alc225_shutup;
9223 spec->init_hook = alc225_init;
9224 spec->gen.mixer_nid = 0; /* no loopback on ALC287 */
9225 break;
9226 case 0x10ec0234:
9227 case 0x10ec0274:
9228 case 0x10ec0294:
9229 spec->codec_variant = ALC269_TYPE_ALC294;
9230 spec->gen.mixer_nid = 0; /* ALC2x4 does not have any loopback mixer path */
9231 alc_update_coef_idx(codec, 0x6b, 0x0018, (1<<4) | (1<<3)); /* UAJ MIC Vref control by verb */
9232 spec->init_hook = alc294_init;
9233 break;
9234 case 0x10ec0300:
9235 spec->codec_variant = ALC269_TYPE_ALC300;
9236 spec->gen.mixer_nid = 0; /* no loopback on ALC300 */
9237 break;
9238 case 0x10ec0222:
9239 case 0x10ec0623:
9240 spec->codec_variant = ALC269_TYPE_ALC623;
9241 spec->shutup = alc222_shutup;
9242 spec->init_hook = alc222_init;
9243 break;
9244 case 0x10ec0700:
9245 case 0x10ec0701:
9246 case 0x10ec0703:
9247 case 0x10ec0711:
9248 spec->codec_variant = ALC269_TYPE_ALC700;
9249 spec->gen.mixer_nid = 0; /* ALC700 does not have any loopback mixer path */
9250 alc_update_coef_idx(codec, 0x4a, 1 << 15, 0); /* Combo jack auto trigger control */
9251 spec->init_hook = alc294_init;
9252 break;
9253
9254 }
9255
9256 if (snd_hda_codec_read(codec, 0x51, 0, AC_VERB_PARAMETERS, 0) == 0x10ec5505) {
9257 spec->has_alc5505_dsp = 1;
9258 spec->init_hook = alc5505_dsp_init;
9259 }
9260
9261 alc_pre_init(codec);
9262
9263 snd_hda_pick_fixup(codec, alc269_fixup_models,
9264 alc269_fixup_tbl, alc269_fixups);
9265 /* FIXME: both TX300 and ROG Strix G17 have the same SSID, and
9266 * the quirk breaks the latter (bko#214101).
9267 * Clear the wrong entry.
9268 */
9269 if (codec->fixup_id == ALC282_FIXUP_ASUS_TX300 &&
9270 codec->core.vendor_id == 0x10ec0294) {
9271 codec_dbg(codec, "Clear wrong fixup for ASUS ROG Strix G17\n");
9272 codec->fixup_id = HDA_FIXUP_ID_NOT_SET;
9273 }
9274
9275 snd_hda_pick_pin_fixup(codec, alc269_pin_fixup_tbl, alc269_fixups, true);
9276 snd_hda_pick_pin_fixup(codec, alc269_fallback_pin_fixup_tbl, alc269_fixups, false);
9277 snd_hda_pick_fixup(codec, NULL, alc269_fixup_vendor_tbl,
9278 alc269_fixups);
9279
9280 /*
9281 * Check whether ACPI describes companion amplifiers that require
9282 * component binding
9283 */
9284 find_cirrus_companion_amps(codec);
9285
9286 snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PRE_PROBE);
9287
9288 alc_auto_parse_customize_define(codec);
9289
9290 if (has_cdefine_beep(codec))
9291 spec->gen.beep_nid = 0x01;
9292
9293 /* automatic parse from the BIOS config */
9294 err = alc269_parse_auto_config(codec);
9295 if (err < 0)
9296 goto error;
9297
9298 if (!spec->gen.no_analog && spec->gen.beep_nid && spec->gen.mixer_nid) {
9299 err = set_beep_amp(spec, spec->gen.mixer_nid, 0x04, HDA_INPUT);
9300 if (err < 0)
9301 goto error;
9302 }
9303
9304 snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PROBE);
9305
9306 return 0;
9307
9308 error:
9309 alc269_remove(codec);
9310 return err;
9311 }
9312
9313 static const struct hda_codec_ops alc269_codec_ops = {
9314 .probe = alc269_probe,
9315 .remove = alc269_remove,
9316 .build_controls = alc_build_controls,
9317 .build_pcms = snd_hda_gen_build_pcms,
9318 .init = alc_init,
9319 .unsol_event = snd_hda_jack_unsol_event,
9320 .suspend = alc269_suspend,
9321 .resume = alc269_resume,
9322 .check_power_status = snd_hda_gen_check_power_status,
9323 .stream_pm = snd_hda_gen_stream_pm,
9324 };
9325
9326 /*
9327 * driver entries
9328 */
9329 static const struct hda_device_id snd_hda_id_alc269[] = {
9330 HDA_CODEC_ID(0x10ec0215, "ALC215"),
9331 HDA_CODEC_ID(0x10ec0221, "ALC221"),
9332 HDA_CODEC_ID(0x10ec0222, "ALC222"),
9333 HDA_CODEC_ID(0x10ec0225, "ALC225"),
9334 HDA_CODEC_ID(0x10ec0230, "ALC236"),
9335 HDA_CODEC_ID(0x10ec0231, "ALC231"),
9336 HDA_CODEC_ID(0x10ec0233, "ALC233"),
9337 HDA_CODEC_ID(0x10ec0234, "ALC234"),
9338 HDA_CODEC_ID(0x10ec0235, "ALC233"),
9339 HDA_CODEC_ID(0x10ec0236, "ALC236"),
9340 HDA_CODEC_ID(0x10ec0245, "ALC245"),
9341 HDA_CODEC_ID(0x10ec0255, "ALC255"),
9342 HDA_CODEC_ID(0x10ec0256, "ALC256"),
9343 HDA_CODEC_ID(0x10ec0257, "ALC257"),
9344 HDA_CODEC_ID(0x10ec0269, "ALC269"),
9345 HDA_CODEC_ID(0x10ec0270, "ALC270"),
9346 HDA_CODEC_ID(0x10ec0274, "ALC274"),
9347 HDA_CODEC_ID(0x10ec0275, "ALC275"),
9348 HDA_CODEC_ID(0x10ec0276, "ALC276"),
9349 HDA_CODEC_ID(0x10ec0280, "ALC280"),
9350 HDA_CODEC_ID(0x10ec0282, "ALC282"),
9351 HDA_CODEC_ID(0x10ec0283, "ALC283"),
9352 HDA_CODEC_ID(0x10ec0284, "ALC284"),
9353 HDA_CODEC_ID(0x10ec0285, "ALC285"),
9354 HDA_CODEC_ID(0x10ec0286, "ALC286"),
9355 HDA_CODEC_ID(0x10ec0287, "ALC287"),
9356 HDA_CODEC_ID(0x10ec0288, "ALC288"),
9357 HDA_CODEC_ID(0x10ec0289, "ALC289"),
9358 HDA_CODEC_ID(0x10ec0290, "ALC290"),
9359 HDA_CODEC_ID(0x10ec0292, "ALC292"),
9360 HDA_CODEC_ID(0x10ec0293, "ALC293"),
9361 HDA_CODEC_ID(0x10ec0294, "ALC294"),
9362 HDA_CODEC_ID(0x10ec0295, "ALC295"),
9363 HDA_CODEC_ID(0x10ec0298, "ALC298"),
9364 HDA_CODEC_ID(0x10ec0299, "ALC299"),
9365 HDA_CODEC_ID(0x10ec0300, "ALC300"),
9366 HDA_CODEC_ID(0x10ec0623, "ALC623"),
9367 HDA_CODEC_ID(0x10ec0700, "ALC700"),
9368 HDA_CODEC_ID(0x10ec0701, "ALC701"),
9369 HDA_CODEC_ID(0x10ec0703, "ALC703"),
9370 HDA_CODEC_ID(0x10ec0711, "ALC711"),
9371 HDA_CODEC_ID(0x19e58326, "HW8326"),
9372 {} /* terminator */
9373 };
9374 MODULE_DEVICE_TABLE(hdaudio, snd_hda_id_alc269);
9375
9376 MODULE_LICENSE("GPL");
9377 MODULE_DESCRIPTION("Realtek ALC269 and compatible HD-audio codecs");
9378 MODULE_IMPORT_NS("SND_HDA_CODEC_REALTEK");
9379 MODULE_IMPORT_NS("SND_HDA_SCODEC_COMPONENT");
9380
9381 static struct hda_codec_driver alc269_driver = {
9382 .id = snd_hda_id_alc269,
9383 .ops = &alc269_codec_ops,
9384 };
9385
9386 module_hda_codec_driver(alc269_driver);
9387