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

Skip to content
Commit 296a0ec7 authored by Eric Laurent's avatar Eric Laurent
Browse files

Fix issue 2118464: cannot play ring tones and notifications after...

Fix issue 2118464: cannot play ring tones and notifications after disconnecting BT headset while in call.

The problem comes from the fact that when the duplicated output is closed after BT headset disconnection, the OUTPUT_CLOSED notification is not sent to AudioSystem. Then the mapping between notification stream and duplicated output cached in AudioSystem is not cleared and next time a notification is played, the duplicated output is selected and the createTrack() request is refused by AudioFlinger as the selected output doesn't exist.
The notification is ignored by AudioFlinger because when it is sent by the terminating playback thread, the thread has already been removed from the playback thread list.

The fix consists in sending the notification in closeOutput() and not when exiting the playback thread.
The same fix is applied to record threads.
parent 54c06152
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