Hi Hans,

On Sun, Sep 21, 2014 at 04:48:24PM +0200, Hans Verkuil wrote:
> From: Hans Verkuil <hans.verk...@cisco.com>
> 
> Replace reserved2 by a flags field. This is used to tell whether
> setting a new store value is applied only once or every time that
> v4l2_ctrl_apply_store() is called for that store.
> 
> Signed-off-by: Hans Verkuil <hans.verk...@cisco.com>
> ---
>  include/uapi/linux/videodev2.h | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h
> index 2ca44ed..fa84070 100644
> --- a/include/uapi/linux/videodev2.h
> +++ b/include/uapi/linux/videodev2.h
> @@ -1282,7 +1282,7 @@ struct v4l2_control {
>  struct v4l2_ext_control {
>       __u32 id;
>       __u32 size;
> -     __u32 reserved2[1];
> +     __u32 flags;

16 bits, please. The pad number (for sub-devices) would need to be added
here as well, and that's 16 bits. A flag might be needed to tell it's valid,
too.

>       union {
>               __s32 value;
>               __s64 value64;
> @@ -1294,6 +1294,10 @@ struct v4l2_ext_control {
>       };
>  } __attribute__ ((packed));
>  
> +/* v4l2_ext_control flags */
> +#define V4L2_EXT_CTRL_FL_IGN_STORE_AFTER_USE 0x00000001
> +#define V4L2_EXT_CTRL_FL_IGN_STORE           0x00000002

Do we need both? Aren't these mutually exclusive, and you must have either
to be meaningful in the context of a store?

> +
>  struct v4l2_ext_controls {
>       union {
>               __u32 ctrl_class;

-- 
Kind regards,

Sakari Ailus
e-mail: sakari.ai...@iki.fi     XMPP: sai...@retiisi.org.uk
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to