Dongle refers to any small piece of hardware that plugs into a computer. A PC TV dongle is used to watch TV on PC. In general, there are two types of PC TV dongles based on the type of TV signals that they use. If digital signals are used as a source, then it is a digital PC TV dongle and if analog signals are used, then it is an analog PC TV dongle. Several regions of the world are in different stages of adaptation and are implementing different broadcasting standards. There are currently four different digital television-broadcasting standards:
- Advanced Television System Committee (ATSC) - This standard has been adopted in the United States and in other countries.
- Digital Video Broadcasting (DVB) - This standard has been adapted in Europe.
- Integrated Services Digital Broadcasting (ISDB) -This standard has been adopted in Japan.
- Digital Multimedia Broadcasting (DMB) - The DMB standard has been adopted in the South Korea.
- For analog television, there are three broadcasting standards:
- National Television Systems Committee (NTSC) – This standard has been adapted in United States.
- Phase Alternation Line rate (PAL) – This standard has been adapted in Europe, Australia.
- SECAM - This standard has been adapted in France.
Many countries are replacing broadcast analog television with the digital television. Coming to the USB interface side of the PC TV dongle, there is a need for a USB controller, which has a powerful processor in it to support features to enhance the user experience. In the case of an analog PC TV dongle, there is a need for an USB 3.0 device controller to support reliable streaming video given that the bandwidth offered by USB2.0 is not sufficient. The following sections of this article talk about the design of digital and analog PC TV dongles.
Figure 1. Digital PC TV dongle
The main components in a digital PC TV dongle are the digital tuner, digital demodulator, and a USB controller to act as the MPEG2-TS to USB Bridge. The tuner present in the TV dongle tunes the RF signal to the specific demodulator connected to it. Next the demodulator takes these DVB/ATSC/ISDB/DMB inputs and outputs an MPEG2 transport stream to the USB controller. The MPEG2-TS interface is now adopted as the standard encoding and delivery interface for most of the compressed digital video broadcasting technologies. The MPEG2-TS interface was designed for error-prone links that do not offer support to carry structured data. It uses packets of small size and provides many features for data link layers such as packet identification (PID), synchronization (Sync Byte), timing (clock references and timestamps), multiplexing, and sequencing information (CC). The MPEG2-TS packet is a 188-byte packet, consisting of a 4-byte header.
The header, shown in the above Figure, contains a sync byte used for random access to the stream. It also contains a program ID (PID), which allows identification of all packets belonging to the same data stream. Alternatively, it provides a means to multiplex data streams within transport streams. Finally, the Continuity Counter field (CC) provides a mechanism to detect missing packets by incrementing each packet belonging to the same PID by one. The signals involved in the MPEG2-TS interface are:
- MPEG_CLK: This CLK provides the reference for the parallel data stream.
- MPEG_D [7:0]: This is an 8-bit parallel data of the MPEG2-TS.
- MPEG_Valid: This signal is asserted when the data in the MPEG_D [7:0] is valid.
- MPEG_Sync: This signal is asserted for every first byte of the 188 byte packet.
The MPEG2-TS-to-USB Bridge sends MPEG2-TS data to the PC across the USB interface. This bridge enumerates as a vendor class with one Isochronous IN endpoint. This device is mapped to the BDA driver .sys file in the PC, the BDA driver forwards the data to the media player application where it is displayed.
Other than the data path, the tuner and demodulator are also connected to USB controller through an I2C interface. The I2C bus connection can be observed in the TV dongle block diagram that is shown above. This I2C bus is used to initialize and configure the tuner and demodulator from the drivers on the host PC across USB. If the USB controller has a dedicated I2C engine then that can be used; otherwise, two GPIO lines can be bit-banged for the I2C operation (SCL and SDA).