Skip to content

Commit 407e84c

Browse files
committed
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>
1 parent 01fae02 commit 407e84c

87 files changed

Lines changed: 559 additions & 922 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎Documentation/userspace-api/media/v4l/buffer.rst‎

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
2+
.. c:namespace:: V4L
23
34
.. _buffer:
45

@@ -33,7 +34,6 @@ mem-to-mem devices is an exception to the rule: the timestamp source
3334
flags are copied from the OUTPUT video buffer to the CAPTURE video
3435
buffer.
3536

36-
3737
Interactions between formats, controls and buffers
3838
==================================================
3939

@@ -152,7 +152,6 @@ based on the queried sizes (for instance by allocating a set of buffers large
152152
enough for all the desired formats and controls, or by allocating separate set
153153
of appropriately sized buffers for each use case).
154154

155-
156155
.. c:type:: v4l2_buffer
157156
158157
struct v4l2_buffer
@@ -257,7 +256,7 @@ struct v4l2_buffer
257256
``V4L2_MEMORY_MMAP`` this is the offset of the buffer from the
258257
start of the device memory. The value is returned by the driver
259258
and apart of serving as parameter to the
260-
:ref:`mmap() <func-mmap>` function not useful for applications.
259+
:c:func:`mmap()` function not useful for applications.
261260
See :ref:`mmap` for details
262261
* - unsigned long
263262
- ``userptr``
@@ -310,7 +309,6 @@ struct v4l2_buffer
310309
given, then ``EINVAL`` will be returned.
311310

312311

313-
314312
.. c:type:: v4l2_plane
315313
316314
struct v4l2_plane
@@ -350,7 +348,7 @@ struct v4l2_plane
350348
- ``mem_offset``
351349
- When the memory type in the containing struct
352350
:c:type:`v4l2_buffer` is ``V4L2_MEMORY_MMAP``, this
353-
is the value that should be passed to :ref:`mmap() <func-mmap>`,
351+
is the value that should be passed to :c:func:`mmap()`,
354352
similar to the ``offset`` field in struct
355353
:c:type:`v4l2_buffer`.
356354
* - unsigned long
@@ -384,7 +382,6 @@ struct v4l2_plane
384382
applications.
385383

386384

387-
388385
.. c:type:: v4l2_buf_type
389386
390387
enum v4l2_buf_type
@@ -448,7 +445,6 @@ enum v4l2_buf_type
448445
- Buffer for metadata output, see :ref:`metadata`.
449446

450447

451-
452448
.. _buffer-flags:
453449

454450
Buffer Flags
@@ -720,7 +716,6 @@ enum v4l2_memory
720716
- The buffer is used for :ref:`DMA shared buffer <dmabuf>` I/O.
721717

722718

723-
724719
Timecodes
725720
=========
726721

@@ -729,7 +724,6 @@ The :c:type:`v4l2_buffer_timecode` structure is designed to hold a
729724
(struct :c:type:`timeval` timestamps are stored in the struct
730725
:c:type:`v4l2_buffer` ``timestamp`` field.)
731726

732-
733727
.. c:type:: v4l2_timecode
734728
735729
struct v4l2_timecode
@@ -766,7 +760,6 @@ struct v4l2_timecode
766760
- The "user group" bits from the timecode.
767761

768762

769-
770763
.. _timecode-type:
771764

772765
Timecode Types
@@ -796,7 +789,6 @@ Timecode Types
796789
-
797790

798791

799-
800792
.. _timecode-flags:
801793

802794
Timecode Flags

‎Documentation/userspace-api/media/v4l/dev-capture.rst‎

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
2+
.. c:namespace:: V4L
23
34
.. _capture:
45

@@ -19,7 +20,6 @@ device.
1920

2021
.. note:: The same device file names are used for video output devices.
2122

22-
2323
Querying Capabilities
2424
=====================
2525

@@ -34,7 +34,6 @@ functions they may also support the :ref:`video overlay <overlay>`
3434
streaming I/O methods must be supported. Tuners and audio inputs are
3535
optional.
3636

37-
3837
Supplemental Functions
3938
======================
4039

@@ -45,7 +44,6 @@ Video capture devices shall support :ref:`audio input <audio>`,
4544
:ref:`video input <video>` ioctls must be supported by all video
4645
capture devices.
4746

48-
4947
Image Format Negotiation
5048
========================
5149

