Lines Matching refs:profile
46 int proxy_prepare(alsa_device_proxy * proxy, const alsa_device_profile* profile, in proxy_prepare() argument
51 ALOGV("proxy_prepare(c:%d, d:%d)", profile->card, profile->device); in proxy_prepare()
53 proxy->profile = profile; in proxy_prepare()
59 if (config->format != PCM_FORMAT_INVALID && profile_is_format_valid(profile, config->format)) { in proxy_prepare()
62 proxy->alsa_config.format = profile->default_config.format; in proxy_prepare()
64 config->format, profile->default_config.format); in proxy_prepare()
71 if (config->rate != 0 && profile_is_sample_rate_valid(profile, config->rate)) { in proxy_prepare()
74 proxy->alsa_config.rate = profile->default_config.rate; in proxy_prepare()
76 config->rate, profile->default_config.rate); in proxy_prepare()
83 if (config->channels != 0 && profile_is_channel_count_valid(profile, config->channels)) { in proxy_prepare()
86 proxy->alsa_config.channels = profile_get_closest_channel_count(profile, config->channels); in proxy_prepare()
95 proxy->alsa_config.period_count = profile->default_config.period_count; in proxy_prepare()
97 profile_get_period_size(proxy->profile, proxy->alsa_config.rate); in proxy_prepare()
117 int max_rate_index = proxy_scan_rates(proxy, profile->sample_rates); in proxy_prepare()
119 if (proxy->alsa_config.rate > profile->sample_rates[max_rate_index]) { in proxy_prepare()
121 proxy->alsa_config.rate, profile->sample_rates[max_rate_index]); in proxy_prepare()
122 proxy->alsa_config.rate = profile->sample_rates[max_rate_index]; in proxy_prepare()
131 const alsa_device_profile* profile = proxy->profile; in proxy_open() local
132 ALOGV("proxy_open(card:%d device:%d %s)", profile->card, profile->device, in proxy_open()
133 profile->direction == PCM_OUT ? "PCM_OUT" : "PCM_IN"); in proxy_open()
135 if (profile->card < 0 || profile->device < 0) { in proxy_open()
139 proxy->pcm = pcm_open(profile->card, profile->device, in proxy_open()
140 profile->direction | PCM_MONOTONIC, &proxy->alsa_config); in proxy_open()
294 const alsa_device_profile* profile = proxy->profile; in proxy_scan_rates() local
295 if (profile->card < 0 || profile->device < 0) { in proxy_scan_rates()
306 alsa_pcm = pcm_open(profile->card, profile->device, in proxy_scan_rates()
307 profile->direction | PCM_MONOTONIC, &alsa_config); in proxy_scan_rates()