Audio HAL: Simplify types updates for 'common' and 'effect' packages

Instead of importing every single type individually ("using <type>"),
import entire namespaces of
::android::hardware::audio::common::CPP_VERSION and
::android::hardware::audio::effect::CPP_VERSION
inside the "implementation" namespace in the default implementation.

This simplifies modifying types, as it is not needed anymore
to surround "using <type>" directives with #if MAJOR_VERSION ...
Note that the contents of the namespaces are imported inside
the "implementation" namespace, which reduces risks of name collision

Enclosed EffectHalHidl and supporting classes into 'effect' namespace
because importing namespaces of ::a::h::audio::effect::CPP_VERSION and
::a::h::audio::CPP_VERSION into the same namespace, as it happens
for StreamHalHidl.cpp module, causes name conflicts.

Test: make
Change-Id: Ia37d672605c7541b19ee40fc1b58eabaa9ed8e17
diff --git a/media/libaudiohal/impl/EffectHalHidl.h b/media/libaudiohal/impl/EffectHalHidl.h
index cd447ff..9d9f707 100644
--- a/media/libaudiohal/impl/EffectHalHidl.h
+++ b/media/libaudiohal/impl/EffectHalHidl.h
@@ -23,17 +23,15 @@
 #include <fmq/MessageQueue.h>
 #include <system/audio_effect.h>
 
-using ::android::hardware::audio::effect::CPP_VERSION::EffectBufferConfig;
-using ::android::hardware::audio::effect::CPP_VERSION::EffectConfig;
-using ::android::hardware::audio::effect::CPP_VERSION::EffectDescriptor;
-using ::android::hardware::audio::effect::CPP_VERSION::IEffect;
-using EffectResult = ::android::hardware::audio::effect::CPP_VERSION::Result;
 using ::android::hardware::EventFlag;
 using ::android::hardware::MessageQueue;
 
 namespace android {
+namespace effect {
 namespace CPP_VERSION {
 
+using namespace ::android::hardware::audio::effect::CPP_VERSION;
+
 class EffectHalHidl : public EffectHalInterface
 {
   public:
@@ -70,7 +68,7 @@
 
   private:
     friend class EffectsFactoryHalHidl;
-    typedef MessageQueue<EffectResult, hardware::kSynchronizedReadWrite> StatusMQ;
+    typedef MessageQueue<Result, hardware::kSynchronizedReadWrite> StatusMQ;
 
     sp<IEffect> mEffect;
     const uint64_t mEffectId;
@@ -80,7 +78,7 @@
     std::unique_ptr<StatusMQ> mStatusMQ;
     EventFlag* mEfGroup;
 
-    static status_t analyzeResult(const EffectResult& result);
+    static status_t analyzeResult(const Result& result);
     static void effectBufferConfigFromHal(
             const buffer_config_t& halConfig, EffectBufferConfig* config);
     static void effectBufferConfigToHal(
@@ -105,6 +103,7 @@
 };
 
 } // namespace CPP_VERSION
+} // namespace effect
 } // namespace android
 
 #endif // ANDROID_HARDWARE_EFFECT_HAL_HIDL_H