[linux-dvb] [patch] support for key repeat with dib0700 ir receiver

Filippo Argiolas filippo.argiolas at gmail.com
Wed Feb 20 10:27:45 CET 2008

Il giorno mar, 19/02/2008 alle 22.14 +0100, Patrick Boettcher ha
> That indeed looks OK to my eyes. I have to admit that I never took a look 
> into the IR-code from DiBcom...
> In any case, especially to that problem with "unknown key code" I think it 
> is time to change the IR-behavior of the DVB-USB.
> My problem is, I don't know how.
> My naive idea would be, that the IR-code is reporting each key (as raw as 
> possible) without mapping it to an event to the event interface and then 
> someone, somewhere is interpreting it. Also forward any repeat-attribute.
> Those endless tables in a lot of dvb-usb drivers are annoying me, firstly 
> because they are endless and huge, and secondly, they are never complete. 
> If there is an adequate replacement from userspace (somehow loading 
> key-lists to the event-layer or in the worst case, to the 
> dvb-usb-framework) would be a good solution.
> Filippo, it seems you understand quite some thing around that. Do you know 
> if what I'm saying is somehow possible?

Patrick, your doubts are the same that I've felt when, a few days ago, I
started looking at the dib0700 code.
I thinked why the driver decode events and binds them to a keymap
instead of passing them raw to a user space tool (lirc?)? This prevents
me to easily add a custom keymap for commercial remotes or even add a
keymap for the remotes I have. So my device can decode most of my
remote controllers but I cannot use them without editing the kernel code from
development branch.
Later I understood the idea behind all this:
as Nicolas said binding keypress to an event interface turns the remote
into a common input interface that works everywhere without additional
user space tools and without difficult per-app configurations. So I
think that current behavior is somewhat sane even if it lacks of a
simple system (from a user point of view) to add more keymaps or edit
current ones.
Please note that this behavior does not conflict with having different
settings for different application, since this is achievable configuring

Another problem (as far as I understood with a quick look at the code)
is that each different driver, being written by different people, faces
the whole thing in different ways. As you said almost each driver has
its own keymaps and its own methods to present events to the input
For example I've seen some effort towards a unified system in
dvb-usb-remote.c but dib0700 seems not to use it.

Regarding ir-common (as Darren suggested), after a quick look it seems
more a framework for decoding remote events but it cannot be extended to
all the devices since many of them do the decoding stuff on their own
outputting directly decoded data that only has to be binded to a keymap
and to an event device.
I think that all the drivers should output keypress decoded data in a
common format to be passed to a common framework that binds it to common
keymaps (better if user customizable in some way) and generates input

I don't know yet how this could be done and maybe it involves some work
rewriting the ir stuff. So I think in the meanwhile my patch could be
merged (if you think it's good) waiting for this work to be done.
I'll take a deeper look at the code but I don't know if I'm able to do
this thing, I've read kernel code a few days ago for the very first time
and I've written the patch just because a I needed the repeat feature :)



More information about the linux-dvb mailing list