Add SiS 0x0457/0x0819 multitouch wake-up quirk - #36
Open
brianpeat wants to merge 5 commits into
Open
Conversation
This SiS HID touch controller (Verbatim PMT-14, UPERFECT, WIMAXIT, EVICIV, and other rebrands, all sharing VID/PID 0x0457/0x0819) boots in single-point mouse-compatibility mode and never emits multitouch reports until the host sends one HID SET_REPORT (Feature, report 7, payload 0x02 0x01). Add a small vendor-quirk table and replay that transfer from RegisterTouchDevice() before the input queue starts. No GET_REPORT is attempted first — this silicon stalls on one (cf. Linux hid-multitouch HID_QUIRK_NOGET for the same vendor). Confirmed via USB capture of the Touch-Base UPDD driver and a standalone IOHIDManager probe: immediately after this SetReport the panel begins sending 5-contact reports (report ID 0x91). No parser changes are needed — the report descriptor already advertises 5 contact collections. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
IOHIDQueueCreate returns NULL when the device can't be opened — most commonly because Input Monitoring has not been granted yet. The existing code dereferenced the queue unconditionally, so the app crashed on launch (EXC_BAD_ACCESS in IOHIDQueueRegisterValueAvailableCallback) instead of falling back to its permission-request UI. Bail cleanly and release the half-initialized device state. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
The /Notes ignore was a local scratch-folder convenience, not something for upstream. Restores .gitignore to its previous state. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Rewrites the vendor-quirk comment to lead with the public mechanism it uses: the "Device Mode" feature control from the HID Usage Tables (Digitizers page, usages 0x52/0x53), the same SET_REPORT that Windows' HID stack and Linux's hid-multitouch.c (mt_set_input_mode) issue to take a digitizer out of mouse-compatibility mode. The report ID and field values come straight from the panel's own report descriptor; the USB capture only corroborated an already-standard transfer. No functional change. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Intro
What
Adds a small vendor-quirk table in
HIDInterpreter.cthat sends a one-time HIDSET_REPORT(Feature, report 7,Device Mode = 2/Device Identifier = 1) fromRegisterTouchDevice()for the SiS0x0457/0x0819touch controller, before the inputqueue starts.
This is the standard HID "Device Mode" feature control (HID Usage Tables, Digitizers
page 0x0D, usages 0x52/0x53) — the same
SET_REPORTthat Windows' HID stack and Linux'shid-multitouch.c(mt_set_input_mode()) issue to take a digitizer out of single-pointmouse-compatibility mode. macOS doesn't send it, so this panel matches Touch Up's
digitizer matching dictionary but never emits multitouch reports until the transfer is
replayed. The report ID and field values are read straight from the panel's own report
descriptor; a USB capture of a working Windows driver for the same panel shows the
identical transfer.
The SiS
0x0457/0x0819controller is resold under many names (Verbatim PMT-14, UPERFECT,WIMAXIT, EVICIV, …) all sharing this VID/PID, so one table entry covers the family, and
the table makes more easy to add.
Also included
d1414cdguards against aNULLqueue inRegisterTouchDevice().IOHIDQueueCreate()returns
NULLwhen the device can't be opened (typically Input Monitoring not grantedyet); the code then dereferenced it and crashed on launch (
EXC_BAD_ACCESSinIOHIDQueueRegisterValueAvailableCallback) instead of falling through to thepermission-request UI. Independent of the quirk — happy to split it out.
Testing
SET_REPORTreturnskIOReturnSuccess; tap / drag /hold-drag-select / pinch-zoom all work through the app.
parser already handles (
CountContactCollections()sees 5 finger collections).Notes
Update .gitignore/Revert local .gitignore entry) cancel out andleave no net change; squash-merging drops them.