All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Daniel Perzynski" <Daniel.Perzynski@aster.pl>
To: <linux-dvb@linuxtv.org>
Subject: Re: [linux-dvb] Avermedia A312 - patch for review
Date: Mon, 15 Dec 2008 23:25:43 +0100	[thread overview]
Message-ID: <000901c95f04$11bda940$3538fbc0$@Perzynski@aster.pl> (raw)


[-- Attachment #1.1: Type: text/plain, Size: 5520 bytes --]

Hi,

 

According to the suggestions I've modified dvb-usb-ids.h and cxusb.c to add
a support for that card.

 

I would appreciate someone to look at the code below and compare it with
spec on the wiki for that card.

 

--- ala/v4l-dvb/linux/drivers/media/dvb/dvb-usb/dvb-usb-ids.h
2008-12-14 23:11:28.000000000 +0100

+++ v4l-dvb/linux/drivers/media/dvb/dvb-usb/dvb-usb-ids.h   2008-12-14
22:08:17.000000000 +0100

@@ -234,5 +234,5 @@

 #define USB_PID_XTENSIONS_XD_380
0x0381

 #define USB_PID_TELESTAR_STARSTICK_2
0x8000

 #define USB_PID_MSI_DIGI_VOX_MINI_III                   0x8807

-

+#define USB_PID_AVERMEDIA_A312                          0xa312

 #endif

--- ala/v4l-dvb/linux/drivers/media/dvb/dvb-usb/cxusb.c
2008-12-14 23:11:28.000000000 +0100

+++ v4l-dvb/linux/drivers/media/dvb/dvb-usb/cxusb.c
2008-12-14 22:43:33.000000000 +0100

@@ -1224,6 +1224,8 @@

 static struct dvb_usb_device_properties cxusb_bluebird_nano2_properties;

 static struct dvb_usb_device_properties
cxusb_bluebird_nano2_needsfirmware_properties;

 static struct dvb_usb_device_properties cxusb_aver_a868r_properties;

+static struct dvb_usb_device_properties cxusb_aver_a312_properties;

+

 static struct dvb_usb_device_properties cxusb_d680_dmb_properties;

 

 static int cxusb_probe(struct usb_interface *intf,

@@ -1248,6 +1250,8 @@

 
THIS_MODULE, NULL, adapter_nr) ||

                    0 == dvb_usb_device_init(intf,
&cxusb_aver_a868r_properties,

 
THIS_MODULE, NULL, adapter_nr) ||

+                 0 == dvb_usb_device_init(intf,
&cxusb_aver_a312_properties,

+
THIS_MODULE, NULL, adapter_nr) ||

                    0 == dvb_usb_device_init(intf,

 
&cxusb_bluebird_dualdig4_rev2_properties,

 
THIS_MODULE, NULL, adapter_nr) ||

@@ -1277,6 +1281,7 @@

                { USB_DEVICE(USB_VID_DVICO,
USB_PID_DVICO_BLUEBIRD_DVB_T_NANO_2) },

                { USB_DEVICE(USB_VID_DVICO,
USB_PID_DVICO_BLUEBIRD_DVB_T_NANO_2_NFW_WARM) },

                { USB_DEVICE(USB_VID_AVERMEDIA,
USB_PID_AVERMEDIA_VOLAR_A868R) },

+             { USB_DEVICE(USB_VID_AVERMEDIA, USB_PID_AVERMEDIA_A312) },

                { USB_DEVICE(USB_VID_DVICO,
USB_PID_DVICO_BLUEBIRD_DUAL_4_REV_2) },

                { USB_DEVICE(USB_VID_CONEXANT, USB_PID_CONEXANT_D680_DMB) },

                {}                             /* Terminating entry */

@@ -1724,6 +1729,48 @@

                }

 };

 

