blob: 9b4d09646d24d4b3b19e6cd5bc40cb77e465257f [file] [log] [blame]
Bob Badour8117c2a2021-02-03 18:31:58 -08001package {
2 // http://go/android-license-faq
3 // A large-scale-change added 'default_applicable_licenses' to import
4 // the below license kinds from "system_media_license":
5 // SPDX-license-identifier-Apache-2.0
6 default_applicable_licenses: ["system_media_license"],
7}
8
Dan Willemsenc017c202016-09-12 16:15:40 -07009subdirs = ["tests"]
10
11cc_defaults {
12 name: "audio_utils_defaults",
13
14 local_include_dirs: ["include"],
15 export_include_dirs: ["include"],
16
17 cflags: [
18 "-Werror",
19 "-Wall",
20 ],
21}
22
Andy Hung45ddd212020-01-28 16:02:28 -080023cc_library_headers {
24 name: "libaudioutils_headers",
25 host_supported: true,
26 vendor_available: true,
Justin Yune1f7b8b2020-11-11 19:27:40 +090027 product_available: true,
Andy Hung45ddd212020-01-28 16:02:28 -080028 export_include_dirs: ["include"],
Ray Essick2be3a5b2021-06-20 16:27:46 -070029 // referenced from CTS/MTS test suite which must run on sdk 29, make sure it's compatible
30 // (revisit if/when we add features to this library that require newer sdk.
31 sdk_version: "29",
Andy Hung45ddd212020-01-28 16:02:28 -080032}
33
Kevin Rocard0e586f42018-01-24 06:09:44 +000034cc_library {
35 name: "libaudioutils",
36 vendor_available: true,
Justin Yune1f7b8b2020-11-11 19:27:40 +090037 product_available: true,
Kevin Rocard0e586f42018-01-24 06:09:44 +000038 vndk: {
39 enabled: true,
40 },
Jooyung Hand79bd6d2019-01-18 18:14:02 +090041 double_loadable: true,
Kevin Rocard0e586f42018-01-24 06:09:44 +000042 host_supported: true,
Dan Willemsenc017c202016-09-12 16:15:40 -070043 defaults: ["audio_utils_defaults"],
44
45 srcs: [
Andy Hung65e7a1b2019-01-18 15:49:12 -080046 "Balance.cpp",
Andy Hungad861e62021-05-18 11:51:54 -070047 "channels.cpp",
Andy Hungbb8f1722017-03-15 14:52:09 -070048 "ErrorLog.cpp",
Dan Willemsen03e86bd2016-09-12 21:34:12 -070049 "fifo.cpp",
Glenn Kasten7cc8f542016-12-01 16:12:59 -080050 "fifo_index.cpp",
Glenn Kasten2652f992020-01-21 13:14:14 -080051 "fifo_writer_T.cpp",
Dan Willemsenc017c202016-09-12 16:15:40 -070052 "format.c",
53 "limiter.c",
jiabin3da74532020-03-18 11:25:47 -070054 "Metadata.cpp",
Dan Willemsenc017c202016-09-12 16:15:40 -070055 "minifloat.c",
Domingo 🐻 Hui490fe662019-07-26 09:45:53 -070056 "mono_blend.cpp",
Andy Hung459a2a32017-03-20 09:24:53 -070057 "power.cpp",
58 "PowerLog.cpp",
Dan Willemsenc017c202016-09-12 16:15:40 -070059 "primitives.c",
60 "roundup.c",
Glenn Kasten9c0dc7e2014-05-18 13:36:37 -070061 "sample.c",
Dan Willemsenc017c202016-09-12 16:15:40 -070062 ],
63
Tri Vo82d94502017-06-23 15:42:32 -070064 header_libs: [
Kevin Rocard0e586f42018-01-24 06:09:44 +000065 "libaudio_system_headers",
Tri Voa6bddef2017-06-27 09:54:36 -070066 "libutils_headers",
Tri Vo82d94502017-06-23 15:42:32 -070067 ],
68
69 export_header_lib_headers: [
Kevin Rocard0e586f42018-01-24 06:09:44 +000070 "libaudio_system_headers",
Tri Voa6bddef2017-06-27 09:54:36 -070071 "libutils_headers",
Tri Vo82d94502017-06-23 15:42:32 -070072 ],
73
Dan Willemsenc017c202016-09-12 16:15:40 -070074 shared_libs: [
75 "libcutils",
76 "liblog",
77 ],
78
79 target: {
80 android: {
81 srcs: [
Domingo 🐻 Hui490fe662019-07-26 09:45:53 -070082 // "mono_blend.cpp",
Dan Willemsenc017c202016-09-12 16:15:40 -070083 "resampler.c",
84 "echo_reference.c",
85 ],
86 whole_static_libs: ["libaudioutils_fixedfft"],
87 shared_libs: [
88 "libspeexresampler",
89 ],
90 },
91 host: {
Colin Cross00afd762016-09-29 14:08:28 -070092 cflags: ["-D__unused=__attribute__((unused))"],
Dan Willemsenc017c202016-09-12 16:15:40 -070093 },
94 },
Jooyung Han7fe723a2020-04-16 18:48:35 +090095 min_sdk_version: "29",
Dan Willemsenc017c202016-09-12 16:15:40 -070096}
97
98cc_library_static {
99 name: "libaudioutils_fixedfft",
Jiyong Park09d178f2017-05-15 15:31:44 +0900100 vendor_available: true,
Justin Yune1f7b8b2020-11-11 19:27:40 +0900101 product_available: true,
Dan Willemsenc017c202016-09-12 16:15:40 -0700102 defaults: ["audio_utils_defaults"],
103
104 arch: {
105 arm: {
106 instruction_set: "arm",
107 },
108 },
109
110 srcs: ["fixedfft.cpp"],
Jooyung Han7fe723a2020-04-16 18:48:35 +0900111 min_sdk_version: "29",
Dan Willemsenc017c202016-09-12 16:15:40 -0700112}
113
114cc_library_static {
115 name: "libsndfile",
116 defaults: ["audio_utils_defaults"],
117 host_supported: true,
118 srcs: ["tinysndfile.c"],
119 cflags: [
120 "-UHAVE_STDERR",
121 ],
122}
123
124cc_library_static {
125 name: "libfifo",
126 defaults: ["audio_utils_defaults"],
127 srcs: [
Dan Willemsen03e86bd2016-09-12 21:34:12 -0700128 "fifo.cpp",
Glenn Kasten7cc8f542016-12-01 16:12:59 -0800129 "fifo_index.cpp",
Dan Willemsenc017c202016-09-12 16:15:40 -0700130 "primitives.c",
131 "roundup.c",
132 ],
Jooyung Han7fe723a2020-04-16 18:48:35 +0900133 min_sdk_version: "29",
Ayushi Khopkar2ffb9172020-05-21 11:33:11 +0530134 host_supported: true,
135 target: {
136 darwin: {
137 enabled: false,
138 },
139 },
Dan Willemsenc017c202016-09-12 16:15:40 -0700140}
141
142cc_library_shared {
143 name: "libaudiospdif",
Glenn Kasten0fef07e2020-08-17 10:47:04 -0700144 host_supported: true,
Dan Willemsenc017c202016-09-12 16:15:40 -0700145 defaults: ["audio_utils_defaults"],
146
147 srcs: [
148 "spdif/BitFieldParser.cpp",
149 "spdif/FrameScanner.cpp",
150 "spdif/AC3FrameScanner.cpp",
151 "spdif/DTSFrameScanner.cpp",
152 "spdif/SPDIFEncoder.cpp",
153 ],
154
155 shared_libs: [
156 "libcutils",
157 "liblog",
158 ],
159}