Lines Matching refs:ei
128 struct snd_ctl_elem_info *ei = mixer->info + n; in mixer_open() local
129 ei->id.numid = eid[n].numid; in mixer_open()
130 if (ioctl(fd, SNDRV_CTL_IOCTL_ELEM_INFO, ei) < 0) in mixer_open()
132 mixer->ctl[n].info = ei; in mixer_open()
134 if (ei->type == SNDRV_CTL_ELEM_TYPE_ENUMERATED) { in mixer_open()
135 char **enames = calloc(ei->value.enumerated.items, sizeof(char*)); in mixer_open()
139 for (m = 0; m < ei->value.enumerated.items; m++) { in mixer_open()
141 tmp.id.numid = ei->id.numid; in mixer_open()
245 static int percent_to_int(struct snd_ctl_elem_info *ei, int percent) in percent_to_int() argument
254 range = (ei->value.integer.max - ei->value.integer.min); in percent_to_int()
256 return ei->value.integer.min + (range * percent) / 100; in percent_to_int()
259 static int int_to_percent(struct snd_ctl_elem_info *ei, int value) in int_to_percent() argument
261 int range = (ei->value.integer.max - ei->value.integer.min); in int_to_percent()
266 return ((value - ei->value.integer.min) / range) * 100; in int_to_percent()