• Home
  • Raw
  • Download

Lines Matching refs:profile

515             IOProfile *profile = mHwModules[i]->mOutputProfiles[j];  in getProfileForDirectOutput()  local
517 if (profile->isCompatibleProfile(device, samplingRate, format, in getProfileForDirectOutput()
520 if (mAvailableOutputDevices & profile->mSupportedDevices) { in getProfileForDirectOutput()
525 if (profile->isCompatibleProfile(device, samplingRate, format, in getProfileForDirectOutput()
528 if (mAvailableOutputDevices & profile->mSupportedDevices) { in getProfileForDirectOutput()
599 IOProfile *profile = NULL; in getOutput() local
602 profile = getProfileForDirectOutput(device, in getOutput()
609 if (profile != NULL) { in getOutput()
614 if (!desc->isDuplicated() && (profile == desc->mProfile)) { in getOutput()
630 outputDesc = new AudioOutputDescriptor(profile); in getOutput()
640 output = mpClientInterface->openOutput(profile->mModule->mHandle, in getOutput()
941 IOProfile *profile = getInputProfile(device, in getInput() local
945 if (profile == NULL) { in getInput()
952 if (profile->mModule->mHandle == 0) { in getInput()
953 ALOGE("getInput(): HW module %s not opened", profile->mModule->mName); in getInput()
957 AudioInputDescriptor *inputDesc = new AudioInputDescriptor(profile); in getInput()
966 input = mpClientInterface->openInput(profile->mModule->mHandle, in getInput()
1530 IOProfile *profile = getProfileForDirectOutput(AUDIO_DEVICE_NONE /*ignore device */, in isOffloadSupported() local
1535 ALOGV("isOffloadSupported() profile %sfound", profile != NULL ? "" : "NOT "); in isOffloadSupported()
1536 return (profile != NULL); in isOffloadSupported()
1882 IOProfile *profile = profiles[profile_index]; in checkOutputsForDevice() local
1888 if (!desc->isDuplicated() && desc->mProfile == profile) { in checkOutputsForDevice()
1897 desc = new AudioOutputDescriptor(profile); in checkOutputsForDevice()
1904 audio_io_handle_t output = mpClientInterface->openOutput(profile->mModule->mHandle, in checkOutputsForDevice()
1921 if (profile->mSamplingRates[0] == 0) { in checkOutputsForDevice()
1928 loadSamplingRates(value + 1, profile); in checkOutputsForDevice()
1931 if (profile->mFormats[0] == AUDIO_FORMAT_DEFAULT) { in checkOutputsForDevice()
1938 loadFormats(value + 1, profile); in checkOutputsForDevice()
1941 if (profile->mChannelMasks[0] == 0) { in checkOutputsForDevice()
1948 loadOutChannels(value + 1, profile); in checkOutputsForDevice()
1951 if (((profile->mSamplingRates[0] == 0) && in checkOutputsForDevice()
1952 (profile->mSamplingRates.size() < 2)) || in checkOutputsForDevice()
1953 ((profile->mFormats[0] == 0) && in checkOutputsForDevice()
1954 (profile->mFormats.size() < 2)) || in checkOutputsForDevice()
1955 ((profile->mChannelMasks[0] == 0) && in checkOutputsForDevice()
1956 (profile->mChannelMasks.size() < 2))) { in checkOutputsForDevice()
1960 } else if (profile->mSamplingRates[0] == 0) { in checkOutputsForDevice()
1962 desc->mSamplingRate = profile->mSamplingRates[1]; in checkOutputsForDevice()
1965 profile->mModule->mHandle, in checkOutputsForDevice()
2042 IOProfile *profile = mHwModules[i]->mOutputProfiles[j]; in checkOutputsForDevice() local
2043 if (profile->mSupportedDevices & device) { in checkOutputsForDevice()
2046 if (profile->mSamplingRates[0] == 0) { in checkOutputsForDevice()
2047 profile->mSamplingRates.clear(); in checkOutputsForDevice()
2048 profile->mSamplingRates.add(0); in checkOutputsForDevice()
2050 if (profile->mFormats[0] == AUDIO_FORMAT_DEFAULT) { in checkOutputsForDevice()
2051 profile->mFormats.clear(); in checkOutputsForDevice()
2052 profile->mFormats.add(AUDIO_FORMAT_DEFAULT); in checkOutputsForDevice()
2054 if (profile->mChannelMasks[0] == 0) { in checkOutputsForDevice()
2055 profile->mChannelMasks.clear(); in checkOutputsForDevice()
2056 profile->mChannelMasks.add(0); in checkOutputsForDevice()
2110 IOProfile *profile = profiles[profile_index]; in checkInputsForDevice() local
2115 if (desc->mProfile == profile) { in checkInputsForDevice()
2124 desc = new AudioInputDescriptor(profile); in checkInputsForDevice()
2127 audio_io_handle_t input = mpClientInterface->openInput(profile->mModule->mHandle, in checkInputsForDevice()
2141 if (profile->mSamplingRates[0] == 0) { in checkInputsForDevice()
2148 loadSamplingRates(value + 1, profile); in checkInputsForDevice()
2151 if (profile->mFormats[0] == AUDIO_FORMAT_DEFAULT) { in checkInputsForDevice()
2157 loadFormats(value + 1, profile); in checkInputsForDevice()
2160 if (profile->mChannelMasks[0] == 0) { in checkInputsForDevice()
2167 loadInChannels(value + 1, profile); in checkInputsForDevice()
2170 if (((profile->mSamplingRates[0] == 0) && (profile->mSamplingRates.size() < 2)) || in checkInputsForDevice()
2171 ((profile->mFormats[0] == 0) && (profile->mFormats.size() < 2)) || in checkInputsForDevice()
2172 ((profile->mChannelMasks[0] == 0) && (profile->mChannelMasks.size() < 2))) { in checkInputsForDevice()
2219 IOProfile *profile = mHwModules[module_index]->mInputProfiles[profile_index]; in checkInputsForDevice() local
2220 if (profile->mSupportedDevices & device) { in checkInputsForDevice()
2223 if (profile->mSamplingRates[0] == 0) { in checkInputsForDevice()
2224 profile->mSamplingRates.clear(); in checkInputsForDevice()
2225 profile->mSamplingRates.add(0); in checkInputsForDevice()
2227 if (profile->mFormats[0] == AUDIO_FORMAT_DEFAULT) { in checkInputsForDevice()
2228 profile->mFormats.clear(); in checkInputsForDevice()
2229 profile->mFormats.add(AUDIO_FORMAT_DEFAULT); in checkInputsForDevice()
2231 if (profile->mChannelMasks[0] == 0) { in checkInputsForDevice()
2232 profile->mChannelMasks.clear(); in checkInputsForDevice()
2233 profile->mChannelMasks.add(0); in checkInputsForDevice()
2910 IOProfile *profile = mHwModules[i]->mInputProfiles[j]; in getInputProfile() local
2912 if (profile->isCompatibleProfile(device, samplingRate, format, in getInputProfile()
2914 return profile; in getInputProfile()
3490 const IOProfile *profile) in AudioOutputDescriptor() argument
3494 mOutput1(0), mOutput2(0), mProfile(profile), mDirectOpenCount(0), in AudioOutputDescriptor()
3507 if (profile != NULL) { in AudioOutputDescriptor()
3508 mSamplingRate = profile->mSamplingRates[0]; in AudioOutputDescriptor()
3509 mFormat = profile->mFormats[0]; in AudioOutputDescriptor()
3510 mChannelMask = profile->mChannelMasks[0]; in AudioOutputDescriptor()
3511 mFlags = profile->mFlags; in AudioOutputDescriptor()
3643 AudioPolicyManagerBase::AudioInputDescriptor::AudioInputDescriptor(const IOProfile *profile) in AudioInputDescriptor() argument
3646 mInputSource(0), mProfile(profile) in AudioInputDescriptor()
3648 if (profile != NULL) { in AudioInputDescriptor()
3649 mSamplingRate = profile->mSamplingRates[0]; in AudioInputDescriptor()
3650 mFormat = profile->mFormats[0]; in AudioInputDescriptor()
3651 mChannelMask = profile->mChannelMasks[0]; in AudioInputDescriptor()
4043 void AudioPolicyManagerBase::loadSamplingRates(char *name, IOProfile *profile) in loadSamplingRates() argument
4050 profile->mSamplingRates.add(0); in loadSamplingRates()
4058 profile->mSamplingRates.add(rate); in loadSamplingRates()
4065 void AudioPolicyManagerBase::loadFormats(char *name, IOProfile *profile) in loadFormats() argument
4072 profile->mFormats.add(AUDIO_FORMAT_DEFAULT); in loadFormats()
4081 profile->mFormats.add(format); in loadFormats()
4088 void AudioPolicyManagerBase::loadInChannels(char *name, IOProfile *profile) in loadInChannels() argument
4095 profile->mChannelMasks.add(0); in loadInChannels()
4106 profile->mChannelMasks.add(channelMask); in loadInChannels()
4113 void AudioPolicyManagerBase::loadOutChannels(char *name, IOProfile *profile) in loadOutChannels() argument
4122 profile->mChannelMasks.add(0); in loadOutChannels()
4132 profile->mChannelMasks.add(channelMask); in loadOutChannels()
4143 IOProfile *profile = new IOProfile(module); in loadInput() local
4147 loadSamplingRates((char *)node->value, profile); in loadInput()
4149 loadFormats((char *)node->value, profile); in loadInput()
4151 loadInChannels((char *)node->value, profile); in loadInput()
4153 profile->mSupportedDevices = parseDeviceNames((char *)node->value); in loadInput()
4157 ALOGW_IF(profile->mSupportedDevices == AUDIO_DEVICE_NONE, in loadInput()
4159 ALOGW_IF(profile->mChannelMasks.size() == 0, in loadInput()
4161 ALOGW_IF(profile->mSamplingRates.size() == 0, in loadInput()
4163 ALOGW_IF(profile->mFormats.size() == 0, in loadInput()
4165 if ((profile->mSupportedDevices != AUDIO_DEVICE_NONE) && in loadInput()
4166 (profile->mChannelMasks.size() != 0) && in loadInput()
4167 (profile->mSamplingRates.size() != 0) && in loadInput()
4168 (profile->mFormats.size() != 0)) { in loadInput()
4170 ALOGV("loadInput() adding input mSupportedDevices 0x%X", profile->mSupportedDevices); in loadInput()
4172 module->mInputProfiles.add(profile); in loadInput()
4175 delete profile; in loadInput()
4184 IOProfile *profile = new IOProfile(module); in loadOutput() local
4188 loadSamplingRates((char *)node->value, profile); in loadOutput()
4190 loadFormats((char *)node->value, profile); in loadOutput()
4192 loadOutChannels((char *)node->value, profile); in loadOutput()
4194 profile->mSupportedDevices = parseDeviceNames((char *)node->value); in loadOutput()
4196 profile->mFlags = parseFlagNames((char *)node->value); in loadOutput()
4200 ALOGW_IF(profile->mSupportedDevices == AUDIO_DEVICE_NONE, in loadOutput()
4202 ALOGW_IF(profile->mChannelMasks.size() == 0, in loadOutput()
4204 ALOGW_IF(profile->mSamplingRates.size() == 0, in loadOutput()
4206 ALOGW_IF(profile->mFormats.size() == 0, in loadOutput()
4208 if ((profile->mSupportedDevices != AUDIO_DEVICE_NONE) && in loadOutput()
4209 (profile->mChannelMasks.size() != 0) && in loadOutput()
4210 (profile->mSamplingRates.size() != 0) && in loadOutput()
4211 (profile->mFormats.size() != 0)) { in loadOutput()
4214 profile->mSupportedDevices, profile->mFlags); in loadOutput()
4216 module->mOutputProfiles.add(profile); in loadOutput()
4219 delete profile; in loadOutput()
4342 IOProfile *profile; in defaultAudioPolicyConfig() local
4350 profile = new IOProfile(module); in defaultAudioPolicyConfig()
4351 profile->mSamplingRates.add(44100); in defaultAudioPolicyConfig()
4352 profile->mFormats.add(AUDIO_FORMAT_PCM_16_BIT); in defaultAudioPolicyConfig()
4353 profile->mChannelMasks.add(AUDIO_CHANNEL_OUT_STEREO); in defaultAudioPolicyConfig()
4354 profile->mSupportedDevices = AUDIO_DEVICE_OUT_SPEAKER; in defaultAudioPolicyConfig()
4355 profile->mFlags = AUDIO_OUTPUT_FLAG_PRIMARY; in defaultAudioPolicyConfig()
4356 module->mOutputProfiles.add(profile); in defaultAudioPolicyConfig()
4358 profile = new IOProfile(module); in defaultAudioPolicyConfig()
4359 profile->mSamplingRates.add(8000); in defaultAudioPolicyConfig()
4360 profile->mFormats.add(AUDIO_FORMAT_PCM_16_BIT); in defaultAudioPolicyConfig()
4361 profile->mChannelMasks.add(AUDIO_CHANNEL_IN_MONO); in defaultAudioPolicyConfig()
4362 profile->mSupportedDevices = AUDIO_DEVICE_IN_BUILTIN_MIC; in defaultAudioPolicyConfig()
4363 module->mInputProfiles.add(profile); in defaultAudioPolicyConfig()