V4L/DVB: af9015: add support for TerraTec Cinergy T Stick Dual RC
authorAntti Palosaari <crope@iki.fi>
Thu, 9 Sep 2010 17:59:10 +0000 (14:59 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Thu, 21 Oct 2010 03:05:51 +0000 (01:05 -0200)
Add USB ID [0ccd:0099] for TerraTec Cinergy T Stick Dual RC.
Device is based for AF9015 + AF9013 + 2 x MxL5007T chips.

Thanks to the TerraTec!

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/dvb/dvb-usb/Kconfig
drivers/media/dvb/dvb-usb/af9015.c
drivers/media/dvb/dvb-usb/dvb-usb-ids.h

index 4734ec073e01d02b82163dbf92b0310041dd590d..ce60c1e46e153daf7a48610eda93d202afdc8d25 100644 (file)
@@ -315,6 +315,7 @@ config DVB_USB_AF9015
        select MEDIA_TUNER_MXL5005S if !MEDIA_TUNER_CUSTOMISE
        select MEDIA_TUNER_MC44S803 if !MEDIA_TUNER_CUSTOMISE
        select MEDIA_TUNER_TDA18218 if !MEDIA_TUNER_CUSTOMISE
+       select MEDIA_TUNER_MXL5007T if !MEDIA_TUNER_CUSTOMISE
        help
          Say Y here to support the Afatech AF9015 based DVB-T USB2.0 receiver
 
index b5fdcc2cb54355961e1736da3368d909851acbe9..bf8075c7793017c0e8abb404659fdedff5e1e224 100644 (file)
@@ -32,6 +32,7 @@
 #include "mxl5005s.h"
 #include "mc44s803.h"
 #include "tda18218.h"
+#include "mxl5007t.h"
 
 static int dvb_usb_af9015_debug;
 module_param_named(debug, dvb_usb_af9015_debug, int, 0644);
@@ -999,6 +1000,7 @@ static int af9015_read_config(struct usb_device *udev)
                case AF9013_TUNER_MXL5003D:
                case AF9013_TUNER_MXL5005D:
                case AF9013_TUNER_MXL5005R:
+               case AF9013_TUNER_MXL5007T:
                        af9015_af9013_config[i].rf_spec_inv = 0;
                        break;
                case AF9013_TUNER_MC44S803:
@@ -1212,6 +1214,11 @@ static struct tda18218_config af9015_tda18218_config = {
        .i2c_wr_max = 21, /* max wr bytes AF9015 I2C adap can handle at once */
 };
 
+static struct mxl5007t_config af9015_mxl5007t_config = {
+       .xtal_freq_hz = MxL_XTAL_24_MHZ,
+       .if_freq_hz = MxL_IF_4_57_MHZ,
+};
+
 static int af9015_tuner_attach(struct dvb_usb_adapter *adap)
 {
        struct af9015_state *state = adap->dev->priv;
@@ -1263,6 +1270,10 @@ static int af9015_tuner_attach(struct dvb_usb_adapter *adap)
                ret = dvb_attach(mc44s803_attach, adap->fe, i2c_adap,
                        &af9015_mc44s803_config) == NULL ? -ENODEV : 0;
                break;
+       case AF9013_TUNER_MXL5007T:
+               ret = dvb_attach(mxl5007t_attach, adap->fe, i2c_adap,
+                       0xc0, &af9015_mxl5007t_config) == NULL ? -ENODEV : 0;
+               break;
        case AF9013_TUNER_UNKNOWN:
        default:
                ret = -ENODEV;
@@ -1309,6 +1320,8 @@ static struct usb_device_id af9015_usb_table[] = {
        {USB_DEVICE(USB_VID_KWORLD_2,  USB_PID_KWORLD_395U_4)},
        {USB_DEVICE(USB_VID_AVERMEDIA, USB_PID_AVERMEDIA_A815M)},
        {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)},
        {0},
 };
 MODULE_DEVICE_TABLE(usb, af9015_usb_table);
@@ -1370,7 +1383,7 @@ static struct dvb_usb_device_properties af9015_properties[] = {
 
                .i2c_algo = &af9015_i2c_algo,
 
-               .num_device_descs = 10, /* check max from dvb-usb.h */
+               .num_device_descs = 11, /* check max from dvb-usb.h */
                .devices = {
                        {
                                .name = "Afatech AF9015 DVB-T USB2.0 stick",
@@ -1427,6 +1440,11 @@ static struct dvb_usb_device_properties af9015_properties[] = {
                                .cold_ids = {&af9015_usb_table[33], NULL},
                                .warm_ids = {NULL},
                        },
+                       {
+                               .name = "TerraTec Cinergy T Stick Dual RC",
+                               .cold_ids = {&af9015_usb_table[34], NULL},
+                               .warm_ids = {NULL},
+                       },
                }
        }, {
                .caps = DVB_USB_IS_AN_I2C_ADAPTER,
index dc6a0f194e5ba0732ded46d35a0c21fbb76414f2..436d53dda1c7c522f7d52b1f232622de07d59e27 100644 (file)
 #define USB_PID_TERRATEC_CINERGY_T_USB_XE              0x0055
 #define USB_PID_TERRATEC_CINERGY_T_USB_XE_REV2         0x0069
 #define USB_PID_TERRATEC_CINERGY_T_STICK_RC            0x0097
+#define USB_PID_TERRATEC_CINERGY_T_STICK_DUAL_RC       0x0099
 #define USB_PID_TWINHAN_VP7041_COLD                    0x3201
 #define USB_PID_TWINHAN_VP7041_WARM                    0x3202
 #define USB_PID_TWINHAN_VP7020_COLD                    0x3203