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

Commit 136ea987 authored by Ramjee Singh's avatar Ramjee Singh 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 this fix is present
in I9aa7dd2139b8374ec7f06676d06ef5addea4b2a9 and
removed during MR1 upgrade

commit c8fc8b8a5ca8b33eca146c3f40c07731b245324e

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

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

    // release existing RX patch if any