vivid.rst 47.6 KB
Newer Older
1 2
The Virtual Video Test Driver (vivid)
=====================================
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39

This driver emulates video4linux hardware of various types: video capture, video
output, vbi capture and output, radio receivers and transmitters and a software
defined radio receiver. In addition a simple framebuffer device is available for
testing capture and output overlays.

Up to 64 vivid instances can be created, each with up to 16 inputs and 16 outputs.

Each input can be a webcam, TV capture device, S-Video capture device or an HDMI
capture device. Each output can be an S-Video output device or an HDMI output
device.

These inputs and outputs act exactly as a real hardware device would behave. This
allows you to use this driver as a test input for application development, since
you can test the various features without requiring special hardware.

This document describes the features implemented by this driver:

- Support for read()/write(), MMAP, USERPTR and DMABUF streaming I/O.
- A large list of test patterns and variations thereof
- Working brightness, contrast, saturation and hue controls
- Support for the alpha color component
- Full colorspace support, including limited/full RGB range
- All possible control types are present
- Support for various pixel aspect ratios and video aspect ratios
- Error injection to test what happens if errors occur
- Supports crop/compose/scale in any combination for both input and output
- Can emulate up to 4K resolutions
- All Field settings are supported for testing interlaced capturing
- Supports all standard YUV and RGB formats, including two multiplanar YUV formats
- Raw and Sliced VBI capture and output support
- Radio receiver and transmitter support, including RDS support
- Software defined radio (SDR) support
- Capture and output overlay support

These features will be described in more detail below.

40 41
Configuring the driver
----------------------
42 43 44 45 46 47 48 49 50

By default the driver will create a single instance that has a video capture
device with webcam, TV, S-Video and HDMI inputs, a video output device with
S-Video and HDMI outputs, one vbi capture device, one vbi output device, one
radio receiver device, one radio transmitter device and one SDR device.

The number of instances, devices, video inputs and outputs and their types are
all configurable using the following module options:

51 52 53
- n_devs:

	number of driver instances to create. By default set to 1. Up to 64
54 55
	instances can be created.

56 57 58
- node_types:

	which devices should each driver instance create. An array of
59 60
	hexadecimal values, one for each instance. The default is 0x1d3d.
	Each value is a bitmask with the following meaning:
61 62 63 64 65 66 67 68 69

		- bit 0: Video Capture node
		- bit 2-3: VBI Capture node: 0 = none, 1 = raw vbi, 2 = sliced vbi, 3 = both
		- bit 4: Radio Receiver node
		- bit 5: Software Defined Radio Receiver node
		- bit 8: Video Output node
		- bit 10-11: VBI Output node: 0 = none, 1 = raw vbi, 2 = sliced vbi, 3 = both
		- bit 12: Radio Transmitter node
		- bit 16: Framebuffer for testing overlays
70 71 72 73 74

	So to create four instances, the first two with just one video capture
	device, the second two with just one video output device you would pass
	these module options to vivid:

75 76
	.. code-block:: none

77 78
		n_devs=4 node_types=0x1,0x1,0x100,0x100

79 80 81
- num_inputs:

	the number of inputs, one for each instance. By default 4 inputs
82 83 84
	are created for each video capture device. At most 16 inputs can be created,
	and there must be at least one.

85 86 87
- input_types:

	the input types for each instance, the default is 0xe4. This defines
88 89 90 91 92
	what the type of each input is when the inputs are created for each driver
	instance. This is a hexadecimal value with up to 16 pairs of bits, each
	pair gives the type and bits 0-1 map to input 0, bits 2-3 map to input 1,
	30-31 map to input 15. Each pair of bits has the following meaning:

93 94 95 96
		- 00: this is a webcam input
		- 01: this is a TV tuner input
		- 10: this is an S-Video input
		- 11: this is an HDMI input
97 98 99 100 101

	So to create a video capture device with 8 inputs where input 0 is a TV
	tuner, inputs 1-3 are S-Video inputs and inputs 4-7 are HDMI inputs you
	would use the following module options:

102 103
	.. code-block:: none

104 105
		num_inputs=8 input_types=0xffa9

106 107 108
- num_outputs:

	the number of outputs, one for each instance. By default 2 outputs
109 110 111
	are created for each video output device. At most 16 outputs can be
	created, and there must be at least one.

112 113 114
- output_types:

	the output types for each instance, the default is 0x02. This defines
115 116 117 118 119
	what the type of each output is when the outputs are created for each
	driver instance. This is a hexadecimal value with up to 16 bits, each bit
	gives the type and bit 0 maps to output 0, bit 1 maps to output 1, bit
	15 maps to output 15. The meaning of each bit is as follows:

120 121
		- 0: this is an S-Video output
		- 1: this is an HDMI output
122 123 124 125 126

	So to create a video output device with 8 outputs where outputs 0-3 are
	S-Video outputs and outputs 4-7 are HDMI outputs you would use the
	following module options:

127 128
	.. code-block:: none

129 130
		num_outputs=8 output_types=0xf0

131 132 133
- vid_cap_nr:

	give the desired videoX start number for each video capture device.
134 135 136
	The default is -1 which will just take the first free number. This allows
	you to map capture video nodes to specific videoX device nodes. Example:

137 138
	.. code-block:: none

139 140 141 142 143 144 145
		n_devs=4 vid_cap_nr=2,4,6,8

	This will attempt to assign /dev/video2 for the video capture device of
	the first vivid instance, video4 for the next up to video8 for the last
	instance. If it can't succeed, then it will just take the next free
	number.

146 147 148 149 150 151
- vid_out_nr:

	give the desired videoX start number for each video output device.
	The default is -1 which will just take the first free number.

- vbi_cap_nr:
152

153 154
	give the desired vbiX start number for each vbi capture device.
	The default is -1 which will just take the first free number.
155

156
- vbi_out_nr:
157

158 159
	give the desired vbiX start number for each vbi output device.
	The default is -1 which will just take the first free number.
160

161 162 163 164 165 166 167 168
- radio_rx_nr:

	give the desired radioX start number for each radio receiver device.
	The default is -1 which will just take the first free number.

