Lines Matching +full:codec +full:- +full:2
1 // SPDX-License-Identifier: GPL-2.0-or-later
6 * Copyright (c) 2005-2007 Takashi Iwai <tiwai@suse.de>
44 ((spec)->beep_amp = HDA_COMPOSE_AMP_VAL(nid, 1, idx, dir)) /* mono */
50 static int create_beep_ctls(struct hda_codec *codec) in create_beep_ctls() argument
52 struct ad198x_spec *spec = codec->spec; in create_beep_ctls()
55 if (!spec->beep_amp) in create_beep_ctls()
58 for (knew = ad_beep_mixer ; knew->name; knew++) { in create_beep_ctls()
61 kctl = snd_ctl_new1(knew, codec); in create_beep_ctls()
63 return -ENOMEM; in create_beep_ctls()
64 kctl->private_value = spec->beep_amp; in create_beep_ctls()
65 err = snd_hda_ctl_add(codec, 0, kctl); in create_beep_ctls()
72 #define create_beep_ctls(codec) 0 argument
76 static void ad198x_power_eapd_write(struct hda_codec *codec, hda_nid_t front, in ad198x_power_eapd_write() argument
79 if (snd_hda_query_pin_caps(codec, front) & AC_PINCAP_EAPD) in ad198x_power_eapd_write()
80 snd_hda_codec_write(codec, front, 0, AC_VERB_SET_EAPD_BTLENABLE, in ad198x_power_eapd_write()
81 !codec->inv_eapd ? 0x00 : 0x02); in ad198x_power_eapd_write()
82 if (snd_hda_query_pin_caps(codec, hp) & AC_PINCAP_EAPD) in ad198x_power_eapd_write()
83 snd_hda_codec_write(codec, hp, 0, AC_VERB_SET_EAPD_BTLENABLE, in ad198x_power_eapd_write()
84 !codec->inv_eapd ? 0x00 : 0x02); in ad198x_power_eapd_write()
87 static void ad198x_power_eapd(struct hda_codec *codec) in ad198x_power_eapd() argument
90 switch (codec->core.vendor_id) { in ad198x_power_eapd()
103 ad198x_power_eapd_write(codec, 0x12, 0x11); in ad198x_power_eapd()
107 ad198x_power_eapd_write(codec, 0x05, 0x06); in ad198x_power_eapd()
110 ad198x_power_eapd_write(codec, 0x1b, 0x1a); in ad198x_power_eapd()
115 static int ad198x_suspend(struct hda_codec *codec) in ad198x_suspend() argument
117 snd_hda_shutup_pins(codec); in ad198x_suspend()
118 ad198x_power_eapd(codec); in ad198x_suspend()
126 struct hda_codec *codec = private_data; in ad_vmaster_eapd_hook() local
127 struct ad198x_spec *spec = codec->spec; in ad_vmaster_eapd_hook()
129 if (!spec->eapd_nid) in ad_vmaster_eapd_hook()
131 if (codec->inv_eapd) in ad_vmaster_eapd_hook()
133 snd_hda_codec_write_cache(codec, spec->eapd_nid, 0, in ad_vmaster_eapd_hook()
142 static int ad198x_auto_build_controls(struct hda_codec *codec) in ad198x_auto_build_controls() argument
146 err = snd_hda_gen_build_controls(codec); in ad198x_auto_build_controls()
149 err = create_beep_ctls(codec); in ad198x_auto_build_controls()
168 static int ad198x_parse_auto_config(struct hda_codec *codec, bool indep_hp) in ad198x_parse_auto_config() argument
170 struct ad198x_spec *spec = codec->spec; in ad198x_parse_auto_config()
171 struct auto_pin_cfg *cfg = &spec->gen.autocfg; in ad198x_parse_auto_config()
174 codec->spdif_status_reset = 1; in ad198x_parse_auto_config()
175 codec->no_trigger_sense = 1; in ad198x_parse_auto_config()
176 codec->no_sticky_stream = 1; in ad198x_parse_auto_config()
178 spec->gen.indep_hp = indep_hp; in ad198x_parse_auto_config()
179 if (!spec->gen.add_stereo_mix_input) in ad198x_parse_auto_config()
180 spec->gen.add_stereo_mix_input = HDA_HINT_STEREO_MIX_AUTO; in ad198x_parse_auto_config()
182 err = snd_hda_parse_pin_defcfg(codec, cfg, NULL, 0); in ad198x_parse_auto_config()
185 err = snd_hda_gen_parse_auto_config(codec, cfg); in ad198x_parse_auto_config()
196 static int alloc_ad_spec(struct hda_codec *codec) in alloc_ad_spec() argument
202 return -ENOMEM; in alloc_ad_spec()
203 codec->spec = spec; in alloc_ad_spec()
204 snd_hda_gen_spec_init(&spec->gen); in alloc_ad_spec()
205 codec->patch_ops = ad198x_auto_patch_ops; in alloc_ad_spec()
213 /* Lenovo N100 seems to report the reversed bit for HP jack-sensing */
214 static void ad_fixup_inv_jack_detect(struct hda_codec *codec, in ad_fixup_inv_jack_detect() argument
217 struct ad198x_spec *spec = codec->spec; in ad_fixup_inv_jack_detect()
220 codec->inv_jack_detect = 1; in ad_fixup_inv_jack_detect()
221 spec->gen.keep_eapd_on = 1; in ad_fixup_inv_jack_detect()
222 spec->gen.vmaster_mute.hook = ad_vmaster_eapd_hook; in ad_fixup_inv_jack_detect()
223 spec->eapd_nid = 0x1b; in ad_fixup_inv_jack_detect()
228 static void ad1986a_fixup_eapd(struct hda_codec *codec, in ad1986a_fixup_eapd() argument
231 struct ad198x_spec *spec = codec->spec; in ad1986a_fixup_eapd()
234 codec->inv_eapd = 0; in ad1986a_fixup_eapd()
235 spec->gen.keep_eapd_on = 1; in ad1986a_fixup_eapd()
236 spec->eapd_nid = 0x1b; in ad1986a_fixup_eapd()
240 /* enable stereo-mix input for avoiding regression on KDE (bko#88251) */
241 static void ad1986a_fixup_eapd_mix_in(struct hda_codec *codec, in ad1986a_fixup_eapd_mix_in() argument
244 struct ad198x_spec *spec = codec->spec; in ad1986a_fixup_eapd_mix_in()
247 ad1986a_fixup_eapd(codec, fix, action); in ad1986a_fixup_eapd_mix_in()
248 spec->gen.add_stereo_mix_input = HDA_HINT_STEREO_MIX_ENABLE; in ad1986a_fixup_eapd_mix_in()
292 { 0x1c, 0x01813030 }, /* line-in */
359 SND_PCI_QUIRK(0x10de, 0xcb84, "ASUS A8N-VM", AD1986A_FIXUP_3STACK),
374 { .id = AD1986A_FIXUP_LAPTOP_IMIC, .name = "laptop-imic" },
375 { .id = AD1986A_FIXUP_LAPTOP_IMIC, .name = "laptop-eapd" }, /* alias */
382 static int patch_ad1986a(struct hda_codec *codec) in patch_ad1986a() argument
395 err = alloc_ad_spec(codec); in patch_ad1986a()
398 spec = codec->spec; in patch_ad1986a()
401 codec->inv_eapd = 1; in patch_ad1986a()
403 spec->gen.mixer_nid = 0x07; in patch_ad1986a()
404 spec->gen.beep_nid = 0x19; in patch_ad1986a()
413 spec->gen.multiout.no_share_stream = 1; in patch_ad1986a()
415 spec->gen.preferred_dacs = preferred_pairs; in patch_ad1986a()
418 spec->gen.auto_mute_via_amp = 1; in patch_ad1986a()
420 snd_hda_pick_fixup(codec, ad1986a_fixup_models, ad1986a_fixup_tbl, in patch_ad1986a()
422 snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PRE_PROBE); in patch_ad1986a()
424 err = ad198x_parse_auto_config(codec, false); in patch_ad1986a()
426 snd_hda_gen_free(codec); in patch_ad1986a()
430 snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PROBE); in patch_ad1986a()
441 * SPDIF mux control for AD1983 auto-parser
446 struct hda_codec *codec = snd_kcontrol_chip(kcontrol); in ad1983_auto_smux_enum_info() local
447 struct ad198x_spec *spec = codec->spec; in ad1983_auto_smux_enum_info()
450 int num_conns = spec->num_smux_conns; in ad1983_auto_smux_enum_info()
452 if (num_conns == 2) in ad1983_auto_smux_enum_info()
453 return snd_hda_enum_helper_info(kcontrol, uinfo, 2, texts2); in ad1983_auto_smux_enum_info()
457 return -EINVAL; in ad1983_auto_smux_enum_info()
463 struct hda_codec *codec = snd_kcontrol_chip(kcontrol); in ad1983_auto_smux_enum_get() local
464 struct ad198x_spec *spec = codec->spec; in ad1983_auto_smux_enum_get()
466 ucontrol->value.enumerated.item[0] = spec->cur_smux; in ad1983_auto_smux_enum_get()
473 struct hda_codec *codec = snd_kcontrol_chip(kcontrol); in ad1983_auto_smux_enum_put() local
474 struct ad198x_spec *spec = codec->spec; in ad1983_auto_smux_enum_put()
475 unsigned int val = ucontrol->value.enumerated.item[0]; in ad1983_auto_smux_enum_put()
476 hda_nid_t dig_out = spec->gen.multiout.dig_out_nid; in ad1983_auto_smux_enum_put()
477 int num_conns = spec->num_smux_conns; in ad1983_auto_smux_enum_put()
480 return -EINVAL; in ad1983_auto_smux_enum_put()
481 if (spec->cur_smux == val) in ad1983_auto_smux_enum_put()
483 spec->cur_smux = val; in ad1983_auto_smux_enum_put()
484 snd_hda_codec_write_cache(codec, dig_out, 0, in ad1983_auto_smux_enum_put()
497 static int ad1983_add_spdif_mux_ctl(struct hda_codec *codec) in ad1983_add_spdif_mux_ctl() argument
499 struct ad198x_spec *spec = codec->spec; in ad1983_add_spdif_mux_ctl()
500 hda_nid_t dig_out = spec->gen.multiout.dig_out_nid; in ad1983_add_spdif_mux_ctl()
505 num_conns = snd_hda_get_num_conns(codec, dig_out); in ad1983_add_spdif_mux_ctl()
506 if (num_conns != 2 && num_conns != 3) in ad1983_add_spdif_mux_ctl()
508 spec->num_smux_conns = num_conns; in ad1983_add_spdif_mux_ctl()
509 if (!snd_hda_gen_add_kctl(&spec->gen, NULL, &ad1983_auto_smux_mixer)) in ad1983_add_spdif_mux_ctl()
510 return -ENOMEM; in ad1983_add_spdif_mux_ctl()
514 static int patch_ad1983(struct hda_codec *codec) in patch_ad1983() argument
521 err = alloc_ad_spec(codec); in patch_ad1983()
524 spec = codec->spec; in patch_ad1983()
526 spec->gen.mixer_nid = 0x0e; in patch_ad1983()
527 spec->gen.beep_nid = 0x10; in patch_ad1983()
531 snd_hda_override_conn_list(codec, 0x0c, ARRAY_SIZE(conn_0c), conn_0c); in patch_ad1983()
532 snd_hda_override_conn_list(codec, 0x0d, ARRAY_SIZE(conn_0d), conn_0d); in patch_ad1983()
534 err = ad198x_parse_auto_config(codec, false); in patch_ad1983()
537 err = ad1983_add_spdif_mux_ctl(codec); in patch_ad1983()
543 snd_hda_gen_free(codec); in patch_ad1983()
552 static void ad1981_fixup_hp_eapd(struct hda_codec *codec, in ad1981_fixup_hp_eapd() argument
555 struct ad198x_spec *spec = codec->spec; in ad1981_fixup_hp_eapd()
558 spec->gen.vmaster_mute.hook = ad_vmaster_eapd_hook; in ad1981_fixup_hp_eapd()
559 spec->eapd_nid = 0x05; in ad1981_fixup_hp_eapd()
563 /* set the upper-limit for mixer amp to 0dB for avoiding the possible
566 static void ad1981_fixup_amp_override(struct hda_codec *codec, in ad1981_fixup_amp_override() argument
570 snd_hda_override_amp_caps(codec, 0x11, HDA_INPUT, in ad1981_fixup_amp_override()
604 static int patch_ad1981(struct hda_codec *codec) in patch_ad1981() argument
609 err = alloc_ad_spec(codec); in patch_ad1981()
611 return -ENOMEM; in patch_ad1981()
612 spec = codec->spec; in patch_ad1981()
614 spec->gen.mixer_nid = 0x0e; in patch_ad1981()
615 spec->gen.beep_nid = 0x10; in patch_ad1981()
618 snd_hda_pick_fixup(codec, NULL, ad1981_fixup_tbl, ad1981_fixups); in patch_ad1981()
619 snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PRE_PROBE); in patch_ad1981()
621 err = ad198x_parse_auto_config(codec, false); in patch_ad1981()
624 err = ad1983_add_spdif_mux_ctl(codec); in patch_ad1981()
628 snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PROBE); in patch_ad1981()
633 snd_hda_gen_free(codec); in patch_ad1981()
644 * port-A 0x11 (mute/hp) <- 0x22 <- 0x37 <- 03/04/06
645 * port-B 0x14 (mute/hp) <- 0x2b <- 0x30 <- 03/04/06
646 * port-C 0x15 (mute) <- 0x2c <- 0x31 <- 05/0a
647 * port-D 0x12 (mute/hp) <- 0x29 <- 04
648 * port-E 0x17 (mute/hp) <- 0x26 <- 0x32 <- 05/0a
649 * port-F 0x16 (mute) <- 0x2a <- 06
650 * port-G 0x24 (mute) <- 0x27 <- 05
651 * port-H 0x25 (mute) <- 0x28 <- 0a
652 * mono 0x13 (mute/amp)<- 0x1e <- 0x36 <- 03/04/06
655 * (*) DAC2/3/4 are swapped to DAC3/4/2 on AD198A rev.2 due to a h/w bug.
660 * port-A 0x11 -> 0x38 -> mix 2, ADC 0
661 * port-B 0x14 -> 0x39 -> mix 0, ADC 1
662 * port-C 0x15 -> 0x3a -> 33:0 - mix 1, ADC 2
663 * port-D 0x12 -> 0x3d -> mix 3, ADC 8
664 * port-E 0x17 -> 0x3c -> 34:0 - mix 4, ADC 4
665 * port-F 0x16 -> 0x3b -> mix 5, ADC 3
666 * port-G 0x24 -> N/A -> 33:1 - mix 1, 34:1 - mix 4, ADC 6
667 * port-H 0x25 -> N/A -> 33:2 - mix 1, 34:2 - mix 4, ADC 7
671 * 6stack - front/surr/CLFE/side/opt DACs - 04/06/05/0a/03
672 * 3stack - front/surr/CLFE/opt DACs - 04/05/0a/03
675 * 0:Port-B (front mic)
676 * 1:Port-C/G/H (line-in)
677 * 2:Port-A
678 * 3:Port-D (line-in/2)
679 * 4:Port-E/G/H (mic-in)
680 * 5:Port-F (mic2-in)
685 * 0:Port-A
686 * 1:Port-B (front mic-in)
687 * 2:Port-C (line-in)
688 * 3:Port-F (mic2-in)
689 * 4:Port-E (mic-in)
691 * 6:Port-G
692 * 7:Port-H
693 * 8:Port-D (line-in/2)
698 * 6-stack
699 * Port-A front headphone
700 * B front mic-in
701 * C rear line-in
702 * D rear front-out
703 * E rear mic-in
708 * 3-stack
709 * Port-A front headphone
711 * C rear line-in/surround
712 * D rear front-out
713 * E rear mic-in/CLFE
716 * Port-A headphone
717 * B mic-in
726 struct hda_codec *codec = snd_kcontrol_chip(kcontrol); in ad1988_auto_smux_enum_info() local
727 struct ad198x_spec *spec = codec->spec; in ad1988_auto_smux_enum_info()
731 int num_conns = spec->num_smux_conns; in ad1988_auto_smux_enum_info()
741 struct hda_codec *codec = snd_kcontrol_chip(kcontrol); in ad1988_auto_smux_enum_get() local
742 struct ad198x_spec *spec = codec->spec; in ad1988_auto_smux_enum_get()
744 ucontrol->value.enumerated.item[0] = spec->cur_smux; in ad1988_auto_smux_enum_get()
751 struct hda_codec *codec = snd_kcontrol_chip(kcontrol); in ad1988_auto_smux_enum_put() local
752 struct ad198x_spec *spec = codec->spec; in ad1988_auto_smux_enum_put()
753 unsigned int val = ucontrol->value.enumerated.item[0]; in ad1988_auto_smux_enum_put()
755 int num_conns = spec->num_smux_conns; in ad1988_auto_smux_enum_put()
758 return -EINVAL; in ad1988_auto_smux_enum_put()
759 if (spec->cur_smux == val) in ad1988_auto_smux_enum_put()
762 mutex_lock(&codec->control_mutex); in ad1988_auto_smux_enum_put()
763 path = snd_hda_get_path_from_idx(codec, in ad1988_auto_smux_enum_put()
764 spec->smux_paths[spec->cur_smux]); in ad1988_auto_smux_enum_put()
766 snd_hda_activate_path(codec, path, false, true); in ad1988_auto_smux_enum_put()
767 path = snd_hda_get_path_from_idx(codec, spec->smux_paths[val]); in ad1988_auto_smux_enum_put()
769 snd_hda_activate_path(codec, path, true, true); in ad1988_auto_smux_enum_put()
770 spec->cur_smux = val; in ad1988_auto_smux_enum_put()
771 mutex_unlock(&codec->control_mutex); in ad1988_auto_smux_enum_put()
783 static int ad1988_auto_init(struct hda_codec *codec) in ad1988_auto_init() argument
785 struct ad198x_spec *spec = codec->spec; in ad1988_auto_init()
788 err = snd_hda_gen_init(codec); in ad1988_auto_init()
791 if (!spec->gen.autocfg.dig_outs) in ad1988_auto_init()
796 path = snd_hda_get_path_from_idx(codec, spec->smux_paths[i]); in ad1988_auto_init()
798 snd_hda_activate_path(codec, path, path->active, false); in ad1988_auto_init()
804 static int ad1988_add_spdif_mux_ctl(struct hda_codec *codec) in ad1988_add_spdif_mux_ctl() argument
806 struct ad198x_spec *spec = codec->spec; in ad1988_add_spdif_mux_ctl()
833 .idx = { 0, 2, 1, 0 }, in ad1988_add_spdif_mux_ctl()
839 if (!spec->gen.autocfg.dig_outs || in ad1988_add_spdif_mux_ctl()
840 get_wcaps_type(get_wcaps(codec, 0x1d)) != AC_WID_AUD_MIX) in ad1988_add_spdif_mux_ctl()
843 num_conns = snd_hda_get_num_conns(codec, 0x0b) + 1; in ad1988_add_spdif_mux_ctl()
846 spec->num_smux_conns = num_conns; in ad1988_add_spdif_mux_ctl()
849 struct nid_path *path = snd_array_new(&spec->gen.paths); in ad1988_add_spdif_mux_ctl()
851 return -ENOMEM; in ad1988_add_spdif_mux_ctl()
854 path->active = 1; in ad1988_add_spdif_mux_ctl()
855 spec->smux_paths[i] = snd_hda_get_path_idx(codec, path); in ad1988_add_spdif_mux_ctl()
858 if (!snd_hda_gen_add_kctl(&spec->gen, NULL, &ad1988_auto_smux_mixer)) in ad1988_add_spdif_mux_ctl()
859 return -ENOMEM; in ad1988_add_spdif_mux_ctl()
861 codec->patch_ops.init = ad1988_auto_init; in ad1988_add_spdif_mux_ctl()
877 { 0x11, 0x02214130 }, /* front-hp */
878 { 0x12, 0x01014010 }, /* line-out */
879 { 0x14, 0x02a19122 }, /* front-mic */
880 { 0x15, 0x01813021 }, /* line-in */
881 { 0x16, 0x01011012 }, /* line-out */
884 { 0x24, 0x01016011 }, /* line-out */
885 { 0x25, 0x01012013 }, /* line-out */
892 { .id = AD1988_FIXUP_6STACK_DIG, .name = "6stack-dig" },
896 static int patch_ad1988(struct hda_codec *codec) in patch_ad1988() argument
901 err = alloc_ad_spec(codec); in patch_ad1988()
904 spec = codec->spec; in patch_ad1988()
906 spec->gen.mixer_nid = 0x20; in patch_ad1988()
907 spec->gen.mixer_merge_nid = 0x21; in patch_ad1988()
908 spec->gen.beep_nid = 0x10; in patch_ad1988()
911 snd_hda_pick_fixup(codec, ad1988_fixup_models, NULL, ad1988_fixups); in patch_ad1988()
912 snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PRE_PROBE); in patch_ad1988()
914 err = ad198x_parse_auto_config(codec, true); in patch_ad1988()
917 err = ad1988_add_spdif_mux_ctl(codec); in patch_ad1988()
921 snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PROBE); in patch_ad1988()
926 snd_hda_gen_free(codec); in patch_ad1988()
934 * port-B - front line/mic-in
935 * port-E - aux in/out
936 * port-F - aux in/out
937 * port-C - rear line/mic-in
938 * port-D - rear line/hp-out
939 * port-A - front line/hp-out
941 * AD1984 = AD1884 + two digital mic-ins
945 * port-B (0x14) - front mic-in
946 * port-E (0x1c) - rear mic-in
947 * port-F (0x16) - CD / ext out
948 * port-C (0x15) - rear line-in
949 * port-D (0x12) - rear line-out
950 * port-A (0x11) - front hp-out
952 * AD1984A = AD1884A + digital-mic
954 * AD1984B = AD1984A + extra SPDIF-out
957 /* set the upper-limit for mixer amp to 0dB for avoiding the possible
960 static void ad1884_fixup_amp_override(struct hda_codec *codec, in ad1884_fixup_amp_override() argument
964 snd_hda_override_amp_caps(codec, 0x20, HDA_INPUT, in ad1884_fixup_amp_override()
974 struct hda_codec *codec = private_data; in ad1884_vmaster_hp_gpio_hook() local
975 struct ad198x_spec *spec = codec->spec; in ad1884_vmaster_hp_gpio_hook()
977 if (spec->eapd_nid) in ad1884_vmaster_hp_gpio_hook()
979 snd_hda_codec_write_cache(codec, 0x01, 0, in ad1884_vmaster_hp_gpio_hook()
984 static void ad1884_fixup_hp_eapd(struct hda_codec *codec, in ad1884_fixup_hp_eapd() argument
987 struct ad198x_spec *spec = codec->spec; in ad1884_fixup_hp_eapd()
991 spec->gen.vmaster_mute.hook = ad1884_vmaster_hp_gpio_hook; in ad1884_fixup_hp_eapd()
992 spec->gen.own_eapd_ctl = 1; in ad1884_fixup_hp_eapd()
993 snd_hda_codec_write_cache(codec, 0x01, 0, in ad1884_fixup_hp_eapd()
995 snd_hda_codec_write_cache(codec, 0x01, 0, in ad1884_fixup_hp_eapd()
997 snd_hda_codec_write_cache(codec, 0x01, 0, in ad1884_fixup_hp_eapd()
1001 if (spec->gen.autocfg.line_out_type == AUTO_PIN_SPEAKER_OUT) in ad1884_fixup_hp_eapd()
1002 spec->eapd_nid = spec->gen.autocfg.line_out_pins[0]; in ad1884_fixup_hp_eapd()
1004 spec->eapd_nid = spec->gen.autocfg.speaker_pins[0]; in ad1884_fixup_hp_eapd()
1009 static void ad1884_fixup_thinkpad(struct hda_codec *codec, in ad1884_fixup_thinkpad() argument
1012 struct ad198x_spec *spec = codec->spec; in ad1884_fixup_thinkpad()
1015 spec->gen.keep_eapd_on = 1; in ad1884_fixup_thinkpad()
1016 spec->gen.vmaster_mute.hook = ad_vmaster_eapd_hook; in ad1884_fixup_thinkpad()
1017 spec->eapd_nid = 0x12; in ad1884_fixup_thinkpad()
1018 /* Analog PC Beeper - allow firmware/ACPI beeps */ in ad1884_fixup_thinkpad()
1019 spec->beep_amp = HDA_COMPOSE_AMP_VAL(0x20, 3, 3, HDA_INPUT); in ad1884_fixup_thinkpad()
1020 spec->gen.beep_nid = 0; /* no digital beep */ in ad1884_fixup_thinkpad()
1076 static int patch_ad1884(struct hda_codec *codec) in patch_ad1884() argument
1081 err = alloc_ad_spec(codec); in patch_ad1884()
1084 spec = codec->spec; in patch_ad1884()
1086 spec->gen.mixer_nid = 0x20; in patch_ad1884()
1087 spec->gen.mixer_merge_nid = 0x21; in patch_ad1884()
1088 spec->gen.beep_nid = 0x10; in patch_ad1884()
1091 snd_hda_pick_fixup(codec, NULL, ad1884_fixup_tbl, ad1884_fixups); in patch_ad1884()
1092 snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PRE_PROBE); in patch_ad1884()
1094 err = ad198x_parse_auto_config(codec, true); in patch_ad1884()
1097 err = ad1983_add_spdif_mux_ctl(codec); in patch_ad1884()
1101 snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PROBE); in patch_ad1884()
1106 snd_hda_gen_free(codec); in patch_ad1884()
1113 * port-A - front hp-out
1114 * port-B - front mic-in
1115 * port-C - rear line-in, shared surr-out (3stack)
1116 * port-D - rear line-out
1117 * port-E - rear mic-in, shared clfe-out (3stack)
1118 * port-F - rear surr-out (6stack)
1119 * port-G - rear clfe-out (6stack)
1122 static int patch_ad1882(struct hda_codec *codec) in patch_ad1882() argument
1127 err = alloc_ad_spec(codec); in patch_ad1882()
1130 spec = codec->spec; in patch_ad1882()
1132 spec->gen.mixer_nid = 0x20; in patch_ad1882()
1133 spec->gen.mixer_merge_nid = 0x21; in patch_ad1882()
1134 spec->gen.beep_nid = 0x10; in patch_ad1882()
1136 err = ad198x_parse_auto_config(codec, true); in patch_ad1882()
1139 err = ad1988_add_spdif_mux_ctl(codec); in patch_ad1882()
1145 snd_hda_gen_free(codec); in patch_ad1882()
1174 MODULE_DESCRIPTION("Analog Devices HD-audio codec");