summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAmit Pundir <amit.pundir@linaro.org>2018-04-24 13:43:36 +0530
committerAmit Pundir <amit.pundir@linaro.org>2018-04-25 01:19:32 +0530
commit6c82e1548afde519e57fb7be18526f95f84587cd (patch)
treeedd34ca8f03d97cb0b7ff4281fa7e7b7acd4049c
parented07b91a71888ec25d8f2d28712745d6df5f28ba (diff)
downloaddragonboard410c-6c82e1548afde519e57fb7be18526f95f84587cd.tar.gz
db820c: Build Audio HAL and configure HDMI out mixer
Build audio.primary.db820c Audio HAL and run tinymix command as a oneshot service on boot to enable HDMI out mixer control. Also take care of tinymix selinux denials. Change-Id: I5e43d4d4a855208d3f0b07f9a22c00937c837ad8 Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
-rw-r--r--db820c/device.mk5
-rw-r--r--db820c/tinymix.db820c.rc5
-rw-r--r--sepolicy/file_contexts2
-rw-r--r--sepolicy/tinymix.te7
4 files changed, 19 insertions, 0 deletions
diff --git a/db820c/device.mk b/db820c/device.mk
index 15311ab..059ecee 100644
--- a/db820c/device.mk
+++ b/db820c/device.mk
@@ -22,4 +22,9 @@ PRODUCT_COPY_FILES := \
device/linaro/dragonboard/ueventd.common.rc:root/ueventd.db820c.rc \
device/linaro/dragonboard/common.kl:system/usr/keylayout/db820c.kl
+# Build generic Audio HAL
+PRODUCT_PACKAGES += audio.primary.db820c
+PRODUCT_COPY_FILES += \
+ $(LOCAL_PATH)/tinymix.db820c.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/tinymix.db820c.rc
+
$(call inherit-product, $(LOCAL_PATH)/firmware/device.mk)
diff --git a/db820c/tinymix.db820c.rc b/db820c/tinymix.db820c.rc
new file mode 100644
index 0000000..7831005
--- /dev/null
+++ b/db820c/tinymix.db820c.rc
@@ -0,0 +1,5 @@
+service tinymixer /system/bin/tinymix 0 1
+ class core
+ user shell
+ group audio
+ oneshot
diff --git a/sepolicy/file_contexts b/sepolicy/file_contexts
index 688de5f..584ec25 100644
--- a/sepolicy/file_contexts
+++ b/sepolicy/file_contexts
@@ -6,3 +6,5 @@
/dev/dri/card0 u:object_r:gpu_device:s0
/dev/dri/renderD128 u:object_r:gpu_device:s0
+
+/system/bin/tinymix u:object_r:tinymix_exec:s0
diff --git a/sepolicy/tinymix.te b/sepolicy/tinymix.te
new file mode 100644
index 0000000..6e7ef54
--- /dev/null
+++ b/sepolicy/tinymix.te
@@ -0,0 +1,7 @@
+type tinymix, domain;
+type tinymix_exec, exec_type, file_type;
+
+init_daemon_domain(tinymix)
+
+allow tinymix audio_device:chr_file { ioctl open read write };
+allow tinymix audio_device:dir search;