François Gaffie | a56b5c2 | 2018-02-21 18:04:39 +0100 | [diff] [blame] | 1 | // Copyright (C) 2018 The Android Open Source Project |
| 2 | // |
| 3 | // Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | // you may not use this file except in compliance with the License. |
| 5 | // You may obtain a copy of the License at |
| 6 | // |
| 7 | // http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | // |
| 9 | // Unless required by applicable law or agreed to in writing, software |
| 10 | // distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | // See the License for the specific language governing permissions and |
| 13 | // limitations under the License. |
| 14 | |
Bob Badour | 948e6aa | 2021-02-12 21:02:31 -0800 | [diff] [blame] | 15 | package { |
Aditya Choudhary | b2eeb46 | 2024-01-31 11:07:15 +0000 | [diff] [blame] | 16 | default_team: "trendy_team_android_media_audio_framework", |
Bob Badour | 948e6aa | 2021-02-12 21:02:31 -0800 | [diff] [blame] | 17 | // See: http://go/android-license-faq |
| 18 | // A large-scale-change added 'default_applicable_licenses' to import |
| 19 | // all of the 'license_kinds' from "frameworks_av_license" |
| 20 | // to get the below license kinds: |
| 21 | // SPDX-license-identifier-Apache-2.0 |
| 22 | default_applicable_licenses: ["frameworks_av_license"], |
| 23 | } |
| 24 | |
Francois Gaffie | 5818b45 | 2019-08-27 16:30:04 +0200 | [diff] [blame] | 25 | //################################################################################################## |
| 26 | // Tools for audio policy engine criterion type configuration file |
| 27 | // |
Francois Gaffie | 7d602f0 | 2019-02-13 10:37:49 +0100 | [diff] [blame] | 28 | python_binary_host { |
Cole Faust | 97e9588 | 2022-09-01 17:13:49 -0700 | [diff] [blame] | 29 | name: "buildPolicyCriterionTypes", |
Francois Gaffie | 7d602f0 | 2019-02-13 10:37:49 +0100 | [diff] [blame] | 30 | main: "buildPolicyCriterionTypes.py", |
| 31 | srcs: [ |
| 32 | "buildPolicyCriterionTypes.py", |
| 33 | ], |
Francois Gaffie | 7d602f0 | 2019-02-13 10:37:49 +0100 | [diff] [blame] | 34 | } |
| 35 | |
Francois Gaffie | 5818b45 | 2019-08-27 16:30:04 +0200 | [diff] [blame] | 36 | genrule_defaults { |
| 37 | name: "buildpolicycriteriontypesrule", |
Cole Faust | 97e9588 | 2022-09-01 17:13:49 -0700 | [diff] [blame] | 38 | tools: ["buildPolicyCriterionTypes"], |
Francois Gaffie | 5818b45 | 2019-08-27 16:30:04 +0200 | [diff] [blame] | 39 | cmd: "cp $(locations :audio_policy_configuration_files) $(genDir)/. && " + |
Aditya Choudhary | b2eeb46 | 2024-01-31 11:07:15 +0000 | [diff] [blame] | 40 | "cp $(location :audio_policy_configuration_top_file) $(genDir)/audio_policy_configuration.xml && " + |
| 41 | "$(location buildPolicyCriterionTypes) " + |
| 42 | " --androidaudiobaseheader $(location :libaudio_system_audio_base) " + |
| 43 | " --androidaudiocommonbaseheader $(location :libaudio_system_audio_common_base) " + |
| 44 | "--audiopolicyconfigurationfile $(genDir)/audio_policy_configuration.xml " + |
| 45 | "--criteriontypes $(location :audio_policy_engine_criterion_types_template) " + |
| 46 | "--outputfile $(out)", |
Francois Gaffie | 5818b45 | 2019-08-27 16:30:04 +0200 | [diff] [blame] | 47 | srcs: [ |
| 48 | // The commented inputs must be provided to use this genrule_defaults |
| 49 | // @todo uncomment if 1428659 is merged":android_audio_base_header_file", |
| 50 | ":audio_policy_engine_criterion_types_template", |
Francois Gaffie | 958be0d | 2021-02-03 08:41:58 +0100 | [diff] [blame] | 51 | ":libaudio_system_audio_base", |
| 52 | ":libaudio_system_audio_common_base", |
Francois Gaffie | 5818b45 | 2019-08-27 16:30:04 +0200 | [diff] [blame] | 53 | // ":audio_policy_configuration_top_file", |
| 54 | // ":audio_policy_configuration_files", |
| 55 | ], |
| 56 | out: ["audio_policy_engine_criterion_types.xml"], |
| 57 | } |
| 58 | |
| 59 | //################################################################################################## |
| 60 | // Tools for audio policy engine parameter framework configurable domains |
| 61 | // |
Francois Gaffie | 7d602f0 | 2019-02-13 10:37:49 +0100 | [diff] [blame] | 62 | python_binary_host { |
Cole Faust | 97e9588 | 2022-09-01 17:13:49 -0700 | [diff] [blame] | 63 | name: "domainGeneratorPolicy", |
Francois Gaffie | 7d602f0 | 2019-02-13 10:37:49 +0100 | [diff] [blame] | 64 | main: "domainGeneratorPolicy.py", |
| 65 | srcs: [ |
| 66 | "domainGeneratorPolicy.py", |
| 67 | ], |
Francois Gaffie | 7d602f0 | 2019-02-13 10:37:49 +0100 | [diff] [blame] | 68 | libs: [ |
| 69 | "EddParser.py", |
| 70 | "hostConfig.py", |
| 71 | "PFWScriptGenerator.py", |
| 72 | ], |
| 73 | required: [ |
| 74 | "domainGeneratorConnector", |
| 75 | ], |
| 76 | } |
| 77 | |
Francois Gaffie | 5818b45 | 2019-08-27 16:30:04 +0200 | [diff] [blame] | 78 | genrule_defaults { |
| 79 | name: "domaingeneratorpolicyrule", |
| 80 | tools: [ |
Cole Faust | 97e9588 | 2022-09-01 17:13:49 -0700 | [diff] [blame] | 81 | "domainGeneratorPolicy", |
Francois Gaffie | 5818b45 | 2019-08-27 16:30:04 +0200 | [diff] [blame] | 82 | "domainGeneratorConnector", |
| 83 | ], |
| 84 | cmd: "mkdir -p $(genDir)/Structure/Policy && " + |
Aditya Choudhary | b2eeb46 | 2024-01-31 11:07:15 +0000 | [diff] [blame] | 85 | "cp $(locations :audio_policy_pfw_structure_files) $(genDir)/Structure/Policy && " + |
| 86 | "cp $(location :audio_policy_pfw_toplevel) $(genDir)/top_level && " + |
| 87 | "$(location domainGeneratorPolicy) " + |
| 88 | "--validate " + |
| 89 | "--domain-generator-tool $(location domainGeneratorConnector) " + |
| 90 | "--toplevel-config $(genDir)/top_level " + |
| 91 | "--criteria $(location :audio_policy_engine_criteria) " + |
| 92 | "--criteriontypes $(location :audio_policy_engine_criterion_types) " + |
| 93 | "--add-edds $(locations :edd_files) " + |
| 94 | "--schemas-dir external/parameter-framework/upstream/schemas " + |
| 95 | " > $(out)", |
Francois Gaffie | 5818b45 | 2019-08-27 16:30:04 +0200 | [diff] [blame] | 96 | srcs: [ |
| 97 | // The commented inputs must be provided to use this genrule_defaults |
| 98 | // ":audio_policy_pfw_toplevel", |
| 99 | // ":audio_policy_pfw_structure_files", |
| 100 | ":audio_policy_engine_criteria", |
| 101 | // ":audio_policy_engine_criterion_types", |
| 102 | // ":edd_files", |
Oscar Azucena | ecaf4b0 | 2023-10-30 21:03:33 -0700 | [diff] [blame] | 103 | ":parameter_frameworks_configuration_schemas", |
Francois Gaffie | 5818b45 | 2019-08-27 16:30:04 +0200 | [diff] [blame] | 104 | ], |
| 105 | out: ["PolicyConfigurableDomains.xml"], |
| 106 | } |
| 107 | |
| 108 | //################################################################################################## |
| 109 | // Tools for policy parameter-framework product strategies structure file generation |
| 110 | // |
Francois Gaffie | 7d602f0 | 2019-02-13 10:37:49 +0100 | [diff] [blame] | 111 | python_binary_host { |
Cole Faust | 97e9588 | 2022-09-01 17:13:49 -0700 | [diff] [blame] | 112 | name: "buildStrategiesStructureFile", |
Francois Gaffie | 7d602f0 | 2019-02-13 10:37:49 +0100 | [diff] [blame] | 113 | main: "buildStrategiesStructureFile.py", |
| 114 | srcs: [ |
| 115 | "buildStrategiesStructureFile.py", |
| 116 | ], |
Francois Gaffie | 7d602f0 | 2019-02-13 10:37:49 +0100 | [diff] [blame] | 117 | } |
Francois Gaffie | 5818b45 | 2019-08-27 16:30:04 +0200 | [diff] [blame] | 118 | |
| 119 | genrule_defaults { |
| 120 | name: "buildstrategiesstructurerule", |
Cole Faust | 97e9588 | 2022-09-01 17:13:49 -0700 | [diff] [blame] | 121 | tools: ["buildStrategiesStructureFile"], |
Aditya Choudhary | b2eeb46 | 2024-01-31 11:07:15 +0000 | [diff] [blame] | 122 | cmd: "cp $(locations :audio_policy_engine_configuration_files) $(genDir) && ls -l $(genDir) &&" + |
| 123 | "$(location buildStrategiesStructureFile) " + |
| 124 | "--audiopolicyengineconfigurationfile $(genDir)/audio_policy_engine_configuration.xml " + |
| 125 | "--productstrategiesstructurefile $(location :product_strategies_structure_template) " + |
| 126 | "--outputfile $(out)", |
Francois Gaffie | 5818b45 | 2019-08-27 16:30:04 +0200 | [diff] [blame] | 127 | srcs: [ |
| 128 | // The commented inputs must be provided to use this genrule_defaults |
| 129 | // ":audio_policy_engine_configuration_files", |
| 130 | ":product_strategies_structure_template", |
| 131 | ], |
| 132 | out: ["ProductStrategies.xml"], |
| 133 | } |
Francois Gaffie | 8b04892 | 2020-01-15 17:42:52 +0100 | [diff] [blame] | 134 | |
| 135 | //################################################################################################## |
| 136 | // Tools for policy parameter-framework common type structure file generation |
| 137 | // |
| 138 | python_binary_host { |
Cole Faust | 97e9588 | 2022-09-01 17:13:49 -0700 | [diff] [blame] | 139 | name: "buildCommonTypesStructureFile", |
Francois Gaffie | 8b04892 | 2020-01-15 17:42:52 +0100 | [diff] [blame] | 140 | main: "buildCommonTypesStructureFile.py", |
| 141 | srcs: [ |
| 142 | "buildCommonTypesStructureFile.py", |
| 143 | ], |
Francois Gaffie | 8b04892 | 2020-01-15 17:42:52 +0100 | [diff] [blame] | 144 | } |
| 145 | |
| 146 | genrule_defaults { |
| 147 | name: "buildcommontypesstructurerule", |
Cole Faust | 97e9588 | 2022-09-01 17:13:49 -0700 | [diff] [blame] | 148 | tools: ["buildCommonTypesStructureFile"], |
| 149 | cmd: "$(location buildCommonTypesStructureFile) " + |
Aditya Choudhary | b2eeb46 | 2024-01-31 11:07:15 +0000 | [diff] [blame] | 150 | "--androidaudiobaseheader $(location :libaudio_system_audio_base) " + |
| 151 | "--commontypesstructure $(location :common_types_structure_template) " + |
| 152 | "--outputfile $(out)", |
Francois Gaffie | 8b04892 | 2020-01-15 17:42:52 +0100 | [diff] [blame] | 153 | srcs: [ |
| 154 | ":common_types_structure_template", |
| 155 | ":libaudio_system_audio_base", |
| 156 | ], |
| 157 | out: ["PolicySubsystem-CommonTypes.xml"], |
| 158 | } |