• Jiri Kosina's avatar
    HID: handle cases of volume knobs generating relative values · 2c1d8aea
    Jiri Kosina authored
    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: default avatarJochen Eisinger <jochen@penguin-breeder.org>
    Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
    2c1d8aea
hid-input.c 35.9 KB