Home
last modified time | relevance | path

Searched refs:nid (Results 1 – 25 of 32) sorted by relevance

12

/sound/pci/hda/
Dhda_proc.c73 struct hda_codec *codec, hda_nid_t nid, in print_nid_array() argument
81 if (item->nid == nid) { in print_nid_array()
100 struct hda_codec *codec, hda_nid_t nid) in print_nid_pcms() argument
107 if (cpcm->stream[type].nid != nid || cpcm->pcm == NULL) in print_nid_pcms()
119 struct hda_codec *codec, hda_nid_t nid, int dir) in print_amp_caps() argument
122 caps = snd_hda_param_read(codec, nid, in print_amp_caps()
138 static bool is_stereo_amps(struct hda_codec *codec, hda_nid_t nid, in is_stereo_amps() argument
152 if (snd_hda_get_raw_connections(codec, nid, &conn, 1) < 0) in is_stereo_amps()
160 struct hda_codec *codec, hda_nid_t nid, in print_amp_vals() argument
167 stereo = is_stereo_amps(codec, nid, dir, wcaps, indices); in print_amp_vals()
[all …]
Dhda_local.h39 #define HDA_COMPOSE_AMP_VAL_OFS(nid,chs,idx,dir,ofs) \ argument
40 ((nid) | ((chs)<<16) | ((dir)<<18) | ((idx)<<19) | ((ofs)<<23))
42 #define HDA_COMPOSE_AMP_VAL(nid,chs,idx,dir) \ argument
43 HDA_COMPOSE_AMP_VAL_OFS(nid, chs, idx, dir, 0)
45 #define HDA_CODEC_VOLUME_MONO_IDX(xname, xcidx, nid, channel, xindex, dir, flags) \ argument
55 .private_value = HDA_COMPOSE_AMP_VAL(nid, channel, xindex, dir) | flags }
57 #define HDA_CODEC_VOLUME_IDX(xname, xcidx, nid, xindex, direction) \ argument
58 HDA_CODEC_VOLUME_MONO_IDX(xname, xcidx, nid, 3, xindex, direction, 0)
60 #define HDA_CODEC_VOLUME_MONO(xname, nid, channel, xindex, direction) \ argument
61 HDA_CODEC_VOLUME_MONO_IDX(xname, 0, nid, channel, xindex, direction, 0)
[all …]
Dhda_jack.c23 bool is_jack_detectable(struct hda_codec *codec, hda_nid_t nid) in is_jack_detectable() argument
27 if (!(snd_hda_query_pin_caps(codec, nid) & AC_PINCAP_PRES_DETECT)) in is_jack_detectable()
29 if (get_defcfg_misc(snd_hda_codec_get_pincfg(codec, nid)) & in is_jack_detectable()
32 if (!(get_wcaps(codec, nid) & AC_WCAP_UNSOL_CAP) && in is_jack_detectable()
40 static u32 read_pin_sense(struct hda_codec *codec, hda_nid_t nid) in read_pin_sense() argument
46 pincap = snd_hda_query_pin_caps(codec, nid); in read_pin_sense()
48 snd_hda_codec_read(codec, nid, 0, in read_pin_sense()
51 val = snd_hda_codec_read(codec, nid, 0, in read_pin_sense()
62 snd_hda_jack_tbl_get(struct hda_codec *codec, hda_nid_t nid) in snd_hda_jack_tbl_get() argument
67 if (!nid || !jack) in snd_hda_jack_tbl_get()
[all …]
Dhda_codec.c197 make_codec_cmd(struct hda_codec *codec, hda_nid_t nid, int flags, in make_codec_cmd() argument
202 if ((codec->addr & ~0xf) || (nid & ~0x7f) || in make_codec_cmd()
205 codec->addr, nid, verb, parm); in make_codec_cmd()
210 val |= (u32)nid << 20; in make_codec_cmd()
277 unsigned int snd_hda_codec_read(struct hda_codec *codec, hda_nid_t nid, in snd_hda_codec_read() argument
281 unsigned cmd = make_codec_cmd(codec, nid, flags, verb, parm); in snd_hda_codec_read()
301 int snd_hda_codec_write(struct hda_codec *codec, hda_nid_t nid, int flags, in snd_hda_codec_write() argument
304 unsigned int cmd = make_codec_cmd(codec, nid, flags, verb, parm); in snd_hda_codec_write()
321 for (; seq->nid; seq++) in snd_hda_sequence_write()
322 snd_hda_codec_write(codec, seq->nid, 0, seq->verb, seq->param); in snd_hda_sequence_write()
[all …]
Dhda_auto_parser.c24 static int is_in_nid_list(hda_nid_t nid, const hda_nid_t *list) in is_in_nid_list() argument
27 if (*list == nid) in is_in_nid_list()
61 hda_nid_t nid, int type) in add_auto_cfg_input_pin() argument
64 cfg->inputs[cfg->num_inputs].pin = nid; in add_auto_cfg_input_pin()
67 nid_has_volume(codec, nid, HDA_INPUT); in add_auto_cfg_input_pin()
93 hda_nid_t nid; in reorder_outputs() local
98 nid = pins[1]; in reorder_outputs()
100 pins[2] = nid; in reorder_outputs()
175 hda_nid_t nid, end_nid; in snd_hda_parse_pin_defcfg() local
193 for (nid = codec->start_nid; nid < end_nid; nid++) { in snd_hda_parse_pin_defcfg()
[all …]
Dhda_codec.h200 int (*check_power_status)(struct hda_codec *codec, hda_nid_t nid);
245 hda_nid_t nid; /* default NID to query rates/formats/bps, or set up */ member
384 unsigned int (*power_filter)(struct hda_codec *codec, hda_nid_t nid,
389 struct hda_codec *codec, hda_nid_t nid);
433 unsigned int snd_hda_codec_read(struct hda_codec *codec, hda_nid_t nid,
436 int snd_hda_codec_write(struct hda_codec *codec, hda_nid_t nid, int flags,
438 #define snd_hda_param_read(codec, nid, param) \ argument
439 snd_hda_codec_read(codec, nid, 0, AC_VERB_PARAMETERS, param)
440 int snd_hda_get_sub_nodes(struct hda_codec *codec, hda_nid_t nid,
442 int snd_hda_get_connections(struct hda_codec *codec, hda_nid_t nid,
[all …]
Dhda_jack.h31 hda_nid_t nid; member
50 snd_hda_jack_tbl_get(struct hda_codec *codec, hda_nid_t nid);
58 int snd_hda_jack_detect_enable(struct hda_codec *codec, hda_nid_t nid);
60 snd_hda_jack_detect_enable_callback(struct hda_codec *codec, hda_nid_t nid,
66 u32 snd_hda_pin_sense(struct hda_codec *codec, hda_nid_t nid);
73 int snd_hda_jack_detect_state(struct hda_codec *codec, hda_nid_t nid);
75 static inline bool snd_hda_jack_detect(struct hda_codec *codec, hda_nid_t nid) in snd_hda_jack_detect() argument
77 return snd_hda_jack_detect_state(codec, nid) != HDA_JACK_NOT_PRESENT; in snd_hda_jack_detect()
80 bool is_jack_detectable(struct hda_codec *codec, hda_nid_t nid);
82 int snd_hda_jack_add_kctl(struct hda_codec *codec, hda_nid_t nid,
Dhda_generic.c225 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
229 if (list[i] == nid) in find_idx_in_nid_list()
235 static bool is_nid_contained(struct nid_path *path, hda_nid_t nid) in is_nid_contained() argument
237 return find_idx_in_nid_list(nid, path->path, path->depth) >= 0; in is_nid_contained()
302 static bool is_dac_already_used(struct hda_codec *codec, hda_nid_t nid) in is_dac_already_used() argument
309 if (path->path[0] == nid) in is_dac_already_used()
343 static bool is_ctl_associated(struct hda_codec *codec, hda_nid_t nid, in is_ctl_associated() argument
346 unsigned int val = HDA_COMPOSE_AMP_VAL(nid, 3, idx, dir); in is_ctl_associated()
502 hda_nid_t nid = spec->all_dacs[i]; in look_for_dac() local
503 if (!nid || is_dac_already_used(codec, nid)) in look_for_dac()
[all …]
Dpatch_ca0132.c142 hda_nid_t nid; member
156 .nid = SURROUND,
164 .nid = CRYSTALIZER,
172 .nid = DIALOG_PLUS,
180 .nid = SMART_VOLUME,
188 .nid = X_BASS,
196 .nid = EQUALIZER,
207 .nid = ECHO_CANCELLATION,
215 .nid = VOICE_FOCUS,
223 .nid = MIC_SVM,
[all …]
Dhda_eld.c148 static unsigned int hdmi_get_eld_data(struct hda_codec *codec, hda_nid_t nid, in hdmi_get_eld_data() argument
153 val = snd_hda_codec_read(codec, nid, 0, in hdmi_get_eld_data()
313 int snd_hdmi_get_eld_size(struct hda_codec *codec, hda_nid_t nid) in snd_hdmi_get_eld_size() argument
315 return snd_hda_codec_read(codec, nid, 0, AC_VERB_GET_HDMI_DIP_SIZE, in snd_hdmi_get_eld_size()
319 int snd_hdmi_get_eld(struct hda_codec *codec, hda_nid_t nid, in snd_hdmi_get_eld() argument
331 size = snd_hdmi_get_eld_size(codec, nid); in snd_hdmi_get_eld()
344 unsigned int val = hdmi_get_eld_data(codec, nid, i); in snd_hdmi_get_eld()
669 int snd_hdmi_get_eld_ati(struct hda_codec *codec, hda_nid_t nid, in snd_hdmi_get_eld_ati() argument
678 spkalloc = snd_hda_codec_read(codec, nid, 0, ATI_VERB_GET_SPEAKER_ALLOCATION, 0); in snd_hdmi_get_eld_ati()
702 snd_hda_codec_write(codec, nid, 0, ATI_VERB_SET_SINK_INFO_INDEX, ATI_INFO_IDX_PORT_ID_LOW); in snd_hdmi_get_eld_ati()
[all …]
Dpatch_conexant.c59 static inline void set_beep_amp(struct conexant_spec *spec, hda_nid_t nid, in set_beep_amp() argument
62 spec->gen.beep_nid = nid; in set_beep_amp()
63 spec->beep_amp = HDA_COMPOSE_AMP_VAL(nid, 1, idx, dir); in set_beep_amp()
94 #define set_beep_amp(spec, nid, idx, dir) /* NOP */ argument
106 hda_nid_t nid, end_nid; in cx_auto_parse_beep() local
109 for (nid = codec->start_nid; nid < end_nid; nid++) in cx_auto_parse_beep()
110 if (get_wcaps_type(get_wcaps(codec, nid)) == AC_WID_BEEP) { in cx_auto_parse_beep()
111 set_beep_amp(spec, nid, 0, HDA_OUTPUT); in cx_auto_parse_beep()
123 hda_nid_t nid, end_nid; in cx_auto_parse_eapd() local
126 for (nid = codec->start_nid; nid < end_nid; nid++) { in cx_auto_parse_eapd()
[all …]
Dhda_beep.h36 hda_nid_t nid; member
47 int snd_hda_attach_beep_device(struct hda_codec *codec, int nid);
51 static inline int snd_hda_attach_beep_device(struct hda_codec *codec, int nid) in snd_hda_attach_beep_device() argument
Dhda_beep.c52 snd_hda_codec_write(codec, beep->nid, 0, in snd_hda_generate_beep()
133 snd_hda_codec_write(beep->codec, beep->nid, 0, in turn_off_beep()
194 int snd_hda_attach_beep_device(struct hda_codec *codec, int nid) in snd_hda_attach_beep_device() argument
210 snd_hda_codec_write_cache(codec, nid, 0, in snd_hda_attach_beep_device()
213 beep->nid = nid; in snd_hda_attach_beep_device()
Dpatch_via.c245 static void update_power_state(struct hda_codec *codec, hda_nid_t nid, in update_power_state() argument
248 if (snd_hda_check_power_state(codec, nid, parm)) in update_power_state()
250 snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_POWER_STATE, parm); in update_power_state()
253 static void update_conv_power_state(struct hda_codec *codec, hda_nid_t nid, in update_conv_power_state() argument
259 if (snd_hda_check_power_state(codec, nid, parm)) in update_conv_power_state()
261 format = snd_hda_codec_read(codec, nid, 0, AC_VERB_GET_CONV, 0); in update_conv_power_state()
265 snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_POWER_STATE, parm); in update_conv_power_state()
267 format = snd_hda_codec_read(codec, nid, 0, AC_VERB_GET_CONV, 0); in update_conv_power_state()
269 snd_hda_codec_write(codec, nid, 0, in update_conv_power_state()
292 static void set_pin_power_state(struct hda_codec *codec, hda_nid_t nid, in set_pin_power_state() argument
[all …]
Dpatch_sigmatel.c273 if (spec->gen.all_adcs[i] == hinfo->nid) { in stac_capture_pcm_hook()
282 snd_hda_codec_write(codec, hinfo->nid, 0, in stac_capture_pcm_hook()
287 snd_hda_codec_write(codec, hinfo->nid, 0, in stac_capture_pcm_hook()
363 hda_nid_t nid, unsigned int new_vref) in stac_vrefout_set() argument
367 codec_dbg(codec, "%s, nid %x ctl %x\n", __func__, nid, new_vref); in stac_vrefout_set()
368 pinctl = snd_hda_codec_read(codec, nid, 0, in stac_vrefout_set()
378 error = snd_hda_set_pin_ctl_cache(codec, nid, pinctl); in stac_vrefout_set()
388 hda_nid_t nid, in stac_vref_led_power_filter() argument
391 if (nid == codec->afg && power_state == AC_PWRST_D3) in stac_vref_led_power_filter()
393 return snd_hda_gen_path_power_filter(codec, nid, power_state); in stac_vref_led_power_filter()
[all …]
Dpatch_hdmi.c1170 static void check_presence_and_report(struct hda_codec *codec, hda_nid_t nid) in check_presence_and_report() argument
1173 int pin_idx = pin_nid_to_pin_index(codec, nid); in check_presence_and_report()
1184 check_presence_and_report(codec, jack->tbl->nid); in jack_callback()
1200 codec->addr, jack->nid, dev_entry, !!(res & AC_UNSOL_RES_IA), in hdmi_intrinsic_event()
1203 check_presence_and_report(codec, jack->nid); in hdmi_intrinsic_event()
1246 hda_nid_t cvt_nid, hda_nid_t nid) in haswell_verify_D0() argument
1256 if (!snd_hda_check_power_state(codec, nid, AC_PWRST_D0)) { in haswell_verify_D0()
1257 snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_POWER_STATE, in haswell_verify_D0()
1260 pwr = snd_hda_codec_read(codec, nid, 0, AC_VERB_GET_POWER_STATE, 0); in haswell_verify_D0()
1262 codec_dbg(codec, "Haswell HDMI audio: Power for pin 0x%x is now D%d\n", nid, pwr); in haswell_verify_D0()
[all …]
Dhda_sysfs.c88 pin->nid, pin->cfg); in pin_configs_show()
234 v->nid, v->verb, v->param); in init_verbs_show()
243 int nid, verb, param; in parse_init_verbs() local
245 if (sscanf(buf, "%i %i %i", &nid, &verb, &param) != 3) in parse_init_verbs()
247 if (!nid || !verb) in parse_init_verbs()
255 v->nid = nid; in parse_init_verbs()
390 int nid, cfg, err; in parse_user_pin_configs() local
392 if (sscanf(buf, "%i %i", &nid, &cfg) != 2) in parse_user_pin_configs()
394 if (!nid) in parse_user_pin_configs()
397 err = snd_hda_add_pincfg(codec, &codec->user_pins, nid, cfg); in parse_user_pin_configs()
Dpatch_realtek.c133 static int alc_read_coefex_idx(struct hda_codec *codec, hda_nid_t nid, in alc_read_coefex_idx() argument
138 snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_COEF_INDEX, coef_idx); in alc_read_coefex_idx()
139 val = snd_hda_codec_read(codec, nid, 0, AC_VERB_GET_PROC_COEF, 0); in alc_read_coefex_idx()
146 static void alc_write_coefex_idx(struct hda_codec *codec, hda_nid_t nid, in alc_write_coefex_idx() argument
149 snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_COEF_INDEX, coef_idx); in alc_write_coefex_idx()
150 snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_PROC_COEF, coef_val); in alc_write_coefex_idx()
156 static void alc_update_coefex_idx(struct hda_codec *codec, hda_nid_t nid, in alc_update_coefex_idx() argument
160 unsigned int val = alc_read_coefex_idx(codec, nid, coef_idx); in alc_update_coefex_idx()
163 alc_write_coefex_idx(codec, nid, coef_idx, in alc_update_coefex_idx()
182 unsigned char nid; member
[all …]
/sound/pci/lola/
Dlola_proc.c30 struct lola *chip, int nid, const char *name) in print_audio_widget() argument
34 lola_read_param(chip, nid, LOLA_PAR_AUDIO_WIDGET_CAP, &val); in print_audio_widget()
35 snd_iprintf(buffer, "Node 0x%02x %s wcaps 0x%x\n", nid, name, val); in print_audio_widget()
36 lola_read_param(chip, nid, LOLA_PAR_STREAM_FORMATS, &val); in print_audio_widget()
41 struct lola *chip, int nid, unsigned int ampcap, in print_pin_widget() argument
46 lola_read_param(chip, nid, LOLA_PAR_AUDIO_WIDGET_CAP, &val); in print_pin_widget()
47 snd_iprintf(buffer, "Node 0x%02x %s wcaps 0x%x\n", nid, name, val); in print_pin_widget()
50 lola_read_param(chip, nid, ampcap, &val); in print_pin_widget()
57 lola_codec_read(chip, nid, LOLA_VERB_GET_MAX_LEVEL, 0, 0, &val, NULL); in print_pin_widget()
62 struct lola *chip, int nid) in print_clock_widget() argument
[all …]
Dlola_mixer.c32 int dir, int nid) in lola_init_pin() argument
37 pin->nid = nid; in lola_init_pin()
38 err = lola_read_param(chip, nid, LOLA_PAR_AUDIO_WIDGET_CAP, &val); in lola_init_pin()
40 dev_err(chip->card->dev, "Can't read wcaps for 0x%x\n", nid); in lola_init_pin()
51 dev_err(chip->card->dev, "Invalid wcaps 0x%x for 0x%x\n", val, nid); in lola_init_pin()
61 err = lola_read_param(chip, nid, LOLA_PAR_AMP_OUT_CAP, &val); in lola_init_pin()
63 err = lola_read_param(chip, nid, LOLA_PAR_AMP_IN_CAP, &val); in lola_init_pin()
65 dev_err(chip->card->dev, "Can't read AMP-caps for 0x%x\n", nid); in lola_init_pin()
79 err = lola_codec_read(chip, nid, LOLA_VERB_GET_MAX_LEVEL, 0, 0, &val, in lola_init_pin()
82 dev_err(chip->card->dev, "Can't get MAX_LEVEL 0x%x\n", nid); in lola_init_pin()
[all …]
Dlola_clock.c123 int lola_init_clock_widget(struct lola *chip, int nid) in lola_init_clock_widget() argument
129 err = lola_read_param(chip, nid, LOLA_PAR_AUDIO_WIDGET_CAP, &val); in lola_init_clock_widget()
131 dev_err(chip->card->dev, "Can't read wcaps for 0x%x\n", nid); in lola_init_clock_widget()
140 chip->clock.nid = nid; in lola_init_clock_widget()
142 dev_dbg(chip->card->dev, "clock_list nid=%x, entries=%d\n", nid, in lola_init_clock_widget()
158 err = lola_codec_read(chip, nid, LOLA_VERB_GET_CLOCK_LIST, in lola_init_clock_widget()
219 err = lola_codec_read(chip, chip->clock.nid, in lola_enable_clock_events()
238 err = lola_codec_read(chip, chip->clock.nid, in lola_set_clock_index()
Dlola.c87 static int corb_send_verb(struct lola *chip, unsigned int nid, in corb_send_verb() argument
94 chip->last_cmd_nid = nid; in corb_send_verb()
98 data |= (nid << 20) | (verb << 8); in corb_send_verb()
195 int lola_codec_write(struct lola *chip, unsigned int nid, unsigned int verb, in lola_codec_write() argument
199 nid, verb, data, extdata); in lola_codec_write()
200 return corb_send_verb(chip, nid, verb, data, extdata); in lola_codec_write()
204 int lola_codec_read(struct lola *chip, unsigned int nid, unsigned int verb, in lola_codec_read() argument
211 nid, verb, data, extdata); in lola_codec_read()
212 err = corb_send_verb(chip, nid, verb, data, extdata); in lola_codec_read()
451 int nid, err; in lola_parse_tree() local
[all …]
Dlola_pcm.c415 err = lola_codec_read(chip, str->nid, LOLA_VERB_SET_STREAM_FORMAT, in lola_set_stream_config()
426 err = lola_codec_read(chip, str[i].nid, in lola_set_stream_config()
643 int idx, int nid, int dir) in lola_init_stream() argument
648 str->nid = nid; in lola_init_stream()
653 err = lola_read_param(chip, nid, LOLA_PAR_AUDIO_WIDGET_CAP, &val); in lola_init_stream()
655 dev_err(chip->card->dev, "Can't read wcaps for 0x%x\n", nid); in lola_init_stream()
663 val, nid); in lola_init_stream()
673 val, nid); in lola_init_stream()
681 err = lola_read_param(chip, nid, LOLA_PAR_STREAM_FORMATS, &val); in lola_init_stream()
683 dev_err(chip->card->dev, "Can't read FORMATS 0x%x\n", nid); in lola_init_stream()
[all …]
Dlola.h231 unsigned int nid; member
257 unsigned int nid; member
276 unsigned int nid; member
292 unsigned int nid; /* audio widget NID */ member
485 int lola_codec_write(struct lola *chip, unsigned int nid, unsigned int verb,
487 int lola_codec_read(struct lola *chip, unsigned int nid, unsigned int verb,
491 #define lola_read_param(chip, nid, param, val) \ argument
492 lola_codec_read(chip, nid, LOLA_VERB_PARAMETERS, param, 0, val, NULL)
501 int lola_init_clock_widget(struct lola *chip, int nid);
512 int lola_init_mixer_widget(struct lola *chip, int nid);
/sound/core/
Dinit.c527 const char *nid) in copy_valid_id_string() argument
531 while (*nid && !isalnum(*nid)) in copy_valid_id_string()
532 nid++; in copy_valid_id_string()
533 if (isdigit(*nid)) in copy_valid_id_string()
535 while (*nid && (size_t)(id - card->id) < sizeof(card->id) - 1) { in copy_valid_id_string()
536 if (isalnum(*nid)) in copy_valid_id_string()
537 *id++ = *nid; in copy_valid_id_string()
538 nid++; in copy_valid_id_string()
547 const char *nid) in snd_card_set_id_no_lock() argument
553 copy_valid_id_string(card, src, nid); in snd_card_set_id_no_lock()
[all …]

12