Re: Problem with Avermedia 777 remote (saa7134-input.c)

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

 



El Sábado, 6 de Mayo de 2006 12:52, Peter Missel escribió:
> On Saturday 06 May 2006 12:35, Jose Alberto Reguero wrote:
> > I found the mask_keycode: 0x02F200
> > Not mask_keydown bit.
> > Not mask_keydown bit.
> > When the card is working some bits of the read gpio  are changing.
> >
> > In line 58 of saa7134-input.c:
> >
> > gpio = saa_readl(SAA7134_GPIO_GPSTATUS0 >> 2);
> >
> > always return the last key pressed.
> >
> > There is a way to clear the last key pressed from gpio?
> > How I can know if a key is pressed?
>
> You need to find out how the card is flagging "key down". Or maybe the card
> needs you to operate an output GPIO pin to acknowledge the read.
>
> This is all card specific, so you either need to spy on how the Windows
> driver does it, or reverse engineer the hardware.
>
> regards,
> Peter

Thanks, I found it. The attached patch work.
There is still a problem. When the card is working the gpio is changing 
constantly, and generate a lot of debug output.

saa7134[0]/ir: build_key gpio=0x1c14f mask=0x2f200 data=24
saa7134[1]/ir: build_key gpio=0x3b3c5 mask=0x2f200 data=55
saa7134[2]/ir: build_key gpio=0x13f326 mask=0x2f200 data=63
saa7134[0]/ir: build_key gpio=0x1c1d8 mask=0x2f200 data=24
saa7134[1]/ir: build_key gpio=0x13b34f mask=0x2f200 data=55
saa7134[2]/ir: build_key gpio=0x3f3ff mask=0x2f200 data=63
saa7134[0]/ir: build_key gpio=0x11c120 mask=0x2f200 data=24
saa7134[1]/ir: build_key gpio=0x3b33d mask=0x2f200 data=55
saa7134[2]/ir: build_key gpio=0x13f3e6 mask=0x2f200 data=63
saa7134[0]/ir: build_key gpio=0x11c1d8 mask=0x2f200 data=24
saa7134[1]/ir: build_key gpio=0x13b302 mask=0x2f200 data=55
saa7134[2]/ir: build_key gpio=0x3f350 mask=0x2f200 data=63
saa7134[0]/ir: build_key gpio=0x1c15b mask=0x2f200 data=24
saa7134[1]/ir: build_key gpio=0x3b3b7 mask=0x2f200 data=55
saa7134[2]/ir: build_key gpio=0x13f3cc mask=0x2f200 data=63
...........................................

Signed-off-by: Jose Alberto Reguero <jareguero@xxxxxxxxxxxxxx>

Thanks
Jose Alberto



diff -r 38162695285b linux/drivers/media/video/saa7134/saa7134-cards.c
--- a/linux/drivers/media/video/saa7134/saa7134-cards.c	Tue May 09 10:15:42 2006 -0300
+++ b/linux/drivers/media/video/saa7134/saa7134-cards.c	Wed May 10 20:39:46 2006 +0200
@@ -3554,6 +3554,7 @@ int saa7134_board_init1(struct saa7134_d
 	case SAA7134_BOARD_AVERMEDIA_STUDIO_307:
 	case SAA7134_BOARD_AVERMEDIA_307:
 	case SAA7134_BOARD_AVERMEDIA_GO_007_FM:
+	case SAA7134_BOARD_AVERMEDIA_777:
 /*      case SAA7134_BOARD_SABRENT_SBTTVFM:  */ /* not finished yet */
 	case SAA7134_BOARD_VIDEOMATE_TV_PVR:
 	case SAA7134_BOARD_VIDEOMATE_GOLD_PLUS:
diff -r 38162695285b linux/drivers/media/video/saa7134/saa7134-input.c
--- a/linux/drivers/media/video/saa7134/saa7134-input.c	Tue May 09 10:15:42 2006 -0300
+++ b/linux/drivers/media/video/saa7134/saa7134-input.c	Wed May 10 20:39:46 2006 +0200
@@ -189,6 +189,14 @@ int saa7134_input_init1(struct saa7134_d
 		/* Set GPIO pin2 to high to enable the IR controller */
 		saa_setb(SAA7134_GPIO_GPMODE0, 0x4);
 		saa_setb(SAA7134_GPIO_GPSTATUS0, 0x4);
+		break;
+	case SAA7134_BOARD_AVERMEDIA_777:
+		ir_codes     = ir_codes_avermedia;
+		mask_keycode = 0x02F200;
+		mask_keydown = 0x000400;
+		polling      = 50; // ms
+		saa_setl(SAA7134_GPIO_GPMODE0 >> 2, 0x100);
+		saa_setl(SAA7134_GPIO_GPSTATUS0 >> 2, 0x100);
 		break;
 	case SAA7134_BOARD_KWORLD_TERMINATOR:
 		ir_codes     = ir_codes_pixelview;
_______________________________________________

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