- radio_tx_nr:

	give the desired radioX start number for each radio transmitter
169 170
	device. The default is -1 which will just take the first free number.

171 172 173 174 175 176
- sdr_cap_nr:

	give the desired swradioX start number for each SDR capture device.
	The default is -1 which will just take the first free number.

- ccs_cap_mode:
177

178
	specify the allowed video capture crop/compose/scaling combination
179 180 181 182 183 184 185 186
	for each driver instance. Video capture devices can have any combination
	of cropping, composing and scaling capabilities and this will tell the
	vivid driver which of those is should emulate. By default the user can
	select this through controls.

	The value is either -1 (controlled by the user) or a set of three bits,
	each enabling (1) or disabling (0) one of the features:

187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202
	- bit 0:

		Enable crop support. Cropping will take only part of the
		incoming picture.
	- bit 1:

		Enable compose support. Composing will copy the incoming
		picture into a larger buffer.

	- bit 2:

		Enable scaling support. Scaling can scale the incoming
		picture. The scaler of the vivid driver can enlarge up
		or down to four times the original size. The scaler is
		very simple and low-quality. Simplicity and speed were
		key, not quality.
203 204 205 206 207

	Note that this value is ignored by webcam inputs: those enumerate
	discrete framesizes and that is incompatible with cropping, composing
	or scaling.

208 209 210
- ccs_out_mode:

	specify the allowed video output crop/compose/scaling combination
211 212 213 214 215 216 217 218
	for each driver instance. Video output devices can have any combination
	of cropping, composing and scaling capabilities and this will tell the
	vivid driver which of those is should emulate. By default the user can
	select this through controls.

	The value is either -1 (controlled by the user) or a set of three bits,
	each enabling (1) or disabling (0) one of the features:

219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239
	- bit 0:

		Enable crop support. Cropping will take only part of the
		outgoing buffer.

	- bit 1:

		Enable compose support. Composing will copy the incoming
		buffer into a larger picture frame.

	- bit 2:

		Enable scaling support. Scaling can scale the incoming
		buffer. The scaler of the vivid driver can enlarge up
		or down to four times the original size. The scaler is
		very simple and low-quality. Simplicity and speed were
		key, not quality.

- multiplanar:

	select whether each device instance supports multi-planar formats,
240 241
	and thus the V4L2 multi-planar API. By default device instances are
	single-planar.
242 243 244

	This module option can override that for each instance. Values are:

245 246
		- 1: this is a single-planar instance.
		- 2: this is a multi-planar instance.
247

248
- vivid_debug:
249

250 251 252 253 254
	enable driver debugging info

- no_error_inj:

	if set disable the error injecting controls. This option is
255 256 257 258 259 260 261 262 263 264 265
	needed in order to run a tool like v4l2-compliance. Tools like that
	exercise all controls including a control like 'Disconnect' which
	emulates a USB disconnect, making the device inaccessible and so
	all tests that v4l2-compliance is doing will fail afterwards.

	There may be other situations as well where you want to disable the
	error injection support of vivid. When this option is set, then the
	controls that select crop, compose and scale behavior are also
	removed. Unless overridden by ccs_cap_mode and/or ccs_out_mode the
	will default to enabling crop, compose and scaling.

266 267 268 269 270 271 272 273
- allocators:

	memory allocator selection, default is 0. It specifies the way buffers
	will be allocated.

		- 0: vmalloc
		- 1: dma-contig

274 275 276 277 278 279
Taken together, all these module options allow you to precisely customize
the driver behavior and test your application with all sorts of permutations.
It is also very suitable to emulate hardware that is not yet available, e.g.
when developing software for a new upcoming device.


280 281
Video Capture
-------------
282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299

This is probably the most frequently used feature. The video capture device
can be configured by using the module options num_inputs, input_types and
ccs_cap_mode (see section 1 for more detailed information), but by default
four inputs are configured: a webcam, a TV tuner, an S-Video and an HDMI
input, one input for each input type. Those are described in more detail
below.

Special attention has been given to the rate at which new frames become
available. The jitter will be around 1 jiffie (that depends on the HZ
configuration of your kernel, so usually 1/100, 1/250 or 1/1000 of a second),
but the long-term behavior is exactly following the framerate. So a
framerate of 59.94 Hz is really different from 60 Hz. If the framerate
exceeds your kernel's HZ value, then you will get dropped frames, but the
frame/field sequence counting will keep track of that so the sequence
count will skip whenever frames are dropped.


300 301
Webcam Input
~~~~~~~~~~~~
302 303 304 305 306 307 308 309 310 311

The webcam input supports three framesizes: 320x180, 640x360 and 1280x720. It
supports frames per second settings of 10, 15, 25, 30, 50 and 60 fps. Which ones
are available depends on the chosen framesize: the larger the framesize, the
lower the maximum frames per second.

The initially selected colorspace when you switch to the webcam input will be
sRGB.


312 313
TV and S-Video Inputs
~~~~~~~~~~~~~~~~~~~~~
314 315 316 317 318 319 320 321 322 323 324

The only difference between the TV and S-Video input is that the TV has a
tuner. Otherwise they behave identically.

These inputs support audio inputs as well: one TV and one Line-In. They
both support all TV standards. If the standard is queried, then the Vivid
controls 'Standard Signal Mode' and 'Standard' determine what
the result will be.

These inputs support all combinations of the field setting. Special care has
been taken to faithfully reproduce how fields are handled for the different
325
TV standards. This is particularly noticeable when generating a horizontally
326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343
moving image so the temporal effect of using interlaced formats becomes clearly
visible. For 50 Hz standards the top field is the oldest and the bottom field
is the newest in time. For 60 Hz standards that is reversed: the bottom field
is the oldest and the top field is the newest in time.

When you start capturing in V4L2_FIELD_ALTERNATE mode the first buffer will
contain the top field for 50 Hz standards and the bottom field for 60 Hz
standards. This is what capture hardware does as well.

Finally, for PAL/SECAM standards the first half of the top line contains noise.
This simulates the Wide Screen Signal that is commonly placed there.

The initially selected colorspace when you switch to the TV or S-Video input
will be SMPTE-170M.

