Lines Matching refs:path_index
238 int path_index; in alloc_path_setting() local
257 path_index = path->length; in alloc_path_setting()
260 return path_index; in alloc_path_setting()
266 int path_index; in path_add_setting() local
281 path_index = alloc_path_setting(path); in path_add_setting()
282 if (path_index < 0) in path_add_setting()
285 path->setting[path_index].ctl_index = setting->ctl_index; in path_add_setting()
286 path->setting[path_index].type = setting->type; in path_add_setting()
287 path->setting[path_index].num_values = setting->num_values; in path_add_setting()
291 path->setting[path_index].value.ptr = calloc(setting->num_values, value_sz); in path_add_setting()
293 memcpy(path->setting[path_index].value.ptr, setting->value.ptr, in path_add_setting()
303 int path_index; in path_add_value() local
316 path_index = find_ctl_index_in_path(path, mixer_value->ctl_index); in path_add_value()
317 if (path_index < 0) { in path_add_value()
325 path_index = alloc_path_setting(path); in path_add_value()
326 if (path_index < 0) in path_add_value()
330 path->setting[path_index].ctl_index = mixer_value->ctl_index; in path_add_value()
331 path->setting[path_index].num_values = num_values; in path_add_value()
332 path->setting[path_index].type = type; in path_add_value()
335 path->setting[path_index].value.ptr = calloc(num_values, value_sz); in path_add_value()
336 if (path->setting[path_index].type == MIXER_CTL_TYPE_BYTE) in path_add_value()
337 path->setting[path_index].value.bytes[0] = mixer_value->value; in path_add_value()
338 else if (path->setting[path_index].type == MIXER_CTL_TYPE_ENUM) in path_add_value()
339 path->setting[path_index].value.enumerated[0] = mixer_value->value; in path_add_value()
341 path->setting[path_index].value.integer[0] = mixer_value->value; in path_add_value()
346 if (path->setting[path_index].type == MIXER_CTL_TYPE_BYTE) { in path_add_value()
348 path->setting[path_index].value.bytes[i] = mixer_value->value; in path_add_value()
349 } else if (path->setting[path_index].type == MIXER_CTL_TYPE_ENUM) { in path_add_value()
351 path->setting[path_index].value.enumerated[i] = mixer_value->value; in path_add_value()
354 path->setting[path_index].value.integer[i] = mixer_value->value; in path_add_value()
358 if (path->setting[path_index].type == MIXER_CTL_TYPE_BYTE) in path_add_value()
359 path->setting[path_index].value.bytes[mixer_value->index] = mixer_value->value; in path_add_value()
360 else if (path->setting[path_index].type == MIXER_CTL_TYPE_ENUM) in path_add_value()
361 path->setting[path_index].value.enumerated[mixer_value->index] = mixer_value->value; in path_add_value()
363 path->setting[path_index].value.integer[mixer_value->index] = mixer_value->value; in path_add_value()