1
linux/drivers/media/dvb
Mauro Carvalho Chehab b77f0a7630 V4L/DVB (12599): dvb-usb-remote: Allow dynamically replacing the IR keycodes
Implements handler for EVIOCGKEYCODE/EVIOCSKEYCODE via adding two new callbacks
to the input device.

Since on dvb-usb a scan code has 16 bits, to fulfill rc5 standard codes, the default
getkeycode/setkeycode input methods would require the driver to spend up to 64 Kb of
a sparse table. Instead, add two new callbacks to the event device.

With this, it is now possible to replace the keycode tables. There are, however, a few
implementation details at the current patch:

1) It will replace the existing device keytable, instead of creating an instance
of the data. This works. However, if two devices pointing to the same table
were connected, changing the IR table of one will also change the IR table for
the other (the solution for this one is simple: just kmalloc some memory);

2) In order to change the scan code, you need first to change the key to
KEY_RESERVED or KEY_UNKNOWN to free some space at the table (solution: allocate
some additional space for newer scan codes or allow dynamic table grow);

3) The table size cannot be extended. It would be easy to allow the table to
grow dynamically: just calling kmalloc(size+1); kfree(old). Yet, maybe we can
just create a bigger table with a fixed size, like for example a table with 128
entries. This should be enough even for a very big IR.

The current issues should be addressed on a later patch.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12 12:19:48 -03:00
..
b2c2 V4L/DVB (12294): b2c2: Use dvb-pll for Cablestar2 2009-09-12 12:17:52 -03:00
bt8xx V4L/DVB (12477): Use dst_type field instead of type_flags 2009-09-12 12:19:03 -03:00
dm1105 V4L/DVB (12595): common/ir: use a struct for keycode tables 2009-09-12 12:19:47 -03:00
dvb-core V4L/DVB (12276): Remove a useless check from dvb_dmx_swfilter_packet() 2009-09-12 12:17:44 -03:00
dvb-usb V4L/DVB (12599): dvb-usb-remote: Allow dynamically replacing the IR keycodes 2009-09-12 12:19:48 -03:00
firewire V4L/DVB (12583): firedtv: combine some debug logging code 2009-09-12 12:19:38 -03:00
frontends V4L/DVB (12575): Fix test of bandwidth range in cx22700_set_tps() 2009-09-12 12:19:34 -03:00
pluto2 V4L/DVB (12483): Use DIV_ROUND_CLOSEST 2009-09-12 12:19:08 -03:00
siano V4L/DVB (12451): Update KConfig File to enable SDIO and USB interfaces 2009-08-31 02:24:53 -03:00
ttpci V4L/DVB (12595): common/ir: use a struct for keycode tables 2009-09-12 12:19:47 -03:00
ttusb-budget
ttusb-dec
Kconfig firedtv: massive refactoring 2009-02-24 14:51:29 +01:00
Makefile firedtv: rename files, variables, functions from firesat to firedtv 2009-02-24 14:51:29 +01:00