• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1package {
2    default_team: "trendy_team_android_media_audio_framework",
3    // See: http://go/android-license-faq
4    // A large-scale-change added 'default_applicable_licenses' to import
5    // all of the 'license_kinds' from "hardware_interfaces_license"
6    // to get the below license kinds:
7    //   SPDX-license-identifier-Apache-2.0
8    default_applicable_licenses: ["hardware_interfaces_license"],
9}
10
11cc_defaults {
12    name: "android.hardware.audio-util_default",
13    defaults: ["hidl_defaults"],
14
15    vendor_available: true,
16
17    export_include_dirs: ["include"],
18
19    srcs: [
20        "CoreUtils.cpp",
21    ],
22
23    shared_libs: [
24        "liblog",
25        "libutils",
26        "libhidlbase",
27        "android.hardware.audio.common-util",
28    ],
29    export_shared_lib_headers: [
30        "android.hardware.audio.common-util",
31    ],
32
33    header_libs: [
34        "libaudio_system_headers",
35        "libhardware_headers",
36    ],
37}
38
39cc_library_shared {
40    name: "android.hardware.audio@2.0-util",
41    defaults: ["android.hardware.audio-util_default"],
42    shared_libs: [
43        "android.hardware.audio.common@2.0",
44        "android.hardware.audio.common@2.0-util",
45        "android.hardware.audio@2.0",
46    ],
47    cflags: [
48        "-DMAJOR_VERSION=2",
49        "-DMINOR_VERSION=0",
50        "-include common/all-versions/VersionMacro.h",
51    ],
52}
53
54cc_library_shared {
55    name: "android.hardware.audio@4.0-util",
56    defaults: ["android.hardware.audio-util_default"],
57    shared_libs: [
58        "android.hardware.audio.common@4.0",
59        "android.hardware.audio.common@4.0-util",
60        "android.hardware.audio@4.0",
61    ],
62    cflags: [
63        "-DMAJOR_VERSION=4",
64        "-DMINOR_VERSION=0",
65        "-include common/all-versions/VersionMacro.h",
66    ],
67}
68
69cc_library_shared {
70    name: "android.hardware.audio@5.0-util",
71    defaults: ["android.hardware.audio-util_default"],
72    shared_libs: [
73        "android.hardware.audio.common@5.0",
74        "android.hardware.audio.common@5.0-util",
75        "android.hardware.audio@5.0",
76    ],
77    cflags: [
78        "-DMAJOR_VERSION=5",
79        "-DMINOR_VERSION=0",
80        "-include common/all-versions/VersionMacro.h",
81    ],
82}
83
84cc_library_shared {
85    name: "android.hardware.audio@6.0-util",
86    defaults: ["android.hardware.audio-util_default"],
87    shared_libs: [
88        "android.hardware.audio.common@6.0",
89        "android.hardware.audio.common@6.0-util",
90        "android.hardware.audio@6.0",
91    ],
92    cflags: [
93        "-DMAJOR_VERSION=6",
94        "-DMINOR_VERSION=0",
95        "-include common/all-versions/VersionMacro.h",
96    ],
97}
98
99cc_library {
100    name: "android.hardware.audio@7.0-util",
101    defaults: ["android.hardware.audio-util_default"],
102    shared_libs: [
103        "android.hardware.audio.common@7.0",
104        "android.hardware.audio.common@7.0-enums",
105        "android.hardware.audio.common@7.0-util",
106        "android.hardware.audio@7.0",
107        "libbase",
108    ],
109    cflags: [
110        "-DMAJOR_VERSION=7",
111        "-DMINOR_VERSION=0",
112        "-include common/all-versions/VersionMacro.h",
113    ],
114}
115
116cc_library {
117    name: "android.hardware.audio@7.1-util",
118    defaults: ["android.hardware.audio-util_default"],
119    shared_libs: [
120        "android.hardware.audio.common@7.0",
121        "android.hardware.audio.common@7.1-enums",
122        "android.hardware.audio.common@7.1-util",
123        "android.hardware.audio@7.1",
124        "libbase",
125    ],
126    cflags: [
127        "-DMAJOR_VERSION=7",
128        "-DMINOR_VERSION=1",
129        "-DCOMMON_TYPES_MINOR_VERSION=0",
130        "-DCORE_TYPES_MINOR_VERSION=0",
131        "-include common/all-versions/VersionMacro.h",
132    ],
133}
134
135// Note: this isn't a VTS test, but rather a unit test
136// to verify correctness of conversion utilities.
137cc_test {
138    name: "android.hardware.audio@7.0-util_tests",
139    defaults: ["android.hardware.audio-util_default"],
140
141    srcs: ["tests/coreutils_tests.cpp"],
142
143    // Use static linking to allow running in presubmit on
144    // targets that don't have HAL V7.
145    static_libs: [
146        "android.hardware.audio.common@7.0",
147        "android.hardware.audio.common@7.0-enums",
148        "android.hardware.audio.common@7.0-util",
149        "android.hardware.audio@7.0",
150        "android.hardware.audio@7.0-util",
151    ],
152
153    shared_libs: [
154        "libbase",
155        "libxml2",
156    ],
157
158    cflags: [
159        "-Werror",
160        "-Wall",
161        "-DMAJOR_VERSION=7",
162        "-DMINOR_VERSION=0",
163        "-include common/all-versions/VersionMacro.h",
164    ],
165
166    test_suites: ["device-tests"],
167}
168
169cc_test {
170    name: "android.hardware.audio@7.1-util_tests",
171    defaults: ["android.hardware.audio-util_default"],
172
173    srcs: ["tests/coreutils_tests.cpp"],
174
175    // Use static linking to allow running in presubmit on
176    // targets that don't have HAL V7.1.
177    static_libs: [
178        "android.hardware.audio.common@7.0",
179        "android.hardware.audio.common@7.1-enums",
180        "android.hardware.audio.common@7.1-util",
181        "android.hardware.audio@7.1",
182        "android.hardware.audio@7.1-util",
183    ],
184
185    shared_libs: [
186        "libbase",
187        "libxml2",
188    ],
189
190    cflags: [
191        "-Werror",
192        "-Wall",
193        "-DMAJOR_VERSION=7",
194        "-DMINOR_VERSION=1",
195        "-DCOMMON_TYPES_MINOR_VERSION=0",
196        "-DCORE_TYPES_MINOR_VERSION=0",
197        "-include common/all-versions/VersionMacro.h",
198    ],
199
200    test_suites: ["device-tests"],
201}
202