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

Commit d72b7c01 authored by Eric Laurent's avatar Eric Laurent
Browse files

audioflinger: enable effects after registration if needed

This fixes a bug where effects were not properly reenabled after
being moved from one playback thread to another. The effect
is enabled but the audio policy manager sees it as disabled.

Bug: 11181933.
Change-Id: I19cac7acbaf61c546e667fd85ed7d4eda1c716d8
parent 15ad2470
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -2335,6 +2335,7 @@ status_t AudioFlinger::moveEffectChain_l(int sessionId,
                                        strategy,
                                        sessionId,
                                        effect->id());
            AudioSystem::setEffectEnabled(effect->id(), effect->isEnabled());
        }
        effect = chain->getEffectFromId_l(0);
    }
@@ -2349,6 +2350,7 @@ status_t AudioFlinger::moveEffectChain_l(int sessionId,
                                            strategy,
                                            sessionId,
                                            removed[i]->id());
                AudioSystem::setEffectEnabled(effect->id(), effect->isEnabled());
            }
        }
    }
+1 −0
Original line number Diff line number Diff line
@@ -829,6 +829,7 @@ status_t AudioFlinger::PlaybackThread::Track::attachAuxEffect(int EffectId)
                                        dstChain->strategy(),
                                        AUDIO_SESSION_OUTPUT_MIX,
                                        effect->id());
            AudioSystem::setEffectEnabled(effect->id(), effect->isEnabled());
        }
        status = playbackThread->attachAuxEffect(this, EffectId);
    }