summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2021-04-12fp-device: Gracefully handle capture calls on devices with no supportlibfprint-1-90Marco Trevisan (Treviño)3-1/+40
2021-04-12device: Make verification support optionalMarco Trevisan (Treviño)2-1/+44
We always assumed a device can verify, but nothing prevents from having a device that only can identify or capture. So, given that we've more fine grained checks, let's stop the task if this is the case.
2021-04-12fpi-device: Add FpiDeviceFeature flags to FpDeviceClassMarco Trevisan (Treviño)12-14/+272
Allows drivers to define more fine grained features for devices, not strictly depending on assumptions we can make depending on the implemented vfuncs. We keep this per class but could be in theory moved to each instance. In any case, added an utility function to initialize it in the way we can ensure that we've a consistent way for setting them across all the devices.
2021-04-12Add nb1010 driverHuan Wang8-0/+855
2021-04-11upeksonly: fix double free in usb transfer cbsMatthew Mirvish1-4/+0
Some USB transfer callbacks in this driver were freeing their transfer buffer in their callbacks, which causes a double free since the transfer itself frees them afterwards. Probably just got missed during the V2 api changes.
2021-04-08spi-transfer: Add SPI transfer helper routinesBenjamin Berg6-0/+612
These routines assume that any messages is composed of a write and/or read part. While the API allows sending and receiving as part of one messages/transfer, it does not permit full duplex operation where data is both send and received at the same time.
2021-04-08Add support for udev based device discoveryMatthew Mirvish9-9/+242
This is primarily useful for SPI devices. These devices sometimes needs a combination of an SPI and HID device, so discovery is a bit more complicated.
2021-04-06fpi-image-device: Allow overriding of enroll stagesmincrmatt122-4/+5
2021-04-01ci: Do not use verbose logging for tests, just rely on artifactsMarco Trevisan (Treviño)1-2/+2
Only print errors if any
2021-04-01device: Gracefully handle identify on devices with no supportMarco Trevisan (Treviño)2-0/+17
We were crashing as trying to still call the identify vfunc, so check if identification is supported and if not return a relative error. Added test as well
2021-04-01doc/libfprint-2.types: Also include fp-image-device to get image typeMarco Trevisan (Treviño)1-0/+1
2021-03-21synaptics: add new PID 0x100 and remove PID 0xE7Aris Lin2-9/+9
2021-03-17doc: Add a few missing functions to documentationBenjamin Berg1-0/+7
2021-03-17doc: Remove symbol that does not existBenjamin Berg1-1/+0
fpi_ssm_next_state_timeout_cb simply does not exist, remove it.
2021-03-17doc: Add .types file for signals and propertiesBenjamin Berg2-0/+8
Without this the signals/properties are simply missing from the documentation, which is obviously not very useful.
2021-03-12Added test for vfs7552Julius Piso5-0/+5074
2021-03-12Added driver for validity vfs7552Julius Piso6-2/+4064
2021-03-12ssm: Add getter for the deviceBenjamin Berg3-0/+18
In some cases it can be useful to be able to retrieve the device. Add the corresponding getter to do so.
2021-03-03tests/virtual-device: Add test checking close while we're still openingMarco Trevisan (Treviño)1-0/+24
2021-03-03fpi-assemping: Do not include unneeded headers and do not use absolute ↵Marco Trevisan (Treviño)1-1/+1
search paths
2021-03-03demo: Fix flatpak build after udev option renameBenjamin Berg1-1/+1
2021-03-03synaptics: Remove usb resetAris Lin1-7/+2
It will trigger firmware to do some activities, remove it in device open and device probe.
2021-03-03meson: Autodetect whether autosuspend rules are provided by udevBenjamin Berg3-7/+19
Upstream systemd/udev is pulling our autosuspend hwdb, so if udev is new enough, then there is no need to install the file. As such, add auto-detection logic for the scenario. This also changes the name of the option and the type to "feature".
2021-03-03data: Add note that the unsupported device list needs a manual syncBenjamin Berg1-0/+2
2021-03-03udev-hwdb: Update list of unsupported devicesBenjamin Berg2-0/+12
2021-02-22virtual-device: Move shared functions into the internal scopeMarco Trevisan (Treviño)4-143/+143
We are currently exporting such functions in the library, even though they are meant to be only private.
2021-02-22virtual-image: Use explicit list of cases in which we want to listenMarco Trevisan (Treviño)1-4/+11
Depending on the enum order is ok, but not really maintainable so better to explicitly list the states we want to listen.
2021-02-05synaptics: Fix lost messages when sequence counter overflowsBenjamin Berg1-1/+1
The device will always use sequence number 0 for certain messages. We use this knowledge to filter the messages and assume that it is one of these special messages rather than a response to a command. However, we could end up sending a command with a sequence counter of 0 which would result in the response being ignored. Fix this by ensuring we correctly wrap from 255 to 1 instead of 0. Fixes: #358
2021-02-04goodixmoc:Add new PIDweilei2-0/+2
Add PID 6594 used by LENOVO
2021-02-02goodixmoc: support power button shield featurefengqiangguo6-279/+320
Some OEM will integrate fingerprint device with powerButton. It's possible that a user may press the power button during fingerprint enroll or identify. This would lead to unintended PC shutdown or hibernation. We add pwr_btn_shield cmd and related process to shield the power button function when the fingerprint functionality (enroll and identify) is used and restore power button function afterwards.
2021-01-29goodix: Consume the retry errors during verify/identify reportsMarco Trevisan (Treviño)1-2/+2
We should not pass such kind of errors to complete functions, or we'll fail the identification without ability to retry immediately.
2021-01-28virtual-device: Do actual errors codes checks instead of regex checksMarco Trevisan (Treviño)1-9/+27
2021-01-28tests/virtual-device: Add enroll and verify script testMarco Trevisan (Treviño)1-0/+35
2021-01-28virtual-device: Add SET_KEEP_ALIVE command, to keep the listener upMarco Trevisan (Treviño)3-11/+64
We may want to be able to talk with the device while it's closed to queue commands to be performed once it opens (could be even a script), so to do this we need to close the device first, send those commands and eventually process them. We used a trick to send an invalid command before that was ignored by release, but having the device available is just easier to handle. So, when keep alive is enabled we don't stop the listener when closing but only on actual device disposition.
2021-01-28virtual-device: Make possible to use a script to perform enroll operationsMarco Trevisan (Treviño)2-1/+93
2021-01-28virtual-device: Handle cancelled state gracefully in should_wait_to_sleepMarco Trevisan (Treviño)1-1/+5
2021-01-28virtual-device: Add test that open fails with a busy error if is still ongoingMarco Trevisan (Treviño)1-0/+22
The idea of the test was just checking what happens when we're opening a device multiple times while a first request is still going. However, it actually ends up also checking the previous commit change because without it we'd stop the close iteration before the device is actually closed and stop the open iteration before the device is actually opened, leading to an infinite loop.
2021-01-28fpi-device: Mark the device as open and notify it on idle callbackMarco Trevisan (Treviño)1-12/+15
We're delaying any completed operation until we've completed an idle, but the open/close state is changed and notified as soon as the device completes the operation. While this can be true, it means that we notify earlier than the finish callback is actually called, while iterations are still needed to get the actual state completed, and the current_task reset. So if we'd open/close and iterate till fp_device_is_open() returns TRUE we'd end up in a state in which the device is marked as ready, but it's actually still busy since it's priv->current_task isn't unset yet. The same if we'd try to do any action on notify::opened.
2021-01-28virtual-device: Add test checking for early errors during dev API callsMarco Trevisan (Treviño)1-1/+116
2021-01-28fp-device: Do not try to deference potentially NULL task dataMarco Trevisan (Treviño)1-3/+3
In case we do an early error return in verify and identify calls we do not initialize the task data, but still in the finish functions we still try to use it. Avoid doing this, but just nullify the returned values.
2021-01-28virtual-device: Check properties match the gettersMarco Trevisan (Treviño)1-0/+6
2021-01-28tests/virtual-*: Check for enrolled prints propertiesMarco Trevisan (Treviño)2-0/+10
2021-01-28fp-device: Fix property getters for enroll stages and driver IDMarco Trevisan (Treviño)1-2/+2
We were returning an invalid type for the enroll stages, while trying to get the class from the private instance for the device driver
2021-01-28virtual-device: Process supported commands on device openMarco Trevisan (Treviño)2-1/+60
When opening the device we can process commands that we left for that after the previous close, to do that we only have to inject an invalid command that will be processed (and ignored) while closing, so that at next device opening we will be able to proceed with the previously sent commands. Add tests to finally check this case!
2021-01-28virtual-device: Remove messages we can't process from queue when not scanningMarco Trevisan (Treviño)2-1/+11
Commands that are not valid for non-scan operations should be removed from queue, or these may be re-proposed forever.
2021-01-28virtual-device: Use python's with idiom to check GLib expected error messagesMarco Trevisan (Treviño)1-16/+28
And we can properly provide a real traceback as well
2021-01-28virtual-device: Return an duplicated data error if trying to re-enroll a printMarco Trevisan (Treviño)2-0/+17
2021-01-28tests/virtual-device: Properly handle exceptions on enroll callbackMarco Trevisan (Treviño)1-1/+7
We need to get them back to the caller function to be caught by the test suite.
2021-01-28virtual-device: Emit data not found during verify/identifyMarco Trevisan (Treviño)3-26/+80
If trying to identify a print not in the storage we emit data not found error, this can be helpful to do further fprintd testing too
2021-01-28virtual-device-storage: Don't listed printsMarco Trevisan (Treviño)1-1/+1