Audio HAL: Align V2 and V4 VTS
It was thought that the V2 VTS were not going to be supported after V4
VTS were created. Thus a large portion of the code was copy paste and
modified.
That assumption ended up wrong as a lot of OEM reported bugs that needed
to be fixed in both versions.
As a result align the code of both version VTS as much as possible.
The code will be merged in a follow up patch.
Bug: 118203066
Test: compile
Change-Id: I994232db237b5d7c52e7d796f199ab3c6eec21f4
Signed-off-by: Kevin Rocard <krocard@google.com>
diff --git a/audio/effect/4.0/vts/functional/VtsHalAudioEffectTargetTest.cpp b/audio/effect/4.0/vts/functional/VtsHalAudioEffectTargetTest.cpp
index 5c10c69..96b8602 100644
--- a/audio/effect/4.0/vts/functional/VtsHalAudioEffectTargetTest.cpp
+++ b/audio/effect/4.0/vts/functional/VtsHalAudioEffectTargetTest.cpp
@@ -39,7 +39,7 @@
using android::hardware::MQDescriptorSync;
using android::hardware::Return;
using android::hardware::Void;
-using android::hardware::audio::common::utils::mkBitfield;
+using android::hardware::audio::common::utils::mkEnumBitfield;
using android::hardware::audio::common::V4_0::AudioDevice;
using android::hardware::audio::common::V4_0::AudioHandleConsts;
using android::hardware::audio::common::V4_0::AudioMode;
@@ -399,7 +399,7 @@
TEST_F(AudioEffectHidlTest, SetDevice) {
description("Verify that SetDevice works for an output chain effect");
- Return<Result> ret = effect->setDevice(mkBitfield(AudioDevice::OUT_SPEAKER));
+ Return<Result> ret = effect->setDevice(mkEnumBitfield(AudioDevice::OUT_SPEAKER));
EXPECT_TRUE(ret.isOk());
EXPECT_EQ(Result::OK, ret);
}
@@ -449,7 +449,7 @@
TEST_F(AudioEffectHidlTest, SetInputDevice) {
description("Verify that SetInputDevice does not crash");
- Return<Result> ret = effect->setInputDevice(mkBitfield(AudioDevice::IN_BUILTIN_MIC));
+ Return<Result> ret = effect->setInputDevice(mkEnumBitfield(AudioDevice::IN_BUILTIN_MIC));
EXPECT_TRUE(ret.isOk());
}