Mailing List archive

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

[linux-dvb] Re: linuxtv-dvb-1.1.1 has been released



On Monday 08 March 2004 23:06, Nico wrote:
> Andrew de Quincey wrote:
> >On Monday 08 March 2004 11:18, Nico wrote:
> >>On Fri, 5 Mar 2004, Johannes Stezenbach wrote:
> >>>Hi,
> >>>
> >>>I've just pushed the release tarball for linuxtv-dvb-1.1.1
> >>>out on http://linuxtv.org/.
> >>>
> >>>Many, many thanks to all those who contributed to this release!
> >>>
> >>>Changes from linuxtv-dvb-1.1.0:
> >>>o fixed various timing issues in frontend code to speed up tuning
> >>>o fixed pointer bug in ring buffer handling which potentially
> >>>  affected common interface communication
> >>>o fixed av7110 debi functions for ARM64, added better error checking
> >>>o fixed software demux section filter bug which caused data loss
> >>>  if there were two sections in one TS packet and the first section
> >>>  was smaller than 18 bytes
> >>>o frontend fixes for ves1820 and stv0299
> >>
> >>my Nova-S 1.6 (stv0299) doesn't tune *anything* with this release: always
> >>timeouts.
> >
> >Which stv0299 is it in particular? It should say in dmesg...
>
> Hi, this is the dmesg (kernel 2.6.1):

> /home/nico/linuxtv-dvb-1.1.1/build-2.6/stv0299.c: setup for tuner BSRU6,
> TDQB-S00x
> DVB: registering frontend 0:0 (STV0299/TSA5059/SL1935 based)...
> TT-Budget/WinTV-NOVA-S  PCI adapter 0 has MAC addr = 00:d0:5c:20:76:8d

Hi, please try the attached patch and let me know if it helps matters...
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.37
diff -u -r1.37 stv0299.c
--- linux/drivers/media/dvb/frontends/stv0299.c	27 Feb 2004 09:54:49 -0000	1.37
+++ linux/drivers/media/dvb/frontends/stv0299.c	8 Mar 2004 22:39:30 -0000
@@ -368,9 +368,14 @@
 
 	if ((freq < 950000) || (freq > 2150000)) return -EINVAL;
 
-        divisor = 500;
-        regcode = 2;
-   
+        if (ftype == PHILIPS_SU1278_TSA_TT) {
+	        divisor = 500;
+	        regcode = 2;
+	} else {
+	        divisor = 1000;
+	        regcode = 1;
+	}
+
 	// setup frequency divisor
 	div = (freq + (divisor - 1)) / divisor; // round correctly
 	buf[0] = (div >> 8) & 0x7f;
@@ -1087,7 +1092,7 @@
                 struct dvb_frontend_parameters *p = arg;
 
 	        dprintk ("%s : FE_SET_FRONTEND\n", __FUNCTION__);
-
+	    
 	        if (p->inversion == INVERSION_OFF) {
 		        stv0299_writereg(i2c, 0x0c, stv0299_readreg(i2c, 0x0c) & 0xfe);
 		} else if (p->inversion == INVERSION_ON) {
@@ -1100,7 +1105,9 @@
 //		        return -EINVAL;
 		}
 
-	        if (state->tuner_type == PHILIPS_SU1278_TSA_TT) {
+	        switch(state->tuner_type) {
+		case PHILIPS_SU1278_TSA_TT: 
+		{
 		        /* check if we should do a finetune */
 	                int frequency_delta = p->frequency - state->tuner_frequency;
 		        int minmax = p->u.qpsk.symbol_rate / 2000;
@@ -1118,23 +1125,29 @@
 			        // now set them as we want
 			        stv0299_writereg (i2c, 0x22, Drot_freq >> 8);
 			        stv0299_writereg (i2c, 0x23, Drot_freq);
-			        break;
+			} else {
+			        /* A "normal" tune is requested */
+			        stv0299_writereg (i2c, 0x32, 0x80);
+			        stv0299_writereg (i2c, 0x22, 0x00);
+			        stv0299_writereg (i2c, 0x23, 0x00);
+			        stv0299_writereg (i2c, 0x32, 0x19);
+			        stv0299_set_symbolrate (i2c, p->u.qpsk.symbol_rate, state->tuner_type);
+			        stv0299_set_FEC (i2c, p->u.qpsk.fec_inner);
+			        pll_set_tv_freq (i2c, p->frequency, state->tuner_type, p->u.qpsk.symbol_rate);
 			}
+	                break;
+		}
+
+		 default:	
+		        stv0299_set_FEC (i2c, p->u.qpsk.fec_inner);
+		        stv0299_set_symbolrate (i2c, p->u.qpsk.symbol_rate, state->tuner_type);
+		        stv0299_writereg (i2c, 0x22, 0x00);
+		        stv0299_writereg (i2c, 0x23, 0x00);
+		        stv0299_readreg (i2c, 0x23);
+		        stv0299_writereg (i2c, 0x12, 0xb9);
+		        break;
 		}
 
-	        /* A "normal" tune is requested */
-	        stv0299_writereg (i2c, 0x32, 0x80);
-	        stv0299_writereg (i2c, 0x22, 0x00);
-	        stv0299_writereg (i2c, 0x23, 0x00);
-	        stv0299_writereg (i2c, 0x32, 0x19);
-	        stv0299_set_symbolrate (i2c, p->u.qpsk.symbol_rate, state->tuner_type);
-	        stv0299_set_FEC (i2c, p->u.qpsk.fec_inner);
-	        pll_set_tv_freq (i2c, p->frequency, state->tuner_type, p->u.qpsk.symbol_rate);
-	        dvb_delay(50);
-	        stv0299_writereg (i2c, 0x22, 0x00);
-	        stv0299_writereg (i2c, 0x23, 0x00);
-	        pll_set_tv_freq (i2c, p->frequency, state->tuner_type, p->u.qpsk.symbol_rate);
- 
 	        state->tuner_frequency = p->frequency;
 	        state->fec_inner = p->u.qpsk.fec_inner;
 	        state->symbol_rate = p->u.qpsk.symbol_rate;

Home | Main Index | Thread Index