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
Loading
Please register or sign in to comment