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

Commit d17d9024 authored by Ashish Jain's avatar Ashish Jain Committed by Bruno Martins
Browse files

policy_hal: Update policy hal with latest AOSP refresh.

This change updates policy HAL with latest AOSP refresh.

AudioPolicyManager: remove unnecessary device reconnection
Change-Id: I2182b205c2b72cebff657a7bbee95df97f97eb55

audio policy: fix HW A/V sync rerouting
Change-Id: I1f080232e439a410ded25ca8e461113a96687a3b

Dynamic policies: support for device selection
Change-Id: I71584081e7f1b2b5252fb6c4659fdeb464f7d282

Change-Id: I8e2812f1386aa7349f4470f25bf67ce88982ab74
parent 277aa7e2
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -736,6 +736,7 @@ void AudioPolicyManagerCustom::setForceUse(audio_policy_force_use_t usage,
    checkA2dpSuspend();
    checkOutputForAllStrategies();
    updateDevicesAndOutputs();

    if (mEngine->getPhoneState() == AUDIO_MODE_IN_CALL && hasPrimaryOutput()) {
        audio_devices_t newDevice = getNewOutputDevice(mPrimaryOutput, true /*fromCache*/);
        updateCallRouting(newDevice);
@@ -1418,6 +1419,13 @@ audio_io_handle_t AudioPolicyManagerCustom::getOutputForDevice(
    }

non_direct_output:

    // A request for HW A/V sync cannot fallback to a mixed output because time
    // stamps are embedded in audio data
    if ((flags & AUDIO_OUTPUT_FLAG_HW_AV_SYNC) != 0) {
        return AUDIO_IO_HANDLE_NONE;
    }

    // ignoring channel mask due to downmix capability in mixer

    // open a non direct output