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;
133 struct ad198x_spec *spec = codec->spec;
135 if (!spec->eapd_nid)
139 snd_hda_codec_write_cache(codec, spec->eapd_nid, 0,
177 struct ad198x_spec *spec = codec->spec;
178 struct auto_pin_cfg *cfg = &spec->gen.autocfg;
185 spec->gen.indep_hp = indep_hp;
186 if (!spec->gen.add_stereo_mix_input)
187 spec->gen.add_stereo_mix_input = HDA_HINT_STEREO_MIX_AUTO;
205 struct ad198x_spec *spec;
207 spec = kzalloc(sizeof(*spec), GFP_KERNEL);
208 if (!spec)
210 codec->spec = spec;
211 snd_hda_gen_spec_init(&spec->gen);
224 struct ad198x_spec *spec = codec->spec;
228 spec->gen.keep_eapd_on = 1;
229 spec->gen.vmaster_mute.hook = ad_vmaster_eapd_hook;
230 spec->eapd_nid = 0x1b;
238 struct ad198x_spec *spec = codec->spec;
242 spec->gen.keep_eapd_on = 1;
243 spec->eapd_nid = 0x1b;
251 struct ad198x_spec *spec = codec->spec;
255 spec->gen.add_stereo_mix_input = HDA_HINT_STEREO_MIX_ENABLE;
392 struct ad198x_spec *spec;
405 spec = codec->spec;
410 spec->gen.mixer_nid = 0x07;
411 spec->gen.beep_nid = 0x19;
412 set_beep_amp(spec, 0x18, 0, HDA_OUTPUT);
420 spec->gen.multiout.no_share_stream = 1;
422 spec->gen.preferred_dacs = preferred_pairs;
425 spec->gen.auto_mute_via_amp = 1;
454 struct ad198x_spec *spec = codec->spec;
457 int num_conns = spec->num_smux_conns;
471 struct ad198x_spec *spec = codec->spec;
473 ucontrol->value.enumerated.item[0] = spec->cur_smux;
481 struct ad198x_spec *spec = codec->spec;
483 hda_nid_t dig_out = spec->gen.multiout.dig_out_nid;
484 int num_conns = spec->num_smux_conns;
488 if (spec->cur_smux == val)
490 spec->cur_smux = val;
506 struct ad198x_spec *spec = codec->spec;
507 hda_nid_t dig_out = spec->gen.multiout.dig_out_nid;
515 spec->num_smux_conns = num_conns;
516 if (!snd_hda_gen_add_kctl(&spec->gen, NULL, &ad1983_auto_smux_mixer))
525 struct ad198x_spec *spec;
531 spec = codec->spec;
533 spec->gen.mixer_nid = 0x0e;
534 spec->gen.beep_nid = 0x10;
535 set_beep_amp(spec, 0x10, 0, HDA_OUTPUT);
562 struct ad198x_spec *spec = codec->spec;
565 spec->gen.vmaster_mute.hook = ad_vmaster_eapd_hook;
566 spec->eapd_nid = 0x05;
613 struct ad198x_spec *spec;
619 spec = codec->spec;
621 spec->gen.mixer_nid = 0x0e;
622 spec->gen.beep_nid = 0x10;
623 set_beep_amp(spec, 0x0d, 0, HDA_OUTPUT);
734 struct ad198x_spec *spec = codec->spec;
738 int num_conns = spec->num_smux_conns;
749 struct ad198x_spec *spec = codec->spec;
751 ucontrol->value.enumerated.item[0] = spec->cur_smux;
759 struct ad198x_spec *spec = codec->spec;
762 int num_conns = spec->num_smux_conns;
766 if (spec->cur_smux == val)
771 spec->smux_paths[spec->cur_smux]);
774 path = snd_hda_get_path_from_idx(codec, spec->smux_paths[val]);
777 spec->cur_smux = val;
792 struct ad198x_spec *spec = codec->spec;
798 if (!spec->gen.autocfg.dig_outs)
803 path = snd_hda_get_path_from_idx(codec, spec->smux_paths[i]);
813 struct ad198x_spec *spec = codec->spec;
846 if (!spec->gen.autocfg.dig_outs ||
853 spec->num_smux_conns = num_conns;
856 struct nid_path *path = snd_array_new(&spec->gen.paths);
862 spec->smux_paths[i] = snd_hda_get_path_idx(codec, path);
865 if (!snd_hda_gen_add_kctl(&spec->gen, NULL, &ad1988_auto_smux_mixer))
905 struct ad198x_spec *spec;
911 spec = codec->spec;
913 spec->gen.mixer_nid = 0x20;
914 spec->gen.mixer_merge_nid = 0x21;
915 spec->gen.beep_nid = 0x10;
916 set_beep_amp(spec, 0x10, 0, HDA_OUTPUT);
982 struct ad198x_spec *spec = codec->spec;
984 if (spec->eapd_nid)
994 struct ad198x_spec *spec = codec->spec;
998 spec->gen.vmaster_mute.hook = ad1884_vmaster_hp_gpio_hook;
999 spec->gen.own_eapd_ctl = 1;
1008 if (spec->gen.autocfg.line_out_type == AUTO_PIN_SPEAKER_OUT)
1009 spec->eapd_nid = spec->gen.autocfg.line_out_pins[0];
1011 spec->eapd_nid = spec->gen.autocfg.speaker_pins[0];
1019 struct ad198x_spec *spec = codec->spec;
1022 spec->gen.keep_eapd_on = 1;
1023 spec->gen.vmaster_mute.hook = ad_vmaster_eapd_hook;
1024 spec->eapd_nid = 0x12;
1026 spec->beep_amp = HDA_COMPOSE_AMP_VAL(0x20, 3, 3, HDA_INPUT);
1027 spec->gen.beep_nid = 0; /* no digital beep */
1085 struct ad198x_spec *spec;
1091 spec = codec->spec;
1093 spec->gen.mixer_nid = 0x20;
1094 spec->gen.mixer_merge_nid = 0x21;
1095 spec->gen.beep_nid = 0x10;
1096 set_beep_amp(spec, 0x10, 0, HDA_OUTPUT);
1131 struct ad198x_spec *spec;
1137 spec = codec->spec;
1139 spec->gen.mixer_nid = 0x20;
1140 spec->gen.mixer_merge_nid = 0x21;
1141 spec->gen.beep_nid = 0x10;
1142 set_beep_amp(spec, 0x10, 0, HDA_OUTPUT);