The pixel aspect ratio will depend on the TV standard. The video aspect ratio
can be selected through the 'Standard Aspect Ratio' Vivid control.
Choices are '4x3', '16x9' which will give letterboxed widescreen video and
344
'16x9 Anamorphic' which will give full screen squashed anamorphic widescreen
345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367
video that will need to be scaled accordingly.

The TV 'tuner' supports a frequency range of 44-958 MHz. Channels are available
every 6 MHz, starting from 49.25 MHz. For each channel the generated image
will be in color for the +/- 0.25 MHz around it, and in grayscale for
+/- 1 MHz around the channel. Beyond that it is just noise. The VIDIOC_G_TUNER
ioctl will return 100% signal strength for +/- 0.25 MHz and 50% for +/- 1 MHz.
It will also return correct afc values to show whether the frequency is too
low or too high.

The audio subchannels that are returned are MONO for the +/- 1 MHz range around
a valid channel frequency. When the frequency is within +/- 0.25 MHz of the
channel it will return either MONO, STEREO, either MONO | SAP (for NTSC) or
LANG1 | LANG2 (for others), or STEREO | SAP.

Which one is returned depends on the chosen channel, each next valid channel
will cycle through the possible audio subchannel combinations. This allows
you to test the various combinations by just switching channels..

Finally, for these inputs the v4l2_timecode struct is filled in in the
dequeued v4l2_buffer struct.


368 369
HDMI Input
~~~~~~~~~~
370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394

The HDMI inputs supports all CEA-861 and DMT timings, both progressive and
interlaced, for pixelclock frequencies between 25 and 600 MHz. The field
mode for interlaced formats is always V4L2_FIELD_ALTERNATE. For HDMI the
field order is always top field first, and when you start capturing an
interlaced format you will receive the top field first.

The initially selected colorspace when you switch to the HDMI input or
select an HDMI timing is based on the format resolution: for resolutions
less than or equal to 720x576 the colorspace is set to SMPTE-170M, for
others it is set to REC-709 (CEA-861 timings) or sRGB (VESA DMT timings).

The pixel aspect ratio will depend on the HDMI timing: for 720x480 is it
set as for the NTSC TV standard, for 720x576 it is set as for the PAL TV
standard, and for all others a 1:1 pixel aspect ratio is returned.

The video aspect ratio can be selected through the 'DV Timings Aspect Ratio'
Vivid control. Choices are 'Source Width x Height' (just use the
same ratio as the chosen format), '4x3' or '16x9', either of which can
result in pillarboxed or letterboxed video.

For HDMI inputs it is possible to set the EDID. By default a simple EDID
is provided. You can only set the EDID for HDMI inputs. Internally, however,
the EDID is shared between all HDMI inputs.

395 396 397 398 399
No interpretation is done of the EDID data with the exception of the
physical address. See the CEC section for more details.

There is a maximum of 15 HDMI inputs (if there are more, then they will be
reduced to 15) since that's the limitation of the EDID physical address.
400 401


402 403
Video Output
------------
404 405 406 407 408 409 410 411 412 413

The video output device can be configured by using the module options
num_outputs, output_types and ccs_out_mode (see section 1 for more detailed
information), but by default two outputs are configured: an S-Video and an
HDMI input, one output for each output type. Those are described in more detail
below.

Like with video capture the framerate is also exact in the long term.


414 415
S-Video Output
~~~~~~~~~~~~~~
416 417 418 419 420 421 422 423 424 425

This output supports audio outputs as well: "Line-Out 1" and "Line-Out 2".
The S-Video output supports all TV standards.

This output supports all combinations of the field setting.

The initially selected colorspace when you switch to the TV or S-Video input
will be SMPTE-170M.


426 427
HDMI Output
~~~~~~~~~~~
428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443

The HDMI output supports all CEA-861 and DMT timings, both progressive and
interlaced, for pixelclock frequencies between 25 and 600 MHz. The field
mode for interlaced formats is always V4L2_FIELD_ALTERNATE.

The initially selected colorspace when you switch to the HDMI output or
select an HDMI timing is based on the format resolution: for resolutions
less than or equal to 720x576 the colorspace is set to SMPTE-170M, for
others it is set to REC-709 (CEA-861 timings) or sRGB (VESA DMT timings).

The pixel aspect ratio will depend on the HDMI timing: for 720x480 is it
set as for the NTSC TV standard, for 720x576 it is set as for the PAL TV
standard, and for all others a 1:1 pixel aspect ratio is returned.

An HDMI output has a valid EDID which can be obtained through VIDIOC_G_EDID.

444 445 446
There is a maximum of 15 HDMI outputs (if there are more, then they will be
reduced to 15) since that's the limitation of the EDID physical address. See
also the CEC section for more details.
447

448 449
VBI Capture
-----------
450 451 452 453 454 455 456 457 458

There are three types of VBI capture devices: those that only support raw
(undecoded) VBI, those that only support sliced (decoded) VBI and those that
support both. This is determined by the node_types module option. In all
cases the driver will generate valid VBI data: for 60 Hz standards it will
generate Closed Caption and XDS data. The closed caption stream will
alternate between "Hello world!" and "Closed captions test" every second.
The XDS stream will give the current time once a minute. For 50 Hz standards
it will generate the Wide Screen Signal which is based on the actual Video
459
Aspect Ratio control setting and teletext pages 100-159, one page per frame.
460 461 462 463 464

The VBI device will only work for the S-Video and TV inputs, it will give
back an error if the current input is a webcam or HDMI.


465 466
VBI Output
----------
467 468 469 470 471

There are three types of VBI output devices: those that only support raw
(undecoded) VBI, those that only support sliced (decoded) VBI and those that
support both. This is determined by the node_types module option.

472 473
The sliced VBI output supports the Wide Screen Signal and the teletext signal
for 50 Hz standards and Closed Captioning + XDS for 60 Hz standards.
474 475 476 477 478

The VBI device will only work for the S-Video output, it will give
back an error if the current output is HDMI.


479 480
Radio Receiver
--------------
481 482 483 484

The radio receiver emulates an FM/AM/SW receiver. The FM band also supports RDS.
The frequency ranges are:

