Lines Matching refs:config
236 struct pcm_config config = profile->default_config; in profile_test_sample_rate() local
237 config.rate = rate; in profile_test_sample_rate()
258 if (config.channels < FCC_LIMIT) { in profile_test_sample_rate()
259 config.channels = profile->max_channel_count; in profile_test_sample_rate()
260 if (config.channels > FCC_LIMIT) config.channels = FCC_LIMIT; in profile_test_sample_rate()
264 profile->direction, &config); in profile_test_sample_rate()
376 static int read_alsa_device_config(alsa_device_profile * profile, struct pcm_config * config) in read_alsa_device_config() argument
406 config->channels = pcm_params_get_min(alsa_hw_params, PCM_PARAM_CHANNELS); in read_alsa_device_config()
410 config->channels < 2 && pcm_params_get_max(alsa_hw_params, PCM_PARAM_CHANNELS) >= 2) { in read_alsa_device_config()
411 config->channels = 2; in read_alsa_device_config()
413 config->rate = pcm_params_get_min(alsa_hw_params, PCM_PARAM_RATE); in read_alsa_device_config()
415 if (config->rate < 48000 && in read_alsa_device_config()
417 config->rate = 48000; in read_alsa_device_config()
418 } else if (config->rate < 44100 && in read_alsa_device_config()
420 config->rate = 44100; in read_alsa_device_config()
422 config->period_size = profile_calc_min_period_size(profile, config->rate); in read_alsa_device_config()
423 config->period_count = pcm_params_get_min(alsa_hw_params, PCM_PARAM_PERIODS); in read_alsa_device_config()
424 config->format = get_pcm_format_for_mask(pcm_params_get_mask(alsa_hw_params, PCM_PARAM_FORMAT)); in read_alsa_device_config()
426 log_pcm_config(config, "read_alsa_device_config"); in read_alsa_device_config()
428 if (config->format == PCM_FORMAT_INVALID) { in read_alsa_device_config()
437 bool profile_fill_builtin_device_info(alsa_device_profile* profile, struct pcm_config* config, in profile_fill_builtin_device_info() argument
444 profile->default_config.channels = config->channels; in profile_fill_builtin_device_info()
445 profile->default_config.rate = config->rate; in profile_fill_builtin_device_info()
446 profile->default_config.format = config->format; in profile_fill_builtin_device_info()
457 profile->formats[0] = config->format; in profile_fill_builtin_device_info()
459 profile->channel_counts[0] = config->channels; in profile_fill_builtin_device_info()
461 profile->min_channel_count = profile->max_channel_count = config->channels; in profile_fill_builtin_device_info()
462 profile->sample_rates[0] = config->rate; in profile_fill_builtin_device_info()