El Jueves, 11 de Mayo de 2006 12:39, Jose Alberto Reguero escribió: > El Jueves, 11 de Mayo de 2006 11:56, Jose Alberto Reguero escribió: > > El Miércoles, 10 de Mayo de 2006 22:52, Peter Missel escribió: > > > On Wednesday 10 May 2006 20:58, Jose Alberto Reguero wrote: > > > > > 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. > > > > > > > > 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 > > > > > > That looks like your mask is including too many bits. Normally, five > > > data bits are enough for a typical 20- to 30-button remote. You got > > > eight bits there. > > > > > > regards, > > > Peter > > > > The mask_keycode is good. The gpio bits that change are not part of the > > mask. Data change because I have three cards([0], [1], [2]). In each card > > the data is the same. > > When the driver is loaded all works well. But when I start vdr (DVB-T) > > some gpio bits are changing. > > > > Thanks. > > Jose Alberto > > Here is another patch that solve the problem. > Thanks. > Jose Alberto Sorry, I forgot to cc to linux-dvb. 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