diff options
Diffstat (limited to 'drivers/media/video/ir-kbd-gpio.c')
-rw-r--r-- | drivers/media/video/ir-kbd-gpio.c | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/drivers/media/video/ir-kbd-gpio.c b/drivers/media/video/ir-kbd-gpio.c index 234151e48edc..1861d31f11b8 100644 --- a/drivers/media/video/ir-kbd-gpio.c +++ b/drivers/media/video/ir-kbd-gpio.c | |||
@@ -156,6 +156,71 @@ static IR_KEYTAB_TYPE ir_codes_apac_viewcomp[IR_KEYTAB_SIZE] = { | |||
156 | 156 | ||
157 | /* ---------------------------------------------------------------------- */ | 157 | /* ---------------------------------------------------------------------- */ |
158 | 158 | ||
159 | /* Ricardo Cerqueira <v4l@cerqueira.org> */ | ||
160 | /* Weird matching, since the remote has "uncommon" keys */ | ||
161 | |||
162 | static IR_KEYTAB_TYPE ir_codes_conceptronic[IR_KEYTAB_SIZE] = { | ||
163 | |||
164 | [ 30 ] = KEY_POWER, // power | ||
165 | [ 7 ] = KEY_SWITCHVIDEOMODE, // source | ||
166 | [ 28 ] = KEY_SEARCH, // scan | ||
167 | |||
168 | /* FIXME: duplicate keycodes? | ||
169 | * | ||
170 | * These four keys seem to share the same GPIO as CH+, CH-, <<< and >>> | ||
171 | * The GPIO values are | ||
172 | * 6397fb for both "Scan <" and "CH -", | ||
173 | * 639ffb for "Scan >" and "CH+", | ||
174 | * 6384fb for "Tune <" and "<<<", | ||
175 | * 638cfb for "Tune >" and ">>>", regardless of the mask. | ||
176 | * | ||
177 | * [ 23 ] = KEY_BACK, // fm scan << | ||
178 | * [ 31 ] = KEY_FORWARD, // fm scan >> | ||
179 | * | ||
180 | * [ 4 ] = KEY_LEFT, // fm tuning < | ||
181 | * [ 12 ] = KEY_RIGHT, // fm tuning > | ||
182 | * | ||
183 | * For now, these four keys are disabled. Pressing them will generate | ||
184 | * the CH+/CH-/<<</>>> events | ||
185 | */ | ||
186 | |||
187 | [ 3 ] = KEY_TUNER, // TV/FM | ||
188 | |||
189 | [ 0 ] = KEY_RECORD, | ||
190 | [ 8 ] = KEY_STOP, | ||
191 | [ 17 ] = KEY_PLAY, | ||
192 | |||
193 | [ 26 ] = KEY_PLAYPAUSE, // freeze | ||
194 | [ 25 ] = KEY_ZOOM, // zoom | ||
195 | [ 15 ] = KEY_TEXT, // min | ||
196 | |||
197 | [ 1 ] = KEY_KP1, | ||
198 | [ 11 ] = KEY_KP2, | ||
199 | [ 27 ] = KEY_KP3, | ||
200 | [ 5 ] = KEY_KP4, | ||
201 | [ 9 ] = KEY_KP5, | ||
202 | [ 21 ] = KEY_KP6, | ||
203 | [ 6 ] = KEY_KP7, | ||
204 | [ 10 ] = KEY_KP8, | ||
205 | [ 18 ] = KEY_KP9, | ||
206 | [ 2 ] = KEY_KP0, | ||
207 | [ 16 ] = KEY_LAST, // +100 | ||
208 | [ 19 ] = KEY_LIST, // recall | ||
209 | |||
210 | [ 31 ] = KEY_CHANNELUP, // chn down | ||
211 | [ 23 ] = KEY_CHANNELDOWN, // chn up | ||
212 | [ 22 ] = KEY_VOLUMEUP, // vol down | ||
213 | [ 20 ] = KEY_VOLUMEDOWN, // vol up | ||
214 | |||
215 | [ 4 ] = KEY_KPMINUS, // <<< | ||
216 | [ 14 ] = KEY_SETUP, // function | ||
217 | [ 12 ] = KEY_KPPLUS, // >>> | ||
218 | |||
219 | [ 13 ] = KEY_GOTO, // mts | ||
220 | [ 29 ] = KEY_REFRESH, // reset | ||
221 | [ 24 ] = KEY_MUTE // mute/unmute | ||
222 | }; | ||
223 | |||
159 | struct IR { | 224 | struct IR { |
160 | struct bttv_sub_device *sub; | 225 | struct bttv_sub_device *sub; |
161 | struct input_dev *input; | 226 | struct input_dev *input; |
@@ -329,6 +394,12 @@ static int ir_probe(struct device *dev) | |||
329 | ir->mask_keyup = 0x008000; | 394 | ir->mask_keyup = 0x008000; |
330 | ir->polling = 50; // ms | 395 | ir->polling = 50; // ms |
331 | break; | 396 | break; |
397 | case BTTV_CONCEPTRONIC_CTVFMI2: | ||
398 | ir_codes = ir_codes_conceptronic; | ||
399 | ir->mask_keycode = 0x001F00; | ||
400 | ir->mask_keyup = 0x006000; | ||
401 | ir->polling = 50; // ms | ||
402 | break; | ||
332 | } | 403 | } |
333 | if (NULL == ir_codes) { | 404 | if (NULL == ir_codes) { |
334 | kfree(ir); | 405 | kfree(ir); |