[libcamera-devel] [PATCH v2 0/2] Add read-only flag to ControlInfo

Naushir Patuck naush at raspberrypi.com
Fri Dec 2 13:40:03 CET 2022


Hi,

This small patch series adds a read-only flag to ControlInfo.  This is used
to test if a control, in particular V4L2_CID_HBLANK, can be written to by
userland.  It replaces the slightly fragile workaround we have right now where
we test if the min and max values of a control are the same to determine if
a control is read-only.

I've only modified the one ControlInfo constructor signature used by the
V4L2Device class to allow this flag to be set, as setting it for a non-v4l2
control probably does not make sense at this point.  If folks think this is
incorrect, please let me know.

Regards,
Naush

Naushir Patuck (2):
  libcamera: controls: Add read-only flag to ControlInfo
  libcamera:camera_sensor, ipa: raspberrypi: Test readOnly() for HBLANK
    control

 include/libcamera/controls.h        |  5 ++++-
 src/ipa/raspberrypi/raspberrypi.cpp | 12 +-----------
 src/libcamera/camera_sensor.cpp     | 14 ++------------
 src/libcamera/controls.cpp          | 17 +++++++++++++----
 src/libcamera/v4l2_device.cpp       | 12 ++++++++----
 5 files changed, 28 insertions(+), 32 deletions(-)

-- 
2.25.1



More information about the libcamera-devel mailing list