Commit 0579e6e3 authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab

doc-rst: linux_tv: remove whitespaces

Let's remove bad whitespaces on the entire book.

That helps to avoid mixing whitespace removal with other
patches.
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
parent a163ad5c
......@@ -34,52 +34,52 @@ file: audio.h
#include <linux/types.h>
typedef enum {
AUDIO_SOURCE_DEMUX, /* Select the demux as the main source */
AUDIO_SOURCE_MEMORY /* Select internal memory as the main source */
AUDIO_SOURCE_DEMUX, /* Select the demux as the main source */
AUDIO_SOURCE_MEMORY /* Select internal memory as the main source */
} audio_stream_source_t;
typedef enum {
AUDIO_STOPPED, /* Device is stopped */
AUDIO_PLAYING, /* Device is currently playing */
AUDIO_PAUSED /* Device is paused */
AUDIO_STOPPED, /* Device is stopped */
AUDIO_PLAYING, /* Device is currently playing */
AUDIO_PAUSED /* Device is paused */
} audio_play_state_t;
typedef enum {
AUDIO_STEREO,
AUDIO_MONO_LEFT,
AUDIO_MONO_RIGHT,
AUDIO_MONO,
AUDIO_STEREO_SWAPPED
AUDIO_STEREO,
AUDIO_MONO_LEFT,
AUDIO_MONO_RIGHT,
AUDIO_MONO,
AUDIO_STEREO_SWAPPED
} audio_channel_select_t;
typedef struct audio_mixer {
unsigned int volume_left;
unsigned int volume_right;
unsigned int volume_left;
unsigned int volume_right;
// what else do we need? bass, pass-through, ...
} audio_mixer_t;
typedef struct audio_status {
int AV_sync_state; /* sync audio and video? */
int mute_state; /* audio is muted */
audio_play_state_t play_state; /* current playback state */
audio_stream_source_t stream_source; /* current stream source */
audio_channel_select_t channel_select; /* currently selected channel */
int bypass_mode; /* pass on audio data to */
audio_mixer_t mixer_state; /* current mixer state */
int AV_sync_state; /* sync audio and video? */
int mute_state; /* audio is muted */
audio_play_state_t play_state; /* current playback state */
audio_stream_source_t stream_source; /* current stream source */
audio_channel_select_t channel_select; /* currently selected channel */
int bypass_mode; /* pass on audio data to */
audio_mixer_t mixer_state; /* current mixer state */
} audio_status_t; /* separate decoder hardware */
typedef
struct audio_karaoke { /* if Vocal1 or Vocal2 are non-zero, they get mixed */
int vocal1; /* into left and right t at 70% each */
int vocal2; /* if both, Vocal1 and Vocal2 are non-zero, Vocal1 gets*/
int melody; /* mixed into the left channel and */
/* Vocal2 into the right channel at 100% each. */
/* if Melody is non-zero, the melody channel gets mixed*/
int vocal1; /* into left and right t at 70% each */
int vocal2; /* if both, Vocal1 and Vocal2 are non-zero, Vocal1 gets*/
int melody; /* mixed into the left channel and */
/* Vocal2 into the right channel at 100% each. */
/* if Melody is non-zero, the melody channel gets mixed*/
} audio_karaoke_t; /* into left and right */
......
......@@ -34,16 +34,16 @@ file: ca.h
/* slot interface types and info */
typedef struct ca_slot_info {
int num; /* slot number */
int num; /* slot number */
int type; /* CA interface this slot supports */
int type; /* CA interface this slot supports */
#define CA_CI 1 /* CI high level interface */
#define CA_CI_LINK 2 /* CI link layer level interface */
#define CA_CI_PHYS 4 /* CI physical layer level interface */
#define CA_DESCR 8 /* built-in descrambler */
#define CA_SC 128 /* simple smart card interface */
unsigned int flags;
unsigned int flags;
#define CA_CI_MODULE_PRESENT 1 /* module (or card) inserted */
#define CA_CI_MODULE_READY 2
} ca_slot_info_t;
......@@ -52,37 +52,37 @@ file: ca.h
/* descrambler types and info */
typedef struct ca_descr_info {
unsigned int num; /* number of available descramblers (keys) */
unsigned int type; /* type of supported scrambling system */
unsigned int num; /* number of available descramblers (keys) */
unsigned int type; /* type of supported scrambling system */
#define CA_ECD 1
#define CA_NDS 2
#define CA_DSS 4
} ca_descr_info_t;
typedef struct ca_caps {
unsigned int slot_num; /* total number of CA card and module slots */
unsigned int slot_type; /* OR of all supported types */
unsigned int descr_num; /* total number of descrambler slots (keys) */
unsigned int descr_type; /* OR of all supported types */
unsigned int slot_num; /* total number of CA card and module slots */
unsigned int slot_type; /* OR of all supported types */
unsigned int descr_num; /* total number of descrambler slots (keys) */
unsigned int descr_type; /* OR of all supported types */
} ca_caps_t;
/* a message to/from a CI-CAM */
typedef struct ca_msg {
unsigned int index;
unsigned int type;
unsigned int length;
unsigned char msg[256];
unsigned int index;
unsigned int type;
unsigned int length;
unsigned char msg[256];
} ca_msg_t;
typedef struct ca_descr {
unsigned int index;
unsigned int parity; /* 0 == even, 1 == odd */
unsigned char cw[8];
unsigned int index;
unsigned int parity; /* 0 == even, 1 == odd */
unsigned char cw[8];
} ca_descr_t;
typedef struct ca_pid {
unsigned int pid;
int index; /* -1 == disable*/
unsigned int pid;
int index; /* -1 == disable*/
} ca_pid_t;
#define CA_RESET _IO('o', 128)
......
......@@ -41,51 +41,51 @@ file: dmx.h
enum dmx_output
{
DMX_OUT_DECODER, /* Streaming directly to decoder. */
DMX_OUT_TAP, /* Output going to a memory buffer */
/* (to be retrieved via the read command).*/
DMX_OUT_TS_TAP, /* Output multiplexed into a new TS */
/* (to be retrieved by reading from the */
/* logical DVR device). */
DMX_OUT_TSDEMUX_TAP /* Like TS_TAP but retrieved from the DMX device */
DMX_OUT_DECODER, /* Streaming directly to decoder. */
DMX_OUT_TAP, /* Output going to a memory buffer */
/* (to be retrieved via the read command).*/
DMX_OUT_TS_TAP, /* Output multiplexed into a new TS */
/* (to be retrieved by reading from the */
/* logical DVR device). */
DMX_OUT_TSDEMUX_TAP /* Like TS_TAP but retrieved from the DMX device */
};
typedef enum dmx_output dmx_output_t;
typedef enum dmx_input
{
DMX_IN_FRONTEND, /* Input from a front-end device. */
DMX_IN_DVR /* Input from the logical DVR device. */
DMX_IN_FRONTEND, /* Input from a front-end device. */
DMX_IN_DVR /* Input from the logical DVR device. */
} dmx_input_t;
typedef enum dmx_ts_pes
{
DMX_PES_AUDIO0,
DMX_PES_VIDEO0,
DMX_PES_TELETEXT0,
DMX_PES_SUBTITLE0,
DMX_PES_PCR0,
DMX_PES_AUDIO1,
DMX_PES_VIDEO1,
DMX_PES_TELETEXT1,
DMX_PES_SUBTITLE1,
DMX_PES_PCR1,
DMX_PES_AUDIO2,
DMX_PES_VIDEO2,
DMX_PES_TELETEXT2,
DMX_PES_SUBTITLE2,
DMX_PES_PCR2,
DMX_PES_AUDIO3,
DMX_PES_VIDEO3,
DMX_PES_TELETEXT3,
DMX_PES_SUBTITLE3,
DMX_PES_PCR3,
DMX_PES_OTHER
DMX_PES_AUDIO0,
DMX_PES_VIDEO0,
DMX_PES_TELETEXT0,
DMX_PES_SUBTITLE0,
DMX_PES_PCR0,
DMX_PES_AUDIO1,
DMX_PES_VIDEO1,
DMX_PES_TELETEXT1,
DMX_PES_SUBTITLE1,
DMX_PES_PCR1,
DMX_PES_AUDIO2,
DMX_PES_VIDEO2,
DMX_PES_TELETEXT2,
DMX_PES_SUBTITLE2,
DMX_PES_PCR2,
DMX_PES_AUDIO3,
DMX_PES_VIDEO3,
DMX_PES_TELETEXT3,
DMX_PES_SUBTITLE3,
DMX_PES_PCR3,
DMX_PES_OTHER
} dmx_pes_type_t;
#define DMX_PES_AUDIO DMX_PES_AUDIO0
......@@ -97,18 +97,18 @@ file: dmx.h
typedef struct dmx_filter
{
__u8 filter[DMX_FILTER_SIZE];
__u8 mask[DMX_FILTER_SIZE];
__u8 mode[DMX_FILTER_SIZE];
__u8 filter[DMX_FILTER_SIZE];
__u8 mask[DMX_FILTER_SIZE];
__u8 mode[DMX_FILTER_SIZE];
} dmx_filter_t;
struct dmx_sct_filter_params
{
__u16 pid;
dmx_filter_t filter;
__u32 timeout;
__u32 flags;
__u16 pid;
dmx_filter_t filter;
__u32 timeout;
__u32 flags;
#define DMX_CHECK_CRC 1
#define DMX_ONESHOT 2
#define DMX_IMMEDIATE_START 4
......@@ -118,33 +118,33 @@ file: dmx.h
struct dmx_pes_filter_params
{
__u16 pid;
dmx_input_t input;
dmx_output_t output;
dmx_pes_type_t pes_type;
__u32 flags;
__u16 pid;
dmx_input_t input;
dmx_output_t output;
dmx_pes_type_t pes_type;
__u32 flags;
};
typedef struct dmx_caps {
__u32 caps;
int num_decoders;
__u32 caps;
int num_decoders;
} dmx_caps_t;
typedef enum dmx_source {
DMX_SOURCE_FRONT0 = 0,
DMX_SOURCE_FRONT1,
DMX_SOURCE_FRONT2,
DMX_SOURCE_FRONT3,
DMX_SOURCE_DVR0 = 16,
DMX_SOURCE_DVR1,
DMX_SOURCE_DVR2,
DMX_SOURCE_DVR3
DMX_SOURCE_FRONT0 = 0,
DMX_SOURCE_FRONT1,
DMX_SOURCE_FRONT2,
DMX_SOURCE_FRONT3,
DMX_SOURCE_DVR0 = 16,
DMX_SOURCE_DVR1,
DMX_SOURCE_DVR2,
DMX_SOURCE_DVR3
} dmx_source_t;
struct dmx_stc {
unsigned int num; /* input : which STC? 0..N */
unsigned int base; /* output: divisor for stc to get 90 kHz clock */
__u64 stc; /* output: stc in 'base'*90 kHz units */
unsigned int num; /* input : which STC? 0..N */
unsigned int base; /* output: divisor for stc to get 90 kHz clock */
__u64 stc; /* output: stc in 'base'*90 kHz units */
};
#define DMX_START _IO('o', 41)
......
This diff is collapsed.
......@@ -50,7 +50,7 @@ Arguments
- .. row 4
-
-
- if any, is to be stored.
......
......@@ -38,7 +38,7 @@ Arguments
- int request
- Equals :ref:`FE_SET_FRONTEND` for this
command.
command.
- .. row 3
......
......@@ -39,8 +39,8 @@ Arguments
- int request
- Equals
:ref:`FE_READ_SIGNAL_STRENGTH`
for this command.
:ref:`FE_READ_SIGNAL_STRENGTH`
for this command.
- .. row 3
......
......@@ -41,8 +41,8 @@ Arguments
- int request
- Equals
:ref:`FE_READ_UNCORRECTED_BLOCKS`
for this command.
:ref:`FE_READ_UNCORRECTED_BLOCKS`
for this command.
- .. row 3
......
......@@ -45,7 +45,7 @@ Arguments
- int request
- Equals :ref:`FE_SET_FRONTEND` for this
command.
command.
- .. row 3
......
......@@ -23,8 +23,8 @@ from an internal (demux) or external (user write) source.
.. code-block:: c
typedef enum {
AUDIO_SOURCE_DEMUX,
AUDIO_SOURCE_MEMORY
AUDIO_SOURCE_DEMUX,
AUDIO_SOURCE_MEMORY
} audio_stream_source_t;
AUDIO_SOURCE_DEMUX selects the demultiplexer (fed either by the
......@@ -45,9 +45,9 @@ representing the state of audio playback.
.. code-block:: c
typedef enum {
AUDIO_STOPPED,
AUDIO_PLAYING,
AUDIO_PAUSED
AUDIO_STOPPED,
AUDIO_PLAYING,
AUDIO_PAUSED
} audio_play_state_t;
......@@ -63,11 +63,11 @@ the following values.
.. code-block:: c
typedef enum {
AUDIO_STEREO,
AUDIO_MONO_LEFT,
AUDIO_MONO_RIGHT,
AUDIO_MONO,
AUDIO_STEREO_SWAPPED
AUDIO_STEREO,
AUDIO_MONO_LEFT,
AUDIO_MONO_RIGHT,
AUDIO_MONO,
AUDIO_STEREO_SWAPPED
} audio_channel_select_t;
......@@ -83,13 +83,13 @@ 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;
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;
......@@ -105,8 +105,8 @@ audio volume.
.. code-block:: c
typedef struct audio_mixer {
unsigned int volume_left;
unsigned int volume_right;
unsigned int volume_left;
unsigned int volume_right;
} audio_mixer_t;
......@@ -144,9 +144,9 @@ The ioctl AUDIO_SET_KARAOKE uses the following format:
typedef
struct audio_karaoke {
int vocal1;
int vocal2;
int melody;
int vocal1;
int vocal2;
int melody;
} audio_karaoke_t;
If Vocal1 or Vocal2 are non-zero, they get mixed into left and right t
......
......@@ -58,22 +58,22 @@ Arguments
- .. 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)
......@@ -529,12 +529,12 @@ Arguments
- .. row 4
-
-
- TRUE Audio Mute
- .. row 5
-
-
- FALSE Audio Un-mute
......@@ -592,12 +592,12 @@ Arguments
- .. row 4
-
-
- TRUE AV-sync ON
- .. row 5
-
-
- FALSE AV-sync OFF
......@@ -655,16 +655,16 @@ Arguments
- boolean mode
- Enables or disables the decoding of the current Audio stream in
the DVB subsystem.
the DVB subsystem.
- .. row 4
-
-
- TRUE Bypass is disabled
- .. row 5
-
-
- FALSE Bypass is enabled
......@@ -836,11 +836,11 @@ Arguments
- __u64 \*pts
- Returns the 33-bit timestamp as defined in ITU T-REC-H.222.0 /
ISO/IEC 13818-1.
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.
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.
Return Value
......
......@@ -16,16 +16,16 @@ ca_slot_info_t
.. code-block:: c
typedef struct ca_slot_info {
int num; /* slot number */
int num; /* slot number */
int type; /* CA interface this slot supports */
int type; /* CA interface this slot supports */
#define CA_CI 1 /* CI high level interface */
#define CA_CI_LINK 2 /* CI link layer level interface */
#define CA_CI_PHYS 4 /* CI physical layer level interface */
#define CA_DESCR 8 /* built-in descrambler */
#define CA_SC 128 /* simple smart card interface */
unsigned int flags;
unsigned int flags;
#define CA_CI_MODULE_PRESENT 1 /* module (or card) inserted */
#define CA_CI_MODULE_READY 2
} ca_slot_info_t;
......@@ -40,8 +40,8 @@ ca_descr_info_t
.. code-block:: c
typedef struct ca_descr_info {
unsigned int num; /* number of available descramblers (keys) */
unsigned int type; /* type of supported scrambling system */
unsigned int num; /* number of available descramblers (keys) */
unsigned int type; /* type of supported scrambling system */
#define CA_ECD 1
#define CA_NDS 2
#define CA_DSS 4
......@@ -57,10 +57,10 @@ ca_caps_t
.. code-block:: c
typedef struct ca_caps {
unsigned int slot_num; /* total number of CA card and module slots */
unsigned int slot_type; /* OR of all supported types */
unsigned int descr_num; /* total number of descrambler slots (keys) */
unsigned int descr_type;/* OR of all supported types */
unsigned int slot_num; /* total number of CA card and module slots */
unsigned int slot_type; /* OR of all supported types */
unsigned int descr_num; /* total number of descrambler slots (keys) */
unsigned int descr_type;/* OR of all supported types */
} ca_cap_t;
......@@ -74,10 +74,10 @@ ca_msg_t
/* a message to/from a CI-CAM */
typedef struct ca_msg {
unsigned int index;
unsigned int type;
unsigned int length;
unsigned char msg[256];
unsigned int index;
unsigned int type;
unsigned int length;
unsigned char msg[256];
} ca_msg_t;
......@@ -90,9 +90,9 @@ ca_descr_t
.. code-block:: c
typedef struct ca_descr {
unsigned int index;
unsigned int parity;
unsigned char cw[8];
unsigned int index;
unsigned int parity;
unsigned char cw[8];
} ca_descr_t;
......@@ -105,6 +105,6 @@ ca-pid
.. code-block:: c
typedef struct ca_pid {
unsigned int pid;
int index; /* -1 == disable*/
unsigned int pid;
int index; /* -1 == disable*/
} ca_pid_t;
......@@ -57,22 +57,22 @@ Arguments
- .. 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)
......
......@@ -61,17 +61,17 @@ Arguments
- .. row 3
-
-
- O_RDWR read/write access
- .. row 4
-
-
- O_NONBLOCK open in non-blocking mode
- .. row 5
-
-
- (blocking mode is the default)
......@@ -236,33 +236,33 @@ Return Value
- ``ECRC``
- Last section had a CRC error - no data returned. The buffer is
flushed.
flushed.
- .. row 4
- ``EOVERFLOW``
-
-
- .. row 5
-
-
- The filtered data was not read from the buffer in due time,
resulting in non-read data being lost. The buffer is flushed.
resulting in non-read data being lost. The buffer is flushed.
- .. row 6
- ``ETIMEDOUT``
- The section was not loaded within the stated timeout period. See
ioctl DMX_SET_FILTER for how to set a timeout.
ioctl DMX_SET_FILTER for how to set a timeout.
- .. row 7
- ``EFAULT``
- The driver failed to write to the callers buffer due to an invalid
\*buf pointer.
\*buf pointer.
......@@ -330,18 +330,18 @@ Return Value
- ``EWOULDBLOCK``
- No data was written. This might happen if O_NONBLOCK was
specified and there is no more buffer space available (if
O_NONBLOCK is not specified the function will block until buffer
space is available).
specified and there is no more buffer space available (if
O_NONBLOCK is not specified the function will block until buffer
space is available).
- .. row 2
- ``EBUSY``
- This error code indicates that there are conflicting requests. The
corresponding demux device is setup to receive data from the
front- end. Make sure that these filters are stopped and that the
filters with input set to DMX_IN_DVR are started.
corresponding demux device is setup to receive data from the
front- end. Make sure that these filters are stopped and that the
filters with input set to DMX_IN_DVR are started.
- .. row 3
......@@ -409,16 +409,16 @@ appropriately. The generic error codes are described at the
- ``EINVAL``
- Invalid argument, i.e. no filtering parameters provided via the
DMX_SET_FILTER or DMX_SET_PES_FILTER functions.
DMX_SET_FILTER or DMX_SET_PES_FILTER functions.
- .. row 2
- ``EBUSY``
- This error code indicates that there are conflicting requests.
There are active filters filtering data from another input source.
Make sure that these filters are stopped before starting this
filter.
There are active filters filtering data from another input source.
Make sure that these filters are stopped before starting this
filter.
......@@ -597,9 +597,9 @@ appropriately. The generic error codes are described at the
- ``EBUSY``
- This error code indicates that there are conflicting requests.
There are active filters filtering data from another input source.
Make sure that these filters are stopped before starting this
filter.
There are active filters filtering data from another input source.
Make sure that these filters are stopped before starting this
filter.
......
......@@ -30,7 +30,7 @@ Output for the demux
- .. _`DMX-OUT-DECODER`:
DMX_OUT_DECODER
DMX_OUT_DECODER
- Streaming directly to decoder.
......@@ -38,31 +38,31 @@ Output for the demux
- .. _`DMX-OUT-TAP`:
DMX_OUT_TAP
DMX_OUT_TAP
- Output going to a memory buffer (to be retrieved via the read
command). Delivers the stream output to the demux device on which
the ioctl is called.
command). Delivers the stream output to the demux device on which
the ioctl is called.
- .. row 4
- .. _`DMX-OUT-TS-TAP`:
DMX_OUT_TS_TAP
DMX_OUT_TS_TAP
- Output multiplexed into a new TS (to be retrieved by reading from
the logical DVR device). Routes output to the logical DVR device
``/dev/dvb/adapter?/dvr?``, which delivers a TS multiplexed from
all filters for which ``DMX_OUT_TS_TAP`` was specified.
the logical DVR device). Routes output to the logical DVR device
``/dev/dvb/adapter?/dvr?``, which delivers a TS multiplexed from
all filters for which ``DMX_OUT_TS_TAP`` was specified.
- .. row 5
- .. _`DMX-OUT-TSDEMUX-TAP`:
DMX_OUT_TSDEMUX_TAP
DMX_OUT_TSDEMUX_TAP
- Like :ref:`DMX_OUT_TS_TAP <DMX-OUT-TS-TAP>` but retrieved
from the DMX device.
from the DMX device.
......@@ -76,8 +76,8 @@ dmx_input_t
typedef enum
{
DMX_IN_FRONTEND, /* Input from a front-end device. */
DMX_IN_DVR /* Input from the logical DVR device. */
DMX_IN_FRONTEND, /* Input from a front-end device. */
DMX_IN_DVR /* Input from the logical DVR device. */
} dmx_input_t;
......@@ -91,31 +91,31 @@ dmx_pes_type_t
typedef enum
{
DMX_PES_AUDIO0,
DMX_PES_VIDEO0,
DMX_PES_TELETEXT0,
DMX_PES_SUBTITLE0,
DMX_PES_PCR0,
DMX_PES_AUDIO1,
DMX_PES_VIDEO1,
DMX_PES_TELETEXT1,
DMX_PES_SUBTITLE1,
DMX_PES_PCR1,
DMX_PES_AUDIO2,
DMX_PES_VIDEO2,
DMX_PES_TELETEXT2,
DMX_PES_SUBTITLE2,
DMX_PES_PCR2,
DMX_PES_AUDIO3,
DMX_PES_VIDEO3,
DMX_PES_TELETEXT3,
DMX_PES_SUBTITLE3,
DMX_PES_PCR3,
DMX_PES_OTHER
DMX_PES_AUDIO0,
DMX_PES_VIDEO0,
DMX_PES_TELETEXT0,
DMX_PES_SUBTITLE0,
DMX_PES_PCR0,
DMX_PES_AUDIO1,
DMX_PES_VIDEO1,
DMX_PES_TELETEXT1,
DMX_PES_SUBTITLE1,
DMX_PES_PCR1,
DMX_PES_AUDIO2,
DMX_PES_VIDEO2,
DMX_PES_TELETEXT2,
DMX_PES_SUBTITLE2,
DMX_PES_PCR2,
DMX_PES_AUDIO3,
DMX_PES_VIDEO3,
DMX_PES_TELETEXT3,
DMX_PES_SUBTITLE3,
DMX_PES_PCR3,
DMX_PES_OTHER
} dmx_pes_type_t;
......@@ -129,9 +129,9 @@ struct dmx_filter
typedef struct dmx_filter
{
__u8 filter[DMX_FILTER_SIZE];
__u8 mask[DMX_FILTER_SIZE];
__u8 mode[DMX_FILTER_SIZE];
__u8 filter[DMX_FILTER_SIZE];
__u8 mask[DMX_FILTER_SIZE];
__u8 mode[DMX_FILTER_SIZE];
} dmx_filter_t;
......@@ -145,10 +145,10 @@ struct dmx_sct_filter_params
struct dmx_sct_filter_params
{
__u16 pid;
dmx_filter_t filter;
__u32 timeout;
__u32 flags;
__u16 pid;
dmx_filter_t filter;
__u32 timeout;
__u32 flags;
#define DMX_CHECK_CRC 1
#define DMX_ONESHOT 2
#define DMX_IMMEDIATE_START 4
......@@ -166,11 +166,11 @@ struct dmx_pes_filter_params
struct dmx_pes_filter_params
{
__u16 pid;
dmx_input_t input;
dmx_output_t output;
dmx_pes_type_t pes_type;
__u32 flags;
__u16 pid;
dmx_input_t input;
dmx_output_t output;
dmx_pes_type_t pes_type;
__u32 flags;
};
......@@ -184,12 +184,12 @@ struct dmx_event
struct dmx_event
{
dmx_event_t event;
time_t timeStamp;
union
{
dmx_scrambling_status_t scrambling;
} u;
dmx_event_t event;
time_t timeStamp;
union
{
dmx_scrambling_status_t scrambling;
} u;
};
......@@ -202,9 +202,9 @@ struct dmx_stc
.. code-block:: c
struct dmx_stc {
unsigned int num; /* input : which STC? 0..N */
unsigned int base; /* output: divisor for stc to get 90 kHz clock */
__u64 stc; /* output: stc in 'base'*90 kHz units */
unsigned int num; /* input : which STC? 0..N */
unsigned int base; /* output: divisor for stc to get 90 kHz clock */
__u64 stc; /* output: stc in 'base'*90 kHz units */
};
......@@ -217,8 +217,8 @@ struct dmx_caps
.. code-block:: c
typedef struct dmx_caps {
__u32 caps;
int num_decoders;
__u32 caps;
int num_decoders;
} dmx_caps_t;
......@@ -231,12 +231,12 @@ enum dmx_source_t
.. code-block:: c
typedef enum {
DMX_SOURCE_FRONT0 = 0,
DMX_SOURCE_FRONT1,
DMX_SOURCE_FRONT2,
DMX_SOURCE_FRONT3,
DMX_SOURCE_DVR0 = 16,
DMX_SOURCE_DVR1,
DMX_SOURCE_DVR2,
DMX_SOURCE_DVR3
DMX_SOURCE_FRONT0 = 0,
DMX_SOURCE_FRONT1,
DMX_SOURCE_FRONT2,
DMX_SOURCE_FRONT3,
DMX_SOURCE_DVR0 = 16,
DMX_SOURCE_DVR1,
DMX_SOURCE_DVR2,
DMX_SOURCE_DVR3
} dmx_source_t;
......@@ -12,6 +12,6 @@ struct dtv_fe_stats
#define MAX_DTV_STATS 4
struct dtv_fe_stats {
__u8 len;
struct dtv_stats stat[MAX_DTV_STATS];
__u8 len;
struct dtv_stats stat[MAX_DTV_STATS];
} __packed;
......@@ -10,6 +10,6 @@ struct dtv_properties
.. code-block:: c
struct dtv_properties {
__u32 num;
struct dtv_property *props;
__u32 num;
struct dtv_property *props;
};
......@@ -12,19 +12,19 @@ struct dtv_property
/* Reserved fields should be set to 0 */
struct dtv_property {
__u32 cmd;
__u32 reserved[3];
union {
__u32 data;
struct dtv_fe_stats st;
struct {
__u8 data[32];
__u32 len;
__u32 reserved1[3];
void *reserved2;
} buffer;
} u;
int result;
__u32 cmd;
__u32 reserved[3];
union {
__u32 data;
struct dtv_fe_stats st;
struct {
__u8 data[32];
__u32 len;
__u32 reserved1[3];
void *reserved2;
} buffer;
} u;
int result;
} __attribute__ ((packed));
/* num of properties cannot exceed DTV_IOCTL_MAX_MSGS per ioctl */
......
......@@ -10,9 +10,9 @@ struct dtv_stats
.. code-block:: c
struct dtv_stats {
__u8 scale; /* enum fecap_scale_params type */
union {
__u64 uvalue; /* for counters and relative scales */
__s64 svalue; /* for 1/1000 dB measures */
};
__u8 scale; /* enum fecap_scale_params type */
union {
__u64 uvalue; /* for counters and relative scales */
__s64 svalue; /* for 1/1000 dB measures */
};
} __packed;
......@@ -10,6 +10,6 @@ frontend events
.. code-block:: c
struct dvb_frontend_event {
fe_status_t status;
struct dvb_frontend_parameters parameters;
fe_status_t status;
struct dvb_frontend_parameters parameters;
};
......@@ -30,15 +30,15 @@ FrontendParameters structure:
.. code-block:: c
struct dvb_frontend_parameters {
uint32_t frequency; /* (absolute) frequency in Hz for QAM/OFDM */
/* intermediate frequency in kHz for QPSK */
fe_spectral_inversion_t inversion;
union {
struct dvb_qpsk_parameters qpsk;
struct dvb_qam_parameters qam;
struct dvb_ofdm_parameters ofdm;
struct dvb_vsb_parameters vsb;
} u;
uint32_t frequency; /* (absolute) frequency in Hz for QAM/OFDM */
/* intermediate frequency in kHz for QPSK */
fe_spectral_inversion_t inversion;
union {
struct dvb_qpsk_parameters qpsk;
struct dvb_qam_parameters qam;
struct dvb_ofdm_parameters ofdm;
struct dvb_vsb_parameters vsb;
} u;
};
In the case of QPSK frontends the ``frequency`` field specifies the
......@@ -61,8 +61,8 @@ structure:
.. code-block:: c
struct dvb_qpsk_parameters {
uint32_t symbol_rate; /* symbol rate in Symbols per second */
fe_code_rate_t fec_inner; /* forward error correction (see above) */
uint32_t symbol_rate; /* symbol rate in Symbols per second */
fe_code_rate_t fec_inner; /* forward error correction (see above) */
};
......@@ -77,9 +77,9 @@ for cable QAM frontend you use the ``dvb_qam_parameters`` structure:
.. code-block:: c
struct dvb_qam_parameters {
uint32_t symbol_rate; /* symbol rate in Symbols per second */
fe_code_rate_t fec_inner; /* forward error correction (see above) */
fe_modulation_t modulation; /* modulation type (see above) */
uint32_t symbol_rate; /* symbol rate in Symbols per second */
fe_code_rate_t fec_inner; /* forward error correction (see above) */
fe_modulation_t modulation; /* modulation type (see above) */
};
......@@ -94,7 +94,7 @@ ATSC frontends are supported by the ``dvb_vsb_parameters`` structure:
.. code-block:: c
struct dvb_vsb_parameters {
fe_modulation_t modulation; /* modulation type (see above) */
fe_modulation_t modulation; /* modulation type (see above) */
};
......@@ -109,11 +109,11 @@ DVB-T frontends are supported by the ``dvb_ofdm_parameters`` structure:
.. code-block:: c
struct dvb_ofdm_parameters {
fe_bandwidth_t bandwidth;
fe_code_rate_t code_rate_HP; /* high priority stream code rate */
fe_code_rate_t code_rate_LP; /* low priority stream code rate */
fe_modulation_t constellation; /* modulation type (see above) */
fe_transmit_mode_t transmission_mode;
fe_guard_interval_t guard_interval;
fe_hierarchy_t hierarchy_information;
fe_bandwidth_t bandwidth;
fe_code_rate_t code_rate_HP; /* high priority stream code rate */
fe_code_rate_t code_rate_LP; /* low priority stream code rate */
fe_modulation_t constellation; /* modulation type (see above) */
fe_transmit_mode_t transmission_mode;
fe_guard_interval_t guard_interval;
fe_hierarchy_t hierarchy_information;
};
......@@ -59,33 +59,33 @@ The code that would do the above is:
#include <linux/dvb/frontend.h>
static struct dtv_property props[] = {
{ .cmd = DTV_DELIVERY_SYSTEM, .u.data = SYS_DVBC_ANNEX_A },
{ .cmd = DTV_FREQUENCY, .u.data = 651000000 },
{ .cmd = DTV_MODULATION, .u.data = QAM_256 },
{ .cmd = DTV_INVERSION, .u.data = INVERSION_AUTO },
{ .cmd = DTV_SYMBOL_RATE, .u.data = 5217000 },
{ .cmd = DTV_INNER_FEC, .u.data = FEC_3_4 },
{ .cmd = DTV_TUNE }
{ .cmd = DTV_DELIVERY_SYSTEM, .u.data = SYS_DVBC_ANNEX_A },
{ .cmd = DTV_FREQUENCY, .u.data = 651000000 },
{ .cmd = DTV_MODULATION, .u.data = QAM_256 },
{ .cmd = DTV_INVERSION, .u.data = INVERSION_AUTO },
{ .cmd = DTV_SYMBOL_RATE, .u.data = 5217000 },
{ .cmd = DTV_INNER_FEC, .u.data = FEC_3_4 },
{ .cmd = DTV_TUNE }
};
static struct dtv_properties dtv_prop = {
.num = 6, .props = props
.num = 6, .props = props
};
int main(void)
{
int fd = open("/dev/dvb/adapter0/frontend0", O_RDWR);
if (!fd) {
perror ("open");
return -1;
}
if (ioctl(fd, FE_SET_PROPERTY, &dtv_prop) == -1) {
perror("ioctl");
return -1;
}
printf("Frontend set\\n");
return 0;
int fd = open("/dev/dvb/adapter0/frontend0", O_RDWR);
if (!fd) {
perror ("open");
return -1;
}
if (ioctl(fd, FE_SET_PROPERTY, &dtv_prop) == -1) {
perror("ioctl");
return -1;
}
printf("Frontend set\\n");
return 0;
}
NOTE: While it is possible to directly call the Kernel code like the
......
......@@ -24,7 +24,7 @@ Frontend bandwidth
- .. _`BANDWIDTH-AUTO`:
``BANDWIDTH_AUTO``
``BANDWIDTH_AUTO``
- Autodetect bandwidth (if supported)
......@@ -32,7 +32,7 @@ Frontend bandwidth
- .. _`BANDWIDTH-1-712-MHZ`:
``BANDWIDTH_1_712_MHZ``
``BANDWIDTH_1_712_MHZ``
- 1.712 MHz
......@@ -40,7 +40,7 @@ Frontend bandwidth
- .. _`BANDWIDTH-5-MHZ`:
``BANDWIDTH_5_MHZ``
``BANDWIDTH_5_MHZ``
- 5 MHz
......@@ -48,7 +48,7 @@ Frontend bandwidth
- .. _`BANDWIDTH-6-MHZ`:
``BANDWIDTH_6_MHZ``
``BANDWIDTH_6_MHZ``
- 6 MHz
......@@ -56,7 +56,7 @@ Frontend bandwidth
- .. _`BANDWIDTH-7-MHZ`:
``BANDWIDTH_7_MHZ``
``BANDWIDTH_7_MHZ``
- 7 MHz
......@@ -64,7 +64,7 @@ Frontend bandwidth
- .. _`BANDWIDTH-8-MHZ`:
``BANDWIDTH_8_MHZ``
``BANDWIDTH_8_MHZ``
- 8 MHz
......@@ -72,6 +72,6 @@ Frontend bandwidth
- .. _`BANDWIDTH-10-MHZ`:
``BANDWIDTH_10_MHZ``
``BANDWIDTH_10_MHZ``
- 10 MHz
......@@ -65,7 +65,7 @@ appropriately. The generic error codes are described at the
- msg_len
- Length of the DiSEqC message. Valid values are 0 to 4, where 0
means no msg
means no msg
- .. row 3
......@@ -74,4 +74,4 @@ appropriately. The generic error codes are described at the
- timeout
- Return from ioctl after timeout ms with errorcode when no message
was received
was received
......@@ -69,7 +69,7 @@ enum fe_sec_mini_cmd
- .. _`SEC-MINI-A`:
``SEC_MINI_A``
``SEC_MINI_A``
- Sends a mini-DiSEqC 22kHz '0' Tone Burst to select satellite-A
......@@ -77,6 +77,6 @@ enum fe_sec_mini_cmd
- .. _`SEC-MINI-B`:
``SEC_MINI_B``
``SEC_MINI_B``
- Sends a mini-DiSEqC 22kHz '1' Data Burst to select satellite-B
......@@ -71,8 +71,8 @@ appropriately. The generic error codes are described at the
- type
- **DEPRECATED**. DVBv3 type. Should not be used on modern programs,
as a frontend may have more than one type. So, the DVBv5 API
should be used instead to enumerate and select the frontend type.
as a frontend may have more than one type. So, the DVBv5 API
should be used instead to enumerate and select the frontend type.
- .. row 3
......@@ -177,16 +177,16 @@ supported only on some specific frontend types.
- .. _`FE-IS-STUPID`:
``FE_IS_STUPID``
``FE_IS_STUPID``
- There's something wrong at the frontend, and it can't report its
capabilities
capabilities
- .. row 3
- .. _`FE-CAN-INVERSION-AUTO`:
``FE_CAN_INVERSION_AUTO``
``FE_CAN_INVERSION_AUTO``
- The frontend is capable of auto-detecting inversion
......@@ -194,7 +194,7 @@ supported only on some specific frontend types.
- .. _`FE-CAN-FEC-1-2`:
``FE_CAN_FEC_1_2``
``FE_CAN_FEC_1_2``
- The frontend supports FEC 1/2
......@@ -202,7 +202,7 @@ supported only on some specific frontend types.
- .. _`FE-CAN-FEC-2-3`:
``FE_CAN_FEC_2_3``
``FE_CAN_FEC_2_3``
- The frontend supports FEC 2/3
......@@ -210,7 +210,7 @@ supported only on some specific frontend types.
- .. _`FE-CAN-FEC-3-4`:
``FE_CAN_FEC_3_4``
``FE_CAN_FEC_3_4``
- The frontend supports FEC 3/4
......@@ -218,7 +218,7 @@ supported only on some specific frontend types.
- .. _`FE-CAN-FEC-4-5`:
``FE_CAN_FEC_4_5``
``FE_CAN_FEC_4_5``
- The frontend supports FEC 4/5
......@@ -226,7 +226,7 @@ supported only on some specific frontend types.
- .. _`FE-CAN-FEC-5-6`:
``FE_CAN_FEC_5_6``
``FE_CAN_FEC_5_6``
- The frontend supports FEC 5/6
......@@ -234,7 +234,7 @@ supported only on some specific frontend types.
- .. _`FE-CAN-FEC-6-7`:
``FE_CAN_FEC_6_7``
``FE_CAN_FEC_6_7``
- The frontend supports FEC 6/7
......@@ -242,7 +242,7 @@ supported only on some specific frontend types.
- .. _`FE-CAN-FEC-7-8`:
``FE_CAN_FEC_7_8``
``FE_CAN_FEC_7_8``
- The frontend supports FEC 7/8
......@@ -250,7 +250,7 @@ supported only on some specific frontend types.
- .. _`FE-CAN-FEC-8-9`:
``FE_CAN_FEC_8_9``
``FE_CAN_FEC_8_9``
- The frontend supports FEC 8/9
......@@ -258,7 +258,7 @@ supported only on some specific frontend types.
- .. _`FE-CAN-FEC-AUTO`:
``FE_CAN_FEC_AUTO``
``FE_CAN_FEC_AUTO``
- The frontend can autodetect FEC.
......@@ -266,7 +266,7 @@ supported only on some specific frontend types.
- .. _`FE-CAN-QPSK`:
``FE_CAN_QPSK``
``FE_CAN_QPSK``
- The frontend supports QPSK modulation
......@@ -274,7 +274,7 @@ supported only on some specific frontend types.
- .. _`FE-CAN-QAM-16`:
``FE_CAN_QAM_16``
``FE_CAN_QAM_16``
- The frontend supports 16-QAM modulation
......@@ -282,7 +282,7 @@ supported only on some specific frontend types.
- .. _`FE-CAN-QAM-32`:
``FE_CAN_QAM_32``
``FE_CAN_QAM_32``
- The frontend supports 32-QAM modulation
......@@ -290,7 +290,7 @@ supported only on some specific frontend types.
- .. _`FE-CAN-QAM-64`:
``FE_CAN_QAM_64``
``FE_CAN_QAM_64``
- The frontend supports 64-QAM modulation
......@@ -298,7 +298,7 @@ supported only on some specific frontend types.
- .. _`FE-CAN-QAM-128`:
``FE_CAN_QAM_128``
``FE_CAN_QAM_128``
- The frontend supports 128-QAM modulation
......@@ -306,7 +306,7 @@ supported only on some specific frontend types.
- .. _`FE-CAN-QAM-256`:
``FE_CAN_QAM_256``
``FE_CAN_QAM_256``
- The frontend supports 256-QAM modulation
......@@ -314,7 +314,7 @@ supported only on some specific frontend types.
- .. _`FE-CAN-QAM-AUTO`:
``FE_CAN_QAM_AUTO``
``FE_CAN_QAM_AUTO``
- The frontend can autodetect modulation
......@@ -322,7 +322,7 @@ supported only on some specific frontend types.
- .. _`FE-CAN-TRANSMISSION-MODE-AUTO`:
``FE_CAN_TRANSMISSION_MODE_AUTO``
``FE_CAN_TRANSMISSION_MODE_AUTO``
- The frontend can autodetect the transmission mode
......@@ -330,7 +330,7 @@ supported only on some specific frontend types.
- .. _`FE-CAN-BANDWIDTH-AUTO`:
``FE_CAN_BANDWIDTH_AUTO``
``FE_CAN_BANDWIDTH_AUTO``
- The frontend can autodetect the bandwidth
......@@ -338,7 +338,7 @@ supported only on some specific frontend types.
- .. _`FE-CAN-GUARD-INTERVAL-AUTO`:
``FE_CAN_GUARD_INTERVAL_AUTO``
``FE_CAN_GUARD_INTERVAL_AUTO``
- The frontend can autodetect the guard interval
......@@ -346,7 +346,7 @@ supported only on some specific frontend types.
- .. _`FE-CAN-HIERARCHY-AUTO`:
``FE_CAN_HIERARCHY_AUTO``
``FE_CAN_HIERARCHY_AUTO``
- The frontend can autodetect hierarch
......@@ -354,7 +354,7 @@ supported only on some specific frontend types.
- .. _`FE-CAN-8VSB`:
``FE_CAN_8VSB``
``FE_CAN_8VSB``
- The frontend supports 8-VSB modulation
......@@ -362,7 +362,7 @@ supported only on some specific frontend types.
- .. _`FE-CAN-16VSB`:
``FE_CAN_16VSB``
``FE_CAN_16VSB``
- The frontend supports 16-VSB modulation
......@@ -370,7 +370,7 @@ supported only on some specific frontend types.
- .. _`FE-HAS-EXTENDED-CAPS`:
``FE_HAS_EXTENDED_CAPS``
``FE_HAS_EXTENDED_CAPS``
- Currently, unused
......@@ -378,7 +378,7 @@ supported only on some specific frontend types.
- .. _`FE-CAN-MULTISTREAM`:
``FE_CAN_MULTISTREAM``
``FE_CAN_MULTISTREAM``
- The frontend supports multistream filtering
......@@ -386,7 +386,7 @@ supported only on some specific frontend types.
- .. _`FE-CAN-TURBO-FEC`:
``FE_CAN_TURBO_FEC``
``FE_CAN_TURBO_FEC``
- The frontend supports turbo FEC modulation
......@@ -394,7 +394,7 @@ supported only on some specific frontend types.
- .. _`FE-CAN-2G-MODULATION`:
``FE_CAN_2G_MODULATION``
``FE_CAN_2G_MODULATION``
- The frontend supports "2nd generation modulation" (DVB-S2/T2)>
......@@ -402,7 +402,7 @@ supported only on some specific frontend types.
- .. _`FE-NEEDS-BENDING`:
``FE_NEEDS_BENDING``
``FE_NEEDS_BENDING``
- Not supported anymore, don't use it
......@@ -410,7 +410,7 @@ supported only on some specific frontend types.
- .. _`FE-CAN-RECOVER`:
``FE_CAN_RECOVER``
``FE_CAN_RECOVER``
- The frontend can recover from a cable unplug automatically
......@@ -418,6 +418,6 @@ supported only on some specific frontend types.
- .. _`FE-CAN-MUTE-TS`:
``FE_CAN_MUTE_TS``
``FE_CAN_MUTE_TS``
- The frontend can stop spurious TS data output
......@@ -77,7 +77,7 @@ state changes of the frontend hardware. It is produced using the enum
- .. _`FE-HAS-SIGNAL`:
``FE_HAS_SIGNAL``
``FE_HAS_SIGNAL``
- The frontend has found something above the noise level
......@@ -85,7 +85,7 @@ state changes of the frontend hardware. It is produced using the enum
- .. _`FE-HAS-CARRIER`:
``FE_HAS_CARRIER``
``FE_HAS_CARRIER``
- The frontend has found a DVB signal
......@@ -93,16 +93,16 @@ state changes of the frontend hardware. It is produced using the enum
- .. _`FE-HAS-VITERBI`:
``FE_HAS_VITERBI``
``FE_HAS_VITERBI``
- The frontend FEC inner coding (Viterbi, LDPC or other inner code)
is stable
is stable
- .. row 5
- .. _`FE-HAS-SYNC`:
``FE_HAS_SYNC``
``FE_HAS_SYNC``
- Synchronization bytes was found
......@@ -110,7 +110,7 @@ state changes of the frontend hardware. It is produced using the enum
- .. _`FE-HAS-LOCK`:
``FE_HAS_LOCK``
``FE_HAS_LOCK``
- The DVB were locked and everything is working
......@@ -118,7 +118,7 @@ state changes of the frontend hardware. It is produced using the enum
- .. _`FE-TIMEDOUT`:
``FE_TIMEDOUT``
``FE_TIMEDOUT``
- no lock within the last about 2 seconds
......@@ -126,7 +126,7 @@ state changes of the frontend hardware. It is produced using the enum
- .. _`FE-REINIT`:
``FE_REINIT``
``FE_REINIT``
- The frontend was reinitialized, application is recommended to
reset DiSEqC, tone and parameters
reset DiSEqC, tone and parameters
......@@ -75,7 +75,7 @@ enum fe_sec_tone_mode
- .. _`SEC-TONE-ON`:
``SEC_TONE_ON``
``SEC_TONE_ON``
- Sends a 22kHz tone burst to the antenna
......@@ -83,7 +83,7 @@ enum fe_sec_tone_mode
- .. _`SEC-TONE-OFF`:
``SEC_TONE_OFF``
``SEC_TONE_OFF``
- Don't send a 22kHz tone to the antenna (except if the
FE_DISEQC_* ioctls are called)
FE_DISEQC_* ioctls are called)
......@@ -26,13 +26,13 @@ fe_type_t type, defined as:
- Description
- :ref:`DTV_DELIVERY_SYSTEM <DTV-DELIVERY-SYSTEM>` equivalent
type
type
- .. row 2
- .. _`FE-QPSK`:
``FE_QPSK``
``FE_QPSK``
- For DVB-S standard
......@@ -42,7 +42,7 @@ fe_type_t type, defined as:
- .. _`FE-QAM`:
``FE_QAM``
``FE_QAM``
- For DVB-C annex A standard
......@@ -52,7 +52,7 @@ fe_type_t type, defined as:
- .. _`FE-OFDM`:
``FE_OFDM``
``FE_OFDM``
- For DVB-T standard
......@@ -62,10 +62,10 @@ fe_type_t type, defined as:
- .. _`FE-ATSC`:
``FE_ATSC``
``FE_ATSC``
- For ATSC standard (terrestrial) or for DVB-C Annex B (cable) used
in US.
in US.
- ``SYS_ATSC`` (terrestrial) or ``SYS_DVBC_ANNEX_B`` (cable)
......
......@@ -158,37 +158,37 @@ partial path like:
.. code-block:: c
#include <linux/dvb/audio.h>
#include <linux/dvb/audio.h>
.. code-block:: c
#include <linux/dvb/ca.h>
#include <linux/dvb/ca.h>
.. code-block:: c
#include <linux/dvb/dmx.h>
#include <linux/dvb/dmx.h>
.. code-block:: c
#include <linux/dvb/frontend.h>
#include <linux/dvb/frontend.h>
.. code-block:: c
#include <linux/dvb/net.h>
#include <linux/dvb/net.h>
.. code-block:: c
#include <linux/dvb/osd.h>
#include <linux/dvb/osd.h>
.. code-block:: c
#include <linux/dvb/video.h>
#include <linux/dvb/video.h>
To enable applications to support different API version, an additional
include file ``linux/dvb/version.h`` exists, which defines the constant
......
......@@ -116,8 +116,8 @@ struct dvb_net_if description
- feedtype
- Encapsulation type of the feed. It can be:
``DVB_NET_FEEDTYPE_MPE`` for MPE encoding or
``DVB_NET_FEEDTYPE_ULE`` for ULE encoding.
``DVB_NET_FEEDTYPE_MPE`` for MPE encoding or
``DVB_NET_FEEDTYPE_ULE`` for ULE encoding.
......
......@@ -58,22 +58,22 @@ Arguments
- .. 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)
......@@ -291,12 +291,12 @@ Arguments
- .. row 4
-
-
- TRUE: Blank screen when stop.
- .. row 5
-
-
- FALSE: Show last decoded frame.
......@@ -565,7 +565,7 @@ Arguments
- .. row 4
-
-
- FALSE: Show last decoded frame.
......@@ -677,7 +677,7 @@ Arguments
- __u64 \*pts
- Returns the number of frames displayed since the decoder was
started.
started.
Return Value
......@@ -735,11 +735,11 @@ Arguments
- __u64 \*pts
- Returns the 33-bit timestamp as defined in ITU T-REC-H.222.0 /
ISO/IEC 13818-1.
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.
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.
Return Value
......@@ -1754,7 +1754,7 @@ Arguments
- video_spu_t \*spu
- SPU decoding (de)activation and subid setting according to section
??.
??.
Return Value
......
......@@ -18,9 +18,9 @@ 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_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
......@@ -44,9 +44,9 @@ 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_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.
......@@ -65,10 +65,10 @@ 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_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
......@@ -89,9 +89,9 @@ 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_STOPPED, /* Video is stopped */
VIDEO_PLAYING, /* Video is currently playing */
VIDEO_FREEZED /* Video is freezed */
} video_play_state_t;
......@@ -107,27 +107,27 @@ 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;
};
__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;
};
};
......@@ -140,9 +140,9 @@ video_size_t
.. code-block:: c
typedef struct {
int w;
int h;
video_format_t aspect_ratio;
int w;
int h;
video_format_t aspect_ratio;
} video_size_t;
......@@ -158,17 +158,17 @@ VIDEO_GET_EVENT call.
.. code-block:: c
struct video_event {
__s32 type;
__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
__kernel_time_t timestamp;
union {
video_size_t size;
unsigned int frame_rate; /* in frames per 1000sec */
unsigned char vsync_field; /* unknown/odd/even/progressive */
} u;
__kernel_time_t timestamp;
union {
video_size_t size;
unsigned int frame_rate; /* in frames per 1000sec */
unsigned char vsync_field; /* unknown/odd/even/progressive */
} u;
};
......@@ -184,11 +184,11 @@ 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 */
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
......@@ -216,8 +216,8 @@ within the following structure.
/* 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;
char *iFrame; /* pointer to a single iframe in memory */
int32_t size;
};
......@@ -237,12 +237,12 @@ following bits set according to the hardwares capabilities.
#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) */
(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) */
(CSS API is not present yet) */
#define VIDEO_CAP_SPU 16
#define VIDEO_CAP_NAVI 32
#define VIDEO_CAP_CSS 64
......@@ -260,14 +260,14 @@ output. The following system types can be set:
.. code-block:: c
typedef enum {
VIDEO_SYSTEM_PAL,
VIDEO_SYSTEM_NTSC,
VIDEO_SYSTEM_PALN,
VIDEO_SYSTEM_PALNc,
VIDEO_SYSTEM_PALM,
VIDEO_SYSTEM_NTSC60,
VIDEO_SYSTEM_PAL60,
VIDEO_SYSTEM_PALM60
VIDEO_SYSTEM_PAL,
VIDEO_SYSTEM_NTSC,
VIDEO_SYSTEM_PALN,
VIDEO_SYSTEM_PALNc,
VIDEO_SYSTEM_PALM,
VIDEO_SYSTEM_NTSC60,
VIDEO_SYSTEM_PAL60,
VIDEO_SYSTEM_PALM60
} video_system_t;
......@@ -284,21 +284,21 @@ information. The call expects the following format for that information:
typedef
struct video_highlight {
boolean active; /* 1=show highlight, 0=hide highlight */
uint8_t contrast1; /* 7- 4 Pattern pixel contrast */
/* 3- 0 Background pixel contrast */
uint8_t contrast2; /* 7- 4 Emphasis pixel-2 contrast */
/* 3- 0 Emphasis pixel-1 contrast */
uint8_t color1; /* 7- 4 Pattern pixel color */
/* 3- 0 Background pixel color */
uint8_t color2; /* 7- 4 Emphasis pixel-2 color */
/* 3- 0 Emphasis pixel-1 color */
uint32_t ypos; /* 23-22 auto action mode */
/* 21-12 start y */
/* 9- 0 end y */
uint32_t xpos; /* 23-22 button color number */
/* 21-12 start x */
/* 9- 0 end x */
boolean active; /* 1=show highlight, 0=hide highlight */
uint8_t contrast1; /* 7- 4 Pattern pixel contrast */
/* 3- 0 Background pixel contrast */
uint8_t contrast2; /* 7- 4 Emphasis pixel-2 contrast */
/* 3- 0 Emphasis pixel-1 contrast */
uint8_t color1; /* 7- 4 Pattern pixel color */
/* 3- 0 Background pixel color */
uint8_t color2; /* 7- 4 Emphasis pixel-2 color */
/* 3- 0 Emphasis pixel-1 color */
uint32_t ypos; /* 23-22 auto action mode */
/* 21-12 start y */
/* 9- 0 end y */
uint32_t xpos; /* 23-22 button color number */
/* 21-12 start x */
/* 9- 0 end x */
} video_highlight_t;
......@@ -315,8 +315,8 @@ to the following format:
typedef
struct video_spu {
boolean active;
int stream_id;
boolean active;
int stream_id;
} video_spu_t;
......@@ -333,8 +333,8 @@ VIDEO_SPU_PALETTE:
typedef
struct video_spu_palette {
int length;
uint8_t *palette;
int length;
uint8_t *palette;
} video_spu_palette_t;
......@@ -351,8 +351,8 @@ passed to the ioctl VIDEO_GET_NAVI:
typedef
struct video_navi_pack {
int length; /* 0 ... 1024 */
uint8_t data[1024];
int length; /* 0 ... 1024 */
uint8_t data[1024];
} video_navi_pack_t;
......
......@@ -19,10 +19,10 @@ Generic Error Codes
- ``EAGAIN`` (aka ``EWOULDBLOCK``)
- The ioctl can't be handled because the device is in state where it
can't perform it. This could happen for example in case where
device is sleeping and ioctl is performed to query statistics. It
is also returned when the ioctl would need to wait for an event,
but the device was opened in non-blocking mode.
can't perform it. This could happen for example in case where
device is sleeping and ioctl is performed to query statistics. It
is also returned when the ioctl would need to wait for an event,
but the device was opened in non-blocking mode.
- .. row 2
......@@ -35,26 +35,26 @@ Generic Error Codes
- ``EBUSY``
- The ioctl can't be handled because the device is busy. This is
typically return while device is streaming, and an ioctl tried to
change something that would affect the stream, or would require
the usage of a hardware resource that was already allocated. The
ioctl must not be retried without performing another action to fix
the problem first (typically: stop the stream before retrying).
typically return while device is streaming, and an ioctl tried to
change something that would affect the stream, or would require
the usage of a hardware resource that was already allocated. The
ioctl must not be retried without performing another action to fix
the problem first (typically: stop the stream before retrying).
- .. row 4
- ``EFAULT``
- There was a failure while copying data from/to userspace, probably
caused by an invalid pointer reference.
caused by an invalid pointer reference.
- .. row 5
- ``EINVAL``
- One or more of the ioctl parameters are invalid or out of the
allowed range. This is a widely used error code. See the
individual ioctl requests for specific causes.
allowed range. This is a widely used error code. See the
individual ioctl requests for specific causes.
- .. row 6
......@@ -73,23 +73,23 @@ Generic Error Codes
- ``ENOTTY``
- The ioctl is not supported by the driver, actually meaning that
the required functionality is not available, or the file
descriptor is not for a media device.
the required functionality is not available, or the file
descriptor is not for a media device.
- .. row 9
- ``ENOSPC``
- On USB devices, the stream ioctl's can return this error, meaning
that this request would overcommit the usb bandwidth reserved for
periodic transfers (up to 80% of the USB bandwidth).
that this request would overcommit the usb bandwidth reserved for
periodic transfers (up to 80% of the USB bandwidth).
- .. row 10
- ``EPERM``
- Permission denied. Can be returned if the device needs write
permission, or some special capabilities is needed (e. g. root)
permission, or some special capabilities is needed (e. g. root)
Note 1: ioctls may return other error codes. Since errors may have side
......
......@@ -53,12 +53,12 @@ ioctl never fails.
- ``driver``\ [16]
- Name of the driver implementing the media API as a NUL-terminated
ASCII string. The driver version is stored in the
``driver_version`` field.
ASCII string. The driver version is stored in the
``driver_version`` field.
Driver specific applications can use this information to verify
the driver identity. It is also useful to work around known bugs,
or to identify drivers in error reports.
Driver specific applications can use this information to verify
the driver identity. It is also useful to work around known bugs,
or to identify drivers in error reports.
- .. row 2
......@@ -67,8 +67,8 @@ ioctl never fails.
- ``model``\ [32]
- Device model name as a NUL-terminated UTF-8 string. The device
version is stored in the ``device_version`` field and is not be
appended to the model name.
version is stored in the ``device_version`` field and is not be
appended to the model name.
- .. row 3
......@@ -85,8 +85,8 @@ ioctl never fails.
- ``bus_info``\ [32]
- Location of the device in the system as a NUL-terminated ASCII
string. This includes the bus type name (PCI, USB, ...) and a
bus-specific identifier.
string. This includes the bus type name (PCI, USB, ...) and a
bus-specific identifier.
- .. row 5
......@@ -111,8 +111,8 @@ ioctl never fails.
- ``driver_version``
- Media device driver version, formatted with the
``KERNEL_VERSION()`` macro. Together with the ``driver`` field
this identifies a particular driver.
``KERNEL_VERSION()`` macro. Together with the ``driver`` field
this identifies a particular driver.
- .. row 8
......@@ -121,7 +121,7 @@ ioctl never fails.
- ``reserved``\ [31]
- Reserved for future extensions. Drivers and applications must set
this array to zero.
this array to zero.
The ``serial`` and ``bus_info`` fields can be used to distinguish
......
......@@ -60,11 +60,11 @@ id's until they get an error.
- ``id``
-
-
-
-
- Entity id, set by the application. When the id is or'ed with
``MEDIA_ENT_ID_FLAG_NEXT``, the driver clears the flag and returns
the first entity with a larger id.
``MEDIA_ENT_ID_FLAG_NEXT``, the driver clears the flag and returns
the first entity with a larger id.
- .. row 2
......@@ -72,8 +72,8 @@ id's until they get an error.
- ``name``\ [32]
-
-
-
-
- Entity name as an UTF-8 NULL-terminated string.
- .. row 3
......@@ -82,8 +82,8 @@ id's until they get an error.
- ``type``
-
-
-
-
- Entity type, see :ref:`media-entity-type` for details.
- .. row 4
......@@ -92,8 +92,8 @@ id's until they get an error.
- ``revision``
-
-
-
-
- Entity revision. Always zero (obsolete)
- .. row 5
......@@ -102,8 +102,8 @@ id's until they get an error.
- ``flags``
-
-
-
-
- Entity flags, see :ref:`media-entity-flag` for details.
- .. row 6
......@@ -112,8 +112,8 @@ id's until they get an error.
- ``group_id``
-
-
-
-
- Entity group ID. Always zero (obsolete)
- .. row 7
......@@ -122,8 +122,8 @@ id's until they get an error.
- ``pads``
-
-
-
-
- Number of pads
- .. row 8
......@@ -132,10 +132,10 @@ id's until they get an error.
- ``links``
-
-
-
-
- Total number of outbound links. Inbound links are not counted in
this field.
this field.
- .. row 9
......@@ -143,18 +143,18 @@ id's until they get an error.
- .. row 10
-
-
- struct
- ``dev``
-
-
- Valid for (sub-)devices that create a single device node.
- .. row 11
-
-
-
-
- __u32
- ``major``
......@@ -163,8 +163,8 @@ id's until they get an error.
- .. row 12
-
-
-
-
- __u32
- ``minor``
......@@ -173,13 +173,13 @@ id's until they get an error.
- .. row 13
-
-
- __u8
- ``raw``\ [184]
-
-
-
-
......
......@@ -78,7 +78,7 @@ returned during the enumeration process.
- \*\ ``pads``
- Pointer to a pads array allocated by the application. Ignored if
NULL.
NULL.
- .. row 3
......@@ -87,7 +87,7 @@ returned during the enumeration process.
- \*\ ``links``
- Pointer to a links array allocated by the application. Ignored if
NULL.
NULL.
......
......@@ -60,11 +60,11 @@ desired arrays with the media graph elements.
- ``topology_version``
-
-
-
-
- Version of the media graph topology. When the graph is created,
this field starts with zero. Every time a graph element is added
or removed, this field is incremented.
this field starts with zero. Every time a graph element is added
or removed, this field is incremented.
- .. row 2
......@@ -72,8 +72,8 @@ desired arrays with the media graph elements.
- ``num_entities``
-
-
-
-
- Number of entities in the graph
- .. row 3
......@@ -82,12 +82,12 @@ desired arrays with the media graph elements.
- ``ptr_entities``
-
-
-
-
- A pointer to a memory area where the entities array will be
stored, converted to a 64-bits integer. It can be zero. if zero,
the ioctl won't store the entities. It will just update
``num_entities``
stored, converted to a 64-bits integer. It can be zero. if zero,
the ioctl won't store the entities. It will just update
``num_entities``
- .. row 4
......@@ -95,8 +95,8 @@ desired arrays with the media graph elements.
- ``num_interfaces``
-
-
-
-
- Number of interfaces in the graph
- .. row 5
......@@ -105,12 +105,12 @@ desired arrays with the media graph elements.
- ``ptr_interfaces``
-
-
-
-
- A pointer to a memory area where the interfaces array will be
stored, converted to a 64-bits integer. It can be zero. if zero,
the ioctl won't store the interfaces. It will just update
``num_interfaces``
stored, converted to a 64-bits integer. It can be zero. if zero,
the ioctl won't store the interfaces. It will just update
``num_interfaces``
- .. row 6
......@@ -118,8 +118,8 @@ desired arrays with the media graph elements.
- ``num_pads``
-
-
-
-
- Total number of pads in the graph
- .. row 7
......@@ -128,11 +128,11 @@ desired arrays with the media graph elements.
- ``ptr_pads``
-
-
-
-
- A pointer to a memory area where the pads array will be stored,
converted to a 64-bits integer. It can be zero. if zero, the ioctl
won't store the pads. It will just update ``num_pads``
converted to a 64-bits integer. It can be zero. if zero, the ioctl
won't store the pads. It will just update ``num_pads``
- .. row 8
......@@ -140,8 +140,8 @@ desired arrays with the media graph elements.
- ``num_links``
-
-
-
-
- Total number of data and interface links in the graph
- .. row 9
......@@ -150,11 +150,11 @@ desired arrays with the media graph elements.
- ``ptr_links``
-
-
-
-
- A pointer to a memory area where the links array will be stored,
converted to a 64-bits integer. It can be zero. if zero, the ioctl
won't store the links. It will just update ``num_links``
converted to a 64-bits integer. It can be zero. if zero, the ioctl
won't store the links. It will just update ``num_links``
......@@ -171,8 +171,8 @@ desired arrays with the media graph elements.
- ``id``
-
-
-
-
- Unique ID for the entity.
- .. row 2
......@@ -181,8 +181,8 @@ desired arrays with the media graph elements.
- ``name``\ [64]
-
-
-
-
- Entity name as an UTF-8 NULL-terminated string.
- .. row 3
......@@ -191,8 +191,8 @@ desired arrays with the media graph elements.
- ``function``
-
-
-
-
- Entity main function, see :ref:`media-entity-type` for details.
- .. row 4
......@@ -202,7 +202,7 @@ desired arrays with the media graph elements.
- ``reserved``\ [12]
- Reserved for future extensions. Drivers and applications must set
this array to zero.
this array to zero.
......@@ -219,8 +219,8 @@ desired arrays with the media graph elements.
- ``id``
-
-
-
-
- Unique ID for the interface.
- .. row 2
......@@ -229,8 +229,8 @@ desired arrays with the media graph elements.
- ``intf_type``
-
-
-
-
- Interface type, see :ref:`media-intf-type` for details.
- .. row 3
......@@ -239,8 +239,8 @@ desired arrays with the media graph elements.
- ``flags``
-
-
-
-
- Interface flags. Currently unused.
- .. row 4
......@@ -249,10 +249,10 @@ desired arrays with the media graph elements.
- ``reserved``\ [9]
-
-
-
-
- Reserved for future extensions. Drivers and applications must set
this array to zero.
this array to zero.
- .. row 5
......@@ -260,10 +260,10 @@ desired arrays with the media graph elements.
- ``devnode``
-
-
-
-
- Used only for device node interfaces. See
:ref:`media-v2-intf-devnode` for details..
:ref:`media-v2-intf-devnode` for details..
......@@ -280,8 +280,8 @@ desired arrays with the media graph elements.
- ``major``
-
-
-
-
- Device node major number.
- .. row 2
......@@ -290,8 +290,8 @@ desired arrays with the media graph elements.
- ``minor``
-
-
-
-
- Device node minor number.
......@@ -309,8 +309,8 @@ desired arrays with the media graph elements.
- ``id``
-
-
-
-
- Unique ID for the pad.
- .. row 2
......@@ -319,8 +319,8 @@ desired arrays with the media graph elements.
- ``entity_id``
-
-
-
-
- Unique ID for the entity where this pad belongs.
- .. row 3
......@@ -329,8 +329,8 @@ desired arrays with the media graph elements.
- ``flags``
-
-
-
-
- Pad flags, see :ref:`media-pad-flag` for more details.
- .. row 4
......@@ -339,10 +339,10 @@ desired arrays with the media graph elements.
- ``reserved``\ [9]
-
-
-
-
- Reserved for future extensions. Drivers and applications must set
this array to zero.
this array to zero.
......@@ -359,8 +359,8 @@ desired arrays with the media graph elements.
- ``id``
-
-
-
-
- Unique ID for the pad.
- .. row 2
......@@ -369,11 +369,11 @@ desired arrays with the media graph elements.
- ``source_id``
-
-
-
-
- On pad to pad links: unique ID for the source pad.
On interface to entity links: unique ID for the interface.
On interface to entity links: unique ID for the interface.
- .. row 3
......@@ -381,11 +381,11 @@ desired arrays with the media graph elements.
- ``sink_id``
-
-
-
-
- On pad to pad links: unique ID for the sink pad.
On interface to entity links: unique ID for the entity.
On interface to entity links: unique ID for the entity.
- .. row 4
......@@ -393,8 +393,8 @@ desired arrays with the media graph elements.
- ``flags``
-
-
-
-
- Link flags, see :ref:`media-link-flag` for more details.
- .. row 5
......@@ -403,10 +403,10 @@ desired arrays with the media graph elements.
- ``reserved``\ [5]
-
-
-
-
- Reserved for future extensions. Drivers and applications must set
this array to zero.
this array to zero.
......
......@@ -18,7 +18,7 @@ Types and flags used to represent the media graph elements
- ``MEDIA_ENT_F_UNKNOWN`` and ``MEDIA_ENT_F_V4L2_SUBDEV_UNKNOWN``
- Unknown entity. That generally indicates that a driver didn't
initialize properly the entity, with is a Kernel bug
initialize properly the entity, with is a Kernel bug
- .. row 2
......@@ -55,7 +55,7 @@ Types and flags used to represent the media graph elements
- ``MEDIA_ENT_F_TS_DEMUX``
- MPEG Transport stream demux entity. Could be implemented on
hardware or in Kernelspace by the Linux DVB subsystem.
hardware or in Kernelspace by the Linux DVB subsystem.
- .. row 8
......@@ -68,7 +68,7 @@ Types and flags used to represent the media graph elements
- ``MEDIA_ENT_F_DTV_NET_DECAP``
- Digital TV network ULE/MLE desencapsulation entity. Could be
implemented on hardware or in Kernelspace
implemented on hardware or in Kernelspace
- .. row 10
......@@ -111,42 +111,42 @@ Types and flags used to represent the media graph elements
- ``MEDIA_ENT_F_ATV_DECODER``
- Analog video decoder, the basic function of the video decoder is
to accept analogue video from a wide variety of sources such as
broadcast, DVD players, cameras and video cassette recorders, in
either NTSC, PAL, SECAM or HD format, separating the stream into
its component parts, luminance and chrominance, and output it in
some digital video standard, with appropriate timing signals.
to accept analogue video from a wide variety of sources such as
broadcast, DVD players, cameras and video cassette recorders, in
either NTSC, PAL, SECAM or HD format, separating the stream into
its component parts, luminance and chrominance, and output it in
some digital video standard, with appropriate timing signals.
- .. row 17
- ``MEDIA_ENT_F_TUNER``
- Digital TV, analog TV, radio and/or software radio tuner, with
consists on a PLL tuning stage that converts radio frequency (RF)
signal into an Intermediate Frequency (IF). Modern tuners have
internally IF-PLL decoders for audio and video, but older models
have those stages implemented on separate entities.
consists on a PLL tuning stage that converts radio frequency (RF)
signal into an Intermediate Frequency (IF). Modern tuners have
internally IF-PLL decoders for audio and video, but older models
have those stages implemented on separate entities.
- .. row 18
- ``MEDIA_ENT_F_IF_VID_DECODER``
- IF-PLL video decoder. It receives the IF from a PLL and decodes
the analog TV video signal. This is commonly found on some very
old analog tuners, like Philips MK3 designs. They all contain a
tda9887 (or some software compatible similar chip, like tda9885).
Those devices use a different I2C address than the tuner PLL.
the analog TV video signal. This is commonly found on some very
old analog tuners, like Philips MK3 designs. They all contain a
tda9887 (or some software compatible similar chip, like tda9885).
Those devices use a different I2C address than the tuner PLL.
- .. row 19
- ``MEDIA_ENT_F_IF_AUD_DECODER``
- IF-PLL sound decoder. It receives the IF from a PLL and decodes
the analog TV audio signal. This is commonly found on some very
old analog hardware, like Micronas msp3400, Philips tda9840,
tda985x, etc. Those devices use a different I2C address than the
tuner PLL and should be controlled together with the IF-PLL video
decoder.
the analog TV audio signal. This is commonly found on some very
old analog hardware, like Micronas msp3400, Philips tda9840,
tda985x, etc. Those devices use a different I2C address than the
tuner PLL and should be controlled together with the IF-PLL video
decoder.
- .. row 20
......@@ -180,7 +180,7 @@ Types and flags used to represent the media graph elements
- ``MEDIA_ENT_FL_DEFAULT``
- Default entity for its type. Used to discover the default audio,
VBI and video devices, the default camera sensor, ...
VBI and video devices, the default camera sensor, ...
- .. row 2
......@@ -355,25 +355,25 @@ Types and flags used to represent the media graph elements
- ``MEDIA_PAD_FL_SINK``
- Input pad, relative to the entity. Input pads sink data and are
targets of links.
targets of links.
- .. row 2
- ``MEDIA_PAD_FL_SOURCE``
- Output pad, relative to the entity. Output pads source data and
are origins of links.
are origins of links.
- .. row 3
- ``MEDIA_PAD_FL_MUST_CONNECT``
- If this flag is set and the pad is linked to any other pad, then
at least one of those links must be enabled for the entity to be
able to stream. There could be temporary reasons (e.g. device
configuration dependent) for the pad to need enabled links even
when this flag isn't set; the absence of the flag doesn't imply
there is none.
at least one of those links must be enabled for the entity to be
able to stream. There could be temporary reasons (e.g. device
configuration dependent) for the pad to need enabled links even
when this flag isn't set; the absence of the flag doesn't imply
there is none.
One and only one of ``MEDIA_PAD_FL_SINK`` and ``MEDIA_PAD_FL_SOURCE``
......@@ -392,31 +392,31 @@ must be set for every pad.
- ``MEDIA_LNK_FL_ENABLED``
- The link is enabled and can be used to transfer media data. When
two or more links target a sink pad, only one of them can be
enabled at a time.
two or more links target a sink pad, only one of them can be
enabled at a time.
- .. row 2
- ``MEDIA_LNK_FL_IMMUTABLE``
- The link enabled state can't be modified at runtime. An immutable
link is always enabled.
link is always enabled.
- .. row 3
- ``MEDIA_LNK_FL_DYNAMIC``
- The link enabled state can be modified during streaming. This flag
is set by drivers and is read-only for applications.
is set by drivers and is read-only for applications.
- .. row 4
- ``MEDIA_LNK_FL_LINK_TYPE``
- This is a bitmask that defines the type of the link. Currently,
two types of links are supported:
two types of links are supported:
``MEDIA_LNK_FL_DATA_LINK`` if the link is between two pads
``MEDIA_LNK_FL_DATA_LINK`` if the link is between two pads
``MEDIA_LNK_FL_INTERFACE_LINK`` if the link is between an
interface and an entity
``MEDIA_LNK_FL_INTERFACE_LINK`` if the link is between an
interface and an entity
......@@ -288,7 +288,7 @@ the remote via /dev/input/event devices.
- ``KEY_ANGLE``
- Switch video camera angle (on videos with more than one angle
stored)
stored)
- ANGLE / SWAP
......@@ -739,19 +739,19 @@ at some cheaper IR's. Due to that, it is recommended to:
- .. row 1
- On simpler IR's, without separate channel keys, you need to map UP
as ``KEY_CHANNELUP``
as ``KEY_CHANNELUP``
- .. row 2
- On simpler IR's, without separate channel keys, you need to map
DOWN as ``KEY_CHANNELDOWN``
DOWN as ``KEY_CHANNELDOWN``
- .. row 3
- On simpler IR's, without separate volume keys, you need to map
LEFT as ``KEY_VOLUMEDOWN``
LEFT as ``KEY_VOLUMEDOWN``
- .. row 4
- On simpler IR's, without separate volume keys, you need to map
RIGHT as ``KEY_VOLUMEUP``
RIGHT as ``KEY_VOLUMEUP``
......@@ -62,8 +62,8 @@ the :ref:`VIDIOC_QUERYCAP` ioctl.
memset(&audio, 0, sizeof(audio));
if (-1 == ioctl(fd, VIDIOC_G_AUDIO, &audio)) {
perror("VIDIOC_G_AUDIO");
exit(EXIT_FAILURE);
perror("VIDIOC_G_AUDIO");
exit(EXIT_FAILURE);
}
printf("Current input: %s\\n", audio.name);
......@@ -79,8 +79,8 @@ the :ref:`VIDIOC_QUERYCAP` ioctl.
audio.index = 0;
if (-1 == ioctl(fd, VIDIOC_S_AUDIO, &audio)) {
perror("VIDIOC_S_AUDIO");
exit(EXIT_FAILURE);
perror("VIDIOC_S_AUDIO");
exit(EXIT_FAILURE);
}
.. [1]
......
This diff is collapsed.
......@@ -60,38 +60,38 @@ EBUSY error code until all applications closed the framebuffer device.
int fb_fd;
if (-1 == ioctl(fd, VIDIOC_G_FBUF, &fbuf)) {
perror("VIDIOC_G_FBUF");
exit(EXIT_FAILURE);
perror("VIDIOC_G_FBUF");
exit(EXIT_FAILURE);
}
for (i = 0; i < 30; i++) {
char dev_name[16];
struct fb_fix_screeninfo si;
snprintf(dev_name, sizeof(dev_name), "/dev/fb%u", i);
fb_fd = open(dev_name, O_RDWR);
if (-1 == fb_fd) {
switch (errno) {
case ENOENT: /* no such file */
case ENXIO: /* no driver */
continue;
default:
perror("open");
exit(EXIT_FAILURE);
}
}
if (0 == ioctl(fb_fd, FBIOGET_FSCREENINFO, &si)) {
if (si.smem_start == (unsigned long)fbuf.base)
break;
} else {
/* Apparently not a framebuffer device. */
}
close(fb_fd);
fb_fd = -1;
char dev_name[16];
struct fb_fix_screeninfo si;
snprintf(dev_name, sizeof(dev_name), "/dev/fb%u", i);
fb_fd = open(dev_name, O_RDWR);
if (-1 == fb_fd) {
switch (errno) {
case ENOENT: /* no such file */
case ENXIO: /* no driver */
continue;
default:
perror("open");
exit(EXIT_FAILURE);
}
}
if (0 == ioctl(fb_fd, FBIOGET_FSCREENINFO, &si)) {
if (si.smem_start == (unsigned long)fbuf.base)
break;
} else {
/* Apparently not a framebuffer device. */
}
close(fb_fd);
fb_fd = -1;
}
/* fb_fd is the file descriptor of the framebuffer device
......
......@@ -144,21 +144,21 @@ RDS datastructures
- Bits 3-5
- Deprecated. Currently identical to bits 0-2. Do not use these
bits.
bits.
- .. row 3
- Bit 6
- Corrected bit. Indicates that an error was corrected for this data
block.
block.
- .. row 4
- Bit 7
- Error bit. Indicates that an uncorrectable error occurred during
reception of this block.
reception of this block.
......@@ -174,7 +174,7 @@ RDS datastructures
- V4L2_RDS_BLOCK_MSK
-
-
- 7
- Mask for bits 0-2 to get the block ID.
......@@ -183,7 +183,7 @@ RDS datastructures
- V4L2_RDS_BLOCK_A
-
-
- 0
- Block A.
......@@ -192,7 +192,7 @@ RDS datastructures
- V4L2_RDS_BLOCK_B
-
-
- 1
- Block B.
......@@ -201,7 +201,7 @@ RDS datastructures
- V4L2_RDS_BLOCK_C
-
-
- 2
- Block C.
......@@ -210,7 +210,7 @@ RDS datastructures
- V4L2_RDS_BLOCK_D
-
-
- 3
- Block D.
......@@ -219,7 +219,7 @@ RDS datastructures
- V4L2_RDS_BLOCK_C_ALT
-
-
- 4
- Block C'.
......
......@@ -93,9 +93,9 @@ data transfer, set by the driver in order to inform application.
- ``pixelformat``
- The data format or type of compression, set by the application.
This is a little endian
:ref:`four character code <v4l2-fourcc>`. V4L2 defines SDR
formats in :ref:`sdr-formats`.
This is a little endian
:ref:`four character code <v4l2-fourcc>`. V4L2 defines SDR
formats in :ref:`sdr-formats`.
- .. row 2
......@@ -104,7 +104,7 @@ data transfer, set by the driver in order to inform application.
- ``buffersize``
- Maximum size in bytes required for data. Value is set by the
driver.
driver.
- .. row 3
......@@ -113,7 +113,7 @@ data transfer, set by the driver in order to inform application.
- ``reserved[24]``
- This array is reserved for future extensions. Drivers and
applications must set it to zero.
applications must set it to zero.
An SDR device may support :ref:`read/write <rw>` and/or streaming
......
......@@ -211,7 +211,7 @@ list entity names and pad numbers).
- .. row 1
-
-
- Sensor/0 format
- Frontend/0 format
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment