code:
.. SPDX-License-Identifier: GPL-2.0

===================================
Building support for a media device
===================================

The first step is to download the Kernel's source code, either via a
distribution-specific source file or via the Kernel's main git tree\ [1]_.

Please notice, however, that, if:

- you're a braveheart and want to experiment with new stuff;
- if you want to report a bug;
- if you're developing new patches

you should use the main media development tree ``master`` branch:

    https://git.linuxtv.org/media_tree.git/

In this case, you may find some useful information at the
`LinuxTv wiki pages <https://linuxtv.org/wiki>`_:

    https://linuxtv.org/wiki/index.php/How_to_Obtain,_Build_and_Install_V4L-DVB_Device_Drivers

.. [1] The upstream Linux Kernel development tree is located at

       https://git.kernel.org/pub/scm/li  nux/kernel/git/torvalds/linux.git/

Configuring the Linux Kernel
============================

You can access a menu of Kernel building options with::

    $ make menuconfig

Then, select all desired options and exit it, saving the configuration.

The changed configuration will be at the ``.config`` file. It would
look like::

    ...
    # CONFIG_RC_CORE is not set
    # CONFIG_CEC_CORE is not set
    CONFIG_MEDIA_SUPPORT=m
    CONFIG_MEDIA_SUPPORT_FILTER=y
    ...

The media subsystem is controlled by those menu configuration options::

    Device Drivers --->
	<M> Remote Controller support  --->
	[ ] HDMI CEC RC integration
	[ ] Enable CEC error injection support
	[*] HDMI CEC drivers  --->
	<*> Multimedia support  --->

The ``Remote Controller support`` option enables the core support for
remote controllers\ [2]_.

The ``HDMI CEC RC integration`` option enables integration of HDMI CEC
with Linux, allowing to receive data via HDMI CEC as if it were produced
by a remote controller directly connected to the machine.

The ``HDMI CEC drivers`` option allow selecting platform and USB drivers
that receives and/or transmits CEC codes via HDMI interfaces\ [3]_.

The last option (``Multimedia support``) enables support for cameras,
audio/video grabbers and TV.

The media subsystem support can either be built together with the main
Kernel or as a module. For most use cases, it is preferred to have it
built as modules.

.. note::

   Instead of using a menu, the Kernel provides a script with allows
   enabling configuration options directly. To enable media support
   and remote controller support using Kernel modules, you could use::

	$ scripts/config -m RC_CORE
	$ scripts/config -m MEDIA_SUPPORT

.. [2] ``Remote Controller support`` should also be enabled if you
       want to use some TV card drivers that may depend on the remote
       controller core support.

.. [3] Please notice that the DRM subsystem also have drivers for GPUs
       that use the media HDMI CEC support.

       Those GPU-specific drivers are selected via the ``Graphics support``
       menu, under ``Device Drivers``.

       When a GPU driver supports HDMI CEC, it will automatically
       enable the CEC core support at the media subsystem.

Media dependencies
------------------

It should be noticed that enabling the above from a clean config is
usually not enough. The media subsystem depends on several other Linux
core support in order to work.

For example, most media devices use a serial communication bus in
order to talk with some peripherals. Such bus is called I²C
(Inter-Integrated Circuit). In order to be able to build support
for such hardware, the I²C bus support should be enabled, either via
menu or with::

    ./scripts/config -m I2C

Another example: the remote controller core requires support for
input devices, with can be enabled with::

    ./scripts/config -m INPUT

Other core functionality may also be needed (like PCI and/or USB support),
depending on the specific driver(s) you would like to enable.

Enabling Remote Controller Support
----------------------------------

The remote controller menu allows selecting drivers for specific devices.
It's menu looks like this::

         --- Remote Controller support
         <M>   Compile Remote Controller keymap modules
         [*]   LIRC user interface
         [*]     Support for eBPF programs attached to lirc devices
         [*]   Remote controller decoders  --->
         [*]   Remote Controller devices  --->

The ``Compile Remote Controller keymap modules`` option creates key maps for
several popular remote controllers.

The ``LIRC user interface`` option adds enhanced functionality when using the
``lirc`` program, by enabling an API that allows userspace to receive raw data
from remote controllers.

The ``Support for eBPF programs attached to lirc devices`` option allows
the usage of special programs (called eBPF) that would allow aplications
to add extra remote controller decoding functionality to the Linux Kernel.

The ``Remote controller decoders`` option allows selecting the
protocols that will be recognized by the Linux Kernel. Except if you
want to disable some specific decoder, it is suggested to keep all
sub-options enabled.

The ``Remote Controller devices`` allows you to select the drivers
that would be needed to support your device.

The same configuration can also be set via the ``script/config``
script. So, for instance, in order to support the ITE remote controller
driver (found on Intel NUCs and on some ASUS x86 desktops), you could do::

	$ scripts/config -e INPUT
	$ scripts/config -e ACPI
	$ scripts/config -e MODULES
	$ scripts/config -m RC_CORE
	$ scripts/config -e RC_DEVICES
	$ scripts/config -e RC_DECODERS
	$ scripts/config -m IR_RC5_DECODER
	$ scripts/config -m IR_ITE_CIR

Enabling HDMI CEC Support
-------------------------

The HDMI CEC support is set automatically when a driver requires it. So,
all you need to do is to enable support either for a graphics card
that needs it or by one of the existing HDMI drivers.

The HDMI-specific drivers are available at the ``HDMI CEC drivers``
menu\ [4]_::

	--- HDMI CEC drivers
	< >   ChromeOS EC CEC driver
	< >   Amlogic Meson AO CEC driver
	< >   Amlogic Meson G12A AO CEC driver
	< >   Generic GPIO-based CEC driver
	< >   Samsung S5P CEC driver
	< >   STMicroelectronics STiH4xx HDMI CEC driver
	< >   STMicroelectronics STM32 HDMI CEC driver
	< >   Tegra HDMI CEC driver
	< >   SECO Boards HDMI CEC driver
	[ ]     SECO Boards IR RC5 support
	< >   Pulse Eight HDMI CEC
	< >   RainShadow Tech HDMI CEC

.. [4] The above contents is just an example. The actual options for
       HDMI devices depends on the system's architecture and may vary
       on new Kernels.

Enabling Media Support
----------------------

The Media menu has a lot more options than the remote controller menu.
Once selected, you should see the following options::

	--- Media support
	[ ] Filter media drivers
	[*] Autoselect ancillary drivers
	    Media device types --->
	    Media core support --->
	    Video4Linux options --->
	    Media controller options --->
	    Digital TV options --->
	    HDMI CEC options --->
	    Media drivers --->
	    Media ancillary drivers --->

Except if you know exactly what you're doing, or if you want to build
a driver for a SoC platform, it is strongly recommended to keep the
``Autoselect ancillary drivers`` option turned on, as it will auto-select
the needed I²C ancillary drivers.

There are now two ways to select media device drivers, as described
below.

``Filter media drivers`` menu
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

This menu is meant to easy setup for PC and Laptop hardware. It works
by letting the user to specify what kind of media drivers are desired,
with those options::

	[ ] Cameras and video grabbers
	[ ] Analog TV
	[ ] Digital TV
	[ ] AM/FM radio receivers/transmitters
	[ ] Software defined radio
	[ ] Platform-specific devices
	[ ] Test drivers

So, if you want to add support to a camera or video grabber only,
select just the first option. Multiple options are allowed.

Once the options on this menu are selected, the building system will
auto-select the needed core drivers in order to support the selected
functionality.

.. note::

   Most TV cards are hybrid: they support both Analog TV and Digital TV.

   If you have an hybrid card, you may need to enable both ``Analog TV``
   and ``Digital TV`` at the menu.

When using this option, the defaults for the media support core
functionality are usually good enough to provide the basic functionality
for the driver. Yet, you could manually enable some desired extra (optional)
functionality using the settings under each of the following
``Media support`` sub-menus::

	    Media core support --->
	    Video4Linux options --->
	    Media controller options --->
	    Digital TV options --->
	    HDMI CEC options --->

Once you select the desired filters, the drivers that matches the filtering
criteria will be available at the ``Media support->Media drivers`` sub-menu.

``Media Core Support`` menu without filtering
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

If you disable the ``Filter media drivers`` menu, all drivers available
for your system whose dependencies are met should be shown at the
``Media drivers`` menu.

Please notice, however, that you should first ensure that the
``Media Core Support`` menu has all the core functionality your drivers
would need, as otherwise the corresponding device drivers won't be shown.

Example
-------

In order to enable modular support for one of the boards listed on
:doc:`this table <cx231xx-cardlist>`, with modular media core modules, the
``.config`` file should contain those lines::

    CONFIG_MODULES=y
    CONFIG_USB=y
    CONFIG_I2C=y
    CONFIG_INPUT=y
    CONFIG_RC_CORE=m
    CONFIG_MEDIA_SUPPORT=m
    CONFIG_MEDIA_SUPPORT_FILTER=y
    CONFIG_MEDIA_ANALOG_TV_SUPPORT=y
    CONFIG_MEDIA_DIGITAL_TV_SUPPORT=y
    CONFIG_MEDIA_USB_SUPPORT=y
    CONFIG_VIDEO_CX231XX=y
    CONFIG_VIDEO_CX231XX_DVB=y

Building and installing a new Kernel
====================================

Once the ``.config`` file has everything needed, all it takes to build
is to run the ``make`` command::

    $ make

And then install the new Kernel and its modules::

    $ sudo make modules_install
    $ sudo make install

Building just the new media drivers and core
============================================

Running a new development Kernel from the development tree is usually risky,
because it may have experimental changes that may have bugs. So, there are
some ways to build just the new drivers, using alternative trees.

There is the `Linux Kernel backports project
<https://backports.wiki.kernel.org/index.php/Main_Page>`_, with contains
newer drivers meant to be compiled against stable Kernels.

The LinuxTV developers, with are responsible for maintaining the media
subsystem also maintains a backport tree, with just the media drivers
daily updated from the newest kernel. Such tree is available at:

https://git.linuxtv.org/media_build.git/

It should be noticed that, while it should be relatively safe to use the
``media_build`` tree for testing purposes, there are not warranties that
it would work (or even build) on a random Kernel. This tree is maintained
using a "best-efforts" principle, as time permits us to fix issues there.

If you notice anything wrong on it, feel free to submit patches at the
Linux media subsystem's mailing list: media@vger.kernel.org. Please
add ``[PATCH media-build]`` at the e-mail's subject if you submit a new
patch for the media-build.

Before using it, you should run::

    $ ./build

.. note::

    1) you may need to run it twice if the ``media-build`` tree gets
       updated;
    2) you may need to do a ``make distclean`` if you had built it
       in the past for a different Kernel version than the one you're
       currently using;
    3) by default, it will use the same config options for media as
       the ones defined on the Kernel you're running.

In order to select different drivers or different config options,
use::

    $ make menuconfig

Then, you can build and install the new drivers::

    $ make && sudo make install

This will override the previous media drivers that your Kernel were
using.


code:
.. SPDX-License-Identifier: GPL-2.0

The cafe_ccic driver
====================

Author: Jonathan Corbet <corbet@lwn.net>

Introduction
------------

"cafe_ccic" is a driver for the Marvell 88ALP01 "cafe" CMOS camera
controller.  This is the controller found in first-generation OLPC systems,
and this driver was written with support from the OLPC project.

Current status: the core driver works.  It can generate data in YUV422,
RGB565, and RGB444 formats.  (Anybody looking at the code will see RGB32 as
well, but that is a debugging aid which will be removed shortly).  VGA and
QVGA modes work; CIF is there but the colors remain funky.  Only the OV7670
sensor is known to work with this controller at this time.

To try it out: either of these commands will work:

.. code-block:: none

     $ mplayer tv:// -tv driver=v4l2:width=640:height=480 -nosound
     $ mplayer tv:// -tv driver=v4l2:width=640:height=480:outfmt=bgr16 -nosound

The "xawtv" utility also works; gqcam does not, for unknown reasons.

Load time options
-----------------

There are a few load-time options, most of which can be changed after
loading via sysfs as well:

 - alloc_bufs_at_load:  Normally, the driver will not allocate any DMA
   buffers until the time comes to transfer data.  If this option is set,
   then worst-case-sized buffers will be allocated at module load time.
   This option nails down the memory for the life of the module, but
   perhaps decreases the chances of an allocation failure later on.

 - dma_buf_size: The size of DMA buffers to allocate.  Note that this
   option is only consulted for load-time allocation; when buffers are
   allocated at run time, they will be sized appropriately for the current
   camera settings.

 - n_dma_bufs: The controller can cycle through either two or three DMA
   buffers.  Normally, the driver tries to use three buffers; on faster
   systems, however, it will work well with only two.

 - min_buffers: The minimum number of streaming I/O buffers that the driver
   will consent to work with.  Default is one, but, on slower systems,
   better behavior with mplayer can be achieved by setting to a higher
   value (like six).

 - max_buffers: The maximum number of streaming I/O buffers; default is
   ten.  That number was carefully picked out of a hat and should not be
   assumed to actually mean much of anything.

 - flip: If this boolean parameter is set, the sensor will be instructed to
   invert the video image.  Whether it makes sense is determined by how
   your particular camera is mounted.

repo_name: angery/linux


code:
.. SPDX-License-Identifier: GPL-2.0

==========
Cards List
==========

The media subsystem provide support for lots of PCI and USB drivers, plus
platform-specific drivers. It also contains several ancillary I²C drivers.

The platform-specific drivers are usually present on embedded systems,
or are supported by the main board. Usually, setting them is done via
OpenFirmware or ACPI.

The PCI and USB drivers, however, are independent of the system's board,
and may be added/removed by the user.

You may also take a look at
https://linuxtv.org/wiki/index.php/Hardware_Device_Information
for more details about supported cards.

.. toctree::
	:maxdepth: 2

	usb-cardlist
	pci-cardlist
	platform-cardlist
	radio-cardlist
	i2c-cardlist
	misc-cardlist


code:
.. SPDX-License-Identifier: GPL-2.0

========
HDMI CEC
========

Supported hardware in mainline
==============================

HDMI Transmitters:

- Exynos4
- Exynos5
- STIH4xx HDMI CEC
- V4L2 adv7511 (same HW, but a different driver from the drm adv7511)
- stm32
- Allwinner A10 (sun4i)
- Raspberry Pi
- dw-hdmi (Synopsis IP)
- amlogic (meson ao-cec and ao-cec-g12a)
- drm adv7511/adv7533
- omap4
- tegra
- rk3288, rk3399
- tda998x
- DisplayPort CEC-Tunneling-over-AUX on i915, nouveau and amdgpu
- ChromeOS EC CEC
- CEC for SECO boards (UDOO x86).
- Chrontel CH7322

HDMI Receivers:

- adv7604/11/12
- adv7842
- tc358743

USB Dongles (see below for additional information on how to use these
dongles):

- Pulse-Eight: the pulse8-cec driver implements the following module option:
  ``persistent_config``: by default this is off, but when set to 1 the driver
  will store the current settings to the device's internal eeprom and restore
  it the next time the device is connected to the USB port.
- RainShadow Tech. Note: this driver does not support the persistent_config
  module option of the Pulse-Eight driver. The hardware supports it, but I
  have no plans to add this feature. But I accept patches :-)

Miscellaneous:

- vivid: emulates a CEC receiver and CEC transmitter.
  Can be used to test CEC applications without actual CEC hardware.

- cec-gpio. If the CEC pin is hooked up to a GPIO pin then
  you can control the CEC line through this driver. This supports error
  injection as well.

Utilities
=========

Utilities are available here: https://git.linuxtv.org/v4l-utils.git

``utils/cec-ctl``: control a CEC device

``utils/cec-compliance``: test compliance of a remote CEC device

``utils/cec-follower``: emulate a CEC follower device

Note that ``cec-ctl`` has support for the CEC Hospitality Profile as is
used in some hotel displays. See http://www.htng.org.

Note that the libcec library (https://github.com/Pulse-Eight/libcec) supports
the linux CEC framework.

If you want to get the CEC specification, then look at the References of
the HDMI wikipedia page: https://en.wikipedia.org/wiki/HDMI. CEC is part
of the HDMI specification. HDMI 1.3 is freely available (very similar to
HDMI 1.4 w.r.t. CEC) and should be good enough for most things.

DisplayPort to HDMI Adapters with working CEC
=============================================

Background: most adapters do not support the CEC Tunneling feature,
and of those that do many did not actually connect the CEC pin.
Unfortunately, this means that while a CEC device is created, it
is actually all alone in the world and will never be able to see other
CEC devices.

This is a list of known working adapters that have CEC Tunneling AND
that properly connected the CEC pin. If you find adapters that work
but are not in this list, then drop me a note.

To test: hook up your DP-to-HDMI adapter to a CEC capable device
(typically a TV), then run::

	cec-ctl --playback	# Configure the PC as a CEC Playback device
	cec-ctl -S		# Show the CEC topology

The ``cec-ctl -S`` command should show at least two CEC devices,
ourselves and the CEC device you are connected to (i.e. typically the TV).

General note: I have only seen this work with the Parade PS175, PS176 and
PS186 chipsets and the MegaChips 2900. While MegaChips 28x0 claims CEC support,
I have never seen it work.

USB-C to HDMI
-------------

Samsung Multiport Adapter EE-PW700: https://www.samsung.com/ie/support/model/EE-PW700BBEGWW/

Kramer ADC-U31C/HF: https://www.kramerav.com/product/ADC-U31C/HF

Club3D CAC-2504: https://www.club-3d.com/en/detail/2449/usb_3.1_type_c_to_hdmi_2.0_uhd_4k_60hz_active_adapter/

DisplayPort to HDMI
-------------------

Club3D CAC-1080: https://www.club-3d.com/en/detail/2442/displayport_1.4_to_hdmi_2.0b_hdr/

CableCreation (SKU: CD0712): https://www.cablecreation.com/products/active-displayport-to-hdmi-adapter-4k-hdr

HP DisplayPort to HDMI True 4k Adapter (P/N 2JA63AA): https://www.hp.com/us-en/shop/pdp/hp-displayport-to-hdmi-true-4k-adapter

Mini-DisplayPort to HDMI
------------------------

Club3D CAC-1180: https://www.club-3d.com/en/detail/2443/mini_displayport_1.4_to_hdmi_2.0b_hdr/

Note that passive adapters will never work, you need an active adapter.

The Club3D adapters in this list are all MegaChips 2900 based. Other Club3D adapters
are PS176 based and do NOT have the CEC pin hooked up, so only the three Club3D
adapters above are known to work.

I suspect that MegaChips 2900 based designs in general are likely to work
whereas with the PS176 it is more hit-and-miss (mostly miss). The PS186 is
likely to have the CEC pin hooked up, it looks like they changed the reference
design for that chipset.

USB CEC Dongles
===============

These dongles appear as ``/dev/ttyACMX`` devices and need the ``inputattach``
utility to create the ``/dev/cecX`` devices. Support for the Pulse-Eight
has been added to ``inputattach`` 1.6.0. Support for the Rainshadow Tech has
been added to ``inputattach`` 1.6.1.

You also need udev rules to automatically start systemd services::

	SUBSYSTEM=="tty", KERNEL=="ttyACM[0-9]*", ATTRS{idVendor}=="2548", ATTRS{idProduct}=="1002", ACTION=="add", TAG+="systemd", ENV{SYSTEMD_WANTS}+="pulse8-cec-inputattach@%k.service"
	SUBSYSTEM=="tty", KERNEL=="ttyACM[0-9]*", ATTRS{idVendor}=="2548", ATTRS{idProduct}=="1001", ACTION=="add", TAG+="systemd", ENV{SYSTEMD_WANTS}+="pulse8-cec-inputattach@%k.service"
	SUBSYSTEM=="tty", KERNEL=="ttyACM[0-9]*", ATTRS{idVendor}=="04d8", ATTRS{idProduct}=="ff59", ACTION=="add", TAG+="systemd", ENV{SYSTEMD_WANTS}+="rainshadow-cec-inputattach@%k.service"

and these systemd services:

For Pulse-Eight make /lib/systemd/system/pulse8-cec-inputattach@.service::

	[Unit]
	Description=inputattach for pulse8-cec device on %I

	[Service]
	Type=simple
	ExecStart=/usr/bin/inputattach --pulse8-cec /dev/%I

For the RainShadow Tech make /lib/systemd/system/rainshadow-cec-inputattach@.service::

	[Unit]
	Description=inputattach for rainshadow-cec device on %I

	[Service]
	Type=simple
	ExecStart=/usr/bin/inputattach --rainshadow-cec /dev/%I

For proper suspend/resume support create: /lib/systemd/system/restart-cec-inputattach.service::

	[Unit]
	Description=restart inputattach for cec devices
	After=suspend.target

	[Service]
	Type=forking
	ExecStart=/bin/bash -c 'for d in /dev/serial/by-id/usb-Pulse-Eight*; do /usr/bin/inputattach --daemon --pulse8-cec $d; done; for d in /dev/serial/by-id/usb-RainShadow_Tech*; do /usr/bin/inputattach --daemon --rainshadow-cec $d; done'

	[Install]
	WantedBy=suspend.target

And run ``systemctl enable restart-cec-inputattach``.

To automatically set the physical address of the CEC device whenever the
EDID changes, you can use ``cec-ctl`` with the ``-E`` option::

	cec-ctl -E /sys/class/drm/card0-DP-1/edid

This assumes the dongle is connected to the card0-DP-1 output (``xrandr`` will tell
you which output is used) and it will poll for changes to the EDID and update
the Physical Address whenever they occur.

To automatically run this command you can use cron. Edit crontab with
``crontab -e`` and add this line::

	@reboot /usr/local/bin/cec-ctl -E /sys/class/drm/card0-DP-1/edid

This only works for display drivers that expose the EDID in ``/sys/class/drm``,
such as the i915 driver.

CEC Without HPD
===============

Some displays when in standby mode have no HDMI Hotplug Detect signal, but
CEC is still enabled so connected devices can send an <Image View On> CEC
message in order to wake up such displays. Unfortunately, not all CEC
adapters can support this. An example is the Odroid-U3 SBC that has a
level-shifter that is powered off when the HPD signal is low, thus
blocking the CEC pin. Even though the SoC can use CEC without a HPD,
the level-shifter will prevent this from functioning.

There is a CEC capability flag to signal this: ``CEC_CAP_NEEDS_HPD``.
If set, then the hardware cannot wake up displays with this behavior.

Note for CEC application implementers: the <Image View On> message must
be the first message you send, don't send any other messages before.
Certain very bad but unfortunately not uncommon CEC implementations
get very confused if they receive anything else but this message and
they won't wake up.

When writing a driver it can be tricky to test this. There are two
ways to do this:

1) Get a Pulse-Eight USB CEC dongle, connect an HDMI cable from your
   device to the Pulse-Eight, but do not connect the Pulse-Eight to
   the display.

   Now configure the Pulse-Eight dongle::

	cec-ctl -p0.0.0.0 --tv

   and start monitoring::

	sudo cec-ctl -M

   On the device you are testing run::

	cec-ctl --playback

   It should report a physical address of f.f.f.f. Now run this
   command::

	cec-ctl -t0 --image-view-on

   The Pulse-Eight should see the <Image View On> message. If not,
   then something (hardware and/or software) is preventing the CEC
   message from going out.

   To make sure you have the wiring correct just connect the
   Pulse-Eight to a CEC-enabled display and run the same command
   on your device: now there is a HPD, so you should see the command
   arriving at the Pulse-Eight.

2) If you have another linux device supporting CEC without HPD, then
   you can just connect your device to that device. Yes, you can connect
   two HDMI outputs together. You won't have a HPD (which is what we
   want for this test), but the second device can monitor the CEC pin.

   Otherwise use the same commands as in 1.

If CEC messages do not come through when there is no HPD, then you
need to figure out why. Typically it is either a hardware restriction
or the software powers off the CEC core when the HPD goes low. The
first cannot be corrected of course, the second will likely required
driver changes.

Microcontrollers & CEC
======================

We have seen some CEC implementations in displays that use a microcontroller
to sample the bus. This does not have to be a problem, but some implementations
have timing issues. This is hard to discover unless you can hook up a low-level
CEC debugger (see the next section).

You will see cases where the CEC transmitter holds the CEC line high or low for
a longer time than is allowed. For directed messages this is not a problem since
if that happens the message will not be Acked and it will be retransmitted.
For broadcast messages no such mechanism exists.

It's not clear what to do about this. It is probably wise to transmit some
broadcast messages twice to reduce the chance of them being lost. Specifically
<Standby> and <Active Source> are candidates for that.

Making a CEC debugger
=====================

By using a Raspberry Pi 2B/3/4 and some cheap components you can make
your own low-level CEC debugger.

Here is a picture of my setup:

https://hverkuil.home.xs4all.nl/rpi3-cec.jpg

It's a Raspberry Pi 3 together with a breadboard and some breadboard wires:

http://www.dx.com/p/diy-40p-male-to-female-male-to-male-female-to-female-dupont-line-wire-3pcs-356089#.WYLOOXWGN7I

Finally on of these HDMI female-female passthrough connectors (full soldering type 1):

https://elabbay.myshopify.com/collections/camera/products/hdmi-af-af-v1a-hdmi-type-a-female-to-hdmi-type-a-female-pass-through-adapter-breakout-board?variant=45533926147

We've tested this and it works up to 4kp30 (297 MHz). The quality is not high
enough to pass-through 4kp60 (594 MHz).

I also added an RTC and a breakout shield:

https://www.amazon.com/Makerfire%C2%AE-Raspberry-Module-DS1307-Battery/dp/B00ZOXWHK4

https://www.dx.com/p/raspberry-pi-gpio-expansion-board-breadboard-easy-multiplexing-board-one-to-three-with-screw-for-raspberry-pi-2-3-b-b-2729992.html#.YGRCG0MzZ7I

These two are not needed but they make life a bit easier.

If you want to monitor the HPD line as well, then you need one of these
level shifters:

https://www.adafruit.com/product/757

(This is just where I got these components, there are many other places you
can get similar things).

The CEC pin of the HDMI connector needs to be connected to these pins:
CE0/IO8 and CE1/IO7 (pull-up GPIOs). The (optional) HPD pin of the HDMI
connector should be connected (via a level shifter to convert the 5V
to 3.3V) to these pins: IO17 and IO27. The (optional) 5V pin of the HDMI
connector should be connected (via a level shifter) to these pins: IO22
and IO24. Monitoring the HPD an 5V lines is not necessary, but it is helpful.

This kernel patch will hook up the cec-gpio driver correctly to
e.g. ``arch/arm/boot/dts/bcm2837-rpi-3-b-plus.dts``::

	cec-gpio@7 {
		compatible = "cec-gpio";
		cec-gpios = <&gpio 7 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
		hpd-gpios = <&gpio 17 GPIO_ACTIVE_HIGH>;
		v5-gpios = <&gpio 22 GPIO_ACTIVE_HIGH>;
	};

	cec-gpio@8 {
		compatible = "cec-gpio";
		cec-gpios = <&gpio 8 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
		hpd-gpios = <&gpio 27 GPIO_ACTIVE_HIGH>;
		v5-gpios = <&gpio 24 GPIO_ACTIVE_HIGH>;
	};

This dts change will enable two cec GPIO devices: I typically use one to
send/receive CEC commands and the other to monitor. If you monitor using
an unconfigured CEC adapter then it will use GPIO interrupts which makes
monitoring very accurate.

The documentation on how to use the error injection is here: :ref:`cec_pin_error_inj`.

``cec-ctl --monitor-pin`` will do low-level CEC bus sniffing and analysis.
You can also store the CEC traffic to file using ``--store-pin`` and analyze
it later using ``--analyze-pin``.

You can also use this as a full-fledged CEC device by configuring it
using ``cec-ctl --tv -p0.0.0.0`` or ``cec-ctl --playback -p1.0.0.0``.


code:
.. SPDX-License-Identifier: GPL-2.0

Digital TV Conditional Access Interface
=======================================

.. note::

   This documentation is outdated.

This document describes the usage of the high level CI API as
in accordance to the Linux DVB API. This is a not a documentation for the,
existing low level CI API.

.. note::

   For the Twinhan/Twinhan clones, the dst_ca module handles the CI
   hardware handling. This module is loaded automatically if a CI
   (Common Interface, that holds the CAM (Conditional Access Module)
   is detected.

ca_zap
~~~~~~

A userspace application, like ``ca_zap`` is required to handle encrypted
MPEG-TS streams.

The ``ca_zap`` userland application is in charge of sending the
descrambling related information to the Conditional Access Module (CAM).

This application requires the following to function properly as of now.

a) Tune to a valid channel, with szap.

  eg: $ szap -c channels.conf -r "TMC" -x

b) a channels.conf containing a valid PMT PID

  eg: TMC:11996:h:0:27500:278:512:650:321

  here 278 is a valid PMT PID. the rest of the values are the
  same ones that szap uses.

c) after running a szap, you have to run ca_zap, for the
   descrambler to function,

  eg: $ ca_zap channels.conf "TMC"

d) Hopefully enjoy your favourite subscribed channel as you do with
   a FTA card.

.. note::

  Currently ca_zap, and dst_test, both are meant for demonstration
  purposes only, they can become full fledged applications if necessary.

Cards that fall in this category
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

At present the cards that fall in this category are the Twinhan and its
clones, these cards are available as VVMER, Tomato, Hercules, Orange and
so on.

CI modules that are supported
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The CI module support is largely dependent upon the firmware on the cards
Some cards do support almost all of the available CI modules. There is
nothing much that can be done in order to make additional CI modules
working with these cards.

Modules that have been tested by this driver at present are

(1) Irdeto 1 and 2 from SCM
(2) Viaccess from SCM
(3) Dragoncam


code:
.. SPDX-License-Identifier: GPL-2.0

The cpia2 driver
================

Authors: Peter Pregler <Peter_Pregler@email.com>,
Scott J. Bertin <scottbertin@yahoo.com>, and
Jarl Totland <Jarl.Totland@bdc.no> for the original cpia driver, which
this one was modelled from.

Introduction
------------

This is a driver for STMicroelectronics's CPiA2 (second generation
Colour Processor Interface ASIC) based cameras. This camera outputs an MJPEG
stream at up to vga size. It implements the Video4Linux interface as much as
possible.  Since the V4L interface does not support compressed formats, only
an mjpeg enabled application can be used with the camera. We have modified the
gqcam application to view this stream.

The driver is implemented as two kernel modules. The cpia2 module
contains the camera functions and the V4L interface.  The cpia2_usb module
contains usb specific functions.  The main reason for this was the size of the
module was getting out of hand, so I separated them.  It is not likely that
there will be a parallel port version.

Features
--------

- Supports cameras with the Vision stv6410 (CIF) and stv6500 (VGA) cmos
  sensors. I only have the vga sensor, so can't test the other.
- Image formats: VGA, QVGA, CIF, QCIF, and a number of sizes in between.
  VGA and QVGA are the native image sizes for the VGA camera. CIF is done
  in the coprocessor by scaling QVGA.  All other sizes are done by clipping.
- Palette: YCrCb, compressed with MJPEG.
- Some compression parameters are settable.
- Sensor framerate is adjustable (up to 30 fps CIF, 15 fps VGA).
- Adjust brightness, color, contrast while streaming.
- Flicker control settable for 50 or 60 Hz mains frequency.

Making and installing the stv672 driver modules
-----------------------------------------------

Requirements
~~~~~~~~~~~~

Video4Linux must be either compiled into the kernel or
available as a module.  Video4Linux2 is automatically detected and made
available at compile time.

Setup
~~~~~

Use ``modprobe cpia2`` to load and ``modprobe -r cpia2`` to unload. This
may be done automatically by your distribution.

Driver options
~~~~~~~~~~~~~~

.. tabularcolumns:: |p{13ex}|L|

==============  ========================================================
Option		Description
==============  ========================================================
video_nr	video device to register (0=/dev/video0, etc)
		range -1 to 64.  default is -1 (first available)
		If you have more than 1 camera, this MUST be -1.
buffer_size	Size for each frame buffer in bytes (default 68k)
num_buffers	Number of frame buffers (1-32, default 3)
alternate	USB Alternate (2-7, default 7)
flicker_freq	Frequency for flicker reduction(50 or 60, default 60)
flicker_mode	0 to disable, or 1 to enable flicker reduction.
		(default 0). This is only effective if the camera
		uses a stv0672 coprocessor.
==============  ========================================================

Setting the options
~~~~~~~~~~~~~~~~~~~

If you are using modules, edit /etc/modules.conf and add an options
line like this::

	options cpia2 num_buffers=3 buffer_size=65535

If the driver is compiled into the kernel, at boot time specify them
like this::

	cpia2.num_buffers=3 cpia2.buffer_size=65535

What buffer size should I use?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The maximum image size depends on the alternate you choose, and the
frame rate achieved by the camera.  If the compression engine is able to
keep up with the frame rate, the maximum image size is given by the table
below.

The compression engine starts out at maximum compression, and will
increase image quality until it is close to the size in the table.  As long
as the compression engine can keep up with the frame rate, after a short time
the images will all be about the size in the table, regardless of resolution.

At low alternate settings, the compression engine may not be able to
compress the image enough and will reduce the frame rate by producing larger
images.

The default of 68k should be good for most users.  This will handle
any alternate at frame rates down to 15fps.  For lower frame rates, it may
be necessary to increase the buffer size to avoid having frames dropped due
to insufficient space.

========== ========== ======== =====
Alternate  bytes/ms   15fps    30fps
========== ========== ======== =====
    2         128      8533     4267
    3         384     25600    12800
    4         640     42667    21333
    5         768     51200    25600
    6         896     59733    29867
    7        1023     68200    34100
========== ========== ======== =====

Table: Image size(bytes)

How many buffers should I use?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

For normal streaming, 3 should give the best results.  With only 2,
it is possible for the camera to finish sending one image just after a
program has started reading the other.  If this happens, the driver must drop
a frame.  The exception to this is if you have a heavily loaded machine.  In
this case use 2 buffers.  You are probably not reading at the full frame rate.
If the camera can send multiple images before a read finishes, it could
overwrite the third buffer before the read finishes, leading to a corrupt
image.  Single and double buffering have extra checks to avoid overwriting.

Using the camera
~~~~~~~~~~~~~~~~

