Commit Graph

1912 Commits

Author SHA1 Message Date
Vincent Huang e27b65c930 synaptics: add identify function 2020-10-14 18:48:09 +08:00
Benjamin Berg b03f9a502a tests: Remove old README-umockdev file
It has been superseeded by README.md.
2020-10-14 12:39:10 +02:00
Benjamin Berg 44ef20d5ac aesx660: Use convenience API to allocate USB receive buffer
This also fixes a memory leak of the data as the g_free was missing and
none of the callback handlers free the data either.
2020-10-07 13:38:59 +02:00
Benjamin Berg 4719b30f16 aes1610: Use convenience API to allocate USB receive buffer 2020-10-07 13:38:59 +02:00
Benjamin Berg 7eb361087a drivers: Add access annotations to USB helpers
Mostly for completeness sake, doing this did not find any errors (but
might catch some issues with fixed buffer lengths).
2020-10-07 13:38:59 +02:00
Benjamin Berg 33d50e4e30 usb: Annotate access to USB buffers
Annotate the USB transfer creation functions with the correct buffer
access attribute. Note that we only annotate them as read_only as the
functions may be used for sending and receiving.

Hopefully this will catch buffer overflows in drivers in the future.
2020-10-07 13:22:18 +02:00
Benjamin Berg 994690cfa3 virtual-image: Only read socket when active
Doing this avoids race conditions in testing code where the code might
try to submit errors/images before the device has been activated. This
would then (sometimes) trigger assertions in the image driver code.
2020-10-07 09:44:49 +00:00
Benjamin Berg 52b2d10887 image-device: Delay task completion until device is deactivated
The earlier image device code tried to hide deactivation from the
surrounding library. However, this does not make any sense anymore with
the early reporting feature present.

This changes the operation to complete only once the device is
deactivated. Also changed that in most cases (except for cancellation)
we wait for the finger to be removed before deactivating the device.
2020-10-07 09:44:49 +00:00
Benjamin Berg 81e0f4dfe5 aes3k: Re-send some commands for each capture
The driver seems to have relied on the device to be fully
deactivated and activated again for each capture. This is not the case
during enroll, and as such in can cause issues.

Try fixing this by splitting out the last few commands send to the
device and assuming that this starts the capture.

Fixes: #306
2020-10-07 11:34:12 +02:00
Benjamin Berg c7cab77fc1 usb-transfer: Work around libgusb cancellation issue
We have plenty of code paths where a transfer may be cancelled before it
is submitted. Unfortunately, libgusb up to and including version 0.3.6
are not handling that case correctly (due to libusb ignoring
cancellation on transfers that are not yet submitted).

Work around this, but do so in a somewhat lazy fashion that is not
entirely race free.

Closes: #306
2020-10-01 00:19:35 +02:00
Benjamin Berg a63dcc96d5 virtual_image: Open a window for race conditions during open/close
Delay the open/close callbacks by 100ms so that we have a window of
opportunity for race conditions. This is needed to test certain
conditiosn in fprintd.
2020-09-29 12:02:19 +00:00
Benjamin Berg fab349f356 Remove trailing \n where they are not necessary
Adding a trailing \n to g_message, g_debug, g_warning and g_error is not
neccessary, as a newline will be added automatically by the logging
infrastructure.
2020-09-29 10:42:03 +02:00
Benjamin Berg 62edf93958 tests: Add AES3500 test case
Thanks for Federico Cupellini for providing test samples.
2020-09-29 10:35:48 +02:00
Benjamin Berg 8c4ff253cb aes3k: Fix transfer error path and cancellable lifetime
The cancellable needs to be free'ed at deactivation. Also free it if we
run into a fatal error, which then in turn indicates that the device is
deactivated already.
2020-09-29 10:35:25 +02:00
Benjamin Berg 3ce6a15547 image-device: Don't deactivate if deactivation was already started
The test only prevent deactivation after it completed. Also guard
against trying to deactivate a second time.
2020-09-28 19:12:28 +02:00
Marco Trevisan (Treviño) 8366e397d8 Finalise changelog 2020-09-24 06:22:04 +02:00
Marco Trevisan (Treviño) db56b71caf Update changelog 2020-09-24 06:22:04 +02:00
Marco Trevisan (Treviño) 4cf41fcd24 debian/libfprint-2-tod1.symbols: Added new GType symbols 2020-09-24 06:21:07 +02:00
Marco Trevisan (Treviño) dfecdf9ff3 Update upstream source from tag 'upstream/1.90.3+tod1'
Update to upstream version '1.90.3+tod1'
with Debian dir 26b22ab421
2020-09-24 06:06:17 +02:00
Marco Trevisan (Treviño) 2ef6d1886b New upstream version 1.90.3+tod1 2020-09-24 06:06:08 +02:00
Marco Trevisan (Treviño) 52410c3310 Merge tag 'v1.90.3' into tod
Tag 1.90.3

