AVerMedia AVerTV DVB-T 777 (A16AR)

From LinuxTVWiki
Revision as of 18:52, 25 September 2006 by Klez (talk | contribs) (misc fixes in bash codes)
Jump to navigation Jump to search


The Avermedia 777 is a quite good budget pci DVB-T Card. You can get one for about 65 euros.
You must know that Avermedia777 features a Philips saa7134 and Zarlink MT352 demodulator. Acording to the documentation, the avermedia 777 is the card=85 for the saa7134

For make this card work, you need at last a vanilla kernel 2.6.17rc2. First we will see how to configure our kernel for the avermedia 777:




 [*] I2C Support
 [*] I2C Device Interface

DEVICE DRIVERS -> I2C -> I2C Algorithms

 [*] I2C bit-banging interfaces



 [*] Video For Linux


select ONLY these that are marked with the asterisk:

 [*] Philips SAA7134 support
 [*]   Philips SAA7134 DMA audio support
 [*]   DVB/ATSC Support for saa7134 based TV cards
 [ ]      Build all supported frontends for saa7134 based TV cards
 [*]        Zarlink MT352 DVB-T Support
 [ ]        Philips TDA10045H/TDA10046H DVB-T Support
 [ ]        NXT2002/NXT2004 ATSC Support



 [*] DVB for linux
 [*] DVB Core support

You must select these components in the kernel configuration if you want your avermedia777 to work. You can compile-in kernel (marked as asterisk) or as Modules (typing M). Some people may think that if they compile in-kernel these components, in particular the saa7134, they won't be able to specify parameters. That's wrong.
And we are done with kernel configuration. Now compile and install.

Note A: If you compiled these options into the kernel (marked with asterisk) you must use some kernel parameters for choosing the correct Dvb-t card:

(taken from grub.conf)
 kernel /boot/mykernel ro i2c-scan=1 saa7134.card=85

Note B: If you compiled these options as modules (marked with capital M) don't forget the make modules and make modules_install. Then, you must load the module like this:

 modprobe saa7134 card=85


After reboot we're done. Check /var/log/dmesg and see if kernel said something about your card, i am sure it did.

The first problem i encountered is the device node wasn't being created using udev at boot time. Most modern linux distros use udev, so let's check if we have /dev/dvb/adapter0/ populated. If not, we need to create the device manually. I found this script in the official avermedia page (now is included in dvb-apps tarball), in the previous model (avermedia dvb-t 771) section. After running it, devices ware successfully created and we can continue scanning our channels.

If you don't have /dev/dvb/adapter0/frontend0 and friends, you nedd to run this script. Copy and paste it

 # 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
 # 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/*

Scanning channels

We need the dvb-apps from http://linuxtv.org/hg/dvb-apps click tree and then bz2 for download the latest. Bunzip and untar the package.

 % bunzip2 hg-dvb-apps.tar.bz2
 % tar -xvf hg-dvb-apps.tar
 % cd hg-dvb-apps/util/scan
 % make

Good! now we compiled the scan tool, now we'll see how easy it works.
In the scan/dvb-t directory we have some files with presets for certain locations around the world, for example let's imagine we are in uk-Oxford so, we type:

 % ./scan dvb-t/uk-Oxford | tee channels.conf

Wait until it ends scanning, you will have a working channels.conf. This file is very important!


On the other hand, what if there isn't a preset file for your location? that's a problem, because you won't be able to scan channels with the scan tool. I wrote my own preset file, it's not hard but you will need some data, like frequency or bandwidth. You can get all the information from the official AverTV software for WindowsXP, take pencil and paper and write frequencies and bandwidths used by your scanned channels, Then edit any preset file and see how it is. It's not hard.

Example of a dvb-t preset file for the dvb-scan tool: (es-Lugo in the following example)

 # DVB-T Lugo (Centro emisor Paramo) - Rev. 1.2 - 11.12.05
 # T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
 T 778000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE     # TVE 1, TVE 2, 24H TVE, CLAN/50 TVE, RNE1, RNE CLASICA, RNE3
 T 858000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE     # ANTENA 3, ANTENA.NEOX, ANTENA.NOVA, LA SEXTA 2

You see? the first it's the letter T (from dvb-t) then goes the frequency in Hz (not in MHz!) and then the bandwidh (seen also in the AverTV software in windows XP) probably you won't need to edit the other parameters. I recommend to pick the "nearest" preset file for editing. Hope it helps.


Using XINE http://www.xinehq.de
Now copy the channels.conf file into your /home/user/.xine/ directory and launch xine. Click on DVB and after buffering you will be watching TV. With the mouse wheel you wrap around the channels list, then click for change channel.

I'm almost sure that MPlayer and VLC players also play dvb-t well using your channels.conf but I haven't tested them.


· Kernel support of Avermedia 777 began in the version 2.6.17rc2. Probably the card won't work with older kernels unless you apply patches.
· Saa7134 can be compiled in-kernel or as module. Both must have the parameter card=85
· If the dvb-scan fails because it can't open /dev/dvb/adapter0/frontend0 or similar, recheck the step 3: did the script did his job? are you root?
· The dvb-scan app doesn't do frequency scans, so you need a correct dvb-t preset file. You can expect very weird results scanning with a wrong preset file.
· This screenshot shows how options should be selected in kernel for the avermedia777
· In this wiki it's missing the how-to LIRC for making the remote work.
· This wiki have not been corrected for proper grammar and/or spelling. After it's reviewed please delete this advice. (Klez)