[media] v4l/dvb: add support for AVerMedia AVerTV Red HD+ (A850T)
authorYann E. MORIN <yann.morin.1998@anciens.enib.fr>
Fri, 1 Oct 2010 19:55:43 +0000 (16:55 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Thu, 21 Oct 2010 03:17:58 +0000 (01:17 -0200)
The AVerTV Red HD+ (A850T) is basically the same as the existing
AVerTV Volar Black HD (A850), but is specific to the french market.
The A850T identifies itself as a A850, but has its own PID. It even
suffers from the same EEPROM deficiencies.

This is based off a collection of information gathered from the
french support forums for Ubuntu, which I tried to properly format
into this patch:
  http://forum.ubuntu-fr.org/viewtopic.php?pid=3322825

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/dvb/dvb-usb/af9015.c
drivers/media/dvb/dvb-usb/dvb-usb-ids.h

index f63cb18b37f627ac4593b18d9695f6d9b45811fc..8c073ab3083227f0d20e4fa00b62abf282dd3f7f 100644 (file)
@@ -966,9 +966,11 @@ error:
                err("eeprom read failed:%d", ret);
 
        /* AverMedia AVerTV Volar Black HD (A850) device have bad EEPROM
-          content :-( Override some wrong values here. */
+          content :-( Override some wrong values here. Ditto for the
+          AVerTV Red HD+ (A850T) device. */
        if (le16_to_cpu(udev->descriptor.idVendor) == USB_VID_AVERMEDIA &&
-           le16_to_cpu(udev->descriptor.idProduct) == USB_PID_AVERMEDIA_A850) {
+           ((le16_to_cpu(udev->descriptor.idProduct) == USB_PID_AVERMEDIA_A850) ||
+            (le16_to_cpu(udev->descriptor.idProduct) == USB_PID_AVERMEDIA_A850T))) {
                deb_info("%s: AverMedia A850: overriding config\n", __func__);
                /* disable dual mode */
                af9015_config.dual_mode = 0;
@@ -1299,6 +1301,7 @@ static struct usb_device_id af9015_usb_table[] = {
        {USB_DEVICE(USB_VID_TERRATEC,  USB_PID_TERRATEC_CINERGY_T_STICK_RC)},
        {USB_DEVICE(USB_VID_TERRATEC,
                USB_PID_TERRATEC_CINERGY_T_STICK_DUAL_RC)},
+/* 35 */{USB_DEVICE(USB_VID_AVERMEDIA, USB_PID_AVERMEDIA_A850T)},
        {0},
 };
 MODULE_DEVICE_TABLE(usb, af9015_usb_table);
@@ -1361,7 +1364,7 @@ static struct dvb_usb_device_properties af9015_properties[] = {
 
                .i2c_algo = &af9015_i2c_algo,
 
-               .num_device_descs = 11, /* check max from dvb-usb.h */
+               .num_device_descs = 12, /* check max from dvb-usb.h */
                .devices = {
                        {
                                .name = "Afatech AF9015 DVB-T USB2.0 stick",
@@ -1423,6 +1426,11 @@ static struct dvb_usb_device_properties af9015_properties[] = {
                                .cold_ids = {&af9015_usb_table[34], NULL},
                                .warm_ids = {NULL},
                        },
+                       {
+                               .name = "AverMedia AVerTV Red HD+ (A850T)",
+                               .cold_ids = {&af9015_usb_table[35], NULL},
+                               .warm_ids = {NULL},
+                       },
                }
        }, {
                .caps = DVB_USB_IS_AN_I2C_ADAPTER,
index 436d53dda1c7c522f7d52b1f232622de07d59e27..cc398ecb5b096dc84ecfd15a6ee1c388f3b5e5f6 100644 (file)
 #define USB_PID_AVERMEDIA_A309                         0xa309
 #define USB_PID_AVERMEDIA_A310                         0xa310
 #define USB_PID_AVERMEDIA_A850                         0x850a
+#define USB_PID_AVERMEDIA_A850T                                0x850b
 #define USB_PID_AVERMEDIA_A805                         0xa805
 #define USB_PID_AVERMEDIA_A815M                                0x815a
 #define USB_PID_TECHNOTREND_CONNECT_S2400               0x3006