Lines Matching refs: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);
173 hda_nid_t nid;
190 for_each_hda_codec_node(nid, codec) {
191 unsigned int wid_caps = get_wcaps(codec, nid);
200 if (ignore_nids && is_in_nid_list(nid, ignore_nids))
203 def_conf = snd_hda_codec_get_pincfg(codec, nid);
217 if (!check_pincap_validity(codec, nid, dev))
227 cfg->mono_out_pin = nid;
235 nid, assoc, assoc_line_out);
241 nid);
244 line_out[cfg->line_outs].pin = nid;
254 nid);
257 speaker_out[cfg->speaker_outs].pin = nid;
267 nid);
270 hp_out[cfg->hp_outs].pin = nid;
275 add_auto_cfg_input_pin(codec, cfg, nid, AUTO_PIN_MIC);
278 add_auto_cfg_input_pin(codec, cfg, nid, AUTO_PIN_LINE_IN);
281 add_auto_cfg_input_pin(codec, cfg, nid, AUTO_PIN_CD);
284 add_auto_cfg_input_pin(codec, cfg, nid, AUTO_PIN_AUX);
291 nid);
294 cfg->dig_out_pins[cfg->dig_outs] = nid;
302 cfg->dig_in_pin = nid;
589 static int find_idx_in_nid_list(hda_nid_t nid, const hda_nid_t *list, int nums)
593 if (list[i] == nid)
599 static const char *check_output_sfx(hda_nid_t nid, const hda_nid_t *pins,
607 i = find_idx_in_nid_list(nid, pins, num_pins);
620 static const char *check_output_pfx(struct hda_codec *codec, hda_nid_t nid)
622 unsigned int def_conf = snd_hda_codec_get_pincfg(codec, nid);
635 static int get_hp_label_index(struct hda_codec *codec, hda_nid_t nid,
640 const char *pfx = check_output_pfx(codec, nid);
642 i = find_idx_in_nid_list(nid, pins, num_pins);
652 static int fill_audio_out_name(struct hda_codec *codec, hda_nid_t nid,
657 unsigned int def_conf = snd_hda_codec_get_pincfg(codec, nid);
664 pfx = check_output_pfx(codec, nid);
668 sfx = check_output_sfx(nid, cfg->line_out_pins, cfg->line_outs,
671 sfx = check_output_sfx(nid, cfg->speaker_pins, cfg->speaker_outs,
675 int idx = get_hp_label_index(codec, nid, cfg->hp_pins,
692 * @nid: pin NID
708 int snd_hda_get_pin_label(struct hda_codec *codec, hda_nid_t nid,
712 unsigned int def_conf = snd_hda_codec_get_pincfg(codec, nid);
724 return fill_audio_out_name(codec, nid, cfg, "Line Out",
727 return fill_audio_out_name(codec, nid, cfg, "Speaker",
730 return fill_audio_out_name(codec, nid, cfg, "Headphone",
740 if (pin == nid)
750 if (cfg->inputs[i].pin != nid)
758 name = hda_get_input_pin_label(codec, NULL, nid, true);
810 for (; cfg->nid; cfg++)
811 snd_hda_codec_set_pincfg(codec, cfg->nid, cfg->val);
818 for (; cfg->nid; cfg++)
819 snd_hda_set_pin_ctl_cache(codec, cfg->nid, cfg->val);
897 hda_nid_t nid = pin->nid;
904 for (; t_pins->nid; t_pins++) {
905 if (t_pins->nid == nid) {