[libcamera-devel] [RFC v2 1/1] ipa: ipu3: af: Auto focus for dw9719 Surface Go2 VCM
Daniel Scally
djrscally at gmail.com
Thu Nov 25 00:55:43 CET 2021
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.
More information about the libcamera-devel
mailing list