Lines Matching refs:max

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)
137 unsigned max = mixer->ctl[n].info->value.enumerated.items; in mixer_close() local
138 for (m = 0; m < max; m++) in mixer_close()
261 ei->value.integer.max, in mixer_dump()
268 ei->value.integer64.max, in mixer_dump()
313 long *min, long *max, unsigned int *tlv_type) in mixer_ctl_read_tlv() argument
362 *max = (ctl->info->value.integer.max); in mixer_ctl_read_tlv()
363 print_dB((long)ctl->info->value.integer.max); in mixer_ctl_read_tlv()
381 *max = tlv[3]; 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()
548 max = max - min; 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()
722 unsigned n, max; in mixer_ctl_select() local
733 max = ctl->info->value.enumerated.items; in mixer_ctl_select()
734 for (n = 0; n < max; n++) { in mixer_ctl_select()