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

Skip to content
Commit e2f8b60e authored by zhenjun.zhang's avatar zhenjun.zhang Committed by Andy Hung
Browse files

AudioTrack: Fix Java offload blocking in AudioTrack::write

With Java offload support, both the AudioTrack::write() and the
AudioTrackThread obtainBuffer/waitStreamEndDone can be blocked
on the AudioTrackShared Proxy futex.

Prior to the Java offload support, AudioTrack::write() was not
called simultaneous to the AudioTrackThread
obtainBuffer/waitStreamEndDone, thus only one thread was
blocked on the futex.

Solution: Change the FUTEX_WAKE to wake more than one thread

Test: invoke android.media.cts.AudioTrackOffloadTest#testMP3AudioTrackOffload
repeatly, check if the case may blocked in AudioTrack::write (syscall)
Bug: 209612569
Change-Id: I40d531863486f66e65c2bfe7d8e00156c804232d
parent fe5ce1bd
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