Skip to contentSkip to conversation

First part of documentation fixups

PATCH New Mauro Carvalho Chehab 1 participant 52 messages Jul 4, 2016 Page 1 of 2

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

cover First part of documentation fixups

This patch series handle several fixups related to the DocBook->Sphinx conversion.

They all depend on the patches from:
https://github.com/return42/linux.git linux_tv_migration

I'm putting this series, based on media_tree + docs-next at this tree:
https://git.linuxtv.org//mchehab/experimental.git/log/?h=docs-next

When I finish comparing DocBook and Sphinx versions, I'll be applying it on a separate topic branch at media_tree.

The content is mostly fixups, although I"m also fixing a few random things to improve documentation, when I notice the need. Just editorial changes.

Regards,
Mauro

Mauro Carvalho Chehab (51):
Documentation: linuxt_tv: update the documentation year
Documentation: some fixups at linux_tv/index.rst
Documentation: v4l2.rst: Fix authors and revisions lists
Documentation: querycap.rst: fix troubles on some references
Documentation: linux_tv/index.rst: add xrefs for document divisions
Documentation: app-pri.rst: Fix a bad reference
Documentation: video.rst: use reference for VIDIOC_ENUMINPUT
Documentation: v4l2.rst: numerate the V4L2 chapters
Documentation: video.rst: Restore the captions for the examples
Documentation: audio.rst: Fix some cross references
Documentation: linux_tv: Replace reference names to match ioctls
Documentation: linux_tv: simplify references
Documentation: linux_tv: convert lots of consts to references
Documentation: linux_tv: don't simplify VIDIOC_G_foo references
Documentation: audio.rst: re-add captions for the examples
Documentation: standard.rst: read the example captions
Documentation: linux_tv: remove controls.rst
Documentation: control.rst: read the example captions
Documentation: control.rst: Fix missing reference for example 8
Documentation: extended-controls.rst: use reference for VIDIOC_S_CTRL
Documentation: vidioc-queryctl.rst: change the title of this chapter
Documentation: linux_tv: supress lots of warnings
Documentation: planar-apis.rst: fix some conversion troubles
Documentation: crop.rst: fix conversion on this file
Documentation: selection-api-005.rst: Fix ReST parsing
Documentation: linux_tv: use Example x.y. instead of a single number
Documentation: selection-api-006.rst: add missing captions
Documentation: linux_tv: Error codes should be const
Documentation: linux_tv: use references for structures
Documentation: linux_tv: Fix remaining undefined references
Documentation: pixfmt-007.rst: Fix formula parsing
Documentation: fdl-appendix: Fix formatting issues
Documentation: linux_tv: fix some warnings due to '*'
Documentation: fe_property_parameters.rst: improve descriptions
Documentation: vidioc-g-edid.rst remove a duplicate declaration
Documentation: open.rst: fix some warnings
Documentation: rw.rst fix a warning
Documentation: extended-controls.rst: "count" is a constant
Documentation: pixfmt-004.rst: Add an extra reference
Documentation: linux_tv: remove trailing comments
Documentation: pixfmt-y12i.rst: correct format conversion
Documentation: pixfmt-uyvy.rst: remove an empty column
Documentation: pixfmt-yvyu.rst: remove an empty column
Documentation: pixfmt-vyuy.rst: remove an empty column
Documentation: pixfmt-41p.rst: remove empty columns
Documentation: pixfmt-yuv422m.rst: remove an empty column
Documentation: pixfmt-yuv444m.rst: remove empty columns
Documentation: pixfmt-yuv422p.rst: remove an empty column
Documentation: pixfmt-yuv411p.rst: remove an empty column
Documentation: pixfmt-nv12.rst: remove empty columns
Documentation: pixfmt-nv12m.rst: fix conversion issues

 Documentation/linux_tv/audio.h.rst                 |  11 --
 Documentation/linux_tv/ca.h.rst                    |  11 --
 Documentation/linux_tv/conf.py                     |   2 +-
 Documentation/linux_tv/dmx.h.rst                   |  11 --
 Documentation/linux_tv/frontend.h.rst              |  11 --
 Documentation/linux_tv/index.rst                   |  47 ++-----
 .../media/dvb/FE_DISHNETWORK_SEND_LEGACY_CMD.rst   |  11 +-
 Documentation/linux_tv/media/dvb/FE_GET_EVENT.rst  |  19 +--
 .../linux_tv/media/dvb/FE_GET_FRONTEND.rst         |  17 +--
 Documentation/linux_tv/media/dvb/FE_READ_BER.rst   |  13 +-
 .../linux_tv/media/dvb/FE_READ_SIGNAL_STRENGTH.rst |  13 +-
 Documentation/linux_tv/media/dvb/FE_READ_SNR.rst   |  13 +-
 .../media/dvb/FE_READ_UNCORRECTED_BLOCKS.rst       |  13 +-
 .../linux_tv/media/dvb/FE_SET_FRONTEND.rst         |  21 +--
 Documentation/linux_tv/media/dvb/audio.rst         |  11 --
 .../linux_tv/media/dvb/audio_data_types.rst        |  11 --
 .../linux_tv/media/dvb/audio_function_calls.rst    |  35 ++---
 Documentation/linux_tv/media/dvb/audio_h.rst       |  11 --
 Documentation/linux_tv/media/dvb/ca.rst            |  11 --
 Documentation/linux_tv/media/dvb/ca_data_types.rst |  11 --
 .../linux_tv/media/dvb/ca_function_calls.rst       |  19 +--
 Documentation/linux_tv/media/dvb/ca_h.rst          |  11 --
 Documentation/linux_tv/media/dvb/demux.rst         |  11 --
 Documentation/linux_tv/media/dvb/dmx_fcalls.rst    |  49 +++----
 Documentation/linux_tv/media/dvb/dmx_h.rst         |  11 --
 Documentation/linux_tv/media/dvb/dmx_types.rst     |  11 --
 Documentation/linux_tv/media/dvb/dtv-fe-stats.rst  |  11 --
 .../linux_tv/media/dvb/dtv-properties.rst          |  11 --
 Documentation/linux_tv/media/dvb/dtv-property.rst  |  11 --
 Documentation/linux_tv/media/dvb/dtv-stats.rst     |  11 --
 .../linux_tv/media/dvb/dvb-fe-read-status.rst      |  13 +-
 .../linux_tv/media/dvb/dvb-frontend-event.rst      |  11 --
 .../linux_tv/media/dvb/dvb-frontend-parameters.rst |  11 --
 Documentation/linux_tv/media/dvb/dvbapi.rst        |  15 +-
 .../linux_tv/media/dvb/dvbproperty-006.rst         |   9 --
 Documentation/linux_tv/media/dvb/dvbproperty.rst   |  11 --
 Documentation/linux_tv/media/dvb/examples.rst      |  11 --
 .../linux_tv/media/dvb/fe-bandwidth-t.rst          |  11 --
 .../media/dvb/fe-diseqc-recv-slave-reply.rst       |  13 +-
 .../media/dvb/fe-diseqc-reset-overload.rst         |  11 +-
 .../linux_tv/media/dvb/fe-diseqc-send-burst.rst    |  11 --
 .../media/dvb/fe-diseqc-send-master-cmd.rst        |  13 +-
 .../media/dvb/fe-enable-high-lnb-voltage.rst       |  11 +-
 Documentation/linux_tv/media/dvb/fe-get-info.rst   |  13 +-
 .../linux_tv/media/dvb/fe-get-property.rst         |  11 +-
 .../linux_tv/media/dvb/fe-read-status.rst          |  13 +-
 .../media/dvb/fe-set-frontend-tune-mode.rst        |  11 +-
 Documentation/linux_tv/media/dvb/fe-set-tone.rst   |  11 --
 .../linux_tv/media/dvb/fe-set-voltage.rst          |   9 --
 Documentation/linux_tv/media/dvb/fe-type-t.rst     |   9 --
 .../linux_tv/media/dvb/fe_property_parameters.rst  |  43 +++---
 .../media/dvb/frontend-property-cable-systems.rst  |   9 --
 .../dvb/frontend-property-satellite-systems.rst    |   9 --
 .../dvb/frontend-property-terrestrial-systems.rst  |   9 --
 .../media/dvb/frontend-stat-properties.rst         |  11 +-
 Documentation/linux_tv/media/dvb/frontend.rst      |  11 --
 .../linux_tv/media/dvb/frontend_f_close.rst        |  11 +-
 .../linux_tv/media/dvb/frontend_f_open.rst         |  15 +-
 .../linux_tv/media/dvb/frontend_fcalls.rst         |  11 --
 Documentation/linux_tv/media/dvb/frontend_h.rst    |  11 --
 .../linux_tv/media/dvb/frontend_legacy_api.rst     |  11 --
 .../media/dvb/frontend_legacy_dvbv3_api.rst        |  11 --
 Documentation/linux_tv/media/dvb/intro.rst         |   9 --
 .../linux_tv/media/dvb/intro_files/dvbstb.png      | Bin 22655 -> 22703 bytes
 .../linux_tv/media/dvb/legacy_dvb_apis.rst         |  11 --
 Documentation/linux_tv/media/dvb/net.rst           |  15 +-
 Documentation/linux_tv/media/dvb/net_h.rst         |  11 --
 .../linux_tv/media/dvb/query-dvb-frontend-info.rst |  11 +-
 Documentation/linux_tv/media/dvb/video.rst         |  11 --
 .../linux_tv/media/dvb/video_function_calls.rst    |  69 ++++------
 Documentation/linux_tv/media/dvb/video_h.rst       |  11 --
 Documentation/linux_tv/media/dvb/video_types.rst   |  11 --
 .../media/v4l/Remote_controllers_Intro.rst         |   9 --
 .../media/v4l/Remote_controllers_table_change.rst  |  11 --
 .../media/v4l/Remote_controllers_tables.rst        |  11 --
 Documentation/linux_tv/media/v4l/app-pri.rst       |  21 +--
 Documentation/linux_tv/media/v4l/async.rst         |   9 --
 Documentation/linux_tv/media/v4l/audio.rst         |  37 ++---
 Documentation/linux_tv/media/v4l/biblio.rst        |   9 --
 Documentation/linux_tv/media/v4l/buffer.rst        |  69 ++++------
 .../linux_tv/media/v4l/capture-example.rst         |  11 --
 Documentation/linux_tv/media/v4l/capture.c.rst     |  11 --
 Documentation/linux_tv/media/v4l/colorspaces.rst   |   9 --
 Documentation/linux_tv/media/v4l/common-defs.rst   |  11 --
 Documentation/linux_tv/media/v4l/common.rst        |  14 +-
 Documentation/linux_tv/media/v4l/compat.rst        |  11 --
 Documentation/linux_tv/media/v4l/control.rst       |  29 ++--
 Documentation/linux_tv/media/v4l/controls.rst      |  18 ---
 Documentation/linux_tv/media/v4l/crop.rst          | 130 +++++++++---------
 Documentation/linux_tv/media/v4l/depth-formats.rst |  11 --
 Documentation/linux_tv/media/v4l/dev-capture.rst   |  31 ++---
 Documentation/linux_tv/media/v4l/dev-codec.rst     |  11 +-
 Documentation/linux_tv/media/v4l/dev-effect.rst    |   9 --
 Documentation/linux_tv/media/v4l/dev-event.rst     |  13 +-
 Documentation/linux_tv/media/v4l/dev-osd.rst       |  27 ++--
 Documentation/linux_tv/media/v4l/dev-output.rst    |  29 ++--
 Documentation/linux_tv/media/v4l/dev-overlay.rst   |  63 ++++-----
 Documentation/linux_tv/media/v4l/dev-radio.rst     |  15 +-
 Documentation/linux_tv/media/v4l/dev-raw-vbi.rst   |  37 ++---
 Documentation/linux_tv/media/v4l/dev-rds.rst       |  15 +-
 Documentation/linux_tv/media/v4l/dev-sdr.rst       |  25 ++--
 .../linux_tv/media/v4l/dev-sliced-vbi.rst          |  61 ++++-----
 Documentation/linux_tv/media/v4l/dev-subdev.rst    |  35 ++---
 Documentation/linux_tv/media/v4l/dev-teletext.rst  |  11 +-
 Documentation/linux_tv/media/v4l/devices.rst       |  11 --
 Documentation/linux_tv/media/v4l/diff-v4l.rst      | 113 +++++++--------
 Documentation/linux_tv/media/v4l/dmabuf.rst        |  31 ++---
 Documentation/linux_tv/media/v4l/driver.rst        |   9 --
 Documentation/linux_tv/media/v4l/dv-timings.rst    |  19 +--
 .../linux_tv/media/v4l/extended-controls.rst       |  59 ++++----
 Documentation/linux_tv/media/v4l/fdl-appendix.rst  |  32 ++---
 Documentation/linux_tv/media/v4l/field-order.rst   |  17 +--
 .../media/v4l/field-order_files/fieldseq_tb.gif    | Bin 25323 -> 25339 bytes
 Documentation/linux_tv/media/v4l/format.rst        |  31 ++---
 Documentation/linux_tv/media/v4l/func-close.rst    |  11 +-
 Documentation/linux_tv/media/v4l/func-ioctl.rst    |  11 +-
 Documentation/linux_tv/media/v4l/func-mmap.rst     |  17 +--
 Documentation/linux_tv/media/v4l/func-munmap.rst   |  11 +-
 Documentation/linux_tv/media/v4l/func-open.rst     |  13 +-
 Documentation/linux_tv/media/v4l/func-poll.rst     |  25 ++--
 Documentation/linux_tv/media/v4l/func-read.rst     |  17 +--
 Documentation/linux_tv/media/v4l/func-select.rst   |  21 +--
 Documentation/linux_tv/media/v4l/func-write.rst    |  11 +-
 Documentation/linux_tv/media/v4l/gen-errors.rst    |  29 ++--
 Documentation/linux_tv/media/v4l/hist-v4l2.rst     | 152 ++++++++++-----------
 Documentation/linux_tv/media/v4l/io.rst            |  17 +--
 Documentation/linux_tv/media/v4l/keytable.c.rst    |  11 --
 .../linux_tv/media/v4l/libv4l-introduction.rst     |  43 +++---
 Documentation/linux_tv/media/v4l/libv4l.rst        |  11 --
 .../linux_tv/media/v4l/lirc_dev_intro.rst          |   9 --
 .../linux_tv/media/v4l/lirc_device_interface.rst   |  11 --
 Documentation/linux_tv/media/v4l/lirc_ioctl.rst    |   9 --
 Documentation/linux_tv/media/v4l/lirc_read.rst     |   9 --
 Documentation/linux_tv/media/v4l/lirc_write.rst    |  11 +-
 .../linux_tv/media/v4l/media-controller-intro.rst  |   9 --
 .../linux_tv/media/v4l/media-controller-model.rst  |   9 --
 .../linux_tv/media/v4l/media-controller.rst        |   9 --
 .../linux_tv/media/v4l/media-func-close.rst        |  11 +-
 .../linux_tv/media/v4l/media-func-ioctl.rst        |  11 +-
 .../linux_tv/media/v4l/media-func-open.rst         |  11 +-
 .../linux_tv/media/v4l/media-ioc-device-info.rst   |  11 +-
 .../linux_tv/media/v4l/media-ioc-enum-entities.rst |  13 +-
 .../linux_tv/media/v4l/media-ioc-enum-links.rst    |  11 +-
 .../linux_tv/media/v4l/media-ioc-g-topology.rst    |  11 +-
 .../linux_tv/media/v4l/media-ioc-setup-link.rst    |  17 +--
 Documentation/linux_tv/media/v4l/media-types.rst   |  11 --
 Documentation/linux_tv/media/v4l/mmap.rst          |  31 ++---
 Documentation/linux_tv/media/v4l/open.rst          |  25 +---
 Documentation/linux_tv/media/v4l/pixfmt-002.rst    |  15 +-
 Documentation/linux_tv/media/v4l/pixfmt-003.rst    |  17 +--
 Documentation/linux_tv/media/v4l/pixfmt-004.rst    |  21 +--
 Documentation/linux_tv/media/v4l/pixfmt-006.rst    |  11 --
 Documentation/linux_tv/media/v4l/pixfmt-007.rst    |  90 +++++++-----
 Documentation/linux_tv/media/v4l/pixfmt-008.rst    |   9 --
 Documentation/linux_tv/media/v4l/pixfmt-013.rst    |  15 +-
 Documentation/linux_tv/media/v4l/pixfmt-grey.rst   |  11 --
 .../linux_tv/media/v4l/pixfmt-indexed.rst          |  11 --
 Documentation/linux_tv/media/v4l/pixfmt-m420.rst   |  11 --
 Documentation/linux_tv/media/v4l/pixfmt-nv12.rst   |  24 +---
 Documentation/linux_tv/media/v4l/pixfmt-nv12m.rst  |  24 +---
 Documentation/linux_tv/media/v4l/pixfmt-nv12mt.rst |   9 --
 Documentation/linux_tv/media/v4l/pixfmt-nv16.rst   |  11 --
 Documentation/linux_tv/media/v4l/pixfmt-nv16m.rst  |  11 --
 Documentation/linux_tv/media/v4l/pixfmt-nv24.rst   |  11 --
 .../linux_tv/media/v4l/pixfmt-packed-rgb.rst       |  11 +-
 .../linux_tv/media/v4l/pixfmt-packed-yuv.rst       |   9 --
 .../linux_tv/media/v4l/pixfmt-reserved.rst         |  11 --
 Documentation/linux_tv/media/v4l/pixfmt-rgb.rst    |  11 --
 .../linux_tv/media/v4l/pixfmt-sbggr16.rst          |  11 --
 Documentation/linux_tv/media/v4l/pixfmt-sbggr8.rst |  11 --
 .../linux_tv/media/v4l/pixfmt-sdr-cs08.rst         |  11 --
 .../linux_tv/media/v4l/pixfmt-sdr-cs14le.rst       |  11 --
 .../linux_tv/media/v4l/pixfmt-sdr-cu08.rst         |  11 --
 .../linux_tv/media/v4l/pixfmt-sdr-cu16le.rst       |  11 --
 .../linux_tv/media/v4l/pixfmt-sdr-ru12le.rst       |  11 --
 Documentation/linux_tv/media/v4l/pixfmt-sgbrg8.rst |  11 --
 Documentation/linux_tv/media/v4l/pixfmt-sgrbg8.rst |  11 --
 .../linux_tv/media/v4l/pixfmt-srggb10.rst          |  11 --
 .../linux_tv/media/v4l/pixfmt-srggb10alaw8.rst     |   9 --
 .../linux_tv/media/v4l/pixfmt-srggb10dpcm8.rst     |  11 +-
 .../linux_tv/media/v4l/pixfmt-srggb10p.rst         |  11 --
 .../linux_tv/media/v4l/pixfmt-srggb12.rst          |  11 --
 Documentation/linux_tv/media/v4l/pixfmt-srggb8.rst |  11 --
 Documentation/linux_tv/media/v4l/pixfmt-uv8.rst    |  11 --
 Documentation/linux_tv/media/v4l/pixfmt-uyvy.rst   |  18 ---
 Documentation/linux_tv/media/v4l/pixfmt-vyuy.rst   |  20 ---
 Documentation/linux_tv/media/v4l/pixfmt-y10.rst    |  11 --
 Documentation/linux_tv/media/v4l/pixfmt-y10b.rst   |  11 --
 Documentation/linux_tv/media/v4l/pixfmt-y12.rst    |  11 --
 Documentation/linux_tv/media/v4l/pixfmt-y12i.rst   |  15 --
 Documentation/linux_tv/media/v4l/pixfmt-y16-be.rst |  11 --
 Documentation/linux_tv/media/v4l/pixfmt-y16.rst    |  11 --
 Documentation/linux_tv/media/v4l/pixfmt-y41p.rst   |  38 ------
 Documentation/linux_tv/media/v4l/pixfmt-y8i.rst    |  11 --
 Documentation/linux_tv/media/v4l/pixfmt-yuv410.rst |  11 --
 .../linux_tv/media/v4l/pixfmt-yuv411p.rst          |  23 ----
 Documentation/linux_tv/media/v4l/pixfmt-yuv420.rst |  12 +-
 .../linux_tv/media/v4l/pixfmt-yuv420m.rst          |  11 --
 .../linux_tv/media/v4l/pixfmt-yuv422m.rst          |  16 ---
 .../linux_tv/media/v4l/pixfmt-yuv422p.rst          |  16 ---
 .../linux_tv/media/v4l/pixfmt-yuv444m.rst          |  28 ----
 Documentation/linux_tv/media/v4l/pixfmt-yuyv.rst   |  11 --
 Documentation/linux_tv/media/v4l/pixfmt-yvyu.rst   |  20 ---
 Documentation/linux_tv/media/v4l/pixfmt-z16.rst    |  11 --
 Documentation/linux_tv/media/v4l/pixfmt.rst        |  19 +--
 Documentation/linux_tv/media/v4l/planar-apis.rst   |  23 +---
 Documentation/linux_tv/media/v4l/querycap.rst      |  29 ++--
 .../linux_tv/media/v4l/remote_controllers.rst      |   9 --
 .../media/v4l/remote_controllers_sysfs_nodes.rst   |  13 +-
 Documentation/linux_tv/media/v4l/rw.rst            |  17 +--
 Documentation/linux_tv/media/v4l/sdr-formats.rst   |  11 --
 .../linux_tv/media/v4l/selection-api-002.rst       |   9 --
 .../linux_tv/media/v4l/selection-api-003.rst       |   9 --
 .../linux_tv/media/v4l/selection-api-004.rst       |  15 +-
 .../linux_tv/media/v4l/selection-api-005.rst       |  20 +--
 .../linux_tv/media/v4l/selection-api-006.rst       |  14 +-
 Documentation/linux_tv/media/v4l/selection-api.rst |  11 --
 .../linux_tv/media/v4l/selections-common.rst       |  11 --
 Documentation/linux_tv/media/v4l/standard.rst      |  30 ++--
 Documentation/linux_tv/media/v4l/streaming-par.rst |  17 +--
 .../linux_tv/media/v4l/subdev-formats.rst          |  11 --
 Documentation/linux_tv/media/v4l/tuner.rst         |  37 ++---
 Documentation/linux_tv/media/v4l/user-func.rst     |  11 --
 Documentation/linux_tv/media/v4l/userp.rst         |  29 ++--
 .../linux_tv/media/v4l/v4l2-selection-flags.rst    |  11 --
 .../linux_tv/media/v4l/v4l2-selection-targets.rst  |  11 --
 Documentation/linux_tv/media/v4l/v4l2.rst          |  83 +++++------
 .../linux_tv/media/v4l/v4l2grab-example.rst        |  11 --
 Documentation/linux_tv/media/v4l/v4l2grab.c.rst    |  11 --
 Documentation/linux_tv/media/v4l/video.rst         |  30 ++--
 Documentation/linux_tv/media/v4l/videodev.rst      |  11 --
 .../linux_tv/media/v4l/vidioc-create-bufs.rst      |  27 ++--
 .../linux_tv/media/v4l/vidioc-cropcap.rst          |  15 +-
 .../linux_tv/media/v4l/vidioc-dbg-g-chip-info.rst  |  19 +--
 .../linux_tv/media/v4l/vidioc-dbg-g-register.rst   |  21 +--
 .../linux_tv/media/v4l/vidioc-decoder-cmd.rst      |  25 ++--
 .../linux_tv/media/v4l/vidioc-dqevent.rst          |  19 +--
 .../linux_tv/media/v4l/vidioc-dv-timings-cap.rst   |  15 +-
 .../linux_tv/media/v4l/vidioc-encoder-cmd.rst      |  25 ++--
 .../linux_tv/media/v4l/vidioc-enum-dv-timings.rst  |  21 +--
 .../linux_tv/media/v4l/vidioc-enum-fmt.rst         |  19 +--
 .../media/v4l/vidioc-enum-frameintervals.rst       |  17 +--
 .../linux_tv/media/v4l/vidioc-enum-framesizes.rst  |  15 +-
 .../linux_tv/media/v4l/vidioc-enum-freq-bands.rst  |  15 +-
 .../linux_tv/media/v4l/vidioc-enumaudio.rst        |  21 +--
 .../linux_tv/media/v4l/vidioc-enumaudioout.rst     |  19 +--
 .../linux_tv/media/v4l/vidioc-enuminput.rst        |  19 +--
 .../linux_tv/media/v4l/vidioc-enumoutput.rst       |  17 +--
 .../linux_tv/media/v4l/vidioc-enumstd.rst          |  23 +---
 Documentation/linux_tv/media/v4l/vidioc-expbuf.rst |  25 ++--
 .../linux_tv/media/v4l/vidioc-g-audio.rst          |  23 +---
 .../linux_tv/media/v4l/vidioc-g-audioout.rst       |  21 +--
 Documentation/linux_tv/media/v4l/vidioc-g-crop.rst |  29 ++--
 Documentation/linux_tv/media/v4l/vidioc-g-ctrl.rst |  35 ++---
 .../linux_tv/media/v4l/vidioc-g-dv-timings.rst     |  27 ++--
 Documentation/linux_tv/media/v4l/vidioc-g-edid.rst |  39 ++----
 .../linux_tv/media/v4l/vidioc-g-enc-index.rst      |  19 +--
 .../linux_tv/media/v4l/vidioc-g-ext-ctrls.rst      |  51 +++----
 Documentation/linux_tv/media/v4l/vidioc-g-fbuf.rst |  51 +++----
 Documentation/linux_tv/media/v4l/vidioc-g-fmt.rst  |  41 +++---
 .../linux_tv/media/v4l/vidioc-g-frequency.rst      |  21 +--
 .../linux_tv/media/v4l/vidioc-g-input.rst          |  21 +--
 .../linux_tv/media/v4l/vidioc-g-jpegcomp.rst       |  15 +-
 .../linux_tv/media/v4l/vidioc-g-modulator.rst      |  29 ++--
 .../linux_tv/media/v4l/vidioc-g-output.rst         |  21 +--
 Documentation/linux_tv/media/v4l/vidioc-g-parm.rst |  17 +--
 .../linux_tv/media/v4l/vidioc-g-priority.rst       |  15 +-
 .../linux_tv/media/v4l/vidioc-g-selection.rst      |  15 +-
 .../linux_tv/media/v4l/vidioc-g-sliced-vbi-cap.rst |  19 +--
 Documentation/linux_tv/media/v4l/vidioc-g-std.rst  |  35 ++---
 .../linux_tv/media/v4l/vidioc-g-tuner.rst          |  31 ++---
 .../linux_tv/media/v4l/vidioc-log-status.rst       |  13 +-
 .../linux_tv/media/v4l/vidioc-overlay.rst          |  19 +--
 .../linux_tv/media/v4l/vidioc-prepare-buf.rst      |  19 +--
 Documentation/linux_tv/media/v4l/vidioc-qbuf.rst   |  31 ++---
 .../linux_tv/media/v4l/vidioc-query-dv-timings.rst |  25 ++--
 .../linux_tv/media/v4l/vidioc-querybuf.rst         |  21 +--
 .../linux_tv/media/v4l/vidioc-querycap.rst         |  17 +--
 .../linux_tv/media/v4l/vidioc-queryctrl.rst        |  59 ++++----
 .../linux_tv/media/v4l/vidioc-querystd.rst         |  19 +--
 .../linux_tv/media/v4l/vidioc-reqbufs.rst          |  21 +--
 .../linux_tv/media/v4l/vidioc-s-hw-freq-seek.rst   |  19 +--
 .../linux_tv/media/v4l/vidioc-streamon.rst         |  19 +--
 .../v4l/vidioc-subdev-enum-frame-interval.rst      |  19 +--
 .../media/v4l/vidioc-subdev-enum-frame-size.rst    |  21 +--
 .../media/v4l/vidioc-subdev-enum-mbus-code.rst     |  21 +--
 .../linux_tv/media/v4l/vidioc-subdev-g-crop.rst    |  21 +--
 .../linux_tv/media/v4l/vidioc-subdev-g-fmt.rst     |  13 +-
 .../media/v4l/vidioc-subdev-g-frame-interval.rst   |  13 +-
 .../media/v4l/vidioc-subdev-g-selection.rst        |  15 +-
 .../linux_tv/media/v4l/vidioc-subscribe-event.rst  |  19 +--
 Documentation/linux_tv/media/v4l/yuv-formats.rst   |  11 --
 Documentation/linux_tv/net.h.rst                   |  11 --
 Documentation/linux_tv/video.h.rst                 |  11 --
 Documentation/linux_tv/videodev2.h.rst             |  11 --
 scripts/kernel-doc                                 |   2 +-
 296 files changed, 1294 insertions(+), 4256 deletions(-)
 delete mode 100644 Documentation/linux_tv/media/v4l/controls.rst
Signature · 1 line
2.7.4
#1 lore raw

PATCH 1/51 Documentation: linuxt_tv: update the documentation year

The RST version was produced in 2016. So, update it where it was still pointing to the wrong year.

While here, added the missing (copyright) symbols.

---
 Documentation/linux_tv/conf.py              | 2 +-
 Documentation/linux_tv/index.rst            | 4 +++-
 Documentation/linux_tv/media/dvb/dvbapi.rst | 6 ++++--
 3 files changed, 8 insertions(+), 4 deletions(-)
Documentation/linux_tv/conf.py +1 -1
index 8013c921256b..ea5f6ef25d6b 100644
@@ -25,7 +25,7 @@ kernel_doc_mode = "kernel-doc"
 # ------------------------------------------------------------------------------
 
 project   = u'LINUX MEDIA INFRASTRUCTURE API'
-copyright = u'2009-2015 : LinuxTV Developers'
+copyright = u'2009-2016 : LinuxTV Developers'
 author    = u'The LinuxTV Developers'
 
 # The version info for the project you're documenting, acts as replacement for
Documentation/linux_tv/index.rst +3 -1
index 42b3d4520942..e6df371243d8 100644
@@ -1,10 +1,12 @@
 .. -*- coding: utf-8; mode: rst -*-
 
+.. include:: <isonum.txt>
+
 ##############################
 LINUX MEDIA INFRASTRUCTURE API
 ##############################
 
-**Copyright** 2009-2015 : LinuxTV Developers
+**Copyright** |copy| 2009-2016 : LinuxTV Developers
 
 Permission is granted to copy, distribute and/or modify this document
 under the terms of the GNU Free Documentation License, Version 1.1 or
Documentation/linux_tv/media/dvb/dvbapi.rst +4 -2
index 5e513ac86052..daeeb4d64917 100644
@@ -1,5 +1,7 @@
 .. -*- coding: utf-8; mode: rst -*-
 
+.. include:: <isonum.txt>
+
 .. _dvbapi:
 
 #############
@@ -41,9 +43,9 @@ Revision and Copyright
 :address:   [email protected]
 :contrib:   Ported document to Docbook XML.
 
-**Copyright** 2002, 2003 : Convergence GmbH
+**Copyright** |copy| 2002, 2003 : Convergence GmbH
 
-**Copyright** 2009-2015 : Mauro Carvalho Chehab
+**Copyright** |copy| 2009-2016 : Mauro Carvalho Chehab
 
 :revision: 2.1.0 / 2015-05-29 (*mcc*)
 
Signature · 1 line
2.7.4
#2 lore raw

PATCH 2/51 Documentation: some fixups at linux_tv/index.rst

In reply to Mauro Carvalho Chehab

Fix some issues from the conversion and improve the documentation a little bit, by adding two relevent keywords (SDR and DTMB).

---
 Documentation/linux_tv/index.rst | 21 +++++++--------------
 1 file changed, 7 insertions(+), 14 deletions(-)
Documentation/linux_tv/index.rst +7 -14
index e6df371243d8..b0389cbfb1aa 100644
@@ -12,7 +12,7 @@ Permission is granted to copy, distribute and/or modify this document
 under the terms of the GNU Free Documentation License, Version 1.1 or
 any later version published by the Free Software Foundation. A copy of
 the license is included in the chapter entitled "GNU Free Documentation
-License"
+License".
 
 
 ============
@@ -21,8 +21,8 @@ Introduction
 
 This document covers the Linux Kernel to Userspace API's used by video
 and radio streaming devices, including video cameras, analog and digital
-TV receiver cards, AM/FM receiver cards, streaming capture and output
-devices, codec devices and remote controllers.
+TV receiver cards, AM/FM receiver cards, Software Defined Radio (SDR),
+streaming capture and output devices, codec devices and remote controllers.
 
 A typical media device hardware is shown at
 :ref:`typical_media_device`.
@@ -36,21 +36,17 @@ A typical media device hardware is shown at
 
     Typical Media Device
 
-    Typical Media Device Block Diagram
-
-
-
 The media infrastructure API was designed to control such devices. It is
 divided into four parts.
 
-The first part covers radio, video capture and output, cameras, analog
-TV devices and codecs.
+The first part covers radio, video capture and output,
+cameras, analog TV devices and codecs.
 
 The second part covers the API used for digital TV and Internet
 reception via one of the several digital tv standards. While it is
 called as DVB API, in fact it covers several different video standards
-including DVB-T/T2, DVB-S/S2, DVB-C, ATSC, ISDB-T, ISDB-S,etc. The
-complete list of supported standards can be found at
+including DVB-T/T2, DVB-S/S2, DVB-C, ATSC, ISDB-T, ISDB-S, DTMB, etc.
+The complete list of supported standards can be found at
 :ref:`fe-delivery-system-t`.
 
 The third part covers the Remote Controller API.
@@ -97,6 +93,3 @@ etc, please mail to:
   =========
 
   * :ref:`genindex`
-
-.. todolist::
-
Signature · 1 line
2.7.4
#3 lore raw

PATCH 3/51 Documentation: v4l2.rst: Fix authors and revisions lists

In reply to Mauro Carvalho Chehab

The conversion of the authors and revision history lists didn't end too well.

Manually fix them.

The revision history still needs some care in the future.

---
 Documentation/linux_tv/media/v4l/v4l2.rst | 70 +++++++++++++++++--------------
 1 file changed, 39 insertions(+), 31 deletions(-)
Documentation/linux_tv/media/v4l/v4l2.rst +39 -31
index cf636b665d95..1ddbd67ec466 100644
@@ -1,12 +1,13 @@
 .. -*- coding: utf-8; mode: rst -*-
 
+.. include:: <isonum.txt>
 .. _v4l2spec:
 
 #####################################
 Video for Linux Two API Specification
 #####################################
 
-**Revision 4.4**
+**Revision 4.5**
 
 .. toctree::
     :maxdepth: 1
@@ -30,49 +31,56 @@ Video for Linux Two API Specification
 Revision and Copyright
 **********************
 
+Authors, in alphabetical order:
 
-:author:    Schimek Michael (*H*)
-:address:   [email protected]
+- Ailus, Sakari <[email protected]>
 
-:author:    Dirks Bill
-:contrib:   Original author of the V4L2 API and documentation.
+  - Subdev selections API.
 
-:author:    Verkuil Hans
-:address:   [email protected]
-:contrib:   Designed and documented the VIDIOC_LOG_STATUS ioctl, the extended control ioctls, major parts of the sliced VBI API, the MPEG encoder and decoder APIs and the DV Timings API.
+- Carvalho Chehab, Mauro <[email protected]>
 
-:author:    Rubli Martin
-:contrib:   Designed and documented the VIDIOC_ENUM_FRAMESIZES and VIDIOC_ENUM_FRAMEINTERVALS ioctls.
+  - Documented libv4l, designed and added v4l2grab example, Remote Controller chapter.
 
-:author:    Walls Andy
-:address:   [email protected]
-:contrib:   Documented the fielded V4L2_MPEG_STREAM_VBI_FMT_IVTV MPEG stream embedded, sliced VBI data format in this specification.
+- Dirks, Bill
 
-:author:    Carvalho Chehab Mauro
-:address:   [email protected]
-:contrib:   Documented libv4l, designed and added v4l2grab example, Remote Controller chapter.
+  - Original author of the V4L2 API and documentation.
 
-:author:    Karicheri Muralidharan
-:address:   [email protected]
-:contrib:   Documented the Digital Video timings API.
+- H Schimek, Michael <[email protected]>
 
-:author:    Osciak Pawel
-:address:   pawel AT osciak.com
-:contrib:   Designed and documented the multi-planar API.
+  - Original author of the V4L2 API and documentation.
 
-:author:    Ailus Sakari
-:address:   [email protected]
-:contrib:   Subdev selections API.
+- Karicheri, Muralidharan <[email protected]>
 
-:author:    Palosaari Antti
-:address:   [email protected]
-:contrib:   SDR API.
+  - Documented the Digital Video timings API.
 
-**Copyright** 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 : Bill Dirks, Michael H. Schimek, Hans Verkuil, Martin Rubli, Andy Walls, Muralidharan Karicheri, Mauro Carvalho Chehab, Pawel Osciak
+- Osciak, Pawel <[email protected]>
+
+  - Designed and documented the multi-planar API.
+
+- Palosaari, Antti <[email protected]>
+
+  - SDR API.
+
+- Rubli, Martin
+
+  - Designed and documented the VIDIOC_ENUM_FRAMESIZES and VIDIOC_ENUM_FRAMEINTERVALS ioctls.
+
+- Walls, Andy <[email protected]>
+
+  - Documented the fielded V4L2_MPEG_STREAM_VBI_FMT_IVTV MPEG stream embedded, sliced VBI data format in this specification.
+
+- Verkuil, Hans <[email protected]>
+
+  - Designed and documented the VIDIOC_LOG_STATUS ioctl, the extended control ioctls, major parts of the sliced VBI API, the MPEG encoder and decoder APIs and the DV Timings API.
+
+**Copyright** |copy| 1999-2016: Bill Dirks, Michael H. Schimek, Hans Verkuil, Martin Rubli, Andy Walls, Muralidharan Karicheri, Mauro Carvalho Chehab, Pawel Osciak, Sakari Ailus & Antti Palosaari.
 
 Except when explicitly stated as GPL, programming examples within this
 part can be used and distributed without restrictions.
 
+****************
+Revision History
+****************
 
 :revision: 4.5 / 2015-10-29 (*rr*)
 
@@ -254,7 +262,7 @@ packed pixel formats.
 
 Added the Video Output Overlay interface, new MPEG controls,
 V4L2_FIELD_INTERLACED_TB and V4L2_FIELD_INTERLACED_BT,
-VIDIOC_DBG_G/S_REGISTER, VIDIOC_(TRY_)ENCODER_CMD,
+VIDIOC_DBG_G/S_REGISTER, VIDIOC\_(TRY\_)ENCODER_CMD,
 VIDIOC_G_CHIP_IDENT, VIDIOC_G_ENC_INDEX, new pixel formats.
 Clarifications in the cropping chapter, about RGB pixel formats, the
 mmap(), poll(), select(), read() and write() functions. Typographical
@@ -311,7 +319,7 @@ for frame format enumeration of digital devices.
 
 :revision: 0.13 / 2006-04-07 (*mhs*)
 
-Corrected the description of struct v4l2_window clips. New V4L2_STD_
+Corrected the description of struct v4l2_window clips. New V4L2_STD\_
 and V4L2_TUNER_MODE_LANG1_LANG2 defines.
 
 
Signature · 1 line
2.7.4
#4 lore raw

PATCH 4/51 Documentation: querycap.rst: fix troubles on some references

In reply to Mauro Carvalho Chehab

This is not due to the format change, but there are some wrong references on this file. Fix them.

---
 Documentation/linux_tv/media/v4l/querycap.rst | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
Documentation/linux_tv/media/v4l/querycap.rst +5 -5
index 2568820a3954..ce0c0e3f9b53 100644
@@ -16,9 +16,9 @@ check if the kernel device is compatible with this specification, and to
 query the :ref:`functions <devices>` and :ref:`I/O methods <io>`
 supported by the device.
 
-Starting with kernel version 3.1, VIDIOC-QUERYCAP will return the V4L2
-API version used by the driver, with generally matches the Kernel
-version. There's no need of using
+Starting with kernel version 3.1, :ref:`VIDIOC_QUERYCAP <vidioc-querycap>`
+will return the V4L2 API version used by the driver, with generally
+matches the Kernel version. There's no need of using
 :ref:`VIDIOC_QUERYCAP <vidioc-querycap>` to check if a specific ioctl
 is supported, the V4L2 core now returns ENOTTY if a driver doesn't
 provide support for an ioctl.
@@ -30,8 +30,8 @@ abstraction is a major objective of this API, the
 :ref:`VIDIOC_QUERYCAP <vidioc-querycap>` ioctl also allows driver
 specific applications to reliably identify the driver.
 
-All V4L2 drivers must support ``VIDIOC_QUERYCAP``. Applications should
-always call this ioctl after opening the device.
+All V4L2 drivers must support :ref:`VIDIOC_QUERYCAP <vidioc-querycap>`.
+Applications should always call this ioctl after opening the device.
 
 
 .. ------------------------------------------------------------------------------
Signature · 1 line
2.7.4
#5 lore raw

PATCH 5/51 Documentation: linux_tv/index.rst: add xrefs for document divisions

In reply to Mauro Carvalho Chehab

Make easier to navigate at the media document by adding the links to each of the parts of the document.

---
 Documentation/linux_tv/index.rst | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)
Documentation/linux_tv/index.rst +8 -8
index b0389cbfb1aa..edb7d56e9b8f 100644
@@ -39,19 +39,19 @@ A typical media device hardware is shown at
 The media infrastructure API was designed to control such devices. It is
 divided into four parts.
 
-The first part covers radio, video capture and output,
+The :Ref:`first part <v4l2spec>` covers radio, video capture and output,
 cameras, analog TV devices and codecs.
 
-The second part covers the API used for digital TV and Internet
-reception via one of the several digital tv standards. While it is
-called as DVB API, in fact it covers several different video standards
-including DVB-T/T2, DVB-S/S2, DVB-C, ATSC, ISDB-T, ISDB-S, DTMB, etc.
-The complete list of supported standards can be found at
+The :Ref:`second part <dvbapi>` covers the API used for digital TV and
+Internet reception via one of the several digital tv standards. While it
+is called as DVB API, in fact it covers several different video
+standards including DVB-T/T2, DVB-S/S2, DVB-C, ATSC, ISDB-T, ISDB-S,
+DTMB, etc. The complete list of supported standards can be found at
 :ref:`fe-delivery-system-t`.
 
-The third part covers the Remote Controller API.
+The :Ref:`third part <remote_controllers>` covers the Remote Controller API.
 
-The fourth part covers the Media Controller API.
+The :Ref:`fourth part <media_controller>` covers the Media Controller API.
 
 It should also be noted that a media device may also have audio
 components, like mixers, PCM capture, PCM playback, etc, which are
Signature · 1 line
2.7.4
#6 lore raw

PATCH 6/51 Documentation: app-pri.rst: Fix a bad reference

In reply to Mauro Carvalho Chehab

What should be a reference to VIDIOC_S_PRIORITY was incorrectly defined as a constant at the DocBook. Fix it on the rst version.

---
 Documentation/linux_tv/media/v4l/app-pri.rst | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Documentation/linux_tv/media/v4l/app-pri.rst +2 -2
index 9716437ae14d..7f034852ae1f 100644
@@ -21,8 +21,8 @@ defines the :ref:`VIDIOC_G_PRIORITY <vidioc-g-priority>` and
 query the access priority associate with a file descriptor. Opening a
 device assigns a medium priority, compatible with earlier versions of
 V4L2 and drivers not supporting these ioctls. Applications requiring a
-different priority will usually call ``VIDIOC_S_PRIORITY`` after
-verifying the device with the
+different priority will usually call :ref:`VIDIOC_S_PRIORITY
+<vidioc-g-priority>` after verifying the device with the
 :ref:`VIDIOC_QUERYCAP <vidioc-querycap>` ioctl.
 
 Ioctls changing driver properties, such as
Signature · 1 line
2.7.4
#7 lore raw

PATCH 7/51 Documentation: video.rst: use reference for VIDIOC_ENUMINPUT

In reply to Mauro Carvalho Chehab

Instead of using const, transform it into a reference.

---
 Documentation/linux_tv/media/v4l/video.rst | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Documentation/linux_tv/media/v4l/video.rst +2 -2
index 803bb37f4be8..f214bd835622 100644
@@ -17,8 +17,8 @@ outputs applications can enumerate them with the
 :ref:`VIDIOC_ENUMINPUT <vidioc-enuminput>` and
 :ref:`VIDIOC_ENUMOUTPUT <vidioc-enumoutput>` ioctl, respectively. The
 struct :ref:`v4l2_input <v4l2-input>` returned by the
-``VIDIOC_ENUMINPUT`` ioctl also contains signal status information
-applicable when the current video input is queried.
+:ref:`VIDIOC_ENUMINPUT <vidioc-enuminput>` ioctl also contains signal
+:status information applicable when the current video input is queried.
 
 The :ref:`VIDIOC_G_INPUT <vidioc-g-input>` and
 :ref:`VIDIOC_G_OUTPUT <vidioc-g-output>` ioctls return the index of
Signature · 1 line
2.7.4
#8 lore raw

PATCH 8/51 Documentation: v4l2.rst: numerate the V4L2 chapters

In reply to Mauro Carvalho Chehab

The Video4Linux documentation is big. We want to numerate the items, as it makes easier to reference an item while discussing the document on meetings.

---
 Documentation/linux_tv/media/v4l/v4l2.rst | 2 ++
 1 file changed, 2 insertions(+)
Documentation/linux_tv/media/v4l/v4l2.rst +2 -0
index 1ddbd67ec466..44605ec92a50 100644
@@ -10,7 +10,9 @@ Video for Linux Two API Specification
 **Revision 4.5**
 
 .. toctree::
+    :numbered:
     :maxdepth: 1
+    :caption: Table of Contents
 
     common
     pixfmt
Signature · 1 line
2.7.4
#9 lore raw

PATCH 9/51 Documentation: video.rst: Restore the captions for the examples

In reply to Mauro Carvalho Chehab

There are two examples in the code, but the captions of them were lost during the ReST conversion. Manually add them again.

---
 Documentation/linux_tv/media/v4l/video.rst | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
Documentation/linux_tv/media/v4l/video.rst +2 -1
index f214bd835622..fc220be52c2b 100644
@@ -28,8 +28,8 @@ applications call the :ref:`VIDIOC_S_INPUT <vidioc-g-input>` and
 implement all the input ioctls when the device has one or more inputs,
 all the output ioctls when the device has one or more outputs.
 
-
 .. code-block:: c
+    :caption: Example 1: Information about the current video input
 
     struct v4l2_input input;
     int index;
@@ -51,6 +51,7 @@ all the output ioctls when the device has one or more outputs.
 
 
 .. code-block:: c
+    :caption: Example 2: Switching to the first video input
 
     int index;
 
Signature · 1 line
2.7.4
#10 lore raw

PATCH 10/51 Documentation: audio.rst: Fix some cross references

In reply to Mauro Carvalho Chehab

There are several constants there that should be, instead, cross-references. Fix them.

---
 Documentation/linux_tv/media/v4l/audio.rst | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
Documentation/linux_tv/media/v4l/audio.rst +4 -4
index 5e37adfbb49c..95622902e86e 100644
@@ -30,16 +30,16 @@ outputs applications can enumerate them with the
 :ref:`VIDIOC_ENUMAUDIO <vidioc-enumaudio>` and
 :ref:`VIDIOC_ENUMAUDOUT <vidioc-enumaudioout>` ioctl, respectively.
 The struct :ref:`v4l2_audio <v4l2-audio>` returned by the
-``VIDIOC_ENUMAUDIO`` ioctl also contains signal status information
-applicable when the current audio input is queried.
+:ref:`VIDIOC_ENUMAUDIO <vidioc-enumaudio>` ioctl also contains signal
+:status information applicable when the current audio input is queried.
 
 The :ref:`VIDIOC_G_AUDIO <vidioc-g-audio>` and
 :ref:`VIDIOC_G_AUDOUT <vidioc-g-audioout>` ioctls report the current
 audio input and output, respectively. Note that, unlike
 :ref:`VIDIOC_G_INPUT <vidioc-g-input>` and
 :ref:`VIDIOC_G_OUTPUT <vidioc-g-output>` these ioctls return a
-structure as ``VIDIOC_ENUMAUDIO`` and ``VIDIOC_ENUMAUDOUT`` do, not just
-an index.
+structure as :ref:`VIDIOC_ENUMAUDIO <vidioc-enumaudio>` and
+:ref:`VIDIOC_ENUMAUDOUT <vidioc-enumaudioout>` do, not just an index.
 
 To select an audio input and change its properties applications call the
 :ref:`VIDIOC_S_AUDIO <vidioc-g-audio>` ioctl. To select an audio
Signature · 1 line
2.7.4
#11 lore raw

PATCH 11/51 Documentation: linux_tv: Replace reference names to match ioctls

In reply to Mauro Carvalho Chehab

Due to a limitation at the DocBook language, the references were using lowercase and slashes, instead of the name of the ioctls. On ReST, make them identical. This will hopefully help to cleanup the code a little bit.

---
 .../linux_tv/media/dvb/audio_function_calls.rst    |   2 +-
 .../linux_tv/media/dvb/video_function_calls.rst    |  18 +--
 Documentation/linux_tv/media/v4l/app-pri.rst       |  10 +-
 Documentation/linux_tv/media/v4l/audio.rst         |  24 ++--
 Documentation/linux_tv/media/v4l/buffer.rst        |  44 +++----
 Documentation/linux_tv/media/v4l/control.rst       |  14 +--
 Documentation/linux_tv/media/v4l/crop.rst          |  12 +-
 Documentation/linux_tv/media/v4l/dev-capture.rst   |   8 +-
 Documentation/linux_tv/media/v4l/dev-codec.rst     |   2 +-
 Documentation/linux_tv/media/v4l/dev-event.rst     |   4 +-
 Documentation/linux_tv/media/v4l/dev-osd.rst       |  12 +-
 Documentation/linux_tv/media/v4l/dev-output.rst    |   8 +-
 Documentation/linux_tv/media/v4l/dev-overlay.rst   |  38 +++---
 Documentation/linux_tv/media/v4l/dev-radio.rst     |   6 +-
 Documentation/linux_tv/media/v4l/dev-raw-vbi.rst   |  12 +-
 Documentation/linux_tv/media/v4l/dev-rds.rst       |   4 +-
 Documentation/linux_tv/media/v4l/dev-sdr.rst       |   8 +-
 .../linux_tv/media/v4l/dev-sliced-vbi.rst          |  36 +++---
 Documentation/linux_tv/media/v4l/dev-subdev.rst    |  22 ++--
 Documentation/linux_tv/media/v4l/diff-v4l.rst      |  96 +++++++--------
 Documentation/linux_tv/media/v4l/dmabuf.rst        |  20 ++--
 Documentation/linux_tv/media/v4l/dv-timings.rst    |  10 +-
 .../linux_tv/media/v4l/extended-controls.rst       |  40 +++----
 Documentation/linux_tv/media/v4l/field-order.rst   |   6 +-
 Documentation/linux_tv/media/v4l/format.rst        |  10 +-
 Documentation/linux_tv/media/v4l/func-mmap.rst     |   6 +-
 Documentation/linux_tv/media/v4l/func-open.rst     |   2 +-
 Documentation/linux_tv/media/v4l/func-poll.rst     |  12 +-
 Documentation/linux_tv/media/v4l/func-read.rst     |   4 +-
 Documentation/linux_tv/media/v4l/func-select.rst   |   8 +-
 Documentation/linux_tv/media/v4l/hist-v4l2.rst     | 130 ++++++++++-----------
 Documentation/linux_tv/media/v4l/io.rst            |   4 +-
 .../linux_tv/media/v4l/libv4l-introduction.rst     |  12 +-
 Documentation/linux_tv/media/v4l/mmap.rst          |  20 ++--
 Documentation/linux_tv/media/v4l/open.rst          |   6 +-
 Documentation/linux_tv/media/v4l/pixfmt-013.rst    |   4 +-
 Documentation/linux_tv/media/v4l/pixfmt.rst        |   4 +-
 Documentation/linux_tv/media/v4l/planar-apis.rst   |  16 +--
 Documentation/linux_tv/media/v4l/querycap.rst      |  12 +-
 Documentation/linux_tv/media/v4l/rw.rst            |   2 +-
 .../linux_tv/media/v4l/selection-api-004.rst       |   2 +-
 Documentation/linux_tv/media/v4l/standard.rst      |  12 +-
 Documentation/linux_tv/media/v4l/streaming-par.rst |   6 +-
 Documentation/linux_tv/media/v4l/tuner.rst         |  22 ++--
 Documentation/linux_tv/media/v4l/userp.rst         |  18 +--
 Documentation/linux_tv/media/v4l/v4l2.rst          |   2 +-
 Documentation/linux_tv/media/v4l/video.rst         |  14 +--
 .../linux_tv/media/v4l/vidioc-create-bufs.rst      |   8 +-
 .../linux_tv/media/v4l/vidioc-cropcap.rst          |   2 +-
 .../linux_tv/media/v4l/vidioc-dbg-g-chip-info.rst  |   2 +-
 .../linux_tv/media/v4l/vidioc-dbg-g-register.rst   |   6 +-
 .../linux_tv/media/v4l/vidioc-decoder-cmd.rst      |   8 +-
 .../linux_tv/media/v4l/vidioc-dqevent.rst          |   8 +-
 .../linux_tv/media/v4l/vidioc-dv-timings-cap.rst   |   2 +-
 .../linux_tv/media/v4l/vidioc-encoder-cmd.rst      |   8 +-
 .../linux_tv/media/v4l/vidioc-enum-dv-timings.rst  |   4 +-
 .../linux_tv/media/v4l/vidioc-enum-fmt.rst         |   2 +-
 .../media/v4l/vidioc-enum-frameintervals.rst       |   6 +-
 .../linux_tv/media/v4l/vidioc-enum-framesizes.rst  |   4 +-
 .../linux_tv/media/v4l/vidioc-enum-freq-bands.rst  |   2 +-
 .../linux_tv/media/v4l/vidioc-enumaudio.rst        |   4 +-
 .../linux_tv/media/v4l/vidioc-enumaudioout.rst     |   4 +-
 .../linux_tv/media/v4l/vidioc-enuminput.rst        |   2 +-
 .../linux_tv/media/v4l/vidioc-enumoutput.rst       |   2 +-
 .../linux_tv/media/v4l/vidioc-enumstd.rst          |   2 +-
 Documentation/linux_tv/media/v4l/vidioc-expbuf.rst |  10 +-
 .../linux_tv/media/v4l/vidioc-g-audio.rst          |   2 +-
 .../linux_tv/media/v4l/vidioc-g-audioout.rst       |   2 +-
 Documentation/linux_tv/media/v4l/vidioc-g-crop.rst |   4 +-
 Documentation/linux_tv/media/v4l/vidioc-g-ctrl.rst |  10 +-
 .../linux_tv/media/v4l/vidioc-g-dv-timings.rst     |   4 +-
 Documentation/linux_tv/media/v4l/vidioc-g-edid.rst |  10 +-
 .../linux_tv/media/v4l/vidioc-g-enc-index.rst      |   2 +-
 .../linux_tv/media/v4l/vidioc-g-ext-ctrls.rst      |  10 +-
 Documentation/linux_tv/media/v4l/vidioc-g-fbuf.rst |  18 +--
 Documentation/linux_tv/media/v4l/vidioc-g-fmt.rst  |   2 +-
 .../linux_tv/media/v4l/vidioc-g-frequency.rst      |   2 +-
 .../linux_tv/media/v4l/vidioc-g-input.rst          |   4 +-
 .../linux_tv/media/v4l/vidioc-g-jpegcomp.rst       |   2 +-
 .../linux_tv/media/v4l/vidioc-g-modulator.rst      |   4 +-
 .../linux_tv/media/v4l/vidioc-g-output.rst         |   4 +-
 Documentation/linux_tv/media/v4l/vidioc-g-parm.rst |   2 +-
 .../linux_tv/media/v4l/vidioc-g-priority.rst       |   2 +-
 .../linux_tv/media/v4l/vidioc-g-selection.rst      |   2 +-
 .../linux_tv/media/v4l/vidioc-g-sliced-vbi-cap.rst |   4 +-
 Documentation/linux_tv/media/v4l/vidioc-g-std.rst  |   4 +-
 .../linux_tv/media/v4l/vidioc-g-tuner.rst          |  10 +-
 .../linux_tv/media/v4l/vidioc-log-status.rst       |   2 +-
 .../linux_tv/media/v4l/vidioc-overlay.rst          |   6 +-
 .../linux_tv/media/v4l/vidioc-prepare-buf.rst      |   2 +-
 Documentation/linux_tv/media/v4l/vidioc-qbuf.rst   |  14 +--
 .../linux_tv/media/v4l/vidioc-query-dv-timings.rst |   4 +-
 .../linux_tv/media/v4l/vidioc-querybuf.rst         |   6 +-
 .../linux_tv/media/v4l/vidioc-querycap.rst         |   4 +-
 .../linux_tv/media/v4l/vidioc-queryctrl.rst        |   6 +-
 .../linux_tv/media/v4l/vidioc-querystd.rst         |   2 +-
 .../linux_tv/media/v4l/vidioc-reqbufs.rst          |   4 +-
 .../linux_tv/media/v4l/vidioc-s-hw-freq-seek.rst   |   6 +-
 .../linux_tv/media/v4l/vidioc-streamon.rst         |   8 +-
 .../v4l/vidioc-subdev-enum-frame-interval.rst      |   4 +-
 .../media/v4l/vidioc-subdev-enum-frame-size.rst    |   8 +-
 .../media/v4l/vidioc-subdev-enum-mbus-code.rst     |   4 +-
 .../linux_tv/media/v4l/vidioc-subdev-g-crop.rst    |   4 +-
 .../linux_tv/media/v4l/vidioc-subdev-g-fmt.rst     |   2 +-
 .../media/v4l/vidioc-subdev-g-frame-interval.rst   |   2 +-
 .../media/v4l/vidioc-subdev-g-selection.rst        |   4 +-
 .../linux_tv/media/v4l/vidioc-subscribe-event.rst  |   8 +-
 107 files changed, 537 insertions(+), 537 deletions(-)
Documentation/linux_tv/media/dvb/audio_function_calls.rst +1 -1
index 41a5757ffd72..d1a5b5970b71 100644
@@ -456,7 +456,7 @@ AUDIO_SET_MUTE
 DESCRIPTION
 
 This ioctl is for DVB devices only. To control a V4L2 decoder use the
-V4L2 :ref:`VIDIOC_DECODER_CMD <vidioc-decoder-cmd>` with the
+V4L2 :ref:`VIDIOC_DECODER_CMD <VIDIOC_DECODER_CMD>` with the
 ``V4L2_DEC_CMD_START_MUTE_AUDIO`` flag instead.
 
 This ioctl call asks the audio device to mute the stream that is
Documentation/linux_tv/media/dvb/video_function_calls.rst +9 -9
index 3add2b85450d..98c90dcdb587 100644
@@ -239,7 +239,7 @@ VIDEO_STOP
 DESCRIPTION
 
 This ioctl is for DVB devices only. To control a V4L2 decoder use the
-V4L2 :ref:`VIDIOC_DECODER_CMD <vidioc-decoder-cmd>` instead.
+V4L2 :ref:`VIDIOC_DECODER_CMD <VIDIOC_DECODER_CMD>` instead.
 
 This ioctl call asks the Video Device to stop playing the current
 stream. Depending on the input parameter, the screen can be blanked out
@@ -302,7 +302,7 @@ VIDEO_PLAY
 DESCRIPTION
 
 This ioctl is for DVB devices only. To control a V4L2 decoder use the
-V4L2 :ref:`VIDIOC_DECODER_CMD <vidioc-decoder-cmd>` instead.
+V4L2 :ref:`VIDIOC_DECODER_CMD <VIDIOC_DECODER_CMD>` instead.
 
 This ioctl call asks the Video Device to start playing a video stream
 from the selected source.
@@ -348,7 +348,7 @@ VIDEO_FREEZE
 DESCRIPTION
 
 This ioctl is for DVB devices only. To control a V4L2 decoder use the
-V4L2 :ref:`VIDIOC_DECODER_CMD <vidioc-decoder-cmd>` instead.
+V4L2 :ref:`VIDIOC_DECODER_CMD <VIDIOC_DECODER_CMD>` instead.
 
 This ioctl call suspends the live video stream being played. Decoding
 and playing are frozen. It is then possible to restart the decoding and
@@ -398,7 +398,7 @@ VIDEO_CONTINUE
 DESCRIPTION
 
 This ioctl is for DVB devices only. To control a V4L2 decoder use the
-V4L2 :ref:`VIDIOC_DECODER_CMD <vidioc-decoder-cmd>` instead.
+V4L2 :ref:`VIDIOC_DECODER_CMD <VIDIOC_DECODER_CMD>` instead.
 
 This ioctl call restarts decoding and playing processes of the video
 stream which was played before a call to VIDEO_FREEZE was made.
@@ -763,7 +763,7 @@ VIDEO_GET_EVENT
 DESCRIPTION
 
 This ioctl is for DVB devices only. To get events from a V4L2 decoder
-use the V4L2 :ref:`VIDIOC_DQEVENT <vidioc-dqevent>` ioctl instead.
+use the V4L2 :ref:`VIDIOC_DQEVENT <VIDIOC_DQEVENT>` ioctl instead.
 
 This ioctl call returns an event of type video_event if available. If
 an event is not available, the behavior depends on whether the device is
@@ -844,11 +844,11 @@ DESCRIPTION
 
 This ioctl is obsolete. Do not use in new drivers. For V4L2 decoders
 this ioctl has been replaced by the
-:ref:`VIDIOC_DECODER_CMD <vidioc-decoder-cmd>` ioctl.
+:ref:`VIDIOC_DECODER_CMD <VIDIOC_DECODER_CMD>` ioctl.
 
 This ioctl commands the decoder. The ``video_command`` struct is a
 subset of the ``v4l2_decoder_cmd`` struct, so refer to the
-:ref:`VIDIOC_DECODER_CMD <vidioc-decoder-cmd>` documentation for
+:ref:`VIDIOC_DECODER_CMD <VIDIOC_DECODER_CMD>` documentation for
 more information.
 
 SYNOPSIS
@@ -900,11 +900,11 @@ DESCRIPTION
 
 This ioctl is obsolete. Do not use in new drivers. For V4L2 decoders
 this ioctl has been replaced by the
-:ref:`VIDIOC_TRY_DECODER_CMD <vidioc-decoder-cmd>` ioctl.
+:ref:`VIDIOC_TRY_DECODER_CMD <VIDIOC_DECODER_CMD>` ioctl.
 
 This ioctl tries a decoder command. The ``video_command`` struct is a
 subset of the ``v4l2_decoder_cmd`` struct, so refer to the
-:ref:`VIDIOC_TRY_DECODER_CMD <vidioc-decoder-cmd>` documentation
+:ref:`VIDIOC_TRY_DECODER_CMD <VIDIOC_DECODER_CMD>` documentation
 for more information.
 
 SYNOPSIS
Documentation/linux_tv/media/v4l/app-pri.rst +5 -5
index 7f034852ae1f..bc50afca95fc 100644
@@ -16,17 +16,17 @@ applications and automatically regain control of the device at a later
 time.
 
 Since these features cannot be implemented entirely in user space V4L2
-defines the :ref:`VIDIOC_G_PRIORITY <vidioc-g-priority>` and
-:ref:`VIDIOC_S_PRIORITY <vidioc-g-priority>` ioctls to request and
+defines the :ref:`VIDIOC_G_PRIORITY <VIDIOC_G_PRIORITY>` and
+:ref:`VIDIOC_S_PRIORITY <VIDIOC_G_PRIORITY>` ioctls to request and
 query the access priority associate with a file descriptor. Opening a
 device assigns a medium priority, compatible with earlier versions of
 V4L2 and drivers not supporting these ioctls. Applications requiring a
 different priority will usually call :ref:`VIDIOC_S_PRIORITY
-<vidioc-g-priority>` after verifying the device with the
-:ref:`VIDIOC_QUERYCAP <vidioc-querycap>` ioctl.
+<VIDIOC_G_PRIORITY>` after verifying the device with the
+:ref:`VIDIOC_QUERYCAP <VIDIOC_QUERYCAP>` ioctl.
 
 Ioctls changing driver properties, such as
-:ref:`VIDIOC_S_INPUT <vidioc-g-input>`, return an EBUSY error code
+:ref:`VIDIOC_S_INPUT <VIDIOC_G_INPUT>`, return an EBUSY error code
 after another application obtained higher priority.
 
 
Documentation/linux_tv/media/v4l/audio.rst +12 -12
index 95622902e86e..fa6bf5ad8d32 100644
@@ -27,31 +27,31 @@ number, starting at zero, of one audio input or output.
 
 To learn about the number and attributes of the available inputs and
 outputs applications can enumerate them with the
-:ref:`VIDIOC_ENUMAUDIO <vidioc-enumaudio>` and
-:ref:`VIDIOC_ENUMAUDOUT <vidioc-enumaudioout>` ioctl, respectively.
+:ref:`VIDIOC_ENUMAUDIO <VIDIOC_ENUMAUDIO>` and
+:ref:`VIDIOC_ENUMAUDOUT <VIDIOC_ENUMAUDIOout>` ioctl, respectively.
 The struct :ref:`v4l2_audio <v4l2-audio>` returned by the
-:ref:`VIDIOC_ENUMAUDIO <vidioc-enumaudio>` ioctl also contains signal
+:ref:`VIDIOC_ENUMAUDIO <VIDIOC_ENUMAUDIO>` ioctl also contains signal
 :status information applicable when the current audio input is queried.
 
-The :ref:`VIDIOC_G_AUDIO <vidioc-g-audio>` and
-:ref:`VIDIOC_G_AUDOUT <vidioc-g-audioout>` ioctls report the current
+The :ref:`VIDIOC_G_AUDIO <VIDIOC_G_AUDIO>` and
+:ref:`VIDIOC_G_AUDOUT <VIDIOC_G_AUDIOout>` ioctls report the current
 audio input and output, respectively. Note that, unlike
-:ref:`VIDIOC_G_INPUT <vidioc-g-input>` and
-:ref:`VIDIOC_G_OUTPUT <vidioc-g-output>` these ioctls return a
-structure as :ref:`VIDIOC_ENUMAUDIO <vidioc-enumaudio>` and
-:ref:`VIDIOC_ENUMAUDOUT <vidioc-enumaudioout>` do, not just an index.
+:ref:`VIDIOC_G_INPUT <VIDIOC_G_INPUT>` and
+:ref:`VIDIOC_G_OUTPUT <VIDIOC_G_OUTPUT>` these ioctls return a
+structure as :ref:`VIDIOC_ENUMAUDIO <VIDIOC_ENUMAUDIO>` and
+:ref:`VIDIOC_ENUMAUDOUT <VIDIOC_ENUMAUDIOout>` do, not just an index.
 
 To select an audio input and change its properties applications call the
-:ref:`VIDIOC_S_AUDIO <vidioc-g-audio>` ioctl. To select an audio
+:ref:`VIDIOC_S_AUDIO <VIDIOC_G_AUDIO>` ioctl. To select an audio
 output (which presently has no changeable properties) applications call
-the :ref:`VIDIOC_S_AUDOUT <vidioc-g-audioout>` ioctl.
+the :ref:`VIDIOC_S_AUDOUT <VIDIOC_G_AUDIOout>` ioctl.
 
 Drivers must implement all audio input ioctls when the device has
 multiple selectable audio inputs, all audio output ioctls when the
 device has multiple selectable audio outputs. When the device has any
 audio inputs or outputs the driver must set the ``V4L2_CAP_AUDIO`` flag
 in the struct :ref:`v4l2_capability <v4l2-capability>` returned by
-the :ref:`VIDIOC_QUERYCAP <vidioc-querycap>` ioctl.
+the :ref:`VIDIOC_QUERYCAP <VIDIOC_QUERYCAP>` ioctl.
 
 
 .. code-block:: c
Documentation/linux_tv/media/v4l/buffer.rst +22 -22

98 lines not on this page · raw message

Documentation/linux_tv/media/v4l/control.rst +7 -7
index 16eb34472892..3e5c650707ae 100644
@@ -47,7 +47,7 @@ changed or generally never without application request.
 
 V4L2 specifies an event mechanism to notify applications when controls
 change value (see
-:ref:`VIDIOC_SUBSCRIBE_EVENT <vidioc-subscribe-event>`, event
+:ref:`VIDIOC_SUBSCRIBE_EVENT <VIDIOC_SUBSCRIBE_EVENT>`, event
 ``V4L2_EVENT_CTRL``), panel applications might want to make use of that
 in order to always reflect the correct control value.
 
@@ -311,7 +311,7 @@ Control IDs
     180. Rotating the image to 90 and 270 will reverse the height and
     width of the display window. It is necessary to set the new height
     and width of the picture using the
-    :ref:`VIDIOC_S_FMT <vidioc-g-fmt>` ioctl according to the
+    :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl according to the
     rotation angle selected.
 
 ``V4L2_CID_BG_COLOR`` ``(integer)``
@@ -362,10 +362,10 @@ Control IDs
     and version, see :ref:`querycap`.
 
 Applications can enumerate the available controls with the
-:ref:`VIDIOC_QUERYCTRL <vidioc-queryctrl>` and
-:ref:`VIDIOC_QUERYMENU <vidioc-queryctrl>` ioctls, get and set a
-control value with the :ref:`VIDIOC_G_CTRL <vidioc-g-ctrl>` and
-:ref:`VIDIOC_S_CTRL <vidioc-g-ctrl>` ioctls. Drivers must implement
+:ref:`VIDIOC_QUERYCTRL <VIDIOC_QUERYCTRL>` and
+:ref:`VIDIOC_QUERYMENU <VIDIOC_QUERYCTRL>` ioctls, get and set a
+control value with the :ref:`VIDIOC_G_CTRL <VIDIOC_G_CTRL>` and
+:ref:`VIDIOC_S_CTRL <VIDIOC_G_CTRL>` ioctls. Drivers must implement
 ``VIDIOC_QUERYCTRL``, ``VIDIOC_G_CTRL`` and ``VIDIOC_S_CTRL`` when the
 device has one or more controls, ``VIDIOC_QUERYMENU`` when it has one or
 more menu type controls.
@@ -522,7 +522,7 @@ more menu type controls.
    the real IDs.
 
    Many applications today still use the ``V4L2_CID_PRIVATE_BASE`` IDs
-   instead of using :ref:`VIDIOC_QUERYCTRL <vidioc-queryctrl>` with
+   instead of using :ref:`VIDIOC_QUERYCTRL <VIDIOC_QUERYCTRL>` with
    the ``V4L2_CTRL_FLAG_NEXT_CTRL`` flag to enumerate all IDs, so
    support for ``V4L2_CID_PRIVATE_BASE`` is still around.
 
Documentation/linux_tv/media/v4l/crop.rst +6 -6
index b9014d03865f..94f2d0e77ed8 100644
@@ -14,17 +14,17 @@ offset into a video signal.
 
 Applications can use the following API to select an area in the video
 signal, query the default area and the hardware limits. *Despite their
-name, the :ref:`VIDIOC_CROPCAP <vidioc-cropcap>`,
-:ref:`VIDIOC_G_CROP <vidioc-g-crop>` and
-:ref:`VIDIOC_S_CROP <vidioc-g-crop>` ioctls apply to input as well
+name, the :ref:`VIDIOC_CROPCAP <VIDIOC_CROPCAP>`,
+:ref:`VIDIOC_G_CROP <VIDIOC_G_CROP>` and
+:ref:`VIDIOC_S_CROP <VIDIOC_G_CROP>` ioctls apply to input as well
 as output devices.*
 
 Scaling requires a source and a target. On a video capture or overlay
 device the source is the video signal, and the cropping ioctls determine
 the area actually sampled. The target are images read by the application
 or overlaid onto the graphics screen. Their size (and position for an
-overlay) is negotiated with the :ref:`VIDIOC_G_FMT <vidioc-g-fmt>`
-and :ref:`VIDIOC_S_FMT <vidioc-g-fmt>` ioctls.
+overlay) is negotiated with the :ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>`
+and :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctls.
 
 On a video output device the source are the images passed in by the
 application, and their size is again negotiated with the
@@ -108,7 +108,7 @@ they may prefer a particular image size or a certain area in the video
 signal. If the driver has to adjust both to satisfy hardware
 limitations, the last requested rectangle shall take priority, and the
 driver should preferably adjust the opposite one. The
-:ref:`VIDIOC_TRY_FMT <vidioc-g-fmt>` ioctl however shall not change
+:ref:`VIDIOC_TRY_FMT <VIDIOC_G_FMT>` ioctl however shall not change
 the driver state and therefore only adjust the requested rectangle.
 
 Suppose scaling on a video capture device is restricted to a factor 1:1
Documentation/linux_tv/media/v4l/dev-capture.rst +4 -4
index 21207ab2e604..fd6357c995aa 100644
@@ -25,7 +25,7 @@ Devices supporting the video capture interface set the
 ``V4L2_CAP_VIDEO_CAPTURE`` or ``V4L2_CAP_VIDEO_CAPTURE_MPLANE`` flag in
 the ``capabilities`` field of struct
 :ref:`v4l2_capability <v4l2-capability>` returned by the
-:ref:`VIDIOC_QUERYCAP <vidioc-querycap>` ioctl. As secondary device
+:ref:`VIDIOC_QUERYCAP <VIDIOC_QUERYCAP>` ioctl. As secondary device
 functions they may also support the :ref:`video overlay <overlay>`
 (``V4L2_CAP_VIDEO_OVERLAY``) and the :ref:`raw VBI capture <raw-vbi>`
 (``V4L2_CAP_VBI_CAPTURE``) interface. At least one of the read/write or
@@ -65,7 +65,7 @@ To query the current image format applications set the ``type`` field of
 a struct :ref:`v4l2_format <v4l2-format>` to
 ``V4L2_BUF_TYPE_VIDEO_CAPTURE`` or
 ``V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE`` and call the
-:ref:`VIDIOC_G_FMT <vidioc-g-fmt>` ioctl with a pointer to this
+:ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>` ioctl with a pointer to this
 structure. Drivers fill the struct
 :ref:`v4l2_pix_format <v4l2-pix-format>` ``pix`` or the struct
 :ref:`v4l2_pix_format_mplane <v4l2-pix-format-mplane>` ``pix_mp``
@@ -75,12 +75,12 @@ To request different parameters applications set the ``type`` field of a
 struct :ref:`v4l2_format <v4l2-format>` as above and initialize all
 fields of the struct :ref:`v4l2_pix_format <v4l2-pix-format>`
 ``vbi`` member of the ``fmt`` union, or better just modify the results
-of ``VIDIOC_G_FMT``, and call the :ref:`VIDIOC_S_FMT <vidioc-g-fmt>`
+of ``VIDIOC_G_FMT``, and call the :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>`
 ioctl with a pointer to this structure. Drivers may adjust the
 parameters and finally return the actual parameters as ``VIDIOC_G_FMT``
 does.
 
-Like ``VIDIOC_S_FMT`` the :ref:`VIDIOC_TRY_FMT <vidioc-g-fmt>` ioctl
+Like ``VIDIOC_S_FMT`` the :ref:`VIDIOC_TRY_FMT <VIDIOC_G_FMT>` ioctl
 can be used to learn about hardware limitations without disabling I/O or
 possibly time consuming hardware preparations.
 
Documentation/linux_tv/media/v4l/dev-codec.rst +1 -1
index f0b54c2b95c3..1540755b1735 100644
@@ -15,7 +15,7 @@ A memory-to-memory video node acts just like a normal video node, but it
 supports both output (sending frames from memory to the codec hardware)
 and capture (receiving the processed frames from the codec hardware into
 memory) stream I/O. An application will have to setup the stream I/O for
-both sides and finally call :ref:`VIDIOC_STREAMON <vidioc-streamon>`
+both sides and finally call :ref:`VIDIOC_STREAMON <VIDIOC_STREAMON>`
 for both capture and output to start the codec.
 
 Video compression codecs use the MPEG controls to setup their codec
Documentation/linux_tv/media/v4l/dev-event.rst +2 -2
index afe24a72d8ea..5d21c6873b1a 100644
@@ -14,9 +14,9 @@ events.
 
 To receive events, the events the user is interested in first must be
 subscribed using the
-:ref:`VIDIOC_SUBSCRIBE_EVENT <vidioc-subscribe-event>` ioctl. Once
+:ref:`VIDIOC_SUBSCRIBE_EVENT <VIDIOC_SUBSCRIBE_EVENT>` ioctl. Once
 an event is subscribed, the events of subscribed types are dequeueable
-using the :ref:`VIDIOC_DQEVENT <vidioc-dqevent>` ioctl. Events may be
+using the :ref:`VIDIOC_DQEVENT <VIDIOC_DQEVENT>` ioctl. Events may be
 unsubscribed using VIDIOC_UNSUBSCRIBE_EVENT ioctl. The special event
 type V4L2_EVENT_ALL may be used to unsubscribe all the events the
 driver supports.
Documentation/linux_tv/media/v4l/dev-osd.rst +6 -6
index 077e2cdc598d..93fb8f309091 100644
@@ -17,7 +17,7 @@ The OSD function is accessible through the same character special file
 as the :ref:`Video Output <capture>` function. Note the default
 function of such a ``/dev/video`` device is video capturing or output.
 The OSD function is only available after calling the
-:ref:`VIDIOC_S_FMT <vidioc-g-fmt>` ioctl.
+:ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl.
 
 
 Querying Capabilities
@@ -26,7 +26,7 @@ Querying Capabilities
 Devices supporting the *Video Output Overlay* interface set the
 ``V4L2_CAP_VIDEO_OUTPUT_OVERLAY`` flag in the ``capabilities`` field of
 struct :ref:`v4l2_capability <v4l2-capability>` returned by the
-:ref:`VIDIOC_QUERYCAP <vidioc-querycap>` ioctl.
+:ref:`VIDIOC_QUERYCAP <VIDIOC_QUERYCAP>` ioctl.
 
 
 Framebuffer
@@ -36,7 +36,7 @@ Contrary to the *Video Overlay* interface the framebuffer is normally
 implemented on the TV card and not the graphics card. On Linux it is
 accessible as a framebuffer device (``/dev/fbN``). Given a V4L2 device,
 applications can find the corresponding framebuffer device by calling
-the :ref:`VIDIOC_G_FBUF <vidioc-g-fbuf>` ioctl. It returns, amongst
+the :ref:`VIDIOC_G_FBUF <VIDIOC_G_FBUF>` ioctl. It returns, amongst
 other information, the physical address of the framebuffer in the
 ``base`` field of struct :ref:`v4l2_framebuffer <v4l2-framebuffer>`.
 The framebuffer device ioctl ``FBIOGET_FSCREENINFO`` returns the same
@@ -115,17 +115,17 @@ clipping/blending method to be used for the overlay. To get the current
 parameters applications set the ``type`` field of a struct
 :ref:`v4l2_format <v4l2-format>` to
 ``V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY`` and call the
-:ref:`VIDIOC_G_FMT <vidioc-g-fmt>` ioctl. The driver fills the
+:ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>` ioctl. The driver fills the
 :c:type:`struct v4l2_window` substructure named ``win``. It is not
 possible to retrieve a previously programmed clipping list or bitmap.
 
 To program the source rectangle applications set the ``type`` field of a
 struct :ref:`v4l2_format <v4l2-format>` to
 ``V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY``, initialize the ``win``
-substructure and call the :ref:`VIDIOC_S_FMT <vidioc-g-fmt>` ioctl.
+substructure and call the :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl.
 The driver adjusts the parameters against hardware limits and returns
 the actual parameters as ``VIDIOC_G_FMT`` does. Like ``VIDIOC_S_FMT``,
-the :ref:`VIDIOC_TRY_FMT <vidioc-g-fmt>` ioctl can be used to learn
+the :ref:`VIDIOC_TRY_FMT <VIDIOC_G_FMT>` ioctl can be used to learn
 about driver capabilities without actually changing driver state. Unlike
 ``VIDIOC_S_FMT`` this also works after the overlay has been enabled.
 
Documentation/linux_tv/media/v4l/dev-output.rst +4 -4
index 0d46d59304b9..3efbbcc3c093 100644
@@ -24,7 +24,7 @@ Devices supporting the video output interface set the
 ``V4L2_CAP_VIDEO_OUTPUT`` or ``V4L2_CAP_VIDEO_OUTPUT_MPLANE`` flag in
 the ``capabilities`` field of struct
 :ref:`v4l2_capability <v4l2-capability>` returned by the
-:ref:`VIDIOC_QUERYCAP <vidioc-querycap>` ioctl. As secondary device
+:ref:`VIDIOC_QUERYCAP <VIDIOC_QUERYCAP>` ioctl. As secondary device
 functions they may also support the :ref:`raw VBI output <raw-vbi>`
 (``V4L2_CAP_VBI_OUTPUT``) interface. At least one of the read/write or
 streaming I/O methods must be supported. Modulators and audio outputs
@@ -62,7 +62,7 @@ defaults. An example is given in :ref:`crop`.
 To query the current image format applications set the ``type`` field of
 a struct :ref:`v4l2_format <v4l2-format>` to
 ``V4L2_BUF_TYPE_VIDEO_OUTPUT`` or ``V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE``
-and call the :ref:`VIDIOC_G_FMT <vidioc-g-fmt>` ioctl with a pointer
+and call the :ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>` ioctl with a pointer
 to this structure. Drivers fill the struct
 :ref:`v4l2_pix_format <v4l2-pix-format>` ``pix`` or the struct
 :ref:`v4l2_pix_format_mplane <v4l2-pix-format-mplane>` ``pix_mp``
@@ -72,12 +72,12 @@ To request different parameters applications set the ``type`` field of a
 struct :ref:`v4l2_format <v4l2-format>` as above and initialize all
 fields of the struct :ref:`v4l2_pix_format <v4l2-pix-format>`
 ``vbi`` member of the ``fmt`` union, or better just modify the results
-of ``VIDIOC_G_FMT``, and call the :ref:`VIDIOC_S_FMT <vidioc-g-fmt>`
+of ``VIDIOC_G_FMT``, and call the :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>`
 ioctl with a pointer to this structure. Drivers may adjust the
 parameters and finally return the actual parameters as ``VIDIOC_G_FMT``
 does.
 
-Like ``VIDIOC_S_FMT`` the :ref:`VIDIOC_TRY_FMT <vidioc-g-fmt>` ioctl
+Like ``VIDIOC_S_FMT`` the :ref:`VIDIOC_TRY_FMT <VIDIOC_G_FMT>` ioctl
 can be used to learn about hardware limitations without disabling I/O or
 possibly time consuming hardware preparations.
 
Documentation/linux_tv/media/v4l/dev-overlay.rst +19 -19
index 50aed591284b..8a81e19a5d7c 100644
@@ -20,7 +20,7 @@ Video overlay devices are accessed through the same character special
 files as :ref:`video capture <capture>` devices. Note the default
 function of a ``/dev/video`` device is video capturing. The overlay
 function is only available after calling the
-:ref:`VIDIOC_S_FMT <vidioc-g-fmt>` ioctl.
+:ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl.
 
 The driver may support simultaneous overlay and capturing using the
 read/write and streaming I/O methods. If so, operation at the nominal
@@ -41,7 +41,7 @@ Querying Capabilities
 Devices supporting the video overlay interface set the
 ``V4L2_CAP_VIDEO_OVERLAY`` flag in the ``capabilities`` field of struct
 :ref:`v4l2_capability <v4l2-capability>` returned by the
-:ref:`VIDIOC_QUERYCAP <vidioc-querycap>` ioctl. The overlay I/O
+:ref:`VIDIOC_QUERYCAP <VIDIOC_QUERYCAP>` ioctl. The overlay I/O
 method specified below must be supported. Tuners and audio inputs are
 optional.
 
@@ -63,8 +63,8 @@ Setup
 Before overlay can commence applications must program the driver with
 frame buffer parameters, namely the address and size of the frame buffer
 and the image format, for example RGB 5:6:5. The
-:ref:`VIDIOC_G_FBUF <vidioc-g-fbuf>` and
-:ref:`VIDIOC_S_FBUF <vidioc-g-fbuf>` ioctls are available to get and
+:ref:`VIDIOC_G_FBUF <VIDIOC_G_FBUF>` and
+:ref:`VIDIOC_S_FBUF <VIDIOC_G_FBUF>` ioctls are available to get and
 set these parameters, respectively. The ``VIDIOC_S_FBUF`` ioctl is
 privileged because it allows to set up DMA into physical memory,
 bypassing the memory protection mechanisms of the kernel. Only the
@@ -101,8 +101,8 @@ A driver may support any (or none) of five clipping/blending methods:
 When simultaneous capturing and overlay is supported and the hardware
 prohibits different image and frame buffer formats, the format requested
 first takes precedence. The attempt to capture
-(:ref:`VIDIOC_S_FMT <vidioc-g-fmt>`) or overlay
-(:ref:`VIDIOC_S_FBUF <vidioc-g-fbuf>`) may fail with an EBUSY error
+(:ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>`) or overlay
+(:ref:`VIDIOC_S_FBUF <VIDIOC_G_FBUF>`) may fail with an EBUSY error
 code or return accordingly modified parameters..
 
 
@@ -121,17 +121,17 @@ its position over the graphics surface and the clipping to be applied.
 To get the current parameters applications set the ``type`` field of a
 struct :ref:`v4l2_format <v4l2-format>` to
 ``V4L2_BUF_TYPE_VIDEO_OVERLAY`` and call the
-:ref:`VIDIOC_G_FMT <vidioc-g-fmt>` ioctl. The driver fills the
+:ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>` ioctl. The driver fills the
 :c:type:`struct v4l2_window` substructure named ``win``. It is not
 possible to retrieve a previously programmed clipping list or bitmap.
 
 To program the overlay window applications set the ``type`` field of a
 struct :ref:`v4l2_format <v4l2-format>` to
 ``V4L2_BUF_TYPE_VIDEO_OVERLAY``, initialize the ``win`` substructure and
-call the :ref:`VIDIOC_S_FMT <vidioc-g-fmt>` ioctl. The driver
+call the :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl. The driver
 adjusts the parameters against hardware limits and returns the actual
 parameters as ``VIDIOC_G_FMT`` does. Like ``VIDIOC_S_FMT``, the
-:ref:`VIDIOC_TRY_FMT <vidioc-g-fmt>` ioctl can be used to learn
+:ref:`VIDIOC_TRY_FMT <VIDIOC_G_FMT>` ioctl can be used to learn
 about driver capabilities without actually changing driver state. Unlike
 ``VIDIOC_S_FMT`` this also works after the overlay has been enabled.
 
@@ -142,7 +142,7 @@ of the cropping rectangle. For more information see :ref:`crop`.
 When simultaneous capturing and overlay is supported and the hardware
 prohibits different image and window sizes, the size requested first
 takes precedence. The attempt to capture or overlay as well
-(:ref:`VIDIOC_S_FMT <vidioc-g-fmt>`) may fail with an EBUSY error
+(:ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>`) may fail with an EBUSY error
 code or return accordingly modified parameters.
 
 
@@ -154,7 +154,7 @@ struct v4l2_window
 ``struct v4l2_rect w``
     Size and position of the window relative to the top, left corner of
     the frame buffer defined with
-    :ref:`VIDIOC_S_FBUF <vidioc-g-fbuf>`. The window can extend the
+    :ref:`VIDIOC_S_FBUF <VIDIOC_G_FBUF>`. The window can extend the
     frame buffer width and height, the ``x`` and ``y`` coordinates can
     be negative, and it can lie completely outside the frame buffer. The
     driver clips the window accordingly, or if that is not possible,
@@ -169,7 +169,7 @@ struct v4l2_window
 
 ``__u32 chromakey``
     When chroma-keying has been negotiated with
-    :ref:`VIDIOC_S_FBUF <vidioc-g-fbuf>` applications set this field
+    :ref:`VIDIOC_S_FBUF <VIDIOC_G_FBUF>` applications set this field
     to the desired pixel value for the chroma key. The format is the
     same as the pixel format of the framebuffer (struct
     :ref:`v4l2_framebuffer <v4l2-framebuffer>` ``fmt.pixelformat``
@@ -179,7 +179,7 @@ struct v4l2_window
 
 ``struct v4l2_clip * clips``
     When chroma-keying has *not* been negotiated and
-    :ref:`VIDIOC_G_FBUF <vidioc-g-fbuf>` indicated this capability,
+    :ref:`VIDIOC_G_FBUF <VIDIOC_G_FBUF>` indicated this capability,
     applications can set this field to point to an array of clipping
     rectangles.
 
@@ -192,7 +192,7 @@ applications should merge adjacent rectangles. Whether this must create
 x-y or y-x bands, or the order of rectangles, is not defined. When clip
 lists are not supported the driver ignores this field. Its contents
 after calling
-!ri!:ref:`VIDIOC_S_FMT <vidioc-g-fmt>`
+!ri!:ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>`
 are undefined.
 
 ``__u32 clipcount``
@@ -204,7 +204,7 @@ are undefined.
 
 ``void * bitmap``
     When chroma-keying has *not* been negotiated and
-    :ref:`VIDIOC_G_FBUF <vidioc-g-fbuf>` indicated this capability,
+    :ref:`VIDIOC_G_FBUF <VIDIOC_G_FBUF>` indicated this capability,
     applications can set this field to point to a clipping bit mask.
 
 It must be of the same size as the window, ``w.width`` and ``w.height``.
@@ -220,7 +220,7 @@ bits like:
 where ``0`` ≤ x < ``w.width`` and ``0`` ≤ y <``w.height``. [2]_
 
 When a clipping bit mask is not supported the driver ignores this field,
-its contents after calling :ref:`VIDIOC_S_FMT <vidioc-g-fmt>` are
+its contents after calling :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` are
 undefined. When a bit mask is supported but no clipping is desired this
 field must be set to ``NULL``.
 
@@ -234,12 +234,12 @@ exceeded are undefined. [3]_
     The global alpha value used to blend the framebuffer with video
     images, if global alpha blending has been negotiated
     (``V4L2_FBUF_FLAG_GLOBAL_ALPHA``, see
-    :ref:`VIDIOC_S_FBUF <vidioc-g-fbuf>`,
+    :ref:`VIDIOC_S_FBUF <VIDIOC_G_FBUF>`,
     :ref:`framebuffer-flags`).
 
 Note this field was added in Linux 2.6.23, extending the structure.
 However the
-!ri!:ref:`VIDIOC_G/S/TRY_FMT <vidioc-g-fmt>`
+!ri!:ref:`VIDIOC_G/S/TRY_FMT <VIDIOC_G_FMT>`
 ioctls, which take a pointer to a
 !ri!:ref:`v4l2_format <v4l2-format>`
 parent structure with padding bytes at the end, are not affected.
@@ -289,7 +289,7 @@ Enabling Overlay
 ================
 
 To start or stop the frame buffer overlay applications call the
-:ref:`VIDIOC_OVERLAY <vidioc-overlay>` ioctl.
+:ref:`VIDIOC_OVERLAY <VIDIOC_OVERLAY>` ioctl.
 
 .. [1]
    A common application of two file descriptors is the XFree86
Documentation/linux_tv/media/v4l/dev-radio.rst +3 -3
index 672540105a66..955173aaf48e 100644
@@ -21,7 +21,7 @@ Devices supporting the radio interface set the ``V4L2_CAP_RADIO`` and
 ``V4L2_CAP_TUNER`` or ``V4L2_CAP_MODULATOR`` flag in the
 ``capabilities`` field of struct
 :ref:`v4l2_capability <v4l2-capability>` returned by the
-:ref:`VIDIOC_QUERYCAP <vidioc-querycap>` ioctl. Other combinations of
+:ref:`VIDIOC_QUERYCAP <VIDIOC_QUERYCAP>` ioctl. Other combinations of
 capability flags are reserved for future extensions.
 
 
@@ -47,8 +47,8 @@ discussed in :ref:`tuner`) with index number zero to select the radio
 frequency and to determine if a monaural or FM stereo program is
 received/emitted. Drivers switch automatically between AM and FM
 depending on the selected frequency. The
-:ref:`VIDIOC_G_TUNER <vidioc-g-tuner>` or
-:ref:`VIDIOC_G_MODULATOR <vidioc-g-modulator>` ioctl reports the
+:ref:`VIDIOC_G_TUNER <VIDIOC_G_TUNER>` or
+:ref:`VIDIOC_G_MODULATOR <VIDIOC_G_MODULATOR>` ioctl reports the
 supported frequency range.
 
 
Documentation/linux_tv/media/v4l/dev-raw-vbi.rst +6 -6
index 9ab5c4a4cad7..883ac4fbaeb6 100644
@@ -28,7 +28,7 @@ applies to both input and output devices.
 To address the problems of finding related video and VBI devices VBI
 capturing and output is also available as device function under
 ``/dev/video``. To capture or output raw VBI data with these devices
-applications must call the :ref:`VIDIOC_S_FMT <vidioc-g-fmt>` ioctl.
+applications must call the :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl.
 Accessed as ``/dev/vbi``, raw VBI capturing or output is the default
 device function.
 
@@ -40,7 +40,7 @@ Devices supporting the raw VBI capturing or output API set the
 ``V4L2_CAP_VBI_CAPTURE`` or ``V4L2_CAP_VBI_OUTPUT`` flags, respectively,
 in the ``capabilities`` field of struct
 :ref:`v4l2_capability <v4l2-capability>` returned by the
-:ref:`VIDIOC_QUERYCAP <vidioc-querycap>` ioctl. At least one of the
+:ref:`VIDIOC_QUERYCAP <VIDIOC_QUERYCAP>` ioctl. At least one of the
 read/write, streaming or asynchronous I/O methods must be supported. VBI
 devices may or may not have a tuner or modulator.
 
@@ -71,7 +71,7 @@ parameters and then checking if the actual parameters are suitable.
 To query the current raw VBI capture parameters applications set the
 ``type`` field of a struct :ref:`v4l2_format <v4l2-format>` to
 ``V4L2_BUF_TYPE_VBI_CAPTURE`` or ``V4L2_BUF_TYPE_VBI_OUTPUT``, and call
-the :ref:`VIDIOC_G_FMT <vidioc-g-fmt>` ioctl with a pointer to this
+the :ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>` ioctl with a pointer to this
 structure. Drivers fill the struct
 :ref:`v4l2_vbi_format <v4l2-vbi-format>` ``vbi`` member of the
 ``fmt`` union.
@@ -80,7 +80,7 @@ To request different parameters applications set the ``type`` field of a
 struct :ref:`v4l2_format <v4l2-format>` as above and initialize all
 fields of the struct :ref:`v4l2_vbi_format <v4l2-vbi-format>`
 ``vbi`` member of the ``fmt`` union, or better just modify the results
-of ``VIDIOC_G_FMT``, and call the :ref:`VIDIOC_S_FMT <vidioc-g-fmt>`
+of ``VIDIOC_G_FMT``, and call the :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>`
 ioctl with a pointer to this structure. Drivers return an EINVAL error
 code only when the given parameters are ambiguous, otherwise they modify
 the parameters according to the hardware capabilities and return the
@@ -91,7 +91,7 @@ happen for instance when the video and VBI areas to capture would
 overlap, or when the driver supports multiple opens and another process
 already requested VBI capturing or output. Anyway, applications must
 expect other resource allocation points which may return EBUSY, at the
-:ref:`VIDIOC_STREAMON <vidioc-streamon>` ioctl and the first read(),
+:ref:`VIDIOC_STREAMON <VIDIOC_STREAMON>` ioctl and the first read(),
 write() and select() call.
 
 VBI devices must implement both the ``VIDIOC_G_FMT`` and
@@ -339,7 +339,7 @@ A VBI device may support :ref:`read/write <rw>` and/or streaming
 The latter bears the possibility of synchronizing video and VBI data by
 using buffer timestamps.
 
-Remember the :ref:`VIDIOC_STREAMON <vidioc-streamon>` ioctl and the
+Remember the :ref:`VIDIOC_STREAMON <VIDIOC_STREAMON>` ioctl and the
 first read(), write() and select() call can be resource allocation
 points returning an EBUSY error code if the required hardware resources
 are temporarily unavailable, for example the device is already in use by
Documentation/linux_tv/media/v4l/dev-rds.rst +2 -2
index 498752aa5eaf..af20f8fa1cdf 100644
@@ -33,7 +33,7 @@ Querying Capabilities
 Devices supporting the RDS capturing API set the
 ``V4L2_CAP_RDS_CAPTURE`` flag in the ``capabilities`` field of struct
 :ref:`v4l2_capability <v4l2-capability>` returned by the
-:ref:`VIDIOC_QUERYCAP <vidioc-querycap>` ioctl. Any tuner that
+:ref:`VIDIOC_QUERYCAP <VIDIOC_QUERYCAP>` ioctl. Any tuner that
 supports RDS will set the ``V4L2_TUNER_CAP_RDS`` flag in the
 ``capability`` field of struct :ref:`v4l2_tuner <v4l2-tuner>`. If the
 driver only passes RDS blocks without interpreting the data the
@@ -52,7 +52,7 @@ Whether an RDS signal is present can be detected by looking at the
 Devices supporting the RDS output API set the ``V4L2_CAP_RDS_OUTPUT``
 flag in the ``capabilities`` field of struct
 :ref:`v4l2_capability <v4l2-capability>` returned by the
-:ref:`VIDIOC_QUERYCAP <vidioc-querycap>` ioctl. Any modulator that
+:ref:`VIDIOC_QUERYCAP <VIDIOC_QUERYCAP>` ioctl. Any modulator that
 supports RDS will set the ``V4L2_TUNER_CAP_RDS`` flag in the
 ``capability`` field of struct
 :ref:`v4l2_modulator <v4l2-modulator>`. In order to enable the RDS
Documentation/linux_tv/media/v4l/dev-sdr.rst +4 -4
index 8e9e34b8d53a..5e4f7030f644 100644
@@ -22,7 +22,7 @@ Devices supporting the SDR receiver interface set the
 ``V4L2_CAP_SDR_CAPTURE`` and ``V4L2_CAP_TUNER`` flag in the
 ``capabilities`` field of struct
 :ref:`v4l2_capability <v4l2-capability>` returned by the
-:ref:`VIDIOC_QUERYCAP <vidioc-querycap>` ioctl. That flag means the
+:ref:`VIDIOC_QUERYCAP <VIDIOC_QUERYCAP>` ioctl. That flag means the
 device has an Analog to Digital Converter (ADC), which is a mandatory
 element for the SDR receiver.
 
@@ -30,7 +30,7 @@ Devices supporting the SDR transmitter interface set the
 ``V4L2_CAP_SDR_OUTPUT`` and ``V4L2_CAP_MODULATOR`` flag in the
 ``capabilities`` field of struct
 :ref:`v4l2_capability <v4l2-capability>` returned by the
-:ref:`VIDIOC_QUERYCAP <vidioc-querycap>` ioctl. That flag means the
+:ref:`VIDIOC_QUERYCAP <VIDIOC_QUERYCAP>` ioctl. That flag means the
 device has an Digital to Analog Converter (DAC), which is a mandatory
 element for the SDR transmitter.
 
@@ -52,7 +52,7 @@ radio frequency. The tuner index of the RF tuner (if any) must always
 follow the SDR tuner index. Normally the SDR tuner is #0 and the RF
 tuner is #1.
 
-The :ref:`VIDIOC_S_HW_FREQ_SEEK <vidioc-s-hw-freq-seek>` ioctl is
+The :ref:`VIDIOC_S_HW_FREQ_SEEK <VIDIOC_S_HW_FREQ_SEEK>` ioctl is
 not supported.
 
 
@@ -63,7 +63,7 @@ The SDR device uses the :ref:`format <format>` ioctls to select the
 capture and output format. Both the sampling resolution and the data
 streaming format are bound to that selectable format. In addition to the
 basic :ref:`format <format>` ioctls, the
-:ref:`VIDIOC_ENUM_FMT <vidioc-enum-fmt>` ioctl must be supported as
+:ref:`VIDIOC_ENUM_FMT <VIDIOC_ENUM_FMT>` ioctl must be supported as
 well.
 
 To use the :ref:`format <format>` ioctls applications set the ``type``
Documentation/linux_tv/media/v4l/dev-sliced-vbi.rst +18 -18
index 90d879964f52..0faf178168e4 100644
@@ -21,7 +21,7 @@ Sliced VBI capture and output devices are accessed through the same
 character special files as raw VBI devices. When a driver supports both
 interfaces, the default function of a ``/dev/vbi`` device is *raw* VBI
 capturing or output, and the sliced VBI function is only available after
-calling the :ref:`VIDIOC_S_FMT <vidioc-g-fmt>` ioctl as defined
+calling the :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl as defined
 below. Likewise a ``/dev/video`` device may support the sliced VBI API,
 however the default function here is video capturing or output.
 Different file descriptors must be used to pass raw and sliced VBI data
@@ -35,7 +35,7 @@ Devices supporting the sliced VBI capturing or output API set the
 ``V4L2_CAP_SLICED_VBI_CAPTURE`` or ``V4L2_CAP_SLICED_VBI_OUTPUT`` flag
 respectively, in the ``capabilities`` field of struct
 :ref:`v4l2_capability <v4l2-capability>` returned by the
-:ref:`VIDIOC_QUERYCAP <vidioc-querycap>` ioctl. At least one of the
+:ref:`VIDIOC_QUERYCAP <VIDIOC_QUERYCAP>` ioctl. At least one of the
 read/write, streaming or asynchronous :ref:`I/O methods <io>` must be
 supported. Sliced VBI devices may have a tuner or modulator.
 
@@ -57,10 +57,10 @@ Sliced VBI Format Negotiation
 
 To find out which data services are supported by the hardware
 applications can call the
-:ref:`VIDIOC_G_SLICED_VBI_CAP <vidioc-g-sliced-vbi-cap>` ioctl.
+:ref:`VIDIOC_G_SLICED_VBI_CAP <VIDIOC_G_SLICED_VBI_CAP>` ioctl.
 All drivers implementing the sliced VBI interface must support this
 ioctl. The results may differ from those of the
-:ref:`VIDIOC_S_FMT <vidioc-g-fmt>` ioctl when the number of VBI
+:ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl when the number of VBI
 lines the hardware can capture or output per frame, or the number of
 services it can identify on a given line are limited. For example on PAL
 line 16 the hardware may be able to look for a VPS or Teletext signal,
@@ -70,13 +70,13 @@ To determine the currently selected services applications set the
 ``type`` field of struct :ref:`v4l2_format <v4l2-format>` to
 ``V4L2_BUF_TYPE_SLICED_VBI_CAPTURE`` or
 ``V4L2_BUF_TYPE_SLICED_VBI_OUTPUT``, and the
-:ref:`VIDIOC_G_FMT <vidioc-g-fmt>` ioctl fills the ``fmt.sliced``
+:ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>` ioctl fills the ``fmt.sliced``
 member, a struct
 :ref:`v4l2_sliced_vbi_format <v4l2-sliced-vbi-format>`.
 
 Applications can request different parameters by initializing or
 modifying the ``fmt.sliced`` member and calling the
-:ref:`VIDIOC_S_FMT <vidioc-g-fmt>` ioctl with a pointer to the
+:ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl with a pointer to the
 :c:type:`struct v4l2_format` structure.
 
 The sliced VBI API is more complicated than the raw VBI API because the
@@ -90,12 +90,12 @@ array according to hardware capabilities. Only if more precise control
 is needed should the programmer set the ``service_lines`` array
 explicitly.
 
-The :ref:`VIDIOC_S_FMT <vidioc-g-fmt>` ioctl modifies the parameters
+The :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl modifies the parameters
 according to hardware capabilities. When the driver allocates resources
 at this point, it may return an EBUSY error code if the required
 resources are temporarily unavailable. Other resource allocation points
 which may return EBUSY can be the
-:ref:`VIDIOC_STREAMON <vidioc-streamon>` ioctl and the first
+:ref:`VIDIOC_STREAMON <VIDIOC_STREAMON>` ioctl and the first
 :ref:`read() <func-read>`, :ref:`write() <func-write>` and
 :ref:`select() <func-select>` call.
 
@@ -117,8 +117,8 @@ which may return EBUSY can be the
        -  :cspan:`2`
 
           If ``service_set`` is non-zero when passed with
-          :ref:`VIDIOC_S_FMT <vidioc-g-fmt>` or
-          :ref:`VIDIOC_TRY_FMT <vidioc-g-fmt>`, the ``service_lines``
+          :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` or
+          :ref:`VIDIOC_TRY_FMT <VIDIOC_G_FMT>`, the ``service_lines``
           array will be filled by the driver according to the services
           specified in this field. For example, if ``service_set`` is
           initialized with ``V4L2_SLICED_TELETEXT_B | V4L2_SLICED_WSS_625``,
@@ -224,8 +224,8 @@ which may return EBUSY can be the
        -  :cspan:`2` Maximum number of bytes passed by one
           :ref:`read() <func-read>` or :ref:`write() <func-write>` call,
           and the buffer size in bytes for the
-          :ref:`VIDIOC_QBUF <vidioc-qbuf>` and
-          :ref:`VIDIOC_DQBUF <vidioc-qbuf>` ioctl. Drivers set this field
+          :ref:`VIDIOC_QBUF <VIDIOC_QBUF>` and
+          :ref:`VIDIOC_DQBUF <VIDIOC_QBUF>` ioctl. Drivers set this field
           to the size of struct
           :ref:`v4l2_sliced_vbi_data <v4l2-sliced-vbi-data>` times the
           number of non-zero elements in the returned ``service_lines``
@@ -340,11 +340,11 @@ Drivers may return an EINVAL error code when applications attempt to
 read or write data without prior format negotiation, after switching the
 video standard (which may invalidate the negotiated VBI parameters) and
 after switching the video input (which may change the video standard as
-a side effect). The :ref:`VIDIOC_S_FMT <vidioc-g-fmt>` ioctl may
+a side effect). The :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl may
 return an EBUSY error code when applications attempt to change the
 format while i/o is in progress (between a
-:ref:`VIDIOC_STREAMON <vidioc-streamon>` and
-:ref:`VIDIOC_STREAMOFF <vidioc-streamon>` call, and after the first
+:ref:`VIDIOC_STREAMON <VIDIOC_STREAMON>` and
+:ref:`VIDIOC_STREAMOFF <VIDIOC_STREAMON>` call, and after the first
 :ref:`read() <func-read>` or :ref:`write() <func-write>` call).
 
 
@@ -428,12 +428,12 @@ of one video frame. The ``id`` of unused
 
 Packets are always passed in ascending line number order, without
 duplicate line numbers. The :ref:`write() <func-write>` function and
-the :ref:`VIDIOC_QBUF <vidioc-qbuf>` ioctl must return an EINVAL
+the :ref:`VIDIOC_QBUF <VIDIOC_QBUF>` ioctl must return an EINVAL
 error code when applications violate this rule. They must also return an
 EINVAL error code when applications pass an incorrect field or line
 number, or a combination of ``field``, ``line`` and ``id`` which has not
-been negotiated with the :ref:`VIDIOC_G_FMT <vidioc-g-fmt>` or
-:ref:`VIDIOC_S_FMT <vidioc-g-fmt>` ioctl. When the line numbers are
+been negotiated with the :ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>` or
+:ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl. When the line numbers are
 unknown the driver must pass the packets in transmitted order. The
 driver can insert empty packets with ``id`` set to zero anywhere in the
 packet array.
Documentation/linux_tv/media/v4l/dev-subdev.rst +11 -11
index 66274eafd437..1fe594c0026f 100644
@@ -86,7 +86,7 @@ Pad-level Formats
 
 Image formats are typically negotiated on video capture and output
 devices using the format and
-:ref:`selection <vidioc-subdev-g-selection>` ioctls. The driver is
+:ref:`selection <VIDIOC_SUBDEV_G_SELECTION>` ioctls. The driver is
 responsible for configuring every block in the video pipeline according
 to the requested format at the pipeline input and/or output.
 
@@ -118,18 +118,18 @@ every point in the pipeline explicitly.
 Drivers that implement the :ref:`media API <media-controller-intro>`
 can expose pad-level image format configuration to applications. When
 they do, applications can use the
-:ref:`VIDIOC_SUBDEV_G_FMT <vidioc-subdev-g-fmt>` and
-:ref:`VIDIOC_SUBDEV_S_FMT <vidioc-subdev-g-fmt>` ioctls. to
+:ref:`VIDIOC_SUBDEV_G_FMT <VIDIOC_SUBDEV_G_FMT>` and
+:ref:`VIDIOC_SUBDEV_S_FMT <VIDIOC_SUBDEV_G_FMT>` ioctls. to
 negotiate formats on a per-pad basis.
 
 Applications are responsible for configuring coherent parameters on the
 whole pipeline and making sure that connected pads have compatible
 formats. The pipeline is checked for formats mismatch at
-:ref:`VIDIOC_STREAMON <vidioc-streamon>` time, and an EPIPE error
+:ref:`VIDIOC_STREAMON <VIDIOC_STREAMON>` time, and an EPIPE error
 code is then returned if the configuration is invalid.
 
 Pad-level image format configuration support can be tested by calling
-the :ref:`VIDIOC_SUBDEV_G_FMT <vidioc-subdev-g-fmt>` ioctl on pad
+the :ref:`VIDIOC_SUBDEV_G_FMT <VIDIOC_SUBDEV_G_FMT>` ioctl on pad
 0. If the driver returns an EINVAL error code pad-level format
 configuration is not supported by the sub-device.
 
@@ -146,8 +146,8 @@ formats enumeration only. A format negotiation mechanism is required.
 Central to the format negotiation mechanism are the get/set format
 operations. When called with the ``which`` argument set to
 ``V4L2_SUBDEV_FORMAT_TRY``, the
-:ref:`VIDIOC_SUBDEV_G_FMT <vidioc-subdev-g-fmt>` and
-:ref:`VIDIOC_SUBDEV_S_FMT <vidioc-subdev-g-fmt>` ioctls operate on
+:ref:`VIDIOC_SUBDEV_G_FMT <VIDIOC_SUBDEV_G_FMT>` and
+:ref:`VIDIOC_SUBDEV_S_FMT <VIDIOC_SUBDEV_G_FMT>` ioctls operate on
 a set of formats parameters that are not connected to the hardware
 configuration. Modifying those 'try' formats leaves the device state
 untouched (this applies to both the software state stored in the driver
@@ -155,14 +155,14 @@ and the hardware state stored in the device itself).
 
 While not kept as part of the device state, try formats are stored in
 the sub-device file handles. A
-:ref:`VIDIOC_SUBDEV_G_FMT <vidioc-subdev-g-fmt>` call will return
+:ref:`VIDIOC_SUBDEV_G_FMT <VIDIOC_SUBDEV_G_FMT>` call will return
 the last try format set *on the same sub-device file handle*. Several
 applications querying the same sub-device at the same time will thus not
 interact with each other.
 
 To find out whether a particular format is supported by the device,
 applications use the
-:ref:`VIDIOC_SUBDEV_S_FMT <vidioc-subdev-g-fmt>` ioctl. Drivers
+:ref:`VIDIOC_SUBDEV_S_FMT <VIDIOC_SUBDEV_G_FMT>` ioctl. Drivers
 verify and, if needed, change the requested ``format`` based on device
 requirements and return the possibly modified value. Applications can
 then choose to try a different format or accept the returned value and
@@ -171,7 +171,7 @@ continue.
 Formats returned by the driver during a negotiation iteration are
 guaranteed to be supported by the device. In particular, drivers
 guarantee that a returned format will not be further changed if passed
-to an :ref:`VIDIOC_SUBDEV_S_FMT <vidioc-subdev-g-fmt>` call as-is
+to an :ref:`VIDIOC_SUBDEV_S_FMT <VIDIOC_SUBDEV_G_FMT>` call as-is
 (as long as external parameters, such as formats on other pads or links'
 configuration are not changed).
 
@@ -353,7 +353,7 @@ struct :ref:`v4l2_rect <v4l2-rect>`.
 Scaling support is optional. When supported by a subdev, the crop
 rectangle on the subdev's sink pad is scaled to the size configured
 using the
-:ref:`VIDIOC_SUBDEV_S_SELECTION <vidioc-subdev-g-selection>` IOCTL
+:ref:`VIDIOC_SUBDEV_S_SELECTION <VIDIOC_SUBDEV_G_SELECTION>` IOCTL
 using ``V4L2_SEL_TGT_COMPOSE`` selection target on the same pad. If the
 subdev supports scaling but not composing, the top and left values are
 not used and must always be set to zero.
Documentation/linux_tv/media/v4l/diff-v4l.rst +48 -48

269 lines not on this page · raw message

Documentation/linux_tv/media/v4l/dmabuf.rst +10 -10
index ac14cf89fa38..bc2944c27e70 100644
@@ -14,15 +14,15 @@ previously exported for a different or the same device (known as the
 importer role), or both. This section describes the DMABUF importer role
 API in V4L2.
 
-Refer to :ref:`DMABUF exporting <vidioc-expbuf>` for details about
+Refer to :ref:`DMABUF exporting <VIDIOC_EXPBUF>` for details about
 exporting V4L2 buffers as DMABUF file descriptors.
 
 Input and output devices support the streaming I/O method when the
 ``V4L2_CAP_STREAMING`` flag in the ``capabilities`` field of struct
 :ref:`v4l2_capability <v4l2-capability>` returned by the
-:ref:`VIDIOC_QUERYCAP <vidioc-querycap>` ioctl is set. Whether
+:ref:`VIDIOC_QUERYCAP <VIDIOC_QUERYCAP>` ioctl is set. Whether
 importing DMA buffers through DMABUF file descriptors is supported is
-determined by calling the :ref:`VIDIOC_REQBUFS <vidioc-reqbufs>`
+determined by calling the :ref:`VIDIOC_REQBUFS <VIDIOC_REQBUFS>`
 ioctl with the memory type set to ``V4L2_MEMORY_DMABUF``.
 
 This I/O method is dedicated to sharing DMA buffers between different
@@ -34,7 +34,7 @@ such file descriptor are exchanged. The descriptors and meta-information
 are passed in struct :ref:`v4l2_buffer <v4l2-buffer>` (or in struct
 :ref:`v4l2_plane <v4l2-plane>` in the multi-planar API case). The
 driver must be switched into DMABUF I/O mode by calling the
-:ref:`VIDIOC_REQBUFS <vidioc-reqbufs>` with the desired buffer type.
+:ref:`VIDIOC_REQBUFS <VIDIOC_REQBUFS>` with the desired buffer type.
 
 
 .. code-block:: c
@@ -56,7 +56,7 @@ driver must be switched into DMABUF I/O mode by calling the
     }
 
 The buffer (plane) file descriptor is passed on the fly with the
-:ref:`VIDIOC_QBUF <vidioc-qbuf>` ioctl. In case of multiplanar
+:ref:`VIDIOC_QBUF <VIDIOC_QBUF>` ioctl. In case of multiplanar
 buffers, every plane can be associated with a different DMABUF
 descriptor. Although buffers are commonly cycled, applications can pass
 a different DMABUF descriptor at each ``VIDIOC_QBUF`` call.
@@ -112,11 +112,11 @@ a different DMABUF descriptor at each ``VIDIOC_QBUF`` call.
     }
 
 Captured or displayed buffers are dequeued with the
-:ref:`VIDIOC_DQBUF <vidioc-qbuf>` ioctl. The driver can unlock the
+:ref:`VIDIOC_DQBUF <VIDIOC_QBUF>` ioctl. The driver can unlock the
 buffer at any time between the completion of the DMA and this ioctl. The
 memory is also unlocked when
-:ref:`VIDIOC_STREAMOFF <vidioc-streamon>` is called,
-:ref:`VIDIOC_REQBUFS <vidioc-reqbufs>`, or when the device is closed.
+:ref:`VIDIOC_STREAMOFF <VIDIOC_STREAMON>` is called,
+:ref:`VIDIOC_REQBUFS <VIDIOC_REQBUFS>`, or when the device is closed.
 
 For capturing applications it is customary to enqueue a number of empty
 buffers, to start capturing and enter the read loop. Here the
@@ -134,8 +134,8 @@ immediately with an EAGAIN error code when no buffer is available. The
 functions are always available.
 
 To start and stop capturing or displaying applications call the
-:ref:`VIDIOC_STREAMON <vidioc-streamon>` and
-:ref:`VIDIOC_STREAMOFF <vidioc-streamon>` ioctls. Note that
+:ref:`VIDIOC_STREAMON <VIDIOC_STREAMON>` and
+:ref:`VIDIOC_STREAMOFF <VIDIOC_STREAMON>` ioctls. Note that
 ``VIDIOC_STREAMOFF`` removes all buffers from both queues and unlocks
 all buffers as a side effect. Since there is no notion of doing anything
 "now" on a multitasking system, if an application needs to synchronize
Documentation/linux_tv/media/v4l/dv-timings.rst +5 -5
index a347ce7cb504..d51c36ec604c 100644
@@ -24,14 +24,14 @@ standards.
 
 To enumerate and query the attributes of the DV timings supported by a
 device applications use the
-:ref:`VIDIOC_ENUM_DV_TIMINGS <vidioc-enum-dv-timings>` and
-:ref:`VIDIOC_DV_TIMINGS_CAP <vidioc-dv-timings-cap>` ioctls. To set
+:ref:`VIDIOC_ENUM_DV_TIMINGS <VIDIOC_ENUM_DV_TIMINGS>` and
+:ref:`VIDIOC_DV_TIMINGS_CAP <VIDIOC_DV_TIMINGS_CAP>` ioctls. To set
 DV timings for the device applications use the
-:ref:`VIDIOC_S_DV_TIMINGS <vidioc-g-dv-timings>` ioctl and to get
+:ref:`VIDIOC_S_DV_TIMINGS <VIDIOC_G_DV_TIMINGS>` ioctl and to get
 current DV timings they use the
-:ref:`VIDIOC_G_DV_TIMINGS <vidioc-g-dv-timings>` ioctl. To detect
+:ref:`VIDIOC_G_DV_TIMINGS <VIDIOC_G_DV_TIMINGS>` ioctl. To detect
 the DV timings as seen by the video receiver applications use the
-:ref:`VIDIOC_QUERY_DV_TIMINGS <vidioc-query-dv-timings>` ioctl.
+:ref:`VIDIOC_QUERY_DV_TIMINGS <VIDIOC_QUERY_DV_TIMINGS>` ioctl.
 
 Applications can make use of the :ref:`input-capabilities` and
 :ref:`output-capabilities` flags to determine whether the digital
Documentation/linux_tv/media/v4l/extended-controls.rst +20 -20
index 5f9779e94cde..66333b9f60fd 100644
@@ -39,12 +39,12 @@ The Extended Control API
 ========================
 
 Three new ioctls are available:
-:ref:`VIDIOC_G_EXT_CTRLS <vidioc-g-ext-ctrls>`,
-:ref:`VIDIOC_S_EXT_CTRLS <vidioc-g-ext-ctrls>` and
-:ref:`VIDIOC_TRY_EXT_CTRLS <vidioc-g-ext-ctrls>`. These ioctls act
+:ref:`VIDIOC_G_EXT_CTRLS <VIDIOC_G_EXT_CTRLS>`,
+:ref:`VIDIOC_S_EXT_CTRLS <VIDIOC_G_EXT_CTRLS>` and
+:ref:`VIDIOC_TRY_EXT_CTRLS <VIDIOC_G_EXT_CTRLS>`. These ioctls act
 on arrays of controls (as opposed to the
-:ref:`VIDIOC_G_CTRL <vidioc-g-ctrl>` and
-:ref:`VIDIOC_S_CTRL <vidioc-g-ctrl>` ioctls that act on a single
+:ref:`VIDIOC_G_CTRL <VIDIOC_G_CTRL>` and
+:ref:`VIDIOC_S_CTRL <VIDIOC_G_CTRL>` ioctls that act on a single
 control). This is needed since it is often required to atomically change
 several controls at once.
 
@@ -79,17 +79,17 @@ with compound types should only be used programmatically.
 
 Since such compound controls need to expose more information about
 themselves than is possible with
-:ref:`VIDIOC_QUERYCTRL <vidioc-queryctrl>` the
-:ref:`VIDIOC_QUERY_EXT_CTRL <vidioc-queryctrl>` ioctl was added. In
+:ref:`VIDIOC_QUERYCTRL <VIDIOC_QUERYCTRL>` the
+:ref:`VIDIOC_QUERY_EXT_CTRL <VIDIOC_QUERYCTRL>` ioctl was added. In
 particular, this ioctl gives the dimensions of the N-dimensional array
 if this control consists of more than one element.
 
 It is important to realize that due to the flexibility of controls it is
 necessary to check whether the control you want to set actually is
 supported in the driver and what the valid range of values is. So use
-the :ref:`VIDIOC_QUERYCTRL <vidioc-queryctrl>` (or
-:ref:`VIDIOC_QUERY_EXT_CTRL <vidioc-queryctrl>`) and
-:ref:`VIDIOC_QUERYMENU <vidioc-queryctrl>` ioctls to check this. Also
+the :ref:`VIDIOC_QUERYCTRL <VIDIOC_QUERYCTRL>` (or
+:ref:`VIDIOC_QUERY_EXT_CTRL <VIDIOC_QUERYCTRL>`) and
+:ref:`VIDIOC_QUERYMENU <VIDIOC_QUERYCTRL>` ioctls to check this. Also
 note that it is possible that some of the menu indices in a control of
 type ``V4L2_CTRL_TYPE_MENU`` may not be supported (``VIDIOC_QUERYMENU``
 will return an error). A good example is the list of supported MPEG
@@ -103,7 +103,7 @@ Enumerating Extended Controls
 =============================
 
 The recommended way to enumerate over the extended controls is by using
-:ref:`VIDIOC_QUERYCTRL <vidioc-queryctrl>` in combination with the
+:ref:`VIDIOC_QUERYCTRL <VIDIOC_QUERYCTRL>` in combination with the
 ``V4L2_CTRL_FLAG_NEXT_CTRL`` flag:
 
 
@@ -169,7 +169,7 @@ within a control panel.
 
 The flags field of struct :ref:`v4l2_queryctrl <v4l2-queryctrl>` also
 contains hints on the behavior of the control. See the
-:ref:`VIDIOC_QUERYCTRL <vidioc-queryctrl>` documentation for more
+:ref:`VIDIOC_QUERYCTRL <VIDIOC_QUERYCTRL>` documentation for more
 details.
 
 
@@ -198,7 +198,7 @@ Codec Control IDs
 
 ``V4L2_CID_MPEG_CLASS (class)``
     The Codec class descriptor. Calling
-    :ref:`VIDIOC_QUERYCTRL <vidioc-queryctrl>` for this control will
+    :ref:`VIDIOC_QUERYCTRL <VIDIOC_QUERYCTRL>` for this control will
     return a description of this control class. This description can be
     used as the caption of a Tab page in a GUI, for example.
 
@@ -1168,7 +1168,7 @@ Codec Control IDs
     This read-only control returns the 33-bit video Presentation Time
     Stamp as defined in ITU T-REC-H.222.0 and ISO/IEC 13818-1 of the
     currently displayed frame. This is the same PTS as is used in
-    :ref:`VIDIOC_DECODER_CMD <vidioc-decoder-cmd>`.
+    :ref:`VIDIOC_DECODER_CMD <VIDIOC_DECODER_CMD>`.
 
 .. _`v4l2-mpeg-video-dec-frame`:
 
@@ -2781,7 +2781,7 @@ Camera Control IDs
 
 ``V4L2_CID_CAMERA_CLASS (class)``
     The Camera class descriptor. Calling
-    :ref:`VIDIOC_QUERYCTRL <vidioc-queryctrl>` for this control will
+    :ref:`VIDIOC_QUERYCTRL <VIDIOC_QUERYCTRL>` for this control will
     return a description of this control class.
 
 .. _`v4l2-exposure-auto-type`:
@@ -3441,7 +3441,7 @@ FM_TX Control IDs
 
 ``V4L2_CID_FM_TX_CLASS (class)``
     The FM_TX class descriptor. Calling
-    :ref:`VIDIOC_QUERYCTRL <vidioc-queryctrl>` for this control will
+    :ref:`VIDIOC_QUERYCTRL <VIDIOC_QUERYCTRL>` for this control will
     return a description of this control class.
 
 ``V4L2_CID_RDS_TX_DEVIATION (integer)``
@@ -3870,7 +3870,7 @@ JPEG Control IDs
 
 ``V4L2_CID_JPEG_CLASS (class)``
     The JPEG class descriptor. Calling
-    :ref:`VIDIOC_QUERYCTRL <vidioc-queryctrl>` for this control will
+    :ref:`VIDIOC_QUERYCTRL <VIDIOC_QUERYCTRL>` for this control will
     return a description of this control class.
 
 ``V4L2_CID_JPEG_CHROMA_SUBSAMPLING (menu)``
@@ -4271,7 +4271,7 @@ FM_RX Control IDs
 
 ``V4L2_CID_FM_RX_CLASS (class)``
     The FM_RX class descriptor. Calling
-    :ref:`VIDIOC_QUERYCTRL <vidioc-queryctrl>` for this control will
+    :ref:`VIDIOC_QUERYCTRL <VIDIOC_QUERYCTRL>` for this control will
     return a description of this control class.
 
 ``V4L2_CID_RDS_RECEPTION (boolean)``
@@ -4369,7 +4369,7 @@ Detect Control IDs
 
 ``V4L2_CID_DETECT_CLASS (class)``
     The Detect class descriptor. Calling
-    :ref:`VIDIOC_QUERYCTRL <vidioc-queryctrl>` for this control will
+    :ref:`VIDIOC_QUERYCTRL <VIDIOC_QUERYCTRL>` for this control will
     return a description of this control class.
 
 ``V4L2_CID_DETECT_MD_MODE (menu)``
@@ -4463,7 +4463,7 @@ RF_TUNER Control IDs
 
 ``V4L2_CID_RF_TUNER_CLASS (class)``
     The RF_TUNER class descriptor. Calling
-    :ref:`VIDIOC_QUERYCTRL <vidioc-queryctrl>` for this control will
+    :ref:`VIDIOC_QUERYCTRL <VIDIOC_QUERYCTRL>` for this control will
     return a description of this control class.
 
 ``V4L2_CID_RF_TUNER_BANDWIDTH_AUTO (boolean)``
Documentation/linux_tv/media/v4l/field-order.rst +3 -3
index 295ec0430183..0ab52df521a8 100644
@@ -48,7 +48,7 @@ All video capture and output devices must report the current field
 order. Some drivers may permit the selection of a different order, to
 this end applications initialize the ``field`` field of struct
 :ref:`v4l2_pix_format <v4l2-pix-format>` before calling the
-:ref:`VIDIOC_S_FMT <vidioc-g-fmt>` ioctl. If this is not desired it
+:ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl. If this is not desired it
 should have the value ``V4L2_FIELD_ANY`` (0).
 
 
@@ -73,8 +73,8 @@ should have the value ``V4L2_FIELD_ANY`` (0).
           size, and return the actual field order. Drivers must never return
           ``V4L2_FIELD_ANY``. If multiple field orders are possible the
           driver must choose one of the possible field orders during
-          :ref:`VIDIOC_S_FMT <vidioc-g-fmt>` or
-          :ref:`VIDIOC_TRY_FMT <vidioc-g-fmt>`. struct
+          :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` or
+          :ref:`VIDIOC_TRY_FMT <VIDIOC_G_FMT>`. struct
           :ref:`v4l2_buffer <v4l2-buffer>` ``field`` can never be
           ``V4L2_FIELD_ANY``.
 
Documentation/linux_tv/media/v4l/format.rst +5 -5
index c1e30a64c833..a754fa81f707 100644
@@ -23,9 +23,9 @@ current selection.
 
 A single mechanism exists to negotiate all data formats using the
 aggregate struct :ref:`v4l2_format <v4l2-format>` and the
-:ref:`VIDIOC_G_FMT <vidioc-g-fmt>` and
-:ref:`VIDIOC_S_FMT <vidioc-g-fmt>` ioctls. Additionally the
-:ref:`VIDIOC_TRY_FMT <vidioc-g-fmt>` ioctl can be used to examine
+:ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>` and
+:ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctls. Additionally the
+:ref:`VIDIOC_TRY_FMT <VIDIOC_G_FMT>` ioctl can be used to examine
 what the hardware *could* do, without actually selecting a new data
 format. The data formats supported by the V4L2 API are covered in the
 respective device section in :ref:`devices`. For a closer look at
@@ -52,7 +52,7 @@ image size.
 
 When applications omit the ``VIDIOC_S_FMT`` ioctl its locking side
 effects are implied by the next step, the selection of an I/O method
-with the :ref:`VIDIOC_REQBUFS <vidioc-reqbufs>` ioctl or implicit
+with the :ref:`VIDIOC_REQBUFS <VIDIOC_REQBUFS>` ioctl or implicit
 with the first :ref:`read() <func-read>` or
 :ref:`write() <func-write>` call.
 
@@ -75,7 +75,7 @@ Apart of the generic format negotiation functions a special ioctl to
 enumerate all image formats supported by video capture, overlay or
 output devices is available. [1]_
 
-The :ref:`VIDIOC_ENUM_FMT <vidioc-enum-fmt>` ioctl must be supported
+The :ref:`VIDIOC_ENUM_FMT <VIDIOC_ENUM_FMT>` ioctl must be supported
 by all drivers exchanging image data with applications.
 
     **Important**
Documentation/linux_tv/media/v4l/func-mmap.rst +3 -3
index fb6e4cd52e24..7243142384bb 100644
@@ -98,8 +98,8 @@ application address space, preferably at address ``start``. This latter
 address is a hint only, and is usually specified as 0.
 
 Suitable length and offset parameters are queried with the
-:ref:`VIDIOC_QUERYBUF <vidioc-querybuf>` ioctl. Buffers must be
-allocated with the :ref:`VIDIOC_REQBUFS <vidioc-reqbufs>` ioctl
+:ref:`VIDIOC_QUERYBUF <VIDIOC_QUERYBUF>` ioctl. Buffers must be
+allocated with the :ref:`VIDIOC_REQBUFS <VIDIOC_REQBUFS>` ioctl
 before they can be queried.
 
 To unmap buffers the :ref:`munmap() <func-munmap>` function is used.
@@ -125,7 +125,7 @@ EINVAL
     The ``flags`` or ``prot`` value is not supported.
 
     No buffers have been allocated with the
-    :ref:`VIDIOC_REQBUFS <vidioc-reqbufs>` ioctl.
+    :ref:`VIDIOC_REQBUFS <VIDIOC_REQBUFS>` ioctl.
 
 ENOMEM
     Not enough physical or virtual memory was available to complete the
Documentation/linux_tv/media/v4l/func-open.rst +1 -1
index 21b1dfddc118..370a6858d65d 100644
@@ -33,7 +33,7 @@ Arguments
     devices only writing.
 
     When the ``O_NONBLOCK`` flag is given, the read() function and the
-    :ref:`VIDIOC_DQBUF <vidioc-qbuf>` ioctl will return the EAGAIN
+    :ref:`VIDIOC_DQBUF <VIDIOC_QBUF>` ioctl will return the EAGAIN
     error code when no data is available or no buffer is in the driver
     outgoing queue, otherwise these functions block until data becomes
     available. All V4L2 drivers exchanging data with applications must
Documentation/linux_tv/media/v4l/func-poll.rst +6 -6
index d3ad7b8d1a90..28a769af9309 100644
@@ -30,9 +30,9 @@ output.
 
 When streaming I/O has been negotiated this function waits until a
 buffer has been filled by the capture device and can be dequeued with
-the :ref:`VIDIOC_DQBUF <vidioc-qbuf>` ioctl. For output devices this
+the :ref:`VIDIOC_DQBUF <VIDIOC_QBUF>` ioctl. For output devices this
 function waits until the device is ready to accept a new buffer to be
-queued up with the :ref:`VIDIOC_QBUF <vidioc-qbuf>` ioctl for
+queued up with the :ref:`VIDIOC_QBUF <VIDIOC_QBUF>` ioctl for
 display. When buffers are already in the outgoing queue of the driver
 (capture) or the incoming queue isn't full (display) the function
 returns immediately.
@@ -45,17 +45,17 @@ flags in the ``revents`` field, output devices the ``POLLOUT`` and
 ``POLLWRNORM`` flags. When the function timed out it returns a value of
 zero, on failure it returns -1 and the ``errno`` variable is set
 appropriately. When the application did not call
-:ref:`VIDIOC_STREAMON <vidioc-streamon>` the :c:func:`poll()`
+:ref:`VIDIOC_STREAMON <VIDIOC_STREAMON>` the :c:func:`poll()`
 function succeeds, but sets the ``POLLERR`` flag in the ``revents``
 field. When the application has called
-:ref:`VIDIOC_STREAMON <vidioc-streamon>` for a capture device but
-hasn't yet called :ref:`VIDIOC_QBUF <vidioc-qbuf>`, the
+:ref:`VIDIOC_STREAMON <VIDIOC_STREAMON>` for a capture device but
+hasn't yet called :ref:`VIDIOC_QBUF <VIDIOC_QBUF>`, the
 :c:func:`poll()` function succeeds and sets the ``POLLERR`` flag in
 the ``revents`` field. For output devices this same situation will cause
 :c:func:`poll()` to succeed as well, but it sets the ``POLLOUT`` and
 ``POLLWRNORM`` flags in the ``revents`` field.
 
-If an event occurred (see :ref:`VIDIOC_DQEVENT <vidioc-dqevent>`)
+If an event occurred (see :ref:`VIDIOC_DQEVENT <VIDIOC_DQEVENT>`)
 then ``POLLPRI`` will be set in the ``revents`` field and
 :c:func:`poll()` will return.
 
Documentation/linux_tv/media/v4l/func-read.rst +2 -2
index b46cbbdeeab7..497bc9a9dd5a 100644
@@ -85,8 +85,8 @@ enough. Again, the behavior when the driver runs out of free buffers
 depends on the discarding policy.
 
 Applications can get and set the number of buffers used internally by
-the driver with the :ref:`VIDIOC_G_PARM <vidioc-g-parm>` and
-:ref:`VIDIOC_S_PARM <vidioc-g-parm>` ioctls. They are optional,
+the driver with the :ref:`VIDIOC_G_PARM <VIDIOC_G_PARM>` and
+:ref:`VIDIOC_S_PARM <VIDIOC_G_PARM>` ioctls. They are optional,
 however. The discarding policy is not reported and cannot be changed.
 For minimum requirements see :ref:`devices`.
 
Documentation/linux_tv/media/v4l/func-select.rst +4 -4
index 7c9706838cb3..77fdf33648b3 100644
@@ -32,17 +32,17 @@ for output.
 
 When streaming I/O has been negotiated this function waits until a
 buffer has been filled or displayed and can be dequeued with the
-:ref:`VIDIOC_DQBUF <vidioc-qbuf>` ioctl. When buffers are already in
+:ref:`VIDIOC_DQBUF <VIDIOC_QBUF>` ioctl. When buffers are already in
 the outgoing queue of the driver the function returns immediately.
 
 On success :c:func:`select()` returns the total number of bits set in
 the :c:type:`struct fd_set`s. When the function timed out it returns
 a value of zero. On failure it returns -1 and the ``errno`` variable is
 set appropriately. When the application did not call
-:ref:`VIDIOC_QBUF <vidioc-qbuf>` or
-:ref:`VIDIOC_STREAMON <vidioc-streamon>` yet the :c:func:`select()`
+:ref:`VIDIOC_QBUF <VIDIOC_QBUF>` or
+:ref:`VIDIOC_STREAMON <VIDIOC_STREAMON>` yet the :c:func:`select()`
 function succeeds, setting the bit of the file descriptor in ``readfds``
-or ``writefds``, but subsequent :ref:`VIDIOC_DQBUF <vidioc-qbuf>`
+or ``writefds``, but subsequent :ref:`VIDIOC_DQBUF <VIDIOC_QBUF>`
 calls will fail. [1]_
 
 When use of the :c:func:`read()` function has been negotiated and the
Documentation/linux_tv/media/v4l/hist-v4l2.rst +65 -65

351 lines not on this page · raw message

Documentation/linux_tv/media/v4l/io.rst +2 -2
index a7ca0d5fc5dd..2bc04e597c90 100644
@@ -16,12 +16,12 @@ read or write will fail at any time.
 
 Other methods must be negotiated. To select the streaming I/O method
 with memory mapped or user buffers applications call the
-:ref:`VIDIOC_REQBUFS <vidioc-reqbufs>` ioctl. The asynchronous I/O
+:ref:`VIDIOC_REQBUFS <VIDIOC_REQBUFS>` ioctl. The asynchronous I/O
 method is not defined yet.
 
 Video overlay can be considered another I/O method, although the
 application does not directly receive the image data. It is selected by
-initiating video overlay with the :ref:`VIDIOC_S_FMT <vidioc-g-fmt>`
+initiating video overlay with the :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>`
 ioctl. For more information see :ref:`overlay`.
 
 Generally exactly one I/O method, including overlay, is associated with
Documentation/linux_tv/media/v4l/libv4l-introduction.rst +6 -6
index 533ea4e18770..4fd87ec33260 100644
@@ -91,17 +91,17 @@ and to enhance the image quality.
 
 In most cases, libv4l2 just passes the calls directly through to the
 v4l2 driver, intercepting the calls to
-:ref:`VIDIOC_TRY_FMT <vidioc-g-fmt>`,
-:ref:`VIDIOC_G_FMT <vidioc-g-fmt>`
-:ref:`VIDIOC_S_FMT <vidioc-g-fmt>`
-:ref:`VIDIOC_ENUM_FRAMESIZES <vidioc-enum-framesizes>` and
-:ref:`VIDIOC_ENUM_FRAMEINTERVALS <vidioc-enum-frameintervals>` in
+:ref:`VIDIOC_TRY_FMT <VIDIOC_G_FMT>`,
+:ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>`
+:ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>`
+:ref:`VIDIOC_ENUM_FRAMESIZES <VIDIOC_ENUM_FRAMESIZES>` and
+:ref:`VIDIOC_ENUM_FRAMEINTERVALS <VIDIOC_ENUM_FRAMEINTERVALS>` in
 order to emulate the formats
 :ref:`V4L2_PIX_FMT_BGR24 <V4L2-PIX-FMT-BGR24>`,
 :ref:`V4L2_PIX_FMT_RGB24 <V4L2-PIX-FMT-RGB24>`,
 :ref:`V4L2_PIX_FMT_YUV420 <V4L2-PIX-FMT-YUV420>`, and
 :ref:`V4L2_PIX_FMT_YVU420 <V4L2-PIX-FMT-YVU420>`, if they aren't
-available in the driver. :ref:`VIDIOC_ENUM_FMT <vidioc-enum-fmt>`
+available in the driver. :ref:`VIDIOC_ENUM_FMT <VIDIOC_ENUM_FMT>`
 keeps enumerating the hardware supported formats, plus the emulated
 formats offered by libv4l at the end.
 
Documentation/linux_tv/media/v4l/mmap.rst +10 -10
index 54eb3b607587..de144028ec56 100644
@@ -9,10 +9,10 @@ Streaming I/O (Memory Mapping)
 Input and output devices support this I/O method when the
 ``V4L2_CAP_STREAMING`` flag in the ``capabilities`` field of struct
 :ref:`v4l2_capability <v4l2-capability>` returned by the
-:ref:`VIDIOC_QUERYCAP <vidioc-querycap>` ioctl is set. There are two
+:ref:`VIDIOC_QUERYCAP <VIDIOC_QUERYCAP>` ioctl is set. There are two
 streaming methods, to determine if the memory mapping flavor is
 supported applications must call the
-:ref:`VIDIOC_REQBUFS <vidioc-reqbufs>` ioctl.
+:ref:`VIDIOC_REQBUFS <VIDIOC_REQBUFS>` ioctl.
 
 Streaming is an I/O method where only pointers to buffers are exchanged
 between application and driver, the data itself is not copied. Memory
@@ -29,7 +29,7 @@ a different type of data. To access different sets at the same time
 different file descriptors must be used. [1]_
 
 To allocate device buffers applications call the
-:ref:`VIDIOC_REQBUFS <vidioc-reqbufs>` ioctl with the desired number
+:ref:`VIDIOC_REQBUFS <VIDIOC_REQBUFS>` ioctl with the desired number
 of buffers and buffer type, for example ``V4L2_BUF_TYPE_VIDEO_CAPTURE``.
 This ioctl can also be used to change the number of buffers or to free
 the allocated memory, provided none of the buffers are still mapped.
@@ -37,7 +37,7 @@ the allocated memory, provided none of the buffers are still mapped.
 Before applications can access the buffers they must map them into their
 address space with the :ref:`mmap() <func-mmap>` function. The
 location of the buffers in device memory can be determined with the
-:ref:`VIDIOC_QUERYBUF <vidioc-querybuf>` ioctl. In the single-planar
+:ref:`VIDIOC_QUERYBUF <VIDIOC_QUERYBUF>` ioctl. In the single-planar
 API case, the ``m.offset`` and ``length`` returned in a struct
 :ref:`v4l2_buffer <v4l2-buffer>` are passed as sixth and second
 parameter to the :c:func:`mmap()` function. When using the
@@ -227,10 +227,10 @@ when the application runs out of free buffers, it must wait until an
 empty buffer can be dequeued and reused.
 
 To enqueue and dequeue a buffer applications use the
-:ref:`VIDIOC_QBUF <vidioc-qbuf>` and
-:ref:`VIDIOC_DQBUF <vidioc-qbuf>` ioctl. The status of a buffer being
+:ref:`VIDIOC_QBUF <VIDIOC_QBUF>` and
+:ref:`VIDIOC_DQBUF <VIDIOC_QBUF>` ioctl. The status of a buffer being
 mapped, enqueued, full or empty can be determined at any time using the
-:ref:`VIDIOC_QUERYBUF <vidioc-querybuf>` ioctl. Two methods exist to
+:ref:`VIDIOC_QUERYBUF <VIDIOC_QUERYBUF>` ioctl. Two methods exist to
 suspend execution of the application until one or more buffers can be
 dequeued. By default ``VIDIOC_DQBUF`` blocks when no buffer is in the
 outgoing queue. When the ``O_NONBLOCK`` flag was given to the
@@ -240,8 +240,8 @@ immediately with an EAGAIN error code when no buffer is available. The
 are always available.
 
 To start and stop capturing or output applications call the
-:ref:`VIDIOC_STREAMON <vidioc-streamon>` and
-:ref:`VIDIOC_STREAMOFF <vidioc-streamon>` ioctl. Note
+:ref:`VIDIOC_STREAMON <VIDIOC_STREAMON>` and
+:ref:`VIDIOC_STREAMOFF <VIDIOC_STREAMON>` ioctl. Note
 ``VIDIOC_STREAMOFF`` removes all buffers from both queues as a side
 effect. Since there is no notion of doing anything "now" on a
 multitasking system, if an application needs to synchronize with another
@@ -258,7 +258,7 @@ the :c:func:`mmap()`, :c:func:`munmap()`, :c:func:`select()` and
 
 .. [1]
    One could use one file descriptor and set the buffer type field
-   accordingly when calling :ref:`VIDIOC_QBUF <vidioc-qbuf>` etc.,
+   accordingly when calling :ref:`VIDIOC_QBUF <VIDIOC_QBUF>` etc.,
    but it makes the :c:func:`select()` function ambiguous. We also
    like the clean approach of one file descriptor per logical stream.
    Video overlay for example is also a logical stream, although the CPU
Documentation/linux_tv/media/v4l/open.rst +3 -3
index 7df540fae201..4c34d61a5253 100644
@@ -108,13 +108,13 @@ are comparable to an ALSA audio mixer application. Just opening a V4L2
 device should not change the state of the device. [2]_
 
 Once an application has allocated the memory buffers needed for
-streaming data (by calling the :ref:`VIDIOC_REQBUFS <vidioc-reqbufs>`
-or :ref:`VIDIOC_CREATE_BUFS <vidioc-create-bufs>` ioctls, or
+streaming data (by calling the :ref:`VIDIOC_REQBUFS <VIDIOC_REQBUFS>`
+or :ref:`VIDIOC_CREATE_BUFS <VIDIOC_CREATE_BUFS>` ioctls, or
 implicitly by calling the :ref:`read() <func-read>` or
 :ref:`write() <func-write>` functions) that application (filehandle)
 becomes the owner of the device. It is no longer allowed to make changes
 that would affect the buffer sizes (e.g. by calling the
-:ref:`VIDIOC_S_FMT <vidioc-g-fmt>` ioctl) and other applications are
+:ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl) and other applications are
 no longer allowed to allocate buffers or start or stop streaming. The
 EBUSY error code will be returned instead.
 
Documentation/linux_tv/media/v4l/pixfmt-013.rst +2 -2
index 384876e377b2..b3cb7c48eb74 100644
@@ -27,8 +27,8 @@ Compressed Formats
 
        -  'JPEG'
 
-       -  TBD. See also :ref:`VIDIOC_G_JPEGCOMP <vidioc-g-jpegcomp>`,
-          :ref:`VIDIOC_S_JPEGCOMP <vidioc-g-jpegcomp>`.
+       -  TBD. See also :ref:`VIDIOC_G_JPEGCOMP <VIDIOC_G_JPEGCOMP>`,
+          :ref:`VIDIOC_S_JPEGCOMP <VIDIOC_G_JPEGCOMP>`.
 
     -  .. _`V4L2-PIX-FMT-MPEG`:
 
Documentation/linux_tv/media/v4l/pixfmt.rst +2 -2
index f5148ac6d781..f2c599aaa502 100644
@@ -11,9 +11,9 @@ with applications. The :c:type:`struct v4l2_pix_format` and
 format and layout of an image in memory. The former is used with the
 single-planar API, while the latter is used with the multi-planar
 version (see :ref:`planar-apis`). Image formats are negotiated with
-the :ref:`VIDIOC_S_FMT <vidioc-g-fmt>` ioctl. (The explanations here
+the :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl. (The explanations here
 focus on video capturing and output, for overlay frame buffer formats
-see also :ref:`VIDIOC_G_FBUF <vidioc-g-fbuf>`.)
+see also :ref:`VIDIOC_G_FBUF <VIDIOC_G_FBUF>`.)
 
 
 .. toctree::
Documentation/linux_tv/media/v4l/planar-apis.rst +8 -8
index 4c01adcbf525..017f412a6231 100644
@@ -39,29 +39,29 @@ handle multi-planar formats.
 Calls that distinguish between single and multi-planar APIs
 ===========================================================
 
-:ref:`VIDIOC_QUERYCAP <vidioc-querycap>`
+:ref:`VIDIOC_QUERYCAP <VIDIOC_QUERYCAP>`
     Two additional multi-planar capabilities are added. They can be set
     together with non-multi-planar ones for devices that handle both
     single- and multi-planar formats.
 
-:ref:`VIDIOC_G_FMT <vidioc-g-fmt>`,
-:ref:`VIDIOC_S_FMT <vidioc-g-fmt>`,
-:ref:`VIDIOC_TRY_FMT <vidioc-g-fmt>`
+:ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>`,
+:ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>`,
+:ref:`VIDIOC_TRY_FMT <VIDIOC_G_FMT>`
     New structures for describing multi-planar formats are added: struct
     :ref:`v4l2_pix_format_mplane <v4l2-pix-format-mplane>` and
     struct :ref:`v4l2_plane_pix_format <v4l2-plane-pix-format>`.
     Drivers may define new multi-planar formats, which have distinct
     FourCC codes from the existing single-planar ones.
 
-:ref:`VIDIOC_QBUF <vidioc-qbuf>`,
-:ref:`VIDIOC_DQBUF <vidioc-qbuf>`,
-:ref:`VIDIOC_QUERYBUF <vidioc-querybuf>`
+:ref:`VIDIOC_QBUF <VIDIOC_QBUF>`,
+:ref:`VIDIOC_DQBUF <VIDIOC_QBUF>`,
+:ref:`VIDIOC_QUERYBUF <VIDIOC_QUERYBUF>`
     A new struct :ref:`v4l2_plane <v4l2-plane>` structure for
     describing planes is added. Arrays of this structure are passed in
     the new ``m.planes`` field of struct
     :ref:`v4l2_buffer <v4l2-buffer>`.
 
-:ref:`VIDIOC_REQBUFS <vidioc-reqbufs>`
+:ref:`VIDIOC_REQBUFS <VIDIOC_REQBUFS>`
     Will allocate multi-planar buffers as requested.
 
 
Documentation/linux_tv/media/v4l/querycap.rst +6 -6
index ce0c0e3f9b53..d8f080a68195 100644
@@ -11,26 +11,26 @@ are equally applicable to all types of devices. Furthermore devices of
 the same type have different capabilities and this specification permits
 the omission of a few complicated and less important parts of the API.
 
-The :ref:`VIDIOC_QUERYCAP <vidioc-querycap>` ioctl is available to
+The :ref:`VIDIOC_QUERYCAP <VIDIOC_QUERYCAP>` ioctl is available to
 check if the kernel device is compatible with this specification, and to
 query the :ref:`functions <devices>` and :ref:`I/O methods <io>`
 supported by the device.
 
-Starting with kernel version 3.1, :ref:`VIDIOC_QUERYCAP <vidioc-querycap>`
+Starting with kernel version 3.1, :ref:`VIDIOC_QUERYCAP <VIDIOC_QUERYCAP>`
 will return the V4L2 API version used by the driver, with generally
 matches the Kernel version. There's no need of using
-:ref:`VIDIOC_QUERYCAP <vidioc-querycap>` to check if a specific ioctl
+:ref:`VIDIOC_QUERYCAP <VIDIOC_QUERYCAP>` to check if a specific ioctl
 is supported, the V4L2 core now returns ENOTTY if a driver doesn't
 provide support for an ioctl.
 
 Other features can be queried by calling the respective ioctl, for
-example :ref:`VIDIOC_ENUMINPUT <vidioc-enuminput>` to learn about the
+example :ref:`VIDIOC_ENUMINPUT <VIDIOC_ENUMINPUT>` to learn about the
 number, types and names of video connectors on the device. Although
 abstraction is a major objective of this API, the
-:ref:`VIDIOC_QUERYCAP <vidioc-querycap>` ioctl also allows driver
+:ref:`VIDIOC_QUERYCAP <VIDIOC_QUERYCAP>` ioctl also allows driver
 specific applications to reliably identify the driver.
 
-All V4L2 drivers must support :ref:`VIDIOC_QUERYCAP <vidioc-querycap>`.
+All V4L2 drivers must support :ref:`VIDIOC_QUERYCAP <VIDIOC_QUERYCAP>`.
 Applications should always call this ioctl after opening the device.
 
 
Documentation/linux_tv/media/v4l/rw.rst +1 -1
index c123d3a1bfbb..ad365a6e435d 100644
@@ -10,7 +10,7 @@ Input and output devices support the :c:func:`read()` and
 :c:func:`write()` function, respectively, when the
 ``V4L2_CAP_READWRITE`` flag in the ``capabilities`` field of struct
 :ref:`v4l2_capability <v4l2-capability>` returned by the
-:ref:`VIDIOC_QUERYCAP <vidioc-querycap>` ioctl is set.
+:ref:`VIDIOC_QUERYCAP <VIDIOC_QUERYCAP>` ioctl is set.
 
 Drivers may need the CPU to copy the data, but they may also support DMA
 to or from user memory, so this I/O method is not necessarily less
Documentation/linux_tv/media/v4l/selection-api-004.rst +1 -1
index d023cd022295..4890815e268e 100644
@@ -4,7 +4,7 @@
 Configuration
 *************
 
-Applications can use the :ref:`selection API <vidioc-g-selection>` to
+Applications can use the :ref:`selection API <VIDIOC_G_SELECTION>` to
 select an area in a video signal or a buffer, and to query for default
 settings and hardware limits.
 
Documentation/linux_tv/media/v4l/standard.rst +6 -6
index db80861c1446..da0b8101b6cc 100644
@@ -11,8 +11,8 @@ variations of standards. Each video input and output may support another
 set of standards. This set is reported by the ``std`` field of struct
 :ref:`v4l2_input <v4l2-input>` and struct
 :ref:`v4l2_output <v4l2-output>` returned by the
-:ref:`VIDIOC_ENUMINPUT <vidioc-enuminput>` and
-:ref:`VIDIOC_ENUMOUTPUT <vidioc-enumoutput>` ioctls, respectively.
+:ref:`VIDIOC_ENUMINPUT <VIDIOC_ENUMINPUT>` and
+:ref:`VIDIOC_ENUMOUTPUT <VIDIOC_ENUMOUTPUT>` ioctls, respectively.
 
 V4L2 defines one bit for each analog video standard currently in use
 worldwide, and sets aside bits for driver defined standards, e. g.
@@ -20,7 +20,7 @@ hybrid standards to watch NTSC video tapes on PAL TVs and vice versa.
 Applications can use the predefined bits to select a particular
 standard, although presenting the user a menu of supported standards is
 preferred. To enumerate and query the attributes of the supported
-standards applications use the :ref:`VIDIOC_ENUMSTD <vidioc-enumstd>`
+standards applications use the :ref:`VIDIOC_ENUMSTD <VIDIOC_ENUMSTD>`
 ioctl.
 
 Many of the defined standards are actually just variations of a few
@@ -36,10 +36,10 @@ Composite input may collapse standards, enumerating "PAL-B/G/H/I",
 "NTSC-M" and "SECAM-D/K". [1]_
 
 To query and select the standard used by the current video input or
-output applications call the :ref:`VIDIOC_G_STD <vidioc-g-std>` and
-:ref:`VIDIOC_S_STD <vidioc-g-std>` ioctl, respectively. The
+output applications call the :ref:`VIDIOC_G_STD <VIDIOC_G_STD>` and
+:ref:`VIDIOC_S_STD <VIDIOC_G_STD>` ioctl, respectively. The
 *received* standard can be sensed with the
-:ref:`VIDIOC_QUERYSTD <vidioc-querystd>` ioctl. Note that the
+:ref:`VIDIOC_QUERYSTD <VIDIOC_QUERYSTD>` ioctl. Note that the
 parameter of all these ioctls is a pointer to a
 :ref:`v4l2_std_id <v4l2-std-id>` type (a standard set), *not* an
 index into the standard enumeration. Drivers must implement all video
Documentation/linux_tv/media/v4l/streaming-par.rst +3 -3
index 53f4d7c23a8a..bb8100b6ef87 100644
@@ -8,7 +8,7 @@ Streaming Parameters
 
 Streaming parameters are intended to optimize the video capture process
 as well as I/O. Presently applications can request a high quality
-capture mode with the :ref:`VIDIOC_S_PARM <vidioc-g-parm>` ioctl.
+capture mode with the :ref:`VIDIOC_S_PARM <VIDIOC_G_PARM>` ioctl.
 
 The current video standard determines a nominal number of frames per
 second. If less than this number of frames is to be captured or output,
@@ -23,8 +23,8 @@ internally by a driver in read/write mode. For implications see the
 section discussing the :ref:`read() <func-read>` function.
 
 To get and set the streaming parameters applications call the
-:ref:`VIDIOC_G_PARM <vidioc-g-parm>` and
-:ref:`VIDIOC_S_PARM <vidioc-g-parm>` ioctl, respectively. They take
+:ref:`VIDIOC_G_PARM <VIDIOC_G_PARM>` and
+:ref:`VIDIOC_S_PARM <VIDIOC_G_PARM>` ioctl, respectively. They take
 a pointer to a struct :ref:`v4l2_streamparm <v4l2-streamparm>`, which
 contains a union holding separate parameters for input and output
 devices.
Documentation/linux_tv/media/v4l/tuner.rst +11 -11
index bc22a99579e3..15c2e6c373ab 100644
@@ -14,7 +14,7 @@ Video input devices can have one or more tuners demodulating a RF
 signal. Each tuner is associated with one or more video inputs,
 depending on the number of RF connectors on the tuner. The ``type``
 field of the respective struct :ref:`v4l2_input <v4l2-input>`
-returned by the :ref:`VIDIOC_ENUMINPUT <vidioc-enuminput>` ioctl is
+returned by the :ref:`VIDIOC_ENUMINPUT <VIDIOC_ENUMINPUT>` ioctl is
 set to ``V4L2_INPUT_TYPE_TUNER`` and its ``tuner`` field contains the
 index number of the tuner.
 
@@ -22,8 +22,8 @@ Radio input devices have exactly one tuner with index zero, no video
 inputs.
 
 To query and change tuner properties applications use the
-:ref:`VIDIOC_G_TUNER <vidioc-g-tuner>` and
-:ref:`VIDIOC_S_TUNER <vidioc-g-tuner>` ioctls, respectively. The
+:ref:`VIDIOC_G_TUNER <VIDIOC_G_TUNER>` and
+:ref:`VIDIOC_S_TUNER <VIDIOC_G_TUNER>` ioctls, respectively. The
 struct :ref:`v4l2_tuner <v4l2-tuner>` returned by ``VIDIOC_G_TUNER``
 also contains signal status information applicable when the tuner of the
 current video or radio input is queried. Note that ``VIDIOC_S_TUNER``
@@ -31,7 +31,7 @@ does not switch the current tuner, when there is more than one at all.
 The tuner is solely determined by the current video input. Drivers must
 support both ioctls and set the ``V4L2_CAP_TUNER`` flag in the struct
 :ref:`v4l2_capability <v4l2-capability>` returned by the
-:ref:`VIDIOC_QUERYCAP <vidioc-querycap>` ioctl when the device has
+:ref:`VIDIOC_QUERYCAP <VIDIOC_QUERYCAP>` ioctl when the device has
 one or more tuners.
 
 
@@ -44,7 +44,7 @@ set or video recorder. Each modulator is associated with one or more
 video outputs, depending on the number of RF connectors on the
 modulator. The ``type`` field of the respective struct
 :ref:`v4l2_output <v4l2-output>` returned by the
-:ref:`VIDIOC_ENUMOUTPUT <vidioc-enumoutput>` ioctl is set to
+:ref:`VIDIOC_ENUMOUTPUT <VIDIOC_ENUMOUTPUT>` ioctl is set to
 ``V4L2_OUTPUT_TYPE_MODULATOR`` and its ``modulator`` field contains the
 index number of the modulator.
 
@@ -55,18 +55,18 @@ A video or radio device cannot support both a tuner and a modulator. Two
 separate device nodes will have to be used for such hardware, one that
 supports the tuner functionality and one that supports the modulator
 functionality. The reason is a limitation with the
-:ref:`VIDIOC_S_FREQUENCY <vidioc-g-frequency>` ioctl where you
+:ref:`VIDIOC_S_FREQUENCY <VIDIOC_G_FREQUENCY>` ioctl where you
 cannot specify whether the frequency is for a tuner or a modulator.
 
 To query and change modulator properties applications use the
-:ref:`VIDIOC_G_MODULATOR <vidioc-g-modulator>` and
-:ref:`VIDIOC_S_MODULATOR <vidioc-g-modulator>` ioctl. Note that
+:ref:`VIDIOC_G_MODULATOR <VIDIOC_G_MODULATOR>` and
+:ref:`VIDIOC_S_MODULATOR <VIDIOC_G_MODULATOR>` ioctl. Note that
 ``VIDIOC_S_MODULATOR`` does not switch the current modulator, when there
 is more than one at all. The modulator is solely determined by the
 current video output. Drivers must support both ioctls and set the
 ``V4L2_CAP_MODULATOR`` flag in the struct
 :ref:`v4l2_capability <v4l2-capability>` returned by the
-:ref:`VIDIOC_QUERYCAP <vidioc-querycap>` ioctl when the device has
+:ref:`VIDIOC_QUERYCAP <VIDIOC_QUERYCAP>` ioctl when the device has
 one or more modulators.
 
 
@@ -74,8 +74,8 @@ Radio Frequency
 ===============
 
 To get and set the tuner or modulator radio frequency applications use
-the :ref:`VIDIOC_G_FREQUENCY <vidioc-g-frequency>` and
-:ref:`VIDIOC_S_FREQUENCY <vidioc-g-frequency>` ioctl which both take
+the :ref:`VIDIOC_G_FREQUENCY <VIDIOC_G_FREQUENCY>` and
+:ref:`VIDIOC_S_FREQUENCY <VIDIOC_G_FREQUENCY>` ioctl which both take
 a pointer to a struct :ref:`v4l2_frequency <v4l2-frequency>`. These
 ioctls are used for TV and radio devices alike. Drivers must support
 both ioctls when the tuner or modulator ioctls are supported, or when
Documentation/linux_tv/media/v4l/userp.rst +9 -9
index 83558d27bd69..5433025d41d9 100644
@@ -9,10 +9,10 @@ Streaming I/O (User Pointers)
 Input and output devices support this I/O method when the
 ``V4L2_CAP_STREAMING`` flag in the ``capabilities`` field of struct
 :ref:`v4l2_capability <v4l2-capability>` returned by the
-:ref:`VIDIOC_QUERYCAP <vidioc-querycap>` ioctl is set. If the
+:ref:`VIDIOC_QUERYCAP <VIDIOC_QUERYCAP>` ioctl is set. If the
 particular user pointer method (not only memory mapping) is supported
 must be determined by calling the
-:ref:`VIDIOC_REQBUFS <vidioc-reqbufs>` ioctl.
+:ref:`VIDIOC_REQBUFS <VIDIOC_REQBUFS>` ioctl.
 
 This I/O method combines advantages of the read/write and memory mapping
 methods. Buffers (planes) are allocated by the application itself, and
@@ -21,7 +21,7 @@ data are exchanged, these pointers and meta-information are passed in
 struct :ref:`v4l2_buffer <v4l2-buffer>` (or in struct
 :ref:`v4l2_plane <v4l2-plane>` in the multi-planar API case). The
 driver must be switched into user pointer I/O mode by calling the
-:ref:`VIDIOC_REQBUFS <vidioc-reqbufs>` with the desired buffer type.
+:ref:`VIDIOC_REQBUFS <VIDIOC_REQBUFS>` with the desired buffer type.
 No buffers (planes) are allocated beforehand, consequently they are not
 indexed and cannot be queried like mapped buffers with the
 ``VIDIOC_QUERYBUF`` ioctl.
@@ -45,7 +45,7 @@ indexed and cannot be queried like mapped buffers with the
     }
 
 Buffer (plane) addresses and sizes are passed on the fly with the
-:ref:`VIDIOC_QBUF <vidioc-qbuf>` ioctl. Although buffers are commonly
+:ref:`VIDIOC_QBUF <VIDIOC_QBUF>` ioctl. Although buffers are commonly
 cycled, applications can pass different addresses and sizes at each
 ``VIDIOC_QBUF`` call. If required by the hardware the driver swaps
 memory pages within physical memory to create a continuous area of
@@ -55,11 +55,11 @@ to disk they are brought back and finally locked in physical memory for
 DMA. [1]_
 
 Filled or displayed buffers are dequeued with the
-:ref:`VIDIOC_DQBUF <vidioc-qbuf>` ioctl. The driver can unlock the
+:ref:`VIDIOC_DQBUF <VIDIOC_QBUF>` ioctl. The driver can unlock the
 memory pages at any time between the completion of the DMA and this
 ioctl. The memory is also unlocked when
-:ref:`VIDIOC_STREAMOFF <vidioc-streamon>` is called,
-:ref:`VIDIOC_REQBUFS <vidioc-reqbufs>`, or when the device is closed.
+:ref:`VIDIOC_STREAMOFF <VIDIOC_STREAMON>` is called,
+:ref:`VIDIOC_REQBUFS <VIDIOC_REQBUFS>`, or when the device is closed.
 Applications must take care not to free buffers without dequeuing. For
 once, the buffers remain locked until further, wasting physical memory.
 Second the driver will not be notified when the memory is returned to
@@ -82,8 +82,8 @@ immediately with an EAGAIN error code when no buffer is available. The
 are always available.
 
 To start and stop capturing or output applications call the
-:ref:`VIDIOC_STREAMON <vidioc-streamon>` and
-:ref:`VIDIOC_STREAMOFF <vidioc-streamon>` ioctl. Note
+:ref:`VIDIOC_STREAMON <VIDIOC_STREAMON>` and
+:ref:`VIDIOC_STREAMOFF <VIDIOC_STREAMON>` ioctl. Note
 ``VIDIOC_STREAMOFF`` removes all buffers from both queues and unlocks
 all buffers as a side effect. Since there is no notion of doing anything
 "now" on a multitasking system, if an application needs to synchronize
Documentation/linux_tv/media/v4l/v4l2.rst +1 -1
index 44605ec92a50..c9ba2859ebe5 100644
@@ -86,7 +86,7 @@ Revision History
 
 :revision: 4.5 / 2015-10-29 (*rr*)
 
-Extend vidioc-g-ext-ctrls;. Replace ctrl_class with a new union with
+Extend VIDIOC_G_EXT_CTRLS;. Replace ctrl_class with a new union with
 ctrl_class and which. Which is used to select the current value of the
 control or the default value.
 
Documentation/linux_tv/media/v4l/video.rst +7 -7
index fc220be52c2b..e4e543b56989 100644
@@ -14,17 +14,17 @@ Radio devices have no video inputs or outputs.
 
 To learn about the number and attributes of the available inputs and
 outputs applications can enumerate them with the
-:ref:`VIDIOC_ENUMINPUT <vidioc-enuminput>` and
-:ref:`VIDIOC_ENUMOUTPUT <vidioc-enumoutput>` ioctl, respectively. The
+:ref:`VIDIOC_ENUMINPUT <VIDIOC_ENUMINPUT>` and
+:ref:`VIDIOC_ENUMOUTPUT <VIDIOC_ENUMOUTPUT>` ioctl, respectively. The
 struct :ref:`v4l2_input <v4l2-input>` returned by the
-:ref:`VIDIOC_ENUMINPUT <vidioc-enuminput>` ioctl also contains signal
+:ref:`VIDIOC_ENUMINPUT <VIDIOC_ENUMINPUT>` ioctl also contains signal
 :status information applicable when the current video input is queried.
 
-The :ref:`VIDIOC_G_INPUT <vidioc-g-input>` and
-:ref:`VIDIOC_G_OUTPUT <vidioc-g-output>` ioctls return the index of
+The :ref:`VIDIOC_G_INPUT <VIDIOC_G_INPUT>` and
+:ref:`VIDIOC_G_OUTPUT <VIDIOC_G_OUTPUT>` ioctls return the index of
 the current video input or output. To select a different input or output
-applications call the :ref:`VIDIOC_S_INPUT <vidioc-g-input>` and
-:ref:`VIDIOC_S_OUTPUT <vidioc-g-output>` ioctls. Drivers must
+applications call the :ref:`VIDIOC_S_INPUT <VIDIOC_G_INPUT>` and
+:ref:`VIDIOC_S_OUTPUT <VIDIOC_G_OUTPUT>` ioctls. Drivers must
 implement all the input ioctls when the device has one or more inputs,
 all the output ioctls when the device has one or more outputs.
 
Documentation/linux_tv/media/v4l/vidioc-create-bufs.rst +4 -4
index e512fe26569e..9c2a011f389c 100644
@@ -1,6 +1,6 @@
 .. -*- coding: utf-8; mode: rst -*-
 
-.. _vidioc-create-bufs:
+.. _VIDIOC_CREATE_BUFS:
 
 ************************
 ioctl VIDIOC_CREATE_BUFS
@@ -34,7 +34,7 @@ Description
 This ioctl is used to create buffers for :ref:`memory mapped <mmap>`
 or :ref:`user pointer <userp>` or :ref:`DMA buffer <dmabuf>` I/O. It
 can be used as an alternative or in addition to the
-:ref:`VIDIOC_REQBUFS <vidioc-reqbufs>` ioctl, when a tighter control
+:ref:`VIDIOC_REQBUFS <VIDIOC_REQBUFS>` ioctl, when a tighter control
 over buffers is required. This ioctl can be called multiple times to
 create buffers of different sizes.
 
@@ -47,8 +47,8 @@ array must be zeroed.
 The ``format`` field specifies the image format that the buffers must be
 able to handle. The application has to fill in this struct
 :ref:`v4l2_format <v4l2-format>`. Usually this will be done using the
-:ref:`VIDIOC_TRY_FMT <vidioc-g-fmt>` or
-:ref:`VIDIOC_G_FMT <vidioc-g-fmt>` ioctls to ensure that the
+:ref:`VIDIOC_TRY_FMT <VIDIOC_G_FMT>` or
+:ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>` ioctls to ensure that the
 requested format is supported by the driver. Based on the format's
 ``type`` field the requested buffer size (for single-planar) or plane
 sizes (for multi-planar formats) will be used for the allocated buffers.
Documentation/linux_tv/media/v4l/vidioc-cropcap.rst +1 -1
index 7fa9e2750457..22b5efe1d2e4 100644
@@ -1,6 +1,6 @@
 .. -*- coding: utf-8; mode: rst -*-
 
-.. _vidioc-cropcap:
+.. _VIDIOC_CROPCAP:
 
 ********************
 ioctl VIDIOC_CROPCAP
Documentation/linux_tv/media/v4l/vidioc-dbg-g-chip-info.rst +1 -1
index 0bb92acd1729..0a92e2550ce0 100644
@@ -1,6 +1,6 @@
 .. -*- coding: utf-8; mode: rst -*-
 
-.. _vidioc-dbg-g-chip-info:
+.. _VIDIOC_DBG_G_CHIP_INFO:
 
 ****************************
 ioctl VIDIOC_DBG_G_CHIP_INFO
Documentation/linux_tv/media/v4l/vidioc-dbg-g-register.rst +3 -3
index 613fd256d9bc..1b86abcc44c7 100644
@@ -1,6 +1,6 @@
 .. -*- coding: utf-8; mode: rst -*-
 
-.. _vidioc-dbg-g-register:
+.. _VIDIOC_DBG_G_REGISTER:
 
 **************************************************
 ioctl VIDIOC_DBG_G_REGISTER, VIDIOC_DBG_S_REGISTER
@@ -65,14 +65,14 @@ When ``match.type`` is ``V4L2_CHIP_MATCH_BRIDGE``, ``match.addr``
 selects the nth non-sub-device chip on the TV card. The number zero
 always selects the host chip, e. g. the chip connected to the PCI or USB
 bus. You can find out which chips are present with the
-:ref:`VIDIOC_DBG_G_CHIP_INFO <vidioc-dbg-g-chip-info>` ioctl.
+:ref:`VIDIOC_DBG_G_CHIP_INFO <VIDIOC_DBG_G_CHIP_INFO>` ioctl.
 
 When ``match.type`` is ``V4L2_CHIP_MATCH_SUBDEV``, ``match.addr``
 selects the nth sub-device.
 
 These ioctls are optional, not all drivers may support them. However
 when a driver supports these ioctls it must also support
-:ref:`VIDIOC_DBG_G_CHIP_INFO <vidioc-dbg-g-chip-info>`. Conversely
+:ref:`VIDIOC_DBG_G_CHIP_INFO <VIDIOC_DBG_G_CHIP_INFO>`. Conversely
 it may support ``VIDIOC_DBG_G_CHIP_INFO`` but not these ioctls.
 
 ``VIDIOC_DBG_G_REGISTER`` and ``VIDIOC_DBG_S_REGISTER`` were introduced
Documentation/linux_tv/media/v4l/vidioc-decoder-cmd.rst +4 -4
index 77c7bdfb90df..ec9dfed09f76 100644
@@ -1,6 +1,6 @@
 .. -*- coding: utf-8; mode: rst -*-
 
-.. _vidioc-decoder-cmd:
+.. _VIDIOC_DECODER_CMD:
 
 ************************************************
 ioctl VIDIOC_DECODER_CMD, VIDIOC_TRY_DECODER_CMD
@@ -43,11 +43,11 @@ this structure.
 The ``cmd`` field must contain the command code. Some commands use the
 ``flags`` field for additional information.
 
-A :c:func:`write()`() or :ref:`VIDIOC_STREAMON <vidioc-streamon>`
+A :c:func:`write()`() or :ref:`VIDIOC_STREAMON <VIDIOC_STREAMON>`
 call sends an implicit START command to the decoder if it has not been
 started yet.
 
-A :c:func:`close()`() or :ref:`VIDIOC_STREAMOFF <vidioc-streamon>`
+A :c:func:`close()`() or :ref:`VIDIOC_STREAMOFF <VIDIOC_STREAMON>`
 call of a streaming file descriptor sends an implicit immediate STOP
 command to the decoder, and all buffered data is discarded.
 
@@ -224,7 +224,7 @@ introduced in Linux 3.3.
           new buffers produced to dequeue. This buffer may be empty,
           indicated by the driver setting the ``bytesused`` field to 0. Once
           the ``V4L2_BUF_FLAG_LAST`` flag was set, the
-          :ref:`VIDIOC_DQBUF <vidioc-qbuf>` ioctl will not block anymore,
+          :ref:`VIDIOC_DQBUF <VIDIOC_QBUF>` ioctl will not block anymore,
           but return an EPIPE error code. If
           ``V4L2_DEC_CMD_STOP_IMMEDIATELY`` is set, then the decoder stops
           immediately (ignoring the ``pts`` value), otherwise it will keep
Documentation/linux_tv/media/v4l/vidioc-dqevent.rst +4 -4
index 108348e4df29..45320997344d 100644
@@ -1,6 +1,6 @@
 .. -*- coding: utf-8; mode: rst -*-
 
-.. _vidioc-dqevent:
+.. _VIDIOC_DQEVENT:
 
 ********************
 ioctl VIDIOC_DQEVENT
@@ -226,8 +226,8 @@ call.
           :ref:`v4l2_control <v4l2-control>`.
 
           If the event is generated due to a call to
-          :ref:`VIDIOC_S_CTRL <vidioc-g-ctrl>` or
-          :ref:`VIDIOC_S_EXT_CTRLS <vidioc-g-ext-ctrls>`, then the
+          :ref:`VIDIOC_S_CTRL <VIDIOC_G_CTRL>` or
+          :ref:`VIDIOC_S_EXT_CTRLS <VIDIOC_G_EXT_CTRLS>`, then the
           event will *not* be sent to the file handle that called the ioctl
           function. This prevents nasty feedback loops. If you *do* want to
           get the event, then set the ``V4L2_EVENT_SUB_FL_ALLOW_FEEDBACK``
@@ -363,7 +363,7 @@ call.
 
        -  The 32-bit value of the control for 32-bit control types. This is
           0 for string controls since the value of a string cannot be passed
-          using :ref:`VIDIOC_DQEVENT <vidioc-dqevent>`.
+          using :ref:`VIDIOC_DQEVENT <VIDIOC_DQEVENT>`.
 
     -  .. row 5
 
Documentation/linux_tv/media/v4l/vidioc-dv-timings-cap.rst +1 -1
index d8222ad0df52..b5b8e41dc693 100644
@@ -1,6 +1,6 @@
 .. -*- coding: utf-8; mode: rst -*-
 
-.. _vidioc-dv-timings-cap:
+.. _VIDIOC_DV_TIMINGS_CAP:
 
 *********************************************************
 ioctl VIDIOC_DV_TIMINGS_CAP, VIDIOC_SUBDEV_DV_TIMINGS_CAP
Documentation/linux_tv/media/v4l/vidioc-encoder-cmd.rst +4 -4
index 018f31e38c6d..ffa363eeaa36 100644
@@ -1,6 +1,6 @@
 .. -*- coding: utf-8; mode: rst -*-
 
-.. _vidioc-encoder-cmd:
+.. _VIDIOC_ENCODER_CMD:
 
 ************************************************
 ioctl VIDIOC_ENCODER_CMD, VIDIOC_TRY_ENCODER_CMD
@@ -48,14 +48,14 @@ currently only used by the STOP command and contains one bit: If the
 until the end of the current *Group Of Pictures*, otherwise it will stop
 immediately.
 
-A :c:func:`read()`() or :ref:`VIDIOC_STREAMON <vidioc-streamon>`
+A :c:func:`read()`() or :ref:`VIDIOC_STREAMON <VIDIOC_STREAMON>`
 call sends an implicit START command to the encoder if it has not been
 started yet. After a STOP command, :c:func:`read()`() calls will read
 the remaining data buffered by the driver. When the buffer is empty,
 :c:func:`read()`() will return zero and the next :c:func:`read()`()
 call will restart the encoder.
 
-A :c:func:`close()`() or :ref:`VIDIOC_STREAMOFF <vidioc-streamon>`
+A :c:func:`close()`() or :ref:`VIDIOC_STREAMOFF <VIDIOC_STREAMON>`
 call of a streaming file descriptor sends an implicit immediate STOP to
 the encoder, and all buffered data is discarded.
 
@@ -134,7 +134,7 @@ introduced in Linux 2.6.21.
           produced to dequeue. This buffer may be empty, indicated by the
           driver setting the ``bytesused`` field to 0. Once the
           ``V4L2_BUF_FLAG_LAST`` flag was set, the
-          :ref:`VIDIOC_DQBUF <vidioc-qbuf>` ioctl will not block anymore,
+          :ref:`VIDIOC_DQBUF <VIDIOC_QBUF>` ioctl will not block anymore,
           but return an EPIPE error code.
 
     -  .. row 3
Documentation/linux_tv/media/v4l/vidioc-enum-dv-timings.rst +2 -2
index b328829cbf76..5b8f17422fdb 100644
@@ -1,6 +1,6 @@
 .. -*- coding: utf-8; mode: rst -*-
 
-.. _vidioc-enum-dv-timings:
+.. _VIDIOC_ENUM_DV_TIMINGS:
 
 ***********************************************************
 ioctl VIDIOC_ENUM_DV_TIMINGS, VIDIOC_SUBDEV_ENUM_DV_TIMINGS
@@ -35,7 +35,7 @@ Description
 While some DV receivers or transmitters support a wide range of timings,
 others support only a limited number of timings. With this ioctl
 applications can enumerate a list of known supported timings. Call
-:ref:`VIDIOC_DV_TIMINGS_CAP <vidioc-dv-timings-cap>` to check if it
+:ref:`VIDIOC_DV_TIMINGS_CAP <VIDIOC_DV_TIMINGS_CAP>` to check if it
 also supports other standards or even custom timings that are not in
 this list.
 
Documentation/linux_tv/media/v4l/vidioc-enum-fmt.rst +1 -1
index bcf7eda8bfdf..f4fc2723f01e 100644
@@ -1,6 +1,6 @@
 .. -*- coding: utf-8; mode: rst -*-
 
-.. _vidioc-enum-fmt:
+.. _VIDIOC_ENUM_FMT:
 
 *********************
 ioctl VIDIOC_ENUM_FMT
Documentation/linux_tv/media/v4l/vidioc-enum-frameintervals.rst +3 -3
index 245e01ff2e58..2c69866c8d9e 100644
@@ -1,6 +1,6 @@
 .. -*- coding: utf-8; mode: rst -*-
 
-.. _vidioc-enum-frameintervals:
+.. _VIDIOC_ENUM_FRAMEINTERVALS:
 
 ********************************
 ioctl VIDIOC_ENUM_FRAMEINTERVALS
@@ -38,8 +38,8 @@ This ioctl allows applications to enumerate all frame intervals that the
 device supports for the given pixel format and frame size.
 
 The supported pixel formats and frame sizes can be obtained by using the
-:ref:`VIDIOC_ENUM_FMT <vidioc-enum-fmt>` and
-:ref:`VIDIOC_ENUM_FRAMESIZES <vidioc-enum-framesizes>` functions.
+:ref:`VIDIOC_ENUM_FMT <VIDIOC_ENUM_FMT>` and
+:ref:`VIDIOC_ENUM_FRAMESIZES <VIDIOC_ENUM_FRAMESIZES>` functions.
 
 The return value and the content of the ``v4l2_frmivalenum.type`` field
 depend on the type of frame intervals the device supports. Here are the
Documentation/linux_tv/media/v4l/vidioc-enum-framesizes.rst +2 -2
index e3d2ad50db74..9b763ca9d0d8 100644
@@ -1,6 +1,6 @@
 .. -*- coding: utf-8; mode: rst -*-
 
-.. _vidioc-enum-framesizes:
+.. _VIDIOC_ENUM_FRAMESIZES:
 
 ****************************
 ioctl VIDIOC_ENUM_FRAMESIZES
@@ -39,7 +39,7 @@ and height in pixels) that the device supports for the given pixel
 format.
 
 The supported pixel formats can be obtained by using the
-:ref:`VIDIOC_ENUM_FMT <vidioc-enum-fmt>` function.
+:ref:`VIDIOC_ENUM_FMT <VIDIOC_ENUM_FMT>` function.
 
 The return value and the content of the ``v4l2_frmsizeenum.type`` field
 depend on the type of frame sizes the device supports. Here are the
Documentation/linux_tv/media/v4l/vidioc-enum-freq-bands.rst +1 -1
index 7bb726d519be..2f5dbe0583b4 100644
@@ -1,6 +1,6 @@
 .. -*- coding: utf-8; mode: rst -*-
 
-.. _vidioc-enum-freq-bands:
+.. _VIDIOC_ENUM_FREQ_BANDS:
 
 ****************************
 ioctl VIDIOC_ENUM_FREQ_BANDS
Documentation/linux_tv/media/v4l/vidioc-enumaudio.rst +2 -2
index c42e13bf0578..dcca0591864e 100644
@@ -1,6 +1,6 @@
 .. -*- coding: utf-8; mode: rst -*-
 
-.. _vidioc-enumaudio:
+.. _VIDIOC_ENUMAUDIO:
 
 **********************
 ioctl VIDIOC_ENUMAUDIO
@@ -39,7 +39,7 @@ structure or return an EINVAL error code when the index is out of
 bounds. To enumerate all audio inputs applications shall begin at index
 zero, incrementing by one until the driver returns EINVAL.
 
-See :ref:`vidioc-g-audio` for a description of struct
+See :ref:`VIDIOC_G_AUDIO` for a description of struct
 :ref:`v4l2_audio <v4l2-audio>`.
 
 
Documentation/linux_tv/media/v4l/vidioc-enumaudioout.rst +2 -2
index 54157607d90d..29735eddac5d 100644
@@ -1,6 +1,6 @@
 .. -*- coding: utf-8; mode: rst -*-
 
-.. _vidioc-enumaudioout:
+.. _VIDIOC_ENUMAUDIOOUT:
 
 ***********************
 ioctl VIDIOC_ENUMAUDOUT
@@ -42,7 +42,7 @@ zero, incrementing by one until the driver returns EINVAL.
 Note connectors on a TV card to loop back the received audio signal to a
 sound card are not audio outputs in this sense.
 
-See :ref:`vidioc-g-audioout` for a description of struct
+See :ref:`VIDIOC_G_AUDIOout` for a description of struct
 :ref:`v4l2_audioout <v4l2-audioout>`.
 
 
Documentation/linux_tv/media/v4l/vidioc-enuminput.rst +1 -1
index 32c8dac7f400..644d50679aa2 100644
@@ -1,6 +1,6 @@
 .. -*- coding: utf-8; mode: rst -*-
 
-.. _vidioc-enuminput:
+.. _VIDIOC_ENUMINPUT:
 
 **********************
 ioctl VIDIOC_ENUMINPUT
Documentation/linux_tv/media/v4l/vidioc-enumoutput.rst +1 -1
index 89cccda0ccaa..6ccb3d094dc8 100644
@@ -1,6 +1,6 @@
 .. -*- coding: utf-8; mode: rst -*-
 
-.. _vidioc-enumoutput:
+.. _VIDIOC_ENUMOUTPUT:
 
 ***********************
 ioctl VIDIOC_ENUMOUTPUT
Documentation/linux_tv/media/v4l/vidioc-enumstd.rst +1 -1
index d82c49028d83..d16a9494d03b 100644
@@ -1,6 +1,6 @@
 .. -*- coding: utf-8; mode: rst -*-
 
-.. _vidioc-enumstd:
+.. _VIDIOC_ENUMSTD:
 
 ********************
 ioctl VIDIOC_ENUMSTD
Documentation/linux_tv/media/v4l/vidioc-expbuf.rst +5 -5
index 0de48b945a01..a389cbc75970 100644
@@ -1,6 +1,6 @@
 .. -*- coding: utf-8; mode: rst -*-
 
-.. _vidioc-expbuf:
+.. _VIDIOC_EXPBUF:
 
 *******************
 ioctl VIDIOC_EXPBUF
@@ -35,7 +35,7 @@ This ioctl is an extension to the :ref:`memory mapping <mmap>` I/O
 method, therefore it is available only for ``V4L2_MEMORY_MMAP`` buffers.
 It can be used to export a buffer as a DMABUF file at any time after
 buffers have been allocated with the
-:ref:`VIDIOC_REQBUFS <vidioc-reqbufs>` ioctl.
+:ref:`VIDIOC_REQBUFS <VIDIOC_REQBUFS>` ioctl.
 
 To export a buffer, applications fill struct
 :ref:`v4l2_exportbuffer <v4l2-exportbuffer>`. The ``type`` field is
@@ -43,7 +43,7 @@ set to the same buffer type as was previously used with struct
 :ref:`v4l2_requestbuffers <v4l2-requestbuffers>` ``type``.
 Applications must also set the ``index`` field. Valid index numbers
 range from zero to the number of buffers allocated with
-:ref:`VIDIOC_REQBUFS <vidioc-reqbufs>` (struct
+:ref:`VIDIOC_REQBUFS <VIDIOC_REQBUFS>` (struct
 :ref:`v4l2_requestbuffers <v4l2-requestbuffers>` ``count``) minus
 one. For the multi-planar API, applications set the ``plane`` field to
 the index of the plane to be exported. Valid planes range from zero to
@@ -142,8 +142,8 @@ Examples
        -  Number of the buffer, set by the application. This field is only
           used for :ref:`memory mapping <mmap>` I/O and can range from
           zero to the number of buffers allocated with the
-          :ref:`VIDIOC_REQBUFS <vidioc-reqbufs>` and/or
-          :ref:`VIDIOC_CREATE_BUFS <vidioc-create-bufs>` ioctls.
+          :ref:`VIDIOC_REQBUFS <VIDIOC_REQBUFS>` and/or
+          :ref:`VIDIOC_CREATE_BUFS <VIDIOC_CREATE_BUFS>` ioctls.
 
     -  .. row 3
 
Documentation/linux_tv/media/v4l/vidioc-g-audio.rst +1 -1
index 05df90f084e8..2a81d01a1c00 100644
@@ -1,6 +1,6 @@
 .. -*- coding: utf-8; mode: rst -*-
 
-.. _vidioc-g-audio:
+.. _VIDIOC_G_AUDIO:
 
 ************************************
 ioctl VIDIOC_G_AUDIO, VIDIOC_S_AUDIO
Documentation/linux_tv/media/v4l/vidioc-g-audioout.rst +1 -1
index ef4dce35992e..1da1e7ad51a6 100644
@@ -1,6 +1,6 @@
 .. -*- coding: utf-8; mode: rst -*-
 
-.. _vidioc-g-audioout:
+.. _VIDIOC_G_AUDIOOUT:
 
 **************************************
 ioctl VIDIOC_G_AUDOUT, VIDIOC_S_AUDOUT
Documentation/linux_tv/media/v4l/vidioc-g-crop.rst +2 -2
index 35f70134ac81..457a6cc6b63e 100644
@@ -1,6 +1,6 @@
 .. -*- coding: utf-8; mode: rst -*-
 
-.. _vidioc-g-crop:
+.. _VIDIOC_G_CROP:
 
 **********************************
 ioctl VIDIOC_G_CROP, VIDIOC_S_CROP
@@ -66,7 +66,7 @@ vertical scaling factor.
 Finally the driver programs the hardware with the actual cropping and
 image parameters. ``VIDIOC_S_CROP`` is a write-only ioctl, it does not
 return the actual parameters. To query them applications must call
-``VIDIOC_G_CROP`` and :ref:`VIDIOC_G_FMT <vidioc-g-fmt>`. When the
+``VIDIOC_G_CROP`` and :ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>`. When the
 parameters are unsuitable the application may modify the cropping or
 image parameters and repeat the cycle until satisfactory parameters have
 been negotiated.
Documentation/linux_tv/media/v4l/vidioc-g-ctrl.rst +5 -5
index 6381d7c13d58..6b2b157ba9c7 100644
@@ -1,6 +1,6 @@
 .. -*- coding: utf-8; mode: rst -*-
 
-.. _vidioc-g-ctrl:
+.. _VIDIOC_G_CTRL:
 
 **********************************
 ioctl VIDIOC_G_CTRL, VIDIOC_S_CTRL
@@ -48,9 +48,9 @@ actual new value. If the ``value`` is inappropriate for the control
 EINVAL error code is returned as well.
 
 These ioctls work only with user controls. For other control classes the
-:ref:`VIDIOC_G_EXT_CTRLS <vidioc-g-ext-ctrls>`,
-:ref:`VIDIOC_S_EXT_CTRLS <vidioc-g-ext-ctrls>` or
-:ref:`VIDIOC_TRY_EXT_CTRLS <vidioc-g-ext-ctrls>` must be used.
+:ref:`VIDIOC_G_EXT_CTRLS <VIDIOC_G_EXT_CTRLS>`,
+:ref:`VIDIOC_S_EXT_CTRLS <VIDIOC_G_EXT_CTRLS>` or
+:ref:`VIDIOC_TRY_EXT_CTRLS <VIDIOC_G_EXT_CTRLS>` must be used.
 
 
 .. _v4l2-control:
@@ -90,7 +90,7 @@ EINVAL
     The struct :ref:`v4l2_control <v4l2-control>` ``id`` is invalid
     or the ``value`` is inappropriate for the given control (i.e. if a
     menu item is selected that is not supported by the driver according
-    to :ref:`VIDIOC_QUERYMENU <vidioc-queryctrl>`).
+    to :ref:`VIDIOC_QUERYMENU <VIDIOC_QUERYCTRL>`).
 
 ERANGE
     The struct :ref:`v4l2_control <v4l2-control>` ``value`` is out of
Documentation/linux_tv/media/v4l/vidioc-g-dv-timings.rst +2 -2
index 19598b10d425..84f9db487822 100644
@@ -1,6 +1,6 @@
 .. -*- coding: utf-8; mode: rst -*-
 
-.. _vidioc-g-dv-timings:
+.. _VIDIOC_G_DV_TIMINGS:
 
 **********************************************
 ioctl VIDIOC_G_DV_TIMINGS, VIDIOC_S_DV_TIMINGS
@@ -47,7 +47,7 @@ values are not correct, the driver returns EINVAL error code.
 The ``linux/v4l2-dv-timings.h`` header can be used to get the timings of
 the formats in the :ref:`cea861` and :ref:`vesadmt` standards. If
 the current input or output does not support DV timings (e.g. if
-:ref:`VIDIOC_ENUMINPUT <vidioc-enuminput>` does not set the
+:ref:`VIDIOC_ENUMINPUT <VIDIOC_ENUMINPUT>` does not set the
 ``V4L2_IN_CAP_DV_TIMINGS`` flag), then ENODATA error code is returned.
 
 
Documentation/linux_tv/media/v4l/vidioc-g-edid.rst +5 -5
index 3138cfe7a26e..26bbf060aa51 100644
@@ -1,6 +1,6 @@
 .. -*- coding: utf-8; mode: rst -*-
 
-.. _vidioc-g-edid:
+.. _VIDIOC_G_EDID:
 
 ******************************************************************************
 ioctl VIDIOC_G_EDID, VIDIOC_S_EDID, VIDIOC_SUBDEV_G_EDID, VIDIOC_SUBDEV_S_EDID
@@ -44,8 +44,8 @@ with subdevice nodes (/dev/v4l-subdevX) or with video nodes
 
 When used with video nodes the ``pad`` field represents the input (for
 video capture devices) or output (for video output devices) index as is
-returned by :ref:`VIDIOC_ENUMINPUT <vidioc-enuminput>` and
-:ref:`VIDIOC_ENUMOUTPUT <vidioc-enumoutput>` respectively. When used
+returned by :ref:`VIDIOC_ENUMINPUT <VIDIOC_ENUMINPUT>` and
+:ref:`VIDIOC_ENUMOUTPUT <VIDIOC_ENUMOUTPUT>` respectively. When used
 with subdevice nodes the ``pad`` field represents the input or output
 pad of the subdevice. If there is no EDID support for the given ``pad``
 value, then the EINVAL error code will be returned.
@@ -105,8 +105,8 @@ EDID is no longer available.
 
        -  Pad for which to get/set the EDID blocks. When used with a video
           device node the pad represents the input or output index as
-          returned by :ref:`VIDIOC_ENUMINPUT <vidioc-enuminput>` and
-          :ref:`VIDIOC_ENUMOUTPUT <vidioc-enumoutput>` respectively.
+          returned by :ref:`VIDIOC_ENUMINPUT <VIDIOC_ENUMINPUT>` and
+          :ref:`VIDIOC_ENUMOUTPUT <VIDIOC_ENUMOUTPUT>` respectively.
 
     -  .. row 2
 
Documentation/linux_tv/media/v4l/vidioc-g-enc-index.rst +1 -1
index 5edf9cb46d15..68af83d964f6 100644
@@ -1,6 +1,6 @@
 .. -*- coding: utf-8; mode: rst -*-
 
-.. _vidioc-g-enc-index:
+.. _VIDIOC_G_ENC_INDEX:
 
 ************************
 ioctl VIDIOC_G_ENC_INDEX
Documentation/linux_tv/media/v4l/vidioc-g-ext-ctrls.rst +5 -5
index 66dce741a3c0..f800458d9dfe 100644
@@ -1,6 +1,6 @@
 .. -*- coding: utf-8; mode: rst -*-
 
-.. _vidioc-g-ext-ctrls:
+.. _VIDIOC_G_EXT_CTRLS:
 
 ******************************************************************
 ioctl VIDIOC_G_EXT_CTRLS, VIDIOC_S_EXT_CTRLS, VIDIOC_TRY_EXT_CTRLS
@@ -58,14 +58,14 @@ set ``size`` to a valid value and return an ENOSPC error code. You
 should re-allocate the memory to this new size and try again. For the
 string type it is possible that the same issue occurs again if the
 string has grown in the meantime. It is recommended to call
-:ref:`VIDIOC_QUERYCTRL <vidioc-queryctrl>` first and use
+:ref:`VIDIOC_QUERYCTRL <VIDIOC_QUERYCTRL>` first and use
 ``maximum``\ +1 as the new ``size`` value. It is guaranteed that that is
 sufficient memory.
 
 N-dimensional arrays are set and retrieved row-by-row. You cannot set a
 partial array, all elements have to be set or retrieved. The total size
 is calculated as ``elems`` * ``elem_size``. These values can be obtained
-by calling :ref:`VIDIOC_QUERY_EXT_CTRL <vidioc-queryctrl>`.
+by calling :ref:`VIDIOC_QUERY_EXT_CTRL <VIDIOC_QUERYCTRL>`.
 
 To change the value of a set of controls applications initialize the
 ``id``, ``size``, ``reserved2`` and ``value/value64/string/ptr`` fields
@@ -366,8 +366,8 @@ still cause this situation.
 
        -  The class containing user controls. These controls are described
           in :ref:`control`. All controls that can be set using the
-          :ref:`VIDIOC_S_CTRL <vidioc-g-ctrl>` and
-          :ref:`VIDIOC_G_CTRL <vidioc-g-ctrl>` ioctl belong to this
+          :ref:`VIDIOC_S_CTRL <VIDIOC_G_CTRL>` and
+          :ref:`VIDIOC_G_CTRL <VIDIOC_G_CTRL>` ioctl belong to this
           class.
 
     -  .. row 2
Documentation/linux_tv/media/v4l/vidioc-g-fbuf.rst +9 -9
index 499881e92a28..f4703b3449b3 100644
@@ -1,6 +1,6 @@
 .. -*- coding: utf-8; mode: rst -*-
 
-.. _vidioc-g-fbuf:
+.. _VIDIOC_G_FBUF:
 
 **********************************
 ioctl VIDIOC_G_FBUF, VIDIOC_S_FBUF
@@ -39,7 +39,7 @@ to get and set the framebuffer parameters for a
 :ref:`Video Overlay <overlay>` or :ref:`Video Output Overlay <osd>`
 (OSD). The type of overlay is implied by the device type (capture or
 output device) and can be determined with the
-:ref:`VIDIOC_QUERYCAP <vidioc-querycap>` ioctl. One ``/dev/videoN``
+:ref:`VIDIOC_QUERYCAP <VIDIOC_QUERYCAP>` ioctl. One ``/dev/videoN``
 device must not support both kinds of overlay.
 
 The V4L2 API distinguishes destructive and non-destructive overlays. A
@@ -202,7 +202,7 @@ destructive video overlay.
 
        -  Drivers and applications shall ignore this field. If applicable,
           the field order is selected with the
-          :ref:`VIDIOC_S_FMT <vidioc-g-fmt>` ioctl, using the ``field``
+          :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl, using the ``field``
           field of struct :ref:`v4l2_window <v4l2-window>`.
 
     -  .. row 13
@@ -396,12 +396,12 @@ destructive video overlay.
        -  If this flag is set for a video capture device, then the driver
           will set the initial overlay size to cover the full framebuffer
           size, otherwise the existing overlay size (as set by
-          :ref:`VIDIOC_S_FMT <vidioc-g-fmt>`) will be used. Only one
+          :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>`) will be used. Only one
           video capture driver (bttv) supports this flag. The use of this
           flag for capture devices is deprecated. There is no way to detect
           which drivers support this flag, so the only reliable method of
           setting the overlay size is through
-          :ref:`VIDIOC_S_FMT <vidioc-g-fmt>`. If this flag is set for a
+          :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>`. If this flag is set for a
           video output device, then the video output overlay window is
           relative to the top-left corner of the framebuffer and restricted
           to the size of the framebuffer. If it is cleared, then the video
@@ -415,14 +415,14 @@ destructive video overlay.
 
        -  Use chroma-keying. The chroma-key color is determined by the
           ``chromakey`` field of struct :ref:`v4l2_window <v4l2-window>`
-          and negotiated with the :ref:`VIDIOC_S_FMT <vidioc-g-fmt>`
+          and negotiated with the :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>`
           ioctl, see :ref:`overlay` and :ref:`osd`.
 
     -  .. row 4
 
        -  :cspan:`2` There are no flags to enable clipping using a list of
           clip rectangles or a bitmap. These methods are negotiated with the
-          :ref:`VIDIOC_S_FMT <vidioc-g-fmt>` ioctl, see :ref:`overlay`
+          :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl, see :ref:`overlay`
           and :ref:`osd`.
 
     -  .. row 5
@@ -447,7 +447,7 @@ destructive video overlay.
           + video pixel * (255 - alpha)) / 255. The alpha value is
           determined by the ``global_alpha`` field of struct
           :ref:`v4l2_window <v4l2-window>` and negotiated with the
-          :ref:`VIDIOC_S_FMT <vidioc-g-fmt>` ioctl, see :ref:`overlay`
+          :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl, see :ref:`overlay`
           and :ref:`osd`.
 
     -  .. row 7
@@ -471,7 +471,7 @@ destructive video overlay.
        -  Use source chroma-keying. The source chroma-key color is
           determined by the ``chromakey`` field of struct
           :ref:`v4l2_window <v4l2-window>` and negotiated with the
-          :ref:`VIDIOC_S_FMT <vidioc-g-fmt>` ioctl, see :ref:`overlay`
+          :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl, see :ref:`overlay`
           and :ref:`osd`. Both chroma-keying are mutual exclusive to each
           other, so same ``chromakey`` field of struct
           :ref:`v4l2_window <v4l2-window>` is being used.
Documentation/linux_tv/media/v4l/vidioc-g-fmt.rst +1 -1
index ed1daa32122b..1d392e6c538d 100644
@@ -1,6 +1,6 @@
 .. -*- coding: utf-8; mode: rst -*-
 
-.. _vidioc-g-fmt:
+.. _VIDIOC_G_FMT:
 
 ************************************************
 ioctl VIDIOC_G_FMT, VIDIOC_S_FMT, VIDIOC_TRY_FMT
Documentation/linux_tv/media/v4l/vidioc-g-frequency.rst +1 -1
index 1d9f0fe86fb0..ce247577c3a0 100644
@@ -1,6 +1,6 @@
 .. -*- coding: utf-8; mode: rst -*-
 
-.. _vidioc-g-frequency:
+.. _VIDIOC_G_FREQUENCY:
 
 ********************************************
 ioctl VIDIOC_G_FREQUENCY, VIDIOC_S_FREQUENCY
Documentation/linux_tv/media/v4l/vidioc-g-input.rst +2 -2
index fffba83242ed..62990976ff9b 100644
@@ -1,6 +1,6 @@
 .. -*- coding: utf-8; mode: rst -*-
 
-.. _vidioc-g-input:
+.. _VIDIOC_G_INPUT:
 
 ************************************
 ioctl VIDIOC_G_INPUT, VIDIOC_S_INPUT
@@ -47,7 +47,7 @@ applications must select an input before querying or negotiating any
 other parameters.
 
 Information about video inputs is available using the
-:ref:`VIDIOC_ENUMINPUT <vidioc-enuminput>` ioctl.
+:ref:`VIDIOC_ENUMINPUT <VIDIOC_ENUMINPUT>` ioctl.
 
 
 Return Value
Documentation/linux_tv/media/v4l/vidioc-g-jpegcomp.rst +1 -1
index 05d4ebf221e2..acd05bf0d7b6 100644
@@ -1,6 +1,6 @@
 .. -*- coding: utf-8; mode: rst -*-
 
-.. _vidioc-g-jpegcomp:
+.. _VIDIOC_G_JPEGCOMP:
 
 ******************************************
 ioctl VIDIOC_G_JPEGCOMP, VIDIOC_S_JPEGCOMP
Documentation/linux_tv/media/v4l/vidioc-g-modulator.rst +2 -2
index 3a8ae0a5891a..4399a13f94c1 100644
@@ -1,6 +1,6 @@
 .. -*- coding: utf-8; mode: rst -*-
 
-.. _vidioc-g-modulator:
+.. _VIDIOC_G_MODULATOR:
 
 ********************************************
 ioctl VIDIOC_G_MODULATOR, VIDIOC_S_MODULATOR
@@ -57,7 +57,7 @@ initialized to zero. The term 'modulator' means SDR transmitter in this
 context.
 
 To change the radio frequency the
-:ref:`VIDIOC_S_FREQUENCY <vidioc-g-frequency>` ioctl is available.
+:ref:`VIDIOC_S_FREQUENCY <VIDIOC_G_FREQUENCY>` ioctl is available.
 
 
 .. _v4l2-modulator:
Documentation/linux_tv/media/v4l/vidioc-g-output.rst +2 -2
index 8341f1f8a45c..3b9ea56e3b9e 100644
@@ -1,6 +1,6 @@
 .. -*- coding: utf-8; mode: rst -*-
 
-.. _vidioc-g-output:
+.. _VIDIOC_G_OUTPUT:
 
 **************************************
 ioctl VIDIOC_G_OUTPUT, VIDIOC_S_OUTPUT
@@ -48,7 +48,7 @@ effects applications must select an output before querying or
 negotiating any other parameters.
 
 Information about video outputs is available using the
-:ref:`VIDIOC_ENUMOUTPUT <vidioc-enumoutput>` ioctl.
+:ref:`VIDIOC_ENUMOUTPUT <VIDIOC_ENUMOUTPUT>` ioctl.
 
 
 Return Value
Documentation/linux_tv/media/v4l/vidioc-g-parm.rst +1 -1
index 2892653b5bc4..07432d386356 100644
@@ -1,6 +1,6 @@
 .. -*- coding: utf-8; mode: rst -*-
 
-.. _vidioc-g-parm:
+.. _VIDIOC_G_PARM:
 
 **********************************
 ioctl VIDIOC_G_PARM, VIDIOC_S_PARM
Documentation/linux_tv/media/v4l/vidioc-g-priority.rst +1 -1
index 0706f2f85a79..ee80c9e0c7d4 100644
@@ -1,6 +1,6 @@
 .. -*- coding: utf-8; mode: rst -*-
 
-.. _vidioc-g-priority:
+.. _VIDIOC_G_PRIORITY:
 
 ******************************************
 ioctl VIDIOC_G_PRIORITY, VIDIOC_S_PRIORITY
Documentation/linux_tv/media/v4l/vidioc-g-selection.rst +1 -1
index 7846553dc4de..fd07c87a369c 100644
@@ -1,6 +1,6 @@
 .. -*- coding: utf-8; mode: rst -*-
 
-.. _vidioc-g-selection:
+.. _VIDIOC_G_SELECTION:
 
 ********************************************
 ioctl VIDIOC_G_SELECTION, VIDIOC_S_SELECTION
Documentation/linux_tv/media/v4l/vidioc-g-sliced-vbi-cap.rst +2 -2
index c76f5682ad0a..8c86d2b41a5b 100644
@@ -1,6 +1,6 @@
 .. -*- coding: utf-8; mode: rst -*-
 
-.. _vidioc-g-sliced-vbi-cap:
+.. _VIDIOC_G_SLICED_VBI_CAP:
 
 *****************************
 ioctl VIDIOC_G_SLICED_VBI_CAP
@@ -134,7 +134,7 @@ to write-read, in Linux 2.6.19.
           given line may be limited. For example on PAL line 16 the hardware
           may be able to look for a VPS or Teletext signal, but not both at
           the same time. Applications can learn about these limits using the
-          :ref:`VIDIOC_S_FMT <vidioc-g-fmt>` ioctl as described in
+          :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl as described in
           :ref:`sliced`.
 
     -  .. row 10
Documentation/linux_tv/media/v4l/vidioc-g-std.rst +2 -2
index c01e8c1f51d0..9cbf2d2995c6 100644
@@ -1,6 +1,6 @@
 .. -*- coding: utf-8; mode: rst -*-
 
-.. _vidioc-g-std:
+.. _VIDIOC_G_STD:
 
 ********************************
 ioctl VIDIOC_G_STD, VIDIOC_S_STD
@@ -48,7 +48,7 @@ no flags are given or the current input does not support the requested
 standard the driver returns an EINVAL error code. When the standard set
 is ambiguous drivers may return EINVAL or choose any of the requested
 standards. If the current input or output does not support standard
-video timings (e.g. if :ref:`VIDIOC_ENUMINPUT <vidioc-enuminput>`
+video timings (e.g. if :ref:`VIDIOC_ENUMINPUT <VIDIOC_ENUMINPUT>`
 does not set the ``V4L2_IN_CAP_STD`` flag), then ENODATA error code is
 returned.
 
Documentation/linux_tv/media/v4l/vidioc-g-tuner.rst +5 -5
index d897f6862b9d..1ad5107a0ad5 100644
@@ -1,6 +1,6 @@
 .. -*- coding: utf-8; mode: rst -*-
 
-.. _vidioc-g-tuner:
+.. _VIDIOC_G_TUNER:
 
 ************************************
 ioctl VIDIOC_G_TUNER, VIDIOC_S_TUNER
@@ -56,7 +56,7 @@ selected audio mode.
 to zero. The term 'tuner' means SDR receiver in this context.
 
 To change the radio frequency the
-:ref:`VIDIOC_S_FREQUENCY <vidioc-g-frequency>` ioctl is available.
+:ref:`VIDIOC_S_FREQUENCY <VIDIOC_G_FREQUENCY>` ioctl is available.
 
 
 .. _v4l2-tuner:
@@ -323,7 +323,7 @@ To change the radio frequency the
           determined from the frequency band.) The set of supported video
           standards is available from the struct
           :ref:`v4l2_input <v4l2-input>` pointing to this tuner, see the
-          description of ioctl :ref:`VIDIOC_ENUMINPUT <vidioc-enuminput>`
+          description of ioctl :ref:`VIDIOC_ENUMINPUT <VIDIOC_ENUMINPUT>`
           for details. Only ``V4L2_TUNER_ANALOG_TV`` tuners can have this
           capability.
 
@@ -425,7 +425,7 @@ To change the radio frequency the
 
        -  0x0400
 
-       -  The :ref:`VIDIOC_ENUM_FREQ_BANDS <vidioc-enum-freq-bands>`
+       -  The :ref:`VIDIOC_ENUM_FREQ_BANDS <VIDIOC_ENUM_FREQ_BANDS>`
           ioctl can be used to enumerate the available frequency bands.
 
     -  .. row 13
@@ -436,7 +436,7 @@ To change the radio frequency the
 
        -  The range to search when using the hardware seek functionality is
           programmable, see
-          :ref:`VIDIOC_S_HW_FREQ_SEEK <vidioc-s-hw-freq-seek>` for
+          :ref:`VIDIOC_S_HW_FREQ_SEEK <VIDIOC_S_HW_FREQ_SEEK>` for
           details.
 
     -  .. row 14
Documentation/linux_tv/media/v4l/vidioc-log-status.rst +1 -1
index 0706274ff6a3..6df7c2fd5b6c 100644
@@ -1,6 +1,6 @@
 .. -*- coding: utf-8; mode: rst -*-
 
-.. _vidioc-log-status:
+.. _VIDIOC_LOG_STATUS:
 
 ***********************
 ioctl VIDIOC_LOG_STATUS
Documentation/linux_tv/media/v4l/vidioc-overlay.rst +3 -3
index d82d24fd7fb2..e0373a9d6f14 100644
@@ -1,6 +1,6 @@
 .. -*- coding: utf-8; mode: rst -*-
 
-.. _vidioc-overlay:
+.. _VIDIOC_OVERLAY:
 
 ********************
 ioctl VIDIOC_OVERLAY
@@ -36,8 +36,8 @@ Applications call ``VIDIOC_OVERLAY`` to start or stop the overlay. It
 takes a pointer to an integer which must be set to zero by the
 application to stop overlay, to one to start.
 
-Drivers do not support :ref:`VIDIOC_STREAMON <vidioc-streamon>` or
-:ref:`VIDIOC_STREAMOFF <vidioc-streamon>` with
+Drivers do not support :ref:`VIDIOC_STREAMON <VIDIOC_STREAMON>` or
+:ref:`VIDIOC_STREAMOFF <VIDIOC_STREAMON>` with
 ``V4L2_BUF_TYPE_VIDEO_OVERLAY``.
 
 
Documentation/linux_tv/media/v4l/vidioc-prepare-buf.rst +1 -1
index c29757f38066..fb3ac38b3db2 100644
@@ -1,6 +1,6 @@
 .. -*- coding: utf-8; mode: rst -*-
 
-.. _vidioc-prepare-buf:
+.. _VIDIOC_PREPARE_BUF:
 
 ************************
 ioctl VIDIOC_PREPARE_BUF
Documentation/linux_tv/media/v4l/vidioc-qbuf.rst +7 -7
index 6912780b0e3d..045fa53e0417 100644
@@ -1,6 +1,6 @@
 .. -*- coding: utf-8; mode: rst -*-
 
-.. _vidioc-qbuf:
+.. _VIDIOC_QBUF:
 
 *******************************
 ioctl VIDIOC_QBUF, VIDIOC_DQBUF
@@ -42,10 +42,10 @@ previously used with struct :ref:`v4l2_format <v4l2-format>` ``type``
 and struct :ref:`v4l2_requestbuffers <v4l2-requestbuffers>` ``type``.
 Applications must also set the ``index`` field. Valid index numbers
 range from zero to the number of buffers allocated with
-:ref:`VIDIOC_REQBUFS <vidioc-reqbufs>` (struct
+:ref:`VIDIOC_REQBUFS <VIDIOC_REQBUFS>` (struct
 :ref:`v4l2_requestbuffers <v4l2-requestbuffers>` ``count``) minus
 one. The contents of the struct :c:type:`struct v4l2_buffer` returned
-by a :ref:`VIDIOC_QUERYBUF <vidioc-querybuf>` ioctl will do as well.
+by a :ref:`VIDIOC_QUERYBUF <VIDIOC_QUERYBUF>` ioctl will do as well.
 When the buffer is intended for output (``type`` is
 ``V4L2_BUF_TYPE_VIDEO_OUTPUT``, ``V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE``,
 or ``V4L2_BUF_TYPE_VBI_OUTPUT``) applications must also initialize the
@@ -75,8 +75,8 @@ the driver sets the ``V4L2_BUF_FLAG_QUEUED`` flag and clears the
 ``flags`` field, or it returns an error code. This ioctl locks the
 memory pages of the buffer in physical memory, they cannot be swapped
 out to disk. Buffers remain locked until dequeued, until the
-:ref:`VIDIOC_STREAMOFF <vidioc-streamon>` or
-:ref:`VIDIOC_REQBUFS <vidioc-reqbufs>` ioctl is called, or until the
+:ref:`VIDIOC_STREAMOFF <VIDIOC_STREAMON>` or
+:ref:`VIDIOC_REQBUFS <VIDIOC_REQBUFS>` ioctl is called, or until the
 device is closed.
 
 To enqueue a :ref:`DMABUF <dmabuf>` buffer applications set the
@@ -91,8 +91,8 @@ sets the ``V4L2_BUF_FLAG_QUEUED`` flag and clears the
 buffer. Locking a buffer means passing it to a driver for a hardware
 access (usually DMA). If an application accesses (reads/writes) a locked
 buffer then the result is undefined. Buffers remain locked until
-dequeued, until the :ref:`VIDIOC_STREAMOFF <vidioc-streamon>` or
-:ref:`VIDIOC_REQBUFS <vidioc-reqbufs>` ioctl is called, or until the
+dequeued, until the :ref:`VIDIOC_STREAMOFF <VIDIOC_STREAMON>` or
+:ref:`VIDIOC_REQBUFS <VIDIOC_REQBUFS>` ioctl is called, or until the
 device is closed.
 
 Applications call the ``VIDIOC_DQBUF`` ioctl to dequeue a filled
Documentation/linux_tv/media/v4l/vidioc-query-dv-timings.rst +2 -2
index 567faa73e23b..88aedbd1fcae 100644
@@ -1,6 +1,6 @@
 .. -*- coding: utf-8; mode: rst -*-
 
-.. _vidioc-query-dv-timings:
+.. _VIDIOC_QUERY_DV_TIMINGS:
 
 *****************************
 ioctl VIDIOC_QUERY_DV_TIMINGS
@@ -56,7 +56,7 @@ the receiver could lock to the signal, but the format is unsupported
 (e.g. because the pixelclock is out of range of the hardware
 capabilities), then the driver fills in whatever timings it could find
 and returns ERANGE. In that case the application can call
-:ref:`VIDIOC_DV_TIMINGS_CAP <vidioc-dv-timings-cap>` to compare the
+:ref:`VIDIOC_DV_TIMINGS_CAP <VIDIOC_DV_TIMINGS_CAP>` to compare the
 found timings with the hardware's capabilities in order to give more
 precise feedback to the user.
 
Documentation/linux_tv/media/v4l/vidioc-querybuf.rst +3 -3
index 092ed4586a18..baa3ad6591c7 100644
@@ -1,6 +1,6 @@
 .. -*- coding: utf-8; mode: rst -*-
 
-.. _vidioc-querybuf:
+.. _VIDIOC_QUERYBUF:
 
 *********************
 ioctl VIDIOC_QUERYBUF
@@ -33,7 +33,7 @@ Description
 
 This ioctl is part of the :ref:`streaming <mmap>` I/O method. It can
 be used to query the status of a buffer at any time after buffers have
-been allocated with the :ref:`VIDIOC_REQBUFS <vidioc-reqbufs>` ioctl.
+been allocated with the :ref:`VIDIOC_REQBUFS <VIDIOC_REQBUFS>` ioctl.
 
 Applications set the ``type`` field of a struct
 :ref:`v4l2_buffer <v4l2-buffer>` to the same buffer type as was
@@ -41,7 +41,7 @@ previously used with struct :ref:`v4l2_format <v4l2-format>` ``type``
 and struct :ref:`v4l2_requestbuffers <v4l2-requestbuffers>` ``type``,
 and the ``index`` field. Valid index numbers range from zero to the
 number of buffers allocated with
-:ref:`VIDIOC_REQBUFS <vidioc-reqbufs>` (struct
+:ref:`VIDIOC_REQBUFS <VIDIOC_REQBUFS>` (struct
 :ref:`v4l2_requestbuffers <v4l2-requestbuffers>` ``count``) minus
 one. The ``reserved`` and ``reserved2`` fields must be set to 0. When
 using the :ref:`multi-planar API <planar-apis>`, the ``m.planes``
Documentation/linux_tv/media/v4l/vidioc-querycap.rst +2 -2
index 54f86443dfcc..3032a9ee1c6b 100644
@@ -1,6 +1,6 @@
 .. -*- coding: utf-8; mode: rst -*-
 
-.. _vidioc-querycap:
+.. _VIDIOC_QUERYCAP:
 
 *********************
 ioctl VIDIOC_QUERYCAP
@@ -308,7 +308,7 @@ specification the ioctl returns an EINVAL error code.
        -  0x00000400
 
[… more lines in the raw message]

Lines of this file are not shown. View the raw message.

Documentation/linux_tv/media/v4l/vidioc-queryctrl.rst +3 -3
index 116b69c1f818..7d38a51c4f73 100644

Lines of this file are not shown. View the raw message.

Documentation/linux_tv/media/v4l/vidioc-querystd.rst +1 -1
index 8e22ba4b9c99..1d825fff9d15 100644

Lines of this file are not shown. View the raw message.

Documentation/linux_tv/media/v4l/vidioc-reqbufs.rst +2 -2
index 621e3c1e054d..c17d3b0465d6 100644

Lines of this file are not shown. View the raw message.

Documentation/linux_tv/media/v4l/vidioc-s-hw-freq-seek.rst +3 -3
index 72ae6ba6bada..19c2e0afd7de 100644

Lines of this file are not shown. View the raw message.

Documentation/linux_tv/media/v4l/vidioc-streamon.rst +4 -4
index 0f7f6e00a759..349204d81334 100644

Lines of this file are not shown. View the raw message.

Documentation/linux_tv/media/v4l/vidioc-subdev-enum-frame-interval.rst +2 -2
index 87506d6b0e53..d9f27e32eb60 100644

Lines of this file are not shown. View the raw message.

Documentation/linux_tv/media/v4l/vidioc-subdev-enum-frame-size.rst +4 -4
index 7f867e2930be..49be2eefaa57 100644

Lines of this file are not shown. View the raw message.

Documentation/linux_tv/media/v4l/vidioc-subdev-enum-mbus-code.rst +2 -2
index 97534457db6a..a9b0baba2633 100644

Lines of this file are not shown. View the raw message.

Documentation/linux_tv/media/v4l/vidioc-subdev-g-crop.rst +2 -2
index e54a07c8ba1d..bef416cfe46c 100644

Lines of this file are not shown. View the raw message.

Documentation/linux_tv/media/v4l/vidioc-subdev-g-fmt.rst +1 -1
index 5dcbc03b4ffc..789277a2647a 100644

Lines of this file are not shown. View the raw message.

Documentation/linux_tv/media/v4l/vidioc-subdev-g-frame-interval.rst +1 -1
index af0918900f8a..bcc54e2e396f 100644

Lines of this file are not shown. View the raw message.

Documentation/linux_tv/media/v4l/vidioc-subdev-g-selection.rst +2 -2
index 8e4c8e10494e..7b60c9b99aad 100644

Lines of this file are not shown. View the raw message.

Documentation/linux_tv/media/v4l/vidioc-subscribe-event.rst +4 -4
index f12981c38f63..8d0e346461e9 100644

Lines of this file are not shown. View the raw message.

The rest of this diff is not shown. View the raw message.

Signature · 1 line
2.7.4

Part of the diff is not shown here. View the raw message.

#12 lore raw

PATCH 12/51 Documentation: linux_tv: simplify references

In reply to Mauro Carvalho Chehab

There are lots of internal references in the form:

	:ref:`foo <foo>`

Simplify them to be just: :ref:foo.

Patch generated via this small script:

for j in $(find . -name '*.rst'); do echo $j; perl -ne 'if (m/\(\S+)\s*\<(\S+)\>\/) { if (!($1=~'http') && $1 eq $2) { s,\s*\<(\S+)\>,,; } } print $_' <$j >a && mv a $j; done

---
 .../media/dvb/FE_DISHNETWORK_SEND_LEGACY_CMD.rst   |  2 +-
 Documentation/linux_tv/media/dvb/FE_GET_EVENT.rst  |  2 +-
 .../linux_tv/media/dvb/FE_GET_FRONTEND.rst         |  4 +-
 Documentation/linux_tv/media/dvb/FE_READ_BER.rst   |  4 +-
 .../linux_tv/media/dvb/FE_READ_SIGNAL_STRENGTH.rst |  4 +-
 Documentation/linux_tv/media/dvb/FE_READ_SNR.rst   |  4 +-
 .../media/dvb/FE_READ_UNCORRECTED_BLOCKS.rst       |  4 +-
 .../linux_tv/media/dvb/FE_SET_FRONTEND.rst         |  8 +--
 .../linux_tv/media/dvb/audio_function_calls.rst    |  2 +-
 .../linux_tv/media/dvb/dvb-fe-read-status.rst      |  4 +-
 .../media/dvb/frontend-stat-properties.rst         |  2 +-
 .../linux_tv/media/dvb/frontend_f_open.rst         |  2 +-
 .../linux_tv/media/dvb/query-dvb-frontend-info.rst |  2 +-
 .../linux_tv/media/dvb/video_function_calls.rst    | 14 ++--
 Documentation/linux_tv/media/v4l/app-pri.rst       |  4 +-
 Documentation/linux_tv/media/v4l/audio.rst         | 14 ++--
 Documentation/linux_tv/media/v4l/buffer.rst        | 26 ++++----
 Documentation/linux_tv/media/v4l/control.rst       |  8 +--
 Documentation/linux_tv/media/v4l/crop.rst          |  6 +-
 Documentation/linux_tv/media/v4l/dev-capture.rst   |  6 +-
 Documentation/linux_tv/media/v4l/dev-codec.rst     |  2 +-
 Documentation/linux_tv/media/v4l/dev-event.rst     |  4 +-
 Documentation/linux_tv/media/v4l/dev-osd.rst       |  6 +-
 Documentation/linux_tv/media/v4l/dev-output.rst    |  4 +-
 Documentation/linux_tv/media/v4l/dev-overlay.rst   | 14 ++--
 Documentation/linux_tv/media/v4l/dev-radio.rst     |  6 +-
 Documentation/linux_tv/media/v4l/dev-raw-vbi.rst   |  8 +--
 Documentation/linux_tv/media/v4l/dev-rds.rst       |  4 +-
 Documentation/linux_tv/media/v4l/dev-sdr.rst       | 16 ++---
 .../linux_tv/media/v4l/dev-sliced-vbi.rst          | 18 +++---
 Documentation/linux_tv/media/v4l/dev-subdev.rst    | 10 +--
 Documentation/linux_tv/media/v4l/dev-teletext.rst  |  2 +-
 Documentation/linux_tv/media/v4l/diff-v4l.rst      | 58 ++++++++---------
 Documentation/linux_tv/media/v4l/dmabuf.rst        | 12 ++--
 Documentation/linux_tv/media/v4l/dv-timings.rst    |  8 +--
 .../linux_tv/media/v4l/extended-controls.rst       | 28 ++++----
 Documentation/linux_tv/media/v4l/format.rst        |  6 +-
 Documentation/linux_tv/media/v4l/func-mmap.rst     |  6 +-
 Documentation/linux_tv/media/v4l/func-poll.rst     | 10 +--
 Documentation/linux_tv/media/v4l/func-read.rst     |  2 +-
 Documentation/linux_tv/media/v4l/func-select.rst   |  4 +-
 Documentation/linux_tv/media/v4l/hist-v4l2.rst     | 74 +++++++++++-----------
 Documentation/linux_tv/media/v4l/io.rst            |  2 +-
 .../linux_tv/media/v4l/libv4l-introduction.rst     |  8 +--
 Documentation/linux_tv/media/v4l/mmap.rst          | 16 ++---
 Documentation/linux_tv/media/v4l/open.rst          |  4 +-
 Documentation/linux_tv/media/v4l/pixfmt-013.rst    |  2 +-
 .../linux_tv/media/v4l/pixfmt-packed-rgb.rst       |  2 +-
 Documentation/linux_tv/media/v4l/pixfmt.rst        |  2 +-
 Documentation/linux_tv/media/v4l/planar-apis.rst   | 10 +--
 Documentation/linux_tv/media/v4l/querycap.rst      | 12 ++--
 Documentation/linux_tv/media/v4l/rw.rst            |  2 +-
 Documentation/linux_tv/media/v4l/standard.rst      | 10 +--
 Documentation/linux_tv/media/v4l/streaming-par.rst |  2 +-
 Documentation/linux_tv/media/v4l/tuner.rst         | 14 ++--
 Documentation/linux_tv/media/v4l/userp.rst         | 12 ++--
 Documentation/linux_tv/media/v4l/video.rst         | 10 +--
 .../linux_tv/media/v4l/vidioc-create-bufs.rst      |  4 +-
 .../linux_tv/media/v4l/vidioc-dbg-g-chip-info.rst  |  2 +-
 .../linux_tv/media/v4l/vidioc-dbg-g-register.rst   |  6 +-
 .../linux_tv/media/v4l/vidioc-decoder-cmd.rst      |  2 +-
 .../linux_tv/media/v4l/vidioc-dqevent.rst          |  2 +-
 .../linux_tv/media/v4l/vidioc-encoder-cmd.rst      |  2 +-
 .../linux_tv/media/v4l/vidioc-enum-dv-timings.rst  |  2 +-
 .../media/v4l/vidioc-enum-frameintervals.rst       |  4 +-
 .../linux_tv/media/v4l/vidioc-enum-framesizes.rst  |  2 +-
 Documentation/linux_tv/media/v4l/vidioc-expbuf.rst |  8 +--
 Documentation/linux_tv/media/v4l/vidioc-g-crop.rst |  2 +-
 Documentation/linux_tv/media/v4l/vidioc-g-ctrl.rst |  2 +-
 .../linux_tv/media/v4l/vidioc-g-dv-timings.rst     |  2 +-
 Documentation/linux_tv/media/v4l/vidioc-g-edid.rst |  8 +--
 .../linux_tv/media/v4l/vidioc-g-ext-ctrls.rst      |  4 +-
 Documentation/linux_tv/media/v4l/vidioc-g-fbuf.rst |  2 +-
 .../linux_tv/media/v4l/vidioc-g-input.rst          |  2 +-
 .../linux_tv/media/v4l/vidioc-g-output.rst         |  2 +-
 Documentation/linux_tv/media/v4l/vidioc-g-std.rst  |  2 +-
 .../linux_tv/media/v4l/vidioc-g-tuner.rst          |  8 +--
 .../linux_tv/media/v4l/vidioc-overlay.rst          |  2 +-
 Documentation/linux_tv/media/v4l/vidioc-qbuf.rst   |  8 +--
 .../linux_tv/media/v4l/vidioc-query-dv-timings.rst |  2 +-
 .../linux_tv/media/v4l/vidioc-querybuf.rst         |  4 +-
 .../linux_tv/media/v4l/vidioc-querycap.rst         |  2 +-
 .../linux_tv/media/v4l/vidioc-queryctrl.rst        |  2 +-
 .../linux_tv/media/v4l/vidioc-s-hw-freq-seek.rst   |  4 +-
 .../linux_tv/media/v4l/vidioc-streamon.rst         |  6 +-
 .../v4l/vidioc-subdev-enum-frame-interval.rst      |  2 +-
 .../media/v4l/vidioc-subdev-enum-frame-size.rst    |  4 +-
 .../media/v4l/vidioc-subdev-enum-mbus-code.rst     |  2 +-
 .../linux_tv/media/v4l/vidioc-subdev-g-crop.rst    |  2 +-
 .../linux_tv/media/v4l/vidioc-subscribe-event.rst  |  2 +-
 90 files changed, 321 insertions(+), 321 deletions(-)
Documentation/linux_tv/media/dvb/FE_DISHNETWORK_SEND_LEGACY_CMD.rst +1 -1
index f4effaab9a1a..a01cafad8d3c 100644
@@ -20,7 +20,7 @@ dishes were already legacy in 2004.
 SYNOPSIS
 
 int ioctl(int fd, int request =
-:ref:`FE_DISHNETWORK_SEND_LEGACY_CMD <FE_DISHNETWORK_SEND_LEGACY_CMD>`,
+:ref:`FE_DISHNETWORK_SEND_LEGACY_CMD`,
 unsigned long cmd);
 
 PARAMETERS
Documentation/linux_tv/media/dvb/FE_GET_EVENT.rst +1 -1
index 75eab893c184..8d1caedd2f97 100644
@@ -38,7 +38,7 @@ PARAMETERS
 
        -  int request
 
-       -  Equals :ref:`FE_GET_EVENT <FE_GET_EVENT>` for this command.
+       -  Equals :ref:`FE_GET_EVENT` for this command.
 
     -  .. row 3
 
Documentation/linux_tv/media/dvb/FE_GET_FRONTEND.rst +2 -2
index 30c85cf0423c..2e60b239d1da 100644
@@ -14,7 +14,7 @@ this command, read-only access to the device is sufficient.
 SYNOPSIS
 
 int ioctl(int fd, int request =
-:ref:`FE_GET_FRONTEND <FE_GET_FRONTEND>`, struct
+:ref:`FE_GET_FRONTEND`, struct
 dvb_frontend_parameters *p);
 
 PARAMETERS
@@ -36,7 +36,7 @@ PARAMETERS
 
        -  int request
 
-       -  Equals :ref:`FE_SET_FRONTEND <FE_SET_FRONTEND>` for this
+       -  Equals :ref:`FE_SET_FRONTEND` for this
           command.
 
     -  .. row 3
Documentation/linux_tv/media/dvb/FE_READ_BER.rst +2 -2
index e21451886dc2..935c0e50b0fd 100644
@@ -14,7 +14,7 @@ access to the device is sufficient.
 
 SYNOPSIS
 
-int ioctl(int fd, int request = :ref:`FE_READ_BER <FE_READ_BER>`,
+int ioctl(int fd, int request = :ref:`FE_READ_BER`,
 uint32_t *ber);
 
 PARAMETERS
@@ -36,7 +36,7 @@ PARAMETERS
 
        -  int request
 
-       -  Equals :ref:`FE_READ_BER <FE_READ_BER>` for this command.
+       -  Equals :ref:`FE_READ_BER` for this command.
 
     -  .. row 3
 
Documentation/linux_tv/media/dvb/FE_READ_SIGNAL_STRENGTH.rst +2 -2
index 3e34bea21b6c..01180e20e4d4 100644
@@ -15,7 +15,7 @@ to the device is sufficient.
 SYNOPSIS
 
 int ioctl( int fd, int request =
-:ref:`FE_READ_SIGNAL_STRENGTH <FE_READ_SIGNAL_STRENGTH>`,
+:ref:`FE_READ_SIGNAL_STRENGTH`,
 uint16_t *strength);
 
 PARAMETERS
@@ -38,7 +38,7 @@ PARAMETERS
        -  int request
 
        -  Equals
-          :ref:`FE_READ_SIGNAL_STRENGTH <FE_READ_SIGNAL_STRENGTH>`
+          :ref:`FE_READ_SIGNAL_STRENGTH`
           for this command.
 
     -  .. row 3
Documentation/linux_tv/media/dvb/FE_READ_SNR.rst +2 -2
index b8a639706e9e..0ccc7d71d8a4 100644
@@ -14,7 +14,7 @@ to the device is sufficient.
 
 SYNOPSIS
 
-int ioctl(int fd, int request = :ref:`FE_READ_SNR <FE_READ_SNR>`,
+int ioctl(int fd, int request = :ref:`FE_READ_SNR`,
 uint16_t *snr);
 
 PARAMETERS
@@ -36,7 +36,7 @@ PARAMETERS
 
        -  int request
 
-       -  Equals :ref:`FE_READ_SNR <FE_READ_SNR>` for this command.
+       -  Equals :ref:`FE_READ_SNR` for this command.
 
     -  .. row 3
 
Documentation/linux_tv/media/dvb/FE_READ_UNCORRECTED_BLOCKS.rst +2 -2
index 261eb20ddadf..3827c7b953e1 100644
@@ -17,7 +17,7 @@ sufficient.
 SYNOPSIS
 
 int ioctl( int fd, int request =
-:ref:`FE_READ_UNCORRECTED_BLOCKS <FE_READ_UNCORRECTED_BLOCKS>`,
+:ref:`FE_READ_UNCORRECTED_BLOCKS`,
 uint32_t *ublocks);
 
 PARAMETERS
@@ -40,7 +40,7 @@ PARAMETERS
        -  int request
 
        -  Equals
-          :ref:`FE_READ_UNCORRECTED_BLOCKS <FE_READ_UNCORRECTED_BLOCKS>`
+          :ref:`FE_READ_UNCORRECTED_BLOCKS`
           for this command.
 
     -  .. row 3
Documentation/linux_tv/media/dvb/FE_SET_FRONTEND.rst +4 -4
index 885f9e3ceb59..f18e12cb3dff 100644
@@ -12,8 +12,8 @@ This ioctl call starts a tuning operation using specified parameters.
 The result of this call will be successful if the parameters were valid
 and the tuning could be initiated. The result of the tuning operation in
 itself, however, will arrive asynchronously as an event (see
-documentation for :ref:`FE_GET_EVENT <FE_GET_EVENT>` and
-FrontendEvent.) If a new :ref:`FE_SET_FRONTEND <FE_SET_FRONTEND>`
+documentation for :ref:`FE_GET_EVENT` and
+FrontendEvent.) If a new :ref:`FE_SET_FRONTEND`
 operation is initiated before the previous one was completed, the
 previous operation will be aborted in favor of the new one. This command
 requires read/write access to the device.
@@ -21,7 +21,7 @@ requires read/write access to the device.
 SYNOPSIS
 
 int ioctl(int fd, int request =
-:ref:`FE_SET_FRONTEND <FE_SET_FRONTEND>`, struct
+:ref:`FE_SET_FRONTEND`, struct
 dvb_frontend_parameters *p);
 
 PARAMETERS
@@ -43,7 +43,7 @@ PARAMETERS
 
        -  int request
 
-       -  Equals :ref:`FE_SET_FRONTEND <FE_SET_FRONTEND>` for this
+       -  Equals :ref:`FE_SET_FRONTEND` for this
           command.
 
     -  .. row 3
Documentation/linux_tv/media/dvb/audio_function_calls.rst +1 -1
index d1a5b5970b71..a68149e16116 100644
@@ -456,7 +456,7 @@ AUDIO_SET_MUTE
 DESCRIPTION
 
 This ioctl is for DVB devices only. To control a V4L2 decoder use the
-V4L2 :ref:`VIDIOC_DECODER_CMD <VIDIOC_DECODER_CMD>` with the
+V4L2 :ref:`VIDIOC_DECODER_CMD` with the
 ``V4L2_DEC_CMD_START_MUTE_AUDIO`` flag instead.
 
 This ioctl call asks the audio device to mute the stream that is
Documentation/linux_tv/media/dvb/dvb-fe-read-status.rst +2 -2
index 12d8749e9e05..e36cd134007e 100644
@@ -12,10 +12,10 @@ tuner lock status and provide statistics about the quality of the
 signal.
 
 The information about the frontend tuner locking status can be queried
-using :ref:`FE_READ_STATUS <FE_READ_STATUS>`.
+using :ref:`FE_READ_STATUS`.
 
 Signal statistics are provided via
-:ref:`FE_GET_PROPERTY <FE_GET_PROPERTY>`. Please note that several
+:ref:`FE_GET_PROPERTY`. Please note that several
 statistics require the demodulator to be fully locked (e. g. with
 FE_HAS_LOCK bit set). See
 :ref:`Frontend statistics indicators <frontend-stat-properties>` for
Documentation/linux_tv/media/dvb/frontend-stat-properties.rst +1 -1
index 36461d65a661..7f3999db3e5d 100644
@@ -234,7 +234,7 @@ measurement was taken.
 
 It can be used to calculate the PER indicator, by dividing
 :ref:`DTV_STAT_ERROR_BLOCK_COUNT <DTV-STAT-ERROR-BLOCK-COUNT>` by
-:ref:`DTV-STAT-TOTAL-BLOCK-COUNT <DTV-STAT-TOTAL-BLOCK-COUNT>`.
+:ref:`DTV-STAT-TOTAL-BLOCK-COUNT`.
 
 Possible scales for this metric are:
 
Documentation/linux_tv/media/dvb/frontend_f_open.rst +1 -1
index 676ae922338d..91ac9ef8c356 100644
@@ -49,7 +49,7 @@ Description
 This system call opens a named frontend device
 (``/dev/dvb/adapter?/frontend?``) for subsequent use. Usually the first
 thing to do after a successful open is to find out the frontend type
-with :ref:`FE_GET_INFO <FE_GET_INFO>`.
+with :ref:`FE_GET_INFO`.
 
 The device can be opened in read-only mode, which only allows monitoring
 of device status and statistics, or read/write mode, which allows any
Documentation/linux_tv/media/dvb/query-dvb-frontend-info.rst +1 -1
index 4a4fd5af6e0f..a3da1b8376bc 100644
@@ -8,7 +8,7 @@ Querying frontend information
 
 Usually, the first thing to do when the frontend is opened is to check
 the frontend capabilities. This is done using
-:ref:`FE_GET_INFO <FE_GET_INFO>`. This ioctl will enumerate the
+:ref:`FE_GET_INFO`. This ioctl will enumerate the
 DVB API version and other characteristics about the frontend, and can be
 opened either in read only or read/write mode.
 
Documentation/linux_tv/media/dvb/video_function_calls.rst +7 -7
index 98c90dcdb587..78917bdf51ed 100644
@@ -239,7 +239,7 @@ VIDEO_STOP
 DESCRIPTION
 
 This ioctl is for DVB devices only. To control a V4L2 decoder use the
-V4L2 :ref:`VIDIOC_DECODER_CMD <VIDIOC_DECODER_CMD>` instead.
+V4L2 :ref:`VIDIOC_DECODER_CMD` instead.
 
 This ioctl call asks the Video Device to stop playing the current
 stream. Depending on the input parameter, the screen can be blanked out
@@ -302,7 +302,7 @@ VIDEO_PLAY
 DESCRIPTION
 
 This ioctl is for DVB devices only. To control a V4L2 decoder use the
-V4L2 :ref:`VIDIOC_DECODER_CMD <VIDIOC_DECODER_CMD>` instead.
+V4L2 :ref:`VIDIOC_DECODER_CMD` instead.
 
 This ioctl call asks the Video Device to start playing a video stream
 from the selected source.
@@ -348,7 +348,7 @@ VIDEO_FREEZE
 DESCRIPTION
 
 This ioctl is for DVB devices only. To control a V4L2 decoder use the
-V4L2 :ref:`VIDIOC_DECODER_CMD <VIDIOC_DECODER_CMD>` instead.
+V4L2 :ref:`VIDIOC_DECODER_CMD` instead.
 
 This ioctl call suspends the live video stream being played. Decoding
 and playing are frozen. It is then possible to restart the decoding and
@@ -398,7 +398,7 @@ VIDEO_CONTINUE
 DESCRIPTION
 
 This ioctl is for DVB devices only. To control a V4L2 decoder use the
-V4L2 :ref:`VIDIOC_DECODER_CMD <VIDIOC_DECODER_CMD>` instead.
+V4L2 :ref:`VIDIOC_DECODER_CMD` instead.
 
 This ioctl call restarts decoding and playing processes of the video
 stream which was played before a call to VIDEO_FREEZE was made.
@@ -763,7 +763,7 @@ VIDEO_GET_EVENT
 DESCRIPTION
 
 This ioctl is for DVB devices only. To get events from a V4L2 decoder
-use the V4L2 :ref:`VIDIOC_DQEVENT <VIDIOC_DQEVENT>` ioctl instead.
+use the V4L2 :ref:`VIDIOC_DQEVENT` ioctl instead.
 
 This ioctl call returns an event of type video_event if available. If
 an event is not available, the behavior depends on whether the device is
@@ -844,11 +844,11 @@ DESCRIPTION
 
 This ioctl is obsolete. Do not use in new drivers. For V4L2 decoders
 this ioctl has been replaced by the
-:ref:`VIDIOC_DECODER_CMD <VIDIOC_DECODER_CMD>` ioctl.
+:ref:`VIDIOC_DECODER_CMD` ioctl.
 
 This ioctl commands the decoder. The ``video_command`` struct is a
 subset of the ``v4l2_decoder_cmd`` struct, so refer to the
-:ref:`VIDIOC_DECODER_CMD <VIDIOC_DECODER_CMD>` documentation for
+:ref:`VIDIOC_DECODER_CMD` documentation for
 more information.
 
 SYNOPSIS
Documentation/linux_tv/media/v4l/app-pri.rst +2 -2
index bc50afca95fc..4faf9042f612 100644
@@ -16,14 +16,14 @@ applications and automatically regain control of the device at a later
 time.
 
 Since these features cannot be implemented entirely in user space V4L2
-defines the :ref:`VIDIOC_G_PRIORITY <VIDIOC_G_PRIORITY>` and
+defines the :ref:`VIDIOC_G_PRIORITY` and
 :ref:`VIDIOC_S_PRIORITY <VIDIOC_G_PRIORITY>` ioctls to request and
 query the access priority associate with a file descriptor. Opening a
 device assigns a medium priority, compatible with earlier versions of
 V4L2 and drivers not supporting these ioctls. Applications requiring a
 different priority will usually call :ref:`VIDIOC_S_PRIORITY
 <VIDIOC_G_PRIORITY>` after verifying the device with the
-:ref:`VIDIOC_QUERYCAP <VIDIOC_QUERYCAP>` ioctl.
+:ref:`VIDIOC_QUERYCAP` ioctl.
 
 Ioctls changing driver properties, such as
 :ref:`VIDIOC_S_INPUT <VIDIOC_G_INPUT>`, return an EBUSY error code
Documentation/linux_tv/media/v4l/audio.rst +7 -7
index fa6bf5ad8d32..21db1b97b83c 100644
@@ -27,18 +27,18 @@ number, starting at zero, of one audio input or output.
 
 To learn about the number and attributes of the available inputs and
 outputs applications can enumerate them with the
-:ref:`VIDIOC_ENUMAUDIO <VIDIOC_ENUMAUDIO>` and
+:ref:`VIDIOC_ENUMAUDIO` and
 :ref:`VIDIOC_ENUMAUDOUT <VIDIOC_ENUMAUDIOout>` ioctl, respectively.
 The struct :ref:`v4l2_audio <v4l2-audio>` returned by the
-:ref:`VIDIOC_ENUMAUDIO <VIDIOC_ENUMAUDIO>` ioctl also contains signal
+:ref:`VIDIOC_ENUMAUDIO` ioctl also contains signal
 :status information applicable when the current audio input is queried.
 
-The :ref:`VIDIOC_G_AUDIO <VIDIOC_G_AUDIO>` and
+The :ref:`VIDIOC_G_AUDIO` and
 :ref:`VIDIOC_G_AUDOUT <VIDIOC_G_AUDIOout>` ioctls report the current
 audio input and output, respectively. Note that, unlike
-:ref:`VIDIOC_G_INPUT <VIDIOC_G_INPUT>` and
-:ref:`VIDIOC_G_OUTPUT <VIDIOC_G_OUTPUT>` these ioctls return a
-structure as :ref:`VIDIOC_ENUMAUDIO <VIDIOC_ENUMAUDIO>` and
+:ref:`VIDIOC_G_INPUT` and
+:ref:`VIDIOC_G_OUTPUT` these ioctls return a
+structure as :ref:`VIDIOC_ENUMAUDIO` and
 :ref:`VIDIOC_ENUMAUDOUT <VIDIOC_ENUMAUDIOout>` do, not just an index.
 
 To select an audio input and change its properties applications call the
@@ -51,7 +51,7 @@ multiple selectable audio inputs, all audio output ioctls when the
 device has multiple selectable audio outputs. When the device has any
 audio inputs or outputs the driver must set the ``V4L2_CAP_AUDIO`` flag
 in the struct :ref:`v4l2_capability <v4l2-capability>` returned by
-the :ref:`VIDIOC_QUERYCAP <VIDIOC_QUERYCAP>` ioctl.
+the :ref:`VIDIOC_QUERYCAP` ioctl.
 
 
 .. code-block:: c
Documentation/linux_tv/media/v4l/buffer.rst +13 -13
index 7d96ab74500f..374e9ba6b4bb 100644
@@ -12,8 +12,8 @@ planes, while the buffer structure acts as a container for the planes.
 Only pointers to buffers (planes) are exchanged, the data itself is not
 copied. These pointers, together with meta-information like timestamps
 or field parity, are stored in a struct :c:type:`struct v4l2_buffer`,
-argument to the :ref:`VIDIOC_QUERYBUF <VIDIOC_QUERYBUF>`,
-:ref:`VIDIOC_QBUF <VIDIOC_QBUF>` and
+argument to the :ref:`VIDIOC_QUERYBUF`,
+:ref:`VIDIOC_QBUF` and
 :ref:`VIDIOC_DQBUF <VIDIOC_QBUF>` ioctl. In the multi-planar API,
 some plane-specific members of struct :c:type:`struct v4l2_buffer`,
 such as pointers and sizes for each plane, are stored in struct
@@ -52,10 +52,10 @@ buffer.
        -  Number of the buffer, set by the application except when calling
           :ref:`VIDIOC_DQBUF <VIDIOC_QBUF>`, then it is set by the
           driver. This field can range from zero to the number of buffers
-          allocated with the :ref:`VIDIOC_REQBUFS <VIDIOC_REQBUFS>` ioctl
+          allocated with the :ref:`VIDIOC_REQBUFS` ioctl
           (struct :ref:`v4l2_requestbuffers <v4l2-requestbuffers>`
           ``count``), plus any buffers allocated with
-          :ref:`VIDIOC_CREATE_BUFS <VIDIOC_CREATE_BUFS>` minus one.
+          :ref:`VIDIOC_CREATE_BUFS` minus one.
 
     -  .. row 2
 
@@ -243,8 +243,8 @@ buffer.
        -  
        -  Size of the buffer (not the payload) in bytes for the
           single-planar API. This is set by the driver based on the calls to
-          :ref:`VIDIOC_REQBUFS <VIDIOC_REQBUFS>` and/or
-          :ref:`VIDIOC_CREATE_BUFS <VIDIOC_CREATE_BUFS>`. For the
+          :ref:`VIDIOC_REQBUFS` and/or
+          :ref:`VIDIOC_CREATE_BUFS`. For the
           multi-planar API the application sets this to the number of
           elements in the ``planes`` array. The driver will fill in the
           actual number of valid elements in that array.
@@ -303,8 +303,8 @@ buffer.
        -  
        -  Size in bytes of the plane (not its payload). This is set by the
           driver based on the calls to
-          :ref:`VIDIOC_REQBUFS <VIDIOC_REQBUFS>` and/or
-          :ref:`VIDIOC_CREATE_BUFS <VIDIOC_CREATE_BUFS>`.
+          :ref:`VIDIOC_REQBUFS` and/or
+          :ref:`VIDIOC_CREATE_BUFS`.
 
     -  .. row 3
 
@@ -506,8 +506,8 @@ buffer.
        -  The buffer resides in device memory and has been mapped into the
           application's address space, see :ref:`mmap` for details.
           Drivers set or clear this flag when the
-          :ref:`VIDIOC_QUERYBUF <VIDIOC_QUERYBUF>`,
-          :ref:`VIDIOC_QBUF <VIDIOC_QBUF>` or
+          :ref:`VIDIOC_QUERYBUF`,
+          :ref:`VIDIOC_QBUF` or
           :ref:`VIDIOC_DQBUF <VIDIOC_QBUF>` ioctl is called. Set by the
           driver.
 
@@ -609,9 +609,9 @@ buffer.
 
        -  The buffer has been prepared for I/O and can be queued by the
           application. Drivers set or clear this flag when the
-          :ref:`VIDIOC_QUERYBUF <VIDIOC_QUERYBUF>`,
+          :ref:`VIDIOC_QUERYBUF`,
           :ref:`VIDIOC_PREPARE_BUF <VIDIOC_QBUF>`,
-          :ref:`VIDIOC_QBUF <VIDIOC_QBUF>` or
+          :ref:`VIDIOC_QBUF` or
           :ref:`VIDIOC_DQBUF <VIDIOC_QBUF>` ioctl is called.
 
     -  .. row 10
@@ -645,7 +645,7 @@ buffer.
 
        -  Last buffer produced by the hardware. mem2mem codec drivers set
           this flag on the capture queue for the last buffer when the
-          :ref:`VIDIOC_QUERYBUF <VIDIOC_QUERYBUF>` or
+          :ref:`VIDIOC_QUERYBUF` or
           :ref:`VIDIOC_DQBUF <VIDIOC_QBUF>` ioctl is called. Due to
           hardware limitations, the last buffer may be empty. In this case
           the driver will set the ``bytesused`` field to 0, regardless of
Documentation/linux_tv/media/v4l/control.rst +4 -4
index 3e5c650707ae..02bd455a2616 100644
@@ -47,7 +47,7 @@ changed or generally never without application request.
 
 V4L2 specifies an event mechanism to notify applications when controls
 change value (see
-:ref:`VIDIOC_SUBSCRIBE_EVENT <VIDIOC_SUBSCRIBE_EVENT>`, event
+:ref:`VIDIOC_SUBSCRIBE_EVENT`, event
 ``V4L2_EVENT_CTRL``), panel applications might want to make use of that
 in order to always reflect the correct control value.
 
@@ -362,9 +362,9 @@ Control IDs
     and version, see :ref:`querycap`.
 
 Applications can enumerate the available controls with the
-:ref:`VIDIOC_QUERYCTRL <VIDIOC_QUERYCTRL>` and
+:ref:`VIDIOC_QUERYCTRL` and
 :ref:`VIDIOC_QUERYMENU <VIDIOC_QUERYCTRL>` ioctls, get and set a
-control value with the :ref:`VIDIOC_G_CTRL <VIDIOC_G_CTRL>` and
+control value with the :ref:`VIDIOC_G_CTRL` and
 :ref:`VIDIOC_S_CTRL <VIDIOC_G_CTRL>` ioctls. Drivers must implement
 ``VIDIOC_QUERYCTRL``, ``VIDIOC_G_CTRL`` and ``VIDIOC_S_CTRL`` when the
 device has one or more controls, ``VIDIOC_QUERYMENU`` when it has one or
@@ -522,7 +522,7 @@ more menu type controls.
    the real IDs.
 
    Many applications today still use the ``V4L2_CID_PRIVATE_BASE`` IDs
-   instead of using :ref:`VIDIOC_QUERYCTRL <VIDIOC_QUERYCTRL>` with
+   instead of using :ref:`VIDIOC_QUERYCTRL` with
    the ``V4L2_CTRL_FLAG_NEXT_CTRL`` flag to enumerate all IDs, so
    support for ``V4L2_CID_PRIVATE_BASE`` is still around.
 
Documentation/linux_tv/media/v4l/crop.rst +3 -3
index 94f2d0e77ed8..41a5efaaa679 100644
@@ -14,8 +14,8 @@ offset into a video signal.
 
 Applications can use the following API to select an area in the video
 signal, query the default area and the hardware limits. *Despite their
-name, the :ref:`VIDIOC_CROPCAP <VIDIOC_CROPCAP>`,
-:ref:`VIDIOC_G_CROP <VIDIOC_G_CROP>` and
+name, the :ref:`VIDIOC_CROPCAP`,
+:ref:`VIDIOC_G_CROP` and
 :ref:`VIDIOC_S_CROP <VIDIOC_G_CROP>` ioctls apply to input as well
 as output devices.*
 
@@ -23,7 +23,7 @@ Scaling requires a source and a target. On a video capture or overlay
 device the source is the video signal, and the cropping ioctls determine
 the area actually sampled. The target are images read by the application
 or overlaid onto the graphics screen. Their size (and position for an
-overlay) is negotiated with the :ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>`
+overlay) is negotiated with the :ref:`VIDIOC_G_FMT`
 and :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctls.
 
 On a video output device the source are the images passed in by the
Documentation/linux_tv/media/v4l/dev-capture.rst +3 -3
index fd6357c995aa..eb5c1522905d 100644
@@ -25,7 +25,7 @@ Devices supporting the video capture interface set the
 ``V4L2_CAP_VIDEO_CAPTURE`` or ``V4L2_CAP_VIDEO_CAPTURE_MPLANE`` flag in
 the ``capabilities`` field of struct
 :ref:`v4l2_capability <v4l2-capability>` returned by the
-:ref:`VIDIOC_QUERYCAP <VIDIOC_QUERYCAP>` ioctl. As secondary device
+:ref:`VIDIOC_QUERYCAP` ioctl. As secondary device
 functions they may also support the :ref:`video overlay <overlay>`
 (``V4L2_CAP_VIDEO_OVERLAY``) and the :ref:`raw VBI capture <raw-vbi>`
 (``V4L2_CAP_VBI_CAPTURE``) interface. At least one of the read/write or
@@ -37,7 +37,7 @@ Supplemental Functions
 ======================
 
 Video capture devices shall support :ref:`audio input <audio>`,
-:ref:`tuner <tuner>`, :ref:`controls <control>`,
+:ref:`tuner`, :ref:`controls <control>`,
 :ref:`cropping and scaling <crop>` and
 :ref:`streaming parameter <streaming-par>` ioctls as needed. The
 :ref:`video input <video>` and :ref:`video standard <standard>`
@@ -65,7 +65,7 @@ To query the current image format applications set the ``type`` field of
 a struct :ref:`v4l2_format <v4l2-format>` to
 ``V4L2_BUF_TYPE_VIDEO_CAPTURE`` or
 ``V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE`` and call the
-:ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>` ioctl with a pointer to this
+:ref:`VIDIOC_G_FMT` ioctl with a pointer to this
 structure. Drivers fill the struct
 :ref:`v4l2_pix_format <v4l2-pix-format>` ``pix`` or the struct
 :ref:`v4l2_pix_format_mplane <v4l2-pix-format-mplane>` ``pix_mp``
Documentation/linux_tv/media/v4l/dev-codec.rst +1 -1
index 1540755b1735..170954acc049 100644
@@ -15,7 +15,7 @@ A memory-to-memory video node acts just like a normal video node, but it
 supports both output (sending frames from memory to the codec hardware)
 and capture (receiving the processed frames from the codec hardware into
 memory) stream I/O. An application will have to setup the stream I/O for
-both sides and finally call :ref:`VIDIOC_STREAMON <VIDIOC_STREAMON>`
+both sides and finally call :ref:`VIDIOC_STREAMON`
 for both capture and output to start the codec.
 
 Video compression codecs use the MPEG controls to setup their codec
Documentation/linux_tv/media/v4l/dev-event.rst +2 -2
index 5d21c6873b1a..385a8a342903 100644
@@ -14,9 +14,9 @@ events.
 
 To receive events, the events the user is interested in first must be
 subscribed using the
-:ref:`VIDIOC_SUBSCRIBE_EVENT <VIDIOC_SUBSCRIBE_EVENT>` ioctl. Once
+:ref:`VIDIOC_SUBSCRIBE_EVENT` ioctl. Once
 an event is subscribed, the events of subscribed types are dequeueable
-using the :ref:`VIDIOC_DQEVENT <VIDIOC_DQEVENT>` ioctl. Events may be
+using the :ref:`VIDIOC_DQEVENT` ioctl. Events may be
 unsubscribed using VIDIOC_UNSUBSCRIBE_EVENT ioctl. The special event
 type V4L2_EVENT_ALL may be used to unsubscribe all the events the
 driver supports.
Documentation/linux_tv/media/v4l/dev-osd.rst +3 -3
index 93fb8f309091..27d2cfbf3d9c 100644
@@ -26,7 +26,7 @@ Querying Capabilities
 Devices supporting the *Video Output Overlay* interface set the
 ``V4L2_CAP_VIDEO_OUTPUT_OVERLAY`` flag in the ``capabilities`` field of
 struct :ref:`v4l2_capability <v4l2-capability>` returned by the
-:ref:`VIDIOC_QUERYCAP <VIDIOC_QUERYCAP>` ioctl.
+:ref:`VIDIOC_QUERYCAP` ioctl.
 
 
 Framebuffer
@@ -36,7 +36,7 @@ Contrary to the *Video Overlay* interface the framebuffer is normally
 implemented on the TV card and not the graphics card. On Linux it is
 accessible as a framebuffer device (``/dev/fbN``). Given a V4L2 device,
 applications can find the corresponding framebuffer device by calling
-the :ref:`VIDIOC_G_FBUF <VIDIOC_G_FBUF>` ioctl. It returns, amongst
+the :ref:`VIDIOC_G_FBUF` ioctl. It returns, amongst
 other information, the physical address of the framebuffer in the
 ``base`` field of struct :ref:`v4l2_framebuffer <v4l2-framebuffer>`.
 The framebuffer device ioctl ``FBIOGET_FSCREENINFO`` returns the same
@@ -115,7 +115,7 @@ clipping/blending method to be used for the overlay. To get the current
 parameters applications set the ``type`` field of a struct
 :ref:`v4l2_format <v4l2-format>` to
 ``V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY`` and call the
-:ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>` ioctl. The driver fills the
+:ref:`VIDIOC_G_FMT` ioctl. The driver fills the
 :c:type:`struct v4l2_window` substructure named ``win``. It is not
 possible to retrieve a previously programmed clipping list or bitmap.
 
Documentation/linux_tv/media/v4l/dev-output.rst +2 -2
index 3efbbcc3c093..1ca0e5873a86 100644
@@ -24,7 +24,7 @@ Devices supporting the video output interface set the
 ``V4L2_CAP_VIDEO_OUTPUT`` or ``V4L2_CAP_VIDEO_OUTPUT_MPLANE`` flag in
 the ``capabilities`` field of struct
 :ref:`v4l2_capability <v4l2-capability>` returned by the
-:ref:`VIDIOC_QUERYCAP <VIDIOC_QUERYCAP>` ioctl. As secondary device
+:ref:`VIDIOC_QUERYCAP` ioctl. As secondary device
 functions they may also support the :ref:`raw VBI output <raw-vbi>`
 (``V4L2_CAP_VBI_OUTPUT``) interface. At least one of the read/write or
 streaming I/O methods must be supported. Modulators and audio outputs
@@ -62,7 +62,7 @@ defaults. An example is given in :ref:`crop`.
 To query the current image format applications set the ``type`` field of
 a struct :ref:`v4l2_format <v4l2-format>` to
 ``V4L2_BUF_TYPE_VIDEO_OUTPUT`` or ``V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE``
-and call the :ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>` ioctl with a pointer
+and call the :ref:`VIDIOC_G_FMT` ioctl with a pointer
 to this structure. Drivers fill the struct
 :ref:`v4l2_pix_format <v4l2-pix-format>` ``pix`` or the struct
 :ref:`v4l2_pix_format_mplane <v4l2-pix-format-mplane>` ``pix_mp``
Documentation/linux_tv/media/v4l/dev-overlay.rst +7 -7
index 8a81e19a5d7c..acbcfb4cbe57 100644
@@ -41,7 +41,7 @@ Querying Capabilities
 Devices supporting the video overlay interface set the
 ``V4L2_CAP_VIDEO_OVERLAY`` flag in the ``capabilities`` field of struct
 :ref:`v4l2_capability <v4l2-capability>` returned by the
-:ref:`VIDIOC_QUERYCAP <VIDIOC_QUERYCAP>` ioctl. The overlay I/O
+:ref:`VIDIOC_QUERYCAP` ioctl. The overlay I/O
 method specified below must be supported. Tuners and audio inputs are
 optional.
 
@@ -50,7 +50,7 @@ Supplemental Functions
 ======================
 
 Video overlay devices shall support :ref:`audio input <audio>`,
-:ref:`tuner <tuner>`, :ref:`controls <control>`,
+:ref:`tuner`, :ref:`controls <control>`,
 :ref:`cropping and scaling <crop>` and
 :ref:`streaming parameter <streaming-par>` ioctls as needed. The
 :ref:`video input <video>` and :ref:`video standard <standard>`
@@ -63,7 +63,7 @@ Setup
 Before overlay can commence applications must program the driver with
 frame buffer parameters, namely the address and size of the frame buffer
 and the image format, for example RGB 5:6:5. The
-:ref:`VIDIOC_G_FBUF <VIDIOC_G_FBUF>` and
+:ref:`VIDIOC_G_FBUF` and
 :ref:`VIDIOC_S_FBUF <VIDIOC_G_FBUF>` ioctls are available to get and
 set these parameters, respectively. The ``VIDIOC_S_FBUF`` ioctl is
 privileged because it allows to set up DMA into physical memory,
@@ -121,7 +121,7 @@ its position over the graphics surface and the clipping to be applied.
 To get the current parameters applications set the ``type`` field of a
 struct :ref:`v4l2_format <v4l2-format>` to
 ``V4L2_BUF_TYPE_VIDEO_OVERLAY`` and call the
-:ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>` ioctl. The driver fills the
+:ref:`VIDIOC_G_FMT` ioctl. The driver fills the
 :c:type:`struct v4l2_window` substructure named ``win``. It is not
 possible to retrieve a previously programmed clipping list or bitmap.
 
@@ -179,7 +179,7 @@ struct v4l2_window
 
 ``struct v4l2_clip * clips``
     When chroma-keying has *not* been negotiated and
-    :ref:`VIDIOC_G_FBUF <VIDIOC_G_FBUF>` indicated this capability,
+    :ref:`VIDIOC_G_FBUF` indicated this capability,
     applications can set this field to point to an array of clipping
     rectangles.
 
@@ -204,7 +204,7 @@ are undefined.
 
 ``void * bitmap``
     When chroma-keying has *not* been negotiated and
-    :ref:`VIDIOC_G_FBUF <VIDIOC_G_FBUF>` indicated this capability,
+    :ref:`VIDIOC_G_FBUF` indicated this capability,
     applications can set this field to point to a clipping bit mask.
 
 It must be of the same size as the window, ``w.width`` and ``w.height``.
@@ -289,7 +289,7 @@ Enabling Overlay
 ================
 
 To start or stop the frame buffer overlay applications call the
-:ref:`VIDIOC_OVERLAY <VIDIOC_OVERLAY>` ioctl.
+:ref:`VIDIOC_OVERLAY` ioctl.
 
 .. [1]
    A common application of two file descriptors is the XFree86
Documentation/linux_tv/media/v4l/dev-radio.rst +3 -3
index 955173aaf48e..7a0d25a143a6 100644
@@ -21,7 +21,7 @@ Devices supporting the radio interface set the ``V4L2_CAP_RADIO`` and
 ``V4L2_CAP_TUNER`` or ``V4L2_CAP_MODULATOR`` flag in the
 ``capabilities`` field of struct
 :ref:`v4l2_capability <v4l2-capability>` returned by the
-:ref:`VIDIOC_QUERYCAP <VIDIOC_QUERYCAP>` ioctl. Other combinations of
+:ref:`VIDIOC_QUERYCAP` ioctl. Other combinations of
 capability flags are reserved for future extensions.
 
 
@@ -47,8 +47,8 @@ discussed in :ref:`tuner`) with index number zero to select the radio
 frequency and to determine if a monaural or FM stereo program is
 received/emitted. Drivers switch automatically between AM and FM
 depending on the selected frequency. The
-:ref:`VIDIOC_G_TUNER <VIDIOC_G_TUNER>` or
-:ref:`VIDIOC_G_MODULATOR <VIDIOC_G_MODULATOR>` ioctl reports the
+:ref:`VIDIOC_G_TUNER` or
+:ref:`VIDIOC_G_MODULATOR` ioctl reports the
 supported frequency range.
 
 
Documentation/linux_tv/media/v4l/dev-raw-vbi.rst +4 -4
index 883ac4fbaeb6..ca61dde3ad38 100644
@@ -40,7 +40,7 @@ Devices supporting the raw VBI capturing or output API set the
 ``V4L2_CAP_VBI_CAPTURE`` or ``V4L2_CAP_VBI_OUTPUT`` flags, respectively,
 in the ``capabilities`` field of struct
 :ref:`v4l2_capability <v4l2-capability>` returned by the
-:ref:`VIDIOC_QUERYCAP <VIDIOC_QUERYCAP>` ioctl. At least one of the
+:ref:`VIDIOC_QUERYCAP` ioctl. At least one of the
 read/write, streaming or asynchronous I/O methods must be supported. VBI
 devices may or may not have a tuner or modulator.
 
@@ -71,7 +71,7 @@ parameters and then checking if the actual parameters are suitable.
 To query the current raw VBI capture parameters applications set the
 ``type`` field of a struct :ref:`v4l2_format <v4l2-format>` to
 ``V4L2_BUF_TYPE_VBI_CAPTURE`` or ``V4L2_BUF_TYPE_VBI_OUTPUT``, and call
-the :ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>` ioctl with a pointer to this
+the :ref:`VIDIOC_G_FMT` ioctl with a pointer to this
 structure. Drivers fill the struct
 :ref:`v4l2_vbi_format <v4l2-vbi-format>` ``vbi`` member of the
 ``fmt`` union.
@@ -91,7 +91,7 @@ happen for instance when the video and VBI areas to capture would
 overlap, or when the driver supports multiple opens and another process
 already requested VBI capturing or output. Anyway, applications must
 expect other resource allocation points which may return EBUSY, at the
-:ref:`VIDIOC_STREAMON <VIDIOC_STREAMON>` ioctl and the first read(),
+:ref:`VIDIOC_STREAMON` ioctl and the first read(),
 write() and select() call.
 
 VBI devices must implement both the ``VIDIOC_G_FMT`` and
@@ -339,7 +339,7 @@ A VBI device may support :ref:`read/write <rw>` and/or streaming
 The latter bears the possibility of synchronizing video and VBI data by
 using buffer timestamps.
 
-Remember the :ref:`VIDIOC_STREAMON <VIDIOC_STREAMON>` ioctl and the
+Remember the :ref:`VIDIOC_STREAMON` ioctl and the
 first read(), write() and select() call can be resource allocation
 points returning an EBUSY error code if the required hardware resources
 are temporarily unavailable, for example the device is already in use by
Documentation/linux_tv/media/v4l/dev-rds.rst +2 -2
index af20f8fa1cdf..223df4971405 100644
@@ -33,7 +33,7 @@ Querying Capabilities
 Devices supporting the RDS capturing API set the
 ``V4L2_CAP_RDS_CAPTURE`` flag in the ``capabilities`` field of struct
 :ref:`v4l2_capability <v4l2-capability>` returned by the
-:ref:`VIDIOC_QUERYCAP <VIDIOC_QUERYCAP>` ioctl. Any tuner that
+:ref:`VIDIOC_QUERYCAP` ioctl. Any tuner that
 supports RDS will set the ``V4L2_TUNER_CAP_RDS`` flag in the
 ``capability`` field of struct :ref:`v4l2_tuner <v4l2-tuner>`. If the
 driver only passes RDS blocks without interpreting the data the
@@ -52,7 +52,7 @@ Whether an RDS signal is present can be detected by looking at the
 Devices supporting the RDS output API set the ``V4L2_CAP_RDS_OUTPUT``
 flag in the ``capabilities`` field of struct
 :ref:`v4l2_capability <v4l2-capability>` returned by the
-:ref:`VIDIOC_QUERYCAP <VIDIOC_QUERYCAP>` ioctl. Any modulator that
+:ref:`VIDIOC_QUERYCAP` ioctl. Any modulator that
 supports RDS will set the ``V4L2_TUNER_CAP_RDS`` flag in the
 ``capability`` field of struct
 :ref:`v4l2_modulator <v4l2-modulator>`. In order to enable the RDS
Documentation/linux_tv/media/v4l/dev-sdr.rst +8 -8
index 5e4f7030f644..0cae31c93dd0 100644
@@ -22,7 +22,7 @@ Devices supporting the SDR receiver interface set the
 ``V4L2_CAP_SDR_CAPTURE`` and ``V4L2_CAP_TUNER`` flag in the
 ``capabilities`` field of struct
 :ref:`v4l2_capability <v4l2-capability>` returned by the
-:ref:`VIDIOC_QUERYCAP <VIDIOC_QUERYCAP>` ioctl. That flag means the
+:ref:`VIDIOC_QUERYCAP` ioctl. That flag means the
 device has an Analog to Digital Converter (ADC), which is a mandatory
 element for the SDR receiver.
 
@@ -30,7 +30,7 @@ Devices supporting the SDR transmitter interface set the
 ``V4L2_CAP_SDR_OUTPUT`` and ``V4L2_CAP_MODULATOR`` flag in the
 ``capabilities`` field of struct
 :ref:`v4l2_capability <v4l2-capability>` returned by the
-:ref:`VIDIOC_QUERYCAP <VIDIOC_QUERYCAP>` ioctl. That flag means the
+:ref:`VIDIOC_QUERYCAP` ioctl. That flag means the
 device has an Digital to Analog Converter (DAC), which is a mandatory
 element for the SDR transmitter.
 
@@ -42,7 +42,7 @@ Supplemental Functions
 ======================
 
 SDR devices can support :ref:`controls <control>`, and must support
-the :ref:`tuner <tuner>` ioctls. Tuner ioctls are used for setting the
+the :ref:`tuner` ioctls. Tuner ioctls are used for setting the
 ADC/DAC sampling rate (sampling frequency) and the possible radio
 frequency (RF).
 
@@ -52,21 +52,21 @@ radio frequency. The tuner index of the RF tuner (if any) must always
 follow the SDR tuner index. Normally the SDR tuner is #0 and the RF
 tuner is #1.
 
-The :ref:`VIDIOC_S_HW_FREQ_SEEK <VIDIOC_S_HW_FREQ_SEEK>` ioctl is
+The :ref:`VIDIOC_S_HW_FREQ_SEEK` ioctl is
 not supported.
 
 
 Data Format Negotiation
 =======================
 
-The SDR device uses the :ref:`format <format>` ioctls to select the
+The SDR device uses the :ref:`format` ioctls to select the
 capture and output format. Both the sampling resolution and the data
 streaming format are bound to that selectable format. In addition to the
-basic :ref:`format <format>` ioctls, the
-:ref:`VIDIOC_ENUM_FMT <VIDIOC_ENUM_FMT>` ioctl must be supported as
+basic :ref:`format` ioctls, the
+:ref:`VIDIOC_ENUM_FMT` ioctl must be supported as
 well.
 
-To use the :ref:`format <format>` ioctls applications set the ``type``
+To use the :ref:`format` ioctls applications set the ``type``
 field of a struct :ref:`v4l2_format <v4l2-format>` to
 ``V4L2_BUF_TYPE_SDR_CAPTURE`` or ``V4L2_BUF_TYPE_SDR_OUTPUT`` and use
 the struct :ref:`v4l2_sdr_format <v4l2-sdr-format>` ``sdr`` member
Documentation/linux_tv/media/v4l/dev-sliced-vbi.rst +9 -9
index 0faf178168e4..d53353afbedf 100644
@@ -35,7 +35,7 @@ Devices supporting the sliced VBI capturing or output API set the
 ``V4L2_CAP_SLICED_VBI_CAPTURE`` or ``V4L2_CAP_SLICED_VBI_OUTPUT`` flag
 respectively, in the ``capabilities`` field of struct
 :ref:`v4l2_capability <v4l2-capability>` returned by the
-:ref:`VIDIOC_QUERYCAP <VIDIOC_QUERYCAP>` ioctl. At least one of the
+:ref:`VIDIOC_QUERYCAP` ioctl. At least one of the
 read/write, streaming or asynchronous :ref:`I/O methods <io>` must be
 supported. Sliced VBI devices may have a tuner or modulator.
 
@@ -45,7 +45,7 @@ Supplemental Functions
 
 Sliced VBI devices shall support :ref:`video input or output <video>`
 and :ref:`tuner or modulator <tuner>` ioctls if they have these
-capabilities, and they may support :ref:`control <control>` ioctls.
+capabilities, and they may support :ref:`control` ioctls.
 The :ref:`video standard <standard>` ioctls provide information vital
 to program a sliced VBI device, therefore must be supported.
 
@@ -57,7 +57,7 @@ Sliced VBI Format Negotiation
 
 To find out which data services are supported by the hardware
 applications can call the
-:ref:`VIDIOC_G_SLICED_VBI_CAP <VIDIOC_G_SLICED_VBI_CAP>` ioctl.
+:ref:`VIDIOC_G_SLICED_VBI_CAP` ioctl.
 All drivers implementing the sliced VBI interface must support this
 ioctl. The results may differ from those of the
 :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl when the number of VBI
@@ -70,7 +70,7 @@ To determine the currently selected services applications set the
 ``type`` field of struct :ref:`v4l2_format <v4l2-format>` to
 ``V4L2_BUF_TYPE_SLICED_VBI_CAPTURE`` or
 ``V4L2_BUF_TYPE_SLICED_VBI_OUTPUT``, and the
-:ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>` ioctl fills the ``fmt.sliced``
+:ref:`VIDIOC_G_FMT` ioctl fills the ``fmt.sliced``
 member, a struct
 :ref:`v4l2_sliced_vbi_format <v4l2-sliced-vbi-format>`.
 
@@ -95,7 +95,7 @@ according to hardware capabilities. When the driver allocates resources
 at this point, it may return an EBUSY error code if the required
 resources are temporarily unavailable. Other resource allocation points
 which may return EBUSY can be the
-:ref:`VIDIOC_STREAMON <VIDIOC_STREAMON>` ioctl and the first
+:ref:`VIDIOC_STREAMON` ioctl and the first
 :ref:`read() <func-read>`, :ref:`write() <func-write>` and
 :ref:`select() <func-select>` call.
 
@@ -224,7 +224,7 @@ which may return EBUSY can be the
        -  :cspan:`2` Maximum number of bytes passed by one
           :ref:`read() <func-read>` or :ref:`write() <func-write>` call,
           and the buffer size in bytes for the
-          :ref:`VIDIOC_QBUF <VIDIOC_QBUF>` and
+          :ref:`VIDIOC_QBUF` and
           :ref:`VIDIOC_DQBUF <VIDIOC_QBUF>` ioctl. Drivers set this field
           to the size of struct
           :ref:`v4l2_sliced_vbi_data <v4l2-sliced-vbi-data>` times the
@@ -343,7 +343,7 @@ after switching the video input (which may change the video standard as
 a side effect). The :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl may
 return an EBUSY error code when applications attempt to change the
 format while i/o is in progress (between a
-:ref:`VIDIOC_STREAMON <VIDIOC_STREAMON>` and
+:ref:`VIDIOC_STREAMON` and
 :ref:`VIDIOC_STREAMOFF <VIDIOC_STREAMON>` call, and after the first
 :ref:`read() <func-read>` or :ref:`write() <func-write>` call).
 
@@ -428,11 +428,11 @@ of one video frame. The ``id`` of unused
 
 Packets are always passed in ascending line number order, without
 duplicate line numbers. The :ref:`write() <func-write>` function and
-the :ref:`VIDIOC_QBUF <VIDIOC_QBUF>` ioctl must return an EINVAL
+the :ref:`VIDIOC_QBUF` ioctl must return an EINVAL
 error code when applications violate this rule. They must also return an
 EINVAL error code when applications pass an incorrect field or line
 number, or a combination of ``field``, ``line`` and ``id`` which has not
-been negotiated with the :ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>` or
+been negotiated with the :ref:`VIDIOC_G_FMT` or
 :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl. When the line numbers are
 unknown the driver must pass the packets in transmitted order. The
 driver can insert empty packets with ``id`` set to zero anywhere in the
Documentation/linux_tv/media/v4l/dev-subdev.rst +5 -5
index 1fe594c0026f..67732da53be5 100644
@@ -118,18 +118,18 @@ every point in the pipeline explicitly.
 Drivers that implement the :ref:`media API <media-controller-intro>`
 can expose pad-level image format configuration to applications. When
 they do, applications can use the
-:ref:`VIDIOC_SUBDEV_G_FMT <VIDIOC_SUBDEV_G_FMT>` and
+:ref:`VIDIOC_SUBDEV_G_FMT` and
 :ref:`VIDIOC_SUBDEV_S_FMT <VIDIOC_SUBDEV_G_FMT>` ioctls. to
 negotiate formats on a per-pad basis.
 
 Applications are responsible for configuring coherent parameters on the
 whole pipeline and making sure that connected pads have compatible
 formats. The pipeline is checked for formats mismatch at
-:ref:`VIDIOC_STREAMON <VIDIOC_STREAMON>` time, and an EPIPE error
+:ref:`VIDIOC_STREAMON` time, and an EPIPE error
 code is then returned if the configuration is invalid.
 
 Pad-level image format configuration support can be tested by calling
-the :ref:`VIDIOC_SUBDEV_G_FMT <VIDIOC_SUBDEV_G_FMT>` ioctl on pad
+the :ref:`VIDIOC_SUBDEV_G_FMT` ioctl on pad
 0. If the driver returns an EINVAL error code pad-level format
 configuration is not supported by the sub-device.
 
@@ -146,7 +146,7 @@ formats enumeration only. A format negotiation mechanism is required.
 Central to the format negotiation mechanism are the get/set format
 operations. When called with the ``which`` argument set to
 ``V4L2_SUBDEV_FORMAT_TRY``, the
-:ref:`VIDIOC_SUBDEV_G_FMT <VIDIOC_SUBDEV_G_FMT>` and
+:ref:`VIDIOC_SUBDEV_G_FMT` and
 :ref:`VIDIOC_SUBDEV_S_FMT <VIDIOC_SUBDEV_G_FMT>` ioctls operate on
 a set of formats parameters that are not connected to the hardware
 configuration. Modifying those 'try' formats leaves the device state
@@ -155,7 +155,7 @@ and the hardware state stored in the device itself).
 
 While not kept as part of the device state, try formats are stored in
 the sub-device file handles. A
-:ref:`VIDIOC_SUBDEV_G_FMT <VIDIOC_SUBDEV_G_FMT>` call will return
+:ref:`VIDIOC_SUBDEV_G_FMT` call will return
 the last try format set *on the same sub-device file handle*. Several
 applications querying the same sub-device at the same time will thus not
 interact with each other.
Documentation/linux_tv/media/v4l/dev-teletext.rst +1 -1
index ed69e0fb6371..501e68077af2 100644
@@ -31,7 +31,7 @@ them. So the decision was made to finally remove support for the
 Teletext API in kernel 2.6.37.
 
 Modern devices all use the :ref:`raw <raw-vbi>` or
-:ref:`sliced <sliced>` VBI API.
+:ref:`sliced` VBI API.
 
 
 .. ------------------------------------------------------------------------------
Documentation/linux_tv/media/v4l/diff-v4l.rst +29 -29

207 lines not on this page · raw message

Documentation/linux_tv/media/v4l/dmabuf.rst +6 -6
index bc2944c27e70..773d39308fd6 100644
@@ -20,9 +20,9 @@ exporting V4L2 buffers as DMABUF file descriptors.
 Input and output devices support the streaming I/O method when the
 ``V4L2_CAP_STREAMING`` flag in the ``capabilities`` field of struct
 :ref:`v4l2_capability <v4l2-capability>` returned by the
-:ref:`VIDIOC_QUERYCAP <VIDIOC_QUERYCAP>` ioctl is set. Whether
+:ref:`VIDIOC_QUERYCAP` ioctl is set. Whether
 importing DMA buffers through DMABUF file descriptors is supported is
-determined by calling the :ref:`VIDIOC_REQBUFS <VIDIOC_REQBUFS>`
+determined by calling the :ref:`VIDIOC_REQBUFS`
 ioctl with the memory type set to ``V4L2_MEMORY_DMABUF``.
 
 This I/O method is dedicated to sharing DMA buffers between different
@@ -34,7 +34,7 @@ such file descriptor are exchanged. The descriptors and meta-information
 are passed in struct :ref:`v4l2_buffer <v4l2-buffer>` (or in struct
 :ref:`v4l2_plane <v4l2-plane>` in the multi-planar API case). The
 driver must be switched into DMABUF I/O mode by calling the
-:ref:`VIDIOC_REQBUFS <VIDIOC_REQBUFS>` with the desired buffer type.
+:ref:`VIDIOC_REQBUFS` with the desired buffer type.
 
 
 .. code-block:: c
@@ -56,7 +56,7 @@ driver must be switched into DMABUF I/O mode by calling the
     }
 
 The buffer (plane) file descriptor is passed on the fly with the
-:ref:`VIDIOC_QBUF <VIDIOC_QBUF>` ioctl. In case of multiplanar
+:ref:`VIDIOC_QBUF` ioctl. In case of multiplanar
 buffers, every plane can be associated with a different DMABUF
 descriptor. Although buffers are commonly cycled, applications can pass
 a different DMABUF descriptor at each ``VIDIOC_QBUF`` call.
@@ -116,7 +116,7 @@ Captured or displayed buffers are dequeued with the
 buffer at any time between the completion of the DMA and this ioctl. The
 memory is also unlocked when
 :ref:`VIDIOC_STREAMOFF <VIDIOC_STREAMON>` is called,
-:ref:`VIDIOC_REQBUFS <VIDIOC_REQBUFS>`, or when the device is closed.
+:ref:`VIDIOC_REQBUFS`, or when the device is closed.
 
 For capturing applications it is customary to enqueue a number of empty
 buffers, to start capturing and enter the read loop. Here the
@@ -134,7 +134,7 @@ immediately with an EAGAIN error code when no buffer is available. The
 functions are always available.
 
 To start and stop capturing or displaying applications call the
-:ref:`VIDIOC_STREAMON <VIDIOC_STREAMON>` and
+:ref:`VIDIOC_STREAMON` and
 :ref:`VIDIOC_STREAMOFF <VIDIOC_STREAMON>` ioctls. Note that
 ``VIDIOC_STREAMOFF`` removes all buffers from both queues and unlocks
 all buffers as a side effect. Since there is no notion of doing anything
Documentation/linux_tv/media/v4l/dv-timings.rst +4 -4
index d51c36ec604c..4b22b1b0fccb 100644
@@ -24,14 +24,14 @@ standards.
 
 To enumerate and query the attributes of the DV timings supported by a
 device applications use the
-:ref:`VIDIOC_ENUM_DV_TIMINGS <VIDIOC_ENUM_DV_TIMINGS>` and
-:ref:`VIDIOC_DV_TIMINGS_CAP <VIDIOC_DV_TIMINGS_CAP>` ioctls. To set
+:ref:`VIDIOC_ENUM_DV_TIMINGS` and
+:ref:`VIDIOC_DV_TIMINGS_CAP` ioctls. To set
 DV timings for the device applications use the
 :ref:`VIDIOC_S_DV_TIMINGS <VIDIOC_G_DV_TIMINGS>` ioctl and to get
 current DV timings they use the
-:ref:`VIDIOC_G_DV_TIMINGS <VIDIOC_G_DV_TIMINGS>` ioctl. To detect
+:ref:`VIDIOC_G_DV_TIMINGS` ioctl. To detect
 the DV timings as seen by the video receiver applications use the
-:ref:`VIDIOC_QUERY_DV_TIMINGS <VIDIOC_QUERY_DV_TIMINGS>` ioctl.
+:ref:`VIDIOC_QUERY_DV_TIMINGS` ioctl.
 
 Applications can make use of the :ref:`input-capabilities` and
 :ref:`output-capabilities` flags to determine whether the digital
Documentation/linux_tv/media/v4l/extended-controls.rst +14 -14
index 66333b9f60fd..9a10edc50fa0 100644
@@ -39,11 +39,11 @@ The Extended Control API
 ========================
 
 Three new ioctls are available:
-:ref:`VIDIOC_G_EXT_CTRLS <VIDIOC_G_EXT_CTRLS>`,
+:ref:`VIDIOC_G_EXT_CTRLS`,
 :ref:`VIDIOC_S_EXT_CTRLS <VIDIOC_G_EXT_CTRLS>` and
 :ref:`VIDIOC_TRY_EXT_CTRLS <VIDIOC_G_EXT_CTRLS>`. These ioctls act
 on arrays of controls (as opposed to the
-:ref:`VIDIOC_G_CTRL <VIDIOC_G_CTRL>` and
+:ref:`VIDIOC_G_CTRL` and
 :ref:`VIDIOC_S_CTRL <VIDIOC_G_CTRL>` ioctls that act on a single
 control). This is needed since it is often required to atomically change
 several controls at once.
@@ -79,7 +79,7 @@ with compound types should only be used programmatically.
 
 Since such compound controls need to expose more information about
 themselves than is possible with
-:ref:`VIDIOC_QUERYCTRL <VIDIOC_QUERYCTRL>` the
+:ref:`VIDIOC_QUERYCTRL` the
 :ref:`VIDIOC_QUERY_EXT_CTRL <VIDIOC_QUERYCTRL>` ioctl was added. In
 particular, this ioctl gives the dimensions of the N-dimensional array
 if this control consists of more than one element.
@@ -87,7 +87,7 @@ if this control consists of more than one element.
 It is important to realize that due to the flexibility of controls it is
 necessary to check whether the control you want to set actually is
 supported in the driver and what the valid range of values is. So use
-the :ref:`VIDIOC_QUERYCTRL <VIDIOC_QUERYCTRL>` (or
+the :ref:`VIDIOC_QUERYCTRL` (or
 :ref:`VIDIOC_QUERY_EXT_CTRL <VIDIOC_QUERYCTRL>`) and
 :ref:`VIDIOC_QUERYMENU <VIDIOC_QUERYCTRL>` ioctls to check this. Also
 note that it is possible that some of the menu indices in a control of
@@ -103,7 +103,7 @@ Enumerating Extended Controls
 =============================
 
 The recommended way to enumerate over the extended controls is by using
-:ref:`VIDIOC_QUERYCTRL <VIDIOC_QUERYCTRL>` in combination with the
+:ref:`VIDIOC_QUERYCTRL` in combination with the
 ``V4L2_CTRL_FLAG_NEXT_CTRL`` flag:
 
 
@@ -169,7 +169,7 @@ within a control panel.
 
 The flags field of struct :ref:`v4l2_queryctrl <v4l2-queryctrl>` also
 contains hints on the behavior of the control. See the
-:ref:`VIDIOC_QUERYCTRL <VIDIOC_QUERYCTRL>` documentation for more
+:ref:`VIDIOC_QUERYCTRL` documentation for more
 details.
 
 
@@ -198,7 +198,7 @@ Codec Control IDs
 
 ``V4L2_CID_MPEG_CLASS (class)``
     The Codec class descriptor. Calling
-    :ref:`VIDIOC_QUERYCTRL <VIDIOC_QUERYCTRL>` for this control will
+    :ref:`VIDIOC_QUERYCTRL` for this control will
     return a description of this control class. This description can be
     used as the caption of a Tab page in a GUI, for example.
 
@@ -1168,7 +1168,7 @@ Codec Control IDs
     This read-only control returns the 33-bit video Presentation Time
     Stamp as defined in ITU T-REC-H.222.0 and ISO/IEC 13818-1 of the
     currently displayed frame. This is the same PTS as is used in
-    :ref:`VIDIOC_DECODER_CMD <VIDIOC_DECODER_CMD>`.
+    :ref:`VIDIOC_DECODER_CMD`.
 
 .. _`v4l2-mpeg-video-dec-frame`:
 
@@ -2781,7 +2781,7 @@ Camera Control IDs
 
 ``V4L2_CID_CAMERA_CLASS (class)``
     The Camera class descriptor. Calling
-    :ref:`VIDIOC_QUERYCTRL <VIDIOC_QUERYCTRL>` for this control will
+    :ref:`VIDIOC_QUERYCTRL` for this control will
     return a description of this control class.
 
 .. _`v4l2-exposure-auto-type`:
@@ -3441,7 +3441,7 @@ FM_TX Control IDs
 
 ``V4L2_CID_FM_TX_CLASS (class)``
     The FM_TX class descriptor. Calling
-    :ref:`VIDIOC_QUERYCTRL <VIDIOC_QUERYCTRL>` for this control will
+    :ref:`VIDIOC_QUERYCTRL` for this control will
     return a description of this control class.
 
 ``V4L2_CID_RDS_TX_DEVIATION (integer)``
@@ -3870,7 +3870,7 @@ JPEG Control IDs
 
 ``V4L2_CID_JPEG_CLASS (class)``
     The JPEG class descriptor. Calling
-    :ref:`VIDIOC_QUERYCTRL <VIDIOC_QUERYCTRL>` for this control will
+    :ref:`VIDIOC_QUERYCTRL` for this control will
     return a description of this control class.
 
 ``V4L2_CID_JPEG_CHROMA_SUBSAMPLING (menu)``
@@ -4271,7 +4271,7 @@ FM_RX Control IDs
 
 ``V4L2_CID_FM_RX_CLASS (class)``
     The FM_RX class descriptor. Calling
-    :ref:`VIDIOC_QUERYCTRL <VIDIOC_QUERYCTRL>` for this control will
+    :ref:`VIDIOC_QUERYCTRL` for this control will
     return a description of this control class.
 
 ``V4L2_CID_RDS_RECEPTION (boolean)``
@@ -4369,7 +4369,7 @@ Detect Control IDs
 
 ``V4L2_CID_DETECT_CLASS (class)``
     The Detect class descriptor. Calling
-    :ref:`VIDIOC_QUERYCTRL <VIDIOC_QUERYCTRL>` for this control will
+    :ref:`VIDIOC_QUERYCTRL` for this control will
     return a description of this control class.
 
 ``V4L2_CID_DETECT_MD_MODE (menu)``
@@ -4463,7 +4463,7 @@ RF_TUNER Control IDs
 
 ``V4L2_CID_RF_TUNER_CLASS (class)``
     The RF_TUNER class descriptor. Calling
-    :ref:`VIDIOC_QUERYCTRL <VIDIOC_QUERYCTRL>` for this control will
+    :ref:`VIDIOC_QUERYCTRL` for this control will
     return a description of this control class.
 
 ``V4L2_CID_RF_TUNER_BANDWIDTH_AUTO (boolean)``
Documentation/linux_tv/media/v4l/format.rst +3 -3
index a754fa81f707..46f740a0092e 100644
@@ -23,7 +23,7 @@ current selection.
 
 A single mechanism exists to negotiate all data formats using the
 aggregate struct :ref:`v4l2_format <v4l2-format>` and the
-:ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>` and
+:ref:`VIDIOC_G_FMT` and
 :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctls. Additionally the
 :ref:`VIDIOC_TRY_FMT <VIDIOC_G_FMT>` ioctl can be used to examine
 what the hardware *could* do, without actually selecting a new data
@@ -52,7 +52,7 @@ image size.
 
 When applications omit the ``VIDIOC_S_FMT`` ioctl its locking side
 effects are implied by the next step, the selection of an I/O method
-with the :ref:`VIDIOC_REQBUFS <VIDIOC_REQBUFS>` ioctl or implicit
+with the :ref:`VIDIOC_REQBUFS` ioctl or implicit
 with the first :ref:`read() <func-read>` or
 :ref:`write() <func-write>` call.
 
@@ -75,7 +75,7 @@ Apart of the generic format negotiation functions a special ioctl to
 enumerate all image formats supported by video capture, overlay or
 output devices is available. [1]_
 
-The :ref:`VIDIOC_ENUM_FMT <VIDIOC_ENUM_FMT>` ioctl must be supported
+The :ref:`VIDIOC_ENUM_FMT` ioctl must be supported
 by all drivers exchanging image data with applications.
 
     **Important**
Documentation/linux_tv/media/v4l/func-mmap.rst +3 -3
index 7243142384bb..b908c0253c07 100644
@@ -98,8 +98,8 @@ application address space, preferably at address ``start``. This latter
 address is a hint only, and is usually specified as 0.
 
 Suitable length and offset parameters are queried with the
-:ref:`VIDIOC_QUERYBUF <VIDIOC_QUERYBUF>` ioctl. Buffers must be
-allocated with the :ref:`VIDIOC_REQBUFS <VIDIOC_REQBUFS>` ioctl
+:ref:`VIDIOC_QUERYBUF` ioctl. Buffers must be
+allocated with the :ref:`VIDIOC_REQBUFS` ioctl
 before they can be queried.
 
 To unmap buffers the :ref:`munmap() <func-munmap>` function is used.
@@ -125,7 +125,7 @@ EINVAL
     The ``flags`` or ``prot`` value is not supported.
 
     No buffers have been allocated with the
-    :ref:`VIDIOC_REQBUFS <VIDIOC_REQBUFS>` ioctl.
+    :ref:`VIDIOC_REQBUFS` ioctl.
 
 ENOMEM
     Not enough physical or virtual memory was available to complete the
Documentation/linux_tv/media/v4l/func-poll.rst +5 -5
index 28a769af9309..782531fe964c 100644
@@ -32,7 +32,7 @@ When streaming I/O has been negotiated this function waits until a
 buffer has been filled by the capture device and can be dequeued with
 the :ref:`VIDIOC_DQBUF <VIDIOC_QBUF>` ioctl. For output devices this
 function waits until the device is ready to accept a new buffer to be
-queued up with the :ref:`VIDIOC_QBUF <VIDIOC_QBUF>` ioctl for
+queued up with the :ref:`VIDIOC_QBUF` ioctl for
 display. When buffers are already in the outgoing queue of the driver
 (capture) or the incoming queue isn't full (display) the function
 returns immediately.
@@ -45,17 +45,17 @@ flags in the ``revents`` field, output devices the ``POLLOUT`` and
 ``POLLWRNORM`` flags. When the function timed out it returns a value of
 zero, on failure it returns -1 and the ``errno`` variable is set
 appropriately. When the application did not call
-:ref:`VIDIOC_STREAMON <VIDIOC_STREAMON>` the :c:func:`poll()`
+:ref:`VIDIOC_STREAMON` the :c:func:`poll()`
 function succeeds, but sets the ``POLLERR`` flag in the ``revents``
 field. When the application has called
-:ref:`VIDIOC_STREAMON <VIDIOC_STREAMON>` for a capture device but
-hasn't yet called :ref:`VIDIOC_QBUF <VIDIOC_QBUF>`, the
+:ref:`VIDIOC_STREAMON` for a capture device but
+hasn't yet called :ref:`VIDIOC_QBUF`, the
 :c:func:`poll()` function succeeds and sets the ``POLLERR`` flag in
 the ``revents`` field. For output devices this same situation will cause
 :c:func:`poll()` to succeed as well, but it sets the ``POLLOUT`` and
 ``POLLWRNORM`` flags in the ``revents`` field.
 
-If an event occurred (see :ref:`VIDIOC_DQEVENT <VIDIOC_DQEVENT>`)
+If an event occurred (see :ref:`VIDIOC_DQEVENT`)
 then ``POLLPRI`` will be set in the ``revents`` field and
 :c:func:`poll()` will return.
 
Documentation/linux_tv/media/v4l/func-read.rst +1 -1
index 497bc9a9dd5a..0eae26288189 100644
@@ -85,7 +85,7 @@ enough. Again, the behavior when the driver runs out of free buffers
 depends on the discarding policy.
 
 Applications can get and set the number of buffers used internally by
-the driver with the :ref:`VIDIOC_G_PARM <VIDIOC_G_PARM>` and
+the driver with the :ref:`VIDIOC_G_PARM` and
 :ref:`VIDIOC_S_PARM <VIDIOC_G_PARM>` ioctls. They are optional,
 however. The discarding policy is not reported and cannot be changed.
 For minimum requirements see :ref:`devices`.
Documentation/linux_tv/media/v4l/func-select.rst +2 -2
index 77fdf33648b3..77302800e6ca 100644
@@ -39,8 +39,8 @@ On success :c:func:`select()` returns the total number of bits set in
 the :c:type:`struct fd_set`s. When the function timed out it returns
 a value of zero. On failure it returns -1 and the ``errno`` variable is
 set appropriately. When the application did not call
-:ref:`VIDIOC_QBUF <VIDIOC_QBUF>` or
-:ref:`VIDIOC_STREAMON <VIDIOC_STREAMON>` yet the :c:func:`select()`
+:ref:`VIDIOC_QBUF` or
+:ref:`VIDIOC_STREAMON` yet the :c:func:`select()`
 function succeeds, setting the bit of the file descriptor in ``readfds``
 or ``writefds``, but subsequent :ref:`VIDIOC_DQBUF <VIDIOC_QBUF>`
 calls will fail. [1]_
Documentation/linux_tv/media/v4l/hist-v4l2.rst +37 -37

237 lines not on this page · raw message

Documentation/linux_tv/media/v4l/io.rst +1 -1
index 2bc04e597c90..651d4530c703 100644
@@ -16,7 +16,7 @@ read or write will fail at any time.
 
 Other methods must be negotiated. To select the streaming I/O method
 with memory mapped or user buffers applications call the
-:ref:`VIDIOC_REQBUFS <VIDIOC_REQBUFS>` ioctl. The asynchronous I/O
+:ref:`VIDIOC_REQBUFS` ioctl. The asynchronous I/O
 method is not defined yet.
 
 Video overlay can be considered another I/O method, although the
Documentation/linux_tv/media/v4l/libv4l-introduction.rst +4 -4
index 4fd87ec33260..bc3eb48e1d9f 100644
@@ -92,16 +92,16 @@ and to enhance the image quality.
 In most cases, libv4l2 just passes the calls directly through to the
 v4l2 driver, intercepting the calls to
 :ref:`VIDIOC_TRY_FMT <VIDIOC_G_FMT>`,
-:ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>`
+:ref:`VIDIOC_G_FMT`
 :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>`
-:ref:`VIDIOC_ENUM_FRAMESIZES <VIDIOC_ENUM_FRAMESIZES>` and
-:ref:`VIDIOC_ENUM_FRAMEINTERVALS <VIDIOC_ENUM_FRAMEINTERVALS>` in
+:ref:`VIDIOC_ENUM_FRAMESIZES` and
+:ref:`VIDIOC_ENUM_FRAMEINTERVALS` in
 order to emulate the formats
 :ref:`V4L2_PIX_FMT_BGR24 <V4L2-PIX-FMT-BGR24>`,
 :ref:`V4L2_PIX_FMT_RGB24 <V4L2-PIX-FMT-RGB24>`,
 :ref:`V4L2_PIX_FMT_YUV420 <V4L2-PIX-FMT-YUV420>`, and
 :ref:`V4L2_PIX_FMT_YVU420 <V4L2-PIX-FMT-YVU420>`, if they aren't
-available in the driver. :ref:`VIDIOC_ENUM_FMT <VIDIOC_ENUM_FMT>`
+available in the driver. :ref:`VIDIOC_ENUM_FMT`
 keeps enumerating the hardware supported formats, plus the emulated
 formats offered by libv4l at the end.
 
Documentation/linux_tv/media/v4l/mmap.rst +8 -8
index de144028ec56..2013e882f0d4 100644
@@ -9,10 +9,10 @@ Streaming I/O (Memory Mapping)
 Input and output devices support this I/O method when the
 ``V4L2_CAP_STREAMING`` flag in the ``capabilities`` field of struct
 :ref:`v4l2_capability <v4l2-capability>` returned by the
-:ref:`VIDIOC_QUERYCAP <VIDIOC_QUERYCAP>` ioctl is set. There are two
+:ref:`VIDIOC_QUERYCAP` ioctl is set. There are two
 streaming methods, to determine if the memory mapping flavor is
 supported applications must call the
-:ref:`VIDIOC_REQBUFS <VIDIOC_REQBUFS>` ioctl.
+:ref:`VIDIOC_REQBUFS` ioctl.
 
 Streaming is an I/O method where only pointers to buffers are exchanged
 between application and driver, the data itself is not copied. Memory
@@ -29,7 +29,7 @@ a different type of data. To access different sets at the same time
 different file descriptors must be used. [1]_
 
 To allocate device buffers applications call the
-:ref:`VIDIOC_REQBUFS <VIDIOC_REQBUFS>` ioctl with the desired number
+:ref:`VIDIOC_REQBUFS` ioctl with the desired number
 of buffers and buffer type, for example ``V4L2_BUF_TYPE_VIDEO_CAPTURE``.
 This ioctl can also be used to change the number of buffers or to free
 the allocated memory, provided none of the buffers are still mapped.
@@ -37,7 +37,7 @@ the allocated memory, provided none of the buffers are still mapped.
 Before applications can access the buffers they must map them into their
 address space with the :ref:`mmap() <func-mmap>` function. The
 location of the buffers in device memory can be determined with the
-:ref:`VIDIOC_QUERYBUF <VIDIOC_QUERYBUF>` ioctl. In the single-planar
+:ref:`VIDIOC_QUERYBUF` ioctl. In the single-planar
 API case, the ``m.offset`` and ``length`` returned in a struct
 :ref:`v4l2_buffer <v4l2-buffer>` are passed as sixth and second
 parameter to the :c:func:`mmap()` function. When using the
@@ -227,10 +227,10 @@ when the application runs out of free buffers, it must wait until an
 empty buffer can be dequeued and reused.
 
 To enqueue and dequeue a buffer applications use the
-:ref:`VIDIOC_QBUF <VIDIOC_QBUF>` and
+:ref:`VIDIOC_QBUF` and
 :ref:`VIDIOC_DQBUF <VIDIOC_QBUF>` ioctl. The status of a buffer being
 mapped, enqueued, full or empty can be determined at any time using the
-:ref:`VIDIOC_QUERYBUF <VIDIOC_QUERYBUF>` ioctl. Two methods exist to
+:ref:`VIDIOC_QUERYBUF` ioctl. Two methods exist to
 suspend execution of the application until one or more buffers can be
 dequeued. By default ``VIDIOC_DQBUF`` blocks when no buffer is in the
 outgoing queue. When the ``O_NONBLOCK`` flag was given to the
@@ -240,7 +240,7 @@ immediately with an EAGAIN error code when no buffer is available. The
 are always available.
 
 To start and stop capturing or output applications call the
-:ref:`VIDIOC_STREAMON <VIDIOC_STREAMON>` and
+:ref:`VIDIOC_STREAMON` and
 :ref:`VIDIOC_STREAMOFF <VIDIOC_STREAMON>` ioctl. Note
 ``VIDIOC_STREAMOFF`` removes all buffers from both queues as a side
 effect. Since there is no notion of doing anything "now" on a
@@ -258,7 +258,7 @@ the :c:func:`mmap()`, :c:func:`munmap()`, :c:func:`select()` and
 
 .. [1]
    One could use one file descriptor and set the buffer type field
-   accordingly when calling :ref:`VIDIOC_QBUF <VIDIOC_QBUF>` etc.,
+   accordingly when calling :ref:`VIDIOC_QBUF` etc.,
    but it makes the :c:func:`select()` function ambiguous. We also
    like the clean approach of one file descriptor per logical stream.
    Video overlay for example is also a logical stream, although the CPU
Documentation/linux_tv/media/v4l/open.rst +2 -2
index 4c34d61a5253..ec6b456e37f0 100644
@@ -108,8 +108,8 @@ are comparable to an ALSA audio mixer application. Just opening a V4L2
 device should not change the state of the device. [2]_
 
 Once an application has allocated the memory buffers needed for
-streaming data (by calling the :ref:`VIDIOC_REQBUFS <VIDIOC_REQBUFS>`
-or :ref:`VIDIOC_CREATE_BUFS <VIDIOC_CREATE_BUFS>` ioctls, or
+streaming data (by calling the :ref:`VIDIOC_REQBUFS`
+or :ref:`VIDIOC_CREATE_BUFS` ioctls, or
 implicitly by calling the :ref:`read() <func-read>` or
 :ref:`write() <func-write>` functions) that application (filehandle)
 becomes the owner of the device. It is no longer allowed to make changes
Documentation/linux_tv/media/v4l/pixfmt-013.rst +1 -1
index b3cb7c48eb74..7584cb2e5702 100644
@@ -27,7 +27,7 @@ Compressed Formats
 
        -  'JPEG'
 
-       -  TBD. See also :ref:`VIDIOC_G_JPEGCOMP <VIDIOC_G_JPEGCOMP>`,
+       -  TBD. See also :ref:`VIDIOC_G_JPEGCOMP`,
           :ref:`VIDIOC_S_JPEGCOMP <VIDIOC_G_JPEGCOMP>`.
 
     -  .. _`V4L2-PIX-FMT-MPEG`:
Documentation/linux_tv/media/v4l/pixfmt-packed-rgb.rst +1 -1
index 2caf9ccea69a..2b4a6c725d4c 100644
@@ -967,7 +967,7 @@ XBGR) must be used instead of an alpha format.
 
 The XRGB and XBGR formats contain undefined bits (-). Applications,
 devices and drivers must ignore those bits, for both
-:ref:`capture <capture>` and :ref:`output <output>` devices.
+:ref:`capture` and :ref:`output` devices.
 
 **Byte Order..**
 
Documentation/linux_tv/media/v4l/pixfmt.rst +1 -1
index f2c599aaa502..b0e6a95a7205 100644
@@ -13,7 +13,7 @@ single-planar API, while the latter is used with the multi-planar
 version (see :ref:`planar-apis`). Image formats are negotiated with
 the :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl. (The explanations here
 focus on video capturing and output, for overlay frame buffer formats
-see also :ref:`VIDIOC_G_FBUF <VIDIOC_G_FBUF>`.)
+see also :ref:`VIDIOC_G_FBUF`.)
 
 
 .. toctree::
Documentation/linux_tv/media/v4l/planar-apis.rst +5 -5
index 017f412a6231..0546210f868f 100644
@@ -39,12 +39,12 @@ handle multi-planar formats.
 Calls that distinguish between single and multi-planar APIs
 ===========================================================
 
-:ref:`VIDIOC_QUERYCAP <VIDIOC_QUERYCAP>`
+:ref:`VIDIOC_QUERYCAP`
     Two additional multi-planar capabilities are added. They can be set
     together with non-multi-planar ones for devices that handle both
     single- and multi-planar formats.
 
-:ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>`,
+:ref:`VIDIOC_G_FMT`,
 :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>`,
 :ref:`VIDIOC_TRY_FMT <VIDIOC_G_FMT>`
     New structures for describing multi-planar formats are added: struct
@@ -53,15 +53,15 @@ Calls that distinguish between single and multi-planar APIs
     Drivers may define new multi-planar formats, which have distinct
     FourCC codes from the existing single-planar ones.
 
-:ref:`VIDIOC_QBUF <VIDIOC_QBUF>`,
+:ref:`VIDIOC_QBUF`,
 :ref:`VIDIOC_DQBUF <VIDIOC_QBUF>`,
-:ref:`VIDIOC_QUERYBUF <VIDIOC_QUERYBUF>`
+:ref:`VIDIOC_QUERYBUF`
     A new struct :ref:`v4l2_plane <v4l2-plane>` structure for
     describing planes is added. Arrays of this structure are passed in
     the new ``m.planes`` field of struct
     :ref:`v4l2_buffer <v4l2-buffer>`.
 
-:ref:`VIDIOC_REQBUFS <VIDIOC_REQBUFS>`
+:ref:`VIDIOC_REQBUFS`
     Will allocate multi-planar buffers as requested.
 
 
Documentation/linux_tv/media/v4l/querycap.rst +6 -6
index d8f080a68195..bb905eb82c08 100644
@@ -11,26 +11,26 @@ are equally applicable to all types of devices. Furthermore devices of
 the same type have different capabilities and this specification permits
 the omission of a few complicated and less important parts of the API.
 
-The :ref:`VIDIOC_QUERYCAP <VIDIOC_QUERYCAP>` ioctl is available to
+The :ref:`VIDIOC_QUERYCAP` ioctl is available to
 check if the kernel device is compatible with this specification, and to
 query the :ref:`functions <devices>` and :ref:`I/O methods <io>`
 supported by the device.
 
-Starting with kernel version 3.1, :ref:`VIDIOC_QUERYCAP <VIDIOC_QUERYCAP>`
+Starting with kernel version 3.1, :ref:`VIDIOC_QUERYCAP`
 will return the V4L2 API version used by the driver, with generally
 matches the Kernel version. There's no need of using
-:ref:`VIDIOC_QUERYCAP <VIDIOC_QUERYCAP>` to check if a specific ioctl
+:ref:`VIDIOC_QUERYCAP` to check if a specific ioctl
 is supported, the V4L2 core now returns ENOTTY if a driver doesn't
 provide support for an ioctl.
 
 Other features can be queried by calling the respective ioctl, for
-example :ref:`VIDIOC_ENUMINPUT <VIDIOC_ENUMINPUT>` to learn about the
+example :ref:`VIDIOC_ENUMINPUT` to learn about the
 number, types and names of video connectors on the device. Although
 abstraction is a major objective of this API, the
-:ref:`VIDIOC_QUERYCAP <VIDIOC_QUERYCAP>` ioctl also allows driver
+:ref:`VIDIOC_QUERYCAP` ioctl also allows driver
 specific applications to reliably identify the driver.
 
-All V4L2 drivers must support :ref:`VIDIOC_QUERYCAP <VIDIOC_QUERYCAP>`.
+All V4L2 drivers must support :ref:`VIDIOC_QUERYCAP`.
 Applications should always call this ioctl after opening the device.
 
 
Documentation/linux_tv/media/v4l/rw.rst +1 -1
index ad365a6e435d..c840ee0fd14c 100644
@@ -10,7 +10,7 @@ Input and output devices support the :c:func:`read()` and
 :c:func:`write()` function, respectively, when the
 ``V4L2_CAP_READWRITE`` flag in the ``capabilities`` field of struct
 :ref:`v4l2_capability <v4l2-capability>` returned by the
-:ref:`VIDIOC_QUERYCAP <VIDIOC_QUERYCAP>` ioctl is set.
+:ref:`VIDIOC_QUERYCAP` ioctl is set.
 
 Drivers may need the CPU to copy the data, but they may also support DMA
 to or from user memory, so this I/O method is not necessarily less
Documentation/linux_tv/media/v4l/standard.rst +5 -5
index da0b8101b6cc..3c0f6cb97f13 100644
@@ -11,8 +11,8 @@ variations of standards. Each video input and output may support another
 set of standards. This set is reported by the ``std`` field of struct
 :ref:`v4l2_input <v4l2-input>` and struct
 :ref:`v4l2_output <v4l2-output>` returned by the
-:ref:`VIDIOC_ENUMINPUT <VIDIOC_ENUMINPUT>` and
-:ref:`VIDIOC_ENUMOUTPUT <VIDIOC_ENUMOUTPUT>` ioctls, respectively.
+:ref:`VIDIOC_ENUMINPUT` and
+:ref:`VIDIOC_ENUMOUTPUT` ioctls, respectively.
 
 V4L2 defines one bit for each analog video standard currently in use
 worldwide, and sets aside bits for driver defined standards, e. g.
@@ -20,7 +20,7 @@ hybrid standards to watch NTSC video tapes on PAL TVs and vice versa.
 Applications can use the predefined bits to select a particular
 standard, although presenting the user a menu of supported standards is
 preferred. To enumerate and query the attributes of the supported
-standards applications use the :ref:`VIDIOC_ENUMSTD <VIDIOC_ENUMSTD>`
+standards applications use the :ref:`VIDIOC_ENUMSTD`
 ioctl.
 
 Many of the defined standards are actually just variations of a few
@@ -36,10 +36,10 @@ Composite input may collapse standards, enumerating "PAL-B/G/H/I",
 "NTSC-M" and "SECAM-D/K". [1]_
 
 To query and select the standard used by the current video input or
-output applications call the :ref:`VIDIOC_G_STD <VIDIOC_G_STD>` and
+output applications call the :ref:`VIDIOC_G_STD` and
 :ref:`VIDIOC_S_STD <VIDIOC_G_STD>` ioctl, respectively. The
 *received* standard can be sensed with the
-:ref:`VIDIOC_QUERYSTD <VIDIOC_QUERYSTD>` ioctl. Note that the
+:ref:`VIDIOC_QUERYSTD` ioctl. Note that the
 parameter of all these ioctls is a pointer to a
 :ref:`v4l2_std_id <v4l2-std-id>` type (a standard set), *not* an
 index into the standard enumeration. Drivers must implement all video
Documentation/linux_tv/media/v4l/streaming-par.rst +1 -1
index bb8100b6ef87..10420478a3b0 100644
@@ -23,7 +23,7 @@ internally by a driver in read/write mode. For implications see the
 section discussing the :ref:`read() <func-read>` function.
 
 To get and set the streaming parameters applications call the
-:ref:`VIDIOC_G_PARM <VIDIOC_G_PARM>` and
+:ref:`VIDIOC_G_PARM` and
 :ref:`VIDIOC_S_PARM <VIDIOC_G_PARM>` ioctl, respectively. They take
 a pointer to a struct :ref:`v4l2_streamparm <v4l2-streamparm>`, which
 contains a union holding separate parameters for input and output
Documentation/linux_tv/media/v4l/tuner.rst +7 -7
index 15c2e6c373ab..b1be27bd297e 100644
@@ -14,7 +14,7 @@ Video input devices can have one or more tuners demodulating a RF
 signal. Each tuner is associated with one or more video inputs,
 depending on the number of RF connectors on the tuner. The ``type``
 field of the respective struct :ref:`v4l2_input <v4l2-input>`
-returned by the :ref:`VIDIOC_ENUMINPUT <VIDIOC_ENUMINPUT>` ioctl is
+returned by the :ref:`VIDIOC_ENUMINPUT` ioctl is
 set to ``V4L2_INPUT_TYPE_TUNER`` and its ``tuner`` field contains the
 index number of the tuner.
 
@@ -22,7 +22,7 @@ Radio input devices have exactly one tuner with index zero, no video
 inputs.
 
 To query and change tuner properties applications use the
-:ref:`VIDIOC_G_TUNER <VIDIOC_G_TUNER>` and
+:ref:`VIDIOC_G_TUNER` and
 :ref:`VIDIOC_S_TUNER <VIDIOC_G_TUNER>` ioctls, respectively. The
 struct :ref:`v4l2_tuner <v4l2-tuner>` returned by ``VIDIOC_G_TUNER``
 also contains signal status information applicable when the tuner of the
@@ -31,7 +31,7 @@ does not switch the current tuner, when there is more than one at all.
 The tuner is solely determined by the current video input. Drivers must
 support both ioctls and set the ``V4L2_CAP_TUNER`` flag in the struct
 :ref:`v4l2_capability <v4l2-capability>` returned by the
-:ref:`VIDIOC_QUERYCAP <VIDIOC_QUERYCAP>` ioctl when the device has
+:ref:`VIDIOC_QUERYCAP` ioctl when the device has
 one or more tuners.
 
 
@@ -44,7 +44,7 @@ set or video recorder. Each modulator is associated with one or more
 video outputs, depending on the number of RF connectors on the
 modulator. The ``type`` field of the respective struct
 :ref:`v4l2_output <v4l2-output>` returned by the
-:ref:`VIDIOC_ENUMOUTPUT <VIDIOC_ENUMOUTPUT>` ioctl is set to
+:ref:`VIDIOC_ENUMOUTPUT` ioctl is set to
 ``V4L2_OUTPUT_TYPE_MODULATOR`` and its ``modulator`` field contains the
 index number of the modulator.
 
@@ -59,14 +59,14 @@ functionality. The reason is a limitation with the
 cannot specify whether the frequency is for a tuner or a modulator.
 
 To query and change modulator properties applications use the
-:ref:`VIDIOC_G_MODULATOR <VIDIOC_G_MODULATOR>` and
+:ref:`VIDIOC_G_MODULATOR` and
 :ref:`VIDIOC_S_MODULATOR <VIDIOC_G_MODULATOR>` ioctl. Note that
 ``VIDIOC_S_MODULATOR`` does not switch the current modulator, when there
 is more than one at all. The modulator is solely determined by the
 current video output. Drivers must support both ioctls and set the
 ``V4L2_CAP_MODULATOR`` flag in the struct
 :ref:`v4l2_capability <v4l2-capability>` returned by the
-:ref:`VIDIOC_QUERYCAP <VIDIOC_QUERYCAP>` ioctl when the device has
+:ref:`VIDIOC_QUERYCAP` ioctl when the device has
 one or more modulators.
 
 
@@ -74,7 +74,7 @@ Radio Frequency
 ===============
 
 To get and set the tuner or modulator radio frequency applications use
-the :ref:`VIDIOC_G_FREQUENCY <VIDIOC_G_FREQUENCY>` and
+the :ref:`VIDIOC_G_FREQUENCY` and
 :ref:`VIDIOC_S_FREQUENCY <VIDIOC_G_FREQUENCY>` ioctl which both take
 a pointer to a struct :ref:`v4l2_frequency <v4l2-frequency>`. These
 ioctls are used for TV and radio devices alike. Drivers must support
Documentation/linux_tv/media/v4l/userp.rst +6 -6
index 5433025d41d9..a5426d10ceb8 100644
@@ -9,10 +9,10 @@ Streaming I/O (User Pointers)
 Input and output devices support this I/O method when the
 ``V4L2_CAP_STREAMING`` flag in the ``capabilities`` field of struct
 :ref:`v4l2_capability <v4l2-capability>` returned by the
-:ref:`VIDIOC_QUERYCAP <VIDIOC_QUERYCAP>` ioctl is set. If the
+:ref:`VIDIOC_QUERYCAP` ioctl is set. If the
 particular user pointer method (not only memory mapping) is supported
 must be determined by calling the
-:ref:`VIDIOC_REQBUFS <VIDIOC_REQBUFS>` ioctl.
+:ref:`VIDIOC_REQBUFS` ioctl.
 
 This I/O method combines advantages of the read/write and memory mapping
 methods. Buffers (planes) are allocated by the application itself, and
@@ -21,7 +21,7 @@ data are exchanged, these pointers and meta-information are passed in
 struct :ref:`v4l2_buffer <v4l2-buffer>` (or in struct
 :ref:`v4l2_plane <v4l2-plane>` in the multi-planar API case). The
 driver must be switched into user pointer I/O mode by calling the
-:ref:`VIDIOC_REQBUFS <VIDIOC_REQBUFS>` with the desired buffer type.
+:ref:`VIDIOC_REQBUFS` with the desired buffer type.
 No buffers (planes) are allocated beforehand, consequently they are not
 indexed and cannot be queried like mapped buffers with the
 ``VIDIOC_QUERYBUF`` ioctl.
@@ -45,7 +45,7 @@ indexed and cannot be queried like mapped buffers with the
     }
 
 Buffer (plane) addresses and sizes are passed on the fly with the
-:ref:`VIDIOC_QBUF <VIDIOC_QBUF>` ioctl. Although buffers are commonly
+:ref:`VIDIOC_QBUF` ioctl. Although buffers are commonly
 cycled, applications can pass different addresses and sizes at each
 ``VIDIOC_QBUF`` call. If required by the hardware the driver swaps
 memory pages within physical memory to create a continuous area of
@@ -59,7 +59,7 @@ Filled or displayed buffers are dequeued with the
 memory pages at any time between the completion of the DMA and this
 ioctl. The memory is also unlocked when
 :ref:`VIDIOC_STREAMOFF <VIDIOC_STREAMON>` is called,
-:ref:`VIDIOC_REQBUFS <VIDIOC_REQBUFS>`, or when the device is closed.
+:ref:`VIDIOC_REQBUFS`, or when the device is closed.
 Applications must take care not to free buffers without dequeuing. For
 once, the buffers remain locked until further, wasting physical memory.
 Second the driver will not be notified when the memory is returned to
@@ -82,7 +82,7 @@ immediately with an EAGAIN error code when no buffer is available. The
 are always available.
 
 To start and stop capturing or output applications call the
-:ref:`VIDIOC_STREAMON <VIDIOC_STREAMON>` and
+:ref:`VIDIOC_STREAMON` and
 :ref:`VIDIOC_STREAMOFF <VIDIOC_STREAMON>` ioctl. Note
 ``VIDIOC_STREAMOFF`` removes all buffers from both queues and unlocks
 all buffers as a side effect. Since there is no notion of doing anything
Documentation/linux_tv/media/v4l/video.rst +5 -5
index e4e543b56989..9f2dc4ee4fcd 100644
@@ -14,14 +14,14 @@ Radio devices have no video inputs or outputs.
 
 To learn about the number and attributes of the available inputs and
 outputs applications can enumerate them with the
-:ref:`VIDIOC_ENUMINPUT <VIDIOC_ENUMINPUT>` and
-:ref:`VIDIOC_ENUMOUTPUT <VIDIOC_ENUMOUTPUT>` ioctl, respectively. The
+:ref:`VIDIOC_ENUMINPUT` and
+:ref:`VIDIOC_ENUMOUTPUT` ioctl, respectively. The
 struct :ref:`v4l2_input <v4l2-input>` returned by the
-:ref:`VIDIOC_ENUMINPUT <VIDIOC_ENUMINPUT>` ioctl also contains signal
+:ref:`VIDIOC_ENUMINPUT` ioctl also contains signal
 :status information applicable when the current video input is queried.
 
-The :ref:`VIDIOC_G_INPUT <VIDIOC_G_INPUT>` and
-:ref:`VIDIOC_G_OUTPUT <VIDIOC_G_OUTPUT>` ioctls return the index of
+The :ref:`VIDIOC_G_INPUT` and
+:ref:`VIDIOC_G_OUTPUT` ioctls return the index of
 the current video input or output. To select a different input or output
 applications call the :ref:`VIDIOC_S_INPUT <VIDIOC_G_INPUT>` and
 :ref:`VIDIOC_S_OUTPUT <VIDIOC_G_OUTPUT>` ioctls. Drivers must
Documentation/linux_tv/media/v4l/vidioc-create-bufs.rst +2 -2
index 9c2a011f389c..9220bcea1259 100644
@@ -34,7 +34,7 @@ Description
 This ioctl is used to create buffers for :ref:`memory mapped <mmap>`
 or :ref:`user pointer <userp>` or :ref:`DMA buffer <dmabuf>` I/O. It
 can be used as an alternative or in addition to the
-:ref:`VIDIOC_REQBUFS <VIDIOC_REQBUFS>` ioctl, when a tighter control
+:ref:`VIDIOC_REQBUFS` ioctl, when a tighter control
 over buffers is required. This ioctl can be called multiple times to
 create buffers of different sizes.
 
@@ -48,7 +48,7 @@ The ``format`` field specifies the image format that the buffers must be
 able to handle. The application has to fill in this struct
 :ref:`v4l2_format <v4l2-format>`. Usually this will be done using the
 :ref:`VIDIOC_TRY_FMT <VIDIOC_G_FMT>` or
-:ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>` ioctls to ensure that the
+:ref:`VIDIOC_G_FMT` ioctls to ensure that the
 requested format is supported by the driver. Based on the format's
 ``type`` field the requested buffer size (for single-planar) or plane
 sizes (for multi-planar formats) will be used for the allocated buffers.
Documentation/linux_tv/media/v4l/vidioc-dbg-g-chip-info.rst +1 -1
index 0a92e2550ce0..12c2e5df48ac 100644
@@ -33,7 +33,7 @@ Description
 
     **Note**
 
-    This is an :ref:`experimental <experimental>` interface and may
+    This is an :ref:`experimental` interface and may
     change in the future.
 
 For driver debugging purposes this ioctl allows test applications to
Documentation/linux_tv/media/v4l/vidioc-dbg-g-register.rst +3 -3
index 1b86abcc44c7..b50c1be72f15 100644
@@ -36,7 +36,7 @@ Description
 
     **Note**
 
-    This is an :ref:`experimental <experimental>` interface and may
+    This is an :ref:`experimental` interface and may
     change in the future.
 
 For driver debugging purposes these ioctls allow test applications to
@@ -65,14 +65,14 @@ When ``match.type`` is ``V4L2_CHIP_MATCH_BRIDGE``, ``match.addr``
 selects the nth non-sub-device chip on the TV card. The number zero
 always selects the host chip, e. g. the chip connected to the PCI or USB
 bus. You can find out which chips are present with the
-:ref:`VIDIOC_DBG_G_CHIP_INFO <VIDIOC_DBG_G_CHIP_INFO>` ioctl.
+:ref:`VIDIOC_DBG_G_CHIP_INFO` ioctl.
 
 When ``match.type`` is ``V4L2_CHIP_MATCH_SUBDEV``, ``match.addr``
 selects the nth sub-device.
 
 These ioctls are optional, not all drivers may support them. However
 when a driver supports these ioctls it must also support
-:ref:`VIDIOC_DBG_G_CHIP_INFO <VIDIOC_DBG_G_CHIP_INFO>`. Conversely
+:ref:`VIDIOC_DBG_G_CHIP_INFO`. Conversely
 it may support ``VIDIOC_DBG_G_CHIP_INFO`` but not these ioctls.
 
 ``VIDIOC_DBG_G_REGISTER`` and ``VIDIOC_DBG_S_REGISTER`` were introduced
Documentation/linux_tv/media/v4l/vidioc-decoder-cmd.rst +1 -1
index ec9dfed09f76..a56c5fc1ed6f 100644
@@ -43,7 +43,7 @@ this structure.
 The ``cmd`` field must contain the command code. Some commands use the
 ``flags`` field for additional information.
 
-A :c:func:`write()`() or :ref:`VIDIOC_STREAMON <VIDIOC_STREAMON>`
+A :c:func:`write()`() or :ref:`VIDIOC_STREAMON`
 call sends an implicit START command to the decoder if it has not been
 started yet.
 
Documentation/linux_tv/media/v4l/vidioc-dqevent.rst +1 -1
index 45320997344d..9e41fc818b90 100644
@@ -363,7 +363,7 @@ call.
 
        -  The 32-bit value of the control for 32-bit control types. This is
           0 for string controls since the value of a string cannot be passed
-          using :ref:`VIDIOC_DQEVENT <VIDIOC_DQEVENT>`.
+          using :ref:`VIDIOC_DQEVENT`.
 
     -  .. row 5
 
Documentation/linux_tv/media/v4l/vidioc-encoder-cmd.rst +1 -1
index ffa363eeaa36..43c7a3928e7b 100644
@@ -48,7 +48,7 @@ currently only used by the STOP command and contains one bit: If the
 until the end of the current *Group Of Pictures*, otherwise it will stop
 immediately.
 
-A :c:func:`read()`() or :ref:`VIDIOC_STREAMON <VIDIOC_STREAMON>`
+A :c:func:`read()`() or :ref:`VIDIOC_STREAMON`
 call sends an implicit START command to the encoder if it has not been
 started yet. After a STOP command, :c:func:`read()`() calls will read
 the remaining data buffered by the driver. When the buffer is empty,
Documentation/linux_tv/media/v4l/vidioc-enum-dv-timings.rst +1 -1
index 5b8f17422fdb..07462519cbf4 100644
@@ -35,7 +35,7 @@ Description
 While some DV receivers or transmitters support a wide range of timings,
 others support only a limited number of timings. With this ioctl
 applications can enumerate a list of known supported timings. Call
-:ref:`VIDIOC_DV_TIMINGS_CAP <VIDIOC_DV_TIMINGS_CAP>` to check if it
+:ref:`VIDIOC_DV_TIMINGS_CAP` to check if it
 also supports other standards or even custom timings that are not in
 this list.
 
Documentation/linux_tv/media/v4l/vidioc-enum-frameintervals.rst +2 -2
index 2c69866c8d9e..a9182898b6dc 100644
@@ -38,8 +38,8 @@ This ioctl allows applications to enumerate all frame intervals that the
 device supports for the given pixel format and frame size.
 
 The supported pixel formats and frame sizes can be obtained by using the
-:ref:`VIDIOC_ENUM_FMT <VIDIOC_ENUM_FMT>` and
-:ref:`VIDIOC_ENUM_FRAMESIZES <VIDIOC_ENUM_FRAMESIZES>` functions.
+:ref:`VIDIOC_ENUM_FMT` and
+:ref:`VIDIOC_ENUM_FRAMESIZES` functions.
 
 The return value and the content of the ``v4l2_frmivalenum.type`` field
 depend on the type of frame intervals the device supports. Here are the
Documentation/linux_tv/media/v4l/vidioc-enum-framesizes.rst +1 -1
index 9b763ca9d0d8..5e171dbc975c 100644
@@ -39,7 +39,7 @@ and height in pixels) that the device supports for the given pixel
 format.
 
 The supported pixel formats can be obtained by using the
-:ref:`VIDIOC_ENUM_FMT <VIDIOC_ENUM_FMT>` function.
+:ref:`VIDIOC_ENUM_FMT` function.
 
 The return value and the content of the ``v4l2_frmsizeenum.type`` field
 depend on the type of frame sizes the device supports. Here are the
Documentation/linux_tv/media/v4l/vidioc-expbuf.rst +4 -4
index a389cbc75970..e71925f3f13e 100644
@@ -35,7 +35,7 @@ This ioctl is an extension to the :ref:`memory mapping <mmap>` I/O
 method, therefore it is available only for ``V4L2_MEMORY_MMAP`` buffers.
 It can be used to export a buffer as a DMABUF file at any time after
 buffers have been allocated with the
-:ref:`VIDIOC_REQBUFS <VIDIOC_REQBUFS>` ioctl.
+:ref:`VIDIOC_REQBUFS` ioctl.
 
 To export a buffer, applications fill struct
 :ref:`v4l2_exportbuffer <v4l2-exportbuffer>`. The ``type`` field is
@@ -43,7 +43,7 @@ set to the same buffer type as was previously used with struct
 :ref:`v4l2_requestbuffers <v4l2-requestbuffers>` ``type``.
 Applications must also set the ``index`` field. Valid index numbers
 range from zero to the number of buffers allocated with
-:ref:`VIDIOC_REQBUFS <VIDIOC_REQBUFS>` (struct
+:ref:`VIDIOC_REQBUFS` (struct
 :ref:`v4l2_requestbuffers <v4l2-requestbuffers>` ``count``) minus
 one. For the multi-planar API, applications set the ``plane`` field to
 the index of the plane to be exported. Valid planes range from zero to
@@ -142,8 +142,8 @@ Examples
        -  Number of the buffer, set by the application. This field is only
           used for :ref:`memory mapping <mmap>` I/O and can range from
           zero to the number of buffers allocated with the
-          :ref:`VIDIOC_REQBUFS <VIDIOC_REQBUFS>` and/or
-          :ref:`VIDIOC_CREATE_BUFS <VIDIOC_CREATE_BUFS>` ioctls.
+          :ref:`VIDIOC_REQBUFS` and/or
+          :ref:`VIDIOC_CREATE_BUFS` ioctls.
 
     -  .. row 3
 
Documentation/linux_tv/media/v4l/vidioc-g-crop.rst +1 -1
index 457a6cc6b63e..e66f8c213535 100644
@@ -66,7 +66,7 @@ vertical scaling factor.
 Finally the driver programs the hardware with the actual cropping and
 image parameters. ``VIDIOC_S_CROP`` is a write-only ioctl, it does not
 return the actual parameters. To query them applications must call
-``VIDIOC_G_CROP`` and :ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>`. When the
+``VIDIOC_G_CROP`` and :ref:`VIDIOC_G_FMT`. When the
 parameters are unsuitable the application may modify the cropping or
 image parameters and repeat the cycle until satisfactory parameters have
 been negotiated.
Documentation/linux_tv/media/v4l/vidioc-g-ctrl.rst +1 -1
index 6b2b157ba9c7..2c2677a76462 100644
@@ -48,7 +48,7 @@ actual new value. If the ``value`` is inappropriate for the control
 EINVAL error code is returned as well.
 
 These ioctls work only with user controls. For other control classes the
-:ref:`VIDIOC_G_EXT_CTRLS <VIDIOC_G_EXT_CTRLS>`,
+:ref:`VIDIOC_G_EXT_CTRLS`,
 :ref:`VIDIOC_S_EXT_CTRLS <VIDIOC_G_EXT_CTRLS>` or
 :ref:`VIDIOC_TRY_EXT_CTRLS <VIDIOC_G_EXT_CTRLS>` must be used.
 
Documentation/linux_tv/media/v4l/vidioc-g-dv-timings.rst +1 -1
index 84f9db487822..8a7fa1c0facf 100644
@@ -47,7 +47,7 @@ values are not correct, the driver returns EINVAL error code.
 The ``linux/v4l2-dv-timings.h`` header can be used to get the timings of
 the formats in the :ref:`cea861` and :ref:`vesadmt` standards. If
 the current input or output does not support DV timings (e.g. if
-:ref:`VIDIOC_ENUMINPUT <VIDIOC_ENUMINPUT>` does not set the
+:ref:`VIDIOC_ENUMINPUT` does not set the
 ``V4L2_IN_CAP_DV_TIMINGS`` flag), then ENODATA error code is returned.
 
 
Documentation/linux_tv/media/v4l/vidioc-g-edid.rst +4 -4
index 26bbf060aa51..0bd8f1ba84d2 100644
@@ -44,8 +44,8 @@ with subdevice nodes (/dev/v4l-subdevX) or with video nodes
 
 When used with video nodes the ``pad`` field represents the input (for
 video capture devices) or output (for video output devices) index as is
-returned by :ref:`VIDIOC_ENUMINPUT <VIDIOC_ENUMINPUT>` and
-:ref:`VIDIOC_ENUMOUTPUT <VIDIOC_ENUMOUTPUT>` respectively. When used
+returned by :ref:`VIDIOC_ENUMINPUT` and
+:ref:`VIDIOC_ENUMOUTPUT` respectively. When used
 with subdevice nodes the ``pad`` field represents the input or output
 pad of the subdevice. If there is no EDID support for the given ``pad``
 value, then the EINVAL error code will be returned.
@@ -105,8 +105,8 @@ EDID is no longer available.
 
        -  Pad for which to get/set the EDID blocks. When used with a video
           device node the pad represents the input or output index as
-          returned by :ref:`VIDIOC_ENUMINPUT <VIDIOC_ENUMINPUT>` and
-          :ref:`VIDIOC_ENUMOUTPUT <VIDIOC_ENUMOUTPUT>` respectively.
+          returned by :ref:`VIDIOC_ENUMINPUT` and
+          :ref:`VIDIOC_ENUMOUTPUT` respectively.
 
     -  .. row 2
 
Documentation/linux_tv/media/v4l/vidioc-g-ext-ctrls.rst +2 -2
index f800458d9dfe..cebaa6ea1ba9 100644
@@ -58,7 +58,7 @@ set ``size`` to a valid value and return an ENOSPC error code. You
 should re-allocate the memory to this new size and try again. For the
 string type it is possible that the same issue occurs again if the
 string has grown in the meantime. It is recommended to call
-:ref:`VIDIOC_QUERYCTRL <VIDIOC_QUERYCTRL>` first and use
+:ref:`VIDIOC_QUERYCTRL` first and use
 ``maximum``\ +1 as the new ``size`` value. It is guaranteed that that is
 sufficient memory.
 
@@ -367,7 +367,7 @@ still cause this situation.
        -  The class containing user controls. These controls are described
           in :ref:`control`. All controls that can be set using the
           :ref:`VIDIOC_S_CTRL <VIDIOC_G_CTRL>` and
-          :ref:`VIDIOC_G_CTRL <VIDIOC_G_CTRL>` ioctl belong to this
+          :ref:`VIDIOC_G_CTRL` ioctl belong to this
           class.
 
     -  .. row 2
Documentation/linux_tv/media/v4l/vidioc-g-fbuf.rst +1 -1
index f4703b3449b3..0d9b6972bc44 100644
@@ -39,7 +39,7 @@ to get and set the framebuffer parameters for a
 :ref:`Video Overlay <overlay>` or :ref:`Video Output Overlay <osd>`
 (OSD). The type of overlay is implied by the device type (capture or
 output device) and can be determined with the
-:ref:`VIDIOC_QUERYCAP <VIDIOC_QUERYCAP>` ioctl. One ``/dev/videoN``
+:ref:`VIDIOC_QUERYCAP` ioctl. One ``/dev/videoN``
 device must not support both kinds of overlay.
 
 The V4L2 API distinguishes destructive and non-destructive overlays. A
Documentation/linux_tv/media/v4l/vidioc-g-input.rst +1 -1
index 62990976ff9b..d0abf6231b7d 100644
@@ -47,7 +47,7 @@ applications must select an input before querying or negotiating any
 other parameters.
 
 Information about video inputs is available using the
-:ref:`VIDIOC_ENUMINPUT <VIDIOC_ENUMINPUT>` ioctl.
+:ref:`VIDIOC_ENUMINPUT` ioctl.
 
 
 Return Value
Documentation/linux_tv/media/v4l/vidioc-g-output.rst +1 -1
index 3b9ea56e3b9e..a38d6a118cf4 100644
@@ -48,7 +48,7 @@ effects applications must select an output before querying or
 negotiating any other parameters.
 
 Information about video outputs is available using the
-:ref:`VIDIOC_ENUMOUTPUT <VIDIOC_ENUMOUTPUT>` ioctl.
+:ref:`VIDIOC_ENUMOUTPUT` ioctl.
 
 
 Return Value
Documentation/linux_tv/media/v4l/vidioc-g-std.rst +1 -1
index 9cbf2d2995c6..fa9da29e0657 100644
@@ -48,7 +48,7 @@ no flags are given or the current input does not support the requested
 standard the driver returns an EINVAL error code. When the standard set
 is ambiguous drivers may return EINVAL or choose any of the requested
 standards. If the current input or output does not support standard
-video timings (e.g. if :ref:`VIDIOC_ENUMINPUT <VIDIOC_ENUMINPUT>`
+video timings (e.g. if :ref:`VIDIOC_ENUMINPUT`
 does not set the ``V4L2_IN_CAP_STD`` flag), then ENODATA error code is
 returned.
 
Documentation/linux_tv/media/v4l/vidioc-g-tuner.rst +4 -4
index 1ad5107a0ad5..1e01010fd2e2 100644
@@ -215,7 +215,7 @@ To change the radio frequency the
 
           The selected audio mode, see :ref:`tuner-audmode` for valid
           values. The audio mode does not affect audio subprogram detection,
-          and like a :ref:`control <control>` it does not automatically
+          and like a :ref:`control` it does not automatically
           change unless the requested mode is invalid or unsupported. See
           :ref:`tuner-matrix` for possible results when the selected and
           received audio programs do not match.
@@ -323,7 +323,7 @@ To change the radio frequency the
           determined from the frequency band.) The set of supported video
           standards is available from the struct
           :ref:`v4l2_input <v4l2-input>` pointing to this tuner, see the
-          description of ioctl :ref:`VIDIOC_ENUMINPUT <VIDIOC_ENUMINPUT>`
+          description of ioctl :ref:`VIDIOC_ENUMINPUT`
           for details. Only ``V4L2_TUNER_ANALOG_TV`` tuners can have this
           capability.
 
@@ -425,7 +425,7 @@ To change the radio frequency the
 
        -  0x0400
 
-       -  The :ref:`VIDIOC_ENUM_FREQ_BANDS <VIDIOC_ENUM_FREQ_BANDS>`
+       -  The :ref:`VIDIOC_ENUM_FREQ_BANDS`
           ioctl can be used to enumerate the available frequency bands.
 
     -  .. row 13
@@ -436,7 +436,7 @@ To change the radio frequency the
 
        -  The range to search when using the hardware seek functionality is
           programmable, see
-          :ref:`VIDIOC_S_HW_FREQ_SEEK <VIDIOC_S_HW_FREQ_SEEK>` for
+          :ref:`VIDIOC_S_HW_FREQ_SEEK` for
           details.
 
     -  .. row 14
Documentation/linux_tv/media/v4l/vidioc-overlay.rst +1 -1
index e0373a9d6f14..fe9084147b93 100644
@@ -36,7 +36,7 @@ Applications call ``VIDIOC_OVERLAY`` to start or stop the overlay. It
 takes a pointer to an integer which must be set to zero by the
 application to stop overlay, to one to start.
 
-Drivers do not support :ref:`VIDIOC_STREAMON <VIDIOC_STREAMON>` or
+Drivers do not support :ref:`VIDIOC_STREAMON` or
 :ref:`VIDIOC_STREAMOFF <VIDIOC_STREAMON>` with
 ``V4L2_BUF_TYPE_VIDEO_OVERLAY``.
 
Documentation/linux_tv/media/v4l/vidioc-qbuf.rst +4 -4
index 045fa53e0417..57a0bc470f36 100644
@@ -42,10 +42,10 @@ previously used with struct :ref:`v4l2_format <v4l2-format>` ``type``
 and struct :ref:`v4l2_requestbuffers <v4l2-requestbuffers>` ``type``.
 Applications must also set the ``index`` field. Valid index numbers
 range from zero to the number of buffers allocated with
-:ref:`VIDIOC_REQBUFS <VIDIOC_REQBUFS>` (struct
+:ref:`VIDIOC_REQBUFS` (struct
 :ref:`v4l2_requestbuffers <v4l2-requestbuffers>` ``count``) minus
 one. The contents of the struct :c:type:`struct v4l2_buffer` returned
-by a :ref:`VIDIOC_QUERYBUF <VIDIOC_QUERYBUF>` ioctl will do as well.
+by a :ref:`VIDIOC_QUERYBUF` ioctl will do as well.
 When the buffer is intended for output (``type`` is
 ``V4L2_BUF_TYPE_VIDEO_OUTPUT``, ``V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE``,
 or ``V4L2_BUF_TYPE_VBI_OUTPUT``) applications must also initialize the
@@ -76,7 +76,7 @@ the driver sets the ``V4L2_BUF_FLAG_QUEUED`` flag and clears the
 memory pages of the buffer in physical memory, they cannot be swapped
 out to disk. Buffers remain locked until dequeued, until the
 :ref:`VIDIOC_STREAMOFF <VIDIOC_STREAMON>` or
-:ref:`VIDIOC_REQBUFS <VIDIOC_REQBUFS>` ioctl is called, or until the
+:ref:`VIDIOC_REQBUFS` ioctl is called, or until the
 device is closed.
 
 To enqueue a :ref:`DMABUF <dmabuf>` buffer applications set the
@@ -92,7 +92,7 @@ buffer. Locking a buffer means passing it to a driver for a hardware
 access (usually DMA). If an application accesses (reads/writes) a locked
 buffer then the result is undefined. Buffers remain locked until
 dequeued, until the :ref:`VIDIOC_STREAMOFF <VIDIOC_STREAMON>` or
-:ref:`VIDIOC_REQBUFS <VIDIOC_REQBUFS>` ioctl is called, or until the
+:ref:`VIDIOC_REQBUFS` ioctl is called, or until the
 device is closed.
 
 Applications call the ``VIDIOC_DQBUF`` ioctl to dequeue a filled
Documentation/linux_tv/media/v4l/vidioc-query-dv-timings.rst +1 -1
index 88aedbd1fcae..ba78f7e5bbe8 100644
@@ -56,7 +56,7 @@ the receiver could lock to the signal, but the format is unsupported
 (e.g. because the pixelclock is out of range of the hardware
 capabilities), then the driver fills in whatever timings it could find
 and returns ERANGE. In that case the application can call
-:ref:`VIDIOC_DV_TIMINGS_CAP <VIDIOC_DV_TIMINGS_CAP>` to compare the
+:ref:`VIDIOC_DV_TIMINGS_CAP` to compare the
 found timings with the hardware's capabilities in order to give more
 precise feedback to the user.
 
Documentation/linux_tv/media/v4l/vidioc-querybuf.rst +2 -2
index baa3ad6591c7..744cd9da45a3 100644
@@ -33,7 +33,7 @@ Description
 
 This ioctl is part of the :ref:`streaming <mmap>` I/O method. It can
 be used to query the status of a buffer at any time after buffers have
-been allocated with the :ref:`VIDIOC_REQBUFS <VIDIOC_REQBUFS>` ioctl.
+been allocated with the :ref:`VIDIOC_REQBUFS` ioctl.
 
 Applications set the ``type`` field of a struct
 :ref:`v4l2_buffer <v4l2-buffer>` to the same buffer type as was
@@ -41,7 +41,7 @@ previously used with struct :ref:`v4l2_format <v4l2-format>` ``type``
 and struct :ref:`v4l2_requestbuffers <v4l2-requestbuffers>` ``type``,
 and the ``index`` field. Valid index numbers range from zero to the
 number of buffers allocated with
-:ref:`VIDIOC_REQBUFS <VIDIOC_REQBUFS>` (struct
+:ref:`VIDIOC_REQBUFS` (struct
 :ref:`v4l2_requestbuffers <v4l2-requestbuffers>` ``count``) minus
 one. The ``reserved`` and ``reserved2`` fields must be set to 0. When
 using the :ref:`multi-planar API <planar-apis>`, the ``m.planes``
Documentation/linux_tv/media/v4l/vidioc-querycap.rst +1 -1
index 3032a9ee1c6b..74589501b95d 100644
@@ -308,7 +308,7 @@ specification the ioctl returns an EINVAL error code.
        -  0x00000400
 
        -  The device supports the
-          :ref:`VIDIOC_S_HW_FREQ_SEEK <VIDIOC_S_HW_FREQ_SEEK>` ioctl
+          :ref:`VIDIOC_S_HW_FREQ_SEEK` ioctl
           for hardware frequency seeking.
 
     -  .. row 15
Documentation/linux_tv/media/v4l/vidioc-queryctrl.rst +1 -1
index 7d38a51c4f73..2b11efc3d257 100644
@@ -569,7 +569,7 @@ See also the examples in :ref:`control`.
           :ref:`VIDIOC_S_EXT_CTRLS <VIDIOC_G_EXT_CTRLS>` you need to
           set the ``size`` field of struct
           :ref:`v4l2_ext_control <v4l2-ext-control>` to 9. For
-          :ref:`VIDIOC_G_EXT_CTRLS <VIDIOC_G_EXT_CTRLS>` you can set
+          :ref:`VIDIOC_G_EXT_CTRLS` you can set
           the ``size`` field to ``maximum`` + 1. Which character encoding is
           used will depend on the string control itself and should be part
           of the control documentation.
Documentation/linux_tv/media/v4l/vidioc-s-hw-freq-seek.rst +2 -2
index 19c2e0afd7de..cd59ba9ab1b0 100644
@@ -43,10 +43,10 @@ to tell the driver to search a specific band. If the struct
 :ref:`v4l2_tuner <v4l2-tuner>` ``capability`` field has the
 ``V4L2_TUNER_CAP_HWSEEK_PROG_LIM`` flag set, these values must fall
 within one of the bands returned by
-:ref:`VIDIOC_ENUM_FREQ_BANDS <VIDIOC_ENUM_FREQ_BANDS>`. If the
+:ref:`VIDIOC_ENUM_FREQ_BANDS`. If the
 ``V4L2_TUNER_CAP_HWSEEK_PROG_LIM`` flag is not set, then these values
 must exactly match those of one of the bands returned by
-:ref:`VIDIOC_ENUM_FREQ_BANDS <VIDIOC_ENUM_FREQ_BANDS>`. If the
+:ref:`VIDIOC_ENUM_FREQ_BANDS`. If the
 current frequency of the tuner does not fall within the selected band it
 will be clamped to fit in the band before the seek is started.
 
Documentation/linux_tv/media/v4l/vidioc-streamon.rst +3 -3
index 349204d81334..7663339d30be 100644
@@ -55,14 +55,14 @@ and it removes all buffers from the incoming and outgoing queues. That
 means all images captured but not dequeued yet will be lost, likewise
 all images enqueued for output but not transmitted yet. I/O returns to
 the same state as after calling
-:ref:`VIDIOC_REQBUFS <VIDIOC_REQBUFS>` and can be restarted
+:ref:`VIDIOC_REQBUFS` and can be restarted
 accordingly.
 
-If buffers have been queued with :ref:`VIDIOC_QBUF <VIDIOC_QBUF>` and
+If buffers have been queued with :ref:`VIDIOC_QBUF` and
 ``VIDIOC_STREAMOFF`` is called without ever having called
 ``VIDIOC_STREAMON``, then those queued buffers will also be removed from
 the incoming queue and all are returned to the same state as after
-calling :ref:`VIDIOC_REQBUFS <VIDIOC_REQBUFS>` and can be restarted
+calling :ref:`VIDIOC_REQBUFS` and can be restarted
 accordingly.
 
 Both ioctls take a pointer to an integer, the desired buffer or stream
Documentation/linux_tv/media/v4l/vidioc-subdev-enum-frame-interval.rst +1 -1
index d9f27e32eb60..ab1368786038 100644
@@ -52,7 +52,7 @@ one until EINVAL is returned.
 
 Available frame intervals may depend on the current 'try' formats at
 other pads of the sub-device, as well as on the current active links.
-See :ref:`VIDIOC_SUBDEV_G_FMT <VIDIOC_SUBDEV_G_FMT>` for more
+See :ref:`VIDIOC_SUBDEV_G_FMT` for more
 information about the try formats.
 
 Sub-devices that support the frame interval enumeration ioctl should
Documentation/linux_tv/media/v4l/vidioc-subdev-enum-frame-size.rst +2 -2
index 49be2eefaa57..e08de6040757 100644
@@ -34,7 +34,7 @@ Description
 This ioctl allows applications to enumerate all frame sizes supported by
 a sub-device on the given pad for the given media bus format. Supported
 formats can be retrieved with the
-:ref:`VIDIOC_SUBDEV_ENUM_MBUS_CODE <VIDIOC_SUBDEV_ENUM_MBUS_CODE>`
+:ref:`VIDIOC_SUBDEV_ENUM_MBUS_CODE`
 ioctl.
 
 To enumerate frame sizes applications initialize the ``pad``, ``which``
@@ -58,7 +58,7 @@ sub-device for an exact supported frame size.
 Available frame sizes may depend on the current 'try' formats at other
 pads of the sub-device, as well as on the current active links and the
 current values of V4L2 controls. See
-:ref:`VIDIOC_SUBDEV_G_FMT <VIDIOC_SUBDEV_G_FMT>` for more
+:ref:`VIDIOC_SUBDEV_G_FMT` for more
 information about try formats.
 
 
Documentation/linux_tv/media/v4l/vidioc-subdev-enum-mbus-code.rst +1 -1
index a9b0baba2633..0daf410c1546 100644
@@ -43,7 +43,7 @@ one until EINVAL is returned.
 
 Available media bus formats may depend on the current 'try' formats at
 other pads of the sub-device, as well as on the current active links.
-See :ref:`VIDIOC_SUBDEV_G_FMT <VIDIOC_SUBDEV_G_FMT>` for more
+See :ref:`VIDIOC_SUBDEV_G_FMT` for more
 information about the try formats.
 
 
Documentation/linux_tv/media/v4l/vidioc-subdev-g-crop.rst +1 -1
index bef416cfe46c..6fb1ea143f9e 100644
@@ -36,7 +36,7 @@ Description
 
     **Note**
 
-    This is an :ref:`obsolete <obsolete>` interface and may be removed
+    This is an :ref:`obsolete` interface and may be removed
     in the future. It is superseded by
     :ref:`the selection API <VIDIOC_SUBDEV_G_SELECTION>`.
 
Documentation/linux_tv/media/v4l/vidioc-subscribe-event.rst +1 -1
index 8d0e346461e9..182353f544eb 100644
@@ -33,7 +33,7 @@ Description
 ===========
 
 Subscribe or unsubscribe V4L2 event. Subscribed events are dequeued by
-using the :ref:`VIDIOC_DQEVENT <VIDIOC_DQEVENT>` ioctl.
+using the :ref:`VIDIOC_DQEVENT` ioctl.
 
 
 .. _v4l2-event-subscription:
Signature · 1 line
2.7.4
#13 lore raw

PATCH 13/51 Documentation: linux_tv: convert lots of consts to references

In reply to Mauro Carvalho Chehab

There were lots of consts at the media docbook that should be, instead, references. Convert the ones that can easily be done by an automatic script.

---
 Documentation/linux_tv/media/v4l/dev-capture.rst     | 16 ++++++++--------
 Documentation/linux_tv/media/v4l/dev-osd.rst         |  4 ++--
 Documentation/linux_tv/media/v4l/dev-output.rst      | 16 ++++++++--------
 Documentation/linux_tv/media/v4l/dev-overlay.rst     | 12 ++++++------
 Documentation/linux_tv/media/v4l/dev-raw-vbi.rst     | 10 +++++-----
 Documentation/linux_tv/media/v4l/format.rst          | 12 ++++++------
 Documentation/linux_tv/media/v4l/io.rst              |  2 +-
 .../linux_tv/media/v4l/selection-api-004.rst         |  4 ++--
 .../linux_tv/media/v4l/selection-api-005.rst         |  2 +-
 Documentation/linux_tv/media/v4l/standard.rst        |  4 ++--
 Documentation/linux_tv/media/v4l/tuner.rst           |  6 +++---
 .../linux_tv/media/v4l/vidioc-create-bufs.rst        |  4 ++--
 Documentation/linux_tv/media/v4l/vidioc-cropcap.rst  |  2 +-
 .../linux_tv/media/v4l/vidioc-dbg-g-chip-info.rst    |  4 ++--
 Documentation/linux_tv/media/v4l/vidioc-enum-fmt.rst |  2 +-
 .../linux_tv/media/v4l/vidioc-enum-freq-bands.rst    |  2 +-
 .../linux_tv/media/v4l/vidioc-enumaudio.rst          |  2 +-
 .../linux_tv/media/v4l/vidioc-enuminput.rst          |  2 +-
 .../linux_tv/media/v4l/vidioc-enumoutput.rst         |  2 +-
 Documentation/linux_tv/media/v4l/vidioc-enumstd.rst  |  4 ++--
 Documentation/linux_tv/media/v4l/vidioc-expbuf.rst   |  4 ++--
 Documentation/linux_tv/media/v4l/vidioc-g-audio.rst  |  6 +++---
 Documentation/linux_tv/media/v4l/vidioc-g-crop.rst   | 10 +++++-----
 Documentation/linux_tv/media/v4l/vidioc-g-ctrl.rst   |  6 +++---
 .../linux_tv/media/v4l/vidioc-g-dv-timings.rst       |  6 +++---
 Documentation/linux_tv/media/v4l/vidioc-g-edid.rst   |  4 ++--
 .../linux_tv/media/v4l/vidioc-g-enc-index.rst        |  6 +++---
 .../linux_tv/media/v4l/vidioc-g-ext-ctrls.rst        | 20 ++++++++++----------
 Documentation/linux_tv/media/v4l/vidioc-g-fbuf.rst   | 16 ++++++++--------
 Documentation/linux_tv/media/v4l/vidioc-g-fmt.rst    | 18 +++++++++---------
 .../linux_tv/media/v4l/vidioc-g-frequency.rst        |  6 +++---
 Documentation/linux_tv/media/v4l/vidioc-g-input.rst  |  4 ++--
 .../linux_tv/media/v4l/vidioc-g-modulator.rst        |  8 ++++----
 Documentation/linux_tv/media/v4l/vidioc-g-output.rst |  4 ++--
 Documentation/linux_tv/media/v4l/vidioc-g-parm.rst   |  2 +-
 .../linux_tv/media/v4l/vidioc-g-priority.rst         |  4 ++--
 .../linux_tv/media/v4l/vidioc-g-sliced-vbi-cap.rst   |  2 +-
 Documentation/linux_tv/media/v4l/vidioc-g-std.rst    | 10 +++++-----
 Documentation/linux_tv/media/v4l/vidioc-overlay.rst  |  2 +-
 .../linux_tv/media/v4l/vidioc-prepare-buf.rst        |  4 ++--
 .../linux_tv/media/v4l/vidioc-query-dv-timings.rst   |  6 +++---
 Documentation/linux_tv/media/v4l/vidioc-querybuf.rst |  2 +-
 Documentation/linux_tv/media/v4l/vidioc-querystd.rst |  6 +++---
 Documentation/linux_tv/media/v4l/vidioc-reqbufs.rst  |  2 +-
 .../media/v4l/vidioc-subdev-enum-frame-interval.rst  |  2 +-
 .../media/v4l/vidioc-subdev-enum-frame-size.rst      |  2 +-
 .../media/v4l/vidioc-subdev-enum-mbus-code.rst       |  2 +-
 47 files changed, 138 insertions(+), 138 deletions(-)
Documentation/linux_tv/media/v4l/dev-capture.rst +8 -8
index eb5c1522905d..c970a1fd1439 100644
@@ -75,23 +75,23 @@ To request different parameters applications set the ``type`` field of a
 struct :ref:`v4l2_format <v4l2-format>` as above and initialize all
 fields of the struct :ref:`v4l2_pix_format <v4l2-pix-format>`
 ``vbi`` member of the ``fmt`` union, or better just modify the results
-of ``VIDIOC_G_FMT``, and call the :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>`
+of :ref:`VIDIOC_G_FMT`, and call the :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>`
 ioctl with a pointer to this structure. Drivers may adjust the
-parameters and finally return the actual parameters as ``VIDIOC_G_FMT``
+parameters and finally return the actual parameters as :ref:`VIDIOC_G_FMT`
 does.
 
-Like ``VIDIOC_S_FMT`` the :ref:`VIDIOC_TRY_FMT <VIDIOC_G_FMT>` ioctl
+Like :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` the :ref:`VIDIOC_TRY_FMT <VIDIOC_G_FMT>` ioctl
 can be used to learn about hardware limitations without disabling I/O or
 possibly time consuming hardware preparations.
 
 The contents of struct :ref:`v4l2_pix_format <v4l2-pix-format>` and
 struct :ref:`v4l2_pix_format_mplane <v4l2-pix-format-mplane>` are
 discussed in :ref:`pixfmt`. See also the specification of the
-``VIDIOC_G_FMT``, ``VIDIOC_S_FMT`` and ``VIDIOC_TRY_FMT`` ioctls for
-details. Video capture devices must implement both the ``VIDIOC_G_FMT``
-and ``VIDIOC_S_FMT`` ioctl, even if ``VIDIOC_S_FMT`` ignores all
-requests and always returns default parameters as ``VIDIOC_G_FMT`` does.
-``VIDIOC_TRY_FMT`` is optional.
+:ref:`VIDIOC_G_FMT`, :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` and :ref:`VIDIOC_TRY_FMT <VIDIOC_G_FMT>` ioctls for
+details. Video capture devices must implement both the :ref:`VIDIOC_G_FMT`
+and :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl, even if :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ignores all
+requests and always returns default parameters as :ref:`VIDIOC_G_FMT` does.
+:ref:`VIDIOC_TRY_FMT <VIDIOC_G_FMT>` is optional.
 
 
 Reading Images
Documentation/linux_tv/media/v4l/dev-osd.rst +2 -2
index 27d2cfbf3d9c..4b668a3544b8 100644
@@ -124,10 +124,10 @@ struct :ref:`v4l2_format <v4l2-format>` to
 ``V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY``, initialize the ``win``
 substructure and call the :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl.
 The driver adjusts the parameters against hardware limits and returns
-the actual parameters as ``VIDIOC_G_FMT`` does. Like ``VIDIOC_S_FMT``,
+the actual parameters as :ref:`VIDIOC_G_FMT` does. Like :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>`,
 the :ref:`VIDIOC_TRY_FMT <VIDIOC_G_FMT>` ioctl can be used to learn
 about driver capabilities without actually changing driver state. Unlike
-``VIDIOC_S_FMT`` this also works after the overlay has been enabled.
+:ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` this also works after the overlay has been enabled.
 
 A struct :ref:`v4l2_crop <v4l2-crop>` defines the size and position
 of the target rectangle. The scaling factor of the overlay is implied by
Documentation/linux_tv/media/v4l/dev-output.rst +8 -8
index 1ca0e5873a86..ee62d1a0fb87 100644
@@ -72,23 +72,23 @@ To request different parameters applications set the ``type`` field of a
 struct :ref:`v4l2_format <v4l2-format>` as above and initialize all
 fields of the struct :ref:`v4l2_pix_format <v4l2-pix-format>`
 ``vbi`` member of the ``fmt`` union, or better just modify the results
-of ``VIDIOC_G_FMT``, and call the :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>`
+of :ref:`VIDIOC_G_FMT`, and call the :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>`
 ioctl with a pointer to this structure. Drivers may adjust the
-parameters and finally return the actual parameters as ``VIDIOC_G_FMT``
+parameters and finally return the actual parameters as :ref:`VIDIOC_G_FMT`
 does.
 
-Like ``VIDIOC_S_FMT`` the :ref:`VIDIOC_TRY_FMT <VIDIOC_G_FMT>` ioctl
+Like :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` the :ref:`VIDIOC_TRY_FMT <VIDIOC_G_FMT>` ioctl
 can be used to learn about hardware limitations without disabling I/O or
 possibly time consuming hardware preparations.
 
 The contents of struct :ref:`v4l2_pix_format <v4l2-pix-format>` and
 struct :ref:`v4l2_pix_format_mplane <v4l2-pix-format-mplane>` are
 discussed in :ref:`pixfmt`. See also the specification of the
-``VIDIOC_G_FMT``, ``VIDIOC_S_FMT`` and ``VIDIOC_TRY_FMT`` ioctls for
-details. Video output devices must implement both the ``VIDIOC_G_FMT``
-and ``VIDIOC_S_FMT`` ioctl, even if ``VIDIOC_S_FMT`` ignores all
-requests and always returns default parameters as ``VIDIOC_G_FMT`` does.
-``VIDIOC_TRY_FMT`` is optional.
+:ref:`VIDIOC_G_FMT`, :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` and :ref:`VIDIOC_TRY_FMT <VIDIOC_G_FMT>` ioctls for
+details. Video output devices must implement both the :ref:`VIDIOC_G_FMT`
+and :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl, even if :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ignores all
+requests and always returns default parameters as :ref:`VIDIOC_G_FMT` does.
+:ref:`VIDIOC_TRY_FMT <VIDIOC_G_FMT>` is optional.
 
 
 Writing Images
Documentation/linux_tv/media/v4l/dev-overlay.rst +6 -6
index acbcfb4cbe57..26bd4a15a125 100644
@@ -65,7 +65,7 @@ frame buffer parameters, namely the address and size of the frame buffer
 and the image format, for example RGB 5:6:5. The
 :ref:`VIDIOC_G_FBUF` and
 :ref:`VIDIOC_S_FBUF <VIDIOC_G_FBUF>` ioctls are available to get and
-set these parameters, respectively. The ``VIDIOC_S_FBUF`` ioctl is
+set these parameters, respectively. The :ref:`VIDIOC_S_FBUF <VIDIOC_G_FBUF>` ioctl is
 privileged because it allows to set up DMA into physical memory,
 bypassing the memory protection mechanisms of the kernel. Only the
 superuser can change the frame buffer address and size. Users are not
@@ -76,8 +76,8 @@ system and program the V4L2 driver at the appropriate time.
 Some devices add the video overlay to the output signal of the graphics
 card. In this case the frame buffer is not modified by the video device,
 and the frame buffer address and pixel format are not needed by the
-driver. The ``VIDIOC_S_FBUF`` ioctl is not privileged. An application
-can check for this type of device by calling the ``VIDIOC_G_FBUF``
+driver. The :ref:`VIDIOC_S_FBUF <VIDIOC_G_FBUF>` ioctl is not privileged. An application
+can check for this type of device by calling the :ref:`VIDIOC_G_FBUF`
 ioctl.
 
 A driver may support any (or none) of five clipping/blending methods:
@@ -130,10 +130,10 @@ struct :ref:`v4l2_format <v4l2-format>` to
 ``V4L2_BUF_TYPE_VIDEO_OVERLAY``, initialize the ``win`` substructure and
 call the :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl. The driver
 adjusts the parameters against hardware limits and returns the actual
-parameters as ``VIDIOC_G_FMT`` does. Like ``VIDIOC_S_FMT``, the
+parameters as :ref:`VIDIOC_G_FMT` does. Like :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>`, the
 :ref:`VIDIOC_TRY_FMT <VIDIOC_G_FMT>` ioctl can be used to learn
 about driver capabilities without actually changing driver state. Unlike
-``VIDIOC_S_FMT`` this also works after the overlay has been enabled.
+:ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` this also works after the overlay has been enabled.
 
 The scaling factor of the overlaid image is implied by the width and
 height given in struct :ref:`v4l2_window <v4l2-window>` and the size
@@ -199,7 +199,7 @@ are undefined.
     When the application set the ``clips`` field, this field must
     contain the number of clipping rectangles in the list. When clip
     lists are not supported the driver ignores this field, its contents
-    after calling ``VIDIOC_S_FMT`` are undefined. When clip lists are
+    after calling :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` are undefined. When clip lists are
     supported but no clipping is desired this field must be set to zero.
 
 ``void * bitmap``
Documentation/linux_tv/media/v4l/dev-raw-vbi.rst +5 -5
index ca61dde3ad38..2cd813a5b4e4 100644
@@ -80,7 +80,7 @@ To request different parameters applications set the ``type`` field of a
 struct :ref:`v4l2_format <v4l2-format>` as above and initialize all
 fields of the struct :ref:`v4l2_vbi_format <v4l2-vbi-format>`
 ``vbi`` member of the ``fmt`` union, or better just modify the results
-of ``VIDIOC_G_FMT``, and call the :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>`
+of :ref:`VIDIOC_G_FMT`, and call the :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>`
 ioctl with a pointer to this structure. Drivers return an EINVAL error
 code only when the given parameters are ambiguous, otherwise they modify
 the parameters according to the hardware capabilities and return the
@@ -94,10 +94,10 @@ expect other resource allocation points which may return EBUSY, at the
 :ref:`VIDIOC_STREAMON` ioctl and the first read(),
 write() and select() call.
 
-VBI devices must implement both the ``VIDIOC_G_FMT`` and
-``VIDIOC_S_FMT`` ioctl, even if ``VIDIOC_S_FMT`` ignores all requests
-and always returns default parameters as ``VIDIOC_G_FMT`` does.
-``VIDIOC_TRY_FMT`` is optional.
+VBI devices must implement both the :ref:`VIDIOC_G_FMT` and
+:ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl, even if :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ignores all requests
+and always returns default parameters as :ref:`VIDIOC_G_FMT` does.
+:ref:`VIDIOC_TRY_FMT <VIDIOC_G_FMT>` is optional.
 
 
 .. _v4l2-vbi-format:
Documentation/linux_tv/media/v4l/format.rst +6 -6
index 46f740a0092e..0184b5931709 100644
@@ -31,10 +31,10 @@ format. The data formats supported by the V4L2 API are covered in the
 respective device section in :ref:`devices`. For a closer look at
 image formats see :ref:`pixfmt`.
 
-The ``VIDIOC_S_FMT`` ioctl is a major turning-point in the
+The :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl is a major turning-point in the
 initialization sequence. Prior to this point multiple panel applications
 can access the same device concurrently to select the current input,
-change controls or modify other properties. The first ``VIDIOC_S_FMT``
+change controls or modify other properties. The first :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>`
 assigns a logical stream (video data, VBI data etc.) exclusively to one
 file descriptor.
 
@@ -50,7 +50,7 @@ example video overlay is about to start or already in progress,
 simultaneous video capturing may be restricted to the same cropping and
 image size.
 
-When applications omit the ``VIDIOC_S_FMT`` ioctl its locking side
+When applications omit the :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl its locking side
 effects are implied by the next step, the selection of an I/O method
 with the :ref:`VIDIOC_REQBUFS` ioctl or implicit
 with the first :ref:`read() <func-read>` or
@@ -61,11 +61,11 @@ the exception being drivers permitting simultaneous video capturing and
 overlay using the same file descriptor for compatibility with V4L and
 earlier versions of V4L2. Switching the logical stream or returning into
 "panel mode" is possible by closing and reopening the device. Drivers
-*may* support a switch using ``VIDIOC_S_FMT``.
+*may* support a switch using :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>`.
 
 All drivers exchanging data with applications must support the
-``VIDIOC_G_FMT`` and ``VIDIOC_S_FMT`` ioctl. Implementation of the
-``VIDIOC_TRY_FMT`` is highly recommended but optional.
+:ref:`VIDIOC_G_FMT` and :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl. Implementation of the
+:ref:`VIDIOC_TRY_FMT <VIDIOC_G_FMT>` is highly recommended but optional.
 
 
 Image Format Enumeration
Documentation/linux_tv/media/v4l/io.rst +1 -1
index 651d4530c703..77d13fdd1c28 100644
@@ -31,7 +31,7 @@ and drivers permitting simultaneous video capturing and overlay using
 the same file descriptor, for compatibility with V4L and earlier
 versions of V4L2.
 
-``VIDIOC_S_FMT`` and ``VIDIOC_REQBUFS`` would permit this to some
+:ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` and :ref:`VIDIOC_REQBUFS` would permit this to some
 degree, but for simplicity drivers need not support switching the I/O
 method (after first switching away from read/write) other than by
 closing and reopening the device.
Documentation/linux_tv/media/v4l/selection-api-004.rst +2 -2
index 4890815e268e..1a8f4d09bff1 100644
@@ -50,7 +50,7 @@ The composing targets refer to a memory buffer. The limits of composing
 coordinates are obtained using ``V4L2_SEL_TGT_COMPOSE_BOUNDS``. All
 coordinates are expressed in pixels. The rectangle's top/left corner
 must be located at position ``(0,0)``. The width and height are equal to
-the image size set by ``VIDIOC_S_FMT``.
+the image size set by :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>`.
 
 The part of a buffer into which the image is inserted by the hardware is
 controlled by the ``V4L2_SEL_TGT_COMPOSE`` target. The rectangle's
@@ -90,7 +90,7 @@ to be inserted into a video signal or graphical screen. The limits of
 cropping coordinates are obtained using ``V4L2_SEL_TGT_CROP_BOUNDS``.
 All coordinates are expressed in pixels. The top/left corner is always
 point ``(0,0)``. The width and height is equal to the image size
-specified using ``VIDIOC_S_FMT`` ioctl.
+specified using :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl.
 
 The top left corner, width and height of the source rectangle, that is
 the area from which image date are processed by the hardware, is given
Documentation/linux_tv/media/v4l/selection-api-005.rst +1 -1
index aefab87788db..6fdb0af2b13d 100644
@@ -19,7 +19,7 @@ setting the field struct
 :ref:`v4l2_pix_format <v4l2-pix-format>```::bytesperline``.
 Introducing an image offsets could be done by modifying field struct
 :ref:`v4l2_buffer <v4l2-buffer>```::m_userptr`` before calling
-``VIDIOC_QBUF``. Those operations should be avoided because they are not
+:ref:`VIDIOC_QBUF`. Those operations should be avoided because they are not
 portable (endianness), and do not work for macroblock and Bayer formats
 and mmap buffers. The selection API deals with configuration of buffer
 cropping/composing in a clear, intuitive and portable way. Next, with
Documentation/linux_tv/media/v4l/standard.rst +2 -2
index 3c0f6cb97f13..ec39b2b39e67 100644
@@ -56,8 +56,8 @@ output device which is:
 
 Here the driver shall set the ``std`` field of struct
 :ref:`v4l2_input <v4l2-input>` and struct
-:ref:`v4l2_output <v4l2-output>` to zero and the ``VIDIOC_G_STD``,
-``VIDIOC_S_STD``, ``VIDIOC_QUERYSTD`` and ``VIDIOC_ENUMSTD`` ioctls
+:ref:`v4l2_output <v4l2-output>` to zero and the :ref:`VIDIOC_G_STD`,
+:ref:`VIDIOC_S_STD <VIDIOC_G_STD>`, :ref:`VIDIOC_QUERYSTD` and :ref:`VIDIOC_ENUMSTD` ioctls
 shall return the ENOTTY error code or the EINVAL error code.
 
 Applications can make use of the :ref:`input-capabilities` and
Documentation/linux_tv/media/v4l/tuner.rst +3 -3
index b1be27bd297e..67f4e24709b5 100644
@@ -24,9 +24,9 @@ inputs.
 To query and change tuner properties applications use the
 :ref:`VIDIOC_G_TUNER` and
 :ref:`VIDIOC_S_TUNER <VIDIOC_G_TUNER>` ioctls, respectively. The
-struct :ref:`v4l2_tuner <v4l2-tuner>` returned by ``VIDIOC_G_TUNER``
+struct :ref:`v4l2_tuner <v4l2-tuner>` returned by :ref:`VIDIOC_G_TUNER`
 also contains signal status information applicable when the tuner of the
-current video or radio input is queried. Note that ``VIDIOC_S_TUNER``
+current video or radio input is queried. Note that :ref:`VIDIOC_S_TUNER <VIDIOC_G_TUNER>`
 does not switch the current tuner, when there is more than one at all.
 The tuner is solely determined by the current video input. Drivers must
 support both ioctls and set the ``V4L2_CAP_TUNER`` flag in the struct
@@ -61,7 +61,7 @@ cannot specify whether the frequency is for a tuner or a modulator.
 To query and change modulator properties applications use the
 :ref:`VIDIOC_G_MODULATOR` and
 :ref:`VIDIOC_S_MODULATOR <VIDIOC_G_MODULATOR>` ioctl. Note that
-``VIDIOC_S_MODULATOR`` does not switch the current modulator, when there
+:ref:`VIDIOC_S_MODULATOR <VIDIOC_G_MODULATOR>` does not switch the current modulator, when there
 is more than one at all. The modulator is solely determined by the
 current video output. Drivers must support both ioctls and set the
 ``V4L2_CAP_MODULATOR`` flag in the struct
Documentation/linux_tv/media/v4l/vidioc-create-bufs.rst +2 -2
index 9220bcea1259..d269eab4d2b6 100644
@@ -94,10 +94,10 @@ than the number requested.
        -  ``count``
 
        -  The number of buffers requested or granted. If count == 0, then
-          ``VIDIOC_CREATE_BUFS`` will set ``index`` to the current number of
+          :ref:`VIDIOC_CREATE_BUFS` will set ``index`` to the current number of
           created buffers, and it will check the validity of ``memory`` and
           ``format.type``. If those are invalid -1 is returned and errno is
-          set to EINVAL error code, otherwise ``VIDIOC_CREATE_BUFS`` returns
+          set to EINVAL error code, otherwise :ref:`VIDIOC_CREATE_BUFS` returns
           0. It will never set errno to EBUSY error code in this particular
           case.
 
Documentation/linux_tv/media/v4l/vidioc-cropcap.rst +1 -1
index 22b5efe1d2e4..25ad9b29b160 100644
@@ -34,7 +34,7 @@ Description
 Applications use this function to query the cropping limits, the pixel
 aspect of images and to calculate scale factors. They set the ``type``
 field of a v4l2_cropcap structure to the respective buffer (stream)
-type and call the ``VIDIOC_CROPCAP`` ioctl with a pointer to this
+type and call the :ref:`VIDIOC_CROPCAP` ioctl with a pointer to this
 structure. Drivers fill the rest of the structure. The results are
 constant except when switching the video standard. Remember this switch
 can occur implicit when switching the video input or output.
Documentation/linux_tv/media/v4l/vidioc-dbg-g-chip-info.rst +2 -2
index 12c2e5df48ac..a1534a326bb3 100644
@@ -49,14 +49,14 @@ Additionally the Linux kernel must be compiled with the
 To query the driver applications must initialize the ``match.type`` and
 ``match.addr`` or ``match.name`` fields of a struct
 :ref:`v4l2_dbg_chip_info <v4l2-dbg-chip-info>` and call
-``VIDIOC_DBG_G_CHIP_INFO`` with a pointer to this structure. On success
+:ref:`VIDIOC_DBG_G_CHIP_INFO` with a pointer to this structure. On success
 the driver stores information about the selected chip in the ``name``
 and ``flags`` fields.
 
 When ``match.type`` is ``V4L2_CHIP_MATCH_BRIDGE``, ``match.addr``
 selects the nth bridge 'chip' on the TV card. You can enumerate all
 chips by starting at zero and incrementing ``match.addr`` by one until
-``VIDIOC_DBG_G_CHIP_INFO`` fails with an EINVAL error code. The number
+:ref:`VIDIOC_DBG_G_CHIP_INFO` fails with an EINVAL error code. The number
 zero always selects the bridge chip itself, e. g. the chip connected to
 the PCI or USB bus. Non-zero numbers identify specific parts of the
 bridge chip such as an AC97 register block.
Documentation/linux_tv/media/v4l/vidioc-enum-fmt.rst +1 -1
index f4fc2723f01e..c838f3dbb808 100644
@@ -33,7 +33,7 @@ Description
 
 To enumerate image formats applications initialize the ``type`` and
 ``index`` field of struct :ref:`v4l2_fmtdesc <v4l2-fmtdesc>` and call
-the ``VIDIOC_ENUM_FMT`` ioctl with a pointer to this structure. Drivers
+the :ref:`VIDIOC_ENUM_FMT` ioctl with a pointer to this structure. Drivers
 fill the rest of the structure or return an EINVAL error code. All
 formats are enumerable by beginning at index zero and incrementing by
 one until EINVAL is returned.
Documentation/linux_tv/media/v4l/vidioc-enum-freq-bands.rst +1 -1
index 2f5dbe0583b4..3999c419589a 100644
@@ -35,7 +35,7 @@ Enumerates the frequency bands that a tuner or modulator supports. To do
 this applications initialize the ``tuner``, ``type`` and ``index``
 fields, and zero out the ``reserved`` array of a struct
 :ref:`v4l2_frequency_band <v4l2-frequency-band>` and call the
-``VIDIOC_ENUM_FREQ_BANDS`` ioctl with a pointer to this structure.
+:ref:`VIDIOC_ENUM_FREQ_BANDS` ioctl with a pointer to this structure.
 
 This ioctl is supported if the ``V4L2_TUNER_CAP_FREQ_BANDS`` capability
 of the corresponding tuner/modulator is set.
Documentation/linux_tv/media/v4l/vidioc-enumaudio.rst +1 -1
index dcca0591864e..0fc0c3eeae5f 100644
@@ -33,7 +33,7 @@ Description
 
 To query the attributes of an audio input applications initialize the
 ``index`` field and zero out the ``reserved`` array of a struct
-:ref:`v4l2_audio <v4l2-audio>` and call the ``VIDIOC_ENUMAUDIO``
+:ref:`v4l2_audio <v4l2-audio>` and call the :ref:`VIDIOC_ENUMAUDIO`
 ioctl with a pointer to this structure. Drivers fill the rest of the
 structure or return an EINVAL error code when the index is out of
 bounds. To enumerate all audio inputs applications shall begin at index
Documentation/linux_tv/media/v4l/vidioc-enuminput.rst +1 -1
index 644d50679aa2..131f331462b1 100644
@@ -33,7 +33,7 @@ Description
 
 To query the attributes of a video input applications initialize the
 ``index`` field of struct :ref:`v4l2_input <v4l2-input>` and call the
-``VIDIOC_ENUMINPUT`` ioctl with a pointer to this structure. Drivers
+:ref:`VIDIOC_ENUMINPUT` ioctl with a pointer to this structure. Drivers
 fill the rest of the structure or return an EINVAL error code when the
 index is out of bounds. To enumerate all inputs applications shall begin
 at index zero, incrementing by one until the driver returns EINVAL.
Documentation/linux_tv/media/v4l/vidioc-enumoutput.rst +1 -1
index 6ccb3d094dc8..cb0107b9c03b 100644
@@ -33,7 +33,7 @@ Description
 
 To query the attributes of a video outputs applications initialize the
 ``index`` field of struct :ref:`v4l2_output <v4l2-output>` and call
-the ``VIDIOC_ENUMOUTPUT`` ioctl with a pointer to this structure.
+the :ref:`VIDIOC_ENUMOUTPUT` ioctl with a pointer to this structure.
 Drivers fill the rest of the structure or return an EINVAL error code
 when the index is out of bounds. To enumerate all outputs applications
 shall begin at index zero, incrementing by one until the driver returns
Documentation/linux_tv/media/v4l/vidioc-enumstd.rst +2 -2
index d16a9494d03b..e292b7d50cc3 100644
@@ -33,7 +33,7 @@ Description
 
 To query the attributes of a video standard, especially a custom (driver
 defined) one, applications initialize the ``index`` field of struct
-:ref:`v4l2_standard <v4l2-standard>` and call the ``VIDIOC_ENUMSTD``
+:ref:`v4l2_standard <v4l2-standard>` and call the :ref:`VIDIOC_ENUMSTD`
 ioctl with a pointer to this structure. Drivers fill the rest of the
 structure or return an EINVAL error code when the index is out of
 bounds. To enumerate all standards applications shall begin at index
@@ -401,7 +401,7 @@ ENODATA
 
 .. [1]
    The supported standards may overlap and we need an unambiguous set to
-   find the current standard returned by ``VIDIOC_G_STD``.
+   find the current standard returned by :ref:`VIDIOC_G_STD`.
 
 .. [2]
    Japan uses a standard similar to M/NTSC (V4L2_STD_NTSC_M_JP).
Documentation/linux_tv/media/v4l/vidioc-expbuf.rst +2 -2
index e71925f3f13e..2933640e8c4e 100644
@@ -53,9 +53,9 @@ Additional flags may be posted in the ``flags`` field. Refer to a manual
 for open() for details. Currently only O_CLOEXEC, O_RDONLY, O_WRONLY,
 and O_RDWR are supported. All other fields must be set to zero. In the
 case of multi-planar API, every plane is exported separately using
-multiple ``VIDIOC_EXPBUF`` calls.
+multiple :ref:`VIDIOC_EXPBUF` calls.
 
-After calling ``VIDIOC_EXPBUF`` the ``fd`` field will be set by a
+After calling :ref:`VIDIOC_EXPBUF` the ``fd`` field will be set by a
 driver. This is a DMABUF file descriptor. The application may pass it to
 other DMABUF-aware devices. Refer to :ref:`DMABUF importing <dmabuf>`
 for details about importing DMABUF files into V4L2 nodes. It is
Documentation/linux_tv/media/v4l/vidioc-g-audio.rst +3 -3
index 2a81d01a1c00..be8899d87e33 100644
@@ -36,14 +36,14 @@ Description
 
 To query the current audio input applications zero out the ``reserved``
 array of a struct :ref:`v4l2_audio <v4l2-audio>` and call the
-``VIDIOC_G_AUDIO`` ioctl with a pointer to this structure. Drivers fill
+:ref:`VIDIOC_G_AUDIO` ioctl with a pointer to this structure. Drivers fill
 the rest of the structure or return an EINVAL error code when the device
 has no audio inputs, or none which combine with the current video input.
 
 Audio inputs have one writable property, the audio mode. To select the
 current audio input *and* change the audio mode, applications initialize
 the ``index`` and ``mode`` fields, and the ``reserved`` array of a
-:c:type:`struct v4l2_audio` structure and call the ``VIDIOC_S_AUDIO``
+:c:type:`struct v4l2_audio` structure and call the :ref:`VIDIOC_S_AUDIO <VIDIOC_G_AUDIO>`
 ioctl. Drivers may switch to a different audio mode if the request
 cannot be satisfied. However, this is a write-only ioctl, it does not
 return the actual new audio mode.
@@ -90,7 +90,7 @@ return the actual new audio mode.
        -  ``mode``
 
        -  Audio mode flags set by drivers and applications (on
-          ``VIDIOC_S_AUDIO`` ioctl), see :ref:`audio-mode`.
+          :ref:`VIDIOC_S_AUDIO <VIDIOC_G_AUDIO>` ioctl), see :ref:`audio-mode`.
 
     -  .. row 5
 
Documentation/linux_tv/media/v4l/vidioc-g-crop.rst +5 -5
index e66f8c213535..0a9ede92bc9f 100644
@@ -36,13 +36,13 @@ Description
 
 To query the cropping rectangle size and position applications set the
 ``type`` field of a :c:type:`struct v4l2_crop` structure to the
-respective buffer (stream) type and call the ``VIDIOC_G_CROP`` ioctl
+respective buffer (stream) type and call the :ref:`VIDIOC_G_CROP` ioctl
 with a pointer to this structure. The driver fills the rest of the
 structure or returns the EINVAL error code if cropping is not supported.
 
 To change the cropping rectangle applications initialize the ``type``
 and struct :ref:`v4l2_rect <v4l2-rect>` substructure named ``c`` of a
-v4l2_crop structure and call the ``VIDIOC_S_CROP`` ioctl with a pointer
+v4l2_crop structure and call the :ref:`VIDIOC_S_CROP <VIDIOC_G_CROP>` ioctl with a pointer
 to this structure.
 
 Do not use the multiplanar buffer types. Use
@@ -64,15 +64,15 @@ the closest size possible while maintaining the current horizontal and
 vertical scaling factor.
 
 Finally the driver programs the hardware with the actual cropping and
-image parameters. ``VIDIOC_S_CROP`` is a write-only ioctl, it does not
+image parameters. :ref:`VIDIOC_S_CROP <VIDIOC_G_CROP>` is a write-only ioctl, it does not
 return the actual parameters. To query them applications must call
-``VIDIOC_G_CROP`` and :ref:`VIDIOC_G_FMT`. When the
+:ref:`VIDIOC_G_CROP` and :ref:`VIDIOC_G_FMT`. When the
 parameters are unsuitable the application may modify the cropping or
 image parameters and repeat the cycle until satisfactory parameters have
 been negotiated.
 
 When cropping is not supported then no parameters are changed and
-``VIDIOC_S_CROP`` returns the EINVAL error code.
+:ref:`VIDIOC_S_CROP <VIDIOC_G_CROP>` returns the EINVAL error code.
 
 
 .. _v4l2-crop:
Documentation/linux_tv/media/v4l/vidioc-g-ctrl.rst +3 -3
index 2c2677a76462..41561c5e444d 100644
@@ -34,15 +34,15 @@ Description
 
 To get the current value of a control applications initialize the ``id``
 field of a struct :c:type:`struct v4l2_control` and call the
-``VIDIOC_G_CTRL`` ioctl with a pointer to this structure. To change the
+:ref:`VIDIOC_G_CTRL` ioctl with a pointer to this structure. To change the
 value of a control applications initialize the ``id`` and ``value``
 fields of a struct :c:type:`struct v4l2_control` and call the
-``VIDIOC_S_CTRL`` ioctl.
+:ref:`VIDIOC_S_CTRL <VIDIOC_G_CTRL>` ioctl.
 
 When the ``id`` is invalid drivers return an EINVAL error code. When the
 ``value`` is out of bounds drivers can choose to take the closest valid
 value or return an ERANGE error code, whatever seems more appropriate.
-However, ``VIDIOC_S_CTRL`` is a write-only ioctl, it does not return the
+However, :ref:`VIDIOC_S_CTRL <VIDIOC_G_CTRL>` is a write-only ioctl, it does not return the
 actual new value. If the ``value`` is inappropriate for the control
 (e.g. if it refers to an unsupported menu index of a menu control), then
 EINVAL error code is returned as well.
Documentation/linux_tv/media/v4l/vidioc-g-dv-timings.rst +3 -3
index 8a7fa1c0facf..cc7cf06e74ee 100644
@@ -36,8 +36,8 @@ Description
 ===========
 
 To set DV timings for the input or output, applications use the
-``VIDIOC_S_DV_TIMINGS`` ioctl and to get the current timings,
-applications use the ``VIDIOC_G_DV_TIMINGS`` ioctl. The detailed timing
+:ref:`VIDIOC_S_DV_TIMINGS <VIDIOC_G_DV_TIMINGS>` ioctl and to get the current timings,
+applications use the :ref:`VIDIOC_G_DV_TIMINGS` ioctl. The detailed timing
 information is filled in using the structure struct
 :ref:`v4l2_dv_timings <v4l2-dv-timings>`. These ioctls take a
 pointer to the struct :ref:`v4l2_dv_timings <v4l2-dv-timings>`
@@ -59,7 +59,7 @@ appropriately. The generic error codes are described at the
 :ref:`Generic Error Codes <gen-errors>` chapter.
 
 EINVAL
-    This ioctl is not supported, or the ``VIDIOC_S_DV_TIMINGS``
+    This ioctl is not supported, or the :ref:`VIDIOC_S_DV_TIMINGS <VIDIOC_G_DV_TIMINGS>`
     parameter was unsuitable.
 
 ENODATA
Documentation/linux_tv/media/v4l/vidioc-g-edid.rst +2 -2
index 0bd8f1ba84d2..a1311a52b8fa 100644
@@ -52,7 +52,7 @@ value, then the EINVAL error code will be returned.
 
 To get the EDID data the application has to fill in the ``pad``,
 ``start_block``, ``blocks`` and ``edid`` fields, zero the ``reserved``
-array and call ``VIDIOC_G_EDID``. The current EDID from block
+array and call :ref:`VIDIOC_G_EDID`. The current EDID from block
 ``start_block`` and of size ``blocks`` will be placed in the memory
 ``edid`` points to. The ``edid`` pointer must point to memory at least
 ``blocks`` * 128 bytes large (the size of one block is 128 bytes).
@@ -65,7 +65,7 @@ If blocks have to be retrieved from the sink, then this call will block
 until they have been read.
 
 If ``start_block`` and ``blocks`` are both set to 0 when
-``VIDIOC_G_EDID`` is called, then the driver will set ``blocks`` to the
+:ref:`VIDIOC_G_EDID` is called, then the driver will set ``blocks`` to the
 total number of available EDID blocks and it will return 0 without
 copying any data. This is an easy way to discover how many EDID blocks
 there are. Note that if there are no EDID blocks available at all, then
Documentation/linux_tv/media/v4l/vidioc-g-enc-index.rst +3 -3
index 68af83d964f6..77c7eff9732d 100644
@@ -31,19 +31,19 @@ Arguments
 Description
 ===========
 
-The ``VIDIOC_G_ENC_INDEX`` ioctl provides meta data about a compressed
+The :ref:`VIDIOC_G_ENC_INDEX` ioctl provides meta data about a compressed
 video stream the same or another application currently reads from the
 driver, which is useful for random access into the stream without
 decoding it.
 
-To read the data applications must call ``VIDIOC_G_ENC_INDEX`` with a
+To read the data applications must call :ref:`VIDIOC_G_ENC_INDEX` with a
 pointer to a struct :ref:`v4l2_enc_idx <v4l2-enc-idx>`. On success
 the driver fills the ``entry`` array, stores the number of elements
 written in the ``entries`` field, and initializes the ``entries_cap``
 field.
 
 Each element of the ``entry`` array contains meta data about one
-picture. A ``VIDIOC_G_ENC_INDEX`` call reads up to
+picture. A :ref:`VIDIOC_G_ENC_INDEX` call reads up to
 ``V4L2_ENC_IDX_ENTRIES`` entries from a driver buffer, which can hold up
 to ``entries_cap`` entries. This number can be lower or higher than
 ``V4L2_ENC_IDX_ENTRIES``, but not zero. When the application fails to
Documentation/linux_tv/media/v4l/vidioc-g-ext-ctrls.rst +10 -10
index cebaa6ea1ba9..fb62cd0a991c 100644
@@ -48,7 +48,7 @@ by the ``controls`` fields.
 To get the current value of a set of controls applications initialize
 the ``id``, ``size`` and ``reserved2`` fields of each struct
 :ref:`v4l2_ext_control <v4l2-ext-control>` and call the
-``VIDIOC_G_EXT_CTRLS`` ioctl. String controls controls must also set the
+:ref:`VIDIOC_G_EXT_CTRLS` ioctl. String controls controls must also set the
 ``string`` field. Controls of compound types
 (``V4L2_CTRL_FLAG_HAS_PAYLOAD`` is set) must set the ``ptr`` field.
 
@@ -70,14 +70,14 @@ by calling :ref:`VIDIOC_QUERY_EXT_CTRL <VIDIOC_QUERYCTRL>`.
 To change the value of a set of controls applications initialize the
 ``id``, ``size``, ``reserved2`` and ``value/value64/string/ptr`` fields
 of each struct :ref:`v4l2_ext_control <v4l2-ext-control>` and call
-the ``VIDIOC_S_EXT_CTRLS`` ioctl. The controls will only be set if *all*
+the :ref:`VIDIOC_S_EXT_CTRLS <VIDIOC_G_EXT_CTRLS>` ioctl. The controls will only be set if *all*
 control values are valid.
 
 To check if a set of controls have correct values applications
 initialize the ``id``, ``size``, ``reserved2`` and
 ``value/value64/string/ptr`` fields of each struct
 :ref:`v4l2_ext_control <v4l2-ext-control>` and call the
-``VIDIOC_TRY_EXT_CTRLS`` ioctl. It is up to the driver whether wrong
+:ref:`VIDIOC_TRY_EXT_CTRLS <VIDIOC_G_EXT_CTRLS>` ioctl. It is up to the driver whether wrong
 values are automatically adjusted to a valid value or if an error is
 returned.
 
@@ -122,7 +122,7 @@ still cause this situation.
        -  The total size in bytes of the payload of this control. This is
           normally 0, but for pointer controls this should be set to the
           size of the memory containing the payload, or that will receive
-          the payload. If ``VIDIOC_G_EXT_CTRLS`` finds that this value is
+          the payload. If :ref:`VIDIOC_G_EXT_CTRLS` finds that this value is
           less than is required to store the payload result, then it is set
           to a value large enough to store the payload result and ENOSPC is
           returned. Note that for string controls this ``size`` field should
@@ -248,7 +248,7 @@ still cause this situation.
           handling controls will also accept a value of 0 here, meaning that
           the controls can belong to any control class. Whether drivers
           support this can be tested by setting ``ctrl_class`` to 0 and
-          calling ``VIDIOC_TRY_EXT_CTRLS`` with a ``count`` of 0. If that
+          calling :ref:`VIDIOC_TRY_EXT_CTRLS <VIDIOC_G_EXT_CTRLS>` with a ``count`` of 0. If that
           succeeds, then the driver supports this feature.
 
     -  .. row 3
@@ -321,14 +321,14 @@ still cause this situation.
           ``error_idx-1`` were read or written correctly, and the state of
           the remaining controls is undefined.
 
-          Since ``VIDIOC_TRY_EXT_CTRLS`` does not access hardware there is
+          Since :ref:`VIDIOC_TRY_EXT_CTRLS <VIDIOC_G_EXT_CTRLS>` does not access hardware there is
           also no need to handle the validation step in this special way, so
           ``error_idx`` will just be set to the control that failed the
           validation step instead of to ``count``. This means that if
-          ``VIDIOC_S_EXT_CTRLS`` fails with ``error_idx`` set to ``count``,
-          then you can call ``VIDIOC_TRY_EXT_CTRLS`` to try to discover the
+          :ref:`VIDIOC_S_EXT_CTRLS <VIDIOC_G_EXT_CTRLS>` fails with ``error_idx`` set to ``count``,
+          then you can call :ref:`VIDIOC_TRY_EXT_CTRLS <VIDIOC_G_EXT_CTRLS>` to try to discover the
           actual control that failed the validation step. Unfortunately,
-          there is no ``TRY`` equivalent for ``VIDIOC_G_EXT_CTRLS``.
+          there is no ``TRY`` equivalent for :ref:`VIDIOC_G_EXT_CTRLS`.
 
     -  .. row 6
 
@@ -467,7 +467,7 @@ EINVAL
     :ref:`v4l2_ext_control <v4l2-ext-control>` ``value`` was
     inappropriate (e.g. the given menu index is not supported by the
     driver). This error code is also returned by the
-    ``VIDIOC_S_EXT_CTRLS`` and ``VIDIOC_TRY_EXT_CTRLS`` ioctls if two or
+    :ref:`VIDIOC_S_EXT_CTRLS <VIDIOC_G_EXT_CTRLS>` and :ref:`VIDIOC_TRY_EXT_CTRLS <VIDIOC_G_EXT_CTRLS>` ioctls if two or
     more control values are in conflict.
 
 ERANGE
Documentation/linux_tv/media/v4l/vidioc-g-fbuf.rst +8 -8
index 0d9b6972bc44..e622e2f2435c 100644
@@ -34,7 +34,7 @@ Arguments
 Description
 ===========
 
-Applications can use the ``VIDIOC_G_FBUF`` and ``VIDIOC_S_FBUF`` ioctl
+Applications can use the :ref:`VIDIOC_G_FBUF` and :ref:`VIDIOC_S_FBUF <VIDIOC_G_FBUF>` ioctl
 to get and set the framebuffer parameters for a
 :ref:`Video Overlay <overlay>` or :ref:`Video Output Overlay <osd>`
 (OSD). The type of overlay is implied by the device type (capture or
@@ -48,7 +48,7 @@ of a graphics card. A non-destructive overlay blends video images into a
 VGA signal or graphics into a video signal. *Video Output Overlays* are
 always non-destructive.
 
-To get the current parameters applications call the ``VIDIOC_G_FBUF``
+To get the current parameters applications call the :ref:`VIDIOC_G_FBUF`
 ioctl with a pointer to a :c:type:`struct v4l2_framebuffer`
 structure. The driver fills all fields of the structure or returns an
 EINVAL error code when overlays are not supported.
@@ -57,15 +57,15 @@ To set the parameters for a *Video Output Overlay*, applications must
 initialize the ``flags`` field of a struct
 :c:type:`struct v4l2_framebuffer`. Since the framebuffer is
 implemented on the TV card all other parameters are determined by the
-driver. When an application calls ``VIDIOC_S_FBUF`` with a pointer to
+driver. When an application calls :ref:`VIDIOC_S_FBUF <VIDIOC_G_FBUF>` with a pointer to
 this structure, the driver prepares for the overlay and returns the
-framebuffer parameters as ``VIDIOC_G_FBUF`` does, or it returns an error
+framebuffer parameters as :ref:`VIDIOC_G_FBUF` does, or it returns an error
 code.
 
 To set the parameters for a *non-destructive Video Overlay*,
 applications must initialize the ``flags`` field, the ``fmt``
-substructure, and call ``VIDIOC_S_FBUF``. Again the driver prepares for
-the overlay and returns the framebuffer parameters as ``VIDIOC_G_FBUF``
+substructure, and call :ref:`VIDIOC_S_FBUF <VIDIOC_G_FBUF>`. Again the driver prepares for
+the overlay and returns the framebuffer parameters as :ref:`VIDIOC_G_FBUF`
 does, or it returns an error code.
 
 For a *destructive Video Overlay* applications must additionally provide
@@ -486,11 +486,11 @@ appropriately. The generic error codes are described at the
 :ref:`Generic Error Codes <gen-errors>` chapter.
 
 EPERM
-    ``VIDIOC_S_FBUF`` can only be called by a privileged user to
+    :ref:`VIDIOC_S_FBUF <VIDIOC_G_FBUF>` can only be called by a privileged user to
     negotiate the parameters for a destructive overlay.
 
 EINVAL
-    The ``VIDIOC_S_FBUF`` parameters are unsuitable.
+    The :ref:`VIDIOC_S_FBUF <VIDIOC_G_FBUF>` parameters are unsuitable.
 
 .. [1]
    A physical base address may not suit all platforms. GK notes in
Documentation/linux_tv/media/v4l/vidioc-g-fmt.rst +9 -9
index 1d392e6c538d..8c07fe2454e2 100644
@@ -41,7 +41,7 @@ struct :c:type:`struct v4l2_format` to the respective buffer (stream)
 type. For example video capture devices use
 ``V4L2_BUF_TYPE_VIDEO_CAPTURE`` or
 ``V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE``. When the application calls the
-``VIDIOC_G_FMT`` ioctl with a pointer to this structure the driver fills
+:ref:`VIDIOC_G_FMT` ioctl with a pointer to this structure the driver fills
 the respective member of the ``fmt`` union. In case of video capture
 devices that is either the struct
 :ref:`v4l2_pix_format <v4l2-pix-format>` ``pix`` or the struct
@@ -54,32 +54,32 @@ To change the current format parameters applications initialize the
 For details see the documentation of the various devices types in
 :ref:`devices`. Good practice is to query the current parameters
 first, and to modify only those parameters not suitable for the
-application. When the application calls the ``VIDIOC_S_FMT`` ioctl with
+application. When the application calls the :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl with
 a pointer to a :c:type:`struct v4l2_format` structure the driver
 checks and adjusts the parameters against hardware abilities. Drivers
 should not return an error code unless the ``type`` field is invalid,
 this is a mechanism to fathom device capabilities and to approach
 parameters acceptable for both the application and driver. On success
 the driver may program the hardware, allocate resources and generally
-prepare for data exchange. Finally the ``VIDIOC_S_FMT`` ioctl returns
-the current format parameters as ``VIDIOC_G_FMT`` does. Very simple,
+prepare for data exchange. Finally the :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl returns
+the current format parameters as :ref:`VIDIOC_G_FMT` does. Very simple,
 inflexible devices may even ignore all input and always return the
 default parameters. However all V4L2 devices exchanging data with the
-application must implement the ``VIDIOC_G_FMT`` and ``VIDIOC_S_FMT``
+application must implement the :ref:`VIDIOC_G_FMT` and :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>`
 ioctl. When the requested buffer type is not supported drivers return an
-EINVAL error code on a ``VIDIOC_S_FMT`` attempt. When I/O is already in
+EINVAL error code on a :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` attempt. When I/O is already in
 progress or the resource is not available for other reasons drivers
 return the EBUSY error code.
 
-The ``VIDIOC_TRY_FMT`` ioctl is equivalent to ``VIDIOC_S_FMT`` with one
+The :ref:`VIDIOC_TRY_FMT <VIDIOC_G_FMT>` ioctl is equivalent to :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` with one
 exception: it does not change driver state. It can also be called at any
 time, never returning EBUSY. This function is provided to negotiate
 parameters, to learn about hardware limitations, without disabling I/O
 or possibly time consuming hardware preparations. Although strongly
 recommended drivers are not required to implement this ioctl.
 
-The format as returned by ``VIDIOC_TRY_FMT`` must be identical to what
-``VIDIOC_S_FMT`` returns for the same input or output.
+The format as returned by :ref:`VIDIOC_TRY_FMT <VIDIOC_G_FMT>` must be identical to what
+:ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` returns for the same input or output.
 
 
 .. _v4l2-format:
Documentation/linux_tv/media/v4l/vidioc-g-frequency.rst +3 -3
index ce247577c3a0..19a5ae9c4bcd 100644
@@ -39,15 +39,15 @@ the ``tuner`` field of a struct
 :ref:`v4l2_frequency <v4l2-frequency>` to the respective tuner or
 modulator number (only input devices have tuners, only output devices
 have modulators), zero out the ``reserved`` array and call the
-``VIDIOC_G_FREQUENCY`` ioctl with a pointer to this structure. The
+:ref:`VIDIOC_G_FREQUENCY` ioctl with a pointer to this structure. The
 driver stores the current frequency in the ``frequency`` field.
 
 To change the current tuner or modulator radio frequency applications
 initialize the ``tuner``, ``type`` and ``frequency`` fields, and the
 ``reserved`` array of a struct :ref:`v4l2_frequency <v4l2-frequency>`
-and call the ``VIDIOC_S_FREQUENCY`` ioctl with a pointer to this
+and call the :ref:`VIDIOC_S_FREQUENCY <VIDIOC_G_FREQUENCY>` ioctl with a pointer to this
 structure. When the requested frequency is not possible the driver
-assumes the closest possible value. However ``VIDIOC_S_FREQUENCY`` is a
+assumes the closest possible value. However :ref:`VIDIOC_S_FREQUENCY <VIDIOC_G_FREQUENCY>` is a
 write-only ioctl, it does not return the actual new frequency.
 
 
Documentation/linux_tv/media/v4l/vidioc-g-input.rst +2 -2
index d0abf6231b7d..2bcaa324aa33 100644
@@ -33,13 +33,13 @@ Description
 ===========
 
 To query the current video input applications call the
-``VIDIOC_G_INPUT`` ioctl with a pointer to an integer where the driver
+:ref:`VIDIOC_G_INPUT` ioctl with a pointer to an integer where the driver
 stores the number of the input, as in the struct
 :ref:`v4l2_input <v4l2-input>` ``index`` field. This ioctl will fail
 only when there are no video inputs, returning EINVAL.
 
 To select a video input applications store the number of the desired
-input in an integer and call the ``VIDIOC_S_INPUT`` ioctl with a pointer
+input in an integer and call the :ref:`VIDIOC_S_INPUT <VIDIOC_G_INPUT>` ioctl with a pointer
 to this integer. Side effects are possible. For example inputs may
 support different video standards, so the driver may implicitly switch
 the current standard. Because of these possible side effects
Documentation/linux_tv/media/v4l/vidioc-g-modulator.rst +4 -4
index 4399a13f94c1..83e761eaef2b 100644
@@ -37,7 +37,7 @@ Description
 To query the attributes of a modulator applications initialize the
 ``index`` field and zero out the ``reserved`` array of a struct
 :ref:`v4l2_modulator <v4l2-modulator>` and call the
-``VIDIOC_G_MODULATOR`` ioctl with a pointer to this structure. Drivers
+:ref:`VIDIOC_G_MODULATOR` ioctl with a pointer to this structure. Drivers
 fill the rest of the structure or return an EINVAL error code when the
 index is out of bounds. To enumerate all modulators applications shall
 begin at index zero, incrementing by one until the driver returns
@@ -46,7 +46,7 @@ EINVAL.
 Modulators have two writable properties, an audio modulation set and the
 radio frequency. To change the modulated audio subprograms, applications
 initialize the ``index`` and ``txsubchans`` fields and the ``reserved``
-array and call the ``VIDIOC_S_MODULATOR`` ioctl. Drivers may choose a
+array and call the :ref:`VIDIOC_S_MODULATOR <VIDIOC_G_MODULATOR>` ioctl. Drivers may choose a
 different audio modulation if the request cannot be satisfied. However
 this is a write-only ioctl, it does not return the actual audio
 modulation selected.
@@ -198,7 +198,7 @@ To change the radio frequency the
           ``V4L2_TUNER_SUB_MONO``, ``V4L2_TUNER_SUB_STEREO`` or
           ``V4L2_TUNER_SUB_SAP``. If the hardware does not support the
           respective audio matrix, or the current video standard does not
-          permit bilingual audio the ``VIDIOC_S_MODULATOR`` ioctl shall
+          permit bilingual audio the :ref:`VIDIOC_S_MODULATOR <VIDIOC_G_MODULATOR>` ioctl shall
           return an EINVAL error code and the driver shall fall back to mono
           or stereo mode.
 
@@ -230,7 +230,7 @@ To change the radio frequency the
           ``V4L2_TUNER_SUB_MONO`` or ``V4L2_TUNER_SUB_STEREO``. If the
           hardware does not support the respective audio matrix, or the
           current video standard does not permit SAP the
-          ``VIDIOC_S_MODULATOR`` ioctl shall return an EINVAL error code and
+          :ref:`VIDIOC_S_MODULATOR <VIDIOC_G_MODULATOR>` ioctl shall return an EINVAL error code and
           driver shall fall back to mono or stereo mode.
 
     -  .. row 6
Documentation/linux_tv/media/v4l/vidioc-g-output.rst +2 -2
index a38d6a118cf4..ebed04ae48da 100644
@@ -33,14 +33,14 @@ Description
 ===========
 
 To query the current video output applications call the
-``VIDIOC_G_OUTPUT`` ioctl with a pointer to an integer where the driver
+:ref:`VIDIOC_G_OUTPUT` ioctl with a pointer to an integer where the driver
 stores the number of the output, as in the struct
 :ref:`v4l2_output <v4l2-output>` ``index`` field. This ioctl will
 fail only when there are no video outputs, returning the EINVAL error
 code.
 
 To select a video output applications store the number of the desired
-output in an integer and call the ``VIDIOC_S_OUTPUT`` ioctl with a
+output in an integer and call the :ref:`VIDIOC_S_OUTPUT <VIDIOC_G_OUTPUT>` ioctl with a
 pointer to this integer. Side effects are possible. For example outputs
 may support different video standards, so the driver may implicitly
 switch the current standard. standard. Because of these possible side
Documentation/linux_tv/media/v4l/vidioc-g-parm.rst +1 -1
index 07432d386356..906faaa85bfa 100644
@@ -44,7 +44,7 @@ internally by a driver in read/write mode. For implications see the
 section discussing the :ref:`read() <func-read>` function.
 
 To get and set the streaming parameters applications call the
-``VIDIOC_G_PARM`` and ``VIDIOC_S_PARM`` ioctl, respectively. They take a
+:ref:`VIDIOC_G_PARM` and :ref:`VIDIOC_S_PARM <VIDIOC_G_PARM>` ioctl, respectively. They take a
 pointer to a struct :c:type:`struct v4l2_streamparm` which contains a
 union holding separate parameters for input and output devices.
 
Documentation/linux_tv/media/v4l/vidioc-g-priority.rst +2 -2
index ee80c9e0c7d4..db95647d3a80 100644
@@ -36,11 +36,11 @@ Description
 ===========
 
 To query the current access priority applications call the
-``VIDIOC_G_PRIORITY`` ioctl with a pointer to an enum v4l2_priority
+:ref:`VIDIOC_G_PRIORITY` ioctl with a pointer to an enum v4l2_priority
 variable where the driver stores the current priority.
 
 To request an access priority applications store the desired priority in
-an enum v4l2_priority variable and call ``VIDIOC_S_PRIORITY`` ioctl
+an enum v4l2_priority variable and call :ref:`VIDIOC_S_PRIORITY <VIDIOC_G_PRIORITY>` ioctl
 with a pointer to this variable.
 
 
Documentation/linux_tv/media/v4l/vidioc-g-sliced-vbi-cap.rst +1 -1
index 8c86d2b41a5b..635cb9b2c250 100644
@@ -34,7 +34,7 @@ Description
 To find out which data services are supported by a sliced VBI capture or
 output device, applications initialize the ``type`` field of a struct
 :ref:`v4l2_sliced_vbi_cap <v4l2-sliced-vbi-cap>`, clear the
-``reserved`` array and call the ``VIDIOC_G_SLICED_VBI_CAP`` ioctl. The
+``reserved`` array and call the :ref:`VIDIOC_G_SLICED_VBI_CAP` ioctl. The
 driver fills in the remaining fields or returns an EINVAL error code if
 the sliced VBI API is unsupported or ``type`` is invalid.
 
Documentation/linux_tv/media/v4l/vidioc-g-std.rst +5 -5
index fa9da29e0657..bc8e071401b0 100644
@@ -35,15 +35,15 @@ Description
 ===========
 
 To query and select the current video standard applications use the
-``VIDIOC_G_STD`` and ``VIDIOC_S_STD`` ioctls which take a pointer to a
-:ref:`v4l2_std_id <v4l2-std-id>` type as argument. ``VIDIOC_G_STD``
+:ref:`VIDIOC_G_STD` and :ref:`VIDIOC_S_STD <VIDIOC_G_STD>` ioctls which take a pointer to a
+:ref:`v4l2_std_id <v4l2-std-id>` type as argument. :ref:`VIDIOC_G_STD`
 can return a single flag or a set of flags as in struct
 :ref:`v4l2_standard <v4l2-standard>` field ``id``. The flags must be
 unambiguous such that they appear in only one enumerated
 :c:type:`struct v4l2_standard` structure.
 
-``VIDIOC_S_STD`` accepts one or more flags, being a write-only ioctl it
-does not return the actual new standard as ``VIDIOC_G_STD`` does. When
+:ref:`VIDIOC_S_STD <VIDIOC_G_STD>` accepts one or more flags, being a write-only ioctl it
+does not return the actual new standard as :ref:`VIDIOC_G_STD` does. When
 no flags are given or the current input does not support the requested
 standard the driver returns an EINVAL error code. When the standard set
 is ambiguous drivers may return EINVAL or choose any of the requested
@@ -61,7 +61,7 @@ appropriately. The generic error codes are described at the
 :ref:`Generic Error Codes <gen-errors>` chapter.
 
 EINVAL
-    The ``VIDIOC_S_STD`` parameter was unsuitable.
+    The :ref:`VIDIOC_S_STD <VIDIOC_G_STD>` parameter was unsuitable.
 
 ENODATA
     Standard video timings are not supported for this input or output.
Documentation/linux_tv/media/v4l/vidioc-overlay.rst +1 -1
index fe9084147b93..10faf2517392 100644
@@ -32,7 +32,7 @@ Description
 ===========
 
 This ioctl is part of the :ref:`video overlay <overlay>` I/O method.
-Applications call ``VIDIOC_OVERLAY`` to start or stop the overlay. It
+Applications call :ref:`VIDIOC_OVERLAY` to start or stop the overlay. It
 takes a pointer to an integer which must be set to zero by the
 application to stop overlay, to one to start.
 
Documentation/linux_tv/media/v4l/vidioc-prepare-buf.rst +2 -2
index fb3ac38b3db2..0b51c587701b 100644
@@ -31,9 +31,9 @@ Arguments
 Description
 ===========
 
-Applications can optionally call the ``VIDIOC_PREPARE_BUF`` ioctl to
+Applications can optionally call the :ref:`VIDIOC_PREPARE_BUF` ioctl to
 pass ownership of the buffer to the driver before actually enqueuing it,
-using the ``VIDIOC_QBUF`` ioctl, and to prepare it for future I/O. Such
+using the :ref:`VIDIOC_QBUF` ioctl, and to prepare it for future I/O. Such
 preparations may include cache invalidation or cleaning. Performing them
 in advance saves time during the actual I/O. In case such cache
 operations are not required, the application can use one of
Documentation/linux_tv/media/v4l/vidioc-query-dv-timings.rst +3 -3
index ba78f7e5bbe8..0120432de989 100644
@@ -34,18 +34,18 @@ Description
 
 The hardware may be able to detect the current DV timings automatically,
 similar to sensing the video standard. To do so, applications call
-``VIDIOC_QUERY_DV_TIMINGS`` with a pointer to a struct
+:ref:`VIDIOC_QUERY_DV_TIMINGS` with a pointer to a struct
 :ref:`v4l2_dv_timings <v4l2-dv-timings>`. Once the hardware detects
 the timings, it will fill in the timings structure.
 
 Please note that drivers shall *not* switch timings automatically if new
 timings are detected. Instead, drivers should send the
 ``V4L2_EVENT_SOURCE_CHANGE`` event (if they support this) and expect
-that userspace will take action by calling ``VIDIOC_QUERY_DV_TIMINGS``.
+that userspace will take action by calling :ref:`VIDIOC_QUERY_DV_TIMINGS`.
 The reason is that new timings usually mean different buffer sizes as
 well, and you cannot change buffer sizes on the fly. In general,
 applications that receive the Source Change event will have to call
-``VIDIOC_QUERY_DV_TIMINGS``, and if the detected timings are valid they
+:ref:`VIDIOC_QUERY_DV_TIMINGS`, and if the detected timings are valid they
 will have to stop streaming, set the new timings, allocate new buffers
 and start streaming again.
 
Documentation/linux_tv/media/v4l/vidioc-querybuf.rst +1 -1
index 744cd9da45a3..280fb795c0b9 100644
@@ -48,7 +48,7 @@ using the :ref:`multi-planar API <planar-apis>`, the ``m.planes``
 field must contain a userspace pointer to an array of struct
 :ref:`v4l2_plane <v4l2-plane>` and the ``length`` field has to be set
 to the number of elements in that array. After calling
-``VIDIOC_QUERYBUF`` with a pointer to this structure drivers return an
+:ref:`VIDIOC_QUERYBUF` with a pointer to this structure drivers return an
 error code or fill the rest of the structure.
 
 In the ``flags`` field the ``V4L2_BUF_FLAG_MAPPED``,
Documentation/linux_tv/media/v4l/vidioc-querystd.rst +3 -3
index 1d825fff9d15..29ce879a708b 100644
@@ -32,7 +32,7 @@ Description
 ===========
 
 The hardware may be able to detect the current video standard
-automatically. To do so, applications call ``VIDIOC_QUERYSTD`` with a
+automatically. To do so, applications call :ref:`VIDIOC_QUERYSTD` with a
 pointer to a :ref:`v4l2_std_id <v4l2-std-id>` type. The driver
 stores here a set of candidates, this can be a single flag or a set of
 supported standards if for example the hardware can only distinguish
@@ -45,10 +45,10 @@ Please note that drivers shall *not* switch the video standard
 automatically if a new video standard is detected. Instead, drivers
 should send the ``V4L2_EVENT_SOURCE_CHANGE`` event (if they support
 this) and expect that userspace will take action by calling
-``VIDIOC_QUERYSTD``. The reason is that a new video standard can mean
+:ref:`VIDIOC_QUERYSTD`. The reason is that a new video standard can mean
 different buffer sizes as well, and you cannot change buffer sizes on
 the fly. In general, applications that receive the Source Change event
-will have to call ``VIDIOC_QUERYSTD``, and if the detected video
+will have to call :ref:`VIDIOC_QUERYSTD`, and if the detected video
 standard is valid they will have to stop streaming, set the new
 standard, allocate new buffers and start streaming again.
 
Documentation/linux_tv/media/v4l/vidioc-reqbufs.rst +1 -1
index c17d3b0465d6..451cf7b11c3d 100644
@@ -58,7 +58,7 @@ buffers, one displayed and one filled by the application.
 When the I/O method is not supported the ioctl returns an EINVAL error
 code.
 
-Applications can call ``VIDIOC_REQBUFS`` again to change the number of
+Applications can call :ref:`VIDIOC_REQBUFS` again to change the number of
 buffers, however this cannot succeed when any buffers are still mapped.
 A ``count`` value of zero frees all buffers, after aborting or finishing
 any DMA in progress, an implicit
Documentation/linux_tv/media/v4l/vidioc-subdev-enum-frame-interval.rst +1 -1
index ab1368786038..07ad0a98ead2 100644
@@ -44,7 +44,7 @@ when enumerating frame intervals.
 To enumerate frame intervals applications initialize the ``index``,
 ``pad``, ``which``, ``code``, ``width`` and ``height`` fields of struct
 :ref:`v4l2_subdev_frame_interval_enum <v4l2-subdev-frame-interval-enum>`
-and call the ``VIDIOC_SUBDEV_ENUM_FRAME_INTERVAL`` ioctl with a pointer
+and call the :ref:`VIDIOC_SUBDEV_ENUM_FRAME_INTERVAL` ioctl with a pointer
 to this structure. Drivers fill the rest of the structure or return an
 EINVAL error code if one of the input fields is invalid. All frame
 intervals are enumerable by beginning at index zero and incrementing by
Documentation/linux_tv/media/v4l/vidioc-subdev-enum-frame-size.rst +1 -1
index e08de6040757..39393ef11590 100644
@@ -40,7 +40,7 @@ ioctl.
 To enumerate frame sizes applications initialize the ``pad``, ``which``
 , ``code`` and ``index`` fields of the struct
 :ref:`v4l2_subdev_mbus_code_enum <v4l2-subdev-mbus-code-enum>` and
-call the ``VIDIOC_SUBDEV_ENUM_FRAME_SIZE`` ioctl with a pointer to the
+call the :ref:`VIDIOC_SUBDEV_ENUM_FRAME_SIZE` ioctl with a pointer to the
 structure. Drivers fill the minimum and maximum frame sizes or return an
 EINVAL error code if one of the input parameters is invalid.
 
Documentation/linux_tv/media/v4l/vidioc-subdev-enum-mbus-code.rst +1 -1
index 0daf410c1546..f50a1f1c68d5 100644
@@ -35,7 +35,7 @@ To enumerate media bus formats available at a given sub-device pad
 applications initialize the ``pad``, ``which`` and ``index`` fields of
 struct
 :ref:`v4l2_subdev_mbus_code_enum <v4l2-subdev-mbus-code-enum>` and
-call the ``VIDIOC_SUBDEV_ENUM_MBUS_CODE`` ioctl with a pointer to this
+call the :ref:`VIDIOC_SUBDEV_ENUM_MBUS_CODE` ioctl with a pointer to this
 structure. Drivers fill the rest of the structure or return an EINVAL
 error code if either the ``pad`` or ``index`` are invalid. All media bus
 formats are enumerable by beginning at index zero and incrementing by
Signature · 1 line
2.7.4
#14 lore raw

PATCH 14/51 Documentation: linux_tv: don't simplify VIDIOC_G_foo references

In reply to Mauro Carvalho Chehab

As VIDIOC_G_foo is the reference used for VIDIOC_S_foo and VIDIOC_TRY_foo, we need to explicitly name the reference, as otherwise, it will mention the three ioctls altogether, with is not what we want.

---
 Documentation/linux_tv/media/v4l/app-pri.rst       |  2 +-
 Documentation/linux_tv/media/v4l/audio.rst         |  6 ++---
 Documentation/linux_tv/media/v4l/control.rst       |  2 +-
 Documentation/linux_tv/media/v4l/crop.rst          |  4 ++--
 Documentation/linux_tv/media/v4l/dev-capture.rst   | 12 +++++-----
 Documentation/linux_tv/media/v4l/dev-osd.rst       |  6 ++---
 Documentation/linux_tv/media/v4l/dev-output.rst    | 12 +++++-----
 Documentation/linux_tv/media/v4l/dev-overlay.rst   | 12 +++++-----
 Documentation/linux_tv/media/v4l/dev-radio.rst     |  4 ++--
 Documentation/linux_tv/media/v4l/dev-raw-vbi.rst   |  8 +++----
 .../linux_tv/media/v4l/dev-sliced-vbi.rst          |  6 ++---
 Documentation/linux_tv/media/v4l/diff-v4l.rst      | 24 +++++++++----------
 Documentation/linux_tv/media/v4l/dv-timings.rst    |  2 +-
 .../linux_tv/media/v4l/extended-controls.rst       |  4 ++--
 Documentation/linux_tv/media/v4l/format.rst        |  4 ++--
 Documentation/linux_tv/media/v4l/func-read.rst     |  2 +-
 Documentation/linux_tv/media/v4l/hist-v4l2.rst     | 28 +++++++++++-----------
 .../linux_tv/media/v4l/libv4l-introduction.rst     |  2 +-
 Documentation/linux_tv/media/v4l/pixfmt-013.rst    |  2 +-
 Documentation/linux_tv/media/v4l/pixfmt.rst        |  2 +-
 Documentation/linux_tv/media/v4l/planar-apis.rst   |  2 +-
 Documentation/linux_tv/media/v4l/standard.rst      |  4 ++--
 Documentation/linux_tv/media/v4l/streaming-par.rst |  2 +-
 Documentation/linux_tv/media/v4l/tuner.rst         |  8 +++----
 Documentation/linux_tv/media/v4l/video.rst         |  4 ++--
 .../linux_tv/media/v4l/vidioc-create-bufs.rst      |  2 +-
 .../linux_tv/media/v4l/vidioc-enumaudio.rst        |  2 +-
 .../linux_tv/media/v4l/vidioc-enumaudioout.rst     |  2 +-
 .../linux_tv/media/v4l/vidioc-enumstd.rst          |  2 +-
 .../linux_tv/media/v4l/vidioc-g-audio.rst          |  2 +-
 Documentation/linux_tv/media/v4l/vidioc-g-crop.rst |  4 ++--
 Documentation/linux_tv/media/v4l/vidioc-g-ctrl.rst |  4 ++--
 .../linux_tv/media/v4l/vidioc-g-dv-timings.rst     |  2 +-
 Documentation/linux_tv/media/v4l/vidioc-g-edid.rst |  4 ++--
 .../linux_tv/media/v4l/vidioc-g-enc-index.rst      |  6 ++---
 .../linux_tv/media/v4l/vidioc-g-ext-ctrls.rst      |  8 +++----
 Documentation/linux_tv/media/v4l/vidioc-g-fbuf.rst |  8 +++----
 Documentation/linux_tv/media/v4l/vidioc-g-fmt.rst  |  6 ++---
 .../linux_tv/media/v4l/vidioc-g-frequency.rst      |  2 +-
 .../linux_tv/media/v4l/vidioc-g-input.rst          |  2 +-
 .../linux_tv/media/v4l/vidioc-g-modulator.rst      |  2 +-
 .../linux_tv/media/v4l/vidioc-g-output.rst         |  2 +-
 Documentation/linux_tv/media/v4l/vidioc-g-parm.rst |  2 +-
 .../linux_tv/media/v4l/vidioc-g-priority.rst       |  2 +-
 .../linux_tv/media/v4l/vidioc-g-sliced-vbi-cap.rst |  2 +-
 Documentation/linux_tv/media/v4l/vidioc-g-std.rst  |  6 ++---
 .../linux_tv/media/v4l/vidioc-queryctrl.rst        |  2 +-
 47 files changed, 119 insertions(+), 119 deletions(-)
Documentation/linux_tv/media/v4l/app-pri.rst +1 -1
index 4faf9042f612..7ff6f44eb591 100644
@@ -16,7 +16,7 @@ applications and automatically regain control of the device at a later
 time.
 
 Since these features cannot be implemented entirely in user space V4L2
-defines the :ref:`VIDIOC_G_PRIORITY` and
+defines the :ref:`VIDIOC_G_PRIORITY <VIDIOC_G_PRIORITY>` and
 :ref:`VIDIOC_S_PRIORITY <VIDIOC_G_PRIORITY>` ioctls to request and
 query the access priority associate with a file descriptor. Opening a
 device assigns a medium priority, compatible with earlier versions of
Documentation/linux_tv/media/v4l/audio.rst +3 -3
index 21db1b97b83c..8c3314218f75 100644
@@ -33,11 +33,11 @@ The struct :ref:`v4l2_audio <v4l2-audio>` returned by the
 :ref:`VIDIOC_ENUMAUDIO` ioctl also contains signal
 :status information applicable when the current audio input is queried.
 
-The :ref:`VIDIOC_G_AUDIO` and
+The :ref:`VIDIOC_G_AUDIO <VIDIOC_G_AUDIO>` and
 :ref:`VIDIOC_G_AUDOUT <VIDIOC_G_AUDIOout>` ioctls report the current
 audio input and output, respectively. Note that, unlike
-:ref:`VIDIOC_G_INPUT` and
-:ref:`VIDIOC_G_OUTPUT` these ioctls return a
+:ref:`VIDIOC_G_INPUT <VIDIOC_G_INPUT>` and
+:ref:`VIDIOC_G_OUTPUT <VIDIOC_G_OUTPUT>` these ioctls return a
 structure as :ref:`VIDIOC_ENUMAUDIO` and
 :ref:`VIDIOC_ENUMAUDOUT <VIDIOC_ENUMAUDIOout>` do, not just an index.
 
Documentation/linux_tv/media/v4l/control.rst +1 -1
index 02bd455a2616..d6df648767c5 100644
@@ -364,7 +364,7 @@ Control IDs
 Applications can enumerate the available controls with the
 :ref:`VIDIOC_QUERYCTRL` and
 :ref:`VIDIOC_QUERYMENU <VIDIOC_QUERYCTRL>` ioctls, get and set a
-control value with the :ref:`VIDIOC_G_CTRL` and
+control value with the :ref:`VIDIOC_G_CTRL <VIDIOC_G_CTRL>` and
 :ref:`VIDIOC_S_CTRL <VIDIOC_G_CTRL>` ioctls. Drivers must implement
 ``VIDIOC_QUERYCTRL``, ``VIDIOC_G_CTRL`` and ``VIDIOC_S_CTRL`` when the
 device has one or more controls, ``VIDIOC_QUERYMENU`` when it has one or
Documentation/linux_tv/media/v4l/crop.rst +2 -2
index 41a5efaaa679..bfb30568df23 100644
@@ -15,7 +15,7 @@ offset into a video signal.
 Applications can use the following API to select an area in the video
 signal, query the default area and the hardware limits. *Despite their
 name, the :ref:`VIDIOC_CROPCAP`,
-:ref:`VIDIOC_G_CROP` and
+:ref:`VIDIOC_G_CROP <VIDIOC_G_CROP>` and
 :ref:`VIDIOC_S_CROP <VIDIOC_G_CROP>` ioctls apply to input as well
 as output devices.*
 
@@ -23,7 +23,7 @@ Scaling requires a source and a target. On a video capture or overlay
 device the source is the video signal, and the cropping ioctls determine
 the area actually sampled. The target are images read by the application
 or overlaid onto the graphics screen. Their size (and position for an
-overlay) is negotiated with the :ref:`VIDIOC_G_FMT`
+overlay) is negotiated with the :ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>`
 and :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctls.
 
 On a video output device the source are the images passed in by the
Documentation/linux_tv/media/v4l/dev-capture.rst +6 -6
index c970a1fd1439..0e62dc026251 100644
@@ -65,7 +65,7 @@ To query the current image format applications set the ``type`` field of
 a struct :ref:`v4l2_format <v4l2-format>` to
 ``V4L2_BUF_TYPE_VIDEO_CAPTURE`` or
 ``V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE`` and call the
-:ref:`VIDIOC_G_FMT` ioctl with a pointer to this
+:ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>` ioctl with a pointer to this
 structure. Drivers fill the struct
 :ref:`v4l2_pix_format <v4l2-pix-format>` ``pix`` or the struct
 :ref:`v4l2_pix_format_mplane <v4l2-pix-format-mplane>` ``pix_mp``
@@ -75,9 +75,9 @@ To request different parameters applications set the ``type`` field of a
 struct :ref:`v4l2_format <v4l2-format>` as above and initialize all
 fields of the struct :ref:`v4l2_pix_format <v4l2-pix-format>`
 ``vbi`` member of the ``fmt`` union, or better just modify the results
-of :ref:`VIDIOC_G_FMT`, and call the :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>`
+of :ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>`, and call the :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>`
 ioctl with a pointer to this structure. Drivers may adjust the
-parameters and finally return the actual parameters as :ref:`VIDIOC_G_FMT`
+parameters and finally return the actual parameters as :ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>`
 does.
 
 Like :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` the :ref:`VIDIOC_TRY_FMT <VIDIOC_G_FMT>` ioctl
@@ -87,10 +87,10 @@ possibly time consuming hardware preparations.
 The contents of struct :ref:`v4l2_pix_format <v4l2-pix-format>` and
 struct :ref:`v4l2_pix_format_mplane <v4l2-pix-format-mplane>` are
 discussed in :ref:`pixfmt`. See also the specification of the
-:ref:`VIDIOC_G_FMT`, :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` and :ref:`VIDIOC_TRY_FMT <VIDIOC_G_FMT>` ioctls for
-details. Video capture devices must implement both the :ref:`VIDIOC_G_FMT`
+:ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>`, :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` and :ref:`VIDIOC_TRY_FMT <VIDIOC_G_FMT>` ioctls for
+details. Video capture devices must implement both the :ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>`
 and :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl, even if :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ignores all
-requests and always returns default parameters as :ref:`VIDIOC_G_FMT` does.
+requests and always returns default parameters as :ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>` does.
 :ref:`VIDIOC_TRY_FMT <VIDIOC_G_FMT>` is optional.
 
 
Documentation/linux_tv/media/v4l/dev-osd.rst +3 -3
index 4b668a3544b8..f9337001f50d 100644
@@ -36,7 +36,7 @@ Contrary to the *Video Overlay* interface the framebuffer is normally
 implemented on the TV card and not the graphics card. On Linux it is
 accessible as a framebuffer device (``/dev/fbN``). Given a V4L2 device,
 applications can find the corresponding framebuffer device by calling
-the :ref:`VIDIOC_G_FBUF` ioctl. It returns, amongst
+the :ref:`VIDIOC_G_FBUF <VIDIOC_G_FBUF>` ioctl. It returns, amongst
 other information, the physical address of the framebuffer in the
 ``base`` field of struct :ref:`v4l2_framebuffer <v4l2-framebuffer>`.
 The framebuffer device ioctl ``FBIOGET_FSCREENINFO`` returns the same
@@ -115,7 +115,7 @@ clipping/blending method to be used for the overlay. To get the current
 parameters applications set the ``type`` field of a struct
 :ref:`v4l2_format <v4l2-format>` to
 ``V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY`` and call the
-:ref:`VIDIOC_G_FMT` ioctl. The driver fills the
+:ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>` ioctl. The driver fills the
 :c:type:`struct v4l2_window` substructure named ``win``. It is not
 possible to retrieve a previously programmed clipping list or bitmap.
 
@@ -124,7 +124,7 @@ struct :ref:`v4l2_format <v4l2-format>` to
 ``V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY``, initialize the ``win``
 substructure and call the :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl.
 The driver adjusts the parameters against hardware limits and returns
-the actual parameters as :ref:`VIDIOC_G_FMT` does. Like :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>`,
+the actual parameters as :ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>` does. Like :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>`,
 the :ref:`VIDIOC_TRY_FMT <VIDIOC_G_FMT>` ioctl can be used to learn
 about driver capabilities without actually changing driver state. Unlike
 :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` this also works after the overlay has been enabled.
Documentation/linux_tv/media/v4l/dev-output.rst +6 -6
index ee62d1a0fb87..5253498db95a 100644
@@ -62,7 +62,7 @@ defaults. An example is given in :ref:`crop`.
 To query the current image format applications set the ``type`` field of
 a struct :ref:`v4l2_format <v4l2-format>` to
 ``V4L2_BUF_TYPE_VIDEO_OUTPUT`` or ``V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE``
-and call the :ref:`VIDIOC_G_FMT` ioctl with a pointer
+and call the :ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>` ioctl with a pointer
 to this structure. Drivers fill the struct
 :ref:`v4l2_pix_format <v4l2-pix-format>` ``pix`` or the struct
 :ref:`v4l2_pix_format_mplane <v4l2-pix-format-mplane>` ``pix_mp``
@@ -72,9 +72,9 @@ To request different parameters applications set the ``type`` field of a
 struct :ref:`v4l2_format <v4l2-format>` as above and initialize all
 fields of the struct :ref:`v4l2_pix_format <v4l2-pix-format>`
 ``vbi`` member of the ``fmt`` union, or better just modify the results
-of :ref:`VIDIOC_G_FMT`, and call the :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>`
+of :ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>`, and call the :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>`
 ioctl with a pointer to this structure. Drivers may adjust the
-parameters and finally return the actual parameters as :ref:`VIDIOC_G_FMT`
+parameters and finally return the actual parameters as :ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>`
 does.
 
 Like :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` the :ref:`VIDIOC_TRY_FMT <VIDIOC_G_FMT>` ioctl
@@ -84,10 +84,10 @@ possibly time consuming hardware preparations.
 The contents of struct :ref:`v4l2_pix_format <v4l2-pix-format>` and
 struct :ref:`v4l2_pix_format_mplane <v4l2-pix-format-mplane>` are
 discussed in :ref:`pixfmt`. See also the specification of the
-:ref:`VIDIOC_G_FMT`, :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` and :ref:`VIDIOC_TRY_FMT <VIDIOC_G_FMT>` ioctls for
-details. Video output devices must implement both the :ref:`VIDIOC_G_FMT`
+:ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>`, :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` and :ref:`VIDIOC_TRY_FMT <VIDIOC_G_FMT>` ioctls for
+details. Video output devices must implement both the :ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>`
 and :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl, even if :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ignores all
-requests and always returns default parameters as :ref:`VIDIOC_G_FMT` does.
+requests and always returns default parameters as :ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>` does.
 :ref:`VIDIOC_TRY_FMT <VIDIOC_G_FMT>` is optional.
 
 
Documentation/linux_tv/media/v4l/dev-overlay.rst +6 -6
index 26bd4a15a125..083cf07e55c5 100644
@@ -63,7 +63,7 @@ Setup
 Before overlay can commence applications must program the driver with
 frame buffer parameters, namely the address and size of the frame buffer
 and the image format, for example RGB 5:6:5. The
-:ref:`VIDIOC_G_FBUF` and
+:ref:`VIDIOC_G_FBUF <VIDIOC_G_FBUF>` and
 :ref:`VIDIOC_S_FBUF <VIDIOC_G_FBUF>` ioctls are available to get and
 set these parameters, respectively. The :ref:`VIDIOC_S_FBUF <VIDIOC_G_FBUF>` ioctl is
 privileged because it allows to set up DMA into physical memory,
@@ -77,7 +77,7 @@ Some devices add the video overlay to the output signal of the graphics
 card. In this case the frame buffer is not modified by the video device,
 and the frame buffer address and pixel format are not needed by the
 driver. The :ref:`VIDIOC_S_FBUF <VIDIOC_G_FBUF>` ioctl is not privileged. An application
-can check for this type of device by calling the :ref:`VIDIOC_G_FBUF`
+can check for this type of device by calling the :ref:`VIDIOC_G_FBUF <VIDIOC_G_FBUF>`
 ioctl.
 
 A driver may support any (or none) of five clipping/blending methods:
@@ -121,7 +121,7 @@ its position over the graphics surface and the clipping to be applied.
 To get the current parameters applications set the ``type`` field of a
 struct :ref:`v4l2_format <v4l2-format>` to
 ``V4L2_BUF_TYPE_VIDEO_OVERLAY`` and call the
-:ref:`VIDIOC_G_FMT` ioctl. The driver fills the
+:ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>` ioctl. The driver fills the
 :c:type:`struct v4l2_window` substructure named ``win``. It is not
 possible to retrieve a previously programmed clipping list or bitmap.
 
@@ -130,7 +130,7 @@ struct :ref:`v4l2_format <v4l2-format>` to
 ``V4L2_BUF_TYPE_VIDEO_OVERLAY``, initialize the ``win`` substructure and
 call the :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl. The driver
 adjusts the parameters against hardware limits and returns the actual
-parameters as :ref:`VIDIOC_G_FMT` does. Like :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>`, the
+parameters as :ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>` does. Like :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>`, the
 :ref:`VIDIOC_TRY_FMT <VIDIOC_G_FMT>` ioctl can be used to learn
 about driver capabilities without actually changing driver state. Unlike
 :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` this also works after the overlay has been enabled.
@@ -179,7 +179,7 @@ struct v4l2_window
 
 ``struct v4l2_clip * clips``
     When chroma-keying has *not* been negotiated and
-    :ref:`VIDIOC_G_FBUF` indicated this capability,
+    :ref:`VIDIOC_G_FBUF <VIDIOC_G_FBUF>` indicated this capability,
     applications can set this field to point to an array of clipping
     rectangles.
 
@@ -204,7 +204,7 @@ are undefined.
 
 ``void * bitmap``
     When chroma-keying has *not* been negotiated and
-    :ref:`VIDIOC_G_FBUF` indicated this capability,
+    :ref:`VIDIOC_G_FBUF <VIDIOC_G_FBUF>` indicated this capability,
     applications can set this field to point to a clipping bit mask.
 
 It must be of the same size as the window, ``w.width`` and ``w.height``.
Documentation/linux_tv/media/v4l/dev-radio.rst +2 -2
index 7a0d25a143a6..55a56fb5d958 100644
@@ -47,8 +47,8 @@ discussed in :ref:`tuner`) with index number zero to select the radio
 frequency and to determine if a monaural or FM stereo program is
 received/emitted. Drivers switch automatically between AM and FM
 depending on the selected frequency. The
-:ref:`VIDIOC_G_TUNER` or
-:ref:`VIDIOC_G_MODULATOR` ioctl reports the
+:ref:`VIDIOC_G_TUNER <VIDIOC_G_TUNER>` or
+:ref:`VIDIOC_G_MODULATOR <VIDIOC_G_MODULATOR>` ioctl reports the
 supported frequency range.
 
 
Documentation/linux_tv/media/v4l/dev-raw-vbi.rst +4 -4
index 2cd813a5b4e4..596b0a6b2177 100644
@@ -71,7 +71,7 @@ parameters and then checking if the actual parameters are suitable.
 To query the current raw VBI capture parameters applications set the
 ``type`` field of a struct :ref:`v4l2_format <v4l2-format>` to
 ``V4L2_BUF_TYPE_VBI_CAPTURE`` or ``V4L2_BUF_TYPE_VBI_OUTPUT``, and call
-the :ref:`VIDIOC_G_FMT` ioctl with a pointer to this
+the :ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>` ioctl with a pointer to this
 structure. Drivers fill the struct
 :ref:`v4l2_vbi_format <v4l2-vbi-format>` ``vbi`` member of the
 ``fmt`` union.
@@ -80,7 +80,7 @@ To request different parameters applications set the ``type`` field of a
 struct :ref:`v4l2_format <v4l2-format>` as above and initialize all
 fields of the struct :ref:`v4l2_vbi_format <v4l2-vbi-format>`
 ``vbi`` member of the ``fmt`` union, or better just modify the results
-of :ref:`VIDIOC_G_FMT`, and call the :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>`
+of :ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>`, and call the :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>`
 ioctl with a pointer to this structure. Drivers return an EINVAL error
 code only when the given parameters are ambiguous, otherwise they modify
 the parameters according to the hardware capabilities and return the
@@ -94,9 +94,9 @@ expect other resource allocation points which may return EBUSY, at the
 :ref:`VIDIOC_STREAMON` ioctl and the first read(),
 write() and select() call.
 
-VBI devices must implement both the :ref:`VIDIOC_G_FMT` and
+VBI devices must implement both the :ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>` and
 :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl, even if :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ignores all requests
-and always returns default parameters as :ref:`VIDIOC_G_FMT` does.
+and always returns default parameters as :ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>` does.
 :ref:`VIDIOC_TRY_FMT <VIDIOC_G_FMT>` is optional.
 
 
Documentation/linux_tv/media/v4l/dev-sliced-vbi.rst +3 -3
index d53353afbedf..3692cdf8e756 100644
@@ -57,7 +57,7 @@ Sliced VBI Format Negotiation
 
 To find out which data services are supported by the hardware
 applications can call the
-:ref:`VIDIOC_G_SLICED_VBI_CAP` ioctl.
+:ref:`VIDIOC_G_SLICED_VBI_CAP <VIDIOC_G_SLICED_VBI_CAP>` ioctl.
 All drivers implementing the sliced VBI interface must support this
 ioctl. The results may differ from those of the
 :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl when the number of VBI
@@ -70,7 +70,7 @@ To determine the currently selected services applications set the
 ``type`` field of struct :ref:`v4l2_format <v4l2-format>` to
 ``V4L2_BUF_TYPE_SLICED_VBI_CAPTURE`` or
 ``V4L2_BUF_TYPE_SLICED_VBI_OUTPUT``, and the
-:ref:`VIDIOC_G_FMT` ioctl fills the ``fmt.sliced``
+:ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>` ioctl fills the ``fmt.sliced``
 member, a struct
 :ref:`v4l2_sliced_vbi_format <v4l2-sliced-vbi-format>`.
 
@@ -432,7 +432,7 @@ the :ref:`VIDIOC_QBUF` ioctl must return an EINVAL
 error code when applications violate this rule. They must also return an
 EINVAL error code when applications pass an incorrect field or line
 number, or a combination of ``field``, ``line`` and ``id`` which has not
-been negotiated with the :ref:`VIDIOC_G_FMT` or
+been negotiated with the :ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>` or
 :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl. When the line numbers are
 unknown the driver must pass the packets in transmitted order. The
 driver can insert empty packets with ``id`` set to zero anywhere in the
Documentation/linux_tv/media/v4l/diff-v4l.rst +12 -12
index 06fdd877d77d..ee9623b454a4 100644
@@ -204,7 +204,7 @@ introduction.
 
        -  ``-``
 
-       -  Applications can call the :ref:`VIDIOC_G_CROP`
+       -  Applications can call the :ref:`VIDIOC_G_CROP <VIDIOC_G_CROP>`
           ioctl to determine if the device supports capturing a subsection
           of the full picture ("cropping" in V4L2). If not, the ioctl
           returns the EINVAL error code. For more information on cropping
@@ -248,7 +248,7 @@ introduction.
 The ``audios`` field was replaced by ``capabilities`` flag
 ``V4L2_CAP_AUDIO``, indicating *if* the device has any audio inputs or
 outputs. To determine their number applications can enumerate audio
-inputs with the :ref:`VIDIOC_G_AUDIO` ioctl. The
+inputs with the :ref:`VIDIOC_G_AUDIO <VIDIOC_G_AUDIO>` ioctl. The
 audio ioctls are described in :ref:`audio`.
 
 The ``maxwidth``, ``maxheight``, ``minwidth`` and ``minheight`` fields
@@ -265,7 +265,7 @@ V4L provides the ``VIDIOCGCHAN`` and ``VIDIOCSCHAN`` ioctl using struct
 :c:type:`struct video_channel` to enumerate the video inputs of a V4L
 device. The equivalent V4L2 ioctls are
 :ref:`VIDIOC_ENUMINPUT`,
-:ref:`VIDIOC_G_INPUT` and
+:ref:`VIDIOC_G_INPUT <VIDIOC_G_INPUT>` and
 :ref:`VIDIOC_S_INPUT <VIDIOC_G_INPUT>` using struct
 :ref:`v4l2_input <v4l2-input>` as discussed in :ref:`video`.
 
@@ -328,7 +328,7 @@ Tuning
 The V4L ``VIDIOCGTUNER`` and ``VIDIOCSTUNER`` ioctl and struct
 :c:type:`struct video_tuner` can be used to enumerate the tuners of a
 V4L TV or radio device. The equivalent V4L2 ioctls are
-:ref:`VIDIOC_G_TUNER` and
+:ref:`VIDIOC_G_TUNER <VIDIOC_G_TUNER>` and
 :ref:`VIDIOC_S_TUNER <VIDIOC_G_TUNER>` using struct
 :ref:`v4l2_tuner <v4l2-tuner>`. Tuners are covered in :ref:`tuner`.
 
@@ -360,7 +360,7 @@ the struct :ref:`v4l2_tuner <v4l2-tuner>` ``capability`` field.
 
 The ``VIDIOCGFREQ`` and ``VIDIOCSFREQ`` ioctl to change the tuner
 frequency where renamed to
-:ref:`VIDIOC_G_FREQUENCY` and
+:ref:`VIDIOC_G_FREQUENCY <VIDIOC_G_FREQUENCY>` and
 :ref:`VIDIOC_S_FREQUENCY <VIDIOC_G_FREQUENCY>`. They take a pointer
 to a struct :ref:`v4l2_frequency <v4l2-frequency>` instead of an
 unsigned long integer.
@@ -375,7 +375,7 @@ V4L2 has no equivalent of the ``VIDIOCGPICT`` and ``VIDIOCSPICT`` ioctl
 and struct :c:type:`struct video_picture`. The following fields where
 replaced by V4L2 controls accessible with the
 :ref:`VIDIOC_QUERYCTRL`,
-:ref:`VIDIOC_G_CTRL` and
+:ref:`VIDIOC_G_CTRL <VIDIOC_G_CTRL>` and
 :ref:`VIDIOC_S_CTRL <VIDIOC_G_CTRL>` ioctls:
 
 
@@ -554,7 +554,7 @@ Audio
 The ``VIDIOCGAUDIO`` and ``VIDIOCSAUDIO`` ioctl and struct
 :c:type:`struct video_audio` are used to enumerate the audio inputs
 of a V4L device. The equivalent V4L2 ioctls are
-:ref:`VIDIOC_G_AUDIO` and
+:ref:`VIDIOC_G_AUDIO <VIDIOC_G_AUDIO>` and
 :ref:`VIDIOC_S_AUDIO <VIDIOC_G_AUDIO>` using struct
 :ref:`v4l2_audio <v4l2-audio>` as discussed in :ref:`audio`.
 
@@ -577,7 +577,7 @@ stereo input, regardless if the source is a tuner.
 
 The following fields where replaced by V4L2 controls accessible with the
 :ref:`VIDIOC_QUERYCTRL`,
-:ref:`VIDIOC_G_CTRL` and
+:ref:`VIDIOC_G_CTRL <VIDIOC_G_CTRL>` and
 :ref:`VIDIOC_S_CTRL <VIDIOC_G_CTRL>` ioctls:
 
 
@@ -638,7 +638,7 @@ Frame Buffer Overlay
 ====================
 
 The V4L2 ioctls equivalent to ``VIDIOCGFBUF`` and ``VIDIOCSFBUF`` are
-:ref:`VIDIOC_G_FBUF` and
+:ref:`VIDIOC_G_FBUF <VIDIOC_G_FBUF>` and
 :ref:`VIDIOC_S_FBUF <VIDIOC_G_FBUF>`. The ``base`` field of struct
 :c:type:`struct video_buffer` remained unchanged, except V4L2 defines
 a flag to indicate non-destructive overlays instead of a ``NULL``
@@ -650,7 +650,7 @@ list of RGB formats and their respective color depths.
 
 Instead of the special ioctls ``VIDIOCGWIN`` and ``VIDIOCSWIN`` V4L2
 uses the general-purpose data format negotiation ioctls
-:ref:`VIDIOC_G_FMT` and
+:ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>` and
 :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>`. They take a pointer to a struct
 :ref:`v4l2_format <v4l2-format>` as argument. Here the ``win`` member
 of the ``fmt`` union is used, a struct
@@ -687,7 +687,7 @@ Cropping
 To capture only a subsection of the full picture V4L defines the
 ``VIDIOCGCAPTURE`` and ``VIDIOCSCAPTURE`` ioctls using struct
 :c:type:`struct video_capture`. The equivalent V4L2 ioctls are
-:ref:`VIDIOC_G_CROP` and
+:ref:`VIDIOC_G_CROP <VIDIOC_G_CROP>` and
 :ref:`VIDIOC_S_CROP <VIDIOC_G_CROP>` using struct
 :ref:`v4l2_crop <v4l2-crop>`, and the related
 :ref:`VIDIOC_CROPCAP` ioctl. This is a rather
@@ -726,7 +726,7 @@ functions.
 
 To select an image format and size, V4L provides the ``VIDIOCSPICT`` and
 ``VIDIOCSWIN`` ioctls. V4L2 uses the general-purpose data format
-negotiation ioctls :ref:`VIDIOC_G_FMT` and
+negotiation ioctls :ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>` and
 :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>`. They take a pointer to a struct
 :ref:`v4l2_format <v4l2-format>` as argument, here the struct
 :ref:`v4l2_pix_format <v4l2-pix-format>` named ``pix`` of its
Documentation/linux_tv/media/v4l/dv-timings.rst +1 -1
index 4b22b1b0fccb..cde46bc95c79 100644
@@ -29,7 +29,7 @@ device applications use the
 DV timings for the device applications use the
 :ref:`VIDIOC_S_DV_TIMINGS <VIDIOC_G_DV_TIMINGS>` ioctl and to get
 current DV timings they use the
-:ref:`VIDIOC_G_DV_TIMINGS` ioctl. To detect
+:ref:`VIDIOC_G_DV_TIMINGS <VIDIOC_G_DV_TIMINGS>` ioctl. To detect
 the DV timings as seen by the video receiver applications use the
 :ref:`VIDIOC_QUERY_DV_TIMINGS` ioctl.
 
Documentation/linux_tv/media/v4l/extended-controls.rst +2 -2
index 9a10edc50fa0..38b85d7b1022 100644
@@ -39,11 +39,11 @@ The Extended Control API
 ========================
 
 Three new ioctls are available:
-:ref:`VIDIOC_G_EXT_CTRLS`,
+:ref:`VIDIOC_G_EXT_CTRLS <VIDIOC_G_EXT_CTRLS>`,
 :ref:`VIDIOC_S_EXT_CTRLS <VIDIOC_G_EXT_CTRLS>` and
 :ref:`VIDIOC_TRY_EXT_CTRLS <VIDIOC_G_EXT_CTRLS>`. These ioctls act
 on arrays of controls (as opposed to the
-:ref:`VIDIOC_G_CTRL` and
+:ref:`VIDIOC_G_CTRL <VIDIOC_G_CTRL>` and
 :ref:`VIDIOC_S_CTRL <VIDIOC_G_CTRL>` ioctls that act on a single
 control). This is needed since it is often required to atomically change
 several controls at once.
Documentation/linux_tv/media/v4l/format.rst +2 -2
index 0184b5931709..e9b1201fe316 100644
@@ -23,7 +23,7 @@ current selection.
 
 A single mechanism exists to negotiate all data formats using the
 aggregate struct :ref:`v4l2_format <v4l2-format>` and the
-:ref:`VIDIOC_G_FMT` and
+:ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>` and
 :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctls. Additionally the
 :ref:`VIDIOC_TRY_FMT <VIDIOC_G_FMT>` ioctl can be used to examine
 what the hardware *could* do, without actually selecting a new data
@@ -64,7 +64,7 @@ earlier versions of V4L2. Switching the logical stream or returning into
 *may* support a switch using :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>`.
 
 All drivers exchanging data with applications must support the
-:ref:`VIDIOC_G_FMT` and :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl. Implementation of the
+:ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>` and :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl. Implementation of the
 :ref:`VIDIOC_TRY_FMT <VIDIOC_G_FMT>` is highly recommended but optional.
 
 
Documentation/linux_tv/media/v4l/func-read.rst +1 -1
index 0eae26288189..497bc9a9dd5a 100644
@@ -85,7 +85,7 @@ enough. Again, the behavior when the driver runs out of free buffers
 depends on the discarding policy.
 
 Applications can get and set the number of buffers used internally by
-the driver with the :ref:`VIDIOC_G_PARM` and
+the driver with the :ref:`VIDIOC_G_PARM <VIDIOC_G_PARM>` and
 :ref:`VIDIOC_S_PARM <VIDIOC_G_PARM>` ioctls. They are optional,
 however. The discarding policy is not reported and cannot be changed.
 For minimum requirements see :ref:`devices`.
Documentation/linux_tv/media/v4l/hist-v4l2.rst +14 -14
index 4bd621b3aa03..bb115a0f2427 100644
@@ -40,7 +40,7 @@ enumerable.
 :c:type:`struct video_standard` and the color subcarrier fields were
 renamed. The :ref:`VIDIOC_QUERYSTD` ioctl was
 renamed to :ref:`VIDIOC_ENUMSTD`,
-:ref:`VIDIOC_G_INPUT` to
+:ref:`VIDIOC_G_INPUT <VIDIOC_G_INPUT>` to
 :ref:`VIDIOC_ENUMINPUT`. A first draft of the
 Codec API was released.
 
@@ -52,7 +52,7 @@ material changes to struct :ref:`v4l2_capability <v4l2-capability>`.
 1998-11-14: ``V4L2_PIX_FMT_RGB24`` changed to ``V4L2_PIX_FMT_BGR24``,
 and ``V4L2_PIX_FMT_RGB32`` changed to ``V4L2_PIX_FMT_BGR32``. Audio
 controls are now accessible with the
-:ref:`VIDIOC_G_CTRL` and
+:ref:`VIDIOC_G_CTRL <VIDIOC_G_CTRL>` and
 :ref:`VIDIOC_S_CTRL <VIDIOC_G_CTRL>` ioctls under names starting
 with ``V4L2_CID_AUDIO``. The ``V4L2_MAJOR`` define was removed from
 ``videodev.h`` since it was only used once in the ``videodev`` kernel
@@ -142,7 +142,7 @@ common Linux driver API conventions.
        int a = V4L2_XXX; err = ioctl(fd, VIDIOC_XXX, &a);
 
 4. All the different get- and set-format commands were swept into one
-   :ref:`VIDIOC_G_FMT` and
+   :ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>` and
    :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl taking a union and a
    type field selecting the union member as parameter. Purpose is to
    simplify the API by eliminating several ioctls and to allow new and
@@ -246,13 +246,13 @@ correctly through the backward compatibility layer. [Solution?]
 2001-04-13: Big endian 16-bit RGB formats were added.
 
 2001-09-17: New YUV formats and the
-:ref:`VIDIOC_G_FREQUENCY` and
+:ref:`VIDIOC_G_FREQUENCY <VIDIOC_G_FREQUENCY>` and
 :ref:`VIDIOC_S_FREQUENCY <VIDIOC_G_FREQUENCY>` ioctls were added.
 (The old ``VIDIOC_G_FREQ`` and ``VIDIOC_S_FREQ`` ioctls did not take
 multiple tuners into account.)
 
 2000-09-18: ``V4L2_BUF_TYPE_VBI`` was added. This may *break
-compatibility* as the :ref:`VIDIOC_G_FMT` and
+compatibility* as the :ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>` and
 :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctls may fail now if the struct
 :c:type:`struct v4l2_fmt` ``type`` field does not contain
 ``V4L2_BUF_TYPE_VBI``. In the documentation of the struct
@@ -401,7 +401,7 @@ This unnamed version was finally merged into Linux 2.5.46.
     supported standards with an ioctl applications can now refer to
     standards by :ref:`v4l2_std_id <v4l2-std-id>` and symbols
     defined in the ``videodev2.h`` header file. For details see
-    :ref:`standard`. The :ref:`VIDIOC_G_STD` and
+    :ref:`standard`. The :ref:`VIDIOC_G_STD <VIDIOC_G_STD>` and
     :ref:`VIDIOC_S_STD <VIDIOC_G_STD>` now take a pointer to this
     type as argument. :ref:`VIDIOC_QUERYSTD` was
     added to autodetect the received standard, if the hardware has this
@@ -716,14 +716,14 @@ V4L2 2003-06-19
 
 3. The audio input and output interface was found to be incomplete.
 
-   Previously the :ref:`VIDIOC_G_AUDIO` ioctl would
+   Previously the :ref:`VIDIOC_G_AUDIO <VIDIOC_G_AUDIO>` ioctl would
    enumerate the available audio inputs. An ioctl to determine the
    current audio input, if more than one combines with the current video
    input, did not exist. So ``VIDIOC_G_AUDIO`` was renamed to
    ``VIDIOC_G_AUDIO_OLD``, this ioctl was removed on Kernel 2.6.39. The
    :ref:`VIDIOC_ENUMAUDIO` ioctl was added to
    enumerate audio inputs, while
-   :ref:`VIDIOC_G_AUDIO` now reports the current
+   :ref:`VIDIOC_G_AUDIO <VIDIOC_G_AUDIO>` now reports the current
    audio input.
 
    The same changes were made to
@@ -940,7 +940,7 @@ V4L2 in Linux 2.6.17
 2. A new ``V4L2_TUNER_MODE_LANG1_LANG2`` was defined to record both
    languages of a bilingual program. The use of
    ``V4L2_TUNER_MODE_STEREO`` for this purpose is deprecated now. See
-   the :ref:`VIDIOC_G_TUNER` section for details.
+   the :ref:`VIDIOC_G_TUNER <VIDIOC_G_TUNER>` section for details.
 
 
 V4L2 spec erratum 2006-09-23 (Draft 0.15)
@@ -950,13 +950,13 @@ V4L2 spec erratum 2006-09-23 (Draft 0.15)
    ``V4L2_BUF_TYPE_SLICED_VBI_OUTPUT`` of the sliced VBI interface were
    not mentioned along with other buffer types.
 
-2. In :ref:`VIDIOC_G_AUDIO` it was clarified that the struct
+2. In :ref:`VIDIOC_G_AUDIO <VIDIOC_G_AUDIO>` it was clarified that the struct
    :ref:`v4l2_audio <v4l2-audio>` ``mode`` field is a flags field.
 
 3. :ref:`VIDIOC_QUERYCAP` did not mention the sliced VBI and radio
    capability flags.
 
-4. In :ref:`VIDIOC_G_FREQUENCY` it was clarified that applications
+4. In :ref:`VIDIOC_G_FREQUENCY <VIDIOC_G_FREQUENCY>` it was clarified that applications
    must initialize the tuner ``type`` field of struct
    :ref:`v4l2_frequency <v4l2-frequency>` before calling
    :ref:`VIDIOC_S_FREQUENCY <VIDIOC_G_FREQUENCY>`.
@@ -976,7 +976,7 @@ V4L2 spec erratum 2006-09-23 (Draft 0.15)
 V4L2 in Linux 2.6.18
 ====================
 
-1. New ioctls :ref:`VIDIOC_G_EXT_CTRLS`,
+1. New ioctls :ref:`VIDIOC_G_EXT_CTRLS <VIDIOC_G_EXT_CTRLS>`,
    :ref:`VIDIOC_S_EXT_CTRLS <VIDIOC_G_EXT_CTRLS>` and
    :ref:`VIDIOC_TRY_EXT_CTRLS <VIDIOC_G_EXT_CTRLS>` were added, a
    flag to skip unsupported controls with
@@ -995,7 +995,7 @@ V4L2 in Linux 2.6.19
    buffer type field was added replacing a reserved field. Note on
    architectures where the size of enum types differs from int types the
    size of the structure changed. The
-   :ref:`VIDIOC_G_SLICED_VBI_CAP` ioctl
+   :ref:`VIDIOC_G_SLICED_VBI_CAP <VIDIOC_G_SLICED_VBI_CAP>` ioctl
    was redefined from being read-only to write-read. Applications must
    initialize the type field and clear the reserved fields now. These
    changes may *break the compatibility* with older drivers and
@@ -1034,7 +1034,7 @@ V4L2 in Linux 2.6.22
 
 2. Three new clipping/blending methods with a global or straight or
    inverted local alpha value were added to the video overlay interface.
-   See the description of the :ref:`VIDIOC_G_FBUF`
+   See the description of the :ref:`VIDIOC_G_FBUF <VIDIOC_G_FBUF>`
    and :ref:`VIDIOC_S_FBUF <VIDIOC_G_FBUF>` ioctls for details.
 
    A new ``global_alpha`` field was added to
Documentation/linux_tv/media/v4l/libv4l-introduction.rst +1 -1
index bc3eb48e1d9f..b8d247dc236d 100644
@@ -92,7 +92,7 @@ and to enhance the image quality.
 In most cases, libv4l2 just passes the calls directly through to the
 v4l2 driver, intercepting the calls to
 :ref:`VIDIOC_TRY_FMT <VIDIOC_G_FMT>`,
-:ref:`VIDIOC_G_FMT`
+:ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>`
 :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>`
 :ref:`VIDIOC_ENUM_FRAMESIZES` and
 :ref:`VIDIOC_ENUM_FRAMEINTERVALS` in
Documentation/linux_tv/media/v4l/pixfmt-013.rst +1 -1
index 7584cb2e5702..b3cb7c48eb74 100644
@@ -27,7 +27,7 @@ Compressed Formats
 
        -  'JPEG'
 
-       -  TBD. See also :ref:`VIDIOC_G_JPEGCOMP`,
+       -  TBD. See also :ref:`VIDIOC_G_JPEGCOMP <VIDIOC_G_JPEGCOMP>`,
           :ref:`VIDIOC_S_JPEGCOMP <VIDIOC_G_JPEGCOMP>`.
 
     -  .. _`V4L2-PIX-FMT-MPEG`:
Documentation/linux_tv/media/v4l/pixfmt.rst +1 -1
index b0e6a95a7205..f2c599aaa502 100644
@@ -13,7 +13,7 @@ single-planar API, while the latter is used with the multi-planar
 version (see :ref:`planar-apis`). Image formats are negotiated with
 the :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl. (The explanations here
 focus on video capturing and output, for overlay frame buffer formats
-see also :ref:`VIDIOC_G_FBUF`.)
+see also :ref:`VIDIOC_G_FBUF <VIDIOC_G_FBUF>`.)
 
 
 .. toctree::
Documentation/linux_tv/media/v4l/planar-apis.rst +1 -1
index 0546210f868f..cf078650a0a8 100644
@@ -44,7 +44,7 @@ Calls that distinguish between single and multi-planar APIs
     together with non-multi-planar ones for devices that handle both
     single- and multi-planar formats.
 
-:ref:`VIDIOC_G_FMT`,
+:ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>`,
 :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>`,
 :ref:`VIDIOC_TRY_FMT <VIDIOC_G_FMT>`
     New structures for describing multi-planar formats are added: struct
Documentation/linux_tv/media/v4l/standard.rst +2 -2
index ec39b2b39e67..20c0d044a129 100644
@@ -36,7 +36,7 @@ Composite input may collapse standards, enumerating "PAL-B/G/H/I",
 "NTSC-M" and "SECAM-D/K". [1]_
 
 To query and select the standard used by the current video input or
-output applications call the :ref:`VIDIOC_G_STD` and
+output applications call the :ref:`VIDIOC_G_STD <VIDIOC_G_STD>` and
 :ref:`VIDIOC_S_STD <VIDIOC_G_STD>` ioctl, respectively. The
 *received* standard can be sensed with the
 :ref:`VIDIOC_QUERYSTD` ioctl. Note that the
@@ -56,7 +56,7 @@ output device which is:
 
 Here the driver shall set the ``std`` field of struct
 :ref:`v4l2_input <v4l2-input>` and struct
-:ref:`v4l2_output <v4l2-output>` to zero and the :ref:`VIDIOC_G_STD`,
+:ref:`v4l2_output <v4l2-output>` to zero and the :ref:`VIDIOC_G_STD <VIDIOC_G_STD>`,
 :ref:`VIDIOC_S_STD <VIDIOC_G_STD>`, :ref:`VIDIOC_QUERYSTD` and :ref:`VIDIOC_ENUMSTD` ioctls
 shall return the ENOTTY error code or the EINVAL error code.
 
Documentation/linux_tv/media/v4l/streaming-par.rst +1 -1
index 10420478a3b0..bb8100b6ef87 100644
@@ -23,7 +23,7 @@ internally by a driver in read/write mode. For implications see the
 section discussing the :ref:`read() <func-read>` function.
 
 To get and set the streaming parameters applications call the
-:ref:`VIDIOC_G_PARM` and
+:ref:`VIDIOC_G_PARM <VIDIOC_G_PARM>` and
 :ref:`VIDIOC_S_PARM <VIDIOC_G_PARM>` ioctl, respectively. They take
 a pointer to a struct :ref:`v4l2_streamparm <v4l2-streamparm>`, which
 contains a union holding separate parameters for input and output
Documentation/linux_tv/media/v4l/tuner.rst +4 -4
index 67f4e24709b5..9c98e4f64c85 100644
@@ -22,9 +22,9 @@ Radio input devices have exactly one tuner with index zero, no video
 inputs.
 
 To query and change tuner properties applications use the
-:ref:`VIDIOC_G_TUNER` and
+:ref:`VIDIOC_G_TUNER <VIDIOC_G_TUNER>` and
 :ref:`VIDIOC_S_TUNER <VIDIOC_G_TUNER>` ioctls, respectively. The
-struct :ref:`v4l2_tuner <v4l2-tuner>` returned by :ref:`VIDIOC_G_TUNER`
+struct :ref:`v4l2_tuner <v4l2-tuner>` returned by :ref:`VIDIOC_G_TUNER <VIDIOC_G_TUNER>`
 also contains signal status information applicable when the tuner of the
 current video or radio input is queried. Note that :ref:`VIDIOC_S_TUNER <VIDIOC_G_TUNER>`
 does not switch the current tuner, when there is more than one at all.
@@ -59,7 +59,7 @@ functionality. The reason is a limitation with the
 cannot specify whether the frequency is for a tuner or a modulator.
 
 To query and change modulator properties applications use the
-:ref:`VIDIOC_G_MODULATOR` and
+:ref:`VIDIOC_G_MODULATOR <VIDIOC_G_MODULATOR>` and
 :ref:`VIDIOC_S_MODULATOR <VIDIOC_G_MODULATOR>` ioctl. Note that
 :ref:`VIDIOC_S_MODULATOR <VIDIOC_G_MODULATOR>` does not switch the current modulator, when there
 is more than one at all. The modulator is solely determined by the
@@ -74,7 +74,7 @@ Radio Frequency
 ===============
 
 To get and set the tuner or modulator radio frequency applications use
-the :ref:`VIDIOC_G_FREQUENCY` and
+the :ref:`VIDIOC_G_FREQUENCY <VIDIOC_G_FREQUENCY>` and
 :ref:`VIDIOC_S_FREQUENCY <VIDIOC_G_FREQUENCY>` ioctl which both take
 a pointer to a struct :ref:`v4l2_frequency <v4l2-frequency>`. These
 ioctls are used for TV and radio devices alike. Drivers must support
Documentation/linux_tv/media/v4l/video.rst +2 -2
index 9f2dc4ee4fcd..8e10ecc27123 100644
@@ -20,8 +20,8 @@ struct :ref:`v4l2_input <v4l2-input>` returned by the
 :ref:`VIDIOC_ENUMINPUT` ioctl also contains signal
 :status information applicable when the current video input is queried.
 
-The :ref:`VIDIOC_G_INPUT` and
-:ref:`VIDIOC_G_OUTPUT` ioctls return the index of
+The :ref:`VIDIOC_G_INPUT <VIDIOC_G_INPUT>` and
+:ref:`VIDIOC_G_OUTPUT <VIDIOC_G_OUTPUT>` ioctls return the index of
 the current video input or output. To select a different input or output
 applications call the :ref:`VIDIOC_S_INPUT <VIDIOC_G_INPUT>` and
 :ref:`VIDIOC_S_OUTPUT <VIDIOC_G_OUTPUT>` ioctls. Drivers must
Documentation/linux_tv/media/v4l/vidioc-create-bufs.rst +1 -1
index d269eab4d2b6..53db867aa9db 100644
@@ -48,7 +48,7 @@ The ``format`` field specifies the image format that the buffers must be
 able to handle. The application has to fill in this struct
 :ref:`v4l2_format <v4l2-format>`. Usually this will be done using the
 :ref:`VIDIOC_TRY_FMT <VIDIOC_G_FMT>` or
-:ref:`VIDIOC_G_FMT` ioctls to ensure that the
+:ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>` ioctls to ensure that the
 requested format is supported by the driver. Based on the format's
 ``type`` field the requested buffer size (for single-planar) or plane
 sizes (for multi-planar formats) will be used for the allocated buffers.
Documentation/linux_tv/media/v4l/vidioc-enumaudio.rst +1 -1
index 0fc0c3eeae5f..8ae7b8bd9333 100644
@@ -39,7 +39,7 @@ structure or return an EINVAL error code when the index is out of
 bounds. To enumerate all audio inputs applications shall begin at index
 zero, incrementing by one until the driver returns EINVAL.
 
-See :ref:`VIDIOC_G_AUDIO` for a description of struct
+See :ref:`VIDIOC_G_AUDIO <VIDIOC_G_AUDIO>` for a description of struct
 :ref:`v4l2_audio <v4l2-audio>`.
 
 
Documentation/linux_tv/media/v4l/vidioc-enumaudioout.rst +1 -1
index 29735eddac5d..0e45f41fa608 100644
@@ -42,7 +42,7 @@ zero, incrementing by one until the driver returns EINVAL.
 Note connectors on a TV card to loop back the received audio signal to a
 sound card are not audio outputs in this sense.
 
-See :ref:`VIDIOC_G_AUDIOout` for a description of struct
+See :ref:`VIDIOC_G_AUDIOout <VIDIOC_G_AUDIOout>` for a description of struct
 :ref:`v4l2_audioout <v4l2-audioout>`.
 
 
Documentation/linux_tv/media/v4l/vidioc-enumstd.rst +1 -1
index e292b7d50cc3..03353b92449a 100644
@@ -401,7 +401,7 @@ ENODATA
 
 .. [1]
    The supported standards may overlap and we need an unambiguous set to
-   find the current standard returned by :ref:`VIDIOC_G_STD`.
+   find the current standard returned by :ref:`VIDIOC_G_STD <VIDIOC_G_STD>`.
 
 .. [2]
    Japan uses a standard similar to M/NTSC (V4L2_STD_NTSC_M_JP).
Documentation/linux_tv/media/v4l/vidioc-g-audio.rst +1 -1
index be8899d87e33..4b79523bfbab 100644
@@ -36,7 +36,7 @@ Description
 
 To query the current audio input applications zero out the ``reserved``
 array of a struct :ref:`v4l2_audio <v4l2-audio>` and call the
-:ref:`VIDIOC_G_AUDIO` ioctl with a pointer to this structure. Drivers fill
+:ref:`VIDIOC_G_AUDIO <VIDIOC_G_AUDIO>` ioctl with a pointer to this structure. Drivers fill
 the rest of the structure or return an EINVAL error code when the device
 has no audio inputs, or none which combine with the current video input.
 
Documentation/linux_tv/media/v4l/vidioc-g-crop.rst +2 -2
index 0a9ede92bc9f..b0503710c2dd 100644
@@ -36,7 +36,7 @@ Description
 
 To query the cropping rectangle size and position applications set the
 ``type`` field of a :c:type:`struct v4l2_crop` structure to the
-respective buffer (stream) type and call the :ref:`VIDIOC_G_CROP` ioctl
+respective buffer (stream) type and call the :ref:`VIDIOC_G_CROP <VIDIOC_G_CROP>` ioctl
 with a pointer to this structure. The driver fills the rest of the
 structure or returns the EINVAL error code if cropping is not supported.
 
@@ -66,7 +66,7 @@ vertical scaling factor.
 Finally the driver programs the hardware with the actual cropping and
 image parameters. :ref:`VIDIOC_S_CROP <VIDIOC_G_CROP>` is a write-only ioctl, it does not
 return the actual parameters. To query them applications must call
-:ref:`VIDIOC_G_CROP` and :ref:`VIDIOC_G_FMT`. When the
+:ref:`VIDIOC_G_CROP <VIDIOC_G_CROP>` and :ref:`VIDIOC_G_FMT`. When the
 parameters are unsuitable the application may modify the cropping or
 image parameters and repeat the cycle until satisfactory parameters have
 been negotiated.
Documentation/linux_tv/media/v4l/vidioc-g-ctrl.rst +2 -2
index 41561c5e444d..55bb8ae9be10 100644
@@ -34,7 +34,7 @@ Description
 
 To get the current value of a control applications initialize the ``id``
 field of a struct :c:type:`struct v4l2_control` and call the
-:ref:`VIDIOC_G_CTRL` ioctl with a pointer to this structure. To change the
+:ref:`VIDIOC_G_CTRL <VIDIOC_G_CTRL>` ioctl with a pointer to this structure. To change the
 value of a control applications initialize the ``id`` and ``value``
 fields of a struct :c:type:`struct v4l2_control` and call the
 :ref:`VIDIOC_S_CTRL <VIDIOC_G_CTRL>` ioctl.
@@ -48,7 +48,7 @@ actual new value. If the ``value`` is inappropriate for the control
 EINVAL error code is returned as well.
 
 These ioctls work only with user controls. For other control classes the
-:ref:`VIDIOC_G_EXT_CTRLS`,
+:ref:`VIDIOC_G_EXT_CTRLS <VIDIOC_G_EXT_CTRLS>`,
 :ref:`VIDIOC_S_EXT_CTRLS <VIDIOC_G_EXT_CTRLS>` or
 :ref:`VIDIOC_TRY_EXT_CTRLS <VIDIOC_G_EXT_CTRLS>` must be used.
 
Documentation/linux_tv/media/v4l/vidioc-g-dv-timings.rst +1 -1
index cc7cf06e74ee..43734bb649c5 100644
@@ -37,7 +37,7 @@ Description
 
 To set DV timings for the input or output, applications use the
 :ref:`VIDIOC_S_DV_TIMINGS <VIDIOC_G_DV_TIMINGS>` ioctl and to get the current timings,
-applications use the :ref:`VIDIOC_G_DV_TIMINGS` ioctl. The detailed timing
+applications use the :ref:`VIDIOC_G_DV_TIMINGS <VIDIOC_G_DV_TIMINGS>` ioctl. The detailed timing
 information is filled in using the structure struct
 :ref:`v4l2_dv_timings <v4l2-dv-timings>`. These ioctls take a
 pointer to the struct :ref:`v4l2_dv_timings <v4l2-dv-timings>`
Documentation/linux_tv/media/v4l/vidioc-g-edid.rst +2 -2
index a1311a52b8fa..d6ccae92e107 100644
@@ -52,7 +52,7 @@ value, then the EINVAL error code will be returned.
 
 To get the EDID data the application has to fill in the ``pad``,
 ``start_block``, ``blocks`` and ``edid`` fields, zero the ``reserved``
-array and call :ref:`VIDIOC_G_EDID`. The current EDID from block
+array and call :ref:`VIDIOC_G_EDID <VIDIOC_G_EDID>`. The current EDID from block
 ``start_block`` and of size ``blocks`` will be placed in the memory
 ``edid`` points to. The ``edid`` pointer must point to memory at least
 ``blocks`` * 128 bytes large (the size of one block is 128 bytes).
@@ -65,7 +65,7 @@ If blocks have to be retrieved from the sink, then this call will block
 until they have been read.
 
 If ``start_block`` and ``blocks`` are both set to 0 when
-:ref:`VIDIOC_G_EDID` is called, then the driver will set ``blocks`` to the
+:ref:`VIDIOC_G_EDID <VIDIOC_G_EDID>` is called, then the driver will set ``blocks`` to the
 total number of available EDID blocks and it will return 0 without
 copying any data. This is an easy way to discover how many EDID blocks
 there are. Note that if there are no EDID blocks available at all, then
Documentation/linux_tv/media/v4l/vidioc-g-enc-index.rst +3 -3
index 77c7eff9732d..c22907cddfac 100644
@@ -31,19 +31,19 @@ Arguments
 Description
 ===========
 
-The :ref:`VIDIOC_G_ENC_INDEX` ioctl provides meta data about a compressed
+The :ref:`VIDIOC_G_ENC_INDEX <VIDIOC_G_ENC_INDEX>` ioctl provides meta data about a compressed
 video stream the same or another application currently reads from the
 driver, which is useful for random access into the stream without
 decoding it.
 
-To read the data applications must call :ref:`VIDIOC_G_ENC_INDEX` with a
+To read the data applications must call :ref:`VIDIOC_G_ENC_INDEX <VIDIOC_G_ENC_INDEX>` with a
 pointer to a struct :ref:`v4l2_enc_idx <v4l2-enc-idx>`. On success
 the driver fills the ``entry`` array, stores the number of elements
 written in the ``entries`` field, and initializes the ``entries_cap``
 field.
 
 Each element of the ``entry`` array contains meta data about one
-picture. A :ref:`VIDIOC_G_ENC_INDEX` call reads up to
+picture. A :ref:`VIDIOC_G_ENC_INDEX <VIDIOC_G_ENC_INDEX>` call reads up to
 ``V4L2_ENC_IDX_ENTRIES`` entries from a driver buffer, which can hold up
 to ``entries_cap`` entries. This number can be lower or higher than
 ``V4L2_ENC_IDX_ENTRIES``, but not zero. When the application fails to
Documentation/linux_tv/media/v4l/vidioc-g-ext-ctrls.rst +4 -4
index fb62cd0a991c..040deef04f7d 100644
@@ -48,7 +48,7 @@ by the ``controls`` fields.
 To get the current value of a set of controls applications initialize
 the ``id``, ``size`` and ``reserved2`` fields of each struct
 :ref:`v4l2_ext_control <v4l2-ext-control>` and call the
-:ref:`VIDIOC_G_EXT_CTRLS` ioctl. String controls controls must also set the
+:ref:`VIDIOC_G_EXT_CTRLS <VIDIOC_G_EXT_CTRLS>` ioctl. String controls controls must also set the
 ``string`` field. Controls of compound types
 (``V4L2_CTRL_FLAG_HAS_PAYLOAD`` is set) must set the ``ptr`` field.
 
@@ -122,7 +122,7 @@ still cause this situation.
        -  The total size in bytes of the payload of this control. This is
           normally 0, but for pointer controls this should be set to the
           size of the memory containing the payload, or that will receive
-          the payload. If :ref:`VIDIOC_G_EXT_CTRLS` finds that this value is
+          the payload. If :ref:`VIDIOC_G_EXT_CTRLS <VIDIOC_G_EXT_CTRLS>` finds that this value is
           less than is required to store the payload result, then it is set
           to a value large enough to store the payload result and ENOSPC is
           returned. Note that for string controls this ``size`` field should
@@ -328,7 +328,7 @@ still cause this situation.
           :ref:`VIDIOC_S_EXT_CTRLS <VIDIOC_G_EXT_CTRLS>` fails with ``error_idx`` set to ``count``,
           then you can call :ref:`VIDIOC_TRY_EXT_CTRLS <VIDIOC_G_EXT_CTRLS>` to try to discover the
           actual control that failed the validation step. Unfortunately,
-          there is no ``TRY`` equivalent for :ref:`VIDIOC_G_EXT_CTRLS`.
+          there is no ``TRY`` equivalent for :ref:`VIDIOC_G_EXT_CTRLS <VIDIOC_G_EXT_CTRLS>`.
 
     -  .. row 6
 
@@ -367,7 +367,7 @@ still cause this situation.
        -  The class containing user controls. These controls are described
           in :ref:`control`. All controls that can be set using the
           :ref:`VIDIOC_S_CTRL <VIDIOC_G_CTRL>` and
-          :ref:`VIDIOC_G_CTRL` ioctl belong to this
+          :ref:`VIDIOC_G_CTRL <VIDIOC_G_CTRL>` ioctl belong to this
           class.
 
     -  .. row 2
Documentation/linux_tv/media/v4l/vidioc-g-fbuf.rst +4 -4
index e622e2f2435c..dbc68cfc608a 100644
@@ -34,7 +34,7 @@ Arguments
 Description
 ===========
 
-Applications can use the :ref:`VIDIOC_G_FBUF` and :ref:`VIDIOC_S_FBUF <VIDIOC_G_FBUF>` ioctl
+Applications can use the :ref:`VIDIOC_G_FBUF <VIDIOC_G_FBUF>` and :ref:`VIDIOC_S_FBUF <VIDIOC_G_FBUF>` ioctl
 to get and set the framebuffer parameters for a
 :ref:`Video Overlay <overlay>` or :ref:`Video Output Overlay <osd>`
 (OSD). The type of overlay is implied by the device type (capture or
@@ -48,7 +48,7 @@ of a graphics card. A non-destructive overlay blends video images into a
 VGA signal or graphics into a video signal. *Video Output Overlays* are
 always non-destructive.
 
-To get the current parameters applications call the :ref:`VIDIOC_G_FBUF`
+To get the current parameters applications call the :ref:`VIDIOC_G_FBUF <VIDIOC_G_FBUF>`
 ioctl with a pointer to a :c:type:`struct v4l2_framebuffer`
 structure. The driver fills all fields of the structure or returns an
 EINVAL error code when overlays are not supported.
@@ -59,13 +59,13 @@ initialize the ``flags`` field of a struct
 implemented on the TV card all other parameters are determined by the
 driver. When an application calls :ref:`VIDIOC_S_FBUF <VIDIOC_G_FBUF>` with a pointer to
 this structure, the driver prepares for the overlay and returns the
-framebuffer parameters as :ref:`VIDIOC_G_FBUF` does, or it returns an error
+framebuffer parameters as :ref:`VIDIOC_G_FBUF <VIDIOC_G_FBUF>` does, or it returns an error
 code.
 
 To set the parameters for a *non-destructive Video Overlay*,
 applications must initialize the ``flags`` field, the ``fmt``
 substructure, and call :ref:`VIDIOC_S_FBUF <VIDIOC_G_FBUF>`. Again the driver prepares for
-the overlay and returns the framebuffer parameters as :ref:`VIDIOC_G_FBUF`
+the overlay and returns the framebuffer parameters as :ref:`VIDIOC_G_FBUF <VIDIOC_G_FBUF>`
 does, or it returns an error code.
 
 For a *destructive Video Overlay* applications must additionally provide
Documentation/linux_tv/media/v4l/vidioc-g-fmt.rst +3 -3
index 8c07fe2454e2..3ac4fb764a7e 100644
@@ -41,7 +41,7 @@ struct :c:type:`struct v4l2_format` to the respective buffer (stream)
 type. For example video capture devices use
 ``V4L2_BUF_TYPE_VIDEO_CAPTURE`` or
 ``V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE``. When the application calls the
-:ref:`VIDIOC_G_FMT` ioctl with a pointer to this structure the driver fills
+:ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>` ioctl with a pointer to this structure the driver fills
 the respective member of the ``fmt`` union. In case of video capture
 devices that is either the struct
 :ref:`v4l2_pix_format <v4l2-pix-format>` ``pix`` or the struct
@@ -62,10 +62,10 @@ this is a mechanism to fathom device capabilities and to approach
 parameters acceptable for both the application and driver. On success
 the driver may program the hardware, allocate resources and generally
 prepare for data exchange. Finally the :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl returns
-the current format parameters as :ref:`VIDIOC_G_FMT` does. Very simple,
+the current format parameters as :ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>` does. Very simple,
 inflexible devices may even ignore all input and always return the
 default parameters. However all V4L2 devices exchanging data with the
-application must implement the :ref:`VIDIOC_G_FMT` and :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>`
+application must implement the :ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>` and :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>`
 ioctl. When the requested buffer type is not supported drivers return an
 EINVAL error code on a :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` attempt. When I/O is already in
 progress or the resource is not available for other reasons drivers
Documentation/linux_tv/media/v4l/vidioc-g-frequency.rst +1 -1
index 19a5ae9c4bcd..b187f1345bb4 100644
@@ -39,7 +39,7 @@ the ``tuner`` field of a struct
 :ref:`v4l2_frequency <v4l2-frequency>` to the respective tuner or
 modulator number (only input devices have tuners, only output devices
 have modulators), zero out the ``reserved`` array and call the
-:ref:`VIDIOC_G_FREQUENCY` ioctl with a pointer to this structure. The
+:ref:`VIDIOC_G_FREQUENCY <VIDIOC_G_FREQUENCY>` ioctl with a pointer to this structure. The
 driver stores the current frequency in the ``frequency`` field.
 
 To change the current tuner or modulator radio frequency applications
Documentation/linux_tv/media/v4l/vidioc-g-input.rst +1 -1
index 2bcaa324aa33..bb5944449650 100644
@@ -33,7 +33,7 @@ Description
 ===========
 
 To query the current video input applications call the
-:ref:`VIDIOC_G_INPUT` ioctl with a pointer to an integer where the driver
+:ref:`VIDIOC_G_INPUT <VIDIOC_G_INPUT>` ioctl with a pointer to an integer where the driver
 stores the number of the input, as in the struct
 :ref:`v4l2_input <v4l2-input>` ``index`` field. This ioctl will fail
 only when there are no video inputs, returning EINVAL.
Documentation/linux_tv/media/v4l/vidioc-g-modulator.rst +1 -1
index 83e761eaef2b..913b7d96faba 100644
@@ -37,7 +37,7 @@ Description
 To query the attributes of a modulator applications initialize the
 ``index`` field and zero out the ``reserved`` array of a struct
 :ref:`v4l2_modulator <v4l2-modulator>` and call the
-:ref:`VIDIOC_G_MODULATOR` ioctl with a pointer to this structure. Drivers
+:ref:`VIDIOC_G_MODULATOR <VIDIOC_G_MODULATOR>` ioctl with a pointer to this structure. Drivers
 fill the rest of the structure or return an EINVAL error code when the
 index is out of bounds. To enumerate all modulators applications shall
 begin at index zero, incrementing by one until the driver returns
Documentation/linux_tv/media/v4l/vidioc-g-output.rst +1 -1
index ebed04ae48da..e48bf39cfa10 100644
@@ -33,7 +33,7 @@ Description
 ===========
 
 To query the current video output applications call the
-:ref:`VIDIOC_G_OUTPUT` ioctl with a pointer to an integer where the driver
+:ref:`VIDIOC_G_OUTPUT <VIDIOC_G_OUTPUT>` ioctl with a pointer to an integer where the driver
 stores the number of the output, as in the struct
 :ref:`v4l2_output <v4l2-output>` ``index`` field. This ioctl will
 fail only when there are no video outputs, returning the EINVAL error
Documentation/linux_tv/media/v4l/vidioc-g-parm.rst +1 -1
index 906faaa85bfa..0567fce18144 100644
@@ -44,7 +44,7 @@ internally by a driver in read/write mode. For implications see the
 section discussing the :ref:`read() <func-read>` function.
 
 To get and set the streaming parameters applications call the
-:ref:`VIDIOC_G_PARM` and :ref:`VIDIOC_S_PARM <VIDIOC_G_PARM>` ioctl, respectively. They take a
+:ref:`VIDIOC_G_PARM <VIDIOC_G_PARM>` and :ref:`VIDIOC_S_PARM <VIDIOC_G_PARM>` ioctl, respectively. They take a
 pointer to a struct :c:type:`struct v4l2_streamparm` which contains a
 union holding separate parameters for input and output devices.
 
Documentation/linux_tv/media/v4l/vidioc-g-priority.rst +1 -1
index db95647d3a80..b241970c8aee 100644
@@ -36,7 +36,7 @@ Description
 ===========
 
 To query the current access priority applications call the
-:ref:`VIDIOC_G_PRIORITY` ioctl with a pointer to an enum v4l2_priority
+:ref:`VIDIOC_G_PRIORITY <VIDIOC_G_PRIORITY>` ioctl with a pointer to an enum v4l2_priority
 variable where the driver stores the current priority.
 
 To request an access priority applications store the desired priority in
Documentation/linux_tv/media/v4l/vidioc-g-sliced-vbi-cap.rst +1 -1
index 635cb9b2c250..a051f93252d0 100644
@@ -34,7 +34,7 @@ Description
 To find out which data services are supported by a sliced VBI capture or
 output device, applications initialize the ``type`` field of a struct
 :ref:`v4l2_sliced_vbi_cap <v4l2-sliced-vbi-cap>`, clear the
-``reserved`` array and call the :ref:`VIDIOC_G_SLICED_VBI_CAP` ioctl. The
+``reserved`` array and call the :ref:`VIDIOC_G_SLICED_VBI_CAP <VIDIOC_G_SLICED_VBI_CAP>` ioctl. The
 driver fills in the remaining fields or returns an EINVAL error code if
 the sliced VBI API is unsupported or ``type`` is invalid.
 
Documentation/linux_tv/media/v4l/vidioc-g-std.rst +3 -3
index bc8e071401b0..a7257f0b38a2 100644
@@ -35,15 +35,15 @@ Description
 ===========
 
 To query and select the current video standard applications use the
-:ref:`VIDIOC_G_STD` and :ref:`VIDIOC_S_STD <VIDIOC_G_STD>` ioctls which take a pointer to a
-:ref:`v4l2_std_id <v4l2-std-id>` type as argument. :ref:`VIDIOC_G_STD`
+:ref:`VIDIOC_G_STD <VIDIOC_G_STD>` and :ref:`VIDIOC_S_STD <VIDIOC_G_STD>` ioctls which take a pointer to a
+:ref:`v4l2_std_id <v4l2-std-id>` type as argument. :ref:`VIDIOC_G_STD <VIDIOC_G_STD>`
 can return a single flag or a set of flags as in struct
 :ref:`v4l2_standard <v4l2-standard>` field ``id``. The flags must be
 unambiguous such that they appear in only one enumerated
 :c:type:`struct v4l2_standard` structure.
 
 :ref:`VIDIOC_S_STD <VIDIOC_G_STD>` accepts one or more flags, being a write-only ioctl it
-does not return the actual new standard as :ref:`VIDIOC_G_STD` does. When
+does not return the actual new standard as :ref:`VIDIOC_G_STD <VIDIOC_G_STD>` does. When
 no flags are given or the current input does not support the requested
 standard the driver returns an EINVAL error code. When the standard set
 is ambiguous drivers may return EINVAL or choose any of the requested
Documentation/linux_tv/media/v4l/vidioc-queryctrl.rst +1 -1
index 2b11efc3d257..7d38a51c4f73 100644
@@ -569,7 +569,7 @@ See also the examples in :ref:`control`.
           :ref:`VIDIOC_S_EXT_CTRLS <VIDIOC_G_EXT_CTRLS>` you need to
           set the ``size`` field of struct
           :ref:`v4l2_ext_control <v4l2-ext-control>` to 9. For
-          :ref:`VIDIOC_G_EXT_CTRLS` you can set
+          :ref:`VIDIOC_G_EXT_CTRLS <VIDIOC_G_EXT_CTRLS>` you can set
           the ``size`` field to ``maximum`` + 1. Which character encoding is
           used will depend on the string control itself and should be part
           of the control documentation.
Signature · 1 line
2.7.4
#15 lore raw

PATCH 15/51 Documentation: audio.rst: re-add captions for the examples

In reply to Mauro Carvalho Chehab

The captions were lost during the format conversion.

---
 Documentation/linux_tv/media/v4l/audio.rst | 2 ++
 1 file changed, 2 insertions(+)
Documentation/linux_tv/media/v4l/audio.rst +2 -0
index 8c3314218f75..e9d99f6a259a 100644
@@ -55,6 +55,7 @@ the :ref:`VIDIOC_QUERYCAP` ioctl.
 
 
 .. code-block:: c
+    :caption: Example 3: Information about the current audio input
 
     struct v4l2_audio audio;
 
@@ -69,6 +70,7 @@ the :ref:`VIDIOC_QUERYCAP` ioctl.
 
 
 .. code-block:: c
+    :caption: Example 4: Switching to the first audio input
 
     struct v4l2_audio audio;
 
Signature · 1 line
2.7.4
#16 lore raw

PATCH 16/51 Documentation: standard.rst: read the example captions

In reply to Mauro Carvalho Chehab

Those got lost during format conversion.

---
 Documentation/linux_tv/media/v4l/standard.rst | 3 +++
 1 file changed, 3 insertions(+)
Documentation/linux_tv/media/v4l/standard.rst +3 -0
index 20c0d044a129..11d1a7183c73 100644
@@ -66,6 +66,7 @@ standard ioctls can be used with the given input or output.
 
 
 .. code-block:: c
+    :caption: Example 5: Information about the current video standard
 
     v4l2_std_id std_id;
     struct v4l2_standard standard;
@@ -101,6 +102,7 @@ standard ioctls can be used with the given input or output.
 
 
 .. code-block:: c
+    :caption: Example 6: Listing the video standards supported by the current input
 
     struct v4l2_input input;
     struct v4l2_standard standard;
@@ -139,6 +141,7 @@ standard ioctls can be used with the given input or output.
 
 
 .. code-block:: c
+    :caption: Example 7: Selecting a new video standard
 
     struct v4l2_input input;
     v4l2_std_id std_id;
Signature · 1 line
2.7.4
#17 lore raw

PATCH 17/51 Documentation: linux_tv: remove controls.rst

In reply to Mauro Carvalho Chehab

This auto-generated file is bogus: it just adds a toc for two other files. Instead, just move the controls and extended-controls directly to the common.rst file.

this avoids a blank page, and better organize the document.

---
 Documentation/linux_tv/media/v4l/common.rst   |  3 ++-
 Documentation/linux_tv/media/v4l/controls.rst | 18 ------------------
 2 files changed, 2 insertions(+), 19 deletions(-)
 delete mode 100644 Documentation/linux_tv/media/v4l/controls.rst
Documentation/linux_tv/media/v4l/common.rst +2 -1
index 0e85b46b2efc..40d3feab5ab9 100644
@@ -37,7 +37,8 @@ applicable to all devices.
     tuner
     standard
     dv-timings
-    controls
+    control
+    extended-controls
     format
     planar-apis
     crop
Documentation/linux_tv/media/v4l/controls.rst deleted +0 -18
deleted file mode 100644
index fe5bca543699..000000000000
@@ -1,18 +0,0 @@
-.. -*- coding: utf-8; mode: rst -*-
-
-.. toctree::
-    :maxdepth: 1
-
-    control
-    extended-controls
-
-
-
-
-.. ------------------------------------------------------------------------------
-.. This file was automatically converted from DocBook-XML with the dbxml
-.. library (https://github.com/return42/sphkerneldoc). The origin XML comes
-.. from the linux kernel, refer to:
-..
-.. * https://github.com/torvalds/linux/tree/master/Documentation/DocBook
-.. ------------------------------------------------------------------------------
Signature · 1 line
2.7.4
#18 lore raw

PATCH 18/51 Documentation: control.rst: read the example captions

In reply to Mauro Carvalho Chehab

Those got removed by the doc conversion.

---
 Documentation/linux_tv/media/v4l/control.rst | 4 ++++
 1 file changed, 4 insertions(+)
Documentation/linux_tv/media/v4l/control.rst +4 -0
index d6df648767c5..5defd1995e13 100644
@@ -372,6 +372,8 @@ more menu type controls.
 
 
 .. code-block:: c
+    :caption: Example 8: Enumerating all user controls
+
 
     struct v4l2_queryctrl queryctrl;
     struct v4l2_querymenu querymenu;
@@ -435,6 +437,7 @@ more menu type controls.
 
 
 .. code-block:: c
+    :caption: Example 9: Enumerating all user controls (alternative)
 
     memset(&queryctrl, 0, sizeof(queryctrl));
 
@@ -459,6 +462,7 @@ more menu type controls.
 
 
 .. code-block:: c
+    :caption: Example 10: Changing controls
 
     struct v4l2_queryctrl queryctrl;
     struct v4l2_control control;
Signature · 1 line
2.7.4
#19 lore raw

PATCH 19/51 Documentation: control.rst: Fix missing reference for example 8

In reply to Mauro Carvalho Chehab

The conversion broke references and captions for examples.

Fix the missing reference for control enumeration.

---
 Documentation/linux_tv/media/v4l/control.rst | 2 ++
 1 file changed, 2 insertions(+)
Documentation/linux_tv/media/v4l/control.rst +2 -0
index 5defd1995e13..736d79080229 100644
@@ -371,6 +371,8 @@ device has one or more controls, ``VIDIOC_QUERYMENU`` when it has one or
 more menu type controls.
 
 
+.. _enum_all_controls:
+
 .. code-block:: c
     :caption: Example 8: Enumerating all user controls
 
Signature · 1 line
2.7.4
#20 lore raw

PATCH 20/51 Documentation: extended-controls.rst: use reference for VIDIOC_S_CTRL

In reply to Mauro Carvalho Chehab

Instead of using a constant, use references, just like the other references for ioctl's.

---
 Documentation/linux_tv/media/v4l/extended-controls.rst | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
Documentation/linux_tv/media/v4l/extended-controls.rst +3 -3
index 38b85d7b1022..d5efb5bbf5bf 100644
@@ -54,9 +54,9 @@ contains a pointer to the control array, a count of the number of
 controls in that array and a control class. Control classes are used to
 group similar controls into a single class. For example, control class
 ``V4L2_CTRL_CLASS_USER`` contains all user controls (i. e. all controls
-that can also be set using the old ``VIDIOC_S_CTRL`` ioctl). Control
-class ``V4L2_CTRL_CLASS_MPEG`` contains all controls relating to MPEG
-encoding, etc.
+that can also be set using the old :ref:`VIDIOC_S_CTRL <VIDIOC_G_CTRL>`
+ioctl). Control class ``V4L2_CTRL_CLASS_MPEG`` contains all controls
+relating to MPEG encoding, etc.
 
 All controls in the control array must belong to the specified control
 class. An error is returned if this is not the case.
Signature · 1 line
2.7.4
#21 lore raw

PATCH 21/51 Documentation: vidioc-queryctl.rst: change the title of this chapter

In reply to Mauro Carvalho Chehab

This chapter is referenced on several parts of the extended controls. Change the title to make it nicer where it is referenced.

Ok, we might, instead, just change the name for the references to only mention the oldest ioctl, but IMHO, it is better to keep the name of all ioctls where it is referenced.

---
 Documentation/linux_tv/media/v4l/vidioc-queryctrl.rst | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
Documentation/linux_tv/media/v4l/vidioc-queryctrl.rst +3 -3
index 7d38a51c4f73..2e93caeafe9e 100644
@@ -2,9 +2,9 @@
 
 .. _VIDIOC_QUERYCTRL:
 
-***************************************************************
-ioctl VIDIOC_QUERYCTRL, VIDIOC_QUERY_EXT_CTRL, VIDIOC_QUERYMENU
-***************************************************************
+*******************************************************************
+ioctls VIDIOC_QUERYCTRL, VIDIOC_QUERY_EXT_CTRL and VIDIOC_QUERYMENU
+*******************************************************************
 
 *man VIDIOC_QUERYCTRL(2)*
 
Signature · 1 line
2.7.4
#22 lore raw

PATCH 22/51 Documentation: linux_tv: supress lots of warnings

In reply to Mauro Carvalho Chehab

The c language parser checks if there are duplicated object definitions. That causes lots of warnings like:
WARNING: duplicate C object description of ioctl

Let's remove those by telling Sphinx that the language for those objects are c++. The look of the descriptions will be close, and the warnings will be gone.

Please notice that we had to keep a few of them as C, as the c++ parser seems to be broken when it finds an enum.

Yet, this reduced from 219 warnings to 143, with is a good thing.

---
 Documentation/linux_tv/media/dvb/fe-diseqc-recv-slave-reply.rst     | 2 +-
 Documentation/linux_tv/media/dvb/fe-diseqc-reset-overload.rst       | 2 +-
 Documentation/linux_tv/media/dvb/fe-diseqc-send-master-cmd.rst      | 2 +-
 Documentation/linux_tv/media/dvb/fe-enable-high-lnb-voltage.rst     | 2 +-
 Documentation/linux_tv/media/dvb/fe-get-info.rst                    | 2 +-
 Documentation/linux_tv/media/dvb/fe-get-property.rst                | 2 +-
 Documentation/linux_tv/media/dvb/fe-read-status.rst                 | 2 +-
 Documentation/linux_tv/media/dvb/fe-set-frontend-tune-mode.rst      | 2 +-
 Documentation/linux_tv/media/dvb/frontend_f_close.rst               | 2 +-
 Documentation/linux_tv/media/dvb/frontend_f_open.rst                | 2 +-
 Documentation/linux_tv/media/dvb/net.rst                            | 6 +++---
 Documentation/linux_tv/media/v4l/func-close.rst                     | 2 +-
 Documentation/linux_tv/media/v4l/func-ioctl.rst                     | 2 +-
 Documentation/linux_tv/media/v4l/func-mmap.rst                      | 2 +-
 Documentation/linux_tv/media/v4l/func-munmap.rst                    | 2 +-
 Documentation/linux_tv/media/v4l/func-open.rst                      | 2 +-
 Documentation/linux_tv/media/v4l/func-poll.rst                      | 2 +-
 Documentation/linux_tv/media/v4l/func-read.rst                      | 2 +-
 Documentation/linux_tv/media/v4l/func-select.rst                    | 2 +-
 Documentation/linux_tv/media/v4l/func-write.rst                     | 2 +-
 Documentation/linux_tv/media/v4l/media-func-close.rst               | 2 +-
 Documentation/linux_tv/media/v4l/media-func-ioctl.rst               | 2 +-
 Documentation/linux_tv/media/v4l/media-func-open.rst                | 2 +-
 Documentation/linux_tv/media/v4l/media-ioc-device-info.rst          | 2 +-
 Documentation/linux_tv/media/v4l/media-ioc-enum-entities.rst        | 2 +-
 Documentation/linux_tv/media/v4l/media-ioc-enum-links.rst           | 2 +-
 Documentation/linux_tv/media/v4l/media-ioc-g-topology.rst           | 2 +-
 Documentation/linux_tv/media/v4l/media-ioc-setup-link.rst           | 2 +-
 Documentation/linux_tv/media/v4l/vidioc-create-bufs.rst             | 2 +-
 Documentation/linux_tv/media/v4l/vidioc-cropcap.rst                 | 2 +-
 Documentation/linux_tv/media/v4l/vidioc-dbg-g-chip-info.rst         | 2 +-
 Documentation/linux_tv/media/v4l/vidioc-dbg-g-register.rst          | 4 ++--
 Documentation/linux_tv/media/v4l/vidioc-decoder-cmd.rst             | 2 +-
 Documentation/linux_tv/media/v4l/vidioc-dqevent.rst                 | 2 +-
 Documentation/linux_tv/media/v4l/vidioc-dv-timings-cap.rst          | 2 +-
 Documentation/linux_tv/media/v4l/vidioc-encoder-cmd.rst             | 2 +-
 Documentation/linux_tv/media/v4l/vidioc-enum-dv-timings.rst         | 2 +-
 Documentation/linux_tv/media/v4l/vidioc-enum-fmt.rst                | 2 +-
 Documentation/linux_tv/media/v4l/vidioc-enum-frameintervals.rst     | 2 +-
 Documentation/linux_tv/media/v4l/vidioc-enum-framesizes.rst         | 2 +-
 Documentation/linux_tv/media/v4l/vidioc-enum-freq-bands.rst         | 2 +-
 Documentation/linux_tv/media/v4l/vidioc-enumaudio.rst               | 2 +-
 Documentation/linux_tv/media/v4l/vidioc-enumaudioout.rst            | 2 +-
 Documentation/linux_tv/media/v4l/vidioc-enuminput.rst               | 2 +-
 Documentation/linux_tv/media/v4l/vidioc-enumoutput.rst              | 2 +-
 Documentation/linux_tv/media/v4l/vidioc-enumstd.rst                 | 2 +-
 Documentation/linux_tv/media/v4l/vidioc-expbuf.rst                  | 2 +-
 Documentation/linux_tv/media/v4l/vidioc-g-audio.rst                 | 4 ++--
 Documentation/linux_tv/media/v4l/vidioc-g-audioout.rst              | 4 ++--
 Documentation/linux_tv/media/v4l/vidioc-g-crop.rst                  | 4 ++--
 Documentation/linux_tv/media/v4l/vidioc-g-ctrl.rst                  | 2 +-
 Documentation/linux_tv/media/v4l/vidioc-g-dv-timings.rst            | 2 +-
 Documentation/linux_tv/media/v4l/vidioc-g-edid.rst                  | 4 ++--
 Documentation/linux_tv/media/v4l/vidioc-g-enc-index.rst             | 2 +-
 Documentation/linux_tv/media/v4l/vidioc-g-ext-ctrls.rst             | 2 +-
 Documentation/linux_tv/media/v4l/vidioc-g-fbuf.rst                  | 4 ++--
 Documentation/linux_tv/media/v4l/vidioc-g-fmt.rst                   | 2 +-
 Documentation/linux_tv/media/v4l/vidioc-g-frequency.rst             | 4 ++--
 Documentation/linux_tv/media/v4l/vidioc-g-input.rst                 | 2 +-
 Documentation/linux_tv/media/v4l/vidioc-g-jpegcomp.rst              | 4 ++--
 Documentation/linux_tv/media/v4l/vidioc-g-modulator.rst             | 4 ++--
 Documentation/linux_tv/media/v4l/vidioc-g-output.rst                | 2 +-
 Documentation/linux_tv/media/v4l/vidioc-g-parm.rst                  | 2 +-
 Documentation/linux_tv/media/v4l/vidioc-g-selection.rst             | 2 +-
 Documentation/linux_tv/media/v4l/vidioc-g-sliced-vbi-cap.rst        | 2 +-
 Documentation/linux_tv/media/v4l/vidioc-g-std.rst                   | 4 ++--
 Documentation/linux_tv/media/v4l/vidioc-g-tuner.rst                 | 4 ++--
 Documentation/linux_tv/media/v4l/vidioc-log-status.rst              | 2 +-
 Documentation/linux_tv/media/v4l/vidioc-overlay.rst                 | 2 +-
 Documentation/linux_tv/media/v4l/vidioc-prepare-buf.rst             | 2 +-
 Documentation/linux_tv/media/v4l/vidioc-qbuf.rst                    | 2 +-
 Documentation/linux_tv/media/v4l/vidioc-query-dv-timings.rst        | 2 +-
 Documentation/linux_tv/media/v4l/vidioc-querybuf.rst                | 2 +-
 Documentation/linux_tv/media/v4l/vidioc-querycap.rst                | 2 +-
 Documentation/linux_tv/media/v4l/vidioc-queryctrl.rst               | 6 +++---
 Documentation/linux_tv/media/v4l/vidioc-querystd.rst                | 2 +-
 Documentation/linux_tv/media/v4l/vidioc-reqbufs.rst                 | 2 +-
 Documentation/linux_tv/media/v4l/vidioc-s-hw-freq-seek.rst          | 2 +-
 Documentation/linux_tv/media/v4l/vidioc-streamon.rst                | 2 +-
 .../linux_tv/media/v4l/vidioc-subdev-enum-frame-interval.rst        | 2 +-
 Documentation/linux_tv/media/v4l/vidioc-subdev-enum-frame-size.rst  | 2 +-
 Documentation/linux_tv/media/v4l/vidioc-subdev-enum-mbus-code.rst   | 2 +-
 Documentation/linux_tv/media/v4l/vidioc-subdev-g-crop.rst           | 4 ++--
 Documentation/linux_tv/media/v4l/vidioc-subdev-g-fmt.rst            | 2 +-
 Documentation/linux_tv/media/v4l/vidioc-subdev-g-frame-interval.rst | 2 +-
 Documentation/linux_tv/media/v4l/vidioc-subdev-g-selection.rst      | 2 +-
 Documentation/linux_tv/media/v4l/vidioc-subscribe-event.rst         | 2 +-
 scripts/kernel-doc                                                  | 2 +-
 88 files changed, 104 insertions(+), 104 deletions(-)
 mode change 100755 => 100644 scripts/kernel-doc
Documentation/linux_tv/media/dvb/fe-diseqc-recv-slave-reply.rst +1 -1
index 309930f9b3cd..0f01584c8d4e 100644
@@ -14,7 +14,7 @@ Receives reply from a DiSEqC 2.0 command
 Synopsis
 ========
 
-.. c:function:: int ioctl( int fd, int request, struct dvb_diseqc_slave_reply *argp )
+.. cpp:function:: int ioctl( int fd, int request, struct dvb_diseqc_slave_reply *argp )
 
 Arguments
 =========
Documentation/linux_tv/media/dvb/fe-diseqc-reset-overload.rst +1 -1
index dc7ae1a02725..50d0d651d270 100644
@@ -15,7 +15,7 @@ to power overload.
 Synopsis
 ========
 
-.. c:function:: int ioctl( int fd, int request, NULL )
+.. cpp:function:: int ioctl( int fd, int request, NULL )
 
 Arguments
 =========
Documentation/linux_tv/media/dvb/fe-diseqc-send-master-cmd.rst +1 -1
index 974a45f632a6..7a85632e64b4 100644
@@ -14,7 +14,7 @@ Sends a DiSEqC command
 Synopsis
 ========
 
-.. c:function:: int ioctl( int fd, int request, struct dvb_diseqc_master_cmd *argp )
+.. cpp:function:: int ioctl( int fd, int request, struct dvb_diseqc_master_cmd *argp )
 
 Arguments
 =========
Documentation/linux_tv/media/dvb/fe-enable-high-lnb-voltage.rst +1 -1
index 207c65a44120..f2705a383d8c 100644
@@ -15,7 +15,7 @@ voltages.
 Synopsis
 ========
 
-.. c:function:: int ioctl( int fd, int request, unsigned int high )
+.. cpp:function:: int ioctl( int fd, int request, unsigned int high )
 
 Arguments
 =========
Documentation/linux_tv/media/dvb/fe-get-info.rst +1 -1
index 5ac74c232b12..d7990c80ef87 100644
@@ -15,7 +15,7 @@ front-end. This call only requires read-only access to the device
 Synopsis
 ========
 
-.. c:function:: int ioctl( int fd, int request, struct dvb_frontend_info *argp )
+.. cpp:function:: int ioctl( int fd, int request, struct dvb_frontend_info *argp )
 
 Arguments
 =========
Documentation/linux_tv/media/dvb/fe-get-property.rst +1 -1
index 8a6c5de041e8..5b73ee8e790b 100644
@@ -16,7 +16,7 @@ FE_GET_PROPERTY returns one or more frontend properties.
 Synopsis
 ========
 
-.. c:function:: int ioctl( int fd, int request, struct dtv_properties *argp )
+.. cpp:function:: int ioctl( int fd, int request, struct dtv_properties *argp )
 
 Arguments
 =========
Documentation/linux_tv/media/dvb/fe-read-status.rst +1 -1
index 41396a8f1c3d..c032cda4e5a6 100644
@@ -15,7 +15,7 @@ read-only access to the device
 Synopsis
 ========
 
-.. c:function:: int ioctl( int fd, int request, unsigned int *status )
+.. cpp:function:: int ioctl( int fd, int request, unsigned int *status )
 
 Arguments
 =========
Documentation/linux_tv/media/dvb/fe-set-frontend-tune-mode.rst +1 -1
index 1167d22c2382..82665279b840 100644
@@ -14,7 +14,7 @@ Allow setting tuner mode flags to the frontend.
 Synopsis
 ========
 
-.. c:function:: int ioctl( int fd, int request, unsigned int flags )
+.. cpp:function:: int ioctl( int fd, int request, unsigned int flags )
 
 Arguments
 =========
Documentation/linux_tv/media/dvb/frontend_f_close.rst +1 -1
index cde87322859a..faae1c7381e2 100644
@@ -19,7 +19,7 @@ Synopsis
     #include <unistd.h>
 
 
-.. c:function:: int close( int fd )
+.. cpp:function:: int close( int fd )
 
 Arguments
 =========
Documentation/linux_tv/media/dvb/frontend_f_open.rst +1 -1
index 91ac9ef8c356..9ef430abcba4 100644
@@ -19,7 +19,7 @@ Synopsis
     #include <fcntl.h>
 
 
-.. c:function:: int open( const char *device_name, int flags )
+.. cpp:function:: int open( const char *device_name, int flags )
 
 Arguments
 =========
Documentation/linux_tv/media/dvb/net.rst +3 -3
index 040ffc70601d..830076fadda2 100644
@@ -46,7 +46,7 @@ Creates a new network interface for a given Packet ID.
 Synopsis
 ========
 
-.. c:function:: int ioctl( int fd, int request, struct dvb_net_if *net_if )
+.. cpp:function:: int ioctl( int fd, int request, struct dvb_net_if *net_if )
 
 Arguments
 =========
@@ -135,7 +135,7 @@ Removes a network interface.
 Synopsis
 ========
 
-.. c:function:: int ioctl( int fd, int request, int ifnum )
+.. cpp:function:: int ioctl( int fd, int request, int ifnum )
 
 Arguments
 =========
@@ -178,7 +178,7 @@ Read the configuration data of an interface created via
 Synopsis
 ========
 
-.. c:function:: int ioctl( int fd, int request, struct dvb_net_if *net_if )
+.. cpp:function:: int ioctl( int fd, int request, struct dvb_net_if *net_if )
 
 Arguments
 =========
Documentation/linux_tv/media/v4l/func-close.rst +1 -1
index 28fd055bf71b..991a34a163af 100644
@@ -19,7 +19,7 @@ Synopsis
     #include <unistd.h>
 
 
-.. c:function:: int close( int fd )
+.. cpp:function:: int close( int fd )
 
 Arguments
 =========
Documentation/linux_tv/media/v4l/func-ioctl.rst +1 -1
index 774ac4cbb6b8..26b072cfe850 100644
@@ -19,7 +19,7 @@ Synopsis
     #include <sys/ioctl.h>
 
 
-.. c:function:: int ioctl( int fd, int request, void *argp )
+.. cpp:function:: int ioctl( int fd, int request, void *argp )
 
 Arguments
 =========
Documentation/linux_tv/media/v4l/func-mmap.rst +1 -1
index b908c0253c07..51502a906c3c 100644
@@ -20,7 +20,7 @@ Synopsis
     #include <sys/mman.h>
 
 
-.. c:function:: void *mmap( void *start, size_t length, int prot, int flags, int fd, off_t offset )
+.. cpp:function:: void *mmap( void *start, size_t length, int prot, int flags, int fd, off_t offset )
 
 Arguments
 =========
Documentation/linux_tv/media/v4l/func-munmap.rst +1 -1
index 46c837457cae..80f9ecd92774 100644
@@ -20,7 +20,7 @@ Synopsis
     #include <sys/mman.h>
 
 
-.. c:function:: int munmap( void *start, size_t length )
+.. cpp:function:: int munmap( void *start, size_t length )
 
 Arguments
 =========
Documentation/linux_tv/media/v4l/func-open.rst +1 -1
index 370a6858d65d..06937b925be3 100644
@@ -19,7 +19,7 @@ Synopsis
     #include <fcntl.h>
 
 
-.. c:function:: int open( const char *device_name, int flags )
+.. cpp:function:: int open( const char *device_name, int flags )
 
 Arguments
 =========
Documentation/linux_tv/media/v4l/func-poll.rst +1 -1
index 782531fe964c..2de7f8a3a971 100644
@@ -19,7 +19,7 @@ Synopsis
     #include <sys/poll.h>
 
 
-.. c:function:: int poll( struct pollfd *ufds, unsigned int nfds, int timeout )
+.. cpp:function:: int poll( struct pollfd *ufds, unsigned int nfds, int timeout )
 
 Description
 ===========
Documentation/linux_tv/media/v4l/func-read.rst +1 -1
index 497bc9a9dd5a..94349fa19215 100644
@@ -19,7 +19,7 @@ Synopsis
     #include <unistd.h>
 
 
-.. c:function:: ssize_t read( int fd, void *buf, size_t count )
+.. cpp:function:: ssize_t read( int fd, void *buf, size_t count )
 
 Arguments
 =========
Documentation/linux_tv/media/v4l/func-select.rst +1 -1
index 77302800e6ca..56d01b33e25d 100644
@@ -21,7 +21,7 @@ Synopsis
     #include <unistd.h>
 
 
-.. c:function:: int select( int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, struct timeval *timeout )
+.. cpp:function:: int select( int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, struct timeval *timeout )
 
 Description
 ===========
Documentation/linux_tv/media/v4l/func-write.rst +1 -1
index d2265ba0d92d..402beed3231c 100644
@@ -19,7 +19,7 @@ Synopsis
     #include <unistd.h>
 
 
-.. c:function:: ssize_t write( int fd, void *buf, size_t count )
+.. cpp:function:: ssize_t write( int fd, void *buf, size_t count )
 
 Arguments
 =========
Documentation/linux_tv/media/v4l/media-func-close.rst +1 -1
index 4049db61ac73..e142ee73d15d 100644
@@ -19,7 +19,7 @@ Synopsis
     #include <unistd.h>
 
 
-.. c:function:: int close( int fd )
+.. cpp:function:: int close( int fd )
 
 Arguments
 =========
Documentation/linux_tv/media/v4l/media-func-ioctl.rst +1 -1
index c07f4c05d0bc..7a5c01d6cb4a 100644
@@ -19,7 +19,7 @@ Synopsis
     #include <sys/ioctl.h>
 
 
-.. c:function:: int ioctl( int fd, int request, void *argp )
+.. cpp:function:: int ioctl( int fd, int request, void *argp )
 
 Arguments
 =========
Documentation/linux_tv/media/v4l/media-func-open.rst +1 -1
index 59b01c294c9c..573292ac9a94 100644
@@ -19,7 +19,7 @@ Synopsis
     #include <fcntl.h>
 
 
-.. c:function:: int open( const char *device_name, int flags )
+.. cpp:function:: int open( const char *device_name, int flags )
 
 Arguments
 =========
Documentation/linux_tv/media/v4l/media-ioc-device-info.rst +1 -1
index 7c1b3904fbb2..230f9fd9b4fb 100644
@@ -14,7 +14,7 @@ Query device information
 Synopsis
 ========
 
-.. c:function:: int ioctl( int fd, int request, struct media_device_info *argp )
+.. cpp:function:: int ioctl( int fd, int request, struct media_device_info *argp )
 
 Arguments
 =========
Documentation/linux_tv/media/v4l/media-ioc-enum-entities.rst +1 -1
index 842b05438edb..2549857e681e 100644
@@ -14,7 +14,7 @@ Enumerate entities and their properties
 Synopsis
 ========
 
-.. c:function:: int ioctl( int fd, int request, struct media_entity_desc *argp )
+.. cpp:function:: int ioctl( int fd, int request, struct media_entity_desc *argp )
 
 Arguments
 =========
Documentation/linux_tv/media/v4l/media-ioc-enum-links.rst +1 -1
index 17aeb6d210f6..f3a4e41b3696 100644
@@ -14,7 +14,7 @@ Enumerate all pads and links for a given entity
 Synopsis
 ========
 
-.. c:function:: int ioctl( int fd, int request, struct media_links_enum *argp )
+.. cpp:function:: int ioctl( int fd, int request, struct media_links_enum *argp )
 
 Arguments
 =========
Documentation/linux_tv/media/v4l/media-ioc-g-topology.rst +1 -1
index 65c817312df4..f22310319264 100644
@@ -14,7 +14,7 @@ Enumerate the graph topology and graph element properties
 Synopsis
 ========
 
-.. c:function:: int ioctl( int fd, int request, struct media_v2_topology *argp )
+.. cpp:function:: int ioctl( int fd, int request, struct media_v2_topology *argp )
 
 Arguments
 =========
Documentation/linux_tv/media/v4l/media-ioc-setup-link.rst +1 -1
index 969a71c61309..aa6495fe3608 100644
@@ -14,7 +14,7 @@ Modify the properties of a link
 Synopsis
 ========
 
-.. c:function:: int ioctl( int fd, int request, struct media_link_desc *argp )
+.. cpp:function:: int ioctl( int fd, int request, struct media_link_desc *argp )
 
 Arguments
 =========
Documentation/linux_tv/media/v4l/vidioc-create-bufs.rst +1 -1
index 53db867aa9db..fc9542e4204c 100644
@@ -14,7 +14,7 @@ Create buffers for Memory Mapped or User Pointer or DMA Buffer I/O
 Synopsis
 ========
 
-.. c:function:: int ioctl( int fd, int request, struct v4l2_create_buffers *argp )
+.. cpp:function:: int ioctl( int fd, int request, struct v4l2_create_buffers *argp )
 
 Arguments
 =========
Documentation/linux_tv/media/v4l/vidioc-cropcap.rst +1 -1
index 25ad9b29b160..22c4268ea54f 100644
@@ -14,7 +14,7 @@ Information about the video cropping and scaling abilities
 Synopsis
 ========
 
-.. c:function:: int ioctl( int fd, int request, struct v4l2_cropcap *argp )
+.. cpp:function:: int ioctl( int fd, int request, struct v4l2_cropcap *argp )
 
 Arguments
 =========
Documentation/linux_tv/media/v4l/vidioc-dbg-g-chip-info.rst +1 -1
index a1534a326bb3..4baf472b658b 100644
@@ -14,7 +14,7 @@ Identify the chips on a TV card
 Synopsis
 ========
 
-.. c:function:: int ioctl( int fd, int request, struct v4l2_dbg_chip_info *argp )
+.. cpp:function:: int ioctl( int fd, int request, struct v4l2_dbg_chip_info *argp )
 
 Arguments
 =========
Documentation/linux_tv/media/v4l/vidioc-dbg-g-register.rst +2 -2
index b50c1be72f15..2c5afc9a4012 100644
@@ -15,9 +15,9 @@ Read or write hardware registers
 Synopsis
 ========
 
-.. c:function:: int ioctl( int fd, int request, struct v4l2_dbg_register *argp )
+.. cpp:function:: int ioctl( int fd, int request, struct v4l2_dbg_register *argp )
 
-.. c:function:: int ioctl( int fd, int request, const struct v4l2_dbg_register *argp )
+.. cpp:function:: int ioctl( int fd, int request, const struct v4l2_dbg_register *argp )
 
 Arguments
 =========
Documentation/linux_tv/media/v4l/vidioc-decoder-cmd.rst +1 -1
index a56c5fc1ed6f..d3b3c8a2ad08 100644
@@ -15,7 +15,7 @@ Execute an decoder command
 Synopsis
 ========
 
-.. c:function:: int ioctl( int fd, int request, struct v4l2_decoder_cmd *argp )
+.. cpp:function:: int ioctl( int fd, int request, struct v4l2_decoder_cmd *argp )
 
 Arguments
 =========
Documentation/linux_tv/media/v4l/vidioc-dqevent.rst +1 -1
index 9e41fc818b90..509f0df19746 100644
@@ -14,7 +14,7 @@ Dequeue event
 Synopsis
 ========
 
-.. c:function:: int ioctl( int fd, int request, struct v4l2_event *argp )
+.. cpp:function:: int ioctl( int fd, int request, struct v4l2_event *argp )
 
 Arguments
 =========
Documentation/linux_tv/media/v4l/vidioc-dv-timings-cap.rst +1 -1
index b5b8e41dc693..50133087af5b 100644
@@ -15,7 +15,7 @@ The capabilities of the Digital Video receiver/transmitter
 Synopsis
 ========
 
-.. c:function:: int ioctl( int fd, int request, struct v4l2_dv_timings_cap *argp )
+.. cpp:function:: int ioctl( int fd, int request, struct v4l2_dv_timings_cap *argp )
 
 Arguments
 =========
Documentation/linux_tv/media/v4l/vidioc-encoder-cmd.rst +1 -1
index 43c7a3928e7b..7d029498d700 100644
@@ -15,7 +15,7 @@ Execute an encoder command
 Synopsis
 ========
 
-.. c:function:: int ioctl( int fd, int request, struct v4l2_encoder_cmd *argp )
+.. cpp:function:: int ioctl( int fd, int request, struct v4l2_encoder_cmd *argp )
 
 Arguments
 =========
Documentation/linux_tv/media/v4l/vidioc-enum-dv-timings.rst +1 -1
index 07462519cbf4..4639d9a9f0a6 100644
@@ -15,7 +15,7 @@ Enumerate supported Digital Video timings
 Synopsis
 ========
 
-.. c:function:: int ioctl( int fd, int request, struct v4l2_enum_dv_timings *argp )
+.. cpp:function:: int ioctl( int fd, int request, struct v4l2_enum_dv_timings *argp )
 
 Arguments
 =========
Documentation/linux_tv/media/v4l/vidioc-enum-fmt.rst +1 -1
index c838f3dbb808..a20ed3ae3417 100644
@@ -14,7 +14,7 @@ Enumerate image formats
 Synopsis
 ========
 
-.. c:function:: int ioctl( int fd, int request, struct v4l2_fmtdesc *argp )
+.. cpp:function:: int ioctl( int fd, int request, struct v4l2_fmtdesc *argp )
 
 Arguments
 =========
Documentation/linux_tv/media/v4l/vidioc-enum-frameintervals.rst +1 -1
index a9182898b6dc..24acbd928b9c 100644
@@ -14,7 +14,7 @@ Enumerate frame intervals
 Synopsis
 ========
 
-.. c:function:: int ioctl( int fd, int request, struct v4l2_frmivalenum *argp )
+.. cpp:function:: int ioctl( int fd, int request, struct v4l2_frmivalenum *argp )
 
 Arguments
 =========
Documentation/linux_tv/media/v4l/vidioc-enum-framesizes.rst +1 -1
index 5e171dbc975c..1d2969220857 100644
@@ -14,7 +14,7 @@ Enumerate frame sizes
 Synopsis
 ========
 
-.. c:function:: int ioctl( int fd, int request, struct v4l2_frmsizeenum *argp )
+.. cpp:function:: int ioctl( int fd, int request, struct v4l2_frmsizeenum *argp )
 
 Arguments
 =========
Documentation/linux_tv/media/v4l/vidioc-enum-freq-bands.rst +1 -1
index 3999c419589a..bc0826bec1cb 100644
@@ -14,7 +14,7 @@ Enumerate supported frequency bands
 Synopsis
 ========
 
-.. c:function:: int ioctl( int fd, int request, struct v4l2_frequency_band *argp )
+.. cpp:function:: int ioctl( int fd, int request, struct v4l2_frequency_band *argp )
 
 Arguments
 =========
Documentation/linux_tv/media/v4l/vidioc-enumaudio.rst +1 -1
index 8ae7b8bd9333..32ef1fcb013d 100644
@@ -14,7 +14,7 @@ Enumerate audio inputs
 Synopsis
 ========
 
-.. c:function:: int ioctl( int fd, int request, struct v4l2_audio *argp )
+.. cpp:function:: int ioctl( int fd, int request, struct v4l2_audio *argp )
 
 Arguments
 =========
Documentation/linux_tv/media/v4l/vidioc-enumaudioout.rst +1 -1
index 0e45f41fa608..8412f1c0e4cf 100644
@@ -14,7 +14,7 @@ Enumerate audio outputs
 Synopsis
 ========
 
-.. c:function:: int ioctl( int fd, int request, struct v4l2_audioout *argp )
+.. cpp:function:: int ioctl( int fd, int request, struct v4l2_audioout *argp )
 
 Arguments
 =========
Documentation/linux_tv/media/v4l/vidioc-enuminput.rst +1 -1
index 131f331462b1..3b0577a307e9 100644
@@ -14,7 +14,7 @@ Enumerate video inputs
 Synopsis
 ========
 
-.. c:function:: int ioctl( int fd, int request, struct v4l2_input *argp )
+.. cpp:function:: int ioctl( int fd, int request, struct v4l2_input *argp )
 
 Arguments
 =========
Documentation/linux_tv/media/v4l/vidioc-enumoutput.rst +1 -1
index cb0107b9c03b..1ad68a88e594 100644
@@ -14,7 +14,7 @@ Enumerate video outputs
 Synopsis
 ========
 
-.. c:function:: int ioctl( int fd, int request, struct v4l2_output *argp )
+.. cpp:function:: int ioctl( int fd, int request, struct v4l2_output *argp )
 
 Arguments
 =========
Documentation/linux_tv/media/v4l/vidioc-enumstd.rst +1 -1
index 03353b92449a..6421b37b5ace 100644
@@ -14,7 +14,7 @@ Enumerate supported video standards
 Synopsis
 ========
 
-.. c:function:: int ioctl( int fd, int request, struct v4l2_standard *argp )
+.. cpp:function:: int ioctl( int fd, int request, struct v4l2_standard *argp )
 
 Arguments
 =========
Documentation/linux_tv/media/v4l/vidioc-expbuf.rst +1 -1
index 2933640e8c4e..04216a0d658e 100644
@@ -14,7 +14,7 @@ Export a buffer as a DMABUF file descriptor.
 Synopsis
 ========
 
-.. c:function:: int ioctl( int fd, int request, struct v4l2_exportbuffer *argp )
+.. cpp:function:: int ioctl( int fd, int request, struct v4l2_exportbuffer *argp )
 
 Arguments
 =========
Documentation/linux_tv/media/v4l/vidioc-g-audio.rst +2 -2
index 4b79523bfbab..66d74f3964f3 100644
@@ -15,9 +15,9 @@ Query or select the current audio input and its attributes
 Synopsis
 ========
 
-.. c:function:: int ioctl( int fd, int request, struct v4l2_audio *argp )
+.. cpp:function:: int ioctl( int fd, int request, struct v4l2_audio *argp )
 
-.. c:function:: int ioctl( int fd, int request, const struct v4l2_audio *argp )
+.. cpp:function:: int ioctl( int fd, int request, const struct v4l2_audio *argp )
 
 Arguments
 =========
Documentation/linux_tv/media/v4l/vidioc-g-audioout.rst +2 -2
index 1da1e7ad51a6..990f86a20bd2 100644
@@ -15,9 +15,9 @@ Query or select the current audio output
 Synopsis
 ========
 
-.. c:function:: int ioctl( int fd, int request, struct v4l2_audioout *argp )
+.. cpp:function:: int ioctl( int fd, int request, struct v4l2_audioout *argp )
 
-.. c:function:: int ioctl( int fd, int request, const struct v4l2_audioout *argp )
+.. cpp:function:: int ioctl( int fd, int request, const struct v4l2_audioout *argp )
 
 Arguments
 =========
Documentation/linux_tv/media/v4l/vidioc-g-crop.rst +2 -2
index b0503710c2dd..e2ffef351edf 100644
@@ -15,9 +15,9 @@ Get or set the current cropping rectangle
 Synopsis
 ========
 
-.. c:function:: int ioctl( int fd, int request, struct v4l2_crop *argp )
+.. cpp:function:: int ioctl( int fd, int request, struct v4l2_crop *argp )
 
-.. c:function:: int ioctl( int fd, int request, const struct v4l2_crop *argp )
+.. cpp:function:: int ioctl( int fd, int request, const struct v4l2_crop *argp )
 
 Arguments
 =========
Documentation/linux_tv/media/v4l/vidioc-g-ctrl.rst +1 -1
index 55bb8ae9be10..333eb4fa5099 100644
@@ -15,7 +15,7 @@ Get or set the value of a control
 Synopsis
 ========
 
-.. c:function:: int ioctl( int fd, int request, struct v4l2_control *argp )
+.. cpp:function:: int ioctl( int fd, int request, struct v4l2_control *argp )
 
 Arguments
 =========
Documentation/linux_tv/media/v4l/vidioc-g-dv-timings.rst +1 -1
index 43734bb649c5..c9de292ca1d2 100644
@@ -17,7 +17,7 @@ Get or set DV timings for input or output
 Synopsis
 ========
 
-.. c:function:: int ioctl( int fd, int request, struct v4l2_dv_timings *argp )
+.. cpp:function:: int ioctl( int fd, int request, struct v4l2_dv_timings *argp )
 
 Arguments
 =========
Documentation/linux_tv/media/v4l/vidioc-g-edid.rst +2 -2
index d6ccae92e107..54f364bdde8e 100644
@@ -17,9 +17,9 @@ Get or set the EDID of a video receiver/transmitter
 Synopsis
 ========
 
-.. c:function:: int ioctl( int fd, int request, struct v4l2_edid *argp )
+.. cpp:function:: int ioctl( int fd, int request, struct v4l2_edid *argp )
 
-.. c:function:: int ioctl( int fd, int request, struct v4l2_edid *argp )
+.. cpp:function:: int ioctl( int fd, int request, struct v4l2_edid *argp )
 
 Arguments
 =========
Documentation/linux_tv/media/v4l/vidioc-g-enc-index.rst +1 -1
index c22907cddfac..35df295e1809 100644
@@ -14,7 +14,7 @@ Get meta data about a compressed video stream
 Synopsis
 ========
 
-.. c:function:: int ioctl( int fd, int request, struct v4l2_enc_idx *argp )
+.. cpp:function:: int ioctl( int fd, int request, struct v4l2_enc_idx *argp )
 
 Arguments
 =========
Documentation/linux_tv/media/v4l/vidioc-g-ext-ctrls.rst +1 -1
index 040deef04f7d..91a0b8227423 100644
@@ -16,7 +16,7 @@ Get or set the value of several controls, try control values
 Synopsis
 ========
 
-.. c:function:: int ioctl( int fd, int request, struct v4l2_ext_controls *argp )
+.. cpp:function:: int ioctl( int fd, int request, struct v4l2_ext_controls *argp )
 
 Arguments
 =========
Documentation/linux_tv/media/v4l/vidioc-g-fbuf.rst +2 -2
index dbc68cfc608a..abf997fea991 100644
@@ -15,9 +15,9 @@ Get or set frame buffer overlay parameters
 Synopsis
 ========
 
-.. c:function:: int ioctl( int fd, int request, struct v4l2_framebuffer *argp )
+.. cpp:function:: int ioctl( int fd, int request, struct v4l2_framebuffer *argp )
 
-.. c:function:: int ioctl( int fd, int request, const struct v4l2_framebuffer *argp )
+.. cpp:function:: int ioctl( int fd, int request, const struct v4l2_framebuffer *argp )
 
 Arguments
 =========
Documentation/linux_tv/media/v4l/vidioc-g-fmt.rst +1 -1
index 3ac4fb764a7e..173e4aca7ee1 100644
@@ -16,7 +16,7 @@ Get or set the data format, try a format
 Synopsis
 ========
 
-.. c:function:: int ioctl( int fd, int request, struct v4l2_format *argp )
+.. cpp:function:: int ioctl( int fd, int request, struct v4l2_format *argp )
 
 Arguments
 =========
Documentation/linux_tv/media/v4l/vidioc-g-frequency.rst +2 -2
index b187f1345bb4..40ef31938f79 100644
@@ -15,9 +15,9 @@ Get or set tuner or modulator radio frequency
 Synopsis
 ========
 
-.. c:function:: int ioctl( int fd, int request, struct v4l2_frequency *argp )
+.. cpp:function:: int ioctl( int fd, int request, struct v4l2_frequency *argp )
 
-.. c:function:: int ioctl( int fd, int request, const struct v4l2_frequency *argp )
+.. cpp:function:: int ioctl( int fd, int request, const struct v4l2_frequency *argp )
 
 Arguments
 =========
Documentation/linux_tv/media/v4l/vidioc-g-input.rst +1 -1
index bb5944449650..6b1fc39c602f 100644
@@ -15,7 +15,7 @@ Query or select the current video input
 Synopsis
 ========
 
-.. c:function:: int ioctl( int fd, int request, int *argp )
+.. cpp:function:: int ioctl( int fd, int request, int *argp )
 
 Arguments
 =========
Documentation/linux_tv/media/v4l/vidioc-g-jpegcomp.rst +2 -2
index acd05bf0d7b6..b2da34012df6 100644
@@ -13,9 +13,9 @@ VIDIOC_S_JPEGCOMP
 Synopsis
 ========
 
-.. c:function:: int ioctl( int fd, int request, v4l2_jpegcompression *argp )
+.. cpp:function:: int ioctl( int fd, int request, v4l2_jpegcompression *argp )
 
-.. c:function:: int ioctl( int fd, int request, const v4l2_jpegcompression *argp )
+.. cpp:function:: int ioctl( int fd, int request, const v4l2_jpegcompression *argp )
 
 Arguments
 =========
Documentation/linux_tv/media/v4l/vidioc-g-modulator.rst +2 -2
index 913b7d96faba..b41ec0fe6acc 100644
@@ -15,9 +15,9 @@ Get or set modulator attributes
 Synopsis
 ========
 
-.. c:function:: int ioctl( int fd, int request, struct v4l2_modulator *argp )
+.. cpp:function:: int ioctl( int fd, int request, struct v4l2_modulator *argp )
 
-.. c:function:: int ioctl( int fd, int request, const struct v4l2_modulator *argp )
+.. cpp:function:: int ioctl( int fd, int request, const struct v4l2_modulator *argp )
 
 Arguments
 =========
Documentation/linux_tv/media/v4l/vidioc-g-output.rst +1 -1
index e48bf39cfa10..95d7a9b19166 100644
@@ -15,7 +15,7 @@ Query or select the current video output
 Synopsis
 ========
 
-.. c:function:: int ioctl( int fd, int request, int *argp )
+.. cpp:function:: int ioctl( int fd, int request, int *argp )
 
 Arguments
 =========
Documentation/linux_tv/media/v4l/vidioc-g-parm.rst +1 -1
index 0567fce18144..2fbec8a6adfc 100644
@@ -15,7 +15,7 @@ Get or set streaming parameters
 Synopsis
 ========
 
-.. c:function:: int ioctl( int fd, int request, v4l2_streamparm *argp )
+.. cpp:function:: int ioctl( int fd, int request, v4l2_streamparm *argp )
 
 Arguments
 =========
Documentation/linux_tv/media/v4l/vidioc-g-selection.rst +1 -1
index fd07c87a369c..271610e06b2b 100644
@@ -15,7 +15,7 @@ Get or set one of the selection rectangles
 Synopsis
 ========
 
-.. c:function:: int ioctl( int fd, int request, struct v4l2_selection *argp )
+.. cpp:function:: int ioctl( int fd, int request, struct v4l2_selection *argp )
 
 Arguments
 =========
Documentation/linux_tv/media/v4l/vidioc-g-sliced-vbi-cap.rst +1 -1
index a051f93252d0..00a9b61002de 100644
@@ -14,7 +14,7 @@ Query sliced VBI capabilities
 Synopsis
 ========
 
-.. c:function:: int ioctl( int fd, int request, struct v4l2_sliced_vbi_cap *argp )
+.. cpp:function:: int ioctl( int fd, int request, struct v4l2_sliced_vbi_cap *argp )
 
 Arguments
 =========
Documentation/linux_tv/media/v4l/vidioc-g-std.rst +2 -2
index a7257f0b38a2..5644cc670381 100644
@@ -15,9 +15,9 @@ Query or select the video standard of the current input
 Synopsis
 ========
 
-.. c:function:: int ioctl( int fd, int request, v4l2_std_id *argp )
+.. cpp:function:: int ioctl( int fd, int request, v4l2_std_id *argp )
 
-.. c:function:: int ioctl( int fd, int request, const v4l2_std_id *argp )
+.. cpp:function:: int ioctl( int fd, int request, const v4l2_std_id *argp )
 
 Arguments
 =========
Documentation/linux_tv/media/v4l/vidioc-g-tuner.rst +2 -2
index 1e01010fd2e2..8e119fa28ccd 100644
@@ -15,9 +15,9 @@ Get or set tuner attributes
 Synopsis
 ========
 
-.. c:function:: int ioctl( int fd, int request, struct v4l2_tuner *argp )
+.. cpp:function:: int ioctl( int fd, int request, struct v4l2_tuner *argp )
 
-.. c:function:: int ioctl( int fd, int request, const struct v4l2_tuner *argp )
+.. cpp:function:: int ioctl( int fd, int request, const struct v4l2_tuner *argp )
 
 Arguments
 =========
Documentation/linux_tv/media/v4l/vidioc-log-status.rst +1 -1
index 6df7c2fd5b6c..af89f8f2dca6 100644
@@ -14,7 +14,7 @@ Log driver status information
 Synopsis
 ========
 
-.. c:function:: int ioctl( int fd, int request )
+.. cpp:function:: int ioctl( int fd, int request )
 
 Description
 ===========
Documentation/linux_tv/media/v4l/vidioc-overlay.rst +1 -1
index 10faf2517392..990907643869 100644
@@ -14,7 +14,7 @@ Start or stop video overlay
 Synopsis
 ========
 
-.. c:function:: int ioctl( int fd, int request, const int *argp )
+.. cpp:function:: int ioctl( int fd, int request, const int *argp )
 
 Arguments
 =========
Documentation/linux_tv/media/v4l/vidioc-prepare-buf.rst +1 -1
index 0b51c587701b..79a6a1009703 100644
@@ -14,7 +14,7 @@ Prepare a buffer for I/O
 Synopsis
 ========
 
-.. c:function:: int ioctl( int fd, int request, struct v4l2_buffer *argp )
+.. cpp:function:: int ioctl( int fd, int request, struct v4l2_buffer *argp )
 
 Arguments
 =========
Documentation/linux_tv/media/v4l/vidioc-qbuf.rst +1 -1
index 57a0bc470f36..380970ba9a12 100644
@@ -15,7 +15,7 @@ Exchange a buffer with the driver
 Synopsis
 ========
 
-.. c:function:: int ioctl( int fd, int request, struct v4l2_buffer *argp )
+.. cpp:function:: int ioctl( int fd, int request, struct v4l2_buffer *argp )
 
 Arguments
 =========
Documentation/linux_tv/media/v4l/vidioc-query-dv-timings.rst +1 -1
index 0120432de989..9f067f587e42 100644
@@ -15,7 +15,7 @@ Sense the DV preset received by the current input
 Synopsis
 ========
 
-.. c:function:: int ioctl( int fd, int request, struct v4l2_dv_timings *argp )
+.. cpp:function:: int ioctl( int fd, int request, struct v4l2_dv_timings *argp )
 
 Arguments
 =========
Documentation/linux_tv/media/v4l/vidioc-querybuf.rst +1 -1
index 280fb795c0b9..efc8143edc34 100644
@@ -14,7 +14,7 @@ Query the status of a buffer
 Synopsis
 ========
 
-.. c:function:: int ioctl( int fd, int request, struct v4l2_buffer *argp )
+.. cpp:function:: int ioctl( int fd, int request, struct v4l2_buffer *argp )
 
 Arguments
 =========
Documentation/linux_tv/media/v4l/vidioc-querycap.rst +1 -1
index 74589501b95d..91551fe448fc 100644
@@ -14,7 +14,7 @@ Query device capabilities
 Synopsis
 ========
 
-.. c:function:: int ioctl( int fd, int request, struct v4l2_capability *argp )
+.. cpp:function:: int ioctl( int fd, int request, struct v4l2_capability *argp )
 
 Arguments
 =========
Documentation/linux_tv/media/v4l/vidioc-queryctrl.rst +3 -3
index 2e93caeafe9e..a08c68262871 100644
@@ -16,11 +16,11 @@ Enumerate controls and menu control items
 Synopsis
 ========
 
-.. c:function:: int ioctl( int fd, int request, struct v4l2_queryctrl *argp )
+.. cpp:function:: int ioctl( int fd, int request, struct v4l2_queryctrl *argp )
 
-.. c:function:: int ioctl( int fd, int request, struct v4l2_query_ext_ctrl *argp )
+.. cpp:function:: int ioctl( int fd, int request, struct v4l2_query_ext_ctrl *argp )
 
-.. c:function:: int ioctl( int fd, int request, struct v4l2_querymenu *argp )
+.. cpp:function:: int ioctl( int fd, int request, struct v4l2_querymenu *argp )
 
 Arguments
 =========
Documentation/linux_tv/media/v4l/vidioc-querystd.rst +1 -1
index 29ce879a708b..de2fe176fc6d 100644
@@ -14,7 +14,7 @@ Sense the video standard received by the current input
 Synopsis
 ========
 
-.. c:function:: int ioctl( int fd, int request, v4l2_std_id *argp )
+.. cpp:function:: int ioctl( int fd, int request, v4l2_std_id *argp )
 
 Arguments
 =========
Documentation/linux_tv/media/v4l/vidioc-reqbufs.rst +1 -1
index 451cf7b11c3d..23b2fee646a1 100644
@@ -14,7 +14,7 @@ Initiate Memory Mapping or User Pointer I/O
 Synopsis
 ========
 
-.. c:function:: int ioctl( int fd, int request, struct v4l2_requestbuffers *argp )
+.. cpp:function:: int ioctl( int fd, int request, struct v4l2_requestbuffers *argp )
 
 Arguments
 =========
Documentation/linux_tv/media/v4l/vidioc-s-hw-freq-seek.rst +1 -1
index cd59ba9ab1b0..226440e4bb76 100644
@@ -14,7 +14,7 @@ Perform a hardware frequency seek
 Synopsis
 ========
 
-.. c:function:: int ioctl( int fd, int request, struct v4l2_hw_freq_seek *argp )
+.. cpp:function:: int ioctl( int fd, int request, struct v4l2_hw_freq_seek *argp )
 
 Arguments
 =========
Documentation/linux_tv/media/v4l/vidioc-streamon.rst +1 -1
index 7663339d30be..960c5965c7a6 100644
@@ -15,7 +15,7 @@ Start or stop streaming I/O
 Synopsis
 ========
 
-.. c:function:: int ioctl( int fd, int request, const int *argp )
+.. cpp:function:: int ioctl( int fd, int request, const int *argp )
 
 Arguments
 =========
Documentation/linux_tv/media/v4l/vidioc-subdev-enum-frame-interval.rst +1 -1
index 07ad0a98ead2..bcf161cd5012 100644
@@ -14,7 +14,7 @@ Enumerate frame intervals
 Synopsis
 ========
 
-.. c:function:: int ioctl( int fd, int request, struct v4l2_subdev_frame_interval_enum * argp )
+.. cpp:function:: int ioctl( int fd, int request, struct v4l2_subdev_frame_interval_enum * argp )
 
 Arguments
 =========
Documentation/linux_tv/media/v4l/vidioc-subdev-enum-frame-size.rst +1 -1
index 39393ef11590..5ddb766f4a16 100644
@@ -14,7 +14,7 @@ Enumerate media bus frame sizes
 Synopsis
 ========
 
-.. c:function:: int ioctl( int fd, int request, struct v4l2_subdev_frame_size_enum * argp )
+.. cpp:function:: int ioctl( int fd, int request, struct v4l2_subdev_frame_size_enum * argp )
 
 Arguments
 =========
Documentation/linux_tv/media/v4l/vidioc-subdev-enum-mbus-code.rst +1 -1
index f50a1f1c68d5..dbaf866e82fe 100644
@@ -14,7 +14,7 @@ Enumerate media bus formats
 Synopsis
 ========
 
-.. c:function:: int ioctl( int fd, int request, struct v4l2_subdev_mbus_code_enum * argp )
+.. cpp:function:: int ioctl( int fd, int request, struct v4l2_subdev_mbus_code_enum * argp )
 
 Arguments
 =========
Documentation/linux_tv/media/v4l/vidioc-subdev-g-crop.rst +2 -2
index 6fb1ea143f9e..46776cdfa7b5 100644
@@ -15,9 +15,9 @@ Get or set the crop rectangle on a subdev pad
 Synopsis
 ========
 
-.. c:function:: int ioctl( int fd, int request, struct v4l2_subdev_crop *argp )
+.. cpp:function:: int ioctl( int fd, int request, struct v4l2_subdev_crop *argp )
 
-.. c:function:: int ioctl( int fd, int request, const struct v4l2_subdev_crop *argp )
+.. cpp:function:: int ioctl( int fd, int request, const struct v4l2_subdev_crop *argp )
 
 Arguments
 =========
Documentation/linux_tv/media/v4l/vidioc-subdev-g-fmt.rst +1 -1
index 789277a2647a..b4d109943fd2 100644
@@ -15,7 +15,7 @@ Get or set the data format on a subdev pad
 Synopsis
 ========
 
-.. c:function:: int ioctl( int fd, int request, struct v4l2_subdev_format *argp )
+.. cpp:function:: int ioctl( int fd, int request, struct v4l2_subdev_format *argp )
 
 Arguments
 =========
Documentation/linux_tv/media/v4l/vidioc-subdev-g-frame-interval.rst +1 -1
index bcc54e2e396f..9504e8b5de8a 100644
@@ -15,7 +15,7 @@ Get or set the frame interval on a subdev pad
 Synopsis
 ========
 
-.. c:function:: int ioctl( int fd, int request, struct v4l2_subdev_frame_interval *argp )
+.. cpp:function:: int ioctl( int fd, int request, struct v4l2_subdev_frame_interval *argp )
 
 Arguments
 =========
Documentation/linux_tv/media/v4l/vidioc-subdev-g-selection.rst +1 -1
index 7b60c9b99aad..d95b5431004c 100644
@@ -15,7 +15,7 @@ Get or set selection rectangles on a subdev pad
 Synopsis
 ========
 
-.. c:function:: int ioctl( int fd, int request, struct v4l2_subdev_selection *argp )
+.. cpp:function:: int ioctl( int fd, int request, struct v4l2_subdev_selection *argp )
 
 Arguments
 =========
Documentation/linux_tv/media/v4l/vidioc-subscribe-event.rst +1 -1
index 182353f544eb..a127622d47b8 100644
@@ -15,7 +15,7 @@ Subscribe or unsubscribe event
 Synopsis
 ========
 
-.. c:function:: int ioctl( int fd, int request, struct v4l2_event_subscription *argp )
+.. cpp:function:: int ioctl( int fd, int request, struct v4l2_event_subscription *argp )
 
 Arguments
 =========
scripts/kernel-doc +1 -1
old mode 100755
new mode 100644
index 932b3f34ff06..41eade332307
@@ -1833,7 +1833,7 @@ sub output_function_rst(%) {
     my $oldprefix = $lineprefix;
     my $start;
 
-    print ".. c:function:: ";
+    print ".. cpp:function:: ";
     if ($args{'functiontype'} ne "") {
 	$start = $args{'functiontype'} . " " . $args{'function'} . " (";
     } else {
Signature · 1 line
2.7.4
#23 lore raw

PATCH 23/51 Documentation: planar-apis.rst: fix some conversion troubles

In reply to Mauro Carvalho Chehab

There is a missing escape caracter, causing troubles at the format of one of the paragraphs. Also, the ioctl description was producing some warnings about wrong identation.

---
 Documentation/linux_tv/media/v4l/planar-apis.rst | 14 +++++---------
 1 file changed, 5 insertions(+), 9 deletions(-)
Documentation/linux_tv/media/v4l/planar-apis.rst +5 -9
index cf078650a0a8..db1e63bd691e 100644
@@ -20,7 +20,7 @@ Some of the V4L2 API calls and structures are interpreted differently,
 depending on whether single- or multi-planar API is being used. An
 application can choose whether to use one or the other by passing a
 corresponding buffer type to its ioctl calls. Multi-planar versions of
-buffer types are suffixed with an `_MPLANE' string. For a list of
+buffer types are suffixed with an ``_MPLANE`` string. For a list of
 available multi-planar buffer types see enum
 :ref:`v4l2_buf_type <v4l2-buf-type>`.
 
@@ -39,29 +39,25 @@ handle multi-planar formats.
 Calls that distinguish between single and multi-planar APIs
 ===========================================================
 
-:ref:`VIDIOC_QUERYCAP`
+:ref:`VIDIOC_QUERYCAP <VIDIOC_QUERYCAP>`
     Two additional multi-planar capabilities are added. They can be set
     together with non-multi-planar ones for devices that handle both
     single- and multi-planar formats.
 
-:ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>`,
-:ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>`,
-:ref:`VIDIOC_TRY_FMT <VIDIOC_G_FMT>`
+:ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>`, :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>`, :ref:`VIDIOC_TRY_FMT <VIDIOC_G_FMT>`
     New structures for describing multi-planar formats are added: struct
     :ref:`v4l2_pix_format_mplane <v4l2-pix-format-mplane>` and
     struct :ref:`v4l2_plane_pix_format <v4l2-plane-pix-format>`.
     Drivers may define new multi-planar formats, which have distinct
     FourCC codes from the existing single-planar ones.
 
-:ref:`VIDIOC_QBUF`,
-:ref:`VIDIOC_DQBUF <VIDIOC_QBUF>`,
-:ref:`VIDIOC_QUERYBUF`
+:ref:`VIDIOC_QBUF <VIDIOC_QBUF>`, :ref:`VIDIOC_DQBUF <VIDIOC_QBUF>`, :ref:`VIDIOC_QUERYBUF <VIDIOC_QUERYBUF>`
     A new struct :ref:`v4l2_plane <v4l2-plane>` structure for
     describing planes is added. Arrays of this structure are passed in
     the new ``m.planes`` field of struct
     :ref:`v4l2_buffer <v4l2-buffer>`.
 
-:ref:`VIDIOC_REQBUFS`
+:ref:`VIDIOC_REQBUFS <VIDIOC_REQBUFS>`
     Will allocate multi-planar buffers as requested.
 
 
Signature · 1 line
2.7.4
#24 lore raw

PATCH 24/51 Documentation: crop.rst: fix conversion on this file

In reply to Mauro Carvalho Chehab

The conversion on this file didn't end too well. fix the found issues:

1) Sphinix seems to not allow things like *foo :ref:bar*. At least on this document, it did the wrong thing. So, change the logic to something that will work fine with ReST format;

2) Some ioctl pointers were not looking nice;

3) the captions on the examples got discarded;

4) The notes specific to each example were not converted well. Again, we'll need to replace it for a simpler design, as Sphinx is a way more limited than DocBook.

---
 Documentation/linux_tv/media/v4l/crop.rst | 115 +++++++++++++++---------------
 1 file changed, 59 insertions(+), 56 deletions(-)
Documentation/linux_tv/media/v4l/crop.rst +59 -56
index bfb30568df23..e1214d85b9c7 100644
@@ -13,11 +13,11 @@ image up or down and insert it at an arbitrary scan line and horizontal
 offset into a video signal.
 
 Applications can use the following API to select an area in the video
-signal, query the default area and the hardware limits. *Despite their
-name, the :ref:`VIDIOC_CROPCAP`,
-:ref:`VIDIOC_G_CROP <VIDIOC_G_CROP>` and
-:ref:`VIDIOC_S_CROP <VIDIOC_G_CROP>` ioctls apply to input as well
-as output devices.*
+signal, query the default area and the hardware limits.
+
+**NOTE**: Despite their name, the :ref:`VIDIOC_CROPCAP <VIDIOC_CROPCAP>`,
+:ref:`VIDIOC_G_CROP <VIDIOC_G_CROP>` and :ref:`VIDIOC_S_CROP
+<VIDIOC_G_CROP>` ioctls apply to input as well as output devices.
 
 Scaling requires a source and a target. On a video capture or overlay
 device the source is the video signal, and the cropping ioctls determine
@@ -28,15 +28,19 @@ and :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctls.
 
 On a video output device the source are the images passed in by the
 application, and their size is again negotiated with the
-``VIDIOC_G/S_FMT`` ioctls, or may be encoded in a compressed video
-stream. The target is the video signal, and the cropping ioctls
-determine the area where the images are inserted.
+:ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>` and :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>`
+ioctls, or may be encoded in a compressed video stream. The target is
+the video signal, and the cropping ioctls determine the area where the
+images are inserted.
 
 Source and target rectangles are defined even if the device does not
-support scaling or the ``VIDIOC_G/S_CROP`` ioctls. Their size (and
-position where applicable) will be fixed in this case. *All capture and
-output device must support the ``VIDIOC_CROPCAP`` ioctl such that
-applications can determine if scaling takes place.*
+support scaling or the :ref:`VIDIOC_G_CROP <VIDIOC_G_CROP>` and
+:ref:`VIDIOC_S_CROP <VIDIOC_G_CROP>` ioctls. Their size (and position
+where applicable) will be fixed in this case.
+
+**NOTE:** All capture and output devices must support the
+:ref:`VIDIOC_CROPCAP <VIDIOC_CROPCAP>` ioctl such that applications can
+determine if scaling takes place.
 
 
 Cropping Structures
@@ -57,23 +61,24 @@ Cropping Structures
 
 For capture devices the coordinates of the top left corner, width and
 height of the area which can be sampled is given by the ``bounds``
-substructure of the struct :ref:`v4l2_cropcap <v4l2-cropcap>`
-returned by the ``VIDIOC_CROPCAP`` ioctl. To support a wide range of
-hardware this specification does not define an origin or units. However
-by convention drivers should horizontally count unscaled samples
+substructure of the struct :ref:`v4l2_cropcap <v4l2-cropcap>` returned
+by the :ref:`VIDIOC_CROPCAP <VIDIOC_CROPCAP>` ioctl. To support a wide
+range of hardware this specification does not define an origin or units.
+However by convention drivers should horizontally count unscaled samples
 relative to 0H (the leading edge of the horizontal sync pulse, see
 :ref:`vbi-hsync`). Vertically ITU-R line numbers of the first field
-(:ref:`vbi-525`, :ref:`vbi-625`), multiplied by two if the driver
+(see ITU R-525 line numbering for :ref:`525 lines <vbi-525>` and for
+:ref:`625 lines <vbi-625>`), multiplied by two if the driver
 can capture both fields.
 
 The top left corner, width and height of the source rectangle, that is
 the area actually sampled, is given by struct
 :ref:`v4l2_crop <v4l2-crop>` using the same coordinate system as
 struct :ref:`v4l2_cropcap <v4l2-cropcap>`. Applications can use the
-``VIDIOC_G_CROP`` and ``VIDIOC_S_CROP`` ioctls to get and set this
-rectangle. It must lie completely within the capture boundaries and the
-driver may further adjust the requested size and/or position according
-to hardware limitations.
+:ref:`VIDIOC_G_CROP <VIDIOC_G_CROP>` and :ref:`VIDIOC_S_CROP <VIDIOC_G_CROP>`
+ioctls to get and set this rectangle. It must lie completely within the
+capture boundaries and the driver may further adjust the requested size
+and/or position according to hardware limitations.
 
 Each capture device has a default source rectangle, given by the
 ``defrect`` substructure of struct
@@ -121,8 +126,8 @@ The driver sets the image size to the closest possible values 304 × 224,
 then chooses the cropping rectangle closest to the requested size, that
 is 608 × 224 (224 × 2:1 would exceed the limit 400). The offset 0, 0 is
 still valid, thus unmodified. Given the default cropping rectangle
-reported by ``VIDIOC_CROPCAP`` the application can easily propose
-another offset to center the cropping rectangle.
+reported by :ref:`VIDIOC_CROPCAP <VIDIOC_CROPCAP>` the application can
+easily propose another offset to center the cropping rectangle.
 
 Now the application may insist on covering an area using a picture
 aspect ratio closer to the original request, so it asks for a cropping
@@ -139,11 +144,11 @@ reopening a device, such that piping data into or out of a device will
 work without special preparations. More advanced applications should
 ensure the parameters are suitable before starting I/O.
 
-(A video capture device is assumed; change
-``V4L2_BUF_TYPE_VIDEO_CAPTURE`` for other devices.)
-
+**NOTE:** on the next two examples, a video capture device is assumed;
+change ``V4L2_BUF_TYPE_VIDEO_CAPTURE`` for other types of device.
 
 .. code-block:: c
+    :caption: Example 11: Resetting the cropping parameters
 
     struct v4l2_cropcap cropcap;
     struct v4l2_crop crop;
@@ -152,8 +157,8 @@ ensure the parameters are suitable before starting I/O.
     cropcap.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
 
     if (-1 == ioctl (fd, VIDIOC_CROPCAP, &cropcap)) {
-        perror ("VIDIOC_CROPCAP");
-        exit (EXIT_FAILURE);
+	perror ("VIDIOC_CROPCAP");
+	exit (EXIT_FAILURE);
     }
 
     memset (&crop, 0, sizeof (crop));
@@ -163,15 +168,13 @@ ensure the parameters are suitable before starting I/O.
     /* Ignore if cropping is not supported (EINVAL). */
 
     if (-1 == ioctl (fd, VIDIOC_S_CROP, &crop)
-        && errno != EINVAL) {
-        perror ("VIDIOC_S_CROP");
-        exit (EXIT_FAILURE);
+	&& errno != EINVAL) {
+	perror ("VIDIOC_S_CROP");
+	exit (EXIT_FAILURE);
     }
 
-(A video capture device is assumed.)
-
-
 .. code-block:: c
+    :caption: Example 12: Simple downscaling
 
     struct v4l2_cropcap cropcap;
     struct v4l2_format format;
@@ -189,15 +192,17 @@ ensure the parameters are suitable before starting I/O.
     format.fmt.pix.pixelformat = V4L2_PIX_FMT_YUYV;
 
     if (-1 == ioctl (fd, VIDIOC_S_FMT, &format)) {
-        perror ("VIDIOC_S_FORMAT");
-        exit (EXIT_FAILURE);
+	perror ("VIDIOC_S_FORMAT");
+	exit (EXIT_FAILURE);
     }
 
     /* We could check the actual image size now, the actual scaling factor
        or if the driver can scale at all. */
 
+**NOTE:** This example assumes an output device.
 
 .. code-block:: c
+    :caption: Example 13. Selecting an output area
 
     struct v4l2_cropcap cropcap;
     struct v4l2_crop crop;
@@ -206,8 +211,8 @@ ensure the parameters are suitable before starting I/O.
     cropcap.type = V4L2_BUF_TYPE_VIDEO_OUTPUT;
 
     if (-1 == ioctl (fd, VIDIOC_CROPCAP;, &cropcap)) {
-        perror ("VIDIOC_CROPCAP");
-        exit (EXIT_FAILURE);
+	perror ("VIDIOC_CROPCAP");
+	exit (EXIT_FAILURE);
     }
 
     memset (&crop, 0, sizeof (crop));
@@ -226,15 +231,15 @@ ensure the parameters are suitable before starting I/O.
     /* Ignore if cropping is not supported (EINVAL). */
 
     if (-1 == ioctl (fd, VIDIOC_S_CROP, &crop)
-        && errno != EINVAL) {
-        perror ("VIDIOC_S_CROP");
-        exit (EXIT_FAILURE);
+	&& errno != EINVAL) {
+	perror ("VIDIOC_S_CROP");
+	exit (EXIT_FAILURE);
     }
 
-(A video capture device is assumed.)
-
+**NOTE:** This example assumes a video capture device.
 
 .. code-block:: c
+    :caption: Example 14: Current scaling factor and pixel aspect
 
     struct v4l2_cropcap cropcap;
     struct v4l2_crop crop;
@@ -247,29 +252,29 @@ ensure the parameters are suitable before starting I/O.
     cropcap.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
 
     if (-1 == ioctl (fd, VIDIOC_CROPCAP, &cropcap)) {
-        perror ("VIDIOC_CROPCAP");
-        exit (EXIT_FAILURE);
+	perror ("VIDIOC_CROPCAP");
+	exit (EXIT_FAILURE);
     }
 
     memset (&crop, 0, sizeof (crop));
     crop.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
 
     if (-1 == ioctl (fd, VIDIOC_G_CROP, &crop)) {
-        if (errno != EINVAL) {
-            perror ("VIDIOC_G_CROP");
-            exit (EXIT_FAILURE);
-        }
+	if (errno != EINVAL) {
+	    perror ("VIDIOC_G_CROP");
+	    exit (EXIT_FAILURE);
+	}
 
-        /* Cropping not supported. */
-        crop.c = cropcap.defrect;
+	/* Cropping not supported. */
+	crop.c = cropcap.defrect;
     }
 
     memset (&format, 0, sizeof (format));
     format.fmt.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
 
     if (-1 == ioctl (fd, VIDIOC_G_FMT, &format)) {
-        perror ("VIDIOC_G_FMT");
-        exit (EXIT_FAILURE);
+	perror ("VIDIOC_G_FMT");
+	exit (EXIT_FAILURE);
     }
 
     /* The scaling applied by the driver. */
@@ -278,7 +283,7 @@ ensure the parameters are suitable before starting I/O.
     vscale = format.fmt.pix.height / (double) crop.c.height;
 
     aspect = cropcap.pixelaspect.numerator /
-         (double) cropcap.pixelaspect.denominator;
+	 (double) cropcap.pixelaspect.denominator;
     aspect = aspect * hscale / vscale;
 
     /* Devices following ITU-R BT.601 do not capture
@@ -289,8 +294,6 @@ ensure the parameters are suitable before starting I/O.
     dheight = format.fmt.pix.height;
 
 
-
-
 .. ------------------------------------------------------------------------------
 .. This file was automatically converted from DocBook-XML with the dbxml
 .. library (https://github.com/return42/sphkerneldoc). The origin XML comes
Signature · 1 line
2.7.4
#25 lore raw

PATCH 25/51 Documentation: selection-api-005.rst: Fix ReST parsing

In reply to Mauro Carvalho Chehab

The ReST markup is limited: it doesn't accept a const just after a reference. So, change the documentation to avoid such constraint.

---
 Documentation/linux_tv/media/v4l/selection-api-005.rst | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
Documentation/linux_tv/media/v4l/selection-api-005.rst +5 -4
index 6fdb0af2b13d..78448023a79a 100644
@@ -15,10 +15,11 @@ appropriate targets. The V4L2 API lacks any support for composing to and
 cropping from an image inside a memory buffer. The application could
 configure a capture device to fill only a part of an image by abusing
 V4L2 API. Cropping a smaller image from a larger one is achieved by
-setting the field struct
-:ref:`v4l2_pix_format <v4l2-pix-format>```::bytesperline``.
-Introducing an image offsets could be done by modifying field struct
-:ref:`v4l2_buffer <v4l2-buffer>```::m_userptr`` before calling
+setting the field ``bytesperline`` at struct
+:ref:`v4l2_pix_format <v4l2-pix-format>`.
+Introducing an image offsets could be done by modifying field ``m_userptr``
+at struct
+:ref:`v4l2_buffer <v4l2-buffer>` before calling
 :ref:`VIDIOC_QBUF`. Those operations should be avoided because they are not
 portable (endianness), and do not work for macroblock and Bayer formats
 and mmap buffers. The selection API deals with configuration of buffer
Signature · 1 line
2.7.4
#26 lore raw

PATCH 26/51 Documentation: linux_tv: use Example x.y. instead of a single number

In reply to Mauro Carvalho Chehab

On the example captions, use always <chapter>.<number>., because:
1) it matches the DocBook;
2) it would mean less changes if we need to add a new example, as only one chapter will be affected.

---
 Documentation/linux_tv/media/v4l/audio.rst    | 4 ++--
 Documentation/linux_tv/media/v4l/control.rst  | 6 +++---
 Documentation/linux_tv/media/v4l/crop.rst     | 8 ++++----
 Documentation/linux_tv/media/v4l/standard.rst | 6 +++---
 Documentation/linux_tv/media/v4l/video.rst    | 4 ++--
 5 files changed, 14 insertions(+), 14 deletions(-)
Documentation/linux_tv/media/v4l/audio.rst +2 -2
index e9d99f6a259a..bc2db0d8f389 100644
@@ -55,7 +55,7 @@ the :ref:`VIDIOC_QUERYCAP` ioctl.
 
 
 .. code-block:: c
-    :caption: Example 3: Information about the current audio input
+    :caption: Example 1.3. Information about the current audio input
 
     struct v4l2_audio audio;
 
@@ -70,7 +70,7 @@ the :ref:`VIDIOC_QUERYCAP` ioctl.
 
 
 .. code-block:: c
-    :caption: Example 4: Switching to the first audio input
+    :caption: Example 1.4. Switching to the first audio input
 
     struct v4l2_audio audio;
 
Documentation/linux_tv/media/v4l/control.rst +3 -3
index 736d79080229..4f64f1db6ec8 100644
@@ -374,7 +374,7 @@ more menu type controls.
 .. _enum_all_controls:
 
 .. code-block:: c
-    :caption: Example 8: Enumerating all user controls
+    :caption: Example 1.8. Enumerating all user controls
 
 
     struct v4l2_queryctrl queryctrl;
@@ -439,7 +439,7 @@ more menu type controls.
 
 
 .. code-block:: c
-    :caption: Example 9: Enumerating all user controls (alternative)
+    :caption: Example 1.9. Enumerating all user controls (alternative)
 
     memset(&queryctrl, 0, sizeof(queryctrl));
 
@@ -464,7 +464,7 @@ more menu type controls.
 
 
 .. code-block:: c
-    :caption: Example 10: Changing controls
+    :caption: Example 1.10. Changing controls
 
     struct v4l2_queryctrl queryctrl;
     struct v4l2_control control;
Documentation/linux_tv/media/v4l/crop.rst +4 -4
index e1214d85b9c7..16d0983ff9fb 100644
@@ -148,7 +148,7 @@ ensure the parameters are suitable before starting I/O.
 change ``V4L2_BUF_TYPE_VIDEO_CAPTURE`` for other types of device.
 
 .. code-block:: c
-    :caption: Example 11: Resetting the cropping parameters
+    :caption: Example 1.11. Resetting the cropping parameters
 
     struct v4l2_cropcap cropcap;
     struct v4l2_crop crop;
@@ -174,7 +174,7 @@ change ``V4L2_BUF_TYPE_VIDEO_CAPTURE`` for other types of device.
     }
 
 .. code-block:: c
-    :caption: Example 12: Simple downscaling
+    :caption: Example 1.12. Simple downscaling
 
     struct v4l2_cropcap cropcap;
     struct v4l2_format format;
@@ -202,7 +202,7 @@ change ``V4L2_BUF_TYPE_VIDEO_CAPTURE`` for other types of device.
 **NOTE:** This example assumes an output device.
 
 .. code-block:: c
-    :caption: Example 13. Selecting an output area
+    :caption: Example 1.13. Selecting an output area
 
     struct v4l2_cropcap cropcap;
     struct v4l2_crop crop;
@@ -239,7 +239,7 @@ change ``V4L2_BUF_TYPE_VIDEO_CAPTURE`` for other types of device.
 **NOTE:** This example assumes a video capture device.
 
 .. code-block:: c
-    :caption: Example 14: Current scaling factor and pixel aspect
+    :caption: Example 1.14. Current scaling factor and pixel aspect
 
     struct v4l2_cropcap cropcap;
     struct v4l2_crop crop;
Documentation/linux_tv/media/v4l/standard.rst +3 -3
index 11d1a7183c73..4131ca880268 100644
@@ -66,7 +66,7 @@ standard ioctls can be used with the given input or output.
 
 
 .. code-block:: c
-    :caption: Example 5: Information about the current video standard
+    :caption: Example 1.5. Information about the current video standard
 
     v4l2_std_id std_id;
     struct v4l2_standard standard;
@@ -102,7 +102,7 @@ standard ioctls can be used with the given input or output.
 
 
 .. code-block:: c
-    :caption: Example 6: Listing the video standards supported by the current input
+    :caption: Example 1.6. Listing the video standards supported by the current input
 
     struct v4l2_input input;
     struct v4l2_standard standard;
@@ -141,7 +141,7 @@ standard ioctls can be used with the given input or output.
 
 
 .. code-block:: c
-    :caption: Example 7: Selecting a new video standard
+    :caption: Example 1.7. Selecting a new video standard
 
     struct v4l2_input input;
     v4l2_std_id std_id;
Documentation/linux_tv/media/v4l/video.rst +2 -2
index 8e10ecc27123..b8ecc774719c 100644
@@ -29,7 +29,7 @@ implement all the input ioctls when the device has one or more inputs,
 all the output ioctls when the device has one or more outputs.
 
 .. code-block:: c
-    :caption: Example 1: Information about the current video input
+    :caption: Example 1.1. Information about the current video input
 
     struct v4l2_input input;
     int index;
@@ -51,7 +51,7 @@ all the output ioctls when the device has one or more outputs.
 
 
 .. code-block:: c
-    :caption: Example 2: Switching to the first video input
+    :caption: Example 1.2. Switching to the first video input
 
     int index;
 
Signature · 1 line
2.7.4
#27 lore raw

PATCH 27/51 Documentation: selection-api-006.rst: add missing captions

In reply to Mauro Carvalho Chehab

The example captions got stripped by the conversion to ReST. Re-add.

---
 Documentation/linux_tv/media/v4l/selection-api-006.rst | 3 +++
 1 file changed, 3 insertions(+)
Documentation/linux_tv/media/v4l/selection-api-006.rst +3 -0
index 61160b6be4f6..a7c04879cb5d 100644
@@ -10,6 +10,7 @@ Examples
 
 
 .. code-block:: c
+	:caption: Example 1.15. Resetting the cropping parameters
 
         struct v4l2_selection sel = {
             .type = V4L2_BUF_TYPE_VIDEO_CAPTURE,
@@ -28,6 +29,7 @@ placed at a center of a display.
 
 
 .. code-block:: c
+   :caption: Example 1.16. Simple downscaling
 
         struct v4l2_selection sel = {
             .type = V4L2_BUF_TYPE_VIDEO_OUTPUT,
@@ -55,6 +57,7 @@ for other devices
 
 
 .. code-block:: c
+   :caption: Example 1.17. Querying for scaling factors
 
         struct v4l2_selection compose = {
             .type = V4L2_BUF_TYPE_VIDEO_OUTPUT,
Signature · 1 line
2.7.4