summaryrefslogtreecommitdiff
path: root/Documentation
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@s-opensource.com>2016-07-04 22:25:48 +0300
committerMauro Carvalho Chehab <mchehab@s-opensource.com>2016-07-04 22:25:48 +0300
commit0579e6e3a326dcd836f1a45fef7f3487822e6373 (patch)
tree03bab6ea23e08a6cc80d4cef08165fb5914cdcdf /Documentation
parenta163ad5ceb30d2034b70cda8bdad0aaabdba1614 (diff)
downloadlinux-0579e6e3a326dcd836f1a45fef7f3487822e6373.tar.xz
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: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/linux_tv/audio.h.rst48
-rw-r--r--Documentation/linux_tv/ca.h.rst36
-rw-r--r--Documentation/linux_tv/dmx.h.rst118
-rw-r--r--Documentation/linux_tv/frontend.h.rst456
-rw-r--r--Documentation/linux_tv/media/dvb/FE_GET_EVENT.rst2
-rw-r--r--Documentation/linux_tv/media/dvb/FE_GET_FRONTEND.rst2
-rw-r--r--Documentation/linux_tv/media/dvb/FE_READ_SIGNAL_STRENGTH.rst4
-rw-r--r--Documentation/linux_tv/media/dvb/FE_READ_UNCORRECTED_BLOCKS.rst4
-rw-r--r--Documentation/linux_tv/media/dvb/FE_SET_FRONTEND.rst2
-rw-r--r--Documentation/linux_tv/media/dvb/audio_data_types.rst44
-rw-r--r--Documentation/linux_tv/media/dvb/audio_function_calls.rst30
-rw-r--r--Documentation/linux_tv/media/dvb/ca_data_types.rst36
-rw-r--r--Documentation/linux_tv/media/dvb/ca_function_calls.rst8
-rw-r--r--Documentation/linux_tv/media/dvb/dmx_fcalls.rst44
-rw-r--r--Documentation/linux_tv/media/dvb/dmx_types.rst136
-rw-r--r--Documentation/linux_tv/media/dvb/dtv-fe-stats.rst4
-rw-r--r--Documentation/linux_tv/media/dvb/dtv-properties.rst4
-rw-r--r--Documentation/linux_tv/media/dvb/dtv-property.rst26
-rw-r--r--Documentation/linux_tv/media/dvb/dtv-stats.rst10
-rw-r--r--Documentation/linux_tv/media/dvb/dvb-frontend-event.rst4
-rw-r--r--Documentation/linux_tv/media/dvb/dvb-frontend-parameters.rst44
-rw-r--r--Documentation/linux_tv/media/dvb/dvbproperty.rst40
-rw-r--r--Documentation/linux_tv/media/dvb/examples.rst506
-rw-r--r--Documentation/linux_tv/media/dvb/fe-bandwidth-t.rst14
-rw-r--r--Documentation/linux_tv/media/dvb/fe-diseqc-recv-slave-reply.rst4
-rw-r--r--Documentation/linux_tv/media/dvb/fe-diseqc-send-burst.rst4
-rw-r--r--Documentation/linux_tv/media/dvb/fe-get-info.rst68
-rw-r--r--Documentation/linux_tv/media/dvb/fe-read-status.rst18
-rw-r--r--Documentation/linux_tv/media/dvb/fe-set-tone.rst6
-rw-r--r--Documentation/linux_tv/media/dvb/fe-type-t.rst12
-rw-r--r--Documentation/linux_tv/media/dvb/fe_property_parameters.rst218
-rw-r--r--Documentation/linux_tv/media/dvb/intro.rst14
-rw-r--r--Documentation/linux_tv/media/dvb/net.rst4
-rw-r--r--Documentation/linux_tv/media/dvb/video_function_calls.rst26
-rw-r--r--Documentation/linux_tv/media/dvb/video_types.rst166
-rw-r--r--Documentation/linux_tv/media/gen-errors.rst34
-rw-r--r--Documentation/linux_tv/media/mediactl/media-ioc-device-info.rst24
-rw-r--r--Documentation/linux_tv/media/mediactl/media-ioc-enum-entities.rst56
-rw-r--r--Documentation/linux_tv/media/mediactl/media-ioc-enum-links.rst4
-rw-r--r--Documentation/linux_tv/media/mediactl/media-ioc-g-topology.rst150
-rw-r--r--Documentation/linux_tv/media/mediactl/media-types.rst74
-rw-r--r--Documentation/linux_tv/media/rc/Remote_controllers_tables.rst10
-rw-r--r--Documentation/linux_tv/media/rc/keytable.c.rst266
-rw-r--r--Documentation/linux_tv/media/v4l/audio.rst8
-rw-r--r--Documentation/linux_tv/media/v4l/buffer.rst432
-rw-r--r--Documentation/linux_tv/media/v4l/capture.c.rst1008
-rw-r--r--Documentation/linux_tv/media/v4l/control.rst164
-rw-r--r--Documentation/linux_tv/media/v4l/dev-osd.rst58
-rw-r--r--Documentation/linux_tv/media/v4l/dev-raw-vbi.rst130
-rw-r--r--Documentation/linux_tv/media/v4l/dev-rds.rst18
-rw-r--r--Documentation/linux_tv/media/v4l/dev-sdr.rst10
-rw-r--r--Documentation/linux_tv/media/v4l/dev-sliced-vbi.rst256
-rw-r--r--Documentation/linux_tv/media/v4l/dev-subdev.rst2
-rw-r--r--Documentation/linux_tv/media/v4l/diff-v4l.rst116
-rw-r--r--Documentation/linux_tv/media/v4l/dmabuf.rst66
-rw-r--r--Documentation/linux_tv/media/v4l/extended-controls.rst198
-rw-r--r--Documentation/linux_tv/media/v4l/field-order.rst78
-rw-r--r--Documentation/linux_tv/media/v4l/hist-v4l2.rst172
-rw-r--r--Documentation/linux_tv/media/v4l/pixfmt-002.rst154
-rw-r--r--Documentation/linux_tv/media/v4l/pixfmt-003.rst30
-rw-r--r--Documentation/linux_tv/media/v4l/pixfmt-006.rst26
-rw-r--r--Documentation/linux_tv/media/v4l/pixfmt-013.rst6
-rw-r--r--Documentation/linux_tv/media/v4l/pixfmt-indexed.rst8
-rw-r--r--Documentation/linux_tv/media/v4l/pixfmt-m420.rst44
-rw-r--r--Documentation/linux_tv/media/v4l/pixfmt-nv12.rst44
-rw-r--r--Documentation/linux_tv/media/v4l/pixfmt-nv12m.rst48
-rw-r--r--Documentation/linux_tv/media/v4l/pixfmt-nv16.rst64
-rw-r--r--Documentation/linux_tv/media/v4l/pixfmt-nv16m.rst66
-rw-r--r--Documentation/linux_tv/media/v4l/pixfmt-packed-rgb.rst138
-rw-r--r--Documentation/linux_tv/media/v4l/pixfmt-packed-yuv.rst38
-rw-r--r--Documentation/linux_tv/media/v4l/pixfmt-reserved.rst82
-rw-r--r--Documentation/linux_tv/media/v4l/pixfmt-srggb10p.rst8
-rw-r--r--Documentation/linux_tv/media/v4l/pixfmt-uyvy.rst6
-rw-r--r--Documentation/linux_tv/media/v4l/pixfmt-vyuy.rst6
-rw-r--r--Documentation/linux_tv/media/v4l/pixfmt-y41p.rst6
-rw-r--r--Documentation/linux_tv/media/v4l/pixfmt-yuv410.rst50
-rw-r--r--Documentation/linux_tv/media/v4l/pixfmt-yuv411p.rst4
-rw-r--r--Documentation/linux_tv/media/v4l/pixfmt-yuv420.rst58
-rw-r--r--Documentation/linux_tv/media/v4l/pixfmt-yuv420m.rst62
-rw-r--r--Documentation/linux_tv/media/v4l/pixfmt-yuv422m.rst10
-rw-r--r--Documentation/linux_tv/media/v4l/pixfmt-yuv422p.rst6
-rw-r--r--Documentation/linux_tv/media/v4l/pixfmt-yuv444m.rst6
-rw-r--r--Documentation/linux_tv/media/v4l/pixfmt-yuyv.rst16
-rw-r--r--Documentation/linux_tv/media/v4l/pixfmt-yvyu.rst6
-rw-r--r--Documentation/linux_tv/media/v4l/selection-api-006.rst102
-rw-r--r--Documentation/linux_tv/media/v4l/standard.rst58
-rw-r--r--Documentation/linux_tv/media/v4l/subdev-formats.rst854
-rw-r--r--Documentation/linux_tv/media/v4l/userp.rst2
-rw-r--r--Documentation/linux_tv/media/v4l/v4l2-selection-flags.rst16
-rw-r--r--Documentation/linux_tv/media/v4l/v4l2-selection-targets.rst18
-rw-r--r--Documentation/linux_tv/media/v4l/v4l2grab.c.rst246
-rw-r--r--Documentation/linux_tv/media/v4l/video.rst12
-rw-r--r--Documentation/linux_tv/media/v4l/vidioc-create-bufs.rst18
-rw-r--r--Documentation/linux_tv/media/v4l/vidioc-cropcap.rst38
-rw-r--r--Documentation/linux_tv/media/v4l/vidioc-dbg-g-chip-info.rst16
-rw-r--r--Documentation/linux_tv/media/v4l/vidioc-dbg-g-register.rst10
-rw-r--r--Documentation/linux_tv/media/v4l/vidioc-decoder-cmd.rst142
-rw-r--r--Documentation/linux_tv/media/v4l/vidioc-dqevent.rst222
-rw-r--r--Documentation/linux_tv/media/v4l/vidioc-dv-timings-cap.rst30
-rw-r--r--Documentation/linux_tv/media/v4l/vidioc-encoder-cmd.rst46
-rw-r--r--Documentation/linux_tv/media/v4l/vidioc-enum-dv-timings.rst6
-rw-r--r--Documentation/linux_tv/media/v4l/vidioc-enum-fmt.rst34
-rw-r--r--Documentation/linux_tv/media/v4l/vidioc-enum-frameintervals.rst24
-rw-r--r--Documentation/linux_tv/media/v4l/vidioc-enum-framesizes.rst22
-rw-r--r--Documentation/linux_tv/media/v4l/vidioc-enum-freq-bands.rst56
-rw-r--r--Documentation/linux_tv/media/v4l/vidioc-enuminput.rst78
-rw-r--r--Documentation/linux_tv/media/v4l/vidioc-enumoutput.rst50
-rw-r--r--Documentation/linux_tv/media/v4l/vidioc-enumstd.rst96
-rw-r--r--Documentation/linux_tv/media/v4l/vidioc-expbuf.rst84
-rw-r--r--Documentation/linux_tv/media/v4l/vidioc-g-audio.rst14
-rw-r--r--Documentation/linux_tv/media/v4l/vidioc-g-audioout.rst10
-rw-r--r--Documentation/linux_tv/media/v4l/vidioc-g-crop.rst8
-rw-r--r--Documentation/linux_tv/media/v4l/vidioc-g-dv-timings.rst110
-rw-r--r--Documentation/linux_tv/media/v4l/vidioc-g-edid.rst18
-rw-r--r--Documentation/linux_tv/media/v4l/vidioc-g-enc-index.rst24
-rw-r--r--Documentation/linux_tv/media/v4l/vidioc-g-ext-ctrls.rst216
-rw-r--r--Documentation/linux_tv/media/v4l/vidioc-g-fbuf.rst254
-rw-r--r--Documentation/linux_tv/media/v4l/vidioc-g-fmt.rst32
-rw-r--r--Documentation/linux_tv/media/v4l/vidioc-g-frequency.rst30
-rw-r--r--Documentation/linux_tv/media/v4l/vidioc-g-jpegcomp.rst22
-rw-r--r--Documentation/linux_tv/media/v4l/vidioc-g-modulator.rst102
-rw-r--r--Documentation/linux_tv/media/v4l/vidioc-g-parm.rst150
-rw-r--r--Documentation/linux_tv/media/v4l/vidioc-g-priority.rst22
-rw-r--r--Documentation/linux_tv/media/v4l/vidioc-g-selection.rst8
-rw-r--r--Documentation/linux_tv/media/v4l/vidioc-g-sliced-vbi-cap.rst78
-rw-r--r--Documentation/linux_tv/media/v4l/vidioc-g-tuner.rst236
-rw-r--r--Documentation/linux_tv/media/v4l/vidioc-querycap.rst170
-rw-r--r--Documentation/linux_tv/media/v4l/vidioc-queryctrl.rst316
-rw-r--r--Documentation/linux_tv/media/v4l/vidioc-reqbufs.rst10
-rw-r--r--Documentation/linux_tv/media/v4l/vidioc-s-hw-freq-seek.rst44
-rw-r--r--Documentation/linux_tv/media/v4l/vidioc-subdev-enum-frame-interval.rst6
-rw-r--r--Documentation/linux_tv/media/v4l/vidioc-subdev-enum-frame-size.rst6
-rw-r--r--Documentation/linux_tv/media/v4l/vidioc-subdev-enum-mbus-code.rst6
-rw-r--r--Documentation/linux_tv/media/v4l/vidioc-subdev-g-crop.rst4
-rw-r--r--Documentation/linux_tv/media/v4l/vidioc-subdev-g-fmt.rst6
-rw-r--r--Documentation/linux_tv/media/v4l/vidioc-subdev-g-frame-interval.rst2
-rw-r--r--Documentation/linux_tv/media/v4l/vidioc-subdev-g-selection.rst4
-rw-r--r--Documentation/linux_tv/media/v4l/vidioc-subscribe-event.rst46
-rw-r--r--Documentation/linux_tv/net.h.rst10
-rw-r--r--Documentation/linux_tv/video.h.rst162
-rw-r--r--Documentation/linux_tv/videodev2.h.rst1588
141 files changed, 6241 insertions, 6241 deletions
diff --git a/Documentation/linux_tv/audio.h.rst b/Documentation/linux_tv/audio.h.rst
index 1e76a866c01a..42b7b41ec120 100644
--- a/Documentation/linux_tv/audio.h.rst
+++ b/Documentation/linux_tv/audio.h.rst
@@ -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 */
diff --git a/Documentation/linux_tv/ca.h.rst b/Documentation/linux_tv/ca.h.rst
index 0664c4bdd985..e86e73510ffc 100644
--- a/Documentation/linux_tv/ca.h.rst
+++ b/Documentation/linux_tv/ca.h.rst
@@ -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)
diff --git a/Documentation/linux_tv/dmx.h.rst b/Documentation/linux_tv/dmx.h.rst
index 4791554f82f9..05686c09aebc 100644
--- a/Documentation/linux_tv/dmx.h.rst
+++ b/Documentation/linux_tv/dmx.h.rst
@@ -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)
diff --git a/Documentation/linux_tv/frontend.h.rst b/Documentation/linux_tv/frontend.h.rst
index 5c8f11a77c1e..51dbf2ab883d 100644
--- a/Documentation/linux_tv/frontend.h.rst
+++ b/Documentation/linux_tv/frontend.h.rst
@@ -36,58 +36,58 @@ file: frontend.h
#include <linux/types.h>
enum fe_type {
- FE_QPSK,
- FE_QAM,
- FE_OFDM,
- FE_ATSC
+ FE_QPSK,
+ FE_QAM,
+ FE_OFDM,
+ FE_ATSC
};
enum fe_caps {
- FE_IS_STUPID = 0,
- FE_CAN_INVERSION_AUTO = 0x1,
- FE_CAN_FEC_1_2 = 0x2,
- FE_CAN_FEC_2_3 = 0x4,
- FE_CAN_FEC_3_4 = 0x8,
- FE_CAN_FEC_4_5 = 0x10,
- FE_CAN_FEC_5_6 = 0x20,
- FE_CAN_FEC_6_7 = 0x40,
- FE_CAN_FEC_7_8 = 0x80,
- FE_CAN_FEC_8_9 = 0x100,
- FE_CAN_FEC_AUTO = 0x200,
- FE_CAN_QPSK = 0x400,
- FE_CAN_QAM_16 = 0x800,
- FE_CAN_QAM_32 = 0x1000,
- FE_CAN_QAM_64 = 0x2000,
- FE_CAN_QAM_128 = 0x4000,
- FE_CAN_QAM_256 = 0x8000,
- FE_CAN_QAM_AUTO = 0x10000,
- FE_CAN_TRANSMISSION_MODE_AUTO = 0x20000,
- FE_CAN_BANDWIDTH_AUTO = 0x40000,
- FE_CAN_GUARD_INTERVAL_AUTO = 0x80000,
- FE_CAN_HIERARCHY_AUTO = 0x100000,
- FE_CAN_8VSB = 0x200000,
- FE_CAN_16VSB = 0x400000,
- FE_HAS_EXTENDED_CAPS = 0x800000, /* We need more bitspace for newer APIs, indicate this. */
- FE_CAN_MULTISTREAM = 0x4000000, /* frontend supports multistream filtering */
- FE_CAN_TURBO_FEC = 0x8000000, /* frontend supports "turbo fec modulation" */
- FE_CAN_2G_MODULATION = 0x10000000, /* frontend supports "2nd generation modulation" (DVB-S2) */
- FE_NEEDS_BENDING = 0x20000000, /* not supported anymore, don't use (frontend requires frequency bending) */
- FE_CAN_RECOVER = 0x40000000, /* frontend can recover from a cable unplug automatically */
- FE_CAN_MUTE_TS = 0x80000000 /* frontend can stop spurious TS data output */
+ FE_IS_STUPID = 0,
+ FE_CAN_INVERSION_AUTO = 0x1,
+ FE_CAN_FEC_1_2 = 0x2,
+ FE_CAN_FEC_2_3 = 0x4,
+ FE_CAN_FEC_3_4 = 0x8,
+ FE_CAN_FEC_4_5 = 0x10,
+ FE_CAN_FEC_5_6 = 0x20,
+ FE_CAN_FEC_6_7 = 0x40,
+ FE_CAN_FEC_7_8 = 0x80,
+ FE_CAN_FEC_8_9 = 0x100,
+ FE_CAN_FEC_AUTO = 0x200,
+ FE_CAN_QPSK = 0x400,
+ FE_CAN_QAM_16 = 0x800,
+ FE_CAN_QAM_32 = 0x1000,
+ FE_CAN_QAM_64 = 0x2000,
+ FE_CAN_QAM_128 = 0x4000,
+ FE_CAN_QAM_256 = 0x8000,
+ FE_CAN_QAM_AUTO = 0x10000,
+ FE_CAN_TRANSMISSION_MODE_AUTO = 0x20000,
+ FE_CAN_BANDWIDTH_AUTO = 0x40000,
+ FE_CAN_GUARD_INTERVAL_AUTO = 0x80000,
+ FE_CAN_HIERARCHY_AUTO = 0x100000,
+ FE_CAN_8VSB = 0x200000,
+ FE_CAN_16VSB = 0x400000,
+ FE_HAS_EXTENDED_CAPS = 0x800000, /* We need more bitspace for newer APIs, indicate this. */
+ FE_CAN_MULTISTREAM = 0x4000000, /* frontend supports multistream filtering */
+ FE_CAN_TURBO_FEC = 0x8000000, /* frontend supports "turbo fec modulation" */
+ FE_CAN_2G_MODULATION = 0x10000000, /* frontend supports "2nd generation modulation" (DVB-S2) */
+ FE_NEEDS_BENDING = 0x20000000, /* not supported anymore, don't use (frontend requires frequency bending) */
+ FE_CAN_RECOVER = 0x40000000, /* frontend can recover from a cable unplug automatically */
+ FE_CAN_MUTE_TS = 0x80000000 /* frontend can stop spurious TS data output */
};
struct dvb_frontend_info {
- char name[128];
- enum fe_type type; /* DEPRECATED. Use DTV_ENUM_DELSYS instead */
- __u32 frequency_min;
- __u32 frequency_max;
- __u32 frequency_stepsize;
- __u32 frequency_tolerance;
- __u32 symbol_rate_min;
- __u32 symbol_rate_max;
- __u32 symbol_rate_tolerance; /* ppm */
- __u32 notifier_delay; /* DEPRECATED */
- enum fe_caps caps;
+ char name[128];
+ enum fe_type type; /* DEPRECATED. Use DTV_ENUM_DELSYS instead */
+ __u32 frequency_min;
+ __u32 frequency_max;
+ __u32 frequency_stepsize;
+ __u32 frequency_tolerance;
+ __u32 symbol_rate_min;
+ __u32 symbol_rate_max;
+ __u32 symbol_rate_tolerance; /* ppm */
+ __u32 notifier_delay; /* DEPRECATED */
+ enum fe_caps caps;
};
@@ -96,30 +96,30 @@ file: frontend.h
* the meaning of this struct...
*/
struct dvb_diseqc_master_cmd {
- __u8 msg [6]; /* { framing, address, command, data [3] } */
- __u8 msg_len; /* valid values are 3...6 */
+ __u8 msg [6]; /* { framing, address, command, data [3] } */
+ __u8 msg_len; /* valid values are 3...6 */
};
struct dvb_diseqc_slave_reply {
- __u8 msg [4]; /* { framing, data [3] } */
- __u8 msg_len; /* valid values are 0...4, 0 means no msg */
- int timeout; /* return from ioctl after timeout ms with */
+ __u8 msg [4]; /* { framing, data [3] } */
+ __u8 msg_len; /* valid values are 0...4, 0 means no msg */
+ int timeout; /* return from ioctl after timeout ms with */
}; /* errorcode when no message was received */
enum fe_sec_voltage {
- SEC_VOLTAGE_13,
- SEC_VOLTAGE_18,
- SEC_VOLTAGE_OFF
+ SEC_VOLTAGE_13,
+ SEC_VOLTAGE_18,
+ SEC_VOLTAGE_OFF
};
enum fe_sec_tone_mode {
- SEC_TONE_ON,
- SEC_TONE_OFF
+ SEC_TONE_ON,
+ SEC_TONE_OFF
};
enum fe_sec_mini_cmd {
- SEC_MINI_A,
- SEC_MINI_B
+ SEC_MINI_A,
+ SEC_MINI_B
};
/**
@@ -134,93 +134,93 @@ file: frontend.h
* to reset DiSEqC, tone and parameters
*/
enum fe_status {
- FE_HAS_SIGNAL = 0x01,
- FE_HAS_CARRIER = 0x02,
- FE_HAS_VITERBI = 0x04,
- FE_HAS_SYNC = 0x08,
- FE_HAS_LOCK = 0x10,
- FE_TIMEDOUT = 0x20,
- FE_REINIT = 0x40,
+ FE_HAS_SIGNAL = 0x01,
+ FE_HAS_CARRIER = 0x02,
+ FE_HAS_VITERBI = 0x04,
+ FE_HAS_SYNC = 0x08,
+ FE_HAS_LOCK = 0x10,
+ FE_TIMEDOUT = 0x20,
+ FE_REINIT = 0x40,
};
enum fe_spectral_inversion {
- INVERSION_OFF,
- INVERSION_ON,
- INVERSION_AUTO
+ INVERSION_OFF,
+ INVERSION_ON,
+ INVERSION_AUTO
};
enum fe_code_rate {
- FEC_NONE = 0,
- FEC_1_2,
- FEC_2_3,
- FEC_3_4,
- FEC_4_5,
- FEC_5_6,
- FEC_6_7,
- FEC_7_8,
- FEC_8_9,
- FEC_AUTO,
- FEC_3_5,
- FEC_9_10,
- FEC_2_5,
+ FEC_NONE = 0,
+ FEC_1_2,
+ FEC_2_3,
+ FEC_3_4,
+ FEC_4_5,
+ FEC_5_6,
+ FEC_6_7,
+ FEC_7_8,
+ FEC_8_9,
+ FEC_AUTO,
+ FEC_3_5,
+ FEC_9_10,
+ FEC_2_5,
};
enum fe_modulation {
- QPSK,
- QAM_16,
- QAM_32,
- QAM_64,
- QAM_128,
- QAM_256,
- QAM_AUTO,
- VSB_8,
- VSB_16,
- PSK_8,
- APSK_16,
- APSK_32,
- DQPSK,
- QAM_4_NR,
+ QPSK,
+ QAM_16,
+ QAM_32,
+ QAM_64,
+ QAM_128,
+ QAM_256,
+ QAM_AUTO,
+ VSB_8,
+ VSB_16,
+ PSK_8,
+ APSK_16,
+ APSK_32,
+ DQPSK,
+ QAM_4_NR,
};
enum fe_transmit_mode {
- TRANSMISSION_MODE_2K,
- TRANSMISSION_MODE_8K,
- TRANSMISSION_MODE_AUTO,
- TRANSMISSION_MODE_4K,
- TRANSMISSION_MODE_1K,
- TRANSMISSION_MODE_16K,
- TRANSMISSION_MODE_32K,
- TRANSMISSION_MODE_C1,
- TRANSMISSION_MODE_C3780,
+ TRANSMISSION_MODE_2K,
+ TRANSMISSION_MODE_8K,
+ TRANSMISSION_MODE_AUTO,
+ TRANSMISSION_MODE_4K,
+ TRANSMISSION_MODE_1K,
+ TRANSMISSION_MODE_16K,
+ TRANSMISSION_MODE_32K,
+ TRANSMISSION_MODE_C1,
+ TRANSMISSION_MODE_C3780,
};
enum fe_guard_interval {
- GUARD_INTERVAL_1_32,
- GUARD_INTERVAL_1_16,
- GUARD_INTERVAL_1_8,
- GUARD_INTERVAL_1_4,
- GUARD_INTERVAL_AUTO,
- GUARD_INTERVAL_1_128,
- GUARD_INTERVAL_19_128,
- GUARD_INTERVAL_19_256,
- GUARD_INTERVAL_PN420,
- GUARD_INTERVAL_PN595,
- GUARD_INTERVAL_PN945,
+ GUARD_INTERVAL_1_32,
+ GUARD_INTERVAL_1_16,
+ GUARD_INTERVAL_1_8,
+ GUARD_INTERVAL_1_4,
+ GUARD_INTERVAL_AUTO,
+ GUARD_INTERVAL_1_128,
+ GUARD_INTERVAL_19_128,
+ GUARD_INTERVAL_19_256,
+ GUARD_INTERVAL_PN420,
+ GUARD_INTERVAL_PN595,
+ GUARD_INTERVAL_PN945,
};
enum fe_hierarchy {
- HIERARCHY_NONE,
- HIERARCHY_1,
- HIERARCHY_2,
- HIERARCHY_4,
- HIERARCHY_AUTO
+ HIERARCHY_NONE,
+ HIERARCHY_1,
+ HIERARCHY_2,
+ HIERARCHY_4,
+ HIERARCHY_AUTO
};
enum fe_interleaving {
- INTERLEAVING_NONE,
- INTERLEAVING_AUTO,
- INTERLEAVING_240,
- INTERLEAVING_720,
+ INTERLEAVING_NONE,
+ INTERLEAVING_AUTO,
+ INTERLEAVING_240,
+ INTERLEAVING_720,
};
/* S2API Commands */
@@ -317,38 +317,38 @@ file: frontend.h
#define DTV_MAX_COMMAND DTV_STAT_TOTAL_BLOCK_COUNT
enum fe_pilot {
- PILOT_ON,
- PILOT_OFF,
- PILOT_AUTO,
+ PILOT_ON,
+ PILOT_OFF,
+ PILOT_AUTO,
};
enum fe_rolloff {
- ROLLOFF_35, /* Implied value in DVB-S, default for DVB-S2 */
- ROLLOFF_20,
- ROLLOFF_25,
- ROLLOFF_AUTO,
+ ROLLOFF_35, /* Implied value in DVB-S, default for DVB-S2 */
+ ROLLOFF_20,
+ ROLLOFF_25,
+ ROLLOFF_AUTO,
};
enum fe_delivery_system {
- SYS_UNDEFINED,
- SYS_DVBC_ANNEX_A,
- SYS_DVBC_ANNEX_B,
- SYS_DVBT,
- SYS_DSS,
- SYS_DVBS,
- SYS_DVBS2,
- SYS_DVBH,
- SYS_ISDBT,
- SYS_ISDBS,
- SYS_ISDBC,
- SYS_ATSC,
- SYS_ATSCMH,
- SYS_DTMB,
- SYS_CMMB,
- SYS_DAB,
- SYS_DVBT2,
- SYS_TURBO,
- SYS_DVBC_ANNEX_C,
+ SYS_UNDEFINED,
+ SYS_DVBC_ANNEX_A,
+ SYS_DVBC_ANNEX_B,
+ SYS_DVBT,
+ SYS_DSS,
+ SYS_DVBS,
+ SYS_DVBS2,
+ SYS_DVBH,
+ SYS_ISDBT,
+ SYS_ISDBS,
+ SYS_ISDBC,
+ SYS_ATSC,
+ SYS_ATSCMH,
+ SYS_DTMB,
+ SYS_CMMB,
+ SYS_DAB,
+ SYS_DVBT2,
+ SYS_TURBO,
+ SYS_DVBC_ANNEX_C,
};
/* backward compatibility */
@@ -358,47 +358,47 @@ file: frontend.h
/* ATSC-MH */
enum atscmh_sccc_block_mode {
- ATSCMH_SCCC_BLK_SEP = 0,
- ATSCMH_SCCC_BLK_COMB = 1,
- ATSCMH_SCCC_BLK_RES = 2,
+ ATSCMH_SCCC_BLK_SEP = 0,
+ ATSCMH_SCCC_BLK_COMB = 1,
+ ATSCMH_SCCC_BLK_RES = 2,
};
enum atscmh_sccc_code_mode {
- ATSCMH_SCCC_CODE_HLF = 0,
- ATSCMH_SCCC_CODE_QTR = 1,
- ATSCMH_SCCC_CODE_RES = 2,
+ ATSCMH_SCCC_CODE_HLF = 0,
+ ATSCMH_SCCC_CODE_QTR = 1,
+ ATSCMH_SCCC_CODE_RES = 2,
};
enum atscmh_rs_frame_ensemble {
- ATSCMH_RSFRAME_ENS_PRI = 0,
- ATSCMH_RSFRAME_ENS_SEC = 1,
+ ATSCMH_RSFRAME_ENS_PRI = 0,
+ ATSCMH_RSFRAME_ENS_SEC = 1,
};
enum atscmh_rs_frame_mode {
- ATSCMH_RSFRAME_PRI_ONLY = 0,
- ATSCMH_RSFRAME_PRI_SEC = 1,
- ATSCMH_RSFRAME_RES = 2,
+ ATSCMH_RSFRAME_PRI_ONLY = 0,
+ ATSCMH_RSFRAME_PRI_SEC = 1,
+ ATSCMH_RSFRAME_RES = 2,
};
enum atscmh_rs_code_mode {
- ATSCMH_RSCODE_211_187 = 0,
- ATSCMH_RSCODE_223_187 = 1,
- ATSCMH_RSCODE_235_187 = 2,
- ATSCMH_RSCODE_RES = 3,
+ ATSCMH_RSCODE_211_187 = 0,
+ ATSCMH_RSCODE_223_187 = 1,
+ ATSCMH_RSCODE_235_187 = 2,
+ ATSCMH_RSCODE_RES = 3,
};
#define NO_STREAM_ID_FILTER (~0U)
#define LNA_AUTO (~0U)
struct dtv_cmds_h {
- char *name; /* A display name for debugging purposes */
+ char *name; /* A display name for debugging purposes */
- __u32 cmd; /* A unique ID */
+ __u32 cmd; /* A unique ID */
- /* Flags */
- __u32 set:1; /* Either a set or get property */
- __u32 buffer:1; /* Does this property use the buffer? */
- __u32 reserved:30; /* Align */
+ /* Flags */
+ __u32 set:1; /* Either a set or get property */
+ __u32 buffer:1; /* Does this property use the buffer? */
+ __u32 reserved:30; /* Align */
};
/**
@@ -414,10 +414,10 @@ file: frontend.h
* bit error, block error, lapsed time.
*/
enum fecap_scale_params {
- FE_SCALE_NOT_AVAILABLE = 0,
- FE_SCALE_DECIBEL,
- FE_SCALE_RELATIVE,
- FE_SCALE_COUNTER
+ FE_SCALE_NOT_AVAILABLE = 0,
+ FE_SCALE_DECIBEL,
+ FE_SCALE_RELATIVE,
+ FE_SCALE_COUNTER
};
/**
@@ -452,43 +452,43 @@ file: frontend.h
* u.st.len = 4;
*/
struct dtv_stats {
- __u8 scale; /* enum fecap_scale_params type */
- union {
- __u64 uvalue; /* for counters and relative scales */
- __s64 svalue; /* for 0.001 dB measures */
- };
+ __u8 scale; /* enum fecap_scale_params type */
+ union {
+ __u64 uvalue; /* for counters and relative scales */
+ __s64 svalue; /* for 0.001 dB measures */
+ };
} __attribute__ ((packed));
#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];
} __attribute__ ((packed));
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 */
#define DTV_IOCTL_MAX_MSGS 64
struct dtv_properties {
- __u32 num;
- struct dtv_property *props;
+ __u32 num;
+ struct dtv_property *props;
};
#if defined(__DVB_CORE__) || !defined (__KERNEL__)
@@ -500,13 +500,13 @@ file: frontend.h
*/
enum fe_bandwidth {
- BANDWIDTH_8_MHZ,
- BANDWIDTH_7_MHZ,
- BANDWIDTH_6_MHZ,
- BANDWIDTH_AUTO,
- BANDWIDTH_5_MHZ,
- BANDWIDTH_10_MHZ,
- BANDWIDTH_1_712_MHZ,
+ BANDWIDTH_8_MHZ,
+ BANDWIDTH_7_MHZ,
+ BANDWIDTH_6_MHZ,
+ BANDWIDTH_AUTO,
+ BANDWIDTH_5_MHZ,
+ BANDWIDTH_10_MHZ,
+ BANDWIDTH_1_712_MHZ,
};
/* This is needed for legacy userspace support */
@@ -528,45 +528,45 @@ file: frontend.h
typedef enum fe_delivery_system fe_delivery_system_t;
struct dvb_qpsk_parameters {
- __u32 symbol_rate; /* symbol rate in Symbols per second */
- fe_code_rate_t fec_inner; /* forward error correction (see above) */
+ __u32 symbol_rate; /* symbol rate in Symbols per second */
+ fe_code_rate_t fec_inner; /* forward error correction (see above) */
};
struct dvb_qam_parameters {
- __u32 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) */
+ __u32 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) */
};
struct dvb_vsb_parameters {
- fe_modulation_t modulation; /* modulation type (see above) */
+ fe_modulation_t modulation; /* modulation type (see above) */
};
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;
};
struct dvb_frontend_parameters {
- __u32 frequency; /* (absolute) frequency in Hz for DVB-C/DVB-T/ATSC */
- /* intermediate frequency in kHz for DVB-S */
- fe_spectral_inversion_t inversion;
- union {
- struct dvb_qpsk_parameters qpsk; /* DVB-S */
- struct dvb_qam_parameters qam; /* DVB-C */
- struct dvb_ofdm_parameters ofdm; /* DVB-T */
- struct dvb_vsb_parameters vsb; /* ATSC */
- } u;
+ __u32 frequency; /* (absolute) frequency in Hz for DVB-C/DVB-T/ATSC */
+ /* intermediate frequency in kHz for DVB-S */
+ fe_spectral_inversion_t inversion;
+ union {
+ struct dvb_qpsk_parameters qpsk; /* DVB-S */
+ struct dvb_qam_parameters qam; /* DVB-C */
+ struct dvb_ofdm_parameters ofdm; /* DVB-T */
+ struct dvb_vsb_parameters vsb; /* ATSC */
+ } u;
};
struct dvb_frontend_event {
- fe_status_t status;
- struct dvb_frontend_parameters parameters;
+ fe_status_t status;
+ struct dvb_frontend_parameters parameters;
};
#endif
diff --git a/Documentation/linux_tv/media/dvb/FE_GET_EVENT.rst b/Documentation/linux_tv/media/dvb/FE_GET_EVENT.rst
index a30dc97d6e15..24352b26a201 100644
--- a/Documentation/linux_tv/media/dvb/FE_GET_EVENT.rst
+++ b/Documentation/linux_tv/media/dvb/FE_GET_EVENT.rst
@@ -50,7 +50,7 @@ Arguments
- .. row 4
- -
+ -
- if any, is to be stored.
diff --git a/Documentation/linux_tv/media/dvb/FE_GET_FRONTEND.rst b/Documentation/linux_tv/media/dvb/FE_GET_FRONTEND.rst
index cb6bcb5fb9b7..d8dbcc7741d4 100644
--- a/Documentation/linux_tv/media/dvb/FE_GET_FRONTEND.rst
+++ b/Documentation/linux_tv/media/dvb/FE_GET_FRONTEND.rst
@@ -38,7 +38,7 @@ Arguments
- int request
- Equals :ref:`FE_SET_FRONTEND` for this
- command.
+ command.
- .. row 3
diff --git a/Documentation/linux_tv/media/dvb/FE_READ_SIGNAL_STRENGTH.rst b/Documentation/linux_tv/media/dvb/FE_READ_SIGNAL_STRENGTH.rst
index 2a3342dc39a2..4adea9274d37 100644
--- a/Documentation/linux_tv/media/dvb/FE_READ_SIGNAL_STRENGTH.rst
+++ b/Documentation/linux_tv/media/dvb/FE_READ_SIGNAL_STRENGTH.rst
@@ -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
diff --git a/Documentation/linux_tv/media/dvb/FE_READ_UNCORRECTED_BLOCKS.rst b/Documentation/linux_tv/media/dvb/FE_READ_UNCORRECTED_BLOCKS.rst
index 0ec53ab669ee..cb35a416b1e4 100644
--- a/Documentation/linux_tv/media/dvb/FE_READ_UNCORRECTED_BLOCKS.rst
+++ b/Documentation/linux_tv/media/dvb/FE_READ_UNCORRECTED_BLOCKS.rst
@@ -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
diff --git a/Documentation/linux_tv/media/dvb/FE_SET_FRONTEND.rst b/Documentation/linux_tv/media/dvb/FE_SET_FRONTEND.rst
index 38e3971825ea..98970961da7b 100644
--- a/Documentation/linux_tv/media/dvb/FE_SET_FRONTEND.rst
+++ b/Documentation/linux_tv/media/dvb/FE_SET_FRONTEND.rst
@@ -45,7 +45,7 @@ Arguments
- int request
- Equals :ref:`FE_SET_FRONTEND` for this
- command.
+ command.
- .. row 3
diff --git a/Documentation/linux_tv/media/dvb/audio_data_types.rst b/Documentation/linux_tv/media/dvb/audio_data_types.rst
index cf9216c91f2d..4a53127eb13a 100644
--- a/Documentation/linux_tv/media/dvb/audio_data_types.rst
+++ b/Documentation/linux_tv/media/dvb/audio_data_types.rst
@@ -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
diff --git a/Documentation/linux_tv/media/dvb/audio_function_calls.rst b/Documentation/linux_tv/media/dvb/audio_function_calls.rst
index 118444e05a21..8eec97d836ea 100644
--- a/Documentation/linux_tv/media/dvb/audio_function_calls.rst
+++ b/Documentation/linux_tv/media/dvb/audio_function_calls.rst
@@ -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
diff --git a/Documentation/linux_tv/media/dvb/ca_data_types.rst b/Documentation/linux_tv/media/dvb/ca_data_types.rst
index ca17e146dac0..025f910ae945 100644
--- a/Documentation/linux_tv/media/dvb/ca_data_types.rst
+++ b/Documentation/linux_tv/media/dvb/ca_data_types.rst
@@ -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;
diff --git a/Documentation/linux_tv/media/dvb/ca_function_calls.rst b/Documentation/linux_tv/media/dvb/ca_function_calls.rst
index 1aa9cb66edae..754e612de70f 100644
--- a/Documentation/linux_tv/media/dvb/ca_function_calls.rst
+++ b/Documentation/linux_tv/media/dvb/ca_function_calls.rst
@@ -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)
diff --git a/Documentation/linux_tv/media/dvb/dmx_fcalls.rst b/Documentation/linux_tv/media/dvb/dmx_fcalls.rst
index 7016a822f817..14335f2d2e3b 100644
--- a/Documentation/linux_tv/media/dvb/dmx_fcalls.rst
+++ b/Documentation/linux_tv/media/dvb/dmx_fcalls.rst
@@ -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.
diff --git a/Documentation/linux_tv/media/dvb/dmx_types.rst b/Documentation/linux_tv/media/dvb/dmx_types.rst
index 05891946b2a7..84bf616ff623 100644
--- a/Documentation/linux_tv/media/dvb/dmx_types.rst
+++ b/Documentation/linux_tv/media/dvb/dmx_types.rst
@@ -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;
diff --git a/Documentation/linux_tv/media/dvb/dtv-fe-stats.rst b/Documentation/linux_tv/media/dvb/dtv-fe-stats.rst
index d169e318cfde..7c105e2ab27e 100644
--- a/Documentation/linux_tv/media/dvb/dtv-fe-stats.rst
+++ b/Documentation/linux_tv/media/dvb/dtv-fe-stats.rst
@@ -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;
diff --git a/Documentation/linux_tv/media/dvb/dtv-properties.rst b/Documentation/linux_tv/media/dvb/dtv-properties.rst
index 002553b7068b..c13be5de4302 100644
--- a/Documentation/linux_tv/media/dvb/dtv-properties.rst
+++ b/Documentation/linux_tv/media/dvb/dtv-properties.rst
@@ -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;
};
diff --git a/Documentation/linux_tv/media/dvb/dtv-property.rst b/Documentation/linux_tv/media/dvb/dtv-property.rst
index 9fc8cef5a09b..5073a49def2a 100644
--- a/Documentation/linux_tv/media/dvb/dtv-property.rst
+++ b/Documentation/linux_tv/media/dvb/dtv-property.rst
@@ -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 */
diff --git a/Documentation/linux_tv/media/dvb/dtv-stats.rst b/Documentation/linux_tv/media/dvb/dtv-stats.rst
index 0f73205400ae..2cfdca00f164 100644
--- a/Documentation/linux_tv/media/dvb/dtv-stats.rst
+++ b/Documentation/linux_tv/media/dvb/dtv-stats.rst
@@ -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;
diff --git a/Documentation/linux_tv/media/dvb/dvb-frontend-event.rst b/Documentation/linux_tv/media/dvb/dvb-frontend-event.rst
index 8ff83578b4da..78e72feaa178 100644
--- a/Documentation/linux_tv/media/dvb/dvb-frontend-event.rst
+++ b/Documentation/linux_tv/media/dvb/dvb-frontend-event.rst
@@ -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;
};
diff --git a/Documentation/linux_tv/media/dvb/dvb-frontend-parameters.rst b/Documentation/linux_tv/media/dvb/dvb-frontend-parameters.rst
index bb125b8c4b3b..16cb581d5cff 100644
--- a/Documentation/linux_tv/media/dvb/dvb-frontend-parameters.rst
+++ b/Documentation/linux_tv/media/dvb/dvb-frontend-parameters.rst
@@ -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;
};
diff --git a/Documentation/linux_tv/media/dvb/dvbproperty.rst b/Documentation/linux_tv/media/dvb/dvbproperty.rst
index 34187964db38..9b3782c5bb44 100644
--- a/Documentation/linux_tv/media/dvb/dvbproperty.rst
+++ b/Documentation/linux_tv/media/dvb/dvbproperty.rst
@@ -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
diff --git a/Documentation/linux_tv/media/dvb/examples.rst b/Documentation/linux_tv/media/dvb/examples.rst
index 0cad02acd1bd..64e029ecd047 100644
--- a/Documentation/linux_tv/media/dvb/examples.rst
+++ b/Documentation/linux_tv/media/dvb/examples.rst
@@ -48,23 +48,23 @@ tuners, but can easily be adjusted for QAM.
/* routine for checking if we have a signal and other status information*/
int FEReadStatus(int fd, fe_status_t *stat)
{
- int ans;
+ int ans;
- if ( (ans = ioctl(fd,FE_READ_STATUS,stat) < 0)){
- perror("FE READ STATUS: ");
- return -1;
- }
+ if ( (ans = ioctl(fd,FE_READ_STATUS,stat) < 0)){
+ perror("FE READ STATUS: ");
+ return -1;
+ }
- if (*stat & FE_HAS_POWER)
- printf("FE HAS POWER\\n");
+ if (*stat & FE_HAS_POWER)
+ printf("FE HAS POWER\\n");
- if (*stat & FE_HAS_SIGNAL)
- printf("FE HAS SIGNAL\\n");
+ if (*stat & FE_HAS_SIGNAL)
+ printf("FE HAS SIGNAL\\n");
- if (*stat & FE_SPECTRUM_INV)
- printf("SPEKTRUM INV\\n");
+ if (*stat & FE_SPECTRUM_INV)
+ printf("SPEKTRUM INV\\n");
- return 0;
+ return 0;
}
@@ -80,153 +80,153 @@ tuners, but can easily be adjusted for QAM.
/* lnb_slof: switch frequency of LNB */
int set_qpsk_channel(int freq, int vpid, int apid, int tpid,
- int diseqc, int pol, int srate, int fec, int lnb_lof1,
- int lnb_lof2, int lnb_slof)
+ int diseqc, int pol, int srate, int fec, int lnb_lof1,
+ int lnb_lof2, int lnb_slof)
{
- struct secCommand scmd;
- struct secCmdSequence scmds;
- struct dmx_pes_filter_params pesFilterParams;
- FrontendParameters frp;
- struct pollfd pfd[1];
- FrontendEvent event;
- int demux1, demux2, demux3, front;
-
- frequency = (uint32_t) freq;
- symbolrate = (uint32_t) srate;
-
- if((front = open(FRONT,O_RDWR)) < 0){
- perror("FRONTEND DEVICE: ");
- return -1;
- }
-
- if((sec = open(SEC,O_RDWR)) < 0){
- perror("SEC DEVICE: ");
- return -1;
- }
-
- if (demux1 < 0){
- if ((demux1=open(DMX, O_RDWR|O_NONBLOCK))
- < 0){
- perror("DEMUX DEVICE: ");
- return -1;
- }
- }
-
- if (demux2 < 0){
- if ((demux2=open(DMX, O_RDWR|O_NONBLOCK))
- < 0){
- perror("DEMUX DEVICE: ");
- return -1;
- }
- }
-
- if (demux3 < 0){
- if ((demux3=open(DMX, O_RDWR|O_NONBLOCK))
- < 0){
- perror("DEMUX DEVICE: ");
- return -1;
- }
- }
-
- if (freq < lnb_slof) {
- frp.Frequency = (freq - lnb_lof1);
- scmds.continuousTone = SEC_TONE_OFF;
- } else {
- frp.Frequency = (freq - lnb_lof2);
- scmds.continuousTone = SEC_TONE_ON;
- }
- frp.Inversion = INVERSION_AUTO;
- if (pol) scmds.voltage = SEC_VOLTAGE_18;
- else scmds.voltage = SEC_VOLTAGE_13;
-
- scmd.type=0;
- scmd.u.diseqc.addr=0x10;
- scmd.u.diseqc.cmd=0x38;
- scmd.u.diseqc.numParams=1;
- scmd.u.diseqc.params[0] = 0xF0 | ((diseqc * 4) & 0x0F) |
- (scmds.continuousTone == SEC_TONE_ON ? 1 : 0) |
- (scmds.voltage==SEC_VOLTAGE_18 ? 2 : 0);
-
- scmds.miniCommand=SEC_MINI_NONE;
- scmds.numCommands=1;
- scmds.commands=&scmd;
- if (ioctl(sec, SEC_SEND_SEQUENCE, &scmds) < 0){
- perror("SEC SEND: ");
- return -1;
- }
-
- if (ioctl(sec, SEC_SEND_SEQUENCE, &scmds) < 0){
- perror("SEC SEND: ");
- return -1;
- }
-
- frp.u.qpsk.SymbolRate = srate;
- frp.u.qpsk.FEC_inner = fec;
-
- if (ioctl(front, FE_SET_FRONTEND, &frp) < 0){
- perror("QPSK TUNE: ");
- return -1;
- }
-
- pfd[0].fd = front;
- pfd[0].events = POLLIN;
-
- if (poll(pfd,1,3000)){
- if (pfd[0].revents & POLLIN){
- printf("Getting QPSK event\\n");
- if ( ioctl(front, FE_GET_EVENT, &event)
-
- == -EOVERFLOW){
- perror("qpsk get event");
- return -1;
- }
- printf("Received ");
- switch(event.type){
- case FE_UNEXPECTED_EV:
- printf("unexpected event\\n");
- return -1;
- case FE_FAILURE_EV:
- printf("failure event\\n");
- return -1;
-
- case FE_COMPLETION_EV:
- printf("completion event\\n");
- }
- }
- }
-
-
- pesFilterParams.pid = vpid;
- pesFilterParams.input = DMX_IN_FRONTEND;
- pesFilterParams.output = DMX_OUT_DECODER;
- pesFilterParams.pes_type = DMX_PES_VIDEO;
- pesFilterParams.flags = DMX_IMMEDIATE_START;
- if (ioctl(demux1, DMX_SET_PES_FILTER, &pesFilterParams) < 0){
- perror("set_vpid");
- return -1;
- }
-
- pesFilterParams.pid = apid;
- pesFilterParams.input = DMX_IN_FRONTEND;
- pesFilterParams.output = DMX_OUT_DECODER;
- pesFilterParams.pes_type = DMX_PES_AUDIO;
- pesFilterParams.flags = DMX_IMMEDIATE_START;
- if (ioctl(demux2, DMX_SET_PES_FILTER, &pesFilterParams) < 0){
- perror("set_apid");
- return -1;
- }
-
- pesFilterParams.pid = tpid;
- pesFilterParams.input = DMX_IN_FRONTEND;
- pesFilterParams.output = DMX_OUT_DECODER;
- pesFilterParams.pes_type = DMX_PES_TELETEXT;
- pesFilterParams.flags = DMX_IMMEDIATE_START;
- if (ioctl(demux3, DMX_SET_PES_FILTER, &pesFilterParams) < 0){
- perror("set_tpid");
- return -1;
- }
-
- return has_signal(fds);
+ struct secCommand scmd;
+ struct secCmdSequence scmds;
+ struct dmx_pes_filter_params pesFilterParams;
+ FrontendParameters frp;
+ struct pollfd pfd[1];
+ FrontendEvent event;
+ int demux1, demux2, demux3, front;
+
+ frequency = (uint32_t) freq;
+ symbolrate = (uint32_t) srate;
+
+ if((front = open(FRONT,O_RDWR)) < 0){
+ perror("FRONTEND DEVICE: ");
+ return -1;
+ }
+
+ if((sec = open(SEC,O_RDWR)) < 0){
+ perror("SEC DEVICE: ");
+ return -1;
+ }
+
+ if (demux1 < 0){
+ if ((demux1=open(DMX, O_RDWR|O_NONBLOCK))
+ < 0){
+ perror("DEMUX DEVICE: ");
+ return -1;
+ }
+ }
+
+ if (demux2 < 0){
+ if ((demux2=open(DMX, O_RDWR|O_NONBLOCK))
+ < 0){
+ perror("DEMUX DEVICE: ");
+ return -1;
+ }
+ }
+
+ if (demux3 < 0){
+ if ((demux3=open(DMX, O_RDWR|O_NONBLOCK))
+ < 0){
+ perror("DEMUX DEVICE: ");
+ return -1;
+ }
+ }
+
+ if (freq < lnb_slof) {
+ frp.Frequency = (freq - lnb_lof1);
+ scmds.continuousTone = SEC_TONE_OFF;
+ } else {
+ frp.Frequency = (freq - lnb_lof2);
+ scmds.continuousTone = SEC_TONE_ON;
+ }
+ frp.Inversion = INVERSION_AUTO;
+ if (pol) scmds.voltage = SEC_VOLTAGE_18;
+ else scmds.voltage = SEC_VOLTAGE_13;
+
+ scmd.type=0;
+ scmd.u.diseqc.addr=0x10;
+ scmd.u.diseqc.cmd=0x38;
+ scmd.u.diseqc.numParams=1;
+ scmd.u.diseqc.params[0] = 0xF0 | ((diseqc * 4) & 0x0F) |
+ (scmds.continuousTone == SEC_TONE_ON ? 1 : 0) |
+ (scmds.voltage==SEC_VOLTAGE_18 ? 2 : 0);
+
+ scmds.miniCommand=SEC_MINI_NONE;
+ scmds.numCommands=1;
+ scmds.commands=&scmd;
+ if (ioctl(sec, SEC_SEND_SEQUENCE, &scmds) < 0){
+ perror("SEC SEND: ");
+ return -1;
+ }
+
+ if (ioctl(sec, SEC_SEND_SEQUENCE, &scmds) < 0){
+ perror("SEC SEND: ");
+ return -1;
+ }
+
+ frp.u.qpsk.SymbolRate = srate;
+ frp.u.qpsk.FEC_inner = fec;
+
+ if (ioctl(front, FE_SET_FRONTEND, &frp) < 0){
+ perror("QPSK TUNE: ");
+ return -1;
+ }
+
+ pfd[0].fd = front;
+ pfd[0].events = POLLIN;
+
+ if (poll(pfd,1,3000)){
+ if (pfd[0].revents & POLLIN){
+ printf("Getting QPSK event\\n");
+ if ( ioctl(front, FE_GET_EVENT, &event)
+
+ == -EOVERFLOW){
+ perror("qpsk get event");
+ return -1;
+ }
+ printf("Received ");
+ switch(event.type){
+ case FE_UNEXPECTED_EV:
+ printf("unexpected event\\n");
+ return -1;
+ case FE_FAILURE_EV:
+ printf("failure event\\n");
+ return -1;
+
+ case FE_COMPLETION_EV:
+ printf("completion event\\n");
+ }
+ }
+ }
+
+
+ pesFilterParams.pid = vpid;
+ pesFilterParams.input = DMX_IN_FRONTEND;
+ pesFilterParams.output = DMX_OUT_DECODER;
+ pesFilterParams.pes_type = DMX_PES_VIDEO;
+ pesFilterParams.flags = DMX_IMMEDIATE_START;
+ if (ioctl(demux1, DMX_SET_PES_FILTER, &pesFilterParams) < 0){
+ perror("set_vpid");
+ return -1;
+ }
+
+ pesFilterParams.pid = apid;
+ pesFilterParams.input = DMX_IN_FRONTEND;
+ pesFilterParams.output = DMX_OUT_DECODER;
+ pesFilterParams.pes_type = DMX_PES_AUDIO;
+ pesFilterParams.flags = DMX_IMMEDIATE_START;
+ if (ioctl(demux2, DMX_SET_PES_FILTER, &pesFilterParams) < 0){
+ perror("set_apid");
+ return -1;
+ }
+
+ pesFilterParams.pid = tpid;
+ pesFilterParams.input = DMX_IN_FRONTEND;
+ pesFilterParams.output = DMX_OUT_DECODER;
+ pesFilterParams.pes_type = DMX_PES_TELETEXT;
+ pesFilterParams.flags = DMX_IMMEDIATE_START;
+ if (ioctl(demux3, DMX_SET_PES_FILTER, &pesFilterParams) < 0){
+ perror("set_tpid");
+ return -1;
+ }
+
+ return has_signal(fds);
}
The program assumes that you are using a universal LNB and a standard
@@ -274,43 +274,43 @@ recording.
int switch_to_record(int demux1, int demux2, uint16_t vpid, uint16_t apid)
{
- struct dmx_pes_filter_params pesFilterParams;
-
- if (demux1 < 0){
- if ((demux1=open(DMX, O_RDWR|O_NONBLOCK))
- < 0){
- perror("DEMUX DEVICE: ");
- return -1;
- }
- }
-
- if (demux2 < 0){
- if ((demux2=open(DMX, O_RDWR|O_NONBLOCK))
- < 0){
- perror("DEMUX DEVICE: ");
- return -1;
- }
- }
-
- pesFilterParams.pid = vpid;
- pesFilterParams.input = DMX_IN_FRONTEND;
- pesFilterParams.output = DMX_OUT_TS_TAP;
- pesFilterParams.pes_type = DMX_PES_VIDEO;
- pesFilterParams.flags = DMX_IMMEDIATE_START;
- if (ioctl(demux1, DMX_SET_PES_FILTER, &pesFilterParams) < 0){
- perror("DEMUX DEVICE");
- return -1;
- }
- pesFilterParams.pid = apid;
- pesFilterParams.input = DMX_IN_FRONTEND;
- pesFilterParams.output = DMX_OUT_TS_TAP;
- pesFilterParams.pes_type = DMX_PES_AUDIO;
- pesFilterParams.flags = DMX_IMMEDIATE_START;
- if (ioctl(demux2, DMX_SET_PES_FILTER, &pesFilterParams) < 0){
- perror("DEMUX DEVICE");
- return -1;
- }
- return 0;
+ struct dmx_pes_filter_params pesFilterParams;
+
+ if (demux1 < 0){
+ if ((demux1=open(DMX, O_RDWR|O_NONBLOCK))
+ < 0){
+ perror("DEMUX DEVICE: ");
+ return -1;
+ }
+ }
+
+ if (demux2 < 0){
+ if ((demux2=open(DMX, O_RDWR|O_NONBLOCK))
+ < 0){
+ perror("DEMUX DEVICE: ");
+ return -1;
+ }
+ }
+
+ pesFilterParams.pid = vpid;
+ pesFilterParams.input = DMX_IN_FRONTEND;
+ pesFilterParams.output = DMX_OUT_TS_TAP;
+ pesFilterParams.pes_type = DMX_PES_VIDEO;
+ pesFilterParams.flags = DMX_IMMEDIATE_START;
+ if (ioctl(demux1, DMX_SET_PES_FILTER, &pesFilterParams) < 0){
+ perror("DEMUX DEVICE");
+ return -1;
+ }
+ pesFilterParams.pid = apid;
+ pesFilterParams.input = DMX_IN_FRONTEND;
+ pesFilterParams.output = DMX_OUT_TS_TAP;
+ pesFilterParams.pes_type = DMX_PES_AUDIO;
+ pesFilterParams.flags = DMX_IMMEDIATE_START;
+ if (ioctl(demux2, DMX_SET_PES_FILTER, &pesFilterParams) < 0){
+ perror("DEMUX DEVICE");
+ return -1;
+ }
+ return 0;
}
/* start recording MAX_LENGTH , assuming the transponder is tuned */
@@ -319,62 +319,62 @@ recording.
/* vpid, apid: PIDs of video and audio channels */
int record_dvr(int demux1, int demux2, uint16_t vpid, uint16_t apid)
{
- int i;
- int len;
- int written;
- uint8_t buf[BUFFY];
- uint64_t length;
- struct pollfd pfd[1];
- int dvr, dvr_out;
-
- /* open dvr device */
- if ((dvr = open(DVR, O_RDONLY|O_NONBLOCK)) < 0){
- perror("DVR DEVICE");
- return -1;
- }
-
- /* switch video and audio demuxes to dvr */
- printf ("Switching dvr on\\n");
- i = switch_to_record(demux1, demux2, vpid, apid);
- printf("finished: ");
-
- printf("Recording %2.0f MB of test file in TS format\\n",
- MAX_LENGTH/(1024.0*1024.0));
- length = 0;
-
- /* open output file */
- if ((dvr_out = open(DVR_FILE,O_WRONLY|O_CREAT
- |O_TRUNC, S_IRUSR|S_IWUSR
- |S_IRGRP|S_IWGRP|S_IROTH|
- S_IWOTH)) < 0){
- perror("Can't open file for dvr test");
- return -1;
- }
-
- pfd[0].fd = dvr;
- pfd[0].events = POLLIN;
-
- /* poll for dvr data and write to file */
- while (length < MAX_LENGTH ) {
- if (poll(pfd,1,1)){
- if (pfd[0].revents & POLLIN){
- len = read(dvr, buf, BUFFY);
- if (len < 0){
- perror("recording");
- return -1;
- }
- if (len > 0){
- written = 0;
- while (written < len)
- written +=
- write (dvr_out,
- buf, len);
- length += len;
- printf("written %2.0f MB\\r",
- length/1024./1024.);
- }
- }
- }
- }
- return 0;
+ int i;
+ int len;
+ int written;
+ uint8_t buf[BUFFY];
+ uint64_t length;
+ struct pollfd pfd[1];
+ int dvr, dvr_out;
+
+ /* open dvr device */
+ if ((dvr = open(DVR, O_RDONLY|O_NONBLOCK)) < 0){
+ perror("DVR DEVICE");
+ return -1;
+ }
+
+ /* switch video and audio demuxes to dvr */
+ printf ("Switching dvr on\\n");
+ i = switch_to_record(demux1, demux2, vpid, apid);
+ printf("finished: ");
+
+ printf("Recording %2.0f MB of test file in TS format\\n",
+ MAX_LENGTH/(1024.0*1024.0));
+ length = 0;
+
+ /* open output file */
+ if ((dvr_out = open(DVR_FILE,O_WRONLY|O_CREAT
+ |O_TRUNC, S_IRUSR|S_IWUSR
+ |S_IRGRP|S_IWGRP|S_IROTH|
+ S_IWOTH)) < 0){
+ perror("Can't open file for dvr test");
+ return -1;
+ }
+
+ pfd[0].fd = dvr;
+ pfd[0].events = POLLIN;
+
+ /* poll for dvr data and write to file */
+ while (length < MAX_LENGTH ) {
+ if (poll(pfd,1,1)){
+ if (pfd[0].revents & POLLIN){
+ len = read(dvr, buf, BUFFY);
+ if (len < 0){
+ perror("recording");
+ return -1;
+ }
+ if (len > 0){
+ written = 0;
+ while (written < len)
+ written +=
+ write (dvr_out,
+ buf, len);
+ length += len;
+ printf("written %2.0f MB\\r",
+ length/1024./1024.);
+ }
+ }
+ }
+ }
+ return 0;
}
diff --git a/Documentation/linux_tv/media/dvb/fe-bandwidth-t.rst b/Documentation/linux_tv/media/dvb/fe-bandwidth-t.rst
index f59d60c57bfd..f614c22355da 100644
--- a/Documentation/linux_tv/media/dvb/fe-bandwidth-t.rst
+++ b/Documentation/linux_tv/media/dvb/fe-bandwidth-t.rst
@@ -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
diff --git a/Documentation/linux_tv/media/dvb/fe-diseqc-recv-slave-reply.rst b/Documentation/linux_tv/media/dvb/fe-diseqc-recv-slave-reply.rst
index da860e50fde9..67e53787cc1e 100644
--- a/Documentation/linux_tv/media/dvb/fe-diseqc-recv-slave-reply.rst
+++ b/Documentation/linux_tv/media/dvb/fe-diseqc-recv-slave-reply.rst
@@ -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
diff --git a/Documentation/linux_tv/media/dvb/fe-diseqc-send-burst.rst b/Documentation/linux_tv/media/dvb/fe-diseqc-send-burst.rst
index f365238e5b78..35de0278a064 100644
--- a/Documentation/linux_tv/media/dvb/fe-diseqc-send-burst.rst
+++ b/Documentation/linux_tv/media/dvb/fe-diseqc-send-burst.rst
@@ -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
diff --git a/Documentation/linux_tv/media/dvb/fe-get-info.rst b/Documentation/linux_tv/media/dvb/fe-get-info.rst
index 0880a11def86..97743d9418ac 100644
--- a/Documentation/linux_tv/media/dvb/fe-get-info.rst
+++ b/Documentation/linux_tv/media/dvb/fe-get-info.rst
@@ -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
diff --git a/Documentation/linux_tv/media/dvb/fe-read-status.rst b/Documentation/linux_tv/media/dvb/fe-read-status.rst
index 250fabc71c64..56347eed3703 100644
--- a/Documentation/linux_tv/media/dvb/fe-read-status.rst
+++ b/Documentation/linux_tv/media/dvb/fe-read-status.rst
@@ -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
diff --git a/Documentation/linux_tv/media/dvb/fe-set-tone.rst b/Documentation/linux_tv/media/dvb/fe-set-tone.rst
index 432797211f80..5e80ee9988b0 100644
--- a/Documentation/linux_tv/media/dvb/fe-set-tone.rst
+++ b/Documentation/linux_tv/media/dvb/fe-set-tone.rst
@@ -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)
diff --git a/Documentation/linux_tv/media/dvb/fe-type-t.rst b/Documentation/linux_tv/media/dvb/fe-type-t.rst
index fcce8ef421ae..0c26af5d3a92 100644
--- a/Documentation/linux_tv/media/dvb/fe-type-t.rst
+++ b/Documentation/linux_tv/media/dvb/fe-type-t.rst
@@ -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)
diff --git a/Documentation/linux_tv/media/dvb/fe_property_parameters.rst b/Documentation/linux_tv/media/dvb/fe_property_parameters.rst
index e30ed6d71335..b6142ee1acfb 100644
--- a/Documentation/linux_tv/media/dvb/fe_property_parameters.rst
+++ b/Documentation/linux_tv/media/dvb/fe_property_parameters.rst
@@ -93,7 +93,7 @@ modulations are supported by a given standard.
- .. _`QPSK`:
- ``QPSK``
+ ``QPSK``
- QPSK modulation
@@ -101,7 +101,7 @@ modulations are supported by a given standard.
- .. _`QAM-16`:
- ``QAM_16``
+ ``QAM_16``
- 16-QAM modulation
@@ -109,7 +109,7 @@ modulations are supported by a given standard.
- .. _`QAM-32`:
- ``QAM_32``
+ ``QAM_32``
- 32-QAM modulation
@@ -117,7 +117,7 @@ modulations are supported by a given standard.
- .. _`QAM-64`:
- ``QAM_64``
+ ``QAM_64``
- 64-QAM modulation
@@ -125,7 +125,7 @@ modulations are supported by a given standard.
- .. _`QAM-128`:
- ``QAM_128``
+ ``QAM_128``
- 128-QAM modulation
@@ -133,7 +133,7 @@ modulations are supported by a given standard.
- .. _`QAM-256`:
- ``QAM_256``
+ ``QAM_256``
- 256-QAM modulation
@@ -141,7 +141,7 @@ modulations are supported by a given standard.
- .. _`QAM-AUTO`:
- ``QAM_AUTO``
+ ``QAM_AUTO``
- Autodetect QAM modulation
@@ -149,7 +149,7 @@ modulations are supported by a given standard.
- .. _`VSB-8`:
- ``VSB_8``
+ ``VSB_8``
- 8-VSB modulation
@@ -157,7 +157,7 @@ modulations are supported by a given standard.
- .. _`VSB-16`:
- ``VSB_16``
+ ``VSB_16``
- 16-VSB modulation
@@ -165,7 +165,7 @@ modulations are supported by a given standard.
- .. _`PSK-8`:
- ``PSK_8``
+ ``PSK_8``
- 8-PSK modulation
@@ -173,7 +173,7 @@ modulations are supported by a given standard.
- .. _`APSK-16`:
- ``APSK_16``
+ ``APSK_16``
- 16-APSK modulation
@@ -181,7 +181,7 @@ modulations are supported by a given standard.
- .. _`APSK-32`:
- ``APSK_32``
+ ``APSK_32``
- 32-APSK modulation
@@ -189,7 +189,7 @@ modulations are supported by a given standard.
- .. _`DQPSK`:
- ``DQPSK``
+ ``DQPSK``
- DQPSK modulation
@@ -197,7 +197,7 @@ modulations are supported by a given standard.
- .. _`QAM-4-NR`:
- ``QAM_4_NR``
+ ``QAM_4_NR``
- 4-QAM-NR modulation
@@ -269,7 +269,7 @@ inversion off. If it fails, it will try to enable inversion.
- .. _`INVERSION-OFF`:
- ``INVERSION_OFF``
+ ``INVERSION_OFF``
- Don't do spectral band inversion.
@@ -277,7 +277,7 @@ inversion off. If it fails, it will try to enable inversion.
- .. _`INVERSION-ON`:
- ``INVERSION_ON``
+ ``INVERSION_ON``
- Do spectral band inversion.
@@ -285,7 +285,7 @@ inversion off. If it fails, it will try to enable inversion.
- .. _`INVERSION-AUTO`:
- ``INVERSION_AUTO``
+ ``INVERSION_AUTO``
- Autodetect spectral band inversion.
@@ -339,7 +339,7 @@ enum fe_code_rate: type of the Forward Error Correction.
- .. _`FEC-NONE`:
- ``FEC_NONE``
+ ``FEC_NONE``
- No Forward Error Correction Code
@@ -347,7 +347,7 @@ enum fe_code_rate: type of the Forward Error Correction.
- .. _`FEC-AUTO`:
- ``FEC_AUTO``
+ ``FEC_AUTO``
- Autodetect Error Correction Code
@@ -355,7 +355,7 @@ enum fe_code_rate: type of the Forward Error Correction.
- .. _`FEC-1-2`:
- ``FEC_1_2``
+ ``FEC_1_2``
- Forward Error Correction Code 1/2
@@ -363,7 +363,7 @@ enum fe_code_rate: type of the Forward Error Correction.
- .. _`FEC-2-3`:
- ``FEC_2_3``
+ ``FEC_2_3``
- Forward Error Correction Code 2/3
@@ -371,7 +371,7 @@ enum fe_code_rate: type of the Forward Error Correction.
- .. _`FEC-3-4`:
- ``FEC_3_4``
+ ``FEC_3_4``
- Forward Error Correction Code 3/4
@@ -379,7 +379,7 @@ enum fe_code_rate: type of the Forward Error Correction.
- .. _`FEC-4-5`:
- ``FEC_4_5``
+ ``FEC_4_5``
- Forward Error Correction Code 4/5
@@ -387,7 +387,7 @@ enum fe_code_rate: type of the Forward Error Correction.
- .. _`FEC-5-6`:
- ``FEC_5_6``
+ ``FEC_5_6``
- Forward Error Correction Code 5/6
@@ -395,7 +395,7 @@ enum fe_code_rate: type of the Forward Error Correction.
- .. _`FEC-6-7`:
- ``FEC_6_7``
+ ``FEC_6_7``
- Forward Error Correction Code 6/7
@@ -403,7 +403,7 @@ enum fe_code_rate: type of the Forward Error Correction.
- .. _`FEC-7-8`:
- ``FEC_7_8``
+ ``FEC_7_8``
- Forward Error Correction Code 7/8
@@ -411,7 +411,7 @@ enum fe_code_rate: type of the Forward Error Correction.
- .. _`FEC-8-9`:
- ``FEC_8_9``
+ ``FEC_8_9``
- Forward Error Correction Code 8/9
@@ -419,7 +419,7 @@ enum fe_code_rate: type of the Forward Error Correction.
- .. _`FEC-9-10`:
- ``FEC_9_10``
+ ``FEC_9_10``
- Forward Error Correction Code 9/10
@@ -427,7 +427,7 @@ enum fe_code_rate: type of the Forward Error Correction.
- .. _`FEC-2-5`:
- ``FEC_2_5``
+ ``FEC_2_5``
- Forward Error Correction Code 2/5
@@ -435,7 +435,7 @@ enum fe_code_rate: type of the Forward Error Correction.
- .. _`FEC-3-5`:
- ``FEC_3_5``
+ ``FEC_3_5``
- Forward Error Correction Code 3/5
@@ -469,7 +469,7 @@ described in the DiSEqC spec.
- .. _`SEC-VOLTAGE-13`:
- ``SEC_VOLTAGE_13``
+ ``SEC_VOLTAGE_13``
- Set DC voltage level to 13V
@@ -477,7 +477,7 @@ described in the DiSEqC spec.
- .. _`SEC-VOLTAGE-18`:
- ``SEC_VOLTAGE_18``
+ ``SEC_VOLTAGE_18``
- Set DC voltage level to 18V
@@ -485,7 +485,7 @@ described in the DiSEqC spec.
- .. _`SEC-VOLTAGE-OFF`:
- ``SEC_VOLTAGE_OFF``
+ ``SEC_VOLTAGE_OFF``
- Don't send any voltage to the antenna
@@ -530,7 +530,7 @@ fe_pilot type
- .. _`PILOT-ON`:
- ``PILOT_ON``
+ ``PILOT_ON``
- Pilot tones enabled
@@ -538,7 +538,7 @@ fe_pilot type
- .. _`PILOT-OFF`:
- ``PILOT_OFF``
+ ``PILOT_OFF``
- Pilot tones disabled
@@ -546,7 +546,7 @@ fe_pilot type
- .. _`PILOT-AUTO`:
- ``PILOT_AUTO``
+ ``PILOT_AUTO``
- Autodetect pilot tones
@@ -583,7 +583,7 @@ fe_rolloff type
- .. _`ROLLOFF-35`:
- ``ROLLOFF_35``
+ ``ROLLOFF_35``
- Roloff factor: α=35%
@@ -591,7 +591,7 @@ fe_rolloff type
- .. _`ROLLOFF-20`:
- ``ROLLOFF_20``
+ ``ROLLOFF_20``
- Roloff factor: α=20%
@@ -599,7 +599,7 @@ fe_rolloff type
- .. _`ROLLOFF-25`:
- ``ROLLOFF_25``
+ ``ROLLOFF_25``
- Roloff factor: α=25%
@@ -607,7 +607,7 @@ fe_rolloff type
- .. _`ROLLOFF-AUTO`:
- ``ROLLOFF_AUTO``
+ ``ROLLOFF_AUTO``
- Auto-detect the roloff factor.
@@ -670,7 +670,7 @@ Possible values:
- .. _`SYS-UNDEFINED`:
- ``SYS_UNDEFINED``
+ ``SYS_UNDEFINED``
- Undefined standard. Generally, indicates an error
@@ -678,7 +678,7 @@ Possible values:
- .. _`SYS-DVBC-ANNEX-A`:
- ``SYS_DVBC_ANNEX_A``
+ ``SYS_DVBC_ANNEX_A``
- Cable TV: DVB-C following ITU-T J.83 Annex A spec
@@ -686,7 +686,7 @@ Possible values:
- .. _`SYS-DVBC-ANNEX-B`:
- ``SYS_DVBC_ANNEX_B``
+ ``SYS_DVBC_ANNEX_B``
- Cable TV: DVB-C following ITU-T J.83 Annex B spec (ClearQAM)
@@ -694,7 +694,7 @@ Possible values:
- .. _`SYS-DVBC-ANNEX-C`:
- ``SYS_DVBC_ANNEX_C``
+ ``SYS_DVBC_ANNEX_C``
- Cable TV: DVB-C following ITU-T J.83 Annex C spec
@@ -702,7 +702,7 @@ Possible values:
- .. _`SYS-ISDBC`:
- ``SYS_ISDBC``
+ ``SYS_ISDBC``
- Cable TV: ISDB-C (no drivers yet)
@@ -710,7 +710,7 @@ Possible values:
- .. _`SYS-DVBT`:
- ``SYS_DVBT``
+ ``SYS_DVBT``
- Terrestral TV: DVB-T
@@ -718,7 +718,7 @@ Possible values:
- .. _`SYS-DVBT2`:
- ``SYS_DVBT2``
+ ``SYS_DVBT2``
- Terrestral TV: DVB-T2
@@ -726,7 +726,7 @@ Possible values:
- .. _`SYS-ISDBT`:
- ``SYS_ISDBT``
+ ``SYS_ISDBT``
- Terrestral TV: ISDB-T
@@ -734,7 +734,7 @@ Possible values:
- .. _`SYS-ATSC`:
- ``SYS_ATSC``
+ ``SYS_ATSC``
- Terrestral TV: ATSC
@@ -742,7 +742,7 @@ Possible values:
- .. _`SYS-ATSCMH`:
- ``SYS_ATSCMH``
+ ``SYS_ATSCMH``
- Terrestral TV (mobile): ATSC-M/H
@@ -750,7 +750,7 @@ Possible values:
- .. _`SYS-DTMB`:
- ``SYS_DTMB``
+ ``SYS_DTMB``
- Terrestrial TV: DTMB
@@ -758,7 +758,7 @@ Possible values:
- .. _`SYS-DVBS`:
- ``SYS_DVBS``
+ ``SYS_DVBS``
- Satellite TV: DVB-S
@@ -766,7 +766,7 @@ Possible values:
- .. _`SYS-DVBS2`:
- ``SYS_DVBS2``
+ ``SYS_DVBS2``
- Satellite TV: DVB-S2
@@ -774,7 +774,7 @@ Possible values:
- .. _`SYS-TURBO`:
- ``SYS_TURBO``
+ ``SYS_TURBO``
- Satellite TV: DVB-S Turbo
@@ -782,7 +782,7 @@ Possible values:
- .. _`SYS-ISDBS`:
- ``SYS_ISDBS``
+ ``SYS_ISDBS``
- Satellite TV: ISDB-S
@@ -790,7 +790,7 @@ Possible values:
- .. _`SYS-DAB`:
- ``SYS_DAB``
+ ``SYS_DAB``
- Digital audio: DAB (not fully supported)
@@ -798,7 +798,7 @@ Possible values:
- .. _`SYS-DSS`:
- ``SYS_DSS``
+ ``SYS_DSS``
- Satellite TV:"DSS (not fully supported)
@@ -806,7 +806,7 @@ Possible values:
- .. _`SYS-CMMB`:
- ``SYS_CMMB``
+ ``SYS_CMMB``
- Terrestral TV (mobile):CMMB (not fully supported)
@@ -814,7 +814,7 @@ Possible values:
- .. _`SYS-DVBH`:
- ``SYS_DVBH``
+ ``SYS_DVBH``
- Terrestral TV (mobile): DVB-H (standard deprecated)
@@ -1240,20 +1240,20 @@ Possible values are:
- .. _`ATSCMH-RSFRAME-PRI-ONLY`:
- ``ATSCMH_RSFRAME_PRI_ONLY``
+ ``ATSCMH_RSFRAME_PRI_ONLY``
- Single Frame: There is only a primary RS Frame for all Group
- Regions.
+ Regions.
- .. row 3
- .. _`ATSCMH-RSFRAME-PRI-SEC`:
- ``ATSCMH_RSFRAME_PRI_SEC``
+ ``ATSCMH_RSFRAME_PRI_SEC``
- Dual Frame: There are two separate RS Frames: Primary RS Frame for
- Group Region A and B and Secondary RS Frame for Group Region C and
- D.
+ Group Region A and B and Secondary RS Frame for Group Region C and
+ D.
@@ -1284,7 +1284,7 @@ Possible values are:
- .. _`ATSCMH-RSFRAME-ENS-PRI`:
- ``ATSCMH_RSFRAME_ENS_PRI``
+ ``ATSCMH_RSFRAME_ENS_PRI``
- Primary Ensemble.
@@ -1292,7 +1292,7 @@ Possible values are:
- .. _`ATSCMH-RSFRAME-ENS-SEC`:
- ``AATSCMH_RSFRAME_PRI_SEC``
+ ``AATSCMH_RSFRAME_PRI_SEC``
- Secondary Ensemble.
@@ -1300,7 +1300,7 @@ Possible values are:
- .. _`ATSCMH-RSFRAME-RES`:
- ``AATSCMH_RSFRAME_RES``
+ ``AATSCMH_RSFRAME_RES``
- Reserved. Shouldn't be used.
@@ -1333,7 +1333,7 @@ Possible values are:
- .. _`ATSCMH-RSCODE-211-187`:
- ``ATSCMH_RSCODE_211_187``
+ ``ATSCMH_RSCODE_211_187``
- Reed Solomon code (211,187).
@@ -1341,7 +1341,7 @@ Possible values are:
- .. _`ATSCMH-RSCODE-223-187`:
- ``ATSCMH_RSCODE_223_187``
+ ``ATSCMH_RSCODE_223_187``
- Reed Solomon code (223,187).
@@ -1349,7 +1349,7 @@ Possible values are:
- .. _`ATSCMH-RSCODE-235-187`:
- ``ATSCMH_RSCODE_235_187``
+ ``ATSCMH_RSCODE_235_187``
- Reed Solomon code (235,187).
@@ -1357,7 +1357,7 @@ Possible values are:
- .. _`ATSCMH-RSCODE-RES`:
- ``ATSCMH_RSCODE_RES``
+ ``ATSCMH_RSCODE_RES``
- Reserved. Shouldn't be used.
@@ -1401,25 +1401,25 @@ Possible values are:
- .. _`ATSCMH-SCCC-BLK-SEP`:
- ``ATSCMH_SCCC_BLK_SEP``
+ ``ATSCMH_SCCC_BLK_SEP``
- Separate SCCC: the SCCC outer code mode shall be set independently
- for each Group Region (A, B, C, D)
+ for each Group Region (A, B, C, D)
- .. row 3
- .. _`ATSCMH-SCCC-BLK-COMB`:
- ``ATSCMH_SCCC_BLK_COMB``
+ ``ATSCMH_SCCC_BLK_COMB``
- Combined SCCC: all four Regions shall have the same SCCC outer
- code mode.
+ code mode.
- .. row 4
- .. _`ATSCMH-SCCC-BLK-RES`:
- ``ATSCMH_SCCC_BLK_RES``
+ ``ATSCMH_SCCC_BLK_RES``
- Reserved. Shouldn't be used.
@@ -1452,7 +1452,7 @@ Possible values are:
- .. _`ATSCMH-SCCC-CODE-HLF`:
- ``ATSCMH_SCCC_CODE_HLF``
+ ``ATSCMH_SCCC_CODE_HLF``
- The outer code rate of a SCCC Block is 1/2 rate.
@@ -1460,7 +1460,7 @@ Possible values are:
- .. _`ATSCMH-SCCC-CODE-QTR`:
- ``ATSCMH_SCCC_CODE_QTR``
+ ``ATSCMH_SCCC_CODE_QTR``
- The outer code rate of a SCCC Block is 1/4 rate.
@@ -1468,7 +1468,7 @@ Possible values are:
- .. _`ATSCMH-SCCC-CODE-RES`:
- ``ATSCMH_SCCC_CODE_RES``
+ ``ATSCMH_SCCC_CODE_RES``
- to be documented.
@@ -1564,7 +1564,7 @@ Modulation guard interval
- .. _`GUARD-INTERVAL-AUTO`:
- ``GUARD_INTERVAL_AUTO``
+ ``GUARD_INTERVAL_AUTO``
- Autodetect the guard interval
@@ -1572,7 +1572,7 @@ Modulation guard interval
- .. _`GUARD-INTERVAL-1-128`:
- ``GUARD_INTERVAL_1_128``
+ ``GUARD_INTERVAL_1_128``
- Guard interval 1/128
@@ -1580,7 +1580,7 @@ Modulation guard interval
- .. _`GUARD-INTERVAL-1-32`:
- ``GUARD_INTERVAL_1_32``
+ ``GUARD_INTERVAL_1_32``
- Guard interval 1/32
@@ -1588,7 +1588,7 @@ Modulation guard interval
- .. _`GUARD-INTERVAL-1-16`:
- ``GUARD_INTERVAL_1_16``
+ ``GUARD_INTERVAL_1_16``
- Guard interval 1/16
@@ -1596,7 +1596,7 @@ Modulation guard interval
- .. _`GUARD-INTERVAL-1-8`:
- ``GUARD_INTERVAL_1_8``
+ ``GUARD_INTERVAL_1_8``
- Guard interval 1/8
@@ -1604,7 +1604,7 @@ Modulation guard interval
- .. _`GUARD-INTERVAL-1-4`:
- ``GUARD_INTERVAL_1_4``
+ ``GUARD_INTERVAL_1_4``
- Guard interval 1/4
@@ -1612,7 +1612,7 @@ Modulation guard interval
- .. _`GUARD-INTERVAL-19-128`:
- ``GUARD_INTERVAL_19_128``
+ ``GUARD_INTERVAL_19_128``
- Guard interval 19/128
@@ -1620,7 +1620,7 @@ Modulation guard interval
- .. _`GUARD-INTERVAL-19-256`:
- ``GUARD_INTERVAL_19_256``
+ ``GUARD_INTERVAL_19_256``
- Guard interval 19/256
@@ -1628,7 +1628,7 @@ Modulation guard interval
- .. _`GUARD-INTERVAL-PN420`:
- ``GUARD_INTERVAL_PN420``
+ ``GUARD_INTERVAL_PN420``
- PN length 420 (1/4)
@@ -1636,7 +1636,7 @@ Modulation guard interval
- .. _`GUARD-INTERVAL-PN595`:
- ``GUARD_INTERVAL_PN595``
+ ``GUARD_INTERVAL_PN595``
- PN length 595 (1/6)
@@ -1644,7 +1644,7 @@ Modulation guard interval
- .. _`GUARD-INTERVAL-PN945`:
- ``GUARD_INTERVAL_PN945``
+ ``GUARD_INTERVAL_PN945``
- PN length 945 (1/9)
@@ -1693,16 +1693,16 @@ enum fe_transmit_mode: Number of carriers per channel
- .. _`TRANSMISSION-MODE-AUTO`:
- ``TRANSMISSION_MODE_AUTO``
+ ``TRANSMISSION_MODE_AUTO``
- Autodetect transmission mode. The hardware will try to find the
- correct FFT-size (if capable) to fill in the missing parameters.
+ correct FFT-size (if capable) to fill in the missing parameters.
- .. row 3
- .. _`TRANSMISSION-MODE-1K`:
- ``TRANSMISSION_MODE_1K``
+ ``TRANSMISSION_MODE_1K``
- Transmission mode 1K
@@ -1710,7 +1710,7 @@ enum fe_transmit_mode: Number of carriers per channel
- .. _`TRANSMISSION-MODE-2K`:
- ``TRANSMISSION_MODE_2K``
+ ``TRANSMISSION_MODE_2K``
- Transmission mode 2K
@@ -1718,7 +1718,7 @@ enum fe_transmit_mode: Number of carriers per channel
- .. _`TRANSMISSION-MODE-8K`:
- ``TRANSMISSION_MODE_8K``
+ ``TRANSMISSION_MODE_8K``
- Transmission mode 8K
@@ -1726,7 +1726,7 @@ enum fe_transmit_mode: Number of carriers per channel
- .. _`TRANSMISSION-MODE-4K`:
- ``TRANSMISSION_MODE_4K``
+ ``TRANSMISSION_MODE_4K``
- Transmission mode 4K
@@ -1734,7 +1734,7 @@ enum fe_transmit_mode: Number of carriers per channel
- .. _`TRANSMISSION-MODE-16K`:
- ``TRANSMISSION_MODE_16K``
+ ``TRANSMISSION_MODE_16K``
- Transmission mode 16K
@@ -1742,7 +1742,7 @@ enum fe_transmit_mode: Number of carriers per channel
- .. _`TRANSMISSION-MODE-32K`:
- ``TRANSMISSION_MODE_32K``
+ ``TRANSMISSION_MODE_32K``
- Transmission mode 32K
@@ -1750,7 +1750,7 @@ enum fe_transmit_mode: Number of carriers per channel
- .. _`TRANSMISSION-MODE-C1`:
- ``TRANSMISSION_MODE_C1``
+ ``TRANSMISSION_MODE_C1``
- Single Carrier (C=1) transmission mode (DTMB)
@@ -1758,7 +1758,7 @@ enum fe_transmit_mode: Number of carriers per channel
- .. _`TRANSMISSION-MODE-C3780`:
- ``TRANSMISSION_MODE_C3780``
+ ``TRANSMISSION_MODE_C3780``
- Multi Carrier (C=3780) transmission mode (DTMB)
@@ -1810,7 +1810,7 @@ Frontend hierarchy
- .. _`HIERARCHY-NONE`:
- ``HIERARCHY_NONE``
+ ``HIERARCHY_NONE``
- No hierarchy
@@ -1818,7 +1818,7 @@ Frontend hierarchy
- .. _`HIERARCHY-AUTO`:
- ``HIERARCHY_AUTO``
+ ``HIERARCHY_AUTO``
- Autodetect hierarchy (if supported)
@@ -1826,7 +1826,7 @@ Frontend hierarchy
- .. _`HIERARCHY-1`:
- ``HIERARCHY_1``
+ ``HIERARCHY_1``
- Hierarchy 1
@@ -1834,7 +1834,7 @@ Frontend hierarchy
- .. _`HIERARCHY-2`:
- ``HIERARCHY_2``
+ ``HIERARCHY_2``
- Hierarchy 2
@@ -1842,7 +1842,7 @@ Frontend hierarchy
- .. _`HIERARCHY-4`:
- ``HIERARCHY_4``
+ ``HIERARCHY_4``
- Hierarchy 4
@@ -1917,7 +1917,7 @@ Time interleaving to be used. Currently, used only on DTMB.
- .. _`INTERLEAVING-NONE`:
- ``INTERLEAVING_NONE``
+ ``INTERLEAVING_NONE``
- No interleaving.
@@ -1925,7 +1925,7 @@ Time interleaving to be used. Currently, used only on DTMB.
- .. _`INTERLEAVING-AUTO`:
- ``INTERLEAVING_AUTO``
+ ``INTERLEAVING_AUTO``
- Auto-detect interleaving.
@@ -1933,7 +1933,7 @@ Time interleaving to be used. Currently, used only on DTMB.
- .. _`INTERLEAVING-240`:
- ``INTERLEAVING_240``
+ ``INTERLEAVING_240``
- Interleaving of 240 symbols.
@@ -1941,7 +1941,7 @@ Time interleaving to be used. Currently, used only on DTMB.
- .. _`INTERLEAVING-720`:
- ``INTERLEAVING_720``
+ ``INTERLEAVING_720``
- Interleaving of 720 symbols.
diff --git a/Documentation/linux_tv/media/dvb/intro.rst b/Documentation/linux_tv/media/dvb/intro.rst
index 338300b11aa4..06b568b80f7a 100644
--- a/Documentation/linux_tv/media/dvb/intro.rst
+++ b/Documentation/linux_tv/media/dvb/intro.rst
@@ -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
diff --git a/Documentation/linux_tv/media/dvb/net.rst b/Documentation/linux_tv/media/dvb/net.rst
index fd2eb6171f42..c5c42e43d277 100644
--- a/Documentation/linux_tv/media/dvb/net.rst
+++ b/Documentation/linux_tv/media/dvb/net.rst
@@ -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.
diff --git a/Documentation/linux_tv/media/dvb/video_function_calls.rst b/Documentation/linux_tv/media/dvb/video_function_calls.rst
index 39f1f400b6d0..a337fbf51bc0 100644
--- a/Documentation/linux_tv/media/dvb/video_function_calls.rst
+++ b/Documentation/linux_tv/media/dvb/video_function_calls.rst
@@ -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
diff --git a/Documentation/linux_tv/media/dvb/video_types.rst b/Documentation/linux_tv/media/dvb/video_types.rst
index 1a73751ec080..671f365ceeb4 100644
--- a/Documentation/linux_tv/media/dvb/video_types.rst
+++ b/Documentation/linux_tv/media/dvb/video_types.rst
@@ -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;
diff --git a/Documentation/linux_tv/media/gen-errors.rst b/Documentation/linux_tv/media/gen-errors.rst
index 500a2f73ffd9..6dc76b2461df 100644
--- a/Documentation/linux_tv/media/gen-errors.rst
+++ b/Documentation/linux_tv/media/gen-errors.rst
@@ -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
diff --git a/Documentation/linux_tv/media/mediactl/media-ioc-device-info.rst b/Documentation/linux_tv/media/mediactl/media-ioc-device-info.rst
index aca9c8aa736a..8339e193ba8b 100644
--- a/Documentation/linux_tv/media/mediactl/media-ioc-device-info.rst
+++ b/Documentation/linux_tv/media/mediactl/media-ioc-device-info.rst
@@ -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
diff --git a/Documentation/linux_tv/media/mediactl/media-ioc-enum-entities.rst b/Documentation/linux_tv/media/mediactl/media-ioc-enum-entities.rst
index 8fe1f1966640..6e0a0c27ba2f 100644
--- a/Documentation/linux_tv/media/mediactl/media-ioc-enum-entities.rst
+++ b/Documentation/linux_tv/media/mediactl/media-ioc-enum-entities.rst
@@ -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]
- -
- -
+ -
+ -
diff --git a/Documentation/linux_tv/media/mediactl/media-ioc-enum-links.rst b/Documentation/linux_tv/media/mediactl/media-ioc-enum-links.rst
index 6989f4ae4748..30dd7e2a7051 100644
--- a/Documentation/linux_tv/media/mediactl/media-ioc-enum-links.rst
+++ b/Documentation/linux_tv/media/mediactl/media-ioc-enum-links.rst
@@ -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.
diff --git a/Documentation/linux_tv/media/mediactl/media-ioc-g-topology.rst b/Documentation/linux_tv/media/mediactl/media-ioc-g-topology.rst
index 6d530dc2a92c..1c360bf7c9b0 100644
--- a/Documentation/linux_tv/media/mediactl/media-ioc-g-topology.rst
+++ b/Documentation/linux_tv/media/mediactl/media-ioc-g-topology.rst
@@ -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.
diff --git a/Documentation/linux_tv/media/mediactl/media-types.rst b/Documentation/linux_tv/media/mediactl/media-types.rst
index 6a2d001babc2..a35fc15a3137 100644
--- a/Documentation/linux_tv/media/mediactl/media-types.rst
+++ b/Documentation/linux_tv/media/mediactl/media-types.rst
@@ -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
diff --git a/Documentation/linux_tv/media/rc/Remote_controllers_tables.rst b/Documentation/linux_tv/media/rc/Remote_controllers_tables.rst
index b02ff7706f80..0bb16c4af27d 100644
--- a/Documentation/linux_tv/media/rc/Remote_controllers_tables.rst
+++ b/Documentation/linux_tv/media/rc/Remote_controllers_tables.rst
@@ -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``
diff --git a/Documentation/linux_tv/media/rc/keytable.c.rst b/Documentation/linux_tv/media/rc/keytable.c.rst
index f8d9c4b71f06..5718ffa011d4 100644
--- a/Documentation/linux_tv/media/rc/keytable.c.rst
+++ b/Documentation/linux_tv/media/rc/keytable.c.rst
@@ -32,145 +32,145 @@ file: media/v4l/keytable.c
void prtcode (int *codes)
{
- struct parse_key *p;
-
- for (p=keynames;p->name!=NULL;p++) {
- if (p->value == (unsigned)codes[1]) {
- printf("scancode 0x%04x = %s (0x%02x)\\n", codes[0], p->name, codes[1]);
- return;
- }
- }
-
- if (isprint (codes[1]))
- printf("scancode %d = '%c' (0x%02x)\\n", codes[0], codes[1], codes[1]);
- else
- printf("scancode %d = 0x%02x\\n", codes[0], codes[1]);
+ struct parse_key *p;
+
+ for (p=keynames;p->name!=NULL;p++) {
+ if (p->value == (unsigned)codes[1]) {
+ printf("scancode 0x%04x = %s (0x%02x)\\n", codes[0], p->name, codes[1]);
+ return;
+ }
+ }
+
+ if (isprint (codes[1]))
+ printf("scancode %d = '%c' (0x%02x)\\n", codes[0], codes[1], codes[1]);
+ else
+ printf("scancode %d = 0x%02x\\n", codes[0], codes[1]);
}
int parse_code(char *string)
{
- struct parse_key *p;
-
- for (p=keynames;p->name!=NULL;p++) {
- if (!strcasecmp(p->name, string)) {
- return p->value;
- }
- }
- return -1;
+ struct parse_key *p;
+
+ for (p=keynames;p->name!=NULL;p++) {
+ if (!strcasecmp(p->name, string)) {
+ return p->value;
+ }
+ }
+ return -1;
}
int main (int argc, char *argv[])
{
- int fd;
- unsigned int i, j;
- int codes[2];
-
- if (argc<2 || argc>4) {
- printf ("usage: %s <device> to get table; or\\n"
- " %s <device> <scancode> <keycode>\\n"
- " %s <device> <keycode_file>n",*argv,*argv,*argv);
- return -1;
- }
-
- if ((fd = open(argv[1], O_RDONLY)) < 0) {
- perror("Couldn't open input device");
- return(-1);
- }
-
- if (argc==4) {
- int value;
-
- value=parse_code(argv[3]);
-
- if (value==-1) {
- value = strtol(argv[3], NULL, 0);
- if (errno)
- perror("value");
- }
-
- codes [0] = (unsigned) strtol(argv[2], NULL, 0);
- codes [1] = (unsigned) value;
-
- if(ioctl(fd, EVIOCSKEYCODE, codes))
- perror ("EVIOCSKEYCODE");
-
- if(ioctl(fd, EVIOCGKEYCODE, codes)==0)
- prtcode(codes);
- return 0;
- }
-
- if (argc==3) {
- FILE *fin;
- int value;
- char *scancode, *keycode, s[2048];
-
- fin=fopen(argv[2],"r");
- if (fin==NULL) {
- perror ("opening keycode file");
- return -1;
- }
-
- /* Clears old table */
- for (j = 0; j < 256; j++) {
- for (i = 0; i < 256; i++) {
- codes[0] = (j << 8) | i;
- codes[1] = KEY_RESERVED;
- ioctl(fd, EVIOCSKEYCODE, codes);
- }
- }
-
- while (fgets(s,sizeof(s),fin)) {
- scancode=strtok(s,"\\n\\t =:");
- if (!scancode) {
- perror ("parsing input file scancode");
- return -1;
- }
- if (!strcasecmp(scancode, "scancode")) {
- scancode = strtok(NULL,"\\n\\t =:");
- if (!scancode) {
- perror ("parsing input file scancode");
- return -1;
- }
- }
-
- keycode=strtok(NULL,"\\n\\t =:(");
- if (!keycode) {
- perror ("parsing input file keycode");
- return -1;
- }
-
- // printf ("parsing %s=%s:", scancode, keycode);
- value=parse_code(keycode);
- // printf ("\\tvalue=%d\\n",value);
-
- if (value==-1) {
- value = strtol(keycode, NULL, 0);
- if (errno)
- perror("value");
- }
-
- codes [0] = (unsigned) strtol(scancode, NULL, 0);
- codes [1] = (unsigned) value;
-
- // printf("\\t%04x=%04x\\n",codes[0], codes[1]);
- if(ioctl(fd, EVIOCSKEYCODE, codes)) {
- fprintf(stderr, "Setting scancode 0x%04x with 0x%04x via ",codes[0], codes[1]);
- perror ("EVIOCSKEYCODE");
- }
-
- if(ioctl(fd, EVIOCGKEYCODE, codes)==0)
- prtcode(codes);
- }
- return 0;
- }
-
- /* Get scancode table */
- for (j = 0; j < 256; j++) {
- for (i = 0; i < 256; i++) {
- codes[0] = (j << 8) | i;
- if (!ioctl(fd, EVIOCGKEYCODE, codes) && codes[1] != KEY_RESERVED)
- prtcode(codes);
- }
- }
- return 0;
+ int fd;
+ unsigned int i, j;
+ int codes[2];
+
+ if (argc<2 || argc>4) {
+ printf ("usage: %s <device> to get table; or\\n"
+ " %s <device> <scancode> <keycode>\\n"
+ " %s <device> <keycode_file>n",*argv,*argv,*argv);
+ return -1;
+ }
+
+ if ((fd = open(argv[1], O_RDONLY)) < 0) {
+ perror("Couldn't open input device");
+ return(-1);
+ }
+
+ if (argc==4) {
+ int value;
+
+ value=parse_code(argv[3]);
+
+ if (value==-1) {
+ value = strtol(argv[3], NULL, 0);
+ if (errno)
+ perror("value");
+ }
+
+ codes [0] = (unsigned) strtol(argv[2], NULL, 0);
+ codes [1] = (unsigned) value;
+
+ if(ioctl(fd, EVIOCSKEYCODE, codes))
+ perror ("EVIOCSKEYCODE");
+
+ if(ioctl(fd, EVIOCGKEYCODE, codes)==0)
+ prtcode(codes);
+ return 0;
+ }
+
+ if (argc==3) {
+ FILE *fin;
+ int value;
+ char *scancode, *keycode, s[2048];
+
+ fin=fopen(argv[2],"r");
+ if (fin==NULL) {
+ perror ("opening keycode file");
+ return -1;
+ }
+
+ /* Clears old table */
+ for (j = 0; j < 256; j++) {
+ for (i = 0; i < 256; i++) {
+ codes[0] = (j << 8) | i;
+ codes[1] = KEY_RESERVED;
+ ioctl(fd, EVIOCSKEYCODE, codes);
+ }
+ }
+
+ while (fgets(s,sizeof(s),fin)) {
+ scancode=strtok(s,"\\n\\t =:");
+ if (!scancode) {
+ perror ("parsing input file scancode");
+ return -1;
+ }
+ if (!strcasecmp(scancode, "scancode")) {
+ scancode = strtok(NULL,"\\n\\t =:");
+ if (!scancode) {
+ perror ("parsing input file scancode");
+ return -1;
+ }
+ }
+
+ keycode=strtok(NULL,"\\n\\t =:(");
+ if (!keycode) {
+ perror ("parsing input file keycode");
+ return -1;
+ }
+
+ // printf ("parsing %s=%s:", scancode, keycode);
+ value=parse_code(keycode);
+ // printf ("\\tvalue=%d\\n",value);
+
+ if (value==-1) {
+ value = strtol(keycode, NULL, 0);
+ if (errno)
+ perror("value");
+ }
+
+ codes [0] = (unsigned) strtol(scancode, NULL, 0);
+ codes [1] = (unsigned) value;
+
+ // printf("\\t%04x=%04x\\n",codes[0], codes[1]);
+ if(ioctl(fd, EVIOCSKEYCODE, codes)) {
+ fprintf(stderr, "Setting scancode 0x%04x with 0x%04x via ",codes[0], codes[1]);
+ perror ("EVIOCSKEYCODE");
+ }
+
+ if(ioctl(fd, EVIOCGKEYCODE, codes)==0)
+ prtcode(codes);
+ }
+ return 0;
+ }
+
+ /* Get scancode table */
+ for (j = 0; j < 256; j++) {
+ for (i = 0; i < 256; i++) {
+ codes[0] = (j << 8) | i;
+ if (!ioctl(fd, EVIOCGKEYCODE, codes) && codes[1] != KEY_RESERVED)
+ prtcode(codes);
+ }
+ }
+ return 0;
}
diff --git a/Documentation/linux_tv/media/v4l/audio.rst b/Documentation/linux_tv/media/v4l/audio.rst
index d7574fa4f2cc..b6c41c35a744 100644
--- a/Documentation/linux_tv/media/v4l/audio.rst
+++ b/Documentation/linux_tv/media/v4l/audio.rst
@@ -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]
diff --git a/Documentation/linux_tv/media/v4l/buffer.rst b/Documentation/linux_tv/media/v4l/buffer.rst
index 98bb2a8dcdeb..4381110e2571 100644
--- a/Documentation/linux_tv/media/v4l/buffer.rst
+++ b/Documentation/linux_tv/media/v4l/buffer.rst
@@ -48,14 +48,14 @@ buffer.
- ``index``
- -
+ -
- Number of the buffer, set by the application except when calling
- :ref:`VIDIOC_DQBUF <VIDIOC_QBUF>`, then it is set by the
- driver. This field can range from zero to the number of buffers
- allocated with the :ref:`VIDIOC_REQBUFS` ioctl
- (struct :ref:`v4l2_requestbuffers <v4l2-requestbuffers>`
- ``count``), plus any buffers allocated with
- :ref:`VIDIOC_CREATE_BUFS` minus one.
+ :ref:`VIDIOC_DQBUF <VIDIOC_QBUF>`, then it is set by the
+ driver. This field can range from zero to the number of buffers
+ allocated with the :ref:`VIDIOC_REQBUFS` ioctl
+ (struct :ref:`v4l2_requestbuffers <v4l2-requestbuffers>`
+ ``count``), plus any buffers allocated with
+ :ref:`VIDIOC_CREATE_BUFS` minus one.
- .. row 2
@@ -63,11 +63,11 @@ buffer.
- ``type``
- -
+ -
- Type of the buffer, same as struct
- :ref:`v4l2_format <v4l2-format>` ``type`` or struct
- :ref:`v4l2_requestbuffers <v4l2-requestbuffers>` ``type``, set
- by the application. See :ref:`v4l2-buf-type`
+ :ref:`v4l2_format <v4l2-format>` ``type`` or struct
+ :ref:`v4l2_requestbuffers <v4l2-requestbuffers>` ``type``, set
+ by the application. See :ref:`v4l2-buf-type`
- .. row 3
@@ -75,16 +75,16 @@ buffer.
- ``bytesused``
- -
+ -
- The number of bytes occupied by the data in the buffer. It depends
- on the negotiated data format and may change with each buffer for
- compressed variable size data like JPEG images. Drivers must set
- this field when ``type`` refers to a capture stream, applications
- when it refers to an output stream. If the application sets this
- to 0 for an output stream, then ``bytesused`` will be set to the
- size of the buffer (see the ``length`` field of this struct) by
- the driver. For multiplanar formats this field is ignored and the
- ``planes`` pointer is used instead.
+ on the negotiated data format and may change with each buffer for
+ compressed variable size data like JPEG images. Drivers must set
+ this field when ``type`` refers to a capture stream, applications
+ when it refers to an output stream. If the application sets this
+ to 0 for an output stream, then ``bytesused`` will be set to the
+ size of the buffer (see the ``length`` field of this struct) by
+ the driver. For multiplanar formats this field is ignored and the
+ ``planes`` pointer is used instead.
- .. row 4
@@ -92,7 +92,7 @@ buffer.
- ``flags``
- -
+ -
- Flags set by the application or driver, see :ref:`buffer-flags`.
- .. row 5
@@ -101,11 +101,11 @@ buffer.
- ``field``
- -
+ -
- Indicates the field order of the image in the buffer, see
- :ref:`v4l2-field`. This field is not used when the buffer
- contains VBI data. Drivers must set it when ``type`` refers to a
- capture stream, applications when it refers to an output stream.
+ :ref:`v4l2-field`. This field is not used when the buffer
+ contains VBI data. Drivers must set it when ``type`` refers to a
+ capture stream, applications when it refers to an output stream.
- .. row 6
@@ -113,17 +113,17 @@ buffer.
- ``timestamp``
- -
+ -
- For capture streams this is time when the first data byte was
- captured, as returned by the :c:func:`clock_gettime()` function
- for the relevant clock id; see ``V4L2_BUF_FLAG_TIMESTAMP_*`` in
- :ref:`buffer-flags`. For output streams the driver stores the
- time at which the last data byte was actually sent out in the
- ``timestamp`` field. This permits applications to monitor the
- drift between the video and system clock. For output streams that
- use ``V4L2_BUF_FLAG_TIMESTAMP_COPY`` the application has to fill
- in the timestamp which will be copied by the driver to the capture
- stream.
+ captured, as returned by the :c:func:`clock_gettime()` function
+ for the relevant clock id; see ``V4L2_BUF_FLAG_TIMESTAMP_*`` in
+ :ref:`buffer-flags`. For output streams the driver stores the
+ time at which the last data byte was actually sent out in the
+ ``timestamp`` field. This permits applications to monitor the
+ drift between the video and system clock. For output streams that
+ use ``V4L2_BUF_FLAG_TIMESTAMP_COPY`` the application has to fill
+ in the timestamp which will be copied by the driver to the capture
+ stream.
- .. row 7
@@ -131,15 +131,15 @@ buffer.
- ``timecode``
- -
+ -
- When ``type`` is ``V4L2_BUF_TYPE_VIDEO_CAPTURE`` and the
- ``V4L2_BUF_FLAG_TIMECODE`` flag is set in ``flags``, this
- structure contains a frame timecode. In
- :ref:`V4L2_FIELD_ALTERNATE <v4l2-field>` mode the top and
- bottom field contain the same timecode. Timecodes are intended to
- help video editing and are typically recorded on video tapes, but
- also embedded in compressed formats like MPEG. This field is
- independent of the ``timestamp`` and ``sequence`` fields.
+ ``V4L2_BUF_FLAG_TIMECODE`` flag is set in ``flags``, this
+ structure contains a frame timecode. In
+ :ref:`V4L2_FIELD_ALTERNATE <v4l2-field>` mode the top and
+ bottom field contain the same timecode. Timecodes are intended to
+ help video editing and are typically recorded on video tapes, but
+ also embedded in compressed formats like MPEG. This field is
+ independent of the ``timestamp`` and ``sequence`` fields.
- .. row 8
@@ -147,27 +147,27 @@ buffer.
- ``sequence``
- -
+ -
- Set by the driver, counting the frames (not fields!) in sequence.
- This field is set for both input and output devices.
+ This field is set for both input and output devices.
- .. row 9
- :cspan:`3`
- In :ref:`V4L2_FIELD_ALTERNATE <v4l2-field>` mode the top and
- bottom field have the same sequence number. The count starts at
- zero and includes dropped or repeated frames. A dropped frame was
- received by an input device but could not be stored due to lack of
- free buffer space. A repeated frame was displayed again by an
- output device because the application did not pass new data in
- time.
+ In :ref:`V4L2_FIELD_ALTERNATE <v4l2-field>` mode the top and
+ bottom field have the same sequence number. The count starts at
+ zero and includes dropped or repeated frames. A dropped frame was
+ received by an input device but could not be stored due to lack of
+ free buffer space. A repeated frame was displayed again by an
+ output device because the application did not pass new data in
+ time.
- Note this may count the frames received e.g. over USB, without
- taking into account the frames dropped by the remote hardware due
- to limited compression throughput or bus bandwidth. These devices
- identify by not enumerating any video standards, see
- :ref:`standard`.
+ Note this may count the frames received e.g. over USB, without
+ taking into account the frames dropped by the remote hardware due
+ to limited compression throughput or bus bandwidth. These devices
+ identify by not enumerating any video standards, see
+ :ref:`standard`.
- .. row 10
@@ -175,9 +175,9 @@ buffer.
- ``memory``
- -
+ -
- This field must be set by applications and/or drivers in
- accordance with the selected I/O method. See :ref:`v4l2-memory`
+ accordance with the selected I/O method. See :ref:`v4l2-memory`
- .. row 11
@@ -187,52 +187,52 @@ buffer.
- .. row 12
- -
+ -
- __u32
- ``offset``
- For the single-planar API and when ``memory`` is
- ``V4L2_MEMORY_MMAP`` this is the offset of the buffer from the
- start of the device memory. The value is returned by the driver
- and apart of serving as parameter to the
- :ref:`mmap() <func-mmap>` function not useful for applications.
- See :ref:`mmap` for details
+ ``V4L2_MEMORY_MMAP`` this is the offset of the buffer from the
+ start of the device memory. The value is returned by the driver
+ and apart of serving as parameter to the
+ :ref:`mmap() <func-mmap>` function not useful for applications.
+ See :ref:`mmap` for details
- .. row 13
- -
+ -
- unsigned long
- ``userptr``
- For the single-planar API and when ``memory`` is
- ``V4L2_MEMORY_USERPTR`` this is a pointer to the buffer (casted to
- unsigned long type) in virtual memory, set by the application. See
- :ref:`userp` for details.
+ ``V4L2_MEMORY_USERPTR`` this is a pointer to the buffer (casted to
+ unsigned long type) in virtual memory, set by the application. See
+ :ref:`userp` for details.
- .. row 14
- -
+ -
- struct v4l2_plane
- ``*planes``
- When using the multi-planar API, contains a userspace pointer to
- an array of struct :ref:`v4l2_plane <v4l2-plane>`. The size of
- the array should be put in the ``length`` field of this
- :ref:`struct v4l2_buffer <v4l2-buffer>` structure.
+ an array of struct :ref:`v4l2_plane <v4l2-plane>`. The size of
+ the array should be put in the ``length`` field of this
+ :ref:`struct v4l2_buffer <v4l2-buffer>` structure.
- .. row 15
- -
+ -
- int
- ``fd``
- For the single-plane API and when ``memory`` is
- ``V4L2_MEMORY_DMABUF`` this is the file descriptor associated with
- a DMABUF buffer.
+ ``V4L2_MEMORY_DMABUF`` this is the file descriptor associated with
+ a DMABUF buffer.
- .. row 16
@@ -240,14 +240,14 @@ buffer.
- ``length``
- -
+ -
- Size of the buffer (not the payload) in bytes for the
- single-planar API. This is set by the driver based on the calls to
- :ref:`VIDIOC_REQBUFS` and/or
- :ref:`VIDIOC_CREATE_BUFS`. For the
- multi-planar API the application sets this to the number of
- elements in the ``planes`` array. The driver will fill in the
- actual number of valid elements in that array.
+ single-planar API. This is set by the driver based on the calls to
+ :ref:`VIDIOC_REQBUFS` and/or
+ :ref:`VIDIOC_CREATE_BUFS`. For the
+ multi-planar API the application sets this to the number of
+ elements in the ``planes`` array. The driver will fill in the
+ actual number of valid elements in that array.
- .. row 17
@@ -255,9 +255,9 @@ buffer.
- ``reserved2``
- -
+ -
- A place holder for future extensions. Drivers and applications
- must set this to 0.
+ must set this to 0.
- .. row 18
@@ -265,9 +265,9 @@ buffer.
- ``reserved``
- -
+ -
- A place holder for future extensions. Drivers and applications
- must set this to 0.
+ must set this to 0.
@@ -285,14 +285,14 @@ buffer.
- ``bytesused``
- -
+ -
- The number of bytes occupied by data in the plane (its payload).
- Drivers must set this field when ``type`` refers to a capture
- stream, applications when it refers to an output stream. If the
- application sets this to 0 for an output stream, then
- ``bytesused`` will be set to the size of the plane (see the
- ``length`` field of this struct) by the driver. Note that the
- actual image data starts at ``data_offset`` which may not be 0.
+ Drivers must set this field when ``type`` refers to a capture
+ stream, applications when it refers to an output stream. If the
+ application sets this to 0 for an output stream, then
+ ``bytesused`` will be set to the size of the plane (see the
+ ``length`` field of this struct) by the driver. Note that the
+ actual image data starts at ``data_offset`` which may not be 0.
- .. row 2
@@ -300,11 +300,11 @@ buffer.
- ``length``
- -
+ -
- Size in bytes of the plane (not its payload). This is set by the
- driver based on the calls to
- :ref:`VIDIOC_REQBUFS` and/or
- :ref:`VIDIOC_CREATE_BUFS`.
+ driver based on the calls to
+ :ref:`VIDIOC_REQBUFS` and/or
+ :ref:`VIDIOC_CREATE_BUFS`.
- .. row 3
@@ -312,45 +312,45 @@ buffer.
- ``m``
- -
- -
+ -
+ -
- .. row 4
- -
+ -
- __u32
- ``mem_offset``
- When the memory type in the containing struct
- :ref:`v4l2_buffer <v4l2-buffer>` is ``V4L2_MEMORY_MMAP``, this
- is the value that should be passed to :ref:`mmap() <func-mmap>`,
- similar to the ``offset`` field in struct
- :ref:`v4l2_buffer <v4l2-buffer>`.
+ :ref:`v4l2_buffer <v4l2-buffer>` is ``V4L2_MEMORY_MMAP``, this
+ is the value that should be passed to :ref:`mmap() <func-mmap>`,
+ similar to the ``offset`` field in struct
+ :ref:`v4l2_buffer <v4l2-buffer>`.
- .. row 5
- -
+ -
- unsigned long
- ``userptr``
- When the memory type in the containing struct
- :ref:`v4l2_buffer <v4l2-buffer>` is ``V4L2_MEMORY_USERPTR``,
- this is a userspace pointer to the memory allocated for this plane
- by an application.
+ :ref:`v4l2_buffer <v4l2-buffer>` is ``V4L2_MEMORY_USERPTR``,
+ this is a userspace pointer to the memory allocated for this plane
+ by an application.
- .. row 6
- -
+ -
- int
- ``fd``
- When the memory type in the containing struct
- :ref:`v4l2_buffer <v4l2-buffer>` is ``V4L2_MEMORY_DMABUF``,
- this is a file descriptor associated with a DMABUF buffer, similar
- to the ``fd`` field in struct :ref:`v4l2_buffer <v4l2-buffer>`.
+ :ref:`v4l2_buffer <v4l2-buffer>` is ``V4L2_MEMORY_DMABUF``,
+ this is a file descriptor associated with a DMABUF buffer, similar
+ to the ``fd`` field in struct :ref:`v4l2_buffer <v4l2-buffer>`.
- .. row 7
@@ -358,13 +358,13 @@ buffer.
- ``data_offset``
- -
+ -
- Offset in bytes to video data in the plane. Drivers must set this
- field when ``type`` refers to a capture stream, applications when
- it refers to an output stream. Note that data_offset is included
- in ``bytesused``. So the size of the image in the plane is
- ``bytesused``-``data_offset`` at offset ``data_offset`` from the
- start of the plane.
+ field when ``type`` refers to a capture stream, applications when
+ it refers to an output stream. Note that data_offset is included
+ in ``bytesused``. So the size of the image in the plane is
+ ``bytesused``-``data_offset`` at offset ``data_offset`` from the
+ start of the plane.
- .. row 8
@@ -372,9 +372,9 @@ buffer.
- ``reserved[11]``
- -
+ -
- Reserved for future use. Should be zeroed by drivers and
- applications.
+ applications.
@@ -393,7 +393,7 @@ buffer.
- 1
- Buffer of a single-planar video capture stream, see
- :ref:`capture`.
+ :ref:`capture`.
- .. row 2
@@ -402,7 +402,7 @@ buffer.
- 9
- Buffer of a multi-planar video capture stream, see
- :ref:`capture`.
+ :ref:`capture`.
- .. row 3
@@ -411,7 +411,7 @@ buffer.
- 2
- Buffer of a single-planar video output stream, see
- :ref:`output`.
+ :ref:`output`.
- .. row 4
@@ -476,7 +476,7 @@ buffer.
- 11
- Buffer for Software Defined Radio (SDR) capture stream, see
- :ref:`sdr`.
+ :ref:`sdr`.
- .. row 12
@@ -485,7 +485,7 @@ buffer.
- 12
- Buffer for Software Defined Radio (SDR) output stream, see
- :ref:`sdr`.
+ :ref:`sdr`.
@@ -504,12 +504,12 @@ buffer.
- 0x00000001
- The buffer resides in device memory and has been mapped into the
- application's address space, see :ref:`mmap` for details.
- Drivers set or clear this flag when the
- :ref:`VIDIOC_QUERYBUF`,
- :ref:`VIDIOC_QBUF` or
- :ref:`VIDIOC_DQBUF <VIDIOC_QBUF>` ioctl is called. Set by the
- driver.
+ application's address space, see :ref:`mmap` for details.
+ Drivers set or clear this flag when the
+ :ref:`VIDIOC_QUERYBUF`,
+ :ref:`VIDIOC_QBUF` or
+ :ref:`VIDIOC_DQBUF <VIDIOC_QBUF>` ioctl is called. Set by the
+ driver.
- .. row 2
@@ -518,13 +518,13 @@ buffer.
- 0x00000002
- Internally drivers maintain two buffer queues, an incoming and
- outgoing queue. When this flag is set, the buffer is currently on
- the incoming queue. It automatically moves to the outgoing queue
- after the buffer has been filled (capture devices) or displayed
- (output devices). Drivers set or clear this flag when the
- ``VIDIOC_QUERYBUF`` ioctl is called. After (successful) calling
- the ``VIDIOC_QBUF``\ ioctl it is always set and after
- ``VIDIOC_DQBUF`` always cleared.
+ outgoing queue. When this flag is set, the buffer is currently on
+ the incoming queue. It automatically moves to the outgoing queue
+ after the buffer has been filled (capture devices) or displayed
+ (output devices). Drivers set or clear this flag when the
+ ``VIDIOC_QUERYBUF`` ioctl is called. After (successful) calling
+ the ``VIDIOC_QBUF``\ ioctl it is always set and after
+ ``VIDIOC_DQBUF`` always cleared.
- .. row 3
@@ -533,14 +533,14 @@ buffer.
- 0x00000004
- When this flag is set, the buffer is currently on the outgoing
- queue, ready to be dequeued from the driver. Drivers set or clear
- this flag when the ``VIDIOC_QUERYBUF`` ioctl is called. After
- calling the ``VIDIOC_QBUF`` or ``VIDIOC_DQBUF`` it is always
- cleared. Of course a buffer cannot be on both queues at the same
- time, the ``V4L2_BUF_FLAG_QUEUED`` and ``V4L2_BUF_FLAG_DONE`` flag
- are mutually exclusive. They can be both cleared however, then the
- buffer is in "dequeued" state, in the application domain so to
- say.
+ queue, ready to be dequeued from the driver. Drivers set or clear
+ this flag when the ``VIDIOC_QUERYBUF`` ioctl is called. After
+ calling the ``VIDIOC_QBUF`` or ``VIDIOC_DQBUF`` it is always
+ cleared. Of course a buffer cannot be on both queues at the same
+ time, the ``V4L2_BUF_FLAG_QUEUED`` and ``V4L2_BUF_FLAG_DONE`` flag
+ are mutually exclusive. They can be both cleared however, then the
+ buffer is in "dequeued" state, in the application domain so to
+ say.
- .. row 4
@@ -549,10 +549,10 @@ buffer.
- 0x00000040
- When this flag is set, the buffer has been dequeued successfully,
- although the data might have been corrupted. This is recoverable,
- streaming may continue as normal and the buffer may be reused
- normally. Drivers set this flag when the ``VIDIOC_DQBUF`` ioctl is
- called.
+ although the data might have been corrupted. This is recoverable,
+ streaming may continue as normal and the buffer may be reused
+ normally. Drivers set this flag when the ``VIDIOC_DQBUF`` ioctl is
+ called.
- .. row 5
@@ -561,11 +561,11 @@ buffer.
- 0x00000008
- Drivers set or clear this flag when calling the ``VIDIOC_DQBUF``
- ioctl. It may be set by video capture devices when the buffer
- contains a compressed image which is a key frame (or field), i. e.
- can be decompressed on its own. Also known as an I-frame.
- Applications can set this bit when ``type`` refers to an output
- stream.
+ ioctl. It may be set by video capture devices when the buffer
+ contains a compressed image which is a key frame (or field), i. e.
+ can be decompressed on its own. Also known as an I-frame.
+ Applications can set this bit when ``type`` refers to an output
+ stream.
- .. row 6
@@ -574,9 +574,9 @@ buffer.
- 0x00000010
- Similar to ``V4L2_BUF_FLAG_KEYFRAME`` this flags predicted frames
- or fields which contain only differences to a previous key frame.
- Applications can set this bit when ``type`` refers to an output
- stream.
+ or fields which contain only differences to a previous key frame.
+ Applications can set this bit when ``type`` refers to an output
+ stream.
- .. row 7
@@ -585,10 +585,10 @@ buffer.
- 0x00000020
- Similar to ``V4L2_BUF_FLAG_KEYFRAME`` this flags a bi-directional
- predicted frame or field which contains only the differences
- between the current frame and both the preceding and following key
- frames to specify its content. Applications can set this bit when
- ``type`` refers to an output stream.
+ predicted frame or field which contains only the differences
+ between the current frame and both the preceding and following key
+ frames to specify its content. Applications can set this bit when
+ ``type`` refers to an output stream.
- .. row 8
@@ -597,9 +597,9 @@ buffer.
- 0x00000100
- The ``timecode`` field is valid. Drivers set or clear this flag
- when the ``VIDIOC_DQBUF`` ioctl is called. Applications can set
- this bit and the corresponding ``timecode`` structure when
- ``type`` refers to an output stream.
+ when the ``VIDIOC_DQBUF`` ioctl is called. Applications can set
+ this bit and the corresponding ``timecode`` structure when
+ ``type`` refers to an output stream.
- .. row 9
@@ -608,11 +608,11 @@ buffer.
- 0x00000400
- The buffer has been prepared for I/O and can be queued by the
- application. Drivers set or clear this flag when the
- :ref:`VIDIOC_QUERYBUF`,
- :ref:`VIDIOC_PREPARE_BUF <VIDIOC_QBUF>`,
- :ref:`VIDIOC_QBUF` or
- :ref:`VIDIOC_DQBUF <VIDIOC_QBUF>` ioctl is called.
+ application. Drivers set or clear this flag when the
+ :ref:`VIDIOC_QUERYBUF`,
+ :ref:`VIDIOC_PREPARE_BUF <VIDIOC_QBUF>`,
+ :ref:`VIDIOC_QBUF` or
+ :ref:`VIDIOC_DQBUF <VIDIOC_QBUF>` ioctl is called.
- .. row 10
@@ -621,10 +621,10 @@ buffer.
- 0x00000800
- Caches do not have to be invalidated for this buffer. Typically
- applications shall use this flag if the data captured in the
- buffer is not going to be touched by the CPU, instead the buffer
- will, probably, be passed on to a DMA-capable hardware unit for
- further processing or output.
+ applications shall use this flag if the data captured in the
+ buffer is not going to be touched by the CPU, instead the buffer
+ will, probably, be passed on to a DMA-capable hardware unit for
+ further processing or output.
- .. row 11
@@ -633,9 +633,9 @@ buffer.
- 0x00001000
- Caches do not have to be cleaned for this buffer. Typically
- applications shall use this flag for output buffers if the data in
- this buffer has not been created by the CPU but by some
- DMA-capable unit, in which case caches have not been used.
+ applications shall use this flag for output buffers if the data in
+ this buffer has not been created by the CPU but by some
+ DMA-capable unit, in which case caches have not been used.
- .. row 12
@@ -644,14 +644,14 @@ buffer.
- 0x00100000
- Last buffer produced by the hardware. mem2mem codec drivers set
- this flag on the capture queue for the last buffer when the
- :ref:`VIDIOC_QUERYBUF` or
- :ref:`VIDIOC_DQBUF <VIDIOC_QBUF>` ioctl is called. Due to
- hardware limitations, the last buffer may be empty. In this case
- the driver will set the ``bytesused`` field to 0, regardless of
- the format. Any Any subsequent call to the
- :ref:`VIDIOC_DQBUF <VIDIOC_QBUF>` ioctl will not block anymore,
- but return an ``EPIPE`` error code.
+ this flag on the capture queue for the last buffer when the
+ :ref:`VIDIOC_QUERYBUF` or
+ :ref:`VIDIOC_DQBUF <VIDIOC_QBUF>` ioctl is called. Due to
+ hardware limitations, the last buffer may be empty. In this case
+ the driver will set the ``bytesused`` field to 0, regardless of
+ the format. Any Any subsequent call to the
+ :ref:`VIDIOC_DQBUF <VIDIOC_QBUF>` ioctl will not block anymore,
+ but return an ``EPIPE`` error code.
- .. row 13
@@ -660,8 +660,8 @@ buffer.
- 0x0000e000
- Mask for timestamp types below. To test the timestamp type, mask
- out bits not belonging to timestamp type by performing a logical
- and operation with buffer flags and timestamp mask.
+ out bits not belonging to timestamp type by performing a logical
+ and operation with buffer flags and timestamp mask.
- .. row 14
@@ -670,12 +670,12 @@ buffer.
- 0x00000000
- Unknown timestamp type. This type is used by drivers before Linux
- 3.9 and may be either monotonic (see below) or realtime (wall
- clock). Monotonic clock has been favoured in embedded systems
- whereas most of the drivers use the realtime clock. Either kinds
- of timestamps are available in user space via
- :c:func:`clock_gettime(2)` using clock IDs ``CLOCK_MONOTONIC``
- and ``CLOCK_REALTIME``, respectively.
+ 3.9 and may be either monotonic (see below) or realtime (wall
+ clock). Monotonic clock has been favoured in embedded systems
+ whereas most of the drivers use the realtime clock. Either kinds
+ of timestamps are available in user space via
+ :c:func:`clock_gettime(2)` using clock IDs ``CLOCK_MONOTONIC``
+ and ``CLOCK_REALTIME``, respectively.
- .. row 15
@@ -684,8 +684,8 @@ buffer.
- 0x00002000
- The buffer timestamp has been taken from the ``CLOCK_MONOTONIC``
- clock. To access the same clock outside V4L2, use
- :c:func:`clock_gettime(2)`.
+ clock. To access the same clock outside V4L2, use
+ :c:func:`clock_gettime(2)`.
- .. row 16
@@ -694,7 +694,7 @@ buffer.
- 0x00004000
- The CAPTURE buffer timestamp has been taken from the corresponding
- OUTPUT buffer. This flag applies only to mem2mem devices.
+ OUTPUT buffer. This flag applies only to mem2mem devices.
- .. row 17
@@ -703,12 +703,12 @@ buffer.
- 0x00070000
- Mask for timestamp sources below. The timestamp source defines the
- point of time the timestamp is taken in relation to the frame.
- Logical 'and' operation between the ``flags`` field and
- ``V4L2_BUF_FLAG_TSTAMP_SRC_MASK`` produces the value of the
- timestamp source. Applications must set the timestamp source when
- ``type`` refers to an output stream and
- ``V4L2_BUF_FLAG_TIMESTAMP_COPY`` is set.
+ point of time the timestamp is taken in relation to the frame.
+ Logical 'and' operation between the ``flags`` field and
+ ``V4L2_BUF_FLAG_TSTAMP_SRC_MASK`` produces the value of the
+ timestamp source. Applications must set the timestamp source when
+ ``type`` refers to an output stream and
+ ``V4L2_BUF_FLAG_TIMESTAMP_COPY`` is set.
- .. row 18
@@ -717,11 +717,11 @@ buffer.
- 0x00000000
- End Of Frame. The buffer timestamp has been taken when the last
- pixel of the frame has been received or the last pixel of the
- frame has been transmitted. In practice, software generated
- timestamps will typically be read from the clock a small amount of
- time after the last pixel has been received or transmitten,
- depending on the system and other activity in it.
+ pixel of the frame has been received or the last pixel of the
+ frame has been transmitted. In practice, software generated
+ timestamps will typically be read from the clock a small amount of
+ time after the last pixel has been received or transmitten,
+ depending on the system and other activity in it.
- .. row 19
@@ -730,8 +730,8 @@ buffer.
- 0x00010000
- Start Of Exposure. The buffer timestamp has been taken when the
- exposure of the frame has begun. This is only valid for the
- ``V4L2_BUF_TYPE_VIDEO_CAPTURE`` buffer type.
+ exposure of the frame has begun. This is only valid for the
+ ``V4L2_BUF_TYPE_VIDEO_CAPTURE`` buffer type.
@@ -817,7 +817,7 @@ The :ref:`struct v4l2_timecode <v4l2-timecode>` structure is designed to hold a
- ``frames``
- Frame count, 0 ... 23/24/29/49/59, depending on the type of
- timecode.
+ timecode.
- .. row 4
@@ -891,7 +891,7 @@ The :ref:`struct v4l2_timecode <v4l2-timecode>` structure is designed to hold a
- 4
- -
+ -
- .. row 5
@@ -899,7 +899,7 @@ The :ref:`struct v4l2_timecode <v4l2-timecode>` structure is designed to hold a
- 5
- -
+ -
@@ -918,9 +918,9 @@ The :ref:`struct v4l2_timecode <v4l2-timecode>` structure is designed to hold a
- 0x0001
- Indicates "drop frame" semantics for counting frames in 29.97 fps
- material. When set, frame numbers 0 and 1 at the start of each
- minute, except minutes 0, 10, 20, 30, 40, 50 are omitted from the
- count.
+ material. When set, frame numbers 0 and 1 at the start of each
+ minute, except minutes 0, 10, 20, 30, 40, 50 are omitted from the
+ count.
- .. row 2
diff --git a/Documentation/linux_tv/media/v4l/capture.c.rst b/Documentation/linux_tv/media/v4l/capture.c.rst
index ff481e783c39..56525a0fb2fa 100644
--- a/Documentation/linux_tv/media/v4l/capture.c.rst
+++ b/Documentation/linux_tv/media/v4l/capture.c.rst
@@ -35,14 +35,14 @@ file: media/v4l/capture.c
#define CLEAR(x) memset(&(x), 0, sizeof(x))
enum io_method {
- IO_METHOD_READ,
- IO_METHOD_MMAP,
- IO_METHOD_USERPTR,
+ IO_METHOD_READ,
+ IO_METHOD_MMAP,
+ IO_METHOD_USERPTR,
};
struct buffer {
- void *start;
- size_t length;
+ void *start;
+ size_t length;
};
static char *dev_name;
@@ -56,609 +56,609 @@ file: media/v4l/capture.c
static void errno_exit(const char *s)
{
- fprintf(stderr, "%s error %d, %s\\n", s, errno, strerror(errno));
- exit(EXIT_FAILURE);
+ fprintf(stderr, "%s error %d, %s\\n", s, errno, strerror(errno));
+ exit(EXIT_FAILURE);
}
static int xioctl(int fh, int request, void *arg)
{
- int r;
+ int r;
- do {
- r = ioctl(fh, request, arg);
- } while (-1 == r && EINTR == errno);
+ do {
+ r = ioctl(fh, request, arg);
+ } while (-1 == r && EINTR == errno);
- return r;
+ return r;
}
static void process_image(const void *p, int size)
{
- if (out_buf)
- fwrite(p, size, 1, stdout);
+ if (out_buf)
+ fwrite(p, size, 1, stdout);
- fflush(stderr);
- fprintf(stderr, ".");
- fflush(stdout);
+ fflush(stderr);
+ fprintf(stderr, ".");
+ fflush(stdout);
}
static int read_frame(void)
{
- struct v4l2_buffer buf;
- unsigned int i;
+ struct v4l2_buffer buf;
+ unsigned int i;
- switch (io) {
- case IO_METHOD_READ:
- if (-1 == read(fd, buffers[0].start, buffers[0].length)) {
- switch (errno) {
- case EAGAIN:
- return 0;
+ switch (io) {
+ case IO_METHOD_READ:
+ if (-1 == read(fd, buffers[0].start, buffers[0].length)) {
+ switch (errno) {
+ case EAGAIN:
+ return 0;
- case EIO:
- /* Could ignore EIO, see spec. */
+ case EIO:
+ /* Could ignore EIO, see spec. */
- /* fall through */
+ /* fall through */
- default:
- errno_exit("read");
- }
- }
+ default:
+ errno_exit("read");
+ }
+ }
- process_image(buffers[0].start, buffers[0].length);
- break;
+ process_image(buffers[0].start, buffers[0].length);
+ break;
- case IO_METHOD_MMAP:
- CLEAR(buf);
+ case IO_METHOD_MMAP:
+ CLEAR(buf);
- buf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
- buf.memory = V4L2_MEMORY_MMAP;
+ buf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
+ buf.memory = V4L2_MEMORY_MMAP;
- if (-1 == xioctl(fd, VIDIOC_DQBUF, &buf)) {
- switch (errno) {
- case EAGAIN:
- return 0;
+ if (-1 == xioctl(fd, VIDIOC_DQBUF, &buf)) {
+ switch (errno) {
+ case EAGAIN:
+ return 0;
- case EIO:
- /* Could ignore EIO, see spec. */
+ case EIO:
+ /* Could ignore EIO, see spec. */
- /* fall through */
+ /* fall through */
- default:
- errno_exit("VIDIOC_DQBUF");
- }
- }
+ default:
+ errno_exit("VIDIOC_DQBUF");
+ }
+ }
- assert(buf.index < n_buffers);
+ assert(buf.index < n_buffers);
- process_image(buffers[buf.index].start, buf.bytesused);
+ process_image(buffers[buf.index].start, buf.bytesused);
- if (-1 == xioctl(fd, VIDIOC_QBUF, &buf))
- errno_exit("VIDIOC_QBUF");
- break;
+ if (-1 == xioctl(fd, VIDIOC_QBUF, &buf))
+ errno_exit("VIDIOC_QBUF");
+ break;
- case IO_METHOD_USERPTR:
- CLEAR(buf);
+ case IO_METHOD_USERPTR:
+ CLEAR(buf);
- buf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
- buf.memory = V4L2_MEMORY_USERPTR;
+ buf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
+ buf.memory = V4L2_MEMORY_USERPTR;
- if (-1 == xioctl(fd, VIDIOC_DQBUF, &buf)) {
- switch (errno) {
- case EAGAIN:
- return 0;
+ if (-1 == xioctl(fd, VIDIOC_DQBUF, &buf)) {
+ switch (errno) {
+ case EAGAIN:
+ return 0;
- case EIO:
- /* Could ignore EIO, see spec. */
+ case EIO:
+ /* Could ignore EIO, see spec. */
- /* fall through */
+ /* fall through */
- default:
- errno_exit("VIDIOC_DQBUF");
- }
- }
+ default:
+ errno_exit("VIDIOC_DQBUF");
+ }
+ }
- for (i = 0; i < n_buffers; ++i)
- if (buf.m.userptr == (unsigned long)buffers[i].start
- && buf.length == buffers[i].length)
- break;
+ for (i = 0; i < n_buffers; ++i)
+ if (buf.m.userptr == (unsigned long)buffers[i].start
+ && buf.length == buffers[i].length)
+ break;
- assert(i < n_buffers);
+ assert(i < n_buffers);
- process_image((void *)buf.m.userptr, buf.bytesused);
+ process_image((void *)buf.m.userptr, buf.bytesused);
- if (-1 == xioctl(fd, VIDIOC_QBUF, &buf))
- errno_exit("VIDIOC_QBUF");
- break;
- }
+ if (-1 == xioctl(fd, VIDIOC_QBUF, &buf))
+ errno_exit("VIDIOC_QBUF");
+ break;
+ }
- return 1;
+ return 1;
}
static void mainloop(void)
{
- unsigned int count;
+ unsigned int count;
- count = frame_count;
+ count = frame_count;
- while (count-- > 0) {
- for (;;) {
- fd_set fds;
- struct timeval tv;
- int r;
+ while (count-- > 0) {
+ for (;;) {
+ fd_set fds;
+ struct timeval tv;
+ int r;
- FD_ZERO(&fds);
- FD_SET(fd, &fds);
+ FD_ZERO(&fds);
+ FD_SET(fd, &fds);
- /* Timeout. */
- tv.tv_sec = 2;
- tv.tv_usec = 0;
+ /* Timeout. */
+ tv.tv_sec = 2;
+ tv.tv_usec = 0;
- r = select(fd + 1, &fds, NULL, NULL, &tv);
+ r = select(fd + 1, &fds, NULL, NULL, &tv);
- if (-1 == r) {
- if (EINTR == errno)
- continue;
- errno_exit("select");
- }
+ if (-1 == r) {
+ if (EINTR == errno)
+ continue;
+ errno_exit("select");
+ }
- if (0 == r) {
- fprintf(stderr, "select timeout\\n");
- exit(EXIT_FAILURE);
- }
+ if (0 == r) {
+ fprintf(stderr, "select timeout\\n");
+ exit(EXIT_FAILURE);
+ }
- if (read_frame())
- break;
- /* EAGAIN - continue select loop. */
- }
- }
+ if (read_frame())
+ break;
+ /* EAGAIN - continue select loop. */
+ }
+ }
}
static void stop_capturing(void)
{
- enum v4l2_buf_type type;
-
- switch (io) {
- case IO_METHOD_READ:
- /* Nothing to do. */
- break;
-
- case IO_METHOD_MMAP:
- case IO_METHOD_USERPTR:
- type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
- if (-1 == xioctl(fd, VIDIOC_STREAMOFF, &type))
- errno_exit("VIDIOC_STREAMOFF");
- break;
- }
+ enum v4l2_buf_type type;
+
+ switch (io) {
+ case IO_METHOD_READ:
+ /* Nothing to do. */
+ break;
+
+ case IO_METHOD_MMAP:
+ case IO_METHOD_USERPTR:
+ type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
+ if (-1 == xioctl(fd, VIDIOC_STREAMOFF, &type))
+ errno_exit("VIDIOC_STREAMOFF");
+ break;
+ }
}
static void start_capturing(void)
{
- unsigned int i;
- enum v4l2_buf_type type;
-
- switch (io) {
- case IO_METHOD_READ:
- /* Nothing to do. */
- break;
-
- case IO_METHOD_MMAP:
- for (i = 0; i < n_buffers; ++i) {
- struct v4l2_buffer buf;
-
- CLEAR(buf);
- buf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
- buf.memory = V4L2_MEMORY_MMAP;
- buf.index = i;
-
- if (-1 == xioctl(fd, VIDIOC_QBUF, &buf))
- errno_exit("VIDIOC_QBUF");
- }
- type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
- if (-1 == xioctl(fd, VIDIOC_STREAMON, &type))
- errno_exit("VIDIOC_STREAMON");
- break;
-
- case IO_METHOD_USERPTR:
- for (i = 0; i < n_buffers; ++i) {
- struct v4l2_buffer buf;
-
- CLEAR(buf);
- buf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
- buf.memory = V4L2_MEMORY_USERPTR;
- buf.index = i;
- buf.m.userptr = (unsigned long)buffers[i].start;
- buf.length = buffers[i].length;
-
- if (-1 == xioctl(fd, VIDIOC_QBUF, &buf))
- errno_exit("VIDIOC_QBUF");
- }
- type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
- if (-1 == xioctl(fd, VIDIOC_STREAMON, &type))
- errno_exit("VIDIOC_STREAMON");
- break;
- }
+ unsigned int i;
+ enum v4l2_buf_type type;
+
+ switch (io) {
+ case IO_METHOD_READ:
+ /* Nothing to do. */
+ break;
+
+ case IO_METHOD_MMAP:
+ for (i = 0; i < n_buffers; ++i) {
+ struct v4l2_buffer buf;
+
+ CLEAR(buf);
+ buf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
+ buf.memory = V4L2_MEMORY_MMAP;
+ buf.index = i;
+
+ if (-1 == xioctl(fd, VIDIOC_QBUF, &buf))
+ errno_exit("VIDIOC_QBUF");
+ }
+ type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
+ if (-1 == xioctl(fd, VIDIOC_STREAMON, &type))
+ errno_exit("VIDIOC_STREAMON");
+ break;
+
+ case IO_METHOD_USERPTR:
+ for (i = 0; i < n_buffers; ++i) {
+ struct v4l2_buffer buf;
+
+ CLEAR(buf);
+ buf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
+ buf.memory = V4L2_MEMORY_USERPTR;
+ buf.index = i;
+ buf.m.userptr = (unsigned long)buffers[i].start;
+ buf.length = buffers[i].length;
+
+ if (-1 == xioctl(fd, VIDIOC_QBUF, &buf))
+ errno_exit("VIDIOC_QBUF");
+ }
+ type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
+ if (-1 == xioctl(fd, VIDIOC_STREAMON, &type))
+ errno_exit("VIDIOC_STREAMON");
+ break;
+ }
}
static void uninit_device(void)
{
- unsigned int i;
-
- switch (io) {
- case IO_METHOD_READ:
- free(buffers[0].start);
- break;
-
- case IO_METHOD_MMAP:
- for (i = 0; i < n_buffers; ++i)
- if (-1 == munmap(buffers[i].start, buffers[i].length))
- errno_exit("munmap");
- break;
-
- case IO_METHOD_USERPTR:
- for (i = 0; i < n_buffers; ++i)
- free(buffers[i].start);
- break;
- }
-
- free(buffers);
+ unsigned int i;
+
+ switch (io) {
+ case IO_METHOD_READ:
+ free(buffers[0].start);
+ break;
+
+ case IO_METHOD_MMAP:
+ for (i = 0; i < n_buffers; ++i)
+ if (-1 == munmap(buffers[i].start, buffers[i].length))
+ errno_exit("munmap");
+ break;
+
+ case IO_METHOD_USERPTR:
+ for (i = 0; i < n_buffers; ++i)
+ free(buffers[i].start);
+ break;
+ }
+
+ free(buffers);
}
static void init_read(unsigned int buffer_size)
{
- buffers = calloc(1, sizeof(*buffers));
+ buffers = calloc(1, sizeof(*buffers));
- if (!buffers) {
- fprintf(stderr, "Out of memory\\n");
- exit(EXIT_FAILURE);
- }
+ if (!buffers) {
+ fprintf(stderr, "Out of memory\\n");
+ exit(EXIT_FAILURE);
+ }
- buffers[0].length = buffer_size;
- buffers[0].start = malloc(buffer_size);
+ buffers[0].length = buffer_size;
+ buffers[0].start = malloc(buffer_size);
- if (!buffers[0].start) {
- fprintf(stderr, "Out of memory\\n");
- exit(EXIT_FAILURE);
- }
+ if (!buffers[0].start) {
+ fprintf(stderr, "Out of memory\\n");
+ exit(EXIT_FAILURE);
+ }
}
static void init_mmap(void)
{
- struct v4l2_requestbuffers req;
-
- CLEAR(req);
-
- req.count = 4;
- req.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
- req.memory = V4L2_MEMORY_MMAP;
-
- if (-1 == xioctl(fd, VIDIOC_REQBUFS, &req)) {
- if (EINVAL == errno) {
- fprintf(stderr, "%s does not support "
- "memory mappingn", dev_name);
- exit(EXIT_FAILURE);
- } else {
- errno_exit("VIDIOC_REQBUFS");
- }
- }
-
- if (req.count < 2) {
- fprintf(stderr, "Insufficient buffer memory on %s\\n",
- dev_name);
- exit(EXIT_FAILURE);
- }
-
- buffers = calloc(req.count, sizeof(*buffers));
-
- if (!buffers) {
- fprintf(stderr, "Out of memory\\n");
- exit(EXIT_FAILURE);
- }
-
- for (n_buffers = 0; n_buffers < req.count; ++n_buffers) {
- struct v4l2_buffer buf;
-
- CLEAR(buf);
-
- buf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
- buf.memory = V4L2_MEMORY_MMAP;
- buf.index = n_buffers;
-
- if (-1 == xioctl(fd, VIDIOC_QUERYBUF, &buf))
- errno_exit("VIDIOC_QUERYBUF");
-
- buffers[n_buffers].length = buf.length;
- buffers[n_buffers].start =
- mmap(NULL /* start anywhere */,
- buf.length,
- PROT_READ | PROT_WRITE /* required */,
- MAP_SHARED /* recommended */,
- fd, buf.m.offset);
-
- if (MAP_FAILED == buffers[n_buffers].start)
- errno_exit("mmap");
- }
+ struct v4l2_requestbuffers req;
+
+ CLEAR(req);
+
+ req.count = 4;
+ req.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
+ req.memory = V4L2_MEMORY_MMAP;
+
+ if (-1 == xioctl(fd, VIDIOC_REQBUFS, &req)) {
+ if (EINVAL == errno) {
+ fprintf(stderr, "%s does not support "
+ "memory mappingn", dev_name);
+ exit(EXIT_FAILURE);
+ } else {
+ errno_exit("VIDIOC_REQBUFS");
+ }
+ }
+
+ if (req.count < 2) {
+ fprintf(stderr, "Insufficient buffer memory on %s\\n",
+ dev_name);
+ exit(EXIT_FAILURE);
+ }
+
+ buffers = calloc(req.count, sizeof(*buffers));
+
+ if (!buffers) {
+ fprintf(stderr, "Out of memory\\n");
+ exit(EXIT_FAILURE);
+ }
+
+ for (n_buffers = 0; n_buffers < req.count; ++n_buffers) {
+ struct v4l2_buffer buf;
+
+ CLEAR(buf);
+
+ buf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
+ buf.memory = V4L2_MEMORY_MMAP;
+ buf.index = n_buffers;
+
+ if (-1 == xioctl(fd, VIDIOC_QUERYBUF, &buf))
+ errno_exit("VIDIOC_QUERYBUF");
+
+ buffers[n_buffers].length = buf.length;
+ buffers[n_buffers].start =
+ mmap(NULL /* start anywhere */,
+ buf.length,
+ PROT_READ | PROT_WRITE /* required */,
+ MAP_SHARED /* recommended */,
+ fd, buf.m.offset);
+
+ if (MAP_FAILED == buffers[n_buffers].start)
+ errno_exit("mmap");
+ }
}
static void init_userp(unsigned int buffer_size)
{
- struct v4l2_requestbuffers req;
-
- CLEAR(req);
-
- req.count = 4;
- req.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
- req.memory = V4L2_MEMORY_USERPTR;
-
- if (-1 == xioctl(fd, VIDIOC_REQBUFS, &req)) {
- if (EINVAL == errno) {
- fprintf(stderr, "%s does not support "
- "user pointer i/on", dev_name);
- exit(EXIT_FAILURE);
- } else {
- errno_exit("VIDIOC_REQBUFS");
- }
- }
-
- buffers = calloc(4, sizeof(*buffers));
-
- if (!buffers) {
- fprintf(stderr, "Out of memory\\n");
- exit(EXIT_FAILURE);
- }
-
- for (n_buffers = 0; n_buffers < 4; ++n_buffers) {
- buffers[n_buffers].length = buffer_size;
- buffers[n_buffers].start = malloc(buffer_size);
-
- if (!buffers[n_buffers].start) {
- fprintf(stderr, "Out of memory\\n");
- exit(EXIT_FAILURE);
- }
- }
+ struct v4l2_requestbuffers req;
+
+ CLEAR(req);
+
+ req.count = 4;
+ req.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
+ req.memory = V4L2_MEMORY_USERPTR;
+
+ if (-1 == xioctl(fd, VIDIOC_REQBUFS, &req)) {
+ if (EINVAL == errno) {
+ fprintf(stderr, "%s does not support "
+ "user pointer i/on", dev_name);
+ exit(EXIT_FAILURE);
+ } else {
+ errno_exit("VIDIOC_REQBUFS");
+ }
+ }
+
+ buffers = calloc(4, sizeof(*buffers));
+
+ if (!buffers) {
+ fprintf(stderr, "Out of memory\\n");
+ exit(EXIT_FAILURE);
+ }
+
+ for (n_buffers = 0; n_buffers < 4; ++n_buffers) {
+ buffers[n_buffers].length = buffer_size;
+ buffers[n_buffers].start = malloc(buffer_size);
+
+ if (!buffers[n_buffers].start) {
+ fprintf(stderr, "Out of memory\\n");
+ exit(EXIT_FAILURE);
+ }
+ }
}
static void init_device(void)
{
- struct v4l2_capability cap;
- struct v4l2_cropcap cropcap;
- struct v4l2_crop crop;
- struct v4l2_format fmt;
- unsigned int min;
-
- if (-1 == xioctl(fd, VIDIOC_QUERYCAP, &cap)) {
- if (EINVAL == errno) {
- fprintf(stderr, "%s is no V4L2 device\\n",
- dev_name);
- exit(EXIT_FAILURE);
- } else {
- errno_exit("VIDIOC_QUERYCAP");
- }
- }
-
- if (!(cap.capabilities & V4L2_CAP_VIDEO_CAPTURE)) {
- fprintf(stderr, "%s is no video capture device\\n",
- dev_name);
- exit(EXIT_FAILURE);
- }
-
- switch (io) {
- case IO_METHOD_READ:
- if (!(cap.capabilities & V4L2_CAP_READWRITE)) {
- fprintf(stderr, "%s does not support read i/o\\n",
- dev_name);
- exit(EXIT_FAILURE);
- }
- break;
-
- case IO_METHOD_MMAP:
- case IO_METHOD_USERPTR:
- if (!(cap.capabilities & V4L2_CAP_STREAMING)) {
- fprintf(stderr, "%s does not support streaming i/o\\n",
- dev_name);
- exit(EXIT_FAILURE);
- }
- break;
- }
-
-
- /* Select video input, video standard and tune here. */
-
-
- CLEAR(cropcap);
-
- cropcap.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
-
- if (0 == xioctl(fd, VIDIOC_CROPCAP, &cropcap)) {
- crop.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
- crop.c = cropcap.defrect; /* reset to default */
-
- if (-1 == xioctl(fd, VIDIOC_S_CROP, &crop)) {
- switch (errno) {
- case EINVAL:
- /* Cropping not supported. */
- break;
- default:
- /* Errors ignored. */
- break;
- }
- }
- } else {
- /* Errors ignored. */
- }
-
-
- CLEAR(fmt);
-
- fmt.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
- if (force_format) {
- fmt.fmt.pix.width = 640;
- fmt.fmt.pix.height = 480;
- fmt.fmt.pix.pixelformat = V4L2_PIX_FMT_YUYV;
- fmt.fmt.pix.field = V4L2_FIELD_INTERLACED;
-
- if (-1 == xioctl(fd, VIDIOC_S_FMT, &fmt))
- errno_exit("VIDIOC_S_FMT");
-
- /* Note VIDIOC_S_FMT may change width and height. */
- } else {
- /* Preserve original settings as set by v4l2-ctl for example */
- if (-1 == xioctl(fd, VIDIOC_G_FMT, &fmt))
- errno_exit("VIDIOC_G_FMT");
- }
-
- /* Buggy driver paranoia. */
- min = fmt.fmt.pix.width * 2;
- if (fmt.fmt.pix.bytesperline < min)
- fmt.fmt.pix.bytesperline = min;
- min = fmt.fmt.pix.bytesperline * fmt.fmt.pix.height;
- if (fmt.fmt.pix.sizeimage < min)
- fmt.fmt.pix.sizeimage = min;
-
- switch (io) {
- case IO_METHOD_READ:
- init_read(fmt.fmt.pix.sizeimage);
- break;
-
- case IO_METHOD_MMAP:
- init_mmap();
- break;
-
- case IO_METHOD_USERPTR:
- init_userp(fmt.fmt.pix.sizeimage);
- break;
- }
+ struct v4l2_capability cap;
+ struct v4l2_cropcap cropcap;
+ struct v4l2_crop crop;
+ struct v4l2_format fmt;
+ unsigned int min;
+
+ if (-1 == xioctl(fd, VIDIOC_QUERYCAP, &cap)) {
+ if (EINVAL == errno) {
+ fprintf(stderr, "%s is no V4L2 device\\n",
+ dev_name);
+ exit(EXIT_FAILURE);
+ } else {
+ errno_exit("VIDIOC_QUERYCAP");
+ }
+ }
+
+ if (!(cap.capabilities & V4L2_CAP_VIDEO_CAPTURE)) {
+ fprintf(stderr, "%s is no video capture device\\n",
+ dev_name);
+ exit(EXIT_FAILURE);
+ }
+
+ switch (io) {
+ case IO_METHOD_READ:
+ if (!(cap.capabilities & V4L2_CAP_READWRITE)) {
+ fprintf(stderr, "%s does not support read i/o\\n",
+ dev_name);
+ exit(EXIT_FAILURE);
+ }
+ break;
+
+ case IO_METHOD_MMAP:
+ case IO_METHOD_USERPTR:
+ if (!(cap.capabilities & V4L2_CAP_STREAMING)) {
+ fprintf(stderr, "%s does not support streaming i/o\\n",
+ dev_name);
+ exit(EXIT_FAILURE);
+ }
+ break;
+ }
+
+
+ /* Select video input, video standard and tune here. */
+
+
+ CLEAR(cropcap);
+
+ cropcap.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
+
+ if (0 == xioctl(fd, VIDIOC_CROPCAP, &cropcap)) {
+ crop.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
+ crop.c = cropcap.defrect; /* reset to default */
+
+ if (-1 == xioctl(fd, VIDIOC_S_CROP, &crop)) {
+ switch (errno) {
+ case EINVAL:
+ /* Cropping not supported. */
+ break;
+ default:
+ /* Errors ignored. */
+ break;
+ }
+ }
+ } else {
+ /* Errors ignored. */
+ }
+
+
+ CLEAR(fmt);
+
+ fmt.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
+ if (force_format) {
+ fmt.fmt.pix.width = 640;
+ fmt.fmt.pix.height = 480;
+ fmt.fmt.pix.pixelformat = V4L2_PIX_FMT_YUYV;
+ fmt.fmt.pix.field = V4L2_FIELD_INTERLACED;
+
+ if (-1 == xioctl(fd, VIDIOC_S_FMT, &fmt))
+ errno_exit("VIDIOC_S_FMT");
+
+ /* Note VIDIOC_S_FMT may change width and height. */
+ } else {
+ /* Preserve original settings as set by v4l2-ctl for example */
+ if (-1 == xioctl(fd, VIDIOC_G_FMT, &fmt))
+ errno_exit("VIDIOC_G_FMT");
+ }
+
+ /* Buggy driver paranoia. */
+ min = fmt.fmt.pix.width * 2;
+ if (fmt.fmt.pix.bytesperline < min)
+ fmt.fmt.pix.bytesperline = min;
+ min = fmt.fmt.pix.bytesperline * fmt.fmt.pix.height;
+ if (fmt.fmt.pix.sizeimage < min)
+ fmt.fmt.pix.sizeimage = min;
+
+ switch (io) {
+ case IO_METHOD_READ:
+ init_read(fmt.fmt.pix.sizeimage);
+ break;
+
+ case IO_METHOD_MMAP:
+ init_mmap();
+ break;
+
+ case IO_METHOD_USERPTR:
+ init_userp(fmt.fmt.pix.sizeimage);
+ break;
+ }
}
static void close_device(void)
{
- if (-1 == close(fd))
- errno_exit("close");
+ if (-1 == close(fd))
+ errno_exit("close");
- fd = -1;
+ fd = -1;
}
static void open_device(void)
{
- struct stat st;
-
- if (-1 == stat(dev_name, &st)) {
- fprintf(stderr, "Cannot identify '%s': %d, %s\\n",
- dev_name, errno, strerror(errno));
- exit(EXIT_FAILURE);
- }
-
- if (!S_ISCHR(st.st_mode)) {
- fprintf(stderr, "%s is no devicen", dev_name);
- exit(EXIT_FAILURE);
- }
-
- fd = open(dev_name, O_RDWR /* required */ | O_NONBLOCK, 0);
-
- if (-1 == fd) {
- fprintf(stderr, "Cannot open '%s': %d, %s\\n",
- dev_name, errno, strerror(errno));
- exit(EXIT_FAILURE);
- }
+ struct stat st;
+
+ if (-1 == stat(dev_name, &st)) {
+ fprintf(stderr, "Cannot identify '%s': %d, %s\\n",
+ dev_name, errno, strerror(errno));
+ exit(EXIT_FAILURE);
+ }
+
+ if (!S_ISCHR(st.st_mode)) {
+ fprintf(stderr, "%s is no devicen", dev_name);
+ exit(EXIT_FAILURE);
+ }
+
+ fd = open(dev_name, O_RDWR /* required */ | O_NONBLOCK, 0);
+
+ if (-1 == fd) {
+ fprintf(stderr, "Cannot open '%s': %d, %s\\n",
+ dev_name, errno, strerror(errno));
+ exit(EXIT_FAILURE);
+ }
}
static void usage(FILE *fp, int argc, char **argv)
{
- fprintf(fp,
- "Usage: %s [options]\\n\\n"
- "Version 1.3\\n"
- "Options:\\n"
- "-d | --device name Video device name [%s]n"
- "-h | --help Print this messagen"
- "-m | --mmap Use memory mapped buffers [default]n"
- "-r | --read Use read() callsn"
- "-u | --userp Use application allocated buffersn"
- "-o | --output Outputs stream to stdoutn"
- "-f | --format Force format to 640x480 YUYVn"
- "-c | --count Number of frames to grab [%i]n"
- "",
- argv[0], dev_name, frame_count);
+ fprintf(fp,
+ "Usage: %s [options]\\n\\n"
+ "Version 1.3\\n"
+ "Options:\\n"
+ "-d | --device name Video device name [%s]n"
+ "-h | --help Print this messagen"
+ "-m | --mmap Use memory mapped buffers [default]n"
+ "-r | --read Use read() callsn"
+ "-u | --userp Use application allocated buffersn"
+ "-o | --output Outputs stream to stdoutn"
+ "-f | --format Force format to 640x480 YUYVn"
+ "-c | --count Number of frames to grab [%i]n"
+ "",
+ argv[0], dev_name, frame_count);
}
static const char short_options[] = "d:hmruofc:";
static const struct option
long_options[] = {
- { "device", required_argument, NULL, 'd' },
- { "help", no_argument, NULL, 'h' },
- { "mmap", no_argument, NULL, 'm' },
- { "read", no_argument, NULL, 'r' },
- { "userp", no_argument, NULL, 'u' },
- { "output", no_argument, NULL, 'o' },
- { "format", no_argument, NULL, 'f' },
- { "count", required_argument, NULL, 'c' },
- { 0, 0, 0, 0 }
+ { "device", required_argument, NULL, 'd' },
+ { "help", no_argument, NULL, 'h' },
+ { "mmap", no_argument, NULL, 'm' },
+ { "read", no_argument, NULL, 'r' },
+ { "userp", no_argument, NULL, 'u' },
+ { "output", no_argument, NULL, 'o' },
+ { "format", no_argument, NULL, 'f' },
+ { "count", required_argument, NULL, 'c' },
+ { 0, 0, 0, 0 }
};
int main(int argc, char **argv)
{
- dev_name = "/dev/video0";
-
- for (;;) {
- int idx;
- int c;
-
- c = getopt_long(argc, argv,
- short_options, long_options, &idx);
-
- if (-1 == c)
- break;
-
- switch (c) {
- case 0: /* getopt_long() flag */
- break;
-
- case 'd':
- dev_name = optarg;
- break;
-
- case 'h':
- usage(stdout, argc, argv);
- exit(EXIT_SUCCESS);
-
- case 'm':
- io = IO_METHOD_MMAP;
- break;
-
- case 'r':
- io = IO_METHOD_READ;
- break;
-
- case 'u':
- io = IO_METHOD_USERPTR;
- break;
-
- case 'o':
- out_buf++;
- break;
-
- case 'f':
- force_format++;
- break;
-
- case 'c':
- errno = 0;
- frame_count = strtol(optarg, NULL, 0);
- if (errno)
- errno_exit(optarg);
- break;
-
- default:
- usage(stderr, argc, argv);
- exit(EXIT_FAILURE);
- }
- }
-
- open_device();
- init_device();
- start_capturing();
- mainloop();
- stop_capturing();
- uninit_device();
- close_device();
- fprintf(stderr, "\\n");
- return 0;
+ dev_name = "/dev/video0";
+
+ for (;;) {
+ int idx;
+ int c;
+
+ c = getopt_long(argc, argv,
+ short_options, long_options, &idx);
+
+ if (-1 == c)
+ break;
+
+ switch (c) {
+ case 0: /* getopt_long() flag */
+ break;
+
+ case 'd':
+ dev_name = optarg;
+ break;
+
+ case 'h':
+ usage(stdout, argc, argv);
+ exit(EXIT_SUCCESS);
+
+ case 'm':
+ io = IO_METHOD_MMAP;
+ break;
+
+ case 'r':
+ io = IO_METHOD_READ;
+ break;
+
+ case 'u':
+ io = IO_METHOD_USERPTR;
+ break;
+
+ case 'o':
+ out_buf++;
+ break;
+
+ case 'f':
+ force_format++;
+ break;
+
+ case 'c':
+ errno = 0;
+ frame_count = strtol(optarg, NULL, 0);
+ if (errno)
+ errno_exit(optarg);
+ break;
+
+ default:
+ usage(stderr, argc, argv);
+ exit(EXIT_FAILURE);
+ }
+ }
+
+ open_device();
+ init_device();
+ start_capturing();
+ mainloop();
+ stop_capturing();
+ uninit_device();
+ close_device();
+ fprintf(stderr, "\\n");
+ return 0;
}
diff --git a/Documentation/linux_tv/media/v4l/control.rst b/Documentation/linux_tv/media/v4l/control.rst
index 92abac784979..de88007a8dff 100644
--- a/Documentation/linux_tv/media/v4l/control.rst
+++ b/Documentation/linux_tv/media/v4l/control.rst
@@ -231,7 +231,7 @@ Control IDs
- ``V4L2_COLORFX_EMBOSS``
- Emboss, the highlights and shadows replace light/dark boundaries
- and low contrast areas are set to a gray background.
+ and low contrast areas are set to a gray background.
- .. row 7
@@ -274,7 +274,7 @@ Control IDs
- ``V4L2_COLORFX_SOLARIZATION``
- Solarization, the image is partially reversed in tone, only color
- values above or below a certain threshold are inverted.
+ values above or below a certain threshold are inverted.
- .. row 14
@@ -293,7 +293,7 @@ Control IDs
- ``V4L2_COLORFX_SET_CBCR``
- The Cb and Cr chroma components are replaced by fixed coefficients
- determined by ``V4L2_CID_COLORFX_CBCR`` control.
+ determined by ``V4L2_CID_COLORFX_CBCR`` control.
@@ -382,59 +382,59 @@ more menu type controls.
static void enumerate_menu(void)
{
- printf(" Menu items:\\n");
-
- memset(&querymenu, 0, sizeof(querymenu));
- querymenu.id = queryctrl.id;
-
- for (querymenu.index = queryctrl.minimum;
- querymenu.index <= queryctrl.maximum;
- querymenu.index++) {
- if (0 == ioctl(fd, VIDIOC_QUERYMENU, &querymenu)) {
- printf(" %s\\n", querymenu.name);
- }
- }
+ printf(" Menu items:\\n");
+
+ memset(&querymenu, 0, sizeof(querymenu));
+ querymenu.id = queryctrl.id;
+
+ for (querymenu.index = queryctrl.minimum;
+ querymenu.index <= queryctrl.maximum;
+ querymenu.index++) {
+ if (0 == ioctl(fd, VIDIOC_QUERYMENU, &querymenu)) {
+ printf(" %s\\n", querymenu.name);
+ }
+ }
}
memset(&queryctrl, 0, sizeof(queryctrl));
for (queryctrl.id = V4L2_CID_BASE;
- queryctrl.id < V4L2_CID_LASTP1;
- queryctrl.id++) {
- if (0 == ioctl(fd, VIDIOC_QUERYCTRL, &queryctrl)) {
- if (queryctrl.flags & V4L2_CTRL_FLAG_DISABLED)
- continue;
-
- printf("Control %s\\n", queryctrl.name);
-
- if (queryctrl.type == V4L2_CTRL_TYPE_MENU)
- enumerate_menu();
- } else {
- if (errno == EINVAL)
- continue;
-
- perror("VIDIOC_QUERYCTRL");
- exit(EXIT_FAILURE);
- }
+ queryctrl.id < V4L2_CID_LASTP1;
+ queryctrl.id++) {
+ if (0 == ioctl(fd, VIDIOC_QUERYCTRL, &queryctrl)) {
+ if (queryctrl.flags & V4L2_CTRL_FLAG_DISABLED)
+ continue;
+
+ printf("Control %s\\n", queryctrl.name);
+
+ if (queryctrl.type == V4L2_CTRL_TYPE_MENU)
+ enumerate_menu();
+ } else {
+ if (errno == EINVAL)
+ continue;
+
+ perror("VIDIOC_QUERYCTRL");
+ exit(EXIT_FAILURE);
+ }
}
for (queryctrl.id = V4L2_CID_PRIVATE_BASE;;
- queryctrl.id++) {
- if (0 == ioctl(fd, VIDIOC_QUERYCTRL, &queryctrl)) {
- if (queryctrl.flags & V4L2_CTRL_FLAG_DISABLED)
- continue;
-
- printf("Control %s\\n", queryctrl.name);
-
- if (queryctrl.type == V4L2_CTRL_TYPE_MENU)
- enumerate_menu();
- } else {
- if (errno == EINVAL)
- break;
-
- perror("VIDIOC_QUERYCTRL");
- exit(EXIT_FAILURE);
- }
+ queryctrl.id++) {
+ if (0 == ioctl(fd, VIDIOC_QUERYCTRL, &queryctrl)) {
+ if (queryctrl.flags & V4L2_CTRL_FLAG_DISABLED)
+ continue;
+
+ printf("Control %s\\n", queryctrl.name);
+
+ if (queryctrl.type == V4L2_CTRL_TYPE_MENU)
+ enumerate_menu();
+ } else {
+ if (errno == EINVAL)
+ break;
+
+ perror("VIDIOC_QUERYCTRL");
+ exit(EXIT_FAILURE);
+ }
}
@@ -445,21 +445,21 @@ more menu type controls.
queryctrl.id = V4L2_CTRL_CLASS_USER | V4L2_CTRL_FLAG_NEXT_CTRL;
while (0 == ioctl(fd, VIDIOC_QUERYCTRL, &queryctrl)) {
- if (V4L2_CTRL_ID2CLASS(queryctrl.id) != V4L2_CTRL_CLASS_USER)
- break;
- if (queryctrl.flags & V4L2_CTRL_FLAG_DISABLED)
- continue;
+ if (V4L2_CTRL_ID2CLASS(queryctrl.id) != V4L2_CTRL_CLASS_USER)
+ break;
+ if (queryctrl.flags & V4L2_CTRL_FLAG_DISABLED)
+ continue;
- printf("Control %s\\n", queryctrl.name);
+ printf("Control %s\\n", queryctrl.name);
- if (queryctrl.type == V4L2_CTRL_TYPE_MENU)
- enumerate_menu();
+ if (queryctrl.type == V4L2_CTRL_TYPE_MENU)
+ enumerate_menu();
- queryctrl.id |= V4L2_CTRL_FLAG_NEXT_CTRL;
+ queryctrl.id |= V4L2_CTRL_FLAG_NEXT_CTRL;
}
if (errno != EINVAL) {
- perror("VIDIOC_QUERYCTRL");
- exit(EXIT_FAILURE);
+ perror("VIDIOC_QUERYCTRL");
+ exit(EXIT_FAILURE);
}
@@ -473,42 +473,42 @@ more menu type controls.
queryctrl.id = V4L2_CID_BRIGHTNESS;
if (-1 == ioctl(fd, VIDIOC_QUERYCTRL, &queryctrl)) {
- if (errno != EINVAL) {
- perror("VIDIOC_QUERYCTRL");
- exit(EXIT_FAILURE);
- } else {
- printf("V4L2_CID_BRIGHTNESS is not supportedn");
- }
+ if (errno != EINVAL) {
+ perror("VIDIOC_QUERYCTRL");
+ exit(EXIT_FAILURE);
+ } else {
+ printf("V4L2_CID_BRIGHTNESS is not supportedn");
+ }
} else if (queryctrl.flags & V4L2_CTRL_FLAG_DISABLED) {
- printf("V4L2_CID_BRIGHTNESS is not supportedn");
+ printf("V4L2_CID_BRIGHTNESS is not supportedn");
} else {
- memset(&control, 0, sizeof (control));
- control.id = V4L2_CID_BRIGHTNESS;
- control.value = queryctrl.default_value;
-
- if (-1 == ioctl(fd, VIDIOC_S_CTRL, &control)) {
- perror("VIDIOC_S_CTRL");
- exit(EXIT_FAILURE);
- }
+ memset(&control, 0, sizeof (control));
+ control.id = V4L2_CID_BRIGHTNESS;
+ control.value = queryctrl.default_value;
+
+ if (-1 == ioctl(fd, VIDIOC_S_CTRL, &control)) {
+ perror("VIDIOC_S_CTRL");
+ exit(EXIT_FAILURE);
+ }
}
memset(&control, 0, sizeof(control));
control.id = V4L2_CID_CONTRAST;
if (0 == ioctl(fd, VIDIOC_G_CTRL, &control)) {
- control.value += 1;
+ control.value += 1;
- /* The driver may clamp the value or return ERANGE, ignored here */
+ /* The driver may clamp the value or return ERANGE, ignored here */
- if (-1 == ioctl(fd, VIDIOC_S_CTRL, &control)
- && errno != ERANGE) {
- perror("VIDIOC_S_CTRL");
- exit(EXIT_FAILURE);
- }
+ if (-1 == ioctl(fd, VIDIOC_S_CTRL, &control)
+ && errno != ERANGE) {
+ perror("VIDIOC_S_CTRL");
+ exit(EXIT_FAILURE);
+ }
/* Ignore if V4L2_CID_CONTRAST is unsupported */
} else if (errno != EINVAL) {
- perror("VIDIOC_G_CTRL");
- exit(EXIT_FAILURE);
+ perror("VIDIOC_G_CTRL");
+ exit(EXIT_FAILURE);
}
control.id = V4L2_CID_AUDIO_MUTE;
diff --git a/Documentation/linux_tv/media/v4l/dev-osd.rst b/Documentation/linux_tv/media/v4l/dev-osd.rst
index ebc2f77d0e97..6a6ead6df54d 100644
--- a/Documentation/linux_tv/media/v4l/dev-osd.rst
+++ b/Documentation/linux_tv/media/v4l/dev-osd.rst
@@ -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
diff --git a/Documentation/linux_tv/media/v4l/dev-raw-vbi.rst b/Documentation/linux_tv/media/v4l/dev-raw-vbi.rst
index 659196499b32..a26e10e92460 100644
--- a/Documentation/linux_tv/media/v4l/dev-raw-vbi.rst
+++ b/Documentation/linux_tv/media/v4l/dev-raw-vbi.rst
@@ -123,10 +123,10 @@ and always returns default parameters as :ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>` does
- ``offset``
- Horizontal offset of the VBI image, relative to the leading edge
- of the line synchronization pulse and counted in samples: The
- first sample in the VBI image will be located ``offset`` /
- ``sampling_rate`` seconds following the leading edge. See also
- :ref:`vbi-hsync`.
+ of the line synchronization pulse and counted in samples: The
+ first sample in the VBI image will be located ``offset`` /
+ ``sampling_rate`` seconds following the leading edge. See also
+ :ref:`vbi-hsync`.
- .. row 3
@@ -134,7 +134,7 @@ and always returns default parameters as :ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>` does
- ``samples_per_line``
- -
+ -
- .. row 4
@@ -143,13 +143,13 @@ and always returns default parameters as :ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>` does
- ``sample_format``
- Defines the sample format as in :ref:`pixfmt`, a
- four-character-code. [2]_ Usually this is ``V4L2_PIX_FMT_GREY``,
- i. e. each sample consists of 8 bits with lower values oriented
- towards the black level. Do not assume any other correlation of
- values with the signal level. For example, the MSB does not
- necessarily indicate if the signal is 'high' or 'low' because 128
- may not be the mean value of the signal. Drivers shall not convert
- the sample format by software.
+ four-character-code. [2]_ Usually this is ``V4L2_PIX_FMT_GREY``,
+ i. e. each sample consists of 8 bits with lower values oriented
+ towards the black level. Do not assume any other correlation of
+ values with the signal level. For example, the MSB does not
+ necessarily indicate if the signal is 'high' or 'low' because 128
+ may not be the mean value of the signal. Drivers shall not convert
+ the sample format by software.
- .. row 5
@@ -158,16 +158,16 @@ and always returns default parameters as :ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>` does
- ``start``\ [2]
- This is the scanning system line number associated with the first
- line of the VBI image, of the first and the second field
- respectively. See :ref:`vbi-525` and :ref:`vbi-625` for valid
- values. The ``V4L2_VBI_ITU_525_F1_START``,
- ``V4L2_VBI_ITU_525_F2_START``, ``V4L2_VBI_ITU_625_F1_START`` and
- ``V4L2_VBI_ITU_625_F2_START`` defines give the start line numbers
- for each field for each 525 or 625 line format as a convenience.
- Don't forget that ITU line numbering starts at 1, not 0. VBI input
- drivers can return start values 0 if the hardware cannot reliable
- identify scanning lines, VBI acquisition may not require this
- information.
+ line of the VBI image, of the first and the second field
+ respectively. See :ref:`vbi-525` and :ref:`vbi-625` for valid
+ values. The ``V4L2_VBI_ITU_525_F1_START``,
+ ``V4L2_VBI_ITU_525_F2_START``, ``V4L2_VBI_ITU_625_F1_START`` and
+ ``V4L2_VBI_ITU_625_F2_START`` defines give the start line numbers
+ for each field for each 525 or 625 line format as a convenience.
+ Don't forget that ITU line numbering starts at 1, not 0. VBI input
+ drivers can return start values 0 if the hardware cannot reliable
+ identify scanning lines, VBI acquisition may not require this
+ information.
- .. row 6
@@ -176,34 +176,34 @@ and always returns default parameters as :ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>` does
- ``count``\ [2]
- The number of lines in the first and second field image,
- respectively.
+ respectively.
- .. row 7
- :cspan:`2`
- Drivers should be as flexibility as possible. For example, it may
- be possible to extend or move the VBI capture window down to the
- picture area, implementing a 'full field mode' to capture data
- service transmissions embedded in the picture.
-
- An application can set the first or second ``count`` value to zero
- if no data is required from the respective field; ``count``\ [1]
- if the scanning system is progressive, i. e. not interlaced. The
- corresponding start value shall be ignored by the application and
- driver. Anyway, drivers may not support single field capturing and
- return both count values non-zero.
-
- Both ``count`` values set to zero, or line numbers outside the
- bounds depicted in :ref:`vbi-525` and :ref:`vbi-625`, or a
- field image covering lines of two fields, are invalid and shall
- not be returned by the driver.
-
- To initialize the ``start`` and ``count`` fields, applications
- must first determine the current video standard selection. The
- :ref:`v4l2_std_id <v4l2-std-id>` or the ``framelines`` field
- of struct :ref:`v4l2_standard <v4l2-standard>` can be evaluated
- for this purpose.
+ Drivers should be as flexibility as possible. For example, it may
+ be possible to extend or move the VBI capture window down to the
+ picture area, implementing a 'full field mode' to capture data
+ service transmissions embedded in the picture.
+
+ An application can set the first or second ``count`` value to zero
+ if no data is required from the respective field; ``count``\ [1]
+ if the scanning system is progressive, i. e. not interlaced. The
+ corresponding start value shall be ignored by the application and
+ driver. Anyway, drivers may not support single field capturing and
+ return both count values non-zero.
+
+ Both ``count`` values set to zero, or line numbers outside the
+ bounds depicted in :ref:`vbi-525` and :ref:`vbi-625`, or a
+ field image covering lines of two fields, are invalid and shall
+ not be returned by the driver.
+
+ To initialize the ``start`` and ``count`` fields, applications
+ must first determine the current video standard selection. The
+ :ref:`v4l2_std_id <v4l2-std-id>` or the ``framelines`` field
+ of struct :ref:`v4l2_standard <v4l2-standard>` can be evaluated
+ for this purpose.
- .. row 8
@@ -212,7 +212,7 @@ and always returns default parameters as :ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>` does
- ``flags``
- See :ref:`vbifmt-flags` below. Currently only drivers set flags,
- applications must set this field to zero.
+ applications must set this field to zero.
- .. row 9
@@ -221,7 +221,7 @@ and always returns default parameters as :ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>` does
- ``reserved``\ [2]
- This array is reserved for future extensions. Drivers and
- applications must set it to zero.
+ applications must set it to zero.
@@ -240,12 +240,12 @@ and always returns default parameters as :ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>` does
- 0x0001
- This flag indicates hardware which does not properly distinguish
- between fields. Normally the VBI image stores the first field
- (lower scanning line numbers) first in memory. This may be a top
- or bottom field depending on the video standard. When this flag is
- set the first or second field may be stored first, however the
- fields are still in correct temporal order with the older field
- first in memory. [3]_
+ between fields. Normally the VBI image stores the first field
+ (lower scanning line numbers) first in memory. This may be a top
+ or bottom field depending on the video standard. When this flag is
+ set the first or second field may be stored first, however the
+ fields are still in correct temporal order with the older field
+ first in memory. [3]_
- .. row 2
@@ -254,18 +254,18 @@ and always returns default parameters as :ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>` does
- 0x0002
- By default the two field images will be passed sequentially; all
- lines of the first field followed by all lines of the second field
- (compare :ref:`field-order` ``V4L2_FIELD_SEQ_TB`` and
- ``V4L2_FIELD_SEQ_BT``, whether the top or bottom field is first in
- memory depends on the video standard). When this flag is set, the
- two fields are interlaced (cf. ``V4L2_FIELD_INTERLACED``). The
- first line of the first field followed by the first line of the
- second field, then the two second lines, and so on. Such a layout
- may be necessary when the hardware has been programmed to capture
- or output interlaced video images and is unable to separate the
- fields for VBI capturing at the same time. For simplicity setting
- this flag implies that both ``count`` values are equal and
- non-zero.
+ lines of the first field followed by all lines of the second field
+ (compare :ref:`field-order` ``V4L2_FIELD_SEQ_TB`` and
+ ``V4L2_FIELD_SEQ_BT``, whether the top or bottom field is first in
+ memory depends on the video standard). When this flag is set, the
+ two fields are interlaced (cf. ``V4L2_FIELD_INTERLACED``). The
+ first line of the first field followed by the first line of the
+ second field, then the two second lines, and so on. Such a layout
+ may be necessary when the hardware has been programmed to capture
+ or output interlaced video images and is unable to separate the
+ fields for VBI capturing at the same time. For simplicity setting
+ this flag implies that both ``count`` values are equal and
+ non-zero.
diff --git a/Documentation/linux_tv/media/v4l/dev-rds.rst b/Documentation/linux_tv/media/v4l/dev-rds.rst
index 87209fd691f5..6a0b1a874668 100644
--- a/Documentation/linux_tv/media/v4l/dev-rds.rst
+++ b/Documentation/linux_tv/media/v4l/dev-rds.rst
@@ -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'.
diff --git a/Documentation/linux_tv/media/v4l/dev-sdr.rst b/Documentation/linux_tv/media/v4l/dev-sdr.rst
index 834488ab7147..fc4053f957fb 100644
--- a/Documentation/linux_tv/media/v4l/dev-sdr.rst
+++ b/Documentation/linux_tv/media/v4l/dev-sdr.rst
@@ -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
diff --git a/Documentation/linux_tv/media/v4l/dev-sliced-vbi.rst b/Documentation/linux_tv/media/v4l/dev-sliced-vbi.rst
index 726edf554eb1..8821e7c3c26c 100644
--- a/Documentation/linux_tv/media/v4l/dev-sliced-vbi.rst
+++ b/Documentation/linux_tv/media/v4l/dev-sliced-vbi.rst
@@ -116,22 +116,22 @@ which may return ``EBUSY`` can be the
- :cspan:`2`
- If ``service_set`` is non-zero when passed with
- :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` or
- :ref:`VIDIOC_TRY_FMT <VIDIOC_G_FMT>`, the ``service_lines``
- array will be filled by the driver according to the services
- specified in this field. For example, if ``service_set`` is
- initialized with ``V4L2_SLICED_TELETEXT_B | V4L2_SLICED_WSS_625``,
- a driver for the cx25840 video decoder sets lines 7-22 of both
- fields [1]_ to ``V4L2_SLICED_TELETEXT_B`` and line 23 of the first
- field to ``V4L2_SLICED_WSS_625``. If ``service_set`` is set to
- zero, then the values of ``service_lines`` will be used instead.
-
- On return the driver sets this field to the union of all elements
- of the returned ``service_lines`` array. It may contain less
- services than requested, perhaps just one, if the hardware cannot
- handle more services simultaneously. It may be empty (zero) if
- none of the requested services are supported by the hardware.
+ If ``service_set`` is non-zero when passed with
+ :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` or
+ :ref:`VIDIOC_TRY_FMT <VIDIOC_G_FMT>`, the ``service_lines``
+ array will be filled by the driver according to the services
+ specified in this field. For example, if ``service_set`` is
+ initialized with ``V4L2_SLICED_TELETEXT_B | V4L2_SLICED_WSS_625``,
+ a driver for the cx25840 video decoder sets lines 7-22 of both
+ fields [1]_ to ``V4L2_SLICED_TELETEXT_B`` and line 23 of the first
+ field to ``V4L2_SLICED_WSS_625``. If ``service_set`` is set to
+ zero, then the values of ``service_lines`` will be used instead.
+
+ On return the driver sets this field to the union of all elements
+ of the returned ``service_lines`` array. It may contain less
+ services than requested, perhaps just one, if the hardware cannot
+ handle more services simultaneously. It may be empty (zero) if
+ none of the requested services are supported by the hardware.
- .. row 2
@@ -141,22 +141,22 @@ which may return ``EBUSY`` can be the
- :cspan:`2`
- Applications initialize this array with sets of data services the
- driver shall look for or insert on the respective scan line.
- Subject to hardware capabilities drivers return the requested set,
- a subset, which may be just a single service, or an empty set.
- When the hardware cannot handle multiple services on the same line
- the driver shall choose one. No assumptions can be made on which
- service the driver chooses.
+ Applications initialize this array with sets of data services the
+ driver shall look for or insert on the respective scan line.
+ Subject to hardware capabilities drivers return the requested set,
+ a subset, which may be just a single service, or an empty set.
+ When the hardware cannot handle multiple services on the same line
+ the driver shall choose one. No assumptions can be made on which
+ service the driver chooses.
- Data services are defined in :ref:`vbi-services2`. Array indices
- map to ITU-R line numbers (see also :ref:`vbi-525` and
- :ref:`vbi-625`) as follows:
+ Data services are defined in :ref:`vbi-services2`. Array indices
+ map to ITU-R line numbers (see also :ref:`vbi-525` and
+ :ref:`vbi-625`) as follows:
- .. row 3
- -
- -
+ -
+ -
- Element
- 525 line systems
@@ -165,8 +165,8 @@ which may return ``EBUSY`` can be the
- .. row 4
- -
- -
+ -
+ -
- ``service_lines``\ [0][1]
- 1
@@ -175,8 +175,8 @@ which may return ``EBUSY`` can be the
- .. row 5
- -
- -
+ -
+ -
- ``service_lines``\ [0][23]
- 23
@@ -185,8 +185,8 @@ which may return ``EBUSY`` can be the
- .. row 6
- -
- -
+ -
+ -
- ``service_lines``\ [1][1]
- 264
@@ -195,8 +195,8 @@ which may return ``EBUSY`` can be the
- .. row 7
- -
- -
+ -
+ -
- ``service_lines``\ [1][23]
- 286
@@ -205,15 +205,15 @@ which may return ``EBUSY`` can be the
- .. row 8
- -
- -
+ -
+ -
- :cspan:`2` Drivers must set ``service_lines`` [0][0] and
- ``service_lines``\ [1][0] to zero. The
- ``V4L2_VBI_ITU_525_F1_START``, ``V4L2_VBI_ITU_525_F2_START``,
- ``V4L2_VBI_ITU_625_F1_START`` and ``V4L2_VBI_ITU_625_F2_START``
- defines give the start line numbers for each field for each 525 or
- 625 line format as a convenience. Don't forget that ITU line
- numbering starts at 1, not 0.
+ ``service_lines``\ [1][0] to zero. The
+ ``V4L2_VBI_ITU_525_F1_START``, ``V4L2_VBI_ITU_525_F2_START``,
+ ``V4L2_VBI_ITU_625_F1_START`` and ``V4L2_VBI_ITU_625_F2_START``
+ defines give the start line numbers for each field for each 525 or
+ 625 line format as a convenience. Don't forget that ITU line
+ numbering starts at 1, not 0.
- .. row 9
@@ -222,14 +222,14 @@ which may return ``EBUSY`` can be the
- ``io_size``
- :cspan:`2` Maximum number of bytes passed by one
- :ref:`read() <func-read>` or :ref:`write() <func-write>` call,
- and the buffer size in bytes for the
- :ref:`VIDIOC_QBUF` and
- :ref:`VIDIOC_DQBUF <VIDIOC_QBUF>` ioctl. Drivers set this field
- to the size of struct
- :ref:`v4l2_sliced_vbi_data <v4l2-sliced-vbi-data>` times the
- number of non-zero elements in the returned ``service_lines``
- array (that is the number of lines potentially carrying data).
+ :ref:`read() <func-read>` or :ref:`write() <func-write>` call,
+ and the buffer size in bytes for the
+ :ref:`VIDIOC_QBUF` and
+ :ref:`VIDIOC_DQBUF <VIDIOC_QBUF>` ioctl. Drivers set this field
+ to the size of struct
+ :ref:`v4l2_sliced_vbi_data <v4l2-sliced-vbi-data>` times the
+ number of non-zero elements in the returned ``service_lines``
+ array (that is the number of lines potentially carrying data).
- .. row 10
@@ -238,7 +238,7 @@ which may return ``EBUSY`` can be the
- ``reserved``\ [2]
- :cspan:`2` This array is reserved for future extensions.
- Applications and drivers must set it to zero.
+ Applications and drivers must set it to zero.
@@ -273,7 +273,7 @@ which may return ``EBUSY`` can be the
- PAL/SECAM line 7-22, 320-335 (second field 7-22)
- Last 42 of the 45 byte Teletext packet, that is without clock
- run-in and framing code, lsb first transmitted.
+ run-in and framing code, lsb first transmitted.
- .. row 3
@@ -286,7 +286,7 @@ which may return ``EBUSY`` can be the
- PAL line 16
- Byte number 3 to 15 according to Figure 9 of ETS 300 231, lsb
- first transmitted.
+ first transmitted.
- .. row 4
@@ -299,7 +299,7 @@ which may return ``EBUSY`` can be the
- NTSC line 21, 284 (second field 21)
- Two bytes in transmission order, including parity bit, lsb first
- transmitted.
+ transmitted.
- .. row 5
@@ -311,13 +311,13 @@ which may return ``EBUSY`` can be the
- PAL/SECAM line 23
- -
+ -
- ::
+ ::
- Byte 0 1
- msb lsb msb lsb
- Bit 7 6 5 4 3 2 1 0 x x 13 12 11 10 9
+ Byte 0 1
+ msb lsb msb lsb
+ Bit 7 6 5 4 3 2 1 0 x x 13 12 11 10 9
- .. row 6
@@ -375,12 +375,12 @@ of one video frame. The ``id`` of unused
- ``id``
- A flag from :ref:`vbi-services` identifying the type of data in
- this packet. Only a single bit must be set. When the ``id`` of a
- captured packet is zero, the packet is empty and the contents of
- other fields are undefined. Applications shall ignore empty
- packets. When the ``id`` of a packet for output is zero the
- contents of the ``data`` field are undefined and the driver must
- no longer insert data on the requested ``field`` and ``line``.
+ this packet. Only a single bit must be set. When the ``id`` of a
+ captured packet is zero, the packet is empty and the contents of
+ other fields are undefined. Applications shall ignore empty
+ packets. When the ``id`` of a packet for output is zero the
+ contents of the ``data`` field are undefined and the driver must
+ no longer insert data on the requested ``field`` and ``line``.
- .. row 2
@@ -389,8 +389,8 @@ of one video frame. The ``id`` of unused
- ``field``
- The video field number this data has been captured from, or shall
- be inserted at. ``0`` for the first field, ``1`` for the second
- field.
+ be inserted at. ``0`` for the first field, ``1`` for the second
+ field.
- .. row 3
@@ -399,11 +399,11 @@ of one video frame. The ``id`` of unused
- ``line``
- The field (as opposed to frame) line number this data has been
- captured from, or shall be inserted at. See :ref:`vbi-525` and
- :ref:`vbi-625` for valid values. Sliced VBI capture devices can
- set the line number of all packets to ``0`` if the hardware cannot
- reliably identify scan lines. The field number must always be
- valid.
+ captured from, or shall be inserted at. See :ref:`vbi-525` and
+ :ref:`vbi-625` for valid values. Sliced VBI capture devices can
+ set the line number of all packets to ``0`` if the hardware cannot
+ reliably identify scan lines. The field number must always be
+ valid.
- .. row 4
@@ -412,7 +412,7 @@ of one video frame. The ``id`` of unused
- ``reserved``
- This field is reserved for future extensions. Applications and
- drivers must set it to zero.
+ drivers must set it to zero.
- .. row 5
@@ -421,9 +421,9 @@ of one video frame. The ``id`` of unused
- ``data``\ [48]
- The packet payload. See :ref:`vbi-services` for the contents and
- number of bytes passed for each data type. The contents of padding
- bytes at the end of this array are undefined, drivers and
- applications shall ignore them.
+ number of bytes passed for each data type. The contents of padding
+ bytes at the end of this array are undefined, drivers and
+ applications shall ignore them.
Packets are always passed in ascending line number order, without
@@ -556,11 +556,11 @@ number).
- ``magic``\ [4]
- -
+ -
- A "magic" constant from :ref:`v4l2-mpeg-vbi-fmt-ivtv-magic` that
- indicates this is a valid sliced VBI data payload and also
- indicates which member of the anonymous union, ``itv0`` or
- ``ITV0``, to use for the payload data.
+ indicates this is a valid sliced VBI data payload and also
+ indicates which member of the anonymous union, ``itv0`` or
+ ``ITV0``, to use for the payload data.
- .. row 2
@@ -570,27 +570,27 @@ number).
- .. row 3
- -
+ -
- struct :ref:`v4l2_mpeg_vbi_itv0 <v4l2-mpeg-vbi-itv0>`
- ``itv0``
- The primary form of the sliced VBI data payload that contains
- anywhere from 1 to 35 lines of sliced VBI data. Line masks are
- provided in this form of the payload indicating which VBI lines
- are provided.
+ anywhere from 1 to 35 lines of sliced VBI data. Line masks are
+ provided in this form of the payload indicating which VBI lines
+ are provided.
- .. row 4
- -
+ -
- struct :ref:`v4l2_mpeg_vbi_ITV0 <v4l2-mpeg-vbi-itv0-1>`
- ``ITV0``
- An alternate form of the sliced VBI data payload used when 36
- lines of sliced VBI data are present. No line masks are provided
- in this form of the payload; all valid line mask bits are
- implcitly set.
+ lines of sliced VBI data are present. No line masks are provided
+ in this form of the payload; all valid line mask bits are
+ implcitly set.
@@ -617,8 +617,8 @@ number).
- "itv0"
- Indicates the ``itv0`` member of the union in struct
- :ref:`v4l2_mpeg_vbi_fmt_ivtv <v4l2-mpeg-vbi-fmt-ivtv>` is
- valid.
+ :ref:`v4l2_mpeg_vbi_fmt_ivtv <v4l2-mpeg-vbi-fmt-ivtv>` is
+ valid.
- .. row 3
@@ -627,8 +627,8 @@ number).
- "ITV0"
- Indicates the ``ITV0`` member of the union in struct
- :ref:`v4l2_mpeg_vbi_fmt_ivtv <v4l2-mpeg-vbi-fmt-ivtv>` is
- valid and that 36 lines of sliced VBI data are present.
+ :ref:`v4l2_mpeg_vbi_fmt_ivtv <v4l2-mpeg-vbi-fmt-ivtv>` is
+ valid and that 36 lines of sliced VBI data are present.
@@ -647,42 +647,42 @@ number).
- ``linemask``\ [2]
- Bitmasks indicating the VBI service lines present. These
- ``linemask`` values are stored in little endian byte order in the
- MPEG stream. Some reference ``linemask`` bit positions with their
- corresponding VBI line number and video field are given below.
- b\ :sub:`0` indicates the least significant bit of a ``linemask``
- value:
+ ``linemask`` values are stored in little endian byte order in the
+ MPEG stream. Some reference ``linemask`` bit positions with their
+ corresponding VBI line number and video field are given below.
+ b\ :sub:`0` indicates the least significant bit of a ``linemask``
+ value:
- ::
+ ::
- linemask[0] b0: line 6 first field
- linemask[0] b17: line 23 first field
- linemask[0] b18: line 6 second field
- linemask[0] b31: line 19 second field
- linemask[1] b0: line 20 second field
- linemask[1] b3: line 23 second field
- linemask[1] b4-b31: unused and set to 0
+ linemask[0] b0: line 6 first field
+ linemask[0] b17: line 23 first field
+ linemask[0] b18: line 6 second field
+ linemask[0] b31: line 19 second field
+ linemask[1] b0: line 20 second field
+ linemask[1] b3: line 23 second field
+ linemask[1] b4-b31: unused and set to 0
- .. row 2
- struct
- :ref:`v4l2_mpeg_vbi_itv0_line <v4l2-mpeg-vbi-itv0-line>`
+ :ref:`v4l2_mpeg_vbi_itv0_line <v4l2-mpeg-vbi-itv0-line>`
- ``line``\ [35]
- This is a variable length array that holds from 1 to 35 lines of
- sliced VBI data. The sliced VBI data lines present correspond to
- the bits set in the ``linemask`` array, starting from b\ :sub:`0`
- of ``linemask``\ [0] up through b\ :sub:`31` of ``linemask``\ [0],
- and from b\ :sub:`0` of ``linemask``\ [1] up through b\ :sub:`3` of
- ``linemask``\ [1]. ``line``\ [0] corresponds to the first bit
- found set in the ``linemask`` array, ``line``\ [1] corresponds to
- the second bit found set in the ``linemask`` array, etc. If no
- ``linemask`` array bits are set, then ``line``\ [0] may contain
- one line of unspecified data that should be ignored by
- applications.
+ sliced VBI data. The sliced VBI data lines present correspond to
+ the bits set in the ``linemask`` array, starting from b\ :sub:`0`
+ of ``linemask``\ [0] up through b\ :sub:`31` of ``linemask``\ [0],
+ and from b\ :sub:`0` of ``linemask``\ [1] up through b\ :sub:`3` of
+ ``linemask``\ [1]. ``line``\ [0] corresponds to the first bit
+ found set in the ``linemask`` array, ``line``\ [1] corresponds to
+ the second bit found set in the ``linemask`` array, etc. If no
+ ``linemask`` array bits are set, then ``line``\ [0] may contain
+ one line of unspecified data that should be ignored by
+ applications.
@@ -697,14 +697,14 @@ number).
- .. row 1
- struct
- :ref:`v4l2_mpeg_vbi_itv0_line <v4l2-mpeg-vbi-itv0-line>`
+ :ref:`v4l2_mpeg_vbi_itv0_line <v4l2-mpeg-vbi-itv0-line>`
- ``line``\ [36]
- A fixed length array of 36 lines of sliced VBI data. ``line``\ [0]
- through ``line``\ [17] correspond to lines 6 through 23 of the
- first field. ``line``\ [18] through ``line``\ [35] corresponds to
- lines 6 through 23 of the second field.
+ through ``line``\ [17] correspond to lines 6 through 23 of the
+ first field. ``line``\ [18] through ``line``\ [35] corresponds to
+ lines 6 through 23 of the second field.
@@ -723,8 +723,8 @@ number).
- ``id``
- A line identifier value from
- :ref:`ITV0-Line-Identifier-Constants` that indicates the type of
- sliced VBI data stored on this line.
+ :ref:`ITV0-Line-Identifier-Constants` that indicates the type of
+ sliced VBI data stored on this line.
- .. row 2
@@ -759,7 +759,7 @@ number).
- 1
- Refer to :ref:`Sliced VBI services <vbi-services2>` for a
- description of the line payload.
+ description of the line payload.
- .. row 3
@@ -768,7 +768,7 @@ number).
- 4
- Refer to :ref:`Sliced VBI services <vbi-services2>` for a
- description of the line payload.
+ description of the line payload.
- .. row 4
@@ -777,7 +777,7 @@ number).
- 5
- Refer to :ref:`Sliced VBI services <vbi-services2>` for a
- description of the line payload.
+ description of the line payload.
- .. row 5
@@ -786,7 +786,7 @@ number).
- 7
- Refer to :ref:`Sliced VBI services <vbi-services2>` for a
- description of the line payload.
+ description of the line payload.
diff --git a/Documentation/linux_tv/media/v4l/dev-subdev.rst b/Documentation/linux_tv/media/v4l/dev-subdev.rst
index f40aa5187ba5..832b114f7066 100644
--- a/Documentation/linux_tv/media/v4l/dev-subdev.rst
+++ b/Documentation/linux_tv/media/v4l/dev-subdev.rst
@@ -211,7 +211,7 @@ list entity names and pad numbers).
- .. row 1
- -
+ -
- Sensor/0 format
- Frontend/0 format
diff --git a/Documentation/linux_tv/media/v4l/diff-v4l.rst b/Documentation/linux_tv/media/v4l/diff-v4l.rst
index 301e1475ca70..5f45ec123162 100644
--- a/Documentation/linux_tv/media/v4l/diff-v4l.rst
+++ b/Documentation/linux_tv/media/v4l/diff-v4l.rst
@@ -53,7 +53,7 @@ using driver module options. The major device number remains 81.
- Video capture and overlay
- ``/dev/video`` and ``/dev/bttv0``\ [1]_, ``/dev/video0`` to
- ``/dev/video63``
+ ``/dev/video63``
- 0-63
@@ -107,7 +107,7 @@ introduction.
- struct :c:type:`struct video_capability` ``type``
- struct :ref:`v4l2_capability <v4l2-capability>`
- ``capabilities`` flags
+ ``capabilities`` flags
- Purpose
@@ -148,31 +148,31 @@ introduction.
- ``VID_TYPE_CHROMAKEY``
- ``V4L2_FBUF_CAP_CHROMAKEY`` in field ``capability`` of struct
- :ref:`v4l2_framebuffer <v4l2-framebuffer>`
+ :ref:`v4l2_framebuffer <v4l2-framebuffer>`
- Whether chromakey overlay is supported. For more information on
- overlay see :ref:`overlay`.
+ overlay see :ref:`overlay`.
- .. row 7
- ``VID_TYPE_CLIPPING``
- ``V4L2_FBUF_CAP_LIST_CLIPPING`` and
- ``V4L2_FBUF_CAP_BITMAP_CLIPPING`` in field ``capability`` of
- struct :ref:`v4l2_framebuffer <v4l2-framebuffer>`
+ ``V4L2_FBUF_CAP_BITMAP_CLIPPING`` in field ``capability`` of
+ struct :ref:`v4l2_framebuffer <v4l2-framebuffer>`
- Whether clipping the overlaid image is supported, see
- :ref:`overlay`.
+ :ref:`overlay`.
- .. row 8
- ``VID_TYPE_FRAMERAM``
- ``V4L2_FBUF_CAP_EXTERNOVERLAY`` *not set* in field ``capability``
- of struct :ref:`v4l2_framebuffer <v4l2-framebuffer>`
+ of struct :ref:`v4l2_framebuffer <v4l2-framebuffer>`
- Whether overlay overwrites frame buffer memory, see
- :ref:`overlay`.
+ :ref:`overlay`.
- .. row 9
@@ -181,11 +181,11 @@ introduction.
- ``-``
- This flag indicates if the hardware can scale images. The V4L2 API
- implies the scale factor by setting the cropping dimensions and
- image size with the :ref:`VIDIOC_S_CROP <VIDIOC_G_CROP>` and
- :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl, respectively. The
- driver returns the closest sizes possible. For more information on
- cropping and scaling see :ref:`crop`.
+ implies the scale factor by setting the cropping dimensions and
+ image size with the :ref:`VIDIOC_S_CROP <VIDIOC_G_CROP>` and
+ :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl, respectively. The
+ driver returns the closest sizes possible. For more information on
+ cropping and scaling see :ref:`crop`.
- .. row 10
@@ -194,9 +194,9 @@ introduction.
- ``-``
- Applications can enumerate the supported image formats with the
- :ref:`VIDIOC_ENUM_FMT` ioctl to determine if
- the device supports grey scale capturing only. For more
- information on image formats see :ref:`pixfmt`.
+ :ref:`VIDIOC_ENUM_FMT` ioctl to determine if
+ the device supports grey scale capturing only. For more
+ information on image formats see :ref:`pixfmt`.
- .. row 11
@@ -205,10 +205,10 @@ introduction.
- ``-``
- Applications can call the :ref:`VIDIOC_G_CROP <VIDIOC_G_CROP>`
- ioctl to determine if the device supports capturing a subsection
- of the full picture ("cropping" in V4L2). If not, the ioctl
- returns the ``EINVAL`` error code. For more information on cropping
- and scaling see :ref:`crop`.
+ ioctl to determine if the device supports capturing a subsection
+ of the full picture ("cropping" in V4L2). If not, the ioctl
+ returns the ``EINVAL`` error code. For more information on cropping
+ and scaling see :ref:`crop`.
- .. row 12
@@ -217,8 +217,8 @@ introduction.
- ``-``
- Applications can enumerate the supported image formats with the
- :ref:`VIDIOC_ENUM_FMT` ioctl to determine if
- the device supports MPEG streams.
+ :ref:`VIDIOC_ENUM_FMT` ioctl to determine if
+ the device supports MPEG streams.
- .. row 13
@@ -759,59 +759,59 @@ differences.
- .. row 2
- -
+ -
- The image format must be selected before buffers are allocated,
- with the :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl. When no
- format is selected the driver may use the last, possibly by
- another application requested format.
+ with the :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl. When no
+ format is selected the driver may use the last, possibly by
+ another application requested format.
- .. row 3
- Applications cannot change the number of buffers. The it is built
- into the driver, unless it has a module option to change the
- number when the driver module is loaded.
+ into the driver, unless it has a module option to change the
+ number when the driver module is loaded.
- The :ref:`VIDIOC_REQBUFS` ioctl allocates the
- desired number of buffers, this is a required step in the
- initialization sequence.
+ desired number of buffers, this is a required step in the
+ initialization sequence.
- .. row 4
- Drivers map all buffers as one contiguous range of memory. The
- ``VIDIOCGMBUF`` ioctl is available to query the number of buffers,
- the offset of each buffer from the start of the virtual file, and
- the overall amount of memory used, which can be used as arguments
- for the :ref:`mmap() <func-mmap>` function.
+ ``VIDIOCGMBUF`` ioctl is available to query the number of buffers,
+ the offset of each buffer from the start of the virtual file, and
+ the overall amount of memory used, which can be used as arguments
+ for the :ref:`mmap() <func-mmap>` function.
- Buffers are individually mapped. The offset and size of each
- buffer can be determined with the
- :ref:`VIDIOC_QUERYBUF` ioctl.
+ buffer can be determined with the
+ :ref:`VIDIOC_QUERYBUF` ioctl.
- .. row 5
- The ``VIDIOCMCAPTURE`` ioctl prepares a buffer for capturing. It
- also determines the image format for this buffer. The ioctl
- returns immediately, eventually with an ``EAGAIN`` error code if no
- video signal had been detected. When the driver supports more than
- one buffer applications can call the ioctl multiple times and thus
- have multiple outstanding capture requests.
+ also determines the image format for this buffer. The ioctl
+ returns immediately, eventually with an ``EAGAIN`` error code if no
+ video signal had been detected. When the driver supports more than
+ one buffer applications can call the ioctl multiple times and thus
+ have multiple outstanding capture requests.
- The ``VIDIOCSYNC`` ioctl suspends execution until a particular
- buffer has been filled.
+ The ``VIDIOCSYNC`` ioctl suspends execution until a particular
+ buffer has been filled.
- Drivers maintain an incoming and outgoing queue.
- :ref:`VIDIOC_QBUF` enqueues any empty buffer into
- the incoming queue. Filled buffers are dequeued from the outgoing
- queue with the :ref:`VIDIOC_DQBUF <VIDIOC_QBUF>` ioctl. To wait
- until filled buffers become available this function,
- :ref:`select() <func-select>` or :ref:`poll() <func-poll>` can
- be used. The :ref:`VIDIOC_STREAMON` ioctl
- must be called once after enqueuing one or more buffers to start
- capturing. Its counterpart
- :ref:`VIDIOC_STREAMOFF <VIDIOC_STREAMON>` stops capturing and
- dequeues all buffers from both queues. Applications can query the
- signal status, if known, with the
- :ref:`VIDIOC_ENUMINPUT` ioctl.
+ :ref:`VIDIOC_QBUF` enqueues any empty buffer into
+ the incoming queue. Filled buffers are dequeued from the outgoing
+ queue with the :ref:`VIDIOC_DQBUF <VIDIOC_QBUF>` ioctl. To wait
+ until filled buffers become available this function,
+ :ref:`select() <func-select>` or :ref:`poll() <func-poll>` can
+ be used. The :ref:`VIDIOC_STREAMON` ioctl
+ must be called once after enqueuing one or more buffers to start
+ capturing. Its counterpart
+ :ref:`VIDIOC_STREAMOFF <VIDIOC_STREAMON>` stops capturing and
+ dequeues all buffers from both queues. Applications can query the
+ signal status, if known, with the
+ :ref:`VIDIOC_ENUMINPUT` ioctl.
For a more in-depth discussion of memory mapping and examples, see
@@ -845,7 +845,7 @@ with the following parameters:
- sampling_rate
- 28636363 Hz NTSC (or any other 525-line standard); 35468950 Hz PAL
- and SECAM (625-line standards)
+ and SECAM (625-line standards)
- .. row 3
@@ -864,7 +864,7 @@ with the following parameters:
- sample_format
- V4L2_PIX_FMT_GREY. The last four bytes (a machine endianness
- integer) contain a frame counter.
+ integer) contain a frame counter.
- .. row 6
diff --git a/Documentation/linux_tv/media/v4l/dmabuf.rst b/Documentation/linux_tv/media/v4l/dmabuf.rst
index ae1bd2dfc61e..148e05e4c731 100644
--- a/Documentation/linux_tv/media/v4l/dmabuf.rst
+++ b/Documentation/linux_tv/media/v4l/dmabuf.rst
@@ -47,12 +47,12 @@ driver must be switched into DMABUF I/O mode by calling the
reqbuf.count = 1;
if (ioctl(fd, VIDIOC_REQBUFS, &reqbuf) == -1) {
- if (errno == EINVAL)
- printf("Video capturing or DMABUF streaming is not supported\\n");
- else
- perror("VIDIOC_REQBUFS");
+ if (errno == EINVAL)
+ printf("Video capturing or DMABUF streaming is not supported\\n");
+ else
+ perror("VIDIOC_REQBUFS");
- exit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
The buffer (plane) file descriptor is passed on the fly with the
@@ -66,20 +66,20 @@ a different DMABUF descriptor at each ``VIDIOC_QBUF`` call.
int buffer_queue(int v4lfd, int index, int dmafd)
{
- struct v4l2_buffer buf;
+ struct v4l2_buffer buf;
- memset(&buf, 0, sizeof buf);
- buf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
- buf.memory = V4L2_MEMORY_DMABUF;
- buf.index = index;
- buf.m.fd = dmafd;
+ memset(&buf, 0, sizeof buf);
+ buf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
+ buf.memory = V4L2_MEMORY_DMABUF;
+ buf.index = index;
+ buf.m.fd = dmafd;
- if (ioctl(v4lfd, VIDIOC_QBUF, &buf) == -1) {
- perror("VIDIOC_QBUF");
- return -1;
- }
+ if (ioctl(v4lfd, VIDIOC_QBUF, &buf) == -1) {
+ perror("VIDIOC_QBUF");
+ return -1;
+ }
- return 0;
+ return 0;
}
@@ -87,28 +87,28 @@ a different DMABUF descriptor at each ``VIDIOC_QBUF`` call.
int buffer_queue_mp(int v4lfd, int index, int dmafd[], int n_planes)
{
- struct v4l2_buffer buf;
- struct v4l2_plane planes[VIDEO_MAX_PLANES];
- int i;
+ struct v4l2_buffer buf;
+ struct v4l2_plane planes[VIDEO_MAX_PLANES];
+ int i;
- memset(&buf, 0, sizeof buf);
- buf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE;
- buf.memory = V4L2_MEMORY_DMABUF;
- buf.index = index;
- buf.m.planes = planes;
- buf.length = n_planes;
+ memset(&buf, 0, sizeof buf);
+ buf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE;
+ buf.memory = V4L2_MEMORY_DMABUF;
+ buf.index = index;
+ buf.m.planes = planes;
+ buf.length = n_planes;
- memset(&planes, 0, sizeof planes);
+ memset(&planes, 0, sizeof planes);
- for (i = 0; i < n_planes; ++i)
- buf.m.planes[i].m.fd = dmafd[i];
+ for (i = 0; i < n_planes; ++i)
+ buf.m.planes[i].m.fd = dmafd[i];
- if (ioctl(v4lfd, VIDIOC_QBUF, &buf) == -1) {
- perror("VIDIOC_QBUF");
- return -1;
- }
+ if (ioctl(v4lfd, VIDIOC_QBUF, &buf) == -1) {
+ perror("VIDIOC_QBUF");
+ return -1;
+ }
- return 0;
+ return 0;
}
Captured or displayed buffers are dequeued with the
diff --git a/Documentation/linux_tv/media/v4l/extended-controls.rst b/Documentation/linux_tv/media/v4l/extended-controls.rst
index ed10c9e274f5..d18c3b9896d9 100644
--- a/Documentation/linux_tv/media/v4l/extended-controls.rst
+++ b/Documentation/linux_tv/media/v4l/extended-controls.rst
@@ -113,8 +113,8 @@ The recommended way to enumerate over the extended controls is by using
qctrl.id = V4L2_CTRL_FLAG_NEXT_CTRL;
while (0 == ioctl (fd, VIDIOC_QUERYCTRL, &qctrl)) {
- /* ... */
- qctrl.id |= V4L2_CTRL_FLAG_NEXT_CTRL;
+ /* ... */
+ qctrl.id |= V4L2_CTRL_FLAG_NEXT_CTRL;
}
The initial control ID is set to 0 ORed with the
@@ -132,10 +132,10 @@ control class is found:
qctrl.id = V4L2_CTRL_CLASS_MPEG | V4L2_CTRL_FLAG_NEXT_CTRL;
while (0 == ioctl(fd, VIDIOC_QUERYCTRL, &qctrl)) {
- if (V4L2_CTRL_ID2CLASS(qctrl.id) != V4L2_CTRL_CLASS_MPEG)
- break;
- /* ... */
- qctrl.id |= V4L2_CTRL_FLAG_NEXT_CTRL;
+ if (V4L2_CTRL_ID2CLASS(qctrl.id) != V4L2_CTRL_CLASS_MPEG)
+ break;
+ /* ... */
+ qctrl.id |= V4L2_CTRL_FLAG_NEXT_CTRL;
}
The 32-bit ``qctrl.id`` value is subdivided into three bit ranges: the
@@ -302,8 +302,8 @@ Codec Control IDs
- ``V4L2_MPEG_STREAM_VBI_FMT_IVTV``
- VBI in private packets, IVTV format (documented in the kernel
- sources in the file
- ``Documentation/video4linux/cx2341x/README.vbi``)
+ sources in the file
+ ``Documentation/video4linux/cx2341x/README.vbi``)
@@ -1650,7 +1650,7 @@ Codec Control IDs
- ``V4L2_MPEG_VIDEO_PROFILE_ADVANCED_CODING_EFFICIENCY``
- -
+ -
@@ -1929,7 +1929,7 @@ Codec Control IDs
- ``V4L2_MPEG_VIDEO_HEADER_MODE_JOINED_WITH_1ST_FRAME``
- The stream header is returned together with the first encoded
- frame.
+ frame.
@@ -2035,14 +2035,14 @@ Codec Control IDs
- ``V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_INTERLEAVED_SLICES``
- Slices are interleaved one after other with macroblocks in run
- length order.
+ length order.
- .. row 2
- ``V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_SCATTERED_SLICES``
- Scatters the macroblocks based on a mathematical function known to
- both encoder and decoder.
+ both encoder and decoder.
- .. row 3
@@ -2340,14 +2340,14 @@ MFC 5.1 Control IDs
- ``V4L2_MPEG_MFC51_FRAME_SKIP_MODE_LEVEL_LIMIT``
- Frame skip mode enabled and buffer limit is set by the chosen
- level and is defined by the standard.
+ level and is defined by the standard.
- .. row 3
- ``V4L2_MPEG_MFC51_FRAME_SKIP_MODE_BUF_LIMIT``
- Frame skip mode enabled and buffer limit is set by the VBV
- (MPEG1/2/4) or CPB (H264) buffer size control.
+ (MPEG1/2/4) or CPB (H264) buffer size control.
@@ -2690,15 +2690,15 @@ VPX Control IDs
- ``V4L2_CID_MPEG_VIDEO_VPX_2_REF_FRAME``
- Two frames will be searched among the last encoded frame, the
- golden frame and the alternate reference (altref) frame. The
- encoder implementation will decide which two are chosen.
+ golden frame and the alternate reference (altref) frame. The
+ encoder implementation will decide which two are chosen.
- .. row 3
- ``V4L2_CID_MPEG_VIDEO_VPX_3_REF_FRAME``
- The last encoded frame, the golden frame and the altref frame will
- be searched.
+ be searched.
@@ -2736,15 +2736,15 @@ VPX Control IDs
- ``V4L2_CID_MPEG_VIDEO_VPX_GOLDEN_FRAME_USE_PREV``
- Use the (n-2)th frame as a golden frame, current frame index being
- 'n'.
+ 'n'.
- .. row 2
- ``V4L2_CID_MPEG_VIDEO_VPX_GOLDEN_FRAME_USE_REF_PERIOD``
- Use the previous specific frame indicated by
- V4L2_CID_MPEG_VIDEO_VPX_GOLDEN_FRAME_REF_PERIOD as a
- golden frame.
+ V4L2_CID_MPEG_VIDEO_VPX_GOLDEN_FRAME_REF_PERIOD as a
+ golden frame.
@@ -2867,14 +2867,14 @@ Camera Control IDs
- ``V4L2_EXPOSURE_METERING_AVERAGE``
- Use the light information coming from the entire frame and average
- giving no weighting to any particular portion of the metered area.
+ giving no weighting to any particular portion of the metered area.
- .. row 2
- ``V4L2_EXPOSURE_METERING_CENTER_WEIGHTED``
- Average the light information coming from the entire frame giving
- priority to the center of the metered area.
+ priority to the center of the metered area.
- .. row 3
@@ -2887,9 +2887,9 @@ Camera Control IDs
- ``V4L2_EXPOSURE_METERING_MATRIX``
- A multi-zone metering. The light intensity is measured in several
- points of the frame and the results are combined. The algorithm of
- the zones selection and their significance in calculating the
- final value is device dependent.
+ points of the frame and the results are combined. The algorithm of
+ the zones selection and their significance in calculating the
+ final value is device dependent.
@@ -2993,7 +2993,7 @@ Camera Control IDs
- ``V4L2_AUTO_FOCUS_STATUS_FAILED``
- Automatic focus has failed, the driver will not transition from
- this state until another action is performed by an application.
+ this state until another action is performed by an application.
@@ -3020,14 +3020,14 @@ Camera Control IDs
- ``V4L2_AUTO_FOCUS_RANGE_NORMAL``
- Normal distance range, limited for best automatic focus
- performance.
+ performance.
- .. row 3
- ``V4L2_AUTO_FOCUS_RANGE_MACRO``
- Macro (close-up) auto focus. The camera will use its minimum
- possible distance for auto focus.
+ possible distance for auto focus.
- .. row 4
@@ -3114,59 +3114,59 @@ Camera Control IDs
- ``V4L2_WHITE_BALANCE_INCANDESCENT``
- White balance setting for incandescent (tungsten) lighting. It
- generally cools down the colors and corresponds approximately to
- 2500...3500 K color temperature range.
+ generally cools down the colors and corresponds approximately to
+ 2500...3500 K color temperature range.
- .. row 4
- ``V4L2_WHITE_BALANCE_FLUORESCENT``
- White balance preset for fluorescent lighting. It corresponds
- approximately to 4000...5000 K color temperature.
+ approximately to 4000...5000 K color temperature.
- .. row 5
- ``V4L2_WHITE_BALANCE_FLUORESCENT_H``
- With this setting the camera will compensate for fluorescent H
- lighting.
+ lighting.
- .. row 6
- ``V4L2_WHITE_BALANCE_HORIZON``
- White balance setting for horizon daylight. It corresponds
- approximately to 5000 K color temperature.
+ approximately to 5000 K color temperature.
- .. row 7
- ``V4L2_WHITE_BALANCE_DAYLIGHT``
- White balance preset for daylight (with clear sky). It corresponds
- approximately to 5000...6500 K color temperature.
+ approximately to 5000...6500 K color temperature.
- .. row 8
- ``V4L2_WHITE_BALANCE_FLASH``
- With this setting the camera will compensate for the flash light.
- It slightly warms up the colors and corresponds roughly to
- 5000...5500 K color temperature.
+ It slightly warms up the colors and corresponds roughly to
+ 5000...5500 K color temperature.
- .. row 9
- ``V4L2_WHITE_BALANCE_CLOUDY``
- White balance preset for moderately overcast sky. This option
- corresponds approximately to 6500...8000 K color temperature
- range.
+ corresponds approximately to 6500...8000 K color temperature
+ range.
- .. row 10
- ``V4L2_WHITE_BALANCE_SHADE``
- White balance preset for shade or heavily overcast sky. It
- corresponds approximately to 9000...10000 K color temperature.
+ corresponds approximately to 9000...10000 K color temperature.
@@ -3256,115 +3256,115 @@ Camera Control IDs
- ``V4L2_SCENE_MODE_BACKLIGHT``
- Backlight. Compensates for dark shadows when light is coming from
- behind a subject, also by automatically turning on the flash.
+ behind a subject, also by automatically turning on the flash.
- .. row 3
- ``V4L2_SCENE_MODE_BEACH_SNOW``
- Beach and snow. This mode compensates for all-white or bright
- scenes, which tend to look gray and low contrast, when camera's
- automatic exposure is based on an average scene brightness. To
- compensate, this mode automatically slightly overexposes the
- frames. The white balance may also be adjusted to compensate for
- the fact that reflected snow looks bluish rather than white.
+ scenes, which tend to look gray and low contrast, when camera's
+ automatic exposure is based on an average scene brightness. To
+ compensate, this mode automatically slightly overexposes the
+ frames. The white balance may also be adjusted to compensate for
+ the fact that reflected snow looks bluish rather than white.
- .. row 4
- ``V4L2_SCENE_MODE_CANDLELIGHT``
- Candle light. The camera generally raises the ISO sensitivity and
- lowers the shutter speed. This mode compensates for relatively
- close subject in the scene. The flash is disabled in order to
- preserve the ambiance of the light.
+ lowers the shutter speed. This mode compensates for relatively
+ close subject in the scene. The flash is disabled in order to
+ preserve the ambiance of the light.
- .. row 5
- ``V4L2_SCENE_MODE_DAWN_DUSK``
- Dawn and dusk. Preserves the colors seen in low natural light
- before dusk and after down. The camera may turn off the flash, and
- automatically focus at infinity. It will usually boost saturation
- and lower the shutter speed.
+ before dusk and after down. The camera may turn off the flash, and
+ automatically focus at infinity. It will usually boost saturation
+ and lower the shutter speed.
- .. row 6
- ``V4L2_SCENE_MODE_FALL_COLORS``
- Fall colors. Increases saturation and adjusts white balance for
- color enhancement. Pictures of autumn leaves get saturated reds
- and yellows.
+ color enhancement. Pictures of autumn leaves get saturated reds
+ and yellows.
- .. row 7
- ``V4L2_SCENE_MODE_FIREWORKS``
- Fireworks. Long exposure times are used to capture the expanding
- burst of light from a firework. The camera may invoke image
- stabilization.
+ burst of light from a firework. The camera may invoke image
+ stabilization.
- .. row 8
- ``V4L2_SCENE_MODE_LANDSCAPE``
- Landscape. The camera may choose a small aperture to provide deep
- depth of field and long exposure duration to help capture detail
- in dim light conditions. The focus is fixed at infinity. Suitable
- for distant and wide scenery.
+ depth of field and long exposure duration to help capture detail
+ in dim light conditions. The focus is fixed at infinity. Suitable
+ for distant and wide scenery.
- .. row 9
- ``V4L2_SCENE_MODE_NIGHT``
- Night, also known as Night Landscape. Designed for low light
- conditions, it preserves detail in the dark areas without blowing
- out bright objects. The camera generally sets itself to a
- medium-to-high ISO sensitivity, with a relatively long exposure
- time, and turns flash off. As such, there will be increased image
- noise and the possibility of blurred image.
+ conditions, it preserves detail in the dark areas without blowing
+ out bright objects. The camera generally sets itself to a
+ medium-to-high ISO sensitivity, with a relatively long exposure
+ time, and turns flash off. As such, there will be increased image
+ noise and the possibility of blurred image.
- .. row 10
- ``V4L2_SCENE_MODE_PARTY_INDOOR``
- Party and indoor. Designed to capture indoor scenes that are lit
- by indoor background lighting as well as the flash. The camera
- usually increases ISO sensitivity, and adjusts exposure for the
- low light conditions.
+ by indoor background lighting as well as the flash. The camera
+ usually increases ISO sensitivity, and adjusts exposure for the
+ low light conditions.
- .. row 11
- ``V4L2_SCENE_MODE_PORTRAIT``
- Portrait. The camera adjusts the aperture so that the depth of
- field is reduced, which helps to isolate the subject against a
- smooth background. Most cameras recognize the presence of faces in
- the scene and focus on them. The color hue is adjusted to enhance
- skin tones. The intensity of the flash is often reduced.
+ field is reduced, which helps to isolate the subject against a
+ smooth background. Most cameras recognize the presence of faces in
+ the scene and focus on them. The color hue is adjusted to enhance
+ skin tones. The intensity of the flash is often reduced.
- .. row 12
- ``V4L2_SCENE_MODE_SPORTS``
- Sports. Significantly increases ISO and uses a fast shutter speed
- to freeze motion of rapidly-moving subjects. Increased image noise
- may be seen in this mode.
+ to freeze motion of rapidly-moving subjects. Increased image noise
+ may be seen in this mode.
- .. row 13
- ``V4L2_SCENE_MODE_SUNSET``
- Sunset. Preserves deep hues seen in sunsets and sunrises. It bumps
- up the saturation.
+ up the saturation.
- .. row 14
- ``V4L2_SCENE_MODE_TEXT``
- Text. It applies extra contrast and sharpness, it is typically a
- black-and-white mode optimized for readability. Automatic focus
- may be switched to close-up mode and this setting may also involve
- some lens-distortion correction.
+ black-and-white mode optimized for readability. Automatic focus
+ may be switched to close-up mode and this setting may also involve
+ some lens-distortion correction.
@@ -3715,15 +3715,15 @@ Flash Control IDs
- ``V4L2_FLASH_STROBE_SOURCE_SOFTWARE``
- The flash strobe is triggered by using the
- V4L2_CID_FLASH_STROBE control.
+ V4L2_CID_FLASH_STROBE control.
- .. row 2
- ``V4L2_FLASH_STROBE_SOURCE_EXTERNAL``
- The flash strobe is triggered by an external source. Typically
- this is a sensor, which makes it possible to synchronises the
- flash strobe start to exposure start.
+ this is a sensor, which makes it possible to synchronises the
+ flash strobe start to exposure start.
@@ -3782,15 +3782,15 @@ Flash Control IDs
- ``V4L2_FLASH_FAULT_OVER_VOLTAGE``
- Flash controller voltage to the flash LED has exceeded the limit
- specific to the flash controller.
+ specific to the flash controller.
- .. row 2
- ``V4L2_FLASH_FAULT_TIMEOUT``
- The flash strobe was still on when the timeout set by the user ---
- V4L2_CID_FLASH_TIMEOUT control --- has expired. Not all flash
- controllers may set this in all such conditions.
+ V4L2_CID_FLASH_TIMEOUT control --- has expired. Not all flash
+ controllers may set this in all such conditions.
- .. row 3
@@ -3803,36 +3803,36 @@ Flash Control IDs
- ``V4L2_FLASH_FAULT_SHORT_CIRCUIT``
- The short circuit protection of the flash controller has been
- triggered.
+ triggered.
- .. row 5
- ``V4L2_FLASH_FAULT_OVER_CURRENT``
- Current in the LED power supply has exceeded the limit specific to
- the flash controller.
+ the flash controller.
- .. row 6
- ``V4L2_FLASH_FAULT_INDICATOR``
- The flash controller has detected a short or open circuit
- condition on the indicator LED.
+ condition on the indicator LED.
- .. row 7
- ``V4L2_FLASH_FAULT_UNDER_VOLTAGE``
- Flash controller voltage to the flash LED has been below the
- minimum limit specific to the flash controller.
+ minimum limit specific to the flash controller.
- .. row 8
- ``V4L2_FLASH_FAULT_INPUT_VOLTAGE``
- The input voltage of the flash controller is below the limit under
- which strobing the flash at full current will not be possible.The
- condition persists until this flag is no longer set.
+ which strobing the flash at full current will not be possible.The
+ condition persists until this flag is no longer set.
- .. row 9
@@ -4193,15 +4193,15 @@ Digital Video Control IDs
- ``V4L2_DV_IT_CONTENT_TYPE_GRAPHICS``
- Graphics content. Pixel data should be passed unfiltered and
- without analog reconstruction.
+ without analog reconstruction.
- .. row 2
- ``V4L2_DV_IT_CONTENT_TYPE_PHOTO``
- Photo content. The content is derived from digital still pictures.
- The content should be passed through with minimal scaling and
- picture enhancements.
+ The content should be passed through with minimal scaling and
+ picture enhancements.
- .. row 3
@@ -4220,7 +4220,7 @@ Digital Video Control IDs
- ``V4L2_DV_IT_CONTENT_TYPE_NO_ITC``
- No IT Content information is available and the ITC bit in the AVI
- InfoFrame is set to 0.
+ InfoFrame is set to 0.
@@ -4399,19 +4399,19 @@ Detect Control IDs
- ``V4L2_DETECT_MD_MODE_THRESHOLD_GRID``
- The image is divided into a grid, each cell with its own motion
- detection threshold. These thresholds are set through the
- ``V4L2_CID_DETECT_MD_THRESHOLD_GRID`` matrix control.
+ detection threshold. These thresholds are set through the
+ ``V4L2_CID_DETECT_MD_THRESHOLD_GRID`` matrix control.
- .. row 4
- ``V4L2_DETECT_MD_MODE_REGION_GRID``
- The image is divided into a grid, each cell with its own region
- value that specifies which per-region motion detection thresholds
- should be used. Each region has its own thresholds. How these
- per-region thresholds are set up is driver-specific. The region
- values for the grid are set through the
- ``V4L2_CID_DETECT_MD_REGION_GRID`` matrix control.
+ value that specifies which per-region motion detection thresholds
+ should be used. Each region has its own thresholds. How these
+ per-region thresholds are set up is driver-specific. The region
+ values for the grid are set through the
+ ``V4L2_CID_DETECT_MD_REGION_GRID`` matrix control.
diff --git a/Documentation/linux_tv/media/v4l/field-order.rst b/Documentation/linux_tv/media/v4l/field-order.rst
index b9503e230fd9..d4e801cdae1a 100644
--- a/Documentation/linux_tv/media/v4l/field-order.rst
+++ b/Documentation/linux_tv/media/v4l/field-order.rst
@@ -67,16 +67,16 @@ should have the value ``V4L2_FIELD_ANY`` (0).
- 0
- Applications request this field order when any one of the
- ``V4L2_FIELD_NONE``, ``V4L2_FIELD_TOP``, ``V4L2_FIELD_BOTTOM``, or
- ``V4L2_FIELD_INTERLACED`` formats is acceptable. Drivers choose
- depending on hardware capabilities or e. g. the requested image
- size, and return the actual field order. Drivers must never return
- ``V4L2_FIELD_ANY``. If multiple field orders are possible the
- driver must choose one of the possible field orders during
- :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` or
- :ref:`VIDIOC_TRY_FMT <VIDIOC_G_FMT>`. struct
- :ref:`v4l2_buffer <v4l2-buffer>` ``field`` can never be
- ``V4L2_FIELD_ANY``.
+ ``V4L2_FIELD_NONE``, ``V4L2_FIELD_TOP``, ``V4L2_FIELD_BOTTOM``, or
+ ``V4L2_FIELD_INTERLACED`` formats is acceptable. Drivers choose
+ depending on hardware capabilities or e. g. the requested image
+ size, and return the actual field order. Drivers must never return
+ ``V4L2_FIELD_ANY``. If multiple field orders are possible the
+ driver must choose one of the possible field orders during
+ :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` or
+ :ref:`VIDIOC_TRY_FMT <VIDIOC_G_FMT>`. struct
+ :ref:`v4l2_buffer <v4l2-buffer>` ``field`` can never be
+ ``V4L2_FIELD_ANY``.
- .. row 2
@@ -85,8 +85,8 @@ should have the value ``V4L2_FIELD_ANY`` (0).
- 1
- Images are in progressive format, not interlaced. The driver may
- also indicate this order when it cannot distinguish between
- ``V4L2_FIELD_TOP`` and ``V4L2_FIELD_BOTTOM``.
+ also indicate this order when it cannot distinguish between
+ ``V4L2_FIELD_TOP`` and ``V4L2_FIELD_BOTTOM``.
- .. row 3
@@ -103,9 +103,9 @@ should have the value ``V4L2_FIELD_ANY`` (0).
- 3
- Images consist of the bottom (aka even) field only. Applications
- may wish to prevent a device from capturing interlaced images
- because they will have "comb" or "feathering" artefacts around
- moving objects.
+ may wish to prevent a device from capturing interlaced images
+ because they will have "comb" or "feathering" artefacts around
+ moving objects.
- .. row 5
@@ -114,10 +114,10 @@ should have the value ``V4L2_FIELD_ANY`` (0).
- 4
- Images contain both fields, interleaved line by line. The temporal
- order of the fields (whether the top or bottom field is first
- transmitted) depends on the current video standard. M/NTSC
- transmits the bottom field first, all other standards the top
- field first.
+ order of the fields (whether the top or bottom field is first
+ transmitted) depends on the current video standard. M/NTSC
+ transmits the bottom field first, all other standards the top
+ field first.
- .. row 6
@@ -126,9 +126,9 @@ should have the value ``V4L2_FIELD_ANY`` (0).
- 5
- Images contain both fields, the top field lines are stored first
- in memory, immediately followed by the bottom field lines. Fields
- are always stored in temporal order, the older one first in
- memory. Image sizes refer to the frame, not fields.
+ in memory, immediately followed by the bottom field lines. Fields
+ are always stored in temporal order, the older one first in
+ memory. Image sizes refer to the frame, not fields.
- .. row 7
@@ -137,9 +137,9 @@ should have the value ``V4L2_FIELD_ANY`` (0).
- 6
- Images contain both fields, the bottom field lines are stored
- first in memory, immediately followed by the top field lines.
- Fields are always stored in temporal order, the older one first in
- memory. Image sizes refer to the frame, not fields.
+ first in memory, immediately followed by the top field lines.
+ Fields are always stored in temporal order, the older one first in
+ memory. Image sizes refer to the frame, not fields.
- .. row 8
@@ -148,18 +148,18 @@ should have the value ``V4L2_FIELD_ANY`` (0).
- 7
- The two fields of a frame are passed in separate buffers, in
- temporal order, i. e. the older one first. To indicate the field
- parity (whether the current field is a top or bottom field) the
- driver or application, depending on data direction, must set
- struct :ref:`v4l2_buffer <v4l2-buffer>` ``field`` to
- ``V4L2_FIELD_TOP`` or ``V4L2_FIELD_BOTTOM``. Any two successive
- fields pair to build a frame. If fields are successive, without
- any dropped fields between them (fields can drop individually),
- can be determined from the struct
- :ref:`v4l2_buffer <v4l2-buffer>` ``sequence`` field. This
- format cannot be selected when using the read/write I/O method
- since there is no way to communicate if a field was a top or
- bottom field.
+ temporal order, i. e. the older one first. To indicate the field
+ parity (whether the current field is a top or bottom field) the
+ driver or application, depending on data direction, must set
+ struct :ref:`v4l2_buffer <v4l2-buffer>` ``field`` to
+ ``V4L2_FIELD_TOP`` or ``V4L2_FIELD_BOTTOM``. Any two successive
+ fields pair to build a frame. If fields are successive, without
+ any dropped fields between them (fields can drop individually),
+ can be determined from the struct
+ :ref:`v4l2_buffer <v4l2-buffer>` ``sequence`` field. This
+ format cannot be selected when using the read/write I/O method
+ since there is no way to communicate if a field was a top or
+ bottom field.
- .. row 9
@@ -168,7 +168,7 @@ should have the value ``V4L2_FIELD_ANY`` (0).
- 8
- Images contain both fields, interleaved line by line, top field
- first. The top field is transmitted first.
+ first. The top field is transmitted first.
- .. row 10
@@ -177,7 +177,7 @@ should have the value ``V4L2_FIELD_ANY`` (0).
- 9
- Images contain both fields, interleaved line by line, top field
- first. The bottom field is transmitted first.
+ first. The bottom field is transmitted first.
diff --git a/Documentation/linux_tv/media/v4l/hist-v4l2.rst b/Documentation/linux_tv/media/v4l/hist-v4l2.rst
index 88f813ad38c6..7dac98c5dc95 100644
--- a/Documentation/linux_tv/media/v4l/hist-v4l2.rst
+++ b/Documentation/linux_tv/media/v4l/hist-v4l2.rst
@@ -444,93 +444,93 @@ This unnamed version was finally merged into Linux 2.5.46.
.. flat-table::
- :header-rows: 1
- :stub-columns: 0
+ :header-rows: 1
+ :stub-columns: 0
- - .. row 1
+ - .. row 1
- - Old defines
+ - Old defines
- - enum :ref:`v4l2_buf_type <v4l2-buf-type>`
+ - enum :ref:`v4l2_buf_type <v4l2-buf-type>`
- - .. row 2
+ - .. row 2
- - ``V4L2_BUF_TYPE_CAPTURE``
+ - ``V4L2_BUF_TYPE_CAPTURE``
- - ``V4L2_BUF_TYPE_VIDEO_CAPTURE``
+ - ``V4L2_BUF_TYPE_VIDEO_CAPTURE``
- - .. row 3
+ - .. row 3
- - ``V4L2_BUF_TYPE_CODECIN``
+ - ``V4L2_BUF_TYPE_CODECIN``
- - Omitted for now
+ - Omitted for now
- - .. row 4
+ - .. row 4
- - ``V4L2_BUF_TYPE_CODECOUT``
+ - ``V4L2_BUF_TYPE_CODECOUT``
- - Omitted for now
+ - Omitted for now
- - .. row 5
+ - .. row 5
- - ``V4L2_BUF_TYPE_EFFECTSIN``
+ - ``V4L2_BUF_TYPE_EFFECTSIN``
- - Omitted for now
+ - Omitted for now
- - .. row 6
+ - .. row 6
- - ``V4L2_BUF_TYPE_EFFECTSIN2``
+ - ``V4L2_BUF_TYPE_EFFECTSIN2``
- - Omitted for now
+ - Omitted for now
- - .. row 7
+ - .. row 7
- - ``V4L2_BUF_TYPE_EFFECTSOUT``
+ - ``V4L2_BUF_TYPE_EFFECTSOUT``
- - Omitted for now
+ - Omitted for now
- - .. row 8
+ - .. row 8
- - ``V4L2_BUF_TYPE_VIDEOOUT``
+ - ``V4L2_BUF_TYPE_VIDEOOUT``
- - ``V4L2_BUF_TYPE_VIDEO_OUTPUT``
+ - ``V4L2_BUF_TYPE_VIDEO_OUTPUT``
- - .. row 9
+ - .. row 9
- - ``-``
+ - ``-``
- - ``V4L2_BUF_TYPE_VIDEO_OVERLAY``
+ - ``V4L2_BUF_TYPE_VIDEO_OVERLAY``
- - .. row 10
+ - .. row 10
- - ``-``
+ - ``-``
- - ``V4L2_BUF_TYPE_VBI_CAPTURE``
+ - ``V4L2_BUF_TYPE_VBI_CAPTURE``
- - .. row 11
+ - .. row 11
- - ``-``
+ - ``-``
- - ``V4L2_BUF_TYPE_VBI_OUTPUT``
+ - ``V4L2_BUF_TYPE_VBI_OUTPUT``
- - .. row 12
+ - .. row 12
- - ``-``
+ - ``-``
- - ``V4L2_BUF_TYPE_SLICED_VBI_CAPTURE``
+ - ``V4L2_BUF_TYPE_SLICED_VBI_CAPTURE``
- - .. row 13
+ - .. row 13
- - ``-``
+ - ``-``
- - ``V4L2_BUF_TYPE_SLICED_VBI_OUTPUT``
+ - ``V4L2_BUF_TYPE_SLICED_VBI_OUTPUT``
- - .. row 14
+ - .. row 14
- - ``V4L2_BUF_TYPE_PRIVATE_BASE``
+ - ``V4L2_BUF_TYPE_PRIVATE_BASE``
- - ``V4L2_BUF_TYPE_PRIVATE`` (but this is deprecated)
+ - ``V4L2_BUF_TYPE_PRIVATE`` (but this is deprecated)
10. In struct :ref:`v4l2_fmtdesc <v4l2-fmtdesc>` a enum
@@ -561,57 +561,57 @@ This unnamed version was finally merged into Linux 2.5.46.
.. flat-table::
- :header-rows: 1
- :stub-columns: 0
+ :header-rows: 1
+ :stub-columns: 0
- - .. row 1
+ - .. row 1
- - Old flag
+ - Old flag
- - enum :ref:`v4l2_field <v4l2-field>`
+ - enum :ref:`v4l2_field <v4l2-field>`
- - .. row 2
+ - .. row 2
- - ``V4L2_FMT_FLAG_NOT_INTERLACED``
+ - ``V4L2_FMT_FLAG_NOT_INTERLACED``
- - ?
+ - ?
- - .. row 3
+ - .. row 3
- - ``V4L2_FMT_FLAG_INTERLACED`` = ``V4L2_FMT_FLAG_COMBINED``
+ - ``V4L2_FMT_FLAG_INTERLACED`` = ``V4L2_FMT_FLAG_COMBINED``
- - ``V4L2_FIELD_INTERLACED``
+ - ``V4L2_FIELD_INTERLACED``
- - .. row 4
+ - .. row 4
- - ``V4L2_FMT_FLAG_TOPFIELD`` = ``V4L2_FMT_FLAG_ODDFIELD``
+ - ``V4L2_FMT_FLAG_TOPFIELD`` = ``V4L2_FMT_FLAG_ODDFIELD``
- - ``V4L2_FIELD_TOP``
+ - ``V4L2_FIELD_TOP``
- - .. row 5
+ - .. row 5
- - ``V4L2_FMT_FLAG_BOTFIELD`` = ``V4L2_FMT_FLAG_EVENFIELD``
+ - ``V4L2_FMT_FLAG_BOTFIELD`` = ``V4L2_FMT_FLAG_EVENFIELD``
- - ``V4L2_FIELD_BOTTOM``
+ - ``V4L2_FIELD_BOTTOM``
- - .. row 6
+ - .. row 6
- - ``-``
+ - ``-``
- - ``V4L2_FIELD_SEQ_TB``
+ - ``V4L2_FIELD_SEQ_TB``
- - .. row 7
+ - .. row 7
- - ``-``
+ - ``-``
- - ``V4L2_FIELD_SEQ_BT``
+ - ``V4L2_FIELD_SEQ_BT``
- - .. row 8
+ - .. row 8
- - ``-``
+ - ``-``
- - ``V4L2_FIELD_ALTERNATE``
+ - ``V4L2_FIELD_ALTERNATE``
The color space flags were replaced by a enum
@@ -771,43 +771,43 @@ V4L2 2003-11-05
- .. row 1
- - Symbol
+ - Symbol
- - In this document prior to revision 0.5
+ - In this document prior to revision 0.5
- - Corrected
+ - Corrected
- .. row 2
- - ``V4L2_PIX_FMT_RGB24``
+ - ``V4L2_PIX_FMT_RGB24``
- - B, G, R
+ - B, G, R
- - R, G, B
+ - R, G, B
- .. row 3
- - ``V4L2_PIX_FMT_BGR24``
+ - ``V4L2_PIX_FMT_BGR24``
- - R, G, B
+ - R, G, B
- - B, G, R
+ - B, G, R
- .. row 4
- - ``V4L2_PIX_FMT_RGB32``
+ - ``V4L2_PIX_FMT_RGB32``
- - B, G, R, X
+ - B, G, R, X
- - R, G, B, X
+ - R, G, B, X
- .. row 5
- - ``V4L2_PIX_FMT_BGR32``
+ - ``V4L2_PIX_FMT_BGR32``
- - R, G, B, X
+ - R, G, B, X
- - B, G, R, X
+ - B, G, R, X
The ``V4L2_PIX_FMT_BGR24`` example was always correct.
@@ -1411,7 +1411,7 @@ lines:
::
Section "Module"
- Load "v4l"
+ Load "v4l"
EndSection
As of XFree86 4.2 this driver still supports only V4L ioctls, however it
diff --git a/Documentation/linux_tv/media/v4l/pixfmt-002.rst b/Documentation/linux_tv/media/v4l/pixfmt-002.rst
index 1645d07eeedb..fae9b2d40a85 100644
--- a/Documentation/linux_tv/media/v4l/pixfmt-002.rst
+++ b/Documentation/linux_tv/media/v4l/pixfmt-002.rst
@@ -28,20 +28,20 @@ Single-planar format structure
- ``height``
- Image height in pixels. If ``field`` is one of ``V4L2_FIELD_TOP``,
- ``V4L2_FIELD_BOTTOM`` or ``V4L2_FIELD_ALTERNATE`` then height
- refers to the number of lines in the field, otherwise it refers to
- the number of lines in the frame (which is twice the field height
- for interlaced formats).
+ ``V4L2_FIELD_BOTTOM`` or ``V4L2_FIELD_ALTERNATE`` then height
+ refers to the number of lines in the field, otherwise it refers to
+ the number of lines in the frame (which is twice the field height
+ for interlaced formats).
- .. row 3
- :cspan:`2` Applications set these fields to request an image
- size, drivers return the closest possible values. In case of
- planar formats the ``width`` and ``height`` applies to the largest
- plane. To avoid ambiguities drivers must return values rounded up
- to a multiple of the scale factor of any smaller planes. For
- example when the image format is YUV 4:2:0, ``width`` and
- ``height`` must be multiples of two.
+ size, drivers return the closest possible values. In case of
+ planar formats the ``width`` and ``height`` applies to the largest
+ plane. To avoid ambiguities drivers must return values rounded up
+ to a multiple of the scale factor of any smaller planes. For
+ example when the image format is YUV 4:2:0, ``width`` and
+ ``height`` must be multiples of two.
- .. row 4
@@ -50,11 +50,11 @@ Single-planar format structure
- ``pixelformat``
- The pixel format or type of compression, set by the application.
- This is a little endian
- :ref:`four character code <v4l2-fourcc>`. V4L2 defines standard
- RGB formats in :ref:`rgb-formats`, YUV formats in
- :ref:`yuv-formats`, and reserved codes in
- :ref:`reserved-formats`
+ This is a little endian
+ :ref:`four character code <v4l2-fourcc>`. V4L2 defines standard
+ RGB formats in :ref:`rgb-formats`, YUV formats in
+ :ref:`yuv-formats`, and reserved codes in
+ :ref:`reserved-formats`
- .. row 5
@@ -63,10 +63,10 @@ Single-planar format structure
- ``field``
- Video images are typically interlaced. Applications can request to
- capture or output only the top or bottom field, or both fields
- interlaced or sequentially stored in one buffer or alternating in
- separate buffers. Drivers return the actual field order selected.
- For more details on fields see :ref:`field-order`.
+ capture or output only the top or bottom field, or both fields
+ interlaced or sequentially stored in one buffer or alternating in
+ separate buffers. Drivers return the actual field order selected.
+ For more details on fields see :ref:`field-order`.
- .. row 6
@@ -75,35 +75,35 @@ Single-planar format structure
- ``bytesperline``
- Distance in bytes between the leftmost pixels in two adjacent
- lines.
+ lines.
- .. row 7
- :cspan:`2`
- Both applications and drivers can set this field to request
- padding bytes at the end of each line. Drivers however may ignore
- the value requested by the application, returning ``width`` times
- bytes per pixel or a larger value required by the hardware. That
- implies applications can just set this field to zero to get a
- reasonable default.
-
- Video hardware may access padding bytes, therefore they must
- reside in accessible memory. Consider cases where padding bytes
- after the last line of an image cross a system page boundary.
- Input devices may write padding bytes, the value is undefined.
- Output devices ignore the contents of padding bytes.
-
- When the image format is planar the ``bytesperline`` value applies
- to the first plane and is divided by the same factor as the
- ``width`` field for the other planes. For example the Cb and Cr
- planes of a YUV 4:2:0 image have half as many padding bytes
- following each line as the Y plane. To avoid ambiguities drivers
- must return a ``bytesperline`` value rounded up to a multiple of
- the scale factor.
-
- For compressed formats the ``bytesperline`` value makes no sense.
- Applications and drivers must set this to 0 in that case.
+ Both applications and drivers can set this field to request
+ padding bytes at the end of each line. Drivers however may ignore
+ the value requested by the application, returning ``width`` times
+ bytes per pixel or a larger value required by the hardware. That
+ implies applications can just set this field to zero to get a
+ reasonable default.
+
+ Video hardware may access padding bytes, therefore they must
+ reside in accessible memory. Consider cases where padding bytes
+ after the last line of an image cross a system page boundary.
+ Input devices may write padding bytes, the value is undefined.
+ Output devices ignore the contents of padding bytes.
+
+ When the image format is planar the ``bytesperline`` value applies
+ to the first plane and is divided by the same factor as the
+ ``width`` field for the other planes. For example the Cb and Cr
+ planes of a YUV 4:2:0 image have half as many padding bytes
+ following each line as the Y plane. To avoid ambiguities drivers
+ must return a ``bytesperline`` value rounded up to a multiple of
+ the scale factor.
+
+ For compressed formats the ``bytesperline`` value makes no sense.
+ Applications and drivers must set this to 0 in that case.
- .. row 8
@@ -112,9 +112,9 @@ Single-planar format structure
- ``sizeimage``
- Size in bytes of the buffer to hold a complete image, set by the
- driver. Usually this is ``bytesperline`` times ``height``. When
- the image consists of variable length compressed data this is the
- maximum number of bytes required to hold an image.
+ driver. Usually this is ``bytesperline`` times ``height``. When
+ the image consists of variable length compressed data this is the
+ maximum number of bytes required to hold an image.
- .. row 9
@@ -123,8 +123,8 @@ Single-planar format structure
- ``colorspace``
- This information supplements the ``pixelformat`` and must be set
- by the driver for capture streams and by the application for
- output streams, see :ref:`colorspaces`.
+ by the driver for capture streams and by the application for
+ output streams, see :ref:`colorspaces`.
- .. row 10
@@ -133,29 +133,29 @@ Single-planar format structure
- ``priv``
- This field indicates whether the remaining fields of the
- :ref:`struct v4l2_pix_format <v4l2-pix-format>` structure, also called the
- extended fields, are valid. When set to
- ``V4L2_PIX_FMT_PRIV_MAGIC``, it indicates that the extended fields
- have been correctly initialized. When set to any other value it
- indicates that the extended fields contain undefined values.
-
- Applications that wish to use the pixel format extended fields
- must first ensure that the feature is supported by querying the
- device for the :ref:`V4L2_CAP_EXT_PIX_FORMAT <querycap>`
- capability. If the capability isn't set the pixel format extended
- fields are not supported and using the extended fields will lead
- to undefined results.
-
- To use the extended fields, applications must set the ``priv``
- field to ``V4L2_PIX_FMT_PRIV_MAGIC``, initialize all the extended
- fields and zero the unused bytes of the
- :ref:`struct v4l2_format <v4l2-format>` ``raw_data`` field.
-
- When the ``priv`` field isn't set to ``V4L2_PIX_FMT_PRIV_MAGIC``
- drivers must act as if all the extended fields were set to zero.
- On return drivers must set the ``priv`` field to
- ``V4L2_PIX_FMT_PRIV_MAGIC`` and all the extended fields to
- applicable values.
+ :ref:`struct v4l2_pix_format <v4l2-pix-format>` structure, also called the
+ extended fields, are valid. When set to
+ ``V4L2_PIX_FMT_PRIV_MAGIC``, it indicates that the extended fields
+ have been correctly initialized. When set to any other value it
+ indicates that the extended fields contain undefined values.
+
+ Applications that wish to use the pixel format extended fields
+ must first ensure that the feature is supported by querying the
+ device for the :ref:`V4L2_CAP_EXT_PIX_FORMAT <querycap>`
+ capability. If the capability isn't set the pixel format extended
+ fields are not supported and using the extended fields will lead
+ to undefined results.
+
+ To use the extended fields, applications must set the ``priv``
+ field to ``V4L2_PIX_FMT_PRIV_MAGIC``, initialize all the extended
+ fields and zero the unused bytes of the
+ :ref:`struct v4l2_format <v4l2-format>` ``raw_data`` field.
+
+ When the ``priv`` field isn't set to ``V4L2_PIX_FMT_PRIV_MAGIC``
+ drivers must act as if all the extended fields were set to zero.
+ On return drivers must set the ``priv`` field to
+ ``V4L2_PIX_FMT_PRIV_MAGIC`` and all the extended fields to
+ applicable values.
- .. row 11
@@ -172,8 +172,8 @@ Single-planar format structure
- ``ycbcr_enc``
- This information supplements the ``colorspace`` and must be set by
- the driver for capture streams and by the application for output
- streams, see :ref:`colorspaces`.
+ the driver for capture streams and by the application for output
+ streams, see :ref:`colorspaces`.
- .. row 13
@@ -182,8 +182,8 @@ Single-planar format structure
- ``quantization``
- This information supplements the ``colorspace`` and must be set by
- the driver for capture streams and by the application for output
- streams, see :ref:`colorspaces`.
+ the driver for capture streams and by the application for output
+ streams, see :ref:`colorspaces`.
- .. row 14
@@ -192,5 +192,5 @@ Single-planar format structure
- ``xfer_func``
- This information supplements the ``colorspace`` and must be set by
- the driver for capture streams and by the application for output
- streams, see :ref:`colorspaces`.
+ the driver for capture streams and by the application for output
+ streams, see :ref:`colorspaces`.
diff --git a/Documentation/linux_tv/media/v4l/pixfmt-003.rst b/Documentation/linux_tv/media/v4l/pixfmt-003.rst
index 5abbfdf23289..25c54872fbe1 100644
--- a/Documentation/linux_tv/media/v4l/pixfmt-003.rst
+++ b/Documentation/linux_tv/media/v4l/pixfmt-003.rst
@@ -35,7 +35,7 @@ describing all planes of that format.
- ``bytesperline``
- Distance in bytes between the leftmost pixels in two adjacent
- lines. See struct :ref:`v4l2_pix_format <v4l2-pix-format>`.
+ lines. See struct :ref:`v4l2_pix_format <v4l2-pix-format>`.
- .. row 3
@@ -44,7 +44,7 @@ describing all planes of that format.
- ``reserved[6]``
- Reserved for future extensions. Should be zeroed by drivers and
- applications.
+ applications.
@@ -63,7 +63,7 @@ describing all planes of that format.
- ``width``
- Image width in pixels. See struct
- :ref:`v4l2_pix_format <v4l2-pix-format>`.
+ :ref:`v4l2_pix_format <v4l2-pix-format>`.
- .. row 2
@@ -72,7 +72,7 @@ describing all planes of that format.
- ``height``
- Image height in pixels. See struct
- :ref:`v4l2_pix_format <v4l2-pix-format>`.
+ :ref:`v4l2_pix_format <v4l2-pix-format>`.
- .. row 3
@@ -81,7 +81,7 @@ describing all planes of that format.
- ``pixelformat``
- The pixel format. Both single- and multi-planar four character
- codes can be used.
+ codes can be used.
- .. row 4
@@ -106,8 +106,8 @@ describing all planes of that format.
- ``plane_fmt[VIDEO_MAX_PLANES]``
- An array of structures describing format of each plane this pixel
- format consists of. The number of valid entries in this array has
- to be put in the ``num_planes`` field.
+ format consists of. The number of valid entries in this array has
+ to be put in the ``num_planes`` field.
- .. row 7
@@ -116,7 +116,7 @@ describing all planes of that format.
- ``num_planes``
- Number of planes (i.e. separate memory buffers) for this format
- and the number of valid entries in the ``plane_fmt`` array.
+ and the number of valid entries in the ``plane_fmt`` array.
- .. row 8
@@ -133,8 +133,8 @@ describing all planes of that format.
- ``ycbcr_enc``
- This information supplements the ``colorspace`` and must be set by
- the driver for capture streams and by the application for output
- streams, see :ref:`colorspaces`.
+ the driver for capture streams and by the application for output
+ streams, see :ref:`colorspaces`.
- .. row 10
@@ -143,8 +143,8 @@ describing all planes of that format.
- ``quantization``
- This information supplements the ``colorspace`` and must be set by
- the driver for capture streams and by the application for output
- streams, see :ref:`colorspaces`.
+ the driver for capture streams and by the application for output
+ streams, see :ref:`colorspaces`.
- .. row 11
@@ -153,8 +153,8 @@ describing all planes of that format.
- ``xfer_func``
- This information supplements the ``colorspace`` and must be set by
- the driver for capture streams and by the application for output
- streams, see :ref:`colorspaces`.
+ the driver for capture streams and by the application for output
+ streams, see :ref:`colorspaces`.
- .. row 12
@@ -163,4 +163,4 @@ describing all planes of that format.
- ``reserved[7]``
- Reserved for future extensions. Should be zeroed by drivers and
- applications.
+ applications.
diff --git a/Documentation/linux_tv/media/v4l/pixfmt-006.rst b/Documentation/linux_tv/media/v4l/pixfmt-006.rst
index 19e6a85b3400..b9e7c6844020 100644
--- a/Documentation/linux_tv/media/v4l/pixfmt-006.rst
+++ b/Documentation/linux_tv/media/v4l/pixfmt-006.rst
@@ -40,7 +40,7 @@ R'G'B' quantization.
- ``V4L2_COLORSPACE_DEFAULT``
- The default colorspace. This can be used by applications to let
- the driver fill in the colorspace.
+ the driver fill in the colorspace.
- .. row 3
@@ -107,10 +107,10 @@ R'G'B' quantization.
- ``V4L2_COLORSPACE_RAW``
- The raw colorspace. This is used for raw image capture where the
- image is minimally processed and is using the internal colorspace
- of the device. The software that processes an image using this
- 'colorspace' will have to know the internals of the capture
- device.
+ image is minimally processed and is using the internal colorspace
+ of the device. The software that processes an image using this
+ 'colorspace' will have to know the internals of the capture
+ device.
@@ -258,23 +258,23 @@ R'G'B' quantization.
- ``V4L2_QUANTIZATION_DEFAULT``
- Use the default quantization encoding as defined by the
- colorspace. This is always full range for R'G'B' (except for the
- BT.2020 colorspace) and usually limited range for Y'CbCr.
+ colorspace. This is always full range for R'G'B' (except for the
+ BT.2020 colorspace) and usually limited range for Y'CbCr.
- .. row 3
- ``V4L2_QUANTIZATION_FULL_RANGE``
- Use the full range quantization encoding. I.e. the range [0…1] is
- mapped to [0…255] (with possible clipping to [1…254] to avoid the
- 0x00 and 0xff values). Cb and Cr are mapped from [-0.5…0.5] to
- [0…255] (with possible clipping to [1…254] to avoid the 0x00 and
- 0xff values).
+ mapped to [0…255] (with possible clipping to [1…254] to avoid the
+ 0x00 and 0xff values). Cb and Cr are mapped from [-0.5…0.5] to
+ [0…255] (with possible clipping to [1…254] to avoid the 0x00 and
+ 0xff values).
- .. row 4
- ``V4L2_QUANTIZATION_LIM_RANGE``
- Use the limited range quantization encoding. I.e. the range [0…1]
- is mapped to [16…235]. Cb and Cr are mapped from [-0.5…0.5] to
- [16…240].
+ is mapped to [16…235]. Cb and Cr are mapped from [-0.5…0.5] to
+ [16…240].
diff --git a/Documentation/linux_tv/media/v4l/pixfmt-013.rst b/Documentation/linux_tv/media/v4l/pixfmt-013.rst
index 1f27e081a874..eefbd83766eb 100644
--- a/Documentation/linux_tv/media/v4l/pixfmt-013.rst
+++ b/Documentation/linux_tv/media/v4l/pixfmt-013.rst
@@ -28,7 +28,7 @@ Compressed Formats
- 'JPEG'
- TBD. See also :ref:`VIDIOC_G_JPEGCOMP <VIDIOC_G_JPEGCOMP>`,
- :ref:`VIDIOC_S_JPEGCOMP <VIDIOC_G_JPEGCOMP>`.
+ :ref:`VIDIOC_S_JPEGCOMP <VIDIOC_G_JPEGCOMP>`.
- .. _`V4L2-PIX-FMT-MPEG`:
@@ -37,8 +37,8 @@ Compressed Formats
- 'MPEG'
- MPEG multiplexed stream. The actual format is determined by
- extended control ``V4L2_CID_MPEG_STREAM_TYPE``, see
- :ref:`mpeg-control-id`.
+ extended control ``V4L2_CID_MPEG_STREAM_TYPE``, see
+ :ref:`mpeg-control-id`.
- .. _`V4L2-PIX-FMT-H264`:
diff --git a/Documentation/linux_tv/media/v4l/pixfmt-indexed.rst b/Documentation/linux_tv/media/v4l/pixfmt-indexed.rst
index dccf96b3d9c4..71e5fb316768 100644
--- a/Documentation/linux_tv/media/v4l/pixfmt-indexed.rst
+++ b/Documentation/linux_tv/media/v4l/pixfmt-indexed.rst
@@ -24,13 +24,13 @@ the palette, this must be done with ioctls of the Linux framebuffer API.
- Code
- -
+ -
- :cspan:`7` Byte 0
- .. row 2
- -
- -
+ -
+ -
- Bit
- 7
@@ -55,7 +55,7 @@ the palette, this must be done with ioctls of the Linux framebuffer API.
- 'PAL8'
- -
+ -
- i\ :sub:`7`
- i\ :sub:`6`
diff --git a/Documentation/linux_tv/media/v4l/pixfmt-m420.rst b/Documentation/linux_tv/media/v4l/pixfmt-m420.rst
index 2f1f447fbe0a..4c5b2969c039 100644
--- a/Documentation/linux_tv/media/v4l/pixfmt-m420.rst
+++ b/Documentation/linux_tv/media/v4l/pixfmt-m420.rst
@@ -123,15 +123,15 @@ Each cell is one byte.
- .. row 1
- -
+ -
- 0
- -
+ -
- 1
- 2
- -
+ -
- 3
- .. row 2
@@ -140,25 +140,25 @@ Each cell is one byte.
- Y
- -
+ -
- Y
- Y
- -
+ -
- Y
- .. row 3
- -
- -
+ -
+ -
- C
- -
- -
+ -
+ -
- C
- -
+ -
- .. row 4
@@ -166,17 +166,17 @@ Each cell is one byte.
- Y
- -
+ -
- Y
- Y
- -
+ -
- Y
- .. row 5
- -
+ -
- .. row 6
@@ -184,25 +184,25 @@ Each cell is one byte.
- Y
- -
+ -
- Y
- Y
- -
+ -
- Y
- .. row 7
- -
- -
+ -
+ -
- C
- -
- -
+ -
+ -
- C
- -
+ -
- .. row 8
@@ -210,10 +210,10 @@ Each cell is one byte.
- Y
- -
+ -
- Y
- Y
- -
+ -
- Y
diff --git a/Documentation/linux_tv/media/v4l/pixfmt-nv12.rst b/Documentation/linux_tv/media/v4l/pixfmt-nv12.rst
index 906d1effff67..65ccfb837318 100644
--- a/Documentation/linux_tv/media/v4l/pixfmt-nv12.rst
+++ b/Documentation/linux_tv/media/v4l/pixfmt-nv12.rst
@@ -124,15 +124,15 @@ Each cell is one byte.
- .. row 1
- -
+ -
- 0
- -
+ -
- 1
- 2
- -
+ -
- 3
- .. row 2
@@ -141,69 +141,69 @@ Each cell is one byte.
- Y
- -
+ -
- Y
- Y
- -
+ -
- Y
- .. row 3
- -
- -
+ -
+ -
- C
- -
- -
+ -
+ -
- C
- -
+ -
- .. row 4
- 1
- Y
- -
+ -
- Y
- Y
- -
+ -
- Y
- .. row 5
- -
+ -
- .. row 6
- 2
- Y
- -
+ -
- Y
- Y
- -
+ -
- Y
- .. row 7
- -
- -
+ -
+ -
- C
- -
- -
+ -
+ -
- C
- -
+ -
- .. row 8
@@ -211,10 +211,10 @@ Each cell is one byte.
- Y
- -
+ -
- Y
- Y
- -
+ -
- Y
diff --git a/Documentation/linux_tv/media/v4l/pixfmt-nv12m.rst b/Documentation/linux_tv/media/v4l/pixfmt-nv12m.rst
index 39ed024bcbe7..f0e0af732949 100644
--- a/Documentation/linux_tv/media/v4l/pixfmt-nv12m.rst
+++ b/Documentation/linux_tv/media/v4l/pixfmt-nv12m.rst
@@ -101,7 +101,7 @@ Each cell is one byte.
- .. row 5
- -
+ -
- .. row 6
@@ -139,15 +139,15 @@ Each cell is one byte.
- .. row 1
- -
+ -
- 0
- -
+ -
- 1
- 2
- -
+ -
- 3
- .. row 2
@@ -156,25 +156,25 @@ Each cell is one byte.
- Y
- -
+ -
- Y
- Y
- -
+ -
- Y
- .. row 3
- -
- -
+ -
+ -
- C
- -
- -
+ -
+ -
- C
- -
+ -
- .. row 4
@@ -182,17 +182,17 @@ Each cell is one byte.
- Y
- -
+ -
- Y
- Y
- -
+ -
- Y
- .. row 5
- -
+ -
- .. row 6
@@ -200,26 +200,26 @@ Each cell is one byte.
- Y
- -
+ -
- Y
- Y
- -
+ -
- Y
- .. row 7
- -
- -
+ -
+ -
- C
- -
- -
- -
+ -
+ -
+ -
- C
- -
+ -
- .. row 8
@@ -227,10 +227,10 @@ Each cell is one byte.
- Y
- -
+ -
- Y
- Y
- -
+ -
- Y
diff --git a/Documentation/linux_tv/media/v4l/pixfmt-nv16.rst b/Documentation/linux_tv/media/v4l/pixfmt-nv16.rst
index fac4c35f9c38..5a7e89529ce9 100644
--- a/Documentation/linux_tv/media/v4l/pixfmt-nv16.rst
+++ b/Documentation/linux_tv/media/v4l/pixfmt-nv16.rst
@@ -149,15 +149,15 @@ Each cell is one byte.
- .. row 1
- -
+ -
- 0
- -
+ -
- 1
- 2
- -
+ -
- 3
- .. row 2
@@ -166,25 +166,25 @@ Each cell is one byte.
- Y
- -
+ -
- Y
- Y
- -
+ -
- Y
- .. row 3
- -
- -
+ -
+ -
- C
- -
- -
+ -
+ -
- C
- -
+ -
- .. row 4
@@ -192,29 +192,29 @@ Each cell is one byte.
- Y
- -
+ -
- Y
- Y
- -
+ -
- Y
- .. row 5
- -
- -
+ -
+ -
- C
- -
- -
+ -
+ -
- C
- -
+ -
- .. row 6
- -
+ -
- .. row 7
@@ -222,25 +222,25 @@ Each cell is one byte.
- Y
- -
+ -
- Y
- Y
- -
+ -
- Y
- .. row 8
- -
- -
+ -
+ -
- C
- -
- -
+ -
+ -
- C
- -
+ -
- .. row 9
@@ -248,22 +248,22 @@ Each cell is one byte.
- Y
- -
+ -
- Y
- Y
- -
+ -
- Y
- .. row 10
- -
- -
+ -
+ -
- C
- -
- -
+ -
+ -
- C
- -
+ -
diff --git a/Documentation/linux_tv/media/v4l/pixfmt-nv16m.rst b/Documentation/linux_tv/media/v4l/pixfmt-nv16m.rst
index b43fc50bda73..9b4c5b09c4b5 100644
--- a/Documentation/linux_tv/media/v4l/pixfmt-nv16m.rst
+++ b/Documentation/linux_tv/media/v4l/pixfmt-nv16m.rst
@@ -94,7 +94,7 @@ Each cell is one byte.
- .. row 5
- -
+ -
- .. row 6
@@ -156,15 +156,15 @@ Each cell is one byte.
- .. row 1
- -
+ -
- 0
- -
+ -
- 1
- 2
- -
+ -
- 3
- .. row 2
@@ -173,25 +173,25 @@ Each cell is one byte.
- Y
- -
+ -
- Y
- Y
- -
+ -
- Y
- .. row 3
- -
- -
+ -
+ -
- C
- -
- -
+ -
+ -
- C
- -
+ -
- .. row 4
@@ -199,29 +199,29 @@ Each cell is one byte.
- Y
- -
+ -
- Y
- Y
- -
+ -
- Y
- .. row 5
- -
- -
+ -
+ -
- C
- -
- -
+ -
+ -
- C
- -
+ -
- .. row 6
- -
+ -
- .. row 7
@@ -229,25 +229,25 @@ Each cell is one byte.
- Y
- -
+ -
- Y
- Y
- -
+ -
- Y
- .. row 8
- -
- -
+ -
+ -
- C
- -
- -
+ -
+ -
- C
- -
+ -
- .. row 9
@@ -255,22 +255,22 @@ Each cell is one byte.
- Y
- -
+ -
- Y
- Y
- -
+ -
- Y
- .. row 10
- -
- -
+ -
+ -
- C
- -
- -
+ -
+ -
- C
- -
+ -
diff --git a/Documentation/linux_tv/media/v4l/pixfmt-packed-rgb.rst b/Documentation/linux_tv/media/v4l/pixfmt-packed-rgb.rst
index 08a322b9a2ed..37d41660fc76 100644
--- a/Documentation/linux_tv/media/v4l/pixfmt-packed-rgb.rst
+++ b/Documentation/linux_tv/media/v4l/pixfmt-packed-rgb.rst
@@ -33,7 +33,7 @@ next to each other in memory.
- Code
- -
+ -
- :cspan:`7` Byte 0 in memory
- :cspan:`7` Byte 1
@@ -44,8 +44,8 @@ next to each other in memory.
- .. row 2
- -
- -
+ -
+ -
- Bit
- 7
@@ -64,7 +64,7 @@ next to each other in memory.
- 0
- -
+ -
- 7
- 6
@@ -81,7 +81,7 @@ next to each other in memory.
- 0
- -
+ -
- 7
- 6
@@ -98,7 +98,7 @@ next to each other in memory.
- 0
- -
+ -
- 7
- 6
@@ -121,7 +121,7 @@ next to each other in memory.
- 'RGB1'
- -
+ -
- r\ :sub:`2`
- r\ :sub:`1`
@@ -144,7 +144,7 @@ next to each other in memory.
- 'AR12'
- -
+ -
- g\ :sub:`3`
- g\ :sub:`2`
@@ -161,7 +161,7 @@ next to each other in memory.
- b\ :sub:`0`
- -
+ -
- a\ :sub:`3`
- a\ :sub:`2`
@@ -184,7 +184,7 @@ next to each other in memory.
- 'XR12'
- -
+ -
- g\ :sub:`3`
- g\ :sub:`2`
@@ -201,7 +201,7 @@ next to each other in memory.
- b\ :sub:`0`
- -
+ -
- -
- -
@@ -224,7 +224,7 @@ next to each other in memory.
- 'AR15'
- -
+ -
- g\ :sub:`2`
- g\ :sub:`1`
@@ -241,7 +241,7 @@ next to each other in memory.
- b\ :sub:`0`
- -
+ -
- a
- r\ :sub:`4`
@@ -264,7 +264,7 @@ next to each other in memory.
- 'XR15'
- -
+ -
- g\ :sub:`2`
- g\ :sub:`1`
@@ -281,7 +281,7 @@ next to each other in memory.
- b\ :sub:`0`
- -
+ -
- -
- r\ :sub:`4`
@@ -304,7 +304,7 @@ next to each other in memory.
- 'RGBP'
- -
+ -
- g\ :sub:`2`
- g\ :sub:`1`
@@ -321,7 +321,7 @@ next to each other in memory.
- b\ :sub:`0`
- -
+ -
- r\ :sub:`4`
- r\ :sub:`3`
@@ -344,7 +344,7 @@ next to each other in memory.
- 'AR15' | (1 << 31)
- -
+ -
- a
- r\ :sub:`4`
@@ -361,7 +361,7 @@ next to each other in memory.
- g\ :sub:`3`
- -
+ -
- g\ :sub:`2`
- g\ :sub:`1`
@@ -384,7 +384,7 @@ next to each other in memory.
- 'XR15' | (1 << 31)
- -
+ -
- -
- r\ :sub:`4`
@@ -401,7 +401,7 @@ next to each other in memory.
- g\ :sub:`3`
- -
+ -
- g\ :sub:`2`
- g\ :sub:`1`
@@ -424,7 +424,7 @@ next to each other in memory.
- 'RGBR'
- -
+ -
- r\ :sub:`4`
- r\ :sub:`3`
@@ -441,7 +441,7 @@ next to each other in memory.
- g\ :sub:`3`
- -
+ -
- g\ :sub:`2`
- g\ :sub:`1`
@@ -464,7 +464,7 @@ next to each other in memory.
- 'BGR3'
- -
+ -
- b\ :sub:`7`
- b\ :sub:`6`
@@ -481,7 +481,7 @@ next to each other in memory.
- b\ :sub:`0`
- -
+ -
- g\ :sub:`7`
- g\ :sub:`6`
@@ -498,7 +498,7 @@ next to each other in memory.
- g\ :sub:`0`
- -
+ -
- r\ :sub:`7`
- r\ :sub:`6`
@@ -521,7 +521,7 @@ next to each other in memory.
- 'RGB3'
- -
+ -
- r\ :sub:`7`
- r\ :sub:`6`
@@ -538,7 +538,7 @@ next to each other in memory.
- r\ :sub:`0`
- -
+ -
- g\ :sub:`7`
- g\ :sub:`6`
@@ -555,7 +555,7 @@ next to each other in memory.
- g\ :sub:`0`
- -
+ -
- b\ :sub:`7`
- b\ :sub:`6`
@@ -578,7 +578,7 @@ next to each other in memory.
- 'BGRH'
- -
+ -
- b\ :sub:`5`
- b\ :sub:`4`
@@ -595,7 +595,7 @@ next to each other in memory.
- g\ :sub:`4`
- -
+ -
- g\ :sub:`3`
- g\ :sub:`2`
@@ -612,7 +612,7 @@ next to each other in memory.
- r\ :sub:`2`
- -
+ -
- r\ :sub:`1`
- r\ :sub:`0`
@@ -629,7 +629,7 @@ next to each other in memory.
- -
- -
+ -
- -
- -
@@ -652,7 +652,7 @@ next to each other in memory.
- 'AR24'
- -
+ -
- b\ :sub:`7`
- b\ :sub:`6`
@@ -669,7 +669,7 @@ next to each other in memory.
- b\ :sub:`0`
- -
+ -
- g\ :sub:`7`
- g\ :sub:`6`
@@ -686,7 +686,7 @@ next to each other in memory.
- g\ :sub:`0`
- -
+ -
- r\ :sub:`7`
- r\ :sub:`6`
@@ -703,7 +703,7 @@ next to each other in memory.
- r\ :sub:`0`
- -
+ -
- a\ :sub:`7`
- a\ :sub:`6`
@@ -726,7 +726,7 @@ next to each other in memory.
- 'XR24'
- -
+ -
- b\ :sub:`7`
- b\ :sub:`6`
@@ -743,7 +743,7 @@ next to each other in memory.
- b\ :sub:`0`
- -
+ -
- g\ :sub:`7`
- g\ :sub:`6`
@@ -760,7 +760,7 @@ next to each other in memory.
- g\ :sub:`0`
- -
+ -
- r\ :sub:`7`
- r\ :sub:`6`
@@ -777,7 +777,7 @@ next to each other in memory.
- r\ :sub:`0`
- -
+ -
- -
- -
@@ -800,7 +800,7 @@ next to each other in memory.
- 'BA24'
- -
+ -
- a\ :sub:`7`
- a\ :sub:`6`
@@ -817,7 +817,7 @@ next to each other in memory.
- a\ :sub:`0`
- -
+ -
- r\ :sub:`7`
- r\ :sub:`6`
@@ -834,7 +834,7 @@ next to each other in memory.
- r\ :sub:`0`
- -
+ -
- g\ :sub:`7`
- g\ :sub:`6`
@@ -851,7 +851,7 @@ next to each other in memory.
- g\ :sub:`0`
- -
+ -
- b\ :sub:`7`
- b\ :sub:`6`
@@ -874,7 +874,7 @@ next to each other in memory.
- 'BX24'
- -
+ -
- -
- -
@@ -891,7 +891,7 @@ next to each other in memory.
- -
- -
+ -
- r\ :sub:`7`
- r\ :sub:`6`
@@ -908,7 +908,7 @@ next to each other in memory.
- r\ :sub:`0`
- -
+ -
- g\ :sub:`7`
- g\ :sub:`6`
@@ -925,7 +925,7 @@ next to each other in memory.
- g\ :sub:`0`
- -
+ -
- b\ :sub:`7`
- b\ :sub:`6`
@@ -1112,7 +1112,7 @@ either the corresponding ARGB or XRGB format, depending on the driver.
- Code
- -
+ -
- :cspan:`7` Byte 0 in memory
- :cspan:`7` Byte 1
@@ -1123,8 +1123,8 @@ either the corresponding ARGB or XRGB format, depending on the driver.
- .. row 2
- -
- -
+ -
+ -
- Bit
- 7
@@ -1143,7 +1143,7 @@ either the corresponding ARGB or XRGB format, depending on the driver.
- 0
- -
+ -
- 7
- 6
@@ -1160,7 +1160,7 @@ either the corresponding ARGB or XRGB format, depending on the driver.
- 0
- -
+ -
- 7
- 6
@@ -1177,7 +1177,7 @@ either the corresponding ARGB or XRGB format, depending on the driver.
- 0
- -
+ -
- 7
- 6
@@ -1200,7 +1200,7 @@ either the corresponding ARGB or XRGB format, depending on the driver.
- 'R444'
- -
+ -
- g\ :sub:`3`
- g\ :sub:`2`
@@ -1217,7 +1217,7 @@ either the corresponding ARGB or XRGB format, depending on the driver.
- b\ :sub:`0`
- -
+ -
- a\ :sub:`3`
- a\ :sub:`2`
@@ -1240,7 +1240,7 @@ either the corresponding ARGB or XRGB format, depending on the driver.
- 'RGBO'
- -
+ -
- g\ :sub:`2`
- g\ :sub:`1`
@@ -1257,7 +1257,7 @@ either the corresponding ARGB or XRGB format, depending on the driver.
- b\ :sub:`0`
- -
+ -
- a
- r\ :sub:`4`
@@ -1280,7 +1280,7 @@ either the corresponding ARGB or XRGB format, depending on the driver.
- 'RGBQ'
- -
+ -
- a
- r\ :sub:`4`
@@ -1297,7 +1297,7 @@ either the corresponding ARGB or XRGB format, depending on the driver.
- g\ :sub:`3`
- -
+ -
- g\ :sub:`2`
- g\ :sub:`1`
@@ -1320,7 +1320,7 @@ either the corresponding ARGB or XRGB format, depending on the driver.
- 'BGR4'
- -
+ -
- b\ :sub:`7`
- b\ :sub:`6`
@@ -1337,7 +1337,7 @@ either the corresponding ARGB or XRGB format, depending on the driver.
- b\ :sub:`0`
- -
+ -
- g\ :sub:`7`
- g\ :sub:`6`
@@ -1354,7 +1354,7 @@ either the corresponding ARGB or XRGB format, depending on the driver.
- g\ :sub:`0`
- -
+ -
- r\ :sub:`7`
- r\ :sub:`6`
@@ -1371,7 +1371,7 @@ either the corresponding ARGB or XRGB format, depending on the driver.
- r\ :sub:`0`
- -
+ -
- a\ :sub:`7`
- a\ :sub:`6`
@@ -1394,7 +1394,7 @@ either the corresponding ARGB or XRGB format, depending on the driver.
- 'RGB4'
- -
+ -
- a\ :sub:`7`
- a\ :sub:`6`
@@ -1411,7 +1411,7 @@ either the corresponding ARGB or XRGB format, depending on the driver.
- a\ :sub:`0`
- -
+ -
- r\ :sub:`7`
- r\ :sub:`6`
@@ -1428,7 +1428,7 @@ either the corresponding ARGB or XRGB format, depending on the driver.
- r\ :sub:`0`
- -
+ -
- g\ :sub:`7`
- g\ :sub:`6`
@@ -1445,7 +1445,7 @@ either the corresponding ARGB or XRGB format, depending on the driver.
- g\ :sub:`0`
- -
+ -
- b\ :sub:`7`
- b\ :sub:`6`
diff --git a/Documentation/linux_tv/media/v4l/pixfmt-packed-yuv.rst b/Documentation/linux_tv/media/v4l/pixfmt-packed-yuv.rst
index 70d0ad54bd22..2560257237dc 100644
--- a/Documentation/linux_tv/media/v4l/pixfmt-packed-yuv.rst
+++ b/Documentation/linux_tv/media/v4l/pixfmt-packed-yuv.rst
@@ -30,22 +30,22 @@ component of each pixel in one 16 or 32 bit word.
- Code
- -
+ -
- :cspan:`7` Byte 0 in memory
- -
+ -
- :cspan:`7` Byte 1
- -
+ -
- :cspan:`7` Byte 2
- -
+ -
- :cspan:`7` Byte 3
- .. row 2
- -
- -
+ -
+ -
- Bit
- 7
@@ -64,7 +64,7 @@ component of each pixel in one 16 or 32 bit word.
- 0
- -
+ -
- 7
- 6
@@ -81,7 +81,7 @@ component of each pixel in one 16 or 32 bit word.
- 0
- -
+ -
- 7
- 6
@@ -98,7 +98,7 @@ component of each pixel in one 16 or 32 bit word.
- 0
- -
+ -
- 7
- 6
@@ -121,7 +121,7 @@ component of each pixel in one 16 or 32 bit word.
- 'Y444'
- -
+ -
- Cb\ :sub:`3`
- Cb\ :sub:`2`
@@ -138,7 +138,7 @@ component of each pixel in one 16 or 32 bit word.
- Cr\ :sub:`0`
- -
+ -
- a\ :sub:`3`
- a\ :sub:`2`
@@ -161,7 +161,7 @@ component of each pixel in one 16 or 32 bit word.
- 'YUVO'
- -
+ -
- Cb\ :sub:`2`
- Cb\ :sub:`1`
@@ -178,7 +178,7 @@ component of each pixel in one 16 or 32 bit word.
- Cr\ :sub:`0`
- -
+ -
- a
- Y'\ :sub:`4`
@@ -201,7 +201,7 @@ component of each pixel in one 16 or 32 bit word.
- 'YUVP'
- -
+ -
- Cb\ :sub:`2`
- Cb\ :sub:`1`
@@ -218,7 +218,7 @@ component of each pixel in one 16 or 32 bit word.
- Cr\ :sub:`0`
- -
+ -
- Y'\ :sub:`4`
- Y'\ :sub:`3`
@@ -241,7 +241,7 @@ component of each pixel in one 16 or 32 bit word.
- 'YUV4'
- -
+ -
- a\ :sub:`7`
- a\ :sub:`6`
@@ -258,7 +258,7 @@ component of each pixel in one 16 or 32 bit word.
- a\ :sub:`0`
- -
+ -
- Y'\ :sub:`7`
- Y'\ :sub:`6`
@@ -275,7 +275,7 @@ component of each pixel in one 16 or 32 bit word.
- Y'\ :sub:`0`
- -
+ -
- Cb\ :sub:`7`
- Cb\ :sub:`6`
@@ -292,7 +292,7 @@ component of each pixel in one 16 or 32 bit word.
- Cb\ :sub:`0`
- -
+ -
- Cr\ :sub:`7`
- Cr\ :sub:`6`
diff --git a/Documentation/linux_tv/media/v4l/pixfmt-reserved.rst b/Documentation/linux_tv/media/v4l/pixfmt-reserved.rst
index 73301b512b1a..8f9ecae1e677 100644
--- a/Documentation/linux_tv/media/v4l/pixfmt-reserved.rst
+++ b/Documentation/linux_tv/media/v4l/pixfmt-reserved.rst
@@ -64,10 +64,10 @@ please make a proposal on the linux-media mailing list.
- 'HM12'
- YUV 4:2:0 format used by the IVTV driver,
- `http://www.ivtvdriver.org/ <http://www.ivtvdriver.org/>`__
+ `http://www.ivtvdriver.org/ <http://www.ivtvdriver.org/>`__
- The format is documented in the kernel sources in the file
- ``Documentation/video4linux/cx2341x/README.hm12``
+ The format is documented in the kernel sources in the file
+ ``Documentation/video4linux/cx2341x/README.hm12``
- .. _`V4L2-PIX-FMT-CPIA1`:
@@ -84,7 +84,7 @@ please make a proposal on the linux-media mailing list.
- 'JPGL'
- JPEG-Light format (Pegasus Lossless JPEG) used in Divio webcams NW
- 80x.
+ 80x.
- .. _`V4L2-PIX-FMT-SPCA501`:
@@ -245,7 +245,7 @@ please make a proposal on the linux-media mailing list.
- 'WNVA'
- Used by the Winnov Videum driver,
- `http://www.thedirks.org/winnov/ <http://www.thedirks.org/winnov/>`__
+ `http://www.thedirks.org/winnov/ <http://www.thedirks.org/winnov/>`__
- .. _`V4L2-PIX-FMT-TM6000`:
@@ -263,7 +263,7 @@ please make a proposal on the linux-media mailing list.
- Used by xirlink CIT, found at IBM webcams.
- Uses one line of Y then 1 line of VYUY
+ Uses one line of Y then 1 line of VYUY
- .. _`V4L2-PIX-FMT-KONICA420`:
@@ -273,7 +273,7 @@ please make a proposal on the linux-media mailing list.
- Used by Konica webcams.
- YUV420 planar in blocks of 256 pixels.
+ YUV420 planar in blocks of 256 pixels.
- .. _`V4L2-PIX-FMT-YYUV`:
@@ -290,7 +290,7 @@ please make a proposal on the linux-media mailing list.
- 'Y04 '
- Old 4-bit greyscale format. Only the most significant 4 bits of
- each byte are used, the other bits are set to 0.
+ each byte are used, the other bits are set to 0.
- .. _`V4L2-PIX-FMT-Y6`:
@@ -299,7 +299,7 @@ please make a proposal on the linux-media mailing list.
- 'Y06 '
- Old 6-bit greyscale format. Only the most significant 6 bits of
- each byte are used, the other bits are set to 0.
+ each byte are used, the other bits are set to 0.
- .. _`V4L2-PIX-FMT-S5C-UYVY-JPG`:
@@ -308,34 +308,34 @@ please make a proposal on the linux-media mailing list.
- 'S5CI'
- Two-planar format used by Samsung S5C73MX cameras. The first plane
- contains interleaved JPEG and UYVY image data, followed by meta
- data in form of an array of offsets to the UYVY data blocks. The
- actual pointer array follows immediately the interleaved JPEG/UYVY
- data, the number of entries in this array equals the height of the
- UYVY image. Each entry is a 4-byte unsigned integer in big endian
- order and it's an offset to a single pixel line of the UYVY image.
- The first plane can start either with JPEG or UYVY data chunk. The
- size of a single UYVY block equals the UYVY image's width
- multiplied by 2. The size of a JPEG chunk depends on the image and
- can vary with each line.
-
- The second plane, at an offset of 4084 bytes, contains a 4-byte
- offset to the pointer array in the first plane. This offset is
- followed by a 4-byte value indicating size of the pointer array.
- All numbers in the second plane are also in big endian order.
- Remaining data in the second plane is undefined. The information
- in the second plane allows to easily find location of the pointer
- array, which can be different for each frame. The size of the
- pointer array is constant for given UYVY image height.
-
- In order to extract UYVY and JPEG frames an application can
- initially set a data pointer to the start of first plane and then
- add an offset from the first entry of the pointers table. Such a
- pointer indicates start of an UYVY image pixel line. Whole UYVY
- line can be copied to a separate buffer. These steps should be
- repeated for each line, i.e. the number of entries in the pointer
- array. Anything what's in between the UYVY lines is JPEG data and
- should be concatenated to form the JPEG stream.
+ contains interleaved JPEG and UYVY image data, followed by meta
+ data in form of an array of offsets to the UYVY data blocks. The
+ actual pointer array follows immediately the interleaved JPEG/UYVY
+ data, the number of entries in this array equals the height of the
+ UYVY image. Each entry is a 4-byte unsigned integer in big endian
+ order and it's an offset to a single pixel line of the UYVY image.
+ The first plane can start either with JPEG or UYVY data chunk. The
+ size of a single UYVY block equals the UYVY image's width
+ multiplied by 2. The size of a JPEG chunk depends on the image and
+ can vary with each line.
+
+ The second plane, at an offset of 4084 bytes, contains a 4-byte
+ offset to the pointer array in the first plane. This offset is
+ followed by a 4-byte value indicating size of the pointer array.
+ All numbers in the second plane are also in big endian order.
+ Remaining data in the second plane is undefined. The information
+ in the second plane allows to easily find location of the pointer
+ array, which can be different for each frame. The size of the
+ pointer array is constant for given UYVY image height.
+
+ In order to extract UYVY and JPEG frames an application can
+ initially set a data pointer to the start of first plane and then
+ add an offset from the first entry of the pointers table. Such a
+ pointer indicates start of an UYVY image pixel line. Whole UYVY
+ line can be copied to a separate buffer. These steps should be
+ repeated for each line, i.e. the number of entries in the pointer
+ array. Anything what's in between the UYVY lines is JPEG data and
+ should be concatenated to form the JPEG stream.
@@ -354,7 +354,7 @@ please make a proposal on the linux-media mailing list.
- 0x00000001
- The color values are premultiplied by the alpha channel value. For
- example, if a light blue pixel with 50% transparency was described
- by RGBA values (128, 192, 255, 128), the same pixel described with
- premultiplied colors would be described by RGBA values (64, 96,
- 128, 128)
+ example, if a light blue pixel with 50% transparency was described
+ by RGBA values (128, 192, 255, 128), the same pixel described with
+ premultiplied colors would be described by RGBA values (64, 96,
+ 128, 128)
diff --git a/Documentation/linux_tv/media/v4l/pixfmt-srggb10p.rst b/Documentation/linux_tv/media/v4l/pixfmt-srggb10p.rst
index f95672d7327b..9b4a1d9951ba 100644
--- a/Documentation/linux_tv/media/v4l/pixfmt-srggb10p.rst
+++ b/Documentation/linux_tv/media/v4l/pixfmt-srggb10p.rst
@@ -52,7 +52,7 @@ Each cell is one byte.
- G\ :sub:`03high`
- B\ :sub:`00low`\ (bits 7--6) G\ :sub:`01low`\ (bits 5--4)
- B\ :sub:`02low`\ (bits 3--2) G\ :sub:`03low`\ (bits 1--0)
+ B\ :sub:`02low`\ (bits 3--2) G\ :sub:`03low`\ (bits 1--0)
- .. row 2
@@ -67,7 +67,7 @@ Each cell is one byte.
- R\ :sub:`13high`
- G\ :sub:`10low`\ (bits 7--6) R\ :sub:`11low`\ (bits 5--4)
- G\ :sub:`12low`\ (bits 3--2) R\ :sub:`13low`\ (bits 1--0)
+ G\ :sub:`12low`\ (bits 3--2) R\ :sub:`13low`\ (bits 1--0)
- .. row 3
@@ -82,7 +82,7 @@ Each cell is one byte.
- G\ :sub:`23high`
- B\ :sub:`20low`\ (bits 7--6) G\ :sub:`21low`\ (bits 5--4)
- B\ :sub:`22low`\ (bits 3--2) G\ :sub:`23low`\ (bits 1--0)
+ B\ :sub:`22low`\ (bits 3--2) G\ :sub:`23low`\ (bits 1--0)
- .. row 4
@@ -97,4 +97,4 @@ Each cell is one byte.
- R\ :sub:`33high`
- G\ :sub:`30low`\ (bits 7--6) R\ :sub:`31low`\ (bits 5--4)
- G\ :sub:`32low`\ (bits 3--2) R\ :sub:`33low`\ (bits 1--0)
+ G\ :sub:`32low`\ (bits 3--2) R\ :sub:`33low`\ (bits 1--0)
diff --git a/Documentation/linux_tv/media/v4l/pixfmt-uyvy.rst b/Documentation/linux_tv/media/v4l/pixfmt-uyvy.rst
index 6975949fc7a5..87b0081d44ee 100644
--- a/Documentation/linux_tv/media/v4l/pixfmt-uyvy.rst
+++ b/Documentation/linux_tv/media/v4l/pixfmt-uyvy.rst
@@ -121,15 +121,15 @@ Each cell is one byte.
- .. row 1
- -
+ -
- 0
- -
+ -
- 1
- 2
- -
+ -
- 3
- .. row 2
diff --git a/Documentation/linux_tv/media/v4l/pixfmt-vyuy.rst b/Documentation/linux_tv/media/v4l/pixfmt-vyuy.rst
index c3c72bdc3a1e..5d8f99f173b6 100644
--- a/Documentation/linux_tv/media/v4l/pixfmt-vyuy.rst
+++ b/Documentation/linux_tv/media/v4l/pixfmt-vyuy.rst
@@ -119,13 +119,13 @@ Each cell is one byte.
- .. row 1
- -
+ -
- 0
- -
+ -
- 1
- -
+ -
- 2
- 3
diff --git a/Documentation/linux_tv/media/v4l/pixfmt-y41p.rst b/Documentation/linux_tv/media/v4l/pixfmt-y41p.rst
index e2c690e4d254..4760174a4668 100644
--- a/Documentation/linux_tv/media/v4l/pixfmt-y41p.rst
+++ b/Documentation/linux_tv/media/v4l/pixfmt-y41p.rst
@@ -158,12 +158,12 @@ Each cell is one byte.
- .. row 1
- -
+ -
- 0
- 1
- -
+ -
- 2
- 3
@@ -172,7 +172,7 @@ Each cell is one byte.
- 5
- -
+ -
- 6
- 7
diff --git a/Documentation/linux_tv/media/v4l/pixfmt-yuv410.rst b/Documentation/linux_tv/media/v4l/pixfmt-yuv410.rst
index 6939099c1baa..c51b4e2f108f 100644
--- a/Documentation/linux_tv/media/v4l/pixfmt-yuv410.rst
+++ b/Documentation/linux_tv/media/v4l/pixfmt-yuv410.rst
@@ -114,16 +114,16 @@ Each cell is one byte.
- .. row 1
- -
+ -
- 0
- -
+ -
- 1
- -
+ -
- 2
- -
+ -
- 3
- .. row 2
@@ -132,18 +132,18 @@ Each cell is one byte.
- Y
- -
+ -
- Y
- -
+ -
- Y
- -
+ -
- Y
- .. row 3
- -
+ -
- .. row 4
@@ -151,26 +151,26 @@ Each cell is one byte.
- Y
- -
+ -
- Y
- -
+ -
- Y
- -
+ -
- Y
- .. row 5
- -
- -
- -
- -
+ -
+ -
+ -
+ -
- C
- -
- -
- -
+ -
+ -
+ -
- .. row 6
@@ -178,18 +178,18 @@ Each cell is one byte.
- Y
- -
+ -
- Y
- -
+ -
- Y
- -
+ -
- Y
- .. row 7
- -
+ -
- .. row 8
@@ -197,11 +197,11 @@ Each cell is one byte.
- Y
- -
+ -
- Y
- -
+ -
- Y
- -
+ -
- Y
diff --git a/Documentation/linux_tv/media/v4l/pixfmt-yuv411p.rst b/Documentation/linux_tv/media/v4l/pixfmt-yuv411p.rst
index 5747303cf2a7..f85e3f388cbe 100644
--- a/Documentation/linux_tv/media/v4l/pixfmt-yuv411p.rst
+++ b/Documentation/linux_tv/media/v4l/pixfmt-yuv411p.rst
@@ -147,12 +147,12 @@ Each cell is one byte.
- .. row 1
- -
+ -
- 0
- 1
- -
+ -
- 2
- 3
diff --git a/Documentation/linux_tv/media/v4l/pixfmt-yuv420.rst b/Documentation/linux_tv/media/v4l/pixfmt-yuv420.rst
index 633b63b14b59..b22e64c14f67 100644
--- a/Documentation/linux_tv/media/v4l/pixfmt-yuv420.rst
+++ b/Documentation/linux_tv/media/v4l/pixfmt-yuv420.rst
@@ -136,16 +136,16 @@ Each cell is one byte.
- .. row 1
- -
+ -
- 0
- -
+ -
- 1
- -
+ -
- 2
- -
+ -
- 3
- .. row 2
@@ -154,27 +154,27 @@ Each cell is one byte.
- Y
- -
+ -
- Y
- -
+ -
- Y
- -
+ -
- Y
- .. row 3
- -
- -
+ -
+ -
- C
- -
- -
- -
+ -
+ -
+ -
- C
- -
+ -
- .. row 4
@@ -182,18 +182,18 @@ Each cell is one byte.
- Y
- -
+ -
- Y
- -
+ -
- Y
- -
+ -
- Y
- .. row 5
- -
+ -
- .. row 6
@@ -201,27 +201,27 @@ Each cell is one byte.
- Y
- -
+ -
- Y
- -
+ -
- Y
- -
+ -
- Y
- .. row 7
- -
- -
+ -
+ -
- C
- -
- -
- -
+ -
+ -
+ -
- C
- -
+ -
- .. row 8
@@ -229,11 +229,11 @@ Each cell is one byte.
- Y
- -
+ -
- Y
- -
+ -
- Y
- -
+ -
- Y
diff --git a/Documentation/linux_tv/media/v4l/pixfmt-yuv420m.rst b/Documentation/linux_tv/media/v4l/pixfmt-yuv420m.rst
index fc87afaf9139..0faf15cac881 100644
--- a/Documentation/linux_tv/media/v4l/pixfmt-yuv420m.rst
+++ b/Documentation/linux_tv/media/v4l/pixfmt-yuv420m.rst
@@ -100,7 +100,7 @@ Each cell is one byte.
- .. row 5
- -
+ -
- .. row 6
@@ -120,7 +120,7 @@ Each cell is one byte.
- .. row 8
- -
+ -
- .. row 9
@@ -150,16 +150,16 @@ Each cell is one byte.
- .. row 1
- -
+ -
- 0
- -
+ -
- 1
- -
+ -
- 2
- -
+ -
- 3
- .. row 2
@@ -168,27 +168,27 @@ Each cell is one byte.
- Y
- -
+ -
- Y
- -
+ -
- Y
- -
+ -
- Y
- .. row 3
- -
- -
+ -
+ -
- C
- -
- -
- -
+ -
+ -
+ -
- C
- -
+ -
- .. row 4
@@ -196,18 +196,18 @@ Each cell is one byte.
- Y
- -
+ -
- Y
- -
+ -
- Y
- -
+ -
- Y
- .. row 5
- -
+ -
- .. row 6
@@ -215,27 +215,27 @@ Each cell is one byte.
- Y
- -
+ -
- Y
- -
+ -
- Y
- -
+ -
- Y
- .. row 7
- -
- -
+ -
+ -
- C
- -
- -
- -
+ -
+ -
+ -
- C
- -
+ -
- .. row 8
@@ -243,11 +243,11 @@ Each cell is one byte.
- Y
- -
+ -
- Y
- -
+ -
- Y
- -
+ -
- Y
diff --git a/Documentation/linux_tv/media/v4l/pixfmt-yuv422m.rst b/Documentation/linux_tv/media/v4l/pixfmt-yuv422m.rst
index fe903dc90aac..6850b359c887 100644
--- a/Documentation/linux_tv/media/v4l/pixfmt-yuv422m.rst
+++ b/Documentation/linux_tv/media/v4l/pixfmt-yuv422m.rst
@@ -99,7 +99,7 @@ Each cell is one byte.
- .. row 5
- -
+ -
- .. row 6
@@ -135,7 +135,7 @@ Each cell is one byte.
- .. row 10
- -
+ -
- .. row 11
@@ -181,15 +181,15 @@ Each cell is one byte.
- .. row 1
- -
+ -
- 0
- -
+ -
- 1
- 2
- -
+ -
- 3
- .. row 2
diff --git a/Documentation/linux_tv/media/v4l/pixfmt-yuv422p.rst b/Documentation/linux_tv/media/v4l/pixfmt-yuv422p.rst
index bb95d656fcc1..9f34762adf18 100644
--- a/Documentation/linux_tv/media/v4l/pixfmt-yuv422p.rst
+++ b/Documentation/linux_tv/media/v4l/pixfmt-yuv422p.rst
@@ -164,15 +164,15 @@ Each cell is one byte.
- .. row 1
- -
+ -
- 0
- -
+ -
- 1
- 2
- -
+ -
- 3
- .. row 2
diff --git a/Documentation/linux_tv/media/v4l/pixfmt-yuv444m.rst b/Documentation/linux_tv/media/v4l/pixfmt-yuv444m.rst
index d6fa7a7b0049..b04b2f4a8f17 100644
--- a/Documentation/linux_tv/media/v4l/pixfmt-yuv444m.rst
+++ b/Documentation/linux_tv/media/v4l/pixfmt-yuv444m.rst
@@ -93,7 +93,7 @@ Each cell is one byte.
- .. row 5
- -
+ -
- .. row 6
@@ -145,7 +145,7 @@ Each cell is one byte.
- .. row 10
- -
+ -
- .. row 11
@@ -207,7 +207,7 @@ Each cell is one byte.
- .. row 1
- -
+ -
- 0
- 1
diff --git a/Documentation/linux_tv/media/v4l/pixfmt-yuyv.rst b/Documentation/linux_tv/media/v4l/pixfmt-yuyv.rst
index edc81a2875e9..52917dfa9261 100644
--- a/Documentation/linux_tv/media/v4l/pixfmt-yuyv.rst
+++ b/Documentation/linux_tv/media/v4l/pixfmt-yuyv.rst
@@ -124,16 +124,16 @@ Each cell is one byte.
- .. row 1
- -
+ -
- 0
- -
+ -
- 1
- -
+ -
- 2
- -
+ -
- 3
- .. row 2
@@ -146,7 +146,7 @@ Each cell is one byte.
- Y
- -
+ -
- Y
- C
@@ -163,7 +163,7 @@ Each cell is one byte.
- Y
- -
+ -
- Y
- C
@@ -180,7 +180,7 @@ Each cell is one byte.
- Y
- -
+ -
- Y
- C
@@ -197,7 +197,7 @@ Each cell is one byte.
- Y
- -
+ -
- Y
- C
diff --git a/Documentation/linux_tv/media/v4l/pixfmt-yvyu.rst b/Documentation/linux_tv/media/v4l/pixfmt-yvyu.rst
index 88da5e7cc1ef..e466052b68b2 100644
--- a/Documentation/linux_tv/media/v4l/pixfmt-yvyu.rst
+++ b/Documentation/linux_tv/media/v4l/pixfmt-yvyu.rst
@@ -119,15 +119,15 @@ Each cell is one byte.
- .. row 1
- -
+ -
- 0
- -
+ -
- 1
- 2
- -
+ -
- 3
- .. row 2
diff --git a/Documentation/linux_tv/media/v4l/selection-api-006.rst b/Documentation/linux_tv/media/v4l/selection-api-006.rst
index 54b769e2fd73..b2ac12f2e3d4 100644
--- a/Documentation/linux_tv/media/v4l/selection-api-006.rst
+++ b/Documentation/linux_tv/media/v4l/selection-api-006.rst
@@ -12,17 +12,17 @@ Examples
.. code-block:: c
:caption: Example 1.15. Resetting the cropping parameters
- struct v4l2_selection sel = {
- .type = V4L2_BUF_TYPE_VIDEO_CAPTURE,
- .target = V4L2_SEL_TGT_CROP_DEFAULT,
- };
- ret = ioctl(fd, VIDIOC_G_SELECTION, &sel);
- if (ret)
- exit(-1);
- sel.target = V4L2_SEL_TGT_CROP;
- ret = ioctl(fd, VIDIOC_S_SELECTION, &sel);
- if (ret)
- exit(-1);
+ struct v4l2_selection sel = {
+ .type = V4L2_BUF_TYPE_VIDEO_CAPTURE,
+ .target = V4L2_SEL_TGT_CROP_DEFAULT,
+ };
+ ret = ioctl(fd, VIDIOC_G_SELECTION, &sel);
+ if (ret)
+ exit(-1);
+ sel.target = V4L2_SEL_TGT_CROP;
+ ret = ioctl(fd, VIDIOC_S_SELECTION, &sel);
+ if (ret)
+ exit(-1);
Setting a composing area on output of size of *at most* half of limit
placed at a center of a display.
@@ -31,26 +31,26 @@ placed at a center of a display.
.. code-block:: c
:caption: Example 1.16. Simple downscaling
- struct v4l2_selection sel = {
- .type = V4L2_BUF_TYPE_VIDEO_OUTPUT,
- .target = V4L2_SEL_TGT_COMPOSE_BOUNDS,
- };
- struct v4l2_rect r;
-
- ret = ioctl(fd, VIDIOC_G_SELECTION, &sel);
- if (ret)
- exit(-1);
- /* setting smaller compose rectangle */
- r.width = sel.r.width / 2;
- r.height = sel.r.height / 2;
- r.left = sel.r.width / 4;
- r.top = sel.r.height / 4;
- sel.r = r;
- sel.target = V4L2_SEL_TGT_COMPOSE;
- sel.flags = V4L2_SEL_FLAG_LE;
- ret = ioctl(fd, VIDIOC_S_SELECTION, &sel);
- if (ret)
- exit(-1);
+ struct v4l2_selection sel = {
+ .type = V4L2_BUF_TYPE_VIDEO_OUTPUT,
+ .target = V4L2_SEL_TGT_COMPOSE_BOUNDS,
+ };
+ struct v4l2_rect r;
+
+ ret = ioctl(fd, VIDIOC_G_SELECTION, &sel);
+ if (ret)
+ exit(-1);
+ /* setting smaller compose rectangle */
+ r.width = sel.r.width / 2;
+ r.height = sel.r.height / 2;
+ r.left = sel.r.width / 4;
+ r.top = sel.r.height / 4;
+ sel.r = r;
+ sel.target = V4L2_SEL_TGT_COMPOSE;
+ sel.flags = V4L2_SEL_FLAG_LE;
+ ret = ioctl(fd, VIDIOC_S_SELECTION, &sel);
+ if (ret)
+ exit(-1);
A video output device is assumed; change ``V4L2_BUF_TYPE_VIDEO_OUTPUT``
for other devices
@@ -59,23 +59,23 @@ for other devices
.. code-block:: c
:caption: Example 1.17. Querying for scaling factors
- struct v4l2_selection compose = {
- .type = V4L2_BUF_TYPE_VIDEO_OUTPUT,
- .target = V4L2_SEL_TGT_COMPOSE,
- };
- struct v4l2_selection crop = {
- .type = V4L2_BUF_TYPE_VIDEO_OUTPUT,
- .target = V4L2_SEL_TGT_CROP,
- };
- double hscale, vscale;
-
- ret = ioctl(fd, VIDIOC_G_SELECTION, &compose);
- if (ret)
- exit(-1);
- ret = ioctl(fd, VIDIOC_G_SELECTION, &crop);
- if (ret)
- exit(-1);
-
- /* computing scaling factors */
- hscale = (double)compose.r.width / crop.r.width;
- vscale = (double)compose.r.height / crop.r.height;
+ struct v4l2_selection compose = {
+ .type = V4L2_BUF_TYPE_VIDEO_OUTPUT,
+ .target = V4L2_SEL_TGT_COMPOSE,
+ };
+ struct v4l2_selection crop = {
+ .type = V4L2_BUF_TYPE_VIDEO_OUTPUT,
+ .target = V4L2_SEL_TGT_CROP,
+ };
+ double hscale, vscale;
+
+ ret = ioctl(fd, VIDIOC_G_SELECTION, &compose);
+ if (ret)
+ exit(-1);
+ ret = ioctl(fd, VIDIOC_G_SELECTION, &crop);
+ if (ret)
+ exit(-1);
+
+ /* computing scaling factors */
+ hscale = (double)compose.r.width / crop.r.width;
+ vscale = (double)compose.r.height / crop.r.height;
diff --git a/Documentation/linux_tv/media/v4l/standard.rst b/Documentation/linux_tv/media/v4l/standard.rst
index 49135e260acc..538588eef317 100644
--- a/Documentation/linux_tv/media/v4l/standard.rst
+++ b/Documentation/linux_tv/media/v4l/standard.rst
@@ -72,32 +72,32 @@ standard ioctls can be used with the given input or output.
struct v4l2_standard standard;
if (-1 == ioctl(fd, VIDIOC_G_STD, &std_id)) {
- /* Note when VIDIOC_ENUMSTD always returns ENOTTY this
- is no video device or it falls under the USB exception,
- and VIDIOC_G_STD returning ENOTTY is no error. */
+ /* Note when VIDIOC_ENUMSTD always returns ENOTTY this
+ is no video device or it falls under the USB exception,
+ and VIDIOC_G_STD returning ENOTTY is no error. */
- perror("VIDIOC_G_STD");
- exit(EXIT_FAILURE);
+ perror("VIDIOC_G_STD");
+ exit(EXIT_FAILURE);
}
memset(&standard, 0, sizeof(standard));
standard.index = 0;
while (0 == ioctl(fd, VIDIOC_ENUMSTD, &standard)) {
- if (standard.id & std_id) {
- printf("Current video standard: %s\\n", standard.name);
- exit(EXIT_SUCCESS);
- }
+ if (standard.id & std_id) {
+ printf("Current video standard: %s\\n", standard.name);
+ exit(EXIT_SUCCESS);
+ }
- standard.index++;
+ standard.index++;
}
/* EINVAL indicates the end of the enumeration, which cannot be
empty unless this device falls under the USB exception. */
if (errno == EINVAL || standard.index == 0) {
- perror("VIDIOC_ENUMSTD");
- exit(EXIT_FAILURE);
+ perror("VIDIOC_ENUMSTD");
+ exit(EXIT_FAILURE);
}
@@ -110,13 +110,13 @@ standard ioctls can be used with the given input or output.
memset(&input, 0, sizeof(input));
if (-1 == ioctl(fd, VIDIOC_G_INPUT, &input.index)) {
- perror("VIDIOC_G_INPUT");
- exit(EXIT_FAILURE);
+ perror("VIDIOC_G_INPUT");
+ exit(EXIT_FAILURE);
}
if (-1 == ioctl(fd, VIDIOC_ENUMINPUT, &input)) {
- perror("VIDIOC_ENUM_INPUT");
- exit(EXIT_FAILURE);
+ perror("VIDIOC_ENUM_INPUT");
+ exit(EXIT_FAILURE);
}
printf("Current input %s supports:\\n", input.name);
@@ -125,18 +125,18 @@ standard ioctls can be used with the given input or output.
standard.index = 0;
while (0 == ioctl(fd, VIDIOC_ENUMSTD, &standard)) {
- if (standard.id & input.std)
- printf("%s\\n", standard.name);
+ if (standard.id & input.std)
+ printf("%s\\n", standard.name);
- standard.index++;
+ standard.index++;
}
/* EINVAL indicates the end of the enumeration, which cannot be
empty unless this device falls under the USB exception. */
if (errno != EINVAL || standard.index == 0) {
- perror("VIDIOC_ENUMSTD");
- exit(EXIT_FAILURE);
+ perror("VIDIOC_ENUMSTD");
+ exit(EXIT_FAILURE);
}
@@ -149,18 +149,18 @@ standard ioctls can be used with the given input or output.
memset(&input, 0, sizeof(input));
if (-1 == ioctl(fd, VIDIOC_G_INPUT, &input.index)) {
- perror("VIDIOC_G_INPUT");
- exit(EXIT_FAILURE);
+ perror("VIDIOC_G_INPUT");
+ exit(EXIT_FAILURE);
}
if (-1 == ioctl(fd, VIDIOC_ENUMINPUT, &input)) {
- perror("VIDIOC_ENUM_INPUT");
- exit(EXIT_FAILURE);
+ perror("VIDIOC_ENUM_INPUT");
+ exit(EXIT_FAILURE);
}
if (0 == (input.std & V4L2_STD_PAL_BG)) {
- fprintf(stderr, "Oops. B/G PAL is not supported.\\n");
- exit(EXIT_FAILURE);
+ fprintf(stderr, "Oops. B/G PAL is not supported.\\n");
+ exit(EXIT_FAILURE);
}
/* Note this is also supposed to work when only B
@@ -169,8 +169,8 @@ standard ioctls can be used with the given input or output.
std_id = V4L2_STD_PAL_BG;
if (-1 == ioctl(fd, VIDIOC_S_STD, &std_id)) {
- perror("VIDIOC_S_STD");
- exit(EXIT_FAILURE);
+ perror("VIDIOC_S_STD");
+ exit(EXIT_FAILURE);
}
.. [1]
diff --git a/Documentation/linux_tv/media/v4l/subdev-formats.rst b/Documentation/linux_tv/media/v4l/subdev-formats.rst
index 02a4b20fb1e8..f9870b6bedb9 100644
--- a/Documentation/linux_tv/media/v4l/subdev-formats.rst
+++ b/Documentation/linux_tv/media/v4l/subdev-formats.rst
@@ -37,7 +37,7 @@ Media Bus Formats
- ``code``
- Format code, from enum
- :ref:`v4l2_mbus_pixelcode <v4l2-mbus-pixelcode>`.
+ :ref:`v4l2_mbus_pixelcode <v4l2-mbus-pixelcode>`.
- .. row 4
@@ -46,7 +46,7 @@ Media Bus Formats
- ``field``
- Field order, from enum :ref:`v4l2_field <v4l2-field>`. See
- :ref:`field-order` for details.
+ :ref:`field-order` for details.
- .. row 5
@@ -55,8 +55,8 @@ Media Bus Formats
- ``colorspace``
- Image colorspace, from enum
- :ref:`v4l2_colorspace <v4l2-colorspace>`. See
- :ref:`colorspaces` for details.
+ :ref:`v4l2_colorspace <v4l2-colorspace>`. See
+ :ref:`colorspaces` for details.
- .. row 6
@@ -65,8 +65,8 @@ Media Bus Formats
- ``ycbcr_enc``
- This information supplements the ``colorspace`` and must be set by
- the driver for capture streams and by the application for output
- streams, see :ref:`colorspaces`.
+ the driver for capture streams and by the application for output
+ streams, see :ref:`colorspaces`.
- .. row 7
@@ -75,8 +75,8 @@ Media Bus Formats
- ``quantization``
- This information supplements the ``colorspace`` and must be set by
- the driver for capture streams and by the application for output
- streams, see :ref:`colorspaces`.
+ the driver for capture streams and by the application for output
+ streams, see :ref:`colorspaces`.
- .. row 8
@@ -85,8 +85,8 @@ Media Bus Formats
- ``xfer_func``
- This information supplements the ``colorspace`` and must be set by
- the driver for capture streams and by the application for output
- streams, see :ref:`colorspaces`.
+ the driver for capture streams and by the application for output
+ streams, see :ref:`colorspaces`.
- .. row 9
@@ -95,7 +95,7 @@ Media Bus Formats
- ``reserved``\ [11]
- Reserved for future extensions. Applications and drivers must set
- the array to zero.
+ the array to zero.
@@ -167,13 +167,13 @@ The following tables list existing packed RGB formats.
- Code
- -
+ -
- :cspan:`31` Data organization
- .. row 2
- -
- -
+ -
+ -
- Bit
- 31
@@ -246,7 +246,7 @@ The following tables list existing packed RGB formats.
- 0x1016
- -
+ -
- -
- -
@@ -317,7 +317,7 @@ The following tables list existing packed RGB formats.
- 0x1001
- -
+ -
- -
- -
@@ -384,9 +384,9 @@ The following tables list existing packed RGB formats.
- .. row 5
- -
- -
- -
+ -
+ -
+ -
- -
- -
@@ -457,7 +457,7 @@ The following tables list existing packed RGB formats.
- 0x1002
- -
+ -
- -
- -
@@ -524,9 +524,9 @@ The following tables list existing packed RGB formats.
- .. row 7
- -
- -
- -
+ -
+ -
+ -
- -
- -
@@ -597,7 +597,7 @@ The following tables list existing packed RGB formats.
- 0x1003
- -
+ -
- -
- -
@@ -664,9 +664,9 @@ The following tables list existing packed RGB formats.
- .. row 9
- -
- -
- -
+ -
+ -
+ -
- -
- -
@@ -737,7 +737,7 @@ The following tables list existing packed RGB formats.
- 0x1004
- -
+ -
- -
- -
@@ -804,9 +804,9 @@ The following tables list existing packed RGB formats.
- .. row 11
- -
- -
- -
+ -
+ -
+ -
- -
- -
@@ -877,7 +877,7 @@ The following tables list existing packed RGB formats.
- 0x1017
- -
+ -
- -
- -
@@ -948,7 +948,7 @@ The following tables list existing packed RGB formats.
- 0x1005
- -
+ -
- -
- -
@@ -1015,9 +1015,9 @@ The following tables list existing packed RGB formats.
- .. row 14
- -
- -
- -
+ -
+ -
+ -
- -
- -
@@ -1088,7 +1088,7 @@ The following tables list existing packed RGB formats.
- 0x1006
- -
+ -
- -
- -
@@ -1155,9 +1155,9 @@ The following tables list existing packed RGB formats.
- .. row 16
- -
- -
- -
+ -
+ -
+ -
- -
- -
@@ -1228,7 +1228,7 @@ The following tables list existing packed RGB formats.
- 0x1007
- -
+ -
- -
- -
@@ -1295,9 +1295,9 @@ The following tables list existing packed RGB formats.
- .. row 18
- -
- -
- -
+ -
+ -
+ -
- -
- -
@@ -1368,7 +1368,7 @@ The following tables list existing packed RGB formats.
- 0x1008
- -
+ -
- -
- -
@@ -1435,9 +1435,9 @@ The following tables list existing packed RGB formats.
- .. row 20
- -
- -
- -
+ -
+ -
+ -
- -
- -
@@ -1508,7 +1508,7 @@ The following tables list existing packed RGB formats.
- 0x1009
- -
+ -
- -
- -
@@ -1579,7 +1579,7 @@ The following tables list existing packed RGB formats.
- 0x100e
- -
+ -
- -
- -
@@ -1650,7 +1650,7 @@ The following tables list existing packed RGB formats.
- 0x1015
- -
+ -
- -
- -
@@ -1721,7 +1721,7 @@ The following tables list existing packed RGB formats.
- 0x1013
- -
+ -
- -
- -
@@ -1792,7 +1792,7 @@ The following tables list existing packed RGB formats.
- 0x1014
- -
+ -
- -
- -
@@ -1863,7 +1863,7 @@ The following tables list existing packed RGB formats.
- 0x100a
- -
+ -
- -
- -
@@ -1934,7 +1934,7 @@ The following tables list existing packed RGB formats.
- 0x100b
- -
+ -
- -
- -
@@ -2001,9 +2001,9 @@ The following tables list existing packed RGB formats.
- .. row 28
- -
- -
- -
+ -
+ -
+ -
- -
- -
@@ -2074,7 +2074,7 @@ The following tables list existing packed RGB formats.
- 0x100c
- -
+ -
- -
- -
@@ -2141,9 +2141,9 @@ The following tables list existing packed RGB formats.
- .. row 30
- -
- -
- -
+ -
+ -
+ -
- -
- -
@@ -2214,7 +2214,7 @@ The following tables list existing packed RGB formats.
- 0x100d
- -
+ -
- a\ :sub:`7`
- a\ :sub:`6`
@@ -2285,7 +2285,7 @@ The following tables list existing packed RGB formats.
- 0x100f
- -
+ -
- 0
- 0
@@ -2373,14 +2373,14 @@ JEIDA defined bit mapping will be named
- Code
- -
- -
+ -
+ -
- :cspan:`3` Data organization
- .. row 2
- -
- -
+ -
+ -
- Timeslot
- Lane
@@ -2401,7 +2401,7 @@ JEIDA defined bit mapping will be named
- 0
- -
+ -
- -
- d
@@ -2412,11 +2412,11 @@ JEIDA defined bit mapping will be named
- .. row 4
- -
- -
+ -
+ -
- 1
- -
+ -
- -
- d
@@ -2427,11 +2427,11 @@ JEIDA defined bit mapping will be named
- .. row 5
- -
- -
+ -
+ -
- 2
- -
+ -
- -
- d
@@ -2442,11 +2442,11 @@ JEIDA defined bit mapping will be named
- .. row 6
- -
- -
+ -
+ -
- 3
- -
+ -
- -
- b\ :sub:`5`
@@ -2457,11 +2457,11 @@ JEIDA defined bit mapping will be named
- .. row 7
- -
- -
+ -
+ -
- 4
- -
+ -
- -
- b\ :sub:`4`
@@ -2472,11 +2472,11 @@ JEIDA defined bit mapping will be named
- .. row 8
- -
- -
+ -
+ -
- 5
- -
+ -
- -
- b\ :sub:`3`
@@ -2487,11 +2487,11 @@ JEIDA defined bit mapping will be named
- .. row 9
- -
- -
+ -
+ -
- 6
- -
+ -
- -
- b\ :sub:`2`
@@ -2508,7 +2508,7 @@ JEIDA defined bit mapping will be named
- 0
- -
+ -
- d
- d
@@ -2519,11 +2519,11 @@ JEIDA defined bit mapping will be named
- .. row 11
- -
- -
+ -
+ -
- 1
- -
+ -
- b\ :sub:`7`
- d
@@ -2534,11 +2534,11 @@ JEIDA defined bit mapping will be named
- .. row 12
- -
- -
+ -
+ -
- 2
- -
+ -
- b\ :sub:`6`
- d
@@ -2549,11 +2549,11 @@ JEIDA defined bit mapping will be named
- .. row 13
- -
- -
+ -
+ -
- 3
- -
+ -
- g\ :sub:`7`
- b\ :sub:`5`
@@ -2564,11 +2564,11 @@ JEIDA defined bit mapping will be named
- .. row 14
- -
- -
+ -
+ -
- 4
- -
+ -
- g\ :sub:`6`
- b\ :sub:`4`
@@ -2579,11 +2579,11 @@ JEIDA defined bit mapping will be named
- .. row 15
- -
- -
+ -
+ -
- 5
- -
+ -
- r\ :sub:`7`
- b\ :sub:`3`
@@ -2594,11 +2594,11 @@ JEIDA defined bit mapping will be named
- .. row 16
- -
- -
+ -
+ -
- 6
- -
+ -
- r\ :sub:`6`
- b\ :sub:`2`
@@ -2615,7 +2615,7 @@ JEIDA defined bit mapping will be named
- 0
- -
+ -
- d
- d
@@ -2626,11 +2626,11 @@ JEIDA defined bit mapping will be named
- .. row 18
- -
- -
+ -
+ -
- 1
- -
+ -
- b\ :sub:`1`
- d
@@ -2641,11 +2641,11 @@ JEIDA defined bit mapping will be named
- .. row 19
- -
- -
+ -
+ -
- 2
- -
+ -
- b\ :sub:`0`
- d
@@ -2656,11 +2656,11 @@ JEIDA defined bit mapping will be named
- .. row 20
- -
- -
+ -
+ -
- 3
- -
+ -
- g\ :sub:`1`
- b\ :sub:`7`
@@ -2671,11 +2671,11 @@ JEIDA defined bit mapping will be named
- .. row 21
- -
- -
+ -
+ -
- 4
- -
+ -
- g\ :sub:`0`
- b\ :sub:`6`
@@ -2686,11 +2686,11 @@ JEIDA defined bit mapping will be named
- .. row 22
- -
- -
+ -
+ -
- 5
- -
+ -
- r\ :sub:`1`
- b\ :sub:`5`
@@ -2701,11 +2701,11 @@ JEIDA defined bit mapping will be named
- .. row 23
- -
- -
+ -
+ -
- 6
- -
+ -
- r\ :sub:`0`
- b\ :sub:`4`
@@ -2783,13 +2783,13 @@ organization is given as an example for the first pixel only.
- Code
- -
+ -
- :cspan:`11` Data organization
- .. row 2
- -
- -
+ -
+ -
- Bit
- 11
@@ -2822,7 +2822,7 @@ organization is given as an example for the first pixel only.
- 0x3001
- -
+ -
- -
- -
@@ -2853,7 +2853,7 @@ organization is given as an example for the first pixel only.
- 0x3013
- -
+ -
- -
- -
@@ -2884,7 +2884,7 @@ organization is given as an example for the first pixel only.
- 0x3002
- -
+ -
- -
- -
@@ -2915,7 +2915,7 @@ organization is given as an example for the first pixel only.
- 0x3014
- -
+ -
- -
- -
@@ -2946,7 +2946,7 @@ organization is given as an example for the first pixel only.
- 0x3015
- -
+ -
- -
- -
@@ -2977,7 +2977,7 @@ organization is given as an example for the first pixel only.
- 0x3016
- -
+ -
- -
- -
@@ -3008,7 +3008,7 @@ organization is given as an example for the first pixel only.
- 0x3017
- -
+ -
- -
- -
@@ -3039,7 +3039,7 @@ organization is given as an example for the first pixel only.
- 0x3018
- -
+ -
- -
- -
@@ -3070,7 +3070,7 @@ organization is given as an example for the first pixel only.
- 0x300b
- -
+ -
- -
- -
@@ -3101,7 +3101,7 @@ organization is given as an example for the first pixel only.
- 0x300c
- -
+ -
- -
- -
@@ -3132,7 +3132,7 @@ organization is given as an example for the first pixel only.
- 0x3009
- -
+ -
- -
- -
@@ -3163,7 +3163,7 @@ organization is given as an example for the first pixel only.
- 0x300d
- -
+ -
- -
- -
@@ -3194,7 +3194,7 @@ organization is given as an example for the first pixel only.
- 0x3003
- -
+ -
- -
- -
@@ -3221,9 +3221,9 @@ organization is given as an example for the first pixel only.
- .. row 16
- -
- -
- -
+ -
+ -
+ -
- -
- -
@@ -3254,7 +3254,7 @@ organization is given as an example for the first pixel only.
- 0x3004
- -
+ -
- -
- -
@@ -3281,9 +3281,9 @@ organization is given as an example for the first pixel only.
- .. row 18
- -
- -
- -
+ -
+ -
+ -
- -
- -
@@ -3314,7 +3314,7 @@ organization is given as an example for the first pixel only.
- 0x3005
- -
+ -
- -
- -
@@ -3341,9 +3341,9 @@ organization is given as an example for the first pixel only.
- .. row 20
- -
- -
- -
+ -
+ -
+ -
- -
- -
@@ -3374,7 +3374,7 @@ organization is given as an example for the first pixel only.
- 0x3006
- -
+ -
- -
- -
@@ -3401,9 +3401,9 @@ organization is given as an example for the first pixel only.
- .. row 22
- -
- -
- -
+ -
+ -
+ -
- -
- -
@@ -3434,7 +3434,7 @@ organization is given as an example for the first pixel only.
- 0x3007
- -
+ -
- -
- -
@@ -3465,7 +3465,7 @@ organization is given as an example for the first pixel only.
- 0x300e
- -
+ -
- -
- -
@@ -3496,7 +3496,7 @@ organization is given as an example for the first pixel only.
- 0x300a
- -
+ -
- -
- -
@@ -3527,7 +3527,7 @@ organization is given as an example for the first pixel only.
- 0x300f
- -
+ -
- -
- -
@@ -3558,7 +3558,7 @@ organization is given as an example for the first pixel only.
- 0x3008
- -
+ -
- b\ :sub:`11`
- b\ :sub:`10`
@@ -3589,7 +3589,7 @@ organization is given as an example for the first pixel only.
- 0x3010
- -
+ -
- g\ :sub:`11`
- g\ :sub:`10`
@@ -3620,7 +3620,7 @@ organization is given as an example for the first pixel only.
- 0x3011
- -
+ -
- g\ :sub:`11`
- g\ :sub:`10`
@@ -3651,7 +3651,7 @@ organization is given as an example for the first pixel only.
- 0x3012
- -
+ -
- r\ :sub:`11`
- r\ :sub:`10`
@@ -3746,13 +3746,13 @@ the following codes.
- Code
- -
+ -
- :cspan:`31` Data organization
- .. row 2
- -
- -
+ -
+ -
- Bit
- 31
@@ -3825,7 +3825,7 @@ the following codes.
- 0x2001
- -
+ -
- -
- -
@@ -3896,7 +3896,7 @@ the following codes.
- 0x2015
- -
+ -
- -
- -
@@ -3963,9 +3963,9 @@ the following codes.
- .. row 5
- -
- -
- -
+ -
+ -
+ -
- -
- -
@@ -4036,7 +4036,7 @@ the following codes.
- 0x2002
- -
+ -
- -
- -
@@ -4103,9 +4103,9 @@ the following codes.
- .. row 7
- -
- -
- -
+ -
+ -
+ -
- -
- -
@@ -4172,9 +4172,9 @@ the following codes.
- .. row 8
- -
- -
- -
+ -
+ -
+ -
- -
- -
@@ -4241,9 +4241,9 @@ the following codes.
- .. row 9
- -
- -
- -
+ -
+ -
+ -
- -
- -
@@ -4310,9 +4310,9 @@ the following codes.
- .. row 10
- -
- -
- -
+ -
+ -
+ -
- -
- -
@@ -4379,9 +4379,9 @@ the following codes.
- .. row 11
- -
- -
- -
+ -
+ -
+ -
- -
- -
@@ -4452,7 +4452,7 @@ the following codes.
- 0x2003
- -
+ -
- -
- -
@@ -4519,9 +4519,9 @@ the following codes.
- .. row 13
- -
- -
- -
+ -
+ -
+ -
- -
- -
@@ -4588,9 +4588,9 @@ the following codes.
- .. row 14
- -
- -
- -
+ -
+ -
+ -
- -
- -
@@ -4657,9 +4657,9 @@ the following codes.
- .. row 15
- -
- -
- -
+ -
+ -
+ -
- -
- -
@@ -4726,9 +4726,9 @@ the following codes.
- .. row 16
- -
- -
- -
+ -
+ -
+ -
- -
- -
@@ -4795,9 +4795,9 @@ the following codes.
- .. row 17
- -
- -
- -
+ -
+ -
+ -
- -
- -
@@ -4868,7 +4868,7 @@ the following codes.
- 0x2004
- -
+ -
- -
- -
@@ -4935,9 +4935,9 @@ the following codes.
- .. row 19
- -
- -
- -
+ -
+ -
+ -
- -
- -
@@ -5004,9 +5004,9 @@ the following codes.
- .. row 20
- -
- -
- -
+ -
+ -
+ -
- -
- -
@@ -5073,9 +5073,9 @@ the following codes.
- .. row 21
- -
- -
- -
+ -
+ -
+ -
- -
- -
@@ -5142,9 +5142,9 @@ the following codes.
- .. row 22
- -
- -
- -
+ -
+ -
+ -
- -
- -
@@ -5211,9 +5211,9 @@ the following codes.
- .. row 23
- -
- -
- -
+ -
+ -
+ -
- -
- -
@@ -5284,7 +5284,7 @@ the following codes.
- 0x2005
- -
+ -
- -
- -
@@ -5351,9 +5351,9 @@ the following codes.
- .. row 25
- -
- -
- -
+ -
+ -
+ -
- -
- -
@@ -5420,9 +5420,9 @@ the following codes.
- .. row 26
- -
- -
- -
+ -
+ -
+ -
- -
- -
@@ -5489,9 +5489,9 @@ the following codes.
- .. row 27
- -
- -
- -
+ -
+ -
+ -
- -
- -
@@ -5558,9 +5558,9 @@ the following codes.
- .. row 28
- -
- -
- -
+ -
+ -
+ -
- -
- -
@@ -5627,9 +5627,9 @@ the following codes.
- .. row 29
- -
- -
- -
+ -
+ -
+ -
- -
- -
@@ -5700,7 +5700,7 @@ the following codes.
- 0x2006
- -
+ -
- -
- -
@@ -5767,9 +5767,9 @@ the following codes.
- .. row 31
- -
- -
- -
+ -
+ -
+ -
- -
- -
@@ -5836,9 +5836,9 @@ the following codes.
- .. row 32
- -
- -
- -
+ -
+ -
+ -
- -
- -
@@ -5905,9 +5905,9 @@ the following codes.
- .. row 33
- -
- -
- -
+ -
+ -
+ -
- -
- -
@@ -5978,7 +5978,7 @@ the following codes.
- 0x2007
- -
+ -
- -
- -
@@ -6045,9 +6045,9 @@ the following codes.
- .. row 35
- -
- -
- -
+ -
+ -
+ -
- -
- -
@@ -6114,9 +6114,9 @@ the following codes.
- .. row 36
- -
- -
- -
+ -
+ -
+ -
- -
- -
@@ -6183,9 +6183,9 @@ the following codes.
- .. row 37
- -
- -
- -
+ -
+ -
+ -
- -
- -
@@ -6256,7 +6256,7 @@ the following codes.
- 0x2008
- -
+ -
- -
- -
@@ -6323,9 +6323,9 @@ the following codes.
- .. row 39
- -
- -
- -
+ -
+ -
+ -
- -
- -
@@ -6392,9 +6392,9 @@ the following codes.
- .. row 40
- -
- -
- -
+ -
+ -
+ -
- -
- -
@@ -6461,9 +6461,9 @@ the following codes.
- .. row 41
- -
- -
- -
+ -
+ -
+ -
- -
- -
@@ -6534,7 +6534,7 @@ the following codes.
- 0x2009
- -
+ -
- -
- -
@@ -6601,9 +6601,9 @@ the following codes.
- .. row 43
- -
- -
- -
+ -
+ -
+ -
- -
- -
@@ -6670,9 +6670,9 @@ the following codes.
- .. row 44
- -
- -
- -
+ -
+ -
+ -
- -
- -
@@ -6739,9 +6739,9 @@ the following codes.
- .. row 45
- -
- -
- -
+ -
+ -
+ -
- -
- -
@@ -6812,7 +6812,7 @@ the following codes.
- 0x200a
- -
+ -
- -
- -
@@ -6883,7 +6883,7 @@ the following codes.
- 0x2018
- -
+ -
- -
- -
@@ -6950,9 +6950,9 @@ the following codes.
- .. row 48
- -
- -
- -
+ -
+ -
+ -
- -
- -
@@ -7019,9 +7019,9 @@ the following codes.
- .. row 49
- -
- -
- -
+ -
+ -
+ -
- -
- -
@@ -7088,9 +7088,9 @@ the following codes.
- .. row 50
- -
- -
- -
+ -
+ -
+ -
- -
- -
@@ -7161,7 +7161,7 @@ the following codes.
- 0x2019
- -
+ -
- -
- -
@@ -7228,9 +7228,9 @@ the following codes.
- .. row 52
- -
- -
- -
+ -
+ -
+ -
- -
- -
@@ -7297,9 +7297,9 @@ the following codes.
- .. row 53
- -
- -
- -
+ -
+ -
+ -
- -
- -
@@ -7366,9 +7366,9 @@ the following codes.
- .. row 54
- -
- -
- -
+ -
+ -
+ -
- -
- -
@@ -7439,7 +7439,7 @@ the following codes.
- 0x200b
- -
+ -
- -
- -
@@ -7506,9 +7506,9 @@ the following codes.
- .. row 56
- -
- -
- -
+ -
+ -
+ -
- -
- -
@@ -7575,9 +7575,9 @@ the following codes.
- .. row 57
- -
- -
- -
+ -
+ -
+ -
- -
- -
@@ -7644,9 +7644,9 @@ the following codes.
- .. row 58
- -
- -
- -
+ -
+ -
+ -
- -
- -
@@ -7717,7 +7717,7 @@ the following codes.
- 0x200c
- -
+ -
- -
- -
@@ -7784,9 +7784,9 @@ the following codes.
- .. row 60
- -
- -
- -
+ -
+ -
+ -
- -
- -
@@ -7853,9 +7853,9 @@ the following codes.
- .. row 61
- -
- -
- -
+ -
+ -
+ -
- -
- -
@@ -7922,9 +7922,9 @@ the following codes.
- .. row 62
- -
- -
- -
+ -
+ -
+ -
- -
- -
@@ -7995,7 +7995,7 @@ the following codes.
- 0x2013
- -
+ -
- -
- -
@@ -8066,7 +8066,7 @@ the following codes.
- 0x201c
- -
+ -
- -
- -
@@ -8133,9 +8133,9 @@ the following codes.
- .. row 65
- -
- -
- -
+ -
+ -
+ -
- -
- -
@@ -8202,9 +8202,9 @@ the following codes.
- .. row 66
- -
- -
- -
+ -
+ -
+ -
- -
- -
@@ -8271,9 +8271,9 @@ the following codes.
- .. row 67
- -
- -
- -
+ -
+ -
+ -
- -
- -
@@ -8344,7 +8344,7 @@ the following codes.
- 0x201d
- -
+ -
- -
- -
@@ -8411,9 +8411,9 @@ the following codes.
- .. row 69
- -
- -
- -
+ -
+ -
+ -
- -
- -
@@ -8480,9 +8480,9 @@ the following codes.
- .. row 70
- -
- -
- -
+ -
+ -
+ -
- -
- -
@@ -8549,9 +8549,9 @@ the following codes.
- .. row 71
- -
- -
- -
+ -
+ -
+ -
- -
- -
@@ -8622,7 +8622,7 @@ the following codes.
- 0x201e
- -
+ -
- -
- -
@@ -8689,9 +8689,9 @@ the following codes.
- .. row 73
- -
- -
- -
+ -
+ -
+ -
- -
- -
@@ -8758,9 +8758,9 @@ the following codes.
- .. row 74
- -
- -
- -
+ -
+ -
+ -
- -
- -
@@ -8827,9 +8827,9 @@ the following codes.
- .. row 75
- -
- -
- -
+ -
+ -
+ -
- -
- -
@@ -8900,7 +8900,7 @@ the following codes.
- 0x201f
- -
+ -
- -
- -
@@ -8967,9 +8967,9 @@ the following codes.
- .. row 77
- -
- -
- -
+ -
+ -
+ -
- -
- -
@@ -9036,9 +9036,9 @@ the following codes.
- .. row 78
- -
- -
- -
+ -
+ -
+ -
- -
- -
@@ -9105,9 +9105,9 @@ the following codes.
- .. row 79
- -
- -
- -
+ -
+ -
+ -
- -
- -
@@ -9178,7 +9178,7 @@ the following codes.
- 0x200f
- -
+ -
- -
- -
@@ -9245,9 +9245,9 @@ the following codes.
- .. row 81
- -
- -
- -
+ -
+ -
+ -
- -
- -
@@ -9318,7 +9318,7 @@ the following codes.
- 0x2010
- -
+ -
- -
- -
@@ -9385,9 +9385,9 @@ the following codes.
- .. row 83
- -
- -
- -
+ -
+ -
+ -
- -
- -
@@ -9458,7 +9458,7 @@ the following codes.
- 0x2011
- -
+ -
- -
- -
@@ -9525,9 +9525,9 @@ the following codes.
- .. row 85
- -
- -
- -
+ -
+ -
+ -
- -
- -
@@ -9598,7 +9598,7 @@ the following codes.
- 0x2012
- -
+ -
- -
- -
@@ -9665,9 +9665,9 @@ the following codes.
- .. row 87
- -
- -
- -
+ -
+ -
+ -
- -
- -
@@ -9738,7 +9738,7 @@ the following codes.
- 0x2014
- -
+ -
- -
- -
@@ -9805,9 +9805,9 @@ the following codes.
- .. row 89
- -
- -
- -
+ -
+ -
+ -
- -
- -
@@ -9874,9 +9874,9 @@ the following codes.
- .. row 90
- -
- -
- -
+ -
+ -
+ -
- -
- -
@@ -9943,9 +9943,9 @@ the following codes.
- .. row 91
- -
- -
- -
+ -
+ -
+ -
- -
- -
@@ -10016,7 +10016,7 @@ the following codes.
- 0x201a
- -
+ -
- -
- -
@@ -10083,9 +10083,9 @@ the following codes.
- .. row 93
- -
- -
- -
+ -
+ -
+ -
- -
- -
@@ -10156,7 +10156,7 @@ the following codes.
- 0x201b
- -
+ -
- -
- -
@@ -10223,9 +10223,9 @@ the following codes.
- .. row 95
- -
- -
- -
+ -
+ -
+ -
- -
- -
@@ -10296,7 +10296,7 @@ the following codes.
- 0x200d
- -
+ -
- -
- -
@@ -10363,9 +10363,9 @@ the following codes.
- .. row 97
- -
- -
- -
+ -
+ -
+ -
- -
- -
@@ -10436,7 +10436,7 @@ the following codes.
- 0x200e
- -
+ -
- -
- -
@@ -10503,9 +10503,9 @@ the following codes.
- .. row 99
- -
- -
- -
+ -
+ -
+ -
- -
- -
@@ -10576,7 +10576,7 @@ the following codes.
- 0x201a
- -
+ -
- -
- -
@@ -10647,7 +10647,7 @@ the following codes.
- 0x2025
- -
+ -
- -
- -
@@ -10718,7 +10718,7 @@ the following codes.
- 0x2020
- -
+ -
- -
- -
@@ -10785,9 +10785,9 @@ the following codes.
- .. row 103
- -
- -
- -
+ -
+ -
+ -
- -
- -
@@ -10858,7 +10858,7 @@ the following codes.
- 0x2021
- -
+ -
- -
- -
@@ -10925,9 +10925,9 @@ the following codes.
- .. row 105
- -
- -
- -
+ -
+ -
+ -
- -
- -
@@ -10998,7 +10998,7 @@ the following codes.
- 0x2022
- -
+ -
- -
- -
@@ -11065,9 +11065,9 @@ the following codes.
- .. row 107
- -
- -
- -
+ -
+ -
+ -
- -
- -
@@ -11138,7 +11138,7 @@ the following codes.
- 0x2023
- -
+ -
- -
- -
@@ -11205,9 +11205,9 @@ the following codes.
- .. row 109
- -
- -
- -
+ -
+ -
+ -
- -
- -
@@ -11278,7 +11278,7 @@ the following codes.
- 0x2016
- -
+ -
- -
- -
@@ -11349,7 +11349,7 @@ the following codes.
- 0x2017
- -
+ -
- a\ :sub:`7`
- a\ :sub:`6`
@@ -11463,13 +11463,13 @@ The following table lists existing HSV/HSL formats.
- Code
- -
+ -
- :cspan:`31` Data organization
- .. row 2
- -
- -
+ -
+ -
- Bit
- 31
@@ -11542,7 +11542,7 @@ The following table lists existing HSV/HSL formats.
- 0x6001
- -
+ -
- a\ :sub:`7`
- a\ :sub:`6`
@@ -11648,8 +11648,8 @@ The following table lists existing JPEG compressed formats.
- 0x4001
- Besides of its usage for the parallel bus this format is
- recommended for transmission of JPEG data over MIPI CSI bus using
- the User Defined 8-bit Data types.
+ recommended for transmission of JPEG data over MIPI CSI bus using
+ the User Defined 8-bit Data types.
@@ -11687,4 +11687,4 @@ formats.
- 0x5001
- Interleaved raw UYVY and JPEG image format with embedded meta-data
- used by Samsung S3C73MX camera sensors.
+ used by Samsung S3C73MX camera sensors.
diff --git a/Documentation/linux_tv/media/v4l/userp.rst b/Documentation/linux_tv/media/v4l/userp.rst
index 188c0b9f169e..0ecf7a13a7af 100644
--- a/Documentation/linux_tv/media/v4l/userp.rst
+++ b/Documentation/linux_tv/media/v4l/userp.rst
@@ -76,7 +76,7 @@ started. In the write loop, when the application runs out of free
buffers it must wait until an empty buffer can be dequeued and reused.
Two methods exist to suspend execution of the application until one or
more buffers can be dequeued. By default :ref:`VIDIOC_DQBUF
-<VIDIOC_QBUF>`` blocks when no buffer is in the outgoing queue. When the
+<VIDIOC_QBUF>` blocks when no buffer is in the outgoing queue. When the
``O_NONBLOCK`` flag was given to the :ref:`open() <func-open>` function,
:ref:`VIDIOC_DQBUF <VIDIOC_QBUF>` returns immediately with an ``EAGAIN``
error code when no buffer is available. The :ref:`select()
diff --git a/Documentation/linux_tv/media/v4l/v4l2-selection-flags.rst b/Documentation/linux_tv/media/v4l/v4l2-selection-flags.rst
index 6c3531fd0017..3ce3731faf5f 100644
--- a/Documentation/linux_tv/media/v4l/v4l2-selection-flags.rst
+++ b/Documentation/linux_tv/media/v4l/v4l2-selection-flags.rst
@@ -33,10 +33,10 @@ Selection flags
- (1 << 0)
- Suggest the driver it should choose greater or equal rectangle (in
- size) than was requested. Albeit the driver may choose a lesser
- size, it will only do so due to hardware limitations. Without this
- flag (and ``V4L2_SEL_FLAG_LE``) the behaviour is to choose the
- closest possible rectangle.
+ size) than was requested. Albeit the driver may choose a lesser
+ size, it will only do so due to hardware limitations. Without this
+ flag (and ``V4L2_SEL_FLAG_LE``) the behaviour is to choose the
+ closest possible rectangle.
- Yes
@@ -49,8 +49,8 @@ Selection flags
- (1 << 1)
- Suggest the driver it should choose lesser or equal rectangle (in
- size) than was requested. Albeit the driver may choose a greater
- size, it will only do so due to hardware limitations.
+ size) than was requested. Albeit the driver may choose a greater
+ size, it will only do so due to hardware limitations.
- Yes
@@ -63,8 +63,8 @@ Selection flags
- (1 << 2)
- The configuration must not be propagated to any further processing
- steps. If this flag is not given, the configuration is propagated
- inside the subdevice to all further processing steps.
+ steps. If this flag is not given, the configuration is propagated
+ inside the subdevice to all further processing steps.
- No
diff --git a/Documentation/linux_tv/media/v4l/v4l2-selection-targets.rst b/Documentation/linux_tv/media/v4l/v4l2-selection-targets.rst
index e9dcff094c77..7519099a50cd 100644
--- a/Documentation/linux_tv/media/v4l/v4l2-selection-targets.rst
+++ b/Documentation/linux_tv/media/v4l/v4l2-selection-targets.rst
@@ -60,7 +60,7 @@ of the two interfaces they are used.
- 0x0002
- Bounds of the crop rectangle. All valid crop rectangles fit inside
- the crop bounds rectangle.
+ the crop bounds rectangle.
- Yes
@@ -73,12 +73,12 @@ of the two interfaces they are used.
- 0x0003
- The native size of the device, e.g. a sensor's pixel array.
- ``left`` and ``top`` fields are zero for this target. Setting the
- native size will generally only make sense for memory to memory
- devices where the software can create a canvas of a given size in
- which for example a video frame can be composed. In that case
- V4L2_SEL_TGT_NATIVE_SIZE can be used to configure the size of
- that canvas.
+ ``left`` and ``top`` fields are zero for this target. Setting the
+ native size will generally only make sense for memory to memory
+ devices where the software can create a canvas of a given size in
+ which for example a video frame can be composed. In that case
+ V4L2_SEL_TGT_NATIVE_SIZE can be used to configure the size of
+ that canvas.
- Yes
@@ -115,7 +115,7 @@ of the two interfaces they are used.
- 0x0102
- Bounds of the compose rectangle. All valid compose rectangles fit
- inside the compose bounds rectangle.
+ inside the compose bounds rectangle.
- Yes
@@ -128,7 +128,7 @@ of the two interfaces they are used.
- 0x0103
- The active area and all padding pixels that are inserted or
- modified by hardware.
+ modified by hardware.
- Yes
diff --git a/Documentation/linux_tv/media/v4l/v4l2grab.c.rst b/Documentation/linux_tv/media/v4l/v4l2grab.c.rst
index 817cad406c6f..5aabd0b7b089 100644
--- a/Documentation/linux_tv/media/v4l/v4l2grab.c.rst
+++ b/Documentation/linux_tv/media/v4l/v4l2grab.c.rst
@@ -33,137 +33,137 @@ file: media/v4l/v4l2grab.c
#define CLEAR(x) memset(&(x), 0, sizeof(x))
struct buffer {
- void *start;
- size_t length;
+ void *start;
+ size_t length;
};
static void xioctl(int fh, int request, void *arg)
{
- int r;
+ int r;
- do {
- r = v4l2_ioctl(fh, request, arg);
- } while (r == -1 && ((errno == EINTR) || (errno == EAGAIN)));
+ do {
+ r = v4l2_ioctl(fh, request, arg);
+ } while (r == -1 && ((errno == EINTR) || (errno == EAGAIN)));
- if (r == -1) {
- fprintf(stderr, "error %d, %s\\n", errno, strerror(errno));
- exit(EXIT_FAILURE);
- }
+ if (r == -1) {
+ fprintf(stderr, "error %d, %s\\n", errno, strerror(errno));
+ exit(EXIT_FAILURE);
+ }
}
int main(int argc, char **argv)
{
- struct v4l2_format fmt;
- struct v4l2_buffer buf;
- struct v4l2_requestbuffers req;
- enum v4l2_buf_type type;
- fd_set fds;
- struct timeval tv;
- int r, fd = -1;
- unsigned int i, n_buffers;
- char *dev_name = "/dev/video0";
- char out_name[256];
- FILE *fout;
- struct buffer *buffers;
-
- fd = v4l2_open(dev_name, O_RDWR | O_NONBLOCK, 0);
- if (fd < 0) {
- perror("Cannot open device");
- exit(EXIT_FAILURE);
- }
-
- CLEAR(fmt);
- fmt.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
- fmt.fmt.pix.width = 640;
- fmt.fmt.pix.height = 480;
- fmt.fmt.pix.pixelformat = V4L2_PIX_FMT_RGB24;
- fmt.fmt.pix.field = V4L2_FIELD_INTERLACED;
- xioctl(fd, VIDIOC_S_FMT, &fmt);
- if (fmt.fmt.pix.pixelformat != V4L2_PIX_FMT_RGB24) {
- printf("Libv4l didn't accept RGB24 format. Can't proceed.\\n");
- exit(EXIT_FAILURE);
- }
- if ((fmt.fmt.pix.width != 640) || (fmt.fmt.pix.height != 480))
- printf("Warning: driver is sending image at %dx%d\\n",
- fmt.fmt.pix.width, fmt.fmt.pix.height);
-
- CLEAR(req);
- req.count = 2;
- req.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
- req.memory = V4L2_MEMORY_MMAP;
- xioctl(fd, VIDIOC_REQBUFS, &req);
-
- buffers = calloc(req.count, sizeof(*buffers));
- for (n_buffers = 0; n_buffers < req.count; ++n_buffers) {
- CLEAR(buf);
-
- buf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
- buf.memory = V4L2_MEMORY_MMAP;
- buf.index = n_buffers;
-
- xioctl(fd, VIDIOC_QUERYBUF, &buf);
-
- buffers[n_buffers].length = buf.length;
- buffers[n_buffers].start = v4l2_mmap(NULL, buf.length,
- PROT_READ | PROT_WRITE, MAP_SHARED,
- fd, buf.m.offset);
-
- if (MAP_FAILED == buffers[n_buffers].start) {
- perror("mmap");
- exit(EXIT_FAILURE);
- }
- }
-
- for (i = 0; i < n_buffers; ++i) {
- CLEAR(buf);
- buf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
- buf.memory = V4L2_MEMORY_MMAP;
- buf.index = i;
- xioctl(fd, VIDIOC_QBUF, &buf);
- }
- type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
-
- xioctl(fd, VIDIOC_STREAMON, &type);
- for (i = 0; i < 20; i++) {
- do {
- FD_ZERO(&fds);
- FD_SET(fd, &fds);
-
- /* Timeout. */
- tv.tv_sec = 2;
- tv.tv_usec = 0;
-
- r = select(fd + 1, &fds, NULL, NULL, &tv);
- } while ((r == -1 && (errno = EINTR)));
- if (r == -1) {
- perror("select");
- return errno;
- }
-
- CLEAR(buf);
- buf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
- buf.memory = V4L2_MEMORY_MMAP;
- xioctl(fd, VIDIOC_DQBUF, &buf);
-
- sprintf(out_name, "out%03d.ppm", i);
- fout = fopen(out_name, "w");
- if (!fout) {
- perror("Cannot open image");
- exit(EXIT_FAILURE);
- }
- fprintf(fout, "P6\\n%d %d 255\\n",
- fmt.fmt.pix.width, fmt.fmt.pix.height);
- fwrite(buffers[buf.index].start, buf.bytesused, 1, fout);
- fclose(fout);
-
- xioctl(fd, VIDIOC_QBUF, &buf);
- }
-
- type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
- xioctl(fd, VIDIOC_STREAMOFF, &type);
- for (i = 0; i < n_buffers; ++i)
- v4l2_munmap(buffers[i].start, buffers[i].length);
- v4l2_close(fd);
-
- return 0;
+ struct v4l2_format fmt;
+ struct v4l2_buffer buf;
+ struct v4l2_requestbuffers req;
+ enum v4l2_buf_type type;
+ fd_set fds;
+ struct timeval tv;
+ int r, fd = -1;
+ unsigned int i, n_buffers;
+ char *dev_name = "/dev/video0";
+ char out_name[256];
+ FILE *fout;
+ struct buffer *buffers;
+
+ fd = v4l2_open(dev_name, O_RDWR | O_NONBLOCK, 0);
+ if (fd < 0) {
+ perror("Cannot open device");
+ exit(EXIT_FAILURE);
+ }
+
+ CLEAR(fmt);
+ fmt.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
+ fmt.fmt.pix.width = 640;
+ fmt.fmt.pix.height = 480;
+ fmt.fmt.pix.pixelformat = V4L2_PIX_FMT_RGB24;
+ fmt.fmt.pix.field = V4L2_FIELD_INTERLACED;
+ xioctl(fd, VIDIOC_S_FMT, &fmt);
+ if (fmt.fmt.pix.pixelformat != V4L2_PIX_FMT_RGB24) {
+ printf("Libv4l didn't accept RGB24 format. Can't proceed.\\n");
+ exit(EXIT_FAILURE);
+ }
+ if ((fmt.fmt.pix.width != 640) || (fmt.fmt.pix.height != 480))
+ printf("Warning: driver is sending image at %dx%d\\n",
+ fmt.fmt.pix.width, fmt.fmt.pix.height);
+
+ CLEAR(req);
+ req.count = 2;
+ req.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
+ req.memory = V4L2_MEMORY_MMAP;
+ xioctl(fd, VIDIOC_REQBUFS, &req);
+
+ buffers = calloc(req.count, sizeof(*buffers));
+ for (n_buffers = 0; n_buffers < req.count; ++n_buffers) {
+ CLEAR(buf);
+
+ buf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
+ buf.memory = V4L2_MEMORY_MMAP;
+ buf.index = n_buffers;
+
+ xioctl(fd, VIDIOC_QUERYBUF, &buf);
+
+ buffers[n_buffers].length = buf.length;
+ buffers[n_buffers].start = v4l2_mmap(NULL, buf.length,
+ PROT_READ | PROT_WRITE, MAP_SHARED,
+ fd, buf.m.offset);
+
+ if (MAP_FAILED == buffers[n_buffers].start) {
+ perror("mmap");
+ exit(EXIT_FAILURE);
+ }
+ }
+
+ for (i = 0; i < n_buffers; ++i) {
+ CLEAR(buf);
+ buf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
+ buf.memory = V4L2_MEMORY_MMAP;
+ buf.index = i;
+ xioctl(fd, VIDIOC_QBUF, &buf);
+ }
+ type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
+
+ xioctl(fd, VIDIOC_STREAMON, &type);
+ for (i = 0; i < 20; i++) {
+ do {
+ FD_ZERO(&fds);
+ FD_SET(fd, &fds);
+
+ /* Timeout. */
+ tv.tv_sec = 2;
+ tv.tv_usec = 0;
+
+ r = select(fd + 1, &fds, NULL, NULL, &tv);
+ } while ((r == -1 && (errno = EINTR)));
+ if (r == -1) {
+ perror("select");
+ return errno;
+ }
+
+ CLEAR(buf);
+ buf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
+ buf.memory = V4L2_MEMORY_MMAP;
+ xioctl(fd, VIDIOC_DQBUF, &buf);
+
+ sprintf(out_name, "out%03d.ppm", i);
+ fout = fopen(out_name, "w");
+ if (!fout) {
+ perror("Cannot open image");
+ exit(EXIT_FAILURE);
+ }
+ fprintf(fout, "P6\\n%d %d 255\\n",
+ fmt.fmt.pix.width, fmt.fmt.pix.height);
+ fwrite(buffers[buf.index].start, buf.bytesused, 1, fout);
+ fclose(fout);
+
+ xioctl(fd, VIDIOC_QBUF, &buf);
+ }
+
+ type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
+ xioctl(fd, VIDIOC_STREAMOFF, &type);
+ for (i = 0; i < n_buffers; ++i)
+ v4l2_munmap(buffers[i].start, buffers[i].length);
+ v4l2_close(fd);
+
+ return 0;
}
diff --git a/Documentation/linux_tv/media/v4l/video.rst b/Documentation/linux_tv/media/v4l/video.rst
index b3c2b1d59f24..e38ebe192614 100644
--- a/Documentation/linux_tv/media/v4l/video.rst
+++ b/Documentation/linux_tv/media/v4l/video.rst
@@ -35,16 +35,16 @@ all the output ioctls when the device has one or more outputs.
int index;
if (-1 == ioctl(fd, VIDIOC_G_INPUT, &index)) {
- perror("VIDIOC_G_INPUT");
- exit(EXIT_FAILURE);
+ perror("VIDIOC_G_INPUT");
+ exit(EXIT_FAILURE);
}
memset(&input, 0, sizeof(input));
input.index = index;
if (-1 == ioctl(fd, VIDIOC_ENUMINPUT, &input)) {
- perror("VIDIOC_ENUMINPUT");
- exit(EXIT_FAILURE);
+ perror("VIDIOC_ENUMINPUT");
+ exit(EXIT_FAILURE);
}
printf("Current input: %s\\n", input.name);
@@ -58,6 +58,6 @@ all the output ioctls when the device has one or more outputs.
index = 0;
if (-1 == ioctl(fd, VIDIOC_S_INPUT, &index)) {
- perror("VIDIOC_S_INPUT");
- exit(EXIT_FAILURE);
+ perror("VIDIOC_S_INPUT");
+ exit(EXIT_FAILURE);
}
diff --git a/Documentation/linux_tv/media/v4l/vidioc-create-bufs.rst b/Documentation/linux_tv/media/v4l/vidioc-create-bufs.rst
index 0535758fec14..5ba95ac0a5ce 100644
--- a/Documentation/linux_tv/media/v4l/vidioc-create-bufs.rst
+++ b/Documentation/linux_tv/media/v4l/vidioc-create-bufs.rst
@@ -94,12 +94,12 @@ than the number requested.
- ``count``
- The number of buffers requested or granted. If count == 0, then
- :ref:`VIDIOC_CREATE_BUFS` will set ``index`` to the current number of
- created buffers, and it will check the validity of ``memory`` and
- ``format.type``. If those are invalid -1 is returned and errno is
- set to ``EINVAL`` error code, otherwise :ref:`VIDIOC_CREATE_BUFS` returns
- 0. It will never set errno to ``EBUSY`` error code in this particular
- case.
+ :ref:`VIDIOC_CREATE_BUFS` will set ``index`` to the current number of
+ created buffers, and it will check the validity of ``memory`` and
+ ``format.type``. If those are invalid -1 is returned and errno is
+ set to ``EINVAL`` error code, otherwise :ref:`VIDIOC_CREATE_BUFS` returns
+ 0. It will never set errno to ``EBUSY`` error code in this particular
+ case.
- .. row 3
@@ -108,8 +108,8 @@ than the number requested.
- ``memory``
- Applications set this field to ``V4L2_MEMORY_MMAP``,
- ``V4L2_MEMORY_DMABUF`` or ``V4L2_MEMORY_USERPTR``. See
- :ref:`v4l2-memory`
+ ``V4L2_MEMORY_DMABUF`` or ``V4L2_MEMORY_USERPTR``. See
+ :ref:`v4l2-memory`
- .. row 4
@@ -126,7 +126,7 @@ than the number requested.
- ``reserved``\ [8]
- A place holder for future extensions. Drivers and applications
- must set the array to zero.
+ must set the array to zero.
diff --git a/Documentation/linux_tv/media/v4l/vidioc-cropcap.rst b/Documentation/linux_tv/media/v4l/vidioc-cropcap.rst
index 8391fc19126f..2e2a24f652a3 100644
--- a/Documentation/linux_tv/media/v4l/vidioc-cropcap.rst
+++ b/Documentation/linux_tv/media/v4l/vidioc-cropcap.rst
@@ -65,9 +65,9 @@ overlay devices.
- ``type``
- Type of the data stream, set by the application. Only these types
- are valid here: ``V4L2_BUF_TYPE_VIDEO_CAPTURE``,
- ``V4L2_BUF_TYPE_VIDEO_OUTPUT`` and
- ``V4L2_BUF_TYPE_VIDEO_OVERLAY``. See :ref:`v4l2-buf-type`.
+ are valid here: ``V4L2_BUF_TYPE_VIDEO_CAPTURE``,
+ ``V4L2_BUF_TYPE_VIDEO_OUTPUT`` and
+ ``V4L2_BUF_TYPE_VIDEO_OVERLAY``. See :ref:`v4l2-buf-type`.
- .. row 2
@@ -76,11 +76,11 @@ overlay devices.
- ``bounds``
- Defines the window within capturing or output is possible, this
- may exclude for example the horizontal and vertical blanking
- areas. The cropping rectangle cannot exceed these limits. Width
- and height are defined in pixels, the driver writer is free to
- choose origin and units of the coordinate system in the analog
- domain.
+ may exclude for example the horizontal and vertical blanking
+ areas. The cropping rectangle cannot exceed these limits. Width
+ and height are defined in pixels, the driver writer is free to
+ choose origin and units of the coordinate system in the analog
+ domain.
- .. row 3
@@ -89,10 +89,10 @@ overlay devices.
- ``defrect``
- Default cropping rectangle, it shall cover the "whole picture".
- Assuming pixel aspect 1/1 this could be for example a 640 × 480
- rectangle for NTSC, a 768 × 576 rectangle for PAL and SECAM
- centered over the active picture area. The same co-ordinate system
- as for ``bounds`` is used.
+ Assuming pixel aspect 1/1 this could be for example a 640 × 480
+ rectangle for NTSC, a 768 × 576 rectangle for PAL and SECAM
+ centered over the active picture area. The same co-ordinate system
+ as for ``bounds`` is used.
- .. row 4
@@ -101,12 +101,12 @@ overlay devices.
- ``pixelaspect``
- This is the pixel aspect (y / x) when no scaling is applied, the
- ratio of the actual sampling frequency and the frequency required
- to get square pixels.
+ ratio of the actual sampling frequency and the frequency required
+ to get square pixels.
- When cropping coordinates refer to square pixels, the driver sets
- ``pixelaspect`` to 1/1. Other common values are 54/59 for PAL and
- SECAM, 11/10 for NTSC sampled according to [:ref:`itu601`].
+ When cropping coordinates refer to square pixels, the driver sets
+ ``pixelaspect`` to 1/1. Other common values are 54/59 for PAL and
+ SECAM, 11/10 for NTSC sampled according to [:ref:`itu601`].
@@ -125,7 +125,7 @@ overlay devices.
- ``left``
- Horizontal offset of the top, left corner of the rectangle, in
- pixels.
+ pixels.
- .. row 2
@@ -134,7 +134,7 @@ overlay devices.
- ``top``
- Vertical offset of the top, left corner of the rectangle, in
- pixels.
+ pixels.
- .. row 3
diff --git a/Documentation/linux_tv/media/v4l/vidioc-dbg-g-chip-info.rst b/Documentation/linux_tv/media/v4l/vidioc-dbg-g-chip-info.rst
index da8bd46288dc..7cc3bd42ccd4 100644
--- a/Documentation/linux_tv/media/v4l/vidioc-dbg-g-chip-info.rst
+++ b/Documentation/linux_tv/media/v4l/vidioc-dbg-g-chip-info.rst
@@ -100,23 +100,23 @@ instructions.
- .. row 3
- -
+ -
- __u32
- ``addr``
- Match a chip by this number, interpreted according to the ``type``
- field.
+ field.
- .. row 4
- -
+ -
- char
- ``name[32]``
- Match a chip by this name, interpreted according to the ``type``
- field. Currently unused.
+ field. Currently unused.
@@ -151,9 +151,9 @@ instructions.
- ``flags``
- Set by the driver. If ``V4L2_CHIP_FL_READABLE`` is set, then the
- driver supports reading registers from the device. If
- ``V4L2_CHIP_FL_WRITABLE`` is set, then it supports writing
- registers.
+ driver supports reading registers from the device. If
+ ``V4L2_CHIP_FL_WRITABLE`` is set, then it supports writing
+ registers.
- .. row 4
@@ -180,7 +180,7 @@ instructions.
- 0
- Match the nth chip on the card, zero for the bridge chip. Does not
- match sub-devices.
+ match sub-devices.
- .. row 2
diff --git a/Documentation/linux_tv/media/v4l/vidioc-dbg-g-register.rst b/Documentation/linux_tv/media/v4l/vidioc-dbg-g-register.rst
index c1b21f3f73f0..f83a83b48cd6 100644
--- a/Documentation/linux_tv/media/v4l/vidioc-dbg-g-register.rst
+++ b/Documentation/linux_tv/media/v4l/vidioc-dbg-g-register.rst
@@ -109,23 +109,23 @@ instructions.
- .. row 3
- -
+ -
- __u32
- ``addr``
- Match a chip by this number, interpreted according to the ``type``
- field.
+ field.
- .. row 4
- -
+ -
- char
- ``name[32]``
- Match a chip by this name, interpreted according to the ``type``
- field. Currently unused.
+ field. Currently unused.
@@ -185,7 +185,7 @@ instructions.
- 0
- Match the nth chip on the card, zero for the bridge chip. Does not
- match sub-devices.
+ match sub-devices.
- .. row 2
diff --git a/Documentation/linux_tv/media/v4l/vidioc-decoder-cmd.rst b/Documentation/linux_tv/media/v4l/vidioc-decoder-cmd.rst
index f75698d7caca..c1d82336a60a 100644
--- a/Documentation/linux_tv/media/v4l/vidioc-decoder-cmd.rst
+++ b/Documentation/linux_tv/media/v4l/vidioc-decoder-cmd.rst
@@ -69,8 +69,8 @@ introduced in Linux 3.3.
- ``cmd``
- -
- -
+ -
+ -
- The decoder command, see :ref:`decoder-cmds`.
- .. row 2
@@ -79,10 +79,10 @@ introduced in Linux 3.3.
- ``flags``
- -
- -
+ -
+ -
- Flags to go with the command. If no flags are defined for this
- command, drivers and applications must set this field to zero.
+ command, drivers and applications must set this field to zero.
- .. row 3
@@ -90,97 +90,97 @@ introduced in Linux 3.3.
- (anonymous)
- -
- -
- -
+ -
+ -
+ -
- .. row 4
- -
+ -
- struct
- ``start``
- -
+ -
- Structure containing additional data for the
- ``V4L2_DEC_CMD_START`` command.
+ ``V4L2_DEC_CMD_START`` command.
- .. row 5
- -
- -
+ -
+ -
- __s32
- ``speed``
- Playback speed and direction. The playback speed is defined as
- ``speed``/1000 of the normal speed. So 1000 is normal playback.
- Negative numbers denote reverse playback, so -1000 does reverse
- playback at normal speed. Speeds -1, 0 and 1 have special
- meanings: speed 0 is shorthand for 1000 (normal playback). A speed
- of 1 steps just one frame forward, a speed of -1 steps just one
- frame back.
+ ``speed``/1000 of the normal speed. So 1000 is normal playback.
+ Negative numbers denote reverse playback, so -1000 does reverse
+ playback at normal speed. Speeds -1, 0 and 1 have special
+ meanings: speed 0 is shorthand for 1000 (normal playback). A speed
+ of 1 steps just one frame forward, a speed of -1 steps just one
+ frame back.
- .. row 6
- -
- -
+ -
+ -
- __u32
- ``format``
- Format restrictions. This field is set by the driver, not the
- application. Possible values are ``V4L2_DEC_START_FMT_NONE`` if
- there are no format restrictions or ``V4L2_DEC_START_FMT_GOP`` if
- the decoder operates on full GOPs (*Group Of Pictures*). This is
- usually the case for reverse playback: the decoder needs full
- GOPs, which it can then play in reverse order. So to implement
- reverse playback the application must feed the decoder the last
- GOP in the video file, then the GOP before that, etc. etc.
+ application. Possible values are ``V4L2_DEC_START_FMT_NONE`` if
+ there are no format restrictions or ``V4L2_DEC_START_FMT_GOP`` if
+ the decoder operates on full GOPs (*Group Of Pictures*). This is
+ usually the case for reverse playback: the decoder needs full
+ GOPs, which it can then play in reverse order. So to implement
+ reverse playback the application must feed the decoder the last
+ GOP in the video file, then the GOP before that, etc. etc.
- .. row 7
- -
+ -
- struct
- ``stop``
- -
+ -
- Structure containing additional data for the ``V4L2_DEC_CMD_STOP``
- command.
+ command.
- .. row 8
- -
- -
+ -
+ -
- __u64
- ``pts``
- Stop playback at this ``pts`` or immediately if the playback is
- already past that timestamp. Leave to 0 if you want to stop after
- the last frame was decoded.
+ already past that timestamp. Leave to 0 if you want to stop after
+ the last frame was decoded.
- .. row 9
- -
+ -
- struct
- ``raw``
- -
- -
+ -
+ -
- .. row 10
- -
- -
+ -
+ -
- __u32
- ``data``\ [16]
- Reserved for future extensions. Drivers and applications must set
- the array to zero.
+ the array to zero.
@@ -199,12 +199,12 @@ introduced in Linux 3.3.
- 0
- Start the decoder. When the decoder is already running or paused,
- this command will just change the playback speed. That means that
- calling ``V4L2_DEC_CMD_START`` when the decoder was paused will
- *not* resume the decoder. You have to explicitly call
- ``V4L2_DEC_CMD_RESUME`` for that. This command has one flag:
- ``V4L2_DEC_CMD_START_MUTE_AUDIO``. If set, then audio will be
- muted when playing back at a non-standard speed.
+ this command will just change the playback speed. That means that
+ calling ``V4L2_DEC_CMD_START`` when the decoder was paused will
+ *not* resume the decoder. You have to explicitly call
+ ``V4L2_DEC_CMD_RESUME`` for that. This command has one flag:
+ ``V4L2_DEC_CMD_START_MUTE_AUDIO``. If set, then audio will be
+ muted when playing back at a non-standard speed.
- .. row 2
@@ -213,23 +213,23 @@ introduced in Linux 3.3.
- 1
- Stop the decoder. When the decoder is already stopped, this
- command does nothing. This command has two flags: if
- ``V4L2_DEC_CMD_STOP_TO_BLACK`` is set, then the decoder will set
- the picture to black after it stopped decoding. Otherwise the last
- image will repeat. mem2mem decoders will stop producing new frames
- altogether. They will send a ``V4L2_EVENT_EOS`` event when the
- last frame has been decoded and all frames are ready to be
- dequeued and will set the ``V4L2_BUF_FLAG_LAST`` buffer flag on
- the last buffer of the capture queue to indicate there will be no
- new buffers produced to dequeue. This buffer may be empty,
- indicated by the driver setting the ``bytesused`` field to 0. Once
- the ``V4L2_BUF_FLAG_LAST`` flag was set, the
- :ref:`VIDIOC_DQBUF <VIDIOC_QBUF>` ioctl will not block anymore,
- but return an ``EPIPE`` error code. If
- ``V4L2_DEC_CMD_STOP_IMMEDIATELY`` is set, then the decoder stops
- immediately (ignoring the ``pts`` value), otherwise it will keep
- decoding until timestamp >= pts or until the last of the pending
- data from its internal buffers was decoded.
+ command does nothing. This command has two flags: if
+ ``V4L2_DEC_CMD_STOP_TO_BLACK`` is set, then the decoder will set
+ the picture to black after it stopped decoding. Otherwise the last
+ image will repeat. mem2mem decoders will stop producing new frames
+ altogether. They will send a ``V4L2_EVENT_EOS`` event when the
+ last frame has been decoded and all frames are ready to be
+ dequeued and will set the ``V4L2_BUF_FLAG_LAST`` buffer flag on
+ the last buffer of the capture queue to indicate there will be no
+ new buffers produced to dequeue. This buffer may be empty,
+ indicated by the driver setting the ``bytesused`` field to 0. Once
+ the ``V4L2_BUF_FLAG_LAST`` flag was set, the
+ :ref:`VIDIOC_DQBUF <VIDIOC_QBUF>` ioctl will not block anymore,
+ but return an ``EPIPE`` error code. If
+ ``V4L2_DEC_CMD_STOP_IMMEDIATELY`` is set, then the decoder stops
+ immediately (ignoring the ``pts`` value), otherwise it will keep
+ decoding until timestamp >= pts or until the last of the pending
+ data from its internal buffers was decoded.
- .. row 3
@@ -238,10 +238,10 @@ introduced in Linux 3.3.
- 2
- Pause the decoder. When the decoder has not been started yet, the
- driver will return an ``EPERM`` error code. When the decoder is
- already paused, this command does nothing. This command has one
- flag: if ``V4L2_DEC_CMD_PAUSE_TO_BLACK`` is set, then set the
- decoder output to black when paused.
+ driver will return an ``EPERM`` error code. When the decoder is
+ already paused, this command does nothing. This command has one
+ flag: if ``V4L2_DEC_CMD_PAUSE_TO_BLACK`` is set, then set the
+ decoder output to black when paused.
- .. row 4
@@ -250,9 +250,9 @@ introduced in Linux 3.3.
- 3
- Resume decoding after a PAUSE command. When the decoder has not
- been started yet, the driver will return an ``EPERM`` error code. When
- the decoder is already running, this command does nothing. No
- flags are defined for this command.
+ been started yet, the driver will return an ``EPERM`` error code. When
+ the decoder is already running, this command does nothing. No
+ flags are defined for this command.
diff --git a/Documentation/linux_tv/media/v4l/vidioc-dqevent.rst b/Documentation/linux_tv/media/v4l/vidioc-dqevent.rst
index ed37e07bbdc8..4d813a903693 100644
--- a/Documentation/linux_tv/media/v4l/vidioc-dqevent.rst
+++ b/Documentation/linux_tv/media/v4l/vidioc-dqevent.rst
@@ -52,7 +52,7 @@ call.
- ``type``
- -
+ -
- Type of the event, see :ref:`event-type`.
- .. row 2
@@ -61,12 +61,12 @@ call.
- ``u``
- -
- -
+ -
+ -
- .. row 3
- -
+ -
- struct :ref:`v4l2_event_vsync <v4l2-event-vsync>`
- ``vsync``
@@ -75,7 +75,7 @@ call.
- .. row 4
- -
+ -
- struct :ref:`v4l2_event_ctrl <v4l2-event-ctrl>`
- ``ctrl``
@@ -84,7 +84,7 @@ call.
- .. row 5
- -
+ -
- struct :ref:`v4l2_event_frame_sync <v4l2-event-frame-sync>`
- ``frame_sync``
@@ -93,7 +93,7 @@ call.
- .. row 6
- -
+ -
- struct :ref:`v4l2_event_motion_det <v4l2-event-motion-det>`
- ``motion_det``
@@ -102,7 +102,7 @@ call.
- .. row 7
- -
+ -
- struct :ref:`v4l2_event_src_change <v4l2-event-src-change>`
- ``src_change``
@@ -111,13 +111,13 @@ call.
- .. row 8
- -
+ -
- __u8
- ``data``\ [64]
- Event data. Defined by the event type. The union should be used to
- define easily accessible type for events.
+ define easily accessible type for events.
- .. row 9
@@ -125,7 +125,7 @@ call.
- ``pending``
- -
+ -
- Number of pending events excluding this one.
- .. row 10
@@ -134,10 +134,10 @@ call.
- ``sequence``
- -
+ -
- Event sequence number. The sequence number is incremented for
- every subscribed event that takes place. If sequence numbers are
- not contiguous it means that events have been lost.
+ every subscribed event that takes place. If sequence numbers are
+ not contiguous it means that events have been lost.
- .. row 11
@@ -145,10 +145,10 @@ call.
- ``timestamp``
- -
+ -
- Event timestamp. The timestamp has been taken from the
- ``CLOCK_MONOTONIC`` clock. To access the same clock outside V4L2,
- use :c:func:`clock_gettime(2)`.
+ ``CLOCK_MONOTONIC`` clock. To access the same clock outside V4L2,
+ use :c:func:`clock_gettime(2)`.
- .. row 12
@@ -156,10 +156,10 @@ call.
- ``id``
- -
+ -
- The ID associated with the event source. If the event does not
- have an associated ID (this depends on the event type), then this
- is 0.
+ have an associated ID (this depends on the event type), then this
+ is 0.
- .. row 13
@@ -167,9 +167,9 @@ call.
- ``reserved``\ [8]
- -
+ -
- Reserved for future extensions. Drivers must set the array to
- zero.
+ zero.
@@ -188,7 +188,7 @@ call.
- 0
- All events. V4L2_EVENT_ALL is valid only for
- VIDIOC_UNSUBSCRIBE_EVENT for unsubscribing all events at once.
+ VIDIOC_UNSUBSCRIBE_EVENT for unsubscribing all events at once.
- .. row 2
@@ -197,8 +197,8 @@ call.
- 1
- This event is triggered on the vertical sync. This event has a
- struct :ref:`v4l2_event_vsync <v4l2-event-vsync>` associated
- with it.
+ struct :ref:`v4l2_event_vsync <v4l2-event-vsync>` associated
+ with it.
- .. row 3
@@ -207,8 +207,8 @@ call.
- 2
- This event is triggered when the end of a stream is reached. This
- is typically used with MPEG decoders to report to the application
- when the last of the MPEG stream has been decoded.
+ is typically used with MPEG decoders to report to the application
+ when the last of the MPEG stream has been decoded.
- .. row 4
@@ -217,28 +217,28 @@ call.
- 3
- This event requires that the ``id`` matches the control ID from
- which you want to receive events. This event is triggered if the
- control's value changes, if a button control is pressed or if the
- control's flags change. This event has a struct
- :ref:`v4l2_event_ctrl <v4l2-event-ctrl>` associated with it.
- This struct contains much of the same information as struct
- :ref:`v4l2_queryctrl <v4l2-queryctrl>` and struct
- :ref:`v4l2_control <v4l2-control>`.
-
- If the event is generated due to a call to
- :ref:`VIDIOC_S_CTRL <VIDIOC_G_CTRL>` or
- :ref:`VIDIOC_S_EXT_CTRLS <VIDIOC_G_EXT_CTRLS>`, then the
- event will *not* be sent to the file handle that called the ioctl
- function. This prevents nasty feedback loops. If you *do* want to
- get the event, then set the ``V4L2_EVENT_SUB_FL_ALLOW_FEEDBACK``
- flag.
-
- This event type will ensure that no information is lost when more
- events are raised than there is room internally. In that case the
- struct :ref:`v4l2_event_ctrl <v4l2-event-ctrl>` of the
- second-oldest event is kept, but the ``changes`` field of the
- second-oldest event is ORed with the ``changes`` field of the
- oldest event.
+ which you want to receive events. This event is triggered if the
+ control's value changes, if a button control is pressed or if the
+ control's flags change. This event has a struct
+ :ref:`v4l2_event_ctrl <v4l2-event-ctrl>` associated with it.
+ This struct contains much of the same information as struct
+ :ref:`v4l2_queryctrl <v4l2-queryctrl>` and struct
+ :ref:`v4l2_control <v4l2-control>`.
+
+ If the event is generated due to a call to
+ :ref:`VIDIOC_S_CTRL <VIDIOC_G_CTRL>` or
+ :ref:`VIDIOC_S_EXT_CTRLS <VIDIOC_G_EXT_CTRLS>`, then the
+ event will *not* be sent to the file handle that called the ioctl
+ function. This prevents nasty feedback loops. If you *do* want to
+ get the event, then set the ``V4L2_EVENT_SUB_FL_ALLOW_FEEDBACK``
+ flag.
+
+ This event type will ensure that no information is lost when more
+ events are raised than there is room internally. In that case the
+ struct :ref:`v4l2_event_ctrl <v4l2-event-ctrl>` of the
+ second-oldest event is kept, but the ``changes`` field of the
+ second-oldest event is ORed with the ``changes`` field of the
+ oldest event.
- .. row 5
@@ -247,16 +247,16 @@ call.
- 4
- Triggered immediately when the reception of a frame has begun.
- This event has a struct
- :ref:`v4l2_event_frame_sync <v4l2-event-frame-sync>`
- associated with it.
+ This event has a struct
+ :ref:`v4l2_event_frame_sync <v4l2-event-frame-sync>`
+ associated with it.
- If the hardware needs to be stopped in the case of a buffer
- underrun it might not be able to generate this event. In such
- cases the ``frame_sequence`` field in struct
- :ref:`v4l2_event_frame_sync <v4l2-event-frame-sync>` will not
- be incremented. This causes two consecutive frame sequence numbers
- to have n times frame interval in between them.
+ If the hardware needs to be stopped in the case of a buffer
+ underrun it might not be able to generate this event. In such
+ cases the ``frame_sequence`` field in struct
+ :ref:`v4l2_event_frame_sync <v4l2-event-frame-sync>` will not
+ be incremented. This causes two consecutive frame sequence numbers
+ to have n times frame interval in between them.
- .. row 6
@@ -265,19 +265,19 @@ call.
- 5
- This event is triggered when a source parameter change is detected
- during runtime by the video device. It can be a runtime resolution
- change triggered by a video decoder or the format change happening
- on an input connector. This event requires that the ``id`` matches
- the input index (when used with a video device node) or the pad
- index (when used with a subdevice node) from which you want to
- receive events.
-
- This event has a struct
- :ref:`v4l2_event_src_change <v4l2-event-src-change>`
- associated with it. The ``changes`` bitfield denotes what has
- changed for the subscribed pad. If multiple events occurred before
- application could dequeue them, then the changes will have the
- ORed value of all the events generated.
+ during runtime by the video device. It can be a runtime resolution
+ change triggered by a video decoder or the format change happening
+ on an input connector. This event requires that the ``id`` matches
+ the input index (when used with a video device node) or the pad
+ index (when used with a subdevice node) from which you want to
+ receive events.
+
+ This event has a struct
+ :ref:`v4l2_event_src_change <v4l2-event-src-change>`
+ associated with it. The ``changes`` bitfield denotes what has
+ changed for the subscribed pad. If multiple events occurred before
+ application could dequeue them, then the changes will have the
+ ORed value of all the events generated.
- .. row 7
@@ -286,9 +286,9 @@ call.
- 6
- Triggered whenever the motion detection state for one or more of
- the regions changes. This event has a struct
- :ref:`v4l2_event_motion_det <v4l2-event-motion-det>`
- associated with it.
+ the regions changes. This event has a struct
+ :ref:`v4l2_event_motion_det <v4l2-event-motion-det>`
+ associated with it.
- .. row 8
@@ -332,9 +332,9 @@ call.
- ``changes``
- -
+ -
- A bitmask that tells what has changed. See
- :ref:`ctrl-changes-flags`.
+ :ref:`ctrl-changes-flags`.
- .. row 2
@@ -342,32 +342,32 @@ call.
- ``type``
- -
+ -
- The type of the control. See enum
- :ref:`v4l2_ctrl_type <v4l2-ctrl-type>`.
+ :ref:`v4l2_ctrl_type <v4l2-ctrl-type>`.
- .. row 3
- union (anonymous)
- -
- -
- -
+ -
+ -
+ -
- .. row 4
- -
+ -
- __s32
- ``value``
- The 32-bit value of the control for 32-bit control types. This is
- 0 for string controls since the value of a string cannot be passed
- using :ref:`VIDIOC_DQEVENT`.
+ 0 for string controls since the value of a string cannot be passed
+ using :ref:`VIDIOC_DQEVENT`.
- .. row 5
- -
+ -
- __s64
- ``value64``
@@ -380,7 +380,7 @@ call.
- ``flags``
- -
+ -
- The control flags. See :ref:`control-flags`.
- .. row 7
@@ -389,9 +389,9 @@ call.
- ``minimum``
- -
+ -
- The minimum value of the control. See struct
- :ref:`v4l2_queryctrl <v4l2-queryctrl>`.
+ :ref:`v4l2_queryctrl <v4l2-queryctrl>`.
- .. row 8
@@ -399,9 +399,9 @@ call.
- ``maximum``
- -
+ -
- The maximum value of the control. See struct
- :ref:`v4l2_queryctrl <v4l2-queryctrl>`.
+ :ref:`v4l2_queryctrl <v4l2-queryctrl>`.
- .. row 9
@@ -409,9 +409,9 @@ call.
- ``step``
- -
+ -
- The step value of the control. See struct
- :ref:`v4l2_queryctrl <v4l2-queryctrl>`.
+ :ref:`v4l2_queryctrl <v4l2-queryctrl>`.
- .. row 10
@@ -419,9 +419,9 @@ call.
- ``default_value``
- -
+ -
- The default value value of the control. See struct
- :ref:`v4l2_queryctrl <v4l2-queryctrl>`.
+ :ref:`v4l2_queryctrl <v4l2-queryctrl>`.
@@ -458,7 +458,7 @@ call.
- ``changes``
- A bitmask that tells what has changed. See
- :ref:`src-changes-flags`.
+ :ref:`src-changes-flags`.
@@ -477,9 +477,9 @@ call.
- ``flags``
- Currently only one flag is available: if
- ``V4L2_EVENT_MD_FL_HAVE_FRAME_SEQ`` is set, then the
- ``frame_sequence`` field is valid, otherwise that field should be
- ignored.
+ ``V4L2_EVENT_MD_FL_HAVE_FRAME_SEQ`` is set, then the
+ ``frame_sequence`` field is valid, otherwise that field should be
+ ignored.
- .. row 2
@@ -488,7 +488,7 @@ call.
- ``frame_sequence``
- The sequence number of the frame being received. Only valid if the
- ``V4L2_EVENT_MD_FL_HAVE_FRAME_SEQ`` flag was set.
+ ``V4L2_EVENT_MD_FL_HAVE_FRAME_SEQ`` flag was set.
- .. row 3
@@ -497,11 +497,11 @@ call.
- ``region_mask``
- The bitmask of the regions that reported motion. There is at least
- one region. If this field is 0, then no motion was detected at
- all. If there is no ``V4L2_CID_DETECT_MD_REGION_GRID`` control
- (see :ref:`detect-controls`) to assign a different region to
- each cell in the motion detection grid, then that all cells are
- automatically assigned to the default region 0.
+ one region. If this field is 0, then no motion was detected at
+ all. If there is no ``V4L2_CID_DETECT_MD_REGION_GRID`` control
+ (see :ref:`detect-controls`) to assign a different region to
+ each cell in the motion detection grid, then that all cells are
+ automatically assigned to the default region 0.
@@ -520,9 +520,9 @@ call.
- 0x0001
- This control event was triggered because the value of the control
- changed. Special cases: Volatile controls do no generate this
- event; If a control has the ``V4L2_CTRL_FLAG_EXECUTE_ON_WRITE``
- flag set, then this event is sent as well, regardless its value.
+ changed. Special cases: Volatile controls do no generate this
+ event; If a control has the ``V4L2_CTRL_FLAG_EXECUTE_ON_WRITE``
+ flag set, then this event is sent as well, regardless its value.
- .. row 2
@@ -531,7 +531,7 @@ call.
- 0x0002
- This control event was triggered because the control flags
- changed.
+ changed.
- .. row 3
@@ -540,7 +540,7 @@ call.
- 0x0004
- This control event was triggered because the minimum, maximum,
- step or the default value of the control changed.
+ step or the default value of the control changed.
@@ -559,8 +559,8 @@ call.
- 0x0001
- This event gets triggered when a resolution change is detected at
- an input. This can come from an input connector or from a video
- decoder.
+ an input. This can come from an input connector or from a video
+ decoder.
diff --git a/Documentation/linux_tv/media/v4l/vidioc-dv-timings-cap.rst b/Documentation/linux_tv/media/v4l/vidioc-dv-timings-cap.rst
index e852b6194f4a..475dbb75aef3 100644
--- a/Documentation/linux_tv/media/v4l/vidioc-dv-timings-cap.rst
+++ b/Documentation/linux_tv/media/v4l/vidioc-dv-timings-cap.rst
@@ -112,7 +112,7 @@ that doesn't support them will return an ``EINVAL`` error code.
- ``standards``
- The video standard(s) supported by the hardware. See
- :ref:`dv-bt-standards` for a list of standards.
+ :ref:`dv-bt-standards` for a list of standards.
- .. row 8
@@ -121,7 +121,7 @@ that doesn't support them will return an ``EINVAL`` error code.
- ``capabilities``
- Several flags giving more information about the capabilities. See
- :ref:`dv-bt-cap-capabilities` for a description of the flags.
+ :ref:`dv-bt-cap-capabilities` for a description of the flags.
- .. row 9
@@ -130,7 +130,7 @@ that doesn't support them will return an ``EINVAL`` error code.
- ``reserved``\ [16]
- Reserved for future extensions. Drivers must set the array to
- zero.
+ zero.
@@ -157,8 +157,8 @@ that doesn't support them will return an ``EINVAL`` error code.
- ``pad``
- Pad number as reported by the media controller API. This field is
- only used when operating on a subdevice node. When operating on a
- video node applications must set this field to zero.
+ only used when operating on a subdevice node. When operating on a
+ video node applications must set this field to zero.
- .. row 3
@@ -167,18 +167,18 @@ that doesn't support them will return an ``EINVAL`` error code.
- ``reserved``\ [2]
- Reserved for future extensions. Drivers and applications must set
- the array to zero.
+ the array to zero.
- .. row 4
- union
- -
- -
+ -
+ -
- .. row 5
- -
+ -
- struct :ref:`v4l2_bt_timings_cap <v4l2-bt-timings-cap>`
- ``bt``
@@ -187,12 +187,12 @@ that doesn't support them will return an ``EINVAL`` error code.
- .. row 6
- -
+ -
- __u32
- ``raw_data``\ [32]
- -
+ -
@@ -211,8 +211,8 @@ that doesn't support them will return an ``EINVAL`` error code.
- .. row 2
- -
- -
+ -
+ -
- .. row 3
@@ -231,14 +231,14 @@ that doesn't support them will return an ``EINVAL`` error code.
- V4L2_DV_BT_CAP_REDUCED_BLANKING
- CVT/GTF specific: the timings can make use of reduced blanking
- (CVT) or the 'Secondary GTF' curve (GTF).
+ (CVT) or the 'Secondary GTF' curve (GTF).
- .. row 6
- V4L2_DV_BT_CAP_CUSTOM
- Can support non-standard timings, i.e. timings not belonging to
- the standards set in the ``standards`` field.
+ the standards set in the ``standards`` field.
diff --git a/Documentation/linux_tv/media/v4l/vidioc-encoder-cmd.rst b/Documentation/linux_tv/media/v4l/vidioc-encoder-cmd.rst
index a5056f829e15..78c014ded43b 100644
--- a/Documentation/linux_tv/media/v4l/vidioc-encoder-cmd.rst
+++ b/Documentation/linux_tv/media/v4l/vidioc-encoder-cmd.rst
@@ -86,8 +86,8 @@ introduced in Linux 2.6.21.
- ``flags``
- Flags to go with the command, see :ref:`encoder-flags`. If no
- flags are defined for this command, drivers and applications must
- set this field to zero.
+ flags are defined for this command, drivers and applications must
+ set this field to zero.
- .. row 3
@@ -96,7 +96,7 @@ introduced in Linux 2.6.21.
- ``data``\ [8]
- Reserved for future extensions. Drivers and applications must set
- the array to zero.
+ the array to zero.
@@ -115,7 +115,7 @@ introduced in Linux 2.6.21.
- 0
- Start the encoder. When the encoder is already running or paused,
- this command does nothing. No flags are defined for this command.
+ this command does nothing. No flags are defined for this command.
- .. row 2
@@ -124,18 +124,18 @@ introduced in Linux 2.6.21.
- 1
- Stop the encoder. When the ``V4L2_ENC_CMD_STOP_AT_GOP_END`` flag
- is set, encoding will continue until the end of the current *Group
- Of Pictures*, otherwise encoding will stop immediately. When the
- encoder is already stopped, this command does nothing. mem2mem
- encoders will send a ``V4L2_EVENT_EOS`` event when the last frame
- has been encoded and all frames are ready to be dequeued and will
- set the ``V4L2_BUF_FLAG_LAST`` buffer flag on the last buffer of
- the capture queue to indicate there will be no new buffers
- produced to dequeue. This buffer may be empty, indicated by the
- driver setting the ``bytesused`` field to 0. Once the
- ``V4L2_BUF_FLAG_LAST`` flag was set, the
- :ref:`VIDIOC_DQBUF <VIDIOC_QBUF>` ioctl will not block anymore,
- but return an ``EPIPE`` error code.
+ is set, encoding will continue until the end of the current *Group
+ Of Pictures*, otherwise encoding will stop immediately. When the
+ encoder is already stopped, this command does nothing. mem2mem
+ encoders will send a ``V4L2_EVENT_EOS`` event when the last frame
+ has been encoded and all frames are ready to be dequeued and will
+ set the ``V4L2_BUF_FLAG_LAST`` buffer flag on the last buffer of
+ the capture queue to indicate there will be no new buffers
+ produced to dequeue. This buffer may be empty, indicated by the
+ driver setting the ``bytesused`` field to 0. Once the
+ ``V4L2_BUF_FLAG_LAST`` flag was set, the
+ :ref:`VIDIOC_DQBUF <VIDIOC_QBUF>` ioctl will not block anymore,
+ but return an ``EPIPE`` error code.
- .. row 3
@@ -144,9 +144,9 @@ introduced in Linux 2.6.21.
- 2
- Pause the encoder. When the encoder has not been started yet, the
- driver will return an ``EPERM`` error code. When the encoder is
- already paused, this command does nothing. No flags are defined
- for this command.
+ driver will return an ``EPERM`` error code. When the encoder is
+ already paused, this command does nothing. No flags are defined
+ for this command.
- .. row 4
@@ -155,9 +155,9 @@ introduced in Linux 2.6.21.
- 3
- Resume encoding after a PAUSE command. When the encoder has not
- been started yet, the driver will return an ``EPERM`` error code. When
- the encoder is already running, this command does nothing. No
- flags are defined for this command.
+ been started yet, the driver will return an ``EPERM`` error code. When
+ the encoder is already running, this command does nothing. No
+ flags are defined for this command.
@@ -176,7 +176,7 @@ introduced in Linux 2.6.21.
- 0x0001
- Stop encoding at the end of the current *Group Of Pictures*,
- rather than immediately.
+ rather than immediately.
diff --git a/Documentation/linux_tv/media/v4l/vidioc-enum-dv-timings.rst b/Documentation/linux_tv/media/v4l/vidioc-enum-dv-timings.rst
index 1ff64c497ff1..5aa2db9076a0 100644
--- a/Documentation/linux_tv/media/v4l/vidioc-enum-dv-timings.rst
+++ b/Documentation/linux_tv/media/v4l/vidioc-enum-dv-timings.rst
@@ -82,8 +82,8 @@ return an ``EINVAL`` error code.
- ``pad``
- Pad number as reported by the media controller API. This field is
- only used when operating on a subdevice node. When operating on a
- video node applications must set this field to zero.
+ only used when operating on a subdevice node. When operating on a
+ video node applications must set this field to zero.
- .. row 3
@@ -92,7 +92,7 @@ return an ``EINVAL`` error code.
- ``reserved``\ [2]
- Reserved for future extensions. Drivers and applications must set
- the array to zero.
+ the array to zero.
- .. row 4
diff --git a/Documentation/linux_tv/media/v4l/vidioc-enum-fmt.rst b/Documentation/linux_tv/media/v4l/vidioc-enum-fmt.rst
index 79162755ea75..5cc97ce281ef 100644
--- a/Documentation/linux_tv/media/v4l/vidioc-enum-fmt.rst
+++ b/Documentation/linux_tv/media/v4l/vidioc-enum-fmt.rst
@@ -57,7 +57,7 @@ formats may be different.
- ``index``
- Number of the format in the enumeration, set by the application.
- This is in no way related to the ``pixelformat`` field.
+ This is in no way related to the ``pixelformat`` field.
- .. row 2
@@ -66,11 +66,11 @@ formats may be different.
- ``type``
- Type of the data stream, set by the application. Only these types
- are valid here: ``V4L2_BUF_TYPE_VIDEO_CAPTURE``,
- ``V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE``,
- ``V4L2_BUF_TYPE_VIDEO_OUTPUT``,
- ``V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE`` and
- ``V4L2_BUF_TYPE_VIDEO_OVERLAY``. See :ref:`v4l2-buf-type`.
+ are valid here: ``V4L2_BUF_TYPE_VIDEO_CAPTURE``,
+ ``V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE``,
+ ``V4L2_BUF_TYPE_VIDEO_OUTPUT``,
+ ``V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE`` and
+ ``V4L2_BUF_TYPE_VIDEO_OVERLAY``. See :ref:`v4l2-buf-type`.
- .. row 3
@@ -87,7 +87,7 @@ formats may be different.
- ``description``\ [32]
- Description of the format, a NUL-terminated ASCII string. This
- information is intended for the user, for example: "YUV 4:2:2".
+ information is intended for the user, for example: "YUV 4:2:2".
- .. row 5
@@ -96,21 +96,21 @@ formats may be different.
- ``pixelformat``
- The image format identifier. This is a four character code as
- computed by the v4l2_fourcc() macro:
+ computed by the v4l2_fourcc() macro:
- .. row 6
- :cspan:`2`
- .. _v4l2-fourcc:
- .. code-block:: c
+ .. _v4l2-fourcc:
+ .. code-block:: c
- #define v4l2_fourcc(a,b,c,d) (((__u32)(a)<<0)|((__u32)(b)<<8)|((__u32)(c)<<16)|((__u32)(d)<<24))
+ #define v4l2_fourcc(a,b,c,d) (((__u32)(a)<<0)|((__u32)(b)<<8)|((__u32)(c)<<16)|((__u32)(d)<<24))
- Several image formats are already defined by this specification in
- :ref:`pixfmt`. Note these codes are not the same as those used
- in the Windows world.
+ Several image formats are already defined by this specification in
+ :ref:`pixfmt`. Note these codes are not the same as those used
+ in the Windows world.
- .. row 7
@@ -119,7 +119,7 @@ formats may be different.
- ``reserved``\ [4]
- Reserved for future extensions. Drivers must set the array to
- zero.
+ zero.
@@ -146,8 +146,8 @@ formats may be different.
- 0x0002
- This format is not native to the device but emulated through
- software (usually libv4l2), where possible try to use a native
- format instead for better performance.
+ software (usually libv4l2), where possible try to use a native
+ format instead for better performance.
diff --git a/Documentation/linux_tv/media/v4l/vidioc-enum-frameintervals.rst b/Documentation/linux_tv/media/v4l/vidioc-enum-frameintervals.rst
index f7e41225e6b6..29cf2fa5ba87 100644
--- a/Documentation/linux_tv/media/v4l/vidioc-enum-frameintervals.rst
+++ b/Documentation/linux_tv/media/v4l/vidioc-enum-frameintervals.rst
@@ -150,7 +150,7 @@ application should zero out all members except for the *IN* fields.
- ``index``
- -
+ -
- IN: Index of the given frame interval in the enumeration.
- .. row 2
@@ -159,7 +159,7 @@ application should zero out all members except for the *IN* fields.
- ``pixel_format``
- -
+ -
- IN: Pixel format for which the frame intervals are enumerated.
- .. row 3
@@ -168,7 +168,7 @@ application should zero out all members except for the *IN* fields.
- ``width``
- -
+ -
- IN: Frame width for which the frame intervals are enumerated.
- .. row 4
@@ -177,7 +177,7 @@ application should zero out all members except for the *IN* fields.
- ``height``
- -
+ -
- IN: Frame height for which the frame intervals are enumerated.
- .. row 5
@@ -186,20 +186,20 @@ application should zero out all members except for the *IN* fields.
- ``type``
- -
+ -
- OUT: Frame interval type the device supports.
- .. row 6
- union
- -
- -
+ -
+ -
- OUT: Frame interval with the given index.
- .. row 7
- -
+ -
- struct :ref:`v4l2_fract <v4l2-fract>`
- ``discrete``
@@ -208,12 +208,12 @@ application should zero out all members except for the *IN* fields.
- .. row 8
- -
+ -
- struct :ref:`v4l2_frmival_stepwise <v4l2-frmival-stepwise>`
- ``stepwise``
- -
+ -
- .. row 9
@@ -221,9 +221,9 @@ application should zero out all members except for the *IN* fields.
- ``reserved[2]``
- -
+ -
- Reserved space for future use. Must be zeroed by drivers and
- applications.
+ applications.
diff --git a/Documentation/linux_tv/media/v4l/vidioc-enum-framesizes.rst b/Documentation/linux_tv/media/v4l/vidioc-enum-framesizes.rst
index ef9bcdee0635..396cdcf44c7e 100644
--- a/Documentation/linux_tv/media/v4l/vidioc-enum-framesizes.rst
+++ b/Documentation/linux_tv/media/v4l/vidioc-enum-framesizes.rst
@@ -185,7 +185,7 @@ application should zero out all members except for the *IN* fields.
- ``index``
- -
+ -
- IN: Index of the given frame size in the enumeration.
- .. row 2
@@ -194,7 +194,7 @@ application should zero out all members except for the *IN* fields.
- ``pixel_format``
- -
+ -
- IN: Pixel format for which the frame sizes are enumerated.
- .. row 3
@@ -203,34 +203,34 @@ application should zero out all members except for the *IN* fields.
- ``type``
- -
+ -
- OUT: Frame size type the device supports.
- .. row 4
- union
- -
- -
+ -
+ -
- OUT: Frame size with the given index.
- .. row 5
- -
+ -
- struct :ref:`v4l2_frmsize_discrete <v4l2-frmsize-discrete>`
- ``discrete``
- -
+ -
- .. row 6
- -
+ -
- struct :ref:`v4l2_frmsize_stepwise <v4l2-frmsize-stepwise>`
- ``stepwise``
- -
+ -
- .. row 7
@@ -238,9 +238,9 @@ application should zero out all members except for the *IN* fields.
- ``reserved[2]``
- -
+ -
- Reserved space for future use. Must be zeroed by drivers and
- applications.
+ applications.
diff --git a/Documentation/linux_tv/media/v4l/vidioc-enum-freq-bands.rst b/Documentation/linux_tv/media/v4l/vidioc-enum-freq-bands.rst
index 5e4a6d4a8640..da3bda140965 100644
--- a/Documentation/linux_tv/media/v4l/vidioc-enum-freq-bands.rst
+++ b/Documentation/linux_tv/media/v4l/vidioc-enum-freq-bands.rst
@@ -56,11 +56,11 @@ of the corresponding tuner/modulator is set.
- ``tuner``
- The tuner or modulator index number. This is the same value as in
- the struct :ref:`v4l2_input <v4l2-input>` ``tuner`` field and
- the struct :ref:`v4l2_tuner <v4l2-tuner>` ``index`` field, or
- the struct :ref:`v4l2_output <v4l2-output>` ``modulator`` field
- and the struct :ref:`v4l2_modulator <v4l2-modulator>` ``index``
- field.
+ the struct :ref:`v4l2_input <v4l2-input>` ``tuner`` field and
+ the struct :ref:`v4l2_tuner <v4l2-tuner>` ``index`` field, or
+ the struct :ref:`v4l2_output <v4l2-output>` ``modulator`` field
+ and the struct :ref:`v4l2_modulator <v4l2-modulator>` ``index``
+ field.
- .. row 2
@@ -69,11 +69,11 @@ of the corresponding tuner/modulator is set.
- ``type``
- The tuner type. This is the same value as in the struct
- :ref:`v4l2_tuner <v4l2-tuner>` ``type`` field. The type must be
- set to ``V4L2_TUNER_RADIO`` for ``/dev/radioX`` device nodes, and
- to ``V4L2_TUNER_ANALOG_TV`` for all others. Set this field to
- ``V4L2_TUNER_RADIO`` for modulators (currently only radio
- modulators are supported). See :ref:`v4l2-tuner-type`
+ :ref:`v4l2_tuner <v4l2-tuner>` ``type`` field. The type must be
+ set to ``V4L2_TUNER_RADIO`` for ``/dev/radioX`` device nodes, and
+ to ``V4L2_TUNER_ANALOG_TV`` for all others. Set this field to
+ ``V4L2_TUNER_RADIO`` for modulators (currently only radio
+ modulators are supported). See :ref:`v4l2-tuner-type`
- .. row 3
@@ -90,11 +90,11 @@ of the corresponding tuner/modulator is set.
- ``capability``
- :cspan:`2` The tuner/modulator capability flags for this
- frequency band, see :ref:`tuner-capability`. The
- ``V4L2_TUNER_CAP_LOW`` or ``V4L2_TUNER_CAP_1HZ`` capability must
- be the same for all frequency bands of the selected
- tuner/modulator. So either all bands have that capability set, or
- none of them have that capability.
+ frequency band, see :ref:`tuner-capability`. The
+ ``V4L2_TUNER_CAP_LOW`` or ``V4L2_TUNER_CAP_1HZ`` capability must
+ be the same for all frequency bands of the selected
+ tuner/modulator. So either all bands have that capability set, or
+ none of them have that capability.
- .. row 5
@@ -103,9 +103,9 @@ of the corresponding tuner/modulator is set.
- ``rangelow``
- :cspan:`2` The lowest tunable frequency in units of 62.5 kHz, or
- if the ``capability`` flag ``V4L2_TUNER_CAP_LOW`` is set, in units
- of 62.5 Hz, for this frequency band. A 1 Hz unit is used when the
- ``capability`` flag ``V4L2_TUNER_CAP_1HZ`` is set.
+ if the ``capability`` flag ``V4L2_TUNER_CAP_LOW`` is set, in units
+ of 62.5 Hz, for this frequency band. A 1 Hz unit is used when the
+ ``capability`` flag ``V4L2_TUNER_CAP_1HZ`` is set.
- .. row 6
@@ -114,9 +114,9 @@ of the corresponding tuner/modulator is set.
- ``rangehigh``
- :cspan:`2` The highest tunable frequency in units of 62.5 kHz,
- or if the ``capability`` flag ``V4L2_TUNER_CAP_LOW`` is set, in
- units of 62.5 Hz, for this frequency band. A 1 Hz unit is used
- when the ``capability`` flag ``V4L2_TUNER_CAP_1HZ`` is set.
+ or if the ``capability`` flag ``V4L2_TUNER_CAP_LOW`` is set, in
+ units of 62.5 Hz, for this frequency band. A 1 Hz unit is used
+ when the ``capability`` flag ``V4L2_TUNER_CAP_1HZ`` is set.
- .. row 7
@@ -125,12 +125,12 @@ of the corresponding tuner/modulator is set.
- ``modulation``
- :cspan:`2` The supported modulation systems of this frequency
- band. See :ref:`band-modulation`. Note that currently only one
- modulation system per frequency band is supported. More work will
- need to be done if multiple modulation systems are possible.
- Contact the linux-media mailing list
- (`https://linuxtv.org/lists.php <https://linuxtv.org/lists.php>`__)
- if you need that functionality.
+ band. See :ref:`band-modulation`. Note that currently only one
+ modulation system per frequency band is supported. More work will
+ need to be done if multiple modulation systems are possible.
+ Contact the linux-media mailing list
+ (`https://linuxtv.org/lists.php <https://linuxtv.org/lists.php>`__)
+ if you need that functionality.
- .. row 8
@@ -139,7 +139,7 @@ of the corresponding tuner/modulator is set.
- ``reserved``\ [9]
- Reserved for future extensions. Applications and drivers must set
- the array to zero.
+ the array to zero.
diff --git a/Documentation/linux_tv/media/v4l/vidioc-enuminput.rst b/Documentation/linux_tv/media/v4l/vidioc-enuminput.rst
index b67cae1bcafd..d27556c112bb 100644
--- a/Documentation/linux_tv/media/v4l/vidioc-enuminput.rst
+++ b/Documentation/linux_tv/media/v4l/vidioc-enuminput.rst
@@ -62,8 +62,8 @@ at index zero, incrementing by one until the driver returns ``EINVAL``.
- ``name``\ [32]
- Name of the video input, a NUL-terminated ASCII string, for
- example: "Vin (Composite 2)". This information is intended for the
- user, preferably the connector label on the device itself.
+ example: "Vin (Composite 2)". This information is intended for the
+ user, preferably the connector label on the device itself.
- .. row 3
@@ -80,18 +80,18 @@ at index zero, incrementing by one until the driver returns ``EINVAL``.
- ``audioset``
- Drivers can enumerate up to 32 video and audio inputs. This field
- shows which audio inputs were selectable as audio source if this
- was the currently selected video input. It is a bit mask. The LSB
- corresponds to audio input 0, the MSB to input 31. Any number of
- bits can be set, or none.
+ shows which audio inputs were selectable as audio source if this
+ was the currently selected video input. It is a bit mask. The LSB
+ corresponds to audio input 0, the MSB to input 31. Any number of
+ bits can be set, or none.
- When the driver does not enumerate audio inputs no bits must be
- set. Applications shall not interpret this as lack of audio
- support. Some drivers automatically select audio sources and do
- not enumerate them since there is no choice anyway.
+ When the driver does not enumerate audio inputs no bits must be
+ set. Applications shall not interpret this as lack of audio
+ support. Some drivers automatically select audio sources and do
+ not enumerate them since there is no choice anyway.
- For details on audio inputs and how to select the current input
- see :ref:`audio`.
+ For details on audio inputs and how to select the current input
+ see :ref:`audio`.
- .. row 5
@@ -100,10 +100,10 @@ at index zero, incrementing by one until the driver returns ``EINVAL``.
- ``tuner``
- Capture devices can have zero or more tuners (RF demodulators).
- When the ``type`` is set to ``V4L2_INPUT_TYPE_TUNER`` this is an
- RF connector and this field identifies the tuner. It corresponds
- to struct :ref:`v4l2_tuner <v4l2-tuner>` field ``index``. For
- details on tuners see :ref:`tuner`.
+ When the ``type`` is set to ``V4L2_INPUT_TYPE_TUNER`` this is an
+ RF connector and this field identifies the tuner. It corresponds
+ to struct :ref:`v4l2_tuner <v4l2-tuner>` field ``index``. For
+ details on tuners see :ref:`tuner`.
- .. row 6
@@ -112,8 +112,8 @@ at index zero, incrementing by one until the driver returns ``EINVAL``.
- ``std``
- Every video input supports one or more different video standards.
- This field is a set of all supported standards. For details on
- video standards and how to switch see :ref:`standard`.
+ This field is a set of all supported standards. For details on
+ video standards and how to switch see :ref:`standard`.
- .. row 7
@@ -122,9 +122,9 @@ at index zero, incrementing by one until the driver returns ``EINVAL``.
- ``status``
- This field provides status information about the input. See
- :ref:`input-status` for flags. With the exception of the sensor
- orientation bits ``status`` is only valid when this is the current
- input.
+ :ref:`input-status` for flags. With the exception of the sensor
+ orientation bits ``status`` is only valid when this is the current
+ input.
- .. row 8
@@ -133,7 +133,7 @@ at index zero, incrementing by one until the driver returns ``EINVAL``.
- ``capabilities``
- This field provides capabilities for the input. See
- :ref:`input-capabilities` for flags.
+ :ref:`input-capabilities` for flags.
- .. row 9
@@ -142,7 +142,7 @@ at index zero, incrementing by one until the driver returns ``EINVAL``.
- ``reserved``\ [3]
- Reserved for future extensions. Drivers must set the array to
- zero.
+ zero.
@@ -169,7 +169,7 @@ at index zero, incrementing by one until the driver returns ``EINVAL``.
- 2
- Analog baseband input, for example CVBS / Composite Video,
- S-Video, RGB.
+ S-Video, RGB.
@@ -198,7 +198,7 @@ at index zero, incrementing by one until the driver returns ``EINVAL``.
- 0x00000002
- -
+ -
- .. row 4
@@ -207,7 +207,7 @@ at index zero, incrementing by one until the driver returns ``EINVAL``.
- 0x00000004
- The hardware supports color decoding, but does not detect color
- modulation in the signal.
+ modulation in the signal.
- .. row 5
@@ -220,8 +220,8 @@ at index zero, incrementing by one until the driver returns ``EINVAL``.
- 0x00000010
- The input is connected to a device that produces a signal that is
- flipped horizontally and does not correct this before passing the
- signal to userspace.
+ flipped horizontally and does not correct this before passing the
+ signal to userspace.
- .. row 7
@@ -230,9 +230,9 @@ at index zero, incrementing by one until the driver returns ``EINVAL``.
- 0x00000020
- The input is connected to a device that produces a signal that is
- flipped vertically and does not correct this before passing the
- signal to userspace. Note that a 180 degree rotation is the same
- as HFLIP | VFLIP
+ flipped vertically and does not correct this before passing the
+ signal to userspace. Note that a 180 degree rotation is the same
+ as HFLIP | VFLIP
- .. row 8
@@ -253,8 +253,8 @@ at index zero, incrementing by one until the driver returns ``EINVAL``.
- 0x00000200
- A color killer circuit automatically disables color decoding when
- it detects no color modulation. When this flag is set the color
- killer is enabled *and* has shut off color decoding.
+ it detects no color modulation. When this flag is set the color
+ killer is enabled *and* has shut off color decoding.
- .. row 11
@@ -295,8 +295,8 @@ at index zero, incrementing by one until the driver returns ``EINVAL``.
- 0x01000000
- Macrovision is an analog copy prevention system mangling the video
- signal to confuse video recorders. When this flag is set
- Macrovision has been detected.
+ signal to confuse video recorders. When this flag is set
+ Macrovision has been detected.
- .. row 17
@@ -331,7 +331,7 @@ at index zero, incrementing by one until the driver returns ``EINVAL``.
- 0x00000002
- This input supports setting video timings by using
- VIDIOC_S_DV_TIMINGS.
+ VIDIOC_S_DV_TIMINGS.
- .. row 2
@@ -340,7 +340,7 @@ at index zero, incrementing by one until the driver returns ``EINVAL``.
- 0x00000004
- This input supports setting the TV standard by using
- VIDIOC_S_STD.
+ VIDIOC_S_STD.
- .. row 3
@@ -349,8 +349,8 @@ at index zero, incrementing by one until the driver returns ``EINVAL``.
- 0x00000008
- This input supports setting the native size using the
- ``V4L2_SEL_TGT_NATIVE_SIZE`` selection target, see
- :ref:`v4l2-selections-common`.
+ ``V4L2_SEL_TGT_NATIVE_SIZE`` selection target, see
+ :ref:`v4l2-selections-common`.
diff --git a/Documentation/linux_tv/media/v4l/vidioc-enumoutput.rst b/Documentation/linux_tv/media/v4l/vidioc-enumoutput.rst
index 8dc5f8ee2eb5..a0a9a375ef3f 100644
--- a/Documentation/linux_tv/media/v4l/vidioc-enumoutput.rst
+++ b/Documentation/linux_tv/media/v4l/vidioc-enumoutput.rst
@@ -63,8 +63,8 @@ EINVAL.
- ``name``\ [32]
- Name of the video output, a NUL-terminated ASCII string, for
- example: "Vout". This information is intended for the user,
- preferably the connector label on the device itself.
+ example: "Vout". This information is intended for the user,
+ preferably the connector label on the device itself.
- .. row 3
@@ -81,18 +81,18 @@ EINVAL.
- ``audioset``
- Drivers can enumerate up to 32 video and audio outputs. This field
- shows which audio outputs were selectable as the current output if
- this was the currently selected video output. It is a bit mask.
- The LSB corresponds to audio output 0, the MSB to output 31. Any
- number of bits can be set, or none.
+ shows which audio outputs were selectable as the current output if
+ this was the currently selected video output. It is a bit mask.
+ The LSB corresponds to audio output 0, the MSB to output 31. Any
+ number of bits can be set, or none.
- When the driver does not enumerate audio outputs no bits must be
- set. Applications shall not interpret this as lack of audio
- support. Drivers may automatically select audio outputs without
- enumerating them.
+ When the driver does not enumerate audio outputs no bits must be
+ set. Applications shall not interpret this as lack of audio
+ support. Drivers may automatically select audio outputs without
+ enumerating them.
- For details on audio outputs and how to select the current output
- see :ref:`audio`.
+ For details on audio outputs and how to select the current output
+ see :ref:`audio`.
- .. row 5
@@ -101,10 +101,10 @@ EINVAL.
- ``modulator``
- Output devices can have zero or more RF modulators. When the
- ``type`` is ``V4L2_OUTPUT_TYPE_MODULATOR`` this is an RF connector
- and this field identifies the modulator. It corresponds to struct
- :ref:`v4l2_modulator <v4l2-modulator>` field ``index``. For
- details on modulators see :ref:`tuner`.
+ ``type`` is ``V4L2_OUTPUT_TYPE_MODULATOR`` this is an RF connector
+ and this field identifies the modulator. It corresponds to struct
+ :ref:`v4l2_modulator <v4l2-modulator>` field ``index``. For
+ details on modulators see :ref:`tuner`.
- .. row 6
@@ -113,8 +113,8 @@ EINVAL.
- ``std``
- Every video output supports one or more different video standards.
- This field is a set of all supported standards. For details on
- video standards and how to switch see :ref:`standard`.
+ This field is a set of all supported standards. For details on
+ video standards and how to switch see :ref:`standard`.
- .. row 7
@@ -123,7 +123,7 @@ EINVAL.
- ``capabilities``
- This field provides capabilities for the output. See
- :ref:`output-capabilities` for flags.
+ :ref:`output-capabilities` for flags.
- .. row 8
@@ -132,7 +132,7 @@ EINVAL.
- ``reserved``\ [3]
- Reserved for future extensions. Drivers must set the array to
- zero.
+ zero.
@@ -159,7 +159,7 @@ EINVAL.
- 2
- Analog baseband output, for example Composite / CVBS, S-Video,
- RGB.
+ RGB.
- .. row 3
@@ -186,7 +186,7 @@ EINVAL.
- 0x00000002
- This output supports setting video timings by using
- VIDIOC_S_DV_TIMINGS.
+ VIDIOC_S_DV_TIMINGS.
- .. row 2
@@ -195,7 +195,7 @@ EINVAL.
- 0x00000004
- This output supports setting the TV standard by using
- VIDIOC_S_STD.
+ VIDIOC_S_STD.
- .. row 3
@@ -204,8 +204,8 @@ EINVAL.
- 0x00000008
- This output supports setting the native size using the
- ``V4L2_SEL_TGT_NATIVE_SIZE`` selection target, see
- :ref:`v4l2-selections-common`.
+ ``V4L2_SEL_TGT_NATIVE_SIZE`` selection target, see
+ :ref:`v4l2-selections-common`.
diff --git a/Documentation/linux_tv/media/v4l/vidioc-enumstd.rst b/Documentation/linux_tv/media/v4l/vidioc-enumstd.rst
index 0576d2f9cc79..718b29510eeb 100644
--- a/Documentation/linux_tv/media/v4l/vidioc-enumstd.rst
+++ b/Documentation/linux_tv/media/v4l/vidioc-enumstd.rst
@@ -65,12 +65,12 @@ or output. [1]_
- ``id``
- The bits in this field identify the standard as one of the common
- standards listed in :ref:`v4l2-std-id`, or if bits 32 to 63 are
- set as custom standards. Multiple bits can be set if the hardware
- does not distinguish between these standards, however separate
- indices do not indicate the opposite. The ``id`` must be unique.
- No other enumerated :ref:`struct v4l2_standard <v4l2-standard>` structure,
- for this input or output anyway, can contain the same set of bits.
+ standards listed in :ref:`v4l2-std-id`, or if bits 32 to 63 are
+ set as custom standards. Multiple bits can be set if the hardware
+ does not distinguish between these standards, however separate
+ indices do not indicate the opposite. The ``id`` must be unique.
+ No other enumerated :ref:`struct v4l2_standard <v4l2-standard>` structure,
+ for this input or output anyway, can contain the same set of bits.
- .. row 3
@@ -79,8 +79,8 @@ or output. [1]_
- ``name``\ [24]
- Name of the standard, a NUL-terminated ASCII string, for example:
- "PAL-B/G", "NTSC Japan". This information is intended for the
- user.
+ "PAL-B/G", "NTSC Japan". This information is intended for the
+ user.
- .. row 4
@@ -89,7 +89,7 @@ or output. [1]_
- ``frameperiod``
- The frame period (not field period) is numerator / denominator.
- For example M/NTSC has a frame period of 1001 / 30000 seconds.
+ For example M/NTSC has a frame period of 1001 / 30000 seconds.
- .. row 5
@@ -106,7 +106,7 @@ or output. [1]_
- ``reserved``\ [4]
- Reserved for future extensions. Drivers must set the array to
- zero.
+ zero.
@@ -124,7 +124,7 @@ or output. [1]_
- ``numerator``
- -
+ -
- .. row 2
@@ -132,7 +132,7 @@ or output. [1]_
- ``denominator``
- -
+ -
@@ -151,9 +151,9 @@ or output. [1]_
- ``v4l2_std_id``
- This type is a set, each bit representing another video standard
- as listed below and in :ref:`video-standards`. The 32 most
- significant bits are reserved for custom (driver defined) video
- standards.
+ as listed below and in :ref:`video-standards`. The 32 most
+ significant bits are reserved for custom (driver defined) video
+ standards.
@@ -215,54 +215,54 @@ support digital TV. See also the Linux DVB API at
.. code-block:: c
#define V4L2_STD_PAL_BG (V4L2_STD_PAL_B |
- V4L2_STD_PAL_B1 |
- V4L2_STD_PAL_G)
+ V4L2_STD_PAL_B1 |
+ V4L2_STD_PAL_G)
#define V4L2_STD_B (V4L2_STD_PAL_B |
- V4L2_STD_PAL_B1 |
- V4L2_STD_SECAM_B)
+ V4L2_STD_PAL_B1 |
+ V4L2_STD_SECAM_B)
#define V4L2_STD_GH (V4L2_STD_PAL_G |
- V4L2_STD_PAL_H |
- V4L2_STD_SECAM_G |
- V4L2_STD_SECAM_H)
+ V4L2_STD_PAL_H |
+ V4L2_STD_SECAM_G |
+ V4L2_STD_SECAM_H)
#define V4L2_STD_PAL_DK (V4L2_STD_PAL_D |
- V4L2_STD_PAL_D1 |
- V4L2_STD_PAL_K)
+ V4L2_STD_PAL_D1 |
+ V4L2_STD_PAL_K)
#define V4L2_STD_PAL (V4L2_STD_PAL_BG |
- V4L2_STD_PAL_DK |
- V4L2_STD_PAL_H |
- V4L2_STD_PAL_I)
+ V4L2_STD_PAL_DK |
+ V4L2_STD_PAL_H |
+ V4L2_STD_PAL_I)
#define V4L2_STD_NTSC (V4L2_STD_NTSC_M |
- V4L2_STD_NTSC_M_JP |
- V4L2_STD_NTSC_M_KR)
+ V4L2_STD_NTSC_M_JP |
+ V4L2_STD_NTSC_M_KR)
#define V4L2_STD_MN (V4L2_STD_PAL_M |
- V4L2_STD_PAL_N |
- V4L2_STD_PAL_Nc |
- V4L2_STD_NTSC)
+ V4L2_STD_PAL_N |
+ V4L2_STD_PAL_Nc |
+ V4L2_STD_NTSC)
#define V4L2_STD_SECAM_DK (V4L2_STD_SECAM_D |
- V4L2_STD_SECAM_K |
- V4L2_STD_SECAM_K1)
+ V4L2_STD_SECAM_K |
+ V4L2_STD_SECAM_K1)
#define V4L2_STD_DK (V4L2_STD_PAL_DK |
- V4L2_STD_SECAM_DK)
+ V4L2_STD_SECAM_DK)
#define V4L2_STD_SECAM (V4L2_STD_SECAM_B |
- V4L2_STD_SECAM_G |
- V4L2_STD_SECAM_H |
- V4L2_STD_SECAM_DK |
- V4L2_STD_SECAM_L |
- V4L2_STD_SECAM_LC)
+ V4L2_STD_SECAM_G |
+ V4L2_STD_SECAM_H |
+ V4L2_STD_SECAM_DK |
+ V4L2_STD_SECAM_L |
+ V4L2_STD_SECAM_LC)
#define V4L2_STD_525_60 (V4L2_STD_PAL_M |
- V4L2_STD_PAL_60 |
- V4L2_STD_NTSC |
- V4L2_STD_NTSC_443)
+ V4L2_STD_PAL_60 |
+ V4L2_STD_NTSC |
+ V4L2_STD_NTSC_443)
#define V4L2_STD_625_50 (V4L2_STD_PAL |
- V4L2_STD_PAL_N |
- V4L2_STD_PAL_Nc |
- V4L2_STD_SECAM)
+ V4L2_STD_PAL_N |
+ V4L2_STD_PAL_Nc |
+ V4L2_STD_SECAM)
#define V4L2_STD_UNKNOWN 0
#define V4L2_STD_ALL (V4L2_STD_525_60 |
- V4L2_STD_625_50)
+ V4L2_STD_625_50)
.. _video-standards:
@@ -329,7 +329,7 @@ support digital TV. See also the Linux DVB API at
- 4433618.75 ± 1
- :cspan:`3` f\ :sub:`OR` = 4406250 ± 2000, f\ :sub:`OB` = 4250000
- ± 2000
+ ± 2000
- .. row 5
diff --git a/Documentation/linux_tv/media/v4l/vidioc-expbuf.rst b/Documentation/linux_tv/media/v4l/vidioc-expbuf.rst
index a1f62a33739f..548b15a841c3 100644
--- a/Documentation/linux_tv/media/v4l/vidioc-expbuf.rst
+++ b/Documentation/linux_tv/media/v4l/vidioc-expbuf.rst
@@ -71,46 +71,46 @@ Examples
int buffer_export(int v4lfd, enum v4l2_buf_type bt, int index, int *dmafd)
{
- struct v4l2_exportbuffer expbuf;
+ struct v4l2_exportbuffer expbuf;
- memset(&expbuf, 0, sizeof(expbuf));
- expbuf.type = bt;
- expbuf.index = index;
- if (ioctl(v4lfd, VIDIOC_EXPBUF, &expbuf) == -1) {
- perror("VIDIOC_EXPBUF");
- return -1;
- }
+ memset(&expbuf, 0, sizeof(expbuf));
+ expbuf.type = bt;
+ expbuf.index = index;
+ if (ioctl(v4lfd, VIDIOC_EXPBUF, &expbuf) == -1) {
+ perror("VIDIOC_EXPBUF");
+ return -1;
+ }
- *dmafd = expbuf.fd;
+ *dmafd = expbuf.fd;
- return 0;
+ return 0;
}
.. code-block:: c
int buffer_export_mp(int v4lfd, enum v4l2_buf_type bt, int index,
- int dmafd[], int n_planes)
+ int dmafd[], int n_planes)
{
- int i;
-
- for (i = 0; i < n_planes; ++i) {
- struct v4l2_exportbuffer expbuf;
-
- memset(&expbuf, 0, sizeof(expbuf));
- expbuf.type = bt;
- expbuf.index = index;
- expbuf.plane = i;
- if (ioctl(v4lfd, VIDIOC_EXPBUF, &expbuf) == -1) {
- perror("VIDIOC_EXPBUF");
- while (i)
- close(dmafd[--i]);
- return -1;
- }
- dmafd[i] = expbuf.fd;
- }
-
- return 0;
+ int i;
+
+ for (i = 0; i < n_planes; ++i) {
+ struct v4l2_exportbuffer expbuf;
+
+ memset(&expbuf, 0, sizeof(expbuf));
+ expbuf.type = bt;
+ expbuf.index = index;
+ expbuf.plane = i;
+ if (ioctl(v4lfd, VIDIOC_EXPBUF, &expbuf) == -1) {
+ perror("VIDIOC_EXPBUF");
+ while (i)
+ close(dmafd[--i]);
+ return -1;
+ }
+ dmafd[i] = expbuf.fd;
+ }
+
+ return 0;
}
@@ -129,9 +129,9 @@ Examples
- ``type``
- Type of the buffer, same as struct
- :ref:`v4l2_format <v4l2-format>` ``type`` or struct
- :ref:`v4l2_requestbuffers <v4l2-requestbuffers>` ``type``, set
- by the application. See :ref:`v4l2-buf-type`
+ :ref:`v4l2_format <v4l2-format>` ``type`` or struct
+ :ref:`v4l2_requestbuffers <v4l2-requestbuffers>` ``type``, set
+ by the application. See :ref:`v4l2-buf-type`
- .. row 2
@@ -140,10 +140,10 @@ Examples
- ``index``
- Number of the buffer, set by the application. This field is only
- used for :ref:`memory mapping <mmap>` I/O and can range from
- zero to the number of buffers allocated with the
- :ref:`VIDIOC_REQBUFS` and/or
- :ref:`VIDIOC_CREATE_BUFS` ioctls.
+ used for :ref:`memory mapping <mmap>` I/O and can range from
+ zero to the number of buffers allocated with the
+ :ref:`VIDIOC_REQBUFS` and/or
+ :ref:`VIDIOC_CREATE_BUFS` ioctls.
- .. row 3
@@ -152,7 +152,7 @@ Examples
- ``plane``
- Index of the plane to be exported when using the multi-planar API.
- Otherwise this value must be set to zero.
+ Otherwise this value must be set to zero.
- .. row 4
@@ -161,8 +161,8 @@ Examples
- ``flags``
- Flags for the newly created file, currently only ``O_CLOEXEC``,
- ``O_RDONLY``, ``O_WRONLY``, and ``O_RDWR`` are supported, refer to
- the manual of open() for more details.
+ ``O_RDONLY``, ``O_WRONLY``, and ``O_RDWR`` are supported, refer to
+ the manual of open() for more details.
- .. row 5
@@ -171,7 +171,7 @@ Examples
- ``fd``
- The DMABUF file descriptor associated with a buffer. Set by the
- driver.
+ driver.
- .. row 6
@@ -180,7 +180,7 @@ Examples
- ``reserved[11]``
- Reserved field for future use. Drivers and applications must set
- the array to zero.
+ the array to zero.
diff --git a/Documentation/linux_tv/media/v4l/vidioc-g-audio.rst b/Documentation/linux_tv/media/v4l/vidioc-g-audio.rst
index 5ec052165642..d0bdc2d36734 100644
--- a/Documentation/linux_tv/media/v4l/vidioc-g-audio.rst
+++ b/Documentation/linux_tv/media/v4l/vidioc-g-audio.rst
@@ -72,8 +72,8 @@ return the actual new audio mode.
- ``name``\ [32]
- Name of the audio input, a NUL-terminated ASCII string, for
- example: "Line In". This information is intended for the user,
- preferably the connector label on the device itself.
+ example: "Line In". This information is intended for the user,
+ preferably the connector label on the device itself.
- .. row 3
@@ -90,7 +90,7 @@ return the actual new audio mode.
- ``mode``
- Audio mode flags set by drivers and applications (on
- :ref:`VIDIOC_S_AUDIO <VIDIOC_G_AUDIO>` ioctl), see :ref:`audio-mode`.
+ :ref:`VIDIOC_S_AUDIO <VIDIOC_G_AUDIO>` ioctl), see :ref:`audio-mode`.
- .. row 5
@@ -99,7 +99,7 @@ return the actual new audio mode.
- ``reserved``\ [2]
- Reserved for future extensions. Drivers and applications must set
- the array to zero.
+ the array to zero.
@@ -118,9 +118,9 @@ return the actual new audio mode.
- 0x00001
- This is a stereo input. The flag is intended to automatically
- disable stereo recording etc. when the signal is always monaural.
- The API provides no means to detect if stereo is *received*,
- unless the audio input belongs to a tuner.
+ disable stereo recording etc. when the signal is always monaural.
+ The API provides no means to detect if stereo is *received*,
+ unless the audio input belongs to a tuner.
- .. row 2
diff --git a/Documentation/linux_tv/media/v4l/vidioc-g-audioout.rst b/Documentation/linux_tv/media/v4l/vidioc-g-audioout.rst
index a2a492fccaed..7f13b6fbb73d 100644
--- a/Documentation/linux_tv/media/v4l/vidioc-g-audioout.rst
+++ b/Documentation/linux_tv/media/v4l/vidioc-g-audioout.rst
@@ -77,8 +77,8 @@ sound card are not audio outputs in this sense.
- ``name``\ [32]
- Name of the audio output, a NUL-terminated ASCII string, for
- example: "Line Out". This information is intended for the user,
- preferably the connector label on the device itself.
+ example: "Line Out". This information is intended for the user,
+ preferably the connector label on the device itself.
- .. row 3
@@ -87,7 +87,7 @@ sound card are not audio outputs in this sense.
- ``capability``
- Audio capability flags, none defined yet. Drivers must set this
- field to zero.
+ field to zero.
- .. row 4
@@ -96,7 +96,7 @@ sound card are not audio outputs in this sense.
- ``mode``
- Audio mode, none defined yet. Drivers and applications (on
- ``VIDIOC_S_AUDOUT``) must set this field to zero.
+ ``VIDIOC_S_AUDOUT``) must set this field to zero.
- .. row 5
@@ -105,7 +105,7 @@ sound card are not audio outputs in this sense.
- ``reserved``\ [2]
- Reserved for future extensions. Drivers and applications must set
- the array to zero.
+ the array to zero.
diff --git a/Documentation/linux_tv/media/v4l/vidioc-g-crop.rst b/Documentation/linux_tv/media/v4l/vidioc-g-crop.rst
index 1610c3fc1d93..a368636b305d 100644
--- a/Documentation/linux_tv/media/v4l/vidioc-g-crop.rst
+++ b/Documentation/linux_tv/media/v4l/vidioc-g-crop.rst
@@ -90,9 +90,9 @@ When cropping is not supported then no parameters are changed and
- ``type``
- Type of the data stream, set by the application. Only these types
- are valid here: ``V4L2_BUF_TYPE_VIDEO_CAPTURE``,
- ``V4L2_BUF_TYPE_VIDEO_OUTPUT`` and
- ``V4L2_BUF_TYPE_VIDEO_OVERLAY``. See :ref:`v4l2-buf-type`.
+ are valid here: ``V4L2_BUF_TYPE_VIDEO_CAPTURE``,
+ ``V4L2_BUF_TYPE_VIDEO_OUTPUT`` and
+ ``V4L2_BUF_TYPE_VIDEO_OVERLAY``. See :ref:`v4l2-buf-type`.
- .. row 2
@@ -101,7 +101,7 @@ When cropping is not supported then no parameters are changed and
- ``c``
- Cropping rectangle. The same co-ordinate system as for struct
- :ref:`v4l2_cropcap <v4l2-cropcap>` ``bounds`` is used.
+ :ref:`v4l2_cropcap <v4l2-cropcap>` ``bounds`` is used.
diff --git a/Documentation/linux_tv/media/v4l/vidioc-g-dv-timings.rst b/Documentation/linux_tv/media/v4l/vidioc-g-dv-timings.rst
index bd3d898acd53..8c72b2d461d3 100644
--- a/Documentation/linux_tv/media/v4l/vidioc-g-dv-timings.rst
+++ b/Documentation/linux_tv/media/v4l/vidioc-g-dv-timings.rst
@@ -92,8 +92,8 @@ EBUSY
- ``height``
- Height of the active video frame in lines. So for interlaced
- formats the height of the active video in each field is
- ``height``/2.
+ formats the height of the active video in each field is
+ ``height``/2.
- .. row 3
@@ -110,10 +110,10 @@ EBUSY
- ``polarities``
- This is a bit mask that defines polarities of sync signals. bit 0
- (V4L2_DV_VSYNC_POS_POL) is for vertical sync polarity and bit
- 1 (V4L2_DV_HSYNC_POS_POL) is for horizontal sync polarity. If
- the bit is set (1) it is positive polarity and if is cleared (0),
- it is negative polarity.
+ (V4L2_DV_VSYNC_POS_POL) is for vertical sync polarity and bit
+ 1 (V4L2_DV_HSYNC_POS_POL) is for horizontal sync polarity. If
+ the bit is set (1) it is positive polarity and if is cleared (0),
+ it is negative polarity.
- .. row 5
@@ -154,7 +154,7 @@ EBUSY
- ``vfrontporch``
- Vertical front porch in lines. For interlaced formats this refers
- to the odd field (aka field 1).
+ to the odd field (aka field 1).
- .. row 10
@@ -163,7 +163,7 @@ EBUSY
- ``vsync``
- Vertical sync length in lines. For interlaced formats this refers
- to the odd field (aka field 1).
+ to the odd field (aka field 1).
- .. row 11
@@ -172,7 +172,7 @@ EBUSY
- ``vbackporch``
- Vertical back porch in lines. For interlaced formats this refers
- to the odd field (aka field 1).
+ to the odd field (aka field 1).
- .. row 12
@@ -181,7 +181,7 @@ EBUSY
- ``il_vfrontporch``
- Vertical front porch in lines for the even field (aka field 2) of
- interlaced field formats. Must be 0 for progressive formats.
+ interlaced field formats. Must be 0 for progressive formats.
- .. row 13
@@ -190,7 +190,7 @@ EBUSY
- ``il_vsync``
- Vertical sync length in lines for the even field (aka field 2) of
- interlaced field formats. Must be 0 for progressive formats.
+ interlaced field formats. Must be 0 for progressive formats.
- .. row 14
@@ -199,7 +199,7 @@ EBUSY
- ``il_vbackporch``
- Vertical back porch in lines for the even field (aka field 2) of
- interlaced field formats. Must be 0 for progressive formats.
+ interlaced field formats. Must be 0 for progressive formats.
- .. row 15
@@ -208,8 +208,8 @@ EBUSY
- ``standards``
- The video standard(s) this format belongs to. This will be filled
- in by the driver. Applications must set this to 0. See
- :ref:`dv-bt-standards` for a list of standards.
+ in by the driver. Applications must set this to 0. See
+ :ref:`dv-bt-standards` for a list of standards.
- .. row 16
@@ -218,7 +218,7 @@ EBUSY
- ``flags``
- Several flags giving more information about the format. See
- :ref:`dv-bt-flags` for a description of the flags.
+ :ref:`dv-bt-flags` for a description of the flags.
@@ -236,19 +236,19 @@ EBUSY
- ``type``
- -
+ -
- Type of DV timings as listed in :ref:`dv-timing-types`.
- .. row 2
- union
- -
- -
+ -
+ -
- .. row 3
- -
+ -
- struct :ref:`v4l2_bt_timings <v4l2-bt-timings>`
- ``bt``
@@ -257,12 +257,12 @@ EBUSY
- .. row 4
- -
+ -
- __u32
- ``reserved``\ [32]
- -
+ -
@@ -284,9 +284,9 @@ EBUSY
- .. row 2
- -
- -
- -
+ -
+ -
+ -
- .. row 3
@@ -313,8 +313,8 @@ EBUSY
- .. row 2
- -
- -
+ -
+ -
- .. row 3
@@ -357,62 +357,62 @@ EBUSY
- .. row 2
- -
- -
+ -
+ -
- .. row 3
- V4L2_DV_FL_REDUCED_BLANKING
- CVT/GTF specific: the timings use reduced blanking (CVT) or the
- 'Secondary GTF' curve (GTF). In both cases the horizontal and/or
- vertical blanking intervals are reduced, allowing a higher
- resolution over the same bandwidth. This is a read-only flag,
- applications must not set this.
+ 'Secondary GTF' curve (GTF). In both cases the horizontal and/or
+ vertical blanking intervals are reduced, allowing a higher
+ resolution over the same bandwidth. This is a read-only flag,
+ applications must not set this.
- .. row 4
- V4L2_DV_FL_CAN_REDUCE_FPS
- CEA-861 specific: set for CEA-861 formats with a framerate that is
- a multiple of six. These formats can be optionally played at 1 /
- 1.001 speed to be compatible with 60 Hz based standards such as
- NTSC and PAL-M that use a framerate of 29.97 frames per second. If
- the transmitter can't generate such frequencies, then the flag
- will also be cleared. This is a read-only flag, applications must
- not set this.
+ a multiple of six. These formats can be optionally played at 1 /
+ 1.001 speed to be compatible with 60 Hz based standards such as
+ NTSC and PAL-M that use a framerate of 29.97 frames per second. If
+ the transmitter can't generate such frequencies, then the flag
+ will also be cleared. This is a read-only flag, applications must
+ not set this.
- .. row 5
- V4L2_DV_FL_REDUCED_FPS
- CEA-861 specific: only valid for video transmitters, the flag is
- cleared by receivers. It is also only valid for formats with the
- V4L2_DV_FL_CAN_REDUCE_FPS flag set, for other formats the
- flag will be cleared by the driver. If the application sets this
- flag, then the pixelclock used to set up the transmitter is
- divided by 1.001 to make it compatible with NTSC framerates. If
- the transmitter can't generate such frequencies, then the flag
- will also be cleared.
+ cleared by receivers. It is also only valid for formats with the
+ V4L2_DV_FL_CAN_REDUCE_FPS flag set, for other formats the
+ flag will be cleared by the driver. If the application sets this
+ flag, then the pixelclock used to set up the transmitter is
+ divided by 1.001 to make it compatible with NTSC framerates. If
+ the transmitter can't generate such frequencies, then the flag
+ will also be cleared.
- .. row 6
- V4L2_DV_FL_HALF_LINE
- Specific to interlaced formats: if set, then the vertical
- frontporch of field 1 (aka the odd field) is really one half-line
- longer and the vertical backporch of field 2 (aka the even field)
- is really one half-line shorter, so each field has exactly the
- same number of half-lines. Whether half-lines can be detected or
- used depends on the hardware.
+ frontporch of field 1 (aka the odd field) is really one half-line
+ longer and the vertical backporch of field 2 (aka the even field)
+ is really one half-line shorter, so each field has exactly the
+ same number of half-lines. Whether half-lines can be detected or
+ used depends on the hardware.
- .. row 7
- V4L2_DV_FL_IS_CE_VIDEO
- If set, then this is a Consumer Electronics (CE) video format.
- Such formats differ from other formats (commonly called IT
- formats) in that if R'G'B' encoding is used then by default the
- R'G'B' values use limited range (i.e. 16-235) as opposed to full
- range (i.e. 0-255). All formats defined in CEA-861 except for the
- 640x480p59.94 format are CE formats.
+ Such formats differ from other formats (commonly called IT
+ formats) in that if R'G'B' encoding is used then by default the
+ R'G'B' values use limited range (i.e. 16-235) as opposed to full
+ range (i.e. 0-255). All formats defined in CEA-861 except for the
+ 640x480p59.94 format are CE formats.
diff --git a/Documentation/linux_tv/media/v4l/vidioc-g-edid.rst b/Documentation/linux_tv/media/v4l/vidioc-g-edid.rst
index 5a72bed87cbb..cbed4805f017 100644
--- a/Documentation/linux_tv/media/v4l/vidioc-g-edid.rst
+++ b/Documentation/linux_tv/media/v4l/vidioc-g-edid.rst
@@ -102,9 +102,9 @@ EDID is no longer available.
- ``pad``
- Pad for which to get/set the EDID blocks. When used with a video
- device node the pad represents the input or output index as
- returned by :ref:`VIDIOC_ENUMINPUT` and
- :ref:`VIDIOC_ENUMOUTPUT` respectively.
+ device node the pad represents the input or output index as
+ returned by :ref:`VIDIOC_ENUMINPUT` and
+ :ref:`VIDIOC_ENUMOUTPUT` respectively.
- .. row 2
@@ -113,7 +113,7 @@ EDID is no longer available.
- ``start_block``
- Read the EDID from starting with this block. Must be 0 when
- setting the EDID.
+ setting the EDID.
- .. row 3
@@ -122,9 +122,9 @@ EDID is no longer available.
- ``blocks``
- The number of blocks to get or set. Must be less or equal to 256
- (the maximum number of blocks as defined by the standard). When
- you set the EDID and ``blocks`` is 0, then the EDID is disabled or
- erased.
+ (the maximum number of blocks as defined by the standard). When
+ you set the EDID and ``blocks`` is 0, then the EDID is disabled or
+ erased.
- .. row 4
@@ -133,7 +133,7 @@ EDID is no longer available.
- ``reserved``\ [5]
- Reserved for future extensions. Applications and drivers must set
- the array to zero.
+ the array to zero.
- .. row 5
@@ -142,7 +142,7 @@ EDID is no longer available.
- ``edid``
- Pointer to memory that contains the EDID. The minimum size is
- ``blocks`` * 128.
+ ``blocks`` * 128.
diff --git a/Documentation/linux_tv/media/v4l/vidioc-g-enc-index.rst b/Documentation/linux_tv/media/v4l/vidioc-g-enc-index.rst
index 864a347e6b1a..0ae21890dd61 100644
--- a/Documentation/linux_tv/media/v4l/vidioc-g-enc-index.rst
+++ b/Documentation/linux_tv/media/v4l/vidioc-g-enc-index.rst
@@ -78,7 +78,7 @@ video elementary streams.
- ``entries_cap``
- The number of entries the driver can buffer. Must be greater than
- zero.
+ zero.
- .. row 3
@@ -87,7 +87,7 @@ video elementary streams.
- ``reserved``\ [4]
- :cspan:`2` Reserved for future extensions. Drivers must set the
- array to zero.
+ array to zero.
- .. row 4
@@ -96,8 +96,8 @@ video elementary streams.
- ``entry``\ [``V4L2_ENC_IDX_ENTRIES``]
- Meta data about a compressed video stream. Each element of the
- array corresponds to one picture, sorted in ascending order by
- their ``offset``.
+ array corresponds to one picture, sorted in ascending order by
+ their ``offset``.
@@ -116,10 +116,10 @@ video elementary streams.
- ``offset``
- The offset in bytes from the beginning of the compressed video
- stream to the beginning of this picture, that is a *PES packet
- header* as defined in :ref:`mpeg2part1` or a *picture header* as
- defined in :ref:`mpeg2part2`. When the encoder is stopped, the
- driver resets the offset to zero.
+ stream to the beginning of this picture, that is a *PES packet
+ header* as defined in :ref:`mpeg2part1` or a *picture header* as
+ defined in :ref:`mpeg2part2`. When the encoder is stopped, the
+ driver resets the offset to zero.
- .. row 2
@@ -128,7 +128,7 @@ video elementary streams.
- ``pts``
- The 33 bit *Presentation Time Stamp* of this picture as defined in
- :ref:`mpeg2part1`.
+ :ref:`mpeg2part1`.
- .. row 3
@@ -145,7 +145,7 @@ video elementary streams.
- ``flags``
- Flags containing the coding type of this picture, see
- :ref:`enc-idx-flags`.
+ :ref:`enc-idx-flags`.
- .. row 5
@@ -154,7 +154,7 @@ video elementary streams.
- ``reserved``\ [2]
- Reserved for future extensions. Drivers must set the array to
- zero.
+ zero.
@@ -197,7 +197,7 @@ video elementary streams.
- 0x0F
- *AND* the flags field with this mask to obtain the picture coding
- type.
+ type.
diff --git a/Documentation/linux_tv/media/v4l/vidioc-g-ext-ctrls.rst b/Documentation/linux_tv/media/v4l/vidioc-g-ext-ctrls.rst
index a85778172265..9a2cc1b98c43 100644
--- a/Documentation/linux_tv/media/v4l/vidioc-g-ext-ctrls.rst
+++ b/Documentation/linux_tv/media/v4l/vidioc-g-ext-ctrls.rst
@@ -109,7 +109,7 @@ still cause this situation.
- ``id``
- -
+ -
- Identifies the control, set by the application.
- .. row 2
@@ -118,17 +118,17 @@ still cause this situation.
- ``size``
- -
+ -
- The total size in bytes of the payload of this control. This is
- normally 0, but for pointer controls this should be set to the
- size of the memory containing the payload, or that will receive
- the payload. If :ref:`VIDIOC_G_EXT_CTRLS <VIDIOC_G_EXT_CTRLS>` finds that this value is
- less than is required to store the payload result, then it is set
- to a value large enough to store the payload result and ``ENOSPC`` is
- returned. Note that for string controls this ``size`` field should
- not be confused with the length of the string. This field refers
- to the size of the memory that contains the string. The actual
- *length* of the string may well be much smaller.
+ normally 0, but for pointer controls this should be set to the
+ size of the memory containing the payload, or that will receive
+ the payload. If :ref:`VIDIOC_G_EXT_CTRLS <VIDIOC_G_EXT_CTRLS>` finds that this value is
+ less than is required to store the payload result, then it is set
+ to a value large enough to store the payload result and ``ENOSPC`` is
+ returned. Note that for string controls this ``size`` field should
+ not be confused with the length of the string. This field refers
+ to the size of the memory that contains the string. The actual
+ *length* of the string may well be much smaller.
- .. row 3
@@ -136,9 +136,9 @@ still cause this situation.
- ``reserved2``\ [1]
- -
+ -
- Reserved for future extensions. Drivers and applications must set
- the array to zero.
+ the array to zero.
- .. row 4
@@ -148,77 +148,77 @@ still cause this situation.
- .. row 5
- -
+ -
- __s32
- ``value``
- New value or current value. Valid if this control is not of type
- ``V4L2_CTRL_TYPE_INTEGER64`` and ``V4L2_CTRL_FLAG_HAS_PAYLOAD`` is
- not set.
+ ``V4L2_CTRL_TYPE_INTEGER64`` and ``V4L2_CTRL_FLAG_HAS_PAYLOAD`` is
+ not set.
- .. row 6
- -
+ -
- __s64
- ``value64``
- New value or current value. Valid if this control is of type
- ``V4L2_CTRL_TYPE_INTEGER64`` and ``V4L2_CTRL_FLAG_HAS_PAYLOAD`` is
- not set.
+ ``V4L2_CTRL_TYPE_INTEGER64`` and ``V4L2_CTRL_FLAG_HAS_PAYLOAD`` is
+ not set.
- .. row 7
- -
+ -
- char *
- ``string``
- A pointer to a string. Valid if this control is of type
- ``V4L2_CTRL_TYPE_STRING``.
+ ``V4L2_CTRL_TYPE_STRING``.
- .. row 8
- -
+ -
- __u8 *
- ``p_u8``
- A pointer to a matrix control of unsigned 8-bit values. Valid if
- this control is of type ``V4L2_CTRL_TYPE_U8``.
+ this control is of type ``V4L2_CTRL_TYPE_U8``.
- .. row 9
- -
+ -
- __u16 *
- ``p_u16``
- A pointer to a matrix control of unsigned 16-bit values. Valid if
- this control is of type ``V4L2_CTRL_TYPE_U16``.
+ this control is of type ``V4L2_CTRL_TYPE_U16``.
- .. row 10
- -
+ -
- __u32 *
- ``p_u32``
- A pointer to a matrix control of unsigned 32-bit values. Valid if
- this control is of type ``V4L2_CTRL_TYPE_U32``.
+ this control is of type ``V4L2_CTRL_TYPE_U32``.
- .. row 11
- -
+ -
- void *
- ``ptr``
- A pointer to a compound type which can be an N-dimensional array
- and/or a compound type (the control's type is >=
- ``V4L2_CTRL_COMPOUND_TYPES``). Valid if
- ``V4L2_CTRL_FLAG_HAS_PAYLOAD`` is set for this control.
+ and/or a compound type (the control's type is >=
+ ``V4L2_CTRL_COMPOUND_TYPES``). Valid if
+ ``V4L2_CTRL_FLAG_HAS_PAYLOAD`` is set for this control.
@@ -238,41 +238,41 @@ still cause this situation.
- .. row 2
- -
+ -
- __u32
- ``ctrl_class``
- The control class to which all controls belong, see
- :ref:`ctrl-class`. Drivers that use a kernel framework for
- handling controls will also accept a value of 0 here, meaning that
- the controls can belong to any control class. Whether drivers
- support this can be tested by setting ``ctrl_class`` to 0 and
- calling :ref:`VIDIOC_TRY_EXT_CTRLS <VIDIOC_G_EXT_CTRLS>` with a ``count`` of 0. If that
- succeeds, then the driver supports this feature.
+ :ref:`ctrl-class`. Drivers that use a kernel framework for
+ handling controls will also accept a value of 0 here, meaning that
+ the controls can belong to any control class. Whether drivers
+ support this can be tested by setting ``ctrl_class`` to 0 and
+ calling :ref:`VIDIOC_TRY_EXT_CTRLS <VIDIOC_G_EXT_CTRLS>` with a ``count`` of 0. If that
+ succeeds, then the driver supports this feature.
- .. row 3
- -
+ -
- __u32
- ``which``
- Which value of the control to get/set/try.
- ``V4L2_CTRL_WHICH_CUR_VAL`` will return the current value of the
- control and ``V4L2_CTRL_WHICH_DEF_VAL`` will return the default
- value of the control. Please note that you can only get the
- default value of the control, you cannot set or try it.
-
- For backwards compatibility you can also use a control class here
- (see :ref:`ctrl-class`). In that case all controls have to
- belong to that control class. This usage is deprecated, instead
- just use ``V4L2_CTRL_WHICH_CUR_VAL``. There are some very old
- drivers that do not yet support ``V4L2_CTRL_WHICH_CUR_VAL`` and
- that require a control class here. You can test for such drivers
- by setting ctrl_class to ``V4L2_CTRL_WHICH_CUR_VAL`` and calling
- VIDIOC_TRY_EXT_CTRLS with a count of 0. If that fails, then the
- driver does not support ``V4L2_CTRL_WHICH_CUR_VAL``.
+ ``V4L2_CTRL_WHICH_CUR_VAL`` will return the current value of the
+ control and ``V4L2_CTRL_WHICH_DEF_VAL`` will return the default
+ value of the control. Please note that you can only get the
+ default value of the control, you cannot set or try it.
+
+ For backwards compatibility you can also use a control class here
+ (see :ref:`ctrl-class`). In that case all controls have to
+ belong to that control class. This usage is deprecated, instead
+ just use ``V4L2_CTRL_WHICH_CUR_VAL``. There are some very old
+ drivers that do not yet support ``V4L2_CTRL_WHICH_CUR_VAL`` and
+ that require a control class here. You can test for such drivers
+ by setting ctrl_class to ``V4L2_CTRL_WHICH_CUR_VAL`` and calling
+ VIDIOC_TRY_EXT_CTRLS with a count of 0. If that fails, then the
+ driver does not support ``V4L2_CTRL_WHICH_CUR_VAL``.
- .. row 4
@@ -289,46 +289,46 @@ still cause this situation.
- ``error_idx``
- Set by the driver in case of an error. If the error is associated
- with a particular control, then ``error_idx`` is set to the index
- of that control. If the error is not related to a specific
- control, or the validation step failed (see below), then
- ``error_idx`` is set to ``count``. The value is undefined if the
- ioctl returned 0 (success).
-
- Before controls are read from/written to hardware a validation
- step takes place: this checks if all controls in the list are
- valid controls, if no attempt is made to write to a read-only
- control or read from a write-only control, and any other up-front
- checks that can be done without accessing the hardware. The exact
- validations done during this step are driver dependent since some
- checks might require hardware access for some devices, thus making
- it impossible to do those checks up-front. However, drivers should
- make a best-effort to do as many up-front checks as possible.
-
- This check is done to avoid leaving the hardware in an
- inconsistent state due to easy-to-avoid problems. But it leads to
- another problem: the application needs to know whether an error
- came from the validation step (meaning that the hardware was not
- touched) or from an error during the actual reading from/writing
- to hardware.
-
- The, in hindsight quite poor, solution for that is to set
- ``error_idx`` to ``count`` if the validation failed. This has the
- unfortunate side-effect that it is not possible to see which
- control failed the validation. If the validation was successful
- and the error happened while accessing the hardware, then
- ``error_idx`` is less than ``count`` and only the controls up to
- ``error_idx-1`` were read or written correctly, and the state of
- the remaining controls is undefined.
-
- Since :ref:`VIDIOC_TRY_EXT_CTRLS <VIDIOC_G_EXT_CTRLS>` does not access hardware there is
- also no need to handle the validation step in this special way, so
- ``error_idx`` will just be set to the control that failed the
- validation step instead of to ``count``. This means that if
- :ref:`VIDIOC_S_EXT_CTRLS <VIDIOC_G_EXT_CTRLS>` fails with ``error_idx`` set to ``count``,
- then you can call :ref:`VIDIOC_TRY_EXT_CTRLS <VIDIOC_G_EXT_CTRLS>` to try to discover the
- actual control that failed the validation step. Unfortunately,
- there is no ``TRY`` equivalent for :ref:`VIDIOC_G_EXT_CTRLS <VIDIOC_G_EXT_CTRLS>`.
+ with a particular control, then ``error_idx`` is set to the index
+ of that control. If the error is not related to a specific
+ control, or the validation step failed (see below), then
+ ``error_idx`` is set to ``count``. The value is undefined if the
+ ioctl returned 0 (success).
+
+ Before controls are read from/written to hardware a validation
+ step takes place: this checks if all controls in the list are
+ valid controls, if no attempt is made to write to a read-only
+ control or read from a write-only control, and any other up-front
+ checks that can be done without accessing the hardware. The exact
+ validations done during this step are driver dependent since some
+ checks might require hardware access for some devices, thus making
+ it impossible to do those checks up-front. However, drivers should
+ make a best-effort to do as many up-front checks as possible.
+
+ This check is done to avoid leaving the hardware in an
+ inconsistent state due to easy-to-avoid problems. But it leads to
+ another problem: the application needs to know whether an error
+ came from the validation step (meaning that the hardware was not
+ touched) or from an error during the actual reading from/writing
+ to hardware.
+
+ The, in hindsight quite poor, solution for that is to set
+ ``error_idx`` to ``count`` if the validation failed. This has the
+ unfortunate side-effect that it is not possible to see which
+ control failed the validation. If the validation was successful
+ and the error happened while accessing the hardware, then
+ ``error_idx`` is less than ``count`` and only the controls up to
+ ``error_idx-1`` were read or written correctly, and the state of
+ the remaining controls is undefined.
+
+ Since :ref:`VIDIOC_TRY_EXT_CTRLS <VIDIOC_G_EXT_CTRLS>` does not access hardware there is
+ also no need to handle the validation step in this special way, so
+ ``error_idx`` will just be set to the control that failed the
+ validation step instead of to ``count``. This means that if
+ :ref:`VIDIOC_S_EXT_CTRLS <VIDIOC_G_EXT_CTRLS>` fails with ``error_idx`` set to ``count``,
+ then you can call :ref:`VIDIOC_TRY_EXT_CTRLS <VIDIOC_G_EXT_CTRLS>` to try to discover the
+ actual control that failed the validation step. Unfortunately,
+ there is no ``TRY`` equivalent for :ref:`VIDIOC_G_EXT_CTRLS <VIDIOC_G_EXT_CTRLS>`.
- .. row 6
@@ -337,7 +337,7 @@ still cause this situation.
- ``reserved``\ [2]
- Reserved for future extensions. Drivers and applications must set
- the array to zero.
+ the array to zero.
- .. row 7
@@ -346,7 +346,7 @@ still cause this situation.
- ``controls``
- Pointer to an array of ``count`` v4l2_ext_control structures.
- Ignored if ``count`` equals zero.
+ Ignored if ``count`` equals zero.
@@ -365,10 +365,10 @@ still cause this situation.
- 0x980000
- The class containing user controls. These controls are described
- in :ref:`control`. All controls that can be set using the
- :ref:`VIDIOC_S_CTRL <VIDIOC_G_CTRL>` and
- :ref:`VIDIOC_G_CTRL <VIDIOC_G_CTRL>` ioctl belong to this
- class.
+ in :ref:`control`. All controls that can be set using the
+ :ref:`VIDIOC_S_CTRL <VIDIOC_G_CTRL>` and
+ :ref:`VIDIOC_G_CTRL <VIDIOC_G_CTRL>` ioctl belong to this
+ class.
- .. row 2
@@ -377,7 +377,7 @@ still cause this situation.
- 0x990000
- The class containing MPEG compression controls. These controls are
- described in :ref:`mpeg-controls`.
+ described in :ref:`mpeg-controls`.
- .. row 3
@@ -386,7 +386,7 @@ still cause this situation.
- 0x9a0000
- The class containing camera controls. These controls are described
- in :ref:`camera-controls`.
+ in :ref:`camera-controls`.
- .. row 4
@@ -395,7 +395,7 @@ still cause this situation.
- 0x9b0000
- The class containing FM Transmitter (FM TX) controls. These
- controls are described in :ref:`fm-tx-controls`.
+ controls are described in :ref:`fm-tx-controls`.
- .. row 5
@@ -404,7 +404,7 @@ still cause this situation.
- 0x9c0000
- The class containing flash device controls. These controls are
- described in :ref:`flash-controls`.
+ described in :ref:`flash-controls`.
- .. row 6
@@ -413,7 +413,7 @@ still cause this situation.
- 0x9d0000
- The class containing JPEG compression controls. These controls are
- described in :ref:`jpeg-controls`.
+ described in :ref:`jpeg-controls`.
- .. row 7
@@ -422,7 +422,7 @@ still cause this situation.
- 0x9e0000
- The class containing image source controls. These controls are
- described in :ref:`image-source-controls`.
+ described in :ref:`image-source-controls`.
- .. row 8
@@ -431,7 +431,7 @@ still cause this situation.
- 0x9f0000
- The class containing image processing controls. These controls are
- described in :ref:`image-process-controls`.
+ described in :ref:`image-process-controls`.
- .. row 9
@@ -440,7 +440,7 @@ still cause this situation.
- 0xa10000
- The class containing FM Receiver (FM RX) controls. These controls
- are described in :ref:`fm-rx-controls`.
+ are described in :ref:`fm-rx-controls`.
- .. row 10
@@ -449,7 +449,7 @@ still cause this situation.
- 0xa20000
- The class containing RF tuner controls. These controls are
- described in :ref:`rf-tuner-controls`.
+ described in :ref:`rf-tuner-controls`.
diff --git a/Documentation/linux_tv/media/v4l/vidioc-g-fbuf.rst b/Documentation/linux_tv/media/v4l/vidioc-g-fbuf.rst
index 32ce2738d598..05a477f4925c 100644
--- a/Documentation/linux_tv/media/v4l/vidioc-g-fbuf.rst
+++ b/Documentation/linux_tv/media/v4l/vidioc-g-fbuf.rst
@@ -89,9 +89,9 @@ destructive video overlay.
- ``capability``
- -
+ -
- Overlay capability flags set by the driver, see
- :ref:`framebuffer-cap`.
+ :ref:`framebuffer-cap`.
- .. row 2
@@ -99,9 +99,9 @@ destructive video overlay.
- ``flags``
- -
+ -
- Overlay control flags set by application and driver, see
- :ref:`framebuffer-flags`
+ :ref:`framebuffer-flags`
- .. row 3
@@ -109,22 +109,22 @@ destructive video overlay.
- ``base``
- -
+ -
- Physical base address of the framebuffer, that is the address of
- the pixel in the top left corner of the framebuffer. [1]_
+ the pixel in the top left corner of the framebuffer. [1]_
- .. row 4
- -
- -
- -
+ -
+ -
+ -
- This field is irrelevant to *non-destructive Video Overlays*. For
- *destructive Video Overlays* applications must provide a base
- address. The driver may accept only base addresses which are a
- multiple of two, four or eight bytes. For *Video Output Overlays*
- the driver must return a valid base address, so applications can
- find the corresponding Linux framebuffer device (see
- :ref:`osd`).
+ *destructive Video Overlays* applications must provide a base
+ address. The driver may accept only base addresses which are a
+ multiple of two, four or eight bytes. For *Video Output Overlays*
+ the driver must return a valid base address, so applications can
+ find the corresponding Linux framebuffer device (see
+ :ref:`osd`).
- .. row 5
@@ -132,12 +132,12 @@ destructive video overlay.
- ``fmt``
- -
+ -
- Layout of the frame buffer.
- .. row 6
- -
+ -
- __u32
- ``width``
@@ -146,7 +146,7 @@ destructive video overlay.
- .. row 7
- -
+ -
- __u32
- ``height``
@@ -155,7 +155,7 @@ destructive video overlay.
- .. row 8
- -
+ -
- __u32
- ``pixelformat``
@@ -164,114 +164,114 @@ destructive video overlay.
- .. row 9
- -
- -
- -
+ -
+ -
+ -
- For *non-destructive Video Overlays* this field only defines a
- format for the struct :ref:`v4l2_window <v4l2-window>`
- ``chromakey`` field.
+ format for the struct :ref:`v4l2_window <v4l2-window>`
+ ``chromakey`` field.
- .. row 10
- -
- -
- -
+ -
+ -
+ -
- For *destructive Video Overlays* applications must initialize this
- field. For *Video Output Overlays* the driver must return a valid
- format.
+ field. For *Video Output Overlays* the driver must return a valid
+ format.
- .. row 11
- -
- -
- -
+ -
+ -
+ -
- Usually this is an RGB format (for example
- :ref:`V4L2_PIX_FMT_RGB565 <V4L2-PIX-FMT-RGB565>`) but YUV
- formats (only packed YUV formats when chroma keying is used, not
- including ``V4L2_PIX_FMT_YUYV`` and ``V4L2_PIX_FMT_UYVY``) and the
- ``V4L2_PIX_FMT_PAL8`` format are also permitted. The behavior of
- the driver when an application requests a compressed format is
- undefined. See :ref:`pixfmt` for information on pixel formats.
+ :ref:`V4L2_PIX_FMT_RGB565 <V4L2-PIX-FMT-RGB565>`) but YUV
+ formats (only packed YUV formats when chroma keying is used, not
+ including ``V4L2_PIX_FMT_YUYV`` and ``V4L2_PIX_FMT_UYVY``) and the
+ ``V4L2_PIX_FMT_PAL8`` format are also permitted. The behavior of
+ the driver when an application requests a compressed format is
+ undefined. See :ref:`pixfmt` for information on pixel formats.
- .. row 12
- -
+ -
- enum :ref:`v4l2_field <v4l2-field>`
- ``field``
- Drivers and applications shall ignore this field. If applicable,
- the field order is selected with the
- :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl, using the ``field``
- field of struct :ref:`v4l2_window <v4l2-window>`.
+ the field order is selected with the
+ :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl, using the ``field``
+ field of struct :ref:`v4l2_window <v4l2-window>`.
- .. row 13
- -
+ -
- __u32
- ``bytesperline``
- Distance in bytes between the leftmost pixels in two adjacent
- lines.
+ lines.
- .. row 14
- :cspan:`3`
- This field is irrelevant to *non-destructive Video Overlays*.
+ This field is irrelevant to *non-destructive Video Overlays*.
- For *destructive Video Overlays* both applications and drivers can
- set this field to request padding bytes at the end of each line.
- Drivers however may ignore the requested value, returning
- ``width`` times bytes-per-pixel or a larger value required by the
- hardware. That implies applications can just set this field to
- zero to get a reasonable default.
+ For *destructive Video Overlays* both applications and drivers can
+ set this field to request padding bytes at the end of each line.
+ Drivers however may ignore the requested value, returning
+ ``width`` times bytes-per-pixel or a larger value required by the
+ hardware. That implies applications can just set this field to
+ zero to get a reasonable default.
- For *Video Output Overlays* the driver must return a valid value.
+ For *Video Output Overlays* the driver must return a valid value.
- Video hardware may access padding bytes, therefore they must
- reside in accessible memory. Consider for example the case where
- padding bytes after the last line of an image cross a system page
- boundary. Capture devices may write padding bytes, the value is
- undefined. Output devices ignore the contents of padding bytes.
+ Video hardware may access padding bytes, therefore they must
+ reside in accessible memory. Consider for example the case where
+ padding bytes after the last line of an image cross a system page
+ boundary. Capture devices may write padding bytes, the value is
+ undefined. Output devices ignore the contents of padding bytes.
- When the image format is planar the ``bytesperline`` value applies
- to the first plane and is divided by the same factor as the
- ``width`` field for the other planes. For example the Cb and Cr
- planes of a YUV 4:2:0 image have half as many padding bytes
- following each line as the Y plane. To avoid ambiguities drivers
- must return a ``bytesperline`` value rounded up to a multiple of
- the scale factor.
+ When the image format is planar the ``bytesperline`` value applies
+ to the first plane and is divided by the same factor as the
+ ``width`` field for the other planes. For example the Cb and Cr
+ planes of a YUV 4:2:0 image have half as many padding bytes
+ following each line as the Y plane. To avoid ambiguities drivers
+ must return a ``bytesperline`` value rounded up to a multiple of
+ the scale factor.
- .. row 15
- -
+ -
- __u32
- ``sizeimage``
- This field is irrelevant to *non-destructive Video Overlays*. For
- *destructive Video Overlays* applications must initialize this
- field. For *Video Output Overlays* the driver must return a valid
- format.
+ *destructive Video Overlays* applications must initialize this
+ field. For *Video Output Overlays* the driver must return a valid
+ format.
- Together with ``base`` it defines the framebuffer memory
- accessible by the driver.
+ Together with ``base`` it defines the framebuffer memory
+ accessible by the driver.
- .. row 16
- -
+ -
- enum :ref:`v4l2_colorspace <v4l2-colorspace>`
- ``colorspace``
- This information supplements the ``pixelformat`` and must be set
- by the driver, see :ref:`colorspaces`.
+ by the driver, see :ref:`colorspaces`.
- .. row 17
- -
+ -
- __u32
- ``priv``
@@ -295,10 +295,10 @@ destructive video overlay.
- 0x0001
- The device is capable of non-destructive overlays. When the driver
- clears this flag, only destructive overlays are supported. There
- are no drivers yet which support both destructive and
- non-destructive overlays. Video Output Overlays are in practice
- always non-destructive.
+ clears this flag, only destructive overlays are supported. There
+ are no drivers yet which support both destructive and
+ non-destructive overlays. Video Output Overlays are in practice
+ always non-destructive.
- .. row 2
@@ -307,9 +307,9 @@ destructive video overlay.
- 0x0002
- The device supports clipping by chroma-keying the images. That is,
- image pixels replace pixels in the VGA or video signal only where
- the latter assume a certain color. Chroma-keying makes no sense
- for destructive overlays.
+ image pixels replace pixels in the VGA or video signal only where
+ the latter assume a certain color. Chroma-keying makes no sense
+ for destructive overlays.
- .. row 3
@@ -334,8 +334,8 @@ destructive video overlay.
- 0x0010
- The device supports clipping/blending using the alpha channel of
- the framebuffer or VGA signal. Alpha blending makes no sense for
- destructive overlays.
+ the framebuffer or VGA signal. Alpha blending makes no sense for
+ destructive overlays.
- .. row 6
@@ -344,7 +344,7 @@ destructive video overlay.
- 0x0020
- The device supports alpha blending using a global alpha value.
- Alpha blending makes no sense for destructive overlays.
+ Alpha blending makes no sense for destructive overlays.
- .. row 7
@@ -353,8 +353,8 @@ destructive video overlay.
- 0x0040
- The device supports clipping/blending using the inverted alpha
- channel of the framebuffer or VGA signal. Alpha blending makes no
- sense for destructive overlays.
+ channel of the framebuffer or VGA signal. Alpha blending makes no
+ sense for destructive overlays.
- .. row 8
@@ -363,8 +363,8 @@ destructive video overlay.
- 0x0080
- The device supports Source Chroma-keying. Video pixels with the
- chroma-key colors are replaced by framebuffer pixels, which is
- exactly opposite of ``V4L2_FBUF_CAP_CHROMAKEY``
+ chroma-key colors are replaced by framebuffer pixels, which is
+ exactly opposite of ``V4L2_FBUF_CAP_CHROMAKEY``
@@ -383,9 +383,9 @@ destructive video overlay.
- 0x0001
- The framebuffer is the primary graphics surface. In other words,
- the overlay is destructive. This flag is typically set by any
- driver that doesn't have the ``V4L2_FBUF_CAP_EXTERNOVERLAY``
- capability and it is cleared otherwise.
+ the overlay is destructive. This flag is typically set by any
+ driver that doesn't have the ``V4L2_FBUF_CAP_EXTERNOVERLAY``
+ capability and it is cleared otherwise.
- .. row 2
@@ -394,18 +394,18 @@ destructive video overlay.
- 0x0002
- If this flag is set for a video capture device, then the driver
- will set the initial overlay size to cover the full framebuffer
- size, otherwise the existing overlay size (as set by
- :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>`) will be used. Only one
- video capture driver (bttv) supports this flag. The use of this
- flag for capture devices is deprecated. There is no way to detect
- which drivers support this flag, so the only reliable method of
- setting the overlay size is through
- :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>`. If this flag is set for a
- video output device, then the video output overlay window is
- relative to the top-left corner of the framebuffer and restricted
- to the size of the framebuffer. If it is cleared, then the video
- output overlay window is relative to the video output display.
+ will set the initial overlay size to cover the full framebuffer
+ size, otherwise the existing overlay size (as set by
+ :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>`) will be used. Only one
+ video capture driver (bttv) supports this flag. The use of this
+ flag for capture devices is deprecated. There is no way to detect
+ which drivers support this flag, so the only reliable method of
+ setting the overlay size is through
+ :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>`. If this flag is set for a
+ video output device, then the video output overlay window is
+ relative to the top-left corner of the framebuffer and restricted
+ to the size of the framebuffer. If it is cleared, then the video
+ output overlay window is relative to the video output display.
- .. row 3
@@ -414,16 +414,16 @@ destructive video overlay.
- 0x0004
- Use chroma-keying. The chroma-key color is determined by the
- ``chromakey`` field of struct :ref:`v4l2_window <v4l2-window>`
- and negotiated with the :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>`
- ioctl, see :ref:`overlay` and :ref:`osd`.
+ ``chromakey`` field of struct :ref:`v4l2_window <v4l2-window>`
+ and negotiated with the :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>`
+ ioctl, see :ref:`overlay` and :ref:`osd`.
- .. row 4
- :cspan:`2` There are no flags to enable clipping using a list of
- clip rectangles or a bitmap. These methods are negotiated with the
- :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl, see :ref:`overlay`
- and :ref:`osd`.
+ clip rectangles or a bitmap. These methods are negotiated with the
+ :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl, see :ref:`overlay`
+ and :ref:`osd`.
- .. row 5
@@ -432,9 +432,9 @@ destructive video overlay.
- 0x0008
- Use the alpha channel of the framebuffer to clip or blend
- framebuffer pixels with video images. The blend function is:
- output = framebuffer pixel * alpha + video pixel * (1 - alpha).
- The actual alpha depth depends on the framebuffer pixel format.
+ framebuffer pixels with video images. The blend function is:
+ output = framebuffer pixel * alpha + video pixel * (1 - alpha).
+ The actual alpha depth depends on the framebuffer pixel format.
- .. row 6
@@ -443,12 +443,12 @@ destructive video overlay.
- 0x0010
- Use a global alpha value to blend the framebuffer with video
- images. The blend function is: output = (framebuffer pixel * alpha
- + video pixel * (255 - alpha)) / 255. The alpha value is
- determined by the ``global_alpha`` field of struct
- :ref:`v4l2_window <v4l2-window>` and negotiated with the
- :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl, see :ref:`overlay`
- and :ref:`osd`.
+ images. The blend function is: output = (framebuffer pixel * alpha
+ + video pixel * (255 - alpha)) / 255. The alpha value is
+ determined by the ``global_alpha`` field of struct
+ :ref:`v4l2_window <v4l2-window>` and negotiated with the
+ :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl, see :ref:`overlay`
+ and :ref:`osd`.
- .. row 7
@@ -457,10 +457,10 @@ destructive video overlay.
- 0x0020
- Like ``V4L2_FBUF_FLAG_LOCAL_ALPHA``, use the alpha channel of the
- framebuffer to clip or blend framebuffer pixels with video images,
- but with an inverted alpha value. The blend function is: output =
- framebuffer pixel * (1 - alpha) + video pixel * alpha. The actual
- alpha depth depends on the framebuffer pixel format.
+ framebuffer to clip or blend framebuffer pixels with video images,
+ but with an inverted alpha value. The blend function is: output =
+ framebuffer pixel * (1 - alpha) + video pixel * alpha. The actual
+ alpha depth depends on the framebuffer pixel format.
- .. row 8
@@ -469,12 +469,12 @@ destructive video overlay.
- 0x0040
- Use source chroma-keying. The source chroma-key color is
- determined by the ``chromakey`` field of struct
- :ref:`v4l2_window <v4l2-window>` and negotiated with the
- :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl, see :ref:`overlay`
- and :ref:`osd`. Both chroma-keying are mutual exclusive to each
- other, so same ``chromakey`` field of struct
- :ref:`v4l2_window <v4l2-window>` is being used.
+ determined by the ``chromakey`` field of struct
+ :ref:`v4l2_window <v4l2-window>` and negotiated with the
+ :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl, see :ref:`overlay`
+ and :ref:`osd`. Both chroma-keying are mutual exclusive to each
+ other, so same ``chromakey`` field of struct
+ :ref:`v4l2_window <v4l2-window>` is being used.
diff --git a/Documentation/linux_tv/media/v4l/vidioc-g-fmt.rst b/Documentation/linux_tv/media/v4l/vidioc-g-fmt.rst
index 684793a47267..4e56ff72ddcb 100644
--- a/Documentation/linux_tv/media/v4l/vidioc-g-fmt.rst
+++ b/Documentation/linux_tv/media/v4l/vidioc-g-fmt.rst
@@ -95,7 +95,7 @@ The format as returned by :ref:`VIDIOC_TRY_FMT <VIDIOC_G_FMT>` must be identical
- ``type``
- -
+ -
- Type of the data stream, see :ref:`v4l2-buf-type`.
- .. row 2
@@ -106,69 +106,69 @@ The format as returned by :ref:`VIDIOC_TRY_FMT <VIDIOC_G_FMT>` must be identical
- .. row 3
- -
+ -
- struct :ref:`v4l2_pix_format <v4l2-pix-format>`
- ``pix``
- Definition of an image format, see :ref:`pixfmt`, used by video
- capture and output devices.
+ capture and output devices.
- .. row 4
- -
+ -
- struct :ref:`v4l2_pix_format_mplane <v4l2-pix-format-mplane>`
- ``pix_mp``
- Definition of an image format, see :ref:`pixfmt`, used by video
- capture and output devices that support the
- :ref:`multi-planar version of the API <planar-apis>`.
+ capture and output devices that support the
+ :ref:`multi-planar version of the API <planar-apis>`.
- .. row 5
- -
+ -
- struct :ref:`v4l2_window <v4l2-window>`
- ``win``
- Definition of an overlaid image, see :ref:`overlay`, used by
- video overlay devices.
+ video overlay devices.
- .. row 6
- -
+ -
- struct :ref:`v4l2_vbi_format <v4l2-vbi-format>`
- ``vbi``
- Raw VBI capture or output parameters. This is discussed in more
- detail in :ref:`raw-vbi`. Used by raw VBI capture and output
- devices.
+ detail in :ref:`raw-vbi`. Used by raw VBI capture and output
+ devices.
- .. row 7
- -
+ -
- struct :ref:`v4l2_sliced_vbi_format <v4l2-sliced-vbi-format>`
- ``sliced``
- Sliced VBI capture or output parameters. See :ref:`sliced` for
- details. Used by sliced VBI capture and output devices.
+ details. Used by sliced VBI capture and output devices.
- .. row 8
- -
+ -
- struct :ref:`v4l2_sdr_format <v4l2-sdr-format>`
- ``sdr``
- Definition of a data format, see :ref:`pixfmt`, used by SDR
- capture and output devices.
+ capture and output devices.
- .. row 9
- -
+ -
- __u8
- ``raw_data``\ [200]
diff --git a/Documentation/linux_tv/media/v4l/vidioc-g-frequency.rst b/Documentation/linux_tv/media/v4l/vidioc-g-frequency.rst
index c5f6846b498c..e5c49033b5a1 100644
--- a/Documentation/linux_tv/media/v4l/vidioc-g-frequency.rst
+++ b/Documentation/linux_tv/media/v4l/vidioc-g-frequency.rst
@@ -66,11 +66,11 @@ write-only ioctl, it does not return the actual new frequency.
- ``tuner``
- The tuner or modulator index number. This is the same value as in
- the struct :ref:`v4l2_input <v4l2-input>` ``tuner`` field and
- the struct :ref:`v4l2_tuner <v4l2-tuner>` ``index`` field, or
- the struct :ref:`v4l2_output <v4l2-output>` ``modulator`` field
- and the struct :ref:`v4l2_modulator <v4l2-modulator>` ``index``
- field.
+ the struct :ref:`v4l2_input <v4l2-input>` ``tuner`` field and
+ the struct :ref:`v4l2_tuner <v4l2-tuner>` ``index`` field, or
+ the struct :ref:`v4l2_output <v4l2-output>` ``modulator`` field
+ and the struct :ref:`v4l2_modulator <v4l2-modulator>` ``index``
+ field.
- .. row 2
@@ -79,11 +79,11 @@ write-only ioctl, it does not return the actual new frequency.
- ``type``
- The tuner type. This is the same value as in the struct
- :ref:`v4l2_tuner <v4l2-tuner>` ``type`` field. The type must be
- set to ``V4L2_TUNER_RADIO`` for ``/dev/radioX`` device nodes, and
- to ``V4L2_TUNER_ANALOG_TV`` for all others. Set this field to
- ``V4L2_TUNER_RADIO`` for modulators (currently only radio
- modulators are supported). See :ref:`v4l2-tuner-type`
+ :ref:`v4l2_tuner <v4l2-tuner>` ``type`` field. The type must be
+ set to ``V4L2_TUNER_RADIO`` for ``/dev/radioX`` device nodes, and
+ to ``V4L2_TUNER_ANALOG_TV`` for all others. Set this field to
+ ``V4L2_TUNER_RADIO`` for modulators (currently only radio
+ modulators are supported). See :ref:`v4l2-tuner-type`
- .. row 3
@@ -92,10 +92,10 @@ write-only ioctl, it does not return the actual new frequency.
- ``frequency``
- Tuning frequency in units of 62.5 kHz, or if the struct
- :ref:`v4l2_tuner <v4l2-tuner>` or struct
- :ref:`v4l2_modulator <v4l2-modulator>` ``capability`` flag
- ``V4L2_TUNER_CAP_LOW`` is set, in units of 62.5 Hz. A 1 Hz unit is
- used when the ``capability`` flag ``V4L2_TUNER_CAP_1HZ`` is set.
+ :ref:`v4l2_tuner <v4l2-tuner>` or struct
+ :ref:`v4l2_modulator <v4l2-modulator>` ``capability`` flag
+ ``V4L2_TUNER_CAP_LOW`` is set, in units of 62.5 Hz. A 1 Hz unit is
+ used when the ``capability`` flag ``V4L2_TUNER_CAP_1HZ`` is set.
- .. row 4
@@ -104,7 +104,7 @@ write-only ioctl, it does not return the actual new frequency.
- ``reserved``\ [8]
- Reserved for future extensions. Drivers and applications must set
- the array to zero.
+ the array to zero.
diff --git a/Documentation/linux_tv/media/v4l/vidioc-g-jpegcomp.rst b/Documentation/linux_tv/media/v4l/vidioc-g-jpegcomp.rst
index 0adc8b2e2aac..cea36cf3af17 100644
--- a/Documentation/linux_tv/media/v4l/vidioc-g-jpegcomp.rst
+++ b/Documentation/linux_tv/media/v4l/vidioc-g-jpegcomp.rst
@@ -67,9 +67,9 @@ encoding. You usually do want to add them.
- ``quality``
- Deprecated. If
- :ref:`V4L2_CID_JPEG_COMPRESSION_QUALITY <jpeg-quality-control>`
- control is exposed by a driver applications should use it instead
- and ignore this field.
+ :ref:`V4L2_CID_JPEG_COMPRESSION_QUALITY <jpeg-quality-control>`
+ control is exposed by a driver applications should use it instead
+ and ignore this field.
- .. row 2
@@ -77,7 +77,7 @@ encoding. You usually do want to add them.
- ``APPn``
- -
+ -
- .. row 3
@@ -85,7 +85,7 @@ encoding. You usually do want to add them.
- ``APP_len``
- -
+ -
- .. row 4
@@ -93,7 +93,7 @@ encoding. You usually do want to add them.
- ``APP_data``\ [60]
- -
+ -
- .. row 5
@@ -101,7 +101,7 @@ encoding. You usually do want to add them.
- ``COM_len``
- -
+ -
- .. row 6
@@ -109,7 +109,7 @@ encoding. You usually do want to add them.
- ``COM_data``\ [60]
- -
+ -
- .. row 7
@@ -118,9 +118,9 @@ encoding. You usually do want to add them.
- ``jpeg_markers``
- See :ref:`jpeg-markers`. Deprecated. If
- :ref:`V4L2_CID_JPEG_ACTIVE_MARKER <jpeg-active-marker-control>`
- control is exposed by a driver applications should use it instead
- and ignore this field.
+ :ref:`V4L2_CID_JPEG_ACTIVE_MARKER <jpeg-active-marker-control>`
+ control is exposed by a driver applications should use it instead
+ and ignore this field.
diff --git a/Documentation/linux_tv/media/v4l/vidioc-g-modulator.rst b/Documentation/linux_tv/media/v4l/vidioc-g-modulator.rst
index 8b213e858b39..7fe256319682 100644
--- a/Documentation/linux_tv/media/v4l/vidioc-g-modulator.rst
+++ b/Documentation/linux_tv/media/v4l/vidioc-g-modulator.rst
@@ -83,7 +83,7 @@ To change the radio frequency the
- ``name``\ [32]
- Name of the modulator, a NUL-terminated ASCII string. This
- information is intended for the user.
+ information is intended for the user.
- .. row 3
@@ -92,10 +92,10 @@ To change the radio frequency the
- ``capability``
- Modulator capability flags. No flags are defined for this field,
- the tuner flags in struct :ref:`v4l2_tuner <v4l2-tuner>` are
- used accordingly. The audio flags indicate the ability to encode
- audio subprograms. They will *not* change for example with the
- current video standard.
+ the tuner flags in struct :ref:`v4l2_tuner <v4l2-tuner>` are
+ used accordingly. The audio flags indicate the ability to encode
+ audio subprograms. They will *not* change for example with the
+ current video standard.
- .. row 4
@@ -104,9 +104,9 @@ To change the radio frequency the
- ``rangelow``
- The lowest tunable frequency in units of 62.5 KHz, or if the
- ``capability`` flag ``V4L2_TUNER_CAP_LOW`` is set, in units of
- 62.5 Hz, or if the ``capability`` flag ``V4L2_TUNER_CAP_1HZ`` is
- set, in units of 1 Hz.
+ ``capability`` flag ``V4L2_TUNER_CAP_LOW`` is set, in units of
+ 62.5 Hz, or if the ``capability`` flag ``V4L2_TUNER_CAP_1HZ`` is
+ set, in units of 1 Hz.
- .. row 5
@@ -115,9 +115,9 @@ To change the radio frequency the
- ``rangehigh``
- The highest tunable frequency in units of 62.5 KHz, or if the
- ``capability`` flag ``V4L2_TUNER_CAP_LOW`` is set, in units of
- 62.5 Hz, or if the ``capability`` flag ``V4L2_TUNER_CAP_1HZ`` is
- set, in units of 1 Hz.
+ ``capability`` flag ``V4L2_TUNER_CAP_LOW`` is set, in units of
+ 62.5 Hz, or if the ``capability`` flag ``V4L2_TUNER_CAP_1HZ`` is
+ set, in units of 1 Hz.
- .. row 6
@@ -126,13 +126,13 @@ To change the radio frequency the
- ``txsubchans``
- With this field applications can determine how audio sub-carriers
- shall be modulated. It contains a set of flags as defined in
- :ref:`modulator-txsubchans`. Note the tuner ``rxsubchans`` flags
- are reused, but the semantics are different. Video output devices
- are assumed to have an analog or PCM audio input with 1-3
- channels. The ``txsubchans`` flags select one or more channels for
- modulation, together with some audio subprogram indicator, for
- example a stereo pilot tone.
+ shall be modulated. It contains a set of flags as defined in
+ :ref:`modulator-txsubchans`. Note the tuner ``rxsubchans`` flags
+ are reused, but the semantics are different. Video output devices
+ are assumed to have an analog or PCM audio input with 1-3
+ channels. The ``txsubchans`` flags select one or more channels for
+ modulation, together with some audio subprogram indicator, for
+ example a stereo pilot tone.
- .. row 7
@@ -149,7 +149,7 @@ To change the radio frequency the
- ``reserved``\ [3]
- Reserved for future extensions. Drivers and applications must set
- the array to zero.
+ the array to zero.
@@ -168,9 +168,9 @@ To change the radio frequency the
- 0x0001
- Modulate channel 1 as mono audio, when the input has more
- channels, a down-mix of channel 1 and 2. This flag does not
- combine with ``V4L2_TUNER_SUB_STEREO`` or
- ``V4L2_TUNER_SUB_LANG1``.
+ channels, a down-mix of channel 1 and 2. This flag does not
+ combine with ``V4L2_TUNER_SUB_STEREO`` or
+ ``V4L2_TUNER_SUB_LANG1``.
- .. row 2
@@ -179,11 +179,11 @@ To change the radio frequency the
- 0x0002
- Modulate channel 1 and 2 as left and right channel of a stereo
- audio signal. When the input has only one channel or two channels
- and ``V4L2_TUNER_SUB_SAP`` is also set, channel 1 is encoded as
- left and right channel. This flag does not combine with
- ``V4L2_TUNER_SUB_MONO`` or ``V4L2_TUNER_SUB_LANG1``. When the
- driver does not support stereo audio it shall fall back to mono.
+ audio signal. When the input has only one channel or two channels
+ and ``V4L2_TUNER_SUB_SAP`` is also set, channel 1 is encoded as
+ left and right channel. This flag does not combine with
+ ``V4L2_TUNER_SUB_MONO`` or ``V4L2_TUNER_SUB_LANG1``. When the
+ driver does not support stereo audio it shall fall back to mono.
- .. row 3
@@ -192,15 +192,15 @@ To change the radio frequency the
- 0x0008
- Modulate channel 1 and 2 as primary and secondary language of a
- bilingual audio signal. When the input has only one channel it is
- used for both languages. It is not possible to encode the primary
- or secondary language only. This flag does not combine with
- ``V4L2_TUNER_SUB_MONO``, ``V4L2_TUNER_SUB_STEREO`` or
- ``V4L2_TUNER_SUB_SAP``. If the hardware does not support the
- respective audio matrix, or the current video standard does not
- permit bilingual audio the :ref:`VIDIOC_S_MODULATOR <VIDIOC_G_MODULATOR>` ioctl shall
- return an ``EINVAL`` error code and the driver shall fall back to mono
- or stereo mode.
+ bilingual audio signal. When the input has only one channel it is
+ used for both languages. It is not possible to encode the primary
+ or secondary language only. This flag does not combine with
+ ``V4L2_TUNER_SUB_MONO``, ``V4L2_TUNER_SUB_STEREO`` or
+ ``V4L2_TUNER_SUB_SAP``. If the hardware does not support the
+ respective audio matrix, or the current video standard does not
+ permit bilingual audio the :ref:`VIDIOC_S_MODULATOR <VIDIOC_G_MODULATOR>` ioctl shall
+ return an ``EINVAL`` error code and the driver shall fall back to mono
+ or stereo mode.
- .. row 4
@@ -217,21 +217,21 @@ To change the radio frequency the
- 0x0004
- When combined with ``V4L2_TUNER_SUB_MONO`` the first channel is
- encoded as mono audio, the last channel as Second Audio Program.
- When the input has only one channel it is used for both audio
- tracks. When the input has three channels the mono track is a
- down-mix of channel 1 and 2. When combined with
- ``V4L2_TUNER_SUB_STEREO`` channel 1 and 2 are encoded as left and
- right stereo audio, channel 3 as Second Audio Program. When the
- input has only two channels, the first is encoded as left and
- right channel and the second as SAP. When the input has only one
- channel it is used for all audio tracks. It is not possible to
- encode a Second Audio Program only. This flag must combine with
- ``V4L2_TUNER_SUB_MONO`` or ``V4L2_TUNER_SUB_STEREO``. If the
- hardware does not support the respective audio matrix, or the
- current video standard does not permit SAP the
- :ref:`VIDIOC_S_MODULATOR <VIDIOC_G_MODULATOR>` ioctl shall return an ``EINVAL`` error code and
- driver shall fall back to mono or stereo mode.
+ encoded as mono audio, the last channel as Second Audio Program.
+ When the input has only one channel it is used for both audio
+ tracks. When the input has three channels the mono track is a
+ down-mix of channel 1 and 2. When combined with
+ ``V4L2_TUNER_SUB_STEREO`` channel 1 and 2 are encoded as left and
+ right stereo audio, channel 3 as Second Audio Program. When the
+ input has only two channels, the first is encoded as left and
+ right channel and the second as SAP. When the input has only one
+ channel it is used for all audio tracks. It is not possible to
+ encode a Second Audio Program only. This flag must combine with
+ ``V4L2_TUNER_SUB_MONO`` or ``V4L2_TUNER_SUB_STEREO``. If the
+ hardware does not support the respective audio matrix, or the
+ current video standard does not permit SAP the
+ :ref:`VIDIOC_S_MODULATOR <VIDIOC_G_MODULATOR>` ioctl shall return an ``EINVAL`` error code and
+ driver shall fall back to mono or stereo mode.
- .. row 6
diff --git a/Documentation/linux_tv/media/v4l/vidioc-g-parm.rst b/Documentation/linux_tv/media/v4l/vidioc-g-parm.rst
index 480d2923c982..7dbf1b5e918e 100644
--- a/Documentation/linux_tv/media/v4l/vidioc-g-parm.rst
+++ b/Documentation/linux_tv/media/v4l/vidioc-g-parm.rst
@@ -63,10 +63,10 @@ union holding separate parameters for input and output devices.
- ``type``
- -
+ -
- The buffer (stream) type, same as struct
- :ref:`v4l2_format <v4l2-format>` ``type``, set by the
- application. See :ref:`v4l2-buf-type`
+ :ref:`v4l2_format <v4l2-format>` ``type``, set by the
+ application. See :ref:`v4l2-buf-type`
- .. row 2
@@ -74,32 +74,32 @@ union holding separate parameters for input and output devices.
- ``parm``
- -
- -
+ -
+ -
- .. row 3
- -
+ -
- struct :ref:`v4l2_captureparm <v4l2-captureparm>`
- ``capture``
- Parameters for capture devices, used when ``type`` is
- ``V4L2_BUF_TYPE_VIDEO_CAPTURE``.
+ ``V4L2_BUF_TYPE_VIDEO_CAPTURE``.
- .. row 4
- -
+ -
- struct :ref:`v4l2_outputparm <v4l2-outputparm>`
- ``output``
- Parameters for output devices, used when ``type`` is
- ``V4L2_BUF_TYPE_VIDEO_OUTPUT``.
+ ``V4L2_BUF_TYPE_VIDEO_OUTPUT``.
- .. row 5
- -
+ -
- __u8
- ``raw_data``\ [200]
@@ -139,20 +139,20 @@ union holding separate parameters for input and output devices.
- ``timeperframe``
- This is the desired period between successive frames captured by
- the driver, in seconds. The field is intended to skip frames on
- the driver side, saving I/O bandwidth.
+ the driver, in seconds. The field is intended to skip frames on
+ the driver side, saving I/O bandwidth.
- Applications store here the desired frame period, drivers return
- the actual frame period, which must be greater or equal to the
- nominal frame period determined by the current video standard
- (struct :ref:`v4l2_standard <v4l2-standard>` ``frameperiod``
- field). Changing the video standard (also implicitly by switching
- the video input) may reset this parameter to the nominal frame
- period. To reset manually applications can just set this field to
- zero.
+ Applications store here the desired frame period, drivers return
+ the actual frame period, which must be greater or equal to the
+ nominal frame period determined by the current video standard
+ (struct :ref:`v4l2_standard <v4l2-standard>` ``frameperiod``
+ field). Changing the video standard (also implicitly by switching
+ the video input) may reset this parameter to the nominal frame
+ period. To reset manually applications can just set this field to
+ zero.
- Drivers support this function only when they set the
- ``V4L2_CAP_TIMEPERFRAME`` flag in the ``capability`` field.
+ Drivers support this function only when they set the
+ ``V4L2_CAP_TIMEPERFRAME`` flag in the ``capability`` field.
- .. row 4
@@ -161,9 +161,9 @@ union holding separate parameters for input and output devices.
- ``extendedmode``
- Custom (driver specific) streaming parameters. When unused,
- applications and drivers must set this field to zero. Applications
- using this field should check the driver name and version, see
- :ref:`querycap`.
+ applications and drivers must set this field to zero. Applications
+ using this field should check the driver name and version, see
+ :ref:`querycap`.
- .. row 5
@@ -172,11 +172,11 @@ union holding separate parameters for input and output devices.
- ``readbuffers``
- Applications set this field to the desired number of buffers used
- internally by the driver in :ref:`read() <func-read>` mode.
- Drivers return the actual number of buffers. When an application
- requests zero buffers, drivers should just return the current
- setting rather than the minimum or an error code. For details see
- :ref:`rw`.
+ internally by the driver in :ref:`read() <func-read>` mode.
+ Drivers return the actual number of buffers. When an application
+ requests zero buffers, drivers should just return the current
+ setting rather than the minimum or an error code. For details see
+ :ref:`rw`.
- .. row 6
@@ -185,7 +185,7 @@ union holding separate parameters for input and output devices.
- ``reserved``\ [4]
- Reserved for future extensions. Drivers and applications must set
- the array to zero.
+ the array to zero.
@@ -220,27 +220,27 @@ union holding separate parameters for input and output devices.
- ``timeperframe``
- This is the desired period between successive frames output by the
- driver, in seconds.
+ driver, in seconds.
- .. row 4
- :cspan:`2`
- The field is intended to repeat frames on the driver side in
- :ref:`write() <func-write>` mode (in streaming mode timestamps
- can be used to throttle the output), saving I/O bandwidth.
+ The field is intended to repeat frames on the driver side in
+ :ref:`write() <func-write>` mode (in streaming mode timestamps
+ can be used to throttle the output), saving I/O bandwidth.
- Applications store here the desired frame period, drivers return
- the actual frame period, which must be greater or equal to the
- nominal frame period determined by the current video standard
- (struct :ref:`v4l2_standard <v4l2-standard>` ``frameperiod``
- field). Changing the video standard (also implicitly by switching
- the video output) may reset this parameter to the nominal frame
- period. To reset manually applications can just set this field to
- zero.
+ Applications store here the desired frame period, drivers return
+ the actual frame period, which must be greater or equal to the
+ nominal frame period determined by the current video standard
+ (struct :ref:`v4l2_standard <v4l2-standard>` ``frameperiod``
+ field). Changing the video standard (also implicitly by switching
+ the video output) may reset this parameter to the nominal frame
+ period. To reset manually applications can just set this field to
+ zero.
- Drivers support this function only when they set the
- ``V4L2_CAP_TIMEPERFRAME`` flag in the ``capability`` field.
+ Drivers support this function only when they set the
+ ``V4L2_CAP_TIMEPERFRAME`` flag in the ``capability`` field.
- .. row 5
@@ -249,9 +249,9 @@ union holding separate parameters for input and output devices.
- ``extendedmode``
- Custom (driver specific) streaming parameters. When unused,
- applications and drivers must set this field to zero. Applications
- using this field should check the driver name and version, see
- :ref:`querycap`.
+ applications and drivers must set this field to zero. Applications
+ using this field should check the driver name and version, see
+ :ref:`querycap`.
- .. row 6
@@ -260,11 +260,11 @@ union holding separate parameters for input and output devices.
- ``writebuffers``
- Applications set this field to the desired number of buffers used
- internally by the driver in :ref:`write() <func-write>` mode. Drivers
- return the actual number of buffers. When an application requests
- zero buffers, drivers should just return the current setting
- rather than the minimum or an error code. For details see
- :ref:`rw`.
+ internally by the driver in :ref:`write() <func-write>` mode. Drivers
+ return the actual number of buffers. When an application requests
+ zero buffers, drivers should just return the current setting
+ rather than the minimum or an error code. For details see
+ :ref:`rw`.
- .. row 7
@@ -273,7 +273,7 @@ union holding separate parameters for input and output devices.
- ``reserved``\ [4]
- Reserved for future extensions. Drivers and applications must set
- the array to zero.
+ the array to zero.
@@ -292,7 +292,7 @@ union holding separate parameters for input and output devices.
- 0x1000
- The frame skipping/repeating controlled by the ``timeperframe``
- field is supported.
+ field is supported.
@@ -311,33 +311,33 @@ union holding separate parameters for input and output devices.
- 0x0001
- High quality imaging mode. High quality mode is intended for still
- imaging applications. The idea is to get the best possible image
- quality that the hardware can deliver. It is not defined how the
- driver writer may achieve that; it will depend on the hardware and
- the ingenuity of the driver writer. High quality mode is a
- different mode from the regular motion video capture modes. In
- high quality mode:
+ imaging applications. The idea is to get the best possible image
+ quality that the hardware can deliver. It is not defined how the
+ driver writer may achieve that; it will depend on the hardware and
+ the ingenuity of the driver writer. High quality mode is a
+ different mode from the regular motion video capture modes. In
+ high quality mode:
- - The driver may be able to capture higher resolutions than for
- motion capture.
+ - The driver may be able to capture higher resolutions than for
+ motion capture.
- - The driver may support fewer pixel formats than motion capture
- (eg; true color).
+ - The driver may support fewer pixel formats than motion capture
+ (eg; true color).
- - The driver may capture and arithmetically combine multiple
- successive fields or frames to remove color edge artifacts and
- reduce the noise in the video data.
+ - The driver may capture and arithmetically combine multiple
+ successive fields or frames to remove color edge artifacts and
+ reduce the noise in the video data.
- - The driver may capture images in slices like a scanner in order
- to handle larger format images than would otherwise be
- possible.
+ - The driver may capture images in slices like a scanner in order
+ to handle larger format images than would otherwise be
+ possible.
- - An image capture operation may be significantly slower than
- motion capture.
+ - An image capture operation may be significantly slower than
+ motion capture.
- - Moving objects in the image might have excessive motion blur.
+ - Moving objects in the image might have excessive motion blur.
- - Capture might only work through the :ref:`read() <func-read>` call.
+ - Capture might only work through the :ref:`read() <func-read>` call.
diff --git a/Documentation/linux_tv/media/v4l/vidioc-g-priority.rst b/Documentation/linux_tv/media/v4l/vidioc-g-priority.rst
index f3fedd201c6d..1551f3139899 100644
--- a/Documentation/linux_tv/media/v4l/vidioc-g-priority.rst
+++ b/Documentation/linux_tv/media/v4l/vidioc-g-priority.rst
@@ -58,7 +58,7 @@ with a pointer to this variable.
- 0
- -
+ -
- .. row 2
@@ -67,9 +67,9 @@ with a pointer to this variable.
- 1
- Lowest priority, usually applications running in background, for
- example monitoring VBI transmissions. A proxy application running
- in user space will be necessary if multiple applications want to
- read from a device at this priority.
+ example monitoring VBI transmissions. A proxy application running
+ in user space will be necessary if multiple applications want to
+ read from a device at this priority.
- .. row 3
@@ -77,7 +77,7 @@ with a pointer to this variable.
- 2
- -
+ -
- .. row 4
@@ -86,10 +86,10 @@ with a pointer to this variable.
- 2
- Medium priority, usually applications started and interactively
- controlled by the user. For example TV viewers, Teletext browsers,
- or just "panel" applications to change the channel or video
- controls. This is the default priority unless an application
- requests another.
+ controlled by the user. For example TV viewers, Teletext browsers,
+ or just "panel" applications to change the channel or video
+ controls. This is the default priority unless an application
+ requests another.
- .. row 5
@@ -98,8 +98,8 @@ with a pointer to this variable.
- 3
- Highest priority. Only one file descriptor can have this priority,
- it blocks any other fd from changing device properties. Usually
- applications which must not be interrupted, like video recording.
+ it blocks any other fd from changing device properties. Usually
+ applications which must not be interrupted, like video recording.
diff --git a/Documentation/linux_tv/media/v4l/vidioc-g-selection.rst b/Documentation/linux_tv/media/v4l/vidioc-g-selection.rst
index 337ad78d9a7c..609510a03cde 100644
--- a/Documentation/linux_tv/media/v4l/vidioc-g-selection.rst
+++ b/Documentation/linux_tv/media/v4l/vidioc-g-selection.rst
@@ -149,7 +149,7 @@ Selection targets and flags are documented in
- ``type``
- Type of the buffer (from enum
- :ref:`v4l2_buf_type <v4l2-buf-type>`).
+ :ref:`v4l2_buf_type <v4l2-buf-type>`).
- .. row 2
@@ -158,7 +158,7 @@ Selection targets and flags are documented in
- ``target``
- Used to select between
- :ref:`cropping and composing rectangles <v4l2-selections-common>`.
+ :ref:`cropping and composing rectangles <v4l2-selections-common>`.
- .. row 3
@@ -167,7 +167,7 @@ Selection targets and flags are documented in
- ``flags``
- Flags controlling the selection rectangle adjustments, refer to
- :ref:`selection flags <v4l2-selection-flags>`.
+ :ref:`selection flags <v4l2-selection-flags>`.
- .. row 4
@@ -184,7 +184,7 @@ Selection targets and flags are documented in
- ``reserved[9]``
- Reserved fields for future use. Drivers and applications must zero
- this array.
+ this array.
diff --git a/Documentation/linux_tv/media/v4l/vidioc-g-sliced-vbi-cap.rst b/Documentation/linux_tv/media/v4l/vidioc-g-sliced-vbi-cap.rst
index f5052093a77a..39d297836824 100644
--- a/Documentation/linux_tv/media/v4l/vidioc-g-sliced-vbi-cap.rst
+++ b/Documentation/linux_tv/media/v4l/vidioc-g-sliced-vbi-cap.rst
@@ -57,7 +57,7 @@ to write-read, in Linux 2.6.19.
- ``service_set``
- :cspan:`2` A set of all data services supported by the driver.
- Equal to the union of all elements of the ``service_lines`` array.
+ Equal to the union of all elements of the ``service_lines`` array.
- .. row 2
@@ -66,15 +66,15 @@ to write-read, in Linux 2.6.19.
- ``service_lines``\ [2][24]
- :cspan:`2` Each element of this array contains a set of data
- services the hardware can look for or insert into a particular
- scan line. Data services are defined in :ref:`vbi-services`.
- Array indices map to ITU-R line numbers (see also :ref:`vbi-525`
- and :ref:`vbi-625`) as follows:
+ services the hardware can look for or insert into a particular
+ scan line. Data services are defined in :ref:`vbi-services`.
+ Array indices map to ITU-R line numbers (see also :ref:`vbi-525`
+ and :ref:`vbi-625`) as follows:
- .. row 3
- -
- -
+ -
+ -
- Element
- 525 line systems
@@ -83,8 +83,8 @@ to write-read, in Linux 2.6.19.
- .. row 4
- -
- -
+ -
+ -
- ``service_lines``\ [0][1]
- 1
@@ -93,8 +93,8 @@ to write-read, in Linux 2.6.19.
- .. row 5
- -
- -
+ -
+ -
- ``service_lines``\ [0][23]
- 23
@@ -103,8 +103,8 @@ to write-read, in Linux 2.6.19.
- .. row 6
- -
- -
+ -
+ -
- ``service_lines``\ [1][1]
- 264
@@ -113,8 +113,8 @@ to write-read, in Linux 2.6.19.
- .. row 7
- -
- -
+ -
+ -
- ``service_lines``\ [1][23]
- 286
@@ -123,30 +123,30 @@ to write-read, in Linux 2.6.19.
- .. row 8
- -
+ -
- .. row 9
- -
- -
+ -
+ -
- :cspan:`2` The number of VBI lines the hardware can capture or
- output per frame, or the number of services it can identify on a
- given line may be limited. For example on PAL line 16 the hardware
- may be able to look for a VPS or Teletext signal, but not both at
- the same time. Applications can learn about these limits using the
- :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl as described in
- :ref:`sliced`.
+ output per frame, or the number of services it can identify on a
+ given line may be limited. For example on PAL line 16 the hardware
+ may be able to look for a VPS or Teletext signal, but not both at
+ the same time. Applications can learn about these limits using the
+ :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl as described in
+ :ref:`sliced`.
- .. row 10
- -
+ -
- .. row 11
- -
- -
+ -
+ -
- :cspan:`2` Drivers must set ``service_lines`` [0][0] and
- ``service_lines``\ [1][0] to zero.
+ ``service_lines``\ [1][0] to zero.
- .. row 12
@@ -155,8 +155,8 @@ to write-read, in Linux 2.6.19.
- ``type``
- Type of the data stream, see :ref:`v4l2-buf-type`. Should be
- ``V4L2_BUF_TYPE_SLICED_VBI_CAPTURE`` or
- ``V4L2_BUF_TYPE_SLICED_VBI_OUTPUT``.
+ ``V4L2_BUF_TYPE_SLICED_VBI_CAPTURE`` or
+ ``V4L2_BUF_TYPE_SLICED_VBI_OUTPUT``.
- .. row 13
@@ -165,7 +165,7 @@ to write-read, in Linux 2.6.19.
- ``reserved``\ [3]
- :cspan:`2` This array is reserved for future extensions.
- Applications and drivers must set it to zero.
+ Applications and drivers must set it to zero.
@@ -200,7 +200,7 @@ to write-read, in Linux 2.6.19.
- PAL/SECAM line 7-22, 320-335 (second field 7-22)
- Last 42 of the 45 byte Teletext packet, that is without clock
- run-in and framing code, lsb first transmitted.
+ run-in and framing code, lsb first transmitted.
- .. row 3
@@ -213,7 +213,7 @@ to write-read, in Linux 2.6.19.
- PAL line 16
- Byte number 3 to 15 according to Figure 9 of ETS 300 231, lsb
- first transmitted.
+ first transmitted.
- .. row 4
@@ -226,7 +226,7 @@ to write-read, in Linux 2.6.19.
- NTSC line 21, 284 (second field 21)
- Two bytes in transmission order, including parity bit, lsb first
- transmitted.
+ transmitted.
- .. row 5
@@ -238,13 +238,13 @@ to write-read, in Linux 2.6.19.
- PAL/SECAM line 23
- -
+ -
- ::
+ ::
- Byte 0 1
- msb lsb msb lsb
- Bit 7 6 5 4 3 2 1 0 x x 13 12 11 10 9
+ Byte 0 1
+ msb lsb msb lsb
+ Bit 7 6 5 4 3 2 1 0 x x 13 12 11 10 9
- .. row 6
diff --git a/Documentation/linux_tv/media/v4l/vidioc-g-tuner.rst b/Documentation/linux_tv/media/v4l/vidioc-g-tuner.rst
index 57a14811773c..eee4acfcf3cf 100644
--- a/Documentation/linux_tv/media/v4l/vidioc-g-tuner.rst
+++ b/Documentation/linux_tv/media/v4l/vidioc-g-tuner.rst
@@ -82,8 +82,8 @@ To change the radio frequency the
- :cspan:`1`
- Name of the tuner, a NUL-terminated ASCII string. This information
- is intended for the user.
+ Name of the tuner, a NUL-terminated ASCII string. This information
+ is intended for the user.
- .. row 3
@@ -101,17 +101,17 @@ To change the radio frequency the
- :cspan:`1`
- Tuner capability flags, see :ref:`tuner-capability`. Audio flags
- indicate the ability to decode audio subprograms. They will *not*
- change, for example with the current video standard.
+ Tuner capability flags, see :ref:`tuner-capability`. Audio flags
+ indicate the ability to decode audio subprograms. They will *not*
+ change, for example with the current video standard.
- When the structure refers to a radio tuner the
- ``V4L2_TUNER_CAP_LANG1``, ``V4L2_TUNER_CAP_LANG2`` and
- ``V4L2_TUNER_CAP_NORM`` flags can't be used.
+ When the structure refers to a radio tuner the
+ ``V4L2_TUNER_CAP_LANG1``, ``V4L2_TUNER_CAP_LANG2`` and
+ ``V4L2_TUNER_CAP_NORM`` flags can't be used.
- If multiple frequency bands are supported, then ``capability`` is
- the union of all ``capability`` fields of each struct
- :ref:`v4l2_frequency_band <v4l2-frequency-band>`.
+ If multiple frequency bands are supported, then ``capability`` is
+ the union of all ``capability`` fields of each struct
+ :ref:`v4l2_frequency_band <v4l2-frequency-band>`.
- .. row 5
@@ -120,11 +120,11 @@ To change the radio frequency the
- ``rangelow``
- :cspan:`1` The lowest tunable frequency in units of 62.5 kHz, or
- if the ``capability`` flag ``V4L2_TUNER_CAP_LOW`` is set, in units
- of 62.5 Hz, or if the ``capability`` flag ``V4L2_TUNER_CAP_1HZ``
- is set, in units of 1 Hz. If multiple frequency bands are
- supported, then ``rangelow`` is the lowest frequency of all the
- frequency bands.
+ if the ``capability`` flag ``V4L2_TUNER_CAP_LOW`` is set, in units
+ of 62.5 Hz, or if the ``capability`` flag ``V4L2_TUNER_CAP_1HZ``
+ is set, in units of 1 Hz. If multiple frequency bands are
+ supported, then ``rangelow`` is the lowest frequency of all the
+ frequency bands.
- .. row 6
@@ -133,11 +133,11 @@ To change the radio frequency the
- ``rangehigh``
- :cspan:`1` The highest tunable frequency in units of 62.5 kHz,
- or if the ``capability`` flag ``V4L2_TUNER_CAP_LOW`` is set, in
- units of 62.5 Hz, or if the ``capability`` flag
- ``V4L2_TUNER_CAP_1HZ`` is set, in units of 1 Hz. If multiple
- frequency bands are supported, then ``rangehigh`` is the highest
- frequency of all the frequency bands.
+ or if the ``capability`` flag ``V4L2_TUNER_CAP_LOW`` is set, in
+ units of 62.5 Hz, or if the ``capability`` flag
+ ``V4L2_TUNER_CAP_1HZ`` is set, in units of 1 Hz. If multiple
+ frequency bands are supported, then ``rangehigh`` is the highest
+ frequency of all the frequency bands.
- .. row 7
@@ -147,63 +147,63 @@ To change the radio frequency the
- :cspan:`1`
- Some tuners or audio decoders can determine the received audio
- subprograms by analyzing audio carriers, pilot tones or other
- indicators. To pass this information drivers set flags defined in
- :ref:`tuner-rxsubchans` in this field. For example:
+ Some tuners or audio decoders can determine the received audio
+ subprograms by analyzing audio carriers, pilot tones or other
+ indicators. To pass this information drivers set flags defined in
+ :ref:`tuner-rxsubchans` in this field. For example:
- .. row 8
- -
- -
+ -
+ -
- ``V4L2_TUNER_SUB_MONO``
- receiving mono audio
- .. row 9
- -
- -
+ -
+ -
- ``STEREO | SAP``
- receiving stereo audio and a secondary audio program
- .. row 10
- -
- -
+ -
+ -
- ``MONO | STEREO``
- receiving mono or stereo audio, the hardware cannot distinguish
- .. row 11
- -
- -
+ -
+ -
- ``LANG1 | LANG2``
- receiving bilingual audio
- .. row 12
- -
- -
+ -
+ -
- ``MONO | STEREO | LANG1 | LANG2``
- receiving mono, stereo or bilingual audio
- .. row 13
- -
- -
+ -
+ -
- :cspan:`1`
- When the ``V4L2_TUNER_CAP_STEREO``, ``_LANG1``, ``_LANG2`` or
- ``_SAP`` flag is cleared in the ``capability`` field, the
- corresponding ``V4L2_TUNER_SUB_`` flag must not be set here.
+ When the ``V4L2_TUNER_CAP_STEREO``, ``_LANG1``, ``_LANG2`` or
+ ``_SAP`` flag is cleared in the ``capability`` field, the
+ corresponding ``V4L2_TUNER_SUB_`` flag must not be set here.
- This field is valid only if this is the tuner of the current video
- input, or when the structure refers to a radio tuner.
+ This field is valid only if this is the tuner of the current video
+ input, or when the structure refers to a radio tuner.
- .. row 14
@@ -213,15 +213,15 @@ To change the radio frequency the
- :cspan:`1`
- The selected audio mode, see :ref:`tuner-audmode` for valid
- values. The audio mode does not affect audio subprogram detection,
- and like a :ref:`control` it does not automatically
- change unless the requested mode is invalid or unsupported. See
- :ref:`tuner-matrix` for possible results when the selected and
- received audio programs do not match.
+ The selected audio mode, see :ref:`tuner-audmode` for valid
+ values. The audio mode does not affect audio subprogram detection,
+ and like a :ref:`control` it does not automatically
+ change unless the requested mode is invalid or unsupported. See
+ :ref:`tuner-matrix` for possible results when the selected and
+ received audio programs do not match.
- Currently this is the only field of struct
- :ref:`struct v4l2_tuner <v4l2-tuner>` applications can change.
+ Currently this is the only field of struct
+ :ref:`struct v4l2_tuner <v4l2-tuner>` applications can change.
- .. row 15
@@ -230,7 +230,7 @@ To change the radio frequency the
- ``signal``
- :cspan:`1` The signal strength if known, ranging from 0 to
- 65535. Higher values indicate a better signal.
+ 65535. Higher values indicate a better signal.
- .. row 16
@@ -239,7 +239,7 @@ To change the radio frequency the
- ``afc``
- :cspan:`1` Automatic frequency control: When the ``afc`` value
- is negative, the frequency is too low, when positive too high.
+ is negative, the frequency is too low, when positive too high.
- .. row 17
@@ -248,7 +248,7 @@ To change the radio frequency the
- ``reserved``\ [4]
- :cspan:`1` Reserved for future extensions. Drivers and
- applications must set the array to zero.
+ applications must set the array to zero.
@@ -266,7 +266,7 @@ To change the radio frequency the
- 1
- -
+ -
- .. row 2
@@ -274,7 +274,7 @@ To change the radio frequency the
- 2
- -
+ -
- .. row 3
@@ -282,7 +282,7 @@ To change the radio frequency the
- 4
- -
+ -
- .. row 4
@@ -290,7 +290,7 @@ To change the radio frequency the
- 5
- -
+ -
@@ -309,7 +309,7 @@ To change the radio frequency the
- 0x0001
- When set, tuning frequencies are expressed in units of 62.5 Hz
- instead of 62.5 kHz.
+ instead of 62.5 kHz.
- .. row 2
@@ -318,14 +318,14 @@ To change the radio frequency the
- 0x0002
- This is a multi-standard tuner; the video standard can or must be
- switched. (B/G PAL tuners for example are typically not considered
- multi-standard because the video standard is automatically
- determined from the frequency band.) The set of supported video
- standards is available from the struct
- :ref:`v4l2_input <v4l2-input>` pointing to this tuner, see the
- description of ioctl :ref:`VIDIOC_ENUMINPUT`
- for details. Only ``V4L2_TUNER_ANALOG_TV`` tuners can have this
- capability.
+ switched. (B/G PAL tuners for example are typically not considered
+ multi-standard because the video standard is automatically
+ determined from the frequency band.) The set of supported video
+ standards is available from the struct
+ :ref:`v4l2_input <v4l2-input>` pointing to this tuner, see the
+ description of ioctl :ref:`VIDIOC_ENUMINPUT`
+ for details. Only ``V4L2_TUNER_ANALOG_TV`` tuners can have this
+ capability.
- .. row 3
@@ -334,8 +334,8 @@ To change the radio frequency the
- 0x0004
- If set, then this tuner supports the hardware seek functionality
- where the seek stops when it reaches the end of the frequency
- range.
+ where the seek stops when it reaches the end of the frequency
+ range.
- .. row 4
@@ -344,8 +344,8 @@ To change the radio frequency the
- 0x0008
- If set, then this tuner supports the hardware seek functionality
- where the seek wraps around when it reaches the end of the
- frequency range.
+ where the seek wraps around when it reaches the end of the
+ frequency range.
- .. row 5
@@ -362,10 +362,10 @@ To change the radio frequency the
- 0x0040
- Reception of the primary language of a bilingual audio program is
- supported. Bilingual audio is a feature of two-channel systems,
- transmitting the primary language monaural on the main audio
- carrier and a secondary language monaural on a second carrier.
- Only ``V4L2_TUNER_ANALOG_TV`` tuners can have this capability.
+ supported. Bilingual audio is a feature of two-channel systems,
+ transmitting the primary language monaural on the main audio
+ carrier and a secondary language monaural on a second carrier.
+ Only ``V4L2_TUNER_ANALOG_TV`` tuners can have this capability.
- .. row 7
@@ -374,8 +374,8 @@ To change the radio frequency the
- 0x0020
- Reception of the secondary language of a bilingual audio program
- is supported. Only ``V4L2_TUNER_ANALOG_TV`` tuners can have this
- capability.
+ is supported. Only ``V4L2_TUNER_ANALOG_TV`` tuners can have this
+ capability.
- .. row 8
@@ -384,15 +384,15 @@ To change the radio frequency the
- 0x0020
- Reception of a secondary audio program is supported. This is a
- feature of the BTSC system which accompanies the NTSC video
- standard. Two audio carriers are available for mono or stereo
- transmissions of a primary language, and an independent third
- carrier for a monaural secondary language. Only
- ``V4L2_TUNER_ANALOG_TV`` tuners can have this capability.
+ feature of the BTSC system which accompanies the NTSC video
+ standard. Two audio carriers are available for mono or stereo
+ transmissions of a primary language, and an independent third
+ carrier for a monaural secondary language. Only
+ ``V4L2_TUNER_ANALOG_TV`` tuners can have this capability.
- Note the ``V4L2_TUNER_CAP_LANG2`` and ``V4L2_TUNER_CAP_SAP`` flags
- are synonyms. ``V4L2_TUNER_CAP_SAP`` applies when the tuner
- supports the ``V4L2_STD_NTSC_M`` video standard.
+ Note the ``V4L2_TUNER_CAP_LANG2`` and ``V4L2_TUNER_CAP_SAP`` flags
+ are synonyms. ``V4L2_TUNER_CAP_SAP`` applies when the tuner
+ supports the ``V4L2_STD_NTSC_M`` video standard.
- .. row 9
@@ -401,7 +401,7 @@ To change the radio frequency the
- 0x0080
- RDS capture is supported. This capability is only valid for radio
- tuners.
+ tuners.
- .. row 10
@@ -426,7 +426,7 @@ To change the radio frequency the
- 0x0400
- The :ref:`VIDIOC_ENUM_FREQ_BANDS`
- ioctl can be used to enumerate the available frequency bands.
+ ioctl can be used to enumerate the available frequency bands.
- .. row 13
@@ -435,9 +435,9 @@ To change the radio frequency the
- 0x0800
- The range to search when using the hardware seek functionality is
- programmable, see
- :ref:`VIDIOC_S_HW_FREQ_SEEK` for
- details.
+ programmable, see
+ :ref:`VIDIOC_S_HW_FREQ_SEEK` for
+ details.
- .. row 14
@@ -446,7 +446,7 @@ To change the radio frequency the
- 0x1000
- When set, tuning frequencies are expressed in units of 1 Hz
- instead of 62.5 kHz.
+ instead of 62.5 kHz.
@@ -481,8 +481,8 @@ To change the radio frequency the
- 0x0008
- The tuner receives the primary language of a bilingual audio
- signal. Drivers must clear this flag when the current video
- standard is ``V4L2_STD_NTSC_M``.
+ signal. Drivers must clear this flag when the current video
+ standard is ``V4L2_STD_NTSC_M``.
- .. row 4
@@ -491,7 +491,7 @@ To change the radio frequency the
- 0x0004
- The tuner receives the secondary language of a bilingual audio
- signal (or a second audio program).
+ signal (or a second audio program).
- .. row 5
@@ -500,9 +500,9 @@ To change the radio frequency the
- 0x0004
- The tuner receives a Second Audio Program. Note the
- ``V4L2_TUNER_SUB_LANG2`` and ``V4L2_TUNER_SUB_SAP`` flags are
- synonyms. The ``V4L2_TUNER_SUB_SAP`` flag applies when the current
- video standard is ``V4L2_STD_NTSC_M``.
+ ``V4L2_TUNER_SUB_LANG2`` and ``V4L2_TUNER_SUB_SAP`` flags are
+ synonyms. The ``V4L2_TUNER_SUB_SAP`` flag applies when the current
+ video standard is ``V4L2_STD_NTSC_M``.
- .. row 6
@@ -529,8 +529,8 @@ To change the radio frequency the
- 0
- Play mono audio. When the tuner receives a stereo signal this a
- down-mix of the left and right channel. When the tuner receives a
- bilingual or SAP signal this mode selects the primary language.
+ down-mix of the left and right channel. When the tuner receives a
+ bilingual or SAP signal this mode selects the primary language.
- .. row 2
@@ -539,14 +539,14 @@ To change the radio frequency the
- 1
- Play stereo audio. When the tuner receives bilingual audio it may
- play different languages on the left and right channel or the
- primary language is played on both channels.
+ play different languages on the left and right channel or the
+ primary language is played on both channels.
- Playing different languages in this mode is deprecated. New
- drivers should do this only in ``MODE_LANG1_LANG2``.
+ Playing different languages in this mode is deprecated. New
+ drivers should do this only in ``MODE_LANG1_LANG2``.
- When the tuner receives no stereo signal or does not support
- stereo reception the driver shall fall back to ``MODE_MONO``.
+ When the tuner receives no stereo signal or does not support
+ stereo reception the driver shall fall back to ``MODE_MONO``.
- .. row 3
@@ -555,7 +555,7 @@ To change the radio frequency the
- 3
- Play the primary language, mono or stereo. Only
- ``V4L2_TUNER_ANALOG_TV`` tuners support this mode.
+ ``V4L2_TUNER_ANALOG_TV`` tuners support this mode.
- .. row 4
@@ -564,9 +564,9 @@ To change the radio frequency the
- 2
- Play the secondary language, mono. When the tuner receives no
- bilingual audio or SAP, or their reception is not supported the
- driver shall fall back to mono or stereo mode. Only
- ``V4L2_TUNER_ANALOG_TV`` tuners support this mode.
+ bilingual audio or SAP, or their reception is not supported the
+ driver shall fall back to mono or stereo mode. Only
+ ``V4L2_TUNER_ANALOG_TV`` tuners support this mode.
- .. row 5
@@ -575,11 +575,11 @@ To change the radio frequency the
- 2
- Play the Second Audio Program. When the tuner receives no
- bilingual audio or SAP, or their reception is not supported the
- driver shall fall back to mono or stereo mode. Only
- ``V4L2_TUNER_ANALOG_TV`` tuners support this mode. Note the
- ``V4L2_TUNER_MODE_LANG2`` and ``V4L2_TUNER_MODE_SAP`` are
- synonyms.
+ bilingual audio or SAP, or their reception is not supported the
+ driver shall fall back to mono or stereo mode. Only
+ ``V4L2_TUNER_ANALOG_TV`` tuners support this mode. Note the
+ ``V4L2_TUNER_MODE_LANG2`` and ``V4L2_TUNER_MODE_SAP`` are
+ synonyms.
- .. row 6
@@ -588,10 +588,10 @@ To change the radio frequency the
- 4
- Play the primary language on the left channel, the secondary
- language on the right channel. When the tuner receives no
- bilingual audio or SAP, it shall fall back to ``MODE_LANG1`` or
- ``MODE_MONO``. Only ``V4L2_TUNER_ANALOG_TV`` tuners support this
- mode.
+ language on the right channel. When the tuner receives no
+ bilingual audio or SAP, it shall fall back to ``MODE_LANG1`` or
+ ``MODE_MONO``. Only ``V4L2_TUNER_ANALOG_TV`` tuners support this
+ mode.
@@ -604,7 +604,7 @@ To change the radio frequency the
- .. row 1
- -
+ -
- :cspan:`5` Selected ``V4L2_TUNER_MODE_``
- .. row 2
diff --git a/Documentation/linux_tv/media/v4l/vidioc-querycap.rst b/Documentation/linux_tv/media/v4l/vidioc-querycap.rst
index a4091b482d75..0051c483a323 100644
--- a/Documentation/linux_tv/media/v4l/vidioc-querycap.rst
+++ b/Documentation/linux_tv/media/v4l/vidioc-querycap.rst
@@ -54,14 +54,14 @@ specification the ioctl returns an ``EINVAL`` error code.
- ``driver``\ [16]
- Name of the driver, a unique NUL-terminated ASCII string. For
- example: "bttv". 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.
+ example: "bttv". 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.
- Storing strings in fixed sized arrays is bad practice but
- unavoidable here. Drivers and applications should take precautions
- to never read or write beyond the end of the array and to make
- sure the strings are properly NUL-terminated.
+ Storing strings in fixed sized arrays is bad practice but
+ unavoidable here. Drivers and applications should take precautions
+ to never read or write beyond the end of the array and to make
+ sure the strings are properly NUL-terminated.
- .. row 2
@@ -70,13 +70,13 @@ specification the ioctl returns an ``EINVAL`` error code.
- ``card``\ [32]
- Name of the device, a NUL-terminated UTF-8 string. For example:
- "Yoyodyne TV/FM". One driver may support different brands or
- models of video hardware. This information is intended for users,
- for example in a menu of available devices. Since multiple TV
- cards of the same brand may be installed which are supported by
- the same driver, this name should be combined with the character
- device file name (e. g. ``/dev/video2``) or the ``bus_info``
- string to avoid ambiguities.
+ "Yoyodyne TV/FM". One driver may support different brands or
+ models of video hardware. This information is intended for users,
+ for example in a menu of available devices. Since multiple TV
+ cards of the same brand may be installed which are supported by
+ the same driver, this name should be combined with the character
+ device file name (e. g. ``/dev/video2``) or the ``bus_info``
+ string to avoid ambiguities.
- .. row 3
@@ -85,14 +85,14 @@ specification the ioctl returns an ``EINVAL`` error code.
- ``bus_info``\ [32]
- Location of the device in the system, a NUL-terminated ASCII
- string. For example: "PCI:0000:05:06.0". This information is
- intended for users, to distinguish multiple identical devices. If
- no such information is available the field must simply count the
- devices controlled by the driver ("platform:vivi-000"). The
- bus_info must start with "PCI:" for PCI boards, "PCIe:" for PCI
- Express boards, "usb-" for USB devices, "I2C:" for i2c devices,
- "ISA:" for ISA devices, "parport" for parallel port devices and
- "platform:" for platform devices.
+ string. For example: "PCI:0000:05:06.0". This information is
+ intended for users, to distinguish multiple identical devices. If
+ no such information is available the field must simply count the
+ devices controlled by the driver ("platform:vivi-000"). The
+ bus_info must start with "PCI:" for PCI boards, "PCIe:" for PCI
+ Express boards, "usb-" for USB devices, "I2C:" for i2c devices,
+ "ISA:" for ISA devices, "parport" for parallel port devices and
+ "platform:" for platform devices.
- .. row 4
@@ -102,30 +102,30 @@ specification the ioctl returns an ``EINVAL`` error code.
- Version number of the driver.
- Starting with kernel 3.1, the version reported is provided by the
- V4L2 subsystem following the kernel numbering scheme. However, it
- may not always return the same version as the kernel if, for
- example, a stable or distribution-modified kernel uses the V4L2
- stack from a newer kernel.
+ Starting with kernel 3.1, the version reported is provided by the
+ V4L2 subsystem following the kernel numbering scheme. However, it
+ may not always return the same version as the kernel if, for
+ example, a stable or distribution-modified kernel uses the V4L2
+ stack from a newer kernel.
- The version number is formatted using the ``KERNEL_VERSION()``
- macro:
+ The version number is formatted using the ``KERNEL_VERSION()``
+ macro:
- .. row 5
- :cspan:`2`
- .. code-block:: c
+ .. code-block:: c
- #define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))
+ #define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))
- __u32 version = KERNEL_VERSION(0, 8, 1);
+ __u32 version = KERNEL_VERSION(0, 8, 1);
- printf ("Version: %u.%u.%u\\n",
- (version >> 16) & 0xFF,
- (version >> 8) & 0xFF,
- version & 0xFF);
+ printf ("Version: %u.%u.%u\\n",
+ (version >> 16) & 0xFF,
+ (version >> 8) & 0xFF,
+ version & 0xFF);
- .. row 6
@@ -134,15 +134,15 @@ specification the ioctl returns an ``EINVAL`` error code.
- ``capabilities``
- Available capabilities of the physical device as a whole, see
- :ref:`device-capabilities`. The same physical device can export
- multiple devices in /dev (e.g. /dev/videoX, /dev/vbiY and
- /dev/radioZ). The ``capabilities`` field should contain a union of
- all capabilities available around the several V4L2 devices
- exported to userspace. For all those devices the ``capabilities``
- field returns the same set of capabilities. This allows
- applications to open just one of the devices (typically the video
- device) and discover whether video, vbi and/or radio are also
- supported.
+ :ref:`device-capabilities`. The same physical device can export
+ multiple devices in /dev (e.g. /dev/videoX, /dev/vbiY and
+ /dev/radioZ). The ``capabilities`` field should contain a union of
+ all capabilities available around the several V4L2 devices
+ exported to userspace. For all those devices the ``capabilities``
+ field returns the same set of capabilities. This allows
+ applications to open just one of the devices (typically the video
+ device) and discover whether video, vbi and/or radio are also
+ supported.
- .. row 7
@@ -151,14 +151,14 @@ specification the ioctl returns an ``EINVAL`` error code.
- ``device_caps``
- Device capabilities of the opened device, see
- :ref:`device-capabilities`. Should contain the available
- capabilities of that specific device node. So, for example,
- ``device_caps`` of a radio device will only contain radio related
- capabilities and no video or vbi capabilities. This field is only
- set if the ``capabilities`` field contains the
- ``V4L2_CAP_DEVICE_CAPS`` capability. Only the ``capabilities``
- field can have the ``V4L2_CAP_DEVICE_CAPS`` capability,
- ``device_caps`` will never set ``V4L2_CAP_DEVICE_CAPS``.
+ :ref:`device-capabilities`. Should contain the available
+ capabilities of that specific device node. So, for example,
+ ``device_caps`` of a radio device will only contain radio related
+ capabilities and no video or vbi capabilities. This field is only
+ set if the ``capabilities`` field contains the
+ ``V4L2_CAP_DEVICE_CAPS`` capability. Only the ``capabilities``
+ field can have the ``V4L2_CAP_DEVICE_CAPS`` capability,
+ ``device_caps`` will never set ``V4L2_CAP_DEVICE_CAPS``.
- .. row 8
@@ -167,7 +167,7 @@ specification the ioctl returns an ``EINVAL`` error code.
- ``reserved``\ [3]
- Reserved for future extensions. Drivers must set this array to
- zero.
+ zero.
@@ -186,7 +186,7 @@ specification the ioctl returns an ``EINVAL`` error code.
- 0x00000001
- The device supports the single-planar API through the
- :ref:`Video Capture <capture>` interface.
+ :ref:`Video Capture <capture>` interface.
- .. row 2
@@ -195,7 +195,7 @@ specification the ioctl returns an ``EINVAL`` error code.
- 0x00001000
- The device supports the :ref:`multi-planar API <planar-apis>`
- through the :ref:`Video Capture <capture>` interface.
+ through the :ref:`Video Capture <capture>` interface.
- .. row 3
@@ -204,7 +204,7 @@ specification the ioctl returns an ``EINVAL`` error code.
- 0x00000002
- The device supports the single-planar API through the
- :ref:`Video Output <output>` interface.
+ :ref:`Video Output <output>` interface.
- .. row 4
@@ -213,7 +213,7 @@ specification the ioctl returns an ``EINVAL`` error code.
- 0x00002000
- The device supports the :ref:`multi-planar API <planar-apis>`
- through the :ref:`Video Output <output>` interface.
+ through the :ref:`Video Output <output>` interface.
- .. row 5
@@ -222,7 +222,7 @@ specification the ioctl returns an ``EINVAL`` error code.
- 0x00004000
- The device supports the single-planar API through the Video
- Memory-To-Memory interface.
+ Memory-To-Memory interface.
- .. row 6
@@ -231,7 +231,7 @@ specification the ioctl returns an ``EINVAL`` error code.
- 0x00008000
- The device supports the :ref:`multi-planar API <planar-apis>`
- through the Video Memory-To-Memory interface.
+ through the Video Memory-To-Memory interface.
- .. row 7
@@ -240,9 +240,9 @@ specification the ioctl returns an ``EINVAL`` error code.
- 0x00000004
- The device supports the :ref:`Video Overlay <overlay>`
- interface. A video overlay device typically stores captured images
- directly in the video memory of a graphics card, with hardware
- clipping and scaling.
+ interface. A video overlay device typically stores captured images
+ directly in the video memory of a graphics card, with hardware
+ clipping and scaling.
- .. row 8
@@ -251,7 +251,7 @@ specification the ioctl returns an ``EINVAL`` error code.
- 0x00000010
- The device supports the :ref:`Raw VBI Capture <raw-vbi>`
- interface, providing Teletext and Closed Caption data.
+ interface, providing Teletext and Closed Caption data.
- .. row 9
@@ -260,7 +260,7 @@ specification the ioctl returns an ``EINVAL`` error code.
- 0x00000020
- The device supports the :ref:`Raw VBI Output <raw-vbi>`
- interface.
+ interface.
- .. row 10
@@ -269,7 +269,7 @@ specification the ioctl returns an ``EINVAL`` error code.
- 0x00000040
- The device supports the :ref:`Sliced VBI Capture <sliced>`
- interface.
+ interface.
- .. row 11
@@ -278,7 +278,7 @@ specification the ioctl returns an ``EINVAL`` error code.
- 0x00000080
- The device supports the :ref:`Sliced VBI Output <sliced>`
- interface.
+ interface.
- .. row 12
@@ -295,11 +295,11 @@ specification the ioctl returns an ``EINVAL`` error code.
- 0x00000200
- The device supports the :ref:`Video Output Overlay <osd>` (OSD)
- interface. Unlike the *Video Overlay* interface, this is a
- secondary function of video output devices and overlays an image
- onto an outgoing video signal. When the driver sets this flag, it
- must clear the ``V4L2_CAP_VIDEO_OVERLAY`` flag and vice
- versa. [1]_
+ interface. Unlike the *Video Overlay* interface, this is a
+ secondary function of video output devices and overlays an image
+ onto an outgoing video signal. When the driver sets this flag, it
+ must clear the ``V4L2_CAP_VIDEO_OVERLAY`` flag and vice
+ versa. [1]_
- .. row 14
@@ -308,8 +308,8 @@ specification the ioctl returns an ``EINVAL`` error code.
- 0x00000400
- The device supports the
- :ref:`VIDIOC_S_HW_FREQ_SEEK` ioctl
- for hardware frequency seeking.
+ :ref:`VIDIOC_S_HW_FREQ_SEEK` ioctl
+ for hardware frequency seeking.
- .. row 15
@@ -326,8 +326,8 @@ specification the ioctl returns an ``EINVAL`` error code.
- 0x00010000
- The device has some sort of tuner to receive RF-modulated video
- signals. For more information about tuner programming see
- :ref:`tuner`.
+ signals. For more information about tuner programming see
+ :ref:`tuner`.
- .. row 17
@@ -336,9 +336,9 @@ specification the ioctl returns an ``EINVAL`` error code.
- 0x00020000
- The device has audio inputs or outputs. It may or may not support
- audio recording or playback, in PCM or compressed formats. PCM
- audio support must be implemented as ALSA or OSS interface. For
- more information on audio inputs and outputs see :ref:`audio`.
+ audio recording or playback, in PCM or compressed formats. PCM
+ audio support must be implemented as ALSA or OSS interface. For
+ more information on audio inputs and outputs see :ref:`audio`.
- .. row 18
@@ -355,8 +355,8 @@ specification the ioctl returns an ``EINVAL`` error code.
- 0x00080000
- The device has some sort of modulator to emit RF-modulated
- video/audio signals. For more information about modulator
- programming see :ref:`tuner`.
+ video/audio signals. For more information about modulator
+ programming see :ref:`tuner`.
- .. row 20
@@ -373,7 +373,7 @@ specification the ioctl returns an ``EINVAL`` error code.
- 0x00200000
- The device supports the struct
- :ref:`v4l2_pix_format <v4l2-pix-format>` extended fields.
+ :ref:`v4l2_pix_format <v4l2-pix-format>` extended fields.
- .. row 22
@@ -390,7 +390,7 @@ specification the ioctl returns an ``EINVAL`` error code.
- 0x01000000
- The device supports the :ref:`read() <rw>` and/or
- :ref:`write() <rw>` I/O methods.
+ :ref:`write() <rw>` I/O methods.
- .. row 24
@@ -415,8 +415,8 @@ specification the ioctl returns an ``EINVAL`` error code.
- 0x80000000
- The driver fills the ``device_caps`` field. This capability can
- only appear in the ``capabilities`` field and never in the
- ``device_caps`` field.
+ only appear in the ``capabilities`` field and never in the
+ ``device_caps`` field.
diff --git a/Documentation/linux_tv/media/v4l/vidioc-queryctrl.rst b/Documentation/linux_tv/media/v4l/vidioc-queryctrl.rst
index 7869ca7a04c3..93e524c7e38d 100644
--- a/Documentation/linux_tv/media/v4l/vidioc-queryctrl.rst
+++ b/Documentation/linux_tv/media/v4l/vidioc-queryctrl.rst
@@ -105,10 +105,10 @@ See also the examples in :ref:`control`.
- ``id``
- Identifies the control, set by the application. See
- :ref:`control-id` for predefined IDs. When the ID is ORed with
- V4L2_CTRL_FLAG_NEXT_CTRL the driver clears the flag and
- returns the first control with a higher ID. Drivers which do not
- support this flag yet always return an ``EINVAL`` error code.
+ :ref:`control-id` for predefined IDs. When the ID is ORed with
+ V4L2_CTRL_FLAG_NEXT_CTRL the driver clears the flag and
+ returns the first control with a higher ID. Drivers which do not
+ support this flag yet always return an ``EINVAL`` error code.
- .. row 2
@@ -125,7 +125,7 @@ See also the examples in :ref:`control`.
- ``name``\ [32]
- Name of the control, a NUL-terminated ASCII string. This
- information is intended for the user.
+ information is intended for the user.
- .. row 4
@@ -134,9 +134,9 @@ See also the examples in :ref:`control`.
- ``minimum``
- Minimum value, inclusive. This field gives a lower bound for the
- control. See enum :ref:`v4l2_ctrl_type <v4l2-ctrl-type>` how
- the minimum value is to be used for each possible control type.
- Note that this a signed 32-bit value.
+ control. See enum :ref:`v4l2_ctrl_type <v4l2-ctrl-type>` how
+ the minimum value is to be used for each possible control type.
+ Note that this a signed 32-bit value.
- .. row 5
@@ -145,9 +145,9 @@ See also the examples in :ref:`control`.
- ``maximum``
- Maximum value, inclusive. This field gives an upper bound for the
- control. See enum :ref:`v4l2_ctrl_type <v4l2-ctrl-type>` how
- the maximum value is to be used for each possible control type.
- Note that this a signed 32-bit value.
+ control. See enum :ref:`v4l2_ctrl_type <v4l2-ctrl-type>` how
+ the maximum value is to be used for each possible control type.
+ Note that this a signed 32-bit value.
- .. row 6
@@ -156,25 +156,25 @@ See also the examples in :ref:`control`.
- ``step``
- This field gives a step size for the control. See enum
- :ref:`v4l2_ctrl_type <v4l2-ctrl-type>` how the step value is
- to be used for each possible control type. Note that this an
- unsigned 32-bit value.
-
- Generally drivers should not scale hardware control values. It may
- be necessary for example when the ``name`` or ``id`` imply a
- particular unit and the hardware actually accepts only multiples
- of said unit. If so, drivers must take care values are properly
- rounded when scaling, such that errors will not accumulate on
- repeated read-write cycles.
-
- This field gives the smallest change of an integer control
- actually affecting hardware. Often the information is needed when
- the user can change controls by keyboard or GUI buttons, rather
- than a slider. When for example a hardware register accepts values
- 0-511 and the driver reports 0-65535, step should be 128.
-
- Note that although signed, the step value is supposed to be always
- positive.
+ :ref:`v4l2_ctrl_type <v4l2-ctrl-type>` how the step value is
+ to be used for each possible control type. Note that this an
+ unsigned 32-bit value.
+
+ Generally drivers should not scale hardware control values. It may
+ be necessary for example when the ``name`` or ``id`` imply a
+ particular unit and the hardware actually accepts only multiples
+ of said unit. If so, drivers must take care values are properly
+ rounded when scaling, such that errors will not accumulate on
+ repeated read-write cycles.
+
+ This field gives the smallest change of an integer control
+ actually affecting hardware. Often the information is needed when
+ the user can change controls by keyboard or GUI buttons, rather
+ than a slider. When for example a hardware register accepts values
+ 0-511 and the driver reports 0-65535, step should be 128.
+
+ Note that although signed, the step value is supposed to be always
+ positive.
- .. row 7
@@ -183,10 +183,10 @@ See also the examples in :ref:`control`.
- ``default_value``
- The default value of a ``V4L2_CTRL_TYPE_INTEGER``, ``_BOOLEAN``,
- ``_BITMASK``, ``_MENU`` or ``_INTEGER_MENU`` control. Not valid
- for other types of controls. Note that drivers reset controls to
- their default value only when the driver is first loaded, never
- afterwards.
+ ``_BITMASK``, ``_MENU`` or ``_INTEGER_MENU`` control. Not valid
+ for other types of controls. Note that drivers reset controls to
+ their default value only when the driver is first loaded, never
+ afterwards.
- .. row 8
@@ -203,7 +203,7 @@ See also the examples in :ref:`control`.
- ``reserved``\ [2]
- Reserved for future extensions. Drivers must set the array to
- zero.
+ zero.
@@ -222,13 +222,13 @@ See also the examples in :ref:`control`.
- ``id``
- Identifies the control, set by the application. See
- :ref:`control-id` for predefined IDs. When the ID is ORed with
- ``V4L2_CTRL_FLAG_NEXT_CTRL`` the driver clears the flag and
- returns the first non-compound control with a higher ID. When the
- ID is ORed with ``V4L2_CTRL_FLAG_NEXT_COMPOUND`` the driver clears
- the flag and returns the first compound control with a higher ID.
- Set both to get the first control (compound or not) with a higher
- ID.
+ :ref:`control-id` for predefined IDs. When the ID is ORed with
+ ``V4L2_CTRL_FLAG_NEXT_CTRL`` the driver clears the flag and
+ returns the first non-compound control with a higher ID. When the
+ ID is ORed with ``V4L2_CTRL_FLAG_NEXT_COMPOUND`` the driver clears
+ the flag and returns the first compound control with a higher ID.
+ Set both to get the first control (compound or not) with a higher
+ ID.
- .. row 2
@@ -245,7 +245,7 @@ See also the examples in :ref:`control`.
- ``name``\ [32]
- Name of the control, a NUL-terminated ASCII string. This
- information is intended for the user.
+ information is intended for the user.
- .. row 4
@@ -254,9 +254,9 @@ See also the examples in :ref:`control`.
- ``minimum``
- Minimum value, inclusive. This field gives a lower bound for the
- control. See enum :ref:`v4l2_ctrl_type <v4l2-ctrl-type>` how
- the minimum value is to be used for each possible control type.
- Note that this a signed 64-bit value.
+ control. See enum :ref:`v4l2_ctrl_type <v4l2-ctrl-type>` how
+ the minimum value is to be used for each possible control type.
+ Note that this a signed 64-bit value.
- .. row 5
@@ -265,9 +265,9 @@ See also the examples in :ref:`control`.
- ``maximum``
- Maximum value, inclusive. This field gives an upper bound for the
- control. See enum :ref:`v4l2_ctrl_type <v4l2-ctrl-type>` how
- the maximum value is to be used for each possible control type.
- Note that this a signed 64-bit value.
+ control. See enum :ref:`v4l2_ctrl_type <v4l2-ctrl-type>` how
+ the maximum value is to be used for each possible control type.
+ Note that this a signed 64-bit value.
- .. row 6
@@ -276,22 +276,22 @@ See also the examples in :ref:`control`.
- ``step``
- This field gives a step size for the control. See enum
- :ref:`v4l2_ctrl_type <v4l2-ctrl-type>` how the step value is
- to be used for each possible control type. Note that this an
- unsigned 64-bit value.
-
- Generally drivers should not scale hardware control values. It may
- be necessary for example when the ``name`` or ``id`` imply a
- particular unit and the hardware actually accepts only multiples
- of said unit. If so, drivers must take care values are properly
- rounded when scaling, such that errors will not accumulate on
- repeated read-write cycles.
-
- This field gives the smallest change of an integer control
- actually affecting hardware. Often the information is needed when
- the user can change controls by keyboard or GUI buttons, rather
- than a slider. When for example a hardware register accepts values
- 0-511 and the driver reports 0-65535, step should be 128.
+ :ref:`v4l2_ctrl_type <v4l2-ctrl-type>` how the step value is
+ to be used for each possible control type. Note that this an
+ unsigned 64-bit value.
+
+ Generally drivers should not scale hardware control values. It may
+ be necessary for example when the ``name`` or ``id`` imply a
+ particular unit and the hardware actually accepts only multiples
+ of said unit. If so, drivers must take care values are properly
+ rounded when scaling, such that errors will not accumulate on
+ repeated read-write cycles.
+
+ This field gives the smallest change of an integer control
+ actually affecting hardware. Often the information is needed when
+ the user can change controls by keyboard or GUI buttons, rather
+ than a slider. When for example a hardware register accepts values
+ 0-511 and the driver reports 0-65535, step should be 128.
- .. row 7
@@ -300,10 +300,10 @@ See also the examples in :ref:`control`.
- ``default_value``
- The default value of a ``V4L2_CTRL_TYPE_INTEGER``, ``_INTEGER64``,
- ``_BOOLEAN``, ``_BITMASK``, ``_MENU``, ``_INTEGER_MENU``, ``_U8``
- or ``_U16`` control. Not valid for other types of controls. Note
- that drivers reset controls to their default value only when the
- driver is first loaded, never afterwards.
+ ``_BOOLEAN``, ``_BITMASK``, ``_MENU``, ``_INTEGER_MENU``, ``_U8``
+ or ``_U16`` control. Not valid for other types of controls. Note
+ that drivers reset controls to their default value only when the
+ driver is first loaded, never afterwards.
- .. row 8
@@ -320,12 +320,12 @@ See also the examples in :ref:`control`.
- ``elem_size``
- The size in bytes of a single element of the array. Given a char
- pointer ``p`` to a 3-dimensional array you can find the position
- of cell ``(z, y, x)`` as follows:
- ``p + ((z * dims[1] + y) * dims[0] + x) * elem_size``.
- ``elem_size`` is always valid, also when the control isn't an
- array. For string controls ``elem_size`` is equal to
- ``maximum + 1``.
+ pointer ``p`` to a 3-dimensional array you can find the position
+ of cell ``(z, y, x)`` as follows:
+ ``p + ((z * dims[1] + y) * dims[0] + x) * elem_size``.
+ ``elem_size`` is always valid, also when the control isn't an
+ array. For string controls ``elem_size`` is equal to
+ ``maximum + 1``.
- .. row 10
@@ -334,8 +334,8 @@ See also the examples in :ref:`control`.
- ``elems``
- The number of elements in the N-dimensional array. If this control
- is not an array, then ``elems`` is 1. The ``elems`` field can
- never be 0.
+ is not an array, then ``elems`` is 1. The ``elems`` field can
+ never be 0.
- .. row 11
@@ -344,7 +344,7 @@ See also the examples in :ref:`control`.
- ``nr_of_dims``
- The number of dimension in the N-dimensional array. If this
- control is not an array, then this field is 0.
+ control is not an array, then this field is 0.
- .. row 12
@@ -353,7 +353,7 @@ See also the examples in :ref:`control`.
- ``dims[V4L2_CTRL_MAX_DIMS]``
- The size of each dimension. The first ``nr_of_dims`` elements of
- this array must be non-zero, all remaining elements must be zero.
+ this array must be non-zero, all remaining elements must be zero.
- .. row 13
@@ -362,7 +362,7 @@ See also the examples in :ref:`control`.
- ``reserved``\ [32]
- Reserved for future extensions. Applications and drivers must set
- the array to zero.
+ the array to zero.
@@ -378,17 +378,17 @@ See also the examples in :ref:`control`.
- __u32
- -
+ -
- ``id``
- Identifies the control, set by the application from the respective
- struct :ref:`v4l2_queryctrl <v4l2-queryctrl>` ``id``.
+ struct :ref:`v4l2_queryctrl <v4l2-queryctrl>` ``id``.
- .. row 2
- __u32
- -
+ -
- ``index``
- Index of the menu item, starting at zero, set by the application.
@@ -397,40 +397,40 @@ See also the examples in :ref:`control`.
- union
- -
- -
- -
+ -
+ -
+ -
- .. row 4
- -
+ -
- __u8
- ``name``\ [32]
- Name of the menu item, a NUL-terminated ASCII string. This
- information is intended for the user. This field is valid for
- ``V4L2_CTRL_FLAG_MENU`` type controls.
+ information is intended for the user. This field is valid for
+ ``V4L2_CTRL_FLAG_MENU`` type controls.
- .. row 5
- -
+ -
- __s64
- ``value``
- Value of the integer menu item. This field is valid for
- ``V4L2_CTRL_FLAG_INTEGER_MENU`` type controls.
+ ``V4L2_CTRL_FLAG_INTEGER_MENU`` type controls.
- .. row 6
- __u32
- -
+ -
- ``reserved``
- Reserved for future extensions. Drivers must set the array to
- zero.
+ zero.
@@ -465,7 +465,7 @@ See also the examples in :ref:`control`.
- any
- An integer-valued control ranging from minimum to maximum
- inclusive. The step value indicates the increment between values.
+ inclusive. The step value indicates the increment between values.
- .. row 3
@@ -478,7 +478,7 @@ See also the examples in :ref:`control`.
- 1
- A boolean-valued control. Zero corresponds to "disabled", and one
- means "enabled".
+ means "enabled".
- .. row 4
@@ -491,7 +491,7 @@ See also the examples in :ref:`control`.
- N-1
- The control has a menu of N choices. The names of the menu items
- can be enumerated with the ``VIDIOC_QUERYMENU`` ioctl.
+ can be enumerated with the ``VIDIOC_QUERYMENU`` ioctl.
- .. row 5
@@ -504,9 +504,9 @@ See also the examples in :ref:`control`.
- N-1
- The control has a menu of N choices. The values of the menu items
- can be enumerated with the ``VIDIOC_QUERYMENU`` ioctl. This is
- similar to ``V4L2_CTRL_TYPE_MENU`` except that instead of strings,
- the menu items are signed 64-bit integers.
+ can be enumerated with the ``VIDIOC_QUERYMENU`` ioctl. This is
+ similar to ``V4L2_CTRL_TYPE_MENU`` except that instead of strings,
+ the menu items are signed 64-bit integers.
- .. row 6
@@ -519,8 +519,8 @@ See also the examples in :ref:`control`.
- any
- A bitmask field. The maximum value is the set of bits that can be
- used, all other bits are to be 0. The maximum value is interpreted
- as a __u32, allowing the use of bit 31 in the bitmask.
+ used, all other bits are to be 0. The maximum value is interpreted
+ as a __u32, allowing the use of bit 31 in the bitmask.
- .. row 7
@@ -533,8 +533,8 @@ See also the examples in :ref:`control`.
- 0
- A control which performs an action when set. Drivers must ignore
- the value passed with ``VIDIOC_S_CTRL`` and return an ``EINVAL`` error
- code on a ``VIDIOC_G_CTRL`` attempt.
+ the value passed with ``VIDIOC_S_CTRL`` and return an ``EINVAL`` error
+ code on a ``VIDIOC_G_CTRL`` attempt.
- .. row 8
@@ -547,10 +547,10 @@ See also the examples in :ref:`control`.
- any
- A 64-bit integer valued control. Minimum, maximum and step size
- cannot be queried using ``VIDIOC_QUERYCTRL``. Only
- ``VIDIOC_QUERY_EXT_CTRL`` can retrieve the 64-bit min/max/step
- values, they should be interpreted as n/a when using
- ``VIDIOC_QUERYCTRL``.
+ cannot be queried using ``VIDIOC_QUERYCTRL``. Only
+ ``VIDIOC_QUERY_EXT_CTRL`` can retrieve the 64-bit min/max/step
+ values, they should be interpreted as n/a when using
+ ``VIDIOC_QUERYCTRL``.
- .. row 9
@@ -563,16 +563,16 @@ See also the examples in :ref:`control`.
- ≥ 0
- The minimum and maximum string lengths. The step size means that
- the string must be (minimum + N * step) characters long for N ≥ 0.
- These lengths do not include the terminating zero, so in order to
- pass a string of length 8 to
- :ref:`VIDIOC_S_EXT_CTRLS <VIDIOC_G_EXT_CTRLS>` you need to
- set the ``size`` field of struct
- :ref:`v4l2_ext_control <v4l2-ext-control>` to 9. For
- :ref:`VIDIOC_G_EXT_CTRLS <VIDIOC_G_EXT_CTRLS>` you can set
- the ``size`` field to ``maximum`` + 1. Which character encoding is
- used will depend on the string control itself and should be part
- of the control documentation.
+ the string must be (minimum + N * step) characters long for N ≥ 0.
+ These lengths do not include the terminating zero, so in order to
+ pass a string of length 8 to
+ :ref:`VIDIOC_S_EXT_CTRLS <VIDIOC_G_EXT_CTRLS>` you need to
+ set the ``size`` field of struct
+ :ref:`v4l2_ext_control <v4l2-ext-control>` to 9. For
+ :ref:`VIDIOC_G_EXT_CTRLS <VIDIOC_G_EXT_CTRLS>` you can set
+ the ``size`` field to ``maximum`` + 1. Which character encoding is
+ used will depend on the string control itself and should be part
+ of the control documentation.
- .. row 10
@@ -585,10 +585,10 @@ See also the examples in :ref:`control`.
- n/a
- This is not a control. When ``VIDIOC_QUERYCTRL`` is called with a
- control ID equal to a control class code (see :ref:`ctrl-class`)
- + 1, the ioctl returns the name of the control class and this
- control type. Older drivers which do not support this feature
- return an ``EINVAL`` error code.
+ control ID equal to a control class code (see :ref:`ctrl-class`)
+ + 1, the ioctl returns the name of the control class and this
+ control type. Older drivers which do not support this feature
+ return an ``EINVAL`` error code.
- .. row 11
@@ -601,7 +601,7 @@ See also the examples in :ref:`control`.
- any
- An unsigned 8-bit valued control ranging from minimum to maximum
- inclusive. The step value indicates the increment between values.
+ inclusive. The step value indicates the increment between values.
- .. row 12
@@ -614,7 +614,7 @@ See also the examples in :ref:`control`.
- any
- An unsigned 16-bit valued control ranging from minimum to maximum
- inclusive. The step value indicates the increment between values.
+ inclusive. The step value indicates the increment between values.
- .. row 13
@@ -627,7 +627,7 @@ 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.
+ inclusive. The step value indicates the increment between values.
@@ -646,8 +646,8 @@ See also the examples in :ref:`control`.
- 0x0001
- This control is permanently disabled and should be ignored by the
- application. Any attempt to change the control will result in an
- ``EINVAL`` error code.
+ application. Any attempt to change the control will result in an
+ ``EINVAL`` error code.
- .. row 2
@@ -656,9 +656,9 @@ See also the examples in :ref:`control`.
- 0x0002
- This control is temporarily unchangeable, for example because
- another application took over control of the respective resource.
- Such controls may be displayed specially in a user interface.
- Attempts to change the control may result in an ``EBUSY`` error code.
+ another application took over control of the respective resource.
+ Such controls may be displayed specially in a user interface.
+ Attempts to change the control may result in an ``EBUSY`` error code.
- .. row 3
@@ -667,7 +667,7 @@ See also the examples in :ref:`control`.
- 0x0004
- This control is permanently readable only. Any attempt to change
- the control will result in an ``EINVAL`` error code.
+ the control will result in an ``EINVAL`` error code.
- .. row 4
@@ -676,8 +676,8 @@ See also the examples in :ref:`control`.
- 0x0008
- A hint that changing this control may affect the value of other
- controls within the same control class. Applications should update
- their user interface accordingly.
+ controls within the same control class. Applications should update
+ their user interface accordingly.
- .. row 5
@@ -686,9 +686,9 @@ See also the examples in :ref:`control`.
- 0x0010
- This control is not applicable to the current configuration and
- should be displayed accordingly in a user interface. For example
- the flag may be set on a MPEG audio level 2 bitrate control when
- MPEG audio encoding level 1 was selected with another control.
+ should be displayed accordingly in a user interface. For example
+ the flag may be set on a MPEG audio level 2 bitrate control when
+ MPEG audio encoding level 1 was selected with another control.
- .. row 6
@@ -697,7 +697,7 @@ See also the examples in :ref:`control`.
- 0x0020
- A hint that this control is best represented as a slider-like
- element in a user interface.
+ element in a user interface.
- .. row 7
@@ -706,11 +706,11 @@ See also the examples in :ref:`control`.
- 0x0040
- This control is permanently writable only. Any attempt to read the
- control will result in an ``EACCES`` error code error code. This flag
- is typically present for relative controls or action controls
- where writing a value will cause the device to carry out a given
- action (e. g. motor control) but no meaningful value can be
- returned.
+ control will result in an ``EACCES`` error code error code. This flag
+ is typically present for relative controls or action controls
+ where writing a value will cause the device to carry out a given
+ action (e. g. motor control) but no meaningful value can be
+ returned.
- .. row 8
@@ -719,14 +719,14 @@ See also the examples in :ref:`control`.
- 0x0080
- This control is volatile, which means that the value of the
- control changes continuously. A typical example would be the
- current gain value if the device is in auto-gain mode. In such a
- case the hardware calculates the gain value based on the lighting
- conditions which can change over time. Note that setting a new
- value for a volatile control will have no effect and no
- ``V4L2_EVENT_CTRL_CH_VALUE`` will be sent, unless the
- ``V4L2_CTRL_FLAG_EXECUTE_ON_WRITE`` flag (see below) is also set.
- Otherwise the new value will just be ignored.
+ control changes continuously. A typical example would be the
+ current gain value if the device is in auto-gain mode. In such a
+ case the hardware calculates the gain value based on the lighting
+ conditions which can change over time. Note that setting a new
+ value for a volatile control will have no effect and no
+ ``V4L2_EVENT_CTRL_CH_VALUE`` will be sent, unless the
+ ``V4L2_CTRL_FLAG_EXECUTE_ON_WRITE`` flag (see below) is also set.
+ Otherwise the new value will just be ignored.
- .. row 9
@@ -735,11 +735,11 @@ See also the examples in :ref:`control`.
- 0x0100
- This control has a pointer type, so its value has to be accessed
- using one of the pointer fields of struct
- :ref:`v4l2_ext_control <v4l2-ext-control>`. This flag is set
- for controls that are an array, string, or have a compound type.
- In all cases you have to set a pointer to memory containing the
- payload of the control.
+ using one of the pointer fields of struct
+ :ref:`v4l2_ext_control <v4l2-ext-control>`. This flag is set
+ for controls that are an array, string, or have a compound type.
+ In all cases you have to set a pointer to memory containing the
+ payload of the control.
- .. row 10
@@ -748,10 +748,10 @@ See also the examples in :ref:`control`.
- 0x0200
- The value provided to the control will be propagated to the driver
- even if it remains constant. This is required when the control
- represents an action on the hardware. For example: clearing an
- error flag or triggering the flash. All the controls of the type
- ``V4L2_CTRL_TYPE_BUTTON`` have this flag set.
+ even if it remains constant. This is required when the control
+ represents an action on the hardware. For example: clearing an
+ error flag or triggering the flash. All the controls of the type
+ ``V4L2_CTRL_TYPE_BUTTON`` have this flag set.
diff --git a/Documentation/linux_tv/media/v4l/vidioc-reqbufs.rst b/Documentation/linux_tv/media/v4l/vidioc-reqbufs.rst
index b5a470935ce6..6803f21c8f4f 100644
--- a/Documentation/linux_tv/media/v4l/vidioc-reqbufs.rst
+++ b/Documentation/linux_tv/media/v4l/vidioc-reqbufs.rst
@@ -88,8 +88,8 @@ any DMA in progress, an implicit
- ``type``
- Type of the stream or buffers, this is the same as the struct
- :ref:`v4l2_format <v4l2-format>` ``type`` field. See
- :ref:`v4l2-buf-type` for valid values.
+ :ref:`v4l2_format <v4l2-format>` ``type`` field. See
+ :ref:`v4l2-buf-type` for valid values.
- .. row 3
@@ -98,8 +98,8 @@ any DMA in progress, an implicit
- ``memory``
- Applications set this field to ``V4L2_MEMORY_MMAP``,
- ``V4L2_MEMORY_DMABUF`` or ``V4L2_MEMORY_USERPTR``. See
- :ref:`v4l2-memory`.
+ ``V4L2_MEMORY_DMABUF`` or ``V4L2_MEMORY_USERPTR``. See
+ :ref:`v4l2-memory`.
- .. row 4
@@ -108,7 +108,7 @@ any DMA in progress, an implicit
- ``reserved``\ [2]
- A place holder for future extensions. Drivers and applications
- must set the array to zero.
+ must set the array to zero.
diff --git a/Documentation/linux_tv/media/v4l/vidioc-s-hw-freq-seek.rst b/Documentation/linux_tv/media/v4l/vidioc-s-hw-freq-seek.rst
index 4789c5b74a0a..efa5e930b3bb 100644
--- a/Documentation/linux_tv/media/v4l/vidioc-s-hw-freq-seek.rst
+++ b/Documentation/linux_tv/media/v4l/vidioc-s-hw-freq-seek.rst
@@ -74,8 +74,8 @@ error code is returned and no seek takes place.
- ``tuner``
- The tuner index number. This is the same value as in the struct
- :ref:`v4l2_input <v4l2-input>` ``tuner`` field and the struct
- :ref:`v4l2_tuner <v4l2-tuner>` ``index`` field.
+ :ref:`v4l2_input <v4l2-input>` ``tuner`` field and the struct
+ :ref:`v4l2_tuner <v4l2-tuner>` ``index`` field.
- .. row 2
@@ -84,8 +84,8 @@ error code is returned and no seek takes place.
- ``type``
- The tuner type. This is the same value as in the struct
- :ref:`v4l2_tuner <v4l2-tuner>` ``type`` field. See
- :ref:`v4l2-tuner-type`
+ :ref:`v4l2_tuner <v4l2-tuner>` ``type`` field. See
+ :ref:`v4l2-tuner-type`
- .. row 3
@@ -94,7 +94,7 @@ error code is returned and no seek takes place.
- ``seek_upward``
- If non-zero, seek upward from the current frequency, else seek
- downward.
+ downward.
- .. row 4
@@ -103,8 +103,8 @@ error code is returned and no seek takes place.
- ``wrap_around``
- If non-zero, wrap around when at the end of the frequency range,
- else stop seeking. The struct :ref:`v4l2_tuner <v4l2-tuner>`
- ``capability`` field will tell you what the hardware supports.
+ else stop seeking. The struct :ref:`v4l2_tuner <v4l2-tuner>`
+ ``capability`` field will tell you what the hardware supports.
- .. row 5
@@ -113,8 +113,8 @@ error code is returned and no seek takes place.
- ``spacing``
- If non-zero, defines the hardware seek resolution in Hz. The
- driver selects the nearest value that is supported by the device.
- If spacing is zero a reasonable default value is used.
+ driver selects the nearest value that is supported by the device.
+ If spacing is zero a reasonable default value is used.
- .. row 6
@@ -123,12 +123,12 @@ error code is returned and no seek takes place.
- ``rangelow``
- If non-zero, the lowest tunable frequency of the band to search in
- units of 62.5 kHz, or if the struct
- :ref:`v4l2_tuner <v4l2-tuner>` ``capability`` field has the
- ``V4L2_TUNER_CAP_LOW`` flag set, in units of 62.5 Hz or if the
- struct :ref:`v4l2_tuner <v4l2-tuner>` ``capability`` field has
- the ``V4L2_TUNER_CAP_1HZ`` flag set, in units of 1 Hz. If
- ``rangelow`` is zero a reasonable default value is used.
+ units of 62.5 kHz, or if the struct
+ :ref:`v4l2_tuner <v4l2-tuner>` ``capability`` field has the
+ ``V4L2_TUNER_CAP_LOW`` flag set, in units of 62.5 Hz or if the
+ struct :ref:`v4l2_tuner <v4l2-tuner>` ``capability`` field has
+ the ``V4L2_TUNER_CAP_1HZ`` flag set, in units of 1 Hz. If
+ ``rangelow`` is zero a reasonable default value is used.
- .. row 7
@@ -137,12 +137,12 @@ error code is returned and no seek takes place.
- ``rangehigh``
- If non-zero, the highest tunable frequency of the band to search
- in units of 62.5 kHz, or if the struct
- :ref:`v4l2_tuner <v4l2-tuner>` ``capability`` field has the
- ``V4L2_TUNER_CAP_LOW`` flag set, in units of 62.5 Hz or if the
- struct :ref:`v4l2_tuner <v4l2-tuner>` ``capability`` field has
- the ``V4L2_TUNER_CAP_1HZ`` flag set, in units of 1 Hz. If
- ``rangehigh`` is zero a reasonable default value is used.
+ in units of 62.5 kHz, or if the struct
+ :ref:`v4l2_tuner <v4l2-tuner>` ``capability`` field has the
+ ``V4L2_TUNER_CAP_LOW`` flag set, in units of 62.5 Hz or if the
+ struct :ref:`v4l2_tuner <v4l2-tuner>` ``capability`` field has
+ the ``V4L2_TUNER_CAP_1HZ`` flag set, in units of 1 Hz. If
+ ``rangehigh`` is zero a reasonable default value is used.
- .. row 8
@@ -151,7 +151,7 @@ error code is returned and no seek takes place.
- ``reserved``\ [5]
- Reserved for future extensions. Applications must set the array to
- zero.
+ zero.
diff --git a/Documentation/linux_tv/media/v4l/vidioc-subdev-enum-frame-interval.rst b/Documentation/linux_tv/media/v4l/vidioc-subdev-enum-frame-interval.rst
index d332897b30e8..d22926a6257b 100644
--- a/Documentation/linux_tv/media/v4l/vidioc-subdev-enum-frame-interval.rst
+++ b/Documentation/linux_tv/media/v4l/vidioc-subdev-enum-frame-interval.rst
@@ -91,7 +91,7 @@ multiple pads of the same sub-device is not defined.
- ``code``
- The media bus format code, as defined in
- :ref:`v4l2-mbus-format`.
+ :ref:`v4l2-mbus-format`.
- .. row 4
@@ -124,7 +124,7 @@ multiple pads of the same sub-device is not defined.
- ``which``
- Frame intervals to be enumerated, from enum
- :ref:`v4l2_subdev_format_whence <v4l2-subdev-format-whence>`.
+ :ref:`v4l2_subdev_format_whence <v4l2-subdev-format-whence>`.
- .. row 8
@@ -133,7 +133,7 @@ multiple pads of the same sub-device is not defined.
- ``reserved``\ [8]
- Reserved for future extensions. Applications and drivers must set
- the array to zero.
+ the array to zero.
diff --git a/Documentation/linux_tv/media/v4l/vidioc-subdev-enum-frame-size.rst b/Documentation/linux_tv/media/v4l/vidioc-subdev-enum-frame-size.rst
index 0f901d815ca5..91738510b122 100644
--- a/Documentation/linux_tv/media/v4l/vidioc-subdev-enum-frame-size.rst
+++ b/Documentation/linux_tv/media/v4l/vidioc-subdev-enum-frame-size.rst
@@ -93,7 +93,7 @@ information about try formats.
- ``code``
- The media bus format code, as defined in
- :ref:`v4l2-mbus-format`.
+ :ref:`v4l2-mbus-format`.
- .. row 4
@@ -134,7 +134,7 @@ information about try formats.
- ``which``
- Frame sizes to be enumerated, from enum
- :ref:`v4l2_subdev_format_whence <v4l2-subdev-format-whence>`.
+ :ref:`v4l2_subdev_format_whence <v4l2-subdev-format-whence>`.
- .. row 9
@@ -143,7 +143,7 @@ information about try formats.
- ``reserved``\ [8]
- Reserved for future extensions. Applications and drivers must set
- the array to zero.
+ the array to zero.
diff --git a/Documentation/linux_tv/media/v4l/vidioc-subdev-enum-mbus-code.rst b/Documentation/linux_tv/media/v4l/vidioc-subdev-enum-mbus-code.rst
index bc8e07912d81..da0d0407346c 100644
--- a/Documentation/linux_tv/media/v4l/vidioc-subdev-enum-mbus-code.rst
+++ b/Documentation/linux_tv/media/v4l/vidioc-subdev-enum-mbus-code.rst
@@ -78,7 +78,7 @@ information about the try formats.
- ``code``
- The media bus format code, as defined in
- :ref:`v4l2-mbus-format`.
+ :ref:`v4l2-mbus-format`.
- .. row 4
@@ -87,7 +87,7 @@ information about the try formats.
- ``which``
- Media bus format codes to be enumerated, from enum
- :ref:`v4l2_subdev_format_whence <v4l2-subdev-format-whence>`.
+ :ref:`v4l2_subdev_format_whence <v4l2-subdev-format-whence>`.
- .. row 5
@@ -96,7 +96,7 @@ information about the try formats.
- ``reserved``\ [8]
- Reserved for future extensions. Applications and drivers must set
- the array to zero.
+ the array to zero.
diff --git a/Documentation/linux_tv/media/v4l/vidioc-subdev-g-crop.rst b/Documentation/linux_tv/media/v4l/vidioc-subdev-g-crop.rst
index a4cc5f8ebf5b..eb13718a4654 100644
--- a/Documentation/linux_tv/media/v4l/vidioc-subdev-g-crop.rst
+++ b/Documentation/linux_tv/media/v4l/vidioc-subdev-g-crop.rst
@@ -94,7 +94,7 @@ modified format should be as close as possible to the original request.
- ``which``
- Crop rectangle to get or set, from enum
- :ref:`v4l2_subdev_format_whence <v4l2-subdev-format-whence>`.
+ :ref:`v4l2_subdev_format_whence <v4l2-subdev-format-whence>`.
- .. row 3
@@ -111,7 +111,7 @@ modified format should be as close as possible to the original request.
- ``reserved``\ [8]
- Reserved for future extensions. Applications and drivers must set
- the array to zero.
+ the array to zero.
diff --git a/Documentation/linux_tv/media/v4l/vidioc-subdev-g-fmt.rst b/Documentation/linux_tv/media/v4l/vidioc-subdev-g-fmt.rst
index 6afa4fccb9ba..9de901ad7cdd 100644
--- a/Documentation/linux_tv/media/v4l/vidioc-subdev-g-fmt.rst
+++ b/Documentation/linux_tv/media/v4l/vidioc-subdev-g-fmt.rst
@@ -97,7 +97,7 @@ should be as close as possible to the original request.
- ``which``
- Format to modified, from enum
- :ref:`v4l2_subdev_format_whence <v4l2-subdev-format-whence>`.
+ :ref:`v4l2_subdev_format_whence <v4l2-subdev-format-whence>`.
- .. row 3
@@ -106,7 +106,7 @@ should be as close as possible to the original request.
- ``format``
- Definition of an image format, see :ref:`v4l2-mbus-framefmt` for
- details.
+ details.
- .. row 4
@@ -115,7 +115,7 @@ should be as close as possible to the original request.
- ``reserved``\ [8]
- Reserved for future extensions. Applications and drivers must set
- the array to zero.
+ the array to zero.
diff --git a/Documentation/linux_tv/media/v4l/vidioc-subdev-g-frame-interval.rst b/Documentation/linux_tv/media/v4l/vidioc-subdev-g-frame-interval.rst
index 3c45d4b28f43..947fbf0f9a23 100644
--- a/Documentation/linux_tv/media/v4l/vidioc-subdev-g-frame-interval.rst
+++ b/Documentation/linux_tv/media/v4l/vidioc-subdev-g-frame-interval.rst
@@ -97,7 +97,7 @@ the same sub-device is not defined.
- ``reserved``\ [9]
- Reserved for future extensions. Applications and drivers must set
- the array to zero.
+ the array to zero.
diff --git a/Documentation/linux_tv/media/v4l/vidioc-subdev-g-selection.rst b/Documentation/linux_tv/media/v4l/vidioc-subdev-g-selection.rst
index 738131619a4d..fa6dcccd0a2b 100644
--- a/Documentation/linux_tv/media/v4l/vidioc-subdev-g-selection.rst
+++ b/Documentation/linux_tv/media/v4l/vidioc-subdev-g-selection.rst
@@ -78,7 +78,7 @@ Selection targets and flags are documented in
- ``which``
- Active or try selection, from enum
- :ref:`v4l2_subdev_format_whence <v4l2-subdev-format-whence>`.
+ :ref:`v4l2_subdev_format_whence <v4l2-subdev-format-whence>`.
- .. row 2
@@ -119,7 +119,7 @@ Selection targets and flags are documented in
- ``reserved``\ [8]
- Reserved for future extensions. Applications and drivers must set
- the array to zero.
+ the array to zero.
diff --git a/Documentation/linux_tv/media/v4l/vidioc-subscribe-event.rst b/Documentation/linux_tv/media/v4l/vidioc-subscribe-event.rst
index 8323386c93f8..8beba56d62b9 100644
--- a/Documentation/linux_tv/media/v4l/vidioc-subscribe-event.rst
+++ b/Documentation/linux_tv/media/v4l/vidioc-subscribe-event.rst
@@ -51,8 +51,8 @@ using the :ref:`VIDIOC_DQEVENT` ioctl.
- ``type``
- Type of the event, see :ref:`event-type`. Note that
- ``V4L2_EVENT_ALL`` can be used with VIDIOC_UNSUBSCRIBE_EVENT for
- unsubscribing all events at once.
+ ``V4L2_EVENT_ALL`` can be used with VIDIOC_UNSUBSCRIBE_EVENT for
+ unsubscribing all events at once.
- .. row 2
@@ -61,8 +61,8 @@ using the :ref:`VIDIOC_DQEVENT` ioctl.
- ``id``
- ID of the event source. If there is no ID associated with the
- event source, then set this to 0. Whether or not an event needs an
- ID depends on the event type.
+ event source, then set this to 0. Whether or not an event needs an
+ ID depends on the event type.
- .. row 3
@@ -79,7 +79,7 @@ using the :ref:`VIDIOC_DQEVENT` ioctl.
- ``reserved``\ [5]
- Reserved for future extensions. Drivers and applications must set
- the array to zero.
+ the array to zero.
@@ -98,9 +98,9 @@ using the :ref:`VIDIOC_DQEVENT` ioctl.
- 0x0001
- When this event is subscribed an initial event will be sent
- containing the current status. This only makes sense for events
- that are triggered by a status change such as ``V4L2_EVENT_CTRL``.
- Other events will ignore this flag.
+ containing the current status. This only makes sense for events
+ that are triggered by a status change such as ``V4L2_EVENT_CTRL``.
+ Other events will ignore this flag.
- .. row 2
@@ -109,21 +109,21 @@ using the :ref:`VIDIOC_DQEVENT` ioctl.
- 0x0002
- If set, then events directly caused by an ioctl will also be sent
- to the filehandle that called that ioctl. For example, changing a
- control using :ref:`VIDIOC_S_CTRL <VIDIOC_G_CTRL>` will cause
- a V4L2_EVENT_CTRL to be sent back to that same filehandle.
- Normally such events are suppressed to prevent feedback loops
- where an application changes a control to a one value and then
- another, and then receives an event telling it that that control
- has changed to the first value.
-
- Since it can't tell whether that event was caused by another
- application or by the :ref:`VIDIOC_S_CTRL <VIDIOC_G_CTRL>`
- call it is hard to decide whether to set the control to the value
- in the event, or ignore it.
-
- Think carefully when you set this flag so you won't get into
- situations like that.
+ to the filehandle that called that ioctl. For example, changing a
+ control using :ref:`VIDIOC_S_CTRL <VIDIOC_G_CTRL>` will cause
+ a V4L2_EVENT_CTRL to be sent back to that same filehandle.
+ Normally such events are suppressed to prevent feedback loops
+ where an application changes a control to a one value and then
+ another, and then receives an event telling it that that control
+ has changed to the first value.
+
+ Since it can't tell whether that event was caused by another
+ application or by the :ref:`VIDIOC_S_CTRL <VIDIOC_G_CTRL>`
+ call it is hard to decide whether to set the control to the value
+ in the event, or ignore it.
+
+ Think carefully when you set this flag so you won't get into
+ situations like that.
diff --git a/Documentation/linux_tv/net.h.rst b/Documentation/linux_tv/net.h.rst
index 4b01cefdb0b7..9b0f705c634b 100644
--- a/Documentation/linux_tv/net.h.rst
+++ b/Documentation/linux_tv/net.h.rst
@@ -34,9 +34,9 @@ file: net.h
#include <linux/types.h>
struct dvb_net_if {
- __u16 pid;
- __u16 if_num;
- __u8 feedtype;
+ __u16 pid;
+ __u16 if_num;
+ __u8 feedtype;
#define DVB_NET_FEEDTYPE_MPE 0 /* multi protocol encapsulation */
#define DVB_NET_FEEDTYPE_ULE 1 /* ultra lightweight encapsulation */
};
@@ -49,8 +49,8 @@ file: net.h
/* binary compatibility cruft: */
struct __dvb_net_if_old {
- __u16 pid;
- __u16 if_num;
+ __u16 pid;
+ __u16 if_num;
};
#define __NET_ADD_IF_OLD _IOWR('o', 52, struct __dvb_net_if_old)
#define __NET_GET_IF_OLD _IOWR('o', 54, struct __dvb_net_if_old)
diff --git a/Documentation/linux_tv/video.h.rst b/Documentation/linux_tv/video.h.rst
index 4be16680ba01..fbbfb89167da 100644
--- a/Documentation/linux_tv/video.h.rst
+++ b/Documentation/linux_tv/video.h.rst
@@ -37,48 +37,48 @@ file: video.h
#endif
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;
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;
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;
typedef struct {
- int w;
- int h;
- video_format_t aspect_ratio;
+ int w;
+ int h;
+ video_format_t aspect_ratio;
} video_size_t;
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;
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;
@@ -104,27 +104,27 @@ file: video.h
/* 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;
- };
+ __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;
+ };
};
/* FIELD_UNKNOWN can be used if the hardware does not know whether
@@ -136,70 +136,70 @@ file: video.h
#define VIDEO_VSYNC_FIELD_PROGRESSIVE (3)
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;
};
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 */
};
struct video_still_picture {
- char __user *iFrame; /* pointer to a single iframe in memory */
- __s32 size;
+ char __user *iFrame; /* pointer to a single iframe in memory */
+ __s32 size;
};
typedef
struct video_highlight {
- int active; /* 1=show highlight, 0=hide highlight */
- __u8 contrast1; /* 7- 4 Pattern pixel contrast */
- /* 3- 0 Background pixel contrast */
- __u8 contrast2; /* 7- 4 Emphasis pixel-2 contrast */
- /* 3- 0 Emphasis pixel-1 contrast */
- __u8 color1; /* 7- 4 Pattern pixel color */
- /* 3- 0 Background pixel color */
- __u8 color2; /* 7- 4 Emphasis pixel-2 color */
- /* 3- 0 Emphasis pixel-1 color */
- __u32 ypos; /* 23-22 auto action mode */
- /* 21-12 start y */
- /* 9- 0 end y */
- __u32 xpos; /* 23-22 button color number */
- /* 21-12 start x */
- /* 9- 0 end x */
+ int active; /* 1=show highlight, 0=hide highlight */
+ __u8 contrast1; /* 7- 4 Pattern pixel contrast */
+ /* 3- 0 Background pixel contrast */
+ __u8 contrast2; /* 7- 4 Emphasis pixel-2 contrast */
+ /* 3- 0 Emphasis pixel-1 contrast */
+ __u8 color1; /* 7- 4 Pattern pixel color */
+ /* 3- 0 Background pixel color */
+ __u8 color2; /* 7- 4 Emphasis pixel-2 color */
+ /* 3- 0 Emphasis pixel-1 color */
+ __u32 ypos; /* 23-22 auto action mode */
+ /* 21-12 start y */
+ /* 9- 0 end y */
+ __u32 xpos; /* 23-22 button color number */
+ /* 21-12 start x */
+ /* 9- 0 end x */
} video_highlight_t;
typedef struct video_spu {
- int active;
- int stream_id;
+ int active;
+ int stream_id;
} video_spu_t;
typedef struct video_spu_palette { /* SPU Palette information */
- int length;
- __u8 __user *palette;
+ int length;
+ __u8 __user *palette;
} video_spu_palette_t;
typedef struct video_navi_pack {
- int length; /* 0 ... 1024 */
- __u8 data[1024];
+ int length; /* 0 ... 1024 */
+ __u8 data[1024];
} video_navi_pack_t;
@@ -222,7 +222,7 @@ file: video.h
#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) */
+ 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?
diff --git a/Documentation/linux_tv/videodev2.h.rst b/Documentation/linux_tv/videodev2.h.rst
index bd433ab201cc..f3c9e6959be0 100644
--- a/Documentation/linux_tv/videodev2.h.rst
+++ b/Documentation/linux_tv/videodev2.h.rst
@@ -85,162 +85,162 @@ file: videodev2.h
/* Four-character-code (FOURCC) */
#define v4l2_fourcc(a, b, c, d)
- ((__u32)(a) | ((__u32)(b) << 8) | ((__u32)(c) << 16) | ((__u32)(d) << 24))
+ ((__u32)(a) | ((__u32)(b) << 8) | ((__u32)(c) << 16) | ((__u32)(d) << 24))
#define v4l2_fourcc_be(a, b, c, d) (v4l2_fourcc(a, b, c, d) | (1 << 31))
/*
* E N U M S
*/
enum v4l2_field {
- V4L2_FIELD_ANY = 0, /* driver can choose from none,
- top, bottom, interlaced
- depending on whatever it thinks
- is approximate ... */
- V4L2_FIELD_NONE = 1, /* this device has no fields ... */
- V4L2_FIELD_TOP = 2, /* top field only */
- V4L2_FIELD_BOTTOM = 3, /* bottom field only */
- V4L2_FIELD_INTERLACED = 4, /* both fields interlaced */
- V4L2_FIELD_SEQ_TB = 5, /* both fields sequential into one
- buffer, top-bottom order */
- V4L2_FIELD_SEQ_BT = 6, /* same as above + bottom-top order */
- V4L2_FIELD_ALTERNATE = 7, /* both fields alternating into
- separate buffers */
- V4L2_FIELD_INTERLACED_TB = 8, /* both fields interlaced, top field
- first and the top field is
- transmitted first */
- V4L2_FIELD_INTERLACED_BT = 9, /* both fields interlaced, top field
- first and the bottom field is
- transmitted first */
- };
- #define V4L2_FIELD_HAS_TOP(field)
- ((field) == V4L2_FIELD_TOP ||
- (field) == V4L2_FIELD_INTERLACED ||
- (field) == V4L2_FIELD_INTERLACED_TB ||
- (field) == V4L2_FIELD_INTERLACED_BT ||
- (field) == V4L2_FIELD_SEQ_TB ||
- (field) == V4L2_FIELD_SEQ_BT)
- #define V4L2_FIELD_HAS_BOTTOM(field)
- ((field) == V4L2_FIELD_BOTTOM ||
- (field) == V4L2_FIELD_INTERLACED ||
- (field) == V4L2_FIELD_INTERLACED_TB ||
- (field) == V4L2_FIELD_INTERLACED_BT ||
- (field) == V4L2_FIELD_SEQ_TB ||
- (field) == V4L2_FIELD_SEQ_BT)
- #define V4L2_FIELD_HAS_BOTH(field)
- ((field) == V4L2_FIELD_INTERLACED ||
- (field) == V4L2_FIELD_INTERLACED_TB ||
- (field) == V4L2_FIELD_INTERLACED_BT ||
- (field) == V4L2_FIELD_SEQ_TB ||
- (field) == V4L2_FIELD_SEQ_BT)
- #define V4L2_FIELD_HAS_T_OR_B(field)
- ((field) == V4L2_FIELD_BOTTOM ||
- (field) == V4L2_FIELD_TOP ||
- (field) == V4L2_FIELD_ALTERNATE)
+ V4L2_FIELD_ANY = 0, /* driver can choose from none,
+ top, bottom, interlaced
+ depending on whatever it thinks
+ is approximate ... */
+ V4L2_FIELD_NONE = 1, /* this device has no fields ... */
+ V4L2_FIELD_TOP = 2, /* top field only */
+ V4L2_FIELD_BOTTOM = 3, /* bottom field only */
+ V4L2_FIELD_INTERLACED = 4, /* both fields interlaced */
+ V4L2_FIELD_SEQ_TB = 5, /* both fields sequential into one
+ buffer, top-bottom order */
+ V4L2_FIELD_SEQ_BT = 6, /* same as above + bottom-top order */
+ V4L2_FIELD_ALTERNATE = 7, /* both fields alternating into
+ separate buffers */
+ V4L2_FIELD_INTERLACED_TB = 8, /* both fields interlaced, top field
+ first and the top field is
+ transmitted first */
+ V4L2_FIELD_INTERLACED_BT = 9, /* both fields interlaced, top field
+ first and the bottom field is
+ transmitted first */
+ };
+ #define V4L2_FIELD_HAS_TOP(field)
+ ((field) == V4L2_FIELD_TOP ||
+ (field) == V4L2_FIELD_INTERLACED ||
+ (field) == V4L2_FIELD_INTERLACED_TB ||
+ (field) == V4L2_FIELD_INTERLACED_BT ||
+ (field) == V4L2_FIELD_SEQ_TB ||
+ (field) == V4L2_FIELD_SEQ_BT)
+ #define V4L2_FIELD_HAS_BOTTOM(field)
+ ((field) == V4L2_FIELD_BOTTOM ||
+ (field) == V4L2_FIELD_INTERLACED ||
+ (field) == V4L2_FIELD_INTERLACED_TB ||
+ (field) == V4L2_FIELD_INTERLACED_BT ||
+ (field) == V4L2_FIELD_SEQ_TB ||
+ (field) == V4L2_FIELD_SEQ_BT)
+ #define V4L2_FIELD_HAS_BOTH(field)
+ ((field) == V4L2_FIELD_INTERLACED ||
+ (field) == V4L2_FIELD_INTERLACED_TB ||
+ (field) == V4L2_FIELD_INTERLACED_BT ||
+ (field) == V4L2_FIELD_SEQ_TB ||
+ (field) == V4L2_FIELD_SEQ_BT)
+ #define V4L2_FIELD_HAS_T_OR_B(field)
+ ((field) == V4L2_FIELD_BOTTOM ||
+ (field) == V4L2_FIELD_TOP ||
+ (field) == V4L2_FIELD_ALTERNATE)
enum v4l2_buf_type {
- V4L2_BUF_TYPE_VIDEO_CAPTURE = 1,
- V4L2_BUF_TYPE_VIDEO_OUTPUT = 2,
- V4L2_BUF_TYPE_VIDEO_OVERLAY = 3,
- V4L2_BUF_TYPE_VBI_CAPTURE = 4,
- V4L2_BUF_TYPE_VBI_OUTPUT = 5,
- V4L2_BUF_TYPE_SLICED_VBI_CAPTURE = 6,
- V4L2_BUF_TYPE_SLICED_VBI_OUTPUT = 7,
- V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY = 8,
- V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE = 9,
- V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE = 10,
- V4L2_BUF_TYPE_SDR_CAPTURE = 11,
- V4L2_BUF_TYPE_SDR_OUTPUT = 12,
- /* Deprecated, do not use */
- V4L2_BUF_TYPE_PRIVATE = 0x80,
- };
-
- #define V4L2_TYPE_IS_MULTIPLANAR(type)
- ((type) == V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE
- || (type) == V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE)
-
- #define V4L2_TYPE_IS_OUTPUT(type)
- ((type) == V4L2_BUF_TYPE_VIDEO_OUTPUT
- || (type) == V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE
- || (type) == V4L2_BUF_TYPE_VIDEO_OVERLAY
- || (type) == V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY
- || (type) == V4L2_BUF_TYPE_VBI_OUTPUT
- || (type) == V4L2_BUF_TYPE_SLICED_VBI_OUTPUT
- || (type) == V4L2_BUF_TYPE_SDR_OUTPUT)
+ V4L2_BUF_TYPE_VIDEO_CAPTURE = 1,
+ V4L2_BUF_TYPE_VIDEO_OUTPUT = 2,
+ V4L2_BUF_TYPE_VIDEO_OVERLAY = 3,
+ V4L2_BUF_TYPE_VBI_CAPTURE = 4,
+ V4L2_BUF_TYPE_VBI_OUTPUT = 5,
+ V4L2_BUF_TYPE_SLICED_VBI_CAPTURE = 6,
+ V4L2_BUF_TYPE_SLICED_VBI_OUTPUT = 7,
+ V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY = 8,
+ V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE = 9,
+ V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE = 10,
+ V4L2_BUF_TYPE_SDR_CAPTURE = 11,
+ V4L2_BUF_TYPE_SDR_OUTPUT = 12,
+ /* Deprecated, do not use */
+ V4L2_BUF_TYPE_PRIVATE = 0x80,
+ };
+
+ #define V4L2_TYPE_IS_MULTIPLANAR(type)
+ ((type) == V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE
+ || (type) == V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE)
+
+ #define V4L2_TYPE_IS_OUTPUT(type)
+ ((type) == V4L2_BUF_TYPE_VIDEO_OUTPUT
+ || (type) == V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE
+ || (type) == V4L2_BUF_TYPE_VIDEO_OVERLAY
+ || (type) == V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY
+ || (type) == V4L2_BUF_TYPE_VBI_OUTPUT
+ || (type) == V4L2_BUF_TYPE_SLICED_VBI_OUTPUT
+ || (type) == V4L2_BUF_TYPE_SDR_OUTPUT)
enum v4l2_tuner_type {
- V4L2_TUNER_RADIO = 1,
- V4L2_TUNER_ANALOG_TV = 2,
- V4L2_TUNER_DIGITAL_TV = 3,
- V4L2_TUNER_SDR = 4,
- V4L2_TUNER_RF = 5,
+ V4L2_TUNER_RADIO = 1,
+ V4L2_TUNER_ANALOG_TV = 2,
+ V4L2_TUNER_DIGITAL_TV = 3,
+ V4L2_TUNER_SDR = 4,
+ V4L2_TUNER_RF = 5,
};
/* Deprecated, do not use */
#define V4L2_TUNER_ADC V4L2_TUNER_SDR
enum v4l2_memory {
- V4L2_MEMORY_MMAP = 1,
- V4L2_MEMORY_USERPTR = 2,
- V4L2_MEMORY_OVERLAY = 3,
- V4L2_MEMORY_DMABUF = 4,
+ V4L2_MEMORY_MMAP = 1,
+ V4L2_MEMORY_USERPTR = 2,
+ V4L2_MEMORY_OVERLAY = 3,
+ V4L2_MEMORY_DMABUF = 4,
};
/* see also http://vektor.theorem.ca/graphics/ycbcr/ */
enum v4l2_colorspace {
- /*
- * Default colorspace, i.e.ie; let the driver figure it out.
- * Can only be used with video capture.
- */
- V4L2_COLORSPACE_DEFAULT = 0,
+ /*
+ * Default colorspace, i.e.ie; let the driver figure it out.
+ * Can only be used with video capture.
+ */
+ V4L2_COLORSPACE_DEFAULT = 0,
- /* SMPTE 170M: used for broadcast NTSC/PAL SDTV */
- V4L2_COLORSPACE_SMPTE170M = 1,
+ /* SMPTE 170M: used for broadcast NTSC/PAL SDTV */
+ V4L2_COLORSPACE_SMPTE170M = 1,
- /* Obsolete pre-1998 SMPTE 240M HDTV standard, superseded by Rec 709 */
- V4L2_COLORSPACE_SMPTE240M = 2,
+ /* Obsolete pre-1998 SMPTE 240M HDTV standard, superseded by Rec 709 */
+ V4L2_COLORSPACE_SMPTE240M = 2,
- /* Rec.709: used for HDTV */
- V4L2_COLORSPACE_REC709 = 3,
+ /* Rec.709: used for HDTV */
+ V4L2_COLORSPACE_REC709 = 3,
- /*
- * Deprecated, do not use. No driver will ever return this. This was
- * based on a misunderstanding of the bt878 datasheet.
- */
- V4L2_COLORSPACE_BT878 = 4,
+ /*
+ * Deprecated, do not use. No driver will ever return this. This was
+ * based on a misunderstanding of the bt878 datasheet.
+ */
+ V4L2_COLORSPACE_BT878 = 4,
- /*
- * NTSC 1953 colorspace. This only makes sense when dealing with
- * really, really old NTSC recordings. Superseded by SMPTE 170M.
- */
- V4L2_COLORSPACE_470_SYSTEM_M = 5,
+ /*
+ * NTSC 1953 colorspace. This only makes sense when dealing with
+ * really, really old NTSC recordings. Superseded by SMPTE 170M.
+ */
+ V4L2_COLORSPACE_470_SYSTEM_M = 5,
- /*
- * EBU Tech 3213 PAL/SECAM colorspace. This only makes sense when
- * dealing with really old PAL/SECAM recordings. Superseded by
- * SMPTE 170M.
- */
- V4L2_COLORSPACE_470_SYSTEM_BG = 6,
+ /*
+ * EBU Tech 3213 PAL/SECAM colorspace. This only makes sense when
+ * dealing with really old PAL/SECAM recordings. Superseded by
+ * SMPTE 170M.
+ */
+ V4L2_COLORSPACE_470_SYSTEM_BG = 6,
- /*
- * Effectively shorthand for V4L2_COLORSPACE_SRGB, V4L2_YCBCR_ENC_601
- * and V4L2_QUANTIZATION_FULL_RANGE. To be used for (Motion-)JPEG.
- */
- V4L2_COLORSPACE_JPEG = 7,
+ /*
+ * Effectively shorthand for V4L2_COLORSPACE_SRGB, V4L2_YCBCR_ENC_601
+ * and V4L2_QUANTIZATION_FULL_RANGE. To be used for (Motion-)JPEG.
+ */
+ V4L2_COLORSPACE_JPEG = 7,
- /* For RGB colorspaces such as produces by most webcams. */
- V4L2_COLORSPACE_SRGB = 8,
+ /* For RGB colorspaces such as produces by most webcams. */
+ V4L2_COLORSPACE_SRGB = 8,
- /* AdobeRGB colorspace */
- V4L2_COLORSPACE_ADOBERGB = 9,
+ /* AdobeRGB colorspace */
+ V4L2_COLORSPACE_ADOBERGB = 9,
- /* BT.2020 colorspace, used for UHDTV. */
- V4L2_COLORSPACE_BT2020 = 10,
+ /* BT.2020 colorspace, used for UHDTV. */
+ V4L2_COLORSPACE_BT2020 = 10,
- /* Raw colorspace: for RAW unprocessed images */
- V4L2_COLORSPACE_RAW = 11,
+ /* Raw colorspace: for RAW unprocessed images */
+ V4L2_COLORSPACE_RAW = 11,
- /* DCI-P3 colorspace, used by cinema projectors */
- V4L2_COLORSPACE_DCI_P3 = 12,
+ /* DCI-P3 colorspace, used by cinema projectors */
+ V4L2_COLORSPACE_DCI_P3 = 12,
};
/*
@@ -248,116 +248,116 @@ file: videodev2.h
* This depends on whether this is a SDTV image (use SMPTE 170M), an
* HDTV image (use Rec. 709), or something else (use sRGB).
*/
- #define V4L2_MAP_COLORSPACE_DEFAULT(is_sdtv, is_hdtv)
- ((is_sdtv) ? V4L2_COLORSPACE_SMPTE170M :
- ((is_hdtv) ? V4L2_COLORSPACE_REC709 : V4L2_COLORSPACE_SRGB))
+ #define V4L2_MAP_COLORSPACE_DEFAULT(is_sdtv, is_hdtv)
+ ((is_sdtv) ? V4L2_COLORSPACE_SMPTE170M :
+ ((is_hdtv) ? V4L2_COLORSPACE_REC709 : V4L2_COLORSPACE_SRGB))
enum v4l2_xfer_func {
- /*
- * Mapping of V4L2_XFER_FUNC_DEFAULT to actual transfer functions
- * for the various colorspaces:
- *
- * V4L2_COLORSPACE_SMPTE170M, V4L2_COLORSPACE_470_SYSTEM_M,
- * V4L2_COLORSPACE_470_SYSTEM_BG, V4L2_COLORSPACE_REC709 and
- * V4L2_COLORSPACE_BT2020: V4L2_XFER_FUNC_709
- *
- * V4L2_COLORSPACE_SRGB, V4L2_COLORSPACE_JPEG: V4L2_XFER_FUNC_SRGB
- *
- * V4L2_COLORSPACE_ADOBERGB: V4L2_XFER_FUNC_ADOBERGB
- *
- * V4L2_COLORSPACE_SMPTE240M: V4L2_XFER_FUNC_SMPTE240M
- *
- * V4L2_COLORSPACE_RAW: V4L2_XFER_FUNC_NONE
- *
- * V4L2_COLORSPACE_DCI_P3: V4L2_XFER_FUNC_DCI_P3
- */
- V4L2_XFER_FUNC_DEFAULT = 0,
- V4L2_XFER_FUNC_709 = 1,
- V4L2_XFER_FUNC_SRGB = 2,
- V4L2_XFER_FUNC_ADOBERGB = 3,
- V4L2_XFER_FUNC_SMPTE240M = 4,
- V4L2_XFER_FUNC_NONE = 5,
- V4L2_XFER_FUNC_DCI_P3 = 6,
- V4L2_XFER_FUNC_SMPTE2084 = 7,
+ /*
+ * Mapping of V4L2_XFER_FUNC_DEFAULT to actual transfer functions
+ * for the various colorspaces:
+ *
+ * V4L2_COLORSPACE_SMPTE170M, V4L2_COLORSPACE_470_SYSTEM_M,
+ * V4L2_COLORSPACE_470_SYSTEM_BG, V4L2_COLORSPACE_REC709 and
+ * V4L2_COLORSPACE_BT2020: V4L2_XFER_FUNC_709
+ *
+ * V4L2_COLORSPACE_SRGB, V4L2_COLORSPACE_JPEG: V4L2_XFER_FUNC_SRGB
+ *
+ * V4L2_COLORSPACE_ADOBERGB: V4L2_XFER_FUNC_ADOBERGB
+ *
+ * V4L2_COLORSPACE_SMPTE240M: V4L2_XFER_FUNC_SMPTE240M
+ *
+ * V4L2_COLORSPACE_RAW: V4L2_XFER_FUNC_NONE
+ *
+ * V4L2_COLORSPACE_DCI_P3: V4L2_XFER_FUNC_DCI_P3
+ */
+ V4L2_XFER_FUNC_DEFAULT = 0,
+ V4L2_XFER_FUNC_709 = 1,
+ V4L2_XFER_FUNC_SRGB = 2,
+ V4L2_XFER_FUNC_ADOBERGB = 3,
+ V4L2_XFER_FUNC_SMPTE240M = 4,
+ V4L2_XFER_FUNC_NONE = 5,
+ V4L2_XFER_FUNC_DCI_P3 = 6,
+ V4L2_XFER_FUNC_SMPTE2084 = 7,
};
/*
* Determine how XFER_FUNC_DEFAULT should map to a proper transfer function.
* This depends on the colorspace.
*/
- #define V4L2_MAP_XFER_FUNC_DEFAULT(colsp)
- ((colsp) == V4L2_COLORSPACE_ADOBERGB ? V4L2_XFER_FUNC_ADOBERGB :
- ((colsp) == V4L2_COLORSPACE_SMPTE240M ? V4L2_XFER_FUNC_SMPTE240M :
- ((colsp) == V4L2_COLORSPACE_DCI_P3 ? V4L2_XFER_FUNC_DCI_P3 :
- ((colsp) == V4L2_COLORSPACE_RAW ? V4L2_XFER_FUNC_NONE :
- ((colsp) == V4L2_COLORSPACE_SRGB || (colsp) == V4L2_COLORSPACE_JPEG ?
- V4L2_XFER_FUNC_SRGB : V4L2_XFER_FUNC_709)))))
+ #define V4L2_MAP_XFER_FUNC_DEFAULT(colsp)
+ ((colsp) == V4L2_COLORSPACE_ADOBERGB ? V4L2_XFER_FUNC_ADOBERGB :
+ ((colsp) == V4L2_COLORSPACE_SMPTE240M ? V4L2_XFER_FUNC_SMPTE240M :
+ ((colsp) == V4L2_COLORSPACE_DCI_P3 ? V4L2_XFER_FUNC_DCI_P3 :
+ ((colsp) == V4L2_COLORSPACE_RAW ? V4L2_XFER_FUNC_NONE :
+ ((colsp) == V4L2_COLORSPACE_SRGB || (colsp) == V4L2_COLORSPACE_JPEG ?
+ V4L2_XFER_FUNC_SRGB : V4L2_XFER_FUNC_709)))))
enum v4l2_ycbcr_encoding {
- /*
- * Mapping of V4L2_YCBCR_ENC_DEFAULT to actual encodings for the
- * various colorspaces:
- *
- * V4L2_COLORSPACE_SMPTE170M, V4L2_COLORSPACE_470_SYSTEM_M,
- * V4L2_COLORSPACE_470_SYSTEM_BG, V4L2_COLORSPACE_ADOBERGB and
- * V4L2_COLORSPACE_JPEG: V4L2_YCBCR_ENC_601
- *
- * V4L2_COLORSPACE_REC709 and V4L2_COLORSPACE_DCI_P3: V4L2_YCBCR_ENC_709
- *
- * V4L2_COLORSPACE_SRGB: V4L2_YCBCR_ENC_SYCC
- *
- * V4L2_COLORSPACE_BT2020: V4L2_YCBCR_ENC_BT2020
- *
- * V4L2_COLORSPACE_SMPTE240M: V4L2_YCBCR_ENC_SMPTE240M
- */
- V4L2_YCBCR_ENC_DEFAULT = 0,
+ /*
+ * Mapping of V4L2_YCBCR_ENC_DEFAULT to actual encodings for the
+ * various colorspaces:
+ *
+ * V4L2_COLORSPACE_SMPTE170M, V4L2_COLORSPACE_470_SYSTEM_M,
+ * V4L2_COLORSPACE_470_SYSTEM_BG, V4L2_COLORSPACE_ADOBERGB and
+ * V4L2_COLORSPACE_JPEG: V4L2_YCBCR_ENC_601
+ *
+ * V4L2_COLORSPACE_REC709 and V4L2_COLORSPACE_DCI_P3: V4L2_YCBCR_ENC_709
+ *
+ * V4L2_COLORSPACE_SRGB: V4L2_YCBCR_ENC_SYCC
+ *
+ * V4L2_COLORSPACE_BT2020: V4L2_YCBCR_ENC_BT2020
+ *
+ * V4L2_COLORSPACE_SMPTE240M: V4L2_YCBCR_ENC_SMPTE240M
+ */
+ V4L2_YCBCR_ENC_DEFAULT = 0,
- /* ITU-R 601 -- SDTV */
- V4L2_YCBCR_ENC_601 = 1,
+ /* ITU-R 601 -- SDTV */
+ V4L2_YCBCR_ENC_601 = 1,
- /* Rec. 709 -- HDTV */
- V4L2_YCBCR_ENC_709 = 2,
+ /* Rec. 709 -- HDTV */
+ V4L2_YCBCR_ENC_709 = 2,
- /* ITU-R 601/EN 61966-2-4 Extended Gamut -- SDTV */
- V4L2_YCBCR_ENC_XV601 = 3,
+ /* ITU-R 601/EN 61966-2-4 Extended Gamut -- SDTV */
+ V4L2_YCBCR_ENC_XV601 = 3,
- /* Rec. 709/EN 61966-2-4 Extended Gamut -- HDTV */
- V4L2_YCBCR_ENC_XV709 = 4,
+ /* Rec. 709/EN 61966-2-4 Extended Gamut -- HDTV */
+ V4L2_YCBCR_ENC_XV709 = 4,
- /* sYCC (Y'CbCr encoding of sRGB) */
- V4L2_YCBCR_ENC_SYCC = 5,
+ /* sYCC (Y'CbCr encoding of sRGB) */
+ V4L2_YCBCR_ENC_SYCC = 5,
- /* BT.2020 Non-constant Luminance Y'CbCr */
- V4L2_YCBCR_ENC_BT2020 = 6,
+ /* BT.2020 Non-constant Luminance Y'CbCr */
+ V4L2_YCBCR_ENC_BT2020 = 6,
- /* BT.2020 Constant Luminance Y'CbcCrc */
- V4L2_YCBCR_ENC_BT2020_CONST_LUM = 7,
+ /* BT.2020 Constant Luminance Y'CbcCrc */
+ V4L2_YCBCR_ENC_BT2020_CONST_LUM = 7,
- /* SMPTE 240M -- Obsolete HDTV */
- V4L2_YCBCR_ENC_SMPTE240M = 8,
+ /* SMPTE 240M -- Obsolete HDTV */
+ V4L2_YCBCR_ENC_SMPTE240M = 8,
};
/*
* Determine how YCBCR_ENC_DEFAULT should map to a proper Y'CbCr encoding.
* This depends on the colorspace.
*/
- #define V4L2_MAP_YCBCR_ENC_DEFAULT(colsp)
- (((colsp) == V4L2_COLORSPACE_REC709 ||
- (colsp) == V4L2_COLORSPACE_DCI_P3) ? V4L2_YCBCR_ENC_709 :
- ((colsp) == V4L2_COLORSPACE_BT2020 ? V4L2_YCBCR_ENC_BT2020 :
- ((colsp) == V4L2_COLORSPACE_SMPTE240M ? V4L2_YCBCR_ENC_SMPTE240M :
- V4L2_YCBCR_ENC_601)))
+ #define V4L2_MAP_YCBCR_ENC_DEFAULT(colsp)
+ (((colsp) == V4L2_COLORSPACE_REC709 ||
+ (colsp) == V4L2_COLORSPACE_DCI_P3) ? V4L2_YCBCR_ENC_709 :
+ ((colsp) == V4L2_COLORSPACE_BT2020 ? V4L2_YCBCR_ENC_BT2020 :
+ ((colsp) == V4L2_COLORSPACE_SMPTE240M ? V4L2_YCBCR_ENC_SMPTE240M :
+ V4L2_YCBCR_ENC_601)))
enum v4l2_quantization {
- /*
- * The default for R'G'B' quantization is always full range, except
- * for the BT2020 colorspace. For Y'CbCr the quantization is always
- * limited range, except for COLORSPACE_JPEG, SYCC, XV601 or XV709:
- * those are full range.
- */
- V4L2_QUANTIZATION_DEFAULT = 0,
- V4L2_QUANTIZATION_FULL_RANGE = 1,
- V4L2_QUANTIZATION_LIM_RANGE = 2,
+ /*
+ * The default for R'G'B' quantization is always full range, except
+ * for the BT2020 colorspace. For Y'CbCr the quantization is always
+ * limited range, except for COLORSPACE_JPEG, SYCC, XV601 or XV709:
+ * those are full range.
+ */
+ V4L2_QUANTIZATION_DEFAULT = 0,
+ V4L2_QUANTIZATION_FULL_RANGE = 1,
+ V4L2_QUANTIZATION_LIM_RANGE = 2,
};
/*
@@ -365,30 +365,30 @@ file: videodev2.h
* This depends on whether the image is RGB or not, the colorspace and the
* Y'CbCr encoding.
*/
- #define V4L2_MAP_QUANTIZATION_DEFAULT(is_rgb, colsp, ycbcr_enc)
- (((is_rgb) && (colsp) == V4L2_COLORSPACE_BT2020) ? V4L2_QUANTIZATION_LIM_RANGE :
- (((is_rgb) || (ycbcr_enc) == V4L2_YCBCR_ENC_XV601 ||
- (ycbcr_enc) == V4L2_YCBCR_ENC_XV709 || (colsp) == V4L2_COLORSPACE_JPEG) ?
- V4L2_QUANTIZATION_FULL_RANGE : V4L2_QUANTIZATION_LIM_RANGE))
+ #define V4L2_MAP_QUANTIZATION_DEFAULT(is_rgb, colsp, ycbcr_enc)
+ (((is_rgb) && (colsp) == V4L2_COLORSPACE_BT2020) ? V4L2_QUANTIZATION_LIM_RANGE :
+ (((is_rgb) || (ycbcr_enc) == V4L2_YCBCR_ENC_XV601 ||
+ (ycbcr_enc) == V4L2_YCBCR_ENC_XV709 || (colsp) == V4L2_COLORSPACE_JPEG) ?
+ V4L2_QUANTIZATION_FULL_RANGE : V4L2_QUANTIZATION_LIM_RANGE))
enum v4l2_priority {
- V4L2_PRIORITY_UNSET = 0, /* not initialized */
- V4L2_PRIORITY_BACKGROUND = 1,
- V4L2_PRIORITY_INTERACTIVE = 2,
- V4L2_PRIORITY_RECORD = 3,
- V4L2_PRIORITY_DEFAULT = V4L2_PRIORITY_INTERACTIVE,
+ V4L2_PRIORITY_UNSET = 0, /* not initialized */
+ V4L2_PRIORITY_BACKGROUND = 1,
+ V4L2_PRIORITY_INTERACTIVE = 2,
+ V4L2_PRIORITY_RECORD = 3,
+ V4L2_PRIORITY_DEFAULT = V4L2_PRIORITY_INTERACTIVE,
};
struct v4l2_rect {
- __s32 left;
- __s32 top;
- __u32 width;
- __u32 height;
+ __s32 left;
+ __s32 top;
+ __u32 width;
+ __u32 height;
};
struct v4l2_fract {
- __u32 numerator;
- __u32 denominator;
+ __u32 numerator;
+ __u32 denominator;
};
/**
@@ -403,13 +403,13 @@ file: videodev2.h
* @reserved: reserved fields for future extensions
*/
struct v4l2_capability {
- __u8 driver[16];
- __u8 card[32];
- __u8 bus_info[32];
- __u32 version;
- __u32 capabilities;
- __u32 device_caps;
- __u32 reserved[3];
+ __u8 driver[16];
+ __u8 card[32];
+ __u8 bus_info[32];
+ __u32 version;
+ __u32 capabilities;
+ __u32 device_caps;
+ __u32 reserved[3];
};
/* Values for 'capabilities' field */
@@ -453,18 +453,18 @@ file: videodev2.h
* V I D E O I M A G E F O R M A T
*/
struct v4l2_pix_format {
- __u32 width;
- __u32 height;
- __u32 pixelformat;
- __u32 field; /* enum v4l2_field */
- __u32 bytesperline; /* for padding, zero if unused */
- __u32 sizeimage;
- __u32 colorspace; /* enum v4l2_colorspace */
- __u32 priv; /* private data, depends on pixelformat */
- __u32 flags; /* format flags (V4L2_PIX_FMT_FLAG_*) */
- __u32 ycbcr_enc; /* enum v4l2_ycbcr_encoding */
- __u32 quantization; /* enum v4l2_quantization */
- __u32 xfer_func; /* enum v4l2_xfer_func */
+ __u32 width;
+ __u32 height;
+ __u32 pixelformat;
+ __u32 field; /* enum v4l2_field */
+ __u32 bytesperline; /* for padding, zero if unused */
+ __u32 sizeimage;
+ __u32 colorspace; /* enum v4l2_colorspace */
+ __u32 priv; /* private data, depends on pixelformat */
+ __u32 flags; /* format flags (V4L2_PIX_FMT_FLAG_*) */
+ __u32 ycbcr_enc; /* enum v4l2_ycbcr_encoding */
+ __u32 quantization; /* enum v4l2_quantization */
+ __u32 xfer_func; /* enum v4l2_xfer_func */
};
/* Pixel format FOURCC depth Description */
@@ -564,17 +564,17 @@ file: videodev2.h
#define V4L2_PIX_FMT_SGBRG10 v4l2_fourcc('G', 'B', '1', '0') /* 10 GBGB.. RGRG.. */
#define V4L2_PIX_FMT_SGRBG10 v4l2_fourcc('B', 'A', '1', '0') /* 10 GRGR.. BGBG.. */
#define V4L2_PIX_FMT_SRGGB10 v4l2_fourcc('R', 'G', '1', '0') /* 10 RGRG.. GBGB.. */
- /* 10bit raw bayer packed, 5 bytes for every 4 pixels */
+ /* 10bit raw bayer packed, 5 bytes for every 4 pixels */
#define V4L2_PIX_FMT_SBGGR10P v4l2_fourcc('p', 'B', 'A', 'A')
#define V4L2_PIX_FMT_SGBRG10P v4l2_fourcc('p', 'G', 'A', 'A')
#define V4L2_PIX_FMT_SGRBG10P v4l2_fourcc('p', 'g', 'A', 'A')
#define V4L2_PIX_FMT_SRGGB10P v4l2_fourcc('p', 'R', 'A', 'A')
- /* 10bit raw bayer a-law compressed to 8 bits */
+ /* 10bit raw bayer a-law compressed to 8 bits */
#define V4L2_PIX_FMT_SBGGR10ALAW8 v4l2_fourcc('a', 'B', 'A', '8')
#define V4L2_PIX_FMT_SGBRG10ALAW8 v4l2_fourcc('a', 'G', 'A', '8')
#define V4L2_PIX_FMT_SGRBG10ALAW8 v4l2_fourcc('a', 'g', 'A', '8')
#define V4L2_PIX_FMT_SRGGB10ALAW8 v4l2_fourcc('a', 'R', 'A', '8')
- /* 10bit raw bayer DPCM compressed to 8 bits */
+ /* 10bit raw bayer DPCM compressed to 8 bits */
#define V4L2_PIX_FMT_SBGGR10DPCM8 v4l2_fourcc('b', 'B', 'A', '8')
#define V4L2_PIX_FMT_SGBRG10DPCM8 v4l2_fourcc('b', 'G', 'A', '8')
#define V4L2_PIX_FMT_SGRBG10DPCM8 v4l2_fourcc('B', 'D', '1', '0')
@@ -650,95 +650,95 @@ file: videodev2.h
* F O R M A T E N U M E R A T I O N
*/
struct v4l2_fmtdesc {
- __u32 index; /* Format number */
- __u32 type; /* enum v4l2_buf_type */
- __u32 flags;
- __u8 description[32]; /* Description string */
- __u32 pixelformat; /* Format fourcc */
- __u32 reserved[4];
+ __u32 index; /* Format number */
+ __u32 type; /* enum v4l2_buf_type */
+ __u32 flags;
+ __u8 description[32]; /* Description string */
+ __u32 pixelformat; /* Format fourcc */
+ __u32 reserved[4];
};
#define V4L2_FMT_FLAG_COMPRESSED 0x0001
#define V4L2_FMT_FLAG_EMULATED 0x0002
- /* Frame Size and frame rate enumeration */
+ /* Frame Size and frame rate enumeration */
/*
* F R A M E S I Z E E N U M E R A T I O N
*/
enum v4l2_frmsizetypes {
- V4L2_FRMSIZE_TYPE_DISCRETE = 1,
- V4L2_FRMSIZE_TYPE_CONTINUOUS = 2,
- V4L2_FRMSIZE_TYPE_STEPWISE = 3,
+ V4L2_FRMSIZE_TYPE_DISCRETE = 1,
+ V4L2_FRMSIZE_TYPE_CONTINUOUS = 2,
+ V4L2_FRMSIZE_TYPE_STEPWISE = 3,
};
struct v4l2_frmsize_discrete {
- __u32 width; /* Frame width [pixel] */
- __u32 height; /* Frame height [pixel] */
+ __u32 width; /* Frame width [pixel] */
+ __u32 height; /* Frame height [pixel] */
};
struct v4l2_frmsize_stepwise {
- __u32 min_width; /* Minimum frame width [pixel] */
- __u32 max_width; /* Maximum frame width [pixel] */
- __u32 step_width; /* Frame width step size [pixel] */
- __u32 min_height; /* Minimum frame height [pixel] */
- __u32 max_height; /* Maximum frame height [pixel] */
- __u32 step_height; /* Frame height step size [pixel] */
+ __u32 min_width; /* Minimum frame width [pixel] */
+ __u32 max_width; /* Maximum frame width [pixel] */
+ __u32 step_width; /* Frame width step size [pixel] */
+ __u32 min_height; /* Minimum frame height [pixel] */
+ __u32 max_height; /* Maximum frame height [pixel] */
+ __u32 step_height; /* Frame height step size [pixel] */
};
struct v4l2_frmsizeenum {
- __u32 index; /* Frame size number */
- __u32 pixel_format; /* Pixel format */
- __u32 type; /* Frame size type the device supports. */
+ __u32 index; /* Frame size number */
+ __u32 pixel_format; /* Pixel format */
+ __u32 type; /* Frame size type the device supports. */
- union { /* Frame size */
- struct v4l2_frmsize_discrete discrete;
- struct v4l2_frmsize_stepwise stepwise;
- };
+ union { /* Frame size */
+ struct v4l2_frmsize_discrete discrete;
+ struct v4l2_frmsize_stepwise stepwise;
+ };
- __u32 reserved[2]; /* Reserved space for future use */
+ __u32 reserved[2]; /* Reserved space for future use */
};
/*
* F R A M E R A T E E N U M E R A T I O N
*/
enum v4l2_frmivaltypes {
- V4L2_FRMIVAL_TYPE_DISCRETE = 1,
- V4L2_FRMIVAL_TYPE_CONTINUOUS = 2,
- V4L2_FRMIVAL_TYPE_STEPWISE = 3,
+ V4L2_FRMIVAL_TYPE_DISCRETE = 1,
+ V4L2_FRMIVAL_TYPE_CONTINUOUS = 2,
+ V4L2_FRMIVAL_TYPE_STEPWISE = 3,
};
struct v4l2_frmival_stepwise {
- struct v4l2_fract min; /* Minimum frame interval [s] */
- struct v4l2_fract max; /* Maximum frame interval [s] */
- struct v4l2_fract step; /* Frame interval step size [s] */
+ struct v4l2_fract min; /* Minimum frame interval [s] */
+ struct v4l2_fract max; /* Maximum frame interval [s] */
+ struct v4l2_fract step; /* Frame interval step size [s] */
};
struct v4l2_frmivalenum {
- __u32 index; /* Frame format index */
- __u32 pixel_format; /* Pixel format */
- __u32 width; /* Frame width */
- __u32 height; /* Frame height */
- __u32 type; /* Frame interval type the device supports. */
+ __u32 index; /* Frame format index */
+ __u32 pixel_format; /* Pixel format */
+ __u32 width; /* Frame width */
+ __u32 height; /* Frame height */
+ __u32 type; /* Frame interval type the device supports. */
- union { /* Frame interval */
- struct v4l2_fract discrete;
- struct v4l2_frmival_stepwise stepwise;
- };
+ union { /* Frame interval */
+ struct v4l2_fract discrete;
+ struct v4l2_frmival_stepwise stepwise;
+ };
- __u32 reserved[2]; /* Reserved space for future use */
+ __u32 reserved[2]; /* Reserved space for future use */
};
/*
* T I M E C O D E
*/
struct v4l2_timecode {
- __u32 type;
- __u32 flags;
- __u8 frames;
- __u8 seconds;
- __u8 minutes;
- __u8 hours;
- __u8 userbits[4];
+ __u32 type;
+ __u32 flags;
+ __u8 frames;
+ __u8 seconds;
+ __u8 minutes;
+ __u8 hours;
+ __u8 userbits[4];
};
/* Type */
@@ -757,42 +757,42 @@ file: videodev2.h
/* The above is based on SMPTE timecodes */
struct v4l2_jpegcompression {
- int quality;
-
- int APPn; /* Number of APP segment to be written,
- * must be 0..15 */
- int APP_len; /* Length of data in JPEG APPn segment */
- char APP_data[60]; /* Data in the JPEG APPn segment. */
-
- int COM_len; /* Length of data in JPEG COM segment */
- char COM_data[60]; /* Data in JPEG COM segment */
-
- __u32 jpeg_markers; /* Which markers should go into the JPEG
- * output. Unless you exactly know what
- * you do, leave them untouched.
- * Including less markers will make the
- * resulting code smaller, but there will
- * be fewer applications which can read it.
- * The presence of the APP and COM marker
- * is influenced by APP_len and COM_len
- * ONLY, not by this property! */
+ int quality;
+
+ int APPn; /* Number of APP segment to be written,
+ * must be 0..15 */
+ int APP_len; /* Length of data in JPEG APPn segment */
+ char APP_data[60]; /* Data in the JPEG APPn segment. */
+
+ int COM_len; /* Length of data in JPEG COM segment */
+ char COM_data[60]; /* Data in JPEG COM segment */
+
+ __u32 jpeg_markers; /* Which markers should go into the JPEG
+ * output. Unless you exactly know what
+ * you do, leave them untouched.
+ * Including less markers will make the
+ * resulting code smaller, but there will
+ * be fewer applications which can read it.
+ * The presence of the APP and COM marker
+ * is influenced by APP_len and COM_len
+ * ONLY, not by this property! */
#define V4L2_JPEG_MARKER_DHT (1<<3) /* Define Huffman Tables */
#define V4L2_JPEG_MARKER_DQT (1<<4) /* Define Quantization Tables */
#define V4L2_JPEG_MARKER_DRI (1<<5) /* Define Restart Interval */
#define V4L2_JPEG_MARKER_COM (1<<6) /* Comment segment */
#define V4L2_JPEG_MARKER_APP (1<<7) /* App segment, driver will
- * always use APP0 */
+ * always use APP0 */
};
/*
* M E M O R Y - M A P P I N G B U F F E R S
*/
struct v4l2_requestbuffers {
- __u32 count;
- __u32 type; /* enum v4l2_buf_type */
- __u32 memory; /* enum v4l2_memory */
- __u32 reserved[2];
+ __u32 count;
+ __u32 type; /* enum v4l2_buf_type */
+ __u32 memory; /* enum v4l2_memory */
+ __u32 reserved[2];
};
/**
@@ -816,15 +816,15 @@ file: videodev2.h
* a completely separate memory node (e.g. in embedded devices).
*/
struct v4l2_plane {
- __u32 bytesused;
- __u32 length;
- union {
- __u32 mem_offset;
- unsigned long userptr;
- __s32 fd;
- } m;
- __u32 data_offset;
- __u32 reserved[11];
+ __u32 bytesused;
+ __u32 length;
+ union {
+ __u32 mem_offset;
+ unsigned long userptr;
+ __s32 fd;
+ } m;
+ __u32 data_offset;
+ __u32 reserved[11];
};
/**
@@ -858,26 +858,26 @@ file: videodev2.h
* I/O methods.
*/
struct v4l2_buffer {
- __u32 index;
- __u32 type;
- __u32 bytesused;
- __u32 flags;
- __u32 field;
- struct timeval timestamp;
- struct v4l2_timecode timecode;
- __u32 sequence;
-
- /* memory location */
- __u32 memory;
- union {
- __u32 offset;
- unsigned long userptr;
- struct v4l2_plane *planes;
- __s32 fd;
- } m;
- __u32 length;
- __u32 reserved2;
- __u32 reserved;
+ __u32 index;
+ __u32 type;
+ __u32 bytesused;
+ __u32 flags;
+ __u32 field;
+ struct timeval timestamp;
+ struct v4l2_timecode timecode;
+ __u32 sequence;
+
+ /* memory location */
+ __u32 memory;
+ union {
+ __u32 offset;
+ unsigned long userptr;
+ struct v4l2_plane *planes;
+ __s32 fd;
+ } m;
+ __u32 length;
+ __u32 reserved2;
+ __u32 reserved;
};
/* Flags for 'flags' field */
@@ -933,33 +933,33 @@ file: videodev2.h
* content. Therefore this field should not be used for any other extensions.
*/
struct v4l2_exportbuffer {
- __u32 type; /* enum v4l2_buf_type */
- __u32 index;
- __u32 plane;
- __u32 flags;
- __s32 fd;
- __u32 reserved[11];
+ __u32 type; /* enum v4l2_buf_type */
+ __u32 index;
+ __u32 plane;
+ __u32 flags;
+ __s32 fd;
+ __u32 reserved[11];
};
/*
* O V E R L A Y P R E V I E W
*/
struct v4l2_framebuffer {
- __u32 capability;
- __u32 flags;
+ __u32 capability;
+ __u32 flags;
/* FIXME: in theory we should pass something like PCI device + memory
* region + offset instead of some physical address */
- void *base;
- struct {
- __u32 width;
- __u32 height;
- __u32 pixelformat;
- __u32 field; /* enum v4l2_field */
- __u32 bytesperline; /* for padding, zero if unused */
- __u32 sizeimage;
- __u32 colorspace; /* enum v4l2_colorspace */
- __u32 priv; /* reserved field, set to 0 */
- } fmt;
+ void *base;
+ struct {
+ __u32 width;
+ __u32 height;
+ __u32 pixelformat;
+ __u32 field; /* enum v4l2_field */
+ __u32 bytesperline; /* for padding, zero if unused */
+ __u32 sizeimage;
+ __u32 colorspace; /* enum v4l2_colorspace */
+ __u32 priv; /* reserved field, set to 0 */
+ } fmt;
};
/* Flags for the 'capability' field. Read only */
#define V4L2_FBUF_CAP_EXTERNOVERLAY 0x0001
@@ -980,30 +980,30 @@ file: videodev2.h
#define V4L2_FBUF_FLAG_SRC_CHROMAKEY 0x0040
struct v4l2_clip {
- struct v4l2_rect c;
- struct v4l2_clip __user *next;
+ struct v4l2_rect c;
+ struct v4l2_clip __user *next;
};
struct v4l2_window {
- struct v4l2_rect w;
- __u32 field; /* enum v4l2_field */
- __u32 chromakey;
- struct v4l2_clip __user *clips;
- __u32 clipcount;
- void __user *bitmap;
- __u8 global_alpha;
+ struct v4l2_rect w;
+ __u32 field; /* enum v4l2_field */
+ __u32 chromakey;
+ struct v4l2_clip __user *clips;
+ __u32 clipcount;
+ void __user *bitmap;
+ __u8 global_alpha;
};
/*
* C A P T U R E P A R A M E T E R S
*/
struct v4l2_captureparm {
- __u32 capability; /* Supported modes */
- __u32 capturemode; /* Current mode */
- struct v4l2_fract timeperframe; /* Time per frame in seconds */
- __u32 extendedmode; /* Driver-specific extensions */
- __u32 readbuffers; /* # of buffers for read */
- __u32 reserved[4];
+ __u32 capability; /* Supported modes */
+ __u32 capturemode; /* Current mode */
+ struct v4l2_fract timeperframe; /* Time per frame in seconds */
+ __u32 extendedmode; /* Driver-specific extensions */
+ __u32 readbuffers; /* # of buffers for read */
+ __u32 reserved[4];
};
/* Flags for 'capability' and 'capturemode' fields */
@@ -1011,27 +1011,27 @@ file: videodev2.h
#define V4L2_CAP_TIMEPERFRAME 0x1000 /* timeperframe field is supported */
struct v4l2_outputparm {
- __u32 capability; /* Supported modes */
- __u32 outputmode; /* Current mode */
- struct v4l2_fract timeperframe; /* Time per frame in seconds */
- __u32 extendedmode; /* Driver-specific extensions */
- __u32 writebuffers; /* # of buffers for write */
- __u32 reserved[4];
+ __u32 capability; /* Supported modes */
+ __u32 outputmode; /* Current mode */
+ struct v4l2_fract timeperframe; /* Time per frame in seconds */
+ __u32 extendedmode; /* Driver-specific extensions */
+ __u32 writebuffers; /* # of buffers for write */
+ __u32 reserved[4];
};
/*
* I N P U T I M A G E C R O P P I N G
*/
struct v4l2_cropcap {
- __u32 type; /* enum v4l2_buf_type */
- struct v4l2_rect bounds;
- struct v4l2_rect defrect;
- struct v4l2_fract pixelaspect;
+ __u32 type; /* enum v4l2_buf_type */
+ struct v4l2_rect bounds;
+ struct v4l2_rect defrect;
+ struct v4l2_fract pixelaspect;
};
struct v4l2_crop {
- __u32 type; /* enum v4l2_buf_type */
- struct v4l2_rect c;
+ __u32 type; /* enum v4l2_buf_type */
+ struct v4l2_rect c;
};
/**
@@ -1048,11 +1048,11 @@ file: videodev2.h
* an application and a driver.
*/
struct v4l2_selection {
- __u32 type;
- __u32 target;
- __u32 flags;
- struct v4l2_rect r;
- __u32 reserved[9];
+ __u32 type;
+ __u32 target;
+ __u32 flags;
+ struct v4l2_rect r;
+ __u32 reserved[9];
};
@@ -1114,87 +1114,87 @@ file: videodev2.h
* Missing here.
*/
#define V4L2_STD_NTSC (V4L2_STD_NTSC_M |
- V4L2_STD_NTSC_M_JP |
- V4L2_STD_NTSC_M_KR)
+ V4L2_STD_NTSC_M_JP |
+ V4L2_STD_NTSC_M_KR)
/* Secam macros */
#define V4L2_STD_SECAM_DK (V4L2_STD_SECAM_D |
- V4L2_STD_SECAM_K |
- V4L2_STD_SECAM_K1)
+ V4L2_STD_SECAM_K |
+ V4L2_STD_SECAM_K1)
/* All Secam Standards */
#define V4L2_STD_SECAM (V4L2_STD_SECAM_B |
- V4L2_STD_SECAM_G |
- V4L2_STD_SECAM_H |
- V4L2_STD_SECAM_DK |
- V4L2_STD_SECAM_L |
- V4L2_STD_SECAM_LC)
+ V4L2_STD_SECAM_G |
+ V4L2_STD_SECAM_H |
+ V4L2_STD_SECAM_DK |
+ V4L2_STD_SECAM_L |
+ V4L2_STD_SECAM_LC)
/* PAL macros */
#define V4L2_STD_PAL_BG (V4L2_STD_PAL_B |
- V4L2_STD_PAL_B1 |
- V4L2_STD_PAL_G)
+ V4L2_STD_PAL_B1 |
+ V4L2_STD_PAL_G)
#define V4L2_STD_PAL_DK (V4L2_STD_PAL_D |
- V4L2_STD_PAL_D1 |
- V4L2_STD_PAL_K)
+ V4L2_STD_PAL_D1 |
+ V4L2_STD_PAL_K)
/*
* "Common" PAL - This macro is there to be compatible with the old
* V4L1 concept of "PAL": /BGDKHI.
* Several PAL standards are missing here: /M, /N and /Nc
*/
#define V4L2_STD_PAL (V4L2_STD_PAL_BG |
- V4L2_STD_PAL_DK |
- V4L2_STD_PAL_H |
- V4L2_STD_PAL_I)
+ V4L2_STD_PAL_DK |
+ V4L2_STD_PAL_H |
+ V4L2_STD_PAL_I)
/* Chroma "agnostic" standards */
#define V4L2_STD_B (V4L2_STD_PAL_B |
- V4L2_STD_PAL_B1 |
- V4L2_STD_SECAM_B)
+ V4L2_STD_PAL_B1 |
+ V4L2_STD_SECAM_B)
#define V4L2_STD_G (V4L2_STD_PAL_G |
- V4L2_STD_SECAM_G)
+ V4L2_STD_SECAM_G)
#define V4L2_STD_H (V4L2_STD_PAL_H |
- V4L2_STD_SECAM_H)
+ V4L2_STD_SECAM_H)
#define V4L2_STD_L (V4L2_STD_SECAM_L |
- V4L2_STD_SECAM_LC)
+ V4L2_STD_SECAM_LC)
#define V4L2_STD_GH (V4L2_STD_G |
- V4L2_STD_H)
+ V4L2_STD_H)
#define V4L2_STD_DK (V4L2_STD_PAL_DK |
- V4L2_STD_SECAM_DK)
+ V4L2_STD_SECAM_DK)
#define V4L2_STD_BG (V4L2_STD_B |
- V4L2_STD_G)
+ V4L2_STD_G)
#define V4L2_STD_MN (V4L2_STD_PAL_M |
- V4L2_STD_PAL_N |
- V4L2_STD_PAL_Nc |
- V4L2_STD_NTSC)
+ V4L2_STD_PAL_N |
+ V4L2_STD_PAL_Nc |
+ V4L2_STD_NTSC)
/* Standards where MTS/BTSC stereo could be found */
#define V4L2_STD_MTS (V4L2_STD_NTSC_M |
- V4L2_STD_PAL_M |
- V4L2_STD_PAL_N |
- V4L2_STD_PAL_Nc)
+ V4L2_STD_PAL_M |
+ V4L2_STD_PAL_N |
+ V4L2_STD_PAL_Nc)
/* Standards for Countries with 60Hz Line frequency */
#define V4L2_STD_525_60 (V4L2_STD_PAL_M |
- V4L2_STD_PAL_60 |
- V4L2_STD_NTSC |
- V4L2_STD_NTSC_443)
+ V4L2_STD_PAL_60 |
+ V4L2_STD_NTSC |
+ V4L2_STD_NTSC_443)
/* Standards for Countries with 50Hz Line frequency */
#define V4L2_STD_625_50 (V4L2_STD_PAL |
- V4L2_STD_PAL_N |
- V4L2_STD_PAL_Nc |
- V4L2_STD_SECAM)
+ V4L2_STD_PAL_N |
+ V4L2_STD_PAL_Nc |
+ V4L2_STD_SECAM)
#define V4L2_STD_ATSC (V4L2_STD_ATSC_8_VSB |
- V4L2_STD_ATSC_16_VSB)
+ V4L2_STD_ATSC_16_VSB)
/* Macros with none and all analog standards */
#define V4L2_STD_UNKNOWN 0
#define V4L2_STD_ALL (V4L2_STD_525_60 |
- V4L2_STD_625_50)
+ V4L2_STD_625_50)
struct v4l2_standard {
- __u32 index;
- v4l2_std_id id;
- __u8 name[24];
- struct v4l2_fract frameperiod; /* Frames, not fields */
- __u32 framelines;
- __u32 reserved[4];
+ __u32 index;
+ v4l2_std_id id;
+ __u8 name[24];
+ struct v4l2_fract frameperiod; /* Frames, not fields */
+ __u32 framelines;
+ __u32 reserved[4];
};
/*
@@ -1234,23 +1234,23 @@ file: videodev2.h
* The active height of each field is height / 2.
*/
struct v4l2_bt_timings {
- __u32 width;
- __u32 height;
- __u32 interlaced;
- __u32 polarities;
- __u64 pixelclock;
- __u32 hfrontporch;
- __u32 hsync;
- __u32 hbackporch;
- __u32 vfrontporch;
- __u32 vsync;
- __u32 vbackporch;
- __u32 il_vfrontporch;
- __u32 il_vsync;
- __u32 il_vbackporch;
- __u32 standards;
- __u32 flags;
- __u32 reserved[14];
+ __u32 width;
+ __u32 height;
+ __u32 interlaced;
+ __u32 polarities;
+ __u64 pixelclock;
+ __u32 hfrontporch;
+ __u32 hsync;
+ __u32 hbackporch;
+ __u32 vfrontporch;
+ __u32 vsync;
+ __u32 vbackporch;
+ __u32 il_vfrontporch;
+ __u32 il_vsync;
+ __u32 il_vbackporch;
+ __u32 standards;
+ __u32 flags;
+ __u32 reserved[14];
} __attribute__ ((packed));
/* Interlaced or progressive format */
@@ -1299,26 +1299,26 @@ file: videodev2.h
#define V4L2_DV_FL_IS_CE_VIDEO (1 << 4)
/* A few useful defines to calculate the total blanking and frame sizes */
- #define V4L2_DV_BT_BLANKING_WIDTH(bt)
- ((bt)->hfrontporch + (bt)->hsync + (bt)->hbackporch)
- #define V4L2_DV_BT_FRAME_WIDTH(bt)
- ((bt)->width + V4L2_DV_BT_BLANKING_WIDTH(bt))
- #define V4L2_DV_BT_BLANKING_HEIGHT(bt)
- ((bt)->vfrontporch + (bt)->vsync + (bt)->vbackporch + \\
- (bt)->il_vfrontporch + (bt)->il_vsync + (bt)->il_vbackporch)
- #define V4L2_DV_BT_FRAME_HEIGHT(bt)
- ((bt)->height + V4L2_DV_BT_BLANKING_HEIGHT(bt))
+ #define V4L2_DV_BT_BLANKING_WIDTH(bt)
+ ((bt)->hfrontporch + (bt)->hsync + (bt)->hbackporch)
+ #define V4L2_DV_BT_FRAME_WIDTH(bt)
+ ((bt)->width + V4L2_DV_BT_BLANKING_WIDTH(bt))
+ #define V4L2_DV_BT_BLANKING_HEIGHT(bt)
+ ((bt)->vfrontporch + (bt)->vsync + (bt)->vbackporch + \\
+ (bt)->il_vfrontporch + (bt)->il_vsync + (bt)->il_vbackporch)
+ #define V4L2_DV_BT_FRAME_HEIGHT(bt)
+ ((bt)->height + V4L2_DV_BT_BLANKING_HEIGHT(bt))
/** struct v4l2_dv_timings - DV timings
* @type: the type of the timings
* @bt: BT656/1120 timings
*/
struct v4l2_dv_timings {
- __u32 type;
- union {
- struct v4l2_bt_timings bt;
- __u32 reserved[32];
- };
+ __u32 type;
+ union {
+ struct v4l2_bt_timings bt;
+ __u32 reserved[32];
+ };
} __attribute__ ((packed));
/* Values for the type field */
@@ -1333,10 +1333,10 @@ file: videodev2.h
* @timings: the timings for the given index
*/
struct v4l2_enum_dv_timings {
- __u32 index;
- __u32 pad;
- __u32 reserved[2];
- struct v4l2_dv_timings timings;
+ __u32 index;
+ __u32 pad;
+ __u32 reserved[2];
+ struct v4l2_dv_timings timings;
};
/** struct v4l2_bt_timings_cap - BT.656/BT.1120 timing capabilities
@@ -1351,15 +1351,15 @@ file: videodev2.h
* @reserved: Must be zeroed
*/
struct v4l2_bt_timings_cap {
- __u32 min_width;
- __u32 max_width;
- __u32 min_height;
- __u32 max_height;
- __u64 min_pixelclock;
- __u64 max_pixelclock;
- __u32 standards;
- __u32 capabilities;
- __u32 reserved[16];
+ __u32 min_width;
+ __u32 max_width;
+ __u32 min_height;
+ __u32 max_height;
+ __u64 min_pixelclock;
+ __u64 max_pixelclock;
+ __u32 standards;
+ __u32 capabilities;
+ __u32 reserved[16];
} __attribute__ ((packed));
/* Supports interlaced formats */
@@ -1378,13 +1378,13 @@ file: videodev2.h
* @bt: the BT656/1120 timings capabilities
*/
struct v4l2_dv_timings_cap {
- __u32 type;
- __u32 pad;
- __u32 reserved[2];
- union {
- struct v4l2_bt_timings_cap bt;
- __u32 raw_data[32];
- };
+ __u32 type;
+ __u32 pad;
+ __u32 reserved[2];
+ union {
+ struct v4l2_bt_timings_cap bt;
+ __u32 raw_data[32];
+ };
};
@@ -1392,15 +1392,15 @@ file: videodev2.h
* V I D E O I N P U T S
*/
struct v4l2_input {
- __u32 index; /* Which input */
- __u8 name[32]; /* Label */
- __u32 type; /* Type of input */
- __u32 audioset; /* Associated audios (bitfield) */
- __u32 tuner; /* enum v4l2_tuner_type */
- v4l2_std_id std;
- __u32 status;
- __u32 capabilities;
- __u32 reserved[3];
+ __u32 index; /* Which input */
+ __u8 name[32]; /* Label */
+ __u32 type; /* Type of input */
+ __u32 audioset; /* Associated audios (bitfield) */
+ __u32 tuner; /* enum v4l2_tuner_type */
+ v4l2_std_id std;
+ __u32 status;
+ __u32 capabilities;
+ __u32 reserved[3];
};
/* Values for the 'type' field */
@@ -1441,14 +1441,14 @@ file: videodev2.h
* V I D E O O U T P U T S
*/
struct v4l2_output {
- __u32 index; /* Which output */
- __u8 name[32]; /* Label */
- __u32 type; /* Type of output */
- __u32 audioset; /* Associated audios (bitfield) */
- __u32 modulator; /* Associated modulator */
- v4l2_std_id std;
- __u32 capabilities;
- __u32 reserved[3];
+ __u32 index; /* Which output */
+ __u8 name[32]; /* Label */
+ __u32 type; /* Type of output */
+ __u32 audioset; /* Associated audios (bitfield) */
+ __u32 modulator; /* Associated modulator */
+ v4l2_std_id std;
+ __u32 capabilities;
+ __u32 reserved[3];
};
/* Values for the 'type' field */
#define V4L2_OUTPUT_TYPE_MODULATOR 1
@@ -1465,36 +1465,36 @@ file: videodev2.h
* C O N T R O L S
*/
struct v4l2_control {
- __u32 id;
- __s32 value;
+ __u32 id;
+ __s32 value;
};
struct v4l2_ext_control {
- __u32 id;
- __u32 size;
- __u32 reserved2[1];
- union {
- __s32 value;
- __s64 value64;
- char __user *string;
- __u8 __user *p_u8;
- __u16 __user *p_u16;
- __u32 __user *p_u32;
- void __user *ptr;
- };
+ __u32 id;
+ __u32 size;
+ __u32 reserved2[1];
+ union {
+ __s32 value;
+ __s64 value64;
+ char __user *string;
+ __u8 __user *p_u8;
+ __u16 __user *p_u16;
+ __u32 __user *p_u32;
+ void __user *ptr;
+ };
} __attribute__ ((packed));
struct v4l2_ext_controls {
- union {
+ union {
#ifndef __KERNEL__
- __u32 ctrl_class;
+ __u32 ctrl_class;
#endif
- __u32 which;
- };
- __u32 count;
- __u32 error_idx;
- __u32 reserved[2];
- struct v4l2_ext_control *controls;
+ __u32 which;
+ };
+ __u32 count;
+ __u32 error_idx;
+ __u32 reserved[2];
+ struct v4l2_ext_control *controls;
};
#define V4L2_CTRL_ID_MASK (0x0fffffff)
@@ -1508,62 +1508,62 @@ file: videodev2.h
#define V4L2_CTRL_WHICH_DEF_VAL 0x0f000000
enum v4l2_ctrl_type {
- V4L2_CTRL_TYPE_INTEGER = 1,
- V4L2_CTRL_TYPE_BOOLEAN = 2,
- V4L2_CTRL_TYPE_MENU = 3,
- V4L2_CTRL_TYPE_BUTTON = 4,
- V4L2_CTRL_TYPE_INTEGER64 = 5,
- V4L2_CTRL_TYPE_CTRL_CLASS = 6,
- V4L2_CTRL_TYPE_STRING = 7,
- V4L2_CTRL_TYPE_BITMASK = 8,
- V4L2_CTRL_TYPE_INTEGER_MENU = 9,
-
- /* Compound types are >= 0x0100 */
- V4L2_CTRL_COMPOUND_TYPES = 0x0100,
- V4L2_CTRL_TYPE_U8 = 0x0100,
- V4L2_CTRL_TYPE_U16 = 0x0101,
- V4L2_CTRL_TYPE_U32 = 0x0102,
+ V4L2_CTRL_TYPE_INTEGER = 1,
+ V4L2_CTRL_TYPE_BOOLEAN = 2,
+ V4L2_CTRL_TYPE_MENU = 3,
+ V4L2_CTRL_TYPE_BUTTON = 4,
+ V4L2_CTRL_TYPE_INTEGER64 = 5,
+ V4L2_CTRL_TYPE_CTRL_CLASS = 6,
+ V4L2_CTRL_TYPE_STRING = 7,
+ V4L2_CTRL_TYPE_BITMASK = 8,
+ V4L2_CTRL_TYPE_INTEGER_MENU = 9,
+
+ /* Compound types are >= 0x0100 */
+ V4L2_CTRL_COMPOUND_TYPES = 0x0100,
+ V4L2_CTRL_TYPE_U8 = 0x0100,
+ V4L2_CTRL_TYPE_U16 = 0x0101,
+ V4L2_CTRL_TYPE_U32 = 0x0102,
};
/* Used in the VIDIOC_QUERYCTRL ioctl for querying controls */
struct v4l2_queryctrl {
- __u32 id;
- __u32 type; /* enum v4l2_ctrl_type */
- __u8 name[32]; /* Whatever */
- __s32 minimum; /* Note signedness */
- __s32 maximum;
- __s32 step;
- __s32 default_value;
- __u32 flags;
- __u32 reserved[2];
+ __u32 id;
+ __u32 type; /* enum v4l2_ctrl_type */
+ __u8 name[32]; /* Whatever */
+ __s32 minimum; /* Note signedness */
+ __s32 maximum;
+ __s32 step;
+ __s32 default_value;
+ __u32 flags;
+ __u32 reserved[2];
};
/* Used in the VIDIOC_QUERY_EXT_CTRL ioctl for querying extended controls */
struct v4l2_query_ext_ctrl {
- __u32 id;
- __u32 type;
- char name[32];
- __s64 minimum;
- __s64 maximum;
- __u64 step;
- __s64 default_value;
- __u32 flags;
- __u32 elem_size;
- __u32 elems;
- __u32 nr_of_dims;
- __u32 dims[V4L2_CTRL_MAX_DIMS];
- __u32 reserved[32];
+ __u32 id;
+ __u32 type;
+ char name[32];
+ __s64 minimum;
+ __s64 maximum;
+ __u64 step;
+ __s64 default_value;
+ __u32 flags;
+ __u32 elem_size;
+ __u32 elems;
+ __u32 nr_of_dims;
+ __u32 dims[V4L2_CTRL_MAX_DIMS];
+ __u32 reserved[32];
};
/* Used in the VIDIOC_QUERYMENU ioctl for querying menu items */
struct v4l2_querymenu {
- __u32 id;
- __u32 index;
- union {
- __u8 name[32]; /* Whatever */
- __s64 value;
- };
- __u32 reserved;
+ __u32 id;
+ __u32 index;
+ union {
+ __u8 name[32]; /* Whatever */
+ __s64 value;
+ };
+ __u32 reserved;
} __attribute__ ((packed));
/* Control flags */
@@ -1592,28 +1592,28 @@ file: videodev2.h
* T U N I N G
*/
struct v4l2_tuner {
- __u32 index;
- __u8 name[32];
- __u32 type; /* enum v4l2_tuner_type */
- __u32 capability;
- __u32 rangelow;
- __u32 rangehigh;
- __u32 rxsubchans;
- __u32 audmode;
- __s32 signal;
- __s32 afc;
- __u32 reserved[4];
+ __u32 index;
+ __u8 name[32];
+ __u32 type; /* enum v4l2_tuner_type */
+ __u32 capability;
+ __u32 rangelow;
+ __u32 rangehigh;
+ __u32 rxsubchans;
+ __u32 audmode;
+ __s32 signal;
+ __s32 afc;
+ __u32 reserved[4];
};
struct v4l2_modulator {
- __u32 index;
- __u8 name[32];
- __u32 capability;
- __u32 rangelow;
- __u32 rangehigh;
- __u32 txsubchans;
- __u32 type; /* enum v4l2_tuner_type */
- __u32 reserved[3];
+ __u32 index;
+ __u8 name[32];
+ __u32 capability;
+ __u32 rangelow;
+ __u32 rangehigh;
+ __u32 txsubchans;
+ __u32 type; /* enum v4l2_tuner_type */
+ __u32 reserved[3];
};
/* Flags for the 'capability' field */
@@ -1649,10 +1649,10 @@ file: videodev2.h
#define V4L2_TUNER_MODE_LANG1_LANG2 0x0004
struct v4l2_frequency {
- __u32 tuner;
- __u32 type; /* enum v4l2_tuner_type */
- __u32 frequency;
- __u32 reserved[8];
+ __u32 tuner;
+ __u32 type; /* enum v4l2_tuner_type */
+ __u32 frequency;
+ __u32 reserved[8];
};
#define V4L2_BAND_MODULATION_VSB (1 << 1)
@@ -1660,25 +1660,25 @@ file: videodev2.h
#define V4L2_BAND_MODULATION_AM (1 << 3)
struct v4l2_frequency_band {
- __u32 tuner;
- __u32 type; /* enum v4l2_tuner_type */
- __u32 index;
- __u32 capability;
- __u32 rangelow;
- __u32 rangehigh;
- __u32 modulation;
- __u32 reserved[9];
+ __u32 tuner;
+ __u32 type; /* enum v4l2_tuner_type */
+ __u32 index;
+ __u32 capability;
+ __u32 rangelow;
+ __u32 rangehigh;
+ __u32 modulation;
+ __u32 reserved[9];
};
struct v4l2_hw_freq_seek {
- __u32 tuner;
- __u32 type; /* enum v4l2_tuner_type */
- __u32 seek_upward;
- __u32 wrap_around;
- __u32 spacing;
- __u32 rangelow;
- __u32 rangehigh;
- __u32 reserved[5];
+ __u32 tuner;
+ __u32 type; /* enum v4l2_tuner_type */
+ __u32 seek_upward;
+ __u32 wrap_around;
+ __u32 spacing;
+ __u32 rangelow;
+ __u32 rangehigh;
+ __u32 reserved[5];
};
/*
@@ -1686,9 +1686,9 @@ file: videodev2.h
*/
struct v4l2_rds_data {
- __u8 lsb;
- __u8 msb;
- __u8 block;
+ __u8 lsb;
+ __u8 msb;
+ __u8 block;
} __attribute__ ((packed));
#define V4L2_RDS_BLOCK_MSK 0x7
@@ -1706,11 +1706,11 @@ file: videodev2.h
* A U D I O
*/
struct v4l2_audio {
- __u32 index;
- __u8 name[32];
- __u32 capability;
- __u32 mode;
- __u32 reserved[2];
+ __u32 index;
+ __u8 name[32];
+ __u32 capability;
+ __u32 mode;
+ __u32 reserved[2];
};
/* Flags for the 'capability' field */
@@ -1721,11 +1721,11 @@ file: videodev2.h
#define V4L2_AUDMODE_AVL 0x00001
struct v4l2_audioout {
- __u32 index;
- __u8 name[32];
- __u32 capability;
- __u32 mode;
- __u32 reserved[2];
+ __u32 index;
+ __u8 name[32];
+ __u32 capability;
+ __u32 mode;
+ __u32 reserved[2];
};
/*
@@ -1738,19 +1738,19 @@ file: videodev2.h
#define V4L2_ENC_IDX_FRAME_MASK (0xf)
struct v4l2_enc_idx_entry {
- __u64 offset;
- __u64 pts;
- __u32 length;
- __u32 flags;
- __u32 reserved[2];
+ __u64 offset;
+ __u64 pts;
+ __u32 length;
+ __u32 flags;
+ __u32 reserved[2];
};
#define V4L2_ENC_IDX_ENTRIES (64)
struct v4l2_enc_idx {
- __u32 entries;
- __u32 entries_cap;
- __u32 reserved[4];
- struct v4l2_enc_idx_entry entry[V4L2_ENC_IDX_ENTRIES];
+ __u32 entries;
+ __u32 entries_cap;
+ __u32 reserved[4];
+ struct v4l2_enc_idx_entry entry[V4L2_ENC_IDX_ENTRIES];
};
@@ -1763,13 +1763,13 @@ file: videodev2.h
#define V4L2_ENC_CMD_STOP_AT_GOP_END (1 << 0)
struct v4l2_encoder_cmd {
- __u32 cmd;
- __u32 flags;
- union {
- struct {
- __u32 data[8];
- } raw;
- };
+ __u32 cmd;
+ __u32 flags;
+ union {
+ struct {
+ __u32 data[8];
+ } raw;
+ };
};
/* Decoder commands */
@@ -1798,27 +1798,27 @@ file: videodev2.h
/* The structure must be zeroed before use by the application
This ensures it can be extended safely in the future. */
struct v4l2_decoder_cmd {
- __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;
- } start;
-
- 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;
+ } start;
+
+ struct {
+ __u32 data[16];
+ } raw;
+ };
};
#endif
@@ -1831,14 +1831,14 @@ file: videodev2.h
/* Raw VBI */
struct v4l2_vbi_format {
- __u32 sampling_rate; /* in 1 Hz */
- __u32 offset;
- __u32 samples_per_line;
- __u32 sample_format; /* V4L2_PIX_FMT_* */
- __s32 start[2];
- __u32 count[2];
- __u32 flags; /* V4L2_VBI_* */
- __u32 reserved[2]; /* must be zero */
+ __u32 sampling_rate; /* in 1 Hz */
+ __u32 offset;
+ __u32 samples_per_line;
+ __u32 sample_format; /* V4L2_PIX_FMT_* */
+ __s32 start[2];
+ __u32 count[2];
+ __u32 flags; /* V4L2_VBI_* */
+ __u32 reserved[2]; /* must be zero */
};
/* VBI flags */
@@ -1859,14 +1859,14 @@ file: videodev2.h
*/
struct v4l2_sliced_vbi_format {
- __u16 service_set;
- /* service_lines[0][...] specifies lines 0-23 (1-23 used) of the first field
- service_lines[1][...] specifies lines 0-23 (1-23 used) of the second field
- (equals frame lines 313-336 for 625 line video
- standards, 263-286 for 525 line standards) */
- __u16 service_lines[2][24];
- __u32 io_size;
- __u32 reserved[2]; /* must be zero */
+ __u16 service_set;
+ /* service_lines[0][...] specifies lines 0-23 (1-23 used) of the first field
+ service_lines[1][...] specifies lines 0-23 (1-23 used) of the second field
+ (equals frame lines 313-336 for 625 line video
+ standards, 263-286 for 525 line standards) */
+ __u16 service_lines[2][24];
+ __u32 io_size;
+ __u32 reserved[2]; /* must be zero */
};
/* Teletext World System Teletext
@@ -1883,22 +1883,22 @@ file: videodev2.h
#define V4L2_SLICED_VBI_625 (V4L2_SLICED_TELETEXT_B | V4L2_SLICED_VPS | V4L2_SLICED_WSS_625)
struct v4l2_sliced_vbi_cap {
- __u16 service_set;
- /* service_lines[0][...] specifies lines 0-23 (1-23 used) of the first field
- service_lines[1][...] specifies lines 0-23 (1-23 used) of the second field
- (equals frame lines 313-336 for 625 line video
- standards, 263-286 for 525 line standards) */
- __u16 service_lines[2][24];
- __u32 type; /* enum v4l2_buf_type */
- __u32 reserved[3]; /* must be 0 */
+ __u16 service_set;
+ /* service_lines[0][...] specifies lines 0-23 (1-23 used) of the first field
+ service_lines[1][...] specifies lines 0-23 (1-23 used) of the second field
+ (equals frame lines 313-336 for 625 line video
+ standards, 263-286 for 525 line standards) */
+ __u16 service_lines[2][24];
+ __u32 type; /* enum v4l2_buf_type */
+ __u32 reserved[3]; /* must be 0 */
};
struct v4l2_sliced_vbi_data {
- __u32 id;
- __u32 field; /* 0: first field, 1: second field */
- __u32 line; /* 1-23 */
- __u32 reserved; /* must be 0 */
- __u8 data[48];
+ __u32 id;
+ __u32 field; /* 0: first field, 1: second field */
+ __u32 line; /* 1-23 */
+ __u32 reserved; /* must be 0 */
+ __u8 data[48];
};
/*
@@ -1924,28 +1924,28 @@ file: videodev2.h
#define V4L2_MPEG_VBI_IVTV_VPS (7)
struct v4l2_mpeg_vbi_itv0_line {
- __u8 id; /* One of V4L2_MPEG_VBI_IVTV_* above */
- __u8 data[42]; /* Sliced VBI data for the line */
+ __u8 id; /* One of V4L2_MPEG_VBI_IVTV_* above */
+ __u8 data[42]; /* Sliced VBI data for the line */
} __attribute__ ((packed));
struct v4l2_mpeg_vbi_itv0 {
- __le32 linemask[2]; /* Bitmasks of VBI service lines present */
- struct v4l2_mpeg_vbi_itv0_line line[35];
+ __le32 linemask[2]; /* Bitmasks of VBI service lines present */
+ struct v4l2_mpeg_vbi_itv0_line line[35];
} __attribute__ ((packed));
struct v4l2_mpeg_vbi_ITV0 {
- struct v4l2_mpeg_vbi_itv0_line line[36];
+ struct v4l2_mpeg_vbi_itv0_line line[36];
} __attribute__ ((packed));
#define V4L2_MPEG_VBI_IVTV_MAGIC0 "itv0"
#define V4L2_MPEG_VBI_IVTV_MAGIC1 "ITV0"
struct v4l2_mpeg_vbi_fmt_ivtv {
- __u8 magic[4];
- union {
- struct v4l2_mpeg_vbi_itv0 itv0;
- struct v4l2_mpeg_vbi_ITV0 ITV0;
- };
+ __u8 magic[4];
+ union {
+ struct v4l2_mpeg_vbi_itv0 itv0;
+ struct v4l2_mpeg_vbi_ITV0 ITV0;
+ };
} __attribute__ ((packed));
/*
@@ -1960,9 +1960,9 @@ file: videodev2.h
* adjacent lines
*/
struct v4l2_plane_pix_format {
- __u32 sizeimage;
- __u32 bytesperline;
- __u16 reserved[6];
+ __u32 sizeimage;
+ __u32 bytesperline;
+ __u16 reserved[6];
} __attribute__ ((packed));
/**
@@ -1980,19 +1980,19 @@ file: videodev2.h
* @xfer_func: enum v4l2_xfer_func, colorspace transfer function
*/
struct v4l2_pix_format_mplane {
- __u32 width;
- __u32 height;
- __u32 pixelformat;
- __u32 field;
- __u32 colorspace;
-
- struct v4l2_plane_pix_format plane_fmt[VIDEO_MAX_PLANES];
- __u8 num_planes;
- __u8 flags;
- __u8 ycbcr_enc;
- __u8 quantization;
- __u8 xfer_func;
- __u8 reserved[7];
+ __u32 width;
+ __u32 height;
+ __u32 pixelformat;
+ __u32 field;
+ __u32 colorspace;
+
+ struct v4l2_plane_pix_format plane_fmt[VIDEO_MAX_PLANES];
+ __u8 num_planes;
+ __u8 flags;
+ __u8 ycbcr_enc;
+ __u8 quantization;
+ __u8 xfer_func;
+ __u8 reserved[7];
} __attribute__ ((packed));
/**
@@ -2001,9 +2001,9 @@ file: videodev2.h
* @buffersize: maximum size in bytes required for data
*/
struct v4l2_sdr_format {
- __u32 pixelformat;
- __u32 buffersize;
- __u8 reserved[24];
+ __u32 pixelformat;
+ __u32 buffersize;
+ __u8 reserved[24];
} __attribute__ ((packed));
/**
@@ -2017,27 +2017,27 @@ file: videodev2.h
* @raw_data: placeholder for future extensions and custom formats
*/
struct v4l2_format {
- __u32 type;
- union {
- struct v4l2_pix_format pix; /* V4L2_BUF_TYPE_VIDEO_CAPTURE */
- struct v4l2_pix_format_mplane pix_mp; /* V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE */
- struct v4l2_window win; /* V4L2_BUF_TYPE_VIDEO_OVERLAY */
- struct v4l2_vbi_format vbi; /* V4L2_BUF_TYPE_VBI_CAPTURE */
- struct v4l2_sliced_vbi_format sliced; /* V4L2_BUF_TYPE_SLICED_VBI_CAPTURE */
- struct v4l2_sdr_format sdr; /* V4L2_BUF_TYPE_SDR_CAPTURE */
- __u8 raw_data[200]; /* user-defined */
- } fmt;
+ __u32 type;
+ union {
+ struct v4l2_pix_format pix; /* V4L2_BUF_TYPE_VIDEO_CAPTURE */
+ struct v4l2_pix_format_mplane pix_mp; /* V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE */
+ struct v4l2_window win; /* V4L2_BUF_TYPE_VIDEO_OVERLAY */
+ struct v4l2_vbi_format vbi; /* V4L2_BUF_TYPE_VBI_CAPTURE */
+ struct v4l2_sliced_vbi_format sliced; /* V4L2_BUF_TYPE_SLICED_VBI_CAPTURE */
+ struct v4l2_sdr_format sdr; /* V4L2_BUF_TYPE_SDR_CAPTURE */
+ __u8 raw_data[200]; /* user-defined */
+ } fmt;
};
/* Stream type-dependent parameters
*/
struct v4l2_streamparm {
- __u32 type; /* enum v4l2_buf_type */
- union {
- struct v4l2_captureparm capture;
- struct v4l2_outputparm output;
- __u8 raw_data[200]; /* user-defined */
- } parm;
+ __u32 type; /* enum v4l2_buf_type */
+ union {
+ struct v4l2_captureparm capture;
+ struct v4l2_outputparm output;
+ __u8 raw_data[200]; /* user-defined */
+ } parm;
};
/*
@@ -2055,8 +2055,8 @@ file: videodev2.h
/* Payload for V4L2_EVENT_VSYNC */
struct v4l2_event_vsync {
- /* Can be V4L2_FIELD_ANY, _NONE, _TOP or _BOTTOM */
- __u8 field;
+ /* Can be V4L2_FIELD_ANY, _NONE, _TOP or _BOTTOM */
+ __u8 field;
} __attribute__ ((packed));
/* Payload for V4L2_EVENT_CTRL */
@@ -2065,27 +2065,27 @@ file: videodev2.h
#define V4L2_EVENT_CTRL_CH_RANGE (1 << 2)
struct v4l2_event_ctrl {
- __u32 changes;
- __u32 type;
- union {
- __s32 value;
- __s64 value64;
- };
- __u32 flags;
- __s32 minimum;
- __s32 maximum;
- __s32 step;
- __s32 default_value;
+ __u32 changes;
+ __u32 type;
+ union {
+ __s32 value;
+ __s64 value64;
+ };
+ __u32 flags;
+ __s32 minimum;
+ __s32 maximum;
+ __s32 step;
+ __s32 default_value;
};
struct v4l2_event_frame_sync {
- __u32 frame_sequence;
+ __u32 frame_sequence;
};
#define V4L2_EVENT_SRC_CH_RESOLUTION (1 << 0)
struct v4l2_event_src_change {
- __u32 changes;
+ __u32 changes;
};
#define V4L2_EVENT_MD_FL_HAVE_FRAME_SEQ (1 << 0)
@@ -2098,36 +2098,36 @@ file: videodev2.h
* @region_mask: which regions detected motion.
*/
struct v4l2_event_motion_det {
- __u32 flags;
- __u32 frame_sequence;
- __u32 region_mask;
+ __u32 flags;
+ __u32 frame_sequence;
+ __u32 region_mask;
};
struct v4l2_event {
- __u32 type;
- union {
- struct v4l2_event_vsync vsync;
- struct v4l2_event_ctrl ctrl;
- struct v4l2_event_frame_sync frame_sync;
- struct v4l2_event_src_change src_change;
- struct v4l2_event_motion_det motion_det;
- __u8 data[64];
- } u;
- __u32 pending;
- __u32 sequence;
- struct timespec timestamp;
- __u32 id;
- __u32 reserved[8];
+ __u32 type;
+ union {
+ struct v4l2_event_vsync vsync;
+ struct v4l2_event_ctrl ctrl;
+ struct v4l2_event_frame_sync frame_sync;
+ struct v4l2_event_src_change src_change;
+ struct v4l2_event_motion_det motion_det;
+ __u8 data[64];
+ } u;
+ __u32 pending;
+ __u32 sequence;
+ struct timespec timestamp;
+ __u32 id;
+ __u32 reserved[8];
};
#define V4L2_EVENT_SUB_FL_SEND_INITIAL (1 << 0)
#define V4L2_EVENT_SUB_FL_ALLOW_FEEDBACK (1 << 1)
struct v4l2_event_subscription {
- __u32 type;
- __u32 id;
- __u32 flags;
- __u32 reserved[5];
+ __u32 type;
+ __u32 id;
+ __u32 flags;
+ __u32 reserved[5];
};
/*
@@ -2149,18 +2149,18 @@ file: videodev2.h
#define V4L2_CHIP_MATCH_AC97 3 /* Match against ancillary AC97 chip */
struct v4l2_dbg_match {
- __u32 type; /* Match type */
- union { /* Match this chip, meaning determined by type */
- __u32 addr;
- char name[32];
- };
+ __u32 type; /* Match type */
+ union { /* Match this chip, meaning determined by type */
+ __u32 addr;
+ char name[32];
+ };
} __attribute__ ((packed));
struct v4l2_dbg_register {
- struct v4l2_dbg_match match;
- __u32 size; /* register size in bytes */
- __u64 reg;
- __u64 val;
+ struct v4l2_dbg_match match;
+ __u32 size; /* register size in bytes */
+ __u64 reg;
+ __u64 val;
} __attribute__ ((packed));
#define V4L2_CHIP_FL_READABLE (1 << 0)
@@ -2168,10 +2168,10 @@ file: videodev2.h
/* VIDIOC_DBG_G_CHIP_INFO */
struct v4l2_dbg_chip_info {
- struct v4l2_dbg_match match;
- char name[32];
- __u32 flags;
- __u32 reserved[32];
+ struct v4l2_dbg_match match;
+ char name[32];
+ __u32 flags;
+ __u32 reserved[32];
} __attribute__ ((packed));
/**
@@ -2184,11 +2184,11 @@ file: videodev2.h
* @reserved: future extensions
*/
struct v4l2_create_buffers {
- __u32 index;
- __u32 count;
- __u32 memory;
- struct v4l2_format format;
- __u32 reserved[8];
+ __u32 index;
+ __u32 count;
+ __u32 memory;
+ struct v4l2_format format;
+ __u32 reserved[8];
};
/*