1/*
2 * Copyright (C) 2019 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 *      http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17// Import this namespace in order to use AOSP Phone configuration example
18
19soong_namespace {
20    imports: [
21        "frameworks/av/services/audiopolicy/config",
22    ],
23}
24
25package {
26    default_team: "trendy_team_android_media_audio_framework",
27    // See: http://go/android-license-faq
28    // A large-scale-change added 'default_applicable_licenses' to import
29    // all of the 'license_kinds' from "frameworks_av_license"
30    // to get the below license kinds:
31    //   SPDX-license-identifier-Apache-2.0
32    default_applicable_licenses: ["frameworks_av_license"],
33}
34
35prebuilt_etc {
36    name: "audio_policy_engine_configuration.xml",
37    vendor: true,
38    src: ":audio_policy_engine_configuration",
39    required: [
40        ":audio_policy_engine_criteria.xml",
41        ":audio_policy_engine_criterion_types.xml",
42        ":audio_policy_engine_product_strategies.xml",
43        ":audio_policy_engine_volumes.xml",
44    ],
45}
46
47prebuilt_etc {
48    name: "audio_policy_engine_product_strategies.xml",
49    vendor: true,
50    src: "audio_policy_engine_product_strategies.xml",
51}
52
53prebuilt_etc {
54    name: "audio_policy_engine_stream_volumes.xml",
55    vendor: true,
56    src: ":audio_policy_engine_stream_volumes",
57}
58
59prebuilt_etc {
60    name: "audio_policy_engine_default_stream_volumes.xml",
61    vendor: true,
62    src: ":audio_policy_engine_default_stream_volumes",
63}
64
65prebuilt_etc {
66    name: "audio_policy_engine_criterion_types.xml",
67    vendor: true,
68    src: ":audio_policy_engine_criterion_types",
69}
70
71//
72// Generate audio_policy_engine criterion type file => provides device addresses criterion type
73//
74genrule {
75    name: "audio_policy_engine_criterion_types",
76    defaults: ["buildpolicycriteriontypesrule"],
77    srcs: [
78        ":audio_policy_configuration_files",
79        ":audio_policy_configuration_top_file",
80    ],
81}
82
83filegroup {
84    name: "audio_policy_configuration_files",
85    srcs: [
86        ":audio_policy_volumes",
87        ":default_volume_tables",
88        ":primary_audio_policy_configuration",
89        ":r_submix_audio_policy_configuration",
90        ":surround_sound_configuration_5_0",
91    ],
92}
93
94filegroup {
95    name: "audio_policy_configuration_top_file",
96    srcs: [":audio_policy_configuration_generic"],
97}
98
99filegroup {
100    name: "audio_policy_engine_configuration",
101    srcs: ["audio_policy_engine_configuration.xml"],
102}
103
104filegroup {
105    name: "audio_policy_engine_stream_volumes",
106    srcs: ["audio_policy_engine_stream_volumes.xml"],
107}
108
109filegroup {
110    name: "audio_policy_engine_default_stream_volumes",
111    srcs: ["audio_policy_engine_default_stream_volumes.xml"],
112}
113
114filegroup {
115    name: "audio_policy_engine_configuration_files",
116    srcs: [
117        ":audio_policy_engine_configuration",
118        ":audio_policy_engine_criteria",
119        ":audio_policy_engine_criterion_types",
120        ":audio_policy_engine_default_stream_volumes",
121        ":audio_policy_engine_stream_volumes",
122        "audio_policy_engine_product_strategies.xml",
123    ],
124}
125