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

Commit 8fcf2fa7 authored by Shunkai Yao's avatar Shunkai Yao Committed by Android (Google) Code Review
Browse files

Merge changes I90406c48,I1389b6ce into main

* changes:
  Add thread safe annotation in audio flinger effects
  EffectChain setVolume with EffectChainmutex held
parents 74af8589 d125e40c
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -4483,7 +4483,7 @@ status_t AudioFlinger::moveEffectChain_ll(audio_session_t sessionId,
            if (effect->state() == IAfEffectModule::ACTIVE ||
                    effect->state() == IAfEffectModule::STOPPING) {
                ++started;
                effect->start();
                effect->start_l();
            }
        }
        dstChain->mutex().unlock();
@@ -4586,7 +4586,7 @@ Exit:
        // removeEffect_l() has stopped the effect if it was active so it must be restarted
        if (effect->state() == IAfEffectModule::ACTIVE ||
            effect->state() == IAfEffectModule::STOPPING) {
            effect->start();
            effect->start_l();
        }
    }

+1 −1
Original line number Diff line number Diff line
@@ -143,7 +143,7 @@ sp<IAfEffectHandle> DeviceEffectManager::createEffect_l(
        if (lStatus == NO_ERROR) {
            lStatus = effect->addHandle(handle.get());
            if (lStatus == NO_ERROR) {
                lStatus = effect->init(patches);
                lStatus = effect->init_l(patches);
                if (lStatus == NAME_NOT_FOUND) {
                    lStatus = NO_ERROR;
                }
+1 −1
Original line number Diff line number Diff line
@@ -139,7 +139,7 @@ public:
    // check if effects should be suspended or restored when a given effect is enable or disabled
    void checkSuspendOnEffectEnabled(const sp<IAfEffectBase>& effect __unused,
                          bool enabled __unused, bool threadLocked __unused) final {}
    void resetVolume() final {}
    void resetVolume_l() final REQUIRES(audio_utils::EffectChain_Mutex) {}
    product_strategy_t strategy() const final { return static_cast<product_strategy_t>(0); }
    int32_t activeTrackCnt() const final { return 0; }
    void onEffectEnable(const sp<IAfEffectBase>& effect __unused) final {}
+95 −98

File changed.

Preview size limit exceeded, changes collapsed.

+156 −121

File changed.

Preview size limit exceeded, changes collapsed.

Loading