Age | Commit message (Collapse) | Author | Files | Lines |
|
Not touched since 7 April 2014.
|
|
Keys would appear "stuck" before this patch. It turns out that interrupt
transfers to EP1 (keyboard) and EP2 (mouse) were still happening while
the devices really are in HID++ mode instead of HID.
To fix this, pretend there is no data when in HID++ mode.
Signed-off-by: Peter Wu <peter@lekensteyn.nl>
|
|
Two stupid mistakes slipped in while refactoring the HID report
generation in 3615170bd1ed6f09f878a8b538321044efddd8e0 ("unifying: fix
mouse report format, DRY"). This makes evtest in Linux report mouse
events again and openbox seems happy too.
Another mistake went in the calculation of the Y field, the high and
low bits of Y were accidentally swapped.
As the descriptor for interface 2 (mouse, etc.) includes Report IDs,
this ID must be prepended to the HID payload for mice reports. This
makes the mouse function for Windows guests. (See section 8.1 of
HID 1.11).
Signed-off-by: Peter Wu <peter@lekensteyn.nl>
|
|
Interrupts were enabled for EP3, but the WinXP driver did not support
the reports sent through it. Prevent generating HID++ reports for
devices that are not in DJ mode (i.e. in standard HID mode).
Signed-off-by: Peter Wu <peter@lekensteyn.nl>
|
|
Used for debugging WinXP. Turns out that even usb-kbd is broken, so it
must be the USB stack used by WinXP that is problematic.
Signed-off-by: Peter Wu <peter@lekensteyn.nl>
|
|
...and ignore Get_Report for HID++ queries. 0x20 and 0x21 already
return EPIPE on real hw, but even querying 0x10 and 0x11 does not make
sense as the device index is not known.
Signed-off-by: Peter Wu <peter@lekensteyn.nl>
|
|
Introduce new function to retrieve HID data for a given HIDState (if
any) and fix the incompatibility between the HID format for mice as
used by QEMU and the format described by the report (it contains an
extra field for buttons).
Signed-off-by: Peter Wu <peter@lekensteyn.nl>
|
|
The USB_CFG_ATT_WAKEUP seems to be ignored by the device, perhaps it
gets handled by the OS.
usb_desc_attach is not necessary because we only have one full-speed
configuration. If there would also be a high-speed (or super-speed)
configuration, then usb_desc_attach must be added back to allow picking
an appropriate configuration based on the speed of the controller port
(UHCI, EHCI, XHCI). usb_desc_init() takes care of setting the initial
configuration (there is only one now).
Signed-off-by: Peter Wu <peter@lekensteyn.nl>
|
|
Stop hard-coding capture file and introduce the "usbdump" property
to specify the capture file path. When omitted, no capture will be
done.
Signed-off-by: Peter Wu <peter@lekensteyn.nl>
|
|
WIP (partially untested).
Handle input reports, respond with HID events if there are no queued
output reports. Implemented input report processing for receiver:
0x80 (Switch and Keep-Alive), 0x81 (Get Paired Devices).
Signed-off-by: Peter Wu <peter@lekensteyn.nl>
|
|
Error queue is implemented, possible receiver and device properties
are filled in (in the header).
Signed-off-by: Peter Wu <peter@lekensteyn.nl>
|
|
Prepare for adding DJ support, which I expect to be huge and unrelated
to the HID code.
Signed-off-by: Peter Wu <peter@lekensteyn.nl>
|
|
Copied from dev-hid.c (order changed to match interfaces order).
Signed-off-by: Peter Wu <peter@lekensteyn.nl>
|
|
For now, the receiver has always a mouse and keyboard paired.
Set_Idle, Get_Idle, Get_Protocol and Set_Protocol support
interface-specific devices.
Interrupt data for the HID mode are also implemented.
Signed-off-by: Peter Wu <peter@lekensteyn.nl>
|
|
This allows for less less checking by the consumer and avoids
unnecessary work if the capture cannot be written anyway.
Signed-off-by: Peter Wu <peter@lekensteyn.nl>
|
|
To make a tidy ship, remove unused parts that were taken from dev-wacom.
Also enable a handle_data callback (currently empty), handle_reset
(currently sets the device mode to HID instead of DJ).
This is incomplete, the handle_data callback must contain something.
Signed-off-by: Peter Wu <peter@lekensteyn.nl>
|
|
Signed-off-by: Peter Wu <peter@lekensteyn.nl>
|
|
Based on hw/usb/dev-wacom.c
|