AVerMedia A828: Difference between revisions

From LinuxTVWiki
Jump to navigation Jump to search
No edit summary
Line 4: Line 4:





== Script all in one to execute ==
Here is a script installing automatically the A828 driver, and use dkms to automate the installation with all the kernels. [http://coldsun.free.fr/a828/a828-0.28.zip Download the script]

Just download the script, and run ./install.sh.

NOTE : you will need Make and Dkms packages. ("apt-get install dkms make" if you are on a Debian/Ubuntu based distribution ...)

Feel free to modify this little script if needed.


== Warning ==
== Warning ==

Revision as of 14:27, 30 October 2011

AVermedia DVB-T A828 was compatible with Linux until the version 2.6.37 of the kernel. Since this version, the Big Kernel Lock (BKL) is disabled by default. Thus, many of drivers using it have to be updated. The Linux driver for A828 belongs to this kind of driver. We will see above how to ensure the compatibility with it.


Script all in one to execute

Here is a script installing automatically the A828 driver, and use dkms to automate the installation with all the kernels. Download the script

Just download the script, and run ./install.sh.

NOTE : you will need Make and Dkms packages. ("apt-get install dkms make" if you are on a Debian/Ubuntu based distribution ...)

Feel free to modify this little script if needed.

Warning

This tipp have only been tested by me. I am not friendly with V4L nor with driver coding. It would be great if someone can test, give feedback, and correct if necessary. Thanks in advance.

Download And Prepare the installation

First, if you hadn't download it yet, download the driver from this page : http://www.avermedia.com/avertv/support/Download.aspx?Type=APDriver&tab=APDriver&id=31

Extract the archive where you want to. Then, run a terminal, and type those commands :

  cd /where/you/put/A828_Installer_...
  sudo sh AVERMEDIA-Linux-x64-A828-0.28-beta.sh

You will be asked if you want the normal installation or the expert one. Choose Expert.

Choose a directory for the output... Then :

 cd /where/you/put/A828-expert-install/

Now, we will apply the modifications.


Modifications to bring

1. In aver/osdep.c : 
        1.a If Kernel >= 2.6.37 then remove line :
                #include <linux/smp_lock.h>
	1.b Replace : 
		void SysLockKernel()
		{
			lock_kernel();
		}

		void SysUnlockKernel()
		{
			unlock_kernel();
		}
		
	  By : 
		static DEFINE_MUTEX(dvbdev_mutex);
		void SysLockKernel()
		{
			mutex_lock(&dvbdev_mutex);
		}

		void SysUnlockKernel()
		{
			mutex_unlock(&dvbdev_mutex);
		}
	
	1.c As per previous instructions (can't include because blocked by spam filter)	

2. In aver/osdep_th2.c :
	2.a After : 
		#include "osdep_th2.h"
	    Add : 
		#include "osdep.h"
        2.b If Kernel >= 2.6.37 then remove line :
                #include <linux/smp_lock.h>
	2.c Replace : 
		lock_kernel();
	    By : 
		SysLockKernel();
	
	2.d and Replace : 
		unlock_kernel();
	    By:
		SysUnlockKernel();
		
3. In aver/osdep_v4l2.c :
	3.a After : 
		#include "debug.h"
	    Add : 
		#define VFL_TYPE_VTX    3
        3.b If Kernel >= 2.6.37 then remove line :
                #include <linux/smp_lock.h>
4. In aver/osdep_dvb.c :
        If Kernel >= 2.6.37 then remove line :
                #include <linux/smp_lock.h>
5. Run : 
	sed -i 's/param_array_[gs]et/param_array_ops/g' *
	sed -i 's/param_array_[gs]et/param_array_ops/g' aver/*

6. Run : 
        make

7. Run : 
	sudo modprobe dmx3191d
	sudo modprobe v4l2-common
        sudo modprobe dvb-core
	sudo insmod ./averusba828.ko
	sudo insmod ./a828.ko

8. To make modules ./averusba828.ko and ./a828.ko available after reboot :
        cp ./averusba828.ko /lib/modules/`uname -r`/kernel/drivers/media/dvb/dvbusb
        cp ./a828.ko /lib/modules/`uname -r`/kernel/drivers/media/dvb/dvbusb