AIDL effect: Add queryProcess in IFactory
Bug: 238913361
Test: atest VtsHalAudioEffectTargetTest; atest VtsHalAudioEffectFactoryTargetTest
Change-Id: I5518ceaa0ea744e30803fc23996e2a2b48398024
diff --git a/audio/aidl/vts/EffectFactoryHelper.h b/audio/aidl/vts/EffectFactoryHelper.h
index 3cbca45..cf94e58 100644
--- a/audio/aidl/vts/EffectFactoryHelper.h
+++ b/audio/aidl/vts/EffectFactoryHelper.h
@@ -31,6 +31,7 @@
using aidl::android::hardware::audio::effect::IEffect;
using aidl::android::hardware::audio::effect::IFactory;
using aidl::android::hardware::audio::effect::Parameter;
+using aidl::android::hardware::audio::effect::Processing;
using aidl::android::media::audio::common::AudioUuid;
class EffectFactoryHelper {
@@ -57,6 +58,16 @@
mIds = *_aidl_return;
}
+ void QueryProcessing(const std::optional<Processing::Type>& in_type,
+ std::vector<Processing>* _aidl_return) {
+ ASSERT_NE(mEffectFactory, nullptr);
+ EXPECT_IS_OK(mEffectFactory->queryProcessing(in_type, _aidl_return));
+ // only update the whole list if no filter applied
+ if (!in_type.has_value()) {
+ mProcesses = *_aidl_return;
+ }
+ }
+
void CreateEffects() {
ASSERT_NE(mEffectFactory, nullptr);
for (const auto& id : mIds) {
@@ -127,6 +138,7 @@
AudioHalBinderServiceUtil binderUtil;
std::vector<Descriptor::Identity> mIds;
std::vector<Descriptor::Identity> mCompleteIds;
+ std::vector<Processing> mProcesses;
std::map<std::shared_ptr<IEffect>, Descriptor::Identity> mEffectIdMap;
};