Lines Matching refs:i

129     unsigned int i;
133 for (i = 0; i < path->length; i++) {
134 struct mixer_ctl *ctl = index_to_ctl(ar, path->setting[i].ctl_index);
136 ALOGE(" id=%d: ctl=%s", i, mixer_ctl_get_name(ctl));
138 for (j = 0; j < path->setting[i].num_values; j++)
139 ALOGE(" id=%d value=0x%02x", j, path->setting[i].value.bytes[j]);
141 for (j = 0; j < path->setting[i].num_values; j++)
142 ALOGE(" id=%d value=%d", j, path->setting[i].value.enumerated[j]);
144 for (j = 0; j < path->setting[i].num_values; j++)
145 ALOGE(" id=%d value=%ld", j, path->setting[i].value.integer[j]);
153 unsigned int i; in path_free() local
155 for (i = 0; i < ar->num_mixer_paths; i++) { in path_free()
156 if (ar->mixer_path[i].name) in path_free()
157 free(ar->mixer_path[i].name); in path_free()
158 if (ar->mixer_path[i].setting) { in path_free()
159 if (ar->mixer_path[i].setting->value.ptr) in path_free()
160 free(ar->mixer_path[i].setting->value.ptr); in path_free()
161 free(ar->mixer_path[i].setting); in path_free()
172 unsigned int i; in path_get_by_name() local
174 for (i = 0; i < ar->num_mixer_paths; i++) in path_get_by_name()
175 if (strcmp(ar->mixer_path[i].name, name) == 0) in path_get_by_name()
176 return &ar->mixer_path[i]; in path_get_by_name()
220 unsigned int i; in find_ctl_index_in_path() local
222 for (i = 0; i < path->length; i++) in find_ctl_index_in_path()
223 if (path->setting[i].ctl_index == ctl_index) in find_ctl_index_in_path()
224 return i; in find_ctl_index_in_path()
296 unsigned int i; in path_add_value() local
341 for (i = 0; i < num_values; i++) in path_add_value()
342 path->setting[path_index].value.bytes[i] = mixer_value->value; in path_add_value()
344 for (i = 0; i < num_values; i++) in path_add_value()
345 path->setting[path_index].value.enumerated[i] = mixer_value->value; in path_add_value()
347 for (i = 0; i < num_values; i++) in path_add_value()
348 path->setting[path_index].value.integer[i] = mixer_value->value; in path_add_value()
366 unsigned int i; in path_add_path() local
368 for (i = 0; i < sub_path->length; i++) in path_add_path()
369 if (path_add_setting(ar, path, &sub_path->setting[i]) < 0) in path_add_path()
377 unsigned int i; in path_apply() local
382 for (i = 0; i < path->length; i++) { in path_apply()
383 ctl_index = path->setting[i].ctl_index; in path_apply()
389 memcpy(ar->mixer_state[ctl_index].new_value.ptr, path->setting[i].value.ptr, in path_apply()
390 path->setting[i].num_values * value_sz); in path_apply()
398 unsigned int i; in path_reset() local
403 for (i = 0; i < path->length; i++) { in path_reset()
404 ctl_index = path->setting[i].ctl_index; in path_reset()
422 unsigned int i; in mixer_enum_string_to_value() local
425 for (i = 0; i < mixer_ctl_get_num_enums(ctl); i++) { in mixer_enum_string_to_value()
426 if (strcmp(mixer_ctl_get_enum_string(ctl, i), string) == 0) in mixer_enum_string_to_value()
430 return i; in mixer_enum_string_to_value()
441 unsigned int i; in start_tag() local
450 for (i = 0; attr[i]; i += 2) { in start_tag()
451 if (strcmp(attr[i], "name") == 0) in start_tag()
452 attr_name = attr[i + 1]; in start_tag()
453 if (strcmp(attr[i], "id") == 0) in start_tag()
454 attr_id = attr[i + 1]; in start_tag()
455 else if (strcmp(attr[i], "value") == 0) in start_tag()
456 attr_value = attr[i + 1]; in start_tag()
526 for (i = 0; i < ar->mixer_state[ctl_index].num_values; i++) in start_tag()
528 ar->mixer_state[ctl_index].new_value.bytes[i] = value; in start_tag()
530 ar->mixer_state[ctl_index].new_value.enumerated[i] = value; in start_tag()
532 ar->mixer_state[ctl_index].new_value.integer[i] = value; in start_tag()
561 unsigned int i; in alloc_mixer_state() local
571 for (i = 0; i < ar->num_mixer_ctls; i++) { in alloc_mixer_state()
572 ctl = mixer_get_ctl(ar->mixer, i); in alloc_mixer_state()
575 ar->mixer_state[i].ctl = ctl; in alloc_mixer_state()
576 ar->mixer_state[i].num_values = num_values; in alloc_mixer_state()
585 ar->mixer_state[i].old_value.ptr = calloc(num_values, value_sz); in alloc_mixer_state()
586 ar->mixer_state[i].new_value.ptr = calloc(num_values, value_sz); in alloc_mixer_state()
587 ar->mixer_state[i].reset_value.ptr = calloc(num_values, value_sz); in alloc_mixer_state()
590 ar->mixer_state[i].old_value.enumerated[0] = mixer_ctl_get_value(ctl, 0); in alloc_mixer_state()
592 mixer_ctl_get_array(ctl, ar->mixer_state[i].old_value.ptr, num_values); in alloc_mixer_state()
594 memcpy(ar->mixer_state[i].new_value.ptr, ar->mixer_state[i].old_value.ptr, in alloc_mixer_state()
603 unsigned int i; in free_mixer_state() local
606 for (i = 0; i < ar->num_mixer_ctls; i++) { in free_mixer_state()
607 type = mixer_ctl_get_type(ar->mixer_state[i].ctl); in free_mixer_state()
611 free(ar->mixer_state[i].old_value.ptr); in free_mixer_state()
612 free(ar->mixer_state[i].new_value.ptr); in free_mixer_state()
613 free(ar->mixer_state[i].reset_value.ptr); in free_mixer_state()
623 unsigned int i; in audio_route_update_mixer() local
627 for (i = 0; i < ar->num_mixer_ctls; i++) { in audio_route_update_mixer()
628 unsigned int num_values = ar->mixer_state[i].num_values; in audio_route_update_mixer()
631 ctl = ar->mixer_state[i].ctl; in audio_route_update_mixer()
642 … if (ar->mixer_state[i].old_value.bytes[j] != ar->mixer_state[i].new_value.bytes[j]) { in audio_route_update_mixer()
649 if (ar->mixer_state[i].old_value.enumerated[j] in audio_route_update_mixer()
650 != ar->mixer_state[i].new_value.enumerated[j]) { in audio_route_update_mixer()
657 … if (ar->mixer_state[i].old_value.integer[j] != ar->mixer_state[i].new_value.integer[j]) { in audio_route_update_mixer()
665 mixer_ctl_set_value(ctl, 0, ar->mixer_state[i].new_value.enumerated[0]); in audio_route_update_mixer()
667 mixer_ctl_set_array(ctl, ar->mixer_state[i].new_value.ptr, num_values); in audio_route_update_mixer()
670 memcpy(ar->mixer_state[i].old_value.ptr, ar->mixer_state[i].new_value.ptr, in audio_route_update_mixer()
681 unsigned int i; in save_mixer_state() local
684 for (i = 0; i < ar->num_mixer_ctls; i++) { in save_mixer_state()
685 type = mixer_ctl_get_type(ar->mixer_state[i].ctl); in save_mixer_state()
690 memcpy(ar->mixer_state[i].reset_value.ptr, ar->mixer_state[i].new_value.ptr, in save_mixer_state()
691 ar->mixer_state[i].num_values * value_sz); in save_mixer_state()
698 unsigned int i; in audio_route_reset() local
702 for (i = 0; i < ar->num_mixer_ctls; i++) { in audio_route_reset()
703 type = mixer_ctl_get_type(ar->mixer_state[i].ctl); in audio_route_reset()
708 memcpy(ar->mixer_state[i].new_value.ptr, ar->mixer_state[i].reset_value.ptr, in audio_route_reset()
709 ar->mixer_state[i].num_values * value_sz); in audio_route_reset()
762 int32_t i, end; in audio_route_update_path() local
776 i = reverse ? (path->length - 1) : 0; in audio_route_update_path()
779 while (i != end) { in audio_route_update_path()
783 ctl_index = path->setting[i].ctl_index; in audio_route_update_path()
815 i = reverse ? (i - 1) : (i + 1); in audio_route_update_path()