diff options
author | Eric Laurent <elaurent@google.com> | 2014-03-27 01:22:34 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2014-03-27 01:22:34 +0000 |
commit | 2347c7b0502f5f71d2f0e22d39f1d5a61add3f6b (patch) | |
tree | 6a1902c2f1bbb9c1283d3689e12b251ccdae8c4e /services | |
parent | ec31c8d17f587cba01d5516ccd336aa54323c668 (diff) | |
parent | 1b512c05f46465a7b1a1d69f82937d7199d5d926 (diff) | |
download | frameworks_av-2347c7b0502f5f71d2f0e22d39f1d5a61add3f6b.zip frameworks_av-2347c7b0502f5f71d2f0e22d39f1d5a61add3f6b.tar.gz frameworks_av-2347c7b0502f5f71d2f0e22d39f1d5a61add3f6b.tar.bz2 |
Merge "audio policy: remove obsolete AudioPolicyManager class members"
Diffstat (limited to 'services')
-rw-r--r-- | services/audiopolicy/AudioPolicyManager.cpp | 34 | ||||
-rw-r--r-- | services/audiopolicy/AudioPolicyManager.h | 4 |
2 files changed, 0 insertions, 38 deletions
diff --git a/services/audiopolicy/AudioPolicyManager.cpp b/services/audiopolicy/AudioPolicyManager.cpp index eeba124..d9d7b6e 100644 --- a/services/audiopolicy/AudioPolicyManager.cpp +++ b/services/audiopolicy/AudioPolicyManager.cpp @@ -170,27 +170,8 @@ status_t AudioPolicyManager::setDeviceConnectionState(audio_devices_t device, // connect/disconnect only 1 device at a time if (!audio_is_output_device(device) && !audio_is_input_device(device)) return BAD_VALUE; - if (strlen(device_address) >= MAX_DEVICE_ADDRESS_LEN) { - ALOGE("setDeviceConnectionState() invalid address: %s", device_address); - return BAD_VALUE; - } - // handle output devices if (audio_is_output_device(device)) { - - if (!mHasA2dp && audio_is_a2dp_device(device)) { - ALOGE("setDeviceConnectionState() invalid A2DP device: %x", device); - return BAD_VALUE; - } - if (!mHasUsb && audio_is_usb_device(device)) { - ALOGE("setDeviceConnectionState() invalid USB audio device: %x", device); - return BAD_VALUE; - } - if (!mHasRemoteSubmix && audio_is_remote_submix_device((audio_devices_t)device)) { - ALOGE("setDeviceConnectionState() invalid remote submix audio device: %x", device); - return BAD_VALUE; - } - sp<DeviceDescriptor> devDesc = new DeviceDescriptor(device, address, AUDIO_CHANNEL_NONE); @@ -2354,10 +2335,6 @@ void AudioPolicyManager::checkOutputForAllStrategies() audio_io_handle_t AudioPolicyManager::getA2dpOutput() { - if (!mHasA2dp) { - return 0; - } - for (size_t i = 0; i < mOutputs.size(); i++) { AudioOutputDescriptor *outputDesc = mOutputs.valueAt(i); if (!outputDesc->isDuplicated() && outputDesc->device() & AUDIO_DEVICE_OUT_ALL_A2DP) { @@ -2370,9 +2347,6 @@ audio_io_handle_t AudioPolicyManager::getA2dpOutput() void AudioPolicyManager::checkA2dpSuspend() { - if (!mHasA2dp) { - return; - } audio_io_handle_t a2dpOutput = getA2dpOutput(); if (a2dpOutput == 0) { mA2dpSuspended = false; @@ -4190,14 +4164,6 @@ void AudioPolicyManager::loadHwModule(cnode *root) HwModule *module = new HwModule(root->name); if (node != NULL) { - if (strcmp(root->name, AUDIO_HARDWARE_MODULE_ID_A2DP) == 0) { - mHasA2dp = true; - } else if (strcmp(root->name, AUDIO_HARDWARE_MODULE_ID_USB) == 0) { - mHasUsb = true; - } else if (strcmp(root->name, AUDIO_HARDWARE_MODULE_ID_REMOTE_SUBMIX) == 0) { - mHasRemoteSubmix = true; - } - node = node->first_child; while (node) { ALOGV("loadHwModule() loading output %s", node->name); diff --git a/services/audiopolicy/AudioPolicyManager.h b/services/audiopolicy/AudioPolicyManager.h index 4c366bd..0887fcf 100644 --- a/services/audiopolicy/AudioPolicyManager.h +++ b/services/audiopolicy/AudioPolicyManager.h @@ -30,7 +30,6 @@ namespace android { // ---------------------------------------------------------------------------- -#define MAX_DEVICE_ADDRESS_LEN 20 // Attenuation applied to STRATEGY_SONIFICATION streams when a headset is connected: 6dB #define SONIFICATION_HEADSET_VOLUME_FACTOR 0.5 // Min volume for STRATEGY_SONIFICATION streams when limited by music volume: -36dB @@ -584,9 +583,6 @@ protected: uint32_t mTotalEffectsMemory; // current memory used by effects KeyedVector<int, EffectDescriptor *> mEffects; // list of registered audio effects bool mA2dpSuspended; // true if A2DP output is suspended - bool mHasA2dp; // true on platforms with support for bluetooth A2DP - bool mHasUsb; // true on platforms with support for USB audio - bool mHasRemoteSubmix; // true on platforms with support for remote presentation of a submix sp<DeviceDescriptor> mDefaultOutputDevice; // output device selected by default at boot time bool mSpeakerDrcEnabled;// true on devices that use DRC on the DEVICE_CATEGORY_SPEAKER path // to boost soft sounds, used to adjust volume curves accordingly |