URL
https://opencores.org/ocsvn/test_project/test_project/trunk
Subversion Repositories test_project
[/] [test_project/] [trunk/] [linux_sd_driver/] [Documentation/] [dvb/] [avermedia.txt] - Rev 62
Compare with Previous | Blame | View Log
HOWTO: Get An Avermedia DVB-T working under Linux______________________________________________Table of ContentsAssumptions and IntroductionThe Avermedia DVB-TGetting the card goingReceiving DVB-T in AustraliaKnown LimitationsFurther UpdateAssumptions and IntroductionIt is assumed that the reader understands the basic structureof the Linux Kernel DVB drivers and the general principles ofDigital TV.One significant difference between Digital TV and Analogue TVthat the unwary (like myself) should consider is that,although the component structure of budget DVB-T cards aresubstantially similar to Analogue TV cards, they function insubstantially different ways.The purpose of an Analogue TV is to receive and display anAnalogue Television signal. An Analogue TV signal (otherwiseknown as composite video) is an analogue encoding of asequence of image frames (25 per second) rasterised using aninterlacing technique. Interlacing takes two fields torepresent one frame. Computers today are at their best whendealing with digital signals, not analogue signals and acomposite video signal is about as far removed from a digitaldata stream as you can get. Therefore, an Analogue TV card fora PC has the following purpose:* Tune the receiver to receive a broadcast signal* demodulate the broadcast signal* demultiplex the analogue video signal and analogue audiosignal (note some countries employ a digital audio signalembedded within the modulated composite analogue signal -NICAM.)* digitize the analogue video signal and make the resultingdatastream available to the data bus.The digital datastream from an Analogue TV card is generatedby circuitry on the card and is often presented uncompressed.For a PAL TV signal encoded at a resolution of 768x576 24-bitcolor pixels over 25 frames per second - a fair amount of datais generated and must be processed by the PC before it can bedisplayed on the video monitor screen. Some Analogue TV cardsfor PCs have onboard MPEG2 encoders which permit the rawdigital data stream to be presented to the PC in an encodedand compressed form - similar to the form that is used inDigital 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 broadcastsignal.* Make the encoded digital datastream (MPEG2) available tothe data bus.The significant difference between the two is that the tuneron the analogue TV card spits out an Analogue signal, whereasthe tuner on the digital TV card spits out a compressedencoded digital datastream. As the signal is alreadydigitised, it is trivial to pass this datastream to the PCdatabus with minimal additional processing and then extractthe digital video and audio datastreams passing them to theappropriate software or hardware for decoding and viewing._________________________________________________________The Avermedia DVB-TThe Avermedia DVB-T is a budget PCI DVB card. It has 3 inputs:* RF Tuner Input* Composite Video Input (RCA Jack)* SVIDEO Input (Mini-DIN)The RF Tuner Input is the input to the tuner module of thecard. The Tuner is otherwise known as the "Frontend" . TheFrontend of the Avermedia DVB-T is a Microtune 7202D. A timelypost to the linux-dvb mailing list ascertained that theMicrotune 7202D is supported by the sp887x driver which isfound in the dvb-hw CVS module.The DVB-T card is based around the BT878 chip which is a verycommon multimedia bridge and often found on Analogue TV cards.There is no on-board MPEG2 decoder, which means that all MPEG2decoding must be done in software, or if you have one, on anMPEG2 hardware decoding card or chipset._________________________________________________________Getting the card goingIn order to fire up the card, it is necessary to load a numberof modules from the DVB driver set. Prior to this it will havebeen necessary to download these drivers from the linuxtv CVSserver and compile them successfully.Depending on the card's feature set, the Device Driver API forDVB under Linux will expose some of the following device filesin the /dev tree:* /dev/dvb/adapter0/audio0* /dev/dvb/adapter0/ca0* /dev/dvb/adapter0/demux0* /dev/dvb/adapter0/dvr0* /dev/dvb/adapter0/frontend0* /dev/dvb/adapter0/net0* /dev/dvb/adapter0/osd0* /dev/dvb/adapter0/video0The primary device nodes that we are interested in (at thisstage) for the Avermedia DVB-T are:* /dev/dvb/adapter0/dvr0* /dev/dvb/adapter0/frontend0The dvr0 device node is used to read the MPEG2 Data Stream andthe frontend0 node is used to tune the frontend tuner module.At this stage, it has not been able to ascertain thefunctionality of the remaining device nodes in respect of theAvermedia DVBT. However, full functionality in respect oftuning, receiving and supplying the MPEG2 data stream ispossible with the currently available versions of the driver.It may be possible that additional functionality is availablefrom the card (i.e. viewing the additional analogue inputsthat the card presents), but this has not been tested yet. IfI get around to this, I'll update the document with whatever Ifind.To power up the card, load the following modules in thefollowing order:* modprobe bttv (normally loaded automatically)* modprobe dvb-bt8xx (or place dvb-bt8xx in /etc/modules)Insertion of these modules into the running kernel willactivate the appropriate DVB device nodes. It is then possibleto start accessing the card with utilities such as scan, tzap,dvbstream etc.The frontend module sp887x.o, requires an external firmware.Please use the command "get_dvb_firmware sp887x" to downloadit. Then copy it to /usr/lib/hotplug/firmware or /lib/firmware/(depending on configuration of firmware hotplug).Receiving DVB-T in AustraliaI have no experience of DVB-T in other countries other thanAustralia, so I will attempt to explain how it works here inMelbourne and how this affects the configuration of the DVB-Tcard.The Digital Broadcasting Australia website has a Receptionlocatortool which provides information on transponder channelsand frequencies. My local transmitter happens to be MountDandenong.The frequencies broadcast by Mount Dandenong are:Table 1. Transponder Frequencies Mount Dandenong, Vic, Aus.Broadcaster Channel FrequencyABC VHF 12 226.5 MHzTEN VHF 11 219.5 MHzNINE VHF 8 191.625 MHzSEVEN VHF 6 177.5 MHzSBS UHF 29 536.5 MHzThe Scan utility has a set of compiled-in defaults for variouscountries and regions, but if they do not suit, or if you havea pre-compiled scan binary, you can specify a data file on thecommand line which contains the transponder frequencies. Hereis a sample file for the above channel transponders:# Data file for DVB scan program## C Frequency SymbolRate FEC QAM# S Frequency Polarisation SymbolRate FEC# T Frequency Bandwidth FEC FEC2 QAM Mode Guard HierT 226500000 7MHz 2/3 NONE QAM64 8k 1/8 NONET 191625000 7MHz 2/3 NONE QAM64 8k 1/8 NONET 219500000 7MHz 2/3 NONE QAM64 8k 1/8 NONET 177500000 7MHz 2/3 NONE QAM64 8k 1/8 NONET 536500000 7MHz 2/3 NONE QAM64 8k 1/8 NONEThe defaults for the transponder frequency and othermodulation parameters were obtained from www.dba.org.au.When Scan runs, it will output channels.conf information forany channel's transponders which the card's frontend can lockonto. (i.e. any whose signal is strong enough at yourantenna).Here's my channels.conf file for anyone who's interested: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:560ABC 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:561ABC 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:562ABC 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:563ABC 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:564ABC 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:566TEN 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:1585TEN 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:1586TEN 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:1587TEN 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:1588TEN 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:1589TEN 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:1590TEN 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:1591TEN 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:1592TEN 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:1593Nine 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:1072Nine 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:1073Nine 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:10747 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:13287 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:13297 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:13307 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:13317 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:13327 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:1334SBS 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:784SBS 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:785SBS 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:786SBS 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:787SBS 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:798SBS 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_________________________________________________________Known LimitationsAt present I can say with confidence that the frontend tunesvia /dev/dvb/adapter{x}/frontend0 and supplies an MPEG2 streamvia /dev/dvb/adapter{x}/dvr0. I have not tested thefunctionality of any other part of the card yet. I will do soover time and update this document.There are some limitations in the i2c layer due to a returnederror message inconsistency. Although this generates errors indmesg and the system logs, it does not appear to affect theability of the frontend to function correctly._________________________________________________________Further Updatedvbstream and VideoLAN Client on windows works a treat withDVB, in fact this is currently serving as my main way ofviewing DVB-T at the moment. Additionally, VLC is happilydecoding HDTV signals, although the PC is dropping the oddframe here and there - I assume due to processing capability -as all the decoding is being done under windows in software.Many thanks to Nigel Pearson for the updates to this documentsince the recent revision of the driver.February 14th 2006
