diff options
author | Eric Laurent <elaurent@google.com> | 2014-12-16 12:24:18 -0800 |
---|---|---|
committer | Eric Laurent <elaurent@google.com> | 2014-12-16 12:24:18 -0800 |
commit | dc136ffee31f21da3b31240f8a22d4d08a658d0d (patch) | |
tree | 6e93a02e8ad6db27672a8cc3d4c9e4bd75179a61 /services/audiopolicy | |
parent | 8975220e28f632c5db4d89c798384d7635228bbc (diff) | |
download | frameworks_av-dc136ffee31f21da3b31240f8a22d4d08a658d0d.zip frameworks_av-dc136ffee31f21da3b31240f8a22d4d08a658d0d.tar.gz frameworks_av-dc136ffee31f21da3b31240f8a22d4d08a658d0d.tar.bz2 |
audiopolicy : Fix for incorrect input device selection
Some VoIP applications do not use source as VOICE_COMM
but MIC and policy manager ignores the force usage in that
case and selects handset-mic as input device even when
BT-SCO headset is connected.
Check the force usage for the AUDIO_SOURCE_MIC as well.
Bug: 18606571
Change-Id: I5d5010ab396f85bf58573943c91fd815f39f57c1
Diffstat (limited to 'services/audiopolicy')
-rw-r--r-- | services/audiopolicy/AudioPolicyManager.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/services/audiopolicy/AudioPolicyManager.cpp b/services/audiopolicy/AudioPolicyManager.cpp index 744556d..79d4ae6 100644 --- a/services/audiopolicy/AudioPolicyManager.cpp +++ b/services/audiopolicy/AudioPolicyManager.cpp @@ -5127,6 +5127,9 @@ audio_devices_t AudioPolicyManager::getDeviceForInputSource(audio_source_t input case AUDIO_SOURCE_MIC: if (availableDeviceTypes & AUDIO_DEVICE_IN_BLUETOOTH_A2DP) { device = AUDIO_DEVICE_IN_BLUETOOTH_A2DP; + } else if ((mForceUse[AUDIO_POLICY_FORCE_FOR_RECORD] == AUDIO_POLICY_FORCE_BT_SCO) && + (availableDeviceTypes & AUDIO_DEVICE_IN_BLUETOOTH_SCO_HEADSET)) { + device = AUDIO_DEVICE_IN_BLUETOOTH_SCO_HEADSET; } else if (availableDeviceTypes & AUDIO_DEVICE_IN_WIRED_HEADSET) { device = AUDIO_DEVICE_IN_WIRED_HEADSET; } else if (availableDeviceTypes & AUDIO_DEVICE_IN_USB_DEVICE) { |