diff options
author | Eric Laurent <elaurent@google.com> | 2014-11-17 21:05:31 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2014-11-17 21:05:31 +0000 |
commit | 22bfb336abb82b853a7a20232626b113ba568c1d (patch) | |
tree | f87acd1c961c1ba1228a9401a87c744a1caa47ac /services/audiopolicy | |
parent | e0064399d6bff89fd65e46829ea7ddffd911e936 (diff) | |
parent | 2b456a16ceeffd3d82dca71ce29c6479b8a11bff (diff) | |
download | frameworks_av-22bfb336abb82b853a7a20232626b113ba568c1d.zip frameworks_av-22bfb336abb82b853a7a20232626b113ba568c1d.tar.gz frameworks_av-22bfb336abb82b853a7a20232626b113ba568c1d.tar.bz2 |
am 2b456a16: am f89f2ff4: Merge "audiopolicy: Update input device check in checkInputsForDevice" into lmp-mr1-dev
* commit '2b456a16ceeffd3d82dca71ce29c6479b8a11bff':
audiopolicy: Update input device check in checkInputsForDevice
Diffstat (limited to 'services/audiopolicy')
-rw-r--r-- | services/audiopolicy/AudioPolicyManager.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/services/audiopolicy/AudioPolicyManager.cpp b/services/audiopolicy/AudioPolicyManager.cpp index 584e170..fff7746 100644 --- a/services/audiopolicy/AudioPolicyManager.cpp +++ b/services/audiopolicy/AudioPolicyManager.cpp @@ -3563,7 +3563,8 @@ status_t AudioPolicyManager::checkInputsForDevice(audio_devices_t device, // check if one opened input is not needed any more after disconnecting one device for (size_t input_index = 0; input_index < mInputs.size(); input_index++) { desc = mInputs.valueAt(input_index); - if (!(desc->mProfile->mSupportedDevices.types() & mAvailableInputDevices.types())) { + if (!(desc->mProfile->mSupportedDevices.types() & mAvailableInputDevices.types() & + ~AUDIO_DEVICE_BIT_IN)) { ALOGV("checkInputsForDevice(): disconnecting adding input %d", mInputs.keyAt(input_index)); inputs.add(mInputs.keyAt(input_index)); @@ -3578,7 +3579,7 @@ status_t AudioPolicyManager::checkInputsForDevice(audio_devices_t device, profile_index < mHwModules[module_index]->mInputProfiles.size(); profile_index++) { sp<IOProfile> profile = mHwModules[module_index]->mInputProfiles[profile_index]; - if (profile->mSupportedDevices.types() & device) { + if (profile->mSupportedDevices.types() & device & ~AUDIO_DEVICE_BIT_IN) { ALOGV("checkInputsForDevice(): clearing direct input profile %zu on module %zu", profile_index, module_index); if (profile->mSamplingRates[0] == 0) { @@ -3795,7 +3796,9 @@ void AudioPolicyManager::checkA2dpSuspend() } bool isScoConnected = - (mAvailableInputDevices.types() & AUDIO_DEVICE_IN_BLUETOOTH_SCO_HEADSET) != 0; + ((mAvailableInputDevices.types() & AUDIO_DEVICE_IN_BLUETOOTH_SCO_HEADSET & + ~AUDIO_DEVICE_BIT_IN) != 0) || + ((mAvailableOutputDevices.types() & AUDIO_DEVICE_OUT_ALL_SCO) != 0); // suspend A2DP output if: // (NOT already suspended) && // ((SCO device is connected && |