aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2010-04-04 13:06:55 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-05-19 11:56:58 -0400
commit9dfe4e8339499bfe8e9a362fefc290b4cb9c3803 (patch)
treea42ab74108d03f8009f01e2fc896df15638dfc06 /include
parent4f9256b496677adf799342cee7d406dd46e566d9 (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 'include')
-rw-r--r--include/media/ir-core.h24
-rw-r--r--include/media/rc-map.h3
2 files changed, 22 insertions, 5 deletions
diff --git a/include/media/ir-core.h b/include/media/ir-core.h
index 0f64b48ecd90..4397ea3d9754 100644
--- a/include/media/ir-core.h
+++ b/include/media/ir-core.h
@@ -33,12 +33,28 @@ enum raw_event_type {
33 IR_STOP_EVENT = (1 << 3), 33 IR_STOP_EVENT = (1 << 3),
34}; 34};
35 35
36/**
37 * struct ir_dev_props - Allow caller drivers to set special properties
38 * @allowed_protos: bitmask with the supported IR_TYPE_* protocols
39 * @scanmask: some hardware decoders are not capable of providing the full
40 * scancode to the application. As this is a hardware limit, we can't do
41 * anything with it. Yet, as the same keycode table can be used with other
42 * devices, a mask is provided to allow its usage. Drivers should generally
43 * leave this field in blank
44 * @priv: driver-specific data, to be used on the callbacks
45 * @change_protocol: allow changing the protocol used on hardware decoders
46 * @open: callback to allow drivers to enable polling/irq when IR input device
47 * is opened.
48 * @close: callback to allow drivers to disable polling/irq when IR input device
49 * is opened.
50 */
36struct ir_dev_props { 51struct ir_dev_props {
37 unsigned long allowed_protos; 52 unsigned long allowed_protos;
53 u32 scanmask;
38 void *priv; 54 void *priv;
39 int (*change_protocol)(void *priv, u64 ir_type); 55 int (*change_protocol)(void *priv, u64 ir_type);
40 int (*open)(void *priv); 56 int (*open)(void *priv);
41 void (*close)(void *priv); 57 void (*close)(void *priv);
42}; 58};
43 59
44struct ir_raw_event { 60struct ir_raw_event {
diff --git a/include/media/rc-map.h b/include/media/rc-map.h
index b10990d1749d..3b7fe5a0dc72 100644
--- a/include/media/rc-map.h
+++ b/include/media/rc-map.h
@@ -18,7 +18,7 @@
18#define IR_TYPE_OTHER (1u << 31) 18#define IR_TYPE_OTHER (1u << 31)
19 19
20struct ir_scancode { 20struct ir_scancode {
21 u16 scancode; 21 u32 scancode;
22 u32 keycode; 22 u32 keycode;
23}; 23};
24 24
@@ -95,6 +95,7 @@ void rc_map_init(void);
95#define RC_MAP_PINNACLE_PCTV_HD "rc-pinnacle-pctv-hd" 95#define RC_MAP_PINNACLE_PCTV_HD "rc-pinnacle-pctv-hd"
96#define RC_MAP_PIXELVIEW_NEW "rc-pixelview-new" 96#define RC_MAP_PIXELVIEW_NEW "rc-pixelview-new"
97#define RC_MAP_PIXELVIEW "rc-pixelview" 97#define RC_MAP_PIXELVIEW "rc-pixelview"
98#define RC_MAP_PIXELVIEW_MK12 "rc-pixelview-mk12"
98#define RC_MAP_POWERCOLOR_REAL_ANGEL "rc-powercolor-real-angel" 99#define RC_MAP_POWERCOLOR_REAL_ANGEL "rc-powercolor-real-angel"
99#define RC_MAP_PROTEUS_2309 "rc-proteus-2309" 100#define RC_MAP_PROTEUS_2309 "rc-proteus-2309"
100#define RC_MAP_PURPLETV "rc-purpletv" 101#define RC_MAP_PURPLETV "rc-purpletv"