We are providing a modified gqcam application to view the output. In
order to avoid confusion, here it is called mview.  There is also the qx5view
program which can also control the lights on the qx5 microscope. MJPEG Tools
(http://mjpeg.sourceforge.net) can also be used to record from the camera.


code:
.. SPDX-License-Identifier: GPL-2.0

CX18 cards list
===============

Those cards are supported by cx18 driver:

- Hauppauge HVR-1600 (ESMT memory)
- Hauppauge HVR-1600 (Samsung memory)
- Compro VideoMate H900
- Yuan MPC718 MiniPCI DVB-T/Analog
- Conexant Raptor PAL/SECAM
- Toshiba Qosmio DVB-T/Analog
- Leadtek WinFast PVR2100
- Leadtek WinFast DVR3100
- GoTView PCI DVD3 Hybrid
- Hauppauge HVR-1600 (s5h1411/tda18271)


code:
.. SPDX-License-Identifier: GPL-2.0

cx231xx cards list
==================

.. tabularcolumns:: |p{1.4cm}|p{10.0cm}|p{6.5cm}|

.. flat-table::
   :header-rows: 1
   :widths: 2 12 19
   :stub-columns: 0

   * - Card number
     - Card name
     - USB IDs
   * - 0
     - Unknown CX231xx video grabber
     - 0572:5A3C
   * - 1
     - Conexant Hybrid TV - CARRAERA
     - 0572:58A2
   * - 2
     - Conexant Hybrid TV - SHELBY
     - 0572:58A1
   * - 3
     - Conexant Hybrid TV - RDE253S
     - 0572:58A4
   * - 4
     - Conexant Hybrid TV - RDU253S
     - 0572:58A5
   * - 5
     - Conexant VIDEO GRABBER
     - 0572:58A6, 07ca:c039
   * - 6
     - Conexant Hybrid TV - rde 250
     - 0572:589E
   * - 7
     - Conexant Hybrid TV - RDU 250
     - 0572:58A0
   * - 8
     - Hauppauge EXETER
     - 2040:b120, 2040:b140
   * - 9
     - Hauppauge USB Live 2
     - 2040:c200
   * - 10
     - Pixelview PlayTV USB Hybrid
     - 4000:4001
   * - 11
     - Pixelview Xcapture USB
     - 1D19:6109, 4000:4001
   * - 12
     - Kworld UB430 USB Hybrid
     - 1b80:e424
   * - 13
     - Iconbit Analog Stick U100 FM
     - 1f4d:0237
   * - 14
     - Hauppauge WinTV USB2 FM (PAL)
     - 2040:b110
   * - 15
     - Hauppauge WinTV USB2 FM (NTSC)
     - 2040:b111
   * - 16
     - Elgato Video Capture V2
     - 0fd9:0037
   * - 17
     - Geniatech OTG102
     - 1f4d:0102
   * - 18
     - Kworld UB445 USB Hybrid
     - 1b80:e421
   * - 19
     - Hauppauge WinTV 930C-HD (1113xx) / HVR-900H (111xxx) / PCTV QuatroStick 521e
     - 2040:b130, 2040:b138, 2013:0259
   * - 20
     - Hauppauge WinTV 930C-HD (1114xx) / HVR-901H (1114xx) / PCTV QuatroStick 522e
     - 2040:b131, 2040:b139, 2013:025e
   * - 21
     - Hauppauge WinTV-HVR-955Q (111401)
     - 2040:b123, 2040:b124
   * - 22
     - Terratec Grabby
     - 1f4d:0102
   * - 23
     - Evromedia USB Full Hybrid Full HD
     - 1b80:d3b2
   * - 24
     - Astrometa T2hybrid
     - 15f4:0135
   * - 25
     - The Imaging Source DFG/USB2pro
     - 199e:8002
   * - 26
     - Hauppauge WinTV-HVR-935C
     - 2040:b151
   * - 27
     - Hauppauge WinTV-HVR-975
     - 2040:b150


code:
.. SPDX-License-Identifier: GPL-2.0

CX88 cards list
===============

.. tabularcolumns:: |p{1.4cm}|p{11.1cm}|p{4.2cm}|

.. flat-table::
   :header-rows: 1
   :widths: 2 19 18
   :stub-columns: 0

   * - Card number
     - Card name
     - PCI subsystem IDs

   * - 0
     - UNKNOWN/GENERIC
     -

   * - 1
     - Hauppauge WinTV 34xxx models
     - 0070:3400, 0070:3401

   * - 2
     - GDI Black Gold
     - 14c7:0106, 14c7:0107

   * - 3
     - PixelView
     - 1554:4811

   * - 4
     - ATI TV Wonder Pro
     - 1002:00f8, 1002:00f9

   * - 5
     - Leadtek Winfast 2000XP Expert
     - 107d:6611, 107d:6613

   * - 6
     - AverTV Studio 303 (M126)
     - 1461:000b

   * - 7
     - MSI TV-@nywhere Master
     - 1462:8606

   * - 8
     - Leadtek Winfast DV2000
     - 107d:6620, 107d:6621

   * - 9
     - Leadtek PVR 2000
     - 107d:663b, 107d:663c, 107d:6632, 107d:6630, 107d:6638, 107d:6631, 107d:6637, 107d:663d

   * - 10
     - IODATA GV-VCP3/PCI
     - 10fc:d003

   * - 11
     - Prolink PlayTV PVR
     -

   * - 12
     - ASUS PVR-416
     - 1043:4823, 1461:c111

   * - 13
     - MSI TV-@nywhere
     -

   * - 14
     - KWorld/VStream XPert DVB-T
     - 17de:08a6

   * - 15
     - DViCO FusionHDTV DVB-T1
     - 18ac:db00

   * - 16
     - KWorld LTV883RF
     -

   * - 17
     - DViCO FusionHDTV 3 Gold-Q
     - 18ac:d810, 18ac:d800

   * - 18
     - Hauppauge Nova-T DVB-T
     - 0070:9002, 0070:9001, 0070:9000

   * - 19
     - Conexant DVB-T reference design
     - 14f1:0187

   * - 20
     - Provideo PV259
     - 1540:2580

   * - 21
     - DViCO FusionHDTV DVB-T Plus
     - 18ac:db10, 18ac:db11

   * - 22
     - pcHDTV HD3000 HDTV
     - 7063:3000

   * - 23
     - digitalnow DNTV Live! DVB-T
     - 17de:a8a6

   * - 24
     - Hauppauge WinTV 28xxx (Roslyn) models
     - 0070:2801

   * - 25
     - Digital-Logic MICROSPACE Entertainment Center (MEC)
     - 14f1:0342

   * - 26
     - IODATA GV/BCTV7E
     - 10fc:d035

   * - 27
     - PixelView PlayTV Ultra Pro (Stereo)
     -

   * - 28
     - DViCO FusionHDTV 3 Gold-T
     - 18ac:d820

   * - 29
     - ADS Tech Instant TV DVB-T PCI
     - 1421:0334

   * - 30
     - TerraTec Cinergy 1400 DVB-T
     - 153b:1166

   * - 31
     - DViCO FusionHDTV 5 Gold
     - 18ac:d500

   * - 32
     - AverMedia UltraTV Media Center PCI 550
     - 1461:8011

   * - 33
     - Kworld V-Stream Xpert DVD
     -

   * - 34
     - ATI HDTV Wonder
     - 1002:a101

   * - 35
     - WinFast DTV1000-T
     - 107d:665f

   * - 36
     - AVerTV 303 (M126)
     - 1461:000a

   * - 37
     - Hauppauge Nova-S-Plus DVB-S
     - 0070:9201, 0070:9202

   * - 38
     - Hauppauge Nova-SE2 DVB-S
     - 0070:9200

   * - 39
     - KWorld DVB-S 100
     - 17de:08b2, 1421:0341

   * - 40
     - Hauppauge WinTV-HVR1100 DVB-T/Hybrid
     - 0070:9400, 0070:9402

   * - 41
     - Hauppauge WinTV-HVR1100 DVB-T/Hybrid (Low Profile)
     - 0070:9800, 0070:9802

   * - 42
     - digitalnow DNTV Live! DVB-T Pro
     - 1822:0025, 1822:0019

   * - 43
     - KWorld/VStream XPert DVB-T with cx22702
     - 17de:08a1, 12ab:2300

   * - 44
     - DViCO FusionHDTV DVB-T Dual Digital
     - 18ac:db50, 18ac:db54

   * - 45
     - KWorld HardwareMpegTV XPert
     - 17de:0840, 1421:0305

   * - 46
     - DViCO FusionHDTV DVB-T Hybrid
     - 18ac:db40, 18ac:db44

   * - 47
     - pcHDTV HD5500 HDTV
     - 7063:5500

   * - 48
     - Kworld MCE 200 Deluxe
     - 17de:0841

   * - 49
     - PixelView PlayTV P7000
     - 1554:4813

   * - 50
     - NPG Tech Real TV FM Top 10
     - 14f1:0842

   * - 51
     - WinFast DTV2000 H
     - 107d:665e

   * - 52
     - Geniatech DVB-S
     - 14f1:0084

   * - 53
     - Hauppauge WinTV-HVR3000 TriMode Analog/DVB-S/DVB-T
     - 0070:1404, 0070:1400, 0070:1401, 0070:1402

   * - 54
     - Norwood Micro TV Tuner
     -

   * - 55
     - Shenzhen Tungsten Ages Tech TE-DTV-250 / Swann OEM
     - c180:c980

   * - 56
     - Hauppauge WinTV-HVR1300 DVB-T/Hybrid MPEG Encoder
     - 0070:9600, 0070:9601, 0070:9602

   * - 57
     - ADS Tech Instant Video PCI
     - 1421:0390

   * - 58
     - Pinnacle PCTV HD 800i
     - 11bd:0051

   * - 59
     - DViCO FusionHDTV 5 PCI nano
     - 18ac:d530

   * - 60
     - Pinnacle Hybrid PCTV
     - 12ab:1788

   * - 61
     - Leadtek TV2000 XP Global
     - 107d:6f18, 107d:6618, 107d:6619

   * - 62
     - PowerColor RA330
     - 14f1:ea3d

   * - 63
     - Geniatech X8000-MT DVBT
     - 14f1:8852

   * - 64
     - DViCO FusionHDTV DVB-T PRO
     - 18ac:db30

   * - 65
     - DViCO FusionHDTV 7 Gold
     - 18ac:d610

   * - 66
     - Prolink Pixelview MPEG 8000GT
     - 1554:4935

   * - 67
     - Kworld PlusTV HD PCI 120 (ATSC 120)
     - 17de:08c1

   * - 68
     - Hauppauge WinTV-HVR4000 DVB-S/S2/T/Hybrid
     - 0070:6900, 0070:6904, 0070:6902

   * - 69
     - Hauppauge WinTV-HVR4000(Lite) DVB-S/S2
     - 0070:6905, 0070:6906

   * - 70
     - TeVii S460 DVB-S/S2
     - d460:9022

   * - 71
     - Omicom SS4 DVB-S/S2 PCI
     - A044:2011

   * - 72
     - TBS 8920 DVB-S/S2
     - 8920:8888

   * - 73
     - TeVii S420 DVB-S
     - d420:9022

   * - 74
     - Prolink Pixelview Global Extreme
     - 1554:4976

   * - 75
     - PROF 7300 DVB-S/S2
     - B033:3033

   * - 76
     - SATTRADE ST4200 DVB-S/S2
     - b200:4200

   * - 77
     - TBS 8910 DVB-S
     - 8910:8888

   * - 78
     - Prof 6200 DVB-S
     - b022:3022

   * - 79
     - Terratec Cinergy HT PCI MKII
     - 153b:1177

   * - 80
     - Hauppauge WinTV-IR Only
     - 0070:9290

   * - 81
     - Leadtek WinFast DTV1800 Hybrid
     - 107d:6654

   * - 82
     - WinFast DTV2000 H rev. J
     - 107d:6f2b

   * - 83
     - Prof 7301 DVB-S/S2
     - b034:3034

   * - 84
     - Samsung SMT 7020 DVB-S
     - 18ac:dc00, 18ac:dccd

   * - 85
     - Twinhan VP-1027 DVB-S
     - 1822:0023

   * - 86
     - TeVii S464 DVB-S/S2
     - d464:9022

   * - 87
     - Leadtek WinFast DTV2000 H PLUS
     - 107d:6f42

   * - 88
     - Leadtek WinFast DTV1800 H (XC4000)
     - 107d:6f38

   * - 89
     - Leadtek TV2000 XP Global (SC4100)
     - 107d:6f36

   * - 90
     - Leadtek TV2000 XP Global (XC4100)
     - 107d:6f43

   * - 91
     - NotOnlyTV LV3H
     -


code:
.. SPDX-License-Identifier: GPL-2.0

The cx88 driver
===============

Author:  Gerd Hoffmann

This is a v4l2 device driver for the cx2388x chip.

Current status
--------------

video
	- Works.
	- Overlay isn't supported.

audio
	- Works. The TV standard detection is made by the driver, as the
	  hardware has bugs to auto-detect.
	- audio data dma (i.e. recording without loopback cable to the
	  sound card) is supported via cx88-alsa.

vbi
	- Works.

How to add support for new cards
--------------------------------

The driver needs some config info for the TV cards.  This stuff is in
cx88-cards.c.  If the driver doesn't work well you likely need a new
entry for your card in that file.  Check the kernel log (using dmesg)
to see whenever the driver knows your card or not.  There is a line
like this one:

.. code-block:: none

	cx8800[0]: subsystem: 0070:3400, board: Hauppauge WinTV \
		34xxx models [card=1,autodetected]

If your card is listed as "board: UNKNOWN/GENERIC" it is unknown to
the driver.  What to do then?

1) Try upgrading to the latest snapshot, maybe it has been added
   meanwhile.
2) You can try to create a new entry yourself, have a look at
   cx88-cards.c.  If that worked, mail me your changes as unified
   diff ("diff -u").
3) Or you can mail me the config information.  We need at least the
   following information to add the card:

     - the PCI Subsystem ID ("0070:3400" from the line above,
       "lspci -v" output is fine too).
     - the tuner type used by the card.  You can try to find one by
       trial-and-error using the tuner=<n> insmod option.  If you
       know which one the card has you can also have a look at the
       list in CARDLIST.tuner


code:
.. SPDX-License-Identifier: GPL-2.0

The VPBE V4L2 driver design
===========================

Functional partitioning
-----------------------

Consists of the following:

 1. V4L2 display driver

    Implements creation of video2 and video3 device nodes and
    provides v4l2 device interface to manage VID0 and VID1 layers.

 2. Display controller

    Loads up VENC, OSD and external encoders such as ths8200. It provides
    a set of API calls to V4L2 drivers to set the output/standards
    in the VENC or external sub devices. It also provides
    a device object to access the services from OSD subdevice
    using sub device ops. The connection of external encoders to VENC LCD
    controller port is done at init time based on default output and standard
    selection or at run time when application change the output through
    V4L2 IOCTLs.

    When connected to an external encoder, vpbe controller is also responsible
    for setting up the interface between VENC and external encoders based on
    board specific settings (specified in board-xxx-evm.c). This allows
    interfacing external encoders such as ths8200. The setup_if_config()
    is implemented for this as well as configure_venc() (part of the next patch)
    API to set timings in VENC for a specific display resolution. As of this
    patch series, the interconnection and enabling and setting of the external
    encoders is not present, and would be a part of the next patch series.

 3. VENC subdevice module

    Responsible for setting outputs provided through internal DACs and also
    setting timings at LCD controller port when external encoders are connected
    at the port or LCD panel timings required. When external encoder/LCD panel
    is connected, the timings for a specific standard/preset is retrieved from
    the board specific table and the values are used to set the timings in
    venc using non-standard timing mode.

    Support LCD Panel displays using the VENC. For example to support a Logic
    PD display, it requires setting up the LCD controller port with a set of
    timings for the resolution supported and setting the dot clock. So we could
    add the available outputs as a board specific entry (i.e add the "LogicPD"
    output name to board-xxx-evm.c). A table of timings for various LCDs
    supported can be maintained in the board specific setup file to support
    various LCD displays.As of this patch a basic driver is present, and this
    support for external encoders and displays forms a part of the next
    patch series.

 4. OSD module

    OSD module implements all OSD layer management and hardware specific
    features. The VPBE module interacts with the OSD for enabling and
    disabling appropriate features of the OSD.

Current status
--------------

A fully functional working version of the V4L2 driver is available. This
driver has been tested with NTSC and PAL standards and buffer streaming.


code:
.. SPDX-License-Identifier: GPL-2.0

========================================
Digital TV driver-specific documentation
========================================

.. toctree::
	:maxdepth: 2

	avermedia
	bt8xx
	lmedm04
	opera-firmware
	technisat
	ttusb-dec
	zr364xx


code:
.. SPDX-License-Identifier: GPL-2.0

dvb-usb-a800 cards list
=======================

.. tabularcolumns:: |p{7.0cm}|p{10.5cm}|

.. flat-table::
   :header-rows: 1
   :widths: 7 13
   :stub-columns: 0

   * - Card name
     - USB IDs
   * - AVerMedia AverTV DVB-T USB 2.0 (A800)
     - 07ca:a800, 07ca:a801


code:
.. SPDX-License-Identifier: GPL-2.0

dvb-usb-af9005 cards list
=========================

.. tabularcolumns:: |p{7.0cm}|p{10.5cm}|

.. flat-table::
   :header-rows: 1
   :widths: 7 13
   :stub-columns: 0

   * - Card name
     - USB IDs
   * - Afatech DVB-T USB1.1 stick
     - 15a4:9020
   * - Ansonic DVB-T USB1.1 stick
     - 10b9:6000
   * - TerraTec Cinergy T USB XE
     - 0ccd:0055


code:
.. SPDX-License-Identifier: GPL-2.0

dvb-usb-af9015 cards list
=========================

.. tabularcolumns:: |p{7.0cm}|p{10.5cm}|

.. flat-table::
   :header-rows: 1
   :widths: 7 13
   :stub-columns: 0

   * - Card name
     - USB IDs
   * - AVerMedia A309
     - 07ca:a309
   * - AVerMedia AVerTV DVB-T Volar X
     - 07ca:a815
   * - Afatech AF9015 reference design
     - 15a4:9015, 15a4:9016
   * - AverMedia AVerTV Red HD+ (A850T)
     - 07ca:850b
   * - AverMedia AVerTV Volar Black HD (A850)
     - 07ca:850a
   * - AverMedia AVerTV Volar GPS 805 (A805)
     - 07ca:a805
   * - AverMedia AVerTV Volar M (A815Mac)
     - 07ca:815a
   * - Conceptronic USB2.0 DVB-T CTVDIGRCU V3.0
     - 1b80:e397
   * - DigitalNow TinyTwin
     - 13d3:3226
   * - DigitalNow TinyTwin v2
     - 1b80:e402
   * - DigitalNow TinyTwin v3
     - 1f4d:9016
   * - Fujitsu-Siemens Slim Mobile USB DVB-T
     - 07ca:8150
   * - Genius TVGo DVB-T03
     - 0458:4012
   * - KWorld Digital MC-810
     - 1b80:c810
   * - KWorld PlusTV DVB-T PCI Pro Card (DVB-T PC160-T)
     - 1b80:c161
   * - KWorld PlusTV Dual DVB-T PCI (DVB-T PC160-2T)
     - 1b80:c160
   * - KWorld PlusTV Dual DVB-T Stick (DVB-T 399U)
     - 1b80:e399, 1b80:e400
   * - KWorld USB DVB-T Stick Mobile (UB383-T)
     - 1b80:e383
   * - KWorld USB DVB-T TV Stick II (VS-DVB-T 395U)
     - 1b80:e396, 1b80:e39b, 1b80:e395, 1b80:e39a
   * - Leadtek WinFast DTV Dongle Gold
     - 0413:6029
   * - Leadtek WinFast DTV2000DS
     - 0413:6a04
   * - MSI DIGIVOX Duo
     - 1462:8801
   * - MSI Digi VOX mini III
     - 1462:8807
   * - Pinnacle PCTV 71e
     - 2304:022b
   * - Sveon STV20 Tuner USB DVB-T HDTV
     - 1b80:e39d
   * - Sveon STV22 Dual USB DVB-T Tuner HDTV
     - 1b80:e401
   * - Telestar Starstick 2
     - 10b9:8000
   * - TerraTec Cinergy T Stick Dual RC
     - 0ccd:0099
   * - TerraTec Cinergy T Stick RC
     - 0ccd:0097
   * - TerraTec Cinergy T USB XE
     - 0ccd:0069
   * - TrekStor DVB-T USB Stick
     - 15a4:901b
   * - TwinHan AzureWave AD-TU700(704J)
     - 13d3:3237
   * - Xtensions XD-380
     - 1ae7:0381


