• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1//
2// Copyright (C) 2016 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
16package {
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 "hardware_interfaces_license"
20    // to get the below license kinds:
21    //   SPDX-license-identifier-Apache-2.0
22    default_applicable_licenses: ["hardware_interfaces_license"],
23}
24
25cc_library_shared {
26    name: "android.hardware.audio.common-util",
27    defaults: ["hidl_defaults"],
28    vendor_available: true,
29    srcs: [
30        "EffectMap.cpp",
31    ],
32
33    export_include_dirs: ["include"],
34
35    shared_libs: [
36        "liblog",
37        "libutils",
38        "libhidlbase",
39    ],
40
41    header_libs: [
42        "android.hardware.audio.common.util@all-versions",
43        "libaudio_system_headers",
44        "libhardware_headers",
45    ],
46    export_header_lib_headers: [
47        "android.hardware.audio.common.util@all-versions",
48    ],
49}
50
51filegroup {
52    name: "android.hardware.audio.common-util@2-6",
53    srcs: [
54        "HidlUtils.cpp",
55        "HidlUtilsCommon.cpp",
56        "UuidUtils.cpp",
57    ],
58}
59
60cc_defaults {
61    name: "android.hardware.audio.common-util_default",
62    defaults: ["hidl_defaults"],
63
64    vendor_available: true,
65
66    export_include_dirs: ["."],
67
68    shared_libs: [
69        "liblog",
70        "libutils",
71        "libhidlbase",
72        "android.hardware.audio.common-util",
73    ],
74    export_shared_lib_headers: [
75        "android.hardware.audio.common-util",
76    ],
77
78    header_libs: [
79        "libaudio_system_headers",
80        "libhardware_headers",
81    ],
82}
83
84cc_library_shared {
85    name: "android.hardware.audio.common@2.0-util",
86    defaults: ["android.hardware.audio.common-util_default"],
87    srcs: [":android.hardware.audio.common-util@2-6"],
88    shared_libs: [
89        "android.hardware.audio.common@2.0",
90    ],
91    cflags: [
92        "-DMAJOR_VERSION=2",
93        "-DMINOR_VERSION=0",
94        "-include common/all-versions/VersionMacro.h",
95    ],
96}
97
98cc_library_shared {
99    name: "android.hardware.audio.common@4.0-util",
100    defaults: ["android.hardware.audio.common-util_default"],
101    srcs: [":android.hardware.audio.common-util@2-6"],
102    shared_libs: [
103        "android.hardware.audio.common@4.0",
104    ],
105    cflags: [
106        "-DMAJOR_VERSION=4",
107        "-DMINOR_VERSION=0",
108        "-include common/all-versions/VersionMacro.h",
109    ],
110}
111
112cc_library_shared {
113    name: "android.hardware.audio.common@5.0-util",
114    defaults: ["android.hardware.audio.common-util_default"],
115    srcs: [":android.hardware.audio.common-util@2-6"],
116    shared_libs: [
117        "android.hardware.audio.common@5.0",
118    ],
119    cflags: [
120        "-DMAJOR_VERSION=5",
121        "-DMINOR_VERSION=0",
122        "-include common/all-versions/VersionMacro.h",
123    ],
124}
125
126cc_library {
127    name: "android.hardware.audio.common@6.0-util",
128    defaults: ["android.hardware.audio.common-util_default"],
129    srcs: [":android.hardware.audio.common-util@2-6"],
130    shared_libs: [
131        "android.hardware.audio.common@6.0",
132    ],
133    cflags: [
134        "-DMAJOR_VERSION=6",
135        "-DMINOR_VERSION=0",
136        "-include common/all-versions/VersionMacro.h",
137    ],
138}
139
140cc_library {
141    name: "android.hardware.audio.common@7.0-util",
142    defaults: ["android.hardware.audio.common-util_default"],
143    srcs: [
144        "7.0/HidlUtils.cpp",
145        "HidlUtilsCommon.cpp",
146        "UuidUtils.cpp",
147    ],
148    shared_libs: [
149        "android.hardware.audio.common@7.0",
150        "android.hardware.audio.common@7.0-enums",
151        "libbase",
152    ],
153    cflags: [
154        "-DMAJOR_VERSION=7",
155        "-DMINOR_VERSION=0",
156        "-include common/all-versions/VersionMacro.h",
157    ],
158}
159
160cc_library {
161    name: "android.hardware.audio.common@7.1-util",
162    defaults: ["android.hardware.audio.common-util_default"],
163    srcs: [
164        "7.0/HidlUtils.cpp",
165        "HidlUtilsCommon.cpp",
166        "UuidUtils.cpp",
167    ],
168    shared_libs: [
169        "android.hardware.audio.common@7.0",
170        "android.hardware.audio.common@7.1-enums",
171        "libbase",
172    ],
173    cflags: [
174        "-DMAJOR_VERSION=7",
175        "-DMINOR_VERSION=1",
176        "-DCOMMON_TYPES_MINOR_VERSION=0",
177        "-DCORE_TYPES_MINOR_VERSION=0",
178        "-include common/all-versions/VersionMacro.h",
179    ],
180}
181
182// Note: this isn't a VTS test, but rather a unit test
183// to verify correctness of conversion utilities.
184cc_test {
185    name: "android.hardware.audio.common@6.0-util_tests",
186    defaults: ["android.hardware.audio.common-util_default"],
187
188    srcs: ["tests/hidlutils6_tests.cpp"],
189
190    // Use static linking to allow running in presubmit on
191    // targets that don't have HAL V6.
192    static_libs: [
193        "android.hardware.audio.common@6.0",
194        "android.hardware.audio.common@6.0-util",
195    ],
196
197    cflags: [
198        "-Werror",
199        "-Wall",
200        "-DMAJOR_VERSION=6",
201        "-DMINOR_VERSION=0",
202        "-include common/all-versions/VersionMacro.h",
203    ],
204
205    test_suites: ["device-tests"],
206}
207
208// Note: this isn't a VTS test, but rather a unit test
209// to verify correctness of conversion utilities.
210cc_test {
211    name: "android.hardware.audio.common@7.0-util_tests",
212    defaults: ["android.hardware.audio.common-util_default"],
213
214    tidy_timeout_srcs: ["tests/hidlutils_tests.cpp"],
215
216    srcs: ["tests/hidlutils_tests.cpp"],
217
218    // Use static linking to allow running in presubmit on
219    // targets that don't have HAL V7.
220    static_libs: [
221        "android.hardware.audio.common@7.0-enums",
222        "android.hardware.audio.common@7.0-util",
223        "android.hardware.audio.common@7.0",
224    ],
225
226    shared_libs: [
227        "libbase",
228        "libxml2",
229    ],
230
231    cflags: [
232        "-Werror",
233        "-Wall",
234        "-DMAJOR_VERSION=7",
235        "-DMINOR_VERSION=0",
236        "-include common/all-versions/VersionMacro.h",
237    ],
238
239    test_suites: ["device-tests"],
240}
241
242cc_test {
243    name: "android.hardware.audio.common@7.1-util_tests",
244    defaults: ["android.hardware.audio.common-util_default"],
245
246    tidy_timeout_srcs: ["tests/hidlutils_tests.cpp"],
247
248    srcs: ["tests/hidlutils_tests.cpp"],
249
250    // Use static linking to allow running in presubmit on
251    // targets that don't have HAL V7.1.
252    static_libs: [
253        "android.hardware.audio.common@7.1-enums",
254        "android.hardware.audio.common@7.1-util",
255        "android.hardware.audio.common@7.0",
256    ],
257
258    shared_libs: [
259        "libbase",
260        "libxml2",
261    ],
262
263    cflags: [
264        "-Werror",
265        "-Wall",
266        "-DMAJOR_VERSION=7",
267        "-DMINOR_VERSION=1",
268        "-DCOMMON_TYPES_MINOR_VERSION=0",
269        "-DCORE_TYPES_MINOR_VERSION=0",
270        "-include common/all-versions/VersionMacro.h",
271    ],
272
273    test_suites: ["device-tests"],
274}
275