[PATCH] Fix Pinnacle PCTV HD 800i tuner reset callback

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

 



Hi, Steve,

The tuner callback function for Pinnacle PCTV HD 800i was not done
correctly, which is *probably* the reason that once the xc5000 is
shutdown, it cannot be reinitiated without a module reload. It is NOT
done via GPIO pin #2, instead, it uses the SYS_RSTO_pin of the cx2388x.
I tested this with analog TV and it behaves correctly, i.e., if I enable
the shutdown in xc5000_shutdown(), I can get the tuner back alive now in
analog mode, and things work as expected.

However, I am not sure if the digital part is working perfectly yet with
the shutdown enabled, last time I tested (with the new tuner callback),
the xc5000 can be brought back to life by the reset (or at least it
appears so), but I could not get a lock any more when that happens. So
please leave the xc5000_shutdown disabled for now. That is more likely
an issue with the xc5000 driver, not the callback function.

Also, the init process (loading fw and so on) for the xc5000 takes quite
a while. I am not sure if we should enable the shutdown function even if
everything works correctly in both analog and digital mode, because that
would introduce unreasonably long delay (at least to me) *every time*
the user start a tv program like tvtime. But that is something to worry
about at a later time, I guess.

Best,

Chaogui Zhang

-----------------------------------

Signed-off-by: Chaogui Zhang <czhang1974@xxxxxxxxx>

diff -r b4a1b3409bc8 linux/drivers/media/video/cx88/cx88-cards.c
--- a/linux/drivers/media/video/cx88/cx88-cards.c	Mon Jan 14 22:33:37 2008 -0500
+++ b/linux/drivers/media/video/cx88/cx88-cards.c	Wed Jan 16 22:00:06 2008 -0500
@@ -1939,12 +1939,10 @@ int cx88_tuner_callback(void *priv, int 
 	switch(core->boardnr) {
 	case CX88_BOARD_PINNACLE_PCTV_HD_800i:
 		if(command == 0) { /* This is the reset command from xc5000 */
-			/* Reset XC5000 tuner via GPIO pin #2 */
-			cx_set(MO_GP0_IO, 0x00000400);
-			cx_clear(MO_GP0_IO, 0x00000004);
-			mdelay(200);
-			cx_set(MO_GP0_IO, 0x00000004);
-			mdelay(200);
+			/* Reset XC5000 tuner via SYS_RSTO_pin */
+			cx_write(MO_SRST_IO, 0);
+			msleep(10);
+			cx_write(MO_SRST_IO, 1);
 			return 0;
 		}
 		else {

_______________________________________________
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