• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1package {
2    default_team: "trendy_team_media_framework_audio",
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 "frameworks_av_license"
6    // to get the below license kinds:
7    //   SPDX-license-identifier-Apache-2.0
8    default_applicable_licenses: ["frameworks_av_license"],
9}
10
11cc_library_headers {
12    name: "libaudioclient_headers",
13    vendor_available: true,
14    min_sdk_version: "29",
15    apex_available: [
16        "//apex_available:platform",
17        "com.android.media",
18    ],
19    host_supported: true,
20
21    header_libs: [
22        "libaudiofoundation_headers",
23    ],
24    export_include_dirs: [
25        "include",
26    ],
27    export_header_lib_headers: [
28        "libaudiofoundation_headers",
29    ],
30    static_libs: [
31        "audioflinger-aidl-cpp",
32        "audiopolicy-aidl-cpp",
33        "av-types-aidl-cpp",
34        "spatializer-aidl-cpp",
35    ],
36    export_static_lib_headers: [
37        "audioflinger-aidl-cpp",
38        "audiopolicy-aidl-cpp",
39        "av-types-aidl-cpp",
40        "spatializer-aidl-cpp",
41    ],
42    target: {
43        darwin: {
44            enabled: false,
45        },
46    },
47}
48
49cc_library {
50    name: "libaudiopolicy",
51    srcs: [
52        "AudioPolicy.cpp",
53        "AudioProductStrategy.cpp",
54        "AudioVolumeGroup.cpp",
55        "PolicyAidlConversion.cpp",
56        "VolumeGroupAttributes.cpp",
57    ],
58    defaults: [
59        "latest_android_media_audio_common_types_cpp_export_shared",
60    ],
61    shared_libs: [
62        "audioclient-types-aidl-cpp",
63        "audioflinger-aidl-cpp",
64        "audiopolicy-aidl-cpp",
65        "audiopolicy-types-aidl-cpp",
66        "capture_state_listener-aidl-cpp",
67        "framework-permission-aidl-cpp",
68        "libaudioclient_aidl_conversion",
69        "libaudiofoundation",
70        "libaudioutils",
71        "libbinder",
72        "libcutils",
73        "liblog",
74        "libutils",
75    ],
76    cflags: [
77        "-Wall",
78        "-Werror",
79    ],
80    include_dirs: ["system/media/audio_utils/include"],
81    export_include_dirs: ["include"],
82    export_shared_lib_headers: [
83        "audioclient-types-aidl-cpp",
84        "audioflinger-aidl-cpp",
85        "audiopolicy-aidl-cpp",
86        "audiopolicy-types-aidl-cpp",
87        "capture_state_listener-aidl-cpp",
88        "libaudioclient_aidl_conversion",
89        "libaudiofoundation",
90    ],
91    header_libs: ["libaudioclient_headers"],
92}
93
94cc_library {
95    name: "libaudioclient",
96
97    aidl: {
98        export_aidl_headers: true,
99        local_include_dirs: ["aidl"],
100        include_dirs: [
101            "frameworks/av/aidl",
102        ],
103    },
104
105    srcs: [
106        // AIDL files for audioclient interfaces
107        // The headers for these interfaces will be available to any modules that
108        // include libaudioclient, at the path "aidl/package/path/BnFoo.h"
109        ":libaudioclient_aidl",
110
111        "AudioEffect.cpp",
112        "AudioRecord.cpp",
113        "AudioSystem.cpp",
114        "AudioTrack.cpp",
115        "AudioTrackShared.cpp",
116        "IAudioFlinger.cpp",
117        "PlayerBase.cpp",
118        "RecordingActivityTracker.cpp",
119        "ToneGenerator.cpp",
120        "TrackPlayerBase.cpp",
121    ],
122    defaults: [
123        "latest_android_media_audio_common_types_cpp_shared",
124    ],
125    shared_libs: [
126        "android.media.audiopolicy-aconfig-cc",
127        "audioclient-types-aidl-cpp",
128        "audioflinger-aidl-cpp",
129        "audiopolicy-aidl-cpp",
130        "audiopolicy-types-aidl-cpp",
131        "av-types-aidl-cpp",
132        "capture_state_listener-aidl-cpp",
133        "com.android.media.audioclient-aconfig-cc",
134        "framework-permission-aidl-cpp",
135        "libaudio_aidl_conversion_common_cpp",
136        "libaudioclient_aidl_conversion",
137        "libaudiofoundation",
138        "libaudiomanager",
139        "libaudiopolicy",
140        "libaudioutils",
141        "libbinder",
142        "libcutils",
143        "libdl",
144        "liblog",
145        "libmedia_helper",
146        "libmediametrics",
147        "libmediautils",
148        "libnblog",
149        "libprocessgroup",
150        "libshmemcompat",
151        "libutils",
152        "packagemanager_aidl-cpp",
153        "spatializer-aidl-cpp",
154    ],
155    export_shared_lib_headers: [
156        "audioflinger-aidl-cpp",
157        "audiopolicy-aidl-cpp",
158        "framework-permission-aidl-cpp",
159        "libbinder",
160        "libmediametrics",
161        "spatializer-aidl-cpp",
162    ],
163
164    include_dirs: [
165        "frameworks/av/media/libnbaio/include_mono/",
166    ],
167    local_include_dirs: [
168        "aidl",
169        "include/media",
170    ],
171    header_libs: [
172        "libaudioclient_headers",
173        "libbase_headers",
174        "libmedia_headers",
175    ],
176    export_header_lib_headers: ["libaudioclient_headers"],
177    export_static_lib_headers: [
178        "effect-aidl-cpp",
179        "shared-file-region-aidl-cpp",
180    ],
181
182    static_libs: [
183        "effect-aidl-cpp",
184        // for memory heap analysis
185        "libc_malloc_debug_backtrace",
186        "shared-file-region-aidl-cpp",
187    ],
188    cflags: [
189        "-Wall",
190        "-Werror",
191        "-Wno-error=deprecated-declarations",
192        "-Wthread-safety",
193    ],
194    sanitize: {
195        misc_undefined: [
196            "signed-integer-overflow",
197            "unsigned-integer-overflow",
198        ],
199    },
200}
201
202cc_library {
203    name: "libaudioclient_aidl_conversion",
204    srcs: ["AidlConversion.cpp"],
205    shared_libs: [
206        "audioclient-types-aidl-cpp",
207        "av-types-aidl-cpp",
208    ],
209    static_libs: [
210        "libaudio_aidl_conversion_common_cpp",
211    ],
212    export_include_dirs: ["include"],
213    header_libs: [
214        "libaudio_aidl_conversion_common_util_cpp",
215    ],
216    export_header_lib_headers: [
217        "libaudio_aidl_conversion_common_util_cpp",
218    ],
219    export_shared_lib_headers: [
220        "audioclient-types-aidl-cpp",
221        "av-types-aidl-cpp",
222    ],
223    defaults: [
224        "audio_aidl_conversion_common_default",
225        "audio_aidl_conversion_common_default_cpp",
226        "latest_android_media_audio_common_types_cpp_export_shared",
227    ],
228}
229
230// AIDL interface between libaudioclient and framework.jar
231filegroup {
232    name: "libaudioclient_aidl",
233    srcs: [
234        "aidl/android/media/AudioHalVersion.aidl",
235        "aidl/android/media/IPlayer.aidl",
236    ],
237    path: "aidl",
238}
239
240aidl_interface {
241    name: "capture_state_listener-aidl",
242    unstable: true,
243    local_include_dir: "aidl",
244    host_supported: true,
245    double_loadable: true,
246    vendor_available: true,
247    srcs: [
248        "aidl/android/media/ICaptureStateListener.aidl",
249    ],
250}
251
252aidl_interface {
253    name: "effect-aidl",
254    unstable: true,
255    local_include_dir: "aidl",
256    host_supported: true,
257    double_loadable: true,
258    vendor_available: true,
259    srcs: [
260        "aidl/android/media/EffectConfig.aidl",
261        "aidl/android/media/IEffect.aidl",
262        "aidl/android/media/IEffectClient.aidl",
263    ],
264    defaults: [
265        "latest_android_media_audio_common_types_import_interface",
266    ],
267    imports: [
268        "shared-file-region-aidl",
269    ],
270    backend: {
271        cpp: {
272            min_sdk_version: "29",
273            apex_available: [
274                "//apex_available:platform",
275                "com.android.media",
276            ],
277        },
278        java: {
279            sdk_version: "module_current",
280        },
281    },
282}
283
284aidl_interface {
285    name: "audioclient-types-aidl",
286    unstable: true,
287    host_supported: true,
288    vendor_available: true,
289    double_loadable: true,
290    local_include_dir: "aidl",
291    srcs: [
292        "aidl/android/media/AudioClient.aidl",
293        "aidl/android/media/AudioDirectMode.aidl",
294        "aidl/android/media/AudioGainSys.aidl",
295        "aidl/android/media/AudioHalVersion.aidl",
296        "aidl/android/media/AudioHwModule.aidl",
297        "aidl/android/media/AudioIoConfigEvent.aidl",
298        "aidl/android/media/AudioIoDescriptor.aidl",
299        "aidl/android/media/AudioPatchFw.aidl",
300        "aidl/android/media/AudioPolicyConfig.aidl",
301        "aidl/android/media/AudioPortConfigFw.aidl",
302        "aidl/android/media/AudioPortConfigSys.aidl",
303        "aidl/android/media/AudioPortDeviceExtSys.aidl",
304        "aidl/android/media/AudioPortExtSys.aidl",
305        "aidl/android/media/AudioPortFw.aidl",
306        "aidl/android/media/AudioPortMixExtSys.aidl",
307        "aidl/android/media/AudioPortRole.aidl",
308        "aidl/android/media/AudioPortSys.aidl",
309        "aidl/android/media/AudioPortType.aidl",
310        "aidl/android/media/AudioProfileSys.aidl",
311        "aidl/android/media/AudioRoute.aidl",
312        "aidl/android/media/AudioTimestampInternal.aidl",
313        "aidl/android/media/AudioUniqueIdUse.aidl",
314        "aidl/android/media/AudioVibratorInfo.aidl",
315        "aidl/android/media/DeviceConnectedState.aidl",
316        "aidl/android/media/EffectDescriptor.aidl",
317        "aidl/android/media/SurroundSoundConfig.aidl",
318        "aidl/android/media/TrackInternalMuteInfo.aidl",
319        "aidl/android/media/TrackSecondaryOutputInfo.aidl",
320    ],
321    defaults: [
322        "latest_android_media_audio_common_types_import_interface",
323    ],
324    imports: [
325        "framework-permission-aidl",
326    ],
327    backend: {
328        cpp: {
329            min_sdk_version: "29",
330            apex_available: [
331                "//apex_available:platform",
332                "com.android.media",
333            ],
334        },
335        java: {
336            sdk_version: "module_current",
337        },
338    },
339}
340
341aidl_interface {
342    name: "audiopolicy-types-aidl",
343    unstable: true,
344    host_supported: true,
345    vendor_available: true,
346    double_loadable: true,
347    local_include_dir: "aidl",
348    srcs: [
349        "aidl/android/media/AudioAttributesEx.aidl",
350        "aidl/android/media/AudioMix.aidl",
351        "aidl/android/media/AudioMixCallbackFlag.aidl",
352        "aidl/android/media/AudioMixMatchCriterion.aidl",
353        "aidl/android/media/AudioMixMatchCriterionValue.aidl",
354        "aidl/android/media/AudioMixRouteFlag.aidl",
355        "aidl/android/media/AudioMixType.aidl",
356        "aidl/android/media/AudioMixUpdate.aidl",
357        "aidl/android/media/AudioMixerAttributesInternal.aidl",
358        "aidl/android/media/AudioMixerBehavior.aidl",
359        "aidl/android/media/AudioOffloadMode.aidl",
360        "aidl/android/media/AudioPolicyDeviceState.aidl",
361        "aidl/android/media/AudioPolicyForceUse.aidl",
362        "aidl/android/media/AudioPolicyForcedConfig.aidl",
363        "aidl/android/media/AudioProductStrategy.aidl",
364        "aidl/android/media/AudioVolumeGroup.aidl",
365        "aidl/android/media/DeviceRole.aidl",
366        "aidl/android/media/SoundTriggerSession.aidl",
367    ],
368    defaults: [
369        "latest_android_media_audio_common_types_import_interface",
370    ],
371    imports: [
372        "audioclient-types-aidl",
373        "framework-permission-aidl",
374    ],
375    backend: {
376        cpp: {
377            min_sdk_version: "29",
378            apex_available: [
379                "//apex_available:platform",
380                "com.android.media",
381            ],
382        },
383        java: {
384            sdk_version: "module_current",
385        },
386    },
387}
388
389aidl_interface {
390    name: "audioflinger-aidl",
391    unstable: true,
392    local_include_dir: "aidl",
393    host_supported: true,
394    vendor_available: true,
395    srcs: [
396        "aidl/android/media/CreateEffectRequest.aidl",
397        "aidl/android/media/CreateEffectResponse.aidl",
398        "aidl/android/media/CreateRecordRequest.aidl",
399        "aidl/android/media/CreateRecordResponse.aidl",
400        "aidl/android/media/CreateTrackRequest.aidl",
401        "aidl/android/media/CreateTrackResponse.aidl",
402        "aidl/android/media/OpenInputRequest.aidl",
403        "aidl/android/media/OpenInputResponse.aidl",
404        "aidl/android/media/OpenOutputRequest.aidl",
405        "aidl/android/media/OpenOutputResponse.aidl",
406        "aidl/android/media/RenderPosition.aidl",
407
408        "aidl/android/media/IAudioFlingerClient.aidl",
409        "aidl/android/media/IAudioFlingerService.aidl",
410        "aidl/android/media/IAudioRecord.aidl",
411        "aidl/android/media/IAudioTrack.aidl",
412        "aidl/android/media/IAudioTrackCallback.aidl",
413
414        "aidl/android/media/ISoundDose.aidl",
415        "aidl/android/media/ISoundDoseCallback.aidl",
416        "aidl/android/media/SoundDoseRecord.aidl",
417    ],
418    defaults: [
419        "latest_android_media_audio_common_types_import_interface",
420    ],
421    imports: [
422        "audioclient-types-aidl",
423        "av-types-aidl",
424        "effect-aidl",
425        "framework-permission-aidl",
426        "shared-file-region-aidl",
427    ],
428    double_loadable: true,
429    backend: {
430        cpp: {
431            min_sdk_version: "29",
432            apex_available: [
433                "//apex_available:platform",
434                "com.android.media",
435            ],
436        },
437        java: {
438            sdk_version: "module_current",
439        },
440    },
441}
442
443aidl_interface {
444    name: "audiopolicy-aidl",
445    unstable: true,
446    local_include_dir: "aidl",
447    host_supported: true,
448    vendor_available: true,
449    srcs: [
450        "aidl/android/media/GetInputForAttrResponse.aidl",
451        "aidl/android/media/GetOutputForAttrResponse.aidl",
452        "aidl/android/media/GetSpatializerResponse.aidl",
453        "aidl/android/media/IAudioPolicyService.aidl",
454        "aidl/android/media/IAudioPolicyServiceClient.aidl",
455        "aidl/android/media/RecordClientInfo.aidl",
456    ],
457    defaults: [
458        "latest_android_media_audio_common_types_import_interface",
459    ],
460    imports: [
461        "audio-permission-aidl",
462        "audioclient-types-aidl",
463        "audiopolicy-types-aidl",
464        "capture_state_listener-aidl",
465        "framework-permission-aidl",
466        "spatializer-aidl",
467    ],
468
469    double_loadable: true,
470    backend: {
471        cpp: {
472            min_sdk_version: "29",
473            apex_available: [
474                "//apex_available:platform",
475                "com.android.media",
476            ],
477        },
478        java: {
479            sdk_version: "module_current",
480        },
481    },
482}
483
484aidl_interface {
485    name: "spatializer-aidl",
486    unstable: true,
487    local_include_dir: "aidl",
488    host_supported: true,
489    vendor_available: true,
490    srcs: [
491        "aidl/android/media/INativeSpatializerCallback.aidl",
492        "aidl/android/media/ISpatializer.aidl",
493        "aidl/android/media/ISpatializerHeadTrackingCallback.aidl",
494    ],
495    defaults: [
496        "latest_android_media_audio_common_types_import_interface",
497    ],
498    imports: [
499        "audiopolicy-types-aidl",
500    ],
501
502    double_loadable: true,
503    backend: {
504        cpp: {
505            min_sdk_version: "29",
506            apex_available: [
507                "//apex_available:platform",
508                "com.android.media",
509            ],
510        },
511        java: {
512            sdk_version: "module_current",
513        },
514    },
515}
516
517aidl_interface {
518    name: "sounddose-aidl",
519    unstable: true,
520    local_include_dir: "aidl",
521    srcs: [
522        "aidl/android/media/ISoundDose.aidl",
523        "aidl/android/media/ISoundDoseCallback.aidl",
524        "aidl/android/media/SoundDoseRecord.aidl",
525    ],
526
527    double_loadable: true,
528    backend: {
529        java: {
530            sdk_version: "module_current",
531        },
532    },
533}
534