Lines Matching refs:config
861 __func__, adev->snd_card, in->pcm_device_id, in->config.channels); in start_input_stream()
873 flags, &in->config); in start_input_stream()
1217 check_and_set_hdmi_channels(adev, out->config.channels); in start_output_stream()
1228 __func__, adev->snd_card, out->pcm_device_id, out->config.format); in start_output_stream()
1240 flags, &out->config); in start_output_stream()
1375 return out->config.period_size * in out_get_buffer_size()
1609 return (out->config.period_count * out->config.period_size * 1000) / in out_get_latency()
1610 (out->config.rate); in out_get_latency()
1740 out->written += bytes / (out->config.channels * sizeof(short)); in out_write()
1824 size_t kernel_buffer_size = out->config.period_size * out->config.period_count; in out_get_presentation_position()
1925 return in->config.rate; in in_get_sample_rate()
1937 return in->config.period_size * in in_get_buffer_size()
2234 struct audio_config *config, in adev_open_output_stream() argument
2243 __func__, config->sample_rate, config->channel_mask, devices, flags); in adev_open_output_stream()
2253 out->format = config->format; in adev_open_output_stream()
2254 out->sample_rate = config->sample_rate; in adev_open_output_stream()
2269 if (config->sample_rate == 0) in adev_open_output_stream()
2270 config->sample_rate = DEFAULT_OUTPUT_SAMPLING_RATE; in adev_open_output_stream()
2271 if (config->channel_mask == 0) in adev_open_output_stream()
2272 config->channel_mask = AUDIO_CHANNEL_OUT_5POINT1; in adev_open_output_stream()
2273 if (config->format == AUDIO_FORMAT_DEFAULT) in adev_open_output_stream()
2274 config->format = AUDIO_FORMAT_PCM_16_BIT; in adev_open_output_stream()
2276 out->channel_mask = config->channel_mask; in adev_open_output_stream()
2277 out->sample_rate = config->sample_rate; in adev_open_output_stream()
2278 out->format = config->format; in adev_open_output_stream()
2280 out->config = pcm_config_hdmi_multi; in adev_open_output_stream()
2281 out->config.rate = config->sample_rate; in adev_open_output_stream()
2282 out->config.channels = audio_channel_count_from_out_mask(out->channel_mask); in adev_open_output_stream()
2283 out->config.period_size = HDMI_MULTI_PERIOD_BYTES / (out->config.channels * 2); in adev_open_output_stream()
2285 if (config->offload_info.version != AUDIO_INFO_INITIALIZER.version || in adev_open_output_stream()
2286 config->offload_info.size != AUDIO_INFO_INITIALIZER.size) { in adev_open_output_stream()
2291 if (!is_supported_format(config->offload_info.format)) { in adev_open_output_stream()
2301 if (config->offload_info.channel_mask) in adev_open_output_stream()
2302 out->channel_mask = config->offload_info.channel_mask; in adev_open_output_stream()
2303 else if (config->channel_mask) in adev_open_output_stream()
2304 out->channel_mask = config->channel_mask; in adev_open_output_stream()
2305 out->format = config->offload_info.format; in adev_open_output_stream()
2306 out->sample_rate = config->offload_info.sample_rate; in adev_open_output_stream()
2315 get_snd_codec_id(config->offload_info.format); in adev_open_output_stream()
2318 out->compr_config.codec->sample_rate = config->offload_info.sample_rate; in adev_open_output_stream()
2320 config->offload_info.bit_rate; in adev_open_output_stream()
2322 audio_channel_count_from_out_mask(config->channel_mask); in adev_open_output_stream()
2331 __func__, config->offload_info.version, in adev_open_output_stream()
2332 config->offload_info.bit_rate); in adev_open_output_stream()
2334 if (config->sample_rate == 0) in adev_open_output_stream()
2335 config->sample_rate = AFE_PROXY_SAMPLING_RATE; in adev_open_output_stream()
2336 if (config->sample_rate != 48000 && config->sample_rate != 16000 && in adev_open_output_stream()
2337 config->sample_rate != 8000) { in adev_open_output_stream()
2338 config->sample_rate = AFE_PROXY_SAMPLING_RATE; in adev_open_output_stream()
2342 out->sample_rate = config->sample_rate; in adev_open_output_stream()
2343 out->config.rate = config->sample_rate; in adev_open_output_stream()
2344 if (config->format == AUDIO_FORMAT_DEFAULT) in adev_open_output_stream()
2345 config->format = AUDIO_FORMAT_PCM_16_BIT; in adev_open_output_stream()
2346 if (config->format != AUDIO_FORMAT_PCM_16_BIT) { in adev_open_output_stream()
2347 config->format = AUDIO_FORMAT_PCM_16_BIT; in adev_open_output_stream()
2351 out->format = config->format; in adev_open_output_stream()
2353 out->config = pcm_config_afe_proxy_playback; in adev_open_output_stream()
2358 out->config = pcm_config_deep_buffer; in adev_open_output_stream()
2361 out->config = pcm_config_deep_buffer; in adev_open_output_stream()
2364 out->config = pcm_config_low_latency; in adev_open_output_stream()
2367 out->config = pcm_config_low_latency; in adev_open_output_stream()
2369 if (config->format != audio_format_from_pcm_format(out->config.format)) { in adev_open_output_stream()
2372 pcm_format_from_audio_format(config->format))) { in adev_open_output_stream()
2373 out->config.format = pcm_format_from_audio_format(config->format); in adev_open_output_stream()
2381 out->format = audio_format_from_pcm_format(out->config.format); in adev_open_output_stream()
2384 out->sample_rate = out->config.rate; in adev_open_output_stream()
2387 __func__, use_case_table[out->usecase], config->format, out->config.format); in adev_open_output_stream()
2440 config->format = out->stream.common.get_format(&out->stream.common); in adev_open_output_stream()
2441 config->channel_mask = out->stream.common.get_channels(&out->stream.common); in adev_open_output_stream()
2442 config->sample_rate = out->stream.common.get_sample_rate(&out->stream.common); in adev_open_output_stream()
2654 const struct audio_config *config) in adev_get_input_buffer_size() argument
2656 int channel_count = audio_channel_count_from_in_mask(config->channel_mask); in adev_get_input_buffer_size()
2658 return get_input_buffer_size(config->sample_rate, config->format, channel_count, in adev_get_input_buffer_size()
2665 struct audio_config *config, in adev_open_input_stream() argument
2674 int channel_count = audio_channel_count_from_in_mask(config->channel_mask); in adev_open_input_stream()
2679 if (check_input_parameters(config->sample_rate, config->format, channel_count) != 0) in adev_open_input_stream()
2708 in->channel_mask = config->channel_mask; in adev_open_input_stream()
2714 if (config->format == AUDIO_FORMAT_DEFAULT) { in adev_open_input_stream()
2715 config->format = AUDIO_FORMAT_PCM_16_BIT; in adev_open_input_stream()
2716 } else if (config->format == AUDIO_FORMAT_PCM_FLOAT || in adev_open_input_stream()
2717 config->format == AUDIO_FORMAT_PCM_24_BIT_PACKED || in adev_open_input_stream()
2718 config->format == AUDIO_FORMAT_PCM_8_24_BIT) { in adev_open_input_stream()
2730 config->format = AUDIO_FORMAT_PCM_16_BIT; in adev_open_input_stream()
2732 } else if (config->format != AUDIO_FORMAT_PCM_8_24_BIT) { in adev_open_input_stream()
2733 config->format = AUDIO_FORMAT_PCM_8_24_BIT; in adev_open_input_stream()
2743 in->format = config->format; in adev_open_input_stream()
2747 if (config->sample_rate == 0) in adev_open_input_stream()
2748 config->sample_rate = AFE_PROXY_SAMPLING_RATE; in adev_open_input_stream()
2749 if (config->sample_rate != 48000 && config->sample_rate != 16000 && in adev_open_input_stream()
2750 config->sample_rate != 8000) { in adev_open_input_stream()
2751 config->sample_rate = AFE_PROXY_SAMPLING_RATE; in adev_open_input_stream()
2756 if (config->format != AUDIO_FORMAT_PCM_16_BIT) { in adev_open_input_stream()
2757 config->format = AUDIO_FORMAT_PCM_16_BIT; in adev_open_input_stream()
2763 in->config = pcm_config_afe_proxy_record; in adev_open_input_stream()
2766 if (config->sample_rate == LOW_LATENCY_CAPTURE_SAMPLE_RATE && in adev_open_input_stream()
2773 in->config = pcm_config_audio_capture; in adev_open_input_stream()
2775 if (config->format == AUDIO_FORMAT_PCM_8_24_BIT) in adev_open_input_stream()
2776 in->config.format = PCM_FORMAT_S24_LE; in adev_open_input_stream()
2779 buffer_size = get_input_buffer_size(config->sample_rate, in adev_open_input_stream()
2780 config->format, in adev_open_input_stream()
2783 in->config.period_size = buffer_size / frame_size; in adev_open_input_stream()
2785 in->config.channels = channel_count; in adev_open_input_stream()
2786 in->config.rate = config->sample_rate; in adev_open_input_stream()