[0/4] libcamera: controls: Add support for camera module identifiers
mbox series

Message ID 20251023105651.78395-1-isaac.scott@ideasonboard.com
Headers show
Series
  • libcamera: controls: Add support for camera module identifiers
Related show

Message

Isaac Scott Oct. 23, 2025, 10:56 a.m. UTC
Introduce support for the V4L2_CID_CAMERA_MODULE_IDENTIFIER control,
along with support for string control payloads.

Different camera modules can include the same underlying camera sensor,
but require different parameters to be used when applying algorithms
such as LSC and CCM. This means they would need their own tuning file,
which in turn would need their camera_sensor_helper.

To avoid code duplication, we can query a string control containing the
SKU of a camera module, and search for a tuning file pertaining to that
exact unique camera module, as opposed to applying the potentially
incorrect base sensor tuning file. If the control is not implemented by
the camera's driver, we can fall back to the tuning file for the model
of sensor.

This series also includes a rework of searching for tuning files to take
an initializer_list instead of two strings, meaning a pipeline handlers
can pass as many 'fallback' tuning file paths as they like.

Isaac Scott (4):
  libcamera: v4l2: Support string control payloads
  libcamera: controls: Add CAMERA_MODULE_IDENTIFIER
  ipa_proxy: Rework configurationFile to take variable numbers of paths
  sensor: camera_sensor_legacy: Get module identifier from control

 include/libcamera/controls.h                  |  3 +-
 include/libcamera/internal/camera_sensor.h    |  2 +
 include/libcamera/internal/ipa_proxy.h        |  7 ++-
 include/libcamera/internal/v4l2_subdevice.h   |  2 +
 include/linux/v4l2-controls.h                 |  2 +
 src/libcamera/controls.cpp                    | 11 +++--
 src/libcamera/ipa_proxy.cpp                   | 48 ++++++++++++-------
 src/libcamera/pipeline/ipu3/ipu3.cpp          |  2 +-
 src/libcamera/pipeline/mali-c55/mali-c55.cpp  |  4 +-
 src/libcamera/pipeline/rkisp1/rkisp1.cpp      | 11 +++--
 src/libcamera/pipeline/vimc/vimc.cpp          |  2 +-
 src/libcamera/property_ids_core.yaml          |  8 ++++
 src/libcamera/sensor/camera_sensor.cpp        | 10 ++++
 src/libcamera/sensor/camera_sensor_legacy.cpp |  5 ++
 src/libcamera/sensor/camera_sensor_raw.cpp    |  4 ++
 src/libcamera/software_isp/software_isp.cpp   |  2 +-
 src/libcamera/v4l2_device.cpp                 | 28 +++++++++++
 src/libcamera/v4l2_subdevice.cpp              | 34 +++++++++++++
 test/ipa/ipa_interface_test.cpp               |  2 +-
 19 files changed, 153 insertions(+), 34 deletions(-)