diff options
Diffstat (limited to 'drivers/media/video/cx88/cx88-input.c')
-rw-r--r-- | drivers/media/video/cx88/cx88-input.c | 96 |
1 files changed, 95 insertions, 1 deletions
diff --git a/drivers/media/video/cx88/cx88-input.c b/drivers/media/video/cx88/cx88-input.c index dc0dcf249aac..bdc26e75ab5f 100644 --- a/drivers/media/video/cx88/cx88-input.c +++ b/drivers/media/video/cx88/cx88-input.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * $Id: cx88-input.c,v 1.11 2005/05/22 20:57:56 nsh Exp $ | 2 | * $Id: cx88-input.c,v 1.13 2005/06/13 16:07:46 nsh Exp $ |
3 | * | 3 | * |
4 | * Device driver for GPIO attached remote control interfaces | 4 | * Device driver for GPIO attached remote control interfaces |
5 | * on Conexant 2388x based TV/DVB cards. | 5 | * on Conexant 2388x based TV/DVB cards. |
@@ -125,6 +125,86 @@ static IR_KEYTAB_TYPE ir_codes_iodata_bctv7e[IR_KEYTAB_SIZE] = { | |||
125 | 125 | ||
126 | /* ---------------------------------------------------------------------- */ | 126 | /* ---------------------------------------------------------------------- */ |
127 | 127 | ||
128 | /* ADS Tech Instant TV DVB-T PCI Remote */ | ||
129 | static IR_KEYTAB_TYPE ir_codes_adstech_dvb_t_pci[IR_KEYTAB_SIZE] = { | ||
130 | [ 0x5b ] = KEY_POWER, | ||
131 | [ 0x5f ] = KEY_MUTE, | ||
132 | [ 0x57 ] = KEY_1, | ||
133 | [ 0x4f ] = KEY_2, | ||
134 | [ 0x53 ] = KEY_3, | ||
135 | [ 0x56 ] = KEY_4, | ||
136 | [ 0x4e ] = KEY_5, | ||
137 | [ 0x5e ] = KEY_6, | ||
138 | [ 0x54 ] = KEY_7, | ||
139 | [ 0x4c ] = KEY_8, | ||
140 | [ 0x5c ] = KEY_9, | ||
141 | [ 0x4d ] = KEY_0, | ||
142 | [ 0x55 ] = KEY_GOTO, | ||
143 | [ 0x5d ] = KEY_SEARCH, | ||
144 | [ 0x17 ] = KEY_EPG, // Guide | ||
145 | [ 0x1f ] = KEY_MENU, | ||
146 | [ 0x0f ] = KEY_UP, | ||
147 | [ 0x46 ] = KEY_DOWN, | ||
148 | [ 0x16 ] = KEY_LEFT, | ||
149 | [ 0x1e ] = KEY_RIGHT, | ||
150 | [ 0x0e ] = KEY_SELECT, // Enter | ||
151 | [ 0x5a ] = KEY_INFO, | ||
152 | [ 0x52 ] = KEY_EXIT, | ||
153 | [ 0x59 ] = KEY_PREVIOUS, | ||
154 | [ 0x51 ] = KEY_NEXT, | ||
155 | [ 0x58 ] = KEY_REWIND, | ||
156 | [ 0x50 ] = KEY_FORWARD, | ||
157 | [ 0x44 ] = KEY_PLAYPAUSE, | ||
158 | [ 0x07 ] = KEY_STOP, | ||
159 | [ 0x1b ] = KEY_RECORD, | ||
160 | [ 0x13 ] = KEY_TUNER, // Live | ||
161 | [ 0x0a ] = KEY_A, | ||
162 | [ 0x12 ] = KEY_B, | ||
163 | [ 0x03 ] = KEY_PROG1, // 1 | ||
164 | [ 0x01 ] = KEY_PROG2, // 2 | ||
165 | [ 0x00 ] = KEY_PROG3, // 3 | ||
166 | [ 0x06 ] = KEY_DVD, | ||
167 | [ 0x48 ] = KEY_AUX, // Photo | ||
168 | [ 0x40 ] = KEY_VIDEO, | ||
169 | [ 0x19 ] = KEY_AUDIO, // Music | ||
170 | [ 0x0b ] = KEY_CHANNELUP, | ||
171 | [ 0x08 ] = KEY_CHANNELDOWN, | ||
172 | [ 0x15 ] = KEY_VOLUMEUP, | ||
173 | [ 0x1c ] = KEY_VOLUMEDOWN, | ||
174 | }; | ||
175 | |||
176 | /* ---------------------------------------------------------------------- */ | ||
177 | |||
178 | /* MSI TV@nywhere remote */ | ||
179 | static IR_KEYTAB_TYPE ir_codes_msi_tvanywhere[IR_KEYTAB_SIZE] = { | ||
180 | [ 0x00 ] = KEY_0, /* '0' */ | ||
181 | [ 0x01 ] = KEY_1, /* '1' */ | ||
182 | [ 0x02 ] = KEY_2, /* '2' */ | ||
183 | [ 0x03 ] = KEY_3, /* '3' */ | ||
184 | [ 0x04 ] = KEY_4, /* '4' */ | ||
185 | [ 0x05 ] = KEY_5, /* '5' */ | ||
186 | [ 0x06 ] = KEY_6, /* '6' */ | ||
187 | [ 0x07 ] = KEY_7, /* '7' */ | ||
188 | [ 0x08 ] = KEY_8, /* '8' */ | ||
189 | [ 0x09 ] = KEY_9, /* '9' */ | ||
190 | [ 0x0c ] = KEY_MUTE, /* 'Mute' */ | ||
191 | [ 0x0f ] = KEY_SCREEN, /* 'Full Screen' */ | ||
192 | [ 0x10 ] = KEY_F, /* 'Funtion' */ | ||
193 | [ 0x11 ] = KEY_T, /* 'Time shift' */ | ||
194 | [ 0x12 ] = KEY_POWER, /* 'Power' */ | ||
195 | [ 0x13 ] = KEY_MEDIA, /* 'MTS' */ | ||
196 | [ 0x14 ] = KEY_SLOW, /* 'Slow' */ | ||
197 | [ 0x16 ] = KEY_REWIND, /* 'backward <<' */ | ||
198 | [ 0x17 ] = KEY_ENTER, /* 'Return' */ | ||
199 | [ 0x18 ] = KEY_FASTFORWARD, /* 'forward >>' */ | ||
200 | [ 0x1a ] = KEY_CHANNELUP, /* 'Channel+' */ | ||
201 | [ 0x1b ] = KEY_VOLUMEUP, /* 'Volume+' */ | ||
202 | [ 0x1e ] = KEY_CHANNELDOWN, /* 'Channel-' */ | ||
203 | [ 0x1f ] = KEY_VOLUMEDOWN, /* 'Volume-' */ | ||
204 | }; | ||
205 | |||
206 | /* ---------------------------------------------------------------------- */ | ||
207 | |||
128 | struct cx88_IR { | 208 | struct cx88_IR { |
129 | struct cx88_core *core; | 209 | struct cx88_core *core; |
130 | struct input_dev input; | 210 | struct input_dev input; |
@@ -269,6 +349,20 @@ int cx88_ir_init(struct cx88_core *core, struct pci_dev *pci) | |||
269 | ir->mask_keyup = 0x80; | 349 | ir->mask_keyup = 0x80; |
270 | ir->polling = 1; // ms | 350 | ir->polling = 1; // ms |
271 | break; | 351 | break; |
352 | case CX88_BOARD_ADSTECH_DVB_T_PCI: | ||
353 | ir_codes = ir_codes_adstech_dvb_t_pci; | ||
354 | ir->gpio_addr = MO_GP1_IO; | ||
355 | ir->mask_keycode = 0xbf; | ||
356 | ir->mask_keyup = 0x40; | ||
357 | ir->polling = 50; // ms | ||
358 | break; | ||
359 | case CX88_BOARD_MSI_TVANYWHERE_MASTER: | ||
360 | ir_codes = ir_codes_msi_tvanywhere; | ||
361 | ir->gpio_addr = MO_GP1_IO; | ||
362 | ir->mask_keycode = 0x1f; | ||
363 | ir->mask_keyup = 0x40; | ||
364 | ir->polling = 1; | ||
365 | break; | ||
272 | } | 366 | } |
273 | 367 | ||
274 | if (NULL == ir_codes) { | 368 | if (NULL == ir_codes) { |