485 486 487
	- FM: 64 MHz - 108 MHz
	- AM: 520 kHz - 1710 kHz
	- SW: 2300 kHz - 26.1 MHz
488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514

Valid channels are emulated every 1 MHz for FM and every 100 kHz for AM and SW.
The signal strength decreases the further the frequency is from the valid
frequency until it becomes 0% at +/- 50 kHz (FM) or 5 kHz (AM/SW) from the
ideal frequency. The initial frequency when the driver is loaded is set to
95 MHz.

The FM receiver supports RDS as well, both using 'Block I/O' and 'Controls'
modes. In the 'Controls' mode the RDS information is stored in read-only
controls. These controls are updated every time the frequency is changed,
or when the tuner status is requested. The Block I/O method uses the read()
interface to pass the RDS blocks on to the application for decoding.

The RDS signal is 'detected' for +/- 12.5 kHz around the channel frequency,
and the further the frequency is away from the valid frequency the more RDS
errors are randomly introduced into the block I/O stream, up to 50% of all
blocks if you are +/- 12.5 kHz from the channel frequency. All four errors
can occur in equal proportions: blocks marked 'CORRECTED', blocks marked
'ERROR', blocks marked 'INVALID' and dropped blocks.

The generated RDS stream contains all the standard fields contained in a
0B group, and also radio text and the current time.

The receiver supports HW frequency seek, either in Bounded mode, Wrap Around
mode or both, which is configurable with the "Radio HW Seek Mode" control.


515 516
Radio Transmitter
-----------------
517 518 519 520

The radio transmitter emulates an FM/AM/SW transmitter. The FM band also supports RDS.
The frequency ranges are:

521 522 523
	- FM: 64 MHz - 108 MHz
	- AM: 520 kHz - 1710 kHz
	- SW: 2300 kHz - 26.1 MHz
524 525 526 527 528 529 530 531 532

The initial frequency when the driver is loaded is 95.5 MHz.

The FM transmitter supports RDS as well, both using 'Block I/O' and 'Controls'
modes. In the 'Controls' mode the transmitted RDS information is configured
using controls, and in 'Block I/O' mode the blocks are passed to the driver
using write().


533 534
Software Defined Radio Receiver
-------------------------------
535 536 537 538 539 540 541 542 543 544 545 546 547

The SDR receiver has three frequency bands for the ADC tuner:

	- 300 kHz
	- 900 kHz - 2800 kHz
	- 3200 kHz

The RF tuner supports 50 MHz - 2000 MHz.

The generated data contains the In-phase and Quadrature components of a
1 kHz tone that has an amplitude of sqrt(2).


548 549
Controls
--------
550 551 552 553 554

Different devices support different controls. The sections below will describe
each control and which devices support them.


555 556
User Controls - Test Controls
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
557 558 559 560 561 562 563 564 565 566

The Button, Boolean, Integer 32 Bits, Integer 64 Bits, Menu, String, Bitmask and
Integer Menu are controls that represent all possible control types. The Menu
control and the Integer Menu control both have 'holes' in their menu list,
meaning that one or more menu items return EINVAL when VIDIOC_QUERYMENU is called.
Both menu controls also have a non-zero minimum control value.  These features
allow you to check if your application can handle such things correctly.
These controls are supported for every device type.


567 568
User Controls - Video Capture
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592

The following controls are specific to video capture.

The Brightness, Contrast, Saturation and Hue controls actually work and are
standard. There is one special feature with the Brightness control: each
video input has its own brightness value, so changing input will restore
the brightness for that input. In addition, each video input uses a different
brightness range (minimum and maximum control values). Switching inputs will
cause a control event to be sent with the V4L2_EVENT_CTRL_CH_RANGE flag set.
This allows you to test controls that can change their range.

The 'Gain, Automatic' and Gain controls can be used to test volatile controls:
if 'Gain, Automatic' is set, then the Gain control is volatile and changes
constantly. If 'Gain, Automatic' is cleared, then the Gain control is a normal
control.

The 'Horizontal Flip' and 'Vertical Flip' controls can be used to flip the
image. These combine with the 'Sensor Flipped Horizontally/Vertically' Vivid
controls.

The 'Alpha Component' control can be used to set the alpha component for
formats containing an alpha channel.


593 594
User Controls - Audio
~~~~~~~~~~~~~~~~~~~~~
595 596 597 598 599 600 601 602 603

The following controls are specific to video capture and output and radio
receivers and transmitters.

The 'Volume' and 'Mute' audio controls are typical for such devices to
control the volume and mute the audio. They don't actually do anything in
the vivid driver.


604 605
Vivid Controls
~~~~~~~~~~~~~~
606 607 608 609

These vivid custom controls control the image generation, error injection, etc.


610 611
Test Pattern Controls
^^^^^^^^^^^^^^^^^^^^^
612 613 614

The Test Pattern Controls are all specific to video capture.

615 616 617
- Test Pattern:

	selects which test pattern to use. Use the CSC Colorbar for
618 619 620 621
	testing colorspace conversions: the colors used in that test pattern
	map to valid colors in all colorspaces. The colorspace conversion
	is disabled for the other test patterns.

622 623 624
- OSD Text Mode:

	selects whether the text superimposed on the
625 626 627
	test pattern should be shown, and if so, whether only counters should
	be displayed or the full text.

628 629 630
- Horizontal Movement:

	selects whether the test pattern should
631 632
	move to the left or right and at what speed.

633 634 635 636 637
- Vertical Movement:

	does the same for the vertical direction.

- Show Border:
638

639
	show a two-pixel wide border at the edge of the actual image,
640 641
	excluding letter or pillarboxing.

642 643 644
- Show Square:

	show a square in the middle of the image. If the image is
645 646 647 648
	displayed with the correct pixel and image aspect ratio corrections,
	then the width and height of the square on the monitor should be
	the same.

649 650 651
- Insert SAV Code in Image:

	adds a SAV (Start of Active Video) code to the image.
652 653 654
	This can be used to check if such codes in the image are inadvertently
	interpreted instead of being ignored.

655
- Insert EAV Code in Image:
656

657
	does the same for the EAV (End of Active Video) code.
658

659 660 661

