Talk:AVerMedia A828: Difference between revisions

From LinuxTVWiki
Jump to navigation Jump to search
Line 158: Line 158:
I totally agree. I just made a script that automate the installation, using dkms.
I totally agree. I just made a script that automate the installation, using dkms.
Thanks for your modifications.
Thanks for your modifications.

Cheers
Cheers

Cold Sun
Cold Sun

Revision as of 14:29, 30 October 2011

Hi.

This isn't working on openSUSE 11.4 with kernel 2.6.37.1, 32 bits. Everything compiles OK, but when inserting a828.ko I have the following error message if I use the installer.sh script (generated in /tmp/vm-install when you run sh AVERMEDIA-Linux-x86-A828-0.28-beta.sh):

  FATAL: Error inserting a828 (/lib/modules/2.6.37.1-1.2-desktop/kernel/drivers/media/dvb/dvb-usb/a828.ko):
  Invalid argument

or the next one if I run it from the console:

  insmod: error inserting './a828.ko': -1 Invalid parameters

Greetings.



Hi,

Could you try again, and show what this command returns :

  dmesg

Greetings,

ColdSun

Hello.

I was a bit tired because of the bad support and when I asked AVerMedia about new drivers they send me an email saying that the Linux support has ceased. Then I bought a Pinnacle nanostick and I don't use AVerMedia anymore. Because now I'm using kernel 2.6.39 I think that the output of dmesg may not be meaningful for you since things may have changed again.

Anyway, thank you for your time and effort.

Greetings.


Hi

Thanks for your efforts on producing this Wiki page. I managed to use the info to get my Avermedia A828 USB TV stick to work on Linux, on Ubuntu 11.04 via MythTV. Now I've tried Ubuntu 11.10 with Kernel 3.0.0-0300, and I get a compilation issue:

/A828-expert-install/aver/osdep_th2.c:78:28: fatal error: linux/smp_lock.h: No such file or directory

This is because linux/smp_lock.h has now been deleted because of removal of the Big Kernel lock. I've deleted every instance of:

#include <linux/smp_lock.h>

In the following files:

aver/osdep_dvb.c

aver/osdep_th2.c

aver/osdep.c

aver/osdep_v4l2.c

The make command compiled successfully. The Avermedia A828 driver now works with Kernel 3.0.0-0300 which comes with Ubuntu 11.10

I tried to update the main page with new instructions. But was defeated by a spam filter reporting against the word s e m.

Here's the new instructions:

Modifications to bring

1. In aver/osdep.c : 
        1.a If Kernel >= 3.0.0 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 >= 3.0.0 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 >= 3.0.0 then remove line :
                #include <linux/smp_lock.h>
4. In aver/osdep_dvb.c :
        If Kernel >= 3.0.0 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

It would be good to automate this with scripts and patch files.

Regards Mark

Script to automate

I totally agree. I just made a script that automate the installation, using dkms. Thanks for your modifications.

Cheers

Cold Sun