From 33637da8c46c3cd9cde7cc1122b242a34f1d95b7 Mon Sep 17 00:00:00 2001 From: Shunkai Yao Date: Mon, 21 Aug 2023 18:55:24 +0000 Subject: [PATCH] Update vts to align AOSP effects support requirement with CDD Bug: 296790934 Test: atest VtsHalAudioEffectFactoryTargetTest Change-Id: I1c837125e62a083d95e279ed0584a9bccea3dcbd Merged-In: I1c837125e62a083d95e279ed0584a9bccea3dcbd --- .../VtsHalAudioEffectFactoryTargetTest.cpp | 21 ++++++++++--------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/audio/aidl/vts/VtsHalAudioEffectFactoryTargetTest.cpp b/audio/aidl/vts/VtsHalAudioEffectFactoryTargetTest.cpp index 8084a594e0..225640e1fc 100644 --- a/audio/aidl/vts/VtsHalAudioEffectFactoryTargetTest.cpp +++ b/audio/aidl/vts/VtsHalAudioEffectFactoryTargetTest.cpp @@ -134,17 +134,18 @@ TEST_P(EffectFactoryTest, CanBeRestarted) { /** * @brief Check at least support list of effect must be supported by aosp: * https://developer.android.com/reference/android/media/audiofx/AudioEffect + * + * For Android 13, they are: Equalizer, LoudnessEnhancer, Visualizer, and DynamicsProcessing. + * https://source.android.com/docs/compatibility/13/android-13-cdd#552_audio_effects */ -TEST_P(EffectFactoryTest, ExpectAllAospEffectTypes) { +TEST_P(EffectFactoryTest, SupportMandatoryEffectTypes) { std::vector descs; - std::set typeUuidSet( - {aidl::android::hardware::audio::effect::getEffectTypeUuidBassBoost(), - aidl::android::hardware::audio::effect::getEffectTypeUuidEqualizer(), - aidl::android::hardware::audio::effect::getEffectTypeUuidEnvReverb(), - aidl::android::hardware::audio::effect::getEffectTypeUuidPresetReverb(), - aidl::android::hardware::audio::effect::getEffectTypeUuidDynamicsProcessing(), - aidl::android::hardware::audio::effect::getEffectTypeUuidHapticGenerator(), - aidl::android::hardware::audio::effect::getEffectTypeUuidVirtualizer()}); + std::set typeUuidSet({ + aidl::android::hardware::audio::effect::getEffectTypeUuidEqualizer(), + aidl::android::hardware::audio::effect::getEffectTypeUuidDynamicsProcessing(), + aidl::android::hardware::audio::effect::getEffectTypeUuidLoudnessEnhancer(), + aidl::android::hardware::audio::effect::getEffectTypeUuidVisualizer(), + }); EXPECT_IS_OK(mEffectFactory->queryEffects(std::nullopt, std::nullopt, std::nullopt, &descs)); EXPECT_TRUE(descs.size() >= typeUuidSet.size()); @@ -305,4 +306,4 @@ int main(int argc, char** argv) { ABinderProcess_setThreadPoolMaxThreadCount(1); ABinderProcess_startThreadPool(); return RUN_ALL_TESTS(); -} \ No newline at end of file +}