AVerMedia A828: Difference between revisions

From LinuxTVWiki
Jump to navigation Jump to search
(Created page with '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...')
 
No edit summary
Line 105: Line 105:
sudo modprobe dmx3191d
sudo modprobe dmx3191d
sudo modprobe v4l2-common
sudo modprobe v4l2-common
sudo modprobe dvb-core
sudo insmod ./averusba828.ko
sudo insmod ./averusba828.ko
sudo insmod ./a828.ko
sudo insmod ./a828.ko

Revision as of 18:39, 12 February 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.


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 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.b Replace : 
		if(st_Mutex == type) {
			init_MUTEX(tmp);
			*sem = (pSemaphore) tmp;
		}
		else if(st_MutexLocked == type) {
			init_mutex_locked(tmp);
			*sem = (pSemaphore) tmp;
		}
	  By : 
		if(st_Mutex == type) {
			sema_init(tmp, 1);
			*sem = (pSemaphore) tmp;
		}
		else if(st_MutexLocked == type) {
			sema_init(tmp, 0);
			*sem = (pSemaphore) tmp;
		}
	

2. In aver/osdep_th2.c :
	2.a After : 
		#include "osdep_th2.h"
	    Add : 
		#include "osdep.h"
	2.b Replace : 
		lock_kernel();
	    By : 
		SysLockKernel();
	
	2.c and Replace : 
		unlock_kernel();
	    By:
		SysUnlockKernel();
		
3. In aver/osdep_v4l2.c : 
	After : 
		#include "debug.h"
	Add : 
		#define VFL_TYPE_VTX    3
4. run : 
	sed -i 's/param_array_[gs]et/param_array_ops/g' *
	sed -i 's/param_array_[gs]et/param_array_ops/g' aver/*

5. Run : 
        make

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