Lines Matching defs:ei
135 struct snd_ctl_elem_info *ei = mixer->elem_info + n;
136 ei->id.numid = eid[n].numid;
137 if (ioctl(fd, SNDRV_CTL_IOCTL_ELEM_INFO, ei) < 0)
139 mixer->ctl[n].info = ei;
141 if (ei->type == SNDRV_CTL_ELEM_TYPE_ENUMERATED) {
142 char **enames = calloc(ei->value.enumerated.items, sizeof(char*));
146 for (m = 0; m < ei->value.enumerated.items; m++) {
148 tmp.id.numid = ei->id.numid;
261 static int percent_to_int(struct snd_ctl_elem_info *ei, int percent)
270 range = (ei->value.integer.max - ei->value.integer.min);
272 return ei->value.integer.min + (range * percent) / 100;
275 static int int_to_percent(struct snd_ctl_elem_info *ei, int value)
277 int range = (ei->value.integer.max - ei->value.integer.min);
282 return ((value - ei->value.integer.min) / range) * 100;