diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-22 22:20:22 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-22 22:20:22 -0400 |
commit | ad792f4f46e12bae58298fc64f5139b99664a773 (patch) | |
tree | 3d20c3a0840b00deb95fe62fdff1bc6e59eb37fe /drivers/media/video/saa7134/saa7134-input.c | |
parent | 3650b0a304663d98a63c68f9020eb1ded477989e (diff) | |
parent | f40aa808bad19a079a0e122e326d6970df141afb (diff) |
Merge branch 'master' of ssh://master.kernel.org/pub/scm/linux/kernel/git/mchehab/v4l-dvb
* 'master' of ssh://master.kernel.org/pub/scm/linux/kernel/git/mchehab/v4l-dvb: (37 commits)
V4L/DVB (6382): saa7134: fix NULL dereference at suspend time for cards without IR receiver
V4L/DVB (6380): ivtvfb: Removal of the 'osd_compat' module option
V4L/DVB (6379): patch which improves GotView Saa7135 remote control
V4L/DVB (6378b): Updates info about the removal of V4L1 at feature-removal-schedule.txt
V4L/DVB (6378a): Removal of VIDIOC_[G|S]_MPEGCOMP from feature-removal-schedule.txt
V4L/DVB (6378): DiB0700-device: Using 1.10 firmware
V4L/DVB (6357): pvrusb2: Improve encoder chip health tracking
V4L/DVB (6356): "while (!ca->wakeup)" breaks the CAM initialisation
V4L/DVB (6352): ir-kbd-i2c: Missing break statement
V4L/DVB (6350): V4L: possible leak in em28xx_init_isoc
V4L/DVB (6348): ivtv: undo video mute when closing the radio
V4L/DVB (6347): ivtv: fix video mute when radio is used
V4L/DVB (6346): ivtvfb: YUV output size fix when ivtvfb is not loaded
V4L/DVB (6345): ivtvfb: YUV handling of an image which is not visible in the display area
V4L/DVB (6343): ivtvfb: check return value of unregister_framebuffer
V4L/DVB (6342): ivtv: fix circular locking (bug 9037)
V4L/DVB (6341): ivtv: fix resizing MPEG1 streams
V4L/DVB (6340): ivtvfb: screen mode change sometimes goes wrong
V4L/DVB (6339): ivtv: set the video color to black instead of green when capturing from the radio
V4L/DVB (6338): ivtv: fix incorrect EBUSY return
...
Diffstat (limited to 'drivers/media/video/saa7134/saa7134-input.c')
-rw-r--r-- | drivers/media/video/saa7134/saa7134-input.c | 29 |
1 files changed, 24 insertions, 5 deletions
diff --git a/drivers/media/video/saa7134/saa7134-input.c b/drivers/media/video/saa7134/saa7134-input.c index 80d2644f765a..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); |
@@ -159,7 +174,7 @@ static void saa7134_input_timer(unsigned long data) | |||
159 | mod_timer(&ir->timer, jiffies + msecs_to_jiffies(ir->polling)); | 174 | mod_timer(&ir->timer, jiffies + msecs_to_jiffies(ir->polling)); |
160 | } | 175 | } |
161 | 176 | ||
162 | static void saa7134_ir_start(struct saa7134_dev *dev, struct card_ir *ir) | 177 | void saa7134_ir_start(struct saa7134_dev *dev, struct card_ir *ir) |
163 | { | 178 | { |
164 | if (ir->polling) { | 179 | if (ir->polling) { |
165 | setup_timer(&ir->timer, saa7134_input_timer, | 180 | setup_timer(&ir->timer, saa7134_input_timer, |
@@ -182,7 +197,7 @@ static void saa7134_ir_start(struct saa7134_dev *dev, struct card_ir *ir) | |||
182 | } | 197 | } |
183 | } | 198 | } |
184 | 199 | ||
185 | static void saa7134_ir_stop(struct saa7134_dev *dev) | 200 | void saa7134_ir_stop(struct saa7134_dev *dev) |
186 | { | 201 | { |
187 | if (dev->remote->polling) | 202 | if (dev->remote->polling) |
188 | del_timer_sync(&dev->remote->timer); | 203 | del_timer_sync(&dev->remote->timer); |
@@ -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: |