code:
.. SPDX-License-Identifier: GPL-2.0

dvb-usb-af9035 cards list
=========================

.. tabularcolumns:: |p{7.0cm}|p{10.5cm}|

.. flat-table::
   :header-rows: 1
   :widths: 7 13
   :stub-columns: 0

   * - Card name
     - USB IDs
   * - AVerMedia AVerTV Volar HD/PRO (A835)
     - 07ca:a835, 07ca:b835
   * - AVerMedia HD Volar (A867)
     - 07ca:1867, 07ca:a867, 07ca:0337
   * - AVerMedia TD310 DVB-T2
     - 07ca:1871
   * - AVerMedia Twinstar (A825)
     - 07ca:0825
   * - Afatech AF9035 reference design
     - 15a4:9035, 15a4:1000, 15a4:1001, 15a4:1002, 15a4:1003
   * - Asus U3100Mini Plus
     - 0b05:1779
   * - Avermedia A835B(1835)
     - 07ca:1835
   * - Avermedia A835B(2835)
     - 07ca:2835
   * - Avermedia A835B(3835)
     - 07ca:3835
   * - Avermedia A835B(4835)
     - 07ca:4835
   * - Avermedia AverTV Volar HD 2 (TD110)
     - 07ca:a110
   * - Avermedia H335
     - 07ca:0335
   * - Digital Dual TV Receiver CTVDIGDUAL_V2
     - 1b80:e410
   * - EVOLVEO XtraTV stick
     - 1f4d:a115
   * - Hauppauge WinTV-MiniStick 2
     - 2040:f900
   * - ITE 9135 Generic
     - 048d:9135
   * - ITE 9135(9005) Generic
     - 048d:9005
   * - ITE 9135(9006) Generic
     - 048d:9006
   * - ITE 9303 Generic
     - 048d:9306
   * - Kworld UB499-2T T09
     - 1b80:e409
   * - Leadtek WinFast DTV Dongle Dual
     - 0413:6a05
   * - Logilink VG0022A
     - 1d19:0100
   * - PCTV AndroiDTV (78e)
     - 2013:025a
   * - PCTV microStick (79e)
     - 2013:0262
   * - Sveon STV22 Dual DVB-T HDTV
     - 1b80:e411
   * - TerraTec Cinergy T Stick
     - 0ccd:0093
   * - TerraTec Cinergy T Stick (rev. 2)
     - 0ccd:00aa
   * - TerraTec Cinergy T Stick Dual RC (rev. 2)
     - 0ccd:0099
   * - TerraTec Cinergy TC2 Stick
     - 0ccd:10b2
   * - TerraTec T1
     - 0ccd:10ae


code:
.. SPDX-License-Identifier: GPL-2.0

dvb-usb-anysee cards list
=========================

.. tabularcolumns:: |p{7.0cm}|p{10.5cm}|

.. flat-table::
   :header-rows: 1
   :widths: 7 13
   :stub-columns: 0

   * - Card name
     - USB IDs
   * - Anysee
     - 04b4:861f, 1c73:861f


code:
.. SPDX-License-Identifier: GPL-2.0

dvb-usb-au6610 cards list
=========================

.. tabularcolumns:: |p{7.0cm}|p{10.5cm}|

.. flat-table::
   :header-rows: 1
   :widths: 7 13
   :stub-columns: 0

   * - Card name
     - USB IDs
   * - Sigmatek DVB-110
     - 058f:6610


code:
.. SPDX-License-Identifier: GPL-2.0

dvb-usb-az6007 cards list
=========================

.. tabularcolumns:: |p{7.0cm}|p{10.5cm}|

.. flat-table::
   :header-rows: 1
   :widths: 7 13
   :stub-columns: 0

   * - Card name
     - USB IDs
   * - Azurewave 6007
     - 13d3:0ccd
   * - Technisat CableStar Combo HD CI
     - 14f7:0003
   * - Terratec H7
     - 0ccd:10b4, 0ccd:10a3


code:
.. SPDX-License-Identifier: GPL-2.0

dvb-usb-az6027 cards list
=========================

.. tabularcolumns:: |p{7.0cm}|p{10.5cm}|

.. flat-table::
   :header-rows: 1
   :widths: 7 13
   :stub-columns: 0

   * - Card name
     - USB IDs
   * - AZUREWAVE DVB-S/S2 USB2.0 (AZ6027)
     - 13d3:3275
   * - Elgato EyeTV Sat
     - 0fd9:002a, 0fd9:0025, 0fd9:0036
   * - TERRATEC S7
     - 0ccd:10a4
   * - TERRATEC S7 MKII
     - 0ccd:10ac
   * - Technisat SkyStar USB 2 HD CI
     - 14f7:0001, 14f7:0002


code:
.. SPDX-License-Identifier: GPL-2.0

dvb-usb-ce6230 cards list
=========================

.. tabularcolumns:: |p{7.0cm}|p{10.5cm}|

.. flat-table::
   :header-rows: 1
   :widths: 7 13
   :stub-columns: 0

   * - Card name
     - USB IDs
   * - AVerMedia A310 USB 2.0 DVB-T tuner
     - 07ca:a310
   * - Intel CE9500 reference design
     - 8086:9500


code:
.. SPDX-License-Identifier: GPL-2.0

dvb-usb-cinergyT2 cards list
============================

.. tabularcolumns:: |p{7.0cm}|p{10.5cm}|

.. flat-table::
   :header-rows: 1
   :widths: 7 13
   :stub-columns: 0

   * - Card name
     - USB IDs
   * - TerraTec/qanu USB2.0 Highspeed DVB-T Receiver
     - 0ccd:0x0038


code:
.. SPDX-License-Identifier: GPL-2.0

dvb-usb-cxusb cards list
========================

.. tabularcolumns:: |p{7.0cm}|p{10.5cm}|

.. flat-table::
   :header-rows: 1
   :widths: 7 13
   :stub-columns: 0

   * - Card name
     - USB IDs
   * - AVerMedia AVerTVHD Volar (A868R)
     -
   * - Conexant DMB-TH Stick
     -
   * - DViCO FusionHDTV DVB-T Dual Digital 2
     -
   * - DViCO FusionHDTV DVB-T Dual Digital 4
     -
   * - DViCO FusionHDTV DVB-T Dual Digital 4 (rev 2)
     -
   * - DViCO FusionHDTV DVB-T Dual USB
     -
   * - DViCO FusionHDTV DVB-T NANO2
     -
   * - DViCO FusionHDTV DVB-T USB (LGZ201)
     -
   * - DViCO FusionHDTV DVB-T USB (TH7579)
     -
   * - DViCO FusionHDTV5 USB Gold
     -
   * - DigitalNow DVB-T Dual USB
     -
   * - Medion MD95700 (MDUSBTV-HYBRID)
     -
   * - Mygica D689 DMB-TH
     -


code:
.. SPDX-License-Identifier: GPL-2.0

dvb-usb-dib0700 cards list
==========================

.. tabularcolumns:: |p{7.0cm}|p{10.5cm}|

.. flat-table::
   :header-rows: 1
   :widths: 7 13
   :stub-columns: 0

   * - Card name
     - USB IDs
   * - ASUS My Cinema U3000 Mini DVBT Tuner
     - 0b05:171f
   * - ASUS My Cinema U3100 Mini DVBT Tuner
     - 0b05:173f
   * - AVerMedia AVerTV DVB-T Express
     - 07ca:b568
   * - AVerMedia AVerTV DVB-T Volar
     - 07ca:a807, 07ca:b808
   * - Artec T14BR DVB-T
     - 05d8:810f
   * - Asus My Cinema-U3000Hybrid
     - 0b05:1736
   * - Compro Videomate U500
     - 185b:1e78, 185b:1e80
   * - DiBcom NIM7090 reference design
     - 10b8:1bb2
   * - DiBcom NIM8096MD reference design
     - 10b8:1fa8
   * - DiBcom NIM9090MD reference design
     - 10b8:2384
   * - DiBcom STK7070P reference design
     - 10b8:1ebc
   * - DiBcom STK7070PD reference design
     - 10b8:1ebe
   * - DiBcom STK7700D reference design
     - 10b8:1ef0
   * - DiBcom STK7700P reference design
     - 10b8:1e14, 10b8:1e78
   * - DiBcom STK7770P reference design
     - 10b8:1e80
   * - DiBcom STK807xP reference design
     - 10b8:1f90
   * - DiBcom STK807xPVR reference design
     - 10b8:1f98
   * - DiBcom STK8096-PVR reference design
     - 2013:1faa, 10b8:1faa
   * - DiBcom STK8096GP reference design
     - 10b8:1fa0
   * - DiBcom STK9090M reference design
     - 10b8:2383
   * - DiBcom TFE7090PVR reference design
     - 10b8:1bb4
   * - DiBcom TFE7790P reference design
     - 10b8:1e6e
   * - DiBcom TFE8096P reference design
     - 10b8:1f9C
   * - Elgato EyeTV DTT
     - 0fd9:0021
   * - Elgato EyeTV DTT rev. 2
     - 0fd9:003f
   * - Elgato EyeTV Diversity
     - 0fd9:0011
   * - Elgato EyeTV Dtt Dlx PD378S
     - 0fd9:0020
   * - EvolutePC TVWay+
     - 1e59:0002
   * - Gigabyte U7000
     - 1044:7001
   * - Gigabyte U8000-RH
     - 1044:7002
   * - Hama DVB=T Hybrid USB Stick
     - 147f:2758
   * - Hauppauge ATSC MiniCard (B200)
     - 2040:b200
   * - Hauppauge ATSC MiniCard (B210)
     - 2040:b210
   * - Hauppauge Nova-T 500 Dual DVB-T
     - 2040:9941, 2040:9950
   * - Hauppauge Nova-T MyTV.t
     - 2040:7080
   * - Hauppauge Nova-T Stick
     - 2040:7050, 2040:7060, 2040:7070
   * - Hauppauge Nova-TD Stick (52009)
     - 2040:5200
   * - Hauppauge Nova-TD Stick/Elgato Eye-TV Diversity
     - 2040:9580
   * - Hauppauge Nova-TD-500 (84xxx)
     - 2040:8400
   * - Leadtek WinFast DTV Dongle H
     - 0413:60f6
   * - Leadtek Winfast DTV Dongle (STK7700P based)
     - 0413:6f00, 0413:6f01
   * - Medion CTX1921 DVB-T USB
     - 1660:1921
   * - Microsoft Xbox One Digital TV Tuner
     - 045e:02d5
   * - PCTV 2002e
     - 2013:025c
   * - PCTV 2002e SE
     - 2013:025d
   * - Pinnacle Expresscard 320cx
     - 2304:022e
   * - Pinnacle PCTV 2000e
     - 2304:022c
   * - Pinnacle PCTV 282e
     - 2013:0248, 2304:0248
   * - Pinnacle PCTV 340e HD Pro USB Stick
     - 2304:023d
   * - Pinnacle PCTV 72e
     - 2304:0236
   * - Pinnacle PCTV 73A
     - 2304:0243
   * - Pinnacle PCTV 73e
     - 2304:0237
   * - Pinnacle PCTV 73e SE
     - 2013:0245, 2304:0245
   * - Pinnacle PCTV DVB-T Flash Stick
     - 2304:0228
   * - Pinnacle PCTV Dual DVB-T Diversity Stick
     - 2304:0229
   * - Pinnacle PCTV HD Pro USB Stick
     - 2304:023a
   * - Pinnacle PCTV HD USB Stick
     - 2304:023b
   * - Pinnacle PCTV Hybrid Stick Solo
     - 2304:023e
   * - Prolink Pixelview SBTVD
     - 1554:5010
   * - Sony PlayTV
     - 1415:0003
   * - TechniSat AirStar TeleStick 2
     - 14f7:0004
   * - Terratec Cinergy DT USB XS Diversity/ T5
     - 0ccd:0081, 0ccd:10a1
   * - Terratec Cinergy DT XS Diversity
     - 0ccd:005a
   * - Terratec Cinergy HT Express
     - 0ccd:0060
   * - Terratec Cinergy HT USB XE
     - 0ccd:0058
   * - Terratec Cinergy T Express
     - 0ccd:0062
   * - Terratec Cinergy T USB XXS (HD)/ T3
     - 0ccd:0078, 0ccd:10a0, 0ccd:00ab
   * - Uniwill STK7700P based (Hama and others)
     - 1584:6003
   * - YUAN High-Tech DiBcom STK7700D
     - 1164:1e8c
   * - YUAN High-Tech MC770
     - 1164:0871
   * - YUAN High-Tech STK7700D
     - 1164:1efc
   * - YUAN High-Tech STK7700PH
     - 1164:1f08
   * - Yuan EC372S
     - 1164:1edc
   * - Yuan PD378S
     - 1164:2edc


code:
.. SPDX-License-Identifier: GPL-2.0

dvb-usb-dibusb-mb cards list
============================

.. tabularcolumns:: |p{7.0cm}|p{10.5cm}|

