diff options
author | Oliver Endriss <o.endriss@gmx.de> | 2007-04-27 15:31:21 (GMT) |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-04-27 18:43:45 (GMT) |
commit | ee820a648fb333034aa455e8e1479b89798a1281 (patch) | |
tree | 2bb8611029075d0ff068394b6aaad9b5ea46f057 /drivers/media/dvb/ttpci/av7110.h | |
parent | db4836791dc578f0f6e9573468cffeee00fa7ebc (diff) | |
download | linux-ee820a648fb333034aa455e8e1479b89798a1281.tar.xz |
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 b98bd45..115002b 100644 --- a/drivers/media/dvb/ttpci/av7110.h +++ b/drivers/media/dvb/ttpci/av7110.h @@ -5,6 +5,7 @@ #include <linux/socket.h> #include <linux/netdevice.h> #include <linux/i2c.h> +#include <linux/input.h> #include <linux/dvb/video.h> #include <linux/dvb/audio.h> @@ -66,6 +67,27 @@ struct dvb_video_events { }; +struct av7110; + +/* infrared remote control */ +struct infrared { + u16 key_map[256]; + struct input_dev *input_dev; + char input_phys[32]; + struct timer_list keyup_timer; + struct tasklet_struct ir_tasklet; + void (*ir_handler)(struct av7110 *av7110, u32 ircom); + u32 ir_command; + u32 ir_config; + u32 device_mask; + u8 protocol; + u8 inversion; + u16 last_key; + u16 last_toggle; + u8 delay_timer_finished; +}; + + /* place to store all the necessary device information */ struct av7110 { @@ -227,10 +249,7 @@ struct av7110 { u16 wssMode; u16 wssData; - u32 ir_config; - u32 ir_command; - void (*ir_handler)(struct av7110 *av7110, u32 ircom); - struct tasklet_struct ir_tasklet; + struct infrared ir; /* firmware stuff */ unsigned char *bin_fw; @@ -268,6 +287,7 @@ struct av7110 { extern int ChangePIDs(struct av7110 *av7110, u16 vpid, u16 apid, u16 ttpid, u16 subpid, u16 pcrpid); +extern int av7110_check_ir_config(struct av7110 *av7110, int force); extern int av7110_ir_init(struct av7110 *av7110); extern void av7110_ir_exit(struct av7110 *av7110); |