Lines Matching refs:spec
43 #define set_beep_amp(spec, nid, idx, dir) \
44 ((spec)->beep_amp = HDA_COMPOSE_AMP_VAL(nid, 1, idx, dir)) /* mono */
46 #define set_beep_amp(spec, nid, idx, dir) /* NOP */
52 struct ad198x_spec *spec = codec->spec;
55 if (!spec->beep_amp)
64 kctl->private_value = spec->beep_amp;
127 struct ad198x_spec *spec = codec->spec;
129 if (!spec->eapd_nid)
133 snd_hda_codec_write_cache(codec, spec->eapd_nid, 0,
170 struct ad198x_spec *spec = codec->spec;
171 struct auto_pin_cfg *cfg = &spec->gen.autocfg;
178 spec->gen.indep_hp = indep_hp;
179 if (!spec->gen.add_stereo_mix_input)
180 spec->gen.add_stereo_mix_input = HDA_HINT_STEREO_MIX_AUTO;
198 struct ad198x_spec *spec;
200 spec = kzalloc(sizeof(*spec), GFP_KERNEL);
201 if (!spec)
203 codec->spec = spec;
204 snd_hda_gen_spec_init(&spec->gen);
217 struct ad198x_spec *spec = codec->spec;
221 spec->gen.keep_eapd_on = 1;
222 spec->gen.vmaster_mute.hook = ad_vmaster_eapd_hook;
223 spec->eapd_nid = 0x1b;
231 struct ad198x_spec *spec = codec->spec;
235 spec->gen.keep_eapd_on = 1;
236 spec->eapd_nid = 0x1b;
244 struct ad198x_spec *spec = codec->spec;
248 spec->gen.add_stereo_mix_input = HDA_HINT_STEREO_MIX_ENABLE;
385 struct ad198x_spec *spec;
398 spec = codec->spec;
403 spec->gen.mixer_nid = 0x07;
404 spec->gen.beep_nid = 0x19;
405 set_beep_amp(spec, 0x18, 0, HDA_OUTPUT);
413 spec->gen.multiout.no_share_stream = 1;
415 spec->gen.preferred_dacs = preferred_pairs;
418 spec->gen.auto_mute_via_amp = 1;
447 struct ad198x_spec *spec = codec->spec;
450 int num_conns = spec->num_smux_conns;
464 struct ad198x_spec *spec = codec->spec;
466 ucontrol->value.enumerated.item[0] = spec->cur_smux;
474 struct ad198x_spec *spec = codec->spec;
476 hda_nid_t dig_out = spec->gen.multiout.dig_out_nid;
477 int num_conns = spec->num_smux_conns;
481 if (spec->cur_smux == val)
483 spec->cur_smux = val;
499 struct ad198x_spec *spec = codec->spec;
500 hda_nid_t dig_out = spec->gen.multiout.dig_out_nid;
508 spec->num_smux_conns = num_conns;
509 if (!snd_hda_gen_add_kctl(&spec->gen, NULL, &ad1983_auto_smux_mixer))
518 struct ad198x_spec *spec;
524 spec = codec->spec;
526 spec->gen.mixer_nid = 0x0e;
527 spec->gen.beep_nid = 0x10;
528 set_beep_amp(spec, 0x10, 0, HDA_OUTPUT);
555 struct ad198x_spec *spec = codec->spec;
558 spec->gen.vmaster_mute.hook = ad_vmaster_eapd_hook;
559 spec->eapd_nid = 0x05;
606 struct ad198x_spec *spec;
612 spec = codec->spec;
614 spec->gen.mixer_nid = 0x0e;
615 spec->gen.beep_nid = 0x10;
616 set_beep_amp(spec, 0x0d, 0, HDA_OUTPUT);
727 struct ad198x_spec *spec = codec->spec;
731 int num_conns = spec->num_smux_conns;
742 struct ad198x_spec *spec = codec->spec;
744 ucontrol->value.enumerated.item[0] = spec->cur_smux;
752 struct ad198x_spec *spec = codec->spec;
755 int num_conns = spec->num_smux_conns;
759 if (spec->cur_smux == val)
764 spec->smux_paths[spec->cur_smux]);
767 path = snd_hda_get_path_from_idx(codec, spec->smux_paths[val]);
770 spec->cur_smux = val;
785 struct ad198x_spec *spec = codec->spec;
791 if (!spec->gen.autocfg.dig_outs)
796 path = snd_hda_get_path_from_idx(codec, spec->smux_paths[i]);
806 struct ad198x_spec *spec = codec->spec;
839 if (!spec->gen.autocfg.dig_outs ||
846 spec->num_smux_conns = num_conns;
849 struct nid_path *path = snd_array_new(&spec->gen.paths);
855 spec->smux_paths[i] = snd_hda_get_path_idx(codec, path);
858 if (!snd_hda_gen_add_kctl(&spec->gen, NULL, &ad1988_auto_smux_mixer))
898 struct ad198x_spec *spec;
904 spec = codec->spec;
906 spec->gen.mixer_nid = 0x20;
907 spec->gen.mixer_merge_nid = 0x21;
908 spec->gen.beep_nid = 0x10;
909 set_beep_amp(spec, 0x10, 0, HDA_OUTPUT);
975 struct ad198x_spec *spec = codec->spec;
977 if (spec->eapd_nid)
987 struct ad198x_spec *spec = codec->spec;
991 spec->gen.vmaster_mute.hook = ad1884_vmaster_hp_gpio_hook;
992 spec->gen.own_eapd_ctl = 1;
1001 if (spec->gen.autocfg.line_out_type == AUTO_PIN_SPEAKER_OUT)
1002 spec->eapd_nid = spec->gen.autocfg.line_out_pins[0];
1004 spec->eapd_nid = spec->gen.autocfg.speaker_pins[0];
1012 struct ad198x_spec *spec = codec->spec;
1015 spec->gen.keep_eapd_on = 1;
1016 spec->gen.vmaster_mute.hook = ad_vmaster_eapd_hook;
1017 spec->eapd_nid = 0x12;
1019 spec->beep_amp = HDA_COMPOSE_AMP_VAL(0x20, 3, 3, HDA_INPUT);
1020 spec->gen.beep_nid = 0; /* no digital beep */
1078 struct ad198x_spec *spec;
1084 spec = codec->spec;
1086 spec->gen.mixer_nid = 0x20;
1087 spec->gen.mixer_merge_nid = 0x21;
1088 spec->gen.beep_nid = 0x10;
1089 set_beep_amp(spec, 0x10, 0, HDA_OUTPUT);
1124 struct ad198x_spec *spec;
1130 spec = codec->spec;
1132 spec->gen.mixer_nid = 0x20;
1133 spec->gen.mixer_merge_nid = 0x21;
1134 spec->gen.beep_nid = 0x10;
1135 set_beep_amp(spec, 0x10, 0, HDA_OUTPUT);