Skip to contentSkip to conversation

Terratec Cinergy Hybrid XE (TM6010 Mediachip)

DISCUSSION Stefan Ringel 1 participant 1 message Jan 15, 2010

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

I have bug-fix (tm6000.patch) my first problem, so that it loads the tuner and demodulator (message). But I cannot find digital channels. It was wrong with the tuner (xc3028) or demodulator (zl10353)? Under windows xp it found digital channels (region Germany Berlin).

Signature · 1 line
Stefan Ringel <[email protected]>
drivers/staging/tm6000/tm6000-cards.c +26 -4
index 59fb505..334dea9 100644
@@ -32,7 +32,7 @@
 #include "tm6000.h"
 #include "tm6000-regs.h"
 #include "tuner-xc2028.h"
-#include "tuner-xc5000.h"
+#include "xc5000.h"
 
 #define TM6000_BOARD_UNKNOWN			0
 #define TM5600_BOARD_GENERIC			1
@@ -44,6 +44,10 @@
 #define TM6000_BOARD_FREECOM_AND_SIMILAR	7
 #define TM6000_BOARD_ADSTECH_MINI_DUAL_TV	8
 #define TM6010_BOARD_HAUPPAUGE_900H		9
+#define TM6010_BOARD_BEHOLD_WANDER		10
+#define TM6010_BOARD_BEHOLD_VOYAGER		11
+#define TM6010_BOARD_TERRATEC_CINERGY_HYBRID_XE	12
+
 
 #define TM6000_MAXBOARDS        16
 static unsigned int card[]     = {[0 ... (TM6000_MAXBOARDS - 1)] = UNSET };
@@ -208,7 +212,21 @@ struct tm6000_board tm6000_boards[] = {
 		},
 		.gpio_addr_tun_reset = TM6000_GPIO_2,
 	},
-
+	[TM6010_BOARD_TERRATEC_CINERGY_HYBRID_XE] = {
+		.name         = "Terratec Cinergy Hybrid XE",
+		.tuner_type   = TUNER_XC2028, /* has a XC3028 */
+		.tuner_addr   = 0xc2 >> 1,
+		.demod_addr   = 0x1e >> 1,
+		.type         = TM6010,
+		.caps = {
+			.has_tuner    = 1,
+			.has_dvb      = 1,
+			.has_zl10353  = 1,
+			.has_eeprom   = 1,
+			.has_remote   = 1,
+		},
+		.gpio_addr_tun_reset = TM6000_GPIO_2,
+	}
 };
 
 /* table of devices that work with this driver */
@@ -221,6 +239,7 @@ struct usb_device_id tm6000_id_table [] = {
 	{ USB_DEVICE(0x2040, 0x6600), .driver_info = TM6010_BOARD_HAUPPAUGE_900H },
 	{ USB_DEVICE(0x6000, 0xdec0), .driver_info = TM6010_BOARD_BEHOLD_WANDER },
 	{ USB_DEVICE(0x6000, 0xdec1), .driver_info = TM6010_BOARD_BEHOLD_VOYAGER },
+	{ USB_DEVICE(0x0ccd, 0x0086), .driver_info = TM6010_BOARD_TERRATEC_CINERGY_HYBRID_XE },
 	{ },
 };
 
@@ -305,12 +324,14 @@ static void tm6000_config_tuner (struct tm6000_core *dev)
 		ctl.mts   = 1;
 		ctl.read_not_reliable = 1;
 		ctl.msleep = 10;
-
+		ctl.demod = XC3028_FE_ZARLINK456;
+		
 		xc2028_cfg.tuner = TUNER_XC2028;
 		xc2028_cfg.priv  = &ctl;
 
 		switch(dev->model) {
 		case TM6010_BOARD_HAUPPAUGE_900H:
+		case TM6010_BOARD_TERRATEC_CINERGY_HYBRID_XE:
 			ctl.fname = "xc3028L-v36.fw";
 			break;
 		default:
@@ -402,6 +423,7 @@ static int tm6000_init_dev(struct tm6000_core *dev)
 		}
 #endif
 	}