.. flat-table::
   :header-rows: 1
   :widths: 7 13
   :stub-columns: 0

   * - Card name
     - USB IDs
   * - AVerMedia AverTV DVBT USB1.1
     - 14aa:0001, 14aa:0002
   * - Artec T1 USB1.1 TVBOX with AN2135
     - 05d8:8105, 05d8:8106
   * - Artec T1 USB1.1 TVBOX with AN2235
     - 05d8:8107, 05d8:8108
   * - Artec T1 USB1.1 TVBOX with AN2235 (faulty USB IDs)
     - 0547:2235
   * - Artec T1 USB2.0
     - 05d8:8109, 05d8:810a
   * - Compro Videomate DVB-U2000 - DVB-T USB1.1 (please confirm to linux-dvb)
     - 185b:d000, 145f:010c, 185b:d001
   * - DiBcom USB1.1 DVB-T reference design (MOD3000)
     - 10b8:0bb8, 10b8:0bb9
   * - Grandtec USB1.1 DVB-T
     - 5032:0fa0, 5032:0bb8, 5032:0fa1, 5032:0bb9
   * - KWorld V-Stream XPERT DTV - DVB-T USB1.1
     - eb1a:17de, eb1a:17df
   * - KWorld Xpert DVB-T USB2.0
     - eb2a:17de
   * - KWorld/ADSTech Instant DVB-T USB2.0
     - 06e1:a333, 06e1:a334
   * - TwinhanDTV USB-Ter USB1.1 / Magic Box I / HAMA USB1.1 DVB-T device
     - 13d3:3201, 1822:3201, 13d3:3202, 1822:3202
   * - Unknown USB1.1 DVB-T device ???? please report the name to the author
     - 1025:005e, 1025:005f
   * - VideoWalker DVB-T USB
     - 0458:701e, 0458:701f


code:
.. SPDX-License-Identifier: GPL-2.0

dvb-usb-dibusb-mc cards list
============================

.. tabularcolumns:: |p{7.0cm}|p{10.5cm}|

.. flat-table::
   :header-rows: 1
   :widths: 7 13
   :stub-columns: 0

   * - Card name
     - USB IDs
   * - Artec T1 USB2.0 TVBOX (please check the warm ID)
     - 05d8:8109, 05d8:810a
   * - Artec T14 - USB2.0 DVB-T
     - 05d8:810b, 05d8:810c
   * - DiBcom USB2.0 DVB-T reference design (MOD3000P)
     - 10b8:0bc6, 10b8:0bc7
   * - GRAND - USB2.0 DVB-T adapter
     - 5032:0bc6, 5032:0bc7
   * - Humax/Coex DVB-T USB Stick 2.0 High Speed
     - 10b9:5000, 10b9:5001
   * - LITE-ON USB2.0 DVB-T Tuner
     - 04ca:f000, 04ca:f001
   * - Leadtek - USB2.0 Winfast DTV dongle
     - 0413:6025, 0413:6026
   * - MSI Digivox Mini SL
     - eb1a:e360, eb1a:e361


code:
.. SPDX-License-Identifier: GPL-2.0

dvb-usb-digitv cards list
=========================

.. tabularcolumns:: |p{7.0cm}|p{10.5cm}|

.. flat-table::
   :header-rows: 1
   :widths: 7 13
   :stub-columns: 0

   * - Card name
     - USB IDs
   * - Nebula Electronics uDigiTV DVB-T USB2.0)
     - 0547:0201


code:
.. SPDX-License-Identifier: GPL-2.0

dvb-usb-dtt200u cards list
==========================

.. tabularcolumns:: |p{7.0cm}|p{10.5cm}|

.. flat-table::
   :header-rows: 1
   :widths: 7 13
   :stub-columns: 0

   * - Card name
     - USB IDs
   * - WideView WT-220U PenType Receiver (Miglia)
     - 18f3:0220
   * - WideView WT-220U PenType Receiver (Typhoon/Freecom)
     - 14aa:0222, 14aa:0220, 14aa:0221, 14aa:0225, 14aa:0226
   * - WideView WT-220U PenType Receiver (based on ZL353)
     - 14aa:022a, 14aa:022b
   * - WideView/Yuan/Yakumo/Hama/Typhoon DVB-T USB2.0 (WT-200U)
     - 14aa:0201, 14aa:0301


code:
.. SPDX-License-Identifier: GPL-2.0

dvb-usb-dtv5100 cards list
==========================

.. tabularcolumns:: |p{7.0cm}|p{10.5cm}|

.. flat-table::
   :header-rows: 1
   :widths: 7 13
   :stub-columns: 0

   * - Card name
     - USB IDs
   * - AME DTV-5100 USB2.0 DVB-T
     - 0x06be:0xa232


code:
.. SPDX-License-Identifier: GPL-2.0

dvb-usb-dvbsky cards list
=========================

.. tabularcolumns:: |p{7.0cm}|p{10.5cm}|

.. flat-table::
   :header-rows: 1
   :widths: 7 13
   :stub-columns: 0

   * - Card name
     - USB IDs
   * - DVBSky S960/S860
     - 0572:6831
   * - DVBSky S960CI
     - 0572:960c
   * - DVBSky T330
     - 0572:0320
   * - DVBSky T680CI
     - 0572:680c
   * - MyGica Mini DVB-(T/T2/C) USB Stick T230
     - 0572:c688
   * - MyGica Mini DVB-(T/T2/C) USB Stick T230C
     - 0572:c689
   * - MyGica Mini DVB-(T/T2/C) USB Stick T230C Lite
     - 0572:c699
   * - MyGica Mini DVB-(T/T2/C) USB Stick T230C v2
     - 0572:c68a
   * - TechnoTrend TT-connect CT2-4650 CI
     - 0b48:3012
   * - TechnoTrend TT-connect CT2-4650 CI v1.1
     - 0b48:3015
   * - TechnoTrend TT-connect S2-4650 CI
     - 0b48:3017
   * - TechnoTrend TVStick CT2-4400
     - 0b48:3014
   * - Terratec Cinergy S2 Rev.4
     - 0ccd:0105
   * - Terratec H7 Rev.4
     - 0ccd:10a5


code:
.. SPDX-License-Identifier: GPL-2.0

dvb-usb-dw2102 cards list
=========================

.. tabularcolumns:: |p{7.0cm}|p{10.5cm}|

.. flat-table::
   :header-rows: 1
   :widths: 7 13
   :stub-columns: 0

   * - Card name
     - USB IDs
   * - DVBWorld DVB-C 3101 USB2.0
     - 04b4:3101
   * - DVBWorld DVB-S 2101 USB2.0
     - 04b4:0x2101
   * - DVBWorld DVB-S 2102 USB2.0
     - 04b4:2102
   * - DVBWorld DW2104 USB2.0
     - 04b4:2104
   * - GOTVIEW Satellite HD
     - 0x1FE1:5456
   * - Geniatech T220 DVB-T/T2 USB2.0
     - 0x1f4d:0xD220
   * - SU3000HD DVB-S USB2.0
     - 0x1f4d:0x3000
   * - TeVii S482 (tuner 1)
     - 0x9022:0xd483
   * - TeVii S482 (tuner 2)
     - 0x9022:0xd484
   * - TeVii S630 USB
     - 0x9022:d630
   * - TeVii S650 USB2.0
     - 0x9022:d650
   * - TeVii S662
     - 0x9022:d662
   * - TechnoTrend TT-connect S2-4600
     - 0b48:3011
   * - TerraTec Cinergy S USB
     - 0ccd:0064
   * - Terratec Cinergy S2 PCIe Dual Port 1
     - 153b:1181
   * - Terratec Cinergy S2 PCIe Dual Port 2
     - 153b:1182
   * - Terratec Cinergy S2 USB BOX
     - 0ccd:0x0105
   * - Terratec Cinergy S2 USB HD
     - 0ccd:00a8
   * - Terratec Cinergy S2 USB HD Rev.2
     - 0ccd:00b0
   * - Terratec Cinergy S2 USB HD Rev.3
     - 0ccd:0102
   * - X3M TV SPC1400HD PCI
     - 0x1f4d:0x3100


code:
.. SPDX-License-Identifier: GPL-2.0

dvb-usb-ec168 cards list
========================

.. tabularcolumns:: |p{7.0cm}|p{10.5cm}|

.. flat-table::
   :header-rows: 1
   :widths: 7 13
   :stub-columns: 0

   * - Card name
     - USB IDs
   * - E3C EC168 reference design
     - 18b4:1689, 18b4:fffa, 18b4:fffb, 18b4:1001, 18b4:1002


code:
.. SPDX-License-Identifier: GPL-2.0

dvb-usb-gl861 cards list
========================

.. tabularcolumns:: |p{7.0cm}|p{10.5cm}|

.. flat-table::
   :header-rows: 1
   :widths: 7 13
   :stub-columns: 0

   * - Card name
     - USB IDs
   * - 774 Friio White ISDB-T USB2.0
     - 7a69:0001
   * - A-LINK DTU DVB-T USB2.0
     - 05e3:f170
   * - MSI Mega Sky 55801 DVB-T USB2.0
     - 0db0:5581


code:
.. SPDX-License-Identifier: GPL-2.0

dvb-usb-gp8psk cards list
=========================

.. tabularcolumns:: |p{7.0cm}|p{10.5cm}|

.. flat-table::
   :header-rows: 1
   :widths: 7 13
   :stub-columns: 0

   * - Card name
     - USB IDs
   * - Genpix 8PSK-to-USB2 Rev.1 DVB-S receiver
     - 09c0:0200, 09c0:0201
   * - Genpix 8PSK-to-USB2 Rev.2 DVB-S receiver
     - 09c0:0202
   * - Genpix SkyWalker-1 DVB-S receiver
     - 09c0:0203
   * - Genpix SkyWalker-2 DVB-S receiver
     - 09c0:0206


code:
.. SPDX-License-Identifier: GPL-2.0

dvb-usb-lmedm04 cards list
==========================

.. tabularcolumns:: |p{7.0cm}|p{10.5cm}|

.. flat-table::
   :header-rows: 1
   :widths: 7 13
   :stub-columns: 0

   * - Card name
     - USB IDs
   * - DM04_LME2510C_DVB-S
     - 3344:1120
   * - DM04_LME2510C_DVB-S RS2000
     - 3344:22f0
   * - DM04_LME2510_DVB-S
     - 3344:1122


code:
.. SPDX-License-Identifier: GPL-2.0

dvb-usb-m920x cards list
========================

.. tabularcolumns:: |p{7.0cm}|p{10.5cm}|

.. flat-table::
   :header-rows: 1
   :widths: 7 13
   :stub-columns: 0

   * - Card name
     - USB IDs
   * - DTV-DVB UDTT7049
     - 13d3:3219
   * - Dposh DVB-T USB2.0
     - 1498:9206, 1498:a090
   * - LifeView TV Walker Twin DVB-T USB2.0
     - 10fd:0514, 10fd:0513
   * - MSI DIGI VOX mini II DVB-T USB2.0
     - 10fd:1513
   * - MSI Mega Sky 580 DVB-T USB2.0
     - 0db0:5580
   * - Pinnacle PCTV 310e
     - 13d3:3211


code:
.. SPDX-License-Identifier: GPL-2.0

dvb-usb-nova-t-usb2 cards list
==============================

.. tabularcolumns:: |p{7.0cm}|p{10.5cm}|

.. flat-table::
   :header-rows: 1
   :widths: 7 13
   :stub-columns: 0

   * - Card name
     - USB IDs
   * - Hauppauge WinTV-NOVA-T usb2
     - 2040:9300, 2040:9301


code:
.. SPDX-License-Identifier: GPL-2.0

dvb-usb-opera1 cards list
=========================

.. tabularcolumns:: |p{7.0cm}|p{10.5cm}|

.. flat-table::
   :header-rows: 1
   :widths: 7 13
   :stub-columns: 0

   * - Card name
     - USB IDs
   * - Opera1 DVB-S USB2.0
     - 04b4:2830, 695c:3829


code:
.. SPDX-License-Identifier: GPL-2.0

dvb-usb-pctv452e cards list
===========================

.. tabularcolumns:: |p{7.0cm}|p{10.5cm}|

.. flat-table::
   :header-rows: 1
   :widths: 7 13
   :stub-columns: 0

   * - Card name
     - USB IDs
   * - PCTV HDTV USB
     - 2304:021f
   * - Technotrend TT Connect S2-3600
     - 0b48:3007
   * - Technotrend TT Connect S2-3650-CI
     - 0b48:300a


code:
.. SPDX-License-Identifier: GPL-2.0

dvb-usb-rtl28xxu cards list
===========================

.. tabularcolumns:: |p{7.0cm}|p{10.5cm}|

.. flat-table::
   :header-rows: 1
   :widths: 7 13
   :stub-columns: 0

   * - Card name
     - USB IDs
   * - ASUS My Cinema-U3100Mini Plus V2
     - 1b80:d3a8
   * - Astrometa DVB-T2
     - 15f4:0131
   * - Compro VideoMate U620F
     - 185b:0620
   * - Compro VideoMate U650F
     - 185b:0650
   * - Crypto ReDi PC 50 A
     - 1f4d:a803
   * - Dexatek DK DVB-T Dongle
     - 1d19:1101
   * - Dexatek DK mini DVB-T Dongle
     - 1d19:1102
   * - DigitalNow Quad DVB-T Receiver
     - 0413:6680
   * - Freecom USB2.0 DVB-T
     - 14aa:0160, 14aa:0161
   * - G-Tek Electronics Group Lifeview LV5TDLX DVB-T
     - 1f4d:b803
   * - GIGABYTE U7300
     - 1b80:d393
   * - Genius TVGo DVB-T03
     - 0458:707f
   * - GoTView MasterHD 3
     - 5654:ca42
   * - Leadtek WinFast DTV Dongle mini
     - 0413:6a03
   * - Leadtek WinFast DTV2000DS Plus
     - 0413:6f12
   * - Leadtek Winfast DTV Dongle Mini D
     - 0413:6f0f
   * - MSI DIGIVOX Micro HD
     - 1d19:1104
   * - MaxMedia HU394-T
     - 1b80:d394
   * - PROlectrix DV107669
     - 1f4d:d803
   * - Peak DVB-T USB
     - 1b80:d395
   * - Realtek RTL2831U reference design
     - 0bda:2831
   * - Realtek RTL2832U reference design
     - 0bda:2832, 0bda:2838
   * - Sveon STV20
     - 1b80:d39d
   * - Sveon STV21
     - 1b80:d3b0
   * - Sveon STV27
     - 1b80:d3af
   * - TURBO-X Pure TV Tuner DTT-2000
     - 1b80:d3a4
   * - TerraTec Cinergy T Stick Black
     - 0ccd:00a9
   * - TerraTec Cinergy T Stick RC (Rev. 3)
     - 0ccd:00d3
   * - TerraTec Cinergy T Stick+
     - 0ccd:00d7
   * - TerraTec NOXON DAB Stick
     - 0ccd:00b3
   * - TerraTec NOXON DAB Stick (rev 2)
     - 0ccd:00e0
   * - TerraTec NOXON DAB Stick (rev 3)
     - 0ccd:00b4
   * - Trekstor DVB-T Stick Terres 2.0
     - 1f4d:C803


