Re: Pinnacle 300i, please try this patch

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

 



Hi Guys,

Am Donnerstag, den 16.02.2006, 17:59 +0100 schrieb Rainer Schubert:
> On Thu, 16 Feb 2006, Hartmut Hackmann wrote:
> 
> > Hi, Tim, Rainer
> 
> Hi Hartmut, Tim, Tim, List,
> 
> > Tim Small wrote:
> >> I tested Hartmut's patch yesterday - analogue now works, (the picture was 
> >> horrible, but this is apparently because a workman has broken the cable in 
> >> the roof space - I will test digital after I have fixed the cable!).  With 
> >> the patch I've not seen any more i2c errors anyway.
> 
> There is almost no analogue TV here, only some weak signals by ARD & ZDF.
> I never bothered with analogue TV as it was cut down here when I got my
> first Pinnacle card.
> 
> [...] 
> >> Use a more recent kernel, and apply the rejected diff by hand (i.e. just 
> >> look at the contents of the diff, and make the change yourself), or tell 
> >> patch to try harder.
> 
> Isn't 2.6.14 recent enough ?

yes, even 2.6.12 should be recent enough.

> > The patch was created against an about 1 week old version, it is quite likely
> > that it changed meanwhile. I guess the patches in saa7134-cards.c were 
> > rejected.

It produces only an offset of 26 lines here, caused by the new Elsa
card.

> Looking at the log I produced it seems the patches to tuner.c have been
> rejected.

Only an offset of two lines caused by the new #ifdef for the XCeive
tuner. This part is needed to set the mt2050 in digital mode again.

> > Please apply the changes manually - at least the one for the pinnacle 300i.
> > It is a major portion of the trick. Also please keep in mind that the tda9887
> > module needs to be loaded manually before tuner. I have a patch for this
> > pending.
> 
> Tim sent his patched version which I will try this afternoon. Thanks Tim !
> 
> > If you have inconsistent module versions, i guess the reason is that the
> > kernel is older than 2.6.12. In this case, the dvb modules will not be 
> > updated.
> 
> It is version 2.6.14 and the inconsistancy was with versions of symbols in 
> ir_kbd-something.

Try modprobe -r to the related modules. This will also remove the old
ir-common.

> > If it is desired, i can also generate a patch for this to make it work for
> > at least 2.6.11.
> 
> Thanks, Hartmut, not for me, as I have got a working setup with 2.6.12.5 
> as a fallback.

Since it seems to produce problems for more people, a regenerated
version of Hartmut's patch against the recent "hg clone
http://linuxtv.org/hg/v4l-dvb"; is attached.

It should do if placed into the mercurial v4l-dvb top level directory
and there
"patch --dry-run -p 1 < pinnacle300i-regenerated-20060216.patch".
If so, drop the --dry-run and apply. I would like to see the first
saa7134-dvb hybrid card alive again everywhere :)

Cheers,
Hermann



diff -r 36822fdac27e linux/drivers/media/video/saa7134/saa7134-cards.c
--- a/linux/drivers/media/video/saa7134/saa7134-cards.c	Wed Feb 15 15:47:26 2006
+++ b/linux/drivers/media/video/saa7134/saa7134-cards.c	Thu Feb 16 19:54:58 2006
@@ -1005,7 +1005,7 @@
 		.radio_type     = UNSET,
 		.tuner_addr	= ADDR_UNSET,
 		.radio_addr	= ADDR_UNSET,
-		.tda9887_conf   = TDA9887_PRESENT | TDA9887_INTERCARRIER | TDA9887_PORT2_ACTIVE,
+		.tda9887_conf   = TDA9887_PRESENT | TDA9887_INTERCARRIER | TDA9887_PORT2_INACTIVE,
 		.inputs         = {{
 			.name = name_tv,
 			.vmux = 3,
@@ -1694,7 +1694,7 @@
 		.radio_type     = UNSET,
 		.tuner_addr	= ADDR_UNSET,
 		.radio_addr	= ADDR_UNSET,
-		.tda9887_conf   = TDA9887_PRESENT | TDA9887_INTERCARRIER | TDA9887_PORT2_ACTIVE,
+		.tda9887_conf   = TDA9887_PRESENT | TDA9887_INTERCARRIER | TDA9887_PORT2_INACTIVE,
 		.mpeg           = SAA7134_MPEG_DVB,
 		.inputs         = {{
 			.name = name_tv,
diff -r 36822fdac27e linux/drivers/media/video/saa7134/saa7134-dvb.c
--- a/linux/drivers/media/video/saa7134/saa7134-dvb.c	Wed Feb 15 15:47:26 2006
+++ b/linux/drivers/media/video/saa7134/saa7134-dvb.c	Thu Feb 16 19:54:58 2006
@@ -112,6 +112,10 @@
 	mt352_write(fe, fsm_ctl_cfg,    sizeof(fsm_ctl_cfg));
 	mt352_write(fe, scan_ctl_cfg,   sizeof(scan_ctl_cfg));
 	mt352_write(fe, irq_cfg,        sizeof(irq_cfg));
+
+	/* this turns the remote control chip off to work around a bug in it */
+	saa_writeb(SAA7134_GPIO_GPMODE1, 0x80);
+	saa_writeb(SAA7134_GPIO_GPSTATUS1, 0x80);
 	return 0;
 }
 
@@ -137,8 +141,10 @@
 				  struct dvb_frontend_parameters* params,
 				  u8* pllbuf)
 {
-	static int on  = TDA9887_PRESENT | TDA9887_PORT2_INACTIVE;
-	static int off = TDA9887_PRESENT | TDA9887_PORT2_ACTIVE;
+	u8 off[] = { 0x00, 0xf1};
+	u8 on[]  = { 0x00, 0x71};
+	struct i2c_msg msg = {.addr=0x43, .flags=0, .buf=off, .len = sizeof(off)};
+
 	struct saa7134_dev *dev = fe->dvb->priv;
 	struct v4l2_frequency f;
 
@@ -146,9 +152,10 @@
 	f.tuner     = 0;
 	f.type      = V4L2_TUNER_DIGITAL_TV;
 	f.frequency = params->frequency / 1000 * 16 / 1000;
-	saa7134_i2c_call_clients(dev,TDA9887_SET_CONFIG,&on);
+	i2c_transfer(&dev->i2c_adap, &msg, 1);
 	saa7134_i2c_call_clients(dev,VIDIOC_S_FREQUENCY,&f);
-	saa7134_i2c_call_clients(dev,TDA9887_SET_CONFIG,&off);
+	msg.buf = on;
+	i2c_transfer(&dev->i2c_adap, &msg, 1);
 
 	pinnacle_antenna_pwr(dev, antenna_pwr);
 
diff -r 36822fdac27e linux/drivers/media/video/tuner-core.c
--- a/linux/drivers/media/video/tuner-core.c	Wed Feb 15 15:47:26 2006
+++ b/linux/drivers/media/video/tuner-core.c	Thu Feb 16 19:54:58 2006
@@ -770,8 +770,9 @@
 			struct v4l2_frequency *f = arg;
 
 			switch_v4l2();
-			if (V4L2_TUNER_RADIO == f->type &&
-			    V4L2_TUNER_RADIO != t->mode) {
+			if ((V4L2_TUNER_RADIO == f->type && V4L2_TUNER_RADIO != t->mode)
+				|| (V4L2_TUNER_DIGITAL_TV == f->type 
+					&& V4L2_TUNER_DIGITAL_TV != t->mode)) {
 				if (set_mode (client, t, f->type, "VIDIOC_S_FREQUENCY")
 					    == EINVAL)
 					return 0;
_______________________________________________

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