Lines Matching refs:profile

87     alsa_device_profile profile;        /* The profile of the ALSA device connected to the stream.  member
120 alsa_device_profile profile; /* The profile of the ALSA device connected to the stream. member
238 static char *device_get_parameters(const alsa_device_profile *profile, const char * keys) in device_get_parameters() argument
240 if (profile->card < 0 || profile->device < 0) { in device_get_parameters()
250 char* rates_list = profile_get_sample_rate_strs(profile); in device_get_parameters()
258 char* channels_list = profile_get_channel_count_strs(profile); in device_get_parameters()
266 char * format_params = profile_get_format_strs(profile); in device_get_parameters()
352 profile_dump(&out_stream->profile, fd); in out_dump()
377 if (!profile_is_cached_for(&out->profile, card, device)) { in out_set_parameters()
382 int saved_card = out->profile.card; in out_set_parameters()
383 int saved_device = out->profile.device; in out_set_parameters()
384 out->profile.card = card; in out_set_parameters()
385 out->profile.device = device; in out_set_parameters()
386 ret_value = profile_read_device_info(&out->profile) ? 0 : -EINVAL; in out_set_parameters()
388 out->profile.card = saved_card; in out_set_parameters()
389 out->profile.device = saved_device; in out_set_parameters()
403 char * params_str = device_get_parameters(&out->profile, keys); in out_get_parameters()
422 ALOGV("start_output_stream(card:%d device:%d)", out->profile.card, out->profile.device); in start_output_stream()
558 profile_init(&out->profile, PCM_OUT); in adev_open_output_stream()
565 parse_card_device_params(address, &out->profile.card, &out->profile.device); in adev_open_output_stream()
567 profile_read_device_info(&out->profile); in adev_open_output_stream()
573 proxy_config.rate = config->sample_rate = profile_get_default_sample_rate(&out->profile); in adev_open_output_stream()
574 } else if (profile_is_sample_rate_valid(&out->profile, config->sample_rate)) { in adev_open_output_stream()
577 proxy_config.rate = config->sample_rate = profile_get_default_sample_rate(&out->profile); in adev_open_output_stream()
588 proxy_config.format = profile_get_default_format(&out->profile); in adev_open_output_stream()
592 if (profile_is_format_valid(&out->profile, fmt)) { in adev_open_output_stream()
595 proxy_config.format = profile_get_default_format(&out->profile); in adev_open_output_stream()
605 out->hal_channel_count = profile_get_default_channel_count(&out->profile); in adev_open_output_stream()
634 profile_get_closest_channel_count(&out->profile, out->hal_channel_count); in adev_open_output_stream()
635 proxy_prepare(&out->proxy, &out->profile, &proxy_config); in adev_open_output_stream()
659 ALOGV("adev_close_output_stream(c:%d d:%d)", out->profile.card, out->profile.device); in adev_close_output_stream()
746 profile_dump(&in_stream->profile, fd); in in_dump()
773 if (card >= 0 && device >= 0 && !profile_is_cached_for(&in->profile, card, device)) { in in_set_parameters()
778 int saved_card = in->profile.card; in in_set_parameters()
779 int saved_device = in->profile.device; in in_set_parameters()
780 in->profile.card = card; in in_set_parameters()
781 in->profile.device = device; in in_set_parameters()
782 ret_value = profile_read_device_info(&in->profile) ? 0 : -EINVAL; in in_set_parameters()
785 in->profile.card = saved_card; in in_set_parameters()
786 in->profile.device = saved_device; in in_set_parameters()
802 char * params_str = device_get_parameters(&in->profile, keys); in in_get_parameters()
826 ALOGV("start_input_stream(card:%d device:%d)", in->profile.card, in->profile.device); in start_input_stream()
998 profile_init(&in->profile, PCM_IN); in adev_open_input_stream()
1010 if (!profile_is_cached_for(&in->profile, card, device)) { in adev_open_input_stream()
1017 in->profile.card = card; in adev_open_input_stream()
1018 in->profile.device = device; in adev_open_input_stream()
1019 if (!profile_read_device_info(&in->profile)) { in adev_open_input_stream()
1033 config->sample_rate = profile_get_default_sample_rate(&in->profile); in adev_open_input_stream()
1039 unsigned highest_rate = profile_get_highest_sample_rate(&in->profile); in adev_open_input_stream()
1054 } else if (profile_is_sample_rate_valid(&in->profile, config->sample_rate)) { in adev_open_input_stream()
1057 proxy_config.rate = config->sample_rate = profile_get_default_sample_rate(&in->profile); in adev_open_input_stream()
1063 proxy_config.format = profile_get_default_format(&in->profile); in adev_open_input_stream()
1067 if (profile_is_format_valid(&in->profile, fmt)) { in adev_open_input_stream()
1070 proxy_config.format = profile_get_default_format(&in->profile); in adev_open_input_stream()
1080 in->hal_channel_count = profile_get_default_channel_count(&in->profile); in adev_open_input_stream()
1117 profile_get_closest_channel_count(&in->profile, in->hal_channel_count); in adev_open_input_stream()
1118 ret = proxy_prepare(&in->proxy, &in->profile, &proxy_config); in adev_open_input_stream()
1158 ALOGV("adev_close_input_stream(c:%d d:%d)", in->profile.card, in->profile.device); in adev_close_input_stream()