1/* 2 * Copyright (C) 2021 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17package { 18 default_team: "trendy_team_android_media_audio_framework", 19 // See: http://go/android-license-faq 20 // A large-scale-change added 'default_applicable_licenses' to import 21 // all of the 'license_kinds' from "hardware_interfaces_license" 22 // to get the below license kinds: 23 // SPDX-license-identifier-Apache-2.0 24 default_applicable_licenses: ["hardware_interfaces_license"], 25} 26 27aidl_interface_defaults { 28 name: "android.hardware.audio_defaults", 29 host_supported: true, 30 vendor_available: true, 31 stability: "vintf", 32} 33 34aidl_interface { 35 name: "android.hardware.audio.common", 36 defaults: [ 37 "android.hardware.audio_defaults", 38 "latest_android_media_audio_common_types_import_interface", 39 ], 40 srcs: [ 41 "android/hardware/audio/common/AudioOffloadMetadata.aidl", 42 "android/hardware/audio/common/PlaybackTrackMetadata.aidl", 43 "android/hardware/audio/common/RecordTrackMetadata.aidl", 44 "android/hardware/audio/common/SinkMetadata.aidl", 45 "android/hardware/audio/common/SourceMetadata.aidl", 46 ], 47 frozen: true, 48 backend: { 49 cpp: { 50 enabled: true, 51 }, 52 java: { 53 sdk_version: "module_current", 54 min_sdk_version: "31", 55 apex_available: [ 56 "//apex_available:platform", 57 "com.android.car.framework", 58 ], 59 }, 60 ndk: { 61 apex_available: [ 62 "//apex_available:platform", 63 "com.android.btservices", 64 ], 65 min_sdk_version: "31", 66 }, 67 rust: { 68 enabled: true, 69 }, 70 }, 71 versions_with_info: [ 72 { 73 version: "1", 74 imports: ["android.media.audio.common.types-V2"], 75 }, 76 { 77 version: "2", 78 imports: ["android.media.audio.common.types-V2"], 79 }, 80 { 81 version: "3", 82 imports: ["android.media.audio.common.types-V3"], 83 }, 84 85 // IMPORTANT: Update latest_android_hardware_audio_common every time you 86 // add the latest frozen version to versions_with_info 87 ], 88 89} 90 91// Note: This should always be one version ahead of the last frozen version 92latest_android_hardware_audio_common = "android.hardware.audio.common-V3" 93 94// Modules that depend on android.hardware.audio.common directly can include 95// the following cc_defaults to avoid explicitly managing dependency versions 96// across many scattered files. 97cc_defaults { 98 name: "latest_android_hardware_audio_common_cpp_static", 99 static_libs: [ 100 latest_android_hardware_audio_common + "-cpp", 101 ], 102} 103 104cc_defaults { 105 name: "latest_android_hardware_audio_common_ndk_static", 106 static_libs: [ 107 latest_android_hardware_audio_common + "-ndk", 108 ], 109} 110 111cc_defaults { 112 name: "latest_android_hardware_audio_common_ndk_shared", 113 shared_libs: [ 114 latest_android_hardware_audio_common + "-ndk", 115 ], 116} 117 118rust_defaults { 119 name: "latest_android_hardware_audio_common_rust", 120 rustlibs: [ 121 latest_android_hardware_audio_common + "-rust", 122 ], 123} 124 125aidl_interface_defaults { 126 name: "latest_android_hardware_audio_common_import_interface", 127 imports: [ 128 latest_android_hardware_audio_common, 129 ], 130} 131 132aidl_interface { 133 name: "android.hardware.audio.core", 134 defaults: [ 135 "android.hardware.audio_defaults", 136 "latest_android_hardware_audio_common_import_interface", 137 "latest_android_hardware_audio_core_sounddose_import_interface", 138 "latest_android_hardware_audio_effect_import_interface", 139 "latest_android_media_audio_common_types_import_interface", 140 ], 141 srcs: [ 142 "android/hardware/audio/core/AudioPatch.aidl", 143 "android/hardware/audio/core/AudioRoute.aidl", 144 "android/hardware/audio/core/IBluetooth.aidl", 145 "android/hardware/audio/core/IBluetoothA2dp.aidl", 146 "android/hardware/audio/core/IBluetoothLe.aidl", 147 "android/hardware/audio/core/IConfig.aidl", 148 "android/hardware/audio/core/IModule.aidl", 149 "android/hardware/audio/core/IStreamCallback.aidl", 150 "android/hardware/audio/core/IStreamCommon.aidl", 151 "android/hardware/audio/core/IStreamIn.aidl", 152 "android/hardware/audio/core/IStreamOut.aidl", 153 "android/hardware/audio/core/IStreamOutEventCallback.aidl", 154 "android/hardware/audio/core/ITelephony.aidl", 155 "android/hardware/audio/core/MmapBufferDescriptor.aidl", 156 "android/hardware/audio/core/ModuleDebug.aidl", 157 "android/hardware/audio/core/StreamDescriptor.aidl", 158 "android/hardware/audio/core/SurroundSoundConfig.aidl", 159 "android/hardware/audio/core/VendorParameter.aidl", 160 ], 161 imports: [ 162 "android.hardware.common-V2", 163 "android.hardware.common.fmq-V1", 164 ], 165 backend: { 166 // The C++ backend is disabled transitively due to use of FMQ. 167 cpp: { 168 enabled: false, 169 }, 170 java: { 171 sdk_version: "module_current", 172 }, 173 }, 174 versions_with_info: [ 175 { 176 version: "1", 177 imports: [ 178 "android.hardware.common-V2", 179 "android.hardware.common.fmq-V1", 180 "android.hardware.audio.common-V2", 181 "android.hardware.audio.core.sounddose-V1", 182 "android.hardware.audio.effect-V1", 183 "android.media.audio.common.types-V2", 184 ], 185 }, 186 { 187 version: "2", 188 imports: [ 189 "android.media.audio.common.types-V3", 190 "android.hardware.audio.effect-V2", 191 "android.hardware.audio.core.sounddose-V2", 192 "android.hardware.audio.common-V3", 193 "android.hardware.common-V2", 194 "android.hardware.common.fmq-V1", 195 ], 196 }, 197 198 // IMPORTANT: Update latest_android_hardware_audio_core every time you 199 // add the latest frozen version to versions_with_info 200 ], 201 frozen: true, 202} 203 204// Note: This should always be one version ahead of the last frozen version 205latest_android_hardware_audio_core = "android.hardware.audio.core-V2" 206 207// Modules that depend on android.hardware.audio.core directly can include 208// the following cc_defaults to avoid explicitly managing dependency versions 209// across many scattered files. 210cc_defaults { 211 name: "latest_android_hardware_audio_core_ndk_shared", 212 shared_libs: [ 213 latest_android_hardware_audio_core + "-ndk", 214 ], 215} 216 217cc_defaults { 218 name: "latest_android_hardware_audio_core_ndk_static", 219 static_libs: [ 220 latest_android_hardware_audio_core + "-ndk", 221 ], 222} 223 224aidl_interface_defaults { 225 name: "latest_android_hardware_audio_core_import_interface", 226 imports: [ 227 latest_android_hardware_audio_core, 228 ], 229} 230 231// Used for the standalone sounddose HAL 232aidl_interface { 233 name: "android.hardware.audio.core.sounddose", 234 defaults: [ 235 "android.hardware.audio_defaults", 236 "latest_android_media_audio_common_types_import_interface", 237 ], 238 srcs: [ 239 "android/hardware/audio/core/sounddose/ISoundDose.aidl", 240 ], 241 backend: { 242 // The C++ backend is disabled transitively due to use of FMQ by the core HAL. 243 cpp: { 244 enabled: false, 245 }, 246 java: { 247 sdk_version: "module_current", 248 }, 249 }, 250 versions_with_info: [ 251 { 252 version: "1", 253 imports: ["android.media.audio.common.types-V2"], 254 }, 255 { 256 version: "2", 257 imports: ["android.media.audio.common.types-V3"], 258 }, 259 260 // IMPORTANT: Update latest_android_hardware_audio_core_sounddose every time you 261 // add the latest frozen version to versions_with_info 262 ], 263 frozen: true, 264} 265 266// Note: This should always be one version ahead of the last frozen version 267latest_android_hardware_audio_core_sounddose = "android.hardware.audio.core.sounddose-V2" 268 269// Modules that depend on android.hardware.audio.core.sounddose directly can include 270// the following cc_defaults to avoid explicitly managing dependency versions 271// across many scattered files. 272cc_defaults { 273 name: "latest_android_hardware_audio_core_sounddose_ndk_shared", 274 shared_libs: [ 275 latest_android_hardware_audio_core_sounddose + "-ndk", 276 ], 277} 278 279cc_defaults { 280 name: "latest_android_hardware_audio_core_sounddose_ndk_export_shared_lib_header", 281 export_shared_lib_headers: [ 282 latest_android_hardware_audio_core_sounddose + "-ndk", 283 ], 284} 285 286cc_defaults { 287 name: "latest_android_hardware_audio_core_sounddose_ndk_static", 288 static_libs: [ 289 latest_android_hardware_audio_core_sounddose + "-ndk", 290 ], 291} 292 293aidl_interface_defaults { 294 name: "latest_android_hardware_audio_core_sounddose_import_interface", 295 imports: [ 296 latest_android_hardware_audio_core_sounddose, 297 ], 298} 299 300aidl_interface { 301 name: "android.hardware.audio.effect", 302 defaults: [ 303 "android.hardware.audio_defaults", 304 "latest_android_hardware_audio_common_import_interface", 305 "latest_android_media_audio_common_types_import_interface", 306 ], 307 srcs: [ 308 "android/hardware/audio/effect/AcousticEchoCanceler.aidl", 309 "android/hardware/audio/effect/AutomaticGainControlV1.aidl", 310 "android/hardware/audio/effect/AutomaticGainControlV2.aidl", 311 "android/hardware/audio/effect/BassBoost.aidl", 312 "android/hardware/audio/effect/Capability.aidl", 313 "android/hardware/audio/effect/CommandId.aidl", 314 "android/hardware/audio/effect/DefaultExtension.aidl", 315 "android/hardware/audio/effect/Descriptor.aidl", 316 "android/hardware/audio/effect/Downmix.aidl", 317 "android/hardware/audio/effect/DynamicsProcessing.aidl", 318 "android/hardware/audio/effect/EnvironmentalReverb.aidl", 319 "android/hardware/audio/effect/Equalizer.aidl", 320 "android/hardware/audio/effect/Flags.aidl", 321 "android/hardware/audio/effect/HapticGenerator.aidl", 322 "android/hardware/audio/effect/IEffect.aidl", 323 "android/hardware/audio/effect/IFactory.aidl", 324 "android/hardware/audio/effect/LoudnessEnhancer.aidl", 325 "android/hardware/audio/effect/NoiseSuppression.aidl", 326 "android/hardware/audio/effect/Parameter.aidl", 327 "android/hardware/audio/effect/PresetReverb.aidl", 328 "android/hardware/audio/effect/Processing.aidl", 329 "android/hardware/audio/effect/Range.aidl", 330 "android/hardware/audio/effect/Spatializer.aidl", 331 "android/hardware/audio/effect/State.aidl", 332 "android/hardware/audio/effect/VendorExtension.aidl", 333 "android/hardware/audio/effect/Virtualizer.aidl", 334 "android/hardware/audio/effect/Visualizer.aidl", 335 "android/hardware/audio/effect/Volume.aidl", 336 ], 337 imports: [ 338 "android.hardware.common-V2", 339 "android.hardware.common.fmq-V1", 340 ], 341 backend: { 342 // The C++ backend is disabled transitively due to use of FMQ. 343 cpp: { 344 enabled: false, 345 }, 346 java: { 347 sdk_version: "module_current", 348 }, 349 }, 350 versions_with_info: [ 351 { 352 version: "1", 353 imports: [ 354 "android.hardware.common-V2", 355 "android.hardware.common.fmq-V1", 356 "android.hardware.audio.common-V2", 357 "android.media.audio.common.types-V2", 358 ], 359 }, 360 { 361 version: "2", 362 imports: [ 363 "android.media.audio.common.types-V3", 364 "android.hardware.audio.common-V3", 365 "android.hardware.common-V2", 366 "android.hardware.common.fmq-V1", 367 ], 368 }, 369 370 ], 371 frozen: true, 372 373} 374 375latest_android_hardware_audio_effect = "android.hardware.audio.effect-V2" 376 377cc_defaults { 378 name: "latest_android_hardware_audio_effect_ndk_shared", 379 shared_libs: [ 380 latest_android_hardware_audio_effect + "-ndk", 381 ], 382} 383 384cc_defaults { 385 name: "latest_android_hardware_audio_effect_ndk_static", 386 static_libs: [ 387 latest_android_hardware_audio_effect + "-ndk", 388 ], 389} 390 391aidl_interface_defaults { 392 name: "latest_android_hardware_audio_effect_import_interface", 393 imports: [ 394 latest_android_hardware_audio_effect, 395 ], 396} 397