@@ -55,7 +53,7 @@ capture, the latter how images are stored in memory, i. e. in RGB or YUV
5553
format, the number of bits per pixel or width and height. Together they
5654
also define how images are scaled in the process.
5755

58-
As usual these parameters are *not* reset at :ref:`open() <func-open>`
56+
As usual these parameters are *not* reset at :c:func:`open()`
5957
time to permit Unix tool chains, programming a device and then reading
6058
from it as if it was a plain file. Well written V4L2 applications ensure
6159
they really get what they want, including cropping and scaling.
@@ -95,7 +93,6 @@ and :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl, even if :ref:`VIDIOC_S_FMT <VIDIOC
9593
requests and always returns default parameters as :ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>` does.
9694
:ref:`VIDIOC_TRY_FMT <VIDIOC_G_FMT>` is optional.
9795

98-
9996
Reading Images
10097
==============
10198

‎Documentation/userspace-api/media/v4l/dev-output.rst‎

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
2+
.. c:namespace:: V4L
23
34
.. _output:
45

@@ -18,7 +19,6 @@ device.
1819

1920
.. note:: The same device file names are used also for video capture devices.
2021

21-
2222
Querying Capabilities
2323
=====================
2424

@@ -32,7 +32,6 @@ functions they may also support the :ref:`raw VBI output <raw-vbi>`
3232
streaming I/O methods must be supported. Modulators and audio outputs
3333
are optional.
3434

35-
3635
Supplemental Functions
3736
======================
3837

@@ -43,7 +42,6 @@ Video output devices shall support :ref:`audio output <audio>`,
4342
:ref:`video output <video>` ioctls must be supported by all video
4443
output devices.
4544

46-
4745
Image Format Negotiation
4846
========================
4947

@@ -53,7 +51,7 @@ the latter how images are stored in memory, i. e. in RGB or YUV format,
5351
the number of bits per pixel or width and height. Together they also
5452
define how images are scaled in the process.
5553

56-
As usual these parameters are *not* reset at :ref:`open() <func-open>`
54+
As usual these parameters are *not* reset at :c:func:`open()`
5755
time to permit Unix tool chains, programming a device and then writing
5856
to it as if it was a plain file. Well written V4L2 applications ensure
5957
they really get what they want, including cropping and scaling.
@@ -92,7 +90,6 @@ and :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl, even if :ref:`VIDIOC_S_FMT <VIDIOC
9290
requests and always returns default parameters as :ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>` does.
9391
:ref:`VIDIOC_TRY_FMT <VIDIOC_G_FMT>` is optional.
9492

95-
9693
Writing Images
9794
==============
9895

‎Documentation/userspace-api/media/v4l/dev-raw-vbi.rst‎

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
2+
.. c:namespace:: V4L
23
34
.. _raw-vbi:
45

@@ -32,7 +33,6 @@ applications must call the :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl.
3233
Accessed as ``/dev/vbi``, raw VBI capturing or output is the default
3334
device function.
3435

35-
3636
Querying Capabilities
3737
=====================
3838

@@ -44,7 +44,6 @@ in the ``capabilities`` field of struct
4444
read/write, streaming or asynchronous I/O methods must be supported. VBI
4545
devices may or may not have a tuner or modulator.
4646

47-
4847
Supplemental Functions
4948
======================
5049

@@ -53,7 +52,6 @@ VBI devices shall support :ref:`video input or output <video>`,
5352
ioctls as needed. The :ref:`video standard <standard>` ioctls provide
5453
information vital to program a VBI device, therefore must be supported.
5554

56-
5755
Raw VBI Format Negotiation
5856
==========================
5957

@@ -62,7 +60,7 @@ frequency. To properly interpret the data V4L2 specifies an ioctl to
6260
query the sampling parameters. Moreover, to allow for some flexibility
6361
applications can also suggest different parameters.
6462

65-
As usual these parameters are *not* reset at :ref:`open() <func-open>`
63+
As usual these parameters are *not* reset at :c:func:`open()`
6664
time to permit Unix tool chains, programming a device and then reading
6765
from it as if it was a plain file. Well written V4L2 applications should
6866
always ensure they really get what they want, requesting reasonable
@@ -91,8 +89,8 @@ happen for instance when the video and VBI areas to capture would
9189
overlap, or when the driver supports multiple opens and another process
9290
already requested VBI capturing or output. Anyway, applications must
9391
expect other resource allocation points which may return ``EBUSY``, at the
94-
:ref:`VIDIOC_STREAMON` ioctl and the first :ref:`read() <func-read>`
95-
, :ref:`write() <func-write>` and :ref:`select() <func-select>` calls.
92+
:ref:`VIDIOC_STREAMON` ioctl and the first :c:func:`read()`
93+
, :c:func:`write()` and :c:func:`select()` calls.
9694

