Lines Matching refs:n
99 static const char *elem_iface_name(snd_ctl_elem_iface_t n) in elem_iface_name() argument
101 switch (n) { in elem_iface_name()
113 static const char *elem_type_name(snd_ctl_elem_type_t n) in elem_type_name() argument
115 switch (n) { in elem_type_name()
129 unsigned n,m; in mixer_close() local
135 for (n = 0; n < mixer->count; n++) { in mixer_close()
136 if (mixer->ctl[n].ename) { in mixer_close()
137 unsigned max = mixer->ctl[n].info->value.enumerated.items; in mixer_close()
139 free(mixer->ctl[n].ename[m]); in mixer_close()
140 free(mixer->ctl[n].ename); in mixer_close()
158 unsigned n, m; in mixer_open() local
193 for (n = 0; n < mixer->count; n++) { in mixer_open()
194 struct snd_ctl_elem_info *ei = mixer->info + n; in mixer_open()
195 ei->id.numid = eid[n].numid; in mixer_open()
198 mixer->ctl[n].info = ei; in mixer_open()
199 mixer->ctl[n].mixer = mixer; in mixer_open()
204 mixer->ctl[n].ename = enames; in mixer_open()
233 unsigned n, m; in mixer_dump() local
236 for (n = 0; n < mixer->count; n++) { in mixer_dump()
238 struct snd_ctl_elem_info *ei = mixer->info + n; in mixer_dump()
273 ALOGV(" { %s=0", mixer->ctl[n].ename[0]); in mixer_dump()
275 ALOGV(", %s=%d", mixer->ctl[n].ename[m],m); in mixer_dump()
287 unsigned n; in mixer_get_control() local
288 for (n = 0; n < mixer->count; n++) { in mixer_get_control()
289 if (mixer->info[n].id.index == index) { in mixer_get_control()
290 if (!strncmp(name, (char*) mixer->info[n].id.name, in mixer_get_control()
291 sizeof(mixer->info[n].id.name))) { in mixer_get_control()
292 return mixer->ctl + n; in mixer_get_control()
299 struct mixer_ctl *mixer_get_nth_control(struct mixer *mixer, unsigned n) in mixer_get_nth_control() argument
301 if (n < mixer->count) in mixer_get_nth_control()
302 return mixer->ctl + n; in mixer_get_nth_control()
397 unsigned int n; in mixer_ctl_get() local
422 for (n = 0; n < ctl->info->count; n++) in mixer_ctl_get()
423 ALOGV(" %s", ev.value.integer.value[n] ? "on" : "off"); in mixer_ctl_get()
427 for (n = 0; n < ctl->info->count; n++) in mixer_ctl_get()
428 ALOGV(" %ld", ev.value.integer.value[n]); in mixer_ctl_get()
433 for (n = 0; n < ctl->info->count; n++) in mixer_ctl_get()
434 ALOGV(" %lld", ev.value.integer64.value[n]); in mixer_ctl_get()
438 for (n = 0; n < ctl->info->count; n++) { in mixer_ctl_get()
439 unsigned v = ev.value.enumerated.item[n]; in mixer_ctl_get()
482 unsigned n; in mixer_ctl_mulvalues() local
496 for (n = 0; n < ctl->info->count; n++) in mixer_ctl_mulvalues()
497 ev.value.integer.value[n] = !!atoi(argv[n]); in mixer_ctl_mulvalues()
500 for (n = 0; n < ctl->info->count; n++) { in mixer_ctl_mulvalues()
501 fprintf( stderr, "Value: %d idx:%d\n", atoi(argv[n]), n); in mixer_ctl_mulvalues()
502 ev.value.integer.value[n] = atoi(argv[n]); in mixer_ctl_mulvalues()
507 for (n = 0; n < ctl->info->count; n++) { in mixer_ctl_mulvalues()
508 long long value_ll = scale_int64(ctl->info, atoi(argv[n])); in mixer_ctl_mulvalues()
510 ev.value.integer64.value[n] = value_ll; in mixer_ctl_mulvalues()
525 unsigned n; in mixer_ctl_set() local
569 for (n = 0; n < ctl->info->count; n++) in mixer_ctl_set()
570 ev.value.integer.value[n] = !!percent; in mixer_ctl_set()
578 for (n = 0; n < ctl->info->count; n++) in mixer_ctl_set()
579 ev.value.integer.value[n] = value; in mixer_ctl_set()
588 for (n = 0; n < ctl->info->count; n++) in mixer_ctl_set()
589 ev.value.integer64.value[n] = value; in mixer_ctl_set()
619 unsigned n; in set_volume_simple() local
660 for (n = 0; n < ctl->info->count; n++) in set_volume_simple()
661 ev.value.integer.value[n] = !!val; in set_volume_simple()
665 for (n = 0; n < ctl->info->count; n++) in set_volume_simple()
666 ev.value.integer.value[n] = val; in set_volume_simple()
671 for (n = 0; n < ctl->info->count; n++) { in set_volume_simple()
674 ev.value.integer64.value[n] = value_ll; in set_volume_simple()
722 unsigned n, max; in mixer_ctl_select() local
734 for (n = 0; n < max; n++) { in mixer_ctl_select()
736 str_len = strnlen(ctl->ename[n], 64); in mixer_ctl_select()
740 if (!strncmp(value, ctl->ename[n], str_len)) { in mixer_ctl_select()
742 ev.value.enumerated.item[0] = n; in mixer_ctl_select()