Difference between revisions of "AVerMedia AVerTV Hybrid+FM PCI (A16D)"

From LinuxTVWiki
Jump to: navigation, search
Line 24: Line 24:
 
Analogue TV seems to work already, but without audio.
 
Analogue TV seems to work already, but without audio.
  
Remote can be enabled as well, but I am not able to let
+
Remote can be enabled as well: see [http://linuxtv.org/v4lwiki/index.php/Remote_controllers remote controller] section in this wiki.  
it work together with the tuner at the moment.  
+
  
==== Installation with TV tuning support: ====
+
==== Installation ====
  
 
As for the (E506R) there's some experimental code in  
 
As for the (E506R) there's some experimental code in  
Line 33: Line 32:
 
http://linuxtv.org/hg/~mrechberger/v4l-dvb-kernel
 
http://linuxtv.org/hg/~mrechberger/v4l-dvb-kernel
  
<pre>
+
    $ hg clone http://linuxtv.org/hg/~mrechberger/v4l-dvb-kernel
$ hg clone http://linuxtv.org/hg/~mrechberger/v4l-dvb-kernel
+
    $ cd v4l-dvb-kernel/v4l
$ cd v4l-dvb-kernel/v4l
+
$ make
+
$ make install
+
</pre>
+
  
Install firmware for the XC3028 as reported for the [http://www.linuxtv.org/v4lwiki/index.php/Em2880#Installation em2880]
+
==== Adding A16D driver ====
 
+
<pre>
+
$ modprobe xc3028-tuner
+
$ modprobe saa7134 card=104 alsa=1 tuner=71
+
</pre>
+
 
+
==== Installation with IR Remote support: ====
+
 
+
get code from the master developement repository
+
 
+
http://linuxtv.org/hg/v4l-dvb
+
 
+
<pre>
+
$ hg clone http://linuxtv.org/hg/v4l-dvb
+
$ cd v4l-dvb/v4l
+
$ make
+
$ make install
+
$ modprobe saa7134 card=85 alsa=1
+
</pre>
+
  
(See the useful [http://www.ubuntu-es.org/index.php?q=node/27239 thread] on (spanish) ubuntu forum.
+
in linux/drivers/media/video/saa7134/saa7134-cards.c at the end of  "saa7134_board saa7134_boards[]" add:
 
+
Thanks to [[User:SunnyBUG|SunnyBUG]], the autor of the original
+
article "CARDBUS Hybrid TV FM (E506R)" from which most of this was taken.
+
 
+
==== Adding its own driver ====
+
I did many tests to get both TV and remote working, without success:
+
 
+
in saa7134-cards.c at the end of  "saa7134_board saa7134_boards[]"
+
  
 
   [SAA7134_BOARD_AVERMEDIA_A16D] = {
 
   [SAA7134_BOARD_AVERMEDIA_A16D] = {
Line 94: Line 62:
 
         },
 
         },
  
in saa7134-cards.c near the end of  "pci_device_id saa7134_pci_tbl[]"
+
in linux/drivers/media/video/saa7134/saa7134-cards.c near the end of  "pci_device_id saa7134_pci_tbl[]" add:
  
 
       },{
 
       },{
Line 103: Line 71:
 
                 .driver_data  = SAA7134_BOARD_AVERMEDIA_A16D,
 
                 .driver_data  = SAA7134_BOARD_AVERMEDIA_A16D,
  
in saa7134-cards.c in "saa7134_board_init1(struct saa7134_dev *dev)"
+
in linux/drivers/media/video/saa7134/saa7134-cards.c in "saa7134_board_init1(struct saa7134_dev *dev)" add:
  
 
   case SAA7134_BOARD_AVERMEDIA_A16D:
 
   case SAA7134_BOARD_AVERMEDIA_A16D:
 +
                /* power-up tuner chip */
 +
                saa_andorl(SAA7134_GPIO_GPMODE0 >> 2,  0x80600100,0x80600100);
 +
                saa_andorl(SAA7134_GPIO_GPSTATUS0 >> 2, 0x00623100,0x00623100);
 +
                /* probably above values still need tuning*/
 +
                msleep(1);
 
                 /* enable remote */
 
                 /* enable remote */
 
                 dev->has_remote = SAA7134_REMOTE_GPIO;
 
                 dev->has_remote = SAA7134_REMOTE_GPIO;
                /* power-up tuner chip conflict with remote */
 
                saa_andorl(SAA7134_GPIO_GPMODE0 >> 2,  0xffffffff, 0xffffffff);
 
                saa_andorl(SAA7134_GPIO_GPSTATUS0 >> 2, 0xffffffff, 0xffffffff);
 
                /* probably above values need tuning*/
 
                msleep(1);
 
 
                 break;
 
                 break;
  
in saa7134-input.c in "saa7134_input_init1(struct saa7134_dev *dev)"
+
in linux/drivers/media/video/saa7134/saa7134-input.c in "saa7134_input_init1(struct saa7134_dev *dev)" add:
 
+
        
       case SAA7134_BOARD_AVERMEDIA_A16D:
+
 
         case SAA7134_BOARD_AVERMEDIA_777:
 
         case SAA7134_BOARD_AVERMEDIA_777:
 +
        case SAA7134_BOARD_AVERMEDIA_A16D:
 
                 ir_codes = ir_codes_avermedia;
 
                 ir_codes = ir_codes_avermedia;
 
                 mask_keycode = 0x02F200;
 
                 mask_keycode = 0x02F200;
Line 127: Line 95:
 
                 break;
 
                 break;
  
--[[User:Lucarasp|Lucarasp]] 03:51, 20 February 2007 (CET)
+
in linux/drivers/media/video/saa7134/saa7134.h add:
 +
 
 +
    #define SAA7134_BOARD_AVERMEDIA_A16D 105
 +
 
 +
P.S.: I know, this is not the right way to write patches, but, right now, it's my best ;-).
 +
 +
==== building and installing ====
 +
 
 +
    $ make
 +
    $ make install
 +
 
 +
Unfortunately with Fedora core 6 modules are installed in /usr/src/2.6.xxxx/kernel/
 +
while modprobe looks for updated modules in /usr/src/2.6.xxxx/updates/.
 +
Maybe you need to give the correct path as an install options; by now I simply copied
 +
patched modules over the old ones.
 +
 
 +
Install firmware for the XC3028 as reported for the [http://www.linuxtv.org/v4lwiki/index.php/Em2880#Installation em2880]
 +
 
 +
As stated in this [http://www.ubuntu-es.org/index.php?q=node/27239 thread] create /etc/modprobe.d/saa7134 containing:
 +
 
 +
    options saa7134 card=105 alsa=1 tuner=71
 +
    install saa7134 /sbin/modprobe --ignore-install saa7134; /sbin/modprobe saa7134-dvb; /sbin/modprobe saa7134-alsa ;/sbin/modprobe xc3028-tuner
 +
 
 +
==== loading modules ====
 +
 
 +
Unfortunately things don't work if you load saa7134 before xc3028-tuner, so:
 +
 
 +
    $ modprobe xc3028-tuner
 +
    $ modprobe saa7134
 +
 
 +
Thanks to [[User:SunnyBUG|SunnyBUG]], the autor of the original
 +
article "CARDBUS Hybrid TV FM (E506R)" from which most of this was taken.
 +
 
 +
--[[User:Lucarasp|Lucarasp]] 13:47, 23 February 2007 (CET)

Revision as of 14:47, 23 February 2007

Avermedia

AVerMedia AverTV Hybrid+FM PCI A16D

Info

Official Product Page

No precompiled or source linux driver from the Driver download page

Avermedia offers two "Hybrid+FM PCI" cards that, unlike their names feature different tuner chipset;

Looking on the card we can find:

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

It seem that the card is quite similar to the Cardbus version (E506R).

Analogue TV seems to work already, but without audio.

Remote can be enabled as well: see remote controller section in this wiki.

Installation

As for the (E506R) there's some experimental code in

http://linuxtv.org/hg/~mrechberger/v4l-dvb-kernel

   $ hg clone http://linuxtv.org/hg/~mrechberger/v4l-dvb-kernel
   $ cd v4l-dvb-kernel/v4l

Adding A16D driver

in linux/drivers/media/video/saa7134/saa7134-cards.c at the end of "saa7134_board saa7134_boards[]" add:

 [SAA7134_BOARD_AVERMEDIA_A16D] = {
                .name           = "AVerMedia Hybrid TV/Radio (A16D)",
                .audio_clock    = 0x187de7,
                .tuner_type     = TUNER_XCEIVE_XC3028,
                .radio_type     = UNSET,
                .tuner_addr     = 0x61,
                .radio_addr     = ADDR_UNSET,
                .inputs         = {{
                        .name = name_tv,
                        .vmux = 1,
                        .amux = TV,
                        .tv   = 1,
                },{
                        .name = name_svideo, 
                        .vmux = 8,
                        .amux = LINE1,
                }},
                .radio = {     
                        .name = name_radio,
                        .amux = LINE1,
                },
       },

in linux/drivers/media/video/saa7134/saa7134-cards.c near the end of "pci_device_id saa7134_pci_tbl[]" add:

     },{
               .vendor       = PCI_VENDOR_ID_PHILIPS,
               .device       = PCI_DEVICE_ID_PHILIPS_SAA7133,
               .subvendor    = 0x1461, /* Avermedia Technologies Inc */
               .subdevice    = 0xf936,
               .driver_data  = SAA7134_BOARD_AVERMEDIA_A16D,

in linux/drivers/media/video/saa7134/saa7134-cards.c in "saa7134_board_init1(struct saa7134_dev *dev)" add:

  case SAA7134_BOARD_AVERMEDIA_A16D:
               /* power-up tuner chip */
               saa_andorl(SAA7134_GPIO_GPMODE0 >> 2,   0x80600100,0x80600100);
               saa_andorl(SAA7134_GPIO_GPSTATUS0 >> 2, 0x00623100,0x00623100);
               /* probably above values still need tuning*/
               msleep(1);
               /* enable remote */
               dev->has_remote = SAA7134_REMOTE_GPIO;
               break;

in linux/drivers/media/video/saa7134/saa7134-input.c in "saa7134_input_init1(struct saa7134_dev *dev)" add:

       case SAA7134_BOARD_AVERMEDIA_777:
       case SAA7134_BOARD_AVERMEDIA_A16D:
               ir_codes = ir_codes_avermedia;
               mask_keycode = 0x02F200;
               mask_keydown = 0x000400;
               polling = 50; // ms
               saa_setl(SAA7134_GPIO_GPMODE0 >> 2, 0x100);
               saa_setl(SAA7134_GPIO_GPSTATUS0 >> 2, 0x100);
               break;

in linux/drivers/media/video/saa7134/saa7134.h add:

   #define SAA7134_BOARD_AVERMEDIA_A16D 105

P.S.: I know, this is not the right way to write patches, but, right now, it's my best ;-).

building and installing

   $ make
   $ make install

Unfortunately with Fedora core 6 modules are installed in /usr/src/2.6.xxxx/kernel/ while modprobe looks for updated modules in /usr/src/2.6.xxxx/updates/. Maybe you need to give the correct path as an install options; by now I simply copied patched modules over the old ones.

Install firmware for the XC3028 as reported for the em2880

As stated in this thread create /etc/modprobe.d/saa7134 containing:

   options saa7134 card=105 alsa=1 tuner=71
   install saa7134 /sbin/modprobe --ignore-install saa7134; /sbin/modprobe saa7134-dvb; /sbin/modprobe saa7134-alsa ;/sbin/modprobe xc3028-tuner

loading modules

Unfortunately things don't work if you load saa7134 before xc3028-tuner, so:

   $ modprobe xc3028-tuner
   $ modprobe saa7134

Thanks to SunnyBUG, the autor of the original article "CARDBUS Hybrid TV FM (E506R)" from which most of this was taken.

--Lucarasp 13:47, 23 February 2007 (CET)