kernel-ark/drivers/media
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
..
common V4L/DVB (12595): common/ir: use a struct for keycode tables 2009-09-12 12:19:47 -03:00
dvb V4L/DVB (12599): dvb-usb-remote: Allow dynamically replacing the IR keycodes 2009-09-12 12:19:48 -03:00
radio V4L/DVB (12553): FM TX: si4713: Add Kconfig and Makefile entries 2009-09-12 12:19:22 -03:00
video V4L/DVB (12595): common/ir: use a struct for keycode tables 2009-09-12 12:19:47 -03:00
Kconfig V4L/DVB (11881): one kconfig controls them all 2009-06-16 18:21:16 -03:00
Makefile