Lines Matching refs:nid
225 static unsigned int snd_hdac_make_cmd(struct hdac_device *codec, hda_nid_t nid, in snd_hdac_make_cmd() argument
231 if ((addr & ~0xf) || (nid & ~0x7f) || in snd_hdac_make_cmd()
234 addr, nid, verb, parm); in snd_hdac_make_cmd()
239 val |= (u32)nid << 20; in snd_hdac_make_cmd()
276 int snd_hdac_read(struct hdac_device *codec, hda_nid_t nid, in snd_hdac_read() argument
279 unsigned int cmd = snd_hdac_make_cmd(codec, nid, verb, parm); in snd_hdac_read()
294 int _snd_hdac_read_parm(struct hdac_device *codec, hda_nid_t nid, int parm, in _snd_hdac_read_parm() argument
299 cmd = snd_hdac_regmap_encode_verb(nid, AC_VERB_PARAMETERS) | parm; in _snd_hdac_read_parm()
313 int snd_hdac_read_parm_uncached(struct hdac_device *codec, hda_nid_t nid, in snd_hdac_read_parm_uncached() argument
318 cmd = snd_hdac_regmap_encode_verb(nid, AC_VERB_PARAMETERS) | parm; in snd_hdac_read_parm_uncached()
332 int snd_hdac_override_parm(struct hdac_device *codec, hda_nid_t nid, in snd_hdac_override_parm() argument
335 unsigned int verb = (AC_VERB_PARAMETERS << 8) | (nid << 20) | parm; in snd_hdac_override_parm()
357 int snd_hdac_get_sub_nodes(struct hdac_device *codec, hda_nid_t nid, in snd_hdac_get_sub_nodes() argument
362 parm = snd_hdac_read_parm_uncached(codec, nid, AC_PAR_NODE_COUNT); in snd_hdac_get_sub_nodes()
378 hda_nid_t nid; in setup_fg_nodes() local
380 total_nodes = snd_hdac_get_sub_nodes(codec, AC_NODE_ROOT, &nid); in setup_fg_nodes()
381 for (i = 0; i < total_nodes; i++, nid++) { in setup_fg_nodes()
382 function_id = snd_hdac_read_parm(codec, nid, in setup_fg_nodes()
386 codec->afg = nid; in setup_fg_nodes()
391 codec->mfg = nid; in setup_fg_nodes()
434 static unsigned int get_num_conns(struct hdac_device *codec, hda_nid_t nid) in get_num_conns() argument
436 unsigned int wcaps = snd_hdac_get_wcaps(codec, nid); in get_num_conns()
443 parm = snd_hdac_read_parm(codec, nid, AC_PAR_CONNLIST_LEN); in get_num_conns()
462 int snd_hdac_get_connections(struct hdac_device *codec, hda_nid_t nid, in snd_hdac_get_connections() argument
471 parm = get_num_conns(codec, nid); in snd_hdac_get_connections()
492 err = snd_hdac_read(codec, nid, AC_VERB_GET_CONNECT_LIST, 0, in snd_hdac_get_connections()
509 err = snd_hdac_read(codec, nid, in snd_hdac_get_connections()
520 nid, i, parm); in snd_hdac_get_connections()
849 static unsigned int query_pcm_param(struct hdac_device *codec, hda_nid_t nid) in query_pcm_param() argument
853 if (nid != codec->afg && in query_pcm_param()
854 (snd_hdac_get_wcaps(codec, nid) & AC_WCAP_FORMAT_OVRD)) in query_pcm_param()
855 val = snd_hdac_read_parm(codec, nid, AC_PAR_PCM); in query_pcm_param()
863 static unsigned int query_stream_param(struct hdac_device *codec, hda_nid_t nid) in query_stream_param() argument
865 unsigned int streams = snd_hdac_read_parm(codec, nid, AC_PAR_STREAM); in query_stream_param()
888 int snd_hdac_query_supported_pcm(struct hdac_device *codec, hda_nid_t nid, in snd_hdac_query_supported_pcm() argument
894 wcaps = snd_hdac_get_wcaps(codec, nid); in snd_hdac_query_supported_pcm()
895 val = query_pcm_param(codec, nid); in snd_hdac_query_supported_pcm()
906 nid, val, in snd_hdac_query_supported_pcm()
918 streams = query_stream_param(codec, nid); in snd_hdac_query_supported_pcm()
970 nid, val, in snd_hdac_query_supported_pcm()
997 bool snd_hdac_is_supported_format(struct hdac_device *codec, hda_nid_t nid, in snd_hdac_is_supported_format() argument
1003 val = query_pcm_param(codec, nid); in snd_hdac_is_supported_format()
1017 stream = query_stream_param(codec, nid); in snd_hdac_is_supported_format()
1054 static unsigned int codec_read(struct hdac_device *hdac, hda_nid_t nid, in codec_read() argument
1057 unsigned int cmd = snd_hdac_make_cmd(hdac, nid, verb, parm); in codec_read()
1066 static int codec_write(struct hdac_device *hdac, hda_nid_t nid, in codec_write() argument
1069 unsigned int cmd = snd_hdac_make_cmd(hdac, nid, verb, parm); in codec_write()
1086 int snd_hdac_codec_read(struct hdac_device *hdac, hda_nid_t nid, in snd_hdac_codec_read() argument
1089 return codec_read(hdac, nid, flags, verb, parm); in snd_hdac_codec_read()
1105 int snd_hdac_codec_write(struct hdac_device *hdac, hda_nid_t nid, in snd_hdac_codec_write() argument
1108 return codec_write(hdac, nid, flags, verb, parm); in snd_hdac_codec_write()
1123 hda_nid_t nid, unsigned int target_state) in snd_hdac_check_power_state() argument
1125 unsigned int state = codec_read(hdac, nid, 0, in snd_hdac_check_power_state()
1145 hda_nid_t nid, unsigned int power_state) in snd_hdac_sync_power_state() argument
1151 state = snd_hdac_codec_read(codec, nid, 0, in snd_hdac_sync_power_state()