[libcamera-devel] How to deal with "atomic sequences" of AF controls?

Nick Hollinghurst nick.hollinghurst at raspberrypi.com
Fri Nov 25 11:31:17 CET 2022


Hi all,

I'm having some difficulty with the definitions of Autofocus controls
(perhaps the question can be generalized to other groups of controls).
Consider these example sequences of control writes:

 1. set LensPosition
 2. switch to Continuous mode

 1. switch to Auto mode
 2. trigger a scan

 1. switch to Manual mode
 2. set LensPosition

For each pair, the order is important -- it would not work if
reversed. It's entirely reasonable that an application might want to
send such a sequence quickly, ideally atomically. And that's a problem
because the order of controls in a ControlList is not well defined.

An implementation could (and probably should) use heuristics to ensure
such combinations of controls are interpreted in the "most useful"
order. But in the absence of guidance from the specification, it seems
an application could never rely on this working!

Is this something that needs addressing either in documentation, or by
some kind of change to the API?

Regards,

 Nick


More information about the libcamera-devel mailing list