- Jul 18, 2022
-
-
Joshua authored
Using the existing framework for stylus based inputs to create a new framework needed for touch tests. Made slight adjustments to the base tests to facilitate touch inputs. For the touch tests the report descriptor for a DTH-2452 tablet was added in to use for the device. Ontop of existing tests a new test was created in order to catch an edge case for touch involving a tablet passing a contact ID of 0. Signed-off-by:
Joshua Dickens <joshua.dickens@wacom.com> Reviewed-by:
Jason Gerecke <jason.gerecke@wacom.com>
-
The PTH-460 has its HID descriptor implemented slightly differently to its siblings the 660 and 860. Specifically, each of the functions of the pad are encapsulated in their own physical collections. This causes a little bit of trouble for the current Wacom driver which typically treats multiple collections of the same tool as multiple snapshots of a single tool's state (mainly to support BT devices that send e.g. 5 pen updates in a single packet). We check to make sure that we don't get partial/empty pad syncs when they shouldn't exist. The easiest way to trigger this behavior is to simultaneously use the touchring and expresskeys since they are in different collections. This behavior was fixed in the upstream Linux kernel by commit d4b8efeb46d9 ("HID: wacom: generic: Correct pad syncing"). Signed-off-by:
Jason Gerecke <jason.gerecke@wacom.com>
-
At the moment the function offers no middle-ground between returning "true" and associating an evdev device with a specific type, or returning "false" and associating it with *no* types. The Wacom tests require us to have access to both e.g. Pen and Pad devices, but we need to be careful to ensure that the pen evdev device is actually associated with the "Pen" type, and pad device with the "Pad" type. The "udev_input_event" function does a pretty good job with this normally, but because all pad devices are also pen devices, things go a little off the rails. This commit allows the caller to return 'false' for only the specific combinations of device and application that don't make sense, but still return 'true' in other situations. Signed-off-by:
Jason Gerecke <jason.gerecke@wacom.com>
-
Commit d4b8efeb46d9 introduced an issue which causes a BTN_TOUCH=0 event to be sent out whenever a heartbeat report is received. We have a fix for this bug, but lets make sure it does not come back. Signed-off-by:
Jason Gerecke <jason.gerecke@wacom.com>
-
Adds descriptors for the PTH-660, PTH-860, and PTH-460, as well as the necessary device / test definitions to exercise them. Updates `test_descriptor_physicals()` to better handle these tablets (new usages listed among the required, filtering of mouse collection). Also notes errata with the descriptors that cause the physicals test to fail. Signed-off-by:
Jason Gerecke <jason.gerecke@wacom.com>
-
The Wacom driver may create several devices for a given interface. We need to be sure we're working with the correct one. Signed-off-by:
Jason Gerecke <jason.gerecke@wacom.com>
-
Adds a test of the HID descriptor itself to make sure that physical ranges are set where necessary and actually make sense. Failures in this test highlight devices that may need a HID descriptor fixup. Mostly intended for pre-production use to catch errors before they become real. Signed-off-by:
Jason Gerecke <jason.gerecke@wacom.com>
-
Adds a slightly more in-depth report descriptor for something resembling a generic pen-only CTL device. Additions above and beyond the bare-bones OpaqueTablet are the use of Wacom's vendor-defined usages and support for pressure, eraser, and barrel buttons. Signed-off-by:
Jason Gerecke <jason.gerecke@wacom.com>
-
Just some boiler-plate to get started. Still need to write many more devices and testcases. Note that the weird report_descriptor comment formatting is just to shut up flake8's E262 rule (which doesn't like indenting). Signed-off-by:
Jason Gerecke <jason.gerecke@wacom.com>
-
- May 17, 2022
-
-
Signed-off-by:
Peter Hutterer <peter.hutterer@who-t.net>
-
- Mar 06, 2022
-
-
Silvan Jegen authored
-
- Dec 20, 2021
-
-
:= avoids recomputing them || makes more sense (and avoids a needless head shell-out) Signed-off-by:
Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
-
- Dec 19, 2021
-
-
Benjamin Tissoires authored
Based tests from наб in !125 Signed-off-by:
Benjamin Tissoires <benjamin.tissoires@gmail.com>
-
Benjamin Tissoires authored
Based on наб idea. Signed-off-by:
Benjamin Tissoires <benjamin.tissoires@gmail.com>
-
- Dec 18, 2021
-
- Dec 08, 2021
-
-
Benjamin Tissoires authored
arrays in HID are an index based list on usages stored in the field. Instead of relying on the user to get the index for us, we can let hid.py deal with it itself. Signed-off-by:
Benjamin Tissoires <benjamin.tissoires@gmail.com>
-
Benjamin Tissoires authored
The index of the usage needs to be actually reduced by logical min. Most of the time logical min is 0, so it just works, but some times, when a sort subset of HID SEL usages are used, indexing starts at 1. Signed-off-by:
Benjamin Tissoires <benjamin.tissoires@gmail.com>
-
Benjamin Tissoires authored
Seen on the USI digitizers: the application is `Digitizer`, but the logical is `Preferred Line Style`. This logical is actually better so use that as the debug output. Furthermore, this makes it way easier to create keyboard arrays as we can now use `data.keyboard` instead of `setattr(data, '0x70000')`, which is cumbersome to say the least. Signed-off-by:
Benjamin Tissoires <benjamin.tissoires@gmail.com>
-
- Dec 06, 2021
-
-
Benjamin Tissoires authored
The CI will likely fail on this, we need an updated kernel. This was raised on the LKML and privately: it is very easy to crash the kernel with uhid by picking up one of the USB modalias reserved for those drivers. Retrieve all of those USB VID/PIDs, and attempt at binding them. If there is no crash, we are good. Signed-off-by:
Benjamin Tissoires <benjamin.tissoires@gmail.com>
-
- Nov 24, 2021
-
-
Benjamin Tissoires authored
See https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/hid/hid-core.c?h=v5.15#n1555 for the kernel implementation. The behavior of it is defined in the Device Class Definition for Human Interface Devices (HID) Version 1.11, Apendix C (page 62 of https://www.usb.org/sites/default/files/hid1_11.pdf ) > The keyboard must report a phantom state indexing Usage(ErrorRollOver) > in all array fields whenever the number of keys pressed exceeds the > Report Count. Signed-off-by:
Benjamin Tissoires <benjamin.tissoires@gmail.com>
-
- Nov 17, 2021
-
-
With a Unit HID item, on python 3.6 (RHEL 8) we do get the following: ```python >>> print(unit.system) SILinear >>> print(f'{unit.system}') 1 >>> print(f'{str(unit.system)}') SILinear ``` We actually rely on `SILinear` to be used, not `1`. So for those systems with old python, explicitly convert to str(). Signed-off-by:
Benjamin Tissoires <benjamin.tissoires@gmail.com>
-
- Nov 09, 2021
-
-
Benjamin Tissoires authored
There might be cases where we fail for some unrelated reasons. Re-run the test suite so we can be sure this was not a side effect. Signed-off-by:
Benjamin Tissoires <benjamin.tissoires@gmail.com>
-
Benjamin Tissoires authored
jq is already present in our image, there is no point in rebuilding it. Signed-off-by:
Benjamin Tissoires <benjamin.tissoires@gmail.com>
-
Benjamin Tissoires authored
This should allow to have a more recent kernel that works with the GXTP tablet changes Signed-off-by:
Benjamin Tissoires <benjamin.tissoires@gmail.com>
-
Signed-off-by:
Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
-
Benjamin Tissoires authored
This is mostly incomplete, but should allow to move forward on the LKML. The thing is I don't have any of these devices, and I don't know If I am doing the right thing here. There are also a bunch of commented out devices. These are devices that are exposing a Stylus from one of their collections, but do not work straight out of the box: - egalax devices are exporting a 'Touch Screen' application - Irtouch_6615_0070 does not set the BTN_TOOL_PEN (though it has in-range) - atmel_03eb_8409 has an 'undefined' application for its pen Signed-off-by:
Benjamin Tissoires <benjamin.tissoires@gmail.com>
-
- Oct 10, 2021
-
-
Maximilian Luz authored
Currently, hid-tools does not support BUS_HOST. This can, for example, cause hid-recorder to crash when it encounters a device with that bus with the following stack trace: Traceback (most recent call last): File "/home/ukas/hid-tools/./hid-recorder", line 23, in <module> hidtools.cli.record.main() File "/usr/lib/python3/dist-packages/click/core.py", line 829, in __call__ return self.main(*args, **kwargs) File "/usr/lib/python3/dist-packages/click/core.py", line 782, in main rv = self.invoke(ctx) File "/usr/lib/python3/dist-packages/click/core.py", line 1066, in invoke return ctx.invoke(self.callback, **ctx.params) File "/usr/lib/python3/dist-packages/click/core.py", line 610, in invoke return callback(*args, **kwargs) File "/home/ukas/hid-tools/hidtools/cli/record.py", line 75, in main device_list = [open(list_devices())] File "/home/ukas/hid-tools/hidtools/cli/record.py", line 36, in list_devices d = HidrawDevice(f) File "/home/ukas/hid-tools/hidtools/hidraw.py", line 199, in __init__ self.bustype = BusType(bustype) File "/usr/lib/python3.9/enum.py", line 360, in __call__ return cls.__new__(cls, value) File "/usr/lib/python3.9/enum.py", line 678, in __new__ raise ve_exc ValueError: 25 is not a valid BusType BUS_HOST is for example used on HID devices connected via the Microsoft Surface Aggregator, an embedded controller found on newer Microsoft Surface devices. On those devices the surface_hid kernel driver provides a HID transport channel to that EC. Add support for BUS_HOST to prevent crashes like this. Signed-off-by:
Maximilian Luz <luzmaximilian@gmail.com>
-
- Sep 21, 2021
-
-
Benjamin Tissoires authored
The report ID can not be negative The buf had a wrong size Signed-off-by:
Benjamin Tissoires <benjamin.tissoires@gmail.com>
-
Example usage to change the second Resolution Multiplier here: $ hid-feature list --fetch-values /dev/hidraw1 Feature | Report | Usage Page | Usage | Range | Count | Bits | Value(s) --------|--------|---------------------------|--------------------------------------------|-----------|-------|------|--------- 120000 | 18 | Generic Desktop | Resolution Multiplier | [ 0, 1] | 1 | 2 | 1 120001 | 18 | Generic Desktop | Resolution Multiplier | [ 0, 1] | 1 | 2 | 1 120002 | 18 | Generic Desktop | Undefined | [ 0, 1] | 1 | 4 | 0 170000 | 23 | Vendor Defined Page 1 | 0xff00ff06 | [ 0, 1] | 1 | 2 | 1 $ hid-feature set --feature 120000 1 --feature 120001 0 /dev/hidraw1 $ hid-feature list --fetch-values /dev/hidraw1 Feature | Report | Usage Page | Usage | Range | Count | Bits | Value(s) --------|--------|---------------------------|--------------------------------------------|-----------|-------|------|--------- 120000 | 18 | Generic Desktop | Resolution Multiplier | [ 0, 1] | 1 | 2 | 1 120001 | 18 | Generic Desktop | Resolution Multiplier | [ 0, 1] | 1 | 2 | 0 120002 | 18 | Generic Desktop | Undefined | [ 0, 1] | 1 | 4 | 0 170000 | 23 | Vendor Defined Page 1 | 0xff00ff06 | [ 0, 1] | 1 | 2 | 1 Where the --fetch-values is omitted during `list`, the device is never accessed. The feature index is a simple value based on the report ID and the index of the feature within that report, this gives it a unique-enough ID that we can then pass into `hid-feature set`. Setting the actual feature takes a tuple of the id and the new value (e.g.--feature 120001 0). This won't work for items that have a count != 1 but we can deal with that when we need to. Signed-off-by:
Peter Hutterer <peter.hutterer@who-t.net>
-
Signed-off-by:
Peter Hutterer <peter.hutterer@who-t.net>
-
- May 30, 2021
-
-
Roderick Colenbrander authored
The upstream driver doesn't expose LEDs yet (my internal build does), so let's not wait for them in is_device_ready. Signed-off-by:
Roderick Colenbrander <roderick.colenbrander@sony.com>
-
- May 27, 2021
-
-
Roderick Colenbrander authored
Add initial tests for PS5 controller utilizing PS4 controller tests. The tests can be re-used as the controller are very similar at this point. Signed-off-by:
Roderick Colenbrander <roderick.colenbrander@sony.com>
-
Roderick Colenbrander authored
Signed-off-by:
Roderick Colenbrander <roderick.colenbrander@sony.com>
-
Roderick Colenbrander authored
Signed-off-by:
Roderick Colenbrander <roderick.colenbrander@sony.com>
-
Roderick Colenbrander authored
Add support for PS5 touchpads. The touchpad is very similar to PS4 touchpad except there is no history this time and the report layout is slightly different e.g. timestamp is at the end instead of the start. The touchpad support for PS5Controller is implemented in a similar way to PS4Controller. Main difference is that there is a new PS5TouchReport class to handle the differences in report layout. Signed-off-by:
Roderick Colenbrander <roderick.colenbrander@sony.com>
-
Roderick Colenbrander authored
The PS5 touchpad works very similar to PS4 touchpad except for a slightly different report layout. Move the contact id update logic to a helper function to allow for reuse of PSTouchReport in a later patch by just subclassing it. Signed-off-by:
Roderick Colenbrander <roderick.colenbrander@sony.com>
-
Roderick Colenbrander authored
Signed-off-by:
Roderick Colenbrander <roderick.colenbrander@sony.com>
-
Roderick Colenbrander authored
Signed-off-by:
Roderick Colenbrander <roderick.colenbrander@sony.com>
-
- May 05, 2021
-
-
Peter Hutterer authored
Format strings are totally the future. The future from 4 years ago. Signed-off-by:
Peter Hutterer <peter.hutterer@who-t.net>
-
Peter Hutterer authored
`for line in file` does the same thing Signed-off-by:
Peter Hutterer <peter.hutterer@who-t.net>
-