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

Commit 7bbfed28 authored by Ashish Jain's avatar Ashish Jain Committed by Gerrit - the friendly Code Review server
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 34f30b43
Loading
Loading
Loading
Loading
+9 −2
Original line number Diff line number Diff line
@@ -1719,6 +1719,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
@@ -1934,7 +1941,7 @@ status_t AudioPolicyManagerCustom::startInput(audio_io_handle_t input,
        // if input maps to a dynamic policy with an activity listener, notify of state change
        if ((inputDesc->mPolicyMix != NULL)
                && ((inputDesc->mPolicyMix->mCbFlags & AudioMix::kCbFlagNotifyActivity) != 0)) {
            mpClientInterface->onDynamicPolicyMixStateUpdate(inputDesc->mPolicyMix->mRegistrationId,
            mpClientInterface->onDynamicPolicyMixStateUpdate(inputDesc->mPolicyMix->mDeviceAddress,
                    MIX_STATE_MIXING);
        }

@@ -1951,7 +1958,7 @@ status_t AudioPolicyManagerCustom::startInput(audio_io_handle_t input,
            if (inputDesc->mPolicyMix == NULL) {
                address = String8("0");
            } else if (inputDesc->mPolicyMix->mMixType == MIX_TYPE_PLAYERS) {
                address = inputDesc->mPolicyMix->mRegistrationId;
                address = inputDesc->mPolicyMix->mDeviceAddress;
            }
            if (address != "") {
                setDeviceConnectionStateInt(AUDIO_DEVICE_OUT_REMOTE_SUBMIX,