aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/common/ir-keymaps.c70
-rw-r--r--drivers/media/video/saa7134/saa7134-input.c25
2 files changed, 57 insertions, 38 deletions
diff --git a/drivers/media/common/ir-keymaps.c b/drivers/media/common/ir-keymaps.c
index aefcf28da1ca..185e8a860c1a 100644
--- a/drivers/media/common/ir-keymaps.c
+++ b/drivers/media/common/ir-keymaps.c
@@ -1074,41 +1074,41 @@ EXPORT_SYMBOL_GPL(ir_codes_manli);
1074/* Mike Baikov <mike@baikov.com> */ 1074/* Mike Baikov <mike@baikov.com> */
1075IR_KEYTAB_TYPE ir_codes_gotview7135[IR_KEYTAB_SIZE] = { 1075IR_KEYTAB_TYPE ir_codes_gotview7135[IR_KEYTAB_SIZE] = {
1076 1076
1077 [ 0x21 ] = KEY_POWER, 1077 [ 0x11 ] = KEY_POWER,
1078 [ 0x69 ] = KEY_TV, 1078 [ 0x35 ] = KEY_TV,
1079 [ 0x33 ] = KEY_0, 1079 [ 0x1b ] = KEY_0,
1080 [ 0x51 ] = KEY_1, 1080 [ 0x29 ] = KEY_1,
1081 [ 0x31 ] = KEY_2, 1081 [ 0x19 ] = KEY_2,
1082 [ 0x71 ] = KEY_3, 1082 [ 0x39 ] = KEY_3,
1083 [ 0x3b ] = KEY_4, 1083 [ 0x1f ] = KEY_4,
1084 [ 0x58 ] = KEY_5, 1084 [ 0x2c ] = KEY_5,
1085 [ 0x41 ] = KEY_6, 1085 [ 0x21 ] = KEY_6,
1086 [ 0x48 ] = KEY_7, 1086 [ 0x24 ] = KEY_7,
1087 [ 0x30 ] = KEY_8, 1087 [ 0x18 ] = KEY_8,
1088 [ 0x53 ] = KEY_9, 1088 [ 0x2b ] = KEY_9,
1089 [ 0x73 ] = KEY_AGAIN, /* LOOP */ 1089 [ 0x3b ] = KEY_AGAIN, /* LOOP */
1090 [ 0x0a ] = KEY_AUDIO, 1090 [ 0x06 ] = KEY_AUDIO,
1091 [ 0x61 ] = KEY_PRINT, /* PREVIEW */ 1091 [ 0x31 ] = KEY_PRINT, /* PREVIEW */
1092 [ 0x7a ] = KEY_VIDEO, 1092 [ 0x3e ] = KEY_VIDEO,
1093 [ 0x20 ] = KEY_CHANNELUP, 1093 [ 0x10 ] = KEY_CHANNELUP,
1094 [ 0x40 ] = KEY_CHANNELDOWN, 1094 [ 0x20 ] = KEY_CHANNELDOWN,
1095 [ 0x18 ] = KEY_VOLUMEDOWN, 1095 [ 0x0c ] = KEY_VOLUMEDOWN,
1096 [ 0x50 ] = KEY_VOLUMEUP, 1096 [ 0x28 ] = KEY_VOLUMEUP,
1097 [ 0x10 ] = KEY_MUTE, 1097 [ 0x08 ] = KEY_MUTE,
1098 [ 0x4a ] = KEY_SEARCH, 1098 [ 0x26 ] = KEY_SEARCH, /*SCAN*/
1099 [ 0x7b ] = KEY_SHUFFLE, /* SNAPSHOT */ 1099 [ 0x3f ] = KEY_SHUFFLE, /* SNAPSHOT */
1100 [ 0x22 ] = KEY_RECORD, 1100 [ 0x12 ] = KEY_RECORD,
1101 [ 0x62 ] = KEY_STOP, 1101 [ 0x32 ] = KEY_STOP,
1102 [ 0x78 ] = KEY_PLAY, 1102 [ 0x3c ] = KEY_PLAY,
1103 [ 0x39 ] = KEY_REWIND, 1103 [ 0x1d ] = KEY_REWIND,
1104 [ 0x59 ] = KEY_PAUSE, 1104 [ 0x2d ] = KEY_PAUSE,
1105 [ 0x19 ] = KEY_FORWARD, 1105 [ 0x0d ] = KEY_FORWARD,
1106 [ 0x09 ] = KEY_ZOOM, 1106 [ 0x05 ] = KEY_ZOOM, /*FULL*/
1107 1107
1108 [ 0x52 ] = KEY_F21, /* LIVE TIMESHIFT */ 1108 [ 0x2a ] = KEY_F21, /* LIVE TIMESHIFT */
1109 [ 0x1a ] = KEY_F22, /* MIN TIMESHIFT */ 1109 [ 0x0e ] = KEY_F22, /* MIN TIMESHIFT */
1110 [ 0x3a ] = KEY_F23, /* TIMESHIFT */ 1110 [ 0x1e ] = KEY_F23, /* TIMESHIFT */
1111 [ 0x70 ] = KEY_F24, /* NORMAL TIMESHIFT */ 1111 [ 0x38 ] = KEY_F24, /* NORMAL TIMESHIFT */
1112}; 1112};
1113 1113
1114EXPORT_SYMBOL_GPL(ir_codes_gotview7135); 1114EXPORT_SYMBOL_GPL(ir_codes_gotview7135);
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);
44static int ir_rc5_key_timeout = 115; 44static int ir_rc5_key_timeout = 115;
45module_param(ir_rc5_key_timeout, int, 0644); 45module_param(ir_rc5_key_timeout, int, 0644);
46 46
47static int repeat_delay = 500;
48module_param(repeat_delay, int, 0644);
49MODULE_PARM_DESC(repeat_delay, "delay before key repeat started");
50static int repeat_period = 33;
51module_param(repeat_period, int, 0644);
52MODULE_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: