eFSA Elantech touchpad-integrated SPI-based sensor support
This is the family of sensors used in #136 (closed) (and at least a few other ASUS laptops too).
I have a userspace libfprint driver for at least one of these sensors (although with a bit of tweaking like image rotation/constant tuning it should work for all of them) although I'm not really sure where to go from here regarding merging it here.
Firstly, the sensors require access to both an SPI device (for sending commands/images) as well as the touchpad's HID (for hardware reset) and/or a GPIO pin (for a different hardware reset strategy and what I think is finger presence interrupt support, although I haven't been using it) which makes using a "unified" SPI driver class difficult (like what's being discussed in #112). My slightly bodged one (ab)uses libudev to find the necessary hardware, the new-ish feature in the kernel to force the SPI device to use the spidev driver without having to mess with the ACPI tables (see either the discussion on this kernel patch or the UDEV rules here) and hidraw.
Secondly, spidev
isn't an asynchronous driver. I'm currently working around this using a GTask
running in a thread however I'm unsure of the quality of that solution.
Finally, I'm having to use the same trick that the existing USB elantech driver does to avoid problems with small images (sensor size ranges from 96x96 to 144x144) by treating the sensors as swipe-style and stitching together frames. This works better than I believe it does in the elantech driver as the speed and simplicity of the SPI protocol gives you a much higher "framerate", but at the same time the sensor is in the touchpad and so swiping your finger across it is somewhat unpleasant. Unfortunately it's completely impossible to do any enrolling/matching otherwise.
I'm also unsure of how usable my code is as a nonzero portion of it was pretty much ripped directly out of the windows driver. (mostly the parts to do with device identification) I can dump all the information I've learned about the protocol into the wiki if that would help (although I don't have access to right now).
My driver (which currently only works with laptops containing a touchpad with HID VID:PID 04f3:3057
, although this is purely a design limitation and should work with other sensors whose windows drivers contain the WbfSpiDriver.dll
winbio plugin) is currently sitting on my github fork here (see for example libfprint/drivers/elanspi.{c,h}
). It's only been tested on one device, where it works for enroll/verify reasonably well (no false positives, a few false negatives)
I'd really like to see this get implemented here so any recommendations for next steps/additional information would be appreciated!