xref: /linux/Documentation/admin-guide/media/dvb_intro.rst (revision c4b89166d291959cf9a2e8da48f7bfa65b7d56d4)
1*c4b89166SMauro Carvalho Chehab.. SPDX-License-Identifier: GPL-2.0
2*c4b89166SMauro Carvalho Chehab
3*c4b89166SMauro Carvalho Chehab==============================
4*c4b89166SMauro Carvalho ChehabUsing the Digital TV Framework
5*c4b89166SMauro Carvalho Chehab==============================
6*c4b89166SMauro Carvalho Chehab
7*c4b89166SMauro Carvalho ChehabFebruary 14th 2006
8*c4b89166SMauro Carvalho Chehab
9*c4b89166SMauro Carvalho ChehabIntroduction
10*c4b89166SMauro Carvalho Chehab~~~~~~~~~~~~
11*c4b89166SMauro Carvalho Chehab
12*c4b89166SMauro Carvalho Chehab.. note::
13*c4b89166SMauro Carvalho Chehab
14*c4b89166SMauro Carvalho Chehab   This documentation is outdated. Please check at the DVB wiki
15*c4b89166SMauro Carvalho Chehab   at https://linuxtv.org/wiki for more updated info.
16*c4b89166SMauro Carvalho Chehab
17*c4b89166SMauro Carvalho Chehab   There's a section there specific for Avermedia boards at:
18*c4b89166SMauro Carvalho Chehab   https://linuxtv.org/wiki/index.php/AVerMedia
19*c4b89166SMauro Carvalho Chehab
20*c4b89166SMauro Carvalho Chehab
21*c4b89166SMauro Carvalho ChehabAssumptions and Introduction
22*c4b89166SMauro Carvalho Chehab~~~~~~~~~~~~~~~~~~~~~~~~~~~~
23*c4b89166SMauro Carvalho Chehab
24*c4b89166SMauro Carvalho ChehabIt  is assumed that the reader understands the basic structure
25*c4b89166SMauro Carvalho Chehabof  the Linux Kernel DVB drivers and the general principles of
26*c4b89166SMauro Carvalho ChehabDigital TV.
27*c4b89166SMauro Carvalho Chehab
28*c4b89166SMauro Carvalho ChehabOne  significant difference between Digital TV and Analogue TV
29*c4b89166SMauro Carvalho Chehabthat  the  unwary  (like  myself)  should  consider  is  that,
30*c4b89166SMauro Carvalho Chehabalthough  the  component  structure  of budget DVB-T cards are
31*c4b89166SMauro Carvalho Chehabsubstantially  similar  to Analogue TV cards, they function in
32*c4b89166SMauro Carvalho Chehabsubstantially different ways.
33*c4b89166SMauro Carvalho Chehab
34*c4b89166SMauro Carvalho ChehabThe  purpose  of  an  Analogue TV is to receive and display an
35*c4b89166SMauro Carvalho ChehabAnalogue  Television  signal. An Analogue TV signal (otherwise
36*c4b89166SMauro Carvalho Chehabknown  as  composite  video)  is  an  analogue  encoding  of a
37*c4b89166SMauro Carvalho Chehabsequence  of  image frames (25 per second) rasterised using an
38*c4b89166SMauro Carvalho Chehabinterlacing   technique.   Interlacing  takes  two  fields  to
39*c4b89166SMauro Carvalho Chehabrepresent  one  frame.  Computers today are at their best when
40*c4b89166SMauro Carvalho Chehabdealing  with  digital  signals,  not  analogue  signals and a
41*c4b89166SMauro Carvalho Chehabcomposite  video signal is about as far removed from a digital
42*c4b89166SMauro Carvalho Chehabdata stream as you can get. Therefore, an Analogue TV card for
43*c4b89166SMauro Carvalho Chehaba PC has the following purpose:
44*c4b89166SMauro Carvalho Chehab
45*c4b89166SMauro Carvalho Chehab* Tune the receiver to receive a broadcast signal
46*c4b89166SMauro Carvalho Chehab* demodulate the broadcast signal
47*c4b89166SMauro Carvalho Chehab* demultiplex  the  analogue video signal and analogue audio
48*c4b89166SMauro Carvalho Chehab  signal. **NOTE:** some countries employ a digital audio signal
49*c4b89166SMauro Carvalho Chehab  embedded  within the modulated composite analogue signal -
50*c4b89166SMauro Carvalho Chehab  NICAM.)
51*c4b89166SMauro Carvalho Chehab* digitize  the analogue video signal and make the resulting
52*c4b89166SMauro Carvalho Chehab  datastream available to the data bus.
53*c4b89166SMauro Carvalho Chehab
54*c4b89166SMauro Carvalho ChehabThe  digital  datastream from an Analogue TV card is generated
55*c4b89166SMauro Carvalho Chehabby  circuitry on the card and is often presented uncompressed.
56*c4b89166SMauro Carvalho ChehabFor  a PAL TV signal encoded at a resolution of 768x576 24-bit
57*c4b89166SMauro Carvalho Chehabcolor pixels over 25 frames per second - a fair amount of data
58*c4b89166SMauro Carvalho Chehabis  generated and must be processed by the PC before it can be
59*c4b89166SMauro Carvalho Chehabdisplayed  on the video monitor screen. Some Analogue TV cards
60*c4b89166SMauro Carvalho Chehabfor  PCs  have  onboard  MPEG2  encoders  which permit the raw
61*c4b89166SMauro Carvalho Chehabdigital  data  stream  to be presented to the PC in an encoded
62*c4b89166SMauro Carvalho Chehaband  compressed  form  -  similar  to the form that is used in
63*c4b89166SMauro Carvalho ChehabDigital TV.
64*c4b89166SMauro Carvalho Chehab
65*c4b89166SMauro Carvalho ChehabThe  purpose of a simple budget digital TV card (DVB-T,C or S)
66*c4b89166SMauro Carvalho Chehabis to simply:
67*c4b89166SMauro Carvalho Chehab
68*c4b89166SMauro Carvalho Chehab* Tune the received to receive a broadcast signal.
69*c4b89166SMauro Carvalho Chehab* Extract  the encoded digital datastream from the broadcast
70*c4b89166SMauro Carvalho Chehab  signal.
71*c4b89166SMauro Carvalho Chehab* Make  the  encoded digital datastream (MPEG2) available to
72*c4b89166SMauro Carvalho Chehab  the data bus.
73*c4b89166SMauro Carvalho Chehab
74*c4b89166SMauro Carvalho ChehabThe  significant  difference between the two is that the tuner
75*c4b89166SMauro Carvalho Chehabon  the analogue TV card spits out an Analogue signal, whereas
76*c4b89166SMauro Carvalho Chehabthe  tuner  on  the  digital  TV  card  spits out a compressed
77*c4b89166SMauro Carvalho Chehabencoded   digital   datastream.   As  the  signal  is  already
78*c4b89166SMauro Carvalho Chehabdigitised,  it  is  trivial  to pass this datastream to the PC
79*c4b89166SMauro Carvalho Chehabdatabus  with  minimal  additional processing and then extract
80*c4b89166SMauro Carvalho Chehabthe  digital  video  and audio datastreams passing them to the
81*c4b89166SMauro Carvalho Chehabappropriate software or hardware for decoding and viewing.
82*c4b89166SMauro Carvalho Chehab
83*c4b89166SMauro Carvalho Chehab
84*c4b89166SMauro Carvalho ChehabGetting the card going
85*c4b89166SMauro Carvalho Chehab~~~~~~~~~~~~~~~~~~~~~~
86*c4b89166SMauro Carvalho Chehab
87*c4b89166SMauro Carvalho ChehabIn order to fire up the card, it is necessary to load a number
88*c4b89166SMauro Carvalho Chehabof modules from the DVB driver set. Prior to this it will have
89*c4b89166SMauro Carvalho Chehabbeen  necessary to download these drivers from the linuxtv CVS
90*c4b89166SMauro Carvalho Chehabserver and compile them successfully.
91*c4b89166SMauro Carvalho Chehab
92*c4b89166SMauro Carvalho ChehabDepending on the card's feature set, the Device Driver API for
93*c4b89166SMauro Carvalho ChehabDVB under Linux will expose some of the following device files
94*c4b89166SMauro Carvalho Chehabin the /dev tree:
95*c4b89166SMauro Carvalho Chehab
96*c4b89166SMauro Carvalho Chehab* /dev/dvb/adapter0/audio0
97*c4b89166SMauro Carvalho Chehab* /dev/dvb/adapter0/ca0
98*c4b89166SMauro Carvalho Chehab* /dev/dvb/adapter0/demux0
99*c4b89166SMauro Carvalho Chehab* /dev/dvb/adapter0/dvr0
100*c4b89166SMauro Carvalho Chehab* /dev/dvb/adapter0/frontend0
101*c4b89166SMauro Carvalho Chehab* /dev/dvb/adapter0/net0
102*c4b89166SMauro Carvalho Chehab* /dev/dvb/adapter0/osd0
103*c4b89166SMauro Carvalho Chehab* /dev/dvb/adapter0/video0
104*c4b89166SMauro Carvalho Chehab
105*c4b89166SMauro Carvalho ChehabThe  primary  device  nodes that we are interested in (at this
106*c4b89166SMauro Carvalho Chehabstage) for the Avermedia DVB-T are:
107*c4b89166SMauro Carvalho Chehab
108*c4b89166SMauro Carvalho Chehab* /dev/dvb/adapter0/dvr0
109*c4b89166SMauro Carvalho Chehab* /dev/dvb/adapter0/frontend0
110*c4b89166SMauro Carvalho Chehab
111*c4b89166SMauro Carvalho ChehabThe dvr0 device node is used to read the MPEG2 Data Stream and
112*c4b89166SMauro Carvalho Chehabthe frontend0 node is used to tune the frontend tuner module.
113*c4b89166SMauro Carvalho Chehab
114*c4b89166SMauro Carvalho Chehab
115*c4b89166SMauro Carvalho ChehabReceiving DVB-T in Australia
116*c4b89166SMauro Carvalho Chehab~~~~~~~~~~~~~~~~~~~~~~~~~~~~
117*c4b89166SMauro Carvalho Chehab
118*c4b89166SMauro Carvalho ChehabI  have  no  experience of DVB-T in other countries other than
119*c4b89166SMauro Carvalho ChehabAustralia,  so  I will attempt to explain how it works here in
120*c4b89166SMauro Carvalho ChehabMelbourne  and how this affects the configuration of the DVB-T
121*c4b89166SMauro Carvalho Chehabcard.
122*c4b89166SMauro Carvalho Chehab
123*c4b89166SMauro Carvalho ChehabThe  Digital  Broadcasting  Australia  website has a Reception
124*c4b89166SMauro Carvalho Chehablocatortool which provides information on transponder channels
125*c4b89166SMauro Carvalho Chehaband  frequencies.  My  local  transmitter  happens to be Mount
126*c4b89166SMauro Carvalho ChehabDandenong.
127*c4b89166SMauro Carvalho Chehab
128*c4b89166SMauro Carvalho ChehabThe frequencies broadcast by Mount Dandenong are:
129*c4b89166SMauro Carvalho Chehab
130*c4b89166SMauro Carvalho ChehabTable 1. Transponder Frequencies Mount Dandenong, Vic, Aus.
131*c4b89166SMauro Carvalho Chehab
132*c4b89166SMauro Carvalho Chehab=========== ======= ===========
133*c4b89166SMauro Carvalho ChehabBroadcaster Channel Frequency
134*c4b89166SMauro Carvalho Chehab=========== ======= ===========
135*c4b89166SMauro Carvalho ChehabABC         VHF 12  226.5 MHz
136*c4b89166SMauro Carvalho ChehabTEN         VHF 11  219.5 MHz
137*c4b89166SMauro Carvalho ChehabNINE        VHF 8   191.625 MHz
138*c4b89166SMauro Carvalho ChehabSEVEN       VHF 6   177.5 MHz
139*c4b89166SMauro Carvalho ChehabSBS         UHF 29  536.5 MHz
140*c4b89166SMauro Carvalho Chehab=========== ======= ===========
141*c4b89166SMauro Carvalho Chehab
142*c4b89166SMauro Carvalho ChehabThe Scan utility has a set of compiled-in defaults for various
143*c4b89166SMauro Carvalho Chehabcountries and regions, but if they do not suit, or if you have
144*c4b89166SMauro Carvalho Chehaba pre-compiled scan binary, you can specify a data file on the
145*c4b89166SMauro Carvalho Chehabcommand  line which contains the transponder frequencies. Here
146*c4b89166SMauro Carvalho Chehabis a sample file for the above channel transponders:
147*c4b89166SMauro Carvalho Chehab
148*c4b89166SMauro Carvalho Chehab::
149*c4b89166SMauro Carvalho Chehab
150*c4b89166SMauro Carvalho Chehab	# Data file for DVB scan program
151*c4b89166SMauro Carvalho Chehab	#
152*c4b89166SMauro Carvalho Chehab	# C Frequency SymbolRate FEC QAM
153*c4b89166SMauro Carvalho Chehab	# S Frequency Polarisation SymbolRate FEC
154*c4b89166SMauro Carvalho Chehab	# T Frequency Bandwidth FEC FEC2 QAM Mode Guard Hier
155*c4b89166SMauro Carvalho Chehab	T 226500000 7MHz 2/3 NONE QAM64 8k 1/8 NONE
156*c4b89166SMauro Carvalho Chehab	T 191625000 7MHz 2/3 NONE QAM64 8k 1/8 NONE
157*c4b89166SMauro Carvalho Chehab	T 219500000 7MHz 2/3 NONE QAM64 8k 1/8 NONE
158*c4b89166SMauro Carvalho Chehab	T 177500000 7MHz 2/3 NONE QAM64 8k 1/8 NONE
159*c4b89166SMauro Carvalho Chehab	T 536500000 7MHz 2/3 NONE QAM64 8k 1/8 NONE
160*c4b89166SMauro Carvalho Chehab
161*c4b89166SMauro Carvalho ChehabThe   defaults   for   the  transponder  frequency  and  other
162*c4b89166SMauro Carvalho Chehabmodulation parameters were obtained from www.dba.org.au.
163*c4b89166SMauro Carvalho Chehab
164*c4b89166SMauro Carvalho ChehabWhen  Scan  runs, it will output channels.conf information for
165*c4b89166SMauro Carvalho Chehabany  channel's transponders which the card's frontend can lock
166*c4b89166SMauro Carvalho Chehabonto.  (i.e.  any  whose  signal  is  strong  enough  at  your
167*c4b89166SMauro Carvalho Chehabantenna).
168*c4b89166SMauro Carvalho Chehab
169*c4b89166SMauro Carvalho ChehabHere's my channels.conf file for anyone who's interested:
170*c4b89166SMauro Carvalho Chehab
171*c4b89166SMauro Carvalho Chehab::
172*c4b89166SMauro Carvalho Chehab
173*c4b89166SMauro Carvalho Chehab	ABC HDTV:226500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_3_4:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:2307:0:560
174*c4b89166SMauro Carvalho Chehab	ABC TV Melbourne:226500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_3_4:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:512:650:561
175*c4b89166SMauro Carvalho Chehab	ABC TV 2:226500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_3_4:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:512:650:562
176*c4b89166SMauro Carvalho Chehab	ABC TV 3:226500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_3_4:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:512:650:563
177*c4b89166SMauro Carvalho Chehab	ABC TV 4:226500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_3_4:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:512:650:564
178*c4b89166SMauro Carvalho Chehab	ABC DiG Radio:226500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_3_4:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:0:2311:566
179*c4b89166SMauro Carvalho Chehab	TEN Digital:219500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:512:650:1585
180*c4b89166SMauro Carvalho Chehab	TEN Digital 1:219500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:512:650:1586
181*c4b89166SMauro Carvalho Chehab	TEN Digital 2:219500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:512:650:1587
182*c4b89166SMauro Carvalho Chehab	TEN Digital 3:219500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:512:650:1588
183*c4b89166SMauro Carvalho Chehab	TEN Digital:219500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:512:650:1589
184*c4b89166SMauro Carvalho Chehab	TEN Digital 4:219500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:512:650:1590
185*c4b89166SMauro Carvalho Chehab	TEN Digital:219500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:512:650:1591
186*c4b89166SMauro Carvalho Chehab	TEN HD:219500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:514:0:1592
187*c4b89166SMauro Carvalho Chehab	TEN Digital:219500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:512:650:1593
188*c4b89166SMauro Carvalho Chehab	Nine Digital:191625000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:513:660:1072
189*c4b89166SMauro Carvalho Chehab	Nine Digital HD:191625000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:512:0:1073
190*c4b89166SMauro Carvalho Chehab	Nine Guide:191625000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:514:670:1074
191*c4b89166SMauro Carvalho Chehab	7 Digital:177500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:769:770:1328
192*c4b89166SMauro Carvalho Chehab	7 Digital 1:177500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:769:770:1329
193*c4b89166SMauro Carvalho Chehab	7 Digital 2:177500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:769:770:1330
194*c4b89166SMauro Carvalho Chehab	7 Digital 3:177500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:769:770:1331
195*c4b89166SMauro Carvalho Chehab	7 HD Digital:177500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:833:834:1332
196*c4b89166SMauro Carvalho Chehab	7 Program Guide:177500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:865:866:1334
197*c4b89166SMauro Carvalho Chehab	SBS HD:536500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:102:103:784
198*c4b89166SMauro Carvalho Chehab	SBS DIGITAL 1:536500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:161:81:785
199*c4b89166SMauro Carvalho Chehab	SBS DIGITAL 2:536500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:162:83:786
200*c4b89166SMauro Carvalho Chehab	SBS EPG:536500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:163:85:787
201*c4b89166SMauro Carvalho Chehab	SBS RADIO 1:536500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:0:201:798
202*c4b89166SMauro Carvalho Chehab	SBS RADIO 2:536500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:0:202:799
203