[libcamera-devel] [PATCH/RFC 0/2] libcamera: Add Control instances for V4L2 controls

Laurent Pinchart laurent.pinchart at ideasonboard.com
Mon Feb 8 23:54:27 CET 2021


Hello,

This patch series attempts to extend Control generation for V4L2
controls. I've been toying with the idea for some time and wondered how
it would look like, we now have one answer to that question.

The patches are quite self-explicit, so I won't repeat their commit
messages here. The tentative improvements are in patch 2/2, and its
commit message lists remaining issues and ideas for potential further
improvements. I'm not entirely convinced with the end result yet, but
maybe that's because this is only an RFC and doesn't handle the RPi
controls yet.

Laurent Pinchart (2):
  libcamera: Generate Control instances for V4L2 controls
  libcamera: Use V4L2 Control instances

 include/libcamera/internal/meson.build        |  29 +++-
 .../libcamera/internal/v4l2_control_ids.h.in  |  29 ++++
 include/libcamera/internal/v4l2_controls.h    |   2 +
 src/ipa/ipu3/ipu3.cpp                         |  10 +-
 src/ipa/raspberrypi/raspberrypi.cpp           |  25 ++--
 src/ipa/rkisp1/rkisp1.cpp                     |  10 +-
 src/libcamera/camera_sensor.cpp               |  36 ++---
 src/libcamera/meson.build                     |   8 +-
 src/libcamera/pipeline/ipu3/ipu3.cpp          |   2 +-
 .../pipeline/raspberrypi/raspberrypi.cpp      |  16 +--
 src/libcamera/pipeline/uvcvideo/uvcvideo.cpp  |  29 ++--
 src/libcamera/pipeline/vimc/vimc.cpp          |  10 +-
 src/libcamera/v4l2_control_ids.cpp.in         |  34 +++++
 src/libcamera/v4l2_control_ids.yaml           |  62 +++++++++
 utils/gen-v4l2-controls.py                    | 126 ++++++++++++++++++
 utils/meson.build                             |   1 +
 16 files changed, 351 insertions(+), 78 deletions(-)
 create mode 100644 include/libcamera/internal/v4l2_control_ids.h.in
 create mode 100644 src/libcamera/v4l2_control_ids.cpp.in
 create mode 100644 src/libcamera/v4l2_control_ids.yaml
 create mode 100755 utils/gen-v4l2-controls.py

-- 
Regards,

Laurent Pinchart



More information about the libcamera-devel mailing list