Merge tag 'media/v5.14-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media

Pull media updates from Mauro Carvalho Chehab:

 - V4L2 core control API was split into separate files

 - New RC maps: tango and tc-90405

 - Hantro driver got support for G2/HEVC decoder

 - av7710 is moving to staging, together with some legacy APIs

 - several cleanups related to compat_ioctl32 code

 - Move the MPEG-2 stateless control type out of staging

 - Address several issues with RPM get logic on media drivers

 - Lots of cleanups, bug fixes and improvements.

* tag 'media/v5.14-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (394 commits)
  media: s5p-mfc: Fix display delay control creation
  media: mtk-vpu: on suspend, read/write regs only if vpu is running
  media: video-mux: Skip dangling endpoints
  media: Fix Media Controller API config checks
  media: i2c: rdacm20: Re-work ov10635 reset
  media: i2c: rdacm20: Check return values
  media: i2c: rdacm20: Report camera module name
  media: i2c: rdacm20: Enable noise immunity
  media: i2c: rdacm20: Embed 'serializer' field
  media: i2c: rdacm21: Power up OV10640 before OV490
  media: i2c: rdacm21: Fix OV10640 powerup
  media: i2c: rdacm21: Add delay after OV490 reset
  media: i2c: max9271: Introduce wake_up() function
  media: i2c: max9271: Check max9271_write() return
  media: i2c: max9286: Rework comments in .bound()
  media: i2c: max9286: Define high channel amplitude
  media: i2c: max9286: Cache channel amplitude
  media: i2c: max9286: Rename reverse_channel_mv
  media: i2c: max9286: Adjust parameters indent
  media: hantro: add support for Rockchip RK3036
  ...
This commit is contained in:
Linus Torvalds
2021-06-28 15:49:58 -07:00
556 changed files with 19192 additions and 14777 deletions

View File

@@ -7,8 +7,8 @@ PARSER = $(srctree)/Documentation/sphinx/parse-headers.pl
UAPI = $(srctree)/include/uapi/linux
KAPI = $(srctree)/include/linux
FILES = audio.h.rst ca.h.rst dmx.h.rst frontend.h.rst net.h.rst video.h.rst \
videodev2.h.rst media.h.rst cec.h.rst lirc.h.rst
FILES = ca.h.rst dmx.h.rst frontend.h.rst net.h.rst \
videodev2.h.rst media.h.rst cec.h.rst lirc.h.rst
TARGETS := $(addprefix $(BUILDDIR)/, $(FILES))
@@ -21,9 +21,6 @@ quiet_gen_rst = echo ' PARSE $(patsubst $(srctree)/%,%,$<)'; \
silent_gen_rst = ${gen_rst}
$(BUILDDIR)/audio.h.rst: ${UAPI}/dvb/audio.h ${PARSER} $(SRC_DIR)/audio.h.rst.exceptions
@$($(quiet)gen_rst)
$(BUILDDIR)/ca.h.rst: ${UAPI}/dvb/ca.h ${PARSER} $(SRC_DIR)/ca.h.rst.exceptions
@$($(quiet)gen_rst)
@@ -36,9 +33,6 @@ $(BUILDDIR)/frontend.h.rst: ${UAPI}/dvb/frontend.h ${PARSER} $(SRC_DIR)/frontend
$(BUILDDIR)/net.h.rst: ${UAPI}/dvb/net.h ${PARSER} $(SRC_DIR)/net.h.rst.exceptions
@$($(quiet)gen_rst)
$(BUILDDIR)/video.h.rst: ${UAPI}/dvb/video.h ${PARSER} $(SRC_DIR)/video.h.rst.exceptions
@$($(quiet)gen_rst)
$(BUILDDIR)/videodev2.h.rst: ${UAPI}/videodev2.h ${PARSER} $(SRC_DIR)/videodev2.h.rst.exceptions
@$($(quiet)gen_rst)

View File

@@ -1,19 +0,0 @@
# SPDX-License-Identifier: GPL-2.0
# Ignore header name
ignore define _DVBAUDIO_H_
# Undocumented audio caps, as this is a deprecated API anyway
ignore define AUDIO_CAP_DTS
ignore define AUDIO_CAP_LPCM
ignore define AUDIO_CAP_MP1
ignore define AUDIO_CAP_MP2
ignore define AUDIO_CAP_MP3
ignore define AUDIO_CAP_AAC
ignore define AUDIO_CAP_OGG
ignore define AUDIO_CAP_SDDS
ignore define AUDIO_CAP_AC3
# some typedefs should point to struct/enums
replace typedef audio_mixer_t :c:type:`audio_mixer`
replace typedef audio_status_t :c:type:`audio_status`

View File

@@ -0,0 +1,19 @@
.. SPDX-License-Identifier: GPL-2.0
Hantro video decoder driver
===========================
The Hantro video decoder driver implements the following driver-specific controls:
``V4L2_CID_HANTRO_HEVC_SLICE_HEADER_SKIP (integer)``
Specifies to Hantro HEVC video decoder driver the number of data (in bits) to
skip in the slice segment header.
If non-IDR, the bits to be skipped go from syntax element "pic_output_flag"
to before syntax element "slice_temporal_mvp_enabled_flag".
If IDR, the skipped bits are just "pic_output_flag"
(separate_colour_plane_flag is not supported).
.. note::
This control is not yet part of the public kernel API and
it is expected to change.

View File

@@ -33,6 +33,7 @@ For more details see the file COPYING in the source distribution of Linux.
ccs
cx2341x-uapi
hantro
imx-uapi
max2175
meye-uapi

View File

@@ -1,58 +0,0 @@
.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
.. c:namespace:: DTV.audio
.. _AUDIO_BILINGUAL_CHANNEL_SELECT:
==============================
AUDIO_BILINGUAL_CHANNEL_SELECT
==============================
Name
----
AUDIO_BILINGUAL_CHANNEL_SELECT
.. attention:: This ioctl is deprecated
Synopsis
--------
.. c:macro:: AUDIO_BILINGUAL_CHANNEL_SELECT
``int ioctl(int fd, AUDIO_BILINGUAL_CHANNEL_SELECT, struct audio_channel_select *select)``
Arguments
---------
.. flat-table::
:header-rows: 0
:stub-columns: 0
-
- int fd
- File descriptor returned by a previous call to open().
-
- audio_channel_select_t ch
- Select the output format of the audio (mono left/right, stereo).
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.

View File

@@ -1,57 +0,0 @@
.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
.. c:namespace:: DTV.audio
.. _AUDIO_CHANNEL_SELECT:
====================
AUDIO_CHANNEL_SELECT
====================
Name
----
AUDIO_CHANNEL_SELECT
.. attention:: This ioctl is deprecated
Synopsis
--------
.. c:macro:: AUDIO_CHANNEL_SELECT
``int ioctl(int fd, AUDIO_CHANNEL_SELECT, struct audio_channel_select *select)``
Arguments
---------
.. flat-table::
:header-rows: 0
:stub-columns: 0
-
- int fd
- File descriptor returned by a previous call to open().
-
- audio_channel_select_t ch
- Select the output format of the audio (mono left/right, stereo).
Description
-----------
This ioctl is for Digital TV 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.

View File

@@ -1,48 +0,0 @@
.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
.. c:namespace:: DTV.audio
.. _AUDIO_CLEAR_BUFFER:
==================
AUDIO_CLEAR_BUFFER
==================
Name
----
AUDIO_CLEAR_BUFFER
.. attention:: This ioctl is deprecated
Synopsis
--------
.. c:macro:: AUDIO_CLEAR_BUFFER
``int ioctl(int fd, AUDIO_CLEAR_BUFFER)``
Arguments
---------
.. flat-table::
:header-rows: 0
:stub-columns: 0
- .. row 1
- int fd
- File descriptor returned by a previous call to open().
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.

View File

@@ -1,48 +0,0 @@
.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
.. c:namespace:: DTV.audio
.. _AUDIO_CONTINUE:
==============
AUDIO_CONTINUE
==============
Name
----
AUDIO_CONTINUE
.. attention:: This ioctl is deprecated
Synopsis
--------
.. c:macro:: AUDIO_CONTINUE
``int ioctl(int fd, AUDIO_CONTINUE)``
Arguments
---------
.. flat-table::
:header-rows: 0
:stub-columns: 0
- .. row 1
- int fd
- File descriptor returned by a previous call to open().
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.

View File

@@ -1,51 +0,0 @@
.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
.. c:namespace:: DTV.audio
.. _audio_fclose:
========================
Digital TV audio close()
========================
Name
----
Digital TV audio close()
.. attention:: This ioctl is deprecated
Synopsis
--------
.. c:function:: int close(int fd)
Arguments
---------
.. flat-table::
:header-rows: 0
:stub-columns: 0
- .. row 1
- int fd
- File descriptor returned by a previous call to open().
Description
-----------
This system call closes a previously opened audio device.
Return Value
------------
.. flat-table::
:header-rows: 0
:stub-columns: 0
- .. row 1
- ``EBADF``
- fd is not a valid open file descriptor.

View File

@@ -1,103 +0,0 @@
.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
.. c:namespace:: DTV.audio
.. _audio_fopen:
=======================
Digital TV audio open()
=======================
Name
----
Digital TV audio open()
.. attention:: This ioctl is deprecated
Synopsis
--------
.. c:function:: int open(const char *deviceName, int flags)
Arguments
---------
.. flat-table::
:header-rows: 0
:stub-columns: 0
- .. row 1
- const char \*deviceName
- Name of specific audio device.
- .. row 2
- int flags
- A bit-wise OR of the following flags:
- .. row 3
-
- O_RDONLY read-only access
- .. row 4
-
- O_RDWR read/write access
- .. row 5
-
- O_NONBLOCK open in non-blocking mode
- .. row 6
-
- (blocking mode is the default)
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
------------
.. tabularcolumns:: |p{2.5cm}|p{15.0cm}|
.. flat-table::
:header-rows: 0
:stub-columns: 0
- .. row 1
- ``ENODEV``
- Device driver not loaded/available.
- .. row 2
- ``EBUSY``
- Device or resource busy.
- .. row 3
- ``EINVAL``
- Invalid argument.

View File

@@ -1,79 +0,0 @@
.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
.. c:namespace:: DTV.audio
.. _audio_fwrite:
=========================
Digital TV audio write()
=========================
Name
----
Digital TV audio write()
.. attention:: This ioctl is deprecated
Synopsis
--------
.. c:function:: size_t write(int fd, const void *buf, size_t count)
Arguments
---------
.. flat-table::
:header-rows: 0
:stub-columns: 0
- .. row 1
- int fd
- File descriptor returned by a previous call to open().
- .. row 2
- void \*buf
- Pointer to the buffer containing the PES data.
- .. row 3
- size_t count
- Size of buf.
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
- .. row 1
- ``EPERM``
- Mode AUDIO_SOURCE_MEMORY not selected.
- .. row 2
- ``ENOMEM``
- Attempted to write more data than the internal buffer can hold.
- .. row 3
- ``EBADF``
- fd is not a valid open file descriptor.

View File

@@ -1,54 +0,0 @@
.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
.. c:namespace:: DTV.audio
.. _AUDIO_GET_CAPABILITIES:
======================
AUDIO_GET_CAPABILITIES
======================
Name
----
AUDIO_GET_CAPABILITIES
.. attention:: This ioctl is deprecated
Synopsis
--------
.. c:macro:: AUDIO_GET_CAPABILITIES
``int ioctl(int fd, AUDIO_GET_CAPABILITIES, unsigned int *cap)``
Arguments
---------
.. flat-table::
:header-rows: 0
:stub-columns: 0
-
- int fd
- File descriptor returned by a previous call to open().
-
- unsigned int \*cap
- Returns a bit array of supported sound formats.
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.

View File

@@ -1,54 +0,0 @@
.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
.. c:namespace:: DTV.audio
.. _AUDIO_GET_STATUS:
================
AUDIO_GET_STATUS
================
Name
----
AUDIO_GET_STATUS
.. attention:: This ioctl is deprecated
Synopsis
--------
.. c:macro:: AUDIO_GET_STATUS
``int ioctl(int fd, AUDIO_GET_STATUS, struct audio_status *status)``
Arguments
---------
.. flat-table::
:header-rows: 0
:stub-columns: 0
-
- int fd
- File descriptor returned by a previous call to open().
-
- struct audio_status \*status
- Returns the current state of Audio Device.
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.

