Lines Matching refs:nid

219  * @nid: NID to encode
225 static unsigned int snd_hdac_make_cmd(struct hdac_device *codec, hda_nid_t nid,
231 if ((addr & ~0xf) || (nid & ~0x7f) ||
234 addr, nid, verb, parm);
239 val |= (u32)nid << 20;
269 * @nid: NID to execute a verb
276 int snd_hdac_read(struct hdac_device *codec, hda_nid_t nid,
279 unsigned int cmd = snd_hdac_make_cmd(codec, nid, verb, parm);
288 * @nid: NID to read a parameter
294 int _snd_hdac_read_parm(struct hdac_device *codec, hda_nid_t nid, int parm,
299 cmd = snd_hdac_regmap_encode_verb(nid, AC_VERB_PARAMETERS) | parm;
307 * @nid: NID to read a parameter
313 int snd_hdac_read_parm_uncached(struct hdac_device *codec, hda_nid_t nid,
318 cmd = snd_hdac_regmap_encode_verb(nid, AC_VERB_PARAMETERS) | parm;
328 * @nid: NID for the parameter
332 int snd_hdac_override_parm(struct hdac_device *codec, hda_nid_t nid,
335 unsigned int verb = (AC_VERB_PARAMETERS << 8) | (nid << 20) | parm;
351 * @nid: NID to inspect
357 int snd_hdac_get_sub_nodes(struct hdac_device *codec, hda_nid_t nid,
362 parm = snd_hdac_read_parm_uncached(codec, nid, AC_PAR_NODE_COUNT);
378 hda_nid_t nid;
380 total_nodes = snd_hdac_get_sub_nodes(codec, AC_NODE_ROOT, &nid);
381 for (i = 0; i < total_nodes; i++, nid++) {
382 function_id = snd_hdac_read_parm(codec, nid,
386 codec->afg = nid;
391 codec->mfg = nid;
437 static unsigned int get_num_conns(struct hdac_device *codec, hda_nid_t nid)
439 unsigned int wcaps = get_wcaps(codec, nid);
446 parm = snd_hdac_read_parm(codec, nid, AC_PAR_CONNLIST_LEN);
455 * @nid: NID
465 int snd_hdac_get_connections(struct hdac_device *codec, hda_nid_t nid,
474 parm = get_num_conns(codec, nid);
495 err = snd_hdac_read(codec, nid, AC_VERB_GET_CONNECT_LIST, 0,
512 err = snd_hdac_read(codec, nid,
523 nid, i, parm);
852 static unsigned int query_pcm_param(struct hdac_device *codec, hda_nid_t nid)
856 if (nid != codec->afg &&
857 (get_wcaps(codec, nid) & AC_WCAP_FORMAT_OVRD))
858 val = snd_hdac_read_parm(codec, nid, AC_PAR_PCM);
866 static unsigned int query_stream_param(struct hdac_device *codec, hda_nid_t nid)
868 unsigned int streams = snd_hdac_read_parm(codec, nid, AC_PAR_STREAM);
880 * @nid: NID to query
891 int snd_hdac_query_supported_pcm(struct hdac_device *codec, hda_nid_t nid,
897 wcaps = get_wcaps(codec, nid);
898 val = query_pcm_param(codec, nid);
908 "rates == 0 (nid=0x%x, val=0x%x, ovrd=%i)\n",
909 nid, val,
921 streams = query_stream_param(codec, nid);
972 "formats == 0 (nid=0x%x, val=0x%x, ovrd=%i, streams=0x%x)\n",
973 nid, val,
993 * @nid: NID to check
1000 bool snd_hdac_is_supported_format(struct hdac_device *codec, hda_nid_t nid,
1006 val = query_pcm_param(codec, nid);
1020 stream = query_stream_param(codec, nid);
1057 static unsigned int codec_read(struct hdac_device *hdac, hda_nid_t nid,
1060 unsigned int cmd = snd_hdac_make_cmd(hdac, nid, verb, parm);
1069 static int codec_write(struct hdac_device *hdac, hda_nid_t nid,
1072 unsigned int cmd = snd_hdac_make_cmd(hdac, nid, verb, parm);
1080 * @nid: NID to send the command
1089 int snd_hdac_codec_read(struct hdac_device *hdac, hda_nid_t nid,
1092 return codec_read(hdac, nid, flags, verb, parm);
1099 * @nid: NID to send the command
1108 int snd_hdac_codec_write(struct hdac_device *hdac, hda_nid_t nid,
1111 return codec_write(hdac, nid, flags, verb, parm);
1120 * @nid: NID to send the command
1126 hda_nid_t nid, unsigned int target_state)
1128 unsigned int state = codec_read(hdac, nid, 0,
1142 * @nid: NID to send the command
1148 hda_nid_t nid, unsigned int power_state)
1154 state = snd_hdac_codec_read(codec, nid, 0,