Ravi Kumar Siddojigari | 54a727d | 2016-05-26 19:02:15 +0530 | [diff] [blame] | 1 | #copyright (c) 2016, The Linux Foundation. All rights reserved. |
| 2 | # |
| 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 Jie | 269e947 | 2016-09-19 10:39:58 +0800 | [diff] [blame] | 27 | # |
| 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. |
Ravi Kumar Siddojigari | 54a727d | 2016-05-26 19:02:15 +0530 | [diff] [blame] | 51 | |
| 52 | #mediacodec need intraction with audio device nodes |
| 53 | allow mediacodec audio_device:chr_file rw_file_perms; |
| 54 | |
Kim Zhang | 11c7895 | 2016-06-03 12:26:59 +0800 | [diff] [blame] | 55 | #allow mediacodec to access adsprpcd |
| 56 | r_dir_file(mediacodec, adsprpcd_file); |
Li Sun | 78bd98c | 2017-07-11 18:19:33 +0800 | [diff] [blame] | 57 | r_dir_file(mediacodec, firmware_file); |
Deepak Kushwah | 8129431 | 2016-07-13 14:47:53 +0530 | [diff] [blame] | 58 | |
| 59 | #Allow mediacodec to access proc_net files |
| 60 | allow mediacodec proc_net:file r_file_perms; |
| 61 | |
Kim Zhang | 11c7895 | 2016-06-03 12:26:59 +0800 | [diff] [blame] | 62 | allow mediacodec system_file:dir r_dir_perms; |
| 63 | allow mediacodec qdsp_device:chr_file r_file_perms; |
Deepak Kushwah | 8129431 | 2016-07-13 14:47:53 +0530 | [diff] [blame] | 64 | |
Deepak Kushwah | f9d0b75 | 2017-07-26 15:14:12 +0530 | [diff] [blame] | 65 | #Allow mediacodec to access service manager wfdnativemm_service |
| 66 | allow mediacodec wfdnativemm_service:service_manager find; |
| 67 | hal_client_domain(mediacodec, wifidisplayhalservice) |
| 68 | |
Uma Mehta | 777d1e2 | 2017-08-17 10:17:59 +0530 | [diff] [blame] | 69 | allow mediacodec media_data_file:dir create_dir_perms; |
| 70 | allow mediacodec media_data_file:file create_file_perms; |
| 71 | |
Gao Jie | 269e947 | 2016-09-19 10:39:58 +0800 | [diff] [blame] | 72 | # DOLBY_START |
Ravi Kumar Siddojigari | c7def12 | 2017-06-13 00:49:19 +0530 | [diff] [blame] | 73 | #allow mediacodec audioserver_service:service_manager find; |
Gao Jie | 269e947 | 2016-09-19 10:39:58 +0800 | [diff] [blame] | 74 | set_prop(mediacodec, dolby_prop) |
| 75 | # DOLBY_END |
Biswajit Paul | f63bd14 | 2017-03-16 16:41:02 -0700 | [diff] [blame] | 76 | allow mediacodec debug_gralloc_prop:file r_file_perms; |
Vara Prasad A V S G | 705979d | 2017-04-21 13:28:58 +0530 | [diff] [blame] | 77 | vndbinder_use(mediacodec); |
Li Sun | 2578ed8 | 2017-06-13 10:50:27 +0800 | [diff] [blame] | 78 | hwbinder_use(mediacodec); |
| 79 | hal_client_domain(mediacodec, hal_vpp) |
Deepak Kushwah | a3a2914 | 2017-08-11 14:56:31 +0530 | [diff] [blame] | 80 | hal_client_domain(mediacodec, hal_perf) |