Commit graph

522 commits

Author SHA1 Message Date
boger f579a77bfd goodixmoc: add PID 63BC
63BC: Dell XPS series fingerprint sensor
2021-09-17 19:28:51 +08:00
Aris Lin 128d809227 synaptics: add new PID 0x0123, 0x0126, and 0x0129 2021-09-17 12:42:51 +02:00
Benjamin Berg d763f8f41a elanmoc: Fix warning
Really, it shouldn't matter, as there is no return. But adding the NULL
initializer does not harm either.
2021-09-15 15:54:25 +02:00
Benjamin Berg c162b895c0 uru4000: Fix transfer type on interrupt endpoint
It appears the kernel automatically "fixes" this mistake and it works.
the transfer in question is an interrupt transfer and should be submitted
as such. Do that in order to make things more correct and so that the
test can run.
2021-09-08 20:37:00 +02:00
Benjamin Berg 3108ac3144 virtual-device: Return empty no-match if unknown SCAN id is passed
This matches the expectation. i.e. we return no-match and we do not
return a scanned print as we don't have anything for it. If we did
indeed return a scanned print, then fprintd would try to delete it
during enroll and would then fail.

Note that we do *not* return a DATA_NOT_FOUND error in the storage
device if the print does not exist. This is because not all devices
support reporting this error. It is therefore more sensible to handle it
gracefully and expect test setups to set the error explicitly for
testing purposes.
2021-08-19 18:59:38 +02:00
Benjamin Berg c928d7bd8f synaptics: Fix error handling when releasing the USB interface
The error may not be NULL, as such we need a second variable and then
we'll only forward any error from g_usb_device_release_interface if
there was none before.
2021-08-10 19:04:50 +02:00
hermanlin ec42b2ade1 elanmoc: Increase of the timeout 2021-08-10 16:45:16 +08:00
hermanlin 4edfa48608 elanmoc: Fix the identify/verify error reporting in identify_status_report 2021-08-10 16:40:03 +08:00
hermanlin 1a5df96751 elanmoc: Return the correct error when the storage is full 2021-08-10 16:34:37 +08:00
hermanlin 62448492af elanmoc: Adjustments to protocol change (passing an empty user ID) 2021-08-10 16:22:54 +08:00
Benjamin Berg 5c89bda7f3 synaptics: Implement suspend/resume methods
We only allow suspending while we are in the interrupt transfer stage.
To suspend, we cancel the interrupt transfer and at resume time we
restart it.

This has been tested to work correctly on an X1 Carbon 8th Gen with
suspend mode set to "Windows 10" (i.e. S0ix [s2idle] and not S3 [suspend
to RAM]). With S3 suspend, the USB root hub appears to be turned off or
reset and the device will be unresponsive afterwards (if it returns). To
avoid issues, libfprint disables the "persist" mode in the kernel and
we'll see a new device instead after resume.
2021-08-09 16:08:27 +02:00
Benjamin Berg d547c000fc synaptics: Use critical section API
This is more for demonstration purposes. The only functional change here
would be that the delete command cannot be cancelled.
2021-08-09 16:08:21 +02:00
Benjamin Berg a2d950044d device: Add simple temperature model for devices
This temperature model has three states:
 * COLD
 * WARM
 * HOT

Device drivers can define the time it requires for the device to get HOT
and COLD. The underlying model assumes an exponential warming and
cooling process and enforces a cool-off time after the device has
reached the HOT state. This cool down period is however shorter than the
specified time in the driver.
2021-08-09 16:08:17 +02:00
mozgovoy dd476c0ccf elan: Add PID 0x0c58 2021-07-30 10:15:23 +02:00
Benjamin Berg 4cdca4da24 virtual-device: Do not time out when waiting for SCAN command
The timeout is designed to continue commands automatically that are
common (e.g. opening the device). This doesn't really make sense for
scan commands, and removing the timeout enables test setups where user
interaction with the device may happen at arbitrary times.

One exception is device removal/unplug, in which case the timeout will
be added anyway.
2021-07-26 20:05:12 +02:00
Benjamin Berg 9e7bfa05b3 synaptics: Immediately succeed for empty identify
Such an empty identify can be run by fprintd intentionally for duplicate
checking at the start of an enroll operation, which currently runs into
an error from the driver.

Avoid this by simply returning success immediately. This is fine, as
synaptics is only checking the explicitly passed list of prints rather
than using all available prints from the storage.
2021-07-12 11:43:46 +00:00
Liran Piade 9ecd6236ee Added ELAN 0c6e (from ROG Flow X13) 2021-07-08 21:36:38 +02:00
Saeed/Ali Rk f7290255e0 egistec: Add new driver
This supports 1c7a:0570

Co-Authored-By: Maxim Kolesnikov <kolesnikov@svyazcom.ru>
2021-07-08 13:42:22 +02:00
hermanlin 42676dd300 elanmoc: Add elanmoc driver
Signed-off-by: hermanlin <herman.lin@emc.com.tw>
2021-07-07 13:35:59 +02:00
Benjamin Berg 45c5d17f3b elanspi: Fix format string 2021-07-06 20:56:16 +00:00
Benjamin Berg fc76db562e aesx660: Fix format strings 2021-07-06 20:56:16 +00:00
Benjamin Berg 9f93f5ded7 virtual-device: Fix format strings 2021-07-06 20:56:16 +00:00
Benjamin Berg 74c4125827 upekts: Fix format strings 2021-07-06 20:56:16 +00:00
Benjamin Berg 4f6d908390 upeksonly: Fix format string warning by using unsigned
There is no need to use size_t for num_rows as it is capped to NUM_ROWS
which is defined to 2048.
2021-07-06 20:56:16 +00:00
Benjamin Berg 575bd369d5 upektc: Fix format string on architectures where 64bit is not long 2021-07-06 20:56:16 +00:00
Benjamin Berg 304219b65c upektc_img: Fix warnings in debug format strings 2021-07-06 20:56:16 +00:00
Benjamin Berg d957bbd0f4 synaptics: Fix warning about missing initialization
The compiler seems to (incorrectly) think that cleanup might happen
before the variable has been initialized.
2021-06-30 15:58:12 +02:00
Benjamin Berg cdaa3497d7 virtual-storage: Add variant without list support
Simply remove the feature flag for the NO_LIST environment variable.