View File

@@ -1,49 +0,0 @@
.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
.. c:namespace:: DTV.audio
.. _AUDIO_PAUSE:
===========
AUDIO_PAUSE
===========
Name
----
AUDIO_PAUSE
.. attention:: This ioctl is deprecated
Synopsis
--------
.. c:macro:: AUDIO_PAUSE
``int ioctl(int fd, AUDIO_PAUSE)``
Arguments
---------
.. flat-table::
:header-rows: 0
:stub-columns: 0
- .. row 1
- int fd
- File descriptor returned by a previous call to open().
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.

View File

@@ -1,48 +0,0 @@
.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
.. c:namespace:: DTV.audio
.. _AUDIO_PLAY:
==========
AUDIO_PLAY
==========
Name
----
AUDIO_PLAY
.. attention:: This ioctl is deprecated
Synopsis
--------
.. c:macro:: AUDIO_PLAY
``int ioctl(int fd, AUDIO_PLAY)``
Arguments
---------
.. flat-table::
:header-rows: 0
:stub-columns: 0
- .. row 1
- int fd
- File descriptor returned by a previous call to open().
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.

View File

@@ -1,56 +0,0 @@
.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
.. c:namespace:: DTV.audio
.. _AUDIO_SELECT_SOURCE:
===================
AUDIO_SELECT_SOURCE
===================
Name
----
AUDIO_SELECT_SOURCE
.. attention:: This ioctl is deprecated
Synopsis
--------
.. c:macro:: AUDIO_SELECT_SOURCE
``int ioctl(int fd, AUDIO_SELECT_SOURCE, struct audio_stream_source *source)``
Arguments
---------
.. flat-table::
:header-rows: 0
:stub-columns: 0
-
- int fd
- File descriptor returned by a previous call to open().
-
- audio_stream_source_t source
- Indicates the source that shall be used for the Audio stream.
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.

View File

@@ -1,58 +0,0 @@
.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
.. c:namespace:: DTV.audio
.. _AUDIO_SET_AV_SYNC:
=================
AUDIO_SET_AV_SYNC
=================
Name
----
AUDIO_SET_AV_SYNC
.. attention:: This ioctl is deprecated
Synopsis
--------
.. c:macro:: AUDIO_SET_AV_SYNC
``int ioctl(int fd, AUDIO_SET_AV_SYNC, boolean state)``
Arguments
---------
.. flat-table::
:header-rows: 0
:stub-columns: 0
-
- int fd
- File descriptor returned by a previous call to open().
-
- boolean state
- Tells the Digital TV subsystem if A/V synchronization shall be ON or OFF.
TRUE: AV-sync ON
FALSE: AV-sync OFF
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.

View File

@@ -1,62 +0,0 @@
.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
.. c:namespace:: DTV.audio
.. _AUDIO_SET_BYPASS_MODE:
=====================
AUDIO_SET_BYPASS_MODE
=====================
Name
----
AUDIO_SET_BYPASS_MODE
.. attention:: This ioctl is deprecated
Synopsis
--------
.. c:macro:: AUDIO_SET_BYPASS_MODE
``int ioctl(int fd, AUDIO_SET_BYPASS_MODE, boolean mode)``
Arguments
---------
.. flat-table::
:header-rows: 0
:stub-columns: 0
-
- int fd
- File descriptor returned by a previous call to open().
-
- boolean mode
- Enables or disables the decoding of the current Audio stream in
the Digital TV subsystem.
TRUE: Bypass is disabled
FALSE: Bypass is enabled
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 cant be handled by the Digital TV system shall be decoded. Dolby
DigitalTM streams are automatically forwarded by the Digital TV 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.

View File

@@ -1,59 +0,0 @@
.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
.. c:namespace:: DTV.audio
.. _AUDIO_SET_ID:
============
AUDIO_SET_ID
============
Name
----
AUDIO_SET_ID
.. attention:: This ioctl is deprecated
Synopsis
--------
.. c:macro:: AUDIO_SET_ID
``int ioctl(int fd, AUDIO_SET_ID, int id)``
Arguments
---------
.. flat-table::
:header-rows: 0
:stub-columns: 0
-
- int fd
- File descriptor returned by a previous call to open().
-
- int id
- audio sub-stream id
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.

View File

@@ -1,53 +0,0 @@
.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
.. c:namespace:: DTV.audio
.. _AUDIO_SET_MIXER:
===============
AUDIO_SET_MIXER
===============
Name
----
AUDIO_SET_MIXER
.. attention:: This ioctl is deprecated
Synopsis
--------
.. c:macro:: AUDIO_SET_MIXER
``int ioctl(int fd, AUDIO_SET_MIXER, struct audio_mixer *mix)``
Arguments
---------
.. flat-table::
:header-rows: 0
:stub-columns: 0
-
- int fd
- File descriptor returned by a previous call to open().
-
- audio_mixer_t \*mix
- mixer settings.
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.

View File

@@ -1,62 +0,0 @@
.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
.. c:namespace:: DTV.audio
.. _AUDIO_SET_MUTE:
==============
AUDIO_SET_MUTE
==============
Name
----
AUDIO_SET_MUTE
.. attention:: This ioctl is deprecated
Synopsis
--------
.. c:macro:: AUDIO_SET_MUTE
``int ioctl(int fd, AUDIO_SET_MUTE, boolean state)``
Arguments
---------
.. flat-table::
:header-rows: 0
:stub-columns: 0
-
- int fd
- File descriptor returned by a previous call to open().
-
- boolean state
- Indicates if audio device shall mute or not.
TRUE: Audio Mute
FALSE: Audio Un-mute
Description
-----------
This ioctl is for Digital TV 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.

View File

@@ -1,66 +0,0 @@
.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
.. c:namespace:: DTV.audio
.. _AUDIO_SET_STREAMTYPE:
====================
AUDIO_SET_STREAMTYPE
====================
Name
----
AUDIO_SET_STREAMTYPE
.. attention:: This ioctl is deprecated
Synopsis
--------
.. c:macro:: AUDIO_SET_STREAMTYPE
``int ioctl(fd, AUDIO_SET_STREAMTYPE, int type)``
Arguments
---------
.. flat-table::
:header-rows: 0
:stub-columns: 0
-
- int fd
- File descriptor returned by a previous call to open().
-
- int type
- stream type
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
appropriately. The generic error codes are described at the
:ref:`Generic Error Codes <gen-errors>` chapter.
.. flat-table::
:header-rows: 0
:stub-columns: 0
- .. row 1
- ``EINVAL``
- type is not a valid or supported stream type.

View File

@@ -1,48 +0,0 @@
.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
.. c:namespace:: DTV.audio
.. _AUDIO_STOP:
==========
AUDIO_STOP
==========
Name
----
AUDIO_STOP
.. attention:: This ioctl is deprecated
Synopsis
--------
.. c:macro:: AUDIO_STOP
``int ioctl(int fd, AUDIO_STOP)``
Arguments
---------
.. flat-table::
:header-rows: 0
:stub-columns: 0
- .. row 1
- int fd
- File descriptor returned by a previous call to open().
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.

View File

@@ -1,27 +0,0 @@
.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
.. _dvb_audio:
#######################
Digital TV Audio Device
#######################
The Digital TV audio device controls the MPEG2 audio decoder of the Digital
TV hardware. It can be accessed through ``/dev/dvb/adapter?/audio?``. Data
types and ioctl definitions can be accessed by including
``linux/dvb/audio.h`` in your application.
Please note that some Digital TV cards dont have their own MPEG decoder, which
results in the omission of the audio and video device.
These ioctls were also used by V4L2 to control MPEG decoders implemented
in V4L2. The use of these ioctls for that purpose has been made obsolete
and proper V4L2 ioctls or controls have been created to replace that
functionality.
.. toctree::
:maxdepth: 1
audio_data_types
audio_function_calls

View File

@@ -1,116 +0,0 @@
.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
.. _audio_data_types:
****************
Audio Data Types
****************
This section describes the structures, data types and defines used when
talking to the audio device.
.. c:type:: audio_stream_source
The audio stream source is set through the AUDIO_SELECT_SOURCE call
and can take the following values, depending on whether we are replaying
from an internal (demux) or external (user write) source.
.. code-block:: c
typedef enum {
AUDIO_SOURCE_DEMUX,
AUDIO_SOURCE_MEMORY
} audio_stream_source_t;
AUDIO_SOURCE_DEMUX selects the demultiplexer (fed either by the
frontend or the DVR device) as the source of the video stream. If
AUDIO_SOURCE_MEMORY is selected the stream comes from the application
through the ``write()`` system call.
.. c:type:: audio_play_state
The following values can be returned by the AUDIO_GET_STATUS call
representing the state of audio playback.
.. code-block:: c
typedef enum {
AUDIO_STOPPED,
AUDIO_PLAYING,
AUDIO_PAUSED
} audio_play_state_t;
.. c:type:: audio_channel_select
The audio channel selected via AUDIO_CHANNEL_SELECT is determined by
the following values.
.. code-block:: c
typedef enum {
AUDIO_STEREO,
AUDIO_MONO_LEFT,
AUDIO_MONO_RIGHT,
AUDIO_MONO,
AUDIO_STEREO_SWAPPED
} audio_channel_select_t;
.. c:type:: audio_status
The AUDIO_GET_STATUS call returns the following structure informing
about various states of the playback operation.
.. code-block:: c
typedef struct audio_status {
boolean AV_sync_state;
boolean mute_state;
audio_play_state_t play_state;
audio_stream_source_t stream_source;
audio_channel_select_t channel_select;
boolean bypass_mode;
audio_mixer_t mixer_state;
} audio_status_t;
.. c:type:: audio_mixer
The following structure is used by the AUDIO_SET_MIXER call to set the
audio volume.
.. code-block:: c
typedef struct audio_mixer {
unsigned int volume_left;
unsigned int volume_right;
} audio_mixer_t;
.. _audio_encodings:
audio encodings
===============
A call to AUDIO_GET_CAPABILITIES returns an unsigned integer with the
following bits set according to the hardwares capabilities.
.. code-block:: c
#define AUDIO_CAP_DTS 1
#define AUDIO_CAP_LPCM 2
#define AUDIO_CAP_MP1 4
#define AUDIO_CAP_MP2 8
#define AUDIO_CAP_MP3 16
#define AUDIO_CAP_AAC 32
#define AUDIO_CAP_OGG 64
#define AUDIO_CAP_SDDS 128
#define AUDIO_CAP_AC3 256

View File

@@ -1,30 +0,0 @@
.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
.. _audio_function_calls:
********************
Audio Function Calls
********************
.. toctree::
:maxdepth: 1
audio-fopen
audio-fclose
audio-fwrite
audio-stop
audio-play
audio-pause
audio-continue
audio-select-source
audio-set-mute
audio-set-av-sync
audio-set-bypass-mode
audio-channel-select
audio-bilingual-channel-select
audio-get-status
audio-get-capabilities
audio-clear-buffer
audio-set-id
audio-set-mixer
audio-set-streamtype

View File

@@ -82,7 +82,7 @@ appropriately.
:widths: 1 16
- - ``EMFILE``
- Too many open files, i.e. no more filters available.
- "Too many open files", i.e. no more filters available.
The generic error codes are described at the
:ref:`Generic Error Codes <gen-errors>` chapter.

View File

@@ -34,7 +34,7 @@ Description
This system call returns filtered data, which might be section or Packetized
Elementary Stream (PES) data. The filtered data is transferred from
the drivers internal circular buffer to ``buf``. The maximum amount of data
the driver's internal circular buffer to ``buf``. The maximum amount of data
to be transferred is implied by count.
.. note::

View File

@@ -37,7 +37,7 @@ 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
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
:ref:`DMX_START` ioctl call). If a filter was previously set-up, this

View File

@@ -14,10 +14,3 @@ Digital TV uAPI headers
.. kernel-include:: $BUILDDIR/ca.h.rst
.. kernel-include:: $BUILDDIR/net.h.rst
Legacy uAPI
***********
.. kernel-include:: $BUILDDIR/audio.h.rst
.. kernel-include:: $BUILDDIR/video.h.rst

View File

