summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/libcamera/controls.h6
-rw-r--r--src/libcamera/pipeline/ipu3/ipu3.cpp2
2 files changed, 6 insertions, 2 deletions
diff --git a/include/libcamera/controls.h b/include/libcamera/controls.h
index 25f67ed9..c5131870 100644
--- a/include/libcamera/controls.h
+++ b/include/libcamera/controls.h
@@ -39,7 +39,7 @@ enum ControlType {
namespace details {
-template<typename T>
+template<typename T, typename = std::void_t<>>
struct control_type {
};
@@ -102,6 +102,10 @@ struct control_type<Span<T, N>> : public control_type<std::remove_cv_t<T>> {
static constexpr std::size_t size = N;
};
+template<typename T>
+struct control_type<T, std::enable_if_t<std::is_enum_v<T>>> : public control_type<int32_t> {
+};
+
} /* namespace details */
class ControlValue
diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp
index 430aa902..29d3c6c1 100644
--- a/src/libcamera/pipeline/ipu3/ipu3.cpp
+++ b/src/libcamera/pipeline/ipu3/ipu3.cpp
@@ -958,7 +958,7 @@ int PipelineHandlerIPU3::updateControls(IPU3CameraData *data)
values.reserve(testPatternModes.size());
for (auto pattern : testPatternModes)
- values.emplace_back(static_cast<int32_t>(pattern));
+ values.emplace_back(pattern);
controls[&controls::draft::TestPatternMode] = ControlInfo(values);
}