[v2,0/5] Support for v4l2 flash devices
mbox series

Message ID 20250912-flash_reco-v2-0-d5bb80a2e619@emfend.at
Headers show
Series
  • Support for v4l2 flash devices
Related show

Message

Matthias Fend Sept. 12, 2025, 7:13 a.m. UTC
Hi,

even though the API contained here is considered too low-level and the
series will therefore probably never be merged, I have nevertheless decided
to include the feedback I have already received and send an updated series.
Perhaps this will be helpful to someone in the meantime, until a new API
exists.

-

This series brings initial support for v4l2 flash devices.

With these patches, v4l2 flash devices can be controlled by applications
via libcamera controls. Applications therefore only require one API and do
not have to worry about details such as finding the appropriate v4l2 flash
device.

The controls are currently quite transparent and no advanced flash
sequences (pre-flash, AGC precorrection, etc.) are supported.

This functionality should be easy to integrate into the various pipeline
handlers and is implemented as an example for the RKSIP1 pipeline.

Signed-off-by: Matthias Fend <matthias.fend@emfend.at>
---
Changes in v2:
- Move controls from draft to core
- Improve documentation for new controls
- CameraFlash::Consistently use controlInfoMap_ 
- CameraFlash: add error checking in getSubdevControl()
- CameraFlash: make return value getX() optional
- CameraFlash: remove model() and controls()
- CameraFlash: use class enums
- FlashControl: also map values for metadata controls

---
Matthias Fend (5):
      libcamera: control_ids_core: Add flash controls
      libcamera: Add support for camera flash devices
      Documentation: Add flash driver requirements
      libcamera: Add flash helpers for pipeline handlers
      rkisp1: Add support for camera flash devices

 Documentation/documentation-contents.rst      |   1 +
 Documentation/flash_driver_requirements.rst   |  40 +++++
 Documentation/index.rst                       |   1 +
 Documentation/meson.build                     |   1 +
 include/libcamera/internal/camera_flash.h     |  72 ++++++++
 include/libcamera/internal/camera_sensor.h    |   2 +
 include/libcamera/internal/flash_control.h    |  23 +++
 src/libcamera/camera_flash.cpp                | 249 ++++++++++++++++++++++++++
 src/libcamera/control_ids_core.yaml           |  78 ++++++++
 src/libcamera/flash_control.cpp               | 148 +++++++++++++++
 src/libcamera/meson.build                     |   2 +
 src/libcamera/pipeline/rkisp1/rkisp1.cpp      |   5 +
 src/libcamera/sensor/camera_sensor_legacy.cpp |  13 ++
 src/libcamera/sensor/camera_sensor_raw.cpp    |  13 ++
 14 files changed, 648 insertions(+)
---
base-commit: b8d332cdcc130c27232f61369e7bab2d954e7ac6
change-id: 20250912-flash_reco-dd3570da10d3

Best regards,