@@ -107,7 +107,7 @@ Audio and video decoder
a Systems on a Chip (SoC) integrated circuit.
It may also not be needed for certain usages (e.g. for data-only
uses like internet over satellite).
uses like "internet over satellite").
:ref:`stb_components` shows a crude schematic of the control and data
flow between those components.
@@ -148,9 +148,9 @@ individual devices are called:
- ``/dev/dvb/adapterN/caM``,
where ``N`` enumerates the Digital TV cards in a system starting from 0, and
where ``N`` enumerates the Digital TV cards in a system starting from 0, and
``M`` enumerates the devices of each type within each adapter, starting
from 0, too. We will omit the ``/dev/dvb/adapterN/``\ in the further
from 0, too. We will omit the "``/dev/dvb/adapterN/``\ " in the further
discussion of these devices.
More details about the data structures and function calls of all the

View File

@@ -11,11 +11,6 @@ The APIs described here **should not** be used on new drivers or applications.
The DVBv3 frontend API has issues with new delivery systems, including
DVB-S2, DVB-T2, ISDB, etc.
There's just one driver for a very legacy hardware using the Digital TV
audio and video APIs. No modern drivers should use it. Instead, audio and
video should be using the V4L2 and ALSA APIs, and the pipelines should
be set via the Media Controller API.
.. attention::
The APIs described here doesn't necessarily reflect the current
@@ -28,5 +23,3 @@ be set via the Media Controller API.
:maxdepth: 1
frontend_legacy_dvbv3_api
video
audio

View File

@@ -1,54 +0,0 @@
.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
.. c:namespace:: DTV.video
.. _VIDEO_CLEAR_BUFFER:
==================
VIDEO_CLEAR_BUFFER
==================
Name
----
VIDEO_CLEAR_BUFFER
.. attention:: This ioctl is deprecated.
Synopsis
--------
.. c:macro:: VIDEO_CLEAR_BUFFER
``int ioctl(fd, VIDEO_CLEAR_BUFFER)``
Arguments
---------
.. flat-table::
:header-rows: 0
:stub-columns: 0
- .. row 1
- int fd
- File descriptor returned by a previous call to open().
- .. row 2
- int request
- Equals VIDEO_CLEAR_BUFFER for this command.
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.

View File

@@ -1,96 +0,0 @@
.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
.. c:namespace:: DTV.video
.. _VIDEO_COMMAND:
=============
VIDEO_COMMAND
=============
Name
----
VIDEO_COMMAND
.. attention:: This ioctl is deprecated.
Synopsis
--------
.. c:macro:: VIDEO_COMMAND
``int ioctl(int fd, VIDEO_COMMAND, struct video_command *cmd)``
Arguments
---------
.. flat-table::
:header-rows: 0
:stub-columns: 0
- .. row 1
- int fd
- File descriptor returned by a previous call to open().
- .. row 2
- int request
- Equals VIDEO_COMMAND for this command.
- .. row 3
- struct video_command \*cmd
- Commands the decoder.
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.
.. c:type:: video_command
.. code-block:: c
/* The structure must be zeroed before use by the application
This ensures it can be extended safely in the future. */
struct video_command {
__u32 cmd;
__u32 flags;
union {
struct {
__u64 pts;
} stop;
struct {
/* 0 or 1000 specifies normal speed,
1 specifies forward single stepping,
-1 specifies backward single stepping,
>1: playback at speed/1000 of the normal speed,
<-1: reverse playback at (-speed/1000) of the normal speed. */
__s32 speed;
__u32 format;
} play;
struct {
__u32 data[16];
} raw;
};
};
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.

View File

@@ -1,57 +0,0 @@
.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
.. c:namespace:: DTV.video
.. _VIDEO_CONTINUE:
==============
VIDEO_CONTINUE
==============
Name
----
VIDEO_CONTINUE
.. attention:: This ioctl is deprecated.
Synopsis
--------
.. c:macro:: VIDEO_CONTINUE
``int ioctl(fd, VIDEO_CONTINUE)``
Arguments
---------
.. flat-table::
:header-rows: 0
:stub-columns: 0
- .. row 1
- int fd
- File descriptor returned by a previous call to open().
- .. row 2
- int request
- Equals VIDEO_CONTINUE for this command.
Description
-----------
This ioctl is for Digital TV 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.

View File

@@ -1,72 +0,0 @@
.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
.. c:namespace:: DTV.video
.. _VIDEO_FAST_FORWARD:
==================
VIDEO_FAST_FORWARD
==================
Name
----
VIDEO_FAST_FORWARD
.. attention:: This ioctl is deprecated.
Synopsis
--------
.. c:macro:: VIDEO_FAST_FORWARD
``int ioctl(fd, VIDEO_FAST_FORWARD, int nFrames)``
Arguments
---------
.. flat-table::
:header-rows: 0
:stub-columns: 0
- .. row 1
- int fd
- File descriptor returned by a previous call to open().
- .. row 2
- int request
- Equals VIDEO_FAST_FORWARD for this command.
- .. row 3
- int nFrames
- The number of frames to skip.
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
appropriately. The generic error codes are described at the
:ref:`Generic Error Codes <gen-errors>` chapter.
.. flat-table::
:header-rows: 0
:stub-columns: 0
- .. row 1
- ``EPERM``
- Mode VIDEO_SOURCE_MEMORY not selected.

View File

@@ -1,51 +0,0 @@
.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
.. c:namespace:: DTV.video
.. _video_fclose:
=================
dvb video close()
=================
Name
----
dvb video close()
.. attention:: This ioctl is deprecated.
Synopsis
--------
.. c:function:: int close(int fd)
Arguments
---------
.. flat-table::
:header-rows: 0
:stub-columns: 0
- .. row 1
- int fd
- File descriptor returned by a previous call to open().
Description
-----------
This system call closes a previously opened video device.
Return Value
------------
.. flat-table::
:header-rows: 0
:stub-columns: 0
- .. row 1
- ``EBADF``
- fd is not a valid open file descriptor.

View File

@@ -1,111 +0,0 @@
.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
.. c:namespace:: DTV.video
.. _video_fopen:
================
dvb video open()
================
Name
----
dvb video open()
.. attention:: This ioctl is deprecated.
Synopsis
--------
.. c:function:: int open(const char *deviceName, int flags)
Arguments
---------
.. flat-table::
:header-rows: 0
:stub-columns: 0
- .. row 1
- const char \*deviceName
- Name of specific video device.
- .. row 2
- int flags
- A bit-wise OR of the following flags:
- .. row 3
-
- O_RDONLY read-only access
- .. row 4
-
- O_RDWR read/write access
- .. row 5
-
- O_NONBLOCK open in non-blocking mode
- .. row 6
-
- (blocking mode is the default)
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
------------
.. tabularcolumns:: |p{2.5cm}|p{15.0cm}|
.. flat-table::
:header-rows: 0
:stub-columns: 0
- .. row 1
- ``ENODEV``
- Device driver not loaded/available.
- .. row 2
- ``EINTERNAL``
- Internal error.
- .. row 3
- ``EBUSY``
- Device or resource busy.
- .. row 4
- ``EINVAL``
- Invalid argument.

View File

@@ -1,61 +0,0 @@
.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
.. c:namespace:: DTV.video
.. _VIDEO_FREEZE:
============
VIDEO_FREEZE
============
Name
----
VIDEO_FREEZE
.. attention:: This ioctl is deprecated.
Synopsis
--------
.. c:macro:: VIDEO_FREEZE
``int ioctl(fd, VIDEO_FREEZE)``
Arguments
---------
.. flat-table::
:header-rows: 0
:stub-columns: 0
- .. row 1
- int fd
- File descriptor returned by a previous call to open().
- .. row 2
- int request
- Equals VIDEO_FREEZE for this command.
Description
-----------
This ioctl is for Digital TV 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 Digital TV 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.

View File

@@ -1,79 +0,0 @@
.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
.. c:namespace:: DTV.video
.. _video_fwrite:
=================
dvb video write()
=================
Name
----
dvb video write()
.. attention:: This ioctl is deprecated.
Synopsis
--------
.. c:function:: size_t write(int fd, const void *buf, size_t count)
Arguments
---------
.. flat-table::
:header-rows: 0
:stub-columns: 0
- .. row 1
- int fd
- File descriptor returned by a previous call to open().
- .. row 2
- void \*buf
- Pointer to the buffer containing the PES data.
- .. row 3
- size_t count
- Size of buf.
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
- .. row 1
- ``EPERM``
- Mode VIDEO_SOURCE_MEMORY not selected.
- .. row 2
- ``ENOMEM``
- Attempted to write more data than the internal buffer can hold.
- .. row 3
- ``EBADF``
- fd is not a valid open file descriptor.

View File

@@ -1,61 +0,0 @@
.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
.. c:namespace:: DTV.video
.. _VIDEO_GET_CAPABILITIES:
======================
VIDEO_GET_CAPABILITIES
======================
Name
----
VIDEO_GET_CAPABILITIES
.. attention:: This ioctl is deprecated.
Synopsis
--------
.. c:macro:: VIDEO_GET_CAPABILITIES
``int ioctl(fd, VIDEO_GET_CAPABILITIES, unsigned int *cap)``
Arguments
---------
.. flat-table::
:header-rows: 0
:stub-columns: 0
- .. row 1
- int fd
- File descriptor returned by a previous call to open().
- .. row 2
- int request
- Equals VIDEO_GET_CAPABILITIES for this command.
- .. row 3
- unsigned int \*cap
- Pointer to a location where to store the capability information.
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.

View File

@@ -1,105 +0,0 @@
.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
.. c:namespace:: DTV.video
.. _VIDEO_GET_EVENT:
===============
VIDEO_GET_EVENT
===============
Name
----
VIDEO_GET_EVENT
.. attention:: This ioctl is deprecated.
Synopsis
--------
.. c:macro:: VIDEO_GET_EVENT
``int ioctl(fd, VIDEO_GET_EVENT, struct video_event *ev)``
Arguments
---------
.. flat-table::
:header-rows: 0
:stub-columns: 0
- .. row 1
- int fd
- File descriptor returned by a previous call to open().
- .. row 2
- int request
- Equals VIDEO_GET_EVENT for this command.
- .. row 3
- struct video_event \*ev
- Points to the location where the event, if any, is to be stored.
Description
-----------
This ioctl is for Digital TV 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.
.. c:type:: video_event
.. code-block:: c
struct video_event {
__s32 type;
#define VIDEO_EVENT_SIZE_CHANGED 1
#define VIDEO_EVENT_FRAME_RATE_CHANGED 2
#define VIDEO_EVENT_DECODER_STOPPED 3
#define VIDEO_EVENT_VSYNC 4
long timestamp;
union {
video_size_t size;
unsigned int frame_rate; /* in frames per 1000sec */
unsigned char vsync_field; /* unknown/odd/even/progressive */
} u;
};
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.
.. flat-table::
:header-rows: 0
:stub-columns: 0
- .. row 1
- ``EWOULDBLOCK``
- There is no event pending, and the device is in non-blocking mode.
- .. row 2
- ``EOVERFLOW``
- Overflow in event queue - one or more events were lost.

View File

@@ -1,65 +0,0 @@
.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
.. c:namespace:: DTV.video
.. _VIDEO_GET_FRAME_COUNT:
=====================
VIDEO_GET_FRAME_COUNT
=====================
Name
----
VIDEO_GET_FRAME_COUNT
.. attention:: This ioctl is deprecated.
Synopsis
--------
.. c:macro:: VIDEO_GET_FRAME_COUNT
``int ioctl(int fd, VIDEO_GET_FRAME_COUNT, __u64 *pts)``
Arguments
---------
.. flat-table::
:header-rows: 0
:stub-columns: 0
- .. row 1
- int fd
- File descriptor returned by a previous call to open().
- .. row 2
- int request
- Equals VIDEO_GET_FRAME_COUNT for this command.
- .. row 3
- __u64 \*pts
- Returns the number of frames displayed since the decoder was
started.
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.

View File

@@ -1,69 +0,0 @@
.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
.. c:namespace:: DTV.video
.. _VIDEO_GET_PTS:
=============
VIDEO_GET_PTS
=============
Name
----
VIDEO_GET_PTS
.. attention:: This ioctl is deprecated.
Synopsis
--------
.. c:macro:: VIDEO_GET_PTS
``int ioctl(int fd, VIDEO_GET_PTS, __u64 *pts)``
Arguments
---------
.. flat-table::
:header-rows: 0
:stub-columns: 0
- .. row 1
- int fd
- File descriptor returned by a previous call to open().
- .. row 2
- int request
- Equals VIDEO_GET_PTS for this command.
- .. row 3
- __u64 \*pts
- Returns the 33-bit timestamp as defined in ITU T-REC-H.222.0 /
ISO/IEC 13818-1.
The PTS should belong to the currently played frame if possible,
but may also be a value close to it like the PTS of the last
decoded frame or the last PTS extracted by the PES parser.
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.

