aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/saa7134/saa7134-input.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/saa7134/saa7134-input.c')
-rw-r--r--drivers/media/video/saa7134/saa7134-input.c100
1 files changed, 50 insertions, 50 deletions
diff --git a/drivers/media/video/saa7134/saa7134-input.c b/drivers/media/video/saa7134/saa7134-input.c
index 9dc41c1427a8..7ce0459989b5 100644
--- a/drivers/media/video/saa7134/saa7134-input.c
+++ b/drivers/media/video/saa7134/saa7134-input.c
@@ -114,24 +114,24 @@ static IR_KEYTAB_TYPE cinergy_codes[IR_KEYTAB_SIZE] = {
114/* Alfons Geser <a.geser@cox.net> 114/* Alfons Geser <a.geser@cox.net>
115 * updates from Job D. R. Borges <jobdrb@ig.com.br> */ 115 * updates from Job D. R. Borges <jobdrb@ig.com.br> */
116static IR_KEYTAB_TYPE eztv_codes[IR_KEYTAB_SIZE] = { 116static IR_KEYTAB_TYPE eztv_codes[IR_KEYTAB_SIZE] = {
117 [ 18 ] = KEY_POWER, 117 [ 18 ] = KEY_POWER,
118 [ 1 ] = KEY_TV, // DVR 118 [ 1 ] = KEY_TV, // DVR
119 [ 21 ] = KEY_DVD, // DVD 119 [ 21 ] = KEY_DVD, // DVD
120 [ 23 ] = KEY_AUDIO, // music 120 [ 23 ] = KEY_AUDIO, // music
121 // DVR mode / DVD mode / music mode 121 // DVR mode / DVD mode / music mode
122 122
123 [ 27 ] = KEY_MUTE, // mute 123 [ 27 ] = KEY_MUTE, // mute
124 [ 2 ] = KEY_LANGUAGE, // MTS/SAP / audio / autoseek 124 [ 2 ] = KEY_LANGUAGE, // MTS/SAP / audio / autoseek
125 [ 30 ] = KEY_SUBTITLE, // closed captioning / subtitle / seek 125 [ 30 ] = KEY_SUBTITLE, // closed captioning / subtitle / seek
126 [ 22 ] = KEY_ZOOM, // full screen 126 [ 22 ] = KEY_ZOOM, // full screen
127 [ 28 ] = KEY_VIDEO, // video source / eject / delall 127 [ 28 ] = KEY_VIDEO, // video source / eject / delall
128 [ 29 ] = KEY_RESTART, // playback / angle / del 128 [ 29 ] = KEY_RESTART, // playback / angle / del
129 [ 47 ] = KEY_SEARCH, // scan / menu / playlist 129 [ 47 ] = KEY_SEARCH, // scan / menu / playlist
130 [ 48 ] = KEY_CHANNEL, // CH surfing / bookmark / memo 130 [ 48 ] = KEY_CHANNEL, // CH surfing / bookmark / memo
131 131
132 [ 49 ] = KEY_HELP, // help 132 [ 49 ] = KEY_HELP, // help
133 [ 50 ] = KEY_MODE, // num/memo 133 [ 50 ] = KEY_MODE, // num/memo
134 [ 51 ] = KEY_ESC, // cancel 134 [ 51 ] = KEY_ESC, // cancel
135 135
136 [ 12 ] = KEY_UP, // up 136 [ 12 ] = KEY_UP, // up
137 [ 16 ] = KEY_DOWN, // down 137 [ 16 ] = KEY_DOWN, // down
@@ -148,24 +148,24 @@ static IR_KEYTAB_TYPE eztv_codes[IR_KEYTAB_SIZE] = {
148 [ 45 ] = KEY_PLAY, // play 148 [ 45 ] = KEY_PLAY, // play
149 [ 46 ] = KEY_SHUFFLE, // snapshot / shuffle 149 [ 46 ] = KEY_SHUFFLE, // snapshot / shuffle
150 150
151 [ 0 ] = KEY_KP0, 151 [ 0 ] = KEY_KP0,
152 [ 5 ] = KEY_KP1, 152 [ 5 ] = KEY_KP1,
153 [ 6 ] = KEY_KP2, 153 [ 6 ] = KEY_KP2,
154 [ 7 ] = KEY_KP3, 154 [ 7 ] = KEY_KP3,
155 [ 9 ] = KEY_KP4, 155 [ 9 ] = KEY_KP4,
156 [ 10 ] = KEY_KP5, 156 [ 10 ] = KEY_KP5,
157 [ 11 ] = KEY_KP6, 157 [ 11 ] = KEY_KP6,
158 [ 13 ] = KEY_KP7, 158 [ 13 ] = KEY_KP7,
159 [ 14 ] = KEY_KP8, 159 [ 14 ] = KEY_KP8,
160 [ 15 ] = KEY_KP9, 160 [ 15 ] = KEY_KP9,
161 161
162 [ 42 ] = KEY_VOLUMEUP, 162 [ 42 ] = KEY_VOLUMEUP,
163 [ 17 ] = KEY_VOLUMEDOWN, 163 [ 17 ] = KEY_VOLUMEDOWN,
164 [ 24 ] = KEY_CHANNELUP, // CH.tracking up 164 [ 24 ] = KEY_CHANNELUP, // CH.tracking up
165 [ 25 ] = KEY_CHANNELDOWN, // CH.tracking down 165 [ 25 ] = KEY_CHANNELDOWN, // CH.tracking down
166 166
167 [ 19 ] = KEY_KPENTER, // enter 167 [ 19 ] = KEY_KPENTER, // enter
168 [ 33 ] = KEY_KPDOT, // . (decimal dot) 168 [ 33 ] = KEY_KPDOT, // . (decimal dot)
169}; 169};
170 170
171static IR_KEYTAB_TYPE avacssmart_codes[IR_KEYTAB_SIZE] = { 171static IR_KEYTAB_TYPE avacssmart_codes[IR_KEYTAB_SIZE] = {
@@ -455,13 +455,13 @@ static int build_key(struct saa7134_dev *dev)
455 saa_setb(SAA7134_GPIO_GPMODE3,SAA7134_GPIO_GPRESCAN); 455 saa_setb(SAA7134_GPIO_GPMODE3,SAA7134_GPIO_GPRESCAN);
456 456
457 gpio = saa_readl(SAA7134_GPIO_GPSTATUS0 >> 2); 457 gpio = saa_readl(SAA7134_GPIO_GPSTATUS0 >> 2);
458 if (ir->polling) { 458 if (ir->polling) {
459 if (ir->last_gpio == gpio) 459 if (ir->last_gpio == gpio)
460 return 0; 460 return 0;
461 ir->last_gpio = gpio; 461 ir->last_gpio = gpio;
462 } 462 }
463 463
464 data = ir_extract_bits(gpio, ir->mask_keycode); 464 data = ir_extract_bits(gpio, ir->mask_keycode);
465 dprintk("build_key gpio=0x%x mask=0x%x data=%d\n", 465 dprintk("build_key gpio=0x%x mask=0x%x data=%d\n",
466 gpio, ir->mask_keycode, data); 466 gpio, ir->mask_keycode, data);
467 467
@@ -478,9 +478,9 @@ static int build_key(struct saa7134_dev *dev)
478 478
479void saa7134_input_irq(struct saa7134_dev *dev) 479void saa7134_input_irq(struct saa7134_dev *dev)
480{ 480{
481 struct saa7134_ir *ir = dev->remote; 481 struct saa7134_ir *ir = dev->remote;
482 482
483 if (!ir->polling) 483 if (!ir->polling)
484 build_key(dev); 484 build_key(dev);
485} 485}
486 486
@@ -515,7 +515,7 @@ int saa7134_input_init1(struct saa7134_dev *dev)
515 switch (dev->board) { 515 switch (dev->board) {
516 case SAA7134_BOARD_FLYVIDEO2000: 516 case SAA7134_BOARD_FLYVIDEO2000:
517 case SAA7134_BOARD_FLYVIDEO3000: 517 case SAA7134_BOARD_FLYVIDEO3000:
518 case SAA7134_BOARD_FLYTVPLATINUM_FM: 518 case SAA7134_BOARD_FLYTVPLATINUM_FM:
519 case SAA7134_BOARD_FLYTVPLATINUM_MINI2: 519 case SAA7134_BOARD_FLYTVPLATINUM_MINI2:
520 ir_codes = flyvideo_codes; 520 ir_codes = flyvideo_codes;
521 mask_keycode = 0xEC00000; 521 mask_keycode = 0xEC00000;
@@ -557,7 +557,7 @@ int saa7134_input_init1(struct saa7134_dev *dev)
557 saa_setb(SAA7134_GPIO_GPMODE0, 0x4); 557 saa_setb(SAA7134_GPIO_GPMODE0, 0x4);
558 saa_setb(SAA7134_GPIO_GPSTATUS0, 0x4); 558 saa_setb(SAA7134_GPIO_GPSTATUS0, 0x4);
559 break; 559 break;
560 case SAA7134_BOARD_KWORLD_TERMINATOR: 560 case SAA7134_BOARD_KWORLD_TERMINATOR:
561 ir_codes = avacssmart_codes; 561 ir_codes = avacssmart_codes;
562 mask_keycode = 0x00001f; 562 mask_keycode = 0x00001f;
563 mask_keyup = 0x000060; 563 mask_keyup = 0x000060;
@@ -571,7 +571,7 @@ int saa7134_input_init1(struct saa7134_dev *dev)
571 mask_keyup = 0x004000; 571 mask_keyup = 0x004000;
572 polling = 50; // ms 572 polling = 50; // ms
573 break; 573 break;
574 case SAA7134_BOARD_GOTVIEW_7135: 574 case SAA7134_BOARD_GOTVIEW_7135:
575 ir_codes = gotview7135_codes; 575 ir_codes = gotview7135_codes;
576 mask_keycode = 0x0003EC; 576 mask_keycode = 0x0003EC;
577 mask_keyup = 0x008000; 577 mask_keyup = 0x008000;
@@ -585,8 +585,8 @@ int saa7134_input_init1(struct saa7134_dev *dev)
585 mask_keyup = 0x400000; 585 mask_keyup = 0x400000;
586 polling = 50; // ms 586 polling = 50; // ms
587 break; 587 break;
588 case SAA7134_BOARD_VIDEOMATE_DVBT_300: 588 case SAA7134_BOARD_VIDEOMATE_DVBT_300:
589 case SAA7134_BOARD_VIDEOMATE_DVBT_200: 589 case SAA7134_BOARD_VIDEOMATE_DVBT_200:
590 ir_codes = videomate_tv_pvr_codes; 590 ir_codes = videomate_tv_pvr_codes;
591 mask_keycode = 0x003F00; 591 mask_keycode = 0x003F00;
592 mask_keyup = 0x040000; 592 mask_keyup = 0x040000;
@@ -610,7 +610,7 @@ int saa7134_input_init1(struct saa7134_dev *dev)
610 ir->mask_keycode = mask_keycode; 610 ir->mask_keycode = mask_keycode;
611 ir->mask_keydown = mask_keydown; 611 ir->mask_keydown = mask_keydown;
612 ir->mask_keyup = mask_keyup; 612 ir->mask_keyup = mask_keyup;
613 ir->polling = polling; 613 ir->polling = polling;
614 614
615 /* init input device */ 615 /* init input device */
616 snprintf(ir->name, sizeof(ir->name), "saa7134 IR (%s)", 616 snprintf(ir->name, sizeof(ir->name), "saa7134 IR (%s)",