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

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

Merge "AudioFlinger: Protect initialization code in threadLoop with mutex" into main

parents 60d8264f 3f2cee61
Loading
Loading
Loading
Loading
+7 −3
Original line number Diff line number Diff line
@@ -4065,7 +4065,13 @@ NO_THREAD_SAFETY_ANALYSIS // manual locking of AudioFlinger
    // FIXME could this be made local to while loop?
    writeFrames = 0;

    {
        audio_utils::lock_guard l(mutex());

        cacheParameters_l();
        checkSilentMode_l();
    }

    mSleepTimeUs = mIdleSleepTimeUs;

    if (mType == MIXER || mType == SPATIALIZER) {
@@ -4090,8 +4096,6 @@ NO_THREAD_SAFETY_ANALYSIS // manual locking of AudioFlinger
    // suspended mode (for now) to help schedule the wait time until next iteration.
    nsecs_t timeLoopNextNs = 0;

    checkSilentMode_l();

    audio_patch_handle_t lastDownstreamPatchHandle = AUDIO_PATCH_HANDLE_NONE;

    sendCheckOutputStageEffectsEvent();