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

Commit b6d489f4 authored by Andy Hung's avatar Andy Hung Committed by Gerrit Code Review
Browse files

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

parents e77867fc efea6c5b
Loading
Loading
Loading
Loading
+7 −3
Original line number Diff line number Diff line
@@ -4017,7 +4017,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) {
@@ -4042,8 +4048,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();