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

Commit 808e7d16 authored by Eric Laurent's avatar Eric Laurent
Browse files

AudioFlinger: fix global effects suspend logic

Audio effects on the output mix should not be suspended when effects
on the output stage (post processing) are enabled.

Change-Id: I2e1c08fa9358ea3cbaec68856738d504b1be54e4
parent bb9d731b
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -1465,7 +1465,9 @@ void AudioFlinger::ThreadBase::checkSuspendOnEffectEnabled_l(const sp<EffectModu
        // suspend all effects in AUDIO_SESSION_OUTPUT_MIX when enabling any effect on
        // another session. This gives the priority to well behaved effect control panels
        // and applications not using global effects.
        if (sessionId != AUDIO_SESSION_OUTPUT_MIX) {
        // Enabling post processing in AUDIO_SESSION_OUTPUT_STAGE session does not affect
        // global effects
        if ((sessionId != AUDIO_SESSION_OUTPUT_MIX) && (sessionId != AUDIO_SESSION_OUTPUT_STAGE)) {
            setEffectSuspended_l(NULL, enabled, AUDIO_SESSION_OUTPUT_MIX);
        }
    }