Capture Feature Selection Controls
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
662 663 664

These controls are all specific to video capture.

665 666 667
- Sensor Flipped Horizontally:

	the image is flipped horizontally and the
668 669 670
	V4L2_IN_ST_HFLIP input status flag is set. This emulates the case where
	a sensor is for example mounted upside down.

671 672 673
- Sensor Flipped Vertically:

	the image is flipped vertically and the
674
	V4L2_IN_ST_VFLIP input status flag is set. This emulates the case where
675 676 677
	a sensor is for example mounted upside down.

- Standard Aspect Ratio:
678

679
	selects if the image aspect ratio as used for the TV or
680 681 682
	S-Video input should be 4x3, 16x9 or anamorphic widescreen. This may
	introduce letterboxing.

683 684 685
- DV Timings Aspect Ratio:

	selects if the image aspect ratio as used for the HDMI
686 687 688
	input should be the same as the source width and height ratio, or if
	it should be 4x3 or 16x9. This may introduce letter or pillarboxing.

689 690 691
- Timestamp Source:

	selects when the timestamp for each buffer is taken.
692

693 694 695
- Colorspace:

	selects which colorspace should be used when generating the image.
696
	This only applies if the CSC Colorbar test pattern is selected,
697 698
	otherwise the test pattern will go through unconverted.
	This behavior is also what you want, since a 75% Colorbar
699 700 701 702 703 704
	should really have 75% signal intensity and should not be affected
	by colorspace conversions.

	Changing the colorspace will result in the V4L2_EVENT_SOURCE_CHANGE
	to be sent since it emulates a detected colorspace change.

705 706 707
- Transfer Function:

	selects which colorspace transfer function should be used when
708 709
	generating an image. This only applies if the CSC Colorbar test pattern is
	selected, otherwise the test pattern will go through unconverted.
710 711 712
	This behavior is also what you want, since a 75% Colorbar
	should really have 75% signal intensity and should not be affected
	by colorspace conversions.
713 714 715 716

	Changing the transfer function will result in the V4L2_EVENT_SOURCE_CHANGE
	to be sent since it emulates a detected colorspace change.

717 718 719
- Y'CbCr Encoding:

	selects which Y'CbCr encoding should be used when generating
720 721
	a Y'CbCr image.	This only applies if the format is set to a Y'CbCr format
	as opposed to an RGB format.
722 723 724 725

	Changing the Y'CbCr encoding will result in the V4L2_EVENT_SOURCE_CHANGE
	to be sent since it emulates a detected colorspace change.

726 727 728
- Quantization:

	selects which quantization should be used for the RGB or Y'CbCr
729
	encoding when generating the test pattern.
730 731 732 733

	Changing the quantization will result in the V4L2_EVENT_SOURCE_CHANGE
	to be sent since it emulates a detected colorspace change.

734 735 736
- Limited RGB Range (16-235):

	selects if the RGB range of the HDMI source should
737 738 739 740 741
	be limited or full range. This combines with the Digital Video 'Rx RGB
	Quantization Range' control and can be used to test what happens if
	a source provides you with the wrong quantization range information.
	See the description of that control for more details.

742 743 744
- Apply Alpha To Red Only:

	apply the alpha channel as set by the 'Alpha Component'
745 746
	user control to the red color of the test pattern only.

747 748 749
- Enable Capture Cropping:

	enables crop support. This control is only present if
750 751 752
	the ccs_cap_mode module option is set to the default value of -1 and if
	the no_error_inj module option is set to 0 (the default).

753 754 755
- Enable Capture Composing:

	enables composing support. This control is only
756 757 758
	present if the ccs_cap_mode module option is set to the default value of
	-1 and if the no_error_inj module option is set to 0 (the default).

759 760 761
- Enable Capture Scaler:

	enables support for a scaler (maximum 4 times upscaling
762 763 764 765
	and downscaling). This control is only present if the ccs_cap_mode
	module option is set to the default value of -1 and if the no_error_inj
	module option is set to 0 (the default).

766 767 768
- Maximum EDID Blocks:

	determines how many EDID blocks the driver supports.
769 770 771 772
	Note that the vivid driver does not actually interpret new EDID
	data, it just stores it. It allows for up to 256 EDID blocks
	which is the maximum supported by the standard.

773 774 775
- Fill Percentage of Frame:

	can be used to draw only the top X percent
776 777 778 779 780 781
	of the image. Since each frame has to be drawn by the driver, this
	demands a lot of the CPU. For large resolutions this becomes
	problematic. By drawing only part of the image this CPU load can
	be reduced.


782 783
Output Feature Selection Controls
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
784 785 786

These controls are all specific to video output.

787 788 789
- Enable Output Cropping:

	enables crop support. This control is only present if
790 791 792
	the ccs_out_mode module option is set to the default value of -1 and if
	the no_error_inj module option is set to 0 (the default).

793 794 795
- Enable Output Composing:

	enables composing support. This control is only
796 797 798
	present if the ccs_out_mode module option is set to the default value of
	-1 and if the no_error_inj module option is set to 0 (the default).

799 800 801
- Enable Output Scaler:

	enables support for a scaler (maximum 4 times upscaling
802 803 804 805 806
	and downscaling). This control is only present if the ccs_out_mode
	module option is set to the default value of -1 and if the no_error_inj
	module option is set to 0 (the default).


807 808
Error Injection Controls
^^^^^^^^^^^^^^^^^^^^^^^^
809 810 811

The following two controls are only valid for video and vbi capture.

812 813 814
- Standard Signal Mode:

	selects the behavior of VIDIOC_QUERYSTD: what should it return?
815 816 817 818 819

	Changing this control will result in the V4L2_EVENT_SOURCE_CHANGE
	to be sent since it emulates a changed input condition (e.g. a cable
	was plugged in or out).

820 821 822
- Standard:

	selects the standard that VIDIOC_QUERYSTD should return if the
823 824 825 826 827 828 829 830
	previous control is set to "Selected Standard".

	Changing this control will result in the V4L2_EVENT_SOURCE_CHANGE
	to be sent since it emulates a changed input standard.


The following two controls are only valid for video capture.

831
- DV Timings Signal Mode:
832