+static struct dvb_usb_device_properties cxusb_aver_a312_properties = {

+             .caps = DVB_USB_IS_AN_I2C_ADAPTER,

+

+             .usb_ctrl         = CYPRESS_FX2,

+

+             .size_of_priv     = sizeof(struct cxusb_state),

+

+             .num_adapters = 1,

+             .adapter = {

+                             {

+                                             .streaming_ctrl   =
cxusb_aver_streaming_ctrl,

+                                             .frontend_attach  =
cxusb_aver_lgdt3303_frontend_attach,

+                                             .tuner_attach     =
cxusb_dvico_xc3028_tuner_attach,

+                                             /* parameter for the
MPEG2-data transfer */

+                                             .stream = {

+                                                             .type =
USB_BULK,

+                                                             .count = 5,

+                                                             .endpoint =
0x04,

+                                                             .u = {

+
.bulk = {

+
.buffersize = 8192,

+
}

+                                                             }

+                                             },

+

+                             },

+             },

+             .power_ctrl       = cxusb_aver_power_ctrl,

+

+             .i2c_algo         = &cxusb_i2c_algo,

+

+             .generic_bulk_ctrl_endpoint = 0x01,

+

+             .num_device_descs = 1,

+             .devices = {

+                             {   "AVerMedia AVerTVHD (A312)",

+                                             { NULL },

+                                             { &cxusb_table[17], NULL },

+                             },

+             }

+};

+

 static

 struct dvb_usb_device_properties cxusb_bluebird_dualdig4_rev2_properties =
{

                .caps = DVB_USB_IS_AN_I2C_ADAPTER,

 

After modprobing cxusb driver I have:

 

vb-usb: found a 'AVerMedia AVerTVHD (A312)' in warm state.

dvb-usb: will pass the complete MPEG2 transport stream to the software
demuxer.

DVB: registering new adapter (AVerMedia AVerTVHD (A312))

DVB: registering adapter 0 frontend 0 (LG Electronics LGDT3303 VSB/QAM
Frontend)...

xc2028 4-0061: creating new instance

xc2028 4-0061: type set to XCeive xc2028/xc3028 tuner

dvb-usb: AVerMedia AVerTVHD (A312) successfully initialized and connected.

usbcore: registered new interface driver dvb_usb_cxusb

 

h3xu5 v4l-dvb # ls -laR /dev/dvb/

/dev/dvb/:

total 0

drwxr-xr-x  3 root root   60 Dec 14 23:06 .

drwxr-xr-x 15 root root 4640 Dec 14 23:06 ..

drwxr-xr-x  2 root root  120 Dec 14 23:06 adapter0

 

/dev/dvb/adapter0:

total 0

drwxr-xr-x 2 root root     120 Dec 14 23:06 .

drwxr-xr-x 3 root root      60 Dec 14 23:06 ..

crw-rw---- 1 root video 212, 0 Dec 14 23:06 demux0

crw-rw---- 1 root video 212, 1 Dec 14 23:06 dvr0

crw-rw---- 1 root video 212, 3 Dec 14 23:06 frontend0

crw-rw---- 1 root video 212, 2 Dec 14 23:06 net0

 

The question is if it is ok or maybe something is missing here and what
should be next steps.

 

Regards,

 


[-- Attachment #1.2: Type: text/html, Size: 22096 bytes --]

[-- Attachment #2: Type: text/plain, Size: 150 bytes --]

_______________________________________________
linux-dvb mailing list
linux-dvb@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb

             reply	other threads:[~2008-12-15 22:26 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-15 22:25 Daniel Perzynski [this message]
     [not found] <4728568367913277327@unknownmsgid>
2008-12-15 22:28 ` [linux-dvb] Avermedia A312 - patch for review Devin Heitmueller
2008-12-15 23:08   ` Daniel Perzynski
     [not found]   ` <8829222570103551382@unknownmsgid>
2008-12-15 23:12     ` Devin Heitmueller
2008-12-15 23:23       ` Daniel Perzynski
     [not found]       ` <2944906433286851876@unknownmsgid>
2008-12-15 23:27         ` Devin Heitmueller
2008-12-15 23:30           ` Daniel Perzynski
2008-12-16  1:04           ` Andy Walls
2008-12-16  5:07             ` Devin Heitmueller
2008-12-16 11:29               ` Daniel Perzynski
2008-12-17  2:51                 ` Andy Walls
2008-12-17 21:24                   ` Daniel Perzynski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='000901c95f04$11bda940$3538fbc0$@Perzynski@aster.pl' \
    --to=daniel.perzynski@aster.pl \
    --cc=linux-dvb@linuxtv.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.