Lines Matching refs:i

143     unsigned int i;
147 for (i = 0; i < path->length; i++) {
148 struct mixer_ctl *ctl = index_to_ctl(ar, path->setting[i].ctl_index);
150 ALOGE(" id=%d: ctl=%s", i, mixer_ctl_get_name(ctl));
152 for (j = 0; j < path->setting[i].num_values; j++)
153 ALOGE(" id=%d value=0x%02x", j, path->setting[i].value.bytes[j]);
155 for (j = 0; j < path->setting[i].num_values; j++)
156 ALOGE(" id=%d value=%d", j, path->setting[i].value.enumerated[j]);
158 for (j = 0; j < path->setting[i].num_values; j++)
159 ALOGE(" id=%d value=%ld", j, path->setting[i].value.integer[j]);
167 unsigned int i; in path_free() local
169 for (i = 0; i < ar->num_mixer_paths; i++) { in path_free()
170 free(ar->mixer_path[i].name); in path_free()
171 if (ar->mixer_path[i].setting) { in path_free()
173 for (j = 0; j < ar->mixer_path[i].length; j++) { in path_free()
174 free(ar->mixer_path[i].setting[j].value.ptr); in path_free()
176 free(ar->mixer_path[i].setting); in path_free()
177 ar->mixer_path[i].size = 0; in path_free()
178 ar->mixer_path[i].length = 0; in path_free()
179 ar->mixer_path[i].setting = NULL; in path_free()
191 unsigned int i; in path_get_by_name() local
193 for (i = 0; i < ar->num_mixer_paths; i++) in path_get_by_name()
194 if (strcmp(ar->mixer_path[i].name, name) == 0) in path_get_by_name()
195 return &ar->mixer_path[i]; in path_get_by_name()
239 unsigned int i; in find_ctl_index_in_path() local
241 for (i = 0; i < path->length; i++) in find_ctl_index_in_path()
242 if (path->setting[i].ctl_index == ctl_index) in find_ctl_index_in_path()
243 return i; in find_ctl_index_in_path()
315 unsigned int i; in path_add_value() local
360 for (i = 0; i < num_values; i++) in path_add_value()
361 path->setting[path_index].value.bytes[i] = mixer_value->values[i]; in path_add_value()
363 for (i = 0; i < num_values; i++) in path_add_value()
364 path->setting[path_index].value.integer[i] = mixer_value->values[i]; in path_add_value()
366 for (i = 0; i < num_values; i++) in path_add_value()
367 path->setting[path_index].value.enumerated[i] = mixer_value->value; in path_add_value()
369 for (i = 0; i < num_values; i++) in path_add_value()
370 path->setting[path_index].value.integer[i] = mixer_value->value; in path_add_value()
388 unsigned int i; in path_add_path() local
390 for (i = 0; i < sub_path->length; i++) { in path_add_path()
391 int retVal = path_add_setting(ar, path, &sub_path->setting[i]); in path_add_path()
404 unsigned int i; in path_apply() local
410 for (i = 0; i < path->length; i++) { in path_apply()
411 ctl_index = path->setting[i].ctl_index; in path_apply()
417 memcpy(ar->mixer_state[ctl_index].new_value.ptr, path->setting[i].value.ptr, in path_apply()
418 path->setting[i].num_values * value_sz); in path_apply()
426 unsigned int i; in path_reset() local
432 for (i = 0; i < path->length; i++) { in path_reset()
433 ctl_index = path->setting[i].ctl_index; in path_reset()
451 unsigned int i; in mixer_enum_string_to_value() local
461 for (i = 0; i < num_values; i++) { in mixer_enum_string_to_value()
462 if (strcmp(mixer_ctl_get_enum_string(ctl, i), string) == 0) in mixer_enum_string_to_value()
465 if (i == num_values) { in mixer_enum_string_to_value()
470 return i; in mixer_enum_string_to_value()
481 unsigned int i; in start_tag() local
491 for (i = 0; attr[i]; i += 2) { in start_tag()
492 if (strcmp(attr[i], "name") == 0) in start_tag()
493 attr_name = attr[i + 1]; in start_tag()
494 else if (strcmp(attr[i], "id") == 0) in start_tag()
495 attr_id = attr[i + 1]; in start_tag()
496 else if (strcmp(attr[i], "value") == 0) in start_tag()
497 attr_value = attr[i + 1]; in start_tag()
550 for (i = 0; i < num_values; i++) { in start_tag()
554 num_values, i, attr_name); in start_tag()
558 value_array[i] = strtol((char *)attr_sub_value, NULL, 0); in start_tag()
560 value_array[i] = in start_tag()
610 for (i = 0; i < ar->mixer_state[ctl_index].num_values; i++) in start_tag()
612 ar->mixer_state[ctl_index].new_value.bytes[i] = value_array[i]; in start_tag()
614 ar->mixer_state[ctl_index].new_value.integer[i] = value_array[i]; in start_tag()
616 ar->mixer_state[ctl_index].new_value.enumerated[i] = value; in start_tag()
618 ar->mixer_state[ctl_index].new_value.integer[i] = value; in start_tag()
655 unsigned int i; in alloc_mixer_state() local
665 for (i = 0; i < ar->num_mixer_ctls; i++) { in alloc_mixer_state()
666 ctl = mixer_get_ctl(ar->mixer, i); in alloc_mixer_state()
669 ar->mixer_state[i].ctl = ctl; in alloc_mixer_state()
670 ar->mixer_state[i].num_values = num_values; in alloc_mixer_state()
671 ar->mixer_state[i].active_count = 0; in alloc_mixer_state()
680 ar->mixer_state[i].old_value.ptr = calloc(num_values, value_sz); in alloc_mixer_state()
681 ar->mixer_state[i].new_value.ptr = calloc(num_values, value_sz); in alloc_mixer_state()
682 ar->mixer_state[i].reset_value.ptr = calloc(num_values, value_sz); in alloc_mixer_state()
685 ar->mixer_state[i].old_value.enumerated[0] = mixer_ctl_get_value(ctl, 0); in alloc_mixer_state()
687 mixer_ctl_get_array(ctl, ar->mixer_state[i].old_value.ptr, num_values); in alloc_mixer_state()
689 memcpy(ar->mixer_state[i].new_value.ptr, ar->mixer_state[i].old_value.ptr, in alloc_mixer_state()
698 unsigned int i; in free_mixer_state() local
701 for (i = 0; i < ar->num_mixer_ctls; i++) { in free_mixer_state()
702 type = mixer_ctl_get_type(ar->mixer_state[i].ctl); in free_mixer_state()
706 free(ar->mixer_state[i].old_value.ptr); in free_mixer_state()
707 free(ar->mixer_state[i].new_value.ptr); in free_mixer_state()
708 free(ar->mixer_state[i].reset_value.ptr); in free_mixer_state()
718 unsigned int i; in audio_route_update_mixer() local
722 for (i = 0; i < ar->num_mixer_ctls; i++) { in audio_route_update_mixer()
723 unsigned int num_values = ar->mixer_state[i].num_values; in audio_route_update_mixer()
726 ctl = ar->mixer_state[i].ctl; in audio_route_update_mixer()
737 … if (ar->mixer_state[i].old_value.bytes[j] != ar->mixer_state[i].new_value.bytes[j]) { in audio_route_update_mixer()
744 if (ar->mixer_state[i].old_value.enumerated[j] in audio_route_update_mixer()
745 != ar->mixer_state[i].new_value.enumerated[j]) { in audio_route_update_mixer()
752 … if (ar->mixer_state[i].old_value.integer[j] != ar->mixer_state[i].new_value.integer[j]) { in audio_route_update_mixer()
760 mixer_ctl_set_value(ctl, 0, ar->mixer_state[i].new_value.enumerated[0]); in audio_route_update_mixer()
762 mixer_ctl_set_array(ctl, ar->mixer_state[i].new_value.ptr, num_values); in audio_route_update_mixer()
765 memcpy(ar->mixer_state[i].old_value.ptr, ar->mixer_state[i].new_value.ptr, in audio_route_update_mixer()
776 unsigned int i; in save_mixer_state() local
779 for (i = 0; i < ar->num_mixer_ctls; i++) { in save_mixer_state()
780 type = mixer_ctl_get_type(ar->mixer_state[i].ctl); in save_mixer_state()
785 memcpy(ar->mixer_state[i].reset_value.ptr, ar->mixer_state[i].new_value.ptr, in save_mixer_state()
786 ar->mixer_state[i].num_values * value_sz); in save_mixer_state()
793 unsigned int i; in audio_route_reset() local
797 for (i = 0; i < ar->num_mixer_ctls; i++) { in audio_route_reset()
798 type = mixer_ctl_get_type(ar->mixer_state[i].ctl); in audio_route_reset()
803 memcpy(ar->mixer_state[i].new_value.ptr, ar->mixer_state[i].reset_value.ptr, in audio_route_reset()
804 ar->mixer_state[i].num_values * value_sz); in audio_route_reset()
872 for (size_t i = 0; i < path->length; ++i) { in audio_route_update_path() local
876 ctl_index = path->setting[reverse ? path->length - 1 - i : i].ctl_index; in audio_route_update_path()