View File

@@ -1,69 +0,0 @@
.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
.. c:namespace:: DTV.video
.. _VIDEO_GET_SIZE:
==============
VIDEO_GET_SIZE
==============
Name
----
VIDEO_GET_SIZE
.. attention:: This ioctl is deprecated.
Synopsis
--------
.. c:macro:: VIDEO_GET_SIZE
``int ioctl(int fd, VIDEO_GET_SIZE, video_size_t *size)``
Arguments
---------
.. flat-table::
:header-rows: 0
:stub-columns: 0
- .. row 1
- int fd
- File descriptor returned by a previous call to open().
- .. row 2
- int request
- Equals VIDEO_GET_SIZE for this command.
- .. row 3
- video_size_t \*size
- Returns the size and aspect ratio.
Description
-----------
This ioctl returns the size and aspect ratio.
.. c:type:: video_size_t
.. code-block::c
typedef struct {
int w;
int h;
video_format_t aspect_ratio;
} video_size_t;
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.

View File

@@ -1,72 +0,0 @@
.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
.. c:namespace:: DTV.video
.. _VIDEO_GET_STATUS:
================
VIDEO_GET_STATUS
================
Name
----
VIDEO_GET_STATUS
.. attention:: This ioctl is deprecated.
Synopsis
--------
.. c:macro:: VIDEO_GET_STATUS
``int ioctl(fd, VIDEO_GET_STATUS, struct video_status *status)``
Arguments
---------
.. flat-table::
:header-rows: 0
:stub-columns: 0
- .. row 1
- int fd
- File descriptor returned by a previous call to open().
- .. row 2
- int request
- Equals VIDEO_GET_STATUS for this command.
- .. row 3
- struct video_status \*status
- Returns the current status of the Video Device.
Description
-----------
This ioctl call asks the Video Device to return the current status of
the device.
.. c:type:: video_status
.. code-block:: c
struct video_status {
int video_blank; /* blank video on freeze? */
video_play_state_t play_state; /* current state of playback */
video_stream_source_t stream_source; /* current source (demux/memory) */
video_format_t video_format; /* current aspect ratio of stream*/
video_displayformat_t display_format;/* selected cropping 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
:ref:`Generic Error Codes <gen-errors>` chapter.

View File

@@ -1,57 +0,0 @@
.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
.. c:namespace:: DTV.video
.. _VIDEO_PLAY:
==========
VIDEO_PLAY
==========
Name
----
VIDEO_PLAY
.. attention:: This ioctl is deprecated.
Synopsis
--------
.. c:macro:: VIDEO_PLAY
``int ioctl(fd, VIDEO_PLAY)``
Arguments
---------
.. flat-table::
:header-rows: 0
:stub-columns: 0
- .. row 1
- int fd
- File descriptor returned by a previous call to open().
- .. row 2
- int request
- Equals VIDEO_PLAY for this command.
Description
-----------
This ioctl is for Digital TV 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.

View File

@@ -1,76 +0,0 @@
.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
.. c:namespace:: DTV.video
.. _VIDEO_SELECT_SOURCE:
===================
VIDEO_SELECT_SOURCE
===================
Name
----
VIDEO_SELECT_SOURCE
.. attention:: This ioctl is deprecated.
Synopsis
--------
.. c:macro:: VIDEO_SELECT_SOURCE
``int ioctl(fd, VIDEO_SELECT_SOURCE, video_stream_source_t source)``
Arguments
---------
.. flat-table::
:header-rows: 0
:stub-columns: 0
- .. row 1
- int fd
- File descriptor returned by a previous call to open().
- .. row 2
- int request
- Equals VIDEO_SELECT_SOURCE for this command.
- .. row 3
- video_stream_source_t source
- Indicates which source shall be used for the Video stream.
Description
-----------
This ioctl is for Digital TV 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.
.. c:type:: video_stream_source_t
.. code-block:: c
typedef enum {
VIDEO_SOURCE_DEMUX, /* Select the demux as the main source */
VIDEO_SOURCE_MEMORY /* If this source is selected, the stream
comes from the user through the write
system call */
} video_stream_source_t;
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.

View File

@@ -1,64 +0,0 @@
.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
.. c:namespace:: DTV.video
.. _VIDEO_SET_BLANK:
===============
VIDEO_SET_BLANK
===============
Name
----
VIDEO_SET_BLANK
.. attention:: This ioctl is deprecated.
Synopsis
--------
.. c:macro:: VIDEO_SET_BLANK
``int ioctl(fd, VIDEO_SET_BLANK, boolean mode)``
Arguments
---------
.. flat-table::
:header-rows: 0
:stub-columns: 0
- .. row 1
- int fd
- File descriptor returned by a previous call to open().
- .. row 2
- int request
- Equals VIDEO_SET_BLANK for this command.
- .. row 3
- boolean mode
- TRUE: Blank screen when stop.
- .. row 4
-
- FALSE: Show last decoded frame.
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.

View File

@@ -1,60 +0,0 @@
.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
.. c:namespace:: DTV.video
.. _VIDEO_SET_DISPLAY_FORMAT:
========================
VIDEO_SET_DISPLAY_FORMAT
========================
Name
----
VIDEO_SET_DISPLAY_FORMAT
.. attention:: This ioctl is deprecated.
Synopsis
--------
.. c:macro:: VIDEO_SET_DISPLAY_FORMAT
``int ioctl(fd, VIDEO_SET_DISPLAY_FORMAT)``
Arguments
---------
.. flat-table::
:header-rows: 0
:stub-columns: 0
- .. row 1
- int fd
- File descriptor returned by a previous call to open().
- .. row 2
- int request
- Equals VIDEO_SET_DISPLAY_FORMAT for this command.
- .. row 3
- video_display_format_t format
- Selects the video format to be used.
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.

View File

@@ -1,82 +0,0 @@
.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
.. c:namespace:: DTV.video
.. _VIDEO_SET_FORMAT:
================
VIDEO_SET_FORMAT
================
Name
----
VIDEO_SET_FORMAT
.. attention:: This ioctl is deprecated.
Synopsis
--------
.. c:macro:: VIDEO_SET_FORMAT
``int ioctl(fd, VIDEO_SET_FORMAT, video_format_t format)``
Arguments
---------
.. flat-table::
:header-rows: 0
:stub-columns: 0
- .. row 1
- int fd
- File descriptor returned by a previous call to open().
- .. row 2
- int request
- Equals VIDEO_SET_FORMAT for this command.
- .. row 3
- video_format_t format
- video format of TV as defined in section ??.
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.
.. c:type:: video_format_t
.. code-block:: c
typedef enum {
VIDEO_FORMAT_4_3, /* Select 4:3 format */
VIDEO_FORMAT_16_9, /* Select 16:9 format. */
VIDEO_FORMAT_221_1 /* 2.21:1 */
} video_format_t;
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.
.. flat-table::
:header-rows: 0
:stub-columns: 0
- .. row 1
- ``EINVAL``
- format is not a valid video format.

View File

@@ -1,61 +0,0 @@
.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
.. c:namespace:: DTV.video
.. _VIDEO_SET_STREAMTYPE:
====================
VIDEO_SET_STREAMTYPE
====================
Name
----
VIDEO_SET_STREAMTYPE
.. attention:: This ioctl is deprecated.
Synopsis
--------
.. c:macro:: VIDEO_SET_STREAMTYPE
``int ioctl(fd, VIDEO_SET_STREAMTYPE, int type)``
Arguments
---------
.. flat-table::
:header-rows: 0
:stub-columns: 0
- .. row 1
- int fd
- File descriptor returned by a previous call to open().
- .. row 2
- int request
- Equals VIDEO_SET_STREAMTYPE for this command.
- .. row 3
- int type
- stream type
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.

View File

@@ -1,72 +0,0 @@
.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
.. c:namespace:: DTV.video
.. _VIDEO_SLOWMOTION:
================
VIDEO_SLOWMOTION
================
Name
----
VIDEO_SLOWMOTION
.. attention:: This ioctl is deprecated.
Synopsis
--------
.. c:macro:: VIDEO_SLOWMOTION
``int ioctl(fd, VIDEO_SLOWMOTION, int nFrames)``
Arguments
---------
.. flat-table::
:header-rows: 0
:stub-columns: 0
- .. row 1
- int fd
- File descriptor returned by a previous call to open().
- .. row 2
- int request
- Equals VIDEO_SLOWMOTION for this command.
- .. row 3
- int nFrames
- The number of times to repeat each frame.
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
appropriately. The generic error codes are described at the
:ref:`Generic Error Codes <gen-errors>` chapter.
.. flat-table::
:header-rows: 0
:stub-columns: 0
- .. row 1
- ``EPERM``
- Mode VIDEO_SOURCE_MEMORY not selected.

View File

@@ -1,61 +0,0 @@
.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
.. c:namespace:: DTV.video
.. _VIDEO_STILLPICTURE:
==================
VIDEO_STILLPICTURE
==================
Name
----
VIDEO_STILLPICTURE
.. attention:: This ioctl is deprecated.
Synopsis
--------
.. c:macro:: VIDEO_STILLPICTURE
``int ioctl(fd, VIDEO_STILLPICTURE, struct video_still_picture *sp)``
Arguments
---------
.. flat-table::
:header-rows: 0
:stub-columns: 0
- .. row 1
- int fd
- File descriptor returned by a previous call to open().
- .. row 2
- int request
- Equals VIDEO_STILLPICTURE for this command.
- .. row 3
- struct video_still_picture \*sp
- Pointer to a location where an I-frame and size is stored.
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.

View File

@@ -1,74 +0,0 @@
.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
.. c:namespace:: DTV.video
.. _VIDEO_STOP:
==========
VIDEO_STOP
==========
Name
----
VIDEO_STOP
.. attention:: This ioctl is deprecated.
Synopsis
--------
.. c:macro:: VIDEO_STOP
``int ioctl(fd, VIDEO_STOP, boolean mode)``
Arguments
---------
.. flat-table::
:header-rows: 0
:stub-columns: 0
- .. row 1
- int fd
- File descriptor returned by a previous call to open().
- .. row 2
- int request
- Equals VIDEO_STOP for this command.
- .. row 3
- Boolean mode
- Indicates how the screen shall be handled.
- .. row 4
-
- TRUE: Blank screen when stop.
- .. row 5
-
- FALSE: Show last decoded frame.
Description
-----------
This ioctl is for Digital TV 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.

View File

@@ -1,66 +0,0 @@
.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
.. c:namespace:: DTV.video
.. _VIDEO_TRY_COMMAND:
=================
VIDEO_TRY_COMMAND
=================
Name
----
VIDEO_TRY_COMMAND
.. attention:: This ioctl is deprecated.
Synopsis
--------
.. c:macro:: VIDEO_TRY_COMMAND
``int ioctl(int fd, VIDEO_TRY_COMMAND, struct video_command *cmd)``
Arguments
---------
.. flat-table::
:header-rows: 0
:stub-columns: 0
- .. row 1
- int fd
- File descriptor returned by a previous call to open().
- .. row 2
- int request
- Equals VIDEO_TRY_COMMAND for this command.
- .. row 3
- struct video_command \*cmd
- Try a decoder command.
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.

View File

@@ -1,36 +0,0 @@
.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
.. _dvb_video:
#######################
Digital TV Video Device
#######################
The Digital TV video device controls the MPEG2 video decoder of the Digital
TV hardware. It can be accessed through **/dev/dvb/adapter0/video0**. Data
types and ioctl definitions can be accessed by including
**linux/dvb/video.h** in your application.
Note that the Digital TV video device only controls decoding of the MPEG video
stream, not its presentation on the TV or computer screen. On PCs this
is typically handled by an associated video4linux device, e.g.
**/dev/video**, which allows scaling and defining output windows.
Some Digital TV cards dont have their own MPEG decoder, which results in the
omission of the audio and video device as well as the video4linux
device.
The ioctls that deal with SPUs (sub picture units) and navigation
packets are only supported on some MPEG decoders made for DVD playback.
These ioctls were also used by V4L2 to control MPEG decoders implemented
in V4L2. The use of these ioctls for that purpose has been made obsolete
and proper V4L2 ioctls or controls have been created to replace that
functionality.
.. toctree::
:maxdepth: 1
video_types
video_function_calls