833
	selects the behavior of VIDIOC_QUERY_DV_TIMINGS: what
834 835 836 837 838 839
	should it return?

	Changing this control will result in the V4L2_EVENT_SOURCE_CHANGE
	to be sent since it emulates a changed input condition (e.g. a cable
	was plugged in or out).

840 841 842
- DV Timings:

	selects the timings the VIDIOC_QUERY_DV_TIMINGS should return
843 844 845 846 847 848 849 850 851 852 853
	if the previous control is set to "Selected DV Timings".

	Changing this control will result in the V4L2_EVENT_SOURCE_CHANGE
	to be sent since it emulates changed input timings.


The following controls are only present if the no_error_inj module option
is set to 0 (the default). These controls are valid for video and vbi
capture and output streams and for the SDR capture device except for the
Disconnect control which is valid for all devices.

854 855 856
- Wrap Sequence Number:

	test what happens when you wrap the sequence number in
857 858
	struct v4l2_buffer around.

859 860 861
- Wrap Timestamp:

	test what happens when you wrap the timestamp in struct
862 863
	v4l2_buffer around.

864 865 866
- Percentage of Dropped Buffers:

	sets the percentage of buffers that
867 868
	are never returned by the driver (i.e., they are dropped).

869 870 871
- Disconnect:

	emulates a USB disconnect. The device will act as if it has
872 873 874
	been disconnected. Only after all open filehandles to the device
	node have been closed will the device become 'connected' again.

875 876 877
- Inject V4L2_BUF_FLAG_ERROR:

	when pressed, the next frame returned by
878 879 880
	the driver will have the error flag set (i.e. the frame is marked
	corrupt).

881 882 883
- Inject VIDIOC_REQBUFS Error:

	when pressed, the next REQBUFS or CREATE_BUFS
884 885 886
	ioctl call will fail with an error. To be precise: the videobuf2
	queue_setup() op will return -EINVAL.

887 888 889
- Inject VIDIOC_QBUF Error:

	when pressed, the next VIDIOC_QBUF or
890 891 892
	VIDIOC_PREPARE_BUFFER ioctl call will fail with an error. To be
	precise: the videobuf2 buf_prepare() op will return -EINVAL.

893 894 895
- Inject VIDIOC_STREAMON Error:

	when pressed, the next VIDIOC_STREAMON ioctl
896 897 898
	call will fail with an error. To be precise: the videobuf2
	start_streaming() op will return -EINVAL.

899 900 901
- Inject Fatal Streaming Error:

	when pressed, the streaming core will be
902 903 904 905 906
	marked as having suffered a fatal error, the only way to recover
	from that is to stop streaming. To be precise: the videobuf2
	vb2_queue_error() function is called.


907 908 909 910
VBI Raw Capture Controls
^^^^^^^^^^^^^^^^^^^^^^^^

- Interlaced VBI Format:
911

912
	if set, then the raw VBI data will be interlaced instead
913 914 915
	of providing it grouped by field.


916 917
Digital Video Controls
~~~~~~~~~~~~~~~~~~~~~~
918

919 920 921
- Rx RGB Quantization Range:

	sets the RGB quantization detection of the HDMI
922 923 924 925 926 927 928 929
	input. This combines with the Vivid 'Limited RGB Range (16-235)'
	control and can be used to test what happens if a source provides
	you with the wrong quantization range information. This can be tested
	by selecting an HDMI input, setting this control to Full or Limited
	range and selecting the opposite in the 'Limited RGB Range (16-235)'
	control. The effect is easy to see if the 'Gray Ramp' test pattern
	is selected.

930 931 932
- Tx RGB Quantization Range:

	sets the RGB quantization detection of the HDMI
933 934 935
	output. It is currently not used for anything in vivid, but most HDMI
	transmitters would typically have this control.

936 937 938
- Transmit Mode:

	sets the transmit mode of the HDMI output to HDMI or DVI-D. This
939 940 941 942
	affects the reported colorspace since DVI_D outputs will always use
	sRGB.


943 944 945 946 947 948 949 950 951 952 953 954
FM Radio Receiver Controls
~~~~~~~~~~~~~~~~~~~~~~~~~~

- RDS Reception:

	set if the RDS receiver should be enabled.

- RDS Program Type:


- RDS PS Name:

955

956
- RDS Radio Text:
957

958 959 960 961 962 963 964 965 966 967

- RDS Traffic Announcement:


- RDS Traffic Program:


- RDS Music:

	these are all read-only controls. If RDS Rx I/O Mode is set to
968
	"Block I/O", then they are inactive as well. If RDS Rx I/O Mode is set
969 970 971 972
	to "Controls", then these controls report the received RDS data.

.. note::
	The vivid implementation of this is pretty basic: they are only
973 974 975
	updated when you set a new frequency or when you get the tuner status
	(VIDIOC_G_TUNER).

976 977 978
- Radio HW Seek Mode:

	can be one of "Bounded", "Wrap Around" or "Both". This
979 980 981
	determines if VIDIOC_S_HW_FREQ_SEEK will be bounded by the frequency
	range or wrap-around or if it is selectable by the user.

982 983 984
- Radio Programmable HW Seek:

	if set, then the user can provide the lower and
985 986 987
	upper bound of the HW Seek. Otherwise the frequency range boundaries
	will be used.

988 989 990
- Generate RBDS Instead of RDS:

	if set, then generate RBDS (the US variant of
991 992 993
	RDS) data instead of RDS (European-style RDS). This affects only the
	PICODE and PTY codes.

994 995 996
- RDS Rx I/O Mode:

	this can be "Block I/O" where the RDS blocks have to be read()
997 998 999 1000
	by the application, or "Controls" where the RDS data is provided by
	the RDS controls mentioned above.


1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036
FM Radio Modulator Controls
~~~~~~~~~~~~~~~~~~~~~~~~~~~

- RDS Program ID:


- RDS Program Type:


- RDS PS Name:


- RDS Radio Text:


- RDS Stereo:


- RDS Artificial Head:


- RDS Compressed:


- RDS Dynamic PTY:


- RDS Traffic Announcement:


- RDS Traffic Program:


