Lines Matching refs:nid
224 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()
331 int snd_hdac_override_parm(struct hdac_device *codec, hda_nid_t nid, in snd_hdac_override_parm() argument
334 unsigned int verb = (AC_VERB_PARAMETERS << 8) | (nid << 20) | parm; in snd_hdac_override_parm()
356 int snd_hdac_get_sub_nodes(struct hdac_device *codec, hda_nid_t nid, in snd_hdac_get_sub_nodes() argument
361 parm = snd_hdac_read_parm_uncached(codec, nid, AC_PAR_NODE_COUNT); in snd_hdac_get_sub_nodes()
377 hda_nid_t nid; in setup_fg_nodes() local
379 total_nodes = snd_hdac_get_sub_nodes(codec, AC_NODE_ROOT, &nid); in setup_fg_nodes()
380 for (i = 0; i < total_nodes; i++, nid++) { in setup_fg_nodes()
381 function_id = snd_hdac_read_parm(codec, nid, in setup_fg_nodes()
385 codec->afg = nid; in setup_fg_nodes()
390 codec->mfg = nid; in setup_fg_nodes()
436 static unsigned int get_num_conns(struct hdac_device *codec, hda_nid_t nid) in get_num_conns() argument
438 unsigned int wcaps = get_wcaps(codec, nid); in get_num_conns()
445 parm = snd_hdac_read_parm(codec, nid, AC_PAR_CONNLIST_LEN); in get_num_conns()
464 int snd_hdac_get_connections(struct hdac_device *codec, hda_nid_t nid, in snd_hdac_get_connections() argument
473 parm = get_num_conns(codec, nid); in snd_hdac_get_connections()
494 err = snd_hdac_read(codec, nid, AC_VERB_GET_CONNECT_LIST, 0, in snd_hdac_get_connections()
511 err = snd_hdac_read(codec, nid, in snd_hdac_get_connections()
522 nid, i, parm); in snd_hdac_get_connections()
787 static unsigned int query_pcm_param(struct hdac_device *codec, hda_nid_t nid) in query_pcm_param() argument
791 if (nid != codec->afg && in query_pcm_param()
792 (get_wcaps(codec, nid) & AC_WCAP_FORMAT_OVRD)) in query_pcm_param()
793 val = snd_hdac_read_parm(codec, nid, AC_PAR_PCM); in query_pcm_param()
801 static unsigned int query_stream_param(struct hdac_device *codec, hda_nid_t nid) in query_stream_param() argument
803 unsigned int streams = snd_hdac_read_parm(codec, nid, AC_PAR_STREAM); in query_stream_param()
825 int snd_hdac_query_supported_pcm(struct hdac_device *codec, hda_nid_t nid, in snd_hdac_query_supported_pcm() argument
830 wcaps = get_wcaps(codec, nid); in snd_hdac_query_supported_pcm()
831 val = query_pcm_param(codec, nid); in snd_hdac_query_supported_pcm()
842 nid, val, in snd_hdac_query_supported_pcm()
853 streams = query_stream_param(codec, nid); in snd_hdac_query_supported_pcm()
905 nid, val, in snd_hdac_query_supported_pcm()
930 bool snd_hdac_is_supported_format(struct hdac_device *codec, hda_nid_t nid, in snd_hdac_is_supported_format() argument
936 val = query_pcm_param(codec, nid); in snd_hdac_is_supported_format()
950 stream = query_stream_param(codec, nid); in snd_hdac_is_supported_format()
987 static unsigned int codec_read(struct hdac_device *hdac, hda_nid_t nid, in codec_read() argument
990 unsigned int cmd = snd_hdac_make_cmd(hdac, nid, verb, parm); in codec_read()
999 static int codec_write(struct hdac_device *hdac, hda_nid_t nid, in codec_write() argument
1002 unsigned int cmd = snd_hdac_make_cmd(hdac, nid, verb, parm); in codec_write()
1019 int snd_hdac_codec_read(struct hdac_device *hdac, hda_nid_t nid, in snd_hdac_codec_read() argument
1022 return codec_read(hdac, nid, flags, verb, parm); in snd_hdac_codec_read()
1038 int snd_hdac_codec_write(struct hdac_device *hdac, hda_nid_t nid, in snd_hdac_codec_write() argument
1041 return codec_write(hdac, nid, flags, verb, parm); in snd_hdac_codec_write()
1056 hda_nid_t nid, unsigned int target_state) in snd_hdac_check_power_state() argument
1058 unsigned int state = codec_read(hdac, nid, 0, in snd_hdac_check_power_state()
1078 hda_nid_t nid, unsigned int power_state) in snd_hdac_sync_power_state() argument
1084 state = snd_hdac_codec_read(codec, nid, 0, in snd_hdac_sync_power_state()