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

Commit 4d9eec5c authored by Eric Laurent's avatar Eric Laurent Committed by android-build-merger
Browse files

Merge "Revert "Revert "Audio effects: define interface between EffectModule and audio framework"""

am: 8335501a

Change-Id: I9e9cde7642f1f1886e43a65df88f1b3e35a5e701
parents 9d90cde3 8335501a
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -2971,7 +2971,7 @@ std::vector<sp<AudioFlinger::EffectModule>> AudioFlinger::purgeStaleEffects_l()
    for (size_t i = 0; i < chains.size(); i++) {
        sp<EffectChain> ec = chains[i];
        int sessionid = ec->sessionId();
        sp<ThreadBase> t = ec->mThread.promote();
        sp<ThreadBase> t = ec->thread().promote();
        if (t == 0) {
            continue;
        }
@@ -2994,7 +2994,7 @@ std::vector<sp<AudioFlinger::EffectModule>> AudioFlinger::purgeStaleEffects_l()
                effect->unPin();
                t->removeEffect_l(effect, /*release*/ true);
                if (effect->purgeHandles()) {
                    t->checkSuspendOnEffectEnabled_l(effect, false, effect->sessionId());
                    effect->checkSuspendOnEffectEnabled(false, true /*threadLocked*/);
                }
                removedEffects.push_back(effect);
            }
@@ -3617,7 +3617,7 @@ status_t AudioFlinger::moveEffectChain_l(audio_session_t sessionId,
        // if the move request is not received from audio policy manager, the effect must be
        // re-registered with the new strategy and output
        if (dstChain == 0) {
            dstChain = effect->chain().promote();
            dstChain = effect->callback()->chain().promote();
            if (dstChain == 0) {
                ALOGW("moveEffectChain_l() cannot get chain from effect %p", effect.get());
                status = NO_INIT;
@@ -3667,7 +3667,7 @@ status_t AudioFlinger::moveAuxEffectToIo(int EffectId,
            goto Exit;
        }

        dstChain = effect->chain().promote();
        dstChain = effect->callback()->chain().promote();
        if (dstChain == 0) {
            thread->addEffect_l(effect);
            status = INVALID_OPERATION;