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

Skip to content
Commit cffd50f6 authored by Phil Burk's avatar Phil Burk
Browse files

aaudio: handle shared disconnect before start

Unplugging or plugging in a headset while an AAudio stream
is open causes a DISCONNECT. If a disconnect occurs between
open and start on a shared MMAP stream then it leaves an orphan
MMAP port.

This resource leak can prevent MMAP from working until the
device is rebooted.

This was caused by the mMapStream getting deleted
and preventing stopClient() from working.

The fix involves using a mutex to protect mMapStream.

Also we check to see if the endpoint was disconnected
during startClient() and stop the client port if so.

Bug: 344011310
Test: see bug for repro steps
Change-Id: I7aadf1f2dbc7886deb2cb59faf72598614ad4258
parent c29fe7dd
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment