Lines Matching refs:setting

67     struct mixer_setting *setting;  member
134 struct mixer_ctl *ctl = index_to_ctl(ar, path->setting[i].ctl_index);
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]);
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()
210 ar->mixer_path[ar->num_mixer_paths].setting = NULL; in path_create()
222 if (path->setting[i].ctl_index == ctl_index) in find_ctl_index_in_path()
240 new_path_setting = realloc(path->setting, in alloc_path_setting()
246 path->setting = new_path_setting; in alloc_path_setting()
257 struct mixer_setting *setting) in path_add_setting() argument
261 if (find_ctl_index_in_path(path, setting->ctl_index) != -1) { in path_add_setting()
262 struct mixer_ctl *ctl = index_to_ctl(ar, setting->ctl_index); in path_add_setting()
269 if (!is_supported_ctl_type(setting->type)) { in path_add_setting()
270 ALOGE("unsupported type %d", (int)setting->type); in path_add_setting()
278 path->setting[path_index].ctl_index = setting->ctl_index; in path_add_setting()
279 path->setting[path_index].type = setting->type; in path_add_setting()
280 path->setting[path_index].num_values = setting->num_values; in path_add_setting()
282 size_t value_sz = sizeof_ctl_type(setting->type); in path_add_setting()
284 path->setting[path_index].value.ptr = calloc(setting->num_values, value_sz); in path_add_setting()
286 memcpy(path->setting[path_index].value.ptr, setting->value.ptr, in path_add_setting()
287 setting->num_values * value_sz); in path_add_setting()
323 path->setting[path_index].ctl_index = mixer_value->ctl_index; in path_add_value()
324 path->setting[path_index].num_values = num_values; in path_add_value()
325 path->setting[path_index].type = type; in path_add_value()
328 path->setting[path_index].value.ptr = calloc(num_values, value_sz); in path_add_value()
329 if (path->setting[path_index].type == MIXER_CTL_TYPE_BYTE) in path_add_value()
330 path->setting[path_index].value.bytes[0] = mixer_value->value; in path_add_value()
331 else if (path->setting[path_index].type == MIXER_CTL_TYPE_ENUM) in path_add_value()
332 path->setting[path_index].value.enumerated[0] = mixer_value->value; in path_add_value()
334 path->setting[path_index].value.integer[0] = mixer_value->value; in path_add_value()
339 if (path->setting[path_index].type == MIXER_CTL_TYPE_BYTE) { in path_add_value()
341 path->setting[path_index].value.bytes[i] = mixer_value->value; in path_add_value()
342 } else if (path->setting[path_index].type == MIXER_CTL_TYPE_ENUM) { in path_add_value()
344 path->setting[path_index].value.enumerated[i] = mixer_value->value; in path_add_value()
347 path->setting[path_index].value.integer[i] = mixer_value->value; in path_add_value()
351 if (path->setting[path_index].type == MIXER_CTL_TYPE_BYTE) in path_add_value()
352 path->setting[path_index].value.bytes[mixer_value->index] = mixer_value->value; in path_add_value()
353 else if (path->setting[path_index].type == MIXER_CTL_TYPE_ENUM) in path_add_value()
354 path->setting[path_index].value.enumerated[mixer_value->index] = mixer_value->value; in path_add_value()
356 path->setting[path_index].value.integer[mixer_value->index] = mixer_value->value; in path_add_value()
368 if (path_add_setting(ar, path, &sub_path->setting[i]) < 0) in path_add_path()
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()
403 ctl_index = path->setting[i].ctl_index; in path_reset()
797 ctl_index = path->setting[i].ctl_index; in audio_route_update_path()