diff options
author | Oliver Endriss <o.endriss@gmx.de> | 2007-04-27 11:31:21 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-04-27 14:43:45 -0400 |
commit | ee820a648fb333034aa455e8e1479b89798a1281 (patch) | |
tree | 2bb8611029075d0ff068394b6aaad9b5ea46f057 /drivers/media/dvb/ttpci/av7110.h | |
parent | db4836791dc578f0f6e9573468cffeee00fa7ebc (diff) |
V4L/DVB (5334): Dvb-ttpci: Infrared remote control refactoring
Infrared remote control support rewritten.
Now each device provides its own event device, keymap, protocol,
inversion and address setting.
EVIOCGKEYCODE and EVIOCSKEYCODE ioctls are supported to read/modify
a keymap. Keymaps may be loaded using
- input tools (keyb etc.)
- av7110_loadkeys (obsolete, for backward compatibility)
New command line parameters:
- ir_protocol: select infrared protocol: 0 RC5, 1 RCMM (default)
- ir_inversion: signal inversion: 0 not inverted (default), 1 inverted
- ir_device_mask: bitmask of infrared devices (default: accept all)
Those parameters may be set anytime.
Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/dvb/ttpci/av7110.h')
-rw-r--r-- | drivers/media/dvb/ttpci/av7110.h | 28 |
1 files changed, 24 insertions, 4 deletions
diff --git a/drivers/media/dvb/ttpci/av7110.h b/drivers/media/dvb/ttpci/av7110.h index b98bd453cade..115002b0390c 100644 --- a/drivers/media/dvb/ttpci/av7110.h +++ b/drivers/media/dvb/ttpci/av7110.h | |||
@@ -5,6 +5,7 @@ | |||
5 | #include <linux/socket.h> | 5 | #include <linux/socket.h> |
6 | #include <linux/netdevice.h> | 6 | #include <linux/netdevice.h> |
7 | #include <linux/i2c.h> | 7 | #include <linux/i2c.h> |
8 | #include <linux/input.h> | ||
8 | 9 | ||
9 | #include <linux/dvb/video.h> | 10 | #include <linux/dvb/video.h> |
10 | #include <linux/dvb/audio.h> | 11 | #include <linux/dvb/audio.h> |
@@ -66,6 +67,27 @@ struct dvb_video_events { | |||
66 | }; | 67 | }; |
67 | 68 | ||
68 | 69 | ||
70 | struct av7110; | ||
71 | |||
72 | /* infrared remote control */ | ||
73 | struct infrared { | ||
74 | u16 key_map[256]; | ||
75 | struct input_dev *input_dev; | ||
76 | char input_phys[32]; | ||
77 | struct timer_list keyup_timer; | ||
78 | struct tasklet_struct ir_tasklet; | ||
79 | void (*ir_handler)(struct av7110 *av7110, u32 ircom); | ||
80 | u32 ir_command; | ||
81 | u32 ir_config; | ||
82 | u32 device_mask; | ||
83 | u8 protocol; | ||
84 | u8 inversion; | ||
85 | u16 last_key; | ||
86 | u16 last_toggle; | ||
87 | u8 delay_timer_finished; | ||
88 | }; | ||
89 | |||
90 | |||
69 | /* place to store all the necessary device information */ | 91 | /* place to store all the necessary device information */ |
70 | struct av7110 { | 92 | struct av7110 { |
71 | 93 | ||
@@ -227,10 +249,7 @@ struct av7110 { | |||
227 | u16 wssMode; | 249 | u16 wssMode; |
228 | u16 wssData; | 250 | u16 wssData; |
229 | 251 | ||
230 | u32 ir_config; | 252 | struct infrared ir; |
231 | u32 ir_command; | ||
232 | void (*ir_handler)(struct av7110 *av7110, u32 ircom); | ||
233 | struct tasklet_struct ir_tasklet; | ||
234 | 253 | ||
235 | /* firmware stuff */ | 254 | /* firmware stuff */ |
236 | unsigned char *bin_fw; | 255 | unsigned char *bin_fw; |
@@ -268,6 +287,7 @@ struct av7110 { | |||
268 | extern int ChangePIDs(struct av7110 *av7110, u16 vpid, u16 apid, u16 ttpid, | 287 | extern int ChangePIDs(struct av7110 *av7110, u16 vpid, u16 apid, u16 ttpid, |
269 | u16 subpid, u16 pcrpid); | 288 | u16 subpid, u16 pcrpid); |
270 | 289 | ||
290 | extern int av7110_check_ir_config(struct av7110 *av7110, int force); | ||
271 | extern int av7110_ir_init(struct av7110 *av7110); | 291 | extern int av7110_ir_init(struct av7110 *av7110); |
272 | extern void av7110_ir_exit(struct av7110 *av7110); | 292 | extern void av7110_ir_exit(struct av7110 *av7110); |
273 | 293 | ||