Lines Matching refs:min
50 #define check_range(val, min, max) \ argument
51 (((val < min) ? (min) : (val > max) ? (max) : (val)))
56 #define percent_to_index(val, min, max) \ argument
57 ((val) * ((max) - (min)) * 0.01 + (min) + .5)
260 ei->value.integer.min, in mixer_dump()
267 ei->value.integer64.min, in mixer_dump()
313 long *min, long *max, unsigned int *tlv_type) in mixer_ctl_read_tlv() argument
357 *min = (long)tlv[2]; in mixer_ctl_read_tlv()
378 *min = tlv[2]; in mixer_ctl_read_tlv()
401 long min, max; in mixer_ctl_get() local
409 mixer_ctl_read_tlv(ctl, tlv, &min, &max, &tlv_type); in mixer_ctl_get()
460 return (long)percent_to_index(percent, ei->value.integer.min, ei->value.integer.max); in scale_int()
472 return (long long)percent_to_index(percent, ei->value.integer.min, ei->value.integer.max); in scale_int64()
526 long min, max; in mixer_ctl_set() local
542 } else if (!mixer_ctl_read_tlv(ctl, tlv, &min, &max, &tlv_type)) { in mixer_ctl_set()
547 if (min < 0) { in mixer_ctl_set()
548 max = max - min; in mixer_ctl_set()
549 min = 0; in mixer_ctl_set()
551 percent = check_range(percent, min, max); in mixer_ctl_set()
552 ALOGV("tlv db linear: %d %d %d\n", percent, min, max); in mixer_ctl_set()
556 percent = (long)percent_to_index(percent, min, max); in mixer_ctl_set()
557 percent = check_range(percent, min, max); in mixer_ctl_set()
697 long min, max; in mixer_ctl_set_value() local
706 } else if (!mixer_ctl_read_tlv(ctl, tlv, &min, &max, &tlv_type)) { in mixer_ctl_set_value()
707 ALOGV("min = %x max = %x", min, max); in mixer_ctl_set_value()
708 if (set_volume_simple(ctl, argv, min, max, count)) in mixer_ctl_set_value()