Lines Matching refs:mixer_state

42 struct mixer_state {  struct
74 struct mixer_state *mixer_state; member
124 return ar->mixer_state[ctl_index].ctl; in index_to_ctl()
396 memcpy(ar->mixer_state[ctl_index].new_value.ptr, path->setting[i].value.ptr, in path_apply()
419 memcpy(ar->mixer_state[ctl_index].new_value.ptr, in path_reset()
420 ar->mixer_state[ctl_index].reset_value.ptr, in path_reset()
421 ar->mixer_state[ctl_index].num_values * value_sz); in path_reset()
526 if (ar->mixer_state[ctl_index].ctl == ctl) in start_tag()
539 if (id < ar->mixer_state[ctl_index].num_values) in start_tag()
541 ar->mixer_state[ctl_index].new_value.bytes[id] = value; in start_tag()
543 ar->mixer_state[ctl_index].new_value.enumerated[id] = value; in start_tag()
545 ar->mixer_state[ctl_index].new_value.integer[id] = value; in start_tag()
551 for (i = 0; i < ar->mixer_state[ctl_index].num_values; i++) in start_tag()
553 ar->mixer_state[ctl_index].new_value.bytes[i] = value; in start_tag()
555 ar->mixer_state[ctl_index].new_value.enumerated[i] = value; in start_tag()
557 ar->mixer_state[ctl_index].new_value.integer[i] = value; in start_tag()
593 ar->mixer_state = calloc(ar->num_mixer_ctls, sizeof(struct mixer_state)); in alloc_mixer_state()
594 if (!ar->mixer_state) in alloc_mixer_state()
601 ar->mixer_state[i].ctl = ctl; in alloc_mixer_state()
602 ar->mixer_state[i].num_values = num_values; in alloc_mixer_state()
603 ar->mixer_state[i].active_count = 0; in alloc_mixer_state()
612 ar->mixer_state[i].old_value.ptr = calloc(num_values, value_sz); in alloc_mixer_state()
613 ar->mixer_state[i].new_value.ptr = calloc(num_values, value_sz); in alloc_mixer_state()
614 ar->mixer_state[i].reset_value.ptr = calloc(num_values, value_sz); in alloc_mixer_state()
617 ar->mixer_state[i].old_value.enumerated[0] = mixer_ctl_get_value(ctl, 0); in alloc_mixer_state()
619 mixer_ctl_get_array(ctl, ar->mixer_state[i].old_value.ptr, num_values); in alloc_mixer_state()
621 memcpy(ar->mixer_state[i].new_value.ptr, ar->mixer_state[i].old_value.ptr, in alloc_mixer_state()
634 type = mixer_ctl_get_type(ar->mixer_state[i].ctl); in free_mixer_state()
638 free(ar->mixer_state[i].old_value.ptr); in free_mixer_state()
639 free(ar->mixer_state[i].new_value.ptr); in free_mixer_state()
640 free(ar->mixer_state[i].reset_value.ptr); in free_mixer_state()
643 free(ar->mixer_state); in free_mixer_state()
644 ar->mixer_state = NULL; in free_mixer_state()
655 unsigned int num_values = ar->mixer_state[i].num_values; in audio_route_update_mixer()
658 ctl = ar->mixer_state[i].ctl; in audio_route_update_mixer()
669 … if (ar->mixer_state[i].old_value.bytes[j] != ar->mixer_state[i].new_value.bytes[j]) { in audio_route_update_mixer()
676 if (ar->mixer_state[i].old_value.enumerated[j] in audio_route_update_mixer()
677 != ar->mixer_state[i].new_value.enumerated[j]) { in audio_route_update_mixer()
684 … if (ar->mixer_state[i].old_value.integer[j] != ar->mixer_state[i].new_value.integer[j]) { in audio_route_update_mixer()
692 mixer_ctl_set_value(ctl, 0, ar->mixer_state[i].new_value.enumerated[0]); in audio_route_update_mixer()
694 mixer_ctl_set_array(ctl, ar->mixer_state[i].new_value.ptr, num_values); in audio_route_update_mixer()
697 memcpy(ar->mixer_state[i].old_value.ptr, ar->mixer_state[i].new_value.ptr, in audio_route_update_mixer()
712 type = mixer_ctl_get_type(ar->mixer_state[i].ctl); in save_mixer_state()
717 memcpy(ar->mixer_state[i].reset_value.ptr, ar->mixer_state[i].new_value.ptr, in save_mixer_state()
718 ar->mixer_state[i].num_values * value_sz); in save_mixer_state()
730 type = mixer_ctl_get_type(ar->mixer_state[i].ctl); in audio_route_reset()
735 memcpy(ar->mixer_state[i].new_value.ptr, ar->mixer_state[i].reset_value.ptr, in audio_route_reset()
736 ar->mixer_state[i].num_values * value_sz); in audio_route_reset()
808 struct mixer_state * ms = &ar->mixer_state[ctl_index]; in audio_route_update_path()