blob: fe2d98eeb0cbe0366abf05055fea2a9abe5c4730 [file] [log] [blame]
Bob Badour56786ac2021-02-25 15:24:36 -08001package {
2 // See: http://go/android-license-faq
3 // A large-scale-change added 'default_applicable_licenses' to import
4 // all of the 'license_kinds' from "frameworks_av_license"
5 // to get the below license kinds:
6 // SPDX-license-identifier-Apache-2.0
7 default_applicable_licenses: ["frameworks_av_license"],
8}
9
Dan Willemsenb44c69e2017-10-23 17:15:03 -070010cc_library {
11 name: "libaaudio",
12
13 local_include_dirs: [
14 "binding",
15 "client",
16 "core",
17 "fifo",
Phil Burk64dce362018-03-28 15:30:39 -070018 "flowgraph",
Dan Willemsenb44c69e2017-10-23 17:15:03 -070019 "legacy",
20 "utility",
21 ],
Marco Nelissen6b285942019-10-21 14:52:30 -070022 header_libs: [
23 "libaaudio_headers",
24 ],
Dan Willemsenb44c69e2017-10-23 17:15:03 -070025 export_header_lib_headers: ["libaaudio_headers"],
dimitry8e8a9682019-06-04 15:14:02 +020026 version_script: "libaaudio.map.txt",
Dan Willemsenb44c69e2017-10-23 17:15:03 -070027
28 srcs: [
dimitryd81a84a2019-07-17 13:55:16 +020029 "core/AAudioAudio.cpp",
30 ],
31
32 cflags: [
Phil Burk0bd745e2020-10-17 18:20:01 +000033 "-Wthread-safety",
dimitryd81a84a2019-07-17 13:55:16 +020034 "-Wno-unused-parameter",
35 "-Wall",
36 "-Werror",
37
38 // By default, all symbols are hidden.
39 // "-fvisibility=hidden",
40 // AAUDIO_API is used to explicitly export a function or a variable as a visible symbol.
41 "-DAAUDIO_API=__attribute__((visibility(\"default\")))",
42 ],
43
44 shared_libs: [
45 "libaaudio_internal",
46 "libaudioclient",
47 "libaudioutils",
Phil Burka9876702020-04-20 18:16:15 -070048 "libmedia_helper",
49 "libmediametrics",
50 "libmediautils",
dimitryd81a84a2019-07-17 13:55:16 +020051 "liblog",
52 "libcutils",
53 "libutils",
54 "libbinder",
55 ],
Cindy Zhou30ed5942019-10-30 13:24:37 -070056
57 sanitize: {
58 integer_overflow: true,
59 misc_undefined: ["bounds"],
Cindy Zhou30ed5942019-10-30 13:24:37 -070060 },
61
Zach Johnson99c47ff2019-12-02 15:28:34 -080062 stubs: {
63 symbol_file: "libaaudio.map.txt",
64 versions: ["28"],
65 },
dimitryd81a84a2019-07-17 13:55:16 +020066}
67
68cc_library {
69 name: "libaaudio_internal",
70
71 local_include_dirs: [
72 "binding",
73 "client",
74 "core",
75 "fifo",
76 "legacy",
77 "utility",
78 ],
79
80 export_include_dirs: ["."],
Marco Nelissen6b285942019-10-21 14:52:30 -070081 header_libs: [
82 "libaaudio_headers",
Cindy Zhou30ed5942019-10-30 13:24:37 -070083 "libmedia_headers",
Marco Nelissen7c96ea72020-01-10 15:46:22 -080084 "libmediametrics_headers",
Marco Nelissen6b285942019-10-21 14:52:30 -070085 ],
dimitryd81a84a2019-07-17 13:55:16 +020086 export_header_lib_headers: ["libaaudio_headers"],
87
Philip P. Moltmannbda45752020-07-17 16:41:18 -070088 export_shared_lib_headers: [
89 "media_permission-aidl-cpp",
90 ],
91
dimitryd81a84a2019-07-17 13:55:16 +020092 shared_libs: [
93 "libaudioclient",
94 "libaudioutils",
Phil Burka9876702020-04-20 18:16:15 -070095 "libmedia_helper",
96 "libmediametrics",
97 "libmediautils",
dimitryd81a84a2019-07-17 13:55:16 +020098 "liblog",
99 "libcutils",
100 "libutils",
101 "libbinder",
Ytai Ben-Tsvi0412f732020-08-17 14:43:36 -0700102 "aaudio-aidl-cpp",
Philip P. Moltmannbda45752020-07-17 16:41:18 -0700103 "media_permission-aidl-cpp",
104 "libaudioclient_aidl_conversion",
105 ],
106
107 static_libs: [
108 "media_permission-aidl-cpp",
dimitryd81a84a2019-07-17 13:55:16 +0200109 ],
110
111 cflags: [
112 "-Wno-unused-parameter",
113 "-Wall",
114 "-Werror",
115 ],
116
117 srcs: [
118 "core/AudioGlobal.cpp",
Dan Willemsenb44c69e2017-10-23 17:15:03 -0700119 "core/AudioStream.cpp",
120 "core/AudioStreamBuilder.cpp",
Dan Willemsenb44c69e2017-10-23 17:15:03 -0700121 "core/AAudioStreamParameters.cpp",
122 "legacy/AudioStreamLegacy.cpp",
123 "legacy/AudioStreamRecord.cpp",
124 "legacy/AudioStreamTrack.cpp",
125 "utility/AAudioUtilities.cpp",
126 "utility/FixedBlockAdapter.cpp",
127 "utility/FixedBlockReader.cpp",
128 "utility/FixedBlockWriter.cpp",
Dan Willemsenb44c69e2017-10-23 17:15:03 -0700129 "fifo/FifoBuffer.cpp",
130 "fifo/FifoControllerBase.cpp",
Phil Burk0127c1b2018-03-29 13:48:06 -0700131 "client/AAudioFlowGraph.cpp",
Dan Willemsenb44c69e2017-10-23 17:15:03 -0700132 "client/AudioEndpoint.cpp",
133 "client/AudioStreamInternal.cpp",
134 "client/AudioStreamInternalCapture.cpp",
135 "client/AudioStreamInternalPlay.cpp",
136 "client/IsochronousClockModel.cpp",
137 "binding/AudioEndpointParcelable.cpp",
Ytai Ben-Tsvi734e3502020-08-24 14:57:36 -0700138 "binding/AAudioBinderAdapter.cpp",
Dan Willemsenb44c69e2017-10-23 17:15:03 -0700139 "binding/AAudioBinderClient.cpp",
140 "binding/AAudioStreamRequest.cpp",
141 "binding/AAudioStreamConfiguration.cpp",
Dan Willemsenb44c69e2017-10-23 17:15:03 -0700142 "binding/RingBufferParcelable.cpp",
143 "binding/SharedMemoryParcelable.cpp",
144 "binding/SharedRegionParcelable.cpp",
Phil Burk64dce362018-03-28 15:30:39 -0700145 "flowgraph/AudioProcessorBase.cpp",
146 "flowgraph/ClipToRange.cpp",
147 "flowgraph/MonoToMultiConverter.cpp",
148 "flowgraph/RampLinear.cpp",
149 "flowgraph/SinkFloat.cpp",
150 "flowgraph/SinkI16.cpp",
151 "flowgraph/SinkI24.cpp",
Phil Burk04e805b2018-03-27 09:13:53 -0700152 "flowgraph/SinkI32.cpp",
Phil Burk64dce362018-03-28 15:30:39 -0700153 "flowgraph/SourceFloat.cpp",
154 "flowgraph/SourceI16.cpp",
155 "flowgraph/SourceI24.cpp",
Phil Burk04e805b2018-03-27 09:13:53 -0700156 "flowgraph/SourceI32.cpp",
Dan Willemsenb44c69e2017-10-23 17:15:03 -0700157 ],
Cindy Zhou30ed5942019-10-30 13:24:37 -0700158 sanitize: {
159 integer_overflow: true,
160 misc_undefined: ["bounds"],
Cindy Zhou30ed5942019-10-30 13:24:37 -0700161 },
Dan Willemsenb44c69e2017-10-23 17:15:03 -0700162}
Ytai Ben-Tsvi0412f732020-08-17 14:43:36 -0700163
164aidl_interface {
165 name: "aaudio-aidl",
166 unstable: true,
167 local_include_dir: "binding/aidl",
168 srcs: [
Ytai Ben-Tsvic5f45872020-08-18 10:39:44 -0700169 "binding/aidl/aaudio/Endpoint.aidl",
170 "binding/aidl/aaudio/RingBuffer.aidl",
171 "binding/aidl/aaudio/SharedRegion.aidl",
172 "binding/aidl/aaudio/StreamParameters.aidl",
173 "binding/aidl/aaudio/StreamRequest.aidl",
Ytai Ben-Tsvi0412f732020-08-17 14:43:36 -0700174 "binding/aidl/aaudio/IAAudioClient.aidl",
Ytai Ben-Tsvic5f45872020-08-18 10:39:44 -0700175 "binding/aidl/aaudio/IAAudioService.aidl",
Ytai Ben-Tsvi0412f732020-08-17 14:43:36 -0700176 ],
Ytai Ben-Tsvic5f45872020-08-18 10:39:44 -0700177 imports: [
178 "audio_common-aidl",
179 "shared-file-region-aidl",
Philip P. Moltmannbda45752020-07-17 16:41:18 -0700180 "media_permission-aidl",
Ytai Ben-Tsvic5f45872020-08-18 10:39:44 -0700181 ],
182 backend:
183 {
184 cpp: {
185 enabled: true,
186 },
187 java: {
188 // TODO: need to have audio_common-aidl available in Java to enable
189 // this.
190 enabled: false,
191 },
192 },
Ytai Ben-Tsvi0412f732020-08-17 14:43:36 -0700193}