Skip DynamicsProcessing postEqBand and data test for HAL versions < 3

Post EQ band and most data testing introduced in Android16

Flag: TEST_ONLY
Bug: 401131454
Bug: 405022808
Test: atest --test-mapping hardware/interfaces/audio/aidl/vts:presubmit
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:a9dba9cf968e461203b83d53c3739304dd4a4fb2)
Merged-In: I01dcabc648b743c8bb008dc0207f135fc5aec45c
Change-Id: I01dcabc648b743c8bb008dc0207f135fc5aec45c
diff --git a/audio/aidl/vts/TestUtils.h b/audio/aidl/vts/TestUtils.h
index 9ebdc6e..e5000e3 100644
--- a/audio/aidl/vts/TestUtils.h
+++ b/audio/aidl/vts/TestUtils.h
@@ -113,6 +113,14 @@
         }                                                                                         \
     })
 
+#define SKIP_TEST_IF_VERSION_UNSUPPORTED(effect, minVersion)               \
+    ({                                                                     \
+        if (int version = getHalVersion(effect); version < (minVersion)) { \
+            GTEST_SKIP() << "Skipping for HAL version: " << version        \
+                         << ", minimal version: " << (minVersion) << "\n"; \
+        }                                                                  \
+    })
+
 // Test that the transaction status 'isOk' if it is a known transaction
 #define EXPECT_IS_OK_OR_UNKNOWN_TRANSACTION(ret)                                                 \
     EXPECT_PRED_FORMAT1(                                                                         \