hal: Replace direct pid writes with setting task profiles for audio interfaces

For easy transition from SchedTune to UtilClamp, direct access to these
cgroups should be abstracted by using task profiles. Replace writepid
commands with new task_profiles command.

Bug: 155419956
Test: change .rc file and confirm task profile is applied
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Change-Id: Ide373c283359cf4b73af4cb0813d8c0306942595
diff --git a/hal/android.hardware.audio.service.rc b/hal/android.hardware.audio.service.rc
index e52f55f..e420dcf 100644
--- a/hal/android.hardware.audio.service.rc
+++ b/hal/android.hardware.audio.service.rc
@@ -38,7 +38,7 @@
     group audio camera drmrpc inet media mediadrm net_bt net_bt_admin net_bw_acct oem_2901 wakelock oem_2912
     capabilities BLOCK_SUSPEND SYS_NICE
     ioprio rt 4
-    writepid /dev/cpuset/foreground/tasks /dev/stune/foreground/tasks
+    task_profiles ProcessCapacityHigh HighPerformance
     onrestart restart audioserver
 
 # SSR trigger for audio subsystem
diff --git a/hal/android.hardware.audio.service_64.rc b/hal/android.hardware.audio.service_64.rc
index 47f8627..bc3818f 100644
--- a/hal/android.hardware.audio.service_64.rc
+++ b/hal/android.hardware.audio.service_64.rc
@@ -37,7 +37,7 @@
     group audio camera drmrpc inet media mediadrm net_bt net_bt_admin net_bw_acct oem_2901 wakelock oem_2912
     capabilities BLOCK_SUSPEND SYS_NICE
     ioprio rt 4
-    writepid /dev/cpuset/foreground/tasks /dev/stune/foreground/tasks
+    task_profiles ProcessCapacityHigh HighPerformance
     onrestart restart audioserver
 
 # SSR trigger for audio subsystem