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.cpp b/services/audioflinger/Effects.cpp
index 973b2ab..c46027c 100644
--- a/services/audioflinger/Effects.cpp
+++ b/services/audioflinger/Effects.cpp
@@ -3537,12 +3537,12 @@
             mHalEffect = sp<HwAccDeviceEffectModule>::make(mMyCallback,
                     const_cast<effect_descriptor_t *>(&mDescriptor), mMyCallback->newEffectId(),
                     port->id);
+            mHalEffect->configure_l();
             if (audio_is_input_device(mDevice.mType)) {
                 mHalEffect->setInputDevice(mDevice);
             } else {
                 mHalEffect->setDevices({mDevice});
             }
-            mHalEffect->configure_l();
         }
         *handle = new EffectHandle(mHalEffect, nullptr, nullptr, 0 /*priority*/,
                                    mNotifyFramesProcessed);