Lines Matching defs:nid

218  * @nid: NID to encode
224 static unsigned int snd_hdac_make_cmd(struct hdac_device *codec, hda_nid_t nid,
230 if ((addr & ~0xf) || (nid & ~0x7f) ||
233 addr, nid, verb, parm);
238 val |= (u32)nid << 20;
268 * @nid: NID to execute a verb
275 int snd_hdac_read(struct hdac_device *codec, hda_nid_t nid,
278 unsigned int cmd = snd_hdac_make_cmd(codec, nid, verb, parm);
287 * @nid: NID to read a parameter
293 int _snd_hdac_read_parm(struct hdac_device *codec, hda_nid_t nid, int parm,
298 cmd = snd_hdac_regmap_encode_verb(nid, AC_VERB_PARAMETERS) | parm;
306 * @nid: NID to read a parameter
312 int snd_hdac_read_parm_uncached(struct hdac_device *codec, hda_nid_t nid,
317 cmd = snd_hdac_regmap_encode_verb(nid, AC_VERB_PARAMETERS) | parm;
327 * @nid: NID for the parameter
331 int snd_hdac_override_parm(struct hdac_device *codec, hda_nid_t nid,
334 unsigned int verb = (AC_VERB_PARAMETERS << 8) | (nid << 20) | parm;
350 * @nid: NID to inspect
356 int snd_hdac_get_sub_nodes(struct hdac_device *codec, hda_nid_t nid,
361 parm = snd_hdac_read_parm_uncached(codec, nid, AC_PAR_NODE_COUNT);
377 hda_nid_t nid;
379 total_nodes = snd_hdac_get_sub_nodes(codec, AC_NODE_ROOT, &nid);
380 for (i = 0; i < total_nodes; i++, nid++) {
381 function_id = snd_hdac_read_parm(codec, nid,
385 codec->afg = nid;
390 codec->mfg = nid;
436 static unsigned int get_num_conns(struct hdac_device *codec, hda_nid_t nid)
438 unsigned int wcaps = get_wcaps(codec, nid);
445 parm = snd_hdac_read_parm(codec, nid, AC_PAR_CONNLIST_LEN);
454 * @nid: NID
464 int snd_hdac_get_connections(struct hdac_device *codec, hda_nid_t nid,
473 parm = get_num_conns(codec, nid);
494 err = snd_hdac_read(codec, nid, AC_VERB_GET_CONNECT_LIST, 0,
511 err = snd_hdac_read(codec, nid,
522 nid, i, parm);
789 static unsigned int query_pcm_param(struct hdac_device *codec, hda_nid_t nid)
793 if (nid != codec->afg &&
794 (get_wcaps(codec, nid) & AC_WCAP_FORMAT_OVRD))
795 val = snd_hdac_read_parm(codec, nid, AC_PAR_PCM);
803 static unsigned int query_stream_param(struct hdac_device *codec, hda_nid_t nid)
805 unsigned int streams = snd_hdac_read_parm(codec, nid, AC_PAR_STREAM);
817 * @nid: NID to query
827 int snd_hdac_query_supported_pcm(struct hdac_device *codec, hda_nid_t nid,
832 wcaps = get_wcaps(codec, nid);
833 val = query_pcm_param(codec, nid);
843 "rates == 0 (nid=0x%x, val=0x%x, ovrd=%i)\n",
844 nid, val,
855 streams = query_stream_param(codec, nid);
906 "formats == 0 (nid=0x%x, val=0x%x, ovrd=%i, streams=0x%x)\n",
907 nid, val,
925 * @nid: NID to check
932 bool snd_hdac_is_supported_format(struct hdac_device *codec, hda_nid_t nid,
938 val = query_pcm_param(codec, nid);
952 stream = query_stream_param(codec, nid);
989 static unsigned int codec_read(struct hdac_device *hdac, hda_nid_t nid,
992 unsigned int cmd = snd_hdac_make_cmd(hdac, nid, verb, parm);
1001 static int codec_write(struct hdac_device *hdac, hda_nid_t nid,
1004 unsigned int cmd = snd_hdac_make_cmd(hdac, nid, verb, parm);
1012 * @nid: NID to send the command
1021 int snd_hdac_codec_read(struct hdac_device *hdac, hda_nid_t nid,
1024 return codec_read(hdac, nid, flags, verb, parm);
1031 * @nid: NID to send the command
1040 int snd_hdac_codec_write(struct hdac_device *hdac, hda_nid_t nid,
1043 return codec_write(hdac, nid, flags, verb, parm);
1052 * @nid: NID to send the command
1058 hda_nid_t nid, unsigned int target_state)
1060 unsigned int state = codec_read(hdac, nid, 0,
1074 * @nid: NID to send the command
1080 hda_nid_t nid, unsigned int power_state)
1086 state = snd_hdac_codec_read(codec, nid, 0,