[libcamera-devel] [PATCH 01/14] libcamera: v4l2_device: Add support for V4L2_CTRL_TYPE_U32

Laurent Pinchart laurent.pinchart at ideasonboard.com
Mon Oct 3 15:39:24 CEST 2022


Hi Xavier,

Thank you for the patch.

On Thu, Sep 08, 2022 at 08:48:37PM +0200, Xavier Roumegue via libcamera-devel wrote:

A commit message would be nice. For instance,

Support for the U16 and U32 compound control types is missing. U16 will
require a new libcamera control type, but U32 maps to the existing
ControlTypeInteger32 and can be added easily.

> Signed-off-by: Xavier Roumegue <xavier.roumegue at oss.nxp.com>
> ---
>  src/libcamera/v4l2_device.cpp | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/src/libcamera/v4l2_device.cpp b/src/libcamera/v4l2_device.cpp
> index 83901763..756188ea 100644
> --- a/src/libcamera/v4l2_device.cpp
> +++ b/src/libcamera/v4l2_device.cpp
> @@ -488,6 +488,7 @@ ControlType V4L2Device::v4l2CtrlType(uint32_t ctrlType)
>  		return ControlTypeBool;
>  
>  	case V4L2_CTRL_TYPE_INTEGER:
> +	case V4L2_CTRL_TYPE_U32:
>  		return ControlTypeInteger32;
>  
>  	case V4L2_CTRL_TYPE_INTEGER64:
> @@ -613,6 +614,7 @@ void V4L2Device::listControls()
>  		case V4L2_CTRL_TYPE_BITMASK:
>  		case V4L2_CTRL_TYPE_INTEGER_MENU:
>  		case V4L2_CTRL_TYPE_U8:
> +		case V4L2_CTRL_TYPE_U32:
>  			break;
>  		/* \todo Support other control types. */
>  		default:

Shouldn't you also update V4L2Device::v4l2ControlInfo() and
V4L2Device::getControls() ?

-- 
Regards,

Laurent Pinchart


More information about the libcamera-devel mailing list