[linux-dvb] [PATCH] TT Budget 1500 S

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

 



	Hello.

Attached 2 patches :

  ttpci-lnbp21-set-voltage-fixed-masks sets more precisely the
masks for the function lnbp21_set_voltage () function. This is
an almost cosmetic patch.

  ttpci-tt-budget-1500s-fix fixed a S1500 issue : When set in
vertical mode, the card loose the signal sync. The fix is to
set the card in "high voltage mode". This has been confirmed
from TechnoTrend. (Many thanks for their help)


Patches shall apply on current v4l-dvb CVS tree...

Hope that helps !

Perceval.
-------------- next part --------------
According to the LNBP21 datasheet, the LNB voltage is changed using the
VSEL flag. Therefore the correct mask is 1111 0011 - 0xf3

VSEL = 0 ; EN = 1 -> 13V
VSEL = 1 ; EN = 1 -> 18V 
For memory, here is the format of the I2C message.

  MSB                                        LSB
| PCL | ISEL | TEN | LLC | VSEL | EN | OTF | OLF |

The datasheet is available here :
http://www.st.com/stonline/books/pdf/docs/9094.pdf

Signed-off-by: Perceval Anichini <perceval.anichini@xxxxxxxxxxxxxxx>

Index: v4l-dvb/linux/drivers/media/dvb/ttpci/budget.c
===================================================================
--- v4l-dvb.orig/linux/drivers/media/dvb/ttpci/budget.c	2006-01-20 10:46:09.000000000 +0100
+++ v4l-dvb/linux/drivers/media/dvb/ttpci/budget.c	2006-01-20 10:56:06.000000000 +0100
@@ -194,15 +194,15 @@
 
 	switch(voltage) {
 	case SEC_VOLTAGE_13:
-		buf = (buf & 0xf7) | 0x04;
+		buf = (buf & 0xf3) | 0x04;
 		break;
 
 	case SEC_VOLTAGE_18:
-		buf = (buf & 0xf7) | 0x0c;
+		buf = (buf & 0xf3) | 0x0c;
 		break;
 
 	case SEC_VOLTAGE_OFF:
-		buf = buf & 0xf0;
+		buf = buf & 0xf3;
 		break;
 	}
 
-------------- next part --------------
The TT Budget 1500 S regularly lost the signal lock when set in vertical mode.

Actually, the LNBP21 chip of the card needs to be set in "high lnb mode" to
work properly. Many thanks to TechnoTrend for their help finding this bug,
and resolving it.

This patch does no more that setting the LLC flag just after the LNBP21 check.

Signed-off-by : Perceval Anichini <perceval.anichini@xxxxxxxxxxxxxxx>

Index: v4l-dvb/linux/drivers/media/dvb/ttpci/budget.c
===================================================================
--- v4l-dvb.orig/linux/drivers/media/dvb/ttpci/budget.c	2006-01-20 10:56:06.000000000 +0100
+++ v4l-dvb/linux/drivers/media/dvb/ttpci/budget.c	2006-01-20 11:42:31.000000000 +0100
@@ -212,13 +212,14 @@
 	return 0;
 }
 
-static int lnbp21_enable_high_lnb_voltage(struct dvb_frontend* fe, long arg)
+static int lnbp21_enable_high_lnb_voltage_ (struct i2c_adapter* i2c_adap, long arg)
 {
-	struct budget* budget = (struct budget*) fe->dvb->priv;
 	u8 buf;
 	struct i2c_msg msg = { .addr = 0x08, .flags = I2C_M_RD, .buf = &buf, .len = sizeof(buf) };
 
-	if (i2c_transfer (&budget->i2c_adap, &msg, 1) != 1) return -EIO;
+	dprintk (2, "%s - enabling high lnb voltage : %ld\n", __FUNCTION__, arg);
+
+	if (i2c_transfer (i2c_adap, &msg, 1) != 1) return -EIO;
 
 	if (arg) {
 		buf = buf | 0x10;
@@ -227,11 +228,18 @@
 	}
 
 	msg.flags = 0;
-	if (i2c_transfer (&budget->i2c_adap, &msg, 1) != 1) return -EIO;
+	if (i2c_transfer (i2c_adap, &msg, 1) != 1) return -EIO;
 
 	return 0;
 }
 
+static int lnbp21_enable_high_lnb_voltage(struct dvb_frontend* fe, long arg)
+{
+	struct budget* budget = (struct budget*) fe->dvb->priv;
+
+	return lnbp21_enable_high_lnb_voltage_ (&budget->i2c_adap, arg);
+}
+
 static int lnbp21_init(struct budget* budget)
 {
 	u8 buf = 0x00;
@@ -591,6 +599,10 @@
 				printk("%s: No LNBP21 found!\n", __FUNCTION__);
 				goto error_out;
 			}
+			if (lnbp21_enable_high_lnb_voltage_ (&budget->i2c_adap, 1) != 0) {
+				printk ("%s: Couldn't set LNBP21 LLC flag!\n", __FUNCTION__);
+				goto error_out;
+			}
 		}
 
 		break;

[Index of Archives]     [Linux Media]     [Video 4 Linux]     [Asterisk]     [Samba]     [Xorg]     [Xfree86]     [Linux USB]

  Powered by Linux