• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1package {
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
10cc_library_headers {
11    name: "libaudioclient_headers",
12    vendor_available: true,
13    min_sdk_version: "29",
14    host_supported: true,
15
16    header_libs: [
17        "libaudiofoundation_headers",
18    ],
19    export_include_dirs: [
20        "include",
21    ],
22    export_header_lib_headers: [
23        "libaudiofoundation_headers",
24    ],
25    static_libs: [
26        "audioflinger-aidl-cpp",
27        "audiopolicy-aidl-cpp",
28        "av-types-aidl-cpp",
29    ],
30    export_static_lib_headers: [
31        "audioflinger-aidl-cpp",
32        "audiopolicy-aidl-cpp",
33        "av-types-aidl-cpp",
34    ],
35    target: {
36        darwin: {
37            enabled: false,
38        },
39    },
40}
41
42cc_library_shared {
43    name: "libaudiopolicy",
44    srcs: [
45        "AudioAttributes.cpp",
46        "AudioPolicy.cpp",
47        "AudioProductStrategy.cpp",
48        "AudioVolumeGroup.cpp",
49        "PolicyAidlConversion.cpp"
50    ],
51    shared_libs: [
52        "audioclient-types-aidl-cpp",
53        "audioflinger-aidl-cpp",
54        "audiopolicy-aidl-cpp",
55        "audiopolicy-types-aidl-cpp",
56        "capture_state_listener-aidl-cpp",
57        "libaudiofoundation",
58        "libaudioclient_aidl_conversion",
59        "libaudioutils",
60        "libbinder",
61        "libcutils",
62        "liblog",
63        "libutils",
64    ],
65    cflags: [
66        "-Werror",
67        "-Wall",
68    ],
69    include_dirs: ["system/media/audio_utils/include"],
70    export_include_dirs: ["include"],
71    export_shared_lib_headers: [
72        "audioclient-types-aidl-cpp",
73        "audioflinger-aidl-cpp",
74        "audiopolicy-aidl-cpp",
75        "audiopolicy-types-aidl-cpp",
76        "capture_state_listener-aidl-cpp",
77        "libaudiofoundation",
78        "libaudioclient_aidl_conversion",
79    ],
80    header_libs: ["libaudioclient_headers"],
81}
82
83cc_library {
84    name: "libaudioclient",
85
86    aidl: {
87        export_aidl_headers: true,
88        local_include_dirs: ["aidl"],
89        include_dirs: [
90            "frameworks/av/aidl",
91        ],
92    },
93
94    srcs: [
95        // AIDL files for audioclient interfaces
96        // The headers for these interfaces will be available to any modules that
97        // include libaudioclient, at the path "aidl/package/path/BnFoo.h"
98        ":libaudioclient_aidl",
99
100        "AudioEffect.cpp",
101        "AudioRecord.cpp",
102        "AudioSystem.cpp",
103        "AudioTrack.cpp",
104        "AudioTrackShared.cpp",
105        "IAudioFlinger.cpp",
106        "ToneGenerator.cpp",
107        "PlayerBase.cpp",
108        "RecordingActivityTracker.cpp",
109        "TrackPlayerBase.cpp",
110    ],
111    shared_libs: [
112        "audioclient-types-aidl-cpp",
113        "audioflinger-aidl-cpp",
114        "audiopolicy-aidl-cpp",
115        "audiopolicy-types-aidl-cpp",
116        "av-types-aidl-cpp",
117        "capture_state_listener-aidl-cpp",
118        "libaudioclient_aidl_conversion",
119        "libaudiofoundation",
120        "libaudioutils",
121        "libaudiopolicy",
122        "libaudiomanager",
123        "libbinder",
124        "libcutils",
125        "libdl",
126        "liblog",
127        "libmedia_helper",
128        "libmediametrics",
129        "libmediautils",
130        "libnblog",
131        "libprocessgroup",
132        "libshmemcompat",
133        "libutils",
134        "libvibrator",
135        "framework-permission-aidl-cpp",
136    ],
137    export_shared_lib_headers: [
138        "audioflinger-aidl-cpp",
139        "audiopolicy-aidl-cpp",
140        "framework-permission-aidl-cpp",
141        "libbinder",
142    ],
143
144    include_dirs: [
145        "frameworks/av/media/libnbaio/include_mono/",
146    ],
147    local_include_dirs: [
148        "include/media",
149        "aidl",
150    ],
151    header_libs: [
152        "libaudioclient_headers",
153        "libbase_headers",
154        "libmedia_headers",
155    ],
156    export_header_lib_headers: ["libaudioclient_headers"],
157    export_static_lib_headers: [
158        "effect-aidl-cpp",
159        "shared-file-region-aidl-cpp",
160    ],
161
162    static_libs: [
163        "effect-aidl-cpp",
164        // for memory heap analysis
165        "libc_malloc_debug_backtrace",
166        "shared-file-region-aidl-cpp",
167    ],
168    cflags: [
169        "-Wall",
170        "-Werror",
171        "-Wno-error=deprecated-declarations",
172    ],
173    sanitize: {
174        misc_undefined: [
175            "unsigned-integer-overflow",
176            "signed-integer-overflow",
177        ],
178    },
179}
180
181// This is intended for clients needing to include AidlConversionUtil.h, without dragging in a lot of extra
182// dependencies.
183cc_library_headers {
184    name: "libaudioclient_aidl_conversion_util",
185    host_supported: true,
186    vendor_available: true,
187    double_loadable: true,
188    min_sdk_version: "29",
189    export_include_dirs: [
190        "include",
191    ],
192    header_libs: [
193        "libbase_headers",
194    ],
195    export_header_lib_headers: [
196        "libbase_headers",
197    ],
198    apex_available: [
199        "//apex_available:platform",
200        "com.android.bluetooth.updatable",
201        "com.android.media",
202        "com.android.media.swcodec",
203    ],
204    target: {
205        darwin: {
206            enabled: false,
207        },
208    },
209}
210
211cc_library {
212    name: "libaudioclient_aidl_conversion",
213    srcs: ["AidlConversion.cpp"],
214    export_include_dirs: ["include"],
215    host_supported: true,
216    vendor_available: true,
217    double_loadable: true,
218    min_sdk_version: "29",
219    header_libs: [
220        "libaudioclient_aidl_conversion_util",
221        "libaudio_system_headers",
222    ],
223    export_header_lib_headers: [
224        "libaudioclient_aidl_conversion_util",
225    ],
226    shared_libs: [
227        "audioclient-types-aidl-cpp",
228        "libbase",
229        "libbinder",
230        "liblog",
231        "libshmemcompat",
232        "libutils",
233        "shared-file-region-aidl-cpp",
234        "framework-permission-aidl-cpp",
235    ],
236    export_shared_lib_headers: [
237        "audioclient-types-aidl-cpp",
238        "libbase",
239        "shared-file-region-aidl-cpp",
240    ],
241    cflags: [
242        "-Wall",
243        "-Werror",
244        "-Wno-error=deprecated-declarations",
245    ],
246    sanitize: {
247        misc_undefined: [
248            "unsigned-integer-overflow",
249            "signed-integer-overflow",
250        ],
251    },
252    target: {
253        darwin: {
254            enabled: false,
255        },
256    },
257}
258
259// AIDL interface between libaudioclient and framework.jar
260filegroup {
261    name: "libaudioclient_aidl",
262    srcs: [
263        "aidl/android/media/IPlayer.aidl",
264    ],
265    path: "aidl",
266}
267
268aidl_interface {
269    name: "capture_state_listener-aidl",
270    unstable: true,
271    local_include_dir: "aidl",
272    host_supported: true,
273    double_loadable: true,
274    vendor_available: true,
275    srcs: [
276        "aidl/android/media/ICaptureStateListener.aidl",
277    ],
278}
279
280aidl_interface {
281    name: "effect-aidl",
282    unstable: true,
283    local_include_dir: "aidl",
284    host_supported: true,
285    double_loadable: true,
286    vendor_available: true,
287    srcs: [
288        "aidl/android/media/IEffect.aidl",
289        "aidl/android/media/IEffectClient.aidl",
290    ],
291    imports: [
292        "shared-file-region-aidl",
293    ],
294}
295
296aidl_interface {
297    name: "audioclient-types-aidl",
298    unstable: true,
299    host_supported: true,
300    vendor_available: true,
301    double_loadable: true,
302    local_include_dir: "aidl",
303    srcs: [
304        "aidl/android/media/AudioAttributesInternal.aidl",
305        "aidl/android/media/AudioClient.aidl",
306        "aidl/android/media/AudioConfig.aidl",
307        "aidl/android/media/AudioConfigBase.aidl",
308        "aidl/android/media/AudioContentType.aidl",
309        "aidl/android/media/AudioDevice.aidl",
310        "aidl/android/media/AudioDualMonoMode.aidl",
311        "aidl/android/media/AudioEncapsulationMode.aidl",
312        "aidl/android/media/AudioEncapsulationMetadataType.aidl",
313        "aidl/android/media/AudioEncapsulationType.aidl",
314        "aidl/android/media/AudioFlag.aidl",
315        "aidl/android/media/AudioGain.aidl",
316        "aidl/android/media/AudioGainConfig.aidl",
317        "aidl/android/media/AudioGainMode.aidl",
318        "aidl/android/media/AudioInputFlags.aidl",
319        "aidl/android/media/AudioIoConfigEvent.aidl",
320        "aidl/android/media/AudioIoDescriptor.aidl",
321        "aidl/android/media/AudioIoFlags.aidl",
322        "aidl/android/media/AudioMixLatencyClass.aidl",
323        "aidl/android/media/AudioMode.aidl",
324        "aidl/android/media/AudioOffloadInfo.aidl",
325        "aidl/android/media/AudioOutputFlags.aidl",
326        "aidl/android/media/AudioPatch.aidl",
327        "aidl/android/media/AudioPlaybackRate.aidl",
328        "aidl/android/media/AudioPort.aidl",
329        "aidl/android/media/AudioPortConfig.aidl",
330        "aidl/android/media/AudioPortConfigType.aidl",
331        "aidl/android/media/AudioPortConfigDeviceExt.aidl",
332        "aidl/android/media/AudioPortConfigExt.aidl",
333        "aidl/android/media/AudioPortConfigMixExt.aidl",
334        "aidl/android/media/AudioPortConfigMixExtUseCase.aidl",
335        "aidl/android/media/AudioPortConfigSessionExt.aidl",
336        "aidl/android/media/AudioPortDeviceExt.aidl",
337        "aidl/android/media/AudioPortExt.aidl",
338        "aidl/android/media/AudioPortMixExt.aidl",
339        "aidl/android/media/AudioPortRole.aidl",
340        "aidl/android/media/AudioPortSessionExt.aidl",
341        "aidl/android/media/AudioPortType.aidl",
342        "aidl/android/media/AudioProfile.aidl",
343        "aidl/android/media/AudioSourceType.aidl",
344        "aidl/android/media/AudioStandard.aidl",
345        "aidl/android/media/AudioStreamType.aidl",
346        "aidl/android/media/AudioTimestampInternal.aidl",
347        "aidl/android/media/AudioUniqueIdUse.aidl",
348        "aidl/android/media/AudioUsage.aidl",
349        "aidl/android/media/AudioUuid.aidl",
350        "aidl/android/media/AudioVibratorInfo.aidl",
351        "aidl/android/media/EffectDescriptor.aidl",
352        "aidl/android/media/ExtraAudioDescriptor.aidl",
353        "aidl/android/media/TrackSecondaryOutputInfo.aidl",
354    ],
355    imports: [
356        "audio_common-aidl",
357        "framework-permission-aidl",
358    ],
359    backend: {
360        cpp: {
361            min_sdk_version: "29",
362            apex_available: [
363                "//apex_available:platform",
364                "com.android.media",
365            ],
366        },
367    },
368}
369aidl_interface {
370    name: "audiopolicy-types-aidl",
371    unstable: true,
372    host_supported: true,
373    vendor_available: true,
374    double_loadable: true,
375    local_include_dir: "aidl",
376    srcs: [
377        "aidl/android/media/AudioAttributesEx.aidl",
378        "aidl/android/media/AudioMix.aidl",
379        "aidl/android/media/AudioMixCallbackFlag.aidl",
380        "aidl/android/media/AudioMixMatchCriterion.aidl",
381        "aidl/android/media/AudioMixMatchCriterionValue.aidl",
382        "aidl/android/media/AudioMixRouteFlag.aidl",
383        "aidl/android/media/AudioMixType.aidl",
384        "aidl/android/media/AudioOffloadMode.aidl",
385        "aidl/android/media/AudioPolicyDeviceState.aidl",
386        "aidl/android/media/AudioPolicyForceUse.aidl",
387        "aidl/android/media/AudioPolicyForcedConfig.aidl",
388        "aidl/android/media/AudioProductStrategy.aidl",
389        "aidl/android/media/AudioVolumeGroup.aidl",
390        "aidl/android/media/DeviceRole.aidl",
391        "aidl/android/media/SoundTriggerSession.aidl",
392    ],
393    imports: [
394        "audio_common-aidl",
395        "audioclient-types-aidl",
396    ],
397    backend: {
398        cpp: {
399            min_sdk_version: "29",
400            apex_available: [
401                "//apex_available:platform",
402                "com.android.media",
403            ],
404        },
405    },
406}
407
408aidl_interface {
409    name: "audioflinger-aidl",
410    unstable: true,
411    local_include_dir: "aidl",
412    host_supported: true,
413    vendor_available: true,
414    srcs: [
415        "aidl/android/media/CreateEffectRequest.aidl",
416        "aidl/android/media/CreateEffectResponse.aidl",
417        "aidl/android/media/CreateRecordRequest.aidl",
418        "aidl/android/media/CreateRecordResponse.aidl",
419        "aidl/android/media/CreateTrackRequest.aidl",
420        "aidl/android/media/CreateTrackResponse.aidl",
421        "aidl/android/media/OpenInputRequest.aidl",
422        "aidl/android/media/OpenInputResponse.aidl",
423        "aidl/android/media/OpenOutputRequest.aidl",
424        "aidl/android/media/OpenOutputResponse.aidl",
425        "aidl/android/media/RenderPosition.aidl",
426
427        "aidl/android/media/IAudioFlingerService.aidl",
428        "aidl/android/media/IAudioFlingerClient.aidl",
429        "aidl/android/media/IAudioRecord.aidl",
430        "aidl/android/media/IAudioTrack.aidl",
431        "aidl/android/media/IAudioTrackCallback.aidl",
432    ],
433    imports: [
434        "audio_common-aidl",
435        "audioclient-types-aidl",
436        "av-types-aidl",
437        "effect-aidl",
438        "shared-file-region-aidl",
439        "framework-permission-aidl",
440    ],
441    double_loadable: true,
442    backend: {
443        cpp: {
444            min_sdk_version: "29",
445            apex_available: [
446                "//apex_available:platform",
447                "com.android.media",
448            ],
449        },
450    },
451}
452
453aidl_interface {
454    name: "audiopolicy-aidl",
455    unstable: true,
456    local_include_dir: "aidl",
457    host_supported: true,
458    vendor_available: true,
459    srcs: [
460        "aidl/android/media/GetInputForAttrResponse.aidl",
461        "aidl/android/media/GetOutputForAttrResponse.aidl",
462        "aidl/android/media/Int.aidl",
463        "aidl/android/media/RecordClientInfo.aidl",
464        "aidl/android/media/IAudioPolicyService.aidl",
465        "aidl/android/media/IAudioPolicyServiceClient.aidl",
466    ],
467    imports: [
468        "audio_common-aidl",
469        "audioclient-types-aidl",
470        "audiopolicy-types-aidl",
471        "capture_state_listener-aidl",
472        "framework-permission-aidl",
473    ],
474
475    double_loadable: true,
476    backend: {
477        cpp: {
478            min_sdk_version: "29",
479            apex_available: [
480                "//apex_available:platform",
481                "com.android.media",
482            ],
483        },
484    },
485}
486