audio HAL: SELinux changes for Spatial Audio optimization
Add CAP_SYS_NICE. Reduce glitches caused by core migration. Reduce power consumption as Spatializer Effect is DSP compute bound. Test: instrumented Test: adb shell 'uclampset -a -p $(pgrep -of android.hardware.audio.service)' Test: adb shell cat "/proc/$(adb shell pgrep -of android.hardware.audio.service)/status" Test: adb shell 'ps -Tl -p $(pgrep -of android.hardware.audio.service)' Bug: 181148259 Bug: 260918856 Bug: 261228892 Bug: 261686532 Bug: 262803152 Ignore-AOSP-First: tm-qpr-dev fix, will move to AOSP afterwards. Change-Id: Id5f052116834034a9e4fd5c3adf17d3d7ef6610a
This commit is contained in:
parent
3299216872
commit
2461bf39bd
4 changed files with 16 additions and 0 deletions
|
@ -347,6 +347,11 @@ audio.deep_buffer.media u:object_r:audio_config_prop:s0 exact bool
|
||||||
audio.offload.video u:object_r:audio_config_prop:s0 exact bool
|
audio.offload.video u:object_r:audio_config_prop:s0 exact bool
|
||||||
audio.offload.min.duration.secs u:object_r:audio_config_prop:s0 exact int
|
audio.offload.min.duration.secs u:object_r:audio_config_prop:s0 exact int
|
||||||
|
|
||||||
|
# spatializer tuning
|
||||||
|
audio.spatializer.priority u:object_r:audio_config_prop:s0 exact int
|
||||||
|
audio.spatializer.effect.affinity u:object_r:audio_config_prop:s0 exact int
|
||||||
|
audio.spatializer.effect.util_clamp_min u:object_r:audio_config_prop:s0 exact int
|
||||||
|
|
||||||
ro.audio.ignore_effects u:object_r:audio_config_prop:s0 exact bool
|
ro.audio.ignore_effects u:object_r:audio_config_prop:s0 exact bool
|
||||||
ro.audio.monitorRotation u:object_r:audio_config_prop:s0 exact bool
|
ro.audio.monitorRotation u:object_r:audio_config_prop:s0 exact bool
|
||||||
ro.audio.offload_wakelock u:object_r:audio_config_prop:s0 exact bool
|
ro.audio.offload_wakelock u:object_r:audio_config_prop:s0 exact bool
|
||||||
|
|
|
@ -23,6 +23,9 @@ allow hal_audio dumpstate:fifo_file write;
|
||||||
# Needed to allow sound trigger hal to access shared memory from apps.
|
# Needed to allow sound trigger hal to access shared memory from apps.
|
||||||
allow hal_audio_server appdomain:fd use;
|
allow hal_audio_server appdomain:fd use;
|
||||||
|
|
||||||
|
# allow self to set scheduler (and allows Binder RT PI)
|
||||||
|
allow hal_audio_server self:global_capability_class_set sys_nice;
|
||||||
|
|
||||||
# allow hal audio to use vnbinder
|
# allow hal audio to use vnbinder
|
||||||
vndbinder_use(hal_audio)
|
vndbinder_use(hal_audio)
|
||||||
|
|
||||||
|
|
|
@ -347,6 +347,11 @@ audio.deep_buffer.media u:object_r:audio_config_prop:s0 exact bool
|
||||||
audio.offload.video u:object_r:audio_config_prop:s0 exact bool
|
audio.offload.video u:object_r:audio_config_prop:s0 exact bool
|
||||||
audio.offload.min.duration.secs u:object_r:audio_config_prop:s0 exact int
|
audio.offload.min.duration.secs u:object_r:audio_config_prop:s0 exact int
|
||||||
|
|
||||||
|
# spatializer tuning
|
||||||
|
audio.spatializer.priority u:object_r:audio_config_prop:s0 exact int
|
||||||
|
audio.spatializer.effect.affinity u:object_r:audio_config_prop:s0 exact int
|
||||||
|
audio.spatializer.effect.util_clamp_min u:object_r:audio_config_prop:s0 exact int
|
||||||
|
|
||||||
ro.audio.ignore_effects u:object_r:audio_config_prop:s0 exact bool
|
ro.audio.ignore_effects u:object_r:audio_config_prop:s0 exact bool
|
||||||
ro.audio.monitorRotation u:object_r:audio_config_prop:s0 exact bool
|
ro.audio.monitorRotation u:object_r:audio_config_prop:s0 exact bool
|
||||||
ro.audio.offload_wakelock u:object_r:audio_config_prop:s0 exact bool
|
ro.audio.offload_wakelock u:object_r:audio_config_prop:s0 exact bool
|
||||||
|
|
|
@ -23,6 +23,9 @@ allow hal_audio dumpstate:fifo_file write;
|
||||||
# Needed to allow sound trigger hal to access shared memory from apps.
|
# Needed to allow sound trigger hal to access shared memory from apps.
|
||||||
allow hal_audio_server appdomain:fd use;
|
allow hal_audio_server appdomain:fd use;
|
||||||
|
|
||||||
|
# allow self to set scheduler (and allows Binder RT PI)
|
||||||
|
allow hal_audio_server self:global_capability_class_set sys_nice;
|
||||||
|
|
||||||
# allow hal audio to use vnbinder
|
# allow hal audio to use vnbinder
|
||||||
vndbinder_use(hal_audio)
|
vndbinder_use(hal_audio)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue