Lines Matching +full:headset +full:- +full:detect

1 // SPDX-License-Identifier: GPL-2.0-or-later
38 /* extra amp-initialization sequence types */
147 struct alc_spec *spec = codec->spec; in coef_mutex_lock()
150 mutex_lock(&spec->coef_mutex); in coef_mutex_lock()
155 struct alc_spec *spec = codec->spec; in coef_mutex_unlock()
157 mutex_unlock(&spec->coef_mutex); in coef_mutex_unlock()
209 if (val != -1) in __alc_update_coefex_idx()
229 struct alc_spec *spec = codec->spec; in alc_get_coef0()
231 if (!spec->coef0) in alc_get_coef0()
232 spec->coef0 = alc_read_coef_idx(codec, 0); in alc_get_coef0()
233 return spec->coef0; in alc_get_coef0()
246 #define WRITE_COEFEX(_nid, _idx, _val) UPDATE_COEFEX(_nid, _idx, -1, _val)
254 for (; fw->nid; fw++) { in alc_process_coef_fw()
255 if (fw->mask == (unsigned short)-1) in alc_process_coef_fw()
256 __alc_write_coefex_idx(codec, fw->nid, fw->idx, fw->val); in alc_process_coef_fw()
258 __alc_update_coefex_idx(codec, fw->nid, fw->idx, in alc_process_coef_fw()
259 fw->mask, fw->val); in alc_process_coef_fw()
271 struct alc_spec *spec = codec->spec; in alc_setup_gpio()
273 spec->gpio_mask |= mask; in alc_setup_gpio()
274 spec->gpio_dir |= mask; in alc_setup_gpio()
275 spec->gpio_data |= mask; in alc_setup_gpio()
280 struct alc_spec *spec = codec->spec; in alc_write_gpio_data()
283 spec->gpio_data); in alc_write_gpio_data()
289 struct alc_spec *spec = codec->spec; in alc_update_gpio_data()
290 unsigned int oldval = spec->gpio_data; in alc_update_gpio_data()
293 spec->gpio_data |= mask; in alc_update_gpio_data()
295 spec->gpio_data &= ~mask; in alc_update_gpio_data()
296 if (oldval != spec->gpio_data) in alc_update_gpio_data()
302 struct alc_spec *spec = codec->spec; in alc_write_gpio()
304 if (!spec->gpio_mask) in alc_write_gpio()
307 snd_hda_codec_write(codec, codec->core.afg, 0, in alc_write_gpio()
308 AC_VERB_SET_GPIO_MASK, spec->gpio_mask); in alc_write_gpio()
309 snd_hda_codec_write(codec, codec->core.afg, 0, in alc_write_gpio()
310 AC_VERB_SET_GPIO_DIRECTION, spec->gpio_dir); in alc_write_gpio()
311 if (spec->gpio_write_delay) in alc_write_gpio()
361 struct alc_spec *spec = codec->spec; in alc_fix_pll()
363 if (spec->pll_nid) in alc_fix_pll()
364 alc_update_coefex_idx(codec, spec->pll_nid, spec->pll_coef_idx, in alc_fix_pll()
365 1 << spec->pll_coef_bit, 0); in alc_fix_pll()
371 struct alc_spec *spec = codec->spec; in alc_fix_pll_init()
372 spec->pll_nid = nid; in alc_fix_pll_init()
373 spec->pll_coef_idx = coef_idx; in alc_fix_pll_init()
374 spec->pll_coef_bit = coef_bit; in alc_fix_pll_init()
378 /* update the master volume per volume-knob's unsol event */
392 val = snd_hda_codec_read(codec, jack->nid, 0, in alc_update_knob_master()
395 uctl->value.integer.value[0] = val; in alc_update_knob_master()
396 uctl->value.integer.value[1] = val; in alc_update_knob_master()
397 kctl->put(kctl, uctl); in alc_update_knob_master()
415 switch (codec->core.vendor_id) { in alc_fill_eapd_coef()
530 /* alc888-VA */ in alc888_coef_init()
532 /* alc888-VB */ in alc888_coef_init()
572 if (codec->bus->shutdown) in alc_headset_mic_no_shutup()
575 snd_array_for_each(&codec->init_pins, i, pin) { in alc_headset_mic_no_shutup()
577 if (pin->nid != mic_pin) in alc_headset_mic_no_shutup()
578 snd_hda_codec_read(codec, pin->nid, 0, in alc_headset_mic_no_shutup()
582 codec->pins_shutup = 1; in alc_headset_mic_no_shutup()
587 struct alc_spec *spec = codec->spec; in alc_shutup_pins()
589 switch (codec->core.vendor_id) { in alc_shutup_pins()
604 if (!spec->no_shutup_pins) in alc_shutup_pins()
611 * just turning off EAPD and a little pause for avoiding pop-noise
615 struct alc_spec *spec = codec->spec; in alc_eapd_shutup()
618 if (!spec->no_depop_delay) in alc_eapd_shutup()
630 switch (codec->core.vendor_id) { in alc_auto_init_amp()
651 if (spec->gen.autocfg.hp_pins[0]) in alc_get_hp_pin()
652 return spec->gen.autocfg.hp_pins[0]; in alc_get_hp_pin()
653 if (spec->gen.autocfg.line_out_type == AC_JACK_HP_OUT) in alc_get_hp_pin()
654 return spec->gen.autocfg.line_out_pins[0]; in alc_get_hp_pin()
662 /* Could be any non-zero and even value. When used as fixup, tells
670 struct alc_spec *spec = codec->spec; in alc_fixup_sku_ignore()
672 spec->cdefine.fixup = 1; in alc_fixup_sku_ignore()
673 spec->cdefine.sku_cfg = ALC_FIXUP_SKU_IGNORE; in alc_fixup_sku_ignore()
680 struct alc_spec *spec = codec->spec; in alc_fixup_no_depop_delay()
683 spec->no_depop_delay = 1; in alc_fixup_no_depop_delay()
684 codec->depop_delay = 0; in alc_fixup_no_depop_delay()
692 struct alc_spec *spec = codec->spec; in alc_auto_parse_customize_define()
694 spec->cdefine.enable_pcbeep = 1; /* assume always enabled */ in alc_auto_parse_customize_define()
696 if (spec->cdefine.fixup) { in alc_auto_parse_customize_define()
697 ass = spec->cdefine.sku_cfg; in alc_auto_parse_customize_define()
699 return -1; in alc_auto_parse_customize_define()
703 if (!codec->bus->pci) in alc_auto_parse_customize_define()
704 return -1; in alc_auto_parse_customize_define()
705 ass = codec->core.subsystem_id & 0xffff; in alc_auto_parse_customize_define()
706 if (ass != codec->bus->pci->subsystem_device && (ass & 1)) in alc_auto_parse_customize_define()
710 if (codec->core.vendor_id == 0x10ec0260) in alc_auto_parse_customize_define()
716 codec->core.chip_name, ass); in alc_auto_parse_customize_define()
717 return -1; in alc_auto_parse_customize_define()
727 return -1; in alc_auto_parse_customize_define()
729 spec->cdefine.port_connectivity = ass >> 30; in alc_auto_parse_customize_define()
730 spec->cdefine.enable_pcbeep = (ass & 0x100000) >> 20; in alc_auto_parse_customize_define()
731 spec->cdefine.check_sum = (ass >> 16) & 0xf; in alc_auto_parse_customize_define()
732 spec->cdefine.customization = ass >> 8; in alc_auto_parse_customize_define()
734 spec->cdefine.sku_cfg = ass; in alc_auto_parse_customize_define()
735 spec->cdefine.external_amp = (ass & 0x38) >> 3; in alc_auto_parse_customize_define()
736 spec->cdefine.platform_type = (ass & 0x4) >> 2; in alc_auto_parse_customize_define()
737 spec->cdefine.swap = (ass & 0x2) >> 1; in alc_auto_parse_customize_define()
738 spec->cdefine.override = ass & 0x1; in alc_auto_parse_customize_define()
741 nid, spec->cdefine.sku_cfg); in alc_auto_parse_customize_define()
743 spec->cdefine.port_connectivity); in alc_auto_parse_customize_define()
744 codec_dbg(codec, "SKU: enable_pcbeep=0x%x\n", spec->cdefine.enable_pcbeep); in alc_auto_parse_customize_define()
745 codec_dbg(codec, "SKU: check_sum=0x%08x\n", spec->cdefine.check_sum); in alc_auto_parse_customize_define()
746 codec_dbg(codec, "SKU: customization=0x%08x\n", spec->cdefine.customization); in alc_auto_parse_customize_define()
747 codec_dbg(codec, "SKU: external_amp=0x%x\n", spec->cdefine.external_amp); in alc_auto_parse_customize_define()
748 codec_dbg(codec, "SKU: platform_type=0x%x\n", spec->cdefine.platform_type); in alc_auto_parse_customize_define()
749 codec_dbg(codec, "SKU: swap=0x%x\n", spec->cdefine.swap); in alc_auto_parse_customize_define()
750 codec_dbg(codec, "SKU: override=0x%x\n", spec->cdefine.override); in alc_auto_parse_customize_define()
755 /* return the position of NID in the list, or -1 if not found */
762 return -1; in find_idx_in_nid_list()
770 /* check subsystem ID and set up device-specific initialization;
773 /* 32-bit subsystem ID for BIOS loading in HD Audio codec.
777 * port-A --> pin 39/41, port-E --> pin 14/15, port-D --> pin 35/36
783 struct alc_spec *spec = codec->spec; in alc_subsystem_id()
785 if (spec->cdefine.fixup) { in alc_subsystem_id()
786 ass = spec->cdefine.sku_cfg; in alc_subsystem_id()
792 ass = codec->core.subsystem_id & 0xffff; in alc_subsystem_id()
793 if (codec->bus->pci && in alc_subsystem_id()
794 ass != codec->bus->pci->subsystem_device && (ass & 1)) in alc_subsystem_id()
807 if (codec->core.vendor_id == 0x10ec0260) in alc_subsystem_id()
828 ass & 0xffff, codec->core.vendor_id); in alc_subsystem_id()
832 * 2 : 0 --> Desktop, 1 --> Laptop in alc_subsystem_id()
837 if (spec->init_amp == ALC_INIT_UNDEFINED) { in alc_subsystem_id()
850 spec->init_amp = ALC_INIT_DEFAULT; in alc_subsystem_id()
862 * 12~11: Headphone out -> 00: PortA, 01: PortE, 02: PortD, 03: Resvered in alc_subsystem_id()
864 * 15 : 1 --> enable the function "Mute internal speaker in alc_subsystem_id()
871 if (found_in_nid_list(nid, spec->gen.autocfg.line_out_pins, in alc_subsystem_id()
872 spec->gen.autocfg.line_outs)) in alc_subsystem_id()
874 spec->gen.autocfg.hp_pins[0] = nid; in alc_subsystem_id()
879 /* Check the validity of ALC subsystem-id
880 * ports contains an array of 4 pin NIDs for port-A, E, D and I */
884 struct alc_spec *spec = codec->spec; in alc_ssid_check()
885 if (spec->init_amp == ALC_INIT_UNDEFINED) { in alc_ssid_check()
888 spec->init_amp = ALC_INIT_DEFAULT; in alc_ssid_check()
893 /* inverted digital-mic */
897 struct alc_spec *spec = codec->spec; in alc_fixup_inv_dmic()
899 spec->gen.inv_dmic_split = 1; in alc_fixup_inv_dmic()
926 ((codec)->core.dev.power.power_state.event == PM_EVENT_RESUME)
928 ((codec)->core.dev.power.power_state.event == PM_EVENT_RESTORE)
930 ((codec)->core.dev.power.power_state.event == PM_EVENT_FREEZE)
934 struct alc_spec *spec = codec->spec; in alc_init()
940 if (spec->init_hook) in alc_init()
941 spec->init_hook(codec); in alc_init()
943 spec->gen.skip_verbs = 1; /* applied in below */ in alc_init()
946 alc_auto_init_amp(codec, spec->init_amp); in alc_init()
959 struct alc_spec *spec = codec->spec; in alc_free()
962 hda_component_manager_free(&spec->comps, &comp_master_ops); in alc_free()
969 struct alc_spec *spec = codec->spec; in alc_shutup()
974 if (spec && spec->shutup) in alc_shutup()
975 spec->shutup(codec); in alc_shutup()
987 struct alc_spec *spec = codec->spec; in alc_suspend()
989 if (spec && spec->power_hook) in alc_suspend()
990 spec->power_hook(codec); in alc_suspend()
996 struct alc_spec *spec = codec->spec; in alc_resume()
998 if (!spec->no_depop_delay) in alc_resume()
1000 codec->patch_ops.init(codec); in alc_resume()
1050 { 0x10ec0887, 0x00f0, 0x0030, "ALC887-VD" },
1051 { 0x10ec0888, 0x00f0, 0x0030, "ALC888-VD" },
1096 for (p = rename_tbl; p->vendor_id; p++) { in alc_codec_rename_from_preset()
1097 if (p->vendor_id != codec->core.vendor_id) in alc_codec_rename_from_preset()
1099 if ((alc_get_coef0(codec) & p->coef_mask) == p->coef_bits) in alc_codec_rename_from_preset()
1100 return alc_codec_rename(codec, p->name); in alc_codec_rename_from_preset()
1103 if (!codec->bus->pci) in alc_codec_rename_from_preset()
1105 for (q = rename_pci_tbl; q->codec_vendor_id; q++) { in alc_codec_rename_from_preset()
1106 if (q->codec_vendor_id != codec->core.vendor_id) in alc_codec_rename_from_preset()
1108 if (q->pci_subvendor != codec->bus->pci->subsystem_vendor) in alc_codec_rename_from_preset()
1110 if (!q->pci_subdevice || in alc_codec_rename_from_preset()
1111 q->pci_subdevice == codec->bus->pci->subsystem_device) in alc_codec_rename_from_preset()
1112 return alc_codec_rename(codec, q->name); in alc_codec_rename_from_preset()
1120 * Digital-beep handlers
1139 knew = snd_hda_gen_add_kctl(&spec->gen, NULL, in set_beep_amp()
1142 return -ENOMEM; in set_beep_amp()
1143 knew->private_value = beep_amp; in set_beep_amp()
1156 SND_PCI_QUIRK(0x1458, 0xa002, "GA-MA790X", 1),
1158 /* denylist -- no beep available */
1166 struct alc_spec *spec = codec->spec; in has_cdefine_beep()
1168 q = snd_pci_quirk_lookup(codec->bus->pci, beep_allow_list); in has_cdefine_beep()
1170 return q->value; in has_cdefine_beep()
1171 return spec->cdefine.enable_pcbeep; in has_cdefine_beep()
1186 struct alc_spec *spec = codec->spec; in alc_parse_auto_config()
1187 struct auto_pin_cfg *cfg = &spec->gen.autocfg; in alc_parse_auto_config()
1191 spec->parse_flags); in alc_parse_auto_config()
1212 return -ENOMEM; in alc_alloc_spec()
1213 codec->spec = spec; in alc_alloc_spec()
1214 snd_hda_gen_spec_init(&spec->gen); in alc_alloc_spec()
1215 spec->gen.mixer_nid = mixer_nid; in alc_alloc_spec()
1216 spec->gen.own_eapd_ctl = 1; in alc_alloc_spec()
1217 codec->single_adc_amp = 1; in alc_alloc_spec()
1219 codec->spdif_status_reset = 1; in alc_alloc_spec()
1220 codec->forced_resume = 1; in alc_alloc_spec()
1221 codec->patch_ops = alc_patch_ops; in alc_alloc_spec()
1222 mutex_init(&spec->coef_mutex); in alc_alloc_spec()
1240 * ALC880 fix-ups
1270 /* enable the volume-knob widget support on NID 0x21 */
1311 { 0x1a, 0x0181344f }, /* line-in */
1359 { 0x19, 0x01a19950 }, /* mic-in */
1379 { 0x19, 0x01a19950 }, /* mic-in */
1419 { 0x18, 0x01a19950 }, /* mic-in */
1421 { 0x1a, 0x01813031 }, /* line-in */
1452 { 0x14, 0x01014010 }, /* line-out */
1456 { 0x18, 0x01a19c30 }, /* mic-in */
1458 { 0x1a, 0x01813031 }, /* line-in */
1459 { 0x1b, 0x02a19c40 }, /* front-mic */
1492 { 0x18, 0x01a19c30 }, /* mic-in */
1494 { 0x1a, 0x01813031 }, /* line-in */
1495 { 0x1b, 0x02a19c40 }, /* front-mic */
1528 { 0x18, 0x01a19c30 }, /* mic-in */
1529 { 0x19, 0x02a19c40 }, /* front-mic */
1530 { 0x1a, 0x01813031 }, /* line-in */
1560 { 0x1b, 0x0121401f }, /* HP with jack detect */
1594 * It's not quite sure whether BIOS sets the correct pin-config table
1619 SND_PCI_QUIRK(0x1695, 0x4012, "EPox EP-5LDA", ALC880_FIXUP_5ST_DIG),
1634 SND_PCI_QUIRK(0xa0a0, 0x0560, "AOpen i915GMm-HFS", ALC880_FIXUP_5ST_DIG),
1641 {.id = ALC880_FIXUP_3ST_DIG, .name = "3stack-digout"},
1643 {.id = ALC880_FIXUP_5ST_DIG, .name = "5stack-digout"},
1645 {.id = ALC880_FIXUP_6ST_DIG, .name = "6stack-digout"},
1646 {.id = ALC880_FIXUP_6ST_AUTOMUTE, .name = "6stack-automute"},
1663 spec = codec->spec; in patch_alc880()
1664 spec->gen.need_dac_fix = 1; in patch_alc880()
1665 spec->gen.beep_nid = 0x01; in patch_alc880()
1667 codec->patch_ops.unsol_event = alc880_unsol_event; in patch_alc880()
1680 if (!spec->gen.no_analog) { in patch_alc880()
1725 struct alc_spec *spec = codec->spec; in alc260_gpio1_automute()
1727 alc_update_gpio_data(codec, 0x01, spec->gen.hp_jack_present); in alc260_gpio1_automute()
1733 struct alc_spec *spec = codec->spec; in alc260_fixup_gpio1_toggle()
1738 spec->gen.automute_hook = alc260_gpio1_automute; in alc260_fixup_gpio1_toggle()
1739 spec->gen.detect_hp = 1; in alc260_fixup_gpio1_toggle()
1740 spec->gen.automute_speaker = 1; in alc260_fixup_gpio1_toggle()
1741 spec->gen.autocfg.hp_pins[0] = 0x0f; /* copy it for automute */ in alc260_fixup_gpio1_toggle()
1751 struct alc_spec *spec = codec->spec; in alc260_fixup_kn1()
1771 spec->init_amp = ALC_INIT_NONE; in alc260_fixup_kn1()
1779 struct alc_spec *spec = codec->spec; in alc260_fixup_fsc_s7020()
1781 spec->init_amp = ALC_INIT_NONE; in alc260_fixup_fsc_s7020()
1787 struct alc_spec *spec = codec->spec; in alc260_fixup_fsc_s7020_jwse()
1789 spec->gen.add_jack_modes = 1; in alc260_fixup_fsc_s7020_jwse()
1790 spec->gen.hp_mic = 1; in alc260_fixup_fsc_s7020_jwse()
1897 {.id = ALC260_FIXUP_FSC_S7020_JWSE, .name = "fujitsu-jwse"},
1912 spec = codec->spec; in patch_alc260()
1917 spec->gen.prefer_hp_amp = 1; in patch_alc260()
1918 spec->gen.beep_nid = 0x01; in patch_alc260()
1920 spec->shutup = alc_eapd_shutup; in patch_alc260()
1933 if (!spec->gen.no_analog) { in patch_alc260()
1955 * 6-channel independent captures.
1957 * In addition, an independent DAC for the multi-playback (not used in this
2021 struct alc_spec *spec = codec->spec; in alc885_fixup_macpro_gpio()
2023 spec->gpio_write_delay = true; in alc885_fixup_macpro_gpio()
2057 struct alc_spec *spec = codec->spec; in alc889_fixup_mbp_vref()
2069 spec->gen.keep_vref_in_automute = 1; in alc889_fixup_mbp_vref()
2077 struct alc_spec *spec = codec->spec; in alc889_fixup_mac_pins()
2086 spec->gen.keep_vref_in_automute = 1; in alc889_fixup_mac_pins()
2121 * all-in-one desktop PCs (for example VGC-LN51JGB) through DAC 0x05
2126 struct alc_spec *spec = codec->spec; in alc882_fixup_no_primary_hp()
2128 spec->gen.no_primary_hp = 1; in alc882_fixup_no_primary_hp()
2129 spec->gen.no_multi_io = 1; in alc882_fixup_no_primary_hp()
2136 /* For dual-codec configuration, we need to disable some features to avoid
2142 struct alc_spec *spec = codec->spec; in alc_fixup_dual_codecs()
2147 spec->gen.suppress_vmaster = 1; in alc_fixup_dual_codecs()
2148 /* auto-mute and auto-mic switch don't work with multiple codecs */ in alc_fixup_dual_codecs()
2149 spec->gen.suppress_auto_mute = 1; in alc_fixup_dual_codecs()
2150 spec->gen.suppress_auto_mic = 1; in alc_fixup_dual_codecs()
2152 spec->gen.mixer_nid = 0; in alc_fixup_dual_codecs()
2154 codec->force_pin_prefix = 1; in alc_fixup_dual_codecs()
2164 snd_ctl_rename(codec->card, kctl, newname); in rename_ctl()
2175 strcpy(codec->card->longname, "HDAudio-Gigabyte-ALC1220DualCodecs"); in alc1220_fixup_gb_dual_codecs()
2180 codec->addr == 0 ? in alc1220_fixup_gb_dual_codecs()
2181 "Rear-Panel Capture Volume" : in alc1220_fixup_gb_dual_codecs()
2182 "Front-Panel Capture Volume"); in alc1220_fixup_gb_dual_codecs()
2184 codec->addr == 0 ? in alc1220_fixup_gb_dual_codecs()
2185 "Rear-Panel Capture Switch" : in alc1220_fixup_gb_dual_codecs()
2186 "Front-Panel Capture Switch"); in alc1220_fixup_gb_dual_codecs()
2246 struct alc_spec *spec = codec->spec; in alc887_asus_hp_automute_hook()
2251 if (spec->gen.hp_jack_present) in alc887_asus_hp_automute_hook()
2261 struct alc_spec *spec = codec->spec; in alc887_fixup_asus_jack()
2265 spec->gen.hp_automute_hook = alc887_asus_hp_automute_hook; in alc887_fixup_asus_jack()
2314 { 0x1b, 0x02214120 }, /* Front HP jack is flaky, disable jack detect */
2419 /* setting bits 1-5 disables DAC nids 0x02-0x06
2532 { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */
2541 { 0x15, 0x02a14150 }, /* use as headset mic, without its own jack detect */
2563 { 0x18, PIN_VREF100 }, /* headset mic */
2587 SND_PCI_QUIRK(0x1025, 0x0155, "Packard-Bell M5120", ALC882_FIXUP_PB_M5210),
2604 SND_PCI_QUIRK(0x1043, 0x8797, "ASUS TUF B550M-PLUS", ALCS1200A_FIXUP_MIC_VREF),
2605 SND_PCI_QUIRK(0x104d, 0x9043, "Sony Vaio VGC-LN51JGB", ALC882_FIXUP_NO_PRIMARY_HP),
2637 SND_PCI_QUIRK(0x13fe, 0x1009, "Advantech MIT-W101", ALC886_FIXUP_EAPD),
2638 SND_PCI_QUIRK(0x1458, 0xa002, "Gigabyte EP45-DS3/Z87X-UD3H", ALC889_FIXUP_FRONT_HP_NO_PRESENCE),
2639 SND_PCI_QUIRK(0x1458, 0xa0b8, "Gigabyte AZ370-Gaming", ALC1220_FIXUP_GB_DUAL_CODECS),
2643 SND_PCI_QUIRK(0x1462, 0x11f7, "MSI-GE63", ALC1220_FIXUP_CLEVO_P950),
2644 SND_PCI_QUIRK(0x1462, 0x1228, "MSI-GP63", ALC1220_FIXUP_CLEVO_P950),
2645 SND_PCI_QUIRK(0x1462, 0x1229, "MSI-GP73", ALC1220_FIXUP_CLEVO_P950),
2646 SND_PCI_QUIRK(0x1462, 0x1275, "MSI-GL63", ALC1220_FIXUP_CLEVO_P950),
2647 SND_PCI_QUIRK(0x1462, 0x1276, "MSI-GL73", ALC1220_FIXUP_CLEVO_P950),
2648 SND_PCI_QUIRK(0x1462, 0x1293, "MSI-GP65", ALC1220_FIXUP_CLEVO_P950),
2649 SND_PCI_QUIRK(0x1462, 0x7350, "MSI-7350", ALC889_FIXUP_CD),
2651 SND_PCI_QUIRK(0x1462, 0xda57, "MSI Z270-Gaming", ALC1220_FIXUP_GB_DUAL_CODECS),
2653 SND_PCI_QUIRK(0x147b, 0x107a, "Abit AW9D-MAX", ALC882_FIXUP_ABIT_AW9D_MAX),
2659 SND_PCI_QUIRK(0x1558, 0x65e5, "Clevo PC50D[PRS](?:-D|-G)?", ALC1220_FIXUP_CLEVO_PB51ED_PINS),
2663 SND_PCI_QUIRK(0x1558, 0x66a6, "Clevo PE60SN[CDE]-[GS]", ALC1220_FIXUP_CLEVO_PB51ED_PINS),
2666 SND_PCI_QUIRK(0x1558, 0x67e5, "Clevo PC70D[PRS](?:-D|-G)?", ALC1220_FIXUP_CLEVO_PB51ED_PINS),
2671 SND_PCI_QUIRK(0x1558, 0x7715, "Clevo X170KM-G", ALC1220_FIXUP_CLEVO_PB51ED),
2681 SND_PCI_QUIRK(0x1558, 0x96e1, "Clevo P960[ER][CDFN]-K", ALC1220_FIXUP_CLEVO_P950),
2683 SND_PCI_QUIRK(0x1558, 0x97e2, "Clevo P970RC-M", ALC1220_FIXUP_CLEVO_P950),
2693 {.id = ALC882_FIXUP_ABIT_AW9D_MAX, .name = "abit-aw9d"},
2694 {.id = ALC882_FIXUP_LENOVO_Y530, .name = "lenovo-y530"},
2695 {.id = ALC882_FIXUP_ACER_ASPIRE_7736, .name = "acer-aspire-7736"},
2696 {.id = ALC882_FIXUP_ASUS_W90V, .name = "asus-w90v"},
2698 {.id = ALC889_FIXUP_FRONT_HP_NO_PRESENCE, .name = "no-front-hp"},
2699 {.id = ALC889_FIXUP_VAIO_TT, .name = "vaio-tt"},
2701 {.id = ALC882_FIXUP_EAPD, .name = "alc882-eapd"},
2702 {.id = ALC883_FIXUP_EAPD, .name = "alc883-eapd"},
2706 {.id = ALC889_FIXUP_COEF, .name = "alc889-coef"},
2707 {.id = ALC882_FIXUP_ASUS_W2JC, .name = "asus-w2jc"},
2708 {.id = ALC882_FIXUP_ACER_ASPIRE_4930G, .name = "acer-aspire-4930g"},
2709 {.id = ALC882_FIXUP_ACER_ASPIRE_8930G, .name = "acer-aspire-8930g"},
2710 {.id = ALC883_FIXUP_ACER_EAPD, .name = "acer-aspire"},
2711 {.id = ALC885_FIXUP_MACPRO_GPIO, .name = "macpro-gpio"},
2712 {.id = ALC889_FIXUP_DAC_ROUTE, .name = "dac-route"},
2713 {.id = ALC889_FIXUP_MBP_VREF, .name = "mbp-vref"},
2714 {.id = ALC889_FIXUP_IMAC91_VREF, .name = "imac91-vref"},
2715 {.id = ALC889_FIXUP_MBA11_VREF, .name = "mba11-vref"},
2716 {.id = ALC889_FIXUP_MBA21_VREF, .name = "mba21-vref"},
2717 {.id = ALC889_FIXUP_MP11_VREF, .name = "mp11-vref"},
2718 {.id = ALC889_FIXUP_MP41_VREF, .name = "mp41-vref"},
2719 {.id = ALC882_FIXUP_INV_DMIC, .name = "inv-dmic"},
2720 {.id = ALC882_FIXUP_NO_PRIMARY_HP, .name = "no-primary-hp"},
2721 {.id = ALC887_FIXUP_ASUS_BASS, .name = "asus-bass"},
2722 {.id = ALC1220_FIXUP_GB_DUAL_CODECS, .name = "dual-codecs"},
2723 {.id = ALC1220_FIXUP_GB_X570, .name = "gb-x570"},
2724 {.id = ALC1220_FIXUP_CLEVO_P950, .name = "clevo-p950"},
2738 SND_HDA_PIN_QUIRK(0x10ec1220, 0x1462, "MS-7C35", ALC1220_FIXUP_CLEVO_P950,
2772 spec = codec->spec; in patch_alc882()
2774 switch (codec->core.vendor_id) { in patch_alc882()
2797 spec->gen.beep_nid = 0x01; in patch_alc882()
2804 if (!spec->gen.no_analog && spec->gen.beep_nid) { in patch_alc882()
2922 SND_PCI_QUIRK(0x17ff, 0x058d, "Benq T31-16", ALC262_FIXUP_BENQ_T31),
2928 {.id = ALC262_FIXUP_INV_DMIC, .name = "inv-dmic"},
2929 {.id = ALC262_FIXUP_FSC_H270, .name = "fsc-h270"},
2930 {.id = ALC262_FIXUP_FSC_S7110, .name = "fsc-s7110"},
2931 {.id = ALC262_FIXUP_HP_Z200, .name = "hp-z200"},
2933 {.id = ALC262_FIXUP_LENOVO_3000, .name = "lenovo-3000"},
2935 {.id = ALC262_FIXUP_BENQ_T31, .name = "benq-t31"},
2951 spec = codec->spec; in patch_alc262()
2952 spec->gen.shared_mic_vref_pin = 0x18; in patch_alc262()
2954 spec->shutup = alc_eapd_shutup; in patch_alc262()
2958 * under-run in patch_alc262()
2973 spec->gen.beep_nid = 0x01; in patch_alc262()
2980 if (!spec->gen.no_analog && spec->gen.beep_nid) { in patch_alc262()
3006 mutex_lock(&codec->control_mutex); in alc268_beep_switch_put()
3007 pval = kcontrol->private_value; in alc268_beep_switch_put()
3008 kcontrol->private_value = (pval & ~0xff) | 0x0f; in alc268_beep_switch_put()
3011 kcontrol->private_value = (pval & ~0xff) | 0x10; in alc268_beep_switch_put()
3014 kcontrol->private_value = pval; in alc268_beep_switch_put()
3015 mutex_unlock(&codec->control_mutex); in alc268_beep_switch_put()
3068 {.id = ALC268_FIXUP_INV_DMIC, .name = "inv-dmic"},
3069 {.id = ALC268_FIXUP_HP_EAPD, .name = "hp-eapd"},
3100 /* ALC268 has no aa-loopback mixer */ in patch_alc268()
3105 spec = codec->spec; in patch_alc268()
3107 spec->gen.beep_nid = 0x01; in patch_alc268()
3109 spec->shutup = alc_eapd_shutup; in patch_alc268()
3121 if (err > 0 && !spec->gen.no_analog && in patch_alc268()
3122 spec->gen.autocfg.speaker_pins[0] != 0x1d) { in patch_alc268()
3124 if (!snd_hda_gen_add_kctl(&spec->gen, NULL, in patch_alc268()
3126 err = -ENOMEM; in patch_alc268()
3161 /* different alc269-variants */
3195 struct alc_spec *spec = codec->spec; in alc269_parse_auto_config()
3198 switch (spec->codec_variant) { in alc269_parse_auto_config()
3246 if (jack->unsol_res & (7 << 13)) in alc_headset_btn_callback()
3249 if (jack->unsol_res & (1 << 16 | 3 << 8)) in alc_headset_btn_callback()
3253 if (jack->unsol_res & (7 << 23)) in alc_headset_btn_callback()
3257 if (jack->unsol_res & (7 << 10)) in alc_headset_btn_callback()
3260 snd_hda_jack_set_button_state(codec, jack->nid, report); in alc_headset_btn_callback()
3265 struct alc_spec *spec = codec->spec; in alc_disable_headset_jack_key()
3267 if (!spec->has_hs_key) in alc_disable_headset_jack_key()
3270 switch (codec->core.vendor_id) { in alc_disable_headset_jack_key()
3295 struct alc_spec *spec = codec->spec; in alc_enable_headset_jack_key()
3297 if (!spec->has_hs_key) in alc_enable_headset_jack_key()
3300 switch (codec->core.vendor_id) { in alc_enable_headset_jack_key()
3326 struct alc_spec *spec = codec->spec; in alc_fixup_headset_jack()
3331 spec->has_hs_key = 1; in alc_fixup_headset_jack()
3340 snd_hda_jack_add_kctl(codec, 0x55, "Headset Jack", in alc_fixup_headset_jack()
3356 struct alc_spec *spec = codec->spec; in alc269_shutup()
3358 if (spec->codec_variant == ALC269_TYPE_ALC269VB) in alc269_shutup()
3360 if (spec->codec_variant == ALC269_TYPE_ALC269VB && in alc269_shutup()
3407 struct alc_spec *spec = codec->spec; in alc282_init()
3444 struct alc_spec *spec = codec->spec; in alc282_shutup()
3467 if (!spec->no_shutup_pins) in alc282_shutup()
3523 struct alc_spec *spec = codec->spec; in alc283_init()
3551 /* 3k pull low control for Headset jack. */ in alc283_init()
3559 struct alc_spec *spec = codec->spec; in alc283_shutup()
3581 if (!spec->no_shutup_pins) in alc283_shutup()
3596 struct alc_spec *spec = codec->spec; in alc256_init()
3600 if (spec->ultra_low_power) { in alc256_init()
3637 * Documentation/sound/hd-audio/realtek-pc-beep.rst for details of in alc256_init()
3645 struct alc_spec *spec = codec->spec; in alc256_shutup()
3663 /* 3k pull low control for Headset jack. */ in alc256_shutup()
3666 * when booting with headset plugged. So skip setting it for the codec alc257 in alc256_shutup()
3668 if (spec->en_3kpull_low) in alc256_shutup()
3671 if (!spec->no_shutup_pins) in alc256_shutup()
3680 if (spec->ultra_low_power) { in alc256_shutup()
3693 struct alc_spec *spec = codec->spec; in alc285_hp_init()
3743 struct alc_spec *spec = codec->spec; in alc225_init()
3747 if (spec->ultra_low_power) { in alc225_init()
3754 if (spec->codec_variant != ALC269_TYPE_ALC287 && in alc225_init()
3755 spec->codec_variant != ALC269_TYPE_ALC245) in alc225_init()
3757 if (!spec->done_hp_init || in alc225_init()
3761 spec->done_hp_init = true; in alc225_init()
3798 struct alc_spec *spec = codec->spec; in alc225_shutup()
3810 /* 3k pull low control for Headset jack. */ in alc225_shutup()
3836 if (spec->ultra_low_power) { in alc225_shutup()
3848 struct alc_spec *spec = codec->spec; in alc222_init()
3884 struct alc_spec *spec = codec->spec; in alc222_shutup()
3921 struct alc_spec *spec = codec->spec; in alc_default_init()
3948 struct alc_spec *spec = codec->spec; in alc_default_shutup()
3967 if (!spec->no_shutup_pins) in alc_default_shutup()
3979 struct alc_spec *spec = codec->spec; in alc294_hp_init()
3991 if (!spec->no_shutup_pins) in alc294_hp_init()
4011 struct alc_spec *spec = codec->spec; in alc294_init()
4014 if (!spec->done_hp_init || in alc294_init()
4015 codec->core.dev.power.power_state.event == PM_EVENT_RESTORE) { in alc294_init()
4017 spec->done_hp_init = true; in alc294_init()
4116 struct alc_spec *spec = codec->spec; in alc269_suspend()
4118 if (spec->has_alc5505_dsp) in alc269_suspend()
4126 struct alc_spec *spec = codec->spec; in alc269_resume()
4128 if (spec->codec_variant == ALC269_TYPE_ALC269VB) in alc269_resume()
4130 if (spec->codec_variant == ALC269_TYPE_ALC269VB && in alc269_resume()
4135 codec->patch_ops.init(codec); in alc269_resume()
4137 if (spec->codec_variant == ALC269_TYPE_ALC269VB) in alc269_resume()
4139 if (spec->codec_variant == ALC269_TYPE_ALC269VB && in alc269_resume()
4151 if (spec->gpio_data) in alc269_resume()
4154 if (spec->has_alc5505_dsp) in alc269_resume()
4163 struct alc_spec *spec = codec->spec; in alc269_fixup_pincfg_no_hp_to_lineout()
4166 spec->parse_flags = HDA_PINCFG_NO_HP_FIXUP; in alc269_fixup_pincfg_no_hp_to_lineout()
4192 struct alc_spec *spec = codec->spec; in alc269_fixup_headset_mic()
4195 spec->parse_flags |= HDA_PINCFG_HEADSET_MIC; in alc269_fixup_headset_mic()
4208 if (strcmp(codec->core.chip_name, "ALC271X") && in alc271_fixup_dmic()
4209 strcmp(codec->core.chip_name, "ALC269VB")) in alc271_fixup_dmic()
4228 struct alc_spec *spec = codec->spec; in alc269_fixup_pcm_44k()
4236 spec->gen.stream_analog_playback = &alc269_44k_pcm_analog_playback; in alc269_fixup_pcm_44k()
4237 spec->gen.stream_analog_capture = &alc269_44k_pcm_analog_capture; in alc269_fixup_pcm_44k()
4243 /* The digital-mic unit sends PDM (differential signal) instead of in alc269_fixup_stereo_dmic()
4263 struct alc_spec *spec = codec->spec; in alc269_fixup_quanta_mute()
4266 spec->gen.automute_hook = alc269_quanta_automute; in alc269_fixup_quanta_mute()
4272 struct alc_spec *spec = codec->spec; in alc269_x101_hp_automute_hook()
4277 vref = spec->gen.hp_jack_present ? PIN_VREF80 : 0; in alc269_x101_hp_automute_hook()
4306 alc_write_coef_idx(codec, 0x23, initval->value_0x23); in alc298_huawei_mbx_stereo_seq()
4308 if (initval->value_0x23 != 0x1e) in alc298_huawei_mbx_stereo_seq()
4309 alc_write_coef_idx(codec, 0x25, initval->value_0x25); in alc298_huawei_mbx_stereo_seq()
4348 for (seq = dac_init; seq->value_0x23; seq++) in alc298_fixup_huawei_mbx_stereo()
4355 struct alc_spec *spec = codec->spec; in alc269_fixup_x101_headset_mic()
4357 spec->parse_flags |= HDA_PINCFG_HEADSET_MIC; in alc269_fixup_x101_headset_mic()
4358 spec->gen.hp_automute_hook = alc269_x101_hp_automute_hook; in alc269_fixup_x101_headset_mic()
4380 /* update mute-LED according to the speaker mute state via mic VREF pin */
4384 struct hda_codec *codec = dev_to_hda_codec(led_cdev->dev->parent); in vref_mute_led_set()
4385 struct alc_spec *spec = codec->spec; in vref_mute_led_set()
4387 alc_update_vref_led(codec, spec->mute_led_nid, in vref_mute_led_set()
4388 spec->mute_led_polarity, brightness); in vref_mute_led_set()
4397 struct alc_spec *spec = codec->spec; in led_power_filter()
4400 (nid != spec->mute_led_nid && nid != spec->cap_mute_led_nid)) in led_power_filter()
4413 struct alc_spec *spec = codec->spec; in alc269_fixup_hp_mute_led()
4421 if (sscanf(dev->name, "HP_Mute_LED_%d_%x", &pol, &pin) != 2) in alc269_fixup_hp_mute_led()
4425 spec->mute_led_polarity = pol; in alc269_fixup_hp_mute_led()
4426 spec->mute_led_nid = pin - 0x0a + 0x18; in alc269_fixup_hp_mute_led()
4428 codec->power_filter = led_power_filter; in alc269_fixup_hp_mute_led()
4430 "Detected mute LED for %x:%d\n", spec->mute_led_nid, in alc269_fixup_hp_mute_led()
4431 spec->mute_led_polarity); in alc269_fixup_hp_mute_led()
4440 struct alc_spec *spec = codec->spec; in alc269_fixup_hp_mute_led_micx()
4443 spec->mute_led_polarity = 0; in alc269_fixup_hp_mute_led_micx()
4444 spec->mute_led_nid = pin; in alc269_fixup_hp_mute_led_micx()
4446 codec->power_filter = led_power_filter; in alc269_fixup_hp_mute_led_micx()
4474 alc_update_gpio_data(codec, mask, !enabled); /* muted -> LED on */ in alc_update_gpio_led()
4481 struct hda_codec *codec = dev_to_hda_codec(led_cdev->dev->parent); in gpio_mute_led_set()
4482 struct alc_spec *spec = codec->spec; in gpio_mute_led_set()
4484 alc_update_gpio_led(codec, spec->gpio_mute_led_mask, in gpio_mute_led_set()
4485 spec->mute_led_polarity, !brightness); in gpio_mute_led_set()
4489 /* turn on/off mic-mute LED via GPIO per capture hook */
4493 struct hda_codec *codec = dev_to_hda_codec(led_cdev->dev->parent); in micmute_led_set()
4494 struct alc_spec *spec = codec->spec; in micmute_led_set()
4496 alc_update_gpio_led(codec, spec->gpio_mic_led_mask, in micmute_led_set()
4497 spec->micmute_led_polarity, !brightness); in micmute_led_set()
4501 /* setup mute and mic-mute GPIO bits, add hooks appropriately */
4507 struct alc_spec *spec = codec->spec; in alc_fixup_hp_gpio_led()
4514 spec->gpio_mute_led_mask = mute_mask; in alc_fixup_hp_gpio_led()
4518 spec->gpio_mic_led_mask = micmute_mask; in alc_fixup_hp_gpio_led()
4556 struct alc_spec *spec = codec->spec; in alc245_fixup_hp_gpio_led()
4559 spec->micmute_led_polarity = 1; in alc245_fixup_hp_gpio_led()
4563 /* turn on/off mic-mute LED per capture hook via VREF change */
4567 struct hda_codec *codec = dev_to_hda_codec(led_cdev->dev->parent); in vref_micmute_led_set()
4568 struct alc_spec *spec = codec->spec; in vref_micmute_led_set()
4570 alc_update_vref_led(codec, spec->cap_mute_led_nid, in vref_micmute_led_set()
4571 spec->micmute_led_polarity, brightness); in vref_micmute_led_set()
4578 struct alc_spec *spec = codec->spec; in alc269_fixup_hp_gpio_mic1_led()
4585 spec->gpio_mask |= 0x10; in alc269_fixup_hp_gpio_mic1_led()
4586 spec->gpio_dir |= 0x10; in alc269_fixup_hp_gpio_mic1_led()
4587 spec->cap_mute_led_nid = 0x18; in alc269_fixup_hp_gpio_mic1_led()
4589 codec->power_filter = led_power_filter; in alc269_fixup_hp_gpio_mic1_led()
4596 struct alc_spec *spec = codec->spec; in alc280_fixup_hp_gpio4()
4600 spec->cap_mute_led_nid = 0x18; in alc280_fixup_hp_gpio4()
4602 codec->power_filter = led_power_filter; in alc280_fixup_hp_gpio4()
4612 struct alc_spec *spec = codec->spec; in alc245_fixup_hp_x360_amp()
4616 spec->gpio_mask |= 0x01; in alc245_fixup_hp_x360_amp()
4617 spec->gpio_dir |= 0x01; in alc245_fixup_hp_x360_amp()
4648 struct alc_spec *spec = codec->spec; in alc274_fixup_hp_envy_gpio()
4651 spec->gpio_mask |= 0x04; in alc274_fixup_hp_envy_gpio()
4652 spec->gpio_dir |= 0x04; in alc274_fixup_hp_envy_gpio()
4653 spec->gen.pcm_playback_hook = alc274_hp_envy_pcm_hook; in alc274_fixup_hp_envy_gpio()
4664 alc_update_coef_idx(codec, led->idx, led->mask, in alc_update_coef_led()
4665 on ? led->on : led->off); in alc_update_coef_led()
4668 /* update mute-LED according to the speaker mute state via COEF bit */
4672 struct hda_codec *codec = dev_to_hda_codec(led_cdev->dev->parent); in coef_mute_led_set()
4673 struct alc_spec *spec = codec->spec; in coef_mute_led_set()
4675 alc_update_coef_led(codec, &spec->mute_led_coef, in coef_mute_led_set()
4676 spec->mute_led_polarity, brightness); in coef_mute_led_set()
4684 struct alc_spec *spec = codec->spec; in alc285_fixup_hp_mute_led_coefbit()
4687 spec->mute_led_polarity = 0; in alc285_fixup_hp_mute_led_coefbit()
4688 spec->mute_led_coef.idx = 0x0b; in alc285_fixup_hp_mute_led_coefbit()
4689 spec->mute_led_coef.mask = 1 << 3; in alc285_fixup_hp_mute_led_coefbit()
4690 spec->mute_led_coef.on = 1 << 3; in alc285_fixup_hp_mute_led_coefbit()
4691 spec->mute_led_coef.off = 0; in alc285_fixup_hp_mute_led_coefbit()
4700 struct alc_spec *spec = codec->spec; in alc236_fixup_hp_mute_led_coefbit()
4703 spec->mute_led_polarity = 0; in alc236_fixup_hp_mute_led_coefbit()
4704 spec->mute_led_coef.idx = 0x34; in alc236_fixup_hp_mute_led_coefbit()
4705 spec->mute_led_coef.mask = 1 << 5; in alc236_fixup_hp_mute_led_coefbit()
4706 spec->mute_led_coef.on = 0; in alc236_fixup_hp_mute_led_coefbit()
4707 spec->mute_led_coef.off = 1 << 5; in alc236_fixup_hp_mute_led_coefbit()
4715 struct alc_spec *spec = codec->spec; in alc236_fixup_hp_mute_led_coefbit2()
4718 spec->mute_led_polarity = 0; in alc236_fixup_hp_mute_led_coefbit2()
4719 spec->mute_led_coef.idx = 0x07; in alc236_fixup_hp_mute_led_coefbit2()
4720 spec->mute_led_coef.mask = 1; in alc236_fixup_hp_mute_led_coefbit2()
4721 spec->mute_led_coef.on = 1; in alc236_fixup_hp_mute_led_coefbit2()
4722 spec->mute_led_coef.off = 0; in alc236_fixup_hp_mute_led_coefbit2()
4731 struct alc_spec *spec = codec->spec; in alc245_fixup_hp_mute_led_coefbit()
4734 spec->mute_led_polarity = 0; in alc245_fixup_hp_mute_led_coefbit()
4735 spec->mute_led_coef.idx = 0x0b; in alc245_fixup_hp_mute_led_coefbit()
4736 spec->mute_led_coef.mask = 3 << 2; in alc245_fixup_hp_mute_led_coefbit()
4737 spec->mute_led_coef.on = 2 << 2; in alc245_fixup_hp_mute_led_coefbit()
4738 spec->mute_led_coef.off = 1 << 2; in alc245_fixup_hp_mute_led_coefbit()
4743 /* turn on/off mic-mute LED per capture hook by coef bit */
4747 struct hda_codec *codec = dev_to_hda_codec(led_cdev->dev->parent); in coef_micmute_led_set()
4748 struct alc_spec *spec = codec->spec; in coef_micmute_led_set()
4750 alc_update_coef_led(codec, &spec->mic_led_coef, in coef_micmute_led_set()
4751 spec->micmute_led_polarity, brightness); in coef_micmute_led_set()
4758 struct alc_spec *spec = codec->spec; in alc285_fixup_hp_coef_micmute_led()
4761 spec->mic_led_coef.idx = 0x19; in alc285_fixup_hp_coef_micmute_led()
4762 spec->mic_led_coef.mask = 1 << 13; in alc285_fixup_hp_coef_micmute_led()
4763 spec->mic_led_coef.on = 1 << 13; in alc285_fixup_hp_coef_micmute_led()
4764 spec->mic_led_coef.off = 0; in alc285_fixup_hp_coef_micmute_led()
4772 struct alc_spec *spec = codec->spec; in alc285_fixup_hp_gpio_micmute_led()
4775 spec->micmute_led_polarity = 1; in alc285_fixup_hp_gpio_micmute_led()
4782 struct alc_spec *spec = codec->spec; in alc236_fixup_hp_coef_micmute_led()
4785 spec->mic_led_coef.idx = 0x35; in alc236_fixup_hp_coef_micmute_led()
4786 spec->mic_led_coef.mask = 3 << 2; in alc236_fixup_hp_coef_micmute_led()
4787 spec->mic_led_coef.on = 2 << 2; in alc236_fixup_hp_coef_micmute_led()
4788 spec->mic_led_coef.off = 1 << 2; in alc236_fixup_hp_coef_micmute_led()
4796 struct alc_spec *spec = codec->spec; in alc295_fixup_hp_mute_led_coefbit11()
4799 spec->mute_led_polarity = 0; in alc295_fixup_hp_mute_led_coefbit11()
4800 spec->mute_led_coef.idx = 0xb; in alc295_fixup_hp_mute_led_coefbit11()
4801 spec->mute_led_coef.mask = 3 << 3; in alc295_fixup_hp_mute_led_coefbit11()
4802 spec->mute_led_coef.on = 1 << 3; in alc295_fixup_hp_mute_led_coefbit11()
4803 spec->mute_led_coef.off = 1 << 4; in alc295_fixup_hp_mute_led_coefbit11()
4832 struct alc_spec *spec = codec->spec; in alc236_fixup_hp_micmute_led_vref()
4835 spec->cap_mute_led_nid = 0x1a; in alc236_fixup_hp_micmute_led_vref()
4837 codec->power_filter = led_power_filter; in alc236_fixup_hp_micmute_led_vref()
4932 struct alc_spec *spec = codec->spec; in alc298_samsung_v2_enable_amps()
4938 for (i = 0; i < spec->num_speaker_amps; i++) { in alc298_samsung_v2_enable_amps()
4949 struct alc_spec *spec = codec->spec; in alc298_samsung_v2_disable_amps()
4955 for (i = 0; i < spec->num_speaker_amps; i++) { in alc298_samsung_v2_disable_amps()
4979 struct alc_spec *spec = codec->spec; in alc298_samsung_v2_init_amps()
4983 spec->num_speaker_amps = num_speaker_amps; in alc298_samsung_v2_init_amps()
4989 for (i = 0; i < spec->num_speaker_amps; i++) { in alc298_samsung_v2_init_amps()
5001 spec->gen.pcm_playback_hook = alc298_samsung_v2_playback_hook; in alc298_samsung_v2_init_amps()
5021 struct alc_spec *spec = codec->spec; in gpio2_mic_hotkey_event()
5025 input_report_key(spec->kb_dev, spec->alc_mute_keycode_map[ALC_KEY_MICMUTE_INDEX], 1); in gpio2_mic_hotkey_event()
5026 input_sync(spec->kb_dev); in gpio2_mic_hotkey_event()
5027 input_report_key(spec->kb_dev, spec->alc_mute_keycode_map[ALC_KEY_MICMUTE_INDEX], 0); in gpio2_mic_hotkey_event()
5028 input_sync(spec->kb_dev); in gpio2_mic_hotkey_event()
5033 struct alc_spec *spec = codec->spec; in alc_register_micmute_input_device()
5036 spec->kb_dev = input_allocate_device(); in alc_register_micmute_input_device()
5037 if (!spec->kb_dev) { in alc_register_micmute_input_device()
5039 return -ENOMEM; in alc_register_micmute_input_device()
5042 spec->alc_mute_keycode_map[ALC_KEY_MICMUTE_INDEX] = KEY_MICMUTE; in alc_register_micmute_input_device()
5044 spec->kb_dev->name = "Microphone Mute Button"; in alc_register_micmute_input_device()
5045 spec->kb_dev->evbit[0] = BIT_MASK(EV_KEY); in alc_register_micmute_input_device()
5046 spec->kb_dev->keycodesize = sizeof(spec->alc_mute_keycode_map[0]); in alc_register_micmute_input_device()
5047 spec->kb_dev->keycodemax = ARRAY_SIZE(spec->alc_mute_keycode_map); in alc_register_micmute_input_device()
5048 spec->kb_dev->keycode = spec->alc_mute_keycode_map; in alc_register_micmute_input_device()
5049 for (i = 0; i < ARRAY_SIZE(spec->alc_mute_keycode_map); i++) in alc_register_micmute_input_device()
5050 set_bit(spec->alc_mute_keycode_map[i], spec->kb_dev->keybit); in alc_register_micmute_input_device()
5052 if (input_register_device(spec->kb_dev)) { in alc_register_micmute_input_device()
5054 input_free_device(spec->kb_dev); in alc_register_micmute_input_device()
5055 spec->kb_dev = NULL; in alc_register_micmute_input_device()
5056 return -ENOMEM; in alc_register_micmute_input_device()
5070 struct alc_spec *spec = codec->spec; in alc280_fixup_hp_gpio2_mic_hotkey()
5074 spec->init_amp = ALC_INIT_DEFAULT; in alc280_fixup_hp_gpio2_mic_hotkey()
5078 spec->gpio_mask |= 0x06; in alc280_fixup_hp_gpio2_mic_hotkey()
5079 spec->gpio_dir |= 0x02; in alc280_fixup_hp_gpio2_mic_hotkey()
5080 spec->gpio_data |= 0x02; in alc280_fixup_hp_gpio2_mic_hotkey()
5081 snd_hda_codec_write_cache(codec, codec->core.afg, 0, in alc280_fixup_hp_gpio2_mic_hotkey()
5083 snd_hda_jack_detect_enable_callback(codec, codec->core.afg, in alc280_fixup_hp_gpio2_mic_hotkey()
5088 if (!spec->kb_dev) in alc280_fixup_hp_gpio2_mic_hotkey()
5093 input_unregister_device(spec->kb_dev); in alc280_fixup_hp_gpio2_mic_hotkey()
5094 spec->kb_dev = NULL; in alc280_fixup_hp_gpio2_mic_hotkey()
5104 struct alc_spec *spec = codec->spec; in alc233_fixup_lenovo_line2_mic_hotkey()
5108 spec->init_amp = ALC_INIT_DEFAULT; in alc233_fixup_lenovo_line2_mic_hotkey()
5117 if (!spec->kb_dev) in alc233_fixup_lenovo_line2_mic_hotkey()
5122 input_unregister_device(spec->kb_dev); in alc233_fixup_lenovo_line2_mic_hotkey()
5123 spec->kb_dev = NULL; in alc233_fixup_lenovo_line2_mic_hotkey()
5130 struct alc_spec *spec = codec->spec; in alc269_fixup_hp_line1_mic1_led()
5134 spec->cap_mute_led_nid = 0x18; in alc269_fixup_hp_line1_mic1_led()
5142 struct alc_spec *spec = codec->spec; in alc233_fixup_lenovo_low_en_micmute_led()
5145 spec->micmute_led_polarity = 1; in alc233_fixup_lenovo_low_en_micmute_led()
5186 struct alc_spec *spec = codec->spec; in alc_headset_mode_unplugged()
5236 UPDATE_COEF(0x1a, 1<<3, 1<<3), /* Combo JD gating with LINE1-VREFO */ in alc_headset_mode_unplugged()
5238 UPDATE_COEF(0x4a, 0x000f, 0x000e), /* Combo Jack auto detect */ in alc_headset_mode_unplugged()
5261 if (spec->no_internal_mic_pin) { in alc_headset_mode_unplugged()
5266 switch (codec->core.vendor_id) { in alc_headset_mode_unplugged()
5317 codec_dbg(codec, "Headset jack set to unplugged mode.\n"); in alc_headset_mode_unplugged()
5359 UPDATE_COEF(0x1a, 1<<3, 0), /* Combo JD gating without LINE1-VREFO */ in alc_headset_mode_mic_in()
5381 switch (codec->core.vendor_id) { in alc_headset_mode_mic_in()
5457 codec_dbg(codec, "Headset jack set to mic-in mode.\n"); in alc_headset_mode_mic_in()
5507 UPDATE_COEF(0x4a, 0x000f, 0x000e), /* Combo Jack auto detect */ in alc_headset_mode_default()
5509 UPDATE_COEF(0x1a, 1<<3, 0), /* Combo JD gating without LINE1-VREFO */ in alc_headset_mode_default()
5526 switch (codec->core.vendor_id) { in alc_headset_mode_default()
5577 codec_dbg(codec, "Headset jack set to headphone (default) mode.\n"); in alc_headset_mode_default()
5637 switch (codec->core.vendor_id) { in alc_headset_mode_ctia()
5701 codec_dbg(codec, "Headset jack set to iPhone-style headset mode.\n"); in alc_headset_mode_ctia()
5754 switch (codec->core.vendor_id) { in alc_headset_mode_omtp()
5775 alc_update_coef_idx(codec, 0x8e, 0x0070, 0x0010);/* Headset output enable */ in alc_headset_mode_omtp()
5804 codec_dbg(codec, "Headset jack set to Nokia-style headset mode.\n"); in alc_headset_mode_omtp()
5811 struct alc_spec *spec = codec->spec; in alc_determine_headset_type()
5831 UPDATE_COEF(0x4a, 0x000f, 0x0008), /* Combo Jack auto detect */ in alc_determine_headset_type()
5850 if (spec->no_internal_mic_pin) { in alc_determine_headset_type()
5855 switch (codec->core.vendor_id) { in alc_determine_headset_type()
5996 codec_dbg(codec, "Headset jack detected iPhone-style headset: %s\n", in alc_determine_headset_type()
5998 spec->current_headset_type = is_ctia ? ALC_HEADSET_TYPE_CTIA : ALC_HEADSET_TYPE_OMTP; in alc_determine_headset_type()
6003 struct alc_spec *spec = codec->spec; in alc_update_headset_mode()
6005 hda_nid_t mux_pin = spec->gen.imux_pins[spec->gen.cur_mux[0]]; in alc_update_headset_mode()
6012 else if (mux_pin == spec->headset_mic_pin) in alc_update_headset_mode()
6014 else if (mux_pin == spec->headphone_mic_pin) in alc_update_headset_mode()
6019 if (new_headset_mode == spec->current_headset_mode) { in alc_update_headset_mode()
6027 spec->current_headset_mode = ALC_HEADSET_MODE_UNKNOWN; in alc_update_headset_mode()
6028 spec->current_headset_type = ALC_HEADSET_TYPE_UNKNOWN; in alc_update_headset_mode()
6029 spec->gen.hp_jack_present = false; in alc_update_headset_mode()
6032 if (spec->current_headset_type == ALC_HEADSET_TYPE_UNKNOWN) in alc_update_headset_mode()
6034 if (spec->current_headset_type == ALC_HEADSET_TYPE_CTIA) in alc_update_headset_mode()
6036 else if (spec->current_headset_type == ALC_HEADSET_TYPE_OMTP) in alc_update_headset_mode()
6038 spec->gen.hp_jack_present = true; in alc_update_headset_mode()
6041 alc_headset_mode_mic_in(codec, hp_pin, spec->headphone_mic_pin); in alc_update_headset_mode()
6042 spec->gen.hp_jack_present = false; in alc_update_headset_mode()
6046 spec->gen.hp_jack_present = true; in alc_update_headset_mode()
6052 if (spec->headphone_mic_pin && spec->headphone_mic_pin != hp_pin) in alc_update_headset_mode()
6053 snd_hda_set_pin_ctl_cache(codec, spec->headphone_mic_pin, in alc_update_headset_mode()
6056 spec->current_headset_mode = new_headset_mode; in alc_update_headset_mode()
6078 struct alc_spec *spec = codec->spec; in alc_probe_headset_mode()
6079 struct auto_pin_cfg *cfg = &spec->gen.autocfg; in alc_probe_headset_mode()
6082 for (i = 0; i < cfg->num_inputs; i++) { in alc_probe_headset_mode()
6083 if (cfg->inputs[i].is_headset_mic && !spec->headset_mic_pin) in alc_probe_headset_mode()
6084 spec->headset_mic_pin = cfg->inputs[i].pin; in alc_probe_headset_mode()
6085 if (cfg->inputs[i].is_headphone_mic && !spec->headphone_mic_pin) in alc_probe_headset_mode()
6086 spec->headphone_mic_pin = cfg->inputs[i].pin; in alc_probe_headset_mode()
6089 WARN_ON(spec->gen.cap_sync_hook); in alc_probe_headset_mode()
6090 spec->gen.cap_sync_hook = alc_update_headset_mode_hook; in alc_probe_headset_mode()
6091 spec->gen.automute_hook = alc_update_headset_mode; in alc_probe_headset_mode()
6092 spec->gen.hp_automute_hook = alc_update_headset_jack_cb; in alc_probe_headset_mode()
6098 struct alc_spec *spec = codec->spec; in alc_fixup_headset_mode()
6102 spec->parse_flags |= HDA_PINCFG_HEADSET_MIC | HDA_PINCFG_HEADPHONE_MIC; in alc_fixup_headset_mode()
6109 spec->current_headset_mode = ALC_HEADSET_MODE_UNKNOWN; in alc_fixup_headset_mode()
6110 spec->current_headset_type = ALC_HEADSET_TYPE_UNKNOWN; in alc_fixup_headset_mode()
6121 struct alc_spec *spec = codec->spec; in alc_fixup_headset_mode_no_hp_mic()
6122 spec->parse_flags |= HDA_PINCFG_HEADSET_MIC; in alc_fixup_headset_mode_no_hp_mic()
6147 switch (codec->core.vendor_id) { in alc255_set_default_jack_type()
6174 struct alc_spec *spec = codec->spec; in alc_fixup_headset_mode_alc255_no_hp_mic()
6175 spec->parse_flags |= HDA_PINCFG_HEADSET_MIC; in alc_fixup_headset_mode_alc255_no_hp_mic()
6185 struct alc_spec *spec = codec->spec; in alc288_update_headset_jack_cb()
6188 /* Headset Mic enable or disable, only for Dell Dino */ in alc288_update_headset_jack_cb()
6189 alc_update_gpio_data(codec, 0x40, spec->gen.hp_jack_present); in alc288_update_headset_jack_cb()
6197 struct alc_spec *spec = codec->spec; in alc_fixup_headset_mode_dell_alc288()
6199 spec->gpio_mask |= 0x40; in alc_fixup_headset_mode_dell_alc288()
6200 spec->gpio_dir |= 0x40; in alc_fixup_headset_mode_dell_alc288()
6201 spec->gen.hp_automute_hook = alc288_update_headset_jack_cb; in alc_fixup_headset_mode_dell_alc288()
6209 struct alc_spec *spec = codec->spec; in alc_fixup_auto_mute_via_amp()
6210 spec->gen.auto_mute_via_amp = 1; in alc_fixup_auto_mute_via_amp()
6218 struct alc_spec *spec = codec->spec; in alc_fixup_no_shutup()
6219 spec->no_shutup_pins = 1; in alc_fixup_no_shutup()
6227 struct alc_spec *spec = codec->spec; in alc_fixup_disable_aamix()
6228 /* Disable AA-loopback as it causes white noise */ in alc_fixup_disable_aamix()
6229 spec->gen.mixer_nid = 0; in alc_fixup_disable_aamix()
6242 struct alc_spec *spec = codec->spec; in alc_fixup_tpt440_dock()
6245 spec->parse_flags = HDA_PINCFG_NO_HP_FIXUP; in alc_fixup_tpt440_dock()
6246 codec->power_save_node = 0; /* avoid click noises */ in alc_fixup_tpt440_dock()
6259 struct alc_spec *spec = codec->spec; in alc_fixup_tpt470_dock()
6262 spec->parse_flags = HDA_PINCFG_NO_HP_FIXUP; in alc_fixup_tpt470_dock()
6285 struct alc_spec *spec = codec->spec; in alc_fixup_tpt470_dacs()
6288 spec->gen.preferred_dacs = preferred_pairs; in alc_fixup_tpt470_dacs()
6297 struct alc_spec *spec = codec->spec; in alc295_fixup_asus_dacs()
6300 spec->gen.preferred_dacs = preferred_pairs; in alc295_fixup_asus_dacs()
6305 struct alc_spec *spec = codec->spec; in alc_shutup_dell_xps13()
6317 struct alc_spec *spec = codec->spec; in alc_fixup_dell_xps13()
6318 struct hda_input_mux *imux = &spec->gen.input_mux; in alc_fixup_dell_xps13()
6323 /* mic pin 0x19 must be initialized with Vref Hi-Z, otherwise in alc_fixup_dell_xps13()
6327 spec->shutup = alc_shutup_dell_xps13; in alc_fixup_dell_xps13()
6331 for (i = 0; i < imux->num_items; i++) { in alc_fixup_dell_xps13()
6332 if (spec->gen.imux_pins[i] == 0x12) { in alc_fixup_dell_xps13()
6333 spec->gen.cur_mux[0] = i; in alc_fixup_dell_xps13()
6344 struct alc_spec *spec = codec->spec; in alc_fixup_headset_mode_alc662()
6347 spec->parse_flags |= HDA_PINCFG_HEADSET_MIC; in alc_fixup_headset_mode_alc662()
6348 spec->gen.hp_mic = 1; /* Mic-in is same pin as headphone */ in alc_fixup_headset_mode_alc662()
6350 /* Disable boost for mic-in permanently. (This code is only called in alc_fixup_headset_mode_alc662()
6372 struct alc_spec *spec = codec->spec; in find_ext_mic_pin()
6373 struct auto_pin_cfg *cfg = &spec->gen.autocfg; in find_ext_mic_pin()
6378 for (i = 0; i < cfg->num_inputs; i++) { in find_ext_mic_pin()
6379 if (cfg->inputs[i].type != AUTO_PIN_MIC) in find_ext_mic_pin()
6381 nid = cfg->inputs[i].pin; in find_ext_mic_pin()
6395 struct alc_spec *spec = codec->spec; in alc271_hp_gate_mic_jack()
6411 struct alc_spec *spec = codec->spec; in alc269_fixup_limit_int_mic_boost()
6412 struct auto_pin_cfg *cfg = &spec->gen.autocfg; in alc269_fixup_limit_int_mic_boost()
6422 for (i = 0; i < cfg->num_inputs; i++) { in alc269_fixup_limit_int_mic_boost()
6423 hda_nid_t nid = cfg->inputs[i].pin; in alc269_fixup_limit_int_mic_boost()
6425 if (cfg->inputs[i].type != AUTO_PIN_MIC) in alc269_fixup_limit_int_mic_boost()
6442 struct alc_spec *spec = codec->spec; in alc283_hp_automute_hook()
6448 vref = spec->gen.hp_jack_present ? PIN_VREF80 : 0; in alc283_hp_automute_hook()
6458 struct alc_spec *spec = codec->spec; in alc283_fixup_chromebook()
6463 /* Disable AA-loopback as it causes white noise */ in alc283_fixup_chromebook()
6464 spec->gen.mixer_nid = 0; in alc283_fixup_chromebook()
6467 /* MIC2-VREF control */ in alc283_fixup_chromebook()
6479 struct alc_spec *spec = codec->spec; in alc283_fixup_sense_combo_jack()
6483 spec->gen.hp_automute_hook = alc283_hp_automute_hook; in alc283_fixup_sense_combo_jack()
6486 /* MIC2-VREF control */ in alc283_fixup_sense_combo_jack()
6496 struct alc_spec *spec = codec->spec; in asus_tx300_automute()
6499 spec->gen.mute_bits |= (1ULL << 0x14); in asus_tx300_automute()
6505 struct alc_spec *spec = codec->spec; in alc282_fixup_asus_tx300()
6513 spec->init_amp = ALC_INIT_DEFAULT; in alc282_fixup_asus_tx300()
6517 spec->gen.auto_mute_via_amp = 1; in alc282_fixup_asus_tx300()
6518 spec->gen.automute_hook = asus_tx300_automute; in alc282_fixup_asus_tx300()
6523 spec->init_amp = ALC_INIT_DEFAULT; in alc282_fixup_asus_tx300()
6556 Amp-out capability. we change the speaker's route to: in alc298_fixup_speaker_volume()
6557 Node 0x02 (Audio Output) -> Node 0x0c (Audio Mixer) -> Node 0x17 ( in alc298_fixup_speaker_volume()
6558 Pin Complex), since Node 0x02 has Amp-out caps, we can adjust in alc298_fixup_speaker_volume()
6586 /* disable DAC3 (0x06) selection on NID 0x15 - share Speaker/Bass Speaker DAC 0x03 */
6600 struct alc_spec *spec = codec->spec; in alc280_hp_gpio4_automute_hook()
6604 alc_update_gpio_led(codec, 0x10, spec->mute_led_polarity, in alc280_hp_gpio4_automute_hook()
6605 !spec->gen.hp_jack_present); in alc280_hp_gpio4_automute_hook()
6618 struct alc_spec *spec = codec->spec; in alc280_fixup_hp_9480m()
6623 spec->gpio_mask |= 0x10; in alc280_fixup_hp_9480m()
6624 spec->gpio_dir |= 0x10; in alc280_fixup_hp_9480m()
6625 spec->gen.hp_automute_hook = alc280_hp_gpio4_automute_hook; in alc280_fixup_hp_9480m()
6633 struct alc_spec *spec = codec->spec; in alc275_fixup_gpio4_off()
6636 spec->gpio_mask |= 0x04; in alc275_fixup_gpio4_off()
6637 spec->gpio_dir |= 0x04; in alc275_fixup_gpio4_off()
6644 * DAC1 (NID 0x02) -> Speaker (NID 0x14); some eq applied secretly
6645 * DAC2 (NID 0x03) -> Bass (NID 0x17) & Headphone (NID 0x21); sharing a DAC
6646 * DAC3 (NID 0x06) -> Unused, due to the lack of volume amp
6655 struct alc_spec *spec = codec->spec; in alc285_fixup_thinkpad_x1_gen7()
6660 spec->gen.preferred_dacs = preferred_pairs; in alc285_fixup_thinkpad_x1_gen7()
6683 strcpy(codec->card->longname, "HDAudio-Lenovo-DualCodecs"); in alc233_alc662_fixup_lenovo_dual_codecs()
6688 codec->addr == 0 ? in alc233_alc662_fixup_lenovo_dual_codecs()
6689 "Rear-Panel Capture Volume" : in alc233_alc662_fixup_lenovo_dual_codecs()
6690 "Front-Panel Capture Volume"); in alc233_alc662_fixup_lenovo_dual_codecs()
6692 codec->addr == 0 ? in alc233_alc662_fixup_lenovo_dual_codecs()
6693 "Rear-Panel Capture Switch" : in alc233_alc662_fixup_lenovo_dual_codecs()
6694 "Front-Panel Capture Switch"); in alc233_alc662_fixup_lenovo_dual_codecs()
6705 codec->power_save_node = 1; in alc225_fixup_s3_pop_noise()
6712 struct alc_spec *spec = codec->spec; in alc274_fixup_bind_dacs()
6721 spec->gen.preferred_dacs = preferred_pairs; in alc274_fixup_bind_dacs()
6722 spec->gen.auto_mute_via_amp = 1; in alc274_fixup_bind_dacs()
6723 codec->power_save_node = 0; in alc274_fixup_bind_dacs()
6733 struct alc_spec *spec = codec->spec; in alc289_fixup_asus_ga401()
6736 spec->gen.preferred_dacs = preferred_pairs; in alc289_fixup_asus_ga401()
6751 switch (codec->core.vendor_id) { in alc_combo_jack_hp_jd_restart()
6776 struct alc_spec *spec = codec->spec; in alc295_fixup_chromebook()
6780 spec->ultra_low_power = true; in alc295_fixup_chromebook()
6791 struct alc_spec *spec = codec->spec; in alc256_fixup_chromebook()
6795 spec->gen.suppress_auto_mute = 1; in alc256_fixup_chromebook()
6796 spec->gen.suppress_auto_mic = 1; in alc256_fixup_chromebook()
6797 spec->en_3kpull_low = false; in alc256_fixup_chromebook()
6825 /* Pin 0x21: headphones/headset mic */ in alc294_fixup_gx502_hp()
6895 struct alc_spec *spec = codec->spec; in alc_fixup_no_int_mic()
6901 spec->no_internal_mic_pin = true; in alc_fixup_no_int_mic()
6917 struct alc_spec *spec = codec->spec; in alc285_fixup_hp_spectre_x360_eb1()
6929 spec->micmute_led_polarity = 1; in alc285_fixup_hp_spectre_x360_eb1()
6931 spec->gpio_mask |= 0x01; in alc285_fixup_hp_spectre_x360_eb1()
6932 spec->gpio_dir |= 0x01; in alc285_fixup_hp_spectre_x360_eb1()
6985 { 0x19, 0x03a11040 }, /* Headset microphone */ in alc285_fixup_hp_envy_x360()
6996 /* Fixes no sound from headset speaker */ in alc285_fixup_hp_envy_x360()
6997 snd_hda_codec_amp_stereo(codec, 0x21, HDA_OUTPUT, 0, -1, 0); in alc285_fixup_hp_envy_x360()
6999 /* Auto-enable headset mic when plugged */ in alc285_fixup_hp_envy_x360()
7002 /* Headset mic volume enhancement */ in alc285_fixup_hp_envy_x360()
7010 "B&O-Tuned Playback Volume"); in alc285_fixup_hp_envy_x360()
7038 /* Fixup for Lenovo Legion 15IMHg05 speaker output on headset removal. */
7043 struct alc_spec *spec = codec->spec; in alc287_fixup_legion_15imhg05_speakers()
7047 spec->gen.suppress_auto_mute = 1; in alc287_fixup_legion_15imhg05_speakers()
7055 struct alc_spec *spec = cdc->spec; in comp_acpi_device_notify()
7059 hda_component_acpi_device_notify(&spec->comps, handle, event, data); in comp_acpi_device_notify()
7065 struct alc_spec *spec = cdc->spec; in comp_bind()
7068 ret = hda_component_manager_bind(cdc, &spec->comps); in comp_bind()
7073 &spec->comps, in comp_bind()
7080 struct alc_spec *spec = cdc->spec; in comp_unbind()
7082 hda_component_manager_unbind_acpi_notifications(cdc, &spec->comps, comp_acpi_device_notify); in comp_unbind()
7083 hda_component_manager_unbind(cdc, &spec->comps); in comp_unbind()
7094 struct alc_spec *spec = cdc->spec; in comp_generic_playback_hook()
7096 hda_component_manager_playback_hook(&spec->comps, action); in comp_generic_playback_hook()
7102 struct alc_spec *spec = cdc->spec; in comp_generic_fixup()
7107 ret = hda_component_manager_init(cdc, &spec->comps, count, bus, hid, in comp_generic_fixup()
7112 spec->gen.pcm_playback_hook = comp_generic_playback_hook; in comp_generic_fixup()
7115 hda_component_manager_free(&spec->comps, &comp_master_ops); in comp_generic_fixup()
7129 } acpi_ids[] = {{ "CSC3554", "cs35l54-hda" }, in find_cirrus_companion_amps()
7130 { "CSC3556", "cs35l56-hda" }, in find_cirrus_companion_amps()
7131 { "CSC3557", "cs35l57-hda" }}; in find_cirrus_companion_amps()
7136 adev = acpi_dev_get_first_match_dev(acpi_ids[i].hid, NULL, -1); in find_cirrus_companion_amps()
7168 * When available the cirrus,dev-index property is an accurate in find_cirrus_companion_amps()
7173 count_devindex = fwnode_property_count_u32(fwnode, "cirrus,dev-index"); in find_cirrus_companion_amps()
7177 match = devm_kasprintf(dev, GFP_KERNEL, "-%%s:00-%s.%%d", acpi_ids[i].name); in find_cirrus_companion_amps()
7186 comp_generic_fixup(cdc, action, "i2c", "CSC3551", "-%s:00-cs35l41-hda.%d", 2); in cs35l41_fixup_i2c_two()
7191 comp_generic_fixup(cdc, action, "i2c", "CSC3551", "-%s:00-cs35l41-hda.%d", 4); in cs35l41_fixup_i2c_four()
7196 comp_generic_fixup(codec, action, "spi", "CSC3551", "-%s:00-cs35l41-hda.%d", 2); in cs35l41_fixup_spi_two()
7201 comp_generic_fixup(codec, action, "spi", "CSC3551", "-%s:00-cs35l41-hda.%d", 4); in cs35l41_fixup_spi_four()
7207 comp_generic_fixup(cdc, action, "i2c", "CLSA0100", "-%s:00-cs35l41-hda.%d", 2); in alc287_fixup_legion_16achg6_speakers()
7213 comp_generic_fixup(cdc, action, "i2c", "CLSA0101", "-%s:00-cs35l41-hda.%d", 2); in alc287_fixup_legion_16ithg6_speakers()
7219 * The same SSID has been re-used in different hardware, they have in alc285_fixup_asus_ga403u()
7222 if (cdc->core.vendor_id != 0x10ec0285) in alc285_fixup_asus_ga403u()
7229 comp_generic_fixup(cdc, action, "i2c", "TIAS2781", "-%s:00", 1); in tas2781_fixup_i2c()
7234 comp_generic_fixup(cdc, action, "spi", "TXNW2781", "-%s:00-tas2781-hda.%d", 2); in tas2781_fixup_spi()
7240 comp_generic_fixup(cdc, action, "i2c", "INT8866", "-%s:00", 1); in yoga7_14arb7_fixup_i2c()
7272 * plugged-in state, while the internal microphone is always in an in alc256_fixup_set_coef_defaults()
7308 if (codec->core.vendor_id == 0x10ec0256) { in alc256_fixup_mic_no_presence_and_resume()
7326 nsteps = ((caps & AC_AMPCAP_NUM_STEPS) >> AC_AMPCAP_NUM_STEPS_SHIFT) - 10; in alc256_decrease_headphone_amp_val()
7327 offs = ((caps & AC_AMPCAP_OFFSET) >> AC_AMPCAP_OFFSET_SHIFT) - 10; in alc256_decrease_headphone_amp_val()
7339 struct alc_spec *spec = codec->spec; in alc_fixup_dell4_mic_no_presence_quiet()
7340 struct hda_input_mux *imux = &spec->gen.input_mux; in alc_fixup_dell4_mic_no_presence_quiet()
7348 * Set the vref of pin 0x19 (Headset Mic) and pin 0x1b (Headphone Mic) in alc_fixup_dell4_mic_no_presence_quiet()
7349 * to Hi-Z to avoid pop noises at startup and when plugging and in alc_fixup_dell4_mic_no_presence_quiet()
7360 for (i = 0; i < imux->num_items; i++) { in alc_fixup_dell4_mic_no_presence_quiet()
7361 if (spec->gen.imux_pins[i] == 0x12) { in alc_fixup_dell4_mic_no_presence_quiet()
7362 spec->gen.cur_mux[0] = i; in alc_fixup_dell4_mic_no_presence_quiet()
7396 struct alc_spec *spec = codec->spec; in alc287_fixup_yoga9_14iap7_bass_spk_pin()
7402 spec->gen.preferred_dacs = preferred_pairs; in alc287_fixup_yoga9_14iap7_bass_spk_pin()
7422 struct alc_spec *spec = codec->spec; in alc295_fixup_dell_inspiron_top_speakers()
7430 spec->gen.preferred_dacs = preferred_pairs; in alc295_fixup_dell_inspiron_top_speakers()
7439 struct alc_spec *spec = codec->spec; in alc287_fixup_bind_dacs()
7449 spec->gen.preferred_dacs = preferred_pairs; in alc287_fixup_bind_dacs()
7450 spec->gen.auto_mute_via_amp = 1; in alc287_fixup_bind_dacs()
7451 if (spec->gen.autocfg.speaker_pins[0] != 0x14) { in alc287_fixup_bind_dacs()
7456 /* Fix none verb table of Headset Mic pin */
7460 struct alc_spec *spec = codec->spec; in alc_fixup_headset_mic()
7470 spec->parse_flags |= HDA_PINCFG_HEADSET_MIC; in alc_fixup_headset_mic()
7517 struct alc_spec *spec = codec->spec; in alc245_fixup_hp_spectre_x360_16_aa0xxx()
7532 spec->gpio_mask |= 0x01; in alc245_fixup_hp_spectre_x360_16_aa0xxx()
7533 spec->gpio_dir |= 0x01; in alc245_fixup_hp_spectre_x360_16_aa0xxx()
7578 struct alc_spec *spec = codec->spec; in alc287_fixup_lenovo_thinkpad_with_alc1318()
7590 spec->power_hook = alc287_s4_power_gpio3_default; in alc287_fixup_lenovo_thinkpad_with_alc1318()
7591 spec->gen.pcm_playback_hook = alc287_alc1318_playback_pcm_hook; in alc287_fixup_lenovo_thinkpad_with_alc1318()
7920 if (codec->core.vendor_id == 0x10ec0298) in alc298_fixup_lenovo_c940_duet7()
8032 { 0x1a, 0x2101103f }, /* dock line-out */
8033 { 0x1b, 0x23a11040 }, /* dock mic-in */
8042 { 0x19, 0x01a1903c }, /* headset mic, with jack detect */
8083 { 0x18, 0x03a19020 }, /* headset mic */
8094 { 0x19, 0x99a3092f }, /* int-mic */
8101 { 0x12, 0x99a3092f }, /* int-mic */
8113 { 0x19, 0x99a3092f }, /* int-mic */
8121 { 0x12, 0x99a3092f }, /* int-mic */
8191 { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */
8192 { 0x1a, 0x01a1913d }, /* use as headphone mic, without its own jack detect */
8209 { 0x1a, 0x01a1913c }, /* use as headset mic, without its own jack detect */
8218 { 0x1a, 0x01a1913c }, /* use as headset mic, without its own jack detect */
8227 { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */
8228 { 0x1b, 0x01a1913d }, /* use as headphone mic, without its own jack detect */
8247 { 0x19, 0x01a1913c }, /* headset mic w/o jack detect */
8256 { 0x18, 0x01a1913c }, /* use as headset mic, without its own jack detect */
8304 { 0x18, 0x04a1182c }, /* Headset mic */
8315 { 0x1b, 0x99a7012f }, /* int-mic */
8335 { 0x12, 0x99a3092f }, /* int-mic */
8360 /* class-D output amp +5dB */
8371 { 0x18, 0x01a110f0 }, /* use as headset mic */
8386 { 0x12, 0x99a3092f }, /* int-mic */
8465 { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */
8474 { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */
8483 { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */
8484 { 0x1a, 0x01a1913d }, /* use as headphone mic, without its own jack detect */
8499 { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */
8518 { 0x18, 0x01a1913d }, /* use as headphone mic, without its own jack detect */
8519 { 0x1a, 0x01a1913c }, /* use as headset mic, without its own jack detect */
8583 { 0x1b, 0x21011020 }, /* line-out */
8584 { 0x1a, 0x01a1903c }, /* headset mic */
8585 { 0x18, 0x2181103f }, /* line-in */
8594 { 0x1b, 0x21011020 }, /* line-out */
8595 { 0x18, 0x2181103f }, /* line-in */
8620 { 0x18, 0x01a1913c }, /* use as headset mic, without its own jack detect */
8621 { 0x1a, 0x01a1913d }, /* use as headphone mic, without its own jack detect */
8667 { 0x18, 0x01a1913c }, /* headset mic w/o jack detect */
8676 { 0x18, 0x01a1913c }, /* use as headset mic, without its own jack detect */
8677 { 0x1a, 0x01a1913d }, /* use as headphone mic, without its own jack detect */
8686 { 0x18, 0x01a1913c }, /* use as headset mic, without its own jack detect */
8742 /* Disable pass-through path for FRONT 14h */
8848 { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */
8849 { 0x1a, 0x01813030 }, /* use as headphone mic, without its own jack detect */
8858 { 0x18, 0x01a1913c }, /* use as headset mic, without its own jack detect */
8859 { 0x1a, 0x01a1913d }, /* use as headphone mic, without its own jack detect */
8873 { 0x19, 0x04a11120 }, /* use as headset mic, without its own jack detect */
8887 { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */
8935 { 0x16, 0x0101102f }, /* Rear Headset HP */
8936 { 0x19, 0x02a1913c }, /* use as Front headset mic, without its own jack detect */
8937 { 0x1a, 0x01a19030 }, /* Rear Headset MIC */
9004 { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */
9038 { 0x18, 0x01a1913c }, /* use as headset mic, without its own jack detect */
9048 { 0x19, 0x04a11120 }, /* use as headset mic, without its own jack detect */
9057 { 0x19, 0x01a1103c }, /* use as headset mic */
9089 { 0x1a, 0x01a1913c }, /* use as headset mic, without its own jack detect */
9098 /* Disable PCBEEP-IN passthrough */
9120 { 0x19, 0x01a1913c }, /* use as Front headset mic, without its own jack detect */
9151 { 0x19, 0x03a11020 }, /* headset mic with jack detect */
9160 { 0x19, 0x04a11120 }, /* use as headset mic, without its own jack detect */
9176 { 0x21, 0x90170150 }, /* use as headset mic, without its own jack detect */
9311 /* set 0x15 to HP-OUT ctrl */
9338 /* set 0x15 to HP-OUT ctrl */
9342 /* set 0x1b to HP-OUT */
9368 { 0x1e, 0x90170151 }, /* Rear jack, IN OUT EAPD Detect */
9456 { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */
9466 { 0x18, 0x02a111f0 }, /* use as headset mic, without its own jack detect */
9476 { 0x18, 0x02a11030 }, /* use as headset mic */
9485 { 0x18, 0x01a11130 }, /* use as headset mic, without its own jack detect */
9500 { 0x19, 0x03a11020 }, /* headset mic with jack detect */
9507 { 0x19, 0x02a11120 }, /* use as headset mic, without its own jack detect */
9605 { 0x1b, 0x01a1913c }, /* use as headset mic, without its own jack detect */
9614 { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */
9703 { 0x18, 0x01a1913c }, /* use as headset mic, without its own jack detect */
9718 { 0x19, 0x02a1113c }, /* use as headset mic, without its own jack detect */
9936 { 0x19, 0x03a11120 }, /* use as headset mic, without its own jack detect */
10009 { 0x19, 0x02a1112c }, /* use as headset mic, without its own jack detect */
10236 { 0x19, 0x03a1113c }, /* use as headset mic, without its own jack detect */
10265 SND_PCI_QUIRK(0x1025, 0x072d, "Acer Aspire V5-571G", ALC269_FIXUP_ASPIRE_HEADSET_MIC),
10268 SND_PCI_QUIRK(0x1025, 0x0762, "Acer Aspire E1-472", ALC271_FIXUP_HP_GATE_MIC_JACK_E1_572),
10269 SND_PCI_QUIRK(0x1025, 0x0775, "Acer Aspire E1-572", ALC271_FIXUP_HP_GATE_MIC_JACK_E1_572),
10270 SND_PCI_QUIRK(0x1025, 0x079b, "Acer Aspire V5-573G", ALC282_FIXUP_ASPIRE_V5_PINS),
10271 SND_PCI_QUIRK(0x1025, 0x080d, "Acer Aspire V5-122P", ALC269_FIXUP_ASPIRE_HEADSET_MIC),
10273 SND_PCI_QUIRK(0x1025, 0x100c, "Acer Aspire E5-574G", ALC255_FIXUP_ACER_LIMIT_INT_MIC_BOOST),
10275 SND_PCI_QUIRK(0x1025, 0x102b, "Acer Aspire C24-860", ALC286_FIXUP_ACER_AIO_MIC_NO_PRESENCE),
10276 SND_PCI_QUIRK(0x1025, 0x1065, "Acer Aspire C20-820", ALC269VC_FIXUP_ACER_HEADSET_MIC),
10278 SND_PCI_QUIRK(0x1025, 0x1094, "Acer Aspire E5-575T", ALC255_FIXUP_ACER_LIMIT_INT_MIC_BOOST),
10279 SND_PCI_QUIRK(0x1025, 0x1099, "Acer Aspire E5-523G", ALC255_FIXUP_ACER_MIC_NO_PRESENCE),
10280 SND_PCI_QUIRK(0x1025, 0x110e, "Acer Aspire ES1-432", ALC255_FIXUP_ACER_MIC_NO_PRESENCE),
10283 SND_PCI_QUIRK(0x1025, 0x1177, "Acer Predator G9-593", ALC255_FIXUP_PREDATOR_SUBWOOFER),
10284 SND_PCI_QUIRK(0x1025, 0x1178, "Acer Predator G9-593", ALC255_FIXUP_PREDATOR_SUBWOOFER),
10288 SND_PCI_QUIRK(0x1025, 0x1269, "Acer SWIFT SF314-54", ALC256_FIXUP_ACER_HEADSET_MIC),
10289 SND_PCI_QUIRK(0x1025, 0x126a, "Acer Swift SF114-32", ALC256_FIXUP_ACER_MIC_NO_PRESENCE),
10293 SND_PCI_QUIRK(0x1025, 0x129c, "Acer SWIFT SF314-55", ALC256_FIXUP_ACER_HEADSET_MIC),
10294 SND_PCI_QUIRK(0x1025, 0x129d, "Acer SWIFT SF313-51", ALC256_FIXUP_ACER_MIC_NO_PRESENCE),
10295 SND_PCI_QUIRK(0x1025, 0x1300, "Acer SWIFT SF314-56", ALC256_FIXUP_ACER_MIC_NO_PRESENCE),
10296 SND_PCI_QUIRK(0x1025, 0x1308, "Acer Aspire Z24-890", ALC286_FIXUP_ACER_AIO_HEADSET_MIC),
10297 SND_PCI_QUIRK(0x1025, 0x132a, "Acer TravelMate B114-21", ALC233_FIXUP_ACER_HEADSET_MIC),
10298 SND_PCI_QUIRK(0x1025, 0x1330, "Acer TravelMate X514-51T", ALC255_FIXUP_ACER_HEADSET_MIC),
10300 SND_PCI_QUIRK(0x1025, 0x141f, "Acer Spin SP513-54N", ALC255_FIXUP_ACER_MIC_NO_PRESENCE),
10301 SND_PCI_QUIRK(0x1025, 0x142b, "Acer Swift SF314-42", ALC255_FIXUP_ACER_MIC_NO_PRESENCE),
10302 SND_PCI_QUIRK(0x1025, 0x1430, "Acer TravelMate B311R-31", ALC256_FIXUP_ACER_MIC_NO_PRESENCE),
10303 SND_PCI_QUIRK(0x1025, 0x1466, "Acer Aspire A515-56", ALC255_FIXUP_ACER_HEADPHONE_AND_MIC),
10304 SND_PCI_QUIRK(0x1025, 0x1534, "Acer Predator PH315-54", ALC255_FIXUP_ACER_MIC_NO_PRESENCE),
10305 SND_PCI_QUIRK(0x1025, 0x159c, "Acer Nitro 5 AN515-58", ALC2XX_FIXUP_HEADSET_MIC),
10369 …SND_PCI_QUIRK(0x1028, 0x0b37, "Dell Inspiron 16 Plus 7620 2-in-1", ALC295_FIXUP_DELL_INSPIRON_TOP_…
10373 SND_PCI_QUIRK(0x1028, 0x0c0b, "Dell Oasis 14 RPL-P", ALC289_FIXUP_RTK_AMP_DUAL_SPK),
10386 SND_PCI_QUIRK(0x1028, 0x0cbd, "Dell Oasis 13 CS MTL-U", ALC289_FIXUP_DELL_CS35L41_SPI_2),
10387 SND_PCI_QUIRK(0x1028, 0x0cbe, "Dell Oasis 13 2-IN-1 MTL-U", ALC289_FIXUP_DELL_CS35L41_SPI_2),
10388 SND_PCI_QUIRK(0x1028, 0x0cbf, "Dell Oasis 13 Low Weight MTU-L", ALC289_FIXUP_DELL_CS35L41_SPI_2),
10390 SND_PCI_QUIRK(0x1028, 0x0cc1, "Dell Oasis 14 MTL-H/U", ALC289_FIXUP_DELL_CS35L41_SPI_2),
10391 SND_PCI_QUIRK(0x1028, 0x0cc2, "Dell Oasis 14 2-in-1 MTL-H/U", ALC289_FIXUP_DELL_CS35L41_SPI_2),
10392 SND_PCI_QUIRK(0x1028, 0x0cc3, "Dell Oasis 14 Low Weight MTL-U", ALC289_FIXUP_DELL_CS35L41_SPI_2),
10393 SND_PCI_QUIRK(0x1028, 0x0cc4, "Dell Oasis 16 MTL-H/U", ALC289_FIXUP_DELL_CS35L41_SPI_2),
10466 SND_PCI_QUIRK(0x103c, 0x841c, "HP Pavilion 15-CK0xx", ALC269_FIXUP_HP_MUTE_LED_MIC3),
10469 SND_PCI_QUIRK(0x103c, 0x84ae, "HP 15-db0403ng", ALC236_FIXUP_HP_MUTE_LED_COEFBIT2),
10470 SND_PCI_QUIRK(0x103c, 0x84da, "HP OMEN dc0019-ur", ALC295_FIXUP_HP_OMEN),
10472 SND_PCI_QUIRK(0x103c, 0x8519, "HP Spectre x360 15-df0xxx", ALC285_FIXUP_HP_SPECTRE_X360),
10474 …SND_PCI_QUIRK(0x103c, 0x85c6, "HP Pavilion x360 Convertible 14-dy1xxx", ALC295_FIXUP_HP_MUTE_LED_C…
10475 SND_PCI_QUIRK(0x103c, 0x85de, "HP Envy x360 13-ar0xxx", ALC285_FIXUP_HP_ENVY_X360),
10479 SND_PCI_QUIRK(0x103c, 0x86c1, "HP Laptop 15-da3001TU", ALC236_FIXUP_HP_MUTE_LED_COEFBIT2),
10481 SND_PCI_QUIRK(0x103c, 0x86e7, "HP Spectre x360 15-eb0xxx", ALC285_FIXUP_HP_SPECTRE_X360_EB1),
10482 SND_PCI_QUIRK(0x103c, 0x86e8, "HP Spectre x360 15-eb0xxx", ALC285_FIXUP_HP_SPECTRE_X360_EB1),
10483 SND_PCI_QUIRK(0x103c, 0x86f9, "HP Spectre x360 13-aw0xxx", ALC285_FIXUP_HP_SPECTRE_X360_MUTE_LED),
10493 …SND_PCI_QUIRK(0x103c, 0x876e, "HP ENVY x360 Convertible 13-ay0xxx", ALC245_FIXUP_HP_X360_MUTE_LEDS…
10503 SND_PCI_QUIRK(0x103c, 0x87b7, "HP Laptop 14-fq0xxx", ALC236_FIXUP_HP_MUTE_LED_COEFBIT2),
10505 SND_PCI_QUIRK(0x103c, 0x87d3, "HP Laptop 15-gw0xxx", ALC236_FIXUP_HP_MUTE_LED_COEFBIT2),
10515 SND_PCI_QUIRK(0x103c, 0x87fd, "HP Laptop 14-dq2xxx", ALC236_FIXUP_HP_MUTE_LED_COEFBIT2),
10516 SND_PCI_QUIRK(0x103c, 0x87fe, "HP Laptop 15s-fq2xxx", ALC236_FIXUP_HP_MUTE_LED_COEFBIT2),
10519 SND_PCI_QUIRK(0x103c, 0x8811, "HP Spectre x360 15-eb1xxx", ALC285_FIXUP_HP_SPECTRE_X360_EB1),
10520 SND_PCI_QUIRK(0x103c, 0x8812, "HP Spectre x360 15-eb1xxx", ALC285_FIXUP_HP_SPECTRE_X360_EB1),
10531 SND_PCI_QUIRK(0x103c, 0x887a, "HP Laptop 15s-eq2xxx", ALC236_FIXUP_HP_MUTE_LED_COEFBIT2),
10532 SND_PCI_QUIRK(0x103c, 0x887c, "HP Laptop 14s-fq1xxx", ALC236_FIXUP_HP_MUTE_LED_COEFBIT2),
10533 …SND_PCI_QUIRK(0x103c, 0x888a, "HP ENVY x360 Convertible 15-eu0xxx", ALC245_FIXUP_HP_X360_MUTE_LEDS…
10538 SND_PCI_QUIRK(0x103c, 0x88d0, "HP Pavilion 15-eh1xxx (mainboard 88D0)", ALC287_FIXUP_HP_GPIO_LED),
10539 SND_PCI_QUIRK(0x103c, 0x88dd, "HP Pavilion 15z-ec200", ALC285_FIXUP_HP_MUTE_LED),
10542 SND_PCI_QUIRK(0x103c, 0x8919, "HP Pavilion Aero Laptop 13-be0xxx", ALC287_FIXUP_HP_GPIO_LED),
10569 SND_PCI_QUIRK(0x103c, 0x8a0f, "HP Pavilion 14-ec1xxx", ALC287_FIXUP_HP_GPIO_LED),
10570 SND_PCI_QUIRK(0x103c, 0x8a20, "HP Laptop 15s-fq5xxx", ALC236_FIXUP_HP_MUTE_LED_COEFBIT2),
10571 SND_PCI_QUIRK(0x103c, 0x8a25, "HP Victus 16-d1xxx (MB 8A25)", ALC245_FIXUP_HP_MUTE_LED_COEFBIT),
10639 …SND_PCI_QUIRK(0x103c, 0x8c15, "HP Spectre x360 2-in-1 Laptop 14-eu0xxx", ALC245_FIXUP_HP_SPECTRE_X…
10640 …SND_PCI_QUIRK(0x103c, 0x8c16, "HP Spectre x360 2-in-1 Laptop 16-aa0xxx", ALC245_FIXUP_HP_SPECTRE_X…
10642 SND_PCI_QUIRK(0x103c, 0x8c21, "HP Pavilion Plus Laptop 14-ey0XXX", ALC245_FIXUP_HP_X360_MUTE_LEDS),
10643 SND_PCI_QUIRK(0x103c, 0x8c30, "HP Victus 15-fb1xxx", ALC245_FIXUP_HP_MUTE_LED_COEFBIT),
10647 …SND_PCI_QUIRK(0x103c, 0x8c49, "HP Elite x360 830 2-in-1 G11", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_L…
10654 SND_PCI_QUIRK(0x103c, 0x8c53, "HP Elite x360 1040 2-in-1 G11", ALC285_FIXUP_HP_GPIO_LED),
10683 SND_PCI_QUIRK(0x103c, 0x8cbd, "HP Pavilion Aero Laptop 13-bg0xxx", ALC245_FIXUP_HP_X360_MUTE_LEDS),
10854 SND_PCI_QUIRK(0x10ec, 0x11bc, "VAIO VJFE-IL", ALC269_FIXUP_LIMIT_INT_MIC_BOOST),
10861 SND_PCI_QUIRK(0x10f7, 0x8338, "Panasonic CF-SZ6", ALC269_FIXUP_ASPIRE_HEADSET_MIC),
10863 SND_PCI_QUIRK(0x144d, 0xc169, "Samsung Notebook 9 Pen (NP930SBE-K01US)", ALC298_FIXUP_SAMSUNG_AMP),
10864 SND_PCI_QUIRK(0x144d, 0xc176, "Samsung Notebook 9 Pro (NP930MBE-K04US)", ALC298_FIXUP_SAMSUNG_AMP),
10865 …SND_PCI_QUIRK(0x144d, 0xc189, "Samsung Galaxy Flex Book (NT950QCG-X716)", ALC298_FIXUP_SAMSUNG_AMP…
10866 …SND_PCI_QUIRK(0x144d, 0xc18a, "Samsung Galaxy Book Ion (NP930XCJ-K01US)", ALC298_FIXUP_SAMSUNG_AMP…
10867 …SND_PCI_QUIRK(0x144d, 0xc1a3, "Samsung Galaxy Book Pro (NP935XDB-KC1SE)", ALC298_FIXUP_SAMSUNG_AMP…
10871 SND_PCI_QUIRK(0x144d, 0xc812, "Samsung Notebook Pen S (NT950SBE-X58)", ALC298_FIXUP_SAMSUNG_AMP),
10872 …SND_PCI_QUIRK(0x144d, 0xc830, "Samsung Galaxy Book Ion (NT950XCJ-X716A)", ALC298_FIXUP_SAMSUNG_AMP…
10882 SND_PCI_QUIRK(0x1458, 0xfa53, "Gigabyte BXBT-2807", ALC283_FIXUP_HEADSET_MIC),
10883 SND_PCI_QUIRK(0x1462, 0xb120, "MSI Cubi MS-B120", ALC283_FIXUP_HEADSET_MIC),
10884 SND_PCI_QUIRK(0x1462, 0xb171, "Cubi N 8GL (MS-B171)", ALC283_FIXUP_HEADSET_MIC),
10886 SND_PCI_QUIRK(0x152d, 0x1262, "Huawei NBLB-WAX9N", ALC2XX_FIXUP_HEADSET_MIC),
10928 SND_PCI_QUIRK(0x1558, 0x70f6, "Clevo NH77DPQ-Y", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
10938 …SND_PCI_QUIRK(0x1558, 0x8550, "Clevo NH[57][0-9][ER][ACDH]Q", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENC…
10939 …SND_PCI_QUIRK(0x1558, 0x8551, "Clevo NH[57][0-9][ER][ACDH]Q", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENC…
10940 SND_PCI_QUIRK(0x1558, 0x8560, "Clevo NH[57][0-9][ER][ACDH]Q", ALC269_FIXUP_HEADSET_MIC),
10941 SND_PCI_QUIRK(0x1558, 0x8561, "Clevo NH[57][0-9][ER][ACDH]Q", ALC269_FIXUP_HEADSET_MIC),
10942 SND_PCI_QUIRK(0x1558, 0x8562, "Clevo NH[57][0-9]RZ[Q]", ALC269_FIXUP_DMIC),
10949 SND_PCI_QUIRK(0x1558, 0x8a20, "Clevo NH55DCQ-Y", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
10950 SND_PCI_QUIRK(0x1558, 0x8a51, "Clevo NH70RCQ-Y", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
10951 SND_PCI_QUIRK(0x1558, 0x8d50, "Clevo NH55RCQ-M", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
10996 SND_PCI_QUIRK(0x17aa, 0x2234, "Thinkpad ICE-1", ALC287_FIXUP_TAS2781_I2C),
11041 HDA_CODEC_QUIRK(0x17aa, 0x3820, "IdeaPad 330-17IKB 81DM", ALC269_FIXUP_ASPIRE_HEADSET_MIC),
11063 SND_PCI_QUIRK(0x17aa, 0x387d, "Yoga S780-16 pro Quad AAC", ALC287_FIXUP_TAS2781_I2C),
11064 SND_PCI_QUIRK(0x17aa, 0x387e, "Yoga S780-16 pro Quad YC", ALC287_FIXUP_TAS2781_I2C),
11065 SND_PCI_QUIRK(0x17aa, 0x387f, "Yoga S780-16 pro dual LX", ALC287_FIXUP_TAS2781_I2C),
11066 SND_PCI_QUIRK(0x17aa, 0x3880, "Yoga S780-16 pro dual YC", ALC287_FIXUP_TAS2781_I2C),
11081 SND_PCI_QUIRK(0x17aa, 0x38b8, "Yoga S780-14.5 proX AMD YC Dual", ALC287_FIXUP_TAS2781_I2C),
11082 SND_PCI_QUIRK(0x17aa, 0x38b9, "Yoga S780-14.5 proX AMD LX Dual", ALC287_FIXUP_TAS2781_I2C),
11083 SND_PCI_QUIRK(0x17aa, 0x38ba, "Yoga S780-14.5 Air AMD quad YC", ALC287_FIXUP_TAS2781_I2C),
11084 SND_PCI_QUIRK(0x17aa, 0x38bb, "Yoga S780-14.5 Air AMD quad AAC", ALC287_FIXUP_TAS2781_I2C),
11085 SND_PCI_QUIRK(0x17aa, 0x38be, "Yoga S980-14.5 proX YC Dual", ALC287_FIXUP_TAS2781_I2C),
11086 SND_PCI_QUIRK(0x17aa, 0x38bf, "Yoga S980-14.5 proX LX Dual", ALC287_FIXUP_TAS2781_I2C),
11093 SND_PCI_QUIRK(0x17aa, 0x38d3, "Yoga S990-16 Pro IMH YC Dual", ALC287_FIXUP_TAS2781_I2C),
11094 SND_PCI_QUIRK(0x17aa, 0x38d4, "Yoga S990-16 Pro IMH VECO Dual", ALC287_FIXUP_TAS2781_I2C),
11095 SND_PCI_QUIRK(0x17aa, 0x38d5, "Yoga S990-16 Pro IMH YC Quad", ALC287_FIXUP_TAS2781_I2C),
11096 SND_PCI_QUIRK(0x17aa, 0x38d6, "Yoga S990-16 Pro IMH VECO Quad", ALC287_FIXUP_TAS2781_I2C),
11105 SND_PCI_QUIRK(0x17aa, 0x3902, "Lenovo E50-80", ALC269_FIXUP_DMIC_THINKPAD_ACPI),
11107 SND_PCI_QUIRK(0x17aa, 0x391f, "Yoga S990-16 pro Quad YC Quad", ALC287_FIXUP_TAS2781_I2C),
11108 SND_PCI_QUIRK(0x17aa, 0x3920, "Yoga S990-16 pro Quad VECO Quad", ALC287_FIXUP_TAS2781_I2C),
11110 SND_PCI_QUIRK(0x17aa, 0x3978, "Lenovo B50-70", ALC269_FIXUP_DMIC_THINKPAD_ACPI),
11140 SND_PCI_QUIRK(0x19e5, 0x3204, "Huawei MACH-WX9", ALC256_FIXUP_HUAWEI_MACH_WX9_PINS),
11141 SND_PCI_QUIRK(0x19e5, 0x320f, "Huawei WRT-WX9 ", ALC256_FIXUP_ASUS_MIC_NO_PRESENCE),
11142 SND_PCI_QUIRK(0x19e5, 0x3212, "Huawei KLV-WX9 ", ALC256_FIXUP_ACER_HEADSET_MIC),
11146 …b7d, 0xa831, "Ordissimo EVE2 ", ALC269VB_FIXUP_ORDISSIMO_EVE2), /* Also known as Malata PC-B1303 */
11150 SND_PCI_QUIRK(0x1c6c, 0x1251, "Positivo N14KP6-TG", ALC288_FIXUP_DELL1_MIC_NO_PRESENCE),
11170 SND_PCI_QUIRK(0x2782, 0x0214, "VAIO VJFE-CL", ALC269_FIXUP_LIMIT_INT_MIC_BOOST),
11175 SND_PCI_QUIRK(0x2782, 0x1707, "Vaio VJFE-ADL", ALC298_FIXUP_SPK_VOLUME),
11247 {.id = ALC269_FIXUP_AMIC, .name = "laptop-amic"},
11248 {.id = ALC269_FIXUP_DMIC, .name = "laptop-dmic"},
11249 {.id = ALC269_FIXUP_STEREO_DMIC, .name = "alc269-dmic"},
11250 {.id = ALC271_FIXUP_DMIC, .name = "alc271-dmic"},
11251 {.id = ALC269_FIXUP_INV_DMIC, .name = "inv-dmic"},
11252 {.id = ALC269_FIXUP_HEADSET_MIC, .name = "headset-mic"},
11253 {.id = ALC269_FIXUP_HEADSET_MODE, .name = "headset-mode"},
11254 {.id = ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC, .name = "headset-mode-no-hp-mic"},
11255 {.id = ALC269_FIXUP_LENOVO_DOCK, .name = "lenovo-dock"},
11256 {.id = ALC269_FIXUP_LENOVO_DOCK_LIMIT_BOOST, .name = "lenovo-dock-limit-boost"},
11257 {.id = ALC269_FIXUP_HP_GPIO_LED, .name = "hp-gpio-led"},
11258 {.id = ALC269_FIXUP_HP_DOCK_GPIO_MIC1_LED, .name = "hp-dock-gpio-mic1-led"},
11259 {.id = ALC269_FIXUP_DELL1_MIC_NO_PRESENCE, .name = "dell-headset-multi"},
11260 {.id = ALC269_FIXUP_DELL2_MIC_NO_PRESENCE, .name = "dell-headset-dock"},
11261 {.id = ALC269_FIXUP_DELL3_MIC_NO_PRESENCE, .name = "dell-headset3"},
11262 {.id = ALC269_FIXUP_DELL4_MIC_NO_PRESENCE, .name = "dell-headset4"},
11263 {.id = ALC269_FIXUP_DELL4_MIC_NO_PRESENCE_QUIET, .name = "dell-headset4-quiet"},
11264 {.id = ALC283_FIXUP_CHROME_BOOK, .name = "alc283-dac-wcaps"},
11265 {.id = ALC283_FIXUP_SENSE_COMBO_JACK, .name = "alc283-sense-combo"},
11266 {.id = ALC292_FIXUP_TPT440_DOCK, .name = "tpt440-dock"},
11269 {.id = ALC298_FIXUP_TPT470_DOCK_FIX, .name = "tpt470-dock-fix"},
11270 {.id = ALC298_FIXUP_TPT470_DOCK, .name = "tpt470-dock"},
11271 {.id = ALC233_FIXUP_LENOVO_MULTI_CODECS, .name = "dual-codecs"},
11272 {.id = ALC700_FIXUP_INTEL_REFERENCE, .name = "alc700-ref"},
11274 {.id = ALC269_FIXUP_DELL_M101Z, .name = "dell-m101z"},
11275 {.id = ALC269_FIXUP_ASUS_G73JW, .name = "asus-g73jw"},
11276 {.id = ALC269_FIXUP_LENOVO_EAPD, .name = "lenovo-eapd"},
11277 {.id = ALC275_FIXUP_SONY_HWEQ, .name = "sony-hweq"},
11280 {.id = ALC269_FIXUP_LIFEBOOK_EXTMIC, .name = "lifebook-extmic"},
11281 {.id = ALC269_FIXUP_LIFEBOOK_HP_PIN, .name = "lifebook-hp-pin"},
11282 {.id = ALC255_FIXUP_LIFEBOOK_U7x7_HEADSET_MIC, .name = "lifebook-u7x7"},
11283 {.id = ALC269VB_FIXUP_AMIC, .name = "alc269vb-amic"},
11284 {.id = ALC269VB_FIXUP_DMIC, .name = "alc269vb-dmic"},
11285 {.id = ALC269_FIXUP_HP_MUTE_LED_MIC1, .name = "hp-mute-led-mic1"},
11286 {.id = ALC269_FIXUP_HP_MUTE_LED_MIC2, .name = "hp-mute-led-mic2"},
11287 {.id = ALC269_FIXUP_HP_MUTE_LED_MIC3, .name = "hp-mute-led-mic3"},
11288 {.id = ALC269_FIXUP_HP_GPIO_MIC1_LED, .name = "hp-gpio-mic1"},
11289 {.id = ALC269_FIXUP_HP_LINE1_MIC1_LED, .name = "hp-line1-mic1"},
11291 {.id = ALC286_FIXUP_SONY_MIC_NO_PRESENCE, .name = "sony-nomic"},
11292 {.id = ALC269_FIXUP_ASPIRE_HEADSET_MIC, .name = "aspire-headset-mic"},
11293 {.id = ALC269_FIXUP_ASUS_X101, .name = "asus-x101"},
11294 {.id = ALC271_FIXUP_HP_GATE_MIC_JACK, .name = "acer-ao7xx"},
11295 {.id = ALC271_FIXUP_HP_GATE_MIC_JACK_E1_572, .name = "acer-aspire-e1"},
11296 {.id = ALC269_FIXUP_ACER_AC700, .name = "acer-ac700"},
11297 {.id = ALC269_FIXUP_LIMIT_INT_MIC_BOOST, .name = "limit-mic-boost"},
11298 {.id = ALC269VB_FIXUP_ASUS_ZENBOOK, .name = "asus-zenbook"},
11299 {.id = ALC269VB_FIXUP_ASUS_ZENBOOK_UX31A, .name = "asus-zenbook-ux31a"},
11301 {.id = ALC282_FIXUP_ASUS_TX300, .name = "asus-tx300"},
11302 {.id = ALC283_FIXUP_INT_MIC, .name = "alc283-int-mic"},
11303 {.id = ALC290_FIXUP_MONO_SPEAKERS_HSJACK, .name = "mono-speakers"},
11304 {.id = ALC290_FIXUP_SUBWOOFER_HSJACK, .name = "alc290-subwoofer"},
11306 {.id = ALC269_FIXUP_LENOVO_XPAD_ACPI, .name = "lenovo-xpad-led"},
11307 {.id = ALC269_FIXUP_DMIC_THINKPAD_ACPI, .name = "dmic-thinkpad"},
11308 {.id = ALC255_FIXUP_ACER_MIC_NO_PRESENCE, .name = "alc255-acer"},
11309 {.id = ALC255_FIXUP_ASUS_MIC_NO_PRESENCE, .name = "alc255-asus"},
11310 {.id = ALC255_FIXUP_DELL1_MIC_NO_PRESENCE, .name = "alc255-dell1"},
11311 {.id = ALC255_FIXUP_DELL2_MIC_NO_PRESENCE, .name = "alc255-dell2"},
11312 {.id = ALC293_FIXUP_DELL1_MIC_NO_PRESENCE, .name = "alc293-dell1"},
11313 {.id = ALC283_FIXUP_HEADSET_MIC, .name = "alc283-headset"},
11314 {.id = ALC255_FIXUP_MIC_MUTE_LED, .name = "alc255-dell-mute"},
11315 {.id = ALC282_FIXUP_ASPIRE_V5_PINS, .name = "aspire-v5"},
11316 {.id = ALC269VB_FIXUP_ASPIRE_E1_COEF, .name = "aspire-e1-coef"},
11317 {.id = ALC280_FIXUP_HP_GPIO4, .name = "hp-gpio4"},
11318 {.id = ALC286_FIXUP_HP_GPIO_LED, .name = "hp-gpio-led"},
11319 {.id = ALC280_FIXUP_HP_GPIO2_MIC_HOTKEY, .name = "hp-gpio2-hotkey"},
11320 {.id = ALC280_FIXUP_HP_DOCK_PINS, .name = "hp-dock-pins"},
11321 {.id = ALC269_FIXUP_HP_DOCK_GPIO_MIC1_LED, .name = "hp-dock-gpio-mic"},
11322 {.id = ALC280_FIXUP_HP_9480M, .name = "hp-9480m"},
11323 {.id = ALC288_FIXUP_DELL_HEADSET_MODE, .name = "alc288-dell-headset"},
11324 {.id = ALC288_FIXUP_DELL1_MIC_NO_PRESENCE, .name = "alc288-dell1"},
11325 {.id = ALC288_FIXUP_DELL_XPS_13, .name = "alc288-dell-xps13"},
11326 {.id = ALC292_FIXUP_DELL_E7X, .name = "dell-e7x"},
11327 {.id = ALC293_FIXUP_DISABLE_AAMIX_MULTIJACK, .name = "alc293-dell"},
11328 {.id = ALC298_FIXUP_DELL1_MIC_NO_PRESENCE, .name = "alc298-dell1"},
11329 {.id = ALC298_FIXUP_DELL_AIO_MIC_NO_PRESENCE, .name = "alc298-dell-aio"},
11330 {.id = ALC275_FIXUP_DELL_XPS, .name = "alc275-dell-xps"},
11331 {.id = ALC293_FIXUP_LENOVO_SPK_NOISE, .name = "lenovo-spk-noise"},
11332 {.id = ALC233_FIXUP_LENOVO_LINE2_MIC_HOTKEY, .name = "lenovo-hotkey"},
11333 {.id = ALC255_FIXUP_DELL_SPK_NOISE, .name = "dell-spk-noise"},
11334 {.id = ALC225_FIXUP_DELL1_MIC_NO_PRESENCE, .name = "alc225-dell1"},
11335 {.id = ALC295_FIXUP_DISABLE_DAC3, .name = "alc295-disable-dac3"},
11336 {.id = ALC285_FIXUP_SPEAKER2_TO_DAC1, .name = "alc285-speaker2-to-dac1"},
11337 {.id = ALC280_FIXUP_HP_HEADSET_MIC, .name = "alc280-hp-headset"},
11338 {.id = ALC221_FIXUP_HP_FRONT_MIC, .name = "alc221-hp-mic"},
11339 {.id = ALC298_FIXUP_SPK_VOLUME, .name = "alc298-spk-volume"},
11340 {.id = ALC256_FIXUP_DELL_INSPIRON_7559_SUBWOOFER, .name = "dell-inspiron-7559"},
11341 {.id = ALC269_FIXUP_ATIV_BOOK_8, .name = "ativ-book"},
11342 {.id = ALC221_FIXUP_HP_MIC_NO_PRESENCE, .name = "alc221-hp-mic"},
11343 {.id = ALC256_FIXUP_ASUS_HEADSET_MODE, .name = "alc256-asus-headset"},
11344 {.id = ALC256_FIXUP_ASUS_MIC, .name = "alc256-asus-mic"},
11345 {.id = ALC256_FIXUP_ASUS_AIO_GPIO2, .name = "alc256-asus-aio"},
11346 {.id = ALC233_FIXUP_ASUS_MIC_NO_PRESENCE, .name = "alc233-asus"},
11347 {.id = ALC233_FIXUP_EAPD_COEF_AND_MIC_NO_PRESENCE, .name = "alc233-eapd"},
11348 {.id = ALC294_FIXUP_LENOVO_MIC_LOCATION, .name = "alc294-lenovo-mic"},
11349 {.id = ALC225_FIXUP_DELL_WYSE_MIC_NO_PRESENCE, .name = "alc225-wyse"},
11350 {.id = ALC274_FIXUP_DELL_AIO_LINEOUT_VERB, .name = "alc274-dell-aio"},
11351 {.id = ALC255_FIXUP_DUMMY_LINEOUT_VERB, .name = "alc255-dummy-lineout"},
11352 {.id = ALC255_FIXUP_DELL_HEADSET_MIC, .name = "alc255-dell-headset"},
11353 {.id = ALC295_FIXUP_HP_X360, .name = "alc295-hp-x360"},
11354 {.id = ALC225_FIXUP_HEADSET_JACK, .name = "alc-headset-jack"},
11355 {.id = ALC295_FIXUP_CHROME_BOOK, .name = "alc-chrome-book"},
11356 {.id = ALC256_FIXUP_CHROME_BOOK, .name = "alc-2024y-chromebook"},
11357 {.id = ALC299_FIXUP_PREDATOR_SPK, .name = "predator-spk"},
11358 {.id = ALC298_FIXUP_HUAWEI_MBX_STEREO, .name = "huawei-mbx-stereo"},
11359 {.id = ALC256_FIXUP_MEDION_HEADSET_NO_PRESENCE, .name = "alc256-medion-headset"},
11360 {.id = ALC298_FIXUP_SAMSUNG_AMP, .name = "alc298-samsung-amp"},
11361 {.id = ALC298_FIXUP_SAMSUNG_AMP_V2_2_AMPS, .name = "alc298-samsung-amp-v2-2-amps"},
11362 {.id = ALC298_FIXUP_SAMSUNG_AMP_V2_4_AMPS, .name = "alc298-samsung-amp-v2-4-amps"},
11363 {.id = ALC256_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET, .name = "alc256-samsung-headphone"},
11364 {.id = ALC255_FIXUP_XIAOMI_HEADSET_MIC, .name = "alc255-xiaomi-headset"},
11365 {.id = ALC274_FIXUP_HP_MIC, .name = "alc274-hp-mic-detect"},
11366 {.id = ALC245_FIXUP_HP_X360_AMP, .name = "alc245-hp-x360-amp"},
11367 {.id = ALC295_FIXUP_HP_OMEN, .name = "alc295-hp-omen"},
11368 {.id = ALC285_FIXUP_HP_SPECTRE_X360, .name = "alc285-hp-spectre-x360"},
11369 {.id = ALC285_FIXUP_HP_SPECTRE_X360_EB1, .name = "alc285-hp-spectre-x360-eb1"},
11370 {.id = ALC285_FIXUP_HP_ENVY_X360, .name = "alc285-hp-envy-x360"},
11371 {.id = ALC287_FIXUP_IDEAPAD_BASS_SPK_AMP, .name = "alc287-ideapad-bass-spk-amp"},
11372 {.id = ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK_PIN, .name = "alc287-yoga9-bass-spk-pin"},
11373 {.id = ALC623_FIXUP_LENOVO_THINKSTATION_P340, .name = "alc623-lenovo-thinkstation-p340"},
11374 {.id = ALC255_FIXUP_ACER_HEADPHONE_AND_MIC, .name = "alc255-acer-headphone-and-mic"},
11375 {.id = ALC285_FIXUP_HP_GPIO_AMP_INIT, .name = "alc285-hp-amp-init"},
11376 {.id = ALC236_FIXUP_LENOVO_INV_DMIC, .name = "alc236-fixup-lenovo-inv-mic"},
11377 {.id = ALC2XX_FIXUP_HEADSET_MIC, .name = "alc2xx-fixup-headset-mic"},
11841 struct alc_spec *spec = codec->spec; in alc269_fill_coef()
11844 if (spec->codec_variant != ALC269_TYPE_ALC269VB) in alc269_fill_coef()
11864 if (val != -1 && (val & 0x0c00) >> 10 != 0x1) { in alc269_fill_coef()
11869 if (val != -1 && (val & 0x01c0) >> 6 != 0x4) { in alc269_fill_coef()
11890 spec = codec->spec; in patch_alc269()
11891 spec->gen.shared_mic_vref_pin = 0x18; in patch_alc269()
11892 codec->power_save_node = 0; in patch_alc269()
11893 spec->en_3kpull_low = true; in patch_alc269()
11895 codec->patch_ops.suspend = alc269_suspend; in patch_alc269()
11896 codec->patch_ops.resume = alc269_resume; in patch_alc269()
11897 spec->shutup = alc_default_shutup; in patch_alc269()
11898 spec->init_hook = alc_default_init; in patch_alc269()
11900 switch (codec->core.vendor_id) { in patch_alc269()
11902 spec->codec_variant = ALC269_TYPE_ALC269VA; in patch_alc269()
11905 if (codec->bus->pci && in patch_alc269()
11906 codec->bus->pci->subsystem_vendor == 0x1025 && in patch_alc269()
11907 spec->cdefine.platform_type == 1) in patch_alc269()
11909 spec->codec_variant = ALC269_TYPE_ALC269VB; in patch_alc269()
11912 if (codec->bus->pci && in patch_alc269()
11913 codec->bus->pci->subsystem_vendor == 0x17aa && in patch_alc269()
11914 codec->bus->pci->subsystem_device == 0x21f3) in patch_alc269()
11916 spec->codec_variant = ALC269_TYPE_ALC269VC; in patch_alc269()
11919 spec->codec_variant = ALC269_TYPE_ALC269VD; in patch_alc269()
11926 spec->shutup = alc269_shutup; in patch_alc269()
11927 spec->init_hook = alc269_fill_coef; in patch_alc269()
11933 spec->codec_variant = ALC269_TYPE_ALC280; in patch_alc269()
11936 spec->codec_variant = ALC269_TYPE_ALC282; in patch_alc269()
11937 spec->shutup = alc282_shutup; in patch_alc269()
11938 spec->init_hook = alc282_init; in patch_alc269()
11942 spec->codec_variant = ALC269_TYPE_ALC283; in patch_alc269()
11943 spec->shutup = alc283_shutup; in patch_alc269()
11944 spec->init_hook = alc283_init; in patch_alc269()
11948 spec->codec_variant = ALC269_TYPE_ALC284; in patch_alc269()
11951 spec->codec_variant = ALC269_TYPE_ALC293; in patch_alc269()
11955 spec->codec_variant = ALC269_TYPE_ALC286; in patch_alc269()
11958 spec->codec_variant = ALC269_TYPE_ALC298; in patch_alc269()
11962 spec->codec_variant = ALC269_TYPE_ALC255; in patch_alc269()
11963 spec->shutup = alc256_shutup; in patch_alc269()
11964 spec->init_hook = alc256_init; in patch_alc269()
11970 spec->codec_variant = ALC269_TYPE_ALC256; in patch_alc269()
11971 spec->shutup = alc256_shutup; in patch_alc269()
11972 spec->init_hook = alc256_init; in patch_alc269()
11973 spec->gen.mixer_nid = 0; /* ALC256 does not have any loopback mixer path */ in patch_alc269()
11974 if (codec->core.vendor_id == 0x10ec0236 && in patch_alc269()
11975 codec->bus->pci->vendor != PCI_VENDOR_ID_AMD) in patch_alc269()
11976 spec->en_3kpull_low = false; in patch_alc269()
11979 spec->codec_variant = ALC269_TYPE_ALC257; in patch_alc269()
11980 spec->shutup = alc256_shutup; in patch_alc269()
11981 spec->init_hook = alc256_init; in patch_alc269()
11982 spec->gen.mixer_nid = 0; in patch_alc269()
11983 spec->en_3kpull_low = false; in patch_alc269()
11990 spec->codec_variant = ALC269_TYPE_ALC245; in patch_alc269()
11992 spec->codec_variant = ALC269_TYPE_ALC215; in patch_alc269()
11993 spec->shutup = alc225_shutup; in patch_alc269()
11994 spec->init_hook = alc225_init; in patch_alc269()
11995 spec->gen.mixer_nid = 0; in patch_alc269()
12000 spec->codec_variant = ALC269_TYPE_ALC225; in patch_alc269()
12001 spec->shutup = alc225_shutup; in patch_alc269()
12002 spec->init_hook = alc225_init; in patch_alc269()
12003 spec->gen.mixer_nid = 0; /* no loopback on ALC225, ALC295 and ALC299 */ in patch_alc269()
12006 spec->codec_variant = ALC269_TYPE_ALC287; in patch_alc269()
12007 spec->shutup = alc225_shutup; in patch_alc269()
12008 spec->init_hook = alc225_init; in patch_alc269()
12009 spec->gen.mixer_nid = 0; /* no loopback on ALC287 */ in patch_alc269()
12014 spec->codec_variant = ALC269_TYPE_ALC294; in patch_alc269()
12015 spec->gen.mixer_nid = 0; /* ALC2x4 does not have any loopback mixer path */ in patch_alc269()
12017 spec->init_hook = alc294_init; in patch_alc269()
12020 spec->codec_variant = ALC269_TYPE_ALC300; in patch_alc269()
12021 spec->gen.mixer_nid = 0; /* no loopback on ALC300 */ in patch_alc269()
12025 spec->codec_variant = ALC269_TYPE_ALC623; in patch_alc269()
12026 spec->shutup = alc222_shutup; in patch_alc269()
12027 spec->init_hook = alc222_init; in patch_alc269()
12033 spec->codec_variant = ALC269_TYPE_ALC700; in patch_alc269()
12034 spec->gen.mixer_nid = 0; /* ALC700 does not have any loopback mixer path */ in patch_alc269()
12036 spec->init_hook = alc294_init; in patch_alc269()
12042 spec->has_alc5505_dsp = 1; in patch_alc269()
12043 spec->init_hook = alc5505_dsp_init; in patch_alc269()
12054 if (codec->fixup_id == ALC282_FIXUP_ASUS_TX300 && in patch_alc269()
12055 codec->core.vendor_id == 0x10ec0294) { in patch_alc269()
12057 codec->fixup_id = HDA_FIXUP_ID_NOT_SET; in patch_alc269()
12076 spec->gen.beep_nid = 0x01; in patch_alc269()
12083 if (!spec->gen.no_analog && spec->gen.beep_nid && spec->gen.mixer_nid) { in patch_alc269()
12084 err = set_beep_amp(spec, spec->gen.mixer_nid, 0x04, HDA_INPUT); in patch_alc269()
12122 struct alc_spec *spec = codec->spec; in alc861_fixup_asus_amp_vref_0f()
12132 spec->gen.keep_vref_in_automute = 1; in alc861_fixup_asus_amp_vref_0f()
12135 /* suppress the jack-detection */
12140 codec->no_jack_detect = 1; in alc_fixup_no_jack_detect()
12200 spec = codec->spec; in patch_alc861()
12202 spec->gen.beep_nid = 0x23; in patch_alc861()
12204 spec->power_hook = alc_power_eapd; in patch_alc861()
12216 if (!spec->gen.no_analog) { in patch_alc861()
12232 * ALC861-VD support
12264 struct alc_spec *spec = codec->spec; in alc660vd_fixup_asus_gpio1()
12267 spec->gpio_mask |= 0x02; in alc660vd_fixup_asus_gpio1()
12284 SND_PCI_QUIRK(0x1043, 0x1339, "ASUS A7-K", ALC660VD_FIX_ASUS_GPIO1),
12285 SND_PCI_QUIRK(0x1179, 0xff31, "Toshiba L30-149", ALC861VD_FIX_DALLAS),
12300 spec = codec->spec; in patch_alc861vd()
12302 spec->gen.beep_nid = 0x23; in patch_alc861vd()
12304 spec->shutup = alc_eapd_shutup; in patch_alc861vd()
12316 if (!spec->gen.no_analog) { in patch_alc861vd()
12337 * 6-channel independent captures.
12339 * In addition, an independent DAC for the multi-playback (not used in this
12354 if (codec->core.vendor_id == 0x10ec0272 || codec->core.vendor_id == 0x10ec0663 || in alc662_parse_auto_config()
12355 codec->core.vendor_id == 0x10ec0665 || codec->core.vendor_id == 0x10ec0670 || in alc662_parse_auto_config()
12356 codec->core.vendor_id == 0x10ec0671) in alc662_parse_auto_config()
12390 struct alc_spec *spec = codec->spec; in alc_fixup_bass_chmap()
12391 spec->gen.pcm_rec[0]->stream[0].chmap = asus_pcm_2_1_chmaps; in alc_fixup_bass_chmap()
12400 struct alc_spec *spec = codec->spec; in gpio_led_power_filter()
12401 if (nid == codec->core.afg && power_state == AC_PWRST_D3 && spec->gpio_data) in gpio_led_power_filter()
12409 struct alc_spec *spec = codec->spec; in alc662_fixup_led_gpio1()
12413 spec->mute_led_polarity = 1; in alc662_fixup_led_gpio1()
12414 codec->power_filter = gpio_led_power_filter; in alc662_fixup_led_gpio1()
12421 struct alc_spec *spec = codec->spec; in alc662_usi_automute_hook()
12426 vref = spec->gen.hp_jack_present ? PIN_VREF80 : 0; in alc662_usi_automute_hook()
12435 struct alc_spec *spec = codec->spec; in alc662_fixup_usi_headset_mic()
12437 spec->parse_flags |= HDA_PINCFG_HEADSET_MIC; in alc662_fixup_usi_headset_mic()
12438 spec->gen.hp_automute_hook = alc662_usi_automute_hook; in alc662_fixup_usi_headset_mic()
12448 * 0x15 - front left/front right in alc662_aspire_ethos_mute_speakers()
12449 * 0x18 - front center/ LFE in alc662_aspire_ethos_mute_speakers()
12486 struct alc_spec *spec = codec->spec; in alc671_fixup_hp_headset_mic2()
12489 { 0x19, 0x02a11040 }, /* use as headset mic, with its own jack detect */ in alc671_fixup_hp_headset_mic2()
12496 spec->gen.mixer_nid = 0; in alc671_fixup_hp_headset_mic2()
12497 spec->parse_flags |= HDA_PINCFG_HEADSET_MIC; in alc671_fixup_hp_headset_mic2()
12509 struct alc_spec *spec = codec->spec; in alc897_hp_automute_hook()
12513 vref = spec->gen.hp_jack_present ? (PIN_HP | AC_PINCTL_VREF_100) : PIN_HP; in alc897_hp_automute_hook()
12520 struct alc_spec *spec = codec->spec; in alc897_fixup_lenovo_headset_mic()
12522 spec->gen.hp_automute_hook = alc897_hp_automute_hook; in alc897_fixup_lenovo_headset_mic()
12523 spec->no_shutup_pins = 1; in alc897_fixup_lenovo_headset_mic()
12533 struct alc_spec *spec = codec->spec; in alc897_fixup_lenovo_headset_mode()
12536 spec->parse_flags |= HDA_PINCFG_HEADSET_MIC; in alc897_fixup_lenovo_headset_mode()
12537 spec->gen.hp_automute_hook = alc897_hp_automute_hook; in alc897_fixup_lenovo_headset_mode()
12663 {0x19, 0x90a7013f}, /* int-mic */
12699 { 0x19, 0x99a3092f }, /* int-mic */
12711 { 0x19, 0x99a3092f }, /* int-mic */
12724 { 0x19, 0x99a3094f }, /* int-mic */
12737 { 0x19, 0x99a3094f }, /* int-mic */
12751 { 0x19, 0x99a3094f }, /* int-mic */
12763 { 0x19, 0x99a3094f }, /* int-mic */
12776 { 0x19, 0x99a3094f }, /* int-mic */
12788 { 0x12, 0x99a30970 }, /* int-mic */
12834 { 0x19, 0x03a1113c }, /* use as headset mic, without its own jack detect */
12848 { 0x19, 0x03a1913d }, /* use as headphone mic, without its own jack detect */
12849 { 0x1b, 0x03a1113c }, /* use as headset mic, without its own jack detect */
12901 { 0x19, 0x03a1913d }, /* use as headphone mic, without its own jack detect */
12903 { 0x1b, 0x03a1113c }, /* use as headset mic, without its own jack detect */
12933 { 0x19, 0x03a1913d }, /* use as headphone mic, without its own jack detect */
12934 { 0x1b, 0x03a1113c }, /* use as headset mic, without its own jack detect */
12962 { 0x19, 0x02a1913c }, /* use as headset mic, without its own jack detect */
12995 { 0x1a, 0x02a1113c }, /* use as headset mic, without its own jack detect */
13004 { 0x1a, 0x01a11140 }, /* use as headset mic, without its own jack detect */
13050 { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */
13061 { 0x1a, 0x01a11140 }, /* use as headset mic, without its own jack detect */
13077 { 0x19, 0x03a11050 }, /* use as headset mic */
13085 SND_PCI_QUIRK(0x1019, 0x9859, "JP-IK LEAP W502", ALC897_FIXUP_HEADSET_MIC_PIN3),
13094 SND_PCI_QUIRK(0x1025, 0x123c, "Acer Nitro N50-600", ALC662_FIXUP_ACER_NITRO_HEADSET_MODE),
13141 SND_PCI_QUIRK(0x17aa, 0x3742, "Lenovo TianYi510Pro-14IOB", ALC897_FIXUP_HEADSET_MIC_PIN2),
13149 SND_PCI_QUIRK(0x1c6c, 0x1239, "Compaq N14JP6-V2", ALC897_FIXUP_HP_HSMIC_VERB),
13215 {.id = ALC662_FIXUP_HP_RP5800, .name = "hp-rp5800"},
13216 {.id = ALC662_FIXUP_ASUS_MODE1, .name = "asus-mode1"},
13217 {.id = ALC662_FIXUP_ASUS_MODE2, .name = "asus-mode2"},
13218 {.id = ALC662_FIXUP_ASUS_MODE3, .name = "asus-mode3"},
13219 {.id = ALC662_FIXUP_ASUS_MODE4, .name = "asus-mode4"},
13220 {.id = ALC662_FIXUP_ASUS_MODE5, .name = "asus-mode5"},
13221 {.id = ALC662_FIXUP_ASUS_MODE6, .name = "asus-mode6"},
13222 {.id = ALC662_FIXUP_ASUS_MODE7, .name = "asus-mode7"},
13223 {.id = ALC662_FIXUP_ASUS_MODE8, .name = "asus-mode8"},
13224 {.id = ALC662_FIXUP_ZOTAC_Z68, .name = "zotac-z68"},
13225 {.id = ALC662_FIXUP_INV_DMIC, .name = "inv-dmic"},
13226 {.id = ALC662_FIXUP_DELL_MIC_NO_PRESENCE, .name = "alc662-headset-multi"},
13227 {.id = ALC668_FIXUP_DELL_MIC_NO_PRESENCE, .name = "dell-headset-multi"},
13228 {.id = ALC662_FIXUP_HEADSET_MODE, .name = "alc662-headset"},
13229 {.id = ALC668_FIXUP_HEADSET_MODE, .name = "alc668-headset"},
13233 {.id = ALC668_FIXUP_DELL_XPS13, .name = "dell-xps13"},
13234 {.id = ALC662_FIXUP_ASUS_Nx50, .name = "asus-nx50"},
13235 {.id = ALC668_FIXUP_ASUS_Nx51, .name = "asus-nx51"},
13236 {.id = ALC668_FIXUP_ASUS_G751, .name = "asus-g751"},
13237 {.id = ALC891_FIXUP_HEADSET_MODE, .name = "alc891-headset"},
13238 {.id = ALC891_FIXUP_DELL_MIC_NO_PRESENCE, .name = "alc891-headset-multi"},
13239 {.id = ALC662_FIXUP_ACER_VERITON, .name = "acer-veriton"},
13240 {.id = ALC892_FIXUP_ASROCK_MOBO, .name = "asrock-mobo"},
13241 {.id = ALC662_FIXUP_USI_HEADSET_MODE, .name = "usi-headset"},
13242 {.id = ALC662_FIXUP_LENOVO_MULTI_CODECS, .name = "dual-codecs"},
13243 {.id = ALC669_FIXUP_ACER_ASPIRE_ETHOS, .name = "aspire-ethos"},
13244 {.id = ALC897_FIXUP_UNIS_H3C_X500S, .name = "unis-h3c-x500s"},
13318 spec = codec->spec; in patch_alc662()
13320 spec->shutup = alc_eapd_shutup; in patch_alc662()
13323 spec->parse_flags = HDA_PINCFG_NO_HP_FIXUP; in patch_alc662()
13327 switch (codec->core.vendor_id) { in patch_alc662()
13329 spec->init_hook = alc668_restore_default_value; in patch_alc662()
13343 spec->gen.beep_nid = 0x01; in patch_alc662()
13346 codec->bus->pci && codec->bus->pci->subsystem_vendor == 0x1025 && in patch_alc662()
13347 spec->cdefine.platform_type == 1) { in patch_alc662()
13358 if (!spec->gen.no_analog && spec->gen.beep_nid) { in patch_alc662()
13359 switch (codec->core.vendor_id) { in patch_alc662()
13401 /* ALC680 has no aa-loopback mixer */ in patch_alc680()
13463 HDA_CODEC_ENTRY(0x10ec0660, "ALC660-VD", patch_alc861vd),
13465 HDA_CODEC_ENTRY(0x10ec0862, "ALC861-VD", patch_alc861vd),
13504 MODULE_DESCRIPTION("Realtek HD-audio codec");