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

Commit 9a326595 authored by Pavan Chikkala's avatar Pavan Chikkala Committed by Ethan Chen
Browse files

audio: Fixed Audio Source in Voice Call

setPhoneState calls getDeviceForInputSource to check if
voice_tx device is available as part of Primary Audio
Module. getDeviceForInputSource always returns
DEVICE_IN_COMMUNICATION for SOURCE_VOICE_COMMUNICATION
on A Family and this is not added to Available devices
This is leading to creation of txPatch when it is not
needed

Fix is to use AUDIO_SOURCE_VOICE_CALL instead of
AUDIO_SOURCE_VOICE_COMMUNICATION

Change-Id: I9aa7dd2139b8374ec7f06676d06ef5addea4b2a9
parent dc830fc1
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -602,7 +602,11 @@ void AudioPolicyManager::updateCallRouting(audio_devices_t rxDevice, int delayMs
    audio_patch_handle_t afPatchHandle;
    DeviceVector deviceList;

#ifndef QCOM_DIRECTTRACK
    audio_devices_t txDevice = getDeviceForInputSource(AUDIO_SOURCE_VOICE_COMMUNICATION);
#else
    audio_devices_t txDevice = getDeviceForInputSource(AUDIO_SOURCE_VOICE_CALL);
#endif
    ALOGV("updateCallRouting device rxDevice %08x txDevice %08x", rxDevice, txDevice);

    // release existing RX patch if any