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_defaults { 11 name: "audio_aidl_conversion_common_util_default", 12 host_supported: true, 13 vendor_available: true, 14 double_loadable: true, 15 min_sdk_version: "29", 16 export_include_dirs: [ 17 "include", 18 ], 19 header_libs: [ 20 "libbase_headers", 21 "liberror_headers", 22 ], 23 export_header_lib_headers: [ 24 "libbase_headers", 25 "liberror_headers", 26 ], 27 apex_available: [ 28 "//apex_available:platform", 29 "com.android.btservices", 30 "com.android.media", 31 "com.android.media.swcodec", 32 ], 33 target: { 34 darwin: { 35 enabled: false, 36 }, 37 }, 38} 39 40// This is intended for clients needing to include AidlConversionUtil.h, without extra dependencies. 41cc_library_headers { 42 name: "libaudio_aidl_conversion_common_util_cpp", 43 defaults: [ 44 "audio_aidl_conversion_common_util_default", 45 ], 46} 47 48cc_library_headers { 49 name: "libaudio_aidl_conversion_common_util_ndk", 50 defaults: [ 51 "audio_aidl_conversion_common_util_default", 52 ], 53 cflags: [ 54 "-DBACKEND_NDK", 55 ], 56} 57 58cc_defaults { 59 name: "audio_aidl_conversion_common_default_cpp", 60 shared_libs: [ 61 "framework-permission-aidl-cpp", 62 "libbinder", 63 "libshmemcompat", 64 "shared-file-region-aidl-cpp", 65 ], 66 export_shared_lib_headers: [ 67 "shared-file-region-aidl-cpp", 68 ], 69} 70 71cc_defaults { 72 name: "audio_aidl_conversion_common_default", 73 export_include_dirs: ["include"], 74 host_supported: true, 75 vendor_available: true, 76 double_loadable: true, 77 header_libs: [ 78 "libaudio_system_headers", 79 "libhardware_headers", 80 ], 81 shared_libs: [ 82 "libbase", 83 "liblog", 84 "libstagefright_foundation", 85 "libutils", 86 ], 87 export_shared_lib_headers: [ 88 "libbase", 89 ], 90 cflags: [ 91 "-Wall", 92 "-Werror", 93 "-Wno-error=deprecated-declarations", 94 ], 95 sanitize: { 96 misc_undefined: [ 97 "signed-integer-overflow", 98 "unsigned-integer-overflow", 99 ], 100 }, 101 target: { 102 darwin: { 103 enabled: false, 104 }, 105 }, 106} 107 108/** 109 * Only AIDL CPP backend conversion supported. 110 */ 111cc_library { 112 name: "libaudio_aidl_conversion_common_cpp", 113 srcs: [ 114 "AidlConversionCppNdk.cpp", 115 ], 116 header_libs: [ 117 "libaudio_aidl_conversion_common_util_cpp", 118 ], 119 export_header_lib_headers: [ 120 "libaudio_aidl_conversion_common_util_cpp", 121 ], 122 defaults: [ 123 "audio_aidl_conversion_common_default", 124 "audio_aidl_conversion_common_default_cpp", 125 "latest_android_media_audio_common_types_cpp_export_shared", 126 ], 127 min_sdk_version: "29", 128} 129 130/** 131 * Only AIDL NDK backend conversion supported. 132 */ 133cc_library { 134 name: "libaudio_aidl_conversion_common_ndk", 135 srcs: [ 136 "AidlConversionCppNdk.cpp", 137 "AidlConversionNdk.cpp", 138 ], 139 header_libs: [ 140 "libaudio_aidl_conversion_common_util_ndk", 141 ], 142 export_header_lib_headers: [ 143 "libaudio_aidl_conversion_common_util_ndk", 144 ], 145 defaults: [ 146 "audio_aidl_conversion_common_default", 147 "latest_android_hardware_audio_common_ndk_shared", 148 "latest_android_media_audio_common_types_ndk_shared", 149 ], 150 shared_libs: [ 151 "libbase", 152 "libbinder_ndk", 153 ], 154 static_libs: [ 155 "libaudioaidlcommon", 156 ], 157 cflags: [ 158 "-DBACKEND_NDK", 159 ], 160 min_sdk_version: "31", //AParcelableHolder has been introduced in 31 161} 162 163/** 164 * Only including AIDL core HAL conversion. 165 */ 166cc_library { 167 name: "libaudio_aidl_conversion_core_ndk", 168 srcs: [ 169 "AidlConversionCore.cpp", 170 ], 171 header_libs: [ 172 "libaudio_aidl_conversion_common_util_ndk", 173 ], 174 export_header_lib_headers: [ 175 "libaudio_aidl_conversion_common_util_ndk", 176 ], 177 defaults: [ 178 "audio_aidl_conversion_common_default", 179 "latest_android_hardware_audio_common_ndk_shared", 180 "latest_android_hardware_audio_core_ndk_shared", 181 "latest_android_media_audio_common_types_ndk_shared", 182 ], 183 shared_libs: [ 184 "libaudio_aidl_conversion_common_ndk", 185 "libbase", 186 "libbinder_ndk", 187 ], 188 cflags: [ 189 "-DBACKEND_NDK", 190 ], 191 min_sdk_version: "31", //AParcelableHolder has been introduced in 31 192} 193 194/** 195 * Only including AIDL effect HAL conversion. 196 */ 197cc_library { 198 name: "libaudio_aidl_conversion_effect_ndk", 199 srcs: [ 200 "AidlConversionEffect.cpp", 201 ], 202 header_libs: [ 203 "libaudio_aidl_conversion_common_util_ndk", 204 ], 205 export_header_lib_headers: [ 206 "libaudio_aidl_conversion_common_util_ndk", 207 ], 208 defaults: [ 209 "audio_aidl_conversion_common_default", 210 "latest_android_hardware_audio_common_ndk_shared", 211 "latest_android_hardware_audio_effect_ndk_shared", 212 "latest_android_media_audio_common_types_ndk_shared", 213 ], 214 shared_libs: [ 215 "libaudio_aidl_conversion_common_ndk", 216 "libbase", 217 "libbinder_ndk", 218 ], 219 cflags: [ 220 "-DBACKEND_NDK", 221 ], 222 min_sdk_version: "31", //AParcelableHolder has been introduced in 31 223} 224 225/** 226 * Conversions between the NDK and CPP backends for common types. 227 */ 228cc_library { 229 name: "libaudio_aidl_conversion_common_ndk_cpp", 230 srcs: [ 231 "AidlConversionNdkCpp.cpp", 232 ], 233 defaults: [ 234 "audio_aidl_conversion_common_default", 235 "audio_aidl_conversion_common_default_cpp", 236 "audio_aidl_conversion_common_util_default", 237 "latest_android_media_audio_common_types_cpp_shared", 238 "latest_android_media_audio_common_types_ndk_shared", 239 ], 240 shared_libs: [ 241 "libbase", 242 "libbinder_ndk", 243 ], 244 cflags: [ 245 "-DBACKEND_CPP_NDK", 246 ], 247 min_sdk_version: "33", //AParcel_unmarshal has been introduced in 33 248} 249