| # For interfacing with PowerHAL |
| hal_client_domain(hal_audio_default, hal_power); |
| |
| # For interfacing with ThermalHAL |
| hal_client_domain(hal_audio_default, hal_thermal); |
| |
| # For QCOM diag port access |
| userdebug_or_eng(` |
| allow hal_audio diag_device:chr_file rw_file_perms; |
| '); |
| |
| r_dir_file(hal_audio_default, sysfs_soc); |
| |
| # read-only permission to obtain the calibration data |
| r_dir_file(hal_audio_default, persist_audio_file); |
| allow hal_audio_default mnt_vendor_file:dir search; |
| allow hal_audio_default persist_file:lnk_file read; |
| allow hal_audio_default persist_file:dir search; |
| |
| allow hal_audio_default audio_vendor_data_file:dir rw_dir_perms; |
| allow hal_audio_default audio_vendor_data_file:file create_file_perms; |
| allow hal_audio_default debugfs_ipc:dir r_dir_perms; |
| |
| # Allow hal audio to use wakelock |
| wakelock_use(hal_audio_default) |
| |
| #Allow hal audio to use Binder IPC |
| vndbinder_use(hal_audio); |
| |
| # For audio properties |
| get_prop(hal_audio_default, vendor_audio_prop); |
| |
| # For audio hal to talk with rainbow sensor |
| allow hal_audio_default rls_device:chr_file rw_file_perms; |
| |
| # Allow audio HAL to communicate with CHRE daemon via socket |
| unix_socket_connect(hal_audio_default, chre, chre); |