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

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

audioflinger: only hold wakeLock when started

The AAudio MMAP streams used to hold a wakeLock from
the time they were opened until closed.
Now it is acquired when the first stream is started
and released when the first stream is stopped.

This was tested by creating shared streams using
OboeTester and write_sine_callback and input_monitor_callback and
then adding lots of logs to see when the
wakeLock was acquired and released.

Note that ~ThreadBase() calls releaseWakeLock_l() so ~MmapThread()
does not need to.

Bug: 167345722
Test: Launch OboeTester
Test: Tap TEST OUTPUT
Test: Tap OPEN
Test: Enter: adb shell dumpsys power
Test: See no MmapPlayback wakelock
Test: Tap START
Test: Enter: adb shell dumpsys power
Test: See "ACQ MmapPlayback"
Test: Tap STOP
Test: Enter: adb shell dumpsys power
Test: See "REL MmapPlayback"

Test: atest AAudioTests
Change-Id: Iad87f5ebd22f20c89699e8b1a75d8df482046360
parent 2f0bf51f
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