- RDS Music:

	these are all controls that set the RDS data that is transmitted by
1037 1038
	the FM modulator.

1039
- RDS Tx I/O Mode:
1040

1041 1042 1043
	this can be "Block I/O" where the application has to use write()
	to pass the RDS blocks to the driver, or "Controls" where the RDS data
	is Provided by the RDS controls mentioned above.
1044

1045 1046 1047

Video, VBI and RDS Looping
--------------------------
1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062

The vivid driver supports looping of video output to video input, VBI output
to VBI input and RDS output to RDS input. For video/VBI looping this emulates
as if a cable was hooked up between the output and input connector. So video
and VBI looping is only supported between S-Video and HDMI inputs and outputs.
VBI is only valid for S-Video as it makes no sense for HDMI.

Since radio is wireless this looping always happens if the radio receiver
frequency is close to the radio transmitter frequency. In that case the radio
transmitter will 'override' the emulated radio stations.

Looping is currently supported only between devices created by the same
vivid driver instance.


1063 1064
Video and Sliced VBI looping
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1065 1066 1067

The way to enable video/VBI looping is currently fairly crude. A 'Loop Video'
control is available in the "Vivid" control class of the video
1068
capture and VBI capture devices. When checked the video looping will be enabled.
1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091
Once enabled any video S-Video or HDMI input will show a static test pattern
until the video output has started. At that time the video output will be
looped to the video input provided that:

- the input type matches the output type. So the HDMI input cannot receive
  video from the S-Video output.

- the video resolution of the video input must match that of the video output.
  So it is not possible to loop a 50 Hz (720x576) S-Video output to a 60 Hz
  (720x480) S-Video input, or a 720p60 HDMI output to a 1080p30 input.

- the pixel formats must be identical on both sides. Otherwise the driver would
  have to do pixel format conversion as well, and that's taking things too far.

- the field settings must be identical on both sides. Same reason as above:
  requiring the driver to convert from one field format to another complicated
  matters too much. This also prohibits capturing with 'Field Top' or 'Field
  Bottom' when the output video is set to 'Field Alternate'. This combination,
  while legal, became too complicated to support. Both sides have to be 'Field
  Alternate' for this to work. Also note that for this specific case the
  sequence and field counting in struct v4l2_buffer on the capture side may not
  be 100% accurate.

1092 1093 1094 1095 1096
- field settings V4L2_FIELD_SEQ_TB/BT are not supported. While it is possible to
  implement this, it would mean a lot of work to get this right. Since these
  field values are rarely used the decision was made not to implement this for
  now.

1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108
- on the input side the "Standard Signal Mode" for the S-Video input or the
  "DV Timings Signal Mode" for the HDMI input should be configured so that a
  valid signal is passed to the video input.

The framerates do not have to match, although this might change in the future.

By default you will see the OSD text superimposed on top of the looped video.
This can be turned off by changing the "OSD Text Mode" control of the video
capture device.

For VBI looping to work all of the above must be valid and in addition the vbi
output must be configured for sliced VBI. The VBI capture side can be configured
1109 1110
for either raw or sliced VBI. Note that at the moment only CC/XDS (60 Hz formats)
and WSS (50 Hz formats) VBI data is looped. Teletext VBI data is not looped.
1111 1112


1113 1114
Radio & RDS Looping
~~~~~~~~~~~~~~~~~~~
1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127

As mentioned in section 6 the radio receiver emulates stations are regular
frequency intervals. Depending on the frequency of the radio receiver a
signal strength value is calculated (this is returned by VIDIOC_G_TUNER).
However, it will also look at the frequency set by the radio transmitter and
if that results in a higher signal strength than the settings of the radio
transmitter will be used as if it was a valid station. This also includes
the RDS data (if any) that the transmitter 'transmits'. This is received
faithfully on the receiver side. Note that when the driver is loaded the
frequencies of the radio receiver and transmitter are not identical, so
initially no looping takes place.


1128 1129
Cropping, Composing, Scaling
----------------------------
1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161

This driver supports cropping, composing and scaling in any combination. Normally
which features are supported can be selected through the Vivid controls,
but it is also possible to hardcode it when the module is loaded through the
ccs_cap_mode and ccs_out_mode module options. See section 1 on the details of
these module options.

This allows you to test your application for all these variations.

Note that the webcam input never supports cropping, composing or scaling. That
only applies to the TV/S-Video/HDMI inputs and outputs. The reason is that
webcams, including this virtual implementation, normally use
VIDIOC_ENUM_FRAMESIZES to list a set of discrete framesizes that it supports.
And that does not combine with cropping, composing or scaling. This is
primarily a limitation of the V4L2 API which is carefully reproduced here.

The minimum and maximum resolutions that the scaler can achieve are 16x16 and
(4096 * 4) x (2160 x 4), but it can only scale up or down by a factor of 4 or
less. So for a source resolution of 1280x720 the minimum the scaler can do is
320x180 and the maximum is 5120x2880. You can play around with this using the
qv4l2 test tool and you will see these dependencies.

This driver also supports larger 'bytesperline' settings, something that
VIDIOC_S_FMT allows but that few drivers implement.

The scaler is a simple scaler that uses the Coarse Bresenham algorithm. It's
designed for speed and simplicity, not quality.

If the combination of crop, compose and scaling allows it, then it is possible
to change crop and compose rectangles on the fly.


1162 1163
Formats
-------
1164

1165 1166 1167
The driver supports all the regular packed and planar 4:4:4, 4:2:2 and 4:2:0
YUYV formats, 8, 16, 24 and 32 RGB packed formats and various multiplanar
formats.
1168 1169 1170 1171 1172 1173 1174

The alpha component can be set through the 'Alpha Component' User control
for those formats that support it. If the 'Apply Alpha To Red Only' control
is set, then the alpha component is only used for the color red and set to
0 otherwise.

The driver has to be configured to support the multiplanar formats. By default
1175 1176
the driver instances are single-planar. This can be changed by setting the
multiplanar module option, see section 1 for more details on that option.
1177 1178 1179 1180 1181 1182 1183 1184 1185

