Lines Matching refs:halProfile

945 status_t HidlUtils::audioProfileFromHal(const struct audio_profile& halProfile, bool isInput,  in audioUsageFromHal()  argument
948 CONVERT_CHECKED(audioFormatFromHal(halProfile.format, &profile->format), result); in audioUsageFromHal()
949 profile->sampleRates.resize(halProfile.num_sample_rates); in audioUsageFromHal()
950 for (size_t i = 0; i < halProfile.num_sample_rates; ++i) { in audioUsageFromHal()
951 profile->sampleRates[i] = halProfile.sample_rates[i]; in audioUsageFromHal()
953 profile->channelMasks.resize(halProfile.num_channel_masks); in audioUsageFromHal()
954 for (size_t i = 0; i < halProfile.num_channel_masks; ++i) { in audioUsageFromHal()
955 CONVERT_CHECKED(audioChannelMaskFromHal(halProfile.channel_masks[i], isInput, in audioUsageFromHal()
963 struct audio_profile* halProfile) { in audioUsageFromHal() argument
965 CONVERT_CHECKED(audioFormatToHal(profile.format, &halProfile->format), result); in audioUsageFromHal()
966 memset(halProfile->sample_rates, 0, sizeof(halProfile->sample_rates)); in audioUsageFromHal()
967 halProfile->num_sample_rates = profile.sampleRates.size(); in audioUsageFromHal()
968 if (halProfile->num_sample_rates > AUDIO_PORT_MAX_SAMPLING_RATES) { in audioUsageFromHal()
969 ALOGE("HIDL Audio profile has too many sample rates: %u", halProfile->num_sample_rates); in audioUsageFromHal()
970 halProfile->num_sample_rates = AUDIO_PORT_MAX_SAMPLING_RATES; in audioUsageFromHal()
973 for (size_t i = 0; i < halProfile->num_sample_rates; ++i) { in audioUsageFromHal()
974 halProfile->sample_rates[i] = profile.sampleRates[i]; in audioUsageFromHal()
976 memset(halProfile->channel_masks, 0, sizeof(halProfile->channel_masks)); in audioUsageFromHal()
977 halProfile->num_channel_masks = profile.channelMasks.size(); in audioUsageFromHal()
978 if (halProfile->num_channel_masks > AUDIO_PORT_MAX_CHANNEL_MASKS) { in audioUsageFromHal()
979 ALOGE("HIDL Audio profile has too many channel masks: %u", halProfile->num_channel_masks); in audioUsageFromHal()
980 halProfile->num_channel_masks = AUDIO_PORT_MAX_CHANNEL_MASKS; in audioUsageFromHal()
983 for (size_t i = 0; i < halProfile->num_channel_masks; ++i) { in audioUsageFromHal()
985 audioChannelMaskToHal(profile.channelMasks[i], &halProfile->channel_masks[i]), in audioUsageFromHal()