code:
.. SPDX-License-Identifier: GPL-2.0

dvb-usb-technisat-usb2 cards list
=================================

.. tabularcolumns:: |p{7.0cm}|p{10.5cm}|

.. flat-table::
   :header-rows: 1
   :widths: 7 13
   :stub-columns: 0

   * - Card name
     - USB IDs
   * - Technisat SkyStar USB HD (DVB-S/S2)
     - 14f7:0500


code:
.. SPDX-License-Identifier: GPL-2.0

dvb-usb-ttusb2 cards list
=========================

.. tabularcolumns:: |p{7.0cm}|p{10.5cm}|

.. flat-table::
   :header-rows: 1
   :widths: 7 13
   :stub-columns: 0

   * - Card name
     - USB IDs
   * - Pinnacle 400e DVB-S USB2.0
     - 2304:020f
   * - Pinnacle 450e DVB-S USB2.0
     - 2304:0222
   * - Technotrend TT-connect CT-3650
     - 0b48:300d
   * - Technotrend TT-connect S-2400
     - 0b48:3006
   * - Technotrend TT-connect S-2400 (8kB EEPROM)
     - 0b48:3009


code:
.. SPDX-License-Identifier: GPL-2.0

dvb-usb-umt-010 cards list
==========================

.. tabularcolumns:: |p{7.0cm}|p{10.5cm}|

.. flat-table::
   :header-rows: 1
   :widths: 7 13
   :stub-columns: 0

   * - Card name
     - USB IDs
   * - Hanftek UMT-010 DVB-T USB2.0
     - 15f4:0001, 15f4:0015


code:
.. SPDX-License-Identifier: GPL-2.0

dvb-usb-vp702x cards list
=========================

.. tabularcolumns:: |p{7.0cm}|p{10.5cm}|

.. flat-table::
   :header-rows: 1
   :widths: 7 13
   :stub-columns: 0

   * - Card name
     - USB IDs
   * - TwinhanDTV StarBox DVB-S USB2.0 (VP7021)
     - 13d3:3207


code:
.. SPDX-License-Identifier: GPL-2.0

dvb-usb-vp7045 cards list
=========================

.. tabularcolumns:: |p{7.0cm}|p{10.5cm}|

.. flat-table::
   :header-rows: 1
   :widths: 7 13
   :stub-columns: 0

   * - Card name
     - USB IDs
   * - DigitalNow TinyUSB 2 DVB-t Receiver
     - 13d3:3223, 13d3:3224
   * - Twinhan USB2.0 DVB-T receiver (TwinhanDTV Alpha/MagicBox II)
     - 13d3:3205, 13d3:3206


code:
.. SPDX-License-Identifier: GPL-2.0

dvb-usb-zd1301 cards list
=========================

.. tabularcolumns:: |p{7.0cm}|p{10.5cm}|

.. flat-table::
   :header-rows: 1
   :widths: 7 13
   :stub-columns: 0

   * - Card name
     - USB IDs
   * - ZyDAS ZD1301 reference design
     - 0ace:13a1


code:
.. SPDX-License-Identifier: GPL-2.0

==========
Digital TV
==========

.. toctree::

	dvb_intro
	ci
	faq
	dvb_references


code:
.. SPDX-License-Identifier: GPL-2.0

==============================
Using the Digital TV Framework
==============================

Introduction
~~~~~~~~~~~~

One significant difference between Digital TV and Analogue TV that the
unwary (like myself) should consider is that, although the component
structure of DVB-T cards are substantially similar to Analogue TV cards,
they function in substantially different ways.

The purpose of an Analogue TV is to receive and display an Analogue
Television signal. An Analogue TV signal (otherwise known as composite
video) is an analogue encoding of a sequence of image frames (25 frames
per second in Europe) rasterised using an interlacing technique.
Interlacing takes two fields to represent one frame. Therefore, an
Analogue TV card for a PC has the following purpose:

* Tune the receiver to receive a broadcast signal
* demodulate the broadcast signal
* demultiplex the analogue video signal and analogue audio
  signal.

  .. note::

     some countries employ a digital audio signal
     embedded within the modulated composite analogue signal -
     using NICAM signaling.)

* digitize the analogue video signal and make the resulting datastream
  available to the data bus.

The digital datastream from an Analogue TV card is generated by
circuitry on the card and is often presented uncompressed. For a PAL TV
signal encoded at a resolution of 768x576 24-bit color pixels over 25
frames per second - a fair amount of data is generated and must be
processed by the PC before it can be displayed on the video monitor
screen. Some Analogue TV cards for PCs have onboard MPEG2 encoders which
permit the raw digital data stream to be presented to the PC in an
encoded and compressed form - similar to the form that is used in
Digital TV.

The purpose of a simple budget digital TV card (DVB-T,C or S) is to
simply:

* Tune the received to receive a broadcast signal. * Extract the encoded
  digital datastream from the broadcast signal.
* Make the encoded digital datastream (MPEG2) available to the data bus.

The significant difference between the two is that the tuner on the
analogue TV card spits out an Analogue signal, whereas the tuner on the
digital TV card spits out a compressed encoded digital datastream. As
the signal is already digitised, it is trivial to pass this datastream
to the PC databus with minimal additional processing and then extract
the digital video and audio datastreams passing them to the appropriate
software or hardware for decoding and viewing.

Getting the card going
~~~~~~~~~~~~~~~~~~~~~~

The Device Driver API for DVB under Linux will the following
device nodes via the devfs filesystem:

* /dev/dvb/adapter0/demux0
* /dev/dvb/adapter0/dvr0
* /dev/dvb/adapter0/frontend0

The ``/dev/dvb/adapter0/dvr0`` device node is used to read the MPEG2
Data Stream and the ``/dev/dvb/adapter0/frontend0`` device node is used
to tune the frontend tuner module. The ``/dev/dvb/adapter0/demux0`` is
used to control what programs will be received.

Depending on the card's feature set, the Device Driver API could also
expose other device nodes:

* /dev/dvb/adapter0/ca0
* /dev/dvb/adapter0/audio0
* /dev/dvb/adapter0/net0
* /dev/dvb/adapter0/osd0
* /dev/dvb/adapter0/video0

The ``/dev/dvb/adapter0/ca0`` is used to decode encrypted channels. The
other device nodes are found only on devices that use the av7110
driver, with is now obsoleted, together with the extra API whose such
devices use.

Receiving a digital TV channel
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

This section attempts to explain how it works and how this affects the
configuration of a Digital TV card.

On this example, we're considering tuning into DVB-T channels in
Australia, at the Melbourne region.

The frequencies broadcast by Mount Dandenong transmitters are,
currently:

Table 1. Transponder Frequencies Mount Dandenong, Vic, Aus.

===========	===========
Broadcaster	Frequency
===========	===========
Seven		177.500 Mhz
SBS		184.500 Mhz
Nine		191.625 Mhz
Ten		219.500 Mhz
ABC		226.500 Mhz
Channel 31	557.625 Mhz
===========	===========

The digital TV Scan utilities (like dvbv5-scan) have use a set of
compiled-in defaults for various countries and regions. Those are
currently provided as a separate package, called dtv-scan-tables. It's
git tree is located at LinuxTV.org:

    https://git.linuxtv.org/dtv-scan-tables.git/

If none of the tables there suit, you can specify a data file on the
command line which contains the transponder frequencies. Here is a
sample file for the above channel transponders, in the old "channel"
format::

	# Data file for DVB scan program
	#
	# C Frequency SymbolRate FEC QAM
	# S Frequency Polarisation SymbolRate FEC
	# T Frequency Bandwidth FEC FEC2 QAM Mode Guard Hier

	T 177500000 7MHz AUTO AUTO QAM64 8k 1/16 NONE
	T 184500000 7MHz AUTO AUTO QAM64 8k 1/8 NONE
	T 191625000 7MHz AUTO AUTO QAM64 8k 1/16 NONE
	T 219500000 7MHz AUTO AUTO QAM64 8k 1/16 NONE
	T 226500000 7MHz AUTO AUTO QAM64 8k 1/16 NONE
	T 557625000 7MHz AUTO AUTO QPSK 8k 1/16 NONE

Nowadays, we prefer to use a newer format, with is more verbose and easier
to understand. With the new format, the "Seven" channel transponder's
data is represented by::

	[Seven]
		DELIVERY_SYSTEM = DVBT
		FREQUENCY = 177500000
		BANDWIDTH_HZ = 7000000
		CODE_RATE_HP = AUTO
		CODE_RATE_LP = AUTO
		MODULATION = QAM/64
		TRANSMISSION_MODE = 8K
		GUARD_INTERVAL = 1/16
		HIERARCHY = NONE
		INVERSION = AUTO

For an updated version of the complete table, please see:

    https://git.linuxtv.org/dtv-scan-tables.git/tree/dvb-t/au-Melbourne

When the Digital TV scanning utility runs, it will output a file
containing the information for all the audio and video programs that
exists into each channel's transponders which the card's frontend can
lock onto. (i.e. any whose signal is strong enough at your antenna).

