• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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    // See: http://go/android-license-faq
19    // A large-scale-change added 'default_applicable_licenses' to import
20    // all of the 'license_kinds' from "hardware_interfaces_license"
21    // to get the below license kinds:
22    //   SPDX-license-identifier-Apache-2.0
23    default_applicable_licenses: ["hardware_interfaces_license"],
24}
25
26aidl_interface_defaults {
27    name: "android.hardware.audio_defaults",
28    host_supported: true,
29    vendor_available: true,
30    stability: "vintf",
31}
32
33aidl_interface {
34    name: "android.hardware.audio.common",
35    defaults: [
36        "android.hardware.audio_defaults",
37    ],
38    srcs: [
39        "android/hardware/audio/common/AudioOffloadMetadata.aidl",
40        "android/hardware/audio/common/PlaybackTrackMetadata.aidl",
41        "android/hardware/audio/common/RecordTrackMetadata.aidl",
42        "android/hardware/audio/common/SinkMetadata.aidl",
43        "android/hardware/audio/common/SourceMetadata.aidl",
44    ],
45    frozen: true,
46    imports: [
47        "android.media.audio.common.types-V2",
48    ],
49    backend: {
50        cpp: {
51            enabled: true,
52        },
53        java: {
54            sdk_version: "module_current",
55            min_sdk_version: "31",
56            apex_available: [
57                "//apex_available:platform",
58                "com.android.car.framework",
59            ],
60        },
61        ndk: {
62            apex_available: [
63                "//apex_available:platform",
64                "com.android.btservices",
65            ],
66            min_sdk_version: "31",
67        },
68    },
69    versions_with_info: [
70        {
71            version: "1",
72            imports: ["android.media.audio.common.types-V2"],
73        },
74        {
75            version: "2",
76            imports: ["android.media.audio.common.types-V2"],
77        },
78
79        // IMPORTANT: Update latest_android_hardware_audio_common every time you
80        // add the latest frozen version to versions_with_info
81    ],
82
83}
84
85// Note: This should always be one version ahead of the last frozen version
86latest_android_hardware_audio_common = "android.hardware.audio.common-V2"
87
88// Modules that depend on android.hardware.audio.common directly can include
89// the following cc_defaults to avoid explicitly managing dependency versions
90// across many scattered files.
91cc_defaults {
92    name: "latest_android_hardware_audio_common_cpp_static",
93    static_libs: [
94        latest_android_hardware_audio_common + "-cpp",
95    ],
96}
97
98cc_defaults {
99    name: "latest_android_hardware_audio_common_ndk_static",
100    static_libs: [
101        latest_android_hardware_audio_common + "-ndk",
102    ],
103}
104
105cc_defaults {
106    name: "latest_android_hardware_audio_common_ndk_shared",
107    shared_libs: [
108        latest_android_hardware_audio_common + "-ndk",
109    ],
110}
111
112aidl_interface {
113    name: "android.hardware.audio.core",
114    defaults: [
115        "android.hardware.audio_defaults",
116    ],
117    srcs: [
118        "android/hardware/audio/core/AudioPatch.aidl",
119        "android/hardware/audio/core/AudioRoute.aidl",
120        "android/hardware/audio/core/IBluetooth.aidl",
121        "android/hardware/audio/core/IBluetoothA2dp.aidl",
122        "android/hardware/audio/core/IBluetoothLe.aidl",
123        "android/hardware/audio/core/IConfig.aidl",
124        "android/hardware/audio/core/IModule.aidl",
125        "android/hardware/audio/core/IStreamCallback.aidl",
126        "android/hardware/audio/core/IStreamCommon.aidl",
127        "android/hardware/audio/core/IStreamIn.aidl",
128        "android/hardware/audio/core/IStreamOut.aidl",
129        "android/hardware/audio/core/IStreamOutEventCallback.aidl",
130        "android/hardware/audio/core/ITelephony.aidl",
131        "android/hardware/audio/core/MmapBufferDescriptor.aidl",
132        "android/hardware/audio/core/ModuleDebug.aidl",
133        "android/hardware/audio/core/StreamDescriptor.aidl",
134        "android/hardware/audio/core/SurroundSoundConfig.aidl",
135        "android/hardware/audio/core/VendorParameter.aidl",
136    ],
137    imports: [
138        "android.hardware.common-V2",
139        "android.hardware.common.fmq-V1",
140        "android.hardware.audio.common-V2",
141        "android.hardware.audio.core.sounddose-V1",
142        "android.hardware.audio.effect-V1",
143        "android.media.audio.common.types-V2",
144    ],
145    backend: {
146        // The C++ backend is disabled transitively due to use of FMQ.
147        cpp: {
148            enabled: false,
149        },
150        java: {
151            sdk_version: "module_current",
152        },
153    },
154    versions_with_info: [
155        {
156            version: "1",
157            imports: [
158                "android.hardware.common-V2",
159                "android.hardware.common.fmq-V1",
160                "android.hardware.audio.common-V2",
161                "android.hardware.audio.core.sounddose-V1",
162                "android.hardware.audio.effect-V1",
163                "android.media.audio.common.types-V2",
164            ],
165        },
166
167        // IMPORTANT: Update latest_android_hardware_audio_core every time you
168        // add the latest frozen version to versions_with_info
169    ],
170    frozen: true,
171}
172
173// Note: This should always be one version ahead of the last frozen version
174latest_android_hardware_audio_core = "android.hardware.audio.core-V1"
175
176// Modules that depend on android.hardware.audio.core directly can include
177// the following cc_defaults to avoid explicitly managing dependency versions
178// across many scattered files.
179cc_defaults {
180    name: "latest_android_hardware_audio_core_ndk_shared",
181    shared_libs: [
182        latest_android_hardware_audio_core + "-ndk",
183    ],
184}
185
186cc_defaults {
187    name: "latest_android_hardware_audio_core_ndk_static",
188    static_libs: [
189        latest_android_hardware_audio_core + "-ndk",
190    ],
191}
192
193// Used for the standalone sounddose HAL
194aidl_interface {
195    name: "android.hardware.audio.core.sounddose",
196    defaults: [
197        "android.hardware.audio_defaults",
198    ],
199    srcs: [
200        "android/hardware/audio/core/sounddose/ISoundDose.aidl",
201    ],
202    imports: [
203        "android.media.audio.common.types-V2",
204    ],
205    backend: {
206        // The C++ backend is disabled transitively due to use of FMQ by the core HAL.
207        cpp: {
208            enabled: false,
209        },
210        java: {
211            sdk_version: "module_current",
212        },
213    },
214    versions_with_info: [
215        {
216            version: "1",
217            imports: ["android.media.audio.common.types-V2"],
218        },
219
220        // IMPORTANT: Update latest_android_hardware_audio_core_sounddose every time you
221        // add the latest frozen version to versions_with_info
222    ],
223    frozen: true,
224}
225
226// Note: This should always be one version ahead of the last frozen version
227latest_android_hardware_audio_core_sounddose = "android.hardware.audio.core.sounddose-V1"
228
229// Modules that depend on android.hardware.audio.core.sounddose directly can include
230// the following cc_defaults to avoid explicitly managing dependency versions
231// across many scattered files.
232cc_defaults {
233    name: "latest_android_hardware_audio_core_sounddose_ndk_shared",
234    shared_libs: [
235        latest_android_hardware_audio_core_sounddose + "-ndk",
236    ],
237}
238
239cc_defaults {
240    name: "latest_android_hardware_audio_core_sounddose_ndk_static",
241    static_libs: [
242        latest_android_hardware_audio_core_sounddose + "-ndk",
243    ],
244}
245
246aidl_interface {
247    name: "android.hardware.audio.effect",
248    defaults: [
249        "android.hardware.audio_defaults",
250    ],
251    srcs: [
252        "android/hardware/audio/effect/AcousticEchoCanceler.aidl",
253        "android/hardware/audio/effect/AutomaticGainControlV1.aidl",
254        "android/hardware/audio/effect/AutomaticGainControlV2.aidl",
255        "android/hardware/audio/effect/BassBoost.aidl",
256        "android/hardware/audio/effect/Capability.aidl",
257        "android/hardware/audio/effect/CommandId.aidl",
258        "android/hardware/audio/effect/DefaultExtension.aidl",
259        "android/hardware/audio/effect/Descriptor.aidl",
260        "android/hardware/audio/effect/Downmix.aidl",
261        "android/hardware/audio/effect/DynamicsProcessing.aidl",
262        "android/hardware/audio/effect/EnvironmentalReverb.aidl",
263        "android/hardware/audio/effect/Equalizer.aidl",
264        "android/hardware/audio/effect/Flags.aidl",
265        "android/hardware/audio/effect/HapticGenerator.aidl",
266        "android/hardware/audio/effect/IEffect.aidl",
267        "android/hardware/audio/effect/IFactory.aidl",
268        "android/hardware/audio/effect/LoudnessEnhancer.aidl",
269        "android/hardware/audio/effect/NoiseSuppression.aidl",
270        "android/hardware/audio/effect/Parameter.aidl",
271        "android/hardware/audio/effect/PresetReverb.aidl",
272        "android/hardware/audio/effect/Processing.aidl",
273        "android/hardware/audio/effect/Range.aidl",
274        "android/hardware/audio/effect/State.aidl",
275        "android/hardware/audio/effect/VendorExtension.aidl",
276        "android/hardware/audio/effect/Virtualizer.aidl",
277        "android/hardware/audio/effect/Visualizer.aidl",
278        "android/hardware/audio/effect/Volume.aidl",
279    ],
280    imports: [
281        "android.hardware.common-V2",
282        "android.hardware.common.fmq-V1",
283        "android.hardware.audio.common-V2",
284        "android.media.audio.common.types-V2",
285    ],
286    backend: {
287        // The C++ backend is disabled transitively due to use of FMQ.
288        cpp: {
289            enabled: false,
290        },
291        java: {
292            sdk_version: "module_current",
293        },
294    },
295    versions_with_info: [
296        {
297            version: "1",
298            imports: [
299                "android.hardware.common-V2",
300                "android.hardware.common.fmq-V1",
301                "android.hardware.audio.common-V2",
302                "android.media.audio.common.types-V2",
303            ],
304        },
305    ],
306    frozen: true,
307
308}
309
310latest_android_hardware_audio_effect = "android.hardware.audio.effect-V1"
311
312cc_defaults {
313    name: "latest_android_hardware_audio_effect_ndk_shared",
314    shared_libs: [
315        latest_android_hardware_audio_effect + "-ndk",
316    ],
317}
318
319cc_defaults {
320    name: "latest_android_hardware_audio_effect_ndk_static",
321    static_libs: [
322        latest_android_hardware_audio_effect + "-ndk",
323    ],
324}
325