diff options
author | Eric Laurent <elaurent@google.com> | 2021-12-23 15:39:36 +0100 |
---|---|---|
committer | Eric Laurent <elaurent@google.com> | 2021-12-23 15:39:36 +0100 |
commit | 6bb7dbea95f6ac0d37170a0469c69655fccd78a9 (patch) | |
tree | 4e6449ebc9941a1969e737038a44438a49f11a73 | |
parent | b64ea8e968ffb0b565e602c3a9e4eb132729efad (diff) | |
download | av-6bb7dbea95f6ac0d37170a0469c69655fccd78a9.tar.gz |
Audioflinger: fix effect output buffer access mode
When the output or input buffer of an effect is modified,
The buffer access mode must be re-evaluated and the effect reconfigured.
This was done in EffectChain::addEffect_l() but not in
EffectChain::removeEffect_l().
Bug: 209892305
Test: repro steps in bug
Change-Id: Iaa64df2a2083dc86358ebe5a58c8fc1083c82f7e
-rw-r--r-- | services/audioflinger/Effects.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/services/audioflinger/Effects.cpp b/services/audioflinger/Effects.cpp index 2e9ecb169c..8d04edb35d 100644 --- a/services/audioflinger/Effects.cpp +++ b/services/audioflinger/Effects.cpp @@ -2413,6 +2413,7 @@ size_t AudioFlinger::EffectChain::removeEffect_l(const sp<EffectModule>& effect, if (i == size - 1 && i != 0) { mEffects[i - 1]->configure(); mEffects[i - 1]->setOutBuffer(mOutBuffer); + mEffects[i - 1]->updateAccessMode(); // reconfig if neeeded. } } mEffects.removeAt(i); @@ -2422,6 +2423,7 @@ size_t AudioFlinger::EffectChain::removeEffect_l(const sp<EffectModule>& effect, if (i == 0 && size > 1) { mEffects[0]->configure(); mEffects[0]->setInBuffer(mInBuffer); + mEffects[0]->updateAccessMode(); // reconfig if neeeded. } ALOGV("removeEffect_l() effect %p, removed from chain %p at rank %zu", effect.get(), |