[PATCH] Add support for Avermedia 777 remote (saa7134-input)

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

 



Som discusion of the patch was made at:

https://www.redhat.com/mailman/private/video4linux-list/2006-May/msg00103.html

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	Thu May 11 12:33:43 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	Thu May 11 12:33:43 2006 +0200
@@ -56,9 +56,9 @@ static int build_key(struct saa7134_dev 
 
 	gpio = saa_readl(SAA7134_GPIO_GPSTATUS0 >> 2);
 	if (ir->polling) {
-		if (ir->last_gpio == gpio)
+		if (ir->last_gpio == (gpio & (ir->mask_keycode | ir->mask_keydown | ir->mask_keyup)))
 			return 0;
-		ir->last_gpio = gpio;
+		ir->last_gpio = gpio & (ir->mask_keycode | ir->mask_keydown | ir->mask_keyup);
 	}
 
 	data = ir_extract_bits(gpio, ir->mask_keycode);
@@ -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