aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@s-opensource.com>2016-07-17 21:07:30 -0400
committerMauro Carvalho Chehab <mchehab@s-opensource.com>2016-07-17 21:51:27 -0400
commitcff4c8acf229a53a4c959c9c7b74d1644ad3ab4c (patch)
tree2a6a3a7febe628a8cf466f0c84a4a94bc10e0306
parent7200e689670ce6fa5c0f22db843e82cfcc6b6d2e (diff)
[media] doc-rst: add vivid documentation
Convert it to ReST and add to media/v4l-drivers book. As the sections here (and on other docs) are numbered, let's also make this book auto-numbered. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
-rw-r--r--Documentation/media/v4l-drivers/index.rst2
-rw-r--r--Documentation/media/v4l-drivers/vivid.rst667
2 files changed, 415 insertions, 254 deletions
diff --git a/Documentation/media/v4l-drivers/index.rst b/Documentation/media/v4l-drivers/index.rst
index 4431b089af49..d660623eeea6 100644
--- a/Documentation/media/v4l-drivers/index.rst
+++ b/Documentation/media/v4l-drivers/index.rst
@@ -17,6 +17,7 @@ License".
17 17
18.. toctree:: 18.. toctree::
19 :maxdepth: 5 19 :maxdepth: 5
20 :numbered:
20 21
21 fourcc 22 fourcc
22 cardlist 23 cardlist
@@ -40,5 +41,6 @@ License".
40 si476x 41 si476x
41 soc-camera 42 soc-camera
42 uvcvideo 43 uvcvideo
44 vivid
43 zoran 45 zoran
44 zr364xx 46 zr364xx
diff --git a/Documentation/media/v4l-drivers/vivid.rst b/Documentation/media/v4l-drivers/vivid.rst
index 1b26519c6ddc..c8cf371e8bb9 100644
--- a/Documentation/media/v4l-drivers/vivid.rst
+++ b/Documentation/media/v4l-drivers/vivid.rst
@@ -1,5 +1,5 @@
1vivid: Virtual Video Test Driver 1The Virtual Video Test Driver (vivid)
2================================ 2=====================================
3 3
4This driver emulates video4linux hardware of various types: video capture, video 4This driver emulates video4linux hardware of various types: video capture, video
5output, vbi capture and output, radio receivers and transmitters and a software 5output, vbi capture and output, radio receivers and transmitters and a software
@@ -37,49 +37,8 @@ This document describes the features implemented by this driver:
37 37
38These features will be described in more detail below. 38These features will be described in more detail below.
39 39
40 40Configuring the driver
41Table of Contents 41----------------------
42-----------------
43
44Section 1: Configuring the driver
45Section 2: Video Capture
46Section 2.1: Webcam Input
47Section 2.2: TV and S-Video Inputs
48Section 2.3: HDMI Input
49Section 3: Video Output
50Section 3.1: S-Video Output
51Section 3.2: HDMI Output
52Section 4: VBI Capture
53Section 5: VBI Output
54Section 6: Radio Receiver
55Section 7: Radio Transmitter
56Section 8: Software Defined Radio Receiver
57Section 9: Controls
58Section 9.1: User Controls - Test Controls
59Section 9.2: User Controls - Video Capture
60Section 9.3: User Controls - Audio
61Section 9.4: Vivid Controls
62Section 9.4.1: Test Pattern Controls
63Section 9.4.2: Capture Feature Selection Controls
64Section 9.4.3: Output Feature Selection Controls
65Section 9.4.4: Error Injection Controls
66Section 9.4.5: VBI Raw Capture Controls
67Section 9.5: Digital Video Controls
68Section 9.6: FM Radio Receiver Controls
69Section 9.7: FM Radio Modulator
70Section 10: Video, VBI and RDS Looping
71Section 10.1: Video and Sliced VBI looping
72Section 10.2: Radio & RDS Looping
73Section 11: Cropping, Composing, Scaling
74Section 12: Formats
75Section 13: Capture Overlay
76Section 14: Output Overlay
77Section 15: CEC (Consumer Electronics Control)
78Section 16: Some Future Improvements
79
80
81Section 1: Configuring the driver
82---------------------------------
83 42
84By default the driver will create a single instance that has a video capture 43By default the driver will create a single instance that has a video capture
85device with webcam, TV, S-Video and HDMI inputs, a video output device with 44device with webcam, TV, S-Video and HDMI inputs, a video output device with
@@ -89,71 +48,94 @@ radio receiver device, one radio transmitter device and one SDR device.
89The number of instances, devices, video inputs and outputs and their types are 48The number of instances, devices, video inputs and outputs and their types are
90all configurable using the following module options: 49all configurable using the following module options:
91 50
92n_devs: number of driver instances to create. By default set to 1. Up to 64 51- n_devs:
52
53 number of driver instances to create. By default set to 1. Up to 64
93 instances can be created. 54 instances can be created.
94 55
95node_types: which devices should each driver instance create. An array of 56- node_types:
57
58 which devices should each driver instance create. An array of
96 hexadecimal values, one for each instance. The default is 0x1d3d. 59 hexadecimal values, one for each instance. The default is 0x1d3d.
97 Each value is a bitmask with the following meaning: 60 Each value is a bitmask with the following meaning:
98 bit 0: Video Capture node 61
99 bit 2-3: VBI Capture node: 0 = none, 1 = raw vbi, 2 = sliced vbi, 3 = both 62 - bit 0: Video Capture node
100 bit 4: Radio Receiver node 63 - bit 2-3: VBI Capture node: 0 = none, 1 = raw vbi, 2 = sliced vbi, 3 = both
101 bit 5: Software Defined Radio Receiver node 64 - bit 4: Radio Receiver node
102 bit 8: Video Output node 65 - bit 5: Software Defined Radio Receiver node
103 bit 10-11: VBI Output node: 0 = none, 1 = raw vbi, 2 = sliced vbi, 3 = both 66 - bit 8: Video Output node
104 bit 12: Radio Transmitter node 67 - bit 10-11: VBI Output node: 0 = none, 1 = raw vbi, 2 = sliced vbi, 3 = both
105 bit 16: Framebuffer for testing overlays 68 - bit 12: Radio Transmitter node
69 - bit 16: Framebuffer for testing overlays
106 70
107 So to create four instances, the first two with just one video capture 71 So to create four instances, the first two with just one video capture
108 device, the second two with just one video output device you would pass 72 device, the second two with just one video output device you would pass
109 these module options to vivid: 73 these module options to vivid:
110 74
75 .. code-block:: none
76
111 n_devs=4 node_types=0x1,0x1,0x100,0x100 77 n_devs=4 node_types=0x1,0x1,0x100,0x100
112 78
113num_inputs: the number of inputs, one for each instance. By default 4 inputs 79- num_inputs:
80
81 the number of inputs, one for each instance. By default 4 inputs
114 are created for each video capture device. At most 16 inputs can be created, 82 are created for each video capture device. At most 16 inputs can be created,
115 and there must be at least one. 83 and there must be at least one.
116 84
117input_types: the input types for each instance, the default is 0xe4. This defines 85- input_types:
86
87 the input types for each instance, the default is 0xe4. This defines
118 what the type of each input is when the inputs are created for each driver 88 what the type of each input is when the inputs are created for each driver
119 instance. This is a hexadecimal value with up to 16 pairs of bits, each 89 instance. This is a hexadecimal value with up to 16 pairs of bits, each
120 pair gives the type and bits 0-1 map to input 0, bits 2-3 map to input 1, 90 pair gives the type and bits 0-1 map to input 0, bits 2-3 map to input 1,
121 30-31 map to input 15. Each pair of bits has the following meaning: 91 30-31 map to input 15. Each pair of bits has the following meaning:
122 92
123 00: this is a webcam input 93 - 00: this is a webcam input
124 01: this is a TV tuner input 94 - 01: this is a TV tuner input
125 10: this is an S-Video input 95 - 10: this is an S-Video input
126 11: this is an HDMI input 96 - 11: this is an HDMI input
127 97
128 So to create a video capture device with 8 inputs where input 0 is a TV 98 So to create a video capture device with 8 inputs where input 0 is a TV
129 tuner, inputs 1-3 are S-Video inputs and inputs 4-7 are HDMI inputs you 99 tuner, inputs 1-3 are S-Video inputs and inputs 4-7 are HDMI inputs you
130 would use the following module options: 100 would use the following module options:
131 101
102 .. code-block:: none
103
132 num_inputs=8 input_types=0xffa9 104 num_inputs=8 input_types=0xffa9
133 105
134num_outputs: the number of outputs, one for each instance. By default 2 outputs 106- num_outputs:
107
108 the number of outputs, one for each instance. By default 2 outputs
135 are created for each video output device. At most 16 outputs can be 109 are created for each video output device. At most 16 outputs can be
136 created, and there must be at least one. 110 created, and there must be at least one.
137 111
138output_types: the output types for each instance, the default is 0x02. This defines 112- output_types:
113
114 the output types for each instance, the default is 0x02. This defines
139 what the type of each output is when the outputs are created for each 115 what the type of each output is when the outputs are created for each
140 driver instance. This is a hexadecimal value with up to 16 bits, each bit 116 driver instance. This is a hexadecimal value with up to 16 bits, each bit
141 gives the type and bit 0 maps to output 0, bit 1 maps to output 1, bit 117 gives the type and bit 0 maps to output 0, bit 1 maps to output 1, bit
142 15 maps to output 15. The meaning of each bit is as follows: 118 15 maps to output 15. The meaning of each bit is as follows:
143 119
144 0: this is an S-Video output 120 - 0: this is an S-Video output
145 1: this is an HDMI output 121 - 1: this is an HDMI output
146 122
147 So to create a video output device with 8 outputs where outputs 0-3 are 123 So to create a video output device with 8 outputs where outputs 0-3 are
148 S-Video outputs and outputs 4-7 are HDMI outputs you would use the 124 S-Video outputs and outputs 4-7 are HDMI outputs you would use the
149 following module options: 125 following module options:
150 126
127 .. code-block:: none
128
151 num_outputs=8 output_types=0xf0 129 num_outputs=8 output_types=0xf0
152 130
153vid_cap_nr: give the desired videoX start number for each video capture device. 131- vid_cap_nr:
132
133 give the desired videoX start number for each video capture device.
154 The default is -1 which will just take the first free number. This allows 134 The default is -1 which will just take the first free number. This allows
155 you to map capture video nodes to specific videoX device nodes. Example: 135 you to map capture video nodes to specific videoX device nodes. Example:
156 136
137 .. code-block:: none
138
157 n_devs=4 vid_cap_nr=2,4,6,8 139 n_devs=4 vid_cap_nr=2,4,6,8
158 140
159 This will attempt to assign /dev/video2 for the video capture device of 141 This will attempt to assign /dev/video2 for the video capture device of
@@ -161,25 +143,39 @@ vid_cap_nr: give the desired videoX start number for each video capture device.
161 instance. If it can't succeed, then it will just take the next free 143 instance. If it can't succeed, then it will just take the next free
162 number. 144 number.
163 145
164vid_out_nr: give the desired videoX start number for each video output device. 146- vid_out_nr:
165 The default is -1 which will just take the first free number. 147
148 give the desired videoX start number for each video output device.
149 The default is -1 which will just take the first free number.
150
151- vbi_cap_nr:
166 152
167vbi_cap_nr: give the desired vbiX start number for each vbi capture device. 153 give the desired vbiX start number for each vbi capture device.
168 The default is -1 which will just take the first free number. 154 The default is -1 which will just take the first free number.
169 155
170vbi_out_nr: give the desired vbiX start number for each vbi output device. 156- vbi_out_nr:
171 The default is -1 which will just take the first free number.
172 157
173radio_rx_nr: give the desired radioX start number for each radio receiver device. 158 give the desired vbiX start number for each vbi output device.
174 The default is -1 which will just take the first free number. 159 The default is -1 which will just take the first free number.
175 160
176radio_tx_nr: give the desired radioX start number for each radio transmitter 161- radio_rx_nr:
162
163 give the desired radioX start number for each radio receiver device.
164 The default is -1 which will just take the first free number.
165
166- radio_tx_nr:
167
168 give the desired radioX start number for each radio transmitter
177 device. The default is -1 which will just take the first free number. 169 device. The default is -1 which will just take the first free number.
178 170
179sdr_cap_nr: give the desired swradioX start number for each SDR capture device. 171- sdr_cap_nr:
180 The default is -1 which will just take the first free number. 172
173 give the desired swradioX start number for each SDR capture device.
174 The default is -1 which will just take the first free number.
175
176- ccs_cap_mode:
181 177
182ccs_cap_mode: specify the allowed video capture crop/compose/scaling combination 178 specify the allowed video capture crop/compose/scaling combination
183 for each driver instance. Video capture devices can have any combination 179 for each driver instance. Video capture devices can have any combination
184 of cropping, composing and scaling capabilities and this will tell the 180 of cropping, composing and scaling capabilities and this will tell the
185 vivid driver which of those is should emulate. By default the user can 181 vivid driver which of those is should emulate. By default the user can
@@ -188,21 +184,30 @@ ccs_cap_mode: specify the allowed video capture crop/compose/scaling combination
188 The value is either -1 (controlled by the user) or a set of three bits, 184 The value is either -1 (controlled by the user) or a set of three bits,
189 each enabling (1) or disabling (0) one of the features: 185 each enabling (1) or disabling (0) one of the features:
190 186
191 bit 0: Enable crop support. Cropping will take only part of the 187 - bit 0:
192 incoming picture. 188
193 bit 1: Enable compose support. Composing will copy the incoming 189 Enable crop support. Cropping will take only part of the
194 picture into a larger buffer. 190 incoming picture.
195 bit 2: Enable scaling support. Scaling can scale the incoming 191 - bit 1:
196 picture. The scaler of the vivid driver can enlarge up 192
197 or down to four times the original size. The scaler is 193 Enable compose support. Composing will copy the incoming
198 very simple and low-quality. Simplicity and speed were 194 picture into a larger buffer.
199 key, not quality. 195
196 - bit 2:
197
198 Enable scaling support. Scaling can scale the incoming
199 picture. The scaler of the vivid driver can enlarge up
200 or down to four times the original size. The scaler is
201 very simple and low-quality. Simplicity and speed were
202 key, not quality.
200 203
201 Note that this value is ignored by webcam inputs: those enumerate 204 Note that this value is ignored by webcam inputs: those enumerate
202 discrete framesizes and that is incompatible with cropping, composing 205 discrete framesizes and that is incompatible with cropping, composing
203 or scaling. 206 or scaling.
204 207
205ccs_out_mode: specify the allowed video output crop/compose/scaling combination 208- ccs_out_mode:
209
210 specify the allowed video output crop/compose/scaling combination
206 for each driver instance. Video output devices can have any combination 211 for each driver instance. Video output devices can have any combination
207 of cropping, composing and scaling capabilities and this will tell the 212 of cropping, composing and scaling capabilities and this will tell the
208 vivid driver which of those is should emulate. By default the user can 213 vivid driver which of those is should emulate. By default the user can
@@ -211,28 +216,42 @@ ccs_out_mode: specify the allowed video output crop/compose/scaling combination
211 The value is either -1 (controlled by the user) or a set of three bits, 216 The value is either -1 (controlled by the user) or a set of three bits,
212 each enabling (1) or disabling (0) one of the features: 217 each enabling (1) or disabling (0) one of the features:
213 218
214 bit 0: Enable crop support. Cropping will take only part of the 219 - bit 0:
215 outgoing buffer. 220
216 bit 1: Enable compose support. Composing will copy the incoming 221 Enable crop support. Cropping will take only part of the
217 buffer into a larger picture frame. 222 outgoing buffer.
218 bit 2: Enable scaling support. Scaling can scale the incoming 223
219 buffer. The scaler of the vivid driver can enlarge up 224 - bit 1:
220 or down to four times the original size. The scaler is 225
221 very simple and low-quality. Simplicity and speed were 226 Enable compose support. Composing will copy the incoming
222 key, not quality. 227 buffer into a larger picture frame.
223 228
224multiplanar: select whether each device instance supports multi-planar formats, 229 - bit 2:
230
231 Enable scaling support. Scaling can scale the incoming
232 buffer. The scaler of the vivid driver can enlarge up
233 or down to four times the original size. The scaler is
234 very simple and low-quality. Simplicity and speed were
235 key, not quality.
236
237- multiplanar:
238
239 select whether each device instance supports multi-planar formats,
225 and thus the V4L2 multi-planar API. By default device instances are 240 and thus the V4L2 multi-planar API. By default device instances are
226 single-planar. 241 single-planar.
227 242
228 This module option can override that for each instance. Values are: 243 This module option can override that for each instance. Values are:
229 244
230 1: this is a single-planar instance. 245 - 1: this is a single-planar instance.
231 2: this is a multi-planar instance. 246 - 2: this is a multi-planar instance.
232 247
233vivid_debug: enable driver debugging info 248- vivid_debug:
234 249
235no_error_inj: if set disable the error injecting controls. This option is 250 enable driver debugging info
251
252- no_error_inj:
253
254 if set disable the error injecting controls. This option is
236 needed in order to run a tool like v4l2-compliance. Tools like that 255 needed in order to run a tool like v4l2-compliance. Tools like that
237 exercise all controls including a control like 'Disconnect' which 256 exercise all controls including a control like 'Disconnect' which
238 emulates a USB disconnect, making the device inaccessible and so 257 emulates a USB disconnect, making the device inaccessible and so
@@ -250,8 +269,8 @@ It is also very suitable to emulate hardware that is not yet available, e.g.
250when developing software for a new upcoming device. 269when developing software for a new upcoming device.
251 270
252 271
253Section 2: Video Capture 272Video Capture
254------------------------ 273-------------
255 274
256This is probably the most frequently used feature. The video capture device 275This is probably the most frequently used feature. The video capture device
257can be configured by using the module options num_inputs, input_types and 276can be configured by using the module options num_inputs, input_types and
@@ -270,8 +289,8 @@ frame/field sequence counting will keep track of that so the sequence
270count will skip whenever frames are dropped. 289count will skip whenever frames are dropped.
271 290
272 291
273Section 2.1: Webcam Input 292Webcam Input
274------------------------- 293~~~~~~~~~~~~
275 294
276The webcam input supports three framesizes: 320x180, 640x360 and 1280x720. It 295The webcam input supports three framesizes: 320x180, 640x360 and 1280x720. It
277supports frames per second settings of 10, 15, 25, 30, 50 and 60 fps. Which ones 296supports frames per second settings of 10, 15, 25, 30, 50 and 60 fps. Which ones
@@ -282,8 +301,8 @@ The initially selected colorspace when you switch to the webcam input will be
282sRGB. 301sRGB.
283 302
284 303
285Section 2.2: TV and S-Video Inputs 304TV and S-Video Inputs
286---------------------------------- 305~~~~~~~~~~~~~~~~~~~~~
287 306
288The only difference between the TV and S-Video input is that the TV has a 307The only difference between the TV and S-Video input is that the TV has a
289tuner. Otherwise they behave identically. 308tuner. Otherwise they behave identically.
@@ -338,8 +357,8 @@ Finally, for these inputs the v4l2_timecode struct is filled in in the
338dequeued v4l2_buffer struct. 357dequeued v4l2_buffer struct.
339 358
340 359
341Section 2.3: HDMI Input 360HDMI Input
342----------------------- 361~~~~~~~~~~
343 362
344The HDMI inputs supports all CEA-861 and DMT timings, both progressive and 363The HDMI inputs supports all CEA-861 and DMT timings, both progressive and
345interlaced, for pixelclock frequencies between 25 and 600 MHz. The field 364interlaced, for pixelclock frequencies between 25 and 600 MHz. The field
@@ -372,8 +391,8 @@ There is a maximum of 15 HDMI inputs (if there are more, then they will be
372reduced to 15) since that's the limitation of the EDID physical address. 391reduced to 15) since that's the limitation of the EDID physical address.
373 392
374 393
375Section 3: Video Output 394Video Output
376----------------------- 395------------
377 396
378The video output device can be configured by using the module options 397The video output device can be configured by using the module options
379num_outputs, output_types and ccs_out_mode (see section 1 for more detailed 398num_outputs, output_types and ccs_out_mode (see section 1 for more detailed
@@ -384,8 +403,8 @@ below.
384Like with video capture the framerate is also exact in the long term. 403Like with video capture the framerate is also exact in the long term.
385 404
386 405
387Section 3.1: S-Video Output 406S-Video Output
388--------------------------- 407~~~~~~~~~~~~~~
389 408
390This output supports audio outputs as well: "Line-Out 1" and "Line-Out 2". 409This output supports audio outputs as well: "Line-Out 1" and "Line-Out 2".
391The S-Video output supports all TV standards. 410The S-Video output supports all TV standards.
@@ -396,8 +415,8 @@ The initially selected colorspace when you switch to the TV or S-Video input
396will be SMPTE-170M. 415will be SMPTE-170M.
397 416
398 417
399Section 3.2: HDMI Output 418HDMI Output
400------------------------ 419~~~~~~~~~~~
401 420
402The HDMI output supports all CEA-861 and DMT timings, both progressive and 421The HDMI output supports all CEA-861 and DMT timings, both progressive and
403interlaced, for pixelclock frequencies between 25 and 600 MHz. The field 422interlaced, for pixelclock frequencies between 25 and 600 MHz. The field
@@ -418,8 +437,8 @@ There is a maximum of 15 HDMI outputs (if there are more, then they will be
418reduced to 15) since that's the limitation of the EDID physical address. See 437reduced to 15) since that's the limitation of the EDID physical address. See
419also the CEC section for more details. 438also the CEC section for more details.
420 439
421Section 4: VBI Capture 440VBI Capture
422---------------------- 441-----------
423 442
424There are three types of VBI capture devices: those that only support raw 443There are three types of VBI capture devices: those that only support raw
425(undecoded) VBI, those that only support sliced (decoded) VBI and those that 444(undecoded) VBI, those that only support sliced (decoded) VBI and those that
@@ -435,8 +454,8 @@ The VBI device will only work for the S-Video and TV inputs, it will give
435back an error if the current input is a webcam or HDMI. 454back an error if the current input is a webcam or HDMI.
436 455
437 456
438Section 5: VBI Output 457VBI Output
439--------------------- 458----------
440 459
441There are three types of VBI output devices: those that only support raw 460There are three types of VBI output devices: those that only support raw
442(undecoded) VBI, those that only support sliced (decoded) VBI and those that 461(undecoded) VBI, those that only support sliced (decoded) VBI and those that
@@ -449,15 +468,15 @@ The VBI device will only work for the S-Video output, it will give
449back an error if the current output is HDMI. 468back an error if the current output is HDMI.
450 469
451 470
452Section 6: Radio Receiver 471Radio Receiver
453------------------------- 472--------------
454 473
455The radio receiver emulates an FM/AM/SW receiver. The FM band also supports RDS. 474The radio receiver emulates an FM/AM/SW receiver. The FM band also supports RDS.
456The frequency ranges are: 475The frequency ranges are:
457 476
458 FM: 64 MHz - 108 MHz 477 - FM: 64 MHz - 108 MHz
459 AM: 520 kHz - 1710 kHz 478 - AM: 520 kHz - 1710 kHz
460 SW: 2300 kHz - 26.1 MHz 479 - SW: 2300 kHz - 26.1 MHz
461 480
462Valid channels are emulated every 1 MHz for FM and every 100 kHz for AM and SW. 481Valid channels are emulated every 1 MHz for FM and every 100 kHz for AM and SW.
463The signal strength decreases the further the frequency is from the valid 482The signal strength decreases the further the frequency is from the valid
@@ -485,15 +504,15 @@ The receiver supports HW frequency seek, either in Bounded mode, Wrap Around
485mode or both, which is configurable with the "Radio HW Seek Mode" control. 504mode or both, which is configurable with the "Radio HW Seek Mode" control.
486 505
487 506
488Section 7: Radio Transmitter 507Radio Transmitter
489---------------------------- 508-----------------
490 509
491The radio transmitter emulates an FM/AM/SW transmitter. The FM band also supports RDS. 510The radio transmitter emulates an FM/AM/SW transmitter. The FM band also supports RDS.
492The frequency ranges are: 511The frequency ranges are:
493 512
494 FM: 64 MHz - 108 MHz 513 - FM: 64 MHz - 108 MHz
495 AM: 520 kHz - 1710 kHz 514 - AM: 520 kHz - 1710 kHz
496 SW: 2300 kHz - 26.1 MHz 515 - SW: 2300 kHz - 26.1 MHz
497 516
498The initial frequency when the driver is loaded is 95.5 MHz. 517The initial frequency when the driver is loaded is 95.5 MHz.
499 518
@@ -503,8 +522,8 @@ using controls, and in 'Block I/O' mode the blocks are passed to the driver
503using write(). 522using write().
504 523
505 524
506Section 8: Software Defined Radio Receiver 525Software Defined Radio Receiver
507------------------------------------------ 526-------------------------------
508 527
509The SDR receiver has three frequency bands for the ADC tuner: 528The SDR receiver has three frequency bands for the ADC tuner:
510 529
@@ -518,15 +537,15 @@ The generated data contains the In-phase and Quadrature components of a
5181 kHz tone that has an amplitude of sqrt(2). 5371 kHz tone that has an amplitude of sqrt(2).
519 538
520 539
521Section 9: Controls 540Controls
522------------------- 541--------
523 542
524Different devices support different controls. The sections below will describe 543Different devices support different controls. The sections below will describe
525each control and which devices support them. 544each control and which devices support them.
526 545
527 546
528Section 9.1: User Controls - Test Controls 547User Controls - Test Controls
529------------------------------------------ 548~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
530 549
531The Button, Boolean, Integer 32 Bits, Integer 64 Bits, Menu, String, Bitmask and 550The Button, Boolean, Integer 32 Bits, Integer 64 Bits, Menu, String, Bitmask and
532Integer Menu are controls that represent all possible control types. The Menu 551Integer Menu are controls that represent all possible control types. The Menu
@@ -537,8 +556,8 @@ allow you to check if your application can handle such things correctly.
537These controls are supported for every device type. 556These controls are supported for every device type.
538 557
539 558
540Section 9.2: User Controls - Video Capture 559User Controls - Video Capture
541------------------------------------------ 560~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
542 561
543The following controls are specific to video capture. 562The following controls are specific to video capture.
544 563
@@ -563,8 +582,8 @@ The 'Alpha Component' control can be used to set the alpha component for
563formats containing an alpha channel. 582formats containing an alpha channel.
564 583
565 584
566Section 9.3: User Controls - Audio 585User Controls - Audio
567---------------------------------- 586~~~~~~~~~~~~~~~~~~~~~
568 587
569The following controls are specific to video capture and output and radio 588The following controls are specific to video capture and output and radio
570receivers and transmitters. 589receivers and transmitters.
@@ -574,70 +593,98 @@ control the volume and mute the audio. They don't actually do anything in
574the vivid driver. 593the vivid driver.
575 594
576 595
577Section 9.4: Vivid Controls 596Vivid Controls
578--------------------------- 597~~~~~~~~~~~~~~
579 598
580These vivid custom controls control the image generation, error injection, etc. 599These vivid custom controls control the image generation, error injection, etc.
581 600
582 601
583Section 9.4.1: Test Pattern Controls 602Test Pattern Controls
584------------------------------------ 603^^^^^^^^^^^^^^^^^^^^^
585 604
586The Test Pattern Controls are all specific to video capture. 605The Test Pattern Controls are all specific to video capture.
587 606
588Test Pattern: selects which test pattern to use. Use the CSC Colorbar for 607- Test Pattern:
608
609 selects which test pattern to use. Use the CSC Colorbar for
589 testing colorspace conversions: the colors used in that test pattern 610 testing colorspace conversions: the colors used in that test pattern
590 map to valid colors in all colorspaces. The colorspace conversion 611 map to valid colors in all colorspaces. The colorspace conversion
591 is disabled for the other test patterns. 612 is disabled for the other test patterns.
592 613
593OSD Text Mode: selects whether the text superimposed on the 614- OSD Text Mode:
615
616 selects whether the text superimposed on the
594 test pattern should be shown, and if so, whether only counters should 617 test pattern should be shown, and if so, whether only counters should
595 be displayed or the full text. 618 be displayed or the full text.
596 619
597Horizontal Movement: selects whether the test pattern should 620- Horizontal Movement:
621
622 selects whether the test pattern should
598 move to the left or right and at what speed. 623 move to the left or right and at what speed.
599 624
600Vertical Movement: does the same for the vertical direction. 625- Vertical Movement:
626
627 does the same for the vertical direction.
628
629- Show Border:
601 630
602Show Border: show a two-pixel wide border at the edge of the actual image, 631 show a two-pixel wide border at the edge of the actual image,
603 excluding letter or pillarboxing. 632 excluding letter or pillarboxing.
604 633
605Show Square: show a square in the middle of the image. If the image is 634- Show Square:
635
636 show a square in the middle of the image. If the image is
606 displayed with the correct pixel and image aspect ratio corrections, 637 displayed with the correct pixel and image aspect ratio corrections,
607 then the width and height of the square on the monitor should be 638 then the width and height of the square on the monitor should be
608 the same. 639 the same.
609 640
610Insert SAV Code in Image: adds a SAV (Start of Active Video) code to the image. 641- Insert SAV Code in Image:
642
643 adds a SAV (Start of Active Video) code to the image.
611 This can be used to check if such codes in the image are inadvertently 644 This can be used to check if such codes in the image are inadvertently
612 interpreted instead of being ignored. 645 interpreted instead of being ignored.
613 646
614Insert EAV Code in Image: does the same for the EAV (End of Active Video) code. 647- Insert EAV Code in Image:
615 648
649 does the same for the EAV (End of Active Video) code.
616 650
617Section 9.4.2: Capture Feature Selection Controls 651
618------------------------------------------------- 652Capture Feature Selection Controls
653^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
619 654
620These controls are all specific to video capture. 655These controls are all specific to video capture.
621 656
622Sensor Flipped Horizontally: the image is flipped horizontally and the 657- Sensor Flipped Horizontally:
658
659 the image is flipped horizontally and the
623 V4L2_IN_ST_HFLIP input status flag is set. This emulates the case where 660 V4L2_IN_ST_HFLIP input status flag is set. This emulates the case where
624 a sensor is for example mounted upside down. 661 a sensor is for example mounted upside down.
625 662
626Sensor Flipped Vertically: the image is flipped vertically and the 663- Sensor Flipped Vertically:
664
665 the image is flipped vertically and the
627 V4L2_IN_ST_VFLIP input status flag is set. This emulates the case where 666 V4L2_IN_ST_VFLIP input status flag is set. This emulates the case where
628 a sensor is for example mounted upside down. 667 a sensor is for example mounted upside down.
668
669- Standard Aspect Ratio:
629 670
630Standard Aspect Ratio: selects if the image aspect ratio as used for the TV or 671 selects if the image aspect ratio as used for the TV or
631 S-Video input should be 4x3, 16x9 or anamorphic widescreen. This may 672 S-Video input should be 4x3, 16x9 or anamorphic widescreen. This may
632 introduce letterboxing. 673 introduce letterboxing.
633 674
634DV Timings Aspect Ratio: selects if the image aspect ratio as used for the HDMI 675- DV Timings Aspect Ratio:
676
677 selects if the image aspect ratio as used for the HDMI
635 input should be the same as the source width and height ratio, or if 678 input should be the same as the source width and height ratio, or if
636 it should be 4x3 or 16x9. This may introduce letter or pillarboxing. 679 it should be 4x3 or 16x9. This may introduce letter or pillarboxing.
637 680
638Timestamp Source: selects when the timestamp for each buffer is taken. 681- Timestamp Source:
682
683 selects when the timestamp for each buffer is taken.
639 684
640Colorspace: selects which colorspace should be used when generating the image. 685- Colorspace:
686
687 selects which colorspace should be used when generating the image.
641 This only applies if the CSC Colorbar test pattern is selected, 688 This only applies if the CSC Colorbar test pattern is selected,
642 otherwise the test pattern will go through unconverted. 689 otherwise the test pattern will go through unconverted.
643 This behavior is also what you want, since a 75% Colorbar 690 This behavior is also what you want, since a 75% Colorbar
@@ -647,95 +694,124 @@ Colorspace: selects which colorspace should be used when generating the image.
647 Changing the colorspace will result in the V4L2_EVENT_SOURCE_CHANGE 694 Changing the colorspace will result in the V4L2_EVENT_SOURCE_CHANGE
648 to be sent since it emulates a detected colorspace change. 695 to be sent since it emulates a detected colorspace change.
649 696
650Transfer Function: selects which colorspace transfer function should be used when 697- Transfer Function:
698
699 selects which colorspace transfer function should be used when
651 generating an image. This only applies if the CSC Colorbar test pattern is 700 generating an image. This only applies if the CSC Colorbar test pattern is
652 selected, otherwise the test pattern will go through unconverted. 701 selected, otherwise the test pattern will go through unconverted.
653 This behavior is also what you want, since a 75% Colorbar 702 This behavior is also what you want, since a 75% Colorbar
654 should really have 75% signal intensity and should not be affected 703 should really have 75% signal intensity and should not be affected
655 by colorspace conversions. 704 by colorspace conversions.
656 705
657 Changing the transfer function will result in the V4L2_EVENT_SOURCE_CHANGE 706 Changing the transfer function will result in the V4L2_EVENT_SOURCE_CHANGE
658 to be sent since it emulates a detected colorspace change. 707 to be sent since it emulates a detected colorspace change.
659 708
660Y'CbCr Encoding: selects which Y'CbCr encoding should be used when generating 709- Y'CbCr Encoding:
710
711 selects which Y'CbCr encoding should be used when generating
661 a Y'CbCr image. This only applies if the format is set to a Y'CbCr format 712 a Y'CbCr image. This only applies if the format is set to a Y'CbCr format
662 as opposed to an RGB format. 713 as opposed to an RGB format.
663 714
664 Changing the Y'CbCr encoding will result in the V4L2_EVENT_SOURCE_CHANGE 715 Changing the Y'CbCr encoding will result in the V4L2_EVENT_SOURCE_CHANGE
665 to be sent since it emulates a detected colorspace change. 716 to be sent since it emulates a detected colorspace change.
666 717
667Quantization: selects which quantization should be used for the RGB or Y'CbCr 718- Quantization:
719
720 selects which quantization should be used for the RGB or Y'CbCr
668 encoding when generating the test pattern. 721 encoding when generating the test pattern.
669 722
670 Changing the quantization will result in the V4L2_EVENT_SOURCE_CHANGE 723 Changing the quantization will result in the V4L2_EVENT_SOURCE_CHANGE
671 to be sent since it emulates a detected colorspace change. 724 to be sent since it emulates a detected colorspace change.
672 725
673Limited RGB Range (16-235): selects if the RGB range of the HDMI source should 726- Limited RGB Range (16-235):
727
728 selects if the RGB range of the HDMI source should
674 be limited or full range. This combines with the Digital Video 'Rx RGB 729 be limited or full range. This combines with the Digital Video 'Rx RGB
675 Quantization Range' control and can be used to test what happens if 730 Quantization Range' control and can be used to test what happens if
676 a source provides you with the wrong quantization range information. 731 a source provides you with the wrong quantization range information.
677 See the description of that control for more details. 732 See the description of that control for more details.
678 733
679Apply Alpha To Red Only: apply the alpha channel as set by the 'Alpha Component' 734- Apply Alpha To Red Only:
735
736 apply the alpha channel as set by the 'Alpha Component'
680 user control to the red color of the test pattern only. 737 user control to the red color of the test pattern only.
681 738
682Enable Capture Cropping: enables crop support. This control is only present if 739- Enable Capture Cropping:
740
741 enables crop support. This control is only present if
683 the ccs_cap_mode module option is set to the default value of -1 and if 742 the ccs_cap_mode module option is set to the default value of -1 and if
684 the no_error_inj module option is set to 0 (the default). 743 the no_error_inj module option is set to 0 (the default).
685 744
686Enable Capture Composing: enables composing support. This control is only 745- Enable Capture Composing:
746
747 enables composing support. This control is only
687 present if the ccs_cap_mode module option is set to the default value of 748 present if the ccs_cap_mode module option is set to the default value of
688 -1 and if the no_error_inj module option is set to 0 (the default). 749 -1 and if the no_error_inj module option is set to 0 (the default).
689 750
690Enable Capture Scaler: enables support for a scaler (maximum 4 times upscaling 751- Enable Capture Scaler:
752
753 enables support for a scaler (maximum 4 times upscaling
691 and downscaling). This control is only present if the ccs_cap_mode 754 and downscaling). This control is only present if the ccs_cap_mode
692 module option is set to the default value of -1 and if the no_error_inj 755 module option is set to the default value of -1 and if the no_error_inj
693 module option is set to 0 (the default). 756 module option is set to 0 (the default).
694 757
695Maximum EDID Blocks: determines how many EDID blocks the driver supports. 758- Maximum EDID Blocks:
759
760 determines how many EDID blocks the driver supports.
696 Note that the vivid driver does not actually interpret new EDID 761 Note that the vivid driver does not actually interpret new EDID
697 data, it just stores it. It allows for up to 256 EDID blocks 762 data, it just stores it. It allows for up to 256 EDID blocks
698 which is the maximum supported by the standard. 763 which is the maximum supported by the standard.
699 764
700Fill Percentage of Frame: can be used to draw only the top X percent 765- Fill Percentage of Frame:
766
767 can be used to draw only the top X percent
701 of the image. Since each frame has to be drawn by the driver, this 768 of the image. Since each frame has to be drawn by the driver, this
702 demands a lot of the CPU. For large resolutions this becomes 769 demands a lot of the CPU. For large resolutions this becomes
703 problematic. By drawing only part of the image this CPU load can 770 problematic. By drawing only part of the image this CPU load can
704 be reduced. 771 be reduced.
705 772
706 773
707Section 9.4.3: Output Feature Selection Controls 774Output Feature Selection Controls
708------------------------------------------------ 775^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
709 776
710These controls are all specific to video output. 777These controls are all specific to video output.
711 778
712Enable Output Cropping: enables crop support. This control is only present if 779- Enable Output Cropping:
780
781 enables crop support. This control is only present if
713 the ccs_out_mode module option is set to the default value of -1 and if 782 the ccs_out_mode module option is set to the default value of -1 and if
714 the no_error_inj module option is set to 0 (the default). 783 the no_error_inj module option is set to 0 (the default).
715 784
716Enable Output Composing: enables composing support. This control is only 785- Enable Output Composing:
786
787 enables composing support. This control is only
717 present if the ccs_out_mode module option is set to the default value of 788 present if the ccs_out_mode module option is set to the default value of
718 -1 and if the no_error_inj module option is set to 0 (the default). 789 -1 and if the no_error_inj module option is set to 0 (the default).
719 790
720Enable Output Scaler: enables support for a scaler (maximum 4 times upscaling 791- Enable Output Scaler:
792
793 enables support for a scaler (maximum 4 times upscaling
721 and downscaling). This control is only present if the ccs_out_mode 794 and downscaling). This control is only present if the ccs_out_mode
722 module option is set to the default value of -1 and if the no_error_inj 795 module option is set to the default value of -1 and if the no_error_inj
723 module option is set to 0 (the default). 796 module option is set to 0 (the default).
724 797
725 798
726Section 9.4.4: Error Injection Controls 799Error Injection Controls
727--------------------------------------- 800^^^^^^^^^^^^^^^^^^^^^^^^
728 801
729The following two controls are only valid for video and vbi capture. 802The following two controls are only valid for video and vbi capture.
730 803
731Standard Signal Mode: selects the behavior of VIDIOC_QUERYSTD: what should 804- Standard Signal Mode:
732 it return? 805
806 selects the behavior of VIDIOC_QUERYSTD: what should it return?
733 807
734 Changing this control will result in the V4L2_EVENT_SOURCE_CHANGE 808 Changing this control will result in the V4L2_EVENT_SOURCE_CHANGE
735 to be sent since it emulates a changed input condition (e.g. a cable 809 to be sent since it emulates a changed input condition (e.g. a cable
736 was plugged in or out). 810 was plugged in or out).
737 811
738Standard: selects the standard that VIDIOC_QUERYSTD should return if the 812- Standard:
813
814 selects the standard that VIDIOC_QUERYSTD should return if the
739 previous control is set to "Selected Standard". 815 previous control is set to "Selected Standard".
740 816
741 Changing this control will result in the V4L2_EVENT_SOURCE_CHANGE 817 Changing this control will result in the V4L2_EVENT_SOURCE_CHANGE
@@ -744,14 +820,17 @@ Standard: selects the standard that VIDIOC_QUERYSTD should return if the
744 820
745The following two controls are only valid for video capture. 821The following two controls are only valid for video capture.
746 822
747DV Timings Signal Mode: selects the behavior of VIDIOC_QUERY_DV_TIMINGS: what 823- DV Timings Signal Mode:
824 selects the behavior of VIDIOC_QUERY_DV_TIMINGS: what
748 should it return? 825 should it return?
749 826
750 Changing this control will result in the V4L2_EVENT_SOURCE_CHANGE 827 Changing this control will result in the V4L2_EVENT_SOURCE_CHANGE
751 to be sent since it emulates a changed input condition (e.g. a cable 828 to be sent since it emulates a changed input condition (e.g. a cable
752 was plugged in or out). 829 was plugged in or out).
753 830
754DV Timings: selects the timings the VIDIOC_QUERY_DV_TIMINGS should return 831- DV Timings:
832
833 selects the timings the VIDIOC_QUERY_DV_TIMINGS should return
755 if the previous control is set to "Selected DV Timings". 834 if the previous control is set to "Selected DV Timings".
756 835
757 Changing this control will result in the V4L2_EVENT_SOURCE_CHANGE 836 Changing this control will result in the V4L2_EVENT_SOURCE_CHANGE
@@ -763,52 +842,74 @@ is set to 0 (the default). These controls are valid for video and vbi
763capture and output streams and for the SDR capture device except for the 842capture and output streams and for the SDR capture device except for the
764Disconnect control which is valid for all devices. 843Disconnect control which is valid for all devices.
765 844
766Wrap Sequence Number: test what happens when you wrap the sequence number in 845- Wrap Sequence Number:
846
847 test what happens when you wrap the sequence number in
767 struct v4l2_buffer around. 848 struct v4l2_buffer around.
768 849
769Wrap Timestamp: test what happens when you wrap the timestamp in struct 850- Wrap Timestamp:
851
852 test what happens when you wrap the timestamp in struct
770 v4l2_buffer around. 853 v4l2_buffer around.
771 854
772Percentage of Dropped Buffers: sets the percentage of buffers that 855- Percentage of Dropped Buffers:
856
857 sets the percentage of buffers that
773 are never returned by the driver (i.e., they are dropped). 858 are never returned by the driver (i.e., they are dropped).
774 859
775Disconnect: emulates a USB disconnect. The device will act as if it has 860- Disconnect:
861
862 emulates a USB disconnect. The device will act as if it has
776 been disconnected. Only after all open filehandles to the device 863 been disconnected. Only after all open filehandles to the device
777 node have been closed will the device become 'connected' again. 864 node have been closed will the device become 'connected' again.
778 865
779Inject V4L2_BUF_FLAG_ERROR: when pressed, the next frame returned by 866- Inject V4L2_BUF_FLAG_ERROR:
867
868 when pressed, the next frame returned by
780 the driver will have the error flag set (i.e. the frame is marked 869 the driver will have the error flag set (i.e. the frame is marked
781 corrupt). 870 corrupt).
782 871
783Inject VIDIOC_REQBUFS Error: when pressed, the next REQBUFS or CREATE_BUFS 872- Inject VIDIOC_REQBUFS Error:
873
874 when pressed, the next REQBUFS or CREATE_BUFS
784 ioctl call will fail with an error. To be precise: the videobuf2 875 ioctl call will fail with an error. To be precise: the videobuf2
785 queue_setup() op will return -EINVAL. 876 queue_setup() op will return -EINVAL.
786 877
787Inject VIDIOC_QBUF Error: when pressed, the next VIDIOC_QBUF or 878- Inject VIDIOC_QBUF Error:
879
880 when pressed, the next VIDIOC_QBUF or
788 VIDIOC_PREPARE_BUFFER ioctl call will fail with an error. To be 881 VIDIOC_PREPARE_BUFFER ioctl call will fail with an error. To be
789 precise: the videobuf2 buf_prepare() op will return -EINVAL. 882 precise: the videobuf2 buf_prepare() op will return -EINVAL.
790 883
791Inject VIDIOC_STREAMON Error: when pressed, the next VIDIOC_STREAMON ioctl 884- Inject VIDIOC_STREAMON Error:
885
886 when pressed, the next VIDIOC_STREAMON ioctl
792 call will fail with an error. To be precise: the videobuf2 887 call will fail with an error. To be precise: the videobuf2
793 start_streaming() op will return -EINVAL. 888 start_streaming() op will return -EINVAL.
794 889
795Inject Fatal Streaming Error: when pressed, the streaming core will be 890- Inject Fatal Streaming Error:
891
892 when pressed, the streaming core will be
796 marked as having suffered a fatal error, the only way to recover 893 marked as having suffered a fatal error, the only way to recover
797 from that is to stop streaming. To be precise: the videobuf2 894 from that is to stop streaming. To be precise: the videobuf2
798 vb2_queue_error() function is called. 895 vb2_queue_error() function is called.
799 896
800 897
801Section 9.4.5: VBI Raw Capture Controls 898VBI Raw Capture Controls
802--------------------------------------- 899^^^^^^^^^^^^^^^^^^^^^^^^
900
901- Interlaced VBI Format:
803 902
804Interlaced VBI Format: if set, then the raw VBI data will be interlaced instead 903 if set, then the raw VBI data will be interlaced instead
805 of providing it grouped by field. 904 of providing it grouped by field.
806 905
807 906
808Section 9.5: Digital Video Controls 907Digital Video Controls
809----------------------------------- 908~~~~~~~~~~~~~~~~~~~~~~
810 909
811Rx RGB Quantization Range: sets the RGB quantization detection of the HDMI 910- Rx RGB Quantization Range:
911
912 sets the RGB quantization detection of the HDMI
812 input. This combines with the Vivid 'Limited RGB Range (16-235)' 913 input. This combines with the Vivid 'Limited RGB Range (16-235)'
813 control and can be used to test what happens if a source provides 914 control and can be used to test what happens if a source provides
814 you with the wrong quantization range information. This can be tested 915 you with the wrong quantization range information. This can be tested
@@ -817,72 +918,124 @@ Rx RGB Quantization Range: sets the RGB quantization detection of the HDMI
817 control. The effect is easy to see if the 'Gray Ramp' test pattern 918 control. The effect is easy to see if the 'Gray Ramp' test pattern
818 is selected. 919 is selected.
819 920
820Tx RGB Quantization Range: sets the RGB quantization detection of the HDMI 921- Tx RGB Quantization Range:
922
923 sets the RGB quantization detection of the HDMI
821 output. It is currently not used for anything in vivid, but most HDMI 924 output. It is currently not used for anything in vivid, but most HDMI
822 transmitters would typically have this control. 925 transmitters would typically have this control.
823 926
824Transmit Mode: sets the transmit mode of the HDMI output to HDMI or DVI-D. This 927- Transmit Mode:
928
929 sets the transmit mode of the HDMI output to HDMI or DVI-D. This
825 affects the reported colorspace since DVI_D outputs will always use 930 affects the reported colorspace since DVI_D outputs will always use
826 sRGB. 931 sRGB.
827 932
828 933
829Section 9.6: FM Radio Receiver Controls 934FM Radio Receiver Controls
830--------------------------------------- 935~~~~~~~~~~~~~~~~~~~~~~~~~~
936
937- RDS Reception:
938
939 set if the RDS receiver should be enabled.
940
941- RDS Program Type:
942
943
944- RDS PS Name:
945
831 946
832RDS Reception: set if the RDS receiver should be enabled. 947- RDS Radio Text:
833 948
834RDS Program Type: 949
835RDS PS Name: 950- RDS Traffic Announcement:
836RDS Radio Text: 951
837RDS Traffic Announcement: 952
838RDS Traffic Program: 953- RDS Traffic Program:
839RDS Music: these are all read-only controls. If RDS Rx I/O Mode is set to 954
955
956- RDS Music:
957
958 these are all read-only controls. If RDS Rx I/O Mode is set to
840 "Block I/O", then they are inactive as well. If RDS Rx I/O Mode is set 959 "Block I/O", then they are inactive as well. If RDS Rx I/O Mode is set
841 to "Controls", then these controls report the received RDS data. Note 960 to "Controls", then these controls report the received RDS data.
842 that the vivid implementation of this is pretty basic: they are only 961
962.. note::
963 The vivid implementation of this is pretty basic: they are only
843 updated when you set a new frequency or when you get the tuner status 964 updated when you set a new frequency or when you get the tuner status
844 (VIDIOC_G_TUNER). 965 (VIDIOC_G_TUNER).
845 966
846Radio HW Seek Mode: can be one of "Bounded", "Wrap Around" or "Both". This 967- Radio HW Seek Mode:
968
969 can be one of "Bounded", "Wrap Around" or "Both". This
847 determines if VIDIOC_S_HW_FREQ_SEEK will be bounded by the frequency 970 determines if VIDIOC_S_HW_FREQ_SEEK will be bounded by the frequency
848 range or wrap-around or if it is selectable by the user. 971 range or wrap-around or if it is selectable by the user.
849 972
850Radio Programmable HW Seek: if set, then the user can provide the lower and 973- Radio Programmable HW Seek:
974
975 if set, then the user can provide the lower and
851 upper bound of the HW Seek. Otherwise the frequency range boundaries 976 upper bound of the HW Seek. Otherwise the frequency range boundaries
852 will be used. 977 will be used.
853 978
854Generate RBDS Instead of RDS: if set, then generate RBDS (the US variant of 979- Generate RBDS Instead of RDS:
980
981 if set, then generate RBDS (the US variant of
855 RDS) data instead of RDS (European-style RDS). This affects only the 982 RDS) data instead of RDS (European-style RDS). This affects only the
856 PICODE and PTY codes. 983 PICODE and PTY codes.
857 984
858RDS Rx I/O Mode: this can be "Block I/O" where the RDS blocks have to be read() 985- RDS Rx I/O Mode:
986
987 this can be "Block I/O" where the RDS blocks have to be read()
859 by the application, or "Controls" where the RDS data is provided by 988 by the application, or "Controls" where the RDS data is provided by
860 the RDS controls mentioned above. 989 the RDS controls mentioned above.
861 990
862 991
863Section 9.7: FM Radio Modulator Controls 992FM Radio Modulator Controls
864---------------------------------------- 993~~~~~~~~~~~~~~~~~~~~~~~~~~~
865 994
866RDS Program ID: 995- RDS Program ID:
867RDS Program Type: 996
868RDS PS Name: 997
869RDS Radio Text: 998- RDS Program Type:
870RDS Stereo: 999
871RDS Artificial Head: 1000
872RDS Compressed: 1001- RDS PS Name:
873RDS Dynamic PTY: 1002
874RDS Traffic Announcement: 1003
875RDS Traffic Program: 1004- RDS Radio Text:
876RDS Music: these are all controls that set the RDS data that is transmitted by 1005
1006
1007- RDS Stereo:
1008
1009
1010- RDS Artificial Head:
1011
1012
1013- RDS Compressed:
1014
1015
1016- RDS Dynamic PTY:
1017
1018
1019- RDS Traffic Announcement:
1020
1021
1022- RDS Traffic Program:
1023
1024
1025- RDS Music:
1026
1027 these are all controls that set the RDS data that is transmitted by
877 the FM modulator. 1028 the FM modulator.
878 1029
879RDS Tx I/O Mode: this can be "Block I/O" where the application has to use write() 1030- RDS Tx I/O Mode:
880 to pass the RDS blocks to the driver, or "Controls" where the RDS data is
881 provided by the RDS controls mentioned above.
882 1031
1032 this can be "Block I/O" where the application has to use write()
1033 to pass the RDS blocks to the driver, or "Controls" where the RDS data
1034 is Provided by the RDS controls mentioned above.
883 1035
884Section 10: Video, VBI and RDS Looping 1036
885-------------------------------------- 1037Video, VBI and RDS Looping
1038--------------------------
886 1039
887The vivid driver supports looping of video output to video input, VBI output 1040The vivid driver supports looping of video output to video input, VBI output
888to VBI input and RDS output to RDS input. For video/VBI looping this emulates 1041to VBI input and RDS output to RDS input. For video/VBI looping this emulates
@@ -898,8 +1051,8 @@ Looping is currently supported only between devices created by the same
898vivid driver instance. 1051vivid driver instance.
899 1052
900 1053
901Section 10.1: Video and Sliced VBI looping 1054Video and Sliced VBI looping
902------------------------------------------ 1055~~~~~~~~~~~~~~~~~~~~~~~~~~~~
903 1056
904The way to enable video/VBI looping is currently fairly crude. A 'Loop Video' 1057The way to enable video/VBI looping is currently fairly crude. A 'Loop Video'
905control is available in the "Vivid" control class of the video 1058control is available in the "Vivid" control class of the video
@@ -948,8 +1101,8 @@ for either raw or sliced VBI. Note that at the moment only CC/XDS (60 Hz formats
948and WSS (50 Hz formats) VBI data is looped. Teletext VBI data is not looped. 1101and WSS (50 Hz formats) VBI data is looped. Teletext VBI data is not looped.
949 1102
950 1103
951Section 10.2: Radio & RDS Looping 1104Radio & RDS Looping
952--------------------------------- 1105~~~~~~~~~~~~~~~~~~~
953 1106
954As mentioned in section 6 the radio receiver emulates stations are regular 1107As mentioned in section 6 the radio receiver emulates stations are regular
955frequency intervals. Depending on the frequency of the radio receiver a 1108frequency intervals. Depending on the frequency of the radio receiver a
@@ -963,8 +1116,8 @@ frequencies of the radio receiver and transmitter are not identical, so
963initially no looping takes place. 1116initially no looping takes place.
964 1117
965 1118
966Section 11: Cropping, Composing, Scaling 1119Cropping, Composing, Scaling
967---------------------------------------- 1120----------------------------
968 1121
969This driver supports cropping, composing and scaling in any combination. Normally 1122This driver supports cropping, composing and scaling in any combination. Normally
970which features are supported can be selected through the Vivid controls, 1123which features are supported can be selected through the Vivid controls,
@@ -997,8 +1150,8 @@ If the combination of crop, compose and scaling allows it, then it is possible
997to change crop and compose rectangles on the fly. 1150to change crop and compose rectangles on the fly.
998 1151
999 1152
1000Section 12: Formats 1153Formats
1001------------------- 1154-------
1002 1155
1003The driver supports all the regular packed and planar 4:4:4, 4:2:2 and 4:2:0 1156The driver supports all the regular packed and planar 4:4:4, 4:2:2 and 4:2:0
1004YUYV formats, 8, 16, 24 and 32 RGB packed formats and various multiplanar 1157YUYV formats, 8, 16, 24 and 32 RGB packed formats and various multiplanar
@@ -1021,8 +1174,8 @@ data_offset to be non-zero, so this is a useful feature for testing applications
1021Video output will also honor any data_offset that the application set. 1174Video output will also honor any data_offset that the application set.
1022 1175
1023 1176
1024Section 13: Capture Overlay 1177Capture Overlay
1025--------------------------- 1178---------------
1026 1179
1027Note: capture overlay support is implemented primarily to test the existing 1180Note: capture overlay support is implemented primarily to test the existing
1028V4L2 capture overlay API. In practice few if any GPUs support such overlays 1181V4L2 capture overlay API. In practice few if any GPUs support such overlays
@@ -1055,6 +1208,8 @@ the output overlay for the video output, turn on video looping and capture
1055to see the blended framebuffer overlay that's being written to by the second 1208to see the blended framebuffer overlay that's being written to by the second
1056instance. This setup would require the following commands: 1209instance. This setup would require the following commands:
1057 1210
1211.. code-block:: none
1212
1058 $ sudo modprobe vivid n_devs=2 node_types=0x10101,0x1 1213 $ sudo modprobe vivid n_devs=2 node_types=0x10101,0x1
1059 $ v4l2-ctl -d1 --find-fb 1214 $ v4l2-ctl -d1 --find-fb
1060 /dev/fb1 is the framebuffer associated with base address 0x12800000 1215 /dev/fb1 is the framebuffer associated with base address 0x12800000
@@ -1072,10 +1227,14 @@ instance. This setup would require the following commands:
1072 1227
1073And from another console: 1228And from another console:
1074 1229
1230.. code-block:: none
1231
1075 $ v4l2-ctl -d1 --stream-out-mmap 1232 $ v4l2-ctl -d1 --stream-out-mmap
1076 1233
1077And yet another console: 1234And yet another console:
1078 1235
1236.. code-block:: none
1237
1079 $ qv4l2 1238 $ qv4l2
1080 1239
1081and start streaming. 1240and start streaming.
@@ -1083,8 +1242,8 @@ and start streaming.
1083As you can see, this is not for the faint of heart... 1242As you can see, this is not for the faint of heart...
1084 1243
1085 1244
1086Section 14: Output Overlay 1245Output Overlay
1087-------------------------- 1246--------------
1088 1247
1089Note: output overlays are primarily implemented in order to test the existing 1248Note: output overlays are primarily implemented in order to test the existing
1090V4L2 output overlay API. Whether this API should be used for new drivers is 1249V4L2 output overlay API. Whether this API should be used for new drivers is
@@ -1116,8 +1275,8 @@ capabilities will slow down the video loop considerably as a lot of checks have
1116to be done per pixel. 1275to be done per pixel.
1117 1276
1118 1277
1119Section 15: CEC (Consumer Electronics Control) 1278CEC (Consumer Electronics Control)
1120---------------------------------------------- 1279----------------------------------
1121 1280
1122If there are HDMI inputs then a CEC adapter will be created that has 1281If there are HDMI inputs then a CEC adapter will be created that has
1123the same number of input ports. This is the equivalent of e.g. a TV that 1282the same number of input ports. This is the equivalent of e.g. a TV that
@@ -1135,8 +1294,8 @@ there are more outputs than inputs then the remaining outputs have a CEC adapter
1135that is disabled and reports an invalid physical address. 1294that is disabled and reports an invalid physical address.
1136 1295
1137 1296
1138Section 16: Some Future Improvements 1297Some Future Improvements
1139------------------------------------ 1298------------------------
1140 1299
1141Just as a reminder and in no particular order: 1300Just as a reminder and in no particular order:
1142 1301