2 HOWTO: Get An Avermedia DVB-T working under Linux
3 ______________________________________________
6 Assumptions and Introduction
10 Receiving DVB-T in Australia
14 Assumptions and Introduction
16 It is assumed that the reader understands the basic structure
17 of the Linux Kernel DVB drivers and the general principles of
20 One significant difference between Digital TV and Analogue TV
21 that the unwary (like myself) should consider is that,
22 although the component structure of budget DVB-T cards are
23 substantially similar to Analogue TV cards, they function in
24 substantially different ways.
26 The purpose of an Analogue TV is to receive and display an
27 Analogue Television signal. An Analogue TV signal (otherwise
28 known as composite video) is an analogue encoding of a
29 sequence of image frames (25 per second) rasterised using an
30 interlacing technique. Interlacing takes two fields to
31 represent one frame. Computers today are at their best when
32 dealing with digital signals, not analogue signals and a
33 composite video signal is about as far removed from a digital
34 data stream as you can get. Therefore, an Analogue TV card for
35 a PC has the following purpose:
37 * Tune the receiver to receive a broadcast signal
38 * demodulate the broadcast signal
39 * demultiplex the analogue video signal and analogue audio
40 signal (note some countries employ a digital audio signal
41 embedded within the modulated composite analogue signal -
43 * digitize the analogue video signal and make the resulting
44 datastream available to the data bus.
46 The digital datastream from an Analogue TV card is generated
47 by circuitry on the card and is often presented uncompressed.
48 For a PAL TV signal encoded at a resolution of 768x576 24-bit
49 color pixels over 25 frames per second - a fair amount of data
50 is generated and must be proceesed by the PC before it can be
51 displayed on the video monitor screen. Some Analogue TV cards
52 for PC's have onboard MPEG2 encoders which permit the raw
53 digital data stream to be presented to the PC in an encoded
54 and compressed form - similar to the form that is used in
57 The purpose of a simple budget digital TV card (DVB-T,C or S)
60 * Tune the received to receive a broadcast signal.
61 * Extract the encoded digital datastream from the broadcast
63 * Make the encoded digital datastream (MPEG2) available to
66 The significant difference between the two is that the tuner
67 on the analogue TV card spits out an Analogue signal, whereas
68 the tuner on the digital TV card spits out a compressed
69 encoded digital datastream. As the signal is already
70 digitised, it is trivial to pass this datastream to the PC
71 databus with minimal additional processing and then extract
72 the digital video and audio datastreams passing them to the
73 appropriate software or hardware for decoding and viewing.
74 _________________________________________________________
78 The Avermedia DVB-T is a budget PCI DVB card. It has 3 inputs:
81 * Composite Video Input (RCA Jack)
82 * SVIDEO Input (Mini-DIN)
84 The RF Tuner Input is the input to the tuner module of the
85 card. The Tuner is otherwise known as the "Frontend" . The
86 Frontend of the Avermedia DVB-T is a Microtune 7202D. A timely
87 post to the linux-dvb mailing list ascertained that the
88 Microtune 7202D is supported by the sp887x driver which is
89 found in the dvb-hw CVS module.
91 The DVB-T card is based around the BT878 chip which is a very
92 common multimedia bridge and often found on Analogue TV cards.
93 There is no on-board MPEG2 decoder, which means that all MPEG2
94 decoding must be done in software, or if you have one, on an
95 MPEG2 hardware decoding card or chipset.
96 _________________________________________________________
98 Getting the card going
100 In order to fire up the card, it is necessary to load a number
101 of modules from the DVB driver set. Prior to this it will have
102 been necessary to download these drivers from the linuxtv CVS
103 server and compile them successfully.
105 Depending on the card's feature set, the Device Driver API for
106 DVB under Linux will expose some of the following device files
109 * /dev/dvb/adapter0/audio0
110 * /dev/dvb/adapter0/ca0
111 * /dev/dvb/adapter0/demux0
112 * /dev/dvb/adapter0/dvr0
113 * /dev/dvb/adapter0/frontend0
114 * /dev/dvb/adapter0/net0
115 * /dev/dvb/adapter0/osd0
116 * /dev/dvb/adapter0/video0
118 The primary device nodes that we are interested in (at this
119 stage) for the Avermedia DVB-T are:
121 * /dev/dvb/adapter0/dvr0
122 * /dev/dvb/adapter0/frontend0
124 The dvr0 device node is used to read the MPEG2 Data Stream and
125 the frontend0 node is used to tune the frontend tuner module.
127 At this stage, it has not been able to ascertain the
128 functionality of the remaining device nodes in respect of the
129 Avermedia DVBT. However, full functionality in respect of
130 tuning, receiving and supplying the MPEG2 data stream is
131 possible with the currently available versions of the driver.
132 It may be possible that additional functionality is available
133 from the card (i.e. viewing the additional analogue inputs
134 that the card presents), but this has not been tested yet. If
135 I get around to this, I'll update the document with whatever I
138 To power up the card, load the following modules in the
147 Insertion of these modules into the running kernel will
148 activate the appropriate DVB device nodes. It is then possible
149 to start accessing the card with utilities such as scan, tzap,
152 The current version of the frontend module sp887x.o, contains
153 no firmware drivers?, so the first time you open it with a DVB
154 utility the driver will try to download some initial firmware
155 to the card. You will need to download this firmware from the
156 web, or copy it from an installation of the Windows drivers
157 that probably came with your card, before you can use it.
159 The default Linux filesystem location for this firmware is
160 /usr/lib/hotplug/firmware/sc_main.mc .
161 _________________________________________________________
165 As the firmware for the card is no longer contained within the
166 driver, it is necessary to extract it from the windows
169 The Windows drivers for the Avermedia DVB-T can be obtained
170 from: http://babyurl.com/H3U970 and you can get an application
171 to extract the firmware from:
172 http://www.kyz.uklinux.net/cabextract.php.
173 _________________________________________________________
175 Receiving DVB-T in Australia
177 I have no experience of DVB-T in other countries other than
178 Australia, so I will attempt to explain how it works here in
179 Melbourne and how this affects the configuration of the DVB-T
182 The Digital Broadcasting Australia website has a Reception
183 locatortool which provides information on transponder channels
184 and frequencies. My local transmitter happens to be Mount
187 The frequencies broadcast by Mount Dandenong are:
189 Table 1. Transponder Frequencies Mount Dandenong, Vic, Aus.
190 Broadcaster Channel Frequency
193 NINE VHF 8 191.625 MHz
194 SEVEN VHF 6 177.5 MHz
197 The Scan utility has a set of compiled-in defaults for various
198 countries and regions, but if they do not suit, or if you have
199 a pre-compiled scan binary, you can specify a data file on the
200 command line which contains the transponder frequencies. Here
201 is a sample file for the above channel transponders:
202 # Data file for DVB scan program
204 # C Frequency SymbolRate FEC QAM
205 # S Frequency Polarisation SymbolRate FEC
206 # T Frequency Bandwidth FEC FEC2 QAM Mode Guard Hier
207 T 226500000 7MHz 2/3 NONE QAM64 8k 1/8 NONE
208 T 191625000 7MHz 2/3 NONE QAM64 8k 1/8 NONE
209 T 219500000 7MHz 2/3 NONE QAM64 8k 1/8 NONE
210 T 177500000 7MHz 2/3 NONE QAM64 8k 1/8 NONE
211 T 536500000 7MHz 2/3 NONE QAM64 8k 1/8 NONE
213 The defaults for the transponder frequency and other
214 modulation parameters were obtained from www.dba.org.au.
216 When Scan runs, it will output channels.conf information for
217 any channel's transponders which the card's frontend can lock
218 onto. (i.e. any whose signal is strong enough at your
221 Here's my channels.conf file for anyone who's interested:
222 ABC HDTV:226500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_3_4:QAM_64
223 :TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:2307:0:560
224 ABC TV Melbourne:226500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_3_
225 4:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:512:65
227 ABC TV 2:226500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_3_4:QAM_64
228 :TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:512:650:562
229 ABC TV 3:226500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_3_4:QAM_64
230 :TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:512:650:563
231 ABC TV 4:226500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_3_4:QAM_64
232 :TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:512:650:564
233 ABC DiG Radio:226500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_3_4:Q
234 AM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:0:2311:56
236 TEN Digital:219500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_1_2:QAM
237 _64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:512:650:158
239 TEN Digital 1:219500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_1_2:Q
240 AM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:512:650:1
242 TEN Digital 2:219500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_1_2:Q
243 AM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:512:650:1
245 TEN Digital 3:219500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_1_2:Q
246 AM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:512:650:1
248 TEN Digital:219500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_1_2:QAM
249 _64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:512:650:158
251 TEN Digital 4:219500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_1_2:Q
252 AM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:512:650:1
254 TEN Digital:219500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_1_2:QAM
255 _64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:512:650:159
257 TEN HD:219500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_1_2:QAM_64:T
258 RANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:514:0:1592
259 TEN Digital:219500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_1_2:QAM
260 _64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:512:650:159
262 Nine Digital:191625000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_1_2:QA
263 M_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:513:660:10
265 Nine Digital HD:191625000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_1_2
266 :QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:512:0:1
268 Nine Guide:191625000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_1_2:QAM_
269 64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:514:670:1074
270 7 Digital:177500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_2_3:FEC_2_3:QAM_6
271 4:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:769:770:1328
272 7 Digital 1:177500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_2_3:FEC_2_3:QAM
273 _64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:769:770:1329
274 7 Digital 2:177500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_2_3:FEC_2_3:QAM
275 _64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:769:770:1330
276 7 Digital 3:177500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_2_3:FEC_2_3:QAM
277 _64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:769:770:1331
278 7 HD Digital:177500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_2_3:FEC_2_3:QA
279 M_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:833:834:133
281 7 Program Guide:177500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_2_3:FEC_2_3
282 :QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:865:866:
284 SBS HD:536500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_2_3:FEC_2_3:QAM_64:T
285 RANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:102:103:784
286 SBS DIGITAL 1:536500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_2_3:FEC_2_3:Q
287 AM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:161:81:785
288 SBS DIGITAL 2:536500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_2_3:FEC_2_3:Q
289 AM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:162:83:786
290 SBS EPG:536500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_2_3:FEC_2_3:QAM_64:
291 TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:163:85:787
292 SBS RADIO 1:536500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_2_3:FEC_2_3:QAM
293 _64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:0:201:798
294 SBS RADIO 2:536500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_2_3:FEC_2_3:QAM
295 _64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:0:202:799
296 _________________________________________________________
300 At present I can say with confidence that the frontend tunes
301 via /dev/dvb/adapter{x}/frontend0 and supplies an MPEG2 stream
302 via /dev/dvb/adapter{x}/dvr0. I have not tested the
303 functionality of any other part of the card yet. I will do so
304 over time and update this document.
306 There are some limitations in the i2c layer due to a returned
307 error message inconsistency. Although this generates errors in
308 dmesg and the system logs, it does not appear to affect the
309 ability of the frontend to function correctly.
310 _________________________________________________________
314 dvbstream and VideoLAN Client on windows works a treat with
315 DVB, in fact this is currently serving as my main way of
316 viewing DVB-T at the moment. Additionally, VLC is happily
317 decoding HDTV signals, although the PC is dropping the odd
318 frame here and there - I assume due to processing capability -
319 as all the decoding is being done under windows in software.
321 Many thanks to Nigel Pearson for the updates to this document
322 since the recent revision of the driver.