iCameraProperties where do the ranges get read

How does digitalGainRange and exposure compensation range defaults get set.

Is there an architecture document on this?

On my system exposure compensation got set to 2.970, and digitalGain range got set to 1. Makes argus_camera not work very well.

Terry

hello terrysu50z,

please check Sensor Software Driver Programming Guide, it’s device tree properties to define the ranges.
thanks

what is the mapping for gain and exposure compensation to the device tree params.

I am trying to map v4l2 stuff to my vendors device tree and not getting anywhere.

v4l2-ctl --all seem to have alot of zero’s in the Camera Controls part of my system.
also v4l2-compliance -d /dev/video0 shows that one of the IOCTL fails,

Thanks
Terry

Thanks
Terry

hello terrysu50z,

I’m assume you’re getting one failed as following,
VIDIOC_G/S_PARM failed for v4l2Compliance test is expected, since they’re not implemented.
for example,

        Format ioctls:
                ...
                test VIDIOC_G/S_PARM: FAIL

hello terrysu50z,

let’s taking gain settings for an example,
in the device tree property,
you may specify min_gain_val and max_gain_val for the gain ranges. please also consider digital gain to configure the max_gain_val property,

in the driver side,
you may have implementation of sensor driver to calculate the gains,
please note that, the input setting use 64-bit values. (i.e. s64 val)
you must have set gain functions to convert the settings and program the sensor registers.
for example,

static int imx274_set_gain(struct tegracam_device *tc_dev, s64 val)
{
...
        /* writing analog gain */
        for (i = 0; i < 2; i++) {
                err = imx274_write_reg(priv->s_data, reg_list[i].addr,
                         reg_list[i].val);

...
        /* writing digital gain */
        err = imx274_write_reg(priv->s_data, IMX274_DIGITAL_GAIN_ADDR,
                                reg_dgain);