HID: handle cases of volume knobs generating relative values
authorJiri Kosina <jkosina@suse.cz>
Wed, 4 Jul 2007 14:45:59 +0000 (16:45 +0200)
committerJiri Kosina <jkosina@suse.cz>
Mon, 9 Jul 2007 12:13:37 +0000 (14:13 +0200)
There are some devices (for example Dell Multimedia Keyboard SK-8135) that have
a volume control knob which generates relative events instead of absolute.
hid-input maps them to ABS_VOLUME. HUT pages don't restrict volume to absolute
values.

Adding REL_VOLUME doesn't seem feasible, nothing knows how to handle it. This
patch translates relative ABS_VOLUME events into appropriate number of series
of VOLUME_UP or VOLUME_DOWN events respectively, so that userspace sees the
correct values in the end.

kernel.org bugzilla 5233

Reported-by: Jochen Eisinger <jochen@penguin-breeder.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>

No differences found