avermedia.txt 14 KB

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