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

Skip to content
Commit fba97d88 authored by Mikhail Naganov's avatar Mikhail Naganov
Browse files

libaudiohal@aidl: Resolve async callbacks concurrency

While the I/O thread is receiving a reply from sending of
a 'burst' or 'drain' command, the HAL can already invoke
an asynchronous notification. This makes possible to read
the current stream state from the last reply in the notification
handler before it was updated by 'sendCommand' on the I/O thread.

The asynchronous handler needs to "wait" before 'sendCommand'
finished. This is achieved by taking the lock which protects
access to command and reply queues, as 'sendCommand' only
releases when the command handling is done and the last reply
was updated.

Bug: 363958142
Test: atest CtsMediaAudioTestCases
Change-Id: I4d4d94ffc7f093b6716d291a8f705376f079965b
parent 92949994
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment