[libcamera-devel] [RFC v2 1/1] ipa: ipu3: af: Auto focus for dw9719 Surface Go2 VCM

Kate Hsuan hpa at redhat.com
Fri Nov 26 09:57:35 CET 2021


On Thu, Nov 25, 2021 at 7:55 AM Daniel Scally <djrscally at gmail.com> wrote:
>
>
> On 24/11/2021 23:51, Daniel Scally wrote:
> > Hi Kate
> >
> > On 24/11/2021 10:34, Kate Hsuan wrote:
> >> Since VCM for surface Go 2 (dw9719) had been successfully
> >> driven, this Af module can be used to control the VCM and
> >> determine the focus value based on the IPU3 AF state.
> >>
> >> The variance of each focus step is determined and a greedy
> >> approah is used to find the maximum variance of the AF
> >> state and a appropriate focus value.
> >>
> >> Changes since v2:
> >> 1. Add grid configuration interface.
> >> 2. Add AF accelerator configuration.
> >> 3. Move default focus area to the center of the image.
> >>
> >> Signed-off-by: Kate Hsuan <hpa at redhat.com>
> >
> > Thanks a lot for this, it's very cool. I tried it out and observed the
> > following:
> >
> >
> > 1. It seems to focus too close initially, then transition to a
> > progressively further away focus (passing through the sweet spot where
> > the items on my desk behind the Go2 are in focus) and then resets and
> > goes back close focus again. It repeats this a couple times , before
> > eventually settling in to an ok image. So, seems to work but takes a
> > little time to get there.
> >
> > 2. When the "reset" happens, and when stream stops, there's an audible
> > click as the VCM changes position a large amount in one go. I think (at
> > least for stream off) that's my fault in the driver; most of them have a
> > section in .suspend() that gradually relaxes on power off, I'll update
> > the dw9719 to do that too. Not sure that that's the cause of the click
> > on the reset though
> >
> > 3. There's _a lot_ of noise written to the terminal
>
>
> Pressed send by accident so this came off a little abrupt; sorry :). I
> meant to say that I can't quite figure out where it's coming from, but
> it's a constant string of integers being written out.
>

Maybe it is my debug output. I'll check and remove them in v3.

Thank you :)

-- 
BR,
Kate



More information about the libcamera-devel mailing list