summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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;