Lines Matching refs:config
146 struct submix_config config; member
359 const struct audio_config * const config, in audio_config_compare() argument
377 rsxadev->routes[route_idx].config.input_channel_mask = config->channel_mask; in audio_config_compare()
379 rsxadev->routes[route_idx].config.input_sample_rate = config->sample_rate; in audio_config_compare()
384 rsxadev->routes[route_idx].config.output_sample_rate = 48000; in audio_config_compare()
385 rsxadev->routes[route_idx].config.output_channel_mask = AUDIO_CHANNEL_OUT_STEREO; in audio_config_compare()
392 rsxadev->routes[route_idx].config.output_channel_mask = config->channel_mask; in audio_config_compare()
394 rsxadev->routes[route_idx].config.output_sample_rate = config->sample_rate; in audio_config_compare()
403 struct submix_config * const device_config = &rsxadev->routes[route_idx].config; in audio_config_compare()
406 channel_count = audio_channel_count_from_out_mask(config->channel_mask); in audio_config_compare()
408 channel_count = audio_channel_count_from_in_mask(config->channel_mask); in audio_config_compare()
417 const NBAIO_Format format = Format_from_SR_C(config->sample_rate, pipe_channel_count, in audio_config_compare()
418 config->format); in audio_config_compare()
440 memcpy(&device_config->common, config, sizeof(device_config->common)); in audio_config_compare()
519 static void submix_sanitize_config(struct audio_config * const config, const bool is_input_format) in audio_config_compare() argument
521 config->channel_mask = is_input_format ? get_supported_channel_in_mask(config->channel_mask) : in audio_config_compare()
522 get_supported_channel_out_mask(config->channel_mask); in audio_config_compare()
523 config->sample_rate = get_supported_sample_rate(config->sample_rate); in audio_config_compare()
524 config->format = DEFAULT_FORMAT; in audio_config_compare()
531 const struct audio_config * const config, in audio_config_compare() argument
541 memcpy(&pipe_config, &rsxadev->routes[route_idx].config.common, sizeof(pipe_config)); in audio_config_compare()
551 "%s_channel_mask=%x", config->sample_rate, config->format, in audio_config_compare()
552 opening_input ? "in" : "out", config->channel_mask); in audio_config_compare()
557 const audio_config * const input_config = opening_input ? config : &pipe_config; in audio_config_compare()
558 const audio_config * const output_config = opening_input ? &pipe_config : config; in audio_config_compare()
561 opening_input ? rsxadev->routes[route_idx].config.output_channel_mask : in audio_config_compare()
562 rsxadev->routes[route_idx].config.input_channel_mask; in audio_config_compare()
603 const struct submix_config *config, in audio_config_compare() argument
607 const size_t pipe_frame_size = config->pipe_frame_size; in audio_config_compare()
609 return (pipe_frames * config->pipe_frame_size) / max_frame_size; in audio_config_compare()
619 const uint32_t out_rate = out->dev->routes[out->route_handle].config.output_sample_rate; in audio_config_compare()
621 const uint32_t out_rate = out->dev->routes[out->route_handle].config.common.sample_rate; in audio_config_compare()
634 if (rate != out->dev->routes[out->route_handle].config.output_sample_rate) { in audio_config_compare()
637 out->dev->routes[out->route_handle].config.output_sample_rate, rate, in audio_config_compare()
647 out->dev->routes[out->route_handle].config.common.sample_rate = rate; in audio_config_compare()
655 const struct submix_config * const config = &out->dev->routes[out->route_handle].config; in audio_config_compare() local
659 stream, config, config->buffer_period_size_frames, stream_frame_size); in audio_config_compare()
670 uint32_t channel_mask = out->dev->routes[out->route_handle].config.output_channel_mask; in audio_config_compare()
679 const audio_format_t format = out->dev->routes[out->route_handle].config.common.format; in audio_config_compare()
687 if (format != out->dev->routes[out->route_handle].config.common.format) { in audio_config_compare()
758 const struct submix_config * const config = &out->dev->routes[out->route_handle].config; in audio_config_compare() local
762 &stream->common, config, config->buffer_size_frames, stream_frame_size); in audio_config_compare()
960 const uint32_t rate = in->dev->routes[in->route_handle].config.input_sample_rate; in audio_config_compare()
962 const uint32_t rate = in->dev->routes[in->route_handle].config.common.sample_rate; in audio_config_compare()
974 if (rate != in->dev->routes[in->route_handle].config.input_sample_rate) { in audio_config_compare()
976 "%u to %u", in->dev->routes[in->route_handle].config.input_sample_rate, rate); in audio_config_compare()
984 in->dev->routes[in->route_handle].config.common.sample_rate = rate; in audio_config_compare()
993 const struct submix_config * const config = &in->dev->routes[in->route_handle].config; in audio_config_compare() local
997 stream, config, config->buffer_period_size_frames, stream_frame_size); in audio_config_compare()
1002 (float)config->input_sample_rate) / in audio_config_compare()
1003 (float)config->output_sample_rate); in audio_config_compare()
1016 in->dev->routes[in->route_handle].config.input_channel_mask; in audio_config_compare()
1025 const audio_format_t format = in->dev->routes[in->route_handle].config.common.format; in audio_config_compare()
1033 if (format != in->dev->routes[in->route_handle].config.common.format) { in audio_config_compare()
1136 rsxadev->routes[in->route_handle].config.input_channel_mask); in audio_config_compare()
1138 rsxadev->routes[in->route_handle].config.output_channel_mask); in audio_config_compare()
1143 ALOG_ASSERT(rsxadev->routes[in->route_handle].config.common.format == in audio_config_compare()
1153 rsxadev->routes[in->route_handle].config.output_sample_rate; in audio_config_compare()
1163 ALOG_ASSERT(rsxadev->routes[in->route_handle].config.common.format == in audio_config_compare()
1166 rsxadev->routes[in->route_handle].config.input_channel_mask) == 1); in audio_config_compare()
1338 struct audio_config *config, in audio_config_compare() argument
1353 submix_sanitize_config(config, false); in audio_config_compare()
1366 if (!submix_open_validate_l(rsxadev, route_idx, config, false)) { in audio_config_compare()
1401 force_pipe_creation = rsxadev->routes[route_idx].config.common.sample_rate in audio_config_compare()
1402 != config->sample_rate; in audio_config_compare()
1416 submix_audio_device_create_pipe_l(rsxadev, config, DEFAULT_PIPE_SIZE_IN_FRAMES, in audio_config_compare()
1529 const struct audio_config *config) in audio_config_compare() argument
1531 if (audio_is_linear_pcm(config->format)) { in audio_config_compare()
1537 if (rsxadev->routes[i].config.buffer_period_size_frames > max_buffer_period_size_frames) in audio_config_compare()
1539 max_buffer_period_size_frames = rsxadev->routes[i].config.buffer_period_size_frames; in audio_config_compare()
1542 const size_t frame_size_in_bytes = audio_channel_count_from_in_mask(config->channel_mask) * in audio_config_compare()
1543 audio_bytes_per_sample(config->format); in audio_config_compare()
1555 struct audio_config *config, in audio_config_compare() argument
1582 submix_sanitize_config(config, true); in audio_config_compare()
1583 if (!submix_open_validate_l(rsxadev, route_idx, config, true)) { in audio_config_compare()
1652 submix_audio_device_create_pipe_l(rsxadev, config, DEFAULT_PIPE_SIZE_IN_FRAMES, in audio_config_compare()
1701 rsxadev->routes[i].config.input_sample_rate, in audio_config_compare()
1702 rsxadev->routes[i].config.output_sample_rate, in audio_config_compare()