[linux-dvb] [patch] TTBudget/Wintv Nova big transponder problem

ua0lnj at ok.ru ua0lnj at ok.ru
Sat Nov 18 01:44:36 CET 2006


The current dvb driver of 2.6 kernel for Philips su1278 
tuner have not good setting for stv0299 frontend, and have 
no lock with high symbolrate transponders.
I changed su1278 settings in budget-ci.c file.
I tested transponders from SR 2900 fec 3/4 to SR 44950 fec 
7/8 with TT budget S1102 dvb-s pci card (like nova-ci).

Signed-off-by: Andrey Pridvorov <ua0lnj at ok.ru>

---
Professional hosting for everyone - http://www.host.ru
-------------- next part --------------
--- budget-ci.c.orig	2006-11-07 07:42:54.000000000 +1000
+++ budget-ci.c	2006-11-07 23:14:28.000000000 +1000
@@ -550,10 +550,10 @@
 }
 
 static u8 philips_su1278_tt_inittab[] = {
-	0x01, 0x0f,
+	0x01, 0x15,
 	0x02, 0x30,
 	0x03, 0x00,
-	0x04, 0x5b,
+	0x04, 0x7d,
 	0x05, 0x85,
 	0x06, 0x02,
 	0x07, 0x00,
@@ -561,12 +561,12 @@
 	0x09, 0x00,
 	0x0C, 0x01,
 	0x0D, 0x81,
-	0x0E, 0x44,
-	0x0f, 0x14,
-	0x10, 0x3c,
+	0x0E, 0x23,
+	0x0f, 0x94,
+	0x10, 0x39,
 	0x11, 0x84,
-	0x12, 0xda,
-	0x13, 0x97,
+	0x12, 0xb9,
+	0x13, 0xb5,
 	0x14, 0x95,
 	0x15, 0xc9,
 	0x16, 0x19,
@@ -587,7 +587,7 @@
 	0x2a, 0x14,
 	0x2b, 0x0f,
 	0x2c, 0x09,
-	0x2d, 0x09,
+	0x2d, 0x05,
 	0x31, 0x1f,
 	0x32, 0x19,
 	0x33, 0xfc,
@@ -597,34 +597,28 @@
 
 static int philips_su1278_tt_set_symbol_rate(struct dvb_frontend *fe, u32 srate, u32 ratio)
 {
-	stv0299_writereg(fe, 0x0e, 0x44);
-	if (srate >= 10000000) {
-		stv0299_writereg(fe, 0x13, 0x97);
-		stv0299_writereg(fe, 0x14, 0x95);
-		stv0299_writereg(fe, 0x15, 0xc9);
-		stv0299_writereg(fe, 0x17, 0x8c);
-		stv0299_writereg(fe, 0x1a, 0xfe);
-		stv0299_writereg(fe, 0x1c, 0x7f);
-		stv0299_writereg(fe, 0x2d, 0x09);
-	} else {
-		stv0299_writereg(fe, 0x13, 0x99);
-		stv0299_writereg(fe, 0x14, 0x8d);
-		stv0299_writereg(fe, 0x15, 0xce);
-		stv0299_writereg(fe, 0x17, 0x43);
-		stv0299_writereg(fe, 0x1a, 0x1d);
-		stv0299_writereg(fe, 0x1c, 0x12);
-		stv0299_writereg(fe, 0x2d, 0x05);
-	}
-	stv0299_writereg(fe, 0x0e, 0x23);
-	stv0299_writereg(fe, 0x0f, 0x94);
-	stv0299_writereg(fe, 0x10, 0x39);
-	stv0299_writereg(fe, 0x15, 0xc9);
-
-	stv0299_writereg(fe, 0x1f, (ratio >> 16) & 0xff);
-	stv0299_writereg(fe, 0x20, (ratio >> 8) & 0xff);
-	stv0299_writereg(fe, 0x21, (ratio) & 0xf0);
-
-	return 0;
+	u8 aclk = 0;
+	u8 bclk = 0;
+	u8 m1;
+	
+	aclk = 0xb5;
+		if (srate < 2000000) bclk = 0x86;
+		else if (srate < 5000000) bclk = 0x89;
+		else if (srate < 15000000) bclk = 0x8f;
+		else if (srate < 45000000) bclk = 0x95;
+
+		m1 = 0x94;
+		if (srate < 4000000) m1 = 0x90;
+
+	    	stv0299_writereg (fe, 0x13, aclk);
+  	        stv0299_writereg (fe, 0x14, bclk);
+	        stv0299_writereg (fe, 0x1f, (ratio >> 16) & 0xff);
+	        stv0299_writereg (fe, 0x20, (ratio >>  8) & 0xff);
+	        stv0299_writereg (fe, 0x21, (ratio      ) & 0xf0);
+	        stv0299_writereg (fe, 0x0f, m1);
+	
+	
+		return 0;
 }
 
 static int philips_su1278_tt_tuner_set_params(struct dvb_frontend *fe,
@@ -667,7 +661,7 @@
 
 	.demod_address = 0x68,
 	.inittab = philips_su1278_tt_inittab,
-	.mclk = 64000000UL,
+	.mclk = 88000000UL,
 	.invert = 0,
 	.skip_reinit = 1,
 	.lock_output = STV0229_LOCKOUTPUT_1,


More information about the linux-dvb mailing list