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

Commit f4670a11 authored by Andy Hung's avatar Andy Hung Committed by Android (Google) Code Review
Browse files

Merge "SpatializerThread: Fix EffectHandle release lock order inversion" into main

parents 04d14c40 e251446d
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -7881,6 +7881,15 @@ NO_THREAD_SAFETY_ANALYSIS
    }
}

void SpatializerThread::threadLoop_exit()
{
    // The Spatializer EffectHandle must be released on the PlaybackThread
    // threadLoop() to prevent lock inversion in the SpatializerThread dtor.
    mFinalDownMixer.clear();

    PlaybackThread::threadLoop_exit();
}

// ----------------------------------------------------------------------------
//      Record
// ----------------------------------------------------------------------------
+2 −0
Original line number Diff line number Diff line
@@ -1900,6 +1900,8 @@ protected:
            REQUIRES(ThreadBase_ThreadLoop) EXCLUDES_ThreadBase_Mutex;
    void setHalLatencyMode_l() final REQUIRES(mutex());

    void threadLoop_exit() final REQUIRES(ThreadBase_ThreadLoop);

private:
            // Do not request a specific mode by default
            audio_latency_mode_t mRequestedLatencyMode = AUDIO_LATENCY_MODE_FREE;