All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hans Verkuil <hverkuil@xs4all.nl>
To: Sakari Ailus <sakari.ailus@linux.intel.com>, linux-media@vger.kernel.org
Cc: tfiga@chromium.org, bingbu.cao@intel.com,
	jian.xu.zheng@intel.com, rajmohan.mani@intel.com,
	tian.shu.qiu@intel.com, ricardo.ribalda@gmail.com,
	grundler@chromium.org, ping-chung.chen@intel.com,
	andy.yeh@intel.com, jim.lai@intel.com, helmut.grohne@intenta.de,
	laurent.pinchart@ideasonboard.com, snawrocki@kernel.org
Subject: Re: [PATCH 1/5] videodev2.h: Use 8 hexadecimals (32 bits) for control flags
Date: Fri, 28 Sep 2018 15:48:58 +0200	[thread overview]
Message-ID: <9972464e-d88c-74b5-be9e-68104c867c00@xs4all.nl> (raw)
In-Reply-To: <20180925101434.20327-2-sakari.ailus@linux.intel.com>

On 09/25/2018 12:14 PM, Sakari Ailus wrote:
> The V4L2 control flags are a 32-bit bitmask. Use 32-bit hexadecimal
> numbers to specify the flags (was 16).
> 
> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>

Acked-by: Hans Verkuil <hans.verkuil@cisco.com>

Regards,

	Hans

