Introduce Audio V6
Generate with ./newHal.sh 5.0
+ some typo fix in the .hal
+ some clang-tidy run
This new HAL is an exact copy of the V5.
It will be modified in following patches while R is developed.
Test: push V6 to device and check audio works fine
Bug: 134940862
Change-Id: Ic25d30175032e76e0d3208fb876451de9ae6b7b4
Merged-In: Ic25d30175032e76e0d3208fb876451de9ae6b7b4
Signed-off-by: Kevin Rocard <krocard@google.com>
diff --git a/audio/common/all-versions/default/Android.bp b/audio/common/all-versions/default/Android.bp
index e630d93..0eb4a71 100644
--- a/audio/common/all-versions/default/Android.bp
+++ b/audio/common/all-versions/default/Android.bp
@@ -104,3 +104,16 @@
"-include common/all-versions/VersionMacro.h",
]
}
+
+cc_library_shared {
+ name: "android.hardware.audio.common@6.0-util",
+ defaults: ["android.hardware.audio.common-util_default"],
+ shared_libs: [
+ "android.hardware.audio.common@6.0",
+ ],
+ cflags: [
+ "-DMAJOR_VERSION=6",
+ "-DMINOR_VERSION=0",
+ "-include common/all-versions/VersionMacro.h",
+ ]
+}
diff --git a/audio/common/all-versions/default/service/Android.bp b/audio/common/all-versions/default/service/Android.bp
index f5a6f42..4565730 100644
--- a/audio/common/all-versions/default/service/Android.bp
+++ b/audio/common/all-versions/default/service/Android.bp
@@ -27,12 +27,15 @@
"android.hardware.audio@2.0",
"android.hardware.audio@4.0",
"android.hardware.audio@5.0",
+ "android.hardware.audio@6.0",
"android.hardware.audio.common@2.0",
"android.hardware.audio.common@4.0",
"android.hardware.audio.common@5.0",
+ "android.hardware.audio.common@6.0",
"android.hardware.audio.effect@2.0",
"android.hardware.audio.effect@4.0",
"android.hardware.audio.effect@5.0",
+ "android.hardware.audio.effect@6.0",
"android.hardware.bluetooth.a2dp@1.0",
"android.hardware.bluetooth.audio@2.0",
"android.hardware.soundtrigger@2.0",
diff --git a/audio/common/all-versions/default/service/service.cpp b/audio/common/all-versions/default/service/service.cpp
index e8a9e23..2730f3b 100644
--- a/audio/common/all-versions/default/service/service.cpp
+++ b/audio/common/all-versions/default/service/service.cpp
@@ -19,9 +19,11 @@
#include <android/hardware/audio/2.0/IDevicesFactory.h>
#include <android/hardware/audio/4.0/IDevicesFactory.h>
#include <android/hardware/audio/5.0/IDevicesFactory.h>
+#include <android/hardware/audio/6.0/IDevicesFactory.h>
#include <android/hardware/audio/effect/2.0/IEffectsFactory.h>
#include <android/hardware/audio/effect/4.0/IEffectsFactory.h>
#include <android/hardware/audio/effect/5.0/IEffectsFactory.h>
+#include <android/hardware/audio/effect/6.0/IEffectsFactory.h>
#include <android/hardware/bluetooth/a2dp/1.0/IBluetoothAudioOffload.h>
#include <android/hardware/bluetooth/audio/2.0/IBluetoothAudioProvidersFactory.h>
#include <android/hardware/soundtrigger/2.0/ISoundTriggerHw.h>
@@ -62,12 +64,14 @@
// Keep versions on a separate line for easier parsing
// clang-format off
LOG_ALWAYS_FATAL_IF((registerPassthroughServiceImplementations<
+ audio::V6_0::IDevicesFactory,
audio::V5_0::IDevicesFactory,
audio::V4_0::IDevicesFactory,
audio::V2_0::IDevicesFactory>()),
"Could not register audio core API");
LOG_ALWAYS_FATAL_IF((registerPassthroughServiceImplementations<
+ audio::effect::V6_0::IEffectsFactory,
audio::effect::V5_0::IEffectsFactory,
audio::effect::V4_0::IEffectsFactory,
audio::effect::V2_0::IEffectsFactory>()),