Lines Matching refs:val
227 u32 val, addr; in snd_hdac_make_cmd() local
237 val = addr << 28; in snd_hdac_make_cmd()
238 val |= (u32)nid << 20; in snd_hdac_make_cmd()
239 val |= verb << 8; in snd_hdac_make_cmd()
240 val |= parm; in snd_hdac_make_cmd()
241 return val; in snd_hdac_make_cmd()
315 unsigned int cmd, val; in snd_hdac_read_parm_uncached() local
318 if (snd_hdac_regmap_read_raw_uncached(codec, cmd, &val) < 0) in snd_hdac_read_parm_uncached()
320 return val; in snd_hdac_read_parm_uncached()
332 unsigned int parm, unsigned int val) in snd_hdac_override_parm() argument
341 err = snd_hdac_regmap_write_raw(codec, verb, val); in snd_hdac_override_parm()
508 hda_nid_t val, n; in snd_hdac_get_connections() local
518 val = parm & mask; in snd_hdac_get_connections()
519 if (val == 0 && null_count++) { /* no second chance */ in snd_hdac_get_connections()
528 if (!prev_nid || prev_nid >= val) { in snd_hdac_get_connections()
531 prev_nid, val); in snd_hdac_get_connections()
534 for (n = prev_nid + 1; n <= val; n++) { in snd_hdac_get_connections()
546 conn_list[conns] = val; in snd_hdac_get_connections()
550 prev_nid = val; in snd_hdac_get_connections()
746 unsigned int val = 0; in snd_hdac_calc_stream_format() local
750 val = rate_bits[i].hda_fmt; in snd_hdac_calc_stream_format()
758 val |= channels - 1; in snd_hdac_calc_stream_format()
762 val |= AC_FMT_BITS_8; in snd_hdac_calc_stream_format()
765 val |= AC_FMT_BITS_16; in snd_hdac_calc_stream_format()
771 val |= AC_FMT_BITS_32; in snd_hdac_calc_stream_format()
773 val |= AC_FMT_BITS_24; in snd_hdac_calc_stream_format()
775 val |= AC_FMT_BITS_20; in snd_hdac_calc_stream_format()
782 val |= AC_FMT_TYPE_NON_PCM; in snd_hdac_calc_stream_format()
784 return val; in snd_hdac_calc_stream_format()
790 unsigned int val = 0; in query_pcm_param() local
794 val = snd_hdac_read_parm(codec, nid, AC_PAR_PCM); in query_pcm_param()
795 if (!val || val == -1) in query_pcm_param()
796 val = snd_hdac_read_parm(codec, codec->afg, AC_PAR_PCM); in query_pcm_param()
797 if (!val || val == -1) in query_pcm_param()
799 return val; in query_pcm_param()
829 unsigned int i, val, wcaps; in snd_hdac_query_supported_pcm() local
832 val = query_pcm_param(codec, nid); in snd_hdac_query_supported_pcm()
837 if (val & (1 << i)) in snd_hdac_query_supported_pcm()
843 nid, val, in snd_hdac_query_supported_pcm()
860 if (val & AC_SUPPCM_BITS_8) { in snd_hdac_query_supported_pcm()
864 if (val & AC_SUPPCM_BITS_16) { in snd_hdac_query_supported_pcm()
869 if (val & AC_SUPPCM_BITS_32) in snd_hdac_query_supported_pcm()
871 if (val & (AC_SUPPCM_BITS_20|AC_SUPPCM_BITS_24)) in snd_hdac_query_supported_pcm()
873 if (val & AC_SUPPCM_BITS_24) in snd_hdac_query_supported_pcm()
875 else if (val & AC_SUPPCM_BITS_20) in snd_hdac_query_supported_pcm()
877 } else if (val & (AC_SUPPCM_BITS_20|AC_SUPPCM_BITS_24| in snd_hdac_query_supported_pcm()
880 if (val & AC_SUPPCM_BITS_32) in snd_hdac_query_supported_pcm()
882 else if (val & AC_SUPPCM_BITS_24) in snd_hdac_query_supported_pcm()
884 else if (val & AC_SUPPCM_BITS_20) in snd_hdac_query_supported_pcm()
906 nid, val, in snd_hdac_query_supported_pcm()
935 unsigned int val = 0, rate, stream; in snd_hdac_is_supported_format() local
937 val = query_pcm_param(codec, nid); in snd_hdac_is_supported_format()
938 if (!val) in snd_hdac_is_supported_format()
944 if (val & (1 << i)) in snd_hdac_is_supported_format()
958 if (!(val & AC_SUPPCM_BITS_8)) in snd_hdac_is_supported_format()
962 if (!(val & AC_SUPPCM_BITS_16)) in snd_hdac_is_supported_format()
966 if (!(val & AC_SUPPCM_BITS_20)) in snd_hdac_is_supported_format()
970 if (!(val & AC_SUPPCM_BITS_24)) in snd_hdac_is_supported_format()
974 if (!(val & AC_SUPPCM_BITS_32)) in snd_hdac_is_supported_format()