Lines Matching +full:xps +full:- +full:spi +full:- +full:2

1 // SPDX-License-Identifier: GPL-2.0-or-later
34 /* extra amp-initialization sequence types */
144 struct alc_spec *spec = codec->spec; in coef_mutex_lock()
147 mutex_lock(&spec->coef_mutex); in coef_mutex_lock()
152 struct alc_spec *spec = codec->spec; in coef_mutex_unlock()
154 mutex_unlock(&spec->coef_mutex); in coef_mutex_unlock()
206 if (val != -1) in __alc_update_coefex_idx()
226 struct alc_spec *spec = codec->spec; in alc_get_coef0()
228 if (!spec->coef0) in alc_get_coef0()
229 spec->coef0 = alc_read_coef_idx(codec, 0); in alc_get_coef0()
230 return spec->coef0; in alc_get_coef0()
243 #define WRITE_COEFEX(_nid, _idx, _val) UPDATE_COEFEX(_nid, _idx, -1, _val)
251 for (; fw->nid; fw++) { in alc_process_coef_fw()
252 if (fw->mask == (unsigned short)-1) in alc_process_coef_fw()
253 __alc_write_coefex_idx(codec, fw->nid, fw->idx, fw->val); in alc_process_coef_fw()
255 __alc_update_coefex_idx(codec, fw->nid, fw->idx, in alc_process_coef_fw()
256 fw->mask, fw->val); in alc_process_coef_fw()
268 struct alc_spec *spec = codec->spec; in alc_setup_gpio()
270 spec->gpio_mask |= mask; in alc_setup_gpio()
271 spec->gpio_dir |= mask; in alc_setup_gpio()
272 spec->gpio_data |= mask; in alc_setup_gpio()
277 struct alc_spec *spec = codec->spec; in alc_write_gpio_data()
280 spec->gpio_data); in alc_write_gpio_data()
286 struct alc_spec *spec = codec->spec; in alc_update_gpio_data()
287 unsigned int oldval = spec->gpio_data; in alc_update_gpio_data()
290 spec->gpio_data |= mask; in alc_update_gpio_data()
292 spec->gpio_data &= ~mask; in alc_update_gpio_data()
293 if (oldval != spec->gpio_data) in alc_update_gpio_data()
299 struct alc_spec *spec = codec->spec; in alc_write_gpio()
301 if (!spec->gpio_mask) in alc_write_gpio()
304 snd_hda_codec_write(codec, codec->core.afg, 0, in alc_write_gpio()
305 AC_VERB_SET_GPIO_MASK, spec->gpio_mask); in alc_write_gpio()
306 snd_hda_codec_write(codec, codec->core.afg, 0, in alc_write_gpio()
307 AC_VERB_SET_GPIO_DIRECTION, spec->gpio_dir); in alc_write_gpio()
308 if (spec->gpio_write_delay) in alc_write_gpio()
358 struct alc_spec *spec = codec->spec; in alc_fix_pll()
360 if (spec->pll_nid) in alc_fix_pll()
361 alc_update_coefex_idx(codec, spec->pll_nid, spec->pll_coef_idx, in alc_fix_pll()
362 1 << spec->pll_coef_bit, 0); in alc_fix_pll()
368 struct alc_spec *spec = codec->spec; in alc_fix_pll_init()
369 spec->pll_nid = nid; in alc_fix_pll_init()
370 spec->pll_coef_idx = coef_idx; in alc_fix_pll_init()
371 spec->pll_coef_bit = coef_bit; in alc_fix_pll_init()
375 /* update the master volume per volume-knob's unsol event */
389 val = snd_hda_codec_read(codec, jack->nid, 0, in alc_update_knob_master()
392 uctl->value.integer.value[0] = val; in alc_update_knob_master()
393 uctl->value.integer.value[1] = val; in alc_update_knob_master()
394 kctl->put(kctl, uctl); in alc_update_knob_master()
402 snd_hda_jack_unsol_event(codec, res >> 2); in alc880_unsol_event()
412 switch (codec->core.vendor_id) { in alc_fill_eapd_coef()
523 /* alc888-VA */ in alc888_coef_init()
525 /* alc888-VB */ in alc888_coef_init()
539 on ? 2 : 0); in set_eapd()
565 if (codec->bus->shutdown) in alc_headset_mic_no_shutup()
568 snd_array_for_each(&codec->init_pins, i, pin) { in alc_headset_mic_no_shutup()
570 if (pin->nid != mic_pin) in alc_headset_mic_no_shutup()
571 snd_hda_codec_read(codec, pin->nid, 0, in alc_headset_mic_no_shutup()
575 codec->pins_shutup = 1; in alc_headset_mic_no_shutup()
580 struct alc_spec *spec = codec->spec; in alc_shutup_pins()
582 switch (codec->core.vendor_id) { in alc_shutup_pins()
593 if (!spec->no_shutup_pins) in alc_shutup_pins()
600 * just turning off EAPD and a little pause for avoiding pop-noise
604 struct alc_spec *spec = codec->spec; in alc_eapd_shutup()
607 if (!spec->no_depop_delay) in alc_eapd_shutup()
619 switch (codec->core.vendor_id) { in alc_auto_init_amp()
640 if (spec->gen.autocfg.hp_pins[0]) in alc_get_hp_pin()
641 return spec->gen.autocfg.hp_pins[0]; in alc_get_hp_pin()
642 if (spec->gen.autocfg.line_out_type == AC_JACK_HP_OUT) in alc_get_hp_pin()
643 return spec->gen.autocfg.line_out_pins[0]; in alc_get_hp_pin()
651 /* Could be any non-zero and even value. When used as fixup, tells
654 #define ALC_FIXUP_SKU_IGNORE (2)
659 struct alc_spec *spec = codec->spec; in alc_fixup_sku_ignore()
661 spec->cdefine.fixup = 1; in alc_fixup_sku_ignore()
662 spec->cdefine.sku_cfg = ALC_FIXUP_SKU_IGNORE; in alc_fixup_sku_ignore()
669 struct alc_spec *spec = codec->spec; in alc_fixup_no_depop_delay()
672 spec->no_depop_delay = 1; in alc_fixup_no_depop_delay()
673 codec->depop_delay = 0; in alc_fixup_no_depop_delay()
681 struct alc_spec *spec = codec->spec; in alc_auto_parse_customize_define()
683 spec->cdefine.enable_pcbeep = 1; /* assume always enabled */ in alc_auto_parse_customize_define()
685 if (spec->cdefine.fixup) { in alc_auto_parse_customize_define()
686 ass = spec->cdefine.sku_cfg; in alc_auto_parse_customize_define()
688 return -1; in alc_auto_parse_customize_define()
692 if (!codec->bus->pci) in alc_auto_parse_customize_define()
693 return -1; in alc_auto_parse_customize_define()
694 ass = codec->core.subsystem_id & 0xffff; in alc_auto_parse_customize_define()
695 if (ass != codec->bus->pci->subsystem_device && (ass & 1)) in alc_auto_parse_customize_define()
699 if (codec->core.vendor_id == 0x10ec0260) in alc_auto_parse_customize_define()
705 codec->core.chip_name, ass); in alc_auto_parse_customize_define()
706 return -1; in alc_auto_parse_customize_define()
716 return -1; in alc_auto_parse_customize_define()
718 spec->cdefine.port_connectivity = ass >> 30; in alc_auto_parse_customize_define()
719 spec->cdefine.enable_pcbeep = (ass & 0x100000) >> 20; in alc_auto_parse_customize_define()
720 spec->cdefine.check_sum = (ass >> 16) & 0xf; in alc_auto_parse_customize_define()
721 spec->cdefine.customization = ass >> 8; in alc_auto_parse_customize_define()
723 spec->cdefine.sku_cfg = ass; in alc_auto_parse_customize_define()
724 spec->cdefine.external_amp = (ass & 0x38) >> 3; in alc_auto_parse_customize_define()
725 spec->cdefine.platform_type = (ass & 0x4) >> 2; in alc_auto_parse_customize_define()
726 spec->cdefine.swap = (ass & 0x2) >> 1; in alc_auto_parse_customize_define()
727 spec->cdefine.override = ass & 0x1; in alc_auto_parse_customize_define()
730 nid, spec->cdefine.sku_cfg); in alc_auto_parse_customize_define()
732 spec->cdefine.port_connectivity); in alc_auto_parse_customize_define()
733 codec_dbg(codec, "SKU: enable_pcbeep=0x%x\n", spec->cdefine.enable_pcbeep); in alc_auto_parse_customize_define()
734 codec_dbg(codec, "SKU: check_sum=0x%08x\n", spec->cdefine.check_sum); in alc_auto_parse_customize_define()
735 codec_dbg(codec, "SKU: customization=0x%08x\n", spec->cdefine.customization); in alc_auto_parse_customize_define()
736 codec_dbg(codec, "SKU: external_amp=0x%x\n", spec->cdefine.external_amp); in alc_auto_parse_customize_define()
737 codec_dbg(codec, "SKU: platform_type=0x%x\n", spec->cdefine.platform_type); in alc_auto_parse_customize_define()
738 codec_dbg(codec, "SKU: swap=0x%x\n", spec->cdefine.swap); in alc_auto_parse_customize_define()
739 codec_dbg(codec, "SKU: override=0x%x\n", spec->cdefine.override); in alc_auto_parse_customize_define()
744 /* return the position of NID in the list, or -1 if not found */
751 return -1; in find_idx_in_nid_list()
759 /* check subsystem ID and set up device-specific initialization;
762 /* 32-bit subsystem ID for BIOS loading in HD Audio codec.
766 * port-A --> pin 39/41, port-E --> pin 14/15, port-D --> pin 35/36
772 struct alc_spec *spec = codec->spec; in alc_subsystem_id()
774 if (spec->cdefine.fixup) { in alc_subsystem_id()
775 ass = spec->cdefine.sku_cfg; in alc_subsystem_id()
781 ass = codec->core.subsystem_id & 0xffff; in alc_subsystem_id()
782 if (codec->bus->pci && in alc_subsystem_id()
783 ass != codec->bus->pci->subsystem_device && (ass & 1)) in alc_subsystem_id()
796 if (codec->core.vendor_id == 0x10ec0260) in alc_subsystem_id()
817 ass & 0xffff, codec->core.vendor_id); in alc_subsystem_id()
821 * 2 : 0 --> Desktop, 1 --> Laptop in alc_subsystem_id()
826 if (spec->init_amp == ALC_INIT_UNDEFINED) { in alc_subsystem_id()
839 spec->init_amp = ALC_INIT_DEFAULT; in alc_subsystem_id()
851 * 12~11: Headphone out -> 00: PortA, 01: PortE, 02: PortD, 03: Resvered in alc_subsystem_id()
853 * 15 : 1 --> enable the function "Mute internal speaker in alc_subsystem_id()
860 if (found_in_nid_list(nid, spec->gen.autocfg.line_out_pins, in alc_subsystem_id()
861 spec->gen.autocfg.line_outs)) in alc_subsystem_id()
863 spec->gen.autocfg.hp_pins[0] = nid; in alc_subsystem_id()
868 /* Check the validity of ALC subsystem-id
869 * ports contains an array of 4 pin NIDs for port-A, E, D and I */
873 struct alc_spec *spec = codec->spec; in alc_ssid_check()
874 if (spec->init_amp == ALC_INIT_UNDEFINED) { in alc_ssid_check()
877 spec->init_amp = ALC_INIT_DEFAULT; in alc_ssid_check()
888 struct alc_spec *spec = codec->spec; in alc_fixup_inv_dmic()
890 spec->gen.inv_dmic_split = 1; in alc_fixup_inv_dmic()
917 ((codec)->core.dev.power.power_state.event == PM_EVENT_RESUME)
919 ((codec)->core.dev.power.power_state.event == PM_EVENT_RESTORE)
923 struct alc_spec *spec = codec->spec; in alc_init()
929 if (spec->init_hook) in alc_init()
930 spec->init_hook(codec); in alc_init()
932 spec->gen.skip_verbs = 1; /* applied in below */ in alc_init()
935 alc_auto_init_amp(codec, spec->init_amp); in alc_init()
948 struct alc_spec *spec = codec->spec; in alc_shutup()
953 if (spec && spec->shutup) in alc_shutup()
954 spec->shutup(codec); in alc_shutup()
966 struct alc_spec *spec = codec->spec; in alc_suspend()
968 if (spec && spec->power_hook) in alc_suspend()
969 spec->power_hook(codec); in alc_suspend()
975 struct alc_spec *spec = codec->spec; in alc_resume()
977 if (!spec->no_depop_delay) in alc_resume()
979 codec->patch_ops.init(codec); in alc_resume()
1032 { 0x10ec0887, 0x00f0, 0x0030, "ALC887-VD" },
1033 { 0x10ec0888, 0x00f0, 0x0030, "ALC888-VD" },
1078 for (p = rename_tbl; p->vendor_id; p++) { in alc_codec_rename_from_preset()
1079 if (p->vendor_id != codec->core.vendor_id) in alc_codec_rename_from_preset()
1081 if ((alc_get_coef0(codec) & p->coef_mask) == p->coef_bits) in alc_codec_rename_from_preset()
1082 return alc_codec_rename(codec, p->name); in alc_codec_rename_from_preset()
1085 if (!codec->bus->pci) in alc_codec_rename_from_preset()
1087 for (q = rename_pci_tbl; q->codec_vendor_id; q++) { in alc_codec_rename_from_preset()
1088 if (q->codec_vendor_id != codec->core.vendor_id) in alc_codec_rename_from_preset()
1090 if (q->pci_subvendor != codec->bus->pci->subsystem_vendor) in alc_codec_rename_from_preset()
1092 if (!q->pci_subdevice || in alc_codec_rename_from_preset()
1093 q->pci_subdevice == codec->bus->pci->subsystem_device) in alc_codec_rename_from_preset()
1094 return alc_codec_rename(codec, q->name); in alc_codec_rename_from_preset()
1102 * Digital-beep handlers
1121 knew = snd_hda_gen_add_kctl(&spec->gen, NULL, in set_beep_amp()
1124 return -ENOMEM; in set_beep_amp()
1125 knew->private_value = beep_amp; in set_beep_amp()
1138 SND_PCI_QUIRK(0x1458, 0xa002, "GA-MA790X", 1),
1140 /* denylist -- no beep available */
1148 struct alc_spec *spec = codec->spec; in has_cdefine_beep()
1150 q = snd_pci_quirk_lookup(codec->bus->pci, beep_allow_list); in has_cdefine_beep()
1152 return q->value; in has_cdefine_beep()
1153 return spec->cdefine.enable_pcbeep; in has_cdefine_beep()
1168 struct alc_spec *spec = codec->spec; in alc_parse_auto_config()
1169 struct auto_pin_cfg *cfg = &spec->gen.autocfg; in alc_parse_auto_config()
1173 spec->parse_flags); in alc_parse_auto_config()
1194 return -ENOMEM; in alc_alloc_spec()
1195 codec->spec = spec; in alc_alloc_spec()
1196 snd_hda_gen_spec_init(&spec->gen); in alc_alloc_spec()
1197 spec->gen.mixer_nid = mixer_nid; in alc_alloc_spec()
1198 spec->gen.own_eapd_ctl = 1; in alc_alloc_spec()
1199 codec->single_adc_amp = 1; in alc_alloc_spec()
1201 codec->spdif_status_reset = 1; in alc_alloc_spec()
1202 codec->forced_resume = 1; in alc_alloc_spec()
1203 codec->patch_ops = alc_patch_ops; in alc_alloc_spec()
1204 mutex_init(&spec->coef_mutex); in alc_alloc_spec()
1222 * ALC880 fix-ups
1252 /* enable the volume-knob widget support on NID 0x21 */
1293 { 0x1a, 0x0181344f }, /* line-in */
1341 { 0x19, 0x01a19950 }, /* mic-in */
1361 { 0x19, 0x01a19950 }, /* mic-in */
1401 { 0x18, 0x01a19950 }, /* mic-in */
1403 { 0x1a, 0x01813031 }, /* line-in */
1434 { 0x14, 0x01014010 }, /* line-out */
1438 { 0x18, 0x01a19c30 }, /* mic-in */
1440 { 0x1a, 0x01813031 }, /* line-in */
1441 { 0x1b, 0x02a19c40 }, /* front-mic */
1474 { 0x18, 0x01a19c30 }, /* mic-in */
1476 { 0x1a, 0x01813031 }, /* line-in */
1477 { 0x1b, 0x02a19c40 }, /* front-mic */
1510 { 0x18, 0x01a19c30 }, /* mic-in */
1511 { 0x19, 0x02a19c40 }, /* front-mic */
1512 { 0x1a, 0x01813031 }, /* line-in */
1576 * It's not quite sure whether BIOS sets the correct pin-config table
1601 SND_PCI_QUIRK(0x1695, 0x4012, "EPox EP-5LDA", ALC880_FIXUP_5ST_DIG),
1616 SND_PCI_QUIRK(0xa0a0, 0x0560, "AOpen i915GMm-HFS", ALC880_FIXUP_5ST_DIG),
1623 {.id = ALC880_FIXUP_3ST_DIG, .name = "3stack-digout"},
1625 {.id = ALC880_FIXUP_5ST_DIG, .name = "5stack-digout"},
1627 {.id = ALC880_FIXUP_6ST_DIG, .name = "6stack-digout"},
1628 {.id = ALC880_FIXUP_6ST_AUTOMUTE, .name = "6stack-automute"},
1645 spec = codec->spec; in patch_alc880()
1646 spec->gen.need_dac_fix = 1; in patch_alc880()
1647 spec->gen.beep_nid = 0x01; in patch_alc880()
1649 codec->patch_ops.unsol_event = alc880_unsol_event; in patch_alc880()
1662 if (!spec->gen.no_analog) { in patch_alc880()
1707 struct alc_spec *spec = codec->spec; in alc260_gpio1_automute()
1709 alc_update_gpio_data(codec, 0x01, spec->gen.hp_jack_present); in alc260_gpio1_automute()
1715 struct alc_spec *spec = codec->spec; in alc260_fixup_gpio1_toggle()
1720 spec->gen.automute_hook = alc260_gpio1_automute; in alc260_fixup_gpio1_toggle()
1721 spec->gen.detect_hp = 1; in alc260_fixup_gpio1_toggle()
1722 spec->gen.automute_speaker = 1; in alc260_fixup_gpio1_toggle()
1723 spec->gen.autocfg.hp_pins[0] = 0x0f; /* copy it for automute */ in alc260_fixup_gpio1_toggle()
1733 struct alc_spec *spec = codec->spec; in alc260_fixup_kn1()
1753 spec->init_amp = ALC_INIT_NONE; in alc260_fixup_kn1()
1761 struct alc_spec *spec = codec->spec; in alc260_fixup_fsc_s7020()
1763 spec->init_amp = ALC_INIT_NONE; in alc260_fixup_fsc_s7020()
1769 struct alc_spec *spec = codec->spec; in alc260_fixup_fsc_s7020_jwse()
1771 spec->gen.add_jack_modes = 1; in alc260_fixup_fsc_s7020_jwse()
1772 spec->gen.hp_mic = 1; in alc260_fixup_fsc_s7020_jwse()
1879 {.id = ALC260_FIXUP_FSC_S7020_JWSE, .name = "fujitsu-jwse"},
1894 spec = codec->spec; in patch_alc260()
1899 spec->gen.prefer_hp_amp = 1; in patch_alc260()
1900 spec->gen.beep_nid = 0x01; in patch_alc260()
1902 spec->shutup = alc_eapd_shutup; in patch_alc260()
1915 if (!spec->gen.no_analog) { in patch_alc260()
1937 * 6-channel independent captures.
1939 * In addition, an independent DAC for the multi-playback (not used in this
2002 struct alc_spec *spec = codec->spec; in alc885_fixup_macpro_gpio()
2004 spec->gpio_write_delay = true; in alc885_fixup_macpro_gpio()
2038 struct alc_spec *spec = codec->spec; in alc889_fixup_mbp_vref()
2050 spec->gen.keep_vref_in_automute = 1; in alc889_fixup_mbp_vref()
2058 struct alc_spec *spec = codec->spec; in alc889_fixup_mac_pins()
2067 spec->gen.keep_vref_in_automute = 1; in alc889_fixup_mac_pins()
2102 * all-in-one desktop PCs (for example VGC-LN51JGB) through DAC 0x05
2107 struct alc_spec *spec = codec->spec; in alc882_fixup_no_primary_hp()
2109 spec->gen.no_primary_hp = 1; in alc882_fixup_no_primary_hp()
2110 spec->gen.no_multi_io = 1; in alc882_fixup_no_primary_hp()
2117 /* For dual-codec configuration, we need to disable some features to avoid
2123 struct alc_spec *spec = codec->spec; in alc_fixup_dual_codecs()
2128 spec->gen.suppress_vmaster = 1; in alc_fixup_dual_codecs()
2129 /* auto-mute and auto-mic switch don't work with multiple codecs */ in alc_fixup_dual_codecs()
2130 spec->gen.suppress_auto_mute = 1; in alc_fixup_dual_codecs()
2131 spec->gen.suppress_auto_mic = 1; in alc_fixup_dual_codecs()
2133 spec->gen.mixer_nid = 0; in alc_fixup_dual_codecs()
2135 codec->force_pin_prefix = 1; in alc_fixup_dual_codecs()
2145 snd_ctl_rename(codec->card, kctl, newname); in rename_ctl()
2156 strcpy(codec->card->longname, "HDAudio-Gigabyte-ALC1220DualCodecs"); in alc1220_fixup_gb_dual_codecs()
2161 codec->addr == 0 ? in alc1220_fixup_gb_dual_codecs()
2162 "Rear-Panel Capture Volume" : in alc1220_fixup_gb_dual_codecs()
2163 "Front-Panel Capture Volume"); in alc1220_fixup_gb_dual_codecs()
2165 codec->addr == 0 ? in alc1220_fixup_gb_dual_codecs()
2166 "Rear-Panel Capture Switch" : in alc1220_fixup_gb_dual_codecs()
2167 "Front-Panel Capture Switch"); in alc1220_fixup_gb_dual_codecs()
2227 struct alc_spec *spec = codec->spec; in alc887_asus_hp_automute_hook()
2232 if (spec->gen.hp_jack_present) in alc887_asus_hp_automute_hook()
2242 struct alc_spec *spec = codec->spec; in alc887_fixup_asus_jack()
2246 spec->gen.hp_automute_hook = alc887_asus_hp_automute_hook; in alc887_fixup_asus_jack()
2400 /* setting bits 1-5 disables DAC nids 0x02-0x06
2404 /* DAC DISABLE/MUTE 2? */
2561 SND_PCI_QUIRK(0x1025, 0x0155, "Packard-Bell M5120", ALC882_FIXUP_PB_M5210),
2578 SND_PCI_QUIRK(0x1043, 0x8797, "ASUS TUF B550M-PLUS", ALCS1200A_FIXUP_MIC_VREF),
2579 SND_PCI_QUIRK(0x104d, 0x9043, "Sony Vaio VGC-LN51JGB", ALC882_FIXUP_NO_PRIMARY_HP),
2596 SND_PCI_QUIRK(0x106b, 0x3500, "MacBookAir 2,1", ALC889_FIXUP_MBA21_VREF),
2605 SND_PCI_QUIRK(0x106b, 0x4600, "MacbookPro 5,2", ALC889_FIXUP_IMAC91_VREF),
2607 SND_PCI_QUIRK(0x106b, 0x4a00, "Macbook 5,2", ALC889_FIXUP_MBA11_VREF),
2610 SND_PCI_QUIRK(0x13fe, 0x1009, "Advantech MIT-W101", ALC886_FIXUP_EAPD),
2611 SND_PCI_QUIRK(0x1458, 0xa002, "Gigabyte EP45-DS3/Z87X-UD3H", ALC889_FIXUP_FRONT_HP_NO_PRESENCE),
2612 SND_PCI_QUIRK(0x1458, 0xa0b8, "Gigabyte AZ370-Gaming", ALC1220_FIXUP_GB_DUAL_CODECS),
2616 SND_PCI_QUIRK(0x1462, 0x11f7, "MSI-GE63", ALC1220_FIXUP_CLEVO_P950),
2617 SND_PCI_QUIRK(0x1462, 0x1228, "MSI-GP63", ALC1220_FIXUP_CLEVO_P950),
2618 SND_PCI_QUIRK(0x1462, 0x1229, "MSI-GP73", ALC1220_FIXUP_CLEVO_P950),
2619 SND_PCI_QUIRK(0x1462, 0x1275, "MSI-GL63", ALC1220_FIXUP_CLEVO_P950),
2620 SND_PCI_QUIRK(0x1462, 0x1276, "MSI-GL73", ALC1220_FIXUP_CLEVO_P950),
2621 SND_PCI_QUIRK(0x1462, 0x1293, "MSI-GP65", ALC1220_FIXUP_CLEVO_P950),
2622 SND_PCI_QUIRK(0x1462, 0x7350, "MSI-7350", ALC889_FIXUP_CD),
2624 SND_PCI_QUIRK(0x1462, 0xda57, "MSI Z270-Gaming", ALC1220_FIXUP_GB_DUAL_CODECS),
2626 SND_PCI_QUIRK(0x147b, 0x107a, "Abit AW9D-MAX", ALC882_FIXUP_ABIT_AW9D_MAX),
2631 SND_PCI_QUIRK(0x1558, 0x65e5, "Clevo PC50D[PRS](?:-D|-G)?", ALC1220_FIXUP_CLEVO_PB51ED_PINS),
2636 SND_PCI_QUIRK(0x1558, 0x67e5, "Clevo PC70D[PRS](?:-D|-G)?", ALC1220_FIXUP_CLEVO_PB51ED_PINS),
2641 SND_PCI_QUIRK(0x1558, 0x7715, "Clevo X170KM-G", ALC1220_FIXUP_CLEVO_PB51ED),
2651 SND_PCI_QUIRK(0x1558, 0x96e1, "Clevo P960[ER][CDFN]-K", ALC1220_FIXUP_CLEVO_P950),
2653 SND_PCI_QUIRK(0x1558, 0x97e2, "Clevo P970RC-M", ALC1220_FIXUP_CLEVO_P950),
2662 {.id = ALC882_FIXUP_ABIT_AW9D_MAX, .name = "abit-aw9d"},
2663 {.id = ALC882_FIXUP_LENOVO_Y530, .name = "lenovo-y530"},
2664 {.id = ALC882_FIXUP_ACER_ASPIRE_7736, .name = "acer-aspire-7736"},
2665 {.id = ALC882_FIXUP_ASUS_W90V, .name = "asus-w90v"},
2667 {.id = ALC889_FIXUP_FRONT_HP_NO_PRESENCE, .name = "no-front-hp"},
2668 {.id = ALC889_FIXUP_VAIO_TT, .name = "vaio-tt"},
2670 {.id = ALC882_FIXUP_EAPD, .name = "alc882-eapd"},
2671 {.id = ALC883_FIXUP_EAPD, .name = "alc883-eapd"},
2675 {.id = ALC889_FIXUP_COEF, .name = "alc889-coef"},
2676 {.id = ALC882_FIXUP_ASUS_W2JC, .name = "asus-w2jc"},
2677 {.id = ALC882_FIXUP_ACER_ASPIRE_4930G, .name = "acer-aspire-4930g"},
2678 {.id = ALC882_FIXUP_ACER_ASPIRE_8930G, .name = "acer-aspire-8930g"},
2679 {.id = ALC883_FIXUP_ACER_EAPD, .name = "acer-aspire"},
2680 {.id = ALC885_FIXUP_MACPRO_GPIO, .name = "macpro-gpio"},
2681 {.id = ALC889_FIXUP_DAC_ROUTE, .name = "dac-route"},
2682 {.id = ALC889_FIXUP_MBP_VREF, .name = "mbp-vref"},
2683 {.id = ALC889_FIXUP_IMAC91_VREF, .name = "imac91-vref"},
2684 {.id = ALC889_FIXUP_MBA11_VREF, .name = "mba11-vref"},
2685 {.id = ALC889_FIXUP_MBA21_VREF, .name = "mba21-vref"},
2686 {.id = ALC889_FIXUP_MP11_VREF, .name = "mp11-vref"},
2687 {.id = ALC889_FIXUP_MP41_VREF, .name = "mp41-vref"},
2688 {.id = ALC882_FIXUP_INV_DMIC, .name = "inv-dmic"},
2689 {.id = ALC882_FIXUP_NO_PRIMARY_HP, .name = "no-primary-hp"},
2690 {.id = ALC887_FIXUP_ASUS_BASS, .name = "asus-bass"},
2691 {.id = ALC1220_FIXUP_GB_DUAL_CODECS, .name = "dual-codecs"},
2692 {.id = ALC1220_FIXUP_GB_X570, .name = "gb-x570"},
2693 {.id = ALC1220_FIXUP_CLEVO_P950, .name = "clevo-p950"},
2707 SND_HDA_PIN_QUIRK(0x10ec1220, 0x1462, "MS-7C35", ALC1220_FIXUP_CLEVO_P950,
2741 spec = codec->spec; in patch_alc882()
2743 switch (codec->core.vendor_id) { in patch_alc882()
2766 spec->gen.beep_nid = 0x01; in patch_alc882()
2773 if (!spec->gen.no_analog && spec->gen.beep_nid) { in patch_alc882()
2891 SND_PCI_QUIRK(0x17ff, 0x058d, "Benq T31-16", ALC262_FIXUP_BENQ_T31),
2897 {.id = ALC262_FIXUP_INV_DMIC, .name = "inv-dmic"},
2898 {.id = ALC262_FIXUP_FSC_H270, .name = "fsc-h270"},
2899 {.id = ALC262_FIXUP_FSC_S7110, .name = "fsc-s7110"},
2900 {.id = ALC262_FIXUP_HP_Z200, .name = "hp-z200"},
2902 {.id = ALC262_FIXUP_LENOVO_3000, .name = "lenovo-3000"},
2904 {.id = ALC262_FIXUP_BENQ_T31, .name = "benq-t31"},
2920 spec = codec->spec; in patch_alc262()
2921 spec->gen.shared_mic_vref_pin = 0x18; in patch_alc262()
2923 spec->shutup = alc_eapd_shutup; in patch_alc262()
2927 * under-run in patch_alc262()
2942 spec->gen.beep_nid = 0x01; in patch_alc262()
2949 if (!spec->gen.no_analog && spec->gen.beep_nid) { in patch_alc262()
2975 mutex_lock(&codec->control_mutex); in alc268_beep_switch_put()
2976 pval = kcontrol->private_value; in alc268_beep_switch_put()
2977 kcontrol->private_value = (pval & ~0xff) | 0x0f; in alc268_beep_switch_put()
2980 kcontrol->private_value = (pval & ~0xff) | 0x10; in alc268_beep_switch_put()
2983 kcontrol->private_value = pval; in alc268_beep_switch_put()
2984 mutex_unlock(&codec->control_mutex); in alc268_beep_switch_put()
3037 {.id = ALC268_FIXUP_INV_DMIC, .name = "inv-dmic"},
3038 {.id = ALC268_FIXUP_HP_EAPD, .name = "hp-eapd"},
3069 /* ALC268 has no aa-loopback mixer */ in patch_alc268()
3074 spec = codec->spec; in patch_alc268()
3076 spec->gen.beep_nid = 0x01; in patch_alc268()
3078 spec->shutup = alc_eapd_shutup; in patch_alc268()
3090 if (err > 0 && !spec->gen.no_analog && in patch_alc268()
3091 spec->gen.autocfg.speaker_pins[0] != 0x1d) { in patch_alc268()
3093 if (!snd_hda_gen_add_kctl(&spec->gen, NULL, in patch_alc268()
3095 err = -ENOMEM; in patch_alc268()
3130 /* different alc269-variants */
3164 struct alc_spec *spec = codec->spec; in alc269_parse_auto_config()
3167 switch (spec->codec_variant) { in alc269_parse_auto_config()
3215 if (jack->unsol_res & (7 << 13)) in alc_headset_btn_callback()
3218 if (jack->unsol_res & (1 << 16 | 3 << 8)) in alc_headset_btn_callback()
3222 if (jack->unsol_res & (7 << 23)) in alc_headset_btn_callback()
3226 if (jack->unsol_res & (7 << 10)) in alc_headset_btn_callback()
3229 snd_hda_jack_set_button_state(codec, jack->nid, report); in alc_headset_btn_callback()
3234 struct alc_spec *spec = codec->spec; in alc_disable_headset_jack_key()
3236 if (!spec->has_hs_key) in alc_disable_headset_jack_key()
3239 switch (codec->core.vendor_id) { in alc_disable_headset_jack_key()
3263 struct alc_spec *spec = codec->spec; in alc_enable_headset_jack_key()
3265 if (!spec->has_hs_key) in alc_enable_headset_jack_key()
3268 switch (codec->core.vendor_id) { in alc_enable_headset_jack_key()
3293 struct alc_spec *spec = codec->spec; in alc_fixup_headset_jack()
3298 spec->has_hs_key = 1; in alc_fixup_headset_jack()
3323 struct alc_spec *spec = codec->spec; in alc269_shutup()
3325 if (spec->codec_variant == ALC269_TYPE_ALC269VB) in alc269_shutup()
3327 if (spec->codec_variant == ALC269_TYPE_ALC269VB && in alc269_shutup()
3342 WRITE_COEF(0x0e, 0x6e00), /* LDO1/2/3, DAC/ADC */
3353 WRITE_COEF(0x68, 0xa080), /* capless control 2 */
3357 UPDATE_COEF(0x6d, 0x0fff, 0x0900), /* class D test 2 */
3374 struct alc_spec *spec = codec->spec; in alc282_init()
3391 msleep(2); in alc282_init()
3411 struct alc_spec *spec = codec->spec; in alc282_shutup()
3426 msleep(2); in alc282_shutup()
3434 if (!spec->no_shutup_pins) in alc282_shutup()
3454 WRITE_COEF(0x0e, 0x6fc0), /* LDO1/2/3, DAC/ADC */
3465 WRITE_COEF(0x33, 0xa080), /* capless control 2 */
3469 UPDATE_COEF(0x38, 0x0fff, 0x0900), /* class D test 2 */
3490 struct alc_spec *spec = codec->spec; in alc283_init()
3517 /* Index 0x46 Combo jack auto switch control 2 */ in alc283_init()
3526 struct alc_spec *spec = codec->spec; in alc283_shutup()
3548 if (!spec->no_shutup_pins) in alc283_shutup()
3563 struct alc_spec *spec = codec->spec; in alc256_init()
3575 msleep(2); in alc256_init()
3578 if (spec->ultra_low_power) { in alc256_init()
3580 alc_update_coef_idx(codec, 0x08, 3<<2, 3<<2); in alc256_init()
3590 if (hp_pin_sense || spec->ultra_low_power) in alc256_init()
3596 if (hp_pin_sense || spec->ultra_low_power) in alc256_init()
3606 * Documentation/sound/hd-audio/realtek-pc-beep.rst for details of in alc256_init()
3614 struct alc_spec *spec = codec->spec; in alc256_shutup()
3624 msleep(2); in alc256_shutup()
3629 if (hp_pin_sense || spec->ultra_low_power) in alc256_shutup()
3637 if (codec->core.vendor_id != 0x10ec0236 && in alc256_shutup()
3638 codec->core.vendor_id != 0x10ec0257) in alc256_shutup()
3641 if (!spec->no_shutup_pins) in alc256_shutup()
3645 if (hp_pin_sense || spec->ultra_low_power) in alc256_shutup()
3650 if (spec->ultra_low_power) { in alc256_shutup()
3654 alc_update_coef_idx(codec, 0x08, 3<<2, 0); in alc256_shutup()
3663 struct alc_spec *spec = codec->spec; in alc285_hp_init()
3712 struct alc_spec *spec = codec->spec; in alc225_init()
3716 if (spec->codec_variant != ALC269_TYPE_ALC287 && in alc225_init()
3717 spec->codec_variant != ALC269_TYPE_ALC245) in alc225_init()
3719 if (!spec->done_hp_init || in alc225_init()
3723 spec->done_hp_init = true; in alc225_init()
3734 msleep(2); in alc225_init()
3737 if (spec->ultra_low_power) { in alc225_init()
3738 alc_update_coef_idx(codec, 0x08, 0x0f << 2, 3<<2); in alc225_init()
3744 if (hp1_pin_sense || spec->ultra_low_power) in alc225_init()
3751 if (hp1_pin_sense || hp2_pin_sense || spec->ultra_low_power) in alc225_init()
3754 if (hp1_pin_sense || spec->ultra_low_power) in alc225_init()
3761 if (hp1_pin_sense || hp2_pin_sense || spec->ultra_low_power) in alc225_init()
3770 struct alc_spec *spec = codec->spec; in alc225_shutup()
3785 msleep(2); in alc225_shutup()
3787 if (hp1_pin_sense || spec->ultra_low_power) in alc225_shutup()
3794 if (hp1_pin_sense || hp2_pin_sense || spec->ultra_low_power) in alc225_shutup()
3797 if (hp1_pin_sense || spec->ultra_low_power) in alc225_shutup()
3804 if (hp1_pin_sense || hp2_pin_sense || spec->ultra_low_power) in alc225_shutup()
3809 if (spec->ultra_low_power) { in alc225_shutup()
3811 alc_update_coef_idx(codec, 0x08, 0x0f << 2, 0x0c << 2); in alc225_shutup()
3814 alc_update_coef_idx(codec, 0x4a, 3<<4, 2<<4); in alc225_shutup()
3824 struct alc_spec *spec = codec->spec; in alc_default_init()
3836 msleep(2); in alc_default_init()
3853 struct alc_spec *spec = codec->spec; in alc_default_shutup()
3865 msleep(2); in alc_default_shutup()
3873 if (!spec->no_shutup_pins) in alc_default_shutup()
3886 struct alc_spec *spec = codec->spec; in alc294_hp_init()
3898 if (!spec->no_shutup_pins) in alc294_hp_init()
3918 struct alc_spec *spec = codec->spec; in alc294_init()
3921 if (!spec->done_hp_init || in alc294_init()
3922 codec->core.dev.power.power_state.event == PM_EVENT_RESTORE) { in alc294_init()
3924 spec->done_hp_init = true; in alc294_init()
4024 struct alc_spec *spec = codec->spec; in alc269_suspend()
4026 if (spec->has_alc5505_dsp) in alc269_suspend()
4034 struct alc_spec *spec = codec->spec; in alc269_resume()
4036 if (spec->codec_variant == ALC269_TYPE_ALC269VB) in alc269_resume()
4038 if (spec->codec_variant == ALC269_TYPE_ALC269VB && in alc269_resume()
4043 codec->patch_ops.init(codec); in alc269_resume()
4045 if (spec->codec_variant == ALC269_TYPE_ALC269VB) in alc269_resume()
4047 if (spec->codec_variant == ALC269_TYPE_ALC269VB && in alc269_resume()
4059 if (spec->gpio_data) in alc269_resume()
4062 if (spec->has_alc5505_dsp) in alc269_resume()
4072 struct alc_spec *spec = codec->spec; in alc269_fixup_pincfg_no_hp_to_lineout()
4075 spec->parse_flags = HDA_PINCFG_NO_HP_FIXUP; in alc269_fixup_pincfg_no_hp_to_lineout()
4101 struct alc_spec *spec = codec->spec; in alc269_fixup_headset_mic()
4104 spec->parse_flags |= HDA_PINCFG_HEADSET_MIC; in alc269_fixup_headset_mic()
4117 if (strcmp(codec->core.chip_name, "ALC271X") && in alc271_fixup_dmic()
4118 strcmp(codec->core.chip_name, "ALC269VB")) in alc271_fixup_dmic()
4137 struct alc_spec *spec = codec->spec; in alc269_fixup_pcm_44k()
4145 spec->gen.stream_analog_playback = &alc269_44k_pcm_analog_playback; in alc269_fixup_pcm_44k()
4146 spec->gen.stream_analog_capture = &alc269_44k_pcm_analog_capture; in alc269_fixup_pcm_44k()
4152 /* The digital-mic unit sends PDM (differential signal) instead of in alc269_fixup_stereo_dmic()
4172 struct alc_spec *spec = codec->spec; in alc269_fixup_quanta_mute()
4175 spec->gen.automute_hook = alc269_quanta_automute; in alc269_fixup_quanta_mute()
4181 struct alc_spec *spec = codec->spec; in alc269_x101_hp_automute_hook()
4186 vref = spec->gen.hp_jack_present ? PIN_VREF80 : 0; in alc269_x101_hp_automute_hook()
4215 alc_write_coef_idx(codec, 0x23, initval->value_0x23); in alc298_huawei_mbx_stereo_seq()
4217 if (initval->value_0x23 != 0x1e) in alc298_huawei_mbx_stereo_seq()
4218 alc_write_coef_idx(codec, 0x25, initval->value_0x25); in alc298_huawei_mbx_stereo_seq()
4257 for (seq = dac_init; seq->value_0x23; seq++) in alc298_fixup_huawei_mbx_stereo()
4264 struct alc_spec *spec = codec->spec; in alc269_fixup_x101_headset_mic()
4266 spec->parse_flags |= HDA_PINCFG_HEADSET_MIC; in alc269_fixup_x101_headset_mic()
4267 spec->gen.hp_automute_hook = alc269_x101_hp_automute_hook; in alc269_fixup_x101_headset_mic()
4289 /* update mute-LED according to the speaker mute state via mic VREF pin */
4293 struct hda_codec *codec = dev_to_hda_codec(led_cdev->dev->parent); in vref_mute_led_set()
4294 struct alc_spec *spec = codec->spec; in vref_mute_led_set()
4296 alc_update_vref_led(codec, spec->mute_led_nid, in vref_mute_led_set()
4297 spec->mute_led_polarity, brightness); in vref_mute_led_set()
4306 struct alc_spec *spec = codec->spec; in led_power_filter()
4309 (nid != spec->mute_led_nid && nid != spec->cap_mute_led_nid)) in led_power_filter()
4322 struct alc_spec *spec = codec->spec; in alc269_fixup_hp_mute_led()
4330 if (sscanf(dev->name, "HP_Mute_LED_%d_%x", &pol, &pin) != 2) in alc269_fixup_hp_mute_led()
4334 spec->mute_led_polarity = pol; in alc269_fixup_hp_mute_led()
4335 spec->mute_led_nid = pin - 0x0a + 0x18; in alc269_fixup_hp_mute_led()
4337 codec->power_filter = led_power_filter; in alc269_fixup_hp_mute_led()
4339 "Detected mute LED for %x:%d\n", spec->mute_led_nid, in alc269_fixup_hp_mute_led()
4340 spec->mute_led_polarity); in alc269_fixup_hp_mute_led()
4349 struct alc_spec *spec = codec->spec; in alc269_fixup_hp_mute_led_micx()
4352 spec->mute_led_polarity = 0; in alc269_fixup_hp_mute_led_micx()
4353 spec->mute_led_nid = pin; in alc269_fixup_hp_mute_led_micx()
4355 codec->power_filter = led_power_filter; in alc269_fixup_hp_mute_led_micx()
4383 alc_update_gpio_data(codec, mask, !enabled); /* muted -> LED on */ in alc_update_gpio_led()
4390 struct hda_codec *codec = dev_to_hda_codec(led_cdev->dev->parent); in gpio_mute_led_set()
4391 struct alc_spec *spec = codec->spec; in gpio_mute_led_set()
4393 alc_update_gpio_led(codec, spec->gpio_mute_led_mask, in gpio_mute_led_set()
4394 spec->mute_led_polarity, !brightness); in gpio_mute_led_set()
4398 /* turn on/off mic-mute LED via GPIO per capture hook */
4402 struct hda_codec *codec = dev_to_hda_codec(led_cdev->dev->parent); in micmute_led_set()
4403 struct alc_spec *spec = codec->spec; in micmute_led_set()
4405 alc_update_gpio_led(codec, spec->gpio_mic_led_mask, in micmute_led_set()
4406 spec->micmute_led_polarity, !brightness); in micmute_led_set()
4410 /* setup mute and mic-mute GPIO bits, add hooks appropriately */
4416 struct alc_spec *spec = codec->spec; in alc_fixup_hp_gpio_led()
4423 spec->gpio_mute_led_mask = mute_mask; in alc_fixup_hp_gpio_led()
4427 spec->gpio_mic_led_mask = micmute_mask; in alc_fixup_hp_gpio_led()
4465 struct alc_spec *spec = codec->spec; in alc245_fixup_hp_gpio_led()
4468 spec->micmute_led_polarity = 1; in alc245_fixup_hp_gpio_led()
4472 /* turn on/off mic-mute LED per capture hook via VREF change */
4476 struct hda_codec *codec = dev_to_hda_codec(led_cdev->dev->parent); in vref_micmute_led_set()
4477 struct alc_spec *spec = codec->spec; in vref_micmute_led_set()
4479 alc_update_vref_led(codec, spec->cap_mute_led_nid, in vref_micmute_led_set()
4480 spec->micmute_led_polarity, brightness); in vref_micmute_led_set()
4487 struct alc_spec *spec = codec->spec; in alc269_fixup_hp_gpio_mic1_led()
4494 spec->gpio_mask |= 0x10; in alc269_fixup_hp_gpio_mic1_led()
4495 spec->gpio_dir |= 0x10; in alc269_fixup_hp_gpio_mic1_led()
4496 spec->cap_mute_led_nid = 0x18; in alc269_fixup_hp_gpio_mic1_led()
4498 codec->power_filter = led_power_filter; in alc269_fixup_hp_gpio_mic1_led()
4505 struct alc_spec *spec = codec->spec; in alc280_fixup_hp_gpio4()
4509 spec->cap_mute_led_nid = 0x18; in alc280_fixup_hp_gpio4()
4511 codec->power_filter = led_power_filter; in alc280_fixup_hp_gpio4()
4521 struct alc_spec *spec = codec->spec; in alc245_fixup_hp_x360_amp()
4525 spec->gpio_mask |= 0x01; in alc245_fixup_hp_x360_amp()
4526 spec->gpio_dir |= 0x01; in alc245_fixup_hp_x360_amp()
4557 struct alc_spec *spec = codec->spec; in alc274_fixup_hp_envy_gpio()
4560 spec->gpio_mask |= 0x04; in alc274_fixup_hp_envy_gpio()
4561 spec->gpio_dir |= 0x04; in alc274_fixup_hp_envy_gpio()
4562 spec->gen.pcm_playback_hook = alc274_hp_envy_pcm_hook; in alc274_fixup_hp_envy_gpio()
4573 alc_update_coef_idx(codec, led->idx, led->mask, in alc_update_coef_led()
4574 on ? led->on : led->off); in alc_update_coef_led()
4577 /* update mute-LED according to the speaker mute state via COEF bit */
4581 struct hda_codec *codec = dev_to_hda_codec(led_cdev->dev->parent); in coef_mute_led_set()
4582 struct alc_spec *spec = codec->spec; in coef_mute_led_set()
4584 alc_update_coef_led(codec, &spec->mute_led_coef, in coef_mute_led_set()
4585 spec->mute_led_polarity, brightness); in coef_mute_led_set()
4593 struct alc_spec *spec = codec->spec; in alc285_fixup_hp_mute_led_coefbit()
4596 spec->mute_led_polarity = 0; in alc285_fixup_hp_mute_led_coefbit()
4597 spec->mute_led_coef.idx = 0x0b; in alc285_fixup_hp_mute_led_coefbit()
4598 spec->mute_led_coef.mask = 1 << 3; in alc285_fixup_hp_mute_led_coefbit()
4599 spec->mute_led_coef.on = 1 << 3; in alc285_fixup_hp_mute_led_coefbit()
4600 spec->mute_led_coef.off = 0; in alc285_fixup_hp_mute_led_coefbit()
4609 struct alc_spec *spec = codec->spec; in alc236_fixup_hp_mute_led_coefbit()
4612 spec->mute_led_polarity = 0; in alc236_fixup_hp_mute_led_coefbit()
4613 spec->mute_led_coef.idx = 0x34; in alc236_fixup_hp_mute_led_coefbit()
4614 spec->mute_led_coef.mask = 1 << 5; in alc236_fixup_hp_mute_led_coefbit()
4615 spec->mute_led_coef.on = 0; in alc236_fixup_hp_mute_led_coefbit()
4616 spec->mute_led_coef.off = 1 << 5; in alc236_fixup_hp_mute_led_coefbit()
4621 /* turn on/off mic-mute LED per capture hook by coef bit */
4625 struct hda_codec *codec = dev_to_hda_codec(led_cdev->dev->parent); in coef_micmute_led_set()
4626 struct alc_spec *spec = codec->spec; in coef_micmute_led_set()
4628 alc_update_coef_led(codec, &spec->mic_led_coef, in coef_micmute_led_set()
4629 spec->micmute_led_polarity, brightness); in coef_micmute_led_set()
4636 struct alc_spec *spec = codec->spec; in alc285_fixup_hp_coef_micmute_led()
4639 spec->mic_led_coef.idx = 0x19; in alc285_fixup_hp_coef_micmute_led()
4640 spec->mic_led_coef.mask = 1 << 13; in alc285_fixup_hp_coef_micmute_led()
4641 spec->mic_led_coef.on = 1 << 13; in alc285_fixup_hp_coef_micmute_led()
4642 spec->mic_led_coef.off = 0; in alc285_fixup_hp_coef_micmute_led()
4650 struct alc_spec *spec = codec->spec; in alc236_fixup_hp_coef_micmute_led()
4653 spec->mic_led_coef.idx = 0x35; in alc236_fixup_hp_coef_micmute_led()
4654 spec->mic_led_coef.mask = 3 << 2; in alc236_fixup_hp_coef_micmute_led()
4655 spec->mic_led_coef.on = 2 << 2; in alc236_fixup_hp_coef_micmute_led()
4656 spec->mic_led_coef.off = 1 << 2; in alc236_fixup_hp_coef_micmute_led()
4678 struct alc_spec *spec = codec->spec; in alc236_fixup_hp_micmute_led_vref()
4681 spec->cap_mute_led_nid = 0x1a; in alc236_fixup_hp_micmute_led_vref()
4683 codec->power_filter = led_power_filter; in alc236_fixup_hp_micmute_led_vref()
4695 const unsigned short coefs[2]) in alc298_samsung_write_coef_pack() argument
4704 unsigned short init_seq[2][2];
4711 static const unsigned short init_seq[][2] = { in alc298_fixup_samsung_amp()
4740 struct alc_spec *spec = codec->spec; in gpio2_mic_hotkey_event()
4744 input_report_key(spec->kb_dev, spec->alc_mute_keycode_map[ALC_KEY_MICMUTE_INDEX], 1); in gpio2_mic_hotkey_event()
4745 input_sync(spec->kb_dev); in gpio2_mic_hotkey_event()
4746 input_report_key(spec->kb_dev, spec->alc_mute_keycode_map[ALC_KEY_MICMUTE_INDEX], 0); in gpio2_mic_hotkey_event()
4747 input_sync(spec->kb_dev); in gpio2_mic_hotkey_event()
4752 struct alc_spec *spec = codec->spec; in alc_register_micmute_input_device()
4755 spec->kb_dev = input_allocate_device(); in alc_register_micmute_input_device()
4756 if (!spec->kb_dev) { in alc_register_micmute_input_device()
4758 return -ENOMEM; in alc_register_micmute_input_device()
4761 spec->alc_mute_keycode_map[ALC_KEY_MICMUTE_INDEX] = KEY_MICMUTE; in alc_register_micmute_input_device()
4763 spec->kb_dev->name = "Microphone Mute Button"; in alc_register_micmute_input_device()
4764 spec->kb_dev->evbit[0] = BIT_MASK(EV_KEY); in alc_register_micmute_input_device()
4765 spec->kb_dev->keycodesize = sizeof(spec->alc_mute_keycode_map[0]); in alc_register_micmute_input_device()
4766 spec->kb_dev->keycodemax = ARRAY_SIZE(spec->alc_mute_keycode_map); in alc_register_micmute_input_device()
4767 spec->kb_dev->keycode = spec->alc_mute_keycode_map; in alc_register_micmute_input_device()
4768 for (i = 0; i < ARRAY_SIZE(spec->alc_mute_keycode_map); i++) in alc_register_micmute_input_device()
4769 set_bit(spec->alc_mute_keycode_map[i], spec->kb_dev->keybit); in alc_register_micmute_input_device()
4771 if (input_register_device(spec->kb_dev)) { in alc_register_micmute_input_device()
4773 input_free_device(spec->kb_dev); in alc_register_micmute_input_device()
4774 spec->kb_dev = NULL; in alc_register_micmute_input_device()
4775 return -ENOMEM; in alc_register_micmute_input_device()
4789 struct alc_spec *spec = codec->spec; in alc280_fixup_hp_gpio2_mic_hotkey()
4793 spec->init_amp = ALC_INIT_DEFAULT; in alc280_fixup_hp_gpio2_mic_hotkey()
4797 spec->gpio_mask |= 0x06; in alc280_fixup_hp_gpio2_mic_hotkey()
4798 spec->gpio_dir |= 0x02; in alc280_fixup_hp_gpio2_mic_hotkey()
4799 spec->gpio_data |= 0x02; in alc280_fixup_hp_gpio2_mic_hotkey()
4800 snd_hda_codec_write_cache(codec, codec->core.afg, 0, in alc280_fixup_hp_gpio2_mic_hotkey()
4802 snd_hda_jack_detect_enable_callback(codec, codec->core.afg, in alc280_fixup_hp_gpio2_mic_hotkey()
4807 if (!spec->kb_dev) in alc280_fixup_hp_gpio2_mic_hotkey()
4812 input_unregister_device(spec->kb_dev); in alc280_fixup_hp_gpio2_mic_hotkey()
4813 spec->kb_dev = NULL; in alc280_fixup_hp_gpio2_mic_hotkey()
4823 struct alc_spec *spec = codec->spec; in alc233_fixup_lenovo_line2_mic_hotkey()
4827 spec->init_amp = ALC_INIT_DEFAULT; in alc233_fixup_lenovo_line2_mic_hotkey()
4836 if (!spec->kb_dev) in alc233_fixup_lenovo_line2_mic_hotkey()
4841 input_unregister_device(spec->kb_dev); in alc233_fixup_lenovo_line2_mic_hotkey()
4842 spec->kb_dev = NULL; in alc233_fixup_lenovo_line2_mic_hotkey()
4853 struct alc_spec *spec = codec->spec; in alc269_fixup_hp_line1_mic1_led()
4857 spec->cap_mute_led_nid = 0x18; in alc269_fixup_hp_line1_mic1_led()
4866 UPDATE_COEF(0x4a, 3<<4, 2<<4),
4875 struct alc_spec *spec = codec->spec; in alc_headset_mode_unplugged()
4925 UPDATE_COEF(0x1a, 1<<3, 1<<3), /* Combo JD gating with LINE1-VREFO */ in alc_headset_mode_unplugged()
4950 if (spec->no_internal_mic_pin) { in alc_headset_mode_unplugged()
4955 switch (codec->core.vendor_id) { in alc_headset_mode_unplugged()
5046 UPDATE_COEF(0x1a, 1<<3, 0), /* Combo JD gating without LINE1-VREFO */ in alc_headset_mode_mic_in()
5057 UPDATE_COEF(0x4a, 3<<4, 2<<4), in alc_headset_mode_mic_in()
5068 switch (codec->core.vendor_id) { in alc_headset_mode_mic_in()
5144 codec_dbg(codec, "Headset jack set to mic-in mode.\n"); in alc_headset_mode_mic_in()
5196 UPDATE_COEF(0x1a, 1<<3, 0), /* Combo JD gating without LINE1-VREFO */ in alc_headset_mode_default()
5213 switch (codec->core.vendor_id) { in alc_headset_mode_default()
5313 UPDATE_COEF(0x63, 3<<14, 2<<14), in alc_headset_mode_ctia()
5322 switch (codec->core.vendor_id) { in alc_headset_mode_ctia()
5384 codec_dbg(codec, "Headset jack set to iPhone-style headset mode.\n"); in alc_headset_mode_ctia()
5433 UPDATE_COEF(0x63, 3<<14, 2<<14), in alc_headset_mode_omtp()
5437 switch (codec->core.vendor_id) { in alc_headset_mode_omtp()
5485 codec_dbg(codec, "Headset jack set to Nokia-style headset mode.\n"); in alc_headset_mode_omtp()
5492 struct alc_spec *spec = codec->spec; in alc_determine_headset_type()
5531 if (spec->no_internal_mic_pin) { in alc_determine_headset_type()
5536 switch (codec->core.vendor_id) { in alc_determine_headset_type()
5657 alc_update_coef_idx(codec, 0x49, 3<<8, 2<<8); in alc_determine_headset_type()
5683 codec_dbg(codec, "Headset jack detected iPhone-style headset: %s\n", in alc_determine_headset_type()
5685 spec->current_headset_type = is_ctia ? ALC_HEADSET_TYPE_CTIA : ALC_HEADSET_TYPE_OMTP; in alc_determine_headset_type()
5690 struct alc_spec *spec = codec->spec; in alc_update_headset_mode()
5692 hda_nid_t mux_pin = spec->gen.imux_pins[spec->gen.cur_mux[0]]; in alc_update_headset_mode()
5699 else if (mux_pin == spec->headset_mic_pin) in alc_update_headset_mode()
5701 else if (mux_pin == spec->headphone_mic_pin) in alc_update_headset_mode()
5706 if (new_headset_mode == spec->current_headset_mode) { in alc_update_headset_mode()
5714 spec->current_headset_mode = ALC_HEADSET_MODE_UNKNOWN; in alc_update_headset_mode()
5715 spec->current_headset_type = ALC_HEADSET_TYPE_UNKNOWN; in alc_update_headset_mode()
5716 spec->gen.hp_jack_present = false; in alc_update_headset_mode()
5719 if (spec->current_headset_type == ALC_HEADSET_TYPE_UNKNOWN) in alc_update_headset_mode()
5721 if (spec->current_headset_type == ALC_HEADSET_TYPE_CTIA) in alc_update_headset_mode()
5723 else if (spec->current_headset_type == ALC_HEADSET_TYPE_OMTP) in alc_update_headset_mode()
5725 spec->gen.hp_jack_present = true; in alc_update_headset_mode()
5728 alc_headset_mode_mic_in(codec, hp_pin, spec->headphone_mic_pin); in alc_update_headset_mode()
5729 spec->gen.hp_jack_present = false; in alc_update_headset_mode()
5733 spec->gen.hp_jack_present = true; in alc_update_headset_mode()
5739 if (spec->headphone_mic_pin && spec->headphone_mic_pin != hp_pin) in alc_update_headset_mode()
5740 snd_hda_set_pin_ctl_cache(codec, spec->headphone_mic_pin, in alc_update_headset_mode()
5743 spec->current_headset_mode = new_headset_mode; in alc_update_headset_mode()
5765 struct alc_spec *spec = codec->spec; in alc_probe_headset_mode()
5766 struct auto_pin_cfg *cfg = &spec->gen.autocfg; in alc_probe_headset_mode()
5769 for (i = 0; i < cfg->num_inputs; i++) { in alc_probe_headset_mode()
5770 if (cfg->inputs[i].is_headset_mic && !spec->headset_mic_pin) in alc_probe_headset_mode()
5771 spec->headset_mic_pin = cfg->inputs[i].pin; in alc_probe_headset_mode()
5772 if (cfg->inputs[i].is_headphone_mic && !spec->headphone_mic_pin) in alc_probe_headset_mode()
5773 spec->headphone_mic_pin = cfg->inputs[i].pin; in alc_probe_headset_mode()
5776 WARN_ON(spec->gen.cap_sync_hook); in alc_probe_headset_mode()
5777 spec->gen.cap_sync_hook = alc_update_headset_mode_hook; in alc_probe_headset_mode()
5778 spec->gen.automute_hook = alc_update_headset_mode; in alc_probe_headset_mode()
5779 spec->gen.hp_automute_hook = alc_update_headset_jack_cb; in alc_probe_headset_mode()
5785 struct alc_spec *spec = codec->spec; in alc_fixup_headset_mode()
5789 spec->parse_flags |= HDA_PINCFG_HEADSET_MIC | HDA_PINCFG_HEADPHONE_MIC; in alc_fixup_headset_mode()
5796 spec->current_headset_mode = ALC_HEADSET_MODE_UNKNOWN; in alc_fixup_headset_mode()
5797 spec->current_headset_type = ALC_HEADSET_TYPE_UNKNOWN; in alc_fixup_headset_mode()
5808 struct alc_spec *spec = codec->spec; in alc_fixup_headset_mode_no_hp_mic()
5809 spec->parse_flags |= HDA_PINCFG_HEADSET_MIC; in alc_fixup_headset_mode_no_hp_mic()
5834 switch (codec->core.vendor_id) { in alc255_set_default_jack_type()
5861 struct alc_spec *spec = codec->spec; in alc_fixup_headset_mode_alc255_no_hp_mic()
5862 spec->parse_flags |= HDA_PINCFG_HEADSET_MIC; in alc_fixup_headset_mode_alc255_no_hp_mic()
5872 struct alc_spec *spec = codec->spec; in alc288_update_headset_jack_cb()
5876 alc_update_gpio_data(codec, 0x40, spec->gen.hp_jack_present); in alc288_update_headset_jack_cb()
5884 struct alc_spec *spec = codec->spec; in alc_fixup_headset_mode_dell_alc288()
5886 spec->gpio_mask |= 0x40; in alc_fixup_headset_mode_dell_alc288()
5887 spec->gpio_dir |= 0x40; in alc_fixup_headset_mode_dell_alc288()
5888 spec->gen.hp_automute_hook = alc288_update_headset_jack_cb; in alc_fixup_headset_mode_dell_alc288()
5896 struct alc_spec *spec = codec->spec; in alc_fixup_auto_mute_via_amp()
5897 spec->gen.auto_mute_via_amp = 1; in alc_fixup_auto_mute_via_amp()
5905 struct alc_spec *spec = codec->spec; in alc_fixup_no_shutup()
5906 spec->no_shutup_pins = 1; in alc_fixup_no_shutup()
5914 struct alc_spec *spec = codec->spec; in alc_fixup_disable_aamix()
5915 /* Disable AA-loopback as it causes white noise */ in alc_fixup_disable_aamix()
5916 spec->gen.mixer_nid = 0; in alc_fixup_disable_aamix()
5929 struct alc_spec *spec = codec->spec; in alc_fixup_tpt440_dock()
5932 spec->parse_flags = HDA_PINCFG_NO_HP_FIXUP; in alc_fixup_tpt440_dock()
5933 codec->power_save_node = 0; /* avoid click noises */ in alc_fixup_tpt440_dock()
5946 struct alc_spec *spec = codec->spec; in alc_fixup_tpt470_dock()
5949 spec->parse_flags = HDA_PINCFG_NO_HP_FIXUP; in alc_fixup_tpt470_dock()
5972 struct alc_spec *spec = codec->spec; in alc_fixup_tpt470_dacs()
5975 spec->gen.preferred_dacs = preferred_pairs; in alc_fixup_tpt470_dacs()
5984 struct alc_spec *spec = codec->spec; in alc295_fixup_asus_dacs()
5987 spec->gen.preferred_dacs = preferred_pairs; in alc295_fixup_asus_dacs()
5992 struct alc_spec *spec = codec->spec; in alc_shutup_dell_xps13()
6004 struct alc_spec *spec = codec->spec; in alc_fixup_dell_xps13()
6005 struct hda_input_mux *imux = &spec->gen.input_mux; in alc_fixup_dell_xps13()
6010 /* mic pin 0x19 must be initialized with Vref Hi-Z, otherwise in alc_fixup_dell_xps13()
6014 spec->shutup = alc_shutup_dell_xps13; in alc_fixup_dell_xps13()
6018 for (i = 0; i < imux->num_items; i++) { in alc_fixup_dell_xps13()
6019 if (spec->gen.imux_pins[i] == 0x12) { in alc_fixup_dell_xps13()
6020 spec->gen.cur_mux[0] = i; in alc_fixup_dell_xps13()
6031 struct alc_spec *spec = codec->spec; in alc_fixup_headset_mode_alc662()
6034 spec->parse_flags |= HDA_PINCFG_HEADSET_MIC; in alc_fixup_headset_mode_alc662()
6035 spec->gen.hp_mic = 1; /* Mic-in is same pin as headphone */ in alc_fixup_headset_mode_alc662()
6037 /* Disable boost for mic-in permanently. (This code is only called in alc_fixup_headset_mode_alc662()
6059 struct alc_spec *spec = codec->spec; in find_ext_mic_pin()
6060 struct auto_pin_cfg *cfg = &spec->gen.autocfg; in find_ext_mic_pin()
6065 for (i = 0; i < cfg->num_inputs; i++) { in find_ext_mic_pin()
6066 if (cfg->inputs[i].type != AUTO_PIN_MIC) in find_ext_mic_pin()
6068 nid = cfg->inputs[i].pin; in find_ext_mic_pin()
6082 struct alc_spec *spec = codec->spec; in alc271_hp_gate_mic_jack()
6098 struct alc_spec *spec = codec->spec; in alc269_fixup_limit_int_mic_boost()
6099 struct auto_pin_cfg *cfg = &spec->gen.autocfg; in alc269_fixup_limit_int_mic_boost()
6102 /* The mic boosts on level 2 and 3 are too noisy in alc269_fixup_limit_int_mic_boost()
6109 for (i = 0; i < cfg->num_inputs; i++) { in alc269_fixup_limit_int_mic_boost()
6110 hda_nid_t nid = cfg->inputs[i].pin; in alc269_fixup_limit_int_mic_boost()
6112 if (cfg->inputs[i].type != AUTO_PIN_MIC) in alc269_fixup_limit_int_mic_boost()
6129 struct alc_spec *spec = codec->spec; in alc283_hp_automute_hook()
6135 vref = spec->gen.hp_jack_present ? PIN_VREF80 : 0; in alc283_hp_automute_hook()
6145 struct alc_spec *spec = codec->spec; in alc283_fixup_chromebook()
6150 /* Disable AA-loopback as it causes white noise */ in alc283_fixup_chromebook()
6151 spec->gen.mixer_nid = 0; in alc283_fixup_chromebook()
6154 /* MIC2-VREF control */ in alc283_fixup_chromebook()
6166 struct alc_spec *spec = codec->spec; in alc283_fixup_sense_combo_jack()
6170 spec->gen.hp_automute_hook = alc283_hp_automute_hook; in alc283_fixup_sense_combo_jack()
6173 /* MIC2-VREF control */ in alc283_fixup_sense_combo_jack()
6183 struct alc_spec *spec = codec->spec; in asus_tx300_automute()
6186 spec->gen.mute_bits |= (1ULL << 0x14); in asus_tx300_automute()
6192 struct alc_spec *spec = codec->spec; in alc282_fixup_asus_tx300()
6200 spec->init_amp = ALC_INIT_DEFAULT; in alc282_fixup_asus_tx300()
6204 spec->gen.auto_mute_via_amp = 1; in alc282_fixup_asus_tx300()
6205 spec->gen.automute_hook = asus_tx300_automute; in alc282_fixup_asus_tx300()
6210 spec->init_amp = ALC_INIT_DEFAULT; in alc282_fixup_asus_tx300()
6243 Amp-out capability. we change the speaker's route to: in alc298_fixup_speaker_volume()
6244 Node 0x02 (Audio Output) -> Node 0x0c (Audio Mixer) -> Node 0x17 ( in alc298_fixup_speaker_volume()
6245 Pin Complex), since Node 0x02 has Amp-out caps, we can adjust in alc298_fixup_speaker_volume()
6277 struct alc_spec *spec = codec->spec; in alc280_hp_gpio4_automute_hook()
6281 alc_update_gpio_led(codec, 0x10, spec->mute_led_polarity, in alc280_hp_gpio4_automute_hook()
6282 !spec->gen.hp_jack_present); in alc280_hp_gpio4_automute_hook()
6295 struct alc_spec *spec = codec->spec; in alc280_fixup_hp_9480m()
6300 spec->gpio_mask |= 0x10; in alc280_fixup_hp_9480m()
6301 spec->gpio_dir |= 0x10; in alc280_fixup_hp_9480m()
6302 spec->gen.hp_automute_hook = alc280_hp_gpio4_automute_hook; in alc280_fixup_hp_9480m()
6310 struct alc_spec *spec = codec->spec; in alc275_fixup_gpio4_off()
6313 spec->gpio_mask |= 0x04; in alc275_fixup_gpio4_off()
6314 spec->gpio_dir |= 0x04; in alc275_fixup_gpio4_off()
6321 * DAC1 (NID 0x02) -> Speaker (NID 0x14); some eq applied secretly
6322 * DAC2 (NID 0x03) -> Bass (NID 0x17) & Headphone (NID 0x21); sharing a DAC
6323 * DAC3 (NID 0x06) -> Unused, due to the lack of volume amp
6332 struct alc_spec *spec = codec->spec; in alc285_fixup_thinkpad_x1_gen7()
6337 spec->gen.preferred_dacs = preferred_pairs; in alc285_fixup_thinkpad_x1_gen7()
6360 strcpy(codec->card->longname, "HDAudio-Lenovo-DualCodecs"); in alc233_alc662_fixup_lenovo_dual_codecs()
6365 codec->addr == 0 ? in alc233_alc662_fixup_lenovo_dual_codecs()
6366 "Rear-Panel Capture Volume" : in alc233_alc662_fixup_lenovo_dual_codecs()
6367 "Front-Panel Capture Volume"); in alc233_alc662_fixup_lenovo_dual_codecs()
6369 codec->addr == 0 ? in alc233_alc662_fixup_lenovo_dual_codecs()
6370 "Rear-Panel Capture Switch" : in alc233_alc662_fixup_lenovo_dual_codecs()
6371 "Front-Panel Capture Switch"); in alc233_alc662_fixup_lenovo_dual_codecs()
6382 codec->power_save_node = 1; in alc225_fixup_s3_pop_noise()
6389 struct alc_spec *spec = codec->spec; in alc274_fixup_bind_dacs()
6398 spec->gen.preferred_dacs = preferred_pairs; in alc274_fixup_bind_dacs()
6399 spec->gen.auto_mute_via_amp = 1; in alc274_fixup_bind_dacs()
6400 codec->power_save_node = 0; in alc274_fixup_bind_dacs()
6410 struct alc_spec *spec = codec->spec; in alc289_fixup_asus_ga401()
6413 spec->gen.preferred_dacs = preferred_pairs; in alc289_fixup_asus_ga401()
6414 spec->gen.obey_preferred_dacs = 1; in alc289_fixup_asus_ga401()
6430 switch (codec->core.vendor_id) { in alc_combo_jack_hp_jd_restart()
6454 struct alc_spec *spec = codec->spec; in alc295_fixup_chromebook()
6458 spec->ultra_low_power = true; in alc295_fixup_chromebook()
6559 struct alc_spec *spec = codec->spec; in alc_fixup_no_int_mic()
6565 spec->no_internal_mic_pin = true; in alc_fixup_no_int_mic()
6581 struct alc_spec *spec = codec->spec; in alc285_fixup_hp_spectre_x360_eb1()
6593 spec->micmute_led_polarity = 1; in alc285_fixup_hp_spectre_x360_eb1()
6595 spec->gpio_mask |= 0x01; in alc285_fixup_hp_spectre_x360_eb1()
6596 spec->gpio_dir |= 0x01; in alc285_fixup_hp_spectre_x360_eb1()
6644 struct alc_spec *spec = codec->spec; in alc287_fixup_legion_15imhg05_speakers()
6648 spec->gen.suppress_auto_mute = 1; in alc287_fixup_legion_15imhg05_speakers()
6656 struct alc_spec *spec = cdc->spec; in comp_bind()
6658 return component_bind_all(dev, spec->comps); in comp_bind()
6664 struct alc_spec *spec = cdc->spec; in comp_unbind()
6666 component_unbind_all(dev, spec->comps); in comp_unbind()
6677 struct alc_spec *spec = cdc->spec; in comp_generic_playback_hook()
6681 if (spec->comps[i].dev) in comp_generic_playback_hook()
6682 spec->comps[i].playback_hook(spec->comps[i].dev, action); in comp_generic_playback_hook()
6697 int n = strlen(p->bus); in comp_match_cs35l41_dev_name()
6701 if (strncmp(d, p->bus, n)) in comp_match_cs35l41_dev_name()
6707 snprintf(tmp, sizeof(tmp), "-%s:00-cs35l41-hda.%d", p->hid, p->index); in comp_match_cs35l41_dev_name()
6715 struct alc_spec *spec = cdc->spec; in cs35l41_generic_fixup()
6725 rec->bus = bus; in cs35l41_generic_fixup()
6726 rec->hid = hid; in cs35l41_generic_fixup()
6727 rec->index = i; in cs35l41_generic_fixup()
6728 spec->comps[i].codec = cdc; in cs35l41_generic_fixup()
6729 component_match_add(dev, &spec->match, in cs35l41_generic_fixup()
6732 ret = component_master_add_with_match(dev, &comp_master_ops, spec->match); in cs35l41_generic_fixup()
6736 spec->gen.pcm_playback_hook = comp_generic_playback_hook; in cs35l41_generic_fixup()
6743 cs35l41_generic_fixup(cdc, action, "i2c", "CSC3551", 2); in cs35l41_fixup_i2c_two()
6748 cs35l41_generic_fixup(codec, action, "spi", "CSC3551", 2); in cs35l41_fixup_spi_two()
6753 cs35l41_generic_fixup(codec, action, "spi", "CSC3551", 4); in cs35l41_fixup_spi_four()
6759 cs35l41_generic_fixup(cdc, action, "i2c", "CLSA0100", 2); in alc287_fixup_legion_16achg6_speakers()
6765 cs35l41_generic_fixup(cdc, action, "i2c", "CLSA0101", 2); in alc287_fixup_legion_16ithg6_speakers()
6790 * plugged-in state, while the internal microphone is always in an in alc256_fixup_set_coef_defaults()
6826 if (codec->core.vendor_id == 0x10ec0256) { in alc256_fixup_mic_no_presence_and_resume()
6838 struct alc_spec *spec = codec->spec; in alc_fixup_dell4_mic_no_presence_quiet()
6839 struct hda_input_mux *imux = &spec->gen.input_mux; in alc_fixup_dell4_mic_no_presence_quiet()
6848 * to Hi-Z to avoid pop noises at startup and when plugging and in alc_fixup_dell4_mic_no_presence_quiet()
6859 for (i = 0; i < imux->num_items; i++) { in alc_fixup_dell4_mic_no_presence_quiet()
6860 if (spec->gen.imux_pins[i] == 0x12) { in alc_fixup_dell4_mic_no_presence_quiet()
6861 spec->gen.cur_mux[0] = i; in alc_fixup_dell4_mic_no_presence_quiet()
6895 struct alc_spec *spec = codec->spec; in alc287_fixup_yoga9_14iap7_bass_spk_pin()
6901 spec->gen.preferred_dacs = preferred_pairs; in alc287_fixup_yoga9_14iap7_bass_spk_pin()
7161 if (codec->core.vendor_id == 0x10ec0298) in alc298_fixup_lenovo_c940_duet7()
7250 { 0x1a, 0x2101103f }, /* dock line-out */
7251 { 0x1b, 0x23a11040 }, /* dock mic-in */
7285 { 0x19, 0x99a3092f }, /* int-mic */
7292 { 0x12, 0x99a3092f }, /* int-mic */
7304 { 0x19, 0x99a3092f }, /* int-mic */
7312 { 0x12, 0x99a3092f }, /* int-mic */
7500 { 0x1b, 0x99a7012f }, /* int-mic */
7520 { 0x12, 0x99a3092f }, /* int-mic */
7545 /* class-D output amp +5dB */
7571 { 0x12, 0x99a3092f }, /* int-mic */
7756 { 0x1b, 0x21011020 }, /* line-out */
7758 { 0x18, 0x2181103f }, /* line-in */
7767 { 0x1b, 0x21011020 }, /* line-out */
7768 { 0x18, 0x2181103f }, /* line-in */
7911 /* Disable pass-through path for FRONT 14h */
8226 /* Disable PCBEEP-IN passthrough */
8376 /* set 0x15 to HP-OUT ctrl */
8403 /* set 0x15 to HP-OUT ctrl */
8407 /* set 0x1b to HP-OUT */
9105 SND_PCI_QUIRK(0x1025, 0x072d, "Acer Aspire V5-571G", ALC269_FIXUP_ASPIRE_HEADSET_MIC),
9108 SND_PCI_QUIRK(0x1025, 0x0762, "Acer Aspire E1-472", ALC271_FIXUP_HP_GATE_MIC_JACK_E1_572),
9109 SND_PCI_QUIRK(0x1025, 0x0775, "Acer Aspire E1-572", ALC271_FIXUP_HP_GATE_MIC_JACK_E1_572),
9110 SND_PCI_QUIRK(0x1025, 0x079b, "Acer Aspire V5-573G", ALC282_FIXUP_ASPIRE_V5_PINS),
9111 SND_PCI_QUIRK(0x1025, 0x080d, "Acer Aspire V5-122P", ALC269_FIXUP_ASPIRE_HEADSET_MIC),
9114 SND_PCI_QUIRK(0x1025, 0x102b, "Acer Aspire C24-860", ALC286_FIXUP_ACER_AIO_MIC_NO_PRESENCE),
9115 SND_PCI_QUIRK(0x1025, 0x1065, "Acer Aspire C20-820", ALC269VC_FIXUP_ACER_HEADSET_MIC),
9117 SND_PCI_QUIRK(0x1025, 0x1094, "Acer Aspire E5-575T", ALC255_FIXUP_ACER_LIMIT_INT_MIC_BOOST),
9118 SND_PCI_QUIRK(0x1025, 0x1099, "Acer Aspire E5-523G", ALC255_FIXUP_ACER_MIC_NO_PRESENCE),
9119 SND_PCI_QUIRK(0x1025, 0x110e, "Acer Aspire ES1-432", ALC255_FIXUP_ACER_MIC_NO_PRESENCE),
9125 SND_PCI_QUIRK(0x1025, 0x1269, "Acer SWIFT SF314-54", ALC256_FIXUP_ACER_HEADSET_MIC),
9129 SND_PCI_QUIRK(0x1025, 0x129c, "Acer SWIFT SF314-55", ALC256_FIXUP_ACER_HEADSET_MIC),
9130 SND_PCI_QUIRK(0x1025, 0x129d, "Acer SWIFT SF313-51", ALC256_FIXUP_ACER_MIC_NO_PRESENCE),
9131 SND_PCI_QUIRK(0x1025, 0x1300, "Acer SWIFT SF314-56", ALC256_FIXUP_ACER_MIC_NO_PRESENCE),
9132 SND_PCI_QUIRK(0x1025, 0x1308, "Acer Aspire Z24-890", ALC286_FIXUP_ACER_AIO_HEADSET_MIC),
9133 SND_PCI_QUIRK(0x1025, 0x132a, "Acer TravelMate B114-21", ALC233_FIXUP_ACER_HEADSET_MIC),
9134 SND_PCI_QUIRK(0x1025, 0x1330, "Acer TravelMate X514-51T", ALC255_FIXUP_ACER_HEADSET_MIC),
9135 SND_PCI_QUIRK(0x1025, 0x141f, "Acer Spin SP513-54N", ALC255_FIXUP_ACER_MIC_NO_PRESENCE),
9136 SND_PCI_QUIRK(0x1025, 0x142b, "Acer Swift SF314-42", ALC255_FIXUP_ACER_MIC_NO_PRESENCE),
9137 SND_PCI_QUIRK(0x1025, 0x1430, "Acer TravelMate B311R-31", ALC256_FIXUP_ACER_MIC_NO_PRESENCE),
9138 SND_PCI_QUIRK(0x1025, 0x1466, "Acer Aspire A515-56", ALC255_FIXUP_ACER_HEADPHONE_AND_MIC),
9141 SND_PCI_QUIRK(0x1028, 0x054b, "Dell XPS one 2710", ALC275_FIXUP_DELL_XPS),
9157 SND_PCI_QUIRK(0x1028, 0x0665, "Dell XPS 13", ALC288_FIXUP_DELL_XPS_13),
9171 SND_PCI_QUIRK(0x1028, 0x075c, "Dell XPS 27 7760", ALC298_FIXUP_SPK_VOLUME),
9192 SND_PCI_QUIRK(0x1028, 0x0a61, "Dell XPS 15 9510", ALC289_FIXUP_DUAL_SPK),
9196 SND_PCI_QUIRK(0x1028, 0x0b19, "Dell XPS 15 9520", ALC289_FIXUP_DUAL_SPK),
9269 SND_PCI_QUIRK(0x103c, 0x841c, "HP Pavilion 15-CK0xx", ALC269_FIXUP_HP_MUTE_LED_MIC3),
9271 SND_PCI_QUIRK(0x103c, 0x84da, "HP OMEN dc0019-ur", ALC295_FIXUP_HP_OMEN),
9273 SND_PCI_QUIRK(0x103c, 0x8519, "HP Spectre x360 15-df0xxx", ALC285_FIXUP_HP_SPECTRE_X360),
9278 SND_PCI_QUIRK(0x103c, 0x86e7, "HP Spectre x360 15-eb0xxx", ALC285_FIXUP_HP_SPECTRE_X360_EB1),
9279 SND_PCI_QUIRK(0x103c, 0x86e8, "HP Spectre x360 15-eb0xxx", ALC285_FIXUP_HP_SPECTRE_X360_EB1),
9309 SND_PCI_QUIRK(0x103c, 0x8811, "HP Spectre x360 15-eb1xxx", ALC285_FIXUP_HP_SPECTRE_X360_EB1),
9310 SND_PCI_QUIRK(0x103c, 0x8812, "HP Spectre x360 15-eb1xxx", ALC285_FIXUP_HP_SPECTRE_X360_EB1),
9324 SND_PCI_QUIRK(0x103c, 0x88d0, "HP Pavilion 15-eh1xxx (mainboard 88D0)", ALC287_FIXUP_HP_GPIO_LED),
9433 SND_PCI_QUIRK(0x10f7, 0x8338, "Panasonic CF-SZ6", ALC269_FIXUP_HEADSET_MODE),
9435 SND_PCI_QUIRK(0x144d, 0xc169, "Samsung Notebook 9 Pen (NP930SBE-K01US)", ALC298_FIXUP_SAMSUNG_AMP),
9436 SND_PCI_QUIRK(0x144d, 0xc176, "Samsung Notebook 9 Pro (NP930MBE-K04US)", ALC298_FIXUP_SAMSUNG_AMP),
9437 …SND_PCI_QUIRK(0x144d, 0xc189, "Samsung Galaxy Flex Book (NT950QCG-X716)", ALC298_FIXUP_SAMSUNG_AMP…
9438 …SND_PCI_QUIRK(0x144d, 0xc18a, "Samsung Galaxy Book Ion (NP930XCJ-K01US)", ALC298_FIXUP_SAMSUNG_AMP…
9439 …SND_PCI_QUIRK(0x144d, 0xc1a3, "Samsung Galaxy Book Pro (NP935XDB-KC1SE)", ALC298_FIXUP_SAMSUNG_AMP…
9442 SND_PCI_QUIRK(0x144d, 0xc812, "Samsung Notebook Pen S (NT950SBE-X58)", ALC298_FIXUP_SAMSUNG_AMP),
9443 …SND_PCI_QUIRK(0x144d, 0xc830, "Samsung Galaxy Book Ion (NT950XCJ-X716A)", ALC298_FIXUP_SAMSUNG_AMP…
9445 SND_PCI_QUIRK(0x1458, 0xfa53, "Gigabyte BXBT-2807", ALC283_FIXUP_HEADSET_MIC),
9446 SND_PCI_QUIRK(0x1462, 0xb120, "MSI Cubi MS-B120", ALC283_FIXUP_HEADSET_MIC),
9447 SND_PCI_QUIRK(0x1462, 0xb171, "Cubi N 8GL (MS-B171)", ALC283_FIXUP_HEADSET_MIC),
9484 SND_PCI_QUIRK(0x1558, 0x70f6, "Clevo NH77DPQ-Y", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
9493 …SND_PCI_QUIRK(0x1558, 0x8550, "Clevo NH[57][0-9][ER][ACDH]Q", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENC…
9494 …SND_PCI_QUIRK(0x1558, 0x8551, "Clevo NH[57][0-9][ER][ACDH]Q", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENC…
9495 SND_PCI_QUIRK(0x1558, 0x8560, "Clevo NH[57][0-9][ER][ACDH]Q", ALC269_FIXUP_HEADSET_MIC),
9496 SND_PCI_QUIRK(0x1558, 0x8561, "Clevo NH[57][0-9][ER][ACDH]Q", ALC269_FIXUP_HEADSET_MIC),
9497 SND_PCI_QUIRK(0x1558, 0x8562, "Clevo NH[57][0-9]RZ[Q]", ALC269_FIXUP_DMIC),
9504 SND_PCI_QUIRK(0x1558, 0x8a20, "Clevo NH55DCQ-Y", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
9505 SND_PCI_QUIRK(0x1558, 0x8a51, "Clevo NH70RCQ-Y", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
9506 SND_PCI_QUIRK(0x1558, 0x8d50, "Clevo NH55RCQ-M", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
9539 SND_PCI_QUIRK(0x17aa, 0x2218, "Thinkpad X1 Carbon 2nd", ALC292_FIXUP_TPT440_DOCK),
9589 SND_PCI_QUIRK(0x17aa, 0x3902, "Lenovo E50-80", ALC269_FIXUP_DMIC_THINKPAD_ACPI),
9591 SND_PCI_QUIRK(0x17aa, 0x3978, "Lenovo B50-70", ALC269_FIXUP_DMIC_THINKPAD_ACPI),
9615 SND_PCI_QUIRK(0x19e5, 0x3204, "Huawei MACH-WX9", ALC256_FIXUP_HUAWEI_MACH_WX9_PINS),
9616 SND_PCI_QUIRK(0x19e5, 0x320f, "Huawei WRT-WX9 ", ALC256_FIXUP_ASUS_MIC_NO_PRESENCE),
9620 …b7d, 0xa831, "Ordissimo EVE2 ", ALC269VB_FIXUP_ORDISSIMO_EVE2), /* Also known as Malata PC-B1303 */
9703 {.id = ALC269_FIXUP_AMIC, .name = "laptop-amic"},
9704 {.id = ALC269_FIXUP_DMIC, .name = "laptop-dmic"},
9705 {.id = ALC269_FIXUP_STEREO_DMIC, .name = "alc269-dmic"},
9706 {.id = ALC271_FIXUP_DMIC, .name = "alc271-dmic"},
9707 {.id = ALC269_FIXUP_INV_DMIC, .name = "inv-dmic"},
9708 {.id = ALC269_FIXUP_HEADSET_MIC, .name = "headset-mic"},
9709 {.id = ALC269_FIXUP_HEADSET_MODE, .name = "headset-mode"},
9710 {.id = ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC, .name = "headset-mode-no-hp-mic"},
9711 {.id = ALC269_FIXUP_LENOVO_DOCK, .name = "lenovo-dock"},
9712 {.id = ALC269_FIXUP_LENOVO_DOCK_LIMIT_BOOST, .name = "lenovo-dock-limit-boost"},
9713 {.id = ALC269_FIXUP_HP_GPIO_LED, .name = "hp-gpio-led"},
9714 {.id = ALC269_FIXUP_HP_DOCK_GPIO_MIC1_LED, .name = "hp-dock-gpio-mic1-led"},
9715 {.id = ALC269_FIXUP_DELL1_MIC_NO_PRESENCE, .name = "dell-headset-multi"},
9716 {.id = ALC269_FIXUP_DELL2_MIC_NO_PRESENCE, .name = "dell-headset-dock"},
9717 {.id = ALC269_FIXUP_DELL3_MIC_NO_PRESENCE, .name = "dell-headset3"},
9718 {.id = ALC269_FIXUP_DELL4_MIC_NO_PRESENCE, .name = "dell-headset4"},
9719 {.id = ALC283_FIXUP_CHROME_BOOK, .name = "alc283-dac-wcaps"},
9720 {.id = ALC283_FIXUP_SENSE_COMBO_JACK, .name = "alc283-sense-combo"},
9721 {.id = ALC292_FIXUP_TPT440_DOCK, .name = "tpt440-dock"},
9724 {.id = ALC298_FIXUP_TPT470_DOCK_FIX, .name = "tpt470-dock-fix"},
9725 {.id = ALC298_FIXUP_TPT470_DOCK, .name = "tpt470-dock"},
9726 {.id = ALC233_FIXUP_LENOVO_MULTI_CODECS, .name = "dual-codecs"},
9727 {.id = ALC700_FIXUP_INTEL_REFERENCE, .name = "alc700-ref"},
9729 {.id = ALC269_FIXUP_DELL_M101Z, .name = "dell-m101z"},
9730 {.id = ALC269_FIXUP_ASUS_G73JW, .name = "asus-g73jw"},
9731 {.id = ALC269_FIXUP_LENOVO_EAPD, .name = "lenovo-eapd"},
9732 {.id = ALC275_FIXUP_SONY_HWEQ, .name = "sony-hweq"},
9735 {.id = ALC269_FIXUP_LIFEBOOK_EXTMIC, .name = "lifebook-extmic"},
9736 {.id = ALC269_FIXUP_LIFEBOOK_HP_PIN, .name = "lifebook-hp-pin"},
9737 {.id = ALC255_FIXUP_LIFEBOOK_U7x7_HEADSET_MIC, .name = "lifebook-u7x7"},
9738 {.id = ALC269VB_FIXUP_AMIC, .name = "alc269vb-amic"},
9739 {.id = ALC269VB_FIXUP_DMIC, .name = "alc269vb-dmic"},
9740 {.id = ALC269_FIXUP_HP_MUTE_LED_MIC1, .name = "hp-mute-led-mic1"},
9741 {.id = ALC269_FIXUP_HP_MUTE_LED_MIC2, .name = "hp-mute-led-mic2"},
9742 {.id = ALC269_FIXUP_HP_MUTE_LED_MIC3, .name = "hp-mute-led-mic3"},
9743 {.id = ALC269_FIXUP_HP_GPIO_MIC1_LED, .name = "hp-gpio-mic1"},
9744 {.id = ALC269_FIXUP_HP_LINE1_MIC1_LED, .name = "hp-line1-mic1"},
9746 {.id = ALC286_FIXUP_SONY_MIC_NO_PRESENCE, .name = "sony-nomic"},
9747 {.id = ALC269_FIXUP_ASPIRE_HEADSET_MIC, .name = "aspire-headset-mic"},
9748 {.id = ALC269_FIXUP_ASUS_X101, .name = "asus-x101"},
9749 {.id = ALC271_FIXUP_HP_GATE_MIC_JACK, .name = "acer-ao7xx"},
9750 {.id = ALC271_FIXUP_HP_GATE_MIC_JACK_E1_572, .name = "acer-aspire-e1"},
9751 {.id = ALC269_FIXUP_ACER_AC700, .name = "acer-ac700"},
9752 {.id = ALC269_FIXUP_LIMIT_INT_MIC_BOOST, .name = "limit-mic-boost"},
9753 {.id = ALC269VB_FIXUP_ASUS_ZENBOOK, .name = "asus-zenbook"},
9754 {.id = ALC269VB_FIXUP_ASUS_ZENBOOK_UX31A, .name = "asus-zenbook-ux31a"},
9756 {.id = ALC282_FIXUP_ASUS_TX300, .name = "asus-tx300"},
9757 {.id = ALC283_FIXUP_INT_MIC, .name = "alc283-int-mic"},
9758 {.id = ALC290_FIXUP_MONO_SPEAKERS_HSJACK, .name = "mono-speakers"},
9759 {.id = ALC290_FIXUP_SUBWOOFER_HSJACK, .name = "alc290-subwoofer"},
9761 {.id = ALC269_FIXUP_DMIC_THINKPAD_ACPI, .name = "dmic-thinkpad"},
9762 {.id = ALC255_FIXUP_ACER_MIC_NO_PRESENCE, .name = "alc255-acer"},
9763 {.id = ALC255_FIXUP_ASUS_MIC_NO_PRESENCE, .name = "alc255-asus"},
9764 {.id = ALC255_FIXUP_DELL1_MIC_NO_PRESENCE, .name = "alc255-dell1"},
9765 {.id = ALC255_FIXUP_DELL2_MIC_NO_PRESENCE, .name = "alc255-dell2"},
9766 {.id = ALC293_FIXUP_DELL1_MIC_NO_PRESENCE, .name = "alc293-dell1"},
9767 {.id = ALC283_FIXUP_HEADSET_MIC, .name = "alc283-headset"},
9768 {.id = ALC255_FIXUP_MIC_MUTE_LED, .name = "alc255-dell-mute"},
9769 {.id = ALC282_FIXUP_ASPIRE_V5_PINS, .name = "aspire-v5"},
9770 {.id = ALC269VB_FIXUP_ASPIRE_E1_COEF, .name = "aspire-e1-coef"},
9771 {.id = ALC280_FIXUP_HP_GPIO4, .name = "hp-gpio4"},
9772 {.id = ALC286_FIXUP_HP_GPIO_LED, .name = "hp-gpio-led"},
9773 {.id = ALC280_FIXUP_HP_GPIO2_MIC_HOTKEY, .name = "hp-gpio2-hotkey"},
9774 {.id = ALC280_FIXUP_HP_DOCK_PINS, .name = "hp-dock-pins"},
9775 {.id = ALC269_FIXUP_HP_DOCK_GPIO_MIC1_LED, .name = "hp-dock-gpio-mic"},
9776 {.id = ALC280_FIXUP_HP_9480M, .name = "hp-9480m"},
9777 {.id = ALC288_FIXUP_DELL_HEADSET_MODE, .name = "alc288-dell-headset"},
9778 {.id = ALC288_FIXUP_DELL1_MIC_NO_PRESENCE, .name = "alc288-dell1"},
9779 {.id = ALC288_FIXUP_DELL_XPS_13, .name = "alc288-dell-xps13"},
9780 {.id = ALC292_FIXUP_DELL_E7X, .name = "dell-e7x"},
9781 {.id = ALC293_FIXUP_DISABLE_AAMIX_MULTIJACK, .name = "alc293-dell"},
9782 {.id = ALC298_FIXUP_DELL1_MIC_NO_PRESENCE, .name = "alc298-dell1"},
9783 {.id = ALC298_FIXUP_DELL_AIO_MIC_NO_PRESENCE, .name = "alc298-dell-aio"},
9784 {.id = ALC275_FIXUP_DELL_XPS, .name = "alc275-dell-xps"},
9785 {.id = ALC293_FIXUP_LENOVO_SPK_NOISE, .name = "lenovo-spk-noise"},
9786 {.id = ALC233_FIXUP_LENOVO_LINE2_MIC_HOTKEY, .name = "lenovo-hotkey"},
9787 {.id = ALC255_FIXUP_DELL_SPK_NOISE, .name = "dell-spk-noise"},
9788 {.id = ALC225_FIXUP_DELL1_MIC_NO_PRESENCE, .name = "alc225-dell1"},
9789 {.id = ALC295_FIXUP_DISABLE_DAC3, .name = "alc295-disable-dac3"},
9790 {.id = ALC285_FIXUP_SPEAKER2_TO_DAC1, .name = "alc285-speaker2-to-dac1"},
9791 {.id = ALC280_FIXUP_HP_HEADSET_MIC, .name = "alc280-hp-headset"},
9792 {.id = ALC221_FIXUP_HP_FRONT_MIC, .name = "alc221-hp-mic"},
9793 {.id = ALC298_FIXUP_SPK_VOLUME, .name = "alc298-spk-volume"},
9794 {.id = ALC256_FIXUP_DELL_INSPIRON_7559_SUBWOOFER, .name = "dell-inspiron-7559"},
9795 {.id = ALC269_FIXUP_ATIV_BOOK_8, .name = "ativ-book"},
9796 {.id = ALC221_FIXUP_HP_MIC_NO_PRESENCE, .name = "alc221-hp-mic"},
9797 {.id = ALC256_FIXUP_ASUS_HEADSET_MODE, .name = "alc256-asus-headset"},
9798 {.id = ALC256_FIXUP_ASUS_MIC, .name = "alc256-asus-mic"},
9799 {.id = ALC256_FIXUP_ASUS_AIO_GPIO2, .name = "alc256-asus-aio"},
9800 {.id = ALC233_FIXUP_ASUS_MIC_NO_PRESENCE, .name = "alc233-asus"},
9801 {.id = ALC233_FIXUP_EAPD_COEF_AND_MIC_NO_PRESENCE, .name = "alc233-eapd"},
9802 {.id = ALC294_FIXUP_LENOVO_MIC_LOCATION, .name = "alc294-lenovo-mic"},
9803 {.id = ALC225_FIXUP_DELL_WYSE_MIC_NO_PRESENCE, .name = "alc225-wyse"},
9804 {.id = ALC274_FIXUP_DELL_AIO_LINEOUT_VERB, .name = "alc274-dell-aio"},
9805 {.id = ALC255_FIXUP_DUMMY_LINEOUT_VERB, .name = "alc255-dummy-lineout"},
9806 {.id = ALC255_FIXUP_DELL_HEADSET_MIC, .name = "alc255-dell-headset"},
9807 {.id = ALC295_FIXUP_HP_X360, .name = "alc295-hp-x360"},
9808 {.id = ALC225_FIXUP_HEADSET_JACK, .name = "alc-headset-jack"},
9809 {.id = ALC295_FIXUP_CHROME_BOOK, .name = "alc-chrome-book"},
9810 {.id = ALC299_FIXUP_PREDATOR_SPK, .name = "predator-spk"},
9811 {.id = ALC298_FIXUP_HUAWEI_MBX_STEREO, .name = "huawei-mbx-stereo"},
9812 {.id = ALC256_FIXUP_MEDION_HEADSET_NO_PRESENCE, .name = "alc256-medion-headset"},
9813 {.id = ALC298_FIXUP_SAMSUNG_AMP, .name = "alc298-samsung-amp"},
9814 {.id = ALC256_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET, .name = "alc256-samsung-headphone"},
9815 {.id = ALC255_FIXUP_XIAOMI_HEADSET_MIC, .name = "alc255-xiaomi-headset"},
9816 {.id = ALC274_FIXUP_HP_MIC, .name = "alc274-hp-mic-detect"},
9817 {.id = ALC245_FIXUP_HP_X360_AMP, .name = "alc245-hp-x360-amp"},
9818 {.id = ALC295_FIXUP_HP_OMEN, .name = "alc295-hp-omen"},
9819 {.id = ALC285_FIXUP_HP_SPECTRE_X360, .name = "alc285-hp-spectre-x360"},
9820 {.id = ALC285_FIXUP_HP_SPECTRE_X360_EB1, .name = "alc285-hp-spectre-x360-eb1"},
9821 {.id = ALC287_FIXUP_IDEAPAD_BASS_SPK_AMP, .name = "alc287-ideapad-bass-spk-amp"},
9822 {.id = ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK_PIN, .name = "alc287-yoga9-bass-spk-pin"},
9823 {.id = ALC623_FIXUP_LENOVO_THINKSTATION_P340, .name = "alc623-lenovo-thinkstation-p340"},
9824 {.id = ALC255_FIXUP_ACER_HEADPHONE_AND_MIC, .name = "alc255-acer-headphone-and-mic"},
9825 {.id = ALC285_FIXUP_HP_GPIO_AMP_INIT, .name = "alc285-hp-amp-init"},
10288 struct alc_spec *spec = codec->spec; in alc269_fill_coef()
10291 if (spec->codec_variant != ALC269_TYPE_ALC269VB) in alc269_fill_coef()
10311 if (val != -1 && (val & 0x0c00) >> 10 != 0x1) { in alc269_fill_coef()
10316 if (val != -1 && (val & 0x01c0) >> 6 != 0x4) { in alc269_fill_coef()
10337 spec = codec->spec; in patch_alc269()
10338 spec->gen.shared_mic_vref_pin = 0x18; in patch_alc269()
10339 codec->power_save_node = 0; in patch_alc269()
10342 codec->patch_ops.suspend = alc269_suspend; in patch_alc269()
10343 codec->patch_ops.resume = alc269_resume; in patch_alc269()
10345 spec->shutup = alc_default_shutup; in patch_alc269()
10346 spec->init_hook = alc_default_init; in patch_alc269()
10348 switch (codec->core.vendor_id) { in patch_alc269()
10350 spec->codec_variant = ALC269_TYPE_ALC269VA; in patch_alc269()
10353 if (codec->bus->pci && in patch_alc269()
10354 codec->bus->pci->subsystem_vendor == 0x1025 && in patch_alc269()
10355 spec->cdefine.platform_type == 1) in patch_alc269()
10357 spec->codec_variant = ALC269_TYPE_ALC269VB; in patch_alc269()
10360 if (codec->bus->pci && in patch_alc269()
10361 codec->bus->pci->subsystem_vendor == 0x17aa && in patch_alc269()
10362 codec->bus->pci->subsystem_device == 0x21f3) in patch_alc269()
10364 spec->codec_variant = ALC269_TYPE_ALC269VC; in patch_alc269()
10367 spec->codec_variant = ALC269_TYPE_ALC269VD; in patch_alc269()
10374 spec->shutup = alc269_shutup; in patch_alc269()
10375 spec->init_hook = alc269_fill_coef; in patch_alc269()
10381 spec->codec_variant = ALC269_TYPE_ALC280; in patch_alc269()
10384 spec->codec_variant = ALC269_TYPE_ALC282; in patch_alc269()
10385 spec->shutup = alc282_shutup; in patch_alc269()
10386 spec->init_hook = alc282_init; in patch_alc269()
10390 spec->codec_variant = ALC269_TYPE_ALC283; in patch_alc269()
10391 spec->shutup = alc283_shutup; in patch_alc269()
10392 spec->init_hook = alc283_init; in patch_alc269()
10396 spec->codec_variant = ALC269_TYPE_ALC284; in patch_alc269()
10399 spec->codec_variant = ALC269_TYPE_ALC293; in patch_alc269()
10403 spec->codec_variant = ALC269_TYPE_ALC286; in patch_alc269()
10406 spec->codec_variant = ALC269_TYPE_ALC298; in patch_alc269()
10410 spec->codec_variant = ALC269_TYPE_ALC255; in patch_alc269()
10411 spec->shutup = alc256_shutup; in patch_alc269()
10412 spec->init_hook = alc256_init; in patch_alc269()
10418 spec->codec_variant = ALC269_TYPE_ALC256; in patch_alc269()
10419 spec->shutup = alc256_shutup; in patch_alc269()
10420 spec->init_hook = alc256_init; in patch_alc269()
10421 spec->gen.mixer_nid = 0; /* ALC256 does not have any loopback mixer path */ in patch_alc269()
10424 spec->codec_variant = ALC269_TYPE_ALC257; in patch_alc269()
10425 spec->shutup = alc256_shutup; in patch_alc269()
10426 spec->init_hook = alc256_init; in patch_alc269()
10427 spec->gen.mixer_nid = 0; in patch_alc269()
10434 spec->codec_variant = ALC269_TYPE_ALC245; in patch_alc269()
10436 spec->codec_variant = ALC269_TYPE_ALC215; in patch_alc269()
10437 spec->shutup = alc225_shutup; in patch_alc269()
10438 spec->init_hook = alc225_init; in patch_alc269()
10439 spec->gen.mixer_nid = 0; in patch_alc269()
10444 spec->codec_variant = ALC269_TYPE_ALC225; in patch_alc269()
10445 spec->shutup = alc225_shutup; in patch_alc269()
10446 spec->init_hook = alc225_init; in patch_alc269()
10447 spec->gen.mixer_nid = 0; /* no loopback on ALC225, ALC295 and ALC299 */ in patch_alc269()
10450 spec->codec_variant = ALC269_TYPE_ALC287; in patch_alc269()
10451 spec->shutup = alc225_shutup; in patch_alc269()
10452 spec->init_hook = alc225_init; in patch_alc269()
10453 spec->gen.mixer_nid = 0; /* no loopback on ALC287 */ in patch_alc269()
10458 spec->codec_variant = ALC269_TYPE_ALC294; in patch_alc269()
10459 spec->gen.mixer_nid = 0; /* ALC2x4 does not have any loopback mixer path */ in patch_alc269()
10461 spec->init_hook = alc294_init; in patch_alc269()
10464 spec->codec_variant = ALC269_TYPE_ALC300; in patch_alc269()
10465 spec->gen.mixer_nid = 0; /* no loopback on ALC300 */ in patch_alc269()
10468 spec->codec_variant = ALC269_TYPE_ALC623; in patch_alc269()
10474 spec->codec_variant = ALC269_TYPE_ALC700; in patch_alc269()
10475 spec->gen.mixer_nid = 0; /* ALC700 does not have any loopback mixer path */ in patch_alc269()
10477 spec->init_hook = alc294_init; in patch_alc269()
10483 spec->has_alc5505_dsp = 1; in patch_alc269()
10484 spec->init_hook = alc5505_dsp_init; in patch_alc269()
10495 if (codec->fixup_id == ALC282_FIXUP_ASUS_TX300 && in patch_alc269()
10496 codec->core.vendor_id == 0x10ec0294) { in patch_alc269()
10498 codec->fixup_id = HDA_FIXUP_ID_NOT_SET; in patch_alc269()
10510 spec->gen.beep_nid = 0x01; in patch_alc269()
10517 if (!spec->gen.no_analog && spec->gen.beep_nid && spec->gen.mixer_nid) { in patch_alc269()
10518 err = set_beep_amp(spec, spec->gen.mixer_nid, 0x04, HDA_INPUT); in patch_alc269()
10556 struct alc_spec *spec = codec->spec; in alc861_fixup_asus_amp_vref_0f()
10566 spec->gen.keep_vref_in_automute = 1; in alc861_fixup_asus_amp_vref_0f()
10569 /* suppress the jack-detection */
10574 codec->no_jack_detect = 1; in alc_fixup_no_jack_detect()
10634 spec = codec->spec; in patch_alc861()
10636 spec->gen.beep_nid = 0x23; in patch_alc861()
10639 spec->power_hook = alc_power_eapd; in patch_alc861()
10652 if (!spec->gen.no_analog) { in patch_alc861()
10668 * ALC861-VD support
10700 struct alc_spec *spec = codec->spec; in alc660vd_fixup_asus_gpio1()
10703 spec->gpio_mask |= 0x02; in alc660vd_fixup_asus_gpio1()
10720 SND_PCI_QUIRK(0x1043, 0x1339, "ASUS A7-K", ALC660VD_FIX_ASUS_GPIO1),
10721 SND_PCI_QUIRK(0x1179, 0xff31, "Toshiba L30-149", ALC861VD_FIX_DALLAS),
10736 spec = codec->spec; in patch_alc861vd()
10738 spec->gen.beep_nid = 0x23; in patch_alc861vd()
10740 spec->shutup = alc_eapd_shutup; in patch_alc861vd()
10752 if (!spec->gen.no_analog) { in patch_alc861vd()
10773 * 6-channel independent captures.
10775 * In addition, an independent DAC for the multi-playback (not used in this
10790 if (codec->core.vendor_id == 0x10ec0272 || codec->core.vendor_id == 0x10ec0663 || in alc662_parse_auto_config()
10791 codec->core.vendor_id == 0x10ec0665 || codec->core.vendor_id == 0x10ec0670 || in alc662_parse_auto_config()
10792 codec->core.vendor_id == 0x10ec0671) in alc662_parse_auto_config()
10813 { .channels = 2,
10826 struct alc_spec *spec = codec->spec; in alc_fixup_bass_chmap()
10827 spec->gen.pcm_rec[0]->stream[0].chmap = asus_pcm_2_1_chmaps; in alc_fixup_bass_chmap()
10836 struct alc_spec *spec = codec->spec; in gpio_led_power_filter()
10837 if (nid == codec->core.afg && power_state == AC_PWRST_D3 && spec->gpio_data) in gpio_led_power_filter()
10845 struct alc_spec *spec = codec->spec; in alc662_fixup_led_gpio1()
10849 spec->mute_led_polarity = 1; in alc662_fixup_led_gpio1()
10850 codec->power_filter = gpio_led_power_filter; in alc662_fixup_led_gpio1()
10857 struct alc_spec *spec = codec->spec; in alc662_usi_automute_hook()
10862 vref = spec->gen.hp_jack_present ? PIN_VREF80 : 0; in alc662_usi_automute_hook()
10871 struct alc_spec *spec = codec->spec; in alc662_fixup_usi_headset_mic()
10873 spec->parse_flags |= HDA_PINCFG_HEADSET_MIC; in alc662_fixup_usi_headset_mic()
10874 spec->gen.hp_automute_hook = alc662_usi_automute_hook; in alc662_fixup_usi_headset_mic()
10884 * 0x15 - front left/front right in alc662_aspire_ethos_mute_speakers()
10885 * 0x18 - front center/ LFE in alc662_aspire_ethos_mute_speakers()
10922 struct alc_spec *spec = codec->spec; in alc671_fixup_hp_headset_mic2()
10932 spec->gen.mixer_nid = 0; in alc671_fixup_hp_headset_mic2()
10933 spec->parse_flags |= HDA_PINCFG_HEADSET_MIC; in alc671_fixup_hp_headset_mic2()
10945 struct alc_spec *spec = codec->spec; in alc897_hp_automute_hook()
10949 vref = spec->gen.hp_jack_present ? (PIN_HP | AC_PINCTL_VREF_100) : PIN_HP; in alc897_hp_automute_hook()
10957 struct alc_spec *spec = codec->spec; in alc897_fixup_lenovo_headset_mic()
10959 spec->gen.hp_automute_hook = alc897_hp_automute_hook; in alc897_fixup_lenovo_headset_mic()
11081 {0x19, 0x90a7013f}, /* int-mic */
11117 { 0x19, 0x99a3092f }, /* int-mic */
11129 { 0x19, 0x99a3092f }, /* int-mic */
11142 { 0x19, 0x99a3094f }, /* int-mic */
11155 { 0x19, 0x99a3094f }, /* int-mic */
11169 { 0x19, 0x99a3094f }, /* int-mic */
11181 { 0x19, 0x99a3094f }, /* int-mic */
11194 { 0x19, 0x99a3094f }, /* int-mic */
11206 { 0x12, 0x99a30970 }, /* int-mic */
11484 SND_PCI_QUIRK(0x1025, 0x123c, "Acer Nitro N50-600", ALC662_FIXUP_ACER_NITRO_HEADSET_MODE),
11488 SND_PCI_QUIRK(0x1028, 0x05fe, "Dell XPS 15", ALC668_FIXUP_DELL_XPS13),
11489 SND_PCI_QUIRK(0x1028, 0x060a, "Dell XPS 13", ALC668_FIXUP_DELL_XPS13),
11596 {.id = ALC662_FIXUP_HP_RP5800, .name = "hp-rp5800"},
11597 {.id = ALC662_FIXUP_ASUS_MODE1, .name = "asus-mode1"},
11598 {.id = ALC662_FIXUP_ASUS_MODE2, .name = "asus-mode2"},
11599 {.id = ALC662_FIXUP_ASUS_MODE3, .name = "asus-mode3"},
11600 {.id = ALC662_FIXUP_ASUS_MODE4, .name = "asus-mode4"},
11601 {.id = ALC662_FIXUP_ASUS_MODE5, .name = "asus-mode5"},
11602 {.id = ALC662_FIXUP_ASUS_MODE6, .name = "asus-mode6"},
11603 {.id = ALC662_FIXUP_ASUS_MODE7, .name = "asus-mode7"},
11604 {.id = ALC662_FIXUP_ASUS_MODE8, .name = "asus-mode8"},
11605 {.id = ALC662_FIXUP_ZOTAC_Z68, .name = "zotac-z68"},
11606 {.id = ALC662_FIXUP_INV_DMIC, .name = "inv-dmic"},
11607 {.id = ALC662_FIXUP_DELL_MIC_NO_PRESENCE, .name = "alc662-headset-multi"},
11608 {.id = ALC668_FIXUP_DELL_MIC_NO_PRESENCE, .name = "dell-headset-multi"},
11609 {.id = ALC662_FIXUP_HEADSET_MODE, .name = "alc662-headset"},
11610 {.id = ALC668_FIXUP_HEADSET_MODE, .name = "alc668-headset"},
11614 {.id = ALC668_FIXUP_DELL_XPS13, .name = "dell-xps13"},
11615 {.id = ALC662_FIXUP_ASUS_Nx50, .name = "asus-nx50"},
11616 {.id = ALC668_FIXUP_ASUS_Nx51, .name = "asus-nx51"},
11617 {.id = ALC668_FIXUP_ASUS_G751, .name = "asus-g751"},
11618 {.id = ALC891_FIXUP_HEADSET_MODE, .name = "alc891-headset"},
11619 {.id = ALC891_FIXUP_DELL_MIC_NO_PRESENCE, .name = "alc891-headset-multi"},
11620 {.id = ALC662_FIXUP_ACER_VERITON, .name = "acer-veriton"},
11621 {.id = ALC892_FIXUP_ASROCK_MOBO, .name = "asrock-mobo"},
11622 {.id = ALC662_FIXUP_USI_HEADSET_MODE, .name = "usi-headset"},
11623 {.id = ALC662_FIXUP_LENOVO_MULTI_CODECS, .name = "dual-codecs"},
11624 {.id = ALC669_FIXUP_ACER_ASPIRE_ETHOS, .name = "aspire-ethos"},
11663 SND_HDA_PIN_QUIRK(0x10ec0668, 0x1028, "Dell XPS 15", ALC668_FIXUP_AUTO_MUTE,
11698 spec = codec->spec; in patch_alc662()
11700 spec->shutup = alc_eapd_shutup; in patch_alc662()
11703 spec->parse_flags = HDA_PINCFG_NO_HP_FIXUP; in patch_alc662()
11707 switch (codec->core.vendor_id) { in patch_alc662()
11709 spec->init_hook = alc668_restore_default_value; in patch_alc662()
11723 spec->gen.beep_nid = 0x01; in patch_alc662()
11726 codec->bus->pci && codec->bus->pci->subsystem_vendor == 0x1025 && in patch_alc662()
11727 spec->cdefine.platform_type == 1) { in patch_alc662()
11738 if (!spec->gen.no_analog && spec->gen.beep_nid) { in patch_alc662()
11739 switch (codec->core.vendor_id) { in patch_alc662()
11781 /* ALC680 has no aa-loopback mixer */ in patch_alc680()
11843 HDA_CODEC_ENTRY(0x10ec0660, "ALC660-VD", patch_alc861vd),
11845 HDA_CODEC_ENTRY(0x10ec0862, "ALC861-VD", patch_alc861vd),
11884 MODULE_DESCRIPTION("Realtek HD-audio codec");