Align LibAudioHal V2 and V4 for factorisation

In order to merge the two version, they must first align as much
as possible.

Test: playback music, assistant
Change-Id: If517cc3f4646a224af3e9b3d42b68a75f1801b39
Signed-off-by: Kevin Rocard <krocard@google.com>
diff --git a/media/libaudiohal/4.0/EffectHalHidl.h b/media/libaudiohal/4.0/EffectHalHidl.h
index 5a4dab1..63310b19 100644
--- a/media/libaudiohal/4.0/EffectHalHidl.h
+++ b/media/libaudiohal/4.0/EffectHalHidl.h
@@ -14,8 +14,8 @@
  * limitations under the License.
  */
 
-#ifndef ANDROID_HARDWARE_EFFECT_HAL_HIDL_4_0_H
-#define ANDROID_HARDWARE_EFFECT_HAL_HIDL_4_0_H
+#ifndef ANDROID_HARDWARE_EFFECT_HAL_HIDL_H
+#define ANDROID_HARDWARE_EFFECT_HAL_HIDL_H
 
 #include <android/hardware/audio/effect/4.0/IEffect.h>
 #include <media/audiohal/EffectHalInterface.h>
@@ -27,6 +27,7 @@
 using ::android::hardware::audio::effect::V4_0::EffectConfig;
 using ::android::hardware::audio::effect::V4_0::EffectDescriptor;
 using ::android::hardware::audio::effect::V4_0::IEffect;
+using EffectResult = ::android::hardware::audio::effect::V4_0::Result;
 using ::android::hardware::EventFlag;
 using ::android::hardware::MessageQueue;
 
@@ -69,8 +70,7 @@
 
   private:
     friend class EffectsFactoryHalHidl;
-    typedef MessageQueue<
-        hardware::audio::effect::V4_0::Result, hardware::kSynchronizedReadWrite> StatusMQ;
+    typedef MessageQueue<EffectResult, hardware::kSynchronizedReadWrite> StatusMQ;
 
     sp<IEffect> mEffect;
     const uint64_t mEffectId;
@@ -80,7 +80,7 @@
     std::unique_ptr<StatusMQ> mStatusMQ;
     EventFlag* mEfGroup;
 
-    static status_t analyzeResult(const hardware::audio::effect::V4_0::Result& result);
+    static status_t analyzeResult(const EffectResult& result);
     static void effectBufferConfigFromHal(
             const buffer_config_t& halConfig, EffectBufferConfig* config);
     static void effectBufferConfigToHal(
@@ -107,4 +107,4 @@
 } // namespace V4_0
 } // namespace android
 
-#endif // ANDROID_HARDWARE_EFFECT_HAL_HIDL_4_0_H
+#endif // ANDROID_HARDWARE_EFFECT_HAL_HIDL_H