Home
last modified time | relevance | path

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

123

/sound/hda/
Dhdac_sysfs.c89 ssize_t (*show)(struct hdac_device *codec, hda_nid_t nid,
91 ssize_t (*store)(struct hdac_device *codec, hda_nid_t nid,
99 int nid; in get_codec_nid() local
102 ret = kstrtoint(kobj->name, 16, &nid); in get_codec_nid()
106 return nid; in get_codec_nid()
115 int nid; in widget_attr_show() local
119 nid = get_codec_nid(kobj, &codec); in widget_attr_show()
120 if (nid < 0) in widget_attr_show()
121 return nid; in widget_attr_show()
122 return wid_attr->show(codec, nid, wid_attr, buf); in widget_attr_show()
[all …]
Dhdac_device.c224 static unsigned int snd_hdac_make_cmd(struct hdac_device *codec, hda_nid_t nid, in snd_hdac_make_cmd() argument
230 if ((addr & ~0xf) || (nid & ~0x7f) || in snd_hdac_make_cmd()
233 addr, nid, verb, parm); in snd_hdac_make_cmd()
238 val |= (u32)nid << 20; in snd_hdac_make_cmd()
275 int snd_hdac_read(struct hdac_device *codec, hda_nid_t nid, in snd_hdac_read() argument
278 unsigned int cmd = snd_hdac_make_cmd(codec, nid, verb, parm); in snd_hdac_read()
293 int _snd_hdac_read_parm(struct hdac_device *codec, hda_nid_t nid, int parm, in _snd_hdac_read_parm() argument
298 cmd = snd_hdac_regmap_encode_verb(nid, AC_VERB_PARAMETERS) | parm; in _snd_hdac_read_parm()
312 int snd_hdac_read_parm_uncached(struct hdac_device *codec, hda_nid_t nid, in snd_hdac_read_parm_uncached() argument
317 cmd = snd_hdac_regmap_encode_verb(nid, AC_VERB_PARAMETERS) | parm; in snd_hdac_read_parm_uncached()
[all …]
Dhdac_component.c121 int snd_hdac_sync_audio_rate(struct hdac_device *codec, hda_nid_t nid, in snd_hdac_sync_audio_rate() argument
130 port = nid; in snd_hdac_sync_audio_rate()
132 port = acomp->audio_ops->pin2port(codec, nid); in snd_hdac_sync_audio_rate()
162 int snd_hdac_acomp_get_eld(struct hdac_device *codec, hda_nid_t nid, int dev_id, in snd_hdac_acomp_get_eld() argument
172 port = nid; in snd_hdac_acomp_get_eld()
174 port = acomp->audio_ops->pin2port(codec, nid); in snd_hdac_acomp_get_eld()
/sound/pci/hda/
Dhda_local.h26 #define HDA_COMPOSE_AMP_VAL_OFS(nid,chs,idx,dir,ofs) \ argument
27 ((nid) | ((chs)<<16) | ((dir)<<18) | ((idx)<<19) | ((ofs)<<23))
29 #define HDA_COMPOSE_AMP_VAL(nid,chs,idx,dir) \ argument
30 HDA_COMPOSE_AMP_VAL_OFS(nid, chs, idx, dir, 0)
32 #define HDA_CODEC_VOLUME_MONO_IDX(xname, xcidx, nid, channel, xindex, dir, flags) \ argument
42 .private_value = HDA_COMPOSE_AMP_VAL(nid, channel, xindex, dir) | flags }
44 #define HDA_CODEC_VOLUME_IDX(xname, xcidx, nid, xindex, direction) \ argument
45 HDA_CODEC_VOLUME_MONO_IDX(xname, xcidx, nid, 3, xindex, direction, 0)
47 #define HDA_CODEC_VOLUME_MONO(xname, nid, channel, xindex, direction) \ argument
48 HDA_CODEC_VOLUME_MONO_IDX(xname, 0, nid, channel, xindex, direction, 0)
[all …]
Dhda_proc.c22 #define param_read(codec, nid, parm) \ argument
23 snd_hdac_read_parm_uncached(&(codec)->core, nid, parm)
48 struct hda_codec *codec, hda_nid_t nid, in print_nid_array() argument
56 if (item->nid == nid) { in print_nid_array()
75 struct hda_codec *codec, hda_nid_t nid) in print_nid_pcms() argument
82 if (cpcm->stream[type].nid != nid || cpcm->pcm == NULL) in print_nid_pcms()
94 struct hda_codec *codec, hda_nid_t nid, int dir) in print_amp_caps() argument
97 caps = param_read(codec, nid, dir == HDA_OUTPUT ? in print_amp_caps()
112 static bool is_stereo_amps(struct hda_codec *codec, hda_nid_t nid, in is_stereo_amps() argument
126 if (snd_hda_get_raw_connections(codec, nid, &conn, 1) < 0) in is_stereo_amps()
[all …]
Dhda_jack.h21 hda_nid_t nid; member
31 hda_nid_t nid; member
55 snd_hda_jack_tbl_get_mst(struct hda_codec *codec, hda_nid_t nid, int dev_id);
63 snd_hda_jack_tbl_get(struct hda_codec *codec, hda_nid_t nid) in snd_hda_jack_tbl_get() argument
65 return snd_hda_jack_tbl_get_mst(codec, nid, 0); in snd_hda_jack_tbl_get()
77 int snd_hda_jack_detect_enable(struct hda_codec *codec, hda_nid_t nid,
81 snd_hda_jack_detect_enable_callback_mst(struct hda_codec *codec, hda_nid_t nid,
95 snd_hda_jack_detect_enable_callback(struct hda_codec *codec, hda_nid_t nid, in snd_hda_jack_detect_enable_callback() argument
98 return snd_hda_jack_detect_enable_callback_mst(codec, nid, 0, cb); in snd_hda_jack_detect_enable_callback()
111 u32 snd_hda_jack_pin_sense(struct hda_codec *codec, hda_nid_t nid, int dev_id);
[all …]
Dhda_jack.c29 bool is_jack_detectable(struct hda_codec *codec, hda_nid_t nid) in is_jack_detectable() argument
33 if (!(snd_hda_query_pin_caps(codec, nid) & AC_PINCAP_PRES_DETECT)) in is_jack_detectable()
35 if (get_defcfg_misc(snd_hda_codec_get_pincfg(codec, nid)) & in is_jack_detectable()
38 if (!(get_wcaps(codec, nid) & AC_WCAP_UNSOL_CAP) && in is_jack_detectable()
46 static u32 read_pin_sense(struct hda_codec *codec, hda_nid_t nid, int dev_id) in read_pin_sense() argument
52 pincap = snd_hda_query_pin_caps(codec, nid); in read_pin_sense()
54 snd_hda_codec_read(codec, nid, 0, in read_pin_sense()
57 val = snd_hda_codec_read(codec, nid, 0, in read_pin_sense()
71 snd_hda_jack_tbl_get_mst(struct hda_codec *codec, hda_nid_t nid, int dev_id) in snd_hda_jack_tbl_get_mst() argument
76 if (!nid || !jack) in snd_hda_jack_tbl_get_mst()
[all …]
Dhda_codec.c81 for (; seq->nid; seq++) in snd_hda_sequence_write()
82 snd_hda_codec_write(codec, seq->nid, 0, seq->verb, seq->param); in snd_hda_sequence_write()
90 hda_nid_t nid; member
96 lookup_conn_list(struct hda_codec *codec, hda_nid_t nid) in lookup_conn_list() argument
100 if (p->nid == nid) in lookup_conn_list()
106 static int add_conn_list(struct hda_codec *codec, hda_nid_t nid, int len, in add_conn_list() argument
115 p->nid = nid; in add_conn_list()
132 static int read_and_add_raw_conns(struct hda_codec *codec, hda_nid_t nid) in read_and_add_raw_conns() argument
138 len = snd_hda_get_raw_connections(codec, nid, list, ARRAY_SIZE(list)); in read_and_add_raw_conns()
140 len = snd_hda_get_num_raw_conns(codec, nid); in read_and_add_raw_conns()
[all …]
Dhda_auto_parser.c20 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()
173 hda_nid_t nid; in snd_hda_parse_pin_defcfg() local
190 for_each_hda_codec_node(nid, codec) { in snd_hda_parse_pin_defcfg()
191 unsigned int wid_caps = get_wcaps(codec, nid); in snd_hda_parse_pin_defcfg()
200 if (ignore_nids && is_in_nid_list(nid, ignore_nids)) in snd_hda_parse_pin_defcfg()
203 def_conf = snd_hda_codec_get_pincfg(codec, nid); in snd_hda_parse_pin_defcfg()
[all …]
Dhda_generic.c241 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
245 if (list[i] == nid) in find_idx_in_nid_list()
251 static bool is_nid_contained(struct nid_path *path, hda_nid_t nid) in is_nid_contained() argument
253 return find_idx_in_nid_list(nid, path->path, path->depth) >= 0; in is_nid_contained()
319 static bool is_dac_already_used(struct hda_codec *codec, hda_nid_t nid) in is_dac_already_used() argument
326 if (path->path[0] == nid) in is_dac_already_used()
360 static bool is_ctl_associated(struct hda_codec *codec, hda_nid_t nid, in is_ctl_associated() argument
363 unsigned int val = HDA_COMPOSE_AMP_VAL(nid, 3, idx, dir); in is_ctl_associated()
535 hda_nid_t nid = spec->all_dacs[i]; in look_for_dac() local
536 if (!nid || is_dac_already_used(codec, nid)) in look_for_dac()
[all …]
Dhda_eld.c122 static unsigned int hdmi_get_eld_data(struct hda_codec *codec, hda_nid_t nid, in hdmi_get_eld_data() argument
127 val = snd_hda_codec_read(codec, nid, 0, in hdmi_get_eld_data()
288 int snd_hdmi_get_eld_size(struct hda_codec *codec, hda_nid_t nid) in snd_hdmi_get_eld_size() argument
290 return snd_hda_codec_read(codec, nid, 0, AC_VERB_GET_HDMI_DIP_SIZE, in snd_hdmi_get_eld_size()
294 int snd_hdmi_get_eld(struct hda_codec *codec, hda_nid_t nid, in snd_hdmi_get_eld() argument
306 size = snd_hdmi_get_eld_size(codec, nid); in snd_hdmi_get_eld()
319 unsigned int val = hdmi_get_eld_data(codec, nid, i); in snd_hdmi_get_eld()
636 int snd_hdmi_get_eld_ati(struct hda_codec *codec, hda_nid_t nid, in snd_hdmi_get_eld_ati() argument
645 spkalloc = snd_hda_codec_read(codec, nid, 0, ATI_VERB_GET_SPEAKER_ALLOCATION, 0); in snd_hdmi_get_eld_ati()
669 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_ca0132.c178 hda_nid_t nid; member
192 .nid = SURROUND,
200 .nid = CRYSTALIZER,
208 .nid = DIALOG_PLUS,
216 .nid = SMART_VOLUME,
224 .nid = X_BASS,
232 .nid = EQUALIZER,
243 .nid = ECHO_CANCELLATION,
251 .nid = VOICE_FOCUS,
259 .nid = MIC_SVM,
[all …]
Dhda_beep.h23 hda_nid_t nid; member
36 int snd_hda_attach_beep_device(struct hda_codec *codec, int nid);
39 static inline int snd_hda_attach_beep_device(struct hda_codec *codec, int nid) in snd_hda_attach_beep_device() argument
Dpatch_via.c259 static int set_beep_amp(struct via_spec *spec, hda_nid_t nid, in set_beep_amp() argument
263 unsigned int beep_amp = HDA_COMPOSE_AMP_VAL(nid, 1, idx, dir); in set_beep_amp()
266 spec->gen.beep_nid = nid; in set_beep_amp()
280 hda_nid_t nid; in auto_parse_beep() local
282 for_each_hda_codec_node(nid, codec) in auto_parse_beep()
283 if (get_wcaps_type(get_wcaps(codec, nid)) == AC_WID_BEEP) in auto_parse_beep()
284 return set_beep_amp(spec, nid, 0, HDA_OUTPUT); in auto_parse_beep()
301 for (; p->nid; p++) { in is_aa_path_mute()
303 v = snd_hda_codec_amp_read(codec, p->nid, ch, p->dir, in is_aa_path_mute()
406 static int via_check_power_status(struct hda_codec *codec, hda_nid_t nid) in via_check_power_status() argument
[all …]
Dhda_sysfs.c89 pin->nid, pin->cfg); in pin_configs_show()
226 v->nid, v->verb, v->param); in init_verbs_show()
235 int nid, verb, param; in parse_init_verbs() local
237 if (sscanf(buf, "%i %i %i", &nid, &verb, &param) != 3) in parse_init_verbs()
239 if (!nid || !verb) in parse_init_verbs()
247 v->nid = nid; in parse_init_verbs()
380 int nid, cfg, err; in parse_user_pin_configs() local
382 if (sscanf(buf, "%i %i", &nid, &cfg) != 2) in parse_user_pin_configs()
384 if (!nid) in parse_user_pin_configs()
387 err = snd_hda_add_pincfg(codec, &codec->user_pins, nid, cfg); in parse_user_pin_configs()
/sound/pci/lola/
Dlola_proc.c17 struct lola *chip, int nid, const char *name) in print_audio_widget() argument
21 lola_read_param(chip, nid, LOLA_PAR_AUDIO_WIDGET_CAP, &val); in print_audio_widget()
22 snd_iprintf(buffer, "Node 0x%02x %s wcaps 0x%x\n", nid, name, val); in print_audio_widget()
23 lola_read_param(chip, nid, LOLA_PAR_STREAM_FORMATS, &val); in print_audio_widget()
28 struct lola *chip, int nid, unsigned int ampcap, in print_pin_widget() argument
33 lola_read_param(chip, nid, LOLA_PAR_AUDIO_WIDGET_CAP, &val); in print_pin_widget()
34 snd_iprintf(buffer, "Node 0x%02x %s wcaps 0x%x\n", nid, name, val); in print_pin_widget()
37 lola_read_param(chip, nid, ampcap, &val); in print_pin_widget()
44 lola_codec_read(chip, nid, LOLA_VERB_GET_MAX_LEVEL, 0, 0, &val, NULL); in print_pin_widget()
49 struct lola *chip, int nid) in print_clock_widget() argument
[all …]
Dlola_mixer.c19 int dir, int nid) in lola_init_pin() argument
24 pin->nid = nid; in lola_init_pin()
25 err = lola_read_param(chip, nid, LOLA_PAR_AUDIO_WIDGET_CAP, &val); in lola_init_pin()
27 dev_err(chip->card->dev, "Can't read wcaps for 0x%x\n", nid); in lola_init_pin()
38 dev_err(chip->card->dev, "Invalid wcaps 0x%x for 0x%x\n", val, nid); in lola_init_pin()
48 err = lola_read_param(chip, nid, LOLA_PAR_AMP_OUT_CAP, &val); in lola_init_pin()
50 err = lola_read_param(chip, nid, LOLA_PAR_AMP_IN_CAP, &val); in lola_init_pin()
52 dev_err(chip->card->dev, "Can't read AMP-caps for 0x%x\n", nid); in lola_init_pin()
66 err = lola_codec_read(chip, nid, LOLA_VERB_GET_MAX_LEVEL, 0, 0, &val, in lola_init_pin()
69 dev_err(chip->card->dev, "Can't get MAX_LEVEL 0x%x\n", nid); in lola_init_pin()
[all …]
Dlola_clock.c110 int lola_init_clock_widget(struct lola *chip, int nid) in lola_init_clock_widget() argument
116 err = lola_read_param(chip, nid, LOLA_PAR_AUDIO_WIDGET_CAP, &val); in lola_init_clock_widget()
118 dev_err(chip->card->dev, "Can't read wcaps for 0x%x\n", nid); in lola_init_clock_widget()
127 chip->clock.nid = nid; in lola_init_clock_widget()
129 dev_dbg(chip->card->dev, "clock_list nid=%x, entries=%d\n", nid, in lola_init_clock_widget()
145 err = lola_codec_read(chip, nid, LOLA_VERB_GET_CLOCK_LIST, in lola_init_clock_widget()
206 err = lola_codec_read(chip, chip->clock.nid, in lola_enable_clock_events()
225 err = lola_codec_read(chip, chip->clock.nid, in lola_set_clock_index()
Dlola.c73 static int corb_send_verb(struct lola *chip, unsigned int nid, in corb_send_verb() argument
80 chip->last_cmd_nid = nid; in corb_send_verb()
84 data |= (nid << 20) | (verb << 8); in corb_send_verb()
181 int lola_codec_write(struct lola *chip, unsigned int nid, unsigned int verb, in lola_codec_write() argument
185 nid, verb, data, extdata); in lola_codec_write()
186 return corb_send_verb(chip, nid, verb, data, extdata); in lola_codec_write()
190 int lola_codec_read(struct lola *chip, unsigned int nid, unsigned int verb, in lola_codec_read() argument
197 nid, verb, data, extdata); in lola_codec_read()
198 err = corb_send_verb(chip, nid, verb, data, extdata); in lola_codec_read()
435 int nid, err; in lola_parse_tree() local
[all …]
Dlola_pcm.c401 err = lola_codec_read(chip, str->nid, LOLA_VERB_SET_STREAM_FORMAT, in lola_set_stream_config()
412 err = lola_codec_read(chip, str[i].nid, in lola_set_stream_config()
622 int idx, int nid, int dir) in lola_init_stream() argument
627 str->nid = nid; in lola_init_stream()
632 err = lola_read_param(chip, nid, LOLA_PAR_AUDIO_WIDGET_CAP, &val); in lola_init_stream()
634 dev_err(chip->card->dev, "Can't read wcaps for 0x%x\n", nid); in lola_init_stream()
642 val, nid); in lola_init_stream()
652 val, nid); in lola_init_stream()
660 err = lola_read_param(chip, nid, LOLA_PAR_STREAM_FORMATS, &val); in lola_init_stream()
662 dev_err(chip->card->dev, "Can't read FORMATS 0x%x\n", nid); in lola_init_stream()
[all …]
Dlola.h218 unsigned int nid; member
244 unsigned int nid; member
263 unsigned int nid; member
279 unsigned int nid; /* audio widget NID */ member
472 int lola_codec_write(struct lola *chip, unsigned int nid, unsigned int verb,
474 int lola_codec_read(struct lola *chip, unsigned int nid, unsigned int verb,
478 #define lola_read_param(chip, nid, param, val) \ argument
479 lola_codec_read(chip, nid, LOLA_VERB_PARAMETERS, param, 0, val, NULL)
487 int lola_init_clock_widget(struct lola *chip, int nid);
498 int lola_init_mixer_widget(struct lola *chip, int nid);
/sound/soc/codecs/
Dhdac_hdmi.c57 hda_nid_t nid; member
77 hda_nid_t nid; member
218 static int hdac_hdmi_get_port_len(struct hdac_device *hdev, hda_nid_t nid) in hdac_hdmi_get_port_len() argument
223 caps = get_wcaps(hdev, nid); in hdac_hdmi_get_port_len()
229 param = snd_hdac_read_parm_uncached(hdev, nid, AC_PAR_DEVLIST_LEN); in hdac_hdmi_get_port_len()
244 return snd_hdac_codec_read(hdev, port->pin->nid, in hdac_hdmi_port_select_get()
261 num_ports = hdac_hdmi_get_port_len(hdev, port->pin->nid); in hdac_hdmi_port_select_set()
271 snd_hdac_codec_write(hdev, port->pin->nid, 0, in hdac_hdmi_port_select_set()
376 hdmi->chmap.ops.set_channel_count(hdev, cvt->nid, channels); in hdac_hdmi_setup_audio_infoframe()
378 snd_hdac_setup_channel_mapping(&hdmi->chmap, pin->nid, false, ca, in hdac_hdmi_setup_audio_infoframe()
[all …]
Drt715-sdw.c152 unsigned int reg2 = 0, reg3 = 0, reg4 = 0, mask, nid, val2; in rt715_sdw_read() local
164 nid = reg & 0xff; in rt715_sdw_read()
174 reg3 = RT715_PRIV_DATA_R_H | nid; in rt715_sdw_read()
274 unsigned int reg2 = 0, reg3, reg4, nid, mask, val2; in rt715_sdw_write() local
286 nid = reg & 0xff; in rt715_sdw_write()
296 reg3 = RT715_PRIV_DATA_W_H | nid; in rt715_sdw_write()
374 int hda_to_sdw(unsigned int nid, unsigned int verb, unsigned int payload, in hda_to_sdw() argument
403 *sdw_addr_l = (e_verb << 8) | nid | 0x80; /* 0x80: valid bit */ in hda_to_sdw()
408 *sdw_addr_h = (e_verb << 8) | nid; in hda_to_sdw()
/sound/virtio/
Dvirtio_pcm.c216 struct virtio_pcm *virtsnd_pcm_find(struct virtio_snd *snd, u32 nid) in virtsnd_pcm_find() argument
221 if (vpcm->nid == nid) in virtsnd_pcm_find()
236 struct virtio_pcm *virtsnd_pcm_find_or_create(struct virtio_snd *snd, u32 nid) in virtsnd_pcm_find_or_create() argument
241 vpcm = virtsnd_pcm_find(snd, nid); in virtsnd_pcm_find_or_create()
249 vpcm->nid = nid; in virtsnd_pcm_find_or_create()
363 vss->nid = le32_to_cpu(info[i].hdr.hda_fn_nid); in virtsnd_pcm_parse_cfg()
365 vpcm = virtsnd_pcm_find_or_create(snd, vss->nid); in virtsnd_pcm_parse_cfg()
417 rc = snd_pcm_new(snd->card, VIRTIO_SND_CARD_DRIVER, vpcm->nid, in virtsnd_pcm_build_devs()
421 vpcm->nid, rc); in virtsnd_pcm_build_devs()
454 vpcm = virtsnd_pcm_find(snd, vss->nid); in virtsnd_pcm_build_devs()
Dvirtio_pcm.h44 u32 nid; member
88 u32 nid; member
107 struct virtio_pcm *virtsnd_pcm_find(struct virtio_snd *snd, u32 nid);
109 struct virtio_pcm *virtsnd_pcm_find_or_create(struct virtio_snd *snd, u32 nid);

123