Lines Matching +full:ext +full:- +full:gen
5 * Copyright (c) 2005-2007 Takashi Iwai <tiwai@suse.de>
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
36 struct hda_gen_spec gen; member
56 ((spec)->beep_amp = HDA_COMPOSE_AMP_VAL(nid, 1, idx, dir)) /* mono */
64 struct ad198x_spec *spec = codec->spec; in create_beep_ctls()
67 if (!spec->beep_amp) in create_beep_ctls()
70 for (knew = ad_beep_mixer ; knew->name; knew++) { in create_beep_ctls()
75 return -ENOMEM; in create_beep_ctls()
76 kctl->private_value = spec->beep_amp; in create_beep_ctls()
93 !codec->inv_eapd ? 0x00 : 0x02); in ad198x_power_eapd_write()
96 !codec->inv_eapd ? 0x00 : 0x02); in ad198x_power_eapd_write()
102 switch (codec->core.vendor_id) { in ad198x_power_eapd()
145 struct ad198x_spec *spec = codec->spec; in ad_vmaster_eapd_hook()
147 if (!spec->eapd_nid) in ad_vmaster_eapd_hook()
149 if (codec->inv_eapd) in ad_vmaster_eapd_hook()
151 snd_hda_codec_write_cache(codec, spec->eapd_nid, 0, in ad_vmaster_eapd_hook()
189 struct ad198x_spec *spec = codec->spec; in ad198x_parse_auto_config()
190 struct auto_pin_cfg *cfg = &spec->gen.autocfg; in ad198x_parse_auto_config()
193 codec->spdif_status_reset = 1; in ad198x_parse_auto_config()
194 codec->no_trigger_sense = 1; in ad198x_parse_auto_config()
195 codec->no_sticky_stream = 1; in ad198x_parse_auto_config()
197 spec->gen.indep_hp = indep_hp; in ad198x_parse_auto_config()
198 if (!spec->gen.add_stereo_mix_input) in ad198x_parse_auto_config()
199 spec->gen.add_stereo_mix_input = HDA_HINT_STEREO_MIX_AUTO; in ad198x_parse_auto_config()
221 return -ENOMEM; in alloc_ad_spec()
222 codec->spec = spec; in alloc_ad_spec()
223 snd_hda_gen_spec_init(&spec->gen); in alloc_ad_spec()
224 codec->patch_ops = ad198x_auto_patch_ops; in alloc_ad_spec()
232 /* Lenovo N100 seems to report the reversed bit for HP jack-sensing */
236 struct ad198x_spec *spec = codec->spec; in ad_fixup_inv_jack_detect()
239 codec->inv_jack_detect = 1; in ad_fixup_inv_jack_detect()
240 spec->gen.keep_eapd_on = 1; in ad_fixup_inv_jack_detect()
241 spec->gen.vmaster_mute.hook = ad_vmaster_eapd_hook; in ad_fixup_inv_jack_detect()
242 spec->eapd_nid = 0x1b; in ad_fixup_inv_jack_detect()
250 struct ad198x_spec *spec = codec->spec; in ad1986a_fixup_eapd()
253 codec->inv_eapd = 0; in ad1986a_fixup_eapd()
254 spec->gen.keep_eapd_on = 1; in ad1986a_fixup_eapd()
255 spec->eapd_nid = 0x1b; in ad1986a_fixup_eapd()
259 /* enable stereo-mix input for avoiding regression on KDE (bko#88251) */
263 struct ad198x_spec *spec = codec->spec; in ad1986a_fixup_eapd_mix_in()
267 spec->gen.add_stereo_mix_input = HDA_HINT_STEREO_MIX_ENABLE; in ad1986a_fixup_eapd_mix_in()
311 { 0x1c, 0x01813030 }, /* line-in */
378 SND_PCI_QUIRK(0x10de, 0xcb84, "ASUS A8N-VM", AD1986A_FIXUP_3STACK),
393 { .id = AD1986A_FIXUP_LAPTOP_IMIC, .name = "laptop-imic" },
394 { .id = AD1986A_FIXUP_LAPTOP_IMIC, .name = "laptop-eapd" }, /* alias */
417 spec = codec->spec; in patch_ad1986a()
420 codec->inv_eapd = 1; in patch_ad1986a()
422 spec->gen.mixer_nid = 0x07; in patch_ad1986a()
423 spec->gen.beep_nid = 0x19; in patch_ad1986a()
432 spec->gen.multiout.no_share_stream = 1; in patch_ad1986a()
434 spec->gen.preferred_dacs = preferred_pairs; in patch_ad1986a()
437 spec->gen.auto_mute_via_amp = 1; in patch_ad1986a()
460 * SPDIF mux control for AD1983 auto-parser
466 struct ad198x_spec *spec = codec->spec; in ad1983_auto_smux_enum_info()
469 hda_nid_t dig_out = spec->gen.multiout.dig_out_nid; in ad1983_auto_smux_enum_info()
477 return -EINVAL; in ad1983_auto_smux_enum_info()
484 struct ad198x_spec *spec = codec->spec; in ad1983_auto_smux_enum_get()
486 ucontrol->value.enumerated.item[0] = spec->cur_smux; in ad1983_auto_smux_enum_get()
494 struct ad198x_spec *spec = codec->spec; in ad1983_auto_smux_enum_put()
495 unsigned int val = ucontrol->value.enumerated.item[0]; in ad1983_auto_smux_enum_put()
496 hda_nid_t dig_out = spec->gen.multiout.dig_out_nid; in ad1983_auto_smux_enum_put()
500 return -EINVAL; in ad1983_auto_smux_enum_put()
501 if (spec->cur_smux == val) in ad1983_auto_smux_enum_put()
503 spec->cur_smux = val; in ad1983_auto_smux_enum_put()
519 struct ad198x_spec *spec = codec->spec; in ad1983_add_spdif_mux_ctl()
520 hda_nid_t dig_out = spec->gen.multiout.dig_out_nid; in ad1983_add_spdif_mux_ctl()
528 if (!snd_hda_gen_add_kctl(&spec->gen, NULL, &ad1983_auto_smux_mixer)) in ad1983_add_spdif_mux_ctl()
529 return -ENOMEM; in ad1983_add_spdif_mux_ctl()
543 spec = codec->spec; in patch_ad1983()
545 spec->gen.mixer_nid = 0x0e; in patch_ad1983()
546 spec->gen.beep_nid = 0x10; in patch_ad1983()
574 struct ad198x_spec *spec = codec->spec; in ad1981_fixup_hp_eapd()
577 spec->gen.vmaster_mute.hook = ad_vmaster_eapd_hook; in ad1981_fixup_hp_eapd()
578 spec->eapd_nid = 0x05; in ad1981_fixup_hp_eapd()
582 /* set the upper-limit for mixer amp to 0dB for avoiding the possible
630 return -ENOMEM; in patch_ad1981()
631 spec = codec->spec; in patch_ad1981()
633 spec->gen.mixer_nid = 0x0e; in patch_ad1981()
634 spec->gen.beep_nid = 0x10; in patch_ad1981()
663 * port-A 0x11 (mute/hp) <- 0x22 <- 0x37 <- 03/04/06
664 * port-B 0x14 (mute/hp) <- 0x2b <- 0x30 <- 03/04/06
665 * port-C 0x15 (mute) <- 0x2c <- 0x31 <- 05/0a
666 * port-D 0x12 (mute/hp) <- 0x29 <- 04
667 * port-E 0x17 (mute/hp) <- 0x26 <- 0x32 <- 05/0a
668 * port-F 0x16 (mute) <- 0x2a <- 06
669 * port-G 0x24 (mute) <- 0x27 <- 05
670 * port-H 0x25 (mute) <- 0x28 <- 0a
671 * mono 0x13 (mute/amp)<- 0x1e <- 0x36 <- 03/04/06
679 * port-A 0x11 -> 0x38 -> mix 2, ADC 0
680 * port-B 0x14 -> 0x39 -> mix 0, ADC 1
681 * port-C 0x15 -> 0x3a -> 33:0 - mix 1, ADC 2
682 * port-D 0x12 -> 0x3d -> mix 3, ADC 8
683 * port-E 0x17 -> 0x3c -> 34:0 - mix 4, ADC 4
684 * port-F 0x16 -> 0x3b -> mix 5, ADC 3
685 * port-G 0x24 -> N/A -> 33:1 - mix 1, 34:1 - mix 4, ADC 6
686 * port-H 0x25 -> N/A -> 33:2 - mix 1, 34:2 - mix 4, ADC 7
690 * 6stack - front/surr/CLFE/side/opt DACs - 04/06/05/0a/03
691 * 3stack - front/surr/CLFE/opt DACs - 04/05/0a/03
694 * 0:Port-B (front mic)
695 * 1:Port-C/G/H (line-in)
696 * 2:Port-A
697 * 3:Port-D (line-in/2)
698 * 4:Port-E/G/H (mic-in)
699 * 5:Port-F (mic2-in)
704 * 0:Port-A
705 * 1:Port-B (front mic-in)
706 * 2:Port-C (line-in)
707 * 3:Port-F (mic2-in)
708 * 4:Port-E (mic-in)
710 * 6:Port-G
711 * 7:Port-H
712 * 8:Port-D (line-in/2)
717 * 6-stack
718 * Port-A front headphone
719 * B front mic-in
720 * C rear line-in
721 * D rear front-out
722 * E rear mic-in
727 * 3-stack
728 * Port-A front headphone
730 * C rear line-in/surround
731 * D rear front-out
732 * E rear mic-in/CLFE
735 * Port-A headphone
736 * B mic-in
759 struct ad198x_spec *spec = codec->spec; in ad1988_auto_smux_enum_get()
761 ucontrol->value.enumerated.item[0] = spec->cur_smux; in ad1988_auto_smux_enum_get()
769 struct ad198x_spec *spec = codec->spec; in ad1988_auto_smux_enum_put()
770 unsigned int val = ucontrol->value.enumerated.item[0]; in ad1988_auto_smux_enum_put()
775 return -EINVAL; in ad1988_auto_smux_enum_put()
776 if (spec->cur_smux == val) in ad1988_auto_smux_enum_put()
779 mutex_lock(&codec->control_mutex); in ad1988_auto_smux_enum_put()
781 spec->smux_paths[spec->cur_smux]); in ad1988_auto_smux_enum_put()
784 path = snd_hda_get_path_from_idx(codec, spec->smux_paths[val]); in ad1988_auto_smux_enum_put()
787 spec->cur_smux = val; in ad1988_auto_smux_enum_put()
788 mutex_unlock(&codec->control_mutex); in ad1988_auto_smux_enum_put()
802 struct ad198x_spec *spec = codec->spec; in ad1988_auto_init()
808 if (!spec->gen.autocfg.dig_outs) in ad1988_auto_init()
813 path = snd_hda_get_path_from_idx(codec, spec->smux_paths[i]); in ad1988_auto_init()
815 snd_hda_activate_path(codec, path, path->active, false); in ad1988_auto_init()
823 struct ad198x_spec *spec = codec->spec; in ad1988_add_spdif_mux_ctl()
856 if (!spec->gen.autocfg.dig_outs || in ad1988_add_spdif_mux_ctl()
865 struct nid_path *path = snd_array_new(&spec->gen.paths); in ad1988_add_spdif_mux_ctl()
867 return -ENOMEM; in ad1988_add_spdif_mux_ctl()
870 path->active = 1; in ad1988_add_spdif_mux_ctl()
871 spec->smux_paths[i] = snd_hda_get_path_idx(codec, path); in ad1988_add_spdif_mux_ctl()
874 if (!snd_hda_gen_add_kctl(&spec->gen, NULL, &ad1988_auto_smux_mixer)) in ad1988_add_spdif_mux_ctl()
875 return -ENOMEM; in ad1988_add_spdif_mux_ctl()
877 codec->patch_ops.init = ad1988_auto_init; in ad1988_add_spdif_mux_ctl()
893 { 0x11, 0x02214130 }, /* front-hp */
894 { 0x12, 0x01014010 }, /* line-out */
895 { 0x14, 0x02a19122 }, /* front-mic */
896 { 0x15, 0x01813021 }, /* line-in */
897 { 0x16, 0x01011012 }, /* line-out */
900 { 0x24, 0x01016011 }, /* line-out */
901 { 0x25, 0x01012013 }, /* line-out */
908 { .id = AD1988_FIXUP_6STACK_DIG, .name = "6stack-dig" },
920 spec = codec->spec; in patch_ad1988()
922 spec->gen.mixer_nid = 0x20; in patch_ad1988()
923 spec->gen.mixer_merge_nid = 0x21; in patch_ad1988()
924 spec->gen.beep_nid = 0x10; in patch_ad1988()
950 * port-B - front line/mic-in
951 * port-E - aux in/out
952 * port-F - aux in/out
953 * port-C - rear line/mic-in
954 * port-D - rear line/hp-out
955 * port-A - front line/hp-out
957 * AD1984 = AD1884 + two digital mic-ins
961 * port-B (0x14) - front mic-in
962 * port-E (0x1c) - rear mic-in
963 * port-F (0x16) - CD / ext out
964 * port-C (0x15) - rear line-in
965 * port-D (0x12) - rear line-out
966 * port-A (0x11) - front hp-out
968 * AD1984A = AD1884A + digital-mic
970 * AD1984B = AD1984A + extra SPDIF-out
973 /* set the upper-limit for mixer amp to 0dB for avoiding the possible
991 struct ad198x_spec *spec = codec->spec; in ad1884_vmaster_hp_gpio_hook()
993 if (spec->eapd_nid) in ad1884_vmaster_hp_gpio_hook()
1003 struct ad198x_spec *spec = codec->spec; in ad1884_fixup_hp_eapd()
1007 spec->gen.vmaster_mute.hook = ad1884_vmaster_hp_gpio_hook; in ad1884_fixup_hp_eapd()
1008 spec->gen.own_eapd_ctl = 1; in ad1884_fixup_hp_eapd()
1017 if (spec->gen.autocfg.line_out_type == AUTO_PIN_SPEAKER_OUT) in ad1884_fixup_hp_eapd()
1018 spec->eapd_nid = spec->gen.autocfg.line_out_pins[0]; in ad1884_fixup_hp_eapd()
1020 spec->eapd_nid = spec->gen.autocfg.speaker_pins[0]; in ad1884_fixup_hp_eapd()
1028 struct ad198x_spec *spec = codec->spec; in ad1884_fixup_thinkpad()
1031 spec->gen.keep_eapd_on = 1; in ad1884_fixup_thinkpad()
1032 spec->gen.vmaster_mute.hook = ad_vmaster_eapd_hook; in ad1884_fixup_thinkpad()
1033 spec->eapd_nid = 0x12; in ad1884_fixup_thinkpad()
1034 /* Analog PC Beeper - allow firmware/ACPI beeps */ in ad1884_fixup_thinkpad()
1035 spec->beep_amp = HDA_COMPOSE_AMP_VAL(0x20, 3, 3, HDA_INPUT); in ad1884_fixup_thinkpad()
1036 spec->gen.beep_nid = 0; /* no digital beep */ in ad1884_fixup_thinkpad()
1100 spec = codec->spec; in patch_ad1884()
1102 spec->gen.mixer_nid = 0x20; in patch_ad1884()
1103 spec->gen.mixer_merge_nid = 0x21; in patch_ad1884()
1104 spec->gen.beep_nid = 0x10; in patch_ad1884()
1129 * port-A - front hp-out
1130 * port-B - front mic-in
1131 * port-C - rear line-in, shared surr-out (3stack)
1132 * port-D - rear line-out
1133 * port-E - rear mic-in, shared clfe-out (3stack)
1134 * port-F - rear surr-out (6stack)
1135 * port-G - rear clfe-out (6stack)
1146 spec = codec->spec; in patch_ad1882()
1148 spec->gen.mixer_nid = 0x20; in patch_ad1882()
1149 spec->gen.mixer_merge_nid = 0x21; in patch_ad1882()
1150 spec->gen.beep_nid = 0x10; in patch_ad1882()
1190 MODULE_DESCRIPTION("Analog Devices HD-audio codec");