> ---
>  Documentation/media/uapi/v4l/vidioc-queryctrl.rst | 22 +++++++++++-----------
>  include/uapi/linux/videodev2.h                    | 22 +++++++++++-----------
>  2 files changed, 22 insertions(+), 22 deletions(-)
> 
> diff --git a/Documentation/media/uapi/v4l/vidioc-queryctrl.rst b/Documentation/media/uapi/v4l/vidioc-queryctrl.rst
> index 5bd26e8c9a1a0..ff2d131223b84 100644
> --- a/Documentation/media/uapi/v4l/vidioc-queryctrl.rst
> +++ b/Documentation/media/uapi/v4l/vidioc-queryctrl.rst
> @@ -439,37 +439,37 @@ See also the examples in :ref:`control`.
>      :widths:       3 1 4
>  
>      * - ``V4L2_CTRL_FLAG_DISABLED``
> -      - 0x0001
> +      - 0x00000001
>        - This control is permanently disabled and should be ignored by the
>  	application. Any attempt to change the control will result in an
>  	``EINVAL`` error code.
>      * - ``V4L2_CTRL_FLAG_GRABBED``
> -      - 0x0002
> +      - 0x00000002
>        - This control is temporarily unchangeable, for example because
>  	another application took over control of the respective resource.
>  	Such controls may be displayed specially in a user interface.
>  	Attempts to change the control may result in an ``EBUSY`` error code.
>      * - ``V4L2_CTRL_FLAG_READ_ONLY``
> -      - 0x0004
> +      - 0x00000004
>        - This control is permanently readable only. Any attempt to change
>  	the control will result in an ``EINVAL`` error code.
>      * - ``V4L2_CTRL_FLAG_UPDATE``
> -      - 0x0008
> +      - 0x00000008
>        - A hint that changing this control may affect the value of other
>  	controls within the same control class. Applications should update
>  	their user interface accordingly.
>      * - ``V4L2_CTRL_FLAG_INACTIVE``
> -      - 0x0010
> +      - 0x00000010
>        - This control is not applicable to the current configuration and
>  	should be displayed accordingly in a user interface. For example
>  	the flag may be set on a MPEG audio level 2 bitrate control when
>  	MPEG audio encoding level 1 was selected with another control.
>      * - ``V4L2_CTRL_FLAG_SLIDER``
> -      - 0x0020
> +      - 0x00000020
>        - A hint that this control is best represented as a slider-like
>  	element in a user interface.
>      * - ``V4L2_CTRL_FLAG_WRITE_ONLY``
> -      - 0x0040
> +      - 0x00000040
>        - This control is permanently writable only. Any attempt to read the
>  	control will result in an ``EACCES`` error code error code. This flag
>  	is typically present for relative controls or action controls
> @@ -477,7 +477,7 @@ See also the examples in :ref:`control`.
>  	action (e. g. motor control) but no meaningful value can be
>  	returned.
>      * - ``V4L2_CTRL_FLAG_VOLATILE``
> -      - 0x0080
> +      - 0x00000080
>        - This control is volatile, which means that the value of the
>  	control changes continuously. A typical example would be the
>  	current gain value if the device is in auto-gain mode. In such a
> @@ -493,7 +493,7 @@ See also the examples in :ref:`control`.
>  	   Setting a new value for a volatile control will *never* trigger a
>  	   :ref:`V4L2_EVENT_CTRL_CH_VALUE <ctrl-changes-flags>` event.
>      * - ``V4L2_CTRL_FLAG_HAS_PAYLOAD``
> -      - 0x0100
> +      - 0x00000100
>        - This control has a pointer type, so its value has to be accessed
>  	using one of the pointer fields of struct
>  	:c:type:`v4l2_ext_control`. This flag is set
> @@ -503,7 +503,7 @@ See also the examples in :ref:`control`.
>      * .. _FLAG_EXECUTE_ON_WRITE:
>  
>        - ``V4L2_CTRL_FLAG_EXECUTE_ON_WRITE``
> -      - 0x0200
> +      - 0x00000200
>        - The value provided to the control will be propagated to the driver
>  	even if it remains constant. This is required when the control
>  	represents an action on the hardware. For example: clearing an
> @@ -512,7 +512,7 @@ See also the examples in :ref:`control`.
>      * .. _FLAG_MODIFY_LAYOUT:
>  
>        - ``V4L2_CTRL_FLAG_MODIFY_LAYOUT``
> -      - 0x0400
> +      - 0x00000400
>        - Changing this control value may modify the layout of the
>          buffer (for video devices) or the media bus format (for sub-devices).
>  
> diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h
> index 184e4dbe8f9c0..ae083978988f1 100644
> --- a/include/uapi/linux/videodev2.h
> +++ b/include/uapi/linux/videodev2.h
> @@ -1681,17 +1681,17 @@ struct v4l2_querymenu {
>  } __attribute__ ((packed));
>  
>  /*  Control flags  */
> -#define V4L2_CTRL_FLAG_DISABLED		0x0001
> -#define V4L2_CTRL_FLAG_GRABBED		0x0002
> -#define V4L2_CTRL_FLAG_READ_ONLY	0x0004
> -#define V4L2_CTRL_FLAG_UPDATE		0x0008
> -#define V4L2_CTRL_FLAG_INACTIVE		0x0010
> -#define V4L2_CTRL_FLAG_SLIDER		0x0020
> -#define V4L2_CTRL_FLAG_WRITE_ONLY	0x0040
> -#define V4L2_CTRL_FLAG_VOLATILE		0x0080
> -#define V4L2_CTRL_FLAG_HAS_PAYLOAD	0x0100
> -#define V4L2_CTRL_FLAG_EXECUTE_ON_WRITE	0x0200
> -#define V4L2_CTRL_FLAG_MODIFY_LAYOUT	0x0400
> +#define V4L2_CTRL_FLAG_DISABLED		0x00000001
> +#define V4L2_CTRL_FLAG_GRABBED		0x00000002
> +#define V4L2_CTRL_FLAG_READ_ONLY	0x00000004
> +#define V4L2_CTRL_FLAG_UPDATE		0x00000008
> +#define V4L2_CTRL_FLAG_INACTIVE		0x00000010
> +#define V4L2_CTRL_FLAG_SLIDER		0x00000020
> +#define V4L2_CTRL_FLAG_WRITE_ONLY	0x00000040
> +#define V4L2_CTRL_FLAG_VOLATILE		0x00000080
> +#define V4L2_CTRL_FLAG_HAS_PAYLOAD	0x00000100
> +#define V4L2_CTRL_FLAG_EXECUTE_ON_WRITE	0x00000200
> +#define V4L2_CTRL_FLAG_MODIFY_LAYOUT	0x00000400
>  
>  /*  Query flags, to be ORed with the control ID */
>  #define V4L2_CTRL_FLAG_NEXT_CTRL	0x80000000
> 

  parent reply	other threads:[~2018-09-28 20:12 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-25 10:14 [PATCH 0/5] Add units to controls Sakari Ailus
2018-09-25 10:14 ` [PATCH 1/5] videodev2.h: Use 8 hexadecimals (32 bits) for control flags Sakari Ailus
2018-09-28 13:16   ` Laurent Pinchart
2018-09-28 13:48   ` Hans Verkuil [this message]
2018-09-25 10:14 ` [PATCH 2/5] v4l: controls: Add support for exponential bases, prefixes and units Sakari Ailus
2018-09-28 14:00   ` Hans Verkuil
2018-10-01  9:27     ` Helmut Grohne
2018-10-01  9:48       ` Hans Verkuil
2018-11-14  9:09     ` Tomasz Figa
2018-10-14  6:14   ` Pavel Machek
2018-09-25 10:14 ` [PATCH 3/5] Documentation: media: Document control exponential bases, units, prefixes Sakari Ailus
2018-09-25 10:39   ` Helmut Grohne
2018-09-25 10:51     ` Sakari Ailus
2018-09-28 14:20   ` Hans Verkuil
2018-09-25 10:14 ` [PATCH 4/5] v4l: controls: QUERY_EXT_CTRL support for base, prefix and unit Sakari Ailus
2018-09-26 22:40   ` kbuild test robot
2018-09-28 14:23   ` Hans Verkuil
2018-09-25 10:14 ` [PATCH 5/5] smiapp: Set control units Sakari Ailus
2018-09-28 14:28   ` Hans Verkuil
2018-09-25 11:48 ` [PATCH 0/5] Add units to controls Helmut Grohne
2018-09-25 12:30   ` Sakari Ailus
2018-09-26 10:24     ` Helmut Grohne
2018-09-28 13:25     ` Laurent Pinchart
2018-09-28 14:36       ` Hans Verkuil
2018-10-03  9:15     ` Tomasz Figa

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9972464e-d88c-74b5-be9e-68104c867c00@xs4all.nl \
    --to=hverkuil@xs4all.nl \
    --cc=andy.yeh@intel.com \
    --cc=bingbu.cao@intel.com \
    --cc=grundler@chromium.org \
    --cc=helmut.grohne@intenta.de \
    --cc=jian.xu.zheng@intel.com \
    --cc=jim.lai@intel.com \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-media@vger.kernel.org \
    --cc=ping-chung.chen@intel.com \
    --cc=rajmohan.mani@intel.com \
    --cc=ricardo.ribalda@gmail.com \
    --cc=sakari.ailus@linux.intel.com \
    --cc=snawrocki@kernel.org \
    --cc=tfiga@chromium.org \
    --cc=tian.shu.qiu@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.