View File

@@ -1,35 +0,0 @@
.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
.. _video_function_calls:
********************
Video Function Calls
********************
.. toctree::
:maxdepth: 1
video-fopen
video-fclose
video-fwrite
video-stop
video-play
video-freeze
video-continue
video-select-source
video-set-blank
video-get-status
video-get-frame-count
video-get-pts
video-get-event
video-command
video-try-command
video-get-size
video-set-display-format
video-stillpicture
video-fast-forward
video-slowmotion
video-get-capabilities
video-clear-buffer
video-set-streamtype
video-set-format

View File

@@ -1,248 +0,0 @@
.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
.. _video_types:
****************
Video Data Types
****************
.. _video-format-t:
video_format_t
==============
The ``video_format_t`` data type defined by
.. code-block:: c
typedef enum {
VIDEO_FORMAT_4_3, /* Select 4:3 format */
VIDEO_FORMAT_16_9, /* Select 16:9 format. */
VIDEO_FORMAT_221_1 /* 2.21:1 */
} video_format_t;
is used in the VIDEO_SET_FORMAT function (??) to tell the driver which
aspect ratio the output hardware (e.g. TV) has. It is also used in the
data structures video_status (??) returned by VIDEO_GET_STATUS (??)
and video_event (??) returned by VIDEO_GET_EVENT (??) which report
about the display format of the current video stream.
.. _video-displayformat-t:
video_displayformat_t
=====================
In case the display format of the video stream and of the display
hardware differ the application has to specify how to handle the
cropping of the picture. This can be done using the
VIDEO_SET_DISPLAY_FORMAT call (??) which accepts
.. code-block:: c
typedef enum {
VIDEO_PAN_SCAN, /* use pan and scan format */
VIDEO_LETTER_BOX, /* use letterbox format */
VIDEO_CENTER_CUT_OUT /* use center cut out format */
} video_displayformat_t;
as argument.
.. _video-stream-source-t:
video_stream_source_t
=====================
The video stream source is set through the VIDEO_SELECT_SOURCE call
and can take the following values, depending on whether we are replaying
from an internal (demuxer) or external (user write) source.
.. code-block:: c
typedef enum {
VIDEO_SOURCE_DEMUX, /* Select the demux as the main source */
VIDEO_SOURCE_MEMORY /* If this source is selected, the stream
comes from the user through the write
system call */
} video_stream_source_t;
VIDEO_SOURCE_DEMUX selects the demultiplexer (fed either by the
frontend or the DVR device) as the source of the video stream. If
VIDEO_SOURCE_MEMORY is selected the stream comes from the application
through the **write()** system call.
.. _video-play-state-t:
video_play_state_t
==================
The following values can be returned by the VIDEO_GET_STATUS call
representing the state of video playback.
.. code-block:: c
typedef enum {
VIDEO_STOPPED, /* Video is stopped */
VIDEO_PLAYING, /* Video is currently playing */
VIDEO_FREEZED /* Video is freezed */
} video_play_state_t;
.. c:type:: video_command
struct video_command
====================
The structure must be zeroed before use by the application This ensures
it can be extended safely in the future.
.. code-block:: c
struct video_command {
__u32 cmd;
__u32 flags;
union {
struct {
__u64 pts;
} stop;
struct {
/* 0 or 1000 specifies normal speed,
1 specifies forward single stepping,
-1 specifies backward single stepping,
>>1: playback at speed/1000 of the normal speed,
<-1: reverse playback at (-speed/1000) of the normal speed. */
__s32 speed;
__u32 format;
} play;
struct {
__u32 data[16];
} raw;
};
};
.. _video-size-t:
video_size_t
============
.. code-block:: c
typedef struct {
int w;
int h;
video_format_t aspect_ratio;
} video_size_t;
.. c:type:: video_event
struct video_event
==================
The following is the structure of a video event as it is returned by the
VIDEO_GET_EVENT call.
.. code-block:: c
struct video_event {
__s32 type;
#define VIDEO_EVENT_SIZE_CHANGED 1
#define VIDEO_EVENT_FRAME_RATE_CHANGED 2
#define VIDEO_EVENT_DECODER_STOPPED 3
#define VIDEO_EVENT_VSYNC 4
long timestamp;
union {
video_size_t size;
unsigned int frame_rate; /* in frames per 1000sec */
unsigned char vsync_field; /* unknown/odd/even/progressive */
} u;
};
.. c:type:: video_status
struct video_status
===================
The VIDEO_GET_STATUS call returns the following structure informing
about various states of the playback operation.
.. code-block:: c
struct video_status {
int video_blank; /* blank video on freeze? */
video_play_state_t play_state; /* current state of playback */
video_stream_source_t stream_source; /* current source (demux/memory) */
video_format_t video_format; /* current aspect ratio of stream */
video_displayformat_t display_format;/* selected cropping mode */
};
If video_blank is set video will be blanked out if the channel is
changed or if playback is stopped. Otherwise, the last picture will be
displayed. play_state indicates if the video is currently frozen,
stopped, or being played back. The stream_source corresponds to the
selected source for the video stream. It can come either from the
demultiplexer or from memory. The video_format indicates the aspect
ratio (one of 4:3 or 16:9) of the currently played video stream.
Finally, display_format corresponds to the selected cropping mode in
case the source video format is not the same as the format of the output
device.
.. c:type:: video_still_picture
struct video_still_picture
==========================
An I-frame displayed via the VIDEO_STILLPICTURE call is passed on
within the following structure.
.. code-block:: c
/* pointer to and size of a single iframe in memory */
struct video_still_picture {
char *iFrame; /* pointer to a single iframe in memory */
int32_t size;
};
.. _video_caps:
video capabilities
==================
A call to VIDEO_GET_CAPABILITIES returns an unsigned integer with the
following bits set according to the hardwares capabilities.
.. code-block:: c
/* bit definitions for capabilities: */
/* can the hardware decode MPEG1 and/or MPEG2? */
#define VIDEO_CAP_MPEG1 1
#define VIDEO_CAP_MPEG2 2
/* can you send a system and/or program stream to video device?
(you still have to open the video and the audio device but only
send the stream to the video device) */
#define VIDEO_CAP_SYS 4
#define VIDEO_CAP_PROG 8
/* can the driver also handle SPU, NAVI and CSS encoded data?
(CSS API is not present yet) */
#define VIDEO_CAP_SPU 16
#define VIDEO_CAP_NAVI 32
#define VIDEO_CAP_CSS 64

View File

