Audio V4: Update namespace and version of 4.0 shim

Put the shim in a V4_0 namespace to comply with the ODR.
Make the include guard unique.
Split from the error prone interface adaptation change for safer review.

Patch generated with:
sed -i 's/V2_0/V4_0/g' *
sed -i "/include.*2.0/s/2\.0/4.0/" *
sed -i '/namespace android *{/anamespace V4_0 {' *
sed -Ei 's/(ifndef|define|endif)(.*)_H/\1\2_4_0_H/' *
sed -Ei 's#}(.*)namespace android$#}\1namespace V4_0\n\0#' *

Bug: 38184704
Test: Compile
Change-Id: I7d3aa46b3dfec664cbeea8a6b946456b8e8f06e3
Signed-off-by: Kevin Rocard <krocard@google.com>
diff --git a/media/libaudiohal/4.0/StreamHalHidl.cpp b/media/libaudiohal/4.0/StreamHalHidl.cpp
index 0cafa36..9ba3b694 100644
--- a/media/libaudiohal/4.0/StreamHalHidl.cpp
+++ b/media/libaudiohal/4.0/StreamHalHidl.cpp
@@ -17,7 +17,7 @@
 #define LOG_TAG "StreamHalHidl"
 //#define LOG_NDEBUG 0
 
-#include <android/hardware/audio/2.0/IStreamOutCallback.h>
+#include <android/hardware/audio/4.0/IStreamOutCallback.h>
 #include <hwbinder/IPCThreadState.h>
 #include <mediautils/SchedulingPolicyService.h>
 #include <utils/Log.h>
@@ -26,23 +26,24 @@
 #include "EffectHalHidl.h"
 #include "StreamHalHidl.h"
 
-using ::android::hardware::audio::common::V2_0::AudioChannelMask;
-using ::android::hardware::audio::common::V2_0::AudioFormat;
-using ::android::hardware::audio::common::V2_0::ThreadInfo;
-using ::android::hardware::audio::V2_0::AudioDrain;
-using ::android::hardware::audio::V2_0::IStreamOutCallback;
-using ::android::hardware::audio::V2_0::MessageQueueFlagBits;
-using ::android::hardware::audio::V2_0::MmapBufferInfo;
-using ::android::hardware::audio::V2_0::MmapPosition;
-using ::android::hardware::audio::V2_0::ParameterValue;
-using ::android::hardware::audio::V2_0::Result;
-using ::android::hardware::audio::V2_0::TimeSpec;
+using ::android::hardware::audio::common::V4_0::AudioChannelMask;
+using ::android::hardware::audio::common::V4_0::AudioFormat;
+using ::android::hardware::audio::common::V4_0::ThreadInfo;
+using ::android::hardware::audio::V4_0::AudioDrain;
+using ::android::hardware::audio::V4_0::IStreamOutCallback;
+using ::android::hardware::audio::V4_0::MessageQueueFlagBits;
+using ::android::hardware::audio::V4_0::MmapBufferInfo;
+using ::android::hardware::audio::V4_0::MmapPosition;
+using ::android::hardware::audio::V4_0::ParameterValue;
+using ::android::hardware::audio::V4_0::Result;
+using ::android::hardware::audio::V4_0::TimeSpec;
 using ::android::hardware::MQDescriptorSync;
 using ::android::hardware::Return;
 using ::android::hardware::Void;
-using ReadCommand = ::android::hardware::audio::V2_0::IStreamIn::ReadCommand;
+using ReadCommand = ::android::hardware::audio::V4_0::IStreamIn::ReadCommand;
 
 namespace android {
+namespace V4_0 {
 
 StreamHalHidl::StreamHalHidl(IStream *stream)
         : ConversionHelperHidl("Stream"),
@@ -749,4 +750,5 @@
     }
 }
 
+} // namespace V4_0
 } // namespace android