[libcamera-devel,RFC,4/7] libcamera: camera_lens: add method to get controls from subdev
diff mbox series

Message ID 20230202111252.3366729-5-matthias.fend@emfend.at
State New
Headers show
Series
  • add support for more complex optics
Related show

Commit Message

Matthias Fend Feb. 2, 2023, 11:12 a.m. UTC
This method allows v4l2 controls to be read directly from the underlying
v4l2 subdevice.

Signed-off-by: Matthias Fend <matthias.fend@emfend.at>
---
 include/libcamera/internal/camera_lens.h | 1 +
 src/libcamera/camera_lens.cpp            | 5 +++++
 2 files changed, 6 insertions(+)

Patch
diff mbox series

diff --git a/include/libcamera/internal/camera_lens.h b/include/libcamera/internal/camera_lens.h
index 66c32a46..f5212ea7 100644
--- a/include/libcamera/internal/camera_lens.h
+++ b/include/libcamera/internal/camera_lens.h
@@ -33,6 +33,7 @@  public:
 
 	const ControlInfoMap &controls() const;
 
+	ControlList getControls(const std::vector<uint32_t> &ids);
 protected:
 	std::string logPrefix() const override;
 
diff --git a/src/libcamera/camera_lens.cpp b/src/libcamera/camera_lens.cpp
index c8fadda5..ddcda232 100644
--- a/src/libcamera/camera_lens.cpp
+++ b/src/libcamera/camera_lens.cpp
@@ -160,4 +160,9 @@  const ControlInfoMap &CameraLens::controls() const
 	return subdev_->controls();
 }
 
+ControlList CameraLens::getControls(const std::vector<uint32_t> &ids)
+{
+	return subdev_->getControls(ids);
+}
+
 } /* namespace libcamera */