Lines Matching defs:nid

20 static int is_in_nid_list(hda_nid_t nid, const hda_nid_t *list)
23 if (*list == nid)
57 hda_nid_t nid, int type)
60 cfg->inputs[cfg->num_inputs].pin = nid;
63 nid_has_volume(codec, nid, HDA_INPUT);
177 hda_nid_t nid;
194 for_each_hda_codec_node(nid, codec) {
195 unsigned int wid_caps = get_wcaps(codec, nid);
204 if (ignore_nids && is_in_nid_list(nid, ignore_nids))
207 def_conf = snd_hda_codec_get_pincfg(codec, nid);
221 if (!check_pincap_validity(codec, nid, dev))
231 cfg->mono_out_pin = nid;
239 nid, assoc, assoc_line_out);
245 nid);
248 line_out[cfg->line_outs].pin = nid;
258 nid);
261 speaker_out[cfg->speaker_outs].pin = nid;
271 nid);
274 hp_out[cfg->hp_outs].pin = nid;
279 add_auto_cfg_input_pin(codec, cfg, nid, AUTO_PIN_MIC);
282 add_auto_cfg_input_pin(codec, cfg, nid, AUTO_PIN_LINE_IN);
285 add_auto_cfg_input_pin(codec, cfg, nid, AUTO_PIN_CD);
288 add_auto_cfg_input_pin(codec, cfg, nid, AUTO_PIN_AUX);
295 nid);
298 cfg->dig_out_pins[cfg->dig_outs] = nid;
306 cfg->dig_in_pin = nid;
595 static int find_idx_in_nid_list(hda_nid_t nid, const hda_nid_t *list, int nums)
599 if (list[i] == nid)
605 static const char *check_output_sfx(hda_nid_t nid, const hda_nid_t *pins,
613 i = find_idx_in_nid_list(nid, pins, num_pins);
626 static const char *check_output_pfx(struct hda_codec *codec, hda_nid_t nid)
628 unsigned int def_conf = snd_hda_codec_get_pincfg(codec, nid);
641 static int get_hp_label_index(struct hda_codec *codec, hda_nid_t nid,
646 const char *pfx = check_output_pfx(codec, nid);
648 i = find_idx_in_nid_list(nid, pins, num_pins);
658 static int fill_audio_out_name(struct hda_codec *codec, hda_nid_t nid,
663 unsigned int def_conf = snd_hda_codec_get_pincfg(codec, nid);
670 pfx = check_output_pfx(codec, nid);
674 sfx = check_output_sfx(nid, cfg->line_out_pins, cfg->line_outs,
677 sfx = check_output_sfx(nid, cfg->speaker_pins, cfg->speaker_outs,
681 int idx = get_hp_label_index(codec, nid, cfg->hp_pins,
698 * @nid: pin NID
714 int snd_hda_get_pin_label(struct hda_codec *codec, hda_nid_t nid,
718 unsigned int def_conf = snd_hda_codec_get_pincfg(codec, nid);
730 return fill_audio_out_name(codec, nid, cfg, "Line Out",
733 return fill_audio_out_name(codec, nid, cfg, "Speaker",
736 return fill_audio_out_name(codec, nid, cfg, "Headphone",
746 if (pin == nid)
756 if (cfg->inputs[i].pin != nid)
764 name = hda_get_input_pin_label(codec, NULL, nid, true);
816 for (; cfg->nid; cfg++)
817 snd_hda_codec_set_pincfg(codec, cfg->nid, cfg->val);
824 for (; cfg->nid; cfg++)
825 snd_hda_set_pin_ctl_cache(codec, cfg->nid, cfg->val);
903 hda_nid_t nid = pin->nid;
910 for (; t_pins->nid; t_pins++) {
911 if (t_pins->nid == nid) {