[libcamera-devel] conflicting default control values

Kieran Bingham kieran.bingham at ideasonboard.com
Sun Jun 5 20:51:58 CEST 2022


Quoting Christian Rauch via libcamera-devel (2022-06-05 01:12:41)
> Hello,
> 
> When using the V4L2 interface, I noticed that configuration values will
> stay set globally even after the process that set them exits. E.g.
> setting a low exposure value via libcamera and quitting the process will
> keep that exposure value such that other processes, such as skype or
> guvcview, will show the images with the same setting (e.g. low
> exposure). This is quite inconvenient as some programs will not be able
> to reset those values.

Yes, I think this is expected behaviour in V4L2 that applications can
set controls and they can persist. That means as you've seen that if an
application (such as a libcamera application) modifies controls, they
stay that way until they are changed again.

> I worked around this issue by resetting these parameters to the default
> values defined in libcamera. During this, I also noticed that the set of
> default values might collide. On my system, when reading and setting the

Sorry - collide with what? I think the default values come from V4L2
don't they ?

> default control values, the auto-exposure will be activated and a
> specific exposure time will be set. This causes errors in the driver and
> all requests will be cancelled until the auto-exposure is set to false
> or the auto-exposure is removed.

Is this on a UVC device? or something else?

This sounds like quite a specific issue that may need to be tackled. I
can't tell if that's a driver bug or something else from the description
- so I'd like to know more about what this test case came from.


> Is there a way for libcamera to either reset the V4L2 settings to the
> initial condition or to prevent conflicting control values?

I could imagine that the V4L2VideoDevice could go through and reset
controls on a device to defaults at close() or as the object is
destructed?


> 
> Best,
> Christian
>

--
Kieran


More information about the libcamera-devel mailing list