This also removes the IDENT variant for now as it has never been
implemented as described.
2021-06-25 17:38:28 +02:00
Bastien Nocera 4ef13d971d uru4000: Use GLib's random functions
So we can set a static seed when running tests.
2021-06-25 10:23:42 +02:00
Bastien Nocera a267e30fc6 uru4000: Don't throw warnings during "power on"
During startup, we'd always get:
(fprintd:151125): libfprint-uru4000-WARNING **: 12:16:56.724: ignoring unexpected interrupt 56aa

But we actually know what this interrupt is, and it's not unexpected, as
it tells us that the reader is now powered on.
2021-06-25 10:23:42 +02:00
Benjamin Berg e2f199bb6a vfs301: Fix leak of USB transfer
vfs301_proto_peek_event would leak the returned transfer. Use a
g_autoptr to fix this.
2021-06-23 22:49:59 +02:00
Matthew Mirvish 8be666bb05 elanspi: Permit running in emulated environment
This removes the HID reset, which we cannot emulate currently and also
disabes the line timeout to as simulation might run too slowly at times.
2021-06-23 20:42:52 +00:00
Matthew Mirvish 019a294ec4 elanspi: Add driver supporting various ELAN SPI sensors
Closes: #339
2021-06-23 20:42:52 +00:00
boger 1ed2b23902 goodixmoc: add PID 609C/6584/658C/6592/659C
add some new PID support,
609C: Framework fingerprint sensor
65xx: Thinkpad series fingerprint sensor
2021-06-23 15:30:28 +08:00
Benjamin Berg ba920aa41b goodixmoc: Remove internal cancellable
The driver has an internal cancellable that simply forwards the external
cancellation in the cancel callback. This is not really needed, we can
instead just use the external cancellable directly by fetching it using
fpi_device_get_cancellable().
2021-06-21 15:11:18 +00:00
Benjamin Berg 098ff97edd drivers: Fix upekts/upek_proto license
The (trivial) CRC code was copied from gstreamer. However, the license
stated here was LGPLv2 rather than LGPLv2.1+. Identical code can currently
be found upstream in gstreamer licensed under LGPLv2+. As such, update
the license, making it more compatible with the rest of libfprint.

Also add the "or any later version" to upekts.c. The library was already
LGPL2.1+ at the time and libthinkfinger authors approved a license
change.
2021-06-17 13:08:19 +00:00
Vincent Huang 0edae7b641 synaptics: Remove PID 0xE9 2021-06-17 08:00:47 +00:00
Vincent Huang 49e3963783 synaptics: Return success when deleting a print that doesn't exist in
the database or database empty
2021-06-16 15:53:46 +00:00
Aris Lin 040d0d34fd synaptics: Send a cancel to sensor if it returns busy
fix #380
2021-06-16 15:40:02 +00:00
Nelson Jeppesen 82c406dace goodixmoc: Add PID 6A94 2021-06-07 10:40:45 +00:00
Benjamin Berg 439223cac3 virtual-device-storage: Actually clear storage when requested 2021-05-14 15:28:54 +00:00
Benjamin Berg 992a207ede virtual-device: Refactor command handling and add CONT command
This command is useful to immediately continue rather than waiting for
input. It is only useful for non-scanning device actions and can be
important when steps need to be explicitly skipped (e.g. to inject an
error in the second command without a way to wait in between).
2021-05-14 15:28:54 +00:00
Benjamin Berg e9dddcc87a virtual-image: Fix compilation with -Wswitch-enum 2021-05-14 15:28:54 +00:00
Benjamin Berg 7e02f3faf9 virtual-device: Avoid/Fix -Wswitch-enum warnings 2021-05-14 15:28:54 +00:00
Benjamin Berg 668b3517a9 upeksonly: Explicit list default enum value 2021-05-14 15:28:54 +00:00
Aris Lin 4d5e2775b2 synaptics: add new PID 0xF0 and 0x103 2021-05-05 15:24:25 +08:00
Vincent Huang 8a04578847 synaptics: Add clear_storage() and remove list() 2021-04-29 11:49:27 +00:00
Vincent Huang 77e95aa545 fp-device: Add fp_device_clear_storage and clear_storage vfunc 2021-04-29 11:49:27 +00:00
Benjamin Berg d683b271d4 ssm: Remove delayed action GCancellable integration
Unfortunately, the implementation was not thread safe and was not
sticking to the thread local main context.

In addition to this, it is not entirely clear to me how this API should
behave. The current approach is to simply cancel the transition with the
state machine halting in its current state. Instead, it could also make
sense for cancellation to cause the state machine to return a
G_IO_ERROR_CANCELLED.

As such, simply remove the feature for now. If anyone actually has a
good use-case then we can add it again.
2021-04-28 22:16:37 +02:00
Benjamin Berg 11e379050f goodixmoc: Ensure power button shield is always turned off
Use the new cleanup feature of the SSM to ensure that the power button
shield is turned off again even if the operation is cancelled.
2021-04-28 20:10:20 +00:00