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 free(ar->mixer_path[i].name); in path_free()
157 if (ar->mixer_path[i].setting) { in path_free()
158 free(ar->mixer_path[i].setting->value.ptr); in path_free()
159 free(ar->mixer_path[i].setting); in path_free()
171 unsigned int i; in path_get_by_name() local
173 for (i = 0; i < ar->num_mixer_paths; i++) in path_get_by_name()
174 if (strcmp(ar->mixer_path[i].name, name) == 0) in path_get_by_name()
175 return &ar->mixer_path[i]; in path_get_by_name()
219 unsigned int i; in find_ctl_index_in_path() local
221 for (i = 0; i < path->length; i++) in find_ctl_index_in_path()
222 if (path->setting[i].ctl_index == ctl_index) in find_ctl_index_in_path()
223 return i; in find_ctl_index_in_path()
295 unsigned int i; in path_add_value() local
340 for (i = 0; i < num_values; i++) in path_add_value()
341 path->setting[path_index].value.bytes[i] = mixer_value->value; in path_add_value()
343 for (i = 0; i < num_values; i++) in path_add_value()
344 path->setting[path_index].value.enumerated[i] = mixer_value->value; in path_add_value()
346 for (i = 0; i < num_values; i++) in path_add_value()
347 path->setting[path_index].value.integer[i] = mixer_value->value; in path_add_value()
365 unsigned int i; in path_add_path() local
367 for (i = 0; i < sub_path->length; i++) in path_add_path()
368 if (path_add_setting(ar, path, &sub_path->setting[i]) < 0) in path_add_path()
376 unsigned int i; in path_apply() local
381 for (i = 0; i < path->length; i++) { in path_apply()
382 ctl_index = path->setting[i].ctl_index; in path_apply()
388 memcpy(ar->mixer_state[ctl_index].new_value.ptr, path->setting[i].value.ptr, in path_apply()
389 path->setting[i].num_values * value_sz); in path_apply()
397 unsigned int i; in path_reset() local
402 for (i = 0; i < path->length; i++) { in path_reset()
403 ctl_index = path->setting[i].ctl_index; in path_reset()
421 unsigned int i; in mixer_enum_string_to_value() local
431 for (i = 0; i < num_values; i++) { in mixer_enum_string_to_value()
432 if (strcmp(mixer_ctl_get_enum_string(ctl, i), string) == 0) in mixer_enum_string_to_value()
435 if (i == num_values) { in mixer_enum_string_to_value()
440 return i; in mixer_enum_string_to_value()
451 unsigned int i; in start_tag() local
460 for (i = 0; attr[i]; i += 2) { in start_tag()
461 if (strcmp(attr[i], "name") == 0) in start_tag()
462 attr_name = attr[i + 1]; in start_tag()
463 if (strcmp(attr[i], "id") == 0) in start_tag()
464 attr_id = attr[i + 1]; in start_tag()
465 else if (strcmp(attr[i], "value") == 0) in start_tag()
466 attr_value = attr[i + 1]; in start_tag()
540 for (i = 0; i < ar->mixer_state[ctl_index].num_values; i++) in start_tag()
542 ar->mixer_state[ctl_index].new_value.bytes[i] = value; in start_tag()
544 ar->mixer_state[ctl_index].new_value.enumerated[i] = value; in start_tag()
546 ar->mixer_state[ctl_index].new_value.integer[i] = value; in start_tag()
575 unsigned int i; in alloc_mixer_state() local
585 for (i = 0; i < ar->num_mixer_ctls; i++) { in alloc_mixer_state()
586 ctl = mixer_get_ctl(ar->mixer, i); in alloc_mixer_state()
589 ar->mixer_state[i].ctl = ctl; in alloc_mixer_state()
590 ar->mixer_state[i].num_values = num_values; in alloc_mixer_state()
599 ar->mixer_state[i].old_value.ptr = calloc(num_values, value_sz); in alloc_mixer_state()
600 ar->mixer_state[i].new_value.ptr = calloc(num_values, value_sz); in alloc_mixer_state()
601 ar->mixer_state[i].reset_value.ptr = calloc(num_values, value_sz); in alloc_mixer_state()
604 ar->mixer_state[i].old_value.enumerated[0] = mixer_ctl_get_value(ctl, 0); in alloc_mixer_state()
606 mixer_ctl_get_array(ctl, ar->mixer_state[i].old_value.ptr, num_values); in alloc_mixer_state()
608 memcpy(ar->mixer_state[i].new_value.ptr, ar->mixer_state[i].old_value.ptr, in alloc_mixer_state()
617 unsigned int i; in free_mixer_state() local
620 for (i = 0; i < ar->num_mixer_ctls; i++) { in free_mixer_state()
621 type = mixer_ctl_get_type(ar->mixer_state[i].ctl); in free_mixer_state()
625 free(ar->mixer_state[i].old_value.ptr); in free_mixer_state()
626 free(ar->mixer_state[i].new_value.ptr); in free_mixer_state()
627 free(ar->mixer_state[i].reset_value.ptr); in free_mixer_state()
637 unsigned int i; in audio_route_update_mixer() local
641 for (i = 0; i < ar->num_mixer_ctls; i++) { in audio_route_update_mixer()
642 unsigned int num_values = ar->mixer_state[i].num_values; in audio_route_update_mixer()
645 ctl = ar->mixer_state[i].ctl; in audio_route_update_mixer()
656 … if (ar->mixer_state[i].old_value.bytes[j] != ar->mixer_state[i].new_value.bytes[j]) { in audio_route_update_mixer()
663 if (ar->mixer_state[i].old_value.enumerated[j] in audio_route_update_mixer()
664 != ar->mixer_state[i].new_value.enumerated[j]) { in audio_route_update_mixer()
671 … if (ar->mixer_state[i].old_value.integer[j] != ar->mixer_state[i].new_value.integer[j]) { in audio_route_update_mixer()
679 mixer_ctl_set_value(ctl, 0, ar->mixer_state[i].new_value.enumerated[0]); in audio_route_update_mixer()
681 mixer_ctl_set_array(ctl, ar->mixer_state[i].new_value.ptr, num_values); in audio_route_update_mixer()
684 memcpy(ar->mixer_state[i].old_value.ptr, ar->mixer_state[i].new_value.ptr, in audio_route_update_mixer()
695 unsigned int i; in save_mixer_state() local
698 for (i = 0; i < ar->num_mixer_ctls; i++) { in save_mixer_state()
699 type = mixer_ctl_get_type(ar->mixer_state[i].ctl); in save_mixer_state()
704 memcpy(ar->mixer_state[i].reset_value.ptr, ar->mixer_state[i].new_value.ptr, in save_mixer_state()
705 ar->mixer_state[i].num_values * value_sz); in save_mixer_state()
712 unsigned int i; in audio_route_reset() local
716 for (i = 0; i < ar->num_mixer_ctls; i++) { in audio_route_reset()
717 type = mixer_ctl_get_type(ar->mixer_state[i].ctl); in audio_route_reset()
722 memcpy(ar->mixer_state[i].new_value.ptr, ar->mixer_state[i].reset_value.ptr, in audio_route_reset()
723 ar->mixer_state[i].num_values * value_sz); in audio_route_reset()
776 int32_t i, end; in audio_route_update_path() local
790 i = reverse ? (path->length - 1) : 0; in audio_route_update_path()
793 while (i != end) { in audio_route_update_path()
797 ctl_index = path->setting[i].ctl_index; in audio_route_update_path()
829 i = reverse ? (i - 1) : (i + 1); in audio_route_update_path()