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

Commit ba618dd4 authored by Haynes Mathew George's avatar Haynes Mathew George Committed by Steve Kondik
Browse files

audiopolicy: Fix for device selection during concurrent audio playback

On a device selection for an output having strategy SONIFICATION_RESPECTFUL,
the primary output descriptor is checked to make sure SONIFICATION_RESPECTFUL
strategy is present and MEDIA strategy is absent.
This causes unnecessary device routing during a touch tone playback while
the primary output has both SONIFICATION_RESPECTFUL and MEDIA strategies enabled.

Change-Id: Ibf3c1bfd05b68d70c6cb9e8b9b95e989f27c2e75
CRs-Fixed: 773885
parent ed6be673
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -4562,8 +4562,7 @@ audio_devices_t AudioPolicyManager::getNewOutputDevice(audio_io_handle_t output,
                && (!primaryOutputDesc->isStrategyActive(STRATEGY_MEDIA)))) {
        device = getDeviceForStrategy(STRATEGY_SONIFICATION, fromCache);
    } else if (outputDesc->isStrategyActive(STRATEGY_SONIFICATION_RESPECTFUL) ||
                (primaryOutputDesc->isStrategyActive(STRATEGY_SONIFICATION_RESPECTFUL)
                && (!primaryOutputDesc->isStrategyActive(STRATEGY_MEDIA)))) {
               primaryOutputDesc->isStrategyActive(STRATEGY_SONIFICATION_RESPECTFUL)) {
        device = getDeviceForStrategy(STRATEGY_SONIFICATION_RESPECTFUL, fromCache);
    } else if (outputDesc->isStrategyActive(STRATEGY_MEDIA)) {
        device = getDeviceForStrategy(STRATEGY_MEDIA, fromCache);