Lines Matching defs:spec
145 struct alc_spec *spec = codec->spec;
148 mutex_lock(&spec->coef_mutex);
153 struct alc_spec *spec = codec->spec;
155 mutex_unlock(&spec->coef_mutex);
227 struct alc_spec *spec = codec->spec;
229 if (!spec->coef0)
230 spec->coef0 = alc_read_coef_idx(codec, 0);
231 return spec->coef0;
269 struct alc_spec *spec = codec->spec;
271 spec->gpio_mask |= mask;
272 spec->gpio_dir |= mask;
273 spec->gpio_data |= mask;
278 struct alc_spec *spec = codec->spec;
281 spec->gpio_data);
287 struct alc_spec *spec = codec->spec;
288 unsigned int oldval = spec->gpio_data;
291 spec->gpio_data |= mask;
293 spec->gpio_data &= ~mask;
294 if (oldval != spec->gpio_data)
300 struct alc_spec *spec = codec->spec;
302 if (!spec->gpio_mask)
306 AC_VERB_SET_GPIO_MASK, spec->gpio_mask);
308 AC_VERB_SET_GPIO_DIRECTION, spec->gpio_dir);
309 if (spec->gpio_write_delay)
359 struct alc_spec *spec = codec->spec;
361 if (spec->pll_nid)
362 alc_update_coefex_idx(codec, spec->pll_nid, spec->pll_coef_idx,
363 1 << spec->pll_coef_bit, 0);
369 struct alc_spec *spec = codec->spec;
370 spec->pll_nid = nid;
371 spec->pll_coef_idx = coef_idx;
372 spec->pll_coef_bit = coef_bit;
583 struct alc_spec *spec = codec->spec;
596 if (!spec->no_shutup_pins)
607 struct alc_spec *spec = codec->spec;
610 if (!spec->no_depop_delay)
641 static hda_nid_t alc_get_hp_pin(struct alc_spec *spec)
643 if (spec->gen.autocfg.hp_pins[0])
644 return spec->gen.autocfg.hp_pins[0];
645 if (spec->gen.autocfg.line_out_type == AC_JACK_HP_OUT)
646 return spec->gen.autocfg.line_out_pins[0];
662 struct alc_spec *spec = codec->spec;
664 spec->cdefine.fixup = 1;
665 spec->cdefine.sku_cfg = ALC_FIXUP_SKU_IGNORE;
672 struct alc_spec *spec = codec->spec;
675 spec->no_depop_delay = 1;
684 struct alc_spec *spec = codec->spec;
686 spec->cdefine.enable_pcbeep = 1; /* assume always enabled */
688 if (spec->cdefine.fixup) {
689 ass = spec->cdefine.sku_cfg;
721 spec->cdefine.port_connectivity = ass >> 30;
722 spec->cdefine.enable_pcbeep = (ass & 0x100000) >> 20;
723 spec->cdefine.check_sum = (ass >> 16) & 0xf;
724 spec->cdefine.customization = ass >> 8;
726 spec->cdefine.sku_cfg = ass;
727 spec->cdefine.external_amp = (ass & 0x38) >> 3;
728 spec->cdefine.platform_type = (ass & 0x4) >> 2;
729 spec->cdefine.swap = (ass & 0x2) >> 1;
730 spec->cdefine.override = ass & 0x1;
733 nid, spec->cdefine.sku_cfg);
735 spec->cdefine.port_connectivity);
736 codec_dbg(codec, "SKU: enable_pcbeep=0x%x\n", spec->cdefine.enable_pcbeep);
737 codec_dbg(codec, "SKU: check_sum=0x%08x\n", spec->cdefine.check_sum);
738 codec_dbg(codec, "SKU: customization=0x%08x\n", spec->cdefine.customization);
739 codec_dbg(codec, "SKU: external_amp=0x%x\n", spec->cdefine.external_amp);
740 codec_dbg(codec, "SKU: platform_type=0x%x\n", spec->cdefine.platform_type);
741 codec_dbg(codec, "SKU: swap=0x%x\n", spec->cdefine.swap);
742 codec_dbg(codec, "SKU: override=0x%x\n", spec->cdefine.override);
775 struct alc_spec *spec = codec->spec;
777 if (spec->cdefine.fixup) {
778 ass = spec->cdefine.sku_cfg;
829 if (spec->init_amp == ALC_INIT_UNDEFINED) {
842 spec->init_amp = ALC_INIT_DEFAULT;
859 if (!alc_get_hp_pin(spec)) {
863 if (found_in_nid_list(nid, spec->gen.autocfg.line_out_pins,
864 spec->gen.autocfg.line_outs))
866 spec->gen.autocfg.hp_pins[0] = nid;
876 struct alc_spec *spec = codec->spec;
877 if (spec->init_amp == ALC_INIT_UNDEFINED) {
880 spec->init_amp = ALC_INIT_DEFAULT;
891 struct alc_spec *spec = codec->spec;
893 spec->gen.inv_dmic_split = 1;
926 struct alc_spec *spec = codec->spec;
932 if (spec->init_hook)
933 spec->init_hook(codec);
935 spec->gen.skip_verbs = 1; /* applied in below */
938 alc_auto_init_amp(codec, spec->init_amp);
951 struct alc_spec *spec = codec->spec;
956 if (spec && spec->shutup)
957 spec->shutup(codec);
969 struct alc_spec *spec = codec->spec;
971 if (spec && spec->power_hook)
972 spec->power_hook(codec);
978 struct alc_spec *spec = codec->spec;
980 if (!spec->no_depop_delay)
1116 static int set_beep_amp(struct alc_spec *spec, hda_nid_t nid,
1124 knew = snd_hda_gen_add_kctl(&spec->gen, NULL,
1151 struct alc_spec *spec = codec->spec;
1156 return spec->cdefine.enable_pcbeep;
1159 #define set_beep_amp(spec, nid, idx, dir) 0
1171 struct alc_spec *spec = codec->spec;
1172 struct auto_pin_cfg *cfg = &spec->gen.autocfg;
1176 spec->parse_flags);
1193 struct alc_spec *spec = kzalloc(sizeof(*spec), GFP_KERNEL);
1196 if (!spec)
1198 codec->spec = spec;
1199 snd_hda_gen_spec_init(&spec->gen);
1200 spec->gen.mixer_nid = mixer_nid;
1201 spec->gen.own_eapd_ctl = 1;
1207 mutex_init(&spec->coef_mutex);
1211 kfree(spec);
1641 struct alc_spec *spec;
1648 spec = codec->spec;
1649 spec->gen.need_dac_fix = 1;
1650 spec->gen.beep_nid = 0x01;
1665 if (!spec->gen.no_analog) {
1666 err = set_beep_amp(spec, 0x0b, 0x05, HDA_INPUT);
1710 struct alc_spec *spec = codec->spec;
1712 alc_update_gpio_data(codec, 0x01, spec->gen.hp_jack_present);
1718 struct alc_spec *spec = codec->spec;
1723 spec->gen.automute_hook = alc260_gpio1_automute;
1724 spec->gen.detect_hp = 1;
1725 spec->gen.automute_speaker = 1;
1726 spec->gen.autocfg.hp_pins[0] = 0x0f; /* copy it for automute */
1736 struct alc_spec *spec = codec->spec;
1756 spec->init_amp = ALC_INIT_NONE;
1764 struct alc_spec *spec = codec->spec;
1766 spec->init_amp = ALC_INIT_NONE;
1772 struct alc_spec *spec = codec->spec;
1774 spec->gen.add_jack_modes = 1;
1775 spec->gen.hp_mic = 1;
1890 struct alc_spec *spec;
1897 spec = codec->spec;
1902 spec->gen.prefer_hp_amp = 1;
1903 spec->gen.beep_nid = 0x01;
1905 spec->shutup = alc_eapd_shutup;
1918 if (!spec->gen.no_analog) {
1919 err = set_beep_amp(spec, 0x07, 0x05, HDA_INPUT);
2006 struct alc_spec *spec = codec->spec;
2008 spec->gpio_write_delay = true;
2042 struct alc_spec *spec = codec->spec;
2054 spec->gen.keep_vref_in_automute = 1;
2062 struct alc_spec *spec = codec->spec;
2071 spec->gen.keep_vref_in_automute = 1;
2111 struct alc_spec *spec = codec->spec;
2113 spec->gen.no_primary_hp = 1;
2114 spec->gen.no_multi_io = 1;
2127 struct alc_spec *spec = codec->spec;
2132 spec->gen.suppress_vmaster = 1;
2134 spec->gen.suppress_auto_mute = 1;
2135 spec->gen.suppress_auto_mic = 1;
2137 spec->gen.mixer_nid = 0;
2231 struct alc_spec *spec = codec->spec;
2236 if (spec->gen.hp_jack_present)
2246 struct alc_spec *spec = codec->spec;
2250 spec->gen.hp_automute_hook = alc887_asus_hp_automute_hook;
2749 struct alc_spec *spec;
2756 spec = codec->spec;
2781 spec->gen.beep_nid = 0x01;
2788 if (!spec->gen.no_analog && spec->gen.beep_nid) {
2789 err = set_beep_amp(spec, 0x0b, 0x05, HDA_INPUT);
2928 struct alc_spec *spec;
2935 spec = codec->spec;
2936 spec->gen.shared_mic_vref_pin = 0x18;
2938 spec->shutup = alc_eapd_shutup;
2957 spec->gen.beep_nid = 0x01;
2964 if (!spec->gen.no_analog && spec->gen.beep_nid) {
2965 err = set_beep_amp(spec, 0x0b, 0x05, HDA_INPUT);
3081 struct alc_spec *spec;
3089 spec = codec->spec;
3091 spec->gen.beep_nid = 0x01;
3093 spec->shutup = alc_eapd_shutup;
3105 if (err > 0 && !spec->gen.no_analog &&
3106 spec->gen.autocfg.speaker_pins[0] != 0x1d) {
3108 if (!snd_hda_gen_add_kctl(&spec->gen, NULL,
3179 struct alc_spec *spec = codec->spec;
3182 switch (spec->codec_variant) {
3249 struct alc_spec *spec = codec->spec;
3251 if (!spec->has_hs_key)
3279 struct alc_spec *spec = codec->spec;
3281 if (!spec->has_hs_key)
3310 struct alc_spec *spec = codec->spec;
3315 spec->has_hs_key = 1;
3320 hp_pin = alc_get_hp_pin(spec);
3340 struct alc_spec *spec = codec->spec;
3342 if (spec->codec_variant == ALC269_TYPE_ALC269VB)
3344 if (spec->codec_variant == ALC269_TYPE_ALC269VB &&
3391 struct alc_spec *spec = codec->spec;
3392 hda_nid_t hp_pin = alc_get_hp_pin(spec);
3428 struct alc_spec *spec = codec->spec;
3429 hda_nid_t hp_pin = alc_get_hp_pin(spec);
3451 if (!spec->no_shutup_pins)
3507 struct alc_spec *spec = codec->spec;
3508 hda_nid_t hp_pin = alc_get_hp_pin(spec);
3543 struct alc_spec *spec = codec->spec;
3544 hda_nid_t hp_pin = alc_get_hp_pin(spec);
3565 if (!spec->no_shutup_pins)
3580 struct alc_spec *spec = codec->spec;
3581 hda_nid_t hp_pin = alc_get_hp_pin(spec);
3584 if (spec->ultra_low_power) {
3608 if (hp_pin_sense || spec->ultra_low_power)
3614 if (hp_pin_sense || spec->ultra_low_power)
3632 struct alc_spec *spec = codec->spec;
3633 hda_nid_t hp_pin = alc_get_hp_pin(spec);
3648 if (hp_pin_sense || spec->ultra_low_power)
3656 if (spec->en_3kpull_low)
3659 if (!spec->no_shutup_pins)
3663 if (hp_pin_sense || spec->ultra_low_power)
3668 if (spec->ultra_low_power) {
3681 struct alc_spec *spec = codec->spec;
3682 hda_nid_t hp_pin = alc_get_hp_pin(spec);
3731 struct alc_spec *spec = codec->spec;
3732 hda_nid_t hp_pin = alc_get_hp_pin(spec);
3735 if (spec->ultra_low_power) {
3742 if (spec->codec_variant != ALC269_TYPE_ALC287 &&
3743 spec->codec_variant != ALC269_TYPE_ALC245)
3745 if (!spec->done_hp_init ||
3749 spec->done_hp_init = true;
3764 if (hp1_pin_sense || spec->ultra_low_power)
3771 if (hp1_pin_sense || hp2_pin_sense || spec->ultra_low_power)
3774 if (hp1_pin_sense || spec->ultra_low_power)
3781 if (hp1_pin_sense || hp2_pin_sense || spec->ultra_low_power)
3790 struct alc_spec *spec = codec->spec;
3791 hda_nid_t hp_pin = alc_get_hp_pin(spec);
3807 if (hp1_pin_sense || spec->ultra_low_power)
3814 if (hp1_pin_sense || hp2_pin_sense || spec->ultra_low_power)
3817 if (hp1_pin_sense || spec->ultra_low_power)
3824 if (hp1_pin_sense || hp2_pin_sense || spec->ultra_low_power)
3829 if (spec->ultra_low_power) {
3844 struct alc_spec *spec = codec->spec;
3845 hda_nid_t hp_pin = alc_get_hp_pin(spec);
3873 struct alc_spec *spec = codec->spec;
3874 hda_nid_t hp_pin = alc_get_hp_pin(spec);
3893 if (!spec->no_shutup_pins)
3906 struct alc_spec *spec = codec->spec;
3907 hda_nid_t hp_pin = alc_get_hp_pin(spec);
3918 if (!spec->no_shutup_pins)
3938 struct alc_spec *spec = codec->spec;
3941 if (!spec->done_hp_init ||
3944 spec->done_hp_init = true;
4044 struct alc_spec *spec = codec->spec;
4046 if (spec->has_alc5505_dsp)
4054 struct alc_spec *spec = codec->spec;
4056 if (spec->codec_variant == ALC269_TYPE_ALC269VB)
4058 if (spec->codec_variant == ALC269_TYPE_ALC269VB &&
4065 if (spec->codec_variant == ALC269_TYPE_ALC269VB)
4067 if (spec->codec_variant == ALC269_TYPE_ALC269VB &&
4079 if (spec->gpio_data)
4082 if (spec->has_alc5505_dsp)
4092 struct alc_spec *spec = codec->spec;
4095 spec->parse_flags = HDA_PINCFG_NO_HP_FIXUP;
4121 struct alc_spec *spec = codec->spec;
4124 spec->parse_flags |= HDA_PINCFG_HEADSET_MIC;
4157 struct alc_spec *spec = codec->spec;
4165 spec->gen.stream_analog_playback = &alc269_44k_pcm_analog_playback;
4166 spec->gen.stream_analog_capture = &alc269_44k_pcm_analog_capture;
4192 struct alc_spec *spec = codec->spec;
4195 spec->gen.automute_hook = alc269_quanta_automute;
4201 struct alc_spec *spec = codec->spec;
4206 vref = spec->gen.hp_jack_present ? PIN_VREF80 : 0;
4284 struct alc_spec *spec = codec->spec;
4286 spec->parse_flags |= HDA_PINCFG_HEADSET_MIC;
4287 spec->gen.hp_automute_hook = alc269_x101_hp_automute_hook;
4314 struct alc_spec *spec = codec->spec;
4316 alc_update_vref_led(codec, spec->mute_led_nid,
4317 spec->mute_led_polarity, brightness);
4326 struct alc_spec *spec = codec->spec;
4329 (nid != spec->mute_led_nid && nid != spec->cap_mute_led_nid))
4342 struct alc_spec *spec = codec->spec;
4354 spec->mute_led_polarity = pol;
4355 spec->mute_led_nid = pin - 0x0a + 0x18;
4359 "Detected mute LED for %x:%d\n", spec->mute_led_nid,
4360 spec->mute_led_polarity);
4369 struct alc_spec *spec = codec->spec;
4372 spec->mute_led_polarity = 0;
4373 spec->mute_led_nid = pin;
4411 struct alc_spec *spec = codec->spec;
4413 alc_update_gpio_led(codec, spec->gpio_mute_led_mask,
4414 spec->mute_led_polarity, !brightness);
4423 struct alc_spec *spec = codec->spec;
4425 alc_update_gpio_led(codec, spec->gpio_mic_led_mask,
4426 spec->micmute_led_polarity, !brightness);
4436 struct alc_spec *spec = codec->spec;
4443 spec->gpio_mute_led_mask = mute_mask;
4447 spec->gpio_mic_led_mask = micmute_mask;
4485 struct alc_spec *spec = codec->spec;
4488 spec->micmute_led_polarity = 1;
4497 struct alc_spec *spec = codec->spec;
4499 alc_update_vref_led(codec, spec->cap_mute_led_nid,
4500 spec->micmute_led_polarity, brightness);
4507 struct alc_spec *spec = codec->spec;
4514 spec->gpio_mask |= 0x10;
4515 spec->gpio_dir |= 0x10;
4516 spec->cap_mute_led_nid = 0x18;
4525 struct alc_spec *spec = codec->spec;
4529 spec->cap_mute_led_nid = 0x18;
4541 struct alc_spec *spec = codec->spec;
4545 spec->gpio_mask |= 0x01;
4546 spec->gpio_dir |= 0x01;
4577 struct alc_spec *spec = codec->spec;
4580 spec->gpio_mask |= 0x04;
4581 spec->gpio_dir |= 0x04;
4582 spec->gen.pcm_playback_hook = alc274_hp_envy_pcm_hook;
4602 struct alc_spec *spec = codec->spec;
4604 alc_update_coef_led(codec, &spec->mute_led_coef,
4605 spec->mute_led_polarity, brightness);
4613 struct alc_spec *spec = codec->spec;
4616 spec->mute_led_polarity = 0;
4617 spec->mute_led_coef.idx = 0x0b;
4618 spec->mute_led_coef.mask = 1 << 3;
4619 spec->mute_led_coef.on = 1 << 3;
4620 spec->mute_led_coef.off = 0;
4629 struct alc_spec *spec = codec->spec;
4632 spec->mute_led_polarity = 0;
4633 spec->mute_led_coef.idx = 0x34;
4634 spec->mute_led_coef.mask = 1 << 5;
4635 spec->mute_led_coef.on = 0;
4636 spec->mute_led_coef.off = 1 << 5;
4644 struct alc_spec *spec = codec->spec;
4647 spec->mute_led_polarity = 0;
4648 spec->mute_led_coef.idx = 0x07;
4649 spec->mute_led_coef.mask = 1;
4650 spec->mute_led_coef.on = 1;
4651 spec->mute_led_coef.off = 0;
4660 struct alc_spec *spec = codec->spec;
4663 spec->mute_led_polarity = 0;
4664 spec->mute_led_coef.idx = 0x0b;
4665 spec->mute_led_coef.mask = 3 << 2;
4666 spec->mute_led_coef.on = 2 << 2;
4667 spec->mute_led_coef.off = 1 << 2;
4677 struct alc_spec *spec = codec->spec;
4679 alc_update_coef_led(codec, &spec->mic_led_coef,
4680 spec->micmute_led_polarity, brightness);
4687 struct alc_spec *spec = codec->spec;
4690 spec->mic_led_coef.idx = 0x19;
4691 spec->mic_led_coef.mask = 1 << 13;
4692 spec->mic_led_coef.on = 1 << 13;
4693 spec->mic_led_coef.off = 0;
4701 struct alc_spec *spec = codec->spec;
4704 spec->micmute_led_polarity = 1;
4711 struct alc_spec *spec = codec->spec;
4714 spec->mic_led_coef.idx = 0x35;
4715 spec->mic_led_coef.mask = 3 << 2;
4716 spec->mic_led_coef.on = 2 << 2;
4717 spec->mic_led_coef.off = 1 << 2;
4746 struct alc_spec *spec = codec->spec;
4749 spec->cap_mute_led_nid = 0x1a;
4808 struct alc_spec *spec = codec->spec;
4812 input_report_key(spec->kb_dev, spec->alc_mute_keycode_map[ALC_KEY_MICMUTE_INDEX], 1);
4813 input_sync(spec->kb_dev);
4814 input_report_key(spec->kb_dev, spec->alc_mute_keycode_map[ALC_KEY_MICMUTE_INDEX], 0);
4815 input_sync(spec->kb_dev);
4820 struct alc_spec *spec = codec->spec;
4823 spec->kb_dev = input_allocate_device();
4824 if (!spec->kb_dev) {
4829 spec->alc_mute_keycode_map[ALC_KEY_MICMUTE_INDEX] = KEY_MICMUTE;
4831 spec->kb_dev->name = "Microphone Mute Button";
4832 spec->kb_dev->evbit[0] = BIT_MASK(EV_KEY);
4833 spec->kb_dev->keycodesize = sizeof(spec->alc_mute_keycode_map[0]);
4834 spec->kb_dev->keycodemax = ARRAY_SIZE(spec->alc_mute_keycode_map);
4835 spec->kb_dev->keycode = spec->alc_mute_keycode_map;
4836 for (i = 0; i < ARRAY_SIZE(spec->alc_mute_keycode_map); i++)
4837 set_bit(spec->alc_mute_keycode_map[i], spec->kb_dev->keybit);
4839 if (input_register_device(spec->kb_dev)) {
4841 input_free_device(spec->kb_dev);
4842 spec->kb_dev = NULL;
4857 struct alc_spec *spec = codec->spec;
4861 spec->init_amp = ALC_INIT_DEFAULT;
4865 spec->gpio_mask |= 0x06;
4866 spec->gpio_dir |= 0x02;
4867 spec->gpio_data |= 0x02;
4875 if (!spec->kb_dev)
4880 input_unregister_device(spec->kb_dev);
4881 spec->kb_dev = NULL;
4891 struct alc_spec *spec = codec->spec;
4895 spec->init_amp = ALC_INIT_DEFAULT;
4904 if (!spec->kb_dev)
4909 input_unregister_device(spec->kb_dev);
4910 spec->kb_dev = NULL;
4921 struct alc_spec *spec = codec->spec;
4925 spec->cap_mute_led_nid = 0x18;
4943 struct alc_spec *spec = codec->spec;
5018 if (spec->no_internal_mic_pin) {
5560 struct alc_spec *spec = codec->spec;
5599 if (spec->no_internal_mic_pin) {
5753 spec->current_headset_type = is_ctia ? ALC_HEADSET_TYPE_CTIA : ALC_HEADSET_TYPE_OMTP;
5758 struct alc_spec *spec = codec->spec;
5760 hda_nid_t mux_pin = spec->gen.imux_pins[spec->gen.cur_mux[0]];
5761 hda_nid_t hp_pin = alc_get_hp_pin(spec);
5767 else if (mux_pin == spec->headset_mic_pin)
5769 else if (mux_pin == spec->headphone_mic_pin)
5774 if (new_headset_mode == spec->current_headset_mode) {
5782 spec->current_headset_mode = ALC_HEADSET_MODE_UNKNOWN;
5783 spec->current_headset_type = ALC_HEADSET_TYPE_UNKNOWN;
5784 spec->gen.hp_jack_present = false;
5787 if (spec->current_headset_type == ALC_HEADSET_TYPE_UNKNOWN)
5789 if (spec->current_headset_type == ALC_HEADSET_TYPE_CTIA)
5791 else if (spec->current_headset_type == ALC_HEADSET_TYPE_OMTP)
5793 spec->gen.hp_jack_present = true;
5796 alc_headset_mode_mic_in(codec, hp_pin, spec->headphone_mic_pin);
5797 spec->gen.hp_jack_present = false;
5801 spec->gen.hp_jack_present = true;
5807 if (spec->headphone_mic_pin && spec->headphone_mic_pin != hp_pin)
5808 snd_hda_set_pin_ctl_cache(codec, spec->headphone_mic_pin,
5811 spec->current_headset_mode = new_headset_mode;
5833 struct alc_spec *spec = codec->spec;
5834 struct auto_pin_cfg *cfg = &spec->gen.autocfg;
5838 if (cfg->inputs[i].is_headset_mic && !spec->headset_mic_pin)
5839 spec->headset_mic_pin = cfg->inputs[i].pin;
5840 if (cfg->inputs[i].is_headphone_mic && !spec->headphone_mic_pin)
5841 spec->headphone_mic_pin = cfg->inputs[i].pin;
5844 WARN_ON(spec->gen.cap_sync_hook);
5845 spec->gen.cap_sync_hook = alc_update_headset_mode_hook;
5846 spec->gen.automute_hook = alc_update_headset_mode;
5847 spec->gen.hp_automute_hook = alc_update_headset_jack_cb;
5853 struct alc_spec *spec = codec->spec;
5857 spec->parse_flags |= HDA_PINCFG_HEADSET_MIC | HDA_PINCFG_HEADPHONE_MIC;
5864 spec->current_headset_mode = ALC_HEADSET_MODE_UNKNOWN;
5865 spec->current_headset_type = ALC_HEADSET_TYPE_UNKNOWN;
5876 struct alc_spec *spec = codec->spec;
5877 spec->parse_flags |= HDA_PINCFG_HEADSET_MIC;
5929 struct alc_spec *spec = codec->spec;
5930 spec->parse_flags |= HDA_PINCFG_HEADSET_MIC;
5940 struct alc_spec *spec = codec->spec;
5944 alc_update_gpio_data(codec, 0x40, spec->gen.hp_jack_present);
5952 struct alc_spec *spec = codec->spec;
5954 spec->gpio_mask |= 0x40;
5955 spec->gpio_dir |= 0x40;
5956 spec->gen.hp_automute_hook = alc288_update_headset_jack_cb;
5964 struct alc_spec *spec = codec->spec;
5965 spec->gen.auto_mute_via_amp = 1;
5973 struct alc_spec *spec = codec->spec;
5974 spec->no_shutup_pins = 1;
5982 struct alc_spec *spec = codec->spec;
5984 spec->gen.mixer_nid = 0;
5997 struct alc_spec *spec = codec->spec;
6000 spec->parse_flags = HDA_PINCFG_NO_HP_FIXUP;
6014 struct alc_spec *spec = codec->spec;
6017 spec->parse_flags = HDA_PINCFG_NO_HP_FIXUP;
6040 struct alc_spec *spec = codec->spec;
6043 spec->gen.preferred_dacs = preferred_pairs;
6052 struct alc_spec *spec = codec->spec;
6055 spec->gen.preferred_dacs = preferred_pairs;
6060 struct alc_spec *spec = codec->spec;
6061 int hp_pin = alc_get_hp_pin(spec);
6072 struct alc_spec *spec = codec->spec;
6073 struct hda_input_mux *imux = &spec->gen.input_mux;
6082 spec->shutup = alc_shutup_dell_xps13;
6087 if (spec->gen.imux_pins[i] == 0x12) {
6088 spec->gen.cur_mux[0] = i;
6099 struct alc_spec *spec = codec->spec;
6102 spec->parse_flags |= HDA_PINCFG_HEADSET_MIC;
6103 spec->gen.hp_mic = 1; /* Mic-in is same pin as headphone */
6127 struct alc_spec *spec = codec->spec;
6128 struct auto_pin_cfg *cfg = &spec->gen.autocfg;
6150 struct alc_spec *spec = codec->spec;
6154 int hp_pin = alc_get_hp_pin(spec);
6166 struct alc_spec *spec = codec->spec;
6167 struct auto_pin_cfg *cfg = &spec->gen.autocfg;
6197 struct alc_spec *spec = codec->spec;
6203 vref = spec->gen.hp_jack_present ? PIN_VREF80 : 0;
6213 struct alc_spec *spec = codec->spec;
6219 spec->gen.mixer_nid = 0;
6234 struct alc_spec *spec = codec->spec;
6238 spec->gen.hp_automute_hook = alc283_hp_automute_hook;
6251 struct alc_spec *spec = codec->spec;
6254 spec->gen.mute_bits |= (1ULL << 0x14);
6260 struct alc_spec *spec = codec->spec;
6268 spec->init_amp = ALC_INIT_DEFAULT;
6272 spec->gen.auto_mute_via_amp = 1;
6273 spec->gen.automute_hook = asus_tx300_automute;
6278 spec->init_amp = ALC_INIT_DEFAULT;
6345 struct alc_spec *spec = codec->spec;
6349 alc_update_gpio_led(codec, 0x10, spec->mute_led_polarity,
6350 !spec->gen.hp_jack_present);
6363 struct alc_spec *spec = codec->spec;
6368 spec->gpio_mask |= 0x10;
6369 spec->gpio_dir |= 0x10;
6370 spec->gen.hp_automute_hook = alc280_hp_gpio4_automute_hook;
6378 struct alc_spec *spec = codec->spec;
6381 spec->gpio_mask |= 0x04;
6382 spec->gpio_dir |= 0x04;
6400 struct alc_spec *spec = codec->spec;
6405 spec->gen.preferred_dacs = preferred_pairs;
6457 struct alc_spec *spec = codec->spec;
6466 spec->gen.preferred_dacs = preferred_pairs;
6467 spec->gen.auto_mute_via_amp = 1;
6478 struct alc_spec *spec = codec->spec;
6481 spec->gen.preferred_dacs = preferred_pairs;
6482 spec->gen.obey_preferred_dacs = 1;
6523 struct alc_spec *spec = codec->spec;
6527 spec->ultra_low_power = true;
6628 struct alc_spec *spec = codec->spec;
6634 spec->no_internal_mic_pin = true;
6650 struct alc_spec *spec = codec->spec;
6662 spec->micmute_led_polarity = 1;
6664 spec->gpio_mask |= 0x01;
6665 spec->gpio_dir |= 0x01;
6767 struct alc_spec *spec = codec->spec;
6771 spec->gen.suppress_auto_mute = 1;
6779 struct alc_spec *spec = cdc->spec;
6781 return component_bind_all(dev, spec->comps);
6787 struct alc_spec *spec = cdc->spec;
6789 component_unbind_all(dev, spec->comps);
6800 struct alc_spec *spec = cdc->spec;
6804 if (spec->comps[i].dev && spec->comps[i].pre_playback_hook)
6805 spec->comps[i].pre_playback_hook(spec->comps[i].dev, action);
6808 if (spec->comps[i].dev && spec->comps[i].playback_hook)
6809 spec->comps[i].playback_hook(spec->comps[i].dev, action);
6812 if (spec->comps[i].dev && spec->comps[i].post_playback_hook)
6813 spec->comps[i].post_playback_hook(spec->comps[i].dev, action);
6866 struct alc_spec *spec = cdc->spec;
6879 spec->comps[i].codec = cdc;
6880 component_match_add(dev, &spec->match,
6883 ret = component_master_add_with_match(dev, &comp_master_ops, spec->match);
6887 spec->gen.pcm_playback_hook = comp_generic_playback_hook;
6899 struct alc_spec *spec = cdc->spec;
6911 spec->comps[0].codec = cdc;
6912 component_match_add(dev, &spec->match,
6915 spec->match);
6921 spec->gen.pcm_playback_hook =
7033 struct alc_spec *spec = codec->spec;
7034 struct hda_input_mux *imux = &spec->gen.input_mux;
7055 if (spec->gen.imux_pins[i] == 0x12) {
7056 spec->gen.cur_mux[0] = i;
7090 struct alc_spec *spec = codec->spec;
7096 spec->gen.preferred_dacs = preferred_pairs;
7116 struct alc_spec *spec = codec->spec;
7124 spec->gen.preferred_dacs = preferred_pairs;
7133 struct alc_spec *spec = codec->spec;
7143 spec->gen.preferred_dacs = preferred_pairs;
7144 spec->gen.auto_mute_via_amp = 1;
7145 if (spec->gen.autocfg.speaker_pins[0] != 0x14) {
7154 struct alc_spec *spec = codec->spec;
7164 spec->parse_flags |= HDA_PINCFG_HEADSET_MIC;
10960 struct alc_spec *spec = codec->spec;
10963 if (spec->codec_variant != ALC269_TYPE_ALC269VB)
11002 struct alc_spec *spec;
11009 spec = codec->spec;
11010 spec->gen.shared_mic_vref_pin = 0x18;
11012 spec->en_3kpull_low = true;
11018 spec->shutup = alc_default_shutup;
11019 spec->init_hook = alc_default_init;
11023 spec->codec_variant = ALC269_TYPE_ALC269VA;
11028 spec->cdefine.platform_type == 1)
11030 spec->codec_variant = ALC269_TYPE_ALC269VB;
11037 spec->codec_variant = ALC269_TYPE_ALC269VC;
11040 spec->codec_variant = ALC269_TYPE_ALC269VD;
11047 spec->shutup = alc269_shutup;
11048 spec->init_hook = alc269_fill_coef;
11054 spec->codec_variant = ALC269_TYPE_ALC280;
11057 spec->codec_variant = ALC269_TYPE_ALC282;
11058 spec->shutup = alc282_shutup;
11059 spec->init_hook = alc282_init;
11063 spec->codec_variant = ALC269_TYPE_ALC283;
11064 spec->shutup = alc283_shutup;
11065 spec->init_hook = alc283_init;
11069 spec->codec_variant = ALC269_TYPE_ALC284;
11072 spec->codec_variant = ALC269_TYPE_ALC293;
11076 spec->codec_variant = ALC269_TYPE_ALC286;
11079 spec->codec_variant = ALC269_TYPE_ALC298;
11083 spec->codec_variant = ALC269_TYPE_ALC255;
11084 spec->shutup = alc256_shutup;
11085 spec->init_hook = alc256_init;
11091 spec->codec_variant = ALC269_TYPE_ALC256;
11092 spec->shutup = alc256_shutup;
11093 spec->init_hook = alc256_init;
11094 spec->gen.mixer_nid = 0; /* ALC256 does not have any loopback mixer path */
11097 spec->en_3kpull_low = false;
11100 spec->codec_variant = ALC269_TYPE_ALC257;
11101 spec->shutup = alc256_shutup;
11102 spec->init_hook = alc256_init;
11103 spec->gen.mixer_nid = 0;
11104 spec->en_3kpull_low = false;
11111 spec->codec_variant = ALC269_TYPE_ALC245;
11113 spec->codec_variant = ALC269_TYPE_ALC215;
11114 spec->shutup = alc225_shutup;
11115 spec->init_hook = alc225_init;
11116 spec->gen.mixer_nid = 0;
11121 spec->codec_variant = ALC269_TYPE_ALC225;
11122 spec->shutup = alc225_shutup;
11123 spec->init_hook = alc225_init;
11124 spec->gen.mixer_nid = 0; /* no loopback on ALC225, ALC295 and ALC299 */
11127 spec->codec_variant = ALC269_TYPE_ALC287;
11128 spec->shutup = alc225_shutup;
11129 spec->init_hook = alc225_init;
11130 spec->gen.mixer_nid = 0; /* no loopback on ALC287 */
11135 spec->codec_variant = ALC269_TYPE_ALC294;
11136 spec->gen.mixer_nid = 0; /* ALC2x4 does not have any loopback mixer path */
11138 spec->init_hook = alc294_init;
11141 spec->codec_variant = ALC269_TYPE_ALC300;
11142 spec->gen.mixer_nid = 0; /* no loopback on ALC300 */
11145 spec->codec_variant = ALC269_TYPE_ALC623;
11151 spec->codec_variant = ALC269_TYPE_ALC700;
11152 spec->gen.mixer_nid = 0; /* ALC700 does not have any loopback mixer path */
11154 spec->init_hook = alc294_init;
11160 spec->has_alc5505_dsp = 1;
11161 spec->init_hook = alc5505_dsp_init;
11187 spec->gen.beep_nid = 0x01;
11194 if (!spec->gen.no_analog && spec->gen.beep_nid && spec->gen.mixer_nid) {
11195 err = set_beep_amp(spec, spec->gen.mixer_nid, 0x04, HDA_INPUT);
11233 struct alc_spec *spec = codec->spec;
11243 spec->gen.keep_vref_in_automute = 1;
11304 struct alc_spec *spec;
11311 spec = codec->spec;
11313 spec->gen.beep_nid = 0x23;
11316 spec->power_hook = alc_power_eapd;
11329 if (!spec->gen.no_analog) {
11330 err = set_beep_amp(spec, 0x23, 0, HDA_OUTPUT);
11377 struct alc_spec *spec = codec->spec;
11380 spec->gpio_mask |= 0x02;
11406 struct alc_spec *spec;
11413 spec = codec->spec;
11415 spec->gen.beep_nid = 0x23;
11417 spec->shutup = alc_eapd_shutup;
11429 if (!spec->gen.no_analog) {
11430 err = set_beep_amp(spec, 0x0b, 0x05, HDA_INPUT);
11503 struct alc_spec *spec = codec->spec;
11504 spec->gen.pcm_rec[0]->stream[0].chmap = asus_pcm_2_1_chmaps;
11513 struct alc_spec *spec = codec->spec;
11514 if (nid == codec->core.afg && power_state == AC_PWRST_D3 && spec->gpio_data)
11522 struct alc_spec *spec = codec->spec;
11526 spec->mute_led_polarity = 1;
11534 struct alc_spec *spec = codec->spec;
11539 vref = spec->gen.hp_jack_present ? PIN_VREF80 : 0;
11548 struct alc_spec *spec = codec->spec;
11550 spec->parse_flags |= HDA_PINCFG_HEADSET_MIC;
11551 spec->gen.hp_automute_hook = alc662_usi_automute_hook;
11599 struct alc_spec *spec = codec->spec;
11609 spec->gen.mixer_nid = 0;
11610 spec->parse_flags |= HDA_PINCFG_HEADSET_MIC;
11622 struct alc_spec *spec = codec->spec;
11626 vref = spec->gen.hp_jack_present ? (PIN_HP | AC_PINCTL_VREF_100) : PIN_HP;
11634 struct alc_spec *spec = codec->spec;
11636 spec->gen.hp_automute_hook = alc897_hp_automute_hook;
11643 struct alc_spec *spec = codec->spec;
11646 spec->parse_flags |= HDA_PINCFG_HEADSET_MIC;
11647 spec->gen.hp_automute_hook = alc897_hp_automute_hook;
12412 struct alc_spec *spec;
12419 spec = codec->spec;
12421 spec->shutup = alc_eapd_shutup;
12424 spec->parse_flags = HDA_PINCFG_NO_HP_FIXUP;
12430 spec->init_hook = alc668_restore_default_value;
12444 spec->gen.beep_nid = 0x01;
12448 spec->cdefine.platform_type == 1) {
12459 if (!spec->gen.no_analog && spec->gen.beep_nid) {
12462 err = set_beep_amp(spec, 0x0b, 0x05, HDA_INPUT);
12468 err = set_beep_amp(spec, 0x0b, 0x04, HDA_INPUT);
12471 err = set_beep_amp(spec, 0x0b, 0x03, HDA_INPUT);