Lines Matching full:mixer_state
35 struct mixer_state {
65 struct mixer_state *mixer_state;
95 return ar->mixer_state[ctl_index].ctl;
315 memcpy(ar->mixer_state[ctl_index].new_value, path->setting[i].value,
338 memcpy(ar->mixer_state[ctl_index].new_value,
339 ar->mixer_state[ctl_index].reset_value,
340 ar->mixer_state[ctl_index].num_values * sizeof(int));
425 if (ar->mixer_state[ctl_index].ctl == ctl)
438 if (id < ar->mixer_state[ctl_index].num_values)
439 ar->mixer_state[ctl_index].new_value[id] = value;
445 for (i = 0; i < ar->mixer_state[ctl_index].num_values; i++)
446 ar->mixer_state[ctl_index].new_value[i] = value;
482 ar->mixer_state = malloc(ar->num_mixer_ctls * sizeof(struct mixer_state));
483 if (!ar->mixer_state)
490 ar->mixer_state[i].ctl = ctl;
491 ar->mixer_state[i].num_values = num_values;
499 ar->mixer_state[i].old_value = malloc(num_values * sizeof(int));
500 ar->mixer_state[i].new_value = malloc(num_values * sizeof(int));
501 ar->mixer_state[i].reset_value = malloc(num_values * sizeof(int));
504 ar->mixer_state[i].old_value[0] = mixer_ctl_get_value(ctl, 0);
506 mixer_ctl_get_array(ctl, ar->mixer_state[i].old_value, num_values);
507 memcpy(ar->mixer_state[i].new_value, ar->mixer_state[i].old_value,
520 type = mixer_ctl_get_type(ar->mixer_state[i].ctl);
524 free(ar->mixer_state[i].old_value);
525 free(ar->mixer_state[i].new_value);
526 free(ar->mixer_state[i].reset_value);
529 free(ar->mixer_state);
530 ar->mixer_state = NULL;
541 unsigned int num_values = ar->mixer_state[i].num_values;
544 ctl = ar->mixer_state[i].ctl;
554 if (ar->mixer_state[i].old_value[j] != ar->mixer_state[i].new_value[j]) {
561 mixer_state[i].new_value[0]);
563 mixer_ctl_set_array(ctl, ar->mixer_state[i].new_value, num_values);
564 memcpy(ar->mixer_state[i].old_value, ar->mixer_state[i].new_value,
579 type = mixer_ctl_get_type(ar->mixer_state[i].ctl);
583 memcpy(ar->mixer_state[i].reset_value, ar->mixer_state[i].new_value,
584 ar->mixer_state[i].num_values * sizeof(int));
596 type = mixer_ctl_get_type(ar->mixer_state[i].ctl);
600 memcpy(ar->mixer_state[i].new_value, ar->mixer_state[i].reset_value,
601 ar->mixer_state[i].num_values * sizeof(int));