Here's the output of the dvbv5 tools from a channel scan took from
Melburne::

    [ABC HDTV]
	    SERVICE_ID = 560
	    VIDEO_PID = 2307
	    AUDIO_PID = 0
	    DELIVERY_SYSTEM = DVBT
	    FREQUENCY = 226500000
	    INVERSION = OFF
	    BANDWIDTH_HZ = 7000000
	    CODE_RATE_HP = 3/4
	    CODE_RATE_LP = 3/4
	    MODULATION = QAM/64
	    TRANSMISSION_MODE = 8K
	    GUARD_INTERVAL = 1/16
	    HIERARCHY = NONE

    [ABC TV Melbourne]
	    SERVICE_ID = 561
	    VIDEO_PID = 512
	    AUDIO_PID = 650
	    DELIVERY_SYSTEM = DVBT
	    FREQUENCY = 226500000
	    INVERSION = OFF
	    BANDWIDTH_HZ = 7000000
	    CODE_RATE_HP = 3/4
	    CODE_RATE_LP = 3/4
	    MODULATION = QAM/64
	    TRANSMISSION_MODE = 8K
	    GUARD_INTERVAL = 1/16
	    HIERARCHY = NONE

    [ABC TV 2]
	    SERVICE_ID = 562
	    VIDEO_PID = 512
	    AUDIO_PID = 650
	    DELIVERY_SYSTEM = DVBT
	    FREQUENCY = 226500000
	    INVERSION = OFF
	    BANDWIDTH_HZ = 7000000
	    CODE_RATE_HP = 3/4
	    CODE_RATE_LP = 3/4
	    MODULATION = QAM/64
	    TRANSMISSION_MODE = 8K
	    GUARD_INTERVAL = 1/16
	    HIERARCHY = NONE

    [ABC TV 3]
	    SERVICE_ID = 563
	    VIDEO_PID = 512
	    AUDIO_PID = 650
	    DELIVERY_SYSTEM = DVBT
	    FREQUENCY = 226500000
	    INVERSION = OFF
	    BANDWIDTH_HZ = 7000000
	    CODE_RATE_HP = 3/4
	    CODE_RATE_LP = 3/4
	    MODULATION = QAM/64
	    TRANSMISSION_MODE = 8K
	    GUARD_INTERVAL = 1/16
	    HIERARCHY = NONE

    [ABC TV 4]
	    SERVICE_ID = 564
	    VIDEO_PID = 512
	    AUDIO_PID = 650
	    DELIVERY_SYSTEM = DVBT
	    FREQUENCY = 226500000
	    INVERSION = OFF
	    BANDWIDTH_HZ = 7000000
	    CODE_RATE_HP = 3/4
	    CODE_RATE_LP = 3/4
	    MODULATION = QAM/64
	    TRANSMISSION_MODE = 8K
	    GUARD_INTERVAL = 1/16
	    HIERARCHY = NONE

    [ABC DiG Radio]
	    SERVICE_ID = 566
	    VIDEO_PID = 0
	    AUDIO_PID = 2311
	    DELIVERY_SYSTEM = DVBT
	    FREQUENCY = 226500000
	    INVERSION = OFF
	    BANDWIDTH_HZ = 7000000
	    CODE_RATE_HP = 3/4
	    CODE_RATE_LP = 3/4
	    MODULATION = QAM/64
	    TRANSMISSION_MODE = 8K
	    GUARD_INTERVAL = 1/16
	    HIERARCHY = NONE

    [TEN Digital]
	    SERVICE_ID = 1585
	    VIDEO_PID = 512
	    AUDIO_PID = 650
	    DELIVERY_SYSTEM = DVBT
	    FREQUENCY = 219500000
	    INVERSION = OFF
	    BANDWIDTH_HZ = 7000000
	    CODE_RATE_HP = 3/4
	    CODE_RATE_LP = 1/2
	    MODULATION = QAM/64
	    TRANSMISSION_MODE = 8K
	    GUARD_INTERVAL = 1/16
	    HIERARCHY = NONE

    [TEN Digital 1]
	    SERVICE_ID = 1586
	    VIDEO_PID = 512
	    AUDIO_PID = 650
	    DELIVERY_SYSTEM = DVBT
	    FREQUENCY = 219500000
	    INVERSION = OFF
	    BANDWIDTH_HZ = 7000000
	    CODE_RATE_HP = 3/4
	    CODE_RATE_LP = 1/2
	    MODULATION = QAM/64
	    TRANSMISSION_MODE = 8K
	    GUARD_INTERVAL = 1/16
	    HIERARCHY = NONE

    [TEN Digital 2]
	    SERVICE_ID = 1587
	    VIDEO_PID = 512
	    AUDIO_PID = 650
	    DELIVERY_SYSTEM = DVBT
	    FREQUENCY = 219500000
	    INVERSION = OFF
	    BANDWIDTH_HZ = 7000000
	    CODE_RATE_HP = 3/4
	    CODE_RATE_LP = 1/2
	    MODULATION = QAM/64
	    TRANSMISSION_MODE = 8K
	    GUARD_INTERVAL = 1/16
	    HIERARCHY = NONE

    [TEN Digital 3]
	    SERVICE_ID = 1588
	    VIDEO_PID = 512
	    AUDIO_PID = 650
	    DELIVERY_SYSTEM = DVBT
	    FREQUENCY = 219500000
	    INVERSION = OFF
	    BANDWIDTH_HZ = 7000000
	    CODE_RATE_HP = 3/4
	    CODE_RATE_LP = 1/2
	    MODULATION = QAM/64
	    TRANSMISSION_MODE = 8K
	    GUARD_INTERVAL = 1/16
	    HIERARCHY = NONE

    [TEN Digital]
	    SERVICE_ID = 1589
	    VIDEO_PID = 512
	    AUDIO_PID = 650
	    DELIVERY_SYSTEM = DVBT
	    FREQUENCY = 219500000
	    INVERSION = OFF
	    BANDWIDTH_HZ = 7000000
	    CODE_RATE_HP = 3/4
	    CODE_RATE_LP = 1/2
	    MODULATION = QAM/64
	    TRANSMISSION_MODE = 8K
	    GUARD_INTERVAL = 1/16
	    HIERARCHY = NONE

    [TEN Digital 4]
	    SERVICE_ID = 1590
	    VIDEO_PID = 512
	    AUDIO_PID = 650
	    DELIVERY_SYSTEM = DVBT
	    FREQUENCY = 219500000
	    INVERSION = OFF
	    BANDWIDTH_HZ = 7000000
	    CODE_RATE_HP = 3/4
	    CODE_RATE_LP = 1/2
	    MODULATION = QAM/64
	    TRANSMISSION_MODE = 8K
	    GUARD_INTERVAL = 1/16
	    HIERARCHY = NONE

    [TEN Digital]
	    SERVICE_ID = 1591
	    VIDEO_PID = 512
	    AUDIO_PID = 650
	    DELIVERY_SYSTEM = DVBT
	    FREQUENCY = 219500000
	    INVERSION = OFF
	    BANDWIDTH_HZ = 7000000
	    CODE_RATE_HP = 3/4
	    CODE_RATE_LP = 1/2
	    MODULATION = QAM/64
	    TRANSMISSION_MODE = 8K
	    GUARD_INTERVAL = 1/16
	    HIERARCHY = NONE

    [TEN HD]
	    SERVICE_ID = 1592
	    VIDEO_PID = 514
	    AUDIO_PID = 0
	    DELIVERY_SYSTEM = DVBT
	    FREQUENCY = 219500000
	    INVERSION = OFF
	    BANDWIDTH_HZ = 7000000
	    CODE_RATE_HP = 3/4
	    CODE_RATE_LP = 1/2
	    MODULATION = QAM/64
	    TRANSMISSION_MODE = 8K
	    GUARD_INTERVAL = 1/16
	    HIERARCHY = NONE

    [TEN Digital]
	    SERVICE_ID = 1593
	    VIDEO_PID = 512
	    AUDIO_PID = 650
	    DELIVERY_SYSTEM = DVBT
	    FREQUENCY = 219500000
	    INVERSION = OFF
	    BANDWIDTH_HZ = 7000000
	    CODE_RATE_HP = 3/4
	    CODE_RATE_LP = 1/2
	    MODULATION = QAM/64
	    TRANSMISSION_MODE = 8K
	    GUARD_INTERVAL = 1/16
	    HIERARCHY = NONE

    [Nine Digital]
	    SERVICE_ID = 1072
	    VIDEO_PID = 513
	    AUDIO_PID = 660
	    DELIVERY_SYSTEM = DVBT
	    FREQUENCY = 191625000
	    INVERSION = OFF
	    BANDWIDTH_HZ = 7000000
	    CODE_RATE_HP = 3/4
	    CODE_RATE_LP = 1/2
	    MODULATION = QAM/64
	    TRANSMISSION_MODE = 8K
	    GUARD_INTERVAL = 1/16
	    HIERARCHY = NONE

    [Nine Digital HD]
	    SERVICE_ID = 1073
	    VIDEO_PID = 512
	    AUDIO_PID = 0
	    DELIVERY_SYSTEM = DVBT
	    FREQUENCY = 191625000
	    INVERSION = OFF
	    BANDWIDTH_HZ = 7000000
	    CODE_RATE_HP = 3/4
	    CODE_RATE_LP = 1/2
	    MODULATION = QAM/64
	    TRANSMISSION_MODE = 8K
	    GUARD_INTERVAL = 1/16
	    HIERARCHY = NONE

    [Nine Guide]
	    SERVICE_ID = 1074
	    VIDEO_PID = 514
	    AUDIO_PID = 670
	    DELIVERY_SYSTEM = DVBT
	    FREQUENCY = 191625000
	    INVERSION = OFF
	    BANDWIDTH_HZ = 7000000
	    CODE_RATE_HP = 3/4
	    CODE_RATE_LP = 1/2
	    MODULATION = QAM/64
	    TRANSMISSION_MODE = 8K
	    GUARD_INTERVAL = 1/16
	    HIERARCHY = NONE

    [7 Digital]
	    SERVICE_ID = 1328
	    VIDEO_PID = 769
	    AUDIO_PID = 770
	    DELIVERY_SYSTEM = DVBT
	    FREQUENCY = 177500000
	    INVERSION = OFF
	    BANDWIDTH_HZ = 7000000
	    CODE_RATE_HP = 2/3
	    CODE_RATE_LP = 2/3
	    MODULATION = QAM/64
	    TRANSMISSION_MODE = 8K
	    GUARD_INTERVAL = 1/8
	    HIERARCHY = NONE

    [7 Digital 1]
	    SERVICE_ID = 1329
	    VIDEO_PID = 769
	    AUDIO_PID = 770
	    DELIVERY_SYSTEM = DVBT
	    FREQUENCY = 177500000
	    INVERSION = OFF
	    BANDWIDTH_HZ = 7000000
	    CODE_RATE_HP = 2/3
	    CODE_RATE_LP = 2/3
	    MODULATION = QAM/64
	    TRANSMISSION_MODE = 8K
	    GUARD_INTERVAL = 1/8
	    HIERARCHY = NONE

    [7 Digital 2]
	    SERVICE_ID = 1330
	    VIDEO_PID = 769
	    AUDIO_PID = 770
	    DELIVERY_SYSTEM = DVBT
	    FREQUENCY = 177500000
	    INVERSION = OFF
	    BANDWIDTH_HZ = 7000000
	    CODE_RATE_HP = 2/3
	    CODE_RATE_LP = 2/3
	    MODULATION = QAM/64
	    TRANSMISSION_MODE = 8K
	    GUARD_INTERVAL = 1/8
	    HIERARCHY = NONE

    [7 Digital 3]
	    SERVICE_ID = 1331
	    VIDEO_PID = 769
	    AUDIO_PID = 770
	    DELIVERY_SYSTEM = DVBT
	    FREQUENCY = 177500000
	    INVERSION = OFF
	    BANDWIDTH_HZ = 7000000
	    CODE_RATE_HP = 2/3
	    CODE_RATE_LP = 2/3
	    MODULATION = QAM/64
	    TRANSMISSION_MODE = 8K
	    GUARD_INTERVAL = 1/8
	    HIERARCHY = NONE

    [7 HD Digital]
	    SERVICE_ID = 1332
	    VIDEO_PID = 833
	    AUDIO_PID = 834
	    DELIVERY_SYSTEM = DVBT
	    FREQUENCY = 177500000
	    INVERSION = OFF
	    BANDWIDTH_HZ = 7000000
	    CODE_RATE_HP = 2/3
	    CODE_RATE_LP = 2/3
	    MODULATION = QAM/64
	    TRANSMISSION_MODE = 8K
	    GUARD_INTERVAL = 1/8
	    HIERARCHY = NONE

    [7 Program Guide]
	    SERVICE_ID = 1334
	    VIDEO_PID = 865
	    AUDIO_PID = 866
	    DELIVERY_SYSTEM = DVBT
	    FREQUENCY = 177500000
	    INVERSION = OFF
	    BANDWIDTH_HZ = 7000000
	    CODE_RATE_HP = 2/3
	    CODE_RATE_LP = 2/3
	    MODULATION = QAM/64
	    TRANSMISSION_MODE = 8K
	    GUARD_INTERVAL = 1/8
	    HIERARCHY = NONE

    [SBS HD]
	    SERVICE_ID = 784
	    VIDEO_PID = 102
	    AUDIO_PID = 103
	    DELIVERY_SYSTEM = DVBT
	    FREQUENCY = 536500000
	    INVERSION = OFF
	    BANDWIDTH_HZ = 7000000
	    CODE_RATE_HP = 2/3
	    CODE_RATE_LP = 2/3
	    MODULATION = QAM/64
	    TRANSMISSION_MODE = 8K
	    GUARD_INTERVAL = 1/8
	    HIERARCHY = NONE

    [SBS DIGITAL 1]
	    SERVICE_ID = 785
	    VIDEO_PID = 161
	    AUDIO_PID = 81
	    DELIVERY_SYSTEM = DVBT
	    FREQUENCY = 536500000
	    INVERSION = OFF
	    BANDWIDTH_HZ = 7000000
	    CODE_RATE_HP = 2/3
	    CODE_RATE_LP = 2/3
	    MODULATION = QAM/64
	    TRANSMISSION_MODE = 8K
	    GUARD_INTERVAL = 1/8
	    HIERARCHY = NONE

    [SBS DIGITAL 2]
	    SERVICE_ID = 786
	    VIDEO_PID = 162
	    AUDIO_PID = 83
	    DELIVERY_SYSTEM = DVBT
	    FREQUENCY = 536500000
	    INVERSION = OFF
	    BANDWIDTH_HZ = 7000000
	    CODE_RATE_HP = 2/3
	    CODE_RATE_LP = 2/3
	    MODULATION = QAM/64
	    TRANSMISSION_MODE = 8K
	    GUARD_INTERVAL = 1/8
	    HIERARCHY = NONE

    [SBS EPG]
	    SERVICE_ID = 787
	    VIDEO_PID = 163
	    AUDIO_PID = 85
	    DELIVERY_SYSTEM = DVBT
	    FREQUENCY = 536500000
	    INVERSION = OFF
	    BANDWIDTH_HZ = 7000000
	    CODE_RATE_HP = 2/3
	    CODE_RATE_LP = 2/3
	    MODULATION = QAM/64
	    TRANSMISSION_MODE = 8K
	    GUARD_INTERVAL = 1/8
	    HIERARCHY = NONE

    [SBS RADIO 1]
	    SERVICE_ID = 798
	    VIDEO_PID = 0
	    AUDIO_PID = 201
	    DELIVERY_SYSTEM = DVBT
	    FREQUENCY = 536500000
	    INVERSION = OFF
	    BANDWIDTH_HZ = 7000000
	    CODE_RATE_HP = 2/3
	    CODE_RATE_LP = 2/3
	    MODULATION = QAM/64
	    TRANSMISSION_MODE = 8K
	    GUARD_INTERVAL = 1/8
	    HIERARCHY = NONE

    [SBS RADIO 2]
	    SERVICE_ID = 799
	    VIDEO_PID = 0
	    AUDIO_PID = 202
	    DELIVERY_SYSTEM = DVBT
	    FREQUENCY = 536500000
	    INVERSION = OFF
	    BANDWIDTH_HZ = 7000000
	    CODE_RATE_HP = 2/3
	    CODE_RATE_LP = 2/3
	    MODULATION = QAM/64
	    TRANSMISSION_MODE = 8K
	    GUARD_INTERVAL = 1/8
	    HIERARCHY = NONE


code:
.. SPDX-License-Identifier: GPL-2.0

References
==========

The main development site and GIT repository for Digital TV
drivers is https://linuxtv.org.

The DVB mailing list linux-dvb is hosted at vger. Please see
http://vger.kernel.org/vger-lists.html#linux-media for details.

There are also some other old lists hosted at:
https://linuxtv.org/lists.php. If you're interested on that for historic
reasons, please check the archive at https://linuxtv.org/pipermail/linux-dvb/.

The media subsystem Wiki is hosted at https://linuxtv.org/wiki/.
There, you'll find lots of information, from both development and usage
of media boards. Please check it before asking newbie questions on the
mailing list or IRC channels.

The API documentation is documented at the Kernel tree. You can find it
in both html and pdf formats, together with other useful documentation at:

  - https://linuxtv.org/docs.php.

You may also find useful material at https://linuxtv.org/downloads/.

In order to get the needed firmware for some drivers to work, there's
a script at the kernel tree, at scripts/get_dvb_firmware.