[libcamera-devel] [RFC v1 4/5] libcamera: pipeline: ipu3: Get VCM information

Kate Hsuan hpa at redhat.com
Fri Apr 15 08:46:38 CEST 2022


Hi Kieran,

On Thu, Apr 14, 2022 at 4:59 PM Kieran Bingham
<kieran.bingham at ideasonboard.com> wrote:
>
> Quoting Kate Hsuan via libcamera-devel (2022-04-14 08:43:41)
> > It is an interface of CameraData to get the VCM steps. Also, the VCM step
> > value is stored in ConfigInfo.
> >
> > Signed-off-by: Kate Hsuan<hpa at redhat.com>
> > ---
> >  src/libcamera/pipeline/ipu3/ipu3.cpp | 15 +++++++++++++++
> >  1 file changed, 15 insertions(+)
> >
> > diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp
> > index 9f113171..9cc12e4c 100644
> > --- a/src/libcamera/pipeline/ipu3/ipu3.cpp
> > +++ b/src/libcamera/pipeline/ipu3/ipu3.cpp
> > @@ -85,6 +85,8 @@ public:
> >
> >         ControlInfoMap ipaControls_;
> >
> > +       int getSensorControls();
> > +
> >  private:
> >         void metadataReady(unsigned int id, const ControlList &metadata);
> >         void paramsBufferReady(unsigned int id);
> > @@ -670,6 +672,7 @@ int PipelineHandlerIPU3::configure(Camera *camera, CameraConfiguration *c)
> >         configInfo.sensorInfo = sensorInfo;
> >         configInfo.bdsOutputSize = config->imguConfig().bds;
> >         configInfo.iif = config->imguConfig().iif;
> > +       configInfo.sensorInfo.maxVcmSteps = data->getSensorControls();
>
> This doesn't sound right -
>     maxVcmSteps = getSensorControls?
>
>
> >         ret = data->ipa_->configure(configInfo, &data->ipaControls_);
> >         if (ret) {
> > @@ -1271,6 +1274,18 @@ void IPU3CameraData::setSensorControls([[maybe_unused]] unsigned int id,
> >         focusLens->setFocusPosition(focusValue.get<int32_t>());
> >  }
> >
> > +int IPU3CameraData::getSensorControls()
> > +{
> > +       int ret = 0;
> > +
> > +       CameraLens *focusLens = cio2_.sensor()->focusLens();
> > +       if (!focusLens)
> > +               return 0;
> > +
> > +       ret = focusLens->getFocusCapabilityies();
>
> Capabilities
>
> But ... I think all of this needs some rework.  This is getting lens
> controls, not sensor controls. And lens controls should be a control
> list - not returning 'all' controls as a single value which is actually
> only one value of one control?

I could try to modify this part since I only would like to get the max
value of VCM. I'll update this in v2.

Thank you



>
> > +       return ret;
> > +}
> > +
> >  void IPU3CameraData::paramsBufferReady(unsigned int id)
> >  {
> >         IPU3Frames::Info *info = frameInfos_.find(id);
> > --
> > 2.35.1
> >
>


--
BR,
Kate



More information about the libcamera-devel mailing list