Audio HAL V5: Introduce HAL V5, equal to V4 for now

find -name 4.0 | xargs -I@ cp -r @ @/../5.0
find 5.0 */5.0 -type f | xargs sed -Ei 's/V4/V5/;s#(@|/)4.0#\15.0#'
find -name *cpp -o -name *.h | xargs sed -i 's/VERSION == 4/VERSION >= 4/g'
mv {4.1,5.0}/config/audio_policy_configuration.xsd

Then a manual update to Android.bp to add V5 support.
Then a manual update to service.cpp to add support for loading 5.0.

If someone knows a way to avoid copying the .hal, it would be great.
They will be 99% identical between V4 and V5.

Bug: 118203066
Test: vts-tradefed run commandAndExit vts --module VtsHalAudioEffectV2_0Target
      vts-tradefed run commandAndExit vts --module VtsHalAudioV2_0Target
      vts-tradefed run commandAndExit vts --module VtsHalAudioEffectV4_0Target
      vts-tradefed run commandAndExit vts --module VtsHalAudioV4_0Target
Change-Id: If99a5645d19c9780019704ea4f51f8114d83ee8f
Signed-off-by: Kevin Rocard <krocard@google.com>
diff --git a/audio/effect/all-versions/vts/functional/Android.bp b/audio/effect/all-versions/vts/functional/Android.bp
index 0dbcaa5..88d49d8 100644
--- a/audio/effect/all-versions/vts/functional/Android.bp
+++ b/audio/effect/all-versions/vts/functional/Android.bp
@@ -63,3 +63,18 @@
         "-include common/all-versions/VersionMacro.h",
     ]
 }
+
+cc_test {
+    name: "VtsHalAudioEffectV5_0TargetTest",
+    defaults: ["VtsHalAudioEffectTargetTest_default"],
+    static_libs: [
+        "android.hardware.audio.common@5.0",
+        "android.hardware.audio.effect@5.0",
+    ],
+    cflags: [
+        "-DMAJOR_VERSION=5",
+        "-DMINOR_VERSION=0",
+        "-include common/all-versions/VersionMacro.h",
+    ]
+}
+
diff --git a/audio/effect/all-versions/vts/functional/ValidateAudioEffectsConfiguration.cpp b/audio/effect/all-versions/vts/functional/ValidateAudioEffectsConfiguration.cpp
index 9f45ce2..f9e4aa3 100644
--- a/audio/effect/all-versions/vts/functional/ValidateAudioEffectsConfiguration.cpp
+++ b/audio/effect/all-versions/vts/functional/ValidateAudioEffectsConfiguration.cpp
@@ -35,7 +35,7 @@
 #if MAJOR_VERSION == 2
     // In V2, audio effect XML is not required. .conf is still allowed though deprecated
     EXPECT_VALID_XML_MULTIPLE_LOCATIONS(DEFAULT_NAME, locations, xsd);
-#elif MAJOR_VERSION == 4
+#elif MAJOR_VERSION >= 4
     // Starting with V4, audio effect XML is required
     EXPECT_ONE_VALID_XML_MULTIPLE_LOCATIONS(DEFAULT_NAME, locations, xsd);
 #endif
diff --git a/audio/effect/all-versions/vts/functional/VtsHalAudioEffectTargetTest.cpp b/audio/effect/all-versions/vts/functional/VtsHalAudioEffectTargetTest.cpp
index c248eae..cf7fedf 100644
--- a/audio/effect/all-versions/vts/functional/VtsHalAudioEffectTargetTest.cpp
+++ b/audio/effect/all-versions/vts/functional/VtsHalAudioEffectTargetTest.cpp
@@ -164,7 +164,7 @@
     description("Verify that debugDump doesn't crash on invalid arguments");
 #if MAJOR_VERSION == 2
     Return<void> ret = effectsFactory->debugDump(hidl_handle());
-#elif MAJOR_VERSION == 4
+#elif MAJOR_VERSION >= 4
     Return<void> ret = effectsFactory->debug(hidl_handle(), {});
 #endif
     ASSERT_TRUE(ret.isOk());