Setting up AVerMedia A771 DVB-T card under Linux ------------------------------------------------ This document outlines the procedure you can follow to set up and be able to view DVB-T programs with AVerMedia A771 card under Linux. All Linux drivers and applications described in this document are freely available from various OpenSource projects. AVerMedia did not develop these drivers or applications. If you encounter any problem during the setup process, please consult the web pages, email lists or newsgroups mentioned below. AVerMedia does not provide any more support than this written document. Nonetheless, you can check out AVerMedia web site for updates of this document. In the sections below, a list of applications for AVerMedia A771 card is given, followed by procedures of building and installing the modules, and also how to use the drivers and applications to watch DVB-T programs under Linux. Packages required ----------------- 1. linuxtv-apps-1.1.0 Test applications/utilities The package can be found at: http://www.linuxtv.org/downloads/linuxtv-dvb-apps-1.1.0.tar.bz2 To build and install the packages for linux-2.6.10+ --------------------------------------------------- A771 DVB driver is included in the Linux kernel source tree since 2.6.10. But it seems stable after 2.6.11. After 2.6.11, you only need to pick the correct modules to be compiled to get it to work. 1. Choose the required modules, In KERNEL_DIR, % make menuconfig Device Drivers ---> I2C support ---> I2C support I2C device interface Multimedia devices ---> Video For Linux Video For Linux ---> BT848 Video For Linux Digital Video Broadcasting Devices ---> [*] DVB For Linux DVB Core Support Nebula/Pinnacle PCTV/Twinhan PCI cards Customise DVB Frontends ---> NxtWave Communications NXT6000 based % make ; make modules_install ... 2. Installation % modprobe dvb-bt8xx 3. linuxtv-apps-1.1.0 Just untar the package linuxtv-dvb-apps-1.1.0.tar.bz2, and % cd linuxtv-dvb-apps-1.1.0 % make 4. make device node Save the script below as MAKEDEV-DVB.sh (It is modified from script in linuxtv-dvb-1.1.1.tar.tar) =============================================================================== #!/bin/sh # Create device nodes for the Linux DVB API with DVB_API_VERSION 2. # The devices created are suitable for most current PC DVB cards, # i.e. cards having one frontend, one demux and optionally one # MPEG decoder. # The script creates devices for four cards by default. if [ -e /dev/.devfsd ]; then echo "It seems you are using devfs. Good!" exit 0 fi # get rid of old DVB API devices; do it twice for good measure... rm -rf /dev/ost rm -rf /dev/ost rm -rf /dev/dvb rm -rf /dev/dvb mkdir /dev/dvb chmod 755 /dev/dvb for i in `seq 0 3`; do echo "Creating DVB devices in /dev/dvb/adapter$i" mkdir /dev/dvb/adapter$i chmod 755 /dev/dvb/adapter$i mknod -m 0660 /dev/dvb/adapter$i/video0 c 212 `expr 64 \* $i + 0` mknod -m 0660 /dev/dvb/adapter$i/audio0 c 212 `expr 64 \* $i + 1` mknod -m 0660 /dev/dvb/adapter$i/frontend0 c 212 `expr 64 \* $i + 3` mknod -m 0660 /dev/dvb/adapter$i/demux0 c 212 `expr 64 \* $i + 4` mknod -m 0660 /dev/dvb/adapter$i/dvr0 c 212 `expr 64 \* $i + 5` mknod -m 0660 /dev/dvb/adapter$i/ca0 c 212 `expr 64 \* $i + 6` mknod -m 0660 /dev/dvb/adapter$i/net0 c 212 `expr 64 \* $i + 7` mknod -m 0660 /dev/dvb/adapter$i/osd0 c 212 `expr 64 \* $i + 8` chown root.video /dev/dvb/adapter$i/* done =============================================================================== % chmod 755 MAKEDEV-DVB.sh % ./MAKEDEV-DVB.sh Run the applications -------------------------------------------- 1. Scan channel. To do this, you need to have a file which describes the DVB-T channels in your local area. An example for the DVB-T services (5 channels) in Taipei Taiwan is as follows. We created a file named dvb-apps/util/scan/dvb-t/tw-1 with the following content: # Taiwan / Taipei # T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy # CTV T 533000000 6MHz 2/3 NONE QAM16 8k 1/8 NONE # PTV T 545000000 6MHz 2/3 NONE QAM16 8k 1/8 NONE # FTV T 557000000 6MHz 2/3 NONE QAM16 8k 1/4 NONE # TTV T 581000000 6MHz 2/3 NONE QAM16 8k 1/4 NONE # CHV T 593000000 6MHz 2/3 NONE QAM16 8k 1/8 NONE # End of the DVB-T channel description file ** NOTE ** DVB-T modulation parameters might be changed at any time by the service providers. Please consult with your local DVB-T service providers (TV stations) to get the correct settings. ** NOTE ** Then % cd linuxtv-dvb-apps-1.1.0/util/scan/ % scan dvb-t/tw-1 | tee channels.conf This will write the exact information of each DVB-T channel in channels.conf. ** NOTE ** The transponder (TV broadcasters) may change transmission parameters and video/audio streams PID of services at any time. As a result, you might need to go through the scan process again when you lose a previously-existing channel/service. ** NOTE ** ** ATTENTION ** If you get some ERROR message when scanning the channels like this: scanning dvb-t/tw-1 using '/dev/dvb/adapter0/frontend0' and '/dev/dvb/adapter0/demux0' main:1882: FATAL: failed to open '/dev/dvb/adapter0/frontend0': 2 No such file or directory you should pay attention on the step 4(make device node) of last section ** ATTENTION ** 2. Now you can use dvb-apps/util/szap/tzap to zap one DVB-T channel, and then use an video decoder/player (mpeg2dec) to play back the MPEG2 transport stream: % tzap -r -c ../scan/channels.conf SERVICE_NAME Let it run "continuously". Note that SERVICE_NAME should be one of the service names in channels.conf, for example, FTV. The PIDs for video/audio will be displayed, along with signal status. A FE_HAS_LOCK means that the driver has locked the signal, after which you can start the decoder/player for watching the DVB-T program. ** NOTE ** The SERVICE_NAME in channels.conf maybe some confused code like this: l}TS?:557000000:INVERSION_AUTO... N??S?:557000000:INVERSION_AUTO... le¢X^S?:557000000:INVERSION_AUTOO... [012f]:557000000:INVERSION_AUTO... We can modify the SERVICE_NAME manually, PTV:557000000:INVERSION_AUTO... FTV:557000000:INVERSION_AUTO... TTV:557000000:INVERSION_AUTO... CHV:557000000:INVERSION_AUTO... ** NOTE ** 3. Play the TV % mpeg2dec -o X11 -t PID /dev/dvb/adapter0/dvr0 This plays back the video stream (specified by the PID) with mpeg2dec (http://libmpeg2.sourceforge.net/downloads.html). 4. Alternatively, you can also use xine (http://xinehq.de/) to play back DVB-T programs. We tested with xine-lib-1-rc4a/xine-ui-0.99.1. % cp channels.conf ~/.xine/ % xine To watch a DVB-T program, just press UI, DVB plug-in button. Or, another way to watch DVB-T programs with xine % xine stdin://mpeg2 < /dev/dvb/adapter0/dvr0 FOR LINUX 2.6.6 ~ LINUX 2.6.9 ----------------------------- Because A771 DVB driver is not included in source tree of these kernel versions, you might need to find the driver on http://linuxtv.org/ and build it manually. We'll find out the solution and update the document soon. Reference --------- 1. KERNEL_DIR/Documentation/dvb/avermedia.txt 2. http://linuxtv.org/