diff --git a/audio/aidl/common/Android.bp b/audio/aidl/common/Android.bp
index a3f7f0b..4c6a74e 100644
--- a/audio/aidl/common/Android.bp
+++ b/audio/aidl/common/Android.bp
@@ -41,6 +41,20 @@
     ],
 }
 
+cc_library {
+    name: "libaudioaidlranges",
+    host_supported: true,
+    vendor_available: true,
+    static_libs: [
+        "android.hardware.audio.effect-V1-ndk",
+    ],
+    export_include_dirs: ["include"],
+    header_libs: ["libaudioaidl_headers"],
+    srcs: [
+        "EffectRangeSpecific.cpp",
+    ],
+}
+
 cc_test {
     name: "libaudioaidlcommon_test",
     host_supported: true,
diff --git a/audio/aidl/common/EffectRangeSpecific.cpp b/audio/aidl/common/EffectRangeSpecific.cpp
new file mode 100644
index 0000000..bd78ea0
--- /dev/null
+++ b/audio/aidl/common/EffectRangeSpecific.cpp
@@ -0,0 +1,161 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <aidl/android/hardware/audio/effect/DynamicsProcessing.h>
+#include <aidl/android/hardware/audio/effect/Range.h>
+
+#include "EffectRangeSpecific.h"
+#include "effect-impl/EffectRange.h"
+
+namespace aidl::android::hardware::audio::effect {
+
+namespace DynamicsProcessingRanges {
+
+static bool isInputGainConfigInRange(const std::vector<DynamicsProcessing::InputGain>& cfgs,
+                                     const DynamicsProcessing::InputGain& min,
+                                     const DynamicsProcessing::InputGain& max) {
+    auto func = [](const DynamicsProcessing::InputGain& arg) {
+        return std::make_tuple(arg.channel, arg.gainDb);
+    };
+    return isTupleInRange(cfgs, min, max, func);
+}
+
+static bool isLimiterConfigInRange(const std::vector<DynamicsProcessing::LimiterConfig>& cfgs,
+                                   const DynamicsProcessing::LimiterConfig& min,
+                                   const DynamicsProcessing::LimiterConfig& max) {
+    auto func = [](const DynamicsProcessing::LimiterConfig& arg) {
+        return std::make_tuple(arg.channel, arg.enable, arg.linkGroup, arg.attackTimeMs,
+                               arg.releaseTimeMs, arg.ratio, arg.thresholdDb, arg.postGainDb);
+    };
+    return isTupleInRange(cfgs, min, max, func);
+}
+
+static bool isMbcBandConfigInRange(const std::vector<DynamicsProcessing::MbcBandConfig>& cfgs,
+                                   const DynamicsProcessing::MbcBandConfig& min,
+                                   const DynamicsProcessing::MbcBandConfig& max) {
+    auto func = [](const DynamicsProcessing::MbcBandConfig& arg) {
+        return std::make_tuple(arg.channel, arg.band, arg.enable, arg.cutoffFrequencyHz,
+                               arg.attackTimeMs, arg.releaseTimeMs, arg.ratio, arg.thresholdDb,
+                               arg.kneeWidthDb, arg.noiseGateThresholdDb, arg.expanderRatio,
+                               arg.preGainDb, arg.postGainDb);
+    };
+    return isTupleInRange(cfgs, min, max, func);
+}
+
+static bool isEqBandConfigInRange(const std::vector<DynamicsProcessing::EqBandConfig>& cfgs,
+                                  const DynamicsProcessing::EqBandConfig& min,
+                                  const DynamicsProcessing::EqBandConfig& max) {
+    auto func = [](const DynamicsProcessing::EqBandConfig& arg) {
+        return std::make_tuple(arg.channel, arg.band, arg.enable, arg.cutoffFrequencyHz,
+                               arg.gainDb);
+    };
+    return isTupleInRange(cfgs, min, max, func);
+}
+
+static bool isChannelConfigInRange(const std::vector<DynamicsProcessing::ChannelConfig>& cfgs,
+                                   const DynamicsProcessing::ChannelConfig& min,
+                                   const DynamicsProcessing::ChannelConfig& max) {
+    auto func = [](const DynamicsProcessing::ChannelConfig& arg) {
+        return std::make_tuple(arg.channel, arg.enable);
+    };
+    return isTupleInRange(cfgs, min, max, func);
+}
+
+static bool isEngineConfigInRange(const DynamicsProcessing::EngineArchitecture& cfg,
+                                  const DynamicsProcessing::EngineArchitecture& min,
+                                  const DynamicsProcessing::EngineArchitecture& max) {
+    auto func = [](const DynamicsProcessing::EngineArchitecture& arg) {
+        return std::make_tuple(arg.resolutionPreference, arg.preferredProcessingDurationMs,
+                               arg.preEqStage.inUse, arg.preEqStage.bandCount,
+                               arg.postEqStage.inUse, arg.postEqStage.bandCount, arg.mbcStage.inUse,
+                               arg.mbcStage.bandCount, arg.limiterInUse);
+    };
+    return isTupleInRange(func(cfg), func(min), func(max));
+}
+
+static int locateMinMaxForTag(DynamicsProcessing::Tag tag,
+                              const std::vector<Range::DynamicsProcessingRange>& ranges) {
+    for (int i = 0; i < (int)ranges.size(); i++) {
+        if (tag == ranges[i].min.getTag() && tag == ranges[i].max.getTag()) {
+            return i;
+        }
+    }
+    return -1;
+}
+
+bool isParamInRange(const DynamicsProcessing& dp,
+                    const std::vector<Range::DynamicsProcessingRange>& ranges) {
+    auto tag = dp.getTag();
+    int i = locateMinMaxForTag(tag, ranges);
+    if (i == -1) return true;
+
+    switch (tag) {
+        case DynamicsProcessing::engineArchitecture: {
+            return isEngineConfigInRange(
+                    dp.get<DynamicsProcessing::engineArchitecture>(),
+                    ranges[i].min.get<DynamicsProcessing::engineArchitecture>(),
+                    ranges[i].max.get<DynamicsProcessing::engineArchitecture>());
+        }
+        case DynamicsProcessing::preEq: {
+            return isChannelConfigInRange(dp.get<DynamicsProcessing::preEq>(),
+                                          ranges[i].min.get<DynamicsProcessing::preEq>()[0],
+                                          ranges[i].max.get<DynamicsProcessing::preEq>()[0]);
+        }
+        case DynamicsProcessing::postEq: {
+            return isChannelConfigInRange(dp.get<DynamicsProcessing::postEq>(),
+                                          ranges[i].min.get<DynamicsProcessing::postEq>()[0],
+                                          ranges[i].max.get<DynamicsProcessing::postEq>()[0]);
+        }
+        case DynamicsProcessing::mbc: {
+            return isChannelConfigInRange(dp.get<DynamicsProcessing::mbc>(),
+                                          ranges[i].min.get<DynamicsProcessing::mbc>()[0],
+                                          ranges[i].max.get<DynamicsProcessing::mbc>()[0]);
+        }
+        case DynamicsProcessing::preEqBand: {
+            return isEqBandConfigInRange(dp.get<DynamicsProcessing::preEqBand>(),
+                                         ranges[i].min.get<DynamicsProcessing::preEqBand>()[0],
+                                         ranges[i].max.get<DynamicsProcessing::preEqBand>()[0]);
+        }
+        case DynamicsProcessing::postEqBand: {
+            return isEqBandConfigInRange(dp.get<DynamicsProcessing::postEqBand>(),
+                                         ranges[i].min.get<DynamicsProcessing::postEqBand>()[0],
+                                         ranges[i].max.get<DynamicsProcessing::postEqBand>()[0]);
+        }
+        case DynamicsProcessing::mbcBand: {
+            return isMbcBandConfigInRange(dp.get<DynamicsProcessing::mbcBand>(),
+                                          ranges[i].min.get<DynamicsProcessing::mbcBand>()[0],
+                                          ranges[i].max.get<DynamicsProcessing::mbcBand>()[0]);
+        }
+        case DynamicsProcessing::limiter: {
+            return isLimiterConfigInRange(dp.get<DynamicsProcessing::limiter>(),
+                                          ranges[i].min.get<DynamicsProcessing::limiter>()[0],
+                                          ranges[i].max.get<DynamicsProcessing::limiter>()[0]);
+        }
+        case DynamicsProcessing::inputGain: {
+            return isInputGainConfigInRange(dp.get<DynamicsProcessing::inputGain>(),
+                                            ranges[i].min.get<DynamicsProcessing::inputGain>()[0],
+                                            ranges[i].max.get<DynamicsProcessing::inputGain>()[0]);
+        }
+        default: {
+            return true;
+        }
+    }
+    return true;
+}
+
+}  // namespace DynamicsProcessingRanges
+
+}  // namespace aidl::android::hardware::audio::effect
\ No newline at end of file
diff --git a/audio/aidl/common/include/EffectRangeSpecific.h b/audio/aidl/common/include/EffectRangeSpecific.h
new file mode 100644
index 0000000..c7262bb
--- /dev/null
+++ b/audio/aidl/common/include/EffectRangeSpecific.h
@@ -0,0 +1,28 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#pragma once
+
+namespace aidl::android::hardware::audio::effect {
+
+namespace DynamicsProcessingRanges {
+
+bool isParamInRange(const DynamicsProcessing& dp,
+                    const std::vector<Range::DynamicsProcessingRange>& ranges);
+
+}  // namespace DynamicsProcessingRanges
+
+}  // namespace aidl::android::hardware::audio::effect
\ No newline at end of file
diff --git a/audio/aidl/default/include/effect-impl/EffectRange.h b/audio/aidl/default/include/effect-impl/EffectRange.h
new file mode 100644
index 0000000..a3ea01f
--- /dev/null
+++ b/audio/aidl/default/include/effect-impl/EffectRange.h
@@ -0,0 +1,48 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#pragma once
+
+#include <algorithm>
+#include <tuple>
+#include <utility>
+#include <vector>
+
+namespace aidl::android::hardware::audio::effect {
+
+template <typename T>
+bool isInRange(const T& value, const T& low, const T& high) {
+    return (value >= low) && (value <= high);
+}
+
+template <typename T, std::size_t... Is>
+bool isTupleInRange(const T& test, const T& min, const T& max, std::index_sequence<Is...>) {
+    return (isInRange(std::get<Is>(test), std::get<Is>(min), std::get<Is>(max)) && ...);
+}
+
+template <typename T, std::size_t TupSize = std::tuple_size_v<T>>
+bool isTupleInRange(const T& test, const T& min, const T& max) {
+    return isTupleInRange(test, min, max, std::make_index_sequence<TupSize>{});
+}
+
+template <typename T, typename F>
+bool isTupleInRange(const std::vector<T>& cfgs, const T& min, const T& max, const F& func) {
+    auto minT = func(min), maxT = func(max);
+    return std::all_of(cfgs.cbegin(), cfgs.cend(),
+                       [&](const T& cfg) { return isTupleInRange(func(cfg), minT, maxT); });
+}
+
+}  // namespace aidl::android::hardware::audio::effect
