| userdebug_or_eng(` |
| allow hal_audio diag_device:chr_file rw_file_perms; |
| ') |
| |
| # access for speaker calibration file |
| allow hal_audio persist_file:dir search; |
| allow hal_audio persist_audio_file:dir search; |
| allow hal_audio persist_audio_file:file r_file_perms; |
| |
| # allow communication w/perfd |
| allow hal_audio perfd_data_file:dir search; |
| allow hal_audio perfd_data_file:sock_file write; |
| allow hal_audio perfd:unix_dgram_socket sendto; |
| allow hal_audio perfd:unix_stream_socket connectto; |
| |
| # allow reading /sys/devices/soc0/hw_platform for acdb |
| allow hal_audio sysfs:file { getattr open read }; |