[libcamera-devel] [PATCH 0/5] libcamera: Register CameraSensor controls

Jacopo Mondi jacopo at jmondi.org
Wed Dec 23 19:45:11 CET 2020


While preparing for supporting the sensor database, the CameraSensor class
needed a bit of rework.

This series:
- Collect all sensor driver requirements in one function and makes error and
  defaulted properties value more verbose.

  I expect some platform to break after this change as their sensor drivers
  are not instrumented to report all the information required by libcamera.

  Question is: how high should we set the bar ? Personally, I think if we start
  low, we'll never be able to raise it again, so better be strict and change
  our mind as we go

- Renames CameraSensor::controls() in CameraSensor::subdevControls()
- Calculate the sensor exposure time limits as the first libcamera control
  registered by the class
- Expand the IPU3 pipeline handler to register the CameraSensor class provided
  controls as Camera::controls()


On IPU3 Soraka device and ov13858 sensor:

Before this series:

localhost ~ # cam -c1 --list-controls
Control: Exposure: [4..3206]			/--------
Control: Analogue Gain: [0..8191]			|
Control: Test Pattern: [0..4]				|
Control: Link Frequency: [0..1]			  These are all V4L2
Control: Horizontal Blanking: [264..264]	  controls which should not
Control: Vertical Blanking: [78..29631]		  be reported by the Camera
Control: Pixel Rate: [216000000..432000000]		|
Control: Digital Gain: [0..16384]		/-------|
Control: PipelineDepth: [2..3]

After this series:

localhost ~ # cam -c1 --list-controls
Control: ExposureTime: [41..66613]
Control: PipelineDepth: [2..3]

Thanks
   j

Jacopo Mondi (5):
  libcamera: camera_sensor: Validate driver support
  libcamera: camera_sensor: Initialize controls
  libcamera: camera_sensor: Rename controls() method
  libcamera: camera_sensor: Add controls() method
  libcamera: ipu3: Register sensor controls

 include/libcamera/internal/camera_sensor.h |   6 +-
 src/libcamera/camera_sensor.cpp            | 158 +++++++++++++++++++--
 src/libcamera/pipeline/ipu3/ipu3.cpp       |   7 +-
 src/libcamera/pipeline/rkisp1/rkisp1.cpp   |   2 +-
 src/libcamera/pipeline/vimc/vimc.cpp       |   4 +-
 5 files changed, 162 insertions(+), 15 deletions(-)

--
2.29.2



More information about the libcamera-devel mailing list