blob: 6367cbf65dbb86a2ef789ac5bc357fe69c29bd0a [file] [log] [blame]
Aalique Grahameba7af8c2017-12-06 20:52:21 -08001# Copyright (c) 2016-2017, The Linux Foundation. All rights reserved.
Sharad Sanglec2a6afd2016-06-30 17:17:38 +05302
3# Redistribution and use in source and binary forms, with or without
4# modification, are permitted provided that the following conditions are
5# met:
6# * Redistributions of source code must retain the above copyright
7# notice, this list of conditions and the following disclaimer.
8# * Redistributions in binary form must reproduce the above
9# copyright notice, this list of conditions and the following
10# disclaimer in the documentation and/or other materials provided
11# with the distribution.
12# * Neither the name of The Linux Foundation nor the names of its
13# contributors may be used to endorse or promote products derived
14# from this software without specific prior written permission.
15#
16# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
17# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
18# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
19# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
20# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
21# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
22# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
23# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
24# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
25# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
26# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Gao Jie269e9472016-09-19 10:39:58 +080027#
28# Copyright (c) 2015-2016 Dolby Laboratories, Inc. All rights reserved.
29#
30# Redistribution and use in source and binary forms, with or without
31# modification, are permitted provided that the following conditions are
32# met:
33# * Redistributions of source code must retain the above copyright
34# notice, this list of conditions and the following disclaimer.
35# * Redistributions in binary form must reproduce the above
36# copyright notice, this list of conditions and the following
37# disclaimer in the documentation and/or other materials provided
38# with the distribution.
39#
40# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
41# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
42# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
43# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
44# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
45# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
46# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
47# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
48# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
49# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
50# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Sharad Sanglec2a6afd2016-06-30 17:17:38 +053051
Karthik Reddy Kattaa0da1282016-07-25 11:02:14 +053052#debugfs access to audio
53userdebug_or_eng(`
Ravi Kumar Siddojigari92eed182017-06-27 00:25:03 +053054allow audioserver qti_debugfs:dir r_dir_perms;
55allow audioserver qti_debugfs:file rw_file_perms;
Karthik Reddy Kattaa0da1282016-07-25 11:02:14 +053056')
Biswajit Paul7adcb732016-08-05 17:39:55 -070057# Allow audioserver to create socket files for audio arbitration
58allow audioserver audio_data_file:sock_file { create setattr unlink };
59allow audioserver audio_data_file:dir remove_name;
Banajit Goswami5534b5a2016-08-31 11:56:59 -070060
Dhananjay Kumar28330e22017-05-25 13:18:05 +053061# Allow audioserver to read soundcard state under /proc/asound
62allow audioserver proc_audiod:file r_file_perms;
63
Rohit kumar35c14e12016-10-12 15:13:41 +053064# Allow audioserver to read sysfs dir and sysfs_thermal files for speaker protection
Aalique Grahameba7af8c2017-12-06 20:52:21 -080065allow audioserver sysfs_audio:dir r_dir_perms;
Rohit kumar35c14e12016-10-12 15:13:41 +053066allow audioserver sysfs_thermal:file r_file_perms;
67
Banajit Goswami5534b5a2016-08-31 11:56:59 -070068# Allow audioserver to access sysfs nodes
Aalique Grahameba7af8c2017-12-06 20:52:21 -080069allow audioserver sysfs_audio:file rw_file_perms;
Biswajit Paul277acbb2016-07-20 12:02:14 -070070userdebug_or_eng(`
71 diag_use(audioserver)
72')
Divya Narayanan Poojary3a8c3c22016-10-19 13:00:49 +053073
74#Rules for audioserver to talk to peripheral manager
Ravi Kumar Siddojigaric7def122017-06-13 00:49:19 +053075#use_per_mgr(audioserver);
Gao Jie269e9472016-09-19 10:39:58 +080076
77# DOLBY_START
78allow audioserver activity_service:service_manager find;
79set_prop(audioserver, dolby_prop)
80# DOLBY_END