From 2f654fc1d6a580658ec5a53184bd9738ffdca60f Mon Sep 17 00:00:00 2001 From: Vishal Mahaveer Date: Tue, 20 Sep 2016 13:20:05 -0400 Subject: jacinto6evm: sepolicy: update pvr module_load permission Latest AOSP sepolicy places restriction on where the kernel module file can be loaded from [1]. Adapt pvr sepolicy to this change. There is a change needed in pvr um to move from init_module to finit_module. [1] https://android-review.googlesource.com/#/c/214021/3 Change-Id: I77c938e2772243c559e5e3e5edfc91f17db816d8 Signed-off-by: Vishal Mahaveer --- sepolicy/pvr.te | 1 + 1 file changed, 1 insertion(+) diff --git a/sepolicy/pvr.te b/sepolicy/pvr.te index fe4bf37..1e9cfa8 100644 --- a/sepolicy/pvr.te +++ b/sepolicy/pvr.te @@ -9,3 +9,4 @@ allow pvr gpu_device:chr_file rw_file_perms; # allow graphics driver initialization allow pvr self:capability sys_module; +allow pvr system_file:system module_load; -- cgit v1.2.3 From 2dd272de0f358ee20ee9076af4fd282b6bc48435 Mon Sep 17 00:00:00 2001 From: Vishal Mahaveer Date: Wed, 21 Sep 2016 12:15:55 -0400 Subject: jacinto6evm: sepolicy: add rules for cpuset script Fix below denials generated for the script we added to support both J6 and J6 Eco cpuset configuration. [ 5.956998] init: Warning! Service exec 1 (/system/bin/init.jacinto6evmboard.cpuset.sh) needs a SELinux domain defined; please fix! [ 5.978447] type=1400 audit(5.969:3): avc: denied { execute_no_trans } for pid=177 comm="init" path="/system/bin/init.jacinto6evmboard.cpuset.sh" dev="mmcblk0p10" ino=206 scontext=u:r:init:s0 tcontext=u:object_r:system_file:s0 Change-Id: I36c482e052fc60c9c2d82c7daceae604fcf242d5 Signed-off-by: Vishal Mahaveer --- sepolicy/file_contexts | 3 +++ sepolicy/init-cpuset-sh.te | 7 +++++++ 2 files changed, 10 insertions(+) create mode 100644 sepolicy/init-cpuset-sh.te diff --git a/sepolicy/file_contexts b/sepolicy/file_contexts index 666c7e1..6ac1f73 100644 --- a/sepolicy/file_contexts +++ b/sepolicy/file_contexts @@ -22,6 +22,9 @@ #Real Time Clock /dev/rtc0 u:object_r:rtc:s0 +#cpuset script +/system/bin/init.jacinto6evmboard.cpuset.sh u:object_r:init-cpuset-sh_exec:s0 + #Block devices /dev/block/platform/44000000.ocp/480b4000.mmc/by-name/system u:object_r:system_block_device:s0 /dev/block/platform/44000000.ocp/480b4000.mmc/by-name/recovery u:object_r:recovery_block_device:s0 diff --git a/sepolicy/init-cpuset-sh.te b/sepolicy/init-cpuset-sh.te new file mode 100644 index 0000000..4547c45 --- /dev/null +++ b/sepolicy/init-cpuset-sh.te @@ -0,0 +1,7 @@ +type init-cpuset-sh, domain; +type init-cpuset-sh_exec, exec_type, file_type; + +init_daemon_domain(init-cpuset-sh) + +allow init-cpuset-sh system_file:file execute_no_trans; +allow init-cpuset-sh shell_exec:file read; -- cgit v1.2.3 From a27c81343852a087d70d37ffb03f925a56f892d4 Mon Sep 17 00:00:00 2001 From: Vishal Mahaveer Date: Wed, 21 Sep 2016 14:28:08 -0400 Subject: jacinto6evm: update ramdisk offset Update ramdisk offset for loading bigger ramdisk images in single stage boot. Current offset is not suitable for booting recovery ramdisk in single stage boot. Change-Id: I0ee20c981b4b61aff1199b1d643a73d0c090528e Signed-off-by: Vishal Mahaveer --- BoardConfig.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BoardConfig.mk b/BoardConfig.mk index 05b588c..340887a 100644 --- a/BoardConfig.mk +++ b/BoardConfig.mk @@ -40,7 +40,7 @@ TARGET_NO_BOOTLOADER := true BOARD_KERNEL_BASE := 0x80000000 #BOARD_KERNEL_CMDLINE := console=ttyO2,115200n8 mem=1024M androidboot.console=ttyO2 androidboot.hardware=jacinto6evmboard vram=20M omapfb.vram=0:16M -BOARD_MKBOOTIMG_ARGS := --ramdisk_offset 0x01f00000 +BOARD_MKBOOTIMG_ARGS := --ramdisk_offset 0x03000000 TARGET_NO_RADIOIMAGE := true TARGET_BOARD_PLATFORM := jacinto6 -- cgit v1.2.3 From 44c140477cab74666ad3dd67c5908d16e3cb2a9a Mon Sep 17 00:00:00 2001 From: Misael Lopez Cruz Date: Mon, 23 Nov 2015 12:20:23 -0600 Subject: jacinto6evm: Set 'media' user for i2c devices The i2c devices are used by the radio and APPE user-space components, mainly to configure the analog codecs for DSP rendering and to configure radio tuners. The user/group is set to media:system in order to allow the APPE part to be started from the Audio HAL (which runs as the 'media' user). At the moment, not all i2c devices are accessed by the 'media' user but having them all accessible by media user provides more flexibility in case the analog codecs are moved to different i2c buses. Change-Id: If920c0861157863c43dbb59cbba9b1997a2ce00a Signed-off-by: Misael Lopez Cruz --- ueventd.jacinto6evmboard.rc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ueventd.jacinto6evmboard.rc b/ueventd.jacinto6evmboard.rc index d30f01c..bf1cd0e 100644 --- a/ueventd.jacinto6evmboard.rc +++ b/ueventd.jacinto6evmboard.rc @@ -18,10 +18,10 @@ /dev/hci_tty 0666 bluetooth bluetooth # Radio Tuners -/dev/i2c-0 0660 system system -/dev/i2c-1 0660 system system -/dev/i2c-3 0660 system system -/dev/i2c-4 0660 system system +/dev/i2c-0 0660 media system +/dev/i2c-1 0660 media system +/dev/i2c-3 0660 media system +/dev/i2c-4 0660 media system # cmem /dev/cmem 0660 system system -- cgit v1.2.3 From c373d0bffa9cd6f9fe779d8ab67b4b6628663e84 Mon Sep 17 00:00:00 2001 From: Misael Lopez Cruz Date: Fri, 20 Nov 2015 15:59:36 -0600 Subject: jacinto6evm: Set permissions for IPC daemon and device files Add permissions and user/group for: * /dev/hwspinlock. It's used to lock/unlock specific hwspinlock instances through ioctls * /dev/uio0: It's is assumed to be user-space I/O driver for the SR0 shared region. * /dev/cmem The user/group is set to media:system as the main users for these IPC related devices will be audio (which runs as the 'media' user) and radio (which is assumed to be a system app that runs in the 'system' group). The LAD daemon user also needs to be changed to 'media' for the same reasons described above. Change-Id: Icde29fd022ec83bb0ecc3f4edb185189c4ab3d16 Signed-off-by: Misael Lopez Cruz --- init.jacinto6evmboard.rc | 6 +++--- ueventd.jacinto6evmboard.rc | 6 +++++- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/init.jacinto6evmboard.rc b/init.jacinto6evmboard.rc index 318d6f4..f79c1de 100644 --- a/init.jacinto6evmboard.rc +++ b/init.jacinto6evmboard.rc @@ -15,8 +15,8 @@ on post-fs-data setprop vold.post_fs_data_done 1 mkdir /data/misc/dhcp 0770 dhcp dhcp chown dhcp dhcp /data/misc/dhcp - mkdir /data/lad 0770 system system - mkdir /data/lad/LAD 0770 system system + mkdir /data/lad 0770 media system + mkdir /data/lad/LAD 0770 media system # enabling thermal zone for mpu write /sys/class/thermal/thermal_zone0/mode enabled @@ -138,7 +138,7 @@ service hostapd_bin /system/bin/hostapd -d /data/misc/wifi/hostapd.conf service lad_dra7xx /system/bin/logwrapper /system/bin/lad_dra7xx class main - user system + user media group system disabled oneshot diff --git a/ueventd.jacinto6evmboard.rc b/ueventd.jacinto6evmboard.rc index bf1cd0e..9ca382c 100644 --- a/ueventd.jacinto6evmboard.rc +++ b/ueventd.jacinto6evmboard.rc @@ -24,7 +24,11 @@ /dev/i2c-4 0660 media system # cmem -/dev/cmem 0660 system system +/dev/cmem 0660 media system + +# ipc +/dev/uio0 0660 media system +/dev/hwspinlock 0660 media system # for GNSS /dev/tigps 0666 root root -- cgit v1.2.3 From 14a8a1a0956762199423c4afd7a5d7192d441bb5 Mon Sep 17 00:00:00 2001 From: Misael Lopez Cruz Date: Thu, 17 Dec 2015 16:03:38 -0600 Subject: jacinto6evm: Start lad_dra7xx with GateMP Start the lad_dra7xx service with GateMP support. Change-Id: I194f8cf2b046eb3d8a08fd4366a0df693fc47ab8 Signed-off-by: Misael Lopez Cruz --- init.jacinto6evmboard.rc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/init.jacinto6evmboard.rc b/init.jacinto6evmboard.rc index f79c1de..a899811 100644 --- a/init.jacinto6evmboard.rc +++ b/init.jacinto6evmboard.rc @@ -136,11 +136,10 @@ service hostapd_bin /system/bin/hostapd -d /data/misc/wifi/hostapd.conf disabled oneshot -service lad_dra7xx /system/bin/logwrapper /system/bin/lad_dra7xx +service lad_dra7xx /system/bin/logwrapper /system/bin/lad_dra7xx -g class main user media group system - disabled oneshot service devproxy /system/bin/devproxy -- cgit v1.2.3 From ddffbdf338dad728edc393b160a3edadfefd3a9e Mon Sep 17 00:00:00 2001 From: Misael Lopez Cruz Date: Mon, 1 Aug 2016 16:52:52 -0500 Subject: jacinto6evm: Add the 'radio_app' service The radio_app service runs the VIS_SDK's RadioApp with ethernet interface. Change-Id: I47f7b9b29f02d88f2de21d5002fe84d4b407dfa0 Signed-off-by: Misael Lopez Cruz --- init.jacinto6evmboard.rc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/init.jacinto6evmboard.rc b/init.jacinto6evmboard.rc index a899811..00efc75 100644 --- a/init.jacinto6evmboard.rc +++ b/init.jacinto6evmboard.rc @@ -142,6 +142,13 @@ service lad_dra7xx /system/bin/logwrapper /system/bin/lad_dra7xx -g group system oneshot +service radio_app /system/bin/logwrapper /system/bin/RadioApp -h eth + class main + user media + group system inet + disabled + oneshot + service devproxy /system/bin/devproxy class main disabled -- cgit v1.2.3 From 798260c7692199dfad81835bed85b5d60c8de51a Mon Sep 17 00:00:00 2001 From: Misael Lopez Cruz Date: Mon, 1 Aug 2016 17:01:06 -0500 Subject: jacinto6evm: Set product files and packages for APPE based audio The APPE HAL and the previous primary HAL cannot coexist, so the APPE HAL must become the primary HAL when the APPE_AUDIO feature is enabled. Similarly, some product files are specific to APPE and replace those used by the previous primary and JAMR3 HALs. Change-Id: Ia11bdf721255ebd19e5fcd59aea02e3f5465387a Signed-off-by: Misael Lopez Cruz --- audio/Android.mk | 5 +++++ device.mk | 17 +++++++++++++++-- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/audio/Android.mk b/audio/Android.mk index 9e14b16..d73e0c1 100644 --- a/audio/Android.mk +++ b/audio/Android.mk @@ -13,4 +13,9 @@ # limitations under the License. LOCAL_PATH := $(call my-dir) + +ifeq ($(APPE_AUDIO),true) +include $(LOCAL_PATH)/hdmi/Android.mk +else include $(call all-makefiles-under,$(LOCAL_PATH)) +endif diff --git a/device.mk b/device.mk index 3ae4a48..2879ba0 100644 --- a/device.mk +++ b/device.mk @@ -14,6 +14,9 @@ # limitations under the License. # +# Audio Post Processing Engine (APPE) +APPE_AUDIO := false + ifeq ($(TARGET_PREBUILT_KERNEL),) LOCAL_KERNEL := device/ti/jacinto6evm/kernel else @@ -46,9 +49,16 @@ PRODUCT_COPY_FILES += \ frameworks/native/data/etc/android.hardware.camera.front.xml:system/etc/permissions/android.hardware.camera.front.xml \ # Audio +ifeq ($(APPE_AUDIO),true) +PRODUCT_COPY_FILES += \ + hardware/ti/radio/vis_sdk/packages/android/hal/mixer_paths.xml:system/etc/mixer_paths.xml +else PRODUCT_COPY_FILES += \ device/ti/jacinto6evm/audio/primary/mixer_paths.xml:system/etc/mixer_paths.xml \ - device/ti/jacinto6evm/audio/jamr3/jamr3_mixer_paths.xml:system/etc/jamr3_mixer_paths.xml \ + device/ti/jacinto6evm/audio/jamr3/jamr3_mixer_paths.xml:system/etc/jamr3_mixer_paths.xml +endif + +PRODUCT_COPY_FILES += \ device/ti/jacinto6evm/audio/audio_policy.conf:system/etc/audio_policy.conf # cpuset configuration @@ -103,12 +113,15 @@ PRODUCT_PACKAGES += \ # Audio HAL modules PRODUCT_PACKAGES += audio.primary.jacinto6 -PRODUCT_PACKAGES += audio.jamr3.jacinto6 PRODUCT_PACKAGES += audio.hdmi.jacinto6 # BlueDroid a2dp Audio HAL module PRODUCT_PACKAGES += audio.a2dp.default # Remote submix PRODUCT_PACKAGES += audio.r_submix.default +# JAMR3 Audio HAL module +ifneq ($(APPE_AUDIO),true) +PRODUCT_PACKAGES += audio.jamr3.jacinto6 +endif PRODUCT_PACKAGES += \ tinymix \ -- cgit v1.2.3 From 094200c1ed55f8a0c6211853f476d8c26605eb9b Mon Sep 17 00:00:00 2001 From: Vishal Mahaveer Date: Thu, 29 Sep 2016 08:51:53 -0500 Subject: jacinto6evm: media_codecs.xml: fix alignment value TI decoders can decode any stream which is aligned with 2x2. Change-Id: Ica0decd34849aa668653a854b87dfcded24a60cc Signed-off-by: Vishal Mahaveer --- media_codecs.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/media_codecs.xml b/media_codecs.xml index 6c34266..3482216 100644 --- a/media_codecs.xml +++ b/media_codecs.xml @@ -27,7 +27,7 @@ - + @@ -36,7 +36,7 @@ - + @@ -44,7 +44,7 @@ - + @@ -52,7 +52,7 @@ - + -- cgit v1.2.3 From 7ff266857576eb20257650632132c6b38f5f4f5a Mon Sep 17 00:00:00 2001 From: Vishal Mahaveer Date: Wed, 5 Oct 2016 17:26:06 -0400 Subject: jacinto6evm: remove extra hardware feature J6 EVM does not have a front camera, remove the corresponding hardware feature flag. Change-Id: I7cd833bf2573020bdccd4dad2cb238556f7d906a Signed-off-by: Vishal Mahaveer --- device.mk | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/device.mk b/device.mk index 2879ba0..051ea68 100644 --- a/device.mk +++ b/device.mk @@ -45,8 +45,7 @@ PRODUCT_COPY_FILES := \ # These are the hardware-specific features PRODUCT_COPY_FILES += \ - frameworks/native/data/etc/android.hardware.camera.xml:system/etc/permissions/android.hardware.camera.xml \ - frameworks/native/data/etc/android.hardware.camera.front.xml:system/etc/permissions/android.hardware.camera.front.xml \ + frameworks/native/data/etc/android.hardware.camera.xml:system/etc/permissions/android.hardware.camera.xml # Audio ifeq ($(APPE_AUDIO),true) -- cgit v1.2.3 From 378c8125950c2934a70a396425957fd903f24ce8 Mon Sep 17 00:00:00 2001 From: Gowtham Tammana Date: Wed, 5 Oct 2016 17:29:07 -0500 Subject: jacinto6evm: add vsync offsets Add vsync offsets for the sw vsync used by DispSync in the SurfaceFlinger framework. Initial offsets are based of on hammerhead device. Change-Id: I779e579c076409de9ea483a7449323df30743361 Signed-off-by: Gowtham Tammana --- BoardConfig.mk | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/BoardConfig.mk b/BoardConfig.mk index 340887a..5427908 100644 --- a/BoardConfig.mk +++ b/BoardConfig.mk @@ -79,3 +79,7 @@ BOARD_SEPOLICY_DIRS := device/ti/jacinto6evm/sepolicy # lidbrm driver BOARD_GPU_DRIVERS := omapdrm + +# DispSync vsync offsets in nanoseconds +VSYNC_EVENT_PHASE_OFFSET_NS := 7500000 +SF_VSYNC_EVENT_PHASE_OFFSET_NS := 5000000 -- cgit v1.2.3