Difference between revisions of "Archived:AVerMedia AVerTV Hybrid+FM Cardbus (E506R)-V4L"

From LinuxTVWiki
Jump to navigation Jump to search
Line 20: Line 20:
   
 
Excuse me for beeing dumb and stupid, but I just took Marcus' code for [[Em2880]] from his repository at
 
Excuse me for beeing dumb and stupid, but I just took Marcus' code for [[Em2880]] from his repository at
[http://linuxtv.org/hg/~mrechberger/v4l-dvb http://linuxtv.org/hg/~mrechberger/v4l-dvb]
+
[http://linuxtv.org/hg/~mrechberger/v4l-dvb-kernel http://linuxtv.org/hg/~mrechberger/v4l-dvb]
   
 
And added XC3028 tuner defintion to SAA7134 code, leaving gpio initialization as for AverMedia E500 card.
 
And added XC3028 tuner defintion to SAA7134 code, leaving gpio initialization as for AverMedia E500 card.

Revision as of 11:49, 18 December 2006

Avermedia

AVerMedia TV+FM CardBus E506R

Original product page

AVermedia released their card with binary only driver for Mandriva and FC3/4. For ancient kernels of course. Due to licensing from chip vendor and the fact that AVerMedia is a proud GPL violator -- they do not bother publishing source for their driver that is actually based on V4L.

Looking inside the card we can see that it is:

  • Philips SAA7135HL PCI Audio/Video Broadcast Decoder
  • Xceive XC3018 Silicon Tuner
  • Zarlink MT352 Digital Terrestrial TV Demodulator


So...

Excuse me for beeing dumb and stupid, but I just took Marcus' code for Em2880 from his repository at http://linuxtv.org/hg/~mrechberger/v4l-dvb

And added XC3028 tuner defintion to SAA7134 code, leaving gpio initialization as for AverMedia E500 card.

(XC3028 code works with XC3018 tuner fine)

Guess what? It worked :)

Screenshot is here

Dmesg follows:

Linux video capture interface: v1.00
em28xx v4l2 driver version 0.0.1 loaded
usbcore: registered new driver em28xx
/home/lesha/dev/e506r/v4l-dvb/v4l/mt2060-tuner.c: mt2060_module_init
saa7130/34: v4l2 driver version 0.2.14 loaded
ACPI: PCI Interrupt 0000:03:00.0[A] -> Link [LNKB] -> GSI 11 (level, low) -> IRQ 11
saa7133[0]: found at 0000:03:00.0, rev: 209, irq: 11, latency: 64, mmio: 0x58000000
saa7133[0]: subsystem: 1461:f436, board: AVerMedia Cardbus TV/Radio (E506) [card=99,insmod option]
saa7133[0]: board init: gpio is effffff
tuner 0-0061: chip found @ 0xc2 (saa7133[0])
xc3028-tuner.c: only analogue and DVB-T are supported at the moment
saa7133[0]: i2c eeprom 00: 61 14 36 f4 00 00 00 00 00 00 00 00 00 00 00 00
saa7133[0]: i2c eeprom 10: 00 ff e2 0e ff 20 ff ff ff ff ff ff ff ff ff ff
saa7133[0]: i2c eeprom 20: 01 40 01 02 02 01 01 03 08 ff 00 ff ff ff ff ff
saa7133[0]: i2c eeprom 30: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
saa7133[0]: i2c eeprom 40: ff 65 00 ff c2 1e ff ff ff ff ff ff ff ff ff ff
saa7133[0]: i2c eeprom 50: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
saa7133[0]: i2c eeprom 60: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
saa7133[0]: i2c eeprom 70: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
xc3028-tuner.c: selected videostandard PAL-B/G
xc3028-tuner.c: ANALOG Mode!
xc3028-tuner.c: loading new firmware
xc3028-tuner.c: Successfully loaded Firmware: 1027
xc3028-tuner.c: V4L2_STD_PAL
xc3028-tuner.c: V4L2_STD_PAL
saa7133[0]: registered device video0 [v4l2]
saa7133[0]: registered device vbi0
saa7133[0]: registered device radio0
saa7134 ALSA driver for DMA sound loaded
saa7133[0]/alsa: saa7133[0] at 0x58000000 irq 11 registered as card -1

The patches (dirty way, sorry, I'm not a programmer)

--- v4l-dvb/linux/drivers/media/video/saa7134/saa7134.h   2006-10-18 06:10:22.000000000 +0400
+++ /home/lesha/saa7134.h       2006-10-18 06:09:20.000000000 +0400
@@ -229,6 +229,8 @@
 #define SAA7134_BOARD_ELSA_700TV       89
 #define SAA7134_BOARD_KWORLD_ATSC110   90

+#define SAA7134_BOARD_AVERMEDIA_CARDBUS_506    99
+
 #define SAA7134_MAXBOARDS 8
 #define SAA7134_INPUT_MAX 8


--- saa7134-cards.c.org 2006-10-18 06:10:22.000000000 +0400
+++ saa7134-cards.c     2006-10-18 06:45:23.000000000 +0400
@@ -1591,6 +1591,33 @@ struct saa7134_board saa7134_boards[] =
                        .amux = LINE1,
                },
        },
