mirror of
https://github.com/Evolution-X/hardware_interfaces
synced 2026-02-01 16:50:18 +00:00
Add 'MicrophoneInfo' and 'MicrophoneDynamicInfo' parcelables. Add IModule.getMicrophones method. Add following methods to IStreamIn: - getActiveMicrophonesIds; - get/setMicrophoneDirection; - get/setMicrophoneFieldDimension. Provide trivial implementations and VTS. Also slightly refactor port retrieval from ModuleConfig to unify common queries. Bug: 205884982 Test: atest VtsHalAudioCoreTargetTest Change-Id: I472c7733e2a331a67cea613cd9218889eff06a43
227 lines
7.3 KiB
Plaintext
227 lines
7.3 KiB
Plaintext
/*
|
|
* Copyright (C) 2021 The Android Open Source Project
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/
|
|
|
|
package {
|
|
// See: http://go/android-license-faq
|
|
// A large-scale-change added 'default_applicable_licenses' to import
|
|
// all of the 'license_kinds' from "hardware_interfaces_license"
|
|
// to get the below license kinds:
|
|
// SPDX-license-identifier-Apache-2.0
|
|
default_applicable_licenses: ["hardware_interfaces_license"],
|
|
}
|
|
|
|
aidl_interface_defaults {
|
|
name: "android.hardware.audio_defaults",
|
|
host_supported: true,
|
|
vendor_available: true,
|
|
stability: "vintf",
|
|
}
|
|
|
|
aidl_interface {
|
|
name: "android.hardware.audio.common",
|
|
defaults: [
|
|
"android.hardware.audio_defaults",
|
|
],
|
|
srcs: [
|
|
"android/hardware/audio/common/PlaybackTrackMetadata.aidl",
|
|
"android/hardware/audio/common/RecordTrackMetadata.aidl",
|
|
"android/hardware/audio/common/SinkMetadata.aidl",
|
|
"android/hardware/audio/common/SourceMetadata.aidl",
|
|
],
|
|
imports: [
|
|
"android.media.audio.common.types-V2",
|
|
],
|
|
backend: {
|
|
cpp: {
|
|
enabled: true,
|
|
},
|
|
java: {
|
|
sdk_version: "module_current",
|
|
min_sdk_version: "31",
|
|
apex_available: [
|
|
"//apex_available:platform",
|
|
"com.android.car.framework",
|
|
],
|
|
},
|
|
ndk: {
|
|
apex_available: [
|
|
"//apex_available:platform",
|
|
"com.android.btservices",
|
|
],
|
|
min_sdk_version: "31",
|
|
},
|
|
},
|
|
versions_with_info: [
|
|
{
|
|
version: "1",
|
|
imports: ["android.media.audio.common.types-V2"],
|
|
},
|
|
// IMPORTANT: Update latest_android_hardware_audio_common every time you
|
|
// add the latest frozen version to versions_with_info
|
|
],
|
|
|
|
}
|
|
|
|
// Note: This should always be one version ahead of the last frozen version
|
|
latest_android_hardware_audio_common = "android.hardware.audio.common-V1"
|
|
|
|
// Modules that depend on android.hardware.audio.common directly can include
|
|
// the following cc_defaults to avoid explicitly managing dependency versions
|
|
// across many scattered files.
|
|
cc_defaults {
|
|
name: "latest_android_hardware_audio_common_cpp_static",
|
|
static_libs: [
|
|
latest_android_hardware_audio_common + "-cpp",
|
|
],
|
|
}
|
|
|
|
cc_defaults {
|
|
name: "latest_android_hardware_audio_common_ndk_static",
|
|
static_libs: [
|
|
latest_android_hardware_audio_common + "-ndk",
|
|
],
|
|
}
|
|
|
|
cc_defaults {
|
|
name: "latest_android_hardware_audio_common_ndk_shared",
|
|
shared_libs: [
|
|
latest_android_hardware_audio_common + "-ndk",
|
|
],
|
|
}
|
|
|
|
aidl_interface {
|
|
name: "android.hardware.audio.core",
|
|
defaults: [
|
|
"android.hardware.audio_defaults",
|
|
],
|
|
srcs: [
|
|
"android/hardware/audio/core/AudioMode.aidl",
|
|
"android/hardware/audio/core/AudioPatch.aidl",
|
|
"android/hardware/audio/core/AudioRoute.aidl",
|
|
"android/hardware/audio/core/IConfig.aidl",
|
|
"android/hardware/audio/core/IModule.aidl",
|
|
"android/hardware/audio/core/IStreamCallback.aidl",
|
|
"android/hardware/audio/core/IStreamIn.aidl",
|
|
"android/hardware/audio/core/IStreamOut.aidl",
|
|
"android/hardware/audio/core/ITelephony.aidl",
|
|
"android/hardware/audio/core/MicrophoneDynamicInfo.aidl",
|
|
"android/hardware/audio/core/MicrophoneInfo.aidl",
|
|
"android/hardware/audio/core/MmapBufferDescriptor.aidl",
|
|
"android/hardware/audio/core/ModuleDebug.aidl",
|
|
"android/hardware/audio/core/StreamDescriptor.aidl",
|
|
"android/hardware/audio/core/SurroundSoundConfig.aidl",
|
|
],
|
|
imports: [
|
|
"android.hardware.common-V2",
|
|
"android.hardware.common.fmq-V1",
|
|
"android.hardware.audio.common-V1",
|
|
"android.media.audio.common.types-V2",
|
|
],
|
|
backend: {
|
|
// The C++ backend is disabled transitively due to use of FMQ.
|
|
cpp: {
|
|
enabled: false,
|
|
},
|
|
java: {
|
|
sdk_version: "module_current",
|
|
},
|
|
},
|
|
versions_with_info: [
|
|
// IMPORTANT: Update latest_android_hardware_audio_core every time you
|
|
// add the latest frozen version to versions_with_info
|
|
],
|
|
}
|
|
|
|
// Note: This should always be one version ahead of the last frozen version
|
|
latest_android_hardware_audio_core = "android.hardware.audio.core-V1"
|
|
|
|
// Modules that depend on android.hardware.audio.core directly can include
|
|
// the following cc_defaults to avoid explicitly managing dependency versions
|
|
// across many scattered files.
|
|
cc_defaults {
|
|
name: "latest_android_hardware_audio_core_ndk_shared",
|
|
shared_libs: [
|
|
latest_android_hardware_audio_core + "-ndk",
|
|
],
|
|
}
|
|
|
|
cc_defaults {
|
|
name: "latest_android_hardware_audio_core_ndk_static",
|
|
static_libs: [
|
|
latest_android_hardware_audio_core + "-ndk",
|
|
],
|
|
}
|
|
|
|
aidl_interface {
|
|
name: "android.hardware.audio.effect",
|
|
defaults: [
|
|
"android.hardware.audio_defaults",
|
|
],
|
|
srcs: [
|
|
"android/hardware/audio/effect/BassBoost.aidl",
|
|
"android/hardware/audio/effect/Capability.aidl",
|
|
"android/hardware/audio/effect/CommandId.aidl",
|
|
"android/hardware/audio/effect/Descriptor.aidl",
|
|
"android/hardware/audio/effect/Downmix.aidl",
|
|
"android/hardware/audio/effect/DynamicsProcessing.aidl",
|
|
"android/hardware/audio/effect/Equalizer.aidl",
|
|
"android/hardware/audio/effect/Flags.aidl",
|
|
"android/hardware/audio/effect/HapticGenerator.aidl",
|
|
"android/hardware/audio/effect/IEffect.aidl",
|
|
"android/hardware/audio/effect/IFactory.aidl",
|
|
"android/hardware/audio/effect/LoudnessEnhancer.aidl",
|
|
"android/hardware/audio/effect/Parameter.aidl",
|
|
"android/hardware/audio/effect/Processing.aidl",
|
|
"android/hardware/audio/effect/Reverb.aidl",
|
|
"android/hardware/audio/effect/State.aidl",
|
|
"android/hardware/audio/effect/VendorExtension.aidl",
|
|
"android/hardware/audio/effect/Virtualizer.aidl",
|
|
"android/hardware/audio/effect/Visualizer.aidl",
|
|
"android/hardware/audio/effect/Volume.aidl",
|
|
],
|
|
imports: [
|
|
"android.hardware.common-V2",
|
|
"android.hardware.common.fmq-V1",
|
|
"android.hardware.audio.common-V1",
|
|
"android.media.audio.common.types-V2",
|
|
],
|
|
backend: {
|
|
// The C++ backend is disabled transitively due to use of FMQ.
|
|
cpp: {
|
|
enabled: false,
|
|
},
|
|
java: {
|
|
sdk_version: "module_current",
|
|
},
|
|
},
|
|
}
|
|
|
|
latest_android_hardware_audio_effect = "android.hardware.audio.effect-V1"
|
|
|
|
cc_defaults {
|
|
name: "latest_android_hardware_audio_effect_ndk_shared",
|
|
shared_libs: [
|
|
latest_android_hardware_audio_effect + "-ndk",
|
|
],
|
|
}
|
|
|
|
cc_defaults {
|
|
name: "latest_android_hardware_audio_effect_ndk_static",
|
|
static_libs: [
|
|
latest_android_hardware_audio_effect + "-ndk",
|
|
],
|
|
}
|