If the driver instance is using the multiplanar formats/API, then the first
single planar format (YUYV) and the multiplanar NV16M and NV61M formats the
will have a plane that has a non-zero data_offset of 128 bytes. It is rare for
data_offset to be non-zero, so this is a useful feature for testing applications.

Video output will also honor any data_offset that the application set.


1186 1187
Capture Overlay
---------------
1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219

Note: capture overlay support is implemented primarily to test the existing
V4L2 capture overlay API. In practice few if any GPUs support such overlays
anymore, and neither are they generally needed anymore since modern hardware
is so much more capable. By setting flag 0x10000 in the node_types module
option the vivid driver will create a simple framebuffer device that can be
used for testing this API. Whether this API should be used for new drivers is
questionable.

This driver has support for a destructive capture overlay with bitmap clipping
and list clipping (up to 16 rectangles) capabilities. Overlays are not
supported for multiplanar formats. It also honors the struct v4l2_window field
setting: if it is set to FIELD_TOP or FIELD_BOTTOM and the capture setting is
FIELD_ALTERNATE, then only the top or bottom fields will be copied to the overlay.

The overlay only works if you are also capturing at that same time. This is a
vivid limitation since it copies from a buffer to the overlay instead of
filling the overlay directly. And if you are not capturing, then no buffers
are available to fill.

In addition, the pixelformat of the capture format and that of the framebuffer
must be the same for the overlay to work. Otherwise VIDIOC_OVERLAY will return
an error.

In order to really see what it going on you will need to create two vivid
instances: the first with a framebuffer enabled. You configure the capture
overlay of the second instance to use the framebuffer of the first, then
you start capturing in the second instance. For the first instance you setup
the output overlay for the video output, turn on video looping and capture
to see the blended framebuffer overlay that's being written to by the second
instance. This setup would require the following commands:

1220 1221
.. code-block:: none

1222
	$ sudo modprobe vivid n_devs=2 node_types=0x10101,0x1
1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238
	$ v4l2-ctl -d1 --find-fb
	/dev/fb1 is the framebuffer associated with base address 0x12800000
	$ sudo v4l2-ctl -d2 --set-fbuf fb=1
	$ v4l2-ctl -d1 --set-fbuf fb=1
	$ v4l2-ctl -d0 --set-fmt-video=pixelformat='AR15'
	$ v4l2-ctl -d1 --set-fmt-video-out=pixelformat='AR15'
	$ v4l2-ctl -d2 --set-fmt-video=pixelformat='AR15'
	$ v4l2-ctl -d0 -i2
	$ v4l2-ctl -d2 -i2
	$ v4l2-ctl -d2 -c horizontal_movement=4
	$ v4l2-ctl -d1 --overlay=1
	$ v4l2-ctl -d1 -c loop_video=1
	$ v4l2-ctl -d2 --stream-mmap --overlay=1

And from another console:

1239 1240
.. code-block:: none

1241 1242 1243 1244
	$ v4l2-ctl -d1 --stream-out-mmap

And yet another console:

1245 1246
.. code-block:: none

1247 1248 1249 1250 1251 1252 1253
	$ qv4l2

and start streaming.

As you can see, this is not for the faint of heart...


1254 1255
Output Overlay
--------------
1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286

Note: output overlays are primarily implemented in order to test the existing
V4L2 output overlay API. Whether this API should be used for new drivers is
questionable.

This driver has support for an output overlay and is capable of:

	- bitmap clipping,
	- list clipping (up to 16 rectangles)
	- chromakey
	- source chromakey
	- global alpha
	- local alpha
	- local inverse alpha

Output overlays are not supported for multiplanar formats. In addition, the
pixelformat of the capture format and that of the framebuffer must be the
same for the overlay to work. Otherwise VIDIOC_OVERLAY will return an error.

Output overlays only work if the driver has been configured to create a
framebuffer by setting flag 0x10000 in the node_types module option. The
created framebuffer has a size of 720x576 and supports ARGB 1:5:5:5 and
RGB 5:6:5.

In order to see the effects of the various clipping, chromakeying or alpha
processing capabilities you need to turn on video looping and see the results
on the capture side. The use of the clipping, chromakeying or alpha processing
capabilities will slow down the video loop considerably as a lot of checks have
to be done per pixel.


1287 1288
CEC (Consumer Electronics Control)
----------------------------------
1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305

If there are HDMI inputs then a CEC adapter will be created that has
the same number of input ports. This is the equivalent of e.g. a TV that
has that number of inputs. Each HDMI output will also create a
CEC adapter that is hooked up to the corresponding input port, or (if there
are more outputs than inputs) is not hooked up at all. In other words,
this is the equivalent of hooking up each output device to an input port of
the TV. Any remaining output devices remain unconnected.

The EDID that each output reads reports a unique CEC physical address that is
based on the physical address of the EDID of the input. So if the EDID of the
receiver has physical address A.B.0.0, then each output will see an EDID
containing physical address A.B.C.0 where C is 1 to the number of inputs. If
there are more outputs than inputs then the remaining outputs have a CEC adapter
that is disabled and reports an invalid physical address.


1306 1307
Some Future Improvements
------------------------
1308 1309 1310 1311 1312 1313 1314

Just as a reminder and in no particular order:

- Add a virtual alsa driver to test audio
- Add virtual sub-devices and media controller support
- Some support for testing compressed video
- Add support to loop raw VBI output to raw VBI input
1315
- Add support to loop teletext sliced VBI output to VBI input
1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328
- Fix sequence/field numbering when looping of video with alternate fields
- Add support for V4L2_CID_BG_COLOR for video outputs
- Add ARGB888 overlay support: better testing of the alpha channel
- Improve pixel aspect support in the tpg code by passing a real v4l2_fract
- Use per-queue locks and/or per-device locks to improve throughput
- Add support to loop from a specific output to a specific input across
  vivid instances
- The SDR radio should use the same 'frequencies' for stations as the normal
  radio receiver, and give back noise if the frequency doesn't match up with
  a station frequency
- Make a thread for the RDS generation, that would help in particular for the
  "Controls" RDS Rx I/O Mode as the read-only RDS controls could be updated
  in real-time.
1329
- Changing the EDID should cause hotplug detect emulation to happen.