From c869528f648581ac843aa9e2520260e5e2562948 Mon Sep 17 00:00:00 2001 From: Shane Chien Date: Sat, 18 Jan 2020 10:07:22 +0800 Subject: [PATCH] [ALPS03953773] Audio: Add permission for SmartPA calibration Add permission for SmartPA calibration in factory mode, otherwise it will encounter avc denied in SmartPA calibration test case. mtk_audiohal_data_file:dir { read search open } is merged to mtk_audiohal_data_file:dir create_dir_perms. MTK-Commit-Id: e26e9c0120f4907d966986cc50c4d964ae816c98 Change-Id: I38c25d06426afcc2f83b4ee646cba510dde71817 CR-Id: ALPS03953773 Feature: DSP SmartPA --- non_plat/factory.te | 8 +++++++- non_plat/kernel.te | 1 + 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/non_plat/factory.te b/non_plat/factory.te index f5ed4ee..399f655 100644 --- a/non_plat/factory.te +++ b/non_plat/factory.te @@ -323,7 +323,6 @@ allow factory sysfs_vibrator:dir search; # For Audio device permission allow factory proc_asound:dir { read search open }; allow factory proc_asound:file { read open getattr write }; -allow factory mtk_audiohal_data_file:dir { read search open }; allow factory audiohal_prop:property_service set; # For Accdet data permission @@ -362,3 +361,10 @@ allow factory vendor_data_file:file { create read write open }; # Purpose : Refine policy allow factory sysfs_mmcblk:dir { search }; allow factory sysfs_mmcblk:file { read getattr open }; + +# Date : WK18.37 +# Operation: P migration +# Purpose : ADSP SmartPA calibration +allow factory vendor_file:file execute_no_trans; +allow factory mtk_audiohal_data_file:dir create_dir_perms; +allow factory mtk_audiohal_data_file:file { write create unlink r_file_perms }; diff --git a/non_plat/kernel.te b/non_plat/kernel.te index 79bfdd4..0b33f40 100644 --- a/non_plat/kernel.te +++ b/non_plat/kernel.te @@ -76,6 +76,7 @@ allow kernel audioserver:fd use; # Operation: SQC # Purpose: Allow SCP SmartPA kthread to write debug dump to sdcard allow kernel mtk_hal_audio:fd use; +allow kernel factory:fd use; # Date : WK18.29 # Operation: SQC