Effect AIDL: Add VTS test cases cleanup in TearDown
Remove output FMQ reset in EffectImpl
Update vts cases with ASSERT_* for critical errors
And update vts case naming
Bug: 261646550
Test: atest VtsHalAudioEffectTargetTest
Test: atest VtsHalEqualizerTargetTest
Test: atest VtsHalBassBoostTargetTest
Test: atest VtsHalLoudnessEnhancerTargetTest
Test: atest VtsHalAudioEffectFactoryTargetTest
Change-Id: If8d8aab0d4a68b13c488c053af1f36b58b7c99a1
diff --git a/audio/aidl/vts/EffectFactoryHelper.h b/audio/aidl/vts/EffectFactoryHelper.h
index b649d9e..0d5c649 100644
--- a/audio/aidl/vts/EffectFactoryHelper.h
+++ b/audio/aidl/vts/EffectFactoryHelper.h
@@ -49,11 +49,11 @@
std::shared_ptr<IFactory> GetFactory() const { return mEffectFactory; }
- static std::vector<std::pair<std::shared_ptr<IFactory>, Descriptor::Identity>>
- getAllEffectDescriptors(std::string serviceName, std::optional<AudioUuid> type = std::nullopt) {
+ static std::vector<std::pair<std::shared_ptr<IFactory>, Descriptor>> getAllEffectDescriptors(
+ std::string serviceName, std::optional<AudioUuid> type = std::nullopt) {
AudioHalBinderServiceUtil util;
auto names = android::getAidlHalInstanceNames(serviceName);
- std::vector<std::pair<std::shared_ptr<IFactory>, Descriptor::Identity>> result;
+ std::vector<std::pair<std::shared_ptr<IFactory>, Descriptor>> result;
for (const auto& name : names) {
auto factory = IFactory::fromBinder(util.connectToService(name));
@@ -62,11 +62,10 @@
factory->queryEffects(std::nullopt, std::nullopt, std::nullopt, &descs)
.isOk()) {
for (const auto& desc : descs) {
- const auto& id = desc.common.id;
- if (type.has_value() && id.type != type.value()) {
+ if (type.has_value() && desc.common.id.type != type.value()) {
continue;
}
- result.emplace_back(factory, id);
+ result.emplace_back(factory, desc);
}
}
}