Lines Matching refs:nid

213 unsigned int snd_hdac_make_cmd(struct hdac_device *codec, hda_nid_t nid,  in snd_hdac_make_cmd()  argument
219 if ((addr & ~0xf) || (nid & ~0x7f) || in snd_hdac_make_cmd()
222 addr, nid, verb, parm); in snd_hdac_make_cmd()
227 val |= (u32)nid << 20; in snd_hdac_make_cmd()
266 int snd_hdac_read(struct hdac_device *codec, hda_nid_t nid, in snd_hdac_read() argument
269 unsigned int cmd = snd_hdac_make_cmd(codec, nid, verb, parm); in snd_hdac_read()
280 int _snd_hdac_read_parm(struct hdac_device *codec, hda_nid_t nid, int parm, in _snd_hdac_read_parm() argument
285 cmd = snd_hdac_regmap_encode_verb(nid, AC_VERB_PARAMETERS) | parm; in _snd_hdac_read_parm()
299 int snd_hdac_read_parm_uncached(struct hdac_device *codec, hda_nid_t nid, in snd_hdac_read_parm_uncached() argument
306 val = snd_hdac_read_parm(codec, nid, parm); in snd_hdac_read_parm_uncached()
320 int snd_hdac_override_parm(struct hdac_device *codec, hda_nid_t nid, in snd_hdac_override_parm() argument
323 unsigned int verb = (AC_VERB_PARAMETERS << 8) | (nid << 20) | parm; in snd_hdac_override_parm()
345 int snd_hdac_get_sub_nodes(struct hdac_device *codec, hda_nid_t nid, in snd_hdac_get_sub_nodes() argument
350 parm = snd_hdac_read_parm_uncached(codec, nid, AC_PAR_NODE_COUNT); in snd_hdac_get_sub_nodes()
366 hda_nid_t nid; in setup_fg_nodes() local
368 total_nodes = snd_hdac_get_sub_nodes(codec, AC_NODE_ROOT, &nid); in setup_fg_nodes()
369 for (i = 0; i < total_nodes; i++, nid++) { in setup_fg_nodes()
370 function_id = snd_hdac_read_parm(codec, nid, in setup_fg_nodes()
374 codec->afg = nid; in setup_fg_nodes()
379 codec->mfg = nid; in setup_fg_nodes()
443 static unsigned int get_num_conns(struct hdac_device *codec, hda_nid_t nid) in get_num_conns() argument
445 unsigned int wcaps = get_wcaps(codec, nid); in get_num_conns()
452 parm = snd_hdac_read_parm(codec, nid, AC_PAR_CONNLIST_LEN); in get_num_conns()
471 int snd_hdac_get_connections(struct hdac_device *codec, hda_nid_t nid, in snd_hdac_get_connections() argument
480 parm = get_num_conns(codec, nid); in snd_hdac_get_connections()
501 err = snd_hdac_read(codec, nid, AC_VERB_GET_CONNECT_LIST, 0, in snd_hdac_get_connections()
518 err = snd_hdac_read(codec, nid, in snd_hdac_get_connections()
529 nid, i, parm); in snd_hdac_get_connections()
795 static unsigned int query_pcm_param(struct hdac_device *codec, hda_nid_t nid) in query_pcm_param() argument
799 if (nid != codec->afg && in query_pcm_param()
800 (get_wcaps(codec, nid) & AC_WCAP_FORMAT_OVRD)) in query_pcm_param()
801 val = snd_hdac_read_parm(codec, nid, AC_PAR_PCM); in query_pcm_param()
809 static unsigned int query_stream_param(struct hdac_device *codec, hda_nid_t nid) in query_stream_param() argument
811 unsigned int streams = snd_hdac_read_parm(codec, nid, AC_PAR_STREAM); in query_stream_param()
833 int snd_hdac_query_supported_pcm(struct hdac_device *codec, hda_nid_t nid, in snd_hdac_query_supported_pcm() argument
838 wcaps = get_wcaps(codec, nid); in snd_hdac_query_supported_pcm()
839 val = query_pcm_param(codec, nid); in snd_hdac_query_supported_pcm()
850 nid, val, in snd_hdac_query_supported_pcm()
861 streams = query_stream_param(codec, nid); in snd_hdac_query_supported_pcm()
913 nid, val, in snd_hdac_query_supported_pcm()
938 bool snd_hdac_is_supported_format(struct hdac_device *codec, hda_nid_t nid, in snd_hdac_is_supported_format() argument
944 val = query_pcm_param(codec, nid); in snd_hdac_is_supported_format()
958 stream = query_stream_param(codec, nid); in snd_hdac_is_supported_format()
995 static unsigned int codec_read(struct hdac_device *hdac, hda_nid_t nid, in codec_read() argument
998 unsigned int cmd = snd_hdac_make_cmd(hdac, nid, verb, parm); in codec_read()
1007 static int codec_write(struct hdac_device *hdac, hda_nid_t nid, in codec_write() argument
1010 unsigned int cmd = snd_hdac_make_cmd(hdac, nid, verb, parm); in codec_write()
1027 int snd_hdac_codec_read(struct hdac_device *hdac, hda_nid_t nid, in snd_hdac_codec_read() argument
1030 return codec_read(hdac, nid, flags, verb, parm); in snd_hdac_codec_read()
1046 int snd_hdac_codec_write(struct hdac_device *hdac, hda_nid_t nid, in snd_hdac_codec_write() argument
1049 return codec_write(hdac, nid, flags, verb, parm); in snd_hdac_codec_write()
1064 hda_nid_t nid, unsigned int target_state) in snd_hdac_check_power_state() argument
1066 unsigned int state = codec_read(hdac, nid, 0, in snd_hdac_check_power_state()