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

Commit 5ccbce1b authored by chenxin20's avatar chenxin20 Committed by xin chen
Browse files

audio: applyStreamVolumes when return by unsupported device



If the A2DP device does not support voip rx output, and clearDevicesRoleForStrategy is earlier than stopoutput stream 0, voip rx output stream 0 will be muted because clearDevicesRoleForStrategy->checkForDeviceAndOutputChanges->checkOutputForAllStrategies->checkOutputForAttributes->setStrategyMute uses newDevices.types(), and AudioOutputDescriptor::setVolume will detect whether the device (A2DP) is supported.
In addition, in setOutputDevices, unsupported device is returned and setting the same device will not trigger volume operations.

Bug: 401614536
Test: Connect a Bluetooth headset to make VOIP calls.
Flag: EXEMPT bug fix

Change-Id: I51abe7620dcd11b68d621cac1a8d019b100491c9
Signed-off-by: default avatarchenxin20 <chenxin20@xiaomi.com>
parent 9d1a69a4
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -8060,6 +8060,7 @@ uint32_t AudioPolicyManager::setOutputDevices(const char *caller,
              devices.toString().c_str());
        // restore previous device after evaluating strategy mute state
        outputDesc->setDevices(prevDevices);
        applyStreamVolumes(outputDesc, prevDevices.types(), delayMs, true /*force*/);
        return muteWaitMs;
    }