diff options
author | Peter Wu <peter@lekensteyn.nl> | 2014-04-01 19:26:36 +0200 |
---|---|---|
committer | Peter Wu <peter@lekensteyn.nl> | 2014-04-01 19:29:43 +0200 |
commit | ccf61b621fd4cc6eb5ae90bfc5595b5f4644e351 (patch) | |
tree | 89ea8a663260763d3709a8a873f7cea1cf4dfa89 /hw | |
parent | e245f00367c79bd1cd24e31b2a8a1efdb7192f04 (diff) | |
download | qemu-ccf61b621fd4cc6eb5ae90bfc5595b5f4644e351.tar.gz |
unifying: implement unknown hidden 0x2101 feature for T400
This got called during the initial start up of SetPoint. It probably
has something to do with scrolling.
Signed-off-by: Peter Wu <peter@lekensteyn.nl>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/usb/hid-logitech-hidpp20.c | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/hw/usb/hid-logitech-hidpp20.c b/hw/usb/hid-logitech-hidpp20.c index c69f6fd9c0..72e610b5e2 100644 --- a/hw/usb/hid-logitech-hidpp20.c +++ b/hw/usb/hid-logitech-hidpp20.c @@ -314,6 +314,31 @@ static HIDPP20_FEATURE(feat_verticalscrolling) } } +/* unknown, hidden feature found on T400 */ +static HIDPP20_FEATURE(feat_2101) +{ + switch (fn) { + case 0: /* ?? func with no params */ + params[0] = params[1] = params[2] = 3; + params[3] = 2; + return 4; + case 1: /* ?? */ + if (params[0] > 3) { + return -HIDPP20_ERR_CODE_INVALIDARGUMENT; + } + params[0] = params[1] = 3; + params[2] = params[0]; + params[3] = 2; + return 4; + case 2: /* ?? not seen, but probed manually. No params */ + params[0] = 0; + params[1] = 0x14; + return 2; + default: + return -HIDPP20_ERR_CODE_INVALID_FUNCTION_ID; + } +} + static HIDPP20_FEATURE(feat_hiresscrolling) { switch (fn) { @@ -447,7 +472,7 @@ static const HidppFeature features_t400[] = { { 0x1F03, HIDPP20_FEAT_TYPE_HIDDEN | HIDPP20_FEAT_TYPE_INTERNAL, feat_unknown }, { 0x1F04, HIDPP20_FEAT_TYPE_HIDDEN | HIDPP20_FEAT_TYPE_INTERNAL, feat_unknown }, { 0x2100, 0, feat_verticalscrolling }, - { 0x2101, HIDPP20_FEAT_TYPE_HIDDEN, feat_unknown }, + { 0x2101, HIDPP20_FEAT_TYPE_HIDDEN, feat_2101 }, { 0x2120, 0, feat_hiresscrolling }, { 0x2200, 0, feat_mousepointer }, { 0x6110, HIDPP20_FEAT_TYPE_HIDDEN, feat_touchmouserawpoints }, |