public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: Hartmut Hackmann <hartmut.hackmann@t-online.de>
To: hermann pitton <hermann-pitton@arcor.de>
Cc: linux-dvb@linuxtv.org
Subject: Re: [linux-dvb] TDA10086 with Pinnacle 400e tuning broken
Date: Thu, 07 Feb 2008 01:41:16 +0100	[thread overview]
Message-ID: <47AA53AC.6050402@t-online.de> (raw)
In-Reply-To: <1202288256.3442.20.camel@pc08.localdom.local>

[-- Attachment #1: Type: text/plain, Size: 2205 bytes --]

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@t-online.de


[-- Attachment #2: tda10086_tone_option.diff --]
[-- Type: text/x-patch, Size: 4921 bytes --]

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,
 };
 
 /* ==================================================================

[-- Attachment #3: Type: text/plain, Size: 150 bytes --]

_______________________________________________
linux-dvb mailing list
linux-dvb@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb

  parent reply	other threads:[~2008-02-07  0:41 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <Pine.LNX.4.64.0801271922040.21518@pub2.ifh.de>
     [not found] ` <479D1632.4010006@t-online.de>
     [not found]   ` <Pine.LNX.4.64.0801292211380.23532@pub2.ifh.de>
     [not found]     ` <479FB52A.6010401@t-online.de>
     [not found]       ` <Pine.LNX.4.64.0801300047520.23532@pub2.ifh.de>
2008-02-03 22:43         ` [linux-dvb] TDA10086 with Pinnacle 400e tuning broken Hartmut Hackmann
2008-02-06  8:17           ` André Weidemann
2008-02-06  8:57             ` hermann pitton
2008-02-06 14:12               ` Patrick Boettcher
2008-02-06 21:54               ` Hartmut Hackmann
2008-02-07  0:41               ` Hartmut Hackmann [this message]
2008-02-07 20:45                 ` Patrick Boettcher
     [not found]                   ` <47AE432A.3070007@t-online.de>
2008-02-10  7:09                     ` Dirk Brenken
2008-02-07 20:58                 ` Dirk Brenken
2008-02-07 22:29                 ` Oliver Endriss

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=47AA53AC.6050402@t-online.de \
    --to=hartmut.hackmann@t-online.de \
    --cc=hermann-pitton@arcor.de \
    --cc=linux-dvb@linuxtv.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox