[libcamera-devel,v4,0/9] Enumerate CameraLens by following sensor's ancillary links
mbox series

Message ID 20220131223330.61563-1-djrscally@gmail.com
Headers show
Series
  • Enumerate CameraLens by following sensor's ancillary links
Related show

Message

Daniel Scally Jan. 31, 2022, 10:33 p.m. UTC
Hello All

This series is an attempt at making the incoming VCM support a little more
agnostic, by following the new style of media links to find VCMs connected to
Sensors in libcamera. This is based on top of master, plus Kate's v5 [1]

The general principle of the new links is an entity to entity link which will
be connected by the kernel between a sensor's entity and an entity for a VCM
device, where those entities have a fwnode match based on the "lens-focus"
property against the sensor. These links are then discovered by libcamera and
followed to create an instance of the CameraLens class.

With the CameraLens available to carry out the controlling of the VCM, I have
pushed the controls to the pipeline handler.

Thanks
Dan

[1] https://lists.libcamera.org/pipermail/libcamera-devel/2022-January/028837.html

Daniel Scally (9):
  libcamera: Add members to MediaEntity to support ancillary entities
  include: linux: Add MEDIA_LNK_FL_ANCILLARY_LINK
  libcamera: media_device: Handle ancillary links in populateLinks()
  libcamera: camera_sensor: Discover VCMs through ancillary links
  libcamera: camera_lens: Add function to fetch subdev controls
  libcamera: ipa: Add lens control member to ipu3 ipa interface
  libcamera: ipa: Rename ctrls_ member
  libcamera: ipu3: Pass lens controls to config info
  ipa: ipu3: Send lens controls to pipeline handler

 include/libcamera/internal/camera_lens.h   |  4 ++
 include/libcamera/internal/camera_sensor.h |  1 +
 include/libcamera/internal/media_object.h  |  4 ++
 include/libcamera/ipa/ipu3.mojom           |  1 +
 include/linux/media.h                      |  1 +
 src/ipa/ipu3/ipu3.cpp                      | 30 ++++++----
 src/libcamera/camera_lens.cpp              | 11 ++++
 src/libcamera/camera_sensor.cpp            | 39 +++++++++++++
 src/libcamera/media_device.cpp             | 67 ++++++++++++++++------
 src/libcamera/media_object.cpp             | 15 +++++
 src/libcamera/pipeline/ipu3/ipu3.cpp       |  5 ++
 11 files changed, 151 insertions(+), 27 deletions(-)