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

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

audio: Ensure proper priority and scheduler for service threads

Change audio worker threads priority to ..._URGENT_AUDIO to match
the coupled thread in the audio flinger.

Set SCHED_FIFO scheduler for FAST threads (also to match AF fast
mixer/capture threads). In order to enable that, grand SYS_NICE
capability to the HAL service process and provide "getTid"
function in the StreamWorker class. For testing, add a "FAST"
output to the "stub" module in the HAL configuration.

Bug: 286914845
Test: atest libaudioaidlcommon_test
Test: atest VtsHalAudioCoreTargetTest
Test: adb shell ps -A -T -o PID,TID,NI,PCY,PRI,RTPRIO,SCHED,CMD
      for the HAL service process during VTS test. For regular
      "reader"/"writer" threads should see 'NI 19, PRI 38',
      for FAST "writer" should see 'NI -19, PRI 43, RTPRIO 3, SCH 1'
Change-Id: Iab7e21ebc139ff11cf9b7f4a1645960db8dadd43
(cherry picked from commit 4bf6899c)
Merged-In: Iab7e21ebc139ff11cf9b7f4a1645960db8dadd43
parent 4f339476
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