Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

media: docs: make V4L documents more compatible with Sphinx 3.1+

Sphinx 3.x broke support for the cdomain.py extension, as the
c domain code was rewritten. Due to that, the c tags need to
be re-written, in order to use the new c domain notation.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>

+559 -922
+3 -11
Documentation/userspace-api/media/v4l/buffer.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _buffer: 4 5 ··· 33 32 mem-to-mem devices is an exception to the rule: the timestamp source 34 33 flags are copied from the OUTPUT video buffer to the CAPTURE video 35 34 buffer. 36 - 37 35 38 36 Interactions between formats, controls and buffers 39 37 ================================================== ··· 152 152 enough for all the desired formats and controls, or by allocating separate set 153 153 of appropriately sized buffers for each use case). 154 154 155 - 156 155 .. c:type:: v4l2_buffer 157 156 158 157 struct v4l2_buffer ··· 256 257 ``V4L2_MEMORY_MMAP`` this is the offset of the buffer from the 257 258 start of the device memory. The value is returned by the driver 258 259 and apart of serving as parameter to the 259 - :ref:`mmap() <func-mmap>` function not useful for applications. 260 + :c:func:`mmap()` function not useful for applications. 260 261 See :ref:`mmap` for details 261 262 * - unsigned long 262 263 - ``userptr`` ··· 309 310 given, then ``EINVAL`` will be returned. 310 311 311 312 312 - 313 313 .. c:type:: v4l2_plane 314 314 315 315 struct v4l2_plane ··· 348 350 - ``mem_offset`` 349 351 - When the memory type in the containing struct 350 352 :c:type:`v4l2_buffer` is ``V4L2_MEMORY_MMAP``, this 351 - is the value that should be passed to :ref:`mmap() <func-mmap>`, 353 + is the value that should be passed to :c:func:`mmap()`, 352 354 similar to the ``offset`` field in struct 353 355 :c:type:`v4l2_buffer`. 354 356 * - unsigned long ··· 380 382 - ``reserved[11]`` 381 383 - Reserved for future use. Should be zeroed by drivers and 382 384 applications. 383 - 384 385 385 386 386 387 .. c:type:: v4l2_buf_type ··· 443 446 * - ``V4L2_BUF_TYPE_META_OUTPUT`` 444 447 - 14 445 448 - Buffer for metadata output, see :ref:`metadata`. 446 - 447 449 448 450 449 451 .. _buffer-flags: ··· 716 720 - The buffer is used for :ref:`DMA shared buffer <dmabuf>` I/O. 717 721 718 722 719 - 720 723 Timecodes 721 724 ========= 722 725 ··· 723 728 :ref:`smpte12m` or similar timecode. 724 729 (struct :c:type:`timeval` timestamps are stored in the struct 725 730 :c:type:`v4l2_buffer` ``timestamp`` field.) 726 - 727 731 728 732 .. c:type:: v4l2_timecode 729 733 ··· 760 766 - The "user group" bits from the timecode. 761 767 762 768 763 - 764 769 .. _timecode-type: 765 770 766 771 Timecode Types ··· 787 794 * - ``V4L2_TC_TYPE_60FPS`` 788 795 - 5 789 796 - 790 - 791 797 792 798 793 799 .. _timecode-flags:
+2 -5
Documentation/userspace-api/media/v4l/dev-capture.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _capture: 4 5 ··· 20 19 21 20 .. note:: The same device file names are used for video output devices. 22 21 23 - 24 22 Querying Capabilities 25 23 ===================== 26 24 ··· 34 34 streaming I/O methods must be supported. Tuners and audio inputs are 35 35 optional. 36 36 37 - 38 37 Supplemental Functions 39 38 ====================== 40 39 ··· 44 45 :ref:`video input <video>` ioctls must be supported by all video 45 46 capture devices. 46 47 47 - 48 48 Image Format Negotiation 49 49 ======================== 50 50 ··· 53 55 format, the number of bits per pixel or width and height. Together they 54 56 also define how images are scaled in the process. 55 57 56 - As usual these parameters are *not* reset at :ref:`open() <func-open>` 58 + As usual these parameters are *not* reset at :c:func:`open()` 57 59 time to permit Unix tool chains, programming a device and then reading 58 60 from it as if it was a plain file. Well written V4L2 applications ensure 59 61 they really get what they want, including cropping and scaling. ··· 92 94 and :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl, even if :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ignores all 93 95 requests and always returns default parameters as :ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>` does. 94 96 :ref:`VIDIOC_TRY_FMT <VIDIOC_G_FMT>` is optional. 95 - 96 97 97 98 Reading Images 98 99 ==============
+2 -5
Documentation/userspace-api/media/v4l/dev-output.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _output: 4 5 ··· 19 18 20 19 .. note:: The same device file names are used also for video capture devices. 21 20 22 - 23 21 Querying Capabilities 24 22 ===================== 25 23 ··· 32 32 streaming I/O methods must be supported. Modulators and audio outputs 33 33 are optional. 34 34 35 - 36 35 Supplemental Functions 37 36 ====================== 38 37 ··· 42 43 :ref:`video output <video>` ioctls must be supported by all video 43 44 output devices. 44 45 45 - 46 46 Image Format Negotiation 47 47 ======================== 48 48 ··· 51 53 the number of bits per pixel or width and height. Together they also 52 54 define how images are scaled in the process. 53 55 54 - As usual these parameters are *not* reset at :ref:`open() <func-open>` 56 + As usual these parameters are *not* reset at :c:func:`open()` 55 57 time to permit Unix tool chains, programming a device and then writing 56 58 to it as if it was a plain file. Well written V4L2 applications ensure 57 59 they really get what they want, including cropping and scaling. ··· 89 91 and :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl, even if :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ignores all 90 92 requests and always returns default parameters as :ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>` does. 91 93 :ref:`VIDIOC_TRY_FMT <VIDIOC_G_FMT>` is optional. 92 - 93 94 94 95 Writing Images 95 96 ==============
+6 -13
Documentation/userspace-api/media/v4l/dev-raw-vbi.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _raw-vbi: 4 5 ··· 33 32 Accessed as ``/dev/vbi``, raw VBI capturing or output is the default 34 33 device function. 35 34 36 - 37 35 Querying Capabilities 38 36 ===================== 39 37 ··· 44 44 read/write, streaming or asynchronous I/O methods must be supported. VBI 45 45 devices may or may not have a tuner or modulator. 46 46 47 - 48 47 Supplemental Functions 49 48 ====================== 50 49 ··· 51 52 :ref:`tuner or modulator <tuner>`, and :ref:`controls <control>` 52 53 ioctls as needed. The :ref:`video standard <standard>` ioctls provide 53 54 information vital to program a VBI device, therefore must be supported. 54 - 55 55 56 56 Raw VBI Format Negotiation 57 57 ========================== ··· 60 62 query the sampling parameters. Moreover, to allow for some flexibility 61 63 applications can also suggest different parameters. 62 64 63 - As usual these parameters are *not* reset at :ref:`open() <func-open>` 65 + As usual these parameters are *not* reset at :c:func:`open()` 64 66 time to permit Unix tool chains, programming a device and then reading 65 67 from it as if it was a plain file. Well written V4L2 applications should 66 68 always ensure they really get what they want, requesting reasonable ··· 89 91 overlap, or when the driver supports multiple opens and another process 90 92 already requested VBI capturing or output. Anyway, applications must 91 93 expect other resource allocation points which may return ``EBUSY``, at the 92 - :ref:`VIDIOC_STREAMON` ioctl and the first :ref:`read() <func-read>` 93 - , :ref:`write() <func-write>` and :ref:`select() <func-select>` calls. 94 + :ref:`VIDIOC_STREAMON` ioctl and the first :c:func:`read()` 95 + , :c:func:`write()` and :c:func:`select()` calls. 94 96 95 97 VBI devices must implement both the :ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>` and 96 98 :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl, even if :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ignores all requests ··· 180 182 - This array is reserved for future extensions. Drivers and 181 183 applications must set it to zero. 182 184 183 - 184 185 .. tabularcolumns:: |p{4.4cm}|p{1.5cm}|p{11.6cm}| 185 186 186 187 .. _vbifmt-flags: ··· 215 218 non-zero. 216 219 217 220 218 - 219 221 .. _vbi-hsync: 220 222 221 223 .. kernel-figure:: vbi_hsync.svg ··· 222 226 :align: center 223 227 224 228 **Figure 4.1. Line synchronization** 225 - 226 229 227 230 .. _vbi-525: 228 231 ··· 246 251 the negotiated VBI parameters, should be refused by the driver. A format 247 252 change during active I/O is not permitted. 248 253 249 - 250 254 Reading and writing VBI images 251 255 ============================== 252 256 ··· 254 260 consisting of two fields of VBI images immediately following in memory. 255 261 256 262 The total size of a frame computes as follows: 257 - 258 263 259 264 .. code-block:: c 260 265 ··· 269 276 using buffer timestamps. 270 277 271 278 Remember the :ref:`VIDIOC_STREAMON <VIDIOC_STREAMON>` ioctl and the 272 - first :ref:`read() <func-read>`, :ref:`write() <func-write>` and 273 - :ref:`select() <func-select>` call can be resource allocation 279 + first :c:func:`read()`, :c:func:`write()` and 280 + :c:func:`select()` call can be resource allocation 274 281 points returning an ``EBUSY`` error code if the required hardware resources 275 282 are temporarily unavailable, for example the device is already in use by 276 283 another process.
+3 -9
Documentation/userspace-api/media/v4l/dev-rds.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _rds: 4 5 ··· 28 27 (or the so-called 'E blocks' in general) be needed, then please contact 29 28 the linux-media mailing list: 30 29 `https://linuxtv.org/lists.php <https://linuxtv.org/lists.php>`__. 31 - 32 30 33 31 Querying Capabilities 34 32 ===================== ··· 68 68 :ref:`Writing RDS data <writing-rds-data>` and 69 69 :ref:`FM Transmitter Control Reference <fm-tx-controls>`. 70 70 71 - 72 71 .. _reading-rds-data: 73 72 74 73 Reading RDS data 75 74 ================ 76 75 77 76 RDS data can be read from the radio device with the 78 - :ref:`read() <func-read>` function. The data is packed in groups of 77 + :c:func:`read()` function. The data is packed in groups of 79 78 three bytes. 80 - 81 79 82 80 .. _writing-rds-data: 83 81 ··· 83 85 ================ 84 86 85 87 RDS data can be written to the radio device with the 86 - :ref:`write() <func-write>` function. The data is packed in groups of 88 + :c:func:`write()` function. The data is packed in groups of 87 89 three bytes, as follows: 88 - 89 90 90 91 RDS datastructures 91 92 ================== 92 - 93 93 94 94 .. c:type:: v4l2_rds_data 95 95 ··· 107 111 * - __u8 108 112 - ``block`` 109 113 - Block description 110 - 111 114 112 115 113 116 .. _v4l2-rds-block: ··· 129 134 * - Bit 7 130 135 - Error bit. Indicates that an uncorrectable error occurred during 131 136 reception of this block. 132 - 133 137 134 138 135 139 .. _v4l2-rds-block-codes:
+7 -24
Documentation/userspace-api/media/v4l/dev-sliced-vbi.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _sliced: 4 5 ··· 28 27 Different file descriptors must be used to pass raw and sliced VBI data 29 28 simultaneously, if this is supported by the driver. 30 29 31 - 32 30 Querying Capabilities 33 31 ===================== 34 32 ··· 39 39 read/write, streaming or asynchronous :ref:`I/O methods <io>` must be 40 40 supported. Sliced VBI devices may have a tuner or modulator. 41 41 42 - 43 42 Supplemental Functions 44 43 ====================== 45 44 ··· 47 48 capabilities, and they may support :ref:`control` ioctls. 48 49 The :ref:`video standard <standard>` ioctls provide information vital 49 50 to program a sliced VBI device, therefore must be supported. 50 - 51 51 52 52 .. _sliced-vbi-format-negotitation: 53 53 ··· 94 96 resources are temporarily unavailable. Other resource allocation points 95 97 which may return ``EBUSY`` can be the 96 98 :ref:`VIDIOC_STREAMON` ioctl and the first 97 - :ref:`read() <func-read>`, :ref:`write() <func-write>` and 98 - :ref:`select() <func-select>` call. 99 - 99 + :c:func:`read()`, :c:func:`write()` and 100 + :c:func:`select()` call. 100 101 101 102 .. c:type:: v4l2_sliced_vbi_format 102 103 ··· 188 191 * - __u32 189 192 - ``io_size`` 190 193 - :cspan:`2` Maximum number of bytes passed by one 191 - :ref:`read() <func-read>` or :ref:`write() <func-write>` call, 194 + :c:func:`read()` or :c:func:`write()` call, 192 195 and the buffer size in bytes for the 193 196 :ref:`VIDIOC_QBUF` and 194 197 :ref:`VIDIOC_DQBUF <VIDIOC_QBUF>` ioctl. Drivers set this field ··· 271 274 272 275 \normalsize 273 276 274 - 275 277 Drivers may return an ``EINVAL`` error code when applications attempt to 276 278 read or write data without prior format negotiation, after switching the 277 279 video standard (which may invalidate the negotiated VBI parameters) and ··· 280 284 format while i/o is in progress (between a 281 285 :ref:`VIDIOC_STREAMON` and 282 286 :ref:`VIDIOC_STREAMOFF <VIDIOC_STREAMON>` call, and after the first 283 - :ref:`read() <func-read>` or :ref:`write() <func-write>` call). 284 - 287 + :c:func:`read()` or :c:func:`write()` call). 285 288 286 289 Reading and writing sliced VBI data 287 290 =================================== 288 291 289 - A single :ref:`read() <func-read>` or :ref:`write() <func-write>` 292 + A single :c:func:`read()` or :c:func:`write()` 290 293 call must pass all data belonging to one video frame. That is an array 291 294 of struct :c:type:`v4l2_sliced_vbi_data` structures with one or 292 295 more elements and a total size not exceeding ``io_size`` bytes. Likewise 293 296 in streaming I/O mode one buffer of ``io_size`` bytes must contain data 294 297 of one video frame. The ``id`` of unused 295 298 struct :c:type:`v4l2_sliced_vbi_data` elements must be zero. 296 - 297 299 298 300 .. c:type:: v4l2_sliced_vbi_data 299 301 ··· 338 344 bytes at the end of this array are undefined, drivers and 339 345 applications shall ignore them. 340 346 341 - 342 347 Packets are always passed in ascending line number order, without 343 - duplicate line numbers. The :ref:`write() <func-write>` function and 348 + duplicate line numbers. The :c:func:`write()` function and 344 349 the :ref:`VIDIOC_QBUF` ioctl must return an ``EINVAL`` 345 350 error code when applications violate this rule. They must also return an 346 351 EINVAL error code when applications pass an incorrect field or line ··· 362 369 streaming (:ref:`memory mapping <mmap>` and/or 363 370 :ref:`user pointer <userp>`) I/O. The latter bears the possibility of 364 371 synchronizing video and VBI data by using buffer timestamps. 365 - 366 372 367 373 Sliced VBI Data in MPEG Streams 368 374 =============================== ··· 397 405 The following subsections specify the format of the embedded sliced VBI 398 406 data. 399 407 400 - 401 408 MPEG Stream Embedded, Sliced VBI Data Format: NONE 402 409 -------------------------------------------------- 403 410 ··· 407 416 nor driver shall insert "empty" embedded sliced VBI data packets in the 408 417 MPEG stream when this format is set. No MPEG stream data structures are 409 418 specified for this format. 410 - 411 419 412 420 MPEG Stream Embedded, Sliced VBI Data Format: IVTV 413 421 -------------------------------------------------- ··· 449 459 4-byte boundary. The payload shall never exceed 1552 bytes (2 fields 450 460 with 18 lines/field with 43 bytes of data/line and a 4 byte magic 451 461 number). 452 - 453 462 454 463 .. c:type:: v4l2_mpeg_vbi_fmt_ivtv 455 464 ··· 512 523 valid and that 36 lines of sliced VBI data are present. 513 524 514 525 515 - 516 526 .. c:type:: v4l2_mpeg_vbi_itv0 517 527 518 528 .. c:type:: v4l2_mpeg_vbi_ITV0 ··· 534 546 corresponding VBI line number and video field are given below. 535 547 b\ :sub:`0` indicates the least significant bit of a ``linemask`` 536 548 value: 537 - 538 549 539 550 540 551 :: ··· 561 574 applications. 562 575 563 576 564 - 565 577 .. _v4l2-mpeg-vbi-itv0-1: 566 578 567 579 struct v4l2_mpeg_vbi_ITV0 ··· 580 594 through ``line``\ [17] correspond to lines 6 through 23 of the 581 595 first field. ``line``\ [18] through ``line``\ [35] corresponds to 582 596 lines 6 through 23 of the second field. 583 - 584 597 585 598 586 599 .. c:type:: v4l2_mpeg_vbi_itv0_line ··· 602 617 * - __u8 603 618 - ``data``\ [42] 604 619 - The sliced VBI data for the line. 605 - 606 620 607 621 608 622 .. _ITV0-Line-Identifier-Constants: ··· 635 651 - 7 636 652 - Refer to :ref:`Sliced VBI services <vbi-services2>` for a 637 653 description of the line payload. 638 - 639 654 640 655 641 656 .. [#f1]
+6 -33
Documentation/userspace-api/media/v4l/diff-v4l.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _diff-v4l: 4 5 ··· 13 12 the much improved V4L2 API replaces the V4L API. The support for the old 14 13 V4L calls were removed from Kernel, but the library :ref:`libv4l` 15 14 supports the conversion of a V4L API system call into a V4L2 one. 16 - 17 15 18 16 Opening and Closing Devices 19 17 =========================== ··· 31 31 recommend that V4L2 drivers by default register devices with the same 32 32 numbers, but the system administrator can assign arbitrary minor numbers 33 33 using driver module options. The major device number remains 81. 34 - 35 34 36 35 .. _v4l-dev: 37 36 ··· 52 53 - ``/dev/vbi``, ``/dev/vbi0`` to ``/dev/vbi31`` 53 54 - 224-255 54 55 55 - 56 56 V4L prohibits (or used to prohibit) multiple opens of a device file. 57 57 V4L2 drivers *may* support multiple opens, see :ref:`open` for details 58 58 and consequences. 59 59 60 60 V4L drivers respond to V4L2 ioctls with an ``EINVAL`` error code. 61 - 62 61 63 62 Querying Capabilities 64 63 ===================== ··· 148 151 - ``-`` 149 152 - See above. 150 153 151 - 152 154 The ``audios`` field was replaced by ``capabilities`` flag 153 155 ``V4L2_CAP_AUDIO``, indicating *if* the device has any audio inputs or 154 156 outputs. To determine their number applications can enumerate audio ··· 159 163 :ref:`VIDIOC_TRY_FMT <VIDIOC_G_FMT>` ioctl with the desired 160 164 dimensions returns the closest size possible, taking into account the 161 165 current video standard, cropping and scaling limitations. 162 - 163 166 164 167 Video Sources 165 168 ============= ··· 175 180 video input types were renamed as follows: 176 181 177 182 178 - 179 183 .. flat-table:: 180 184 :header-rows: 1 181 185 :stub-columns: 0 ··· 185 191 - ``V4L2_INPUT_TYPE_TUNER`` 186 192 * - ``VIDEO_TYPE_CAMERA`` 187 193 - ``V4L2_INPUT_TYPE_CAMERA`` 188 - 189 194 190 195 Unlike the ``tuners`` field expressing the number of tuners of this 191 196 input, V4L2 assumes each video input is connected to at most one tuner. ··· 208 215 addition together with the ``norm`` field and has been removed in the 209 216 meantime. V4L2 has a similar, albeit more comprehensive approach to 210 217 video standards, see :ref:`standard` for more information. 211 - 212 218 213 219 Tuning 214 220 ====== ··· 252 260 to a struct :c:type:`v4l2_frequency` instead of an 253 261 unsigned long integer. 254 262 255 - 256 263 .. _v4l-image-properties: 257 264 258 265 Image Properties ··· 263 272 :ref:`VIDIOC_QUERYCTRL`, 264 273 :ref:`VIDIOC_G_CTRL <VIDIOC_G_CTRL>` and 265 274 :ref:`VIDIOC_S_CTRL <VIDIOC_G_CTRL>` ioctls: 266 - 267 275 268 276 269 277 .. flat-table:: ··· 282 292 * - ``whiteness`` 283 293 - ``V4L2_CID_WHITENESS`` 284 294 285 - 286 295 The V4L picture controls are assumed to range from 0 to 65535 with no 287 296 particular reset value. The V4L2 API permits arbitrary limits and 288 297 defaults which can be queried with the ··· 293 304 such information assuming applications recognizing the format are aware 294 305 of the image depth and others need not know. The ``palette`` field moved 295 306 into the struct :c:type:`v4l2_pix_format`: 296 - 297 307 298 308 299 309 .. flat-table:: ··· 334 346 * - ``VIDEO_PALETTE_YUV410P`` 335 347 - :ref:`V4L2_PIX_FMT_YVU410 <V4L2-PIX-FMT-YVU410>` 336 348 337 - 338 349 V4L2 image formats are defined in :ref:`pixfmt`. The image format can 339 350 be selected with the :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl. 340 - 341 351 342 352 Audio 343 353 ===== ··· 370 384 :ref:`VIDIOC_S_CTRL <VIDIOC_G_CTRL>` ioctls: 371 385 372 386 373 - 374 387 .. flat-table:: 375 388 :header-rows: 1 376 389 :stub-columns: 0 ··· 385 400 * - ``balance`` 386 401 - ``V4L2_CID_AUDIO_BALANCE`` 387 402 388 - 389 403 To determine which of these controls are supported by a driver V4L 390 404 provides the ``flags`` ``VIDEO_AUDIO_VOLUME``, ``VIDEO_AUDIO_BASS``, 391 405 ``VIDEO_AUDIO_TREBLE`` and ``VIDEO_AUDIO_BALANCE``. In the V4L2 API the ··· 399 415 V4L2 API permits arbitrary limits and defaults which can be queried with 400 416 the :ref:`VIDIOC_QUERYCTRL` ioctl. For general 401 417 information about controls see :ref:`control`. 402 - 403 418 404 419 Frame Buffer Overlay 405 420 ==================== ··· 446 463 The ``VIDIOCCAPTURE`` ioctl to enable or disable overlay was renamed to 447 464 :ref:`VIDIOC_OVERLAY`. 448 465 449 - 450 466 Cropping 451 467 ======== 452 468 ··· 472 490 select a capture or overlay format with the 473 491 :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl. 474 492 475 - 476 493 Reading Images, Memory Mapping 477 494 ============================== 478 - 479 495 480 496 Capturing using the read method 481 497 ------------------------------- 482 498 483 499 There is no essential difference between reading images from a V4L or 484 - V4L2 device using the :ref:`read() <func-read>` function, however V4L2 500 + V4L2 device using the :c:func:`read()` function, however V4L2 485 501 drivers are not required to support this I/O method. Applications can 486 502 determine if the function is available with the 487 503 :ref:`VIDIOC_QUERYCAP` ioctl. All V4L2 devices 488 504 exchanging data with applications must support the 489 - :ref:`select() <func-select>` and :ref:`poll() <func-poll>` 505 + :c:func:`select()` and :c:func:`poll()` 490 506 functions. 491 507 492 508 To select an image format and size, V4L provides the ``VIDIOCSPICT`` and ··· 497 517 498 518 For more information about the V4L2 read interface see :ref:`rw`. 499 519 500 - 501 520 Capturing using memory mapping 502 521 ------------------------------ 503 522 ··· 505 526 into their address space. This avoids the data copying overhead of the 506 527 read method. V4L2 supports memory mapping as well, with a few 507 528 differences. 508 - 509 529 510 530 511 531 .. flat-table:: ··· 528 550 ``VIDIOCGMBUF`` ioctl is available to query the number of buffers, 529 551 the offset of each buffer from the start of the virtual file, and 530 552 the overall amount of memory used, which can be used as arguments 531 - for the :ref:`mmap() <func-mmap>` function. 553 + for the :c:func:`mmap()` function. 532 554 - Buffers are individually mapped. The offset and size of each 533 555 buffer can be determined with the 534 556 :ref:`VIDIOC_QUERYBUF` ioctl. ··· 546 568 the incoming queue. Filled buffers are dequeued from the outgoing 547 569 queue with the :ref:`VIDIOC_DQBUF <VIDIOC_QBUF>` ioctl. To wait 548 570 until filled buffers become available this function, 549 - :ref:`select() <func-select>` or :ref:`poll() <func-poll>` can 571 + :c:func:`select()` or :c:func:`poll()` can 550 572 be used. The :ref:`VIDIOC_STREAMON` ioctl 551 573 must be called once after enqueuing one or more buffers to start 552 574 capturing. Its counterpart ··· 555 577 signal status, if known, with the 556 578 :ref:`VIDIOC_ENUMINPUT` ioctl. 557 579 558 - 559 580 For a more in-depth discussion of memory mapping and examples, see 560 581 :ref:`mmap`. 561 - 562 582 563 583 Reading Raw VBI Data 564 584 ==================== ··· 566 590 driver supporting this interface was the BTTV driver, de-facto defining 567 591 the V4L VBI interface. Reading from the device yields a raw VBI image 568 592 with the following parameters: 569 - 570 593 571 594 572 595 .. flat-table:: ··· 591 616 * - flags 592 617 - 0 593 618 594 - 595 619 Undocumented in the V4L specification, in Linux 2.3 the 596 620 ``VIDIOCGVBIFMT`` and ``VIDIOCSVBIFMT`` ioctls using struct 597 621 ``vbi_format`` were added to determine the VBI image ··· 604 630 605 631 Apparently only the Zoran (ZR 36120) driver implements these ioctls. The 606 632 semantics differ from those specified for V4L2 in two ways. The 607 - parameters are reset on :ref:`open() <func-open>` and 633 + parameters are reset on :c:func:`open()` and 608 634 ``VIDIOCSVBIFMT`` always returns an ``EINVAL`` error code if the parameters 609 635 are invalid. 610 - 611 636 612 637 Miscellaneous 613 638 =============
+4 -4
Documentation/userspace-api/media/v4l/dmabuf.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _dmabuf: 4 5 ··· 36 35 :c:type:`v4l2_plane` in the multi-planar API case). The 37 36 driver must be switched into DMABUF I/O mode by calling the 38 37 :ref:`VIDIOC_REQBUFS <VIDIOC_REQBUFS>` with the desired buffer type. 39 - 40 38 41 39 Example: Initiating streaming I/O with DMABUF file descriptors 42 40 ============================================================== ··· 135 135 Two methods exist to suspend execution of the application until one or 136 136 more buffers can be dequeued. By default :ref:`VIDIOC_DQBUF 137 137 <VIDIOC_QBUF>` blocks when no buffer is in the outgoing queue. When the 138 - ``O_NONBLOCK`` flag was given to the :ref:`open() <func-open>` function, 138 + ``O_NONBLOCK`` flag was given to the :c:func:`open()` function, 139 139 :ref:`VIDIOC_DQBUF <VIDIOC_QBUF>` returns immediately with an ``EAGAIN`` 140 140 error code when no buffer is available. The 141 - :ref:`select() <func-select>` and :ref:`poll() <func-poll>` 141 + :c:func:`select()` and :c:func:`poll()` 142 142 functions are always available. 143 143 144 144 To start and stop capturing or displaying applications call the ··· 158 158 :ref:`VIDIOC_REQBUFS <VIDIOC_REQBUFS>`, :ref:`VIDIOC_QBUF <VIDIOC_QBUF>`, 159 159 :ref:`VIDIOC_DQBUF <VIDIOC_QBUF>`, :ref:`VIDIOC_STREAMON 160 160 <VIDIOC_STREAMON>` and :ref:`VIDIOC_STREAMOFF <VIDIOC_STREAMON>` ioctls, 161 - and the :ref:`select() <func-select>` and :ref:`poll() <func-poll>` 161 + and the :c:func:`select()` and :c:func:`poll()` 162 162 functions.
+3 -4
Documentation/userspace-api/media/v4l/format.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _format: 4 5 5 6 ************ 6 7 Data Formats 7 8 ************ 8 - 9 9 10 10 Data Format Negotiation 11 11 ======================= ··· 53 53 When applications omit the :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl its locking side 54 54 effects are implied by the next step, the selection of an I/O method 55 55 with the :ref:`VIDIOC_REQBUFS` ioctl or implicit 56 - with the first :ref:`read() <func-read>` or 57 - :ref:`write() <func-write>` call. 56 + with the first :c:func:`read()` or 57 + :c:func:`write()` call. 58 58 59 59 Generally only one logical stream can be assigned to a file descriptor, 60 60 the exception being drivers permitting simultaneous video capturing and ··· 66 66 All drivers exchanging data with applications must support the 67 67 :ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>` and :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl. Implementation of the 68 68 :ref:`VIDIOC_TRY_FMT <VIDIOC_G_FMT>` is highly recommended but optional. 69 - 70 69 71 70 Image Format Enumeration 72 71 ========================
+2 -6
Documentation/userspace-api/media/v4l/func-close.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _func-close: 4 5 ··· 12 11 13 12 v4l2-close - Close a V4L2 device 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 ··· 19 19 20 20 #include <unistd.h> 21 21 22 - 23 22 .. c:function:: int close( int fd ) 24 - :name: v4l2-close 25 23 26 24 Arguments 27 25 ========= 28 26 29 27 ``fd`` 30 - File descriptor returned by :ref:`open() <func-open>`. 31 - 28 + File descriptor returned by :c:func:`open()`. 32 29 33 30 Description 34 31 =========== ··· 34 37 associated with the file descriptor are freed. However data format 35 38 parameters, current input or output, control values or other properties 36 39 remain unchanged. 37 - 38 40 39 41 Return Value 40 42 ============
+3 -7
Documentation/userspace-api/media/v4l/func-ioctl.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _func-ioctl: 4 5 ··· 12 11 13 12 v4l2-ioctl - Program a V4L2 device 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 ··· 19 19 20 20 #include <sys/ioctl.h> 21 21 22 - 23 - .. c:function:: int ioctl( int fd, int request, void *argp ) 24 - :name: v4l2-ioctl 22 + ``int ioctl(int fd, int request, void *argp)`` 25 23 26 24 Arguments 27 25 ========= 28 26 29 27 ``fd`` 30 - File descriptor returned by :ref:`open() <func-open>`. 28 + File descriptor returned by :c:func:`open()`. 31 29 32 30 ``request`` 33 31 V4L2 ioctl request code as defined in the ``videodev2.h`` header ··· 33 35 34 36 ``argp`` 35 37 Pointer to a function parameter, usually a structure. 36 - 37 38 38 39 Description 39 40 =========== ··· 46 49 include the version in the kernel sources on the system they compile on. 47 50 All V4L2 ioctl requests, their respective function and parameters are 48 51 specified in :ref:`user-func`. 49 - 50 52 51 53 Return Value 52 54 ============
+7 -11
Documentation/userspace-api/media/v4l/func-mmap.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _func-mmap: 4 5 ··· 12 11 13 12 v4l2-mmap - Map device memory into application address space 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 ··· 20 20 #include <unistd.h> 21 21 #include <sys/mman.h> 22 22 23 - 24 23 .. c:function:: void *mmap( void *start, size_t length, int prot, int flags, int fd, off_t offset ) 25 - :name: v4l2-mmap 26 24 27 25 Arguments 28 26 ========= ··· 52 54 #. The Linux ``videobuf`` kernel module, which is used by some 53 55 drivers supports only ``PROT_READ`` | ``PROT_WRITE``. When the 54 56 driver does not support the desired protection, the 55 - :ref:`mmap() <func-mmap>` function fails. 57 + :c:func:`mmap()` function fails. 56 58 57 59 #. Device memory accesses (e. g. the memory on a graphics card 58 60 with video capturing hardware) may incur a performance penalty ··· 68 70 69 71 ``MAP_FIXED`` requests that the driver selects no other address than 70 72 the one specified. If the specified address cannot be used, 71 - :ref:`mmap() <func-mmap>` will fail. If ``MAP_FIXED`` is specified, 73 + :c:func:`mmap()` will fail. If ``MAP_FIXED`` is specified, 72 74 ``start`` must be a multiple of the pagesize. Use of this option is 73 75 discouraged. 74 76 ··· 85 87 flags. 86 88 87 89 ``fd`` 88 - File descriptor returned by :ref:`open() <func-open>`. 90 + File descriptor returned by :c:func:`open()`. 89 91 90 92 ``offset`` 91 93 Offset of the buffer in device memory. This must be the same value ··· 95 97 in the struct :c:type:`v4l2_plane` ``m`` union 96 98 ``mem_offset`` field for the multi-planar API. 97 99 98 - 99 100 Description 100 101 =========== 101 102 102 - The :ref:`mmap() <func-mmap>` function asks to map ``length`` bytes starting at 103 + The :c:func:`mmap()` function asks to map ``length`` bytes starting at 103 104 ``offset`` in the memory of the device specified by ``fd`` into the 104 105 application address space, preferably at address ``start``. This latter 105 106 address is a hint only, and is usually specified as 0. ··· 108 111 allocated with the :ref:`VIDIOC_REQBUFS` ioctl 109 112 before they can be queried. 110 113 111 - To unmap buffers the :ref:`munmap() <func-munmap>` function is used. 112 - 114 + To unmap buffers the :c:func:`munmap()` function is used. 113 115 114 116 Return Value 115 117 ============ 116 118 117 - On success :ref:`mmap() <func-mmap>` returns a pointer to the mapped buffer. On 119 + On success :c:func:`mmap()` returns a pointer to the mapped buffer. On 118 120 error ``MAP_FAILED`` (-1) is returned, and the ``errno`` variable is set 119 121 appropriately. Possible error codes are: 120 122
+5 -9
Documentation/userspace-api/media/v4l/func-munmap.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _func-munmap: 4 5 ··· 12 11 13 12 v4l2-munmap - Unmap device memory 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 ··· 20 20 #include <unistd.h> 21 21 #include <sys/mman.h> 22 22 23 - 24 23 .. c:function:: int munmap( void *start, size_t length ) 25 - :name: v4l2-munmap 26 24 27 25 Arguments 28 26 ========= 29 27 30 28 ``start`` 31 29 Address of the mapped buffer as returned by the 32 - :ref:`mmap() <func-mmap>` function. 30 + :c:func:`mmap()` function. 33 31 34 32 ``length`` 35 33 Length of the mapped buffer. This must be the same value as given to 36 - :ref:`mmap() <func-mmap>` and returned by the driver in the struct 34 + :c:func:`mmap()` and returned by the driver in the struct 37 35 :c:type:`v4l2_buffer` ``length`` field for the 38 36 single-planar API and in the struct 39 37 :c:type:`v4l2_plane` ``length`` field for the 40 38 multi-planar API. 41 39 42 - 43 40 Description 44 41 =========== 45 42 46 - Unmaps a previously with the :ref:`mmap() <func-mmap>` function mapped 43 + Unmaps a previously with the :c:func:`mmap()` function mapped 47 44 buffer and frees it, if possible. 48 - 49 45 50 46 Return Value 51 47 ============ 52 48 53 - On success :ref:`munmap() <func-munmap>` returns 0, on failure -1 and the 49 + On success :c:func:`munmap()` returns 0, on failure -1 and the 54 50 ``errno`` variable is set appropriately: 55 51 56 52 EINVAL
+5 -9
Documentation/userspace-api/media/v4l/func-open.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _func-open: 4 5 ··· 12 11 13 12 v4l2-open - Open a V4L2 device 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 ··· 19 19 20 20 #include <fcntl.h> 21 21 22 - 23 22 .. c:function:: int open( const char *device_name, int flags ) 24 - :name: v4l2-open 25 23 26 24 Arguments 27 25 ========= ··· 32 34 technicality, input devices still support only reading and output 33 35 devices only writing. 34 36 35 - When the ``O_NONBLOCK`` flag is given, the :ref:`read() <func-read>` 37 + When the ``O_NONBLOCK`` flag is given, the :c:func:`read()` 36 38 function and the :ref:`VIDIOC_DQBUF <VIDIOC_QBUF>` ioctl will 37 39 return the ``EAGAIN`` error code when no data is available or no 38 40 buffer is in the driver outgoing queue, otherwise these functions ··· 41 43 42 44 Other flags have no effect. 43 45 44 - 45 46 Description 46 47 =========== 47 48 48 - To open a V4L2 device applications call :ref:`open() <func-open>` with the 49 + To open a V4L2 device applications call :c:func:`open()` with the 49 50 desired device name. This function has no side effects; all data format 50 51 parameters, current input or output, control values or other properties 51 - remain unchanged. At the first :ref:`open() <func-open>` call after loading the 52 + remain unchanged. At the first :c:func:`open()` call after loading the 52 53 driver they will be reset to default values, drivers are never in an 53 54 undefined state. 54 - 55 55 56 56 Return Value 57 57 ============ 58 58 59 - On success :ref:`open() <func-open>` returns the new file descriptor. On error 59 + On success :c:func:`open()` returns the new file descriptor. On error 60 60 -1 is returned, and the ``errno`` variable is set appropriately. 61 61 Possible error codes are: 62 62
+18 -22
Documentation/userspace-api/media/v4l/func-poll.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _func-poll: 4 5 ··· 12 11 13 12 v4l2-poll - Wait for some event on a file descriptor 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 ··· 19 19 20 20 #include <sys/poll.h> 21 21 22 - 23 22 .. c:function:: int poll( struct pollfd *ufds, unsigned int nfds, int timeout ) 24 - :name: v4l2-poll 25 23 26 24 Arguments 27 25 ========= 28 26 29 27 30 - 31 28 Description 32 29 =========== 33 30 34 - With the :ref:`poll() <func-poll>` function applications can suspend execution 31 + With the :c:func:`poll()` function applications can suspend execution 35 32 until the driver has captured data or is ready to accept data for 36 33 output. 37 34 ··· 41 44 (capture) or the incoming queue isn't full (display) the function 42 45 returns immediately. 43 46 44 - On success :ref:`poll() <func-poll>` returns the number of file descriptors 47 + On success :c:func:`poll()` returns the number of file descriptors 45 48 that have been selected (that is, file descriptors for which the 46 - ``revents`` field of the respective :c:func:`struct pollfd` structure 49 + ``revents`` field of the respective ``struct pollfd`` structure 47 50 is non-zero). Capture devices set the ``POLLIN`` and ``POLLRDNORM`` 48 51 flags in the ``revents`` field, output devices the ``POLLOUT`` and 49 52 ``POLLWRNORM`` flags. When the function timed out it returns a value of 50 53 zero, on failure it returns -1 and the ``errno`` variable is set 51 54 appropriately. When the application did not call 52 - :ref:`VIDIOC_STREAMON <VIDIOC_STREAMON>` the :ref:`poll() <func-poll>` 55 + :ref:`VIDIOC_STREAMON <VIDIOC_STREAMON>` the :c:func:`poll()` 53 56 function succeeds, but sets the ``POLLERR`` flag in the ``revents`` 54 57 field. When the application has called 55 58 :ref:`VIDIOC_STREAMON <VIDIOC_STREAMON>` for a capture device but 56 59 hasn't yet called :ref:`VIDIOC_QBUF <VIDIOC_QBUF>`, the 57 - :ref:`poll() <func-poll>` function succeeds and sets the ``POLLERR`` flag in 60 + :c:func:`poll()` function succeeds and sets the ``POLLERR`` flag in 58 61 the ``revents`` field. For output devices this same situation will cause 59 - :ref:`poll() <func-poll>` to succeed as well, but it sets the ``POLLOUT`` and 62 + :c:func:`poll()` to succeed as well, but it sets the ``POLLOUT`` and 60 63 ``POLLWRNORM`` flags in the ``revents`` field. 61 64 62 65 If an event occurred (see :ref:`VIDIOC_DQEVENT`) 63 66 then ``POLLPRI`` will be set in the ``revents`` field and 64 - :ref:`poll() <func-poll>` will return. 67 + :c:func:`poll()` will return. 65 68 66 - When use of the :ref:`read() <func-read>` function has been negotiated and the 67 - driver does not capture yet, the :ref:`poll() <func-poll>` function starts 69 + When use of the :c:func:`read()` function has been negotiated and the 70 + driver does not capture yet, the :c:func:`poll()` function starts 68 71 capturing. When that fails it returns a ``POLLERR`` as above. Otherwise 69 72 it waits until data has been captured and can be read. When the driver 70 73 captures continuously (as opposed to, for example, still images) the 71 74 function may return immediately. 72 75 73 - When use of the :ref:`write() <func-write>` function has been negotiated and the 74 - driver does not stream yet, the :ref:`poll() <func-poll>` function starts 76 + When use of the :c:func:`write()` function has been negotiated and the 77 + driver does not stream yet, the :c:func:`poll()` function starts 75 78 streaming. When that fails it returns a ``POLLERR`` as above. Otherwise 76 79 it waits until the driver is ready for a non-blocking 77 - :ref:`write() <func-write>` call. 80 + :c:func:`write()` call. 78 81 79 82 If the caller is only interested in events (just ``POLLPRI`` is set in 80 - the ``events`` field), then :ref:`poll() <func-poll>` will *not* start 83 + the ``events`` field), then :c:func:`poll()` will *not* start 81 84 streaming if the driver does not stream yet. This makes it possible to 82 85 just poll for events and not for buffers. 83 86 84 - All drivers implementing the :ref:`read() <func-read>` or :ref:`write() <func-write>` 85 - function or streaming I/O must also support the :ref:`poll() <func-poll>` 87 + All drivers implementing the :c:func:`read()` or :c:func:`write()` 88 + function or streaming I/O must also support the :c:func:`poll()` 86 89 function. 87 90 88 - For more details see the :ref:`poll() <func-poll>` manual page. 89 - 91 + For more details see the :c:func:`poll()` manual page. 90 92 91 93 Return Value 92 94 ============ 93 95 94 - On success, :ref:`poll() <func-poll>` returns the number structures which have 96 + On success, :c:func:`poll()` returns the number structures which have 95 97 non-zero ``revents`` fields, or zero if the call timed out. On error -1 96 98 is returned, and the ``errno`` variable is set appropriately: 97 99
+18 -21
Documentation/userspace-api/media/v4l/func-read.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _func-read: 4 5 ··· 12 11 13 12 v4l2-read - Read from a V4L2 device 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 ··· 19 19 20 20 #include <unistd.h> 21 21 22 - 23 22 .. c:function:: ssize_t read( int fd, void *buf, size_t count ) 24 - :name: v4l2-read 25 23 26 24 Arguments 27 25 ========= 28 26 29 27 ``fd`` 30 - File descriptor returned by :ref:`open() <func-open>`. 28 + File descriptor returned by :c:func:`open()`. 31 29 32 30 ``buf`` 33 31 Buffer to be filled ··· 36 38 Description 37 39 =========== 38 40 39 - :ref:`read() <func-read>` attempts to read up to ``count`` bytes from file 41 + :c:func:`read()` attempts to read up to ``count`` bytes from file 40 42 descriptor ``fd`` into the buffer starting at ``buf``. The layout of the 41 43 data in the buffer is discussed in the respective device interface 42 - section, see ##. If ``count`` is zero, :ref:`read() <func-read>` returns zero 44 + section, see ##. If ``count`` is zero, :c:func:`read()` returns zero 43 45 and has no other results. If ``count`` is greater than ``SSIZE_MAX``, 44 46 the result is unspecified. Regardless of the ``count`` value each 45 - :ref:`read() <func-read>` call will provide at most one frame (two fields) 47 + :c:func:`read()` call will provide at most one frame (two fields) 46 48 worth of data. 47 49 48 - By default :ref:`read() <func-read>` blocks until data becomes available. When 49 - the ``O_NONBLOCK`` flag was given to the :ref:`open() <func-open>` 50 + By default :c:func:`read()` blocks until data becomes available. When 51 + the ``O_NONBLOCK`` flag was given to the :c:func:`open()` 50 52 function it returns immediately with an ``EAGAIN`` error code when no data 51 - is available. The :ref:`select() <func-select>` or 52 - :ref:`poll() <func-poll>` functions can always be used to suspend 53 + is available. The :c:func:`select()` or 54 + :c:func:`poll()` functions can always be used to suspend 53 55 execution until data becomes available. All drivers supporting the 54 - :ref:`read() <func-read>` function must also support :ref:`select() <func-select>` and 55 - :ref:`poll() <func-poll>`. 56 + :c:func:`read()` function must also support :c:func:`select()` and 57 + :c:func:`poll()`. 56 58 57 59 Drivers can implement read functionality in different ways, using a 58 60 single or multiple buffers and discarding the oldest or newest frames 59 61 once the internal buffers are filled. 60 62 61 - :ref:`read() <func-read>` never returns a "snapshot" of a buffer being filled. 63 + :c:func:`read()` never returns a "snapshot" of a buffer being filled. 62 64 Using a single buffer the driver will stop capturing when the 63 65 application starts reading the buffer until the read is finished. Thus 64 66 only the period of the vertical blanking interval is available for 65 67 reading, or the capture rate must fall below the nominal frame rate of 66 68 the video standard. 67 69 68 - The behavior of :ref:`read() <func-read>` when called during the active picture 70 + The behavior of :c:func:`read()` when called during the active picture 69 71 period or the vertical blanking separating the top and bottom field 70 72 depends on the discarding policy. A driver discarding the oldest frames 71 73 keeps capturing into an internal buffer, continuously overwriting the 72 74 previously, not read frame, and returns the frame being received at the 73 - time of the :ref:`read() <func-read>` call as soon as it is complete. 75 + time of the :c:func:`read()` call as soon as it is complete. 74 76 75 77 A driver discarding the newest frames stops capturing until the next 76 - :ref:`read() <func-read>` call. The frame being received at :ref:`read() <func-read>` 78 + :c:func:`read()` call. The frame being received at :c:func:`read()` 77 79 time is discarded, returning the following frame instead. Again this 78 80 implies a reduction of the capture rate to one half or less of the 79 81 nominal frame rate. An example of this model is the video read mode of 80 - the bttv driver, initiating a DMA to user memory when :ref:`read() <func-read>` 82 + the bttv driver, initiating a DMA to user memory when :c:func:`read()` 81 83 is called and returning when the DMA finished. 82 84 83 85 In the multiple buffer model drivers maintain a ring of internal ··· 92 94 however. The discarding policy is not reported and cannot be changed. 93 95 For minimum requirements see :ref:`devices`. 94 96 95 - 96 97 Return Value 97 98 ============ 98 99 99 100 On success, the number of bytes read is returned. It is not an error if 100 101 this number is smaller than the number of bytes requested, or the amount 101 102 of data required for one frame. This may happen for example because 102 - :ref:`read() <func-read>` was interrupted by a signal. On error, -1 is 103 + :c:func:`read()` was interrupted by a signal. On error, -1 is 103 104 returned, and the ``errno`` variable is set appropriately. In this case 104 105 the next read will start at the beginning of a new frame. Possible error 105 106 codes are: ··· 126 129 communicate with a remote device (USB camera etc.). 127 130 128 131 EINVAL 129 - The :ref:`read() <func-read>` function is not supported by this driver, not 132 + The :c:func:`read()` function is not supported by this driver, not 130 133 on this device, or generally not on this type of device.
+19 -23
Documentation/userspace-api/media/v4l/func-select.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _func-select: 4 5 ··· 12 11 13 12 v4l2-select - Synchronous I/O multiplexing 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 ··· 21 21 #include <sys/types.h> 22 22 #include <unistd.h> 23 23 24 - 25 24 .. c:function:: int select( int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, struct timeval *timeout ) 26 - :name: v4l2-select 27 25 28 26 Arguments 29 27 ========= ··· 41 43 ``timeout`` 42 44 Maximum time to wait. 43 45 44 - 45 46 Description 46 47 =========== 47 48 48 - With the :ref:`select() <func-select>` function applications can suspend 49 + With the :c:func:`select()` function applications can suspend 49 50 execution until the driver has captured data or is ready to accept data 50 51 for output. 51 52 ··· 53 56 :ref:`VIDIOC_DQBUF <VIDIOC_QBUF>` ioctl. When buffers are already in 54 57 the outgoing queue of the driver the function returns immediately. 55 58 56 - On success :ref:`select() <func-select>` returns the total number of bits set in 57 - :c:func:`struct fd_set`. When the function timed out it returns 59 + On success :c:func:`select()` returns the total number of bits set in 60 + ``fd_set``. When the function timed out it returns 58 61 a value of zero. On failure it returns -1 and the ``errno`` variable is 59 62 set appropriately. When the application did not call 60 63 :ref:`VIDIOC_QBUF` or 61 - :ref:`VIDIOC_STREAMON` yet the :ref:`select() <func-select>` 64 + :ref:`VIDIOC_STREAMON` yet the :c:func:`select()` 62 65 function succeeds, setting the bit of the file descriptor in ``readfds`` 63 66 or ``writefds``, but subsequent :ref:`VIDIOC_DQBUF <VIDIOC_QBUF>` 64 67 calls will fail. [#f1]_ 65 68 66 - When use of the :ref:`read() <func-read>` function has been negotiated and the 67 - driver does not capture yet, the :ref:`select() <func-select>` function starts 68 - capturing. When that fails, :ref:`select() <func-select>` returns successful and 69 - a subsequent :ref:`read() <func-read>` call, which also attempts to start 69 + When use of the :c:func:`read()` function has been negotiated and the 70 + driver does not capture yet, the :c:func:`select()` function starts 71 + capturing. When that fails, :c:func:`select()` returns successful and 72 + a subsequent :c:func:`read()` call, which also attempts to start 70 73 capturing, will return an appropriate error code. When the driver 71 74 captures continuously (as opposed to, for example, still images) and 72 - data is already available the :ref:`select() <func-select>` function returns 75 + data is already available the :c:func:`select()` function returns 73 76 immediately. 74 77 75 - When use of the :ref:`write() <func-write>` function has been negotiated the 76 - :ref:`select() <func-select>` function just waits until the driver is ready for a 77 - non-blocking :ref:`write() <func-write>` call. 78 + When use of the :c:func:`write()` function has been negotiated the 79 + :c:func:`select()` function just waits until the driver is ready for a 80 + non-blocking :c:func:`write()` call. 78 81 79 - All drivers implementing the :ref:`read() <func-read>` or :ref:`write() <func-write>` 80 - function or streaming I/O must also support the :ref:`select() <func-select>` 82 + All drivers implementing the :c:func:`read()` or :c:func:`write()` 83 + function or streaming I/O must also support the :c:func:`select()` 81 84 function. 82 85 83 - For more details see the :ref:`select() <func-select>` manual page. 84 - 86 + For more details see the :c:func:`select()` manual page. 85 87 86 88 Return Value 87 89 ============ 88 90 89 - On success, :ref:`select() <func-select>` returns the number of descriptors 91 + On success, :c:func:`select()` returns the number of descriptors 90 92 contained in the three returned descriptor sets, which will be zero if 91 93 the timeout expired. On error -1 is returned, and the ``errno`` variable 92 94 is set appropriately; the sets and ``timeout`` are undefined. Possible ··· 111 115 ``FD_SETSIZE``. 112 116 113 117 .. [#f1] 114 - The Linux kernel implements :ref:`select() <func-select>` like the 115 - :ref:`poll() <func-poll>` function, but :ref:`select() <func-select>` cannot 118 + The Linux kernel implements :c:func:`select()` like the 119 + :c:func:`poll()` function, but :c:func:`select()` cannot 116 120 return a ``POLLERR``.
+5 -8
Documentation/userspace-api/media/v4l/func-write.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _func-write: 4 5 ··· 12 11 13 12 v4l2-write - Write to a V4L2 device 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 ··· 19 19 20 20 #include <unistd.h> 21 21 22 - 23 22 .. c:function:: ssize_t write( int fd, void *buf, size_t count ) 24 - :name: v4l2-write 25 23 26 24 Arguments 27 25 ========= 28 26 29 27 ``fd`` 30 - File descriptor returned by :ref:`open() <func-open>`. 28 + File descriptor returned by :c:func:`open()`. 31 29 32 30 ``buf`` 33 31 Buffer with data to be written ··· 36 38 Description 37 39 =========== 38 40 39 - :ref:`write() <func-write>` writes up to ``count`` bytes to the device 41 + :c:func:`write()` writes up to ``count`` bytes to the device 40 42 referenced by the file descriptor ``fd`` from the buffer starting at 41 43 ``buf``. When the hardware outputs are not active yet, this function 42 - enables them. When ``count`` is zero, :ref:`write() <func-write>` returns 0 44 + enables them. When ``count`` is zero, :c:func:`write()` returns 0 43 45 without any other effect. 44 46 45 47 When the application does not provide more data in time, the previous 46 48 video frame, raw VBI image, sliced VPS or WSS data is displayed again. 47 49 Sliced Teletext or Closed Caption data is not repeated, the driver 48 50 inserts a blank line instead. 49 - 50 51 51 52 Return Value 52 53 ============ ··· 77 80 I/O error. This indicates some hardware problem. 78 81 79 82 EINVAL 80 - The :ref:`write() <func-write>` function is not supported by this driver, 83 + The :c:func:`write()` function is not supported by this driver, 81 84 not on this device, or generally not on this type of device.
+4 -66
Documentation/userspace-api/media/v4l/hist-v4l2.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _hist-v4l2: 4 5 ··· 15 14 another four years and two stable kernel releases until the new API was 16 15 finally accepted for inclusion into the kernel in its present form. 17 16 18 - 19 17 Early Versions 20 18 ============== 21 19 22 20 1998-08-20: First version. 23 21 24 - 1998-08-27: The :ref:`select() <func-select>` function was introduced. 22 + 1998-08-27: The :c:func:`select()` function was introduced. 25 23 26 24 1998-09-10: New video standard interface. 27 25 28 26 1998-09-18: The ``VIDIOC_NONCAP`` ioctl was replaced by the otherwise 29 - meaningless ``O_TRUNC`` :ref:`open() <func-open>` flag, and the 27 + meaningless ``O_TRUNC`` :c:func:`open()` flag, and the 30 28 aliases ``O_NONCAP`` and ``O_NOIO`` were defined. Applications can set 31 29 this flag if they intend to access controls only, as opposed to capture 32 30 applications which need exclusive access. The ``VIDEO_STD_XXX`` ··· 65 65 66 66 1999-01-19: The ``VIDIOC_NEXTBUF`` ioctl was removed. 67 67 68 - 69 68 V4L2 Version 0.16 1999-01-31 70 69 ============================ 71 70 ··· 72 73 are gone. VIDIOC_QBUF takes a v4l2_buffer as a parameter. Added 73 74 digital zoom (cropping) controls. 74 75 75 - 76 76 V4L2 Version 0.18 1999-03-16 77 77 ============================ 78 78 79 79 Added a v4l to V4L2 ioctl compatibility layer to videodev.c. Driver 80 80 writers, this changes how you implement your ioctl handler. See the 81 81 Driver Writer's Guide. Added some more control id codes. 82 - 83 82 84 83 V4L2 Version 0.19 1999-06-05 85 84 ============================ ··· 104 107 105 108 1999-06-05: Changed the value of V4L2_CID_WHITENESS. 106 109 107 - 108 110 V4L2 Version 0.20 (1999-09-10) 109 111 ============================== 110 112 ··· 124 128 VIDIOC_STREAMON, VIDIOC_STREAMOFF, VIDIOC_S_FREQ, 125 129 VIDIOC_S_INPUT, VIDIOC_S_OUTPUT, VIDIOC_S_EFFECT. For example 126 130 127 - 128 131 .. code-block:: c 129 132 130 133 err = ioctl (fd, VIDIOC_XXX, V4L2_XXX); 131 134 132 135 becomes 133 - 134 136 135 137 .. code-block:: c 136 138 ··· 195 201 8. A ``sequence`` field was added to struct v4l2_buffer. The ``sequence`` 196 202 field counts captured frames, it is ignored by output devices. When a 197 203 capture driver drops a frame, the sequence number of that frame is skipped. 198 - 199 204 200 205 V4L2 Version 0.20 incremental changes 201 206 ===================================== ··· 283 290 were added. The former is an alias for the old ``V4L2_TYPE_VBI``, the 284 291 latter was missing in the ``videodev.h`` file. 285 292 286 - 287 293 V4L2 Version 0.20 2002-07-25 288 294 ============================ 289 295 290 296 Added sliced VBI interface proposal. 291 - 292 297 293 298 V4L2 in Linux 2.5.46, 2002-10 294 299 ============================= ··· 298 307 1. As specified in :ref:`related`, drivers must make related device 299 308 functions available under all minor device numbers. 300 309 301 - 2. The :ref:`open() <func-open>` function requires access mode 310 + 2. The :c:func:`open()` function requires access mode 302 311 ``O_RDWR`` regardless of the device type. All V4L2 drivers 303 312 exchanging data with applications must support the ``O_NONBLOCK`` 304 313 flag. The ``O_NOIO`` flag, a V4L2 symbol which aliased the ··· 424 433 and ``VIDIOC_S_WIN`` ioctls to prepare for a video overlay were 425 434 removed. The ``type`` field changed to type enum v4l2_buf_type and 426 435 the buffer type names changed as follows. 427 - 428 436 429 437 430 438 .. flat-table:: ··· 587 597 V4L2 documentation was inaccurate, this has been corrected in 588 598 :ref:`pixfmt`. 589 599 590 - 591 600 V4L2 2003-06-19 592 601 =============== 593 602 ··· 637 648 Kernel 2.6.39. Drivers and applications assuming a constant parameter 638 649 need an update. 639 650 640 - 641 651 V4L2 2003-11-05 642 652 =============== 643 653 644 654 1. In :ref:`pixfmt-rgb` the following pixel formats were incorrectly 645 655 transferred from Bill Dirks' V4L2 specification. Descriptions below 646 656 refer to bytes in memory, in ascending address order. 647 - 648 657 649 658 650 659 .. flat-table:: ··· 665 678 - R, G, B, X 666 679 - B, G, R, X 667 680 668 - 669 681 The ``V4L2_PIX_FMT_BGR24`` example was always correct. 670 682 671 683 In :ref:`v4l-image-properties` the mapping of the V4L ··· 675 689 RGB pixel formats differently. These issues have yet to be addressed, 676 690 for details see :ref:`pixfmt-rgb`. 677 691 678 - 679 692 V4L2 in Linux 2.6.6, 2004-05-09 680 693 =============================== 681 694 ··· 682 697 defined with read-only parameter. It is now defined as write-read 683 698 ioctl, while the read-only version was renamed to 684 699 ``VIDIOC_CROPCAP_OLD``. The old ioctl was removed on Kernel 2.6.39. 685 - 686 700 687 701 V4L2 in Linux 2.6.8 688 702 =================== ··· 692 708 with the video capturing process. This function must be enabled with 693 709 the new ``V4L2_BUF_FLAG_INPUT`` flag. The ``flags`` field is no 694 710 longer read-only. 695 - 696 711 697 712 V4L2 spec erratum 2004-08-01 698 713 ============================ ··· 710 727 also missing from examples. Also on the ``VIDIOC_DQBUF`` page the ``EIO`` 711 728 error code was not documented. 712 729 713 - 714 730 V4L2 in Linux 2.6.14 715 731 ==================== 716 732 717 733 1. A new sliced VBI interface was added. It is documented in 718 734 :ref:`sliced` and replaces the interface first proposed in V4L2 719 735 specification 0.8. 720 - 721 736 722 737 V4L2 in Linux 2.6.15 723 738 ==================== ··· 736 755 ``VIDIOC_G_MPEGCOMP`` and ``VIDIOC_S_MPEGCOMP`` ioctls where removed 737 756 in Linux 2.6.25.) 738 757 739 - 740 758 V4L2 spec erratum 2005-11-27 741 759 ============================ 742 760 ··· 744 764 cropping is supported. In the video standard selection example in 745 765 :ref:`standard` the :ref:`VIDIOC_S_STD <VIDIOC_G_STD>` call used 746 766 the wrong argument type. 747 - 748 767 749 768 V4L2 spec erratum 2006-01-10 750 769 ============================ ··· 757 778 write-only as stated on its reference page. The ioctl changed in 2003 758 779 as noted above. 759 780 760 - 761 781 V4L2 spec erratum 2006-02-03 762 782 ============================ 763 783 764 784 1. In struct v4l2_captureparm and struct v4l2_outputparm the ``timeperframe`` 765 785 field gives the time in seconds, not microseconds. 766 - 767 786 768 787 V4L2 spec erratum 2006-02-04 769 788 ============================ ··· 784 807 languages of a bilingual program. The use of 785 808 ``V4L2_TUNER_MODE_STEREO`` for this purpose is deprecated now. See 786 809 the :ref:`VIDIOC_G_TUNER <VIDIOC_G_TUNER>` section for details. 787 - 788 810 789 811 V4L2 spec erratum 2006-09-23 (Draft 0.15) 790 812 ========================================= ··· 813 837 extended from 224-239 to 224-255. Accordingly device file names 814 838 ``/dev/vbi0`` to ``/dev/vbi31`` are possible now. 815 839 816 - 817 840 V4L2 in Linux 2.6.18 818 841 ==================== 819 842 ··· 826 851 ``V4L2_CTRL_FLAG_READ_ONLY``, ``V4L2_CTRL_FLAG_UPDATE``, 827 852 ``V4L2_CTRL_FLAG_INACTIVE`` and ``V4L2_CTRL_FLAG_SLIDER`` 828 853 (:ref:`control-flags`). See :ref:`extended-controls` for details. 829 - 830 854 831 855 V4L2 in Linux 2.6.19 832 856 ==================== ··· 848 874 3. A new pixel format ``V4L2_PIX_FMT_RGB444`` (:ref:`pixfmt-rgb`) was 849 875 added. 850 876 851 - 852 877 V4L2 spec erratum 2006-10-12 (Draft 0.17) 853 878 ========================================= 854 879 855 880 1. ``V4L2_PIX_FMT_HM12`` (:ref:`reserved-formats`) is a YUV 4:2:0, not 856 881 4:2:2 format. 857 - 858 882 859 883 V4L2 in Linux 2.6.21 860 884 ==================== ··· 860 888 1. The ``videodev2.h`` header file is now dual licensed under GNU 861 889 General Public License version two or later, and under a 3-clause 862 890 BSD-style license. 863 - 864 891 865 892 V4L2 in Linux 2.6.22 866 893 ==================== ··· 885 914 This may **break compatibility** with existing applications. Drivers 886 915 supporting the "host order RGB32" format are not known. 887 916 888 - 889 917 V4L2 in Linux 2.6.24 890 918 ==================== 891 919 892 920 1. The pixel formats ``V4L2_PIX_FMT_PAL8``, ``V4L2_PIX_FMT_YUV444``, 893 921 ``V4L2_PIX_FMT_YUV555``, ``V4L2_PIX_FMT_YUV565`` and 894 922 ``V4L2_PIX_FMT_YUV32`` were added. 895 - 896 923 897 924 V4L2 in Linux 2.6.25 898 925 ==================== ··· 918 949 interface in Linux 2.6.18, where finally removed from the 919 950 ``videodev2.h`` header file. 920 951 921 - 922 952 V4L2 in Linux 2.6.26 923 953 ==================== 924 954 ··· 926 958 927 959 2. Added user controls ``V4L2_CID_CHROMA_AGC`` and 928 960 ``V4L2_CID_COLOR_KILLER``. 929 - 930 961 931 962 V4L2 in Linux 2.6.27 932 963 ==================== ··· 938 971 ``V4L2_PIX_FMT_PCA561``, ``V4L2_PIX_FMT_SGBRG8``, 939 972 ``V4L2_PIX_FMT_PAC207`` and ``V4L2_PIX_FMT_PJPG`` were added. 940 973 941 - 942 974 V4L2 in Linux 2.6.28 943 975 ==================== 944 976 ··· 948 982 949 983 3. The pixel formats ``V4L2_PIX_FMT_SGRBG10`` and 950 984 ``V4L2_PIX_FMT_SGRBG10DPCM8`` were added. 951 - 952 985 953 986 V4L2 in Linux 2.6.29 954 987 ==================== ··· 964 999 ``V4L2_CID_ZOOM_RELATIVE``, ``V4L2_CID_ZOOM_CONTINUOUS`` and 965 1000 ``V4L2_CID_PRIVACY``. 966 1001 967 - 968 1002 V4L2 in Linux 2.6.30 969 1003 ==================== 970 1004 971 1005 1. New control flag ``V4L2_CTRL_FLAG_WRITE_ONLY`` was added. 972 1006 973 1007 2. New control ``V4L2_CID_COLORFX`` was added. 974 - 975 1008 976 1009 V4L2 in Linux 2.6.32 977 1010 ==================== ··· 997 1034 9. Added Remote Controller chapter, describing the default Remote 998 1035 Controller mapping for media devices. 999 1036 1000 - 1001 1037 V4L2 in Linux 2.6.33 1002 1038 ==================== 1003 1039 1004 1040 1. Added support for Digital Video timings in order to support HDTV 1005 1041 receivers and transmitters. 1006 1042 1007 - 1008 1043 V4L2 in Linux 2.6.34 1009 1044 ==================== 1010 1045 1011 1046 1. Added ``V4L2_CID_IRIS_ABSOLUTE`` and ``V4L2_CID_IRIS_RELATIVE`` 1012 1047 controls to the :ref:`Camera controls class <camera-controls>`. 1013 - 1014 1048 1015 1049 V4L2 in Linux 2.6.37 1016 1050 ==================== ··· 1017 1057 applications found that used it. It was originally scheduled for 1018 1058 removal in 2.6.35. 1019 1059 1020 - 1021 1060 V4L2 in Linux 2.6.39 1022 1061 ==================== 1023 1062 ··· 1025 1066 2. Multi-planar API added. Does not affect the compatibility of current 1026 1067 drivers and applications. See :ref:`multi-planar API <planar-apis>` 1027 1068 for details. 1028 - 1029 1069 1030 1070 V4L2 in Linux 3.1 1031 1071 ================= ··· 1036 1078 1037 1079 Added V4L2_CTRL_TYPE_BITMASK. 1038 1080 1039 - 1040 1081 V4L2 in Linux 3.2 1041 1082 ================= 1042 1083 ··· 1046 1089 Does not affect the compatibility of current drivers and 1047 1090 applications. See :ref:`selection API <selection-api>` for details. 1048 1091 1049 - 1050 1092 V4L2 in Linux 3.3 1051 1093 ================= 1052 1094 ··· 1054 1098 1055 1099 2. Added the device_caps field to struct v4l2_capabilities and added 1056 1100 the new V4L2_CAP_DEVICE_CAPS capability. 1057 - 1058 1101 1059 1102 V4L2 in Linux 3.4 1060 1103 ================= ··· 1064 1109 :ref:`VIDIOC_ENUM_DV_TIMINGS`, 1065 1110 :ref:`VIDIOC_QUERY_DV_TIMINGS` and 1066 1111 :ref:`VIDIOC_DV_TIMINGS_CAP`. 1067 - 1068 1112 1069 1113 V4L2 in Linux 3.5 1070 1114 ================= ··· 1091 1137 ``V4L2_CID_AUTO_FOCUS_START``, ``V4L2_CID_AUTO_FOCUS_STOP``, 1092 1138 ``V4L2_CID_AUTO_FOCUS_STATUS`` and ``V4L2_CID_AUTO_FOCUS_RANGE``. 1093 1139 1094 - 1095 1140 V4L2 in Linux 3.6 1096 1141 ================= 1097 1142 ··· 1103 1150 3. Added support for frequency band enumerations: 1104 1151 :ref:`VIDIOC_ENUM_FREQ_BANDS`. 1105 1152 1106 - 1107 1153 V4L2 in Linux 3.9 1108 1154 ================= 1109 1155 ··· 1111 1159 1112 1160 2. Added ``V4L2_EVENT_CTRL_CH_RANGE`` control event changes flag. See 1113 1161 :ref:`ctrl-changes-flags`. 1114 - 1115 1162 1116 1163 V4L2 in Linux 3.10 1117 1164 ================== ··· 1123 1172 2. Added new debugging ioctl 1124 1173 :ref:`VIDIOC_DBG_G_CHIP_INFO`. 1125 1174 1126 - 1127 1175 V4L2 in Linux 3.11 1128 1176 ================== 1129 1177 1130 1178 1. Remove obsolete ``VIDIOC_DBG_G_CHIP_IDENT`` ioctl. 1131 - 1132 1179 1133 1180 V4L2 in Linux 3.14 1134 1181 ================== ··· 1134 1185 1. In struct v4l2_rect, the type of ``width`` and 1135 1186 ``height`` fields changed from _s32 to _u32. 1136 1187 1137 - 1138 1188 V4L2 in Linux 3.15 1139 1189 ================== 1140 1190 1141 1191 1. Added Software Defined Radio (SDR) Interface. 1142 1192 1143 - 1144 1193 V4L2 in Linux 3.16 1145 1194 ================== 1146 1195 1147 1196 1. Added event V4L2_EVENT_SOURCE_CHANGE. 1148 - 1149 1197 1150 1198 V4L2 in Linux 3.17 1151 1199 ================== ··· 1153 1207 2. Added compound control types and 1154 1208 :ref:`VIDIOC_QUERY_EXT_CTRL <VIDIOC_QUERYCTRL>`. 1155 1209 1156 - 1157 1210 V4L2 in Linux 3.18 1158 1211 ================== 1159 1212 1160 1213 1. Added ``V4L2_CID_PAN_SPEED`` and ``V4L2_CID_TILT_SPEED`` camera 1161 1214 controls. 1162 - 1163 1215 1164 1216 V4L2 in Linux 3.19 1165 1217 ================== ··· 1176 1232 1177 1233 3. Added transmitter support for Software Defined Radio (SDR) Interface. 1178 1234 1179 - 1180 1235 .. _other: 1181 1236 1182 1237 Relation of V4L2 to other Linux multimedia APIs 1183 1238 =============================================== 1184 - 1185 1239 1186 1240 .. _xvideo: 1187 1241 ··· 1226 1284 an interface to MPEG-2 decoding hardware. This API is useful to display 1227 1285 images captured with V4L2 devices. 1228 1286 1229 - 1230 1287 Digital Video 1231 1288 ------------- 1232 1289 ··· 1235 1294 DVB API has no connection to the V4L2 API except that drivers for hybrid 1236 1295 hardware may support both. 1237 1296 1238 - 1239 1297 Audio Interfaces 1240 1298 ---------------- 1241 1299 1242 1300 [to do - OSS/ALSA] 1243 - 1244 1301 1245 1302 .. _experimental: 1246 1303 ··· 1252 1313 :ref:`VIDIOC_DBG_S_REGISTER <VIDIOC_DBG_G_REGISTER>` ioctls. 1253 1314 1254 1315 - :ref:`VIDIOC_DBG_G_CHIP_INFO` ioctl. 1255 - 1256 1316 1257 1317 .. _obsolete: 1258 1318
+3 -3
Documentation/userspace-api/media/v4l/io.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _io: 4 5 ··· 10 9 a device. All drivers exchanging data with applications must support at 11 10 least one of them. 12 11 13 - The classic I/O method using the :ref:`read() <func-read>` and 14 - :ref:`write() <func-write>` function is automatically selected after opening a 12 + The classic I/O method using the :c:func:`read()` and 13 + :c:func:`write()` function is automatically selected after opening a 15 14 V4L2 device. When the driver does not support this method attempts to 16 15 read or write will fail at any time. 17 16 ··· 38 37 closing and reopening the device. 39 38 40 39 The following sections describe the various I/O methods in more detail. 41 - 42 40 43 41 .. toctree:: 44 42 :maxdepth: 1
+13 -17
Documentation/userspace-api/media/v4l/libv4l-introduction.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _libv4l-introduction: 4 5 ··· 17 16 :ref:`v4l2grab <v4l2grab-example>`. 18 17 19 18 libv4l consists of 3 different libraries: 20 - 21 19 22 20 libv4lconvert 23 21 ============= ··· 65 65 libv4lconvert/processing offers the actual video processing 66 66 functionality. 67 67 68 - 69 68 libv4l1 70 69 ======= 71 70 ··· 76 77 77 78 Since those functions are emulations of the old V4L1 API, it shouldn't 78 79 be used for new applications. 79 - 80 80 81 81 libv4l2 82 82 ======= ··· 103 105 keeps enumerating the hardware supported formats, plus the emulated 104 106 formats offered by libv4l at the end. 105 107 106 - 107 108 .. _libv4l-ops: 108 109 109 110 Libv4l device control functions ··· 112 115 113 116 Those functions operate just like the gcc function ``dup()`` and 114 117 V4L2 functions 115 - :c:func:`open() <v4l2-open>`, :c:func:`close() <v4l2-close>`, 116 - :c:func:`ioctl() <v4l2-ioctl>`, :c:func:`read() <v4l2-read>`, 117 - :c:func:`mmap() <v4l2-mmap>` and :c:func:`munmap() <v4l2-munmap>`: 118 + :c:func:`open()`, :c:func:`close()`, 119 + :c:func:`ioctl()`, :c:func:`read()`, 120 + :c:func:`mmap()` and :c:func:`munmap()`: 118 121 119 122 .. c:function:: int v4l2_open(const char *file, int oflag, ...) 120 123 121 - operates like the :c:func:`open() <v4l2-open>` function. 124 + operates like the :c:func:`open()` function. 122 125 123 126 .. c:function:: int v4l2_close(int fd) 124 127 125 - operates like the :c:func:`close() <v4l2-close>` function. 128 + operates like the :c:func:`close()` function. 126 129 127 130 .. c:function:: int v4l2_dup(int fd) 128 131 ··· 130 133 131 134 .. c:function:: int v4l2_ioctl (int fd, unsigned long int request, ...) 132 135 133 - operates like the :c:func:`ioctl() <v4l2-ioctl>` function. 136 + operates like the :c:func:`ioctl()` function. 134 137 135 138 .. c:function:: int v4l2_read (int fd, void* buffer, size_t n) 136 139 137 - operates like the :c:func:`read() <v4l2-read>` function. 140 + operates like the :c:func:`read()` function. 138 141 139 142 .. c:function:: void v4l2_mmap(void *start, size_t length, int prot, int flags, int fd, int64_t offset); 140 143 141 - operates like the :c:func:`munmap() <v4l2-munmap>` function. 144 + operates like the :c:func:`munmap()` function. 142 145 143 146 .. c:function:: int v4l2_munmap(void *_start, size_t length); 144 147 145 - operates like the :c:func:`munmap() <v4l2-munmap>` function. 148 + operates like the :c:func:`munmap()` function. 146 149 147 150 Those functions provide additional control: 148 151 ··· 165 168 of the given v4l control id. when the cid does not exist, could not be 166 169 accessed for some reason, or some error occurred 0 is returned. 167 170 168 - 169 171 v4l1compat.so wrapper library 170 172 ============================= 171 173 172 174 This library intercepts calls to 173 - :c:func:`open() <v4l2-open>`, :c:func:`close() <v4l2-close>`, 174 - :c:func:`ioctl() <v4l2-ioctl>`, :c:func:`mmap() <v4l2-mmap>` and 175 - :c:func:`munmap() <v4l2-munmap>` 175 + :c:func:`open()`, :c:func:`close()`, 176 + :c:func:`ioctl()`, :c:func:`mmap()` and 177 + :c:func:`munmap()` 176 178 operations and redirects them to the libv4l counterparts, by using 177 179 ``LD_PRELOAD=/usr/lib/v4l1compat.so``. It also emulates V4L1 calls via V4L2 178 180 API.
+13 -13
Documentation/userspace-api/media/v4l/mmap.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _mmap: 4 5 ··· 36 35 the allocated memory, provided none of the buffers are still mapped. 37 36 38 37 Before applications can access the buffers they must map them into their 39 - address space with the :ref:`mmap() <func-mmap>` function. The 38 + address space with the :c:func:`mmap()` function. The 40 39 location of the buffers in device memory can be determined with the 41 40 :ref:`VIDIOC_QUERYBUF` ioctl. In the single-planar 42 41 API case, the ``m.offset`` and ``length`` returned in a struct 43 42 :c:type:`v4l2_buffer` are passed as sixth and second 44 - parameter to the :ref:`mmap() <func-mmap>` function. When using the 43 + parameter to the :c:func:`mmap()` function. When using the 45 44 multi-planar API, struct :c:type:`v4l2_buffer` contains an 46 45 array of struct :c:type:`v4l2_plane` structures, each 47 46 containing its own ``m.offset`` and ``length``. When using the 48 47 multi-planar API, every plane of every buffer has to be mapped 49 - separately, so the number of calls to :ref:`mmap() <func-mmap>` should 48 + separately, so the number of calls to :c:func:`mmap()` should 50 49 be equal to number of buffers times number of planes in each buffer. The 51 50 offset and length values must not be modified. Remember, the buffers are 52 51 allocated in physical memory, as opposed to virtual memory, which can be 53 52 swapped out to disk. Applications should free the buffers as soon as 54 - possible with the :ref:`munmap() <func-munmap>` function. 53 + possible with the :c:func:`munmap()` function. 55 54 56 55 Example: Mapping buffers in the single-planar API 57 56 ================================================= ··· 122 121 123 122 for (i = 0; i < reqbuf.count; i++) 124 123 munmap(buffers[i].start, buffers[i].length); 125 - 126 124 127 125 Example: Mapping buffers in the multi-planar API 128 126 ================================================ ··· 238 238 methods exist to suspend execution of the application until one or more 239 239 buffers can be dequeued. By default :ref:`VIDIOC_DQBUF <VIDIOC_QBUF>` 240 240 blocks when no buffer is in the outgoing queue. When the ``O_NONBLOCK`` 241 - flag was given to the :ref:`open() <func-open>` function, 241 + flag was given to the :c:func:`open()` function, 242 242 :ref:`VIDIOC_DQBUF <VIDIOC_QBUF>` returns immediately with an ``EAGAIN`` 243 - error code when no buffer is available. The :ref:`select() <func-select>` 244 - or :ref:`poll() <func-poll>` functions are always available. 243 + error code when no buffer is available. The :c:func:`select()` 244 + or :c:func:`poll()` functions are always available. 245 245 246 246 To start and stop capturing or output applications call the 247 247 :ref:`VIDIOC_STREAMON <VIDIOC_STREAMON>` and :ref:`VIDIOC_STREAMOFF ··· 259 259 <VIDIOC_QUERYBUF>`, :ref:`VIDIOC_QBUF <VIDIOC_QBUF>`, :ref:`VIDIOC_DQBUF 260 260 <VIDIOC_QBUF>`, :ref:`VIDIOC_STREAMON <VIDIOC_STREAMON>` 261 261 and :ref:`VIDIOC_STREAMOFF <VIDIOC_STREAMON>` ioctls, the :ref:`mmap() 262 - <func-mmap>`, :ref:`munmap() <func-munmap>`, :ref:`select() 263 - <func-select>` and :ref:`poll() <func-poll>` function. [#f3]_ 262 + <func-mmap>`, :c:func:`munmap()`, :ref:`select() 263 + <func-select>` and :c:func:`poll()` function. [#f3]_ 264 264 265 265 [capture example] 266 266 267 267 .. [#f1] 268 268 One could use one file descriptor and set the buffer type field 269 269 accordingly when calling :ref:`VIDIOC_QBUF` etc., 270 - but it makes the :ref:`select() <func-select>` function ambiguous. We also 270 + but it makes the :c:func:`select()` function ambiguous. We also 271 271 like the clean approach of one file descriptor per logical stream. 272 272 Video overlay for example is also a logical stream, although the CPU 273 273 is not needed for continuous operation. ··· 280 280 scatter-gather lists and the like. 281 281 282 282 .. [#f3] 283 - At the driver level :ref:`select() <func-select>` and :ref:`poll() <func-poll>` are 284 - the same, and :ref:`select() <func-select>` is too important to be optional. 283 + At the driver level :c:func:`select()` and :c:func:`poll()` are 284 + the same, and :c:func:`select()` is too important to be optional. 285 285 The rest should be evident.
+6 -9
Documentation/userspace-api/media/v4l/open.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _open: 4 5 ··· 141 140 drivers. The user must enter a device name, or the application can try 142 141 the conventional device names. 143 142 144 - 145 143 .. _related: 146 144 147 145 Related Devices ··· 157 157 support it and if they did it was certainly never tested. In addition, 158 158 switching a device node between different functions only works when 159 159 using the streaming I/O API, not with the 160 - :ref:`read() <func-read>`/\ :ref:`write() <func-write>` API. 160 + :c:func:`read()`/\ :c:func:`write()` API. 161 161 162 162 Today each V4L2 device node supports just one function. 163 163 ··· 178 178 linux-media mailing list: 179 179 `https://linuxtv.org/lists.php <https://linuxtv.org/lists.php>`__. 180 180 181 - 182 181 Multiple Opens 183 182 ============== 184 183 ··· 191 192 Once an application has allocated the memory buffers needed for 192 193 streaming data (by calling the :ref:`VIDIOC_REQBUFS` 193 194 or :ref:`VIDIOC_CREATE_BUFS` ioctls, or 194 - implicitly by calling the :ref:`read() <func-read>` or 195 - :ref:`write() <func-write>` functions) that application (filehandle) 195 + implicitly by calling the :c:func:`read()` or 196 + :c:func:`write()` functions) that application (filehandle) 196 197 becomes the owner of the device. It is no longer allowed to make changes 197 198 that would affect the buffer sizes (e.g. by calling the 198 199 :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl) and other applications are ··· 205 206 descriptor. Applications can request additional access privileges using 206 207 the priority mechanism described in :ref:`app-pri`. 207 208 208 - 209 209 Shared Data Streams 210 210 =================== 211 211 ··· 213 215 or similar means. This is better handled by a proxy application in user 214 216 space. 215 217 216 - 217 218 Functions 218 219 ========= 219 220 220 221 To open and close V4L2 devices applications use the 221 - :ref:`open() <func-open>` and :ref:`close() <func-close>` function, 222 + :c:func:`open()` and :c:func:`close()` function, 222 223 respectively. Devices are programmed using the 223 224 :ref:`ioctl() <func-ioctl>` function as explained in the following 224 225 sections. ··· 225 228 .. [#f1] 226 229 There are still some old and obscure drivers that have not been 227 230 updated to allow for multiple opens. This implies that for such 228 - drivers :ref:`open() <func-open>` can return an ``EBUSY`` error code 231 + drivers :c:func:`open()` can return an ``EBUSY`` error code 229 232 when the device is already in use. 230 233 231 234 .. [#f2]
+9 -9
Documentation/userspace-api/media/v4l/rw.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _rw: 4 5 ··· 7 6 Read/Write 8 7 ********** 9 8 10 - Input and output devices support the :ref:`read() <func-read>` and 11 - :ref:`write() <func-write>` function, respectively, when the 9 + Input and output devices support the :c:func:`read()` and 10 + :c:func:`write()` function, respectively, when the 12 11 ``V4L2_CAP_READWRITE`` flag in the ``capabilities`` field of struct 13 12 :c:type:`v4l2_capability` returned by the 14 13 :ref:`VIDIOC_QUERYCAP` ioctl is set. ··· 23 22 setup to exchange data. It permits command line stunts like this (the 24 23 vidctrl tool is fictitious): 25 24 26 - 27 25 .. code-block:: none 28 26 29 27 $ vidctrl /dev/video --input=0 --format=YUYV --size=352x288 30 28 $ dd if=/dev/video of=myimage.422 bs=202752 count=1 31 29 32 - To read from the device applications use the :ref:`read() <func-read>` 33 - function, to write the :ref:`write() <func-write>` function. Drivers 30 + To read from the device applications use the :c:func:`read()` 31 + function, to write the :c:func:`write()` function. Drivers 34 32 must implement one I/O method if they exchange data with applications, 35 33 but it need not be this. [#f1]_ When reading or writing is supported, the 36 - driver must also support the :ref:`select() <func-select>` and 37 - :ref:`poll() <func-poll>` function. [#f2]_ 34 + driver must also support the :c:func:`select()` and 35 + :c:func:`poll()` function. [#f2]_ 38 36 39 37 .. [#f1] 40 38 It would be desirable if applications could depend on drivers ··· 43 43 capturing still images. 44 44 45 45 .. [#f2] 46 - At the driver level :ref:`select() <func-select>` and :ref:`poll() <func-poll>` are 47 - the same, and :ref:`select() <func-select>` is too important to be optional. 46 + At the driver level :c:func:`select()` and :c:func:`poll()` are 47 + the same, and :c:func:`select()` is too important to be optional.
+3 -2
Documentation/userspace-api/media/v4l/streaming-par.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _streaming-par: 4 5 ··· 15 14 second. If less than this number of frames is to be captured or output, 16 15 applications can request frame skipping or duplicating on the driver 17 16 side. This is especially useful when using the 18 - :ref:`read() <func-read>` or :ref:`write() <func-write>`, which are 17 + :c:func:`read()` or :c:func:`write()`, which are 19 18 not augmented by timestamps or sequence counters, and to avoid 20 19 unnecessary data copying. 21 20 22 21 Finally these ioctls can be used to determine the number of buffers used 23 22 internally by a driver in read/write mode. For implications see the 24 - section discussing the :ref:`read() <func-read>` function. 23 + section discussing the :c:func:`read()` function. 25 24 26 25 To get and set the streaming parameters applications call the 27 26 :ref:`VIDIOC_G_PARM <VIDIOC_G_PARM>` and
+6 -5
Documentation/userspace-api/media/v4l/userp.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _userp: 4 5 ··· 79 78 Two methods exist to suspend execution of the application until one or 80 79 more buffers can be dequeued. By default :ref:`VIDIOC_DQBUF 81 80 <VIDIOC_QBUF>` blocks when no buffer is in the outgoing queue. When the 82 - ``O_NONBLOCK`` flag was given to the :ref:`open() <func-open>` function, 81 + ``O_NONBLOCK`` flag was given to the :c:func:`open()` function, 83 82 :ref:`VIDIOC_DQBUF <VIDIOC_QBUF>` returns immediately with an ``EAGAIN`` 84 83 error code when no buffer is available. The :ref:`select() 85 - <func-select>` or :ref:`poll() <func-poll>` function are always 84 + <func-select>` or :c:func:`poll()` function are always 86 85 available. 87 86 88 87 To start and stop capturing or output applications call the ··· 102 101 :ref:`VIDIOC_REQBUFS <VIDIOC_REQBUFS>`, :ref:`VIDIOC_QBUF <VIDIOC_QBUF>`, 103 102 :ref:`VIDIOC_DQBUF <VIDIOC_QBUF>`, :ref:`VIDIOC_STREAMON <VIDIOC_STREAMON>` 104 103 and :ref:`VIDIOC_STREAMOFF <VIDIOC_STREAMON>` ioctls, the 105 - :ref:`select() <func-select>` and :ref:`poll() <func-poll>` function. [#f2]_ 104 + :c:func:`select()` and :c:func:`poll()` function. [#f2]_ 106 105 107 106 .. [#f1] 108 107 We expect that frequently used buffers are typically not swapped out. ··· 117 116 because an application may share them with other processes. 118 117 119 118 .. [#f2] 120 - At the driver level :ref:`select() <func-select>` and :ref:`poll() <func-poll>` are 121 - the same, and :ref:`select() <func-select>` is too important to be optional. 119 + At the driver level :c:func:`select()` and :c:func:`poll()` are 120 + the same, and :c:func:`select()` is too important to be optional. 122 121 The rest should be evident.
+4 -7
Documentation/userspace-api/media/v4l/vidioc-create-bufs.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _VIDIOC_CREATE_BUFS: 4 5 ··· 12 11 13 12 VIDIOC_CREATE_BUFS - Create buffers for Memory Mapped or User Pointer or DMA Buffer I/O 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 19 - .. c:function:: int ioctl( int fd, VIDIOC_CREATE_BUFS, struct v4l2_create_buffers *argp ) 20 - :name: VIDIOC_CREATE_BUFS 17 + .. c:macro:: VIDIOC_CREATE_BUFS 21 18 19 + ``int ioctl(int fd, VIDIOC_CREATE_BUFS, struct v4l2_create_buffers *argp)`` 22 20 23 21 Arguments 24 22 ========= 25 23 26 24 ``fd`` 27 - File descriptor returned by :ref:`open() <func-open>`. 25 + File descriptor returned by :c:func:`open()`. 28 26 29 27 ``argp`` 30 28 Pointer to struct :c:type:`v4l2_create_buffers`. 31 - 32 29 33 30 Description 34 31 =========== ··· 69 70 the actual number allocated and the starting index in the ``count`` and 70 71 the ``index`` fields respectively. On return ``count`` can be smaller 71 72 than the number requested. 72 - 73 73 74 74 .. c:type:: v4l2_create_buffers 75 75 ··· 116 118 - ``reserved``\ [7] 117 119 - A place holder for future extensions. Drivers and applications 118 120 must set the array to zero. 119 - 120 121 121 122 Return Value 122 123 ============
+4 -7
Documentation/userspace-api/media/v4l/vidioc-cropcap.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _VIDIOC_CROPCAP: 4 5 ··· 12 11 13 12 VIDIOC_CROPCAP - Information about the video cropping and scaling abilities 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 19 - .. c:function:: int ioctl( int fd, VIDIOC_CROPCAP, struct v4l2_cropcap *argp ) 20 - :name: VIDIOC_CROPCAP 17 + .. c:macro:: VIDIOC_CROPCAP 21 18 19 + ``int ioctl(int fd, VIDIOC_CROPCAP, struct v4l2_cropcap *argp)`` 22 20 23 21 Arguments 24 22 ========= 25 23 26 24 ``fd`` 27 - File descriptor returned by :ref:`open() <func-open>`. 25 + File descriptor returned by :c:func:`open()`. 28 26 29 27 ``argp`` 30 28 Pointer to struct :c:type:`v4l2_cropcap`. 31 - 32 29 33 30 Description 34 31 =========== ··· 94 95 Starting with kernel 4.13 both variations are allowed. 95 96 96 97 97 - 98 98 .. _v4l2-rect-crop: 99 99 100 100 .. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| ··· 117 119 * - __u32 118 120 - ``height`` 119 121 - Height of the rectangle, in pixels. 120 - 121 122 122 123 Return Value 123 124 ============
+4 -9
Documentation/userspace-api/media/v4l/vidioc-dbg-g-chip-info.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _VIDIOC_DBG_G_CHIP_INFO: 4 5 ··· 12 11 13 12 VIDIOC_DBG_G_CHIP_INFO - Identify the chips on a TV card 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 19 - .. c:function:: int ioctl( int fd, VIDIOC_DBG_G_CHIP_INFO, struct v4l2_dbg_chip_info *argp ) 20 - :name: VIDIOC_DBG_G_CHIP_INFO 17 + .. c:macro:: VIDIOC_DBG_G_CHIP_INFO 21 18 19 + ``int ioctl(int fd, VIDIOC_DBG_G_CHIP_INFO, struct v4l2_dbg_chip_info *argp)`` 22 20 23 21 Arguments 24 22 ========= 25 23 26 24 ``fd`` 27 - File descriptor returned by :ref:`open() <func-open>`. 25 + File descriptor returned by :c:func:`open()`. 28 26 29 27 ``argp`` 30 28 Pointer to struct :c:type:`v4l2_dbg_chip_info`. 31 - 32 29 33 30 Description 34 31 =========== ··· 75 76 `https://linuxtv.org/repo/ <https://linuxtv.org/repo/>`__ for access 76 77 instructions. 77 78 78 - 79 79 .. tabularcolumns:: |p{3.5cm}|p{3.5cm}|p{3.5cm}|p{7.0cm}| 80 80 81 81 .. _name-v4l2-dbg-match: ··· 99 101 field. Currently unused. 100 102 * - } 101 103 - 102 - 103 104 104 105 105 106 .. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| ··· 127 130 - Reserved fields, both application and driver must set these to 0. 128 131 129 132 130 - 131 133 .. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}| 132 134 133 135 .. _name-chip-match-types: ··· 143 147 * - ``V4L2_CHIP_MATCH_SUBDEV`` 144 148 - 4 145 149 - Match the nth sub-device. 146 - 147 150 148 151 Return Value 149 152 ============
+7 -11
Documentation/userspace-api/media/v4l/vidioc-dbg-g-register.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _VIDIOC_DBG_G_REGISTER: 4 5 ··· 12 11 13 12 VIDIOC_DBG_G_REGISTER - VIDIOC_DBG_S_REGISTER - Read or write hardware registers 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 19 - .. c:function:: int ioctl( int fd, VIDIOC_DBG_G_REGISTER, struct v4l2_dbg_register *argp ) 20 - :name: VIDIOC_DBG_G_REGISTER 17 + .. c:macro:: VIDIOC_DBG_G_REGISTER 21 18 22 - .. c:function:: int ioctl( int fd, VIDIOC_DBG_S_REGISTER, const struct v4l2_dbg_register *argp ) 23 - :name: VIDIOC_DBG_S_REGISTER 19 + ``int ioctl(int fd, VIDIOC_DBG_G_REGISTER, struct v4l2_dbg_register *argp)`` 24 20 21 + .. c:macro:: VIDIOC_DBG_S_REGISTER 22 + 23 + ``int ioctl(int fd, VIDIOC_DBG_S_REGISTER, const struct v4l2_dbg_register *argp)`` 25 24 26 25 Arguments 27 26 ========= 28 27 29 28 ``fd`` 30 - File descriptor returned by :ref:`open() <func-open>`. 29 + File descriptor returned by :c:func:`open()`. 31 30 32 31 ``argp`` 33 32 Pointer to struct :c:type:`v4l2_dbg_register`. 34 - 35 33 36 34 Description 37 35 =========== ··· 85 85 `https://linuxtv.org/repo/ <https://linuxtv.org/repo/>`__ for access 86 86 instructions. 87 87 88 - 89 88 .. tabularcolumns:: |p{3.5cm}|p{3.5cm}|p{3.5cm}|p{7.0cm}| 90 89 91 90 .. c:type:: v4l2_dbg_match ··· 111 112 - 112 113 113 114 114 - 115 115 .. c:type:: v4l2_dbg_register 116 116 117 117 .. flat-table:: struct v4l2_dbg_register ··· 131 133 - The value read from, or to be written into the register. 132 134 133 135 134 - 135 136 .. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}| 136 137 137 138 .. _chip-match-types: ··· 147 150 * - ``V4L2_CHIP_MATCH_SUBDEV`` 148 151 - 4 149 152 - Match the nth sub-device. 150 - 151 153 152 154 Return Value 153 155 ============
+8 -11
Documentation/userspace-api/media/v4l/vidioc-decoder-cmd.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _VIDIOC_DECODER_CMD: 4 5 ··· 12 11 13 12 VIDIOC_DECODER_CMD - VIDIOC_TRY_DECODER_CMD - Execute an decoder command 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 19 - .. c:function:: int ioctl( int fd, VIDIOC_DECODER_CMD, struct v4l2_decoder_cmd *argp ) 20 - :name: VIDIOC_DECODER_CMD 17 + .. c:macro:: VIDIOC_DECODER_CMD 21 18 19 + ``int ioctl(int fd, VIDIOC_DECODER_CMD, struct v4l2_decoder_cmd *argp)`` 22 20 23 - .. c:function:: int ioctl( int fd, VIDIOC_TRY_DECODER_CMD, struct v4l2_decoder_cmd *argp ) 24 - :name: VIDIOC_TRY_DECODER_CMD 21 + .. c:macro:: VIDIOC_TRY_DECODER_CMD 25 22 23 + ``int ioctl(int fd, VIDIOC_TRY_DECODER_CMD, struct v4l2_decoder_cmd *argp)`` 26 24 27 25 Arguments 28 26 ========= 29 27 30 28 ``fd`` 31 - File descriptor returned by :ref:`open() <func-open>`. 29 + File descriptor returned by :c:func:`open()`. 32 30 33 31 ``argp`` 34 32 pointer to struct :c:type:`v4l2_decoder_cmd`. 35 - 36 33 37 34 Description 38 35 =========== ··· 46 47 The ``cmd`` field must contain the command code. Some commands use the 47 48 ``flags`` field for additional information. 48 49 49 - A :ref:`write() <func-write>` or :ref:`VIDIOC_STREAMON` 50 + A :c:func:`write()` or :ref:`VIDIOC_STREAMON` 50 51 call sends an implicit START command to the decoder if it has not been 51 52 started yet. Applies to both queues of mem2mem decoders. 52 53 53 - A :ref:`close() <func-close>` or :ref:`VIDIOC_STREAMOFF <VIDIOC_STREAMON>` 54 + A :c:func:`close()` or :ref:`VIDIOC_STREAMOFF <VIDIOC_STREAMON>` 54 55 call of a streaming file descriptor sends an implicit immediate STOP 55 56 command to the decoder, and all buffered data is discarded. Applies to both 56 57 queues of mem2mem decoders. ··· 58 59 In principle, these ioctls are optional, not all drivers may support them. They were 59 60 introduced in Linux 3.3. They are, however, mandatory for stateful mem2mem decoders 60 61 (as further documented in :ref:`decoder`). 61 - 62 62 63 63 .. tabularcolumns:: |p{1.1cm}|p{2.4cm}|p{1.2cm}|p{1.6cm}|p{10.6cm}| 64 64 ··· 127 129 the array to zero. 128 130 * - } 129 131 - 130 - 131 132 132 133 133 134 .. tabularcolumns:: |p{5.6cm}|p{0.6cm}|p{11.3cm}|
+4 -15
Documentation/userspace-api/media/v4l/vidioc-dqevent.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _VIDIOC_DQEVENT: 4 5 ··· 12 11 13 12 VIDIOC_DQEVENT - Dequeue event 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 19 - .. c:function:: int ioctl( int fd, VIDIOC_DQEVENT, struct v4l2_event *argp ) 20 - :name: VIDIOC_DQEVENT 17 + .. c:macro:: VIDIOC_DQEVENT 21 18 19 + ``int ioctl(int fd, VIDIOC_DQEVENT, struct v4l2_event *argp)`` 22 20 23 21 Arguments 24 22 ========= 25 23 26 24 ``fd`` 27 - File descriptor returned by :ref:`open() <func-open>`. 25 + File descriptor returned by :c:func:`open()`. 28 26 29 27 ``argp`` 30 28 Pointer to struct :c:type:`v4l2_event`. 31 - 32 29 33 30 Description 34 31 =========== ··· 36 37 structure are filled by the driver. The file handle will also receive 37 38 exceptions which the application may get by e.g. using the select system 38 39 call. 39 - 40 40 41 41 .. tabularcolumns:: |p{3.0cm}|p{4.4cm}|p{2.4cm}|p{7.7cm}| 42 42 ··· 96 98 - ``reserved``\ [8] 97 99 - Reserved for future extensions. Drivers must set the array to 98 100 zero. 99 - 100 101 101 102 102 103 .. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}| ··· 188 191 - Base event number for driver-private events. 189 192 190 193 191 - 192 194 .. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| 193 195 194 196 .. c:type:: v4l2_event_vsync ··· 200 204 * - __u8 201 205 - ``field`` 202 206 - The upcoming field. See enum :c:type:`v4l2_field`. 203 - 204 207 205 208 206 209 .. tabularcolumns:: |p{3.5cm}|p{3.0cm}|p{1.8cm}|p{8.5cm}| ··· 252 257 :ref:`v4l2_queryctrl <v4l2-queryctrl>`. 253 258 254 259 255 - 256 260 .. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| 257 261 258 262 .. c:type:: v4l2_event_frame_sync ··· 264 270 * - __u32 265 271 - ``frame_sequence`` 266 272 - The sequence number of the frame being received. 267 - 268 273 269 274 270 275 .. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| ··· 279 286 - ``changes`` 280 287 - A bitmask that tells what has changed. See 281 288 :ref:`src-changes-flags`. 282 - 283 289 284 290 285 291 .. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| ··· 310 318 automatically assigned to the default region 0. 311 319 312 320 313 - 314 321 .. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}| 315 322 316 323 .. _ctrl-changes-flags: ··· 333 342 - 0x0004 334 343 - This control event was triggered because the minimum, maximum, 335 344 step or the default value of the control changed. 336 - 337 345 338 346 339 347 .. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}| ··· 364 374 that many Video Capture devices are not able to recover from a temporary 365 375 loss of signal and so restarting streaming I/O is required in order for 366 376 the hardware to synchronize to the video signal. 367 - 368 377 369 378 Return Value 370 379 ============
+7 -10
Documentation/userspace-api/media/v4l/vidioc-dv-timings-cap.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _VIDIOC_DV_TIMINGS_CAP: 4 5 ··· 12 11 13 12 VIDIOC_DV_TIMINGS_CAP - VIDIOC_SUBDEV_DV_TIMINGS_CAP - The capabilities of the Digital Video receiver/transmitter 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 19 - .. c:function:: int ioctl( int fd, VIDIOC_DV_TIMINGS_CAP, struct v4l2_dv_timings_cap *argp ) 20 - :name: VIDIOC_DV_TIMINGS_CAP 17 + .. c:macro:: VIDIOC_DV_TIMINGS_CAP 21 18 22 - .. c:function:: int ioctl( int fd, VIDIOC_SUBDEV_DV_TIMINGS_CAP, struct v4l2_dv_timings_cap *argp ) 23 - :name: VIDIOC_SUBDEV_DV_TIMINGS_CAP 19 + ``int ioctl(int fd, VIDIOC_DV_TIMINGS_CAP, struct v4l2_dv_timings_cap *argp)`` 24 20 21 + .. c:macro:: VIDIOC_SUBDEV_DV_TIMINGS_CAP 22 + 23 + ``int ioctl(int fd, VIDIOC_SUBDEV_DV_TIMINGS_CAP, struct v4l2_dv_timings_cap *argp)`` 25 24 26 25 Arguments 27 26 ========= 28 27 29 28 ``fd`` 30 - File descriptor returned by :ref:`open() <func-open>`. 29 + File descriptor returned by :c:func:`open()`. 31 30 32 31 ``argp`` 33 32 Pointer to struct :c:type:`v4l2_dv_timings_cap`. 34 - 35 33 36 34 Description 37 35 =========== ··· 54 54 :c:type:`v4l2_dv_timings_cap` ``pad`` field and 55 55 zero the ``reserved`` array. Attempts to query capabilities on a pad 56 56 that doesn't support them will return an ``EINVAL`` error code. 57 - 58 57 59 58 .. tabularcolumns:: |p{1.2cm}|p{3.0cm}|p{13.3cm}| 60 59 ··· 94 95 - ``reserved``\ [16] 95 96 - Reserved for future extensions. 96 97 Drivers must set the array to zero. 97 - 98 98 99 99 100 100 .. tabularcolumns:: |p{1.0cm}|p{4.0cm}|p{3.5cm}|p{9.2cm}| ··· 150 152 * - ``V4L2_DV_BT_CAP_CUSTOM`` 151 153 - Can support non-standard timings, i.e. timings not belonging to 152 154 the standards set in the ``standards`` field. 153 - 154 155 155 156 Return Value 156 157 ============
+11 -14
Documentation/userspace-api/media/v4l/vidioc-encoder-cmd.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _VIDIOC_ENCODER_CMD: 4 5 ··· 12 11 13 12 VIDIOC_ENCODER_CMD - VIDIOC_TRY_ENCODER_CMD - Execute an encoder command 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 19 - .. c:function:: int ioctl( int fd, VIDIOC_ENCODER_CMD, struct v4l2_encoder_cmd *argp ) 20 - :name: VIDIOC_ENCODER_CMD 17 + .. c:macro:: VIDIOC_ENCODER_CMD 21 18 22 - .. c:function:: int ioctl( int fd, VIDIOC_TRY_ENCODER_CMD, struct v4l2_encoder_cmd *argp ) 23 - :name: VIDIOC_TRY_ENCODER_CMD 19 + ``int ioctl(int fd, VIDIOC_ENCODER_CMD, struct v4l2_encoder_cmd *argp)`` 24 20 21 + .. c:macro:: VIDIOC_TRY_ENCODER_CMD 22 + 23 + ``int ioctl(int fd, VIDIOC_TRY_ENCODER_CMD, struct v4l2_encoder_cmd *argp)`` 25 24 26 25 Arguments 27 26 ========= 28 27 29 28 ``fd`` 30 - File descriptor returned by :ref:`open() <func-open>`. 29 + File descriptor returned by :c:func:`open()`. 31 30 32 31 ``argp`` 33 32 Pointer to struct :c:type:`v4l2_encoder_cmd`. ··· 48 47 The ``cmd`` field must contain the command code. Some commands use the 49 48 ``flags`` field for additional information. 50 49 51 - After a STOP command, :ref:`read() <func-read>` calls will read 50 + After a STOP command, :c:func:`read()` calls will read 52 51 the remaining data buffered by the driver. When the buffer is empty, 53 - :ref:`read() <func-read>` will return zero and the next :ref:`read() <func-read>` 52 + :c:func:`read()` will return zero and the next :c:func:`read()` 54 53 call will restart the encoder. 55 54 56 - A :ref:`read() <func-read>` or :ref:`VIDIOC_STREAMON <VIDIOC_STREAMON>` 55 + A :c:func:`read()` or :ref:`VIDIOC_STREAMON <VIDIOC_STREAMON>` 57 56 call sends an implicit START command to the encoder if it has not been 58 57 started yet. Applies to both queues of mem2mem encoders. 59 58 60 - A :ref:`close() <func-close>` or :ref:`VIDIOC_STREAMOFF <VIDIOC_STREAMON>` 59 + A :c:func:`close()` or :ref:`VIDIOC_STREAMOFF <VIDIOC_STREAMON>` 61 60 call of a streaming file descriptor sends an implicit immediate STOP to 62 61 the encoder, and all buffered data is discarded. Applies to both queues of 63 62 mem2mem encoders. ··· 65 64 These ioctls are optional, not all drivers may support them. They were 66 65 introduced in Linux 2.6.21. They are, however, mandatory for stateful mem2mem 67 66 encoders (as further documented in :ref:`encoder`). 68 - 69 67 70 68 .. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| 71 69 ··· 87 87 - ``data``\ [8] 88 88 - Reserved for future extensions. Drivers and applications must set 89 89 the array to zero. 90 - 91 90 92 91 93 92 .. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}| ··· 133 134 the encoder is already running, this command does nothing. No 134 135 flags are defined for this command. 135 136 136 - 137 137 .. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}| 138 138 139 139 .. _encoder-flags: ··· 148 150 rather than immediately. 149 151 150 152 Does not apply to :ref:`encoder`. 151 - 152 153 153 154 Return Value 154 155 ============
+7 -9
Documentation/userspace-api/media/v4l/vidioc-enum-dv-timings.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _VIDIOC_ENUM_DV_TIMINGS: 4 5 ··· 12 11 13 12 VIDIOC_ENUM_DV_TIMINGS - VIDIOC_SUBDEV_ENUM_DV_TIMINGS - Enumerate supported Digital Video timings 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 19 - .. c:function:: int ioctl( int fd, VIDIOC_ENUM_DV_TIMINGS, struct v4l2_enum_dv_timings *argp ) 20 - :name: VIDIOC_ENUM_DV_TIMINGS 17 + .. c:macro:: VIDIOC_ENUM_DV_TIMINGS 21 18 22 - .. c:function:: int ioctl( int fd, VIDIOC_SUBDEV_ENUM_DV_TIMINGS, struct v4l2_enum_dv_timings *argp ) 23 - :name: VIDIOC_SUBDEV_ENUM_DV_TIMINGS 19 + ``int ioctl(int fd, VIDIOC_ENUM_DV_TIMINGS, struct v4l2_enum_dv_timings *argp)`` 24 20 21 + .. c:macro:: VIDIOC_SUBDEV_ENUM_DV_TIMINGS 22 + 23 + ``int ioctl(int fd, VIDIOC_SUBDEV_ENUM_DV_TIMINGS, struct v4l2_enum_dv_timings *argp)`` 25 24 26 25 Arguments 27 26 ========= 28 27 29 28 ``fd`` 30 - File descriptor returned by :ref:`open() <func-open>`. 29 + File descriptor returned by :c:func:`open()`. 31 30 32 31 ``argp`` 33 32 Pointer to struct :c:type:`v4l2_enum_dv_timings`. 34 - 35 33 36 34 Description 37 35 =========== ··· 65 65 Attempts to enumerate timings on a pad that doesn't support them will 66 66 return an ``EINVAL`` error code. 67 67 68 - 69 68 .. c:type:: v4l2_enum_dv_timings 70 69 71 70 .. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| ··· 89 90 * - struct :c:type:`v4l2_dv_timings` 90 91 - ``timings`` 91 92 - The timings. 92 - 93 93 94 94 Return Value 95 95 ============
+4 -8
Documentation/userspace-api/media/v4l/vidioc-enum-fmt.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _VIDIOC_ENUM_FMT: 4 5 ··· 12 11 13 12 VIDIOC_ENUM_FMT - Enumerate image formats 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 19 - .. c:function:: int ioctl( int fd, VIDIOC_ENUM_FMT, struct v4l2_fmtdesc *argp ) 20 - :name: VIDIOC_ENUM_FMT 17 + .. c:macro:: VIDIOC_ENUM_FMT 21 18 19 + ``int ioctl(int fd, VIDIOC_ENUM_FMT, struct v4l2_fmtdesc *argp)`` 22 20 23 21 Arguments 24 22 ========= 25 23 26 24 ``fd`` 27 - File descriptor returned by :ref:`open() <func-open>`. 25 + File descriptor returned by :c:func:`open()`. 28 26 29 27 ``argp`` 30 28 Pointer to struct :c:type:`v4l2_fmtdesc`. 31 - 32 29 33 30 Description 34 31 =========== ··· 70 71 Regardless of the value of the ``mbus_code`` field, the enumerated image 71 72 formats shall not depend on the active configuration of the video device 72 73 or device pipeline. 73 - 74 74 75 75 .. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| 76 76 ··· 133 135 - ``reserved``\ [3] 134 136 - Reserved for future extensions. Drivers must set the array to 135 137 zero. 136 - 137 138 138 139 139 140 .. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}| ··· 223 226 The application can ask to configure the quantization of the capture 224 227 device when calling the :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl with 225 228 :ref:`V4L2_PIX_FMT_FLAG_SET_CSC <v4l2-pix-fmt-flag-set-csc>` set. 226 - 227 229 228 230 Return Value 229 231 ============
+4 -11
Documentation/userspace-api/media/v4l/vidioc-enum-frameintervals.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _VIDIOC_ENUM_FRAMEINTERVALS: 4 5 ··· 12 11 13 12 VIDIOC_ENUM_FRAMEINTERVALS - Enumerate frame intervals 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 19 - .. c:function:: int ioctl( int fd, VIDIOC_ENUM_FRAMEINTERVALS, struct v4l2_frmivalenum *argp ) 20 - :name: VIDIOC_ENUM_FRAMEINTERVALS 17 + .. c:macro:: VIDIOC_ENUM_FRAMEINTERVALS 21 18 19 + ``int ioctl(int fd, VIDIOC_ENUM_FRAMEINTERVALS, struct v4l2_frmivalenum *argp)`` 22 20 23 21 Arguments 24 22 ========= 25 23 26 24 ``fd`` 27 - File descriptor returned by :ref:`open() <func-open>`. 25 + File descriptor returned by :c:func:`open()`. 28 26 29 27 ``argp`` 30 28 Pointer to struct :c:type:`v4l2_frmivalenum` 31 29 that contains a pixel format and size and receives a frame interval. 32 - 33 30 34 31 Description 35 32 =========== ··· 90 91 91 92 frame_rate = 1 / frame_interval 92 93 93 - 94 94 Structs 95 95 ======= 96 96 97 97 In the structs below, *IN* denotes a value that has to be filled in by 98 98 the application, *OUT* denotes values that the driver fills in. The 99 99 application should zero out all members except for the *IN* fields. 100 - 101 100 102 101 .. c:type:: v4l2_frmival_stepwise 103 102 ··· 115 118 * - struct :c:type:`v4l2_fract` 116 119 - ``step`` 117 120 - Frame interval step size [s]. 118 - 119 121 120 122 121 123 .. c:type:: v4l2_frmivalenum ··· 159 163 applications. 160 164 161 165 162 - 163 166 Enums 164 167 ===== 165 - 166 168 167 169 .. c:type:: v4l2_frmivaltypes 168 170 ··· 180 186 * - ``V4L2_FRMIVAL_TYPE_STEPWISE`` 181 187 - 3 182 188 - Step-wise defined frame interval. 183 - 184 189 185 190 Return Value 186 191 ============
+4 -12
Documentation/userspace-api/media/v4l/vidioc-enum-framesizes.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _VIDIOC_ENUM_FRAMESIZES: 4 5 ··· 12 11 13 12 VIDIOC_ENUM_FRAMESIZES - Enumerate frame sizes 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 19 - .. c:function:: int ioctl( int fd, VIDIOC_ENUM_FRAMESIZES, struct v4l2_frmsizeenum *argp ) 20 - :name: VIDIOC_ENUM_FRAMESIZES 17 + .. c:macro:: VIDIOC_ENUM_FRAMESIZES 21 18 19 + ``int ioctl(int fd, VIDIOC_ENUM_FRAMESIZES, struct v4l2_frmsizeenum *argp)`` 22 20 23 21 Arguments 24 22 ========= 25 23 26 24 ``fd`` 27 - File descriptor returned by :ref:`open() <func-open>`. 25 + File descriptor returned by :c:func:`open()`. 28 26 29 27 ``argp`` 30 28 Pointer to struct :c:type:`v4l2_frmsizeenum` 31 29 that contains an index and pixel format and receives a frame width 32 30 and height. 33 - 34 31 35 32 Description 36 33 =========== ··· 80 81 enumeration data is consistent if the application does not perform any 81 82 other ioctl calls while it runs the frame size enumeration. 82 83 83 - 84 84 Structs 85 85 ======= 86 86 87 87 In the structs below, *IN* denotes a value that has to be filled in by 88 88 the application, *OUT* denotes values that the driver fills in. The 89 89 application should zero out all members except for the *IN* fields. 90 - 91 90 92 91 .. c:type:: v4l2_frmsize_discrete 93 92 ··· 102 105 * - __u32 103 106 - ``height`` 104 107 - Height of the frame [pixel]. 105 - 106 108 107 109 108 110 .. c:type:: v4l2_frmsize_stepwise ··· 131 135 * - __u32 132 136 - ``step_height`` 133 137 - Frame height step size [pixel]. 134 - 135 138 136 139 137 140 .. c:type:: v4l2_frmsizeenum ··· 168 173 applications. 169 174 170 175 171 - 172 176 Enums 173 177 ===== 174 - 175 178 176 179 .. c:type:: v4l2_frmsizetypes 177 180 ··· 189 196 * - ``V4L2_FRMSIZE_TYPE_STEPWISE`` 190 197 - 3 191 198 - Step-wise defined frame size. 192 - 193 199 194 200 Return Value 195 201 ============
+4 -8
Documentation/userspace-api/media/v4l/vidioc-enum-freq-bands.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _VIDIOC_ENUM_FREQ_BANDS: 4 5 ··· 12 11 13 12 VIDIOC_ENUM_FREQ_BANDS - Enumerate supported frequency bands 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 19 - .. c:function:: int ioctl( int fd, VIDIOC_ENUM_FREQ_BANDS, struct v4l2_frequency_band *argp ) 20 - :name: VIDIOC_ENUM_FREQ_BANDS 17 + .. c:macro:: VIDIOC_ENUM_FREQ_BANDS 21 18 19 + ``int ioctl(int fd, VIDIOC_ENUM_FREQ_BANDS, struct v4l2_frequency_band *argp)`` 22 20 23 21 Arguments 24 22 ========= 25 23 26 24 ``fd`` 27 - File descriptor returned by :ref:`open() <func-open>`. 25 + File descriptor returned by :c:func:`open()`. 28 26 29 27 ``argp`` 30 28 Pointer to struct :c:type:`v4l2_frequency_band`. 31 - 32 29 33 30 Description 34 31 =========== ··· 39 40 40 41 This ioctl is supported if the ``V4L2_TUNER_CAP_FREQ_BANDS`` capability 41 42 of the corresponding tuner/modulator is set. 42 - 43 43 44 44 .. tabularcolumns:: |p{2.9cm}|p{2.9cm}|p{5.8cm}|p{2.9cm}|p{3.0cm}| 45 45 ··· 108 110 Applications and drivers must set the array to zero. 109 111 110 112 111 - 112 113 .. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}| 113 114 114 115 .. _band-modulation: ··· 126 129 * - ``V4L2_BAND_MODULATION_AM`` 127 130 - 0x08 128 131 - Amplitude Modulation, commonly used for analog radio. 129 - 130 132 131 133 Return Value 132 134 ============
+4 -6
Documentation/userspace-api/media/v4l/vidioc-enumaudio.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _VIDIOC_ENUMAUDIO: 4 5 ··· 12 11 13 12 VIDIOC_ENUMAUDIO - Enumerate audio inputs 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 19 - .. c:function:: int ioctl( int fd, VIDIOC_ENUMAUDIO, struct v4l2_audio *argp ) 20 - :name: VIDIOC_ENUMAUDIO 17 + .. c:macro:: VIDIOC_ENUMAUDIO 21 18 19 + ``int ioctl(int fd, VIDIOC_ENUMAUDIO, struct v4l2_audio *argp)`` 22 20 23 21 Arguments 24 22 ========= 25 23 26 24 ``fd`` 27 - File descriptor returned by :ref:`open() <func-open>`. 25 + File descriptor returned by :c:func:`open()`. 28 26 29 27 ``argp`` 30 28 Pointer to struct :c:type:`v4l2_audio`. 31 - 32 29 33 30 Description 34 31 =========== ··· 41 42 42 43 See :ref:`VIDIOC_G_AUDIO <VIDIOC_G_AUDIO>` for a description of struct 43 44 :c:type:`v4l2_audio`. 44 - 45 45 46 46 Return Value 47 47 ============
+4 -6
Documentation/userspace-api/media/v4l/vidioc-enumaudioout.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _VIDIOC_ENUMAUDOUT: 4 5 ··· 12 11 13 12 VIDIOC_ENUMAUDOUT - Enumerate audio outputs 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 19 - .. c:function:: int ioctl( int fd, VIDIOC_ENUMAUDOUT, struct v4l2_audioout *argp ) 20 - :name: VIDIOC_ENUMAUDOUT 17 + .. c:macro:: VIDIOC_ENUMAUDOUT 21 18 19 + ``int ioctl(int fd, VIDIOC_ENUMAUDOUT, struct v4l2_audioout *argp)`` 22 20 23 21 Arguments 24 22 ========= 25 23 26 24 ``fd`` 27 - File descriptor returned by :ref:`open() <func-open>`. 25 + File descriptor returned by :c:func:`open()`. 28 26 29 27 ``argp`` 30 28 Pointer to struct :c:type:`v4l2_audioout`. 31 - 32 29 33 30 Description 34 31 =========== ··· 46 47 47 48 See :ref:`VIDIOC_G_AUDIOout <VIDIOC_G_AUDOUT>` for a description of struct 48 49 :c:type:`v4l2_audioout`. 49 - 50 50 51 51 Return Value 52 52 ============
+4 -10
Documentation/userspace-api/media/v4l/vidioc-enuminput.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _VIDIOC_ENUMINPUT: 4 5 ··· 12 11 13 12 VIDIOC_ENUMINPUT - Enumerate video inputs 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 19 - .. c:function:: int ioctl( int fd, VIDIOC_ENUMINPUT, struct v4l2_input *argp ) 20 - :name: VIDIOC_ENUMINPUT 17 + .. c:macro:: VIDIOC_ENUMINPUT 21 18 19 + ``int ioctl(int fd, VIDIOC_ENUMINPUT, struct v4l2_input *argp)`` 22 20 23 21 Arguments 24 22 ========= 25 23 26 24 ``fd`` 27 - File descriptor returned by :ref:`open() <func-open>`. 25 + File descriptor returned by :c:func:`open()`. 28 26 29 27 ``argp`` 30 28 Pointer to struct :c:type:`v4l2_input`. 31 - 32 29 33 30 Description 34 31 =========== ··· 37 38 fill the rest of the structure or return an ``EINVAL`` error code when the 38 39 index is out of bounds. To enumerate all inputs applications shall begin 39 40 at index zero, incrementing by one until the driver returns ``EINVAL``. 40 - 41 41 42 42 .. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| 43 43 ··· 101 103 zero. 102 104 103 105 104 - 105 106 .. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}| 106 107 107 108 .. _input-type: ··· 121 124 * - ``V4L2_INPUT_TYPE_TOUCH`` 122 125 - 3 123 126 - This input is a touch device for capturing raw touch data. 124 - 125 127 126 128 127 129 .. tabularcolumns:: |p{4.8cm}|p{2.6cm}|p{10.1cm}| ··· 194 198 - VTR time constant. [?] 195 199 196 200 197 - 198 201 .. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}| 199 202 200 203 .. _input-capabilities: ··· 216 221 - This input supports setting the native size using the 217 222 ``V4L2_SEL_TGT_NATIVE_SIZE`` selection target, see 218 223 :ref:`v4l2-selections-common`. 219 - 220 224 221 225 Return Value 222 226 ============
+4 -9
Documentation/userspace-api/media/v4l/vidioc-enumoutput.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _VIDIOC_ENUMOUTPUT: 4 5 ··· 12 11 13 12 VIDIOC_ENUMOUTPUT - Enumerate video outputs 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 19 - .. c:function:: int ioctl( int fd, VIDIOC_ENUMOUTPUT, struct v4l2_output *argp ) 20 - :name: VIDIOC_ENUMOUTPUT 17 + .. c:macro:: VIDIOC_ENUMOUTPUT 21 18 19 + ``int ioctl(int fd, VIDIOC_ENUMOUTPUT, struct v4l2_output *argp)`` 22 20 23 21 Arguments 24 22 ========= 25 23 26 24 ``fd`` 27 - File descriptor returned by :ref:`open() <func-open>`. 25 + File descriptor returned by :c:func:`open()`. 28 26 29 27 ``argp`` 30 28 Pointer to struct :c:type:`v4l2_output`. 31 - 32 29 33 30 Description 34 31 =========== ··· 38 39 when the index is out of bounds. To enumerate all outputs applications 39 40 shall begin at index zero, incrementing by one until the driver returns 40 41 ``EINVAL``. 41 - 42 42 43 43 .. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| 44 44 ··· 96 98 zero. 97 99 98 100 99 - 100 101 .. tabularcolumns:: |p{7.0cm}|p{1.8cm}|p{8.7cm}| 101 102 102 103 .. _output-type: ··· 116 119 * - ``V4L2_OUTPUT_TYPE_ANALOGVGAOVERLAY`` 117 120 - 3 118 121 - The video output will be copied to a :ref:`video overlay <overlay>`. 119 - 120 122 121 123 122 124 .. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}| ··· 140 144 - This output supports setting the native size using the 141 145 ``V4L2_SEL_TGT_NATIVE_SIZE`` selection target, see 142 146 :ref:`v4l2-selections-common`. 143 - 144 147 145 148 Return Value 146 149 ============
+7 -16
Documentation/userspace-api/media/v4l/vidioc-enumstd.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _VIDIOC_ENUMSTD: 4 5 ··· 12 11 13 12 VIDIOC_ENUMSTD - VIDIOC_SUBDEV_ENUMSTD - Enumerate supported video standards 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 19 - .. c:function:: int ioctl( int fd, VIDIOC_ENUMSTD, struct v4l2_standard *argp ) 20 - :name: VIDIOC_ENUMSTD 17 + .. c:macro:: VIDIOC_ENUMSTD 21 18 22 - .. c:function:: int ioctl( int fd, VIDIOC_SUBDEV_ENUMSTD, struct v4l2_standard *argp ) 23 - :name: VIDIOC_SUBDEV_ENUMSTD 19 + ``int ioctl(int fd, VIDIOC_ENUMSTD, struct v4l2_standard *argp)`` 24 20 21 + .. c:macro:: VIDIOC_SUBDEV_ENUMSTD 22 + 23 + ``int ioctl(int fd, VIDIOC_SUBDEV_ENUMSTD, struct v4l2_standard *argp)`` 25 24 26 25 Arguments 27 26 ========= 28 27 29 28 ``fd`` 30 - File descriptor returned by :ref:`open() <func-open>`. 29 + File descriptor returned by :c:func:`open()`. 31 30 32 31 ``argp`` 33 32 Pointer to struct :c:type:`v4l2_standard`. 34 - 35 33 36 34 Description 37 35 =========== ··· 44 44 zero, incrementing by one until the driver returns ``EINVAL``. Drivers may 45 45 enumerate a different set of standards after switching the video input 46 46 or output. [#f1]_ 47 - 48 47 49 48 .. c:type:: v4l2_standard 50 49 ··· 84 85 zero. 85 86 86 87 87 - 88 88 .. c:type:: v4l2_fract 89 89 90 90 .. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| ··· 100 102 - ``denominator`` 101 103 - 102 104 103 - 104 105 .. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| 105 106 106 107 .. _v4l2-std-id: ··· 115 118 as listed below and in :ref:`video-standards`. The 32 most 116 119 significant bits are reserved for custom (driver defined) video 117 120 standards. 118 - 119 121 120 122 121 123 .. code-block:: c ··· 138 142 PAL video recorders can play back NTSC tapes in this mode for display on 139 143 a 50/60 Hz agnostic PAL TV. 140 144 141 - 142 145 .. code-block:: c 143 146 144 147 #define V4L2_STD_NTSC_M ((v4l2_std_id)0x00001000) ··· 146 151 147 152 ``V4L2_STD_NTSC_443`` is a hybrid standard with 525 lines, 60 Hz refresh 148 153 rate, and NTSC color modulation with a 4.43 MHz color subcarrier. 149 - 150 154 151 155 .. code-block:: c 152 156 ··· 168 174 terrestrial digital TV standards. Presently the V4L2 API does not 169 175 support digital TV. See also the Linux DVB API at 170 176 `https://linuxtv.org <https://linuxtv.org>`__. 171 - 172 177 173 178 .. code-block:: c 174 179 ··· 220 227 #define V4L2_STD_UNKNOWN 0 221 228 #define V4L2_STD_ALL (V4L2_STD_525_60 | 222 229 V4L2_STD_625_50) 223 - 224 230 225 231 .. raw:: latex 226 232 ··· 293 301 .. raw:: latex 294 302 295 303 \endgroup 296 - 297 304 298 305 299 306 Return Value
+4 -10
Documentation/userspace-api/media/v4l/vidioc-expbuf.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _VIDIOC_EXPBUF: 4 5 ··· 12 11 13 12 VIDIOC_EXPBUF - Export a buffer as a DMABUF file descriptor. 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 19 - .. c:function:: int ioctl( int fd, VIDIOC_EXPBUF, struct v4l2_exportbuffer *argp ) 20 - :name: VIDIOC_EXPBUF 17 + .. c:macro:: VIDIOC_EXPBUF 21 18 19 + ``int ioctl(int fd, VIDIOC_EXPBUF, struct v4l2_exportbuffer *argp)`` 22 20 23 21 Arguments 24 22 ========= 25 23 26 24 ``fd`` 27 - File descriptor returned by :ref:`open() <func-open>`. 25 + File descriptor returned by :c:func:`open()`. 28 26 29 27 ``argp`` 30 28 Pointer to struct :c:type:`v4l2_exportbuffer`. 31 - 32 29 33 30 Description 34 31 =========== ··· 62 63 recommended to close a DMABUF file when it is no longer used to allow 63 64 the associated memory to be reclaimed. 64 65 65 - 66 66 Examples 67 67 ======== 68 - 69 68 70 69 .. code-block:: c 71 70 ··· 83 86 84 87 return 0; 85 88 } 86 - 87 89 88 90 .. code-block:: c 89 91 ··· 109 113 110 114 return 0; 111 115 } 112 - 113 116 114 117 .. c:type:: v4l2_exportbuffer 115 118 ··· 149 154 - ``reserved[11]`` 150 155 - Reserved field for future use. Drivers and applications must set 151 156 the array to zero. 152 - 153 157 154 158 Return Value 155 159 ============
+7 -11
Documentation/userspace-api/media/v4l/vidioc-g-audio.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _VIDIOC_G_AUDIO: 4 5 ··· 12 11 13 12 VIDIOC_G_AUDIO - VIDIOC_S_AUDIO - Query or select the current audio input and its attributes 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 19 - .. c:function:: int ioctl( int fd, VIDIOC_G_AUDIO, struct v4l2_audio *argp ) 20 - :name: VIDIOC_G_AUDIO 17 + .. c:macro:: VIDIOC_G_AUDIO 21 18 22 - .. c:function:: int ioctl( int fd, VIDIOC_S_AUDIO, const struct v4l2_audio *argp ) 23 - :name: VIDIOC_S_AUDIO 19 + ``int ioctl(int fd, VIDIOC_G_AUDIO, struct v4l2_audio *argp)`` 24 20 21 + .. c:macro:: VIDIOC_S_AUDIO 22 + 23 + ``int ioctl(int fd, VIDIOC_S_AUDIO, const struct v4l2_audio *argp)`` 25 24 26 25 Arguments 27 26 ========= 28 27 29 28 ``fd`` 30 - File descriptor returned by :ref:`open() <func-open>`. 29 + File descriptor returned by :c:func:`open()`. 31 30 32 31 ``argp`` 33 32 Pointer to struct :c:type:`v4l2_audio`. 34 - 35 33 36 34 Description 37 35 =========== ··· 48 48 ioctl. Drivers may switch to a different audio mode if the request 49 49 cannot be satisfied. However, this is a write-only ioctl, it does not 50 50 return the actual new audio mode. 51 - 52 51 53 52 .. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| 54 53 ··· 79 80 the array to zero. 80 81 81 82 82 - 83 83 .. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}| 84 84 85 85 .. _audio-capability: ··· 99 101 - Automatic Volume Level mode is supported. 100 102 101 103 102 - 103 104 .. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}| 104 105 105 106 .. _audio-mode: ··· 111 114 * - ``V4L2_AUDMODE_AVL`` 112 115 - 0x00001 113 116 - AVL mode is on. 114 - 115 117 116 118 Return Value 117 119 ============
+7 -9
Documentation/userspace-api/media/v4l/vidioc-g-audioout.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _VIDIOC_G_AUDOUT: 4 5 ··· 12 11 13 12 VIDIOC_G_AUDOUT - VIDIOC_S_AUDOUT - Query or select the current audio output 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 19 - .. c:function:: int ioctl( int fd, VIDIOC_G_AUDOUT, struct v4l2_audioout *argp ) 20 - :name: VIDIOC_G_AUDOUT 17 + .. c:macro:: VIDIOC_G_AUDOUT 21 18 22 - .. c:function:: int ioctl( int fd, VIDIOC_S_AUDOUT, const struct v4l2_audioout *argp ) 23 - :name: VIDIOC_S_AUDOUT 19 + ``int ioctl(int fd, VIDIOC_G_AUDOUT, struct v4l2_audioout *argp)`` 24 20 21 + .. c:macro:: VIDIOC_S_AUDOUT 22 + 23 + ``int ioctl(int fd, VIDIOC_S_AUDOUT, const struct v4l2_audioout *argp)`` 25 24 26 25 Arguments 27 26 ========= 28 27 29 28 ``fd`` 30 - File descriptor returned by :ref:`open() <func-open>`. 29 + File descriptor returned by :c:func:`open()`. 31 30 32 31 ``argp`` 33 32 Pointer to struct :c:type:`v4l2_audioout`. 34 - 35 33 36 34 Description 37 35 =========== ··· 55 55 56 56 Connectors on a TV card to loop back the received audio signal 57 57 to a sound card are not audio outputs in this sense. 58 - 59 58 60 59 .. c:type:: v4l2_audioout 61 60 ··· 85 86 - ``reserved``\ [2] 86 87 - Reserved for future extensions. Drivers and applications must set 87 88 the array to zero. 88 - 89 89 90 90 Return Value 91 91 ============
+7 -9
Documentation/userspace-api/media/v4l/vidioc-g-crop.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _VIDIOC_G_CROP: 4 5 ··· 12 11 13 12 VIDIOC_G_CROP - VIDIOC_S_CROP - Get or set the current cropping rectangle 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 19 - .. c:function:: int ioctl( int fd, VIDIOC_G_CROP, struct v4l2_crop *argp ) 20 - :name: VIDIOC_G_CROP 17 + .. c:macro:: VIDIOC_G_CROP 21 18 22 - .. c:function:: int ioctl( int fd, VIDIOC_S_CROP, const struct v4l2_crop *argp ) 23 - :name: VIDIOC_S_CROP 19 + ``int ioctl(int fd, VIDIOC_G_CROP, struct v4l2_crop *argp)`` 24 20 21 + .. c:macro:: VIDIOC_S_CROP 22 + 23 + ``int ioctl(int fd, VIDIOC_S_CROP, const struct v4l2_crop *argp)`` 25 24 26 25 Arguments 27 26 ========= 28 27 29 28 ``fd`` 30 - File descriptor returned by :ref:`open() <func-open>`. 29 + File descriptor returned by :c:func:`open()`. 31 30 32 31 ``argp`` 33 32 Pointer to struct :c:type:`v4l2_crop`. 34 - 35 33 36 34 Description 37 35 =========== ··· 69 69 When cropping is not supported then no parameters are changed and 70 70 :ref:`VIDIOC_S_CROP <VIDIOC_G_CROP>` returns the ``EINVAL`` error code. 71 71 72 - 73 72 .. c:type:: v4l2_crop 74 73 75 74 .. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| ··· 98 99 ``_MPLANE`` at the end). 99 100 100 101 Starting with kernel 4.13 both variations are allowed. 101 - 102 102 103 103 Return Value 104 104 ============
+7 -9
Documentation/userspace-api/media/v4l/vidioc-g-ctrl.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _VIDIOC_G_CTRL: 4 5 ··· 12 11 13 12 VIDIOC_G_CTRL - VIDIOC_S_CTRL - Get or set the value of a control 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 19 - .. c:function:: int ioctl( int fd, VIDIOC_G_CTRL, struct v4l2_control *argp ) 20 - :name: VIDIOC_G_CTRL 17 + .. c:macro:: VIDIOC_G_CTRL 21 18 22 - .. c:function:: int ioctl( int fd, VIDIOC_S_CTRL, struct v4l2_control *argp ) 23 - :name: VIDIOC_S_CTRL 19 + ``int ioctl(int fd, VIDIOC_G_CTRL, struct v4l2_control *argp)`` 24 20 21 + .. c:macro:: VIDIOC_S_CTRL 22 + 23 + ``int ioctl(int fd, VIDIOC_S_CTRL, struct v4l2_control *argp)`` 25 24 26 25 Arguments 27 26 ========= 28 27 29 28 ``fd`` 30 - File descriptor returned by :ref:`open() <func-open>`. 29 + File descriptor returned by :c:func:`open()`. 31 30 32 31 ``argp`` 33 32 Pointer to struct :c:type:`v4l2_control`. 34 - 35 33 36 34 Description 37 35 =========== ··· 55 55 :ref:`VIDIOC_S_EXT_CTRLS <VIDIOC_G_EXT_CTRLS>` or 56 56 :ref:`VIDIOC_TRY_EXT_CTRLS <VIDIOC_G_EXT_CTRLS>` must be used. 57 57 58 - 59 58 .. c:type:: v4l2_control 60 59 61 60 .. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| ··· 70 71 * - __s32 71 72 - ``value`` 72 73 - New value or current value. 73 - 74 74 75 75 Return Value 76 76 ============
+13 -13
Documentation/userspace-api/media/v4l/vidioc-g-dv-timings.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _VIDIOC_G_DV_TIMINGS: 4 5 ··· 12 11 13 12 VIDIOC_G_DV_TIMINGS - VIDIOC_S_DV_TIMINGS - VIDIOC_SUBDEV_G_DV_TIMINGS - VIDIOC_SUBDEV_S_DV_TIMINGS - Get or set DV timings for input or output 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 19 - .. c:function:: int ioctl( int fd, VIDIOC_G_DV_TIMINGS, struct v4l2_dv_timings *argp ) 20 - :name: VIDIOC_G_DV_TIMINGS 17 + .. c:macro:: VIDIOC_G_DV_TIMINGS 21 18 22 - .. c:function:: int ioctl( int fd, VIDIOC_S_DV_TIMINGS, struct v4l2_dv_timings *argp ) 23 - :name: VIDIOC_S_DV_TIMINGS 19 + ``int ioctl(int fd, VIDIOC_G_DV_TIMINGS, struct v4l2_dv_timings *argp)`` 24 20 25 - .. c:function:: int ioctl( int fd, VIDIOC_SUBDEV_G_DV_TIMINGS, struct v4l2_dv_timings *argp ) 26 - :name: VIDIOC_SUBDEV_G_DV_TIMINGS 21 + .. c:macro:: VIDIOC_S_DV_TIMINGS 27 22 28 - .. c:function:: int ioctl( int fd, VIDIOC_SUBDEV_S_DV_TIMINGS, struct v4l2_dv_timings *argp ) 29 - :name: VIDIOC_SUBDEV_S_DV_TIMINGS 23 + ``int ioctl(int fd, VIDIOC_S_DV_TIMINGS, struct v4l2_dv_timings *argp)`` 30 24 25 + .. c:macro:: VIDIOC_SUBDEV_G_DV_TIMINGS 26 + 27 + ``int ioctl(int fd, VIDIOC_SUBDEV_G_DV_TIMINGS, struct v4l2_dv_timings *argp)`` 28 + 29 + .. c:macro:: VIDIOC_SUBDEV_S_DV_TIMINGS 30 + 31 + ``int ioctl(int fd, VIDIOC_SUBDEV_S_DV_TIMINGS, struct v4l2_dv_timings *argp)`` 31 32 32 33 Arguments 33 34 ========= 34 35 35 36 ``fd`` 36 - File descriptor returned by :ref:`open() <func-open>`. 37 + File descriptor returned by :c:func:`open()`. 37 38 38 39 ``argp`` 39 40 Pointer to struct :c:type:`v4l2_dv_timings`. 40 - 41 41 42 42 Description 43 43 =========== ··· 61 59 the current input or output does not support DV timings (e.g. if 62 60 :ref:`VIDIOC_ENUMINPUT` does not set the 63 61 ``V4L2_IN_CAP_DV_TIMINGS`` flag), then ``ENODATA`` error code is returned. 64 - 65 62 66 63 Return Value 67 64 ============ ··· 170 169 - ``reserved[46]`` 171 170 - Reserved for future extensions. Drivers and applications must set 172 171 the array to zero. 173 - 174 172 175 173 .. tabularcolumns:: |p{3.5cm}|p{3.5cm}|p{7.0cm}|p{3.5cm}| 176 174
+12 -13
Documentation/userspace-api/media/v4l/vidioc-g-edid.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _VIDIOC_G_EDID: 4 5 ··· 12 11 13 12 VIDIOC_G_EDID - VIDIOC_S_EDID - VIDIOC_SUBDEV_G_EDID - VIDIOC_SUBDEV_S_EDID - Get or set the EDID of a video receiver/transmitter 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 19 - .. c:function:: int ioctl( int fd, VIDIOC_G_EDID, struct v4l2_edid *argp ) 20 - :name: VIDIOC_G_EDID 17 + .. c:macro:: VIDIOC_G_EDID 21 18 22 - .. c:function:: int ioctl( int fd, VIDIOC_S_EDID, struct v4l2_edid *argp ) 23 - :name: VIDIOC_S_EDID 19 + ``int ioctl(int fd, VIDIOC_G_EDID, struct v4l2_edid *argp)`` 24 20 21 + .. c:macro:: VIDIOC_S_EDID 25 22 26 - .. c:function:: int ioctl( int fd, VIDIOC_SUBDEV_G_EDID, struct v4l2_edid *argp ) 27 - :name: VIDIOC_SUBDEV_G_EDID 23 + ``int ioctl(int fd, VIDIOC_S_EDID, struct v4l2_edid *argp)`` 28 24 29 - .. c:function:: int ioctl( int fd, VIDIOC_SUBDEV_S_EDID, struct v4l2_edid *argp ) 30 - :name: VIDIOC_SUBDEV_S_EDID 25 + .. c:macro:: VIDIOC_SUBDEV_G_EDID 31 26 27 + ``int ioctl(int fd, VIDIOC_SUBDEV_G_EDID, struct v4l2_edid *argp)`` 28 + 29 + .. c:macro:: VIDIOC_SUBDEV_S_EDID 30 + 31 + ``int ioctl(int fd, VIDIOC_SUBDEV_S_EDID, struct v4l2_edid *argp)`` 32 32 33 33 Arguments 34 34 ========= 35 35 36 36 ``fd`` 37 - File descriptor returned by :ref:`open() <func-open>`. 37 + File descriptor returned by :c:func:`open()`. 38 38 39 39 ``argp`` 40 40 Pointer to struct :c:type:`v4l2_edid`. 41 - 42 41 43 42 Description 44 43 =========== ··· 98 97 the EDID data in some way. In any case, the end result is the same: the 99 98 EDID is no longer available. 100 99 101 - 102 100 .. c:type:: v4l2_edid 103 101 104 102 .. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| ··· 131 131 - ``edid`` 132 132 - Pointer to memory that contains the EDID. The minimum size is 133 133 ``blocks`` * 128. 134 - 135 134 136 135 Return Value 137 136 ============
+4 -9
Documentation/userspace-api/media/v4l/vidioc-g-enc-index.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _VIDIOC_G_ENC_INDEX: 4 5 ··· 12 11 13 12 VIDIOC_G_ENC_INDEX - Get meta data about a compressed video stream 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 19 - .. c:function:: int ioctl( int fd, VIDIOC_G_ENC_INDEX, struct v4l2_enc_idx *argp ) 20 - :name: VIDIOC_G_ENC_INDEX 17 + .. c:macro:: VIDIOC_G_ENC_INDEX 21 18 19 + ``int ioctl(int fd, VIDIOC_G_ENC_INDEX, struct v4l2_enc_idx *argp)`` 22 20 23 21 Arguments 24 22 ========= 25 23 26 24 ``fd`` 27 - File descriptor returned by :ref:`open() <func-open>`. 25 + File descriptor returned by :c:func:`open()`. 28 26 29 27 ``argp`` 30 28 Pointer to struct :c:type:`v4l2_enc_idx`. 31 - 32 29 33 30 Description 34 31 =========== ··· 54 55 Currently this ioctl is only defined for MPEG-2 program streams and 55 56 video elementary streams. 56 57 57 - 58 58 .. tabularcolumns:: |p{3.8cm}|p{5.6cm}|p{8.1cm}| 59 59 60 60 .. c:type:: v4l2_enc_idx ··· 79 81 - Meta data about a compressed video stream. Each element of the 80 82 array corresponds to one picture, sorted in ascending order by 81 83 their ``offset``. 82 - 83 84 84 85 85 86 .. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| ··· 113 116 - Reserved for future extensions. Drivers must set the array to 114 117 zero. 115 118 116 - 117 119 .. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}| 118 120 119 121 .. _enc-idx-flags: ··· 135 139 - 0x0F 136 140 - *AND* the flags field with this mask to obtain the picture coding 137 141 type. 138 - 139 142 140 143 Return Value 141 144 ============
+8 -13
Documentation/userspace-api/media/v4l/vidioc-g-ext-ctrls.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _VIDIOC_G_EXT_CTRLS: 4 5 ··· 12 11 13 12 VIDIOC_G_EXT_CTRLS - VIDIOC_S_EXT_CTRLS - VIDIOC_TRY_EXT_CTRLS - Get or set the value of several controls, try control values 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 19 - .. c:function:: int ioctl( int fd, VIDIOC_G_EXT_CTRLS, struct v4l2_ext_controls *argp ) 20 - :name: VIDIOC_G_EXT_CTRLS 17 + .. c:macro:: VIDIOC_G_EXT_CTRLS 21 18 19 + ``int ioctl(int fd, VIDIOC_G_EXT_CTRLS, struct v4l2_ext_controls *argp)`` 22 20 23 - .. c:function:: int ioctl( int fd, VIDIOC_S_EXT_CTRLS, struct v4l2_ext_controls *argp ) 24 - :name: VIDIOC_S_EXT_CTRLS 21 + .. c:macro:: VIDIOC_S_EXT_CTRLS 25 22 23 + ``int ioctl(int fd, VIDIOC_S_EXT_CTRLS, struct v4l2_ext_controls *argp)`` 26 24 27 - .. c:function:: int ioctl( int fd, VIDIOC_TRY_EXT_CTRLS, struct v4l2_ext_controls *argp ) 28 - :name: VIDIOC_TRY_EXT_CTRLS 25 + .. c:macro:: VIDIOC_TRY_EXT_CTRLS 29 26 27 + ``int ioctl(int fd, VIDIOC_TRY_EXT_CTRLS, struct v4l2_ext_controls *argp)`` 30 28 31 29 Arguments 32 30 ========= 33 31 34 32 ``fd`` 35 - File descriptor returned by :ref:`open() <func-open>`. 33 + File descriptor returned by :c:func:`open()`. 36 34 37 35 ``argp`` 38 36 Pointer to struct :c:type:`v4l2_ext_controls`. 39 - 40 37 41 38 Description 42 39 =========== ··· 118 119 were set/get. Only low-level errors (e. g. a failed i2c command) can 119 120 still cause this situation. 120 121 121 - 122 122 .. tabularcolumns:: |p{1.2cm}|p{3.0cm}|p{1.5cm}|p{11.8cm}| 123 123 124 124 .. c:type:: v4l2_ext_control ··· 192 194 ``V4L2_CTRL_FLAG_HAS_PAYLOAD`` is set for this control. 193 195 * - } 194 196 - 195 - 196 197 197 198 .. tabularcolumns:: |p{4.0cm}|p{2.2cm}|p{2.1cm}|p{8.2cm}| 198 199 ··· 306 309 307 310 Ignored if ``count`` equals zero. 308 311 309 - 310 312 .. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}| 311 313 312 314 .. _ctrl-class: ··· 358 362 - 0xa20000 359 363 - The class containing RF tuner controls. These controls are 360 364 described in :ref:`rf-tuner-controls`. 361 - 362 365 363 366 Return Value 364 367 ============
+7 -11
Documentation/userspace-api/media/v4l/vidioc-g-fbuf.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _VIDIOC_G_FBUF: 4 5 ··· 12 11 13 12 VIDIOC_G_FBUF - VIDIOC_S_FBUF - Get or set frame buffer overlay parameters 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 19 - .. c:function:: int ioctl( int fd, VIDIOC_G_FBUF, struct v4l2_framebuffer *argp ) 20 - :name: VIDIOC_G_FBUF 17 + .. c:macro:: VIDIOC_G_FBUF 21 18 22 - .. c:function:: int ioctl( int fd, VIDIOC_S_FBUF, const struct v4l2_framebuffer *argp ) 23 - :name: VIDIOC_S_FBUF 19 + ``int ioctl(int fd, VIDIOC_G_FBUF, struct v4l2_framebuffer *argp)`` 24 20 21 + .. c:macro:: VIDIOC_S_FBUF 22 + 23 + ``int ioctl(int fd, VIDIOC_S_FBUF, const struct v4l2_framebuffer *argp)`` 25 24 26 25 Arguments 27 26 ========= 28 27 29 28 ``fd`` 30 - File descriptor returned by :ref:`open() <func-open>`. 29 + File descriptor returned by :c:func:`open()`. 31 30 32 31 ``argp`` 33 32 Pointer to struct :c:type:`v4l2_framebuffer`. 34 - 35 33 36 34 Description 37 35 =========== ··· 74 74 jeopardize the system security, its stability or even damage the 75 75 hardware, therefore only the superuser can set the parameters for a 76 76 destructive video overlay. 77 - 78 77 79 78 .. tabularcolumns:: |p{3.5cm}|p{3.5cm}|p{3.5cm}|p{7.0cm}| 80 79 ··· 207 208 - ``priv`` 208 209 - Reserved. Drivers and applications must set this field to zero. 209 210 210 - 211 211 .. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}| 212 212 213 213 .. _framebuffer-cap: ··· 254 256 - The device supports Source Chroma-keying. Video pixels with the 255 257 chroma-key colors are replaced by framebuffer pixels, which is 256 258 exactly opposite of ``V4L2_FBUF_CAP_CHROMAKEY`` 257 - 258 259 259 260 .. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}| 260 261 ··· 328 331 and :ref:`osd`. Both chroma-keying are mutual exclusive to each 329 332 other, so same ``chromakey`` field of struct 330 333 :c:type:`v4l2_window` is being used. 331 - 332 334 333 335 Return Value 334 336 ============
+11 -11
Documentation/userspace-api/media/v4l/vidioc-g-fmt.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _VIDIOC_G_FMT: 4 5 ··· 12 11 13 12 VIDIOC_G_FMT - VIDIOC_S_FMT - VIDIOC_TRY_FMT - Get or set the data format, try a format 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 19 - .. c:function:: int ioctl( int fd, VIDIOC_G_FMT, struct v4l2_format *argp ) 20 - :name: VIDIOC_G_FMT 17 + .. c:macro:: VIDIOC_G_FMT 21 18 22 - .. c:function:: int ioctl( int fd, VIDIOC_S_FMT, struct v4l2_format *argp ) 23 - :name: VIDIOC_S_FMT 19 + ``int ioctl(int fd, VIDIOC_G_FMT, struct v4l2_format *argp)`` 24 20 25 - .. c:function:: int ioctl( int fd, VIDIOC_TRY_FMT, struct v4l2_format *argp ) 26 - :name: VIDIOC_TRY_FMT 21 + .. c:macro:: VIDIOC_S_FMT 22 + 23 + ``int ioctl(int fd, VIDIOC_S_FMT, struct v4l2_format *argp)`` 24 + 25 + .. c:macro:: VIDIOC_TRY_FMT 26 + 27 + ``int ioctl(int fd, VIDIOC_TRY_FMT, struct v4l2_format *argp)`` 27 28 28 29 Arguments 29 30 ========= 30 31 31 32 ``fd`` 32 - File descriptor returned by :ref:`open() <func-open>`. 33 + File descriptor returned by :c:func:`open()`. 33 34 34 35 ``argp`` 35 36 Pointer to struct :c:type:`v4l2_format`. 36 - 37 37 38 38 Description 39 39 =========== ··· 87 85 The format as returned by :ref:`VIDIOC_TRY_FMT <VIDIOC_G_FMT>` must be identical to what 88 86 :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` returns for the same input or output. 89 87 90 - 91 88 .. c:type:: v4l2_format 92 89 93 90 .. tabularcolumns:: |p{1.2cm}|p{4.6cm}|p{3.0cm}|p{8.6cm}| ··· 135 134 - Place holder for future extensions. 136 135 * - } 137 136 - 138 - 139 137 140 138 Return Value 141 139 ============
+7 -9
Documentation/userspace-api/media/v4l/vidioc-g-frequency.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _VIDIOC_G_FREQUENCY: 4 5 ··· 12 11 13 12 VIDIOC_G_FREQUENCY - VIDIOC_S_FREQUENCY - Get or set tuner or modulator radio frequency 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 19 - .. c:function:: int ioctl( int fd, VIDIOC_G_FREQUENCY, struct v4l2_frequency *argp ) 20 - :name: VIDIOC_G_FREQUENCY 17 + .. c:macro:: VIDIOC_G_FREQUENCY 21 18 22 - .. c:function:: int ioctl( int fd, VIDIOC_S_FREQUENCY, const struct v4l2_frequency *argp ) 23 - :name: VIDIOC_S_FREQUENCY 19 + ``int ioctl(int fd, VIDIOC_G_FREQUENCY, struct v4l2_frequency *argp)`` 24 20 21 + .. c:macro:: VIDIOC_S_FREQUENCY 22 + 23 + ``int ioctl(int fd, VIDIOC_S_FREQUENCY, const struct v4l2_frequency *argp)`` 25 24 26 25 Arguments 27 26 ========= 28 27 29 28 ``fd`` 30 - File descriptor returned by :ref:`open() <func-open>`. 29 + File descriptor returned by :c:func:`open()`. 31 30 32 31 ``argp`` 33 32 Pointer to struct :c:type:`v4l2_frequency`. 34 - 35 33 36 34 Description 37 35 =========== ··· 50 50 structure. When the requested frequency is not possible the driver 51 51 assumes the closest possible value. However :ref:`VIDIOC_S_FREQUENCY <VIDIOC_G_FREQUENCY>` is a 52 52 write-only ioctl, it does not return the actual new frequency. 53 - 54 53 55 54 .. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| 56 55 ··· 87 88 - ``reserved``\ [8] 88 89 - Reserved for future extensions. Drivers and applications must set 89 90 the array to zero. 90 - 91 91 92 92 Return Value 93 93 ============
+7 -8
Documentation/userspace-api/media/v4l/vidioc-g-input.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _VIDIOC_G_INPUT: 4 5 ··· 12 11 13 12 VIDIOC_G_INPUT - VIDIOC_S_INPUT - Query or select the current video input 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 19 - .. c:function:: int ioctl( int fd, VIDIOC_G_INPUT, int *argp ) 20 - :name: VIDIOC_G_INPUT 17 + .. c:macro:: VIDIOC_G_INPUT 21 18 22 - .. c:function:: int ioctl( int fd, VIDIOC_S_INPUT, int *argp ) 23 - :name: VIDIOC_S_INPUT 19 + ``int ioctl(int fd, VIDIOC_G_INPUT, int *argp)`` 24 20 21 + .. c:macro:: VIDIOC_S_INPUT 22 + 23 + ``int ioctl(int fd, VIDIOC_S_INPUT, int *argp)`` 25 24 26 25 Arguments 27 26 ========= 28 27 29 28 ``fd`` 30 - File descriptor returned by :ref:`open() <func-open>`. 29 + File descriptor returned by :c:func:`open()`. 31 30 32 31 ``argp`` 33 32 Pointer an integer with input index. 34 - 35 33 36 34 Description 37 35 =========== ··· 51 51 52 52 Information about video inputs is available using the 53 53 :ref:`VIDIOC_ENUMINPUT` ioctl. 54 - 55 54 56 55 Return Value 57 56 ============
+7 -10
Documentation/userspace-api/media/v4l/vidioc-g-jpegcomp.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _VIDIOC_G_JPEGCOMP: 4 5 ··· 12 11 13 12 VIDIOC_G_JPEGCOMP - VIDIOC_S_JPEGCOMP 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 19 - .. c:function:: int ioctl( int fd, VIDIOC_G_JPEGCOMP, v4l2_jpegcompression *argp ) 20 - :name: VIDIOC_G_JPEGCOMP 17 + .. c:macro:: VIDIOC_G_JPEGCOMP 21 18 22 - .. c:function:: int ioctl( int fd, VIDIOC_S_JPEGCOMP, const v4l2_jpegcompression *argp ) 23 - :name: VIDIOC_S_JPEGCOMP 19 + ``int ioctl(int fd, VIDIOC_G_JPEGCOMP, v4l2_jpegcompression *argp)`` 24 20 21 + .. c:macro:: VIDIOC_S_JPEGCOMP 22 + 23 + ``int ioctl(int fd, VIDIOC_S_JPEGCOMP, const v4l2_jpegcompression *argp)`` 25 24 26 25 Arguments 27 26 ========= 28 27 29 28 ``fd`` 30 - File descriptor returned by :ref:`open() <func-open>`. 29 + File descriptor returned by :c:func:`open()`. 31 30 32 31 ``argp`` 33 32 Pointer to struct :c:type:`v4l2_jpegcompression`. 34 - 35 33 36 34 Description 37 35 =========== ··· 53 53 stored in the JPEG-encoded fields. These define how the JPEG field is 54 54 encoded. If you omit them, applications assume you've used standard 55 55 encoding. You usually do want to add them. 56 - 57 56 58 57 .. tabularcolumns:: |p{1.2cm}|p{3.0cm}|p{13.3cm}| 59 58 ··· 91 92 control is exposed by a driver applications should use it instead 92 93 and ignore this field. 93 94 94 - 95 95 .. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}| 96 96 97 97 .. _jpeg-markers: ··· 115 117 * - ``V4L2_JPEG_MARKER_APP`` 116 118 - (1<<7) 117 119 - App segment, driver will always use APP0 118 - 119 120 120 121 Return Value 121 122 ============
+7 -10
Documentation/userspace-api/media/v4l/vidioc-g-modulator.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _VIDIOC_G_MODULATOR: 4 5 ··· 12 11 13 12 VIDIOC_G_MODULATOR - VIDIOC_S_MODULATOR - Get or set modulator attributes 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 19 - .. c:function:: int ioctl( int fd, VIDIOC_G_MODULATOR, struct v4l2_modulator *argp ) 20 - :name: VIDIOC_G_MODULATOR 17 + .. c:macro:: VIDIOC_G_MODULATOR 21 18 22 - .. c:function:: int ioctl( int fd, VIDIOC_S_MODULATOR, const struct v4l2_modulator *argp ) 23 - :name: VIDIOC_S_MODULATOR 19 + ``int ioctl(int fd, VIDIOC_G_MODULATOR, struct v4l2_modulator *argp)`` 24 20 21 + .. c:macro:: VIDIOC_S_MODULATOR 22 + 23 + ``int ioctl(int fd, VIDIOC_S_MODULATOR, const struct v4l2_modulator *argp)`` 25 24 26 25 Arguments 27 26 ========= 28 27 29 28 ``fd`` 30 - File descriptor returned by :ref:`open() <func-open>`. 29 + File descriptor returned by :c:func:`open()`. 31 30 32 31 ``argp`` 33 32 Pointer to struct :c:type:`v4l2_modulator`. 34 - 35 33 36 34 Description 37 35 =========== ··· 59 59 60 60 To change the radio frequency the 61 61 :ref:`VIDIOC_S_FREQUENCY <VIDIOC_G_FREQUENCY>` ioctl is available. 62 - 63 62 64 63 .. tabularcolumns:: |p{2.9cm}|p{2.9cm}|p{5.8cm}|p{2.9cm}|p{3.0cm}| 65 64 ··· 120 121 Drivers and applications must set the array to zero. 121 122 122 123 123 - 124 124 .. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}| 125 125 126 126 .. _modulator-txsubchans: ··· 179 181 * - ``V4L2_TUNER_SUB_RDS`` 180 182 - 0x0010 181 183 - Enable the RDS encoder for a radio FM transmitter. 182 - 183 184 184 185 Return Value 185 186 ============
+7 -8
Documentation/userspace-api/media/v4l/vidioc-g-output.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _VIDIOC_G_OUTPUT: 4 5 ··· 12 11 13 12 VIDIOC_G_OUTPUT - VIDIOC_S_OUTPUT - Query or select the current video output 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 19 - .. c:function:: int ioctl( int fd, VIDIOC_G_OUTPUT, int *argp ) 20 - :name: VIDIOC_G_OUTPUT 17 + .. c:macro:: VIDIOC_G_OUTPUT 21 18 22 - .. c:function:: int ioctl( int fd, VIDIOC_S_OUTPUT, int *argp ) 23 - :name: VIDIOC_S_OUTPUT 19 + ``int ioctl(int fd, VIDIOC_G_OUTPUT, int *argp)`` 24 20 21 + .. c:macro:: VIDIOC_S_OUTPUT 22 + 23 + ``int ioctl(int fd, VIDIOC_S_OUTPUT, int *argp)`` 25 24 26 25 Arguments 27 26 ========= 28 27 29 28 ``fd`` 30 - File descriptor returned by :ref:`open() <func-open>`. 29 + File descriptor returned by :c:func:`open()`. 31 30 32 31 ``argp`` 33 32 Pointer to an integer with output index. 34 - 35 33 36 34 Description 37 35 =========== ··· 52 52 53 53 Information about video outputs is available using the 54 54 :ref:`VIDIOC_ENUMOUTPUT` ioctl. 55 - 56 55 57 56 Return Value 58 57 ============
+12 -18
Documentation/userspace-api/media/v4l/vidioc-g-parm.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _VIDIOC_G_PARM: 4 5 ··· 12 11 13 12 VIDIOC_G_PARM - VIDIOC_S_PARM - Get or set streaming parameters 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 19 - .. c:function:: int ioctl( int fd, VIDIOC_G_PARM, v4l2_streamparm *argp ) 20 - :name: VIDIOC_G_PARM 17 + .. c:macro:: VIDIOC_G_PARM 21 18 22 - .. c:function:: int ioctl( int fd, VIDIOC_S_PARM, v4l2_streamparm *argp ) 23 - :name: VIDIOC_S_PARM 19 + ``int ioctl(int fd, VIDIOC_G_PARM, v4l2_streamparm *argp)`` 24 20 21 + .. c:macro:: VIDIOC_S_PARM 22 + 23 + ``int ioctl(int fd, VIDIOC_S_PARM, v4l2_streamparm *argp)`` 25 24 26 25 Arguments 27 26 ========= 28 27 29 28 ``fd`` 30 - File descriptor returned by :ref:`open() <func-open>`. 29 + File descriptor returned by :c:func:`open()`. 31 30 32 31 ``argp`` 33 32 Pointer to struct :c:type:`v4l2_streamparm`. 34 - 35 33 36 34 Description 37 35 =========== ··· 48 48 49 49 Further these ioctls can be used to determine the number of buffers used 50 50 internally by a driver in read/write mode. For implications see the 51 - section discussing the :ref:`read() <func-read>` function. 51 + section discussing the :c:func:`read()` function. 52 52 53 53 To get and set the streaming parameters applications call the 54 54 :ref:`VIDIOC_G_PARM <VIDIOC_G_PARM>` and 55 55 :ref:`VIDIOC_S_PARM <VIDIOC_G_PARM>` ioctl, respectively. They take a 56 56 pointer to a struct :c:type:`v4l2_streamparm` which contains a 57 57 union holding separate parameters for input and output devices. 58 - 59 58 60 59 .. tabularcolumns:: |p{3.5cm}|p{3.5cm}|p{3.5cm}|p{7.0cm}| 61 60 ··· 86 87 - A place holder for future extensions. 87 88 * - } 88 89 - 89 - 90 90 91 91 92 92 .. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| ··· 136 138 * - __u32 137 139 - ``readbuffers`` 138 140 - Applications set this field to the desired number of buffers used 139 - internally by the driver in :ref:`read() <func-read>` mode. 141 + internally by the driver in :c:func:`read()` mode. 140 142 Drivers return the actual number of buffers. When an application 141 143 requests zero buffers, drivers should just return the current 142 144 setting rather than the minimum or an error code. For details see ··· 145 147 - ``reserved``\ [4] 146 148 - Reserved for future extensions. Drivers and applications must set 147 149 the array to zero. 148 - 149 150 150 151 151 152 .. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| ··· 169 172 * - :cspan:`2` 170 173 171 174 The field is intended to repeat frames on the driver side in 172 - :ref:`write() <func-write>` mode (in streaming mode timestamps 175 + :c:func:`write()` mode (in streaming mode timestamps 173 176 can be used to throttle the output), saving I/O bandwidth. 174 177 175 178 For stateful encoders (see :ref:`encoder`) this represents the ··· 196 199 * - __u32 197 200 - ``writebuffers`` 198 201 - Applications set this field to the desired number of buffers used 199 - internally by the driver in :ref:`write() <func-write>` mode. Drivers 202 + internally by the driver in :c:func:`write()` mode. Drivers 200 203 return the actual number of buffers. When an application requests 201 204 zero buffers, drivers should just return the current setting 202 205 rather than the minimum or an error code. For details see ··· 205 208 - ``reserved``\ [4] 206 209 - Reserved for future extensions. Drivers and applications must set 207 210 the array to zero. 208 - 209 211 210 212 211 213 .. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}| ··· 220 224 - 0x1000 221 225 - The frame period can be modified by setting the ``timeperframe`` 222 226 field. 223 - 224 227 225 228 226 229 .. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}| ··· 260 265 261 266 - Moving objects in the image might have excessive motion blur. 262 267 263 - - Capture might only work through the :ref:`read() <func-read>` call. 264 - 268 + - Capture might only work through the :c:func:`read()` call. 265 269 266 270 Return Value 267 271 ============
+7 -9
Documentation/userspace-api/media/v4l/vidioc-g-priority.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _VIDIOC_G_PRIORITY: 4 5 ··· 12 11 13 12 VIDIOC_G_PRIORITY - VIDIOC_S_PRIORITY - Query or request the access priority associated with a file descriptor 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 19 - .. c:function:: int ioctl( int fd, VIDIOC_G_PRIORITY, enum v4l2_priority *argp ) 20 - :name: VIDIOC_G_PRIORITY 17 + .. c:macro:: VIDIOC_G_PRIORITY 21 18 22 - .. c:function:: int ioctl( int fd, VIDIOC_S_PRIORITY, const enum v4l2_priority *argp ) 23 - :name: VIDIOC_S_PRIORITY 19 + ``int ioctl(int fd, VIDIOC_G_PRIORITY, enum v4l2_priority *argp)`` 24 20 21 + .. c:macro:: VIDIOC_S_PRIORITY 22 + 23 + ``int ioctl(int fd, VIDIOC_S_PRIORITY, const enum v4l2_priority *argp)`` 25 24 26 25 Arguments 27 26 ========= 28 27 29 28 ``fd`` 30 - File descriptor returned by :ref:`open() <func-open>`. 29 + File descriptor returned by :c:func:`open()`. 31 30 32 31 ``argp`` 33 32 Pointer to an enum :c:type:`v4l2_priority` type. 34 - 35 33 36 34 Description 37 35 =========== ··· 42 42 To request an access priority applications store the desired priority in 43 43 an enum v4l2_priority variable and call :ref:`VIDIOC_S_PRIORITY <VIDIOC_G_PRIORITY>` ioctl 44 44 with a pointer to this variable. 45 - 46 45 47 46 .. c:type:: v4l2_priority 48 47 ··· 76 77 - Highest priority. Only one file descriptor can have this priority, 77 78 it blocks any other fd from changing device properties. Usually 78 79 applications which must not be interrupted, like video recording. 79 - 80 80 81 81 Return Value 82 82 ============
+6 -9
Documentation/userspace-api/media/v4l/vidioc-g-selection.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _VIDIOC_G_SELECTION: 4 5 ··· 12 11 13 12 VIDIOC_G_SELECTION - VIDIOC_S_SELECTION - Get or set one of the selection rectangles 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 19 - .. c:function:: int ioctl( int fd, VIDIOC_G_SELECTION, struct v4l2_selection *argp ) 20 - :name: VIDIOC_G_SELECTION 17 + .. c:macro:: VIDIOC_G_SELECTION 21 18 19 + ``int ioctl(int fd, VIDIOC_G_SELECTION, struct v4l2_selection *argp)`` 22 20 23 - .. c:function:: int ioctl( int fd, VIDIOC_S_SELECTION, struct v4l2_selection *argp ) 24 - :name: VIDIOC_S_SELECTION 21 + .. c:macro:: VIDIOC_S_SELECTION 25 22 23 + ``int ioctl(int fd, VIDIOC_S_SELECTION, struct v4l2_selection *argp)`` 26 24 27 25 Arguments 28 26 ========= 29 27 30 28 ``fd`` 31 - File descriptor returned by :ref:`open() <func-open>`. 29 + File descriptor returned by :c:func:`open()`. 32 30 33 31 ``argp`` 34 32 Pointer to struct :c:type:`v4l2_selection`. ··· 115 115 Selection targets and flags are documented in 116 116 :ref:`v4l2-selections-common`. 117 117 118 - 119 118 .. _sel-const-adjust: 120 119 121 120 .. kernel-figure:: constraints.svg ··· 124 125 Size adjustments with constraint flags. 125 126 126 127 Behaviour of rectangle adjustment for different constraint flags. 127 - 128 128 129 129 130 130 ··· 165 167 ``_MPLANE`` at the end). 166 168 167 169 Starting with kernel 4.13 both variations are allowed. 168 - 169 170 170 171 Return Value 171 172 ============
+4 -8
Documentation/userspace-api/media/v4l/vidioc-g-sliced-vbi-cap.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _VIDIOC_G_SLICED_VBI_CAP: 4 5 ··· 12 11 13 12 VIDIOC_G_SLICED_VBI_CAP - Query sliced VBI capabilities 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 19 - .. c:function:: int ioctl( int fd, VIDIOC_G_SLICED_VBI_CAP, struct v4l2_sliced_vbi_cap *argp ) 20 - :name: VIDIOC_G_SLICED_VBI_CAP 17 + .. c:macro:: VIDIOC_G_SLICED_VBI_CAP 21 18 19 + ``int ioctl(int fd, VIDIOC_G_SLICED_VBI_CAP, struct v4l2_sliced_vbi_cap *argp)`` 22 20 23 21 Arguments 24 22 ========= 25 23 26 24 ``fd`` 27 - File descriptor returned by :ref:`open() <func-open>`. 25 + File descriptor returned by :c:func:`open()`. 28 26 29 27 ``argp`` 30 28 Pointer to struct :c:type:`v4l2_sliced_vbi_cap`. 31 - 32 29 33 30 Description 34 31 =========== ··· 42 43 43 44 The ``type`` field was added, and the ioctl changed from read-only 44 45 to write-read, in Linux 2.6.19. 45 - 46 46 47 47 .. c:type:: v4l2_sliced_vbi_cap 48 48 ··· 118 120 119 121 See also :ref:`vbi-525` and :ref:`vbi-625`. 120 122 121 - 122 123 .. raw:: latex 123 124 124 125 \scriptsize ··· 179 182 .. raw:: latex 180 183 181 184 \normalsize 182 - 183 185 184 186 Return Value 185 187 ============
+13 -11
Documentation/userspace-api/media/v4l/vidioc-g-std.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _VIDIOC_G_STD: 4 5 ··· 12 11 13 12 VIDIOC_G_STD - VIDIOC_S_STD - VIDIOC_SUBDEV_G_STD - VIDIOC_SUBDEV_S_STD - Query or select the video standard of the current input 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 19 - .. c:function:: int ioctl( int fd, VIDIOC_G_STD, v4l2_std_id *argp ) 20 - :name: VIDIOC_G_STD 17 + .. c:macro:: VIDIOC_G_STD 21 18 22 - .. c:function:: int ioctl( int fd, VIDIOC_S_STD, const v4l2_std_id *argp ) 23 - :name: VIDIOC_S_STD 19 + ``int ioctl(int fd, VIDIOC_G_STD, v4l2_std_id *argp)`` 24 20 25 - .. c:function:: int ioctl( int fd, VIDIOC_SUBDEV_G_STD, v4l2_std_id *argp ) 26 - :name: VIDIOC_SUBDEV_G_STD 21 + .. c:macro:: VIDIOC_S_STD 27 22 28 - .. c:function:: int ioctl( int fd, VIDIOC_SUBDEV_S_STD, const v4l2_std_id *argp ) 29 - :name: VIDIOC_SUBDEV_S_STD 23 + ``int ioctl(int fd, VIDIOC_S_STD, const v4l2_std_id *argp)`` 30 24 25 + .. c:macro:: VIDIOC_SUBDEV_G_STD 26 + 27 + ``int ioctl(int fd, VIDIOC_SUBDEV_G_STD, v4l2_std_id *argp)`` 28 + 29 + .. c:macro:: VIDIOC_SUBDEV_S_STD 30 + 31 + ``int ioctl(int fd, VIDIOC_SUBDEV_S_STD, const v4l2_std_id *argp)`` 31 32 32 33 Arguments 33 34 ========= 34 35 35 36 ``fd`` 36 - File descriptor returned by :ref:`open() <func-open>`. 37 + File descriptor returned by :c:func:`open()`. 37 38 38 39 ``argp`` 39 40 Pointer to :c:type:`v4l2_std_id`. 40 - 41 41 42 42 Description 43 43 ===========
+7 -12
Documentation/userspace-api/media/v4l/vidioc-g-tuner.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _VIDIOC_G_TUNER: 4 5 ··· 12 11 13 12 VIDIOC_G_TUNER - VIDIOC_S_TUNER - Get or set tuner attributes 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 19 - .. c:function:: int ioctl( int fd, VIDIOC_G_TUNER, struct v4l2_tuner *argp ) 20 - :name: VIDIOC_G_TUNER 17 + .. c:macro:: VIDIOC_G_TUNER 21 18 22 - .. c:function:: int ioctl( int fd, VIDIOC_S_TUNER, const struct v4l2_tuner *argp ) 23 - :name: VIDIOC_S_TUNER 19 + ``int ioctl(int fd, VIDIOC_G_TUNER, struct v4l2_tuner *argp)`` 24 20 21 + .. c:macro:: VIDIOC_S_TUNER 22 + 23 + ``int ioctl(int fd, VIDIOC_S_TUNER, const struct v4l2_tuner *argp)`` 25 24 26 25 Arguments 27 26 ========= 28 27 29 28 ``fd`` 30 - File descriptor returned by :ref:`open() <func-open>`. 29 + File descriptor returned by :c:func:`open()`. 31 30 32 31 ``argp`` 33 32 Pointer to struct :c:type:`v4l2_tuner`. 34 - 35 33 36 34 Description 37 35 =========== ··· 58 58 59 59 To change the radio frequency the 60 60 :ref:`VIDIOC_S_FREQUENCY <VIDIOC_G_FREQUENCY>` ioctl is available. 61 - 62 61 63 62 .. tabularcolumns:: |p{1.3cm}|p{3.0cm}|p{6.6cm}|p{6.6cm}| 64 63 ··· 182 183 Drivers and applications must set the array to zero. 183 184 184 185 185 - 186 186 .. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}| 187 187 188 188 .. c:type:: v4l2_tuner_type ··· 204 206 * - ``V4L2_TUNER_RF`` 205 207 - 5 206 208 - Tuner controls the RF part of a Software Digital Radio (SDR) 207 - 208 209 209 210 .. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}| 210 211 ··· 296 299 instead of 62.5 kHz. 297 300 298 301 299 - 300 302 .. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}| 301 303 302 304 .. _tuner-rxsubchans: ··· 332 336 * - ``V4L2_TUNER_SUB_RDS`` 333 337 - 0x0010 334 338 - The tuner receives an RDS channel. 335 - 336 339 337 340 338 341 .. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}|
+4 -6
Documentation/userspace-api/media/v4l/vidioc-log-status.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _VIDIOC_LOG_STATUS: 4 5 ··· 12 11 13 12 VIDIOC_LOG_STATUS - Log driver status information 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 19 - .. c:function:: int ioctl( int fd, VIDIOC_LOG_STATUS) 20 - :name: VIDIOC_LOG_STATUS 17 + .. c:macro:: VIDIOC_LOG_STATUS 21 18 19 + ``int ioctl(int fd, VIDIOC_LOG_STATUS)`` 22 20 23 21 Arguments 24 22 ========= 25 23 26 24 ``fd`` 27 - File descriptor returned by :ref:`open() <func-open>`. 28 - 25 + File descriptor returned by :c:func:`open()`. 29 26 30 27 Description 31 28 =========== ··· 38 39 39 40 This ioctl is optional and not all drivers support it. It was introduced 40 41 in Linux 2.6.15. 41 - 42 42 43 43 Return Value 44 44 ============
+4 -6
Documentation/userspace-api/media/v4l/vidioc-overlay.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _VIDIOC_OVERLAY: 4 5 ··· 12 11 13 12 VIDIOC_OVERLAY - Start or stop video overlay 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 19 - .. c:function:: int ioctl( int fd, VIDIOC_OVERLAY, const int *argp ) 20 - :name: VIDIOC_OVERLAY 17 + .. c:macro:: VIDIOC_OVERLAY 21 18 19 + ``int ioctl(int fd, VIDIOC_OVERLAY, const int *argp)`` 22 20 23 21 Arguments 24 22 ========= 25 23 26 24 ``fd`` 27 - File descriptor returned by :ref:`open() <func-open>`. 25 + File descriptor returned by :c:func:`open()`. 28 26 29 27 ``argp`` 30 28 Pointer to an integer. 31 - 32 29 33 30 Description 34 31 =========== ··· 39 40 Drivers do not support :ref:`VIDIOC_STREAMON` or 40 41 :ref:`VIDIOC_STREAMOFF <VIDIOC_STREAMON>` with 41 42 ``V4L2_BUF_TYPE_VIDEO_OVERLAY``. 42 - 43 43 44 44 Return Value 45 45 ============
+4 -6
Documentation/userspace-api/media/v4l/vidioc-prepare-buf.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _VIDIOC_PREPARE_BUF: 4 5 ··· 12 11 13 12 VIDIOC_PREPARE_BUF - Prepare a buffer for I/O 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 19 - .. c:function:: int ioctl( int fd, VIDIOC_PREPARE_BUF, struct v4l2_buffer *argp ) 20 - :name: VIDIOC_PREPARE_BUF 17 + .. c:macro:: VIDIOC_PREPARE_BUF 21 18 19 + ``int ioctl(int fd, VIDIOC_PREPARE_BUF, struct v4l2_buffer *argp)`` 22 20 23 21 Arguments 24 22 ========= 25 23 26 24 ``fd`` 27 - File descriptor returned by :ref:`open() <func-open>`. 25 + File descriptor returned by :c:func:`open()`. 28 26 29 27 ``argp`` 30 28 Pointer to struct :c:type:`v4l2_buffer`. 31 - 32 29 33 30 Description 34 31 =========== ··· 39 40 40 41 The struct :c:type:`v4l2_buffer` structure is specified in 41 42 :ref:`buffer`. 42 - 43 43 44 44 Return Value 45 45 ============
+8 -9
Documentation/userspace-api/media/v4l/vidioc-qbuf.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _VIDIOC_QBUF: 4 5 ··· 12 11 13 12 VIDIOC_QBUF - VIDIOC_DQBUF - Exchange a buffer with the driver 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 19 - .. c:function:: int ioctl( int fd, VIDIOC_QBUF, struct v4l2_buffer *argp ) 20 - :name: VIDIOC_QBUF 17 + .. c:macro:: VIDIOC_QBUF 21 18 22 - .. c:function:: int ioctl( int fd, VIDIOC_DQBUF, struct v4l2_buffer *argp ) 23 - :name: VIDIOC_DQBUF 19 + ``int ioctl(int fd, VIDIOC_QBUF, struct v4l2_buffer *argp)`` 24 20 21 + .. c:macro:: VIDIOC_DQBUF 22 + 23 + ``int ioctl(int fd, VIDIOC_DQBUF, struct v4l2_buffer *argp)`` 25 24 26 25 Arguments 27 26 ========= 28 27 29 28 ``fd`` 30 - File descriptor returned by :ref:`open() <func-open>`. 29 + File descriptor returned by :c:func:`open()`. 31 30 32 31 ``argp`` 33 32 Pointer to struct :c:type:`v4l2_buffer`. 34 - 35 33 36 34 Description 37 35 =========== ··· 142 142 143 143 By default ``VIDIOC_DQBUF`` blocks when no buffer is in the outgoing 144 144 queue. When the ``O_NONBLOCK`` flag was given to the 145 - :ref:`open() <func-open>` function, ``VIDIOC_DQBUF`` returns 145 + :c:func:`open()` function, ``VIDIOC_DQBUF`` returns 146 146 immediately with an ``EAGAIN`` error code when no buffer is available. 147 147 148 148 The struct :c:type:`v4l2_buffer` structure is specified in 149 149 :ref:`buffer`. 150 - 151 150 152 151 Return Value 153 152 ============
+7 -8
Documentation/userspace-api/media/v4l/vidioc-query-dv-timings.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _VIDIOC_QUERY_DV_TIMINGS: 4 5 ··· 12 11 13 12 VIDIOC_QUERY_DV_TIMINGS - VIDIOC_SUBDEV_QUERY_DV_TIMINGS - Sense the DV preset received by the current input 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 19 - .. c:function:: int ioctl( int fd, VIDIOC_QUERY_DV_TIMINGS, struct v4l2_dv_timings *argp ) 20 - :name: VIDIOC_QUERY_DV_TIMINGS 17 + .. c:macro:: VIDIOC_QUERY_DV_TIMINGS 21 18 22 - .. c:function:: int ioctl( int fd, VIDIOC_SUBDEV_QUERY_DV_TIMINGS, struct v4l2_dv_timings *argp ) 23 - :name: VIDIOC_SUBDEV_QUERY_DV_TIMINGS 19 + ``int ioctl(int fd, VIDIOC_QUERY_DV_TIMINGS, struct v4l2_dv_timings *argp)`` 24 20 21 + .. c:macro:: VIDIOC_SUBDEV_QUERY_DV_TIMINGS 22 + 23 + ``int ioctl(int fd, VIDIOC_SUBDEV_QUERY_DV_TIMINGS, struct v4l2_dv_timings *argp)`` 25 24 26 25 Arguments 27 26 ========= 28 27 29 28 ``fd`` 30 - File descriptor returned by :ref:`open() <func-open>`. 29 + File descriptor returned by :c:func:`open()`. 31 30 32 31 ``argp`` 33 32 Pointer to struct :c:type:`v4l2_dv_timings`. 34 - 35 33 36 34 Description 37 35 =========== ··· 64 64 :ref:`VIDIOC_DV_TIMINGS_CAP` to compare the 65 65 found timings with the hardware's capabilities in order to give more 66 66 precise feedback to the user. 67 - 68 67 69 68 Return Value 70 69 ============
+4 -6
Documentation/userspace-api/media/v4l/vidioc-querybuf.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _VIDIOC_QUERYBUF: 4 5 ··· 12 11 13 12 VIDIOC_QUERYBUF - Query the status of a buffer 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 19 - .. c:function:: int ioctl( int fd, VIDIOC_QUERYBUF, struct v4l2_buffer *argp ) 20 - :name: VIDIOC_QUERYBUF 17 + .. c:macro:: VIDIOC_QUERYBUF 21 18 19 + ``int ioctl(int fd, VIDIOC_QUERYBUF, struct v4l2_buffer *argp)`` 22 20 23 21 Arguments 24 22 ========= 25 23 26 24 ``fd`` 27 - File descriptor returned by :ref:`open() <func-open>`. 25 + File descriptor returned by :c:func:`open()`. 28 26 29 27 ``argp`` 30 28 Pointer to struct :c:type:`v4l2_buffer`. 31 - 32 29 33 30 Description 34 31 =========== ··· 65 66 66 67 The struct :c:type:`v4l2_buffer` structure is specified in 67 68 :ref:`buffer`. 68 - 69 69 70 70 Return Value 71 71 ============
+6 -10
Documentation/userspace-api/media/v4l/vidioc-querycap.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _VIDIOC_QUERYCAP: 4 5 ··· 12 11 13 12 VIDIOC_QUERYCAP - Query device capabilities 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 19 - .. c:function:: int ioctl( int fd, VIDIOC_QUERYCAP, struct v4l2_capability *argp ) 20 - :name: VIDIOC_QUERYCAP 17 + .. c:macro:: VIDIOC_QUERYCAP 21 18 19 + ``int ioctl(int fd, VIDIOC_QUERYCAP, struct v4l2_capability *argp)`` 22 20 23 21 Arguments 24 22 ========= 25 23 26 24 ``fd`` 27 - File descriptor returned by :ref:`open() <func-open>`. 25 + File descriptor returned by :c:func:`open()`. 28 26 29 27 ``argp`` 30 28 Pointer to struct :c:type:`v4l2_capability`. 31 - 32 29 33 30 Description 34 31 =========== ··· 37 38 pointer to a struct :c:type:`v4l2_capability` which is 38 39 filled by the driver. When the driver is not compatible with this 39 40 specification the ioctl returns an ``EINVAL`` error code. 40 - 41 41 42 42 .. tabularcolumns:: |p{1.5cm}|p{2.5cm}|p{13cm}| 43 43 ··· 128 130 - ``reserved``\ [3] 129 131 - Reserved for future extensions. Drivers must set this array to 130 132 zero. 131 - 132 133 133 134 134 135 .. tabularcolumns:: |p{6.1cm}|p{2.2cm}|p{8.7cm}| ··· 240 243 - The device supports the :ref:`metadata` capture interface. 241 244 * - ``V4L2_CAP_READWRITE`` 242 245 - 0x01000000 243 - - The device supports the :ref:`read() <rw>` and/or 244 - :ref:`write() <rw>` I/O methods. 246 + - The device supports the :c:func:`read()` and/or 247 + :c:func:`write()` I/O methods. 245 248 * - ``V4L2_CAP_ASYNCIO`` 246 249 - 0x02000000 247 250 - The device supports the :ref:`asynchronous <async>` I/O methods. ··· 265 268 - The driver fills the ``device_caps`` field. This capability can 266 269 only appear in the ``capabilities`` field and never in the 267 270 ``device_caps`` field. 268 - 269 271 270 272 Return Value 271 273 ============
+8 -14
Documentation/userspace-api/media/v4l/vidioc-queryctrl.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _VIDIOC_QUERYCTRL: 4 5 ··· 12 11 13 12 VIDIOC_QUERYCTRL - VIDIOC_QUERY_EXT_CTRL - VIDIOC_QUERYMENU - Enumerate controls and menu control items 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 19 - .. c:function:: int ioctl( int fd, int VIDIOC_QUERYCTRL, struct v4l2_queryctrl *argp ) 20 - :name: VIDIOC_QUERYCTRL 17 + ``int ioctl(int fd, int VIDIOC_QUERYCTRL, struct v4l2_queryctrl *argp)`` 21 18 22 - .. c:function:: int ioctl( int fd, VIDIOC_QUERY_EXT_CTRL, struct v4l2_query_ext_ctrl *argp ) 23 - :name: VIDIOC_QUERY_EXT_CTRL 19 + .. c:macro:: VIDIOC_QUERY_EXT_CTRL 24 20 25 - .. c:function:: int ioctl( int fd, VIDIOC_QUERYMENU, struct v4l2_querymenu *argp ) 26 - :name: VIDIOC_QUERYMENU 21 + ``int ioctl(int fd, VIDIOC_QUERY_EXT_CTRL, struct v4l2_query_ext_ctrl *argp)`` 27 22 23 + .. c:macro:: VIDIOC_QUERYMENU 24 + 25 + ``int ioctl(int fd, VIDIOC_QUERYMENU, struct v4l2_querymenu *argp)`` 28 26 29 27 Arguments 30 28 ========= 31 29 32 30 ``fd`` 33 - File descriptor returned by :ref:`open() <func-open>`. 31 + File descriptor returned by :c:func:`open()`. 34 32 35 33 ``argp`` 36 34 Pointer to struct :c:type:`v4l2_queryctrl`, :c:type:`v4l2_query_ext_ctrl` 37 35 or :c:type:`v4l2_querymenu` (depending on the ioctl). 38 - 39 36 40 37 Description 41 38 =========== ··· 93 94 this driver. Also note that the ``minimum`` value is not necessarily 0. 94 95 95 96 See also the examples in :ref:`control`. 96 - 97 97 98 98 .. tabularcolumns:: |p{1.2cm}|p{3.6cm}|p{12.7cm}| 99 99 ··· 170 172 - ``reserved``\ [2] 171 173 - Reserved for future extensions. Drivers must set the array to 172 174 zero. 173 - 174 175 175 176 176 177 .. tabularcolumns:: |p{1.2cm}|p{5.0cm}|p{11.3cm}| ··· 272 275 the array to zero. 273 276 274 277 275 - 276 278 .. tabularcolumns:: |p{1.2cm}|p{1.0cm}|p{1.7cm}|p{13.0cm}| 277 279 278 280 .. _v4l2-querymenu: ··· 305 309 - ``reserved`` 306 310 - Reserved for future extensions. Drivers must set the array to 307 311 zero. 308 - 309 312 310 313 311 314 .. tabularcolumns:: |p{5.8cm}|p{1.4cm}|p{1.0cm}|p{1.4cm}|p{6.9cm}| ··· 576 581 ``V4L2_CTRL_FLAG_GRABBED`` flag when buffers are allocated or 577 582 streaming is in progress since most drivers do not support changing 578 583 the format in that case. 579 - 580 584 581 585 Return Value 582 586 ============
+7 -8
Documentation/userspace-api/media/v4l/vidioc-querystd.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _VIDIOC_QUERYSTD: 4 5 ··· 12 11 13 12 VIDIOC_QUERYSTD - VIDIOC_SUBDEV_QUERYSTD - Sense the video standard received by the current input 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 19 - .. c:function:: int ioctl( int fd, VIDIOC_QUERYSTD, v4l2_std_id *argp ) 20 - :name: VIDIOC_QUERYSTD 17 + .. c:macro:: VIDIOC_QUERYSTD 21 18 22 - .. c:function:: int ioctl( int fd, VIDIOC_SUBDEV_QUERYSTD, v4l2_std_id *argp ) 23 - :name: VIDIOC_SUBDEV_QUERYSTD 19 + ``int ioctl(int fd, VIDIOC_QUERYSTD, v4l2_std_id *argp)`` 24 20 21 + .. c:macro:: VIDIOC_SUBDEV_QUERYSTD 22 + 23 + ``int ioctl(int fd, VIDIOC_SUBDEV_QUERYSTD, v4l2_std_id *argp)`` 25 24 26 25 Arguments 27 26 ========= 28 27 29 28 ``fd`` 30 - File descriptor returned by :ref:`open() <func-open>`. 29 + File descriptor returned by :c:func:`open()`. 31 30 32 31 ``argp`` 33 32 Pointer to :c:type:`v4l2_std_id`. 34 - 35 33 36 34 Description 37 35 =========== ··· 57 57 will have to call :ref:`VIDIOC_QUERYSTD`, and if the detected video 58 58 standard is valid they will have to stop streaming, set the new 59 59 standard, allocate new buffers and start streaming again. 60 - 61 60 62 61 Return Value 63 62 ============
+4 -6
Documentation/userspace-api/media/v4l/vidioc-reqbufs.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _VIDIOC_REQBUFS: 4 5 ··· 12 11 13 12 VIDIOC_REQBUFS - Initiate Memory Mapping, User Pointer I/O or DMA buffer I/O 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 19 - .. c:function:: int ioctl( int fd, VIDIOC_REQBUFS, struct v4l2_requestbuffers *argp ) 20 - :name: VIDIOC_REQBUFS 17 + .. c:macro:: VIDIOC_REQBUFS 21 18 19 + ``int ioctl(int fd, VIDIOC_REQBUFS, struct v4l2_requestbuffers *argp)`` 22 20 23 21 Arguments 24 22 ========= 25 23 26 24 ``fd`` 27 - File descriptor returned by :ref:`open() <func-open>`. 25 + File descriptor returned by :c:func:`open()`. 28 26 29 27 ``argp`` 30 28 Pointer to struct :c:type:`v4l2_requestbuffers`. ··· 68 68 fds are closed. A ``count`` value of zero frees or orphans all buffers, after 69 69 aborting or finishing any DMA in progress, an implicit 70 70 :ref:`VIDIOC_STREAMOFF <VIDIOC_STREAMON>`. 71 - 72 71 73 72 .. c:type:: v4l2_requestbuffers 74 73 ··· 156 157 queue is used for :ref:`memory mapping <mmap>` streaming I/O. See 157 158 :ref:`V4L2_BUF_FLAG_NO_CACHE_INVALIDATE <V4L2-BUF-FLAG-NO-CACHE-INVALIDATE>` and 158 159 :ref:`V4L2_BUF_FLAG_NO_CACHE_CLEAN <V4L2-BUF-FLAG-NO-CACHE-CLEAN>`. 159 - 160 160 161 161 Return Value 162 162 ============
+4 -7
Documentation/userspace-api/media/v4l/vidioc-s-hw-freq-seek.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _VIDIOC_S_HW_FREQ_SEEK: 4 5 ··· 12 11 13 12 VIDIOC_S_HW_FREQ_SEEK - Perform a hardware frequency seek 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 19 - .. c:function:: int ioctl( int fd, VIDIOC_S_HW_FREQ_SEEK, struct v4l2_hw_freq_seek *argp ) 20 - :name: VIDIOC_S_HW_FREQ_SEEK 17 + .. c:macro:: VIDIOC_S_HW_FREQ_SEEK 21 18 19 + ``int ioctl(int fd, VIDIOC_S_HW_FREQ_SEEK, struct v4l2_hw_freq_seek *argp)`` 22 20 23 21 Arguments 24 22 ========= 25 23 26 24 ``fd`` 27 - File descriptor returned by :ref:`open() <func-open>`. 25 + File descriptor returned by :c:func:`open()`. 28 26 29 27 ``argp`` 30 28 Pointer to struct :c:type:`v4l2_hw_freq_seek`. 31 - 32 29 33 30 Description 34 31 =========== ··· 57 58 58 59 If this ioctl is called from a non-blocking filehandle, then ``EAGAIN`` 59 60 error code is returned and no seek takes place. 60 - 61 61 62 62 .. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| 63 63 ··· 113 115 - ``reserved``\ [5] 114 116 - Reserved for future extensions. Applications must set the array to 115 117 zero. 116 - 117 118 118 119 Return Value 119 120 ============
+7 -7
Documentation/userspace-api/media/v4l/vidioc-streamon.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _VIDIOC_STREAMON: 4 5 ··· 12 11 13 12 VIDIOC_STREAMON - VIDIOC_STREAMOFF - Start or stop streaming I/O 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 19 - .. c:function:: int ioctl( int fd, VIDIOC_STREAMON, const int *argp ) 20 - :name: VIDIOC_STREAMON 17 + .. c:macro:: VIDIOC_STREAMON 21 18 22 - .. c:function:: int ioctl( int fd, VIDIOC_STREAMOFF, const int *argp ) 23 - :name: VIDIOC_STREAMOFF 19 + ``int ioctl(int fd, VIDIOC_STREAMON, const int *argp)`` 24 20 21 + .. c:macro:: VIDIOC_STREAMOFF 22 + 23 + ``int ioctl(int fd, VIDIOC_STREAMOFF, const int *argp)`` 25 24 26 25 Arguments 27 26 ========= 28 27 29 28 ``fd`` 30 - File descriptor returned by :ref:`open() <func-open>`. 29 + File descriptor returned by :c:func:`open()`. 31 30 32 31 ``argp`` 33 32 Pointer to an integer. ··· 84 83 or after the ``VIDIOC_STREAMON`` or ``VIDIOC_STREAMOFF`` calls, there is 85 84 no notion of starting or stopping "now". Buffer timestamps can be used 86 85 to synchronize with other events. 87 - 88 86 89 87 Return Value 90 88 ============
+4 -6
Documentation/userspace-api/media/v4l/vidioc-subdev-enum-frame-interval.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _VIDIOC_SUBDEV_ENUM_FRAME_INTERVAL: 4 5 ··· 12 11 13 12 VIDIOC_SUBDEV_ENUM_FRAME_INTERVAL - Enumerate frame intervals 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 19 - .. c:function:: int ioctl( int fd, VIDIOC_SUBDEV_ENUM_FRAME_INTERVAL, struct v4l2_subdev_frame_interval_enum * argp ) 20 - :name: VIDIOC_SUBDEV_ENUM_FRAME_INTERVAL 17 + .. c:macro:: VIDIOC_SUBDEV_ENUM_FRAME_INTERVAL 21 18 19 + ``int ioctl(int fd, VIDIOC_SUBDEV_ENUM_FRAME_INTERVAL, struct v4l2_subdev_frame_interval_enum * argp)`` 22 20 23 21 Arguments 24 22 ========= 25 23 26 24 ``fd`` 27 - File descriptor returned by :ref:`open() <func-open>`. 25 + File descriptor returned by :c:func:`open()`. 28 26 29 27 ``argp`` 30 28 Pointer to struct :c:type:`v4l2_subdev_frame_interval_enum`. 31 - 32 29 33 30 Description 34 31 =========== ··· 95 96 - ``reserved``\ [8] 96 97 - Reserved for future extensions. Applications and drivers must set 97 98 the array to zero. 98 - 99 99 100 100 Return Value 101 101 ============
+4 -7
Documentation/userspace-api/media/v4l/vidioc-subdev-enum-frame-size.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _VIDIOC_SUBDEV_ENUM_FRAME_SIZE: 4 5 ··· 12 11 13 12 VIDIOC_SUBDEV_ENUM_FRAME_SIZE - Enumerate media bus frame sizes 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 19 - .. c:function:: int ioctl( int fd, VIDIOC_SUBDEV_ENUM_FRAME_SIZE, struct v4l2_subdev_frame_size_enum * argp ) 20 - :name: VIDIOC_SUBDEV_ENUM_FRAME_SIZE 17 + .. c:macro:: VIDIOC_SUBDEV_ENUM_FRAME_SIZE 21 18 19 + ``int ioctl(int fd, VIDIOC_SUBDEV_ENUM_FRAME_SIZE, struct v4l2_subdev_frame_size_enum * argp)`` 22 20 23 21 Arguments 24 22 ========= 25 23 26 24 ``fd`` 27 - File descriptor returned by :ref:`open() <func-open>`. 25 + File descriptor returned by :c:func:`open()`. 28 26 29 27 ``argp`` 30 28 Pointer to struct :c:type:`v4l2_subdev_frame_size_enum`. 31 - 32 29 33 30 Description 34 31 =========== ··· 60 61 current values of V4L2 controls. See 61 62 :ref:`VIDIOC_SUBDEV_G_FMT` for more 62 63 information about try formats. 63 - 64 64 65 65 .. c:type:: v4l2_subdev_frame_size_enum 66 66 ··· 100 102 - ``reserved``\ [8] 101 103 - Reserved for future extensions. Applications and drivers must set 102 104 the array to zero. 103 - 104 105 105 106 Return Value 106 107 ============
+4 -6
Documentation/userspace-api/media/v4l/vidioc-subdev-enum-mbus-code.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _VIDIOC_SUBDEV_ENUM_MBUS_CODE: 4 5 ··· 12 11 13 12 VIDIOC_SUBDEV_ENUM_MBUS_CODE - Enumerate media bus formats 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 19 - .. c:function:: int ioctl( int fd, VIDIOC_SUBDEV_ENUM_MBUS_CODE, struct v4l2_subdev_mbus_code_enum * argp ) 20 - :name: VIDIOC_SUBDEV_ENUM_MBUS_CODE 17 + .. c:macro:: VIDIOC_SUBDEV_ENUM_MBUS_CODE 21 18 19 + ``int ioctl(int fd, VIDIOC_SUBDEV_ENUM_MBUS_CODE, struct v4l2_subdev_mbus_code_enum * argp)`` 22 20 23 21 Arguments 24 22 ========= 25 23 26 24 ``fd`` 27 - File descriptor returned by :ref:`open() <func-open>`. 25 + File descriptor returned by :c:func:`open()`. 28 26 29 27 ``argp`` 30 28 Pointer to struct :c:type:`v4l2_subdev_mbus_code_enum`. 31 - 32 29 33 30 Description 34 31 =========== ··· 45 46 other pads of the sub-device, as well as on the current active links. 46 47 See :ref:`VIDIOC_SUBDEV_G_FMT` for more 47 48 information about the try formats. 48 - 49 49 50 50 .. c:type:: v4l2_subdev_mbus_code_enum 51 51
+7 -9
Documentation/userspace-api/media/v4l/vidioc-subdev-g-crop.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _VIDIOC_SUBDEV_G_CROP: 4 5 ··· 12 11 13 12 VIDIOC_SUBDEV_G_CROP - VIDIOC_SUBDEV_S_CROP - Get or set the crop rectangle on a subdev pad 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 19 - .. c:function:: int ioctl( int fd, VIDIOC_SUBDEV_G_CROP, struct v4l2_subdev_crop *argp ) 20 - :name: VIDIOC_SUBDEV_G_CROP 17 + .. c:macro:: VIDIOC_SUBDEV_G_CROP 21 18 22 - .. c:function:: int ioctl( int fd, VIDIOC_SUBDEV_S_CROP, const struct v4l2_subdev_crop *argp ) 23 - :name: VIDIOC_SUBDEV_S_CROP 19 + ``int ioctl(int fd, VIDIOC_SUBDEV_G_CROP, struct v4l2_subdev_crop *argp)`` 24 20 21 + .. c:macro:: VIDIOC_SUBDEV_S_CROP 22 + 23 + ``int ioctl(int fd, VIDIOC_SUBDEV_S_CROP, const struct v4l2_subdev_crop *argp)`` 25 24 26 25 Arguments 27 26 ========= 28 27 29 28 ``fd`` 30 - File descriptor returned by :ref:`open() <func-open>`. 29 + File descriptor returned by :c:func:`open()`. 31 30 32 31 ``argp`` 33 32 Pointer to struct :c:type:`v4l2_subdev_crop`. 34 - 35 33 36 34 Description 37 35 =========== ··· 76 76 modify the rectangle to match what the hardware can provide. The 77 77 modified format should be as close as possible to the original request. 78 78 79 - 80 79 .. c:type:: v4l2_subdev_crop 81 80 82 81 .. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| ··· 99 100 - ``reserved``\ [8] 100 101 - Reserved for future extensions. Applications and drivers must set 101 102 the array to zero. 102 - 103 103 104 104 Return Value 105 105 ============
+7 -10
Documentation/userspace-api/media/v4l/vidioc-subdev-g-fmt.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _VIDIOC_SUBDEV_G_FMT: 4 5 ··· 12 11 13 12 VIDIOC_SUBDEV_G_FMT - VIDIOC_SUBDEV_S_FMT - Get or set the data format on a subdev pad 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 19 - .. c:function:: int ioctl( int fd, VIDIOC_SUBDEV_G_FMT, struct v4l2_subdev_format *argp ) 20 - :name: VIDIOC_SUBDEV_G_FMT 17 + .. c:macro:: VIDIOC_SUBDEV_G_FMT 21 18 22 - .. c:function:: int ioctl( int fd, VIDIOC_SUBDEV_S_FMT, struct v4l2_subdev_format *argp ) 23 - :name: VIDIOC_SUBDEV_S_FMT 19 + ``int ioctl(int fd, VIDIOC_SUBDEV_G_FMT, struct v4l2_subdev_format *argp)`` 24 20 21 + .. c:macro:: VIDIOC_SUBDEV_S_FMT 22 + 23 + ``int ioctl(int fd, VIDIOC_SUBDEV_S_FMT, struct v4l2_subdev_format *argp)`` 25 24 26 25 Arguments 27 26 ========= 28 27 29 28 ``fd`` 30 - File descriptor returned by :ref:`open() <func-open>`. 29 + File descriptor returned by :c:func:`open()`. 31 30 32 31 ``argp`` 33 32 Pointer to struct :c:type:`v4l2_subdev_format`. 34 - 35 33 36 34 Description 37 35 =========== ··· 81 81 format to match what the hardware can provide. The modified format 82 82 should be as close as possible to the original request. 83 83 84 - 85 84 .. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| 86 85 87 86 .. c:type:: v4l2_subdev_format ··· 107 108 the array to zero. 108 109 109 110 110 - 111 111 .. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}| 112 112 113 113 .. _v4l2-subdev-format-whence: ··· 122 124 * - V4L2_SUBDEV_FORMAT_ACTIVE 123 125 - 1 124 126 - Active formats, applied to the hardware. 125 - 126 127 127 128 Return Value 128 129 ============
+7 -9
Documentation/userspace-api/media/v4l/vidioc-subdev-g-frame-interval.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _VIDIOC_SUBDEV_G_FRAME_INTERVAL: 4 5 ··· 12 11 13 12 VIDIOC_SUBDEV_G_FRAME_INTERVAL - VIDIOC_SUBDEV_S_FRAME_INTERVAL - Get or set the frame interval on a subdev pad 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 19 - .. c:function:: int ioctl( int fd, VIDIOC_SUBDEV_G_FRAME_INTERVAL, struct v4l2_subdev_frame_interval *argp ) 20 - :name: VIDIOC_SUBDEV_G_FRAME_INTERVAL 17 + .. c:macro:: VIDIOC_SUBDEV_G_FRAME_INTERVAL 21 18 22 - .. c:function:: int ioctl( int fd, VIDIOC_SUBDEV_S_FRAME_INTERVAL, struct v4l2_subdev_frame_interval *argp ) 23 - :name: VIDIOC_SUBDEV_S_FRAME_INTERVAL 19 + ``int ioctl(int fd, VIDIOC_SUBDEV_G_FRAME_INTERVAL, struct v4l2_subdev_frame_interval *argp)`` 24 20 21 + .. c:macro:: VIDIOC_SUBDEV_S_FRAME_INTERVAL 22 + 23 + ``int ioctl(int fd, VIDIOC_SUBDEV_S_FRAME_INTERVAL, struct v4l2_subdev_frame_interval *argp)`` 25 24 26 25 Arguments 27 26 ========= 28 27 29 28 ``fd`` 30 - File descriptor returned by :ref:`open() <func-open>`. 29 + File descriptor returned by :c:func:`open()`. 31 30 32 31 ``argp`` 33 32 Pointer to struct :c:type:`v4l2_subdev_frame_interval`. 34 - 35 33 36 34 Description 37 35 =========== ··· 74 74 on a single pad only. Their behaviour when supported on multiple pads of 75 75 the same sub-device is not defined. 76 76 77 - 78 77 .. c:type:: v4l2_subdev_frame_interval 79 78 80 79 .. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| ··· 93 94 - ``reserved``\ [9] 94 95 - Reserved for future extensions. Applications and drivers must set 95 96 the array to zero. 96 - 97 97 98 98 Return Value 99 99 ============
+7 -10
Documentation/userspace-api/media/v4l/vidioc-subdev-g-selection.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _VIDIOC_SUBDEV_G_SELECTION: 4 5 ··· 12 11 13 12 VIDIOC_SUBDEV_G_SELECTION - VIDIOC_SUBDEV_S_SELECTION - Get or set selection rectangles on a subdev pad 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 19 - .. c:function:: int ioctl( int fd, VIDIOC_SUBDEV_G_SELECTION, struct v4l2_subdev_selection *argp ) 20 - :name: VIDIOC_SUBDEV_G_SELECTION 17 + .. c:macro:: VIDIOC_SUBDEV_G_SELECTION 21 18 22 - .. c:function:: int ioctl( int fd, VIDIOC_SUBDEV_S_SELECTION, struct v4l2_subdev_selection *argp ) 23 - :name: VIDIOC_SUBDEV_S_SELECTION 19 + ``int ioctl(int fd, VIDIOC_SUBDEV_G_SELECTION, struct v4l2_subdev_selection *argp)`` 24 20 21 + .. c:macro:: VIDIOC_SUBDEV_S_SELECTION 22 + 23 + ``int ioctl(int fd, VIDIOC_SUBDEV_S_SELECTION, struct v4l2_subdev_selection *argp)`` 25 24 26 25 Arguments 27 26 ========= 28 27 29 28 ``fd`` 30 - File descriptor returned by :ref:`open() <func-open>`. 29 + File descriptor returned by :c:func:`open()`. 31 30 32 31 ``argp`` 33 32 Pointer to struct :c:type:`v4l2_subdev_selection`. 34 - 35 33 36 34 Description 37 35 =========== ··· 58 58 targets are the targets which configure the hardware. The BOUNDS target 59 59 will return a rectangle that contain all possible actual rectangles. 60 60 61 - 62 61 Discovering supported features 63 62 ------------------------------ 64 63 ··· 67 68 68 69 Selection targets and flags are documented in 69 70 :ref:`v4l2-selections-common`. 70 - 71 71 72 72 .. c:type:: v4l2_subdev_selection 73 73 ··· 97 99 - ``reserved``\ [8] 98 100 - Reserved for future extensions. Applications and drivers must set 99 101 the array to zero. 100 - 101 102 102 103 Return Value 103 104 ============
+4 -5
Documentation/userspace-api/media/v4l/vidioc-subdev-querycap.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _VIDIOC_SUBDEV_QUERYCAP: 4 5 ··· 12 11 13 12 VIDIOC_SUBDEV_QUERYCAP - Query sub-device capabilities 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 19 - .. c:function:: int ioctl( int fd, VIDIOC_SUBDEV_QUERYCAP, struct v4l2_subdev_capability *argp ) 20 - :name: VIDIOC_SUBDEV_QUERYCAP 17 + .. c:macro:: VIDIOC_SUBDEV_QUERYCAP 21 18 19 + ``int ioctl(int fd, VIDIOC_SUBDEV_QUERYCAP, struct v4l2_subdev_capability *argp)`` 22 20 23 21 Arguments 24 22 ========= 25 23 26 24 ``fd`` 27 - File descriptor returned by :ref:`open() <func-open>`. 25 + File descriptor returned by :c:func:`open()`. 28 26 29 27 ``argp`` 30 28 Pointer to struct :c:type:`v4l2_subdev_capability`. 31 - 32 29 33 30 Description 34 31 ===========
+7 -10
Documentation/userspace-api/media/v4l/vidioc-subscribe-event.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _VIDIOC_SUBSCRIBE_EVENT: 4 5 .. _VIDIOC_UNSUBSCRIBE_EVENT: ··· 13 12 14 13 VIDIOC_SUBSCRIBE_EVENT - VIDIOC_UNSUBSCRIBE_EVENT - Subscribe or unsubscribe event 15 14 16 - 17 15 Synopsis 18 16 ======== 19 17 20 - .. c:function:: int ioctl( int fd, VIDIOC_SUBSCRIBE_EVENT, struct v4l2_event_subscription *argp ) 21 - :name: VIDIOC_SUBSCRIBE_EVENT 18 + .. c:macro:: VIDIOC_SUBSCRIBE_EVENT 22 19 23 - .. c:function:: int ioctl( int fd, VIDIOC_UNSUBSCRIBE_EVENT, struct v4l2_event_subscription *argp ) 24 - :name: VIDIOC_UNSUBSCRIBE_EVENT 20 + ``int ioctl(int fd, VIDIOC_SUBSCRIBE_EVENT, struct v4l2_event_subscription *argp)`` 25 21 22 + .. c:macro:: VIDIOC_UNSUBSCRIBE_EVENT 23 + 24 + ``int ioctl(int fd, VIDIOC_UNSUBSCRIBE_EVENT, struct v4l2_event_subscription *argp)`` 26 25 27 26 Arguments 28 27 ========= 29 28 30 29 ``fd`` 31 - File descriptor returned by :ref:`open() <func-open>`. 30 + File descriptor returned by :c:func:`open()`. 32 31 33 32 ``argp`` 34 33 Pointer to struct :c:type:`v4l2_event_subscription`. 35 - 36 34 37 35 Description 38 36 =========== 39 37 40 38 Subscribe or unsubscribe V4L2 event. Subscribed events are dequeued by 41 39 using the :ref:`VIDIOC_DQEVENT` ioctl. 42 - 43 40 44 41 .. tabularcolumns:: |p{4.6cm}|p{4.4cm}|p{8.7cm}| 45 42 ··· 69 70 - ``reserved``\ [5] 70 71 - Reserved for future extensions. Drivers and applications must set 71 72 the array to zero. 72 - 73 73 74 74 75 75 .. tabularcolumns:: |p{6.8cm}|p{2.2cm}|p{8.5cm}| ··· 104 106 105 107 Think carefully when you set this flag so you won't get into 106 108 situations like that. 107 - 108 109 109 110 Return Value 110 111 ============