Bob Badour | 56786ac | 2021-02-25 15:24:36 -0800 | [diff] [blame] | 1 | package { |
| 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 Willemsen | b44c69e | 2017-10-23 17:15:03 -0700 | [diff] [blame] | 10 | cc_library { |
| 11 | name: "libaaudio", |
| 12 | |
| 13 | local_include_dirs: [ |
| 14 | "binding", |
| 15 | "client", |
| 16 | "core", |
| 17 | "fifo", |
Phil Burk | 64dce36 | 2018-03-28 15:30:39 -0700 | [diff] [blame] | 18 | "flowgraph", |
Dan Willemsen | b44c69e | 2017-10-23 17:15:03 -0700 | [diff] [blame] | 19 | "legacy", |
| 20 | "utility", |
| 21 | ], |
Marco Nelissen | 6b28594 | 2019-10-21 14:52:30 -0700 | [diff] [blame] | 22 | header_libs: [ |
| 23 | "libaaudio_headers", |
| 24 | ], |
Dan Willemsen | b44c69e | 2017-10-23 17:15:03 -0700 | [diff] [blame] | 25 | export_header_lib_headers: ["libaaudio_headers"], |
dimitry | 8e8a968 | 2019-06-04 15:14:02 +0200 | [diff] [blame] | 26 | version_script: "libaaudio.map.txt", |
Dan Willemsen | b44c69e | 2017-10-23 17:15:03 -0700 | [diff] [blame] | 27 | |
| 28 | srcs: [ |
dimitry | d81a84a | 2019-07-17 13:55:16 +0200 | [diff] [blame] | 29 | "core/AAudioAudio.cpp", |
| 30 | ], |
| 31 | |
| 32 | cflags: [ |
Phil Burk | 0bd745e | 2020-10-17 18:20:01 +0000 | [diff] [blame] | 33 | "-Wthread-safety", |
dimitry | d81a84a | 2019-07-17 13:55:16 +0200 | [diff] [blame] | 34 | "-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 Burk | a987670 | 2020-04-20 18:16:15 -0700 | [diff] [blame] | 48 | "libmedia_helper", |
| 49 | "libmediametrics", |
| 50 | "libmediautils", |
dimitry | d81a84a | 2019-07-17 13:55:16 +0200 | [diff] [blame] | 51 | "liblog", |
| 52 | "libcutils", |
| 53 | "libutils", |
| 54 | "libbinder", |
| 55 | ], |
Cindy Zhou | 30ed594 | 2019-10-30 13:24:37 -0700 | [diff] [blame] | 56 | |
| 57 | sanitize: { |
| 58 | integer_overflow: true, |
| 59 | misc_undefined: ["bounds"], |
Cindy Zhou | 30ed594 | 2019-10-30 13:24:37 -0700 | [diff] [blame] | 60 | }, |
| 61 | |
Zach Johnson | 99c47ff | 2019-12-02 15:28:34 -0800 | [diff] [blame] | 62 | stubs: { |
| 63 | symbol_file: "libaaudio.map.txt", |
| 64 | versions: ["28"], |
| 65 | }, |
dimitry | d81a84a | 2019-07-17 13:55:16 +0200 | [diff] [blame] | 66 | } |
| 67 | |
| 68 | cc_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 Nelissen | 6b28594 | 2019-10-21 14:52:30 -0700 | [diff] [blame] | 81 | header_libs: [ |
| 82 | "libaaudio_headers", |
Cindy Zhou | 30ed594 | 2019-10-30 13:24:37 -0700 | [diff] [blame] | 83 | "libmedia_headers", |
Marco Nelissen | 7c96ea7 | 2020-01-10 15:46:22 -0800 | [diff] [blame] | 84 | "libmediametrics_headers", |
Marco Nelissen | 6b28594 | 2019-10-21 14:52:30 -0700 | [diff] [blame] | 85 | ], |
dimitry | d81a84a | 2019-07-17 13:55:16 +0200 | [diff] [blame] | 86 | export_header_lib_headers: ["libaaudio_headers"], |
| 87 | |
Philip P. Moltmann | bda4575 | 2020-07-17 16:41:18 -0700 | [diff] [blame] | 88 | export_shared_lib_headers: [ |
| 89 | "media_permission-aidl-cpp", |
| 90 | ], |
| 91 | |
dimitry | d81a84a | 2019-07-17 13:55:16 +0200 | [diff] [blame] | 92 | shared_libs: [ |
| 93 | "libaudioclient", |
| 94 | "libaudioutils", |
Phil Burk | a987670 | 2020-04-20 18:16:15 -0700 | [diff] [blame] | 95 | "libmedia_helper", |
| 96 | "libmediametrics", |
| 97 | "libmediautils", |
dimitry | d81a84a | 2019-07-17 13:55:16 +0200 | [diff] [blame] | 98 | "liblog", |
| 99 | "libcutils", |
| 100 | "libutils", |
| 101 | "libbinder", |
Ytai Ben-Tsvi | 0412f73 | 2020-08-17 14:43:36 -0700 | [diff] [blame] | 102 | "aaudio-aidl-cpp", |
Philip P. Moltmann | bda4575 | 2020-07-17 16:41:18 -0700 | [diff] [blame] | 103 | "media_permission-aidl-cpp", |
| 104 | "libaudioclient_aidl_conversion", |
| 105 | ], |
| 106 | |
| 107 | static_libs: [ |
| 108 | "media_permission-aidl-cpp", |
dimitry | d81a84a | 2019-07-17 13:55:16 +0200 | [diff] [blame] | 109 | ], |
| 110 | |
| 111 | cflags: [ |
| 112 | "-Wno-unused-parameter", |
| 113 | "-Wall", |
| 114 | "-Werror", |
| 115 | ], |
| 116 | |
| 117 | srcs: [ |
| 118 | "core/AudioGlobal.cpp", |
Dan Willemsen | b44c69e | 2017-10-23 17:15:03 -0700 | [diff] [blame] | 119 | "core/AudioStream.cpp", |
| 120 | "core/AudioStreamBuilder.cpp", |
Dan Willemsen | b44c69e | 2017-10-23 17:15:03 -0700 | [diff] [blame] | 121 | "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 Willemsen | b44c69e | 2017-10-23 17:15:03 -0700 | [diff] [blame] | 129 | "fifo/FifoBuffer.cpp", |
| 130 | "fifo/FifoControllerBase.cpp", |
Phil Burk | 0127c1b | 2018-03-29 13:48:06 -0700 | [diff] [blame] | 131 | "client/AAudioFlowGraph.cpp", |
Dan Willemsen | b44c69e | 2017-10-23 17:15:03 -0700 | [diff] [blame] | 132 | "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-Tsvi | 734e350 | 2020-08-24 14:57:36 -0700 | [diff] [blame] | 138 | "binding/AAudioBinderAdapter.cpp", |
Dan Willemsen | b44c69e | 2017-10-23 17:15:03 -0700 | [diff] [blame] | 139 | "binding/AAudioBinderClient.cpp", |
| 140 | "binding/AAudioStreamRequest.cpp", |
| 141 | "binding/AAudioStreamConfiguration.cpp", |
Dan Willemsen | b44c69e | 2017-10-23 17:15:03 -0700 | [diff] [blame] | 142 | "binding/RingBufferParcelable.cpp", |
| 143 | "binding/SharedMemoryParcelable.cpp", |
| 144 | "binding/SharedRegionParcelable.cpp", |
Phil Burk | 64dce36 | 2018-03-28 15:30:39 -0700 | [diff] [blame] | 145 | "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 Burk | 04e805b | 2018-03-27 09:13:53 -0700 | [diff] [blame] | 152 | "flowgraph/SinkI32.cpp", |
Phil Burk | 64dce36 | 2018-03-28 15:30:39 -0700 | [diff] [blame] | 153 | "flowgraph/SourceFloat.cpp", |
| 154 | "flowgraph/SourceI16.cpp", |
| 155 | "flowgraph/SourceI24.cpp", |
Phil Burk | 04e805b | 2018-03-27 09:13:53 -0700 | [diff] [blame] | 156 | "flowgraph/SourceI32.cpp", |
Dan Willemsen | b44c69e | 2017-10-23 17:15:03 -0700 | [diff] [blame] | 157 | ], |
Cindy Zhou | 30ed594 | 2019-10-30 13:24:37 -0700 | [diff] [blame] | 158 | sanitize: { |
| 159 | integer_overflow: true, |
| 160 | misc_undefined: ["bounds"], |
Cindy Zhou | 30ed594 | 2019-10-30 13:24:37 -0700 | [diff] [blame] | 161 | }, |
Dan Willemsen | b44c69e | 2017-10-23 17:15:03 -0700 | [diff] [blame] | 162 | } |
Ytai Ben-Tsvi | 0412f73 | 2020-08-17 14:43:36 -0700 | [diff] [blame] | 163 | |
| 164 | aidl_interface { |
| 165 | name: "aaudio-aidl", |
| 166 | unstable: true, |
| 167 | local_include_dir: "binding/aidl", |
| 168 | srcs: [ |
Ytai Ben-Tsvi | c5f4587 | 2020-08-18 10:39:44 -0700 | [diff] [blame] | 169 | "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-Tsvi | 0412f73 | 2020-08-17 14:43:36 -0700 | [diff] [blame] | 174 | "binding/aidl/aaudio/IAAudioClient.aidl", |
Ytai Ben-Tsvi | c5f4587 | 2020-08-18 10:39:44 -0700 | [diff] [blame] | 175 | "binding/aidl/aaudio/IAAudioService.aidl", |
Ytai Ben-Tsvi | 0412f73 | 2020-08-17 14:43:36 -0700 | [diff] [blame] | 176 | ], |
Ytai Ben-Tsvi | c5f4587 | 2020-08-18 10:39:44 -0700 | [diff] [blame] | 177 | imports: [ |
| 178 | "audio_common-aidl", |
| 179 | "shared-file-region-aidl", |
Philip P. Moltmann | bda4575 | 2020-07-17 16:41:18 -0700 | [diff] [blame] | 180 | "media_permission-aidl", |
Ytai Ben-Tsvi | c5f4587 | 2020-08-18 10:39:44 -0700 | [diff] [blame] | 181 | ], |
| 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-Tsvi | 0412f73 | 2020-08-17 14:43:36 -0700 | [diff] [blame] | 193 | } |