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

Commit 9698a4cc authored by Eric Laurent's avatar Eric Laurent
Browse files

audio policy manager: fix BT SCO stream mute

Allow setting voice and bluetooth SCO stream volume to 0
in checkAndSetVolume() even when the selected device is
bluetooth SCO to allow muting VoIP call downlink.

Bug: 170489272
Test: repro steps in bug.
Change-Id: If8b2d225742f9589cd21718d8a439531996434f9
parent 0d9a3e14
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -6251,9 +6251,8 @@ status_t AudioPolicyManager::checkAndSetVolume(IVolumeCurves &curves,

    float volumeDb = computeVolume(curves, volumeSource, index, deviceTypes);
    if (outputDesc->isFixedVolume(deviceTypes) ||
            // Force VoIP volume to max for bluetooth SCO

            ((isVoiceVolSrc || isBtScoVolSrc) &&
            // Force VoIP volume to max for bluetooth SCO device except if muted
            (index != 0 && (isVoiceVolSrc || isBtScoVolSrc) &&
                    isSingleDeviceType(deviceTypes, audio_is_bluetooth_out_sco_device))) {
        volumeDb = 0.0f;
    }