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

Commit 879b3903 authored by Eric Laurent's avatar Eric Laurent Committed by android-build-merger
Browse files

Merge "audio policy: mute call RX when SCO volume is 0" into qt-dev am: a426cf1c am: 0fdb6247

am: ccc12e8c

Change-Id: I474ad69164d7f69f973926ee6552313ceb2dd2a3
parents a161bbe3 ccc12e8c
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -5845,11 +5845,11 @@ status_t AudioPolicyManager::checkAndSetVolume(IVolumeCurves &curves,

    if (isVoiceVolSrc || isBtScoVolSrc) {
        float voiceVolume;
        // Force voice volume to max for bluetooth SCO as volume is managed by the headset
        // Force voice volume to max or mute for Bluetooth SCO as other attenuations are managed by the headset
        if (isVoiceVolSrc) {
            voiceVolume = (float)index/(float)curves.getVolumeIndexMax();
        } else {
            voiceVolume = 1.0;
            voiceVolume = index == 0 ? 0.0 : 1.0;
        }
        if (voiceVolume != mLastVoiceVolume) {
            mpClientInterface->setVoiceVolume(voiceVolume, delayMs);