PlaybackThread: Request real-time priority on ARC
MixerThread handles audio mixing and it implements PlaybackThread. 1. In ARC++, nice value of a thread will be divided by 2 so THREAD_PRIORITY_URGENT_AUDIO is not enough for PlaybackThread. 2. In our experiments, the threads density per core in ChromeOS are generally more than normal Android. The latency under using CFS scheduler with any priority is not enough for MixerThread to process audio data in time. We request the lowest real-time priority, SCHED_FIFO=1, for PlaybackThread in ARC++. This is to upstream ARC-only CL ag/24624964, by checking ro.boot.container and only requesting the real-time priority on ARC. For the context of the original CL, see ag/5604522. Bug: 301627581 Test: 1. Build this CL on main-arc-dev branch and flash to ARCVM 2. `ps -AT -eo rtprio,comm,name`, check AudioOut rtprio is 1 Change-Id: If9aece940fce31722a188a8629f3d167813d4205
Loading
Please register or sign in to comment