Lines Matching defs: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;
434 static unsigned int get_num_conns(struct hdac_device *codec, hda_nid_t nid)
436 unsigned int wcaps = snd_hdac_get_wcaps(codec, nid);
443 parm = snd_hdac_read_parm(codec, nid, AC_PAR_CONNLIST_LEN);
452 * @nid: NID
462 int snd_hdac_get_connections(struct hdac_device *codec, hda_nid_t nid,
471 parm = get_num_conns(codec, nid);
492 err = snd_hdac_read(codec, nid, AC_VERB_GET_CONNECT_LIST, 0,
509 err = snd_hdac_read(codec, nid,
520 nid, i, parm);
849 static unsigned int query_pcm_param(struct hdac_device *codec, hda_nid_t nid)
853 if (nid != codec->afg &&
854 (snd_hdac_get_wcaps(codec, nid) & AC_WCAP_FORMAT_OVRD))
855 val = snd_hdac_read_parm(codec, nid, AC_PAR_PCM);
863 static unsigned int query_stream_param(struct hdac_device *codec, hda_nid_t nid)
865 unsigned int streams = snd_hdac_read_parm(codec, nid, AC_PAR_STREAM);
877 * @nid: NID to query
888 int snd_hdac_query_supported_pcm(struct hdac_device *codec, hda_nid_t nid,
894 wcaps = snd_hdac_get_wcaps(codec, nid);
895 val = query_pcm_param(codec, nid);
905 "rates == 0 (nid=0x%x, val=0x%x, ovrd=%i)\n",
906 nid, val,
918 streams = query_stream_param(codec, nid);
969 "formats == 0 (nid=0x%x, val=0x%x, ovrd=%i, streams=0x%x)\n",
970 nid, val,
990 * @nid: NID to check
997 bool snd_hdac_is_supported_format(struct hdac_device *codec, hda_nid_t nid,
1003 val = query_pcm_param(codec, nid);
1017 stream = query_stream_param(codec, nid);
1054 static unsigned int codec_read(struct hdac_device *hdac, hda_nid_t nid,
1057 unsigned int cmd = snd_hdac_make_cmd(hdac, nid, verb, parm);
1066 static int codec_write(struct hdac_device *hdac, hda_nid_t nid,
1069 unsigned int cmd = snd_hdac_make_cmd(hdac, nid, verb, parm);
1077 * @nid: NID to send the command
1086 int snd_hdac_codec_read(struct hdac_device *hdac, hda_nid_t nid,
1089 return codec_read(hdac, nid, flags, verb, parm);
1096 * @nid: NID to send the command
1105 int snd_hdac_codec_write(struct hdac_device *hdac, hda_nid_t nid,
1108 return codec_write(hdac, nid, flags, verb, parm);
1117 * @nid: NID to send the command
1123 hda_nid_t nid, unsigned int target_state)
1125 unsigned int state = codec_read(hdac, nid, 0,
1139 * @nid: NID to send the command
1145 hda_nid_t nid, unsigned int power_state)
1151 state = snd_hdac_codec_read(codec, nid, 0,