Pre-requisites
You need to be connected to the internet unless you have the necessary kernel source files already on your machine.
Here's what to do
- download driver source from Avermedia;
- extract it to a folder, perhaps in your home/documents directory;
- open a terminal window;
- download the linux kernel source code with 'sudo apt-get install linux-source';
- cd to '/usr/src/' and extract the source code with 'sudo tar -jxf linux-source-2.6.35.tar.bz2' - this will create a directory containing all the source code at /usr/src/linux-source-2.6.35;
- next we need to create the necessary symlink from where the makefile expects to find the dvb source code to where we extracted it - 'cd /lib/modules/2.6.35-22-generic' and then execute the command 'sudo ln -s /usr/src/linux-source-2.6.35/ source';
- 'ls' and make sure there is now a symlink in /lib/modules/2.6.32-21-generic to /source;
- cd to where you extracted the avermedia driver source;
- edit the source code for the driver 'af903x-drv.c' with the command 'gedit af903x-drv.c' (or download the patched file below). This source uses the 'init_MUTEX' alias which no longer works for linux kernels greater than 2.6.37 (Mint 11 uses the 2.3.38-8 kernel). There are three references in the source code. Change them as follows:
- change 'init_MUTEX(&PDC->powerLock);' to 'sema_init(&PDC->powerLock,1);'
change 'init_MUTEX(&PDC->tunerLock);' to 'sema_init(&PDC->tunerLock,1);'
change 'init_MUTEX(&PDC->regLock);' to 'sema_init(&PDC->regLock,1);'
Download: | Patched source file - af903x-drv.c ( - 34k) |
- type 'make';
- type 'sudo make install';
Testing it out
If the driver build went all according to plan then its time to test it out. If you haven't already, then download and install 'dvb-apps' with 'sudo apt-get install dvb-apps'
Create a channels.conf file using 'scan' -eg: 'scan /usr/share/dvb/dvb-t/au-Canberra-Black-Mt > ~/.mplayer/channels.conf.
Watch the video stream in mplayer by entering in another terminal window 'mplayer dvb://'