gta4xl-common: add support for new hardware revisions
* From P610XXU2DUJ1
* Rev 8 and 9
Change-Id: Iae4f884e8b79731827f64798fa2983b744d1ad3f
diff --git a/configs/init/init.exynos9611.rc b/configs/init/init.exynos9611.rc
index 3ee4349..15dc7cf 100644
--- a/configs/init/init.exynos9611.rc
+++ b/configs/init/init.exynos9611.rc
@@ -806,6 +806,44 @@
chown system radio /sys/class/audio/earjack/state
chown system radio /sys/class/audio/earjack/mic_adc
+# Cirrus Amp Calibration and Factory test
+ chown system audio /sys/class/cirrus/cirrus_cal/status
+ chown system audio /sys/class/cirrus/cirrus_cal/rdc
+ chown system audio /sys/class/cirrus/cirrus_cal/rdc_r
+ chown system audio /sys/class/cirrus/cirrus_cal/temp
+ chown system audio /sys/class/cirrus/cirrus_cal/temp_r
+ mkdir /efs/cirrus 0770 audioserver audio
+ chown audioserver audio /efs/cirrus/temp_cal
+ chown audioserver audio /efs/cirrus/rdc_cal
+ chown audioserver audio /efs/cirrus/rdc_cal_r
+ chmod 0660 /efs/cirrus/temp_cal
+ chmod 0660 /efs/cirrus/rdc_cal
+ chmod 0660 /efs/cirrus/rdc_cal_r
+ chown system audio /sys/class/cirrus/cirrus_cal/v_status
+ chown system audio /sys/class/cirrus/cirrus_cal/v_validation
+ chown system audio /sys/class/cirrus/cirrus_cal/v_validation_r
+
+# Cirrus Amp power
+ chown system audio /sys/class/cirrus/cirrus_pwr/status
+ chown system audio /sys/class/cirrus/cirrus_pwr/value
+ chown system audio /sys/class/cirrus/cirrus_pwr/value_r
+ chown system audio /sys/class/cirrus/cirrus_pwr/spk_t
+ chown system audio /sys/class/cirrus/cirrus_pwr/spk_t_r
+ chown system audio /sys/class/cirrus/cirrus_pwr/env_temp
+ chown system audio /sys/class/cirrus/cirrus_pwr/env_temp_r
+
+# Cirrus Amp Bigdata
+ chown system audio /sys/class/cirrus/cirrus_bd/max_exc_left
+ chown system audio /sys/class/cirrus/cirrus_bd/max_exc_right
+ chown system audio /sys/class/cirrus/cirrus_bd/max_temp_left
+ chown system audio /sys/class/cirrus/cirrus_bd/max_temp_right
+ chown system audio /sys/class/cirrus/cirrus_bd/max_temp_keep_left
+ chown system audio /sys/class/cirrus/cirrus_bd/max_temp_keep_right
+ chown system audio /sys/class/cirrus/cirrus_bd/over_exc_count_left
+ chown system audio /sys/class/cirrus/cirrus_bd/over_exc_count_right
+ chown system audio /sys/class/cirrus/cirrus_bd/over_temp_count_left
+ chown system audio /sys/class/cirrus/cirrus_bd/over_temp_count_right
+
chmod 0660 /sys/kernel/debug/audio/log
chown audioserver system /sys/kernel/debug/audio/log
chmod 0660 /sys/kernel/debug/audio/log_enable
diff --git a/configs/kernel/gta4xl.cfg b/configs/kernel/gta4xl.cfg
index cfc80dc..5c98e2a 100644
--- a/configs/kernel/gta4xl.cfg
+++ b/configs/kernel/gta4xl.cfg
@@ -12,4 +12,12 @@
exynos9611-gta4xl_eur_open_05.dtbo
custom0=0x07000000
+ custom1=0x07000000
+
+exynos9611-gta4xl_eur_open_08.dtbo
+ custom0=0x08000000
+ custom1=0x08000000
+
+exynos9611-gta4xl_eur_open_09.dtbo
+ custom0=0x09000000
custom1=0xff000000
diff --git a/configs/kernel/gta4xlwifi.cfg b/configs/kernel/gta4xlwifi.cfg
index 27b897a..25b93de 100644
--- a/configs/kernel/gta4xlwifi.cfg
+++ b/configs/kernel/gta4xlwifi.cfg
@@ -8,4 +8,12 @@
exynos9611-gta4xlwifi_eur_open_05.dtbo
custom0=0x07000000
+ custom1=0x07000000
+
+exynos9611-gta4xlwifi_eur_open_08.dtbo
+ custom0=0x08000000
+ custom1=0x08000000
+
+exynos9611-gta4xlwifi_eur_open_09.dtbo
+ custom0=0x09000000
custom1=0xff000000
diff --git a/proprietary-files.txt b/proprietary-files.txt
index e2a089d..4e85fd2 100644
--- a/proprietary-files.txt
+++ b/proprietary-files.txt
@@ -3,7 +3,9 @@
## Audio
vendor/etc/default_volume_tables.xml
vendor/etc/dolby/dax-default.xml
+vendor/etc/mixer_gains_cs47l15.xml
vendor/etc/mixer_paths.xml
+vendor/etc/mixer_paths_cs47l15.xml
vendor/etc/usb_audio_policy_configuration.xml
vendor/lib/hw/sound_trigger.primary.universal9611.so
vendor/lib/vndk/libtinyalsa.so
diff --git a/sepolicy/vendor/file.te b/sepolicy/vendor/file.te
index e32cd26..d51329c 100644
--- a/sepolicy/vendor/file.te
+++ b/sepolicy/vendor/file.te
@@ -25,6 +25,7 @@
type proc_swappiness, fs_type, proc_type;
# sysfs types
+type sysfs_audio, sysfs_type, r_fs_type, fs_type;
type sysfs_camera, sysfs_type, r_fs_type, fs_type;
type sysfs_camera_writable, sysfs_type, rw_fs_type, fs_type;
type sysfs_chipid, sysfs_type, r_fs_type, fs_type;
diff --git a/sepolicy/vendor/genfs_contexts b/sepolicy/vendor/genfs_contexts
index 534f788..8000ff8 100644
--- a/sepolicy/vendor/genfs_contexts
+++ b/sepolicy/vendor/genfs_contexts
@@ -28,5 +28,8 @@
genfscon sysfs /devices/platform/11a10000.speedy/i2c-12/12-0000/s2mpu09-rtc/rtc/rtc0/hctosys u:object_r:sysfs_rtc:s0
genfscon sysfs /devices/system/chip-id/revision u:object_r:sysfs_chipid:s0
+# Firmware
+genfscon sysfs /firmware/devicetree/base/sound/mixer-paths u:object_r:sysfs_audio:s0
+
# Module
genfscon sysfs /module/scsc_bt/parameters/bluetooth_address u:object_r:sysfs_bt_writable:s0
diff --git a/sepolicy/vendor/hal_audio_default.te b/sepolicy/vendor/hal_audio_default.te
index fa86517..dd24a4c 100644
--- a/sepolicy/vendor/hal_audio_default.te
+++ b/sepolicy/vendor/hal_audio_default.te
@@ -5,3 +5,5 @@
r_dir_file(hal_audio_default, sec_efs_file);
get_prop(hal_audio_default, vendor_radio_prop);
+
+allow hal_audio_default sysfs_audio:file r_file_perms;