package { // See: http://go/android-license-faq // A large-scale-change added 'default_applicable_licenses' to import // all of the 'license_kinds' from "frameworks_av_license" // to get the below license kinds: // SPDX-license-identifier-Apache-2.0 default_applicable_licenses: ["frameworks_av_license"], } cc_library_headers { name: "libaudioclient_headers", vendor_available: true, min_sdk_version: "29", apex_available: [ "//apex_available:platform", "com.android.media", ], host_supported: true, header_libs: [ "libaudiofoundation_headers", ], export_include_dirs: [ "include", ], export_header_lib_headers: [ "libaudiofoundation_headers", ], static_libs: [ "audioflinger-aidl-cpp", "audiopolicy-aidl-cpp", "spatializer-aidl-cpp", "av-types-aidl-cpp", ], export_static_lib_headers: [ "audioflinger-aidl-cpp", "audiopolicy-aidl-cpp", "spatializer-aidl-cpp", "av-types-aidl-cpp", ], target: { darwin: { enabled: false, }, }, } cc_library { name: "libaudiopolicy", srcs: [ "AudioAttributes.cpp", "AudioPolicy.cpp", "AudioProductStrategy.cpp", "AudioVolumeGroup.cpp", "PolicyAidlConversion.cpp" ], shared_libs: [ "android.media.audio.common.types-V1-cpp", "audioclient-types-aidl-cpp", "audioflinger-aidl-cpp", "audiopolicy-aidl-cpp", "audiopolicy-types-aidl-cpp", "capture_state_listener-aidl-cpp", "libaudiofoundation", "libaudioclient_aidl_conversion", "libaudioutils", "libbinder", "libcutils", "liblog", "libutils", ], cflags: [ "-Werror", "-Wall", ], include_dirs: ["system/media/audio_utils/include"], export_include_dirs: ["include"], export_shared_lib_headers: [ "android.media.audio.common.types-V1-cpp", "audioclient-types-aidl-cpp", "audioflinger-aidl-cpp", "audiopolicy-aidl-cpp", "audiopolicy-types-aidl-cpp", "capture_state_listener-aidl-cpp", "libaudiofoundation", "libaudioclient_aidl_conversion", ], header_libs: ["libaudioclient_headers"], } cc_library { name: "libaudioclient", aidl: { export_aidl_headers: true, local_include_dirs: ["aidl"], include_dirs: [ "frameworks/av/aidl", ], }, srcs: [ // AIDL files for audioclient interfaces // The headers for these interfaces will be available to any modules that // include libaudioclient, at the path "aidl/package/path/BnFoo.h" ":libaudioclient_aidl", "AudioEffect.cpp", "AudioRecord.cpp", "AudioSystem.cpp", "AudioTrack.cpp", "AudioTrackShared.cpp", "IAudioFlinger.cpp", "ToneGenerator.cpp", "PlayerBase.cpp", "RecordingActivityTracker.cpp", "TrackPlayerBase.cpp", ], shared_libs: [ "android.media.audio.common.types-V1-cpp", "audioclient-types-aidl-cpp", "audioflinger-aidl-cpp", "audiopolicy-aidl-cpp", "spatializer-aidl-cpp", "audiopolicy-types-aidl-cpp", "av-types-aidl-cpp", "capture_state_listener-aidl-cpp", "libaudioclient_aidl_conversion", "libaudiofoundation", "libaudioutils", "libaudiopolicy", "libaudiomanager", "libbinder", "libcutils", "libdl", "liblog", "libmedia_helper", "libmediametrics", "libmediautils", "libnblog", "libprocessgroup", "libshmemcompat", "libutils", "framework-permission-aidl-cpp", "packagemanager_aidl-cpp", ], export_shared_lib_headers: [ "audioflinger-aidl-cpp", "audiopolicy-aidl-cpp", "spatializer-aidl-cpp", "framework-permission-aidl-cpp", "libbinder", "libmediametrics", ], include_dirs: [ "frameworks/av/media/libnbaio/include_mono/", ], local_include_dirs: [ "include/media", "aidl", ], header_libs: [ "libaudioclient_headers", "libbase_headers", "libmedia_headers", ], export_header_lib_headers: ["libaudioclient_headers"], export_static_lib_headers: [ "effect-aidl-cpp", "shared-file-region-aidl-cpp", ], static_libs: [ "effect-aidl-cpp", // for memory heap analysis "libc_malloc_debug_backtrace", "shared-file-region-aidl-cpp", ], cflags: [ "-Wall", "-Werror", "-Wno-error=deprecated-declarations", ], sanitize: { misc_undefined: [ "unsigned-integer-overflow", "signed-integer-overflow", ], }, } // This is intended for clients needing to include AidlConversionUtil.h, without dragging in a lot of extra // dependencies. cc_library_headers { name: "libaudioclient_aidl_conversion_util", host_supported: true, vendor_available: true, double_loadable: true, min_sdk_version: "29", export_include_dirs: [ "include", ], header_libs: [ "libbase_headers", "liberror_headers", ], export_header_lib_headers: [ "libbase_headers", "liberror_headers", ], apex_available: [ "//apex_available:platform", "com.android.bluetooth", "com.android.media", "com.android.media.swcodec", ], target: { darwin: { enabled: false, }, }, } cc_library { name: "libaudioclient_aidl_conversion", srcs: ["AidlConversion.cpp"], export_include_dirs: ["include"], host_supported: true, vendor_available: true, double_loadable: true, min_sdk_version: "29", header_libs: [ "libaudioclient_aidl_conversion_util", "libaudio_system_headers", ], export_header_lib_headers: [ "libaudioclient_aidl_conversion_util", ], shared_libs: [ "android.media.audio.common.types-V1-cpp", "audioclient-types-aidl-cpp", "libbase", "libbinder", "liblog", "libshmemcompat", "libstagefright_foundation", "libutils", "shared-file-region-aidl-cpp", "framework-permission-aidl-cpp", ], export_shared_lib_headers: [ "android.media.audio.common.types-V1-cpp", "audioclient-types-aidl-cpp", "libbase", "shared-file-region-aidl-cpp", ], cflags: [ "-Wall", "-Werror", "-Wno-error=deprecated-declarations", ], sanitize: { misc_undefined: [ "unsigned-integer-overflow", "signed-integer-overflow", ], }, target: { darwin: { enabled: false, }, }, } // AIDL interface between libaudioclient and framework.jar filegroup { name: "libaudioclient_aidl", srcs: [ "aidl/android/media/IPlayer.aidl", ], path: "aidl", } aidl_interface { name: "capture_state_listener-aidl", unstable: true, local_include_dir: "aidl", host_supported: true, double_loadable: true, vendor_available: true, srcs: [ "aidl/android/media/ICaptureStateListener.aidl", ], } aidl_interface { name: "effect-aidl", unstable: true, local_include_dir: "aidl", host_supported: true, double_loadable: true, vendor_available: true, srcs: [ "aidl/android/media/IEffect.aidl", "aidl/android/media/IEffectClient.aidl", ], imports: [ "shared-file-region-aidl", ], } aidl_interface { name: "audioclient-types-aidl", unstable: true, host_supported: true, vendor_available: true, double_loadable: true, local_include_dir: "aidl", srcs: [ "aidl/android/media/AudioAttributesInternal.aidl", "aidl/android/media/AudioClient.aidl", "aidl/android/media/AudioDirectMode.aidl", "aidl/android/media/AudioDualMonoMode.aidl", "aidl/android/media/AudioFlag.aidl", "aidl/android/media/AudioGainSys.aidl", "aidl/android/media/AudioIoConfigEvent.aidl", "aidl/android/media/AudioIoDescriptor.aidl", "aidl/android/media/AudioPatch.aidl", "aidl/android/media/AudioPlaybackRate.aidl", "aidl/android/media/AudioPort.aidl", "aidl/android/media/AudioPortSys.aidl", "aidl/android/media/AudioPortConfig.aidl", "aidl/android/media/AudioPortConfigSys.aidl", "aidl/android/media/AudioPortDeviceExtSys.aidl", "aidl/android/media/AudioPortExtSys.aidl", "aidl/android/media/AudioPortMixExtSys.aidl", "aidl/android/media/AudioPortRole.aidl", "aidl/android/media/AudioPortType.aidl", "aidl/android/media/AudioProfileSys.aidl", "aidl/android/media/AudioTimestampInternal.aidl", "aidl/android/media/AudioUniqueIdUse.aidl", "aidl/android/media/AudioVibratorInfo.aidl", "aidl/android/media/EffectDescriptor.aidl", "aidl/android/media/LatencyMode.aidl", "aidl/android/media/TrackSecondaryOutputInfo.aidl", ], imports: [ "android.media.audio.common.types-V1", "framework-permission-aidl", ], backend: { cpp: { min_sdk_version: "29", apex_available: [ "//apex_available:platform", "com.android.media", ], }, java: { sdk_version: "module_current", }, }, } aidl_interface { name: "audiopolicy-types-aidl", unstable: true, host_supported: true, vendor_available: true, double_loadable: true, local_include_dir: "aidl", srcs: [ "aidl/android/media/AudioAttributesEx.aidl", "aidl/android/media/AudioMix.aidl", "aidl/android/media/AudioMixCallbackFlag.aidl", "aidl/android/media/AudioMixMatchCriterion.aidl", "aidl/android/media/AudioMixMatchCriterionValue.aidl", "aidl/android/media/AudioMixRouteFlag.aidl", "aidl/android/media/AudioMixType.aidl", "aidl/android/media/AudioOffloadMode.aidl", "aidl/android/media/AudioPolicyDeviceState.aidl", "aidl/android/media/AudioPolicyForceUse.aidl", "aidl/android/media/AudioPolicyForcedConfig.aidl", "aidl/android/media/AudioProductStrategy.aidl", "aidl/android/media/AudioVolumeGroup.aidl", "aidl/android/media/DeviceRole.aidl", "aidl/android/media/SoundTriggerSession.aidl", "aidl/android/media/SpatializationLevel.aidl", "aidl/android/media/SpatializationMode.aidl", "aidl/android/media/SpatializerHeadTrackingMode.aidl", ], imports: [ "android.media.audio.common.types-V1", "audioclient-types-aidl", ], backend: { cpp: { min_sdk_version: "29", apex_available: [ "//apex_available:platform", "com.android.media", ], }, java: { sdk_version: "module_current", }, }, } aidl_interface { name: "audioflinger-aidl", unstable: true, local_include_dir: "aidl", host_supported: true, vendor_available: true, srcs: [ "aidl/android/media/CreateEffectRequest.aidl", "aidl/android/media/CreateEffectResponse.aidl", "aidl/android/media/CreateRecordRequest.aidl", "aidl/android/media/CreateRecordResponse.aidl", "aidl/android/media/CreateTrackRequest.aidl", "aidl/android/media/CreateTrackResponse.aidl", "aidl/android/media/OpenInputRequest.aidl", "aidl/android/media/OpenInputResponse.aidl", "aidl/android/media/OpenOutputRequest.aidl", "aidl/android/media/OpenOutputResponse.aidl", "aidl/android/media/RenderPosition.aidl", "aidl/android/media/IAudioFlingerService.aidl", "aidl/android/media/IAudioFlingerClient.aidl", "aidl/android/media/IAudioRecord.aidl", "aidl/android/media/IAudioTrack.aidl", "aidl/android/media/IAudioTrackCallback.aidl", ], imports: [ "android.media.audio.common.types-V1", "audioclient-types-aidl", "av-types-aidl", "effect-aidl", "shared-file-region-aidl", "framework-permission-aidl", ], double_loadable: true, backend: { cpp: { min_sdk_version: "29", apex_available: [ "//apex_available:platform", "com.android.media", ], }, java: { sdk_version: "module_current", }, }, } aidl_interface { name: "audiopolicy-aidl", unstable: true, local_include_dir: "aidl", host_supported: true, vendor_available: true, srcs: [ "aidl/android/media/GetInputForAttrResponse.aidl", "aidl/android/media/GetOutputForAttrResponse.aidl", "aidl/android/media/GetSpatializerResponse.aidl", "aidl/android/media/RecordClientInfo.aidl", "aidl/android/media/IAudioPolicyService.aidl", "aidl/android/media/IAudioPolicyServiceClient.aidl", ], imports: [ "android.media.audio.common.types-V1", "audioclient-types-aidl", "audiopolicy-types-aidl", "capture_state_listener-aidl", "framework-permission-aidl", "spatializer-aidl", ], double_loadable: true, backend: { cpp: { min_sdk_version: "29", apex_available: [ "//apex_available:platform", "com.android.media", ], }, java: { sdk_version: "module_current", }, }, } aidl_interface { name: "spatializer-aidl", unstable: true, local_include_dir: "aidl", host_supported: true, vendor_available: true, srcs: [ "aidl/android/media/INativeSpatializerCallback.aidl", "aidl/android/media/ISpatializer.aidl", "aidl/android/media/ISpatializerHeadTrackingCallback.aidl", ], imports: [ "audiopolicy-types-aidl", ], double_loadable: true, backend: { cpp: { min_sdk_version: "29", apex_available: [ "//apex_available:platform", "com.android.media", ], }, java: { sdk_version: "module_current", }, }, }