Re: TDA10086 with Pinnacle 400e tuning broken

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

 



Hi

hermann pitton schrieb:
> Am Mittwoch, den 06.02.2008, 09:17 +0100 schrieb André Weidemann:
>> Hartmut Hackmann wrote:
>>
>>> Are you sure that it is a lnbp21 on your board?
>>> What kind of satellite equipment do you have?
>>> - a single LNB, so the 22kHz tone is enough.
>>> - a Multiswitch?
>>>   if yes, which commands does it need / understand?
>>>   - nothing but the tone?
>>>   - a tone burst to switch between satellites and the tone?
>>>   - full diseqc (2?) serial messages?
>>>
>>> I got a board with tda10086 and lnbp21 let and started measuring.
>>> voltage switching and static tone work fine with the current
>>> configuration.
>> Hi Hartmut,
>> I got the same tuning problems as Patrick. After your patch the Pinnacle 
>> 400e is not working anymore. I can get a signal, but no lock at all.
>> I took a look at the PCB and there is definitely an LNBP21PD soldered 
>> onto it.
>> Your patch disables the modulation of the 22kHz signal inside the demod 
>> as fas as I understood, but then the LNBP21PD was supposed to generate it.
>>
>> Unfortunately this is not possible with the Pinnacle 400e. I took a look 
>> at the LNBP21PD datasheet which states, that DSQIN is supposed to be 
>> connected to GND if you don't want the 22kHz signal to be generated by 
>> the LNBP21 itself. Guess what?! Pin 14(DSQIN) is connected to GND.
>>
>> For the time being I reverted your patch on my local system and the 
>> Pinnacle 400e is working flawlessly again.
>>
>>   André
>>
> 
> 
> Hi,
> 
> we should try to get this sorted.
> 
> With the prior state, working for Andre and others, it does not work on
> the LifeView Trio (PCI and cardbus) and the saa7134 driver. Three guys I
> think reported it and Hartmut did wait with the patch for long and
> allowed about half a year for testing ...
> 
> So, if we can't fix it soon, prior state of course counts and those
> later will have to use the patches further. Such a "fix" can always be
> committed prior to 2.6.25 release.
> 
> Hermann
> 
> 
So here is the patch that make the the 22kHz tone a config option.
Please be aware that i have no means to test it, so please report

Signed-off-by: Hartmut Hackmann <hartmut.hackmann@xxxxxxxxxxx

diff -r 7564c110491e linux/drivers/media/dvb/dvb-usb/ttusb2.c
--- a/linux/drivers/media/dvb/dvb-usb/ttusb2.c	Sun Jan 20 09:13:44 2008 -0200
+++ b/linux/drivers/media/dvb/dvb-usb/ttusb2.c	Thu Feb 07 01:20:19 2008 +0100
@@ -150,6 +150,7 @@ static struct tda10086_config tda10086_c
 static struct tda10086_config tda10086_config = {
 	.demod_address = 0x0e,
 	.invert = 0,
+	.diseqc_tone = 1,
 };
 
 static int ttusb2_frontend_attach(struct dvb_usb_adapter *adap)
