Re: [PATCH v4 20/29] media: uapi: Bump the STREAMS bit a little

Hans Verkuil
2026-05-05T06:33:51Z

On 08/04/2026 17:39, Sakari Ailus wrote:
> Bump the V4L2_SUBDEV_CAP_STREAMS by one bit up, order to avoid confusing
> libcamera with streams that has moved forward from the original libcamera
> implementation. The bit can presumably be taken into use but only after
> the other free bits.

The commit log must explain why this is safe to do. In this case because
v4l2_subdev_enable_streams_api is currently always false, which means
that this capability is always removed.

It's also not clear to me why this is important for libcamera. Since
the streams API is still disabled, any libcamera code depending on it
should be purely for testing, right?

Regardless, this uAPI change needs to be documented a lot better.

Regards,

Hans

>
> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
> ---
> include/uapi/linux/v4l2-subdev.h | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/include/uapi/linux/v4l2-subdev.h b/include/uapi/linux/v4l2-subdev.h
> index 2347e266cf75..6160c3e21436 100644
> --- a/include/uapi/linux/v4l2-subdev.h
> +++ b/include/uapi/linux/v4l2-subdev.h
> @@ -196,8 +196,11 @@ struct v4l2_subdev_capability {
> /* The v4l2 sub-device video device node is registered in read-only mode. */
> #define V4L2_SUBDEV_CAP_RO_SUBDEV 0x00000001
>
> +/* Reserved, old STREAMS bit libcamera used before API stabilisation. */
> +/* #define V4L2_SUBDEV_CAP_STREAMS_PRELIMINARY 0x00000002 */
> +
> /* The v4l2 sub-device supports routing and multiplexed streams. */
> -#define V4L2_SUBDEV_CAP_STREAMS 0x00000002
> +#define V4L2_SUBDEV_CAP_STREAMS 0x00000004
>
> /*
> * Is the route active? An active route will start when streaming is enabled