diff options
author | Eric Laurent <elaurent@google.com> | 2013-05-21 08:55:38 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2013-05-21 08:55:38 -0700 |
commit | a6c2f12ce8b0fdd4fb0cef078857d28c82b43458 (patch) | |
tree | 43d73b720346c7fe0ec2093f65b06a3c026c5528 | |
parent | c85cf2f9b2f0854f58581b03b723230ded33b64c (diff) | |
parent | 66707435156d8d99d795271a7bd54943065b4c2d (diff) | |
download | hardware_libhardware_legacy-a6c2f12ce8b0fdd4fb0cef078857d28c82b43458.zip hardware_libhardware_legacy-a6c2f12ce8b0fdd4fb0cef078857d28c82b43458.tar.gz hardware_libhardware_legacy-a6c2f12ce8b0fdd4fb0cef078857d28c82b43458.tar.bz2 |
am 66707435: audio policy: fix device selection in startInput()
* commit '66707435156d8d99d795271a7bd54943065b4c2d':
audio policy: fix device selection in startInput()
-rw-r--r-- | audio/AudioPolicyManagerBase.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/audio/AudioPolicyManagerBase.cpp b/audio/AudioPolicyManagerBase.cpp index e755d28..236bf69 100644 --- a/audio/AudioPolicyManagerBase.cpp +++ b/audio/AudioPolicyManagerBase.cpp @@ -941,6 +941,10 @@ status_t AudioPolicyManagerBase::startInput(audio_io_handle_t input) } } + audio_devices_t newDevice = getDeviceForInputSource(inputDesc->mInputSource); + if ((newDevice != AUDIO_DEVICE_NONE) && (newDevice != inputDesc->mDevice)) { + inputDesc->mDevice = newDevice; + } AudioParameter param = AudioParameter(); param.addInt(String8(AudioParameter::keyRouting), (int)inputDesc->mDevice); |