diff options
author | Pedro <roginovicci@nm.ru> | 2007-10-17 16:58:40 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-10-22 10:01:52 -0400 |
commit | 0938e3194ae53d0b22f4031cfe4738e62308c7ce (patch) | |
tree | d6fa765379437ebf9896701b30bc0cccf7f7b500 /drivers/media/video/saa7134/saa7134-input.c | |
parent | 11a5a10e0adec22e535dd1e76e5c8a1b265692f0 (diff) |
V4L/DVB (6379): patch which improves GotView Saa7135 remote control
improve GoTView PCI7135 remote control working under linux.
Acked-by: Hermann Pitton <hermann-pitton@arcor.de>
Acked-by: Nickolay V. Shmyrev <nshmyrev@yandex.ru>
Signed-off-by: Eugene M. Roginskii <roginovicci@nm.ru>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/saa7134/saa7134-input.c')
-rw-r--r-- | drivers/media/video/saa7134/saa7134-input.c | 25 |
1 files changed, 22 insertions, 3 deletions
diff --git a/drivers/media/video/saa7134/saa7134-input.c b/drivers/media/video/saa7134/saa7134-input.c index d4907ce4e51f..3abaa1b8ac9d 100644 --- a/drivers/media/video/saa7134/saa7134-input.c +++ b/drivers/media/video/saa7134/saa7134-input.c | |||
@@ -44,6 +44,14 @@ module_param(ir_rc5_remote_gap, int, 0644); | |||
44 | static int ir_rc5_key_timeout = 115; | 44 | static int ir_rc5_key_timeout = 115; |
45 | module_param(ir_rc5_key_timeout, int, 0644); | 45 | module_param(ir_rc5_key_timeout, int, 0644); |
46 | 46 | ||
47 | static int repeat_delay = 500; | ||
48 | module_param(repeat_delay, int, 0644); | ||
49 | MODULE_PARM_DESC(repeat_delay, "delay before key repeat started"); | ||
50 | static int repeat_period = 33; | ||
51 | module_param(repeat_period, int, 0644); | ||
52 | MODULE_PARM_DESC(repeat_period, "repeat period between" | ||
53 | "keypresses when key is down"); | ||
54 | |||
47 | #define dprintk(fmt, arg...) if (ir_debug) \ | 55 | #define dprintk(fmt, arg...) if (ir_debug) \ |
48 | printk(KERN_DEBUG "%s/ir: " fmt, dev->name , ## arg) | 56 | printk(KERN_DEBUG "%s/ir: " fmt, dev->name , ## arg) |
49 | #define i2cdprintk(fmt, arg...) if (ir_debug) \ | 57 | #define i2cdprintk(fmt, arg...) if (ir_debug) \ |
@@ -59,6 +67,13 @@ static int build_key(struct saa7134_dev *dev) | |||
59 | struct card_ir *ir = dev->remote; | 67 | struct card_ir *ir = dev->remote; |
60 | u32 gpio, data; | 68 | u32 gpio, data; |
61 | 69 | ||
70 | /* here comes the additional handshake steps for some cards */ | ||
71 | switch (dev->board) { | ||
72 | case SAA7134_BOARD_GOTVIEW_7135: | ||
73 | saa_setb(SAA7134_GPIO_GPSTATUS1, 0x80); | ||
74 | saa_clearb(SAA7134_GPIO_GPSTATUS1, 0x80); | ||
75 | break; | ||
76 | } | ||
62 | /* rising SAA7134_GPIO_GPRESCAN reads the status */ | 77 | /* rising SAA7134_GPIO_GPRESCAN reads the status */ |
63 | saa_clearb(SAA7134_GPIO_GPMODE3,SAA7134_GPIO_GPRESCAN); | 78 | saa_clearb(SAA7134_GPIO_GPMODE3,SAA7134_GPIO_GPRESCAN); |
64 | saa_setb(SAA7134_GPIO_GPMODE3,SAA7134_GPIO_GPRESCAN); | 79 | saa_setb(SAA7134_GPIO_GPMODE3,SAA7134_GPIO_GPRESCAN); |
@@ -285,10 +300,10 @@ int saa7134_input_init1(struct saa7134_dev *dev) | |||
285 | break; | 300 | break; |
286 | case SAA7134_BOARD_GOTVIEW_7135: | 301 | case SAA7134_BOARD_GOTVIEW_7135: |
287 | ir_codes = ir_codes_gotview7135; | 302 | ir_codes = ir_codes_gotview7135; |
288 | mask_keycode = 0x0003EC; | 303 | mask_keycode = 0x0003CC; |
289 | mask_keyup = 0x008000; | ||
290 | mask_keydown = 0x000010; | 304 | mask_keydown = 0x000010; |
291 | polling = 50; // ms | 305 | polling = 5; /* ms */ |
306 | saa_setb(SAA7134_GPIO_GPMODE1, 0x80); | ||
292 | break; | 307 | break; |
293 | case SAA7134_BOARD_VIDEOMATE_TV_PVR: | 308 | case SAA7134_BOARD_VIDEOMATE_TV_PVR: |
294 | case SAA7134_BOARD_VIDEOMATE_GOLD_PLUS: | 309 | case SAA7134_BOARD_VIDEOMATE_GOLD_PLUS: |
@@ -386,6 +401,10 @@ int saa7134_input_init1(struct saa7134_dev *dev) | |||
386 | if (err) | 401 | if (err) |
387 | goto err_out_stop; | 402 | goto err_out_stop; |
388 | 403 | ||
404 | /* the remote isn't as bouncy as a keyboard */ | ||
405 | ir->dev->rep[REP_DELAY] = repeat_delay; | ||
406 | ir->dev->rep[REP_PERIOD] = repeat_period; | ||
407 | |||
389 | return 0; | 408 | return 0; |
390 | 409 | ||
391 | err_out_stop: | 410 | err_out_stop: |