Fix device effect instatiation
-configure shall be called before any setParam (device, ...) as it
will open the effect, thus creating the context.
Context shall not be null to handle any setParameters
-Input / Output MQ are invalid if the effect buffer size is 0.
Flag: EXEMPT bugfix
Bug: 329395147
Test: atest CtsMediaAudioTestCase
Change-Id: I13676bc6564b24cf3b8d56e0646dc263599fea35
Signed-off-by: François Gaffie <francois.gaffie@renault.com>
diff --git a/services/audioflinger/Effects.h b/services/audioflinger/Effects.h
index 830fe81..66ec837 100644
--- a/services/audioflinger/Effects.h
+++ b/services/audioflinger/Effects.h
@@ -810,7 +810,10 @@
audio_channel_mask_t outChannelMask() const override;
uint32_t outChannelCount() const override;
audio_channel_mask_t hapticChannelMask() const override { return AUDIO_CHANNEL_NONE; }
- size_t frameCount() const override { return 0; }
+ /**
+ * frameCount cannot be zero.
+ */
+ size_t frameCount() const override { return 1; }
uint32_t latency() const override { return 0; }
status_t addEffectToHal(const sp<EffectHalInterface>& effect) override;