X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=Documentation%2Fmedia%2Fuapi%2Fv4l%2Fvidioc-g-ctrl.rst;h=78c191a893609f75adfb7f7568dec8caa023f32c;hb=cf24a853cdc43bec8314416534daef7c2ee2e5bf;hp=ee929f692ebe120669534ee687e9c40377ce641c;hpb=a157b3aaa44829998d5a079174df989e5d8c20ff;p=deliverable%2Flinux.git diff --git a/Documentation/media/uapi/v4l/vidioc-g-ctrl.rst b/Documentation/media/uapi/v4l/vidioc-g-ctrl.rst index ee929f692ebe..78c191a89360 100644 --- a/Documentation/media/uapi/v4l/vidioc-g-ctrl.rst +++ b/Documentation/media/uapi/v4l/vidioc-g-ctrl.rst @@ -15,7 +15,11 @@ VIDIOC_G_CTRL - VIDIOC_S_CTRL - Get or set the value of a control Synopsis ======== -.. cpp:function:: int ioctl( int fd, int request, struct v4l2_control *argp ) +.. c:function:: int ioctl( int fd, VIDIOC_G_CTRL, struct v4l2_control *argp ) + :name: VIDIOC_G_CTRL + +.. c:function:: int ioctl( int fd, VIDIOC_S_CTRL, struct v4l2_control *argp ) + :name: VIDIOC_S_CTRL Arguments @@ -24,9 +28,6 @@ Arguments ``fd`` File descriptor returned by :ref:`open() `. -``request`` - VIDIOC_G_CTRL, VIDIOC_S_CTRL - ``argp`` @@ -34,10 +35,10 @@ Description =========== To get the current value of a control applications initialize the ``id`` -field of a struct :ref:`struct v4l2_control ` and call the +field of a struct :c:type:`v4l2_control` and call the :ref:`VIDIOC_G_CTRL ` ioctl with a pointer to this structure. To change the value of a control applications initialize the ``id`` and ``value`` -fields of a struct :ref:`struct v4l2_control ` and call the +fields of a struct :c:type:`v4l2_control` and call the :ref:`VIDIOC_S_CTRL ` ioctl. When the ``id`` is invalid drivers return an ``EINVAL`` error code. When the @@ -54,7 +55,9 @@ These ioctls work only with user controls. For other control classes the :ref:`VIDIOC_TRY_EXT_CTRLS ` must be used. -.. _v4l2-control: +.. c:type:: v4l2_control + +.. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| .. flat-table:: struct v4l2_control :header-rows: 0 @@ -87,13 +90,13 @@ appropriately. The generic error codes are described at the :ref:`Generic Error Codes ` chapter. EINVAL - The struct :ref:`v4l2_control ` ``id`` is invalid + The struct :c:type:`v4l2_control` ``id`` is invalid or the ``value`` is inappropriate for the given control (i.e. if a menu item is selected that is not supported by the driver according to :ref:`VIDIOC_QUERYMENU `). ERANGE - The struct :ref:`v4l2_control ` ``value`` is out of + The struct :c:type:`v4l2_control` ``value`` is out of bounds. EBUSY