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
This commit is contained in:
Eric Laurent 2013-02-26 16:10:05 -08:00 committed by Android (Google) Code Review
parent f32e38e24d
commit 9641bd36db

View file

@ -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) {