Git-EVTag-v0-SHA512: 67e0d995146cb82107480520589b6c90583602b3945e03f71c2fdb5f0f2c681143c67e824e0572ae93995e75112c402efaad101f01be5e86a75389e4f1421821
2020-09-24 05:45:35 +02:00
Benjamin Berg 174aa2c091 Release 1.90.3 v1.90.3 2020-09-14 14:23:45 +02:00
Benjamin Berg 9efe25b91c ci: Disable flatpak building for forks
Also move to use a single rules set for flatpak rather than only/except
rules.
2020-09-14 14:17:25 +02:00
Benjamin Berg bcce8876e2 aes3k: Fix cancellation logic of aes3k driver
The change_state function is called synchronously from the
image_captured callback. This means that deactivation of the device
happens during the img_cb function, causing the USB transfer to be
re-registered even though the device is already deactivating.

There are various ways to fix this, but it makes sense to directly bind
the cancellation to the deactivation. So create a cancellable that we
cancel at deactivation time, and make sure we always deactivate by going
through cancellation.

closes: #306
2020-09-14 11:23:38 +00:00
boger.wang 3962372f47 tests: add identify test for driver goodixmoc
add identify ioctl file, modify custom.py add identify test
2020-09-14 09:55:55 +00:00
boger.wang f67f61c638 goodixmoc: Add identify function
this device support verify and identify both, actually call the same
interface.
2020-09-14 09:55:55 +00:00
boger.wang d5f7f4dfaa goodixmoc: Prevent incorrect firmware type running
only firmware type:APP can function well, if device flash in a factory
or test firmware, report a error tips user update firmware by fwupd
2020-09-14 09:55:55 +00:00
Benjamin Berg ce6961d165 image-device: Fix cancellation documentation
Image devices are simply deactivated suddenly. As such, the cancellation
logic of FpDevice is not really useful there, but the documentation was
apparently accidentally copied unmodified.
2020-09-07 12:12:34 +02:00
Benjamin Berg 30e1a68344 ci: Build flatpak using GNOME runner and template 2020-09-03 09:42:28 +02:00
Benjamin Berg 5b087ed848 demo: Switch to use GNOME 3.36 runtime 2020-09-03 09:41:11 +02:00
Benjamin Berg 5d0481b031 context: Lower severity of warning if USB fails to initialise
This is unlikely to happen in a real world scenario and currently breaks
running the CI test (not the umockdev based ones) while building the
flatpak. Lower the severity to avoid aborting because there is a
warning.
2020-09-03 09:41:11 +02:00
Benjamin Berg 596d22a449 context: Fix invalid accesses to GUsbContext if USB is missing
When USB cannot be initialised (inside the flatpak build environment),
then we would have invalid accesses to the NULL pointer. Fix those.
2020-09-03 09:41:11 +02:00
boger.wang c85f385191 tests: add test for goodixmoc driver 2020-09-01 16:39:06 +08:00
boger.wang eb2aaaaa20 drivers: add goodix moc sensor driver support 2020-09-01 16:39:06 +08:00
boger.wang e3c009c5b3 fp-device: add new type FpDeviceError FP_DEVICE_ERROR_DATA_DUPLICATE 2020-09-01 16:39:06 +08:00
Vincent Huang a4f7293f32 synaptics: retry get version command once when receiving non-success
status
2020-08-21 17:42:00 +08:00
Vincent Huang 8b64312f4b synaptics: support sensors pid 0xe9 & 0xdf 2020-07-31 09:47:35 +08:00
Marco Trevisan (Treviño) 16c780c302 debian/changelog: Fix bug number
Damned copy-paste (and my vimrc...)!
2020-06-19 19:34:27 +02:00
Marco Trevisan (Treviño) 349e30e3ae Finalise changelog 2020-06-19 17:38:55 +02:00
Marco Trevisan (Treviño) 13dcb8620b Update changelog 2020-06-19 17:37:26 +02:00
Marco Trevisan (Treviño) 70f4f2c5a4 libfprint-2-tod1.symbols: Add new TOD symbols
No ABI change
2020-06-19 17:37:26 +02:00
Marco Trevisan (Treviño) 5e6ce9fe55 debian/rules: Be strictier about symbol changes 2020-06-19 17:37:26 +02:00
Marco Trevisan (Treviño) dc0371256f debian/rules: Be strictier about symbol changes 2020-06-19 17:35:01 +02:00
Marco Trevisan (Treviño) ef37ef2004 debian/control: Add missing libfprint-2-tod-dev dependencies
Compiling drivers with TOD requires various libraries that we were not
properly listing.

This is based on the libfprint-2-tod-1.pc content file.

LP: #1884267
2020-06-19 17:11:19 +02:00
Marco Trevisan (Treviño) 28bbd94ec9 git_reading_pointer.patch: Dopping 2020-06-19 16:44:18 +02:00
Marco Trevisan (Treviño) 369e91feb4 Update upstream source from tag 'upstream/1.90.2+tod1'
Update to upstream version '1.90.2+tod1'
with Debian dir 65dc429037
2020-06-19 16:43:04 +02:00
Marco Trevisan (Treviño) 1d94579d84 New upstream version 1.90.2+tod1 2020-06-19 16:42:56 +02:00
Marco Trevisan (Treviño) 0e123d0752 Merge tag 'v1.90.2' into tod
Tag 1.90.2
2020-06-19 16:27:51 +02:00
Marco Trevisan (Treviño) 7c359b9135 Update changelog 2020-06-19 16:17:54 +02:00
Marco Trevisan (Treviño) 7b9a8e0dfb git_reading_pointer.patch: Dopping 2020-06-19 16:17:54 +02:00