diff options
author | Eric Laurent <elaurent@google.com> | 2013-02-26 16:10:05 -0800 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2013-03-05 16:53:53 +0000 |
commit | 9641bd36dbf0c4b1eeb84499b35c1cdb7fa5a530 (patch) | |
tree | bd1c9891381f95cab44fe9798496349539acc851 /audio | |
parent | f32e38e24db196671d3ea43427125a4e212466fa (diff) | |
download | hardware_libhardware_legacy-9641bd36dbf0c4b1eeb84499b35c1cdb7fa5a530.zip hardware_libhardware_legacy-9641bd36dbf0c4b1eeb84499b35c1cdb7fa5a530.tar.gz hardware_libhardware_legacy-9641bd36dbf0c4b1eeb84499b35c1cdb7fa5a530.tar.bz2 |
audio policy: fix in call capture device
Allow use of default capture device when
AUDIO_SOURCE_VOICE_UPLINK is specified and the platform
does not support AUDIO_DEVICE_IN_VOICE_CALL.
Change-Id: Ibbc314f60c91e5a0fa75d57878f2d2a96ef2d83b
Diffstat (limited to 'audio')
-rw-r--r-- | audio/AudioPolicyManagerBase.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/audio/AudioPolicyManagerBase.cpp b/audio/AudioPolicyManagerBase.cpp index 4f0bb41..ccaa035 100644 --- a/audio/AudioPolicyManagerBase.cpp +++ b/audio/AudioPolicyManagerBase.cpp @@ -2461,7 +2461,14 @@ audio_devices_t AudioPolicyManagerBase::getDeviceForInputSource(int inputSource) { uint32_t device = AUDIO_DEVICE_NONE; - switch(inputSource) { + switch (inputSource) { + case AUDIO_SOURCE_VOICE_UPLINK: + if (mAvailableInputDevices & AUDIO_DEVICE_IN_VOICE_CALL) { + device = AUDIO_DEVICE_IN_VOICE_CALL; + break; + } + // FALL THROUGH + case AUDIO_SOURCE_DEFAULT: case AUDIO_SOURCE_MIC: case AUDIO_SOURCE_VOICE_RECOGNITION: @@ -2482,7 +2489,6 @@ audio_devices_t AudioPolicyManagerBase::getDeviceForInputSource(int inputSource) device = AUDIO_DEVICE_IN_BUILTIN_MIC; } break; - case AUDIO_SOURCE_VOICE_UPLINK: case AUDIO_SOURCE_VOICE_DOWNLINK: case AUDIO_SOURCE_VOICE_CALL: if (mAvailableInputDevices & AUDIO_DEVICE_IN_VOICE_CALL) { |