Home | History | Annotate | Download | only in hal

Lines Matching defs:config

56 /* TODO: the following PCM device profiles could be read from a config file */
58 .config = {
78 .config = {
96 .config = {
114 .config = {
132 .config = {
152 .config = {
170 .config = {
951 kernel_delay = (long)(((int64_t)kernel_frames * 1000000000) / ref_device->pcm_profile->config.rate);
991 buf_delay = (long)(((int64_t)(in->read_buf_frames) * 1000000000) / in->config.rate +
1000 kernel_delay = (long)(((int64_t)kernel_frames * 1000000000) / in->config.rate);
1016 ALOGVV("%s: enter:), in->config.channels(%d)", __func__,in->config.channels);
1024 ALOGVV("update_echo_reference, in->config.channels(%d), frames = [%zd], in->ref_buf_frames = [%zd], "
1026 in->config.channels, frames, in->ref_buf_frames, frames - in->ref_buf_frames);
1037 b.raw = (void *)(in->ref_buf + in->ref_buf_frames * in->config.channels);
1119 ALOGVV("%s: in->ref_buf_frames(%zd), in->config.channels(%d) ",
1120 __func__, in->ref_buf_frames, in->config.channels);
1123 in->ref_buf + buf.frameCount * in->config.channels,
1124 in->ref_buf_frames * in->config.channels * sizeof(int16_t));
1210 ALOGV("%s: ref_device rate:%d, ch:%d", __func__, ref_pcm_profile->config.rate, ref_pcm_profile->config.channels);
1211 ref_device->pcm = pcm_open(ref_device->pcm_profile->card, ref_device->pcm_profile->id, PCM_IN | PCM_MONOTONIC, &ref_device->pcm_profile->config);
1258 out->config.rate);
1277 effect_config_t config;
1283 config.inputCfg.channels = in->main_channels;
1284 config.outputCfg.channels = in->main_channels;
1285 config.inputCfg.format = AUDIO_FORMAT_PCM_16_BIT;
1286 config.outputCfg.format = AUDIO_FORMAT_PCM_16_BIT;
1287 config.inputCfg.samplingRate = in->requested_rate;
1288 config.outputCfg.samplingRate = in->requested_rate;
1289 config.inputCfg.mask =
1291 config.outputCfg.mask =
1302 &config,
1428 effect_config_t config;
1435 config.inputCfg.mask = EFFECT_CONFIG_CHANNELS;
1436 config.outputCfg.mask = EFFECT_CONFIG_CHANNELS;
1443 &config);
1449 config.inputCfg.channels = channel_config->main_channels | channel_config->aux_channels;
1450 config.outputCfg.channels = config.inputCfg.channels;
1455 &config,
1471 /* some implementations need to be re-enabled after a config change */
1494 /* if config changed, reconfigure all previously added effects */
1515 /* if aux channels config did not change but aux channels are present,
1564 size_t src_channels = in->config.channels;
1594 /* since all the processing below is done in frames and using the config.channels
1615 in->proc_buf_frames * in->config.channels,
1634 out_buf.s16 = (int16_t *)proc_buf_out + frames_wr * in->config.channels;
1654 in->proc_buf_in + in_buf.frameCount * in->config.channels,
1655 in->proc_buf_frames * in->config.channels * sizeof(int16_t));
1745 size_t size_in_bytes = pcm_frames_to_bytes(pcm_device->pcm, in->config.period_size);
1746 if (in->read_buf_size < in->config.period_size) {
1747 in->read_buf_size = in->config.period_size;
1761 in->read_buf_frames = in->config.period_size;
1784 size_hw_ref_bytes = pcm_frames_to_bytes(ref_device->pcm, ref_device->pcm_profile->config.period_size);
1785 size_hw_ref_frames = ref_device->pcm_profile->config.period_size;
1817 buffer->i16 = in->read_buf + (in->config.period_size - in->read_buf_frames) *
1818 in->config.channels;
1854 ALOGVV("%s: frames_rd: %zd, frames_wr: %zd, in->config.channels: %d",
1855 __func__,frames_rd,frames_wr,in->config.channels);
1983 /* Config should be updated as profile can be changed between different calls
1986 * - Config needs to be updated */
1987 if (in->config.rate != pcm_profile->config.rate) {
1990 in->config = pcm_profile->config;
1994 in->config.channels = audio_channel_count_from_in_mask(in->main_channels | in->aux_channels);
1999 if (in->requested_rate != in->config.rate) {
2010 ret = create_resampler(in->config.rate,
2012 in->config.channels,
2045 pcm_device->pcm_profile->config.channels,pcm_device->pcm_profile->config.rate,
2046 pcm_device->pcm_profile->config.format, pcm_device->pcm_profile->config.period_size);
2065 PCM_IN | PCM_MONOTONIC, &pcm_device->pcm_profile->config);
2337 PCM_OUT | PCM_MONOTONIC, &pcm_device->pcm_profile->config);
2349 if (out->sample_rate != pcm_device->pcm_profile->config.rate) {
2353 out->sample_rate, pcm_device->pcm_profile->config.rate);
2355 pcm_device->pcm_profile->config.rate,
2439 __func__, out->usecase, use_case_table[out->usecase], out->devices, out->config.channels);
2584 size = (pcm_profile->config.period_size * sample_rate) / pcm_profile->config.rate;
2613 return out->config.period_size *
2893 return (out->config.period_count * out->config.period_size * 1000) /
2894 (out->config.rate);
2947 ALOGE("set_amp_mode failed, need to re-config again");
2990 struct pcm_config config;
3110 if (bytes * pcm_device->pcm_profile->config.rate / out->sample_rate + frame_size
3113 bytes * pcm_device->pcm_profile->config.rate / out->sample_rate + frame_size;
3142 calloc(pcm_frames_to_bytes(pcm_device->pcm, out->config.period_size),
3148 memcpy(&config, &pcm_device->pcm_profile->config,
3150 config.stop_threshold = INT_MAX/2;
3158 PCM_OUT | PCM_MONOTONIC, &config);
3168 for (i = out->config.period_count; i > 0; i--)
3171 out->config.period_size));
3191 PCM_OUT | PCM_MONOTONIC, &pcm_device->pcm_profile->config);
3219 out->written += bytes / (out->config.channels * sizeof(short));
3322 size_t kernel_buffer_size = out->config.period_size * out->config.period_count;
3882 struct audio_config *config,
3892 __func__, config->sample_rate, config->channel_mask, devices, flags);
3902 out->format = config->format;
3903 out->sample_rate = config->sample_rate;
3913 out->config = pcm_profile->config;
3917 if (config->offload_info.version != AUDIO_INFO_INITIALIZER.version ||
3918 config->offload_info.size != AUDIO_INFO_INITIALIZER.size) {
3923 if (!is_supported_format(config->offload_info.format)) {
3933 if (config->offload_info.channel_mask)
3934 out->channel_mask = config->offload_info.channel_mask;
3935 else if (config->channel_mask)
3936 out->channel_mask = config->channel_mask;
3937 out->format = config->offload_info.format;
3938 out->sample_rate = config->offload_info.sample_rate;
3947 get_snd_codec_id(config->offload_info.format);
3950 out->compr_config.codec->sample_rate = config->offload_info.sample_rate;
3952 config->offload_info.bit_rate;
3954 audio_channel_count_from_out_mask(config->channel_mask);
3965 __func__, config->offload_info.version,
3966 config->offload_info.bit_rate);
3969 out->config = pcm_config_deep_buffer;
3970 out->sample_rate = out->config.rate;
3974 out->sample_rate = out->config.rate;
4024 config->format = out->stream.common.get_format(&out->stream.common);
4025 config->channel_mask = out->stream.common.get_channels(&out->stream.common);
4026 config->sample_rate = out->stream.common.get_sample_rate(&out->stream.common);
4265 const struct audio_config *config)
4272 return get_input_buffer_size(config->sample_rate,
4273 config->format,
4274 audio_channel_count_from_in_mask(config->channel_mask),
4282 struct audio_config *config,
4295 if (check_input_parameters(config->sample_rate, config->format,
4296 audio_channel_count_from_in_mask(config->channel_mask)) != 0)
4336 in->main_channels = config->channel_mask;
4337 in->requested_rate = config->sample_rate;
4338 if (config->sample_rate != CAPTURE_DEFAULT_SAMPLING_RATE)
4343 in->config = pcm_profile->config;
4345 /* Update config params with the requested sample rate and channels */
4437 struct pcm_config config;
4447 memset(&config, 0, sizeof(struct pcm_config));
4451 memcpy(&config, &profile->config, sizeof(struct pcm_config));
4454 config.stop_threshold = INT_MAX/2;
4456 (PCM_OUT | PCM_MONOTONIC), &config);
4508 (PCM_OUT | PCM_MONOTONIC), &config);
4743 /* For HS GPIO initial config */
4758 /* For NXP DSP config */
4790 pcm_device_playback.config.period_size = trial;
4791 pcm_device_playback.config.start_threshold =
4793 pcm_device_playback.config.stop_threshold =
4796 pcm_device_capture_low_latency.config.period_size = trial;