[media] ati_remote: add support for Medion X10 Digitainer remote
authorAnssi Hannula <anssi.hannula@iki.fi>
Sun, 1 Apr 2012 19:41:46 +0000 (16:41 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Wed, 11 Apr 2012 05:05:46 +0000 (02:05 -0300)
commit9d454d48ebcd9938ac60a245fa545d9db1035f1a
tree37e60b9532501aa6111f0f3433568968c2be8a8d
parent0d74679c37241f539b80334085e73ba063b2116d
[media] ati_remote: add support for Medion X10 Digitainer remote

Add support for another Medion X10 remote. This was apparently
originally used with the Medion Digitainer box, but is now sold
separately without any Digitainer labeling.

A peculiarity of this remote is a scrollwheel in place of up/down
buttons. Each direction is mapped to 8 different scancodes, each
corresponding to 1..8 notches, allowing multiple notches to the same
direction to be transmitted in a single scancode. The driver transforms
the multi-notch scancodes to multiple events of the single-notch
scancode.
(0x70..0x77 = 1..8 notches down, 0x78..0x7f = 1..8 notches up)

Since the scrollwheel scancodes are the same that are used for mouse on
some other X10 (ati_remote) remotes, the driver will now check whether
the active keymap has a keycode defined for the single-notch scancode
when a mouse/scrollwheel scancode (0x70..0x7f) is received. If set,
scrollwheel is assumed, otherwise mouse is assumed.

This remote ships with a different receiver than the already supported
Medion X10 remote, but they share the same USB ID. The only difference
in the USB descriptors is that the Digitainer receiver has the Remote
Wakeup bit set in bmAttributes of the Configuration Descriptor.
Therefore that is used to select the default keymap.

Thanks to Stephan Raue from OpenELEC (www.openelec.tv) for providing me
both a Medion X10 Digitainer remote+receiver and an already supported
Medion X10 remote+receiver. Thanks to Martin Beyss for providing some
useful information about the remote (including the "Digitainer" name).
This patch has been tested by both of them and myself.

Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi>
Tested-by: Stephan Raue <stephan@openelec.tv>
Tested-by: Martin Beyss <Martin.Beyss@rwth-aachen.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/rc/ati_remote.c
drivers/media/rc/keymaps/Makefile
drivers/media/rc/keymaps/rc-medion-x10-digitainer.c [new file with mode: 0644]
include/media/rc-map.h
This page took 0.026735 seconds and 5 git commands to generate.