Move EffectsConfig loading in AudioPolicyEffects to libAudioHal
For HIDL, the EffectsConfig result based on config xml parsing.
For AIDL, the EffectsConfig result based on IFactory interface.
Bug: 261129656
Test: m on panther_hwasan-userdebug and boot, play audio
Test: atest audiopolicy_tests
Test: flash to Pixel t and test with audio effect enabled
Change-Id: I5d57fd2457f1e928ba011ea803fe9a7fc8259bb0
Merged-In: I5d57fd2457f1e928ba011ea803fe9a7fc8259bb0
diff --git a/media/libaudiohal/impl/EffectsFactoryHalHidl.h b/media/libaudiohal/impl/EffectsFactoryHalHidl.h
index 9875154..4110ba3 100644
--- a/media/libaudiohal/impl/EffectsFactoryHalHidl.h
+++ b/media/libaudiohal/impl/EffectsFactoryHalHidl.h
@@ -17,6 +17,7 @@
#pragma once
#include <memory>
+#include <vector>
#include PATH(android/hardware/audio/effect/FILE_VERSION/IEffectsFactory.h)
#include <media/audiohal/EffectsFactoryHalInterface.h>
@@ -62,9 +63,19 @@
android::detail::AudioHalVersionInfo getHalVersion() const override;
+ std::shared_ptr<const effectsConfig::Processings> getProcessings() const override;
+
+ ::android::error::Result<size_t> getSkippedElements() const override;
+
private:
- sp<IEffectsFactory> mEffectsFactory;
- std::unique_ptr<EffectDescriptorCache> mCache;
+ const sp<IEffectsFactory> mEffectsFactory;
+ const std::unique_ptr<EffectDescriptorCache> mCache;
+ /**
+ * Configuration file parser result, used by getProcessings() and getConfigParseResult().
+ * This struct holds the result of parsing a configuration file. The result includes the parsed
+ * configuration data, as well as any errors that occurred during parsing.
+ */
+ const effectsConfig::ParsingResult mParsingResult;
};
} // namespace effect