diff -r 7564c110491e linux/drivers/media/dvb/frontends/tda10086.c
--- a/linux/drivers/media/dvb/frontends/tda10086.c	Sun Jan 20 09:13:44 2008 -0200
+++ b/linux/drivers/media/dvb/frontends/tda10086.c	Thu Feb 07 01:29:37 2008 +0100
@@ -107,9 +107,12 @@ static int tda10086_init(struct dvb_fron
 static int tda10086_init(struct dvb_frontend* fe)
 {
 	struct tda10086_state* state = fe->demodulator_priv;
-
-	dprintk ("%s\n", __FUNCTION__);
-
+	u8 t22k_off = 0x80;
+        
+	dprintk ("%s\n", __FUNCTION__);
+
+	if (state->config->diseqc_tone)
+        	t22k_off = 0;
 	// reset
 	tda10086_write_byte(state, 0x00, 0x00);
 	msleep(10);
@@ -159,7 +162,7 @@ static int tda10086_init(struct dvb_fron
 	tda10086_write_byte(state, 0x3d, 0x80);
 
 	// setup SEC
-	tda10086_write_byte(state, 0x36, 0x80); // all SEC off, no 22k tone
+	tda10086_write_byte(state, 0x36, t22k_off); // all SEC off, 22k tone
 	tda10086_write_byte(state, 0x34, (((1<<19) * (22000/1000)) / (SACLK/1000)));      // } tone frequency
 	tda10086_write_byte(state, 0x35, (((1<<19) * (22000/1000)) / (SACLK/1000)) >> 8); // }
 
@@ -181,16 +184,20 @@ static int tda10086_set_tone (struct dvb
 static int tda10086_set_tone (struct dvb_frontend* fe, fe_sec_tone_mode_t tone)
 {
 	struct tda10086_state* state = fe->demodulator_priv;
-
-	dprintk ("%s\n", __FUNCTION__);
+	u8 t22k_off = 0x80;
+        
+	dprintk ("%s\n", __FUNCTION__);
+
+	if (state->config->diseqc_tone)
+        	t22k_off = 0;
 
 	switch (tone) {
 	case SEC_TONE_OFF:
-		tda10086_write_byte(state, 0x36, 0x80);
+		tda10086_write_byte(state, 0x36, t22k_off);
 		break;
 
 	case SEC_TONE_ON:
-		tda10086_write_byte(state, 0x36, 0x81);
+		tda10086_write_byte(state, 0x36, 0x01 + t22k_off);
 		break;
 	}
 
@@ -203,8 +210,12 @@ static int tda10086_send_master_cmd (str
 	struct tda10086_state* state = fe->demodulator_priv;
 	int i;
 	u8 oldval;
-
-	dprintk ("%s\n", __FUNCTION__);
+	u8 t22k_off = 0x80;
+        
+	dprintk ("%s\n", __FUNCTION__);
+
+	if (state->config->diseqc_tone)
+        	t22k_off = 0;
 
 	if (cmd->msg_len > 6)
 		return -EINVAL;
@@ -213,7 +224,8 @@ static int tda10086_send_master_cmd (str
 	for(i=0; i< cmd->msg_len; i++) {
 		tda10086_write_byte(state, 0x48+i, cmd->msg[i]);
 	}
-	tda10086_write_byte(state, 0x36, 0x88 | ((cmd->msg_len - 1) << 4));
+	tda10086_write_byte(state, 0x36, (0x08 + t22k_off)
+					| ((cmd->msg_len - 1) << 4));
 
 	tda10086_diseqc_wait(state);
 
@@ -226,16 +238,20 @@ static int tda10086_send_burst (struct d
 {
 	struct tda10086_state* state = fe->demodulator_priv;
 	u8 oldval = tda10086_read_byte(state, 0x36);
-
-	dprintk ("%s\n", __FUNCTION__);
+	u8 t22k_off = 0x80;
+        
+	dprintk ("%s\n", __FUNCTION__);
+
+	if (state->config->diseqc_tone)
+        	t22k_off = 0;
 
 	switch(minicmd) {
 	case SEC_MINI_A:
-		tda10086_write_byte(state, 0x36, 0x84);
+		tda10086_write_byte(state, 0x36, 0x04 + t22k_off);
 		break;
 
 	case SEC_MINI_B:
-		tda10086_write_byte(state, 0x36, 0x86);
+		tda10086_write_byte(state, 0x36, 0x06 + t22k_off);
 		break;
 	}
 
diff -r 7564c110491e linux/drivers/media/dvb/frontends/tda10086.h
--- a/linux/drivers/media/dvb/frontends/tda10086.h	Sun Jan 20 09:13:44 2008 -0200
+++ b/linux/drivers/media/dvb/frontends/tda10086.h	Thu Feb 07 01:16:45 2008 +0100
@@ -33,6 +33,9 @@ struct tda10086_config
 
 	/* does the "inversion" need inverted? */
 	u8 invert;
+
+        /* do we need the diseqc signal with carrier? */
+        u8 diseqc_tone;
 };
 
 #if defined(CONFIG_DVB_TDA10086) || (defined(CONFIG_DVB_TDA10086_MODULE) && defined(MODULE))
diff -r 7564c110491e linux/drivers/media/dvb/ttpci/budget.c
--- a/linux/drivers/media/dvb/ttpci/budget.c	Sun Jan 20 09:13:44 2008 -0200
+++ b/linux/drivers/media/dvb/ttpci/budget.c	Thu Feb 07 01:19:53 2008 +0100
@@ -351,6 +351,7 @@ static struct tda10086_config tda10086_c
 static struct tda10086_config tda10086_config = {
 	.demod_address = 0x0e,
 	.invert = 0,
+	.diseqc_tone = 1,
 };
 
 static u8 read_pwm(struct budget* budget)
diff -r 7564c110491e linux/drivers/media/video/saa7134/saa7134-dvb.c
--- a/linux/drivers/media/video/saa7134/saa7134-dvb.c	Sun Jan 20 09:13:44 2008 -0200
+++ b/linux/drivers/media/video/saa7134/saa7134-dvb.c	Thu Feb 07 01:21:14 2008 +0100
@@ -826,6 +826,7 @@ static struct tda10086_config flydvbs = 
 static struct tda10086_config flydvbs = {
 	.demod_address = 0x0e,
 	.invert = 0,
+	.diseqc_tone = 0,
 };
 
 /* ==================================================================
_______________________________________________
linux-dvb mailing list
linux-dvb@xxxxxxxxxxx
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb

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

  Powered by Linux