[libcamera-devel] [PATCH v2 3/3] rkisp1: Add camera lens position control from IPA

Kieran Bingham kieran.bingham at ideasonboard.com
Tue Aug 9 21:44:55 CEST 2022


Quoting Jacopo Mondi (2022-08-09 17:01:37)
> Hi Kieran
> 
> On Tue, Aug 09, 2022 at 04:50:53PM +0100, Kieran Bingham wrote:
> > Quoting Jacopo Mondi via libcamera-devel (2022-08-09 16:25:13)
> > > Hi Daniel

> > > > +void RkISP1CameraData::setLensControls(const ControlList &lensControls)
> > > > +{
> > > > +     CameraLens *focusLens = sensor_->focusLens();
> > > > +     if (!focusLens)
> > > > +             return;
> > > > +
> > > > +     if (!lensControls.contains(V4L2_CID_FOCUS_ABSOLUTE))
> > > > +             return;
> >
> > I think the construction of sensor_->focusLens should make sure that the
> > correct control is set, so that if we have a valid CameraLens
> > *focusLens, we know it's valid to call focusLens->setFocusPosition().
> >
> > So the above lensControls.contains() should be redundant.
> 
> I've initially been fooled as well and was about to make the same
> comment, but here Daniel's checking if V4L2_CID_FOCUS_ABSOLUTE is part
> of the list of controls to apply to the lens, not if the control is
> exposed by the subdevice

Aha - oops - yes indeed. I see that now. Ok ;-)

--
Kieran


More information about the libcamera-devel mailing list