• Home
  • Raw
  • Download

Lines Matching refs:profile

514             IOProfile *profile = mHwModules[i]->mOutputProfiles[j];  in getProfileForDirectOutput()  local
516 if (profile->isCompatibleProfile(device, samplingRate, format, in getProfileForDirectOutput()
519 if (mAvailableOutputDevices & profile->mSupportedDevices) { in getProfileForDirectOutput()
524 if (profile->isCompatibleProfile(device, samplingRate, format, in getProfileForDirectOutput()
527 if (mAvailableOutputDevices & profile->mSupportedDevices) { in getProfileForDirectOutput()
598 IOProfile *profile = NULL; in getOutput() local
601 profile = getProfileForDirectOutput(device, in getOutput()
608 if (profile != NULL) { in getOutput()
613 if (!desc->isDuplicated() && (profile == desc->mProfile)) { in getOutput()
629 outputDesc = new AudioOutputDescriptor(profile); in getOutput()
639 output = mpClientInterface->openOutput(profile->mModule->mHandle, in getOutput()
940 IOProfile *profile = getInputProfile(device, in getInput() local
944 if (profile == NULL) { in getInput()
951 if (profile->mModule->mHandle == 0) { in getInput()
952 ALOGE("getInput(): HW module %s not opened", profile->mModule->mName); in getInput()
956 AudioInputDescriptor *inputDesc = new AudioInputDescriptor(profile); in getInput()
965 input = mpClientInterface->openInput(profile->mModule->mHandle, in getInput()
1529 IOProfile *profile = getProfileForDirectOutput(AUDIO_DEVICE_NONE /*ignore device */, in isOffloadSupported() local
1534 ALOGV("isOffloadSupported() profile %sfound", profile != NULL ? "" : "NOT "); in isOffloadSupported()
1535 return (profile != NULL); in isOffloadSupported()
1881 IOProfile *profile = profiles[profile_index]; in checkOutputsForDevice() local
1887 if (!desc->isDuplicated() && desc->mProfile == profile) { in checkOutputsForDevice()
1896 desc = new AudioOutputDescriptor(profile); in checkOutputsForDevice()
1903 audio_io_handle_t output = mpClientInterface->openOutput(profile->mModule->mHandle, in checkOutputsForDevice()
1920 if (profile->mSamplingRates[0] == 0) { in checkOutputsForDevice()
1927 loadSamplingRates(value + 1, profile); in checkOutputsForDevice()
1930 if (profile->mFormats[0] == AUDIO_FORMAT_DEFAULT) { in checkOutputsForDevice()
1937 loadFormats(value + 1, profile); in checkOutputsForDevice()
1940 if (profile->mChannelMasks[0] == 0) { in checkOutputsForDevice()
1947 loadOutChannels(value + 1, profile); in checkOutputsForDevice()
1950 if (((profile->mSamplingRates[0] == 0) && in checkOutputsForDevice()
1951 (profile->mSamplingRates.size() < 2)) || in checkOutputsForDevice()
1952 ((profile->mFormats[0] == 0) && in checkOutputsForDevice()
1953 (profile->mFormats.size() < 2)) || in checkOutputsForDevice()
1954 ((profile->mChannelMasks[0] == 0) && in checkOutputsForDevice()
1955 (profile->mChannelMasks.size() < 2))) { in checkOutputsForDevice()
1959 } else if (profile->mSamplingRates[0] == 0) { in checkOutputsForDevice()
1961 desc->mSamplingRate = profile->mSamplingRates[1]; in checkOutputsForDevice()
1964 profile->mModule->mHandle, in checkOutputsForDevice()
2041 IOProfile *profile = mHwModules[i]->mOutputProfiles[j]; in checkOutputsForDevice() local
2042 if (profile->mSupportedDevices & device) { in checkOutputsForDevice()
2045 if (profile->mSamplingRates[0] == 0) { in checkOutputsForDevice()
2046 profile->mSamplingRates.clear(); in checkOutputsForDevice()
2047 profile->mSamplingRates.add(0); in checkOutputsForDevice()
2049 if (profile->mFormats[0] == AUDIO_FORMAT_DEFAULT) { in checkOutputsForDevice()
2050 profile->mFormats.clear(); in checkOutputsForDevice()
2051 profile->mFormats.add(AUDIO_FORMAT_DEFAULT); in checkOutputsForDevice()
2053 if (profile->mChannelMasks[0] == 0) { in checkOutputsForDevice()
2054 profile->mChannelMasks.clear(); in checkOutputsForDevice()
2055 profile->mChannelMasks.add(0); in checkOutputsForDevice()
2109 IOProfile *profile = profiles[profile_index]; in checkInputsForDevice() local
2114 if (desc->mProfile == profile) { in checkInputsForDevice()
2123 desc = new AudioInputDescriptor(profile); in checkInputsForDevice()
2126 audio_io_handle_t input = mpClientInterface->openInput(profile->mModule->mHandle, in checkInputsForDevice()
2140 if (profile->mSamplingRates[0] == 0) { in checkInputsForDevice()
2147 loadSamplingRates(value + 1, profile); in checkInputsForDevice()
2150 if (profile->mFormats[0] == AUDIO_FORMAT_DEFAULT) { in checkInputsForDevice()
2156 loadFormats(value + 1, profile); in checkInputsForDevice()
2159 if (profile->mChannelMasks[0] == 0) { in checkInputsForDevice()
2166 loadInChannels(value + 1, profile); in checkInputsForDevice()
2169 if (((profile->mSamplingRates[0] == 0) && (profile->mSamplingRates.size() < 2)) || in checkInputsForDevice()
2170 ((profile->mFormats[0] == 0) && (profile->mFormats.size() < 2)) || in checkInputsForDevice()
2171 ((profile->mChannelMasks[0] == 0) && (profile->mChannelMasks.size() < 2))) { in checkInputsForDevice()
2218 IOProfile *profile = mHwModules[module_index]->mInputProfiles[profile_index]; in checkInputsForDevice() local
2219 if (profile->mSupportedDevices & device) { in checkInputsForDevice()
2222 if (profile->mSamplingRates[0] == 0) { in checkInputsForDevice()
2223 profile->mSamplingRates.clear(); in checkInputsForDevice()
2224 profile->mSamplingRates.add(0); in checkInputsForDevice()
2226 if (profile->mFormats[0] == AUDIO_FORMAT_DEFAULT) { in checkInputsForDevice()
2227 profile->mFormats.clear(); in checkInputsForDevice()
2228 profile->mFormats.add(AUDIO_FORMAT_DEFAULT); in checkInputsForDevice()
2230 if (profile->mChannelMasks[0] == 0) { in checkInputsForDevice()
2231 profile->mChannelMasks.clear(); in checkInputsForDevice()
2232 profile->mChannelMasks.add(0); in checkInputsForDevice()
2909 IOProfile *profile = mHwModules[i]->mInputProfiles[j]; in getInputProfile() local
2911 if (profile->isCompatibleProfile(device, samplingRate, format, in getInputProfile()
2913 return profile; in getInputProfile()
3489 const IOProfile *profile) in AudioOutputDescriptor() argument
3493 mOutput1(0), mOutput2(0), mProfile(profile), mDirectOpenCount(0), in AudioOutputDescriptor()
3506 if (profile != NULL) { in AudioOutputDescriptor()
3507 mSamplingRate = profile->mSamplingRates[0]; in AudioOutputDescriptor()
3508 mFormat = profile->mFormats[0]; in AudioOutputDescriptor()
3509 mChannelMask = profile->mChannelMasks[0]; in AudioOutputDescriptor()
3510 mFlags = profile->mFlags; in AudioOutputDescriptor()
3642 AudioPolicyManagerBase::AudioInputDescriptor::AudioInputDescriptor(const IOProfile *profile) in AudioInputDescriptor() argument
3645 mInputSource(0), mProfile(profile) in AudioInputDescriptor()
3647 if (profile != NULL) { in AudioInputDescriptor()
3648 mSamplingRate = profile->mSamplingRates[0]; in AudioInputDescriptor()
3649 mFormat = profile->mFormats[0]; in AudioInputDescriptor()
3650 mChannelMask = profile->mChannelMasks[0]; in AudioInputDescriptor()
4042 void AudioPolicyManagerBase::loadSamplingRates(char *name, IOProfile *profile) in loadSamplingRates() argument
4049 profile->mSamplingRates.add(0); in loadSamplingRates()
4057 profile->mSamplingRates.add(rate); in loadSamplingRates()
4064 void AudioPolicyManagerBase::loadFormats(char *name, IOProfile *profile) in loadFormats() argument
4071 profile->mFormats.add(AUDIO_FORMAT_DEFAULT); in loadFormats()
4080 profile->mFormats.add(format); in loadFormats()
4087 void AudioPolicyManagerBase::loadInChannels(char *name, IOProfile *profile) in loadInChannels() argument
4094 profile->mChannelMasks.add(0); in loadInChannels()
4105 profile->mChannelMasks.add(channelMask); in loadInChannels()
4112 void AudioPolicyManagerBase::loadOutChannels(char *name, IOProfile *profile) in loadOutChannels() argument
4121 profile->mChannelMasks.add(0); in loadOutChannels()
4131 profile->mChannelMasks.add(channelMask); in loadOutChannels()
4142 IOProfile *profile = new IOProfile(module); in loadInput() local
4146 loadSamplingRates((char *)node->value, profile); in loadInput()
4148 loadFormats((char *)node->value, profile); in loadInput()
4150 loadInChannels((char *)node->value, profile); in loadInput()
4152 profile->mSupportedDevices = parseDeviceNames((char *)node->value); in loadInput()
4156 ALOGW_IF(profile->mSupportedDevices == AUDIO_DEVICE_NONE, in loadInput()
4158 ALOGW_IF(profile->mChannelMasks.size() == 0, in loadInput()
4160 ALOGW_IF(profile->mSamplingRates.size() == 0, in loadInput()
4162 ALOGW_IF(profile->mFormats.size() == 0, in loadInput()
4164 if ((profile->mSupportedDevices != AUDIO_DEVICE_NONE) && in loadInput()
4165 (profile->mChannelMasks.size() != 0) && in loadInput()
4166 (profile->mSamplingRates.size() != 0) && in loadInput()
4167 (profile->mFormats.size() != 0)) { in loadInput()
4169 ALOGV("loadInput() adding input mSupportedDevices 0x%X", profile->mSupportedDevices); in loadInput()
4171 module->mInputProfiles.add(profile); in loadInput()
4174 delete profile; in loadInput()
4183 IOProfile *profile = new IOProfile(module); in loadOutput() local
4187 loadSamplingRates((char *)node->value, profile); in loadOutput()
4189 loadFormats((char *)node->value, profile); in loadOutput()
4191 loadOutChannels((char *)node->value, profile); in loadOutput()
4193 profile->mSupportedDevices = parseDeviceNames((char *)node->value); in loadOutput()
4195 profile->mFlags = parseFlagNames((char *)node->value); in loadOutput()
4199 ALOGW_IF(profile->mSupportedDevices == AUDIO_DEVICE_NONE, in loadOutput()
4201 ALOGW_IF(profile->mChannelMasks.size() == 0, in loadOutput()
4203 ALOGW_IF(profile->mSamplingRates.size() == 0, in loadOutput()
4205 ALOGW_IF(profile->mFormats.size() == 0, in loadOutput()
4207 if ((profile->mSupportedDevices != AUDIO_DEVICE_NONE) && in loadOutput()
4208 (profile->mChannelMasks.size() != 0) && in loadOutput()
4209 (profile->mSamplingRates.size() != 0) && in loadOutput()
4210 (profile->mFormats.size() != 0)) { in loadOutput()
4213 profile->mSupportedDevices, profile->mFlags); in loadOutput()
4215 module->mOutputProfiles.add(profile); in loadOutput()
4218 delete profile; in loadOutput()
4341 IOProfile *profile; in defaultAudioPolicyConfig() local
4349 profile = new IOProfile(module); in defaultAudioPolicyConfig()
4350 profile->mSamplingRates.add(44100); in defaultAudioPolicyConfig()
4351 profile->mFormats.add(AUDIO_FORMAT_PCM_16_BIT); in defaultAudioPolicyConfig()
4352 profile->mChannelMasks.add(AUDIO_CHANNEL_OUT_STEREO); in defaultAudioPolicyConfig()
4353 profile->mSupportedDevices = AUDIO_DEVICE_OUT_SPEAKER; in defaultAudioPolicyConfig()
4354 profile->mFlags = AUDIO_OUTPUT_FLAG_PRIMARY; in defaultAudioPolicyConfig()
4355 module->mOutputProfiles.add(profile); in defaultAudioPolicyConfig()
4357 profile = new IOProfile(module); in defaultAudioPolicyConfig()
4358 profile->mSamplingRates.add(8000); in defaultAudioPolicyConfig()
4359 profile->mFormats.add(AUDIO_FORMAT_PCM_16_BIT); in defaultAudioPolicyConfig()
4360 profile->mChannelMasks.add(AUDIO_CHANNEL_IN_MONO); in defaultAudioPolicyConfig()
4361 profile->mSupportedDevices = AUDIO_DEVICE_IN_BUILTIN_MIC; in defaultAudioPolicyConfig()
4362 module->mInputProfiles.add(profile); in defaultAudioPolicyConfig()