@@ -13,14 +13,14 @@ GNU Free Documentation License
===========
The purpose of this License is to make a manual, textbook, or other
written document free in the sense of freedom: to assure everyone the
written document "free" in the sense of freedom: to assure everyone the
effective freedom to copy and redistribute it, with or without modifying
it, either commercially or noncommercially. Secondarily, this License
preserves for the author and publisher a way to get credit for their
work, while not being considered responsible for modifications made by
others.
This License is a kind of copyleft, which means that derivative works
This License is a kind of "copyleft", which means that derivative works
of the document must themselves be free in the same sense. It
complements the GNU General Public License, which is a copyleft license
designed for free software.
@@ -44,21 +44,21 @@ works whose purpose is instruction or reference.
This License applies to any manual or other work that contains a notice
placed by the copyright holder saying it can be distributed under the
terms of this License. The Document, below, refers to any such manual
terms of this License. The "Document", below, refers to any such manual
or work. Any member of the public is a licensee, and is addressed as
you.
"you".
.. _fdl-modified:
A Modified Version of the Document means any work containing the
A "Modified Version" of the Document means any work containing the
Document or a portion of it, either copied verbatim, or with
modifications and/or translated into another language.
.. _fdl-secondary:
A Secondary Section is a named appendix or a front-matter section of
A "Secondary Section" is a named appendix or a front-matter section of
the :ref:`Document <fdl-document>` that deals exclusively with the
relationship of the publishers or authors of the Document to the
Document's overall subject (or to related matters) and contains nothing
@@ -72,7 +72,7 @@ regarding them.
.. _fdl-invariant:
The Invariant Sections are certain
The "Invariant Sections" are certain
:ref:`Secondary Sections <fdl-secondary>` whose titles are designated,
as being those of Invariant Sections, in the notice that says that the
:ref:`Document <fdl-document>` is released under this License.
@@ -80,14 +80,14 @@ as being those of Invariant Sections, in the notice that says that the
.. _fdl-cover-texts:
The Cover Texts are certain short passages of text that are listed, as
The "Cover Texts" are certain short passages of text that are listed, as
Front-Cover Texts or Back-Cover Texts, in the notice that says that the
:ref:`Document <fdl-document>` is released under this License.
.. _fdl-transparent:
A Transparent copy of the :ref:`Document <fdl-document>` means a
A "Transparent" copy of the :ref:`Document <fdl-document>` means a
machine-readable copy, represented in a format whose specification is
available to the general public, whose contents can be viewed and edited
directly and straightforwardly with generic text editors or (for images
@@ -97,7 +97,7 @@ formatters or for automatic translation to a variety of formats suitable
for input to text formatters. A copy made in an otherwise Transparent
file format whose markup has been designed to thwart or discourage
subsequent modification by readers is not Transparent. A copy that is
not Transparent is called Opaque.
not "Transparent" is called "Opaque".
Examples of suitable formats for Transparent copies include plain ASCII
without markup, Texinfo input format, LaTeX input format, SGML or XML
@@ -111,10 +111,10 @@ word processors for output purposes only.
.. _fdl-title-page:
The Title Page means, for a printed book, the title page itself, plus
The "Title Page" means, for a printed book, the title page itself, plus
such following pages as are needed to hold, legibly, the material this
License requires to appear in the title page. For works in formats which
do not have any title page as such, Title Page means the text near the
do not have any title page as such, "Title Page" means the text near the
most prominent appearance of the work's title, preceding the beginning
of the body of the text.
@@ -242,11 +242,11 @@ Modified Version:
Include an unaltered copy of this License.
- **I.**
Preserve the section entitled History, and its title, and add to it
Preserve the section entitled "History", and its title, and add to it
an item stating at least the title, year, new authors, and publisher
of the :ref:`Modified Version <fdl-modified>` as given on the
:ref:`Title Page <fdl-title-page>`. If there is no section entitled
History in the :ref:`Document <fdl-document>`, create one stating
"History" in the :ref:`Document <fdl-document>`, create one stating
the title, year, authors, and publisher of the Document as given on
its Title Page, then add an item describing the Modified Version as
stated in the previous sentence.
@@ -256,13 +256,13 @@ Modified Version:
:ref:`Document <fdl-document>` for public access to a
:ref:`Transparent <fdl-transparent>` copy of the Document, and
likewise the network locations given in the Document for previous
versions it was based on. These may be placed in the History
versions it was based on. These may be placed in the "History"
section. You may omit a network location for a work that was
published at least four years before the Document itself, or if the
original publisher of the version it refers to gives permission.
- **K.**
In any section entitled Acknowledgements or Dedications, preserve
In any section entitled "Acknowledgements" or "Dedications", preserve
the section's title, and preserve in the section all the substance
and tone of each of the contributor acknowledgements and/or
dedications given therein.
@@ -274,11 +274,11 @@ Modified Version:
part of the section titles.
- **M.**
Delete any section entitled Endorsements. Such a section may not be
Delete any section entitled "Endorsements". Such a section may not be
included in the :ref:`Modified Version <fdl-modified>`.
- **N.**
Do not retitle any existing section as Endorsements or to conflict
Do not retitle any existing section as "Endorsements" or to conflict
in title with any :ref:`Invariant Section <fdl-invariant>`.
If the :ref:`Modified Version <fdl-modified>` includes new
@@ -290,7 +290,7 @@ of :ref:`Invariant Sections <fdl-invariant>` in the Modified Version's
license notice. These titles must be distinct from any other section
titles.
You may add a section entitled Endorsements, provided it contains
You may add a section entitled "Endorsements", provided it contains
nothing but endorsements of your
:ref:`Modified Version <fdl-modified>` by various parties--for
example, statements of peer review or that the text has been approved by
@@ -337,11 +337,11 @@ the original author or publisher of that section if known, or else a
unique number. Make the same adjustment to the section titles in the
list of Invariant Sections in the license notice of the combined work.
In the combination, you must combine any sections entitled History in
the various original documents, forming one section entitled History;
likewise combine any sections entitled Acknowledgements, and any
sections entitled Dedications. You must delete all sections entitled
Endorsements.
In the combination, you must combine any sections entitled "History" in
the various original documents, forming one section entitled "History";
likewise combine any sections entitled "Acknowledgements", and any
sections entitled "Dedications". You must delete all sections entitled
"Endorsements."
.. _fdl-section6:
@@ -372,7 +372,7 @@ with other separate and independent documents or works, in or on a
volume of a storage or distribution medium, does not as a whole count as
a :ref:`Modified Version <fdl-modified>` of the Document, provided no
compilation copyright is claimed for the compilation. Such a compilation
is called an aggregate, and this License does not apply to the other
is called an "aggregate", and this License does not apply to the other
self-contained works thus compiled with the Document , on account of
their being thus compiled, if they are not themselves derivative works
of the Document. If the :ref:`Cover Text <fdl-cover-texts>`
@@ -429,7 +429,7 @@ concerns. See
Each version of the License is given a distinguishing version number. If
the :ref:`Document <fdl-document>` specifies that a particular
numbered version of this License or any later version applies to it,
numbered version of this License "or any later version" applies to it,
you have the option of following the terms and conditions either of that
specified version or of any later version that has been published (not
as a draft) by the Free Software Foundation. If the Document does not
@@ -455,13 +455,13 @@ notices just after the title page:
being LIST THEIR TITLES, with the
:ref:`Front-Cover Texts <fdl-cover-texts>` being LIST, and with
the :ref:`Back-Cover Texts <fdl-cover-texts>` being LIST. A copy
of the license is included in the section entitled GNU Free
Documentation License.
of the license is included in the section entitled "GNU Free
Documentation License".
If you have no :ref:`Invariant Sections <fdl-invariant>`, write with
no Invariant Sections instead of saying which ones are invariant. If
you have no :ref:`Front-Cover Texts <fdl-cover-texts>`, write no
Front-Cover Texts instead of Front-Cover Texts being LIST; likewise
If you have no :ref:`Invariant Sections <fdl-invariant>`, write "with
no Invariant Sections" instead of saying which ones are invariant. If
you have no :ref:`Front-Cover Texts <fdl-cover-texts>`, write "no
Front-Cover Texts" instead of "Front-Cover Texts being LIST"; likewise
for :ref:`Back-Cover Texts <fdl-cover-texts>`.
If your document contains nontrivial examples of program code, we

View File

@@ -116,7 +116,7 @@ Glossary
- :term:`RC API`; and
- :term:`V4L2 API`.
See :doc:`index`.
See Documentation/userspace-api/media/index.rst.
MC API
**Media Controller API**

View File

@@ -11,12 +11,14 @@ used by media devices.
Please see:
- :doc:`/admin-guide/media/index`
for usage information about media subsystem and supported drivers;
Documentation/admin-guide/media/index.rst
- :doc:`/driver-api/media/index`
for driver development information and Kernel APIs used by
media devices;
- for usage information about media subsystem and supported drivers;
Documentation/driver-api/media/index.rst
- for driver development information and Kernel APIs used by
media devices;
.. only:: html

View File

@@ -51,7 +51,7 @@ ISO 13818-1
===========
:title: ITU-T Rec. H.222.0 | ISO/IEC 13818-1 "Information technology Generic coding of moving pictures and associated audio information: Systems"
:title: ITU-T Rec. H.222.0 | ISO/IEC 13818-1 "Information technology --- Generic coding of moving pictures and associated audio information: Systems"
:author: International Telecommunication Union (http://www.itu.ch), International Organisation for Standardisation (http://www.iso.ch)
@@ -61,7 +61,7 @@ ISO 13818-2
===========
:title: ITU-T Rec. H.262 | ISO/IEC 13818-2 "Information technology Generic coding of moving pictures and associated audio information: Video"
:title: ITU-T Rec. H.262 | ISO/IEC 13818-2 "Information technology --- Generic coding of moving pictures and associated audio information: Video"
:author: International Telecommunication Union (http://www.itu.ch), International Organisation for Standardisation (http://www.iso.ch)
@@ -150,7 +150,7 @@ ITU-T.81
========
:title: ITU-T Recommendation T.81 "Information Technology Digital Compression and Coding of Continous-Tone Still Images Requirements and Guidelines"
:title: ITU-T Recommendation T.81 "Information Technology --- Digital Compression and Coding of Continous-Tone Still Images --- Requirements and Guidelines"
:author: International Telecommunication Union (http://www.itu.int)
@@ -310,7 +310,7 @@ ISO 12232:2006
==============
:title: Photography Digital still cameras Determination of exposure index, ISO speed ratings, standard output sensitivity, and recommended exposure index
:title: Photography --- Digital still cameras --- Determination of exposure index, ISO speed ratings, standard output sensitivity, and recommended exposure index
:author: International Organization for Standardization (http://www.iso.org)

View File

@@ -38,7 +38,7 @@ Conventions and Notations Used in This Document
6. i = [a..b]: sequence of integers from a to b, inclusive, i.e. i =
[0..2]: i = 0, 1, 2.
7. Given an ``OUTPUT`` buffer A, then A represents a buffer on the ``CAPTURE``
7. Given an ``OUTPUT`` buffer A, then A' represents a buffer on the ``CAPTURE``
queue containing data that resulted from processing buffer A.
.. _decoder-glossary:
@@ -288,7 +288,7 @@ Initialization
Changing the ``OUTPUT`` format may change the currently set ``CAPTURE``
format. How the new ``CAPTURE`` format is determined is up to the decoder
and the client must ensure it matches its needs afterwards.
and the client must ensure it matches its needs afterwards.
2. Allocate source (bytestream) buffers via :c:func:`VIDIOC_REQBUFS` on
``OUTPUT``.
@@ -874,7 +874,7 @@ it may be affected as per normal decoder operation.
any of the following results on the ``CAPTURE`` queue is allowed:
{A, B, G, H}, {A, G, H}, {G, H}.
{A', B', G', H'}, {A', G', H'}, {G', H'}.
To determine the CAPTURE buffer containing the first decoded frame after the
seek, the client may observe the timestamps to match the CAPTURE and OUTPUT

View File

@@ -1244,3 +1244,217 @@ FWHT Flags
* - __u8
- ``padding[3]``
- Applications and drivers must set this to zero.
.. _v4l2-codec-stateless-mpeg2:
``V4L2_CID_STATELESS_MPEG2_SEQUENCE (struct)``
Specifies the sequence parameters (as extracted from the bitstream) for the
associated MPEG-2 slice data. This includes fields matching the syntax
elements from the sequence header and sequence extension parts of the
bitstream as specified by :ref:`mpeg2part2`.
.. c:type:: v4l2_ctrl_mpeg2_sequence
.. raw:: latex
\small
.. cssclass:: longtable
.. tabularcolumns:: |p{1.4cm}|p{6.5cm}|p{9.4cm}|
.. flat-table:: struct v4l2_ctrl_mpeg2_sequence
:header-rows: 0
:stub-columns: 0
:widths: 1 1 2
* - __u16
- ``horizontal_size``
- The width of the displayable part of the frame's luminance component.
* - __u16
- ``vertical_size``
- The height of the displayable part of the frame's luminance component.
* - __u32
- ``vbv_buffer_size``
- Used to calculate the required size of the video buffering verifier,
defined (in bits) as: 16 * 1024 * vbv_buffer_size.
* - __u16
- ``profile_and_level_indication``
- The current profile and level indication as extracted from the
bitstream.
* - __u8
- ``chroma_format``
- The chrominance sub-sampling format (1: 4:2:0, 2: 4:2:2, 3: 4:4:4).
* - __u8
- ``flags``
- See :ref:`MPEG-2 Sequence Flags <mpeg2_sequence_flags>`.
.. _mpeg2_sequence_flags:
``MPEG-2 Sequence Flags``
.. cssclass:: longtable
.. flat-table::
:header-rows: 0
:stub-columns: 0
:widths: 1 1 2
* - ``V4L2_MPEG2_SEQ_FLAG_PROGRESSIVE``
- 0x01
- Indication that all the frames for the sequence are progressive instead
of interlaced.
.. raw:: latex
\normalsize
``V4L2_CID_STATELESS_MPEG2_PICTURE (struct)``
Specifies the picture parameters (as extracted from the bitstream) for the
associated MPEG-2 slice data. This includes fields matching the syntax
elements from the picture header and picture coding extension parts of the
bitstream as specified by :ref:`mpeg2part2`.
.. c:type:: v4l2_ctrl_mpeg2_picture
.. raw:: latex
\small
.. cssclass:: longtable
.. tabularcolumns:: |p{1.0cm}|p{5.6cm}|p{10.7cm}|
.. flat-table:: struct v4l2_ctrl_mpeg2_picture
:header-rows: 0
:stub-columns: 0
:widths: 1 1 2
* - __u64
- ``backward_ref_ts``
- Timestamp of the V4L2 capture buffer to use as backward reference, used
with B-coded and P-coded frames. The timestamp refers to the
``timestamp`` field in struct :c:type:`v4l2_buffer`. Use the
:c:func:`v4l2_timeval_to_ns()` function to convert the struct
:c:type:`timeval` in struct :c:type:`v4l2_buffer` to a __u64.
* - __u64
- ``forward_ref_ts``
- Timestamp for the V4L2 capture buffer to use as forward reference, used
with B-coded frames. The timestamp refers to the ``timestamp`` field in
struct :c:type:`v4l2_buffer`. Use the :c:func:`v4l2_timeval_to_ns()`
function to convert the struct :c:type:`timeval` in struct
:c:type:`v4l2_buffer` to a __u64.
* - __u32
- ``flags``
- See :ref:`MPEG-2 Picture Flags <mpeg2_picture_flags>`.
* - __u8
- ``f_code[2][2]``
- Motion vector codes.
* - __u8
- ``picture_coding_type``
- Picture coding type for the frame covered by the current slice
(V4L2_MPEG2_PIC_CODING_TYPE_I, V4L2_MPEG2_PIC_CODING_TYPE_P or
V4L2_MPEG2_PIC_CODING_TYPE_B).
* - __u8
- ``picture_structure``
- Picture structure (1: interlaced top field, 2: interlaced bottom field,
3: progressive frame).
* - __u8
- ``intra_dc_precision``
- Precision of Discrete Cosine transform (0: 8 bits precision,
1: 9 bits precision, 2: 10 bits precision, 3: 11 bits precision).
* - __u8
- ``reserved[5]``
- Applications and drivers must set this to zero.
.. _mpeg2_picture_flags:
``MPEG-2 Picture Flags``
.. cssclass:: longtable
.. flat-table::
:header-rows: 0
:stub-columns: 0
:widths: 1 1 2
* - ``V4L2_MPEG2_PIC_FLAG_TOP_FIELD_FIRST``
- 0x00000001
- If set and it's an interlaced stream, top field is output first.
* - ``V4L2_MPEG2_PIC_FLAG_FRAME_PRED_DCT``
- 0x00000002
- If set only frame-DCT and frame prediction are used.
* - ``V4L2_MPEG2_PIC_FLAG_CONCEALMENT_MV``
- 0x00000004
- If set motion vectors are coded for intra macroblocks.
* - ``V4L2_MPEG2_PIC_FLAG_Q_SCALE_TYPE``
- 0x00000008
- This flag affects the inverse quantization process.
* - ``V4L2_MPEG2_PIC_FLAG_INTRA_VLC``
- 0x00000010
- This flag affects the decoding of transform coefficient data.
* - ``V4L2_MPEG2_PIC_FLAG_ALT_SCAN``
- 0x00000020
- This flag affects the decoding of transform coefficient data.
* - ``V4L2_MPEG2_PIC_FLAG_REPEAT_FIRST``
- 0x00000040
- This flag affects the decoding process of progressive frames.
* - ``V4L2_MPEG2_PIC_FLAG_PROGRESSIVE``
- 0x00000080
- Indicates whether the current frame is progressive.
.. raw:: latex
\normalsize
``V4L2_CID_STATELESS_MPEG2_QUANTISATION (struct)``
Specifies quantisation matrices, in zigzag scanning order, for the
associated MPEG-2 slice data. This control is initialized by the kernel
to the matrices default values. If a bitstream transmits a user-defined
quantisation matrices load, applications are expected to use this control.
Applications are also expected to set the control loading the default
values, if the quantisation matrices need to be reset, for instance on a
sequence header. This process is specified by section 6.3.7.
"Quant matrix extension" of the specification.
.. c:type:: v4l2_ctrl_mpeg2_quantisation
.. tabularcolumns:: |p{0.8cm}|p{8.0cm}|p{8.5cm}|
.. cssclass:: longtable
.. raw:: latex
\small
.. flat-table:: struct v4l2_ctrl_mpeg2_quantisation
:header-rows: 0
:stub-columns: 0
:widths: 1 1 2
* - __u8
- ``intra_quantiser_matrix[64]``
- The quantisation matrix coefficients for intra-coded frames, in zigzag
scanning order. It is relevant for both luma and chroma components,
although it can be superseded by the chroma-specific matrix for
non-4:2:0 YUV formats.
* - __u8
- ``non_intra_quantiser_matrix[64]``
- The quantisation matrix coefficients for non-intra-coded frames, in
zigzag scanning order. It is relevant for both luma and chroma
components, although it can be superseded by the chroma-specific matrix
for non-4:2:0 YUV formats.
* - __u8
- ``chroma_intra_quantiser_matrix[64]``
- The quantisation matrix coefficients for the chominance component of
intra-coded frames, in zigzag scanning order. Only relevant for
non-4:2:0 YUV formats.
* - __u8
- ``chroma_non_intra_quantiser_matrix[64]``
- The quantisation matrix coefficients for the chrominance component of
non-intra-coded frames, in zigzag scanning order. Only relevant for
non-4:2:0 YUV formats.
.. raw:: latex
\normalsize

View File

@@ -1606,223 +1606,6 @@ enum v4l2_mpeg_video_h264_hierarchical_coding_type -
``V4L2_CID_MPEG_VIDEO_H264_HIER_CODING_L6_BR (integer)``
Indicates bit rate (bps) for hierarchical coding layer 6 for H264 encoder.
.. _v4l2-mpeg-mpeg2:
``V4L2_CID_MPEG_VIDEO_MPEG2_SLICE_PARAMS (struct)``
Specifies the slice parameters (as extracted from the bitstream) for the
associated MPEG-2 slice data. This includes the necessary parameters for
configuring a stateless hardware decoding pipeline for MPEG-2.
The bitstream parameters are defined according to :ref:`mpeg2part2`.
.. note::
This compound control is not yet part of the public kernel API and
it is expected to change.
.. c:type:: v4l2_ctrl_mpeg2_slice_params
.. tabularcolumns:: |p{5.6cm}|p{4.6cm}|p{7.1cm}|
.. cssclass:: longtable
.. flat-table:: struct v4l2_ctrl_mpeg2_slice_params
:header-rows: 0
:stub-columns: 0
:widths: 1 1 2
* - __u32
- ``bit_size``
- Size (in bits) of the current slice data.
* - __u32
- ``data_bit_offset``
- Offset (in bits) to the video data in the current slice data.
* - struct :c:type:`v4l2_mpeg2_sequence`
- ``sequence``
- Structure with MPEG-2 sequence metadata, merging relevant fields from
the sequence header and sequence extension parts of the bitstream.
* - struct :c:type:`v4l2_mpeg2_picture`
- ``picture``
- Structure with MPEG-2 picture metadata, merging relevant fields from
the picture header and picture coding extension parts of the bitstream.
* - __u64
- ``backward_ref_ts``
- Timestamp of the V4L2 capture buffer to use as backward reference, used
with B-coded and P-coded frames. The timestamp refers to the
``timestamp`` field in struct :c:type:`v4l2_buffer`. Use the
:c:func:`v4l2_timeval_to_ns()` function to convert the struct
:c:type:`timeval` in struct :c:type:`v4l2_buffer` to a __u64.
* - __u64
- ``forward_ref_ts``
- Timestamp for the V4L2 capture buffer to use as forward reference, used
with B-coded frames. The timestamp refers to the ``timestamp`` field in
struct :c:type:`v4l2_buffer`. Use the :c:func:`v4l2_timeval_to_ns()`
function to convert the struct :c:type:`timeval` in struct
:c:type:`v4l2_buffer` to a __u64.
* - __u32
- ``quantiser_scale_code``
- Code used to determine the quantization scale to use for the IDCT.
.. c:type:: v4l2_mpeg2_sequence
.. cssclass:: longtable
.. tabularcolumns:: |p{1.4cm}|p{6.5cm}|p{9.4cm}|
.. flat-table:: struct v4l2_mpeg2_sequence
:header-rows: 0
:stub-columns: 0
:widths: 1 1 2
* - __u16
- ``horizontal_size``
- The width of the displayable part of the frame's luminance component.
* - __u16
- ``vertical_size``
- The height of the displayable part of the frame's luminance component.
* - __u32
- ``vbv_buffer_size``
- Used to calculate the required size of the video buffering verifier,
defined (in bits) as: 16 * 1024 * vbv_buffer_size.
* - __u16
- ``profile_and_level_indication``
- The current profile and level indication as extracted from the
bitstream.
* - __u8
- ``progressive_sequence``
- Indication that all the frames for the sequence are progressive instead
of interlaced.
* - __u8
- ``chroma_format``
- The chrominance sub-sampling format (1: 4:2:0, 2: 4:2:2, 3: 4:4:4).
.. c:type:: v4l2_mpeg2_picture
.. raw:: latex
\small
.. cssclass:: longtable
.. tabularcolumns:: |p{1.0cm}|p{5.6cm}|p{10.7cm}|
.. flat-table:: struct v4l2_mpeg2_picture
:header-rows: 0
:stub-columns: 0
:widths: 1 1 2
* - __u8
- ``picture_coding_type``
- Picture coding type for the frame covered by the current slice
(V4L2_MPEG2_PICTURE_CODING_TYPE_I, V4L2_MPEG2_PICTURE_CODING_TYPE_P or
V4L2_MPEG2_PICTURE_CODING_TYPE_B).
* - __u8
- ``f_code[2][2]``
- Motion vector codes.
* - __u8
- ``intra_dc_precision``
- Precision of Discrete Cosine transform (0: 8 bits precision,
1: 9 bits precision, 2: 10 bits precision, 3: 11 bits precision).
* - __u8
- ``picture_structure``
- Picture structure (1: interlaced top field, 2: interlaced bottom field,
3: progressive frame).
* - __u8
- ``top_field_first``
- If set to 1 and interlaced stream, top field is output first.
* - __u8
- ``frame_pred_frame_dct``
- If set to 1, only frame-DCT and frame prediction are used.
* - __u8
- ``concealment_motion_vectors``
- If set to 1, motion vectors are coded for intra macroblocks.
* - __u8
- ``q_scale_type``
- This flag affects the inverse quantization process.
* - __u8
- ``intra_vlc_format``
- This flag affects the decoding of transform coefficient data.
* - __u8
- ``alternate_scan``
- This flag affects the decoding of transform coefficient data.
* - __u8
- ``repeat_first_field``
- This flag affects the decoding process of progressive frames.
* - __u16
- ``progressive_frame``
- Indicates whether the current frame is progressive.
.. raw:: latex
\normalsize
``V4L2_CID_MPEG_VIDEO_MPEG2_QUANTIZATION (struct)``
Specifies quantization matrices (as extracted from the bitstream) for the
associated MPEG-2 slice data.
.. note::
This compound control is not yet part of the public kernel API and
it is expected to change.
.. c:type:: v4l2_ctrl_mpeg2_quantization
.. tabularcolumns:: |p{0.8cm}|p{8.0cm}|p{8.5cm}|
.. cssclass:: longtable
.. raw:: latex
\small
.. flat-table:: struct v4l2_ctrl_mpeg2_quantization
:header-rows: 0
:stub-columns: 0
:widths: 1 1 2
* - __u8
- ``load_intra_quantiser_matrix``
- One bit to indicate whether to load the ``intra_quantiser_matrix`` data.
* - __u8
- ``load_non_intra_quantiser_matrix``
- One bit to indicate whether to load the ``non_intra_quantiser_matrix``
data.
* - __u8
- ``load_chroma_intra_quantiser_matrix``
- One bit to indicate whether to load the
``chroma_intra_quantiser_matrix`` data, only relevant for non-4:2:0 YUV
formats.
* - __u8
- ``load_chroma_non_intra_quantiser_matrix``
- One bit to indicate whether to load the
``chroma_non_intra_quantiser_matrix`` data, only relevant for non-4:2:0
YUV formats.
* - __u8
- ``intra_quantiser_matrix[64]``
- The quantization matrix coefficients for intra-coded frames, in zigzag
scanning order. It is relevant for both luma and chroma components,
although it can be superseded by the chroma-specific matrix for
non-4:2:0 YUV formats.
* - __u8
- ``non_intra_quantiser_matrix[64]``
- The quantization matrix coefficients for non-intra-coded frames, in
zigzag scanning order. It is relevant for both luma and chroma
components, although it can be superseded by the chroma-specific matrix
for non-4:2:0 YUV formats.
* - __u8
- ``chroma_intra_quantiser_matrix[64]``
- The quantization matrix coefficients for the chominance component of
intra-coded frames, in zigzag scanning order. Only relevant for
non-4:2:0 YUV formats.
* - __u8
- ``chroma_non_intra_quantiser_matrix[64]``
- The quantization matrix coefficients for the chrominance component of
non-intra-coded frames, in zigzag scanning order. Only relevant for
non-4:2:0 YUV formats.
.. raw:: latex
\normalsize
``V4L2_CID_FWHT_I_FRAME_QP (integer)``
Quantization parameter for an I frame for FWHT. Valid range: from 1
to 31.
@@ -2924,6 +2707,9 @@ enum v4l2_mpeg_video_hevc_size_of_length_field -
* - __u8
- ``chroma_format_idc``
-
* - __u8
- ``sps_max_sub_layers_minus1``
-
* - __u64
- ``flags``
- See :ref:`Sequence Parameter Set Flags <hevc_sps_flags>`
@@ -3000,6 +2786,12 @@ enum v4l2_mpeg_video_hevc_size_of_length_field -
* - __u8
- ``num_extra_slice_header_bits``
-
* - __u8
- ``num_ref_idx_l0_default_active_minus1``
- Specifies the inferred value of num_ref_idx_l0_active_minus1
* - __u8
- ``num_ref_idx_l1_default_active_minus1``
- Specifies the inferred value of num_ref_idx_l1_active_minus1
* - __s8
- ``init_qp_minus26``
-
@@ -3053,7 +2845,7 @@ enum v4l2_mpeg_video_hevc_size_of_length_field -
:stub-columns: 0
:widths: 1 1 2
* - ``V4L2_HEVC_PPS_FLAG_DEPENDENT_SLICE_SEGMENT``
* - ``V4L2_HEVC_PPS_FLAG_DEPENDENT_SLICE_SEGMENT_ENABLED``
- 0x00000001
-
* - ``V4L2_HEVC_PPS_FLAG_OUTPUT_FLAG_PRESENT``
@@ -3110,6 +2902,14 @@ enum v4l2_mpeg_video_hevc_size_of_length_field -
* - ``V4L2_HEVC_PPS_FLAG_SLICE_SEGMENT_HEADER_EXTENSION_PRESENT``
- 0x00040000
-
* - ``V4L2_HEVC_PPS_FLAG_DEBLOCKING_FILTER_CONTROL_PRESENT``
- 0x00080000
- Specifies the presence of deblocking filter control syntax elements in
the PPS
* - ``V4L2_HEVC_PPS_FLAG_UNIFORM_SPACING``
- 0x00100000
- Specifies that tile column boundaries and likewise tile row boundaries
are distributed uniformly across the picture
.. raw:: latex
@@ -3200,9 +3000,6 @@ enum v4l2_mpeg_video_hevc_size_of_length_field -
* - __u8
- ``pic_struct``
-
* - __u8
- ``num_active_dpb_entries``
- The number of entries in ``dpb``.
* - __u8
- ``ref_idx_l0[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]``
- The list of L0 reference elements as indices in the DPB.
@@ -3210,22 +3007,8 @@ enum v4l2_mpeg_video_hevc_size_of_length_field -
- ``ref_idx_l1[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]``
- The list of L1 reference elements as indices in the DPB.
* - __u8
- ``num_rps_poc_st_curr_before``
- The number of reference pictures in the short-term set that come before
the current frame.
* - __u8
- ``num_rps_poc_st_curr_after``
- The number of reference pictures in the short-term set that come after
the current frame.
* - __u8
- ``num_rps_poc_lt_curr``
- The number of reference pictures in the long-term set.
* - __u8
- ``padding[7]``
- ``padding``
- Applications and drivers must set this to zero.
* - struct :c:type:`v4l2_hevc_dpb_entry`
- ``dpb[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]``
- The decoded picture buffer, for meta-data about reference frames.
* - struct :c:type:`v4l2_hevc_pred_weight_table`
- ``pred_weight_table``
- The prediction weight coefficients for inter-picture prediction.
@@ -3277,6 +3060,9 @@ enum v4l2_mpeg_video_hevc_size_of_length_field -
* - ``V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_LOOP_FILTER_ACROSS_SLICES_ENABLED``
- 0x00000100
-
* - ``V4L2_HEVC_SLICE_PARAMS_FLAG_DEPENDENT_SLICE_SEGMENT``
- 0x00000200
-
.. raw:: latex
@@ -3478,3 +3264,78 @@ enum v4l2_mpeg_video_hevc_size_of_length_field -
encoding the next frame queued after setting this control.
This provides a bitmask which consists of bits [0, LTR_COUNT-1].
This is applicable to the H264 and HEVC encoders.
``V4L2_CID_MPEG_VIDEO_HEVC_DECODE_PARAMS (struct)``
Specifies various decode parameters, especially the references picture order
count (POC) for all the lists (short, long, before, current, after) and the
number of entries for each of them.
These parameters are defined according to :ref:`hevc`.
They are described in section 8.3 "Slice decoding process" of the
specification.
.. c:type:: v4l2_ctrl_hevc_decode_params
.. cssclass:: longtable
.. flat-table:: struct v4l2_ctrl_hevc_decode_params
:header-rows: 0
:stub-columns: 0
:widths: 1 1 2
* - __s32
- ``pic_order_cnt_val``
- PicOrderCntVal as described in section 8.3.1 "Decoding process
for picture order count" of the specification.
* - __u8
- ``num_active_dpb_entries``
- The number of entries in ``dpb``.
* - struct :c:type:`v4l2_hevc_dpb_entry`
- ``dpb[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]``
- The decoded picture buffer, for meta-data about reference frames.
* - __u8
- ``num_poc_st_curr_before``
- The number of reference pictures in the short-term set that come before
the current frame.
* - __u8
- ``num_poc_st_curr_after``
- The number of reference pictures in the short-term set that come after
the current frame.
* - __u8
- ``num_poc_lt_curr``
- The number of reference pictures in the long-term set.
* - __u8
- ``poc_st_curr_before[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]``
- PocStCurrBefore as described in section 8.3.2 "Decoding process for reference
picture set.
* - __u8
- ``poc_st_curr_after[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]``
- PocStCurrAfter as described in section 8.3.2 "Decoding process for reference
picture set.
* - __u8
- ``poc_lt_curr[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]``
- PocLtCurr as described in section 8.3.2 "Decoding process for reference
picture set.
* - __u64
- ``flags``
- See :ref:`Decode Parameters Flags <hevc_decode_params_flags>`
.. _hevc_decode_params_flags:
``Decode Parameters Flags``
.. cssclass:: longtable
.. flat-table::
:header-rows: 0
:stub-columns: 0
:widths: 1 1 2
* - ``V4L2_HEVC_DECODE_PARAM_FLAG_IRAP_PIC``
- 0x00000001
-
* - ``V4L2_HEVC_DECODE_PARAM_FLAG_IDR_PIC``
- 0x00000002
-
* - ``V4L2_HEVC_DECODE_PARAM_FLAG_NO_OUTPUT_OF_PRIOR``
- 0x00000004
-

View File

@@ -112,12 +112,13 @@ Compressed Formats
- 'MG2S'
- MPEG-2 parsed slice data, as extracted from the MPEG-2 bitstream.
This format is adapted for stateless video decoders that implement a
MPEG-2 pipeline (using the :ref:`mem2mem` and :ref:`media-request-api`).
MPEG-2 pipeline with the :ref:`stateless_decoder`.
Metadata associated with the frame to decode is required to be passed
through the ``V4L2_CID_MPEG_VIDEO_MPEG2_SLICE_PARAMS`` control and
quantization matrices can optionally be specified through the
``V4L2_CID_MPEG_VIDEO_MPEG2_QUANTIZATION`` control.
See the :ref:`associated Codec Control IDs <v4l2-mpeg-mpeg2>`.
through the ``V4L2_CID_STATELESS_MPEG2_SEQUENCE`` and
``V4L2_CID_STATELESS_MPEG2_PICTURE`` controls.
Quantisation matrices can optionally be specified through the
``V4L2_CID_STATELESS_MPEG2_QUANTISATION`` control.
See the :ref:`associated Codec Control IDs <v4l2-codec-stateless-mpeg2>`.
Exactly one output and one capture buffer must be provided for use with
this pixel format. The output buffer must contain the appropriate number
of macroblocks to decode a full corresponding frame to the matching

View File

@@ -78,4 +78,4 @@ hardware and algorithm details.
Intel IPU3 ImgU uAPI data types
===============================
.. kernel-doc:: drivers/staging/media/ipu3/include/intel-ipu3.h
.. kernel-doc:: drivers/staging/media/ipu3/include/uapi/intel-ipu3.h

View File

@@ -221,6 +221,18 @@ still cause this situation.
- ``p_vp8_frame``
- A pointer to a struct :c:type:`v4l2_ctrl_vp8_frame`. Valid if this control is
of type ``V4L2_CTRL_TYPE_VP8_FRAME``.
* - struct :c:type:`v4l2_ctrl_mpeg2_sequence` *
- ``p_mpeg2_sequence``
- A pointer to a struct :c:type:`v4l2_ctrl_mpeg2_sequence`. Valid if this control is
of type ``V4L2_CTRL_TYPE_MPEG2_SEQUENCE``.
* - struct :c:type:`v4l2_ctrl_mpeg2_picture` *
- ``p_mpeg2_picture``
- A pointer to a struct :c:type:`v4l2_ctrl_mpeg2_picture`. Valid if this control is
of type ``V4L2_CTRL_TYPE_MPEG2_PICTURE``.
* - struct :c:type:`v4l2_ctrl_mpeg2_quantisation` *
- ``p_mpeg2_quantisation``
- A pointer to a struct :c:type:`v4l2_ctrl_mpeg2_quantisation`. Valid if this control is
of type ``V4L2_CTRL_TYPE_MPEG2_QUANTISATION``.
* - struct :c:type:`v4l2_ctrl_hdr10_cll_info` *
- ``p_hdr10_cll``
- A pointer to a struct :c:type:`v4l2_ctrl_hdr10_cll_info`. Valid if this control is

View File

@@ -417,18 +417,24 @@ See also the examples in :ref:`control`.
- any
- An unsigned 32-bit valued control ranging from minimum to maximum
inclusive. The step value indicates the increment between values.
* - ``V4L2_CTRL_TYPE_MPEG2_SLICE_PARAMS``
* - ``V4L2_CTRL_TYPE_MPEG2_QUANTISATION``
- n/a
- n/a
- n/a
- A struct :c:type:`v4l2_ctrl_mpeg2_slice_params`, containing MPEG-2
slice parameters for stateless video decoders.
* - ``V4L2_CTRL_TYPE_MPEG2_QUANTIZATION``
- A struct :c:type:`v4l2_ctrl_mpeg2_quantisation`, containing MPEG-2
quantisation matrices for stateless video decoders.
* - ``V4L2_CTRL_TYPE_MPEG2_SEQUENCE``
- n/a
- n/a
- n/a
- A struct :c:type:`v4l2_ctrl_mpeg2_quantization`, containing MPEG-2
quantization matrices for stateless video decoders.
- A struct :c:type:`v4l2_ctrl_mpeg2_sequence`, containing MPEG-2
sequence parameters for stateless video decoders.
* - ``V4L2_CTRL_TYPE_MPEG2_PICTURE``
- n/a
- n/a
- n/a
- A struct :c:type:`v4l2_ctrl_mpeg2_picture`, containing MPEG-2
picture parameters for stateless video decoders.
* - ``V4L2_CTRL_TYPE_AREA``
- n/a
- n/a
@@ -495,6 +501,12 @@ See also the examples in :ref:`control`.
- n/a
- A struct :c:type:`v4l2_ctrl_vp8_frame`, containing VP8
frame parameters for stateless video decoders.
* - ``V4L2_CTRL_TYPE_HEVC_DECODE_PARAMS``
- n/a
- n/a
- n/a
- A struct :c:type:`v4l2_ctrl_hevc_decode_params`, containing HEVC
decoding parameters for stateless video decoders.
.. raw:: latex

View File

@@ -1,39 +0,0 @@
# SPDX-License-Identifier: GPL-2.0
# Ignore header name
ignore define _UAPI_DVBVIDEO_H_
# This is a deprecated obscure API. Just ignore things we don't know
ignore define VIDEO_CMD_PLAY
ignore define VIDEO_CMD_STOP
ignore define VIDEO_CMD_FREEZE
ignore define VIDEO_CMD_CONTINUE
ignore define VIDEO_CMD_FREEZE_TO_BLACK
ignore define VIDEO_CMD_STOP_TO_BLACK
ignore define VIDEO_CMD_STOP_IMMEDIATELY
ignore define VIDEO_PLAY_FMT_NONE
ignore define VIDEO_PLAY_FMT_GOP
ignore define VIDEO_VSYNC_FIELD_UNKNOWN
ignore define VIDEO_VSYNC_FIELD_ODD
ignore define VIDEO_VSYNC_FIELD_EVEN
ignore define VIDEO_VSYNC_FIELD_PROGRESSIVE
ignore define VIDEO_EVENT_SIZE_CHANGED
ignore define VIDEO_EVENT_FRAME_RATE_CHANGED
ignore define VIDEO_EVENT_DECODER_STOPPED
ignore define VIDEO_EVENT_VSYNC
ignore define VIDEO_CAP_MPEG1
ignore define VIDEO_CAP_MPEG2
ignore define VIDEO_CAP_SYS
ignore define VIDEO_CAP_PROG
ignore define VIDEO_CAP_SPU
ignore define VIDEO_CAP_NAVI
ignore define VIDEO_CAP_CSS
# some typedefs should point to struct/enums
replace typedef video_format_t :c:type:`video_format`
replace typedef video_system_t :c:type:`video_system`
replace typedef video_displayformat_t :c:type:`video_displayformat`
replace typedef video_size_t :c:type:`video_size`
replace typedef video_stream_source_t :c:type:`video_stream_source`
replace typedef video_play_state_t :c:type:`video_play_state`
replace typedef video_navi_pack_t :c:type:`video_navi_pack`

View File

@@ -134,8 +134,9 @@ replace symbol V4L2_CTRL_TYPE_STRING :c:type:`v4l2_ctrl_type`
replace symbol V4L2_CTRL_TYPE_U16 :c:type:`v4l2_ctrl_type`
replace symbol V4L2_CTRL_TYPE_U32 :c:type:`v4l2_ctrl_type`
replace symbol V4L2_CTRL_TYPE_U8 :c:type:`v4l2_ctrl_type`
replace symbol V4L2_CTRL_TYPE_MPEG2_SLICE_PARAMS :c:type:`v4l2_ctrl_type`
replace symbol V4L2_CTRL_TYPE_MPEG2_QUANTIZATION :c:type:`v4l2_ctrl_type`
replace symbol V4L2_CTRL_TYPE_MPEG2_SEQUENCE :c:type:`v4l2_ctrl_type`
replace symbol V4L2_CTRL_TYPE_MPEG2_PICTURE :c:type:`v4l2_ctrl_type`
replace symbol V4L2_CTRL_TYPE_MPEG2_QUANTISATION :c:type:`v4l2_ctrl_type`
replace symbol V4L2_CTRL_TYPE_H264_SPS :c:type:`v4l2_ctrl_type`
replace symbol V4L2_CTRL_TYPE_H264_PPS :c:type:`v4l2_ctrl_type`
replace symbol V4L2_CTRL_TYPE_H264_SCALING_MATRIX :c:type:`v4l2_ctrl_type`