blob: 2f77372f56047315259c8e5879cc982fc464afac [file] [log] [blame]
François Gaffiea56b5c22018-02-21 18:04:39 +01001// 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 Badour948e6aa2021-02-12 21:02:31 -080015package {
Aditya Choudharyb2eeb462024-01-31 11:07:15 +000016 default_team: "trendy_team_android_media_audio_framework",
Bob Badour948e6aa2021-02-12 21:02:31 -080017 // 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 Gaffie5818b452019-08-27 16:30:04 +020025//##################################################################################################
26// Tools for audio policy engine criterion type configuration file
27//
Francois Gaffie7d602f02019-02-13 10:37:49 +010028python_binary_host {
Cole Faust97e95882022-09-01 17:13:49 -070029 name: "buildPolicyCriterionTypes",
Francois Gaffie7d602f02019-02-13 10:37:49 +010030 main: "buildPolicyCriterionTypes.py",
31 srcs: [
32 "buildPolicyCriterionTypes.py",
33 ],
Francois Gaffie7d602f02019-02-13 10:37:49 +010034}
35
Francois Gaffie5818b452019-08-27 16:30:04 +020036genrule_defaults {
37 name: "buildpolicycriteriontypesrule",
Cole Faust97e95882022-09-01 17:13:49 -070038 tools: ["buildPolicyCriterionTypes"],
Francois Gaffie5818b452019-08-27 16:30:04 +020039 cmd: "cp $(locations :audio_policy_configuration_files) $(genDir)/. && " +
Aditya Choudharyb2eeb462024-01-31 11:07:15 +000040 "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 Gaffie5818b452019-08-27 16:30:04 +020047 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 Gaffie958be0d2021-02-03 08:41:58 +010051 ":libaudio_system_audio_base",
52 ":libaudio_system_audio_common_base",
Francois Gaffie5818b452019-08-27 16:30:04 +020053 // ":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 Gaffie7d602f02019-02-13 10:37:49 +010062python_binary_host {
Cole Faust97e95882022-09-01 17:13:49 -070063 name: "domainGeneratorPolicy",
Francois Gaffie7d602f02019-02-13 10:37:49 +010064 main: "domainGeneratorPolicy.py",
65 srcs: [
66 "domainGeneratorPolicy.py",
67 ],
Francois Gaffie7d602f02019-02-13 10:37:49 +010068 libs: [
69 "EddParser.py",
70 "hostConfig.py",
71 "PFWScriptGenerator.py",
72 ],
73 required: [
74 "domainGeneratorConnector",
75 ],
76}
77
Francois Gaffie5818b452019-08-27 16:30:04 +020078genrule_defaults {
79 name: "domaingeneratorpolicyrule",
80 tools: [
Cole Faust97e95882022-09-01 17:13:49 -070081 "domainGeneratorPolicy",
Francois Gaffie5818b452019-08-27 16:30:04 +020082 "domainGeneratorConnector",
83 ],
84 cmd: "mkdir -p $(genDir)/Structure/Policy && " +
Aditya Choudharyb2eeb462024-01-31 11:07:15 +000085 "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 Gaffie5818b452019-08-27 16:30:04 +020096 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 Azucenaecaf4b02023-10-30 21:03:33 -0700103 ":parameter_frameworks_configuration_schemas",
Francois Gaffie5818b452019-08-27 16:30:04 +0200104 ],
105 out: ["PolicyConfigurableDomains.xml"],
106}
107
108//##################################################################################################
109// Tools for policy parameter-framework product strategies structure file generation
110//
Francois Gaffie7d602f02019-02-13 10:37:49 +0100111python_binary_host {
Cole Faust97e95882022-09-01 17:13:49 -0700112 name: "buildStrategiesStructureFile",
Francois Gaffie7d602f02019-02-13 10:37:49 +0100113 main: "buildStrategiesStructureFile.py",
114 srcs: [
115 "buildStrategiesStructureFile.py",
116 ],
Francois Gaffie7d602f02019-02-13 10:37:49 +0100117}
Francois Gaffie5818b452019-08-27 16:30:04 +0200118
119genrule_defaults {
120 name: "buildstrategiesstructurerule",
Cole Faust97e95882022-09-01 17:13:49 -0700121 tools: ["buildStrategiesStructureFile"],
Aditya Choudharyb2eeb462024-01-31 11:07:15 +0000122 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 Gaffie5818b452019-08-27 16:30:04 +0200127 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 Gaffie8b048922020-01-15 17:42:52 +0100134
135//##################################################################################################
136// Tools for policy parameter-framework common type structure file generation
137//
138python_binary_host {
Cole Faust97e95882022-09-01 17:13:49 -0700139 name: "buildCommonTypesStructureFile",
Francois Gaffie8b048922020-01-15 17:42:52 +0100140 main: "buildCommonTypesStructureFile.py",
141 srcs: [
142 "buildCommonTypesStructureFile.py",
143 ],
Francois Gaffie8b048922020-01-15 17:42:52 +0100144}
145
146genrule_defaults {
147 name: "buildcommontypesstructurerule",
Cole Faust97e95882022-09-01 17:13:49 -0700148 tools: ["buildCommonTypesStructureFile"],
149 cmd: "$(location buildCommonTypesStructureFile) " +
Aditya Choudharyb2eeb462024-01-31 11:07:15 +0000150 "--androidaudiobaseheader $(location :libaudio_system_audio_base) " +
151 "--commontypesstructure $(location :common_types_structure_template) " +
152 "--outputfile $(out)",
Francois Gaffie8b048922020-01-15 17:42:52 +0100153 srcs: [
154 ":common_types_structure_template",
155 ":libaudio_system_audio_base",
156 ],
157 out: ["PolicySubsystem-CommonTypes.xml"],
158}