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

Commit 7dce7281 authored by Phil Burk's avatar Phil Burk
Browse files

audioflinger: do not call onTearDown() in threadLoop_exit()

This is just for MmapThread.
This change will prevent a recursive mutex lock when the teardown calls
stop() on the stream.

Bug: 66971139
Test: unplug headphones with aaudio-echo, see bugreport
Change-Id: I904a8e575bbc5ae8b03350c061dd23cba62783f0
parent 01fc3aee
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -8148,10 +8148,8 @@ void AudioFlinger::MmapThread::threadLoop_standby()

void AudioFlinger::MmapThread::threadLoop_exit()
{
    sp<MmapStreamCallback> callback = mCallback.promote();
    if (callback != 0) {
        callback->onTearDown();
    }
    // Do not call callback->onTearDown() because it is redundant for thread exit
    // and because it can cause a recursive mutex lock on stop().
}

status_t AudioFlinger::MmapThread::setSyncEvent(const sp<SyncEvent>& event __unused)