Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[linux-dvb] Patch: Support for TerraTec Cinergy 1200 DVB-S



I have been following some threads about the Cinergy 1200 DVB-S driver not 
getting a lock on some channels (Astra, ProSieben).
After fixing the basic KNC1 driver 
(http://linuxtv.org/mailinglists/linux-dvb/2004/06-2004/msg00394.html) I was 
able to implement the changes sugested by Ralph Metzler and get a lock on all 
tested channels.
The solution was to not not set register 0x08 to 0x40 as OP2 is not connected 
to LNB voltage on these cards.

The attached patch works nicely for me (after applying the KNC1 patch). Please 
test and let me know if it works.

Regards
Uli

-- 
Realität ist eine Haluzination hervorgerufen durch einen Mangel an Alkohol
Index: linux/drivers/media/dvb/frontends/stv0299.c
===================================================================
RCS file: /cvs/linuxtv/dvb-kernel/linux/drivers/media/dvb/frontends/stv0299.c,v
retrieving revision 1.44
diff -u -r1.44 stv0299.c
--- linux/drivers/media/dvb/frontends/stv0299.c	7 Jun 2004 17:26:17 -0000	1.44
+++ linux/drivers/media/dvb/frontends/stv0299.c	21 Jun 2004 12:43:24 -0000
@@ -79,6 +79,7 @@
 #define SAMSUNG_TBMU24112IMB	4
 #define PHILIPS_SU1278_TSA_TT	5 // SU1278 with TSA5059 synth and TechnoTrend settings
 #define PHILIPS_SU1278_TSA_TY	6 // SU1278 with TUA5059 synth and Typhoon wiring
+#define PHILIPS_SU1278_TSA_CI	7 // SU1278 with TUA5059 synth and TerraTec Cinergy wiring
 
 /* Master Clock = 88 MHz */
 #define M_CLK (88000000UL)
@@ -392,7 +393,8 @@
 	case PHILIPS_SU1278_TSA:
 	case PHILIPS_SU1278_TSA_TT:
 	case PHILIPS_SU1278_TSA_TY:
-		if (ftype == PHILIPS_SU1278_TSA_TY)
+	case PHILIPS_SU1278_TSA_CI:
+		if (ftype == PHILIPS_SU1278_TSA_TY || ftype == PHILIPS_SU1278_TSA_CI)
 			addr = 0x61;
 		else
 			addr = 0x60;
@@ -619,7 +621,7 @@
 			stv0299_writereg (i2c, init_tab[i], init_tab[i+1]);
 
 		/* AGC1 reference register setup */
-		if (ftype == PHILIPS_SU1278_TSA || ftype == PHILIPS_SU1278_TSA_TY)
+		if (ftype == PHILIPS_SU1278_TSA || ftype == PHILIPS_SU1278_TSA_TY || ftype == PHILIPS_SU1278_TSA_CI)
 		  stv0299_writereg (i2c, 0x0f, 0x92);  /* Iagc = Inverse, m1 = 18 */
 		else if (ftype == PHILIPS_SU1278_TUA)
 		  stv0299_writereg (i2c, 0x0f, 0x94);  /* Iagc = Inverse, m1 = 20 */
@@ -854,11 +856,18 @@
 		return stv0299_writereg (i2c, 0x08, 0x00); /*	LNB power off! */
 	}
 	
-	stv0299_writereg (i2c, 0x08, reg0x08 | 0x40);
+	if (tuner_type == PHILIPS_SU1278_TSA_CI) 
+	{
+		stv0299_writereg (i2c, 0x08, reg0x08 & 0xBF); // switch LNB power on OP2/LOCK pin off
+	}
+	else
+	{
+		stv0299_writereg (i2c, 0x08, reg0x08 | 0x40);
+	}
 
 	switch (voltage) {
 	case SEC_VOLTAGE_13:
-		if (tuner_type == PHILIPS_SU1278_TSA_TY)
+		if (tuner_type == PHILIPS_SU1278_TSA_TY || tuner_type == PHILIPS_SU1278_TSA_CI)
 			return stv0299_writereg (i2c, 0x0c, reg0x0c | 0x10);
 		else
 			return stv0299_writereg (i2c, 0x0c, reg0x0c | 0x40);
@@ -924,6 +933,7 @@
 		break;
 	    
 	case PHILIPS_SU1278_TSA_TY:
+	case PHILIPS_SU1278_TSA_CI:
 	case PHILIPS_SU1278_TSA:
 		aclk = 0xb5;
 		if (srate < 2000000) bclk = 0x86;
@@ -1306,6 +1316,13 @@
 			printk ("%s: setup for tuner SU1278 (TSA5059 synth) on"
 				" Typhoon hardware\n", __FILE__);
 			return PHILIPS_SU1278_TSA_TY;
+		} 
+		else if ( strcmp(adapter->name, "TerraTec Cinergy 1200 DVB-S") == 0 )
+		{
+			// Cinergy cards have unusual wiring.
+			printk ("%s: setup for tuner SU1278 (TSA5059 synth) on"
+				" TerraTec hardware\n", __FILE__);
+			return PHILIPS_SU1278_TSA_CI;
 		}
 		//else if ((stat[0] & 0x3f) == 0) {
 		else if (0) {
Index: linux/drivers/media/dvb/ttpci/budget-av.c
===================================================================
RCS file: /cvs/linuxtv/dvb-kernel/linux/drivers/media/dvb/ttpci/budget-av.c,v
retrieving revision 1.20
diff -u -r1.20 budget-av.c
--- linux/drivers/media/dvb/ttpci/budget-av.c	4 Jun 2004 20:32:55 -0000	1.20
+++ linux/drivers/media/dvb/ttpci/budget-av.c	21 Jun 2004 12:43:24 -0000
@@ -199,7 +199,7 @@
 
 	DEB_EE(("dev: %p\n",dev));
 
-	if (bi->type != BUDGET_KNC1) {
+	if (bi->type != BUDGET_KNC1 && bi->type != BUDGET_CIN1200) {
 		return -ENODEV;
 	}
 
@@ -359,9 +359,11 @@
 
 
 MAKE_BUDGET_INFO(knc1, "KNC1 DVB-S", BUDGET_KNC1);
+MAKE_BUDGET_INFO(cin1200, "TerraTec Cinergy 1200 DVB-S", BUDGET_CIN1200);
 
 static struct pci_device_id pci_tbl [] = {
 	MAKE_EXTENSION_PCI(knc1, 0x1131, 0x4f56),
+	MAKE_EXTENSION_PCI(cin1200, 0x153b, 0x1154),
 	{
 		.vendor    = 0,
 	}
Index: linux/drivers/media/dvb/ttpci/budget.h
===================================================================
RCS file: /cvs/linuxtv/dvb-kernel/linux/drivers/media/dvb/ttpci/budget.h,v
retrieving revision 1.11
diff -u -r1.11 budget.h
--- linux/drivers/media/dvb/ttpci/budget.h	3 May 2004 16:36:29 -0000	1.11
+++ linux/drivers/media/dvb/ttpci/budget.h	21 Jun 2004 12:43:24 -0000
@@ -82,6 +82,7 @@
 #define BUDGET_KNC1		   2
 #define BUDGET_PATCH		   3
 #define BUDGET_FS_ACTIVY	   4
+#define BUDGET_CIN1200		   5
 
 #define BUDGET_VIDEO_PORTA         0
 #define BUDGET_VIDEO_PORTB         1

Home | Main Index | Thread Index