The syscall pages are written to be used also as man-pages.
However, they don't match the format used by kernel-doc
generated pages from DocBook. Rewrite them to match it.
One side effect is that now all such pages at the book
will have the same format, reducing the format differences
between DVB and the other parts of the book.
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
FE_DISHNETWORK_SEND_LEGACY_CMD
******************************
-Description
------------
+NAME
+====
-WARNING: This is a very obscure legacy command, used only at stv0299
-driver. Should not be used on newer drivers.
-
-It provides a non-standard method for selecting Diseqc voltage on the
-frontend, for Dish Network legacy switches.
-
-As support for this ioctl were added in 2004, this means that such
-dishes were already legacy in 2004.
+FE_DISHNETWORK_SEND_LEGACY_CMD
-Synopsis
---------
+SYNOPSIS
+========
.. c:function:: int ioctl(int fd, int request = FE_DISHNETWORK_SEND_LEGACY_CMD, unsigned long cmd)
-Arguments
-----------
-
+ARGUMENTS
+=========
.. flat-table::
:header-rows: 0
- sends the specified raw cmd to the dish via DISEqC.
-Return Value
-------------
+DESCRIPTION
+===========
+
+WARNING: This is a very obscure legacy command, used only at stv0299
+driver. Should not be used on newer drivers.
+
+It provides a non-standard method for selecting Diseqc voltage on the
+frontend, for Dish Network legacy switches.
+
+As support for this ioctl were added in 2004, this means that such
+dishes were already legacy in 2004.
+
+
+RETURN VALUE
+============
On success 0 is returned, on error -1 and the ``errno`` variable is set
appropriately. The generic error codes are described at the
FE_GET_EVENT
************
-Description
------------
+NAME
+====
-This ioctl call returns a frontend event if available. If an event is
-not available, the behavior depends on whether the device is in blocking
-or non-blocking mode. In the latter case, the call fails immediately
-with errno set to ``EWOULDBLOCK``. In the former case, the call blocks until
-an event becomes available.
+FE_GET_EVENT
-Synopsis
---------
+SYNOPSIS
+========
.. c:function:: int ioctl(int fd, int request = QPSK_GET_EVENT, struct dvb_frontend_event *ev)
-Arguments
-----------
-
+ARGUMENTS
+=========
.. flat-table::
:header-rows: 0
- if any, is to be stored.
-Return Value
-------------
+DESCRIPTION
+===========
+
+This ioctl call returns a frontend event if available. If an event is
+not available, the behavior depends on whether the device is in blocking
+or non-blocking mode. In the latter case, the call fails immediately
+with errno set to ``EWOULDBLOCK``. In the former case, the call blocks until
+an event becomes available.
+
+
+RETURN VALUE
+============
On success 0 is returned, on error -1 and the ``errno`` variable is set
appropriately. The generic error codes are described at the
FE_GET_FRONTEND
***************
-Description
------------
+NAME
+====
-This ioctl call queries the currently effective frontend parameters. For
-this command, read-only access to the device is sufficient.
+FE_GET_FRONTEND
-Synopsis
---------
+SYNOPSIS
+========
.. c:function:: int ioctl(int fd, int request = FE_GET_FRONTEND, struct dvb_frontend_parameters *p)
-Arguments
-----------
-
+ARGUMENTS
+=========
.. flat-table::
:header-rows: 0
- Points to parameters for tuning operation.
-Return Value
-------------
+DESCRIPTION
+===========
+
+This ioctl call queries the currently effective frontend parameters. For
+this command, read-only access to the device is sufficient.
+
+
+RETURN VALUE
+============
On success 0 is returned, on error -1 and the ``errno`` variable is set
appropriately. The generic error codes are described at the
FE_READ_SIGNAL_STRENGTH
***********************
-Description
------------
+NAME
+====
-This ioctl call returns the signal strength value for the signal
-currently received by the front-end. For this command, read-only access
-to the device is sufficient.
+FE_READ_SIGNAL_STRENGTH
-Synopsis
---------
+SYNOPSIS
+========
.. c:function:: int ioctl( int fd, int request = FE_READ_SIGNAL_STRENGTH, uint16_t *strength)
-Arguments
-----------
-
+ARGUMENTS
+=========
.. flat-table::
:header-rows: 0
- The signal strength value is stored into \*strength.
-Return Value
-------------
+DESCRIPTION
+===========
+
+This ioctl call returns the signal strength value for the signal
+currently received by the front-end. For this command, read-only access
+to the device is sufficient.
+
+
+RETURN VALUE
+============
On success 0 is returned, on error -1 and the ``errno`` variable is set
appropriately. The generic error codes are described at the
FE_READ_SNR
***********
-Description
------------
+NAME
+====
-This ioctl call returns the signal-to-noise ratio for the signal
-currently received by the front-end. For this command, read-only access
-to the device is sufficient.
+FE_READ_SNR
-Synopsis
---------
+SYNOPSIS
+========
.. c:function:: int ioctl(int fd, int request = FE_READ_SNR, int16_t *snr)
-Arguments
-----------
-
+ARGUMENTS
+=========
.. flat-table::
:header-rows: 0
- The signal-to-noise ratio is stored into \*snr.
-Return Value
-------------
+DESCRIPTION
+===========
+
+This ioctl call returns the signal-to-noise ratio for the signal
+currently received by the front-end. For this command, read-only access
+to the device is sufficient.
+
+
+RETURN VALUE
+============
On success 0 is returned, on error -1 and the ``errno`` variable is set
appropriately. The generic error codes are described at the
FE_READ_UNCORRECTED_BLOCKS
**************************
-Description
------------
+NAME
+====
-This ioctl call returns the number of uncorrected blocks detected by the
-device driver during its lifetime. For meaningful measurements, the
-increment in block count during a specific time interval should be
-calculated. For this command, read-only access to the device is
-sufficient.
+FE_READ_UNCORRECTED_BLOCKS
-Synopsis
---------
+SYNOPSIS
+========
.. c:function:: int ioctl( int fd, int request =FE_READ_UNCORRECTED_BLOCKS, uint32_t *ublocks)
-Arguments
-----------
-
+ARGUMENTS
+=========
.. flat-table::
:header-rows: 0
- The total number of uncorrected blocks seen by the driver so far.
-Return Value
-------------
+DESCRIPTION
+===========
+
+This ioctl call returns the number of uncorrected blocks detected by the
+device driver during its lifetime. For meaningful measurements, the
+increment in block count during a specific time interval should be
+calculated. For this command, read-only access to the device is
+sufficient.
+
+
+RETURN VALUE
+============
On success 0 is returned, on error -1 and the ``errno`` variable is set
appropriately. The generic error codes are described at the
FE_SET_FRONTEND
***************
-Description
------------
+NAME
+====
-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` 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.
+FE_SET_FRONTEND
-Synopsis
---------
+SYNOPSIS
+========
.. c:function:: int ioctl(int fd, int request = FE_SET_FRONTEND, struct dvb_frontend_parameters *p)
-Arguments
-----------
-
+ARGUMENTS
+=========
.. flat-table::
:header-rows: 0
- Points to parameters for tuning operation.
-Return Value
-------------
+DESCRIPTION
+===========
+
+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` 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.
+
+
+RETURN VALUE
+============
On success 0 is returned, on error -1 and the ``errno`` variable is set
appropriately. The generic error codes are described at the
.. _AUDIO_BILINGUAL_CHANNEL_SELECT:
+==============================
AUDIO_BILINGUAL_CHANNEL_SELECT
==============================
-Description
------------
-
-This ioctl is obsolete. Do not use in new drivers. It has been replaced
-by the V4L2 ``V4L2_CID_MPEG_AUDIO_DEC_MULTILINGUAL_PLAYBACK`` control
-for MPEG decoders controlled through V4L2.
+NAME
+----
-This ioctl call asks the Audio Device to select the requested channel
-for bilingual streams if possible.
+AUDIO_BILINGUAL_CHANNEL_SELECT
-Synopsis
+SYNOPSIS
--------
.. c:function:: int ioctl(int fd, int request = AUDIO_BILINGUAL_CHANNEL_SELECT, audio_channel_select_t)
-Arguments
-----------
-
+ARGUMENTS
+---------
.. flat-table::
:header-rows: 0
- Select the output format of the audio (mono left/right, stereo).
-Return Value
+DESCRIPTION
+-----------
+
+This ioctl is obsolete. Do not use in new drivers. It has been replaced
+by the V4L2 ``V4L2_CID_MPEG_AUDIO_DEC_MULTILINGUAL_PLAYBACK`` control
+for MPEG decoders controlled through V4L2.
+
+This ioctl call asks the Audio Device to select the requested channel
+for bilingual streams if possible.
+
+
+RETURN VALUE
------------
On success 0 is returned, on error -1 and the ``errno`` variable is set
appropriately. The generic error codes are described at the
:ref:`Generic Error Codes <gen-errors>` chapter.
-
-
.. _AUDIO_CHANNEL_SELECT:
+====================
AUDIO_CHANNEL_SELECT
====================
-Description
------------
-
-This ioctl is for DVB devices only. To control a V4L2 decoder use the
-V4L2 ``V4L2_CID_MPEG_AUDIO_DEC_PLAYBACK`` control instead.
+NAME
+----
-This ioctl call asks the Audio Device to select the requested channel if
-possible.
+AUDIO_CHANNEL_SELECT
-Synopsis
+SYNOPSIS
--------
.. c:function:: int ioctl(int fd, int request = AUDIO_CHANNEL_SELECT, audio_channel_select_t)
-Arguments
-----------
-
+ARGUMENTS
+---------
.. flat-table::
:header-rows: 0
- Select the output format of the audio (mono left/right, stereo).
-Return Value
+DESCRIPTION
+-----------
+
+This ioctl is for DVB devices only. To control a V4L2 decoder use the
+V4L2 ``V4L2_CID_MPEG_AUDIO_DEC_PLAYBACK`` control instead.
+
+This ioctl call asks the Audio Device to select the requested channel if
+possible.
+
+
+RETURN VALUE
------------
On success 0 is returned, on error -1 and the ``errno`` variable is set
appropriately. The generic error codes are described at the
:ref:`Generic Error Codes <gen-errors>` chapter.
-
-
.. _AUDIO_CLEAR_BUFFER:
+==================
AUDIO_CLEAR_BUFFER
==================
-Description
------------
+NAME
+----
-This ioctl call asks the Audio Device to clear all software and hardware
-buffers of the audio decoder device.
+AUDIO_CLEAR_BUFFER
-Synopsis
+SYNOPSIS
--------
.. c:function:: int ioctl(int fd, int request = AUDIO_CLEAR_BUFFER)
-Arguments
-----------
-
+ARGUMENTS
+---------
.. flat-table::
:header-rows: 0
- Equals AUDIO_CLEAR_BUFFER for this command.
-Return Value
+DESCRIPTION
+-----------
+
+This ioctl call asks the Audio Device to clear all software and hardware
+buffers of the audio decoder device.
+
+
+RETURN VALUE
------------
On success 0 is returned, on error -1 and the ``errno`` variable is set
appropriately. The generic error codes are described at the
:ref:`Generic Error Codes <gen-errors>` chapter.
-
-
.. _AUDIO_CONTINUE:
+==============
AUDIO_CONTINUE
==============
-Description
------------
+NAME
+----
-This ioctl restarts the decoding and playing process previously paused
-with AUDIO_PAUSE command.
+AUDIO_CONTINUE
-Synopsis
+SYNOPSIS
--------
.. c:function:: int ioctl(int fd, int request = AUDIO_CONTINUE)
-Arguments
-----------
-
+ARGUMENTS
+---------
.. flat-table::
:header-rows: 0
- Equals AUDIO_CONTINUE for this command.
-Return Value
+DESCRIPTION
+-----------
+
+This ioctl restarts the decoding and playing process previously paused
+with AUDIO_PAUSE command.
+
+
+RETURN VALUE
------------
On success 0 is returned, on error -1 and the ``errno`` variable is set
appropriately. The generic error codes are described at the
:ref:`Generic Error Codes <gen-errors>` chapter.
-
-
.. _audio_fclose:
+=================
DVB audio close()
=================
-Description
------------
+NAME
+----
-This system call closes a previously opened audio device.
+DVB audio close()
-Synopsis
+SYNOPSIS
--------
.. c:function:: int close(int fd)
-Arguments
-----------
-
+ARGUMENTS
+---------
.. flat-table::
:header-rows: 0
- File descriptor returned by a previous call to open().
-Return Value
-------------
+DESCRIPTION
+-----------
+
+This system call closes a previously opened audio device.
+RETURN VALUE
+------------
.. flat-table::
:header-rows: 0
- ``EBADF``
- fd is not a valid open file descriptor.
-
-
-
.. _audio_fopen:
+================
DVB audio open()
================
-Description
------------
+NAME
+----
-This system call opens a named audio device (e.g.
-/dev/dvb/adapter0/audio0) for subsequent use. When an open() call has
-succeeded, the device will be ready for use. The significance of
-blocking or non-blocking mode is described in the documentation for
-functions where there is a difference. It does not affect the semantics
-of the open() call itself. A device opened in blocking mode can later be
-put into non-blocking mode (and vice versa) using the F_SETFL command
-of the fcntl system call. This is a standard system call, documented in
-the Linux manual page for fcntl. Only one user can open the Audio Device
-in O_RDWR mode. All other attempts to open the device in this mode will
-fail, and an error code will be returned. If the Audio Device is opened
-in O_RDONLY mode, the only ioctl call that can be used is
-AUDIO_GET_STATUS. All other call will return with an error code.
+DVB audio open()
-Synopsis
+SYNOPSIS
--------
.. c:function:: int open(const char *deviceName, int flags)
-Arguments
-----------
-
+ARGUMENTS
+---------
.. flat-table::
:header-rows: 0
- (blocking mode is the default)
-Return Value
-------------
+DESCRIPTION
+-----------
+This system call opens a named audio device (e.g.
+/dev/dvb/adapter0/audio0) for subsequent use. When an open() call has
+succeeded, the device will be ready for use. The significance of
+blocking or non-blocking mode is described in the documentation for
+functions where there is a difference. It does not affect the semantics
+of the open() call itself. A device opened in blocking mode can later be
+put into non-blocking mode (and vice versa) using the F_SETFL command
+of the fcntl system call. This is a standard system call, documented in
+the Linux manual page for fcntl. Only one user can open the Audio Device
+in O_RDWR mode. All other attempts to open the device in this mode will
+fail, and an error code will be returned. If the Audio Device is opened
+in O_RDONLY mode, the only ioctl call that can be used is
+AUDIO_GET_STATUS. All other call will return with an error code.
+RETURN VALUE
+------------
+
.. flat-table::
:header-rows: 0
:stub-columns: 0
- ``EINVAL``
- Invalid argument.
-
-
-
.. _audio_fwrite:
+=================
DVB audio write()
=================
-Description
------------
+NAME
+----
-This system call can only be used if AUDIO_SOURCE_MEMORY is selected
-in the ioctl call AUDIO_SELECT_SOURCE. The data provided shall be in
-PES format. If O_NONBLOCK is not specified the function will block
-until buffer space is available. The amount of data to be transferred is
-implied by count.
+DVB audio write()
-Synopsis
+SYNOPSIS
--------
.. c:function:: size_t write(int fd, const void *buf, size_t count)
-Arguments
-----------
-
+ARGUMENTS
+---------
.. flat-table::
:header-rows: 0
- Size of buf.
-Return Value
-------------
+DESCRIPTION
+-----------
+This system call can only be used if AUDIO_SOURCE_MEMORY is selected
+in the ioctl call AUDIO_SELECT_SOURCE. The data provided shall be in
+PES format. If O_NONBLOCK is not specified the function will block
+until buffer space is available. The amount of data to be transferred is
+implied by count.
+RETURN VALUE
+------------
+
.. flat-table::
:header-rows: 0
:stub-columns: 0
- ``EBADF``
- fd is not a valid open file descriptor.
-
-
-
.. _AUDIO_GET_CAPABILITIES:
+======================
AUDIO_GET_CAPABILITIES
======================
-Description
------------
+NAME
+----
-This ioctl call asks the Audio Device to tell us about the decoding
-capabilities of the audio hardware.
+AUDIO_GET_CAPABILITIES
-Synopsis
+SYNOPSIS
--------
.. c:function:: int ioctl(int fd, int request = AUDIO_GET_CAPABILITIES, unsigned int *cap)
-Arguments
-----------
-
+ARGUMENTS
+---------
.. flat-table::
:header-rows: 0
- Returns a bit array of supported sound formats.
-Return Value
+DESCRIPTION
+-----------
+
+This ioctl call asks the Audio Device to tell us about the decoding
+capabilities of the audio hardware.
+
+
+RETURN VALUE
------------
On success 0 is returned, on error -1 and the ``errno`` variable is set
appropriately. The generic error codes are described at the
:ref:`Generic Error Codes <gen-errors>` chapter.
-
-
.. _AUDIO_GET_PTS:
+=============
AUDIO_GET_PTS
=============
-Description
------------
-
-This ioctl is obsolete. Do not use in new drivers. If you need this
-functionality, then please contact the linux-media mailing list
-(`https://linuxtv.org/lists.php <https://linuxtv.org/lists.php>`__).
+NAME
+----
-This ioctl call asks the Audio Device to return the current PTS
-timestamp.
+AUDIO_GET_PTS
-Synopsis
+SYNOPSIS
--------
.. c:function:: int ioctl(int fd, int request = AUDIO_GET_PTS, __u64 *pts)
-Arguments
-----------
-
+ARGUMENTS
+---------
.. flat-table::
:header-rows: 0
decoded frame or the last PTS extracted by the PES parser.
-Return Value
+DESCRIPTION
+-----------
+
+This ioctl is obsolete. Do not use in new drivers. If you need this
+functionality, then please contact the linux-media mailing list
+(`https://linuxtv.org/lists.php <https://linuxtv.org/lists.php>`__).
+
+This ioctl call asks the Audio Device to return the current PTS
+timestamp.
+
+
+RETURN VALUE
------------
On success 0 is returned, on error -1 and the ``errno`` variable is set
appropriately. The generic error codes are described at the
:ref:`Generic Error Codes <gen-errors>` chapter.
-
-
.. _AUDIO_GET_STATUS:
+================
AUDIO_GET_STATUS
================
-Description
------------
+NAME
+----
-This ioctl call asks the Audio Device to return the current state of the
-Audio Device.
+AUDIO_GET_STATUS
-Synopsis
+SYNOPSIS
--------
.. c:function:: int ioctl(int fd, int request = AUDIO_GET_STATUS, struct audio_status *status)
-Arguments
-----------
-
+ARGUMENTS
+---------
.. flat-table::
:header-rows: 0
- Returns the current state of Audio Device.
-Return Value
+DESCRIPTION
+-----------
+
+This ioctl call asks the Audio Device to return the current state of the
+Audio Device.
+
+
+RETURN VALUE
------------
On success 0 is returned, on error -1 and the ``errno`` variable is set
appropriately. The generic error codes are described at the
:ref:`Generic Error Codes <gen-errors>` chapter.
-
-
.. _AUDIO_PAUSE:
+===========
AUDIO_PAUSE
===========
-Description
------------
+NAME
+----
-This ioctl call suspends the audio stream being played. Decoding and
-playing are paused. It is then possible to restart again decoding and
-playing process of the audio stream using AUDIO_CONTINUE command.
+AUDIO_PAUSE
-Synopsis
+SYNOPSIS
--------
.. c:function:: int ioctl(int fd, int request = AUDIO_PAUSE)
-Arguments
-----------
-
+ARGUMENTS
+---------
.. flat-table::
:header-rows: 0
- Equals AUDIO_PAUSE for this command.
-Return Value
+DESCRIPTION
+-----------
+
+This ioctl call suspends the audio stream being played. Decoding and
+playing are paused. It is then possible to restart again decoding and
+playing process of the audio stream using AUDIO_CONTINUE command.
+
+
+RETURN VALUE
------------
On success 0 is returned, on error -1 and the ``errno`` variable is set
appropriately. The generic error codes are described at the
:ref:`Generic Error Codes <gen-errors>` chapter.
-
-
.. _AUDIO_PLAY:
+==========
AUDIO_PLAY
==========
-Description
------------
+NAME
+----
-This ioctl call asks the Audio Device to start playing an audio stream
-from the selected source.
+AUDIO_PLAY
-Synopsis
+SYNOPSIS
--------
.. c:function:: int ioctl(int fd, int request = AUDIO_PLAY)
-Arguments
-----------
-
+ARGUMENTS
+---------
.. flat-table::
:header-rows: 0
- Equals AUDIO_PLAY for this command.
-Return Value
+DESCRIPTION
+-----------
+
+This ioctl call asks the Audio Device to start playing an audio stream
+from the selected source.
+
+
+RETURN VALUE
------------
On success 0 is returned, on error -1 and the ``errno`` variable is set
appropriately. The generic error codes are described at the
:ref:`Generic Error Codes <gen-errors>` chapter.
-
-
.. _AUDIO_SELECT_SOURCE:
+===================
AUDIO_SELECT_SOURCE
===================
-Description
------------
+NAME
+----
-This ioctl call informs the audio device which source shall be used for
-the input data. The possible sources are demux or memory. If
-AUDIO_SOURCE_MEMORY is selected, the data is fed to the Audio Device
-through the write command.
+AUDIO_SELECT_SOURCE
-Synopsis
+SYNOPSIS
--------
.. c:function:: int ioctl(int fd, int request = AUDIO_SELECT_SOURCE, audio_stream_source_t source)
-Arguments
-----------
-
+ARGUMENTS
+---------
.. flat-table::
:header-rows: 0
- Indicates the source that shall be used for the Audio stream.
-Return Value
+DESCRIPTION
+-----------
+
+This ioctl call informs the audio device which source shall be used for
+the input data. The possible sources are demux or memory. If
+AUDIO_SOURCE_MEMORY is selected, the data is fed to the Audio Device
+through the write command.
+
+
+RETURN VALUE
------------
On success 0 is returned, on error -1 and the ``errno`` variable is set
appropriately. The generic error codes are described at the
:ref:`Generic Error Codes <gen-errors>` chapter.
-
-
.. _AUDIO_SET_ATTRIBUTES:
+====================
AUDIO_SET_ATTRIBUTES
====================
-Description
------------
+NAME
+----
-This ioctl is intended for DVD playback and allows you to set certain
-information about the audio stream.
+AUDIO_SET_ATTRIBUTES
-Synopsis
+SYNOPSIS
--------
.. c:function:: int ioctl(fd, int request = AUDIO_SET_ATTRIBUTES, audio_attributes_t attr )
-Arguments
-----------
-
+ARGUMENTS
+---------
.. flat-table::
:header-rows: 0
- audio attributes according to section ??
-Return Value
+DESCRIPTION
+-----------
+
+This ioctl is intended for DVD playback and allows you to set certain
+information about the audio stream.
+
+
+RETURN VALUE
------------
On success 0 is returned, on error -1 and the ``errno`` variable is set
- ``EINVAL``
- attr is not a valid or supported attribute setting.
-
-
-
.. _AUDIO_SET_AV_SYNC:
+=================
AUDIO_SET_AV_SYNC
=================
-Description
------------
+NAME
+----
-This ioctl call asks the Audio Device to turn ON or OFF A/V
-synchronization.
+AUDIO_SET_AV_SYNC
-Synopsis
+SYNOPSIS
--------
.. c:function:: int ioctl(int fd, int request = AUDIO_SET_AV_SYNC, boolean state)
-Arguments
-----------
-
+ARGUMENTS
+---------
.. flat-table::
:header-rows: 0
- FALSE AV-sync OFF
-Return Value
+DESCRIPTION
+-----------
+
+This ioctl call asks the Audio Device to turn ON or OFF A/V
+synchronization.
+
+
+RETURN VALUE
------------
On success 0 is returned, on error -1 and the ``errno`` variable is set
appropriately. The generic error codes are described at the
:ref:`Generic Error Codes <gen-errors>` chapter.
-
-
.. _AUDIO_SET_BYPASS_MODE:
+=====================
AUDIO_SET_BYPASS_MODE
=====================
-Description
------------
+NAME
+----
-This ioctl call asks the Audio Device to bypass the Audio decoder and
-forward the stream without decoding. This mode shall be used if streams
-that can’t be handled by the DVB system shall be decoded. Dolby
-DigitalTM streams are automatically forwarded by the DVB subsystem if
-the hardware can handle it.
+AUDIO_SET_BYPASS_MODE
-Synopsis
+SYNOPSIS
--------
.. c:function:: int ioctl(int fd, int request = AUDIO_SET_BYPASS_MODE, boolean mode)
-Arguments
-----------
-
+ARGUMENTS
+---------
.. flat-table::
:header-rows: 0
- FALSE Bypass is enabled
-Return Value
+DESCRIPTION
+-----------
+
+This ioctl call asks the Audio Device to bypass the Audio decoder and
+forward the stream without decoding. This mode shall be used if streams
+that can’t be handled by the DVB system shall be decoded. Dolby
+DigitalTM streams are automatically forwarded by the DVB subsystem if
+the hardware can handle it.
+
+
+RETURN VALUE
------------
On success 0 is returned, on error -1 and the ``errno`` variable is set
appropriately. The generic error codes are described at the
:ref:`Generic Error Codes <gen-errors>` chapter.
-
-
.. _AUDIO_SET_EXT_ID:
+================
AUDIO_SET_EXT_ID
================
-Description
------------
+NAME
+----
-This ioctl can be used to set the extension id for MPEG streams in DVD
-playback. Only the first 3 bits are recognized.
+AUDIO_SET_EXT_ID
-Synopsis
+SYNOPSIS
--------
.. c:function:: int ioctl(fd, int request = AUDIO_SET_EXT_ID, int id)
-Arguments
-----------
-
+ARGUMENTS
+---------
.. flat-table::
:header-rows: 0
- audio sub_stream_id
-Return Value
+DESCRIPTION
+-----------
+
+This ioctl can be used to set the extension id for MPEG streams in DVD
+playback. Only the first 3 bits are recognized.
+
+
+RETURN VALUE
------------
On success 0 is returned, on error -1 and the ``errno`` variable is set
- ``EINVAL``
- id is not a valid id.
-
-
-
.. _AUDIO_SET_ID:
+============
AUDIO_SET_ID
============
-Description
------------
+NAME
+----
-This ioctl selects which sub-stream is to be decoded if a program or
-system stream is sent to the video device. If no audio stream type is
-set the id has to be in [0xC0,0xDF] for MPEG sound, in [0x80,0x87] for
-AC3 and in [0xA0,0xA7] for LPCM. More specifications may follow for
-other stream types. If the stream type is set the id just specifies the
-substream id of the audio stream and only the first 5 bits are
-recognized.
+AUDIO_SET_ID
-Synopsis
+SYNOPSIS
--------
.. c:function:: int ioctl(int fd, int request = AUDIO_SET_ID, int id)
-Arguments
-----------
-
+ARGUMENTS
+---------
.. flat-table::
:header-rows: 0
- audio sub-stream id
-Return Value
+DESCRIPTION
+-----------
+
+This ioctl selects which sub-stream is to be decoded if a program or
+system stream is sent to the video device. If no audio stream type is
+set the id has to be in [0xC0,0xDF] for MPEG sound, in [0x80,0x87] for
+AC3 and in [0xA0,0xA7] for LPCM. More specifications may follow for
+other stream types. If the stream type is set the id just specifies the
+substream id of the audio stream and only the first 5 bits are
+recognized.
+
+
+RETURN VALUE
------------
On success 0 is returned, on error -1 and the ``errno`` variable is set
appropriately. The generic error codes are described at the
:ref:`Generic Error Codes <gen-errors>` chapter.
-
-
.. _AUDIO_SET_KARAOKE:
+=================
AUDIO_SET_KARAOKE
=================
-Description
------------
+NAME
+----
-This ioctl allows one to set the mixer settings for a karaoke DVD.
+AUDIO_SET_KARAOKE
-Synopsis
+SYNOPSIS
--------
.. c:function:: int ioctl(fd, int request = AUDIO_SET_KARAOKE, audio_karaoke_t *karaoke)
-Arguments
-----------
-
+ARGUMENTS
+---------
.. flat-table::
:header-rows: 0
- karaoke settings according to section ??.
-Return Value
+DESCRIPTION
+-----------
+
+This ioctl allows one to set the mixer settings for a karaoke DVD.
+
+
+RETURN VALUE
------------
On success 0 is returned, on error -1 and the ``errno`` variable is set
.. _AUDIO_SET_MIXER:
+===============
AUDIO_SET_MIXER
===============
-Description
------------
+NAME
+----
-This ioctl lets you adjust the mixer settings of the audio decoder.
+AUDIO_SET_MIXER
-Synopsis
+SYNOPSIS
--------
.. c:function:: int ioctl(int fd, int request = AUDIO_SET_MIXER, audio_mixer_t *mix)
-Arguments
-----------
-
+ARGUMENTS
+---------
.. flat-table::
:header-rows: 0
- mixer settings.
-Return Value
+DESCRIPTION
+-----------
+
+This ioctl lets you adjust the mixer settings of the audio decoder.
+
+
+RETURN VALUE
------------
On success 0 is returned, on error -1 and the ``errno`` variable is set
appropriately. The generic error codes are described at the
:ref:`Generic Error Codes <gen-errors>` chapter.
-
-
.. _AUDIO_SET_MUTE:
+==============
AUDIO_SET_MUTE
==============
-Description
------------
-
-This ioctl is for DVB devices only. To control a V4L2 decoder use the
-V4L2 :ref:`VIDIOC_DECODER_CMD` with the
-``V4L2_DEC_CMD_START_MUTE_AUDIO`` flag instead.
+NAME
+----
-This ioctl call asks the audio device to mute the stream that is
-currently being played.
+AUDIO_SET_MUTE
-Synopsis
+SYNOPSIS
--------
.. c:function:: int ioctl(int fd, int request = AUDIO_SET_MUTE, boolean state)
-Arguments
-----------
-
+ARGUMENTS
+---------
.. flat-table::
:header-rows: 0
- FALSE Audio Un-mute
-Return Value
+DESCRIPTION
+-----------
+
+This ioctl is for DVB devices only. To control a V4L2 decoder use 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
+currently being played.
+
+
+RETURN VALUE
------------
On success 0 is returned, on error -1 and the ``errno`` variable is set
appropriately. The generic error codes are described at the
:ref:`Generic Error Codes <gen-errors>` chapter.
-
-
.. _AUDIO_SET_STREAMTYPE:
+====================
AUDIO_SET_STREAMTYPE
====================
-Description
------------
+NAME
+----
-This ioctl tells the driver which kind of audio stream to expect. This
-is useful if the stream offers several audio sub-streams like LPCM and
-AC3.
+AUDIO_SET_STREAMTYPE
-Synopsis
+SYNOPSIS
--------
.. c:function:: int ioctl(fd, int request = AUDIO_SET_STREAMTYPE, int type)
-Arguments
-----------
-
+ARGUMENTS
+---------
.. flat-table::
:header-rows: 0
- stream type
-Return Value
+DESCRIPTION
+-----------
+
+This ioctl tells the driver which kind of audio stream to expect. This
+is useful if the stream offers several audio sub-streams like LPCM and
+AC3.
+
+
+RETURN VALUE
------------
On success 0 is returned, on error -1 and the ``errno`` variable is set
- ``EINVAL``
- type is not a valid or supported stream type.
-
-
-
.. _AUDIO_STOP:
+==========
AUDIO_STOP
==========
-Description
------------
+NAME
+----
-This ioctl call asks the Audio Device to stop playing the current
-stream.
+AUDIO_STOP
-Synopsis
+SYNOPSIS
--------
.. c:function:: int ioctl(int fd, int request = AUDIO_STOP)
-Arguments
-----------
-
+ARGUMENTS
+---------
.. flat-table::
:header-rows: 0
- Equals AUDIO_STOP for this command.
-Return Value
+DESCRIPTION
+-----------
+
+This ioctl call asks the Audio Device to stop playing the current
+stream.
+
+
+RETURN VALUE
------------
On success 0 is returned, on error -1 and the ``errno`` variable is set
appropriately. The generic error codes are described at the
:ref:`Generic Error Codes <gen-errors>` chapter.
-
-
.. _ca_fclose:
+==============
DVB CA close()
==============
-Description
------------
+NAME
+----
-This system call closes a previously opened audio device.
+DVB CA close()
-Synopsis
+SYNOPSIS
--------
.. cpp:function:: int close(int fd)
-Arguments
-----------
-
+ARGUMENTS
+---------
.. flat-table::
:header-rows: 0
- File descriptor returned by a previous call to open().
-Return Value
-------------
+DESCRIPTION
+-----------
+
+This system call closes a previously opened audio device.
+RETURN VALUE
+------------
.. flat-table::
:header-rows: 0
- ``EBADF``
- fd is not a valid open file descriptor.
-
-
-
.. _ca_fopen:
+=============
DVB CA open()
=============
-Description
------------
-
-This system call opens a named ca device (e.g. /dev/ost/ca) for
-subsequent use.
+NAME
+----
-When an open() call has succeeded, the device will be ready for use. The
-significance of blocking or non-blocking mode is described in the
-documentation for functions where there is a difference. It does not
-affect the semantics of the open() call itself. A device opened in
-blocking mode can later be put into non-blocking mode (and vice versa)
-using the F_SETFL command of the fcntl system call. This is a standard
-system call, documented in the Linux manual page for fcntl. Only one
-user can open the CA Device in O_RDWR mode. All other attempts to open
-the device in this mode will fail, and an error code will be returned.
+DVB CA open()
-Synopsis
+SYNOPSIS
--------
.. cpp:function:: int open(const char *deviceName, int flags)
-Arguments
-----------
-
+ARGUMENTS
+---------
.. flat-table::
:header-rows: 0
- (blocking mode is the default)
-Return Value
-------------
+DESCRIPTION
+-----------
+This system call opens a named ca device (e.g. /dev/ost/ca) for
+subsequent use.
+When an open() call has succeeded, the device will be ready for use. The
+significance of blocking or non-blocking mode is described in the
+documentation for functions where there is a difference. It does not
+affect the semantics of the open() call itself. A device opened in
+blocking mode can later be put into non-blocking mode (and vice versa)
+using the F_SETFL command of the fcntl system call. This is a standard
+system call, documented in the Linux manual page for fcntl. Only one
+user can open the CA Device in O_RDWR mode. All other attempts to open
+the device in this mode will fail, and an error code will be returned.
+
+
+RETURN VALUE
+------------
.. flat-table::
:header-rows: 0
- ``EINVAL``
- Invalid argument.
-
-
-
.. _CA_GET_CAP:
+==========
CA_GET_CAP
==========
-Description
------------
+NAME
+----
-This ioctl is undocumented. Documentation is welcome.
+CA_GET_CAP
-Synopsis
+SYNOPSIS
--------
.. cpp:function:: int ioctl(fd, int request = CA_GET_CAP, ca_caps_t *)
-Arguments
-----------
-
+ARGUMENTS
+---------
.. flat-table::
:header-rows: 0
- Undocumented.
-Return Value
+DESCRIPTION
+-----------
+
+This ioctl is undocumented. Documentation is welcome.
+
+
+RETURN VALUE
------------
On success 0 is returned, on error -1 and the ``errno`` variable is set
appropriately. The generic error codes are described at the
:ref:`Generic Error Codes <gen-errors>` chapter.
-
-
.. _CA_GET_DESCR_INFO:
+=================
CA_GET_DESCR_INFO
=================
-Description
------------
+NAME
+----
-This ioctl is undocumented. Documentation is welcome.
+CA_GET_DESCR_INFO
-Synopsis
+SYNOPSIS
--------
.. cpp:function:: int ioctl(fd, int request = CA_GET_DESCR_INFO, ca_descr_info_t *)
-Arguments
-----------
-
+ARGUMENTS
+---------
.. flat-table::
:header-rows: 0
- Undocumented.
-Return Value
+DESCRIPTION
+-----------
+
+This ioctl is undocumented. Documentation is welcome.
+
+
+RETURN VALUE
------------
On success 0 is returned, on error -1 and the ``errno`` variable is set
appropriately. The generic error codes are described at the
:ref:`Generic Error Codes <gen-errors>` chapter.
-
-
.. _CA_GET_MSG:
+==========
CA_GET_MSG
==========
-Description
------------
+NAME
+----
-This ioctl is undocumented. Documentation is welcome.
+CA_GET_MSG
-Synopsis
+SYNOPSIS
--------
.. cpp:function:: int ioctl(fd, int request = CA_GET_MSG, ca_msg_t *)
-Arguments
-----------
-
+ARGUMENTS
+---------
.. flat-table::
:header-rows: 0
- Undocumented.
-Return Value
+DESCRIPTION
+-----------
+
+This ioctl is undocumented. Documentation is welcome.
+
+
+RETURN VALUE
------------
On success 0 is returned, on error -1 and the ``errno`` variable is set
appropriately. The generic error codes are described at the
:ref:`Generic Error Codes <gen-errors>` chapter.
-
-
.. _CA_GET_SLOT_INFO:
+================
CA_GET_SLOT_INFO
================
-Description
------------
+NAME
+----
-This ioctl is undocumented. Documentation is welcome.
+CA_GET_SLOT_INFO
-Synopsis
+SYNOPSIS
--------
.. cpp:function:: int ioctl(fd, int request = CA_GET_SLOT_INFO, ca_slot_info_t *)
-Arguments
-----------
-
+ARGUMENTS
+---------
.. flat-table::
:header-rows: 0
- Undocumented.
-Return Value
+DESCRIPTION
+-----------
+
+This ioctl is undocumented. Documentation is welcome.
+
+
+RETURN VALUE
------------
On success 0 is returned, on error -1 and the ``errno`` variable is set
appropriately. The generic error codes are described at the
:ref:`Generic Error Codes <gen-errors>` chapter.
-
-
.. _CA_RESET:
+========
CA_RESET
========
-Description
------------
+NAME
+----
-This ioctl is undocumented. Documentation is welcome.
+CA_RESET
-Synopsis
+SYNOPSIS
--------
.. cpp:function:: int ioctl(fd, int request = CA_RESET)
-Arguments
-----------
-
+ARGUMENTS
+---------
.. flat-table::
:header-rows: 0
- Equals CA_RESET for this command.
-Return Value
+DESCRIPTION
+-----------
+
+This ioctl is undocumented. Documentation is welcome.
+
+
+RETURN VALUE
------------
On success 0 is returned, on error -1 and the ``errno`` variable is set
appropriately. The generic error codes are described at the
:ref:`Generic Error Codes <gen-errors>` chapter.
-
-
.. _CA_SEND_MSG:
+===========
CA_SEND_MSG
===========
-Description
------------
+NAME
+----
-This ioctl is undocumented. Documentation is welcome.
+CA_SEND_MSG
-Synopsis
+SYNOPSIS
--------
.. cpp:function:: int ioctl(fd, int request = CA_SEND_MSG, ca_msg_t *)
-Arguments
-----------
-
+ARGUMENTS
+---------
.. flat-table::
:header-rows: 0
- Undocumented.
-Return Value
+DESCRIPTION
+-----------
+
+This ioctl is undocumented. Documentation is welcome.
+
+
+RETURN VALUE
------------
On success 0 is returned, on error -1 and the ``errno`` variable is set
appropriately. The generic error codes are described at the
:ref:`Generic Error Codes <gen-errors>` chapter.
-
-
.. _CA_SET_DESCR:
+============
CA_SET_DESCR
============
-Description
------------
+NAME
+----
-This ioctl is undocumented. Documentation is welcome.
+CA_SET_DESCR
-Synopsis
+SYNOPSIS
--------
.. cpp:function:: int ioctl(fd, int request = CA_SET_DESCR, ca_descr_t *)
-Arguments
-----------
-
+ARGUMENTS
+---------
.. flat-table::
:header-rows: 0
- Undocumented.
-Return Value
+DESCRIPTION
+-----------
+
+This ioctl is undocumented. Documentation is welcome.
+
+
+RETURN VALUE
------------
On success 0 is returned, on error -1 and the ``errno`` variable is set
appropriately. The generic error codes are described at the
:ref:`Generic Error Codes <gen-errors>` chapter.
-
-
.. _CA_SET_PID:
+==========
CA_SET_PID
==========
-Description
------------
+NAME
+----
-This ioctl is undocumented. Documentation is welcome.
+CA_SET_PID
-Synopsis
+SYNOPSIS
--------
.. cpp:function:: int ioctl(fd, int request = CA_SET_PID, ca_pid_t *)
-Arguments
-----------
-
+ARGUMENTS
+---------
.. flat-table::
:header-rows: 0
- Undocumented.
-Return Value
+DESCRIPTION
+-----------
+
+This ioctl is undocumented. Documentation is welcome.
+
+
+RETURN VALUE
------------
On success 0 is returned, on error -1 and the ``errno`` variable is set
.. _DMX_ADD_PID:
+===========
DMX_ADD_PID
===========
-Description
------------
+NAME
+----
-This ioctl call allows to add multiple PIDs to a transport stream filter
-previously set up with DMX_SET_PES_FILTER and output equal to
-DMX_OUT_TSDEMUX_TAP.
+DMX_ADD_PID
-Synopsis
+SYNOPSIS
--------
.. c:function:: int ioctl(fd, int request = DMX_ADD_PID, __u16 *)
-Arguments
-----------
-
+ARGUMENTS
+---------
.. flat-table::
:header-rows: 0
- PID number to be filtered.
-Return Value
+DESCRIPTION
+-----------
+
+This ioctl call allows to add multiple PIDs to a transport stream filter
+previously set up with DMX_SET_PES_FILTER and output equal to
+DMX_OUT_TSDEMUX_TAP.
+
+
+RETURN VALUE
------------
On success 0 is returned, on error -1 and the ``errno`` variable is set
appropriately. The generic error codes are described at the
:ref:`Generic Error Codes <gen-errors>` chapter.
-
-
.. _dmx_fclose:
+=================
DVB demux close()
=================
-Description
------------
+NAME
+----
-This system call deactivates and deallocates a filter that was
-previously allocated via the open() call.
+DVB demux close()
-Synopsis
+SYNOPSIS
--------
.. c:function:: int close(int fd)
-Arguments
-----------
-
+ARGUMENTS
+---------
.. flat-table::
:header-rows: 0
- File descriptor returned by a previous call to open().
-Return Value
-------------
+DESCRIPTION
+-----------
+This system call deactivates and deallocates a filter that was
+previously allocated via the open() call.
+RETURN VALUE
+------------
+
.. flat-table::
:header-rows: 0
:stub-columns: 0
- ``EBADF``
- fd is not a valid open file descriptor.
-
-
-
.. _dmx_fopen:
+================
DVB demux open()
================
-Description
------------
-
-This system call, used with a device name of /dev/dvb/adapter0/demux0,
-allocates a new filter and returns a handle which can be used for
-subsequent control of that filter. This call has to be made for each
-filter to be used, i.e. every returned file descriptor is a reference to
-a single filter. /dev/dvb/adapter0/dvr0 is a logical device to be used
-for retrieving Transport Streams for digital video recording. When
-reading from this device a transport stream containing the packets from
-all PES filters set in the corresponding demux device
-(/dev/dvb/adapter0/demux0) having the output set to DMX_OUT_TS_TAP. A
-recorded Transport Stream is replayed by writing to this device.
+NAME
+----
-The significance of blocking or non-blocking mode is described in the
-documentation for functions where there is a difference. It does not
-affect the semantics of the open() call itself. A device opened in
-blocking mode can later be put into non-blocking mode (and vice versa)
-using the F_SETFL command of the fcntl system call.
+DVB demux open()
-Synopsis
+SYNOPSIS
--------
.. c:function:: int open(const char *deviceName, int flags)
-Arguments
-----------
-
+ARGUMENTS
+---------
.. flat-table::
:header-rows: 0
- (blocking mode is the default)
-Return Value
-------------
+DESCRIPTION
+-----------
+This system call, used with a device name of /dev/dvb/adapter0/demux0,
+allocates a new filter and returns a handle which can be used for
+subsequent control of that filter. This call has to be made for each
+filter to be used, i.e. every returned file descriptor is a reference to
+a single filter. /dev/dvb/adapter0/dvr0 is a logical device to be used
+for retrieving Transport Streams for digital video recording. When
+reading from this device a transport stream containing the packets from
+all PES filters set in the corresponding demux device
+(/dev/dvb/adapter0/demux0) having the output set to DMX_OUT_TS_TAP. A
+recorded Transport Stream is replayed by writing to this device.
+
+The significance of blocking or non-blocking mode is described in the
+documentation for functions where there is a difference. It does not
+affect the semantics of the open() call itself. A device opened in
+blocking mode can later be put into non-blocking mode (and vice versa)
+using the F_SETFL command of the fcntl system call.
+RETURN VALUE
+------------
+
.. flat-table::
:header-rows: 0
:stub-columns: 0
- ``ENOMEM``
- The driver failed to allocate enough memory.
-
-
-
.. _dmx_fread:
+================
DVB demux read()
================
-Description
------------
+NAME
+----
-This system call returns filtered data, which might be section or PES
-data. The filtered data is transferred from the driver’s internal
-circular buffer to buf. The maximum amount of data to be transferred is
-implied by count.
+DVB demux read()
-Synopsis
+SYNOPSIS
--------
.. c:function:: size_t read(int fd, void *buf, size_t count)
-Arguments
-----------
-
+ARGUMENTS
+---------
.. flat-table::
:header-rows: 0
- Size of buf.
-Return Value
-------------
+DESCRIPTION
+-----------
+This system call returns filtered data, which might be section or PES
+data. The filtered data is transferred from the driver’s internal
+circular buffer to buf. The maximum amount of data to be transferred is
+implied by count.
+RETURN VALUE
+------------
+
.. flat-table::
:header-rows: 0
:stub-columns: 0
- The driver failed to write to the callers buffer due to an invalid
\*buf pointer.
-
-
-
.. _dmx_fwrite:
+=================
DVB demux write()
=================
-Description
------------
+NAME
+----
-This system call is only provided by the logical device
-/dev/dvb/adapter0/dvr0, associated with the physical demux device that
-provides the actual DVR functionality. It is used for replay of a
-digitally recorded Transport Stream. Matching filters have to be defined
-in the corresponding physical demux device, /dev/dvb/adapter0/demux0.
-The amount of data to be transferred is implied by count.
+DVB demux write()
-Synopsis
+SYNOPSIS
--------
.. c:function:: ssize_t write(int fd, const void *buf, size_t count)
-Arguments
-----------
-
+ARGUMENTS
+---------
.. flat-table::
:header-rows: 0
- Size of buf.
-Return Value
-------------
+DESCRIPTION
+-----------
+This system call is only provided by the logical device
+/dev/dvb/adapter0/dvr0, associated with the physical demux device that
+provides the actual DVR functionality. It is used for replay of a
+digitally recorded Transport Stream. Matching filters have to be defined
+in the corresponding physical demux device, /dev/dvb/adapter0/demux0.
+The amount of data to be transferred is implied by count.
+RETURN VALUE
+------------
+
.. flat-table::
:header-rows: 0
:stub-columns: 0
- ``EBADF``
- fd is not a valid open file descriptor.
-
-
-
.. _DMX_GET_CAPS:
+============
DMX_GET_CAPS
============
-Description
------------
+NAME
+----
-This ioctl is undocumented. Documentation is welcome.
+DMX_GET_CAPS
-Synopsis
+SYNOPSIS
--------
.. c:function:: int ioctl(fd, int request = DMX_GET_CAPS, dmx_caps_t *)
-Arguments
-----------
-
+ARGUMENTS
+---------
.. flat-table::
:header-rows: 0
- Undocumented.
-Return Value
+DESCRIPTION
+-----------
+
+This ioctl is undocumented. Documentation is welcome.
+
+
+RETURN VALUE
------------
On success 0 is returned, on error -1 and the ``errno`` variable is set
appropriately. The generic error codes are described at the
:ref:`Generic Error Codes <gen-errors>` chapter.
-
-
.. _DMX_GET_EVENT:
+=============
DMX_GET_EVENT
=============
-Description
------------
+NAME
+----
-This ioctl call returns an event if available. If an event is not
-available, the behavior depends on whether the device is in blocking or
-non-blocking mode. In the latter case, the call fails immediately with
-errno set to ``EWOULDBLOCK``. In the former case, the call blocks until an
-event becomes available.
+DMX_GET_EVENT
-Synopsis
+SYNOPSIS
--------
.. c:function:: int ioctl( int fd, int request = DMX_GET_EVENT, struct dmx_event *ev)
-Arguments
-----------
-
+ARGUMENTS
+---------
.. flat-table::
:header-rows: 0
- Pointer to the location where the event is to be stored.
-Return Value
+DESCRIPTION
+-----------
+
+This ioctl call returns an event if available. If an event is not
+available, the behavior depends on whether the device is in blocking or
+non-blocking mode. In the latter case, the call fails immediately with
+errno set to ``EWOULDBLOCK``. In the former case, the call blocks until an
+event becomes available.
+
+
+RETURN VALUE
------------
On success 0 is returned, on error -1 and the ``errno`` variable is set
- ``EWOULDBLOCK``
- There is no event pending, and the device is in non-blocking mode.
-
-
-
.. _DMX_GET_PES_PIDS:
+================
DMX_GET_PES_PIDS
================
-Description
------------
+NAME
+----
-This ioctl is undocumented. Documentation is welcome.
+DMX_GET_PES_PIDS
-Synopsis
+SYNOPSIS
--------
.. c:function:: int ioctl(fd, int request = DMX_GET_PES_PIDS, __u16[5])
-Arguments
-----------
-
+ARGUMENTS
+---------
.. flat-table::
:header-rows: 0
- Undocumented.
-Return Value
+DESCRIPTION
+-----------
+
+This ioctl is undocumented. Documentation is welcome.
+
+
+RETURN VALUE
------------
On success 0 is returned, on error -1 and the ``errno`` variable is set
appropriately. The generic error codes are described at the
:ref:`Generic Error Codes <gen-errors>` chapter.
-
-
.. _DMX_GET_STC:
+===========
DMX_GET_STC
===========
-Description
------------
+NAME
+----
-This ioctl call returns the current value of the system time counter
-(which is driven by a PES filter of type DMX_PES_PCR). Some hardware
-supports more than one STC, so you must specify which one by setting the
-num field of stc before the ioctl (range 0...n). The result is returned
-in form of a ratio with a 64 bit numerator and a 32 bit denominator, so
-the real 90kHz STC value is stc->stc / stc->base .
+DMX_GET_STC
-Synopsis
+SYNOPSIS
--------
.. c:function:: int ioctl( int fd, int request = DMX_GET_STC, struct dmx_stc *stc)
-Arguments
-----------
-
+ARGUMENTS
+---------
.. flat-table::
:header-rows: 0
- Pointer to the location where the stc is to be stored.
-Return Value
+DESCRIPTION
+-----------
+
+This ioctl call returns the current value of the system time counter
+(which is driven by a PES filter of type DMX_PES_PCR). Some hardware
+supports more than one STC, so you must specify which one by setting the
+num field of stc before the ioctl (range 0...n). The result is returned
+in form of a ratio with a 64 bit numerator and a 32 bit denominator, so
+the real 90kHz STC value is stc->stc / stc->base .
+
+
+RETURN VALUE
------------
On success 0 is returned, on error -1 and the ``errno`` variable is set
- ``EINVAL``
- Invalid stc number.
-
-
-
.. _DMX_REMOVE_PID:
+==============
DMX_REMOVE_PID
==============
-Description
------------
+NAME
+----
-This ioctl call allows to remove a PID when multiple PIDs are set on a
-transport stream filter, e. g. a filter previously set up with output
-equal to DMX_OUT_TSDEMUX_TAP, created via either
-DMX_SET_PES_FILTER or DMX_ADD_PID.
+DMX_REMOVE_PID
-Synopsis
+SYNOPSIS
--------
.. c:function:: int ioctl(fd, int request = DMX_REMOVE_PID, __u16 *)
-Arguments
-----------
-
+ARGUMENTS
+---------
.. flat-table::
:header-rows: 0
- PID of the PES filter to be removed.
-Return Value
+DESCRIPTION
+-----------
+
+This ioctl call allows to remove a PID when multiple PIDs are set on a
+transport stream filter, e. g. a filter previously set up with output
+equal to DMX_OUT_TSDEMUX_TAP, created via either
+DMX_SET_PES_FILTER or DMX_ADD_PID.
+
+
+RETURN VALUE
------------
On success 0 is returned, on error -1 and the ``errno`` variable is set
.. _DMX_SET_BUFFER_SIZE:
+===================
DMX_SET_BUFFER_SIZE
===================
-Description
------------
+NAME
+----
-This ioctl call is used to set the size of the circular buffer used for
-filtered data. The default size is two maximum sized sections, i.e. if
-this function is not called a buffer size of 2 \* 4096 bytes will be
-used.
+DMX_SET_BUFFER_SIZE
-Synopsis
+SYNOPSIS
--------
.. c:function:: int ioctl( int fd, int request = DMX_SET_BUFFER_SIZE, unsigned long size)
-Arguments
-----------
-
+ARGUMENTS
+---------
.. flat-table::
:header-rows: 0
- Size of circular buffer.
-Return Value
+DESCRIPTION
+-----------
+
+This ioctl call is used to set the size of the circular buffer used for
+filtered data. The default size is two maximum sized sections, i.e. if
+this function is not called a buffer size of 2 \* 4096 bytes will be
+used.
+
+
+RETURN VALUE
------------
On success 0 is returned, on error -1 and the ``errno`` variable is set
appropriately. The generic error codes are described at the
:ref:`Generic Error Codes <gen-errors>` chapter.
-
-
.. _DMX_SET_FILTER:
+==============
DMX_SET_FILTER
==============
-Description
------------
+NAME
+----
-This ioctl call sets up a filter according to the filter and mask
-parameters provided. A timeout may be defined stating number of seconds
-to wait for a section to be loaded. A value of 0 means that no timeout
-should be applied. Finally there is a flag field where it is possible to
-state whether a section should be CRC-checked, whether the filter should
-be a ”one-shot” filter, i.e. if the filtering operation should be
-stopped after the first section is received, and whether the filtering
-operation should be started immediately (without waiting for a
-DMX_START ioctl call). If a filter was previously set-up, this filter
-will be canceled, and the receive buffer will be flushed.
+DMX_SET_FILTER
-Synopsis
+SYNOPSIS
--------
.. c:function:: int ioctl( int fd, int request = DMX_SET_FILTER, struct dmx_sct_filter_params *params)
-Arguments
-----------
-
+ARGUMENTS
+---------
.. flat-table::
:header-rows: 0
- Pointer to structure containing filter parameters.
-Return Value
+DESCRIPTION
+-----------
+
+This ioctl call sets up a filter according to the filter and mask
+parameters provided. A timeout may be defined stating number of seconds
+to wait for a section to be loaded. A value of 0 means that no timeout
+should be applied. Finally there is a flag field where it is possible to
+state whether a section should be CRC-checked, whether the filter should
+be a ”one-shot” filter, i.e. if the filtering operation should be
+stopped after the first section is received, and whether the filtering
+operation should be started immediately (without waiting for a
+DMX_START ioctl call). If a filter was previously set-up, this filter
+will be canceled, and the receive buffer will be flushed.
+
+
+RETURN VALUE
------------
On success 0 is returned, on error -1 and the ``errno`` variable is set
appropriately. The generic error codes are described at the
:ref:`Generic Error Codes <gen-errors>` chapter.
-
-
.. _DMX_SET_PES_FILTER:
+==================
DMX_SET_PES_FILTER
==================
-Description
------------
+NAME
+----
-This ioctl call sets up a PES filter according to the parameters
-provided. By a PES filter is meant a filter that is based just on the
-packet identifier (PID), i.e. no PES header or payload filtering
-capability is supported.
+DMX_SET_PES_FILTER
-Synopsis
+SYNOPSIS
--------
.. c:function:: int ioctl( int fd, int request = DMX_SET_PES_FILTER, struct dmx_pes_filter_params *params)
-Arguments
-----------
-
+ARGUMENTS
+---------
.. flat-table::
:header-rows: 0
- Pointer to structure containing filter parameters.
-Return Value
+DESCRIPTION
+-----------
+
+This ioctl call sets up a PES filter according to the parameters
+provided. By a PES filter is meant a filter that is based just on the
+packet identifier (PID), i.e. no PES header or payload filtering
+capability is supported.
+
+
+RETURN VALUE
------------
On success 0 is returned, on error -1 and the ``errno`` variable is set
There are active filters filtering data from another input source.
Make sure that these filters are stopped before starting this
filter.
-
-
-
.. _DMX_SET_SOURCE:
+==============
DMX_SET_SOURCE
==============
-Description
------------
+NAME
+----
-This ioctl is undocumented. Documentation is welcome.
+DMX_SET_SOURCE
-Synopsis
+SYNOPSIS
--------
.. c:function:: int ioctl(fd, int request = DMX_SET_SOURCE, dmx_source_t *)
-Arguments
-----------
-
+ARGUMENTS
+---------
.. flat-table::
:header-rows: 0
- Undocumented.
-Return Value
+DESCRIPTION
+-----------
+
+This ioctl is undocumented. Documentation is welcome.
+
+
+RETURN VALUE
------------
On success 0 is returned, on error -1 and the ``errno`` variable is set
appropriately. The generic error codes are described at the
:ref:`Generic Error Codes <gen-errors>` chapter.
-
-
.. _DMX_START:
+=========
DMX_START
=========
-Description
------------
+NAME
+----
-This ioctl call is used to start the actual filtering operation defined
-via the ioctl calls DMX_SET_FILTER or DMX_SET_PES_FILTER.
+DMX_START
-Synopsis
+SYNOPSIS
--------
.. c:function:: int ioctl( int fd, int request = DMX_START)
-Arguments
-----------
-
+ARGUMENTS
+---------
.. flat-table::
:header-rows: 0
- Equals DMX_START for this command.
-Return Value
+DESCRIPTION
+-----------
+
+This ioctl call is used to start the actual filtering operation defined
+via the ioctl calls DMX_SET_FILTER or DMX_SET_PES_FILTER.
+
+
+RETURN VALUE
------------
On success 0 is returned, on error -1 and the ``errno`` variable is set
There are active filters filtering data from another input source.
Make sure that these filters are stopped before starting this
filter.
-
-
-
.. _DMX_STOP:
+========
DMX_STOP
========
-Description
------------
+NAME
+----
-This ioctl call is used to stop the actual filtering operation defined
-via the ioctl calls DMX_SET_FILTER or DMX_SET_PES_FILTER and
-started via the DMX_START command.
+DMX_STOP
-Synopsis
+SYNOPSIS
--------
.. c:function:: int ioctl( int fd, int request = DMX_STOP)
-Arguments
-----------
-
+ARGUMENTS
+---------
.. flat-table::
:header-rows: 0
- Equals DMX_STOP for this command.
-Return Value
+DESCRIPTION
+-----------
+
+This ioctl call is used to stop the actual filtering operation defined
+via the ioctl calls DMX_SET_FILTER or DMX_SET_PES_FILTER and
+started via the DMX_START command.
+
+
+RETURN VALUE
------------
On success 0 is returned, on error -1 and the ``errno`` variable is set
appropriately. The generic error codes are described at the
:ref:`Generic Error Codes <gen-errors>` chapter.
-
-
ioctl FE_DISEQC_RECV_SLAVE_REPLY
********************************
-*man FE_DISEQC_RECV_SLAVE_REPLY(2)*
+NAME
+====
-Receives reply from a DiSEqC 2.0 command
+FE_DISEQC_RECV_SLAVE_REPLY - Receives reply from a DiSEqC 2.0 command
-
-Synopsis
+SYNOPSIS
========
.. cpp:function:: int ioctl( int fd, int request, struct dvb_diseqc_slave_reply *argp )
-Arguments
+
+ARGUMENTS
=========
``fd``
:ref:`dvb_diseqc_slave_reply <dvb-diseqc-slave-reply>`
-Description
+DESCRIPTION
===========
Receives reply from a DiSEqC 2.0 command.
+
RETURN VALUE
+============
On success 0 is returned, on error -1 and the ``errno`` variable is set
appropriately. The generic error codes are described at the
ioctl FE_DISEQC_RESET_OVERLOAD
******************************
-*man FE_DISEQC_RESET_OVERLOAD(2)*
+NAME
+====
-Restores the power to the antenna subsystem, if it was powered off due
-to power overload.
+FE_DISEQC_RESET_OVERLOAD - Restores the power to the antenna subsystem, if it was powered off due - to power overload.
-
-Synopsis
+SYNOPSIS
========
.. cpp:function:: int ioctl( int fd, int request, NULL )
-Arguments
+
+ARGUMENTS
=========
``fd``
FE_DISEQC_RESET_OVERLOAD
-Description
+DESCRIPTION
===========
If the bus has been automatically powered off due to power overload,
read/write access to the device. This call has no effect if the device
is manually powered off. Not all DVB adapters support this ioctl.
+
RETURN VALUE
+============
On success 0 is returned, on error -1 and the ``errno`` variable is set
appropriately. The generic error codes are described at the
ioctl FE_DISEQC_SEND_BURST
**************************
-*man FE_DISEQC_SEND_BURST(2)*
+NAME
+====
-Sends a 22KHz tone burst for 2x1 mini DiSEqC satellite selection.
+FE_DISEQC_SEND_BURST - Sends a 22KHz tone burst for 2x1 mini DiSEqC satellite selection.
-
-Synopsis
+SYNOPSIS
========
.. c:function:: int ioctl( int fd, int request, enum fe_sec_mini_cmd *tone )
-Arguments
+
+ARGUMENTS
=========
``fd``
pointer to enum :ref:`fe_sec_mini_cmd <fe-sec-mini-cmd>`
-Description
+DESCRIPTION
===========
This ioctl is used to set the generation of a 22kHz tone burst for mini
It provides support for what's specified at
`Digital Satellite Equipment Control (DiSEqC) - Simple "ToneBurst" Detection Circuit specification. <http://www.eutelsat.com/files/contributed/satellites/pdf/Diseqc/associated%20docs/simple_tone_burst_detec.pdf>`__
+
RETURN VALUE
+============
On success 0 is returned, on error -1 and the ``errno`` variable is set
appropriately. The generic error codes are described at the
ioctl FE_DISEQC_SEND_MASTER_CMD
*******************************
-*man FE_DISEQC_SEND_MASTER_CMD(2)*
+NAME
+====
-Sends a DiSEqC command
+FE_DISEQC_SEND_MASTER_CMD - Sends a DiSEqC command
-
-Synopsis
+SYNOPSIS
========
.. cpp:function:: int ioctl( int fd, int request, struct dvb_diseqc_master_cmd *argp )
-Arguments
+
+ARGUMENTS
=========
``fd``
:ref:`dvb_diseqc_master_cmd <dvb-diseqc-master-cmd>`
-Description
+DESCRIPTION
===========
Sends a DiSEqC command to the antenna subsystem.
+
RETURN VALUE
+============
On success 0 is returned, on error -1 and the ``errno`` variable is set
appropriately. The generic error codes are described at the
ioctl FE_ENABLE_HIGH_LNB_VOLTAGE
********************************
-*man FE_ENABLE_HIGH_LNB_VOLTAGE(2)*
-
-Select output DC level between normal LNBf voltages or higher LNBf
-voltages.
+NAME
+====
+FE_ENABLE_HIGH_LNB_VOLTAGE - Select output DC level between normal LNBf voltages or higher LNBf - voltages.
-Synopsis
+SYNOPSIS
========
.. cpp:function:: int ioctl( int fd, int request, unsigned int high )
-Arguments
+
+ARGUMENTS
=========
``fd``
to compensate for long antenna cables.
-Description
+DESCRIPTION
===========
Select output DC level between normal LNBf voltages or higher LNBf
voltages between 0 (normal) or a value grater than 0 for higher
voltages.
+
RETURN VALUE
+============
On success 0 is returned, on error -1 and the ``errno`` variable is set
appropriately. The generic error codes are described at the
ioctl FE_GET_INFO
*****************
-*man FE_GET_INFO(2)*
+NAME
+====
-Query DVB frontend capabilities and returns information about the
-front-end. This call only requires read-only access to the device
+FE_GET_INFO - Query DVB frontend capabilities and returns information about the - front-end. This call only requires read-only access to the device
-
-Synopsis
+SYNOPSIS
========
.. cpp:function:: int ioctl( int fd, int request, struct dvb_frontend_info *argp )
-Arguments
+
+ARGUMENTS
=========
``fd``
:ref:`dvb_frontend_info <dvb-frontend-info>`
-Description
+DESCRIPTION
===========
All DVB frontend devices support the ``FE_GET_INFO`` ioctl. It is used
When the driver is not compatible with this specification the ioctl
returns an error.
+
RETURN VALUE
+============
On success 0 is returned, on error -1 and the ``errno`` variable is set
appropriately. The generic error codes are described at the
ioctl FE_SET_PROPERTY, FE_GET_PROPERTY
**************************************
-*man FE_SET_PROPERTY(2)*
+NAME
+====
-FE_GET_PROPERTY
-FE_SET_PROPERTY sets one or more frontend properties.
-FE_GET_PROPERTY returns one or more frontend properties.
+FE_SET_PROPERTY - FE_GET_PROPERTY - FE_SET_PROPERTY sets one or more frontend properties. - FE_GET_PROPERTY returns one or more frontend properties.
-
-Synopsis
+SYNOPSIS
========
.. cpp:function:: int ioctl( int fd, int request, struct dtv_properties *argp )
-Arguments
+
+ARGUMENTS
=========
``fd``
pointer to struct :ref:`dtv_properties <dtv-properties>`
-Description
+DESCRIPTION
===========
All DVB frontend devices support the ``FE_SET_PROPERTY`` and
- This call only requires read-only access to the device.
+
RETURN VALUE
+============
On success 0 is returned, on error -1 and the ``errno`` variable is set
appropriately. The generic error codes are described at the
ioctl FE_READ_STATUS
********************
-*man FE_READ_STATUS(2)*
+NAME
+====
-Returns status information about the front-end. This call only requires
-read-only access to the device
+FE_READ_STATUS - Returns status information about the front-end. This call only requires - read-only access to the device
-
-Synopsis
+SYNOPSIS
========
.. cpp:function:: int ioctl( int fd, int request, unsigned int *status )
-Arguments
+
+ARGUMENTS
=========
``fd``
:ref:`fe_status <fe-status>`.
-Description
+DESCRIPTION
===========
All DVB frontend devices support the ``FE_READ_STATUS`` ioctl. It is
varies according with the architecture. This needs to be fixed in the
future.
+
RETURN VALUE
+============
On success 0 is returned, on error -1 and the ``errno`` variable is set
appropriately. The generic error codes are described at the
ioctl FE_SET_FRONTEND_TUNE_MODE
*******************************
-*man FE_SET_FRONTEND_TUNE_MODE(2)*
+NAME
+====
-Allow setting tuner mode flags to the frontend.
+FE_SET_FRONTEND_TUNE_MODE - Allow setting tuner mode flags to the frontend.
-
-Synopsis
+SYNOPSIS
========
.. cpp:function:: int ioctl( int fd, int request, unsigned int flags )
-Arguments
+
+ARGUMENTS
=========
``fd``
device is reopened read-write.
-Description
+DESCRIPTION
===========
Allow setting tuner mode flags to the frontend, between 0 (normal) or
FE_TUNE_MODE_ONESHOT mode
+
RETURN VALUE
+============
On success 0 is returned, on error -1 and the ``errno`` variable is set
appropriately. The generic error codes are described at the
ioctl FE_SET_TONE
*****************
-*man FE_SET_TONE(2)*
+NAME
+====
-Sets/resets the generation of the continuous 22kHz tone.
+FE_SET_TONE - Sets/resets the generation of the continuous 22kHz tone.
-
-Synopsis
+SYNOPSIS
========
.. c:function:: int ioctl( int fd, int request, enum fe_sec_tone_mode *tone )
-Arguments
+
+ARGUMENTS
=========
``fd``
pointer to enum :ref:`fe_sec_tone_mode <fe-sec-tone-mode>`
-Description
+DESCRIPTION
===========
This ioctl is used to set the generation of the continuous 22kHz tone.
of selecting the band. So, it is recommended that applications would
change to SEC_TONE_OFF when the device is not used.
+
RETURN VALUE
+============
On success 0 is returned, on error -1 and the ``errno`` variable is set
appropriately. The generic error codes are described at the
ioctl FE_SET_VOLTAGE
********************
-*man FE_SET_VOLTAGE(2)*
+NAME
+====
-Allow setting the DC level sent to the antenna subsystem.
+FE_SET_VOLTAGE - Allow setting the DC level sent to the antenna subsystem.
-
-Synopsis
+SYNOPSIS
========
.. c:function:: int ioctl( int fd, int request, enum fe_sec_voltage *voltage )
-Arguments
+
+ARGUMENTS
=========
``fd``
:ref:`fe_sec_voltage <fe-sec-voltage>`.
-Description
+DESCRIPTION
===========
This ioctl allows to set the DC voltage level sent through the antenna
the voltage to SEC_VOLTAGE_OFF while the device is not is used is
recommended.
+
RETURN VALUE
+============
On success 0 is returned, on error -1 and the ``errno`` variable is set
appropriately. The generic error codes are described at the
DVB frontend close()
********************
-*man fe-close(2)*
+NAME
+====
-Close a frontend device
+fe-close - Close a frontend device
-
-Synopsis
+SYNOPSIS
========
.. code-block:: c
.. cpp:function:: int close( int fd )
-Arguments
+
+ARGUMENTS
=========
``fd``
File descriptor returned by :ref:`open() <func-open>`.
-Description
+DESCRIPTION
===========
This system call closes a previously opened front-end device. After
down automatically.
-Return Value
+RETURN VALUE
============
The function returns 0 on success, -1 on failure and the ``errno`` is
DVB frontend open()
*******************
-*man fe-open(2)*
+NAME
+====
-Open a frontend device
+fe-open - Open a frontend device
-
-Synopsis
+SYNOPSIS
========
.. code-block:: c
.. cpp:function:: int open( const char *device_name, int flags )
-Arguments
+
+ARGUMENTS
=========
``device_name``
Other flags have no effect.
-Description
+DESCRIPTION
===========
This system call opens a named frontend device
that possible.
-Return Value
+RETURN VALUE
============
On success :ref:`open() <frontend_f_open>` returns the new file descriptor.
ioctl NET_ADD_IF
****************
-*man NET_ADD_IF(2)*
+NAME
+====
-Creates a new network interface for a given Packet ID.
+NET_ADD_IF - Creates a new network interface for a given Packet ID.
-
-Synopsis
+SYNOPSIS
========
.. cpp:function:: int ioctl( int fd, int request, struct dvb_net_if *net_if )
-Arguments
+
+ARGUMENTS
=========
``fd``
pointer to struct :ref:`dvb_net_if <dvb-net-if>`
-Description
+DESCRIPTION
===========
The NET_ADD_IF ioctl system call selects the Packet ID (PID) that
``DVB_NET_FEEDTYPE_MPE`` for MPE encoding or
``DVB_NET_FEEDTYPE_ULE`` for ULE encoding.
+
RETURN VALUE
+============
On success 0 is returned, on error -1 and the ``errno`` variable is set
appropriately. The generic error codes are described at the
.. -*- coding: utf-8; mode: rst -*-
-
.. _NET_GET_IF:
****************
ioctl NET_GET_IF
****************
-*man NET_GET_IF(2)*
-
-Read the configuration data of an interface created via
-:ref:`NET_ADD_IF <net>`.
+NAME
+====
+NET_GET_IF - Read the configuration data of an interface created via - :ref:`NET_ADD_IF <net>`.
-Synopsis
+SYNOPSIS
========
.. cpp:function:: int ioctl( int fd, int request, struct dvb_net_if *net_if )
-Arguments
+
+ARGUMENTS
=========
``fd``
pointer to struct :ref:`dvb_net_if <dvb-net-if>`
-Description
+DESCRIPTION
===========
The NET_GET_IF ioctl uses the interface number given by the struct
created yet with :ref:`NET_ADD_IF <net>`, it will return -1 and fill
the ``errno`` with ``EINVAL`` error code.
+
RETURN VALUE
+============
On success 0 is returned, on error -1 and the ``errno`` variable is set
appropriately. The generic error codes are described at the
ioctl NET_REMOVE_IF
*******************
-*man NET_REMOVE_IF(2)*
+NAME
+====
-Removes a network interface.
+NET_REMOVE_IF - Removes a network interface.
-
-Synopsis
+SYNOPSIS
========
.. cpp:function:: int ioctl( int fd, int request, int ifnum )
-Arguments
+
+ARGUMENTS
=========
``fd``
number of the interface to be removed
-Description
+DESCRIPTION
===========
The NET_REMOVE_IF ioctl deletes an interface previously created via
:ref:`NET_ADD_IF <net>`.
+
RETURN VALUE
+============
On success 0 is returned, on error -1 and the ``errno`` variable is set
appropriately. The generic error codes are described at the
.. _VIDEO_CLEAR_BUFFER:
+==================
VIDEO_CLEAR_BUFFER
==================
-Description
------------
+NAME
+----
-This ioctl call clears all video buffers in the driver and in the
-decoder hardware.
+VIDEO_CLEAR_BUFFER
-Synopsis
+SYNOPSIS
--------
.. c:function:: int ioctl(fd, int request = VIDEO_CLEAR_BUFFER)
-Arguments
-----------
-
+ARGUMENTS
+---------
.. flat-table::
:header-rows: 0
- Equals VIDEO_CLEAR_BUFFER for this command.
-Return Value
+DESCRIPTION
+-----------
+
+This ioctl call clears all video buffers in the driver and in the
+decoder hardware.
+
+
+RETURN VALUE
------------
On success 0 is returned, on error -1 and the ``errno`` variable is set
appropriately. The generic error codes are described at the
:ref:`Generic Error Codes <gen-errors>` chapter.
-
-
.. _VIDEO_COMMAND:
+=============
VIDEO_COMMAND
=============
-Description
------------
+NAME
+----
-This ioctl is obsolete. Do not use in new drivers. For V4L2 decoders
-this ioctl has been replaced by the
-: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` documentation for
-more information.
+VIDEO_COMMAND
-Synopsis
+SYNOPSIS
--------
.. c:function:: int ioctl(int fd, int request = VIDEO_COMMAND, struct video_command *cmd)
-Arguments
-----------
-
+ARGUMENTS
+---------
.. flat-table::
:header-rows: 0
- Commands the decoder.
-Return Value
+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` 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` documentation for
+more information.
+
+
+RETURN VALUE
------------
On success 0 is returned, on error -1 and the ``errno`` variable is set
appropriately. The generic error codes are described at the
:ref:`Generic Error Codes <gen-errors>` chapter.
-
-
.. _VIDEO_CONTINUE:
+==============
VIDEO_CONTINUE
==============
-Description
------------
-
-This ioctl is for DVB devices only. To control a V4L2 decoder use the
-V4L2 :ref:`VIDIOC_DECODER_CMD` instead.
+NAME
+----
-This ioctl call restarts decoding and playing processes of the video
-stream which was played before a call to VIDEO_FREEZE was made.
+VIDEO_CONTINUE
-Synopsis
+SYNOPSIS
--------
.. c:function:: int ioctl(fd, int request = VIDEO_CONTINUE)
-Arguments
-----------
-
+ARGUMENTS
+---------
.. flat-table::
:header-rows: 0
- Equals VIDEO_CONTINUE for this command.
-Return Value
+DESCRIPTION
+-----------
+
+This ioctl is for DVB devices only. To control a V4L2 decoder use the
+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.
+
+
+RETURN VALUE
------------
On success 0 is returned, on error -1 and the ``errno`` variable is set
appropriately. The generic error codes are described at the
:ref:`Generic Error Codes <gen-errors>` chapter.
-
-
.. _VIDEO_FAST_FORWARD:
+==================
VIDEO_FAST_FORWARD
==================
-Description
------------
+NAME
+----
-This ioctl call asks the Video Device to skip decoding of N number of
-I-frames. This call can only be used if VIDEO_SOURCE_MEMORY is
-selected.
+VIDEO_FAST_FORWARD
-Synopsis
+SYNOPSIS
--------
.. c:function:: int ioctl(fd, int request = VIDEO_FAST_FORWARD, int nFrames)
-Arguments
-----------
-
+ARGUMENTS
+---------
.. flat-table::
:header-rows: 0
- The number of frames to skip.
-Return Value
+DESCRIPTION
+-----------
+
+This ioctl call asks the Video Device to skip decoding of N number of
+I-frames. This call can only be used if VIDEO_SOURCE_MEMORY is
+selected.
+
+
+RETURN VALUE
------------
On success 0 is returned, on error -1 and the ``errno`` variable is set
- ``EPERM``
- Mode VIDEO_SOURCE_MEMORY not selected.
-
-
-
.. _video_fclose:
+=================
dvb video close()
=================
-Description
------------
+NAME
+----
-This system call closes a previously opened video device.
+dvb video close()
-Synopsis
+SYNOPSIS
--------
.. c:function:: int close(int fd)
-Arguments
-----------
-
+ARGUMENTS
+---------
.. flat-table::
:header-rows: 0
- File descriptor returned by a previous call to open().
-Return Value
-------------
+DESCRIPTION
+-----------
+
+This system call closes a previously opened video device.
+RETURN VALUE
+------------
.. flat-table::
:header-rows: 0
- ``EBADF``
- fd is not a valid open file descriptor.
-
-
-
.. _video_fopen:
+================
dvb video open()
================
-Description
------------
-
-This system call opens a named video device (e.g.
-/dev/dvb/adapter0/video0) for subsequent use.
+NAME
+----
-When an open() call has succeeded, the device will be ready for use. The
-significance of blocking or non-blocking mode is described in the
-documentation for functions where there is a difference. It does not
-affect the semantics of the open() call itself. A device opened in
-blocking mode can later be put into non-blocking mode (and vice versa)
-using the F_SETFL command of the fcntl system call. This is a standard
-system call, documented in the Linux manual page for fcntl. Only one
-user can open the Video Device in O_RDWR mode. All other attempts to
-open the device in this mode will fail, and an error-code will be
-returned. If the Video Device is opened in O_RDONLY mode, the only
-ioctl call that can be used is VIDEO_GET_STATUS. All other call will
-return an error code.
+dvb video open()
-Synopsis
+SYNOPSIS
--------
.. c:function:: int open(const char *deviceName, int flags)
-Arguments
-----------
+
+ARGUMENTS
+---------
.. flat-table::
:header-rows: 0
- (blocking mode is the default)
-Return Value
-------------
+DESCRIPTION
+-----------
+This system call opens a named video device (e.g.
+/dev/dvb/adapter0/video0) for subsequent use.
+
+When an open() call has succeeded, the device will be ready for use. The
+significance of blocking or non-blocking mode is described in the
+documentation for functions where there is a difference. It does not
+affect the semantics of the open() call itself. A device opened in
+blocking mode can later be put into non-blocking mode (and vice versa)
+using the F_SETFL command of the fcntl system call. This is a standard
+system call, documented in the Linux manual page for fcntl. Only one
+user can open the Video Device in O_RDWR mode. All other attempts to
+open the device in this mode will fail, and an error-code will be
+returned. If the Video Device is opened in O_RDONLY mode, the only
+ioctl call that can be used is VIDEO_GET_STATUS. All other call will
+return an error code.
+RETURN VALUE
+------------
+
.. flat-table::
:header-rows: 0
:stub-columns: 0
- ``EINVAL``
- Invalid argument.
-
-
-
.. _VIDEO_FREEZE:
+============
VIDEO_FREEZE
============
-Description
------------
+NAME
+----
-This ioctl is for DVB devices only. To control a V4L2 decoder use the
-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
-playing process of the video stream using the VIDEO_CONTINUE command.
-If VIDEO_SOURCE_MEMORY is selected in the ioctl call
-VIDEO_SELECT_SOURCE, the DVB subsystem will not decode any more data
-until the ioctl call VIDEO_CONTINUE or VIDEO_PLAY is performed.
+VIDEO_FREEZE
-Synopsis
+SYNOPSIS
--------
.. c:function:: int ioctl(fd, int request = VIDEO_FREEZE)
-Arguments
-----------
-
+ARGUMENTS
+---------
.. flat-table::
:header-rows: 0
- Equals VIDEO_FREEZE for this command.
-Return Value
+DESCRIPTION
+-----------
+
+This ioctl is for DVB devices only. To control a V4L2 decoder use the
+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
+playing process of the video stream using the VIDEO_CONTINUE command.
+If VIDEO_SOURCE_MEMORY is selected in the ioctl call
+VIDEO_SELECT_SOURCE, the DVB subsystem will not decode any more data
+until the ioctl call VIDEO_CONTINUE or VIDEO_PLAY is performed.
+
+
+RETURN VALUE
------------
On success 0 is returned, on error -1 and the ``errno`` variable is set
appropriately. The generic error codes are described at the
:ref:`Generic Error Codes <gen-errors>` chapter.
-
-
.. _video_fwrite:
+=================
dvb video write()
=================
-Description
------------
+NAME
+----
-This system call can only be used if VIDEO_SOURCE_MEMORY is selected
-in the ioctl call VIDEO_SELECT_SOURCE. The data provided shall be in
-PES format, unless the capability allows other formats. If O_NONBLOCK
-is not specified the function will block until buffer space is
-available. The amount of data to be transferred is implied by count.
+dvb video write()
-Synopsis
+SYNOPSIS
--------
.. c:function:: size_t write(int fd, const void *buf, size_t count)
-Arguments
-----------
-
+ARGUMENTS
+---------
.. flat-table::
:header-rows: 0
- Size of buf.
-Return Value
-------------
+DESCRIPTION
+-----------
+This system call can only be used if VIDEO_SOURCE_MEMORY is selected
+in the ioctl call VIDEO_SELECT_SOURCE. The data provided shall be in
+PES format, unless the capability allows other formats. If O_NONBLOCK
+is not specified the function will block until buffer space is
+available. The amount of data to be transferred is implied by count.
+RETURN VALUE
+------------
+
.. flat-table::
:header-rows: 0
:stub-columns: 0
- ``EBADF``
- fd is not a valid open file descriptor.
-
-
-
.. _VIDEO_GET_CAPABILITIES:
+======================
VIDEO_GET_CAPABILITIES
======================
-Description
------------
+NAME
+----
-This ioctl call asks the video device about its decoding capabilities.
-On success it returns and integer which has bits set according to the
-defines in section ??.
+VIDEO_GET_CAPABILITIES
-Synopsis
+SYNOPSIS
--------
.. c:function:: int ioctl(fd, int request = VIDEO_GET_CAPABILITIES, unsigned int *cap)
-Arguments
-----------
-
+ARGUMENTS
+---------
.. flat-table::
:header-rows: 0
- Pointer to a location where to store the capability information.
-Return Value
+DESCRIPTION
+-----------
+
+This ioctl call asks the video device about its decoding capabilities.
+On success it returns and integer which has bits set according to the
+defines in section ??.
+
+
+RETURN VALUE
------------
On success 0 is returned, on error -1 and the ``errno`` variable is set
appropriately. The generic error codes are described at the
:ref:`Generic Error Codes <gen-errors>` chapter.
-
-
.. _VIDEO_GET_EVENT:
+===============
VIDEO_GET_EVENT
===============
-Description
------------
-
-This ioctl is for DVB devices only. To get events from a V4L2 decoder
-use the V4L2 :ref:`VIDIOC_DQEVENT` ioctl instead.
+NAME
+----
-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
-in blocking or non-blocking mode. In the latter case, the call fails
-immediately with errno set to ``EWOULDBLOCK``. In the former case, the call
-blocks until an event becomes available. The standard Linux poll()
-and/or select() system calls can be used with the device file descriptor
-to watch for new events. For select(), the file descriptor should be
-included in the exceptfds argument, and for poll(), POLLPRI should be
-specified as the wake-up condition. Read-only permissions are sufficient
-for this ioctl call.
+VIDEO_GET_EVENT
-Synopsis
+SYNOPSIS
--------
.. c:function:: int ioctl(fd, int request = VIDEO_GET_EVENT, struct video_event *ev)
-Arguments
-----------
-
+ARGUMENTS
+---------
.. flat-table::
:header-rows: 0
- Points to the location where the event, if any, is to be stored.
-Return Value
+DESCRIPTION
+-----------
+
+This ioctl is for DVB devices only. To get events from a V4L2 decoder
+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
+in blocking or non-blocking mode. In the latter case, the call fails
+immediately with errno set to ``EWOULDBLOCK``. In the former case, the call
+blocks until an event becomes available. The standard Linux poll()
+and/or select() system calls can be used with the device file descriptor
+to watch for new events. For select(), the file descriptor should be
+included in the exceptfds argument, and for poll(), POLLPRI should be
+specified as the wake-up condition. Read-only permissions are sufficient
+for this ioctl call.
+
+
+RETURN VALUE
------------
On success 0 is returned, on error -1 and the ``errno`` variable is set
- ``EOVERFLOW``
- Overflow in event queue - one or more events were lost.
-
-
-
.. _VIDEO_GET_FRAME_COUNT:
+=====================
VIDEO_GET_FRAME_COUNT
=====================
-Description
------------
-
-This ioctl is obsolete. Do not use in new drivers. For V4L2 decoders
-this ioctl has been replaced by the ``V4L2_CID_MPEG_VIDEO_DEC_FRAME``
-control.
+NAME
+----
-This ioctl call asks the Video Device to return the number of displayed
-frames since the decoder was started.
+VIDEO_GET_FRAME_COUNT
-Synopsis
+SYNOPSIS
--------
.. c:function:: int ioctl(int fd, int request = VIDEO_GET_FRAME_COUNT, __u64 *pts)
-Arguments
-----------
-
+ARGUMENTS
+---------
.. flat-table::
:header-rows: 0
started.
-Return Value
+DESCRIPTION
+-----------
+
+This ioctl is obsolete. Do not use in new drivers. For V4L2 decoders
+this ioctl has been replaced by the ``V4L2_CID_MPEG_VIDEO_DEC_FRAME``
+control.
+
+This ioctl call asks the Video Device to return the number of displayed
+frames since the decoder was started.
+
+
+RETURN VALUE
------------
On success 0 is returned, on error -1 and the ``errno`` variable is set
appropriately. The generic error codes are described at the
:ref:`Generic Error Codes <gen-errors>` chapter.
-
-
.. _VIDEO_GET_FRAME_RATE:
+====================
VIDEO_GET_FRAME_RATE
====================
-Description
------------
+NAME
+----
-This ioctl call asks the Video Device to return the current framerate.
+VIDEO_GET_FRAME_RATE
-Synopsis
+SYNOPSIS
--------
.. c:function:: int ioctl(int fd, int request = VIDEO_GET_FRAME_RATE, unsigned int *rate)
-Arguments
-----------
-
+ARGUMENTS
+---------
.. flat-table::
:header-rows: 0
- Returns the framerate in number of frames per 1000 seconds.
-Return Value
+DESCRIPTION
+-----------
+
+This ioctl call asks the Video Device to return the current framerate.
+
+
+RETURN VALUE
------------
On success 0 is returned, on error -1 and the ``errno`` variable is set
appropriately. The generic error codes are described at the
:ref:`Generic Error Codes <gen-errors>` chapter.
-
-
.. _VIDEO_GET_NAVI:
+==============
VIDEO_GET_NAVI
==============
-Description
------------
+NAME
+----
-This ioctl returns navigational information from the DVD stream. This is
-especially needed if an encoded stream has to be decoded by the
-hardware.
+VIDEO_GET_NAVI
-Synopsis
+SYNOPSIS
--------
.. c:function:: int ioctl(fd, int request = VIDEO_GET_NAVI , video_navi_pack_t *navipack)
-Arguments
-----------
-
+ARGUMENTS
+---------
.. flat-table::
:header-rows: 0
- PCI or DSI pack (private stream 2) according to section ??.
-Return Value
+DESCRIPTION
+-----------
+
+This ioctl returns navigational information from the DVD stream. This is
+especially needed if an encoded stream has to be decoded by the
+hardware.
+
+
+RETURN VALUE
------------
On success 0 is returned, on error -1 and the ``errno`` variable is set
- ``EFAULT``
- driver is not able to return navigational information
-
-
-
.. _VIDEO_GET_PTS:
+=============
VIDEO_GET_PTS
=============
-Description
------------
-
-This ioctl is obsolete. Do not use in new drivers. For V4L2 decoders
-this ioctl has been replaced by the ``V4L2_CID_MPEG_VIDEO_DEC_PTS``
-control.
+NAME
+----
-This ioctl call asks the Video Device to return the current PTS
-timestamp.
+VIDEO_GET_PTS
-Synopsis
+SYNOPSIS
--------
.. c:function:: int ioctl(int fd, int request = VIDEO_GET_PTS, __u64 *pts)
-Arguments
-----------
-
+ARGUMENTS
+---------
.. flat-table::
:header-rows: 0
decoded frame or the last PTS extracted by the PES parser.
-Return Value
+DESCRIPTION
+-----------
+
+This ioctl is obsolete. Do not use in new drivers. For V4L2 decoders
+this ioctl has been replaced by the ``V4L2_CID_MPEG_VIDEO_DEC_PTS``
+control.
+
+This ioctl call asks the Video Device to return the current PTS
+timestamp.
+
+
+RETURN VALUE
------------
On success 0 is returned, on error -1 and the ``errno`` variable is set
appropriately. The generic error codes are described at the
:ref:`Generic Error Codes <gen-errors>` chapter.
-
-
.. _VIDEO_GET_SIZE:
+==============
VIDEO_GET_SIZE
==============
-Description
------------
+NAME
+----
-This ioctl returns the size and aspect ratio.
+VIDEO_GET_SIZE
-Synopsis
+SYNOPSIS
--------
.. c:function:: int ioctl(int fd, int request = VIDEO_GET_SIZE, video_size_t *size)
-Arguments
-----------
-
+ARGUMENTS
+---------
.. flat-table::
:header-rows: 0
- Returns the size and aspect ratio.
-Return Value
+DESCRIPTION
+-----------
+
+This ioctl returns the size and aspect ratio.
+
+
+RETURN VALUE
------------
On success 0 is returned, on error -1 and the ``errno`` variable is set
appropriately. The generic error codes are described at the
:ref:`Generic Error Codes <gen-errors>` chapter.
-
-
.. _VIDEO_GET_STATUS:
+================
VIDEO_GET_STATUS
================
-Description
------------
+NAME
+----
-This ioctl call asks the Video Device to return the current status of
-the device.
+VIDEO_GET_STATUS
-Synopsis
+SYNOPSIS
--------
.. c:function:: int ioctl(fd, int request = VIDEO_GET_STATUS, struct video_status *status)
-Arguments
-----------
-
+ARGUMENTS
+---------
.. flat-table::
:header-rows: 0
- Returns the current status of the Video Device.
-Return Value
+DESCRIPTION
+-----------
+
+This ioctl call asks the Video Device to return the current status of
+the device.
+
+
+RETURN VALUE
------------
On success 0 is returned, on error -1 and the ``errno`` variable is set
appropriately. The generic error codes are described at the
:ref:`Generic Error Codes <gen-errors>` chapter.
-
-
.. _VIDEO_PLAY:
+==========
VIDEO_PLAY
==========
-Description
------------
-
-This ioctl is for DVB devices only. To control a V4L2 decoder use the
-V4L2 :ref:`VIDIOC_DECODER_CMD` instead.
+NAME
+----
-This ioctl call asks the Video Device to start playing a video stream
-from the selected source.
+VIDEO_PLAY
-Synopsis
+SYNOPSIS
--------
.. c:function:: int ioctl(fd, int request = VIDEO_PLAY)
-Arguments
-----------
-
+ARGUMENTS
+---------
.. flat-table::
:header-rows: 0
- Equals VIDEO_PLAY for this command.
-Return Value
+DESCRIPTION
+-----------
+
+This ioctl is for DVB devices only. To control a V4L2 decoder use the
+V4L2 :ref:`VIDIOC_DECODER_CMD` instead.
+
+This ioctl call asks the Video Device to start playing a video stream
+from the selected source.
+
+
+RETURN VALUE
------------
On success 0 is returned, on error -1 and the ``errno`` variable is set
appropriately. The generic error codes are described at the
:ref:`Generic Error Codes <gen-errors>` chapter.
-
-
.. _VIDEO_SELECT_SOURCE:
+===================
VIDEO_SELECT_SOURCE
===================
-Description
------------
-
-This ioctl is for DVB devices only. This ioctl was also supported by the
-V4L2 ivtv driver, but that has been replaced by the ivtv-specific
-``IVTV_IOC_PASSTHROUGH_MODE`` ioctl.
+NAME
+----
-This ioctl call informs the video device which source shall be used for
-the input data. The possible sources are demux or memory. If memory is
-selected, the data is fed to the video device through the write command.
+VIDEO_SELECT_SOURCE
-Synopsis
+SYNOPSIS
--------
.. c:function:: int ioctl(fd, int request = VIDEO_SELECT_SOURCE, video_stream_source_t source)
-Arguments
-----------
-
+ARGUMENTS
+---------
.. flat-table::
:header-rows: 0
- Indicates which source shall be used for the Video stream.
-Return Value
+DESCRIPTION
+-----------
+
+This ioctl is for DVB devices only. This ioctl was also supported by the
+V4L2 ivtv driver, but that has been replaced by the ivtv-specific
+``IVTV_IOC_PASSTHROUGH_MODE`` ioctl.
+
+This ioctl call informs the video device which source shall be used for
+the input data. The possible sources are demux or memory. If memory is
+selected, the data is fed to the video device through the write command.
+
+
+RETURN VALUE
------------
On success 0 is returned, on error -1 and the ``errno`` variable is set
appropriately. The generic error codes are described at the
:ref:`Generic Error Codes <gen-errors>` chapter.
-
-
.. _VIDEO_SET_ATTRIBUTES:
+====================
VIDEO_SET_ATTRIBUTES
====================
-Description
------------
+NAME
+----
-This ioctl is intended for DVD playback and allows you to set certain
-information about the stream. Some hardware may not need this
-information, but the call also tells the hardware to prepare for DVD
-playback.
+VIDEO_SET_ATTRIBUTES
-Synopsis
+SYNOPSIS
--------
.. c:function:: int ioctl(fd, int request = VIDEO_SET_ATTRIBUTE ,video_attributes_t vattr)
-Arguments
-----------
-
+ARGUMENTS
+---------
.. flat-table::
:header-rows: 0
- video attributes according to section ??.
-Return Value
+DESCRIPTION
+-----------
+
+This ioctl is intended for DVD playback and allows you to set certain
+information about the stream. Some hardware may not need this
+information, but the call also tells the hardware to prepare for DVD
+playback.
+
+
+RETURN VALUE
------------
On success 0 is returned, on error -1 and the ``errno`` variable is set
.. _VIDEO_SET_BLANK:
+===============
VIDEO_SET_BLANK
===============
-Description
------------
+NAME
+----
-This ioctl call asks the Video Device to blank out the picture.
+VIDEO_SET_BLANK
-Synopsis
+SYNOPSIS
--------
.. c:function:: int ioctl(fd, int request = VIDEO_SET_BLANK, boolean mode)
-Arguments
-----------
-
+ARGUMENTS
+---------
.. flat-table::
:header-rows: 0
- FALSE: Show last decoded frame.
-Return Value
+DESCRIPTION
+-----------
+
+This ioctl call asks the Video Device to blank out the picture.
+
+
+RETURN VALUE
------------
On success 0 is returned, on error -1 and the ``errno`` variable is set
appropriately. The generic error codes are described at the
:ref:`Generic Error Codes <gen-errors>` chapter.
-
-
.. _VIDEO_SET_DISPLAY_FORMAT:
+========================
VIDEO_SET_DISPLAY_FORMAT
========================
-Description
------------
+NAME
+----
-This ioctl call asks the Video Device to select the video format to be
-applied by the MPEG chip on the video.
+VIDEO_SET_DISPLAY_FORMAT
-Synopsis
+SYNOPSIS
--------
.. c:function:: int ioctl(fd, int request = VIDEO_SET_DISPLAY_FORMAT, video_display_format_t format)
-Arguments
-----------
-
+ARGUMENTS
+---------
.. flat-table::
:header-rows: 0
- Selects the video format to be used.
-Return Value
+DESCRIPTION
+-----------
+
+This ioctl call asks the Video Device to select the video format to be
+applied by the MPEG chip on the video.
+
+
+RETURN VALUE
------------
On success 0 is returned, on error -1 and the ``errno`` variable is set
appropriately. The generic error codes are described at the
:ref:`Generic Error Codes <gen-errors>` chapter.
-
-
.. _VIDEO_SET_FORMAT:
+================
VIDEO_SET_FORMAT
================
-Description
------------
+NAME
+----
-This ioctl sets the screen format (aspect ratio) of the connected output
-device (TV) so that the output of the decoder can be adjusted
-accordingly.
+VIDEO_SET_FORMAT
-Synopsis
+SYNOPSIS
--------
.. c:function:: int ioctl(fd, int request = VIDEO_SET_FORMAT, video_format_t format)
-Arguments
-----------
-
+ARGUMENTS
+---------
.. flat-table::
:header-rows: 0
- video format of TV as defined in section ??.
-Return Value
+DESCRIPTION
+-----------
+
+This ioctl sets the screen format (aspect ratio) of the connected output
+device (TV) so that the output of the decoder can be adjusted
+accordingly.
+
+
+RETURN VALUE
------------
On success 0 is returned, on error -1 and the ``errno`` variable is set
- ``EINVAL``
- format is not a valid video format.
-
-
-
.. _VIDEO_SET_HIGHLIGHT:
+===================
VIDEO_SET_HIGHLIGHT
===================
-Description
------------
+NAME
+----
-This ioctl sets the SPU highlight information for the menu access of a
-DVD.
+VIDEO_SET_HIGHLIGHT
-Synopsis
+SYNOPSIS
--------
.. c:function:: int ioctl(fd, int request = VIDEO_SET_HIGHLIGHT ,video_highlight_t *vhilite)
-Arguments
-----------
-
+ARGUMENTS
+---------
.. flat-table::
:header-rows: 0
- SPU Highlight information according to section ??.
-Return Value
+DESCRIPTION
+-----------
+
+This ioctl sets the SPU highlight information for the menu access of a
+DVD.
+
+
+RETURN VALUE
------------
On success 0 is returned, on error -1 and the ``errno`` variable is set
appropriately. The generic error codes are described at the
:ref:`Generic Error Codes <gen-errors>` chapter.
-
-
.. _VIDEO_SET_ID:
+============
VIDEO_SET_ID
============
-Description
------------
+NAME
+----
-This ioctl selects which sub-stream is to be decoded if a program or
-system stream is sent to the video device.
+VIDEO_SET_ID
-Synopsis
+SYNOPSIS
--------
.. c:function:: int ioctl(int fd, int request = VIDEO_SET_ID, int id)
-Arguments
-----------
-
+ARGUMENTS
+---------
.. flat-table::
:header-rows: 0
- video sub-stream id
-Return Value
+DESCRIPTION
+-----------
+
+This ioctl selects which sub-stream is to be decoded if a program or
+system stream is sent to the video device.
+
+
+RETURN VALUE
------------
On success 0 is returned, on error -1 and the ``errno`` variable is set
- ``EINVAL``
- Invalid sub-stream id.
-
-
-
.. _VIDEO_SET_SPU_PALETTE:
+=====================
VIDEO_SET_SPU_PALETTE
=====================
-Description
------------
+NAME
+----
-This ioctl sets the SPU color palette.
+VIDEO_SET_SPU_PALETTE
-Synopsis
+SYNOPSIS
--------
.. c:function:: int ioctl(fd, int request = VIDEO_SET_SPU_PALETTE, video_spu_palette_t *palette )
-Arguments
-----------
-
+ARGUMENTS
+---------
.. flat-table::
:header-rows: 0
- SPU palette according to section ??.
-Return Value
+DESCRIPTION
+-----------
+
+This ioctl sets the SPU color palette.
+
+
+RETURN VALUE
------------
On success 0 is returned, on error -1 and the ``errno`` variable is set
- ``EINVAL``
- input is not a valid palette or driver doesn’t handle SPU.
-
-
-
.. _VIDEO_SET_SPU:
+=============
VIDEO_SET_SPU
=============
-Description
------------
+NAME
+----
-This ioctl activates or deactivates SPU decoding in a DVD input stream.
-It can only be used, if the driver is able to handle a DVD stream.
+VIDEO_SET_SPU
-Synopsis
+SYNOPSIS
--------
.. c:function:: int ioctl(fd, int request = VIDEO_SET_SPU , video_spu_t *spu)
-Arguments
-----------
-
+ARGUMENTS
+---------
.. flat-table::
:header-rows: 0
??.
-Return Value
+DESCRIPTION
+-----------
+
+This ioctl activates or deactivates SPU decoding in a DVD input stream.
+It can only be used, if the driver is able to handle a DVD stream.
+
+
+RETURN VALUE
------------
On success 0 is returned, on error -1 and the ``errno`` variable is set
- ``EINVAL``
- input is not a valid spu setting or driver cannot handle SPU.
-
-
-
.. _VIDEO_SET_STREAMTYPE:
+====================
VIDEO_SET_STREAMTYPE
====================
-Description
------------
+NAME
+----
-This ioctl tells the driver which kind of stream to expect being written
-to it. If this call is not used the default of video PES is used. Some
-drivers might not support this call and always expect PES.
+VIDEO_SET_STREAMTYPE
-Synopsis
+SYNOPSIS
--------
.. c:function:: int ioctl(fd, int request = VIDEO_SET_STREAMTYPE, int type)
-Arguments
-----------
-
+ARGUMENTS
+---------
.. flat-table::
:header-rows: 0
- stream type
-Return Value
+DESCRIPTION
+-----------
+
+This ioctl tells the driver which kind of stream to expect being written
+to it. If this call is not used the default of video PES is used. Some
+drivers might not support this call and always expect PES.
+
+
+RETURN VALUE
------------
On success 0 is returned, on error -1 and the ``errno`` variable is set
appropriately. The generic error codes are described at the
:ref:`Generic Error Codes <gen-errors>` chapter.
-
-
.. _VIDEO_SET_SYSTEM:
+================
VIDEO_SET_SYSTEM
================
-Description
------------
+NAME
+----
-This ioctl sets the television output format. The format (see section
-??) may vary from the color format of the displayed MPEG stream. If the
-hardware is not able to display the requested format the call will
-return an error.
+VIDEO_SET_SYSTEM
-Synopsis
+SYNOPSIS
--------
.. c:function:: int ioctl(fd, int request = VIDEO_SET_SYSTEM , video_system_t system)
-Arguments
-----------
-
+ARGUMENTS
+---------
.. flat-table::
:header-rows: 0
- video system of TV output.
-Return Value
+DESCRIPTION
+-----------
+
+This ioctl sets the television output format. The format (see section
+??) may vary from the color format of the displayed MPEG stream. If the
+hardware is not able to display the requested format the call will
+return an error.
+
+
+RETURN VALUE
------------
On success 0 is returned, on error -1 and the ``errno`` variable is set
- ``EINVAL``
- system is not a valid or supported video system.
-
-
-
.. _VIDEO_SLOWMOTION:
+================
VIDEO_SLOWMOTION
================
-Description
------------
+NAME
+----
-This ioctl call asks the video device to repeat decoding frames N number
-of times. This call can only be used if VIDEO_SOURCE_MEMORY is
-selected.
+VIDEO_SLOWMOTION
-Synopsis
+SYNOPSIS
--------
.. c:function:: int ioctl(fd, int request = VIDEO_SLOWMOTION, int nFrames)
-Arguments
-----------
-
+ARGUMENTS
+---------
.. flat-table::
:header-rows: 0
- The number of times to repeat each frame.
-Return Value
+DESCRIPTION
+-----------
+
+This ioctl call asks the video device to repeat decoding frames N number
+of times. This call can only be used if VIDEO_SOURCE_MEMORY is
+selected.
+
+
+RETURN VALUE
------------
On success 0 is returned, on error -1 and the ``errno`` variable is set
- ``EPERM``
- Mode VIDEO_SOURCE_MEMORY not selected.
-
-
-
.. _VIDEO_STILLPICTURE:
+==================
VIDEO_STILLPICTURE
==================
-Description
------------
+NAME
+----
-This ioctl call asks the Video Device to display a still picture
-(I-frame). The input data shall contain an I-frame. If the pointer is
-NULL, then the current displayed still picture is blanked.
+VIDEO_STILLPICTURE
-Synopsis
+SYNOPSIS
--------
.. c:function:: int ioctl(fd, int request = VIDEO_STILLPICTURE, struct video_still_picture *sp)
-Arguments
-----------
-
+ARGUMENTS
+---------
.. flat-table::
:header-rows: 0
- Pointer to a location where an I-frame and size is stored.
-Return Value
+DESCRIPTION
+-----------
+
+This ioctl call asks the Video Device to display a still picture
+(I-frame). The input data shall contain an I-frame. If the pointer is
+NULL, then the current displayed still picture is blanked.
+
+
+RETURN VALUE
------------
On success 0 is returned, on error -1 and the ``errno`` variable is set
appropriately. The generic error codes are described at the
:ref:`Generic Error Codes <gen-errors>` chapter.
-
-
.. _VIDEO_STOP:
+==========
VIDEO_STOP
==========
-Description
------------
-
-This ioctl is for DVB devices only. To control a V4L2 decoder use the
-V4L2 :ref:`VIDIOC_DECODER_CMD` instead.
+NAME
+----
-This ioctl call asks the Video Device to stop playing the current
-stream. Depending on the input parameter, the screen can be blanked out
-or displaying the last decoded frame.
+VIDEO_STOP
-Synopsis
+SYNOPSIS
--------
.. c:function:: int ioctl(fd, int request = VIDEO_STOP, boolean mode)
-Arguments
-----------
-
+ARGUMENTS
+---------
.. flat-table::
:header-rows: 0
- FALSE: Show last decoded frame.
-Return Value
+DESCRIPTION
+-----------
+
+This ioctl is for DVB devices only. To control a V4L2 decoder use the
+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
+or displaying the last decoded frame.
+
+
+RETURN VALUE
------------
On success 0 is returned, on error -1 and the ``errno`` variable is set
appropriately. The generic error codes are described at the
:ref:`Generic Error Codes <gen-errors>` chapter.
-
-
.. _VIDEO_TRY_COMMAND:
+=================
VIDEO_TRY_COMMAND
=================
-Description
------------
+NAME
+----
-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.
-
-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
-for more information.
+VIDEO_TRY_COMMAND
-Synopsis
+SYNOPSIS
--------
.. c:function:: int ioctl(int fd, int request = VIDEO_TRY_COMMAND, struct video_command *cmd)
-Arguments
-----------
-
+ARGUMENTS
+---------
.. flat-table::
:header-rows: 0
- Try a decoder command.
-Return Value
+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.
+
+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
+for more information.
+
+
+RETURN VALUE
------------
On success 0 is returned, on error -1 and the ``errno`` variable is set
appropriately. The generic error codes are described at the
:ref:`Generic Error Codes <gen-errors>` chapter.
-
-
media close()
*************
-*man media-close(2)*
+NAME
+====
-Close a media device
+media-close - Close a media device
-
-Synopsis
+SYNOPSIS
========
.. code-block:: c
.. cpp:function:: int close( int fd )
-Arguments
+
+ARGUMENTS
=========
``fd``
File descriptor returned by :ref:`open() <func-open>`.
-Description
+DESCRIPTION
===========
Closes the media device. Resources associated with the file descriptor
are freed. The device configuration remain unchanged.
-Return Value
+RETURN VALUE
============
:ref:`close() <func-close>` returns 0 on success. On error, -1 is returned, and
media ioctl()
*************
-*man media-ioctl(2)*
+NAME
+====
-Control a media device
+media-ioctl - Control a media device
-
-Synopsis
+SYNOPSIS
========
.. code-block:: c
.. cpp:function:: int ioctl( int fd, int request, void *argp )
-Arguments
+
+ARGUMENTS
=========
``fd``
Pointer to a request-specific structure.
-Description
+DESCRIPTION
===========
The :ref:`ioctl() <func-ioctl>` function manipulates media device parameters.
:ref:`media-user-func`.
-Return Value
+RETURN VALUE
============
On success 0 is returned, on error -1 and the ``errno`` variable is set
media open()
************
-*man media-open(2)*
+NAME
+====
-Open a media device
+media-open - Open a media device
-
-Synopsis
+SYNOPSIS
========
.. code-block:: c
.. cpp:function:: int open( const char *device_name, int flags )
-Arguments
+
+ARGUMENTS
=========
``device_name``
Other flags have no effect.
-Description
+DESCRIPTION
===========
To open a media device applications call :ref:`open() <func-open>` with the
EBADF.
-Return Value
+RETURN VALUE
============
:ref:`open() <func-open>` returns the new file descriptor on success. On error,
ioctl MEDIA_IOC_DEVICE_INFO
***************************
-*man MEDIA_IOC_DEVICE_INFO(2)*
+NAME
+====
-Query device information
+MEDIA_IOC_DEVICE_INFO - Query device information
-
-Synopsis
+SYNOPSIS
========
.. cpp:function:: int ioctl( int fd, int request, struct media_device_info *argp )
-Arguments
+
+ARGUMENTS
=========
``fd``
``argp``
-Description
+DESCRIPTION
===========
All media devices must support the ``MEDIA_IOC_DEVICE_INFO`` ioctl. To
vary across reboots or device unplug/replug.
-Return Value
+RETURN VALUE
============
On success 0 is returned, on error -1 and the ``errno`` variable is set
ioctl MEDIA_IOC_ENUM_ENTITIES
*****************************
-*man MEDIA_IOC_ENUM_ENTITIES(2)*
+NAME
+====
-Enumerate entities and their properties
+MEDIA_IOC_ENUM_ENTITIES - Enumerate entities and their properties
-
-Synopsis
+SYNOPSIS
========
.. cpp:function:: int ioctl( int fd, int request, struct media_entity_desc *argp )
-Arguments
+
+ARGUMENTS
=========
``fd``
``argp``
-Description
+DESCRIPTION
===========
To query the attributes of an entity, applications set the id field of a
-
-
-Return Value
+RETURN VALUE
============
On success 0 is returned, on error -1 and the ``errno`` variable is set
ioctl MEDIA_IOC_ENUM_LINKS
**************************
-*man MEDIA_IOC_ENUM_LINKS(2)*
+NAME
+====
-Enumerate all pads and links for a given entity
+MEDIA_IOC_ENUM_LINKS - Enumerate all pads and links for a given entity
-
-Synopsis
+SYNOPSIS
========
.. cpp:function:: int ioctl( int fd, int request, struct media_links_enum *argp )
-Arguments
+
+ARGUMENTS
=========
``fd``
``argp``
-Description
+DESCRIPTION
===========
To enumerate pads and/or links for a given entity, applications set the
- Link flags, see :ref:`media-link-flag` for more details.
-
-Return Value
+RETURN VALUE
============
On success 0 is returned, on error -1 and the ``errno`` variable is set
ioctl MEDIA_IOC_G_TOPOLOGY
**************************
-*man MEDIA_IOC_G_TOPOLOGY(2)*
+NAME
+====
-Enumerate the graph topology and graph element properties
+MEDIA_IOC_G_TOPOLOGY - Enumerate the graph topology and graph element properties
-
-Synopsis
+SYNOPSIS
========
.. cpp:function:: int ioctl( int fd, int request, struct media_v2_topology *argp )
-Arguments
+
+ARGUMENTS
=========
``fd``
``argp``
-Description
+DESCRIPTION
===========
The typical usage of this ioctl is to call it twice. On the first call,
this array to zero.
-
-Return Value
+RETURN VALUE
============
On success 0 is returned, on error -1 and the ``errno`` variable is set
ioctl MEDIA_IOC_SETUP_LINK
**************************
-*man MEDIA_IOC_SETUP_LINK(2)*
+NAME
+====
-Modify the properties of a link
+MEDIA_IOC_SETUP_LINK - Modify the properties of a link
-
-Synopsis
+SYNOPSIS
========
.. cpp:function:: int ioctl( int fd, int request, struct media_link_desc *argp )
-Arguments
+
+ARGUMENTS
=========
``fd``
``argp``
-Description
+DESCRIPTION
===========
To change link properties applications fill a struct
error code.
-Return Value
+RETURN VALUE
============
On success 0 is returned, on error -1 and the ``errno`` variable is set
V4L2 close()
************
-*man v4l2-close(2)*
+NAME
+====
-Close a V4L2 device
+v4l2-close - Close a V4L2 device
-
-Synopsis
+SYNOPSIS
========
.. code-block:: c
.. cpp:function:: int close( int fd )
-Arguments
+
+ARGUMENTS
=========
``fd``
File descriptor returned by :ref:`open() <func-open>`.
-Description
+DESCRIPTION
===========
Closes the device. Any I/O in progress is terminated and resources
remain unchanged.
-Return Value
+RETURN VALUE
============
The function returns 0 on success, -1 on failure and the ``errno`` is
V4L2 ioctl()
************
-*man v4l2-ioctl(2)*
+NAME
+====
-Program a V4L2 device
+v4l2-ioctl - Program a V4L2 device
-
-Synopsis
+SYNOPSIS
========
.. code-block:: c
.. cpp:function:: int ioctl( int fd, int request, void *argp )
-Arguments
+
+ARGUMENTS
=========
``fd``
Pointer to a function parameter, usually a structure.
-Description
+DESCRIPTION
===========
The :ref:`ioctl() <func-ioctl>` function is used to program V4L2 devices. The
specified in :ref:`user-func`.
-Return Value
+RETURN VALUE
============
On success 0 is returned, on error -1 and the ``errno`` variable is set
V4L2 mmap()
***********
-*man v4l2-mmap(2)*
+NAME
+====
-Map device memory into application address space
+v4l2-mmap - Map device memory into application address space
-
-Synopsis
+SYNOPSIS
========
.. code-block:: c
.. cpp:function:: void *mmap( void *start, size_t length, int prot, int flags, int fd, off_t offset )
-Arguments
+
+ARGUMENTS
=========
``start``
``mem_offset`` field for the multi-planar API.
-Description
+DESCRIPTION
===========
The :ref:`mmap() <func-mmap>` function asks to map ``length`` bytes starting at
To unmap buffers the :ref:`munmap() <func-munmap>` function is used.
-Return Value
+RETURN VALUE
============
On success :ref:`mmap() <func-mmap>` returns a pointer to the mapped buffer. On
V4L2 munmap()
*************
-*man v4l2-munmap(2)*
+NAME
+====
-Unmap device memory
+v4l2-munmap - Unmap device memory
-
-Synopsis
+SYNOPSIS
========
.. code-block:: c
.. cpp:function:: int munmap( void *start, size_t length )
-Arguments
+
+ARGUMENTS
=========
``start``
multi-planar API.
-Description
+DESCRIPTION
===========
Unmaps a previously with the :ref:`mmap() <func-mmap>` function mapped
buffer and frees it, if possible.
-Return Value
+RETURN VALUE
============
On success :ref:`munmap() <func-munmap>` returns 0, on failure -1 and the
V4L2 open()
***********
-*man v4l2-open(2)*
+NAME
+====
-Open a V4L2 device
+v4l2-open - Open a V4L2 device
-
-Synopsis
+SYNOPSIS
========
.. code-block:: c
.. cpp:function:: int open( const char *device_name, int flags )
-Arguments
+
+ARGUMENTS
=========
``device_name``
Other flags have no effect.
-Description
+DESCRIPTION
===========
To open a V4L2 device applications call :ref:`open() <func-open>` with the
undefined state.
-Return Value
+RETURN VALUE
============
On success :ref:`open() <func-open>` returns the new file descriptor. On error
V4L2 poll()
***********
-*man v4l2-poll(2)*
+NAME
+====
-Wait for some event on a file descriptor
+v4l2-poll - Wait for some event on a file descriptor
-
-Synopsis
+SYNOPSIS
========
.. code-block:: c
.. cpp:function:: int poll( struct pollfd *ufds, unsigned int nfds, int timeout )
-Description
+
+ARGUMENTS
+=========
+
+
+
+DESCRIPTION
===========
With the :ref:`poll() <func-poll>` function applications can suspend execution
For more details see the :ref:`poll() <func-poll>` manual page.
-Return Value
+RETURN VALUE
============
On success, :ref:`poll() <func-poll>` returns the number structures which have
V4L2 read()
***********
-*man v4l2-read(2)*
+NAME
+====
-Read from a V4L2 device
+v4l2-read - Read from a V4L2 device
-
-Synopsis
+SYNOPSIS
========
.. code-block:: c
.. cpp:function:: ssize_t read( int fd, void *buf, size_t count )
-Arguments
+
+ARGUMENTS
=========
``fd``
``count``
-Description
+DESCRIPTION
===========
:ref:`read() <func-read>` attempts to read up to ``count`` bytes from file
For minimum requirements see :ref:`devices`.
-Return Value
+RETURN VALUE
============
On success, the number of bytes read is returned. It is not an error if
V4L2 select()
*************
-*man v4l2-select(2)*
+NAME
+====
-Synchronous I/O multiplexing
+v4l2-select - Synchronous I/O multiplexing
-
-Synopsis
+SYNOPSIS
========
.. code-block:: c
.. cpp:function:: int select( int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, struct timeval *timeout )
-Description
+
+ARGUMENTS
+=========
+
+
+
+DESCRIPTION
===========
With the :ref:`select() <func-select>` function applications can suspend
For more details see the :ref:`select() <func-select>` manual page.
-Return Value
+RETURN VALUE
============
On success, :ref:`select() <func-select>` returns the number of descriptors
V4L2 write()
************
-*man v4l2-write(2)*
+NAME
+====
-Write to a V4L2 device
+v4l2-write - Write to a V4L2 device
-
-Synopsis
+SYNOPSIS
========
.. code-block:: c
.. cpp:function:: ssize_t write( int fd, void *buf, size_t count )
-Arguments
+
+ARGUMENTS
=========
``fd``
``count``
-Description
+DESCRIPTION
===========
:ref:`write() <func-write>` writes up to ``count`` bytes to the device
inserts a blank line instead.
-Return Value
+RETURN VALUE
============
On success, the number of bytes written are returned. Zero indicates
ioctl VIDIOC_CREATE_BUFS
************************
-*man VIDIOC_CREATE_BUFS(2)*
+NAME
+====
-Create buffers for Memory Mapped or User Pointer or DMA Buffer I/O
+VIDIOC_CREATE_BUFS - Create buffers for Memory Mapped or User Pointer or DMA Buffer I/O
-
-Synopsis
+SYNOPSIS
========
.. cpp:function:: int ioctl( int fd, int request, struct v4l2_create_buffers *argp )
-Arguments
+
+ARGUMENTS
=========
``fd``
``argp``
-Description
+DESCRIPTION
===========
This ioctl is used to create buffers for :ref:`memory mapped <mmap>`
must set the array to zero.
-
-Return Value
+RETURN VALUE
============
On success 0 is returned, on error -1 and the ``errno`` variable is set
ioctl VIDIOC_CROPCAP
********************
-*man VIDIOC_CROPCAP(2)*
+NAME
+====
-Information about the video cropping and scaling abilities
+VIDIOC_CROPCAP - Information about the video cropping and scaling abilities
-
-Synopsis
+SYNOPSIS
========
.. cpp:function:: int ioctl( int fd, int request, struct v4l2_cropcap *argp )
-Arguments
+
+ARGUMENTS
=========
``fd``
``argp``
-Description
+DESCRIPTION
===========
Applications use this function to query the cropping limits, the pixel
- Height of the rectangle, in pixels.
-
-Return Value
+RETURN VALUE
============
On success 0 is returned, on error -1 and the ``errno`` variable is set
ioctl VIDIOC_DBG_G_CHIP_INFO
****************************
-*man VIDIOC_DBG_G_CHIP_INFO(2)*
+NAME
+====
-Identify the chips on a TV card
+VIDIOC_DBG_G_CHIP_INFO - Identify the chips on a TV card
-
-Synopsis
+SYNOPSIS
========
.. cpp:function:: int ioctl( int fd, int request, struct v4l2_dbg_chip_info *argp )
-Arguments
+
+ARGUMENTS
=========
``fd``
``argp``
-Description
+DESCRIPTION
===========
**Note**
- Match the nth sub-device.
-
-Return Value
+RETURN VALUE
============
On success 0 is returned, on error -1 and the ``errno`` variable is set
ioctl VIDIOC_DBG_G_REGISTER, VIDIOC_DBG_S_REGISTER
**************************************************
-*man VIDIOC_DBG_G_REGISTER(2)*
+NAME
+====
-VIDIOC_DBG_S_REGISTER
-Read or write hardware registers
+VIDIOC_DBG_G_REGISTER - VIDIOC_DBG_S_REGISTER - Read or write hardware registers
-
-Synopsis
+SYNOPSIS
========
.. cpp:function:: int ioctl( int fd, int request, struct v4l2_dbg_register *argp )
.. cpp:function:: int ioctl( int fd, int request, const struct v4l2_dbg_register *argp )
-Arguments
+
+ARGUMENTS
=========
``fd``
``argp``
-Description
+DESCRIPTION
===========
**Note**
- Match the nth sub-device.
-
-Return Value
+RETURN VALUE
============
On success 0 is returned, on error -1 and the ``errno`` variable is set
ioctl VIDIOC_DECODER_CMD, VIDIOC_TRY_DECODER_CMD
************************************************
-*man VIDIOC_DECODER_CMD(2)*
+NAME
+====
-VIDIOC_TRY_DECODER_CMD
-Execute an decoder command
+VIDIOC_DECODER_CMD - VIDIOC_TRY_DECODER_CMD - Execute an decoder command
-
-Synopsis
+SYNOPSIS
========
.. cpp:function:: int ioctl( int fd, int request, struct v4l2_decoder_cmd *argp )
-Arguments
+
+ARGUMENTS
=========
``fd``
``argp``
-Description
+DESCRIPTION
===========
These ioctls control an audio/video (usually MPEG-) decoder.
flags are defined for this command.
-
-Return Value
+RETURN VALUE
============
On success 0 is returned, on error -1 and the ``errno`` variable is set
ioctl VIDIOC_DQEVENT
********************
-*man VIDIOC_DQEVENT(2)*
+NAME
+====
-Dequeue event
+VIDIOC_DQEVENT - Dequeue event
-
-Synopsis
+SYNOPSIS
========
.. cpp:function:: int ioctl( int fd, int request, struct v4l2_event *argp )
-Arguments
+
+ARGUMENTS
=========
``fd``
``argp``
-Description
+DESCRIPTION
===========
Dequeue an event from a video device. No input is required for this
decoder.
-
-Return Value
+RETURN VALUE
============
On success 0 is returned, on error -1 and the ``errno`` variable is set
ioctl VIDIOC_DV_TIMINGS_CAP, VIDIOC_SUBDEV_DV_TIMINGS_CAP
*********************************************************
-*man VIDIOC_DV_TIMINGS_CAP(2)*
+NAME
+====
-VIDIOC_SUBDEV_DV_TIMINGS_CAP
-The capabilities of the Digital Video receiver/transmitter
+VIDIOC_DV_TIMINGS_CAP - VIDIOC_SUBDEV_DV_TIMINGS_CAP - The capabilities of the Digital Video receiver/transmitter
-
-Synopsis
+SYNOPSIS
========
.. cpp:function:: int ioctl( int fd, int request, struct v4l2_dv_timings_cap *argp )
-Arguments
+
+ARGUMENTS
=========
``fd``
``argp``
-Description
+DESCRIPTION
===========
To query the capabilities of the DV receiver/transmitter applications
the standards set in the ``standards`` field.
-
-Return Value
+RETURN VALUE
============
On success 0 is returned, on error -1 and the ``errno`` variable is set
ioctl VIDIOC_ENCODER_CMD, VIDIOC_TRY_ENCODER_CMD
************************************************
-*man VIDIOC_ENCODER_CMD(2)*
+NAME
+====
-VIDIOC_TRY_ENCODER_CMD
-Execute an encoder command
+VIDIOC_ENCODER_CMD - VIDIOC_TRY_ENCODER_CMD - Execute an encoder command
-
-Synopsis
+SYNOPSIS
========
.. cpp:function:: int ioctl( int fd, int request, struct v4l2_encoder_cmd *argp )
-Arguments
+
+ARGUMENTS
=========
``fd``
``argp``
-Description
+DESCRIPTION
===========
These ioctls control an audio/video (usually MPEG-) encoder.
rather than immediately.
-
-Return Value
+RETURN VALUE
============
On success 0 is returned, on error -1 and the ``errno`` variable is set
ioctl VIDIOC_ENUM_DV_TIMINGS, VIDIOC_SUBDEV_ENUM_DV_TIMINGS
***********************************************************
-*man VIDIOC_ENUM_DV_TIMINGS(2)*
+NAME
+====
-VIDIOC_SUBDEV_ENUM_DV_TIMINGS
-Enumerate supported Digital Video timings
+VIDIOC_ENUM_DV_TIMINGS - VIDIOC_SUBDEV_ENUM_DV_TIMINGS - Enumerate supported Digital Video timings
-
-Synopsis
+SYNOPSIS
========
.. cpp:function:: int ioctl( int fd, int request, struct v4l2_enum_dv_timings *argp )
-Arguments
+
+ARGUMENTS
=========
``fd``
``argp``
-Description
+DESCRIPTION
===========
While some DV receivers or transmitters support a wide range of timings,
- The timings.
-
-Return Value
+RETURN VALUE
============
On success 0 is returned, on error -1 and the ``errno`` variable is set
ioctl VIDIOC_ENUM_FMT
*********************
-*man VIDIOC_ENUM_FMT(2)*
+NAME
+====
-Enumerate image formats
+VIDIOC_ENUM_FMT - Enumerate image formats
-
-Synopsis
+SYNOPSIS
========
.. cpp:function:: int ioctl( int fd, int request, struct v4l2_fmtdesc *argp )
-Arguments
+
+ARGUMENTS
=========
``fd``
``argp``
-Description
+DESCRIPTION
===========
To enumerate image formats applications initialize the ``type`` and
format instead for better performance.
-
-Return Value
+RETURN VALUE
============
On success 0 is returned, on error -1 and the ``errno`` variable is set
ioctl VIDIOC_ENUM_FRAMEINTERVALS
********************************
-*man VIDIOC_ENUM_FRAMEINTERVALS(2)*
+NAME
+====
-Enumerate frame intervals
+VIDIOC_ENUM_FRAMEINTERVALS - Enumerate frame intervals
-
-Synopsis
+SYNOPSIS
========
.. cpp:function:: int ioctl( int fd, int request, struct v4l2_frmivalenum *argp )
-Arguments
+
+ARGUMENTS
=========
``fd``
interval.
-Description
+DESCRIPTION
===========
This ioctl allows applications to enumerate all frame intervals that the
- Step-wise defined frame interval.
-
-Return Value
+RETURN VALUE
============
On success 0 is returned, on error -1 and the ``errno`` variable is set
ioctl VIDIOC_ENUM_FRAMESIZES
****************************
-*man VIDIOC_ENUM_FRAMESIZES(2)*
+NAME
+====
-Enumerate frame sizes
+VIDIOC_ENUM_FRAMESIZES - Enumerate frame sizes
-
-Synopsis
+SYNOPSIS
========
.. cpp:function:: int ioctl( int fd, int request, struct v4l2_frmsizeenum *argp )
-Arguments
+
+ARGUMENTS
=========
``fd``
and height.
-Description
+DESCRIPTION
===========
This ioctl allows applications to enumerate all frame sizes (i. e. width
- Step-wise defined frame size.
-
-Return Value
+RETURN VALUE
============
On success 0 is returned, on error -1 and the ``errno`` variable is set
ioctl VIDIOC_ENUM_FREQ_BANDS
****************************
-*man VIDIOC_ENUM_FREQ_BANDS(2)*
+NAME
+====
-Enumerate supported frequency bands
+VIDIOC_ENUM_FREQ_BANDS - Enumerate supported frequency bands
-
-Synopsis
+SYNOPSIS
========
.. cpp:function:: int ioctl( int fd, int request, struct v4l2_frequency_band *argp )
-Arguments
+
+ARGUMENTS
=========
``fd``
``argp``
-Description
+DESCRIPTION
===========
Enumerates the frequency bands that a tuner or modulator supports. To do
- Amplitude Modulation, commonly used for analog radio.
-
-Return Value
+RETURN VALUE
============
On success 0 is returned, on error -1 and the ``errno`` variable is set
ioctl VIDIOC_ENUMAUDIO
**********************
-*man VIDIOC_ENUMAUDIO(2)*
+NAME
+====
-Enumerate audio inputs
+VIDIOC_ENUMAUDIO - Enumerate audio inputs
-
-Synopsis
+SYNOPSIS
========
.. cpp:function:: int ioctl( int fd, int request, struct v4l2_audio *argp )
-Arguments
+
+ARGUMENTS
=========
``fd``
``argp``
-Description
+DESCRIPTION
===========
To query the attributes of an audio input applications initialize the
:ref:`v4l2_audio <v4l2-audio>`.
-Return Value
+RETURN VALUE
============
On success 0 is returned, on error -1 and the ``errno`` variable is set
ioctl VIDIOC_ENUMAUDOUT
***********************
-*man VIDIOC_ENUMAUDOUT(2)*
+NAME
+====
-Enumerate audio outputs
+VIDIOC_ENUMAUDOUT - Enumerate audio outputs
-
-Synopsis
+SYNOPSIS
========
.. cpp:function:: int ioctl( int fd, int request, struct v4l2_audioout *argp )
-Arguments
+
+ARGUMENTS
=========
``fd``
``argp``
-Description
+DESCRIPTION
===========
To query the attributes of an audio output applications initialize the
:ref:`v4l2_audioout <v4l2-audioout>`.
-Return Value
+RETURN VALUE
============
On success 0 is returned, on error -1 and the ``errno`` variable is set
ioctl VIDIOC_ENUMINPUT
**********************
-*man VIDIOC_ENUMINPUT(2)*
+NAME
+====
-Enumerate video inputs
+VIDIOC_ENUMINPUT - Enumerate video inputs
-
-Synopsis
+SYNOPSIS
========
.. cpp:function:: int ioctl( int fd, int request, struct v4l2_input *argp )
-Arguments
+
+ARGUMENTS
=========
``fd``
``argp``
-Description
+DESCRIPTION
===========
To query the attributes of a video input applications initialize the
:ref:`v4l2-selections-common`.
-
-Return Value
+RETURN VALUE
============
On success 0 is returned, on error -1 and the ``errno`` variable is set
ioctl VIDIOC_ENUMOUTPUT
***********************
-*man VIDIOC_ENUMOUTPUT(2)*
+NAME
+====
-Enumerate video outputs
+VIDIOC_ENUMOUTPUT - Enumerate video outputs
-
-Synopsis
+SYNOPSIS
========
.. cpp:function:: int ioctl( int fd, int request, struct v4l2_output *argp )
-Arguments
+
+ARGUMENTS
=========
``fd``
``argp``
-Description
+DESCRIPTION
===========
To query the attributes of a video outputs applications initialize the
:ref:`v4l2-selections-common`.
-
-Return Value
+RETURN VALUE
============
On success 0 is returned, on error -1 and the ``errno`` variable is set
ioctl VIDIOC_ENUMSTD
********************
-*man VIDIOC_ENUMSTD(2)*
+NAME
+====
-Enumerate supported video standards
+VIDIOC_ENUMSTD - Enumerate supported video standards
-
-Synopsis
+SYNOPSIS
========
.. cpp:function:: int ioctl( int fd, int request, struct v4l2_standard *argp )
-Arguments
+
+ARGUMENTS
=========
``fd``
``argp``
-Description
+DESCRIPTION
===========
To query the attributes of a video standard, especially a custom (driver
- + 6.5 [8]_
-
-Return Value
+RETURN VALUE
============
On success 0 is returned, on error -1 and the ``errno`` variable is set
ioctl VIDIOC_EXPBUF
*******************
-*man VIDIOC_EXPBUF(2)*
+NAME
+====
-Export a buffer as a DMABUF file descriptor.
+VIDIOC_EXPBUF - Export a buffer as a DMABUF file descriptor.
-
-Synopsis
+SYNOPSIS
========
.. cpp:function:: int ioctl( int fd, int request, struct v4l2_exportbuffer *argp )
-Arguments
+
+ARGUMENTS
=========
``fd``
``argp``
-Description
+DESCRIPTION
===========
This ioctl is an extension to the :ref:`memory mapping <mmap>` I/O
the array to zero.
-
-Return Value
+RETURN VALUE
============
On success 0 is returned, on error -1 and the ``errno`` variable is set
ioctl VIDIOC_G_AUDIO, VIDIOC_S_AUDIO
************************************
-*man VIDIOC_G_AUDIO(2)*
+NAME
+====
-VIDIOC_S_AUDIO
-Query or select the current audio input and its attributes
+VIDIOC_G_AUDIO - VIDIOC_S_AUDIO - Query or select the current audio input and its attributes
-
-Synopsis
+SYNOPSIS
========
.. cpp:function:: int ioctl( int fd, int request, struct v4l2_audio *argp )
.. cpp:function:: int ioctl( int fd, int request, const struct v4l2_audio *argp )
-Arguments
+
+ARGUMENTS
=========
``fd``
``argp``
-Description
+DESCRIPTION
===========
To query the current audio input applications zero out the ``reserved``
- AVL mode is on.
-
-Return Value
+RETURN VALUE
============
On success 0 is returned, on error -1 and the ``errno`` variable is set
ioctl VIDIOC_G_AUDOUT, VIDIOC_S_AUDOUT
**************************************
-*man VIDIOC_G_AUDOUT(2)*
+NAME
+====
-VIDIOC_S_AUDOUT
-Query or select the current audio output
+VIDIOC_G_AUDOUT - VIDIOC_S_AUDOUT - Query or select the current audio output
-
-Synopsis
+SYNOPSIS
========
.. cpp:function:: int ioctl( int fd, int request, struct v4l2_audioout *argp )
.. cpp:function:: int ioctl( int fd, int request, const struct v4l2_audioout *argp )
-Arguments
+
+ARGUMENTS
=========
``fd``
``argp``
-Description
+DESCRIPTION
===========
To query the current audio output applications zero out the ``reserved``
the array to zero.
-
-Return Value
+RETURN VALUE
============
On success 0 is returned, on error -1 and the ``errno`` variable is set
ioctl VIDIOC_G_CROP, VIDIOC_S_CROP
**********************************
-*man VIDIOC_G_CROP(2)*
+NAME
+====
-VIDIOC_S_CROP
-Get or set the current cropping rectangle
+VIDIOC_G_CROP - VIDIOC_S_CROP - Get or set the current cropping rectangle
-
-Synopsis
+SYNOPSIS
========
.. cpp:function:: int ioctl( int fd, int request, struct v4l2_crop *argp )
.. cpp:function:: int ioctl( int fd, int request, const struct v4l2_crop *argp )
-Arguments
+
+ARGUMENTS
=========
``fd``
``argp``
-Description
+DESCRIPTION
===========
To query the cropping rectangle size and position applications set the
:ref:`v4l2_cropcap <v4l2-cropcap>` ``bounds`` is used.
-
-Return Value
+RETURN VALUE
============
On success 0 is returned, on error -1 and the ``errno`` variable is set
ioctl VIDIOC_G_CTRL, VIDIOC_S_CTRL
**********************************
-*man VIDIOC_G_CTRL(2)*
+NAME
+====
-VIDIOC_S_CTRL
-Get or set the value of a control
+VIDIOC_G_CTRL - VIDIOC_S_CTRL - Get or set the value of a control
-
-Synopsis
+SYNOPSIS
========
.. cpp:function:: int ioctl( int fd, int request, struct v4l2_control *argp )
-Arguments
+
+ARGUMENTS
=========
``fd``
``argp``
-Description
+DESCRIPTION
===========
To get the current value of a control applications initialize the ``id``
- New value or current value.
-
-Return Value
+RETURN VALUE
============
On success 0 is returned, on error -1 and the ``errno`` variable is set
ioctl VIDIOC_G_DV_TIMINGS, VIDIOC_S_DV_TIMINGS
**********************************************
-*man VIDIOC_G_DV_TIMINGS(2)*
+NAME
+====
-VIDIOC_S_DV_TIMINGS
-VIDIOC_SUBDEV_G_DV_TIMINGS
-VIDIOC_SUBDEV_S_DV_TIMINGS
-Get or set DV timings for input or output
+VIDIOC_G_DV_TIMINGS - VIDIOC_S_DV_TIMINGS - VIDIOC_SUBDEV_G_DV_TIMINGS - VIDIOC_SUBDEV_S_DV_TIMINGS - Get or set DV timings for input or output
-
-Synopsis
+SYNOPSIS
========
.. cpp:function:: int ioctl( int fd, int request, struct v4l2_dv_timings *argp )
-Arguments
+
+ARGUMENTS
=========
``fd``
``argp``
-Description
+DESCRIPTION
===========
To set DV timings for the input or output, applications use the
``V4L2_IN_CAP_DV_TIMINGS`` flag), then ``ENODATA`` error code is returned.
-Return Value
+RETURN VALUE
============
On success 0 is returned, on error -1 and the ``errno`` variable is set
ioctl VIDIOC_G_EDID, VIDIOC_S_EDID, VIDIOC_SUBDEV_G_EDID, VIDIOC_SUBDEV_S_EDID
******************************************************************************
-*man VIDIOC_G_EDID(2)*
+NAME
+====
-VIDIOC_S_EDID
-VIDIOC_SUBDEV_G_EDID
-VIDIOC_SUBDEV_S_EDID
-Get or set the EDID of a video receiver/transmitter
+VIDIOC_G_EDID - VIDIOC_S_EDID - VIDIOC_SUBDEV_G_EDID - VIDIOC_SUBDEV_S_EDID - Get or set the EDID of a video receiver/transmitter
-
-Synopsis
+SYNOPSIS
========
.. cpp:function:: int ioctl( int fd, int request, struct v4l2_edid *argp )
-Arguments
+
+ARGUMENTS
=========
``fd``
``argp``
-Description
+DESCRIPTION
===========
These ioctls can be used to get or set an EDID associated with an input
``blocks`` * 128.
-
-Return Value
+RETURN VALUE
============
On success 0 is returned, on error -1 and the ``errno`` variable is set
ioctl VIDIOC_G_ENC_INDEX
************************
-*man VIDIOC_G_ENC_INDEX(2)*
+NAME
+====
-Get meta data about a compressed video stream
+VIDIOC_G_ENC_INDEX - Get meta data about a compressed video stream
-
-Synopsis
+SYNOPSIS
========
.. cpp:function:: int ioctl( int fd, int request, struct v4l2_enc_idx *argp )
-Arguments
+
+ARGUMENTS
=========
``fd``
``argp``
-Description
+DESCRIPTION
===========
The :ref:`VIDIOC_G_ENC_INDEX <VIDIOC_G_ENC_INDEX>` ioctl provides meta data about a compressed
type.
-
-Return Value
+RETURN VALUE
============
On success 0 is returned, on error -1 and the ``errno`` variable is set
ioctl VIDIOC_G_EXT_CTRLS, VIDIOC_S_EXT_CTRLS, VIDIOC_TRY_EXT_CTRLS
******************************************************************
-*man VIDIOC_G_EXT_CTRLS(2)*
+NAME
+====
-VIDIOC_S_EXT_CTRLS
-VIDIOC_TRY_EXT_CTRLS
-Get or set the value of several controls, try control values
+VIDIOC_G_EXT_CTRLS - VIDIOC_S_EXT_CTRLS - VIDIOC_TRY_EXT_CTRLS - Get or set the value of several controls, try control values
-
-Synopsis
+SYNOPSIS
========
.. cpp:function:: int ioctl( int fd, int request, struct v4l2_ext_controls *argp )
-Arguments
+
+ARGUMENTS
=========
``fd``
``argp``
-Description
+DESCRIPTION
===========
These ioctls allow the caller to get or set multiple controls
described in :ref:`rf-tuner-controls`.
-
-Return Value
+RETURN VALUE
============
On success 0 is returned, on error -1 and the ``errno`` variable is set
ioctl VIDIOC_G_FBUF, VIDIOC_S_FBUF
**********************************
-*man VIDIOC_G_FBUF(2)*
+NAME
+====
-VIDIOC_S_FBUF
-Get or set frame buffer overlay parameters
+VIDIOC_G_FBUF - VIDIOC_S_FBUF - Get or set frame buffer overlay parameters
-
-Synopsis
+SYNOPSIS
========
.. cpp:function:: int ioctl( int fd, int request, struct v4l2_framebuffer *argp )
.. cpp:function:: int ioctl( int fd, int request, const struct v4l2_framebuffer *argp )
-Arguments
+
+ARGUMENTS
=========
``fd``
``argp``
-Description
+DESCRIPTION
===========
Applications can use the :ref:`VIDIOC_G_FBUF <VIDIOC_G_FBUF>` and :ref:`VIDIOC_S_FBUF <VIDIOC_G_FBUF>` ioctl
:ref:`v4l2_window <v4l2-window>` is being used.
-
-Return Value
+RETURN VALUE
============
On success 0 is returned, on error -1 and the ``errno`` variable is set
ioctl VIDIOC_G_FMT, VIDIOC_S_FMT, VIDIOC_TRY_FMT
************************************************
-*man VIDIOC_G_FMT(2)*
+NAME
+====
-VIDIOC_S_FMT
-VIDIOC_TRY_FMT
-Get or set the data format, try a format
+VIDIOC_G_FMT - VIDIOC_S_FMT - VIDIOC_TRY_FMT - Get or set the data format, try a format
-
-Synopsis
+SYNOPSIS
========
.. cpp:function:: int ioctl( int fd, int request, struct v4l2_format *argp )
-Arguments
+
+ARGUMENTS
=========
``fd``
``argp``
-Description
+DESCRIPTION
===========
These ioctls are used to negotiate the format of data (typically image
- Place holder for future extensions.
-
-Return Value
+RETURN VALUE
============
On success 0 is returned, on error -1 and the ``errno`` variable is set
ioctl VIDIOC_G_FREQUENCY, VIDIOC_S_FREQUENCY
********************************************
-*man VIDIOC_G_FREQUENCY(2)*
+NAME
+====
-VIDIOC_S_FREQUENCY
-Get or set tuner or modulator radio frequency
+VIDIOC_G_FREQUENCY - VIDIOC_S_FREQUENCY - Get or set tuner or modulator radio frequency
-
-Synopsis
+SYNOPSIS
========
.. cpp:function:: int ioctl( int fd, int request, struct v4l2_frequency *argp )
.. cpp:function:: int ioctl( int fd, int request, const struct v4l2_frequency *argp )
-Arguments
+
+ARGUMENTS
=========
``fd``
``argp``
-Description
+DESCRIPTION
===========
To get the current tuner or modulator radio frequency applications set
the array to zero.
-
-Return Value
+RETURN VALUE
============
On success 0 is returned, on error -1 and the ``errno`` variable is set
ioctl VIDIOC_G_INPUT, VIDIOC_S_INPUT
************************************
-*man VIDIOC_G_INPUT(2)*
+NAME
+====
-VIDIOC_S_INPUT
-Query or select the current video input
+VIDIOC_G_INPUT - VIDIOC_S_INPUT - Query or select the current video input
-
-Synopsis
+SYNOPSIS
========
.. cpp:function:: int ioctl( int fd, int request, int *argp )
-Arguments
+
+ARGUMENTS
=========
``fd``
``argp``
-Description
+DESCRIPTION
===========
To query the current video input applications call the
:ref:`VIDIOC_ENUMINPUT` ioctl.
-Return Value
+RETURN VALUE
============
On success 0 is returned, on error -1 and the ``errno`` variable is set
ioctl VIDIOC_G_JPEGCOMP, VIDIOC_S_JPEGCOMP
******************************************
-*man VIDIOC_G_JPEGCOMP(2)*
+NAME
+====
-VIDIOC_S_JPEGCOMP
+VIDIOC_G_JPEGCOMP - VIDIOC_S_JPEGCOMP
-Synopsis
+SYNOPSIS
========
.. cpp:function:: int ioctl( int fd, int request, v4l2_jpegcompression *argp )
.. cpp:function:: int ioctl( int fd, int request, const v4l2_jpegcompression *argp )
-Arguments
+
+ARGUMENTS
=========
``fd``
``argp``
-Description
+DESCRIPTION
===========
These ioctls are **deprecated**. New drivers and applications should use
- App segment, driver will always use APP0
-
-Return Value
+RETURN VALUE
============
On success 0 is returned, on error -1 and the ``errno`` variable is set
ioctl VIDIOC_G_MODULATOR, VIDIOC_S_MODULATOR
********************************************
-*man VIDIOC_G_MODULATOR(2)*
+NAME
+====
-VIDIOC_S_MODULATOR
-Get or set modulator attributes
+VIDIOC_G_MODULATOR - VIDIOC_S_MODULATOR - Get or set modulator attributes
-
-Synopsis
+SYNOPSIS
========
.. cpp:function:: int ioctl( int fd, int request, struct v4l2_modulator *argp )
.. cpp:function:: int ioctl( int fd, int request, const struct v4l2_modulator *argp )
-Arguments
+
+ARGUMENTS
=========
``fd``
``argp``
-Description
+DESCRIPTION
===========
To query the attributes of a modulator applications initialize the
- Enable the RDS encoder for a radio FM transmitter.
-
-Return Value
+RETURN VALUE
============
On success 0 is returned, on error -1 and the ``errno`` variable is set
ioctl VIDIOC_G_OUTPUT, VIDIOC_S_OUTPUT
**************************************
-*man VIDIOC_G_OUTPUT(2)*
+NAME
+====
-VIDIOC_S_OUTPUT
-Query or select the current video output
+VIDIOC_G_OUTPUT - VIDIOC_S_OUTPUT - Query or select the current video output
-
-Synopsis
+SYNOPSIS
========
.. cpp:function:: int ioctl( int fd, int request, int *argp )
-Arguments
+
+ARGUMENTS
=========
``fd``
``argp``
-Description
+DESCRIPTION
===========
To query the current video output applications call the
:ref:`VIDIOC_ENUMOUTPUT` ioctl.
-Return Value
+RETURN VALUE
============
On success 0 is returned, on error -1 and the ``errno`` variable is set
ioctl VIDIOC_G_PARM, VIDIOC_S_PARM
**********************************
-*man VIDIOC_G_PARM(2)*
+NAME
+====
-VIDIOC_S_PARM
-Get or set streaming parameters
+VIDIOC_G_PARM - VIDIOC_S_PARM - Get or set streaming parameters
-
-Synopsis
+SYNOPSIS
========
.. cpp:function:: int ioctl( int fd, int request, v4l2_streamparm *argp )
-Arguments
+
+ARGUMENTS
=========
``fd``
``argp``
-Description
+DESCRIPTION
===========
The current video standard determines a nominal number of frames per
- Capture might only work through the :ref:`read() <func-read>` call.
-
-Return Value
+RETURN VALUE
============
On success 0 is returned, on error -1 and the ``errno`` variable is set
ioctl VIDIOC_G_PRIORITY, VIDIOC_S_PRIORITY
******************************************
-*man VIDIOC_G_PRIORITY(2)*
+NAME
+====
-VIDIOC_S_PRIORITY
-Query or request the access priority associated with a file descriptor
+VIDIOC_G_PRIORITY - VIDIOC_S_PRIORITY - Query or request the access priority associated with a file descriptor
-
-Synopsis
+SYNOPSIS
========
.. c:function:: int ioctl( int fd, int request, enum v4l2_priority *argp )
.. c:function:: int ioctl( int fd, int request, const enum v4l2_priority *argp )
-Arguments
+
+ARGUMENTS
=========
``fd``
Pointer to an enum v4l2_priority type.
-Description
+DESCRIPTION
===========
To query the current access priority applications call the
applications which must not be interrupted, like video recording.
-
-Return Value
+RETURN VALUE
============
On success 0 is returned, on error -1 and the ``errno`` variable is set
ioctl VIDIOC_G_SELECTION, VIDIOC_S_SELECTION
********************************************
-*man VIDIOC_G_SELECTION(2)*
+NAME
+====
-VIDIOC_S_SELECTION
-Get or set one of the selection rectangles
+VIDIOC_G_SELECTION - VIDIOC_S_SELECTION - Get or set one of the selection rectangles
-
-Synopsis
+SYNOPSIS
========
.. cpp:function:: int ioctl( int fd, int request, struct v4l2_selection *argp )
-Arguments
+
+ARGUMENTS
=========
``fd``
``argp``
-Description
+DESCRIPTION
===========
The ioctls are used to query and configure selection rectangles.
this array.
-
-Return Value
+RETURN VALUE
============
On success 0 is returned, on error -1 and the ``errno`` variable is set
ioctl VIDIOC_G_SLICED_VBI_CAP
*****************************
-*man VIDIOC_G_SLICED_VBI_CAP(2)*
+NAME
+====
-Query sliced VBI capabilities
+VIDIOC_G_SLICED_VBI_CAP - Query sliced VBI capabilities
-
-Synopsis
+SYNOPSIS
========
.. cpp:function:: int ioctl( int fd, int request, struct v4l2_sliced_vbi_cap *argp )
-Arguments
+
+ARGUMENTS
=========
``fd``
``argp``
-Description
+DESCRIPTION
===========
To find out which data services are supported by a sliced VBI capture or
- :cspan:`2` Set of services applicable to 625 line systems.
-
-Return Value
+RETURN VALUE
============
On success 0 is returned, on error -1 and the ``errno`` variable is set
ioctl VIDIOC_G_STD, VIDIOC_S_STD
********************************
-*man VIDIOC_G_STD(2)*
+NAME
+====
-VIDIOC_S_STD
-Query or select the video standard of the current input
+VIDIOC_G_STD - VIDIOC_S_STD - Query or select the video standard of the current input
-
-Synopsis
+SYNOPSIS
========
.. cpp:function:: int ioctl( int fd, int request, v4l2_std_id *argp )
.. cpp:function:: int ioctl( int fd, int request, const v4l2_std_id *argp )
-Arguments
+
+ARGUMENTS
=========
``fd``
``argp``
-Description
+DESCRIPTION
===========
To query and select the current video standard applications use the
returned.
-Return Value
+RETURN VALUE
============
On success 0 is returned, on error -1 and the ``errno`` variable is set
ioctl VIDIOC_G_TUNER, VIDIOC_S_TUNER
************************************
-*man VIDIOC_G_TUNER(2)*
+NAME
+====
-VIDIOC_S_TUNER
-Get or set tuner attributes
+VIDIOC_G_TUNER - VIDIOC_S_TUNER - Get or set tuner attributes
-
-Synopsis
+SYNOPSIS
========
.. cpp:function:: int ioctl( int fd, int request, struct v4l2_tuner *argp )
.. cpp:function:: int ioctl( int fd, int request, const struct v4l2_tuner *argp )
-Arguments
+
+ARGUMENTS
=========
``fd``
``argp``
-Description
+DESCRIPTION
===========
To query the attributes of a tuner applications initialize the ``index``
- Lang1/Lang2 (preferred) or Lang1/Lang1
-
-Return Value
+RETURN VALUE
============
On success 0 is returned, on error -1 and the ``errno`` variable is set
ioctl VIDIOC_LOG_STATUS
***********************
-*man VIDIOC_LOG_STATUS(2)*
+NAME
+====
-Log driver status information
+VIDIOC_LOG_STATUS - Log driver status information
-
-Synopsis
+SYNOPSIS
========
.. cpp:function:: int ioctl( int fd, int request )
-Description
+
+ARGUMENTS
+=========
+
+
+
+DESCRIPTION
===========
As the video/audio devices become more complicated it becomes harder to
in Linux 2.6.15.
-Return Value
+RETURN VALUE
============
On success 0 is returned, on error -1 and the ``errno`` variable is set
ioctl VIDIOC_OVERLAY
********************
-*man VIDIOC_OVERLAY(2)*
+NAME
+====
-Start or stop video overlay
+VIDIOC_OVERLAY - Start or stop video overlay
-
-Synopsis
+SYNOPSIS
========
.. cpp:function:: int ioctl( int fd, int request, const int *argp )
-Arguments
+
+ARGUMENTS
=========
``fd``
``argp``
-Description
+DESCRIPTION
===========
This ioctl is part of the :ref:`video overlay <overlay>` I/O method.
``V4L2_BUF_TYPE_VIDEO_OVERLAY``.
-Return Value
+RETURN VALUE
============
On success 0 is returned, on error -1 and the ``errno`` variable is set
ioctl VIDIOC_PREPARE_BUF
************************
-*man VIDIOC_PREPARE_BUF(2)*
+NAME
+====
-Prepare a buffer for I/O
+VIDIOC_PREPARE_BUF - Prepare a buffer for I/O
-
-Synopsis
+SYNOPSIS
========
.. cpp:function:: int ioctl( int fd, int request, struct v4l2_buffer *argp )
-Arguments
+
+ARGUMENTS
=========
``fd``
``argp``
-Description
+DESCRIPTION
===========
Applications can optionally call the :ref:`VIDIOC_PREPARE_BUF` ioctl to
:ref:`buffer`.
-Return Value
+RETURN VALUE
============
On success 0 is returned, on error -1 and the ``errno`` variable is set
ioctl VIDIOC_QBUF, VIDIOC_DQBUF
*******************************
-*man VIDIOC_QBUF(2)*
+NAME
+====
-VIDIOC_DQBUF
-Exchange a buffer with the driver
+VIDIOC_QBUF - VIDIOC_DQBUF - Exchange a buffer with the driver
-
-Synopsis
+SYNOPSIS
========
.. cpp:function:: int ioctl( int fd, int request, struct v4l2_buffer *argp )
-Arguments
+
+ARGUMENTS
=========
``fd``
``argp``
-Description
+DESCRIPTION
===========
Applications call the ``VIDIOC_QBUF`` ioctl to enqueue an empty
:ref:`buffer`.
-Return Value
+RETURN VALUE
============
On success 0 is returned, on error -1 and the ``errno`` variable is set
ioctl VIDIOC_QUERY_DV_TIMINGS
*****************************
-*man VIDIOC_QUERY_DV_TIMINGS(2)*
+NAME
+====
-VIDIOC_SUBDEV_QUERY_DV_TIMINGS
-Sense the DV preset received by the current input
+VIDIOC_QUERY_DV_TIMINGS - VIDIOC_SUBDEV_QUERY_DV_TIMINGS - Sense the DV preset received by the current input
-
-Synopsis
+SYNOPSIS
========
.. cpp:function:: int ioctl( int fd, int request, struct v4l2_dv_timings *argp )
-Arguments
+
+ARGUMENTS
=========
``fd``
``argp``
-Description
+DESCRIPTION
===========
The hardware may be able to detect the current DV timings automatically,
precise feedback to the user.
-Return Value
+RETURN VALUE
============
On success 0 is returned, on error -1 and the ``errno`` variable is set
ioctl VIDIOC_QUERYBUF
*********************
-*man VIDIOC_QUERYBUF(2)*
+NAME
+====
-Query the status of a buffer
+VIDIOC_QUERYBUF - Query the status of a buffer
-
-Synopsis
+SYNOPSIS
========
.. cpp:function:: int ioctl( int fd, int request, struct v4l2_buffer *argp )
-Arguments
+
+ARGUMENTS
=========
``fd``
``argp``
-Description
+DESCRIPTION
===========
This ioctl is part of the :ref:`streaming <mmap>` I/O method. It can
:ref:`buffer`.
-Return Value
+RETURN VALUE
============
On success 0 is returned, on error -1 and the ``errno`` variable is set
ioctl VIDIOC_QUERYCAP
*********************
-*man VIDIOC_QUERYCAP(2)*
+NAME
+====
-Query device capabilities
+VIDIOC_QUERYCAP - Query device capabilities
-
-Synopsis
+SYNOPSIS
========
.. cpp:function:: int ioctl( int fd, int request, struct v4l2_capability *argp )
-Arguments
+
+ARGUMENTS
=========
``fd``
``argp``
-Description
+DESCRIPTION
===========
All V4L2 devices support the ``VIDIOC_QUERYCAP`` ioctl. It is used to
``device_caps`` field.
-
-Return Value
+RETURN VALUE
============
On success 0 is returned, on error -1 and the ``errno`` variable is set
ioctls VIDIOC_QUERYCTRL, VIDIOC_QUERY_EXT_CTRL and VIDIOC_QUERYMENU
*******************************************************************
-*man VIDIOC_QUERYCTRL(2)*
+NAME
+====
-VIDIOC_QUERY_EXT_CTRL
-VIDIOC_QUERYMENU
-Enumerate controls and menu control items
+VIDIOC_QUERYCTRL - VIDIOC_QUERY_EXT_CTRL - VIDIOC_QUERYMENU - Enumerate controls and menu control items
-
-Synopsis
+SYNOPSIS
========
.. cpp:function:: int ioctl( int fd, int request, struct v4l2_queryctrl *argp )
.. cpp:function:: int ioctl( int fd, int request, struct v4l2_querymenu *argp )
-Arguments
+
+ARGUMENTS
=========
``fd``
``argp``
-Description
+DESCRIPTION
===========
To query the attributes of a control applications set the ``id`` field
``V4L2_CTRL_TYPE_BUTTON`` have this flag set.
-
-Return Value
+RETURN VALUE
============
On success 0 is returned, on error -1 and the ``errno`` variable is set
ioctl VIDIOC_QUERYSTD
*********************
-*man VIDIOC_QUERYSTD(2)*
+NAME
+====
-Sense the video standard received by the current input
+VIDIOC_QUERYSTD - Sense the video standard received by the current input
-
-Synopsis
+SYNOPSIS
========
.. cpp:function:: int ioctl( int fd, int request, v4l2_std_id *argp )
-Arguments
+
+ARGUMENTS
=========
``fd``
``argp``
-Description
+DESCRIPTION
===========
The hardware may be able to detect the current video standard
standard, allocate new buffers and start streaming again.
-Return Value
+RETURN VALUE
============
On success 0 is returned, on error -1 and the ``errno`` variable is set
ioctl VIDIOC_REQBUFS
********************
-*man VIDIOC_REQBUFS(2)*
+NAME
+====
-Initiate Memory Mapping or User Pointer I/O
+VIDIOC_REQBUFS - Initiate Memory Mapping or User Pointer I/O
-
-Synopsis
+SYNOPSIS
========
.. cpp:function:: int ioctl( int fd, int request, struct v4l2_requestbuffers *argp )
-Arguments
+
+ARGUMENTS
=========
``fd``
``argp``
-Description
+DESCRIPTION
===========
This ioctl is used to initiate :ref:`memory mapped <mmap>`,
must set the array to zero.
-
-Return Value
+RETURN VALUE
============
On success 0 is returned, on error -1 and the ``errno`` variable is set
ioctl VIDIOC_S_HW_FREQ_SEEK
***************************
-*man VIDIOC_S_HW_FREQ_SEEK(2)*
+NAME
+====
-Perform a hardware frequency seek
+VIDIOC_S_HW_FREQ_SEEK - Perform a hardware frequency seek
-
-Synopsis
+SYNOPSIS
========
.. cpp:function:: int ioctl( int fd, int request, struct v4l2_hw_freq_seek *argp )
-Arguments
+
+ARGUMENTS
=========
``fd``
``argp``
-Description
+DESCRIPTION
===========
Start a hardware frequency seek from the current frequency. To do this
zero.
-
-Return Value
+RETURN VALUE
============
On success 0 is returned, on error -1 and the ``errno`` variable is set
ioctl VIDIOC_STREAMON, VIDIOC_STREAMOFF
***************************************
-*man VIDIOC_STREAMON(2)*
+NAME
+====
-VIDIOC_STREAMOFF
-Start or stop streaming I/O
+VIDIOC_STREAMON - VIDIOC_STREAMOFF - Start or stop streaming I/O
-
-Synopsis
+SYNOPSIS
========
.. cpp:function:: int ioctl( int fd, int request, const int *argp )
-Arguments
+
+ARGUMENTS
=========
``fd``
``argp``
-Description
+DESCRIPTION
===========
The ``VIDIOC_STREAMON`` and ``VIDIOC_STREAMOFF`` ioctl start and stop
to synchronize with other events.
-Return Value
+RETURN VALUE
============
On success 0 is returned, on error -1 and the ``errno`` variable is set
ioctl VIDIOC_SUBDEV_ENUM_FRAME_INTERVAL
***************************************
-*man VIDIOC_SUBDEV_ENUM_FRAME_INTERVAL(2)*
+NAME
+====
-Enumerate frame intervals
+VIDIOC_SUBDEV_ENUM_FRAME_INTERVAL - Enumerate frame intervals
-
-Synopsis
+SYNOPSIS
========
.. cpp:function:: int ioctl( int fd, int request, struct v4l2_subdev_frame_interval_enum * argp )
-Arguments
+
+ARGUMENTS
=========
``fd``
``argp``
-Description
+DESCRIPTION
===========
This ioctl lets applications enumerate available frame intervals on a
the array to zero.
-
-Return Value
+RETURN VALUE
============
On success 0 is returned, on error -1 and the ``errno`` variable is set
ioctl VIDIOC_SUBDEV_ENUM_FRAME_SIZE
***********************************
-*man VIDIOC_SUBDEV_ENUM_FRAME_SIZE(2)*
+NAME
+====
-Enumerate media bus frame sizes
+VIDIOC_SUBDEV_ENUM_FRAME_SIZE - Enumerate media bus frame sizes
-
-Synopsis
+SYNOPSIS
========
.. cpp:function:: int ioctl( int fd, int request, struct v4l2_subdev_frame_size_enum * argp )
-Arguments
+
+ARGUMENTS
=========
``fd``
``argp``
-Description
+DESCRIPTION
===========
This ioctl allows applications to enumerate all frame sizes supported by
the array to zero.
-
-Return Value
+RETURN VALUE
============
On success 0 is returned, on error -1 and the ``errno`` variable is set
ioctl VIDIOC_SUBDEV_ENUM_MBUS_CODE
**********************************
-*man VIDIOC_SUBDEV_ENUM_MBUS_CODE(2)*
+NAME
+====
-Enumerate media bus formats
+VIDIOC_SUBDEV_ENUM_MBUS_CODE - Enumerate media bus formats
-
-Synopsis
+SYNOPSIS
========
.. cpp:function:: int ioctl( int fd, int request, struct v4l2_subdev_mbus_code_enum * argp )
-Arguments
+
+ARGUMENTS
=========
``fd``
``argp``
-Description
+DESCRIPTION
===========
To enumerate media bus formats available at a given sub-device pad
the array to zero.
-
-Return Value
+RETURN VALUE
============
On success 0 is returned, on error -1 and the ``errno`` variable is set
ioctl VIDIOC_SUBDEV_G_CROP, VIDIOC_SUBDEV_S_CROP
************************************************
-*man VIDIOC_SUBDEV_G_CROP(2)*
+NAME
+====
-VIDIOC_SUBDEV_S_CROP
-Get or set the crop rectangle on a subdev pad
+VIDIOC_SUBDEV_G_CROP - VIDIOC_SUBDEV_S_CROP - Get or set the crop rectangle on a subdev pad
-
-Synopsis
+SYNOPSIS
========
.. cpp:function:: int ioctl( int fd, int request, struct v4l2_subdev_crop *argp )
.. cpp:function:: int ioctl( int fd, int request, const struct v4l2_subdev_crop *argp )
-Arguments
+
+ARGUMENTS
=========
``fd``
``argp``
-Description
+DESCRIPTION
===========
**Note**
the array to zero.
-
-Return Value
+RETURN VALUE
============
On success 0 is returned, on error -1 and the ``errno`` variable is set
ioctl VIDIOC_SUBDEV_G_FMT, VIDIOC_SUBDEV_S_FMT
**********************************************
-*man VIDIOC_SUBDEV_G_FMT(2)*
+NAME
+====
-VIDIOC_SUBDEV_S_FMT
-Get or set the data format on a subdev pad
+VIDIOC_SUBDEV_G_FMT - VIDIOC_SUBDEV_S_FMT - Get or set the data format on a subdev pad
-
-Synopsis
+SYNOPSIS
========
.. cpp:function:: int ioctl( int fd, int request, struct v4l2_subdev_format *argp )
-Arguments
+
+ARGUMENTS
=========
``fd``
``argp``
-Description
+DESCRIPTION
===========
These ioctls are used to negotiate the frame format at specific subdev
- Active formats, applied to the hardware.
-
-Return Value
+RETURN VALUE
============
On success 0 is returned, on error -1 and the ``errno`` variable is set
references a non-existing format.
-Return Value
============
On success 0 is returned, on error -1 and the ``errno`` variable is set
ioctl VIDIOC_SUBDEV_G_FRAME_INTERVAL, VIDIOC_SUBDEV_S_FRAME_INTERVAL
********************************************************************
-*man VIDIOC_SUBDEV_G_FRAME_INTERVAL(2)*
+NAME
+====
-VIDIOC_SUBDEV_S_FRAME_INTERVAL
-Get or set the frame interval on a subdev pad
+VIDIOC_SUBDEV_G_FRAME_INTERVAL - VIDIOC_SUBDEV_S_FRAME_INTERVAL - Get or set the frame interval on a subdev pad
-
-Synopsis
+SYNOPSIS
========
.. cpp:function:: int ioctl( int fd, int request, struct v4l2_subdev_frame_interval *argp )
-Arguments
+
+ARGUMENTS
=========
``fd``
``argp``
-Description
+DESCRIPTION
===========
These ioctls are used to get and set the frame interval at specific
the array to zero.
-
-Return Value
+RETURN VALUE
============
On success 0 is returned, on error -1 and the ``errno`` variable is set
ioctl VIDIOC_SUBDEV_G_SELECTION, VIDIOC_SUBDEV_S_SELECTION
**********************************************************
-*man VIDIOC_SUBDEV_G_SELECTION(2)*
+NAME
+====
-VIDIOC_SUBDEV_S_SELECTION
-Get or set selection rectangles on a subdev pad
+VIDIOC_SUBDEV_G_SELECTION - VIDIOC_SUBDEV_S_SELECTION - Get or set selection rectangles on a subdev pad
-
-Synopsis
+SYNOPSIS
========
.. cpp:function:: int ioctl( int fd, int request, struct v4l2_subdev_selection *argp )
-Arguments
+
+ARGUMENTS
=========
``fd``
``argp``
-Description
+DESCRIPTION
===========
The selections are used to configure various image processing
the array to zero.
-
-Return Value
+RETURN VALUE
============
On success 0 is returned, on error -1 and the ``errno`` variable is set
ioctl VIDIOC_SUBSCRIBE_EVENT, VIDIOC_UNSUBSCRIBE_EVENT
******************************************************
-*man VIDIOC_SUBSCRIBE_EVENT(2)*
+NAME
+====
-VIDIOC_UNSUBSCRIBE_EVENT
-Subscribe or unsubscribe event
+VIDIOC_SUBSCRIBE_EVENT - VIDIOC_UNSUBSCRIBE_EVENT - Subscribe or unsubscribe event
-
-Synopsis
+SYNOPSIS
========
.. cpp:function:: int ioctl( int fd, int request, struct v4l2_event_subscription *argp )
-Arguments
+
+ARGUMENTS
=========
``fd``
``argp``
-Description
+DESCRIPTION
===========
Subscribe or unsubscribe V4L2 event. Subscribed events are dequeued by
situations like that.
-
-Return Value
+RETURN VALUE
============
On success 0 is returned, on error -1 and the ``errno`` variable is set