Home
last modified time | relevance | path

Searched refs:deviceTypes (Results 1 – 20 of 20) sorted by relevance

/frameworks/av/media/libaudiofoundation/include/media/
DAudioContainers.h73 static inline bool isSingleDeviceType(const DeviceTypeSet& deviceTypes, in isSingleDeviceType() argument
75 return deviceTypes.size() == 1 && *(deviceTypes.begin()) == deviceType; in isSingleDeviceType()
79 static inline bool isSingleDeviceType(const DeviceTypeSet& deviceTypes, in isSingleDeviceType() argument
81 return deviceTypes.size() == 1 && p(*(deviceTypes.begin())); in isSingleDeviceType()
84 static inline bool areAllOfSameDeviceType(const DeviceTypeSet& deviceTypes, in areAllOfSameDeviceType() argument
86 return std::all_of(deviceTypes.begin(), deviceTypes.end(), p); in areAllOfSameDeviceType()
89 static inline void resetDeviceTypes(DeviceTypeSet& deviceTypes, audio_devices_t typeToAdd) { in resetDeviceTypes() argument
90 deviceTypes.clear(); in resetDeviceTypes()
91 deviceTypes.insert(typeToAdd); in resetDeviceTypes()
96 static inline audio_devices_t deviceTypesToBitMask(const DeviceTypeSet& deviceTypes) { in deviceTypesToBitMask() argument
[all …]
/frameworks/av/media/libaudiofoundation/
DAudioContainers.cpp66 bool deviceTypesToString(const DeviceTypeSet &deviceTypes, std::string &str) { in deviceTypesToString() argument
67 if (deviceTypes.empty()) { in deviceTypesToString()
72 for (auto it = deviceTypes.begin(); it != deviceTypes.end();) { in deviceTypesToString()
81 if (++it != deviceTypes.end()) { in deviceTypesToString()
91 std::string dumpDeviceTypes(const DeviceTypeSet &deviceTypes) { in dumpDeviceTypes() argument
93 for (auto it = deviceTypes.begin(); it != deviceTypes.end();) { in dumpDeviceTypes()
97 if (++it != deviceTypes.end()) { in dumpDeviceTypes()
104 std::string toString(const DeviceTypeSet& deviceTypes) { in toString() argument
106 deviceTypesToString(deviceTypes, ret); in toString()
DAudioDeviceTypeAddr.cpp60 DeviceTypeSet deviceTypes; in getAudioDeviceTypes() local
62 deviceTypes.insert(deviceTypeAddr.mType); in getAudioDeviceTypes()
64 return deviceTypes; in getAudioDeviceTypes()
/frameworks/av/services/audiopolicy/common/include/
Dpolicy.h211 const android::DeviceTypeSet& deviceTypes) { in apm_extract_one_audio_device() argument
212 if (deviceTypes.empty()) { in apm_extract_one_audio_device()
214 } else if (deviceTypes.size() == 1) { in apm_extract_one_audio_device()
215 return *(deviceTypes.begin()); in apm_extract_one_audio_device()
223 if (deviceTypes.count(AUDIO_DEVICE_OUT_SPEAKER) != 0) { in apm_extract_one_audio_device()
225 } else if (deviceTypes.count(AUDIO_DEVICE_OUT_SPEAKER_SAFE) != 0) { in apm_extract_one_audio_device()
227 } else if (deviceTypes.count(AUDIO_DEVICE_OUT_HDMI_ARC) != 0) { in apm_extract_one_audio_device()
229 } else if (deviceTypes.count(AUDIO_DEVICE_OUT_AUX_LINE) != 0) { in apm_extract_one_audio_device()
231 } else if (deviceTypes.count(AUDIO_DEVICE_OUT_SPDIF) != 0) { in apm_extract_one_audio_device()
235 deviceTypes, android::getAudioDeviceOutAllA2dpSet()); in apm_extract_one_audio_device()
[all …]
DVolume.h88 static audio_devices_t getDeviceForVolume(const android::DeviceTypeSet& deviceTypes) in getDeviceForVolume() argument
90 if (deviceTypes.empty()) { in getDeviceForVolume()
96 audio_devices_t deviceType = apm_extract_one_audio_device(deviceTypes); in getDeviceForVolume()
105 android::dumpDeviceTypes(deviceTypes).c_str()); in getDeviceForVolume()
117 static device_category getDeviceCategory(const android::DeviceTypeSet& deviceTypes) in getDeviceCategory() argument
119 switch(getDeviceForVolume(deviceTypes)) { in getDeviceCategory()
/frameworks/av/services/audiopolicy/common/managerdefinitions/include/
DIOProfile.h106 bool supportsDeviceTypes(const DeviceTypeSet& deviceTypes) const in supportsDeviceTypes() argument
108 const bool areOutputDevices = Intersection(deviceTypes, getAudioDeviceInAllSet()).empty(); in supportsDeviceTypes()
109 const bool devicesSupported = !mSupportedDevices.getDevicesFromTypes(deviceTypes).empty(); in supportsDeviceTypes()
111 (!areOutputDevices || devicesSupportEncodedFormats(deviceTypes)); in supportsDeviceTypes()
131 bool devicesSupportEncodedFormats(DeviceTypeSet deviceTypes) const in devicesSupportEncodedFormats() argument
133 if (deviceTypes.empty()) { in devicesSupportEncodedFormats()
137 mSupportedDevices.getDevicesFromTypes(deviceTypes); in devicesSupportEncodedFormats()
DAudioOutputDescriptor.h160 virtual bool isFixedVolume(const DeviceTypeSet& deviceTypes);
163 const DeviceTypeSet& deviceTypes,
333 virtual bool devicesSupportEncodedFormats(const DeviceTypeSet& deviceTypes);
336 virtual bool isFixedVolume(const DeviceTypeSet& deviceTypes);
422 const DeviceTypeSet& deviceTypes,
DDeviceDescriptor.h149 bool containsDeviceAmongTypes(const DeviceTypeSet& deviceTypes) const { in containsDeviceAmongTypes() argument
150 return !Intersection(mDeviceTypes, deviceTypes).empty(); in containsDeviceAmongTypes()
/frameworks/av/services/audiopolicy/engineconfigurable/src/
DEngine.cpp230 DeviceTypeSet deviceTypes; in getDevicesForProductStrategy() local
239 deviceTypes = productStrategies.getDeviceTypesForProductStrategy(strategyForMedia); in getDevicesForProductStrategy()
247 deviceTypes = productStrategies.getDeviceTypesForProductStrategy(strategyNotification); in getDevicesForProductStrategy()
249 deviceTypes = productStrategies.getDeviceTypesForProductStrategy(ps); in getDevicesForProductStrategy()
251 if (deviceTypes.empty() || in getDevicesForProductStrategy()
252 Intersection(deviceTypes, availableOutputDevicesTypes).empty()) { in getDevicesForProductStrategy()
258 deviceTypes, AUDIO_DEVICE_OUT_BUS)) { in getDevicesForProductStrategy()
264 __FUNCTION__, dumpDeviceTypes(deviceTypes).c_str(), address.c_str(), ps); in getDevicesForProductStrategy()
266 *deviceTypes.begin(), address, AUDIO_FORMAT_DEFAULT); in getDevicesForProductStrategy()
269 dumpDeviceTypes(deviceTypes).c_str(), address.c_str()); in getDevicesForProductStrategy()
[all …]
/frameworks/av/services/audiopolicy/common/managerdefinitions/src/
DAudioOutputDescriptor.cpp147 bool AudioOutputDescriptor::isFixedVolume(const DeviceTypeSet& deviceTypes __unused) in isFixedVolume()
341 bool SwAudioOutputDescriptor::devicesSupportEncodedFormats(const DeviceTypeSet& deviceTypes) in devicesSupportEncodedFormats() argument
344 return (mOutput1->devicesSupportEncodedFormats(deviceTypes) in devicesSupportEncodedFormats()
345 || mOutput2->devicesSupportEncodedFormats(deviceTypes)); in devicesSupportEncodedFormats()
347 return mProfile->devicesSupportEncodedFormats(deviceTypes); in devicesSupportEncodedFormats()
370 bool SwAudioOutputDescriptor::isFixedVolume(const DeviceTypeSet& deviceTypes) in isFixedVolume() argument
373 if (isSingleDeviceType(deviceTypes, AUDIO_DEVICE_OUT_REMOTE_SUBMIX)) { in isFixedVolume()
379 if (isSingleDeviceType(deviceTypes, AUDIO_DEVICE_OUT_TELEPHONY_TX)) { in isFixedVolume()
412 const DeviceTypeSet& deviceTypes, in setVolume() argument
417 if (!AudioOutputDescriptor::setVolume(volumeDb, vs, streamTypes, deviceTypes, delayMs, force)) { in setVolume()
[all …]
/frameworks/av/services/audiopolicy/engine/common/include/
DVolumeCurve.h94 virtual int getVolumeIndex(const DeviceTypeSet& deviceTypes) const in getVolumeIndex() argument
96 audio_devices_t device = Volume::getDeviceForVolume(deviceTypes); in getVolumeIndex()
/frameworks/av/services/audiopolicy/managerdefault/
DAudioPolicyManager.h179 const DeviceTypeSet& deviceTypes) const;
436 const DeviceTypeSet& deviceTypes);
446 DeviceTypeSet deviceTypes,
451 const DeviceTypeSet& deviceTypes,
467 DeviceTypeSet deviceTypes = DeviceTypeSet());
482 DeviceTypeSet deviceTypes = DeviceTypeSet());
DAudioPolicyManager.cpp2460 DeviceTypeSet deviceTypes = {device}; in getStreamVolumeIndex() local
2462 deviceTypes = mEngine->getOutputDevicesForStream( in getStreamVolumeIndex()
2465 return getVolumeIndex(getVolumeCurves(stream), *index, deviceTypes); in getStreamVolumeIndex()
2623 DeviceTypeSet deviceTypes = {device}; in getVolumeIndexForAttributes() local
2625 DeviceTypeSet deviceTypes = mEngine->getOutputDevicesForAttributes( in getVolumeIndexForAttributes() local
2628 return getVolumeIndex(getVolumeCurves(attr), index, deviceTypes); in getVolumeIndexForAttributes()
2633 const DeviceTypeSet& deviceTypes) const in getVolumeIndex()
2635 if (isSingleDeviceType(deviceTypes, audio_is_output_device)) { in getVolumeIndex()
2638 index = curves.getVolumeIndex(deviceTypes); in getVolumeIndex()
2639 ALOGV("%s: device %s index %d", __FUNCTION__, dumpDeviceTypes(deviceTypes).c_str(), index); in getVolumeIndex()
[all …]
/frameworks/base/media/java/android/media/audiopolicy/
DAudioPolicy.java429 final int[] deviceTypes = new int[devices.size()]; in setUidDeviceAffinity() local
437 deviceTypes[i] = in setUidDeviceAffinity()
445 uid, deviceTypes, deviceAdresses); in setUidDeviceAffinity()
/frameworks/base/media/java/android/media/
DAudioSystem.java1448 Set<Integer> deviceTypes = new HashSet<>(); in generateAudioDeviceTypesSet() local
1453 deviceTypes.add(deviceType); in generateAudioDeviceTypesSet()
1456 return deviceTypes; in generateAudioDeviceTypesSet()
DIAudioService.aidl259 int setUidDeviceAffinity(in IAudioPolicyCallback pcb, in int uid, in int[] deviceTypes, in setUidDeviceAffinity() argument
/frameworks/base/services/core/java/com/android/server/hdmi/
DHdmiControlService.java436 List<Integer> deviceTypes = HdmiProperties.device_type(); in HdmiControlService() local
437 if (deviceTypes.contains(null)) { in HdmiControlService()
440 deviceTypes = deviceTypes.stream().filter(Objects::nonNull).collect( in HdmiControlService()
443 mLocalDevices = deviceTypes; in HdmiControlService()
/frameworks/base/core/jni/
Dandroid_media_AudioSystem.cpp1992 jint uid, jintArray deviceTypes, jobjectArray deviceAddresses) { in android_media_AudioSystem_setUidDeviceAffinities() argument
1993 if (deviceTypes == nullptr || deviceAddresses == nullptr) { in android_media_AudioSystem_setUidDeviceAffinities()
1996 jsize nb = env->GetArrayLength(deviceTypes); in android_media_AudioSystem_setUidDeviceAffinities()
2003 typesPtr = env->GetIntArrayElements(deviceTypes, 0); in android_media_AudioSystem_setUidDeviceAffinities()
2024 env->ReleaseIntArrayElements(deviceTypes, typesPtr, 0); in android_media_AudioSystem_setUidDeviceAffinities()
/frameworks/base/services/core/java/com/android/server/audio/
DAudioService.java2332 final Set<Integer> deviceTypes = AudioSystem.generateAudioDeviceTypesSet( in updateAbsVolumeMultiModeDevices() local
2335 mAbsVolumeMultiModeCaseDevices, deviceTypes); in updateAbsVolumeMultiModeDevices()
6501 private String dumpDeviceTypes(@NonNull Set<Integer> deviceTypes) { in dumpDeviceTypes() argument
6502 Iterator<Integer> it = deviceTypes.iterator(); in dumpDeviceTypes()
7141 @NonNull int[] deviceTypes, @NonNull String[] deviceAddresses) { in setUidDeviceAffinity() argument
7151 if (!app.hasMixRoutedToDevices(deviceTypes, deviceAddresses)) { in setUidDeviceAffinity()
7154 return app.setUidDeviceAffinities(uid, deviceTypes, deviceAddresses); in setUidDeviceAffinity()
7549 boolean hasMixRoutedToDevices(@NonNull int[] deviceTypes, in hasMixRoutedToDevices() argument
7551 for (int i = 0; i < deviceTypes.length; i++) { in hasMixRoutedToDevices()
7556 if (mix.isRoutedToDevice(deviceTypes[i], deviceAddresses[i])) { in hasMixRoutedToDevices()
/frameworks/av/services/audioflinger/
DThreads.cpp4088 if (outDeviceTypes() != deviceTypes) { in createAudioPatch_l()
4091 if (deviceTypes.count(AUDIO_DEVICE_OUT_SPEAKER) > 0) { in createAudioPatch_l()
4096 if (!isSingleDeviceType(deviceTypes, AUDIO_DEVICE_OUT_SPEAKER)) { in createAudioPatch_l()