9795
VBI devices must implement both the :ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>` and
9896
:ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl, even if :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ignores all requests
@@ -182,7 +180,6 @@ and always returns default parameters as :ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>` does
182180
- This array is reserved for future extensions. Drivers and
183181
applications must set it to zero.
184182

185-
186183
.. tabularcolumns:: |p{4.4cm}|p{1.5cm}|p{11.6cm}|
187184

188185
.. _vbifmt-flags:
@@ -218,7 +215,6 @@ and always returns default parameters as :ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>` does
218215
non-zero.
219216

220217

221-
222218
.. _vbi-hsync:
223219

224220
.. kernel-figure:: vbi_hsync.svg
@@ -227,7 +223,6 @@ and always returns default parameters as :ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>` does
227223

228224
**Figure 4.1. Line synchronization**
229225

230-
231226
.. _vbi-525:
232227

233228
.. kernel-figure:: vbi_525.svg
@@ -251,7 +246,6 @@ negotiation, or after switching the video standard which may invalidate
251246
the negotiated VBI parameters, should be refused by the driver. A format
252247
change during active I/O is not permitted.
253248

254-
255249
Reading and writing VBI images
256250
==============================
257251

@@ -261,7 +255,6 @@ consisting of two fields of VBI images immediately following in memory.
261255

262256
The total size of a frame computes as follows:
263257

264-
265258
.. code-block:: c
266259
267260
(count[0] + count[1]) * samples_per_line * sample size in bytes
@@ -276,8 +269,8 @@ The latter bears the possibility of synchronizing video and VBI data by
276269
using buffer timestamps.
277270

278271
Remember the :ref:`VIDIOC_STREAMON <VIDIOC_STREAMON>` ioctl and the
279-
first :ref:`read() <func-read>`, :ref:`write() <func-write>` and
280-
:ref:`select() <func-select>` call can be resource allocation
272+
first :c:func:`read()`, :c:func:`write()` and
273+
:c:func:`select()` call can be resource allocation
281274
points returning an ``EBUSY`` error code if the required hardware resources
282275
are temporarily unavailable, for example the device is already in use by
283276
another process.

‎Documentation/userspace-api/media/v4l/dev-rds.rst‎

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
2+
.. c:namespace:: V4L
23
34
.. _rds:
45

@@ -28,7 +29,6 @@ The RDS interface does not support this format. Should support for MMBS
2829
the linux-media mailing list:
2930
`https://linuxtv.org/lists.php <https://linuxtv.org/lists.php>`__.
3031

31-
3232
Querying Capabilities
3333
=====================
3434

@@ -68,31 +68,27 @@ like program identification codes and radio text, the flag
6868
:ref:`Writing RDS data <writing-rds-data>` and
6969
:ref:`FM Transmitter Control Reference <fm-tx-controls>`.
7070

71-
7271
.. _reading-rds-data:
7372

7473
Reading RDS data
7574
================
7675

7776
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
7978
three bytes.
8079

81-
8280
.. _writing-rds-data:
8381

8482
Writing RDS data
8583
================
8684

8785
RDS data can be written to the radio device with the
88-
:ref:`write() <func-write>` function. The data is packed in groups of
86+
:c:func:`write()` function. The data is packed in groups of
8987
three bytes, as follows:
9088

91-
9289
RDS datastructures
9390
==================
9491

95-
9692
.. c:type:: v4l2_rds_data
9793
9894
.. tabularcolumns:: |p{2.5cm}|p{2.5cm}|p{12.5cm}|
@@ -113,7 +109,6 @@ RDS datastructures
113109
- Block description
114110

115111

116-
117112
.. _v4l2-rds-block:
118113

119114
.. tabularcolumns:: |p{2.9cm}|p{14.6cm}|
@@ -136,7 +131,6 @@ RDS datastructures
136131
reception of this block.
137132

138133

139-
140134
.. _v4l2-rds-block-codes:
141135

142136
.. tabularcolumns:: |p{6.4cm}|p{2.0cm}|p{1.2cm}|p{7.9cm}|

0 commit comments

Comments
 (0)