+	return 0;
 
 err2:
 	v4l2_device_unregister(&dev->v4l2_dev);
@@ -465,7 +487,7 @@ static int tm6000_usb_probe(struct usb_interface *interface,
 	}
 
 	/* Create and initialize dev struct */
-	dev = kzalloc(sizeof(*dev), GFP_KERNEL);
+	dev = kzalloc(sizeof(*(dev)), GFP_KERNEL);
 	if (dev == NULL) {
 		printk ("tm6000" ": out of memory!\n");
 		usb_put_dev(usbdev);
drivers/staging/tm6000/tm6000-core.c +128 -51

202 lines not on this page · raw message

drivers/staging/tm6000/tm6000-dvb.c +9 -2
index e900d6d..2059a26 100644
@@ -30,7 +30,11 @@
 
 #include "tuner-xc2028.h"
 
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19)
+static void tm6000_urb_received(struct urb *urb, struct pt_regs *ptregs)
+#else
 static void tm6000_urb_received(struct urb *urb)
+#endif
 {
 	int ret;
 	struct tm6000_core* dev = urb->context;
@@ -191,13 +195,16 @@ int tm6000_dvb_attach_frontend(struct tm6000_core *dev)
 
 	if(dev->caps.has_zl10353) {
 		struct zl10353_config config =
-				    {.demod_address = dev->demod_addr >> 1,
+				    {.demod_address = dev->demod_addr,
 				     .no_tuner = 1,
+				     .parallel_ts = 1,
+				     .if2 = 45600,
 // 				     .input_frequency = 0x19e9,
 // 				     .r56_agc_targets =  0x1c,
 				    };
 
-		dvb->frontend = pseudo_zl10353_attach(dev, &config,
+//		dvb->frontend = pseudo_zl10353_attach(dev, &config,
+		dvb->frontend = dvb_attach (zl10353_attach, &config,
 							   &dev->i2c_adap);
 	}
 	else {
drivers/staging/tm6000/tm6000-i2c.c +15 -1
index 4da10f5..9653f00 100644
@@ -86,6 +86,13 @@ static int tm6000_i2c_xfer(struct i2c_adapter *i2c_adap,
 				msgs[i].len == 1 ? 0 : msgs[i].buf[1],
 				msgs[i + 1].buf, msgs[i + 1].len);
 			i++;
+			msleep(15);
+			if ((dev->dev_type == TM6010) && (addr == 0xc2)) {
+				tm6000_set_reg(dev, 0x32, 0,0);
+				msleep(10);
+				tm6000_set_reg(dev, 0x33, 0,0);
+				msleep(10);
+			}
 			if (i2c_debug >= 2)
 				for (byte = 0; byte < msgs[i].len; byte++)
 					printk(" %02x", msgs[i].buf[byte]);
@@ -99,6 +106,13 @@ static int tm6000_i2c_xfer(struct i2c_adapter *i2c_adap,
 				REQ_16_SET_GET_I2C_WR1_RDN,
 				addr | msgs[i].buf[0] << 8, 0,
 				msgs[i].buf + 1, msgs[i].len - 1);
+			msleep(15);
+			if ((dev->dev_type == TM6010) && (addr == 0xc2)) {
+				tm6000_set_reg(dev, 0x32, 0,0);
+				msleep(10);
+				tm6000_set_reg(dev, 0x33, 0,0);
+				msleep(10);
+			}
 		}
 		if (i2c_debug >= 2)
 			printk("\n");
@@ -198,7 +212,7 @@ static struct i2c_algorithm tm6000_algo = {
 
 static struct i2c_adapter tm6000_adap_template = {
 	.owner = THIS_MODULE,
-	.class = I2C_CLASS_TV_ANALOG,
+	.class = I2C_CLASS_TV_ANALOG | I2C_CLASS_TV_DIGITAL,
 	.name = "tm6000",
 	.id = I2C_HW_B_TM6000,
 	.algo = &tm6000_algo,