sm660-common: Create socket for /dev/socket/audio_hw_socket

Change-Id: If4c5b944efb8dde3093ccb7b8f1dca746a02e043
This commit is contained in:
PIPIPIG233666 2021-02-23 02:50:07 +02:00 committed by OdSazib
parent e865b037e8
commit 206f51bad0
No known key found for this signature in database
GPG key ID: B678DBD07079B021
5 changed files with 11 additions and 0 deletions

View file

@ -605,4 +605,5 @@ service vendor.audio-hal /vendor/bin/hw/android.hardware.audio.service
capabilities BLOCK_SUSPEND
ioprio rt 4
writepid /dev/cpuset/foreground/tasks /dev/stune/foreground/tasks
socket audio_hw_socket seqpacket 0666 system system
onrestart restart audioserver

View file

@ -13,6 +13,9 @@ type sysfs_fingerprint, sysfs_type, fs_type;
# Kcal
type kcal_dev, sysfs_type, fs_type;
# Sockets
type audio_socket, file_type;
# Touchscreen wake_gesture
type proc_dt2w, fs_type, proc_type;
type sysfs_tap_to_wake, sysfs_type, fs_type;

View file

@ -73,6 +73,9 @@
# Service HALs
/(vendor|system/vendor)/bin/hw/android\.hardware\.authsecret@1\.0-service u:object_r:hal_authsecret_default_exec:s0
# Sockets
/dev/socket/audio_hw_socket u:object_r:audio_socket:s0
# Tap to Wake
/sys/devices/soc/c177000.i2c/i2c-3/3-005d/enable_dt2w u:object_r:sysfs_tap_to_wake:s0
/sys/devices/soc/c177000.i2c/i2c-3/3-0038/enable_dt2w u:object_r:sysfs_tap_to_wake:s0

View file

@ -1,3 +1,4 @@
allow hal_audio_default audio_socket:sock_file rw_file_perms;
allow hal_audio_default diag_device:chr_file { read write };
allow hal_audio_default sysfs:dir r_dir_perms;
allow hal_audio_default sysfs_info:file { open getattr read };

View file

@ -2,3 +2,6 @@ allow hal_sensors_default diag_device:chr_file { read write };
allow hal_sensors_default sysfs:file { read open };
allow hal_sensors_default sysfs_info:file { read write };
set_prop(hal_sensors_default, camera_prop)
allow hal_sensors_default audio_socket:sock_file rw_file_perms;
unix_socket_connect(hal_sensors_default, audio, hal_audio_default)