[libcamera-devel] Optic handling questions
Matthias Fend
matthias.fend at emfend.at
Thu Dec 15 14:43:47 CET 2022
Hi all,
I have some questions about handling the optic controls. It looks like
this has been considered, but apart from the use of a simple focus lens
in IPU3, it doesn't seem to be used extensively yet.
As I understand it, the current control flow looks something like this:
- IPA sets v4l2 control (e.g. V4L2_CID_FOCUS_ABSOLUTE)
- Control is passed to the pipeline handler
- Pipeline handler reads values from known v4l2 controls (e.g.
V4L2_CID_FOCUS_ABSOLUTE)
- Pipeline handler calls dedicated CameraLens methods (e.g.
setFocusPosition)
- CameraLens then actually converts to v4l2 control (e.g.
V4L2_CID_FOCUS_ABSOLUTE) and applies it to sub device
At first glance, it looks like the controls are being unnecessarily
converted back and forth once, and I'm wondering if the pipeline handler
really needs to be included in this way here.
Currently that would mean that every pipeline handler needs to know how
to convert all v4l2 lens-specific controls (like V4L2_CID_ZOOM_ABSOLUTE,
V4L2_CID_IRIS_ABSOLUTE, ...) into CameraLens methods.
Since the IPAs are already working with v4l2 controls and need to know
all the lens details, wouldn't it be easier if those controls were
passed directly to the subdevice?
The pipeline handler's involvement would then be reduced to finding the
appropriate subdevice and then transparently passing the v4l2 controls
from the IPA to the device.
But maybe I'm missing something crucial here.
I would be happy about any hints and I would also be interested to know
if there are already plans in which direction this topic should develop.
Thanks
~Matthias
More information about the libcamera-devel
mailing list