1 Commits

Author SHA1 Message Date
buster_dylan
9abb7a9334 elan: fix protocol error and calibration for ASUS 04f3:0c6e
Some Elan devices (notably 04f3:0c6e on ASUS laptops) do not implement
the blocking behavior of pre_scan_cmd (0x40 0x3f). Instead of holding
the USB response open until a finger is placed, they return immediately
with a non-0x55 value when no finger is present. The existing driver
treated this as a fatal protocol error.

Fix: jump back to CAPTURE_WAIT_FINGER with a 50ms delay instead of
failing, turning the driver into a polling loop that waits for 0x55
(finger present) before proceeding to capture.

Additional tuning for 04f3:0c6e:
- Increase ELAN_CALIBRATION_ATTEMPTS 10->30 and poll delay 50->100ms
- Lower bz3_threshold 24->10 for single-press image matching
- Lower ELAN_MIN_FRAMES 7->4 for short press/tap captures

Tested on Rocky Linux 10.1 (ASUS laptop, FW 0x0161, sensor 150x52).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-14 20:12:03 +10:00