diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-04-04 13:06:55 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-05-19 11:56:58 -0400 |
commit | 9dfe4e8339499bfe8e9a362fefc290b4cb9c3803 (patch) | |
tree | a42ab74108d03f8009f01e2fc896df15638dfc06 /drivers/media/IR/keymaps | |
parent | 4f9256b496677adf799342cee7d406dd46e566d9 (diff) |
V4L/DVB: ir-core: Add support for badly-implemented hardware decoders
A few hardware Remote Controller decoders, even using a standard protocol,
aren't able to provide the entire scancode. Due to that, the capability
of using other IR's are limited on those hardware.
Adds a way to indicate to ir-core what are the bits that the hardware
provides, from a scancode, allowing the addition of a complete IR table
to the kernel and allowing a limited support for changing the Remote
Controller on those devices.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/IR/keymaps')
-rw-r--r-- | drivers/media/IR/keymaps/Makefile | 1 | ||||
-rw-r--r-- | drivers/media/IR/keymaps/rc-pixelview-mk12.c | 83 |
2 files changed, 84 insertions, 0 deletions
diff --git a/drivers/media/IR/keymaps/Makefile b/drivers/media/IR/keymaps/Makefile index 937b7db9c9d2..c4d891d79491 100644 --- a/drivers/media/IR/keymaps/Makefile +++ b/drivers/media/IR/keymaps/Makefile | |||
@@ -46,6 +46,7 @@ obj-$(CONFIG_RC_MAP) += rc-adstech-dvb-t-pci.o \ | |||
46 | rc-pinnacle-grey.o \ | 46 | rc-pinnacle-grey.o \ |
47 | rc-pinnacle-pctv-hd.o \ | 47 | rc-pinnacle-pctv-hd.o \ |
48 | rc-pixelview.o \ | 48 | rc-pixelview.o \ |
49 | rc-pixelview-mk12.o \ | ||
49 | rc-pixelview-new.o \ | 50 | rc-pixelview-new.o \ |
50 | rc-powercolor-real-angel.o \ | 51 | rc-powercolor-real-angel.o \ |
51 | rc-proteus-2309.o \ | 52 | rc-proteus-2309.o \ |
diff --git a/drivers/media/IR/keymaps/rc-pixelview-mk12.c b/drivers/media/IR/keymaps/rc-pixelview-mk12.c new file mode 100644 index 000000000000..5a735d569a8b --- /dev/null +++ b/drivers/media/IR/keymaps/rc-pixelview-mk12.c | |||
@@ -0,0 +1,83 @@ | |||
1 | /* rc-pixelview-mk12.h - Keytable for pixelview Remote Controller | ||
2 | * | ||
3 | * keymap imported from ir-keymaps.c | ||
4 | * | ||
5 | * Copyright (c) 2010 by Mauro Carvalho Chehab <mchehab@redhat.com> | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License as published by | ||
9 | * the Free Software Foundation; either version 2 of the License, or | ||
10 | * (at your option) any later version. | ||
11 | */ | ||
12 | |||
13 | #include <media/rc-map.h> | ||
14 | |||
15 | /* | ||
16 | * Keytable for MK-F12 IR remote provided together with Pixelview | ||
17 | * Ultra Pro Remote Controller. Uses NEC extended format. | ||
18 | */ | ||
19 | static struct ir_scancode pixelview_mk12[] = { | ||
20 | { 0x866b03, KEY_TUNER }, /* Timeshift */ | ||
21 | { 0x866b1e, KEY_POWER2 }, /* power */ | ||
22 | |||
23 | { 0x866b01, KEY_1 }, | ||
24 | { 0x866b0b, KEY_2 }, | ||
25 | { 0x866b1b, KEY_3 }, | ||
26 | { 0x866b05, KEY_4 }, | ||
27 | { 0x866b09, KEY_5 }, | ||
28 | { 0x866b15, KEY_6 }, | ||
29 | { 0x866b06, KEY_7 }, | ||
30 | { 0x866b0a, KEY_8 }, | ||
31 | { 0x866b12, KEY_9 }, | ||
32 | { 0x866b02, KEY_0 }, | ||
33 | |||
34 | { 0x866b13, KEY_AGAIN }, /* loop */ | ||
35 | { 0x866b10, KEY_DIGITS }, /* +100 */ | ||
36 | |||
37 | { 0x866b00, KEY_MEDIA }, /* source */ | ||
38 | { 0x866b18, KEY_MUTE }, /* mute */ | ||
39 | { 0x866b19, KEY_CAMERA }, /* snapshot */ | ||
40 | { 0x866b1a, KEY_SEARCH }, /* scan */ | ||
41 | |||
42 | { 0x866b16, KEY_CHANNELUP }, /* chn + */ | ||
43 | { 0x866b14, KEY_CHANNELDOWN }, /* chn - */ | ||
44 | { 0x866b1f, KEY_VOLUMEUP }, /* vol + */ | ||
45 | { 0x866b17, KEY_VOLUMEDOWN }, /* vol - */ | ||
46 | { 0x866b1c, KEY_ZOOM }, /* zoom */ | ||
47 | |||
48 | { 0x866b04, KEY_REWIND }, | ||
49 | { 0x866b0e, KEY_RECORD }, | ||
50 | { 0x866b0c, KEY_FORWARD }, | ||
51 | |||
52 | { 0x866b1d, KEY_STOP }, | ||
53 | { 0x866b08, KEY_PLAY }, | ||
54 | { 0x866b0f, KEY_PAUSE }, | ||
55 | |||
56 | { 0x866b0d, KEY_TV }, | ||
57 | { 0x866b07, KEY_RADIO }, /* FM */ | ||
58 | }; | ||
59 | |||
60 | static struct rc_keymap pixelview_map = { | ||
61 | .map = { | ||
62 | .scan = pixelview_mk12, | ||
63 | .size = ARRAY_SIZE(pixelview_mk12), | ||
64 | .ir_type = IR_TYPE_NEC, | ||
65 | .name = RC_MAP_PIXELVIEW_MK12, | ||
66 | } | ||
67 | }; | ||
68 | |||
69 | static int __init init_rc_map_pixelview(void) | ||
70 | { | ||
71 | return ir_register_map(&pixelview_map); | ||
72 | } | ||
73 | |||
74 | static void __exit exit_rc_map_pixelview(void) | ||
75 | { | ||
76 | ir_unregister_map(&pixelview_map); | ||
77 | } | ||
78 | |||
79 | module_init(init_rc_map_pixelview) | ||
80 | module_exit(exit_rc_map_pixelview) | ||
81 | |||
82 | MODULE_LICENSE("GPL"); | ||
83 | MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@redhat.com>"); | ||