[libcamera-devel] [PATCH 0/5] Enumerate CameraLens by following sensor's ancillary links

Daniel Scally djrscally at gmail.com
Fri Nov 26 01:31:13 CET 2021


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 described in my series to
linux-media [0] to find VCMs connected to Sensors in libcamera. It's based on
top of a series from Han-Lin [1] and another from Kate Hsuan [2] (both of which
series are pretty neat, by the way)

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, replacing the matching
on driver/device names in Han-Lin's original series.

With the CameraLens available to carry out the controlling of the VCM, I have
pushed the controls to the pipeline handler and removed both all of that
functionality (including the open()/close() of the VCM subdev) from Kate's
work instead.

Thanks
Dan

[0] https://patchwork.linuxtv.org/project/linux-media/list/?series=6792
[1] https://patchwork.libcamera.org/project/libcamera/list/?series=2743
[2] https://patchwork.libcamera.org/project/libcamera/list/?series=2750

Daniel Scally (5):
  libcamera: Add support for ancillary links to MediaLink
  libcamera: media_device: Handle ancillary links in populateLinks()
  libcamera: ipu3-cio2: Discover VCMs through ancillary links
  ipa: ipu3: Send lens controls to pipeline handler
  ipa: ipu3: af: Remove v4l2 interaction from AF algorithm

 include/libcamera/internal/media_object.h | 10 +++++
 include/linux/media.h                     |  1 +
 src/ipa/ipu3/algorithms/af.cpp            | 29 +------------
 src/ipa/ipu3/algorithms/af.h              |  3 --
 src/ipa/ipu3/ipu3.cpp                     |  4 ++
 src/libcamera/media_device.cpp            | 52 ++++++++++++++++-------
 src/libcamera/media_object.cpp            | 24 ++++++++++-
 src/libcamera/pipeline/ipu3/cio2.cpp      | 45 +++++++++++---------
 8 files changed, 101 insertions(+), 67 deletions(-)

-- 
2.25.1



More information about the libcamera-devel mailing list