Lines Matching refs:config

1036           __func__, adev->snd_card, in->pcm_device_id, in->config.channels);  in start_input_stream()
1048 flags, &in->config); in start_input_stream()
1476 check_and_set_hdmi_channels(adev, out->config.channels); in start_output_stream()
1485 __func__, adev->snd_card, out->pcm_device_id, out->config.format); in start_output_stream()
1497 flags, &out->config); in start_output_stream()
1646 return out->config.period_size * in out_get_buffer_size()
1923 return (out->config.period_count * out->config.period_size * 1000) / in out_get_latency()
1924 (out->config.rate); in out_get_latency()
1975 out->written += bytes / (out->config.channels * sizeof(short)); in out_write()
2045 out->written += bytes / (out->config.channels * sizeof(short)); in out_write()
2171 size_t kernel_buffer_size = out->config.period_size * out->config.period_count; in out_get_presentation_position()
2286 return in->config.rate; in in_get_sample_rate()
2302 return audio_extn_compr_cap_get_buffer_size(in->config.format); in in_get_buffer_size()
2304 return in->config.period_size * in in_get_buffer_size()
2398 (in->config.rate == 8000 || in->config.rate == 16000) && in in_set_parameters()
2596 struct audio_config *config, in adev_open_output_stream() argument
2616 stream_handle(%p)",__func__, config->sample_rate, config->channel_mask, in adev_open_output_stream()
2630 format = out->format = config->format; in adev_open_output_stream()
2631 out->sample_rate = config->sample_rate; in adev_open_output_stream()
2652 if (config->sample_rate == 0) in adev_open_output_stream()
2653 config->sample_rate = DEFAULT_OUTPUT_SAMPLING_RATE; in adev_open_output_stream()
2654 if (config->channel_mask == 0) in adev_open_output_stream()
2655 config->channel_mask = AUDIO_CHANNEL_OUT_5POINT1; in adev_open_output_stream()
2657 out->channel_mask = config->channel_mask; in adev_open_output_stream()
2658 out->sample_rate = config->sample_rate; in adev_open_output_stream()
2660 out->config = pcm_config_hdmi_multi; in adev_open_output_stream()
2661 out->config.rate = config->sample_rate; in adev_open_output_stream()
2662 out->config.channels = audio_channel_count_from_out_mask(out->channel_mask); in adev_open_output_stream()
2663 out->config.period_size = HDMI_MULTI_PERIOD_BYTES / (out->config.channels * 2); in adev_open_output_stream()
2666 (voice_extn_compress_voip_is_config_supported(config))) { in adev_open_output_stream()
2674 if (config->offload_info.version != AUDIO_INFO_INITIALIZER.version || in adev_open_output_stream()
2675 config->offload_info.size != AUDIO_INFO_INITIALIZER.size) { in adev_open_output_stream()
2680 if (!is_supported_format(config->offload_info.format) && in adev_open_output_stream()
2681 !audio_extn_is_dolby_format(config->offload_info.format)) { in adev_open_output_stream()
2696 if (config->offload_info.channel_mask) in adev_open_output_stream()
2697 out->channel_mask = config->offload_info.channel_mask; in adev_open_output_stream()
2698 else if (config->channel_mask) { in adev_open_output_stream()
2699 out->channel_mask = config->channel_mask; in adev_open_output_stream()
2700 config->offload_info.channel_mask = config->channel_mask; in adev_open_output_stream()
2702 format = out->format = config->offload_info.format; in adev_open_output_stream()
2703 out->sample_rate = config->offload_info.sample_rate; in adev_open_output_stream()
2712 if (audio_extn_is_dolby_format(config->offload_info.format)) in adev_open_output_stream()
2715 config->offload_info.format); in adev_open_output_stream()
2718 get_snd_codec_id(config->offload_info.format); in adev_open_output_stream()
2719 if (audio_is_offload_pcm(config->offload_info.format)) { in adev_open_output_stream()
2721 platform_get_pcm_offload_buffer_size(&config->offload_info); in adev_open_output_stream()
2724 platform_get_compress_offload_buffer_size(&config->offload_info); in adev_open_output_stream()
2728 config->offload_info.sample_rate; in adev_open_output_stream()
2730 config->offload_info.bit_rate; in adev_open_output_stream()
2732 audio_channel_count_from_out_mask(config->channel_mask); in adev_open_output_stream()
2736 if (config->offload_info.format == AUDIO_FORMAT_AAC) in adev_open_output_stream()
2738 if (config->offload_info.format == AUDIO_FORMAT_PCM_16_BIT_OFFLOAD) in adev_open_output_stream()
2740 if(config->offload_info.format == AUDIO_FORMAT_PCM_24_BIT_OFFLOAD) in adev_open_output_stream()
2747 if (config->offload_info.format == AUDIO_FORMAT_FLAC) in adev_open_output_stream()
2759 __func__, config->offload_info.version, in adev_open_output_stream()
2760 config->offload_info.bit_rate); in adev_open_output_stream()
2772 if (config->sample_rate == 0) in adev_open_output_stream()
2773 config->sample_rate = AFE_PROXY_SAMPLING_RATE; in adev_open_output_stream()
2774 if (config->sample_rate != 48000 && config->sample_rate != 16000 && in adev_open_output_stream()
2775 config->sample_rate != 8000) { in adev_open_output_stream()
2776 config->sample_rate = AFE_PROXY_SAMPLING_RATE; in adev_open_output_stream()
2780 out->sample_rate = config->sample_rate; in adev_open_output_stream()
2781 out->config.rate = config->sample_rate; in adev_open_output_stream()
2782 if (config->format == AUDIO_FORMAT_DEFAULT) in adev_open_output_stream()
2783 config->format = AUDIO_FORMAT_PCM_16_BIT; in adev_open_output_stream()
2784 if (config->format != AUDIO_FORMAT_PCM_16_BIT) { in adev_open_output_stream()
2785 config->format = AUDIO_FORMAT_PCM_16_BIT; in adev_open_output_stream()
2789 out->format = config->format; in adev_open_output_stream()
2791 out->config = pcm_config_afe_proxy_playback; in adev_open_output_stream()
2796 out->config = pcm_config_low_latency; in adev_open_output_stream()
2797 out->sample_rate = out->config.rate; in adev_open_output_stream()
2802 out->config = pcm_config_deep_buffer; in adev_open_output_stream()
2803 out->sample_rate = out->config.rate; in adev_open_output_stream()
2861 config->format = out->stream.common.get_format(&out->stream.common); in adev_open_output_stream()
2862 config->channel_mask = out->stream.common.get_channels(&out->stream.common); in adev_open_output_stream()
2863 config->sample_rate = out->stream.common.get_sample_rate(&out->stream.common); in adev_open_output_stream()
3160 const struct audio_config *config) in adev_get_input_buffer_size() argument
3162 int channel_count = audio_channel_count_from_in_mask(config->channel_mask); in adev_get_input_buffer_size()
3164 return get_input_buffer_size(config->sample_rate, config->format, channel_count, in adev_get_input_buffer_size()
3171 struct audio_config *config, in adev_open_input_stream() argument
3180 int channel_count = audio_channel_count_from_in_mask(config->channel_mask); in adev_open_input_stream()
3184 if (check_input_parameters(config->sample_rate, config->format, channel_count) != 0) in adev_open_input_stream()
3195 stream_handle(%p) io_handle(%d)",__func__, config->sample_rate, config->channel_mask, in adev_open_input_stream()
3220 in->channel_mask = config->channel_mask; in adev_open_input_stream()
3225 if (config->sample_rate == LOW_LATENCY_CAPTURE_SAMPLE_RATE && in adev_open_input_stream()
3232 in->config = pcm_config_audio_capture; in adev_open_input_stream()
3233 in->config.rate = config->sample_rate; in adev_open_input_stream()
3234 in->format = config->format; in adev_open_input_stream()
3237 if (config->sample_rate == 0) in adev_open_input_stream()
3238 config->sample_rate = AFE_PROXY_SAMPLING_RATE; in adev_open_input_stream()
3239 if (config->sample_rate != 48000 && config->sample_rate != 16000 && in adev_open_input_stream()
3240 config->sample_rate != 8000) { in adev_open_input_stream()
3241 config->sample_rate = AFE_PROXY_SAMPLING_RATE; in adev_open_input_stream()
3245 if (config->format == AUDIO_FORMAT_DEFAULT) in adev_open_input_stream()
3246 config->format = AUDIO_FORMAT_PCM_16_BIT; in adev_open_input_stream()
3247 if (config->format != AUDIO_FORMAT_PCM_16_BIT) { in adev_open_input_stream()
3248 config->format = AUDIO_FORMAT_PCM_16_BIT; in adev_open_input_stream()
3254 in->config = pcm_config_afe_proxy_record; in adev_open_input_stream()
3255 in->config.channels = channel_count; in adev_open_input_stream()
3256 in->config.rate = config->sample_rate; in adev_open_input_stream()
3268 audio_extn_compr_cap_format_supported(config->format) && in adev_open_input_stream()
3272 in->config.channels = channel_count; in adev_open_input_stream()
3274 buffer_size = get_input_buffer_size(config->sample_rate, in adev_open_input_stream()
3275 config->format, in adev_open_input_stream()
3278 in->config.period_size = buffer_size / frame_size; in adev_open_input_stream()
3324 audio_extn_compr_cap_format_supported(in->config.format)) in adev_close_input_stream()