Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 679a1439 authored by Eric Laurent's avatar Eric Laurent Committed by Android Git Automerger
Browse files

am be845fce: Merge "audiopolicy : Fix for incorrect input device selection" into lmp-mr1-dev

* commit 'be845fce':
  audiopolicy : Fix for incorrect input device selection
parents 9632d33e be845fce
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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) {