1 // SPDX-License-Identifier: GPL-2.0-or-later 2 /* 3 * Universal Interface for Intel High Definition Audio Codec 4 * 5 * HD audio interface patch for Realtek ALC codecs 6 * 7 * Copyright (c) 2004 Kailang Yang <kailang@realtek.com.tw> 8 * PeiSen Hou <pshou@realtek.com.tw> 9 * Takashi Iwai <tiwai@suse.de> 10 * Jonathan Woithe <jwoithe@just42.net> 11 */ 12 13 #include <linux/acpi.h> 14 #include <linux/cleanup.h> 15 #include <linux/init.h> 16 #include <linux/delay.h> 17 #include <linux/slab.h> 18 #include <linux/pci.h> 19 #include <linux/dmi.h> 20 #include <linux/module.h> 21 #include <linux/i2c.h> 22 #include <linux/input.h> 23 #include <linux/leds.h> 24 #include <linux/ctype.h> 25 #include <linux/spi/spi.h> 26 #include <sound/core.h> 27 #include <sound/jack.h> 28 #include <sound/hda_codec.h> 29 #include "hda_local.h" 30 #include "hda_auto_parser.h" 31 #include "hda_beep.h" 32 #include "hda_jack.h" 33 #include "hda_generic.h" 34 #include "hda_component.h" 35 36 /* keep halting ALC5505 DSP, for power saving */ 37 #define HALT_REALTEK_ALC5505 38 39 /* extra amp-initialization sequence types */ 40 enum { 41 ALC_INIT_UNDEFINED, 42 ALC_INIT_NONE, 43 ALC_INIT_DEFAULT, 44 }; 45 46 enum { 47 ALC_HEADSET_MODE_UNKNOWN, 48 ALC_HEADSET_MODE_UNPLUGGED, 49 ALC_HEADSET_MODE_HEADSET, 50 ALC_HEADSET_MODE_MIC, 51 ALC_HEADSET_MODE_HEADPHONE, 52 }; 53 54 enum { 55 ALC_HEADSET_TYPE_UNKNOWN, 56 ALC_HEADSET_TYPE_CTIA, 57 ALC_HEADSET_TYPE_OMTP, 58 }; 59 60 enum { 61 ALC_KEY_MICMUTE_INDEX, 62 }; 63 64 struct alc_customize_define { 65 unsigned int sku_cfg; 66 unsigned char port_connectivity; 67 unsigned char check_sum; 68 unsigned char customization; 69 unsigned char external_amp; 70 unsigned int enable_pcbeep:1; 71 unsigned int platform_type:1; 72 unsigned int swap:1; 73 unsigned int override:1; 74 unsigned int fixup:1; /* Means that this sku is set by driver, not read from hw */ 75 }; 76 77 struct alc_coef_led { 78 unsigned int idx; 79 unsigned int mask; 80 unsigned int on; 81 unsigned int off; 82 }; 83 84 struct alc_spec { 85 struct hda_gen_spec gen; /* must be at head */ 86 87 /* codec parameterization */ 88 struct alc_customize_define cdefine; 89 unsigned int parse_flags; /* flag for snd_hda_parse_pin_defcfg() */ 90 91 /* GPIO bits */ 92 unsigned int gpio_mask; 93 unsigned int gpio_dir; 94 unsigned int gpio_data; 95 bool gpio_write_delay; /* add a delay before writing gpio_data */ 96 97 /* mute LED for HP laptops, see vref_mute_led_set() */ 98 int mute_led_polarity; 99 int micmute_led_polarity; 100 hda_nid_t mute_led_nid; 101 hda_nid_t cap_mute_led_nid; 102 103 unsigned int gpio_mute_led_mask; 104 unsigned int gpio_mic_led_mask; 105 struct alc_coef_led mute_led_coef; 106 struct alc_coef_led mic_led_coef; 107 struct mutex coef_mutex; 108 109 hda_nid_t headset_mic_pin; 110 hda_nid_t headphone_mic_pin; 111 int current_headset_mode; 112 int current_headset_type; 113 114 /* hooks */ 115 void (*init_hook)(struct hda_codec *codec); 116 void (*power_hook)(struct hda_codec *codec); 117 void (*shutup)(struct hda_codec *codec); 118 119 int init_amp; 120 int codec_variant; /* flag for other variants */ 121 unsigned int has_alc5505_dsp:1; 122 unsigned int no_depop_delay:1; 123 unsigned int done_hp_init:1; 124 unsigned int no_shutup_pins:1; 125 unsigned int ultra_low_power:1; 126 unsigned int has_hs_key:1; 127 unsigned int no_internal_mic_pin:1; 128 unsigned int en_3kpull_low:1; 129 int num_speaker_amps; 130 131 /* for PLL fix */ 132 hda_nid_t pll_nid; 133 unsigned int pll_coef_idx, pll_coef_bit; 134 unsigned int coef0; 135 struct input_dev *kb_dev; 136 u8 alc_mute_keycode_map[1]; 137 138 /* component binding */ 139 struct hda_component_parent comps; 140 }; 141 142 /* 143 * COEF access helper functions 144 */ 145 146 static void coef_mutex_lock(struct hda_codec *codec) 147 { 148 struct alc_spec *spec = codec->spec; 149 150 snd_hda_power_up_pm(codec); 151 mutex_lock(&spec->coef_mutex); 152 } 153 154 static void coef_mutex_unlock(struct hda_codec *codec) 155 { 156 struct alc_spec *spec = codec->spec; 157 158 mutex_unlock(&spec->coef_mutex); 159 snd_hda_power_down_pm(codec); 160 } 161 162 static int __alc_read_coefex_idx(struct hda_codec *codec, hda_nid_t nid, 163 unsigned int coef_idx) 164 { 165 unsigned int val; 166 167 snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_COEF_INDEX, coef_idx); 168 val = snd_hda_codec_read(codec, nid, 0, AC_VERB_GET_PROC_COEF, 0); 169 return val; 170 } 171 172 static int alc_read_coefex_idx(struct hda_codec *codec, hda_nid_t nid, 173 unsigned int coef_idx) 174 { 175 unsigned int val; 176 177 coef_mutex_lock(codec); 178 val = __alc_read_coefex_idx(codec, nid, coef_idx); 179 coef_mutex_unlock(codec); 180 return val; 181 } 182 183 #define alc_read_coef_idx(codec, coef_idx) \ 184 alc_read_coefex_idx(codec, 0x20, coef_idx) 185 186 static void __alc_write_coefex_idx(struct hda_codec *codec, hda_nid_t nid, 187 unsigned int coef_idx, unsigned int coef_val) 188 { 189 snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_COEF_INDEX, coef_idx); 190 snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_PROC_COEF, coef_val); 191 } 192 193 static void alc_write_coefex_idx(struct hda_codec *codec, hda_nid_t nid, 194 unsigned int coef_idx, unsigned int coef_val) 195 { 196 coef_mutex_lock(codec); 197 __alc_write_coefex_idx(codec, nid, coef_idx, coef_val); 198 coef_mutex_unlock(codec); 199 } 200 201 #define alc_write_coef_idx(codec, coef_idx, coef_val) \ 202 alc_write_coefex_idx(codec, 0x20, coef_idx, coef_val) 203 204 static void __alc_update_coefex_idx(struct hda_codec *codec, hda_nid_t nid, 205 unsigned int coef_idx, unsigned int mask, 206 unsigned int bits_set) 207 { 208 unsigned int val = __alc_read_coefex_idx(codec, nid, coef_idx); 209 210 if (val != -1) 211 __alc_write_coefex_idx(codec, nid, coef_idx, 212 (val & ~mask) | bits_set); 213 } 214 215 static void alc_update_coefex_idx(struct hda_codec *codec, hda_nid_t nid, 216 unsigned int coef_idx, unsigned int mask, 217 unsigned int bits_set) 218 { 219 coef_mutex_lock(codec); 220 __alc_update_coefex_idx(codec, nid, coef_idx, mask, bits_set); 221 coef_mutex_unlock(codec); 222 } 223 224 #define alc_update_coef_idx(codec, coef_idx, mask, bits_set) \ 225 alc_update_coefex_idx(codec, 0x20, coef_idx, mask, bits_set) 226 227 /* a special bypass for COEF 0; read the cached value at the second time */ 228 static unsigned int alc_get_coef0(struct hda_codec *codec) 229 { 230 struct alc_spec *spec = codec->spec; 231 232 if (!spec->coef0) 233 spec->coef0 = alc_read_coef_idx(codec, 0); 234 return spec->coef0; 235 } 236 237 /* coef writes/updates batch */ 238 struct coef_fw { 239 unsigned char nid; 240 unsigned char idx; 241 unsigned short mask; 242 unsigned short val; 243 }; 244 245 #define UPDATE_COEFEX(_nid, _idx, _mask, _val) \ 246 { .nid = (_nid), .idx = (_idx), .mask = (_mask), .val = (_val) } 247 #define WRITE_COEFEX(_nid, _idx, _val) UPDATE_COEFEX(_nid, _idx, -1, _val) 248 #define WRITE_COEF(_idx, _val) WRITE_COEFEX(0x20, _idx, _val) 249 #define UPDATE_COEF(_idx, _mask, _val) UPDATE_COEFEX(0x20, _idx, _mask, _val) 250 251 static void alc_process_coef_fw(struct hda_codec *codec, 252 const struct coef_fw *fw) 253 { 254 coef_mutex_lock(codec); 255 for (; fw->nid; fw++) { 256 if (fw->mask == (unsigned short)-1) 257 __alc_write_coefex_idx(codec, fw->nid, fw->idx, fw->val); 258 else 259 __alc_update_coefex_idx(codec, fw->nid, fw->idx, 260 fw->mask, fw->val); 261 } 262 coef_mutex_unlock(codec); 263 } 264 265 /* 266 * GPIO setup tables, used in initialization 267 */ 268 269 /* Enable GPIO mask and set output */ 270 static void alc_setup_gpio(struct hda_codec *codec, unsigned int mask) 271 { 272 struct alc_spec *spec = codec->spec; 273 274 spec->gpio_mask |= mask; 275 spec->gpio_dir |= mask; 276 spec->gpio_data |= mask; 277 } 278 279 static void alc_write_gpio_data(struct hda_codec *codec) 280 { 281 struct alc_spec *spec = codec->spec; 282 283 snd_hda_codec_write(codec, 0x01, 0, AC_VERB_SET_GPIO_DATA, 284 spec->gpio_data); 285 } 286 287 static void alc_update_gpio_data(struct hda_codec *codec, unsigned int mask, 288 bool on) 289 { 290 struct alc_spec *spec = codec->spec; 291 unsigned int oldval = spec->gpio_data; 292 293 if (on) 294 spec->gpio_data |= mask; 295 else 296 spec->gpio_data &= ~mask; 297 if (oldval != spec->gpio_data) 298 alc_write_gpio_data(codec); 299 } 300 301 static void alc_write_gpio(struct hda_codec *codec) 302 { 303 struct alc_spec *spec = codec->spec; 304 305 if (!spec->gpio_mask) 306 return; 307 308 snd_hda_codec_write(codec, codec->core.afg, 0, 309 AC_VERB_SET_GPIO_MASK, spec->gpio_mask); 310 snd_hda_codec_write(codec, codec->core.afg, 0, 311 AC_VERB_SET_GPIO_DIRECTION, spec->gpio_dir); 312 if (spec->gpio_write_delay) 313 msleep(1); 314 alc_write_gpio_data(codec); 315 } 316 317 static void alc_fixup_gpio(struct hda_codec *codec, int action, 318 unsigned int mask) 319 { 320 if (action == HDA_FIXUP_ACT_PRE_PROBE) 321 alc_setup_gpio(codec, mask); 322 } 323 324 static void alc_fixup_gpio1(struct hda_codec *codec, 325 const struct hda_fixup *fix, int action) 326 { 327 alc_fixup_gpio(codec, action, 0x01); 328 } 329 330 static void alc_fixup_gpio2(struct hda_codec *codec, 331 const struct hda_fixup *fix, int action) 332 { 333 alc_fixup_gpio(codec, action, 0x02); 334 } 335 336 static void alc_fixup_gpio3(struct hda_codec *codec, 337 const struct hda_fixup *fix, int action) 338 { 339 alc_fixup_gpio(codec, action, 0x03); 340 } 341 342 static void alc_fixup_gpio4(struct hda_codec *codec, 343 const struct hda_fixup *fix, int action) 344 { 345 alc_fixup_gpio(codec, action, 0x04); 346 } 347 348 static void alc_fixup_micmute_led(struct hda_codec *codec, 349 const struct hda_fixup *fix, int action) 350 { 351 if (action == HDA_FIXUP_ACT_PRE_PROBE) 352 snd_hda_gen_add_micmute_led_cdev(codec, NULL); 353 } 354 355 /* 356 * Fix hardware PLL issue 357 * On some codecs, the analog PLL gating control must be off while 358 * the default value is 1. 359 */ 360 static void alc_fix_pll(struct hda_codec *codec) 361 { 362 struct alc_spec *spec = codec->spec; 363 364 if (spec->pll_nid) 365 alc_update_coefex_idx(codec, spec->pll_nid, spec->pll_coef_idx, 366 1 << spec->pll_coef_bit, 0); 367 } 368 369 static void alc_fix_pll_init(struct hda_codec *codec, hda_nid_t nid, 370 unsigned int coef_idx, unsigned int coef_bit) 371 { 372 struct alc_spec *spec = codec->spec; 373 spec->pll_nid = nid; 374 spec->pll_coef_idx = coef_idx; 375 spec->pll_coef_bit = coef_bit; 376 alc_fix_pll(codec); 377 } 378 379 /* update the master volume per volume-knob's unsol event */ 380 static void alc_update_knob_master(struct hda_codec *codec, 381 struct hda_jack_callback *jack) 382 { 383 unsigned int val; 384 struct snd_kcontrol *kctl; 385 struct snd_ctl_elem_value *uctl; 386 387 kctl = snd_hda_find_mixer_ctl(codec, "Master Playback Volume"); 388 if (!kctl) 389 return; 390 uctl = kzalloc(sizeof(*uctl), GFP_KERNEL); 391 if (!uctl) 392 return; 393 val = snd_hda_codec_read(codec, jack->nid, 0, 394 AC_VERB_GET_VOLUME_KNOB_CONTROL, 0); 395 val &= HDA_AMP_VOLMASK; 396 uctl->value.integer.value[0] = val; 397 uctl->value.integer.value[1] = val; 398 kctl->put(kctl, uctl); 399 kfree(uctl); 400 } 401 402 static void alc880_unsol_event(struct hda_codec *codec, unsigned int res) 403 { 404 /* For some reason, the res given from ALC880 is broken. 405 Here we adjust it properly. */ 406 snd_hda_jack_unsol_event(codec, res >> 2); 407 } 408 409 /* Change EAPD to verb control */ 410 static void alc_fill_eapd_coef(struct hda_codec *codec) 411 { 412 int coef; 413 414 coef = alc_get_coef0(codec); 415 416 switch (codec->core.vendor_id) { 417 case 0x10ec0262: 418 alc_update_coef_idx(codec, 0x7, 0, 1<<5); 419 break; 420 case 0x10ec0267: 421 case 0x10ec0268: 422 alc_update_coef_idx(codec, 0x7, 0, 1<<13); 423 break; 424 case 0x10ec0269: 425 if ((coef & 0x00f0) == 0x0010) 426 alc_update_coef_idx(codec, 0xd, 0, 1<<14); 427 if ((coef & 0x00f0) == 0x0020) 428 alc_update_coef_idx(codec, 0x4, 1<<15, 0); 429 if ((coef & 0x00f0) == 0x0030) 430 alc_update_coef_idx(codec, 0x10, 1<<9, 0); 431 break; 432 case 0x10ec0280: 433 case 0x10ec0284: 434 case 0x10ec0290: 435 case 0x10ec0292: 436 alc_update_coef_idx(codec, 0x4, 1<<15, 0); 437 break; 438 case 0x10ec0225: 439 case 0x10ec0295: 440 case 0x10ec0299: 441 alc_update_coef_idx(codec, 0x67, 0xf000, 0x3000); 442 fallthrough; 443 case 0x10ec0215: 444 case 0x10ec0236: 445 case 0x10ec0245: 446 case 0x10ec0256: 447 case 0x10ec0257: 448 case 0x10ec0285: 449 case 0x10ec0289: 450 alc_update_coef_idx(codec, 0x36, 1<<13, 0); 451 fallthrough; 452 case 0x10ec0230: 453 case 0x10ec0233: 454 case 0x10ec0235: 455 case 0x10ec0255: 456 case 0x19e58326: 457 case 0x10ec0282: 458 case 0x10ec0283: 459 case 0x10ec0286: 460 case 0x10ec0288: 461 case 0x10ec0298: 462 case 0x10ec0300: 463 alc_update_coef_idx(codec, 0x10, 1<<9, 0); 464 break; 465 case 0x10ec0275: 466 alc_update_coef_idx(codec, 0xe, 0, 1<<0); 467 break; 468 case 0x10ec0287: 469 alc_update_coef_idx(codec, 0x10, 1<<9, 0); 470 alc_write_coef_idx(codec, 0x8, 0x4ab7); 471 break; 472 case 0x10ec0293: 473 alc_update_coef_idx(codec, 0xa, 1<<13, 0); 474 break; 475 case 0x10ec0234: 476 case 0x10ec0274: 477 alc_write_coef_idx(codec, 0x6e, 0x0c25); 478 fallthrough; 479 case 0x10ec0294: 480 case 0x10ec0700: 481 case 0x10ec0701: 482 case 0x10ec0703: 483 case 0x10ec0711: 484 alc_update_coef_idx(codec, 0x10, 1<<15, 0); 485 break; 486 case 0x10ec0662: 487 if ((coef & 0x00f0) == 0x0030) 488 alc_update_coef_idx(codec, 0x4, 1<<10, 0); /* EAPD Ctrl */ 489 break; 490 case 0x10ec0272: 491 case 0x10ec0273: 492 case 0x10ec0663: 493 case 0x10ec0665: 494 case 0x10ec0670: 495 case 0x10ec0671: 496 case 0x10ec0672: 497 alc_update_coef_idx(codec, 0xd, 0, 1<<14); /* EAPD Ctrl */ 498 break; 499 case 0x10ec0222: 500 case 0x10ec0623: 501 alc_update_coef_idx(codec, 0x19, 1<<13, 0); 502 break; 503 case 0x10ec0668: 504 alc_update_coef_idx(codec, 0x7, 3<<13, 0); 505 break; 506 case 0x10ec0867: 507 alc_update_coef_idx(codec, 0x4, 1<<10, 0); 508 break; 509 case 0x10ec0888: 510 if ((coef & 0x00f0) == 0x0020 || (coef & 0x00f0) == 0x0030) 511 alc_update_coef_idx(codec, 0x7, 1<<5, 0); 512 break; 513 case 0x10ec0892: 514 case 0x10ec0897: 515 alc_update_coef_idx(codec, 0x7, 1<<5, 0); 516 break; 517 case 0x10ec0899: 518 case 0x10ec0900: 519 case 0x10ec0b00: 520 case 0x10ec1168: 521 case 0x10ec1220: 522 alc_update_coef_idx(codec, 0x7, 1<<1, 0); 523 break; 524 } 525 } 526 527 /* additional initialization for ALC888 variants */ 528 static void alc888_coef_init(struct hda_codec *codec) 529 { 530 switch (alc_get_coef0(codec) & 0x00f0) { 531 /* alc888-VA */ 532 case 0x00: 533 /* alc888-VB */ 534 case 0x10: 535 alc_update_coef_idx(codec, 7, 0, 0x2030); /* Turn EAPD to High */ 536 break; 537 } 538 } 539 540 /* turn on/off EAPD control (only if available) */ 541 static void set_eapd(struct hda_codec *codec, hda_nid_t nid, int on) 542 { 543 if (get_wcaps_type(get_wcaps(codec, nid)) != AC_WID_PIN) 544 return; 545 if (snd_hda_query_pin_caps(codec, nid) & AC_PINCAP_EAPD) 546 snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_EAPD_BTLENABLE, 547 on ? 2 : 0); 548 } 549 550 /* turn on/off EAPD controls of the codec */ 551 static void alc_auto_setup_eapd(struct hda_codec *codec, bool on) 552 { 553 /* We currently only handle front, HP */ 554 static const hda_nid_t pins[] = { 555 0x0f, 0x10, 0x14, 0x15, 0x17, 0 556 }; 557 const hda_nid_t *p; 558 for (p = pins; *p; p++) 559 set_eapd(codec, *p, on); 560 } 561 562 static int find_ext_mic_pin(struct hda_codec *codec); 563 564 static void alc_headset_mic_no_shutup(struct hda_codec *codec) 565 { 566 const struct hda_pincfg *pin; 567 int mic_pin = find_ext_mic_pin(codec); 568 int i; 569 570 /* don't shut up pins when unloading the driver; otherwise it breaks 571 * the default pin setup at the next load of the driver 572 */ 573 if (codec->bus->shutdown) 574 return; 575 576 snd_array_for_each(&codec->init_pins, i, pin) { 577 /* use read here for syncing after issuing each verb */ 578 if (pin->nid != mic_pin) 579 snd_hda_codec_read(codec, pin->nid, 0, 580 AC_VERB_SET_PIN_WIDGET_CONTROL, 0); 581 } 582 583 codec->pins_shutup = 1; 584 } 585 586 static void alc_shutup_pins(struct hda_codec *codec) 587 { 588 struct alc_spec *spec = codec->spec; 589 590 if (spec->no_shutup_pins) 591 return; 592 593 switch (codec->core.vendor_id) { 594 case 0x10ec0236: 595 case 0x10ec0256: 596 case 0x10ec0257: 597 case 0x19e58326: 598 case 0x10ec0283: 599 case 0x10ec0285: 600 case 0x10ec0286: 601 case 0x10ec0287: 602 case 0x10ec0288: 603 case 0x10ec0295: 604 case 0x10ec0298: 605 alc_headset_mic_no_shutup(codec); 606 break; 607 default: 608 snd_hda_shutup_pins(codec); 609 break; 610 } 611 } 612 613 /* generic shutup callback; 614 * just turning off EAPD and a little pause for avoiding pop-noise 615 */ 616 static void alc_eapd_shutup(struct hda_codec *codec) 617 { 618 struct alc_spec *spec = codec->spec; 619 620 alc_auto_setup_eapd(codec, false); 621 if (!spec->no_depop_delay) 622 msleep(200); 623 alc_shutup_pins(codec); 624 } 625 626 /* generic EAPD initialization */ 627 static void alc_auto_init_amp(struct hda_codec *codec, int type) 628 { 629 alc_auto_setup_eapd(codec, true); 630 alc_write_gpio(codec); 631 switch (type) { 632 case ALC_INIT_DEFAULT: 633 switch (codec->core.vendor_id) { 634 case 0x10ec0260: 635 alc_update_coefex_idx(codec, 0x1a, 7, 0, 0x2010); 636 break; 637 case 0x10ec0880: 638 case 0x10ec0882: 639 case 0x10ec0883: 640 case 0x10ec0885: 641 alc_update_coef_idx(codec, 7, 0, 0x2030); 642 break; 643 case 0x10ec0888: 644 alc888_coef_init(codec); 645 break; 646 } 647 break; 648 } 649 } 650 651 /* get a primary headphone pin if available */ 652 static hda_nid_t alc_get_hp_pin(struct alc_spec *spec) 653 { 654 if (spec->gen.autocfg.hp_pins[0]) 655 return spec->gen.autocfg.hp_pins[0]; 656 if (spec->gen.autocfg.line_out_type == AC_JACK_HP_OUT) 657 return spec->gen.autocfg.line_out_pins[0]; 658 return 0; 659 } 660 661 /* 662 * Realtek SSID verification 663 */ 664 665 /* Could be any non-zero and even value. When used as fixup, tells 666 * the driver to ignore any present sku defines. 667 */ 668 #define ALC_FIXUP_SKU_IGNORE (2) 669 670 static void alc_fixup_sku_ignore(struct hda_codec *codec, 671 const struct hda_fixup *fix, int action) 672 { 673 struct alc_spec *spec = codec->spec; 674 if (action == HDA_FIXUP_ACT_PRE_PROBE) { 675 spec->cdefine.fixup = 1; 676 spec->cdefine.sku_cfg = ALC_FIXUP_SKU_IGNORE; 677 } 678 } 679 680 static void alc_fixup_no_depop_delay(struct hda_codec *codec, 681 const struct hda_fixup *fix, int action) 682 { 683 struct alc_spec *spec = codec->spec; 684 685 if (action == HDA_FIXUP_ACT_PROBE) { 686 spec->no_depop_delay = 1; 687 codec->depop_delay = 0; 688 } 689 } 690 691 static int alc_auto_parse_customize_define(struct hda_codec *codec) 692 { 693 unsigned int ass, tmp, i; 694 unsigned nid = 0; 695 struct alc_spec *spec = codec->spec; 696 697 spec->cdefine.enable_pcbeep = 1; /* assume always enabled */ 698 699 if (spec->cdefine.fixup) { 700 ass = spec->cdefine.sku_cfg; 701 if (ass == ALC_FIXUP_SKU_IGNORE) 702 return -1; 703 goto do_sku; 704 } 705 706 if (!codec->bus->pci) 707 return -1; 708 ass = codec->core.subsystem_id & 0xffff; 709 if (ass != codec->bus->pci->subsystem_device && (ass & 1)) 710 goto do_sku; 711 712 nid = 0x1d; 713 if (codec->core.vendor_id == 0x10ec0260) 714 nid = 0x17; 715 ass = snd_hda_codec_get_pincfg(codec, nid); 716 717 if (!(ass & 1)) { 718 codec_info(codec, "%s: SKU not ready 0x%08x\n", 719 codec->core.chip_name, ass); 720 return -1; 721 } 722 723 /* check sum */ 724 tmp = 0; 725 for (i = 1; i < 16; i++) { 726 if ((ass >> i) & 1) 727 tmp++; 728 } 729 if (((ass >> 16) & 0xf) != tmp) 730 return -1; 731 732 spec->cdefine.port_connectivity = ass >> 30; 733 spec->cdefine.enable_pcbeep = (ass & 0x100000) >> 20; 734 spec->cdefine.check_sum = (ass >> 16) & 0xf; 735 spec->cdefine.customization = ass >> 8; 736 do_sku: 737 spec->cdefine.sku_cfg = ass; 738 spec->cdefine.external_amp = (ass & 0x38) >> 3; 739 spec->cdefine.platform_type = (ass & 0x4) >> 2; 740 spec->cdefine.swap = (ass & 0x2) >> 1; 741 spec->cdefine.override = ass & 0x1; 742 743 codec_dbg(codec, "SKU: Nid=0x%x sku_cfg=0x%08x\n", 744 nid, spec->cdefine.sku_cfg); 745 codec_dbg(codec, "SKU: port_connectivity=0x%x\n", 746 spec->cdefine.port_connectivity); 747 codec_dbg(codec, "SKU: enable_pcbeep=0x%x\n", spec->cdefine.enable_pcbeep); 748 codec_dbg(codec, "SKU: check_sum=0x%08x\n", spec->cdefine.check_sum); 749 codec_dbg(codec, "SKU: customization=0x%08x\n", spec->cdefine.customization); 750 codec_dbg(codec, "SKU: external_amp=0x%x\n", spec->cdefine.external_amp); 751 codec_dbg(codec, "SKU: platform_type=0x%x\n", spec->cdefine.platform_type); 752 codec_dbg(codec, "SKU: swap=0x%x\n", spec->cdefine.swap); 753 codec_dbg(codec, "SKU: override=0x%x\n", spec->cdefine.override); 754 755 return 0; 756 } 757 758 /* return the position of NID in the list, or -1 if not found */ 759 static int find_idx_in_nid_list(hda_nid_t nid, const hda_nid_t *list, int nums) 760 { 761 int i; 762 for (i = 0; i < nums; i++) 763 if (list[i] == nid) 764 return i; 765 return -1; 766 } 767 /* return true if the given NID is found in the list */ 768 static bool found_in_nid_list(hda_nid_t nid, const hda_nid_t *list, int nums) 769 { 770 return find_idx_in_nid_list(nid, list, nums) >= 0; 771 } 772 773 /* check subsystem ID and set up device-specific initialization; 774 * return 1 if initialized, 0 if invalid SSID 775 */ 776 /* 32-bit subsystem ID for BIOS loading in HD Audio codec. 777 * 31 ~ 16 : Manufacture ID 778 * 15 ~ 8 : SKU ID 779 * 7 ~ 0 : Assembly ID 780 * port-A --> pin 39/41, port-E --> pin 14/15, port-D --> pin 35/36 781 */ 782 static int alc_subsystem_id(struct hda_codec *codec, const hda_nid_t *ports) 783 { 784 unsigned int ass, tmp, i; 785 unsigned nid; 786 struct alc_spec *spec = codec->spec; 787 788 if (spec->cdefine.fixup) { 789 ass = spec->cdefine.sku_cfg; 790 if (ass == ALC_FIXUP_SKU_IGNORE) 791 return 0; 792 goto do_sku; 793 } 794 795 ass = codec->core.subsystem_id & 0xffff; 796 if (codec->bus->pci && 797 ass != codec->bus->pci->subsystem_device && (ass & 1)) 798 goto do_sku; 799 800 /* invalid SSID, check the special NID pin defcfg instead */ 801 /* 802 * 31~30 : port connectivity 803 * 29~21 : reserve 804 * 20 : PCBEEP input 805 * 19~16 : Check sum (15:1) 806 * 15~1 : Custom 807 * 0 : override 808 */ 809 nid = 0x1d; 810 if (codec->core.vendor_id == 0x10ec0260) 811 nid = 0x17; 812 ass = snd_hda_codec_get_pincfg(codec, nid); 813 codec_dbg(codec, 814 "realtek: No valid SSID, checking pincfg 0x%08x for NID 0x%x\n", 815 ass, nid); 816 if (!(ass & 1)) 817 return 0; 818 if ((ass >> 30) != 1) /* no physical connection */ 819 return 0; 820 821 /* check sum */ 822 tmp = 0; 823 for (i = 1; i < 16; i++) { 824 if ((ass >> i) & 1) 825 tmp++; 826 } 827 if (((ass >> 16) & 0xf) != tmp) 828 return 0; 829 do_sku: 830 codec_dbg(codec, "realtek: Enabling init ASM_ID=0x%04x CODEC_ID=%08x\n", 831 ass & 0xffff, codec->core.vendor_id); 832 /* 833 * 0 : override 834 * 1 : Swap Jack 835 * 2 : 0 --> Desktop, 1 --> Laptop 836 * 3~5 : External Amplifier control 837 * 7~6 : Reserved 838 */ 839 tmp = (ass & 0x38) >> 3; /* external Amp control */ 840 if (spec->init_amp == ALC_INIT_UNDEFINED) { 841 switch (tmp) { 842 case 1: 843 alc_setup_gpio(codec, 0x01); 844 break; 845 case 3: 846 alc_setup_gpio(codec, 0x02); 847 break; 848 case 7: 849 alc_setup_gpio(codec, 0x04); 850 break; 851 case 5: 852 default: 853 spec->init_amp = ALC_INIT_DEFAULT; 854 break; 855 } 856 } 857 858 /* is laptop or Desktop and enable the function "Mute internal speaker 859 * when the external headphone out jack is plugged" 860 */ 861 if (!(ass & 0x8000)) 862 return 1; 863 /* 864 * 10~8 : Jack location 865 * 12~11: Headphone out -> 00: PortA, 01: PortE, 02: PortD, 03: Resvered 866 * 14~13: Resvered 867 * 15 : 1 --> enable the function "Mute internal speaker 868 * when the external headphone out jack is plugged" 869 */ 870 if (!alc_get_hp_pin(spec)) { 871 hda_nid_t nid; 872 tmp = (ass >> 11) & 0x3; /* HP to chassis */ 873 nid = ports[tmp]; 874 if (found_in_nid_list(nid, spec->gen.autocfg.line_out_pins, 875 spec->gen.autocfg.line_outs)) 876 return 1; 877 spec->gen.autocfg.hp_pins[0] = nid; 878 } 879 return 1; 880 } 881 882 /* Check the validity of ALC subsystem-id 883 * ports contains an array of 4 pin NIDs for port-A, E, D and I */ 884 static void alc_ssid_check(struct hda_codec *codec, const hda_nid_t *ports) 885 { 886 if (!alc_subsystem_id(codec, ports)) { 887 struct alc_spec *spec = codec->spec; 888 if (spec->init_amp == ALC_INIT_UNDEFINED) { 889 codec_dbg(codec, 890 "realtek: Enable default setup for auto mode as fallback\n"); 891 spec->init_amp = ALC_INIT_DEFAULT; 892 } 893 } 894 } 895 896 /* inverted digital-mic */ 897 static void alc_fixup_inv_dmic(struct hda_codec *codec, 898 const struct hda_fixup *fix, int action) 899 { 900 struct alc_spec *spec = codec->spec; 901 902 spec->gen.inv_dmic_split = 1; 903 } 904 905 906 static int alc_build_controls(struct hda_codec *codec) 907 { 908 int err; 909 910 err = snd_hda_gen_build_controls(codec); 911 if (err < 0) 912 return err; 913 914 snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_BUILD); 915 return 0; 916 } 917 918 919 /* 920 * Common callbacks 921 */ 922 923 static void alc_pre_init(struct hda_codec *codec) 924 { 925 alc_fill_eapd_coef(codec); 926 } 927 928 #define is_s3_resume(codec) \ 929 ((codec)->core.dev.power.power_state.event == PM_EVENT_RESUME) 930 #define is_s4_resume(codec) \ 931 ((codec)->core.dev.power.power_state.event == PM_EVENT_RESTORE) 932 #define is_s4_suspend(codec) \ 933 ((codec)->core.dev.power.power_state.event == PM_EVENT_FREEZE) 934 935 static int alc_init(struct hda_codec *codec) 936 { 937 struct alc_spec *spec = codec->spec; 938 939 /* hibernation resume needs the full chip initialization */ 940 if (is_s4_resume(codec)) 941 alc_pre_init(codec); 942 943 if (spec->init_hook) 944 spec->init_hook(codec); 945 946 spec->gen.skip_verbs = 1; /* applied in below */ 947 snd_hda_gen_init(codec); 948 alc_fix_pll(codec); 949 alc_auto_init_amp(codec, spec->init_amp); 950 snd_hda_apply_verbs(codec); /* apply verbs here after own init */ 951 952 snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_INIT); 953 954 return 0; 955 } 956 957 /* forward declaration */ 958 static const struct component_master_ops comp_master_ops; 959 960 static void alc_free(struct hda_codec *codec) 961 { 962 struct alc_spec *spec = codec->spec; 963 964 if (spec) 965 hda_component_manager_free(&spec->comps, &comp_master_ops); 966 967 snd_hda_gen_free(codec); 968 } 969 970 static inline void alc_shutup(struct hda_codec *codec) 971 { 972 struct alc_spec *spec = codec->spec; 973 974 if (!snd_hda_get_bool_hint(codec, "shutup")) 975 return; /* disabled explicitly by hints */ 976 977 if (spec && spec->shutup) 978 spec->shutup(codec); 979 else 980 alc_shutup_pins(codec); 981 } 982 983 static void alc_power_eapd(struct hda_codec *codec) 984 { 985 alc_auto_setup_eapd(codec, false); 986 } 987 988 static int alc_suspend(struct hda_codec *codec) 989 { 990 struct alc_spec *spec = codec->spec; 991 alc_shutup(codec); 992 if (spec && spec->power_hook) 993 spec->power_hook(codec); 994 return 0; 995 } 996 997 static int alc_resume(struct hda_codec *codec) 998 { 999 struct alc_spec *spec = codec->spec; 1000 1001 if (!spec->no_depop_delay) 1002 msleep(150); /* to avoid pop noise */ 1003 codec->patch_ops.init(codec); 1004 snd_hda_regmap_sync(codec); 1005 hda_call_check_power_status(codec, 0x01); 1006 return 0; 1007 } 1008 1009 /* 1010 */ 1011 static const struct hda_codec_ops alc_patch_ops = { 1012 .build_controls = alc_build_controls, 1013 .build_pcms = snd_hda_gen_build_pcms, 1014 .init = alc_init, 1015 .free = alc_free, 1016 .unsol_event = snd_hda_jack_unsol_event, 1017 .resume = alc_resume, 1018 .suspend = alc_suspend, 1019 .check_power_status = snd_hda_gen_check_power_status, 1020 }; 1021 1022 1023 #define alc_codec_rename(codec, name) snd_hda_codec_set_name(codec, name) 1024 1025 /* 1026 * Rename codecs appropriately from COEF value or subvendor id 1027 */ 1028 struct alc_codec_rename_table { 1029 unsigned int vendor_id; 1030 unsigned short coef_mask; 1031 unsigned short coef_bits; 1032 const char *name; 1033 }; 1034 1035 struct alc_codec_rename_pci_table { 1036 unsigned int codec_vendor_id; 1037 unsigned short pci_subvendor; 1038 unsigned short pci_subdevice; 1039 const char *name; 1040 }; 1041 1042 static const struct alc_codec_rename_table rename_tbl[] = { 1043 { 0x10ec0221, 0xf00f, 0x1003, "ALC231" }, 1044 { 0x10ec0269, 0xfff0, 0x3010, "ALC277" }, 1045 { 0x10ec0269, 0xf0f0, 0x2010, "ALC259" }, 1046 { 0x10ec0269, 0xf0f0, 0x3010, "ALC258" }, 1047 { 0x10ec0269, 0x00f0, 0x0010, "ALC269VB" }, 1048 { 0x10ec0269, 0xffff, 0xa023, "ALC259" }, 1049 { 0x10ec0269, 0xffff, 0x6023, "ALC281X" }, 1050 { 0x10ec0269, 0x00f0, 0x0020, "ALC269VC" }, 1051 { 0x10ec0269, 0x00f0, 0x0030, "ALC269VD" }, 1052 { 0x10ec0662, 0xffff, 0x4020, "ALC656" }, 1053 { 0x10ec0887, 0x00f0, 0x0030, "ALC887-VD" }, 1054 { 0x10ec0888, 0x00f0, 0x0030, "ALC888-VD" }, 1055 { 0x10ec0888, 0xf0f0, 0x3020, "ALC886" }, 1056 { 0x10ec0899, 0x2000, 0x2000, "ALC899" }, 1057 { 0x10ec0892, 0xffff, 0x8020, "ALC661" }, 1058 { 0x10ec0892, 0xffff, 0x8011, "ALC661" }, 1059 { 0x10ec0892, 0xffff, 0x4011, "ALC656" }, 1060 { } /* terminator */ 1061 }; 1062 1063 static const struct alc_codec_rename_pci_table rename_pci_tbl[] = { 1064 { 0x10ec0280, 0x1028, 0, "ALC3220" }, 1065 { 0x10ec0282, 0x1028, 0, "ALC3221" }, 1066 { 0x10ec0283, 0x1028, 0, "ALC3223" }, 1067 { 0x10ec0288, 0x1028, 0, "ALC3263" }, 1068 { 0x10ec0292, 0x1028, 0, "ALC3226" }, 1069 { 0x10ec0293, 0x1028, 0, "ALC3235" }, 1070 { 0x10ec0255, 0x1028, 0, "ALC3234" }, 1071 { 0x10ec0668, 0x1028, 0, "ALC3661" }, 1072 { 0x10ec0275, 0x1028, 0, "ALC3260" }, 1073 { 0x10ec0899, 0x1028, 0, "ALC3861" }, 1074 { 0x10ec0298, 0x1028, 0, "ALC3266" }, 1075 { 0x10ec0236, 0x1028, 0, "ALC3204" }, 1076 { 0x10ec0256, 0x1028, 0, "ALC3246" }, 1077 { 0x10ec0225, 0x1028, 0, "ALC3253" }, 1078 { 0x10ec0295, 0x1028, 0, "ALC3254" }, 1079 { 0x10ec0299, 0x1028, 0, "ALC3271" }, 1080 { 0x10ec0670, 0x1025, 0, "ALC669X" }, 1081 { 0x10ec0676, 0x1025, 0, "ALC679X" }, 1082 { 0x10ec0282, 0x1043, 0, "ALC3229" }, 1083 { 0x10ec0233, 0x1043, 0, "ALC3236" }, 1084 { 0x10ec0280, 0x103c, 0, "ALC3228" }, 1085 { 0x10ec0282, 0x103c, 0, "ALC3227" }, 1086 { 0x10ec0286, 0x103c, 0, "ALC3242" }, 1087 { 0x10ec0290, 0x103c, 0, "ALC3241" }, 1088 { 0x10ec0668, 0x103c, 0, "ALC3662" }, 1089 { 0x10ec0283, 0x17aa, 0, "ALC3239" }, 1090 { 0x10ec0292, 0x17aa, 0, "ALC3232" }, 1091 { } /* terminator */ 1092 }; 1093 1094 static int alc_codec_rename_from_preset(struct hda_codec *codec) 1095 { 1096 const struct alc_codec_rename_table *p; 1097 const struct alc_codec_rename_pci_table *q; 1098 1099 for (p = rename_tbl; p->vendor_id; p++) { 1100 if (p->vendor_id != codec->core.vendor_id) 1101 continue; 1102 if ((alc_get_coef0(codec) & p->coef_mask) == p->coef_bits) 1103 return alc_codec_rename(codec, p->name); 1104 } 1105 1106 if (!codec->bus->pci) 1107 return 0; 1108 for (q = rename_pci_tbl; q->codec_vendor_id; q++) { 1109 if (q->codec_vendor_id != codec->core.vendor_id) 1110 continue; 1111 if (q->pci_subvendor != codec->bus->pci->subsystem_vendor) 1112 continue; 1113 if (!q->pci_subdevice || 1114 q->pci_subdevice == codec->bus->pci->subsystem_device) 1115 return alc_codec_rename(codec, q->name); 1116 } 1117 1118 return 0; 1119 } 1120 1121 1122 /* 1123 * Digital-beep handlers 1124 */ 1125 #ifdef CONFIG_SND_HDA_INPUT_BEEP 1126 1127 /* additional beep mixers; private_value will be overwritten */ 1128 static const struct snd_kcontrol_new alc_beep_mixer[] = { 1129 HDA_CODEC_VOLUME("Beep Playback Volume", 0, 0, HDA_INPUT), 1130 HDA_CODEC_MUTE_BEEP("Beep Playback Switch", 0, 0, HDA_INPUT), 1131 }; 1132 1133 /* set up and create beep controls */ 1134 static int set_beep_amp(struct alc_spec *spec, hda_nid_t nid, 1135 int idx, int dir) 1136 { 1137 struct snd_kcontrol_new *knew; 1138 unsigned int beep_amp = HDA_COMPOSE_AMP_VAL(nid, 3, idx, dir); 1139 int i; 1140 1141 for (i = 0; i < ARRAY_SIZE(alc_beep_mixer); i++) { 1142 knew = snd_hda_gen_add_kctl(&spec->gen, NULL, 1143 &alc_beep_mixer[i]); 1144 if (!knew) 1145 return -ENOMEM; 1146 knew->private_value = beep_amp; 1147 } 1148 return 0; 1149 } 1150 1151 static const struct snd_pci_quirk beep_allow_list[] = { 1152 SND_PCI_QUIRK(0x1043, 0x103c, "ASUS", 1), 1153 SND_PCI_QUIRK(0x1043, 0x115d, "ASUS", 1), 1154 SND_PCI_QUIRK(0x1043, 0x829f, "ASUS", 1), 1155 SND_PCI_QUIRK(0x1043, 0x8376, "EeePC", 1), 1156 SND_PCI_QUIRK(0x1043, 0x83ce, "EeePC", 1), 1157 SND_PCI_QUIRK(0x1043, 0x831a, "EeePC", 1), 1158 SND_PCI_QUIRK(0x1043, 0x834a, "EeePC", 1), 1159 SND_PCI_QUIRK(0x1458, 0xa002, "GA-MA790X", 1), 1160 SND_PCI_QUIRK(0x8086, 0xd613, "Intel", 1), 1161 /* denylist -- no beep available */ 1162 SND_PCI_QUIRK(0x17aa, 0x309e, "Lenovo ThinkCentre M73", 0), 1163 SND_PCI_QUIRK(0x17aa, 0x30a3, "Lenovo ThinkCentre M93", 0), 1164 {} 1165 }; 1166 1167 static inline int has_cdefine_beep(struct hda_codec *codec) 1168 { 1169 struct alc_spec *spec = codec->spec; 1170 const struct snd_pci_quirk *q; 1171 q = snd_pci_quirk_lookup(codec->bus->pci, beep_allow_list); 1172 if (q) 1173 return q->value; 1174 return spec->cdefine.enable_pcbeep; 1175 } 1176 #else 1177 #define set_beep_amp(spec, nid, idx, dir) 0 1178 #define has_cdefine_beep(codec) 0 1179 #endif 1180 1181 /* parse the BIOS configuration and set up the alc_spec */ 1182 /* return 1 if successful, 0 if the proper config is not found, 1183 * or a negative error code 1184 */ 1185 static int alc_parse_auto_config(struct hda_codec *codec, 1186 const hda_nid_t *ignore_nids, 1187 const hda_nid_t *ssid_nids) 1188 { 1189 struct alc_spec *spec = codec->spec; 1190 struct auto_pin_cfg *cfg = &spec->gen.autocfg; 1191 int err; 1192 1193 err = snd_hda_parse_pin_defcfg(codec, cfg, ignore_nids, 1194 spec->parse_flags); 1195 if (err < 0) 1196 return err; 1197 1198 if (ssid_nids) 1199 alc_ssid_check(codec, ssid_nids); 1200 1201 err = snd_hda_gen_parse_auto_config(codec, cfg); 1202 if (err < 0) 1203 return err; 1204 1205 return 1; 1206 } 1207 1208 /* common preparation job for alc_spec */ 1209 static int alc_alloc_spec(struct hda_codec *codec, hda_nid_t mixer_nid) 1210 { 1211 struct alc_spec *spec = kzalloc(sizeof(*spec), GFP_KERNEL); 1212 int err; 1213 1214 if (!spec) 1215 return -ENOMEM; 1216 codec->spec = spec; 1217 snd_hda_gen_spec_init(&spec->gen); 1218 spec->gen.mixer_nid = mixer_nid; 1219 spec->gen.own_eapd_ctl = 1; 1220 codec->single_adc_amp = 1; 1221 /* FIXME: do we need this for all Realtek codec models? */ 1222 codec->spdif_status_reset = 1; 1223 codec->forced_resume = 1; 1224 codec->patch_ops = alc_patch_ops; 1225 mutex_init(&spec->coef_mutex); 1226 1227 err = alc_codec_rename_from_preset(codec); 1228 if (err < 0) { 1229 kfree(spec); 1230 return err; 1231 } 1232 return 0; 1233 } 1234 1235 static int alc880_parse_auto_config(struct hda_codec *codec) 1236 { 1237 static const hda_nid_t alc880_ignore[] = { 0x1d, 0 }; 1238 static const hda_nid_t alc880_ssids[] = { 0x15, 0x1b, 0x14, 0 }; 1239 return alc_parse_auto_config(codec, alc880_ignore, alc880_ssids); 1240 } 1241 1242 /* 1243 * ALC880 fix-ups 1244 */ 1245 enum { 1246 ALC880_FIXUP_GPIO1, 1247 ALC880_FIXUP_GPIO2, 1248 ALC880_FIXUP_MEDION_RIM, 1249 ALC880_FIXUP_LG, 1250 ALC880_FIXUP_LG_LW25, 1251 ALC880_FIXUP_W810, 1252 ALC880_FIXUP_EAPD_COEF, 1253 ALC880_FIXUP_TCL_S700, 1254 ALC880_FIXUP_VOL_KNOB, 1255 ALC880_FIXUP_FUJITSU, 1256 ALC880_FIXUP_F1734, 1257 ALC880_FIXUP_UNIWILL, 1258 ALC880_FIXUP_UNIWILL_DIG, 1259 ALC880_FIXUP_Z71V, 1260 ALC880_FIXUP_ASUS_W5A, 1261 ALC880_FIXUP_3ST_BASE, 1262 ALC880_FIXUP_3ST, 1263 ALC880_FIXUP_3ST_DIG, 1264 ALC880_FIXUP_5ST_BASE, 1265 ALC880_FIXUP_5ST, 1266 ALC880_FIXUP_5ST_DIG, 1267 ALC880_FIXUP_6ST_BASE, 1268 ALC880_FIXUP_6ST, 1269 ALC880_FIXUP_6ST_DIG, 1270 ALC880_FIXUP_6ST_AUTOMUTE, 1271 }; 1272 1273 /* enable the volume-knob widget support on NID 0x21 */ 1274 static void alc880_fixup_vol_knob(struct hda_codec *codec, 1275 const struct hda_fixup *fix, int action) 1276 { 1277 if (action == HDA_FIXUP_ACT_PROBE) 1278 snd_hda_jack_detect_enable_callback(codec, 0x21, 1279 alc_update_knob_master); 1280 } 1281 1282 static const struct hda_fixup alc880_fixups[] = { 1283 [ALC880_FIXUP_GPIO1] = { 1284 .type = HDA_FIXUP_FUNC, 1285 .v.func = alc_fixup_gpio1, 1286 }, 1287 [ALC880_FIXUP_GPIO2] = { 1288 .type = HDA_FIXUP_FUNC, 1289 .v.func = alc_fixup_gpio2, 1290 }, 1291 [ALC880_FIXUP_MEDION_RIM] = { 1292 .type = HDA_FIXUP_VERBS, 1293 .v.verbs = (const struct hda_verb[]) { 1294 { 0x20, AC_VERB_SET_COEF_INDEX, 0x07 }, 1295 { 0x20, AC_VERB_SET_PROC_COEF, 0x3060 }, 1296 { } 1297 }, 1298 .chained = true, 1299 .chain_id = ALC880_FIXUP_GPIO2, 1300 }, 1301 [ALC880_FIXUP_LG] = { 1302 .type = HDA_FIXUP_PINS, 1303 .v.pins = (const struct hda_pintbl[]) { 1304 /* disable bogus unused pins */ 1305 { 0x16, 0x411111f0 }, 1306 { 0x18, 0x411111f0 }, 1307 { 0x1a, 0x411111f0 }, 1308 { } 1309 } 1310 }, 1311 [ALC880_FIXUP_LG_LW25] = { 1312 .type = HDA_FIXUP_PINS, 1313 .v.pins = (const struct hda_pintbl[]) { 1314 { 0x1a, 0x0181344f }, /* line-in */ 1315 { 0x1b, 0x0321403f }, /* headphone */ 1316 { } 1317 } 1318 }, 1319 [ALC880_FIXUP_W810] = { 1320 .type = HDA_FIXUP_PINS, 1321 .v.pins = (const struct hda_pintbl[]) { 1322 /* disable bogus unused pins */ 1323 { 0x17, 0x411111f0 }, 1324 { } 1325 }, 1326 .chained = true, 1327 .chain_id = ALC880_FIXUP_GPIO2, 1328 }, 1329 [ALC880_FIXUP_EAPD_COEF] = { 1330 .type = HDA_FIXUP_VERBS, 1331 .v.verbs = (const struct hda_verb[]) { 1332 /* change to EAPD mode */ 1333 { 0x20, AC_VERB_SET_COEF_INDEX, 0x07 }, 1334 { 0x20, AC_VERB_SET_PROC_COEF, 0x3060 }, 1335 {} 1336 }, 1337 }, 1338 [ALC880_FIXUP_TCL_S700] = { 1339 .type = HDA_FIXUP_VERBS, 1340 .v.verbs = (const struct hda_verb[]) { 1341 /* change to EAPD mode */ 1342 { 0x20, AC_VERB_SET_COEF_INDEX, 0x07 }, 1343 { 0x20, AC_VERB_SET_PROC_COEF, 0x3070 }, 1344 {} 1345 }, 1346 .chained = true, 1347 .chain_id = ALC880_FIXUP_GPIO2, 1348 }, 1349 [ALC880_FIXUP_VOL_KNOB] = { 1350 .type = HDA_FIXUP_FUNC, 1351 .v.func = alc880_fixup_vol_knob, 1352 }, 1353 [ALC880_FIXUP_FUJITSU] = { 1354 /* override all pins as BIOS on old Amilo is broken */ 1355 .type = HDA_FIXUP_PINS, 1356 .v.pins = (const struct hda_pintbl[]) { 1357 { 0x14, 0x0121401f }, /* HP */ 1358 { 0x15, 0x99030120 }, /* speaker */ 1359 { 0x16, 0x99030130 }, /* bass speaker */ 1360 { 0x17, 0x411111f0 }, /* N/A */ 1361 { 0x18, 0x411111f0 }, /* N/A */ 1362 { 0x19, 0x01a19950 }, /* mic-in */ 1363 { 0x1a, 0x411111f0 }, /* N/A */ 1364 { 0x1b, 0x411111f0 }, /* N/A */ 1365 { 0x1c, 0x411111f0 }, /* N/A */ 1366 { 0x1d, 0x411111f0 }, /* N/A */ 1367 { 0x1e, 0x01454140 }, /* SPDIF out */ 1368 { } 1369 }, 1370 .chained = true, 1371 .chain_id = ALC880_FIXUP_VOL_KNOB, 1372 }, 1373 [ALC880_FIXUP_F1734] = { 1374 /* almost compatible with FUJITSU, but no bass and SPDIF */ 1375 .type = HDA_FIXUP_PINS, 1376 .v.pins = (const struct hda_pintbl[]) { 1377 { 0x14, 0x0121401f }, /* HP */ 1378 { 0x15, 0x99030120 }, /* speaker */ 1379 { 0x16, 0x411111f0 }, /* N/A */ 1380 { 0x17, 0x411111f0 }, /* N/A */ 1381 { 0x18, 0x411111f0 }, /* N/A */ 1382 { 0x19, 0x01a19950 }, /* mic-in */ 1383 { 0x1a, 0x411111f0 }, /* N/A */ 1384 { 0x1b, 0x411111f0 }, /* N/A */ 1385 { 0x1c, 0x411111f0 }, /* N/A */ 1386 { 0x1d, 0x411111f0 }, /* N/A */ 1387 { 0x1e, 0x411111f0 }, /* N/A */ 1388 { } 1389 }, 1390 .chained = true, 1391 .chain_id = ALC880_FIXUP_VOL_KNOB, 1392 }, 1393 [ALC880_FIXUP_UNIWILL] = { 1394 /* need to fix HP and speaker pins to be parsed correctly */ 1395 .type = HDA_FIXUP_PINS, 1396 .v.pins = (const struct hda_pintbl[]) { 1397 { 0x14, 0x0121411f }, /* HP */ 1398 { 0x15, 0x99030120 }, /* speaker */ 1399 { 0x16, 0x99030130 }, /* bass speaker */ 1400 { } 1401 }, 1402 }, 1403 [ALC880_FIXUP_UNIWILL_DIG] = { 1404 .type = HDA_FIXUP_PINS, 1405 .v.pins = (const struct hda_pintbl[]) { 1406 /* disable bogus unused pins */ 1407 { 0x17, 0x411111f0 }, 1408 { 0x19, 0x411111f0 }, 1409 { 0x1b, 0x411111f0 }, 1410 { 0x1f, 0x411111f0 }, 1411 { } 1412 } 1413 }, 1414 [ALC880_FIXUP_Z71V] = { 1415 .type = HDA_FIXUP_PINS, 1416 .v.pins = (const struct hda_pintbl[]) { 1417 /* set up the whole pins as BIOS is utterly broken */ 1418 { 0x14, 0x99030120 }, /* speaker */ 1419 { 0x15, 0x0121411f }, /* HP */ 1420 { 0x16, 0x411111f0 }, /* N/A */ 1421 { 0x17, 0x411111f0 }, /* N/A */ 1422 { 0x18, 0x01a19950 }, /* mic-in */ 1423 { 0x19, 0x411111f0 }, /* N/A */ 1424 { 0x1a, 0x01813031 }, /* line-in */ 1425 { 0x1b, 0x411111f0 }, /* N/A */ 1426 { 0x1c, 0x411111f0 }, /* N/A */ 1427 { 0x1d, 0x411111f0 }, /* N/A */ 1428 { 0x1e, 0x0144111e }, /* SPDIF */ 1429 { } 1430 } 1431 }, 1432 [ALC880_FIXUP_ASUS_W5A] = { 1433 .type = HDA_FIXUP_PINS, 1434 .v.pins = (const struct hda_pintbl[]) { 1435 /* set up the whole pins as BIOS is utterly broken */ 1436 { 0x14, 0x0121411f }, /* HP */ 1437 { 0x15, 0x411111f0 }, /* N/A */ 1438 { 0x16, 0x411111f0 }, /* N/A */ 1439 { 0x17, 0x411111f0 }, /* N/A */ 1440 { 0x18, 0x90a60160 }, /* mic */ 1441 { 0x19, 0x411111f0 }, /* N/A */ 1442 { 0x1a, 0x411111f0 }, /* N/A */ 1443 { 0x1b, 0x411111f0 }, /* N/A */ 1444 { 0x1c, 0x411111f0 }, /* N/A */ 1445 { 0x1d, 0x411111f0 }, /* N/A */ 1446 { 0x1e, 0xb743111e }, /* SPDIF out */ 1447 { } 1448 }, 1449 .chained = true, 1450 .chain_id = ALC880_FIXUP_GPIO1, 1451 }, 1452 [ALC880_FIXUP_3ST_BASE] = { 1453 .type = HDA_FIXUP_PINS, 1454 .v.pins = (const struct hda_pintbl[]) { 1455 { 0x14, 0x01014010 }, /* line-out */ 1456 { 0x15, 0x411111f0 }, /* N/A */ 1457 { 0x16, 0x411111f0 }, /* N/A */ 1458 { 0x17, 0x411111f0 }, /* N/A */ 1459 { 0x18, 0x01a19c30 }, /* mic-in */ 1460 { 0x19, 0x0121411f }, /* HP */ 1461 { 0x1a, 0x01813031 }, /* line-in */ 1462 { 0x1b, 0x02a19c40 }, /* front-mic */ 1463 { 0x1c, 0x411111f0 }, /* N/A */ 1464 { 0x1d, 0x411111f0 }, /* N/A */ 1465 /* 0x1e is filled in below */ 1466 { 0x1f, 0x411111f0 }, /* N/A */ 1467 { } 1468 } 1469 }, 1470 [ALC880_FIXUP_3ST] = { 1471 .type = HDA_FIXUP_PINS, 1472 .v.pins = (const struct hda_pintbl[]) { 1473 { 0x1e, 0x411111f0 }, /* N/A */ 1474 { } 1475 }, 1476 .chained = true, 1477 .chain_id = ALC880_FIXUP_3ST_BASE, 1478 }, 1479 [ALC880_FIXUP_3ST_DIG] = { 1480 .type = HDA_FIXUP_PINS, 1481 .v.pins = (const struct hda_pintbl[]) { 1482 { 0x1e, 0x0144111e }, /* SPDIF */ 1483 { } 1484 }, 1485 .chained = true, 1486 .chain_id = ALC880_FIXUP_3ST_BASE, 1487 }, 1488 [ALC880_FIXUP_5ST_BASE] = { 1489 .type = HDA_FIXUP_PINS, 1490 .v.pins = (const struct hda_pintbl[]) { 1491 { 0x14, 0x01014010 }, /* front */ 1492 { 0x15, 0x411111f0 }, /* N/A */ 1493 { 0x16, 0x01011411 }, /* CLFE */ 1494 { 0x17, 0x01016412 }, /* surr */ 1495 { 0x18, 0x01a19c30 }, /* mic-in */ 1496 { 0x19, 0x0121411f }, /* HP */ 1497 { 0x1a, 0x01813031 }, /* line-in */ 1498 { 0x1b, 0x02a19c40 }, /* front-mic */ 1499 { 0x1c, 0x411111f0 }, /* N/A */ 1500 { 0x1d, 0x411111f0 }, /* N/A */ 1501 /* 0x1e is filled in below */ 1502 { 0x1f, 0x411111f0 }, /* N/A */ 1503 { } 1504 } 1505 }, 1506 [ALC880_FIXUP_5ST] = { 1507 .type = HDA_FIXUP_PINS, 1508 .v.pins = (const struct hda_pintbl[]) { 1509 { 0x1e, 0x411111f0 }, /* N/A */ 1510 { } 1511 }, 1512 .chained = true, 1513 .chain_id = ALC880_FIXUP_5ST_BASE, 1514 }, 1515 [ALC880_FIXUP_5ST_DIG] = { 1516 .type = HDA_FIXUP_PINS, 1517 .v.pins = (const struct hda_pintbl[]) { 1518 { 0x1e, 0x0144111e }, /* SPDIF */ 1519 { } 1520 }, 1521 .chained = true, 1522 .chain_id = ALC880_FIXUP_5ST_BASE, 1523 }, 1524 [ALC880_FIXUP_6ST_BASE] = { 1525 .type = HDA_FIXUP_PINS, 1526 .v.pins = (const struct hda_pintbl[]) { 1527 { 0x14, 0x01014010 }, /* front */ 1528 { 0x15, 0x01016412 }, /* surr */ 1529 { 0x16, 0x01011411 }, /* CLFE */ 1530 { 0x17, 0x01012414 }, /* side */ 1531 { 0x18, 0x01a19c30 }, /* mic-in */ 1532 { 0x19, 0x02a19c40 }, /* front-mic */ 1533 { 0x1a, 0x01813031 }, /* line-in */ 1534 { 0x1b, 0x0121411f }, /* HP */ 1535 { 0x1c, 0x411111f0 }, /* N/A */ 1536 { 0x1d, 0x411111f0 }, /* N/A */ 1537 /* 0x1e is filled in below */ 1538 { 0x1f, 0x411111f0 }, /* N/A */ 1539 { } 1540 } 1541 }, 1542 [ALC880_FIXUP_6ST] = { 1543 .type = HDA_FIXUP_PINS, 1544 .v.pins = (const struct hda_pintbl[]) { 1545 { 0x1e, 0x411111f0 }, /* N/A */ 1546 { } 1547 }, 1548 .chained = true, 1549 .chain_id = ALC880_FIXUP_6ST_BASE, 1550 }, 1551 [ALC880_FIXUP_6ST_DIG] = { 1552 .type = HDA_FIXUP_PINS, 1553 .v.pins = (const struct hda_pintbl[]) { 1554 { 0x1e, 0x0144111e }, /* SPDIF */ 1555 { } 1556 }, 1557 .chained = true, 1558 .chain_id = ALC880_FIXUP_6ST_BASE, 1559 }, 1560 [ALC880_FIXUP_6ST_AUTOMUTE] = { 1561 .type = HDA_FIXUP_PINS, 1562 .v.pins = (const struct hda_pintbl[]) { 1563 { 0x1b, 0x0121401f }, /* HP with jack detect */ 1564 { } 1565 }, 1566 .chained_before = true, 1567 .chain_id = ALC880_FIXUP_6ST_BASE, 1568 }, 1569 }; 1570 1571 static const struct hda_quirk alc880_fixup_tbl[] = { 1572 SND_PCI_QUIRK(0x1019, 0x0f69, "Coeus G610P", ALC880_FIXUP_W810), 1573 SND_PCI_QUIRK(0x1043, 0x10c3, "ASUS W5A", ALC880_FIXUP_ASUS_W5A), 1574 SND_PCI_QUIRK(0x1043, 0x1964, "ASUS Z71V", ALC880_FIXUP_Z71V), 1575 SND_PCI_QUIRK_VENDOR(0x1043, "ASUS", ALC880_FIXUP_GPIO1), 1576 SND_PCI_QUIRK(0x147b, 0x1045, "ABit AA8XE", ALC880_FIXUP_6ST_AUTOMUTE), 1577 SND_PCI_QUIRK(0x1558, 0x5401, "Clevo GPIO2", ALC880_FIXUP_GPIO2), 1578 SND_PCI_QUIRK_VENDOR(0x1558, "Clevo", ALC880_FIXUP_EAPD_COEF), 1579 SND_PCI_QUIRK(0x1584, 0x9050, "Uniwill", ALC880_FIXUP_UNIWILL_DIG), 1580 SND_PCI_QUIRK(0x1584, 0x9054, "Uniwill", ALC880_FIXUP_F1734), 1581 SND_PCI_QUIRK(0x1584, 0x9070, "Uniwill", ALC880_FIXUP_UNIWILL), 1582 SND_PCI_QUIRK(0x1584, 0x9077, "Uniwill P53", ALC880_FIXUP_VOL_KNOB), 1583 SND_PCI_QUIRK(0x161f, 0x203d, "W810", ALC880_FIXUP_W810), 1584 SND_PCI_QUIRK(0x161f, 0x205d, "Medion Rim 2150", ALC880_FIXUP_MEDION_RIM), 1585 SND_PCI_QUIRK(0x1631, 0xe011, "PB 13201056", ALC880_FIXUP_6ST_AUTOMUTE), 1586 SND_PCI_QUIRK(0x1734, 0x107c, "FSC Amilo M1437", ALC880_FIXUP_FUJITSU), 1587 SND_PCI_QUIRK(0x1734, 0x1094, "FSC Amilo M1451G", ALC880_FIXUP_FUJITSU), 1588 SND_PCI_QUIRK(0x1734, 0x10ac, "FSC AMILO Xi 1526", ALC880_FIXUP_F1734), 1589 SND_PCI_QUIRK(0x1734, 0x10b0, "FSC Amilo Pi1556", ALC880_FIXUP_FUJITSU), 1590 SND_PCI_QUIRK(0x1854, 0x003b, "LG", ALC880_FIXUP_LG), 1591 SND_PCI_QUIRK(0x1854, 0x005f, "LG P1 Express", ALC880_FIXUP_LG), 1592 SND_PCI_QUIRK(0x1854, 0x0068, "LG w1", ALC880_FIXUP_LG), 1593 SND_PCI_QUIRK(0x1854, 0x0077, "LG LW25", ALC880_FIXUP_LG_LW25), 1594 SND_PCI_QUIRK(0x19db, 0x4188, "TCL S700", ALC880_FIXUP_TCL_S700), 1595 1596 /* Below is the copied entries from alc880_quirks.c. 1597 * It's not quite sure whether BIOS sets the correct pin-config table 1598 * on these machines, thus they are kept to be compatible with 1599 * the old static quirks. Once when it's confirmed to work without 1600 * these overrides, it'd be better to remove. 1601 */ 1602 SND_PCI_QUIRK(0x1019, 0xa880, "ECS", ALC880_FIXUP_5ST_DIG), 1603 SND_PCI_QUIRK(0x1019, 0xa884, "Acer APFV", ALC880_FIXUP_6ST), 1604 SND_PCI_QUIRK(0x1025, 0x0070, "ULI", ALC880_FIXUP_3ST_DIG), 1605 SND_PCI_QUIRK(0x1025, 0x0077, "ULI", ALC880_FIXUP_6ST_DIG), 1606 SND_PCI_QUIRK(0x1025, 0x0078, "ULI", ALC880_FIXUP_6ST_DIG), 1607 SND_PCI_QUIRK(0x1025, 0x0087, "ULI", ALC880_FIXUP_6ST_DIG), 1608 SND_PCI_QUIRK(0x1025, 0xe309, "ULI", ALC880_FIXUP_3ST_DIG), 1609 SND_PCI_QUIRK(0x1025, 0xe310, "ULI", ALC880_FIXUP_3ST), 1610 SND_PCI_QUIRK(0x1039, 0x1234, NULL, ALC880_FIXUP_6ST_DIG), 1611 SND_PCI_QUIRK(0x104d, 0x81a0, "Sony", ALC880_FIXUP_3ST), 1612 SND_PCI_QUIRK(0x104d, 0x81d6, "Sony", ALC880_FIXUP_3ST), 1613 SND_PCI_QUIRK(0x107b, 0x3032, "Gateway", ALC880_FIXUP_5ST), 1614 SND_PCI_QUIRK(0x107b, 0x3033, "Gateway", ALC880_FIXUP_5ST), 1615 SND_PCI_QUIRK(0x107b, 0x4039, "Gateway", ALC880_FIXUP_5ST), 1616 SND_PCI_QUIRK(0x1297, 0xc790, "Shuttle ST20G5", ALC880_FIXUP_6ST_DIG), 1617 SND_PCI_QUIRK(0x1458, 0xa102, "Gigabyte K8", ALC880_FIXUP_6ST_DIG), 1618 SND_PCI_QUIRK(0x1462, 0x1150, "MSI", ALC880_FIXUP_6ST_DIG), 1619 SND_PCI_QUIRK(0x1509, 0x925d, "FIC P4M", ALC880_FIXUP_6ST_DIG), 1620 SND_PCI_QUIRK(0x1565, 0x8202, "Biostar", ALC880_FIXUP_5ST_DIG), 1621 SND_PCI_QUIRK(0x1695, 0x400d, "EPoX", ALC880_FIXUP_5ST_DIG), 1622 SND_PCI_QUIRK(0x1695, 0x4012, "EPox EP-5LDA", ALC880_FIXUP_5ST_DIG), 1623 SND_PCI_QUIRK(0x2668, 0x8086, NULL, ALC880_FIXUP_6ST_DIG), /* broken BIOS */ 1624 SND_PCI_QUIRK(0x8086, 0x2668, NULL, ALC880_FIXUP_6ST_DIG), 1625 SND_PCI_QUIRK(0x8086, 0xa100, "Intel mobo", ALC880_FIXUP_5ST_DIG), 1626 SND_PCI_QUIRK(0x8086, 0xd400, "Intel mobo", ALC880_FIXUP_5ST_DIG), 1627 SND_PCI_QUIRK(0x8086, 0xd401, "Intel mobo", ALC880_FIXUP_5ST_DIG), 1628 SND_PCI_QUIRK(0x8086, 0xd402, "Intel mobo", ALC880_FIXUP_3ST_DIG), 1629 SND_PCI_QUIRK(0x8086, 0xe224, "Intel mobo", ALC880_FIXUP_5ST_DIG), 1630 SND_PCI_QUIRK(0x8086, 0xe305, "Intel mobo", ALC880_FIXUP_3ST_DIG), 1631 SND_PCI_QUIRK(0x8086, 0xe308, "Intel mobo", ALC880_FIXUP_3ST_DIG), 1632 SND_PCI_QUIRK(0x8086, 0xe400, "Intel mobo", ALC880_FIXUP_5ST_DIG), 1633 SND_PCI_QUIRK(0x8086, 0xe401, "Intel mobo", ALC880_FIXUP_5ST_DIG), 1634 SND_PCI_QUIRK(0x8086, 0xe402, "Intel mobo", ALC880_FIXUP_5ST_DIG), 1635 /* default Intel */ 1636 SND_PCI_QUIRK_VENDOR(0x8086, "Intel mobo", ALC880_FIXUP_3ST), 1637 SND_PCI_QUIRK(0xa0a0, 0x0560, "AOpen i915GMm-HFS", ALC880_FIXUP_5ST_DIG), 1638 SND_PCI_QUIRK(0xe803, 0x1019, NULL, ALC880_FIXUP_6ST_DIG), 1639 {} 1640 }; 1641 1642 static const struct hda_model_fixup alc880_fixup_models[] = { 1643 {.id = ALC880_FIXUP_3ST, .name = "3stack"}, 1644 {.id = ALC880_FIXUP_3ST_DIG, .name = "3stack-digout"}, 1645 {.id = ALC880_FIXUP_5ST, .name = "5stack"}, 1646 {.id = ALC880_FIXUP_5ST_DIG, .name = "5stack-digout"}, 1647 {.id = ALC880_FIXUP_6ST, .name = "6stack"}, 1648 {.id = ALC880_FIXUP_6ST_DIG, .name = "6stack-digout"}, 1649 {.id = ALC880_FIXUP_6ST_AUTOMUTE, .name = "6stack-automute"}, 1650 {} 1651 }; 1652 1653 1654 /* 1655 * OK, here we have finally the patch for ALC880 1656 */ 1657 static int patch_alc880(struct hda_codec *codec) 1658 { 1659 struct alc_spec *spec; 1660 int err; 1661 1662 err = alc_alloc_spec(codec, 0x0b); 1663 if (err < 0) 1664 return err; 1665 1666 spec = codec->spec; 1667 spec->gen.need_dac_fix = 1; 1668 spec->gen.beep_nid = 0x01; 1669 1670 codec->patch_ops.unsol_event = alc880_unsol_event; 1671 1672 alc_pre_init(codec); 1673 1674 snd_hda_pick_fixup(codec, alc880_fixup_models, alc880_fixup_tbl, 1675 alc880_fixups); 1676 snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PRE_PROBE); 1677 1678 /* automatic parse from the BIOS config */ 1679 err = alc880_parse_auto_config(codec); 1680 if (err < 0) 1681 goto error; 1682 1683 if (!spec->gen.no_analog) { 1684 err = set_beep_amp(spec, 0x0b, 0x05, HDA_INPUT); 1685 if (err < 0) 1686 goto error; 1687 } 1688 1689 snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PROBE); 1690 1691 return 0; 1692 1693 error: 1694 alc_free(codec); 1695 return err; 1696 } 1697 1698 1699 /* 1700 * ALC260 support 1701 */ 1702 static int alc260_parse_auto_config(struct hda_codec *codec) 1703 { 1704 static const hda_nid_t alc260_ignore[] = { 0x17, 0 }; 1705 static const hda_nid_t alc260_ssids[] = { 0x10, 0x15, 0x0f, 0 }; 1706 return alc_parse_auto_config(codec, alc260_ignore, alc260_ssids); 1707 } 1708 1709 /* 1710 * Pin config fixes 1711 */ 1712 enum { 1713 ALC260_FIXUP_HP_DC5750, 1714 ALC260_FIXUP_HP_PIN_0F, 1715 ALC260_FIXUP_COEF, 1716 ALC260_FIXUP_GPIO1, 1717 ALC260_FIXUP_GPIO1_TOGGLE, 1718 ALC260_FIXUP_REPLACER, 1719 ALC260_FIXUP_HP_B1900, 1720 ALC260_FIXUP_KN1, 1721 ALC260_FIXUP_FSC_S7020, 1722 ALC260_FIXUP_FSC_S7020_JWSE, 1723 ALC260_FIXUP_VAIO_PINS, 1724 }; 1725 1726 static void alc260_gpio1_automute(struct hda_codec *codec) 1727 { 1728 struct alc_spec *spec = codec->spec; 1729 1730 alc_update_gpio_data(codec, 0x01, spec->gen.hp_jack_present); 1731 } 1732 1733 static void alc260_fixup_gpio1_toggle(struct hda_codec *codec, 1734 const struct hda_fixup *fix, int action) 1735 { 1736 struct alc_spec *spec = codec->spec; 1737 if (action == HDA_FIXUP_ACT_PROBE) { 1738 /* although the machine has only one output pin, we need to 1739 * toggle GPIO1 according to the jack state 1740 */ 1741 spec->gen.automute_hook = alc260_gpio1_automute; 1742 spec->gen.detect_hp = 1; 1743 spec->gen.automute_speaker = 1; 1744 spec->gen.autocfg.hp_pins[0] = 0x0f; /* copy it for automute */ 1745 snd_hda_jack_detect_enable_callback(codec, 0x0f, 1746 snd_hda_gen_hp_automute); 1747 alc_setup_gpio(codec, 0x01); 1748 } 1749 } 1750 1751 static void alc260_fixup_kn1(struct hda_codec *codec, 1752 const struct hda_fixup *fix, int action) 1753 { 1754 struct alc_spec *spec = codec->spec; 1755 static const struct hda_pintbl pincfgs[] = { 1756 { 0x0f, 0x02214000 }, /* HP/speaker */ 1757 { 0x12, 0x90a60160 }, /* int mic */ 1758 { 0x13, 0x02a19000 }, /* ext mic */ 1759 { 0x18, 0x01446000 }, /* SPDIF out */ 1760 /* disable bogus I/O pins */ 1761 { 0x10, 0x411111f0 }, 1762 { 0x11, 0x411111f0 }, 1763 { 0x14, 0x411111f0 }, 1764 { 0x15, 0x411111f0 }, 1765 { 0x16, 0x411111f0 }, 1766 { 0x17, 0x411111f0 }, 1767 { 0x19, 0x411111f0 }, 1768 { } 1769 }; 1770 1771 switch (action) { 1772 case HDA_FIXUP_ACT_PRE_PROBE: 1773 snd_hda_apply_pincfgs(codec, pincfgs); 1774 spec->init_amp = ALC_INIT_NONE; 1775 break; 1776 } 1777 } 1778 1779 static void alc260_fixup_fsc_s7020(struct hda_codec *codec, 1780 const struct hda_fixup *fix, int action) 1781 { 1782 struct alc_spec *spec = codec->spec; 1783 if (action == HDA_FIXUP_ACT_PRE_PROBE) 1784 spec->init_amp = ALC_INIT_NONE; 1785 } 1786 1787 static void alc260_fixup_fsc_s7020_jwse(struct hda_codec *codec, 1788 const struct hda_fixup *fix, int action) 1789 { 1790 struct alc_spec *spec = codec->spec; 1791 if (action == HDA_FIXUP_ACT_PRE_PROBE) { 1792 spec->gen.add_jack_modes = 1; 1793 spec->gen.hp_mic = 1; 1794 } 1795 } 1796 1797 static const struct hda_fixup alc260_fixups[] = { 1798 [ALC260_FIXUP_HP_DC5750] = { 1799 .type = HDA_FIXUP_PINS, 1800 .v.pins = (const struct hda_pintbl[]) { 1801 { 0x11, 0x90130110 }, /* speaker */ 1802 { } 1803 } 1804 }, 1805 [ALC260_FIXUP_HP_PIN_0F] = { 1806 .type = HDA_FIXUP_PINS, 1807 .v.pins = (const struct hda_pintbl[]) { 1808 { 0x0f, 0x01214000 }, /* HP */ 1809 { } 1810 } 1811 }, 1812 [ALC260_FIXUP_COEF] = { 1813 .type = HDA_FIXUP_VERBS, 1814 .v.verbs = (const struct hda_verb[]) { 1815 { 0x1a, AC_VERB_SET_COEF_INDEX, 0x07 }, 1816 { 0x1a, AC_VERB_SET_PROC_COEF, 0x3040 }, 1817 { } 1818 }, 1819 }, 1820 [ALC260_FIXUP_GPIO1] = { 1821 .type = HDA_FIXUP_FUNC, 1822 .v.func = alc_fixup_gpio1, 1823 }, 1824 [ALC260_FIXUP_GPIO1_TOGGLE] = { 1825 .type = HDA_FIXUP_FUNC, 1826 .v.func = alc260_fixup_gpio1_toggle, 1827 .chained = true, 1828 .chain_id = ALC260_FIXUP_HP_PIN_0F, 1829 }, 1830 [ALC260_FIXUP_REPLACER] = { 1831 .type = HDA_FIXUP_VERBS, 1832 .v.verbs = (const struct hda_verb[]) { 1833 { 0x1a, AC_VERB_SET_COEF_INDEX, 0x07 }, 1834 { 0x1a, AC_VERB_SET_PROC_COEF, 0x3050 }, 1835 { } 1836 }, 1837 .chained = true, 1838 .chain_id = ALC260_FIXUP_GPIO1_TOGGLE, 1839 }, 1840 [ALC260_FIXUP_HP_B1900] = { 1841 .type = HDA_FIXUP_FUNC, 1842 .v.func = alc260_fixup_gpio1_toggle, 1843 .chained = true, 1844 .chain_id = ALC260_FIXUP_COEF, 1845 }, 1846 [ALC260_FIXUP_KN1] = { 1847 .type = HDA_FIXUP_FUNC, 1848 .v.func = alc260_fixup_kn1, 1849 }, 1850 [ALC260_FIXUP_FSC_S7020] = { 1851 .type = HDA_FIXUP_FUNC, 1852 .v.func = alc260_fixup_fsc_s7020, 1853 }, 1854 [ALC260_FIXUP_FSC_S7020_JWSE] = { 1855 .type = HDA_FIXUP_FUNC, 1856 .v.func = alc260_fixup_fsc_s7020_jwse, 1857 .chained = true, 1858 .chain_id = ALC260_FIXUP_FSC_S7020, 1859 }, 1860 [ALC260_FIXUP_VAIO_PINS] = { 1861 .type = HDA_FIXUP_PINS, 1862 .v.pins = (const struct hda_pintbl[]) { 1863 /* Pin configs are missing completely on some VAIOs */ 1864 { 0x0f, 0x01211020 }, 1865 { 0x10, 0x0001003f }, 1866 { 0x11, 0x411111f0 }, 1867 { 0x12, 0x01a15930 }, 1868 { 0x13, 0x411111f0 }, 1869 { 0x14, 0x411111f0 }, 1870 { 0x15, 0x411111f0 }, 1871 { 0x16, 0x411111f0 }, 1872 { 0x17, 0x411111f0 }, 1873 { 0x18, 0x411111f0 }, 1874 { 0x19, 0x411111f0 }, 1875 { } 1876 } 1877 }, 1878 }; 1879 1880 static const struct hda_quirk alc260_fixup_tbl[] = { 1881 SND_PCI_QUIRK(0x1025, 0x007b, "Acer C20x", ALC260_FIXUP_GPIO1), 1882 SND_PCI_QUIRK(0x1025, 0x007f, "Acer Aspire 9500", ALC260_FIXUP_COEF), 1883 SND_PCI_QUIRK(0x1025, 0x008f, "Acer", ALC260_FIXUP_GPIO1), 1884 SND_PCI_QUIRK(0x103c, 0x280a, "HP dc5750", ALC260_FIXUP_HP_DC5750), 1885 SND_PCI_QUIRK(0x103c, 0x30ba, "HP Presario B1900", ALC260_FIXUP_HP_B1900), 1886 SND_PCI_QUIRK(0x104d, 0x81bb, "Sony VAIO", ALC260_FIXUP_VAIO_PINS), 1887 SND_PCI_QUIRK(0x104d, 0x81e2, "Sony VAIO TX", ALC260_FIXUP_HP_PIN_0F), 1888 SND_PCI_QUIRK(0x10cf, 0x1326, "FSC LifeBook S7020", ALC260_FIXUP_FSC_S7020), 1889 SND_PCI_QUIRK(0x1509, 0x4540, "Favorit 100XS", ALC260_FIXUP_GPIO1), 1890 SND_PCI_QUIRK(0x152d, 0x0729, "Quanta KN1", ALC260_FIXUP_KN1), 1891 SND_PCI_QUIRK(0x161f, 0x2057, "Replacer 672V", ALC260_FIXUP_REPLACER), 1892 SND_PCI_QUIRK(0x1631, 0xc017, "PB V7900", ALC260_FIXUP_COEF), 1893 {} 1894 }; 1895 1896 static const struct hda_model_fixup alc260_fixup_models[] = { 1897 {.id = ALC260_FIXUP_GPIO1, .name = "gpio1"}, 1898 {.id = ALC260_FIXUP_COEF, .name = "coef"}, 1899 {.id = ALC260_FIXUP_FSC_S7020, .name = "fujitsu"}, 1900 {.id = ALC260_FIXUP_FSC_S7020_JWSE, .name = "fujitsu-jwse"}, 1901 {} 1902 }; 1903 1904 /* 1905 */ 1906 static int patch_alc260(struct hda_codec *codec) 1907 { 1908 struct alc_spec *spec; 1909 int err; 1910 1911 err = alc_alloc_spec(codec, 0x07); 1912 if (err < 0) 1913 return err; 1914 1915 spec = codec->spec; 1916 /* as quite a few machines require HP amp for speaker outputs, 1917 * it's easier to enable it unconditionally; even if it's unneeded, 1918 * it's almost harmless. 1919 */ 1920 spec->gen.prefer_hp_amp = 1; 1921 spec->gen.beep_nid = 0x01; 1922 1923 spec->shutup = alc_eapd_shutup; 1924 1925 alc_pre_init(codec); 1926 1927 snd_hda_pick_fixup(codec, alc260_fixup_models, alc260_fixup_tbl, 1928 alc260_fixups); 1929 snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PRE_PROBE); 1930 1931 /* automatic parse from the BIOS config */ 1932 err = alc260_parse_auto_config(codec); 1933 if (err < 0) 1934 goto error; 1935 1936 if (!spec->gen.no_analog) { 1937 err = set_beep_amp(spec, 0x07, 0x05, HDA_INPUT); 1938 if (err < 0) 1939 goto error; 1940 } 1941 1942 snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PROBE); 1943 1944 return 0; 1945 1946 error: 1947 alc_free(codec); 1948 return err; 1949 } 1950 1951 1952 /* 1953 * ALC882/883/885/888/889 support 1954 * 1955 * ALC882 is almost identical with ALC880 but has cleaner and more flexible 1956 * configuration. Each pin widget can choose any input DACs and a mixer. 1957 * Each ADC is connected from a mixer of all inputs. This makes possible 1958 * 6-channel independent captures. 1959 * 1960 * In addition, an independent DAC for the multi-playback (not used in this 1961 * driver yet). 1962 */ 1963 1964 /* 1965 * Pin config fixes 1966 */ 1967 enum { 1968 ALC882_FIXUP_ABIT_AW9D_MAX, 1969 ALC882_FIXUP_LENOVO_Y530, 1970 ALC882_FIXUP_PB_M5210, 1971 ALC882_FIXUP_ACER_ASPIRE_7736, 1972 ALC882_FIXUP_ASUS_W90V, 1973 ALC889_FIXUP_CD, 1974 ALC889_FIXUP_FRONT_HP_NO_PRESENCE, 1975 ALC889_FIXUP_VAIO_TT, 1976 ALC888_FIXUP_EEE1601, 1977 ALC886_FIXUP_EAPD, 1978 ALC882_FIXUP_EAPD, 1979 ALC883_FIXUP_EAPD, 1980 ALC883_FIXUP_ACER_EAPD, 1981 ALC882_FIXUP_GPIO1, 1982 ALC882_FIXUP_GPIO2, 1983 ALC882_FIXUP_GPIO3, 1984 ALC889_FIXUP_COEF, 1985 ALC882_FIXUP_ASUS_W2JC, 1986 ALC882_FIXUP_ACER_ASPIRE_4930G, 1987 ALC882_FIXUP_ACER_ASPIRE_8930G, 1988 ALC882_FIXUP_ASPIRE_8930G_VERBS, 1989 ALC885_FIXUP_MACPRO_GPIO, 1990 ALC889_FIXUP_DAC_ROUTE, 1991 ALC889_FIXUP_MBP_VREF, 1992 ALC889_FIXUP_IMAC91_VREF, 1993 ALC889_FIXUP_MBA11_VREF, 1994 ALC889_FIXUP_MBA21_VREF, 1995 ALC889_FIXUP_MP11_VREF, 1996 ALC889_FIXUP_MP41_VREF, 1997 ALC882_FIXUP_INV_DMIC, 1998 ALC882_FIXUP_NO_PRIMARY_HP, 1999 ALC887_FIXUP_ASUS_BASS, 2000 ALC887_FIXUP_BASS_CHMAP, 2001 ALC1220_FIXUP_GB_DUAL_CODECS, 2002 ALC1220_FIXUP_GB_X570, 2003 ALC1220_FIXUP_CLEVO_P950, 2004 ALC1220_FIXUP_CLEVO_PB51ED, 2005 ALC1220_FIXUP_CLEVO_PB51ED_PINS, 2006 ALC887_FIXUP_ASUS_AUDIO, 2007 ALC887_FIXUP_ASUS_HMIC, 2008 ALCS1200A_FIXUP_MIC_VREF, 2009 ALC888VD_FIXUP_MIC_100VREF, 2010 }; 2011 2012 static void alc889_fixup_coef(struct hda_codec *codec, 2013 const struct hda_fixup *fix, int action) 2014 { 2015 if (action != HDA_FIXUP_ACT_INIT) 2016 return; 2017 alc_update_coef_idx(codec, 7, 0, 0x2030); 2018 } 2019 2020 /* set up GPIO at initialization */ 2021 static void alc885_fixup_macpro_gpio(struct hda_codec *codec, 2022 const struct hda_fixup *fix, int action) 2023 { 2024 struct alc_spec *spec = codec->spec; 2025 2026 spec->gpio_write_delay = true; 2027 alc_fixup_gpio3(codec, fix, action); 2028 } 2029 2030 /* Fix the connection of some pins for ALC889: 2031 * At least, Acer Aspire 5935 shows the connections to DAC3/4 don't 2032 * work correctly (bko#42740) 2033 */ 2034 static void alc889_fixup_dac_route(struct hda_codec *codec, 2035 const struct hda_fixup *fix, int action) 2036 { 2037 if (action == HDA_FIXUP_ACT_PRE_PROBE) { 2038 /* fake the connections during parsing the tree */ 2039 static const hda_nid_t conn1[] = { 0x0c, 0x0d }; 2040 static const hda_nid_t conn2[] = { 0x0e, 0x0f }; 2041 snd_hda_override_conn_list(codec, 0x14, ARRAY_SIZE(conn1), conn1); 2042 snd_hda_override_conn_list(codec, 0x15, ARRAY_SIZE(conn1), conn1); 2043 snd_hda_override_conn_list(codec, 0x18, ARRAY_SIZE(conn2), conn2); 2044 snd_hda_override_conn_list(codec, 0x1a, ARRAY_SIZE(conn2), conn2); 2045 } else if (action == HDA_FIXUP_ACT_PROBE) { 2046 /* restore the connections */ 2047 static const hda_nid_t conn[] = { 0x0c, 0x0d, 0x0e, 0x0f, 0x26 }; 2048 snd_hda_override_conn_list(codec, 0x14, ARRAY_SIZE(conn), conn); 2049 snd_hda_override_conn_list(codec, 0x15, ARRAY_SIZE(conn), conn); 2050 snd_hda_override_conn_list(codec, 0x18, ARRAY_SIZE(conn), conn); 2051 snd_hda_override_conn_list(codec, 0x1a, ARRAY_SIZE(conn), conn); 2052 } 2053 } 2054 2055 /* Set VREF on HP pin */ 2056 static void alc889_fixup_mbp_vref(struct hda_codec *codec, 2057 const struct hda_fixup *fix, int action) 2058 { 2059 static const hda_nid_t nids[] = { 0x14, 0x15, 0x19 }; 2060 struct alc_spec *spec = codec->spec; 2061 int i; 2062 2063 if (action != HDA_FIXUP_ACT_INIT) 2064 return; 2065 for (i = 0; i < ARRAY_SIZE(nids); i++) { 2066 unsigned int val = snd_hda_codec_get_pincfg(codec, nids[i]); 2067 if (get_defcfg_device(val) != AC_JACK_HP_OUT) 2068 continue; 2069 val = snd_hda_codec_get_pin_target(codec, nids[i]); 2070 val |= AC_PINCTL_VREF_80; 2071 snd_hda_set_pin_ctl(codec, nids[i], val); 2072 spec->gen.keep_vref_in_automute = 1; 2073 break; 2074 } 2075 } 2076 2077 static void alc889_fixup_mac_pins(struct hda_codec *codec, 2078 const hda_nid_t *nids, int num_nids) 2079 { 2080 struct alc_spec *spec = codec->spec; 2081 int i; 2082 2083 for (i = 0; i < num_nids; i++) { 2084 unsigned int val; 2085 val = snd_hda_codec_get_pin_target(codec, nids[i]); 2086 val |= AC_PINCTL_VREF_50; 2087 snd_hda_set_pin_ctl(codec, nids[i], val); 2088 } 2089 spec->gen.keep_vref_in_automute = 1; 2090 } 2091 2092 /* Set VREF on speaker pins on imac91 */ 2093 static void alc889_fixup_imac91_vref(struct hda_codec *codec, 2094 const struct hda_fixup *fix, int action) 2095 { 2096 static const hda_nid_t nids[] = { 0x18, 0x1a }; 2097 2098 if (action == HDA_FIXUP_ACT_INIT) 2099 alc889_fixup_mac_pins(codec, nids, ARRAY_SIZE(nids)); 2100 } 2101 2102 /* Set VREF on speaker pins on mba11 */ 2103 static void alc889_fixup_mba11_vref(struct hda_codec *codec, 2104 const struct hda_fixup *fix, int action) 2105 { 2106 static const hda_nid_t nids[] = { 0x18 }; 2107 2108 if (action == HDA_FIXUP_ACT_INIT) 2109 alc889_fixup_mac_pins(codec, nids, ARRAY_SIZE(nids)); 2110 } 2111 2112 /* Set VREF on speaker pins on mba21 */ 2113 static void alc889_fixup_mba21_vref(struct hda_codec *codec, 2114 const struct hda_fixup *fix, int action) 2115 { 2116 static const hda_nid_t nids[] = { 0x18, 0x19 }; 2117 2118 if (action == HDA_FIXUP_ACT_INIT) 2119 alc889_fixup_mac_pins(codec, nids, ARRAY_SIZE(nids)); 2120 } 2121 2122 /* Don't take HP output as primary 2123 * Strangely, the speaker output doesn't work on Vaio Z and some Vaio 2124 * all-in-one desktop PCs (for example VGC-LN51JGB) through DAC 0x05 2125 */ 2126 static void alc882_fixup_no_primary_hp(struct hda_codec *codec, 2127 const struct hda_fixup *fix, int action) 2128 { 2129 struct alc_spec *spec = codec->spec; 2130 if (action == HDA_FIXUP_ACT_PRE_PROBE) { 2131 spec->gen.no_primary_hp = 1; 2132 spec->gen.no_multi_io = 1; 2133 } 2134 } 2135 2136 static void alc_fixup_bass_chmap(struct hda_codec *codec, 2137 const struct hda_fixup *fix, int action); 2138 2139 /* For dual-codec configuration, we need to disable some features to avoid 2140 * conflicts of kctls and PCM streams 2141 */ 2142 static void alc_fixup_dual_codecs(struct hda_codec *codec, 2143 const struct hda_fixup *fix, int action) 2144 { 2145 struct alc_spec *spec = codec->spec; 2146 2147 if (action != HDA_FIXUP_ACT_PRE_PROBE) 2148 return; 2149 /* disable vmaster */ 2150 spec->gen.suppress_vmaster = 1; 2151 /* auto-mute and auto-mic switch don't work with multiple codecs */ 2152 spec->gen.suppress_auto_mute = 1; 2153 spec->gen.suppress_auto_mic = 1; 2154 /* disable aamix as well */ 2155 spec->gen.mixer_nid = 0; 2156 /* add location prefix to avoid conflicts */ 2157 codec->force_pin_prefix = 1; 2158 } 2159 2160 static void rename_ctl(struct hda_codec *codec, const char *oldname, 2161 const char *newname) 2162 { 2163 struct snd_kcontrol *kctl; 2164 2165 kctl = snd_hda_find_mixer_ctl(codec, oldname); 2166 if (kctl) 2167 snd_ctl_rename(codec->card, kctl, newname); 2168 } 2169 2170 static void alc1220_fixup_gb_dual_codecs(struct hda_codec *codec, 2171 const struct hda_fixup *fix, 2172 int action) 2173 { 2174 alc_fixup_dual_codecs(codec, fix, action); 2175 switch (action) { 2176 case HDA_FIXUP_ACT_PRE_PROBE: 2177 /* override card longname to provide a unique UCM profile */ 2178 strcpy(codec->card->longname, "HDAudio-Gigabyte-ALC1220DualCodecs"); 2179 break; 2180 case HDA_FIXUP_ACT_BUILD: 2181 /* rename Capture controls depending on the codec */ 2182 rename_ctl(codec, "Capture Volume", 2183 codec->addr == 0 ? 2184 "Rear-Panel Capture Volume" : 2185 "Front-Panel Capture Volume"); 2186 rename_ctl(codec, "Capture Switch", 2187 codec->addr == 0 ? 2188 "Rear-Panel Capture Switch" : 2189 "Front-Panel Capture Switch"); 2190 break; 2191 } 2192 } 2193 2194 static void alc1220_fixup_gb_x570(struct hda_codec *codec, 2195 const struct hda_fixup *fix, 2196 int action) 2197 { 2198 static const hda_nid_t conn1[] = { 0x0c }; 2199 static const struct coef_fw gb_x570_coefs[] = { 2200 WRITE_COEF(0x07, 0x03c0), 2201 WRITE_COEF(0x1a, 0x01c1), 2202 WRITE_COEF(0x1b, 0x0202), 2203 WRITE_COEF(0x43, 0x3005), 2204 {} 2205 }; 2206 2207 switch (action) { 2208 case HDA_FIXUP_ACT_PRE_PROBE: 2209 snd_hda_override_conn_list(codec, 0x14, ARRAY_SIZE(conn1), conn1); 2210 snd_hda_override_conn_list(codec, 0x1b, ARRAY_SIZE(conn1), conn1); 2211 break; 2212 case HDA_FIXUP_ACT_INIT: 2213 alc_process_coef_fw(codec, gb_x570_coefs); 2214 break; 2215 } 2216 } 2217 2218 static void alc1220_fixup_clevo_p950(struct hda_codec *codec, 2219 const struct hda_fixup *fix, 2220 int action) 2221 { 2222 static const hda_nid_t conn1[] = { 0x0c }; 2223 2224 if (action != HDA_FIXUP_ACT_PRE_PROBE) 2225 return; 2226 2227 alc_update_coef_idx(codec, 0x7, 0, 0x3c3); 2228 /* We therefore want to make sure 0x14 (front headphone) and 2229 * 0x1b (speakers) use the stereo DAC 0x02 2230 */ 2231 snd_hda_override_conn_list(codec, 0x14, ARRAY_SIZE(conn1), conn1); 2232 snd_hda_override_conn_list(codec, 0x1b, ARRAY_SIZE(conn1), conn1); 2233 } 2234 2235 static void alc_fixup_headset_mode_no_hp_mic(struct hda_codec *codec, 2236 const struct hda_fixup *fix, int action); 2237 2238 static void alc1220_fixup_clevo_pb51ed(struct hda_codec *codec, 2239 const struct hda_fixup *fix, 2240 int action) 2241 { 2242 alc1220_fixup_clevo_p950(codec, fix, action); 2243 alc_fixup_headset_mode_no_hp_mic(codec, fix, action); 2244 } 2245 2246 static void alc887_asus_hp_automute_hook(struct hda_codec *codec, 2247 struct hda_jack_callback *jack) 2248 { 2249 struct alc_spec *spec = codec->spec; 2250 unsigned int vref; 2251 2252 snd_hda_gen_hp_automute(codec, jack); 2253 2254 if (spec->gen.hp_jack_present) 2255 vref = AC_PINCTL_VREF_80; 2256 else 2257 vref = AC_PINCTL_VREF_HIZ; 2258 snd_hda_set_pin_ctl(codec, 0x19, PIN_HP | vref); 2259 } 2260 2261 static void alc887_fixup_asus_jack(struct hda_codec *codec, 2262 const struct hda_fixup *fix, int action) 2263 { 2264 struct alc_spec *spec = codec->spec; 2265 if (action != HDA_FIXUP_ACT_PROBE) 2266 return; 2267 snd_hda_set_pin_ctl_cache(codec, 0x1b, PIN_HP); 2268 spec->gen.hp_automute_hook = alc887_asus_hp_automute_hook; 2269 } 2270 2271 static const struct hda_fixup alc882_fixups[] = { 2272 [ALC882_FIXUP_ABIT_AW9D_MAX] = { 2273 .type = HDA_FIXUP_PINS, 2274 .v.pins = (const struct hda_pintbl[]) { 2275 { 0x15, 0x01080104 }, /* side */ 2276 { 0x16, 0x01011012 }, /* rear */ 2277 { 0x17, 0x01016011 }, /* clfe */ 2278 { } 2279 } 2280 }, 2281 [ALC882_FIXUP_LENOVO_Y530] = { 2282 .type = HDA_FIXUP_PINS, 2283 .v.pins = (const struct hda_pintbl[]) { 2284 { 0x15, 0x99130112 }, /* rear int speakers */ 2285 { 0x16, 0x99130111 }, /* subwoofer */ 2286 { } 2287 } 2288 }, 2289 [ALC882_FIXUP_PB_M5210] = { 2290 .type = HDA_FIXUP_PINCTLS, 2291 .v.pins = (const struct hda_pintbl[]) { 2292 { 0x19, PIN_VREF50 }, 2293 {} 2294 } 2295 }, 2296 [ALC882_FIXUP_ACER_ASPIRE_7736] = { 2297 .type = HDA_FIXUP_FUNC, 2298 .v.func = alc_fixup_sku_ignore, 2299 }, 2300 [ALC882_FIXUP_ASUS_W90V] = { 2301 .type = HDA_FIXUP_PINS, 2302 .v.pins = (const struct hda_pintbl[]) { 2303 { 0x16, 0x99130110 }, /* fix sequence for CLFE */ 2304 { } 2305 } 2306 }, 2307 [ALC889_FIXUP_CD] = { 2308 .type = HDA_FIXUP_PINS, 2309 .v.pins = (const struct hda_pintbl[]) { 2310 { 0x1c, 0x993301f0 }, /* CD */ 2311 { } 2312 } 2313 }, 2314 [ALC889_FIXUP_FRONT_HP_NO_PRESENCE] = { 2315 .type = HDA_FIXUP_PINS, 2316 .v.pins = (const struct hda_pintbl[]) { 2317 { 0x1b, 0x02214120 }, /* Front HP jack is flaky, disable jack detect */ 2318 { } 2319 }, 2320 .chained = true, 2321 .chain_id = ALC889_FIXUP_CD, 2322 }, 2323 [ALC889_FIXUP_VAIO_TT] = { 2324 .type = HDA_FIXUP_PINS, 2325 .v.pins = (const struct hda_pintbl[]) { 2326 { 0x17, 0x90170111 }, /* hidden surround speaker */ 2327 { } 2328 } 2329 }, 2330 [ALC888_FIXUP_EEE1601] = { 2331 .type = HDA_FIXUP_VERBS, 2332 .v.verbs = (const struct hda_verb[]) { 2333 { 0x20, AC_VERB_SET_COEF_INDEX, 0x0b }, 2334 { 0x20, AC_VERB_SET_PROC_COEF, 0x0838 }, 2335 { } 2336 } 2337 }, 2338 [ALC886_FIXUP_EAPD] = { 2339 .type = HDA_FIXUP_VERBS, 2340 .v.verbs = (const struct hda_verb[]) { 2341 /* change to EAPD mode */ 2342 { 0x20, AC_VERB_SET_COEF_INDEX, 0x07 }, 2343 { 0x20, AC_VERB_SET_PROC_COEF, 0x0068 }, 2344 { } 2345 } 2346 }, 2347 [ALC882_FIXUP_EAPD] = { 2348 .type = HDA_FIXUP_VERBS, 2349 .v.verbs = (const struct hda_verb[]) { 2350 /* change to EAPD mode */ 2351 { 0x20, AC_VERB_SET_COEF_INDEX, 0x07 }, 2352 { 0x20, AC_VERB_SET_PROC_COEF, 0x3060 }, 2353 { } 2354 } 2355 }, 2356 [ALC883_FIXUP_EAPD] = { 2357 .type = HDA_FIXUP_VERBS, 2358 .v.verbs = (const struct hda_verb[]) { 2359 /* change to EAPD mode */ 2360 { 0x20, AC_VERB_SET_COEF_INDEX, 0x07 }, 2361 { 0x20, AC_VERB_SET_PROC_COEF, 0x3070 }, 2362 { } 2363 } 2364 }, 2365 [ALC883_FIXUP_ACER_EAPD] = { 2366 .type = HDA_FIXUP_VERBS, 2367 .v.verbs = (const struct hda_verb[]) { 2368 /* eanable EAPD on Acer laptops */ 2369 { 0x20, AC_VERB_SET_COEF_INDEX, 0x07 }, 2370 { 0x20, AC_VERB_SET_PROC_COEF, 0x3050 }, 2371 { } 2372 } 2373 }, 2374 [ALC882_FIXUP_GPIO1] = { 2375 .type = HDA_FIXUP_FUNC, 2376 .v.func = alc_fixup_gpio1, 2377 }, 2378 [ALC882_FIXUP_GPIO2] = { 2379 .type = HDA_FIXUP_FUNC, 2380 .v.func = alc_fixup_gpio2, 2381 }, 2382 [ALC882_FIXUP_GPIO3] = { 2383 .type = HDA_FIXUP_FUNC, 2384 .v.func = alc_fixup_gpio3, 2385 }, 2386 [ALC882_FIXUP_ASUS_W2JC] = { 2387 .type = HDA_FIXUP_FUNC, 2388 .v.func = alc_fixup_gpio1, 2389 .chained = true, 2390 .chain_id = ALC882_FIXUP_EAPD, 2391 }, 2392 [ALC889_FIXUP_COEF] = { 2393 .type = HDA_FIXUP_FUNC, 2394 .v.func = alc889_fixup_coef, 2395 }, 2396 [ALC882_FIXUP_ACER_ASPIRE_4930G] = { 2397 .type = HDA_FIXUP_PINS, 2398 .v.pins = (const struct hda_pintbl[]) { 2399 { 0x16, 0x99130111 }, /* CLFE speaker */ 2400 { 0x17, 0x99130112 }, /* surround speaker */ 2401 { } 2402 }, 2403 .chained = true, 2404 .chain_id = ALC882_FIXUP_GPIO1, 2405 }, 2406 [ALC882_FIXUP_ACER_ASPIRE_8930G] = { 2407 .type = HDA_FIXUP_PINS, 2408 .v.pins = (const struct hda_pintbl[]) { 2409 { 0x16, 0x99130111 }, /* CLFE speaker */ 2410 { 0x1b, 0x99130112 }, /* surround speaker */ 2411 { } 2412 }, 2413 .chained = true, 2414 .chain_id = ALC882_FIXUP_ASPIRE_8930G_VERBS, 2415 }, 2416 [ALC882_FIXUP_ASPIRE_8930G_VERBS] = { 2417 /* additional init verbs for Acer Aspire 8930G */ 2418 .type = HDA_FIXUP_VERBS, 2419 .v.verbs = (const struct hda_verb[]) { 2420 /* Enable all DACs */ 2421 /* DAC DISABLE/MUTE 1? */ 2422 /* setting bits 1-5 disables DAC nids 0x02-0x06 2423 * apparently. Init=0x38 */ 2424 { 0x20, AC_VERB_SET_COEF_INDEX, 0x03 }, 2425 { 0x20, AC_VERB_SET_PROC_COEF, 0x0000 }, 2426 /* DAC DISABLE/MUTE 2? */ 2427 /* some bit here disables the other DACs. 2428 * Init=0x4900 */ 2429 { 0x20, AC_VERB_SET_COEF_INDEX, 0x08 }, 2430 { 0x20, AC_VERB_SET_PROC_COEF, 0x0000 }, 2431 /* DMIC fix 2432 * This laptop has a stereo digital microphone. 2433 * The mics are only 1cm apart which makes the stereo 2434 * useless. However, either the mic or the ALC889 2435 * makes the signal become a difference/sum signal 2436 * instead of standard stereo, which is annoying. 2437 * So instead we flip this bit which makes the 2438 * codec replicate the sum signal to both channels, 2439 * turning it into a normal mono mic. 2440 */ 2441 /* DMIC_CONTROL? Init value = 0x0001 */ 2442 { 0x20, AC_VERB_SET_COEF_INDEX, 0x0b }, 2443 { 0x20, AC_VERB_SET_PROC_COEF, 0x0003 }, 2444 { 0x20, AC_VERB_SET_COEF_INDEX, 0x07 }, 2445 { 0x20, AC_VERB_SET_PROC_COEF, 0x3050 }, 2446 { } 2447 }, 2448 .chained = true, 2449 .chain_id = ALC882_FIXUP_GPIO1, 2450 }, 2451 [ALC885_FIXUP_MACPRO_GPIO] = { 2452 .type = HDA_FIXUP_FUNC, 2453 .v.func = alc885_fixup_macpro_gpio, 2454 }, 2455 [ALC889_FIXUP_DAC_ROUTE] = { 2456 .type = HDA_FIXUP_FUNC, 2457 .v.func = alc889_fixup_dac_route, 2458 }, 2459 [ALC889_FIXUP_MBP_VREF] = { 2460 .type = HDA_FIXUP_FUNC, 2461 .v.func = alc889_fixup_mbp_vref, 2462 .chained = true, 2463 .chain_id = ALC882_FIXUP_GPIO1, 2464 }, 2465 [ALC889_FIXUP_IMAC91_VREF] = { 2466 .type = HDA_FIXUP_FUNC, 2467 .v.func = alc889_fixup_imac91_vref, 2468 .chained = true, 2469 .chain_id = ALC882_FIXUP_GPIO1, 2470 }, 2471 [ALC889_FIXUP_MBA11_VREF] = { 2472 .type = HDA_FIXUP_FUNC, 2473 .v.func = alc889_fixup_mba11_vref, 2474 .chained = true, 2475 .chain_id = ALC889_FIXUP_MBP_VREF, 2476 }, 2477 [ALC889_FIXUP_MBA21_VREF] = { 2478 .type = HDA_FIXUP_FUNC, 2479 .v.func = alc889_fixup_mba21_vref, 2480 .chained = true, 2481 .chain_id = ALC889_FIXUP_MBP_VREF, 2482 }, 2483 [ALC889_FIXUP_MP11_VREF] = { 2484 .type = HDA_FIXUP_FUNC, 2485 .v.func = alc889_fixup_mba11_vref, 2486 .chained = true, 2487 .chain_id = ALC885_FIXUP_MACPRO_GPIO, 2488 }, 2489 [ALC889_FIXUP_MP41_VREF] = { 2490 .type = HDA_FIXUP_FUNC, 2491 .v.func = alc889_fixup_mbp_vref, 2492 .chained = true, 2493 .chain_id = ALC885_FIXUP_MACPRO_GPIO, 2494 }, 2495 [ALC882_FIXUP_INV_DMIC] = { 2496 .type = HDA_FIXUP_FUNC, 2497 .v.func = alc_fixup_inv_dmic, 2498 }, 2499 [ALC882_FIXUP_NO_PRIMARY_HP] = { 2500 .type = HDA_FIXUP_FUNC, 2501 .v.func = alc882_fixup_no_primary_hp, 2502 }, 2503 [ALC887_FIXUP_ASUS_BASS] = { 2504 .type = HDA_FIXUP_PINS, 2505 .v.pins = (const struct hda_pintbl[]) { 2506 {0x16, 0x99130130}, /* bass speaker */ 2507 {} 2508 }, 2509 .chained = true, 2510 .chain_id = ALC887_FIXUP_BASS_CHMAP, 2511 }, 2512 [ALC887_FIXUP_BASS_CHMAP] = { 2513 .type = HDA_FIXUP_FUNC, 2514 .v.func = alc_fixup_bass_chmap, 2515 }, 2516 [ALC1220_FIXUP_GB_DUAL_CODECS] = { 2517 .type = HDA_FIXUP_FUNC, 2518 .v.func = alc1220_fixup_gb_dual_codecs, 2519 }, 2520 [ALC1220_FIXUP_GB_X570] = { 2521 .type = HDA_FIXUP_FUNC, 2522 .v.func = alc1220_fixup_gb_x570, 2523 }, 2524 [ALC1220_FIXUP_CLEVO_P950] = { 2525 .type = HDA_FIXUP_FUNC, 2526 .v.func = alc1220_fixup_clevo_p950, 2527 }, 2528 [ALC1220_FIXUP_CLEVO_PB51ED] = { 2529 .type = HDA_FIXUP_FUNC, 2530 .v.func = alc1220_fixup_clevo_pb51ed, 2531 }, 2532 [ALC1220_FIXUP_CLEVO_PB51ED_PINS] = { 2533 .type = HDA_FIXUP_PINS, 2534 .v.pins = (const struct hda_pintbl[]) { 2535 { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */ 2536 {} 2537 }, 2538 .chained = true, 2539 .chain_id = ALC1220_FIXUP_CLEVO_PB51ED, 2540 }, 2541 [ALC887_FIXUP_ASUS_AUDIO] = { 2542 .type = HDA_FIXUP_PINS, 2543 .v.pins = (const struct hda_pintbl[]) { 2544 { 0x15, 0x02a14150 }, /* use as headset mic, without its own jack detect */ 2545 { 0x19, 0x22219420 }, 2546 {} 2547 }, 2548 }, 2549 [ALC887_FIXUP_ASUS_HMIC] = { 2550 .type = HDA_FIXUP_FUNC, 2551 .v.func = alc887_fixup_asus_jack, 2552 .chained = true, 2553 .chain_id = ALC887_FIXUP_ASUS_AUDIO, 2554 }, 2555 [ALCS1200A_FIXUP_MIC_VREF] = { 2556 .type = HDA_FIXUP_PINCTLS, 2557 .v.pins = (const struct hda_pintbl[]) { 2558 { 0x18, PIN_VREF50 }, /* rear mic */ 2559 { 0x19, PIN_VREF50 }, /* front mic */ 2560 {} 2561 } 2562 }, 2563 [ALC888VD_FIXUP_MIC_100VREF] = { 2564 .type = HDA_FIXUP_PINCTLS, 2565 .v.pins = (const struct hda_pintbl[]) { 2566 { 0x18, PIN_VREF100 }, /* headset mic */ 2567 {} 2568 } 2569 }, 2570 }; 2571 2572 static const struct hda_quirk alc882_fixup_tbl[] = { 2573 SND_PCI_QUIRK(0x1025, 0x006c, "Acer Aspire 9810", ALC883_FIXUP_ACER_EAPD), 2574 SND_PCI_QUIRK(0x1025, 0x0090, "Acer Aspire", ALC883_FIXUP_ACER_EAPD), 2575 SND_PCI_QUIRK(0x1025, 0x0107, "Acer Aspire", ALC883_FIXUP_ACER_EAPD), 2576 SND_PCI_QUIRK(0x1025, 0x010a, "Acer Ferrari 5000", ALC883_FIXUP_ACER_EAPD), 2577 SND_PCI_QUIRK(0x1025, 0x0110, "Acer Aspire", ALC883_FIXUP_ACER_EAPD), 2578 SND_PCI_QUIRK(0x1025, 0x0112, "Acer Aspire 9303", ALC883_FIXUP_ACER_EAPD), 2579 SND_PCI_QUIRK(0x1025, 0x0121, "Acer Aspire 5920G", ALC883_FIXUP_ACER_EAPD), 2580 SND_PCI_QUIRK(0x1025, 0x013e, "Acer Aspire 4930G", 2581 ALC882_FIXUP_ACER_ASPIRE_4930G), 2582 SND_PCI_QUIRK(0x1025, 0x013f, "Acer Aspire 5930G", 2583 ALC882_FIXUP_ACER_ASPIRE_4930G), 2584 SND_PCI_QUIRK(0x1025, 0x0145, "Acer Aspire 8930G", 2585 ALC882_FIXUP_ACER_ASPIRE_8930G), 2586 SND_PCI_QUIRK(0x1025, 0x0146, "Acer Aspire 6935G", 2587 ALC882_FIXUP_ACER_ASPIRE_8930G), 2588 SND_PCI_QUIRK(0x1025, 0x0142, "Acer Aspire 7730G", 2589 ALC882_FIXUP_ACER_ASPIRE_4930G), 2590 SND_PCI_QUIRK(0x1025, 0x0155, "Packard-Bell M5120", ALC882_FIXUP_PB_M5210), 2591 SND_PCI_QUIRK(0x1025, 0x015e, "Acer Aspire 6930G", 2592 ALC882_FIXUP_ACER_ASPIRE_4930G), 2593 SND_PCI_QUIRK(0x1025, 0x0166, "Acer Aspire 6530G", 2594 ALC882_FIXUP_ACER_ASPIRE_4930G), 2595 SND_PCI_QUIRK(0x1025, 0x021e, "Acer Aspire 5739G", 2596 ALC882_FIXUP_ACER_ASPIRE_4930G), 2597 SND_PCI_QUIRK(0x1025, 0x0259, "Acer Aspire 5935", ALC889_FIXUP_DAC_ROUTE), 2598 SND_PCI_QUIRK(0x1025, 0x026b, "Acer Aspire 8940G", ALC882_FIXUP_ACER_ASPIRE_8930G), 2599 SND_PCI_QUIRK(0x1025, 0x0296, "Acer Aspire 7736z", ALC882_FIXUP_ACER_ASPIRE_7736), 2600 SND_PCI_QUIRK(0x1043, 0x13c2, "Asus A7M", ALC882_FIXUP_EAPD), 2601 SND_PCI_QUIRK(0x1043, 0x1873, "ASUS W90V", ALC882_FIXUP_ASUS_W90V), 2602 SND_PCI_QUIRK(0x1043, 0x1971, "Asus W2JC", ALC882_FIXUP_ASUS_W2JC), 2603 SND_PCI_QUIRK(0x1043, 0x2390, "Asus D700SA", ALC887_FIXUP_ASUS_HMIC), 2604 SND_PCI_QUIRK(0x1043, 0x835f, "Asus Eee 1601", ALC888_FIXUP_EEE1601), 2605 SND_PCI_QUIRK(0x1043, 0x84bc, "ASUS ET2700", ALC887_FIXUP_ASUS_BASS), 2606 SND_PCI_QUIRK(0x1043, 0x8691, "ASUS ROG Ranger VIII", ALC882_FIXUP_GPIO3), 2607 SND_PCI_QUIRK(0x1043, 0x8797, "ASUS TUF B550M-PLUS", ALCS1200A_FIXUP_MIC_VREF), 2608 SND_PCI_QUIRK(0x104d, 0x9043, "Sony Vaio VGC-LN51JGB", ALC882_FIXUP_NO_PRIMARY_HP), 2609 SND_PCI_QUIRK(0x104d, 0x9044, "Sony VAIO AiO", ALC882_FIXUP_NO_PRIMARY_HP), 2610 SND_PCI_QUIRK(0x104d, 0x9047, "Sony Vaio TT", ALC889_FIXUP_VAIO_TT), 2611 SND_PCI_QUIRK(0x104d, 0x905a, "Sony Vaio Z", ALC882_FIXUP_NO_PRIMARY_HP), 2612 SND_PCI_QUIRK(0x104d, 0x9060, "Sony Vaio VPCL14M1R", ALC882_FIXUP_NO_PRIMARY_HP), 2613 2614 /* All Apple entries are in codec SSIDs */ 2615 SND_PCI_QUIRK(0x106b, 0x00a0, "MacBookPro 3,1", ALC889_FIXUP_MBP_VREF), 2616 SND_PCI_QUIRK(0x106b, 0x00a1, "Macbook", ALC889_FIXUP_MBP_VREF), 2617 SND_PCI_QUIRK(0x106b, 0x00a4, "MacbookPro 4,1", ALC889_FIXUP_MBP_VREF), 2618 SND_PCI_QUIRK(0x106b, 0x0c00, "Mac Pro", ALC889_FIXUP_MP11_VREF), 2619 SND_PCI_QUIRK(0x106b, 0x1000, "iMac 24", ALC885_FIXUP_MACPRO_GPIO), 2620 SND_PCI_QUIRK(0x106b, 0x2800, "AppleTV", ALC885_FIXUP_MACPRO_GPIO), 2621 SND_PCI_QUIRK(0x106b, 0x2c00, "MacbookPro rev3", ALC889_FIXUP_MBP_VREF), 2622 SND_PCI_QUIRK(0x106b, 0x3000, "iMac", ALC889_FIXUP_MBP_VREF), 2623 SND_PCI_QUIRK(0x106b, 0x3200, "iMac 7,1 Aluminum", ALC882_FIXUP_EAPD), 2624 SND_PCI_QUIRK(0x106b, 0x3400, "MacBookAir 1,1", ALC889_FIXUP_MBA11_VREF), 2625 SND_PCI_QUIRK(0x106b, 0x3500, "MacBookAir 2,1", ALC889_FIXUP_MBA21_VREF), 2626 SND_PCI_QUIRK(0x106b, 0x3600, "Macbook 3,1", ALC889_FIXUP_MBP_VREF), 2627 SND_PCI_QUIRK(0x106b, 0x3800, "MacbookPro 4,1", ALC889_FIXUP_MBP_VREF), 2628 SND_PCI_QUIRK(0x106b, 0x3e00, "iMac 24 Aluminum", ALC885_FIXUP_MACPRO_GPIO), 2629 SND_PCI_QUIRK(0x106b, 0x3f00, "Macbook 5,1", ALC889_FIXUP_IMAC91_VREF), 2630 SND_PCI_QUIRK(0x106b, 0x4000, "MacbookPro 5,1", ALC889_FIXUP_IMAC91_VREF), 2631 SND_PCI_QUIRK(0x106b, 0x4100, "Macmini 3,1", ALC889_FIXUP_IMAC91_VREF), 2632 SND_PCI_QUIRK(0x106b, 0x4200, "Mac Pro 4,1/5,1", ALC889_FIXUP_MP41_VREF), 2633 SND_PCI_QUIRK(0x106b, 0x4300, "iMac 9,1", ALC889_FIXUP_IMAC91_VREF), 2634 SND_PCI_QUIRK(0x106b, 0x4600, "MacbookPro 5,2", ALC889_FIXUP_IMAC91_VREF), 2635 SND_PCI_QUIRK(0x106b, 0x4900, "iMac 9,1 Aluminum", ALC889_FIXUP_IMAC91_VREF), 2636 SND_PCI_QUIRK(0x106b, 0x4a00, "Macbook 5,2", ALC889_FIXUP_MBA11_VREF), 2637 2638 SND_PCI_QUIRK(0x1071, 0x8258, "Evesham Voyaeger", ALC882_FIXUP_EAPD), 2639 SND_PCI_QUIRK(0x10ec, 0x12d8, "iBase Elo Touch", ALC888VD_FIXUP_MIC_100VREF), 2640 SND_PCI_QUIRK(0x13fe, 0x1009, "Advantech MIT-W101", ALC886_FIXUP_EAPD), 2641 SND_PCI_QUIRK(0x1458, 0xa002, "Gigabyte EP45-DS3/Z87X-UD3H", ALC889_FIXUP_FRONT_HP_NO_PRESENCE), 2642 SND_PCI_QUIRK(0x1458, 0xa0b8, "Gigabyte AZ370-Gaming", ALC1220_FIXUP_GB_DUAL_CODECS), 2643 SND_PCI_QUIRK(0x1458, 0xa0cd, "Gigabyte X570 Aorus Master", ALC1220_FIXUP_GB_X570), 2644 SND_PCI_QUIRK(0x1458, 0xa0ce, "Gigabyte X570 Aorus Xtreme", ALC1220_FIXUP_GB_X570), 2645 SND_PCI_QUIRK(0x1458, 0xa0d5, "Gigabyte X570S Aorus Master", ALC1220_FIXUP_GB_X570), 2646 SND_PCI_QUIRK(0x1462, 0x11f7, "MSI-GE63", ALC1220_FIXUP_CLEVO_P950), 2647 SND_PCI_QUIRK(0x1462, 0x1228, "MSI-GP63", ALC1220_FIXUP_CLEVO_P950), 2648 SND_PCI_QUIRK(0x1462, 0x1229, "MSI-GP73", ALC1220_FIXUP_CLEVO_P950), 2649 SND_PCI_QUIRK(0x1462, 0x1275, "MSI-GL63", ALC1220_FIXUP_CLEVO_P950), 2650 SND_PCI_QUIRK(0x1462, 0x1276, "MSI-GL73", ALC1220_FIXUP_CLEVO_P950), 2651 SND_PCI_QUIRK(0x1462, 0x1293, "MSI-GP65", ALC1220_FIXUP_CLEVO_P950), 2652 SND_PCI_QUIRK(0x1462, 0x7350, "MSI-7350", ALC889_FIXUP_CD), 2653 SND_PCI_QUIRK(0x1462, 0xcc34, "MSI Godlike X570", ALC1220_FIXUP_GB_DUAL_CODECS), 2654 SND_PCI_QUIRK(0x1462, 0xda57, "MSI Z270-Gaming", ALC1220_FIXUP_GB_DUAL_CODECS), 2655 SND_PCI_QUIRK_VENDOR(0x1462, "MSI", ALC882_FIXUP_GPIO3), 2656 SND_PCI_QUIRK(0x147b, 0x107a, "Abit AW9D-MAX", ALC882_FIXUP_ABIT_AW9D_MAX), 2657 SND_PCI_QUIRK(0x1558, 0x3702, "Clevo X370SN[VW]", ALC1220_FIXUP_CLEVO_PB51ED_PINS), 2658 SND_PCI_QUIRK(0x1558, 0x50d3, "Clevo PC50[ER][CDF]", ALC1220_FIXUP_CLEVO_PB51ED_PINS), 2659 SND_PCI_QUIRK(0x1558, 0x65d1, "Clevo PB51[ER][CDF]", ALC1220_FIXUP_CLEVO_PB51ED_PINS), 2660 SND_PCI_QUIRK(0x1558, 0x65d2, "Clevo PB51R[CDF]", ALC1220_FIXUP_CLEVO_PB51ED_PINS), 2661 SND_PCI_QUIRK(0x1558, 0x65e1, "Clevo PB51[ED][DF]", ALC1220_FIXUP_CLEVO_PB51ED_PINS), 2662 SND_PCI_QUIRK(0x1558, 0x65e5, "Clevo PC50D[PRS](?:-D|-G)?", ALC1220_FIXUP_CLEVO_PB51ED_PINS), 2663 SND_PCI_QUIRK(0x1558, 0x65f1, "Clevo PC50HS", ALC1220_FIXUP_CLEVO_PB51ED_PINS), 2664 SND_PCI_QUIRK(0x1558, 0x65f5, "Clevo PD50PN[NRT]", ALC1220_FIXUP_CLEVO_PB51ED_PINS), 2665 SND_PCI_QUIRK(0x1558, 0x66a2, "Clevo PE60RNE", ALC1220_FIXUP_CLEVO_PB51ED_PINS), 2666 SND_PCI_QUIRK(0x1558, 0x66a6, "Clevo PE60SN[CDE]-[GS]", ALC1220_FIXUP_CLEVO_PB51ED_PINS), 2667 SND_PCI_QUIRK(0x1558, 0x67d1, "Clevo PB71[ER][CDF]", ALC1220_FIXUP_CLEVO_PB51ED_PINS), 2668 SND_PCI_QUIRK(0x1558, 0x67e1, "Clevo PB71[DE][CDF]", ALC1220_FIXUP_CLEVO_PB51ED_PINS), 2669 SND_PCI_QUIRK(0x1558, 0x67e5, "Clevo PC70D[PRS](?:-D|-G)?", ALC1220_FIXUP_CLEVO_PB51ED_PINS), 2670 SND_PCI_QUIRK(0x1558, 0x67f1, "Clevo PC70H[PRS]", ALC1220_FIXUP_CLEVO_PB51ED_PINS), 2671 SND_PCI_QUIRK(0x1558, 0x67f5, "Clevo PD70PN[NRT]", ALC1220_FIXUP_CLEVO_PB51ED_PINS), 2672 SND_PCI_QUIRK(0x1558, 0x70d1, "Clevo PC70[ER][CDF]", ALC1220_FIXUP_CLEVO_PB51ED_PINS), 2673 SND_PCI_QUIRK(0x1558, 0x7714, "Clevo X170SM", ALC1220_FIXUP_CLEVO_PB51ED_PINS), 2674 SND_PCI_QUIRK(0x1558, 0x7715, "Clevo X170KM-G", ALC1220_FIXUP_CLEVO_PB51ED), 2675 SND_PCI_QUIRK(0x1558, 0x9501, "Clevo P950HR", ALC1220_FIXUP_CLEVO_P950), 2676 SND_PCI_QUIRK(0x1558, 0x9506, "Clevo P955HQ", ALC1220_FIXUP_CLEVO_P950), 2677 SND_PCI_QUIRK(0x1558, 0x950a, "Clevo P955H[PR]", ALC1220_FIXUP_CLEVO_P950), 2678 SND_PCI_QUIRK(0x1558, 0x95e1, "Clevo P95xER", ALC1220_FIXUP_CLEVO_P950), 2679 SND_PCI_QUIRK(0x1558, 0x95e2, "Clevo P950ER", ALC1220_FIXUP_CLEVO_P950), 2680 SND_PCI_QUIRK(0x1558, 0x95e3, "Clevo P955[ER]T", ALC1220_FIXUP_CLEVO_P950), 2681 SND_PCI_QUIRK(0x1558, 0x95e4, "Clevo P955ER", ALC1220_FIXUP_CLEVO_P950), 2682 SND_PCI_QUIRK(0x1558, 0x95e5, "Clevo P955EE6", ALC1220_FIXUP_CLEVO_P950), 2683 SND_PCI_QUIRK(0x1558, 0x95e6, "Clevo P950R[CDF]", ALC1220_FIXUP_CLEVO_P950), 2684 SND_PCI_QUIRK(0x1558, 0x96e1, "Clevo P960[ER][CDFN]-K", ALC1220_FIXUP_CLEVO_P950), 2685 SND_PCI_QUIRK(0x1558, 0x97e1, "Clevo P970[ER][CDFN]", ALC1220_FIXUP_CLEVO_P950), 2686 SND_PCI_QUIRK(0x1558, 0x97e2, "Clevo P970RC-M", ALC1220_FIXUP_CLEVO_P950), 2687 SND_PCI_QUIRK(0x1558, 0xd502, "Clevo PD50SNE", ALC1220_FIXUP_CLEVO_PB51ED_PINS), 2688 SND_PCI_QUIRK_VENDOR(0x1558, "Clevo laptop", ALC882_FIXUP_EAPD), 2689 SND_PCI_QUIRK(0x161f, 0x2054, "Medion laptop", ALC883_FIXUP_EAPD), 2690 SND_PCI_QUIRK(0x17aa, 0x3a0d, "Lenovo Y530", ALC882_FIXUP_LENOVO_Y530), 2691 SND_PCI_QUIRK(0x8086, 0x0022, "DX58SO", ALC889_FIXUP_COEF), 2692 {} 2693 }; 2694 2695 static const struct hda_model_fixup alc882_fixup_models[] = { 2696 {.id = ALC882_FIXUP_ABIT_AW9D_MAX, .name = "abit-aw9d"}, 2697 {.id = ALC882_FIXUP_LENOVO_Y530, .name = "lenovo-y530"}, 2698 {.id = ALC882_FIXUP_ACER_ASPIRE_7736, .name = "acer-aspire-7736"}, 2699 {.id = ALC882_FIXUP_ASUS_W90V, .name = "asus-w90v"}, 2700 {.id = ALC889_FIXUP_CD, .name = "cd"}, 2701 {.id = ALC889_FIXUP_FRONT_HP_NO_PRESENCE, .name = "no-front-hp"}, 2702 {.id = ALC889_FIXUP_VAIO_TT, .name = "vaio-tt"}, 2703 {.id = ALC888_FIXUP_EEE1601, .name = "eee1601"}, 2704 {.id = ALC882_FIXUP_EAPD, .name = "alc882-eapd"}, 2705 {.id = ALC883_FIXUP_EAPD, .name = "alc883-eapd"}, 2706 {.id = ALC882_FIXUP_GPIO1, .name = "gpio1"}, 2707 {.id = ALC882_FIXUP_GPIO2, .name = "gpio2"}, 2708 {.id = ALC882_FIXUP_GPIO3, .name = "gpio3"}, 2709 {.id = ALC889_FIXUP_COEF, .name = "alc889-coef"}, 2710 {.id = ALC882_FIXUP_ASUS_W2JC, .name = "asus-w2jc"}, 2711 {.id = ALC882_FIXUP_ACER_ASPIRE_4930G, .name = "acer-aspire-4930g"}, 2712 {.id = ALC882_FIXUP_ACER_ASPIRE_8930G, .name = "acer-aspire-8930g"}, 2713 {.id = ALC883_FIXUP_ACER_EAPD, .name = "acer-aspire"}, 2714 {.id = ALC885_FIXUP_MACPRO_GPIO, .name = "macpro-gpio"}, 2715 {.id = ALC889_FIXUP_DAC_ROUTE, .name = "dac-route"}, 2716 {.id = ALC889_FIXUP_MBP_VREF, .name = "mbp-vref"}, 2717 {.id = ALC889_FIXUP_IMAC91_VREF, .name = "imac91-vref"}, 2718 {.id = ALC889_FIXUP_MBA11_VREF, .name = "mba11-vref"}, 2719 {.id = ALC889_FIXUP_MBA21_VREF, .name = "mba21-vref"}, 2720 {.id = ALC889_FIXUP_MP11_VREF, .name = "mp11-vref"}, 2721 {.id = ALC889_FIXUP_MP41_VREF, .name = "mp41-vref"}, 2722 {.id = ALC882_FIXUP_INV_DMIC, .name = "inv-dmic"}, 2723 {.id = ALC882_FIXUP_NO_PRIMARY_HP, .name = "no-primary-hp"}, 2724 {.id = ALC887_FIXUP_ASUS_BASS, .name = "asus-bass"}, 2725 {.id = ALC1220_FIXUP_GB_DUAL_CODECS, .name = "dual-codecs"}, 2726 {.id = ALC1220_FIXUP_GB_X570, .name = "gb-x570"}, 2727 {.id = ALC1220_FIXUP_CLEVO_P950, .name = "clevo-p950"}, 2728 {} 2729 }; 2730 2731 static const struct snd_hda_pin_quirk alc882_pin_fixup_tbl[] = { 2732 SND_HDA_PIN_QUIRK(0x10ec1220, 0x1043, "ASUS", ALC1220_FIXUP_CLEVO_P950, 2733 {0x14, 0x01014010}, 2734 {0x15, 0x01011012}, 2735 {0x16, 0x01016011}, 2736 {0x18, 0x01a19040}, 2737 {0x19, 0x02a19050}, 2738 {0x1a, 0x0181304f}, 2739 {0x1b, 0x0221401f}, 2740 {0x1e, 0x01456130}), 2741 SND_HDA_PIN_QUIRK(0x10ec1220, 0x1462, "MS-7C35", ALC1220_FIXUP_CLEVO_P950, 2742 {0x14, 0x01015010}, 2743 {0x15, 0x01011012}, 2744 {0x16, 0x01011011}, 2745 {0x18, 0x01a11040}, 2746 {0x19, 0x02a19050}, 2747 {0x1a, 0x0181104f}, 2748 {0x1b, 0x0221401f}, 2749 {0x1e, 0x01451130}), 2750 {} 2751 }; 2752 2753 /* 2754 * BIOS auto configuration 2755 */ 2756 /* almost identical with ALC880 parser... */ 2757 static int alc882_parse_auto_config(struct hda_codec *codec) 2758 { 2759 static const hda_nid_t alc882_ignore[] = { 0x1d, 0 }; 2760 static const hda_nid_t alc882_ssids[] = { 0x15, 0x1b, 0x14, 0 }; 2761 return alc_parse_auto_config(codec, alc882_ignore, alc882_ssids); 2762 } 2763 2764 /* 2765 */ 2766 static int patch_alc882(struct hda_codec *codec) 2767 { 2768 struct alc_spec *spec; 2769 int err; 2770 2771 err = alc_alloc_spec(codec, 0x0b); 2772 if (err < 0) 2773 return err; 2774 2775 spec = codec->spec; 2776 2777 switch (codec->core.vendor_id) { 2778 case 0x10ec0882: 2779 case 0x10ec0885: 2780 case 0x10ec0900: 2781 case 0x10ec0b00: 2782 case 0x10ec1220: 2783 break; 2784 default: 2785 /* ALC883 and variants */ 2786 alc_fix_pll_init(codec, 0x20, 0x0a, 10); 2787 break; 2788 } 2789 2790 alc_pre_init(codec); 2791 2792 snd_hda_pick_fixup(codec, alc882_fixup_models, alc882_fixup_tbl, 2793 alc882_fixups); 2794 snd_hda_pick_pin_fixup(codec, alc882_pin_fixup_tbl, alc882_fixups, true); 2795 snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PRE_PROBE); 2796 2797 alc_auto_parse_customize_define(codec); 2798 2799 if (has_cdefine_beep(codec)) 2800 spec->gen.beep_nid = 0x01; 2801 2802 /* automatic parse from the BIOS config */ 2803 err = alc882_parse_auto_config(codec); 2804 if (err < 0) 2805 goto error; 2806 2807 if (!spec->gen.no_analog && spec->gen.beep_nid) { 2808 err = set_beep_amp(spec, 0x0b, 0x05, HDA_INPUT); 2809 if (err < 0) 2810 goto error; 2811 } 2812 2813 snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PROBE); 2814 2815 return 0; 2816 2817 error: 2818 alc_free(codec); 2819 return err; 2820 } 2821 2822 2823 /* 2824 * ALC262 support 2825 */ 2826 static int alc262_parse_auto_config(struct hda_codec *codec) 2827 { 2828 static const hda_nid_t alc262_ignore[] = { 0x1d, 0 }; 2829 static const hda_nid_t alc262_ssids[] = { 0x15, 0x1b, 0x14, 0 }; 2830 return alc_parse_auto_config(codec, alc262_ignore, alc262_ssids); 2831 } 2832 2833 /* 2834 * Pin config fixes 2835 */ 2836 enum { 2837 ALC262_FIXUP_FSC_H270, 2838 ALC262_FIXUP_FSC_S7110, 2839 ALC262_FIXUP_HP_Z200, 2840 ALC262_FIXUP_TYAN, 2841 ALC262_FIXUP_LENOVO_3000, 2842 ALC262_FIXUP_BENQ, 2843 ALC262_FIXUP_BENQ_T31, 2844 ALC262_FIXUP_INV_DMIC, 2845 ALC262_FIXUP_INTEL_BAYLEYBAY, 2846 }; 2847 2848 static const struct hda_fixup alc262_fixups[] = { 2849 [ALC262_FIXUP_FSC_H270] = { 2850 .type = HDA_FIXUP_PINS, 2851 .v.pins = (const struct hda_pintbl[]) { 2852 { 0x14, 0x99130110 }, /* speaker */ 2853 { 0x15, 0x0221142f }, /* front HP */ 2854 { 0x1b, 0x0121141f }, /* rear HP */ 2855 { } 2856 } 2857 }, 2858 [ALC262_FIXUP_FSC_S7110] = { 2859 .type = HDA_FIXUP_PINS, 2860 .v.pins = (const struct hda_pintbl[]) { 2861 { 0x15, 0x90170110 }, /* speaker */ 2862 { } 2863 }, 2864 .chained = true, 2865 .chain_id = ALC262_FIXUP_BENQ, 2866 }, 2867 [ALC262_FIXUP_HP_Z200] = { 2868 .type = HDA_FIXUP_PINS, 2869 .v.pins = (const struct hda_pintbl[]) { 2870 { 0x16, 0x99130120 }, /* internal speaker */ 2871 { } 2872 } 2873 }, 2874 [ALC262_FIXUP_TYAN] = { 2875 .type = HDA_FIXUP_PINS, 2876 .v.pins = (const struct hda_pintbl[]) { 2877 { 0x14, 0x1993e1f0 }, /* int AUX */ 2878 { } 2879 } 2880 }, 2881 [ALC262_FIXUP_LENOVO_3000] = { 2882 .type = HDA_FIXUP_PINCTLS, 2883 .v.pins = (const struct hda_pintbl[]) { 2884 { 0x19, PIN_VREF50 }, 2885 {} 2886 }, 2887 .chained = true, 2888 .chain_id = ALC262_FIXUP_BENQ, 2889 }, 2890 [ALC262_FIXUP_BENQ] = { 2891 .type = HDA_FIXUP_VERBS, 2892 .v.verbs = (const struct hda_verb[]) { 2893 { 0x20, AC_VERB_SET_COEF_INDEX, 0x07 }, 2894 { 0x20, AC_VERB_SET_PROC_COEF, 0x3070 }, 2895 {} 2896 } 2897 }, 2898 [ALC262_FIXUP_BENQ_T31] = { 2899 .type = HDA_FIXUP_VERBS, 2900 .v.verbs = (const struct hda_verb[]) { 2901 { 0x20, AC_VERB_SET_COEF_INDEX, 0x07 }, 2902 { 0x20, AC_VERB_SET_PROC_COEF, 0x3050 }, 2903 {} 2904 } 2905 }, 2906 [ALC262_FIXUP_INV_DMIC] = { 2907 .type = HDA_FIXUP_FUNC, 2908 .v.func = alc_fixup_inv_dmic, 2909 }, 2910 [ALC262_FIXUP_INTEL_BAYLEYBAY] = { 2911 .type = HDA_FIXUP_FUNC, 2912 .v.func = alc_fixup_no_depop_delay, 2913 }, 2914 }; 2915 2916 static const struct hda_quirk alc262_fixup_tbl[] = { 2917 SND_PCI_QUIRK(0x103c, 0x170b, "HP Z200", ALC262_FIXUP_HP_Z200), 2918 SND_PCI_QUIRK(0x10cf, 0x1397, "Fujitsu Lifebook S7110", ALC262_FIXUP_FSC_S7110), 2919 SND_PCI_QUIRK(0x10cf, 0x142d, "Fujitsu Lifebook E8410", ALC262_FIXUP_BENQ), 2920 SND_PCI_QUIRK(0x10f1, 0x2915, "Tyan Thunder n6650W", ALC262_FIXUP_TYAN), 2921 SND_PCI_QUIRK(0x1734, 0x1141, "FSC ESPRIMO U9210", ALC262_FIXUP_FSC_H270), 2922 SND_PCI_QUIRK(0x1734, 0x1147, "FSC Celsius H270", ALC262_FIXUP_FSC_H270), 2923 SND_PCI_QUIRK(0x17aa, 0x384e, "Lenovo 3000", ALC262_FIXUP_LENOVO_3000), 2924 SND_PCI_QUIRK(0x17ff, 0x0560, "Benq ED8", ALC262_FIXUP_BENQ), 2925 SND_PCI_QUIRK(0x17ff, 0x058d, "Benq T31-16", ALC262_FIXUP_BENQ_T31), 2926 SND_PCI_QUIRK(0x8086, 0x7270, "BayleyBay", ALC262_FIXUP_INTEL_BAYLEYBAY), 2927 {} 2928 }; 2929 2930 static const struct hda_model_fixup alc262_fixup_models[] = { 2931 {.id = ALC262_FIXUP_INV_DMIC, .name = "inv-dmic"}, 2932 {.id = ALC262_FIXUP_FSC_H270, .name = "fsc-h270"}, 2933 {.id = ALC262_FIXUP_FSC_S7110, .name = "fsc-s7110"}, 2934 {.id = ALC262_FIXUP_HP_Z200, .name = "hp-z200"}, 2935 {.id = ALC262_FIXUP_TYAN, .name = "tyan"}, 2936 {.id = ALC262_FIXUP_LENOVO_3000, .name = "lenovo-3000"}, 2937 {.id = ALC262_FIXUP_BENQ, .name = "benq"}, 2938 {.id = ALC262_FIXUP_BENQ_T31, .name = "benq-t31"}, 2939 {.id = ALC262_FIXUP_INTEL_BAYLEYBAY, .name = "bayleybay"}, 2940 {} 2941 }; 2942 2943 /* 2944 */ 2945 static int patch_alc262(struct hda_codec *codec) 2946 { 2947 struct alc_spec *spec; 2948 int err; 2949 2950 err = alc_alloc_spec(codec, 0x0b); 2951 if (err < 0) 2952 return err; 2953 2954 spec = codec->spec; 2955 spec->gen.shared_mic_vref_pin = 0x18; 2956 2957 spec->shutup = alc_eapd_shutup; 2958 2959 #if 0 2960 /* pshou 07/11/05 set a zero PCM sample to DAC when FIFO is 2961 * under-run 2962 */ 2963 alc_update_coefex_idx(codec, 0x1a, 7, 0, 0x80); 2964 #endif 2965 alc_fix_pll_init(codec, 0x20, 0x0a, 10); 2966 2967 alc_pre_init(codec); 2968 2969 snd_hda_pick_fixup(codec, alc262_fixup_models, alc262_fixup_tbl, 2970 alc262_fixups); 2971 snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PRE_PROBE); 2972 2973 alc_auto_parse_customize_define(codec); 2974 2975 if (has_cdefine_beep(codec)) 2976 spec->gen.beep_nid = 0x01; 2977 2978 /* automatic parse from the BIOS config */ 2979 err = alc262_parse_auto_config(codec); 2980 if (err < 0) 2981 goto error; 2982 2983 if (!spec->gen.no_analog && spec->gen.beep_nid) { 2984 err = set_beep_amp(spec, 0x0b, 0x05, HDA_INPUT); 2985 if (err < 0) 2986 goto error; 2987 } 2988 2989 snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PROBE); 2990 2991 return 0; 2992 2993 error: 2994 alc_free(codec); 2995 return err; 2996 } 2997 2998 /* 2999 * ALC268 3000 */ 3001 /* bind Beep switches of both NID 0x0f and 0x10 */ 3002 static int alc268_beep_switch_put(struct snd_kcontrol *kcontrol, 3003 struct snd_ctl_elem_value *ucontrol) 3004 { 3005 struct hda_codec *codec = snd_kcontrol_chip(kcontrol); 3006 unsigned long pval; 3007 int err; 3008 3009 mutex_lock(&codec->control_mutex); 3010 pval = kcontrol->private_value; 3011 kcontrol->private_value = (pval & ~0xff) | 0x0f; 3012 err = snd_hda_mixer_amp_switch_put(kcontrol, ucontrol); 3013 if (err >= 0) { 3014 kcontrol->private_value = (pval & ~0xff) | 0x10; 3015 err = snd_hda_mixer_amp_switch_put(kcontrol, ucontrol); 3016 } 3017 kcontrol->private_value = pval; 3018 mutex_unlock(&codec->control_mutex); 3019 return err; 3020 } 3021 3022 static const struct snd_kcontrol_new alc268_beep_mixer[] = { 3023 HDA_CODEC_VOLUME("Beep Playback Volume", 0x1d, 0x0, HDA_INPUT), 3024 { 3025 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 3026 .name = "Beep Playback Switch", 3027 .subdevice = HDA_SUBDEV_AMP_FLAG, 3028 .info = snd_hda_mixer_amp_switch_info, 3029 .get = snd_hda_mixer_amp_switch_get, 3030 .put = alc268_beep_switch_put, 3031 .private_value = HDA_COMPOSE_AMP_VAL(0x0f, 3, 1, HDA_INPUT) 3032 }, 3033 }; 3034 3035 /* set PCBEEP vol = 0, mute connections */ 3036 static const struct hda_verb alc268_beep_init_verbs[] = { 3037 {0x1d, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, 3038 {0x0f, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(1)}, 3039 {0x10, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(1)}, 3040 { } 3041 }; 3042 3043 enum { 3044 ALC268_FIXUP_INV_DMIC, 3045 ALC268_FIXUP_HP_EAPD, 3046 ALC268_FIXUP_SPDIF, 3047 }; 3048 3049 static const struct hda_fixup alc268_fixups[] = { 3050 [ALC268_FIXUP_INV_DMIC] = { 3051 .type = HDA_FIXUP_FUNC, 3052 .v.func = alc_fixup_inv_dmic, 3053 }, 3054 [ALC268_FIXUP_HP_EAPD] = { 3055 .type = HDA_FIXUP_VERBS, 3056 .v.verbs = (const struct hda_verb[]) { 3057 {0x15, AC_VERB_SET_EAPD_BTLENABLE, 0}, 3058 {} 3059 } 3060 }, 3061 [ALC268_FIXUP_SPDIF] = { 3062 .type = HDA_FIXUP_PINS, 3063 .v.pins = (const struct hda_pintbl[]) { 3064 { 0x1e, 0x014b1180 }, /* enable SPDIF out */ 3065 {} 3066 } 3067 }, 3068 }; 3069 3070 static const struct hda_model_fixup alc268_fixup_models[] = { 3071 {.id = ALC268_FIXUP_INV_DMIC, .name = "inv-dmic"}, 3072 {.id = ALC268_FIXUP_HP_EAPD, .name = "hp-eapd"}, 3073 {.id = ALC268_FIXUP_SPDIF, .name = "spdif"}, 3074 {} 3075 }; 3076 3077 static const struct hda_quirk alc268_fixup_tbl[] = { 3078 SND_PCI_QUIRK(0x1025, 0x0139, "Acer TravelMate 6293", ALC268_FIXUP_SPDIF), 3079 SND_PCI_QUIRK(0x1025, 0x015b, "Acer AOA 150 (ZG5)", ALC268_FIXUP_INV_DMIC), 3080 /* below is codec SSID since multiple Toshiba laptops have the 3081 * same PCI SSID 1179:ff00 3082 */ 3083 SND_PCI_QUIRK(0x1179, 0xff06, "Toshiba P200", ALC268_FIXUP_HP_EAPD), 3084 {} 3085 }; 3086 3087 /* 3088 * BIOS auto configuration 3089 */ 3090 static int alc268_parse_auto_config(struct hda_codec *codec) 3091 { 3092 static const hda_nid_t alc268_ssids[] = { 0x15, 0x1b, 0x14, 0 }; 3093 return alc_parse_auto_config(codec, NULL, alc268_ssids); 3094 } 3095 3096 /* 3097 */ 3098 static int patch_alc268(struct hda_codec *codec) 3099 { 3100 struct alc_spec *spec; 3101 int i, err; 3102 3103 /* ALC268 has no aa-loopback mixer */ 3104 err = alc_alloc_spec(codec, 0); 3105 if (err < 0) 3106 return err; 3107 3108 spec = codec->spec; 3109 if (has_cdefine_beep(codec)) 3110 spec->gen.beep_nid = 0x01; 3111 3112 spec->shutup = alc_eapd_shutup; 3113 3114 alc_pre_init(codec); 3115 3116 snd_hda_pick_fixup(codec, alc268_fixup_models, alc268_fixup_tbl, alc268_fixups); 3117 snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PRE_PROBE); 3118 3119 /* automatic parse from the BIOS config */ 3120 err = alc268_parse_auto_config(codec); 3121 if (err < 0) 3122 goto error; 3123 3124 if (err > 0 && !spec->gen.no_analog && 3125 spec->gen.autocfg.speaker_pins[0] != 0x1d) { 3126 for (i = 0; i < ARRAY_SIZE(alc268_beep_mixer); i++) { 3127 if (!snd_hda_gen_add_kctl(&spec->gen, NULL, 3128 &alc268_beep_mixer[i])) { 3129 err = -ENOMEM; 3130 goto error; 3131 } 3132 } 3133 snd_hda_add_verbs(codec, alc268_beep_init_verbs); 3134 if (!query_amp_caps(codec, 0x1d, HDA_INPUT)) 3135 /* override the amp caps for beep generator */ 3136 snd_hda_override_amp_caps(codec, 0x1d, HDA_INPUT, 3137 (0x0c << AC_AMPCAP_OFFSET_SHIFT) | 3138 (0x0c << AC_AMPCAP_NUM_STEPS_SHIFT) | 3139 (0x07 << AC_AMPCAP_STEP_SIZE_SHIFT) | 3140 (0 << AC_AMPCAP_MUTE_SHIFT)); 3141 } 3142 3143 snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PROBE); 3144 3145 return 0; 3146 3147 error: 3148 alc_free(codec); 3149 return err; 3150 } 3151 3152 /* 3153 * ALC269 3154 */ 3155 3156 static const struct hda_pcm_stream alc269_44k_pcm_analog_playback = { 3157 .rates = SNDRV_PCM_RATE_44100, /* fixed rate */ 3158 }; 3159 3160 static const struct hda_pcm_stream alc269_44k_pcm_analog_capture = { 3161 .rates = SNDRV_PCM_RATE_44100, /* fixed rate */ 3162 }; 3163 3164 /* different alc269-variants */ 3165 enum { 3166 ALC269_TYPE_ALC269VA, 3167 ALC269_TYPE_ALC269VB, 3168 ALC269_TYPE_ALC269VC, 3169 ALC269_TYPE_ALC269VD, 3170 ALC269_TYPE_ALC280, 3171 ALC269_TYPE_ALC282, 3172 ALC269_TYPE_ALC283, 3173 ALC269_TYPE_ALC284, 3174 ALC269_TYPE_ALC293, 3175 ALC269_TYPE_ALC286, 3176 ALC269_TYPE_ALC298, 3177 ALC269_TYPE_ALC255, 3178 ALC269_TYPE_ALC256, 3179 ALC269_TYPE_ALC257, 3180 ALC269_TYPE_ALC215, 3181 ALC269_TYPE_ALC225, 3182 ALC269_TYPE_ALC245, 3183 ALC269_TYPE_ALC287, 3184 ALC269_TYPE_ALC294, 3185 ALC269_TYPE_ALC300, 3186 ALC269_TYPE_ALC623, 3187 ALC269_TYPE_ALC700, 3188 }; 3189 3190 /* 3191 * BIOS auto configuration 3192 */ 3193 static int alc269_parse_auto_config(struct hda_codec *codec) 3194 { 3195 static const hda_nid_t alc269_ignore[] = { 0x1d, 0 }; 3196 static const hda_nid_t alc269_ssids[] = { 0, 0x1b, 0x14, 0x21 }; 3197 static const hda_nid_t alc269va_ssids[] = { 0x15, 0x1b, 0x14, 0 }; 3198 struct alc_spec *spec = codec->spec; 3199 const hda_nid_t *ssids; 3200 3201 switch (spec->codec_variant) { 3202 case ALC269_TYPE_ALC269VA: 3203 case ALC269_TYPE_ALC269VC: 3204 case ALC269_TYPE_ALC280: 3205 case ALC269_TYPE_ALC284: 3206 case ALC269_TYPE_ALC293: 3207 ssids = alc269va_ssids; 3208 break; 3209 case ALC269_TYPE_ALC269VB: 3210 case ALC269_TYPE_ALC269VD: 3211 case ALC269_TYPE_ALC282: 3212 case ALC269_TYPE_ALC283: 3213 case ALC269_TYPE_ALC286: 3214 case ALC269_TYPE_ALC298: 3215 case ALC269_TYPE_ALC255: 3216 case ALC269_TYPE_ALC256: 3217 case ALC269_TYPE_ALC257: 3218 case ALC269_TYPE_ALC215: 3219 case ALC269_TYPE_ALC225: 3220 case ALC269_TYPE_ALC245: 3221 case ALC269_TYPE_ALC287: 3222 case ALC269_TYPE_ALC294: 3223 case ALC269_TYPE_ALC300: 3224 case ALC269_TYPE_ALC623: 3225 case ALC269_TYPE_ALC700: 3226 ssids = alc269_ssids; 3227 break; 3228 default: 3229 ssids = alc269_ssids; 3230 break; 3231 } 3232 3233 return alc_parse_auto_config(codec, alc269_ignore, ssids); 3234 } 3235 3236 static const struct hda_jack_keymap alc_headset_btn_keymap[] = { 3237 { SND_JACK_BTN_0, KEY_PLAYPAUSE }, 3238 { SND_JACK_BTN_1, KEY_VOICECOMMAND }, 3239 { SND_JACK_BTN_2, KEY_VOLUMEUP }, 3240 { SND_JACK_BTN_3, KEY_VOLUMEDOWN }, 3241 {} 3242 }; 3243 3244 static void alc_headset_btn_callback(struct hda_codec *codec, 3245 struct hda_jack_callback *jack) 3246 { 3247 int report = 0; 3248 3249 if (jack->unsol_res & (7 << 13)) 3250 report |= SND_JACK_BTN_0; 3251 3252 if (jack->unsol_res & (1 << 16 | 3 << 8)) 3253 report |= SND_JACK_BTN_1; 3254 3255 /* Volume up key */ 3256 if (jack->unsol_res & (7 << 23)) 3257 report |= SND_JACK_BTN_2; 3258 3259 /* Volume down key */ 3260 if (jack->unsol_res & (7 << 10)) 3261 report |= SND_JACK_BTN_3; 3262 3263 snd_hda_jack_set_button_state(codec, jack->nid, report); 3264 } 3265 3266 static void alc_disable_headset_jack_key(struct hda_codec *codec) 3267 { 3268 struct alc_spec *spec = codec->spec; 3269 3270 if (!spec->has_hs_key) 3271 return; 3272 3273 switch (codec->core.vendor_id) { 3274 case 0x10ec0215: 3275 case 0x10ec0225: 3276 case 0x10ec0285: 3277 case 0x10ec0287: 3278 case 0x10ec0295: 3279 case 0x10ec0289: 3280 case 0x10ec0299: 3281 alc_write_coef_idx(codec, 0x48, 0x0); 3282 alc_update_coef_idx(codec, 0x49, 0x0045, 0x0); 3283 alc_update_coef_idx(codec, 0x44, 0x0045 << 8, 0x0); 3284 break; 3285 case 0x10ec0230: 3286 case 0x10ec0236: 3287 case 0x10ec0256: 3288 case 0x10ec0257: 3289 case 0x19e58326: 3290 alc_write_coef_idx(codec, 0x48, 0x0); 3291 alc_update_coef_idx(codec, 0x49, 0x0045, 0x0); 3292 break; 3293 } 3294 } 3295 3296 static void alc_enable_headset_jack_key(struct hda_codec *codec) 3297 { 3298 struct alc_spec *spec = codec->spec; 3299 3300 if (!spec->has_hs_key) 3301 return; 3302 3303 switch (codec->core.vendor_id) { 3304 case 0x10ec0215: 3305 case 0x10ec0225: 3306 case 0x10ec0285: 3307 case 0x10ec0287: 3308 case 0x10ec0295: 3309 case 0x10ec0289: 3310 case 0x10ec0299: 3311 alc_write_coef_idx(codec, 0x48, 0xd011); 3312 alc_update_coef_idx(codec, 0x49, 0x007f, 0x0045); 3313 alc_update_coef_idx(codec, 0x44, 0x007f << 8, 0x0045 << 8); 3314 break; 3315 case 0x10ec0230: 3316 case 0x10ec0236: 3317 case 0x10ec0256: 3318 case 0x10ec0257: 3319 case 0x19e58326: 3320 alc_write_coef_idx(codec, 0x48, 0xd011); 3321 alc_update_coef_idx(codec, 0x49, 0x007f, 0x0045); 3322 break; 3323 } 3324 } 3325 3326 static void alc_fixup_headset_jack(struct hda_codec *codec, 3327 const struct hda_fixup *fix, int action) 3328 { 3329 struct alc_spec *spec = codec->spec; 3330 hda_nid_t hp_pin; 3331 3332 switch (action) { 3333 case HDA_FIXUP_ACT_PRE_PROBE: 3334 spec->has_hs_key = 1; 3335 snd_hda_jack_detect_enable_callback(codec, 0x55, 3336 alc_headset_btn_callback); 3337 break; 3338 case HDA_FIXUP_ACT_BUILD: 3339 hp_pin = alc_get_hp_pin(spec); 3340 if (!hp_pin || snd_hda_jack_bind_keymap(codec, 0x55, 3341 alc_headset_btn_keymap, 3342 hp_pin)) 3343 snd_hda_jack_add_kctl(codec, 0x55, "Headset Jack", 3344 false, SND_JACK_HEADSET, 3345 alc_headset_btn_keymap); 3346 3347 alc_enable_headset_jack_key(codec); 3348 break; 3349 } 3350 } 3351 3352 static void alc269vb_toggle_power_output(struct hda_codec *codec, int power_up) 3353 { 3354 alc_update_coef_idx(codec, 0x04, 1 << 11, power_up ? (1 << 11) : 0); 3355 } 3356 3357 static void alc269_shutup(struct hda_codec *codec) 3358 { 3359 struct alc_spec *spec = codec->spec; 3360 3361 if (spec->codec_variant == ALC269_TYPE_ALC269VB) 3362 alc269vb_toggle_power_output(codec, 0); 3363 if (spec->codec_variant == ALC269_TYPE_ALC269VB && 3364 (alc_get_coef0(codec) & 0x00ff) == 0x018) { 3365 msleep(150); 3366 } 3367 alc_shutup_pins(codec); 3368 } 3369 3370 static const struct coef_fw alc282_coefs[] = { 3371 WRITE_COEF(0x03, 0x0002), /* Power Down Control */ 3372 UPDATE_COEF(0x05, 0xff3f, 0x0700), /* FIFO and filter clock */ 3373 WRITE_COEF(0x07, 0x0200), /* DMIC control */ 3374 UPDATE_COEF(0x06, 0x00f0, 0), /* Analog clock */ 3375 UPDATE_COEF(0x08, 0xfffc, 0x0c2c), /* JD */ 3376 WRITE_COEF(0x0a, 0xcccc), /* JD offset1 */ 3377 WRITE_COEF(0x0b, 0xcccc), /* JD offset2 */ 3378 WRITE_COEF(0x0e, 0x6e00), /* LDO1/2/3, DAC/ADC */ 3379 UPDATE_COEF(0x0f, 0xf800, 0x1000), /* JD */ 3380 UPDATE_COEF(0x10, 0xfc00, 0x0c00), /* Capless */ 3381 WRITE_COEF(0x6f, 0x0), /* Class D test 4 */ 3382 UPDATE_COEF(0x0c, 0xfe00, 0), /* IO power down directly */ 3383 WRITE_COEF(0x34, 0xa0c0), /* ANC */ 3384 UPDATE_COEF(0x16, 0x0008, 0), /* AGC MUX */ 3385 UPDATE_COEF(0x1d, 0x00e0, 0), /* DAC simple content protection */ 3386 UPDATE_COEF(0x1f, 0x00e0, 0), /* ADC simple content protection */ 3387 WRITE_COEF(0x21, 0x8804), /* DAC ADC Zero Detection */ 3388 WRITE_COEF(0x63, 0x2902), /* PLL */ 3389 WRITE_COEF(0x68, 0xa080), /* capless control 2 */ 3390 WRITE_COEF(0x69, 0x3400), /* capless control 3 */ 3391 WRITE_COEF(0x6a, 0x2f3e), /* capless control 4 */ 3392 WRITE_COEF(0x6b, 0x0), /* capless control 5 */ 3393 UPDATE_COEF(0x6d, 0x0fff, 0x0900), /* class D test 2 */ 3394 WRITE_COEF(0x6e, 0x110a), /* class D test 3 */ 3395 UPDATE_COEF(0x70, 0x00f8, 0x00d8), /* class D test 5 */ 3396 WRITE_COEF(0x71, 0x0014), /* class D test 6 */ 3397 WRITE_COEF(0x72, 0xc2ba), /* classD OCP */ 3398 UPDATE_COEF(0x77, 0x0f80, 0), /* classD pure DC test */ 3399 WRITE_COEF(0x6c, 0xfc06), /* Class D amp control */ 3400 {} 3401 }; 3402 3403 static void alc282_restore_default_value(struct hda_codec *codec) 3404 { 3405 alc_process_coef_fw(codec, alc282_coefs); 3406 } 3407 3408 static void alc282_init(struct hda_codec *codec) 3409 { 3410 struct alc_spec *spec = codec->spec; 3411 hda_nid_t hp_pin = alc_get_hp_pin(spec); 3412 bool hp_pin_sense; 3413 int coef78; 3414 3415 alc282_restore_default_value(codec); 3416 3417 if (!hp_pin) 3418 return; 3419 hp_pin_sense = snd_hda_jack_detect(codec, hp_pin); 3420 coef78 = alc_read_coef_idx(codec, 0x78); 3421 3422 /* Index 0x78 Direct Drive HP AMP LPM Control 1 */ 3423 /* Headphone capless set to high power mode */ 3424 alc_write_coef_idx(codec, 0x78, 0x9004); 3425 3426 if (hp_pin_sense) 3427 msleep(2); 3428 3429 snd_hda_codec_write(codec, hp_pin, 0, 3430 AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE); 3431 3432 if (hp_pin_sense) 3433 msleep(85); 3434 3435 snd_hda_codec_write(codec, hp_pin, 0, 3436 AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT); 3437 3438 if (hp_pin_sense) 3439 msleep(100); 3440 3441 /* Headphone capless set to normal mode */ 3442 alc_write_coef_idx(codec, 0x78, coef78); 3443 } 3444 3445 static void alc282_shutup(struct hda_codec *codec) 3446 { 3447 struct alc_spec *spec = codec->spec; 3448 hda_nid_t hp_pin = alc_get_hp_pin(spec); 3449 bool hp_pin_sense; 3450 int coef78; 3451 3452 if (!hp_pin) { 3453 alc269_shutup(codec); 3454 return; 3455 } 3456 3457 hp_pin_sense = snd_hda_jack_detect(codec, hp_pin); 3458 coef78 = alc_read_coef_idx(codec, 0x78); 3459 alc_write_coef_idx(codec, 0x78, 0x9004); 3460 3461 if (hp_pin_sense) 3462 msleep(2); 3463 3464 snd_hda_codec_write(codec, hp_pin, 0, 3465 AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE); 3466 3467 if (hp_pin_sense) 3468 msleep(85); 3469 3470 if (!spec->no_shutup_pins) 3471 snd_hda_codec_write(codec, hp_pin, 0, 3472 AC_VERB_SET_PIN_WIDGET_CONTROL, 0x0); 3473 3474 if (hp_pin_sense) 3475 msleep(100); 3476 3477 alc_auto_setup_eapd(codec, false); 3478 alc_shutup_pins(codec); 3479 alc_write_coef_idx(codec, 0x78, coef78); 3480 } 3481 3482 static const struct coef_fw alc283_coefs[] = { 3483 WRITE_COEF(0x03, 0x0002), /* Power Down Control */ 3484 UPDATE_COEF(0x05, 0xff3f, 0x0700), /* FIFO and filter clock */ 3485 WRITE_COEF(0x07, 0x0200), /* DMIC control */ 3486 UPDATE_COEF(0x06, 0x00f0, 0), /* Analog clock */ 3487 UPDATE_COEF(0x08, 0xfffc, 0x0c2c), /* JD */ 3488 WRITE_COEF(0x0a, 0xcccc), /* JD offset1 */ 3489 WRITE_COEF(0x0b, 0xcccc), /* JD offset2 */ 3490 WRITE_COEF(0x0e, 0x6fc0), /* LDO1/2/3, DAC/ADC */ 3491 UPDATE_COEF(0x0f, 0xf800, 0x1000), /* JD */ 3492 UPDATE_COEF(0x10, 0xfc00, 0x0c00), /* Capless */ 3493 WRITE_COEF(0x3a, 0x0), /* Class D test 4 */ 3494 UPDATE_COEF(0x0c, 0xfe00, 0x0), /* IO power down directly */ 3495 WRITE_COEF(0x22, 0xa0c0), /* ANC */ 3496 UPDATE_COEFEX(0x53, 0x01, 0x000f, 0x0008), /* AGC MUX */ 3497 UPDATE_COEF(0x1d, 0x00e0, 0), /* DAC simple content protection */ 3498 UPDATE_COEF(0x1f, 0x00e0, 0), /* ADC simple content protection */ 3499 WRITE_COEF(0x21, 0x8804), /* DAC ADC Zero Detection */ 3500 WRITE_COEF(0x2e, 0x2902), /* PLL */ 3501 WRITE_COEF(0x33, 0xa080), /* capless control 2 */ 3502 WRITE_COEF(0x34, 0x3400), /* capless control 3 */ 3503 WRITE_COEF(0x35, 0x2f3e), /* capless control 4 */ 3504 WRITE_COEF(0x36, 0x0), /* capless control 5 */ 3505 UPDATE_COEF(0x38, 0x0fff, 0x0900), /* class D test 2 */ 3506 WRITE_COEF(0x39, 0x110a), /* class D test 3 */ 3507 UPDATE_COEF(0x3b, 0x00f8, 0x00d8), /* class D test 5 */ 3508 WRITE_COEF(0x3c, 0x0014), /* class D test 6 */ 3509 WRITE_COEF(0x3d, 0xc2ba), /* classD OCP */ 3510 UPDATE_COEF(0x42, 0x0f80, 0x0), /* classD pure DC test */ 3511 WRITE_COEF(0x49, 0x0), /* test mode */ 3512 UPDATE_COEF(0x40, 0xf800, 0x9800), /* Class D DC enable */ 3513 UPDATE_COEF(0x42, 0xf000, 0x2000), /* DC offset */ 3514 WRITE_COEF(0x37, 0xfc06), /* Class D amp control */ 3515 UPDATE_COEF(0x1b, 0x8000, 0), /* HP JD control */ 3516 {} 3517 }; 3518 3519 static void alc283_restore_default_value(struct hda_codec *codec) 3520 { 3521 alc_process_coef_fw(codec, alc283_coefs); 3522 } 3523 3524 static void alc283_init(struct hda_codec *codec) 3525 { 3526 struct alc_spec *spec = codec->spec; 3527 hda_nid_t hp_pin = alc_get_hp_pin(spec); 3528 bool hp_pin_sense; 3529 3530 alc283_restore_default_value(codec); 3531 3532 if (!hp_pin) 3533 return; 3534 3535 msleep(30); 3536 hp_pin_sense = snd_hda_jack_detect(codec, hp_pin); 3537 3538 /* Index 0x43 Direct Drive HP AMP LPM Control 1 */ 3539 /* Headphone capless set to high power mode */ 3540 alc_write_coef_idx(codec, 0x43, 0x9004); 3541 3542 snd_hda_codec_write(codec, hp_pin, 0, 3543 AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE); 3544 3545 if (hp_pin_sense) 3546 msleep(85); 3547 3548 snd_hda_codec_write(codec, hp_pin, 0, 3549 AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT); 3550 3551 if (hp_pin_sense) 3552 msleep(85); 3553 /* Index 0x46 Combo jack auto switch control 2 */ 3554 /* 3k pull low control for Headset jack. */ 3555 alc_update_coef_idx(codec, 0x46, 3 << 12, 0); 3556 /* Headphone capless set to normal mode */ 3557 alc_write_coef_idx(codec, 0x43, 0x9614); 3558 } 3559 3560 static void alc283_shutup(struct hda_codec *codec) 3561 { 3562 struct alc_spec *spec = codec->spec; 3563 hda_nid_t hp_pin = alc_get_hp_pin(spec); 3564 bool hp_pin_sense; 3565 3566 if (!hp_pin) { 3567 alc269_shutup(codec); 3568 return; 3569 } 3570 3571 hp_pin_sense = snd_hda_jack_detect(codec, hp_pin); 3572 3573 alc_write_coef_idx(codec, 0x43, 0x9004); 3574 3575 /*depop hp during suspend*/ 3576 alc_write_coef_idx(codec, 0x06, 0x2100); 3577 3578 snd_hda_codec_write(codec, hp_pin, 0, 3579 AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE); 3580 3581 if (hp_pin_sense) 3582 msleep(100); 3583 3584 if (!spec->no_shutup_pins) 3585 snd_hda_codec_write(codec, hp_pin, 0, 3586 AC_VERB_SET_PIN_WIDGET_CONTROL, 0x0); 3587 3588 alc_update_coef_idx(codec, 0x46, 0, 3 << 12); 3589 3590 if (hp_pin_sense) 3591 msleep(100); 3592 alc_auto_setup_eapd(codec, false); 3593 alc_shutup_pins(codec); 3594 alc_write_coef_idx(codec, 0x43, 0x9614); 3595 } 3596 3597 static void alc256_init(struct hda_codec *codec) 3598 { 3599 struct alc_spec *spec = codec->spec; 3600 hda_nid_t hp_pin = alc_get_hp_pin(spec); 3601 bool hp_pin_sense; 3602 3603 if (spec->ultra_low_power) { 3604 alc_update_coef_idx(codec, 0x03, 1<<1, 1<<1); 3605 alc_update_coef_idx(codec, 0x08, 3<<2, 3<<2); 3606 alc_update_coef_idx(codec, 0x08, 7<<4, 0); 3607 alc_update_coef_idx(codec, 0x3b, 1<<15, 0); 3608 alc_update_coef_idx(codec, 0x0e, 7<<6, 7<<6); 3609 msleep(30); 3610 } 3611 3612 if (!hp_pin) 3613 hp_pin = 0x21; 3614 3615 msleep(30); 3616 3617 hp_pin_sense = snd_hda_jack_detect(codec, hp_pin); 3618 3619 if (hp_pin_sense) { 3620 msleep(2); 3621 alc_update_coefex_idx(codec, 0x57, 0x04, 0x0007, 0x1); /* Low power */ 3622 3623 snd_hda_codec_write(codec, hp_pin, 0, 3624 AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT); 3625 3626 msleep(75); 3627 3628 snd_hda_codec_write(codec, hp_pin, 0, 3629 AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE); 3630 3631 msleep(75); 3632 alc_update_coefex_idx(codec, 0x57, 0x04, 0x0007, 0x4); /* Hight power */ 3633 } 3634 alc_update_coef_idx(codec, 0x46, 3 << 12, 0); 3635 alc_update_coefex_idx(codec, 0x53, 0x02, 0x8000, 1 << 15); /* Clear bit */ 3636 alc_update_coefex_idx(codec, 0x53, 0x02, 0x8000, 0 << 15); 3637 /* 3638 * Expose headphone mic (or possibly Line In on some machines) instead 3639 * of PC Beep on 1Ah, and disable 1Ah loopback for all outputs. See 3640 * Documentation/sound/hd-audio/realtek-pc-beep.rst for details of 3641 * this register. 3642 */ 3643 alc_write_coef_idx(codec, 0x36, 0x5757); 3644 } 3645 3646 static void alc256_shutup(struct hda_codec *codec) 3647 { 3648 struct alc_spec *spec = codec->spec; 3649 hda_nid_t hp_pin = alc_get_hp_pin(spec); 3650 bool hp_pin_sense; 3651 3652 if (!hp_pin) 3653 hp_pin = 0x21; 3654 3655 alc_update_coefex_idx(codec, 0x57, 0x04, 0x0007, 0x1); /* Low power */ 3656 hp_pin_sense = snd_hda_jack_detect(codec, hp_pin); 3657 3658 if (hp_pin_sense) { 3659 msleep(2); 3660 3661 snd_hda_codec_write(codec, hp_pin, 0, 3662 AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE); 3663 3664 msleep(75); 3665 3666 /* 3k pull low control for Headset jack. */ 3667 /* NOTE: call this before clearing the pin, otherwise codec stalls */ 3668 /* If disable 3k pulldown control for alc257, the Mic detection will not work correctly 3669 * when booting with headset plugged. So skip setting it for the codec alc257 3670 */ 3671 if (spec->en_3kpull_low) 3672 alc_update_coef_idx(codec, 0x46, 0, 3 << 12); 3673 3674 if (!spec->no_shutup_pins) 3675 snd_hda_codec_write(codec, hp_pin, 0, 3676 AC_VERB_SET_PIN_WIDGET_CONTROL, 0x0); 3677 3678 msleep(75); 3679 } 3680 3681 alc_auto_setup_eapd(codec, false); 3682 alc_shutup_pins(codec); 3683 if (spec->ultra_low_power) { 3684 msleep(50); 3685 alc_update_coef_idx(codec, 0x03, 1<<1, 0); 3686 alc_update_coef_idx(codec, 0x08, 7<<4, 7<<4); 3687 alc_update_coef_idx(codec, 0x08, 3<<2, 0); 3688 alc_update_coef_idx(codec, 0x3b, 1<<15, 1<<15); 3689 alc_update_coef_idx(codec, 0x0e, 7<<6, 0); 3690 msleep(30); 3691 } 3692 } 3693 3694 static void alc285_hp_init(struct hda_codec *codec) 3695 { 3696 struct alc_spec *spec = codec->spec; 3697 hda_nid_t hp_pin = alc_get_hp_pin(spec); 3698 int i, val; 3699 int coef38, coef0d, coef36; 3700 3701 alc_write_coefex_idx(codec, 0x58, 0x00, 0x1888); /* write default value */ 3702 alc_update_coef_idx(codec, 0x4a, 1<<15, 1<<15); /* Reset HP JD */ 3703 coef38 = alc_read_coef_idx(codec, 0x38); /* Amp control */ 3704 coef0d = alc_read_coef_idx(codec, 0x0d); /* Digital Misc control */ 3705 coef36 = alc_read_coef_idx(codec, 0x36); /* Passthrough Control */ 3706 alc_update_coef_idx(codec, 0x38, 1<<4, 0x0); 3707 alc_update_coef_idx(codec, 0x0d, 0x110, 0x0); 3708 3709 alc_update_coef_idx(codec, 0x67, 0xf000, 0x3000); 3710 3711 if (hp_pin) 3712 snd_hda_codec_write(codec, hp_pin, 0, 3713 AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE); 3714 3715 msleep(130); 3716 alc_update_coef_idx(codec, 0x36, 1<<14, 1<<14); 3717 alc_update_coef_idx(codec, 0x36, 1<<13, 0x0); 3718 3719 if (hp_pin) 3720 snd_hda_codec_write(codec, hp_pin, 0, 3721 AC_VERB_SET_PIN_WIDGET_CONTROL, 0x0); 3722 msleep(10); 3723 alc_write_coef_idx(codec, 0x67, 0x0); /* Set HP depop to manual mode */ 3724 alc_write_coefex_idx(codec, 0x58, 0x00, 0x7880); 3725 alc_write_coefex_idx(codec, 0x58, 0x0f, 0xf049); 3726 alc_update_coefex_idx(codec, 0x58, 0x03, 0x00f0, 0x00c0); 3727 3728 alc_write_coefex_idx(codec, 0x58, 0x00, 0xf888); /* HP depop procedure start */ 3729 val = alc_read_coefex_idx(codec, 0x58, 0x00); 3730 for (i = 0; i < 20 && val & 0x8000; i++) { 3731 msleep(50); 3732 val = alc_read_coefex_idx(codec, 0x58, 0x00); 3733 } /* Wait for depop procedure finish */ 3734 3735 alc_write_coefex_idx(codec, 0x58, 0x00, val); /* write back the result */ 3736 alc_update_coef_idx(codec, 0x38, 1<<4, coef38); 3737 alc_update_coef_idx(codec, 0x0d, 0x110, coef0d); 3738 alc_update_coef_idx(codec, 0x36, 3<<13, coef36); 3739 3740 msleep(50); 3741 alc_update_coef_idx(codec, 0x4a, 1<<15, 0); 3742 } 3743 3744 static void alc225_init(struct hda_codec *codec) 3745 { 3746 struct alc_spec *spec = codec->spec; 3747 hda_nid_t hp_pin = alc_get_hp_pin(spec); 3748 bool hp1_pin_sense, hp2_pin_sense; 3749 3750 if (spec->ultra_low_power) { 3751 alc_update_coef_idx(codec, 0x08, 0x0f << 2, 3<<2); 3752 alc_update_coef_idx(codec, 0x0e, 7<<6, 7<<6); 3753 alc_update_coef_idx(codec, 0x33, 1<<11, 0); 3754 msleep(30); 3755 } 3756 3757 if (spec->codec_variant != ALC269_TYPE_ALC287 && 3758 spec->codec_variant != ALC269_TYPE_ALC245) 3759 /* required only at boot or S3 and S4 resume time */ 3760 if (!spec->done_hp_init || 3761 is_s3_resume(codec) || 3762 is_s4_resume(codec)) { 3763 alc285_hp_init(codec); 3764 spec->done_hp_init = true; 3765 } 3766 3767 if (!hp_pin) 3768 hp_pin = 0x21; 3769 msleep(30); 3770 3771 hp1_pin_sense = snd_hda_jack_detect(codec, hp_pin); 3772 hp2_pin_sense = snd_hda_jack_detect(codec, 0x16); 3773 3774 if (hp1_pin_sense || hp2_pin_sense) { 3775 msleep(2); 3776 alc_update_coefex_idx(codec, 0x57, 0x04, 0x0007, 0x1); /* Low power */ 3777 3778 if (hp1_pin_sense) 3779 snd_hda_codec_write(codec, hp_pin, 0, 3780 AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT); 3781 if (hp2_pin_sense) 3782 snd_hda_codec_write(codec, 0x16, 0, 3783 AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT); 3784 msleep(75); 3785 3786 if (hp1_pin_sense) 3787 snd_hda_codec_write(codec, hp_pin, 0, 3788 AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE); 3789 if (hp2_pin_sense) 3790 snd_hda_codec_write(codec, 0x16, 0, 3791 AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE); 3792 3793 msleep(75); 3794 alc_update_coef_idx(codec, 0x4a, 3 << 10, 0); 3795 alc_update_coefex_idx(codec, 0x57, 0x04, 0x0007, 0x4); /* Hight power */ 3796 } 3797 } 3798 3799 static void alc225_shutup(struct hda_codec *codec) 3800 { 3801 struct alc_spec *spec = codec->spec; 3802 hda_nid_t hp_pin = alc_get_hp_pin(spec); 3803 bool hp1_pin_sense, hp2_pin_sense; 3804 3805 if (!hp_pin) 3806 hp_pin = 0x21; 3807 3808 hp1_pin_sense = snd_hda_jack_detect(codec, hp_pin); 3809 hp2_pin_sense = snd_hda_jack_detect(codec, 0x16); 3810 3811 if (hp1_pin_sense || hp2_pin_sense) { 3812 alc_disable_headset_jack_key(codec); 3813 /* 3k pull low control for Headset jack. */ 3814 alc_update_coef_idx(codec, 0x4a, 0, 3 << 10); 3815 msleep(2); 3816 3817 if (hp1_pin_sense) 3818 snd_hda_codec_write(codec, hp_pin, 0, 3819 AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE); 3820 if (hp2_pin_sense) 3821 snd_hda_codec_write(codec, 0x16, 0, 3822 AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE); 3823 3824 msleep(75); 3825 3826 if (hp1_pin_sense) 3827 snd_hda_codec_write(codec, hp_pin, 0, 3828 AC_VERB_SET_PIN_WIDGET_CONTROL, 0x0); 3829 if (hp2_pin_sense) 3830 snd_hda_codec_write(codec, 0x16, 0, 3831 AC_VERB_SET_PIN_WIDGET_CONTROL, 0x0); 3832 3833 msleep(75); 3834 alc_update_coef_idx(codec, 0x4a, 3 << 10, 0); 3835 alc_enable_headset_jack_key(codec); 3836 } 3837 alc_auto_setup_eapd(codec, false); 3838 alc_shutup_pins(codec); 3839 if (spec->ultra_low_power) { 3840 msleep(50); 3841 alc_update_coef_idx(codec, 0x08, 0x0f << 2, 0x0c << 2); 3842 alc_update_coef_idx(codec, 0x0e, 7<<6, 0); 3843 alc_update_coef_idx(codec, 0x33, 1<<11, 1<<11); 3844 alc_update_coef_idx(codec, 0x4a, 3<<4, 2<<4); 3845 msleep(30); 3846 } 3847 } 3848 3849 static void alc222_init(struct hda_codec *codec) 3850 { 3851 struct alc_spec *spec = codec->spec; 3852 hda_nid_t hp_pin = alc_get_hp_pin(spec); 3853 bool hp1_pin_sense, hp2_pin_sense; 3854 3855 if (!hp_pin) 3856 return; 3857 3858 msleep(30); 3859 3860 hp1_pin_sense = snd_hda_jack_detect(codec, hp_pin); 3861 hp2_pin_sense = snd_hda_jack_detect(codec, 0x14); 3862 3863 if (hp1_pin_sense || hp2_pin_sense) { 3864 msleep(2); 3865 3866 if (hp1_pin_sense) 3867 snd_hda_codec_write(codec, hp_pin, 0, 3868 AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT); 3869 if (hp2_pin_sense) 3870 snd_hda_codec_write(codec, 0x14, 0, 3871 AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT); 3872 msleep(75); 3873 3874 if (hp1_pin_sense) 3875 snd_hda_codec_write(codec, hp_pin, 0, 3876 AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE); 3877 if (hp2_pin_sense) 3878 snd_hda_codec_write(codec, 0x14, 0, 3879 AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE); 3880 3881 msleep(75); 3882 } 3883 } 3884 3885 static void alc222_shutup(struct hda_codec *codec) 3886 { 3887 struct alc_spec *spec = codec->spec; 3888 hda_nid_t hp_pin = alc_get_hp_pin(spec); 3889 bool hp1_pin_sense, hp2_pin_sense; 3890 3891 if (!hp_pin) 3892 hp_pin = 0x21; 3893 3894 hp1_pin_sense = snd_hda_jack_detect(codec, hp_pin); 3895 hp2_pin_sense = snd_hda_jack_detect(codec, 0x14); 3896 3897 if (hp1_pin_sense || hp2_pin_sense) { 3898 msleep(2); 3899 3900 if (hp1_pin_sense) 3901 snd_hda_codec_write(codec, hp_pin, 0, 3902 AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE); 3903 if (hp2_pin_sense) 3904 snd_hda_codec_write(codec, 0x14, 0, 3905 AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE); 3906 3907 msleep(75); 3908 3909 if (hp1_pin_sense) 3910 snd_hda_codec_write(codec, hp_pin, 0, 3911 AC_VERB_SET_PIN_WIDGET_CONTROL, 0x0); 3912 if (hp2_pin_sense) 3913 snd_hda_codec_write(codec, 0x14, 0, 3914 AC_VERB_SET_PIN_WIDGET_CONTROL, 0x0); 3915 3916 msleep(75); 3917 } 3918 alc_auto_setup_eapd(codec, false); 3919 alc_shutup_pins(codec); 3920 } 3921 3922 static void alc_default_init(struct hda_codec *codec) 3923 { 3924 struct alc_spec *spec = codec->spec; 3925 hda_nid_t hp_pin = alc_get_hp_pin(spec); 3926 bool hp_pin_sense; 3927 3928 if (!hp_pin) 3929 return; 3930 3931 msleep(30); 3932 3933 hp_pin_sense = snd_hda_jack_detect(codec, hp_pin); 3934 3935 if (hp_pin_sense) { 3936 msleep(2); 3937 3938 snd_hda_codec_write(codec, hp_pin, 0, 3939 AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT); 3940 3941 msleep(75); 3942 3943 snd_hda_codec_write(codec, hp_pin, 0, 3944 AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE); 3945 msleep(75); 3946 } 3947 } 3948 3949 static void alc_default_shutup(struct hda_codec *codec) 3950 { 3951 struct alc_spec *spec = codec->spec; 3952 hda_nid_t hp_pin = alc_get_hp_pin(spec); 3953 bool hp_pin_sense; 3954 3955 if (!hp_pin) { 3956 alc269_shutup(codec); 3957 return; 3958 } 3959 3960 hp_pin_sense = snd_hda_jack_detect(codec, hp_pin); 3961 3962 if (hp_pin_sense) { 3963 msleep(2); 3964 3965 snd_hda_codec_write(codec, hp_pin, 0, 3966 AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE); 3967 3968 msleep(75); 3969 3970 if (!spec->no_shutup_pins) 3971 snd_hda_codec_write(codec, hp_pin, 0, 3972 AC_VERB_SET_PIN_WIDGET_CONTROL, 0x0); 3973 3974 msleep(75); 3975 } 3976 alc_auto_setup_eapd(codec, false); 3977 alc_shutup_pins(codec); 3978 } 3979 3980 static void alc294_hp_init(struct hda_codec *codec) 3981 { 3982 struct alc_spec *spec = codec->spec; 3983 hda_nid_t hp_pin = alc_get_hp_pin(spec); 3984 int i, val; 3985 3986 if (!hp_pin) 3987 return; 3988 3989 snd_hda_codec_write(codec, hp_pin, 0, 3990 AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE); 3991 3992 msleep(100); 3993 3994 if (!spec->no_shutup_pins) 3995 snd_hda_codec_write(codec, hp_pin, 0, 3996 AC_VERB_SET_PIN_WIDGET_CONTROL, 0x0); 3997 3998 alc_update_coef_idx(codec, 0x6f, 0x000f, 0);/* Set HP depop to manual mode */ 3999 alc_update_coefex_idx(codec, 0x58, 0x00, 0x8000, 0x8000); /* HP depop procedure start */ 4000 4001 /* Wait for depop procedure finish */ 4002 val = alc_read_coefex_idx(codec, 0x58, 0x01); 4003 for (i = 0; i < 20 && val & 0x0080; i++) { 4004 msleep(50); 4005 val = alc_read_coefex_idx(codec, 0x58, 0x01); 4006 } 4007 /* Set HP depop to auto mode */ 4008 alc_update_coef_idx(codec, 0x6f, 0x000f, 0x000b); 4009 msleep(50); 4010 } 4011 4012 static void alc294_init(struct hda_codec *codec) 4013 { 4014 struct alc_spec *spec = codec->spec; 4015 4016 /* required only at boot or S4 resume time */ 4017 if (!spec->done_hp_init || 4018 codec->core.dev.power.power_state.event == PM_EVENT_RESTORE) { 4019 alc294_hp_init(codec); 4020 spec->done_hp_init = true; 4021 } 4022 alc_default_init(codec); 4023 } 4024 4025 static void alc5505_coef_set(struct hda_codec *codec, unsigned int index_reg, 4026 unsigned int val) 4027 { 4028 snd_hda_codec_write(codec, 0x51, 0, AC_VERB_SET_COEF_INDEX, index_reg >> 1); 4029 snd_hda_codec_write(codec, 0x51, 0, AC_VERB_SET_PROC_COEF, val & 0xffff); /* LSB */ 4030 snd_hda_codec_write(codec, 0x51, 0, AC_VERB_SET_PROC_COEF, val >> 16); /* MSB */ 4031 } 4032 4033 static int alc5505_coef_get(struct hda_codec *codec, unsigned int index_reg) 4034 { 4035 unsigned int val; 4036 4037 snd_hda_codec_write(codec, 0x51, 0, AC_VERB_SET_COEF_INDEX, index_reg >> 1); 4038 val = snd_hda_codec_read(codec, 0x51, 0, AC_VERB_GET_PROC_COEF, 0) 4039 & 0xffff; 4040 val |= snd_hda_codec_read(codec, 0x51, 0, AC_VERB_GET_PROC_COEF, 0) 4041 << 16; 4042 return val; 4043 } 4044 4045 static void alc5505_dsp_halt(struct hda_codec *codec) 4046 { 4047 unsigned int val; 4048 4049 alc5505_coef_set(codec, 0x3000, 0x000c); /* DSP CPU stop */ 4050 alc5505_coef_set(codec, 0x880c, 0x0008); /* DDR enter self refresh */ 4051 alc5505_coef_set(codec, 0x61c0, 0x11110080); /* Clock control for PLL and CPU */ 4052 alc5505_coef_set(codec, 0x6230, 0xfc0d4011); /* Disable Input OP */ 4053 alc5505_coef_set(codec, 0x61b4, 0x040a2b03); /* Stop PLL2 */ 4054 alc5505_coef_set(codec, 0x61b0, 0x00005b17); /* Stop PLL1 */ 4055 alc5505_coef_set(codec, 0x61b8, 0x04133303); /* Stop PLL3 */ 4056 val = alc5505_coef_get(codec, 0x6220); 4057 alc5505_coef_set(codec, 0x6220, (val | 0x3000)); /* switch Ringbuffer clock to DBUS clock */ 4058 } 4059 4060 static void alc5505_dsp_back_from_halt(struct hda_codec *codec) 4061 { 4062 alc5505_coef_set(codec, 0x61b8, 0x04133302); 4063 alc5505_coef_set(codec, 0x61b0, 0x00005b16); 4064 alc5505_coef_set(codec, 0x61b4, 0x040a2b02); 4065 alc5505_coef_set(codec, 0x6230, 0xf80d4011); 4066 alc5505_coef_set(codec, 0x6220, 0x2002010f); 4067 alc5505_coef_set(codec, 0x880c, 0x00000004); 4068 } 4069 4070 static void alc5505_dsp_init(struct hda_codec *codec) 4071 { 4072 unsigned int val; 4073 4074 alc5505_dsp_halt(codec); 4075 alc5505_dsp_back_from_halt(codec); 4076 alc5505_coef_set(codec, 0x61b0, 0x5b14); /* PLL1 control */ 4077 alc5505_coef_set(codec, 0x61b0, 0x5b16); 4078 alc5505_coef_set(codec, 0x61b4, 0x04132b00); /* PLL2 control */ 4079 alc5505_coef_set(codec, 0x61b4, 0x04132b02); 4080 alc5505_coef_set(codec, 0x61b8, 0x041f3300); /* PLL3 control*/ 4081 alc5505_coef_set(codec, 0x61b8, 0x041f3302); 4082 snd_hda_codec_write(codec, 0x51, 0, AC_VERB_SET_CODEC_RESET, 0); /* Function reset */ 4083 alc5505_coef_set(codec, 0x61b8, 0x041b3302); 4084 alc5505_coef_set(codec, 0x61b8, 0x04173302); 4085 alc5505_coef_set(codec, 0x61b8, 0x04163302); 4086 alc5505_coef_set(codec, 0x8800, 0x348b328b); /* DRAM control */ 4087 alc5505_coef_set(codec, 0x8808, 0x00020022); /* DRAM control */ 4088 alc5505_coef_set(codec, 0x8818, 0x00000400); /* DRAM control */ 4089 4090 val = alc5505_coef_get(codec, 0x6200) >> 16; /* Read revision ID */ 4091 if (val <= 3) 4092 alc5505_coef_set(codec, 0x6220, 0x2002010f); /* I/O PAD Configuration */ 4093 else 4094 alc5505_coef_set(codec, 0x6220, 0x6002018f); 4095 4096 alc5505_coef_set(codec, 0x61ac, 0x055525f0); /**/ 4097 alc5505_coef_set(codec, 0x61c0, 0x12230080); /* Clock control */ 4098 alc5505_coef_set(codec, 0x61b4, 0x040e2b02); /* PLL2 control */ 4099 alc5505_coef_set(codec, 0x61bc, 0x010234f8); /* OSC Control */ 4100 alc5505_coef_set(codec, 0x880c, 0x00000004); /* DRAM Function control */ 4101 alc5505_coef_set(codec, 0x880c, 0x00000003); 4102 alc5505_coef_set(codec, 0x880c, 0x00000010); 4103 4104 #ifdef HALT_REALTEK_ALC5505 4105 alc5505_dsp_halt(codec); 4106 #endif 4107 } 4108 4109 #ifdef HALT_REALTEK_ALC5505 4110 #define alc5505_dsp_suspend(codec) do { } while (0) /* NOP */ 4111 #define alc5505_dsp_resume(codec) do { } while (0) /* NOP */ 4112 #else 4113 #define alc5505_dsp_suspend(codec) alc5505_dsp_halt(codec) 4114 #define alc5505_dsp_resume(codec) alc5505_dsp_back_from_halt(codec) 4115 #endif 4116 4117 static int alc269_suspend(struct hda_codec *codec) 4118 { 4119 struct alc_spec *spec = codec->spec; 4120 4121 if (spec->has_alc5505_dsp) 4122 alc5505_dsp_suspend(codec); 4123 4124 return alc_suspend(codec); 4125 } 4126 4127 static int alc269_resume(struct hda_codec *codec) 4128 { 4129 struct alc_spec *spec = codec->spec; 4130 4131 if (spec->codec_variant == ALC269_TYPE_ALC269VB) 4132 alc269vb_toggle_power_output(codec, 0); 4133 if (spec->codec_variant == ALC269_TYPE_ALC269VB && 4134 (alc_get_coef0(codec) & 0x00ff) == 0x018) { 4135 msleep(150); 4136 } 4137 4138 codec->patch_ops.init(codec); 4139 4140 if (spec->codec_variant == ALC269_TYPE_ALC269VB) 4141 alc269vb_toggle_power_output(codec, 1); 4142 if (spec->codec_variant == ALC269_TYPE_ALC269VB && 4143 (alc_get_coef0(codec) & 0x00ff) == 0x017) { 4144 msleep(200); 4145 } 4146 4147 snd_hda_regmap_sync(codec); 4148 hda_call_check_power_status(codec, 0x01); 4149 4150 /* on some machine, the BIOS will clear the codec gpio data when enter 4151 * suspend, and won't restore the data after resume, so we restore it 4152 * in the driver. 4153 */ 4154 if (spec->gpio_data) 4155 alc_write_gpio_data(codec); 4156 4157 if (spec->has_alc5505_dsp) 4158 alc5505_dsp_resume(codec); 4159 4160 return 0; 4161 } 4162 4163 static void alc269_fixup_pincfg_no_hp_to_lineout(struct hda_codec *codec, 4164 const struct hda_fixup *fix, int action) 4165 { 4166 struct alc_spec *spec = codec->spec; 4167 4168 if (action == HDA_FIXUP_ACT_PRE_PROBE) 4169 spec->parse_flags = HDA_PINCFG_NO_HP_FIXUP; 4170 } 4171 4172 static void alc269_fixup_pincfg_U7x7_headset_mic(struct hda_codec *codec, 4173 const struct hda_fixup *fix, 4174 int action) 4175 { 4176 unsigned int cfg_headphone = snd_hda_codec_get_pincfg(codec, 0x21); 4177 unsigned int cfg_headset_mic = snd_hda_codec_get_pincfg(codec, 0x19); 4178 4179 if (cfg_headphone && cfg_headset_mic == 0x411111f0) 4180 snd_hda_codec_set_pincfg(codec, 0x19, 4181 (cfg_headphone & ~AC_DEFCFG_DEVICE) | 4182 (AC_JACK_MIC_IN << AC_DEFCFG_DEVICE_SHIFT)); 4183 } 4184 4185 static void alc269_fixup_hweq(struct hda_codec *codec, 4186 const struct hda_fixup *fix, int action) 4187 { 4188 if (action == HDA_FIXUP_ACT_INIT) 4189 alc_update_coef_idx(codec, 0x1e, 0, 0x80); 4190 } 4191 4192 static void alc269_fixup_headset_mic(struct hda_codec *codec, 4193 const struct hda_fixup *fix, int action) 4194 { 4195 struct alc_spec *spec = codec->spec; 4196 4197 if (action == HDA_FIXUP_ACT_PRE_PROBE) 4198 spec->parse_flags |= HDA_PINCFG_HEADSET_MIC; 4199 } 4200 4201 static void alc271_fixup_dmic(struct hda_codec *codec, 4202 const struct hda_fixup *fix, int action) 4203 { 4204 static const struct hda_verb verbs[] = { 4205 {0x20, AC_VERB_SET_COEF_INDEX, 0x0d}, 4206 {0x20, AC_VERB_SET_PROC_COEF, 0x4000}, 4207 {} 4208 }; 4209 unsigned int cfg; 4210 4211 if (strcmp(codec->core.chip_name, "ALC271X") && 4212 strcmp(codec->core.chip_name, "ALC269VB")) 4213 return; 4214 cfg = snd_hda_codec_get_pincfg(codec, 0x12); 4215 if (get_defcfg_connect(cfg) == AC_JACK_PORT_FIXED) 4216 snd_hda_sequence_write(codec, verbs); 4217 } 4218 4219 /* Fix the speaker amp after resume, etc */ 4220 static void alc269vb_fixup_aspire_e1_coef(struct hda_codec *codec, 4221 const struct hda_fixup *fix, 4222 int action) 4223 { 4224 if (action == HDA_FIXUP_ACT_INIT) 4225 alc_update_coef_idx(codec, 0x0d, 0x6000, 0x6000); 4226 } 4227 4228 static void alc269_fixup_pcm_44k(struct hda_codec *codec, 4229 const struct hda_fixup *fix, int action) 4230 { 4231 struct alc_spec *spec = codec->spec; 4232 4233 if (action != HDA_FIXUP_ACT_PROBE) 4234 return; 4235 4236 /* Due to a hardware problem on Lenovo Ideadpad, we need to 4237 * fix the sample rate of analog I/O to 44.1kHz 4238 */ 4239 spec->gen.stream_analog_playback = &alc269_44k_pcm_analog_playback; 4240 spec->gen.stream_analog_capture = &alc269_44k_pcm_analog_capture; 4241 } 4242 4243 static void alc269_fixup_stereo_dmic(struct hda_codec *codec, 4244 const struct hda_fixup *fix, int action) 4245 { 4246 /* The digital-mic unit sends PDM (differential signal) instead of 4247 * the standard PCM, thus you can't record a valid mono stream as is. 4248 * Below is a workaround specific to ALC269 to control the dmic 4249 * signal source as mono. 4250 */ 4251 if (action == HDA_FIXUP_ACT_INIT) 4252 alc_update_coef_idx(codec, 0x07, 0, 0x80); 4253 } 4254 4255 static void alc269_quanta_automute(struct hda_codec *codec) 4256 { 4257 snd_hda_gen_update_outputs(codec); 4258 4259 alc_write_coef_idx(codec, 0x0c, 0x680); 4260 alc_write_coef_idx(codec, 0x0c, 0x480); 4261 } 4262 4263 static void alc269_fixup_quanta_mute(struct hda_codec *codec, 4264 const struct hda_fixup *fix, int action) 4265 { 4266 struct alc_spec *spec = codec->spec; 4267 if (action != HDA_FIXUP_ACT_PROBE) 4268 return; 4269 spec->gen.automute_hook = alc269_quanta_automute; 4270 } 4271 4272 static void alc269_x101_hp_automute_hook(struct hda_codec *codec, 4273 struct hda_jack_callback *jack) 4274 { 4275 struct alc_spec *spec = codec->spec; 4276 int vref; 4277 msleep(200); 4278 snd_hda_gen_hp_automute(codec, jack); 4279 4280 vref = spec->gen.hp_jack_present ? PIN_VREF80 : 0; 4281 msleep(100); 4282 snd_hda_codec_write(codec, 0x18, 0, AC_VERB_SET_PIN_WIDGET_CONTROL, 4283 vref); 4284 msleep(500); 4285 snd_hda_codec_write(codec, 0x18, 0, AC_VERB_SET_PIN_WIDGET_CONTROL, 4286 vref); 4287 } 4288 4289 /* 4290 * Magic sequence to make Huawei Matebook X right speaker working (bko#197801) 4291 */ 4292 struct hda_alc298_mbxinit { 4293 unsigned char value_0x23; 4294 unsigned char value_0x25; 4295 }; 4296 4297 static void alc298_huawei_mbx_stereo_seq(struct hda_codec *codec, 4298 const struct hda_alc298_mbxinit *initval, 4299 bool first) 4300 { 4301 snd_hda_codec_write(codec, 0x06, 0, AC_VERB_SET_DIGI_CONVERT_3, 0x0); 4302 alc_write_coef_idx(codec, 0x26, 0xb000); 4303 4304 if (first) 4305 snd_hda_codec_write(codec, 0x21, 0, AC_VERB_GET_PIN_SENSE, 0x0); 4306 4307 snd_hda_codec_write(codec, 0x6, 0, AC_VERB_SET_DIGI_CONVERT_3, 0x80); 4308 alc_write_coef_idx(codec, 0x26, 0xf000); 4309 alc_write_coef_idx(codec, 0x23, initval->value_0x23); 4310 4311 if (initval->value_0x23 != 0x1e) 4312 alc_write_coef_idx(codec, 0x25, initval->value_0x25); 4313 4314 snd_hda_codec_write(codec, 0x20, 0, AC_VERB_SET_COEF_INDEX, 0x26); 4315 snd_hda_codec_write(codec, 0x20, 0, AC_VERB_SET_PROC_COEF, 0xb010); 4316 } 4317 4318 static void alc298_fixup_huawei_mbx_stereo(struct hda_codec *codec, 4319 const struct hda_fixup *fix, 4320 int action) 4321 { 4322 /* Initialization magic */ 4323 static const struct hda_alc298_mbxinit dac_init[] = { 4324 {0x0c, 0x00}, {0x0d, 0x00}, {0x0e, 0x00}, {0x0f, 0x00}, 4325 {0x10, 0x00}, {0x1a, 0x40}, {0x1b, 0x82}, {0x1c, 0x00}, 4326 {0x1d, 0x00}, {0x1e, 0x00}, {0x1f, 0x00}, 4327 {0x20, 0xc2}, {0x21, 0xc8}, {0x22, 0x26}, {0x23, 0x24}, 4328 {0x27, 0xff}, {0x28, 0xff}, {0x29, 0xff}, {0x2a, 0x8f}, 4329 {0x2b, 0x02}, {0x2c, 0x48}, {0x2d, 0x34}, {0x2e, 0x00}, 4330 {0x2f, 0x00}, 4331 {0x30, 0x00}, {0x31, 0x00}, {0x32, 0x00}, {0x33, 0x00}, 4332 {0x34, 0x00}, {0x35, 0x01}, {0x36, 0x93}, {0x37, 0x0c}, 4333 {0x38, 0x00}, {0x39, 0x00}, {0x3a, 0xf8}, {0x38, 0x80}, 4334 {} 4335 }; 4336 const struct hda_alc298_mbxinit *seq; 4337 4338 if (action != HDA_FIXUP_ACT_INIT) 4339 return; 4340 4341 /* Start */ 4342 snd_hda_codec_write(codec, 0x06, 0, AC_VERB_SET_DIGI_CONVERT_3, 0x00); 4343 snd_hda_codec_write(codec, 0x06, 0, AC_VERB_SET_DIGI_CONVERT_3, 0x80); 4344 alc_write_coef_idx(codec, 0x26, 0xf000); 4345 alc_write_coef_idx(codec, 0x22, 0x31); 4346 alc_write_coef_idx(codec, 0x23, 0x0b); 4347 alc_write_coef_idx(codec, 0x25, 0x00); 4348 snd_hda_codec_write(codec, 0x20, 0, AC_VERB_SET_COEF_INDEX, 0x26); 4349 snd_hda_codec_write(codec, 0x20, 0, AC_VERB_SET_PROC_COEF, 0xb010); 4350 4351 for (seq = dac_init; seq->value_0x23; seq++) 4352 alc298_huawei_mbx_stereo_seq(codec, seq, seq == dac_init); 4353 } 4354 4355 static void alc269_fixup_x101_headset_mic(struct hda_codec *codec, 4356 const struct hda_fixup *fix, int action) 4357 { 4358 struct alc_spec *spec = codec->spec; 4359 if (action == HDA_FIXUP_ACT_PRE_PROBE) { 4360 spec->parse_flags |= HDA_PINCFG_HEADSET_MIC; 4361 spec->gen.hp_automute_hook = alc269_x101_hp_automute_hook; 4362 } 4363 } 4364 4365 static void alc_update_vref_led(struct hda_codec *codec, hda_nid_t pin, 4366 bool polarity, bool on) 4367 { 4368 unsigned int pinval; 4369 4370 if (!pin) 4371 return; 4372 if (polarity) 4373 on = !on; 4374 pinval = snd_hda_codec_get_pin_target(codec, pin); 4375 pinval &= ~AC_PINCTL_VREFEN; 4376 pinval |= on ? AC_PINCTL_VREF_80 : AC_PINCTL_VREF_HIZ; 4377 /* temporarily power up/down for setting VREF */ 4378 snd_hda_power_up_pm(codec); 4379 snd_hda_set_pin_ctl_cache(codec, pin, pinval); 4380 snd_hda_power_down_pm(codec); 4381 } 4382 4383 /* update mute-LED according to the speaker mute state via mic VREF pin */ 4384 static int vref_mute_led_set(struct led_classdev *led_cdev, 4385 enum led_brightness brightness) 4386 { 4387 struct hda_codec *codec = dev_to_hda_codec(led_cdev->dev->parent); 4388 struct alc_spec *spec = codec->spec; 4389 4390 alc_update_vref_led(codec, spec->mute_led_nid, 4391 spec->mute_led_polarity, brightness); 4392 return 0; 4393 } 4394 4395 /* Make sure the led works even in runtime suspend */ 4396 static unsigned int led_power_filter(struct hda_codec *codec, 4397 hda_nid_t nid, 4398 unsigned int power_state) 4399 { 4400 struct alc_spec *spec = codec->spec; 4401 4402 if (power_state != AC_PWRST_D3 || nid == 0 || 4403 (nid != spec->mute_led_nid && nid != spec->cap_mute_led_nid)) 4404 return power_state; 4405 4406 /* Set pin ctl again, it might have just been set to 0 */ 4407 snd_hda_set_pin_ctl(codec, nid, 4408 snd_hda_codec_get_pin_target(codec, nid)); 4409 4410 return snd_hda_gen_path_power_filter(codec, nid, power_state); 4411 } 4412 4413 static void alc269_fixup_hp_mute_led(struct hda_codec *codec, 4414 const struct hda_fixup *fix, int action) 4415 { 4416 struct alc_spec *spec = codec->spec; 4417 const struct dmi_device *dev = NULL; 4418 4419 if (action != HDA_FIXUP_ACT_PRE_PROBE) 4420 return; 4421 4422 while ((dev = dmi_find_device(DMI_DEV_TYPE_OEM_STRING, NULL, dev))) { 4423 int pol, pin; 4424 if (sscanf(dev->name, "HP_Mute_LED_%d_%x", &pol, &pin) != 2) 4425 continue; 4426 if (pin < 0x0a || pin >= 0x10) 4427 break; 4428 spec->mute_led_polarity = pol; 4429 spec->mute_led_nid = pin - 0x0a + 0x18; 4430 snd_hda_gen_add_mute_led_cdev(codec, vref_mute_led_set); 4431 codec->power_filter = led_power_filter; 4432 codec_dbg(codec, 4433 "Detected mute LED for %x:%d\n", spec->mute_led_nid, 4434 spec->mute_led_polarity); 4435 break; 4436 } 4437 } 4438 4439 static void alc269_fixup_hp_mute_led_micx(struct hda_codec *codec, 4440 const struct hda_fixup *fix, 4441 int action, hda_nid_t pin) 4442 { 4443 struct alc_spec *spec = codec->spec; 4444 4445 if (action == HDA_FIXUP_ACT_PRE_PROBE) { 4446 spec->mute_led_polarity = 0; 4447 spec->mute_led_nid = pin; 4448 snd_hda_gen_add_mute_led_cdev(codec, vref_mute_led_set); 4449 codec->power_filter = led_power_filter; 4450 } 4451 } 4452 4453 static void alc269_fixup_hp_mute_led_mic1(struct hda_codec *codec, 4454 const struct hda_fixup *fix, int action) 4455 { 4456 alc269_fixup_hp_mute_led_micx(codec, fix, action, 0x18); 4457 } 4458 4459 static void alc269_fixup_hp_mute_led_mic2(struct hda_codec *codec, 4460 const struct hda_fixup *fix, int action) 4461 { 4462 alc269_fixup_hp_mute_led_micx(codec, fix, action, 0x19); 4463 } 4464 4465 static void alc269_fixup_hp_mute_led_mic3(struct hda_codec *codec, 4466 const struct hda_fixup *fix, int action) 4467 { 4468 alc269_fixup_hp_mute_led_micx(codec, fix, action, 0x1b); 4469 } 4470 4471 /* update LED status via GPIO */ 4472 static void alc_update_gpio_led(struct hda_codec *codec, unsigned int mask, 4473 int polarity, bool enabled) 4474 { 4475 if (polarity) 4476 enabled = !enabled; 4477 alc_update_gpio_data(codec, mask, !enabled); /* muted -> LED on */ 4478 } 4479 4480 /* turn on/off mute LED via GPIO per vmaster hook */ 4481 static int gpio_mute_led_set(struct led_classdev *led_cdev, 4482 enum led_brightness brightness) 4483 { 4484 struct hda_codec *codec = dev_to_hda_codec(led_cdev->dev->parent); 4485 struct alc_spec *spec = codec->spec; 4486 4487 alc_update_gpio_led(codec, spec->gpio_mute_led_mask, 4488 spec->mute_led_polarity, !brightness); 4489 return 0; 4490 } 4491 4492 /* turn on/off mic-mute LED via GPIO per capture hook */ 4493 static int micmute_led_set(struct led_classdev *led_cdev, 4494 enum led_brightness brightness) 4495 { 4496 struct hda_codec *codec = dev_to_hda_codec(led_cdev->dev->parent); 4497 struct alc_spec *spec = codec->spec; 4498 4499 alc_update_gpio_led(codec, spec->gpio_mic_led_mask, 4500 spec->micmute_led_polarity, !brightness); 4501 return 0; 4502 } 4503 4504 /* setup mute and mic-mute GPIO bits, add hooks appropriately */ 4505 static void alc_fixup_hp_gpio_led(struct hda_codec *codec, 4506 int action, 4507 unsigned int mute_mask, 4508 unsigned int micmute_mask) 4509 { 4510 struct alc_spec *spec = codec->spec; 4511 4512 alc_fixup_gpio(codec, action, mute_mask | micmute_mask); 4513 4514 if (action != HDA_FIXUP_ACT_PRE_PROBE) 4515 return; 4516 if (mute_mask) { 4517 spec->gpio_mute_led_mask = mute_mask; 4518 snd_hda_gen_add_mute_led_cdev(codec, gpio_mute_led_set); 4519 } 4520 if (micmute_mask) { 4521 spec->gpio_mic_led_mask = micmute_mask; 4522 snd_hda_gen_add_micmute_led_cdev(codec, micmute_led_set); 4523 } 4524 } 4525 4526 static void alc236_fixup_hp_gpio_led(struct hda_codec *codec, 4527 const struct hda_fixup *fix, int action) 4528 { 4529 alc_fixup_hp_gpio_led(codec, action, 0x02, 0x01); 4530 } 4531 4532 static void alc269_fixup_hp_gpio_led(struct hda_codec *codec, 4533 const struct hda_fixup *fix, int action) 4534 { 4535 alc_fixup_hp_gpio_led(codec, action, 0x08, 0x10); 4536 } 4537 4538 static void alc285_fixup_hp_gpio_led(struct hda_codec *codec, 4539 const struct hda_fixup *fix, int action) 4540 { 4541 alc_fixup_hp_gpio_led(codec, action, 0x04, 0x01); 4542 } 4543 4544 static void alc286_fixup_hp_gpio_led(struct hda_codec *codec, 4545 const struct hda_fixup *fix, int action) 4546 { 4547 alc_fixup_hp_gpio_led(codec, action, 0x02, 0x20); 4548 } 4549 4550 static void alc287_fixup_hp_gpio_led(struct hda_codec *codec, 4551 const struct hda_fixup *fix, int action) 4552 { 4553 alc_fixup_hp_gpio_led(codec, action, 0x10, 0); 4554 } 4555 4556 static void alc245_fixup_hp_gpio_led(struct hda_codec *codec, 4557 const struct hda_fixup *fix, int action) 4558 { 4559 struct alc_spec *spec = codec->spec; 4560 4561 if (action == HDA_FIXUP_ACT_PRE_PROBE) 4562 spec->micmute_led_polarity = 1; 4563 alc_fixup_hp_gpio_led(codec, action, 0, 0x04); 4564 } 4565 4566 /* turn on/off mic-mute LED per capture hook via VREF change */ 4567 static int vref_micmute_led_set(struct led_classdev *led_cdev, 4568 enum led_brightness brightness) 4569 { 4570 struct hda_codec *codec = dev_to_hda_codec(led_cdev->dev->parent); 4571 struct alc_spec *spec = codec->spec; 4572 4573 alc_update_vref_led(codec, spec->cap_mute_led_nid, 4574 spec->micmute_led_polarity, brightness); 4575 return 0; 4576 } 4577 4578 static void alc269_fixup_hp_gpio_mic1_led(struct hda_codec *codec, 4579 const struct hda_fixup *fix, int action) 4580 { 4581 struct alc_spec *spec = codec->spec; 4582 4583 alc_fixup_hp_gpio_led(codec, action, 0x08, 0); 4584 if (action == HDA_FIXUP_ACT_PRE_PROBE) { 4585 /* Like hp_gpio_mic1_led, but also needs GPIO4 low to 4586 * enable headphone amp 4587 */ 4588 spec->gpio_mask |= 0x10; 4589 spec->gpio_dir |= 0x10; 4590 spec->cap_mute_led_nid = 0x18; 4591 snd_hda_gen_add_micmute_led_cdev(codec, vref_micmute_led_set); 4592 codec->power_filter = led_power_filter; 4593 } 4594 } 4595 4596 static void alc280_fixup_hp_gpio4(struct hda_codec *codec, 4597 const struct hda_fixup *fix, int action) 4598 { 4599 struct alc_spec *spec = codec->spec; 4600 4601 alc_fixup_hp_gpio_led(codec, action, 0x08, 0); 4602 if (action == HDA_FIXUP_ACT_PRE_PROBE) { 4603 spec->cap_mute_led_nid = 0x18; 4604 snd_hda_gen_add_micmute_led_cdev(codec, vref_micmute_led_set); 4605 codec->power_filter = led_power_filter; 4606 } 4607 } 4608 4609 /* HP Spectre x360 14 model needs a unique workaround for enabling the amp; 4610 * it needs to toggle the GPIO0 once on and off at each time (bko#210633) 4611 */ 4612 static void alc245_fixup_hp_x360_amp(struct hda_codec *codec, 4613 const struct hda_fixup *fix, int action) 4614 { 4615 struct alc_spec *spec = codec->spec; 4616 4617 switch (action) { 4618 case HDA_FIXUP_ACT_PRE_PROBE: 4619 spec->gpio_mask |= 0x01; 4620 spec->gpio_dir |= 0x01; 4621 break; 4622 case HDA_FIXUP_ACT_INIT: 4623 /* need to toggle GPIO to enable the amp */ 4624 alc_update_gpio_data(codec, 0x01, true); 4625 msleep(100); 4626 alc_update_gpio_data(codec, 0x01, false); 4627 break; 4628 } 4629 } 4630 4631 /* toggle GPIO2 at each time stream is started; we use PREPARE state instead */ 4632 static void alc274_hp_envy_pcm_hook(struct hda_pcm_stream *hinfo, 4633 struct hda_codec *codec, 4634 struct snd_pcm_substream *substream, 4635 int action) 4636 { 4637 switch (action) { 4638 case HDA_GEN_PCM_ACT_PREPARE: 4639 alc_update_gpio_data(codec, 0x04, true); 4640 break; 4641 case HDA_GEN_PCM_ACT_CLEANUP: 4642 alc_update_gpio_data(codec, 0x04, false); 4643 break; 4644 } 4645 } 4646 4647 static void alc274_fixup_hp_envy_gpio(struct hda_codec *codec, 4648 const struct hda_fixup *fix, 4649 int action) 4650 { 4651 struct alc_spec *spec = codec->spec; 4652 4653 if (action == HDA_FIXUP_ACT_PROBE) { 4654 spec->gpio_mask |= 0x04; 4655 spec->gpio_dir |= 0x04; 4656 spec->gen.pcm_playback_hook = alc274_hp_envy_pcm_hook; 4657 } 4658 } 4659 4660 static void alc_update_coef_led(struct hda_codec *codec, 4661 struct alc_coef_led *led, 4662 bool polarity, bool on) 4663 { 4664 if (polarity) 4665 on = !on; 4666 /* temporarily power up/down for setting COEF bit */ 4667 alc_update_coef_idx(codec, led->idx, led->mask, 4668 on ? led->on : led->off); 4669 } 4670 4671 /* update mute-LED according to the speaker mute state via COEF bit */ 4672 static int coef_mute_led_set(struct led_classdev *led_cdev, 4673 enum led_brightness brightness) 4674 { 4675 struct hda_codec *codec = dev_to_hda_codec(led_cdev->dev->parent); 4676 struct alc_spec *spec = codec->spec; 4677 4678 alc_update_coef_led(codec, &spec->mute_led_coef, 4679 spec->mute_led_polarity, brightness); 4680 return 0; 4681 } 4682 4683 static void alc285_fixup_hp_mute_led_coefbit(struct hda_codec *codec, 4684 const struct hda_fixup *fix, 4685 int action) 4686 { 4687 struct alc_spec *spec = codec->spec; 4688 4689 if (action == HDA_FIXUP_ACT_PRE_PROBE) { 4690 spec->mute_led_polarity = 0; 4691 spec->mute_led_coef.idx = 0x0b; 4692 spec->mute_led_coef.mask = 1 << 3; 4693 spec->mute_led_coef.on = 1 << 3; 4694 spec->mute_led_coef.off = 0; 4695 snd_hda_gen_add_mute_led_cdev(codec, coef_mute_led_set); 4696 } 4697 } 4698 4699 static void alc236_fixup_hp_mute_led_coefbit(struct hda_codec *codec, 4700 const struct hda_fixup *fix, 4701 int action) 4702 { 4703 struct alc_spec *spec = codec->spec; 4704 4705 if (action == HDA_FIXUP_ACT_PRE_PROBE) { 4706 spec->mute_led_polarity = 0; 4707 spec->mute_led_coef.idx = 0x34; 4708 spec->mute_led_coef.mask = 1 << 5; 4709 spec->mute_led_coef.on = 0; 4710 spec->mute_led_coef.off = 1 << 5; 4711 snd_hda_gen_add_mute_led_cdev(codec, coef_mute_led_set); 4712 } 4713 } 4714 4715 static void alc236_fixup_hp_mute_led_coefbit2(struct hda_codec *codec, 4716 const struct hda_fixup *fix, int action) 4717 { 4718 struct alc_spec *spec = codec->spec; 4719 4720 if (action == HDA_FIXUP_ACT_PRE_PROBE) { 4721 spec->mute_led_polarity = 0; 4722 spec->mute_led_coef.idx = 0x07; 4723 spec->mute_led_coef.mask = 1; 4724 spec->mute_led_coef.on = 1; 4725 spec->mute_led_coef.off = 0; 4726 snd_hda_gen_add_mute_led_cdev(codec, coef_mute_led_set); 4727 } 4728 } 4729 4730 static void alc245_fixup_hp_mute_led_coefbit(struct hda_codec *codec, 4731 const struct hda_fixup *fix, 4732 int action) 4733 { 4734 struct alc_spec *spec = codec->spec; 4735 4736 if (action == HDA_FIXUP_ACT_PRE_PROBE) { 4737 spec->mute_led_polarity = 0; 4738 spec->mute_led_coef.idx = 0x0b; 4739 spec->mute_led_coef.mask = 3 << 2; 4740 spec->mute_led_coef.on = 2 << 2; 4741 spec->mute_led_coef.off = 1 << 2; 4742 snd_hda_gen_add_mute_led_cdev(codec, coef_mute_led_set); 4743 } 4744 } 4745 4746 static void alc245_fixup_hp_mute_led_v1_coefbit(struct hda_codec *codec, 4747 const struct hda_fixup *fix, 4748 int action) 4749 { 4750 struct alc_spec *spec = codec->spec; 4751 4752 if (action == HDA_FIXUP_ACT_PRE_PROBE) { 4753 spec->mute_led_polarity = 0; 4754 spec->mute_led_coef.idx = 0x0b; 4755 spec->mute_led_coef.mask = 1 << 3; 4756 spec->mute_led_coef.on = 1 << 3; 4757 spec->mute_led_coef.off = 0; 4758 snd_hda_gen_add_mute_led_cdev(codec, coef_mute_led_set); 4759 } 4760 } 4761 4762 /* turn on/off mic-mute LED per capture hook by coef bit */ 4763 static int coef_micmute_led_set(struct led_classdev *led_cdev, 4764 enum led_brightness brightness) 4765 { 4766 struct hda_codec *codec = dev_to_hda_codec(led_cdev->dev->parent); 4767 struct alc_spec *spec = codec->spec; 4768 4769 alc_update_coef_led(codec, &spec->mic_led_coef, 4770 spec->micmute_led_polarity, brightness); 4771 return 0; 4772 } 4773 4774 static void alc285_fixup_hp_coef_micmute_led(struct hda_codec *codec, 4775 const struct hda_fixup *fix, int action) 4776 { 4777 struct alc_spec *spec = codec->spec; 4778 4779 if (action == HDA_FIXUP_ACT_PRE_PROBE) { 4780 spec->mic_led_coef.idx = 0x19; 4781 spec->mic_led_coef.mask = 1 << 13; 4782 spec->mic_led_coef.on = 1 << 13; 4783 spec->mic_led_coef.off = 0; 4784 snd_hda_gen_add_micmute_led_cdev(codec, coef_micmute_led_set); 4785 } 4786 } 4787 4788 static void alc285_fixup_hp_gpio_micmute_led(struct hda_codec *codec, 4789 const struct hda_fixup *fix, int action) 4790 { 4791 struct alc_spec *spec = codec->spec; 4792 4793 if (action == HDA_FIXUP_ACT_PRE_PROBE) 4794 spec->micmute_led_polarity = 1; 4795 alc_fixup_hp_gpio_led(codec, action, 0, 0x04); 4796 } 4797 4798 static void alc236_fixup_hp_coef_micmute_led(struct hda_codec *codec, 4799 const struct hda_fixup *fix, int action) 4800 { 4801 struct alc_spec *spec = codec->spec; 4802 4803 if (action == HDA_FIXUP_ACT_PRE_PROBE) { 4804 spec->mic_led_coef.idx = 0x35; 4805 spec->mic_led_coef.mask = 3 << 2; 4806 spec->mic_led_coef.on = 2 << 2; 4807 spec->mic_led_coef.off = 1 << 2; 4808 snd_hda_gen_add_micmute_led_cdev(codec, coef_micmute_led_set); 4809 } 4810 } 4811 4812 static void alc295_fixup_hp_mute_led_coefbit11(struct hda_codec *codec, 4813 const struct hda_fixup *fix, int action) 4814 { 4815 struct alc_spec *spec = codec->spec; 4816 4817 if (action == HDA_FIXUP_ACT_PRE_PROBE) { 4818 spec->mute_led_polarity = 0; 4819 spec->mute_led_coef.idx = 0xb; 4820 spec->mute_led_coef.mask = 3 << 3; 4821 spec->mute_led_coef.on = 1 << 3; 4822 spec->mute_led_coef.off = 1 << 4; 4823 snd_hda_gen_add_mute_led_cdev(codec, coef_mute_led_set); 4824 } 4825 } 4826 4827 static void alc285_fixup_hp_mute_led(struct hda_codec *codec, 4828 const struct hda_fixup *fix, int action) 4829 { 4830 alc285_fixup_hp_mute_led_coefbit(codec, fix, action); 4831 alc285_fixup_hp_coef_micmute_led(codec, fix, action); 4832 } 4833 4834 static void alc285_fixup_hp_spectre_x360_mute_led(struct hda_codec *codec, 4835 const struct hda_fixup *fix, int action) 4836 { 4837 alc285_fixup_hp_mute_led_coefbit(codec, fix, action); 4838 alc285_fixup_hp_gpio_micmute_led(codec, fix, action); 4839 } 4840 4841 static void alc236_fixup_hp_mute_led(struct hda_codec *codec, 4842 const struct hda_fixup *fix, int action) 4843 { 4844 alc236_fixup_hp_mute_led_coefbit(codec, fix, action); 4845 alc236_fixup_hp_coef_micmute_led(codec, fix, action); 4846 } 4847 4848 static void alc236_fixup_hp_micmute_led_vref(struct hda_codec *codec, 4849 const struct hda_fixup *fix, int action) 4850 { 4851 struct alc_spec *spec = codec->spec; 4852 4853 if (action == HDA_FIXUP_ACT_PRE_PROBE) { 4854 spec->cap_mute_led_nid = 0x1a; 4855 snd_hda_gen_add_micmute_led_cdev(codec, vref_micmute_led_set); 4856 codec->power_filter = led_power_filter; 4857 } 4858 } 4859 4860 static void alc236_fixup_hp_mute_led_micmute_vref(struct hda_codec *codec, 4861 const struct hda_fixup *fix, int action) 4862 { 4863 alc236_fixup_hp_mute_led_coefbit(codec, fix, action); 4864 alc236_fixup_hp_micmute_led_vref(codec, fix, action); 4865 } 4866 4867 static inline void alc298_samsung_write_coef_pack(struct hda_codec *codec, 4868 const unsigned short coefs[2]) 4869 { 4870 alc_write_coef_idx(codec, 0x23, coefs[0]); 4871 alc_write_coef_idx(codec, 0x25, coefs[1]); 4872 alc_write_coef_idx(codec, 0x26, 0xb011); 4873 } 4874 4875 struct alc298_samsung_amp_desc { 4876 unsigned char nid; 4877 unsigned short init_seq[2][2]; 4878 }; 4879 4880 static void alc298_fixup_samsung_amp(struct hda_codec *codec, 4881 const struct hda_fixup *fix, int action) 4882 { 4883 int i, j; 4884 static const unsigned short init_seq[][2] = { 4885 { 0x19, 0x00 }, { 0x20, 0xc0 }, { 0x22, 0x44 }, { 0x23, 0x08 }, 4886 { 0x24, 0x85 }, { 0x25, 0x41 }, { 0x35, 0x40 }, { 0x36, 0x01 }, 4887 { 0x38, 0x81 }, { 0x3a, 0x03 }, { 0x3b, 0x81 }, { 0x40, 0x3e }, 4888 { 0x41, 0x07 }, { 0x400, 0x1 } 4889 }; 4890 static const struct alc298_samsung_amp_desc amps[] = { 4891 { 0x3a, { { 0x18, 0x1 }, { 0x26, 0x0 } } }, 4892 { 0x39, { { 0x18, 0x2 }, { 0x26, 0x1 } } } 4893 }; 4894 4895 if (action != HDA_FIXUP_ACT_INIT) 4896 return; 4897 4898 for (i = 0; i < ARRAY_SIZE(amps); i++) { 4899 alc_write_coef_idx(codec, 0x22, amps[i].nid); 4900 4901 for (j = 0; j < ARRAY_SIZE(amps[i].init_seq); j++) 4902 alc298_samsung_write_coef_pack(codec, amps[i].init_seq[j]); 4903 4904 for (j = 0; j < ARRAY_SIZE(init_seq); j++) 4905 alc298_samsung_write_coef_pack(codec, init_seq[j]); 4906 } 4907 } 4908 4909 struct alc298_samsung_v2_amp_desc { 4910 unsigned short nid; 4911 int init_seq_size; 4912 unsigned short init_seq[18][2]; 4913 }; 4914 4915 static const struct alc298_samsung_v2_amp_desc 4916 alc298_samsung_v2_amp_desc_tbl[] = { 4917 { 0x38, 18, { 4918 { 0x23e1, 0x0000 }, { 0x2012, 0x006f }, { 0x2014, 0x0000 }, 4919 { 0x201b, 0x0001 }, { 0x201d, 0x0001 }, { 0x201f, 0x00fe }, 4920 { 0x2021, 0x0000 }, { 0x2022, 0x0010 }, { 0x203d, 0x0005 }, 4921 { 0x203f, 0x0003 }, { 0x2050, 0x002c }, { 0x2076, 0x000e }, 4922 { 0x207c, 0x004a }, { 0x2081, 0x0003 }, { 0x2399, 0x0003 }, 4923 { 0x23a4, 0x00b5 }, { 0x23a5, 0x0001 }, { 0x23ba, 0x0094 } 4924 }}, 4925 { 0x39, 18, { 4926 { 0x23e1, 0x0000 }, { 0x2012, 0x006f }, { 0x2014, 0x0000 }, 4927 { 0x201b, 0x0002 }, { 0x201d, 0x0002 }, { 0x201f, 0x00fd }, 4928 { 0x2021, 0x0001 }, { 0x2022, 0x0010 }, { 0x203d, 0x0005 }, 4929 { 0x203f, 0x0003 }, { 0x2050, 0x002c }, { 0x2076, 0x000e }, 4930 { 0x207c, 0x004a }, { 0x2081, 0x0003 }, { 0x2399, 0x0003 }, 4931 { 0x23a4, 0x00b5 }, { 0x23a5, 0x0001 }, { 0x23ba, 0x0094 } 4932 }}, 4933 { 0x3c, 15, { 4934 { 0x23e1, 0x0000 }, { 0x2012, 0x006f }, { 0x2014, 0x0000 }, 4935 { 0x201b, 0x0001 }, { 0x201d, 0x0001 }, { 0x201f, 0x00fe }, 4936 { 0x2021, 0x0000 }, { 0x2022, 0x0010 }, { 0x203d, 0x0005 }, 4937 { 0x203f, 0x0003 }, { 0x2050, 0x002c }, { 0x2076, 0x000e }, 4938 { 0x207c, 0x004a }, { 0x2081, 0x0003 }, { 0x23ba, 0x008d } 4939 }}, 4940 { 0x3d, 15, { 4941 { 0x23e1, 0x0000 }, { 0x2012, 0x006f }, { 0x2014, 0x0000 }, 4942 { 0x201b, 0x0002 }, { 0x201d, 0x0002 }, { 0x201f, 0x00fd }, 4943 { 0x2021, 0x0001 }, { 0x2022, 0x0010 }, { 0x203d, 0x0005 }, 4944 { 0x203f, 0x0003 }, { 0x2050, 0x002c }, { 0x2076, 0x000e }, 4945 { 0x207c, 0x004a }, { 0x2081, 0x0003 }, { 0x23ba, 0x008d } 4946 }} 4947 }; 4948 4949 static void alc298_samsung_v2_enable_amps(struct hda_codec *codec) 4950 { 4951 struct alc_spec *spec = codec->spec; 4952 static const unsigned short enable_seq[][2] = { 4953 { 0x203a, 0x0081 }, { 0x23ff, 0x0001 }, 4954 }; 4955 int i, j; 4956 4957 for (i = 0; i < spec->num_speaker_amps; i++) { 4958 alc_write_coef_idx(codec, 0x22, alc298_samsung_v2_amp_desc_tbl[i].nid); 4959 for (j = 0; j < ARRAY_SIZE(enable_seq); j++) 4960 alc298_samsung_write_coef_pack(codec, enable_seq[j]); 4961 codec_dbg(codec, "alc298_samsung_v2: Enabled speaker amp 0x%02x\n", 4962 alc298_samsung_v2_amp_desc_tbl[i].nid); 4963 } 4964 } 4965 4966 static void alc298_samsung_v2_disable_amps(struct hda_codec *codec) 4967 { 4968 struct alc_spec *spec = codec->spec; 4969 static const unsigned short disable_seq[][2] = { 4970 { 0x23ff, 0x0000 }, { 0x203a, 0x0080 }, 4971 }; 4972 int i, j; 4973 4974 for (i = 0; i < spec->num_speaker_amps; i++) { 4975 alc_write_coef_idx(codec, 0x22, alc298_samsung_v2_amp_desc_tbl[i].nid); 4976 for (j = 0; j < ARRAY_SIZE(disable_seq); j++) 4977 alc298_samsung_write_coef_pack(codec, disable_seq[j]); 4978 codec_dbg(codec, "alc298_samsung_v2: Disabled speaker amp 0x%02x\n", 4979 alc298_samsung_v2_amp_desc_tbl[i].nid); 4980 } 4981 } 4982 4983 static void alc298_samsung_v2_playback_hook(struct hda_pcm_stream *hinfo, 4984 struct hda_codec *codec, 4985 struct snd_pcm_substream *substream, 4986 int action) 4987 { 4988 /* Dynamically enable/disable speaker amps before and after playback */ 4989 if (action == HDA_GEN_PCM_ACT_OPEN) 4990 alc298_samsung_v2_enable_amps(codec); 4991 if (action == HDA_GEN_PCM_ACT_CLOSE) 4992 alc298_samsung_v2_disable_amps(codec); 4993 } 4994 4995 static void alc298_samsung_v2_init_amps(struct hda_codec *codec, 4996 int num_speaker_amps) 4997 { 4998 struct alc_spec *spec = codec->spec; 4999 int i, j; 5000 5001 /* Set spec's num_speaker_amps before doing anything else */ 5002 spec->num_speaker_amps = num_speaker_amps; 5003 5004 /* Disable speaker amps before init to prevent any physical damage */ 5005 alc298_samsung_v2_disable_amps(codec); 5006 5007 /* Initialize the speaker amps */ 5008 for (i = 0; i < spec->num_speaker_amps; i++) { 5009 alc_write_coef_idx(codec, 0x22, alc298_samsung_v2_amp_desc_tbl[i].nid); 5010 for (j = 0; j < alc298_samsung_v2_amp_desc_tbl[i].init_seq_size; j++) { 5011 alc298_samsung_write_coef_pack(codec, 5012 alc298_samsung_v2_amp_desc_tbl[i].init_seq[j]); 5013 } 5014 alc_write_coef_idx(codec, 0x89, 0x0); 5015 codec_dbg(codec, "alc298_samsung_v2: Initialized speaker amp 0x%02x\n", 5016 alc298_samsung_v2_amp_desc_tbl[i].nid); 5017 } 5018 5019 /* register hook to enable speaker amps only when they are needed */ 5020 spec->gen.pcm_playback_hook = alc298_samsung_v2_playback_hook; 5021 } 5022 5023 static void alc298_fixup_samsung_amp_v2_2_amps(struct hda_codec *codec, 5024 const struct hda_fixup *fix, int action) 5025 { 5026 if (action == HDA_FIXUP_ACT_PROBE) 5027 alc298_samsung_v2_init_amps(codec, 2); 5028 } 5029 5030 static void alc298_fixup_samsung_amp_v2_4_amps(struct hda_codec *codec, 5031 const struct hda_fixup *fix, int action) 5032 { 5033 if (action == HDA_FIXUP_ACT_PROBE) 5034 alc298_samsung_v2_init_amps(codec, 4); 5035 } 5036 5037 static void gpio2_mic_hotkey_event(struct hda_codec *codec, 5038 struct hda_jack_callback *event) 5039 { 5040 struct alc_spec *spec = codec->spec; 5041 5042 /* GPIO2 just toggles on a keypress/keyrelease cycle. Therefore 5043 send both key on and key off event for every interrupt. */ 5044 input_report_key(spec->kb_dev, spec->alc_mute_keycode_map[ALC_KEY_MICMUTE_INDEX], 1); 5045 input_sync(spec->kb_dev); 5046 input_report_key(spec->kb_dev, spec->alc_mute_keycode_map[ALC_KEY_MICMUTE_INDEX], 0); 5047 input_sync(spec->kb_dev); 5048 } 5049 5050 static int alc_register_micmute_input_device(struct hda_codec *codec) 5051 { 5052 struct alc_spec *spec = codec->spec; 5053 int i; 5054 5055 spec->kb_dev = input_allocate_device(); 5056 if (!spec->kb_dev) { 5057 codec_err(codec, "Out of memory (input_allocate_device)\n"); 5058 return -ENOMEM; 5059 } 5060 5061 spec->alc_mute_keycode_map[ALC_KEY_MICMUTE_INDEX] = KEY_MICMUTE; 5062 5063 spec->kb_dev->name = "Microphone Mute Button"; 5064 spec->kb_dev->evbit[0] = BIT_MASK(EV_KEY); 5065 spec->kb_dev->keycodesize = sizeof(spec->alc_mute_keycode_map[0]); 5066 spec->kb_dev->keycodemax = ARRAY_SIZE(spec->alc_mute_keycode_map); 5067 spec->kb_dev->keycode = spec->alc_mute_keycode_map; 5068 for (i = 0; i < ARRAY_SIZE(spec->alc_mute_keycode_map); i++) 5069 set_bit(spec->alc_mute_keycode_map[i], spec->kb_dev->keybit); 5070 5071 if (input_register_device(spec->kb_dev)) { 5072 codec_err(codec, "input_register_device failed\n"); 5073 input_free_device(spec->kb_dev); 5074 spec->kb_dev = NULL; 5075 return -ENOMEM; 5076 } 5077 5078 return 0; 5079 } 5080 5081 /* GPIO1 = set according to SKU external amp 5082 * GPIO2 = mic mute hotkey 5083 * GPIO3 = mute LED 5084 * GPIO4 = mic mute LED 5085 */ 5086 static void alc280_fixup_hp_gpio2_mic_hotkey(struct hda_codec *codec, 5087 const struct hda_fixup *fix, int action) 5088 { 5089 struct alc_spec *spec = codec->spec; 5090 5091 alc_fixup_hp_gpio_led(codec, action, 0x08, 0x10); 5092 if (action == HDA_FIXUP_ACT_PRE_PROBE) { 5093 spec->init_amp = ALC_INIT_DEFAULT; 5094 if (alc_register_micmute_input_device(codec) != 0) 5095 return; 5096 5097 spec->gpio_mask |= 0x06; 5098 spec->gpio_dir |= 0x02; 5099 spec->gpio_data |= 0x02; 5100 snd_hda_codec_write_cache(codec, codec->core.afg, 0, 5101 AC_VERB_SET_GPIO_UNSOLICITED_RSP_MASK, 0x04); 5102 snd_hda_jack_detect_enable_callback(codec, codec->core.afg, 5103 gpio2_mic_hotkey_event); 5104 return; 5105 } 5106 5107 if (!spec->kb_dev) 5108 return; 5109 5110 switch (action) { 5111 case HDA_FIXUP_ACT_FREE: 5112 input_unregister_device(spec->kb_dev); 5113 spec->kb_dev = NULL; 5114 } 5115 } 5116 5117 /* Line2 = mic mute hotkey 5118 * GPIO2 = mic mute LED 5119 */ 5120 static void alc233_fixup_lenovo_line2_mic_hotkey(struct hda_codec *codec, 5121 const struct hda_fixup *fix, int action) 5122 { 5123 struct alc_spec *spec = codec->spec; 5124 5125 alc_fixup_hp_gpio_led(codec, action, 0, 0x04); 5126 if (action == HDA_FIXUP_ACT_PRE_PROBE) { 5127 spec->init_amp = ALC_INIT_DEFAULT; 5128 if (alc_register_micmute_input_device(codec) != 0) 5129 return; 5130 5131 snd_hda_jack_detect_enable_callback(codec, 0x1b, 5132 gpio2_mic_hotkey_event); 5133 return; 5134 } 5135 5136 if (!spec->kb_dev) 5137 return; 5138 5139 switch (action) { 5140 case HDA_FIXUP_ACT_FREE: 5141 input_unregister_device(spec->kb_dev); 5142 spec->kb_dev = NULL; 5143 } 5144 } 5145 5146 static void alc269_fixup_hp_line1_mic1_led(struct hda_codec *codec, 5147 const struct hda_fixup *fix, int action) 5148 { 5149 struct alc_spec *spec = codec->spec; 5150 5151 alc269_fixup_hp_mute_led_micx(codec, fix, action, 0x1a); 5152 if (action == HDA_FIXUP_ACT_PRE_PROBE) { 5153 spec->cap_mute_led_nid = 0x18; 5154 snd_hda_gen_add_micmute_led_cdev(codec, vref_micmute_led_set); 5155 } 5156 } 5157 5158 static void alc233_fixup_lenovo_low_en_micmute_led(struct hda_codec *codec, 5159 const struct hda_fixup *fix, int action) 5160 { 5161 struct alc_spec *spec = codec->spec; 5162 5163 if (action == HDA_FIXUP_ACT_PRE_PROBE) 5164 spec->micmute_led_polarity = 1; 5165 alc233_fixup_lenovo_line2_mic_hotkey(codec, fix, action); 5166 } 5167 5168 static void alc_hp_mute_disable(struct hda_codec *codec, unsigned int delay) 5169 { 5170 if (delay <= 0) 5171 delay = 75; 5172 snd_hda_codec_write(codec, 0x21, 0, 5173 AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE); 5174 msleep(delay); 5175 snd_hda_codec_write(codec, 0x21, 0, 5176 AC_VERB_SET_PIN_WIDGET_CONTROL, 0x0); 5177 msleep(delay); 5178 } 5179 5180 static void alc_hp_enable_unmute(struct hda_codec *codec, unsigned int delay) 5181 { 5182 if (delay <= 0) 5183 delay = 75; 5184 snd_hda_codec_write(codec, 0x21, 0, 5185 AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT); 5186 msleep(delay); 5187 snd_hda_codec_write(codec, 0x21, 0, 5188 AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE); 5189 msleep(delay); 5190 } 5191 5192 static const struct coef_fw alc225_pre_hsmode[] = { 5193 UPDATE_COEF(0x4a, 1<<8, 0), 5194 UPDATE_COEFEX(0x57, 0x05, 1<<14, 0), 5195 UPDATE_COEF(0x63, 3<<14, 3<<14), 5196 UPDATE_COEF(0x4a, 3<<4, 2<<4), 5197 UPDATE_COEF(0x4a, 3<<10, 3<<10), 5198 UPDATE_COEF(0x45, 0x3f<<10, 0x34<<10), 5199 UPDATE_COEF(0x4a, 3<<10, 0), 5200 {} 5201 }; 5202 5203 static void alc_headset_mode_unplugged(struct hda_codec *codec) 5204 { 5205 struct alc_spec *spec = codec->spec; 5206 static const struct coef_fw coef0255[] = { 5207 WRITE_COEF(0x1b, 0x0c0b), /* LDO and MISC control */ 5208 WRITE_COEF(0x45, 0xd089), /* UAJ function set to menual mode */ 5209 UPDATE_COEFEX(0x57, 0x05, 1<<14, 0), /* Direct Drive HP Amp control(Set to verb control)*/ 5210 WRITE_COEF(0x06, 0x6104), /* Set MIC2 Vref gate with HP */ 5211 WRITE_COEFEX(0x57, 0x03, 0x8aa6), /* Direct Drive HP Amp control */ 5212 {} 5213 }; 5214 static const struct coef_fw coef0256[] = { 5215 WRITE_COEF(0x1b, 0x0c4b), /* LDO and MISC control */ 5216 WRITE_COEF(0x45, 0xd089), /* UAJ function set to menual mode */ 5217 WRITE_COEF(0x06, 0x6104), /* Set MIC2 Vref gate with HP */ 5218 WRITE_COEFEX(0x57, 0x03, 0x09a3), /* Direct Drive HP Amp control */ 5219 UPDATE_COEFEX(0x57, 0x05, 1<<14, 0), /* Direct Drive HP Amp control(Set to verb control)*/ 5220 {} 5221 }; 5222 static const struct coef_fw coef0233[] = { 5223 WRITE_COEF(0x1b, 0x0c0b), 5224 WRITE_COEF(0x45, 0xc429), 5225 UPDATE_COEF(0x35, 0x4000, 0), 5226 WRITE_COEF(0x06, 0x2104), 5227 WRITE_COEF(0x1a, 0x0001), 5228 WRITE_COEF(0x26, 0x0004), 5229 WRITE_COEF(0x32, 0x42a3), 5230 {} 5231 }; 5232 static const struct coef_fw coef0288[] = { 5233 UPDATE_COEF(0x4f, 0xfcc0, 0xc400), 5234 UPDATE_COEF(0x50, 0x2000, 0x2000), 5235 UPDATE_COEF(0x56, 0x0006, 0x0006), 5236 UPDATE_COEF(0x66, 0x0008, 0), 5237 UPDATE_COEF(0x67, 0x2000, 0), 5238 {} 5239 }; 5240 static const struct coef_fw coef0298[] = { 5241 UPDATE_COEF(0x19, 0x1300, 0x0300), 5242 {} 5243 }; 5244 static const struct coef_fw coef0292[] = { 5245 WRITE_COEF(0x76, 0x000e), 5246 WRITE_COEF(0x6c, 0x2400), 5247 WRITE_COEF(0x18, 0x7308), 5248 WRITE_COEF(0x6b, 0xc429), 5249 {} 5250 }; 5251 static const struct coef_fw coef0293[] = { 5252 UPDATE_COEF(0x10, 7<<8, 6<<8), /* SET Line1 JD to 0 */ 5253 UPDATE_COEFEX(0x57, 0x05, 1<<15|1<<13, 0x0), /* SET charge pump by verb */ 5254 UPDATE_COEFEX(0x57, 0x03, 1<<10, 1<<10), /* SET EN_OSW to 1 */ 5255 UPDATE_COEF(0x1a, 1<<3, 1<<3), /* Combo JD gating with LINE1-VREFO */ 5256 WRITE_COEF(0x45, 0xc429), /* Set to TRS type */ 5257 UPDATE_COEF(0x4a, 0x000f, 0x000e), /* Combo Jack auto detect */ 5258 {} 5259 }; 5260 static const struct coef_fw coef0668[] = { 5261 WRITE_COEF(0x15, 0x0d40), 5262 WRITE_COEF(0xb7, 0x802b), 5263 {} 5264 }; 5265 static const struct coef_fw coef0225[] = { 5266 UPDATE_COEF(0x63, 3<<14, 0), 5267 {} 5268 }; 5269 static const struct coef_fw coef0274[] = { 5270 UPDATE_COEF(0x4a, 0x0100, 0), 5271 UPDATE_COEFEX(0x57, 0x05, 0x4000, 0), 5272 UPDATE_COEF(0x6b, 0xf000, 0x5000), 5273 UPDATE_COEF(0x4a, 0x0010, 0), 5274 UPDATE_COEF(0x4a, 0x0c00, 0x0c00), 5275 WRITE_COEF(0x45, 0x5289), 5276 UPDATE_COEF(0x4a, 0x0c00, 0), 5277 {} 5278 }; 5279 5280 if (spec->no_internal_mic_pin) { 5281 alc_update_coef_idx(codec, 0x45, 0xf<<12 | 1<<10, 5<<12); 5282 return; 5283 } 5284 5285 switch (codec->core.vendor_id) { 5286 case 0x10ec0255: 5287 alc_process_coef_fw(codec, coef0255); 5288 break; 5289 case 0x10ec0230: 5290 case 0x10ec0236: 5291 case 0x10ec0256: 5292 case 0x19e58326: 5293 alc_hp_mute_disable(codec, 75); 5294 alc_process_coef_fw(codec, coef0256); 5295 break; 5296 case 0x10ec0234: 5297 case 0x10ec0274: 5298 case 0x10ec0294: 5299 alc_process_coef_fw(codec, coef0274); 5300 break; 5301 case 0x10ec0233: 5302 case 0x10ec0283: 5303 alc_process_coef_fw(codec, coef0233); 5304 break; 5305 case 0x10ec0286: 5306 case 0x10ec0288: 5307 alc_process_coef_fw(codec, coef0288); 5308 break; 5309 case 0x10ec0298: 5310 alc_process_coef_fw(codec, coef0298); 5311 alc_process_coef_fw(codec, coef0288); 5312 break; 5313 case 0x10ec0292: 5314 alc_process_coef_fw(codec, coef0292); 5315 break; 5316 case 0x10ec0293: 5317 alc_process_coef_fw(codec, coef0293); 5318 break; 5319 case 0x10ec0668: 5320 alc_process_coef_fw(codec, coef0668); 5321 break; 5322 case 0x10ec0215: 5323 case 0x10ec0225: 5324 case 0x10ec0285: 5325 case 0x10ec0295: 5326 case 0x10ec0289: 5327 case 0x10ec0299: 5328 alc_hp_mute_disable(codec, 75); 5329 alc_process_coef_fw(codec, alc225_pre_hsmode); 5330 alc_process_coef_fw(codec, coef0225); 5331 break; 5332 case 0x10ec0867: 5333 alc_update_coefex_idx(codec, 0x57, 0x5, 1<<14, 0); 5334 break; 5335 } 5336 codec_dbg(codec, "Headset jack set to unplugged mode.\n"); 5337 } 5338 5339 5340 static void alc_headset_mode_mic_in(struct hda_codec *codec, hda_nid_t hp_pin, 5341 hda_nid_t mic_pin) 5342 { 5343 static const struct coef_fw coef0255[] = { 5344 WRITE_COEFEX(0x57, 0x03, 0x8aa6), 5345 WRITE_COEF(0x06, 0x6100), /* Set MIC2 Vref gate to normal */ 5346 {} 5347 }; 5348 static const struct coef_fw coef0256[] = { 5349 UPDATE_COEFEX(0x57, 0x05, 1<<14, 1<<14), /* Direct Drive HP Amp control(Set to verb control)*/ 5350 WRITE_COEFEX(0x57, 0x03, 0x09a3), 5351 WRITE_COEF(0x06, 0x6100), /* Set MIC2 Vref gate to normal */ 5352 {} 5353 }; 5354 static const struct coef_fw coef0233[] = { 5355 UPDATE_COEF(0x35, 0, 1<<14), 5356 WRITE_COEF(0x06, 0x2100), 5357 WRITE_COEF(0x1a, 0x0021), 5358 WRITE_COEF(0x26, 0x008c), 5359 {} 5360 }; 5361 static const struct coef_fw coef0288[] = { 5362 UPDATE_COEF(0x4f, 0x00c0, 0), 5363 UPDATE_COEF(0x50, 0x2000, 0), 5364 UPDATE_COEF(0x56, 0x0006, 0), 5365 UPDATE_COEF(0x4f, 0xfcc0, 0xc400), 5366 UPDATE_COEF(0x66, 0x0008, 0x0008), 5367 UPDATE_COEF(0x67, 0x2000, 0x2000), 5368 {} 5369 }; 5370 static const struct coef_fw coef0292[] = { 5371 WRITE_COEF(0x19, 0xa208), 5372 WRITE_COEF(0x2e, 0xacf0), 5373 {} 5374 }; 5375 static const struct coef_fw coef0293[] = { 5376 UPDATE_COEFEX(0x57, 0x05, 0, 1<<15|1<<13), /* SET charge pump by verb */ 5377 UPDATE_COEFEX(0x57, 0x03, 1<<10, 0), /* SET EN_OSW to 0 */ 5378 UPDATE_COEF(0x1a, 1<<3, 0), /* Combo JD gating without LINE1-VREFO */ 5379 {} 5380 }; 5381 static const struct coef_fw coef0688[] = { 5382 WRITE_COEF(0xb7, 0x802b), 5383 WRITE_COEF(0xb5, 0x1040), 5384 UPDATE_COEF(0xc3, 0, 1<<12), 5385 {} 5386 }; 5387 static const struct coef_fw coef0225[] = { 5388 UPDATE_COEFEX(0x57, 0x05, 1<<14, 1<<14), 5389 UPDATE_COEF(0x4a, 3<<4, 2<<4), 5390 UPDATE_COEF(0x63, 3<<14, 0), 5391 {} 5392 }; 5393 static const struct coef_fw coef0274[] = { 5394 UPDATE_COEFEX(0x57, 0x05, 0x4000, 0x4000), 5395 UPDATE_COEF(0x4a, 0x0010, 0), 5396 UPDATE_COEF(0x6b, 0xf000, 0), 5397 {} 5398 }; 5399 5400 switch (codec->core.vendor_id) { 5401 case 0x10ec0255: 5402 alc_write_coef_idx(codec, 0x45, 0xc489); 5403 snd_hda_set_pin_ctl_cache(codec, hp_pin, 0); 5404 alc_process_coef_fw(codec, coef0255); 5405 snd_hda_set_pin_ctl_cache(codec, mic_pin, PIN_VREF50); 5406 break; 5407 case 0x10ec0230: 5408 case 0x10ec0236: 5409 case 0x10ec0256: 5410 case 0x19e58326: 5411 alc_write_coef_idx(codec, 0x45, 0xc489); 5412 snd_hda_set_pin_ctl_cache(codec, hp_pin, 0); 5413 alc_process_coef_fw(codec, coef0256); 5414 snd_hda_set_pin_ctl_cache(codec, mic_pin, PIN_VREF50); 5415 break; 5416 case 0x10ec0234: 5417 case 0x10ec0274: 5418 case 0x10ec0294: 5419 alc_write_coef_idx(codec, 0x45, 0x4689); 5420 snd_hda_set_pin_ctl_cache(codec, hp_pin, 0); 5421 alc_process_coef_fw(codec, coef0274); 5422 snd_hda_set_pin_ctl_cache(codec, mic_pin, PIN_VREF50); 5423 break; 5424 case 0x10ec0233: 5425 case 0x10ec0283: 5426 alc_write_coef_idx(codec, 0x45, 0xc429); 5427 snd_hda_set_pin_ctl_cache(codec, hp_pin, 0); 5428 alc_process_coef_fw(codec, coef0233); 5429 snd_hda_set_pin_ctl_cache(codec, mic_pin, PIN_VREF50); 5430 break; 5431 case 0x10ec0286: 5432 case 0x10ec0288: 5433 case 0x10ec0298: 5434 snd_hda_set_pin_ctl_cache(codec, hp_pin, 0); 5435 alc_process_coef_fw(codec, coef0288); 5436 snd_hda_set_pin_ctl_cache(codec, mic_pin, PIN_VREF50); 5437 break; 5438 case 0x10ec0292: 5439 snd_hda_set_pin_ctl_cache(codec, hp_pin, 0); 5440 alc_process_coef_fw(codec, coef0292); 5441 break; 5442 case 0x10ec0293: 5443 /* Set to TRS mode */ 5444 alc_write_coef_idx(codec, 0x45, 0xc429); 5445 snd_hda_set_pin_ctl_cache(codec, hp_pin, 0); 5446 alc_process_coef_fw(codec, coef0293); 5447 snd_hda_set_pin_ctl_cache(codec, mic_pin, PIN_VREF50); 5448 break; 5449 case 0x10ec0867: 5450 alc_update_coefex_idx(codec, 0x57, 0x5, 0, 1<<14); 5451 fallthrough; 5452 case 0x10ec0221: 5453 case 0x10ec0662: 5454 snd_hda_set_pin_ctl_cache(codec, hp_pin, 0); 5455 snd_hda_set_pin_ctl_cache(codec, mic_pin, PIN_VREF50); 5456 break; 5457 case 0x10ec0668: 5458 alc_write_coef_idx(codec, 0x11, 0x0001); 5459 snd_hda_set_pin_ctl_cache(codec, hp_pin, 0); 5460 alc_process_coef_fw(codec, coef0688); 5461 snd_hda_set_pin_ctl_cache(codec, mic_pin, PIN_VREF50); 5462 break; 5463 case 0x10ec0215: 5464 case 0x10ec0225: 5465 case 0x10ec0285: 5466 case 0x10ec0295: 5467 case 0x10ec0289: 5468 case 0x10ec0299: 5469 alc_process_coef_fw(codec, alc225_pre_hsmode); 5470 alc_update_coef_idx(codec, 0x45, 0x3f<<10, 0x31<<10); 5471 snd_hda_set_pin_ctl_cache(codec, hp_pin, 0); 5472 alc_process_coef_fw(codec, coef0225); 5473 snd_hda_set_pin_ctl_cache(codec, mic_pin, PIN_VREF50); 5474 break; 5475 } 5476 codec_dbg(codec, "Headset jack set to mic-in mode.\n"); 5477 } 5478 5479 static void alc_headset_mode_default(struct hda_codec *codec) 5480 { 5481 static const struct coef_fw coef0225[] = { 5482 UPDATE_COEF(0x45, 0x3f<<10, 0x30<<10), 5483 UPDATE_COEF(0x45, 0x3f<<10, 0x31<<10), 5484 UPDATE_COEF(0x49, 3<<8, 0<<8), 5485 UPDATE_COEF(0x4a, 3<<4, 3<<4), 5486 UPDATE_COEF(0x63, 3<<14, 0), 5487 UPDATE_COEF(0x67, 0xf000, 0x3000), 5488 {} 5489 }; 5490 static const struct coef_fw coef0255[] = { 5491 WRITE_COEF(0x45, 0xc089), 5492 WRITE_COEF(0x45, 0xc489), 5493 WRITE_COEFEX(0x57, 0x03, 0x8ea6), 5494 WRITE_COEF(0x49, 0x0049), 5495 {} 5496 }; 5497 static const struct coef_fw coef0256[] = { 5498 WRITE_COEF(0x45, 0xc489), 5499 WRITE_COEFEX(0x57, 0x03, 0x0da3), 5500 WRITE_COEF(0x49, 0x0049), 5501 UPDATE_COEFEX(0x57, 0x05, 1<<14, 0), /* Direct Drive HP Amp control(Set to verb control)*/ 5502 WRITE_COEF(0x06, 0x6100), 5503 {} 5504 }; 5505 static const struct coef_fw coef0233[] = { 5506 WRITE_COEF(0x06, 0x2100), 5507 WRITE_COEF(0x32, 0x4ea3), 5508 {} 5509 }; 5510 static const struct coef_fw coef0288[] = { 5511 UPDATE_COEF(0x4f, 0xfcc0, 0xc400), /* Set to TRS type */ 5512 UPDATE_COEF(0x50, 0x2000, 0x2000), 5513 UPDATE_COEF(0x56, 0x0006, 0x0006), 5514 UPDATE_COEF(0x66, 0x0008, 0), 5515 UPDATE_COEF(0x67, 0x2000, 0), 5516 {} 5517 }; 5518 static const struct coef_fw coef0292[] = { 5519 WRITE_COEF(0x76, 0x000e), 5520 WRITE_COEF(0x6c, 0x2400), 5521 WRITE_COEF(0x6b, 0xc429), 5522 WRITE_COEF(0x18, 0x7308), 5523 {} 5524 }; 5525 static const struct coef_fw coef0293[] = { 5526 UPDATE_COEF(0x4a, 0x000f, 0x000e), /* Combo Jack auto detect */ 5527 WRITE_COEF(0x45, 0xC429), /* Set to TRS type */ 5528 UPDATE_COEF(0x1a, 1<<3, 0), /* Combo JD gating without LINE1-VREFO */ 5529 {} 5530 }; 5531 static const struct coef_fw coef0688[] = { 5532 WRITE_COEF(0x11, 0x0041), 5533 WRITE_COEF(0x15, 0x0d40), 5534 WRITE_COEF(0xb7, 0x802b), 5535 {} 5536 }; 5537 static const struct coef_fw coef0274[] = { 5538 WRITE_COEF(0x45, 0x4289), 5539 UPDATE_COEF(0x4a, 0x0010, 0x0010), 5540 UPDATE_COEF(0x6b, 0x0f00, 0), 5541 UPDATE_COEF(0x49, 0x0300, 0x0300), 5542 {} 5543 }; 5544 5545 switch (codec->core.vendor_id) { 5546 case 0x10ec0215: 5547 case 0x10ec0225: 5548 case 0x10ec0285: 5549 case 0x10ec0295: 5550 case 0x10ec0289: 5551 case 0x10ec0299: 5552 alc_process_coef_fw(codec, alc225_pre_hsmode); 5553 alc_process_coef_fw(codec, coef0225); 5554 alc_hp_enable_unmute(codec, 75); 5555 break; 5556 case 0x10ec0255: 5557 alc_process_coef_fw(codec, coef0255); 5558 break; 5559 case 0x10ec0230: 5560 case 0x10ec0236: 5561 case 0x10ec0256: 5562 case 0x19e58326: 5563 alc_write_coef_idx(codec, 0x1b, 0x0e4b); 5564 alc_write_coef_idx(codec, 0x45, 0xc089); 5565 msleep(50); 5566 alc_process_coef_fw(codec, coef0256); 5567 alc_hp_enable_unmute(codec, 75); 5568 break; 5569 case 0x10ec0234: 5570 case 0x10ec0274: 5571 case 0x10ec0294: 5572 alc_process_coef_fw(codec, coef0274); 5573 break; 5574 case 0x10ec0233: 5575 case 0x10ec0283: 5576 alc_process_coef_fw(codec, coef0233); 5577 break; 5578 case 0x10ec0286: 5579 case 0x10ec0288: 5580 case 0x10ec0298: 5581 alc_process_coef_fw(codec, coef0288); 5582 break; 5583 case 0x10ec0292: 5584 alc_process_coef_fw(codec, coef0292); 5585 break; 5586 case 0x10ec0293: 5587 alc_process_coef_fw(codec, coef0293); 5588 break; 5589 case 0x10ec0668: 5590 alc_process_coef_fw(codec, coef0688); 5591 break; 5592 case 0x10ec0867: 5593 alc_update_coefex_idx(codec, 0x57, 0x5, 1<<14, 0); 5594 break; 5595 } 5596 codec_dbg(codec, "Headset jack set to headphone (default) mode.\n"); 5597 } 5598 5599 /* Iphone type */ 5600 static void alc_headset_mode_ctia(struct hda_codec *codec) 5601 { 5602 int val; 5603 5604 static const struct coef_fw coef0255[] = { 5605 WRITE_COEF(0x45, 0xd489), /* Set to CTIA type */ 5606 WRITE_COEF(0x1b, 0x0c2b), 5607 WRITE_COEFEX(0x57, 0x03, 0x8ea6), 5608 {} 5609 }; 5610 static const struct coef_fw coef0256[] = { 5611 WRITE_COEF(0x45, 0xd489), /* Set to CTIA type */ 5612 WRITE_COEF(0x1b, 0x0e6b), 5613 {} 5614 }; 5615 static const struct coef_fw coef0233[] = { 5616 WRITE_COEF(0x45, 0xd429), 5617 WRITE_COEF(0x1b, 0x0c2b), 5618 WRITE_COEF(0x32, 0x4ea3), 5619 {} 5620 }; 5621 static const struct coef_fw coef0288[] = { 5622 UPDATE_COEF(0x50, 0x2000, 0x2000), 5623 UPDATE_COEF(0x56, 0x0006, 0x0006), 5624 UPDATE_COEF(0x66, 0x0008, 0), 5625 UPDATE_COEF(0x67, 0x2000, 0), 5626 {} 5627 }; 5628 static const struct coef_fw coef0292[] = { 5629 WRITE_COEF(0x6b, 0xd429), 5630 WRITE_COEF(0x76, 0x0008), 5631 WRITE_COEF(0x18, 0x7388), 5632 {} 5633 }; 5634 static const struct coef_fw coef0293[] = { 5635 WRITE_COEF(0x45, 0xd429), /* Set to ctia type */ 5636 UPDATE_COEF(0x10, 7<<8, 7<<8), /* SET Line1 JD to 1 */ 5637 {} 5638 }; 5639 static const struct coef_fw coef0688[] = { 5640 WRITE_COEF(0x11, 0x0001), 5641 WRITE_COEF(0x15, 0x0d60), 5642 WRITE_COEF(0xc3, 0x0000), 5643 {} 5644 }; 5645 static const struct coef_fw coef0225_1[] = { 5646 UPDATE_COEF(0x45, 0x3f<<10, 0x35<<10), 5647 UPDATE_COEF(0x63, 3<<14, 2<<14), 5648 {} 5649 }; 5650 static const struct coef_fw coef0225_2[] = { 5651 UPDATE_COEF(0x45, 0x3f<<10, 0x35<<10), 5652 UPDATE_COEF(0x63, 3<<14, 1<<14), 5653 {} 5654 }; 5655 5656 switch (codec->core.vendor_id) { 5657 case 0x10ec0255: 5658 alc_process_coef_fw(codec, coef0255); 5659 break; 5660 case 0x10ec0230: 5661 case 0x10ec0236: 5662 case 0x10ec0256: 5663 case 0x19e58326: 5664 alc_process_coef_fw(codec, coef0256); 5665 alc_hp_enable_unmute(codec, 75); 5666 break; 5667 case 0x10ec0234: 5668 case 0x10ec0274: 5669 case 0x10ec0294: 5670 alc_write_coef_idx(codec, 0x45, 0xd689); 5671 break; 5672 case 0x10ec0233: 5673 case 0x10ec0283: 5674 alc_process_coef_fw(codec, coef0233); 5675 break; 5676 case 0x10ec0298: 5677 val = alc_read_coef_idx(codec, 0x50); 5678 if (val & (1 << 12)) { 5679 alc_update_coef_idx(codec, 0x8e, 0x0070, 0x0020); 5680 alc_update_coef_idx(codec, 0x4f, 0xfcc0, 0xd400); 5681 msleep(300); 5682 } else { 5683 alc_update_coef_idx(codec, 0x8e, 0x0070, 0x0010); 5684 alc_update_coef_idx(codec, 0x4f, 0xfcc0, 0xd400); 5685 msleep(300); 5686 } 5687 break; 5688 case 0x10ec0286: 5689 case 0x10ec0288: 5690 alc_update_coef_idx(codec, 0x4f, 0xfcc0, 0xd400); 5691 msleep(300); 5692 alc_process_coef_fw(codec, coef0288); 5693 break; 5694 case 0x10ec0292: 5695 alc_process_coef_fw(codec, coef0292); 5696 break; 5697 case 0x10ec0293: 5698 alc_process_coef_fw(codec, coef0293); 5699 break; 5700 case 0x10ec0668: 5701 alc_process_coef_fw(codec, coef0688); 5702 break; 5703 case 0x10ec0215: 5704 case 0x10ec0225: 5705 case 0x10ec0285: 5706 case 0x10ec0295: 5707 case 0x10ec0289: 5708 case 0x10ec0299: 5709 val = alc_read_coef_idx(codec, 0x45); 5710 if (val & (1 << 9)) 5711 alc_process_coef_fw(codec, coef0225_2); 5712 else 5713 alc_process_coef_fw(codec, coef0225_1); 5714 alc_hp_enable_unmute(codec, 75); 5715 break; 5716 case 0x10ec0867: 5717 alc_update_coefex_idx(codec, 0x57, 0x5, 1<<14, 0); 5718 break; 5719 } 5720 codec_dbg(codec, "Headset jack set to iPhone-style headset mode.\n"); 5721 } 5722 5723 /* Nokia type */ 5724 static void alc_headset_mode_omtp(struct hda_codec *codec) 5725 { 5726 static const struct coef_fw coef0255[] = { 5727 WRITE_COEF(0x45, 0xe489), /* Set to OMTP Type */ 5728 WRITE_COEF(0x1b, 0x0c2b), 5729 WRITE_COEFEX(0x57, 0x03, 0x8ea6), 5730 {} 5731 }; 5732 static const struct coef_fw coef0256[] = { 5733 WRITE_COEF(0x45, 0xe489), /* Set to OMTP Type */ 5734 WRITE_COEF(0x1b, 0x0e6b), 5735 {} 5736 }; 5737 static const struct coef_fw coef0233[] = { 5738 WRITE_COEF(0x45, 0xe429), 5739 WRITE_COEF(0x1b, 0x0c2b), 5740 WRITE_COEF(0x32, 0x4ea3), 5741 {} 5742 }; 5743 static const struct coef_fw coef0288[] = { 5744 UPDATE_COEF(0x50, 0x2000, 0x2000), 5745 UPDATE_COEF(0x56, 0x0006, 0x0006), 5746 UPDATE_COEF(0x66, 0x0008, 0), 5747 UPDATE_COEF(0x67, 0x2000, 0), 5748 {} 5749 }; 5750 static const struct coef_fw coef0292[] = { 5751 WRITE_COEF(0x6b, 0xe429), 5752 WRITE_COEF(0x76, 0x0008), 5753 WRITE_COEF(0x18, 0x7388), 5754 {} 5755 }; 5756 static const struct coef_fw coef0293[] = { 5757 WRITE_COEF(0x45, 0xe429), /* Set to omtp type */ 5758 UPDATE_COEF(0x10, 7<<8, 7<<8), /* SET Line1 JD to 1 */ 5759 {} 5760 }; 5761 static const struct coef_fw coef0688[] = { 5762 WRITE_COEF(0x11, 0x0001), 5763 WRITE_COEF(0x15, 0x0d50), 5764 WRITE_COEF(0xc3, 0x0000), 5765 {} 5766 }; 5767 static const struct coef_fw coef0225[] = { 5768 UPDATE_COEF(0x45, 0x3f<<10, 0x39<<10), 5769 UPDATE_COEF(0x63, 3<<14, 2<<14), 5770 {} 5771 }; 5772 5773 switch (codec->core.vendor_id) { 5774 case 0x10ec0255: 5775 alc_process_coef_fw(codec, coef0255); 5776 break; 5777 case 0x10ec0230: 5778 case 0x10ec0236: 5779 case 0x10ec0256: 5780 case 0x19e58326: 5781 alc_process_coef_fw(codec, coef0256); 5782 alc_hp_enable_unmute(codec, 75); 5783 break; 5784 case 0x10ec0234: 5785 case 0x10ec0274: 5786 case 0x10ec0294: 5787 alc_write_coef_idx(codec, 0x45, 0xe689); 5788 break; 5789 case 0x10ec0233: 5790 case 0x10ec0283: 5791 alc_process_coef_fw(codec, coef0233); 5792 break; 5793 case 0x10ec0298: 5794 alc_update_coef_idx(codec, 0x8e, 0x0070, 0x0010);/* Headset output enable */ 5795 alc_update_coef_idx(codec, 0x4f, 0xfcc0, 0xe400); 5796 msleep(300); 5797 break; 5798 case 0x10ec0286: 5799 case 0x10ec0288: 5800 alc_update_coef_idx(codec, 0x4f, 0xfcc0, 0xe400); 5801 msleep(300); 5802 alc_process_coef_fw(codec, coef0288); 5803 break; 5804 case 0x10ec0292: 5805 alc_process_coef_fw(codec, coef0292); 5806 break; 5807 case 0x10ec0293: 5808 alc_process_coef_fw(codec, coef0293); 5809 break; 5810 case 0x10ec0668: 5811 alc_process_coef_fw(codec, coef0688); 5812 break; 5813 case 0x10ec0215: 5814 case 0x10ec0225: 5815 case 0x10ec0285: 5816 case 0x10ec0295: 5817 case 0x10ec0289: 5818 case 0x10ec0299: 5819 alc_process_coef_fw(codec, coef0225); 5820 alc_hp_enable_unmute(codec, 75); 5821 break; 5822 } 5823 codec_dbg(codec, "Headset jack set to Nokia-style headset mode.\n"); 5824 } 5825 5826 static void alc_determine_headset_type(struct hda_codec *codec) 5827 { 5828 int val; 5829 bool is_ctia = false; 5830 struct alc_spec *spec = codec->spec; 5831 static const struct coef_fw coef0255[] = { 5832 WRITE_COEF(0x45, 0xd089), /* combo jack auto switch control(Check type)*/ 5833 WRITE_COEF(0x49, 0x0149), /* combo jack auto switch control(Vref 5834 conteol) */ 5835 {} 5836 }; 5837 static const struct coef_fw coef0288[] = { 5838 UPDATE_COEF(0x4f, 0xfcc0, 0xd400), /* Check Type */ 5839 {} 5840 }; 5841 static const struct coef_fw coef0298[] = { 5842 UPDATE_COEF(0x50, 0x2000, 0x2000), 5843 UPDATE_COEF(0x56, 0x0006, 0x0006), 5844 UPDATE_COEF(0x66, 0x0008, 0), 5845 UPDATE_COEF(0x67, 0x2000, 0), 5846 UPDATE_COEF(0x19, 0x1300, 0x1300), 5847 {} 5848 }; 5849 static const struct coef_fw coef0293[] = { 5850 UPDATE_COEF(0x4a, 0x000f, 0x0008), /* Combo Jack auto detect */ 5851 WRITE_COEF(0x45, 0xD429), /* Set to ctia type */ 5852 {} 5853 }; 5854 static const struct coef_fw coef0688[] = { 5855 WRITE_COEF(0x11, 0x0001), 5856 WRITE_COEF(0xb7, 0x802b), 5857 WRITE_COEF(0x15, 0x0d60), 5858 WRITE_COEF(0xc3, 0x0c00), 5859 {} 5860 }; 5861 static const struct coef_fw coef0274[] = { 5862 UPDATE_COEF(0x4a, 0x0010, 0), 5863 UPDATE_COEF(0x4a, 0x8000, 0), 5864 WRITE_COEF(0x45, 0xd289), 5865 UPDATE_COEF(0x49, 0x0300, 0x0300), 5866 {} 5867 }; 5868 5869 if (spec->no_internal_mic_pin) { 5870 alc_update_coef_idx(codec, 0x45, 0xf<<12 | 1<<10, 5<<12); 5871 return; 5872 } 5873 5874 switch (codec->core.vendor_id) { 5875 case 0x10ec0255: 5876 alc_process_coef_fw(codec, coef0255); 5877 msleep(300); 5878 val = alc_read_coef_idx(codec, 0x46); 5879 is_ctia = (val & 0x0070) == 0x0070; 5880 break; 5881 case 0x10ec0230: 5882 case 0x10ec0236: 5883 case 0x10ec0256: 5884 case 0x19e58326: 5885 alc_write_coef_idx(codec, 0x1b, 0x0e4b); 5886 alc_write_coef_idx(codec, 0x06, 0x6104); 5887 alc_write_coefex_idx(codec, 0x57, 0x3, 0x09a3); 5888 5889 alc_process_coef_fw(codec, coef0255); 5890 msleep(300); 5891 val = alc_read_coef_idx(codec, 0x46); 5892 is_ctia = (val & 0x0070) == 0x0070; 5893 if (!is_ctia) { 5894 alc_write_coef_idx(codec, 0x45, 0xe089); 5895 msleep(100); 5896 val = alc_read_coef_idx(codec, 0x46); 5897 if ((val & 0x0070) == 0x0070) 5898 is_ctia = false; 5899 else 5900 is_ctia = true; 5901 } 5902 alc_write_coefex_idx(codec, 0x57, 0x3, 0x0da3); 5903 alc_update_coefex_idx(codec, 0x57, 0x5, 1<<14, 0); 5904 break; 5905 case 0x10ec0234: 5906 case 0x10ec0274: 5907 case 0x10ec0294: 5908 alc_process_coef_fw(codec, coef0274); 5909 msleep(850); 5910 val = alc_read_coef_idx(codec, 0x46); 5911 is_ctia = (val & 0x00f0) == 0x00f0; 5912 break; 5913 case 0x10ec0233: 5914 case 0x10ec0283: 5915 alc_write_coef_idx(codec, 0x45, 0xd029); 5916 msleep(300); 5917 val = alc_read_coef_idx(codec, 0x46); 5918 is_ctia = (val & 0x0070) == 0x0070; 5919 break; 5920 case 0x10ec0298: 5921 snd_hda_codec_write(codec, 0x21, 0, 5922 AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE); 5923 msleep(100); 5924 snd_hda_codec_write(codec, 0x21, 0, 5925 AC_VERB_SET_PIN_WIDGET_CONTROL, 0x0); 5926 msleep(200); 5927 5928 val = alc_read_coef_idx(codec, 0x50); 5929 if (val & (1 << 12)) { 5930 alc_update_coef_idx(codec, 0x8e, 0x0070, 0x0020); 5931 alc_process_coef_fw(codec, coef0288); 5932 msleep(350); 5933 val = alc_read_coef_idx(codec, 0x50); 5934 is_ctia = (val & 0x0070) == 0x0070; 5935 } else { 5936 alc_update_coef_idx(codec, 0x8e, 0x0070, 0x0010); 5937 alc_process_coef_fw(codec, coef0288); 5938 msleep(350); 5939 val = alc_read_coef_idx(codec, 0x50); 5940 is_ctia = (val & 0x0070) == 0x0070; 5941 } 5942 alc_process_coef_fw(codec, coef0298); 5943 snd_hda_codec_write(codec, 0x21, 0, 5944 AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP); 5945 msleep(75); 5946 snd_hda_codec_write(codec, 0x21, 0, 5947 AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE); 5948 break; 5949 case 0x10ec0286: 5950 case 0x10ec0288: 5951 alc_process_coef_fw(codec, coef0288); 5952 msleep(350); 5953 val = alc_read_coef_idx(codec, 0x50); 5954 is_ctia = (val & 0x0070) == 0x0070; 5955 break; 5956 case 0x10ec0292: 5957 alc_write_coef_idx(codec, 0x6b, 0xd429); 5958 msleep(300); 5959 val = alc_read_coef_idx(codec, 0x6c); 5960 is_ctia = (val & 0x001c) == 0x001c; 5961 break; 5962 case 0x10ec0293: 5963 alc_process_coef_fw(codec, coef0293); 5964 msleep(300); 5965 val = alc_read_coef_idx(codec, 0x46); 5966 is_ctia = (val & 0x0070) == 0x0070; 5967 break; 5968 case 0x10ec0668: 5969 alc_process_coef_fw(codec, coef0688); 5970 msleep(300); 5971 val = alc_read_coef_idx(codec, 0xbe); 5972 is_ctia = (val & 0x1c02) == 0x1c02; 5973 break; 5974 case 0x10ec0215: 5975 case 0x10ec0225: 5976 case 0x10ec0285: 5977 case 0x10ec0295: 5978 case 0x10ec0289: 5979 case 0x10ec0299: 5980 alc_process_coef_fw(codec, alc225_pre_hsmode); 5981 alc_update_coef_idx(codec, 0x67, 0xf000, 0x1000); 5982 val = alc_read_coef_idx(codec, 0x45); 5983 if (val & (1 << 9)) { 5984 alc_update_coef_idx(codec, 0x45, 0x3f<<10, 0x34<<10); 5985 alc_update_coef_idx(codec, 0x49, 3<<8, 2<<8); 5986 msleep(800); 5987 val = alc_read_coef_idx(codec, 0x46); 5988 is_ctia = (val & 0x00f0) == 0x00f0; 5989 } else { 5990 alc_update_coef_idx(codec, 0x45, 0x3f<<10, 0x34<<10); 5991 alc_update_coef_idx(codec, 0x49, 3<<8, 1<<8); 5992 msleep(800); 5993 val = alc_read_coef_idx(codec, 0x46); 5994 is_ctia = (val & 0x00f0) == 0x00f0; 5995 } 5996 if (!is_ctia) { 5997 alc_update_coef_idx(codec, 0x45, 0x3f<<10, 0x38<<10); 5998 alc_update_coef_idx(codec, 0x49, 3<<8, 1<<8); 5999 msleep(100); 6000 val = alc_read_coef_idx(codec, 0x46); 6001 if ((val & 0x00f0) == 0x00f0) 6002 is_ctia = false; 6003 else 6004 is_ctia = true; 6005 } 6006 alc_update_coef_idx(codec, 0x4a, 7<<6, 7<<6); 6007 alc_update_coef_idx(codec, 0x4a, 3<<4, 3<<4); 6008 alc_update_coef_idx(codec, 0x67, 0xf000, 0x3000); 6009 break; 6010 case 0x10ec0867: 6011 is_ctia = true; 6012 break; 6013 } 6014 6015 codec_dbg(codec, "Headset jack detected iPhone-style headset: %s\n", 6016 str_yes_no(is_ctia)); 6017 spec->current_headset_type = is_ctia ? ALC_HEADSET_TYPE_CTIA : ALC_HEADSET_TYPE_OMTP; 6018 } 6019 6020 static void alc_update_headset_mode(struct hda_codec *codec) 6021 { 6022 struct alc_spec *spec = codec->spec; 6023 6024 hda_nid_t mux_pin = spec->gen.imux_pins[spec->gen.cur_mux[0]]; 6025 hda_nid_t hp_pin = alc_get_hp_pin(spec); 6026 6027 int new_headset_mode; 6028 6029 if (!snd_hda_jack_detect(codec, hp_pin)) 6030 new_headset_mode = ALC_HEADSET_MODE_UNPLUGGED; 6031 else if (mux_pin == spec->headset_mic_pin) 6032 new_headset_mode = ALC_HEADSET_MODE_HEADSET; 6033 else if (mux_pin == spec->headphone_mic_pin) 6034 new_headset_mode = ALC_HEADSET_MODE_MIC; 6035 else 6036 new_headset_mode = ALC_HEADSET_MODE_HEADPHONE; 6037 6038 if (new_headset_mode == spec->current_headset_mode) { 6039 snd_hda_gen_update_outputs(codec); 6040 return; 6041 } 6042 6043 switch (new_headset_mode) { 6044 case ALC_HEADSET_MODE_UNPLUGGED: 6045 alc_headset_mode_unplugged(codec); 6046 spec->current_headset_mode = ALC_HEADSET_MODE_UNKNOWN; 6047 spec->current_headset_type = ALC_HEADSET_TYPE_UNKNOWN; 6048 spec->gen.hp_jack_present = false; 6049 break; 6050 case ALC_HEADSET_MODE_HEADSET: 6051 if (spec->current_headset_type == ALC_HEADSET_TYPE_UNKNOWN) 6052 alc_determine_headset_type(codec); 6053 if (spec->current_headset_type == ALC_HEADSET_TYPE_CTIA) 6054 alc_headset_mode_ctia(codec); 6055 else if (spec->current_headset_type == ALC_HEADSET_TYPE_OMTP) 6056 alc_headset_mode_omtp(codec); 6057 spec->gen.hp_jack_present = true; 6058 break; 6059 case ALC_HEADSET_MODE_MIC: 6060 alc_headset_mode_mic_in(codec, hp_pin, spec->headphone_mic_pin); 6061 spec->gen.hp_jack_present = false; 6062 break; 6063 case ALC_HEADSET_MODE_HEADPHONE: 6064 alc_headset_mode_default(codec); 6065 spec->gen.hp_jack_present = true; 6066 break; 6067 } 6068 if (new_headset_mode != ALC_HEADSET_MODE_MIC) { 6069 snd_hda_set_pin_ctl_cache(codec, hp_pin, 6070 AC_PINCTL_OUT_EN | AC_PINCTL_HP_EN); 6071 if (spec->headphone_mic_pin && spec->headphone_mic_pin != hp_pin) 6072 snd_hda_set_pin_ctl_cache(codec, spec->headphone_mic_pin, 6073 PIN_VREFHIZ); 6074 } 6075 spec->current_headset_mode = new_headset_mode; 6076 6077 snd_hda_gen_update_outputs(codec); 6078 } 6079 6080 static void alc_update_headset_mode_hook(struct hda_codec *codec, 6081 struct snd_kcontrol *kcontrol, 6082 struct snd_ctl_elem_value *ucontrol) 6083 { 6084 alc_update_headset_mode(codec); 6085 } 6086 6087 static void alc_update_headset_jack_cb(struct hda_codec *codec, 6088 struct hda_jack_callback *jack) 6089 { 6090 snd_hda_gen_hp_automute(codec, jack); 6091 alc_update_headset_mode(codec); 6092 } 6093 6094 static void alc_probe_headset_mode(struct hda_codec *codec) 6095 { 6096 int i; 6097 struct alc_spec *spec = codec->spec; 6098 struct auto_pin_cfg *cfg = &spec->gen.autocfg; 6099 6100 /* Find mic pins */ 6101 for (i = 0; i < cfg->num_inputs; i++) { 6102 if (cfg->inputs[i].is_headset_mic && !spec->headset_mic_pin) 6103 spec->headset_mic_pin = cfg->inputs[i].pin; 6104 if (cfg->inputs[i].is_headphone_mic && !spec->headphone_mic_pin) 6105 spec->headphone_mic_pin = cfg->inputs[i].pin; 6106 } 6107 6108 WARN_ON(spec->gen.cap_sync_hook); 6109 spec->gen.cap_sync_hook = alc_update_headset_mode_hook; 6110 spec->gen.automute_hook = alc_update_headset_mode; 6111 spec->gen.hp_automute_hook = alc_update_headset_jack_cb; 6112 } 6113 6114 static void alc_fixup_headset_mode(struct hda_codec *codec, 6115 const struct hda_fixup *fix, int action) 6116 { 6117 struct alc_spec *spec = codec->spec; 6118 6119 switch (action) { 6120 case HDA_FIXUP_ACT_PRE_PROBE: 6121 spec->parse_flags |= HDA_PINCFG_HEADSET_MIC | HDA_PINCFG_HEADPHONE_MIC; 6122 break; 6123 case HDA_FIXUP_ACT_PROBE: 6124 alc_probe_headset_mode(codec); 6125 break; 6126 case HDA_FIXUP_ACT_INIT: 6127 if (is_s3_resume(codec) || is_s4_resume(codec)) { 6128 spec->current_headset_mode = ALC_HEADSET_MODE_UNKNOWN; 6129 spec->current_headset_type = ALC_HEADSET_TYPE_UNKNOWN; 6130 } 6131 alc_update_headset_mode(codec); 6132 break; 6133 } 6134 } 6135 6136 static void alc_fixup_headset_mode_no_hp_mic(struct hda_codec *codec, 6137 const struct hda_fixup *fix, int action) 6138 { 6139 if (action == HDA_FIXUP_ACT_PRE_PROBE) { 6140 struct alc_spec *spec = codec->spec; 6141 spec->parse_flags |= HDA_PINCFG_HEADSET_MIC; 6142 } 6143 else 6144 alc_fixup_headset_mode(codec, fix, action); 6145 } 6146 6147 static void alc255_set_default_jack_type(struct hda_codec *codec) 6148 { 6149 /* Set to iphone type */ 6150 static const struct coef_fw alc255fw[] = { 6151 WRITE_COEF(0x1b, 0x880b), 6152 WRITE_COEF(0x45, 0xd089), 6153 WRITE_COEF(0x1b, 0x080b), 6154 WRITE_COEF(0x46, 0x0004), 6155 WRITE_COEF(0x1b, 0x0c0b), 6156 {} 6157 }; 6158 static const struct coef_fw alc256fw[] = { 6159 WRITE_COEF(0x1b, 0x884b), 6160 WRITE_COEF(0x45, 0xd089), 6161 WRITE_COEF(0x1b, 0x084b), 6162 WRITE_COEF(0x46, 0x0004), 6163 WRITE_COEF(0x1b, 0x0c4b), 6164 {} 6165 }; 6166 switch (codec->core.vendor_id) { 6167 case 0x10ec0255: 6168 alc_process_coef_fw(codec, alc255fw); 6169 break; 6170 case 0x10ec0230: 6171 case 0x10ec0236: 6172 case 0x10ec0256: 6173 case 0x19e58326: 6174 alc_process_coef_fw(codec, alc256fw); 6175 break; 6176 } 6177 msleep(30); 6178 } 6179 6180 static void alc_fixup_headset_mode_alc255(struct hda_codec *codec, 6181 const struct hda_fixup *fix, int action) 6182 { 6183 if (action == HDA_FIXUP_ACT_PRE_PROBE) { 6184 alc255_set_default_jack_type(codec); 6185 } 6186 alc_fixup_headset_mode(codec, fix, action); 6187 } 6188 6189 static void alc_fixup_headset_mode_alc255_no_hp_mic(struct hda_codec *codec, 6190 const struct hda_fixup *fix, int action) 6191 { 6192 if (action == HDA_FIXUP_ACT_PRE_PROBE) { 6193 struct alc_spec *spec = codec->spec; 6194 spec->parse_flags |= HDA_PINCFG_HEADSET_MIC; 6195 alc255_set_default_jack_type(codec); 6196 } 6197 else 6198 alc_fixup_headset_mode(codec, fix, action); 6199 } 6200 6201 static void alc288_update_headset_jack_cb(struct hda_codec *codec, 6202 struct hda_jack_callback *jack) 6203 { 6204 struct alc_spec *spec = codec->spec; 6205 6206 alc_update_headset_jack_cb(codec, jack); 6207 /* Headset Mic enable or disable, only for Dell Dino */ 6208 alc_update_gpio_data(codec, 0x40, spec->gen.hp_jack_present); 6209 } 6210 6211 static void alc_fixup_headset_mode_dell_alc288(struct hda_codec *codec, 6212 const struct hda_fixup *fix, int action) 6213 { 6214 alc_fixup_headset_mode(codec, fix, action); 6215 if (action == HDA_FIXUP_ACT_PROBE) { 6216 struct alc_spec *spec = codec->spec; 6217 /* toggled via hp_automute_hook */ 6218 spec->gpio_mask |= 0x40; 6219 spec->gpio_dir |= 0x40; 6220 spec->gen.hp_automute_hook = alc288_update_headset_jack_cb; 6221 } 6222 } 6223 6224 static void alc_fixup_auto_mute_via_amp(struct hda_codec *codec, 6225 const struct hda_fixup *fix, int action) 6226 { 6227 if (action == HDA_FIXUP_ACT_PRE_PROBE) { 6228 struct alc_spec *spec = codec->spec; 6229 spec->gen.auto_mute_via_amp = 1; 6230 } 6231 } 6232 6233 static void alc_fixup_no_shutup(struct hda_codec *codec, 6234 const struct hda_fixup *fix, int action) 6235 { 6236 if (action == HDA_FIXUP_ACT_PRE_PROBE) { 6237 struct alc_spec *spec = codec->spec; 6238 spec->no_shutup_pins = 1; 6239 } 6240 } 6241 6242 static void alc_fixup_disable_aamix(struct hda_codec *codec, 6243 const struct hda_fixup *fix, int action) 6244 { 6245 if (action == HDA_FIXUP_ACT_PRE_PROBE) { 6246 struct alc_spec *spec = codec->spec; 6247 /* Disable AA-loopback as it causes white noise */ 6248 spec->gen.mixer_nid = 0; 6249 } 6250 } 6251 6252 /* fixup for Thinkpad docks: add dock pins, avoid HP parser fixup */ 6253 static void alc_fixup_tpt440_dock(struct hda_codec *codec, 6254 const struct hda_fixup *fix, int action) 6255 { 6256 static const struct hda_pintbl pincfgs[] = { 6257 { 0x16, 0x21211010 }, /* dock headphone */ 6258 { 0x19, 0x21a11010 }, /* dock mic */ 6259 { } 6260 }; 6261 struct alc_spec *spec = codec->spec; 6262 6263 if (action == HDA_FIXUP_ACT_PRE_PROBE) { 6264 spec->parse_flags = HDA_PINCFG_NO_HP_FIXUP; 6265 codec->power_save_node = 0; /* avoid click noises */ 6266 snd_hda_apply_pincfgs(codec, pincfgs); 6267 } 6268 } 6269 6270 static void alc_fixup_tpt470_dock(struct hda_codec *codec, 6271 const struct hda_fixup *fix, int action) 6272 { 6273 static const struct hda_pintbl pincfgs[] = { 6274 { 0x17, 0x21211010 }, /* dock headphone */ 6275 { 0x19, 0x21a11010 }, /* dock mic */ 6276 { } 6277 }; 6278 struct alc_spec *spec = codec->spec; 6279 6280 if (action == HDA_FIXUP_ACT_PRE_PROBE) { 6281 spec->parse_flags = HDA_PINCFG_NO_HP_FIXUP; 6282 snd_hda_apply_pincfgs(codec, pincfgs); 6283 } else if (action == HDA_FIXUP_ACT_INIT) { 6284 /* Enable DOCK device */ 6285 snd_hda_codec_write(codec, 0x17, 0, 6286 AC_VERB_SET_CONFIG_DEFAULT_BYTES_3, 0); 6287 /* Enable DOCK device */ 6288 snd_hda_codec_write(codec, 0x19, 0, 6289 AC_VERB_SET_CONFIG_DEFAULT_BYTES_3, 0); 6290 } 6291 } 6292 6293 static void alc_fixup_tpt470_dacs(struct hda_codec *codec, 6294 const struct hda_fixup *fix, int action) 6295 { 6296 /* Assure the speaker pin to be coupled with DAC NID 0x03; otherwise 6297 * the speaker output becomes too low by some reason on Thinkpads with 6298 * ALC298 codec 6299 */ 6300 static const hda_nid_t preferred_pairs[] = { 6301 0x14, 0x03, 0x17, 0x02, 0x21, 0x02, 6302 0 6303 }; 6304 struct alc_spec *spec = codec->spec; 6305 6306 if (action == HDA_FIXUP_ACT_PRE_PROBE) 6307 spec->gen.preferred_dacs = preferred_pairs; 6308 } 6309 6310 static void alc295_fixup_asus_dacs(struct hda_codec *codec, 6311 const struct hda_fixup *fix, int action) 6312 { 6313 static const hda_nid_t preferred_pairs[] = { 6314 0x17, 0x02, 0x21, 0x03, 0 6315 }; 6316 struct alc_spec *spec = codec->spec; 6317 6318 if (action == HDA_FIXUP_ACT_PRE_PROBE) 6319 spec->gen.preferred_dacs = preferred_pairs; 6320 } 6321 6322 static void alc_shutup_dell_xps13(struct hda_codec *codec) 6323 { 6324 struct alc_spec *spec = codec->spec; 6325 int hp_pin = alc_get_hp_pin(spec); 6326 6327 /* Prevent pop noises when headphones are plugged in */ 6328 snd_hda_codec_write(codec, hp_pin, 0, 6329 AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE); 6330 msleep(20); 6331 } 6332 6333 static void alc_fixup_dell_xps13(struct hda_codec *codec, 6334 const struct hda_fixup *fix, int action) 6335 { 6336 struct alc_spec *spec = codec->spec; 6337 struct hda_input_mux *imux = &spec->gen.input_mux; 6338 int i; 6339 6340 switch (action) { 6341 case HDA_FIXUP_ACT_PRE_PROBE: 6342 /* mic pin 0x19 must be initialized with Vref Hi-Z, otherwise 6343 * it causes a click noise at start up 6344 */ 6345 snd_hda_codec_set_pin_target(codec, 0x19, PIN_VREFHIZ); 6346 spec->shutup = alc_shutup_dell_xps13; 6347 break; 6348 case HDA_FIXUP_ACT_PROBE: 6349 /* Make the internal mic the default input source. */ 6350 for (i = 0; i < imux->num_items; i++) { 6351 if (spec->gen.imux_pins[i] == 0x12) { 6352 spec->gen.cur_mux[0] = i; 6353 break; 6354 } 6355 } 6356 break; 6357 } 6358 } 6359 6360 static void alc_fixup_headset_mode_alc662(struct hda_codec *codec, 6361 const struct hda_fixup *fix, int action) 6362 { 6363 struct alc_spec *spec = codec->spec; 6364 6365 if (action == HDA_FIXUP_ACT_PRE_PROBE) { 6366 spec->parse_flags |= HDA_PINCFG_HEADSET_MIC; 6367 spec->gen.hp_mic = 1; /* Mic-in is same pin as headphone */ 6368 6369 /* Disable boost for mic-in permanently. (This code is only called 6370 from quirks that guarantee that the headphone is at NID 0x1b.) */ 6371 snd_hda_codec_write(codec, 0x1b, 0, AC_VERB_SET_AMP_GAIN_MUTE, 0x7000); 6372 snd_hda_override_wcaps(codec, 0x1b, get_wcaps(codec, 0x1b) & ~AC_WCAP_IN_AMP); 6373 } else 6374 alc_fixup_headset_mode(codec, fix, action); 6375 } 6376 6377 static void alc_fixup_headset_mode_alc668(struct hda_codec *codec, 6378 const struct hda_fixup *fix, int action) 6379 { 6380 if (action == HDA_FIXUP_ACT_PRE_PROBE) { 6381 alc_write_coef_idx(codec, 0xc4, 0x8000); 6382 alc_update_coef_idx(codec, 0xc2, ~0xfe, 0); 6383 snd_hda_set_pin_ctl_cache(codec, 0x18, 0); 6384 } 6385 alc_fixup_headset_mode(codec, fix, action); 6386 } 6387 6388 /* Returns the nid of the external mic input pin, or 0 if it cannot be found. */ 6389 static int find_ext_mic_pin(struct hda_codec *codec) 6390 { 6391 struct alc_spec *spec = codec->spec; 6392 struct auto_pin_cfg *cfg = &spec->gen.autocfg; 6393 hda_nid_t nid; 6394 unsigned int defcfg; 6395 int i; 6396 6397 for (i = 0; i < cfg->num_inputs; i++) { 6398 if (cfg->inputs[i].type != AUTO_PIN_MIC) 6399 continue; 6400 nid = cfg->inputs[i].pin; 6401 defcfg = snd_hda_codec_get_pincfg(codec, nid); 6402 if (snd_hda_get_input_pin_attr(defcfg) == INPUT_PIN_ATTR_INT) 6403 continue; 6404 return nid; 6405 } 6406 6407 return 0; 6408 } 6409 6410 static void alc271_hp_gate_mic_jack(struct hda_codec *codec, 6411 const struct hda_fixup *fix, 6412 int action) 6413 { 6414 struct alc_spec *spec = codec->spec; 6415 6416 if (action == HDA_FIXUP_ACT_PROBE) { 6417 int mic_pin = find_ext_mic_pin(codec); 6418 int hp_pin = alc_get_hp_pin(spec); 6419 6420 if (snd_BUG_ON(!mic_pin || !hp_pin)) 6421 return; 6422 snd_hda_jack_set_gating_jack(codec, mic_pin, hp_pin); 6423 } 6424 } 6425 6426 static void alc269_fixup_limit_int_mic_boost(struct hda_codec *codec, 6427 const struct hda_fixup *fix, 6428 int action) 6429 { 6430 struct alc_spec *spec = codec->spec; 6431 struct auto_pin_cfg *cfg = &spec->gen.autocfg; 6432 int i; 6433 6434 /* The mic boosts on level 2 and 3 are too noisy 6435 on the internal mic input. 6436 Therefore limit the boost to 0 or 1. */ 6437 6438 if (action != HDA_FIXUP_ACT_PROBE) 6439 return; 6440 6441 for (i = 0; i < cfg->num_inputs; i++) { 6442 hda_nid_t nid = cfg->inputs[i].pin; 6443 unsigned int defcfg; 6444 if (cfg->inputs[i].type != AUTO_PIN_MIC) 6445 continue; 6446 defcfg = snd_hda_codec_get_pincfg(codec, nid); 6447 if (snd_hda_get_input_pin_attr(defcfg) != INPUT_PIN_ATTR_INT) 6448 continue; 6449 6450 snd_hda_override_amp_caps(codec, nid, HDA_INPUT, 6451 (0x00 << AC_AMPCAP_OFFSET_SHIFT) | 6452 (0x01 << AC_AMPCAP_NUM_STEPS_SHIFT) | 6453 (0x2f << AC_AMPCAP_STEP_SIZE_SHIFT) | 6454 (0 << AC_AMPCAP_MUTE_SHIFT)); 6455 } 6456 } 6457 6458 static void alc283_hp_automute_hook(struct hda_codec *codec, 6459 struct hda_jack_callback *jack) 6460 { 6461 struct alc_spec *spec = codec->spec; 6462 int vref; 6463 6464 msleep(200); 6465 snd_hda_gen_hp_automute(codec, jack); 6466 6467 vref = spec->gen.hp_jack_present ? PIN_VREF80 : 0; 6468 6469 msleep(600); 6470 snd_hda_codec_write(codec, 0x19, 0, AC_VERB_SET_PIN_WIDGET_CONTROL, 6471 vref); 6472 } 6473 6474 static void alc283_fixup_chromebook(struct hda_codec *codec, 6475 const struct hda_fixup *fix, int action) 6476 { 6477 struct alc_spec *spec = codec->spec; 6478 6479 switch (action) { 6480 case HDA_FIXUP_ACT_PRE_PROBE: 6481 snd_hda_override_wcaps(codec, 0x03, 0); 6482 /* Disable AA-loopback as it causes white noise */ 6483 spec->gen.mixer_nid = 0; 6484 break; 6485 case HDA_FIXUP_ACT_INIT: 6486 /* MIC2-VREF control */ 6487 /* Set to manual mode */ 6488 alc_update_coef_idx(codec, 0x06, 0x000c, 0); 6489 /* Enable Line1 input control by verb */ 6490 alc_update_coef_idx(codec, 0x1a, 0, 1 << 4); 6491 break; 6492 } 6493 } 6494 6495 static void alc283_fixup_sense_combo_jack(struct hda_codec *codec, 6496 const struct hda_fixup *fix, int action) 6497 { 6498 struct alc_spec *spec = codec->spec; 6499 6500 switch (action) { 6501 case HDA_FIXUP_ACT_PRE_PROBE: 6502 spec->gen.hp_automute_hook = alc283_hp_automute_hook; 6503 break; 6504 case HDA_FIXUP_ACT_INIT: 6505 /* MIC2-VREF control */ 6506 /* Set to manual mode */ 6507 alc_update_coef_idx(codec, 0x06, 0x000c, 0); 6508 break; 6509 } 6510 } 6511 6512 /* mute tablet speaker pin (0x14) via dock plugging in addition */ 6513 static void asus_tx300_automute(struct hda_codec *codec) 6514 { 6515 struct alc_spec *spec = codec->spec; 6516 snd_hda_gen_update_outputs(codec); 6517 if (snd_hda_jack_detect(codec, 0x1b)) 6518 spec->gen.mute_bits |= (1ULL << 0x14); 6519 } 6520 6521 static void alc282_fixup_asus_tx300(struct hda_codec *codec, 6522 const struct hda_fixup *fix, int action) 6523 { 6524 struct alc_spec *spec = codec->spec; 6525 static const struct hda_pintbl dock_pins[] = { 6526 { 0x1b, 0x21114000 }, /* dock speaker pin */ 6527 {} 6528 }; 6529 6530 switch (action) { 6531 case HDA_FIXUP_ACT_PRE_PROBE: 6532 spec->init_amp = ALC_INIT_DEFAULT; 6533 /* TX300 needs to set up GPIO2 for the speaker amp */ 6534 alc_setup_gpio(codec, 0x04); 6535 snd_hda_apply_pincfgs(codec, dock_pins); 6536 spec->gen.auto_mute_via_amp = 1; 6537 spec->gen.automute_hook = asus_tx300_automute; 6538 snd_hda_jack_detect_enable_callback(codec, 0x1b, 6539 snd_hda_gen_hp_automute); 6540 break; 6541 case HDA_FIXUP_ACT_PROBE: 6542 spec->init_amp = ALC_INIT_DEFAULT; 6543 break; 6544 case HDA_FIXUP_ACT_BUILD: 6545 /* this is a bit tricky; give more sane names for the main 6546 * (tablet) speaker and the dock speaker, respectively 6547 */ 6548 rename_ctl(codec, "Speaker Playback Switch", 6549 "Dock Speaker Playback Switch"); 6550 rename_ctl(codec, "Bass Speaker Playback Switch", 6551 "Speaker Playback Switch"); 6552 break; 6553 } 6554 } 6555 6556 static void alc290_fixup_mono_speakers(struct hda_codec *codec, 6557 const struct hda_fixup *fix, int action) 6558 { 6559 if (action == HDA_FIXUP_ACT_PRE_PROBE) { 6560 /* DAC node 0x03 is giving mono output. We therefore want to 6561 make sure 0x14 (front speaker) and 0x15 (headphones) use the 6562 stereo DAC, while leaving 0x17 (bass speaker) for node 0x03. */ 6563 static const hda_nid_t conn1[] = { 0x0c }; 6564 snd_hda_override_conn_list(codec, 0x14, ARRAY_SIZE(conn1), conn1); 6565 snd_hda_override_conn_list(codec, 0x15, ARRAY_SIZE(conn1), conn1); 6566 } 6567 } 6568 6569 static void alc298_fixup_speaker_volume(struct hda_codec *codec, 6570 const struct hda_fixup *fix, int action) 6571 { 6572 if (action == HDA_FIXUP_ACT_PRE_PROBE) { 6573 /* The speaker is routed to the Node 0x06 by a mistake, as a result 6574 we can't adjust the speaker's volume since this node does not has 6575 Amp-out capability. we change the speaker's route to: 6576 Node 0x02 (Audio Output) -> Node 0x0c (Audio Mixer) -> Node 0x17 ( 6577 Pin Complex), since Node 0x02 has Amp-out caps, we can adjust 6578 speaker's volume now. */ 6579 6580 static const hda_nid_t conn1[] = { 0x0c }; 6581 snd_hda_override_conn_list(codec, 0x17, ARRAY_SIZE(conn1), conn1); 6582 } 6583 } 6584 6585 /* disable DAC3 (0x06) selection on NID 0x17 as it has no volume amp control */ 6586 static void alc295_fixup_disable_dac3(struct hda_codec *codec, 6587 const struct hda_fixup *fix, int action) 6588 { 6589 if (action == HDA_FIXUP_ACT_PRE_PROBE) { 6590 static const hda_nid_t conn[] = { 0x02, 0x03 }; 6591 snd_hda_override_conn_list(codec, 0x17, ARRAY_SIZE(conn), conn); 6592 } 6593 } 6594 6595 /* force NID 0x17 (Bass Speaker) to DAC1 to share it with the main speaker */ 6596 static void alc285_fixup_speaker2_to_dac1(struct hda_codec *codec, 6597 const struct hda_fixup *fix, int action) 6598 { 6599 if (action == HDA_FIXUP_ACT_PRE_PROBE) { 6600 static const hda_nid_t conn[] = { 0x02 }; 6601 snd_hda_override_conn_list(codec, 0x17, ARRAY_SIZE(conn), conn); 6602 } 6603 } 6604 6605 /* disable DAC3 (0x06) selection on NID 0x15 - share Speaker/Bass Speaker DAC 0x03 */ 6606 static void alc294_fixup_bass_speaker_15(struct hda_codec *codec, 6607 const struct hda_fixup *fix, int action) 6608 { 6609 if (action == HDA_FIXUP_ACT_PRE_PROBE) { 6610 static const hda_nid_t conn[] = { 0x02, 0x03 }; 6611 snd_hda_override_conn_list(codec, 0x15, ARRAY_SIZE(conn), conn); 6612 } 6613 } 6614 6615 /* Hook to update amp GPIO4 for automute */ 6616 static void alc280_hp_gpio4_automute_hook(struct hda_codec *codec, 6617 struct hda_jack_callback *jack) 6618 { 6619 struct alc_spec *spec = codec->spec; 6620 6621 snd_hda_gen_hp_automute(codec, jack); 6622 /* mute_led_polarity is set to 0, so we pass inverted value here */ 6623 alc_update_gpio_led(codec, 0x10, spec->mute_led_polarity, 6624 !spec->gen.hp_jack_present); 6625 } 6626 6627 /* Manage GPIOs for HP EliteBook Folio 9480m. 6628 * 6629 * GPIO4 is the headphone amplifier power control 6630 * GPIO3 is the audio output mute indicator LED 6631 */ 6632 6633 static void alc280_fixup_hp_9480m(struct hda_codec *codec, 6634 const struct hda_fixup *fix, 6635 int action) 6636 { 6637 struct alc_spec *spec = codec->spec; 6638 6639 alc_fixup_hp_gpio_led(codec, action, 0x08, 0); 6640 if (action == HDA_FIXUP_ACT_PRE_PROBE) { 6641 /* amp at GPIO4; toggled via alc280_hp_gpio4_automute_hook() */ 6642 spec->gpio_mask |= 0x10; 6643 spec->gpio_dir |= 0x10; 6644 spec->gen.hp_automute_hook = alc280_hp_gpio4_automute_hook; 6645 } 6646 } 6647 6648 static void alc275_fixup_gpio4_off(struct hda_codec *codec, 6649 const struct hda_fixup *fix, 6650 int action) 6651 { 6652 struct alc_spec *spec = codec->spec; 6653 6654 if (action == HDA_FIXUP_ACT_PRE_PROBE) { 6655 spec->gpio_mask |= 0x04; 6656 spec->gpio_dir |= 0x04; 6657 /* set data bit low */ 6658 } 6659 } 6660 6661 /* Quirk for Thinkpad X1 7th and 8th Gen 6662 * The following fixed routing needed 6663 * DAC1 (NID 0x02) -> Speaker (NID 0x14); some eq applied secretly 6664 * DAC2 (NID 0x03) -> Bass (NID 0x17) & Headphone (NID 0x21); sharing a DAC 6665 * DAC3 (NID 0x06) -> Unused, due to the lack of volume amp 6666 */ 6667 static void alc285_fixup_thinkpad_x1_gen7(struct hda_codec *codec, 6668 const struct hda_fixup *fix, int action) 6669 { 6670 static const hda_nid_t conn[] = { 0x02, 0x03 }; /* exclude 0x06 */ 6671 static const hda_nid_t preferred_pairs[] = { 6672 0x14, 0x02, 0x17, 0x03, 0x21, 0x03, 0 6673 }; 6674 struct alc_spec *spec = codec->spec; 6675 6676 switch (action) { 6677 case HDA_FIXUP_ACT_PRE_PROBE: 6678 snd_hda_override_conn_list(codec, 0x17, ARRAY_SIZE(conn), conn); 6679 spec->gen.preferred_dacs = preferred_pairs; 6680 break; 6681 case HDA_FIXUP_ACT_BUILD: 6682 /* The generic parser creates somewhat unintuitive volume ctls 6683 * with the fixed routing above, and the shared DAC2 may be 6684 * confusing for PA. 6685 * Rename those to unique names so that PA doesn't touch them 6686 * and use only Master volume. 6687 */ 6688 rename_ctl(codec, "Front Playback Volume", "DAC1 Playback Volume"); 6689 rename_ctl(codec, "Bass Speaker Playback Volume", "DAC2 Playback Volume"); 6690 break; 6691 } 6692 } 6693 6694 static void alc233_alc662_fixup_lenovo_dual_codecs(struct hda_codec *codec, 6695 const struct hda_fixup *fix, 6696 int action) 6697 { 6698 alc_fixup_dual_codecs(codec, fix, action); 6699 switch (action) { 6700 case HDA_FIXUP_ACT_PRE_PROBE: 6701 /* override card longname to provide a unique UCM profile */ 6702 strcpy(codec->card->longname, "HDAudio-Lenovo-DualCodecs"); 6703 break; 6704 case HDA_FIXUP_ACT_BUILD: 6705 /* rename Capture controls depending on the codec */ 6706 rename_ctl(codec, "Capture Volume", 6707 codec->addr == 0 ? 6708 "Rear-Panel Capture Volume" : 6709 "Front-Panel Capture Volume"); 6710 rename_ctl(codec, "Capture Switch", 6711 codec->addr == 0 ? 6712 "Rear-Panel Capture Switch" : 6713 "Front-Panel Capture Switch"); 6714 break; 6715 } 6716 } 6717 6718 static void alc225_fixup_s3_pop_noise(struct hda_codec *codec, 6719 const struct hda_fixup *fix, int action) 6720 { 6721 if (action != HDA_FIXUP_ACT_PRE_PROBE) 6722 return; 6723 6724 codec->power_save_node = 1; 6725 } 6726 6727 /* Forcibly assign NID 0x03 to HP/LO while NID 0x02 to SPK for EQ */ 6728 static void alc274_fixup_bind_dacs(struct hda_codec *codec, 6729 const struct hda_fixup *fix, int action) 6730 { 6731 struct alc_spec *spec = codec->spec; 6732 static const hda_nid_t preferred_pairs[] = { 6733 0x21, 0x03, 0x1b, 0x03, 0x16, 0x02, 6734 0 6735 }; 6736 6737 if (action != HDA_FIXUP_ACT_PRE_PROBE) 6738 return; 6739 6740 spec->gen.preferred_dacs = preferred_pairs; 6741 spec->gen.auto_mute_via_amp = 1; 6742 codec->power_save_node = 0; 6743 } 6744 6745 /* avoid DAC 0x06 for speaker switch 0x17; it has no volume control */ 6746 static void alc274_fixup_hp_aio_bind_dacs(struct hda_codec *codec, 6747 const struct hda_fixup *fix, int action) 6748 { 6749 static const hda_nid_t conn[] = { 0x02, 0x03 }; /* exclude 0x06 */ 6750 /* The speaker is routed to the Node 0x06 by a mistake, thus the 6751 * speaker's volume can't be adjusted since the node doesn't have 6752 * Amp-out capability. Assure the speaker and lineout pin to be 6753 * coupled with DAC NID 0x02. 6754 */ 6755 static const hda_nid_t preferred_pairs[] = { 6756 0x16, 0x02, 0x17, 0x02, 0x21, 0x03, 0 6757 }; 6758 struct alc_spec *spec = codec->spec; 6759 6760 snd_hda_override_conn_list(codec, 0x17, ARRAY_SIZE(conn), conn); 6761 spec->gen.preferred_dacs = preferred_pairs; 6762 } 6763 6764 /* avoid DAC 0x06 for bass speaker 0x17; it has no volume control */ 6765 static void alc289_fixup_asus_ga401(struct hda_codec *codec, 6766 const struct hda_fixup *fix, int action) 6767 { 6768 static const hda_nid_t preferred_pairs[] = { 6769 0x14, 0x02, 0x17, 0x02, 0x21, 0x03, 0 6770 }; 6771 struct alc_spec *spec = codec->spec; 6772 6773 if (action == HDA_FIXUP_ACT_PRE_PROBE) 6774 spec->gen.preferred_dacs = preferred_pairs; 6775 } 6776 6777 /* The DAC of NID 0x3 will introduce click/pop noise on headphones, so invalidate it */ 6778 static void alc285_fixup_invalidate_dacs(struct hda_codec *codec, 6779 const struct hda_fixup *fix, int action) 6780 { 6781 if (action != HDA_FIXUP_ACT_PRE_PROBE) 6782 return; 6783 6784 snd_hda_override_wcaps(codec, 0x03, 0); 6785 } 6786 6787 static void alc_combo_jack_hp_jd_restart(struct hda_codec *codec) 6788 { 6789 switch (codec->core.vendor_id) { 6790 case 0x10ec0274: 6791 case 0x10ec0294: 6792 case 0x10ec0225: 6793 case 0x10ec0295: 6794 case 0x10ec0299: 6795 alc_update_coef_idx(codec, 0x4a, 0x8000, 1 << 15); /* Reset HP JD */ 6796 alc_update_coef_idx(codec, 0x4a, 0x8000, 0 << 15); 6797 break; 6798 case 0x10ec0230: 6799 case 0x10ec0235: 6800 case 0x10ec0236: 6801 case 0x10ec0255: 6802 case 0x10ec0256: 6803 case 0x10ec0257: 6804 case 0x19e58326: 6805 alc_update_coef_idx(codec, 0x1b, 0x8000, 1 << 15); /* Reset HP JD */ 6806 alc_update_coef_idx(codec, 0x1b, 0x8000, 0 << 15); 6807 break; 6808 } 6809 } 6810 6811 static void alc295_fixup_chromebook(struct hda_codec *codec, 6812 const struct hda_fixup *fix, int action) 6813 { 6814 struct alc_spec *spec = codec->spec; 6815 6816 switch (action) { 6817 case HDA_FIXUP_ACT_PRE_PROBE: 6818 spec->ultra_low_power = true; 6819 break; 6820 case HDA_FIXUP_ACT_INIT: 6821 alc_combo_jack_hp_jd_restart(codec); 6822 break; 6823 } 6824 } 6825 6826 static void alc256_fixup_chromebook(struct hda_codec *codec, 6827 const struct hda_fixup *fix, int action) 6828 { 6829 struct alc_spec *spec = codec->spec; 6830 6831 switch (action) { 6832 case HDA_FIXUP_ACT_PRE_PROBE: 6833 if (codec->core.subsystem_id == 0x10280d76) 6834 spec->gen.suppress_auto_mute = 0; 6835 else 6836 spec->gen.suppress_auto_mute = 1; 6837 spec->gen.suppress_auto_mic = 1; 6838 spec->en_3kpull_low = false; 6839 break; 6840 } 6841 } 6842 6843 static void alc_fixup_disable_mic_vref(struct hda_codec *codec, 6844 const struct hda_fixup *fix, int action) 6845 { 6846 if (action == HDA_FIXUP_ACT_PRE_PROBE) 6847 snd_hda_codec_set_pin_target(codec, 0x19, PIN_VREFHIZ); 6848 } 6849 6850 6851 static void alc294_gx502_toggle_output(struct hda_codec *codec, 6852 struct hda_jack_callback *cb) 6853 { 6854 /* The Windows driver sets the codec up in a very different way where 6855 * it appears to leave 0x10 = 0x8a20 set. For Linux we need to toggle it 6856 */ 6857 if (snd_hda_jack_detect_state(codec, 0x21) == HDA_JACK_PRESENT) 6858 alc_write_coef_idx(codec, 0x10, 0x8a20); 6859 else 6860 alc_write_coef_idx(codec, 0x10, 0x0a20); 6861 } 6862 6863 static void alc294_fixup_gx502_hp(struct hda_codec *codec, 6864 const struct hda_fixup *fix, int action) 6865 { 6866 /* Pin 0x21: headphones/headset mic */ 6867 if (!is_jack_detectable(codec, 0x21)) 6868 return; 6869 6870 switch (action) { 6871 case HDA_FIXUP_ACT_PRE_PROBE: 6872 snd_hda_jack_detect_enable_callback(codec, 0x21, 6873 alc294_gx502_toggle_output); 6874 break; 6875 case HDA_FIXUP_ACT_INIT: 6876 /* Make sure to start in a correct state, i.e. if 6877 * headphones have been plugged in before powering up the system 6878 */ 6879 alc294_gx502_toggle_output(codec, NULL); 6880 break; 6881 } 6882 } 6883 6884 static void alc294_gu502_toggle_output(struct hda_codec *codec, 6885 struct hda_jack_callback *cb) 6886 { 6887 /* Windows sets 0x10 to 0x8420 for Node 0x20 which is 6888 * responsible from changes between speakers and headphones 6889 */ 6890 if (snd_hda_jack_detect_state(codec, 0x21) == HDA_JACK_PRESENT) 6891 alc_write_coef_idx(codec, 0x10, 0x8420); 6892 else 6893 alc_write_coef_idx(codec, 0x10, 0x0a20); 6894 } 6895 6896 static void alc294_fixup_gu502_hp(struct hda_codec *codec, 6897 const struct hda_fixup *fix, int action) 6898 { 6899 if (!is_jack_detectable(codec, 0x21)) 6900 return; 6901 6902 switch (action) { 6903 case HDA_FIXUP_ACT_PRE_PROBE: 6904 snd_hda_jack_detect_enable_callback(codec, 0x21, 6905 alc294_gu502_toggle_output); 6906 break; 6907 case HDA_FIXUP_ACT_INIT: 6908 alc294_gu502_toggle_output(codec, NULL); 6909 break; 6910 } 6911 } 6912 6913 static void alc285_fixup_hp_gpio_amp_init(struct hda_codec *codec, 6914 const struct hda_fixup *fix, int action) 6915 { 6916 if (action != HDA_FIXUP_ACT_INIT) 6917 return; 6918 6919 msleep(100); 6920 alc_write_coef_idx(codec, 0x65, 0x0); 6921 } 6922 6923 static void alc274_fixup_hp_headset_mic(struct hda_codec *codec, 6924 const struct hda_fixup *fix, int action) 6925 { 6926 switch (action) { 6927 case HDA_FIXUP_ACT_INIT: 6928 alc_combo_jack_hp_jd_restart(codec); 6929 break; 6930 } 6931 } 6932 6933 static void alc_fixup_no_int_mic(struct hda_codec *codec, 6934 const struct hda_fixup *fix, int action) 6935 { 6936 struct alc_spec *spec = codec->spec; 6937 6938 switch (action) { 6939 case HDA_FIXUP_ACT_PRE_PROBE: 6940 /* Mic RING SLEEVE swap for combo jack */ 6941 alc_update_coef_idx(codec, 0x45, 0xf<<12 | 1<<10, 5<<12); 6942 spec->no_internal_mic_pin = true; 6943 break; 6944 case HDA_FIXUP_ACT_INIT: 6945 alc_combo_jack_hp_jd_restart(codec); 6946 break; 6947 } 6948 } 6949 6950 /* GPIO1 = amplifier on/off 6951 * GPIO3 = mic mute LED 6952 */ 6953 static void alc285_fixup_hp_spectre_x360_eb1(struct hda_codec *codec, 6954 const struct hda_fixup *fix, int action) 6955 { 6956 static const hda_nid_t conn[] = { 0x02 }; 6957 6958 struct alc_spec *spec = codec->spec; 6959 static const struct hda_pintbl pincfgs[] = { 6960 { 0x14, 0x90170110 }, /* front/high speakers */ 6961 { 0x17, 0x90170130 }, /* back/bass speakers */ 6962 { } 6963 }; 6964 6965 //enable micmute led 6966 alc_fixup_hp_gpio_led(codec, action, 0x00, 0x04); 6967 6968 switch (action) { 6969 case HDA_FIXUP_ACT_PRE_PROBE: 6970 spec->micmute_led_polarity = 1; 6971 /* needed for amp of back speakers */ 6972 spec->gpio_mask |= 0x01; 6973 spec->gpio_dir |= 0x01; 6974 snd_hda_apply_pincfgs(codec, pincfgs); 6975 /* share DAC to have unified volume control */ 6976 snd_hda_override_conn_list(codec, 0x14, ARRAY_SIZE(conn), conn); 6977 snd_hda_override_conn_list(codec, 0x17, ARRAY_SIZE(conn), conn); 6978 break; 6979 case HDA_FIXUP_ACT_INIT: 6980 /* need to toggle GPIO to enable the amp of back speakers */ 6981 alc_update_gpio_data(codec, 0x01, true); 6982 msleep(100); 6983 alc_update_gpio_data(codec, 0x01, false); 6984 break; 6985 } 6986 } 6987 6988 /* GPIO1 = amplifier on/off */ 6989 static void alc285_fixup_hp_spectre_x360_df1(struct hda_codec *codec, 6990 const struct hda_fixup *fix, 6991 int action) 6992 { 6993 struct alc_spec *spec = codec->spec; 6994 static const hda_nid_t conn[] = { 0x02 }; 6995 static const struct hda_pintbl pincfgs[] = { 6996 { 0x14, 0x90170110 }, /* front/high speakers */ 6997 { 0x17, 0x90170130 }, /* back/bass speakers */ 6998 { } 6999 }; 7000 7001 // enable mute led 7002 alc285_fixup_hp_mute_led_coefbit(codec, fix, action); 7003 7004 switch (action) { 7005 case HDA_FIXUP_ACT_PRE_PROBE: 7006 /* needed for amp of back speakers */ 7007 spec->gpio_mask |= 0x01; 7008 spec->gpio_dir |= 0x01; 7009 snd_hda_apply_pincfgs(codec, pincfgs); 7010 /* share DAC to have unified volume control */ 7011 snd_hda_override_conn_list(codec, 0x14, ARRAY_SIZE(conn), conn); 7012 snd_hda_override_conn_list(codec, 0x17, ARRAY_SIZE(conn), conn); 7013 break; 7014 case HDA_FIXUP_ACT_INIT: 7015 /* need to toggle GPIO to enable the amp of back speakers */ 7016 alc_update_gpio_data(codec, 0x01, true); 7017 msleep(100); 7018 alc_update_gpio_data(codec, 0x01, false); 7019 break; 7020 } 7021 } 7022 7023 static void alc285_fixup_hp_spectre_x360(struct hda_codec *codec, 7024 const struct hda_fixup *fix, int action) 7025 { 7026 static const hda_nid_t conn[] = { 0x02 }; 7027 static const struct hda_pintbl pincfgs[] = { 7028 { 0x14, 0x90170110 }, /* rear speaker */ 7029 { } 7030 }; 7031 7032 switch (action) { 7033 case HDA_FIXUP_ACT_PRE_PROBE: 7034 snd_hda_apply_pincfgs(codec, pincfgs); 7035 /* force front speaker to DAC1 */ 7036 snd_hda_override_conn_list(codec, 0x17, ARRAY_SIZE(conn), conn); 7037 break; 7038 } 7039 } 7040 7041 static void alc285_fixup_hp_envy_x360(struct hda_codec *codec, 7042 const struct hda_fixup *fix, 7043 int action) 7044 { 7045 static const struct coef_fw coefs[] = { 7046 WRITE_COEF(0x08, 0x6a0c), WRITE_COEF(0x0d, 0xa023), 7047 WRITE_COEF(0x10, 0x0320), WRITE_COEF(0x1a, 0x8c03), 7048 WRITE_COEF(0x25, 0x1800), WRITE_COEF(0x26, 0x003a), 7049 WRITE_COEF(0x28, 0x1dfe), WRITE_COEF(0x29, 0xb014), 7050 WRITE_COEF(0x2b, 0x1dfe), WRITE_COEF(0x37, 0xfe15), 7051 WRITE_COEF(0x38, 0x7909), WRITE_COEF(0x45, 0xd489), 7052 WRITE_COEF(0x46, 0x00f4), WRITE_COEF(0x4a, 0x21e0), 7053 WRITE_COEF(0x66, 0x03f0), WRITE_COEF(0x67, 0x1000), 7054 WRITE_COEF(0x6e, 0x1005), { } 7055 }; 7056 7057 static const struct hda_pintbl pincfgs[] = { 7058 { 0x12, 0xb7a60130 }, /* Internal microphone*/ 7059 { 0x14, 0x90170150 }, /* B&O soundbar speakers */ 7060 { 0x17, 0x90170153 }, /* Side speakers */ 7061 { 0x19, 0x03a11040 }, /* Headset microphone */ 7062 { } 7063 }; 7064 7065 switch (action) { 7066 case HDA_FIXUP_ACT_PRE_PROBE: 7067 snd_hda_apply_pincfgs(codec, pincfgs); 7068 7069 /* Fixes volume control problem for side speakers */ 7070 alc295_fixup_disable_dac3(codec, fix, action); 7071 7072 /* Fixes no sound from headset speaker */ 7073 snd_hda_codec_amp_stereo(codec, 0x21, HDA_OUTPUT, 0, -1, 0); 7074 7075 /* Auto-enable headset mic when plugged */ 7076 snd_hda_jack_set_gating_jack(codec, 0x19, 0x21); 7077 7078 /* Headset mic volume enhancement */ 7079 snd_hda_codec_set_pin_target(codec, 0x19, PIN_VREF50); 7080 break; 7081 case HDA_FIXUP_ACT_INIT: 7082 alc_process_coef_fw(codec, coefs); 7083 break; 7084 case HDA_FIXUP_ACT_BUILD: 7085 rename_ctl(codec, "Bass Speaker Playback Volume", 7086 "B&O-Tuned Playback Volume"); 7087 rename_ctl(codec, "Front Playback Switch", 7088 "B&O Soundbar Playback Switch"); 7089 rename_ctl(codec, "Bass Speaker Playback Switch", 7090 "Side Speaker Playback Switch"); 7091 break; 7092 } 7093 } 7094 7095 static void alc285_fixup_hp_beep(struct hda_codec *codec, 7096 const struct hda_fixup *fix, int action) 7097 { 7098 if (action == HDA_FIXUP_ACT_PRE_PROBE) { 7099 codec->beep_just_power_on = true; 7100 } else if (action == HDA_FIXUP_ACT_INIT) { 7101 #ifdef CONFIG_SND_HDA_INPUT_BEEP 7102 /* 7103 * Just enable loopback to internal speaker and headphone jack. 7104 * Disable amplification to get about the same beep volume as 7105 * was on pure BIOS setup before loading the driver. 7106 */ 7107 alc_update_coef_idx(codec, 0x36, 0x7070, BIT(13)); 7108 7109 snd_hda_enable_beep_device(codec, 1); 7110 7111 #if !IS_ENABLED(CONFIG_INPUT_PCSPKR) 7112 dev_warn_once(hda_codec_dev(codec), 7113 "enable CONFIG_INPUT_PCSPKR to get PC beeps\n"); 7114 #endif 7115 #endif 7116 } 7117 } 7118 7119 /* for hda_fixup_thinkpad_acpi() */ 7120 #include "thinkpad_helper.c" 7121 7122 static void alc_fixup_thinkpad_acpi(struct hda_codec *codec, 7123 const struct hda_fixup *fix, int action) 7124 { 7125 alc_fixup_no_shutup(codec, fix, action); /* reduce click noise */ 7126 hda_fixup_thinkpad_acpi(codec, fix, action); 7127 } 7128 7129 /* for hda_fixup_ideapad_acpi() */ 7130 #include "ideapad_hotkey_led_helper.c" 7131 7132 static void alc_fixup_ideapad_acpi(struct hda_codec *codec, 7133 const struct hda_fixup *fix, int action) 7134 { 7135 hda_fixup_ideapad_acpi(codec, fix, action); 7136 } 7137 7138 /* Fixup for Lenovo Legion 15IMHg05 speaker output on headset removal. */ 7139 static void alc287_fixup_legion_15imhg05_speakers(struct hda_codec *codec, 7140 const struct hda_fixup *fix, 7141 int action) 7142 { 7143 struct alc_spec *spec = codec->spec; 7144 7145 switch (action) { 7146 case HDA_FIXUP_ACT_PRE_PROBE: 7147 spec->gen.suppress_auto_mute = 1; 7148 break; 7149 } 7150 } 7151 7152 static void comp_acpi_device_notify(acpi_handle handle, u32 event, void *data) 7153 { 7154 struct hda_codec *cdc = data; 7155 struct alc_spec *spec = cdc->spec; 7156 7157 codec_info(cdc, "ACPI Notification %d\n", event); 7158 7159 hda_component_acpi_device_notify(&spec->comps, handle, event, data); 7160 } 7161 7162 static int comp_bind(struct device *dev) 7163 { 7164 struct hda_codec *cdc = dev_to_hda_codec(dev); 7165 struct alc_spec *spec = cdc->spec; 7166 int ret; 7167 7168 ret = hda_component_manager_bind(cdc, &spec->comps); 7169 if (ret) 7170 return ret; 7171 7172 return hda_component_manager_bind_acpi_notifications(cdc, 7173 &spec->comps, 7174 comp_acpi_device_notify, cdc); 7175 } 7176 7177 static void comp_unbind(struct device *dev) 7178 { 7179 struct hda_codec *cdc = dev_to_hda_codec(dev); 7180 struct alc_spec *spec = cdc->spec; 7181 7182 hda_component_manager_unbind_acpi_notifications(cdc, &spec->comps, comp_acpi_device_notify); 7183 hda_component_manager_unbind(cdc, &spec->comps); 7184 } 7185 7186 static const struct component_master_ops comp_master_ops = { 7187 .bind = comp_bind, 7188 .unbind = comp_unbind, 7189 }; 7190 7191 static void comp_generic_playback_hook(struct hda_pcm_stream *hinfo, struct hda_codec *cdc, 7192 struct snd_pcm_substream *sub, int action) 7193 { 7194 struct alc_spec *spec = cdc->spec; 7195 7196 hda_component_manager_playback_hook(&spec->comps, action); 7197 } 7198 7199 static void comp_generic_fixup(struct hda_codec *cdc, int action, const char *bus, 7200 const char *hid, const char *match_str, int count) 7201 { 7202 struct alc_spec *spec = cdc->spec; 7203 int ret; 7204 7205 switch (action) { 7206 case HDA_FIXUP_ACT_PRE_PROBE: 7207 ret = hda_component_manager_init(cdc, &spec->comps, count, bus, hid, 7208 match_str, &comp_master_ops); 7209 if (ret) 7210 return; 7211 7212 spec->gen.pcm_playback_hook = comp_generic_playback_hook; 7213 break; 7214 case HDA_FIXUP_ACT_FREE: 7215 hda_component_manager_free(&spec->comps, &comp_master_ops); 7216 break; 7217 } 7218 } 7219 7220 static void find_cirrus_companion_amps(struct hda_codec *cdc) 7221 { 7222 struct device *dev = hda_codec_dev(cdc); 7223 struct acpi_device *adev; 7224 struct fwnode_handle *fwnode __free(fwnode_handle) = NULL; 7225 const char *bus = NULL; 7226 static const struct { 7227 const char *hid; 7228 const char *name; 7229 } acpi_ids[] = {{ "CSC3554", "cs35l54-hda" }, 7230 { "CSC3556", "cs35l56-hda" }, 7231 { "CSC3557", "cs35l57-hda" }}; 7232 char *match; 7233 int i, count = 0, count_devindex = 0; 7234 7235 for (i = 0; i < ARRAY_SIZE(acpi_ids); ++i) { 7236 adev = acpi_dev_get_first_match_dev(acpi_ids[i].hid, NULL, -1); 7237 if (adev) 7238 break; 7239 } 7240 if (!adev) { 7241 codec_dbg(cdc, "Did not find ACPI entry for a Cirrus Amp\n"); 7242 return; 7243 } 7244 7245 count = i2c_acpi_client_count(adev); 7246 if (count > 0) { 7247 bus = "i2c"; 7248 } else { 7249 count = acpi_spi_count_resources(adev); 7250 if (count > 0) 7251 bus = "spi"; 7252 } 7253 7254 fwnode = fwnode_handle_get(acpi_fwnode_handle(adev)); 7255 acpi_dev_put(adev); 7256 7257 if (!bus) { 7258 codec_err(cdc, "Did not find any buses for %s\n", acpi_ids[i].hid); 7259 return; 7260 } 7261 7262 if (!fwnode) { 7263 codec_err(cdc, "Could not get fwnode for %s\n", acpi_ids[i].hid); 7264 return; 7265 } 7266 7267 /* 7268 * When available the cirrus,dev-index property is an accurate 7269 * count of the amps in a system and is used in preference to 7270 * the count of bus devices that can contain additional address 7271 * alias entries. 7272 */ 7273 count_devindex = fwnode_property_count_u32(fwnode, "cirrus,dev-index"); 7274 if (count_devindex > 0) 7275 count = count_devindex; 7276 7277 match = devm_kasprintf(dev, GFP_KERNEL, "-%%s:00-%s.%%d", acpi_ids[i].name); 7278 if (!match) 7279 return; 7280 codec_info(cdc, "Found %d %s on %s (%s)\n", count, acpi_ids[i].hid, bus, match); 7281 comp_generic_fixup(cdc, HDA_FIXUP_ACT_PRE_PROBE, bus, acpi_ids[i].hid, match, count); 7282 } 7283 7284 static void cs35l41_fixup_i2c_two(struct hda_codec *cdc, const struct hda_fixup *fix, int action) 7285 { 7286 comp_generic_fixup(cdc, action, "i2c", "CSC3551", "-%s:00-cs35l41-hda.%d", 2); 7287 } 7288 7289 static void cs35l41_fixup_i2c_four(struct hda_codec *cdc, const struct hda_fixup *fix, int action) 7290 { 7291 comp_generic_fixup(cdc, action, "i2c", "CSC3551", "-%s:00-cs35l41-hda.%d", 4); 7292 } 7293 7294 static void cs35l41_fixup_spi_two(struct hda_codec *codec, const struct hda_fixup *fix, int action) 7295 { 7296 comp_generic_fixup(codec, action, "spi", "CSC3551", "-%s:00-cs35l41-hda.%d", 2); 7297 } 7298 7299 static void cs35l41_fixup_spi_four(struct hda_codec *codec, const struct hda_fixup *fix, int action) 7300 { 7301 comp_generic_fixup(codec, action, "spi", "CSC3551", "-%s:00-cs35l41-hda.%d", 4); 7302 } 7303 7304 static void alc287_fixup_legion_16achg6_speakers(struct hda_codec *cdc, const struct hda_fixup *fix, 7305 int action) 7306 { 7307 comp_generic_fixup(cdc, action, "i2c", "CLSA0100", "-%s:00-cs35l41-hda.%d", 2); 7308 } 7309 7310 static void alc287_fixup_legion_16ithg6_speakers(struct hda_codec *cdc, const struct hda_fixup *fix, 7311 int action) 7312 { 7313 comp_generic_fixup(cdc, action, "i2c", "CLSA0101", "-%s:00-cs35l41-hda.%d", 2); 7314 } 7315 7316 static void alc285_fixup_asus_ga403u(struct hda_codec *cdc, const struct hda_fixup *fix, int action) 7317 { 7318 /* 7319 * The same SSID has been re-used in different hardware, they have 7320 * different codecs and the newer GA403U has a ALC285. 7321 */ 7322 if (cdc->core.vendor_id != 0x10ec0285) 7323 alc_fixup_inv_dmic(cdc, fix, action); 7324 } 7325 7326 static void tas2781_fixup_i2c(struct hda_codec *cdc, 7327 const struct hda_fixup *fix, int action) 7328 { 7329 comp_generic_fixup(cdc, action, "i2c", "TIAS2781", "-%s:00", 1); 7330 } 7331 7332 static void tas2781_fixup_spi(struct hda_codec *cdc, const struct hda_fixup *fix, int action) 7333 { 7334 comp_generic_fixup(cdc, action, "spi", "TXNW2781", "-%s:00-tas2781-hda.%d", 2); 7335 } 7336 7337 static void yoga7_14arb7_fixup_i2c(struct hda_codec *cdc, 7338 const struct hda_fixup *fix, int action) 7339 { 7340 comp_generic_fixup(cdc, action, "i2c", "INT8866", "-%s:00", 1); 7341 } 7342 7343 static void alc256_fixup_acer_sfg16_micmute_led(struct hda_codec *codec, 7344 const struct hda_fixup *fix, int action) 7345 { 7346 alc_fixup_hp_gpio_led(codec, action, 0, 0x04); 7347 } 7348 7349 7350 /* for alc295_fixup_hp_top_speakers */ 7351 #include "hp_x360_helper.c" 7352 7353 /* for alc285_fixup_ideapad_s740_coef() */ 7354 #include "ideapad_s740_helper.c" 7355 7356 static const struct coef_fw alc256_fixup_set_coef_defaults_coefs[] = { 7357 WRITE_COEF(0x10, 0x0020), WRITE_COEF(0x24, 0x0000), 7358 WRITE_COEF(0x26, 0x0000), WRITE_COEF(0x29, 0x3000), 7359 WRITE_COEF(0x37, 0xfe05), WRITE_COEF(0x45, 0x5089), 7360 {} 7361 }; 7362 7363 static void alc256_fixup_set_coef_defaults(struct hda_codec *codec, 7364 const struct hda_fixup *fix, 7365 int action) 7366 { 7367 /* 7368 * A certain other OS sets these coeffs to different values. On at least 7369 * one TongFang barebone these settings might survive even a cold 7370 * reboot. So to restore a clean slate the values are explicitly reset 7371 * to default here. Without this, the external microphone is always in a 7372 * plugged-in state, while the internal microphone is always in an 7373 * unplugged state, breaking the ability to use the internal microphone. 7374 */ 7375 alc_process_coef_fw(codec, alc256_fixup_set_coef_defaults_coefs); 7376 } 7377 7378 static const struct coef_fw alc233_fixup_no_audio_jack_coefs[] = { 7379 WRITE_COEF(0x1a, 0x9003), WRITE_COEF(0x1b, 0x0e2b), WRITE_COEF(0x37, 0xfe06), 7380 WRITE_COEF(0x38, 0x4981), WRITE_COEF(0x45, 0xd489), WRITE_COEF(0x46, 0x0074), 7381 WRITE_COEF(0x49, 0x0149), 7382 {} 7383 }; 7384 7385 static void alc233_fixup_no_audio_jack(struct hda_codec *codec, 7386 const struct hda_fixup *fix, 7387 int action) 7388 { 7389 /* 7390 * The audio jack input and output is not detected on the ASRock NUC Box 7391 * 1100 series when cold booting without this fix. Warm rebooting from a 7392 * certain other OS makes the audio functional, as COEF settings are 7393 * preserved in this case. This fix sets these altered COEF values as 7394 * the default. 7395 */ 7396 alc_process_coef_fw(codec, alc233_fixup_no_audio_jack_coefs); 7397 } 7398 7399 static void alc256_fixup_mic_no_presence_and_resume(struct hda_codec *codec, 7400 const struct hda_fixup *fix, 7401 int action) 7402 { 7403 /* 7404 * The Clevo NJ51CU comes either with the ALC293 or the ALC256 codec, 7405 * but uses the 0x8686 subproduct id in both cases. The ALC256 codec 7406 * needs an additional quirk for sound working after suspend and resume. 7407 */ 7408 if (codec->core.vendor_id == 0x10ec0256) { 7409 alc_update_coef_idx(codec, 0x10, 1<<9, 0); 7410 snd_hda_codec_set_pincfg(codec, 0x19, 0x04a11120); 7411 } else { 7412 snd_hda_codec_set_pincfg(codec, 0x1a, 0x04a1113c); 7413 } 7414 } 7415 7416 static void alc256_decrease_headphone_amp_val(struct hda_codec *codec, 7417 const struct hda_fixup *fix, int action) 7418 { 7419 u32 caps; 7420 u8 nsteps, offs; 7421 7422 if (action != HDA_FIXUP_ACT_PRE_PROBE) 7423 return; 7424 7425 caps = query_amp_caps(codec, 0x3, HDA_OUTPUT); 7426 nsteps = ((caps & AC_AMPCAP_NUM_STEPS) >> AC_AMPCAP_NUM_STEPS_SHIFT) - 10; 7427 offs = ((caps & AC_AMPCAP_OFFSET) >> AC_AMPCAP_OFFSET_SHIFT) - 10; 7428 caps &= ~AC_AMPCAP_NUM_STEPS & ~AC_AMPCAP_OFFSET; 7429 caps |= (nsteps << AC_AMPCAP_NUM_STEPS_SHIFT) | (offs << AC_AMPCAP_OFFSET_SHIFT); 7430 7431 if (snd_hda_override_amp_caps(codec, 0x3, HDA_OUTPUT, caps)) 7432 codec_warn(codec, "failed to override amp caps for NID 0x3\n"); 7433 } 7434 7435 static void alc_fixup_dell4_mic_no_presence_quiet(struct hda_codec *codec, 7436 const struct hda_fixup *fix, 7437 int action) 7438 { 7439 struct alc_spec *spec = codec->spec; 7440 struct hda_input_mux *imux = &spec->gen.input_mux; 7441 int i; 7442 7443 alc269_fixup_limit_int_mic_boost(codec, fix, action); 7444 7445 switch (action) { 7446 case HDA_FIXUP_ACT_PRE_PROBE: 7447 /** 7448 * Set the vref of pin 0x19 (Headset Mic) and pin 0x1b (Headphone Mic) 7449 * to Hi-Z to avoid pop noises at startup and when plugging and 7450 * unplugging headphones. 7451 */ 7452 snd_hda_codec_set_pin_target(codec, 0x19, PIN_VREFHIZ); 7453 snd_hda_codec_set_pin_target(codec, 0x1b, PIN_VREFHIZ); 7454 break; 7455 case HDA_FIXUP_ACT_PROBE: 7456 /** 7457 * Make the internal mic (0x12) the default input source to 7458 * prevent pop noises on cold boot. 7459 */ 7460 for (i = 0; i < imux->num_items; i++) { 7461 if (spec->gen.imux_pins[i] == 0x12) { 7462 spec->gen.cur_mux[0] = i; 7463 break; 7464 } 7465 } 7466 break; 7467 } 7468 } 7469 7470 static void alc287_fixup_yoga9_14iap7_bass_spk_pin(struct hda_codec *codec, 7471 const struct hda_fixup *fix, int action) 7472 { 7473 /* 7474 * The Pin Complex 0x17 for the bass speakers is wrongly reported as 7475 * unconnected. 7476 */ 7477 static const struct hda_pintbl pincfgs[] = { 7478 { 0x17, 0x90170121 }, 7479 { } 7480 }; 7481 /* 7482 * Avoid DAC 0x06 and 0x08, as they have no volume controls. 7483 * DAC 0x02 and 0x03 would be fine. 7484 */ 7485 static const hda_nid_t conn[] = { 0x02, 0x03 }; 7486 /* 7487 * Prefer both speakerbar (0x14) and bass speakers (0x17) connected to DAC 0x02. 7488 * Headphones (0x21) are connected to DAC 0x03. 7489 */ 7490 static const hda_nid_t preferred_pairs[] = { 7491 0x14, 0x02, 7492 0x17, 0x02, 7493 0x21, 0x03, 7494 0 7495 }; 7496 struct alc_spec *spec = codec->spec; 7497 7498 switch (action) { 7499 case HDA_FIXUP_ACT_PRE_PROBE: 7500 snd_hda_apply_pincfgs(codec, pincfgs); 7501 snd_hda_override_conn_list(codec, 0x17, ARRAY_SIZE(conn), conn); 7502 spec->gen.preferred_dacs = preferred_pairs; 7503 break; 7504 } 7505 } 7506 7507 static void alc295_fixup_dell_inspiron_top_speakers(struct hda_codec *codec, 7508 const struct hda_fixup *fix, int action) 7509 { 7510 static const struct hda_pintbl pincfgs[] = { 7511 { 0x14, 0x90170151 }, 7512 { 0x17, 0x90170150 }, 7513 { } 7514 }; 7515 static const hda_nid_t conn[] = { 0x02, 0x03 }; 7516 static const hda_nid_t preferred_pairs[] = { 7517 0x14, 0x02, 7518 0x17, 0x03, 7519 0x21, 0x02, 7520 0 7521 }; 7522 struct alc_spec *spec = codec->spec; 7523 7524 alc_fixup_no_shutup(codec, fix, action); 7525 7526 switch (action) { 7527 case HDA_FIXUP_ACT_PRE_PROBE: 7528 snd_hda_apply_pincfgs(codec, pincfgs); 7529 snd_hda_override_conn_list(codec, 0x17, ARRAY_SIZE(conn), conn); 7530 spec->gen.preferred_dacs = preferred_pairs; 7531 break; 7532 } 7533 } 7534 7535 /* Forcibly assign NID 0x03 to HP while NID 0x02 to SPK */ 7536 static void alc287_fixup_bind_dacs(struct hda_codec *codec, 7537 const struct hda_fixup *fix, int action) 7538 { 7539 struct alc_spec *spec = codec->spec; 7540 static const hda_nid_t conn[] = { 0x02, 0x03 }; /* exclude 0x06 */ 7541 static const hda_nid_t preferred_pairs[] = { 7542 0x17, 0x02, 0x21, 0x03, 0 7543 }; 7544 7545 if (action != HDA_FIXUP_ACT_PRE_PROBE) 7546 return; 7547 7548 snd_hda_override_conn_list(codec, 0x17, ARRAY_SIZE(conn), conn); 7549 spec->gen.preferred_dacs = preferred_pairs; 7550 spec->gen.auto_mute_via_amp = 1; 7551 if (spec->gen.autocfg.speaker_pins[0] != 0x14) { 7552 snd_hda_codec_write_cache(codec, 0x14, 0, AC_VERB_SET_PIN_WIDGET_CONTROL, 7553 0x0); /* Make sure 0x14 was disable */ 7554 } 7555 } 7556 /* Fix none verb table of Headset Mic pin */ 7557 static void alc_fixup_headset_mic(struct hda_codec *codec, 7558 const struct hda_fixup *fix, int action) 7559 { 7560 struct alc_spec *spec = codec->spec; 7561 static const struct hda_pintbl pincfgs[] = { 7562 { 0x19, 0x03a1103c }, 7563 { } 7564 }; 7565 7566 switch (action) { 7567 case HDA_FIXUP_ACT_PRE_PROBE: 7568 snd_hda_apply_pincfgs(codec, pincfgs); 7569 alc_update_coef_idx(codec, 0x45, 0xf<<12 | 1<<10, 5<<12); 7570 spec->parse_flags |= HDA_PINCFG_HEADSET_MIC; 7571 break; 7572 } 7573 } 7574 7575 static void alc245_fixup_hp_spectre_x360_eu0xxx(struct hda_codec *codec, 7576 const struct hda_fixup *fix, int action) 7577 { 7578 /* 7579 * The Pin Complex 0x14 for the treble speakers is wrongly reported as 7580 * unconnected. 7581 * The Pin Complex 0x17 for the bass speakers has the lowest association 7582 * and sequence values so shift it up a bit to squeeze 0x14 in. 7583 */ 7584 static const struct hda_pintbl pincfgs[] = { 7585 { 0x14, 0x90170110 }, // top/treble 7586 { 0x17, 0x90170111 }, // bottom/bass 7587 { } 7588 }; 7589 7590 /* 7591 * Force DAC 0x02 for the bass speakers 0x17. 7592 */ 7593 static const hda_nid_t conn[] = { 0x02 }; 7594 7595 switch (action) { 7596 case HDA_FIXUP_ACT_PRE_PROBE: 7597 snd_hda_apply_pincfgs(codec, pincfgs); 7598 snd_hda_override_conn_list(codec, 0x17, ARRAY_SIZE(conn), conn); 7599 break; 7600 } 7601 7602 cs35l41_fixup_i2c_two(codec, fix, action); 7603 alc245_fixup_hp_mute_led_coefbit(codec, fix, action); 7604 alc245_fixup_hp_gpio_led(codec, fix, action); 7605 } 7606 7607 /* some changes for Spectre x360 16, 2024 model */ 7608 static void alc245_fixup_hp_spectre_x360_16_aa0xxx(struct hda_codec *codec, 7609 const struct hda_fixup *fix, int action) 7610 { 7611 /* 7612 * The Pin Complex 0x14 for the treble speakers is wrongly reported as 7613 * unconnected. 7614 * The Pin Complex 0x17 for the bass speakers has the lowest association 7615 * and sequence values so shift it up a bit to squeeze 0x14 in. 7616 */ 7617 struct alc_spec *spec = codec->spec; 7618 static const struct hda_pintbl pincfgs[] = { 7619 { 0x14, 0x90170110 }, // top/treble 7620 { 0x17, 0x90170111 }, // bottom/bass 7621 { } 7622 }; 7623 7624 /* 7625 * Force DAC 0x02 for the bass speakers 0x17. 7626 */ 7627 static const hda_nid_t conn[] = { 0x02 }; 7628 7629 switch (action) { 7630 case HDA_FIXUP_ACT_PRE_PROBE: 7631 /* needed for amp of back speakers */ 7632 spec->gpio_mask |= 0x01; 7633 spec->gpio_dir |= 0x01; 7634 snd_hda_apply_pincfgs(codec, pincfgs); 7635 snd_hda_override_conn_list(codec, 0x17, ARRAY_SIZE(conn), conn); 7636 break; 7637 case HDA_FIXUP_ACT_INIT: 7638 /* need to toggle GPIO to enable the amp of back speakers */ 7639 alc_update_gpio_data(codec, 0x01, true); 7640 msleep(100); 7641 alc_update_gpio_data(codec, 0x01, false); 7642 break; 7643 } 7644 7645 cs35l41_fixup_i2c_two(codec, fix, action); 7646 alc245_fixup_hp_mute_led_coefbit(codec, fix, action); 7647 alc245_fixup_hp_gpio_led(codec, fix, action); 7648 } 7649 7650 static void alc245_fixup_hp_zbook_firefly_g12a(struct hda_codec *codec, 7651 const struct hda_fixup *fix, int action) 7652 { 7653 struct alc_spec *spec = codec->spec; 7654 static const hda_nid_t conn[] = { 0x02 }; 7655 7656 switch (action) { 7657 case HDA_FIXUP_ACT_PRE_PROBE: 7658 spec->gen.auto_mute_via_amp = 1; 7659 snd_hda_override_conn_list(codec, 0x17, ARRAY_SIZE(conn), conn); 7660 break; 7661 } 7662 7663 cs35l41_fixup_i2c_two(codec, fix, action); 7664 alc245_fixup_hp_mute_led_coefbit(codec, fix, action); 7665 alc285_fixup_hp_coef_micmute_led(codec, fix, action); 7666 } 7667 7668 /* 7669 * ALC287 PCM hooks 7670 */ 7671 static void alc287_alc1318_playback_pcm_hook(struct hda_pcm_stream *hinfo, 7672 struct hda_codec *codec, 7673 struct snd_pcm_substream *substream, 7674 int action) 7675 { 7676 switch (action) { 7677 case HDA_GEN_PCM_ACT_OPEN: 7678 alc_write_coefex_idx(codec, 0x5a, 0x00, 0x954f); /* write gpio3 to high */ 7679 break; 7680 case HDA_GEN_PCM_ACT_CLOSE: 7681 alc_write_coefex_idx(codec, 0x5a, 0x00, 0x554f); /* write gpio3 as default value */ 7682 break; 7683 } 7684 } 7685 7686 static void alc287_s4_power_gpio3_default(struct hda_codec *codec) 7687 { 7688 if (is_s4_suspend(codec)) { 7689 alc_write_coefex_idx(codec, 0x5a, 0x00, 0x554f); /* write gpio3 as default value */ 7690 } 7691 } 7692 7693 static void alc287_fixup_lenovo_thinkpad_with_alc1318(struct hda_codec *codec, 7694 const struct hda_fixup *fix, int action) 7695 { 7696 struct alc_spec *spec = codec->spec; 7697 static const struct coef_fw coefs[] = { 7698 WRITE_COEF(0x24, 0x0013), WRITE_COEF(0x25, 0x0000), WRITE_COEF(0x26, 0xC300), 7699 WRITE_COEF(0x28, 0x0001), WRITE_COEF(0x29, 0xb023), 7700 WRITE_COEF(0x24, 0x0013), WRITE_COEF(0x25, 0x0000), WRITE_COEF(0x26, 0xC301), 7701 WRITE_COEF(0x28, 0x0001), WRITE_COEF(0x29, 0xb023), 7702 }; 7703 7704 if (action != HDA_FIXUP_ACT_PRE_PROBE) 7705 return; 7706 alc_update_coef_idx(codec, 0x10, 1<<11, 1<<11); 7707 alc_process_coef_fw(codec, coefs); 7708 spec->power_hook = alc287_s4_power_gpio3_default; 7709 spec->gen.pcm_playback_hook = alc287_alc1318_playback_pcm_hook; 7710 } 7711 7712 /* 7713 * Clear COEF 0x0d (PCBEEP passthrough) bit 0x40 where BIOS sets it wrongly 7714 * at PM resume 7715 */ 7716 static void alc283_fixup_dell_hp_resume(struct hda_codec *codec, 7717 const struct hda_fixup *fix, int action) 7718 { 7719 if (action == HDA_FIXUP_ACT_INIT) 7720 alc_write_coef_idx(codec, 0xd, 0x2800); 7721 } 7722 7723 enum { 7724 ALC269_FIXUP_GPIO2, 7725 ALC269_FIXUP_SONY_VAIO, 7726 ALC275_FIXUP_SONY_VAIO_GPIO2, 7727 ALC269_FIXUP_DELL_M101Z, 7728 ALC269_FIXUP_SKU_IGNORE, 7729 ALC269_FIXUP_ASUS_G73JW, 7730 ALC269_FIXUP_ASUS_N7601ZM_PINS, 7731 ALC269_FIXUP_ASUS_N7601ZM, 7732 ALC269_FIXUP_LENOVO_EAPD, 7733 ALC275_FIXUP_SONY_HWEQ, 7734 ALC275_FIXUP_SONY_DISABLE_AAMIX, 7735 ALC271_FIXUP_DMIC, 7736 ALC269_FIXUP_PCM_44K, 7737 ALC269_FIXUP_STEREO_DMIC, 7738 ALC269_FIXUP_HEADSET_MIC, 7739 ALC269_FIXUP_QUANTA_MUTE, 7740 ALC269_FIXUP_LIFEBOOK, 7741 ALC269_FIXUP_LIFEBOOK_EXTMIC, 7742 ALC269_FIXUP_LIFEBOOK_HP_PIN, 7743 ALC269_FIXUP_LIFEBOOK_NO_HP_TO_LINEOUT, 7744 ALC255_FIXUP_LIFEBOOK_U7x7_HEADSET_MIC, 7745 ALC269_FIXUP_AMIC, 7746 ALC269_FIXUP_DMIC, 7747 ALC269VB_FIXUP_AMIC, 7748 ALC269VB_FIXUP_DMIC, 7749 ALC269_FIXUP_HP_MUTE_LED, 7750 ALC269_FIXUP_HP_MUTE_LED_MIC1, 7751 ALC269_FIXUP_HP_MUTE_LED_MIC2, 7752 ALC269_FIXUP_HP_MUTE_LED_MIC3, 7753 ALC269_FIXUP_HP_GPIO_LED, 7754 ALC269_FIXUP_HP_GPIO_MIC1_LED, 7755 ALC269_FIXUP_HP_LINE1_MIC1_LED, 7756 ALC269_FIXUP_INV_DMIC, 7757 ALC269_FIXUP_LENOVO_DOCK, 7758 ALC269_FIXUP_LENOVO_DOCK_LIMIT_BOOST, 7759 ALC269_FIXUP_NO_SHUTUP, 7760 ALC286_FIXUP_SONY_MIC_NO_PRESENCE, 7761 ALC269_FIXUP_PINCFG_NO_HP_TO_LINEOUT, 7762 ALC269_FIXUP_DELL1_MIC_NO_PRESENCE, 7763 ALC269_FIXUP_DELL1_LIMIT_INT_MIC_BOOST, 7764 ALC269_FIXUP_DELL2_MIC_NO_PRESENCE, 7765 ALC269_FIXUP_DELL3_MIC_NO_PRESENCE, 7766 ALC269_FIXUP_DELL4_MIC_NO_PRESENCE, 7767 ALC269_FIXUP_DELL4_MIC_NO_PRESENCE_QUIET, 7768 ALC269_FIXUP_HEADSET_MODE, 7769 ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC, 7770 ALC269_FIXUP_ASPIRE_HEADSET_MIC, 7771 ALC269_FIXUP_ASUS_X101_FUNC, 7772 ALC269_FIXUP_ASUS_X101_VERB, 7773 ALC269_FIXUP_ASUS_X101, 7774 ALC271_FIXUP_AMIC_MIC2, 7775 ALC271_FIXUP_HP_GATE_MIC_JACK, 7776 ALC271_FIXUP_HP_GATE_MIC_JACK_E1_572, 7777 ALC269_FIXUP_ACER_AC700, 7778 ALC269_FIXUP_LIMIT_INT_MIC_BOOST, 7779 ALC269VB_FIXUP_ASUS_ZENBOOK, 7780 ALC269VB_FIXUP_ASUS_ZENBOOK_UX31A, 7781 ALC269VB_FIXUP_ASUS_MIC_NO_PRESENCE, 7782 ALC269_FIXUP_LIMIT_INT_MIC_BOOST_MUTE_LED, 7783 ALC269VB_FIXUP_ORDISSIMO_EVE2, 7784 ALC283_FIXUP_CHROME_BOOK, 7785 ALC283_FIXUP_SENSE_COMBO_JACK, 7786 ALC282_FIXUP_ASUS_TX300, 7787 ALC283_FIXUP_INT_MIC, 7788 ALC290_FIXUP_MONO_SPEAKERS, 7789 ALC290_FIXUP_MONO_SPEAKERS_HSJACK, 7790 ALC290_FIXUP_SUBWOOFER, 7791 ALC290_FIXUP_SUBWOOFER_HSJACK, 7792 ALC295_FIXUP_HP_MUTE_LED_COEFBIT11, 7793 ALC269_FIXUP_THINKPAD_ACPI, 7794 ALC269_FIXUP_LENOVO_XPAD_ACPI, 7795 ALC269_FIXUP_DMIC_THINKPAD_ACPI, 7796 ALC269VB_FIXUP_INFINIX_ZERO_BOOK_13, 7797 ALC269VC_FIXUP_INFINIX_Y4_MAX, 7798 ALC269VB_FIXUP_CHUWI_COREBOOK_XPRO, 7799 ALC255_FIXUP_ACER_MIC_NO_PRESENCE, 7800 ALC255_FIXUP_ASUS_MIC_NO_PRESENCE, 7801 ALC255_FIXUP_DELL1_MIC_NO_PRESENCE, 7802 ALC255_FIXUP_DELL1_LIMIT_INT_MIC_BOOST, 7803 ALC255_FIXUP_DELL2_MIC_NO_PRESENCE, 7804 ALC255_FIXUP_HEADSET_MODE, 7805 ALC255_FIXUP_HEADSET_MODE_NO_HP_MIC, 7806 ALC293_FIXUP_DELL1_MIC_NO_PRESENCE, 7807 ALC292_FIXUP_TPT440_DOCK, 7808 ALC292_FIXUP_TPT440, 7809 ALC283_FIXUP_HEADSET_MIC, 7810 ALC255_FIXUP_MIC_MUTE_LED, 7811 ALC282_FIXUP_ASPIRE_V5_PINS, 7812 ALC269VB_FIXUP_ASPIRE_E1_COEF, 7813 ALC280_FIXUP_HP_GPIO4, 7814 ALC286_FIXUP_HP_GPIO_LED, 7815 ALC280_FIXUP_HP_GPIO2_MIC_HOTKEY, 7816 ALC280_FIXUP_HP_DOCK_PINS, 7817 ALC269_FIXUP_HP_DOCK_GPIO_MIC1_LED, 7818 ALC280_FIXUP_HP_9480M, 7819 ALC245_FIXUP_HP_X360_AMP, 7820 ALC285_FIXUP_HP_SPECTRE_X360_EB1, 7821 ALC285_FIXUP_HP_SPECTRE_X360_DF1, 7822 ALC285_FIXUP_HP_ENVY_X360, 7823 ALC288_FIXUP_DELL_HEADSET_MODE, 7824 ALC288_FIXUP_DELL1_MIC_NO_PRESENCE, 7825 ALC288_FIXUP_DELL_XPS_13, 7826 ALC288_FIXUP_DISABLE_AAMIX, 7827 ALC292_FIXUP_DELL_E7X_AAMIX, 7828 ALC292_FIXUP_DELL_E7X, 7829 ALC292_FIXUP_DISABLE_AAMIX, 7830 ALC293_FIXUP_DISABLE_AAMIX_MULTIJACK, 7831 ALC298_FIXUP_ALIENWARE_MIC_NO_PRESENCE, 7832 ALC298_FIXUP_DELL1_MIC_NO_PRESENCE, 7833 ALC298_FIXUP_DELL_AIO_MIC_NO_PRESENCE, 7834 ALC275_FIXUP_DELL_XPS, 7835 ALC293_FIXUP_LENOVO_SPK_NOISE, 7836 ALC233_FIXUP_LENOVO_LINE2_MIC_HOTKEY, 7837 ALC233_FIXUP_LENOVO_L2MH_LOW_ENLED, 7838 ALC255_FIXUP_DELL_SPK_NOISE, 7839 ALC225_FIXUP_DISABLE_MIC_VREF, 7840 ALC225_FIXUP_DELL1_MIC_NO_PRESENCE, 7841 ALC295_FIXUP_DISABLE_DAC3, 7842 ALC285_FIXUP_SPEAKER2_TO_DAC1, 7843 ALC285_FIXUP_ASUS_SPEAKER2_TO_DAC1, 7844 ALC285_FIXUP_ASUS_HEADSET_MIC, 7845 ALC285_FIXUP_ASUS_SPI_REAR_SPEAKERS, 7846 ALC285_FIXUP_ASUS_I2C_SPEAKER2_TO_DAC1, 7847 ALC285_FIXUP_ASUS_I2C_HEADSET_MIC, 7848 ALC280_FIXUP_HP_HEADSET_MIC, 7849 ALC221_FIXUP_HP_FRONT_MIC, 7850 ALC292_FIXUP_TPT460, 7851 ALC298_FIXUP_SPK_VOLUME, 7852 ALC298_FIXUP_LENOVO_SPK_VOLUME, 7853 ALC256_FIXUP_DELL_INSPIRON_7559_SUBWOOFER, 7854 ALC269_FIXUP_ATIV_BOOK_8, 7855 ALC221_FIXUP_HP_288PRO_MIC_NO_PRESENCE, 7856 ALC221_FIXUP_HP_MIC_NO_PRESENCE, 7857 ALC256_FIXUP_ASUS_HEADSET_MODE, 7858 ALC256_FIXUP_ASUS_MIC, 7859 ALC256_FIXUP_ASUS_AIO_GPIO2, 7860 ALC233_FIXUP_ASUS_MIC_NO_PRESENCE, 7861 ALC233_FIXUP_EAPD_COEF_AND_MIC_NO_PRESENCE, 7862 ALC233_FIXUP_LENOVO_MULTI_CODECS, 7863 ALC233_FIXUP_ACER_HEADSET_MIC, 7864 ALC294_FIXUP_LENOVO_MIC_LOCATION, 7865 ALC225_FIXUP_DELL_WYSE_MIC_NO_PRESENCE, 7866 ALC225_FIXUP_S3_POP_NOISE, 7867 ALC700_FIXUP_INTEL_REFERENCE, 7868 ALC274_FIXUP_DELL_BIND_DACS, 7869 ALC274_FIXUP_DELL_AIO_LINEOUT_VERB, 7870 ALC298_FIXUP_TPT470_DOCK_FIX, 7871 ALC298_FIXUP_TPT470_DOCK, 7872 ALC255_FIXUP_DUMMY_LINEOUT_VERB, 7873 ALC255_FIXUP_DELL_HEADSET_MIC, 7874 ALC256_FIXUP_HUAWEI_MACH_WX9_PINS, 7875 ALC298_FIXUP_HUAWEI_MBX_STEREO, 7876 ALC295_FIXUP_HP_X360, 7877 ALC221_FIXUP_HP_HEADSET_MIC, 7878 ALC285_FIXUP_LENOVO_HEADPHONE_NOISE, 7879 ALC295_FIXUP_HP_AUTO_MUTE, 7880 ALC286_FIXUP_ACER_AIO_MIC_NO_PRESENCE, 7881 ALC294_FIXUP_ASUS_MIC, 7882 ALC294_FIXUP_ASUS_HEADSET_MIC, 7883 ALC294_FIXUP_ASUS_SPK, 7884 ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE, 7885 ALC285_FIXUP_LENOVO_PC_BEEP_IN_NOISE, 7886 ALC255_FIXUP_ACER_HEADSET_MIC, 7887 ALC295_FIXUP_CHROME_BOOK, 7888 ALC225_FIXUP_HEADSET_JACK, 7889 ALC225_FIXUP_DELL_WYSE_AIO_MIC_NO_PRESENCE, 7890 ALC225_FIXUP_WYSE_AUTO_MUTE, 7891 ALC225_FIXUP_WYSE_DISABLE_MIC_VREF, 7892 ALC286_FIXUP_ACER_AIO_HEADSET_MIC, 7893 ALC256_FIXUP_ASUS_HEADSET_MIC, 7894 ALC256_FIXUP_ASUS_MIC_NO_PRESENCE, 7895 ALC255_FIXUP_PREDATOR_SUBWOOFER, 7896 ALC299_FIXUP_PREDATOR_SPK, 7897 ALC256_FIXUP_MEDION_HEADSET_NO_PRESENCE, 7898 ALC289_FIXUP_DELL_SPK1, 7899 ALC289_FIXUP_DELL_SPK2, 7900 ALC289_FIXUP_DUAL_SPK, 7901 ALC289_FIXUP_RTK_AMP_DUAL_SPK, 7902 ALC294_FIXUP_SPK2_TO_DAC1, 7903 ALC294_FIXUP_ASUS_DUAL_SPK, 7904 ALC285_FIXUP_THINKPAD_X1_GEN7, 7905 ALC285_FIXUP_THINKPAD_HEADSET_JACK, 7906 ALC294_FIXUP_ASUS_ALLY, 7907 ALC294_FIXUP_ASUS_ALLY_PINS, 7908 ALC294_FIXUP_ASUS_ALLY_VERBS, 7909 ALC294_FIXUP_ASUS_ALLY_SPEAKER, 7910 ALC294_FIXUP_ASUS_HPE, 7911 ALC294_FIXUP_ASUS_COEF_1B, 7912 ALC294_FIXUP_ASUS_GX502_HP, 7913 ALC294_FIXUP_ASUS_GX502_PINS, 7914 ALC294_FIXUP_ASUS_GX502_VERBS, 7915 ALC294_FIXUP_ASUS_GU502_HP, 7916 ALC294_FIXUP_ASUS_GU502_PINS, 7917 ALC294_FIXUP_ASUS_GU502_VERBS, 7918 ALC294_FIXUP_ASUS_G513_PINS, 7919 ALC285_FIXUP_ASUS_G533Z_PINS, 7920 ALC285_FIXUP_HP_GPIO_LED, 7921 ALC285_FIXUP_HP_MUTE_LED, 7922 ALC285_FIXUP_HP_SPECTRE_X360_MUTE_LED, 7923 ALC285_FIXUP_HP_BEEP_MICMUTE_LED, 7924 ALC236_FIXUP_HP_MUTE_LED_COEFBIT2, 7925 ALC236_FIXUP_HP_GPIO_LED, 7926 ALC236_FIXUP_HP_MUTE_LED, 7927 ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF, 7928 ALC236_FIXUP_LENOVO_INV_DMIC, 7929 ALC298_FIXUP_SAMSUNG_AMP, 7930 ALC298_FIXUP_SAMSUNG_AMP_V2_2_AMPS, 7931 ALC298_FIXUP_SAMSUNG_AMP_V2_4_AMPS, 7932 ALC298_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET, 7933 ALC256_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET, 7934 ALC295_FIXUP_ASUS_MIC_NO_PRESENCE, 7935 ALC269VC_FIXUP_ACER_VCOPPERBOX_PINS, 7936 ALC269VC_FIXUP_ACER_HEADSET_MIC, 7937 ALC269VC_FIXUP_ACER_MIC_NO_PRESENCE, 7938 ALC289_FIXUP_ASUS_GA401, 7939 ALC289_FIXUP_ASUS_GA502, 7940 ALC256_FIXUP_ACER_MIC_NO_PRESENCE, 7941 ALC285_FIXUP_HP_GPIO_AMP_INIT, 7942 ALC269_FIXUP_CZC_B20, 7943 ALC269_FIXUP_CZC_TMI, 7944 ALC269_FIXUP_CZC_L101, 7945 ALC269_FIXUP_LEMOTE_A1802, 7946 ALC269_FIXUP_LEMOTE_A190X, 7947 ALC256_FIXUP_INTEL_NUC8_RUGGED, 7948 ALC233_FIXUP_INTEL_NUC8_DMIC, 7949 ALC233_FIXUP_INTEL_NUC8_BOOST, 7950 ALC256_FIXUP_INTEL_NUC10, 7951 ALC255_FIXUP_XIAOMI_HEADSET_MIC, 7952 ALC274_FIXUP_HP_MIC, 7953 ALC274_FIXUP_HP_HEADSET_MIC, 7954 ALC274_FIXUP_HP_ENVY_GPIO, 7955 ALC274_FIXUP_ASUS_ZEN_AIO_27, 7956 ALC256_FIXUP_ASUS_HPE, 7957 ALC285_FIXUP_THINKPAD_NO_BASS_SPK_HEADSET_JACK, 7958 ALC287_FIXUP_HP_GPIO_LED, 7959 ALC256_FIXUP_HP_HEADSET_MIC, 7960 ALC245_FIXUP_HP_GPIO_LED, 7961 ALC236_FIXUP_DELL_AIO_HEADSET_MIC, 7962 ALC282_FIXUP_ACER_DISABLE_LINEOUT, 7963 ALC255_FIXUP_ACER_LIMIT_INT_MIC_BOOST, 7964 ALC256_FIXUP_ACER_HEADSET_MIC, 7965 ALC285_FIXUP_IDEAPAD_S740_COEF, 7966 ALC285_FIXUP_HP_LIMIT_INT_MIC_BOOST, 7967 ALC295_FIXUP_ASUS_DACS, 7968 ALC295_FIXUP_HP_OMEN, 7969 ALC285_FIXUP_HP_SPECTRE_X360, 7970 ALC287_FIXUP_IDEAPAD_BASS_SPK_AMP, 7971 ALC623_FIXUP_LENOVO_THINKSTATION_P340, 7972 ALC255_FIXUP_ACER_HEADPHONE_AND_MIC, 7973 ALC236_FIXUP_HP_LIMIT_INT_MIC_BOOST, 7974 ALC287_FIXUP_LEGION_15IMHG05_SPEAKERS, 7975 ALC287_FIXUP_LEGION_15IMHG05_AUTOMUTE, 7976 ALC287_FIXUP_YOGA7_14ITL_SPEAKERS, 7977 ALC298_FIXUP_LENOVO_C940_DUET7, 7978 ALC287_FIXUP_13S_GEN2_SPEAKERS, 7979 ALC256_FIXUP_SET_COEF_DEFAULTS, 7980 ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE, 7981 ALC233_FIXUP_NO_AUDIO_JACK, 7982 ALC256_FIXUP_MIC_NO_PRESENCE_AND_RESUME, 7983 ALC285_FIXUP_LEGION_Y9000X_SPEAKERS, 7984 ALC285_FIXUP_LEGION_Y9000X_AUTOMUTE, 7985 ALC287_FIXUP_LEGION_16ACHG6, 7986 ALC287_FIXUP_CS35L41_I2C_2, 7987 ALC287_FIXUP_CS35L41_I2C_2_HP_GPIO_LED, 7988 ALC287_FIXUP_CS35L41_I2C_4, 7989 ALC245_FIXUP_CS35L41_SPI_2, 7990 ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED, 7991 ALC245_FIXUP_CS35L41_SPI_4, 7992 ALC245_FIXUP_CS35L41_SPI_4_HP_GPIO_LED, 7993 ALC285_FIXUP_HP_SPEAKERS_MICMUTE_LED, 7994 ALC295_FIXUP_FRAMEWORK_LAPTOP_MIC_NO_PRESENCE, 7995 ALC287_FIXUP_LEGION_16ITHG6, 7996 ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK, 7997 ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK_PIN, 7998 ALC287_FIXUP_YOGA9_14IMH9_BASS_SPK_PIN, 7999 ALC295_FIXUP_DELL_INSPIRON_TOP_SPEAKERS, 8000 ALC236_FIXUP_DELL_DUAL_CODECS, 8001 ALC287_FIXUP_CS35L41_I2C_2_THINKPAD_ACPI, 8002 ALC287_FIXUP_TAS2781_I2C, 8003 ALC245_FIXUP_TAS2781_SPI_2, 8004 ALC287_FIXUP_YOGA7_14ARB7_I2C, 8005 ALC245_FIXUP_HP_MUTE_LED_COEFBIT, 8006 ALC245_FIXUP_HP_MUTE_LED_V1_COEFBIT, 8007 ALC245_FIXUP_HP_X360_MUTE_LEDS, 8008 ALC287_FIXUP_THINKPAD_I2S_SPK, 8009 ALC287_FIXUP_MG_RTKC_CSAMP_CS35L41_I2C_THINKPAD, 8010 ALC2XX_FIXUP_HEADSET_MIC, 8011 ALC289_FIXUP_DELL_CS35L41_SPI_2, 8012 ALC294_FIXUP_CS35L41_I2C_2, 8013 ALC256_FIXUP_ACER_SFG16_MICMUTE_LED, 8014 ALC256_FIXUP_HEADPHONE_AMP_VOL, 8015 ALC245_FIXUP_HP_SPECTRE_X360_EU0XXX, 8016 ALC245_FIXUP_HP_SPECTRE_X360_16_AA0XXX, 8017 ALC245_FIXUP_HP_ZBOOK_FIREFLY_G12A, 8018 ALC285_FIXUP_ASUS_GA403U, 8019 ALC285_FIXUP_ASUS_GA403U_HEADSET_MIC, 8020 ALC285_FIXUP_ASUS_GA403U_I2C_SPEAKER2_TO_DAC1, 8021 ALC285_FIXUP_ASUS_GU605_SPI_2_HEADSET_MIC, 8022 ALC285_FIXUP_ASUS_GU605_SPI_SPEAKER2_TO_DAC1, 8023 ALC287_FIXUP_LENOVO_THKPAD_WH_ALC1318, 8024 ALC256_FIXUP_CHROME_BOOK, 8025 ALC245_FIXUP_CLEVO_NOISY_MIC, 8026 ALC269_FIXUP_VAIO_VJFH52_MIC_NO_PRESENCE, 8027 ALC233_FIXUP_MEDION_MTL_SPK, 8028 ALC294_FIXUP_BASS_SPEAKER_15, 8029 ALC283_FIXUP_DELL_HP_RESUME, 8030 ALC294_FIXUP_ASUS_CS35L41_SPI_2, 8031 ALC274_FIXUP_HP_AIO_BIND_DACS, 8032 ALC287_FIXUP_PREDATOR_SPK_CS35L41_I2C_2, 8033 }; 8034 8035 /* A special fixup for Lenovo C940 and Yoga Duet 7; 8036 * both have the very same PCI SSID, and we need to apply different fixups 8037 * depending on the codec ID 8038 */ 8039 static void alc298_fixup_lenovo_c940_duet7(struct hda_codec *codec, 8040 const struct hda_fixup *fix, 8041 int action) 8042 { 8043 int id; 8044 8045 if (codec->core.vendor_id == 0x10ec0298) 8046 id = ALC298_FIXUP_LENOVO_SPK_VOLUME; /* C940 */ 8047 else 8048 id = ALC287_FIXUP_YOGA7_14ITL_SPEAKERS; /* Duet 7 */ 8049 __snd_hda_apply_fixup(codec, id, action, 0); 8050 } 8051 8052 static const struct hda_fixup alc269_fixups[] = { 8053 [ALC269_FIXUP_GPIO2] = { 8054 .type = HDA_FIXUP_FUNC, 8055 .v.func = alc_fixup_gpio2, 8056 }, 8057 [ALC269_FIXUP_SONY_VAIO] = { 8058 .type = HDA_FIXUP_PINCTLS, 8059 .v.pins = (const struct hda_pintbl[]) { 8060 {0x19, PIN_VREFGRD}, 8061 {} 8062 } 8063 }, 8064 [ALC275_FIXUP_SONY_VAIO_GPIO2] = { 8065 .type = HDA_FIXUP_FUNC, 8066 .v.func = alc275_fixup_gpio4_off, 8067 .chained = true, 8068 .chain_id = ALC269_FIXUP_SONY_VAIO 8069 }, 8070 [ALC269_FIXUP_DELL_M101Z] = { 8071 .type = HDA_FIXUP_VERBS, 8072 .v.verbs = (const struct hda_verb[]) { 8073 /* Enables internal speaker */ 8074 {0x20, AC_VERB_SET_COEF_INDEX, 13}, 8075 {0x20, AC_VERB_SET_PROC_COEF, 0x4040}, 8076 {} 8077 } 8078 }, 8079 [ALC269_FIXUP_SKU_IGNORE] = { 8080 .type = HDA_FIXUP_FUNC, 8081 .v.func = alc_fixup_sku_ignore, 8082 }, 8083 [ALC269_FIXUP_ASUS_G73JW] = { 8084 .type = HDA_FIXUP_PINS, 8085 .v.pins = (const struct hda_pintbl[]) { 8086 { 0x17, 0x99130111 }, /* subwoofer */ 8087 { } 8088 } 8089 }, 8090 [ALC269_FIXUP_ASUS_N7601ZM_PINS] = { 8091 .type = HDA_FIXUP_PINS, 8092 .v.pins = (const struct hda_pintbl[]) { 8093 { 0x19, 0x03A11050 }, 8094 { 0x1a, 0x03A11C30 }, 8095 { 0x21, 0x03211420 }, 8096 { } 8097 } 8098 }, 8099 [ALC269_FIXUP_ASUS_N7601ZM] = { 8100 .type = HDA_FIXUP_VERBS, 8101 .v.verbs = (const struct hda_verb[]) { 8102 {0x20, AC_VERB_SET_COEF_INDEX, 0x62}, 8103 {0x20, AC_VERB_SET_PROC_COEF, 0xa007}, 8104 {0x20, AC_VERB_SET_COEF_INDEX, 0x10}, 8105 {0x20, AC_VERB_SET_PROC_COEF, 0x8420}, 8106 {0x20, AC_VERB_SET_COEF_INDEX, 0x0f}, 8107 {0x20, AC_VERB_SET_PROC_COEF, 0x7774}, 8108 { } 8109 }, 8110 .chained = true, 8111 .chain_id = ALC269_FIXUP_ASUS_N7601ZM_PINS, 8112 }, 8113 [ALC269_FIXUP_LENOVO_EAPD] = { 8114 .type = HDA_FIXUP_VERBS, 8115 .v.verbs = (const struct hda_verb[]) { 8116 {0x14, AC_VERB_SET_EAPD_BTLENABLE, 0}, 8117 {} 8118 } 8119 }, 8120 [ALC275_FIXUP_SONY_HWEQ] = { 8121 .type = HDA_FIXUP_FUNC, 8122 .v.func = alc269_fixup_hweq, 8123 .chained = true, 8124 .chain_id = ALC275_FIXUP_SONY_VAIO_GPIO2 8125 }, 8126 [ALC275_FIXUP_SONY_DISABLE_AAMIX] = { 8127 .type = HDA_FIXUP_FUNC, 8128 .v.func = alc_fixup_disable_aamix, 8129 .chained = true, 8130 .chain_id = ALC269_FIXUP_SONY_VAIO 8131 }, 8132 [ALC271_FIXUP_DMIC] = { 8133 .type = HDA_FIXUP_FUNC, 8134 .v.func = alc271_fixup_dmic, 8135 }, 8136 [ALC269_FIXUP_PCM_44K] = { 8137 .type = HDA_FIXUP_FUNC, 8138 .v.func = alc269_fixup_pcm_44k, 8139 .chained = true, 8140 .chain_id = ALC269_FIXUP_QUANTA_MUTE 8141 }, 8142 [ALC269_FIXUP_STEREO_DMIC] = { 8143 .type = HDA_FIXUP_FUNC, 8144 .v.func = alc269_fixup_stereo_dmic, 8145 }, 8146 [ALC269_FIXUP_HEADSET_MIC] = { 8147 .type = HDA_FIXUP_FUNC, 8148 .v.func = alc269_fixup_headset_mic, 8149 }, 8150 [ALC269_FIXUP_QUANTA_MUTE] = { 8151 .type = HDA_FIXUP_FUNC, 8152 .v.func = alc269_fixup_quanta_mute, 8153 }, 8154 [ALC269_FIXUP_LIFEBOOK] = { 8155 .type = HDA_FIXUP_PINS, 8156 .v.pins = (const struct hda_pintbl[]) { 8157 { 0x1a, 0x2101103f }, /* dock line-out */ 8158 { 0x1b, 0x23a11040 }, /* dock mic-in */ 8159 { } 8160 }, 8161 .chained = true, 8162 .chain_id = ALC269_FIXUP_QUANTA_MUTE 8163 }, 8164 [ALC269_FIXUP_LIFEBOOK_EXTMIC] = { 8165 .type = HDA_FIXUP_PINS, 8166 .v.pins = (const struct hda_pintbl[]) { 8167 { 0x19, 0x01a1903c }, /* headset mic, with jack detect */ 8168 { } 8169 }, 8170 }, 8171 [ALC269_FIXUP_LIFEBOOK_HP_PIN] = { 8172 .type = HDA_FIXUP_PINS, 8173 .v.pins = (const struct hda_pintbl[]) { 8174 { 0x21, 0x0221102f }, /* HP out */ 8175 { } 8176 }, 8177 }, 8178 [ALC269_FIXUP_LIFEBOOK_NO_HP_TO_LINEOUT] = { 8179 .type = HDA_FIXUP_FUNC, 8180 .v.func = alc269_fixup_pincfg_no_hp_to_lineout, 8181 }, 8182 [ALC255_FIXUP_LIFEBOOK_U7x7_HEADSET_MIC] = { 8183 .type = HDA_FIXUP_FUNC, 8184 .v.func = alc269_fixup_pincfg_U7x7_headset_mic, 8185 }, 8186 [ALC269VB_FIXUP_INFINIX_ZERO_BOOK_13] = { 8187 .type = HDA_FIXUP_PINS, 8188 .v.pins = (const struct hda_pintbl[]) { 8189 { 0x14, 0x90170151 }, /* use as internal speaker (LFE) */ 8190 { 0x1b, 0x90170152 }, /* use as internal speaker (back) */ 8191 { } 8192 }, 8193 .chained = true, 8194 .chain_id = ALC269_FIXUP_LIMIT_INT_MIC_BOOST 8195 }, 8196 [ALC269VC_FIXUP_INFINIX_Y4_MAX] = { 8197 .type = HDA_FIXUP_PINS, 8198 .v.pins = (const struct hda_pintbl[]) { 8199 { 0x1b, 0x90170150 }, /* use as internal speaker */ 8200 { } 8201 }, 8202 .chained = true, 8203 .chain_id = ALC269_FIXUP_LIMIT_INT_MIC_BOOST 8204 }, 8205 [ALC269VB_FIXUP_CHUWI_COREBOOK_XPRO] = { 8206 .type = HDA_FIXUP_PINS, 8207 .v.pins = (const struct hda_pintbl[]) { 8208 { 0x18, 0x03a19020 }, /* headset mic */ 8209 { 0x1b, 0x90170150 }, /* speaker */ 8210 { } 8211 }, 8212 }, 8213 [ALC269_FIXUP_AMIC] = { 8214 .type = HDA_FIXUP_PINS, 8215 .v.pins = (const struct hda_pintbl[]) { 8216 { 0x14, 0x99130110 }, /* speaker */ 8217 { 0x15, 0x0121401f }, /* HP out */ 8218 { 0x18, 0x01a19c20 }, /* mic */ 8219 { 0x19, 0x99a3092f }, /* int-mic */ 8220 { } 8221 }, 8222 }, 8223 [ALC269_FIXUP_DMIC] = { 8224 .type = HDA_FIXUP_PINS, 8225 .v.pins = (const struct hda_pintbl[]) { 8226 { 0x12, 0x99a3092f }, /* int-mic */ 8227 { 0x14, 0x99130110 }, /* speaker */ 8228 { 0x15, 0x0121401f }, /* HP out */ 8229 { 0x18, 0x01a19c20 }, /* mic */ 8230 { } 8231 }, 8232 }, 8233 [ALC269VB_FIXUP_AMIC] = { 8234 .type = HDA_FIXUP_PINS, 8235 .v.pins = (const struct hda_pintbl[]) { 8236 { 0x14, 0x99130110 }, /* speaker */ 8237 { 0x18, 0x01a19c20 }, /* mic */ 8238 { 0x19, 0x99a3092f }, /* int-mic */ 8239 { 0x21, 0x0121401f }, /* HP out */ 8240 { } 8241 }, 8242 }, 8243 [ALC269VB_FIXUP_DMIC] = { 8244 .type = HDA_FIXUP_PINS, 8245 .v.pins = (const struct hda_pintbl[]) { 8246 { 0x12, 0x99a3092f }, /* int-mic */ 8247 { 0x14, 0x99130110 }, /* speaker */ 8248 { 0x18, 0x01a19c20 }, /* mic */ 8249 { 0x21, 0x0121401f }, /* HP out */ 8250 { } 8251 }, 8252 }, 8253 [ALC269_FIXUP_HP_MUTE_LED] = { 8254 .type = HDA_FIXUP_FUNC, 8255 .v.func = alc269_fixup_hp_mute_led, 8256 }, 8257 [ALC269_FIXUP_HP_MUTE_LED_MIC1] = { 8258 .type = HDA_FIXUP_FUNC, 8259 .v.func = alc269_fixup_hp_mute_led_mic1, 8260 }, 8261 [ALC269_FIXUP_HP_MUTE_LED_MIC2] = { 8262 .type = HDA_FIXUP_FUNC, 8263 .v.func = alc269_fixup_hp_mute_led_mic2, 8264 }, 8265 [ALC269_FIXUP_HP_MUTE_LED_MIC3] = { 8266 .type = HDA_FIXUP_FUNC, 8267 .v.func = alc269_fixup_hp_mute_led_mic3, 8268 .chained = true, 8269 .chain_id = ALC295_FIXUP_HP_AUTO_MUTE 8270 }, 8271 [ALC269_FIXUP_HP_GPIO_LED] = { 8272 .type = HDA_FIXUP_FUNC, 8273 .v.func = alc269_fixup_hp_gpio_led, 8274 }, 8275 [ALC269_FIXUP_HP_GPIO_MIC1_LED] = { 8276 .type = HDA_FIXUP_FUNC, 8277 .v.func = alc269_fixup_hp_gpio_mic1_led, 8278 }, 8279 [ALC269_FIXUP_HP_LINE1_MIC1_LED] = { 8280 .type = HDA_FIXUP_FUNC, 8281 .v.func = alc269_fixup_hp_line1_mic1_led, 8282 }, 8283 [ALC269_FIXUP_INV_DMIC] = { 8284 .type = HDA_FIXUP_FUNC, 8285 .v.func = alc_fixup_inv_dmic, 8286 }, 8287 [ALC269_FIXUP_NO_SHUTUP] = { 8288 .type = HDA_FIXUP_FUNC, 8289 .v.func = alc_fixup_no_shutup, 8290 }, 8291 [ALC269_FIXUP_LENOVO_DOCK] = { 8292 .type = HDA_FIXUP_PINS, 8293 .v.pins = (const struct hda_pintbl[]) { 8294 { 0x19, 0x23a11040 }, /* dock mic */ 8295 { 0x1b, 0x2121103f }, /* dock headphone */ 8296 { } 8297 }, 8298 .chained = true, 8299 .chain_id = ALC269_FIXUP_PINCFG_NO_HP_TO_LINEOUT 8300 }, 8301 [ALC269_FIXUP_LENOVO_DOCK_LIMIT_BOOST] = { 8302 .type = HDA_FIXUP_FUNC, 8303 .v.func = alc269_fixup_limit_int_mic_boost, 8304 .chained = true, 8305 .chain_id = ALC269_FIXUP_LENOVO_DOCK, 8306 }, 8307 [ALC269_FIXUP_PINCFG_NO_HP_TO_LINEOUT] = { 8308 .type = HDA_FIXUP_FUNC, 8309 .v.func = alc269_fixup_pincfg_no_hp_to_lineout, 8310 .chained = true, 8311 .chain_id = ALC269_FIXUP_THINKPAD_ACPI, 8312 }, 8313 [ALC269_FIXUP_DELL1_MIC_NO_PRESENCE] = { 8314 .type = HDA_FIXUP_PINS, 8315 .v.pins = (const struct hda_pintbl[]) { 8316 { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */ 8317 { 0x1a, 0x01a1913d }, /* use as headphone mic, without its own jack detect */ 8318 { } 8319 }, 8320 .chained = true, 8321 .chain_id = ALC269_FIXUP_HEADSET_MODE 8322 }, 8323 [ALC269_FIXUP_DELL1_LIMIT_INT_MIC_BOOST] = { 8324 .type = HDA_FIXUP_FUNC, 8325 .v.func = alc269_fixup_limit_int_mic_boost, 8326 .chained = true, 8327 .chain_id = ALC269_FIXUP_DELL1_MIC_NO_PRESENCE 8328 }, 8329 [ALC269_FIXUP_DELL2_MIC_NO_PRESENCE] = { 8330 .type = HDA_FIXUP_PINS, 8331 .v.pins = (const struct hda_pintbl[]) { 8332 { 0x16, 0x21014020 }, /* dock line out */ 8333 { 0x19, 0x21a19030 }, /* dock mic */ 8334 { 0x1a, 0x01a1913c }, /* use as headset mic, without its own jack detect */ 8335 { } 8336 }, 8337 .chained = true, 8338 .chain_id = ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC 8339 }, 8340 [ALC269_FIXUP_DELL3_MIC_NO_PRESENCE] = { 8341 .type = HDA_FIXUP_PINS, 8342 .v.pins = (const struct hda_pintbl[]) { 8343 { 0x1a, 0x01a1913c }, /* use as headset mic, without its own jack detect */ 8344 { } 8345 }, 8346 .chained = true, 8347 .chain_id = ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC 8348 }, 8349 [ALC269_FIXUP_DELL4_MIC_NO_PRESENCE] = { 8350 .type = HDA_FIXUP_PINS, 8351 .v.pins = (const struct hda_pintbl[]) { 8352 { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */ 8353 { 0x1b, 0x01a1913d }, /* use as headphone mic, without its own jack detect */ 8354 { } 8355 }, 8356 .chained = true, 8357 .chain_id = ALC269_FIXUP_HEADSET_MODE 8358 }, 8359 [ALC269_FIXUP_HEADSET_MODE] = { 8360 .type = HDA_FIXUP_FUNC, 8361 .v.func = alc_fixup_headset_mode, 8362 .chained = true, 8363 .chain_id = ALC255_FIXUP_MIC_MUTE_LED 8364 }, 8365 [ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC] = { 8366 .type = HDA_FIXUP_FUNC, 8367 .v.func = alc_fixup_headset_mode_no_hp_mic, 8368 }, 8369 [ALC269_FIXUP_ASPIRE_HEADSET_MIC] = { 8370 .type = HDA_FIXUP_PINS, 8371 .v.pins = (const struct hda_pintbl[]) { 8372 { 0x19, 0x01a1913c }, /* headset mic w/o jack detect */ 8373 { } 8374 }, 8375 .chained = true, 8376 .chain_id = ALC269_FIXUP_HEADSET_MODE, 8377 }, 8378 [ALC286_FIXUP_SONY_MIC_NO_PRESENCE] = { 8379 .type = HDA_FIXUP_PINS, 8380 .v.pins = (const struct hda_pintbl[]) { 8381 { 0x18, 0x01a1913c }, /* use as headset mic, without its own jack detect */ 8382 { } 8383 }, 8384 .chained = true, 8385 .chain_id = ALC269_FIXUP_HEADSET_MIC 8386 }, 8387 [ALC256_FIXUP_HUAWEI_MACH_WX9_PINS] = { 8388 .type = HDA_FIXUP_PINS, 8389 .v.pins = (const struct hda_pintbl[]) { 8390 {0x12, 0x90a60130}, 8391 {0x13, 0x40000000}, 8392 {0x14, 0x90170110}, 8393 {0x18, 0x411111f0}, 8394 {0x19, 0x04a11040}, 8395 {0x1a, 0x411111f0}, 8396 {0x1b, 0x90170112}, 8397 {0x1d, 0x40759a05}, 8398 {0x1e, 0x411111f0}, 8399 {0x21, 0x04211020}, 8400 { } 8401 }, 8402 .chained = true, 8403 .chain_id = ALC255_FIXUP_MIC_MUTE_LED 8404 }, 8405 [ALC298_FIXUP_HUAWEI_MBX_STEREO] = { 8406 .type = HDA_FIXUP_FUNC, 8407 .v.func = alc298_fixup_huawei_mbx_stereo, 8408 .chained = true, 8409 .chain_id = ALC255_FIXUP_MIC_MUTE_LED 8410 }, 8411 [ALC269_FIXUP_ASUS_X101_FUNC] = { 8412 .type = HDA_FIXUP_FUNC, 8413 .v.func = alc269_fixup_x101_headset_mic, 8414 }, 8415 [ALC269_FIXUP_ASUS_X101_VERB] = { 8416 .type = HDA_FIXUP_VERBS, 8417 .v.verbs = (const struct hda_verb[]) { 8418 {0x18, AC_VERB_SET_PIN_WIDGET_CONTROL, 0}, 8419 {0x20, AC_VERB_SET_COEF_INDEX, 0x08}, 8420 {0x20, AC_VERB_SET_PROC_COEF, 0x0310}, 8421 { } 8422 }, 8423 .chained = true, 8424 .chain_id = ALC269_FIXUP_ASUS_X101_FUNC 8425 }, 8426 [ALC269_FIXUP_ASUS_X101] = { 8427 .type = HDA_FIXUP_PINS, 8428 .v.pins = (const struct hda_pintbl[]) { 8429 { 0x18, 0x04a1182c }, /* Headset mic */ 8430 { } 8431 }, 8432 .chained = true, 8433 .chain_id = ALC269_FIXUP_ASUS_X101_VERB 8434 }, 8435 [ALC271_FIXUP_AMIC_MIC2] = { 8436 .type = HDA_FIXUP_PINS, 8437 .v.pins = (const struct hda_pintbl[]) { 8438 { 0x14, 0x99130110 }, /* speaker */ 8439 { 0x19, 0x01a19c20 }, /* mic */ 8440 { 0x1b, 0x99a7012f }, /* int-mic */ 8441 { 0x21, 0x0121401f }, /* HP out */ 8442 { } 8443 }, 8444 }, 8445 [ALC271_FIXUP_HP_GATE_MIC_JACK] = { 8446 .type = HDA_FIXUP_FUNC, 8447 .v.func = alc271_hp_gate_mic_jack, 8448 .chained = true, 8449 .chain_id = ALC271_FIXUP_AMIC_MIC2, 8450 }, 8451 [ALC271_FIXUP_HP_GATE_MIC_JACK_E1_572] = { 8452 .type = HDA_FIXUP_FUNC, 8453 .v.func = alc269_fixup_limit_int_mic_boost, 8454 .chained = true, 8455 .chain_id = ALC271_FIXUP_HP_GATE_MIC_JACK, 8456 }, 8457 [ALC269_FIXUP_ACER_AC700] = { 8458 .type = HDA_FIXUP_PINS, 8459 .v.pins = (const struct hda_pintbl[]) { 8460 { 0x12, 0x99a3092f }, /* int-mic */ 8461 { 0x14, 0x99130110 }, /* speaker */ 8462 { 0x18, 0x03a11c20 }, /* mic */ 8463 { 0x1e, 0x0346101e }, /* SPDIF1 */ 8464 { 0x21, 0x0321101f }, /* HP out */ 8465 { } 8466 }, 8467 .chained = true, 8468 .chain_id = ALC271_FIXUP_DMIC, 8469 }, 8470 [ALC269_FIXUP_LIMIT_INT_MIC_BOOST] = { 8471 .type = HDA_FIXUP_FUNC, 8472 .v.func = alc269_fixup_limit_int_mic_boost, 8473 .chained = true, 8474 .chain_id = ALC269_FIXUP_THINKPAD_ACPI, 8475 }, 8476 [ALC269VB_FIXUP_ASUS_ZENBOOK] = { 8477 .type = HDA_FIXUP_FUNC, 8478 .v.func = alc269_fixup_limit_int_mic_boost, 8479 .chained = true, 8480 .chain_id = ALC269VB_FIXUP_DMIC, 8481 }, 8482 [ALC269VB_FIXUP_ASUS_ZENBOOK_UX31A] = { 8483 .type = HDA_FIXUP_VERBS, 8484 .v.verbs = (const struct hda_verb[]) { 8485 /* class-D output amp +5dB */ 8486 { 0x20, AC_VERB_SET_COEF_INDEX, 0x12 }, 8487 { 0x20, AC_VERB_SET_PROC_COEF, 0x2800 }, 8488 {} 8489 }, 8490 .chained = true, 8491 .chain_id = ALC269VB_FIXUP_ASUS_ZENBOOK, 8492 }, 8493 [ALC269VB_FIXUP_ASUS_MIC_NO_PRESENCE] = { 8494 .type = HDA_FIXUP_PINS, 8495 .v.pins = (const struct hda_pintbl[]) { 8496 { 0x18, 0x01a110f0 }, /* use as headset mic */ 8497 { } 8498 }, 8499 .chained = true, 8500 .chain_id = ALC269_FIXUP_HEADSET_MIC 8501 }, 8502 [ALC269_FIXUP_LIMIT_INT_MIC_BOOST_MUTE_LED] = { 8503 .type = HDA_FIXUP_FUNC, 8504 .v.func = alc269_fixup_limit_int_mic_boost, 8505 .chained = true, 8506 .chain_id = ALC269_FIXUP_HP_MUTE_LED_MIC1, 8507 }, 8508 [ALC269VB_FIXUP_ORDISSIMO_EVE2] = { 8509 .type = HDA_FIXUP_PINS, 8510 .v.pins = (const struct hda_pintbl[]) { 8511 { 0x12, 0x99a3092f }, /* int-mic */ 8512 { 0x18, 0x03a11d20 }, /* mic */ 8513 { 0x19, 0x411111f0 }, /* Unused bogus pin */ 8514 { } 8515 }, 8516 }, 8517 [ALC283_FIXUP_CHROME_BOOK] = { 8518 .type = HDA_FIXUP_FUNC, 8519 .v.func = alc283_fixup_chromebook, 8520 }, 8521 [ALC283_FIXUP_SENSE_COMBO_JACK] = { 8522 .type = HDA_FIXUP_FUNC, 8523 .v.func = alc283_fixup_sense_combo_jack, 8524 .chained = true, 8525 .chain_id = ALC283_FIXUP_CHROME_BOOK, 8526 }, 8527 [ALC282_FIXUP_ASUS_TX300] = { 8528 .type = HDA_FIXUP_FUNC, 8529 .v.func = alc282_fixup_asus_tx300, 8530 }, 8531 [ALC283_FIXUP_INT_MIC] = { 8532 .type = HDA_FIXUP_VERBS, 8533 .v.verbs = (const struct hda_verb[]) { 8534 {0x20, AC_VERB_SET_COEF_INDEX, 0x1a}, 8535 {0x20, AC_VERB_SET_PROC_COEF, 0x0011}, 8536 { } 8537 }, 8538 .chained = true, 8539 .chain_id = ALC269_FIXUP_LIMIT_INT_MIC_BOOST 8540 }, 8541 [ALC290_FIXUP_SUBWOOFER_HSJACK] = { 8542 .type = HDA_FIXUP_PINS, 8543 .v.pins = (const struct hda_pintbl[]) { 8544 { 0x17, 0x90170112 }, /* subwoofer */ 8545 { } 8546 }, 8547 .chained = true, 8548 .chain_id = ALC290_FIXUP_MONO_SPEAKERS_HSJACK, 8549 }, 8550 [ALC290_FIXUP_SUBWOOFER] = { 8551 .type = HDA_FIXUP_PINS, 8552 .v.pins = (const struct hda_pintbl[]) { 8553 { 0x17, 0x90170112 }, /* subwoofer */ 8554 { } 8555 }, 8556 .chained = true, 8557 .chain_id = ALC290_FIXUP_MONO_SPEAKERS, 8558 }, 8559 [ALC290_FIXUP_MONO_SPEAKERS] = { 8560 .type = HDA_FIXUP_FUNC, 8561 .v.func = alc290_fixup_mono_speakers, 8562 }, 8563 [ALC290_FIXUP_MONO_SPEAKERS_HSJACK] = { 8564 .type = HDA_FIXUP_FUNC, 8565 .v.func = alc290_fixup_mono_speakers, 8566 .chained = true, 8567 .chain_id = ALC269_FIXUP_DELL3_MIC_NO_PRESENCE, 8568 }, 8569 [ALC269_FIXUP_THINKPAD_ACPI] = { 8570 .type = HDA_FIXUP_FUNC, 8571 .v.func = alc_fixup_thinkpad_acpi, 8572 .chained = true, 8573 .chain_id = ALC269_FIXUP_SKU_IGNORE, 8574 }, 8575 [ALC269_FIXUP_LENOVO_XPAD_ACPI] = { 8576 .type = HDA_FIXUP_FUNC, 8577 .v.func = alc_fixup_ideapad_acpi, 8578 .chained = true, 8579 .chain_id = ALC269_FIXUP_THINKPAD_ACPI, 8580 }, 8581 [ALC269_FIXUP_DMIC_THINKPAD_ACPI] = { 8582 .type = HDA_FIXUP_FUNC, 8583 .v.func = alc_fixup_inv_dmic, 8584 .chained = true, 8585 .chain_id = ALC269_FIXUP_THINKPAD_ACPI, 8586 }, 8587 [ALC255_FIXUP_ACER_MIC_NO_PRESENCE] = { 8588 .type = HDA_FIXUP_PINS, 8589 .v.pins = (const struct hda_pintbl[]) { 8590 { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */ 8591 { } 8592 }, 8593 .chained = true, 8594 .chain_id = ALC255_FIXUP_HEADSET_MODE 8595 }, 8596 [ALC255_FIXUP_ASUS_MIC_NO_PRESENCE] = { 8597 .type = HDA_FIXUP_PINS, 8598 .v.pins = (const struct hda_pintbl[]) { 8599 { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */ 8600 { } 8601 }, 8602 .chained = true, 8603 .chain_id = ALC255_FIXUP_HEADSET_MODE 8604 }, 8605 [ALC255_FIXUP_DELL1_MIC_NO_PRESENCE] = { 8606 .type = HDA_FIXUP_PINS, 8607 .v.pins = (const struct hda_pintbl[]) { 8608 { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */ 8609 { 0x1a, 0x01a1913d }, /* use as headphone mic, without its own jack detect */ 8610 { } 8611 }, 8612 .chained = true, 8613 .chain_id = ALC255_FIXUP_HEADSET_MODE 8614 }, 8615 [ALC255_FIXUP_DELL1_LIMIT_INT_MIC_BOOST] = { 8616 .type = HDA_FIXUP_FUNC, 8617 .v.func = alc269_fixup_limit_int_mic_boost, 8618 .chained = true, 8619 .chain_id = ALC255_FIXUP_DELL1_MIC_NO_PRESENCE 8620 }, 8621 [ALC255_FIXUP_DELL2_MIC_NO_PRESENCE] = { 8622 .type = HDA_FIXUP_PINS, 8623 .v.pins = (const struct hda_pintbl[]) { 8624 { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */ 8625 { } 8626 }, 8627 .chained = true, 8628 .chain_id = ALC255_FIXUP_HEADSET_MODE_NO_HP_MIC 8629 }, 8630 [ALC255_FIXUP_HEADSET_MODE] = { 8631 .type = HDA_FIXUP_FUNC, 8632 .v.func = alc_fixup_headset_mode_alc255, 8633 .chained = true, 8634 .chain_id = ALC255_FIXUP_MIC_MUTE_LED 8635 }, 8636 [ALC255_FIXUP_HEADSET_MODE_NO_HP_MIC] = { 8637 .type = HDA_FIXUP_FUNC, 8638 .v.func = alc_fixup_headset_mode_alc255_no_hp_mic, 8639 }, 8640 [ALC293_FIXUP_DELL1_MIC_NO_PRESENCE] = { 8641 .type = HDA_FIXUP_PINS, 8642 .v.pins = (const struct hda_pintbl[]) { 8643 { 0x18, 0x01a1913d }, /* use as headphone mic, without its own jack detect */ 8644 { 0x1a, 0x01a1913c }, /* use as headset mic, without its own jack detect */ 8645 { } 8646 }, 8647 .chained = true, 8648 .chain_id = ALC269_FIXUP_HEADSET_MODE 8649 }, 8650 [ALC292_FIXUP_TPT440_DOCK] = { 8651 .type = HDA_FIXUP_FUNC, 8652 .v.func = alc_fixup_tpt440_dock, 8653 .chained = true, 8654 .chain_id = ALC269_FIXUP_LIMIT_INT_MIC_BOOST 8655 }, 8656 [ALC292_FIXUP_TPT440] = { 8657 .type = HDA_FIXUP_FUNC, 8658 .v.func = alc_fixup_disable_aamix, 8659 .chained = true, 8660 .chain_id = ALC292_FIXUP_TPT440_DOCK, 8661 }, 8662 [ALC283_FIXUP_HEADSET_MIC] = { 8663 .type = HDA_FIXUP_PINS, 8664 .v.pins = (const struct hda_pintbl[]) { 8665 { 0x19, 0x04a110f0 }, 8666 { }, 8667 }, 8668 }, 8669 [ALC255_FIXUP_MIC_MUTE_LED] = { 8670 .type = HDA_FIXUP_FUNC, 8671 .v.func = alc_fixup_micmute_led, 8672 }, 8673 [ALC282_FIXUP_ASPIRE_V5_PINS] = { 8674 .type = HDA_FIXUP_PINS, 8675 .v.pins = (const struct hda_pintbl[]) { 8676 { 0x12, 0x90a60130 }, 8677 { 0x14, 0x90170110 }, 8678 { 0x17, 0x40000008 }, 8679 { 0x18, 0x411111f0 }, 8680 { 0x19, 0x01a1913c }, 8681 { 0x1a, 0x411111f0 }, 8682 { 0x1b, 0x411111f0 }, 8683 { 0x1d, 0x40f89b2d }, 8684 { 0x1e, 0x411111f0 }, 8685 { 0x21, 0x0321101f }, 8686 { }, 8687 }, 8688 }, 8689 [ALC269VB_FIXUP_ASPIRE_E1_COEF] = { 8690 .type = HDA_FIXUP_FUNC, 8691 .v.func = alc269vb_fixup_aspire_e1_coef, 8692 }, 8693 [ALC280_FIXUP_HP_GPIO4] = { 8694 .type = HDA_FIXUP_FUNC, 8695 .v.func = alc280_fixup_hp_gpio4, 8696 }, 8697 [ALC286_FIXUP_HP_GPIO_LED] = { 8698 .type = HDA_FIXUP_FUNC, 8699 .v.func = alc286_fixup_hp_gpio_led, 8700 }, 8701 [ALC280_FIXUP_HP_GPIO2_MIC_HOTKEY] = { 8702 .type = HDA_FIXUP_FUNC, 8703 .v.func = alc280_fixup_hp_gpio2_mic_hotkey, 8704 }, 8705 [ALC280_FIXUP_HP_DOCK_PINS] = { 8706 .type = HDA_FIXUP_PINS, 8707 .v.pins = (const struct hda_pintbl[]) { 8708 { 0x1b, 0x21011020 }, /* line-out */ 8709 { 0x1a, 0x01a1903c }, /* headset mic */ 8710 { 0x18, 0x2181103f }, /* line-in */ 8711 { }, 8712 }, 8713 .chained = true, 8714 .chain_id = ALC280_FIXUP_HP_GPIO4 8715 }, 8716 [ALC269_FIXUP_HP_DOCK_GPIO_MIC1_LED] = { 8717 .type = HDA_FIXUP_PINS, 8718 .v.pins = (const struct hda_pintbl[]) { 8719 { 0x1b, 0x21011020 }, /* line-out */ 8720 { 0x18, 0x2181103f }, /* line-in */ 8721 { }, 8722 }, 8723 .chained = true, 8724 .chain_id = ALC269_FIXUP_HP_GPIO_MIC1_LED 8725 }, 8726 [ALC280_FIXUP_HP_9480M] = { 8727 .type = HDA_FIXUP_FUNC, 8728 .v.func = alc280_fixup_hp_9480m, 8729 }, 8730 [ALC245_FIXUP_HP_X360_AMP] = { 8731 .type = HDA_FIXUP_FUNC, 8732 .v.func = alc245_fixup_hp_x360_amp, 8733 .chained = true, 8734 .chain_id = ALC245_FIXUP_HP_GPIO_LED 8735 }, 8736 [ALC288_FIXUP_DELL_HEADSET_MODE] = { 8737 .type = HDA_FIXUP_FUNC, 8738 .v.func = alc_fixup_headset_mode_dell_alc288, 8739 .chained = true, 8740 .chain_id = ALC255_FIXUP_MIC_MUTE_LED 8741 }, 8742 [ALC288_FIXUP_DELL1_MIC_NO_PRESENCE] = { 8743 .type = HDA_FIXUP_PINS, 8744 .v.pins = (const struct hda_pintbl[]) { 8745 { 0x18, 0x01a1913c }, /* use as headset mic, without its own jack detect */ 8746 { 0x1a, 0x01a1913d }, /* use as headphone mic, without its own jack detect */ 8747 { } 8748 }, 8749 .chained = true, 8750 .chain_id = ALC288_FIXUP_DELL_HEADSET_MODE 8751 }, 8752 [ALC288_FIXUP_DISABLE_AAMIX] = { 8753 .type = HDA_FIXUP_FUNC, 8754 .v.func = alc_fixup_disable_aamix, 8755 .chained = true, 8756 .chain_id = ALC288_FIXUP_DELL1_MIC_NO_PRESENCE 8757 }, 8758 [ALC288_FIXUP_DELL_XPS_13] = { 8759 .type = HDA_FIXUP_FUNC, 8760 .v.func = alc_fixup_dell_xps13, 8761 .chained = true, 8762 .chain_id = ALC288_FIXUP_DISABLE_AAMIX 8763 }, 8764 [ALC292_FIXUP_DISABLE_AAMIX] = { 8765 .type = HDA_FIXUP_FUNC, 8766 .v.func = alc_fixup_disable_aamix, 8767 .chained = true, 8768 .chain_id = ALC269_FIXUP_DELL2_MIC_NO_PRESENCE 8769 }, 8770 [ALC293_FIXUP_DISABLE_AAMIX_MULTIJACK] = { 8771 .type = HDA_FIXUP_FUNC, 8772 .v.func = alc_fixup_disable_aamix, 8773 .chained = true, 8774 .chain_id = ALC293_FIXUP_DELL1_MIC_NO_PRESENCE 8775 }, 8776 [ALC292_FIXUP_DELL_E7X_AAMIX] = { 8777 .type = HDA_FIXUP_FUNC, 8778 .v.func = alc_fixup_dell_xps13, 8779 .chained = true, 8780 .chain_id = ALC292_FIXUP_DISABLE_AAMIX 8781 }, 8782 [ALC292_FIXUP_DELL_E7X] = { 8783 .type = HDA_FIXUP_FUNC, 8784 .v.func = alc_fixup_micmute_led, 8785 /* micmute fixup must be applied at last */ 8786 .chained_before = true, 8787 .chain_id = ALC292_FIXUP_DELL_E7X_AAMIX, 8788 }, 8789 [ALC298_FIXUP_ALIENWARE_MIC_NO_PRESENCE] = { 8790 .type = HDA_FIXUP_PINS, 8791 .v.pins = (const struct hda_pintbl[]) { 8792 { 0x18, 0x01a1913c }, /* headset mic w/o jack detect */ 8793 { } 8794 }, 8795 .chained_before = true, 8796 .chain_id = ALC269_FIXUP_HEADSET_MODE, 8797 }, 8798 [ALC298_FIXUP_DELL1_MIC_NO_PRESENCE] = { 8799 .type = HDA_FIXUP_PINS, 8800 .v.pins = (const struct hda_pintbl[]) { 8801 { 0x18, 0x01a1913c }, /* use as headset mic, without its own jack detect */ 8802 { 0x1a, 0x01a1913d }, /* use as headphone mic, without its own jack detect */ 8803 { } 8804 }, 8805 .chained = true, 8806 .chain_id = ALC269_FIXUP_HEADSET_MODE 8807 }, 8808 [ALC298_FIXUP_DELL_AIO_MIC_NO_PRESENCE] = { 8809 .type = HDA_FIXUP_PINS, 8810 .v.pins = (const struct hda_pintbl[]) { 8811 { 0x18, 0x01a1913c }, /* use as headset mic, without its own jack detect */ 8812 { } 8813 }, 8814 .chained = true, 8815 .chain_id = ALC269_FIXUP_HEADSET_MODE 8816 }, 8817 [ALC275_FIXUP_DELL_XPS] = { 8818 .type = HDA_FIXUP_VERBS, 8819 .v.verbs = (const struct hda_verb[]) { 8820 /* Enables internal speaker */ 8821 {0x20, AC_VERB_SET_COEF_INDEX, 0x1f}, 8822 {0x20, AC_VERB_SET_PROC_COEF, 0x00c0}, 8823 {0x20, AC_VERB_SET_COEF_INDEX, 0x30}, 8824 {0x20, AC_VERB_SET_PROC_COEF, 0x00b1}, 8825 {} 8826 } 8827 }, 8828 [ALC293_FIXUP_LENOVO_SPK_NOISE] = { 8829 .type = HDA_FIXUP_FUNC, 8830 .v.func = alc_fixup_disable_aamix, 8831 .chained = true, 8832 .chain_id = ALC269_FIXUP_THINKPAD_ACPI 8833 }, 8834 [ALC233_FIXUP_LENOVO_LINE2_MIC_HOTKEY] = { 8835 .type = HDA_FIXUP_FUNC, 8836 .v.func = alc233_fixup_lenovo_line2_mic_hotkey, 8837 }, 8838 [ALC233_FIXUP_LENOVO_L2MH_LOW_ENLED] = { 8839 .type = HDA_FIXUP_FUNC, 8840 .v.func = alc233_fixup_lenovo_low_en_micmute_led, 8841 }, 8842 [ALC233_FIXUP_INTEL_NUC8_DMIC] = { 8843 .type = HDA_FIXUP_FUNC, 8844 .v.func = alc_fixup_inv_dmic, 8845 .chained = true, 8846 .chain_id = ALC233_FIXUP_INTEL_NUC8_BOOST, 8847 }, 8848 [ALC233_FIXUP_INTEL_NUC8_BOOST] = { 8849 .type = HDA_FIXUP_FUNC, 8850 .v.func = alc269_fixup_limit_int_mic_boost 8851 }, 8852 [ALC255_FIXUP_DELL_SPK_NOISE] = { 8853 .type = HDA_FIXUP_FUNC, 8854 .v.func = alc_fixup_disable_aamix, 8855 .chained = true, 8856 .chain_id = ALC255_FIXUP_DELL1_MIC_NO_PRESENCE 8857 }, 8858 [ALC225_FIXUP_DISABLE_MIC_VREF] = { 8859 .type = HDA_FIXUP_FUNC, 8860 .v.func = alc_fixup_disable_mic_vref, 8861 .chained = true, 8862 .chain_id = ALC269_FIXUP_DELL1_MIC_NO_PRESENCE 8863 }, 8864 [ALC225_FIXUP_DELL1_MIC_NO_PRESENCE] = { 8865 .type = HDA_FIXUP_VERBS, 8866 .v.verbs = (const struct hda_verb[]) { 8867 /* Disable pass-through path for FRONT 14h */ 8868 { 0x20, AC_VERB_SET_COEF_INDEX, 0x36 }, 8869 { 0x20, AC_VERB_SET_PROC_COEF, 0x57d7 }, 8870 {} 8871 }, 8872 .chained = true, 8873 .chain_id = ALC225_FIXUP_DISABLE_MIC_VREF 8874 }, 8875 [ALC280_FIXUP_HP_HEADSET_MIC] = { 8876 .type = HDA_FIXUP_FUNC, 8877 .v.func = alc_fixup_disable_aamix, 8878 .chained = true, 8879 .chain_id = ALC269_FIXUP_HEADSET_MIC, 8880 }, 8881 [ALC221_FIXUP_HP_FRONT_MIC] = { 8882 .type = HDA_FIXUP_PINS, 8883 .v.pins = (const struct hda_pintbl[]) { 8884 { 0x19, 0x02a19020 }, /* Front Mic */ 8885 { } 8886 }, 8887 }, 8888 [ALC292_FIXUP_TPT460] = { 8889 .type = HDA_FIXUP_FUNC, 8890 .v.func = alc_fixup_tpt440_dock, 8891 .chained = true, 8892 .chain_id = ALC293_FIXUP_LENOVO_SPK_NOISE, 8893 }, 8894 [ALC298_FIXUP_SPK_VOLUME] = { 8895 .type = HDA_FIXUP_FUNC, 8896 .v.func = alc298_fixup_speaker_volume, 8897 .chained = true, 8898 .chain_id = ALC298_FIXUP_DELL_AIO_MIC_NO_PRESENCE, 8899 }, 8900 [ALC298_FIXUP_LENOVO_SPK_VOLUME] = { 8901 .type = HDA_FIXUP_FUNC, 8902 .v.func = alc298_fixup_speaker_volume, 8903 }, 8904 [ALC295_FIXUP_DISABLE_DAC3] = { 8905 .type = HDA_FIXUP_FUNC, 8906 .v.func = alc295_fixup_disable_dac3, 8907 }, 8908 [ALC285_FIXUP_SPEAKER2_TO_DAC1] = { 8909 .type = HDA_FIXUP_FUNC, 8910 .v.func = alc285_fixup_speaker2_to_dac1, 8911 .chained = true, 8912 .chain_id = ALC269_FIXUP_THINKPAD_ACPI 8913 }, 8914 [ALC285_FIXUP_ASUS_SPEAKER2_TO_DAC1] = { 8915 .type = HDA_FIXUP_FUNC, 8916 .v.func = alc285_fixup_speaker2_to_dac1, 8917 .chained = true, 8918 .chain_id = ALC245_FIXUP_CS35L41_SPI_2 8919 }, 8920 [ALC285_FIXUP_ASUS_HEADSET_MIC] = { 8921 .type = HDA_FIXUP_PINS, 8922 .v.pins = (const struct hda_pintbl[]) { 8923 { 0x19, 0x03a11050 }, 8924 { 0x1b, 0x03a11c30 }, 8925 { } 8926 }, 8927 .chained = true, 8928 .chain_id = ALC285_FIXUP_ASUS_SPEAKER2_TO_DAC1 8929 }, 8930 [ALC285_FIXUP_ASUS_SPI_REAR_SPEAKERS] = { 8931 .type = HDA_FIXUP_PINS, 8932 .v.pins = (const struct hda_pintbl[]) { 8933 { 0x14, 0x90170120 }, 8934 { } 8935 }, 8936 .chained = true, 8937 .chain_id = ALC285_FIXUP_ASUS_HEADSET_MIC 8938 }, 8939 [ALC285_FIXUP_ASUS_I2C_SPEAKER2_TO_DAC1] = { 8940 .type = HDA_FIXUP_FUNC, 8941 .v.func = alc285_fixup_speaker2_to_dac1, 8942 .chained = true, 8943 .chain_id = ALC287_FIXUP_CS35L41_I2C_2 8944 }, 8945 [ALC285_FIXUP_ASUS_I2C_HEADSET_MIC] = { 8946 .type = HDA_FIXUP_PINS, 8947 .v.pins = (const struct hda_pintbl[]) { 8948 { 0x19, 0x03a11050 }, 8949 { 0x1b, 0x03a11c30 }, 8950 { } 8951 }, 8952 .chained = true, 8953 .chain_id = ALC285_FIXUP_ASUS_I2C_SPEAKER2_TO_DAC1 8954 }, 8955 [ALC256_FIXUP_DELL_INSPIRON_7559_SUBWOOFER] = { 8956 .type = HDA_FIXUP_PINS, 8957 .v.pins = (const struct hda_pintbl[]) { 8958 { 0x1b, 0x90170151 }, 8959 { } 8960 }, 8961 .chained = true, 8962 .chain_id = ALC255_FIXUP_DELL1_MIC_NO_PRESENCE 8963 }, 8964 [ALC269_FIXUP_ATIV_BOOK_8] = { 8965 .type = HDA_FIXUP_FUNC, 8966 .v.func = alc_fixup_auto_mute_via_amp, 8967 .chained = true, 8968 .chain_id = ALC269_FIXUP_NO_SHUTUP 8969 }, 8970 [ALC221_FIXUP_HP_288PRO_MIC_NO_PRESENCE] = { 8971 .type = HDA_FIXUP_PINS, 8972 .v.pins = (const struct hda_pintbl[]) { 8973 { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */ 8974 { 0x1a, 0x01813030 }, /* use as headphone mic, without its own jack detect */ 8975 { } 8976 }, 8977 .chained = true, 8978 .chain_id = ALC269_FIXUP_HEADSET_MODE 8979 }, 8980 [ALC221_FIXUP_HP_MIC_NO_PRESENCE] = { 8981 .type = HDA_FIXUP_PINS, 8982 .v.pins = (const struct hda_pintbl[]) { 8983 { 0x18, 0x01a1913c }, /* use as headset mic, without its own jack detect */ 8984 { 0x1a, 0x01a1913d }, /* use as headphone mic, without its own jack detect */ 8985 { } 8986 }, 8987 .chained = true, 8988 .chain_id = ALC269_FIXUP_HEADSET_MODE 8989 }, 8990 [ALC256_FIXUP_ASUS_HEADSET_MODE] = { 8991 .type = HDA_FIXUP_FUNC, 8992 .v.func = alc_fixup_headset_mode, 8993 }, 8994 [ALC256_FIXUP_ASUS_MIC] = { 8995 .type = HDA_FIXUP_PINS, 8996 .v.pins = (const struct hda_pintbl[]) { 8997 { 0x13, 0x90a60160 }, /* use as internal mic */ 8998 { 0x19, 0x04a11120 }, /* use as headset mic, without its own jack detect */ 8999 { } 9000 }, 9001 .chained = true, 9002 .chain_id = ALC256_FIXUP_ASUS_HEADSET_MODE 9003 }, 9004 [ALC256_FIXUP_ASUS_AIO_GPIO2] = { 9005 .type = HDA_FIXUP_FUNC, 9006 /* Set up GPIO2 for the speaker amp */ 9007 .v.func = alc_fixup_gpio4, 9008 }, 9009 [ALC233_FIXUP_ASUS_MIC_NO_PRESENCE] = { 9010 .type = HDA_FIXUP_PINS, 9011 .v.pins = (const struct hda_pintbl[]) { 9012 { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */ 9013 { } 9014 }, 9015 .chained = true, 9016 .chain_id = ALC269_FIXUP_HEADSET_MIC 9017 }, 9018 [ALC233_FIXUP_EAPD_COEF_AND_MIC_NO_PRESENCE] = { 9019 .type = HDA_FIXUP_VERBS, 9020 .v.verbs = (const struct hda_verb[]) { 9021 /* Enables internal speaker */ 9022 {0x20, AC_VERB_SET_COEF_INDEX, 0x40}, 9023 {0x20, AC_VERB_SET_PROC_COEF, 0x8800}, 9024 {} 9025 }, 9026 .chained = true, 9027 .chain_id = ALC233_FIXUP_ASUS_MIC_NO_PRESENCE 9028 }, 9029 [ALC233_FIXUP_LENOVO_MULTI_CODECS] = { 9030 .type = HDA_FIXUP_FUNC, 9031 .v.func = alc233_alc662_fixup_lenovo_dual_codecs, 9032 .chained = true, 9033 .chain_id = ALC269_FIXUP_GPIO2 9034 }, 9035 [ALC233_FIXUP_ACER_HEADSET_MIC] = { 9036 .type = HDA_FIXUP_VERBS, 9037 .v.verbs = (const struct hda_verb[]) { 9038 { 0x20, AC_VERB_SET_COEF_INDEX, 0x45 }, 9039 { 0x20, AC_VERB_SET_PROC_COEF, 0x5089 }, 9040 { } 9041 }, 9042 .chained = true, 9043 .chain_id = ALC233_FIXUP_ASUS_MIC_NO_PRESENCE 9044 }, 9045 [ALC294_FIXUP_LENOVO_MIC_LOCATION] = { 9046 .type = HDA_FIXUP_PINS, 9047 .v.pins = (const struct hda_pintbl[]) { 9048 /* Change the mic location from front to right, otherwise there are 9049 two front mics with the same name, pulseaudio can't handle them. 9050 This is just a temporary workaround, after applying this fixup, 9051 there will be one "Front Mic" and one "Mic" in this machine. 9052 */ 9053 { 0x1a, 0x04a19040 }, 9054 { } 9055 }, 9056 }, 9057 [ALC225_FIXUP_DELL_WYSE_MIC_NO_PRESENCE] = { 9058 .type = HDA_FIXUP_PINS, 9059 .v.pins = (const struct hda_pintbl[]) { 9060 { 0x16, 0x0101102f }, /* Rear Headset HP */ 9061 { 0x19, 0x02a1913c }, /* use as Front headset mic, without its own jack detect */ 9062 { 0x1a, 0x01a19030 }, /* Rear Headset MIC */ 9063 { 0x1b, 0x02011020 }, 9064 { } 9065 }, 9066 .chained = true, 9067 .chain_id = ALC225_FIXUP_S3_POP_NOISE 9068 }, 9069 [ALC225_FIXUP_S3_POP_NOISE] = { 9070 .type = HDA_FIXUP_FUNC, 9071 .v.func = alc225_fixup_s3_pop_noise, 9072 .chained = true, 9073 .chain_id = ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC 9074 }, 9075 [ALC700_FIXUP_INTEL_REFERENCE] = { 9076 .type = HDA_FIXUP_VERBS, 9077 .v.verbs = (const struct hda_verb[]) { 9078 /* Enables internal speaker */ 9079 {0x20, AC_VERB_SET_COEF_INDEX, 0x45}, 9080 {0x20, AC_VERB_SET_PROC_COEF, 0x5289}, 9081 {0x20, AC_VERB_SET_COEF_INDEX, 0x4A}, 9082 {0x20, AC_VERB_SET_PROC_COEF, 0x001b}, 9083 {0x58, AC_VERB_SET_COEF_INDEX, 0x00}, 9084 {0x58, AC_VERB_SET_PROC_COEF, 0x3888}, 9085 {0x20, AC_VERB_SET_COEF_INDEX, 0x6f}, 9086 {0x20, AC_VERB_SET_PROC_COEF, 0x2c0b}, 9087 {} 9088 } 9089 }, 9090 [ALC274_FIXUP_DELL_BIND_DACS] = { 9091 .type = HDA_FIXUP_FUNC, 9092 .v.func = alc274_fixup_bind_dacs, 9093 .chained = true, 9094 .chain_id = ALC269_FIXUP_DELL1_MIC_NO_PRESENCE 9095 }, 9096 [ALC274_FIXUP_DELL_AIO_LINEOUT_VERB] = { 9097 .type = HDA_FIXUP_PINS, 9098 .v.pins = (const struct hda_pintbl[]) { 9099 { 0x1b, 0x0401102f }, 9100 { } 9101 }, 9102 .chained = true, 9103 .chain_id = ALC274_FIXUP_DELL_BIND_DACS 9104 }, 9105 [ALC298_FIXUP_TPT470_DOCK_FIX] = { 9106 .type = HDA_FIXUP_FUNC, 9107 .v.func = alc_fixup_tpt470_dock, 9108 .chained = true, 9109 .chain_id = ALC293_FIXUP_LENOVO_SPK_NOISE 9110 }, 9111 [ALC298_FIXUP_TPT470_DOCK] = { 9112 .type = HDA_FIXUP_FUNC, 9113 .v.func = alc_fixup_tpt470_dacs, 9114 .chained = true, 9115 .chain_id = ALC298_FIXUP_TPT470_DOCK_FIX 9116 }, 9117 [ALC255_FIXUP_DUMMY_LINEOUT_VERB] = { 9118 .type = HDA_FIXUP_PINS, 9119 .v.pins = (const struct hda_pintbl[]) { 9120 { 0x14, 0x0201101f }, 9121 { } 9122 }, 9123 .chained = true, 9124 .chain_id = ALC255_FIXUP_DELL1_MIC_NO_PRESENCE 9125 }, 9126 [ALC255_FIXUP_DELL_HEADSET_MIC] = { 9127 .type = HDA_FIXUP_PINS, 9128 .v.pins = (const struct hda_pintbl[]) { 9129 { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */ 9130 { } 9131 }, 9132 .chained = true, 9133 .chain_id = ALC269_FIXUP_HEADSET_MIC 9134 }, 9135 [ALC295_FIXUP_HP_X360] = { 9136 .type = HDA_FIXUP_FUNC, 9137 .v.func = alc295_fixup_hp_top_speakers, 9138 .chained = true, 9139 .chain_id = ALC269_FIXUP_HP_MUTE_LED_MIC3 9140 }, 9141 [ALC221_FIXUP_HP_HEADSET_MIC] = { 9142 .type = HDA_FIXUP_PINS, 9143 .v.pins = (const struct hda_pintbl[]) { 9144 { 0x19, 0x0181313f}, 9145 { } 9146 }, 9147 .chained = true, 9148 .chain_id = ALC269_FIXUP_HEADSET_MIC 9149 }, 9150 [ALC285_FIXUP_LENOVO_HEADPHONE_NOISE] = { 9151 .type = HDA_FIXUP_FUNC, 9152 .v.func = alc285_fixup_invalidate_dacs, 9153 .chained = true, 9154 .chain_id = ALC269_FIXUP_THINKPAD_ACPI 9155 }, 9156 [ALC295_FIXUP_HP_AUTO_MUTE] = { 9157 .type = HDA_FIXUP_FUNC, 9158 .v.func = alc_fixup_auto_mute_via_amp, 9159 }, 9160 [ALC286_FIXUP_ACER_AIO_MIC_NO_PRESENCE] = { 9161 .type = HDA_FIXUP_PINS, 9162 .v.pins = (const struct hda_pintbl[]) { 9163 { 0x18, 0x01a1913c }, /* use as headset mic, without its own jack detect */ 9164 { } 9165 }, 9166 .chained = true, 9167 .chain_id = ALC269_FIXUP_HEADSET_MIC 9168 }, 9169 [ALC294_FIXUP_ASUS_MIC] = { 9170 .type = HDA_FIXUP_PINS, 9171 .v.pins = (const struct hda_pintbl[]) { 9172 { 0x13, 0x90a60160 }, /* use as internal mic */ 9173 { 0x19, 0x04a11120 }, /* use as headset mic, without its own jack detect */ 9174 { } 9175 }, 9176 .chained = true, 9177 .chain_id = ALC269_FIXUP_HEADSET_MIC 9178 }, 9179 [ALC294_FIXUP_ASUS_HEADSET_MIC] = { 9180 .type = HDA_FIXUP_PINS, 9181 .v.pins = (const struct hda_pintbl[]) { 9182 { 0x19, 0x01a1103c }, /* use as headset mic */ 9183 { } 9184 }, 9185 .chained = true, 9186 .chain_id = ALC269_FIXUP_HEADSET_MIC 9187 }, 9188 [ALC294_FIXUP_ASUS_SPK] = { 9189 .type = HDA_FIXUP_VERBS, 9190 .v.verbs = (const struct hda_verb[]) { 9191 /* Set EAPD high */ 9192 { 0x20, AC_VERB_SET_COEF_INDEX, 0x40 }, 9193 { 0x20, AC_VERB_SET_PROC_COEF, 0x8800 }, 9194 { 0x20, AC_VERB_SET_COEF_INDEX, 0x0f }, 9195 { 0x20, AC_VERB_SET_PROC_COEF, 0x7774 }, 9196 { } 9197 }, 9198 .chained = true, 9199 .chain_id = ALC294_FIXUP_ASUS_HEADSET_MIC 9200 }, 9201 [ALC295_FIXUP_CHROME_BOOK] = { 9202 .type = HDA_FIXUP_FUNC, 9203 .v.func = alc295_fixup_chromebook, 9204 .chained = true, 9205 .chain_id = ALC225_FIXUP_HEADSET_JACK 9206 }, 9207 [ALC225_FIXUP_HEADSET_JACK] = { 9208 .type = HDA_FIXUP_FUNC, 9209 .v.func = alc_fixup_headset_jack, 9210 }, 9211 [ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE] = { 9212 .type = HDA_FIXUP_PINS, 9213 .v.pins = (const struct hda_pintbl[]) { 9214 { 0x1a, 0x01a1913c }, /* use as headset mic, without its own jack detect */ 9215 { } 9216 }, 9217 .chained = true, 9218 .chain_id = ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC 9219 }, 9220 [ALC285_FIXUP_LENOVO_PC_BEEP_IN_NOISE] = { 9221 .type = HDA_FIXUP_VERBS, 9222 .v.verbs = (const struct hda_verb[]) { 9223 /* Disable PCBEEP-IN passthrough */ 9224 { 0x20, AC_VERB_SET_COEF_INDEX, 0x36 }, 9225 { 0x20, AC_VERB_SET_PROC_COEF, 0x57d7 }, 9226 { } 9227 }, 9228 .chained = true, 9229 .chain_id = ALC285_FIXUP_LENOVO_HEADPHONE_NOISE 9230 }, 9231 [ALC255_FIXUP_ACER_HEADSET_MIC] = { 9232 .type = HDA_FIXUP_PINS, 9233 .v.pins = (const struct hda_pintbl[]) { 9234 { 0x19, 0x03a11130 }, 9235 { 0x1a, 0x90a60140 }, /* use as internal mic */ 9236 { } 9237 }, 9238 .chained = true, 9239 .chain_id = ALC255_FIXUP_HEADSET_MODE_NO_HP_MIC 9240 }, 9241 [ALC225_FIXUP_DELL_WYSE_AIO_MIC_NO_PRESENCE] = { 9242 .type = HDA_FIXUP_PINS, 9243 .v.pins = (const struct hda_pintbl[]) { 9244 { 0x16, 0x01011020 }, /* Rear Line out */ 9245 { 0x19, 0x01a1913c }, /* use as Front headset mic, without its own jack detect */ 9246 { } 9247 }, 9248 .chained = true, 9249 .chain_id = ALC225_FIXUP_WYSE_AUTO_MUTE 9250 }, 9251 [ALC225_FIXUP_WYSE_AUTO_MUTE] = { 9252 .type = HDA_FIXUP_FUNC, 9253 .v.func = alc_fixup_auto_mute_via_amp, 9254 .chained = true, 9255 .chain_id = ALC225_FIXUP_WYSE_DISABLE_MIC_VREF 9256 }, 9257 [ALC225_FIXUP_WYSE_DISABLE_MIC_VREF] = { 9258 .type = HDA_FIXUP_FUNC, 9259 .v.func = alc_fixup_disable_mic_vref, 9260 .chained = true, 9261 .chain_id = ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC 9262 }, 9263 [ALC286_FIXUP_ACER_AIO_HEADSET_MIC] = { 9264 .type = HDA_FIXUP_VERBS, 9265 .v.verbs = (const struct hda_verb[]) { 9266 { 0x20, AC_VERB_SET_COEF_INDEX, 0x4f }, 9267 { 0x20, AC_VERB_SET_PROC_COEF, 0x5029 }, 9268 { } 9269 }, 9270 .chained = true, 9271 .chain_id = ALC286_FIXUP_ACER_AIO_MIC_NO_PRESENCE 9272 }, 9273 [ALC256_FIXUP_ASUS_HEADSET_MIC] = { 9274 .type = HDA_FIXUP_PINS, 9275 .v.pins = (const struct hda_pintbl[]) { 9276 { 0x19, 0x03a11020 }, /* headset mic with jack detect */ 9277 { } 9278 }, 9279 .chained = true, 9280 .chain_id = ALC256_FIXUP_ASUS_HEADSET_MODE 9281 }, 9282 [ALC256_FIXUP_ASUS_MIC_NO_PRESENCE] = { 9283 .type = HDA_FIXUP_PINS, 9284 .v.pins = (const struct hda_pintbl[]) { 9285 { 0x19, 0x04a11120 }, /* use as headset mic, without its own jack detect */ 9286 { } 9287 }, 9288 .chained = true, 9289 .chain_id = ALC256_FIXUP_ASUS_HEADSET_MODE 9290 }, 9291 [ALC255_FIXUP_PREDATOR_SUBWOOFER] = { 9292 .type = HDA_FIXUP_PINS, 9293 .v.pins = (const struct hda_pintbl[]) { 9294 { 0x17, 0x90170151 }, /* use as internal speaker (LFE) */ 9295 { 0x1b, 0x90170152 } /* use as internal speaker (back) */ 9296 } 9297 }, 9298 [ALC299_FIXUP_PREDATOR_SPK] = { 9299 .type = HDA_FIXUP_PINS, 9300 .v.pins = (const struct hda_pintbl[]) { 9301 { 0x21, 0x90170150 }, /* use as headset mic, without its own jack detect */ 9302 { } 9303 } 9304 }, 9305 [ALC287_FIXUP_PREDATOR_SPK_CS35L41_I2C_2] = { 9306 .type = HDA_FIXUP_FUNC, 9307 .v.func = cs35l41_fixup_i2c_two, 9308 .chained = true, 9309 .chain_id = ALC255_FIXUP_PREDATOR_SUBWOOFER 9310 }, 9311 [ALC256_FIXUP_MEDION_HEADSET_NO_PRESENCE] = { 9312 .type = HDA_FIXUP_PINS, 9313 .v.pins = (const struct hda_pintbl[]) { 9314 { 0x19, 0x04a11040 }, 9315 { 0x21, 0x04211020 }, 9316 { } 9317 }, 9318 .chained = true, 9319 .chain_id = ALC256_FIXUP_ASUS_HEADSET_MODE 9320 }, 9321 [ALC289_FIXUP_DELL_SPK1] = { 9322 .type = HDA_FIXUP_PINS, 9323 .v.pins = (const struct hda_pintbl[]) { 9324 { 0x14, 0x90170140 }, 9325 { } 9326 }, 9327 .chained = true, 9328 .chain_id = ALC269_FIXUP_DELL4_MIC_NO_PRESENCE 9329 }, 9330 [ALC289_FIXUP_DELL_SPK2] = { 9331 .type = HDA_FIXUP_PINS, 9332 .v.pins = (const struct hda_pintbl[]) { 9333 { 0x17, 0x90170130 }, /* bass spk */ 9334 { } 9335 }, 9336 .chained = true, 9337 .chain_id = ALC269_FIXUP_DELL4_MIC_NO_PRESENCE 9338 }, 9339 [ALC289_FIXUP_DUAL_SPK] = { 9340 .type = HDA_FIXUP_FUNC, 9341 .v.func = alc285_fixup_speaker2_to_dac1, 9342 .chained = true, 9343 .chain_id = ALC289_FIXUP_DELL_SPK2 9344 }, 9345 [ALC289_FIXUP_RTK_AMP_DUAL_SPK] = { 9346 .type = HDA_FIXUP_FUNC, 9347 .v.func = alc285_fixup_speaker2_to_dac1, 9348 .chained = true, 9349 .chain_id = ALC289_FIXUP_DELL_SPK1 9350 }, 9351 [ALC294_FIXUP_SPK2_TO_DAC1] = { 9352 .type = HDA_FIXUP_FUNC, 9353 .v.func = alc285_fixup_speaker2_to_dac1, 9354 .chained = true, 9355 .chain_id = ALC294_FIXUP_ASUS_HEADSET_MIC 9356 }, 9357 [ALC294_FIXUP_ASUS_DUAL_SPK] = { 9358 .type = HDA_FIXUP_FUNC, 9359 /* The GPIO must be pulled to initialize the AMP */ 9360 .v.func = alc_fixup_gpio4, 9361 .chained = true, 9362 .chain_id = ALC294_FIXUP_SPK2_TO_DAC1 9363 }, 9364 [ALC294_FIXUP_ASUS_ALLY] = { 9365 .type = HDA_FIXUP_FUNC, 9366 .v.func = cs35l41_fixup_i2c_two, 9367 .chained = true, 9368 .chain_id = ALC294_FIXUP_ASUS_ALLY_PINS 9369 }, 9370 [ALC294_FIXUP_ASUS_ALLY_PINS] = { 9371 .type = HDA_FIXUP_PINS, 9372 .v.pins = (const struct hda_pintbl[]) { 9373 { 0x19, 0x03a11050 }, 9374 { 0x1a, 0x03a11c30 }, 9375 { 0x21, 0x03211420 }, 9376 { } 9377 }, 9378 .chained = true, 9379 .chain_id = ALC294_FIXUP_ASUS_ALLY_VERBS 9380 }, 9381 [ALC294_FIXUP_ASUS_ALLY_VERBS] = { 9382 .type = HDA_FIXUP_VERBS, 9383 .v.verbs = (const struct hda_verb[]) { 9384 { 0x20, AC_VERB_SET_COEF_INDEX, 0x45 }, 9385 { 0x20, AC_VERB_SET_PROC_COEF, 0x5089 }, 9386 { 0x20, AC_VERB_SET_COEF_INDEX, 0x46 }, 9387 { 0x20, AC_VERB_SET_PROC_COEF, 0x0004 }, 9388 { 0x20, AC_VERB_SET_COEF_INDEX, 0x47 }, 9389 { 0x20, AC_VERB_SET_PROC_COEF, 0xa47a }, 9390 { 0x20, AC_VERB_SET_COEF_INDEX, 0x49 }, 9391 { 0x20, AC_VERB_SET_PROC_COEF, 0x0049}, 9392 { 0x20, AC_VERB_SET_COEF_INDEX, 0x4a }, 9393 { 0x20, AC_VERB_SET_PROC_COEF, 0x201b }, 9394 { 0x20, AC_VERB_SET_COEF_INDEX, 0x6b }, 9395 { 0x20, AC_VERB_SET_PROC_COEF, 0x4278}, 9396 { } 9397 }, 9398 .chained = true, 9399 .chain_id = ALC294_FIXUP_ASUS_ALLY_SPEAKER 9400 }, 9401 [ALC294_FIXUP_ASUS_ALLY_SPEAKER] = { 9402 .type = HDA_FIXUP_FUNC, 9403 .v.func = alc285_fixup_speaker2_to_dac1, 9404 }, 9405 [ALC285_FIXUP_THINKPAD_X1_GEN7] = { 9406 .type = HDA_FIXUP_FUNC, 9407 .v.func = alc285_fixup_thinkpad_x1_gen7, 9408 .chained = true, 9409 .chain_id = ALC269_FIXUP_THINKPAD_ACPI 9410 }, 9411 [ALC285_FIXUP_THINKPAD_HEADSET_JACK] = { 9412 .type = HDA_FIXUP_FUNC, 9413 .v.func = alc_fixup_headset_jack, 9414 .chained = true, 9415 .chain_id = ALC285_FIXUP_THINKPAD_X1_GEN7 9416 }, 9417 [ALC294_FIXUP_ASUS_HPE] = { 9418 .type = HDA_FIXUP_VERBS, 9419 .v.verbs = (const struct hda_verb[]) { 9420 /* Set EAPD high */ 9421 { 0x20, AC_VERB_SET_COEF_INDEX, 0x0f }, 9422 { 0x20, AC_VERB_SET_PROC_COEF, 0x7774 }, 9423 { } 9424 }, 9425 .chained = true, 9426 .chain_id = ALC294_FIXUP_ASUS_HEADSET_MIC 9427 }, 9428 [ALC294_FIXUP_ASUS_GX502_PINS] = { 9429 .type = HDA_FIXUP_PINS, 9430 .v.pins = (const struct hda_pintbl[]) { 9431 { 0x19, 0x03a11050 }, /* front HP mic */ 9432 { 0x1a, 0x01a11830 }, /* rear external mic */ 9433 { 0x21, 0x03211020 }, /* front HP out */ 9434 { } 9435 }, 9436 .chained = true, 9437 .chain_id = ALC294_FIXUP_ASUS_GX502_VERBS 9438 }, 9439 [ALC294_FIXUP_ASUS_GX502_VERBS] = { 9440 .type = HDA_FIXUP_VERBS, 9441 .v.verbs = (const struct hda_verb[]) { 9442 /* set 0x15 to HP-OUT ctrl */ 9443 { 0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, 0xc0 }, 9444 /* unmute the 0x15 amp */ 9445 { 0x15, AC_VERB_SET_AMP_GAIN_MUTE, 0xb000 }, 9446 { } 9447 }, 9448 .chained = true, 9449 .chain_id = ALC294_FIXUP_ASUS_GX502_HP 9450 }, 9451 [ALC294_FIXUP_ASUS_GX502_HP] = { 9452 .type = HDA_FIXUP_FUNC, 9453 .v.func = alc294_fixup_gx502_hp, 9454 }, 9455 [ALC294_FIXUP_ASUS_GU502_PINS] = { 9456 .type = HDA_FIXUP_PINS, 9457 .v.pins = (const struct hda_pintbl[]) { 9458 { 0x19, 0x01a11050 }, /* rear HP mic */ 9459 { 0x1a, 0x01a11830 }, /* rear external mic */ 9460 { 0x21, 0x012110f0 }, /* rear HP out */ 9461 { } 9462 }, 9463 .chained = true, 9464 .chain_id = ALC294_FIXUP_ASUS_GU502_VERBS 9465 }, 9466 [ALC294_FIXUP_ASUS_GU502_VERBS] = { 9467 .type = HDA_FIXUP_VERBS, 9468 .v.verbs = (const struct hda_verb[]) { 9469 /* set 0x15 to HP-OUT ctrl */ 9470 { 0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, 0xc0 }, 9471 /* unmute the 0x15 amp */ 9472 { 0x15, AC_VERB_SET_AMP_GAIN_MUTE, 0xb000 }, 9473 /* set 0x1b to HP-OUT */ 9474 { 0x1b, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x24 }, 9475 { } 9476 }, 9477 .chained = true, 9478 .chain_id = ALC294_FIXUP_ASUS_GU502_HP 9479 }, 9480 [ALC294_FIXUP_ASUS_GU502_HP] = { 9481 .type = HDA_FIXUP_FUNC, 9482 .v.func = alc294_fixup_gu502_hp, 9483 }, 9484 [ALC294_FIXUP_ASUS_G513_PINS] = { 9485 .type = HDA_FIXUP_PINS, 9486 .v.pins = (const struct hda_pintbl[]) { 9487 { 0x19, 0x03a11050 }, /* front HP mic */ 9488 { 0x1a, 0x03a11c30 }, /* rear external mic */ 9489 { 0x21, 0x03211420 }, /* front HP out */ 9490 { } 9491 }, 9492 }, 9493 [ALC285_FIXUP_ASUS_G533Z_PINS] = { 9494 .type = HDA_FIXUP_PINS, 9495 .v.pins = (const struct hda_pintbl[]) { 9496 { 0x14, 0x90170152 }, /* Speaker Surround Playback Switch */ 9497 { 0x19, 0x03a19020 }, /* Mic Boost Volume */ 9498 { 0x1a, 0x03a11c30 }, /* Mic Boost Volume */ 9499 { 0x1e, 0x90170151 }, /* Rear jack, IN OUT EAPD Detect */ 9500 { 0x21, 0x03211420 }, 9501 { } 9502 }, 9503 }, 9504 [ALC294_FIXUP_ASUS_COEF_1B] = { 9505 .type = HDA_FIXUP_VERBS, 9506 .v.verbs = (const struct hda_verb[]) { 9507 /* Set bit 10 to correct noisy output after reboot from 9508 * Windows 10 (due to pop noise reduction?) 9509 */ 9510 { 0x20, AC_VERB_SET_COEF_INDEX, 0x1b }, 9511 { 0x20, AC_VERB_SET_PROC_COEF, 0x4e4b }, 9512 { } 9513 }, 9514 .chained = true, 9515 .chain_id = ALC289_FIXUP_ASUS_GA401, 9516 }, 9517 [ALC285_FIXUP_HP_GPIO_LED] = { 9518 .type = HDA_FIXUP_FUNC, 9519 .v.func = alc285_fixup_hp_gpio_led, 9520 }, 9521 [ALC285_FIXUP_HP_MUTE_LED] = { 9522 .type = HDA_FIXUP_FUNC, 9523 .v.func = alc285_fixup_hp_mute_led, 9524 }, 9525 [ALC285_FIXUP_HP_SPECTRE_X360_MUTE_LED] = { 9526 .type = HDA_FIXUP_FUNC, 9527 .v.func = alc285_fixup_hp_spectre_x360_mute_led, 9528 }, 9529 [ALC285_FIXUP_HP_BEEP_MICMUTE_LED] = { 9530 .type = HDA_FIXUP_FUNC, 9531 .v.func = alc285_fixup_hp_beep, 9532 .chained = true, 9533 .chain_id = ALC285_FIXUP_HP_MUTE_LED, 9534 }, 9535 [ALC236_FIXUP_HP_MUTE_LED_COEFBIT2] = { 9536 .type = HDA_FIXUP_FUNC, 9537 .v.func = alc236_fixup_hp_mute_led_coefbit2, 9538 }, 9539 [ALC236_FIXUP_HP_GPIO_LED] = { 9540 .type = HDA_FIXUP_FUNC, 9541 .v.func = alc236_fixup_hp_gpio_led, 9542 }, 9543 [ALC236_FIXUP_HP_MUTE_LED] = { 9544 .type = HDA_FIXUP_FUNC, 9545 .v.func = alc236_fixup_hp_mute_led, 9546 }, 9547 [ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF] = { 9548 .type = HDA_FIXUP_FUNC, 9549 .v.func = alc236_fixup_hp_mute_led_micmute_vref, 9550 }, 9551 [ALC236_FIXUP_LENOVO_INV_DMIC] = { 9552 .type = HDA_FIXUP_FUNC, 9553 .v.func = alc_fixup_inv_dmic, 9554 .chained = true, 9555 .chain_id = ALC283_FIXUP_INT_MIC, 9556 }, 9557 [ALC295_FIXUP_HP_MUTE_LED_COEFBIT11] = { 9558 .type = HDA_FIXUP_FUNC, 9559 .v.func = alc295_fixup_hp_mute_led_coefbit11, 9560 }, 9561 [ALC298_FIXUP_SAMSUNG_AMP] = { 9562 .type = HDA_FIXUP_FUNC, 9563 .v.func = alc298_fixup_samsung_amp, 9564 .chained = true, 9565 .chain_id = ALC298_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET 9566 }, 9567 [ALC298_FIXUP_SAMSUNG_AMP_V2_2_AMPS] = { 9568 .type = HDA_FIXUP_FUNC, 9569 .v.func = alc298_fixup_samsung_amp_v2_2_amps 9570 }, 9571 [ALC298_FIXUP_SAMSUNG_AMP_V2_4_AMPS] = { 9572 .type = HDA_FIXUP_FUNC, 9573 .v.func = alc298_fixup_samsung_amp_v2_4_amps 9574 }, 9575 [ALC298_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET] = { 9576 .type = HDA_FIXUP_VERBS, 9577 .v.verbs = (const struct hda_verb[]) { 9578 { 0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL, 0xc5 }, 9579 { } 9580 }, 9581 }, 9582 [ALC256_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET] = { 9583 .type = HDA_FIXUP_VERBS, 9584 .v.verbs = (const struct hda_verb[]) { 9585 { 0x20, AC_VERB_SET_COEF_INDEX, 0x08}, 9586 { 0x20, AC_VERB_SET_PROC_COEF, 0x2fcf}, 9587 { } 9588 }, 9589 }, 9590 [ALC295_FIXUP_ASUS_MIC_NO_PRESENCE] = { 9591 .type = HDA_FIXUP_PINS, 9592 .v.pins = (const struct hda_pintbl[]) { 9593 { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */ 9594 { } 9595 }, 9596 .chained = true, 9597 .chain_id = ALC269_FIXUP_HEADSET_MODE 9598 }, 9599 [ALC269VC_FIXUP_ACER_VCOPPERBOX_PINS] = { 9600 .type = HDA_FIXUP_PINS, 9601 .v.pins = (const struct hda_pintbl[]) { 9602 { 0x14, 0x90100120 }, /* use as internal speaker */ 9603 { 0x18, 0x02a111f0 }, /* use as headset mic, without its own jack detect */ 9604 { 0x1a, 0x01011020 }, /* use as line out */ 9605 { }, 9606 }, 9607 .chained = true, 9608 .chain_id = ALC269_FIXUP_HEADSET_MIC 9609 }, 9610 [ALC269VC_FIXUP_ACER_HEADSET_MIC] = { 9611 .type = HDA_FIXUP_PINS, 9612 .v.pins = (const struct hda_pintbl[]) { 9613 { 0x18, 0x02a11030 }, /* use as headset mic */ 9614 { } 9615 }, 9616 .chained = true, 9617 .chain_id = ALC269_FIXUP_HEADSET_MIC 9618 }, 9619 [ALC269VC_FIXUP_ACER_MIC_NO_PRESENCE] = { 9620 .type = HDA_FIXUP_PINS, 9621 .v.pins = (const struct hda_pintbl[]) { 9622 { 0x18, 0x01a11130 }, /* use as headset mic, without its own jack detect */ 9623 { } 9624 }, 9625 .chained = true, 9626 .chain_id = ALC269_FIXUP_HEADSET_MIC 9627 }, 9628 [ALC289_FIXUP_ASUS_GA401] = { 9629 .type = HDA_FIXUP_FUNC, 9630 .v.func = alc289_fixup_asus_ga401, 9631 .chained = true, 9632 .chain_id = ALC289_FIXUP_ASUS_GA502, 9633 }, 9634 [ALC289_FIXUP_ASUS_GA502] = { 9635 .type = HDA_FIXUP_PINS, 9636 .v.pins = (const struct hda_pintbl[]) { 9637 { 0x19, 0x03a11020 }, /* headset mic with jack detect */ 9638 { } 9639 }, 9640 }, 9641 [ALC256_FIXUP_ACER_MIC_NO_PRESENCE] = { 9642 .type = HDA_FIXUP_PINS, 9643 .v.pins = (const struct hda_pintbl[]) { 9644 { 0x19, 0x02a11120 }, /* use as headset mic, without its own jack detect */ 9645 { } 9646 }, 9647 .chained = true, 9648 .chain_id = ALC256_FIXUP_ASUS_HEADSET_MODE 9649 }, 9650 [ALC285_FIXUP_HP_GPIO_AMP_INIT] = { 9651 .type = HDA_FIXUP_FUNC, 9652 .v.func = alc285_fixup_hp_gpio_amp_init, 9653 .chained = true, 9654 .chain_id = ALC285_FIXUP_HP_GPIO_LED 9655 }, 9656 [ALC269_FIXUP_CZC_B20] = { 9657 .type = HDA_FIXUP_PINS, 9658 .v.pins = (const struct hda_pintbl[]) { 9659 { 0x12, 0x411111f0 }, 9660 { 0x14, 0x90170110 }, /* speaker */ 9661 { 0x15, 0x032f1020 }, /* HP out */ 9662 { 0x17, 0x411111f0 }, 9663 { 0x18, 0x03ab1040 }, /* mic */ 9664 { 0x19, 0xb7a7013f }, 9665 { 0x1a, 0x0181305f }, 9666 { 0x1b, 0x411111f0 }, 9667 { 0x1d, 0x411111f0 }, 9668 { 0x1e, 0x411111f0 }, 9669 { } 9670 }, 9671 .chain_id = ALC269_FIXUP_DMIC, 9672 }, 9673 [ALC269_FIXUP_CZC_TMI] = { 9674 .type = HDA_FIXUP_PINS, 9675 .v.pins = (const struct hda_pintbl[]) { 9676 { 0x12, 0x4000c000 }, 9677 { 0x14, 0x90170110 }, /* speaker */ 9678 { 0x15, 0x0421401f }, /* HP out */ 9679 { 0x17, 0x411111f0 }, 9680 { 0x18, 0x04a19020 }, /* mic */ 9681 { 0x19, 0x411111f0 }, 9682 { 0x1a, 0x411111f0 }, 9683 { 0x1b, 0x411111f0 }, 9684 { 0x1d, 0x40448505 }, 9685 { 0x1e, 0x411111f0 }, 9686 { 0x20, 0x8000ffff }, 9687 { } 9688 }, 9689 .chain_id = ALC269_FIXUP_DMIC, 9690 }, 9691 [ALC269_FIXUP_CZC_L101] = { 9692 .type = HDA_FIXUP_PINS, 9693 .v.pins = (const struct hda_pintbl[]) { 9694 { 0x12, 0x40000000 }, 9695 { 0x14, 0x01014010 }, /* speaker */ 9696 { 0x15, 0x411111f0 }, /* HP out */ 9697 { 0x16, 0x411111f0 }, 9698 { 0x18, 0x01a19020 }, /* mic */ 9699 { 0x19, 0x02a19021 }, 9700 { 0x1a, 0x0181302f }, 9701 { 0x1b, 0x0221401f }, 9702 { 0x1c, 0x411111f0 }, 9703 { 0x1d, 0x4044c601 }, 9704 { 0x1e, 0x411111f0 }, 9705 { } 9706 }, 9707 .chain_id = ALC269_FIXUP_DMIC, 9708 }, 9709 [ALC269_FIXUP_LEMOTE_A1802] = { 9710 .type = HDA_FIXUP_PINS, 9711 .v.pins = (const struct hda_pintbl[]) { 9712 { 0x12, 0x40000000 }, 9713 { 0x14, 0x90170110 }, /* speaker */ 9714 { 0x17, 0x411111f0 }, 9715 { 0x18, 0x03a19040 }, /* mic1 */ 9716 { 0x19, 0x90a70130 }, /* mic2 */ 9717 { 0x1a, 0x411111f0 }, 9718 { 0x1b, 0x411111f0 }, 9719 { 0x1d, 0x40489d2d }, 9720 { 0x1e, 0x411111f0 }, 9721 { 0x20, 0x0003ffff }, 9722 { 0x21, 0x03214020 }, 9723 { } 9724 }, 9725 .chain_id = ALC269_FIXUP_DMIC, 9726 }, 9727 [ALC269_FIXUP_LEMOTE_A190X] = { 9728 .type = HDA_FIXUP_PINS, 9729 .v.pins = (const struct hda_pintbl[]) { 9730 { 0x14, 0x99130110 }, /* speaker */ 9731 { 0x15, 0x0121401f }, /* HP out */ 9732 { 0x18, 0x01a19c20 }, /* rear mic */ 9733 { 0x19, 0x99a3092f }, /* front mic */ 9734 { 0x1b, 0x0201401f }, /* front lineout */ 9735 { } 9736 }, 9737 .chain_id = ALC269_FIXUP_DMIC, 9738 }, 9739 [ALC256_FIXUP_INTEL_NUC8_RUGGED] = { 9740 .type = HDA_FIXUP_PINS, 9741 .v.pins = (const struct hda_pintbl[]) { 9742 { 0x1b, 0x01a1913c }, /* use as headset mic, without its own jack detect */ 9743 { } 9744 }, 9745 .chained = true, 9746 .chain_id = ALC269_FIXUP_HEADSET_MODE 9747 }, 9748 [ALC256_FIXUP_INTEL_NUC10] = { 9749 .type = HDA_FIXUP_PINS, 9750 .v.pins = (const struct hda_pintbl[]) { 9751 { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */ 9752 { } 9753 }, 9754 .chained = true, 9755 .chain_id = ALC269_FIXUP_HEADSET_MODE 9756 }, 9757 [ALC255_FIXUP_XIAOMI_HEADSET_MIC] = { 9758 .type = HDA_FIXUP_VERBS, 9759 .v.verbs = (const struct hda_verb[]) { 9760 { 0x20, AC_VERB_SET_COEF_INDEX, 0x45 }, 9761 { 0x20, AC_VERB_SET_PROC_COEF, 0x5089 }, 9762 { } 9763 }, 9764 .chained = true, 9765 .chain_id = ALC289_FIXUP_ASUS_GA502 9766 }, 9767 [ALC274_FIXUP_HP_MIC] = { 9768 .type = HDA_FIXUP_VERBS, 9769 .v.verbs = (const struct hda_verb[]) { 9770 { 0x20, AC_VERB_SET_COEF_INDEX, 0x45 }, 9771 { 0x20, AC_VERB_SET_PROC_COEF, 0x5089 }, 9772 { } 9773 }, 9774 }, 9775 [ALC274_FIXUP_HP_HEADSET_MIC] = { 9776 .type = HDA_FIXUP_FUNC, 9777 .v.func = alc274_fixup_hp_headset_mic, 9778 .chained = true, 9779 .chain_id = ALC274_FIXUP_HP_MIC 9780 }, 9781 [ALC274_FIXUP_HP_ENVY_GPIO] = { 9782 .type = HDA_FIXUP_FUNC, 9783 .v.func = alc274_fixup_hp_envy_gpio, 9784 }, 9785 [ALC274_FIXUP_ASUS_ZEN_AIO_27] = { 9786 .type = HDA_FIXUP_VERBS, 9787 .v.verbs = (const struct hda_verb[]) { 9788 { 0x20, AC_VERB_SET_COEF_INDEX, 0x10 }, 9789 { 0x20, AC_VERB_SET_PROC_COEF, 0xc420 }, 9790 { 0x20, AC_VERB_SET_COEF_INDEX, 0x40 }, 9791 { 0x20, AC_VERB_SET_PROC_COEF, 0x8800 }, 9792 { 0x20, AC_VERB_SET_COEF_INDEX, 0x49 }, 9793 { 0x20, AC_VERB_SET_PROC_COEF, 0x0249 }, 9794 { 0x20, AC_VERB_SET_COEF_INDEX, 0x4a }, 9795 { 0x20, AC_VERB_SET_PROC_COEF, 0x202b }, 9796 { 0x20, AC_VERB_SET_COEF_INDEX, 0x62 }, 9797 { 0x20, AC_VERB_SET_PROC_COEF, 0xa007 }, 9798 { 0x20, AC_VERB_SET_COEF_INDEX, 0x6b }, 9799 { 0x20, AC_VERB_SET_PROC_COEF, 0x5060 }, 9800 {} 9801 }, 9802 .chained = true, 9803 .chain_id = ALC2XX_FIXUP_HEADSET_MIC, 9804 }, 9805 [ALC256_FIXUP_ASUS_HPE] = { 9806 .type = HDA_FIXUP_VERBS, 9807 .v.verbs = (const struct hda_verb[]) { 9808 /* Set EAPD high */ 9809 { 0x20, AC_VERB_SET_COEF_INDEX, 0x0f }, 9810 { 0x20, AC_VERB_SET_PROC_COEF, 0x7778 }, 9811 { } 9812 }, 9813 .chained = true, 9814 .chain_id = ALC294_FIXUP_ASUS_HEADSET_MIC 9815 }, 9816 [ALC285_FIXUP_THINKPAD_NO_BASS_SPK_HEADSET_JACK] = { 9817 .type = HDA_FIXUP_FUNC, 9818 .v.func = alc_fixup_headset_jack, 9819 .chained = true, 9820 .chain_id = ALC269_FIXUP_THINKPAD_ACPI 9821 }, 9822 [ALC287_FIXUP_HP_GPIO_LED] = { 9823 .type = HDA_FIXUP_FUNC, 9824 .v.func = alc287_fixup_hp_gpio_led, 9825 }, 9826 [ALC256_FIXUP_HP_HEADSET_MIC] = { 9827 .type = HDA_FIXUP_FUNC, 9828 .v.func = alc274_fixup_hp_headset_mic, 9829 }, 9830 [ALC236_FIXUP_DELL_AIO_HEADSET_MIC] = { 9831 .type = HDA_FIXUP_FUNC, 9832 .v.func = alc_fixup_no_int_mic, 9833 .chained = true, 9834 .chain_id = ALC255_FIXUP_DELL1_MIC_NO_PRESENCE 9835 }, 9836 [ALC282_FIXUP_ACER_DISABLE_LINEOUT] = { 9837 .type = HDA_FIXUP_PINS, 9838 .v.pins = (const struct hda_pintbl[]) { 9839 { 0x1b, 0x411111f0 }, 9840 { 0x18, 0x01a1913c }, /* use as headset mic, without its own jack detect */ 9841 { }, 9842 }, 9843 .chained = true, 9844 .chain_id = ALC269_FIXUP_HEADSET_MODE 9845 }, 9846 [ALC255_FIXUP_ACER_LIMIT_INT_MIC_BOOST] = { 9847 .type = HDA_FIXUP_FUNC, 9848 .v.func = alc269_fixup_limit_int_mic_boost, 9849 .chained = true, 9850 .chain_id = ALC255_FIXUP_ACER_MIC_NO_PRESENCE, 9851 }, 9852 [ALC256_FIXUP_ACER_HEADSET_MIC] = { 9853 .type = HDA_FIXUP_PINS, 9854 .v.pins = (const struct hda_pintbl[]) { 9855 { 0x19, 0x02a1113c }, /* use as headset mic, without its own jack detect */ 9856 { 0x1a, 0x90a1092f }, /* use as internal mic */ 9857 { } 9858 }, 9859 .chained = true, 9860 .chain_id = ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC 9861 }, 9862 [ALC285_FIXUP_IDEAPAD_S740_COEF] = { 9863 .type = HDA_FIXUP_FUNC, 9864 .v.func = alc285_fixup_ideapad_s740_coef, 9865 .chained = true, 9866 .chain_id = ALC269_FIXUP_THINKPAD_ACPI, 9867 }, 9868 [ALC285_FIXUP_HP_LIMIT_INT_MIC_BOOST] = { 9869 .type = HDA_FIXUP_FUNC, 9870 .v.func = alc269_fixup_limit_int_mic_boost, 9871 .chained = true, 9872 .chain_id = ALC285_FIXUP_HP_MUTE_LED, 9873 }, 9874 [ALC295_FIXUP_ASUS_DACS] = { 9875 .type = HDA_FIXUP_FUNC, 9876 .v.func = alc295_fixup_asus_dacs, 9877 }, 9878 [ALC295_FIXUP_HP_OMEN] = { 9879 .type = HDA_FIXUP_PINS, 9880 .v.pins = (const struct hda_pintbl[]) { 9881 { 0x12, 0xb7a60130 }, 9882 { 0x13, 0x40000000 }, 9883 { 0x14, 0x411111f0 }, 9884 { 0x16, 0x411111f0 }, 9885 { 0x17, 0x90170110 }, 9886 { 0x18, 0x411111f0 }, 9887 { 0x19, 0x02a11030 }, 9888 { 0x1a, 0x411111f0 }, 9889 { 0x1b, 0x04a19030 }, 9890 { 0x1d, 0x40600001 }, 9891 { 0x1e, 0x411111f0 }, 9892 { 0x21, 0x03211020 }, 9893 {} 9894 }, 9895 .chained = true, 9896 .chain_id = ALC269_FIXUP_HP_LINE1_MIC1_LED, 9897 }, 9898 [ALC285_FIXUP_HP_SPECTRE_X360] = { 9899 .type = HDA_FIXUP_FUNC, 9900 .v.func = alc285_fixup_hp_spectre_x360, 9901 }, 9902 [ALC285_FIXUP_HP_SPECTRE_X360_EB1] = { 9903 .type = HDA_FIXUP_FUNC, 9904 .v.func = alc285_fixup_hp_spectre_x360_eb1 9905 }, 9906 [ALC285_FIXUP_HP_SPECTRE_X360_DF1] = { 9907 .type = HDA_FIXUP_FUNC, 9908 .v.func = alc285_fixup_hp_spectre_x360_df1 9909 }, 9910 [ALC285_FIXUP_HP_ENVY_X360] = { 9911 .type = HDA_FIXUP_FUNC, 9912 .v.func = alc285_fixup_hp_envy_x360, 9913 .chained = true, 9914 .chain_id = ALC285_FIXUP_HP_GPIO_AMP_INIT, 9915 }, 9916 [ALC287_FIXUP_IDEAPAD_BASS_SPK_AMP] = { 9917 .type = HDA_FIXUP_FUNC, 9918 .v.func = alc285_fixup_ideapad_s740_coef, 9919 .chained = true, 9920 .chain_id = ALC285_FIXUP_THINKPAD_HEADSET_JACK, 9921 }, 9922 [ALC623_FIXUP_LENOVO_THINKSTATION_P340] = { 9923 .type = HDA_FIXUP_FUNC, 9924 .v.func = alc_fixup_no_shutup, 9925 .chained = true, 9926 .chain_id = ALC283_FIXUP_HEADSET_MIC, 9927 }, 9928 [ALC255_FIXUP_ACER_HEADPHONE_AND_MIC] = { 9929 .type = HDA_FIXUP_PINS, 9930 .v.pins = (const struct hda_pintbl[]) { 9931 { 0x21, 0x03211030 }, /* Change the Headphone location to Left */ 9932 { } 9933 }, 9934 .chained = true, 9935 .chain_id = ALC255_FIXUP_XIAOMI_HEADSET_MIC 9936 }, 9937 [ALC236_FIXUP_HP_LIMIT_INT_MIC_BOOST] = { 9938 .type = HDA_FIXUP_FUNC, 9939 .v.func = alc269_fixup_limit_int_mic_boost, 9940 .chained = true, 9941 .chain_id = ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF, 9942 }, 9943 [ALC285_FIXUP_LEGION_Y9000X_SPEAKERS] = { 9944 .type = HDA_FIXUP_FUNC, 9945 .v.func = alc285_fixup_ideapad_s740_coef, 9946 .chained = true, 9947 .chain_id = ALC285_FIXUP_LEGION_Y9000X_AUTOMUTE, 9948 }, 9949 [ALC285_FIXUP_LEGION_Y9000X_AUTOMUTE] = { 9950 .type = HDA_FIXUP_FUNC, 9951 .v.func = alc287_fixup_legion_15imhg05_speakers, 9952 .chained = true, 9953 .chain_id = ALC269_FIXUP_THINKPAD_ACPI, 9954 }, 9955 [ALC287_FIXUP_LEGION_15IMHG05_SPEAKERS] = { 9956 .type = HDA_FIXUP_VERBS, 9957 //.v.verbs = legion_15imhg05_coefs, 9958 .v.verbs = (const struct hda_verb[]) { 9959 // set left speaker Legion 7i. 9960 { 0x20, AC_VERB_SET_COEF_INDEX, 0x24 }, 9961 { 0x20, AC_VERB_SET_PROC_COEF, 0x41 }, 9962 9963 { 0x20, AC_VERB_SET_COEF_INDEX, 0x26 }, 9964 { 0x20, AC_VERB_SET_PROC_COEF, 0xc }, 9965 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 }, 9966 { 0x20, AC_VERB_SET_PROC_COEF, 0x1a }, 9967 { 0x20, AC_VERB_SET_PROC_COEF, 0xb020 }, 9968 9969 { 0x20, AC_VERB_SET_COEF_INDEX, 0x26 }, 9970 { 0x20, AC_VERB_SET_PROC_COEF, 0x2 }, 9971 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 }, 9972 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 }, 9973 { 0x20, AC_VERB_SET_PROC_COEF, 0xb020 }, 9974 9975 // set right speaker Legion 7i. 9976 { 0x20, AC_VERB_SET_COEF_INDEX, 0x24 }, 9977 { 0x20, AC_VERB_SET_PROC_COEF, 0x42 }, 9978 9979 { 0x20, AC_VERB_SET_COEF_INDEX, 0x26 }, 9980 { 0x20, AC_VERB_SET_PROC_COEF, 0xc }, 9981 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 }, 9982 { 0x20, AC_VERB_SET_PROC_COEF, 0x2a }, 9983 { 0x20, AC_VERB_SET_PROC_COEF, 0xb020 }, 9984 9985 { 0x20, AC_VERB_SET_COEF_INDEX, 0x26 }, 9986 { 0x20, AC_VERB_SET_PROC_COEF, 0x2 }, 9987 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 }, 9988 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 }, 9989 { 0x20, AC_VERB_SET_PROC_COEF, 0xb020 }, 9990 {} 9991 }, 9992 .chained = true, 9993 .chain_id = ALC287_FIXUP_LEGION_15IMHG05_AUTOMUTE, 9994 }, 9995 [ALC287_FIXUP_LEGION_15IMHG05_AUTOMUTE] = { 9996 .type = HDA_FIXUP_FUNC, 9997 .v.func = alc287_fixup_legion_15imhg05_speakers, 9998 .chained = true, 9999 .chain_id = ALC269_FIXUP_HEADSET_MODE, 10000 }, 10001 [ALC287_FIXUP_YOGA7_14ITL_SPEAKERS] = { 10002 .type = HDA_FIXUP_VERBS, 10003 .v.verbs = (const struct hda_verb[]) { 10004 // set left speaker Yoga 7i. 10005 { 0x20, AC_VERB_SET_COEF_INDEX, 0x24 }, 10006 { 0x20, AC_VERB_SET_PROC_COEF, 0x41 }, 10007 10008 { 0x20, AC_VERB_SET_COEF_INDEX, 0x26 }, 10009 { 0x20, AC_VERB_SET_PROC_COEF, 0xc }, 10010 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 }, 10011 { 0x20, AC_VERB_SET_PROC_COEF, 0x1a }, 10012 { 0x20, AC_VERB_SET_PROC_COEF, 0xb020 }, 10013 10014 { 0x20, AC_VERB_SET_COEF_INDEX, 0x26 }, 10015 { 0x20, AC_VERB_SET_PROC_COEF, 0x2 }, 10016 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 }, 10017 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 }, 10018 { 0x20, AC_VERB_SET_PROC_COEF, 0xb020 }, 10019 10020 // set right speaker Yoga 7i. 10021 { 0x20, AC_VERB_SET_COEF_INDEX, 0x24 }, 10022 { 0x20, AC_VERB_SET_PROC_COEF, 0x46 }, 10023 10024 { 0x20, AC_VERB_SET_COEF_INDEX, 0x26 }, 10025 { 0x20, AC_VERB_SET_PROC_COEF, 0xc }, 10026 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 }, 10027 { 0x20, AC_VERB_SET_PROC_COEF, 0x2a }, 10028 { 0x20, AC_VERB_SET_PROC_COEF, 0xb020 }, 10029 10030 { 0x20, AC_VERB_SET_COEF_INDEX, 0x26 }, 10031 { 0x20, AC_VERB_SET_PROC_COEF, 0x2 }, 10032 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 }, 10033 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 }, 10034 { 0x20, AC_VERB_SET_PROC_COEF, 0xb020 }, 10035 {} 10036 }, 10037 .chained = true, 10038 .chain_id = ALC269_FIXUP_HEADSET_MODE, 10039 }, 10040 [ALC298_FIXUP_LENOVO_C940_DUET7] = { 10041 .type = HDA_FIXUP_FUNC, 10042 .v.func = alc298_fixup_lenovo_c940_duet7, 10043 }, 10044 [ALC287_FIXUP_13S_GEN2_SPEAKERS] = { 10045 .type = HDA_FIXUP_VERBS, 10046 .v.verbs = (const struct hda_verb[]) { 10047 { 0x20, AC_VERB_SET_COEF_INDEX, 0x24 }, 10048 { 0x20, AC_VERB_SET_PROC_COEF, 0x41 }, 10049 { 0x20, AC_VERB_SET_COEF_INDEX, 0x26 }, 10050 { 0x20, AC_VERB_SET_PROC_COEF, 0x2 }, 10051 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 }, 10052 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 }, 10053 { 0x20, AC_VERB_SET_PROC_COEF, 0xb020 }, 10054 { 0x20, AC_VERB_SET_COEF_INDEX, 0x24 }, 10055 { 0x20, AC_VERB_SET_PROC_COEF, 0x42 }, 10056 { 0x20, AC_VERB_SET_COEF_INDEX, 0x26 }, 10057 { 0x20, AC_VERB_SET_PROC_COEF, 0x2 }, 10058 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 }, 10059 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 }, 10060 { 0x20, AC_VERB_SET_PROC_COEF, 0xb020 }, 10061 {} 10062 }, 10063 .chained = true, 10064 .chain_id = ALC269_FIXUP_HEADSET_MODE, 10065 }, 10066 [ALC256_FIXUP_SET_COEF_DEFAULTS] = { 10067 .type = HDA_FIXUP_FUNC, 10068 .v.func = alc256_fixup_set_coef_defaults, 10069 }, 10070 [ALC245_FIXUP_HP_GPIO_LED] = { 10071 .type = HDA_FIXUP_FUNC, 10072 .v.func = alc245_fixup_hp_gpio_led, 10073 }, 10074 [ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE] = { 10075 .type = HDA_FIXUP_PINS, 10076 .v.pins = (const struct hda_pintbl[]) { 10077 { 0x19, 0x03a11120 }, /* use as headset mic, without its own jack detect */ 10078 { } 10079 }, 10080 .chained = true, 10081 .chain_id = ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC, 10082 }, 10083 [ALC233_FIXUP_NO_AUDIO_JACK] = { 10084 .type = HDA_FIXUP_FUNC, 10085 .v.func = alc233_fixup_no_audio_jack, 10086 }, 10087 [ALC256_FIXUP_MIC_NO_PRESENCE_AND_RESUME] = { 10088 .type = HDA_FIXUP_FUNC, 10089 .v.func = alc256_fixup_mic_no_presence_and_resume, 10090 .chained = true, 10091 .chain_id = ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC 10092 }, 10093 [ALC287_FIXUP_LEGION_16ACHG6] = { 10094 .type = HDA_FIXUP_FUNC, 10095 .v.func = alc287_fixup_legion_16achg6_speakers, 10096 }, 10097 [ALC287_FIXUP_CS35L41_I2C_2] = { 10098 .type = HDA_FIXUP_FUNC, 10099 .v.func = cs35l41_fixup_i2c_two, 10100 }, 10101 [ALC287_FIXUP_CS35L41_I2C_2_HP_GPIO_LED] = { 10102 .type = HDA_FIXUP_FUNC, 10103 .v.func = cs35l41_fixup_i2c_two, 10104 .chained = true, 10105 .chain_id = ALC285_FIXUP_HP_MUTE_LED, 10106 }, 10107 [ALC287_FIXUP_CS35L41_I2C_4] = { 10108 .type = HDA_FIXUP_FUNC, 10109 .v.func = cs35l41_fixup_i2c_four, 10110 }, 10111 [ALC245_FIXUP_CS35L41_SPI_2] = { 10112 .type = HDA_FIXUP_FUNC, 10113 .v.func = cs35l41_fixup_spi_two, 10114 }, 10115 [ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED] = { 10116 .type = HDA_FIXUP_FUNC, 10117 .v.func = cs35l41_fixup_spi_two, 10118 .chained = true, 10119 .chain_id = ALC285_FIXUP_HP_GPIO_LED, 10120 }, 10121 [ALC245_FIXUP_CS35L41_SPI_4] = { 10122 .type = HDA_FIXUP_FUNC, 10123 .v.func = cs35l41_fixup_spi_four, 10124 }, 10125 [ALC245_FIXUP_CS35L41_SPI_4_HP_GPIO_LED] = { 10126 .type = HDA_FIXUP_FUNC, 10127 .v.func = cs35l41_fixup_spi_four, 10128 .chained = true, 10129 .chain_id = ALC285_FIXUP_HP_GPIO_LED, 10130 }, 10131 [ALC285_FIXUP_HP_SPEAKERS_MICMUTE_LED] = { 10132 .type = HDA_FIXUP_VERBS, 10133 .v.verbs = (const struct hda_verb[]) { 10134 { 0x20, AC_VERB_SET_COEF_INDEX, 0x19 }, 10135 { 0x20, AC_VERB_SET_PROC_COEF, 0x8e11 }, 10136 { } 10137 }, 10138 .chained = true, 10139 .chain_id = ALC285_FIXUP_HP_MUTE_LED, 10140 }, 10141 [ALC269_FIXUP_DELL4_MIC_NO_PRESENCE_QUIET] = { 10142 .type = HDA_FIXUP_FUNC, 10143 .v.func = alc_fixup_dell4_mic_no_presence_quiet, 10144 .chained = true, 10145 .chain_id = ALC269_FIXUP_DELL4_MIC_NO_PRESENCE, 10146 }, 10147 [ALC295_FIXUP_FRAMEWORK_LAPTOP_MIC_NO_PRESENCE] = { 10148 .type = HDA_FIXUP_PINS, 10149 .v.pins = (const struct hda_pintbl[]) { 10150 { 0x19, 0x02a1112c }, /* use as headset mic, without its own jack detect */ 10151 { } 10152 }, 10153 .chained = true, 10154 .chain_id = ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC 10155 }, 10156 [ALC287_FIXUP_LEGION_16ITHG6] = { 10157 .type = HDA_FIXUP_FUNC, 10158 .v.func = alc287_fixup_legion_16ithg6_speakers, 10159 }, 10160 [ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK] = { 10161 .type = HDA_FIXUP_VERBS, 10162 .v.verbs = (const struct hda_verb[]) { 10163 // enable left speaker 10164 { 0x20, AC_VERB_SET_COEF_INDEX, 0x24 }, 10165 { 0x20, AC_VERB_SET_PROC_COEF, 0x41 }, 10166 10167 { 0x20, AC_VERB_SET_COEF_INDEX, 0x26 }, 10168 { 0x20, AC_VERB_SET_PROC_COEF, 0xc }, 10169 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 }, 10170 { 0x20, AC_VERB_SET_PROC_COEF, 0x1a }, 10171 { 0x20, AC_VERB_SET_PROC_COEF, 0xb020 }, 10172 10173 { 0x20, AC_VERB_SET_COEF_INDEX, 0x26 }, 10174 { 0x20, AC_VERB_SET_PROC_COEF, 0xf }, 10175 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 }, 10176 { 0x20, AC_VERB_SET_PROC_COEF, 0x42 }, 10177 { 0x20, AC_VERB_SET_PROC_COEF, 0xb020 }, 10178 10179 { 0x20, AC_VERB_SET_COEF_INDEX, 0x26 }, 10180 { 0x20, AC_VERB_SET_PROC_COEF, 0x10 }, 10181 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 }, 10182 { 0x20, AC_VERB_SET_PROC_COEF, 0x40 }, 10183 { 0x20, AC_VERB_SET_PROC_COEF, 0xb020 }, 10184 10185 { 0x20, AC_VERB_SET_COEF_INDEX, 0x26 }, 10186 { 0x20, AC_VERB_SET_PROC_COEF, 0x2 }, 10187 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 }, 10188 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 }, 10189 { 0x20, AC_VERB_SET_PROC_COEF, 0xb020 }, 10190 10191 // enable right speaker 10192 { 0x20, AC_VERB_SET_COEF_INDEX, 0x24 }, 10193 { 0x20, AC_VERB_SET_PROC_COEF, 0x46 }, 10194 10195 { 0x20, AC_VERB_SET_COEF_INDEX, 0x26 }, 10196 { 0x20, AC_VERB_SET_PROC_COEF, 0xc }, 10197 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 }, 10198 { 0x20, AC_VERB_SET_PROC_COEF, 0x2a }, 10199 { 0x20, AC_VERB_SET_PROC_COEF, 0xb020 }, 10200 10201 { 0x20, AC_VERB_SET_COEF_INDEX, 0x26 }, 10202 { 0x20, AC_VERB_SET_PROC_COEF, 0xf }, 10203 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 }, 10204 { 0x20, AC_VERB_SET_PROC_COEF, 0x46 }, 10205 { 0x20, AC_VERB_SET_PROC_COEF, 0xb020 }, 10206 10207 { 0x20, AC_VERB_SET_COEF_INDEX, 0x26 }, 10208 { 0x20, AC_VERB_SET_PROC_COEF, 0x10 }, 10209 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 }, 10210 { 0x20, AC_VERB_SET_PROC_COEF, 0x44 }, 10211 { 0x20, AC_VERB_SET_PROC_COEF, 0xb020 }, 10212 10213 { 0x20, AC_VERB_SET_COEF_INDEX, 0x26 }, 10214 { 0x20, AC_VERB_SET_PROC_COEF, 0x2 }, 10215 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 }, 10216 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 }, 10217 { 0x20, AC_VERB_SET_PROC_COEF, 0xb020 }, 10218 10219 { }, 10220 }, 10221 }, 10222 [ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK_PIN] = { 10223 .type = HDA_FIXUP_FUNC, 10224 .v.func = alc287_fixup_yoga9_14iap7_bass_spk_pin, 10225 .chained = true, 10226 .chain_id = ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK, 10227 }, 10228 [ALC287_FIXUP_YOGA9_14IMH9_BASS_SPK_PIN] = { 10229 .type = HDA_FIXUP_FUNC, 10230 .v.func = alc287_fixup_yoga9_14iap7_bass_spk_pin, 10231 .chained = true, 10232 .chain_id = ALC287_FIXUP_CS35L41_I2C_2, 10233 }, 10234 [ALC295_FIXUP_DELL_INSPIRON_TOP_SPEAKERS] = { 10235 .type = HDA_FIXUP_FUNC, 10236 .v.func = alc295_fixup_dell_inspiron_top_speakers, 10237 .chained = true, 10238 .chain_id = ALC269_FIXUP_DELL4_MIC_NO_PRESENCE, 10239 }, 10240 [ALC236_FIXUP_DELL_DUAL_CODECS] = { 10241 .type = HDA_FIXUP_PINS, 10242 .v.func = alc1220_fixup_gb_dual_codecs, 10243 .chained = true, 10244 .chain_id = ALC255_FIXUP_DELL1_MIC_NO_PRESENCE, 10245 }, 10246 [ALC287_FIXUP_CS35L41_I2C_2_THINKPAD_ACPI] = { 10247 .type = HDA_FIXUP_FUNC, 10248 .v.func = cs35l41_fixup_i2c_two, 10249 .chained = true, 10250 .chain_id = ALC285_FIXUP_THINKPAD_NO_BASS_SPK_HEADSET_JACK, 10251 }, 10252 [ALC287_FIXUP_TAS2781_I2C] = { 10253 .type = HDA_FIXUP_FUNC, 10254 .v.func = tas2781_fixup_i2c, 10255 .chained = true, 10256 .chain_id = ALC285_FIXUP_THINKPAD_HEADSET_JACK, 10257 }, 10258 [ALC245_FIXUP_TAS2781_SPI_2] = { 10259 .type = HDA_FIXUP_FUNC, 10260 .v.func = tas2781_fixup_spi, 10261 .chained = true, 10262 .chain_id = ALC285_FIXUP_HP_GPIO_LED, 10263 }, 10264 [ALC287_FIXUP_YOGA7_14ARB7_I2C] = { 10265 .type = HDA_FIXUP_FUNC, 10266 .v.func = yoga7_14arb7_fixup_i2c, 10267 .chained = true, 10268 .chain_id = ALC285_FIXUP_THINKPAD_HEADSET_JACK, 10269 }, 10270 [ALC245_FIXUP_HP_MUTE_LED_COEFBIT] = { 10271 .type = HDA_FIXUP_FUNC, 10272 .v.func = alc245_fixup_hp_mute_led_coefbit, 10273 }, 10274 [ALC245_FIXUP_HP_MUTE_LED_V1_COEFBIT] = { 10275 .type = HDA_FIXUP_FUNC, 10276 .v.func = alc245_fixup_hp_mute_led_v1_coefbit, 10277 }, 10278 [ALC245_FIXUP_HP_X360_MUTE_LEDS] = { 10279 .type = HDA_FIXUP_FUNC, 10280 .v.func = alc245_fixup_hp_mute_led_coefbit, 10281 .chained = true, 10282 .chain_id = ALC245_FIXUP_HP_GPIO_LED 10283 }, 10284 [ALC287_FIXUP_THINKPAD_I2S_SPK] = { 10285 .type = HDA_FIXUP_FUNC, 10286 .v.func = alc287_fixup_bind_dacs, 10287 .chained = true, 10288 .chain_id = ALC285_FIXUP_THINKPAD_NO_BASS_SPK_HEADSET_JACK, 10289 }, 10290 [ALC287_FIXUP_MG_RTKC_CSAMP_CS35L41_I2C_THINKPAD] = { 10291 .type = HDA_FIXUP_FUNC, 10292 .v.func = alc287_fixup_bind_dacs, 10293 .chained = true, 10294 .chain_id = ALC287_FIXUP_CS35L41_I2C_2_THINKPAD_ACPI, 10295 }, 10296 [ALC2XX_FIXUP_HEADSET_MIC] = { 10297 .type = HDA_FIXUP_FUNC, 10298 .v.func = alc_fixup_headset_mic, 10299 }, 10300 [ALC289_FIXUP_DELL_CS35L41_SPI_2] = { 10301 .type = HDA_FIXUP_FUNC, 10302 .v.func = cs35l41_fixup_spi_two, 10303 .chained = true, 10304 .chain_id = ALC289_FIXUP_DUAL_SPK 10305 }, 10306 [ALC294_FIXUP_CS35L41_I2C_2] = { 10307 .type = HDA_FIXUP_FUNC, 10308 .v.func = cs35l41_fixup_i2c_two, 10309 }, 10310 [ALC256_FIXUP_ACER_SFG16_MICMUTE_LED] = { 10311 .type = HDA_FIXUP_FUNC, 10312 .v.func = alc256_fixup_acer_sfg16_micmute_led, 10313 }, 10314 [ALC256_FIXUP_HEADPHONE_AMP_VOL] = { 10315 .type = HDA_FIXUP_FUNC, 10316 .v.func = alc256_decrease_headphone_amp_val, 10317 }, 10318 [ALC245_FIXUP_HP_SPECTRE_X360_EU0XXX] = { 10319 .type = HDA_FIXUP_FUNC, 10320 .v.func = alc245_fixup_hp_spectre_x360_eu0xxx, 10321 }, 10322 [ALC245_FIXUP_HP_SPECTRE_X360_16_AA0XXX] = { 10323 .type = HDA_FIXUP_FUNC, 10324 .v.func = alc245_fixup_hp_spectre_x360_16_aa0xxx, 10325 }, 10326 [ALC245_FIXUP_HP_ZBOOK_FIREFLY_G12A] = { 10327 .type = HDA_FIXUP_FUNC, 10328 .v.func = alc245_fixup_hp_zbook_firefly_g12a, 10329 }, 10330 [ALC285_FIXUP_ASUS_GA403U] = { 10331 .type = HDA_FIXUP_FUNC, 10332 .v.func = alc285_fixup_asus_ga403u, 10333 }, 10334 [ALC285_FIXUP_ASUS_GA403U_HEADSET_MIC] = { 10335 .type = HDA_FIXUP_PINS, 10336 .v.pins = (const struct hda_pintbl[]) { 10337 { 0x19, 0x03a11050 }, 10338 { 0x1b, 0x03a11c30 }, 10339 { } 10340 }, 10341 .chained = true, 10342 .chain_id = ALC285_FIXUP_ASUS_GA403U_I2C_SPEAKER2_TO_DAC1 10343 }, 10344 [ALC285_FIXUP_ASUS_GU605_SPI_SPEAKER2_TO_DAC1] = { 10345 .type = HDA_FIXUP_FUNC, 10346 .v.func = alc285_fixup_speaker2_to_dac1, 10347 .chained = true, 10348 .chain_id = ALC285_FIXUP_ASUS_GU605_SPI_2_HEADSET_MIC, 10349 }, 10350 [ALC285_FIXUP_ASUS_GU605_SPI_2_HEADSET_MIC] = { 10351 .type = HDA_FIXUP_PINS, 10352 .v.pins = (const struct hda_pintbl[]) { 10353 { 0x19, 0x03a11050 }, 10354 { 0x1b, 0x03a11c30 }, 10355 { } 10356 }, 10357 }, 10358 [ALC285_FIXUP_ASUS_GA403U_I2C_SPEAKER2_TO_DAC1] = { 10359 .type = HDA_FIXUP_FUNC, 10360 .v.func = alc285_fixup_speaker2_to_dac1, 10361 .chained = true, 10362 .chain_id = ALC285_FIXUP_ASUS_GA403U, 10363 }, 10364 [ALC287_FIXUP_LENOVO_THKPAD_WH_ALC1318] = { 10365 .type = HDA_FIXUP_FUNC, 10366 .v.func = alc287_fixup_lenovo_thinkpad_with_alc1318, 10367 .chained = true, 10368 .chain_id = ALC269_FIXUP_THINKPAD_ACPI 10369 }, 10370 [ALC256_FIXUP_CHROME_BOOK] = { 10371 .type = HDA_FIXUP_FUNC, 10372 .v.func = alc256_fixup_chromebook, 10373 .chained = true, 10374 .chain_id = ALC225_FIXUP_HEADSET_JACK 10375 }, 10376 [ALC245_FIXUP_CLEVO_NOISY_MIC] = { 10377 .type = HDA_FIXUP_FUNC, 10378 .v.func = alc269_fixup_limit_int_mic_boost, 10379 .chained = true, 10380 .chain_id = ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE, 10381 }, 10382 [ALC269_FIXUP_VAIO_VJFH52_MIC_NO_PRESENCE] = { 10383 .type = HDA_FIXUP_PINS, 10384 .v.pins = (const struct hda_pintbl[]) { 10385 { 0x19, 0x03a1113c }, /* use as headset mic, without its own jack detect */ 10386 { 0x1b, 0x20a11040 }, /* dock mic */ 10387 { } 10388 }, 10389 .chained = true, 10390 .chain_id = ALC269_FIXUP_LIMIT_INT_MIC_BOOST 10391 }, 10392 [ALC233_FIXUP_MEDION_MTL_SPK] = { 10393 .type = HDA_FIXUP_PINS, 10394 .v.pins = (const struct hda_pintbl[]) { 10395 { 0x1b, 0x90170110 }, 10396 { } 10397 }, 10398 }, 10399 [ALC294_FIXUP_BASS_SPEAKER_15] = { 10400 .type = HDA_FIXUP_FUNC, 10401 .v.func = alc294_fixup_bass_speaker_15, 10402 }, 10403 [ALC283_FIXUP_DELL_HP_RESUME] = { 10404 .type = HDA_FIXUP_FUNC, 10405 .v.func = alc283_fixup_dell_hp_resume, 10406 }, 10407 [ALC294_FIXUP_ASUS_CS35L41_SPI_2] = { 10408 .type = HDA_FIXUP_FUNC, 10409 .v.func = cs35l41_fixup_spi_two, 10410 .chained = true, 10411 .chain_id = ALC294_FIXUP_ASUS_HEADSET_MIC, 10412 }, 10413 [ALC274_FIXUP_HP_AIO_BIND_DACS] = { 10414 .type = HDA_FIXUP_FUNC, 10415 .v.func = alc274_fixup_hp_aio_bind_dacs, 10416 }, 10417 }; 10418 10419 static const struct hda_quirk alc269_fixup_tbl[] = { 10420 SND_PCI_QUIRK(0x1025, 0x0283, "Acer TravelMate 8371", ALC269_FIXUP_INV_DMIC), 10421 SND_PCI_QUIRK(0x1025, 0x029b, "Acer 1810TZ", ALC269_FIXUP_INV_DMIC), 10422 SND_PCI_QUIRK(0x1025, 0x0349, "Acer AOD260", ALC269_FIXUP_INV_DMIC), 10423 SND_PCI_QUIRK(0x1025, 0x047c, "Acer AC700", ALC269_FIXUP_ACER_AC700), 10424 SND_PCI_QUIRK(0x1025, 0x072d, "Acer Aspire V5-571G", ALC269_FIXUP_ASPIRE_HEADSET_MIC), 10425 SND_PCI_QUIRK(0x1025, 0x0740, "Acer AO725", ALC271_FIXUP_HP_GATE_MIC_JACK), 10426 SND_PCI_QUIRK(0x1025, 0x0742, "Acer AO756", ALC271_FIXUP_HP_GATE_MIC_JACK), 10427 SND_PCI_QUIRK(0x1025, 0x0762, "Acer Aspire E1-472", ALC271_FIXUP_HP_GATE_MIC_JACK_E1_572), 10428 SND_PCI_QUIRK(0x1025, 0x0775, "Acer Aspire E1-572", ALC271_FIXUP_HP_GATE_MIC_JACK_E1_572), 10429 SND_PCI_QUIRK(0x1025, 0x079b, "Acer Aspire V5-573G", ALC282_FIXUP_ASPIRE_V5_PINS), 10430 SND_PCI_QUIRK(0x1025, 0x080d, "Acer Aspire V5-122P", ALC269_FIXUP_ASPIRE_HEADSET_MIC), 10431 SND_PCI_QUIRK(0x1025, 0x0840, "Acer Aspire E1", ALC269VB_FIXUP_ASPIRE_E1_COEF), 10432 SND_PCI_QUIRK(0x1025, 0x100c, "Acer Aspire E5-574G", ALC255_FIXUP_ACER_LIMIT_INT_MIC_BOOST), 10433 SND_PCI_QUIRK(0x1025, 0x101c, "Acer Veriton N2510G", ALC269_FIXUP_LIFEBOOK), 10434 SND_PCI_QUIRK(0x1025, 0x102b, "Acer Aspire C24-860", ALC286_FIXUP_ACER_AIO_MIC_NO_PRESENCE), 10435 SND_PCI_QUIRK(0x1025, 0x1065, "Acer Aspire C20-820", ALC269VC_FIXUP_ACER_HEADSET_MIC), 10436 SND_PCI_QUIRK(0x1025, 0x106d, "Acer Cloudbook 14", ALC283_FIXUP_CHROME_BOOK), 10437 SND_PCI_QUIRK(0x1025, 0x1094, "Acer Aspire E5-575T", ALC255_FIXUP_ACER_LIMIT_INT_MIC_BOOST), 10438 SND_PCI_QUIRK(0x1025, 0x1099, "Acer Aspire E5-523G", ALC255_FIXUP_ACER_MIC_NO_PRESENCE), 10439 SND_PCI_QUIRK(0x1025, 0x110e, "Acer Aspire ES1-432", ALC255_FIXUP_ACER_MIC_NO_PRESENCE), 10440 SND_PCI_QUIRK(0x1025, 0x1166, "Acer Veriton N4640G", ALC269_FIXUP_LIFEBOOK), 10441 SND_PCI_QUIRK(0x1025, 0x1167, "Acer Veriton N6640G", ALC269_FIXUP_LIFEBOOK), 10442 SND_PCI_QUIRK(0x1025, 0x1177, "Acer Predator G9-593", ALC255_FIXUP_PREDATOR_SUBWOOFER), 10443 SND_PCI_QUIRK(0x1025, 0x1178, "Acer Predator G9-593", ALC255_FIXUP_PREDATOR_SUBWOOFER), 10444 SND_PCI_QUIRK(0x1025, 0x1246, "Acer Predator Helios 500", ALC299_FIXUP_PREDATOR_SPK), 10445 SND_PCI_QUIRK(0x1025, 0x1247, "Acer vCopperbox", ALC269VC_FIXUP_ACER_VCOPPERBOX_PINS), 10446 SND_PCI_QUIRK(0x1025, 0x1248, "Acer Veriton N4660G", ALC269VC_FIXUP_ACER_MIC_NO_PRESENCE), 10447 SND_PCI_QUIRK(0x1025, 0x1269, "Acer SWIFT SF314-54", ALC256_FIXUP_ACER_HEADSET_MIC), 10448 SND_PCI_QUIRK(0x1025, 0x126a, "Acer Swift SF114-32", ALC256_FIXUP_ACER_MIC_NO_PRESENCE), 10449 SND_PCI_QUIRK(0x1025, 0x128f, "Acer Veriton Z6860G", ALC286_FIXUP_ACER_AIO_HEADSET_MIC), 10450 SND_PCI_QUIRK(0x1025, 0x1290, "Acer Veriton Z4860G", ALC286_FIXUP_ACER_AIO_HEADSET_MIC), 10451 SND_PCI_QUIRK(0x1025, 0x1291, "Acer Veriton Z4660G", ALC286_FIXUP_ACER_AIO_HEADSET_MIC), 10452 SND_PCI_QUIRK(0x1025, 0x129c, "Acer SWIFT SF314-55", ALC256_FIXUP_ACER_HEADSET_MIC), 10453 SND_PCI_QUIRK(0x1025, 0x129d, "Acer SWIFT SF313-51", ALC256_FIXUP_ACER_MIC_NO_PRESENCE), 10454 SND_PCI_QUIRK(0x1025, 0x1300, "Acer SWIFT SF314-56", ALC256_FIXUP_ACER_MIC_NO_PRESENCE), 10455 SND_PCI_QUIRK(0x1025, 0x1308, "Acer Aspire Z24-890", ALC286_FIXUP_ACER_AIO_HEADSET_MIC), 10456 SND_PCI_QUIRK(0x1025, 0x132a, "Acer TravelMate B114-21", ALC233_FIXUP_ACER_HEADSET_MIC), 10457 SND_PCI_QUIRK(0x1025, 0x1330, "Acer TravelMate X514-51T", ALC255_FIXUP_ACER_HEADSET_MIC), 10458 SND_PCI_QUIRK(0x1025, 0x1360, "Acer Aspire A115", ALC255_FIXUP_ACER_MIC_NO_PRESENCE), 10459 SND_PCI_QUIRK(0x1025, 0x141f, "Acer Spin SP513-54N", ALC255_FIXUP_ACER_MIC_NO_PRESENCE), 10460 SND_PCI_QUIRK(0x1025, 0x142b, "Acer Swift SF314-42", ALC255_FIXUP_ACER_MIC_NO_PRESENCE), 10461 SND_PCI_QUIRK(0x1025, 0x1430, "Acer TravelMate B311R-31", ALC256_FIXUP_ACER_MIC_NO_PRESENCE), 10462 SND_PCI_QUIRK(0x1025, 0x1466, "Acer Aspire A515-56", ALC255_FIXUP_ACER_HEADPHONE_AND_MIC), 10463 SND_PCI_QUIRK(0x1025, 0x1534, "Acer Predator PH315-54", ALC255_FIXUP_ACER_MIC_NO_PRESENCE), 10464 SND_PCI_QUIRK(0x1025, 0x159c, "Acer Nitro 5 AN515-58", ALC2XX_FIXUP_HEADSET_MIC), 10465 SND_PCI_QUIRK(0x1025, 0x169a, "Acer Swift SFG16", ALC256_FIXUP_ACER_SFG16_MICMUTE_LED), 10466 SND_PCI_QUIRK(0x1025, 0x1826, "Acer Helios ZPC", ALC287_FIXUP_PREDATOR_SPK_CS35L41_I2C_2), 10467 SND_PCI_QUIRK(0x1025, 0x182c, "Acer Helios ZPD", ALC287_FIXUP_PREDATOR_SPK_CS35L41_I2C_2), 10468 SND_PCI_QUIRK(0x1025, 0x1844, "Acer Helios ZPS", ALC287_FIXUP_PREDATOR_SPK_CS35L41_I2C_2), 10469 SND_PCI_QUIRK(0x1028, 0x0470, "Dell M101z", ALC269_FIXUP_DELL_M101Z), 10470 SND_PCI_QUIRK(0x1028, 0x053c, "Dell Latitude E5430", ALC292_FIXUP_DELL_E7X), 10471 SND_PCI_QUIRK(0x1028, 0x054b, "Dell XPS one 2710", ALC275_FIXUP_DELL_XPS), 10472 SND_PCI_QUIRK(0x1028, 0x05bd, "Dell Latitude E6440", ALC292_FIXUP_DELL_E7X), 10473 SND_PCI_QUIRK(0x1028, 0x05be, "Dell Latitude E6540", ALC292_FIXUP_DELL_E7X), 10474 SND_PCI_QUIRK(0x1028, 0x05ca, "Dell Latitude E7240", ALC292_FIXUP_DELL_E7X), 10475 SND_PCI_QUIRK(0x1028, 0x05cb, "Dell Latitude E7440", ALC292_FIXUP_DELL_E7X), 10476 SND_PCI_QUIRK(0x1028, 0x05da, "Dell Vostro 5460", ALC290_FIXUP_SUBWOOFER), 10477 SND_PCI_QUIRK(0x1028, 0x05f4, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE), 10478 SND_PCI_QUIRK(0x1028, 0x05f5, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE), 10479 SND_PCI_QUIRK(0x1028, 0x05f6, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE), 10480 SND_PCI_QUIRK(0x1028, 0x0604, "Dell Venue 11 Pro 7130", ALC283_FIXUP_DELL_HP_RESUME), 10481 SND_PCI_QUIRK(0x1028, 0x0615, "Dell Vostro 5470", ALC290_FIXUP_SUBWOOFER_HSJACK), 10482 SND_PCI_QUIRK(0x1028, 0x0616, "Dell Vostro 5470", ALC290_FIXUP_SUBWOOFER_HSJACK), 10483 SND_PCI_QUIRK(0x1028, 0x062c, "Dell Latitude E5550", ALC292_FIXUP_DELL_E7X), 10484 SND_PCI_QUIRK(0x1028, 0x062e, "Dell Latitude E7450", ALC292_FIXUP_DELL_E7X), 10485 SND_PCI_QUIRK(0x1028, 0x0638, "Dell Inspiron 5439", ALC290_FIXUP_MONO_SPEAKERS_HSJACK), 10486 SND_PCI_QUIRK(0x1028, 0x064a, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE), 10487 SND_PCI_QUIRK(0x1028, 0x064b, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE), 10488 SND_PCI_QUIRK(0x1028, 0x0665, "Dell XPS 13", ALC288_FIXUP_DELL_XPS_13), 10489 SND_PCI_QUIRK(0x1028, 0x0669, "Dell Optiplex 9020m", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE), 10490 SND_PCI_QUIRK(0x1028, 0x069a, "Dell Vostro 5480", ALC290_FIXUP_SUBWOOFER_HSJACK), 10491 SND_PCI_QUIRK(0x1028, 0x06c7, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE), 10492 SND_PCI_QUIRK(0x1028, 0x06d9, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE), 10493 SND_PCI_QUIRK(0x1028, 0x06da, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE), 10494 SND_PCI_QUIRK(0x1028, 0x06db, "Dell", ALC293_FIXUP_DISABLE_AAMIX_MULTIJACK), 10495 SND_PCI_QUIRK(0x1028, 0x06dd, "Dell", ALC293_FIXUP_DISABLE_AAMIX_MULTIJACK), 10496 SND_PCI_QUIRK(0x1028, 0x06de, "Dell", ALC293_FIXUP_DISABLE_AAMIX_MULTIJACK), 10497 SND_PCI_QUIRK(0x1028, 0x06df, "Dell", ALC293_FIXUP_DISABLE_AAMIX_MULTIJACK), 10498 SND_PCI_QUIRK(0x1028, 0x06e0, "Dell", ALC293_FIXUP_DISABLE_AAMIX_MULTIJACK), 10499 SND_PCI_QUIRK(0x1028, 0x0706, "Dell Inspiron 7559", ALC256_FIXUP_DELL_INSPIRON_7559_SUBWOOFER), 10500 SND_PCI_QUIRK(0x1028, 0x0725, "Dell Inspiron 3162", ALC255_FIXUP_DELL_SPK_NOISE), 10501 SND_PCI_QUIRK(0x1028, 0x0738, "Dell Precision 5820", ALC269_FIXUP_NO_SHUTUP), 10502 SND_PCI_QUIRK(0x1028, 0x075c, "Dell XPS 27 7760", ALC298_FIXUP_SPK_VOLUME), 10503 SND_PCI_QUIRK(0x1028, 0x075d, "Dell AIO", ALC298_FIXUP_SPK_VOLUME), 10504 SND_PCI_QUIRK(0x1028, 0x0798, "Dell Inspiron 17 7000 Gaming", ALC256_FIXUP_DELL_INSPIRON_7559_SUBWOOFER), 10505 SND_PCI_QUIRK(0x1028, 0x07b0, "Dell Precision 7520", ALC295_FIXUP_DISABLE_DAC3), 10506 SND_PCI_QUIRK(0x1028, 0x080c, "Dell WYSE", ALC225_FIXUP_DELL_WYSE_MIC_NO_PRESENCE), 10507 SND_PCI_QUIRK(0x1028, 0x084b, "Dell", ALC274_FIXUP_DELL_AIO_LINEOUT_VERB), 10508 SND_PCI_QUIRK(0x1028, 0x084e, "Dell", ALC274_FIXUP_DELL_AIO_LINEOUT_VERB), 10509 SND_PCI_QUIRK(0x1028, 0x0871, "Dell Precision 3630", ALC255_FIXUP_DELL_HEADSET_MIC), 10510 SND_PCI_QUIRK(0x1028, 0x0872, "Dell Precision 3630", ALC255_FIXUP_DELL_HEADSET_MIC), 10511 SND_PCI_QUIRK(0x1028, 0x0873, "Dell Precision 3930", ALC255_FIXUP_DUMMY_LINEOUT_VERB), 10512 SND_PCI_QUIRK(0x1028, 0x08ad, "Dell WYSE AIO", ALC225_FIXUP_DELL_WYSE_AIO_MIC_NO_PRESENCE), 10513 SND_PCI_QUIRK(0x1028, 0x08ae, "Dell WYSE NB", ALC225_FIXUP_DELL1_MIC_NO_PRESENCE), 10514 SND_PCI_QUIRK(0x1028, 0x0935, "Dell", ALC274_FIXUP_DELL_AIO_LINEOUT_VERB), 10515 SND_PCI_QUIRK(0x1028, 0x097d, "Dell Precision", ALC289_FIXUP_DUAL_SPK), 10516 SND_PCI_QUIRK(0x1028, 0x097e, "Dell Precision", ALC289_FIXUP_DUAL_SPK), 10517 SND_PCI_QUIRK(0x1028, 0x098d, "Dell Precision", ALC233_FIXUP_ASUS_MIC_NO_PRESENCE), 10518 SND_PCI_QUIRK(0x1028, 0x09bf, "Dell Precision", ALC233_FIXUP_ASUS_MIC_NO_PRESENCE), 10519 SND_PCI_QUIRK(0x1028, 0x0a2e, "Dell", ALC236_FIXUP_DELL_AIO_HEADSET_MIC), 10520 SND_PCI_QUIRK(0x1028, 0x0a30, "Dell", ALC236_FIXUP_DELL_AIO_HEADSET_MIC), 10521 SND_PCI_QUIRK(0x1028, 0x0a38, "Dell Latitude 7520", ALC269_FIXUP_DELL4_MIC_NO_PRESENCE_QUIET), 10522 SND_PCI_QUIRK(0x1028, 0x0a58, "Dell", ALC255_FIXUP_DELL_HEADSET_MIC), 10523 SND_PCI_QUIRK(0x1028, 0x0a61, "Dell XPS 15 9510", ALC289_FIXUP_DUAL_SPK), 10524 SND_PCI_QUIRK(0x1028, 0x0a62, "Dell Precision 5560", ALC289_FIXUP_DUAL_SPK), 10525 SND_PCI_QUIRK(0x1028, 0x0a9d, "Dell Latitude 5430", ALC269_FIXUP_DELL4_MIC_NO_PRESENCE), 10526 SND_PCI_QUIRK(0x1028, 0x0a9e, "Dell Latitude 5430", ALC269_FIXUP_DELL4_MIC_NO_PRESENCE), 10527 SND_PCI_QUIRK(0x1028, 0x0b19, "Dell XPS 15 9520", ALC289_FIXUP_DUAL_SPK), 10528 SND_PCI_QUIRK(0x1028, 0x0b1a, "Dell Precision 5570", ALC289_FIXUP_DUAL_SPK), 10529 SND_PCI_QUIRK(0x1028, 0x0b27, "Dell", ALC245_FIXUP_CS35L41_SPI_2), 10530 SND_PCI_QUIRK(0x1028, 0x0b28, "Dell", ALC245_FIXUP_CS35L41_SPI_2), 10531 SND_PCI_QUIRK(0x1028, 0x0b37, "Dell Inspiron 16 Plus 7620 2-in-1", ALC295_FIXUP_DELL_INSPIRON_TOP_SPEAKERS), 10532 SND_PCI_QUIRK(0x1028, 0x0b71, "Dell Inspiron 16 Plus 7620", ALC295_FIXUP_DELL_INSPIRON_TOP_SPEAKERS), 10533 SND_PCI_QUIRK(0x1028, 0x0beb, "Dell XPS 15 9530 (2023)", ALC289_FIXUP_DELL_CS35L41_SPI_2), 10534 SND_PCI_QUIRK(0x1028, 0x0c03, "Dell Precision 5340", ALC269_FIXUP_DELL4_MIC_NO_PRESENCE), 10535 SND_PCI_QUIRK(0x1028, 0x0c0b, "Dell Oasis 14 RPL-P", ALC289_FIXUP_RTK_AMP_DUAL_SPK), 10536 SND_PCI_QUIRK(0x1028, 0x0c0d, "Dell Oasis", ALC289_FIXUP_RTK_AMP_DUAL_SPK), 10537 SND_PCI_QUIRK(0x1028, 0x0c0e, "Dell Oasis 16", ALC289_FIXUP_RTK_AMP_DUAL_SPK), 10538 SND_PCI_QUIRK(0x1028, 0x0c19, "Dell Precision 3340", ALC236_FIXUP_DELL_DUAL_CODECS), 10539 SND_PCI_QUIRK(0x1028, 0x0c1a, "Dell Precision 3340", ALC236_FIXUP_DELL_DUAL_CODECS), 10540 SND_PCI_QUIRK(0x1028, 0x0c1b, "Dell Precision 3440", ALC236_FIXUP_DELL_DUAL_CODECS), 10541 SND_PCI_QUIRK(0x1028, 0x0c1c, "Dell Precision 3540", ALC236_FIXUP_DELL_DUAL_CODECS), 10542 SND_PCI_QUIRK(0x1028, 0x0c1d, "Dell Precision 3440", ALC236_FIXUP_DELL_DUAL_CODECS), 10543 SND_PCI_QUIRK(0x1028, 0x0c1e, "Dell Precision 3540", ALC236_FIXUP_DELL_DUAL_CODECS), 10544 SND_PCI_QUIRK(0x1028, 0x0c28, "Dell Inspiron 16 Plus 7630", ALC295_FIXUP_DELL_INSPIRON_TOP_SPEAKERS), 10545 SND_PCI_QUIRK(0x1028, 0x0c4d, "Dell", ALC287_FIXUP_CS35L41_I2C_4), 10546 SND_PCI_QUIRK(0x1028, 0x0c94, "Dell Polaris 3 metal", ALC287_FIXUP_TAS2781_I2C), 10547 SND_PCI_QUIRK(0x1028, 0x0c96, "Dell Polaris 2in1", ALC287_FIXUP_TAS2781_I2C), 10548 SND_PCI_QUIRK(0x1028, 0x0cbd, "Dell Oasis 13 CS MTL-U", ALC289_FIXUP_DELL_CS35L41_SPI_2), 10549 SND_PCI_QUIRK(0x1028, 0x0cbe, "Dell Oasis 13 2-IN-1 MTL-U", ALC289_FIXUP_DELL_CS35L41_SPI_2), 10550 SND_PCI_QUIRK(0x1028, 0x0cbf, "Dell Oasis 13 Low Weight MTU-L", ALC289_FIXUP_DELL_CS35L41_SPI_2), 10551 SND_PCI_QUIRK(0x1028, 0x0cc0, "Dell Oasis 13", ALC289_FIXUP_RTK_AMP_DUAL_SPK), 10552 SND_PCI_QUIRK(0x1028, 0x0cc1, "Dell Oasis 14 MTL-H/U", ALC289_FIXUP_DELL_CS35L41_SPI_2), 10553 SND_PCI_QUIRK(0x1028, 0x0cc2, "Dell Oasis 14 2-in-1 MTL-H/U", ALC289_FIXUP_DELL_CS35L41_SPI_2), 10554 SND_PCI_QUIRK(0x1028, 0x0cc3, "Dell Oasis 14 Low Weight MTL-U", ALC289_FIXUP_DELL_CS35L41_SPI_2), 10555 SND_PCI_QUIRK(0x1028, 0x0cc4, "Dell Oasis 16 MTL-H/U", ALC289_FIXUP_DELL_CS35L41_SPI_2), 10556 SND_PCI_QUIRK(0x1028, 0x0cc5, "Dell Oasis 14", ALC289_FIXUP_RTK_AMP_DUAL_SPK), 10557 SND_PCI_QUIRK(0x1028, 0x164a, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE), 10558 SND_PCI_QUIRK(0x1028, 0x164b, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE), 10559 SND_PCI_QUIRK(0x103c, 0x1586, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC2), 10560 SND_PCI_QUIRK(0x103c, 0x18e6, "HP", ALC269_FIXUP_HP_GPIO_LED), 10561 SND_PCI_QUIRK(0x103c, 0x218b, "HP", ALC269_FIXUP_LIMIT_INT_MIC_BOOST_MUTE_LED), 10562 SND_PCI_QUIRK(0x103c, 0x21f9, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1), 10563 SND_PCI_QUIRK(0x103c, 0x2210, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1), 10564 SND_PCI_QUIRK(0x103c, 0x2214, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1), 10565 SND_PCI_QUIRK(0x103c, 0x221b, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED), 10566 SND_PCI_QUIRK(0x103c, 0x221c, "HP EliteBook 755 G2", ALC280_FIXUP_HP_HEADSET_MIC), 10567 SND_PCI_QUIRK(0x103c, 0x2221, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED), 10568 SND_PCI_QUIRK(0x103c, 0x2225, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED), 10569 SND_PCI_QUIRK(0x103c, 0x2236, "HP", ALC269_FIXUP_HP_LINE1_MIC1_LED), 10570 SND_PCI_QUIRK(0x103c, 0x2237, "HP", ALC269_FIXUP_HP_LINE1_MIC1_LED), 10571 SND_PCI_QUIRK(0x103c, 0x2238, "HP", ALC269_FIXUP_HP_LINE1_MIC1_LED), 10572 SND_PCI_QUIRK(0x103c, 0x2239, "HP", ALC269_FIXUP_HP_LINE1_MIC1_LED), 10573 SND_PCI_QUIRK(0x103c, 0x224b, "HP", ALC269_FIXUP_HP_LINE1_MIC1_LED), 10574 SND_PCI_QUIRK(0x103c, 0x2253, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED), 10575 SND_PCI_QUIRK(0x103c, 0x2254, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED), 10576 SND_PCI_QUIRK(0x103c, 0x2255, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED), 10577 SND_PCI_QUIRK(0x103c, 0x2256, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED), 10578 SND_PCI_QUIRK(0x103c, 0x2257, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED), 10579 SND_PCI_QUIRK(0x103c, 0x2259, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED), 10580 SND_PCI_QUIRK(0x103c, 0x225a, "HP", ALC269_FIXUP_HP_DOCK_GPIO_MIC1_LED), 10581 SND_PCI_QUIRK(0x103c, 0x225f, "HP", ALC280_FIXUP_HP_GPIO2_MIC_HOTKEY), 10582 SND_PCI_QUIRK(0x103c, 0x2260, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1), 10583 SND_PCI_QUIRK(0x103c, 0x2263, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1), 10584 SND_PCI_QUIRK(0x103c, 0x2264, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1), 10585 SND_PCI_QUIRK(0x103c, 0x2265, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1), 10586 SND_PCI_QUIRK(0x103c, 0x2268, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1), 10587 SND_PCI_QUIRK(0x103c, 0x226a, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1), 10588 SND_PCI_QUIRK(0x103c, 0x226b, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1), 10589 SND_PCI_QUIRK(0x103c, 0x226e, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1), 10590 SND_PCI_QUIRK(0x103c, 0x2271, "HP", ALC286_FIXUP_HP_GPIO_LED), 10591 SND_PCI_QUIRK(0x103c, 0x2272, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED), 10592 SND_PCI_QUIRK(0x103c, 0x2272, "HP", ALC280_FIXUP_HP_DOCK_PINS), 10593 SND_PCI_QUIRK(0x103c, 0x2273, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED), 10594 SND_PCI_QUIRK(0x103c, 0x2273, "HP", ALC280_FIXUP_HP_DOCK_PINS), 10595 SND_PCI_QUIRK(0x103c, 0x2278, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED), 10596 SND_PCI_QUIRK(0x103c, 0x227f, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1), 10597 SND_PCI_QUIRK(0x103c, 0x2282, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1), 10598 SND_PCI_QUIRK(0x103c, 0x228b, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1), 10599 SND_PCI_QUIRK(0x103c, 0x228e, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1), 10600 SND_PCI_QUIRK(0x103c, 0x229e, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1), 10601 SND_PCI_QUIRK(0x103c, 0x22b2, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1), 10602 SND_PCI_QUIRK(0x103c, 0x22b7, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1), 10603 SND_PCI_QUIRK(0x103c, 0x22bf, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1), 10604 SND_PCI_QUIRK(0x103c, 0x22c4, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1), 10605 SND_PCI_QUIRK(0x103c, 0x22c5, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1), 10606 SND_PCI_QUIRK(0x103c, 0x22c7, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1), 10607 SND_PCI_QUIRK(0x103c, 0x22c8, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1), 10608 SND_PCI_QUIRK(0x103c, 0x22cf, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1), 10609 SND_PCI_QUIRK(0x103c, 0x22db, "HP", ALC280_FIXUP_HP_9480M), 10610 SND_PCI_QUIRK(0x103c, 0x22dc, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED), 10611 SND_PCI_QUIRK(0x103c, 0x22fb, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED), 10612 SND_PCI_QUIRK(0x103c, 0x2334, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1), 10613 SND_PCI_QUIRK(0x103c, 0x2335, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1), 10614 SND_PCI_QUIRK(0x103c, 0x2336, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1), 10615 SND_PCI_QUIRK(0x103c, 0x2337, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1), 10616 SND_PCI_QUIRK(0x103c, 0x2b5e, "HP 288 Pro G2 MT", ALC221_FIXUP_HP_288PRO_MIC_NO_PRESENCE), 10617 SND_PCI_QUIRK(0x103c, 0x802e, "HP Z240 SFF", ALC221_FIXUP_HP_MIC_NO_PRESENCE), 10618 SND_PCI_QUIRK(0x103c, 0x802f, "HP Z240", ALC221_FIXUP_HP_MIC_NO_PRESENCE), 10619 SND_PCI_QUIRK(0x103c, 0x8077, "HP", ALC256_FIXUP_HP_HEADSET_MIC), 10620 SND_PCI_QUIRK(0x103c, 0x8158, "HP", ALC256_FIXUP_HP_HEADSET_MIC), 10621 SND_PCI_QUIRK(0x103c, 0x820d, "HP Pavilion 15", ALC295_FIXUP_HP_X360), 10622 SND_PCI_QUIRK(0x103c, 0x8256, "HP", ALC221_FIXUP_HP_FRONT_MIC), 10623 SND_PCI_QUIRK(0x103c, 0x827e, "HP x360", ALC295_FIXUP_HP_X360), 10624 SND_PCI_QUIRK(0x103c, 0x827f, "HP x360", ALC269_FIXUP_HP_MUTE_LED_MIC3), 10625 SND_PCI_QUIRK(0x103c, 0x82bf, "HP G3 mini", ALC221_FIXUP_HP_MIC_NO_PRESENCE), 10626 SND_PCI_QUIRK(0x103c, 0x82c0, "HP G3 mini premium", ALC221_FIXUP_HP_MIC_NO_PRESENCE), 10627 SND_PCI_QUIRK(0x103c, 0x83b9, "HP Spectre x360", ALC269_FIXUP_HP_MUTE_LED_MIC3), 10628 SND_PCI_QUIRK(0x103c, 0x841c, "HP Pavilion 15-CK0xx", ALC269_FIXUP_HP_MUTE_LED_MIC3), 10629 SND_PCI_QUIRK(0x103c, 0x8497, "HP Envy x360", ALC269_FIXUP_HP_MUTE_LED_MIC3), 10630 SND_PCI_QUIRK(0x103c, 0x84a6, "HP 250 G7 Notebook PC", ALC269_FIXUP_HP_LINE1_MIC1_LED), 10631 SND_PCI_QUIRK(0x103c, 0x84ae, "HP 15-db0403ng", ALC236_FIXUP_HP_MUTE_LED_COEFBIT2), 10632 SND_PCI_QUIRK(0x103c, 0x84da, "HP OMEN dc0019-ur", ALC295_FIXUP_HP_OMEN), 10633 SND_PCI_QUIRK(0x103c, 0x84e7, "HP Pavilion 15", ALC269_FIXUP_HP_MUTE_LED_MIC3), 10634 SND_PCI_QUIRK(0x103c, 0x8519, "HP Spectre x360 15-df0xxx", ALC285_FIXUP_HP_SPECTRE_X360), 10635 SND_PCI_QUIRK(0x103c, 0x8537, "HP ProBook 440 G6", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF), 10636 SND_PCI_QUIRK(0x103c, 0x85c6, "HP Pavilion x360 Convertible 14-dy1xxx", ALC295_FIXUP_HP_MUTE_LED_COEFBIT11), 10637 SND_PCI_QUIRK(0x103c, 0x85de, "HP Envy x360 13-ar0xxx", ALC285_FIXUP_HP_ENVY_X360), 10638 SND_PCI_QUIRK(0x103c, 0x860f, "HP ZBook 15 G6", ALC285_FIXUP_HP_GPIO_AMP_INIT), 10639 SND_PCI_QUIRK(0x103c, 0x861f, "HP Elite Dragonfly G1", ALC285_FIXUP_HP_GPIO_AMP_INIT), 10640 SND_PCI_QUIRK(0x103c, 0x869d, "HP", ALC236_FIXUP_HP_MUTE_LED), 10641 SND_PCI_QUIRK(0x103c, 0x86c1, "HP Laptop 15-da3001TU", ALC236_FIXUP_HP_MUTE_LED_COEFBIT2), 10642 SND_PCI_QUIRK(0x103c, 0x86c7, "HP Envy AiO 32", ALC274_FIXUP_HP_ENVY_GPIO), 10643 SND_PCI_QUIRK(0x103c, 0x86e7, "HP Spectre x360 15-eb0xxx", ALC285_FIXUP_HP_SPECTRE_X360_EB1), 10644 SND_PCI_QUIRK(0x103c, 0x863e, "HP Spectre x360 15-df1xxx", ALC285_FIXUP_HP_SPECTRE_X360_DF1), 10645 SND_PCI_QUIRK(0x103c, 0x86e8, "HP Spectre x360 15-eb0xxx", ALC285_FIXUP_HP_SPECTRE_X360_EB1), 10646 SND_PCI_QUIRK(0x103c, 0x86f9, "HP Spectre x360 13-aw0xxx", ALC285_FIXUP_HP_SPECTRE_X360_MUTE_LED), 10647 SND_PCI_QUIRK(0x103c, 0x8716, "HP Elite Dragonfly G2 Notebook PC", ALC285_FIXUP_HP_GPIO_AMP_INIT), 10648 SND_PCI_QUIRK(0x103c, 0x8720, "HP EliteBook x360 1040 G8 Notebook PC", ALC285_FIXUP_HP_GPIO_AMP_INIT), 10649 SND_PCI_QUIRK(0x103c, 0x8724, "HP EliteBook 850 G7", ALC285_FIXUP_HP_GPIO_LED), 10650 SND_PCI_QUIRK(0x103c, 0x8728, "HP EliteBook 840 G7", ALC285_FIXUP_HP_GPIO_LED), 10651 SND_PCI_QUIRK(0x103c, 0x8729, "HP", ALC285_FIXUP_HP_GPIO_LED), 10652 SND_PCI_QUIRK(0x103c, 0x8730, "HP ProBook 445 G7", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF), 10653 SND_PCI_QUIRK(0x103c, 0x8735, "HP ProBook 435 G7", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF), 10654 SND_PCI_QUIRK(0x103c, 0x8736, "HP", ALC285_FIXUP_HP_GPIO_AMP_INIT), 10655 SND_PCI_QUIRK(0x103c, 0x8760, "HP EliteBook 8{4,5}5 G7", ALC285_FIXUP_HP_BEEP_MICMUTE_LED), 10656 SND_PCI_QUIRK(0x103c, 0x876e, "HP ENVY x360 Convertible 13-ay0xxx", ALC245_FIXUP_HP_X360_MUTE_LEDS), 10657 SND_PCI_QUIRK(0x103c, 0x877a, "HP", ALC285_FIXUP_HP_MUTE_LED), 10658 SND_PCI_QUIRK(0x103c, 0x877d, "HP", ALC236_FIXUP_HP_MUTE_LED), 10659 SND_PCI_QUIRK(0x103c, 0x8780, "HP ZBook Fury 17 G7 Mobile Workstation", 10660 ALC285_FIXUP_HP_GPIO_AMP_INIT), 10661 SND_PCI_QUIRK(0x103c, 0x8783, "HP ZBook Fury 15 G7 Mobile Workstation", 10662 ALC285_FIXUP_HP_GPIO_AMP_INIT), 10663 SND_PCI_QUIRK(0x103c, 0x8786, "HP OMEN 15", ALC285_FIXUP_HP_MUTE_LED), 10664 SND_PCI_QUIRK(0x103c, 0x8787, "HP OMEN 15", ALC285_FIXUP_HP_MUTE_LED), 10665 SND_PCI_QUIRK(0x103c, 0x8788, "HP OMEN 15", ALC285_FIXUP_HP_MUTE_LED), 10666 SND_PCI_QUIRK(0x103c, 0x87b7, "HP Laptop 14-fq0xxx", ALC236_FIXUP_HP_MUTE_LED_COEFBIT2), 10667 SND_PCI_QUIRK(0x103c, 0x87c8, "HP", ALC287_FIXUP_HP_GPIO_LED), 10668 SND_PCI_QUIRK(0x103c, 0x87d3, "HP Laptop 15-gw0xxx", ALC236_FIXUP_HP_MUTE_LED_COEFBIT2), 10669 SND_PCI_QUIRK(0x103c, 0x87df, "HP ProBook 430 G8 Notebook PC", ALC236_FIXUP_HP_GPIO_LED), 10670 SND_PCI_QUIRK(0x103c, 0x87e5, "HP ProBook 440 G8 Notebook PC", ALC236_FIXUP_HP_GPIO_LED), 10671 SND_PCI_QUIRK(0x103c, 0x87e7, "HP ProBook 450 G8 Notebook PC", ALC236_FIXUP_HP_GPIO_LED), 10672 SND_PCI_QUIRK(0x103c, 0x87f1, "HP ProBook 630 G8 Notebook PC", ALC236_FIXUP_HP_GPIO_LED), 10673 SND_PCI_QUIRK(0x103c, 0x87f2, "HP ProBook 640 G8 Notebook PC", ALC236_FIXUP_HP_GPIO_LED), 10674 SND_PCI_QUIRK(0x103c, 0x87f4, "HP", ALC287_FIXUP_HP_GPIO_LED), 10675 SND_PCI_QUIRK(0x103c, 0x87f5, "HP", ALC287_FIXUP_HP_GPIO_LED), 10676 SND_PCI_QUIRK(0x103c, 0x87f6, "HP Spectre x360 14", ALC245_FIXUP_HP_X360_AMP), 10677 SND_PCI_QUIRK(0x103c, 0x87f7, "HP Spectre x360 14", ALC245_FIXUP_HP_X360_AMP), 10678 SND_PCI_QUIRK(0x103c, 0x87fd, "HP Laptop 14-dq2xxx", ALC236_FIXUP_HP_MUTE_LED_COEFBIT2), 10679 SND_PCI_QUIRK(0x103c, 0x87fe, "HP Laptop 15s-fq2xxx", ALC236_FIXUP_HP_MUTE_LED_COEFBIT2), 10680 SND_PCI_QUIRK(0x103c, 0x8805, "HP ProBook 650 G8 Notebook PC", ALC236_FIXUP_HP_GPIO_LED), 10681 SND_PCI_QUIRK(0x103c, 0x880d, "HP EliteBook 830 G8 Notebook PC", ALC285_FIXUP_HP_GPIO_LED), 10682 SND_PCI_QUIRK(0x103c, 0x8811, "HP Spectre x360 15-eb1xxx", ALC285_FIXUP_HP_SPECTRE_X360_EB1), 10683 SND_PCI_QUIRK(0x103c, 0x8812, "HP Spectre x360 15-eb1xxx", ALC285_FIXUP_HP_SPECTRE_X360_EB1), 10684 SND_PCI_QUIRK(0x103c, 0x881d, "HP 250 G8 Notebook PC", ALC236_FIXUP_HP_MUTE_LED_COEFBIT2), 10685 SND_PCI_QUIRK(0x103c, 0x881e, "HP Laptop 15s-du3xxx", ALC236_FIXUP_HP_MUTE_LED_COEFBIT2), 10686 SND_PCI_QUIRK(0x103c, 0x8846, "HP EliteBook 850 G8 Notebook PC", ALC285_FIXUP_HP_GPIO_LED), 10687 SND_PCI_QUIRK(0x103c, 0x8847, "HP EliteBook x360 830 G8 Notebook PC", ALC285_FIXUP_HP_GPIO_LED), 10688 SND_PCI_QUIRK(0x103c, 0x884b, "HP EliteBook 840 Aero G8 Notebook PC", ALC285_FIXUP_HP_GPIO_LED), 10689 SND_PCI_QUIRK(0x103c, 0x884c, "HP EliteBook 840 G8 Notebook PC", ALC285_FIXUP_HP_GPIO_LED), 10690 SND_PCI_QUIRK(0x103c, 0x8862, "HP ProBook 445 G8 Notebook PC", ALC236_FIXUP_HP_LIMIT_INT_MIC_BOOST), 10691 SND_PCI_QUIRK(0x103c, 0x8863, "HP ProBook 445 G8 Notebook PC", ALC236_FIXUP_HP_LIMIT_INT_MIC_BOOST), 10692 SND_PCI_QUIRK(0x103c, 0x886d, "HP ZBook Fury 17.3 Inch G8 Mobile Workstation PC", ALC285_FIXUP_HP_GPIO_AMP_INIT), 10693 SND_PCI_QUIRK(0x103c, 0x8870, "HP ZBook Fury 15.6 Inch G8 Mobile Workstation PC", ALC285_FIXUP_HP_GPIO_AMP_INIT), 10694 SND_PCI_QUIRK(0x103c, 0x8873, "HP ZBook Studio 15.6 Inch G8 Mobile Workstation PC", ALC285_FIXUP_HP_GPIO_AMP_INIT), 10695 SND_PCI_QUIRK(0x103c, 0x887a, "HP Laptop 15s-eq2xxx", ALC236_FIXUP_HP_MUTE_LED_COEFBIT2), 10696 SND_PCI_QUIRK(0x103c, 0x887c, "HP Laptop 14s-fq1xxx", ALC236_FIXUP_HP_MUTE_LED_COEFBIT2), 10697 SND_PCI_QUIRK(0x103c, 0x888a, "HP ENVY x360 Convertible 15-eu0xxx", ALC245_FIXUP_HP_X360_MUTE_LEDS), 10698 SND_PCI_QUIRK(0x103c, 0x888d, "HP ZBook Power 15.6 inch G8 Mobile Workstation PC", ALC236_FIXUP_HP_GPIO_LED), 10699 SND_PCI_QUIRK(0x103c, 0x8895, "HP EliteBook 855 G8 Notebook PC", ALC285_FIXUP_HP_SPEAKERS_MICMUTE_LED), 10700 SND_PCI_QUIRK(0x103c, 0x8896, "HP EliteBook 855 G8 Notebook PC", ALC285_FIXUP_HP_MUTE_LED), 10701 SND_PCI_QUIRK(0x103c, 0x8898, "HP EliteBook 845 G8 Notebook PC", ALC285_FIXUP_HP_LIMIT_INT_MIC_BOOST), 10702 SND_PCI_QUIRK(0x103c, 0x88d0, "HP Pavilion 15-eh1xxx (mainboard 88D0)", ALC287_FIXUP_HP_GPIO_LED), 10703 SND_PCI_QUIRK(0x103c, 0x88dd, "HP Pavilion 15z-ec200", ALC285_FIXUP_HP_MUTE_LED), 10704 SND_PCI_QUIRK(0x103c, 0x8902, "HP OMEN 16", ALC285_FIXUP_HP_MUTE_LED), 10705 SND_PCI_QUIRK(0x103c, 0x890e, "HP 255 G8 Notebook PC", ALC236_FIXUP_HP_MUTE_LED_COEFBIT2), 10706 SND_PCI_QUIRK(0x103c, 0x8919, "HP Pavilion Aero Laptop 13-be0xxx", ALC287_FIXUP_HP_GPIO_LED), 10707 SND_PCI_QUIRK(0x103c, 0x896d, "HP ZBook Firefly 16 G9", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED), 10708 SND_PCI_QUIRK(0x103c, 0x896e, "HP EliteBook x360 830 G9", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED), 10709 SND_PCI_QUIRK(0x103c, 0x8971, "HP EliteBook 830 G9", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED), 10710 SND_PCI_QUIRK(0x103c, 0x8972, "HP EliteBook 840 G9", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED), 10711 SND_PCI_QUIRK(0x103c, 0x8973, "HP EliteBook 860 G9", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED), 10712 SND_PCI_QUIRK(0x103c, 0x8974, "HP EliteBook 840 Aero G9", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED), 10713 SND_PCI_QUIRK(0x103c, 0x8975, "HP EliteBook x360 840 Aero G9", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED), 10714 SND_PCI_QUIRK(0x103c, 0x897d, "HP mt440 Mobile Thin Client U74", ALC236_FIXUP_HP_GPIO_LED), 10715 SND_PCI_QUIRK(0x103c, 0x8981, "HP Elite Dragonfly G3", ALC245_FIXUP_CS35L41_SPI_4), 10716 SND_PCI_QUIRK(0x103c, 0x898e, "HP EliteBook 835 G9", ALC287_FIXUP_CS35L41_I2C_2), 10717 SND_PCI_QUIRK(0x103c, 0x898f, "HP EliteBook 835 G9", ALC287_FIXUP_CS35L41_I2C_2), 10718 SND_PCI_QUIRK(0x103c, 0x8991, "HP EliteBook 845 G9", ALC287_FIXUP_CS35L41_I2C_2_HP_GPIO_LED), 10719 SND_PCI_QUIRK(0x103c, 0x8992, "HP EliteBook 845 G9", ALC287_FIXUP_CS35L41_I2C_2), 10720 SND_PCI_QUIRK(0x103c, 0x8994, "HP EliteBook 855 G9", ALC287_FIXUP_CS35L41_I2C_2_HP_GPIO_LED), 10721 SND_PCI_QUIRK(0x103c, 0x8995, "HP EliteBook 855 G9", ALC287_FIXUP_CS35L41_I2C_2), 10722 SND_PCI_QUIRK(0x103c, 0x89a4, "HP ProBook 440 G9", ALC236_FIXUP_HP_GPIO_LED), 10723 SND_PCI_QUIRK(0x103c, 0x89a6, "HP ProBook 450 G9", ALC236_FIXUP_HP_GPIO_LED), 10724 SND_PCI_QUIRK(0x103c, 0x89aa, "HP EliteBook 630 G9", ALC236_FIXUP_HP_GPIO_LED), 10725 SND_PCI_QUIRK(0x103c, 0x89ac, "HP EliteBook 640 G9", ALC236_FIXUP_HP_GPIO_LED), 10726 SND_PCI_QUIRK(0x103c, 0x89ae, "HP EliteBook 650 G9", ALC236_FIXUP_HP_GPIO_LED), 10727 SND_PCI_QUIRK(0x103c, 0x89c0, "HP ZBook Power 15.6 G9", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED), 10728 SND_PCI_QUIRK(0x103c, 0x89c3, "Zbook Studio G9", ALC245_FIXUP_CS35L41_SPI_4_HP_GPIO_LED), 10729 SND_PCI_QUIRK(0x103c, 0x89c6, "Zbook Fury 17 G9", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED), 10730 SND_PCI_QUIRK(0x103c, 0x89ca, "HP", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF), 10731 SND_PCI_QUIRK(0x103c, 0x89d3, "HP EliteBook 645 G9 (MB 89D2)", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF), 10732 SND_PCI_QUIRK(0x103c, 0x89e7, "HP Elite x2 G9", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED), 10733 SND_PCI_QUIRK(0x103c, 0x8a0f, "HP Pavilion 14-ec1xxx", ALC287_FIXUP_HP_GPIO_LED), 10734 SND_PCI_QUIRK(0x103c, 0x8a20, "HP Laptop 15s-fq5xxx", ALC236_FIXUP_HP_MUTE_LED_COEFBIT2), 10735 SND_PCI_QUIRK(0x103c, 0x8a25, "HP Victus 16-d1xxx (MB 8A25)", ALC245_FIXUP_HP_MUTE_LED_COEFBIT), 10736 SND_PCI_QUIRK(0x103c, 0x8a28, "HP Envy 13", ALC287_FIXUP_CS35L41_I2C_2), 10737 SND_PCI_QUIRK(0x103c, 0x8a29, "HP Envy 15", ALC287_FIXUP_CS35L41_I2C_2), 10738 SND_PCI_QUIRK(0x103c, 0x8a2a, "HP Envy 15", ALC287_FIXUP_CS35L41_I2C_2), 10739 SND_PCI_QUIRK(0x103c, 0x8a2b, "HP Envy 15", ALC287_FIXUP_CS35L41_I2C_2), 10740 SND_PCI_QUIRK(0x103c, 0x8a2c, "HP Envy 16", ALC287_FIXUP_CS35L41_I2C_2), 10741 SND_PCI_QUIRK(0x103c, 0x8a2d, "HP Envy 16", ALC287_FIXUP_CS35L41_I2C_2), 10742 SND_PCI_QUIRK(0x103c, 0x8a2e, "HP Envy 16", ALC287_FIXUP_CS35L41_I2C_2), 10743 SND_PCI_QUIRK(0x103c, 0x8a30, "HP Envy 17", ALC287_FIXUP_CS35L41_I2C_2), 10744 SND_PCI_QUIRK(0x103c, 0x8a31, "HP Envy 15", ALC287_FIXUP_CS35L41_I2C_2), 10745 SND_PCI_QUIRK(0x103c, 0x8a6e, "HP EDNA 360", ALC287_FIXUP_CS35L41_I2C_4), 10746 SND_PCI_QUIRK(0x103c, 0x8a74, "HP ProBook 440 G8 Notebook PC", ALC236_FIXUP_HP_GPIO_LED), 10747 SND_PCI_QUIRK(0x103c, 0x8a78, "HP Dev One", ALC285_FIXUP_HP_LIMIT_INT_MIC_BOOST), 10748 SND_PCI_QUIRK(0x103c, 0x8aa0, "HP ProBook 440 G9 (MB 8A9E)", ALC236_FIXUP_HP_GPIO_LED), 10749 SND_PCI_QUIRK(0x103c, 0x8aa3, "HP ProBook 450 G9 (MB 8AA1)", ALC236_FIXUP_HP_GPIO_LED), 10750 SND_PCI_QUIRK(0x103c, 0x8aa8, "HP EliteBook 640 G9 (MB 8AA6)", ALC236_FIXUP_HP_GPIO_LED), 10751 SND_PCI_QUIRK(0x103c, 0x8aab, "HP EliteBook 650 G9 (MB 8AA9)", ALC236_FIXUP_HP_GPIO_LED), 10752 SND_PCI_QUIRK(0x103c, 0x8ab9, "HP EliteBook 840 G8 (MB 8AB8)", ALC285_FIXUP_HP_GPIO_LED), 10753 SND_PCI_QUIRK(0x103c, 0x8abb, "HP ZBook Firefly 14 G9", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED), 10754 SND_PCI_QUIRK(0x103c, 0x8ad1, "HP EliteBook 840 14 inch G9 Notebook PC", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED), 10755 SND_PCI_QUIRK(0x103c, 0x8ad2, "HP EliteBook 860 16 inch G9 Notebook PC", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED), 10756 SND_PCI_QUIRK(0x103c, 0x8ad8, "HP 800 G9", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED), 10757 SND_PCI_QUIRK(0x103c, 0x8b0f, "HP Elite mt645 G7 Mobile Thin Client U81", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF), 10758 SND_PCI_QUIRK(0x103c, 0x8b2f, "HP 255 15.6 inch G10 Notebook PC", ALC236_FIXUP_HP_MUTE_LED_COEFBIT2), 10759 SND_PCI_QUIRK(0x103c, 0x8b3a, "HP Envy 15", ALC287_FIXUP_CS35L41_I2C_2), 10760 SND_PCI_QUIRK(0x103c, 0x8b3f, "HP mt440 Mobile Thin Client U91", ALC236_FIXUP_HP_GPIO_LED), 10761 SND_PCI_QUIRK(0x103c, 0x8b42, "HP", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED), 10762 SND_PCI_QUIRK(0x103c, 0x8b43, "HP", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED), 10763 SND_PCI_QUIRK(0x103c, 0x8b44, "HP", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED), 10764 SND_PCI_QUIRK(0x103c, 0x8b45, "HP", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED), 10765 SND_PCI_QUIRK(0x103c, 0x8b46, "HP", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED), 10766 SND_PCI_QUIRK(0x103c, 0x8b47, "HP", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED), 10767 SND_PCI_QUIRK(0x103c, 0x8b59, "HP Elite mt645 G7 Mobile Thin Client U89", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF), 10768 SND_PCI_QUIRK(0x103c, 0x8b5d, "HP", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF), 10769 SND_PCI_QUIRK(0x103c, 0x8b5e, "HP", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF), 10770 SND_PCI_QUIRK(0x103c, 0x8b5f, "HP", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF), 10771 SND_PCI_QUIRK(0x103c, 0x8b63, "HP Elite Dragonfly 13.5 inch G4", ALC245_FIXUP_CS35L41_SPI_4_HP_GPIO_LED), 10772 SND_PCI_QUIRK(0x103c, 0x8b65, "HP ProBook 455 15.6 inch G10 Notebook PC", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF), 10773 SND_PCI_QUIRK(0x103c, 0x8b66, "HP", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF), 10774 SND_PCI_QUIRK(0x103c, 0x8b70, "HP EliteBook 835 G10", ALC287_FIXUP_CS35L41_I2C_2_HP_GPIO_LED), 10775 SND_PCI_QUIRK(0x103c, 0x8b72, "HP EliteBook 845 G10", ALC287_FIXUP_CS35L41_I2C_2_HP_GPIO_LED), 10776 SND_PCI_QUIRK(0x103c, 0x8b74, "HP EliteBook 845W G10", ALC287_FIXUP_CS35L41_I2C_2_HP_GPIO_LED), 10777 SND_PCI_QUIRK(0x103c, 0x8b77, "HP ElieBook 865 G10", ALC287_FIXUP_CS35L41_I2C_2), 10778 SND_PCI_QUIRK(0x103c, 0x8b7a, "HP", ALC236_FIXUP_HP_GPIO_LED), 10779 SND_PCI_QUIRK(0x103c, 0x8b7d, "HP", ALC236_FIXUP_HP_GPIO_LED), 10780 SND_PCI_QUIRK(0x103c, 0x8b87, "HP", ALC236_FIXUP_HP_GPIO_LED), 10781 SND_PCI_QUIRK(0x103c, 0x8b8a, "HP", ALC236_FIXUP_HP_GPIO_LED), 10782 SND_PCI_QUIRK(0x103c, 0x8b8b, "HP", ALC236_FIXUP_HP_GPIO_LED), 10783 SND_PCI_QUIRK(0x103c, 0x8b8d, "HP", ALC236_FIXUP_HP_GPIO_LED), 10784 SND_PCI_QUIRK(0x103c, 0x8b8f, "HP", ALC245_FIXUP_CS35L41_SPI_4_HP_GPIO_LED), 10785 SND_PCI_QUIRK(0x103c, 0x8b92, "HP", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED), 10786 SND_PCI_QUIRK(0x103c, 0x8b96, "HP", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF), 10787 SND_PCI_QUIRK(0x103c, 0x8b97, "HP", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF), 10788 SND_PCI_QUIRK(0x103c, 0x8bb3, "HP Slim OMEN", ALC287_FIXUP_CS35L41_I2C_2), 10789 SND_PCI_QUIRK(0x103c, 0x8bb4, "HP Slim OMEN", ALC287_FIXUP_CS35L41_I2C_2), 10790 SND_PCI_QUIRK(0x103c, 0x8bcd, "HP Omen 16-xd0xxx", ALC245_FIXUP_HP_MUTE_LED_V1_COEFBIT), 10791 SND_PCI_QUIRK(0x103c, 0x8bdd, "HP Envy 17", ALC287_FIXUP_CS35L41_I2C_2), 10792 SND_PCI_QUIRK(0x103c, 0x8bde, "HP Envy 17", ALC287_FIXUP_CS35L41_I2C_2), 10793 SND_PCI_QUIRK(0x103c, 0x8bdf, "HP Envy 15", ALC287_FIXUP_CS35L41_I2C_2), 10794 SND_PCI_QUIRK(0x103c, 0x8be0, "HP Envy 15", ALC287_FIXUP_CS35L41_I2C_2), 10795 SND_PCI_QUIRK(0x103c, 0x8be1, "HP Envy 15", ALC287_FIXUP_CS35L41_I2C_2), 10796 SND_PCI_QUIRK(0x103c, 0x8be2, "HP Envy 15", ALC287_FIXUP_CS35L41_I2C_2), 10797 SND_PCI_QUIRK(0x103c, 0x8be3, "HP Envy 15", ALC287_FIXUP_CS35L41_I2C_2), 10798 SND_PCI_QUIRK(0x103c, 0x8be5, "HP Envy 16", ALC287_FIXUP_CS35L41_I2C_2), 10799 SND_PCI_QUIRK(0x103c, 0x8be6, "HP Envy 16", ALC287_FIXUP_CS35L41_I2C_2), 10800 SND_PCI_QUIRK(0x103c, 0x8be7, "HP Envy 17", ALC287_FIXUP_CS35L41_I2C_2), 10801 SND_PCI_QUIRK(0x103c, 0x8be8, "HP Envy 17", ALC287_FIXUP_CS35L41_I2C_2), 10802 SND_PCI_QUIRK(0x103c, 0x8be9, "HP Envy 15", ALC287_FIXUP_CS35L41_I2C_2), 10803 SND_PCI_QUIRK(0x103c, 0x8bf0, "HP", ALC236_FIXUP_HP_GPIO_LED), 10804 SND_PCI_QUIRK(0x103c, 0x8c15, "HP Spectre x360 2-in-1 Laptop 14-eu0xxx", ALC245_FIXUP_HP_SPECTRE_X360_EU0XXX), 10805 SND_PCI_QUIRK(0x103c, 0x8c16, "HP Spectre x360 2-in-1 Laptop 16-aa0xxx", ALC245_FIXUP_HP_SPECTRE_X360_16_AA0XXX), 10806 SND_PCI_QUIRK(0x103c, 0x8c17, "HP Spectre 16", ALC287_FIXUP_CS35L41_I2C_2), 10807 SND_PCI_QUIRK(0x103c, 0x8c21, "HP Pavilion Plus Laptop 14-ey0XXX", ALC245_FIXUP_HP_X360_MUTE_LEDS), 10808 SND_PCI_QUIRK(0x103c, 0x8c30, "HP Victus 15-fb1xxx", ALC245_FIXUP_HP_MUTE_LED_COEFBIT), 10809 SND_PCI_QUIRK(0x103c, 0x8c46, "HP EliteBook 830 G11", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED), 10810 SND_PCI_QUIRK(0x103c, 0x8c47, "HP EliteBook 840 G11", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED), 10811 SND_PCI_QUIRK(0x103c, 0x8c48, "HP EliteBook 860 G11", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED), 10812 SND_PCI_QUIRK(0x103c, 0x8c49, "HP Elite x360 830 2-in-1 G11", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED), 10813 SND_PCI_QUIRK(0x103c, 0x8c4d, "HP Omen", ALC287_FIXUP_CS35L41_I2C_2), 10814 SND_PCI_QUIRK(0x103c, 0x8c4e, "HP Omen", ALC287_FIXUP_CS35L41_I2C_2), 10815 SND_PCI_QUIRK(0x103c, 0x8c4f, "HP Envy 15", ALC287_FIXUP_CS35L41_I2C_2), 10816 SND_PCI_QUIRK(0x103c, 0x8c50, "HP Envy 17", ALC287_FIXUP_CS35L41_I2C_2), 10817 SND_PCI_QUIRK(0x103c, 0x8c51, "HP Envy 17", ALC287_FIXUP_CS35L41_I2C_2), 10818 SND_PCI_QUIRK(0x103c, 0x8c52, "HP EliteBook 1040 G11", ALC285_FIXUP_HP_GPIO_LED), 10819 SND_PCI_QUIRK(0x103c, 0x8c53, "HP Elite x360 1040 2-in-1 G11", ALC285_FIXUP_HP_GPIO_LED), 10820 SND_PCI_QUIRK(0x103c, 0x8c66, "HP Envy 16", ALC287_FIXUP_CS35L41_I2C_2), 10821 SND_PCI_QUIRK(0x103c, 0x8c67, "HP Envy 17", ALC287_FIXUP_CS35L41_I2C_2), 10822 SND_PCI_QUIRK(0x103c, 0x8c68, "HP Envy 17", ALC287_FIXUP_CS35L41_I2C_2), 10823 SND_PCI_QUIRK(0x103c, 0x8c6a, "HP Envy 16", ALC287_FIXUP_CS35L41_I2C_2), 10824 SND_PCI_QUIRK(0x103c, 0x8c70, "HP EliteBook 835 G11", ALC287_FIXUP_CS35L41_I2C_2_HP_GPIO_LED), 10825 SND_PCI_QUIRK(0x103c, 0x8c71, "HP EliteBook 845 G11", ALC287_FIXUP_CS35L41_I2C_2_HP_GPIO_LED), 10826 SND_PCI_QUIRK(0x103c, 0x8c72, "HP EliteBook 865 G11", ALC287_FIXUP_CS35L41_I2C_2_HP_GPIO_LED), 10827 SND_PCI_QUIRK(0x103c, 0x8c7b, "HP ProBook 445 G11", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF), 10828 SND_PCI_QUIRK(0x103c, 0x8c7c, "HP ProBook 445 G11", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF), 10829 SND_PCI_QUIRK(0x103c, 0x8c7d, "HP ProBook 465 G11", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF), 10830 SND_PCI_QUIRK(0x103c, 0x8c7e, "HP ProBook 465 G11", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF), 10831 SND_PCI_QUIRK(0x103c, 0x8c7f, "HP EliteBook 645 G11", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF), 10832 SND_PCI_QUIRK(0x103c, 0x8c80, "HP EliteBook 645 G11", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF), 10833 SND_PCI_QUIRK(0x103c, 0x8c81, "HP EliteBook 665 G11", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF), 10834 SND_PCI_QUIRK(0x103c, 0x8c89, "HP ProBook 460 G11", ALC236_FIXUP_HP_GPIO_LED), 10835 SND_PCI_QUIRK(0x103c, 0x8c8a, "HP EliteBook 630", ALC236_FIXUP_HP_GPIO_LED), 10836 SND_PCI_QUIRK(0x103c, 0x8c8c, "HP EliteBook 660", ALC236_FIXUP_HP_GPIO_LED), 10837 SND_PCI_QUIRK(0x103c, 0x8c8d, "HP ProBook 440 G11", ALC236_FIXUP_HP_GPIO_LED), 10838 SND_PCI_QUIRK(0x103c, 0x8c8e, "HP ProBook 460 G11", ALC236_FIXUP_HP_GPIO_LED), 10839 SND_PCI_QUIRK(0x103c, 0x8c90, "HP EliteBook 640", ALC236_FIXUP_HP_GPIO_LED), 10840 SND_PCI_QUIRK(0x103c, 0x8c91, "HP EliteBook 660", ALC236_FIXUP_HP_GPIO_LED), 10841 SND_PCI_QUIRK(0x103c, 0x8c96, "HP", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF), 10842 SND_PCI_QUIRK(0x103c, 0x8c97, "HP ZBook", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF), 10843 SND_PCI_QUIRK(0x103c, 0x8ca1, "HP ZBook Power", ALC236_FIXUP_HP_GPIO_LED), 10844 SND_PCI_QUIRK(0x103c, 0x8ca2, "HP ZBook Power", ALC236_FIXUP_HP_GPIO_LED), 10845 SND_PCI_QUIRK(0x103c, 0x8ca4, "HP ZBook Fury", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED), 10846 SND_PCI_QUIRK(0x103c, 0x8ca7, "HP ZBook Fury", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED), 10847 SND_PCI_QUIRK(0x103c, 0x8caf, "HP Elite mt645 G8 Mobile Thin Client", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF), 10848 SND_PCI_QUIRK(0x103c, 0x8cbd, "HP Pavilion Aero Laptop 13-bg0xxx", ALC245_FIXUP_HP_X360_MUTE_LEDS), 10849 SND_PCI_QUIRK(0x103c, 0x8cdd, "HP Spectre", ALC245_FIXUP_HP_SPECTRE_X360_EU0XXX), 10850 SND_PCI_QUIRK(0x103c, 0x8cde, "HP OmniBook Ultra Flip Laptop 14t", ALC245_FIXUP_HP_SPECTRE_X360_EU0XXX), 10851 SND_PCI_QUIRK(0x103c, 0x8cdf, "HP SnowWhite", ALC287_FIXUP_CS35L41_I2C_2_HP_GPIO_LED), 10852 SND_PCI_QUIRK(0x103c, 0x8ce0, "HP SnowWhite", ALC287_FIXUP_CS35L41_I2C_2_HP_GPIO_LED), 10853 SND_PCI_QUIRK(0x103c, 0x8cf5, "HP ZBook Studio 16", ALC245_FIXUP_CS35L41_SPI_4_HP_GPIO_LED), 10854 SND_PCI_QUIRK(0x103c, 0x8d01, "HP ZBook Power 14 G12", ALC285_FIXUP_HP_GPIO_LED), 10855 SND_PCI_QUIRK(0x103c, 0x8d18, "HP EliteStudio 8 AIO", ALC274_FIXUP_HP_AIO_BIND_DACS), 10856 SND_PCI_QUIRK(0x103c, 0x8d84, "HP EliteBook X G1i", ALC285_FIXUP_HP_GPIO_LED), 10857 SND_PCI_QUIRK(0x103c, 0x8d85, "HP EliteBook 14 G12", ALC285_FIXUP_HP_GPIO_LED), 10858 SND_PCI_QUIRK(0x103c, 0x8d86, "HP Elite X360 14 G12", ALC285_FIXUP_HP_GPIO_LED), 10859 SND_PCI_QUIRK(0x103c, 0x8d8c, "HP EliteBook 13 G12", ALC285_FIXUP_HP_GPIO_LED), 10860 SND_PCI_QUIRK(0x103c, 0x8d8d, "HP Elite X360 13 G12", ALC285_FIXUP_HP_GPIO_LED), 10861 SND_PCI_QUIRK(0x103c, 0x8d8e, "HP EliteBook 14 G12", ALC285_FIXUP_HP_GPIO_LED), 10862 SND_PCI_QUIRK(0x103c, 0x8d8f, "HP EliteBook 14 G12", ALC285_FIXUP_HP_GPIO_LED), 10863 SND_PCI_QUIRK(0x103c, 0x8d90, "HP EliteBook 16 G12", ALC285_FIXUP_HP_GPIO_LED), 10864 SND_PCI_QUIRK(0x103c, 0x8d91, "HP ZBook Firefly 14 G12", ALC285_FIXUP_HP_GPIO_LED), 10865 SND_PCI_QUIRK(0x103c, 0x8d92, "HP ZBook Firefly 16 G12", ALC285_FIXUP_HP_GPIO_LED), 10866 SND_PCI_QUIRK(0x103c, 0x8d9b, "HP 17 Turbine OmniBook 7 UMA", ALC287_FIXUP_CS35L41_I2C_2), 10867 SND_PCI_QUIRK(0x103c, 0x8d9c, "HP 17 Turbine OmniBook 7 DIS", ALC287_FIXUP_CS35L41_I2C_2), 10868 SND_PCI_QUIRK(0x103c, 0x8d9d, "HP 17 Turbine OmniBook X UMA", ALC287_FIXUP_CS35L41_I2C_2), 10869 SND_PCI_QUIRK(0x103c, 0x8d9e, "HP 17 Turbine OmniBook X DIS", ALC287_FIXUP_CS35L41_I2C_2), 10870 SND_PCI_QUIRK(0x103c, 0x8d9f, "HP 14 Cadet (x360)", ALC287_FIXUP_CS35L41_I2C_2), 10871 SND_PCI_QUIRK(0x103c, 0x8da0, "HP 16 Clipper OmniBook 7(X360)", ALC287_FIXUP_CS35L41_I2C_2), 10872 SND_PCI_QUIRK(0x103c, 0x8da1, "HP 16 Clipper OmniBook X", ALC287_FIXUP_CS35L41_I2C_2), 10873 SND_PCI_QUIRK(0x103c, 0x8da7, "HP 14 Enstrom OmniBook X", ALC287_FIXUP_CS35L41_I2C_2), 10874 SND_PCI_QUIRK(0x103c, 0x8da8, "HP 16 Piston OmniBook X", ALC287_FIXUP_CS35L41_I2C_2), 10875 SND_PCI_QUIRK(0x103c, 0x8dd4, "HP EliteStudio 8 AIO", ALC274_FIXUP_HP_AIO_BIND_DACS), 10876 SND_PCI_QUIRK(0x103c, 0x8de8, "HP Gemtree", ALC245_FIXUP_TAS2781_SPI_2), 10877 SND_PCI_QUIRK(0x103c, 0x8de9, "HP Gemtree", ALC245_FIXUP_TAS2781_SPI_2), 10878 SND_PCI_QUIRK(0x103c, 0x8dec, "HP EliteBook 640 G12", ALC236_FIXUP_HP_GPIO_LED), 10879 SND_PCI_QUIRK(0x103c, 0x8ded, "HP EliteBook 640 G12", ALC236_FIXUP_HP_GPIO_LED), 10880 SND_PCI_QUIRK(0x103c, 0x8dee, "HP EliteBook 660 G12", ALC236_FIXUP_HP_GPIO_LED), 10881 SND_PCI_QUIRK(0x103c, 0x8def, "HP EliteBook 660 G12", ALC236_FIXUP_HP_GPIO_LED), 10882 SND_PCI_QUIRK(0x103c, 0x8df0, "HP EliteBook 630 G12", ALC236_FIXUP_HP_GPIO_LED), 10883 SND_PCI_QUIRK(0x103c, 0x8df1, "HP EliteBook 630 G12", ALC236_FIXUP_HP_GPIO_LED), 10884 SND_PCI_QUIRK(0x103c, 0x8dfc, "HP EliteBook 645 G12", ALC236_FIXUP_HP_GPIO_LED), 10885 SND_PCI_QUIRK(0x103c, 0x8dfe, "HP EliteBook 665 G12", ALC236_FIXUP_HP_GPIO_LED), 10886 SND_PCI_QUIRK(0x103c, 0x8e11, "HP Trekker", ALC287_FIXUP_CS35L41_I2C_2), 10887 SND_PCI_QUIRK(0x103c, 0x8e12, "HP Trekker", ALC287_FIXUP_CS35L41_I2C_2), 10888 SND_PCI_QUIRK(0x103c, 0x8e13, "HP Trekker", ALC287_FIXUP_CS35L41_I2C_2), 10889 SND_PCI_QUIRK(0x103c, 0x8e14, "HP ZBook Firefly 14 G12", ALC245_FIXUP_HP_ZBOOK_FIREFLY_G12A), 10890 SND_PCI_QUIRK(0x103c, 0x8e15, "HP ZBook Firefly 14 G12", ALC245_FIXUP_HP_ZBOOK_FIREFLY_G12A), 10891 SND_PCI_QUIRK(0x103c, 0x8e16, "HP ZBook Firefly 14 G12", ALC245_FIXUP_HP_ZBOOK_FIREFLY_G12A), 10892 SND_PCI_QUIRK(0x103c, 0x8e17, "HP ZBook Firefly 14 G12", ALC245_FIXUP_HP_ZBOOK_FIREFLY_G12A), 10893 SND_PCI_QUIRK(0x103c, 0x8e18, "HP ZBook Firefly 14 G12A", ALC245_FIXUP_HP_ZBOOK_FIREFLY_G12A), 10894 SND_PCI_QUIRK(0x103c, 0x8e19, "HP ZBook Firefly 14 G12A", ALC245_FIXUP_HP_ZBOOK_FIREFLY_G12A), 10895 SND_PCI_QUIRK(0x103c, 0x8e1a, "HP ZBook Firefly 14 G12A", ALC245_FIXUP_HP_ZBOOK_FIREFLY_G12A), 10896 SND_PCI_QUIRK(0x103c, 0x8e1b, "HP EliteBook G12", ALC245_FIXUP_HP_ZBOOK_FIREFLY_G12A), 10897 SND_PCI_QUIRK(0x103c, 0x8e1c, "HP EliteBook G12", ALC245_FIXUP_HP_ZBOOK_FIREFLY_G12A), 10898 SND_PCI_QUIRK(0x103c, 0x8e1d, "HP ZBook X Gli 16 G12", ALC236_FIXUP_HP_GPIO_LED), 10899 SND_PCI_QUIRK(0x103c, 0x8e2c, "HP EliteBook 16 G12", ALC285_FIXUP_HP_GPIO_LED), 10900 SND_PCI_QUIRK(0x103c, 0x8e36, "HP 14 Enstrom OmniBook X", ALC287_FIXUP_CS35L41_I2C_2), 10901 SND_PCI_QUIRK(0x103c, 0x8e37, "HP 16 Piston OmniBook X", ALC287_FIXUP_CS35L41_I2C_2), 10902 SND_PCI_QUIRK(0x103c, 0x8e3a, "HP Agusta", ALC287_FIXUP_CS35L41_I2C_2), 10903 SND_PCI_QUIRK(0x103c, 0x8e3b, "HP Agusta", ALC287_FIXUP_CS35L41_I2C_2), 10904 SND_PCI_QUIRK(0x103c, 0x8e60, "HP Trekker ", ALC287_FIXUP_CS35L41_I2C_2), 10905 SND_PCI_QUIRK(0x103c, 0x8e61, "HP Trekker ", ALC287_FIXUP_CS35L41_I2C_2), 10906 SND_PCI_QUIRK(0x103c, 0x8e62, "HP Trekker ", ALC287_FIXUP_CS35L41_I2C_2), 10907 SND_PCI_QUIRK(0x1043, 0x103e, "ASUS X540SA", ALC256_FIXUP_ASUS_MIC), 10908 SND_PCI_QUIRK(0x1043, 0x103f, "ASUS TX300", ALC282_FIXUP_ASUS_TX300), 10909 SND_PCI_QUIRK(0x1043, 0x1054, "ASUS G614FH/FM/FP", ALC287_FIXUP_CS35L41_I2C_2), 10910 SND_PCI_QUIRK(0x1043, 0x106d, "Asus K53BE", ALC269_FIXUP_LIMIT_INT_MIC_BOOST), 10911 SND_PCI_QUIRK(0x1043, 0x106f, "ASUS VivoBook X515UA", ALC256_FIXUP_ASUS_MIC_NO_PRESENCE), 10912 SND_PCI_QUIRK(0x1043, 0x1074, "ASUS G614PH/PM/PP", ALC287_FIXUP_CS35L41_I2C_2), 10913 SND_PCI_QUIRK(0x1043, 0x10a1, "ASUS UX391UA", ALC294_FIXUP_ASUS_SPK), 10914 SND_PCI_QUIRK(0x1043, 0x10a4, "ASUS TP3407SA", ALC287_FIXUP_TAS2781_I2C), 10915 SND_PCI_QUIRK(0x1043, 0x10c0, "ASUS X540SA", ALC256_FIXUP_ASUS_MIC), 10916 SND_PCI_QUIRK(0x1043, 0x10d0, "ASUS X540LA/X540LJ", ALC255_FIXUP_ASUS_MIC_NO_PRESENCE), 10917 SND_PCI_QUIRK(0x1043, 0x10d3, "ASUS K6500ZC", ALC294_FIXUP_ASUS_SPK), 10918 SND_PCI_QUIRK(0x1043, 0x1154, "ASUS TP3607SH", ALC287_FIXUP_TAS2781_I2C), 10919 SND_PCI_QUIRK(0x1043, 0x115d, "Asus 1015E", ALC269_FIXUP_LIMIT_INT_MIC_BOOST), 10920 SND_PCI_QUIRK(0x1043, 0x1194, "ASUS UM3406KA", ALC287_FIXUP_CS35L41_I2C_2), 10921 SND_PCI_QUIRK(0x1043, 0x11c0, "ASUS X556UR", ALC255_FIXUP_ASUS_MIC_NO_PRESENCE), 10922 SND_PCI_QUIRK(0x1043, 0x1204, "ASUS Strix G615JHR_JMR_JPR", ALC287_FIXUP_TAS2781_I2C), 10923 SND_PCI_QUIRK(0x1043, 0x1214, "ASUS Strix G615LH_LM_LP", ALC287_FIXUP_TAS2781_I2C), 10924 SND_PCI_QUIRK(0x1043, 0x125e, "ASUS Q524UQK", ALC255_FIXUP_ASUS_MIC_NO_PRESENCE), 10925 SND_PCI_QUIRK(0x1043, 0x1271, "ASUS X430UN", ALC256_FIXUP_ASUS_MIC_NO_PRESENCE), 10926 SND_PCI_QUIRK(0x1043, 0x1290, "ASUS X441SA", ALC233_FIXUP_EAPD_COEF_AND_MIC_NO_PRESENCE), 10927 SND_PCI_QUIRK(0x1043, 0x1294, "ASUS B3405CVA", ALC245_FIXUP_CS35L41_SPI_2), 10928 SND_PCI_QUIRK(0x1043, 0x12a0, "ASUS X441UV", ALC233_FIXUP_EAPD_COEF_AND_MIC_NO_PRESENCE), 10929 SND_PCI_QUIRK(0x1043, 0x12a3, "Asus N7691ZM", ALC269_FIXUP_ASUS_N7601ZM), 10930 SND_PCI_QUIRK(0x1043, 0x12af, "ASUS UX582ZS", ALC245_FIXUP_CS35L41_SPI_2), 10931 SND_PCI_QUIRK(0x1043, 0x12b4, "ASUS B3405CCA / P3405CCA", ALC294_FIXUP_ASUS_CS35L41_SPI_2), 10932 SND_PCI_QUIRK(0x1043, 0x12e0, "ASUS X541SA", ALC256_FIXUP_ASUS_MIC_NO_PRESENCE), 10933 SND_PCI_QUIRK(0x1043, 0x12f0, "ASUS X541UV", ALC256_FIXUP_ASUS_MIC_NO_PRESENCE), 10934 SND_PCI_QUIRK(0x1043, 0x1313, "Asus K42JZ", ALC269VB_FIXUP_ASUS_MIC_NO_PRESENCE), 10935 SND_PCI_QUIRK(0x1043, 0x13b0, "ASUS Z550SA", ALC256_FIXUP_ASUS_MIC_NO_PRESENCE), 10936 SND_PCI_QUIRK(0x1043, 0x1427, "Asus Zenbook UX31E", ALC269VB_FIXUP_ASUS_ZENBOOK), 10937 SND_PCI_QUIRK(0x1043, 0x1433, "ASUS GX650PY/PZ/PV/PU/PYV/PZV/PIV/PVV", ALC285_FIXUP_ASUS_I2C_HEADSET_MIC), 10938 SND_PCI_QUIRK(0x1043, 0x1460, "Asus VivoBook 15", ALC256_FIXUP_ASUS_MIC_NO_PRESENCE), 10939 SND_PCI_QUIRK(0x1043, 0x1463, "Asus GA402X/GA402N", ALC285_FIXUP_ASUS_I2C_HEADSET_MIC), 10940 SND_PCI_QUIRK(0x1043, 0x1473, "ASUS GU604VI/VC/VE/VG/VJ/VQ/VU/VV/VY/VZ", ALC285_FIXUP_ASUS_HEADSET_MIC), 10941 SND_PCI_QUIRK(0x1043, 0x1483, "ASUS GU603VQ/VU/VV/VJ/VI", ALC285_FIXUP_ASUS_HEADSET_MIC), 10942 SND_PCI_QUIRK(0x1043, 0x1493, "ASUS GV601VV/VU/VJ/VQ/VI", ALC285_FIXUP_ASUS_HEADSET_MIC), 10943 SND_PCI_QUIRK(0x1043, 0x14d3, "ASUS G614JY/JZ/JG", ALC245_FIXUP_CS35L41_SPI_2), 10944 SND_PCI_QUIRK(0x1043, 0x14e3, "ASUS G513PI/PU/PV", ALC287_FIXUP_CS35L41_I2C_2), 10945 SND_PCI_QUIRK(0x1043, 0x14f2, "ASUS VivoBook X515JA", ALC256_FIXUP_ASUS_MIC_NO_PRESENCE), 10946 SND_PCI_QUIRK(0x1043, 0x1503, "ASUS G733PY/PZ/PZV/PYV", ALC287_FIXUP_CS35L41_I2C_2), 10947 SND_PCI_QUIRK(0x1043, 0x1517, "Asus Zenbook UX31A", ALC269VB_FIXUP_ASUS_ZENBOOK_UX31A), 10948 SND_PCI_QUIRK(0x1043, 0x1533, "ASUS GV302XA/XJ/XQ/XU/XV/XI", ALC287_FIXUP_CS35L41_I2C_2), 10949 SND_PCI_QUIRK(0x1043, 0x1573, "ASUS GZ301VV/VQ/VU/VJ/VA/VC/VE/VVC/VQC/VUC/VJC/VEC/VCC", ALC285_FIXUP_ASUS_HEADSET_MIC), 10950 SND_PCI_QUIRK(0x1043, 0x1662, "ASUS GV301QH", ALC294_FIXUP_ASUS_DUAL_SPK), 10951 SND_PCI_QUIRK(0x1043, 0x1663, "ASUS GU603ZI/ZJ/ZQ/ZU/ZV", ALC285_FIXUP_ASUS_HEADSET_MIC), 10952 SND_PCI_QUIRK(0x1043, 0x1683, "ASUS UM3402YAR", ALC287_FIXUP_CS35L41_I2C_2), 10953 SND_PCI_QUIRK(0x1043, 0x16a3, "ASUS UX3402VA", ALC245_FIXUP_CS35L41_SPI_2), 10954 SND_PCI_QUIRK(0x1043, 0x16b2, "ASUS GU603", ALC289_FIXUP_ASUS_GA401), 10955 SND_PCI_QUIRK(0x1043, 0x16d3, "ASUS UX5304VA", ALC245_FIXUP_CS35L41_SPI_2), 10956 SND_PCI_QUIRK(0x1043, 0x16e3, "ASUS UX50", ALC269_FIXUP_STEREO_DMIC), 10957 SND_PCI_QUIRK(0x1043, 0x16f3, "ASUS UX7602VI/BZ", ALC245_FIXUP_CS35L41_SPI_2), 10958 SND_PCI_QUIRK(0x1043, 0x1740, "ASUS UX430UA", ALC295_FIXUP_ASUS_DACS), 10959 SND_PCI_QUIRK(0x1043, 0x17d1, "ASUS UX431FL", ALC294_FIXUP_ASUS_DUAL_SPK), 10960 SND_PCI_QUIRK(0x1043, 0x17f3, "ROG Ally NR2301L/X", ALC294_FIXUP_ASUS_ALLY), 10961 SND_PCI_QUIRK(0x1043, 0x1863, "ASUS UX6404VI/VV", ALC245_FIXUP_CS35L41_SPI_2), 10962 SND_PCI_QUIRK(0x1043, 0x1881, "ASUS Zephyrus S/M", ALC294_FIXUP_ASUS_GX502_PINS), 10963 SND_PCI_QUIRK(0x1043, 0x18b1, "Asus MJ401TA", ALC256_FIXUP_ASUS_HEADSET_MIC), 10964 SND_PCI_QUIRK(0x1043, 0x18d3, "ASUS UM3504DA", ALC294_FIXUP_CS35L41_I2C_2), 10965 SND_PCI_QUIRK(0x1043, 0x18f1, "Asus FX505DT", ALC256_FIXUP_ASUS_HEADSET_MIC), 10966 SND_PCI_QUIRK(0x1043, 0x194e, "ASUS UX563FD", ALC294_FIXUP_ASUS_HPE), 10967 SND_PCI_QUIRK(0x1043, 0x1970, "ASUS UX550VE", ALC289_FIXUP_ASUS_GA401), 10968 SND_PCI_QUIRK(0x1043, 0x1982, "ASUS B1400CEPE", ALC256_FIXUP_ASUS_HPE), 10969 SND_PCI_QUIRK(0x1043, 0x19ce, "ASUS B9450FA", ALC294_FIXUP_ASUS_HPE), 10970 SND_PCI_QUIRK(0x1043, 0x19e1, "ASUS UX581LV", ALC295_FIXUP_ASUS_MIC_NO_PRESENCE), 10971 SND_PCI_QUIRK(0x1043, 0x1a13, "Asus G73Jw", ALC269_FIXUP_ASUS_G73JW), 10972 SND_PCI_QUIRK(0x1043, 0x1a63, "ASUS UX3405MA", ALC245_FIXUP_CS35L41_SPI_2), 10973 SND_PCI_QUIRK(0x1043, 0x1a83, "ASUS UM5302LA", ALC294_FIXUP_CS35L41_I2C_2), 10974 SND_PCI_QUIRK(0x1043, 0x1a8f, "ASUS UX582ZS", ALC245_FIXUP_CS35L41_SPI_2), 10975 SND_PCI_QUIRK(0x1043, 0x1b11, "ASUS UX431DA", ALC294_FIXUP_ASUS_COEF_1B), 10976 SND_PCI_QUIRK(0x1043, 0x1b13, "ASUS U41SV/GA403U", ALC285_FIXUP_ASUS_GA403U_HEADSET_MIC), 10977 SND_PCI_QUIRK(0x1043, 0x1b93, "ASUS G614JVR/JIR", ALC245_FIXUP_CS35L41_SPI_2), 10978 SND_PCI_QUIRK(0x1043, 0x1bbd, "ASUS Z550MA", ALC255_FIXUP_ASUS_MIC_NO_PRESENCE), 10979 SND_PCI_QUIRK(0x1043, 0x1c03, "ASUS UM3406HA", ALC287_FIXUP_CS35L41_I2C_2), 10980 SND_PCI_QUIRK(0x1043, 0x1c23, "Asus X55U", ALC269_FIXUP_LIMIT_INT_MIC_BOOST), 10981 SND_PCI_QUIRK(0x1043, 0x1c33, "ASUS UX5304MA", ALC245_FIXUP_CS35L41_SPI_2), 10982 SND_PCI_QUIRK(0x1043, 0x1c43, "ASUS UX8406MA", ALC245_FIXUP_CS35L41_SPI_2), 10983 SND_PCI_QUIRK(0x1043, 0x1c62, "ASUS GU603", ALC289_FIXUP_ASUS_GA401), 10984 SND_PCI_QUIRK(0x1043, 0x1c63, "ASUS GU605M", ALC285_FIXUP_ASUS_GU605_SPI_SPEAKER2_TO_DAC1), 10985 SND_PCI_QUIRK(0x1043, 0x1c80, "ASUS VivoBook TP401", ALC256_FIXUP_ASUS_MIC_NO_PRESENCE), 10986 SND_PCI_QUIRK(0x1043, 0x1c92, "ASUS ROG Strix G15", ALC285_FIXUP_ASUS_G533Z_PINS), 10987 SND_PCI_QUIRK(0x1043, 0x1c9f, "ASUS G614JU/JV/JI", ALC285_FIXUP_ASUS_HEADSET_MIC), 10988 SND_PCI_QUIRK(0x1043, 0x1caf, "ASUS G634JY/JZ/JI/JG", ALC285_FIXUP_ASUS_SPI_REAR_SPEAKERS), 10989 SND_PCI_QUIRK(0x1043, 0x1ccd, "ASUS X555UB", ALC256_FIXUP_ASUS_MIC_NO_PRESENCE), 10990 SND_PCI_QUIRK(0x1043, 0x1ccf, "ASUS G814JU/JV/JI", ALC245_FIXUP_CS35L41_SPI_2), 10991 SND_PCI_QUIRK(0x1043, 0x1cdf, "ASUS G814JY/JZ/JG", ALC245_FIXUP_CS35L41_SPI_2), 10992 SND_PCI_QUIRK(0x1043, 0x1cef, "ASUS G834JY/JZ/JI/JG", ALC285_FIXUP_ASUS_HEADSET_MIC), 10993 SND_PCI_QUIRK(0x1043, 0x1d1f, "ASUS G713PI/PU/PV/PVN", ALC287_FIXUP_CS35L41_I2C_2), 10994 SND_PCI_QUIRK(0x1043, 0x1d42, "ASUS Zephyrus G14 2022", ALC289_FIXUP_ASUS_GA401), 10995 SND_PCI_QUIRK(0x1043, 0x1d4e, "ASUS TM420", ALC256_FIXUP_ASUS_HPE), 10996 SND_PCI_QUIRK(0x1043, 0x1da2, "ASUS UP6502ZA/ZD", ALC245_FIXUP_CS35L41_SPI_2), 10997 SND_PCI_QUIRK(0x1043, 0x1df3, "ASUS UM5606WA", ALC294_FIXUP_BASS_SPEAKER_15), 10998 SND_PCI_QUIRK(0x1043, 0x1264, "ASUS UM5606KA", ALC294_FIXUP_BASS_SPEAKER_15), 10999 SND_PCI_QUIRK(0x1043, 0x1e02, "ASUS UX3402ZA", ALC245_FIXUP_CS35L41_SPI_2), 11000 SND_PCI_QUIRK(0x1043, 0x1e11, "ASUS Zephyrus G15", ALC289_FIXUP_ASUS_GA502), 11001 SND_PCI_QUIRK(0x1043, 0x1e12, "ASUS UM3402", ALC287_FIXUP_CS35L41_I2C_2), 11002 SND_PCI_QUIRK(0x1043, 0x1e1f, "ASUS Vivobook 15 X1504VAP", ALC2XX_FIXUP_HEADSET_MIC), 11003 SND_PCI_QUIRK(0x1043, 0x1e51, "ASUS Zephyrus M15", ALC294_FIXUP_ASUS_GU502_PINS), 11004 SND_PCI_QUIRK(0x1043, 0x1e5e, "ASUS ROG Strix G513", ALC294_FIXUP_ASUS_G513_PINS), 11005 SND_PCI_QUIRK(0x1043, 0x1e63, "ASUS H7606W", ALC285_FIXUP_ASUS_GU605_SPI_SPEAKER2_TO_DAC1), 11006 SND_PCI_QUIRK(0x1043, 0x1e83, "ASUS GA605W", ALC285_FIXUP_ASUS_GU605_SPI_SPEAKER2_TO_DAC1), 11007 SND_PCI_QUIRK(0x1043, 0x1e8e, "ASUS Zephyrus G15", ALC289_FIXUP_ASUS_GA401), 11008 SND_PCI_QUIRK(0x1043, 0x1eb3, "ASUS Ally RCLA72", ALC287_FIXUP_TAS2781_I2C), 11009 SND_PCI_QUIRK(0x1043, 0x1ed3, "ASUS HN7306W", ALC287_FIXUP_CS35L41_I2C_2), 11010 SND_PCI_QUIRK(0x1043, 0x1ee2, "ASUS UM6702RA/RC", ALC287_FIXUP_CS35L41_I2C_2), 11011 SND_PCI_QUIRK(0x1043, 0x1c52, "ASUS Zephyrus G15 2022", ALC289_FIXUP_ASUS_GA401), 11012 SND_PCI_QUIRK(0x1043, 0x1f11, "ASUS Zephyrus G14", ALC289_FIXUP_ASUS_GA401), 11013 SND_PCI_QUIRK(0x1043, 0x1f12, "ASUS UM5302", ALC287_FIXUP_CS35L41_I2C_2), 11014 SND_PCI_QUIRK(0x1043, 0x1f1f, "ASUS H7604JI/JV/J3D", ALC245_FIXUP_CS35L41_SPI_2), 11015 SND_PCI_QUIRK(0x1043, 0x1f62, "ASUS UX7602ZM", ALC245_FIXUP_CS35L41_SPI_2), 11016 SND_PCI_QUIRK(0x1043, 0x1f63, "ASUS P5405CSA", ALC245_FIXUP_CS35L41_SPI_2), 11017 SND_PCI_QUIRK(0x1043, 0x1f92, "ASUS ROG Flow X16", ALC289_FIXUP_ASUS_GA401), 11018 SND_PCI_QUIRK(0x1043, 0x1fb3, "ASUS ROG Flow Z13 GZ302EA", ALC287_FIXUP_CS35L41_I2C_2), 11019 SND_PCI_QUIRK(0x1043, 0x3011, "ASUS B5605CVA", ALC245_FIXUP_CS35L41_SPI_2), 11020 SND_PCI_QUIRK(0x1043, 0x3030, "ASUS ZN270IE", ALC256_FIXUP_ASUS_AIO_GPIO2), 11021 SND_PCI_QUIRK(0x1043, 0x3061, "ASUS B3405CCA", ALC294_FIXUP_ASUS_CS35L41_SPI_2), 11022 SND_PCI_QUIRK(0x1043, 0x3071, "ASUS B5405CCA", ALC294_FIXUP_ASUS_CS35L41_SPI_2), 11023 SND_PCI_QUIRK(0x1043, 0x30c1, "ASUS B3605CCA / P3605CCA", ALC294_FIXUP_ASUS_CS35L41_SPI_2), 11024 SND_PCI_QUIRK(0x1043, 0x30d1, "ASUS B5405CCA", ALC294_FIXUP_ASUS_CS35L41_SPI_2), 11025 SND_PCI_QUIRK(0x1043, 0x30e1, "ASUS B5605CCA", ALC294_FIXUP_ASUS_CS35L41_SPI_2), 11026 SND_PCI_QUIRK(0x1043, 0x31d0, "ASUS Zen AIO 27 Z272SD_A272SD", ALC274_FIXUP_ASUS_ZEN_AIO_27), 11027 SND_PCI_QUIRK(0x1043, 0x31e1, "ASUS B5605CCA", ALC294_FIXUP_ASUS_CS35L41_SPI_2), 11028 SND_PCI_QUIRK(0x1043, 0x31f1, "ASUS B3605CCA", ALC294_FIXUP_ASUS_CS35L41_SPI_2), 11029 SND_PCI_QUIRK(0x1043, 0x3a20, "ASUS G614JZR", ALC285_FIXUP_ASUS_SPI_REAR_SPEAKERS), 11030 SND_PCI_QUIRK(0x1043, 0x3a30, "ASUS G814JVR/JIR", ALC285_FIXUP_ASUS_SPI_REAR_SPEAKERS), 11031 SND_PCI_QUIRK(0x1043, 0x3a40, "ASUS G814JZR", ALC285_FIXUP_ASUS_SPI_REAR_SPEAKERS), 11032 SND_PCI_QUIRK(0x1043, 0x3a50, "ASUS G834JYR/JZR", ALC285_FIXUP_ASUS_SPI_REAR_SPEAKERS), 11033 SND_PCI_QUIRK(0x1043, 0x3a60, "ASUS G634JYR/JZR", ALC285_FIXUP_ASUS_SPI_REAR_SPEAKERS), 11034 SND_PCI_QUIRK(0x1043, 0x3d78, "ASUS GA603KH", ALC287_FIXUP_CS35L41_I2C_2), 11035 SND_PCI_QUIRK(0x1043, 0x3d88, "ASUS GA603KM", ALC287_FIXUP_CS35L41_I2C_2), 11036 SND_PCI_QUIRK(0x1043, 0x3e00, "ASUS G814FH/FM/FP", ALC287_FIXUP_CS35L41_I2C_2), 11037 SND_PCI_QUIRK(0x1043, 0x3e20, "ASUS G814PH/PM/PP", ALC287_FIXUP_CS35L41_I2C_2), 11038 SND_PCI_QUIRK(0x1043, 0x3e30, "ASUS TP3607SA", ALC287_FIXUP_TAS2781_I2C), 11039 SND_PCI_QUIRK(0x1043, 0x3ee0, "ASUS Strix G815_JHR_JMR_JPR", ALC287_FIXUP_TAS2781_I2C), 11040 SND_PCI_QUIRK(0x1043, 0x3ef0, "ASUS Strix G635LR_LW_LX", ALC287_FIXUP_TAS2781_I2C), 11041 SND_PCI_QUIRK(0x1043, 0x3f00, "ASUS Strix G815LH_LM_LP", ALC287_FIXUP_TAS2781_I2C), 11042 SND_PCI_QUIRK(0x1043, 0x3f10, "ASUS Strix G835LR_LW_LX", ALC287_FIXUP_TAS2781_I2C), 11043 SND_PCI_QUIRK(0x1043, 0x3f20, "ASUS Strix G615LR_LW", ALC287_FIXUP_TAS2781_I2C), 11044 SND_PCI_QUIRK(0x1043, 0x3f30, "ASUS Strix G815LR_LW", ALC287_FIXUP_TAS2781_I2C), 11045 SND_PCI_QUIRK(0x1043, 0x3fd0, "ASUS B3605CVA", ALC245_FIXUP_CS35L41_SPI_2), 11046 SND_PCI_QUIRK(0x1043, 0x3ff0, "ASUS B5405CVA", ALC245_FIXUP_CS35L41_SPI_2), 11047 SND_PCI_QUIRK(0x1043, 0x831a, "ASUS P901", ALC269_FIXUP_STEREO_DMIC), 11048 SND_PCI_QUIRK(0x1043, 0x834a, "ASUS S101", ALC269_FIXUP_STEREO_DMIC), 11049 SND_PCI_QUIRK(0x1043, 0x8398, "ASUS P1005", ALC269_FIXUP_STEREO_DMIC), 11050 SND_PCI_QUIRK(0x1043, 0x83ce, "ASUS P1005", ALC269_FIXUP_STEREO_DMIC), 11051 SND_PCI_QUIRK(0x1043, 0x8516, "ASUS X101CH", ALC269_FIXUP_ASUS_X101), 11052 SND_PCI_QUIRK(0x104d, 0x9073, "Sony VAIO", ALC275_FIXUP_SONY_VAIO_GPIO2), 11053 SND_PCI_QUIRK(0x104d, 0x907b, "Sony VAIO", ALC275_FIXUP_SONY_HWEQ), 11054 SND_PCI_QUIRK(0x104d, 0x9084, "Sony VAIO", ALC275_FIXUP_SONY_HWEQ), 11055 SND_PCI_QUIRK(0x104d, 0x9099, "Sony VAIO S13", ALC275_FIXUP_SONY_DISABLE_AAMIX), 11056 SND_PCI_QUIRK(0x104d, 0x90b5, "Sony VAIO Pro 11", ALC286_FIXUP_SONY_MIC_NO_PRESENCE), 11057 SND_PCI_QUIRK(0x104d, 0x90b6, "Sony VAIO Pro 13", ALC286_FIXUP_SONY_MIC_NO_PRESENCE), 11058 SND_PCI_QUIRK(0x10cf, 0x1475, "Lifebook", ALC269_FIXUP_LIFEBOOK), 11059 SND_PCI_QUIRK(0x10cf, 0x159f, "Lifebook E780", ALC269_FIXUP_LIFEBOOK_NO_HP_TO_LINEOUT), 11060 SND_PCI_QUIRK(0x10cf, 0x15dc, "Lifebook T731", ALC269_FIXUP_LIFEBOOK_HP_PIN), 11061 SND_PCI_QUIRK(0x10cf, 0x1629, "Lifebook U7x7", ALC255_FIXUP_LIFEBOOK_U7x7_HEADSET_MIC), 11062 SND_PCI_QUIRK(0x10cf, 0x1757, "Lifebook E752", ALC269_FIXUP_LIFEBOOK_HP_PIN), 11063 SND_PCI_QUIRK(0x10cf, 0x1845, "Lifebook U904", ALC269_FIXUP_LIFEBOOK_EXTMIC), 11064 SND_PCI_QUIRK(0x10ec, 0x10f2, "Intel Reference board", ALC700_FIXUP_INTEL_REFERENCE), 11065 SND_PCI_QUIRK(0x10ec, 0x118c, "Medion EE4254 MD62100", ALC256_FIXUP_MEDION_HEADSET_NO_PRESENCE), 11066 SND_PCI_QUIRK(0x10ec, 0x119e, "Positivo SU C1400", ALC269_FIXUP_ASPIRE_HEADSET_MIC), 11067 SND_PCI_QUIRK(0x10ec, 0x11bc, "VAIO VJFE-IL", ALC269_FIXUP_LIMIT_INT_MIC_BOOST), 11068 SND_PCI_QUIRK(0x10ec, 0x1230, "Intel Reference board", ALC295_FIXUP_CHROME_BOOK), 11069 SND_PCI_QUIRK(0x10ec, 0x124c, "Intel Reference board", ALC295_FIXUP_CHROME_BOOK), 11070 SND_PCI_QUIRK(0x10ec, 0x1252, "Intel Reference board", ALC295_FIXUP_CHROME_BOOK), 11071 SND_PCI_QUIRK(0x10ec, 0x1254, "Intel Reference board", ALC295_FIXUP_CHROME_BOOK), 11072 SND_PCI_QUIRK(0x10ec, 0x12cc, "Intel Reference board", ALC295_FIXUP_CHROME_BOOK), 11073 SND_PCI_QUIRK(0x10ec, 0x12f6, "Intel Reference board", ALC295_FIXUP_CHROME_BOOK), 11074 SND_PCI_QUIRK(0x10f7, 0x8338, "Panasonic CF-SZ6", ALC269_FIXUP_ASPIRE_HEADSET_MIC), 11075 SND_PCI_QUIRK(0x144d, 0xc109, "Samsung Ativ book 9 (NP900X3G)", ALC269_FIXUP_INV_DMIC), 11076 SND_PCI_QUIRK(0x144d, 0xc169, "Samsung Notebook 9 Pen (NP930SBE-K01US)", ALC298_FIXUP_SAMSUNG_AMP), 11077 SND_PCI_QUIRK(0x144d, 0xc176, "Samsung Notebook 9 Pro (NP930MBE-K04US)", ALC298_FIXUP_SAMSUNG_AMP), 11078 SND_PCI_QUIRK(0x144d, 0xc189, "Samsung Galaxy Flex Book (NT950QCG-X716)", ALC298_FIXUP_SAMSUNG_AMP), 11079 SND_PCI_QUIRK(0x144d, 0xc18a, "Samsung Galaxy Book Ion (NP930XCJ-K01US)", ALC298_FIXUP_SAMSUNG_AMP), 11080 SND_PCI_QUIRK(0x144d, 0xc1a3, "Samsung Galaxy Book Pro (NP935XDB-KC1SE)", ALC298_FIXUP_SAMSUNG_AMP), 11081 SND_PCI_QUIRK(0x144d, 0xc1a4, "Samsung Galaxy Book Pro 360 (NT935QBD)", ALC298_FIXUP_SAMSUNG_AMP), 11082 SND_PCI_QUIRK(0x144d, 0xc1a6, "Samsung Galaxy Book Pro 360 (NP930QBD)", ALC298_FIXUP_SAMSUNG_AMP), 11083 SND_PCI_QUIRK(0x144d, 0xc740, "Samsung Ativ book 8 (NP870Z5G)", ALC269_FIXUP_ATIV_BOOK_8), 11084 SND_PCI_QUIRK(0x144d, 0xc812, "Samsung Notebook Pen S (NT950SBE-X58)", ALC298_FIXUP_SAMSUNG_AMP), 11085 SND_PCI_QUIRK(0x144d, 0xc830, "Samsung Galaxy Book Ion (NT950XCJ-X716A)", ALC298_FIXUP_SAMSUNG_AMP), 11086 SND_PCI_QUIRK(0x144d, 0xc832, "Samsung Galaxy Book Flex Alpha (NP730QCJ)", ALC256_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET), 11087 SND_PCI_QUIRK(0x144d, 0xca03, "Samsung Galaxy Book2 Pro 360 (NP930QED)", ALC298_FIXUP_SAMSUNG_AMP), 11088 SND_PCI_QUIRK(0x144d, 0xca06, "Samsung Galaxy Book3 360 (NP730QFG)", ALC298_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET), 11089 SND_PCI_QUIRK(0x144d, 0xc868, "Samsung Galaxy Book2 Pro (NP930XED)", ALC298_FIXUP_SAMSUNG_AMP), 11090 SND_PCI_QUIRK(0x144d, 0xc870, "Samsung Galaxy Book2 Pro (NP950XED)", ALC298_FIXUP_SAMSUNG_AMP_V2_2_AMPS), 11091 SND_PCI_QUIRK(0x144d, 0xc872, "Samsung Galaxy Book2 Pro (NP950XEE)", ALC298_FIXUP_SAMSUNG_AMP_V2_2_AMPS), 11092 SND_PCI_QUIRK(0x144d, 0xc886, "Samsung Galaxy Book3 Pro (NP964XFG)", ALC298_FIXUP_SAMSUNG_AMP_V2_4_AMPS), 11093 SND_PCI_QUIRK(0x144d, 0xc1ca, "Samsung Galaxy Book3 Pro 360 (NP960QFG)", ALC298_FIXUP_SAMSUNG_AMP_V2_4_AMPS), 11094 SND_PCI_QUIRK(0x144d, 0xc1cc, "Samsung Galaxy Book3 Ultra (NT960XFH)", ALC298_FIXUP_SAMSUNG_AMP_V2_4_AMPS), 11095 SND_PCI_QUIRK(0x1458, 0xfa53, "Gigabyte BXBT-2807", ALC283_FIXUP_HEADSET_MIC), 11096 SND_PCI_QUIRK(0x1462, 0xb120, "MSI Cubi MS-B120", ALC283_FIXUP_HEADSET_MIC), 11097 SND_PCI_QUIRK(0x1462, 0xb171, "Cubi N 8GL (MS-B171)", ALC283_FIXUP_HEADSET_MIC), 11098 SND_PCI_QUIRK(0x152d, 0x1082, "Quanta NL3", ALC269_FIXUP_LIFEBOOK), 11099 SND_PCI_QUIRK(0x152d, 0x1262, "Huawei NBLB-WAX9N", ALC2XX_FIXUP_HEADSET_MIC), 11100 SND_PCI_QUIRK(0x1558, 0x0353, "Clevo V35[05]SN[CDE]Q", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 11101 SND_PCI_QUIRK(0x1558, 0x1323, "Clevo N130ZU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 11102 SND_PCI_QUIRK(0x1558, 0x1325, "Clevo N15[01][CW]U", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 11103 SND_PCI_QUIRK(0x1558, 0x1401, "Clevo L140[CZ]U", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 11104 SND_PCI_QUIRK(0x1558, 0x1403, "Clevo N140CU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 11105 SND_PCI_QUIRK(0x1558, 0x1404, "Clevo N150CU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 11106 SND_PCI_QUIRK(0x1558, 0x14a1, "Clevo L141MU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 11107 SND_PCI_QUIRK(0x1558, 0x2624, "Clevo L240TU", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 11108 SND_PCI_QUIRK(0x1558, 0x28c1, "Clevo V370VND", ALC2XX_FIXUP_HEADSET_MIC), 11109 SND_PCI_QUIRK(0x1558, 0x4018, "Clevo NV40M[BE]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 11110 SND_PCI_QUIRK(0x1558, 0x4019, "Clevo NV40MZ", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 11111 SND_PCI_QUIRK(0x1558, 0x4020, "Clevo NV40MB", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 11112 SND_PCI_QUIRK(0x1558, 0x4041, "Clevo NV4[15]PZ", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 11113 SND_PCI_QUIRK(0x1558, 0x40a1, "Clevo NL40GU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 11114 SND_PCI_QUIRK(0x1558, 0x40c1, "Clevo NL40[CZ]U", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 11115 SND_PCI_QUIRK(0x1558, 0x40d1, "Clevo NL41DU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 11116 SND_PCI_QUIRK(0x1558, 0x5015, "Clevo NH5[58]H[HJK]Q", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 11117 SND_PCI_QUIRK(0x1558, 0x5017, "Clevo NH7[79]H[HJK]Q", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 11118 SND_PCI_QUIRK(0x1558, 0x50a3, "Clevo NJ51GU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 11119 SND_PCI_QUIRK(0x1558, 0x50b3, "Clevo NK50S[BEZ]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 11120 SND_PCI_QUIRK(0x1558, 0x50b6, "Clevo NK50S5", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 11121 SND_PCI_QUIRK(0x1558, 0x50b8, "Clevo NK50SZ", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 11122 SND_PCI_QUIRK(0x1558, 0x50d5, "Clevo NP50D5", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 11123 SND_PCI_QUIRK(0x1558, 0x50e1, "Clevo NH5[58]HPQ", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 11124 SND_PCI_QUIRK(0x1558, 0x50e2, "Clevo NH7[79]HPQ", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 11125 SND_PCI_QUIRK(0x1558, 0x50f0, "Clevo NH50A[CDF]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 11126 SND_PCI_QUIRK(0x1558, 0x50f2, "Clevo NH50E[PR]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 11127 SND_PCI_QUIRK(0x1558, 0x50f3, "Clevo NH58DPQ", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 11128 SND_PCI_QUIRK(0x1558, 0x50f5, "Clevo NH55EPY", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 11129 SND_PCI_QUIRK(0x1558, 0x50f6, "Clevo NH55DPQ", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 11130 SND_PCI_QUIRK(0x1558, 0x5101, "Clevo S510WU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 11131 SND_PCI_QUIRK(0x1558, 0x5157, "Clevo W517GU1", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 11132 SND_PCI_QUIRK(0x1558, 0x51a1, "Clevo NS50MU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 11133 SND_PCI_QUIRK(0x1558, 0x51b1, "Clevo NS50AU", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 11134 SND_PCI_QUIRK(0x1558, 0x51b3, "Clevo NS70AU", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 11135 SND_PCI_QUIRK(0x1558, 0x5630, "Clevo NP50RNJS", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 11136 SND_PCI_QUIRK(0x1558, 0x70a1, "Clevo NB70T[HJK]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 11137 SND_PCI_QUIRK(0x1558, 0x70b3, "Clevo NK70SB", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 11138 SND_PCI_QUIRK(0x1558, 0x70f2, "Clevo NH79EPY", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 11139 SND_PCI_QUIRK(0x1558, 0x70f3, "Clevo NH77DPQ", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 11140 SND_PCI_QUIRK(0x1558, 0x70f4, "Clevo NH77EPY", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 11141 SND_PCI_QUIRK(0x1558, 0x70f6, "Clevo NH77DPQ-Y", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 11142 SND_PCI_QUIRK(0x1558, 0x7716, "Clevo NS50PU", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 11143 SND_PCI_QUIRK(0x1558, 0x7717, "Clevo NS70PU", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 11144 SND_PCI_QUIRK(0x1558, 0x7718, "Clevo L140PU", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 11145 SND_PCI_QUIRK(0x1558, 0x7724, "Clevo L140AU", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 11146 SND_PCI_QUIRK(0x1558, 0x8228, "Clevo NR40BU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 11147 SND_PCI_QUIRK(0x1558, 0x8520, "Clevo NH50D[CD]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 11148 SND_PCI_QUIRK(0x1558, 0x8521, "Clevo NH77D[CD]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 11149 SND_PCI_QUIRK(0x1558, 0x8535, "Clevo NH50D[BE]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 11150 SND_PCI_QUIRK(0x1558, 0x8536, "Clevo NH79D[BE]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 11151 SND_PCI_QUIRK(0x1558, 0x8550, "Clevo NH[57][0-9][ER][ACDH]Q", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 11152 SND_PCI_QUIRK(0x1558, 0x8551, "Clevo NH[57][0-9][ER][ACDH]Q", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 11153 SND_PCI_QUIRK(0x1558, 0x8560, "Clevo NH[57][0-9][ER][ACDH]Q", ALC269_FIXUP_HEADSET_MIC), 11154 SND_PCI_QUIRK(0x1558, 0x8561, "Clevo NH[57][0-9][ER][ACDH]Q", ALC269_FIXUP_HEADSET_MIC), 11155 SND_PCI_QUIRK(0x1558, 0x8562, "Clevo NH[57][0-9]RZ[Q]", ALC269_FIXUP_DMIC), 11156 SND_PCI_QUIRK(0x1558, 0x8668, "Clevo NP50B[BE]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 11157 SND_PCI_QUIRK(0x1558, 0x866d, "Clevo NP5[05]PN[HJK]", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 11158 SND_PCI_QUIRK(0x1558, 0x867c, "Clevo NP7[01]PNP", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 11159 SND_PCI_QUIRK(0x1558, 0x867d, "Clevo NP7[01]PN[HJK]", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 11160 SND_PCI_QUIRK(0x1558, 0x8680, "Clevo NJ50LU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 11161 SND_PCI_QUIRK(0x1558, 0x8686, "Clevo NH50[CZ]U", ALC256_FIXUP_MIC_NO_PRESENCE_AND_RESUME), 11162 SND_PCI_QUIRK(0x1558, 0x8a20, "Clevo NH55DCQ-Y", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 11163 SND_PCI_QUIRK(0x1558, 0x8a51, "Clevo NH70RCQ-Y", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 11164 SND_PCI_QUIRK(0x1558, 0x8d50, "Clevo NH55RCQ-M", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 11165 SND_PCI_QUIRK(0x1558, 0x951d, "Clevo N950T[CDF]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 11166 SND_PCI_QUIRK(0x1558, 0x9600, "Clevo N960K[PR]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 11167 SND_PCI_QUIRK(0x1558, 0x961d, "Clevo N960S[CDF]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 11168 SND_PCI_QUIRK(0x1558, 0x971d, "Clevo N970T[CDF]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 11169 SND_PCI_QUIRK(0x1558, 0xa500, "Clevo NL5[03]RU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 11170 SND_PCI_QUIRK(0x1558, 0xa554, "VAIO VJFH52", ALC269_FIXUP_VAIO_VJFH52_MIC_NO_PRESENCE), 11171 SND_PCI_QUIRK(0x1558, 0xa600, "Clevo NL50NU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 11172 SND_PCI_QUIRK(0x1558, 0xa650, "Clevo NP[567]0SN[CD]", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 11173 SND_PCI_QUIRK(0x1558, 0xa671, "Clevo NP70SN[CDE]", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 11174 SND_PCI_QUIRK(0x1558, 0xa741, "Clevo V54x_6x_TNE", ALC245_FIXUP_CLEVO_NOISY_MIC), 11175 SND_PCI_QUIRK(0x1558, 0xa763, "Clevo V54x_6x_TU", ALC245_FIXUP_CLEVO_NOISY_MIC), 11176 SND_PCI_QUIRK(0x1558, 0xb018, "Clevo NP50D[BE]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 11177 SND_PCI_QUIRK(0x1558, 0xb019, "Clevo NH77D[BE]Q", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 11178 SND_PCI_QUIRK(0x1558, 0xb022, "Clevo NH77D[DC][QW]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 11179 SND_PCI_QUIRK(0x1558, 0xc018, "Clevo NP50D[BE]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 11180 SND_PCI_QUIRK(0x1558, 0xc019, "Clevo NH77D[BE]Q", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 11181 SND_PCI_QUIRK(0x1558, 0xc022, "Clevo NH77[DC][QW]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 11182 SND_PCI_QUIRK(0x17aa, 0x1036, "Lenovo P520", ALC233_FIXUP_LENOVO_MULTI_CODECS), 11183 SND_PCI_QUIRK(0x17aa, 0x1048, "ThinkCentre Station", ALC623_FIXUP_LENOVO_THINKSTATION_P340), 11184 SND_PCI_QUIRK(0x17aa, 0x20f2, "Thinkpad SL410/510", ALC269_FIXUP_SKU_IGNORE), 11185 SND_PCI_QUIRK(0x17aa, 0x215e, "Thinkpad L512", ALC269_FIXUP_SKU_IGNORE), 11186 SND_PCI_QUIRK(0x17aa, 0x21b8, "Thinkpad Edge 14", ALC269_FIXUP_SKU_IGNORE), 11187 SND_PCI_QUIRK(0x17aa, 0x21ca, "Thinkpad L412", ALC269_FIXUP_SKU_IGNORE), 11188 SND_PCI_QUIRK(0x17aa, 0x21e9, "Thinkpad Edge 15", ALC269_FIXUP_SKU_IGNORE), 11189 SND_PCI_QUIRK(0x17aa, 0x21f3, "Thinkpad T430", ALC269_FIXUP_LENOVO_DOCK), 11190 SND_PCI_QUIRK(0x17aa, 0x21f6, "Thinkpad T530", ALC269_FIXUP_LENOVO_DOCK_LIMIT_BOOST), 11191 SND_PCI_QUIRK(0x17aa, 0x21fa, "Thinkpad X230", ALC269_FIXUP_LENOVO_DOCK), 11192 SND_PCI_QUIRK(0x17aa, 0x21fb, "Thinkpad T430s", ALC269_FIXUP_LENOVO_DOCK), 11193 SND_PCI_QUIRK(0x17aa, 0x2203, "Thinkpad X230 Tablet", ALC269_FIXUP_LENOVO_DOCK), 11194 SND_PCI_QUIRK(0x17aa, 0x2208, "Thinkpad T431s", ALC269_FIXUP_LENOVO_DOCK), 11195 SND_PCI_QUIRK(0x17aa, 0x220c, "Thinkpad T440s", ALC292_FIXUP_TPT440), 11196 SND_PCI_QUIRK(0x17aa, 0x220e, "Thinkpad T440p", ALC292_FIXUP_TPT440_DOCK), 11197 SND_PCI_QUIRK(0x17aa, 0x2210, "Thinkpad T540p", ALC292_FIXUP_TPT440_DOCK), 11198 SND_PCI_QUIRK(0x17aa, 0x2211, "Thinkpad W541", ALC292_FIXUP_TPT440_DOCK), 11199 SND_PCI_QUIRK(0x17aa, 0x2212, "Thinkpad T440", ALC292_FIXUP_TPT440_DOCK), 11200 SND_PCI_QUIRK(0x17aa, 0x2214, "Thinkpad X240", ALC292_FIXUP_TPT440_DOCK), 11201 SND_PCI_QUIRK(0x17aa, 0x2215, "Thinkpad", ALC269_FIXUP_LIMIT_INT_MIC_BOOST), 11202 SND_PCI_QUIRK(0x17aa, 0x2218, "Thinkpad X1 Carbon 2nd", ALC292_FIXUP_TPT440_DOCK), 11203 SND_PCI_QUIRK(0x17aa, 0x2223, "ThinkPad T550", ALC292_FIXUP_TPT440_DOCK), 11204 SND_PCI_QUIRK(0x17aa, 0x2226, "ThinkPad X250", ALC292_FIXUP_TPT440_DOCK), 11205 SND_PCI_QUIRK(0x17aa, 0x222d, "Thinkpad", ALC298_FIXUP_TPT470_DOCK), 11206 SND_PCI_QUIRK(0x17aa, 0x222e, "Thinkpad", ALC298_FIXUP_TPT470_DOCK), 11207 SND_PCI_QUIRK(0x17aa, 0x2231, "Thinkpad T560", ALC292_FIXUP_TPT460), 11208 SND_PCI_QUIRK(0x17aa, 0x2233, "Thinkpad", ALC292_FIXUP_TPT460), 11209 SND_PCI_QUIRK(0x17aa, 0x2234, "Thinkpad ICE-1", ALC287_FIXUP_TAS2781_I2C), 11210 SND_PCI_QUIRK(0x17aa, 0x2245, "Thinkpad T470", ALC298_FIXUP_TPT470_DOCK), 11211 SND_PCI_QUIRK(0x17aa, 0x2246, "Thinkpad", ALC298_FIXUP_TPT470_DOCK), 11212 SND_PCI_QUIRK(0x17aa, 0x2247, "Thinkpad", ALC298_FIXUP_TPT470_DOCK), 11213 SND_PCI_QUIRK(0x17aa, 0x2249, "Thinkpad", ALC292_FIXUP_TPT460), 11214 SND_PCI_QUIRK(0x17aa, 0x224b, "Thinkpad", ALC298_FIXUP_TPT470_DOCK), 11215 SND_PCI_QUIRK(0x17aa, 0x224c, "Thinkpad", ALC298_FIXUP_TPT470_DOCK), 11216 SND_PCI_QUIRK(0x17aa, 0x224d, "Thinkpad", ALC298_FIXUP_TPT470_DOCK), 11217 SND_PCI_QUIRK(0x17aa, 0x225d, "Thinkpad T480", ALC269_FIXUP_LIMIT_INT_MIC_BOOST), 11218 SND_PCI_QUIRK(0x17aa, 0x2292, "Thinkpad X1 Carbon 7th", ALC285_FIXUP_THINKPAD_HEADSET_JACK), 11219 SND_PCI_QUIRK(0x17aa, 0x22be, "Thinkpad X1 Carbon 8th", ALC285_FIXUP_THINKPAD_HEADSET_JACK), 11220 SND_PCI_QUIRK(0x17aa, 0x22c1, "Thinkpad P1 Gen 3", ALC285_FIXUP_THINKPAD_NO_BASS_SPK_HEADSET_JACK), 11221 SND_PCI_QUIRK(0x17aa, 0x22c2, "Thinkpad X1 Extreme Gen 3", ALC285_FIXUP_THINKPAD_NO_BASS_SPK_HEADSET_JACK), 11222 SND_PCI_QUIRK(0x17aa, 0x22f1, "Thinkpad", ALC287_FIXUP_MG_RTKC_CSAMP_CS35L41_I2C_THINKPAD), 11223 SND_PCI_QUIRK(0x17aa, 0x22f2, "Thinkpad", ALC287_FIXUP_MG_RTKC_CSAMP_CS35L41_I2C_THINKPAD), 11224 SND_PCI_QUIRK(0x17aa, 0x22f3, "Thinkpad", ALC287_FIXUP_MG_RTKC_CSAMP_CS35L41_I2C_THINKPAD), 11225 SND_PCI_QUIRK(0x17aa, 0x2316, "Thinkpad P1 Gen 6", ALC287_FIXUP_MG_RTKC_CSAMP_CS35L41_I2C_THINKPAD), 11226 SND_PCI_QUIRK(0x17aa, 0x2317, "Thinkpad P1 Gen 6", ALC287_FIXUP_MG_RTKC_CSAMP_CS35L41_I2C_THINKPAD), 11227 SND_PCI_QUIRK(0x17aa, 0x2318, "Thinkpad Z13 Gen2", ALC287_FIXUP_MG_RTKC_CSAMP_CS35L41_I2C_THINKPAD), 11228 SND_PCI_QUIRK(0x17aa, 0x2319, "Thinkpad Z16 Gen2", ALC287_FIXUP_MG_RTKC_CSAMP_CS35L41_I2C_THINKPAD), 11229 SND_PCI_QUIRK(0x17aa, 0x231a, "Thinkpad Z16 Gen2", ALC287_FIXUP_MG_RTKC_CSAMP_CS35L41_I2C_THINKPAD), 11230 SND_PCI_QUIRK(0x17aa, 0x231e, "Thinkpad", ALC287_FIXUP_LENOVO_THKPAD_WH_ALC1318), 11231 SND_PCI_QUIRK(0x17aa, 0x231f, "Thinkpad", ALC287_FIXUP_LENOVO_THKPAD_WH_ALC1318), 11232 SND_PCI_QUIRK(0x17aa, 0x2326, "Hera2", ALC287_FIXUP_TAS2781_I2C), 11233 SND_PCI_QUIRK(0x17aa, 0x30bb, "ThinkCentre AIO", ALC233_FIXUP_LENOVO_LINE2_MIC_HOTKEY), 11234 SND_PCI_QUIRK(0x17aa, 0x30e2, "ThinkCentre AIO", ALC233_FIXUP_LENOVO_LINE2_MIC_HOTKEY), 11235 SND_PCI_QUIRK(0x17aa, 0x310c, "ThinkCentre Station", ALC294_FIXUP_LENOVO_MIC_LOCATION), 11236 SND_PCI_QUIRK(0x17aa, 0x3111, "ThinkCentre Station", ALC294_FIXUP_LENOVO_MIC_LOCATION), 11237 SND_PCI_QUIRK(0x17aa, 0x312a, "ThinkCentre Station", ALC294_FIXUP_LENOVO_MIC_LOCATION), 11238 SND_PCI_QUIRK(0x17aa, 0x312f, "ThinkCentre Station", ALC294_FIXUP_LENOVO_MIC_LOCATION), 11239 SND_PCI_QUIRK(0x17aa, 0x313c, "ThinkCentre Station", ALC294_FIXUP_LENOVO_MIC_LOCATION), 11240 SND_PCI_QUIRK(0x17aa, 0x3151, "ThinkCentre Station", ALC283_FIXUP_HEADSET_MIC), 11241 SND_PCI_QUIRK(0x17aa, 0x3176, "ThinkCentre Station", ALC283_FIXUP_HEADSET_MIC), 11242 SND_PCI_QUIRK(0x17aa, 0x3178, "ThinkCentre Station", ALC283_FIXUP_HEADSET_MIC), 11243 SND_PCI_QUIRK(0x17aa, 0x31af, "ThinkCentre Station", ALC623_FIXUP_LENOVO_THINKSTATION_P340), 11244 SND_PCI_QUIRK(0x17aa, 0x334b, "Lenovo ThinkCentre M70 Gen5", ALC283_FIXUP_HEADSET_MIC), 11245 SND_PCI_QUIRK(0x17aa, 0x3384, "ThinkCentre M90a PRO", ALC233_FIXUP_LENOVO_L2MH_LOW_ENLED), 11246 SND_PCI_QUIRK(0x17aa, 0x3386, "ThinkCentre M90a Gen6", ALC233_FIXUP_LENOVO_L2MH_LOW_ENLED), 11247 SND_PCI_QUIRK(0x17aa, 0x3387, "ThinkCentre M70a Gen6", ALC233_FIXUP_LENOVO_L2MH_LOW_ENLED), 11248 SND_PCI_QUIRK(0x17aa, 0x3801, "Lenovo Yoga9 14IAP7", ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK_PIN), 11249 HDA_CODEC_QUIRK(0x17aa, 0x3802, "DuetITL 2021", ALC287_FIXUP_YOGA7_14ITL_SPEAKERS), 11250 SND_PCI_QUIRK(0x17aa, 0x3802, "Lenovo Yoga Pro 9 14IRP8", ALC287_FIXUP_TAS2781_I2C), 11251 SND_PCI_QUIRK(0x17aa, 0x3813, "Legion 7i 15IMHG05", ALC287_FIXUP_LEGION_15IMHG05_SPEAKERS), 11252 SND_PCI_QUIRK(0x17aa, 0x3818, "Lenovo C940 / Yoga Duet 7", ALC298_FIXUP_LENOVO_C940_DUET7), 11253 SND_PCI_QUIRK(0x17aa, 0x3819, "Lenovo 13s Gen2 ITL", ALC287_FIXUP_13S_GEN2_SPEAKERS), 11254 HDA_CODEC_QUIRK(0x17aa, 0x3820, "IdeaPad 330-17IKB 81DM", ALC269_FIXUP_ASPIRE_HEADSET_MIC), 11255 SND_PCI_QUIRK(0x17aa, 0x3820, "Yoga Duet 7 13ITL6", ALC287_FIXUP_YOGA7_14ITL_SPEAKERS), 11256 SND_PCI_QUIRK(0x17aa, 0x3824, "Legion Y9000X 2020", ALC285_FIXUP_LEGION_Y9000X_SPEAKERS), 11257 SND_PCI_QUIRK(0x17aa, 0x3827, "Ideapad S740", ALC285_FIXUP_IDEAPAD_S740_COEF), 11258 SND_PCI_QUIRK(0x17aa, 0x3834, "Lenovo IdeaPad Slim 9i 14ITL5", ALC287_FIXUP_YOGA7_14ITL_SPEAKERS), 11259 SND_PCI_QUIRK(0x17aa, 0x383d, "Legion Y9000X 2019", ALC285_FIXUP_LEGION_Y9000X_SPEAKERS), 11260 SND_PCI_QUIRK(0x17aa, 0x3843, "Yoga 9i", ALC287_FIXUP_IDEAPAD_BASS_SPK_AMP), 11261 SND_PCI_QUIRK(0x17aa, 0x3847, "Legion 7 16ACHG6", ALC287_FIXUP_LEGION_16ACHG6), 11262 SND_PCI_QUIRK(0x17aa, 0x384a, "Lenovo Yoga 7 15ITL5", ALC287_FIXUP_YOGA7_14ITL_SPEAKERS), 11263 SND_PCI_QUIRK(0x17aa, 0x3852, "Lenovo Yoga 7 14ITL5", ALC287_FIXUP_YOGA7_14ITL_SPEAKERS), 11264 SND_PCI_QUIRK(0x17aa, 0x3853, "Lenovo Yoga 7 15ITL5", ALC287_FIXUP_YOGA7_14ITL_SPEAKERS), 11265 SND_PCI_QUIRK(0x17aa, 0x3855, "Legion 7 16ITHG6", ALC287_FIXUP_LEGION_16ITHG6), 11266 SND_PCI_QUIRK(0x17aa, 0x3865, "Lenovo 13X", ALC287_FIXUP_CS35L41_I2C_2), 11267 SND_PCI_QUIRK(0x17aa, 0x3866, "Lenovo 13X", ALC287_FIXUP_CS35L41_I2C_2), 11268 SND_PCI_QUIRK(0x17aa, 0x3869, "Lenovo Yoga7 14IAL7", ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK_PIN), 11269 HDA_CODEC_QUIRK(0x17aa, 0x386e, "Legion Y9000X 2022 IAH7", ALC287_FIXUP_CS35L41_I2C_2), 11270 SND_PCI_QUIRK(0x17aa, 0x386e, "Yoga Pro 7 14ARP8", ALC285_FIXUP_SPEAKER2_TO_DAC1), 11271 HDA_CODEC_QUIRK(0x17aa, 0x38a8, "Legion Pro 7 16ARX8H", ALC287_FIXUP_TAS2781_I2C), /* this must match before PCI SSID 17aa:386f below */ 11272 SND_PCI_QUIRK(0x17aa, 0x386f, "Legion Pro 7i 16IAX7", ALC287_FIXUP_CS35L41_I2C_2), 11273 SND_PCI_QUIRK(0x17aa, 0x3870, "Lenovo Yoga 7 14ARB7", ALC287_FIXUP_YOGA7_14ARB7_I2C), 11274 SND_PCI_QUIRK(0x17aa, 0x3877, "Lenovo Legion 7 Slim 16ARHA7", ALC287_FIXUP_CS35L41_I2C_2), 11275 SND_PCI_QUIRK(0x17aa, 0x3878, "Lenovo Legion 7 Slim 16ARHA7", ALC287_FIXUP_CS35L41_I2C_2), 11276 SND_PCI_QUIRK(0x17aa, 0x387d, "Yoga S780-16 pro Quad AAC", ALC287_FIXUP_TAS2781_I2C), 11277 SND_PCI_QUIRK(0x17aa, 0x387e, "Yoga S780-16 pro Quad YC", ALC287_FIXUP_TAS2781_I2C), 11278 SND_PCI_QUIRK(0x17aa, 0x387f, "Yoga S780-16 pro dual LX", ALC287_FIXUP_TAS2781_I2C), 11279 SND_PCI_QUIRK(0x17aa, 0x3880, "Yoga S780-16 pro dual YC", ALC287_FIXUP_TAS2781_I2C), 11280 SND_PCI_QUIRK(0x17aa, 0x3881, "YB9 dual power mode2 YC", ALC287_FIXUP_TAS2781_I2C), 11281 SND_PCI_QUIRK(0x17aa, 0x3882, "Lenovo Yoga Pro 7 14APH8", ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK_PIN), 11282 SND_PCI_QUIRK(0x17aa, 0x3884, "Y780 YG DUAL", ALC287_FIXUP_TAS2781_I2C), 11283 SND_PCI_QUIRK(0x17aa, 0x3886, "Y780 VECO DUAL", ALC287_FIXUP_TAS2781_I2C), 11284 SND_PCI_QUIRK(0x17aa, 0x3891, "Lenovo Yoga Pro 7 14AHP9", ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK_PIN), 11285 SND_PCI_QUIRK(0x17aa, 0x38a5, "Y580P AMD dual", ALC287_FIXUP_TAS2781_I2C), 11286 SND_PCI_QUIRK(0x17aa, 0x38a7, "Y780P AMD YG dual", ALC287_FIXUP_TAS2781_I2C), 11287 SND_PCI_QUIRK(0x17aa, 0x38a8, "Y780P AMD VECO dual", ALC287_FIXUP_TAS2781_I2C), 11288 SND_PCI_QUIRK(0x17aa, 0x38a9, "Thinkbook 16P", ALC287_FIXUP_MG_RTKC_CSAMP_CS35L41_I2C_THINKPAD), 11289 SND_PCI_QUIRK(0x17aa, 0x38ab, "Thinkbook 16P", ALC287_FIXUP_MG_RTKC_CSAMP_CS35L41_I2C_THINKPAD), 11290 SND_PCI_QUIRK(0x17aa, 0x38b4, "Legion Slim 7 16IRH8", ALC287_FIXUP_CS35L41_I2C_2), 11291 SND_PCI_QUIRK(0x17aa, 0x38b5, "Legion Slim 7 16IRH8", ALC287_FIXUP_CS35L41_I2C_2), 11292 SND_PCI_QUIRK(0x17aa, 0x38b6, "Legion Slim 7 16APH8", ALC287_FIXUP_CS35L41_I2C_2), 11293 SND_PCI_QUIRK(0x17aa, 0x38b7, "Legion Slim 7 16APH8", ALC287_FIXUP_CS35L41_I2C_2), 11294 SND_PCI_QUIRK(0x17aa, 0x38b8, "Yoga S780-14.5 proX AMD YC Dual", ALC287_FIXUP_TAS2781_I2C), 11295 SND_PCI_QUIRK(0x17aa, 0x38b9, "Yoga S780-14.5 proX AMD LX Dual", ALC287_FIXUP_TAS2781_I2C), 11296 SND_PCI_QUIRK(0x17aa, 0x38ba, "Yoga S780-14.5 Air AMD quad YC", ALC287_FIXUP_TAS2781_I2C), 11297 SND_PCI_QUIRK(0x17aa, 0x38bb, "Yoga S780-14.5 Air AMD quad AAC", ALC287_FIXUP_TAS2781_I2C), 11298 SND_PCI_QUIRK(0x17aa, 0x38be, "Yoga S980-14.5 proX YC Dual", ALC287_FIXUP_TAS2781_I2C), 11299 SND_PCI_QUIRK(0x17aa, 0x38bf, "Yoga S980-14.5 proX LX Dual", ALC287_FIXUP_TAS2781_I2C), 11300 SND_PCI_QUIRK(0x17aa, 0x38c3, "Y980 DUAL", ALC287_FIXUP_TAS2781_I2C), 11301 SND_PCI_QUIRK(0x17aa, 0x38c7, "Thinkbook 13x Gen 4", ALC287_FIXUP_CS35L41_I2C_4), 11302 SND_PCI_QUIRK(0x17aa, 0x38c8, "Thinkbook 13x Gen 4", ALC287_FIXUP_CS35L41_I2C_4), 11303 SND_PCI_QUIRK(0x17aa, 0x38cb, "Y790 YG DUAL", ALC287_FIXUP_TAS2781_I2C), 11304 SND_PCI_QUIRK(0x17aa, 0x38cd, "Y790 VECO DUAL", ALC287_FIXUP_TAS2781_I2C), 11305 SND_PCI_QUIRK(0x17aa, 0x38d2, "Lenovo Yoga 9 14IMH9", ALC287_FIXUP_YOGA9_14IMH9_BASS_SPK_PIN), 11306 SND_PCI_QUIRK(0x17aa, 0x38d3, "Yoga S990-16 Pro IMH YC Dual", ALC287_FIXUP_TAS2781_I2C), 11307 SND_PCI_QUIRK(0x17aa, 0x38d4, "Yoga S990-16 Pro IMH VECO Dual", ALC287_FIXUP_TAS2781_I2C), 11308 SND_PCI_QUIRK(0x17aa, 0x38d5, "Yoga S990-16 Pro IMH YC Quad", ALC287_FIXUP_TAS2781_I2C), 11309 SND_PCI_QUIRK(0x17aa, 0x38d6, "Yoga S990-16 Pro IMH VECO Quad", ALC287_FIXUP_TAS2781_I2C), 11310 SND_PCI_QUIRK(0x17aa, 0x38d7, "Lenovo Yoga 9 14IMH9", ALC287_FIXUP_YOGA9_14IMH9_BASS_SPK_PIN), 11311 SND_PCI_QUIRK(0x17aa, 0x38df, "Yoga Y990 Intel YC Dual", ALC287_FIXUP_TAS2781_I2C), 11312 SND_PCI_QUIRK(0x17aa, 0x38e0, "Yoga Y990 Intel VECO Dual", ALC287_FIXUP_TAS2781_I2C), 11313 SND_PCI_QUIRK(0x17aa, 0x38f8, "Yoga Book 9i", ALC287_FIXUP_TAS2781_I2C), 11314 SND_PCI_QUIRK(0x17aa, 0x38df, "Y990 YG DUAL", ALC287_FIXUP_TAS2781_I2C), 11315 SND_PCI_QUIRK(0x17aa, 0x38f9, "Thinkbook 16P Gen5", ALC287_FIXUP_MG_RTKC_CSAMP_CS35L41_I2C_THINKPAD), 11316 SND_PCI_QUIRK(0x17aa, 0x38fa, "Thinkbook 16P Gen5", ALC287_FIXUP_MG_RTKC_CSAMP_CS35L41_I2C_THINKPAD), 11317 SND_PCI_QUIRK(0x17aa, 0x38fd, "ThinkBook plus Gen5 Hybrid", ALC287_FIXUP_TAS2781_I2C), 11318 SND_PCI_QUIRK(0x17aa, 0x3902, "Lenovo E50-80", ALC269_FIXUP_DMIC_THINKPAD_ACPI), 11319 SND_PCI_QUIRK(0x17aa, 0x390d, "Lenovo Yoga Pro 7 14ASP10", ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK_PIN), 11320 SND_PCI_QUIRK(0x17aa, 0x3913, "Lenovo 145", ALC236_FIXUP_LENOVO_INV_DMIC), 11321 SND_PCI_QUIRK(0x17aa, 0x391f, "Yoga S990-16 pro Quad YC Quad", ALC287_FIXUP_TAS2781_I2C), 11322 SND_PCI_QUIRK(0x17aa, 0x3920, "Yoga S990-16 pro Quad VECO Quad", ALC287_FIXUP_TAS2781_I2C), 11323 SND_PCI_QUIRK(0x17aa, 0x3977, "IdeaPad S210", ALC283_FIXUP_INT_MIC), 11324 SND_PCI_QUIRK(0x17aa, 0x3978, "Lenovo B50-70", ALC269_FIXUP_DMIC_THINKPAD_ACPI), 11325 SND_PCI_QUIRK(0x17aa, 0x3bf8, "Quanta FL1", ALC269_FIXUP_PCM_44K), 11326 SND_PCI_QUIRK(0x17aa, 0x5013, "Thinkpad", ALC269_FIXUP_LIMIT_INT_MIC_BOOST), 11327 SND_PCI_QUIRK(0x17aa, 0x501a, "Thinkpad", ALC283_FIXUP_INT_MIC), 11328 SND_PCI_QUIRK(0x17aa, 0x501e, "Thinkpad L440", ALC292_FIXUP_TPT440_DOCK), 11329 SND_PCI_QUIRK(0x17aa, 0x5026, "Thinkpad", ALC269_FIXUP_LIMIT_INT_MIC_BOOST), 11330 SND_PCI_QUIRK(0x17aa, 0x5034, "Thinkpad T450", ALC292_FIXUP_TPT440_DOCK), 11331 SND_PCI_QUIRK(0x17aa, 0x5036, "Thinkpad T450s", ALC292_FIXUP_TPT440_DOCK), 11332 SND_PCI_QUIRK(0x17aa, 0x503c, "Thinkpad L450", ALC292_FIXUP_TPT440_DOCK), 11333 SND_PCI_QUIRK(0x17aa, 0x504a, "ThinkPad X260", ALC292_FIXUP_TPT440_DOCK), 11334 SND_PCI_QUIRK(0x17aa, 0x504b, "Thinkpad", ALC293_FIXUP_LENOVO_SPK_NOISE), 11335 SND_PCI_QUIRK(0x17aa, 0x5050, "Thinkpad T560p", ALC292_FIXUP_TPT460), 11336 SND_PCI_QUIRK(0x17aa, 0x5051, "Thinkpad L460", ALC292_FIXUP_TPT460), 11337 SND_PCI_QUIRK(0x17aa, 0x5053, "Thinkpad T460", ALC292_FIXUP_TPT460), 11338 SND_PCI_QUIRK(0x17aa, 0x505d, "Thinkpad", ALC298_FIXUP_TPT470_DOCK), 11339 SND_PCI_QUIRK(0x17aa, 0x505f, "Thinkpad", ALC298_FIXUP_TPT470_DOCK), 11340 SND_PCI_QUIRK(0x17aa, 0x5062, "Thinkpad", ALC298_FIXUP_TPT470_DOCK), 11341 SND_PCI_QUIRK(0x17aa, 0x508b, "Thinkpad X12 Gen 1", ALC287_FIXUP_LEGION_15IMHG05_SPEAKERS), 11342 SND_PCI_QUIRK(0x17aa, 0x5109, "Thinkpad", ALC269_FIXUP_LIMIT_INT_MIC_BOOST), 11343 SND_PCI_QUIRK(0x17aa, 0x511e, "Thinkpad", ALC298_FIXUP_TPT470_DOCK), 11344 SND_PCI_QUIRK(0x17aa, 0x511f, "Thinkpad", ALC298_FIXUP_TPT470_DOCK), 11345 SND_PCI_QUIRK(0x17aa, 0x9e54, "LENOVO NB", ALC269_FIXUP_LENOVO_EAPD), 11346 SND_PCI_QUIRK(0x17aa, 0x9e56, "Lenovo ZhaoYang CF4620Z", ALC286_FIXUP_SONY_MIC_NO_PRESENCE), 11347 SND_PCI_QUIRK(0x1849, 0x0269, "Positivo Master C6400", ALC269VB_FIXUP_ASUS_ZENBOOK), 11348 SND_PCI_QUIRK(0x1849, 0x1233, "ASRock NUC Box 1100", ALC233_FIXUP_NO_AUDIO_JACK), 11349 SND_PCI_QUIRK(0x1849, 0xa233, "Positivo Master C6300", ALC269_FIXUP_HEADSET_MIC), 11350 SND_PCI_QUIRK(0x1854, 0x0440, "LG CQ6", ALC256_FIXUP_HEADPHONE_AMP_VOL), 11351 SND_PCI_QUIRK(0x1854, 0x0441, "LG CQ6 AIO", ALC256_FIXUP_HEADPHONE_AMP_VOL), 11352 SND_PCI_QUIRK(0x1854, 0x0488, "LG gram 16 (16Z90R)", ALC298_FIXUP_SAMSUNG_AMP_V2_4_AMPS), 11353 SND_PCI_QUIRK(0x1854, 0x048a, "LG gram 17 (17ZD90R)", ALC298_FIXUP_SAMSUNG_AMP_V2_4_AMPS), 11354 SND_PCI_QUIRK(0x19e5, 0x3204, "Huawei MACH-WX9", ALC256_FIXUP_HUAWEI_MACH_WX9_PINS), 11355 SND_PCI_QUIRK(0x19e5, 0x320f, "Huawei WRT-WX9 ", ALC256_FIXUP_ASUS_MIC_NO_PRESENCE), 11356 SND_PCI_QUIRK(0x19e5, 0x3212, "Huawei KLV-WX9 ", ALC256_FIXUP_ACER_HEADSET_MIC), 11357 SND_PCI_QUIRK(0x1b35, 0x1235, "CZC B20", ALC269_FIXUP_CZC_B20), 11358 SND_PCI_QUIRK(0x1b35, 0x1236, "CZC TMI", ALC269_FIXUP_CZC_TMI), 11359 SND_PCI_QUIRK(0x1b35, 0x1237, "CZC L101", ALC269_FIXUP_CZC_L101), 11360 SND_PCI_QUIRK(0x1b7d, 0xa831, "Ordissimo EVE2 ", ALC269VB_FIXUP_ORDISSIMO_EVE2), /* Also known as Malata PC-B1303 */ 11361 SND_PCI_QUIRK(0x1c06, 0x2013, "Lemote A1802", ALC269_FIXUP_LEMOTE_A1802), 11362 SND_PCI_QUIRK(0x1c06, 0x2015, "Lemote A190X", ALC269_FIXUP_LEMOTE_A190X), 11363 SND_PCI_QUIRK(0x1c6c, 0x122a, "Positivo N14AP7", ALC269_FIXUP_LIMIT_INT_MIC_BOOST), 11364 SND_PCI_QUIRK(0x1c6c, 0x1251, "Positivo N14KP6-TG", ALC288_FIXUP_DELL1_MIC_NO_PRESENCE), 11365 SND_PCI_QUIRK(0x1d05, 0x1132, "TongFang PHxTxX1", ALC256_FIXUP_SET_COEF_DEFAULTS), 11366 SND_PCI_QUIRK(0x1d05, 0x1096, "TongFang GMxMRxx", ALC269_FIXUP_NO_SHUTUP), 11367 SND_PCI_QUIRK(0x1d05, 0x1100, "TongFang GKxNRxx", ALC269_FIXUP_NO_SHUTUP), 11368 SND_PCI_QUIRK(0x1d05, 0x1111, "TongFang GMxZGxx", ALC269_FIXUP_NO_SHUTUP), 11369 SND_PCI_QUIRK(0x1d05, 0x1119, "TongFang GMxZGxx", ALC269_FIXUP_NO_SHUTUP), 11370 SND_PCI_QUIRK(0x1d05, 0x1129, "TongFang GMxZGxx", ALC269_FIXUP_NO_SHUTUP), 11371 SND_PCI_QUIRK(0x1d05, 0x1147, "TongFang GMxTGxx", ALC269_FIXUP_NO_SHUTUP), 11372 SND_PCI_QUIRK(0x1d05, 0x115c, "TongFang GMxTGxx", ALC269_FIXUP_NO_SHUTUP), 11373 SND_PCI_QUIRK(0x1d05, 0x121b, "TongFang GMxAGxx", ALC269_FIXUP_NO_SHUTUP), 11374 SND_PCI_QUIRK(0x1d05, 0x1387, "TongFang GMxIXxx", ALC2XX_FIXUP_HEADSET_MIC), 11375 SND_PCI_QUIRK(0x1d05, 0x1409, "TongFang GMxIXxx", ALC2XX_FIXUP_HEADSET_MIC), 11376 SND_PCI_QUIRK(0x1d17, 0x3288, "Haier Boyue G42", ALC269VC_FIXUP_ACER_VCOPPERBOX_PINS), 11377 SND_PCI_QUIRK(0x1d72, 0x1602, "RedmiBook", ALC255_FIXUP_XIAOMI_HEADSET_MIC), 11378 SND_PCI_QUIRK(0x1d72, 0x1701, "XiaomiNotebook Pro", ALC298_FIXUP_DELL1_MIC_NO_PRESENCE), 11379 SND_PCI_QUIRK(0x1d72, 0x1901, "RedmiBook 14", ALC256_FIXUP_ASUS_HEADSET_MIC), 11380 SND_PCI_QUIRK(0x1d72, 0x1945, "Redmi G", ALC256_FIXUP_ASUS_HEADSET_MIC), 11381 SND_PCI_QUIRK(0x1d72, 0x1947, "RedmiBook Air", ALC255_FIXUP_XIAOMI_HEADSET_MIC), 11382 SND_PCI_QUIRK(0x1f66, 0x0105, "Ayaneo Portable Game Player", ALC287_FIXUP_CS35L41_I2C_2), 11383 SND_PCI_QUIRK(0x2014, 0x800a, "Positivo ARN50", ALC269_FIXUP_LIMIT_INT_MIC_BOOST), 11384 SND_PCI_QUIRK(0x2782, 0x0214, "VAIO VJFE-CL", ALC269_FIXUP_LIMIT_INT_MIC_BOOST), 11385 SND_PCI_QUIRK(0x2782, 0x0228, "Infinix ZERO BOOK 13", ALC269VB_FIXUP_INFINIX_ZERO_BOOK_13), 11386 SND_PCI_QUIRK(0x2782, 0x0232, "CHUWI CoreBook XPro", ALC269VB_FIXUP_CHUWI_COREBOOK_XPRO), 11387 SND_PCI_QUIRK(0x2782, 0x1701, "Infinix Y4 Max", ALC269VC_FIXUP_INFINIX_Y4_MAX), 11388 SND_PCI_QUIRK(0x2782, 0x1705, "MEDION E15433", ALC269VC_FIXUP_INFINIX_Y4_MAX), 11389 SND_PCI_QUIRK(0x2782, 0x1707, "Vaio VJFE-ADL", ALC298_FIXUP_SPK_VOLUME), 11390 SND_PCI_QUIRK(0x2782, 0x4900, "MEDION E15443", ALC233_FIXUP_MEDION_MTL_SPK), 11391 SND_PCI_QUIRK(0x8086, 0x2074, "Intel NUC 8", ALC233_FIXUP_INTEL_NUC8_DMIC), 11392 SND_PCI_QUIRK(0x8086, 0x2080, "Intel NUC 8 Rugged", ALC256_FIXUP_INTEL_NUC8_RUGGED), 11393 SND_PCI_QUIRK(0x8086, 0x2081, "Intel NUC 10", ALC256_FIXUP_INTEL_NUC10), 11394 SND_PCI_QUIRK(0x8086, 0x3038, "Intel NUC 13", ALC295_FIXUP_CHROME_BOOK), 11395 SND_PCI_QUIRK(0xf111, 0x0001, "Framework Laptop", ALC295_FIXUP_FRAMEWORK_LAPTOP_MIC_NO_PRESENCE), 11396 SND_PCI_QUIRK(0xf111, 0x0006, "Framework Laptop", ALC295_FIXUP_FRAMEWORK_LAPTOP_MIC_NO_PRESENCE), 11397 SND_PCI_QUIRK(0xf111, 0x0009, "Framework Laptop", ALC295_FIXUP_FRAMEWORK_LAPTOP_MIC_NO_PRESENCE), 11398 SND_PCI_QUIRK(0xf111, 0x000c, "Framework Laptop", ALC295_FIXUP_FRAMEWORK_LAPTOP_MIC_NO_PRESENCE), 11399 11400 #if 0 11401 /* Below is a quirk table taken from the old code. 11402 * Basically the device should work as is without the fixup table. 11403 * If BIOS doesn't give a proper info, enable the corresponding 11404 * fixup entry. 11405 */ 11406 SND_PCI_QUIRK(0x1043, 0x8330, "ASUS Eeepc P703 P900A", 11407 ALC269_FIXUP_AMIC), 11408 SND_PCI_QUIRK(0x1043, 0x1013, "ASUS N61Da", ALC269_FIXUP_AMIC), 11409 SND_PCI_QUIRK(0x1043, 0x1143, "ASUS B53f", ALC269_FIXUP_AMIC), 11410 SND_PCI_QUIRK(0x1043, 0x1133, "ASUS UJ20ft", ALC269_FIXUP_AMIC), 11411 SND_PCI_QUIRK(0x1043, 0x1183, "ASUS K72DR", ALC269_FIXUP_AMIC), 11412 SND_PCI_QUIRK(0x1043, 0x11b3, "ASUS K52DR", ALC269_FIXUP_AMIC), 11413 SND_PCI_QUIRK(0x1043, 0x11e3, "ASUS U33Jc", ALC269_FIXUP_AMIC), 11414 SND_PCI_QUIRK(0x1043, 0x1273, "ASUS UL80Jt", ALC269_FIXUP_AMIC), 11415 SND_PCI_QUIRK(0x1043, 0x1283, "ASUS U53Jc", ALC269_FIXUP_AMIC), 11416 SND_PCI_QUIRK(0x1043, 0x12b3, "ASUS N82JV", ALC269_FIXUP_AMIC), 11417 SND_PCI_QUIRK(0x1043, 0x12d3, "ASUS N61Jv", ALC269_FIXUP_AMIC), 11418 SND_PCI_QUIRK(0x1043, 0x13a3, "ASUS UL30Vt", ALC269_FIXUP_AMIC), 11419 SND_PCI_QUIRK(0x1043, 0x1373, "ASUS G73JX", ALC269_FIXUP_AMIC), 11420 SND_PCI_QUIRK(0x1043, 0x1383, "ASUS UJ30Jc", ALC269_FIXUP_AMIC), 11421 SND_PCI_QUIRK(0x1043, 0x13d3, "ASUS N61JA", ALC269_FIXUP_AMIC), 11422 SND_PCI_QUIRK(0x1043, 0x1413, "ASUS UL50", ALC269_FIXUP_AMIC), 11423 SND_PCI_QUIRK(0x1043, 0x1443, "ASUS UL30", ALC269_FIXUP_AMIC), 11424 SND_PCI_QUIRK(0x1043, 0x1453, "ASUS M60Jv", ALC269_FIXUP_AMIC), 11425 SND_PCI_QUIRK(0x1043, 0x1483, "ASUS UL80", ALC269_FIXUP_AMIC), 11426 SND_PCI_QUIRK(0x1043, 0x14f3, "ASUS F83Vf", ALC269_FIXUP_AMIC), 11427 SND_PCI_QUIRK(0x1043, 0x14e3, "ASUS UL20", ALC269_FIXUP_AMIC), 11428 SND_PCI_QUIRK(0x1043, 0x1513, "ASUS UX30", ALC269_FIXUP_AMIC), 11429 SND_PCI_QUIRK(0x1043, 0x1593, "ASUS N51Vn", ALC269_FIXUP_AMIC), 11430 SND_PCI_QUIRK(0x1043, 0x15a3, "ASUS N60Jv", ALC269_FIXUP_AMIC), 11431 SND_PCI_QUIRK(0x1043, 0x15b3, "ASUS N60Dp", ALC269_FIXUP_AMIC), 11432 SND_PCI_QUIRK(0x1043, 0x15c3, "ASUS N70De", ALC269_FIXUP_AMIC), 11433 SND_PCI_QUIRK(0x1043, 0x15e3, "ASUS F83T", ALC269_FIXUP_AMIC), 11434 SND_PCI_QUIRK(0x1043, 0x1643, "ASUS M60J", ALC269_FIXUP_AMIC), 11435 SND_PCI_QUIRK(0x1043, 0x1653, "ASUS U50", ALC269_FIXUP_AMIC), 11436 SND_PCI_QUIRK(0x1043, 0x1693, "ASUS F50N", ALC269_FIXUP_AMIC), 11437 SND_PCI_QUIRK(0x1043, 0x16a3, "ASUS F5Q", ALC269_FIXUP_AMIC), 11438 SND_PCI_QUIRK(0x1043, 0x1723, "ASUS P80", ALC269_FIXUP_AMIC), 11439 SND_PCI_QUIRK(0x1043, 0x1743, "ASUS U80", ALC269_FIXUP_AMIC), 11440 SND_PCI_QUIRK(0x1043, 0x1773, "ASUS U20A", ALC269_FIXUP_AMIC), 11441 SND_PCI_QUIRK(0x1043, 0x1883, "ASUS F81Se", ALC269_FIXUP_AMIC), 11442 SND_PCI_QUIRK(0x152d, 0x1778, "Quanta ON1", ALC269_FIXUP_DMIC), 11443 SND_PCI_QUIRK(0x17aa, 0x3be9, "Quanta Wistron", ALC269_FIXUP_AMIC), 11444 SND_PCI_QUIRK(0x17aa, 0x3bf8, "Quanta FL1", ALC269_FIXUP_AMIC), 11445 SND_PCI_QUIRK(0x17ff, 0x059a, "Quanta EL3", ALC269_FIXUP_DMIC), 11446 SND_PCI_QUIRK(0x17ff, 0x059b, "Quanta JR1", ALC269_FIXUP_DMIC), 11447 #endif 11448 {} 11449 }; 11450 11451 static const struct hda_quirk alc269_fixup_vendor_tbl[] = { 11452 SND_PCI_QUIRK_VENDOR(0x1025, "Acer Aspire", ALC271_FIXUP_DMIC), 11453 SND_PCI_QUIRK_VENDOR(0x103c, "HP", ALC269_FIXUP_HP_MUTE_LED), 11454 SND_PCI_QUIRK_VENDOR(0x104d, "Sony VAIO", ALC269_FIXUP_SONY_VAIO), 11455 SND_PCI_QUIRK_VENDOR(0x17aa, "Lenovo XPAD", ALC269_FIXUP_LENOVO_XPAD_ACPI), 11456 SND_PCI_QUIRK_VENDOR(0x19e5, "Huawei Matebook", ALC255_FIXUP_MIC_MUTE_LED), 11457 {} 11458 }; 11459 11460 static const struct hda_model_fixup alc269_fixup_models[] = { 11461 {.id = ALC269_FIXUP_AMIC, .name = "laptop-amic"}, 11462 {.id = ALC269_FIXUP_DMIC, .name = "laptop-dmic"}, 11463 {.id = ALC269_FIXUP_STEREO_DMIC, .name = "alc269-dmic"}, 11464 {.id = ALC271_FIXUP_DMIC, .name = "alc271-dmic"}, 11465 {.id = ALC269_FIXUP_INV_DMIC, .name = "inv-dmic"}, 11466 {.id = ALC269_FIXUP_HEADSET_MIC, .name = "headset-mic"}, 11467 {.id = ALC269_FIXUP_HEADSET_MODE, .name = "headset-mode"}, 11468 {.id = ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC, .name = "headset-mode-no-hp-mic"}, 11469 {.id = ALC269_FIXUP_LENOVO_DOCK, .name = "lenovo-dock"}, 11470 {.id = ALC269_FIXUP_LENOVO_DOCK_LIMIT_BOOST, .name = "lenovo-dock-limit-boost"}, 11471 {.id = ALC269_FIXUP_HP_GPIO_LED, .name = "hp-gpio-led"}, 11472 {.id = ALC269_FIXUP_HP_DOCK_GPIO_MIC1_LED, .name = "hp-dock-gpio-mic1-led"}, 11473 {.id = ALC269_FIXUP_DELL1_MIC_NO_PRESENCE, .name = "dell-headset-multi"}, 11474 {.id = ALC269_FIXUP_DELL2_MIC_NO_PRESENCE, .name = "dell-headset-dock"}, 11475 {.id = ALC269_FIXUP_DELL3_MIC_NO_PRESENCE, .name = "dell-headset3"}, 11476 {.id = ALC269_FIXUP_DELL4_MIC_NO_PRESENCE, .name = "dell-headset4"}, 11477 {.id = ALC269_FIXUP_DELL4_MIC_NO_PRESENCE_QUIET, .name = "dell-headset4-quiet"}, 11478 {.id = ALC283_FIXUP_CHROME_BOOK, .name = "alc283-dac-wcaps"}, 11479 {.id = ALC283_FIXUP_SENSE_COMBO_JACK, .name = "alc283-sense-combo"}, 11480 {.id = ALC292_FIXUP_TPT440_DOCK, .name = "tpt440-dock"}, 11481 {.id = ALC292_FIXUP_TPT440, .name = "tpt440"}, 11482 {.id = ALC292_FIXUP_TPT460, .name = "tpt460"}, 11483 {.id = ALC298_FIXUP_TPT470_DOCK_FIX, .name = "tpt470-dock-fix"}, 11484 {.id = ALC298_FIXUP_TPT470_DOCK, .name = "tpt470-dock"}, 11485 {.id = ALC233_FIXUP_LENOVO_MULTI_CODECS, .name = "dual-codecs"}, 11486 {.id = ALC700_FIXUP_INTEL_REFERENCE, .name = "alc700-ref"}, 11487 {.id = ALC269_FIXUP_SONY_VAIO, .name = "vaio"}, 11488 {.id = ALC269_FIXUP_DELL_M101Z, .name = "dell-m101z"}, 11489 {.id = ALC269_FIXUP_ASUS_G73JW, .name = "asus-g73jw"}, 11490 {.id = ALC269_FIXUP_LENOVO_EAPD, .name = "lenovo-eapd"}, 11491 {.id = ALC275_FIXUP_SONY_HWEQ, .name = "sony-hweq"}, 11492 {.id = ALC269_FIXUP_PCM_44K, .name = "pcm44k"}, 11493 {.id = ALC269_FIXUP_LIFEBOOK, .name = "lifebook"}, 11494 {.id = ALC269_FIXUP_LIFEBOOK_EXTMIC, .name = "lifebook-extmic"}, 11495 {.id = ALC269_FIXUP_LIFEBOOK_HP_PIN, .name = "lifebook-hp-pin"}, 11496 {.id = ALC255_FIXUP_LIFEBOOK_U7x7_HEADSET_MIC, .name = "lifebook-u7x7"}, 11497 {.id = ALC269VB_FIXUP_AMIC, .name = "alc269vb-amic"}, 11498 {.id = ALC269VB_FIXUP_DMIC, .name = "alc269vb-dmic"}, 11499 {.id = ALC269_FIXUP_HP_MUTE_LED_MIC1, .name = "hp-mute-led-mic1"}, 11500 {.id = ALC269_FIXUP_HP_MUTE_LED_MIC2, .name = "hp-mute-led-mic2"}, 11501 {.id = ALC269_FIXUP_HP_MUTE_LED_MIC3, .name = "hp-mute-led-mic3"}, 11502 {.id = ALC269_FIXUP_HP_GPIO_MIC1_LED, .name = "hp-gpio-mic1"}, 11503 {.id = ALC269_FIXUP_HP_LINE1_MIC1_LED, .name = "hp-line1-mic1"}, 11504 {.id = ALC269_FIXUP_NO_SHUTUP, .name = "noshutup"}, 11505 {.id = ALC286_FIXUP_SONY_MIC_NO_PRESENCE, .name = "sony-nomic"}, 11506 {.id = ALC269_FIXUP_ASPIRE_HEADSET_MIC, .name = "aspire-headset-mic"}, 11507 {.id = ALC269_FIXUP_ASUS_X101, .name = "asus-x101"}, 11508 {.id = ALC271_FIXUP_HP_GATE_MIC_JACK, .name = "acer-ao7xx"}, 11509 {.id = ALC271_FIXUP_HP_GATE_MIC_JACK_E1_572, .name = "acer-aspire-e1"}, 11510 {.id = ALC269_FIXUP_ACER_AC700, .name = "acer-ac700"}, 11511 {.id = ALC269_FIXUP_LIMIT_INT_MIC_BOOST, .name = "limit-mic-boost"}, 11512 {.id = ALC269VB_FIXUP_ASUS_ZENBOOK, .name = "asus-zenbook"}, 11513 {.id = ALC269VB_FIXUP_ASUS_ZENBOOK_UX31A, .name = "asus-zenbook-ux31a"}, 11514 {.id = ALC269VB_FIXUP_ORDISSIMO_EVE2, .name = "ordissimo"}, 11515 {.id = ALC282_FIXUP_ASUS_TX300, .name = "asus-tx300"}, 11516 {.id = ALC283_FIXUP_INT_MIC, .name = "alc283-int-mic"}, 11517 {.id = ALC290_FIXUP_MONO_SPEAKERS_HSJACK, .name = "mono-speakers"}, 11518 {.id = ALC290_FIXUP_SUBWOOFER_HSJACK, .name = "alc290-subwoofer"}, 11519 {.id = ALC269_FIXUP_THINKPAD_ACPI, .name = "thinkpad"}, 11520 {.id = ALC269_FIXUP_LENOVO_XPAD_ACPI, .name = "lenovo-xpad-led"}, 11521 {.id = ALC269_FIXUP_DMIC_THINKPAD_ACPI, .name = "dmic-thinkpad"}, 11522 {.id = ALC255_FIXUP_ACER_MIC_NO_PRESENCE, .name = "alc255-acer"}, 11523 {.id = ALC255_FIXUP_ASUS_MIC_NO_PRESENCE, .name = "alc255-asus"}, 11524 {.id = ALC255_FIXUP_DELL1_MIC_NO_PRESENCE, .name = "alc255-dell1"}, 11525 {.id = ALC255_FIXUP_DELL2_MIC_NO_PRESENCE, .name = "alc255-dell2"}, 11526 {.id = ALC293_FIXUP_DELL1_MIC_NO_PRESENCE, .name = "alc293-dell1"}, 11527 {.id = ALC283_FIXUP_HEADSET_MIC, .name = "alc283-headset"}, 11528 {.id = ALC255_FIXUP_MIC_MUTE_LED, .name = "alc255-dell-mute"}, 11529 {.id = ALC282_FIXUP_ASPIRE_V5_PINS, .name = "aspire-v5"}, 11530 {.id = ALC269VB_FIXUP_ASPIRE_E1_COEF, .name = "aspire-e1-coef"}, 11531 {.id = ALC280_FIXUP_HP_GPIO4, .name = "hp-gpio4"}, 11532 {.id = ALC286_FIXUP_HP_GPIO_LED, .name = "hp-gpio-led"}, 11533 {.id = ALC280_FIXUP_HP_GPIO2_MIC_HOTKEY, .name = "hp-gpio2-hotkey"}, 11534 {.id = ALC280_FIXUP_HP_DOCK_PINS, .name = "hp-dock-pins"}, 11535 {.id = ALC269_FIXUP_HP_DOCK_GPIO_MIC1_LED, .name = "hp-dock-gpio-mic"}, 11536 {.id = ALC280_FIXUP_HP_9480M, .name = "hp-9480m"}, 11537 {.id = ALC288_FIXUP_DELL_HEADSET_MODE, .name = "alc288-dell-headset"}, 11538 {.id = ALC288_FIXUP_DELL1_MIC_NO_PRESENCE, .name = "alc288-dell1"}, 11539 {.id = ALC288_FIXUP_DELL_XPS_13, .name = "alc288-dell-xps13"}, 11540 {.id = ALC292_FIXUP_DELL_E7X, .name = "dell-e7x"}, 11541 {.id = ALC293_FIXUP_DISABLE_AAMIX_MULTIJACK, .name = "alc293-dell"}, 11542 {.id = ALC298_FIXUP_DELL1_MIC_NO_PRESENCE, .name = "alc298-dell1"}, 11543 {.id = ALC298_FIXUP_DELL_AIO_MIC_NO_PRESENCE, .name = "alc298-dell-aio"}, 11544 {.id = ALC275_FIXUP_DELL_XPS, .name = "alc275-dell-xps"}, 11545 {.id = ALC293_FIXUP_LENOVO_SPK_NOISE, .name = "lenovo-spk-noise"}, 11546 {.id = ALC233_FIXUP_LENOVO_LINE2_MIC_HOTKEY, .name = "lenovo-hotkey"}, 11547 {.id = ALC255_FIXUP_DELL_SPK_NOISE, .name = "dell-spk-noise"}, 11548 {.id = ALC225_FIXUP_DELL1_MIC_NO_PRESENCE, .name = "alc225-dell1"}, 11549 {.id = ALC295_FIXUP_DISABLE_DAC3, .name = "alc295-disable-dac3"}, 11550 {.id = ALC285_FIXUP_SPEAKER2_TO_DAC1, .name = "alc285-speaker2-to-dac1"}, 11551 {.id = ALC280_FIXUP_HP_HEADSET_MIC, .name = "alc280-hp-headset"}, 11552 {.id = ALC221_FIXUP_HP_FRONT_MIC, .name = "alc221-hp-mic"}, 11553 {.id = ALC298_FIXUP_SPK_VOLUME, .name = "alc298-spk-volume"}, 11554 {.id = ALC256_FIXUP_DELL_INSPIRON_7559_SUBWOOFER, .name = "dell-inspiron-7559"}, 11555 {.id = ALC269_FIXUP_ATIV_BOOK_8, .name = "ativ-book"}, 11556 {.id = ALC221_FIXUP_HP_MIC_NO_PRESENCE, .name = "alc221-hp-mic"}, 11557 {.id = ALC256_FIXUP_ASUS_HEADSET_MODE, .name = "alc256-asus-headset"}, 11558 {.id = ALC256_FIXUP_ASUS_MIC, .name = "alc256-asus-mic"}, 11559 {.id = ALC256_FIXUP_ASUS_AIO_GPIO2, .name = "alc256-asus-aio"}, 11560 {.id = ALC233_FIXUP_ASUS_MIC_NO_PRESENCE, .name = "alc233-asus"}, 11561 {.id = ALC233_FIXUP_EAPD_COEF_AND_MIC_NO_PRESENCE, .name = "alc233-eapd"}, 11562 {.id = ALC294_FIXUP_LENOVO_MIC_LOCATION, .name = "alc294-lenovo-mic"}, 11563 {.id = ALC225_FIXUP_DELL_WYSE_MIC_NO_PRESENCE, .name = "alc225-wyse"}, 11564 {.id = ALC274_FIXUP_DELL_AIO_LINEOUT_VERB, .name = "alc274-dell-aio"}, 11565 {.id = ALC255_FIXUP_DUMMY_LINEOUT_VERB, .name = "alc255-dummy-lineout"}, 11566 {.id = ALC255_FIXUP_DELL_HEADSET_MIC, .name = "alc255-dell-headset"}, 11567 {.id = ALC295_FIXUP_HP_X360, .name = "alc295-hp-x360"}, 11568 {.id = ALC225_FIXUP_HEADSET_JACK, .name = "alc-headset-jack"}, 11569 {.id = ALC295_FIXUP_CHROME_BOOK, .name = "alc-chrome-book"}, 11570 {.id = ALC256_FIXUP_CHROME_BOOK, .name = "alc-2024y-chromebook"}, 11571 {.id = ALC299_FIXUP_PREDATOR_SPK, .name = "predator-spk"}, 11572 {.id = ALC298_FIXUP_HUAWEI_MBX_STEREO, .name = "huawei-mbx-stereo"}, 11573 {.id = ALC256_FIXUP_MEDION_HEADSET_NO_PRESENCE, .name = "alc256-medion-headset"}, 11574 {.id = ALC298_FIXUP_SAMSUNG_AMP, .name = "alc298-samsung-amp"}, 11575 {.id = ALC298_FIXUP_SAMSUNG_AMP_V2_2_AMPS, .name = "alc298-samsung-amp-v2-2-amps"}, 11576 {.id = ALC298_FIXUP_SAMSUNG_AMP_V2_4_AMPS, .name = "alc298-samsung-amp-v2-4-amps"}, 11577 {.id = ALC256_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET, .name = "alc256-samsung-headphone"}, 11578 {.id = ALC255_FIXUP_XIAOMI_HEADSET_MIC, .name = "alc255-xiaomi-headset"}, 11579 {.id = ALC274_FIXUP_HP_MIC, .name = "alc274-hp-mic-detect"}, 11580 {.id = ALC245_FIXUP_HP_X360_AMP, .name = "alc245-hp-x360-amp"}, 11581 {.id = ALC295_FIXUP_HP_OMEN, .name = "alc295-hp-omen"}, 11582 {.id = ALC285_FIXUP_HP_SPECTRE_X360, .name = "alc285-hp-spectre-x360"}, 11583 {.id = ALC285_FIXUP_HP_SPECTRE_X360_EB1, .name = "alc285-hp-spectre-x360-eb1"}, 11584 {.id = ALC285_FIXUP_HP_SPECTRE_X360_DF1, .name = "alc285-hp-spectre-x360-df1"}, 11585 {.id = ALC285_FIXUP_HP_ENVY_X360, .name = "alc285-hp-envy-x360"}, 11586 {.id = ALC287_FIXUP_IDEAPAD_BASS_SPK_AMP, .name = "alc287-ideapad-bass-spk-amp"}, 11587 {.id = ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK_PIN, .name = "alc287-yoga9-bass-spk-pin"}, 11588 {.id = ALC623_FIXUP_LENOVO_THINKSTATION_P340, .name = "alc623-lenovo-thinkstation-p340"}, 11589 {.id = ALC255_FIXUP_ACER_HEADPHONE_AND_MIC, .name = "alc255-acer-headphone-and-mic"}, 11590 {.id = ALC285_FIXUP_HP_GPIO_AMP_INIT, .name = "alc285-hp-amp-init"}, 11591 {.id = ALC236_FIXUP_LENOVO_INV_DMIC, .name = "alc236-fixup-lenovo-inv-mic"}, 11592 {.id = ALC2XX_FIXUP_HEADSET_MIC, .name = "alc2xx-fixup-headset-mic"}, 11593 {} 11594 }; 11595 #define ALC225_STANDARD_PINS \ 11596 {0x21, 0x04211020} 11597 11598 #define ALC256_STANDARD_PINS \ 11599 {0x12, 0x90a60140}, \ 11600 {0x14, 0x90170110}, \ 11601 {0x21, 0x02211020} 11602 11603 #define ALC282_STANDARD_PINS \ 11604 {0x14, 0x90170110} 11605 11606 #define ALC290_STANDARD_PINS \ 11607 {0x12, 0x99a30130} 11608 11609 #define ALC292_STANDARD_PINS \ 11610 {0x14, 0x90170110}, \ 11611 {0x15, 0x0221401f} 11612 11613 #define ALC295_STANDARD_PINS \ 11614 {0x12, 0xb7a60130}, \ 11615 {0x14, 0x90170110}, \ 11616 {0x21, 0x04211020} 11617 11618 #define ALC298_STANDARD_PINS \ 11619 {0x12, 0x90a60130}, \ 11620 {0x21, 0x03211020} 11621 11622 static const struct snd_hda_pin_quirk alc269_pin_fixup_tbl[] = { 11623 SND_HDA_PIN_QUIRK(0x10ec0221, 0x103c, "HP Workstation", ALC221_FIXUP_HP_HEADSET_MIC, 11624 {0x14, 0x01014020}, 11625 {0x17, 0x90170110}, 11626 {0x18, 0x02a11030}, 11627 {0x19, 0x0181303F}, 11628 {0x21, 0x0221102f}), 11629 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1025, "Acer", ALC255_FIXUP_ACER_MIC_NO_PRESENCE, 11630 {0x12, 0x90a601c0}, 11631 {0x14, 0x90171120}, 11632 {0x21, 0x02211030}), 11633 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1043, "ASUS", ALC255_FIXUP_ASUS_MIC_NO_PRESENCE, 11634 {0x14, 0x90170110}, 11635 {0x1b, 0x90a70130}, 11636 {0x21, 0x03211020}), 11637 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1043, "ASUS", ALC255_FIXUP_ASUS_MIC_NO_PRESENCE, 11638 {0x1a, 0x90a70130}, 11639 {0x1b, 0x90170110}, 11640 {0x21, 0x03211020}), 11641 SND_HDA_PIN_QUIRK(0x10ec0225, 0x1028, "Dell", ALC225_FIXUP_DELL1_MIC_NO_PRESENCE, 11642 ALC225_STANDARD_PINS, 11643 {0x12, 0xb7a60130}, 11644 {0x14, 0x901701a0}), 11645 SND_HDA_PIN_QUIRK(0x10ec0225, 0x1028, "Dell", ALC225_FIXUP_DELL1_MIC_NO_PRESENCE, 11646 ALC225_STANDARD_PINS, 11647 {0x12, 0xb7a60130}, 11648 {0x14, 0x901701b0}), 11649 SND_HDA_PIN_QUIRK(0x10ec0225, 0x1028, "Dell", ALC225_FIXUP_DELL1_MIC_NO_PRESENCE, 11650 ALC225_STANDARD_PINS, 11651 {0x12, 0xb7a60150}, 11652 {0x14, 0x901701a0}), 11653 SND_HDA_PIN_QUIRK(0x10ec0225, 0x1028, "Dell", ALC225_FIXUP_DELL1_MIC_NO_PRESENCE, 11654 ALC225_STANDARD_PINS, 11655 {0x12, 0xb7a60150}, 11656 {0x14, 0x901701b0}), 11657 SND_HDA_PIN_QUIRK(0x10ec0225, 0x1028, "Dell", ALC225_FIXUP_DELL1_MIC_NO_PRESENCE, 11658 ALC225_STANDARD_PINS, 11659 {0x12, 0xb7a60130}, 11660 {0x1b, 0x90170110}), 11661 SND_HDA_PIN_QUIRK(0x10ec0233, 0x8086, "Intel NUC Skull Canyon", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE, 11662 {0x1b, 0x01111010}, 11663 {0x1e, 0x01451130}, 11664 {0x21, 0x02211020}), 11665 SND_HDA_PIN_QUIRK(0x10ec0235, 0x17aa, "Lenovo", ALC233_FIXUP_LENOVO_LINE2_MIC_HOTKEY, 11666 {0x12, 0x90a60140}, 11667 {0x14, 0x90170110}, 11668 {0x19, 0x02a11030}, 11669 {0x21, 0x02211020}), 11670 SND_HDA_PIN_QUIRK(0x10ec0235, 0x17aa, "Lenovo", ALC294_FIXUP_LENOVO_MIC_LOCATION, 11671 {0x14, 0x90170110}, 11672 {0x19, 0x02a11030}, 11673 {0x1a, 0x02a11040}, 11674 {0x1b, 0x01014020}, 11675 {0x21, 0x0221101f}), 11676 SND_HDA_PIN_QUIRK(0x10ec0235, 0x17aa, "Lenovo", ALC294_FIXUP_LENOVO_MIC_LOCATION, 11677 {0x14, 0x90170110}, 11678 {0x19, 0x02a11030}, 11679 {0x1a, 0x02a11040}, 11680 {0x1b, 0x01011020}, 11681 {0x21, 0x0221101f}), 11682 SND_HDA_PIN_QUIRK(0x10ec0235, 0x17aa, "Lenovo", ALC294_FIXUP_LENOVO_MIC_LOCATION, 11683 {0x14, 0x90170110}, 11684 {0x19, 0x02a11020}, 11685 {0x1a, 0x02a11030}, 11686 {0x21, 0x0221101f}), 11687 SND_HDA_PIN_QUIRK(0x10ec0236, 0x1028, "Dell", ALC236_FIXUP_DELL_AIO_HEADSET_MIC, 11688 {0x21, 0x02211010}), 11689 SND_HDA_PIN_QUIRK(0x10ec0236, 0x103c, "HP", ALC256_FIXUP_HP_HEADSET_MIC, 11690 {0x14, 0x90170110}, 11691 {0x19, 0x02a11020}, 11692 {0x21, 0x02211030}), 11693 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL2_MIC_NO_PRESENCE, 11694 {0x14, 0x90170110}, 11695 {0x21, 0x02211020}), 11696 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE, 11697 {0x14, 0x90170130}, 11698 {0x21, 0x02211040}), 11699 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE, 11700 {0x12, 0x90a60140}, 11701 {0x14, 0x90170110}, 11702 {0x21, 0x02211020}), 11703 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE, 11704 {0x12, 0x90a60160}, 11705 {0x14, 0x90170120}, 11706 {0x21, 0x02211030}), 11707 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE, 11708 {0x14, 0x90170110}, 11709 {0x1b, 0x02011020}, 11710 {0x21, 0x0221101f}), 11711 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE, 11712 {0x14, 0x90170110}, 11713 {0x1b, 0x01011020}, 11714 {0x21, 0x0221101f}), 11715 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE, 11716 {0x14, 0x90170130}, 11717 {0x1b, 0x01014020}, 11718 {0x21, 0x0221103f}), 11719 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE, 11720 {0x14, 0x90170130}, 11721 {0x1b, 0x01011020}, 11722 {0x21, 0x0221103f}), 11723 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE, 11724 {0x14, 0x90170130}, 11725 {0x1b, 0x02011020}, 11726 {0x21, 0x0221103f}), 11727 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE, 11728 {0x14, 0x90170150}, 11729 {0x1b, 0x02011020}, 11730 {0x21, 0x0221105f}), 11731 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE, 11732 {0x14, 0x90170110}, 11733 {0x1b, 0x01014020}, 11734 {0x21, 0x0221101f}), 11735 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE, 11736 {0x12, 0x90a60160}, 11737 {0x14, 0x90170120}, 11738 {0x17, 0x90170140}, 11739 {0x21, 0x0321102f}), 11740 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE, 11741 {0x12, 0x90a60160}, 11742 {0x14, 0x90170130}, 11743 {0x21, 0x02211040}), 11744 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE, 11745 {0x12, 0x90a60160}, 11746 {0x14, 0x90170140}, 11747 {0x21, 0x02211050}), 11748 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE, 11749 {0x12, 0x90a60170}, 11750 {0x14, 0x90170120}, 11751 {0x21, 0x02211030}), 11752 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE, 11753 {0x12, 0x90a60170}, 11754 {0x14, 0x90170130}, 11755 {0x21, 0x02211040}), 11756 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE, 11757 {0x12, 0x90a60170}, 11758 {0x14, 0x90171130}, 11759 {0x21, 0x02211040}), 11760 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE, 11761 {0x12, 0x90a60170}, 11762 {0x14, 0x90170140}, 11763 {0x21, 0x02211050}), 11764 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell Inspiron 5548", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE, 11765 {0x12, 0x90a60180}, 11766 {0x14, 0x90170130}, 11767 {0x21, 0x02211040}), 11768 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell Inspiron 5565", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE, 11769 {0x12, 0x90a60180}, 11770 {0x14, 0x90170120}, 11771 {0x21, 0x02211030}), 11772 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE, 11773 {0x1b, 0x01011020}, 11774 {0x21, 0x02211010}), 11775 SND_HDA_PIN_QUIRK(0x10ec0256, 0x1043, "ASUS", ALC256_FIXUP_ASUS_MIC, 11776 {0x14, 0x90170110}, 11777 {0x1b, 0x90a70130}, 11778 {0x21, 0x04211020}), 11779 SND_HDA_PIN_QUIRK(0x10ec0256, 0x1043, "ASUS", ALC256_FIXUP_ASUS_MIC, 11780 {0x14, 0x90170110}, 11781 {0x1b, 0x90a70130}, 11782 {0x21, 0x03211020}), 11783 SND_HDA_PIN_QUIRK(0x10ec0256, 0x1043, "ASUS", ALC256_FIXUP_ASUS_MIC_NO_PRESENCE, 11784 {0x12, 0x90a60130}, 11785 {0x14, 0x90170110}, 11786 {0x21, 0x03211020}), 11787 SND_HDA_PIN_QUIRK(0x10ec0256, 0x1043, "ASUS", ALC256_FIXUP_ASUS_MIC_NO_PRESENCE, 11788 {0x12, 0x90a60130}, 11789 {0x14, 0x90170110}, 11790 {0x21, 0x04211020}), 11791 SND_HDA_PIN_QUIRK(0x10ec0256, 0x1043, "ASUS", ALC256_FIXUP_ASUS_MIC_NO_PRESENCE, 11792 {0x1a, 0x90a70130}, 11793 {0x1b, 0x90170110}, 11794 {0x21, 0x03211020}), 11795 SND_HDA_PIN_QUIRK(0x10ec0256, 0x103c, "HP", ALC256_FIXUP_HP_HEADSET_MIC, 11796 {0x14, 0x90170110}, 11797 {0x19, 0x02a11020}, 11798 {0x21, 0x0221101f}), 11799 SND_HDA_PIN_QUIRK(0x10ec0274, 0x103c, "HP", ALC274_FIXUP_HP_HEADSET_MIC, 11800 {0x17, 0x90170110}, 11801 {0x19, 0x03a11030}, 11802 {0x21, 0x03211020}), 11803 SND_HDA_PIN_QUIRK(0x10ec0280, 0x103c, "HP", ALC280_FIXUP_HP_GPIO4, 11804 {0x12, 0x90a60130}, 11805 {0x14, 0x90170110}, 11806 {0x15, 0x0421101f}, 11807 {0x1a, 0x04a11020}), 11808 SND_HDA_PIN_QUIRK(0x10ec0280, 0x103c, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED, 11809 {0x12, 0x90a60140}, 11810 {0x14, 0x90170110}, 11811 {0x15, 0x0421101f}, 11812 {0x18, 0x02811030}, 11813 {0x1a, 0x04a1103f}, 11814 {0x1b, 0x02011020}), 11815 SND_HDA_PIN_QUIRK(0x10ec0282, 0x103c, "HP 15 Touchsmart", ALC269_FIXUP_HP_MUTE_LED_MIC1, 11816 ALC282_STANDARD_PINS, 11817 {0x12, 0x99a30130}, 11818 {0x19, 0x03a11020}, 11819 {0x21, 0x0321101f}), 11820 SND_HDA_PIN_QUIRK(0x10ec0282, 0x103c, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1, 11821 ALC282_STANDARD_PINS, 11822 {0x12, 0x99a30130}, 11823 {0x19, 0x03a11020}, 11824 {0x21, 0x03211040}), 11825 SND_HDA_PIN_QUIRK(0x10ec0282, 0x103c, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1, 11826 ALC282_STANDARD_PINS, 11827 {0x12, 0x99a30130}, 11828 {0x19, 0x03a11030}, 11829 {0x21, 0x03211020}), 11830 SND_HDA_PIN_QUIRK(0x10ec0282, 0x103c, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1, 11831 ALC282_STANDARD_PINS, 11832 {0x12, 0x99a30130}, 11833 {0x19, 0x04a11020}, 11834 {0x21, 0x0421101f}), 11835 SND_HDA_PIN_QUIRK(0x10ec0282, 0x103c, "HP", ALC269_FIXUP_HP_LINE1_MIC1_LED, 11836 ALC282_STANDARD_PINS, 11837 {0x12, 0x90a60140}, 11838 {0x19, 0x04a11030}, 11839 {0x21, 0x04211020}), 11840 SND_HDA_PIN_QUIRK(0x10ec0282, 0x1025, "Acer", ALC282_FIXUP_ACER_DISABLE_LINEOUT, 11841 ALC282_STANDARD_PINS, 11842 {0x12, 0x90a609c0}, 11843 {0x18, 0x03a11830}, 11844 {0x19, 0x04a19831}, 11845 {0x1a, 0x0481303f}, 11846 {0x1b, 0x04211020}, 11847 {0x21, 0x0321101f}), 11848 SND_HDA_PIN_QUIRK(0x10ec0282, 0x1025, "Acer", ALC282_FIXUP_ACER_DISABLE_LINEOUT, 11849 ALC282_STANDARD_PINS, 11850 {0x12, 0x90a60940}, 11851 {0x18, 0x03a11830}, 11852 {0x19, 0x04a19831}, 11853 {0x1a, 0x0481303f}, 11854 {0x1b, 0x04211020}, 11855 {0x21, 0x0321101f}), 11856 SND_HDA_PIN_QUIRK(0x10ec0283, 0x1028, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE, 11857 ALC282_STANDARD_PINS, 11858 {0x12, 0x90a60130}, 11859 {0x21, 0x0321101f}), 11860 SND_HDA_PIN_QUIRK(0x10ec0283, 0x1028, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE, 11861 {0x12, 0x90a60160}, 11862 {0x14, 0x90170120}, 11863 {0x21, 0x02211030}), 11864 SND_HDA_PIN_QUIRK(0x10ec0283, 0x1028, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE, 11865 ALC282_STANDARD_PINS, 11866 {0x12, 0x90a60130}, 11867 {0x19, 0x03a11020}, 11868 {0x21, 0x0321101f}), 11869 SND_HDA_PIN_QUIRK(0x10ec0285, 0x17aa, "Lenovo", ALC285_FIXUP_LENOVO_PC_BEEP_IN_NOISE, 11870 {0x12, 0x90a60130}, 11871 {0x14, 0x90170110}, 11872 {0x19, 0x04a11040}, 11873 {0x21, 0x04211020}), 11874 SND_HDA_PIN_QUIRK(0x10ec0285, 0x17aa, "Lenovo", ALC285_FIXUP_LENOVO_PC_BEEP_IN_NOISE, 11875 {0x14, 0x90170110}, 11876 {0x19, 0x04a11040}, 11877 {0x1d, 0x40600001}, 11878 {0x21, 0x04211020}), 11879 SND_HDA_PIN_QUIRK(0x10ec0285, 0x17aa, "Lenovo", ALC285_FIXUP_THINKPAD_NO_BASS_SPK_HEADSET_JACK, 11880 {0x14, 0x90170110}, 11881 {0x19, 0x04a11040}, 11882 {0x21, 0x04211020}), 11883 SND_HDA_PIN_QUIRK(0x10ec0287, 0x17aa, "Lenovo", ALC285_FIXUP_THINKPAD_HEADSET_JACK, 11884 {0x14, 0x90170110}, 11885 {0x17, 0x90170111}, 11886 {0x19, 0x03a11030}, 11887 {0x21, 0x03211020}), 11888 SND_HDA_PIN_QUIRK(0x10ec0287, 0x17aa, "Lenovo", ALC287_FIXUP_THINKPAD_I2S_SPK, 11889 {0x17, 0x90170110}, 11890 {0x19, 0x03a11030}, 11891 {0x21, 0x03211020}), 11892 SND_HDA_PIN_QUIRK(0x10ec0287, 0x17aa, "Lenovo", ALC287_FIXUP_THINKPAD_I2S_SPK, 11893 {0x17, 0x90170110}, /* 0x231f with RTK I2S AMP */ 11894 {0x19, 0x04a11040}, 11895 {0x21, 0x04211020}), 11896 SND_HDA_PIN_QUIRK(0x10ec0286, 0x1025, "Acer", ALC286_FIXUP_ACER_AIO_MIC_NO_PRESENCE, 11897 {0x12, 0x90a60130}, 11898 {0x17, 0x90170110}, 11899 {0x21, 0x02211020}), 11900 SND_HDA_PIN_QUIRK(0x10ec0288, 0x1028, "Dell", ALC288_FIXUP_DELL1_MIC_NO_PRESENCE, 11901 {0x12, 0x90a60120}, 11902 {0x14, 0x90170110}, 11903 {0x21, 0x0321101f}), 11904 SND_HDA_PIN_QUIRK(0x10ec0290, 0x103c, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1, 11905 ALC290_STANDARD_PINS, 11906 {0x15, 0x04211040}, 11907 {0x18, 0x90170112}, 11908 {0x1a, 0x04a11020}), 11909 SND_HDA_PIN_QUIRK(0x10ec0290, 0x103c, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1, 11910 ALC290_STANDARD_PINS, 11911 {0x15, 0x04211040}, 11912 {0x18, 0x90170110}, 11913 {0x1a, 0x04a11020}), 11914 SND_HDA_PIN_QUIRK(0x10ec0290, 0x103c, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1, 11915 ALC290_STANDARD_PINS, 11916 {0x15, 0x0421101f}, 11917 {0x1a, 0x04a11020}), 11918 SND_HDA_PIN_QUIRK(0x10ec0290, 0x103c, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1, 11919 ALC290_STANDARD_PINS, 11920 {0x15, 0x04211020}, 11921 {0x1a, 0x04a11040}), 11922 SND_HDA_PIN_QUIRK(0x10ec0290, 0x103c, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1, 11923 ALC290_STANDARD_PINS, 11924 {0x14, 0x90170110}, 11925 {0x15, 0x04211020}, 11926 {0x1a, 0x04a11040}), 11927 SND_HDA_PIN_QUIRK(0x10ec0290, 0x103c, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1, 11928 ALC290_STANDARD_PINS, 11929 {0x14, 0x90170110}, 11930 {0x15, 0x04211020}, 11931 {0x1a, 0x04a11020}), 11932 SND_HDA_PIN_QUIRK(0x10ec0290, 0x103c, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1, 11933 ALC290_STANDARD_PINS, 11934 {0x14, 0x90170110}, 11935 {0x15, 0x0421101f}, 11936 {0x1a, 0x04a11020}), 11937 SND_HDA_PIN_QUIRK(0x10ec0292, 0x1028, "Dell", ALC269_FIXUP_DELL2_MIC_NO_PRESENCE, 11938 ALC292_STANDARD_PINS, 11939 {0x12, 0x90a60140}, 11940 {0x16, 0x01014020}, 11941 {0x19, 0x01a19030}), 11942 SND_HDA_PIN_QUIRK(0x10ec0292, 0x1028, "Dell", ALC269_FIXUP_DELL2_MIC_NO_PRESENCE, 11943 ALC292_STANDARD_PINS, 11944 {0x12, 0x90a60140}, 11945 {0x16, 0x01014020}, 11946 {0x18, 0x02a19031}, 11947 {0x19, 0x01a1903e}), 11948 SND_HDA_PIN_QUIRK(0x10ec0292, 0x1028, "Dell", ALC269_FIXUP_DELL3_MIC_NO_PRESENCE, 11949 ALC292_STANDARD_PINS, 11950 {0x12, 0x90a60140}), 11951 SND_HDA_PIN_QUIRK(0x10ec0293, 0x1028, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE, 11952 ALC292_STANDARD_PINS, 11953 {0x13, 0x90a60140}, 11954 {0x16, 0x21014020}, 11955 {0x19, 0x21a19030}), 11956 SND_HDA_PIN_QUIRK(0x10ec0293, 0x1028, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE, 11957 ALC292_STANDARD_PINS, 11958 {0x13, 0x90a60140}), 11959 SND_HDA_PIN_QUIRK(0x10ec0294, 0x1043, "ASUS", ALC294_FIXUP_ASUS_HPE, 11960 {0x17, 0x90170110}, 11961 {0x21, 0x04211020}), 11962 SND_HDA_PIN_QUIRK(0x10ec0294, 0x1043, "ASUS", ALC294_FIXUP_ASUS_MIC, 11963 {0x14, 0x90170110}, 11964 {0x1b, 0x90a70130}, 11965 {0x21, 0x04211020}), 11966 SND_HDA_PIN_QUIRK(0x10ec0294, 0x1043, "ASUS", ALC294_FIXUP_ASUS_SPK, 11967 {0x12, 0x90a60130}, 11968 {0x17, 0x90170110}, 11969 {0x21, 0x03211020}), 11970 SND_HDA_PIN_QUIRK(0x10ec0294, 0x1043, "ASUS", ALC294_FIXUP_ASUS_SPK, 11971 {0x12, 0x90a60130}, 11972 {0x17, 0x90170110}, 11973 {0x21, 0x04211020}), 11974 SND_HDA_PIN_QUIRK(0x10ec0295, 0x1043, "ASUS", ALC294_FIXUP_ASUS_SPK, 11975 {0x12, 0x90a60130}, 11976 {0x17, 0x90170110}, 11977 {0x21, 0x03211020}), 11978 SND_HDA_PIN_QUIRK(0x10ec0295, 0x1043, "ASUS", ALC295_FIXUP_ASUS_MIC_NO_PRESENCE, 11979 {0x12, 0x90a60120}, 11980 {0x17, 0x90170110}, 11981 {0x21, 0x04211030}), 11982 SND_HDA_PIN_QUIRK(0x10ec0295, 0x1043, "ASUS", ALC295_FIXUP_ASUS_MIC_NO_PRESENCE, 11983 {0x12, 0x90a60130}, 11984 {0x17, 0x90170110}, 11985 {0x21, 0x03211020}), 11986 SND_HDA_PIN_QUIRK(0x10ec0295, 0x1043, "ASUS", ALC295_FIXUP_ASUS_MIC_NO_PRESENCE, 11987 {0x12, 0x90a60130}, 11988 {0x17, 0x90170110}, 11989 {0x21, 0x03211020}), 11990 SND_HDA_PIN_QUIRK(0x10ec0298, 0x1028, "Dell", ALC298_FIXUP_DELL1_MIC_NO_PRESENCE, 11991 ALC298_STANDARD_PINS, 11992 {0x17, 0x90170110}), 11993 SND_HDA_PIN_QUIRK(0x10ec0298, 0x1028, "Dell", ALC298_FIXUP_DELL1_MIC_NO_PRESENCE, 11994 ALC298_STANDARD_PINS, 11995 {0x17, 0x90170140}), 11996 SND_HDA_PIN_QUIRK(0x10ec0298, 0x1028, "Dell", ALC298_FIXUP_DELL1_MIC_NO_PRESENCE, 11997 ALC298_STANDARD_PINS, 11998 {0x17, 0x90170150}), 11999 SND_HDA_PIN_QUIRK(0x10ec0298, 0x1028, "Dell", ALC298_FIXUP_SPK_VOLUME, 12000 {0x12, 0xb7a60140}, 12001 {0x13, 0xb7a60150}, 12002 {0x17, 0x90170110}, 12003 {0x1a, 0x03011020}, 12004 {0x21, 0x03211030}), 12005 SND_HDA_PIN_QUIRK(0x10ec0298, 0x1028, "Dell", ALC298_FIXUP_ALIENWARE_MIC_NO_PRESENCE, 12006 {0x12, 0xb7a60140}, 12007 {0x17, 0x90170110}, 12008 {0x1a, 0x03a11030}, 12009 {0x21, 0x03211020}), 12010 SND_HDA_PIN_QUIRK(0x10ec0299, 0x1028, "Dell", ALC269_FIXUP_DELL4_MIC_NO_PRESENCE, 12011 ALC225_STANDARD_PINS, 12012 {0x12, 0xb7a60130}, 12013 {0x17, 0x90170110}), 12014 SND_HDA_PIN_QUIRK(0x10ec0623, 0x17aa, "Lenovo", ALC283_FIXUP_HEADSET_MIC, 12015 {0x14, 0x01014010}, 12016 {0x17, 0x90170120}, 12017 {0x18, 0x02a11030}, 12018 {0x19, 0x02a1103f}, 12019 {0x21, 0x0221101f}), 12020 {} 12021 }; 12022 12023 /* This is the fallback pin_fixup_tbl for alc269 family, to make the tbl match 12024 * more machines, don't need to match all valid pins, just need to match 12025 * all the pins defined in the tbl. Just because of this reason, it is possible 12026 * that a single machine matches multiple tbls, so there is one limitation: 12027 * at most one tbl is allowed to define for the same vendor and same codec 12028 */ 12029 static const struct snd_hda_pin_quirk alc269_fallback_pin_fixup_tbl[] = { 12030 SND_HDA_PIN_QUIRK(0x10ec0256, 0x1025, "Acer", ALC2XX_FIXUP_HEADSET_MIC, 12031 {0x19, 0x40000000}), 12032 SND_HDA_PIN_QUIRK(0x10ec0289, 0x1028, "Dell", ALC269_FIXUP_DELL4_MIC_NO_PRESENCE, 12033 {0x19, 0x40000000}, 12034 {0x1b, 0x40000000}), 12035 SND_HDA_PIN_QUIRK(0x10ec0295, 0x1028, "Dell", ALC269_FIXUP_DELL4_MIC_NO_PRESENCE_QUIET, 12036 {0x19, 0x40000000}, 12037 {0x1b, 0x40000000}), 12038 SND_HDA_PIN_QUIRK(0x10ec0256, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE, 12039 {0x19, 0x40000000}, 12040 {0x1a, 0x40000000}), 12041 SND_HDA_PIN_QUIRK(0x10ec0236, 0x1028, "Dell", ALC255_FIXUP_DELL1_LIMIT_INT_MIC_BOOST, 12042 {0x19, 0x40000000}, 12043 {0x1a, 0x40000000}), 12044 SND_HDA_PIN_QUIRK(0x10ec0274, 0x1028, "Dell", ALC269_FIXUP_DELL1_LIMIT_INT_MIC_BOOST, 12045 {0x19, 0x40000000}, 12046 {0x1a, 0x40000000}), 12047 SND_HDA_PIN_QUIRK(0x10ec0256, 0x1043, "ASUS", ALC2XX_FIXUP_HEADSET_MIC, 12048 {0x19, 0x40000000}), 12049 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1558, "Clevo", ALC2XX_FIXUP_HEADSET_MIC, 12050 {0x19, 0x40000000}), 12051 {} 12052 }; 12053 12054 static void alc269_fill_coef(struct hda_codec *codec) 12055 { 12056 struct alc_spec *spec = codec->spec; 12057 int val; 12058 12059 if (spec->codec_variant != ALC269_TYPE_ALC269VB) 12060 return; 12061 12062 if ((alc_get_coef0(codec) & 0x00ff) < 0x015) { 12063 alc_write_coef_idx(codec, 0xf, 0x960b); 12064 alc_write_coef_idx(codec, 0xe, 0x8817); 12065 } 12066 12067 if ((alc_get_coef0(codec) & 0x00ff) == 0x016) { 12068 alc_write_coef_idx(codec, 0xf, 0x960b); 12069 alc_write_coef_idx(codec, 0xe, 0x8814); 12070 } 12071 12072 if ((alc_get_coef0(codec) & 0x00ff) == 0x017) { 12073 /* Power up output pin */ 12074 alc_update_coef_idx(codec, 0x04, 0, 1<<11); 12075 } 12076 12077 if ((alc_get_coef0(codec) & 0x00ff) == 0x018) { 12078 val = alc_read_coef_idx(codec, 0xd); 12079 if (val != -1 && (val & 0x0c00) >> 10 != 0x1) { 12080 /* Capless ramp up clock control */ 12081 alc_write_coef_idx(codec, 0xd, val | (1<<10)); 12082 } 12083 val = alc_read_coef_idx(codec, 0x17); 12084 if (val != -1 && (val & 0x01c0) >> 6 != 0x4) { 12085 /* Class D power on reset */ 12086 alc_write_coef_idx(codec, 0x17, val | (1<<7)); 12087 } 12088 } 12089 12090 /* HP */ 12091 alc_update_coef_idx(codec, 0x4, 0, 1<<11); 12092 } 12093 12094 /* 12095 */ 12096 static int patch_alc269(struct hda_codec *codec) 12097 { 12098 struct alc_spec *spec; 12099 int err; 12100 12101 err = alc_alloc_spec(codec, 0x0b); 12102 if (err < 0) 12103 return err; 12104 12105 spec = codec->spec; 12106 spec->gen.shared_mic_vref_pin = 0x18; 12107 codec->power_save_node = 0; 12108 spec->en_3kpull_low = true; 12109 12110 codec->patch_ops.suspend = alc269_suspend; 12111 codec->patch_ops.resume = alc269_resume; 12112 spec->shutup = alc_default_shutup; 12113 spec->init_hook = alc_default_init; 12114 12115 switch (codec->core.vendor_id) { 12116 case 0x10ec0269: 12117 spec->codec_variant = ALC269_TYPE_ALC269VA; 12118 switch (alc_get_coef0(codec) & 0x00f0) { 12119 case 0x0010: 12120 if (codec->bus->pci && 12121 codec->bus->pci->subsystem_vendor == 0x1025 && 12122 spec->cdefine.platform_type == 1) 12123 err = alc_codec_rename(codec, "ALC271X"); 12124 spec->codec_variant = ALC269_TYPE_ALC269VB; 12125 break; 12126 case 0x0020: 12127 if (codec->bus->pci && 12128 codec->bus->pci->subsystem_vendor == 0x17aa && 12129 codec->bus->pci->subsystem_device == 0x21f3) 12130 err = alc_codec_rename(codec, "ALC3202"); 12131 spec->codec_variant = ALC269_TYPE_ALC269VC; 12132 break; 12133 case 0x0030: 12134 spec->codec_variant = ALC269_TYPE_ALC269VD; 12135 break; 12136 default: 12137 alc_fix_pll_init(codec, 0x20, 0x04, 15); 12138 } 12139 if (err < 0) 12140 goto error; 12141 spec->shutup = alc269_shutup; 12142 spec->init_hook = alc269_fill_coef; 12143 alc269_fill_coef(codec); 12144 break; 12145 12146 case 0x10ec0280: 12147 case 0x10ec0290: 12148 spec->codec_variant = ALC269_TYPE_ALC280; 12149 break; 12150 case 0x10ec0282: 12151 spec->codec_variant = ALC269_TYPE_ALC282; 12152 spec->shutup = alc282_shutup; 12153 spec->init_hook = alc282_init; 12154 break; 12155 case 0x10ec0233: 12156 case 0x10ec0283: 12157 spec->codec_variant = ALC269_TYPE_ALC283; 12158 spec->shutup = alc283_shutup; 12159 spec->init_hook = alc283_init; 12160 break; 12161 case 0x10ec0284: 12162 case 0x10ec0292: 12163 spec->codec_variant = ALC269_TYPE_ALC284; 12164 break; 12165 case 0x10ec0293: 12166 spec->codec_variant = ALC269_TYPE_ALC293; 12167 break; 12168 case 0x10ec0286: 12169 case 0x10ec0288: 12170 spec->codec_variant = ALC269_TYPE_ALC286; 12171 break; 12172 case 0x10ec0298: 12173 spec->codec_variant = ALC269_TYPE_ALC298; 12174 break; 12175 case 0x10ec0235: 12176 case 0x10ec0255: 12177 spec->codec_variant = ALC269_TYPE_ALC255; 12178 spec->shutup = alc256_shutup; 12179 spec->init_hook = alc256_init; 12180 break; 12181 case 0x10ec0230: 12182 case 0x10ec0236: 12183 case 0x10ec0256: 12184 case 0x19e58326: 12185 spec->codec_variant = ALC269_TYPE_ALC256; 12186 spec->shutup = alc256_shutup; 12187 spec->init_hook = alc256_init; 12188 spec->gen.mixer_nid = 0; /* ALC256 does not have any loopback mixer path */ 12189 if (codec->core.vendor_id == 0x10ec0236 && 12190 codec->bus->pci->vendor != PCI_VENDOR_ID_AMD) 12191 spec->en_3kpull_low = false; 12192 break; 12193 case 0x10ec0257: 12194 spec->codec_variant = ALC269_TYPE_ALC257; 12195 spec->shutup = alc256_shutup; 12196 spec->init_hook = alc256_init; 12197 spec->gen.mixer_nid = 0; 12198 spec->en_3kpull_low = false; 12199 break; 12200 case 0x10ec0215: 12201 case 0x10ec0245: 12202 case 0x10ec0285: 12203 case 0x10ec0289: 12204 if (alc_get_coef0(codec) & 0x0010) 12205 spec->codec_variant = ALC269_TYPE_ALC245; 12206 else 12207 spec->codec_variant = ALC269_TYPE_ALC215; 12208 spec->shutup = alc225_shutup; 12209 spec->init_hook = alc225_init; 12210 spec->gen.mixer_nid = 0; 12211 break; 12212 case 0x10ec0225: 12213 case 0x10ec0295: 12214 case 0x10ec0299: 12215 spec->codec_variant = ALC269_TYPE_ALC225; 12216 spec->shutup = alc225_shutup; 12217 spec->init_hook = alc225_init; 12218 spec->gen.mixer_nid = 0; /* no loopback on ALC225, ALC295 and ALC299 */ 12219 break; 12220 case 0x10ec0287: 12221 spec->codec_variant = ALC269_TYPE_ALC287; 12222 spec->shutup = alc225_shutup; 12223 spec->init_hook = alc225_init; 12224 spec->gen.mixer_nid = 0; /* no loopback on ALC287 */ 12225 break; 12226 case 0x10ec0234: 12227 case 0x10ec0274: 12228 case 0x10ec0294: 12229 spec->codec_variant = ALC269_TYPE_ALC294; 12230 spec->gen.mixer_nid = 0; /* ALC2x4 does not have any loopback mixer path */ 12231 alc_update_coef_idx(codec, 0x6b, 0x0018, (1<<4) | (1<<3)); /* UAJ MIC Vref control by verb */ 12232 spec->init_hook = alc294_init; 12233 break; 12234 case 0x10ec0300: 12235 spec->codec_variant = ALC269_TYPE_ALC300; 12236 spec->gen.mixer_nid = 0; /* no loopback on ALC300 */ 12237 break; 12238 case 0x10ec0222: 12239 case 0x10ec0623: 12240 spec->codec_variant = ALC269_TYPE_ALC623; 12241 spec->shutup = alc222_shutup; 12242 spec->init_hook = alc222_init; 12243 break; 12244 case 0x10ec0700: 12245 case 0x10ec0701: 12246 case 0x10ec0703: 12247 case 0x10ec0711: 12248 spec->codec_variant = ALC269_TYPE_ALC700; 12249 spec->gen.mixer_nid = 0; /* ALC700 does not have any loopback mixer path */ 12250 alc_update_coef_idx(codec, 0x4a, 1 << 15, 0); /* Combo jack auto trigger control */ 12251 spec->init_hook = alc294_init; 12252 break; 12253 12254 } 12255 12256 if (snd_hda_codec_read(codec, 0x51, 0, AC_VERB_PARAMETERS, 0) == 0x10ec5505) { 12257 spec->has_alc5505_dsp = 1; 12258 spec->init_hook = alc5505_dsp_init; 12259 } 12260 12261 alc_pre_init(codec); 12262 12263 snd_hda_pick_fixup(codec, alc269_fixup_models, 12264 alc269_fixup_tbl, alc269_fixups); 12265 /* FIXME: both TX300 and ROG Strix G17 have the same SSID, and 12266 * the quirk breaks the latter (bko#214101). 12267 * Clear the wrong entry. 12268 */ 12269 if (codec->fixup_id == ALC282_FIXUP_ASUS_TX300 && 12270 codec->core.vendor_id == 0x10ec0294) { 12271 codec_dbg(codec, "Clear wrong fixup for ASUS ROG Strix G17\n"); 12272 codec->fixup_id = HDA_FIXUP_ID_NOT_SET; 12273 } 12274 12275 snd_hda_pick_pin_fixup(codec, alc269_pin_fixup_tbl, alc269_fixups, true); 12276 snd_hda_pick_pin_fixup(codec, alc269_fallback_pin_fixup_tbl, alc269_fixups, false); 12277 snd_hda_pick_fixup(codec, NULL, alc269_fixup_vendor_tbl, 12278 alc269_fixups); 12279 12280 /* 12281 * Check whether ACPI describes companion amplifiers that require 12282 * component binding 12283 */ 12284 find_cirrus_companion_amps(codec); 12285 12286 snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PRE_PROBE); 12287 12288 alc_auto_parse_customize_define(codec); 12289 12290 if (has_cdefine_beep(codec)) 12291 spec->gen.beep_nid = 0x01; 12292 12293 /* automatic parse from the BIOS config */ 12294 err = alc269_parse_auto_config(codec); 12295 if (err < 0) 12296 goto error; 12297 12298 if (!spec->gen.no_analog && spec->gen.beep_nid && spec->gen.mixer_nid) { 12299 err = set_beep_amp(spec, spec->gen.mixer_nid, 0x04, HDA_INPUT); 12300 if (err < 0) 12301 goto error; 12302 } 12303 12304 snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PROBE); 12305 12306 return 0; 12307 12308 error: 12309 alc_free(codec); 12310 return err; 12311 } 12312 12313 /* 12314 * ALC861 12315 */ 12316 12317 static int alc861_parse_auto_config(struct hda_codec *codec) 12318 { 12319 static const hda_nid_t alc861_ignore[] = { 0x1d, 0 }; 12320 static const hda_nid_t alc861_ssids[] = { 0x0e, 0x0f, 0x0b, 0 }; 12321 return alc_parse_auto_config(codec, alc861_ignore, alc861_ssids); 12322 } 12323 12324 /* Pin config fixes */ 12325 enum { 12326 ALC861_FIXUP_FSC_AMILO_PI1505, 12327 ALC861_FIXUP_AMP_VREF_0F, 12328 ALC861_FIXUP_NO_JACK_DETECT, 12329 ALC861_FIXUP_ASUS_A6RP, 12330 ALC660_FIXUP_ASUS_W7J, 12331 }; 12332 12333 /* On some laptops, VREF of pin 0x0f is abused for controlling the main amp */ 12334 static void alc861_fixup_asus_amp_vref_0f(struct hda_codec *codec, 12335 const struct hda_fixup *fix, int action) 12336 { 12337 struct alc_spec *spec = codec->spec; 12338 unsigned int val; 12339 12340 if (action != HDA_FIXUP_ACT_INIT) 12341 return; 12342 val = snd_hda_codec_get_pin_target(codec, 0x0f); 12343 if (!(val & (AC_PINCTL_IN_EN | AC_PINCTL_OUT_EN))) 12344 val |= AC_PINCTL_IN_EN; 12345 val |= AC_PINCTL_VREF_50; 12346 snd_hda_set_pin_ctl(codec, 0x0f, val); 12347 spec->gen.keep_vref_in_automute = 1; 12348 } 12349 12350 /* suppress the jack-detection */ 12351 static void alc_fixup_no_jack_detect(struct hda_codec *codec, 12352 const struct hda_fixup *fix, int action) 12353 { 12354 if (action == HDA_FIXUP_ACT_PRE_PROBE) 12355 codec->no_jack_detect = 1; 12356 } 12357 12358 static const struct hda_fixup alc861_fixups[] = { 12359 [ALC861_FIXUP_FSC_AMILO_PI1505] = { 12360 .type = HDA_FIXUP_PINS, 12361 .v.pins = (const struct hda_pintbl[]) { 12362 { 0x0b, 0x0221101f }, /* HP */ 12363 { 0x0f, 0x90170310 }, /* speaker */ 12364 { } 12365 } 12366 }, 12367 [ALC861_FIXUP_AMP_VREF_0F] = { 12368 .type = HDA_FIXUP_FUNC, 12369 .v.func = alc861_fixup_asus_amp_vref_0f, 12370 }, 12371 [ALC861_FIXUP_NO_JACK_DETECT] = { 12372 .type = HDA_FIXUP_FUNC, 12373 .v.func = alc_fixup_no_jack_detect, 12374 }, 12375 [ALC861_FIXUP_ASUS_A6RP] = { 12376 .type = HDA_FIXUP_FUNC, 12377 .v.func = alc861_fixup_asus_amp_vref_0f, 12378 .chained = true, 12379 .chain_id = ALC861_FIXUP_NO_JACK_DETECT, 12380 }, 12381 [ALC660_FIXUP_ASUS_W7J] = { 12382 .type = HDA_FIXUP_VERBS, 12383 .v.verbs = (const struct hda_verb[]) { 12384 /* ASUS W7J needs a magic pin setup on unused NID 0x10 12385 * for enabling outputs 12386 */ 12387 {0x10, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x24}, 12388 { } 12389 }, 12390 } 12391 }; 12392 12393 static const struct hda_quirk alc861_fixup_tbl[] = { 12394 SND_PCI_QUIRK(0x1043, 0x1253, "ASUS W7J", ALC660_FIXUP_ASUS_W7J), 12395 SND_PCI_QUIRK(0x1043, 0x1263, "ASUS Z35HL", ALC660_FIXUP_ASUS_W7J), 12396 SND_PCI_QUIRK(0x1043, 0x1393, "ASUS A6Rp", ALC861_FIXUP_ASUS_A6RP), 12397 SND_PCI_QUIRK_VENDOR(0x1043, "ASUS laptop", ALC861_FIXUP_AMP_VREF_0F), 12398 SND_PCI_QUIRK(0x1462, 0x7254, "HP DX2200", ALC861_FIXUP_NO_JACK_DETECT), 12399 SND_PCI_QUIRK_VENDOR(0x1584, "Haier/Uniwill", ALC861_FIXUP_AMP_VREF_0F), 12400 SND_PCI_QUIRK(0x1734, 0x10c7, "FSC Amilo Pi1505", ALC861_FIXUP_FSC_AMILO_PI1505), 12401 {} 12402 }; 12403 12404 /* 12405 */ 12406 static int patch_alc861(struct hda_codec *codec) 12407 { 12408 struct alc_spec *spec; 12409 int err; 12410 12411 err = alc_alloc_spec(codec, 0x15); 12412 if (err < 0) 12413 return err; 12414 12415 spec = codec->spec; 12416 if (has_cdefine_beep(codec)) 12417 spec->gen.beep_nid = 0x23; 12418 12419 spec->power_hook = alc_power_eapd; 12420 12421 alc_pre_init(codec); 12422 12423 snd_hda_pick_fixup(codec, NULL, alc861_fixup_tbl, alc861_fixups); 12424 snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PRE_PROBE); 12425 12426 /* automatic parse from the BIOS config */ 12427 err = alc861_parse_auto_config(codec); 12428 if (err < 0) 12429 goto error; 12430 12431 if (!spec->gen.no_analog) { 12432 err = set_beep_amp(spec, 0x23, 0, HDA_OUTPUT); 12433 if (err < 0) 12434 goto error; 12435 } 12436 12437 snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PROBE); 12438 12439 return 0; 12440 12441 error: 12442 alc_free(codec); 12443 return err; 12444 } 12445 12446 /* 12447 * ALC861-VD support 12448 * 12449 * Based on ALC882 12450 * 12451 * In addition, an independent DAC 12452 */ 12453 static int alc861vd_parse_auto_config(struct hda_codec *codec) 12454 { 12455 static const hda_nid_t alc861vd_ignore[] = { 0x1d, 0 }; 12456 static const hda_nid_t alc861vd_ssids[] = { 0x15, 0x1b, 0x14, 0 }; 12457 return alc_parse_auto_config(codec, alc861vd_ignore, alc861vd_ssids); 12458 } 12459 12460 enum { 12461 ALC660VD_FIX_ASUS_GPIO1, 12462 ALC861VD_FIX_DALLAS, 12463 }; 12464 12465 /* exclude VREF80 */ 12466 static void alc861vd_fixup_dallas(struct hda_codec *codec, 12467 const struct hda_fixup *fix, int action) 12468 { 12469 if (action == HDA_FIXUP_ACT_PRE_PROBE) { 12470 snd_hda_override_pin_caps(codec, 0x18, 0x00000734); 12471 snd_hda_override_pin_caps(codec, 0x19, 0x0000073c); 12472 } 12473 } 12474 12475 /* reset GPIO1 */ 12476 static void alc660vd_fixup_asus_gpio1(struct hda_codec *codec, 12477 const struct hda_fixup *fix, int action) 12478 { 12479 struct alc_spec *spec = codec->spec; 12480 12481 if (action == HDA_FIXUP_ACT_PRE_PROBE) 12482 spec->gpio_mask |= 0x02; 12483 alc_fixup_gpio(codec, action, 0x01); 12484 } 12485 12486 static const struct hda_fixup alc861vd_fixups[] = { 12487 [ALC660VD_FIX_ASUS_GPIO1] = { 12488 .type = HDA_FIXUP_FUNC, 12489 .v.func = alc660vd_fixup_asus_gpio1, 12490 }, 12491 [ALC861VD_FIX_DALLAS] = { 12492 .type = HDA_FIXUP_FUNC, 12493 .v.func = alc861vd_fixup_dallas, 12494 }, 12495 }; 12496 12497 static const struct hda_quirk alc861vd_fixup_tbl[] = { 12498 SND_PCI_QUIRK(0x103c, 0x30bf, "HP TX1000", ALC861VD_FIX_DALLAS), 12499 SND_PCI_QUIRK(0x1043, 0x1339, "ASUS A7-K", ALC660VD_FIX_ASUS_GPIO1), 12500 SND_PCI_QUIRK(0x1179, 0xff31, "Toshiba L30-149", ALC861VD_FIX_DALLAS), 12501 {} 12502 }; 12503 12504 /* 12505 */ 12506 static int patch_alc861vd(struct hda_codec *codec) 12507 { 12508 struct alc_spec *spec; 12509 int err; 12510 12511 err = alc_alloc_spec(codec, 0x0b); 12512 if (err < 0) 12513 return err; 12514 12515 spec = codec->spec; 12516 if (has_cdefine_beep(codec)) 12517 spec->gen.beep_nid = 0x23; 12518 12519 spec->shutup = alc_eapd_shutup; 12520 12521 alc_pre_init(codec); 12522 12523 snd_hda_pick_fixup(codec, NULL, alc861vd_fixup_tbl, alc861vd_fixups); 12524 snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PRE_PROBE); 12525 12526 /* automatic parse from the BIOS config */ 12527 err = alc861vd_parse_auto_config(codec); 12528 if (err < 0) 12529 goto error; 12530 12531 if (!spec->gen.no_analog) { 12532 err = set_beep_amp(spec, 0x0b, 0x05, HDA_INPUT); 12533 if (err < 0) 12534 goto error; 12535 } 12536 12537 snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PROBE); 12538 12539 return 0; 12540 12541 error: 12542 alc_free(codec); 12543 return err; 12544 } 12545 12546 /* 12547 * ALC662 support 12548 * 12549 * ALC662 is almost identical with ALC880 but has cleaner and more flexible 12550 * configuration. Each pin widget can choose any input DACs and a mixer. 12551 * Each ADC is connected from a mixer of all inputs. This makes possible 12552 * 6-channel independent captures. 12553 * 12554 * In addition, an independent DAC for the multi-playback (not used in this 12555 * driver yet). 12556 */ 12557 12558 /* 12559 * BIOS auto configuration 12560 */ 12561 12562 static int alc662_parse_auto_config(struct hda_codec *codec) 12563 { 12564 static const hda_nid_t alc662_ignore[] = { 0x1d, 0 }; 12565 static const hda_nid_t alc663_ssids[] = { 0x15, 0x1b, 0x14, 0x21 }; 12566 static const hda_nid_t alc662_ssids[] = { 0x15, 0x1b, 0x14, 0 }; 12567 const hda_nid_t *ssids; 12568 12569 if (codec->core.vendor_id == 0x10ec0272 || codec->core.vendor_id == 0x10ec0663 || 12570 codec->core.vendor_id == 0x10ec0665 || codec->core.vendor_id == 0x10ec0670 || 12571 codec->core.vendor_id == 0x10ec0671) 12572 ssids = alc663_ssids; 12573 else 12574 ssids = alc662_ssids; 12575 return alc_parse_auto_config(codec, alc662_ignore, ssids); 12576 } 12577 12578 static void alc272_fixup_mario(struct hda_codec *codec, 12579 const struct hda_fixup *fix, int action) 12580 { 12581 if (action != HDA_FIXUP_ACT_PRE_PROBE) 12582 return; 12583 if (snd_hda_override_amp_caps(codec, 0x2, HDA_OUTPUT, 12584 (0x3b << AC_AMPCAP_OFFSET_SHIFT) | 12585 (0x3b << AC_AMPCAP_NUM_STEPS_SHIFT) | 12586 (0x03 << AC_AMPCAP_STEP_SIZE_SHIFT) | 12587 (0 << AC_AMPCAP_MUTE_SHIFT))) 12588 codec_warn(codec, "failed to override amp caps for NID 0x2\n"); 12589 } 12590 12591 static const struct snd_pcm_chmap_elem asus_pcm_2_1_chmaps[] = { 12592 { .channels = 2, 12593 .map = { SNDRV_CHMAP_FL, SNDRV_CHMAP_FR } }, 12594 { .channels = 4, 12595 .map = { SNDRV_CHMAP_FL, SNDRV_CHMAP_FR, 12596 SNDRV_CHMAP_NA, SNDRV_CHMAP_LFE } }, /* LFE only on right */ 12597 { } 12598 }; 12599 12600 /* override the 2.1 chmap */ 12601 static void alc_fixup_bass_chmap(struct hda_codec *codec, 12602 const struct hda_fixup *fix, int action) 12603 { 12604 if (action == HDA_FIXUP_ACT_BUILD) { 12605 struct alc_spec *spec = codec->spec; 12606 spec->gen.pcm_rec[0]->stream[0].chmap = asus_pcm_2_1_chmaps; 12607 } 12608 } 12609 12610 /* avoid D3 for keeping GPIO up */ 12611 static unsigned int gpio_led_power_filter(struct hda_codec *codec, 12612 hda_nid_t nid, 12613 unsigned int power_state) 12614 { 12615 struct alc_spec *spec = codec->spec; 12616 if (nid == codec->core.afg && power_state == AC_PWRST_D3 && spec->gpio_data) 12617 return AC_PWRST_D0; 12618 return power_state; 12619 } 12620 12621 static void alc662_fixup_led_gpio1(struct hda_codec *codec, 12622 const struct hda_fixup *fix, int action) 12623 { 12624 struct alc_spec *spec = codec->spec; 12625 12626 alc_fixup_hp_gpio_led(codec, action, 0x01, 0); 12627 if (action == HDA_FIXUP_ACT_PRE_PROBE) { 12628 spec->mute_led_polarity = 1; 12629 codec->power_filter = gpio_led_power_filter; 12630 } 12631 } 12632 12633 static void alc662_usi_automute_hook(struct hda_codec *codec, 12634 struct hda_jack_callback *jack) 12635 { 12636 struct alc_spec *spec = codec->spec; 12637 int vref; 12638 msleep(200); 12639 snd_hda_gen_hp_automute(codec, jack); 12640 12641 vref = spec->gen.hp_jack_present ? PIN_VREF80 : 0; 12642 msleep(100); 12643 snd_hda_codec_write(codec, 0x19, 0, AC_VERB_SET_PIN_WIDGET_CONTROL, 12644 vref); 12645 } 12646 12647 static void alc662_fixup_usi_headset_mic(struct hda_codec *codec, 12648 const struct hda_fixup *fix, int action) 12649 { 12650 struct alc_spec *spec = codec->spec; 12651 if (action == HDA_FIXUP_ACT_PRE_PROBE) { 12652 spec->parse_flags |= HDA_PINCFG_HEADSET_MIC; 12653 spec->gen.hp_automute_hook = alc662_usi_automute_hook; 12654 } 12655 } 12656 12657 static void alc662_aspire_ethos_mute_speakers(struct hda_codec *codec, 12658 struct hda_jack_callback *cb) 12659 { 12660 /* surround speakers at 0x1b already get muted automatically when 12661 * headphones are plugged in, but we have to mute/unmute the remaining 12662 * channels manually: 12663 * 0x15 - front left/front right 12664 * 0x18 - front center/ LFE 12665 */ 12666 if (snd_hda_jack_detect_state(codec, 0x1b) == HDA_JACK_PRESENT) { 12667 snd_hda_set_pin_ctl_cache(codec, 0x15, 0); 12668 snd_hda_set_pin_ctl_cache(codec, 0x18, 0); 12669 } else { 12670 snd_hda_set_pin_ctl_cache(codec, 0x15, PIN_OUT); 12671 snd_hda_set_pin_ctl_cache(codec, 0x18, PIN_OUT); 12672 } 12673 } 12674 12675 static void alc662_fixup_aspire_ethos_hp(struct hda_codec *codec, 12676 const struct hda_fixup *fix, int action) 12677 { 12678 /* Pin 0x1b: shared headphones jack and surround speakers */ 12679 if (!is_jack_detectable(codec, 0x1b)) 12680 return; 12681 12682 switch (action) { 12683 case HDA_FIXUP_ACT_PRE_PROBE: 12684 snd_hda_jack_detect_enable_callback(codec, 0x1b, 12685 alc662_aspire_ethos_mute_speakers); 12686 /* subwoofer needs an extra GPIO setting to become audible */ 12687 alc_setup_gpio(codec, 0x02); 12688 break; 12689 case HDA_FIXUP_ACT_INIT: 12690 /* Make sure to start in a correct state, i.e. if 12691 * headphones have been plugged in before powering up the system 12692 */ 12693 alc662_aspire_ethos_mute_speakers(codec, NULL); 12694 break; 12695 } 12696 } 12697 12698 static void alc671_fixup_hp_headset_mic2(struct hda_codec *codec, 12699 const struct hda_fixup *fix, int action) 12700 { 12701 struct alc_spec *spec = codec->spec; 12702 12703 static const struct hda_pintbl pincfgs[] = { 12704 { 0x19, 0x02a11040 }, /* use as headset mic, with its own jack detect */ 12705 { 0x1b, 0x0181304f }, 12706 { } 12707 }; 12708 12709 switch (action) { 12710 case HDA_FIXUP_ACT_PRE_PROBE: 12711 spec->gen.mixer_nid = 0; 12712 spec->parse_flags |= HDA_PINCFG_HEADSET_MIC; 12713 snd_hda_apply_pincfgs(codec, pincfgs); 12714 break; 12715 case HDA_FIXUP_ACT_INIT: 12716 alc_write_coef_idx(codec, 0x19, 0xa054); 12717 break; 12718 } 12719 } 12720 12721 static void alc897_hp_automute_hook(struct hda_codec *codec, 12722 struct hda_jack_callback *jack) 12723 { 12724 struct alc_spec *spec = codec->spec; 12725 int vref; 12726 12727 snd_hda_gen_hp_automute(codec, jack); 12728 vref = spec->gen.hp_jack_present ? (PIN_HP | AC_PINCTL_VREF_100) : PIN_HP; 12729 snd_hda_set_pin_ctl(codec, 0x1b, vref); 12730 } 12731 12732 static void alc897_fixup_lenovo_headset_mic(struct hda_codec *codec, 12733 const struct hda_fixup *fix, int action) 12734 { 12735 struct alc_spec *spec = codec->spec; 12736 if (action == HDA_FIXUP_ACT_PRE_PROBE) { 12737 spec->gen.hp_automute_hook = alc897_hp_automute_hook; 12738 spec->no_shutup_pins = 1; 12739 } 12740 if (action == HDA_FIXUP_ACT_PROBE) { 12741 snd_hda_set_pin_ctl_cache(codec, 0x1a, PIN_IN | AC_PINCTL_VREF_100); 12742 } 12743 } 12744 12745 static void alc897_fixup_lenovo_headset_mode(struct hda_codec *codec, 12746 const struct hda_fixup *fix, int action) 12747 { 12748 struct alc_spec *spec = codec->spec; 12749 12750 if (action == HDA_FIXUP_ACT_PRE_PROBE) { 12751 spec->parse_flags |= HDA_PINCFG_HEADSET_MIC; 12752 spec->gen.hp_automute_hook = alc897_hp_automute_hook; 12753 } 12754 } 12755 12756 static const struct coef_fw alc668_coefs[] = { 12757 WRITE_COEF(0x01, 0xbebe), WRITE_COEF(0x02, 0xaaaa), WRITE_COEF(0x03, 0x0), 12758 WRITE_COEF(0x04, 0x0180), WRITE_COEF(0x06, 0x0), WRITE_COEF(0x07, 0x0f80), 12759 WRITE_COEF(0x08, 0x0031), WRITE_COEF(0x0a, 0x0060), WRITE_COEF(0x0b, 0x0), 12760 WRITE_COEF(0x0c, 0x7cf7), WRITE_COEF(0x0d, 0x1080), WRITE_COEF(0x0e, 0x7f7f), 12761 WRITE_COEF(0x0f, 0xcccc), WRITE_COEF(0x10, 0xddcc), WRITE_COEF(0x11, 0x0001), 12762 WRITE_COEF(0x13, 0x0), WRITE_COEF(0x14, 0x2aa0), WRITE_COEF(0x17, 0xa940), 12763 WRITE_COEF(0x19, 0x0), WRITE_COEF(0x1a, 0x0), WRITE_COEF(0x1b, 0x0), 12764 WRITE_COEF(0x1c, 0x0), WRITE_COEF(0x1d, 0x0), WRITE_COEF(0x1e, 0x7418), 12765 WRITE_COEF(0x1f, 0x0804), WRITE_COEF(0x20, 0x4200), WRITE_COEF(0x21, 0x0468), 12766 WRITE_COEF(0x22, 0x8ccc), WRITE_COEF(0x23, 0x0250), WRITE_COEF(0x24, 0x7418), 12767 WRITE_COEF(0x27, 0x0), WRITE_COEF(0x28, 0x8ccc), WRITE_COEF(0x2a, 0xff00), 12768 WRITE_COEF(0x2b, 0x8000), WRITE_COEF(0xa7, 0xff00), WRITE_COEF(0xa8, 0x8000), 12769 WRITE_COEF(0xaa, 0x2e17), WRITE_COEF(0xab, 0xa0c0), WRITE_COEF(0xac, 0x0), 12770 WRITE_COEF(0xad, 0x0), WRITE_COEF(0xae, 0x2ac6), WRITE_COEF(0xaf, 0xa480), 12771 WRITE_COEF(0xb0, 0x0), WRITE_COEF(0xb1, 0x0), WRITE_COEF(0xb2, 0x0), 12772 WRITE_COEF(0xb3, 0x0), WRITE_COEF(0xb4, 0x0), WRITE_COEF(0xb5, 0x1040), 12773 WRITE_COEF(0xb6, 0xd697), WRITE_COEF(0xb7, 0x902b), WRITE_COEF(0xb8, 0xd697), 12774 WRITE_COEF(0xb9, 0x902b), WRITE_COEF(0xba, 0xb8ba), WRITE_COEF(0xbb, 0xaaab), 12775 WRITE_COEF(0xbc, 0xaaaf), WRITE_COEF(0xbd, 0x6aaa), WRITE_COEF(0xbe, 0x1c02), 12776 WRITE_COEF(0xc0, 0x00ff), WRITE_COEF(0xc1, 0x0fa6), 12777 {} 12778 }; 12779 12780 static void alc668_restore_default_value(struct hda_codec *codec) 12781 { 12782 alc_process_coef_fw(codec, alc668_coefs); 12783 } 12784 12785 enum { 12786 ALC662_FIXUP_ASPIRE, 12787 ALC662_FIXUP_LED_GPIO1, 12788 ALC662_FIXUP_IDEAPAD, 12789 ALC272_FIXUP_MARIO, 12790 ALC662_FIXUP_CZC_ET26, 12791 ALC662_FIXUP_CZC_P10T, 12792 ALC662_FIXUP_SKU_IGNORE, 12793 ALC662_FIXUP_HP_RP5800, 12794 ALC662_FIXUP_ASUS_MODE1, 12795 ALC662_FIXUP_ASUS_MODE2, 12796 ALC662_FIXUP_ASUS_MODE3, 12797 ALC662_FIXUP_ASUS_MODE4, 12798 ALC662_FIXUP_ASUS_MODE5, 12799 ALC662_FIXUP_ASUS_MODE6, 12800 ALC662_FIXUP_ASUS_MODE7, 12801 ALC662_FIXUP_ASUS_MODE8, 12802 ALC662_FIXUP_NO_JACK_DETECT, 12803 ALC662_FIXUP_ZOTAC_Z68, 12804 ALC662_FIXUP_INV_DMIC, 12805 ALC662_FIXUP_DELL_MIC_NO_PRESENCE, 12806 ALC668_FIXUP_DELL_MIC_NO_PRESENCE, 12807 ALC662_FIXUP_HEADSET_MODE, 12808 ALC668_FIXUP_HEADSET_MODE, 12809 ALC662_FIXUP_BASS_MODE4_CHMAP, 12810 ALC662_FIXUP_BASS_16, 12811 ALC662_FIXUP_BASS_1A, 12812 ALC662_FIXUP_BASS_CHMAP, 12813 ALC668_FIXUP_AUTO_MUTE, 12814 ALC668_FIXUP_DELL_DISABLE_AAMIX, 12815 ALC668_FIXUP_DELL_XPS13, 12816 ALC662_FIXUP_ASUS_Nx50, 12817 ALC668_FIXUP_ASUS_Nx51_HEADSET_MODE, 12818 ALC668_FIXUP_ASUS_Nx51, 12819 ALC668_FIXUP_MIC_COEF, 12820 ALC668_FIXUP_ASUS_G751, 12821 ALC891_FIXUP_HEADSET_MODE, 12822 ALC891_FIXUP_DELL_MIC_NO_PRESENCE, 12823 ALC662_FIXUP_ACER_VERITON, 12824 ALC892_FIXUP_ASROCK_MOBO, 12825 ALC662_FIXUP_USI_FUNC, 12826 ALC662_FIXUP_USI_HEADSET_MODE, 12827 ALC662_FIXUP_LENOVO_MULTI_CODECS, 12828 ALC669_FIXUP_ACER_ASPIRE_ETHOS, 12829 ALC669_FIXUP_ACER_ASPIRE_ETHOS_HEADSET, 12830 ALC671_FIXUP_HP_HEADSET_MIC2, 12831 ALC662_FIXUP_ACER_X2660G_HEADSET_MODE, 12832 ALC662_FIXUP_ACER_NITRO_HEADSET_MODE, 12833 ALC668_FIXUP_ASUS_NO_HEADSET_MIC, 12834 ALC668_FIXUP_HEADSET_MIC, 12835 ALC668_FIXUP_MIC_DET_COEF, 12836 ALC897_FIXUP_LENOVO_HEADSET_MIC, 12837 ALC897_FIXUP_HEADSET_MIC_PIN, 12838 ALC897_FIXUP_HP_HSMIC_VERB, 12839 ALC897_FIXUP_LENOVO_HEADSET_MODE, 12840 ALC897_FIXUP_HEADSET_MIC_PIN2, 12841 ALC897_FIXUP_UNIS_H3C_X500S, 12842 ALC897_FIXUP_HEADSET_MIC_PIN3, 12843 }; 12844 12845 static const struct hda_fixup alc662_fixups[] = { 12846 [ALC662_FIXUP_ASPIRE] = { 12847 .type = HDA_FIXUP_PINS, 12848 .v.pins = (const struct hda_pintbl[]) { 12849 { 0x15, 0x99130112 }, /* subwoofer */ 12850 { } 12851 } 12852 }, 12853 [ALC662_FIXUP_LED_GPIO1] = { 12854 .type = HDA_FIXUP_FUNC, 12855 .v.func = alc662_fixup_led_gpio1, 12856 }, 12857 [ALC662_FIXUP_IDEAPAD] = { 12858 .type = HDA_FIXUP_PINS, 12859 .v.pins = (const struct hda_pintbl[]) { 12860 { 0x17, 0x99130112 }, /* subwoofer */ 12861 { } 12862 }, 12863 .chained = true, 12864 .chain_id = ALC662_FIXUP_LED_GPIO1, 12865 }, 12866 [ALC272_FIXUP_MARIO] = { 12867 .type = HDA_FIXUP_FUNC, 12868 .v.func = alc272_fixup_mario, 12869 }, 12870 [ALC662_FIXUP_CZC_ET26] = { 12871 .type = HDA_FIXUP_PINS, 12872 .v.pins = (const struct hda_pintbl[]) { 12873 {0x12, 0x403cc000}, 12874 {0x14, 0x90170110}, /* speaker */ 12875 {0x15, 0x411111f0}, 12876 {0x16, 0x411111f0}, 12877 {0x18, 0x01a19030}, /* mic */ 12878 {0x19, 0x90a7013f}, /* int-mic */ 12879 {0x1a, 0x01014020}, 12880 {0x1b, 0x0121401f}, 12881 {0x1c, 0x411111f0}, 12882 {0x1d, 0x411111f0}, 12883 {0x1e, 0x40478e35}, 12884 {} 12885 }, 12886 .chained = true, 12887 .chain_id = ALC662_FIXUP_SKU_IGNORE 12888 }, 12889 [ALC662_FIXUP_CZC_P10T] = { 12890 .type = HDA_FIXUP_VERBS, 12891 .v.verbs = (const struct hda_verb[]) { 12892 {0x14, AC_VERB_SET_EAPD_BTLENABLE, 0}, 12893 {} 12894 } 12895 }, 12896 [ALC662_FIXUP_SKU_IGNORE] = { 12897 .type = HDA_FIXUP_FUNC, 12898 .v.func = alc_fixup_sku_ignore, 12899 }, 12900 [ALC662_FIXUP_HP_RP5800] = { 12901 .type = HDA_FIXUP_PINS, 12902 .v.pins = (const struct hda_pintbl[]) { 12903 { 0x14, 0x0221201f }, /* HP out */ 12904 { } 12905 }, 12906 .chained = true, 12907 .chain_id = ALC662_FIXUP_SKU_IGNORE 12908 }, 12909 [ALC662_FIXUP_ASUS_MODE1] = { 12910 .type = HDA_FIXUP_PINS, 12911 .v.pins = (const struct hda_pintbl[]) { 12912 { 0x14, 0x99130110 }, /* speaker */ 12913 { 0x18, 0x01a19c20 }, /* mic */ 12914 { 0x19, 0x99a3092f }, /* int-mic */ 12915 { 0x21, 0x0121401f }, /* HP out */ 12916 { } 12917 }, 12918 .chained = true, 12919 .chain_id = ALC662_FIXUP_SKU_IGNORE 12920 }, 12921 [ALC662_FIXUP_ASUS_MODE2] = { 12922 .type = HDA_FIXUP_PINS, 12923 .v.pins = (const struct hda_pintbl[]) { 12924 { 0x14, 0x99130110 }, /* speaker */ 12925 { 0x18, 0x01a19820 }, /* mic */ 12926 { 0x19, 0x99a3092f }, /* int-mic */ 12927 { 0x1b, 0x0121401f }, /* HP out */ 12928 { } 12929 }, 12930 .chained = true, 12931 .chain_id = ALC662_FIXUP_SKU_IGNORE 12932 }, 12933 [ALC662_FIXUP_ASUS_MODE3] = { 12934 .type = HDA_FIXUP_PINS, 12935 .v.pins = (const struct hda_pintbl[]) { 12936 { 0x14, 0x99130110 }, /* speaker */ 12937 { 0x15, 0x0121441f }, /* HP */ 12938 { 0x18, 0x01a19840 }, /* mic */ 12939 { 0x19, 0x99a3094f }, /* int-mic */ 12940 { 0x21, 0x01211420 }, /* HP2 */ 12941 { } 12942 }, 12943 .chained = true, 12944 .chain_id = ALC662_FIXUP_SKU_IGNORE 12945 }, 12946 [ALC662_FIXUP_ASUS_MODE4] = { 12947 .type = HDA_FIXUP_PINS, 12948 .v.pins = (const struct hda_pintbl[]) { 12949 { 0x14, 0x99130110 }, /* speaker */ 12950 { 0x16, 0x99130111 }, /* speaker */ 12951 { 0x18, 0x01a19840 }, /* mic */ 12952 { 0x19, 0x99a3094f }, /* int-mic */ 12953 { 0x21, 0x0121441f }, /* HP */ 12954 { } 12955 }, 12956 .chained = true, 12957 .chain_id = ALC662_FIXUP_SKU_IGNORE 12958 }, 12959 [ALC662_FIXUP_ASUS_MODE5] = { 12960 .type = HDA_FIXUP_PINS, 12961 .v.pins = (const struct hda_pintbl[]) { 12962 { 0x14, 0x99130110 }, /* speaker */ 12963 { 0x15, 0x0121441f }, /* HP */ 12964 { 0x16, 0x99130111 }, /* speaker */ 12965 { 0x18, 0x01a19840 }, /* mic */ 12966 { 0x19, 0x99a3094f }, /* int-mic */ 12967 { } 12968 }, 12969 .chained = true, 12970 .chain_id = ALC662_FIXUP_SKU_IGNORE 12971 }, 12972 [ALC662_FIXUP_ASUS_MODE6] = { 12973 .type = HDA_FIXUP_PINS, 12974 .v.pins = (const struct hda_pintbl[]) { 12975 { 0x14, 0x99130110 }, /* speaker */ 12976 { 0x15, 0x01211420 }, /* HP2 */ 12977 { 0x18, 0x01a19840 }, /* mic */ 12978 { 0x19, 0x99a3094f }, /* int-mic */ 12979 { 0x1b, 0x0121441f }, /* HP */ 12980 { } 12981 }, 12982 .chained = true, 12983 .chain_id = ALC662_FIXUP_SKU_IGNORE 12984 }, 12985 [ALC662_FIXUP_ASUS_MODE7] = { 12986 .type = HDA_FIXUP_PINS, 12987 .v.pins = (const struct hda_pintbl[]) { 12988 { 0x14, 0x99130110 }, /* speaker */ 12989 { 0x17, 0x99130111 }, /* speaker */ 12990 { 0x18, 0x01a19840 }, /* mic */ 12991 { 0x19, 0x99a3094f }, /* int-mic */ 12992 { 0x1b, 0x01214020 }, /* HP */ 12993 { 0x21, 0x0121401f }, /* HP */ 12994 { } 12995 }, 12996 .chained = true, 12997 .chain_id = ALC662_FIXUP_SKU_IGNORE 12998 }, 12999 [ALC662_FIXUP_ASUS_MODE8] = { 13000 .type = HDA_FIXUP_PINS, 13001 .v.pins = (const struct hda_pintbl[]) { 13002 { 0x14, 0x99130110 }, /* speaker */ 13003 { 0x12, 0x99a30970 }, /* int-mic */ 13004 { 0x15, 0x01214020 }, /* HP */ 13005 { 0x17, 0x99130111 }, /* speaker */ 13006 { 0x18, 0x01a19840 }, /* mic */ 13007 { 0x21, 0x0121401f }, /* HP */ 13008 { } 13009 }, 13010 .chained = true, 13011 .chain_id = ALC662_FIXUP_SKU_IGNORE 13012 }, 13013 [ALC662_FIXUP_NO_JACK_DETECT] = { 13014 .type = HDA_FIXUP_FUNC, 13015 .v.func = alc_fixup_no_jack_detect, 13016 }, 13017 [ALC662_FIXUP_ZOTAC_Z68] = { 13018 .type = HDA_FIXUP_PINS, 13019 .v.pins = (const struct hda_pintbl[]) { 13020 { 0x1b, 0x02214020 }, /* Front HP */ 13021 { } 13022 } 13023 }, 13024 [ALC662_FIXUP_INV_DMIC] = { 13025 .type = HDA_FIXUP_FUNC, 13026 .v.func = alc_fixup_inv_dmic, 13027 }, 13028 [ALC668_FIXUP_DELL_XPS13] = { 13029 .type = HDA_FIXUP_FUNC, 13030 .v.func = alc_fixup_dell_xps13, 13031 .chained = true, 13032 .chain_id = ALC668_FIXUP_DELL_DISABLE_AAMIX 13033 }, 13034 [ALC668_FIXUP_DELL_DISABLE_AAMIX] = { 13035 .type = HDA_FIXUP_FUNC, 13036 .v.func = alc_fixup_disable_aamix, 13037 .chained = true, 13038 .chain_id = ALC668_FIXUP_DELL_MIC_NO_PRESENCE 13039 }, 13040 [ALC668_FIXUP_AUTO_MUTE] = { 13041 .type = HDA_FIXUP_FUNC, 13042 .v.func = alc_fixup_auto_mute_via_amp, 13043 .chained = true, 13044 .chain_id = ALC668_FIXUP_DELL_MIC_NO_PRESENCE 13045 }, 13046 [ALC662_FIXUP_DELL_MIC_NO_PRESENCE] = { 13047 .type = HDA_FIXUP_PINS, 13048 .v.pins = (const struct hda_pintbl[]) { 13049 { 0x19, 0x03a1113c }, /* use as headset mic, without its own jack detect */ 13050 /* headphone mic by setting pin control of 0x1b (headphone out) to in + vref_50 */ 13051 { } 13052 }, 13053 .chained = true, 13054 .chain_id = ALC662_FIXUP_HEADSET_MODE 13055 }, 13056 [ALC662_FIXUP_HEADSET_MODE] = { 13057 .type = HDA_FIXUP_FUNC, 13058 .v.func = alc_fixup_headset_mode_alc662, 13059 }, 13060 [ALC668_FIXUP_DELL_MIC_NO_PRESENCE] = { 13061 .type = HDA_FIXUP_PINS, 13062 .v.pins = (const struct hda_pintbl[]) { 13063 { 0x19, 0x03a1913d }, /* use as headphone mic, without its own jack detect */ 13064 { 0x1b, 0x03a1113c }, /* use as headset mic, without its own jack detect */ 13065 { } 13066 }, 13067 .chained = true, 13068 .chain_id = ALC668_FIXUP_HEADSET_MODE 13069 }, 13070 [ALC668_FIXUP_HEADSET_MODE] = { 13071 .type = HDA_FIXUP_FUNC, 13072 .v.func = alc_fixup_headset_mode_alc668, 13073 }, 13074 [ALC662_FIXUP_BASS_MODE4_CHMAP] = { 13075 .type = HDA_FIXUP_FUNC, 13076 .v.func = alc_fixup_bass_chmap, 13077 .chained = true, 13078 .chain_id = ALC662_FIXUP_ASUS_MODE4 13079 }, 13080 [ALC662_FIXUP_BASS_16] = { 13081 .type = HDA_FIXUP_PINS, 13082 .v.pins = (const struct hda_pintbl[]) { 13083 {0x16, 0x80106111}, /* bass speaker */ 13084 {} 13085 }, 13086 .chained = true, 13087 .chain_id = ALC662_FIXUP_BASS_CHMAP, 13088 }, 13089 [ALC662_FIXUP_BASS_1A] = { 13090 .type = HDA_FIXUP_PINS, 13091 .v.pins = (const struct hda_pintbl[]) { 13092 {0x1a, 0x80106111}, /* bass speaker */ 13093 {} 13094 }, 13095 .chained = true, 13096 .chain_id = ALC662_FIXUP_BASS_CHMAP, 13097 }, 13098 [ALC662_FIXUP_BASS_CHMAP] = { 13099 .type = HDA_FIXUP_FUNC, 13100 .v.func = alc_fixup_bass_chmap, 13101 }, 13102 [ALC662_FIXUP_ASUS_Nx50] = { 13103 .type = HDA_FIXUP_FUNC, 13104 .v.func = alc_fixup_auto_mute_via_amp, 13105 .chained = true, 13106 .chain_id = ALC662_FIXUP_BASS_1A 13107 }, 13108 [ALC668_FIXUP_ASUS_Nx51_HEADSET_MODE] = { 13109 .type = HDA_FIXUP_FUNC, 13110 .v.func = alc_fixup_headset_mode_alc668, 13111 .chain_id = ALC662_FIXUP_BASS_CHMAP 13112 }, 13113 [ALC668_FIXUP_ASUS_Nx51] = { 13114 .type = HDA_FIXUP_PINS, 13115 .v.pins = (const struct hda_pintbl[]) { 13116 { 0x19, 0x03a1913d }, /* use as headphone mic, without its own jack detect */ 13117 { 0x1a, 0x90170151 }, /* bass speaker */ 13118 { 0x1b, 0x03a1113c }, /* use as headset mic, without its own jack detect */ 13119 {} 13120 }, 13121 .chained = true, 13122 .chain_id = ALC668_FIXUP_ASUS_Nx51_HEADSET_MODE, 13123 }, 13124 [ALC668_FIXUP_MIC_COEF] = { 13125 .type = HDA_FIXUP_VERBS, 13126 .v.verbs = (const struct hda_verb[]) { 13127 { 0x20, AC_VERB_SET_COEF_INDEX, 0xc3 }, 13128 { 0x20, AC_VERB_SET_PROC_COEF, 0x4000 }, 13129 {} 13130 }, 13131 }, 13132 [ALC668_FIXUP_ASUS_G751] = { 13133 .type = HDA_FIXUP_PINS, 13134 .v.pins = (const struct hda_pintbl[]) { 13135 { 0x16, 0x0421101f }, /* HP */ 13136 {} 13137 }, 13138 .chained = true, 13139 .chain_id = ALC668_FIXUP_MIC_COEF 13140 }, 13141 [ALC891_FIXUP_HEADSET_MODE] = { 13142 .type = HDA_FIXUP_FUNC, 13143 .v.func = alc_fixup_headset_mode, 13144 }, 13145 [ALC891_FIXUP_DELL_MIC_NO_PRESENCE] = { 13146 .type = HDA_FIXUP_PINS, 13147 .v.pins = (const struct hda_pintbl[]) { 13148 { 0x19, 0x03a1913d }, /* use as headphone mic, without its own jack detect */ 13149 { 0x1b, 0x03a1113c }, /* use as headset mic, without its own jack detect */ 13150 { } 13151 }, 13152 .chained = true, 13153 .chain_id = ALC891_FIXUP_HEADSET_MODE 13154 }, 13155 [ALC662_FIXUP_ACER_VERITON] = { 13156 .type = HDA_FIXUP_PINS, 13157 .v.pins = (const struct hda_pintbl[]) { 13158 { 0x15, 0x50170120 }, /* no internal speaker */ 13159 { } 13160 } 13161 }, 13162 [ALC892_FIXUP_ASROCK_MOBO] = { 13163 .type = HDA_FIXUP_PINS, 13164 .v.pins = (const struct hda_pintbl[]) { 13165 { 0x15, 0x40f000f0 }, /* disabled */ 13166 { 0x16, 0x40f000f0 }, /* disabled */ 13167 { } 13168 } 13169 }, 13170 [ALC662_FIXUP_USI_FUNC] = { 13171 .type = HDA_FIXUP_FUNC, 13172 .v.func = alc662_fixup_usi_headset_mic, 13173 }, 13174 [ALC662_FIXUP_USI_HEADSET_MODE] = { 13175 .type = HDA_FIXUP_PINS, 13176 .v.pins = (const struct hda_pintbl[]) { 13177 { 0x19, 0x02a1913c }, /* use as headset mic, without its own jack detect */ 13178 { 0x18, 0x01a1903d }, 13179 { } 13180 }, 13181 .chained = true, 13182 .chain_id = ALC662_FIXUP_USI_FUNC 13183 }, 13184 [ALC662_FIXUP_LENOVO_MULTI_CODECS] = { 13185 .type = HDA_FIXUP_FUNC, 13186 .v.func = alc233_alc662_fixup_lenovo_dual_codecs, 13187 }, 13188 [ALC669_FIXUP_ACER_ASPIRE_ETHOS_HEADSET] = { 13189 .type = HDA_FIXUP_FUNC, 13190 .v.func = alc662_fixup_aspire_ethos_hp, 13191 }, 13192 [ALC669_FIXUP_ACER_ASPIRE_ETHOS] = { 13193 .type = HDA_FIXUP_PINS, 13194 .v.pins = (const struct hda_pintbl[]) { 13195 { 0x15, 0x92130110 }, /* front speakers */ 13196 { 0x18, 0x99130111 }, /* center/subwoofer */ 13197 { 0x1b, 0x11130012 }, /* surround plus jack for HP */ 13198 { } 13199 }, 13200 .chained = true, 13201 .chain_id = ALC669_FIXUP_ACER_ASPIRE_ETHOS_HEADSET 13202 }, 13203 [ALC671_FIXUP_HP_HEADSET_MIC2] = { 13204 .type = HDA_FIXUP_FUNC, 13205 .v.func = alc671_fixup_hp_headset_mic2, 13206 }, 13207 [ALC662_FIXUP_ACER_X2660G_HEADSET_MODE] = { 13208 .type = HDA_FIXUP_PINS, 13209 .v.pins = (const struct hda_pintbl[]) { 13210 { 0x1a, 0x02a1113c }, /* use as headset mic, without its own jack detect */ 13211 { } 13212 }, 13213 .chained = true, 13214 .chain_id = ALC662_FIXUP_USI_FUNC 13215 }, 13216 [ALC662_FIXUP_ACER_NITRO_HEADSET_MODE] = { 13217 .type = HDA_FIXUP_PINS, 13218 .v.pins = (const struct hda_pintbl[]) { 13219 { 0x1a, 0x01a11140 }, /* use as headset mic, without its own jack detect */ 13220 { 0x1b, 0x0221144f }, 13221 { } 13222 }, 13223 .chained = true, 13224 .chain_id = ALC662_FIXUP_USI_FUNC 13225 }, 13226 [ALC668_FIXUP_ASUS_NO_HEADSET_MIC] = { 13227 .type = HDA_FIXUP_PINS, 13228 .v.pins = (const struct hda_pintbl[]) { 13229 { 0x1b, 0x04a1112c }, 13230 { } 13231 }, 13232 .chained = true, 13233 .chain_id = ALC668_FIXUP_HEADSET_MIC 13234 }, 13235 [ALC668_FIXUP_HEADSET_MIC] = { 13236 .type = HDA_FIXUP_FUNC, 13237 .v.func = alc269_fixup_headset_mic, 13238 .chained = true, 13239 .chain_id = ALC668_FIXUP_MIC_DET_COEF 13240 }, 13241 [ALC668_FIXUP_MIC_DET_COEF] = { 13242 .type = HDA_FIXUP_VERBS, 13243 .v.verbs = (const struct hda_verb[]) { 13244 { 0x20, AC_VERB_SET_COEF_INDEX, 0x15 }, 13245 { 0x20, AC_VERB_SET_PROC_COEF, 0x0d60 }, 13246 {} 13247 }, 13248 }, 13249 [ALC897_FIXUP_LENOVO_HEADSET_MIC] = { 13250 .type = HDA_FIXUP_FUNC, 13251 .v.func = alc897_fixup_lenovo_headset_mic, 13252 }, 13253 [ALC897_FIXUP_HEADSET_MIC_PIN] = { 13254 .type = HDA_FIXUP_PINS, 13255 .v.pins = (const struct hda_pintbl[]) { 13256 { 0x1a, 0x03a11050 }, 13257 { } 13258 }, 13259 .chained = true, 13260 .chain_id = ALC897_FIXUP_LENOVO_HEADSET_MIC 13261 }, 13262 [ALC897_FIXUP_HP_HSMIC_VERB] = { 13263 .type = HDA_FIXUP_PINS, 13264 .v.pins = (const struct hda_pintbl[]) { 13265 { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */ 13266 { } 13267 }, 13268 }, 13269 [ALC897_FIXUP_LENOVO_HEADSET_MODE] = { 13270 .type = HDA_FIXUP_FUNC, 13271 .v.func = alc897_fixup_lenovo_headset_mode, 13272 }, 13273 [ALC897_FIXUP_HEADSET_MIC_PIN2] = { 13274 .type = HDA_FIXUP_PINS, 13275 .v.pins = (const struct hda_pintbl[]) { 13276 { 0x1a, 0x01a11140 }, /* use as headset mic, without its own jack detect */ 13277 { } 13278 }, 13279 .chained = true, 13280 .chain_id = ALC897_FIXUP_LENOVO_HEADSET_MODE 13281 }, 13282 [ALC897_FIXUP_UNIS_H3C_X500S] = { 13283 .type = HDA_FIXUP_VERBS, 13284 .v.verbs = (const struct hda_verb[]) { 13285 { 0x14, AC_VERB_SET_EAPD_BTLENABLE, 0 }, 13286 {} 13287 }, 13288 }, 13289 [ALC897_FIXUP_HEADSET_MIC_PIN3] = { 13290 .type = HDA_FIXUP_PINS, 13291 .v.pins = (const struct hda_pintbl[]) { 13292 { 0x19, 0x03a11050 }, /* use as headset mic */ 13293 { } 13294 }, 13295 }, 13296 }; 13297 13298 static const struct hda_quirk alc662_fixup_tbl[] = { 13299 SND_PCI_QUIRK(0x1019, 0x9087, "ECS", ALC662_FIXUP_ASUS_MODE2), 13300 SND_PCI_QUIRK(0x1019, 0x9859, "JP-IK LEAP W502", ALC897_FIXUP_HEADSET_MIC_PIN3), 13301 SND_PCI_QUIRK(0x1025, 0x022f, "Acer Aspire One", ALC662_FIXUP_INV_DMIC), 13302 SND_PCI_QUIRK(0x1025, 0x0241, "Packard Bell DOTS", ALC662_FIXUP_INV_DMIC), 13303 SND_PCI_QUIRK(0x1025, 0x0308, "Acer Aspire 8942G", ALC662_FIXUP_ASPIRE), 13304 SND_PCI_QUIRK(0x1025, 0x031c, "Gateway NV79", ALC662_FIXUP_SKU_IGNORE), 13305 SND_PCI_QUIRK(0x1025, 0x0349, "eMachines eM250", ALC662_FIXUP_INV_DMIC), 13306 SND_PCI_QUIRK(0x1025, 0x034a, "Gateway LT27", ALC662_FIXUP_INV_DMIC), 13307 SND_PCI_QUIRK(0x1025, 0x038b, "Acer Aspire 8943G", ALC662_FIXUP_ASPIRE), 13308 SND_PCI_QUIRK(0x1025, 0x0566, "Acer Aspire Ethos 8951G", ALC669_FIXUP_ACER_ASPIRE_ETHOS), 13309 SND_PCI_QUIRK(0x1025, 0x123c, "Acer Nitro N50-600", ALC662_FIXUP_ACER_NITRO_HEADSET_MODE), 13310 SND_PCI_QUIRK(0x1025, 0x124e, "Acer 2660G", ALC662_FIXUP_ACER_X2660G_HEADSET_MODE), 13311 SND_PCI_QUIRK(0x1028, 0x05d8, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE), 13312 SND_PCI_QUIRK(0x1028, 0x05db, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE), 13313 SND_PCI_QUIRK(0x1028, 0x05fe, "Dell XPS 15", ALC668_FIXUP_DELL_XPS13), 13314 SND_PCI_QUIRK(0x1028, 0x060a, "Dell XPS 13", ALC668_FIXUP_DELL_XPS13), 13315 SND_PCI_QUIRK(0x1028, 0x060d, "Dell M3800", ALC668_FIXUP_DELL_XPS13), 13316 SND_PCI_QUIRK(0x1028, 0x0625, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE), 13317 SND_PCI_QUIRK(0x1028, 0x0626, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE), 13318 SND_PCI_QUIRK(0x1028, 0x0696, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE), 13319 SND_PCI_QUIRK(0x1028, 0x0698, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE), 13320 SND_PCI_QUIRK(0x1028, 0x069f, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE), 13321 SND_PCI_QUIRK(0x103c, 0x1632, "HP RP5800", ALC662_FIXUP_HP_RP5800), 13322 SND_PCI_QUIRK(0x103c, 0x870c, "HP", ALC897_FIXUP_HP_HSMIC_VERB), 13323 SND_PCI_QUIRK(0x103c, 0x8719, "HP", ALC897_FIXUP_HP_HSMIC_VERB), 13324 SND_PCI_QUIRK(0x103c, 0x872b, "HP", ALC897_FIXUP_HP_HSMIC_VERB), 13325 SND_PCI_QUIRK(0x103c, 0x873e, "HP", ALC671_FIXUP_HP_HEADSET_MIC2), 13326 SND_PCI_QUIRK(0x103c, 0x8768, "HP Slim Desktop S01", ALC671_FIXUP_HP_HEADSET_MIC2), 13327 SND_PCI_QUIRK(0x103c, 0x877e, "HP 288 Pro G6", ALC671_FIXUP_HP_HEADSET_MIC2), 13328 SND_PCI_QUIRK(0x103c, 0x885f, "HP 288 Pro G8", ALC671_FIXUP_HP_HEADSET_MIC2), 13329 SND_PCI_QUIRK(0x1043, 0x1080, "Asus UX501VW", ALC668_FIXUP_HEADSET_MODE), 13330 SND_PCI_QUIRK(0x1043, 0x11cd, "Asus N550", ALC662_FIXUP_ASUS_Nx50), 13331 SND_PCI_QUIRK(0x1043, 0x129d, "Asus N750", ALC662_FIXUP_ASUS_Nx50), 13332 SND_PCI_QUIRK(0x1043, 0x12ff, "ASUS G751", ALC668_FIXUP_ASUS_G751), 13333 SND_PCI_QUIRK(0x1043, 0x13df, "Asus N550JX", ALC662_FIXUP_BASS_1A), 13334 SND_PCI_QUIRK(0x1043, 0x1477, "ASUS N56VZ", ALC662_FIXUP_BASS_MODE4_CHMAP), 13335 SND_PCI_QUIRK(0x1043, 0x15a7, "ASUS UX51VZH", ALC662_FIXUP_BASS_16), 13336 SND_PCI_QUIRK(0x1043, 0x177d, "ASUS N551", ALC668_FIXUP_ASUS_Nx51), 13337 SND_PCI_QUIRK(0x1043, 0x17bd, "ASUS N751", ALC668_FIXUP_ASUS_Nx51), 13338 SND_PCI_QUIRK(0x1043, 0x185d, "ASUS G551JW", ALC668_FIXUP_ASUS_NO_HEADSET_MIC), 13339 SND_PCI_QUIRK(0x1043, 0x1963, "ASUS X71SL", ALC662_FIXUP_ASUS_MODE8), 13340 SND_PCI_QUIRK(0x1043, 0x1b73, "ASUS N55SF", ALC662_FIXUP_BASS_16), 13341 SND_PCI_QUIRK(0x1043, 0x1bf3, "ASUS N76VZ", ALC662_FIXUP_BASS_MODE4_CHMAP), 13342 SND_PCI_QUIRK(0x1043, 0x8469, "ASUS mobo", ALC662_FIXUP_NO_JACK_DETECT), 13343 SND_PCI_QUIRK(0x105b, 0x0cd6, "Foxconn", ALC662_FIXUP_ASUS_MODE2), 13344 SND_PCI_QUIRK(0x144d, 0xc051, "Samsung R720", ALC662_FIXUP_IDEAPAD), 13345 SND_PCI_QUIRK(0x14cd, 0x5003, "USI", ALC662_FIXUP_USI_HEADSET_MODE), 13346 SND_PCI_QUIRK(0x17aa, 0x1036, "Lenovo P520", ALC662_FIXUP_LENOVO_MULTI_CODECS), 13347 SND_PCI_QUIRK(0x17aa, 0x1057, "Lenovo P360", ALC897_FIXUP_HEADSET_MIC_PIN), 13348 SND_PCI_QUIRK(0x17aa, 0x1064, "Lenovo P3 Tower", ALC897_FIXUP_HEADSET_MIC_PIN), 13349 SND_PCI_QUIRK(0x17aa, 0x32ca, "Lenovo ThinkCentre M80", ALC897_FIXUP_HEADSET_MIC_PIN), 13350 SND_PCI_QUIRK(0x17aa, 0x32cb, "Lenovo ThinkCentre M70", ALC897_FIXUP_HEADSET_MIC_PIN), 13351 SND_PCI_QUIRK(0x17aa, 0x32cf, "Lenovo ThinkCentre M950", ALC897_FIXUP_HEADSET_MIC_PIN), 13352 SND_PCI_QUIRK(0x17aa, 0x32f7, "Lenovo ThinkCentre M90", ALC897_FIXUP_HEADSET_MIC_PIN), 13353 SND_PCI_QUIRK(0x17aa, 0x3321, "Lenovo ThinkCentre M70 Gen4", ALC897_FIXUP_HEADSET_MIC_PIN), 13354 SND_PCI_QUIRK(0x17aa, 0x331b, "Lenovo ThinkCentre M90 Gen4", ALC897_FIXUP_HEADSET_MIC_PIN), 13355 SND_PCI_QUIRK(0x17aa, 0x3364, "Lenovo ThinkCentre M90 Gen5", ALC897_FIXUP_HEADSET_MIC_PIN), 13356 SND_PCI_QUIRK(0x17aa, 0x3742, "Lenovo TianYi510Pro-14IOB", ALC897_FIXUP_HEADSET_MIC_PIN2), 13357 SND_PCI_QUIRK(0x17aa, 0x38af, "Lenovo Ideapad Y550P", ALC662_FIXUP_IDEAPAD), 13358 SND_PCI_QUIRK(0x17aa, 0x3a0d, "Lenovo Ideapad Y550", ALC662_FIXUP_IDEAPAD), 13359 SND_PCI_QUIRK(0x1849, 0x5892, "ASRock B150M", ALC892_FIXUP_ASROCK_MOBO), 13360 SND_PCI_QUIRK(0x19da, 0xa130, "Zotac Z68", ALC662_FIXUP_ZOTAC_Z68), 13361 SND_PCI_QUIRK(0x1b0a, 0x01b8, "ACER Veriton", ALC662_FIXUP_ACER_VERITON), 13362 SND_PCI_QUIRK(0x1b35, 0x1234, "CZC ET26", ALC662_FIXUP_CZC_ET26), 13363 SND_PCI_QUIRK(0x1b35, 0x2206, "CZC P10T", ALC662_FIXUP_CZC_P10T), 13364 SND_PCI_QUIRK(0x1c6c, 0x1239, "Compaq N14JP6-V2", ALC897_FIXUP_HP_HSMIC_VERB), 13365 13366 #if 0 13367 /* Below is a quirk table taken from the old code. 13368 * Basically the device should work as is without the fixup table. 13369 * If BIOS doesn't give a proper info, enable the corresponding 13370 * fixup entry. 13371 */ 13372 SND_PCI_QUIRK(0x1043, 0x1000, "ASUS N50Vm", ALC662_FIXUP_ASUS_MODE1), 13373 SND_PCI_QUIRK(0x1043, 0x1092, "ASUS NB", ALC662_FIXUP_ASUS_MODE3), 13374 SND_PCI_QUIRK(0x1043, 0x1173, "ASUS K73Jn", ALC662_FIXUP_ASUS_MODE1), 13375 SND_PCI_QUIRK(0x1043, 0x11c3, "ASUS M70V", ALC662_FIXUP_ASUS_MODE3), 13376 SND_PCI_QUIRK(0x1043, 0x11d3, "ASUS NB", ALC662_FIXUP_ASUS_MODE1), 13377 SND_PCI_QUIRK(0x1043, 0x11f3, "ASUS NB", ALC662_FIXUP_ASUS_MODE2), 13378 SND_PCI_QUIRK(0x1043, 0x1203, "ASUS NB", ALC662_FIXUP_ASUS_MODE1), 13379 SND_PCI_QUIRK(0x1043, 0x1303, "ASUS G60J", ALC662_FIXUP_ASUS_MODE1), 13380 SND_PCI_QUIRK(0x1043, 0x1333, "ASUS G60Jx", ALC662_FIXUP_ASUS_MODE1), 13381 SND_PCI_QUIRK(0x1043, 0x1339, "ASUS NB", ALC662_FIXUP_ASUS_MODE2), 13382 SND_PCI_QUIRK(0x1043, 0x13e3, "ASUS N71JA", ALC662_FIXUP_ASUS_MODE7), 13383 SND_PCI_QUIRK(0x1043, 0x1463, "ASUS N71", ALC662_FIXUP_ASUS_MODE7), 13384 SND_PCI_QUIRK(0x1043, 0x14d3, "ASUS G72", ALC662_FIXUP_ASUS_MODE8), 13385 SND_PCI_QUIRK(0x1043, 0x1563, "ASUS N90", ALC662_FIXUP_ASUS_MODE3), 13386 SND_PCI_QUIRK(0x1043, 0x15d3, "ASUS N50SF F50SF", ALC662_FIXUP_ASUS_MODE1), 13387 SND_PCI_QUIRK(0x1043, 0x16c3, "ASUS NB", ALC662_FIXUP_ASUS_MODE2), 13388 SND_PCI_QUIRK(0x1043, 0x16f3, "ASUS K40C K50C", ALC662_FIXUP_ASUS_MODE2), 13389 SND_PCI_QUIRK(0x1043, 0x1733, "ASUS N81De", ALC662_FIXUP_ASUS_MODE1), 13390 SND_PCI_QUIRK(0x1043, 0x1753, "ASUS NB", ALC662_FIXUP_ASUS_MODE2), 13391 SND_PCI_QUIRK(0x1043, 0x1763, "ASUS NB", ALC662_FIXUP_ASUS_MODE6), 13392 SND_PCI_QUIRK(0x1043, 0x1765, "ASUS NB", ALC662_FIXUP_ASUS_MODE6), 13393 SND_PCI_QUIRK(0x1043, 0x1783, "ASUS NB", ALC662_FIXUP_ASUS_MODE2), 13394 SND_PCI_QUIRK(0x1043, 0x1793, "ASUS F50GX", ALC662_FIXUP_ASUS_MODE1), 13395 SND_PCI_QUIRK(0x1043, 0x17b3, "ASUS F70SL", ALC662_FIXUP_ASUS_MODE3), 13396 SND_PCI_QUIRK(0x1043, 0x17f3, "ASUS X58LE", ALC662_FIXUP_ASUS_MODE2), 13397 SND_PCI_QUIRK(0x1043, 0x1813, "ASUS NB", ALC662_FIXUP_ASUS_MODE2), 13398 SND_PCI_QUIRK(0x1043, 0x1823, "ASUS NB", ALC662_FIXUP_ASUS_MODE5), 13399 SND_PCI_QUIRK(0x1043, 0x1833, "ASUS NB", ALC662_FIXUP_ASUS_MODE6), 13400 SND_PCI_QUIRK(0x1043, 0x1843, "ASUS NB", ALC662_FIXUP_ASUS_MODE2), 13401 SND_PCI_QUIRK(0x1043, 0x1853, "ASUS F50Z", ALC662_FIXUP_ASUS_MODE1), 13402 SND_PCI_QUIRK(0x1043, 0x1864, "ASUS NB", ALC662_FIXUP_ASUS_MODE2), 13403 SND_PCI_QUIRK(0x1043, 0x1876, "ASUS NB", ALC662_FIXUP_ASUS_MODE2), 13404 SND_PCI_QUIRK(0x1043, 0x1893, "ASUS M50Vm", ALC662_FIXUP_ASUS_MODE3), 13405 SND_PCI_QUIRK(0x1043, 0x1894, "ASUS X55", ALC662_FIXUP_ASUS_MODE3), 13406 SND_PCI_QUIRK(0x1043, 0x18b3, "ASUS N80Vc", ALC662_FIXUP_ASUS_MODE1), 13407 SND_PCI_QUIRK(0x1043, 0x18c3, "ASUS VX5", ALC662_FIXUP_ASUS_MODE1), 13408 SND_PCI_QUIRK(0x1043, 0x18d3, "ASUS N81Te", ALC662_FIXUP_ASUS_MODE1), 13409 SND_PCI_QUIRK(0x1043, 0x18f3, "ASUS N505Tp", ALC662_FIXUP_ASUS_MODE1), 13410 SND_PCI_QUIRK(0x1043, 0x1903, "ASUS F5GL", ALC662_FIXUP_ASUS_MODE1), 13411 SND_PCI_QUIRK(0x1043, 0x1913, "ASUS NB", ALC662_FIXUP_ASUS_MODE2), 13412 SND_PCI_QUIRK(0x1043, 0x1933, "ASUS F80Q", ALC662_FIXUP_ASUS_MODE2), 13413 SND_PCI_QUIRK(0x1043, 0x1943, "ASUS Vx3V", ALC662_FIXUP_ASUS_MODE1), 13414 SND_PCI_QUIRK(0x1043, 0x1953, "ASUS NB", ALC662_FIXUP_ASUS_MODE1), 13415 SND_PCI_QUIRK(0x1043, 0x1963, "ASUS X71C", ALC662_FIXUP_ASUS_MODE3), 13416 SND_PCI_QUIRK(0x1043, 0x1983, "ASUS N5051A", ALC662_FIXUP_ASUS_MODE1), 13417 SND_PCI_QUIRK(0x1043, 0x1993, "ASUS N20", ALC662_FIXUP_ASUS_MODE1), 13418 SND_PCI_QUIRK(0x1043, 0x19b3, "ASUS F7Z", ALC662_FIXUP_ASUS_MODE1), 13419 SND_PCI_QUIRK(0x1043, 0x19c3, "ASUS F5Z/F6x", ALC662_FIXUP_ASUS_MODE2), 13420 SND_PCI_QUIRK(0x1043, 0x19e3, "ASUS NB", ALC662_FIXUP_ASUS_MODE1), 13421 SND_PCI_QUIRK(0x1043, 0x19f3, "ASUS NB", ALC662_FIXUP_ASUS_MODE4), 13422 #endif 13423 {} 13424 }; 13425 13426 static const struct hda_model_fixup alc662_fixup_models[] = { 13427 {.id = ALC662_FIXUP_ASPIRE, .name = "aspire"}, 13428 {.id = ALC662_FIXUP_IDEAPAD, .name = "ideapad"}, 13429 {.id = ALC272_FIXUP_MARIO, .name = "mario"}, 13430 {.id = ALC662_FIXUP_HP_RP5800, .name = "hp-rp5800"}, 13431 {.id = ALC662_FIXUP_ASUS_MODE1, .name = "asus-mode1"}, 13432 {.id = ALC662_FIXUP_ASUS_MODE2, .name = "asus-mode2"}, 13433 {.id = ALC662_FIXUP_ASUS_MODE3, .name = "asus-mode3"}, 13434 {.id = ALC662_FIXUP_ASUS_MODE4, .name = "asus-mode4"}, 13435 {.id = ALC662_FIXUP_ASUS_MODE5, .name = "asus-mode5"}, 13436 {.id = ALC662_FIXUP_ASUS_MODE6, .name = "asus-mode6"}, 13437 {.id = ALC662_FIXUP_ASUS_MODE7, .name = "asus-mode7"}, 13438 {.id = ALC662_FIXUP_ASUS_MODE8, .name = "asus-mode8"}, 13439 {.id = ALC662_FIXUP_ZOTAC_Z68, .name = "zotac-z68"}, 13440 {.id = ALC662_FIXUP_INV_DMIC, .name = "inv-dmic"}, 13441 {.id = ALC662_FIXUP_DELL_MIC_NO_PRESENCE, .name = "alc662-headset-multi"}, 13442 {.id = ALC668_FIXUP_DELL_MIC_NO_PRESENCE, .name = "dell-headset-multi"}, 13443 {.id = ALC662_FIXUP_HEADSET_MODE, .name = "alc662-headset"}, 13444 {.id = ALC668_FIXUP_HEADSET_MODE, .name = "alc668-headset"}, 13445 {.id = ALC662_FIXUP_BASS_16, .name = "bass16"}, 13446 {.id = ALC662_FIXUP_BASS_1A, .name = "bass1a"}, 13447 {.id = ALC668_FIXUP_AUTO_MUTE, .name = "automute"}, 13448 {.id = ALC668_FIXUP_DELL_XPS13, .name = "dell-xps13"}, 13449 {.id = ALC662_FIXUP_ASUS_Nx50, .name = "asus-nx50"}, 13450 {.id = ALC668_FIXUP_ASUS_Nx51, .name = "asus-nx51"}, 13451 {.id = ALC668_FIXUP_ASUS_G751, .name = "asus-g751"}, 13452 {.id = ALC891_FIXUP_HEADSET_MODE, .name = "alc891-headset"}, 13453 {.id = ALC891_FIXUP_DELL_MIC_NO_PRESENCE, .name = "alc891-headset-multi"}, 13454 {.id = ALC662_FIXUP_ACER_VERITON, .name = "acer-veriton"}, 13455 {.id = ALC892_FIXUP_ASROCK_MOBO, .name = "asrock-mobo"}, 13456 {.id = ALC662_FIXUP_USI_HEADSET_MODE, .name = "usi-headset"}, 13457 {.id = ALC662_FIXUP_LENOVO_MULTI_CODECS, .name = "dual-codecs"}, 13458 {.id = ALC669_FIXUP_ACER_ASPIRE_ETHOS, .name = "aspire-ethos"}, 13459 {.id = ALC897_FIXUP_UNIS_H3C_X500S, .name = "unis-h3c-x500s"}, 13460 {} 13461 }; 13462 13463 static const struct snd_hda_pin_quirk alc662_pin_fixup_tbl[] = { 13464 SND_HDA_PIN_QUIRK(0x10ec0867, 0x1028, "Dell", ALC891_FIXUP_DELL_MIC_NO_PRESENCE, 13465 {0x17, 0x02211010}, 13466 {0x18, 0x01a19030}, 13467 {0x1a, 0x01813040}, 13468 {0x21, 0x01014020}), 13469 SND_HDA_PIN_QUIRK(0x10ec0867, 0x1028, "Dell", ALC891_FIXUP_DELL_MIC_NO_PRESENCE, 13470 {0x16, 0x01813030}, 13471 {0x17, 0x02211010}, 13472 {0x18, 0x01a19040}, 13473 {0x21, 0x01014020}), 13474 SND_HDA_PIN_QUIRK(0x10ec0662, 0x1028, "Dell", ALC662_FIXUP_DELL_MIC_NO_PRESENCE, 13475 {0x14, 0x01014010}, 13476 {0x18, 0x01a19020}, 13477 {0x1a, 0x0181302f}, 13478 {0x1b, 0x0221401f}), 13479 SND_HDA_PIN_QUIRK(0x10ec0668, 0x1028, "Dell", ALC668_FIXUP_AUTO_MUTE, 13480 {0x12, 0x99a30130}, 13481 {0x14, 0x90170110}, 13482 {0x15, 0x0321101f}, 13483 {0x16, 0x03011020}), 13484 SND_HDA_PIN_QUIRK(0x10ec0668, 0x1028, "Dell", ALC668_FIXUP_AUTO_MUTE, 13485 {0x12, 0x99a30140}, 13486 {0x14, 0x90170110}, 13487 {0x15, 0x0321101f}, 13488 {0x16, 0x03011020}), 13489 SND_HDA_PIN_QUIRK(0x10ec0668, 0x1028, "Dell", ALC668_FIXUP_AUTO_MUTE, 13490 {0x12, 0x99a30150}, 13491 {0x14, 0x90170110}, 13492 {0x15, 0x0321101f}, 13493 {0x16, 0x03011020}), 13494 SND_HDA_PIN_QUIRK(0x10ec0668, 0x1028, "Dell", ALC668_FIXUP_AUTO_MUTE, 13495 {0x14, 0x90170110}, 13496 {0x15, 0x0321101f}, 13497 {0x16, 0x03011020}), 13498 SND_HDA_PIN_QUIRK(0x10ec0668, 0x1028, "Dell XPS 15", ALC668_FIXUP_AUTO_MUTE, 13499 {0x12, 0x90a60130}, 13500 {0x14, 0x90170110}, 13501 {0x15, 0x0321101f}), 13502 SND_HDA_PIN_QUIRK(0x10ec0671, 0x103c, "HP cPC", ALC671_FIXUP_HP_HEADSET_MIC2, 13503 {0x14, 0x01014010}, 13504 {0x17, 0x90170150}, 13505 {0x19, 0x02a11060}, 13506 {0x1b, 0x01813030}, 13507 {0x21, 0x02211020}), 13508 SND_HDA_PIN_QUIRK(0x10ec0671, 0x103c, "HP cPC", ALC671_FIXUP_HP_HEADSET_MIC2, 13509 {0x14, 0x01014010}, 13510 {0x18, 0x01a19040}, 13511 {0x1b, 0x01813030}, 13512 {0x21, 0x02211020}), 13513 SND_HDA_PIN_QUIRK(0x10ec0671, 0x103c, "HP cPC", ALC671_FIXUP_HP_HEADSET_MIC2, 13514 {0x14, 0x01014020}, 13515 {0x17, 0x90170110}, 13516 {0x18, 0x01a19050}, 13517 {0x1b, 0x01813040}, 13518 {0x21, 0x02211030}), 13519 {} 13520 }; 13521 13522 /* 13523 */ 13524 static int patch_alc662(struct hda_codec *codec) 13525 { 13526 struct alc_spec *spec; 13527 int err; 13528 13529 err = alc_alloc_spec(codec, 0x0b); 13530 if (err < 0) 13531 return err; 13532 13533 spec = codec->spec; 13534 13535 spec->shutup = alc_eapd_shutup; 13536 13537 /* handle multiple HPs as is */ 13538 spec->parse_flags = HDA_PINCFG_NO_HP_FIXUP; 13539 13540 alc_fix_pll_init(codec, 0x20, 0x04, 15); 13541 13542 switch (codec->core.vendor_id) { 13543 case 0x10ec0668: 13544 spec->init_hook = alc668_restore_default_value; 13545 break; 13546 } 13547 13548 alc_pre_init(codec); 13549 13550 snd_hda_pick_fixup(codec, alc662_fixup_models, 13551 alc662_fixup_tbl, alc662_fixups); 13552 snd_hda_pick_pin_fixup(codec, alc662_pin_fixup_tbl, alc662_fixups, true); 13553 snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PRE_PROBE); 13554 13555 alc_auto_parse_customize_define(codec); 13556 13557 if (has_cdefine_beep(codec)) 13558 spec->gen.beep_nid = 0x01; 13559 13560 if ((alc_get_coef0(codec) & (1 << 14)) && 13561 codec->bus->pci && codec->bus->pci->subsystem_vendor == 0x1025 && 13562 spec->cdefine.platform_type == 1) { 13563 err = alc_codec_rename(codec, "ALC272X"); 13564 if (err < 0) 13565 goto error; 13566 } 13567 13568 /* automatic parse from the BIOS config */ 13569 err = alc662_parse_auto_config(codec); 13570 if (err < 0) 13571 goto error; 13572 13573 if (!spec->gen.no_analog && spec->gen.beep_nid) { 13574 switch (codec->core.vendor_id) { 13575 case 0x10ec0662: 13576 err = set_beep_amp(spec, 0x0b, 0x05, HDA_INPUT); 13577 break; 13578 case 0x10ec0272: 13579 case 0x10ec0663: 13580 case 0x10ec0665: 13581 case 0x10ec0668: 13582 err = set_beep_amp(spec, 0x0b, 0x04, HDA_INPUT); 13583 break; 13584 case 0x10ec0273: 13585 err = set_beep_amp(spec, 0x0b, 0x03, HDA_INPUT); 13586 break; 13587 } 13588 if (err < 0) 13589 goto error; 13590 } 13591 13592 snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PROBE); 13593 13594 return 0; 13595 13596 error: 13597 alc_free(codec); 13598 return err; 13599 } 13600 13601 /* 13602 * ALC680 support 13603 */ 13604 13605 static int alc680_parse_auto_config(struct hda_codec *codec) 13606 { 13607 return alc_parse_auto_config(codec, NULL, NULL); 13608 } 13609 13610 /* 13611 */ 13612 static int patch_alc680(struct hda_codec *codec) 13613 { 13614 int err; 13615 13616 /* ALC680 has no aa-loopback mixer */ 13617 err = alc_alloc_spec(codec, 0); 13618 if (err < 0) 13619 return err; 13620 13621 /* automatic parse from the BIOS config */ 13622 err = alc680_parse_auto_config(codec); 13623 if (err < 0) { 13624 alc_free(codec); 13625 return err; 13626 } 13627 13628 return 0; 13629 } 13630 13631 /* 13632 * patch entries 13633 */ 13634 static const struct hda_device_id snd_hda_id_realtek[] = { 13635 HDA_CODEC_ENTRY(0x10ec0215, "ALC215", patch_alc269), 13636 HDA_CODEC_ENTRY(0x10ec0221, "ALC221", patch_alc269), 13637 HDA_CODEC_ENTRY(0x10ec0222, "ALC222", patch_alc269), 13638 HDA_CODEC_ENTRY(0x10ec0225, "ALC225", patch_alc269), 13639 HDA_CODEC_ENTRY(0x10ec0230, "ALC236", patch_alc269), 13640 HDA_CODEC_ENTRY(0x10ec0231, "ALC231", patch_alc269), 13641 HDA_CODEC_ENTRY(0x10ec0233, "ALC233", patch_alc269), 13642 HDA_CODEC_ENTRY(0x10ec0234, "ALC234", patch_alc269), 13643 HDA_CODEC_ENTRY(0x10ec0235, "ALC233", patch_alc269), 13644 HDA_CODEC_ENTRY(0x10ec0236, "ALC236", patch_alc269), 13645 HDA_CODEC_ENTRY(0x10ec0245, "ALC245", patch_alc269), 13646 HDA_CODEC_ENTRY(0x10ec0255, "ALC255", patch_alc269), 13647 HDA_CODEC_ENTRY(0x10ec0256, "ALC256", patch_alc269), 13648 HDA_CODEC_ENTRY(0x10ec0257, "ALC257", patch_alc269), 13649 HDA_CODEC_ENTRY(0x10ec0260, "ALC260", patch_alc260), 13650 HDA_CODEC_ENTRY(0x10ec0262, "ALC262", patch_alc262), 13651 HDA_CODEC_ENTRY(0x10ec0267, "ALC267", patch_alc268), 13652 HDA_CODEC_ENTRY(0x10ec0268, "ALC268", patch_alc268), 13653 HDA_CODEC_ENTRY(0x10ec0269, "ALC269", patch_alc269), 13654 HDA_CODEC_ENTRY(0x10ec0270, "ALC270", patch_alc269), 13655 HDA_CODEC_ENTRY(0x10ec0272, "ALC272", patch_alc662), 13656 HDA_CODEC_ENTRY(0x10ec0274, "ALC274", patch_alc269), 13657 HDA_CODEC_ENTRY(0x10ec0275, "ALC275", patch_alc269), 13658 HDA_CODEC_ENTRY(0x10ec0276, "ALC276", patch_alc269), 13659 HDA_CODEC_ENTRY(0x10ec0280, "ALC280", patch_alc269), 13660 HDA_CODEC_ENTRY(0x10ec0282, "ALC282", patch_alc269), 13661 HDA_CODEC_ENTRY(0x10ec0283, "ALC283", patch_alc269), 13662 HDA_CODEC_ENTRY(0x10ec0284, "ALC284", patch_alc269), 13663 HDA_CODEC_ENTRY(0x10ec0285, "ALC285", patch_alc269), 13664 HDA_CODEC_ENTRY(0x10ec0286, "ALC286", patch_alc269), 13665 HDA_CODEC_ENTRY(0x10ec0287, "ALC287", patch_alc269), 13666 HDA_CODEC_ENTRY(0x10ec0288, "ALC288", patch_alc269), 13667 HDA_CODEC_ENTRY(0x10ec0289, "ALC289", patch_alc269), 13668 HDA_CODEC_ENTRY(0x10ec0290, "ALC290", patch_alc269), 13669 HDA_CODEC_ENTRY(0x10ec0292, "ALC292", patch_alc269), 13670 HDA_CODEC_ENTRY(0x10ec0293, "ALC293", patch_alc269), 13671 HDA_CODEC_ENTRY(0x10ec0294, "ALC294", patch_alc269), 13672 HDA_CODEC_ENTRY(0x10ec0295, "ALC295", patch_alc269), 13673 HDA_CODEC_ENTRY(0x10ec0298, "ALC298", patch_alc269), 13674 HDA_CODEC_ENTRY(0x10ec0299, "ALC299", patch_alc269), 13675 HDA_CODEC_ENTRY(0x10ec0300, "ALC300", patch_alc269), 13676 HDA_CODEC_ENTRY(0x10ec0623, "ALC623", patch_alc269), 13677 HDA_CODEC_REV_ENTRY(0x10ec0861, 0x100340, "ALC660", patch_alc861), 13678 HDA_CODEC_ENTRY(0x10ec0660, "ALC660-VD", patch_alc861vd), 13679 HDA_CODEC_ENTRY(0x10ec0861, "ALC861", patch_alc861), 13680 HDA_CODEC_ENTRY(0x10ec0862, "ALC861-VD", patch_alc861vd), 13681 HDA_CODEC_REV_ENTRY(0x10ec0662, 0x100002, "ALC662 rev2", patch_alc882), 13682 HDA_CODEC_REV_ENTRY(0x10ec0662, 0x100101, "ALC662 rev1", patch_alc662), 13683 HDA_CODEC_REV_ENTRY(0x10ec0662, 0x100300, "ALC662 rev3", patch_alc662), 13684 HDA_CODEC_ENTRY(0x10ec0663, "ALC663", patch_alc662), 13685 HDA_CODEC_ENTRY(0x10ec0665, "ALC665", patch_alc662), 13686 HDA_CODEC_ENTRY(0x10ec0667, "ALC667", patch_alc662), 13687 HDA_CODEC_ENTRY(0x10ec0668, "ALC668", patch_alc662), 13688 HDA_CODEC_ENTRY(0x10ec0670, "ALC670", patch_alc662), 13689 HDA_CODEC_ENTRY(0x10ec0671, "ALC671", patch_alc662), 13690 HDA_CODEC_ENTRY(0x10ec0680, "ALC680", patch_alc680), 13691 HDA_CODEC_ENTRY(0x10ec0700, "ALC700", patch_alc269), 13692 HDA_CODEC_ENTRY(0x10ec0701, "ALC701", patch_alc269), 13693 HDA_CODEC_ENTRY(0x10ec0703, "ALC703", patch_alc269), 13694 HDA_CODEC_ENTRY(0x10ec0711, "ALC711", patch_alc269), 13695 HDA_CODEC_ENTRY(0x10ec0867, "ALC891", patch_alc662), 13696 HDA_CODEC_ENTRY(0x10ec0880, "ALC880", patch_alc880), 13697 HDA_CODEC_ENTRY(0x10ec0882, "ALC882", patch_alc882), 13698 HDA_CODEC_ENTRY(0x10ec0883, "ALC883", patch_alc882), 13699 HDA_CODEC_REV_ENTRY(0x10ec0885, 0x100101, "ALC889A", patch_alc882), 13700 HDA_CODEC_REV_ENTRY(0x10ec0885, 0x100103, "ALC889A", patch_alc882), 13701 HDA_CODEC_ENTRY(0x10ec0885, "ALC885", patch_alc882), 13702 HDA_CODEC_ENTRY(0x10ec0887, "ALC887", patch_alc882), 13703 HDA_CODEC_REV_ENTRY(0x10ec0888, 0x100101, "ALC1200", patch_alc882), 13704 HDA_CODEC_ENTRY(0x10ec0888, "ALC888", patch_alc882), 13705 HDA_CODEC_ENTRY(0x10ec0889, "ALC889", patch_alc882), 13706 HDA_CODEC_ENTRY(0x10ec0892, "ALC892", patch_alc662), 13707 HDA_CODEC_ENTRY(0x10ec0897, "ALC897", patch_alc662), 13708 HDA_CODEC_ENTRY(0x10ec0899, "ALC898", patch_alc882), 13709 HDA_CODEC_ENTRY(0x10ec0900, "ALC1150", patch_alc882), 13710 HDA_CODEC_ENTRY(0x10ec0b00, "ALCS1200A", patch_alc882), 13711 HDA_CODEC_ENTRY(0x10ec1168, "ALC1220", patch_alc882), 13712 HDA_CODEC_ENTRY(0x10ec1220, "ALC1220", patch_alc882), 13713 HDA_CODEC_ENTRY(0x19e58326, "HW8326", patch_alc269), 13714 {} /* terminator */ 13715 }; 13716 MODULE_DEVICE_TABLE(hdaudio, snd_hda_id_realtek); 13717 13718 MODULE_LICENSE("GPL"); 13719 MODULE_DESCRIPTION("Realtek HD-audio codec"); 13720 MODULE_IMPORT_NS("SND_HDA_SCODEC_COMPONENT"); 13721 13722 static struct hda_codec_driver realtek_driver = { 13723 .id = snd_hda_id_realtek, 13724 }; 13725 13726 module_hda_codec_driver(realtek_driver); 13727