Lines Matching refs:max
180 int max; in snd_soc_info_volsw() local
182 max = uinfo->value.integer.max = mc->max - mc->min; in snd_soc_info_volsw()
183 if (mc->platform_max && mc->platform_max < max) in snd_soc_info_volsw()
184 max = mc->platform_max; in snd_soc_info_volsw()
186 if (max == 1) { in snd_soc_info_volsw()
199 uinfo->value.integer.max = max; in snd_soc_info_volsw()
223 int max; in snd_soc_info_volsw_sx() local
226 max = mc->platform_max; in snd_soc_info_volsw_sx()
228 max = mc->max; in snd_soc_info_volsw_sx()
230 if (max == 1 && !strstr(kcontrol->id.name, " Volume")) in snd_soc_info_volsw_sx()
237 uinfo->value.integer.max = max; in snd_soc_info_volsw_sx()
263 int max = mc->max; in snd_soc_get_volsw() local
266 unsigned int mask = (1 << fls(max)) - 1; in snd_soc_get_volsw()
281 max - ucontrol->value.integer.value[0]; in snd_soc_get_volsw()
296 max - ucontrol->value.integer.value[1]; in snd_soc_get_volsw()
323 int max = mc->max; in snd_soc_put_volsw() local
326 unsigned int mask = (1 << fls(max)) - 1; in snd_soc_put_volsw()
341 if (val > max - min) in snd_soc_put_volsw()
345 val = max - val; in snd_soc_put_volsw()
354 if (val2 > max - min) in snd_soc_put_volsw()
358 val2 = max - val2; in snd_soc_put_volsw()
405 int max = mc->max; in snd_soc_get_volsw_sx() local
407 unsigned int mask = (1U << (fls(min + max) - 1)) - 1; in snd_soc_get_volsw_sx()
443 int max = mc->max; in snd_soc_put_volsw_sx() local
445 unsigned int mask = (1U << (fls(min + max) - 1)) - 1; in snd_soc_put_volsw_sx()
455 if (val > max) in snd_soc_put_volsw_sx()
471 if (val2 > max) in snd_soc_put_volsw_sx()
509 mc->platform_max = mc->max; in snd_soc_info_volsw_range()
515 uinfo->value.integer.max = platform_max - min; in snd_soc_info_volsw_range()
540 int max = mc->max; in snd_soc_put_volsw_range() local
541 unsigned int mask = (1 << fls(max)) - 1; in snd_soc_put_volsw_range()
551 if (tmp > mc->max - mc->min) in snd_soc_put_volsw_range()
555 val = (max - ucontrol->value.integer.value[0]) & mask; in snd_soc_put_volsw_range()
572 if (tmp > mc->max - mc->min) in snd_soc_put_volsw_range()
576 val = (max - ucontrol->value.integer.value[1]) & mask; in snd_soc_put_volsw_range()
613 int max = mc->max; in snd_soc_get_volsw_range() local
614 unsigned int mask = (1 << fls(max)) - 1; in snd_soc_get_volsw_range()
622 max - ucontrol->value.integer.value[0]; in snd_soc_get_volsw_range()
632 max - ucontrol->value.integer.value[1]; in snd_soc_get_volsw_range()
652 const char *name, int max) in snd_soc_limit_volume() argument
658 if (unlikely(!name || max <= 0)) in snd_soc_limit_volume()
664 if (max <= mc->max - mc->min) { in snd_soc_limit_volume()
665 mc->platform_max = max; in snd_soc_limit_volume()
812 ucontrol->count = params->max; in snd_soc_bytes_info_ext()
822 unsigned int count = size < params->max ? size : params->max; in snd_soc_bytes_tlv_callback()
858 uinfo->value.integer.max = mc->max; in snd_soc_info_xr_sx()
890 long max = mc->max; in snd_soc_get_xr_sx() local
899 if (min < 0 && val > max) in snd_soc_get_xr_sx()
902 val = max - val; in snd_soc_get_xr_sx()
934 long max = mc->max; in snd_soc_put_xr_sx() local
939 if (val < mc->min || val > mc->max) in snd_soc_put_xr_sx()
942 val = max - val; in snd_soc_put_xr_sx()