+        [SAA7134_BOARD_AVERMEDIA_CARDBUS_506] = {
+                /* Kees.Blom@cwi.nl */
+                .name           = "AVerMedia Cardbus TV/Radio (E506R)",
+                .audio_clock    = 0x187de7,
+                .tuner_type     = TUNER_XCEIVE_XC3028,
+                .radio_type     = UNSET,
+                .tuner_addr     = ADDR_UNSET,
+                .radio_addr     = ADDR_UNSET,
+                .inputs         = {{
+                        .name = name_tv,
+                        .vmux = 1,
+                        .amux = TV,
+                        .tv   = 1,
+                },{
+                        .name = name_comp1,
+                        .vmux = 3,
+                        .amux = LINE2,
+                },{
+                        .name = name_svideo,
+                        .vmux = 8,
+                        .amux = LINE1,
+                }},
+                .radio = {
+                        .name = name_radio,
+                        .amux = LINE1,
+                },
+        },
        [SAA7134_BOARD_CINERGY400_CARDBUS] = {
                .name           = "Terratec Cinergy 400 mobile",
                .audio_clock    = 0x187de7,
@@ -3002,6 +3029,13 @@ struct pci_device_id saa7134_pci_tbl[] =
                .subdevice    = 0xd6ee,
                .driver_data  = SAA7134_BOARD_AVERMEDIA_CARDBUS,
        },{
+                /* AVerMedia CardBus E506R */
+                .vendor       = PCI_VENDOR_ID_PHILIPS,
+                .device       = PCI_DEVICE_ID_PHILIPS_SAA7134,
+                .subvendor    = 0x1461, /* Avermedia Technologies Inc */
+                .subdevice    = 0xf436,
+                .driver_data  = SAA7134_BOARD_AVERMEDIA_CARDBUS_506,
+        },{
                /* TransGear 3000TV */
                .vendor       = PCI_VENDOR_ID_PHILIPS,
                .device       = PCI_DEVICE_ID_PHILIPS_SAA7130,
@@ -3435,6 +3469,7 @@ int saa7134_board_init1(struct saa7134_d
                saa_writeb(SAA7134_GPIO_GPSTATUS3, 0x00);
                break;
        case SAA7134_BOARD_AVERMEDIA_CARDBUS:
+        case SAA7134_BOARD_AVERMEDIA_CARDBUS_506:
                /* power-up tuner chip */
                saa_andorl(SAA7134_GPIO_GPMODE0 >> 2,   0xffffffff, 0xffffffff);
                saa_andorl(SAA7134_GPIO_GPSTATUS0 >> 2, 0xffffffff, 0xffffffff);

Don't forget to fetch XC tuner firmware, that is needed by tuner driver, it's documented in the Em2880 Wiki

See Em2880 page for more details.

So... someone, please assign E506R valid card id insted 99, cleanup and include this code to the tree, etc.

The only viewer program working for me is TVtime. KDEtv and Mplayer show different weird stuff and errors, however this can be due to my idiotism.

Please don't forget to load required kernel modules before saa7134:

  • tuner
  • xc3028_tuner

Otherwise card will be detected without tuner.

--SunnyBUG 04:53, 18 October 2006 (CEST)

Respect товарищу Hayova за 501R ;)))