Lines Matching refs:nid

20 static int is_in_nid_list(hda_nid_t nid, const hda_nid_t *list)  in is_in_nid_list()  argument
23 if (*list == nid) in is_in_nid_list()
57 hda_nid_t nid, int type) in add_auto_cfg_input_pin() argument
60 cfg->inputs[cfg->num_inputs].pin = nid; in add_auto_cfg_input_pin()
63 nid_has_volume(codec, nid, HDA_INPUT); in add_auto_cfg_input_pin()
95 hda_nid_t nid; in reorder_outputs() local
100 nid = pins[1]; in reorder_outputs()
102 pins[2] = nid; in reorder_outputs()
177 hda_nid_t nid; in snd_hda_parse_pin_defcfg() local
194 for_each_hda_codec_node(nid, codec) { in snd_hda_parse_pin_defcfg()
195 unsigned int wid_caps = get_wcaps(codec, nid); in snd_hda_parse_pin_defcfg()
204 if (ignore_nids && is_in_nid_list(nid, ignore_nids)) in snd_hda_parse_pin_defcfg()
207 def_conf = snd_hda_codec_get_pincfg(codec, nid); in snd_hda_parse_pin_defcfg()
221 if (!check_pincap_validity(codec, nid, dev)) in snd_hda_parse_pin_defcfg()
231 cfg->mono_out_pin = nid; in snd_hda_parse_pin_defcfg()
239 nid, assoc, assoc_line_out); in snd_hda_parse_pin_defcfg()
245 nid); in snd_hda_parse_pin_defcfg()
248 line_out[cfg->line_outs].pin = nid; in snd_hda_parse_pin_defcfg()
258 nid); in snd_hda_parse_pin_defcfg()
261 speaker_out[cfg->speaker_outs].pin = nid; in snd_hda_parse_pin_defcfg()
271 nid); in snd_hda_parse_pin_defcfg()
274 hp_out[cfg->hp_outs].pin = nid; in snd_hda_parse_pin_defcfg()
279 add_auto_cfg_input_pin(codec, cfg, nid, AUTO_PIN_MIC); in snd_hda_parse_pin_defcfg()
282 add_auto_cfg_input_pin(codec, cfg, nid, AUTO_PIN_LINE_IN); in snd_hda_parse_pin_defcfg()
285 add_auto_cfg_input_pin(codec, cfg, nid, AUTO_PIN_CD); in snd_hda_parse_pin_defcfg()
288 add_auto_cfg_input_pin(codec, cfg, nid, AUTO_PIN_AUX); in snd_hda_parse_pin_defcfg()
295 nid); in snd_hda_parse_pin_defcfg()
298 cfg->dig_out_pins[cfg->dig_outs] = nid; in snd_hda_parse_pin_defcfg()
306 cfg->dig_in_pin = nid; in snd_hda_parse_pin_defcfg()
593 static int find_idx_in_nid_list(hda_nid_t nid, const hda_nid_t *list, int nums) in find_idx_in_nid_list() argument
597 if (list[i] == nid) in find_idx_in_nid_list()
603 static const char *check_output_sfx(hda_nid_t nid, const hda_nid_t *pins, in check_output_sfx() argument
611 i = find_idx_in_nid_list(nid, pins, num_pins); in check_output_sfx()
624 static const char *check_output_pfx(struct hda_codec *codec, hda_nid_t nid) in check_output_pfx() argument
626 unsigned int def_conf = snd_hda_codec_get_pincfg(codec, nid); in check_output_pfx()
639 static int get_hp_label_index(struct hda_codec *codec, hda_nid_t nid, in get_hp_label_index() argument
644 const char *pfx = check_output_pfx(codec, nid); in get_hp_label_index()
646 i = find_idx_in_nid_list(nid, pins, num_pins); in get_hp_label_index()
656 static int fill_audio_out_name(struct hda_codec *codec, hda_nid_t nid, in fill_audio_out_name() argument
661 unsigned int def_conf = snd_hda_codec_get_pincfg(codec, nid); in fill_audio_out_name()
668 pfx = check_output_pfx(codec, nid); in fill_audio_out_name()
672 sfx = check_output_sfx(nid, cfg->line_out_pins, cfg->line_outs, in fill_audio_out_name()
675 sfx = check_output_sfx(nid, cfg->speaker_pins, cfg->speaker_outs, in fill_audio_out_name()
679 int idx = get_hp_label_index(codec, nid, cfg->hp_pins, in fill_audio_out_name()
712 int snd_hda_get_pin_label(struct hda_codec *codec, hda_nid_t nid, in snd_hda_get_pin_label() argument
716 unsigned int def_conf = snd_hda_codec_get_pincfg(codec, nid); in snd_hda_get_pin_label()
728 return fill_audio_out_name(codec, nid, cfg, "Line Out", in snd_hda_get_pin_label()
731 return fill_audio_out_name(codec, nid, cfg, "Speaker", in snd_hda_get_pin_label()
734 return fill_audio_out_name(codec, nid, cfg, "Headphone", in snd_hda_get_pin_label()
744 if (pin == nid) in snd_hda_get_pin_label()
754 if (cfg->inputs[i].pin != nid) in snd_hda_get_pin_label()
762 name = hda_get_input_pin_label(codec, NULL, nid, true); in snd_hda_get_pin_label()
814 for (; cfg->nid; cfg++) in snd_hda_apply_pincfgs()
815 snd_hda_codec_set_pincfg(codec, cfg->nid, cfg->val); in snd_hda_apply_pincfgs()
822 for (; cfg->nid; cfg++) in set_pin_targets()
823 snd_hda_set_pin_ctl_cache(codec, cfg->nid, cfg->val); in set_pin_targets()
900 hda_nid_t nid = pin->nid; in pin_config_match() local
907 for (; t_pins->nid; t_pins++) { in pin_config_match()
908 if (t_pins->nid == nid) { in pin_config_match()