Talk:AVerMedia A828: Difference between revisions

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


Cold Sun
Cold Sun

== It doesn't work for me ==
Hi, thanks for your work, i didn't know nothing about how to install this card with latest linux kernels but here I can see something. I don't know why, but i get this error, in archlinux (kernel 32 bits, 3.0.7) and the same with ubuntu 11.10 (32 bits).

<code>

[eduardo@myhost a828-0.28]$ sudo ./install.sh
make -C /lib/modules/3.0-ARCH/build O=/lib/modules/3.0-ARCH/build SUBDIRS=`pwd`
make[1]: se ingresa al directorio `/usr/src/linux-3.0-ARCH'
CC [M] /usr/src/a828-0.28/a828-core.o
CC [M] /usr/src/a828-0.28/aver/osdep_dvb.o
CC [M] /usr/src/a828-0.28/aver/osdep_th2.o
CC [M] /usr/src/a828-0.28/aver/osdep_v4l2.o
CC [M] /usr/src/a828-0.28/aver/osdep_vbuf.o
CC [M] /usr/src/a828-0.28/aver/osdep_alsa.o
SHIPPED /usr/src/a828-0.28/_prebuild.o
CC [M] /usr/src/a828-0.28/aver/averusb-mod.o
LD [M] /usr/src/a828-0.28/a828.o
/usr/src/a828-0.28/_prebuild.o: file not recognized: File format not recognized
make[3]: *** [/usr/src/a828-0.28/a828.o] Error 1
make[2]: *** [_module_/usr/src/a828-0.28] Error 2
make[1]: *** [sub-make] Error 2
make[1]: se sale del directorio `/usr/src/linux-3.0-ARCH'
make: *** [default] Error 2
FAILED : did you execute the script as root?
</code>

I hope you can help me. There is an error in your script, in osdep_dvb.c you need to comment this line ;)
<code>
#include <linux/smp_lock.h>
</code>

Regards and thanks
Aberkoke

Revision as of 12:35, 4 November 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

It doesn't work for me

Hi, thanks for your work, i didn't know nothing about how to install this card with latest linux kernels but here I can see something. I don't know why, but i get this error, in archlinux (kernel 32 bits, 3.0.7) and the same with ubuntu 11.10 (32 bits).

[eduardo@myhost a828-0.28]$ sudo ./install.sh make -C /lib/modules/3.0-ARCH/build O=/lib/modules/3.0-ARCH/build SUBDIRS=`pwd` make[1]: se ingresa al directorio `/usr/src/linux-3.0-ARCH'

 CC [M]  /usr/src/a828-0.28/a828-core.o
 CC [M]  /usr/src/a828-0.28/aver/osdep_dvb.o
 CC [M]  /usr/src/a828-0.28/aver/osdep_th2.o
 CC [M]  /usr/src/a828-0.28/aver/osdep_v4l2.o
 CC [M]  /usr/src/a828-0.28/aver/osdep_vbuf.o
 CC [M]  /usr/src/a828-0.28/aver/osdep_alsa.o
 SHIPPED /usr/src/a828-0.28/_prebuild.o
 CC [M]  /usr/src/a828-0.28/aver/averusb-mod.o
 LD [M]  /usr/src/a828-0.28/a828.o

/usr/src/a828-0.28/_prebuild.o: file not recognized: File format not recognized make[3]: *** [/usr/src/a828-0.28/a828.o] Error 1 make[2]: *** [_module_/usr/src/a828-0.28] Error 2 make[1]: *** [sub-make] Error 2 make[1]: se sale del directorio `/usr/src/linux-3.0-ARCH' make: *** [default] Error 2 FAILED : did you execute the script as root?

I hope you can help me. There is an error in your script, in osdep_dvb.c you need to comment this line ;)

  1. include <linux/smp_lock.h>

Regards and thanks Aberkoke