mirror of
https://gitlab.freedesktop.org/libfprint/libfprint.git
synced 2026-09-10 13:00:08 +00:00
Compare commits
928
Commits
+115
-26
@@ -1,39 +1,56 @@
|
||||
include:
|
||||
- local: '.gitlab-ci/libfprint-image-variables.yaml'
|
||||
- local: '.gitlab-ci/libfprint-templates.yaml'
|
||||
- project: 'wayland/ci-templates'
|
||||
- project: 'freedesktop/ci-templates'
|
||||
ref: master
|
||||
file: '/templates/fedora.yml'
|
||||
- remote: 'https://gitlab.gnome.org/GNOME/citemplates/-/raw/master/flatpak/flatpak_ci_initiative.yml'
|
||||
|
||||
default:
|
||||
# Auto-retry jobs in case of infra failures
|
||||
retry:
|
||||
max: 1
|
||||
when:
|
||||
- 'runner_system_failure'
|
||||
- 'stuck_or_timeout_failure'
|
||||
- 'scheduler_failure'
|
||||
- 'api_failure'
|
||||
|
||||
variables:
|
||||
extends: .libfprint_common_variables
|
||||
FDO_DISTRIBUTION_TAG: latest
|
||||
FDO_DISTRIBUTION_TAG: $LIBFPRINT_IMAGE_TAG
|
||||
FDO_DISTRIBUTION_VERSION: rawhide
|
||||
FDO_UPSTREAM_REPO: "libfprint/$CI_PROJECT_NAME"
|
||||
FEDORA_IMAGE: "$CI_REGISTRY/libfprint/$CI_PROJECT_NAME/fedora/$FDO_DISTRIBUTION_VERSION:$FDO_DISTRIBUTION_TAG"
|
||||
BUNDLE: "org.freedesktop.libfprint.Demo.flatpak"
|
||||
LAST_ABI_BREAK: "056ea541ddc97f5806cffbd99a12dc87e4da3546"
|
||||
|
||||
workflow:
|
||||
rules:
|
||||
- if: $CI_PIPELINE_SOURCE == 'merge_request_event'
|
||||
- if: $CI_PIPELINE_SOURCE == 'push'
|
||||
|
||||
stages:
|
||||
- image-build
|
||||
- check-source
|
||||
- build
|
||||
- test
|
||||
- flatpak
|
||||
|
||||
image: "$FEDORA_IMAGE"
|
||||
image: $FEDORA_IMAGE
|
||||
|
||||
.build_one_driver_template: &build_one_driver
|
||||
script:
|
||||
# Build with a driver that doesn't need imaging, or nss
|
||||
- meson --werror -Ddrivers=$driver . _build
|
||||
- ninja -C _build
|
||||
- meson setup _build --werror -Ddrivers=$driver
|
||||
- meson compile -C _build
|
||||
- rm -rf _build/
|
||||
|
||||
.build_template: &build
|
||||
script:
|
||||
# And build with everything
|
||||
- meson --werror -Ddrivers=all . _build
|
||||
- ninja -C _build
|
||||
- ninja -C _build install
|
||||
- meson setup _build --werror -Ddrivers=all
|
||||
- meson compile -C _build
|
||||
- meson install -C _build
|
||||
|
||||
.build_template: &check_abi
|
||||
script:
|
||||
@@ -62,13 +79,18 @@ test:
|
||||
variables:
|
||||
- $CI_PIPELINE_SOURCE == "schedule"
|
||||
script:
|
||||
- meson --werror -Ddrivers=all -Db_coverage=true . _build
|
||||
- ninja -C _build
|
||||
- meson setup _build --werror -Ddrivers=all -Db_coverage=true
|
||||
- meson test -C _build --print-errorlogs --no-stdsplit --timeout-multiplier 3
|
||||
- ninja -C _build coverage
|
||||
- cat _build/meson-logs/coverage.txt
|
||||
- cat _build/meson-logs/coverage.txt || true
|
||||
artifacts:
|
||||
reports:
|
||||
junit: "_build/meson-logs/testlog.junit.xml"
|
||||
coverage_report:
|
||||
coverage_format: cobertura
|
||||
path: _build/meson-logs/coverage.xml
|
||||
expose_as: 'Coverage Report'
|
||||
when: always
|
||||
paths:
|
||||
- _build/meson-logs
|
||||
- _build/meson-logs/coveragereport/index.html
|
||||
@@ -77,20 +99,47 @@ test:
|
||||
|
||||
test_valgrind:
|
||||
stage: test
|
||||
allow_failure: true
|
||||
except:
|
||||
variables:
|
||||
- $CI_PIPELINE_SOURCE == "schedule"
|
||||
script:
|
||||
- meson -Ddrivers=all . _build
|
||||
- ninja -C _build
|
||||
- meson setup _build -Ddrivers=all
|
||||
- meson compile -C _build
|
||||
- meson test -C _build --print-errorlogs --no-stdsplit --setup=valgrind
|
||||
artifacts:
|
||||
reports:
|
||||
junit: "_build/meson-logs/testlog-valgrind.junit.xml"
|
||||
expose_as: 'Valgrind test logs'
|
||||
when: always
|
||||
paths:
|
||||
- _build/meson-logs
|
||||
- _build/meson-logs/testlog-valgrind.txt
|
||||
expire_in: 1 week
|
||||
|
||||
test_installed:
|
||||
stage: test
|
||||
except:
|
||||
variables:
|
||||
- $CI_PIPELINE_SOURCE == "schedule"
|
||||
script:
|
||||
- meson setup _build --prefix=/usr -Ddrivers=all
|
||||
- meson install -C _build
|
||||
- mv _build _build_dir
|
||||
- rm -rf tests
|
||||
- gnome-desktop-testing-runner --list libfprint-2
|
||||
- gnome-desktop-testing-runner libfprint-2
|
||||
--report-directory=_installed-tests-report/failed/
|
||||
--log-directory=_installed-tests-report/logs/
|
||||
--parallel=0
|
||||
artifacts:
|
||||
expose_as: 'GNOME Tests Runner logs'
|
||||
when: always
|
||||
paths:
|
||||
- _build_dir/meson-logs
|
||||
- _installed-tests-report
|
||||
expire_in: 1 week
|
||||
|
||||
|
||||
test_scan_build:
|
||||
stage: test
|
||||
@@ -99,10 +148,12 @@ test_scan_build:
|
||||
- $CI_PIPELINE_SOURCE == "schedule"
|
||||
allow_failure: true
|
||||
script:
|
||||
- meson -Ddrivers=all . _build
|
||||
- meson setup _build -Ddrivers=all
|
||||
# Wrapper to add --status-bugs and disable malloc checker
|
||||
- SCANBUILD=$CI_PROJECT_DIR/.gitlab-ci/scan-build ninja -C _build scan-build
|
||||
- SCANBUILD=$CI_PROJECT_DIR/.gitlab-ci/scan-build
|
||||
ninja -C _build scan-build
|
||||
artifacts:
|
||||
when: on_failure
|
||||
paths:
|
||||
- _build/meson-logs
|
||||
expire_in: 1 week
|
||||
@@ -115,7 +166,7 @@ test_indent:
|
||||
script:
|
||||
- scripts/uncrustify.sh
|
||||
- git diff
|
||||
- "! git status -s | grep -q ."
|
||||
- git diff-index --name-only --exit-code HEAD
|
||||
|
||||
test_unsupported_list:
|
||||
stage: check-source
|
||||
@@ -128,33 +179,43 @@ test_unsupported_list:
|
||||
|
||||
flatpak:
|
||||
stage: flatpak
|
||||
extends: .flatpak
|
||||
image: registry.gitlab.gnome.org/gnome/gnome-runtime-images/gnome:3.36
|
||||
extends: .flatpak@x86_64
|
||||
variables:
|
||||
MANIFEST_PATH: "demo/org.freedesktop.libfprint.Demo.json"
|
||||
FLATPAK_MODULE: "libfprint"
|
||||
APP_ID: "org.freedesktop.libfprint.Demo"
|
||||
BUNDLE: "org.freedesktop.libfprint.Demo.flatpak"
|
||||
RUNTIME_REPO: "https://nightly.gnome.org/gnome-nightly.flatpakrepo"
|
||||
# Build with any builder
|
||||
tags: []
|
||||
rules:
|
||||
- if: '$CI_PROJECT_PATH != "libfprint/libfprint"'
|
||||
when: never
|
||||
when: manual
|
||||
allow_failure: true
|
||||
- if: '$CI_PIPELINE_SOURCE == "schedule"'
|
||||
when: never
|
||||
- if: '$CI_COMMIT_BRANCH == "master"'
|
||||
allow_failure: true
|
||||
when: always
|
||||
- if: '$CI_COMMIT_TAG'
|
||||
allow_failure: true
|
||||
when: always
|
||||
# For any other (commit), allow manual run.
|
||||
# This excludes MRs which would create a duplicate pipeline
|
||||
- if: '$CI_COMMIT_BRANCH'
|
||||
when: manual
|
||||
allow_failure: true
|
||||
- if: '$CI_MERGE_REQUEST_ID'
|
||||
when: manual
|
||||
allow_failure: true
|
||||
|
||||
# CONTAINERS creation stage
|
||||
container_fedora_build:
|
||||
.container_fedora_build_base:
|
||||
extends: .fdo.container-build@fedora
|
||||
stage: image-build
|
||||
only:
|
||||
variables:
|
||||
- $CI_PIPELINE_SOURCE == "schedule" && $CRON_TASK == "BUILD_CI_IMAGES"
|
||||
- $CI_PIPELINE_SOURCE == "never"
|
||||
variables:
|
||||
GIT_STRATEGY: none # no need to pull the whole tree for rebuilding the image
|
||||
# a list of packages to install
|
||||
@@ -164,7 +225,35 @@ container_fedora_build:
|
||||
libpcap-devel
|
||||
libudev-devel
|
||||
FDO_DISTRIBUTION_EXEC: |
|
||||
git clone https://github.com/martinpitt/umockdev.git && \
|
||||
cd umockdev && \
|
||||
meson _build --prefix=/usr && \
|
||||
ninja -C _build && ninja -C _build install
|
||||
$LIBFPRINT_EXEC
|
||||
|
||||
.container_fedora_build_forced:
|
||||
variables:
|
||||
FDO_FORCE_REBUILD: 1
|
||||
|
||||
container_fedora_build_schedule:
|
||||
extends:
|
||||
- .container_fedora_build_base
|
||||
- .container_fedora_build_forced
|
||||
only:
|
||||
variables:
|
||||
- $CI_PIPELINE_SOURCE == "schedule" && $CRON_TASK == "BUILD_CI_IMAGES"
|
||||
|
||||
container_fedora_build_manual:
|
||||
extends:
|
||||
- .container_fedora_build_base
|
||||
- .container_fedora_build_forced
|
||||
only:
|
||||
variables:
|
||||
- $LIBFPRINT_CI_ACTION == "build-image"
|
||||
|
||||
container_fedora_build_on_deps_changed:
|
||||
extends: .container_fedora_build_base
|
||||
only:
|
||||
variables:
|
||||
- $CI_PROJECT_NAMESPACE == "libfprint" && $CI_PIPELINE_SOURCE != "schedule"
|
||||
refs:
|
||||
- branches
|
||||
- merge_requests
|
||||
changes:
|
||||
- .gitlab-ci/libfprint-image-variables.yaml
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
variables:
|
||||
LIBFPRINT_IMAGE_TAG: v3
|
||||
@@ -1,6 +1,10 @@
|
||||
# Bump image version on .gitlab-ci/libfprint-image-variables.yaml to trigger
|
||||
# a rebuild on changes to this file
|
||||
|
||||
.libfprint_common_variables:
|
||||
LIBFPRINT_DEPENDENCIES:
|
||||
doxygen
|
||||
dnf-plugins-core
|
||||
flatpak-builder
|
||||
gcc
|
||||
gcc-c++
|
||||
@@ -9,6 +13,7 @@
|
||||
glib2-devel
|
||||
glibc-devel
|
||||
gobject-introspection-devel
|
||||
gnome-desktop-testing
|
||||
gtk-doc
|
||||
gtk3-devel
|
||||
libabigail
|
||||
@@ -26,3 +31,19 @@
|
||||
uncrustify
|
||||
valgrind
|
||||
clang-analyzer
|
||||
diffutils
|
||||
|
||||
LIBFPRINT_EXEC: |
|
||||
dnf -y install dnf-utils
|
||||
debuginfo-install -y \
|
||||
glib2 \
|
||||
glibc \
|
||||
libgusb \
|
||||
libusb \
|
||||
nss \
|
||||
pixman
|
||||
|
||||
git clone https://github.com/martinpitt/umockdev.git && \
|
||||
cd umockdev && \
|
||||
meson _build --prefix=/usr && \
|
||||
ninja -C _build && ninja -C _build install
|
||||
|
||||
@@ -1,6 +1,107 @@
|
||||
This file lists notable changes in each release. For the full history of all
|
||||
changes, see ChangeLog.
|
||||
|
||||
2024-02-20: v1.94.7 release
|
||||
|
||||
Highlights:
|
||||
* synaptics: fix enroll identify problem after user reset database.
|
||||
* synaptics: New PIDs 0x0173, 0x0106, 0x0124.
|
||||
* goodixmoc: New PID 0x6582.
|
||||
* build: Do not require bash to build, only posix sh.
|
||||
* fp-image: Simplify minutiae detection tasks.
|
||||
* GLib 2.68 is now required to build libfprint.
|
||||
|
||||
New drivers:
|
||||
* realtek (PID 0x5813).
|
||||
* focaltech_moc (PIDs 0x9E48, 0xD979, 0xA959).
|
||||
* egismoc (PIDs 0x0582, 0x05a1).
|
||||
|
||||
2023-08-17: v1.94.6 release
|
||||
|
||||
Highlights:
|
||||
* goodixmoc: New PIDs 0x60A4, 0x60BC, 0x6092, 0x633C and 0x6304.
|
||||
* goodixmoc: Fix missing "enroll create" state.
|
||||
* elanmoc: New PID 0x0C99.
|
||||
* upektc: Improve compatibility with sensors 147e:2016.
|
||||
* aes4000: Actually support 08FF:5501 devices.
|
||||
* virtual-device-listener: Fix failing tests with GLib 2.76
|
||||
* tests: Add installed tests
|
||||
|
||||
Bugs fixed:
|
||||
* #526 libfprint: fpcmoc: use after free if enrollment or identification is
|
||||
cancelled (Vasily Khoruzhick)
|
||||
|
||||
2022-10-13: v1.94.5 release
|
||||
|
||||
Highlights:
|
||||
* New driver: fpcmoc, supporting various FPC MOC Fingerprint Sensors
|
||||
* goodixmoc: New PIDs 0x6014, 0x6094, 0x631C, 0x634C, 0x6384, 0x659A.
|
||||
* goodixmoc: Support resetting device on firmware failure due to corrupted DB.
|
||||
* elanmoc: New PIDs 0x0c88, 0x0c8c, 0x0c8d.
|
||||
* synaptics: New PID 0x0104.
|
||||
* upektc: New PID 0x2017.
|
||||
* Fixed various memory leaks
|
||||
* More tests
|
||||
|
||||
2022-05-24: v1.94.4 release
|
||||
|
||||
Highlights:
|
||||
* synaptics: New PIDs 0x0168, 0x015f
|
||||
* elan: New PID 0x0c4b
|
||||
* elanspi: New PID 0x241f
|
||||
* synaptics: Minor fix to interrupt transfer resubmission
|
||||
* Avoid sysfs writes if value is already expected
|
||||
* Improvements to the testing setup
|
||||
* Fixes to the internal critical section API
|
||||
|
||||
2021-11-02: v1.94.3 release
|
||||
|
||||
Highlights:
|
||||
* Ensure idle mainloop before completing enumeration (fprintd#119)
|
||||
* It is now possible to extend already enrolled prints
|
||||
* elanspi: Fix timeout error with some hardware (#438)
|
||||
* elanspi: Fix cancellation issues
|
||||
* goodixmoc: Return matching device print; fixes duplicate checking (#444)
|
||||
* goodixmoc: Support clearing the storage (usually unused)
|
||||
|
||||
2021-11-02: v1.94.2 release
|
||||
|
||||
Highlights:
|
||||
* goodixmoc: Fix protocol error with certain username lengths
|
||||
* elanmoc: New PID 0x0c7d
|
||||
* goodixmoc: New PID 0x63cc
|
||||
|
||||
2021-09-24: v1.94.1 release
|
||||
|
||||
Highlights:
|
||||
* Ship a simple script to create new CI tests using tshark
|
||||
* Added CI tests for elan, uru4000, aes2501
|
||||
* goodixmoc: Remove duplicate checking during enroll and let fprintd handle it
|
||||
* uru4000: Fix USB transfer type
|
||||
* synaptics: Support for new PIDs
|
||||
* goodixmoc: Support for new PIDs
|
||||
|
||||
2021-08-20: v1.94.0 release
|
||||
|
||||
Highlights:
|
||||
* Implement suspend/resume handling including USB wakeup configuration.
|
||||
This requires writing the "persist" and "wakeup" sysfs attributes.
|
||||
* Add simple temperature module to prevent devices from becoming too hot
|
||||
* Add feature for continuous scanning
|
||||
* New internal "critical section" API to simplify driver development
|
||||
* elan: new PID 0x0c58
|
||||
* elanmoc: Fixes for multi-user handling and FW changes
|
||||
* virtual-device: Do not time out for SCAN command
|
||||
|
||||
2021-06-30: v1.92.1 release
|
||||
|
||||
Highlights:
|
||||
* elanmoc: New driver for ELAN match-on-chip devices
|
||||
* egis0570: New driver for some Egis Technology devices
|
||||
* synaptics: Fix empty identify causing enroll issues
|
||||
* elan: Support more PIDs
|
||||
* misc: Architecture related bugfixes
|
||||
|
||||
2021-06-30: v1.92.0 release
|
||||
|
||||
Highlights:
|
||||
@@ -271,7 +372,7 @@ tests of the drivers using umockdev.
|
||||
- Mark fp_dscv_print functions as deprecated
|
||||
|
||||
* Udev rules:
|
||||
- Add some unsupported devices to the whitelist
|
||||
- Add some unsupported devices to the allowlist
|
||||
|
||||
2017-05-14: v0.7.0 release
|
||||
* Drivers:
|
||||
@@ -321,7 +422,7 @@ tests of the drivers using umockdev.
|
||||
- Fix possible race condition, and cancellation in uru4000 driver
|
||||
|
||||
* Udev rules:
|
||||
- Add Microsoft keyboard to the suspend blacklist
|
||||
- Add Microsoft keyboard to the suspend denylist
|
||||
|
||||
* Plenty of build fixes
|
||||
|
||||
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
### libfprint-TOD v1
|
||||
|
||||
- First public release
|
||||
- Based on [libfprint 1.90.1](https://gitlab.freedesktop.org/libfprint/libfprint/-/releases#v1.90.1)
|
||||
- Bumped TOD version to 1
|
||||
|
||||
### Highlights of the Drivers API changes
|
||||
|
||||
Both the driver and external APIs have changed, as both the verify and the identify functions now have early reporting mechanisms.
|
||||
|
||||
- Added API for early report of matching results or retry errors
|
||||
- Verify and identification completion functions have been simplified
|
||||
- Support variadic arguments in error functions
|
||||
- Various re-definitions of ownership handling
|
||||
- Add convenience API to change state after a timeout
|
||||
- Add unit tests for all the drivers API
|
||||
|
||||
### Drivers required changes
|
||||
As per the early report mechanism, drivers need to adapt, in particular:
|
||||
- New pkg-config dependency name is `libfprint-2-tod-1`
|
||||
- Verification and Identification API for non-image drivers has changed and drivers need to both `report` the result of the action and complete it:
|
||||
- `fpi_device_{verify,identify}_report` must inform whether a match/no-match or identification happened or report a *retry error*.
|
||||
- `fpi_device_{verify,identify}_complete` must be called once the device has completed the verification / identification process, in case reporting device errors (not retry ones!)
|
||||
|
||||
You can see examples of changes needed in the [reference example driver](https://gitlab.freedesktop.org/3v1n0/libfprint-tod-example-driver/-/commit/8308f84f7d1cfd1b9ed0936c13c73b43a4a46772) or the [upstream synaptics driver](https://gitlab.freedesktop.org/libfprint/libfprint/-/merge_requests/112/diffs)
|
||||
@@ -1,51 +0,0 @@
|
||||
libfprint
|
||||
=========
|
||||
|
||||
libfprint is part of the fprint project:
|
||||
https://fprint.freedesktop.org/
|
||||
|
||||
libfprint was originally developed as part of an academic project at the
|
||||
University of Manchester with the aim of hiding differences between different
|
||||
consumer fingerprint scanners and providing a single uniform API to application
|
||||
developers. The ultimate goal of the fprint project is to make fingerprint
|
||||
scanners widely and easily usable under common Linux environments.
|
||||
|
||||
The academic university project runs off a codebase maintained separately
|
||||
from this one, although I try to keep them as similar as possible (I'm not
|
||||
hiding anything in the academic branch, it's just the open source release
|
||||
contains some commits excluded from the academic project).
|
||||
|
||||
THE UNIVERSITY OF MANCHESTER DOES NOT ENDORSE THIS THIS SOFTWARE RELEASE AND
|
||||
IS IN NO WAY RESPONSIBLE FOR THE CODE CONTAINED WITHIN, OR ANY DAMAGES CAUSED
|
||||
BY USING OR DISTRIBUTING THE SOFTWARE. Development does not happen on
|
||||
university computers and the project is not hosted at the university either.
|
||||
|
||||
For more information on libfprint, supported devices, API documentation, etc.,
|
||||
see the homepage:
|
||||
https://fprint.freedesktop.org/
|
||||
|
||||
libfprint is licensed under the GNU LGPL version 2.1. See the COPYING file
|
||||
for the license text.
|
||||
|
||||
Section 6 of the license states that for compiled works that use this
|
||||
library, such works must include libfprint copyright notices alongside the
|
||||
copyright notices for the other parts of the work. We have attempted to
|
||||
make this process slightly easier for you by grouping these all in one place:
|
||||
the AUTHORS file.
|
||||
|
||||
libfprint includes code from NIST's NBIS software distribution:
|
||||
http://fingerprint.nist.gov/NBIS/index.html
|
||||
We include bozorth3 from the US export controlled distribution. We have
|
||||
determined that it is fine to ship bozorth3 in an open source project,
|
||||
see https://fprint.freedesktop.org/us-export-control.html
|
||||
|
||||
## Historical links
|
||||
|
||||
Older versions of libfprint are available at:
|
||||
https://sourceforge.net/projects/fprint/files/
|
||||
|
||||
Historical mailing-list archives:
|
||||
http://www.reactivated.net/fprint_list_archives/
|
||||
|
||||
Historical website:
|
||||
http://web.archive.org/web/*/https://www.freedesktop.org/wiki/Software/fprint/
|
||||
@@ -0,0 +1,90 @@
|
||||
|
||||
|
||||
<div align="center">
|
||||
|
||||
# LibFPrint
|
||||
|
||||
*LibFPrint is part of the **[FPrint][Website]** project.*
|
||||
|
||||
<br/>
|
||||
|
||||
[![Button Website]][Website]
|
||||
[![Button Documentation]][Documentation]
|
||||
|
||||
[![Button Supported]][Supported]
|
||||
[![Button Unsupported]][Unsupported]
|
||||
|
||||
[![Button Contribute]][Contribute]
|
||||
[![Button Contributors]][Contributors]
|
||||
|
||||
</div>
|
||||
|
||||
## TOD Informations
|
||||
|
||||
See https://gitlab.freedesktop.org/3v1n0/libfprint/-/blob/tod/README.tod.md
|
||||
|
||||
## History
|
||||
|
||||
**LibFPrint** was originally developed as part of an
|
||||
academic project at the **[University Of Manchester]**.
|
||||
|
||||
It aimed to hide the differences between consumer
|
||||
fingerprint scanners and provide a single uniform
|
||||
API to application developers.
|
||||
|
||||
## Goal
|
||||
|
||||
The ultimate goal of the **FPrint** project is to make
|
||||
fingerprint scanners widely and easily usable under
|
||||
common Linux environments.
|
||||
|
||||
## License
|
||||
|
||||
`Section 6` of the license states that for compiled works that use
|
||||
this library, such works must include **LibFPrint** copyright notices
|
||||
alongside the copyright notices for the other parts of the work.
|
||||
|
||||
**LibFPrint** includes code from **NIST's** **[NBIS]** software distribution.
|
||||
|
||||
We include **Bozorth3** from the **[US Export Controlled]**
|
||||
distribution, which we have determined to be fine
|
||||
being shipped in an open source project.
|
||||
|
||||
<br/>
|
||||
|
||||
<div align="right">
|
||||
|
||||
[![Badge License]][License]
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!----------------------------------------------------------------------------->
|
||||
|
||||
[Documentation]: https://fprint.freedesktop.org/libfprint-dev/
|
||||
[Contributors]: https://gitlab.freedesktop.org/libfprint/libfprint/-/graphs/master
|
||||
[Unsupported]: https://gitlab.freedesktop.org/libfprint/wiki/-/wikis/Unsupported-Devices
|
||||
[Supported]: https://fprint.freedesktop.org/supported-devices.html
|
||||
[Website]: https://fprint.freedesktop.org/
|
||||
|
||||
[Contribute]: ./HACKING.md
|
||||
[License]: ./COPYING
|
||||
|
||||
[University Of Manchester]: https://www.manchester.ac.uk/
|
||||
[US Export Controlled]: https://fprint.freedesktop.org/us-export-control.html
|
||||
[NBIS]: http://fingerprint.nist.gov/NBIS/index.html
|
||||
|
||||
|
||||
<!---------------------------------[ Badges ]---------------------------------->
|
||||
|
||||
[Badge License]: https://img.shields.io/badge/License-LGPL2.1-015d93.svg?style=for-the-badge&labelColor=blue
|
||||
|
||||
|
||||
<!---------------------------------[ Buttons ]--------------------------------->
|
||||
|
||||
[Button Documentation]: https://img.shields.io/badge/Documentation-04ACE6?style=for-the-badge&logoColor=white&logo=BookStack
|
||||
[Button Contributors]: https://img.shields.io/badge/Contributors-FF4F8B?style=for-the-badge&logoColor=white&logo=ActiGraph
|
||||
[Button Unsupported]: https://img.shields.io/badge/Unsupported_Devices-EF2D5E?style=for-the-badge&logoColor=white&logo=AdBlock
|
||||
[Button Contribute]: https://img.shields.io/badge/Contribute-66459B?style=for-the-badge&logoColor=white&logo=Git
|
||||
[Button Supported]: https://img.shields.io/badge/Supported_Devices-428813?style=for-the-badge&logoColor=white&logo=AdGuard
|
||||
[Button Website]: https://img.shields.io/badge/Homepage-3B80AE?style=for-the-badge&logoColor=white&logo=freedesktopDotOrg
|
||||
@@ -0,0 +1,9 @@
|
||||
### libfprint-TOD - libfprint for Touch OEM Drivers
|
||||
|
||||
This is a light fork of libfprint to expose internal Drivers API in order to
|
||||
create drivers as shared libraries.
|
||||
|
||||
Fork is hosted at: https://gitlab.freedesktop.org/3v1n0/libfprint/tree/tod
|
||||
|
||||
An example driver implementation is available:
|
||||
- https://gitlab.freedesktop.org/3v1n0/libfprint-tod-example-driver
|
||||
@@ -1,30 +0,0 @@
|
||||
LIBRARY
|
||||
=======
|
||||
test suite against NFIQ compliance set
|
||||
make library optionally asynchronous and maybe thread-safe
|
||||
nbis cleanups
|
||||
API function to determine if img device supports uncond. capture
|
||||
race-free way of saying "save this print but don't overwrite"
|
||||
|
||||
NEW DRIVERS
|
||||
===========
|
||||
Sunplus 895 driver
|
||||
AES3400/3500 driver
|
||||
ID Mouse driver
|
||||
Support for 2nd generation MS devices
|
||||
Support for 2nd generation UPEK devices
|
||||
|
||||
IMAGING
|
||||
=======
|
||||
ignore first frame or two with aes2501
|
||||
aes2501: increase threshold "sum" for end-of-image detection
|
||||
aes2501 gain calibration
|
||||
aes4000 gain calibration
|
||||
aes4000 resampling
|
||||
PPMM parameter to get_minutiae seems to have no effect
|
||||
nbis minutiae should be stored in endian-independent format
|
||||
|
||||
PORTABILITY
|
||||
===========
|
||||
OpenBSD can't do -Wshadow or visibility
|
||||
OpenBSD: add compat codes for ENOTSUP ENODATA and EPROTO
|
||||
+133
-4
@@ -4,6 +4,7 @@
|
||||
# Supported by libfprint driver aes1610
|
||||
usb:v08FFp1600*
|
||||
ID_AUTOSUSPEND=1
|
||||
ID_PERSIST=0
|
||||
|
||||
# Supported by libfprint driver aes1660
|
||||
usb:v08FFp1660*
|
||||
@@ -24,16 +25,19 @@ usb:v08FFp168D*
|
||||
usb:v08FFp168E*
|
||||
usb:v08FFp168F*
|
||||
ID_AUTOSUSPEND=1
|
||||
ID_PERSIST=0
|
||||
|
||||
# Supported by libfprint driver aes2501
|
||||
usb:v08FFp2500*
|
||||
usb:v08FFp2580*
|
||||
ID_AUTOSUSPEND=1
|
||||
ID_PERSIST=0
|
||||
|
||||
# Supported by libfprint driver aes2550
|
||||
usb:v08FFp2550*
|
||||
usb:v08FFp2810*
|
||||
ID_AUTOSUSPEND=1
|
||||
ID_PERSIST=0
|
||||
|
||||
# Supported by libfprint driver aes2660
|
||||
usb:v08FFp2660*
|
||||
@@ -55,14 +59,29 @@ usb:v08FFp268E*
|
||||
usb:v08FFp268F*
|
||||
usb:v08FFp2691*
|
||||
ID_AUTOSUSPEND=1
|
||||
ID_PERSIST=0
|
||||
|
||||
# Supported by libfprint driver aes3500
|
||||
usb:v08FFp5731*
|
||||
ID_AUTOSUSPEND=1
|
||||
ID_PERSIST=0
|
||||
|
||||
# Supported by libfprint driver aes4000
|
||||
usb:v5501p08FF*
|
||||
usb:v08FFp5501*
|
||||
ID_AUTOSUSPEND=1
|
||||
ID_PERSIST=0
|
||||
|
||||
# Supported by libfprint driver egis0570
|
||||
usb:v1C7Ap0570*
|
||||
usb:v1C7Ap0571*
|
||||
ID_AUTOSUSPEND=1
|
||||
ID_PERSIST=0
|
||||
|
||||
# Supported by libfprint driver egismoc
|
||||
usb:v1C7Ap0582*
|
||||
usb:v1C7Ap05A1*
|
||||
ID_AUTOSUSPEND=1
|
||||
ID_PERSIST=0
|
||||
|
||||
# Supported by libfprint driver elan
|
||||
usb:v04F3p0903*
|
||||
@@ -120,33 +139,86 @@ usb:v04F3p0C32*
|
||||
usb:v04F3p0C33*
|
||||
usb:v04F3p0C3D*
|
||||
usb:v04F3p0C42*
|
||||
usb:v04F3p0C4B*
|
||||
usb:v04F3p0C4D*
|
||||
usb:v04F3p0C4F*
|
||||
usb:v04F3p0C63*
|
||||
usb:v04F3p0C6E*
|
||||
usb:v04F3p0C58*
|
||||
ID_AUTOSUSPEND=1
|
||||
ID_PERSIST=0
|
||||
|
||||
# Supported by libfprint driver elanmoc
|
||||
usb:v04F3p0C7D*
|
||||
usb:v04F3p0C7E*
|
||||
usb:v04F3p0C82*
|
||||
usb:v04F3p0C88*
|
||||
usb:v04F3p0C8C*
|
||||
usb:v04F3p0C8D*
|
||||
usb:v04F3p0C99*
|
||||
ID_AUTOSUSPEND=1
|
||||
ID_PERSIST=0
|
||||
|
||||
# Supported by libfprint driver etes603
|
||||
usb:v1C7Ap0603*
|
||||
ID_AUTOSUSPEND=1
|
||||
ID_PERSIST=0
|
||||
|
||||
# Supported by libfprint driver focaltech_moc
|
||||
usb:v2808p9E48*
|
||||
usb:v2808pD979*
|
||||
usb:v2808pA959*
|
||||
ID_AUTOSUSPEND=1
|
||||
ID_PERSIST=0
|
||||
|
||||
# Supported by libfprint driver fpcmoc
|
||||
usb:v10A5pFFE0*
|
||||
usb:v10A5pA305*
|
||||
usb:v10A5pDA04*
|
||||
usb:v10A5pD805*
|
||||
usb:v10A5pD205*
|
||||
ID_AUTOSUSPEND=1
|
||||
ID_PERSIST=0
|
||||
|
||||
# Supported by libfprint driver goodixmoc
|
||||
usb:v27C6p5840*
|
||||
usb:v27C6p6014*
|
||||
usb:v27C6p6092*
|
||||
usb:v27C6p6094*
|
||||
usb:v27C6p609C*
|
||||
usb:v27C6p60A2*
|
||||
usb:v27C6p60A4*
|
||||
usb:v27C6p60BC*
|
||||
usb:v27C6p6304*
|
||||
usb:v27C6p631C*
|
||||
usb:v27C6p633C*
|
||||
usb:v27C6p634C*
|
||||
usb:v27C6p6384*
|
||||
usb:v27C6p639C*
|
||||
usb:v27C6p63AC*
|
||||
usb:v27C6p63BC*
|
||||
usb:v27C6p63CC*
|
||||
usb:v27C6p6496*
|
||||
usb:v27C6p6582*
|
||||
usb:v27C6p6584*
|
||||
usb:v27C6p658C*
|
||||
usb:v27C6p6592*
|
||||
usb:v27C6p6594*
|
||||
usb:v27C6p659A*
|
||||
usb:v27C6p659C*
|
||||
usb:v27C6p6A94*
|
||||
ID_AUTOSUSPEND=1
|
||||
ID_PERSIST=0
|
||||
|
||||
# Supported by libfprint driver nb1010
|
||||
usb:v298Dp1010*
|
||||
ID_AUTOSUSPEND=1
|
||||
ID_PERSIST=0
|
||||
|
||||
# Supported by libfprint driver realtek
|
||||
usb:v0BDAp5813*
|
||||
ID_AUTOSUSPEND=1
|
||||
ID_PERSIST=0
|
||||
|
||||
# Supported by libfprint driver synaptics
|
||||
usb:v06CBp00BD*
|
||||
@@ -154,26 +226,39 @@ usb:v06CBp00DF*
|
||||
usb:v06CBp00F9*
|
||||
usb:v06CBp00FC*
|
||||
usb:v06CBp00C2*
|
||||
usb:v06CBp00C9*
|
||||
usb:v06CBp0100*
|
||||
usb:v06CBp00F0*
|
||||
usb:v06CBp0103*
|
||||
usb:v06CBp0123*
|
||||
usb:v06CBp0124*
|
||||
usb:v06CBp0126*
|
||||
usb:v06CBp0129*
|
||||
usb:v06CBp0168*
|
||||
usb:v06CBp015F*
|
||||
usb:v06CBp0104*
|
||||
usb:v06CBp0173*
|
||||
usb:v06CBp0106*
|
||||
ID_AUTOSUSPEND=1
|
||||
ID_PERSIST=0
|
||||
|
||||
# Supported by libfprint driver upeksonly
|
||||
usb:v147Ep2016*
|
||||
usb:v147Ep1000*
|
||||
usb:v147Ep1001*
|
||||
ID_AUTOSUSPEND=1
|
||||
ID_PERSIST=0
|
||||
|
||||
# Supported by libfprint driver upektc
|
||||
usb:v0483p2015*
|
||||
usb:v0483p2017*
|
||||
usb:v147Ep3001*
|
||||
ID_AUTOSUSPEND=1
|
||||
ID_PERSIST=0
|
||||
|
||||
# Supported by libfprint driver upektc_img
|
||||
usb:v147Ep2020*
|
||||
ID_AUTOSUSPEND=1
|
||||
ID_PERSIST=0
|
||||
|
||||
# Supported by libfprint driver uru4000
|
||||
usb:v045Ep00BC*
|
||||
@@ -183,23 +268,28 @@ usb:v05BAp0007*
|
||||
usb:v05BAp0008*
|
||||
usb:v05BAp000A*
|
||||
ID_AUTOSUSPEND=1
|
||||
ID_PERSIST=0
|
||||
|
||||
# Supported by libfprint driver vcom5s
|
||||
usb:v061Ap0110*
|
||||
ID_AUTOSUSPEND=1
|
||||
ID_PERSIST=0
|
||||
|
||||
# Supported by libfprint driver vfs0050
|
||||
usb:v138Ap0050*
|
||||
ID_AUTOSUSPEND=1
|
||||
ID_PERSIST=0
|
||||
|
||||
# Supported by libfprint driver vfs101
|
||||
usb:v138Ap0001*
|
||||
ID_AUTOSUSPEND=1
|
||||
ID_PERSIST=0
|
||||
|
||||
# Supported by libfprint driver vfs301
|
||||
usb:v138Ap0005*
|
||||
usb:v138Ap0008*
|
||||
ID_AUTOSUSPEND=1
|
||||
ID_PERSIST=0
|
||||
|
||||
# Supported by libfprint driver vfs5011
|
||||
usb:v138Ap0010*
|
||||
@@ -208,33 +298,52 @@ usb:v138Ap0015*
|
||||
usb:v138Ap0017*
|
||||
usb:v138Ap0018*
|
||||
ID_AUTOSUSPEND=1
|
||||
ID_PERSIST=0
|
||||
|
||||
# Supported by libfprint driver vfs7552
|
||||
usb:v138Ap0091*
|
||||
ID_AUTOSUSPEND=1
|
||||
ID_PERSIST=0
|
||||
|
||||
# Known unsupported devices
|
||||
usb:v047Dp00F2*
|
||||
usb:v04E8p730B*
|
||||
usb:v04F3p036B*
|
||||
usb:v04F3p0C00*
|
||||
usb:v04F3p0C4B*
|
||||
usb:v04F3p0C4C*
|
||||
usb:v04F3p0C57*
|
||||
usb:v04F3p0C5E*
|
||||
usb:v04F3p0C5A*
|
||||
usb:v04F3p0C6C*
|
||||
usb:v04F3p0C70*
|
||||
usb:v04F3p0C72*
|
||||
usb:v04F3p0C77*
|
||||
usb:v04F3p2706*
|
||||
usb:v04F3p3032*
|
||||
usb:v04F3p3057*
|
||||
usb:v04F3p3104*
|
||||
usb:v04F3p310D*
|
||||
usb:v04F3p3128*
|
||||
usb:v06CBp0081*
|
||||
usb:v06CBp0088*
|
||||
usb:v06CBp008A*
|
||||
usb:v06CBp009A*
|
||||
usb:v06CBp009B*
|
||||
usb:v06CBp00A2*
|
||||
usb:v06CBp00A8*
|
||||
usb:v06CBp00B7*
|
||||
usb:v06CBp00BB*
|
||||
usb:v06CBp00BE*
|
||||
usb:v06CBp00C4*
|
||||
usb:v06CBp00CB*
|
||||
usb:v06CBp00C9*
|
||||
usb:v06CBp00D8*
|
||||
usb:v06CBp00DA*
|
||||
usb:v06CBp00DC*
|
||||
usb:v06CBp00E4*
|
||||
usb:v06CBp00E7*
|
||||
usb:v06CBp00E9*
|
||||
usb:v06CBp00FD*
|
||||
usb:v0A5Cp5801*
|
||||
usb:v0A5Cp5805*
|
||||
usb:v0A5Cp5834*
|
||||
@@ -242,8 +351,13 @@ usb:v0A5Cp5840*
|
||||
usb:v0A5Cp5841*
|
||||
usb:v0A5Cp5842*
|
||||
usb:v0A5Cp5843*
|
||||
usb:v0A5Cp5844*
|
||||
usb:v0A5Cp5845*
|
||||
usb:v0BDAp5812*
|
||||
usb:v10A5p0007*
|
||||
usb:v10A5p9200*
|
||||
usb:v10A5p9800*
|
||||
usb:v10A5pE340*
|
||||
usb:v1188p9545*
|
||||
usb:v138Ap0007*
|
||||
usb:v138Ap003A*
|
||||
@@ -256,32 +370,47 @@ usb:v138Ap0094*
|
||||
usb:v138Ap0097*
|
||||
usb:v138Ap009D*
|
||||
usb:v138Ap00AB*
|
||||
usb:v138Ap00A6*
|
||||
usb:v147Ep1002*
|
||||
usb:v1491p0088*
|
||||
usb:v16D1p1027*
|
||||
usb:v1C7Ap0300*
|
||||
usb:v1C7Ap0570*
|
||||
usb:v1C7Ap0575*
|
||||
usb:v1C7Ap0576*
|
||||
usb:v1C7Ap0577*
|
||||
usb:v27C6p5042*
|
||||
usb:v27C6p5110*
|
||||
usb:v27C6p5117*
|
||||
usb:v27C6p5120*
|
||||
usb:v27C6p5125*
|
||||
usb:v27C6p5201*
|
||||
usb:v27C6p521D*
|
||||
usb:v27C6p5301*
|
||||
usb:v27C6p530C*
|
||||
usb:v27C6p532D*
|
||||
usb:v27C6p5335*
|
||||
usb:v27C6p533C*
|
||||
usb:v27C6p5381*
|
||||
usb:v27C6p5385*
|
||||
usb:v27C6p538C*
|
||||
usb:v27C6p538D*
|
||||
usb:v27C6p5395*
|
||||
usb:v27C6p5503*
|
||||
usb:v27C6p550A*
|
||||
usb:v27C6p550C*
|
||||
usb:v27C6p5584*
|
||||
usb:v27C6p55A2*
|
||||
usb:v27C6p55A4*
|
||||
usb:v27C6p55B4*
|
||||
usb:v27C6p5740*
|
||||
usb:v27C6p5E0A*
|
||||
usb:v27C6p581A*
|
||||
usb:v27C6p589A*
|
||||
usb:v27C6p6382*
|
||||
usb:v2808p9338*
|
||||
usb:v2808p93A9*
|
||||
usb:v298Dp2020*
|
||||
usb:v298Dp2033*
|
||||
usb:v3538p0930*
|
||||
ID_AUTOSUSPEND=1
|
||||
ID_PERSIST=0
|
||||
|
||||
Vendored
+10
@@ -0,0 +1,10 @@
|
||||
The libfprint-2-2 postinst script calls udevadmin trigger for all the supported
|
||||
USB readers. The list of readers used in that file is generated using the gbp
|
||||
import hook when `gbp import-orig` (via --uscan or with a tarball) is used.
|
||||
|
||||
Alternatively it can be called manually by using:
|
||||
|
||||
GBP_SOURCES_DIR=. debian/update-udev-triggers.sh
|
||||
|
||||
When preparing a new upstream release, this script should be called against the
|
||||
upstream provided .hwdb file.
|
||||
Vendored
+14
@@ -0,0 +1,14 @@
|
||||
### libfprint-TOD - libfprint for Touch OEM Drivers
|
||||
|
||||
This is a light fork of libfprint to expose internal Drivers API in order to
|
||||
create drivers as shared libraries.
|
||||
|
||||
Fork is hosted at: https://gitlab.freedesktop.org/3v1n0/libfprint/tree/tod
|
||||
|
||||
Packaging for this is handled via gbp, so you need to make sure that you have
|
||||
added the remote:
|
||||
|
||||
git remote add origin-tod https://gitlab.freedesktop.org/3v1n0/libfprint.git
|
||||
git fetch origin-tod --tags
|
||||
|
||||
To get the latest tod release, just use `gbp import-orig --uscan`.
|
||||
Vendored
+1012
File diff suppressed because it is too large
Load Diff
Vendored
+203
@@ -0,0 +1,203 @@
|
||||
Source: libfprint
|
||||
Priority: optional
|
||||
Section: libs
|
||||
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
|
||||
XSBC-Original-Maintainer: FingerForce Team <fingerforce-devel@lists.alioth.debian.org>
|
||||
Uploaders: Marco Trevisan <marco@ubuntu.com>
|
||||
Build-Depends: debhelper-compat (= 13),
|
||||
gir1.2-gobject-2.0-dev <!nogir>,
|
||||
gir1.2-gio-2.0-dev <!nogir>,
|
||||
gobject-introspection,
|
||||
gtk-doc-tools,
|
||||
libcairo-dev <!nocheck>,
|
||||
libgirepository1.0-dev,
|
||||
libglib2.0-dev,
|
||||
libgudev-1.0-dev,
|
||||
libgusb-dev,
|
||||
libnss3-dev,
|
||||
libpixman-1-dev,
|
||||
meson,
|
||||
python3 <!nocheck>,
|
||||
python3-cairo <!nocheck>,
|
||||
python3-gi <!nocheck>,
|
||||
systemd-dev,
|
||||
umockdev <!nocheck>
|
||||
Build-Depends-Indep: libglib2.0-doc <!nodoc>, libgusb-doc <!nodoc>
|
||||
Standards-Version: 4.6.2
|
||||
Homepage: https://www.freedesktop.org/wiki/Software/fprint/libfprint
|
||||
Vcs-Browser: https://salsa.debian.org/ubuntu-dev-team/libfprint/tree/noble
|
||||
Vcs-Git: https://salsa.debian.org/ubuntu-dev-team/libfprint.git -b noble
|
||||
|
||||
Package: libfprint-2-2
|
||||
Architecture: any
|
||||
Depends: ${misc:Depends}, ${shlibs:Depends}
|
||||
Pre-Depends: ${misc:Pre-Depends}
|
||||
Description: async fingerprint library of fprint project, shared libraries
|
||||
The fprint project aims to support for consumer fingerprint reader devices.
|
||||
.
|
||||
Previously, Linux support for such devices has been scattered amongst different
|
||||
projects (many incomplete) and inconsistent in that application developers
|
||||
would have to implement support for each type of fingerprint reader separately.
|
||||
The idea is to change that by providing a central system to support all the
|
||||
fingerprint readers as it's possible to get hands on.
|
||||
.
|
||||
libfprint is the centre of efforts, this component does the dirty job of
|
||||
talking to fingerprint reading devices, and processing fingerprint data.
|
||||
.
|
||||
This library depends on the new libusb, which performs asynchronous callbacks,
|
||||
allowing fprint to perform non-blocking device tasks.
|
||||
.
|
||||
This package provides shared libraries.
|
||||
|
||||
Package: libfprint-2-dev
|
||||
Section: libdevel
|
||||
Architecture: any
|
||||
Multi-Arch: same
|
||||
Depends: gir1.2-fprint-2.0 (= ${binary:Version}),
|
||||
libfprint-2-2 (= ${binary:Version}),
|
||||
${misc:Depends},
|
||||
${gir:Depends},
|
||||
Provides: ${gir:Provides},
|
||||
Suggests: libfprint-2-doc
|
||||
Description: async fingerprint library of fprint project, development headers
|
||||
The fprint project aims to support for consumer fingerprint reader devices.
|
||||
.
|
||||
Previously, Linux support for such devices has been scattered amongst different
|
||||
projects (many incomplete) and inconsistent in that application developers
|
||||
would have to implement support for each type of fingerprint reader separately.
|
||||
The idea is to change that by providing a central system to support all the
|
||||
fingerprint readers as it's possible to get hands on.
|
||||
.
|
||||
libfprint is the centre of efforts, this component does the dirty job of
|
||||
talking to fingerprint reading devices, and processing fingerprint data.
|
||||
.
|
||||
This library depends on the new libusb, which performs asynchronous callbacks,
|
||||
allowing fprint to perform non-blocking device tasks.
|
||||
.
|
||||
This package provides development headers.
|
||||
|
||||
Package: libfprint-2-doc
|
||||
Section: doc
|
||||
Architecture: all
|
||||
Multi-Arch: foreign
|
||||
Depends: ${misc:Depends}
|
||||
Description: async fingerprint library of fprint project, API documentation
|
||||
The fprint project aims to support for consumer fingerprint reader devices.
|
||||
.
|
||||
Previously, Linux support for such devices has been scattered amongst different
|
||||
projects (many incomplete) and inconsistent in that application developers
|
||||
would have to implement support for each type of fingerprint reader separately.
|
||||
The idea is to change that by providing a central system to support all the
|
||||
fingerprint readers as it's possible to get hands on.
|
||||
.
|
||||
libfprint is the centre of efforts, this component does the dirty job of
|
||||
talking to fingerprint reading devices, and processing fingerprint data.
|
||||
.
|
||||
This library depends on the new libusb, which performs asynchronous callbacks,
|
||||
allowing fprint to perform non-blocking device tasks.
|
||||
.
|
||||
This package provides the API documentation.
|
||||
|
||||
Package: gir1.2-fprint-2.0
|
||||
Architecture: any
|
||||
Multi-Arch: same
|
||||
Section: introspection
|
||||
Depends: ${gir:Depends}, ${misc:Depends}, ${shlibs:Depends}
|
||||
Pre-Depends: ${misc:Pre-Depends}
|
||||
Description: async fingerprint library of fprint project, gir bindings
|
||||
The fprint project aims to support for consumer fingerprint reader devices.
|
||||
.
|
||||
Previously, Linux support for such devices has been scattered amongst different
|
||||
projects (many incomplete) and inconsistent in that application developers
|
||||
would have to implement support for each type of fingerprint reader separately.
|
||||
The idea is to change that by providing a central system to support all the
|
||||
fingerprint readers as it's possible to get hands on.
|
||||
.
|
||||
libfprint is the centre of efforts, this component does the dirty job of
|
||||
talking to fingerprint reading devices, and processing fingerprint data.
|
||||
.
|
||||
This library depends on the new libusb, which performs asynchronous callbacks,
|
||||
allowing fprint to perform non-blocking device tasks.
|
||||
.
|
||||
This package can be used by other packages using the GIRepository format to
|
||||
generate dynamic bindings.
|
||||
|
||||
Package: libfprint-2-tod1
|
||||
Architecture: any
|
||||
Multi-Arch: same
|
||||
Depends: ${misc:Depends}, ${shlibs:Depends}
|
||||
Pre-Depends: ${misc:Pre-Depends}
|
||||
Description: async fingerprint library of fprint project, drivers shared libraries
|
||||
The fprint project aims to support for consumer fingerprint reader devices.
|
||||
.
|
||||
Previously, Linux support for such devices has been scattered amongst different
|
||||
projects (many incomplete) and inconsistent in that application developers
|
||||
would have to implement support for each type of fingerprint reader separately.
|
||||
The idea is to change that by providing a central system to support all the
|
||||
fingerprint readers as it's possible to get hands on.
|
||||
.
|
||||
libfprint is the centre of efforts, this component does the dirty job of
|
||||
talking to fingerprint reading devices, and processing fingerprint data.
|
||||
.
|
||||
This library depends on the new libusb, which performs asynchronous callbacks,
|
||||
allowing fprint to perform non-blocking device tasks.
|
||||
.
|
||||
This package provides shared libraries for the TOD drivers.
|
||||
|
||||
Package: libfprint-2-tod-dev
|
||||
Section: libdevel
|
||||
Architecture: any
|
||||
Multi-Arch: same
|
||||
Depends: libfprint-2-tod1 (= ${binary:Version}),
|
||||
libfprint-2-dev (= ${binary:Version}),
|
||||
libglib2.0-dev (>= 2.56),
|
||||
libgudev-1.0-dev,
|
||||
libgusb-dev (>= 0.2.0),
|
||||
libpixman-1-dev,
|
||||
libnss3-dev,
|
||||
${misc:Depends}
|
||||
Description: async fingerprint library of fprint project, drivers development headers
|
||||
The fprint project aims to support for consumer fingerprint reader devices.
|
||||
.
|
||||
Previously, Linux support for such devices has been scattered amongst different
|
||||
projects (many incomplete) and inconsistent in that application developers
|
||||
would have to implement support for each type of fingerprint reader separately.
|
||||
The idea is to change that by providing a central system to support all the
|
||||
fingerprint readers as it's possible to get hands on.
|
||||
.
|
||||
libfprint is the centre of efforts, this component does the dirty job of
|
||||
talking to fingerprint reading devices, and processing fingerprint data.
|
||||
.
|
||||
This library depends on the new libusb, which performs asynchronous callbacks,
|
||||
allowing fprint to perform non-blocking device tasks.
|
||||
.
|
||||
This package provides development headers for creating device drivers.
|
||||
An example driver is available at:
|
||||
https://gitlab.freedesktop.org/3v1n0/libfprint-tod-example-driver
|
||||
|
||||
Package: libfprint-2-tests
|
||||
Architecture: any
|
||||
Depends: gir1.2-fprint-2.0 (= ${binary:Version}),
|
||||
libfprint-2-2 (= ${binary:Version}),
|
||||
python3,
|
||||
python3-cairo,
|
||||
python3-gi,
|
||||
umockdev,
|
||||
${misc:Depends}, ${shlibs:Depends}
|
||||
Description: Tests for async fingerprint library of fprint project
|
||||
The fprint project aims to support for consumer fingerprint reader devices.
|
||||
.
|
||||
Previously, Linux support for such devices has been scattered amongst different
|
||||
projects (many incomplete) and inconsistent in that application developers
|
||||
would have to implement support for each type of fingerprint reader separately.
|
||||
The idea is to change that by providing a central system to support all the
|
||||
fingerprint readers as it's possible to get hands on.
|
||||
.
|
||||
libfprint is the centre of efforts, this component does the dirty job of
|
||||
talking to fingerprint reading devices, and processing fingerprint data.
|
||||
.
|
||||
This library depends on the new libusb, which performs asynchronous callbacks,
|
||||
allowing fprint to perform non-blocking device tasks.
|
||||
.
|
||||
This package contains test programs, designed to be run as part of a
|
||||
regression testsuite.
|
||||
Vendored
+45
@@ -0,0 +1,45 @@
|
||||
This package was debianized by Ulises Vitulli <uvitulli@fi.uba.ar> on
|
||||
Fri, 19 Sep 2008 05:14:30 -0300.
|
||||
|
||||
It was downloaded from <http://reactivated.net/fprint/wiki/Libfprint>
|
||||
|
||||
Upstream Authors, and Copyright:
|
||||
|
||||
Copyright © 2007 Daniel Drake <dsd@gentoo.org>
|
||||
Copyright © 2006-2007 Timo Hoenig <thoenig@suse.de>
|
||||
Copyright © 2006 Pavel Machek <pavel@suse.cz>
|
||||
Copyright © 1999 Erik Walthinsen <omega@cse.ogi.edu>
|
||||
Copyright © 2004,2006 Thomas Vander Stichele <thomas at apestaart dot org>
|
||||
Copyright © 2007 Cyrille Bagard
|
||||
Copyright © 2007 Vasily Khoruzhick
|
||||
Copyright © 2007 Jan-Michael Brummer <buzz2@gmx.de>
|
||||
Copyright © 2007 Anthony Bretaudeau <wxcover@users.sourceforge.net>
|
||||
|
||||
|
||||
License:
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
The files under libfprint/nbis directory has this license:
|
||||
|
||||
This software was developed at the National Institute of Standards and
|
||||
Technology (NIST) by employees of the Federal Government in the course
|
||||
of their official duties. Pursuant to title 17 Section 105 of the
|
||||
United States Code, this software is not subject to copyright protection
|
||||
and is in the public domain. NIST assumes no responsibility whatsoever for
|
||||
its use by other parties, and makes no guarantees, expressed or implied,
|
||||
about its quality, reliability, or any other characteristic.
|
||||
|
||||
The Debian packaging is © 2008, Ulises Vitulli <uvitulli@fi.uba.ar> and is
|
||||
licensed under the LGPL v2.1, see `/usr/share/common-licenses/LGPL-2.1'.
|
||||
Vendored
+2
@@ -0,0 +1,2 @@
|
||||
NEWS
|
||||
README.md
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
dch -v"$GBP_DEBIAN_VERSION" "New upstream release"
|
||||
git add debian/changelog
|
||||
debcommit
|
||||
|
||||
debian/update-udev-triggers.sh
|
||||
Vendored
+19
@@ -0,0 +1,19 @@
|
||||
[DEFAULT]
|
||||
pristine-tar = True
|
||||
debian-branch = noble
|
||||
upstream-vcs-tag = v%(version)s
|
||||
upstream-branch = upstream-tod
|
||||
debian-tag=ubuntu/%(version)s
|
||||
|
||||
[buildpackage]
|
||||
sign-tags = True
|
||||
|
||||
[dch]
|
||||
multimaint-merge = True
|
||||
|
||||
[import-orig]
|
||||
postimport = debian/gbp-post-import-hook.sh
|
||||
|
||||
[pq]
|
||||
patch-numbers = False
|
||||
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
usr/lib/${DEB_HOST_MULTIARCH}/girepository-1.0/FPrint-*.typelib
|
||||
Vendored
+3
@@ -0,0 +1,3 @@
|
||||
usr/lib/udev/hwdb.d/
|
||||
usr/lib/udev/rules.d/
|
||||
usr/lib/${DEB_HOST_MULTIARCH}/libfprint-[0-9].so.*
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
# For security reasons, we don't want the fingerprint readers to be accessible
|
||||
# by unprivileged users
|
||||
udev-rule-missing-uaccess
|
||||
Vendored
+315
@@ -0,0 +1,315 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
#DEBHELPER#
|
||||
|
||||
if [ "$1" = "configure" -o "$1" = "upgrade" ] && command -V udevadm >/dev/null 2>&1; then
|
||||
# apply hwdb rules at package installation, see
|
||||
# <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=683863#27>
|
||||
# NOTA BENE: after the DEBHELPER section since dh_installudev
|
||||
# adds stuff there
|
||||
# The devices ID list is auto-generated using the gbp postimport hook
|
||||
# see debian/README.sources for more details.
|
||||
udevadm trigger --action=add --attr-match=idVendor=08ff --attr-match=idProduct=1600 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=08ff --attr-match=idProduct=1660 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=08ff --attr-match=idProduct=1680 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=08ff --attr-match=idProduct=1681 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=08ff --attr-match=idProduct=1682 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=08ff --attr-match=idProduct=1683 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=08ff --attr-match=idProduct=1684 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=08ff --attr-match=idProduct=1685 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=08ff --attr-match=idProduct=1686 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=08ff --attr-match=idProduct=1687 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=08ff --attr-match=idProduct=1688 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=08ff --attr-match=idProduct=1689 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=08ff --attr-match=idProduct=168a || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=08ff --attr-match=idProduct=168b || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=08ff --attr-match=idProduct=168c || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=08ff --attr-match=idProduct=168d || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=08ff --attr-match=idProduct=168e || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=08ff --attr-match=idProduct=168f || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=08ff --attr-match=idProduct=2500 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=08ff --attr-match=idProduct=2580 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=08ff --attr-match=idProduct=2550 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=08ff --attr-match=idProduct=2810 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=08ff --attr-match=idProduct=2660 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=08ff --attr-match=idProduct=2680 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=08ff --attr-match=idProduct=2681 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=08ff --attr-match=idProduct=2682 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=08ff --attr-match=idProduct=2683 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=08ff --attr-match=idProduct=2684 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=08ff --attr-match=idProduct=2685 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=08ff --attr-match=idProduct=2686 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=08ff --attr-match=idProduct=2687 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=08ff --attr-match=idProduct=2688 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=08ff --attr-match=idProduct=2689 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=08ff --attr-match=idProduct=268a || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=08ff --attr-match=idProduct=268b || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=08ff --attr-match=idProduct=268c || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=08ff --attr-match=idProduct=268d || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=08ff --attr-match=idProduct=268e || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=08ff --attr-match=idProduct=268f || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=08ff --attr-match=idProduct=2691 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=08ff --attr-match=idProduct=5731 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=08ff --attr-match=idProduct=5501 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=1c7a --attr-match=idProduct=0570 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=1c7a --attr-match=idProduct=0571 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=1c7a --attr-match=idProduct=0582 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=1c7a --attr-match=idProduct=05a1 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=0903 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=0907 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=0c01 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=0c02 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=0c03 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=0c04 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=0c05 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=0c06 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=0c07 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=0c08 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=0c09 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=0c0a || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=0c0b || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=0c0c || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=0c0d || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=0c0e || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=0c0f || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=0c10 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=0c11 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=0c12 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=0c13 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=0c14 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=0c15 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=0c16 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=0c17 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=0c18 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=0c19 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=0c1a || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=0c1b || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=0c1c || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=0c1d || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=0c1e || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=0c1f || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=0c20 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=0c21 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=0c22 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=0c23 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=0c24 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=0c25 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=0c26 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=0c27 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=0c28 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=0c29 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=0c2a || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=0c2b || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=0c2c || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=0c2d || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=0c2e || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=0c2f || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=0c30 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=0c31 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=0c32 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=0c33 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=0c3d || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=0c42 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=0c4b || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=0c4d || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=0c4f || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=0c63 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=0c6e || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=0c58 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=0c7d || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=0c7e || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=0c82 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=0c88 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=0c8c || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=0c8d || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=0c99 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=1c7a --attr-match=idProduct=0603 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=2808 --attr-match=idProduct=9e48 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=2808 --attr-match=idProduct=d979 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=2808 --attr-match=idProduct=a959 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=10a5 --attr-match=idProduct=ffe0 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=10a5 --attr-match=idProduct=a305 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=10a5 --attr-match=idProduct=da04 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=10a5 --attr-match=idProduct=d805 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=10a5 --attr-match=idProduct=d205 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=27c6 --attr-match=idProduct=5840 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=27c6 --attr-match=idProduct=6014 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=27c6 --attr-match=idProduct=6092 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=27c6 --attr-match=idProduct=6094 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=27c6 --attr-match=idProduct=609c || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=27c6 --attr-match=idProduct=60a2 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=27c6 --attr-match=idProduct=60a4 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=27c6 --attr-match=idProduct=60bc || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=27c6 --attr-match=idProduct=6304 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=27c6 --attr-match=idProduct=631c || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=27c6 --attr-match=idProduct=633c || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=27c6 --attr-match=idProduct=634c || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=27c6 --attr-match=idProduct=6384 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=27c6 --attr-match=idProduct=639c || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=27c6 --attr-match=idProduct=63ac || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=27c6 --attr-match=idProduct=63bc || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=27c6 --attr-match=idProduct=63cc || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=27c6 --attr-match=idProduct=6496 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=27c6 --attr-match=idProduct=6582 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=27c6 --attr-match=idProduct=6584 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=27c6 --attr-match=idProduct=658c || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=27c6 --attr-match=idProduct=6592 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=27c6 --attr-match=idProduct=6594 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=27c6 --attr-match=idProduct=659a || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=27c6 --attr-match=idProduct=659c || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=27c6 --attr-match=idProduct=6a94 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=298d --attr-match=idProduct=1010 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=0bda --attr-match=idProduct=5813 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=06cb --attr-match=idProduct=00bd || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=06cb --attr-match=idProduct=00df || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=06cb --attr-match=idProduct=00f9 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=06cb --attr-match=idProduct=00fc || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=06cb --attr-match=idProduct=00c2 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=06cb --attr-match=idProduct=0100 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=06cb --attr-match=idProduct=00f0 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=06cb --attr-match=idProduct=0103 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=06cb --attr-match=idProduct=0123 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=06cb --attr-match=idProduct=0124 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=06cb --attr-match=idProduct=0126 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=06cb --attr-match=idProduct=0129 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=06cb --attr-match=idProduct=0168 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=06cb --attr-match=idProduct=015f || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=06cb --attr-match=idProduct=0104 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=06cb --attr-match=idProduct=0173 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=06cb --attr-match=idProduct=0106 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=147e --attr-match=idProduct=2016 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=147e --attr-match=idProduct=1000 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=147e --attr-match=idProduct=1001 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=0483 --attr-match=idProduct=2015 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=0483 --attr-match=idProduct=2017 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=147e --attr-match=idProduct=3001 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=147e --attr-match=idProduct=2020 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=045e --attr-match=idProduct=00bc || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=045e --attr-match=idProduct=00bd || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=045e --attr-match=idProduct=00ca || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=05ba --attr-match=idProduct=0007 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=05ba --attr-match=idProduct=0008 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=05ba --attr-match=idProduct=000a || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=061a --attr-match=idProduct=0110 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=138a --attr-match=idProduct=0050 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=138a --attr-match=idProduct=0001 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=138a --attr-match=idProduct=0005 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=138a --attr-match=idProduct=0008 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=138a --attr-match=idProduct=0010 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=138a --attr-match=idProduct=0011 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=138a --attr-match=idProduct=0015 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=138a --attr-match=idProduct=0017 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=138a --attr-match=idProduct=0018 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=138a --attr-match=idProduct=0091 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=047d --attr-match=idProduct=00f2 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=04e8 --attr-match=idProduct=730b || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=036b || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=0c00 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=0c4c || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=0c57 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=0c5e || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=0c5a || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=0c6c || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=0c70 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=0c72 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=0c77 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=2706 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=3032 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=3057 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=3104 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=310d || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=3128 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=06cb --attr-match=idProduct=0081 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=06cb --attr-match=idProduct=0088 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=06cb --attr-match=idProduct=008a || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=06cb --attr-match=idProduct=009a || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=06cb --attr-match=idProduct=009b || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=06cb --attr-match=idProduct=00a2 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=06cb --attr-match=idProduct=00a8 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=06cb --attr-match=idProduct=00b7 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=06cb --attr-match=idProduct=00bb || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=06cb --attr-match=idProduct=00be || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=06cb --attr-match=idProduct=00c4 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=06cb --attr-match=idProduct=00cb || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=06cb --attr-match=idProduct=00c9 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=06cb --attr-match=idProduct=00d8 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=06cb --attr-match=idProduct=00da || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=06cb --attr-match=idProduct=00dc || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=06cb --attr-match=idProduct=00e4 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=06cb --attr-match=idProduct=00e7 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=06cb --attr-match=idProduct=00e9 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=06cb --attr-match=idProduct=00fd || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=0a5c --attr-match=idProduct=5801 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=0a5c --attr-match=idProduct=5805 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=0a5c --attr-match=idProduct=5834 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=0a5c --attr-match=idProduct=5840 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=0a5c --attr-match=idProduct=5841 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=0a5c --attr-match=idProduct=5842 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=0a5c --attr-match=idProduct=5843 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=0a5c --attr-match=idProduct=5844 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=0a5c --attr-match=idProduct=5845 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=0bda --attr-match=idProduct=5812 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=10a5 --attr-match=idProduct=0007 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=10a5 --attr-match=idProduct=9200 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=10a5 --attr-match=idProduct=9800 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=10a5 --attr-match=idProduct=e340 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=1188 --attr-match=idProduct=9545 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=138a --attr-match=idProduct=0007 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=138a --attr-match=idProduct=003a || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=138a --attr-match=idProduct=003c || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=138a --attr-match=idProduct=003d || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=138a --attr-match=idProduct=003f || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=138a --attr-match=idProduct=0090 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=138a --attr-match=idProduct=0092 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=138a --attr-match=idProduct=0094 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=138a --attr-match=idProduct=0097 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=138a --attr-match=idProduct=009d || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=138a --attr-match=idProduct=00ab || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=138a --attr-match=idProduct=00a6 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=147e --attr-match=idProduct=1002 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=1491 --attr-match=idProduct=0088 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=16d1 --attr-match=idProduct=1027 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=1c7a --attr-match=idProduct=0300 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=1c7a --attr-match=idProduct=0575 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=1c7a --attr-match=idProduct=0576 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=1c7a --attr-match=idProduct=0577 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=27c6 --attr-match=idProduct=5042 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=27c6 --attr-match=idProduct=5110 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=27c6 --attr-match=idProduct=5117 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=27c6 --attr-match=idProduct=5120 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=27c6 --attr-match=idProduct=5125 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=27c6 --attr-match=idProduct=5201 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=27c6 --attr-match=idProduct=521d || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=27c6 --attr-match=idProduct=5301 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=27c6 --attr-match=idProduct=530c || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=27c6 --attr-match=idProduct=532d || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=27c6 --attr-match=idProduct=5335 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=27c6 --attr-match=idProduct=533c || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=27c6 --attr-match=idProduct=5381 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=27c6 --attr-match=idProduct=5385 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=27c6 --attr-match=idProduct=538c || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=27c6 --attr-match=idProduct=538d || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=27c6 --attr-match=idProduct=5395 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=27c6 --attr-match=idProduct=5503 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=27c6 --attr-match=idProduct=550a || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=27c6 --attr-match=idProduct=550c || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=27c6 --attr-match=idProduct=5584 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=27c6 --attr-match=idProduct=55a2 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=27c6 --attr-match=idProduct=55a4 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=27c6 --attr-match=idProduct=55b4 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=27c6 --attr-match=idProduct=5740 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=27c6 --attr-match=idProduct=5e0a || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=27c6 --attr-match=idProduct=581a || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=27c6 --attr-match=idProduct=589a || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=27c6 --attr-match=idProduct=6382 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=2808 --attr-match=idProduct=9338 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=2808 --attr-match=idProduct=93a9 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=298d --attr-match=idProduct=2020 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=298d --attr-match=idProduct=2033 || true
|
||||
udevadm trigger --action=add --attr-match=idVendor=3538 --attr-match=idProduct=0930 || true
|
||||
|
||||
fi
|
||||
|
||||
exit 0
|
||||
Vendored
+17
@@ -0,0 +1,17 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
#DEBHELPER#
|
||||
|
||||
if [ "$1" = "configure" -o "$1" = "upgrade" ] && command -V udevadm >/dev/null 2>&1; then
|
||||
# apply hwdb rules at package installation, see
|
||||
# <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=683863#27>
|
||||
# NOTA BENE: after the DEBHELPER section since dh_installudev
|
||||
# adds stuff there
|
||||
# The devices ID list is auto-generated using the gbp postimport hook
|
||||
# see debian/README.sources for more details.
|
||||
@UDEVADM_TRIGGERS@
|
||||
fi
|
||||
|
||||
exit 0
|
||||
Vendored
+94
@@ -0,0 +1,94 @@
|
||||
libfprint-2.so.2 libfprint-2-2 #MINVER#
|
||||
* Build-Depends-Package: libfprint-2-dev
|
||||
LIBFPRINT_2.0.0@LIBFPRINT_2.0.0 1:1.90.1
|
||||
fp_context_enumerate@LIBFPRINT_2.0.0 1:1.90.1
|
||||
fp_context_get_devices@LIBFPRINT_2.0.0 1:1.90.1
|
||||
fp_context_get_type@LIBFPRINT_2.0.0 1:1.90.1
|
||||
fp_context_new@LIBFPRINT_2.0.0 1:1.90.1
|
||||
fp_device_capture@LIBFPRINT_2.0.0 1:1.90.1
|
||||
fp_device_capture_finish@LIBFPRINT_2.0.0 1:1.90.1
|
||||
fp_device_capture_sync@LIBFPRINT_2.0.0 1:1.90.1
|
||||
fp_device_clear_storage@LIBFPRINT_2.0.0 1:1.94.1
|
||||
fp_device_clear_storage_finish@LIBFPRINT_2.0.0 1:1.94.1
|
||||
fp_device_clear_storage_sync@LIBFPRINT_2.0.0 1:1.94.1
|
||||
fp_device_close@LIBFPRINT_2.0.0 1:1.90.1
|
||||
fp_device_close_finish@LIBFPRINT_2.0.0 1:1.90.1
|
||||
fp_device_close_sync@LIBFPRINT_2.0.0 1:1.90.1
|
||||
fp_device_delete_print@LIBFPRINT_2.0.0 1:1.90.1
|
||||
fp_device_delete_print_finish@LIBFPRINT_2.0.0 1:1.90.1
|
||||
fp_device_delete_print_sync@LIBFPRINT_2.0.0 1:1.90.1
|
||||
fp_device_enroll@LIBFPRINT_2.0.0 1:1.90.1
|
||||
fp_device_enroll_finish@LIBFPRINT_2.0.0 1:1.90.1
|
||||
fp_device_enroll_sync@LIBFPRINT_2.0.0 1:1.90.1
|
||||
fp_device_error_get_type@LIBFPRINT_2.0.0 1:1.90.1
|
||||
fp_device_error_quark@LIBFPRINT_2.0.0 1:1.90.1
|
||||
fp_device_feature_get_type@LIBFPRINT_2.0.0 1:1.94.1
|
||||
fp_device_get_device_id@LIBFPRINT_2.0.0 1:1.90.1
|
||||
fp_device_get_driver@LIBFPRINT_2.0.0 1:1.90.1
|
||||
fp_device_get_features@LIBFPRINT_2.0.0 1:1.94.1
|
||||
fp_device_get_finger_status@LIBFPRINT_2.0.0 1:1.90.4
|
||||
fp_device_get_name@LIBFPRINT_2.0.0 1:1.90.1
|
||||
fp_device_get_nr_enroll_stages@LIBFPRINT_2.0.0 1:1.90.1
|
||||
fp_device_get_scan_type@LIBFPRINT_2.0.0 1:1.90.1
|
||||
fp_device_get_temperature@LIBFPRINT_2.0.0 1:1.94.1
|
||||
fp_device_get_type@LIBFPRINT_2.0.0 1:1.90.1
|
||||
fp_device_has_feature@LIBFPRINT_2.0.0 1:1.94.1
|
||||
fp_device_has_storage@LIBFPRINT_2.0.0 1:1.90.1
|
||||
fp_device_identify@LIBFPRINT_2.0.0 1:1.90.1
|
||||
fp_device_identify_finish@LIBFPRINT_2.0.0 1:1.90.1
|
||||
fp_device_identify_sync@LIBFPRINT_2.0.0 1:1.90.1
|
||||
fp_device_is_open@LIBFPRINT_2.0.0 1:1.90.1
|
||||
fp_device_list_prints@LIBFPRINT_2.0.0 1:1.90.1
|
||||
fp_device_list_prints_finish@LIBFPRINT_2.0.0 1:1.90.1
|
||||
fp_device_list_prints_sync@LIBFPRINT_2.0.0 1:1.90.1
|
||||
fp_device_open@LIBFPRINT_2.0.0 1:1.90.1
|
||||
fp_device_open_finish@LIBFPRINT_2.0.0 1:1.90.1
|
||||
fp_device_open_sync@LIBFPRINT_2.0.0 1:1.90.1
|
||||
fp_device_resume@LIBFPRINT_2.0.0 1:1.94.1
|
||||
fp_device_resume_finish@LIBFPRINT_2.0.0 1:1.94.1
|
||||
fp_device_resume_sync@LIBFPRINT_2.0.0 1:1.94.1
|
||||
fp_device_retry_get_type@LIBFPRINT_2.0.0 1:1.90.1
|
||||
fp_device_retry_quark@LIBFPRINT_2.0.0 1:1.90.1
|
||||
fp_device_supports_capture@LIBFPRINT_2.0.0 1:1.90.1
|
||||
fp_device_supports_identify@LIBFPRINT_2.0.0 1:1.90.1
|
||||
fp_device_suspend@LIBFPRINT_2.0.0 1:1.94.1
|
||||
fp_device_suspend_finish@LIBFPRINT_2.0.0 1:1.94.1
|
||||
fp_device_suspend_sync@LIBFPRINT_2.0.0 1:1.94.1
|
||||
fp_device_type_get_type@LIBFPRINT_2.0.0 1:1.90.1
|
||||
fp_device_verify@LIBFPRINT_2.0.0 1:1.90.1
|
||||
fp_device_verify_finish@LIBFPRINT_2.0.0 1:1.90.1
|
||||
fp_device_verify_sync@LIBFPRINT_2.0.0 1:1.90.1
|
||||
fp_finger_get_type@LIBFPRINT_2.0.0 1:1.90.1
|
||||
fp_finger_status_flags_get_type@LIBFPRINT_2.0.0 1:1.90.4
|
||||
fp_image_detect_minutiae@LIBFPRINT_2.0.0 1:1.90.1
|
||||
fp_image_detect_minutiae_finish@LIBFPRINT_2.0.0 1:1.90.1
|
||||
fp_image_device_get_type@LIBFPRINT_2.0.0 1:1.90.1
|
||||
fp_image_get_binarized@LIBFPRINT_2.0.0 1:1.90.1
|
||||
fp_image_get_data@LIBFPRINT_2.0.0 1:1.90.1
|
||||
fp_image_get_height@LIBFPRINT_2.0.0 1:1.90.1
|
||||
fp_image_get_minutiae@LIBFPRINT_2.0.0 1:1.90.1
|
||||
fp_image_get_ppmm@LIBFPRINT_2.0.0 1:1.90.1
|
||||
fp_image_get_type@LIBFPRINT_2.0.0 1:1.90.1
|
||||
fp_image_get_width@LIBFPRINT_2.0.0 1:1.90.1
|
||||
fp_image_new@LIBFPRINT_2.0.0 1:1.90.1
|
||||
fp_minutia_get_coords@LIBFPRINT_2.0.0 1:1.90.1
|
||||
fp_print_compatible@LIBFPRINT_2.0.0 1:1.90.1
|
||||
fp_print_deserialize@LIBFPRINT_2.0.0 1:1.90.1
|
||||
fp_print_equal@LIBFPRINT_2.0.0 1:1.90.1
|
||||
fp_print_get_description@LIBFPRINT_2.0.0 1:1.90.1
|
||||
fp_print_get_device_id@LIBFPRINT_2.0.0 1:1.90.1
|
||||
fp_print_get_device_stored@LIBFPRINT_2.0.0 1:1.90.1
|
||||
fp_print_get_driver@LIBFPRINT_2.0.0 1:1.90.1
|
||||
fp_print_get_enroll_date@LIBFPRINT_2.0.0 1:1.90.1
|
||||
fp_print_get_finger@LIBFPRINT_2.0.0 1:1.90.1
|
||||
fp_print_get_image@LIBFPRINT_2.0.0 1:1.90.1
|
||||
fp_print_get_type@LIBFPRINT_2.0.0 1:1.90.1
|
||||
fp_print_get_username@LIBFPRINT_2.0.0 1:1.90.1
|
||||
fp_print_new@LIBFPRINT_2.0.0 1:1.90.1
|
||||
fp_print_serialize@LIBFPRINT_2.0.0 1:1.90.1
|
||||
fp_print_set_description@LIBFPRINT_2.0.0 1:1.90.1
|
||||
fp_print_set_enroll_date@LIBFPRINT_2.0.0 1:1.90.1
|
||||
fp_print_set_finger@LIBFPRINT_2.0.0 1:1.90.1
|
||||
fp_print_set_username@LIBFPRINT_2.0.0 1:1.90.1
|
||||
fp_scan_type_get_type@LIBFPRINT_2.0.0 1:1.90.1
|
||||
fp_temperature_get_type@LIBFPRINT_2.0.0 1:1.94.1
|
||||
Vendored
+4
@@ -0,0 +1,4 @@
|
||||
usr/include/libfprint-[0-9]/*.h
|
||||
usr/lib/${DEB_HOST_MULTIARCH}/libfprint-[0-9].so
|
||||
usr/lib/${DEB_HOST_MULTIARCH}/pkgconfig/libfprint-[0-9].pc
|
||||
usr/share/gir-1.0/FPrint-*.gir
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
usr/share/gtk-doc/*/libfprint-*
|
||||
Vendored
+2
@@ -0,0 +1,2 @@
|
||||
usr/libexec/installed-tests/libfprint-[0-9]
|
||||
usr/share/installed-tests/libfprint-[0-9]
|
||||
Vendored
+3
@@ -0,0 +1,3 @@
|
||||
usr/include/libfprint-[0-9]/tod-[0-9]/*
|
||||
usr/lib/${DEB_HOST_MULTIARCH}/libfprint-[0-9]-tod.so
|
||||
usr/lib/${DEB_HOST_MULTIARCH}/pkgconfig/libfprint-[0-9]-tod-[0-9].pc
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
usr/lib/${DEB_HOST_MULTIARCH}/libfprint-[0-9]-tod.so.*
|
||||
Vendored
+239
@@ -0,0 +1,239 @@
|
||||
libfprint-2-tod.so.1 libfprint-2-tod1 #MINVER#
|
||||
LIBFPRINT_TOD_1.0.0@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
LIBFPRINT_TOD_1_1.92@LIBFPRINT_TOD_1_1.92 1:1.94.1+tod1
|
||||
LIBFPRINT_TOD_1_1.94@LIBFPRINT_TOD_1_1.94 1:1.94.1+tod1
|
||||
fpi_assemble_frames@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_assemble_lines@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_byte_reader_dup_data@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_byte_reader_dup_string_utf16@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_byte_reader_dup_string_utf32@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_byte_reader_dup_string_utf8@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_byte_reader_free@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_byte_reader_get_data@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_byte_reader_get_float32_be@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_byte_reader_get_float32_le@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_byte_reader_get_float64_be@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_byte_reader_get_float64_le@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_byte_reader_get_int16_be@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_byte_reader_get_int16_le@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_byte_reader_get_int24_be@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_byte_reader_get_int24_le@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_byte_reader_get_int32_be@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_byte_reader_get_int32_le@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_byte_reader_get_int64_be@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_byte_reader_get_int64_le@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_byte_reader_get_int8@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_byte_reader_get_pos@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_byte_reader_get_remaining@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_byte_reader_get_size@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_byte_reader_get_string_utf8@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_byte_reader_get_sub_reader@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_byte_reader_get_uint16_be@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_byte_reader_get_uint16_le@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_byte_reader_get_uint24_be@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_byte_reader_get_uint24_le@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_byte_reader_get_uint32_be@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_byte_reader_get_uint32_le@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_byte_reader_get_uint64_be@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_byte_reader_get_uint64_le@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_byte_reader_get_uint8@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_byte_reader_init@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_byte_reader_masked_scan_uint32@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_byte_reader_masked_scan_uint32_peek@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_byte_reader_new@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_byte_reader_peek_data@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_byte_reader_peek_float32_be@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_byte_reader_peek_float32_le@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_byte_reader_peek_float64_be@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_byte_reader_peek_float64_le@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_byte_reader_peek_int16_be@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_byte_reader_peek_int16_le@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_byte_reader_peek_int24_be@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_byte_reader_peek_int24_le@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_byte_reader_peek_int32_be@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_byte_reader_peek_int32_le@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_byte_reader_peek_int64_be@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_byte_reader_peek_int64_le@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_byte_reader_peek_int8@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_byte_reader_peek_string_utf8@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_byte_reader_peek_sub_reader@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_byte_reader_peek_uint16_be@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_byte_reader_peek_uint16_le@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_byte_reader_peek_uint24_be@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_byte_reader_peek_uint24_le@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_byte_reader_peek_uint32_be@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_byte_reader_peek_uint32_le@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_byte_reader_peek_uint64_be@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_byte_reader_peek_uint64_le@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_byte_reader_peek_uint8@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_byte_reader_set_pos@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_byte_reader_skip@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_byte_reader_skip_string_utf16@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_byte_reader_skip_string_utf32@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_byte_reader_skip_string_utf8@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_byte_writer_ensure_free_space@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_byte_writer_fill@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_byte_writer_free@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_byte_writer_free_and_get_data@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_byte_writer_get_remaining@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_byte_writer_init@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_byte_writer_init_with_data@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_byte_writer_init_with_size@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_byte_writer_new@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_byte_writer_new_with_data@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_byte_writer_new_with_size@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_byte_writer_put_data@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_byte_writer_put_float32_be@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_byte_writer_put_float32_le@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_byte_writer_put_float64_be@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_byte_writer_put_float64_le@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_byte_writer_put_int16_be@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_byte_writer_put_int16_le@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_byte_writer_put_int24_be@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_byte_writer_put_int24_le@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_byte_writer_put_int32_be@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_byte_writer_put_int32_le@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_byte_writer_put_int64_be@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_byte_writer_put_int64_le@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_byte_writer_put_int8@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_byte_writer_put_string_utf16@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_byte_writer_put_string_utf32@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_byte_writer_put_string_utf8@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_byte_writer_put_uint16_be@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_byte_writer_put_uint16_le@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_byte_writer_put_uint24_be@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_byte_writer_put_uint24_le@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_byte_writer_put_uint32_be@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_byte_writer_put_uint32_le@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_byte_writer_put_uint64_be@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_byte_writer_put_uint64_le@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_byte_writer_put_uint8@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_byte_writer_reset@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_byte_writer_reset_and_get_data@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_device_action_error@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_device_action_get_type@LIBFPRINT_TOD_1.0.0 1:1.90.3+tod1
|
||||
fpi_device_action_is_cancelled@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_device_add_timeout@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_device_capture_complete@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_device_class_auto_initialize_features@LIBFPRINT_TOD_1_1.92 1:1.94.1+tod1
|
||||
fpi_device_clear_storage_complete@LIBFPRINT_TOD_1_1.92 1:1.94.1+tod1
|
||||
fpi_device_close_complete@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_device_configure_wakeup@LIBFPRINT_TOD_1.0.0 1:1.94.1+tod1
|
||||
fpi_device_critical_enter@LIBFPRINT_TOD_1_1.94 1:1.94.1+tod1
|
||||
fpi_device_critical_leave@LIBFPRINT_TOD_1_1.94 1:1.94.1+tod1
|
||||
fpi_device_delete_complete@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_device_enroll_complete@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_device_enroll_progress@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_device_error_new@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_device_error_new_msg@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_device_get_cancellable@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_device_get_capture_data@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_device_get_current_action@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_device_get_delete_data@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_device_get_driver_data@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_device_get_enroll_data@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_device_get_identify_data@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_device_get_udev_data@LIBFPRINT_TOD_1_1.92 1:1.94.1+tod1
|
||||
fpi_device_get_usb_device@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_device_get_verify_data@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_device_get_virtual_env@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_device_identify_complete@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_device_identify_report@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_device_list_complete@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_device_open_complete@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_device_probe_complete@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_device_remove@LIBFPRINT_TOD_1.0.0 1:1.90.5+tod1
|
||||
fpi_device_report_finger_status@LIBFPRINT_TOD_1.0.0 1:1.90.5+tod1
|
||||
fpi_device_report_finger_status_changes@LIBFPRINT_TOD_1.0.0 1:1.90.5+tod1
|
||||
fpi_device_resume@LIBFPRINT_TOD_1_1.94 1:1.94.5+tod1
|
||||
fpi_device_resume_complete@LIBFPRINT_TOD_1_1.94 1:1.94.1+tod1
|
||||
fpi_device_retry_new@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_device_retry_new_msg@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_device_set_nr_enroll_stages@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_device_set_scan_type@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_device_suspend@LIBFPRINT_TOD_1_1.94 1:1.94.5+tod1
|
||||
fpi_device_suspend_complete@LIBFPRINT_TOD_1_1.94 1:1.94.1+tod1
|
||||
fpi_device_udev_subtype_flags_get_type@LIBFPRINT_TOD_1.0.0 1:1.94.1+tod1
|
||||
fpi_device_update_features@LIBFPRINT_TOD_1_1.92 1:1.94.1+tod1
|
||||
fpi_device_update_temp@LIBFPRINT_TOD_1.0.0 1:1.94.1+tod1
|
||||
fpi_device_verify_complete@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_device_verify_report@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_do_movement_estimation@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_image_device_activate@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_image_device_activate_complete@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_image_device_close_complete@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_image_device_deactivate@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_image_device_deactivate_complete@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_image_device_image_captured@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_image_device_open_complete@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_image_device_report_finger_status@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_image_device_retry_scan@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_image_device_session_error@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_image_device_set_bz3_threshold@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_image_device_state_get_type@LIBFPRINT_TOD_1.0.0 1:1.90.3+tod1
|
||||
fpi_image_flags_get_type@LIBFPRINT_TOD_1.0.0 1:1.90.3+tod1
|
||||
fpi_image_resize@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_match_result_get_type@LIBFPRINT_TOD_1.0.0 1:1.90.3+tod1
|
||||
fpi_mean_sq_diff_norm@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_print_add_from_image@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_print_add_print@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_print_bz3_match@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_print_fill_from_user_id@LIBFPRINT_TOD_1.0.0 1:1.90.2+tod1
|
||||
fpi_print_generate_user_id@LIBFPRINT_TOD_1.0.0 1:1.90.2+tod1
|
||||
fpi_print_set_device_stored@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_print_set_type@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_print_type_get_type@LIBFPRINT_TOD_1.0.0 1:1.90.3+tod1
|
||||
fpi_spi_transfer_get_type@LIBFPRINT_TOD_1_1.92 1:1.94.1+tod1
|
||||
fpi_spi_transfer_new@LIBFPRINT_TOD_1_1.92 1:1.94.1+tod1
|
||||
fpi_spi_transfer_read@LIBFPRINT_TOD_1_1.92 1:1.94.1+tod1
|
||||
fpi_spi_transfer_read_full@LIBFPRINT_TOD_1_1.92 1:1.94.1+tod1
|
||||
fpi_spi_transfer_ref@LIBFPRINT_TOD_1_1.92 1:1.94.1+tod1
|
||||
fpi_spi_transfer_submit@LIBFPRINT_TOD_1_1.92 1:1.94.1+tod1
|
||||
fpi_spi_transfer_submit_sync@LIBFPRINT_TOD_1_1.92 1:1.94.1+tod1
|
||||
fpi_spi_transfer_unref@LIBFPRINT_TOD_1_1.92 1:1.94.1+tod1
|
||||
fpi_spi_transfer_write@LIBFPRINT_TOD_1_1.92 1:1.94.1+tod1
|
||||
fpi_spi_transfer_write_full@LIBFPRINT_TOD_1_1.92 1:1.94.1+tod1
|
||||
fpi_ssm_cancel_delayed_state_change@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_ssm_dup_error@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_ssm_free@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_ssm_get_cur_state@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_ssm_get_data@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_ssm_get_device@LIBFPRINT_TOD_1_1.92 1:1.94.1+tod1
|
||||
fpi_ssm_get_error@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_ssm_jump_to_state@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_ssm_jump_to_state_delayed@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_ssm_jump_to_state_delayed@LIBFPRINT_TOD_1_1.92 1:1.94.1+tod1
|
||||
fpi_ssm_jump_to_state_delayed_1_90@LIBFPRINT_TOD_1.0.0 1:1.94.1+tod1
|
||||
fpi_ssm_mark_completed@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_ssm_mark_completed_delayed@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_ssm_mark_completed_delayed@LIBFPRINT_TOD_1_1.92 1:1.94.1+tod1
|
||||
fpi_ssm_mark_completed_delayed_1_90@LIBFPRINT_TOD_1.0.0 1:1.94.1+tod1
|
||||
fpi_ssm_mark_failed@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_ssm_new_full@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_ssm_new_full@LIBFPRINT_TOD_1_1.92 1:1.94.1+tod1
|
||||
fpi_ssm_new_full_1_90@LIBFPRINT_TOD_1.0.0 1:1.94.1+tod1
|
||||
fpi_ssm_next_state@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_ssm_next_state_delayed@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_ssm_next_state_delayed@LIBFPRINT_TOD_1_1.92 1:1.94.1+tod1
|
||||
fpi_ssm_next_state_delayed_1_90@LIBFPRINT_TOD_1.0.0 1:1.94.1+tod1
|
||||
fpi_ssm_set_data@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_ssm_silence_debug@LIBFPRINT_TOD_1_1.94 1:1.94.3+tod1
|
||||
fpi_ssm_spi_transfer_cb@LIBFPRINT_TOD_1_1.92 1:1.94.1+tod1
|
||||
fpi_ssm_spi_transfer_with_weak_pointer_cb@LIBFPRINT_TOD_1_1.92 1:1.94.1+tod1
|
||||
fpi_ssm_start@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_ssm_start_subsm@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_ssm_usb_transfer_cb@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_ssm_usb_transfer_with_weak_pointer_cb@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_std_sq_dev@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_transfer_type_get_type@LIBFPRINT_TOD_1.0.0 1:1.90.3+tod1
|
||||
fpi_usb_transfer_fill_bulk@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_usb_transfer_fill_bulk_full@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_usb_transfer_fill_control@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_usb_transfer_fill_interrupt@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_usb_transfer_fill_interrupt_full@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_usb_transfer_get_type@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_usb_transfer_new@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_usb_transfer_ref@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_usb_transfer_submit@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_usb_transfer_submit_sync@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
fpi_usb_transfer_unref@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||
+37
@@ -0,0 +1,37 @@
|
||||
From a603b95786836d27679301ecd4e68e4227ab4c82 Mon Sep 17 00:00:00 2001
|
||||
From: herman lin <herman.lin@emc.com.tw>
|
||||
Date: Thu, 8 May 2025 15:34:37 +0800
|
||||
Subject: [PATCH] elanmoc: Add new PID 0x0CA8
|
||||
|
||||
---
|
||||
data/autosuspend.hwdb | 1 +
|
||||
libfprint/drivers/elanmoc/elanmoc.c | 1 +
|
||||
2 files changed, 2 insertions(+)
|
||||
|
||||
diff --git a/data/autosuspend.hwdb b/data/autosuspend.hwdb
|
||||
index 39dd316..43190cb 100644
|
||||
--- a/data/autosuspend.hwdb
|
||||
+++ b/data/autosuspend.hwdb
|
||||
@@ -157,6 +157,7 @@ usb:v04F3p0C8C*
|
||||
usb:v04F3p0C8D*
|
||||
usb:v04F3p0C99*
|
||||
usb:v04F3p0C9F*
|
||||
+usb:v04F3p0CA8*
|
||||
ID_AUTOSUSPEND=1
|
||||
ID_PERSIST=0
|
||||
|
||||
diff --git a/libfprint/drivers/elanmoc/elanmoc.c b/libfprint/drivers/elanmoc/elanmoc.c
|
||||
index 42a84a6..0e99e57 100644
|
||||
--- a/libfprint/drivers/elanmoc/elanmoc.c
|
||||
+++ b/libfprint/drivers/elanmoc/elanmoc.c
|
||||
@@ -33,6 +33,7 @@ static const FpIdEntry id_table[] = {
|
||||
{ .vid = 0x04f3, .pid = 0x0c8d, },
|
||||
{ .vid = 0x04f3, .pid = 0x0c99, },
|
||||
{ .vid = 0x04f3, .pid = 0x0c9f, },
|
||||
+ { .vid = 0x04f3, .pid = 0x0ca8, },
|
||||
{ .vid = 0, .pid = 0, .driver_data = 0 }, /* terminating entry */
|
||||
};
|
||||
|
||||
--
|
||||
2.43.0
|
||||
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
Subject: elanmoc: Add new PID 0x0C9F
|
||||
Origin: upstream, https://gitlab.freedesktop.org/libfprint/libfprint/-/merge_requests/501
|
||||
Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/libfprint/+bug/2089367
|
||||
|
||||
diff --git a/data/autosuspend.hwdb b/data/autosuspend.hwdb
|
||||
index 8e0e6eab12e772058a8957a2b9f2d39e0bdc8e11..342c6d0e6538028d90a11d1607cd9e07086aeb8c 100644
|
||||
--- a/data/autosuspend.hwdb
|
||||
+++ b/data/autosuspend.hwdb
|
||||
@@ -156,6 +156,7 @@ usb:v04F3p0C88*
|
||||
usb:v04F3p0C8C*
|
||||
usb:v04F3p0C8D*
|
||||
usb:v04F3p0C99*
|
||||
+usb:v04F3p0C9F*
|
||||
ID_AUTOSUSPEND=1
|
||||
ID_PERSIST=0
|
||||
|
||||
diff --git a/libfprint/drivers/elanmoc/elanmoc.c b/libfprint/drivers/elanmoc/elanmoc.c
|
||||
index e86b79a28ec2240a303ad602b567d10447e3b09b..42a84a627e68020bb070bce1a6cffa669cffe9ed 100644
|
||||
--- a/libfprint/drivers/elanmoc/elanmoc.c
|
||||
+++ b/libfprint/drivers/elanmoc/elanmoc.c
|
||||
@@ -32,6 +32,7 @@ static const FpIdEntry id_table[] = {
|
||||
{ .vid = 0x04f3, .pid = 0x0c8c, },
|
||||
{ .vid = 0x04f3, .pid = 0x0c8d, },
|
||||
{ .vid = 0x04f3, .pid = 0x0c99, },
|
||||
+ { .vid = 0x04f3, .pid = 0x0c9f, },
|
||||
{ .vid = 0, .pid = 0, .driver_data = 0 }, /* terminating entry */
|
||||
};
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
From 763b6830006ca88bced7744c219c9a961d1637f4 Mon Sep 17 00:00:00 2001
|
||||
From: jialei <jialei@egoodix.com>
|
||||
Date: Wed, 29 Oct 2025 14:32:54 +0800
|
||||
Subject: [PATCH] goodixmoc:add new PID 0x66A9
|
||||
|
||||
---
|
||||
data/autosuspend.hwdb | 1 +
|
||||
libfprint/drivers/goodixmoc/goodix.c | 1 +
|
||||
2 files changed, 2 insertions(+)
|
||||
|
||||
diff --git a/data/autosuspend.hwdb b/data/autosuspend.hwdb
|
||||
index 74ac65b..df18494 100644
|
||||
--- a/data/autosuspend.hwdb
|
||||
+++ b/data/autosuspend.hwdb
|
||||
@@ -207,6 +207,7 @@ usb:v27C6p6594*
|
||||
usb:v27C6p659A*
|
||||
usb:v27C6p659C*
|
||||
usb:v27C6p6A94*
|
||||
+usb:v27C6p66A9*
|
||||
ID_AUTOSUSPEND=1
|
||||
ID_PERSIST=0
|
||||
|
||||
diff --git a/libfprint/drivers/goodixmoc/goodix.c b/libfprint/drivers/goodixmoc/goodix.c
|
||||
index 5a3ffac..8aea175 100644
|
||||
--- a/libfprint/drivers/goodixmoc/goodix.c
|
||||
+++ b/libfprint/drivers/goodixmoc/goodix.c
|
||||
@@ -1632,6 +1632,7 @@ static const FpIdEntry id_table[] = {
|
||||
{ .vid = 0x27c6, .pid = 0x659A, },
|
||||
{ .vid = 0x27c6, .pid = 0x659C, },
|
||||
{ .vid = 0x27c6, .pid = 0x6A94, },
|
||||
+ { .vid = 0x27c6, .pid = 0x66A9, },
|
||||
{ .vid = 0, .pid = 0, .driver_data = 0 }, /* terminating entry */
|
||||
};
|
||||
|
||||
--
|
||||
2.43.0
|
||||
|
||||
+44
@@ -0,0 +1,44 @@
|
||||
From: =?utf-8?b?Ik1hcmNvIFRyZXZpc2FuIChUcmV2acOxbyki?= <mail@3v1n0.net>
|
||||
Date: Wed, 22 May 2024 17:08:19 +0200
|
||||
Subject: libfprint-fprint-list-udev-hwdb: Add new broadcom device IDs
|
||||
|
||||
(cherry picked from commit eaec2339ccaee64b2bdb1d1e27f51ada673e4087)
|
||||
---
|
||||
data/autosuspend.hwdb | 6 ++++++
|
||||
libfprint/fprint-list-udev-hwdb.c | 6 ++++++
|
||||
2 files changed, 12 insertions(+)
|
||||
|
||||
diff --git a/data/autosuspend.hwdb b/data/autosuspend.hwdb
|
||||
index 74ac65b..cb3e74b 100644
|
||||
--- a/data/autosuspend.hwdb
|
||||
+++ b/data/autosuspend.hwdb
|
||||
@@ -353,6 +353,12 @@ usb:v0A5Cp5842*
|
||||
usb:v0A5Cp5843*
|
||||
usb:v0A5Cp5844*
|
||||
usb:v0A5Cp5845*
|
||||
+usb:v0A5Cp5860*
|
||||
+usb:v0A5Cp5863*
|
||||
+usb:v0A5Cp5864*
|
||||
+usb:v0A5Cp5865*
|
||||
+usb:v0A5Cp5866*
|
||||
+usb:v0A5Cp5867*
|
||||
usb:v0BDAp5812*
|
||||
usb:v10A5p0007*
|
||||
usb:v10A5p9200*
|
||||
diff --git a/libfprint/fprint-list-udev-hwdb.c b/libfprint/fprint-list-udev-hwdb.c
|
||||
index bace9f9..4d056ae 100644
|
||||
--- a/libfprint/fprint-list-udev-hwdb.c
|
||||
+++ b/libfprint/fprint-list-udev-hwdb.c
|
||||
@@ -76,6 +76,12 @@ static const FpIdEntry allowlist_id_table[] = {
|
||||
{ .vid = 0x0a5c, .pid = 0x5843 },
|
||||
{ .vid = 0x0a5c, .pid = 0x5844 },
|
||||
{ .vid = 0x0a5c, .pid = 0x5845 },
|
||||
+ { .vid = 0x0a5c, .pid = 0x5860 },
|
||||
+ { .vid = 0x0a5c, .pid = 0x5863 },
|
||||
+ { .vid = 0x0a5c, .pid = 0x5864 },
|
||||
+ { .vid = 0x0a5c, .pid = 0x5865 },
|
||||
+ { .vid = 0x0a5c, .pid = 0x5866 },
|
||||
+ { .vid = 0x0a5c, .pid = 0x5867 },
|
||||
{ .vid = 0x0bda, .pid = 0x5812 },
|
||||
{ .vid = 0x10a5, .pid = 0x0007 },
|
||||
{ .vid = 0x10a5, .pid = 0x9200 },
|
||||
Vendored
+7
@@ -0,0 +1,7 @@
|
||||
libfprint-fprint-list-udev-hwdb-Add-new-broadcom-device-I.patch
|
||||
elanmoc-add-new-pid-0x0c9f.patch
|
||||
synaptics-Add-new-PID-0x0107-and-0x108.patch
|
||||
synaptics-Add-new-PID-0x019D.patch
|
||||
synaptics-add-new-PID-0x019F-0x109-and-0x10A.patch
|
||||
goodixmoc-add-new-PID-0x66A9.patch
|
||||
elanmoc-Add-new-PID-0x0CA8.patch
|
||||
@@ -0,0 +1,39 @@
|
||||
From a8ef1672a4ca7e60760349ce320a8f5b778244d5 Mon Sep 17 00:00:00 2001
|
||||
From: Aris Lin <aris.lin@synaptics.com>
|
||||
Date: Mon, 18 Nov 2024 11:18:29 +0800
|
||||
Subject: [PATCH] synaptics: Add new PID 0x0107 and 0x108
|
||||
|
||||
---
|
||||
data/autosuspend.hwdb | 2 ++
|
||||
libfprint/drivers/synaptics/synaptics.c | 2 ++
|
||||
2 files changed, 4 insertions(+)
|
||||
|
||||
diff --git a/data/autosuspend.hwdb b/data/autosuspend.hwdb
|
||||
index 74ac65b..386d8bd 100644
|
||||
--- a/data/autosuspend.hwdb
|
||||
+++ b/data/autosuspend.hwdb
|
||||
@@ -229,6 +229,8 @@ usb:v06CBp00C2*
|
||||
usb:v06CBp0100*
|
||||
usb:v06CBp00F0*
|
||||
usb:v06CBp0103*
|
||||
+usb:v06CBp0107*
|
||||
+usb:v06CBp0108*
|
||||
usb:v06CBp0123*
|
||||
usb:v06CBp0124*
|
||||
usb:v06CBp0126*
|
||||
diff --git a/libfprint/drivers/synaptics/synaptics.c b/libfprint/drivers/synaptics/synaptics.c
|
||||
index 138e734..a5d2990 100644
|
||||
--- a/libfprint/drivers/synaptics/synaptics.c
|
||||
+++ b/libfprint/drivers/synaptics/synaptics.c
|
||||
@@ -39,6 +39,8 @@ static const FpIdEntry id_table[] = {
|
||||
{ .vid = SYNAPTICS_VENDOR_ID, .pid = 0x0100, },
|
||||
{ .vid = SYNAPTICS_VENDOR_ID, .pid = 0x00F0, },
|
||||
{ .vid = SYNAPTICS_VENDOR_ID, .pid = 0x0103, },
|
||||
+ { .vid = SYNAPTICS_VENDOR_ID, .pid = 0x0107, },
|
||||
+ { .vid = SYNAPTICS_VENDOR_ID, .pid = 0x0108, },
|
||||
{ .vid = SYNAPTICS_VENDOR_ID, .pid = 0x0123, },
|
||||
{ .vid = SYNAPTICS_VENDOR_ID, .pid = 0x0124, },
|
||||
{ .vid = SYNAPTICS_VENDOR_ID, .pid = 0x0126, },
|
||||
--
|
||||
2.43.0
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
From 2e766904f0250873aaa2133f5d0e84440843ec8b Mon Sep 17 00:00:00 2001
|
||||
From: Aris Lin <aris.lin@synaptics.com>
|
||||
Date: Mon, 13 May 2024 16:21:57 +0800
|
||||
Subject: [PATCH] synaptics: Add new PID 0x019D
|
||||
Origin: upstream, https://gitlab.freedesktop.org/libfprint/libfprint/-/commit/2e766904f0250873aaa2133f5d0e84440843ec8b
|
||||
Bug-Ubuntu: https://bugs.launchpad.net/bugs/2114712
|
||||
Signed-off-by: Atlas Yu <atlas.yu@canonical.com>
|
||||
|
||||
---
|
||||
data/autosuspend.hwdb | 1 +
|
||||
libfprint/drivers/synaptics/synaptics.c | 1 +
|
||||
2 files changed, 2 insertions(+)
|
||||
|
||||
diff --git a/data/autosuspend.hwdb b/data/autosuspend.hwdb
|
||||
index 342c6d0..ef81674 100644
|
||||
--- a/data/autosuspend.hwdb
|
||||
+++ b/data/autosuspend.hwdb
|
||||
@@ -243,6 +243,7 @@ usb:v06CBp015F*
|
||||
usb:v06CBp0104*
|
||||
usb:v06CBp0173*
|
||||
usb:v06CBp0106*
|
||||
+usb:v06CBp019D*
|
||||
ID_AUTOSUSPEND=1
|
||||
ID_PERSIST=0
|
||||
|
||||
diff --git a/libfprint/drivers/synaptics/synaptics.c b/libfprint/drivers/synaptics/synaptics.c
|
||||
index 138e734..7b7bf73 100644
|
||||
--- a/libfprint/drivers/synaptics/synaptics.c
|
||||
+++ b/libfprint/drivers/synaptics/synaptics.c
|
||||
@@ -48,6 +48,7 @@ static const FpIdEntry id_table[] = {
|
||||
{ .vid = SYNAPTICS_VENDOR_ID, .pid = 0x0104, },
|
||||
{ .vid = SYNAPTICS_VENDOR_ID, .pid = 0x0173, },
|
||||
{ .vid = SYNAPTICS_VENDOR_ID, .pid = 0x0106, },
|
||||
+ { .vid = SYNAPTICS_VENDOR_ID, .pid = 0x019D, },
|
||||
{ .vid = 0, .pid = 0, .driver_data = 0 }, /* terminating entry */
|
||||
};
|
||||
|
||||
--
|
||||
2.43.0
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
From: Aris Lin <aris.lin@synaptics.com>
|
||||
Date: Mon, 14 Jul 2025 11:52:56 +0800
|
||||
Subject: [PATCH] synaptics: add new PID 0x019F, 0x109 and 0x10A
|
||||
|
||||
Origin: upstream, https://gitlab.freedesktop.org/libfprint/libfprint/-/commit/7f5304d6eec37955c8d462e571c3d72af0be4684
|
||||
Bug-Ubuntu: https://bugs.launchpad.net/bugs/2133704
|
||||
Signed-off-by: Bin Li <binli@ubuntu.com>
|
||||
---
|
||||
data/autosuspend.hwdb | 3 +++
|
||||
libfprint/drivers/synaptics/synaptics.c | 3 +++
|
||||
2 files changed, 6 insertions(+)
|
||||
|
||||
diff --git a/data/autosuspend.hwdb b/data/autosuspend.hwdb
|
||||
index 7a1759e..10e643c 100644
|
||||
--- a/data/autosuspend.hwdb
|
||||
+++ b/data/autosuspend.hwdb
|
||||
@@ -232,6 +232,8 @@ usb:v06CBp00F0*
|
||||
usb:v06CBp0103*
|
||||
usb:v06CBp0107*
|
||||
usb:v06CBp0108*
|
||||
+usb:v06CBp0109*
|
||||
+usb:v06CBp010A*
|
||||
usb:v06CBp0123*
|
||||
usb:v06CBp0124*
|
||||
usb:v06CBp0126*
|
||||
@@ -242,6 +244,7 @@ usb:v06CBp0104*
|
||||
usb:v06CBp0173*
|
||||
usb:v06CBp0106*
|
||||
usb:v06CBp019D*
|
||||
+usb:v06CBp019F*
|
||||
ID_AUTOSUSPEND=1
|
||||
ID_PERSIST=0
|
||||
|
||||
diff --git a/libfprint/drivers/synaptics/synaptics.c b/libfprint/drivers/synaptics/synaptics.c
|
||||
index d272421..29fb5f1 100644
|
||||
--- a/libfprint/drivers/synaptics/synaptics.c
|
||||
+++ b/libfprint/drivers/synaptics/synaptics.c
|
||||
@@ -41,6 +41,8 @@ static const FpIdEntry id_table[] = {
|
||||
{ .vid = SYNAPTICS_VENDOR_ID, .pid = 0x0103, },
|
||||
{ .vid = SYNAPTICS_VENDOR_ID, .pid = 0x0107, },
|
||||
{ .vid = SYNAPTICS_VENDOR_ID, .pid = 0x0108, },
|
||||
+ { .vid = SYNAPTICS_VENDOR_ID, .pid = 0x0109, },
|
||||
+ { .vid = SYNAPTICS_VENDOR_ID, .pid = 0x010A, },
|
||||
{ .vid = SYNAPTICS_VENDOR_ID, .pid = 0x0123, },
|
||||
{ .vid = SYNAPTICS_VENDOR_ID, .pid = 0x0124, },
|
||||
{ .vid = SYNAPTICS_VENDOR_ID, .pid = 0x0126, },
|
||||
@@ -51,6 +53,7 @@ static const FpIdEntry id_table[] = {
|
||||
{ .vid = SYNAPTICS_VENDOR_ID, .pid = 0x0173, },
|
||||
{ .vid = SYNAPTICS_VENDOR_ID, .pid = 0x0106, },
|
||||
{ .vid = SYNAPTICS_VENDOR_ID, .pid = 0x019D, },
|
||||
+ { .vid = SYNAPTICS_VENDOR_ID, .pid = 0x019F, },
|
||||
{ .vid = 0, .pid = 0, .driver_data = 0 }, /* terminating entry */
|
||||
};
|
||||
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
#!/usr/bin/make -f
|
||||
|
||||
export DEB_BUILD_MAINT_OPTIONS = optimize=-lto
|
||||
export DPKG_GENSYMBOLS_CHECK_LEVEL = 2
|
||||
|
||||
BUILDDIR = $(CURDIR)/obj-$(DEB_HOST_GNU_TYPE)
|
||||
|
||||
# Configuration arguments
|
||||
CONFIG_ARGS = \
|
||||
-Dudev_hwdb=enabled \
|
||||
-Dudev_rules=enabled \
|
||||
-Ddrivers=all \
|
||||
-Dgtk-examples=false
|
||||
|
||||
%:
|
||||
dh $@ --with gir
|
||||
|
||||
override_dh_auto_configure:
|
||||
dh_auto_configure -- $(CONFIG_ARGS)
|
||||
|
||||
override_dh_auto_test:
|
||||
dh_auto_test -- -C $(BUILDDIR) --timeout-multiplier 5
|
||||
|
||||
override_dh_auto_clean:
|
||||
rm -rf tests/__pycache__
|
||||
dh_auto_clean
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
3.0 (quilt)
|
||||
Vendored
+3
@@ -0,0 +1,3 @@
|
||||
# This TOD driver binary is built using sources inside this package
|
||||
# but at previous version, see tests/tod-drivers/README.md for more information
|
||||
libfprint source: source-is-missing [tests/tod-drivers/tod-*.so]
|
||||
Vendored
+6
@@ -0,0 +1,6 @@
|
||||
Test-Command: gnome-desktop-testing-runner libfprint-2
|
||||
Features: test-name=installed-tests
|
||||
Classes: desktop
|
||||
Depends: gnome-desktop-testing,
|
||||
libfprint-2-tests
|
||||
Restrictions: allow-stderr
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
srcdir="${GBP_SOURCES_DIR:-.}"
|
||||
debpath="$(dirname "$0")"
|
||||
autosuspend_file="$srcdir/data/autosuspend.hwdb"
|
||||
commands_lines=()
|
||||
|
||||
while IFS= read -r line; do
|
||||
if [[ $line =~ ^usb:v([A-Fa-f0-9]{4})p([A-Fa-f0-9]{4}) ]]; then
|
||||
vendor="$(echo "${BASH_REMATCH[1]}" | tr '[:upper:]' '[:lower:]')"
|
||||
product="$(echo "${BASH_REMATCH[2]}" | tr '[:upper:]' '[:lower:]')"
|
||||
commands_lines+=("\tudevadm trigger --action=add --attr-match=idVendor=$vendor --attr-match=idProduct=$product || true")
|
||||
fi
|
||||
done < "$autosuspend_file"
|
||||
|
||||
UDEVADM_TRIGGERS=$( IFS=$'\n'; echo -e "${commands_lines[*]}" )
|
||||
export UDEVADM_TRIGGERS
|
||||
|
||||
for i in "$debpath"/libfprint-*.post*.in; do
|
||||
out="${i%.in}"
|
||||
perl -pe 's/\@UDEVADM_TRIGGERS\@/`printenv UDEVADM_TRIGGERS`/e' "$i" > "$out"
|
||||
|
||||
if [ -n "$GBP_BRANCH" ]; then
|
||||
if ! git diff-index --quiet HEAD -- "$out"; then
|
||||
git add "$out"
|
||||
dch "${out#$srcdir}: Devices triggers updated"
|
||||
git add debian/changelog
|
||||
debcommit
|
||||
fi
|
||||
fi
|
||||
done
|
||||
Vendored
+4
@@ -0,0 +1,4 @@
|
||||
---
|
||||
Bug-Database: https://gitlab.freedesktop.org/3v1n0/libfprint/-/issues
|
||||
Bug-Submit: https://gitlab.freedesktop.org/3v1n0/libfprint/-/issues/new
|
||||
Repository-Browse: https://gitlab.freedesktop.org/3v1n0/libfprint/tree/tod
|
||||
Vendored
+5
@@ -0,0 +1,5 @@
|
||||
version=4
|
||||
|
||||
opts=versionmangle=s/_/./g \
|
||||
https://gitlab.freedesktop.org/3v1n0/@PACKAGE@/tags \
|
||||
.*\/archive\/[Vv]_?([\d_\+\.]+(?:\+git[0-9]+)?\+tod[0-9]+)\/@PACKAGE@-.*@ARCHIVE_EXT@
|
||||
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"app-id": "org.freedesktop.libfprint.Demo",
|
||||
"runtime": "org.gnome.Platform",
|
||||
"runtime-version": "3.36",
|
||||
"runtime-version": "master",
|
||||
"sdk": "org.gnome.Sdk",
|
||||
"command": "gtk-libfprint-test",
|
||||
"finish-args": [
|
||||
/* X11 + XShm access */
|
||||
"--share=ipc", "--socket=x11",
|
||||
"--share=ipc", "--socket=fallback-x11",
|
||||
/* Wayland access */
|
||||
"--socket=wayland",
|
||||
/* OpenGL access */
|
||||
@@ -18,7 +18,7 @@
|
||||
"modules": [
|
||||
{
|
||||
"name": "libusb",
|
||||
"config-opts": [ "--disable-static", "--disable-udev" ],
|
||||
"config-opts": [ "--disable-static" ],
|
||||
"cleanup": [
|
||||
"/lib/*.la",
|
||||
"/lib/pkgconfig",
|
||||
@@ -27,47 +27,46 @@
|
||||
"sources": [
|
||||
{
|
||||
"type": "archive",
|
||||
"url": "https://github.com/libusb/libusb/archive/v1.0.22.tar.gz",
|
||||
"sha256": "3500f7b182750cd9ccf9be8b1df998f83df56a39ab264976bdb3307773e16f48"
|
||||
"url": "https://github.com/libusb/libusb/releases/download/v1.0.26/libusb-1.0.26.tar.bz2",
|
||||
"sha256": "12ce7a61fc9854d1d2a1ffe095f7b5fac19ddba095c259e6067a46500381b5a5"
|
||||
}
|
||||
],
|
||||
"post-install": [
|
||||
"install -Dm644 COPYING /app/share/licenses/libgusb/COPYING"
|
||||
"install -Dm644 COPYING /app/share/licenses/libusb/COPYING"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "libgusb",
|
||||
"buildsystem": "meson",
|
||||
"config-opts": [ "-Dtests=false", "-Dvapi=false", "-Ddocs=false", "-Dintrospection=false" ],
|
||||
"config-opts": [ "-Dtests=false", "-Dvapi=false", "-Ddocs=false" ],
|
||||
"sources": [
|
||||
{
|
||||
"type": "archive",
|
||||
"url": "https://github.com/hughsie/libgusb/archive/0.3.0.tar.gz",
|
||||
"sha256": "b36310f8405d5fd68f6caf4a829f7ab4c627b38fd3d02a139d411fce0f3a49f1"
|
||||
"url": "https://github.com/hughsie/libgusb/releases/download/0.4.6/libgusb-0.4.6.tar.xz",
|
||||
"sha256": "1b0422bdcd72183272ac42eec9398c5a0bc48a02f618fa3242c468cbbd003049"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "gudev",
|
||||
"buildsystem": "meson",
|
||||
"config-opts": [ "-Dtests=disabled", "-Dintrospection=disabled" ],
|
||||
"config-opts": [ "-Dtests=disabled", "-Dintrospection=disabled", "-Dvapi=disabled" ],
|
||||
"sources": [
|
||||
{
|
||||
"type": "archive",
|
||||
"url": "https://download.gnome.org/sources/libgudev/236/libgudev-236.tar.xz",
|
||||
"sha256": "e50369d06d594bae615eb7aeb787de304ebaad07a26d1043cef8e9c7ab7c9524"
|
||||
"url": "https://download.gnome.org/sources/libgudev/238/libgudev-238.tar.xz",
|
||||
"sha256": "61266ab1afc9d73dbc60a8b2af73e99d2fdff47d99544d085760e4fa667b5dd1"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "libfprint",
|
||||
"buildsystem": "meson",
|
||||
"config-opts": [ "-Dudev_hwdb=disabled", "-Dudev_rules=disabled", "-Dx11-examples=false", "-Dgtk-examples=true", "-Ddrivers=all" ],
|
||||
"config-opts": [ "-Dudev_hwdb=disabled", "-Dudev_rules=disabled", "-Dgtk-examples=true", "-Ddrivers=all" ],
|
||||
"sources": [
|
||||
{
|
||||
"type": "git",
|
||||
"url": "https://gitlab.freedesktop.org/libfprint/libfprint.git",
|
||||
"branch": "wip/benzea/v2"
|
||||
"url": "https://gitlab.freedesktop.org/libfprint/libfprint.git"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -50,6 +50,8 @@ fp_device_capture
|
||||
fp_device_delete_print
|
||||
fp_device_list_prints
|
||||
fp_device_clear_storage
|
||||
fp_device_suspend
|
||||
fp_device_resume
|
||||
fp_device_open_finish
|
||||
fp_device_close_finish
|
||||
fp_device_enroll_finish
|
||||
@@ -59,6 +61,8 @@ fp_device_capture_finish
|
||||
fp_device_delete_print_finish
|
||||
fp_device_list_prints_finish
|
||||
fp_device_clear_storage_finish
|
||||
fp_device_suspend_finish
|
||||
fp_device_resume_finish
|
||||
fp_device_open_sync
|
||||
fp_device_close_sync
|
||||
fp_device_enroll_sync
|
||||
@@ -68,6 +72,8 @@ fp_device_capture_sync
|
||||
fp_device_delete_print_sync
|
||||
fp_device_list_prints_sync
|
||||
fp_device_clear_storage_sync
|
||||
fp_device_suspend_sync
|
||||
fp_device_resume_sync
|
||||
FpDevice
|
||||
</SECTION>
|
||||
|
||||
@@ -160,6 +166,8 @@ fpi_device_add_timeout
|
||||
fpi_device_set_nr_enroll_stages
|
||||
fpi_device_set_scan_type
|
||||
fpi_device_update_features
|
||||
fpi_device_critical_enter
|
||||
fpi_device_critical_leave
|
||||
fpi_device_remove
|
||||
fpi_device_report_finger_status
|
||||
fpi_device_report_finger_status_changes
|
||||
@@ -171,11 +179,14 @@ fpi_device_enroll_complete
|
||||
fpi_device_verify_complete
|
||||
fpi_device_identify_complete
|
||||
fpi_device_capture_complete
|
||||
fpi_device_clear_storage_complete
|
||||
fpi_device_delete_complete
|
||||
fpi_device_list_complete
|
||||
fpi_device_suspend_complete
|
||||
fpi_device_resume_complete
|
||||
fpi_device_enroll_progress
|
||||
fpi_device_verify_report
|
||||
fpi_device_identify_report
|
||||
fpi_device_list_complete
|
||||
fpi_device_class_auto_initialize_features
|
||||
</SECTION>
|
||||
|
||||
@@ -249,7 +260,11 @@ fpi_ssm_get_device
|
||||
fpi_ssm_get_error
|
||||
fpi_ssm_dup_error
|
||||
fpi_ssm_get_cur_state
|
||||
fpi_ssm_silence_debug
|
||||
fpi_ssm_spi_transfer_cb
|
||||
fpi_ssm_spi_transfer_with_weak_pointer_cb
|
||||
fpi_ssm_usb_transfer_cb
|
||||
fpi_ssm_usb_transfer_with_weak_pointer_cb
|
||||
FpiSsm
|
||||
</SECTION>
|
||||
|
||||
@@ -276,3 +291,20 @@ FPI_TYPE_USB_TRANSFER
|
||||
fpi_usb_transfer_get_type
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<FILE>fpi-spi-transfer</FILE>
|
||||
FpiSpiTransferCallback
|
||||
FpiSpiTransfer
|
||||
fpi_spi_transfer_new
|
||||
fpi_spi_transfer_ref
|
||||
fpi_spi_transfer_unref
|
||||
fpi_spi_transfer_write
|
||||
fpi_spi_transfer_write_full
|
||||
fpi_spi_transfer_read
|
||||
fpi_spi_transfer_read_full
|
||||
fpi_spi_transfer_submit
|
||||
fpi_spi_transfer_submit_sync
|
||||
<SUBSECTION Standard>
|
||||
FPI_TYPE_SPI_TRANSFER
|
||||
fpi_spi_transfer_get_type
|
||||
</SECTION>
|
||||
|
||||
@@ -41,7 +41,8 @@
|
||||
</chapter>
|
||||
|
||||
<chapter id="driver-helpers">
|
||||
<title>USB and State Machine helpers</title>
|
||||
<title>USB, SPI and State Machine helpers</title>
|
||||
<xi:include href="xml/fpi-spi-transfer.xml"/>
|
||||
<xi:include href="xml/fpi-usb-transfer.xml"/>
|
||||
<xi:include href="xml/fpi-ssm.xml"/>
|
||||
<xi:include href="xml/fpi-log.xml"/>
|
||||
|
||||
+2
-2
@@ -19,13 +19,13 @@ content_files = [
|
||||
|
||||
expand_content_files = content_files
|
||||
|
||||
glib_prefix = dependency('glib-2.0').get_pkgconfig_variable('prefix')
|
||||
glib_prefix = dependency('glib-2.0').get_variable(pkgconfig: 'prefix')
|
||||
glib_docpath = join_paths(glib_prefix, 'share', 'gtk-doc', 'html')
|
||||
docpath = join_paths(get_option('datadir'), 'gtk-doc', 'html')
|
||||
|
||||
gnome.gtkdoc(versioned_libname,
|
||||
main_xml: 'libfprint-docs.xml',
|
||||
src_dir: join_paths(meson.source_root(), 'libfprint'),
|
||||
src_dir: join_paths(meson.project_source_root(), 'libfprint'),
|
||||
include_directories: include_directories('../libfprint'),
|
||||
dependencies: libfprint_dep,
|
||||
content_files: content_files,
|
||||
|
||||
+55
-8
@@ -35,6 +35,7 @@ typedef struct _EnrollData
|
||||
unsigned int sigint_handler;
|
||||
FpFinger finger;
|
||||
int ret_value;
|
||||
gboolean update_fingerprint;
|
||||
} EnrollData;
|
||||
|
||||
static void
|
||||
@@ -84,7 +85,8 @@ on_enroll_completed (FpDevice *dev, GAsyncResult *res, void *user_data)
|
||||
/* Even if the device has storage, it may not be able to save all the
|
||||
* metadata that the print contains, so we can always save a local copy
|
||||
* containing the handle to the device print */
|
||||
int r = print_data_save (print, enroll_data->finger);
|
||||
int r = print_data_save (print, enroll_data->finger,
|
||||
enroll_data->update_fingerprint);
|
||||
if (r < 0)
|
||||
{
|
||||
g_warning ("Data save failed, code %d", r);
|
||||
@@ -124,6 +126,40 @@ on_enroll_progress (FpDevice *device,
|
||||
fp_device_get_nr_enroll_stages (device));
|
||||
}
|
||||
|
||||
static gboolean
|
||||
should_update_fingerprint (void)
|
||||
{
|
||||
int update_choice;
|
||||
gboolean update_fingerprint = FALSE;
|
||||
|
||||
printf ("Should an existing fingerprint be updated instead of being replaced (if present)? "
|
||||
"Enter Y/y or N/n to make a choice.\n");
|
||||
update_choice = getchar ();
|
||||
if (update_choice == EOF)
|
||||
{
|
||||
g_warning ("EOF encountered while reading a character");
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
switch (update_choice)
|
||||
{
|
||||
case 'y':
|
||||
case 'Y':
|
||||
update_fingerprint = TRUE;
|
||||
break;
|
||||
|
||||
case 'n':
|
||||
case 'N':
|
||||
update_fingerprint = FALSE;
|
||||
break;
|
||||
|
||||
default:
|
||||
g_warning ("Invalid choice %c, should be Y/y or N/n.", update_choice);
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
return update_fingerprint;
|
||||
}
|
||||
|
||||
static void
|
||||
on_device_opened (FpDevice *dev, GAsyncResult *res, void *user_data)
|
||||
{
|
||||
@@ -139,13 +175,26 @@ on_device_opened (FpDevice *dev, GAsyncResult *res, void *user_data)
|
||||
return;
|
||||
}
|
||||
|
||||
printf ("Opened device. It's now time to enroll your finger.\n\n");
|
||||
printf ("Opened device.\n");
|
||||
|
||||
if (fp_device_has_feature (dev, FP_DEVICE_FEATURE_UPDATE_PRINT))
|
||||
{
|
||||
printf ("The device supports fingerprint updates.\n");
|
||||
enroll_data->update_fingerprint = should_update_fingerprint ();
|
||||
}
|
||||
else
|
||||
{
|
||||
printf ("The device doesn't support fingerprint updates. Old prints will be erased.\n");
|
||||
enroll_data->update_fingerprint = FALSE;
|
||||
}
|
||||
|
||||
printf ("It's now time to enroll your finger.\n\n");
|
||||
printf ("You will need to successfully scan your %s finger %d times to "
|
||||
"complete the process.\n\n", finger_to_string (enroll_data->finger),
|
||||
fp_device_get_nr_enroll_stages (dev));
|
||||
printf ("Scan your finger now.\n");
|
||||
|
||||
print_template = print_create_template (dev, enroll_data->finger);
|
||||
print_template = print_create_template (dev, enroll_data->finger, enroll_data->update_fingerprint);
|
||||
fp_device_enroll (dev, print_template, enroll_data->cancellable,
|
||||
on_enroll_progress, NULL, NULL,
|
||||
(GAsyncReadyCallback) on_enroll_completed,
|
||||
@@ -171,11 +220,9 @@ main (void)
|
||||
FpDevice *dev;
|
||||
FpFinger finger;
|
||||
|
||||
g_print ("This program will enroll the selected finger, unconditionally "
|
||||
"overwriting any print for the same finger that was enrolled "
|
||||
"previously. If you want to continue, press enter, otherwise hit "
|
||||
"Ctrl+C\n");
|
||||
getchar ();
|
||||
g_print ("This program will enroll the selected finger overwriting any print for the same"
|
||||
" finger that was enrolled previously. Fingerprint updates without erasing old data"
|
||||
" are possible on devices supporting that. Ctrl+C interrupts program execution.\n");
|
||||
|
||||
g_print ("Choose the finger to enroll:\n");
|
||||
finger = finger_chooser ();
|
||||
|
||||
+3
-1
@@ -143,6 +143,7 @@ on_identify_cb (FpDevice *dev, FpPrint *match, FpPrint *print,
|
||||
if (match)
|
||||
{
|
||||
g_autoptr(FpPrint) matched_print = g_object_ref (match);
|
||||
const GDate *date;
|
||||
char date_str[128] = {};
|
||||
|
||||
identify_data->ret_value = EXIT_SUCCESS;
|
||||
@@ -155,7 +156,8 @@ on_identify_cb (FpDevice *dev, FpPrint *match, FpPrint *print,
|
||||
matched_print = g_steal_pointer (&stored_print);
|
||||
}
|
||||
|
||||
if (fp_print_get_enroll_date (matched_print))
|
||||
date = fp_print_get_enroll_date (matched_print);
|
||||
if (date && g_date_valid (date))
|
||||
g_date_strftime (date_str, G_N_ELEMENTS (date_str), "%Y-%m-%d\0",
|
||||
fp_print_get_enroll_date (matched_print));
|
||||
else
|
||||
|
||||
@@ -161,7 +161,7 @@ on_list_completed (FpDevice *dev,
|
||||
finger_to_string (fp_print_get_finger (print)),
|
||||
fp_print_get_username (print));
|
||||
|
||||
if (date)
|
||||
if (date && g_date_valid (date))
|
||||
{
|
||||
g_date_strftime (buf, G_N_ELEMENTS (buf), "%Y-%m-%d\0", date);
|
||||
g_print (", enrolled on %s", buf);
|
||||
|
||||
@@ -21,3 +21,18 @@ executable('cpp-test',
|
||||
'cpp-test.cpp',
|
||||
dependencies: libfprint_dep,
|
||||
)
|
||||
|
||||
if installed_tests
|
||||
install_subdir('prints',
|
||||
install_dir: installed_tests_testdir)
|
||||
endif
|
||||
|
||||
if get_option('tod')
|
||||
executable('tod-inspector',
|
||||
sources: 'tod-inspector.c',
|
||||
dependencies: [
|
||||
libfprint_dep,
|
||||
tod_dep,
|
||||
],
|
||||
)
|
||||
endif
|
||||
|
||||
+32
-16
@@ -102,8 +102,23 @@ save_data (GVariant *data)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static FpPrint *
|
||||
load_print_from_data (GVariant *data)
|
||||
{
|
||||
const guchar *stored_data = NULL;
|
||||
gsize stored_len;
|
||||
FpPrint *print;
|
||||
|
||||
g_autoptr(GError) error = NULL;
|
||||
stored_data = (const guchar *) g_variant_get_fixed_array (data, &stored_len, 1);
|
||||
print = fp_print_deserialize (stored_data, stored_len, &error);
|
||||
if (error)
|
||||
g_warning ("Error deserializing data: %s", error->message);
|
||||
return print;
|
||||
}
|
||||
|
||||
int
|
||||
print_data_save (FpPrint *print, FpFinger finger)
|
||||
print_data_save (FpPrint *print, FpFinger finger, gboolean update_fingerprint)
|
||||
{
|
||||
g_autofree gchar *descr = get_print_data_descriptor (print, NULL, finger);
|
||||
|
||||
@@ -137,25 +152,12 @@ print_data_load (FpDevice *dev, FpFinger finger)
|
||||
|
||||
g_autoptr(GVariant) val = NULL;
|
||||
g_autoptr(GVariantDict) dict = NULL;
|
||||
const guchar *stored_data = NULL;
|
||||
gsize stored_len;
|
||||
|
||||
dict = load_data ();
|
||||
val = g_variant_dict_lookup_value (dict, descr, G_VARIANT_TYPE ("ay"));
|
||||
|
||||
if (val)
|
||||
{
|
||||
FpPrint *print;
|
||||
g_autoptr(GError) error = NULL;
|
||||
|
||||
stored_data = (const guchar *) g_variant_get_fixed_array (val, &stored_len, 1);
|
||||
print = fp_print_deserialize (stored_data, stored_len, &error);
|
||||
|
||||
if (error)
|
||||
g_warning ("Error deserializing data: %s", error->message);
|
||||
|
||||
return print;
|
||||
}
|
||||
return load_print_from_data (val);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
@@ -207,16 +209,30 @@ gallery_data_load (FpDevice *dev)
|
||||
}
|
||||
|
||||
FpPrint *
|
||||
print_create_template (FpDevice *dev, FpFinger finger)
|
||||
print_create_template (FpDevice *dev, FpFinger finger, gboolean load_existing)
|
||||
{
|
||||
g_autoptr(GVariantDict) dict = NULL;
|
||||
g_autoptr(GDateTime) datetime = NULL;
|
||||
g_autoptr(GDate) date = NULL;
|
||||
g_autoptr(GVariant) existing_val = NULL;
|
||||
g_autofree gchar *descr = get_print_data_descriptor (NULL, dev, finger);
|
||||
FpPrint *template = NULL;
|
||||
gint year, month, day;
|
||||
|
||||
if (load_existing)
|
||||
{
|
||||
dict = load_data ();
|
||||
existing_val = g_variant_dict_lookup_value (dict, descr, G_VARIANT_TYPE ("ay"));
|
||||
if (existing_val != NULL)
|
||||
template = load_print_from_data (existing_val);
|
||||
}
|
||||
if (template == NULL)
|
||||
{
|
||||
template = fp_print_new (dev);
|
||||
fp_print_set_finger (template, finger);
|
||||
fp_print_set_username (template, g_get_user_name ());
|
||||
}
|
||||
|
||||
datetime = g_date_time_new_now_local ();
|
||||
g_date_time_get_ymd (datetime, &year, &month, &day);
|
||||
date = g_date_new_dmy (day, month, year);
|
||||
|
||||
+4
-2
@@ -21,12 +21,14 @@
|
||||
#pragma once
|
||||
|
||||
int print_data_save (FpPrint *print,
|
||||
FpFinger finger);
|
||||
FpFinger finger,
|
||||
gboolean update_fingerprint);
|
||||
FpPrint * print_data_load (FpDevice *dev,
|
||||
FpFinger finger);
|
||||
GPtrArray * gallery_data_load (FpDevice *dev);
|
||||
FpPrint * print_create_template (FpDevice *dev,
|
||||
FpFinger finger);
|
||||
FpFinger finger,
|
||||
const gboolean load_existing);
|
||||
gboolean print_image_save (FpPrint *print,
|
||||
const char *path);
|
||||
gboolean save_image_to_pgm (FpImage *img,
|
||||
|
||||
@@ -0,0 +1,161 @@
|
||||
/*
|
||||
* Shared library loader for libfprint
|
||||
* Copyright (C) 2021 Marco Trevisan <marco.trevisan@canonical.com>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#include <libfprint/fprint.h>
|
||||
|
||||
#include "libfprint/tod/tod-shared-loader.h"
|
||||
#include "libfprint/fpi-device.h"
|
||||
|
||||
static char *
|
||||
id_table_to_string (FpDeviceType device_type,
|
||||
const FpIdEntry *id_table)
|
||||
{
|
||||
const FpIdEntry *entry;
|
||||
char *str = NULL;
|
||||
|
||||
if (!id_table)
|
||||
return g_strdup ("INVALID: Empty ID table");
|
||||
|
||||
entry = id_table;
|
||||
while (TRUE)
|
||||
{
|
||||
g_autofree char *value = NULL;
|
||||
|
||||
if (device_type == FP_DEVICE_TYPE_VIRTUAL)
|
||||
{
|
||||
if (entry->virtual_envvar)
|
||||
value = g_strdup (entry->virtual_envvar);
|
||||
}
|
||||
else if (device_type == FP_DEVICE_TYPE_USB)
|
||||
{
|
||||
if (entry->vid)
|
||||
value = g_strdup_printf ("%04x:%04x", entry->vid, entry->pid);
|
||||
}
|
||||
else if (device_type == FP_DEVICE_TYPE_UDEV)
|
||||
{
|
||||
if (entry->hid_id.vid)
|
||||
{
|
||||
g_autofree gchar *udev_flags = NULL;
|
||||
|
||||
udev_flags = g_flags_to_string (fpi_device_udev_subtype_flags_get_type (),
|
||||
entry->udev_types);
|
||||
value = g_strdup_printf ("%s (%04x:%04x) [%s]",
|
||||
entry->spi_acpi_id,
|
||||
entry->hid_id.vid, entry->hid_id.pid,
|
||||
udev_flags);
|
||||
}
|
||||
else
|
||||
{
|
||||
value = g_strdup (entry->spi_acpi_id);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return g_strdup ("Unsupported device type");
|
||||
}
|
||||
|
||||
if (!value)
|
||||
return str;
|
||||
|
||||
if (!str)
|
||||
{
|
||||
str = g_steal_pointer (&value);
|
||||
}
|
||||
else
|
||||
{
|
||||
g_autofree char *tmp = g_steal_pointer (&str);
|
||||
str = g_strconcat (tmp, ", ", value, NULL);
|
||||
}
|
||||
|
||||
entry++;
|
||||
}
|
||||
|
||||
return str;
|
||||
}
|
||||
|
||||
static const char *
|
||||
device_type_to_string (FpDeviceType device_type)
|
||||
{
|
||||
g_autoptr(GEnumClass) device_types = g_type_class_ref (fp_device_type_get_type ());
|
||||
GEnumValue *value = g_enum_get_value (device_types, device_type);
|
||||
|
||||
return value->value_nick;
|
||||
}
|
||||
|
||||
static const char *
|
||||
scan_type_to_string (FpScanType scan_type)
|
||||
{
|
||||
g_autoptr(GEnumClass) scan_types = g_type_class_ref (fp_scan_type_get_type ());
|
||||
GEnumValue *value = g_enum_get_value (scan_types, scan_type);
|
||||
|
||||
return value->value_nick;
|
||||
}
|
||||
|
||||
int
|
||||
main (void)
|
||||
{
|
||||
g_autoptr(GArray) shared_drivers = NULL;
|
||||
guint i;
|
||||
|
||||
tod_shared_drivers_register ();
|
||||
|
||||
shared_drivers = tod_shared_drivers_get ();
|
||||
g_print ("Found %u drivers\n", shared_drivers->len);
|
||||
|
||||
for (i = 0; i < shared_drivers->len; i++)
|
||||
{
|
||||
GType driver = g_array_index (shared_drivers, GType, i);
|
||||
g_autoptr(FpDeviceClass) cls = g_type_class_ref (driver);
|
||||
g_autofree char *id_table = NULL;
|
||||
g_autofree char *features = NULL;
|
||||
|
||||
id_table = id_table_to_string (cls->type, cls->id_table);
|
||||
features = g_flags_to_string (fp_device_feature_get_type (), cls->features);
|
||||
|
||||
g_print ("ID: %s\n", cls->id);
|
||||
g_print ("Full Name: %s\n", cls->full_name);
|
||||
g_print ("Type: %s\n", device_type_to_string (cls->type));
|
||||
g_print ("Enroll stages: %d\n", cls->nr_enroll_stages);
|
||||
g_print ("Scan type: %s\n", scan_type_to_string (cls->scan_type));
|
||||
g_print ("Seconds to get Hot: %d\n", cls->temp_hot_seconds);
|
||||
g_print ("Seconds to get Cold: %d\n", cls->temp_cold_seconds);
|
||||
g_print ("Supported Devices: %s\n", id_table);
|
||||
g_print ("Supported features: %s\n", features);
|
||||
g_print ("Implemented VFuncs:\n");
|
||||
g_print (" usb_discover: %s\n", cls->usb_discover ? "true" : "false");
|
||||
g_print (" probe: %s\n", cls->probe ? "true" : "false");
|
||||
g_print (" open: %s\n", cls->open ? "true" : "false");
|
||||
g_print (" close: %s\n", cls->close ? "true" : "false");
|
||||
g_print (" suspend: %s\n", cls->suspend ? "true" : "false");
|
||||
g_print (" resume: %s\n", cls->resume ? "true" : "false");
|
||||
g_print (" enroll: %s\n", cls->enroll ? "true" : "false");
|
||||
g_print (" verify: %s\n", cls->verify ? "true" : "false");
|
||||
g_print (" identify: %s\n", cls->identify ? "true" : "false");
|
||||
g_print (" capture: %s\n", cls->capture ? "true" : "false");
|
||||
g_print (" list: %s\n", cls->list ? "true" : "false");
|
||||
g_print (" delete: %s\n", cls->delete ? "true" : "false");
|
||||
g_print (" clear_storage: %s\n", cls->clear_storage ? "true" : "false");
|
||||
g_print (" cancel: %s\n", cls->cancel ? "true" : "false");
|
||||
|
||||
if (i < shared_drivers->len - 1)
|
||||
g_print ("------------\n");
|
||||
}
|
||||
|
||||
tod_shared_drivers_unregister ();
|
||||
}
|
||||
+3
-1
@@ -130,10 +130,12 @@ on_match_cb (FpDevice *dev, FpPrint *match, FpPrint *print,
|
||||
|
||||
if (match)
|
||||
{
|
||||
char date_str[128];
|
||||
const GDate *date = fp_print_get_enroll_date (match);
|
||||
char date_str[128] = "<unknown>";
|
||||
|
||||
verify_data->ret_value = EXIT_SUCCESS;
|
||||
|
||||
if (date && g_date_valid (date))
|
||||
g_date_strftime (date_str, G_N_ELEMENTS (date_str), "%Y-%m-%d\0",
|
||||
fp_print_get_enroll_date (match));
|
||||
g_debug ("Match report: device %s matched finger %s successifully "
|
||||
|
||||
@@ -124,7 +124,7 @@ G_DEFINE_TYPE (FpiDeviceAes4000, fpi_device_aes4000, FPI_TYPE_DEVICE_AES3K);
|
||||
|
||||
|
||||
static const FpIdEntry id_table[] = {
|
||||
{ .pid = 0x08ff, .vid = 0x5501 },
|
||||
{ .vid = 0x08ff, .pid = 0x5501 },
|
||||
{ .vid = 0, .pid = 0, .driver_data = 0 },
|
||||
};
|
||||
|
||||
|
||||
@@ -365,7 +365,7 @@ capture_read_stripe_data_cb (FpiUsbTransfer *transfer,
|
||||
return;
|
||||
}
|
||||
|
||||
fp_dbg ("Got %lu bytes of data", actual_length);
|
||||
fp_dbg ("Got %" G_GSIZE_FORMAT " bytes of data", actual_length);
|
||||
while (actual_length)
|
||||
{
|
||||
gssize payload_length;
|
||||
@@ -386,7 +386,7 @@ capture_read_stripe_data_cb (FpiUsbTransfer *transfer,
|
||||
(priv->stripe_packet->data[AESX660_RESPONSE_SIZE_MSB_OFFSET] << 8);
|
||||
fp_dbg ("Got frame, type %.2x payload of size %.4lx",
|
||||
priv->stripe_packet->data[AESX660_RESPONSE_TYPE_OFFSET],
|
||||
payload_length);
|
||||
(long) payload_length);
|
||||
|
||||
still_needed_len = MAX (0, AESX660_HEADER_SIZE + payload_length - (gssize) priv->stripe_packet->len);
|
||||
copy_len = MIN (actual_length, still_needed_len);
|
||||
@@ -441,7 +441,7 @@ capture_run_state (FpiSsm *ssm, FpDevice *_dev)
|
||||
break;
|
||||
|
||||
case CAPTURE_SET_IDLE:
|
||||
fp_dbg ("Got %lu frames", priv->strips_len);
|
||||
fp_dbg ("Got %" G_GSIZE_FORMAT " frames", priv->strips_len);
|
||||
aesX660_send_cmd (ssm, _dev, set_idle_cmd, sizeof (set_idle_cmd),
|
||||
capture_set_idle_cmd_cb);
|
||||
break;
|
||||
|
||||
@@ -0,0 +1,444 @@
|
||||
/*
|
||||
* Egis Technology Inc. (aka. LighTuning) 0570 driver for libfprint
|
||||
* Copyright (C) 2021 Maxim Kolesnikov <kolesnikov@svyazcom.ru>
|
||||
* Copyright (C) 2021 Saeed/Ali Rk <saeed.ali.rahimi@gmail.com>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#define FP_COMPONENT "egis0570"
|
||||
|
||||
#include "egis0570.h"
|
||||
#include "drivers_api.h"
|
||||
|
||||
/* Packet types */
|
||||
#define PKT_TYPE_INIT 0
|
||||
#define PKT_TYPE_REPEAT 1
|
||||
|
||||
/* Struct */
|
||||
struct _FpDeviceEgis0570
|
||||
{
|
||||
FpImageDevice parent;
|
||||
|
||||
gboolean running;
|
||||
gboolean stop;
|
||||
|
||||
GSList *strips;
|
||||
guint8 *background;
|
||||
gsize strips_len;
|
||||
|
||||
int pkt_num;
|
||||
int pkt_type;
|
||||
};
|
||||
G_DECLARE_FINAL_TYPE (FpDeviceEgis0570, fpi_device_egis0570, FPI, DEVICE_EGIS0570, FpImageDevice);
|
||||
G_DEFINE_TYPE (FpDeviceEgis0570, fpi_device_egis0570, FP_TYPE_IMAGE_DEVICE);
|
||||
|
||||
static unsigned char
|
||||
egis_get_pixel (struct fpi_frame_asmbl_ctx *ctx, struct fpi_frame *frame, unsigned int x, unsigned int y)
|
||||
{
|
||||
return frame->data[x + y * ctx->frame_width];
|
||||
}
|
||||
|
||||
static struct fpi_frame_asmbl_ctx assembling_ctx = {
|
||||
.frame_width = EGIS0570_IMGWIDTH,
|
||||
.frame_height = EGIS0570_RFMGHEIGHT,
|
||||
.image_width = EGIS0570_IMGWIDTH * 4 / 3,
|
||||
.get_pixel = egis_get_pixel,
|
||||
};
|
||||
|
||||
/*
|
||||
* Service
|
||||
*/
|
||||
|
||||
static gboolean
|
||||
is_last_pkt (FpDevice *dev)
|
||||
{
|
||||
FpDeviceEgis0570 *self = FPI_DEVICE_EGIS0570 (dev);
|
||||
|
||||
int type = self->pkt_type;
|
||||
int num = self->pkt_num;
|
||||
|
||||
gboolean r;
|
||||
|
||||
r = ((type == PKT_TYPE_INIT) && (num == (EGIS0570_INIT_TOTAL - 1)));
|
||||
r |= ((type == PKT_TYPE_REPEAT) && (num == (EGIS0570_REPEAT_TOTAL - 1)));
|
||||
|
||||
return r;
|
||||
}
|
||||
|
||||
/*
|
||||
* Returns a bit for each frame on whether or not a finger has been detected.
|
||||
* e.g. 00110 means that there is a finger in frame two and three.
|
||||
*/
|
||||
static char
|
||||
postprocess_frames (FpDeviceEgis0570 *self, guint8 * img)
|
||||
{
|
||||
size_t mean[EGIS0570_IMGCOUNT] = {0, 0, 0, 0, 0};
|
||||
|
||||
if (!self->background)
|
||||
{
|
||||
self->background = g_malloc (EGIS0570_IMGWIDTH * EGIS0570_RFMGHEIGHT);
|
||||
memset (self->background, 255, EGIS0570_IMGWIDTH * EGIS0570_RFMGHEIGHT);
|
||||
|
||||
for (size_t k = 0; k < EGIS0570_IMGCOUNT; k += 1)
|
||||
{
|
||||
guint8 * frame = &img[(k * EGIS0570_IMGSIZE) + EGIS0570_RFMDIS * EGIS0570_IMGWIDTH];
|
||||
|
||||
for (size_t i = 0; i < EGIS0570_IMGWIDTH * EGIS0570_RFMGHEIGHT; i += 1)
|
||||
self->background[i] = MIN (self->background[i], frame[i]);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
for (size_t k = 0; k < EGIS0570_IMGCOUNT; k += 1)
|
||||
{
|
||||
guint8 * frame = &img[(k * EGIS0570_IMGSIZE) + EGIS0570_RFMDIS * EGIS0570_IMGWIDTH];
|
||||
|
||||
for (size_t i = 0; i < EGIS0570_IMGWIDTH * EGIS0570_RFMGHEIGHT; i += 1)
|
||||
{
|
||||
if (frame[i] - EGIS0570_MARGIN > self->background[i])
|
||||
frame[i] -= self->background[i];
|
||||
else
|
||||
frame[i] = 0;
|
||||
|
||||
mean[k] += frame[i];
|
||||
}
|
||||
|
||||
mean[k] /= EGIS0570_IMGWIDTH * EGIS0570_RFMGHEIGHT;
|
||||
}
|
||||
|
||||
char result = 0;
|
||||
|
||||
for (size_t k = 0; k < EGIS0570_IMGCOUNT; k += 1)
|
||||
{
|
||||
fp_dbg ("Finger status (picture number, mean) : %ld , %ld", k, mean[k]);
|
||||
if (mean[k] > EGIS0570_MIN_MEAN)
|
||||
result |= 1 << k;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/*
|
||||
* Device communication
|
||||
*/
|
||||
|
||||
static void
|
||||
data_resp_cb (FpiUsbTransfer *transfer, FpDevice *dev, gpointer user_data, GError *error)
|
||||
{
|
||||
unsigned char *stripdata;
|
||||
gboolean end = FALSE;
|
||||
FpImageDevice *img_self = FP_IMAGE_DEVICE (dev);
|
||||
FpDeviceEgis0570 *self = FPI_DEVICE_EGIS0570 (dev);
|
||||
|
||||
if (error)
|
||||
{
|
||||
fpi_ssm_mark_failed (transfer->ssm, error);
|
||||
return;
|
||||
}
|
||||
|
||||
int where_finger_is = postprocess_frames (self, transfer->buffer);
|
||||
|
||||
if (where_finger_is > 0)
|
||||
{
|
||||
FpiImageDeviceState state;
|
||||
|
||||
fpi_image_device_report_finger_status (img_self, TRUE);
|
||||
|
||||
g_object_get (dev, "fpi-image-device-state", &state, NULL);
|
||||
if (state == FPI_IMAGE_DEVICE_STATE_CAPTURE)
|
||||
{
|
||||
for (size_t k = 0; k < EGIS0570_IMGCOUNT; k += 1)
|
||||
{
|
||||
if (where_finger_is & (1 << k))
|
||||
{
|
||||
struct fpi_frame *stripe = g_malloc (EGIS0570_IMGWIDTH * EGIS0570_RFMGHEIGHT + sizeof (struct fpi_frame));
|
||||
stripe->delta_x = 0;
|
||||
stripe->delta_y = 0;
|
||||
stripdata = stripe->data;
|
||||
memcpy (stripdata, (transfer->buffer) + (((k) * EGIS0570_IMGSIZE) + EGIS0570_IMGWIDTH * EGIS0570_RFMDIS), EGIS0570_IMGWIDTH * EGIS0570_RFMGHEIGHT);
|
||||
self->strips = g_slist_prepend (self->strips, stripe);
|
||||
self->strips_len += 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
end = TRUE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
end = TRUE;
|
||||
}
|
||||
|
||||
if (end)
|
||||
{
|
||||
if (!self->stop && (self->strips_len > 0))
|
||||
{
|
||||
g_autoptr(FpImage) img = NULL;
|
||||
self->strips = g_slist_reverse (self->strips);
|
||||
fpi_do_movement_estimation (&assembling_ctx, self->strips);
|
||||
img = fpi_assemble_frames (&assembling_ctx, self->strips);
|
||||
img->flags |= (FPI_IMAGE_COLORS_INVERTED | FPI_IMAGE_PARTIAL);
|
||||
g_slist_free_full (self->strips, g_free);
|
||||
self->strips = NULL;
|
||||
self->strips_len = 0;
|
||||
FpImage *resizeImage = fpi_image_resize (img, EGIS0570_RESIZE, EGIS0570_RESIZE);
|
||||
fpi_image_device_image_captured (img_self, g_steal_pointer (&resizeImage));
|
||||
}
|
||||
|
||||
fpi_image_device_report_finger_status (img_self, FALSE);
|
||||
}
|
||||
|
||||
fpi_ssm_next_state (transfer->ssm);
|
||||
}
|
||||
|
||||
static void
|
||||
recv_data_resp (FpiSsm *ssm, FpDevice *dev)
|
||||
{
|
||||
FpiUsbTransfer *transfer = fpi_usb_transfer_new (dev);
|
||||
|
||||
fpi_usb_transfer_fill_bulk (transfer, EGIS0570_EPIN, EGIS0570_INPSIZE);
|
||||
|
||||
transfer->ssm = ssm;
|
||||
transfer->short_is_error = TRUE;
|
||||
|
||||
fpi_usb_transfer_submit (transfer, EGIS0570_TIMEOUT, NULL, data_resp_cb, NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
cmd_resp_cb (FpiUsbTransfer *transfer, FpDevice *dev, gpointer user_data, GError *error)
|
||||
{
|
||||
if (error)
|
||||
fpi_ssm_mark_failed (transfer->ssm, error);
|
||||
}
|
||||
|
||||
static void
|
||||
recv_cmd_resp (FpiSsm *ssm, FpDevice *dev)
|
||||
{
|
||||
FpiUsbTransfer *transfer = fpi_usb_transfer_new (dev);
|
||||
|
||||
fpi_usb_transfer_fill_bulk (transfer, EGIS0570_EPIN, EGIS0570_PKTSIZE);
|
||||
|
||||
transfer->ssm = ssm;
|
||||
|
||||
fpi_usb_transfer_submit (transfer, EGIS0570_TIMEOUT, NULL, cmd_resp_cb, NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
send_cmd_req (FpiSsm *ssm, FpDevice *dev, unsigned char *pkt)
|
||||
{
|
||||
FpiUsbTransfer *transfer = fpi_usb_transfer_new (dev);
|
||||
|
||||
fpi_usb_transfer_fill_bulk_full (transfer, EGIS0570_EPOUT, pkt, EGIS0570_PKTSIZE, NULL);
|
||||
|
||||
transfer->ssm = ssm;
|
||||
transfer->short_is_error = TRUE;
|
||||
|
||||
fpi_usb_transfer_submit (transfer, EGIS0570_TIMEOUT, NULL, fpi_ssm_usb_transfer_cb, NULL);
|
||||
}
|
||||
|
||||
/*
|
||||
* SSM States
|
||||
*/
|
||||
|
||||
enum sm_states {
|
||||
SM_INIT,
|
||||
SM_START,
|
||||
SM_REQ,
|
||||
SM_RESP,
|
||||
SM_REC_DATA,
|
||||
SM_DONE,
|
||||
SM_STATES_NUM
|
||||
};
|
||||
|
||||
static void
|
||||
ssm_run_state (FpiSsm *ssm, FpDevice *dev)
|
||||
{
|
||||
FpDeviceEgis0570 *self = FPI_DEVICE_EGIS0570 (dev);
|
||||
FpImageDevice *img_dev = FP_IMAGE_DEVICE (dev);
|
||||
|
||||
switch (fpi_ssm_get_cur_state (ssm))
|
||||
{
|
||||
case SM_INIT:
|
||||
self->pkt_type = PKT_TYPE_INIT;
|
||||
fpi_ssm_next_state (ssm);
|
||||
break;
|
||||
|
||||
case SM_START:
|
||||
if (self->stop)
|
||||
{
|
||||
fp_dbg ("deactivating, marking completed");
|
||||
fpi_ssm_mark_completed (ssm);
|
||||
fpi_image_device_deactivate_complete (img_dev, NULL);
|
||||
}
|
||||
else
|
||||
{
|
||||
self->pkt_num = 0;
|
||||
fpi_ssm_next_state (ssm);
|
||||
}
|
||||
break;
|
||||
|
||||
case SM_REQ:
|
||||
if (self->pkt_type == PKT_TYPE_INIT)
|
||||
send_cmd_req (ssm, dev, init_pkts[self->pkt_num]);
|
||||
else
|
||||
send_cmd_req (ssm, dev, repeat_pkts[self->pkt_num]);
|
||||
break;
|
||||
|
||||
case SM_RESP:
|
||||
if (is_last_pkt (dev) == FALSE)
|
||||
{
|
||||
recv_cmd_resp (ssm, dev);
|
||||
self->pkt_num += 1;
|
||||
fpi_ssm_jump_to_state (ssm, SM_REQ);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (self->pkt_type == PKT_TYPE_INIT)
|
||||
self->pkt_type = PKT_TYPE_REPEAT;
|
||||
|
||||
fpi_ssm_next_state (ssm);
|
||||
}
|
||||
break;
|
||||
|
||||
case SM_REC_DATA:
|
||||
recv_data_resp (ssm, dev);
|
||||
break;
|
||||
|
||||
case SM_DONE:
|
||||
fpi_ssm_jump_to_state (ssm, SM_START);
|
||||
break;
|
||||
|
||||
default:
|
||||
g_assert_not_reached ();
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Activation
|
||||
*/
|
||||
|
||||
static void
|
||||
loop_complete (FpiSsm *ssm, FpDevice *dev, GError *error)
|
||||
{
|
||||
FpImageDevice *img_dev = FP_IMAGE_DEVICE (dev);
|
||||
FpDeviceEgis0570 *self = FPI_DEVICE_EGIS0570 (dev);
|
||||
|
||||
self->running = FALSE;
|
||||
g_clear_pointer (&self->background, g_free);
|
||||
|
||||
if (error)
|
||||
fpi_image_device_session_error (img_dev, error);
|
||||
}
|
||||
|
||||
static void
|
||||
dev_activate (FpImageDevice *dev)
|
||||
{
|
||||
FpDeviceEgis0570 *self = FPI_DEVICE_EGIS0570 (dev);
|
||||
FpiSsm *ssm = fpi_ssm_new (FP_DEVICE (dev), ssm_run_state, SM_STATES_NUM);
|
||||
|
||||
self->stop = FALSE;
|
||||
|
||||
fpi_ssm_start (ssm, loop_complete);
|
||||
|
||||
self->running = TRUE;
|
||||
|
||||
fpi_image_device_activate_complete (dev, NULL);
|
||||
}
|
||||
|
||||
/*
|
||||
* Opening
|
||||
*/
|
||||
|
||||
static void
|
||||
dev_init (FpImageDevice *dev)
|
||||
{
|
||||
GError *error = NULL;
|
||||
|
||||
g_usb_device_claim_interface (fpi_device_get_usb_device (FP_DEVICE (dev)), 0, 0, &error);
|
||||
|
||||
fpi_image_device_open_complete (dev, error);
|
||||
}
|
||||
|
||||
/*
|
||||
* Closing
|
||||
*/
|
||||
|
||||
static void
|
||||
dev_deinit (FpImageDevice *dev)
|
||||
{
|
||||
GError *error = NULL;
|
||||
|
||||
g_usb_device_release_interface (fpi_device_get_usb_device (FP_DEVICE (dev)), 0, 0, &error);
|
||||
|
||||
fpi_image_device_close_complete (dev, error);
|
||||
}
|
||||
|
||||
/*
|
||||
* Deactivation
|
||||
*/
|
||||
|
||||
static void
|
||||
dev_deactivate (FpImageDevice *dev)
|
||||
{
|
||||
FpDeviceEgis0570 *self = FPI_DEVICE_EGIS0570 (dev);
|
||||
|
||||
if (self->running)
|
||||
self->stop = TRUE;
|
||||
else
|
||||
fpi_image_device_deactivate_complete (dev, NULL);
|
||||
}
|
||||
|
||||
/*
|
||||
* Driver data
|
||||
*/
|
||||
|
||||
static const FpIdEntry id_table[] = {
|
||||
{ .vid = 0x1c7a, .pid = 0x0570, },
|
||||
{ .vid = 0x1c7a, .pid = 0x0571, },
|
||||
{ .vid = 0, .pid = 0, },
|
||||
};
|
||||
|
||||
static void
|
||||
fpi_device_egis0570_init (FpDeviceEgis0570 *self)
|
||||
{
|
||||
}
|
||||
|
||||
static void
|
||||
fpi_device_egis0570_class_init (FpDeviceEgis0570Class *klass)
|
||||
{
|
||||
FpDeviceClass *dev_class = FP_DEVICE_CLASS (klass);
|
||||
FpImageDeviceClass *img_class = FP_IMAGE_DEVICE_CLASS (klass);
|
||||
|
||||
dev_class->id = "egis0570";
|
||||
dev_class->full_name = "Egis Technology Inc. (aka. LighTuning) 0570";
|
||||
dev_class->type = FP_DEVICE_TYPE_USB;
|
||||
dev_class->id_table = id_table;
|
||||
dev_class->scan_type = FP_SCAN_TYPE_SWIPE;
|
||||
|
||||
img_class->img_open = dev_init;
|
||||
img_class->img_close = dev_deinit;
|
||||
img_class->activate = dev_activate;
|
||||
img_class->deactivate = dev_deactivate;
|
||||
|
||||
img_class->img_width = EGIS0570_IMGWIDTH;
|
||||
img_class->img_height = -1;
|
||||
|
||||
img_class->bz3_threshold = EGIS0570_BZ3_THRESHOLD; /* security issue */
|
||||
}
|
||||
@@ -0,0 +1,177 @@
|
||||
/*
|
||||
* Egis Technology Inc. (aka. LighTuning) 0570 driver for libfprint
|
||||
* Copyright (C) 2021 Maxim Kolesnikov <kolesnikov@svyazcom.ru>
|
||||
* Copyright (C) 2021 Saeed/Ali Rk <saeed.ali.rahimi@gmail.com>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#ifndef __EGIS0570_H
|
||||
|
||||
#define __EGIS0570_H 1
|
||||
|
||||
/*
|
||||
* Device data
|
||||
*/
|
||||
|
||||
#define EGIS0570_CONF 1
|
||||
#define EGIS0570_INTF 0
|
||||
|
||||
/*
|
||||
* Device endpoints
|
||||
*/
|
||||
|
||||
#define EGIS0570_EPOUT 0x04 /* ( 4 | FPI_USB_ENDPOINT_OUT ) */
|
||||
#define EGIS0570_EPIN 0x83 /* ( 3 | FPI_USB_ENDPOINT_IN ) */
|
||||
|
||||
/*
|
||||
* Initialization packets (7 bytes each)
|
||||
*
|
||||
* First 4 bytes are equivalent to string "EGIS", which must be just a company identificator
|
||||
* Other 3 bytes are not recognized yet and may be not important, as they are always the same
|
||||
|
||||
* Answers for each packet contain 7 bytes again
|
||||
* First 4 bytes are reversed "EGIS", which is "SIGE", which is company ID again
|
||||
* Other 3 bytes are not recognized yet
|
||||
* But there is a pattern.
|
||||
* Sending last packet makes sensor return image
|
||||
*/
|
||||
|
||||
#define EGIS0570_TIMEOUT 10000
|
||||
#define EGIS0570_PKTSIZE 7
|
||||
|
||||
#define EGIS0570_INIT_TOTAL (sizeof ((init_pkts)) / sizeof ((init_pkts[0])))
|
||||
|
||||
static unsigned char init_pkts[][EGIS0570_PKTSIZE] =
|
||||
{
|
||||
{ 0x45, 0x47, 0x49, 0x53, 0x01, 0x20, 0x3f },
|
||||
{ 0x45, 0x47, 0x49, 0x53, 0x01, 0x58, 0x3f },
|
||||
{ 0x45, 0x47, 0x49, 0x53, 0x01, 0x21, 0x09 },
|
||||
{ 0x45, 0x47, 0x49, 0x53, 0x01, 0x57, 0x09 },
|
||||
{ 0x45, 0x47, 0x49, 0x53, 0x01, 0x22, 0x03 },
|
||||
{ 0x45, 0x47, 0x49, 0x53, 0x01, 0x56, 0x03 },
|
||||
{ 0x45, 0x47, 0x49, 0x53, 0x01, 0x23, 0x01 },
|
||||
{ 0x45, 0x47, 0x49, 0x53, 0x01, 0x55, 0x01 },
|
||||
{ 0x45, 0x47, 0x49, 0x53, 0x01, 0x24, 0x01 },
|
||||
{ 0x45, 0x47, 0x49, 0x53, 0x01, 0x54, 0x01 },
|
||||
{ 0x45, 0x47, 0x49, 0x53, 0x01, 0x16, 0x3e },
|
||||
{ 0x45, 0x47, 0x49, 0x53, 0x01, 0x09, 0x0b },
|
||||
{ 0x45, 0x47, 0x49, 0x53, 0x01, 0x14, 0x03 },
|
||||
{ 0x45, 0x47, 0x49, 0x53, 0x01, 0x15, 0x00 },
|
||||
{ 0x45, 0x47, 0x49, 0x53, 0x01, 0x02, 0x0f },
|
||||
{ 0x45, 0x47, 0x49, 0x53, 0x01, 0x10, 0x00 },
|
||||
{ 0x45, 0x47, 0x49, 0x53, 0x01, 0x11, 0x38 },
|
||||
{ 0x45, 0x47, 0x49, 0x53, 0x01, 0x12, 0x00 },
|
||||
{ 0x45, 0x47, 0x49, 0x53, 0x01, 0x13, 0x71 },
|
||||
{ 0x45, 0x47, 0x49, 0x53, 0x01, 0x03, 0x80 },
|
||||
{ 0x45, 0x47, 0x49, 0x53, 0x00, 0x02, 0x80 },
|
||||
{ 0x45, 0x47, 0x49, 0x53, 0x01, 0x02, 0x2f },
|
||||
{ 0x45, 0x47, 0x49, 0x53, 0x06, 0x00, 0xfe } /* image returned after this packet */
|
||||
};
|
||||
|
||||
/* There is another Packet !
|
||||
* That just Work the same !!
|
||||
* And the Size is different !!!
|
||||
*/
|
||||
|
||||
/*
|
||||
|
||||
#define EGIS0570_INIT_TOTAL2 (sizeof((init_pkts2)) / sizeof((init_pkts2[0])))
|
||||
|
||||
static unsigned char init_pkts2[][EGIS0570_PKTSIZE] =
|
||||
{
|
||||
{0x45, 0x47, 0x49, 0x53, 0x01, 0x10, 0x00},
|
||||
{0x45, 0x47, 0x49, 0x53, 0x01, 0x11, 0x38},
|
||||
{0x45, 0x47, 0x49, 0x53, 0x01, 0x12, 0x00},
|
||||
{0x45, 0x47, 0x49, 0x53, 0x01, 0x13, 0x71},
|
||||
{0x45, 0x47, 0x49, 0x53, 0x01, 0x20, 0x3f},
|
||||
{0x45, 0x47, 0x49, 0x53, 0x01, 0x58, 0x3f},
|
||||
{0x45, 0x47, 0x49, 0x53, 0x01, 0x21, 0x07},
|
||||
{0x45, 0x47, 0x49, 0x53, 0x01, 0x57, 0x07},
|
||||
{0x45, 0x47, 0x49, 0x53, 0x01, 0x22, 0x02},
|
||||
{0x45, 0x47, 0x49, 0x53, 0x01, 0x56, 0x02},
|
||||
{0x45, 0x47, 0x49, 0x53, 0x01, 0x23, 0x00},
|
||||
{0x45, 0x47, 0x49, 0x53, 0x01, 0x55, 0x00},
|
||||
{0x45, 0x47, 0x49, 0x53, 0x01, 0x24, 0x00},
|
||||
{0x45, 0x47, 0x49, 0x53, 0x01, 0x54, 0x00},
|
||||
{0x45, 0x47, 0x49, 0x53, 0x01, 0x25, 0x00},
|
||||
{0x45, 0x47, 0x49, 0x53, 0x01, 0x53, 0x00},
|
||||
{0x45, 0x47, 0x49, 0x53, 0x01, 0x15, 0x00},
|
||||
{0x45, 0x47, 0x49, 0x53, 0x01, 0x16, 0x3b},
|
||||
{0x45, 0x47, 0x49, 0x53, 0x01, 0x09, 0x0a},
|
||||
{0x45, 0x47, 0x49, 0x53, 0x01, 0x14, 0x00},
|
||||
{0x45, 0x47, 0x49, 0x53, 0x01, 0x02, 0x0f},
|
||||
{0x45, 0x47, 0x49, 0x53, 0x01, 0x03, 0x80},
|
||||
{0x45, 0x47, 0x49, 0x53, 0x00, 0x02, 0x80},
|
||||
{0x45, 0x47, 0x49, 0x53, 0x01, 0x02, 0x2f},
|
||||
{0x45, 0x47, 0x49, 0x53, 0x06, 0x00, 0xfe}
|
||||
};
|
||||
|
||||
*/
|
||||
|
||||
/*
|
||||
* After sending initial packets device returns image data (32512 bytes)
|
||||
* To ask device to send image data again, host needs to send four additional packets
|
||||
* Further work is to repeatedly send four repeat packets and read image data
|
||||
*/
|
||||
|
||||
#define EGIS0570_INPSIZE 32512
|
||||
|
||||
/* 5 image with captured in different time of size 114 * 57 = 6498
|
||||
* 5 * 6498 = 32490 plus 22 extra unrecognized char size data
|
||||
* Two continuous image in this 5 images may have time delay of less than 20ms
|
||||
*/
|
||||
|
||||
#define EGIS0570_IMGSIZE 6498
|
||||
#define EGIS0570_IMGWIDTH 114
|
||||
#define EGIS0570_IMGHEIGHT 57
|
||||
|
||||
/* size of middle area that is used from each frame */
|
||||
#define EGIS0570_RFMGHEIGHT 17
|
||||
/* rows to ignore from top and bottom of the image*/
|
||||
#define EGIS0570_RFMDIS (EGIS0570_IMGHEIGHT - EGIS0570_RFMGHEIGHT) / 2
|
||||
#define EGIS0570_IMGCOUNT 5
|
||||
|
||||
/*
|
||||
* Image repeat request
|
||||
* First 4 bytes are the same as in initialization packets
|
||||
* Have no idea what the other 3 bytes mean
|
||||
*/
|
||||
|
||||
#define EGIS0570_REPEAT_TOTAL (sizeof ((repeat_pkts)) / sizeof ((repeat_pkts[0])))
|
||||
|
||||
static unsigned char repeat_pkts[][EGIS0570_PKTSIZE] =
|
||||
{
|
||||
{ 0x45, 0x47, 0x49, 0x53, 0x01, 0x02, 0x0f },
|
||||
{ 0x45, 0x47, 0x49, 0x53, 0x00, 0x02, 0x0f },
|
||||
{ 0x45, 0x47, 0x49, 0x53, 0x01, 0x02, 0x2f },
|
||||
{ 0x45, 0x47, 0x49, 0x53, 0x06, 0x00, 0xfe } /* image returned after this packet */
|
||||
};
|
||||
|
||||
/*
|
||||
* This sensor is small so I decided to reduce bz3_threshold from
|
||||
* 40 to 10 to have more success to fail ratio
|
||||
* Bozorth3 Algorithm seems not fine at the end
|
||||
* foreget about security :))
|
||||
*/
|
||||
|
||||
#define EGIS0570_BZ3_THRESHOLD 25 /* and even less What a joke */
|
||||
|
||||
#define EGIS0570_MIN_MEAN 20
|
||||
#define EGIS0570_MARGIN 3
|
||||
|
||||
#define EGIS0570_RESIZE 2
|
||||
|
||||
#endif
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,222 @@
|
||||
/*
|
||||
* Driver for Egis Technology (LighTuning) Match-On-Chip sensors
|
||||
* Originally authored 2023 by Joshua Grisham <josh@joshuagrisham.com>
|
||||
*
|
||||
* Portions of code and logic inspired from the elanmoc libfprint driver
|
||||
* which is copyright (C) 2021 Elan Microelectronics Inc (see elanmoc.c)
|
||||
*
|
||||
* Based on original reverse-engineering work by Joshua Grisham. The protocol has
|
||||
* been reverse-engineered from captures of the official Windows driver, and by
|
||||
* testing commands on the sensor with a multiplatform Python prototype driver:
|
||||
* https://github.com/joshuagrisham/galaxy-book2-pro-linux/tree/main/fingerprint/
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "fpi-device.h"
|
||||
#include "fpi-ssm.h"
|
||||
|
||||
G_DECLARE_FINAL_TYPE (FpiDeviceEgisMoc, fpi_device_egismoc, FPI, DEVICE_EGISMOC, FpDevice)
|
||||
|
||||
#define EGISMOC_DRIVER_FULLNAME "Egis Technology (LighTuning) Match-on-Chip"
|
||||
|
||||
#define EGISMOC_DRIVER_CHECK_PREFIX_TYPE1 (1 << 0)
|
||||
#define EGISMOC_DRIVER_CHECK_PREFIX_TYPE2 (1 << 1)
|
||||
|
||||
#define EGISMOC_EP_CMD_OUT (0x02 | FPI_USB_ENDPOINT_OUT)
|
||||
#define EGISMOC_EP_CMD_IN (0x81 | FPI_USB_ENDPOINT_IN)
|
||||
#define EGISMOC_EP_CMD_INTERRUPT_IN 0x83
|
||||
|
||||
#define EGISMOC_USB_CONTROL_TIMEOUT 5000
|
||||
#define EGISMOC_USB_SEND_TIMEOUT 5000
|
||||
#define EGISMOC_USB_RECV_TIMEOUT 5000
|
||||
#define EGISMOC_USB_INTERRUPT_TIMEOUT 60000
|
||||
|
||||
#define EGISMOC_USB_IN_RECV_LENGTH 4096
|
||||
#define EGISMOC_USB_INTERRUPT_IN_RECV_LENGTH 64
|
||||
|
||||
#define EGISMOC_ENROLL_TIMES 10
|
||||
#define EGISMOC_MAX_ENROLL_NUM 10
|
||||
#define EGISMOC_FINGERPRINT_DATA_SIZE 32
|
||||
#define EGISMOC_LIST_RESPONSE_PREFIX_SIZE 14
|
||||
#define EGISMOC_LIST_RESPONSE_SUFFIX_SIZE 2
|
||||
|
||||
/* standard prefixes for all read/writes */
|
||||
|
||||
static guchar egismoc_write_prefix[] = {'E', 'G', 'I', 'S', 0x00, 0x00, 0x00, 0x01};
|
||||
static gsize egismoc_write_prefix_len = sizeof (egismoc_write_prefix) / sizeof (egismoc_write_prefix[0]);
|
||||
|
||||
static guchar egismoc_read_prefix[] = {'S', 'I', 'G', 'E', 0x00, 0x00, 0x00, 0x01};
|
||||
static gsize egismoc_read_prefix_len = sizeof (egismoc_read_prefix) / sizeof (egismoc_read_prefix[0]);
|
||||
|
||||
|
||||
/* hard-coded command payloads */
|
||||
|
||||
static guchar cmd_fw_version[] = {0x00, 0x00, 0x00, 0x07, 0x50, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x0c};
|
||||
static gsize cmd_fw_version_len = sizeof (cmd_fw_version) / sizeof (cmd_fw_version[0]);
|
||||
static guchar rsp_fw_version_suffix[] = {0x90, 0x00};
|
||||
static gsize rsp_fw_version_suffix_len = sizeof (rsp_fw_version_suffix) / sizeof (rsp_fw_version_suffix[0]);
|
||||
|
||||
static guchar cmd_list[] = {0x00, 0x00, 0x00, 0x07, 0x50, 0x19, 0x04, 0x00, 0x00, 0x01, 0x40};
|
||||
static gsize cmd_list_len = sizeof (cmd_list) / sizeof (cmd_list[0]);
|
||||
|
||||
static guchar cmd_sensor_reset[] = {0x00, 0x00, 0x00, 0x04, 0x50, 0x1a, 0x00, 0x00};
|
||||
static gsize cmd_sensor_reset_len = sizeof (cmd_sensor_reset) / sizeof (cmd_sensor_reset[0]);
|
||||
|
||||
static guchar cmd_sensor_check[] = {0x00, 0x00, 0x00, 0x04, 0x50, 0x17, 0x02, 0x00};
|
||||
static gsize cmd_sensor_check_len = sizeof (cmd_sensor_check) / sizeof (cmd_sensor_check[0]);
|
||||
|
||||
static guchar cmd_sensor_identify[] = {0x00, 0x00, 0x00, 0x04, 0x50, 0x17, 0x01, 0x01};
|
||||
static gsize cmd_sensor_identify_len = sizeof (cmd_sensor_identify) / sizeof (cmd_sensor_identify[0]);
|
||||
static guchar rsp_identify_match_suffix[] = {0x90, 0x00};
|
||||
static gsize rsp_identify_match_suffix_len = sizeof (rsp_identify_match_suffix) / sizeof (rsp_identify_match_suffix[0]);
|
||||
static guchar rsp_identify_notmatch_suffix[] = {0x90, 0x04};
|
||||
static gsize rsp_identify_notmatch_suffix_len = sizeof (rsp_identify_notmatch_suffix) / sizeof (rsp_identify_notmatch_suffix[0]);
|
||||
|
||||
static guchar cmd_sensor_enroll[] = {0x00, 0x00, 0x00, 0x04, 0x50, 0x17, 0x01, 0x00};
|
||||
static gsize cmd_sensor_enroll_len = sizeof (cmd_sensor_enroll) / sizeof (cmd_sensor_enroll[0]);
|
||||
|
||||
static guchar cmd_enroll_starting[] = {0x00, 0x00, 0x00, 0x07, 0x50, 0x16, 0x01, 0x00, 0x00, 0x00, 0x20};
|
||||
static gsize cmd_enroll_starting_len = sizeof (cmd_enroll_starting) / sizeof (cmd_enroll_starting[0]);
|
||||
|
||||
static guchar cmd_sensor_start_capture[] = {0x00, 0x00, 0x00, 0x04, 0x50, 0x16, 0x02, 0x01};
|
||||
static gsize cmd_sensor_start_capture_len = sizeof (cmd_sensor_start_capture) / sizeof (cmd_sensor_start_capture[0]);
|
||||
|
||||
static guchar cmd_read_capture[] = {0x00, 0x00, 0x00, 0x07, 0x50, 0x16, 0x02, 0x02, 0x00, 0x00, 0x02};
|
||||
static gsize cmd_read_capture_len = sizeof (cmd_read_capture) / sizeof (cmd_read_capture[0]);
|
||||
static guchar rsp_read_success_prefix[] = {0x00, 0x00, 0x00, 0x04};
|
||||
static gsize rsp_read_success_prefix_len = sizeof (rsp_read_success_prefix) / sizeof (rsp_read_success_prefix[0]);
|
||||
static guchar rsp_read_success_suffix[] = {0x0a, 0x90, 0x00};
|
||||
static gsize rsp_read_success_suffix_len = sizeof (rsp_read_success_suffix) / sizeof (rsp_read_success_suffix[0]);
|
||||
static guchar rsp_read_offcenter_prefix[] = {0x00, 0x00, 0x00, 0x04};
|
||||
static gsize rsp_read_offcenter_prefix_len = sizeof (rsp_read_offcenter_prefix) / sizeof (rsp_read_offcenter_prefix[0]);
|
||||
static guchar rsp_read_offcenter_suffix[] = {0x0a, 0x64, 0x91};
|
||||
static gsize rsp_read_offcenter_suffix_len = sizeof (rsp_read_offcenter_suffix) / sizeof (rsp_read_offcenter_suffix[0]);
|
||||
static guchar rsp_read_dirty_prefix[] = {0x00, 0x00, 0x00, 0x02, 0x64};
|
||||
static gsize rsp_read_dirty_prefix_len = sizeof (rsp_read_dirty_prefix) / sizeof (rsp_read_dirty_prefix[0]);
|
||||
|
||||
static guchar cmd_commit_starting[] = {0x00, 0x00, 0x00, 0x07, 0x50, 0x16, 0x05, 0x00, 0x00, 0x00, 0x20};
|
||||
static gsize cmd_commit_starting_len = sizeof (cmd_commit_starting) / sizeof (cmd_commit_starting[0]);
|
||||
|
||||
|
||||
/* commands which exist on the device but are currently not used */
|
||||
/*
|
||||
static guchar cmd_sensor_cancel[] = {0x00, 0x00, 0x00, 0x04, 0x50, 0x16, 0x04, 0x00};
|
||||
static gsize cmd_sensor_cancel_len = sizeof(cmd_sensor_cancel) / sizeof(cmd_sensor_cancel[0]);
|
||||
|
||||
static guchar cmd_sensor_verify[] = {0x00, 0x00, 0x00, 0x04, 0x50, 0x04, 0x01, 0x00};
|
||||
static gsize cmd_sensor_verify_len = sizeof(cmd_sensor_verify) / sizeof(cmd_sensor_verify[0]);
|
||||
|
||||
static guchar cmd_read_verify[] = {0x00, 0x00, 0x00, 0x04, 0x50, 0x04, 0x02, 0x00};
|
||||
static gsize cmd_read_verify_len = sizeof(cmd_read_verify) / sizeof(cmd_read_verify[0]);
|
||||
*/
|
||||
|
||||
|
||||
/* prefixes/suffixes and other things for dynamically created command payloads */
|
||||
|
||||
#define EGISMOC_CHECK_BYTES_LENGTH 2
|
||||
#define EGISMOC_IDENTIFY_RESPONSE_PRINT_ID_OFFSET 46
|
||||
#define EGISMOC_CMD_CHECK_SEPARATOR_LENGTH 32
|
||||
|
||||
static guchar cmd_new_print_prefix[] = {0x00, 0x00, 0x00, 0x27, 0x50, 0x16, 0x03, 0x00, 0x00, 0x00, 0x20};
|
||||
static gsize cmd_new_print_prefix_len = sizeof (cmd_new_print_prefix) / sizeof (cmd_new_print_prefix[0]);
|
||||
|
||||
static guchar cmd_delete_prefix[] = {0x50, 0x18, 0x04, 0x00, 0x00};
|
||||
static gsize cmd_delete_prefix_len = sizeof (cmd_delete_prefix) / sizeof (cmd_delete_prefix[0]);
|
||||
static guchar rsp_delete_success_prefix[] = {0x00, 0x00, 0x00, 0x02, 0x90, 0x00};
|
||||
static gsize rsp_delete_success_prefix_len = sizeof (rsp_delete_success_prefix) / sizeof (rsp_delete_success_prefix[0]);
|
||||
|
||||
static guchar cmd_check_prefix_type1[] = {0x50, 0x17, 0x03, 0x00, 0x00};
|
||||
static gsize cmd_check_prefix_type1_len = sizeof (cmd_check_prefix_type1) / sizeof (cmd_check_prefix_type1[0]);
|
||||
static guchar cmd_check_prefix_type2[] = {0x50, 0x17, 0x03, 0x80, 0x00};
|
||||
static gsize cmd_check_prefix_type2_len = sizeof (cmd_check_prefix_type2) / sizeof (cmd_check_prefix_type2[0]);
|
||||
static guchar cmd_check_suffix[] = {0x00, 0x40};
|
||||
static gsize cmd_check_suffix_len = sizeof (cmd_check_suffix) / sizeof (cmd_check_suffix[0]);
|
||||
static guchar rsp_check_not_yet_enrolled_suffix[] = {0x90, 0x04};
|
||||
static gsize rsp_check_not_yet_enrolled_suffix_len = sizeof (rsp_check_not_yet_enrolled_suffix) / sizeof (rsp_check_not_yet_enrolled_suffix[0]);
|
||||
|
||||
|
||||
/* SSM task states and various status enums */
|
||||
|
||||
typedef enum {
|
||||
CMD_SEND,
|
||||
CMD_GET,
|
||||
CMD_STATES,
|
||||
} CommandStates;
|
||||
|
||||
typedef enum {
|
||||
DEV_INIT_CONTROL1,
|
||||
DEV_INIT_CONTROL2,
|
||||
DEV_INIT_CONTROL3,
|
||||
DEV_INIT_CONTROL4,
|
||||
DEV_INIT_CONTROL5,
|
||||
DEV_GET_FW_VERSION,
|
||||
DEV_INIT_STATES,
|
||||
} DeviceInitStates;
|
||||
|
||||
typedef enum {
|
||||
IDENTIFY_GET_ENROLLED_IDS,
|
||||
IDENTIFY_CHECK_ENROLLED_NUM,
|
||||
IDENTIFY_SENSOR_RESET,
|
||||
IDENTIFY_SENSOR_IDENTIFY,
|
||||
IDENTIFY_WAIT_FINGER,
|
||||
IDENTIFY_SENSOR_CHECK,
|
||||
IDENTIFY_CHECK,
|
||||
IDENTIFY_COMPLETE_SENSOR_RESET,
|
||||
IDENTIFY_COMPLETE,
|
||||
IDENTIFY_STATES,
|
||||
} IdentifyStates;
|
||||
|
||||
typedef enum {
|
||||
ENROLL_GET_ENROLLED_IDS,
|
||||
ENROLL_CHECK_ENROLLED_NUM,
|
||||
ENROLL_SENSOR_RESET,
|
||||
ENROLL_SENSOR_ENROLL,
|
||||
ENROLL_WAIT_FINGER,
|
||||
ENROLL_SENSOR_CHECK,
|
||||
ENROLL_CHECK,
|
||||
ENROLL_START,
|
||||
ENROLL_CAPTURE_SENSOR_RESET,
|
||||
ENROLL_CAPTURE_SENSOR_START_CAPTURE,
|
||||
ENROLL_CAPTURE_WAIT_FINGER,
|
||||
ENROLL_CAPTURE_READ_RESPONSE,
|
||||
ENROLL_COMMIT_START,
|
||||
ENROLL_COMMIT,
|
||||
ENROLL_COMMIT_SENSOR_RESET,
|
||||
ENROLL_COMPLETE,
|
||||
ENROLL_STATES,
|
||||
} EnrollStates;
|
||||
|
||||
typedef enum {
|
||||
ENROLL_STATUS_DEVICE_FULL,
|
||||
ENROLL_STATUS_DUPLICATE,
|
||||
ENROLL_STATUS_PARTIAL_OK,
|
||||
ENROLL_STATUS_RETRY,
|
||||
ENROLL_STATUS_COMPLETE,
|
||||
} EnrollStatus;
|
||||
|
||||
typedef enum {
|
||||
LIST_GET_ENROLLED_IDS,
|
||||
LIST_RETURN_ENROLLED_PRINTS,
|
||||
LIST_STATES,
|
||||
} ListStates;
|
||||
|
||||
typedef enum {
|
||||
DELETE_GET_ENROLLED_IDS,
|
||||
DELETE_DELETE,
|
||||
DELETE_STATES,
|
||||
} DeleteStates;
|
||||
@@ -357,7 +357,7 @@ elan_cmd_cb (FpiUsbTransfer *transfer, FpDevice *dev,
|
||||
if (transfer->endpoint & FPI_USB_ENDPOINT_IN)
|
||||
{
|
||||
/* just finished receiving */
|
||||
self->last_read = g_memdup (transfer->buffer, transfer->actual_length);
|
||||
self->last_read = g_memdup2 (transfer->buffer, transfer->actual_length);
|
||||
elan_cmd_done (ssm);
|
||||
}
|
||||
else
|
||||
|
||||
@@ -215,9 +215,12 @@ static const FpIdEntry elan_id_table[] = {
|
||||
{.vid = ELAN_VEND_ID, .pid = 0x0c33, .driver_data = ELAN_ALL_DEV},
|
||||
{.vid = ELAN_VEND_ID, .pid = 0x0c3d, .driver_data = ELAN_ALL_DEV},
|
||||
{.vid = ELAN_VEND_ID, .pid = 0x0c42, .driver_data = ELAN_0C42},
|
||||
{.vid = ELAN_VEND_ID, .pid = 0x0c4b, .driver_data = ELAN_ALL_DEV},
|
||||
{.vid = ELAN_VEND_ID, .pid = 0x0c4d, .driver_data = ELAN_ALL_DEV},
|
||||
{.vid = ELAN_VEND_ID, .pid = 0x0c4f, .driver_data = ELAN_ALL_DEV},
|
||||
{.vid = ELAN_VEND_ID, .pid = 0x0c63, .driver_data = ELAN_ALL_DEV},
|
||||
{.vid = ELAN_VEND_ID, .pid = 0x0c6e, .driver_data = ELAN_ALL_DEV},
|
||||
{.vid = ELAN_VEND_ID, .pid = 0x0c58, .driver_data = ELAN_ALL_DEV},
|
||||
{.vid = 0, .pid = 0, .driver_data = 0},
|
||||
};
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,196 @@
|
||||
/*
|
||||
* Copyright (C) 2021 Elan Microelectronics
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "fpi-device.h"
|
||||
#include "fpi-ssm.h"
|
||||
#include <libusb.h>
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
G_DECLARE_FINAL_TYPE (FpiDeviceElanmoc, fpi_device_elanmoc, FPI, DEVICE_ELANMOC, FpDevice)
|
||||
|
||||
#define ELAN_MOC_DRIVER_FULLNAME "Elan MOC Sensors"
|
||||
#define ELAN_M0C_CMD_LEN 0x3
|
||||
#define ELAN_EP_CMD_OUT (0x1 | LIBUSB_ENDPOINT_OUT)
|
||||
#define ELAN_EP_CMD_IN (0x3 | LIBUSB_ENDPOINT_IN)
|
||||
#define ELAN_EP_MOC_CMD_IN (0x4 | LIBUSB_ENDPOINT_IN)
|
||||
#define ELAN_EP_IMG_IN (0x2 | LIBUSB_ENDPOINT_IN)
|
||||
|
||||
#define ELAN_MOC_CMD_TIMEOUT 5000
|
||||
#define ELAN_MOC_CAL_RETRY 500
|
||||
#define ELAN_MOC_ENROLL_TIMES 9
|
||||
#define ELAN_MAX_USER_ID_LEN 92
|
||||
#define ELAN_MAX_ENROLL_NUM 9
|
||||
|
||||
#define ELAN_MSG_VERIFY_ERR 0xfd
|
||||
#define ELAN_MSG_DIRTY 0xfb
|
||||
#define ELAN_MSG_AREA_NOT_ENOUGH 0xfe
|
||||
#define ELAN_MSG_TOO_HIGH 0x41
|
||||
#define ELAN_MSG_TOO_LEFT 0x42
|
||||
#define ELAN_MSG_TOO_LOW 0x43
|
||||
#define ELAN_MSG_TOO_RIGHT 0x44
|
||||
#define ELAN_MSG_OK 0x00
|
||||
|
||||
#define ELAN_MAX_HDR_LEN 3
|
||||
#define ELAN_USERDATE_SIZE (ELAN_MAX_USER_ID_LEN + 3)
|
||||
|
||||
#define ELAN_MSG_DRIVER_VERSION "1004"
|
||||
|
||||
struct elanmoc_cmd
|
||||
{
|
||||
unsigned char cmd_header[ELAN_MAX_HDR_LEN];
|
||||
int cmd_len;
|
||||
int resp_len;
|
||||
};
|
||||
|
||||
static const struct elanmoc_cmd fw_ver_cmd = {
|
||||
.cmd_header = {0x40, 0x19},
|
||||
.cmd_len = 2,
|
||||
.resp_len = 2,
|
||||
};
|
||||
|
||||
static const struct elanmoc_cmd sensor_dim_cmd = {
|
||||
.cmd_header = {0x00, 0x0c},
|
||||
.cmd_len = 2,
|
||||
.resp_len = 4,
|
||||
};
|
||||
|
||||
static const struct elanmoc_cmd cal_status_cmd = {
|
||||
.cmd_header = {0x40, 0xff, 0x00},
|
||||
.cmd_len = 3,
|
||||
.resp_len = 2,
|
||||
};
|
||||
|
||||
static const struct elanmoc_cmd enrolled_number_cmd = {
|
||||
.cmd_header = {0x40, 0xff, 0x04},
|
||||
.cmd_len = 3,
|
||||
.resp_len = 2,
|
||||
};
|
||||
|
||||
static const struct elanmoc_cmd elanmoc_verify_cmd = {
|
||||
.cmd_header = {0x40, 0xff, 0x73},
|
||||
.cmd_len = 5,
|
||||
.resp_len = 2,
|
||||
};
|
||||
|
||||
static const struct elanmoc_cmd elanmoc_above_cmd = {
|
||||
.cmd_header = {0x40, 0xff, 0x02},
|
||||
.cmd_len = 3,
|
||||
.resp_len = 0,
|
||||
};
|
||||
|
||||
static const struct elanmoc_cmd elanmoc_enroll_cmd = {
|
||||
.cmd_header = {0x40, 0xff, 0x01},
|
||||
.cmd_len = 7,
|
||||
.resp_len = 2,
|
||||
};
|
||||
|
||||
static const struct elanmoc_cmd elanmoc_delete_cmd = {
|
||||
.cmd_header = {0x40, 0xff, 0x13},
|
||||
.cmd_len = 128,
|
||||
.resp_len = 2,
|
||||
};
|
||||
|
||||
static const struct elanmoc_cmd elanmoc_enroll_commit_cmd = {
|
||||
.cmd_header = {0x40, 0xff, 0x11},
|
||||
.cmd_len = 128,
|
||||
.resp_len = 2,
|
||||
};
|
||||
|
||||
static const struct elanmoc_cmd elanmoc_remove_all_cmd = {
|
||||
.cmd_header = {0x40, 0xff, 0x98},
|
||||
.cmd_len = 3,
|
||||
.resp_len = 2,
|
||||
};
|
||||
|
||||
static const struct elanmoc_cmd elanmoc_get_userid_cmd = {
|
||||
.cmd_header = {0x43, 0x21, 0x00},
|
||||
.cmd_len = 3,
|
||||
.resp_len = 97,
|
||||
};
|
||||
|
||||
static const struct elanmoc_cmd elanmoc_set_mod_cmd = {
|
||||
.cmd_header = {0x40, 0xff, 0x14},
|
||||
.cmd_len = 4,
|
||||
.resp_len = 2,
|
||||
};
|
||||
|
||||
static const struct elanmoc_cmd elanmoc_check_reenroll_cmd = {
|
||||
.cmd_header = {0x40, 0xff, 0x22},
|
||||
.cmd_len = 3 + ELAN_USERDATE_SIZE,
|
||||
.resp_len = 2,
|
||||
};
|
||||
|
||||
typedef void (*ElanCmdMsgCallback) (FpiDeviceElanmoc *self,
|
||||
GError *error);
|
||||
|
||||
enum moc_enroll_states {
|
||||
MOC_ENROLL_GET_ENROLLED_NUM,
|
||||
MOC_ENROLL_REENROLL_CHECK,
|
||||
MOC_ENROLL_WAIT_FINGER,
|
||||
MOC_ENROLL_COMMIT_RESULT,
|
||||
MOC_ENROLL_NUM_STATES,
|
||||
};
|
||||
|
||||
enum moc_list_states {
|
||||
MOC_LIST_GET_ENROLLED,
|
||||
MOC_LIST_GET_FINGER,
|
||||
MOC_LIST_NUM_STATES,
|
||||
};
|
||||
|
||||
enum delete_states {
|
||||
DELETE_SEND_CMD,
|
||||
DELETE_NUM_STATES,
|
||||
};
|
||||
|
||||
enum dev_init_states {
|
||||
DEV_WAIT_READY,
|
||||
DEV_SET_MODE,
|
||||
DEV_GET_VER,
|
||||
DEV_GET_DIM,
|
||||
DEV_GET_ENROLLED,
|
||||
DEV_INIT_STATES,
|
||||
};
|
||||
|
||||
enum dev_exit_states {
|
||||
DEV_EXIT_ABOVE,
|
||||
DEV_EXIT_STATES,
|
||||
};
|
||||
|
||||
struct _FpiDeviceElanmoc
|
||||
{
|
||||
FpDevice parent;
|
||||
FpiSsm *task_ssm;
|
||||
FpiSsm *cmd_ssm;
|
||||
FpiUsbTransfer *cmd_transfer;
|
||||
gboolean cmd_cancelable;
|
||||
gsize cmd_len_in;
|
||||
unsigned short fw_ver;
|
||||
unsigned char x_trace;
|
||||
unsigned char y_trace;
|
||||
int num_frames;
|
||||
int curr_enrolled;
|
||||
int max_moc_enroll_time;
|
||||
int cancel_result;
|
||||
int cmd_retry_cnt;
|
||||
int list_index;
|
||||
GPtrArray *list_result;
|
||||
};
|
||||
@@ -439,6 +439,12 @@ elanspi_capture_old_line_handler (FpiSpiTransfer *transfer, FpDevice *dev, gpoin
|
||||
}
|
||||
else
|
||||
{
|
||||
/* check for termination */
|
||||
if (fpi_device_get_current_action (dev) == FPI_DEVICE_ACTION_NONE)
|
||||
{
|
||||
fpi_ssm_mark_completed (transfer->ssm);
|
||||
return;
|
||||
}
|
||||
/* check for cancellation */
|
||||
if (fpi_device_action_is_cancelled (dev))
|
||||
{
|
||||
@@ -606,6 +612,7 @@ elanspi_calibrate_old_handler (FpiSsm *ssm, FpDevice *dev)
|
||||
case ELANSPI_CALIBOLD_CHECKFIN_CAPTURE:
|
||||
case ELANSPI_CALIBOLD_DACFINE_CAPTURE:
|
||||
chld = fpi_ssm_new (dev, elanspi_capture_old_handler, ELANSPI_CAPTOLD_NSTATES);
|
||||
fpi_ssm_silence_debug (chld);
|
||||
fpi_ssm_start_subsm (ssm, chld);
|
||||
return;
|
||||
|
||||
@@ -860,6 +867,7 @@ elanspi_calibrate_hv_handler (FpiSsm *ssm, FpDevice *dev)
|
||||
|
||||
case ELANSPI_CALIBHV_CAPTURE:
|
||||
chld = fpi_ssm_new (dev, elanspi_capture_hv_handler, ELANSPI_CAPTHV_NSTATES);
|
||||
fpi_ssm_silence_debug (chld);
|
||||
fpi_ssm_start_subsm (ssm, chld);
|
||||
return;
|
||||
|
||||
@@ -1115,6 +1123,7 @@ do_sw_reset:
|
||||
chld = fpi_ssm_new_full (dev, elanspi_calibrate_hv_handler, ELANSPI_CALIBHV_NSTATES, ELANSPI_CALIBHV_PROTECT, "HV calibrate");
|
||||
else
|
||||
chld = fpi_ssm_new_full (dev, elanspi_calibrate_old_handler, ELANSPI_CALIBOLD_NSTATES, ELANSPI_CALIBOLD_PROTECT, "old calibrate");
|
||||
fpi_ssm_silence_debug (chld);
|
||||
fpi_ssm_start_subsm (ssm, chld);
|
||||
return;
|
||||
|
||||
@@ -1123,6 +1132,7 @@ do_sw_reset:
|
||||
chld = fpi_ssm_new (dev, elanspi_capture_hv_handler, ELANSPI_CAPTHV_NSTATES);
|
||||
else
|
||||
chld = fpi_ssm_new (dev, elanspi_capture_old_handler, ELANSPI_CAPTOLD_NSTATES);
|
||||
fpi_ssm_silence_debug (chld);
|
||||
fpi_ssm_start_subsm (ssm, chld);
|
||||
return;
|
||||
|
||||
@@ -1219,8 +1229,6 @@ elanspi_guess_image (FpiDeviceElanSpi *self, guint16 *raw_image)
|
||||
|
||||
sq_stddev /= (frame_width * frame_height);
|
||||
|
||||
fp_dbg ("<guess> stddev=%ld, ip=%d, is_fp=%d, is_empty=%d", sq_stddev, invalid_percent, is_fp, is_empty);
|
||||
|
||||
if (invalid_percent < ELANSPI_MAX_REAL_INVALID_PERCENT)
|
||||
is_fp += 1;
|
||||
if (invalid_percent > ELANSPI_MIN_EMPTY_INVALID_PERCENT)
|
||||
@@ -1231,6 +1239,8 @@ elanspi_guess_image (FpiDeviceElanSpi *self, guint16 *raw_image)
|
||||
if (sq_stddev < ELANSPI_MAX_EMPTY_STDDEV)
|
||||
is_empty += 1;
|
||||
|
||||
fp_dbg ("<guess> stddev=%" G_GUINT64_FORMAT "d, ip=%d, is_fp=%d, is_empty=%d", sq_stddev, invalid_percent, is_fp, is_empty);
|
||||
|
||||
if (is_fp > is_empty)
|
||||
return ELANSPI_GUESS_FINGERPRINT;
|
||||
else if (is_empty > is_fp)
|
||||
@@ -1482,11 +1492,12 @@ elanspi_fp_capture_ssm_handler (FpiSsm *ssm, FpDevice *dev)
|
||||
if (self->deactivating)
|
||||
{
|
||||
fp_dbg ("<capture> got deactivate; exiting");
|
||||
|
||||
self->deactivating = FALSE;
|
||||
fpi_ssm_mark_completed (ssm);
|
||||
|
||||
/* mark deactivate done */
|
||||
fpi_image_device_deactivate_complete (FP_IMAGE_DEVICE (dev), NULL);
|
||||
self->deactivating = FALSE;
|
||||
|
||||
return;
|
||||
}
|
||||
@@ -1495,6 +1506,7 @@ elanspi_fp_capture_ssm_handler (FpiSsm *ssm, FpDevice *dev)
|
||||
chld = fpi_ssm_new (dev, elanspi_capture_hv_handler, ELANSPI_CAPTHV_NSTATES);
|
||||
else
|
||||
chld = fpi_ssm_new (dev, elanspi_capture_old_handler, ELANSPI_CAPTOLD_NSTATES);
|
||||
fpi_ssm_silence_debug (chld);
|
||||
fpi_ssm_start_subsm (ssm, chld);
|
||||
return;
|
||||
|
||||
|
||||
@@ -97,7 +97,37 @@ static const struct elanspi_reg_entry elanspi_calibration_table_default[] = {
|
||||
{0xff, 0xff}
|
||||
};
|
||||
|
||||
static const struct elanspi_reg_entry elanspi_calibration_table_id567[] = {
|
||||
static const struct elanspi_reg_entry elanspi_calibration_table_id6[] = {
|
||||
{0x2A, 0x07},
|
||||
{0x1, 0x00},
|
||||
{0x2, 0x5f},
|
||||
{0x3, 0x00},
|
||||
{0x4, 0x5f},
|
||||
{0x5, 0x60},
|
||||
{0x6, 0xC0},
|
||||
{0x7, 0x80},
|
||||
{0x8, 0x04},
|
||||
{0xA, 0x97},
|
||||
{0xB, 0x72},
|
||||
{0xC, 0x69},
|
||||
{0xF, 0x2A},
|
||||
{0x11, 0x2A},
|
||||
{0x13, 0x27},
|
||||
{0x15, 0x67},
|
||||
{0x18, 0x04},
|
||||
{0x21, 0x20},
|
||||
{0x22, 0x36},
|
||||
{0x29, 0x02},
|
||||
{0x2A, 0x03},
|
||||
{0x2A, 0x5F},
|
||||
{0x2B, 0xC0},
|
||||
{0x2C, 0x10},
|
||||
{0x2E, 0xFF},
|
||||
|
||||
{0xff, 0xff}
|
||||
};
|
||||
|
||||
static const struct elanspi_reg_entry elanspi_calibration_table_id57[] = {
|
||||
{0x2A, 0x07},
|
||||
{0x5, 0x60},
|
||||
{0x6, 0xC0},
|
||||
@@ -143,9 +173,9 @@ static const struct elanspi_regtable elanspi_calibration_table_old = {
|
||||
.other = elanspi_calibration_table_default,
|
||||
.entries = {
|
||||
{ .sid = 0x0, .table = elanspi_calibration_table_id0 },
|
||||
{ .sid = 0x5, .table = elanspi_calibration_table_id567 },
|
||||
{ .sid = 0x6, .table = elanspi_calibration_table_id567 },
|
||||
{ .sid = 0x7, .table = elanspi_calibration_table_id567 },
|
||||
{ .sid = 0x5, .table = elanspi_calibration_table_id57 },
|
||||
{ .sid = 0x6, .table = elanspi_calibration_table_id6 },
|
||||
{ .sid = 0x7, .table = elanspi_calibration_table_id57 },
|
||||
{ .sid = 0x0, .table = NULL }
|
||||
}
|
||||
};
|
||||
@@ -318,6 +348,7 @@ static const FpIdEntry elanspi_id_table[] = {
|
||||
{.udev_types = ELANSPI_UDEV_TYPES, .spi_acpi_id = "ELAN7001", .hid_id = {.vid = ELANSPI_TP_VID, .pid = 0x30b2}, .driver_data = ELANSPI_NO_ROTATE},
|
||||
{.udev_types = ELANSPI_UDEV_TYPES, .spi_acpi_id = "ELAN70A1", .hid_id = {.vid = ELANSPI_TP_VID, .pid = 0x30b2}, .driver_data = ELANSPI_NO_ROTATE},
|
||||
{.udev_types = ELANSPI_UDEV_TYPES, .spi_acpi_id = "ELAN7001", .hid_id = {.vid = ELANSPI_TP_VID, .pid = 0x309f}, .driver_data = ELANSPI_180_ROTATE},
|
||||
{.udev_types = ELANSPI_UDEV_TYPES, .spi_acpi_id = "ELAN7001", .hid_id = {.vid = ELANSPI_TP_VID, .pid = 0x241f}, .driver_data = ELANSPI_NO_ROTATE},
|
||||
{.udev_types = 0}
|
||||
};
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,52 @@
|
||||
/*
|
||||
* Copyright (C) 2021 Focaltech Microelectronics
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "fpi-device.h"
|
||||
#include "fpi-ssm.h"
|
||||
#include <libusb.h>
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
G_DECLARE_FINAL_TYPE (FpiDeviceFocaltechMoc, fpi_device_focaltech_moc, FPI, DEVICE_FOCALTECH_MOC, FpDevice)
|
||||
|
||||
#define FOCALTECH_MOC_DRIVER_FULLNAME "Focaltech MOC Sensors"
|
||||
|
||||
#define FOCALTECH_MOC_CMD_TIMEOUT 1000
|
||||
#define FOCALTECH_MOC_MAX_FINGERS 10
|
||||
#define FOCALTECH_MOC_UID_PREFIX_LENGTH 8
|
||||
#define FOCALTECH_MOC_USER_ID_LENGTH 64
|
||||
|
||||
typedef void (*FocaltechCmdMsgCallback) (FpiDeviceFocaltechMoc *self,
|
||||
GError *error);
|
||||
|
||||
struct _FpiDeviceFocaltechMoc
|
||||
{
|
||||
FpDevice parent;
|
||||
FpiSsm *task_ssm;
|
||||
FpiSsm *cmd_ssm;
|
||||
FpiUsbTransfer *cmd_transfer;
|
||||
gboolean cmd_cancelable;
|
||||
gsize cmd_len_in;
|
||||
int num_frames;
|
||||
int delete_slot;
|
||||
guint8 bulk_in_ep;
|
||||
guint8 bulk_out_ep;
|
||||
};
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,221 @@
|
||||
/*
|
||||
* Copyright (c) 2022 Fingerprint Cards AB <tech@fingerprints.com>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "fpi-device.h"
|
||||
#include "fpi-ssm.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#define TEMPLATE_ID_SIZE (32)
|
||||
#define MAX_FW_VERSION_STR_LEN (16)
|
||||
#define FPC_CMD_INIT (0x01)
|
||||
#define FPC_CMD_ARM (0x02)
|
||||
#define FPC_CMD_ABORT (0x03)
|
||||
#define FPC_CMD_INDICATE_S_STATE (0x08)
|
||||
#define FPC_CMD_GET_IMG (0x09)
|
||||
#define FPC_CMD_GET_KPI (0x0C)
|
||||
#define FPC_CMD_LOAD_DB (0x60)
|
||||
#define FPC_CMD_STORE_DB (0x61)
|
||||
#define FPC_CMD_DELETE_DB (0x62)
|
||||
#define FPC_CMD_DELETE_TEMPLATE (0x63)
|
||||
#define FPC_CMD_BEGIN_ENROL (0x67)
|
||||
#define FPC_CMD_ENROL (0x68)
|
||||
#define FPC_CMD_END_ENROL (0x69)
|
||||
#define FPC_CMD_BIND_IDENTITY (0x6A)
|
||||
#define FPC_CMD_IDENTIFY (0x6B)
|
||||
#define FPC_CMD_ENUM (0x70)
|
||||
#define FPC_EVT_INIT_RESULT (0x02)
|
||||
#define FPC_EVT_FINGER_DWN (0x06)
|
||||
#define FPC_EVT_IMG (0x08)
|
||||
#define FPC_EVT_FID_DATA (0x31)
|
||||
#define FPC_DB_ID_LEN (16)
|
||||
#define FPC_IDENTITY_TYPE_WILDCARD (0x1)
|
||||
#define FPC_IDENTITY_TYPE_RESERVED (0x3)
|
||||
#define FPC_IDENTITY_WILDCARD (0x25066282)
|
||||
#define FPC_SUBTYPE_ANY (0xFF)
|
||||
#define FPC_SUBTYPE_RESERVED (0xF5)
|
||||
#define FPC_SUBTYPE_NOINFORMATION (0x00)
|
||||
#define FPC_CAPTUREID_RESERVED (0x701100F)
|
||||
#define FPC_SESSIONID_RESERVED (0x0077FF12)
|
||||
#define FPC_TEMPLATES_MAX (10)
|
||||
#define SECURITY_MAX_SID_SIZE (68)
|
||||
#define FPC_HOST_MS_S0 (0x10)
|
||||
#define FPC_HOST_MS_SX (0x11)
|
||||
|
||||
G_DECLARE_FINAL_TYPE (FpiDeviceFpcMoc, fpi_device_fpcmoc, FPI,
|
||||
DEVICE_FPCMOC, FpDevice);
|
||||
|
||||
typedef struct _FPC_FID_DATA
|
||||
{
|
||||
guint32 identity_type;
|
||||
guint32 reserved;
|
||||
guint32 identity_size;
|
||||
guint32 subfactor;
|
||||
guint8 data[SECURITY_MAX_SID_SIZE];
|
||||
} FPC_FID_DATA, *PFPC_FID_DATA;
|
||||
|
||||
typedef struct _FPC_LOAD_DB
|
||||
{
|
||||
gint32 status;
|
||||
guint32 reserved;
|
||||
guint32 database_id_size;
|
||||
guint8 data[FPC_DB_ID_LEN];
|
||||
} FPC_LOAD_DB, *PFPC_LOAD_DB;
|
||||
|
||||
typedef union _FPC_DELETE_DB
|
||||
{
|
||||
guint32 reserved;
|
||||
guint32 database_id_size;
|
||||
guint8 data[FPC_DB_ID_LEN];
|
||||
} FPC_DB_OP, *PFPC_DB_OP;
|
||||
|
||||
typedef struct _FPC_BEGIN_ENROL
|
||||
{
|
||||
gint32 status;
|
||||
guint32 reserved1;
|
||||
guint32 reserved2;
|
||||
} FPC_BEGIN_ENROL, *PFPC_BEGIN_ENROL;
|
||||
|
||||
typedef struct _FPC_ENROL
|
||||
{
|
||||
gint32 status;
|
||||
guint32 remaining;
|
||||
} FPC_ENROL, *PFPC_ENROL;
|
||||
|
||||
typedef struct _FPC_END_ENROL
|
||||
{
|
||||
gint32 status;
|
||||
guint32 fid;
|
||||
} FPC_END_ENROL, *PFPC_END_ENROL;
|
||||
|
||||
typedef struct _FPC_IDENTIFY
|
||||
{
|
||||
gint32 status;
|
||||
guint32 identity_type;
|
||||
guint32 identity_offset;
|
||||
guint32 identity_size;
|
||||
guint32 subfactor;
|
||||
guint8 data[SECURITY_MAX_SID_SIZE];
|
||||
} FPC_IDENTIFY, *PFPC_IDENTIFY;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
guint32 cmdid;
|
||||
guint32 length;
|
||||
guint32 status;
|
||||
} evt_hdr_t;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
evt_hdr_t hdr;
|
||||
guint16 sensor;
|
||||
guint16 hw_id;
|
||||
guint16 img_w;
|
||||
guint16 img_h;
|
||||
guint8 fw_version[MAX_FW_VERSION_STR_LEN];
|
||||
guint16 fw_capabilities;
|
||||
} evt_initiated_t;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
guint8 subfactor;
|
||||
guint32 identity_type;
|
||||
guint32 identity_size;
|
||||
guint8 identity[SECURITY_MAX_SID_SIZE];
|
||||
} __attribute__((packed)) fpc_fid_data_t;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
evt_hdr_t hdr;
|
||||
gint status;
|
||||
guint32 num_ids;
|
||||
fpc_fid_data_t fid_data[FPC_TEMPLATES_MAX];
|
||||
} __attribute__((packed)) evt_enum_fids_t;
|
||||
|
||||
typedef struct _fp_cmd_response
|
||||
{
|
||||
union
|
||||
{
|
||||
evt_hdr_t evt_hdr;
|
||||
evt_initiated_t evt_inited;
|
||||
evt_enum_fids_t evt_enum_fids;
|
||||
};
|
||||
} fpc_cmd_response_t, *pfpc_cmd_response_t;
|
||||
|
||||
enum {
|
||||
FPC_ENROL_STATUS_COMPLETED = 0,
|
||||
FPC_ENROL_STATUS_PROGRESS = 1,
|
||||
FPC_ENROL_STATUS_FAILED_COULD_NOT_COMPLETE = 2,
|
||||
FPC_ENROL_STATUS_FAILED_ALREADY_ENROLED = 3,
|
||||
FPC_ENROL_STATUS_IMAGE_LOW_COVERAGE = 4,
|
||||
FPC_ENROL_STATUS_IMAGE_TOO_SIMILAR = 5,
|
||||
FPC_ENROL_STATUS_IMAGE_LOW_QUALITY = 6,
|
||||
};
|
||||
|
||||
typedef enum {
|
||||
FPC_CMDTYPE_UNKNOWN = 0,
|
||||
FPC_CMDTYPE_TO_DEVICE,
|
||||
FPC_CMDTYPE_TO_DEVICE_EVTDATA,
|
||||
FPC_CMDTYPE_FROM_DEVICE,
|
||||
} FpcCmdType;
|
||||
|
||||
typedef enum {
|
||||
FP_CMD_SEND = 0,
|
||||
FP_CMD_GET_DATA,
|
||||
FP_CMD_SUSPENDED,
|
||||
FP_CMD_RESUME,
|
||||
FP_CMD_NUM_STATES,
|
||||
} FpCmdState;
|
||||
|
||||
typedef enum {
|
||||
FP_INIT = 0,
|
||||
FP_LOAD_DB,
|
||||
FP_INIT_NUM_STATES,
|
||||
} FpInitState;
|
||||
|
||||
typedef enum {
|
||||
FP_ENROLL_ENUM = 0,
|
||||
FP_ENROLL_CREATE,
|
||||
FP_ENROLL_CAPTURE,
|
||||
FP_ENROLL_GET_IMG,
|
||||
FP_ENROLL_UPDATE,
|
||||
FP_ENROLL_COMPLETE,
|
||||
FP_ENROLL_CHECK_DUPLICATE,
|
||||
FP_ENROLL_BINDID,
|
||||
FP_ENROLL_COMMIT,
|
||||
FP_ENROLL_DICARD,
|
||||
FP_ENROLL_CLEANUP,
|
||||
FP_ENROLL_NUM_STATES,
|
||||
} FpEnrollState;
|
||||
|
||||
typedef enum {
|
||||
FP_VERIFY_CAPTURE = 0,
|
||||
FP_VERIFY_GET_IMG,
|
||||
FP_VERIFY_IDENTIFY,
|
||||
FP_VERIFY_CANCEL,
|
||||
FP_VERIFY_NUM_STATES,
|
||||
} FpVerifyState;
|
||||
|
||||
typedef enum {
|
||||
FP_CLEAR_DELETE_DB = 0,
|
||||
FP_CLEAR_CREATE_DB,
|
||||
FP_CLEAR_NUM_STATES,
|
||||
} FpClearState;
|
||||
@@ -56,7 +56,6 @@ struct _FpiDeviceGoodixMoc
|
||||
gint max_stored_prints;
|
||||
GPtrArray *list_result;
|
||||
guint8 template_id[TEMPLATE_ID_SIZE];
|
||||
gboolean is_enroll_identify;
|
||||
gboolean is_power_button_shield_on;
|
||||
|
||||
};
|
||||
@@ -79,6 +78,44 @@ static gboolean parse_print_data (GVariant *data,
|
||||
gsize *tid_len,
|
||||
const guint8 **user_id,
|
||||
gsize *user_id_len);
|
||||
|
||||
static FpPrint *
|
||||
fp_print_from_template (FpiDeviceGoodixMoc *self, template_format_t *template)
|
||||
{
|
||||
FpPrint *print;
|
||||
GVariant *data;
|
||||
GVariant *tid;
|
||||
GVariant *uid;
|
||||
g_autofree gchar *userid = NULL;
|
||||
|
||||
userid = g_strndup ((gchar *) template->payload.data, template->payload.size);
|
||||
|
||||
print = fp_print_new (FP_DEVICE (self));
|
||||
|
||||
tid = g_variant_new_fixed_array (G_VARIANT_TYPE_BYTE,
|
||||
template->tid,
|
||||
TEMPLATE_ID_SIZE,
|
||||
1);
|
||||
|
||||
uid = g_variant_new_fixed_array (G_VARIANT_TYPE_BYTE,
|
||||
template->payload.data,
|
||||
template->payload.size,
|
||||
1);
|
||||
|
||||
data = g_variant_new ("(y@ay@ay)",
|
||||
template->finger_index,
|
||||
tid,
|
||||
uid);
|
||||
|
||||
fpi_print_set_type (print, FPI_PRINT_RAW);
|
||||
fpi_print_set_device_stored (print, TRUE);
|
||||
g_object_set (print, "fpi-data", data, NULL);
|
||||
g_object_set (print, "description", userid, NULL);
|
||||
fpi_print_fill_from_user_id (print, userid);
|
||||
|
||||
return print;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
* fp_cmd_xxx Function
|
||||
@@ -122,7 +159,7 @@ fp_cmd_receive_cb (FpiUsbTransfer *transfer,
|
||||
{
|
||||
fpi_ssm_mark_failed (transfer->ssm,
|
||||
fpi_device_error_new_msg (FP_DEVICE_ERROR_PROTO,
|
||||
"Corrupted message received"));
|
||||
"Corrupted message header received"));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -383,11 +420,9 @@ fp_verify_cb (FpiDeviceGoodixMoc *self,
|
||||
gxfp_cmd_response_t *resp,
|
||||
GError *error)
|
||||
{
|
||||
g_autoptr(GPtrArray) templates = NULL;
|
||||
FpDevice *device = FP_DEVICE (self);
|
||||
FpPrint *print = NULL;
|
||||
gint cnt = 0;
|
||||
gboolean find = false;
|
||||
FpPrint *new_scan = NULL;
|
||||
FpPrint *matching = NULL;
|
||||
|
||||
if (error)
|
||||
{
|
||||
@@ -396,57 +431,34 @@ fp_verify_cb (FpiDeviceGoodixMoc *self,
|
||||
}
|
||||
if (resp->verify.match)
|
||||
{
|
||||
new_scan = fp_print_from_template (self, &resp->verify.template);
|
||||
|
||||
if (fpi_device_get_current_action (device) == FPI_DEVICE_ACTION_VERIFY)
|
||||
{
|
||||
templates = g_ptr_array_sized_new (1);
|
||||
fpi_device_get_verify_data (device, &print);
|
||||
g_ptr_array_add (templates, print);
|
||||
fpi_device_get_verify_data (device, &matching);
|
||||
if (!fp_print_equal (matching, new_scan))
|
||||
matching = NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
GPtrArray *templates = NULL;
|
||||
fpi_device_get_identify_data (device, &templates);
|
||||
g_ptr_array_ref (templates);
|
||||
}
|
||||
for (cnt = 0; cnt < templates->len; cnt++)
|
||||
|
||||
for (gint i = 0; i < templates->len; i++)
|
||||
{
|
||||
g_autoptr(GVariant) data = NULL;
|
||||
guint8 finger;
|
||||
const guint8 *user_id;
|
||||
gsize user_id_len = 0;
|
||||
const guint8 *tid;
|
||||
gsize tid_len = 0;
|
||||
print = g_ptr_array_index (templates, cnt);
|
||||
g_object_get (print, "fpi-data", &data, NULL);
|
||||
if (!parse_print_data (data, &finger, &tid, &tid_len, &user_id, &user_id_len))
|
||||
if (fp_print_equal (g_ptr_array_index (templates, i), new_scan))
|
||||
{
|
||||
fpi_ssm_mark_failed (self->task_ssm,
|
||||
fpi_device_error_new_msg (FP_DEVICE_ERROR_DATA_INVALID,
|
||||
"Parse print error"));
|
||||
return;
|
||||
}
|
||||
if (memcmp (&resp->verify.template.tid, tid, TEMPLATE_ID_SIZE) == 0)
|
||||
{
|
||||
find = true;
|
||||
matching = g_ptr_array_index (templates, i);
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
if (find)
|
||||
{
|
||||
if (fpi_device_get_current_action (device) == FPI_DEVICE_ACTION_VERIFY)
|
||||
fpi_device_verify_report (device, FPI_MATCH_SUCCESS, NULL, error);
|
||||
else
|
||||
fpi_device_identify_report (device, print, print, error);
|
||||
}
|
||||
}
|
||||
|
||||
if (!find)
|
||||
{
|
||||
if (fpi_device_get_current_action (device) == FPI_DEVICE_ACTION_VERIFY)
|
||||
fpi_device_verify_report (device, FPI_MATCH_FAIL, NULL, error);
|
||||
fpi_device_verify_report (device, matching ? FPI_MATCH_SUCCESS : FPI_MATCH_FAIL, new_scan, error);
|
||||
else
|
||||
fpi_device_identify_report (device, NULL, NULL, error);
|
||||
}
|
||||
fpi_device_identify_report (device, matching, new_scan, error);
|
||||
|
||||
fpi_ssm_next_state (self->task_ssm);
|
||||
|
||||
@@ -619,33 +631,11 @@ fp_enroll_enum_cb (FpiDeviceGoodixMoc *self,
|
||||
return;
|
||||
}
|
||||
|
||||
fpi_ssm_jump_to_state (self->task_ssm, FP_ENROLL_CAPTURE);
|
||||
}
|
||||
|
||||
static void
|
||||
fp_enroll_identify_cb (FpiDeviceGoodixMoc *self,
|
||||
gxfp_cmd_response_t *resp,
|
||||
GError *error)
|
||||
{
|
||||
if (error)
|
||||
{
|
||||
fpi_ssm_mark_failed (self->task_ssm, error);
|
||||
return;
|
||||
}
|
||||
if (resp->verify.match)
|
||||
{
|
||||
fpi_ssm_mark_failed (self->task_ssm,
|
||||
fpi_device_error_new_msg (FP_DEVICE_ERROR_DATA_DUPLICATE,
|
||||
"Finger is too similar to another, try use a different finger"));
|
||||
// maybe need fpi_device_enroll_report_message ...
|
||||
return;
|
||||
}
|
||||
fpi_ssm_next_state (self->task_ssm);
|
||||
|
||||
}
|
||||
|
||||
static void
|
||||
fp_enroll_init_cb (FpiDeviceGoodixMoc *self,
|
||||
fp_enroll_create_cb (FpiDeviceGoodixMoc *self,
|
||||
gxfp_cmd_response_t *resp,
|
||||
GError *error)
|
||||
{
|
||||
@@ -654,7 +644,7 @@ fp_enroll_init_cb (FpiDeviceGoodixMoc *self,
|
||||
fpi_ssm_mark_failed (self->task_ssm, error);
|
||||
return;
|
||||
}
|
||||
memcpy (self->template_id, resp->enroll_init.tid, TEMPLATE_ID_SIZE);
|
||||
memcpy (self->template_id, resp->enroll_create.tid, TEMPLATE_ID_SIZE);
|
||||
fpi_ssm_next_state (self->task_ssm);
|
||||
}
|
||||
|
||||
@@ -671,7 +661,7 @@ fp_enroll_capture_cb (FpiDeviceGoodixMoc *self,
|
||||
/* */
|
||||
if (resp->result >= GX_FAILED)
|
||||
{
|
||||
fp_warn ("Capture sample failed, result: 0x%x", resp->result);
|
||||
fp_info ("Capture sample failed, result: 0x%x", resp->result);
|
||||
fpi_device_enroll_progress (FP_DEVICE (self),
|
||||
self->enroll_stage,
|
||||
NULL,
|
||||
@@ -685,7 +675,7 @@ fp_enroll_capture_cb (FpiDeviceGoodixMoc *self,
|
||||
if ((resp->capture_data_resp.img_quality < self->sensorcfg->config[4]) ||
|
||||
(resp->capture_data_resp.img_coverage < self->sensorcfg->config[5]))
|
||||
{
|
||||
fp_warn ("Capture sample poor quality(%d): %d or coverage(%d): %d",
|
||||
fp_info ("Capture sample poor quality(%d): %d or coverage(%d): %d",
|
||||
self->sensorcfg->config[4],
|
||||
resp->capture_data_resp.img_quality,
|
||||
self->sensorcfg->config[5],
|
||||
@@ -697,11 +687,6 @@ fp_enroll_capture_cb (FpiDeviceGoodixMoc *self,
|
||||
fpi_ssm_jump_to_state (self->task_ssm, FP_ENROLL_CAPTURE);
|
||||
return;
|
||||
}
|
||||
if (self->is_enroll_identify)
|
||||
{
|
||||
self->is_enroll_identify = false;
|
||||
fpi_ssm_jump_to_state (self->task_ssm, FP_ENROLL_IDENTIFY);
|
||||
}
|
||||
else
|
||||
{
|
||||
fpi_ssm_next_state (self->task_ssm);
|
||||
@@ -764,9 +749,14 @@ fp_enroll_check_duplicate_cb (FpiDeviceGoodixMoc *self,
|
||||
}
|
||||
if (resp->check_duplicate_resp.duplicate)
|
||||
{
|
||||
g_autoptr(FpPrint) print = NULL;
|
||||
|
||||
print = g_object_ref_sink (fp_print_from_template (self, &resp->check_duplicate_resp.template));
|
||||
|
||||
fpi_ssm_mark_failed (self->task_ssm,
|
||||
fpi_device_error_new_msg (FP_DEVICE_ERROR_DATA_DUPLICATE,
|
||||
"Finger has already enrolled"));
|
||||
"Finger was already enrolled as '%s'",
|
||||
fp_print_get_description (print)));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -847,16 +837,6 @@ fp_enroll_sm_run_state (FpiSsm *ssm, FpDevice *device)
|
||||
|
||||
switch (fpi_ssm_get_cur_state (ssm))
|
||||
{
|
||||
case FP_ENROLL_ENUM:
|
||||
{
|
||||
goodix_sensor_cmd (self, MOC_CMD0_GETFINGERLIST, MOC_CMD1_DEFAULT,
|
||||
false,
|
||||
(const guint8 *) &dummy,
|
||||
1,
|
||||
fp_enroll_enum_cb);
|
||||
}
|
||||
break;
|
||||
|
||||
case FP_ENROLL_PWR_BTN_SHIELD_ON:
|
||||
{
|
||||
goodix_sensor_cmd (self, MOC_CMD0_PWR_BTN_SHIELD, MOC_CMD1_PWR_BTN_SHIELD_ON,
|
||||
@@ -867,16 +847,13 @@ fp_enroll_sm_run_state (FpiSsm *ssm, FpDevice *device)
|
||||
}
|
||||
break;
|
||||
|
||||
case FP_ENROLL_IDENTIFY:
|
||||
case FP_ENROLL_ENUM:
|
||||
{
|
||||
dummy[0] = 0x01;
|
||||
dummy[1] = self->sensorcfg->config[10];
|
||||
dummy[2] = self->sensorcfg->config[11];
|
||||
goodix_sensor_cmd (self, MOC_CMD0_IDENTIFY, MOC_CMD1_DEFAULT,
|
||||
goodix_sensor_cmd (self, MOC_CMD0_GETFINGERLIST, MOC_CMD1_DEFAULT,
|
||||
false,
|
||||
(const guint8 *) &self->template_id,
|
||||
TEMPLATE_ID_SIZE,
|
||||
fp_enroll_identify_cb);
|
||||
(const guint8 *) &dummy,
|
||||
1,
|
||||
fp_enroll_enum_cb);
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -886,7 +863,7 @@ fp_enroll_sm_run_state (FpiSsm *ssm, FpDevice *device)
|
||||
false,
|
||||
(const guint8 *) &dummy,
|
||||
1,
|
||||
fp_enroll_init_cb);
|
||||
fp_enroll_create_cb);
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -1064,6 +1041,47 @@ fp_init_config_cb (FpiDeviceGoodixMoc *self,
|
||||
fpi_ssm_next_state (self->task_ssm);
|
||||
}
|
||||
|
||||
static void
|
||||
fp_init_cb_reset_or_complete (FpiDeviceGoodixMoc *self,
|
||||
gxfp_cmd_response_t *resp,
|
||||
GError *error)
|
||||
{
|
||||
if (error)
|
||||
{
|
||||
fp_warn ("Template storage appears to have been corrupted! Error was: %s", error->message);
|
||||
fp_warn ("A known reason for this to happen is a firmware bug triggered by another storage area being initialized.");
|
||||
fpi_ssm_jump_to_state (self->task_ssm, FP_INIT_RESET_DEVICE);
|
||||
}
|
||||
else
|
||||
{
|
||||
fpi_ssm_mark_completed (self->task_ssm);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
fp_init_reset_device_cb (FpiDeviceGoodixMoc *self,
|
||||
gxfp_cmd_response_t *resp,
|
||||
GError *error)
|
||||
{
|
||||
if (error)
|
||||
{
|
||||
fp_warn ("Reset failed: %s", error->message);
|
||||
fpi_ssm_mark_failed (self->task_ssm, error);
|
||||
return;
|
||||
}
|
||||
if ((resp->result >= GX_FAILED) && (resp->result != GX_ERROR_FINGER_ID_NOEXIST))
|
||||
{
|
||||
fp_warn ("Reset failed, device reported: 0x%x", resp->result);
|
||||
fpi_ssm_mark_failed (self->task_ssm,
|
||||
fpi_device_error_new_msg (FP_DEVICE_ERROR_GENERAL,
|
||||
"Failed clear storage, result: 0x%x",
|
||||
resp->result));
|
||||
return;
|
||||
}
|
||||
|
||||
fp_warn ("Reset completed");
|
||||
fpi_ssm_mark_completed (self->task_ssm);
|
||||
}
|
||||
|
||||
static void
|
||||
fp_init_sm_run_state (FpiSsm *ssm, FpDevice *device)
|
||||
@@ -1088,6 +1106,30 @@ fp_init_sm_run_state (FpiSsm *ssm, FpDevice *device)
|
||||
sizeof (gxfp_sensor_cfg_t),
|
||||
fp_init_config_cb);
|
||||
break;
|
||||
|
||||
case FP_INIT_TEMPLATE_LIST:
|
||||
/* List prints to check whether the template DB was corrupted.
|
||||
* As of 2022-06-13 there is a known firmware issue that can cause the
|
||||
* stored templates for Linux to be corrupted when the Windows storage
|
||||
* area is initialized.
|
||||
* In that case, we'll get a protocol failure trying to retrieve the
|
||||
* list of prints.
|
||||
*/
|
||||
goodix_sensor_cmd (self, MOC_CMD0_GETFINGERLIST, MOC_CMD1_DEFAULT,
|
||||
FALSE,
|
||||
(const guint8 *) &dummy,
|
||||
1,
|
||||
fp_init_cb_reset_or_complete);
|
||||
break;
|
||||
|
||||
case FP_INIT_RESET_DEVICE:
|
||||
fp_warn ("Resetting device storage, you will need to enroll all prints again!");
|
||||
goodix_sensor_cmd (self, MOC_CMD0_DELETETEMPLATE, MOC_CMD1_DELETE_ALL,
|
||||
FALSE,
|
||||
NULL,
|
||||
0,
|
||||
fp_init_reset_device_cb);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@@ -1183,6 +1225,32 @@ fp_template_delete_cb (FpiDeviceGoodixMoc *self,
|
||||
fp_info ("Successfully deleted enrolled user");
|
||||
fpi_device_delete_complete (device, NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
fp_template_delete_all_cb (FpiDeviceGoodixMoc *self,
|
||||
gxfp_cmd_response_t *resp,
|
||||
GError *error)
|
||||
{
|
||||
FpDevice *device = FP_DEVICE (self);
|
||||
|
||||
if (error)
|
||||
{
|
||||
fpi_device_clear_storage_complete (device, error);
|
||||
return;
|
||||
}
|
||||
if ((resp->result >= GX_FAILED) && (resp->result != GX_ERROR_FINGER_ID_NOEXIST))
|
||||
{
|
||||
fpi_device_clear_storage_complete (FP_DEVICE (self),
|
||||
fpi_device_error_new_msg (FP_DEVICE_ERROR_GENERAL,
|
||||
"Failed clear storage, result: 0x%x",
|
||||
resp->result));
|
||||
return;
|
||||
}
|
||||
|
||||
fp_info ("Successfully cleared storage");
|
||||
fpi_device_clear_storage_complete (device, NULL);
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
* fp_template_list Function
|
||||
@@ -1224,36 +1292,10 @@ fp_template_list_cb (FpiDeviceGoodixMoc *self,
|
||||
|
||||
for (int n = 0; n < resp->finger_list_resp.finger_num; n++)
|
||||
{
|
||||
GVariant *data = NULL;
|
||||
GVariant *tid = NULL;
|
||||
GVariant *uid = NULL;
|
||||
FpPrint *print;
|
||||
gchar *userid;
|
||||
|
||||
userid = (gchar *) resp->finger_list_resp.finger_list[n].payload.data;
|
||||
print = fp_print_from_template (self, &resp->finger_list_resp.finger_list[n]);
|
||||
|
||||
print = fp_print_new (FP_DEVICE (self));
|
||||
|
||||
tid = g_variant_new_fixed_array (G_VARIANT_TYPE_BYTE,
|
||||
resp->finger_list_resp.finger_list[n].tid,
|
||||
TEMPLATE_ID_SIZE,
|
||||
1);
|
||||
|
||||
uid = g_variant_new_fixed_array (G_VARIANT_TYPE_BYTE,
|
||||
resp->finger_list_resp.finger_list[n].payload.data,
|
||||
resp->finger_list_resp.finger_list[n].payload.size,
|
||||
1);
|
||||
|
||||
data = g_variant_new ("(y@ay@ay)",
|
||||
resp->finger_list_resp.finger_list[n].finger_index,
|
||||
tid,
|
||||
uid);
|
||||
|
||||
fpi_print_set_type (print, FPI_PRINT_RAW);
|
||||
fpi_print_set_device_stored (print, TRUE);
|
||||
g_object_set (print, "fpi-data", data, NULL);
|
||||
g_object_set (print, "description", userid, NULL);
|
||||
fpi_print_fill_from_user_id (print, userid);
|
||||
g_ptr_array_add (self->list_result, g_object_ref_sink (print));
|
||||
}
|
||||
|
||||
@@ -1317,10 +1359,24 @@ gx_fp_probe (FpDevice *device)
|
||||
{
|
||||
case 0x6496:
|
||||
case 0x60A2:
|
||||
case 0x60A4:
|
||||
case 0x6014:
|
||||
case 0x6092:
|
||||
case 0x6094:
|
||||
case 0x609C:
|
||||
case 0x60BC:
|
||||
case 0x6304:
|
||||
case 0x631C:
|
||||
case 0x633C:
|
||||
case 0x634C:
|
||||
case 0x6384:
|
||||
case 0x639C:
|
||||
case 0x63AC:
|
||||
case 0x63BC:
|
||||
case 0x63CC:
|
||||
case 0x6582:
|
||||
case 0x6A94:
|
||||
case 0x659A:
|
||||
self->max_enroll_stage = 12;
|
||||
break;
|
||||
|
||||
@@ -1459,7 +1515,6 @@ gx_fp_enroll (FpDevice *device)
|
||||
FpiDeviceGoodixMoc *self = FPI_DEVICE_GOODIXMOC (device);
|
||||
|
||||
self->enroll_stage = 0;
|
||||
self->is_enroll_identify = true;
|
||||
|
||||
self->task_ssm = fpi_ssm_new_full (device, fp_enroll_sm_run_state,
|
||||
FP_ENROLL_NUM_STATES,
|
||||
@@ -1531,6 +1586,19 @@ gx_fp_template_delete (FpDevice *device)
|
||||
|
||||
}
|
||||
|
||||
static void
|
||||
gx_fp_template_delete_all (FpDevice *device)
|
||||
{
|
||||
FpiDeviceGoodixMoc *self = FPI_DEVICE_GOODIXMOC (device);
|
||||
|
||||
goodix_sensor_cmd (self, MOC_CMD0_DELETETEMPLATE, MOC_CMD1_DELETE_ALL,
|
||||
false,
|
||||
NULL,
|
||||
0,
|
||||
fp_template_delete_all_cb);
|
||||
|
||||
}
|
||||
|
||||
static void
|
||||
fpi_device_goodixmoc_init (FpiDeviceGoodixMoc *self)
|
||||
{
|
||||
@@ -1539,15 +1607,29 @@ fpi_device_goodixmoc_init (FpiDeviceGoodixMoc *self)
|
||||
|
||||
static const FpIdEntry id_table[] = {
|
||||
{ .vid = 0x27c6, .pid = 0x5840, },
|
||||
{ .vid = 0x27c6, .pid = 0x6014, },
|
||||
{ .vid = 0x27c6, .pid = 0x6092, },
|
||||
{ .vid = 0x27c6, .pid = 0x6094, },
|
||||
{ .vid = 0x27c6, .pid = 0x609C, },
|
||||
{ .vid = 0x27c6, .pid = 0x60A2, },
|
||||
{ .vid = 0x27c6, .pid = 0x60A4, },
|
||||
{ .vid = 0x27c6, .pid = 0x60BC, },
|
||||
{ .vid = 0x27c6, .pid = 0x6304, },
|
||||
{ .vid = 0x27c6, .pid = 0x631C, },
|
||||
{ .vid = 0x27c6, .pid = 0x633C, },
|
||||
{ .vid = 0x27c6, .pid = 0x634C, },
|
||||
{ .vid = 0x27c6, .pid = 0x6384, },
|
||||
{ .vid = 0x27c6, .pid = 0x639C, },
|
||||
{ .vid = 0x27c6, .pid = 0x63AC, },
|
||||
{ .vid = 0x27c6, .pid = 0x63BC, },
|
||||
{ .vid = 0x27c6, .pid = 0x63CC, },
|
||||
{ .vid = 0x27c6, .pid = 0x6496, },
|
||||
{ .vid = 0x27c6, .pid = 0x6582, },
|
||||
{ .vid = 0x27c6, .pid = 0x6584, },
|
||||
{ .vid = 0x27c6, .pid = 0x658C, },
|
||||
{ .vid = 0x27c6, .pid = 0x6592, },
|
||||
{ .vid = 0x27c6, .pid = 0x6594, },
|
||||
{ .vid = 0x27c6, .pid = 0x659A, },
|
||||
{ .vid = 0x27c6, .pid = 0x659C, },
|
||||
{ .vid = 0x27c6, .pid = 0x6A94, },
|
||||
{ .vid = 0, .pid = 0, .driver_data = 0 }, /* terminating entry */
|
||||
@@ -1565,12 +1647,14 @@ fpi_device_goodixmoc_class_init (FpiDeviceGoodixMocClass *klass)
|
||||
dev_class->scan_type = FP_SCAN_TYPE_PRESS;
|
||||
dev_class->id_table = id_table;
|
||||
dev_class->nr_enroll_stages = DEFAULT_ENROLL_SAMPLES;
|
||||
dev_class->temp_hot_seconds = -1;
|
||||
|
||||
dev_class->open = gx_fp_init;
|
||||
dev_class->close = gx_fp_exit;
|
||||
dev_class->probe = gx_fp_probe;
|
||||
dev_class->enroll = gx_fp_enroll;
|
||||
dev_class->delete = gx_fp_template_delete;
|
||||
dev_class->clear_storage = gx_fp_template_delete_all;
|
||||
dev_class->list = gx_fp_template_list;
|
||||
dev_class->verify = gx_fp_verify_identify;
|
||||
dev_class->identify = gx_fp_verify_identify;
|
||||
|
||||
@@ -35,6 +35,8 @@ typedef enum {
|
||||
typedef enum {
|
||||
FP_INIT_VERSION = 0,
|
||||
FP_INIT_CONFIG,
|
||||
FP_INIT_TEMPLATE_LIST,
|
||||
FP_INIT_RESET_DEVICE,
|
||||
FP_INIT_NUM_STATES,
|
||||
} FpInitState;
|
||||
|
||||
@@ -42,7 +44,6 @@ typedef enum {
|
||||
typedef enum {
|
||||
FP_ENROLL_PWR_BTN_SHIELD_ON = 0,
|
||||
FP_ENROLL_ENUM,
|
||||
FP_ENROLL_IDENTIFY,
|
||||
FP_ENROLL_CREATE,
|
||||
FP_ENROLL_CAPTURE,
|
||||
FP_ENROLL_UPDATE,
|
||||
|
||||
@@ -259,12 +259,9 @@ gx_proto_parse_fingerid (
|
||||
|
||||
if (buffer[Offset++] != 67)
|
||||
return -1;
|
||||
fid_buffer_size--;
|
||||
|
||||
template->type = buffer[Offset++];
|
||||
fid_buffer_size--;
|
||||
template->finger_index = buffer[Offset++];
|
||||
fid_buffer_size--;
|
||||
Offset++;
|
||||
memcpy (template->accountid, &buffer[Offset], sizeof (template->accountid));
|
||||
Offset += sizeof (template->accountid);
|
||||
@@ -273,6 +270,8 @@ gx_proto_parse_fingerid (
|
||||
template->payload.size = buffer[Offset++];
|
||||
if (template->payload.size > sizeof (template->payload.data))
|
||||
return -1;
|
||||
if (template->payload.size + Offset > fid_buffer_size)
|
||||
return -1;
|
||||
memset (template->payload.data, 0, template->payload.size);
|
||||
memcpy (template->payload.data, &buffer[Offset], template->payload.size);
|
||||
|
||||
@@ -344,10 +343,10 @@ gx_proto_parse_body (uint16_t cmd, uint8_t *buffer, uint16_t buffer_len, pgxfp_c
|
||||
break;
|
||||
|
||||
case MOC_CMD0_ENROLL_INIT:
|
||||
if (buffer_len < sizeof (gxfp_enroll_init_t) + 1)
|
||||
if (buffer_len < sizeof (gxfp_enroll_create_t) + 1)
|
||||
return -1;
|
||||
if (presp->result == GX_SUCCESS)
|
||||
memcpy (&presp->enroll_init.tid, &buffer[1], TEMPLATE_ID_SIZE);
|
||||
memcpy (&presp->enroll_create.tid, &buffer[1], TEMPLATE_ID_SIZE);
|
||||
break;
|
||||
|
||||
case MOC_CMD0_ENROLL:
|
||||
@@ -365,9 +364,12 @@ gx_proto_parse_body (uint16_t cmd, uint8_t *buffer, uint16_t buffer_len, pgxfp_c
|
||||
if (buffer_len < 3)
|
||||
return -1;
|
||||
uint16_t tid_size = GUINT16_FROM_LE (*(uint16_t *) (buffer + 1));
|
||||
if ((buffer_len < tid_size + 3) || (buffer_len > sizeof (template_format_t)) + 3)
|
||||
offset += 3;
|
||||
|
||||
if (buffer_len < tid_size + offset)
|
||||
return -1;
|
||||
if (gx_proto_parse_fingerid (buffer + offset, tid_size, &presp->check_duplicate_resp.template) != 0)
|
||||
return -1;
|
||||
memcpy (&presp->check_duplicate_resp.template, buffer + 3, tid_size);
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -380,18 +382,19 @@ gx_proto_parse_body (uint16_t cmd, uint8_t *buffer, uint16_t buffer_len, pgxfp_c
|
||||
fingerlist = buffer + 2;
|
||||
for(uint8_t num = 0; num < presp->finger_list_resp.finger_num; num++)
|
||||
{
|
||||
uint16_t fingerid_length = GUINT16_FROM_LE (*(uint16_t *) (fingerlist + offset));
|
||||
uint16_t fingerid_length;
|
||||
if (buffer_len < offset + 2)
|
||||
return -1;
|
||||
fingerid_length = GUINT16_FROM_LE (*(uint16_t *) (fingerlist + offset));
|
||||
offset += 2;
|
||||
if (buffer_len < fingerid_length + offset + 2)
|
||||
if (buffer_len < fingerid_length + offset)
|
||||
return -1;
|
||||
if (gx_proto_parse_fingerid (fingerlist + offset,
|
||||
fingerid_length,
|
||||
&presp->finger_list_resp.finger_list[num]) != 0)
|
||||
{
|
||||
g_error ("parse fingerlist error");
|
||||
presp->finger_list_resp.finger_num = 0;
|
||||
presp->result = GX_FAILED;
|
||||
break;
|
||||
g_warning ("Failed to parse finger list");
|
||||
return -1;
|
||||
}
|
||||
offset += fingerid_length;
|
||||
}
|
||||
@@ -405,7 +408,7 @@ gx_proto_parse_body (uint16_t cmd, uint8_t *buffer, uint16_t buffer_len, pgxfp_c
|
||||
presp->verify.match = (buffer[0] == 0) ? true : false;
|
||||
if (presp->verify.match)
|
||||
{
|
||||
if (buffer_len < sizeof (template_format_t) + 10)
|
||||
if (buffer_len < 10)
|
||||
return -1;
|
||||
offset += 1;
|
||||
presp->verify.rejectdetail = GUINT16_FROM_LE (*(uint16_t *) (buffer + offset));
|
||||
@@ -416,6 +419,8 @@ gx_proto_parse_body (uint16_t cmd, uint8_t *buffer, uint16_t buffer_len, pgxfp_c
|
||||
offset += 1;
|
||||
fingerid_size = GUINT16_FROM_LE (*(uint16_t *) (buffer + offset));
|
||||
offset += 2;
|
||||
if (buffer_len < fingerid_size + offset)
|
||||
return -1;
|
||||
if (gx_proto_parse_fingerid (buffer + offset, fingerid_size, &presp->verify.template) != 0)
|
||||
{
|
||||
presp->result = GX_FAILED;
|
||||
|
||||
@@ -105,21 +105,23 @@ typedef struct _gxfp_parse_msg
|
||||
} gxfp_parse_msg_t, *pgxfp_parse_msg_t;
|
||||
|
||||
|
||||
typedef struct _gxfp_enroll_init
|
||||
typedef struct _gxfp_enroll_create
|
||||
{
|
||||
uint8_t tid[TEMPLATE_ID_SIZE];
|
||||
} gxfp_enroll_init_t, *pgxfp_enroll_init_t;
|
||||
} gxfp_enroll_create_t, *pgxfp_enroll_create_t;
|
||||
|
||||
#pragma pack(push, 1)
|
||||
typedef struct _template_format
|
||||
{
|
||||
uint8_t _0x43_byte;
|
||||
uint8_t type;
|
||||
uint8_t finger_index;
|
||||
uint8_t pad0;
|
||||
uint8_t accountid[32];
|
||||
uint8_t tid[32];
|
||||
struct
|
||||
{
|
||||
uint32_t size;
|
||||
uint8_t size;
|
||||
uint8_t data[56];
|
||||
} payload;
|
||||
uint8_t reserve[2];
|
||||
@@ -190,7 +192,7 @@ typedef struct _fp_cmd_response
|
||||
{
|
||||
gxfp_parse_msg_t parse_msg;
|
||||
gxfp_verify_t verify;
|
||||
gxfp_enroll_init_t enroll_init;
|
||||
gxfp_enroll_create_t enroll_create;
|
||||
gxfp_capturedata_t capture_data_resp;
|
||||
gxfp_check_duplicate_t check_duplicate_resp;
|
||||
gxfp_enroll_commit_t enroll_commit;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,220 @@
|
||||
/*
|
||||
* Copyright (C) 2022-2023 Realtek Corp.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "fpi-device.h"
|
||||
#include "fpi-ssm.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#define EP_IN (2 | FPI_USB_ENDPOINT_IN)
|
||||
#define EP_OUT (1 | FPI_USB_ENDPOINT_OUT)
|
||||
|
||||
#define EP_IN_MAX_BUF_SIZE 2048
|
||||
|
||||
#define FP_RTK_CMD_TOTAL_LEN 12
|
||||
#define FP_RTK_CMD_LEN 2
|
||||
#define FP_RTK_CMD_PARAM_LEN 4
|
||||
#define FP_RTK_CMD_ADDR_LEN 4
|
||||
#define FP_RTK_CMD_DATA_LEN 2
|
||||
|
||||
#define TEMPLATE_LEN 35
|
||||
#define SUBFACTOR_OFFSET 2
|
||||
#define UID_OFFSET 3
|
||||
#define UID_PAYLOAD_LEN 32
|
||||
|
||||
/* Command transfer timeout :ms*/
|
||||
#define CMD_TIMEOUT 1000
|
||||
#define DATA_TIMEOUT 5000
|
||||
#define STATUS_TIMEOUT 2000
|
||||
|
||||
#define MAX_ENROLL_SAMPLES 8
|
||||
#define DEFAULT_UID_LEN 28
|
||||
#define SUB_FINGER_01 0xFF
|
||||
|
||||
#define GET_CMD_TYPE(val) ((val & 0xC0) >> 6)
|
||||
#define GET_TRANS_DATA_LEN(len_h, len_l) ((len_h << 8) | len_l)
|
||||
#define GET_LEN_L(total_data_len) ((total_data_len) & 0xff)
|
||||
#define GET_LEN_H(total_data_len) ((total_data_len) >> 8)
|
||||
|
||||
G_DECLARE_FINAL_TYPE (FpiDeviceRealtek, fpi_device_realtek, FPI, DEVICE_REALTEK, FpDevice)
|
||||
|
||||
typedef void (*SynCmdMsgCallback) (FpiDeviceRealtek *self,
|
||||
uint8_t *buffer_in,
|
||||
GError *error);
|
||||
|
||||
typedef struct
|
||||
{
|
||||
SynCmdMsgCallback callback;
|
||||
} CommandData;
|
||||
|
||||
typedef enum {
|
||||
FP_RTK_CMD_ONLY = 0,
|
||||
FP_RTK_CMD_READ,
|
||||
FP_RTK_CMD_WRITE,
|
||||
} FpRtkCmdType;
|
||||
|
||||
typedef enum {
|
||||
FP_RTK_MSG_PLAINTEXT = 0,
|
||||
FP_RTK_MSG_PLAINTEXT_NO_STATUS,
|
||||
} FpRtkMsgType;
|
||||
|
||||
typedef enum {
|
||||
FP_RTK_PURPOSE_IDENTIFY = 0x01, /* identify before enroll */
|
||||
FP_RTK_PURPOSE_VERIFY = 0x02,
|
||||
FP_RTK_PURPOSE_ENROLL = 0x04,
|
||||
} FpRtkPurpose;
|
||||
|
||||
typedef enum {
|
||||
FP_RTK_SUCCESS = 0x0,
|
||||
FP_RTK_TOO_HIGH,
|
||||
FP_RTK_TOO_LOW,
|
||||
FP_RTK_TOO_LEFT,
|
||||
FP_RTK_TOO_RIGHT,
|
||||
FP_RTK_TOO_FAST,
|
||||
FP_RTK_TOO_SLOW,
|
||||
FP_RTK_POOR_QUALITY,
|
||||
FP_RTK_TOO_SKEWED,
|
||||
FP_RTK_TOO_SHORT,
|
||||
FP_RTK_MERGE_FAILURE,
|
||||
FP_RTK_MATCH_FAIL,
|
||||
FP_RTK_CMD_ERR,
|
||||
} FpRtkInStatus;
|
||||
|
||||
typedef enum {
|
||||
FP_RTK_ENROLL_GET_TEMPLATE = 0,
|
||||
FP_RTK_ENROLL_BEGIN_POS,
|
||||
FP_RTK_ENROLL_CAPTURE,
|
||||
FP_RTK_ENROLL_FINISH_CAPTURE,
|
||||
FP_RTK_ENROLL_ACCEPT_SAMPLE,
|
||||
FP_RTK_ENROLL_CHECK_DUPLICATE,
|
||||
FP_RTK_ENROLL_COMMIT,
|
||||
FP_RTK_ENROLL_NUM_STATES,
|
||||
} FpRtkEnrollState;
|
||||
|
||||
typedef enum {
|
||||
FP_RTK_VERIFY_CAPTURE = 0,
|
||||
FP_RTK_VERIFY_FINISH_CAPTURE,
|
||||
FP_RTK_VERIFY_ACCEPT_SAMPLE,
|
||||
FP_RTK_VERIFY_INDENTIFY_FEATURE,
|
||||
FP_RTK_VERIFY_UPDATE_TEMPLATE,
|
||||
FP_RTK_VERIFY_NUM_STATES,
|
||||
} FpRtkVerifyState;
|
||||
|
||||
typedef enum {
|
||||
FP_RTK_DELETE_GET_POS = 0,
|
||||
FP_RTK_DELETE_PRINT,
|
||||
FP_RTK_DELETE_NUM_STATES,
|
||||
} FpRtkDeleteState;
|
||||
|
||||
typedef enum {
|
||||
FP_RTK_INIT_SELECT_OS = 0,
|
||||
FP_RTK_INIT_GET_ENROLL_NUM,
|
||||
FP_RTK_INIT_NUM_STATES,
|
||||
} FpRtkInitState;
|
||||
|
||||
typedef enum {
|
||||
FP_RTK_CMD_SEND = 0,
|
||||
FP_RTK_CMD_TRANS_DATA,
|
||||
FP_RTK_CMD_GET_STATUS,
|
||||
FP_RTK_CMD_NUM_STATES,
|
||||
} FpRtkCmdState;
|
||||
|
||||
struct _FpiDeviceRealtek
|
||||
{
|
||||
FpDevice parent;
|
||||
FpiSsm *task_ssm;
|
||||
FpiSsm *cmd_ssm;
|
||||
FpiUsbTransfer *cmd_transfer;
|
||||
FpiUsbTransfer *data_transfer;
|
||||
gint cmd_type;
|
||||
FpRtkMsgType message_type;
|
||||
gboolean cmd_cancellable;
|
||||
gint enroll_stage;
|
||||
gint max_enroll_stage;
|
||||
guchar *read_data;
|
||||
gsize trans_data_len;
|
||||
FpRtkPurpose fp_purpose;
|
||||
gint pos_index;
|
||||
gint template_num;
|
||||
};
|
||||
|
||||
struct realtek_fp_cmd
|
||||
{
|
||||
uint8_t cmd[FP_RTK_CMD_LEN];
|
||||
uint8_t param[FP_RTK_CMD_PARAM_LEN];
|
||||
uint8_t addr[FP_RTK_CMD_ADDR_LEN];
|
||||
uint8_t data_len[FP_RTK_CMD_DATA_LEN];
|
||||
};
|
||||
|
||||
static struct realtek_fp_cmd co_start_capture = {
|
||||
.cmd = {0x05, 0x05},
|
||||
};
|
||||
|
||||
static struct realtek_fp_cmd co_finish_capture = {
|
||||
.cmd = {0x45, 0x06},
|
||||
.data_len = {0x05},
|
||||
};
|
||||
|
||||
static struct realtek_fp_cmd co_accept_sample = {
|
||||
.cmd = {0x45, 0x08},
|
||||
.data_len = {0x09},
|
||||
};
|
||||
|
||||
static struct realtek_fp_cmd tls_identify_feature = {
|
||||
.cmd = {0x45, 0x22},
|
||||
.data_len = {0x2A},
|
||||
};
|
||||
|
||||
static struct realtek_fp_cmd co_get_enroll_num = {
|
||||
.cmd = {0x45, 0x0d},
|
||||
.data_len = {0x02},
|
||||
};
|
||||
|
||||
static struct realtek_fp_cmd co_get_template = {
|
||||
.cmd = {0x45, 0x0E},
|
||||
};
|
||||
|
||||
static struct realtek_fp_cmd tls_enroll_begin = {
|
||||
.cmd = {0x05, 0x20},
|
||||
};
|
||||
|
||||
static struct realtek_fp_cmd co_check_duplicate = {
|
||||
.cmd = {0x45, 0x10},
|
||||
.data_len = {0x22},
|
||||
};
|
||||
|
||||
static struct realtek_fp_cmd tls_enroll_commit = {
|
||||
.cmd = {0x85, 0x21},
|
||||
.data_len = {0x20},
|
||||
};
|
||||
|
||||
static struct realtek_fp_cmd co_update_template = {
|
||||
.cmd = {0x05, 0x11},
|
||||
};
|
||||
|
||||
static struct realtek_fp_cmd co_delete_record = {
|
||||
.cmd = {0x05, 0x0F},
|
||||
};
|
||||
|
||||
static struct realtek_fp_cmd co_select_system = {
|
||||
.cmd = {0x05, 0x13},
|
||||
};
|
||||
@@ -36,10 +36,18 @@ static const FpIdEntry id_table[] = {
|
||||
{ .vid = SYNAPTICS_VENDOR_ID, .pid = 0x00F9, },
|
||||
{ .vid = SYNAPTICS_VENDOR_ID, .pid = 0x00FC, },
|
||||
{ .vid = SYNAPTICS_VENDOR_ID, .pid = 0x00C2, },
|
||||
{ .vid = SYNAPTICS_VENDOR_ID, .pid = 0x00C9, },
|
||||
{ .vid = SYNAPTICS_VENDOR_ID, .pid = 0x0100, },
|
||||
{ .vid = SYNAPTICS_VENDOR_ID, .pid = 0x00F0, },
|
||||
{ .vid = SYNAPTICS_VENDOR_ID, .pid = 0x0103, },
|
||||
{ .vid = SYNAPTICS_VENDOR_ID, .pid = 0x0123, },
|
||||
{ .vid = SYNAPTICS_VENDOR_ID, .pid = 0x0124, },
|
||||
{ .vid = SYNAPTICS_VENDOR_ID, .pid = 0x0126, },
|
||||
{ .vid = SYNAPTICS_VENDOR_ID, .pid = 0x0129, },
|
||||
{ .vid = SYNAPTICS_VENDOR_ID, .pid = 0x0168, },
|
||||
{ .vid = SYNAPTICS_VENDOR_ID, .pid = 0x015F, },
|
||||
{ .vid = SYNAPTICS_VENDOR_ID, .pid = 0x0104, },
|
||||
{ .vid = SYNAPTICS_VENDOR_ID, .pid = 0x0173, },
|
||||
{ .vid = SYNAPTICS_VENDOR_ID, .pid = 0x0106, },
|
||||
{ .vid = 0, .pid = 0, .driver_data = 0 }, /* terminating entry */
|
||||
};
|
||||
|
||||
@@ -101,6 +109,10 @@ cmd_receive_cb (FpiUsbTransfer *transfer,
|
||||
|
||||
if (self->cmd_complete_on_removal)
|
||||
{
|
||||
if (self->delay_error)
|
||||
fpi_ssm_mark_failed (transfer->ssm,
|
||||
g_steal_pointer (&self->delay_error));
|
||||
else
|
||||
fpi_ssm_mark_completed (transfer->ssm);
|
||||
return;
|
||||
}
|
||||
@@ -198,11 +210,16 @@ cmd_interrupt_cb (FpiUsbTransfer *transfer,
|
||||
GError *error)
|
||||
{
|
||||
g_debug ("interrupt transfer done");
|
||||
fpi_device_critical_enter (device);
|
||||
|
||||
if (error)
|
||||
{
|
||||
if (g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED))
|
||||
{
|
||||
g_error_free (error);
|
||||
if (FPI_DEVICE_SYNAPTICS (device)->cmd_suspended)
|
||||
fpi_ssm_jump_to_state (transfer->ssm, SYNAPTICS_CMD_SUSPENDED);
|
||||
else
|
||||
fpi_ssm_jump_to_state (transfer->ssm, SYNAPTICS_CMD_GET_RESP);
|
||||
return;
|
||||
}
|
||||
@@ -217,6 +234,7 @@ cmd_interrupt_cb (FpiUsbTransfer *transfer,
|
||||
}
|
||||
else
|
||||
{
|
||||
fpi_device_critical_leave (device);
|
||||
fpi_usb_transfer_submit (fpi_usb_transfer_ref (transfer),
|
||||
0,
|
||||
NULL,
|
||||
@@ -264,6 +282,9 @@ synaptics_cmd_run_state (FpiSsm *ssm,
|
||||
break;
|
||||
|
||||
case SYNAPTICS_CMD_WAIT_INTERRUPT:
|
||||
/* Interruptions are permitted only during an interrupt transfer */
|
||||
fpi_device_critical_leave (dev);
|
||||
|
||||
transfer = fpi_usb_transfer_new (dev);
|
||||
transfer->ssm = ssm;
|
||||
fpi_usb_transfer_fill_interrupt (transfer, USB_EP_INTERRUPT, USB_INTERRUPT_DATA_SIZE);
|
||||
@@ -291,6 +312,17 @@ synaptics_cmd_run_state (FpiSsm *ssm,
|
||||
case SYNAPTICS_CMD_RESTART:
|
||||
fpi_ssm_jump_to_state (ssm, SYNAPTICS_CMD_SEND_PENDING);
|
||||
break;
|
||||
|
||||
case SYNAPTICS_CMD_SUSPENDED:
|
||||
/* The resume handler continues to the next state! */
|
||||
fpi_device_critical_leave (dev);
|
||||
fpi_device_suspend_complete (dev, NULL);
|
||||
break;
|
||||
|
||||
case SYNAPTICS_CMD_RESUME:
|
||||
fpi_device_critical_enter (dev);
|
||||
fpi_ssm_jump_to_state (ssm, SYNAPTICS_CMD_WAIT_INTERRUPT);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -306,6 +338,7 @@ cmd_ssm_done (FpiSsm *ssm, FpDevice *dev, GError *error)
|
||||
if (error || self->cmd_complete_on_removal)
|
||||
callback (self, NULL, error);
|
||||
|
||||
fpi_device_critical_leave (dev);
|
||||
self->cmd_complete_on_removal = FALSE;
|
||||
}
|
||||
|
||||
@@ -415,6 +448,7 @@ synaptics_sensor_cmd (FpiDeviceSynaptics *self,
|
||||
SYNAPTICS_CMD_NUM_STATES);
|
||||
fpi_ssm_set_data (self->cmd_ssm, callback, NULL);
|
||||
|
||||
fpi_device_critical_enter (FP_DEVICE (self));
|
||||
fpi_ssm_start (self->cmd_ssm, cmd_ssm_done);
|
||||
}
|
||||
}
|
||||
@@ -510,6 +544,12 @@ verify_msg_cb (FpiDeviceSynaptics *self,
|
||||
FpDevice *device = FP_DEVICE (self);
|
||||
bmkt_verify_resp_t *verify_resp;
|
||||
|
||||
if (self->action_starting)
|
||||
{
|
||||
fpi_device_critical_leave (device);
|
||||
self->action_starting = FALSE;
|
||||
}
|
||||
|
||||
if (error)
|
||||
{
|
||||
fpi_device_verify_complete (device, error);
|
||||
@@ -602,22 +642,27 @@ verify (FpDevice *device)
|
||||
|
||||
G_DEBUG_HERE ();
|
||||
|
||||
self->action_starting = TRUE;
|
||||
fpi_device_critical_enter (device);
|
||||
synaptics_sensor_cmd (self, 0, BMKT_CMD_VERIFY_USER, user_id, user_id_len, verify_msg_cb);
|
||||
}
|
||||
|
||||
static void
|
||||
identify_complete_after_finger_removal (FpiDeviceSynaptics *self)
|
||||
identify_complete_after_finger_removal (FpiDeviceSynaptics *self, GError *error)
|
||||
{
|
||||
FpDevice *device = FP_DEVICE (self);
|
||||
|
||||
if (self->finger_on_sensor)
|
||||
{
|
||||
fp_dbg ("delaying identify report until after finger removal!");
|
||||
if (error)
|
||||
g_propagate_error (&self->delay_error, error);
|
||||
|
||||
self->cmd_complete_on_removal = TRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
fpi_device_identify_complete (device, NULL);
|
||||
fpi_device_identify_complete (device, error);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -629,6 +674,12 @@ identify_msg_cb (FpiDeviceSynaptics *self,
|
||||
{
|
||||
FpDevice *device = FP_DEVICE (self);
|
||||
|
||||
if (self->action_starting)
|
||||
{
|
||||
fpi_device_critical_leave (device);
|
||||
self->action_starting = FALSE;
|
||||
}
|
||||
|
||||
if (error)
|
||||
{
|
||||
fpi_device_identify_complete (device, error);
|
||||
@@ -661,19 +712,18 @@ identify_msg_cb (FpiDeviceSynaptics *self,
|
||||
fp_info ("Match error occurred");
|
||||
fpi_device_identify_report (device, NULL, NULL,
|
||||
fpi_device_retry_new (FP_DEVICE_RETRY_GENERAL));
|
||||
identify_complete_after_finger_removal (self);
|
||||
identify_complete_after_finger_removal (self, NULL);
|
||||
}
|
||||
else if (resp->result == BMKT_FP_NO_MATCH)
|
||||
{
|
||||
fp_info ("Print didn't match");
|
||||
fpi_device_identify_report (device, NULL, NULL, NULL);
|
||||
identify_complete_after_finger_removal (self);
|
||||
identify_complete_after_finger_removal (self, NULL);
|
||||
}
|
||||
else if (resp->result == BMKT_FP_DATABASE_NO_RECORD_EXISTS)
|
||||
else if (resp->result == BMKT_FP_DATABASE_NO_RECORD_EXISTS || resp->result == BMKT_FP_DATABASE_EMPTY)
|
||||
{
|
||||
fp_info ("Print is not in database");
|
||||
fpi_device_identify_complete (device,
|
||||
fpi_device_error_new (FP_DEVICE_ERROR_DATA_NOT_FOUND));
|
||||
identify_complete_after_finger_removal (self, fpi_device_error_new (FP_DEVICE_ERROR_DATA_NOT_FOUND));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -709,7 +759,7 @@ identify_msg_cb (FpiDeviceSynaptics *self,
|
||||
else
|
||||
fpi_device_identify_report (device, NULL, print, NULL);
|
||||
|
||||
identify_complete_after_finger_removal (self);
|
||||
identify_complete_after_finger_removal (self, NULL);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -717,6 +767,25 @@ identify_msg_cb (FpiDeviceSynaptics *self,
|
||||
static void
|
||||
identify (FpDevice *device)
|
||||
{
|
||||
GPtrArray *prints = NULL;
|
||||
FpiDeviceSynaptics *self = FPI_DEVICE_SYNAPTICS (device);
|
||||
|
||||
fpi_device_get_identify_data (device, &prints);
|
||||
|
||||
/* Identify over no prints does not work for synaptics.
|
||||
* This *may* make sense for other devices though, as identify may return
|
||||
* a matched print even if it is not in the list of prints.
|
||||
*/
|
||||
if (prints->len == 0)
|
||||
{
|
||||
fpi_device_identify_report (device, NULL, NULL, NULL);
|
||||
fpi_device_identify_complete (device, NULL);
|
||||
return;
|
||||
}
|
||||
|
||||
self->action_starting = TRUE;
|
||||
fpi_device_critical_enter (device);
|
||||
|
||||
init_identify_msg (device);
|
||||
compose_and_send_identify_msg (device);
|
||||
}
|
||||
@@ -819,6 +888,12 @@ enroll_msg_cb (FpiDeviceSynaptics *self,
|
||||
FpDevice *device = FP_DEVICE (self);
|
||||
bmkt_enroll_resp_t *enroll_resp;
|
||||
|
||||
if (self->action_starting)
|
||||
{
|
||||
fpi_device_critical_leave (device);
|
||||
self->action_starting = FALSE;
|
||||
}
|
||||
|
||||
if (error)
|
||||
{
|
||||
fpi_device_enroll_complete (device, NULL, error);
|
||||
@@ -965,6 +1040,9 @@ enroll (FpDevice *device)
|
||||
payload[1] = finger;
|
||||
memcpy (payload + 2, user_id, user_id_len);
|
||||
|
||||
self->action_starting = TRUE;
|
||||
fpi_device_critical_enter (device);
|
||||
|
||||
synaptics_sensor_cmd (self, 0, BMKT_CMD_ENROLL_USER, payload, user_id_len + 2, enroll_msg_cb);
|
||||
}
|
||||
|
||||
@@ -978,6 +1056,7 @@ delete_msg_cb (FpiDeviceSynaptics *self,
|
||||
|
||||
if (error)
|
||||
{
|
||||
fpi_device_critical_leave (device);
|
||||
fpi_device_delete_complete (device, error);
|
||||
return;
|
||||
}
|
||||
@@ -992,6 +1071,7 @@ delete_msg_cb (FpiDeviceSynaptics *self,
|
||||
break;
|
||||
|
||||
case BMKT_RSP_DEL_USER_FP_FAIL:
|
||||
fpi_device_critical_leave (device);
|
||||
if (resp->result == BMKT_FP_DATABASE_NO_RECORD_EXISTS ||
|
||||
resp->result == BMKT_FP_DATABASE_EMPTY)
|
||||
{
|
||||
@@ -1008,6 +1088,7 @@ delete_msg_cb (FpiDeviceSynaptics *self,
|
||||
|
||||
case BMKT_RSP_DEL_USER_FP_OK:
|
||||
fp_info ("Successfully deleted enrolled user");
|
||||
fpi_device_critical_leave (device);
|
||||
fpi_device_delete_complete (device, NULL);
|
||||
break;
|
||||
}
|
||||
@@ -1042,6 +1123,7 @@ delete_print (FpDevice *device)
|
||||
payload[0] = finger;
|
||||
memcpy (payload + 1, user_id, user_id_len);
|
||||
|
||||
fpi_device_critical_enter (device);
|
||||
synaptics_sensor_cmd (self, 0, BMKT_CMD_DEL_USER_FP, payload, user_id_len + 1, delete_msg_cb);
|
||||
}
|
||||
|
||||
@@ -1281,8 +1363,12 @@ fps_deinit_cb (FpiDeviceSynaptics *self,
|
||||
bmkt_response_t *resp,
|
||||
GError *error)
|
||||
{
|
||||
g_autoptr(GError) err = NULL;
|
||||
|
||||
/* Release usb interface */
|
||||
g_usb_device_release_interface (fpi_device_get_usb_device (FP_DEVICE (self)), 0, 0, &error);
|
||||
g_usb_device_release_interface (fpi_device_get_usb_device (FP_DEVICE (self)), 0, 0, &err);
|
||||
if (!error)
|
||||
error = g_steal_pointer (&err);
|
||||
|
||||
g_clear_object (&self->interrupt_cancellable);
|
||||
|
||||
@@ -1353,6 +1439,59 @@ cancel (FpDevice *dev)
|
||||
self->interrupt_cancellable = g_cancellable_new ();
|
||||
}
|
||||
|
||||
static void
|
||||
suspend (FpDevice *dev)
|
||||
{
|
||||
FpiDeviceSynaptics *self = FPI_DEVICE_SYNAPTICS (dev);
|
||||
FpiDeviceAction action = fpi_device_get_current_action (dev);
|
||||
|
||||
g_debug ("got suspend request");
|
||||
|
||||
if (action != FPI_DEVICE_ACTION_VERIFY && action != FPI_DEVICE_ACTION_IDENTIFY)
|
||||
{
|
||||
fpi_device_suspend_complete (dev, fpi_device_error_new (FP_DEVICE_ERROR_NOT_SUPPORTED));
|
||||
return;
|
||||
}
|
||||
|
||||
/* We are guaranteed to have a cmd_ssm running at this time. */
|
||||
g_assert (self->cmd_ssm);
|
||||
g_assert (fpi_ssm_get_cur_state (self->cmd_ssm) == SYNAPTICS_CMD_WAIT_INTERRUPT);
|
||||
self->cmd_suspended = TRUE;
|
||||
|
||||
/* Cancel the current transfer.
|
||||
* The CMD SSM will go into the suspend state and signal readyness. */
|
||||
g_cancellable_cancel (self->interrupt_cancellable);
|
||||
g_clear_object (&self->interrupt_cancellable);
|
||||
self->interrupt_cancellable = g_cancellable_new ();
|
||||
}
|
||||
|
||||
static void
|
||||
resume (FpDevice *dev)
|
||||
{
|
||||
FpiDeviceSynaptics *self = FPI_DEVICE_SYNAPTICS (dev);
|
||||
FpiDeviceAction action = fpi_device_get_current_action (dev);
|
||||
|
||||
g_debug ("got resume request");
|
||||
|
||||
if (action != FPI_DEVICE_ACTION_VERIFY && action != FPI_DEVICE_ACTION_IDENTIFY)
|
||||
{
|
||||
g_assert_not_reached ();
|
||||
fpi_device_resume_complete (dev, fpi_device_error_new (FP_DEVICE_ERROR_NOT_SUPPORTED));
|
||||
return;
|
||||
}
|
||||
|
||||
/* We must have a suspended cmd_ssm at this point */
|
||||
g_assert (self->cmd_ssm);
|
||||
g_assert (self->cmd_suspended);
|
||||
g_assert (fpi_ssm_get_cur_state (self->cmd_ssm) == SYNAPTICS_CMD_SUSPENDED);
|
||||
self->cmd_suspended = FALSE;
|
||||
|
||||
/* Restart interrupt transfer. */
|
||||
fpi_ssm_jump_to_state (self->cmd_ssm, SYNAPTICS_CMD_RESUME);
|
||||
|
||||
fpi_device_resume_complete (dev, NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
fpi_device_synaptics_init (FpiDeviceSynaptics *self)
|
||||
{
|
||||
@@ -1370,6 +1509,7 @@ fpi_device_synaptics_class_init (FpiDeviceSynapticsClass *klass)
|
||||
dev_class->scan_type = FP_SCAN_TYPE_PRESS;
|
||||
dev_class->id_table = id_table;
|
||||
dev_class->nr_enroll_stages = ENROLL_SAMPLES;
|
||||
dev_class->temp_hot_seconds = -1;
|
||||
|
||||
dev_class->open = dev_init;
|
||||
dev_class->close = dev_exit;
|
||||
@@ -1380,6 +1520,8 @@ fpi_device_synaptics_class_init (FpiDeviceSynapticsClass *klass)
|
||||
dev_class->delete = delete_print;
|
||||
dev_class->clear_storage = clear_storage;
|
||||
dev_class->cancel = cancel;
|
||||
dev_class->suspend = suspend;
|
||||
dev_class->resume = resume;
|
||||
|
||||
fpi_device_class_auto_initialize_features (dev_class);
|
||||
}
|
||||
|
||||
@@ -93,6 +93,8 @@ typedef enum {
|
||||
SYNAPTICS_CMD_WAIT_INTERRUPT,
|
||||
SYNAPTICS_CMD_SEND_ASYNC,
|
||||
SYNAPTICS_CMD_RESTART,
|
||||
SYNAPTICS_CMD_SUSPENDED,
|
||||
SYNAPTICS_CMD_RESUME,
|
||||
SYNAPTICS_CMD_NUM_STATES,
|
||||
} SynapticsCmdState;
|
||||
|
||||
@@ -110,10 +112,12 @@ struct _FpiDeviceSynaptics
|
||||
FpiSsm *cmd_ssm;
|
||||
FpiUsbTransfer *cmd_pending_transfer;
|
||||
gboolean cmd_complete_on_removal;
|
||||
gboolean cmd_suspended;
|
||||
guint8 id_idx;
|
||||
|
||||
bmkt_sensor_version_t mis_version;
|
||||
|
||||
gboolean action_starting;
|
||||
GCancellable *interrupt_cancellable;
|
||||
|
||||
gint enroll_stage;
|
||||
@@ -123,4 +127,5 @@ struct _FpiDeviceSynaptics
|
||||
|
||||
struct syna_enroll_resp_data enroll_resp_data;
|
||||
syna_state_t state;
|
||||
GError *delay_error;
|
||||
};
|
||||
|
||||
@@ -79,7 +79,7 @@ struct _FpiDeviceUpeksonly
|
||||
int num_flying;
|
||||
|
||||
GSList *rows;
|
||||
size_t num_rows;
|
||||
unsigned num_rows;
|
||||
unsigned char *rowbuf;
|
||||
int rowbuf_offset;
|
||||
|
||||
@@ -215,7 +215,7 @@ handoff_img (FpImageDevice *dev)
|
||||
|
||||
self->rows = g_slist_reverse (self->rows);
|
||||
|
||||
fp_dbg ("%lu rows", self->num_rows);
|
||||
fp_dbg ("%u rows", self->num_rows);
|
||||
img = fpi_assemble_lines (&self->assembling_ctx, self->rows, self->num_rows);
|
||||
|
||||
g_slist_free_full (self->rows, g_free);
|
||||
@@ -295,7 +295,7 @@ row_complete (FpImageDevice *dev)
|
||||
if (self->num_blank > FINGER_REMOVED_THRESHOLD)
|
||||
{
|
||||
self->finger_state = FINGER_REMOVED;
|
||||
fp_dbg ("detected finger removal. Blank rows: %d, Full rows: %lu",
|
||||
fp_dbg ("detected finger removal. Blank rows: %d, Full rows: %u",
|
||||
self->num_blank, self->num_rows);
|
||||
handoff_img (dev);
|
||||
return;
|
||||
|
||||
@@ -411,7 +411,7 @@ dev_init (FpImageDevice *dev)
|
||||
break;
|
||||
|
||||
default:
|
||||
fp_err ("Device variant %lu is not known", driver_data);
|
||||
fp_err ("Device variant %" G_GUINT64_FORMAT " is not known", driver_data);
|
||||
g_assert_not_reached ();
|
||||
fpi_image_device_open_complete (dev, fpi_device_error_new (FP_DEVICE_ERROR_GENERAL));
|
||||
return;
|
||||
@@ -431,6 +431,7 @@ dev_deinit (FpImageDevice *dev)
|
||||
|
||||
static const FpIdEntry id_table[] = {
|
||||
{ .vid = 0x0483, .pid = 0x2015, .driver_data = UPEKTC_2015 },
|
||||
{ .vid = 0x0483, .pid = 0x2017, .driver_data = UPEKTC_2015 },
|
||||
{ .vid = 0x147e, .pid = 0x3001, .driver_data = UPEKTC_3001 },
|
||||
{ .vid = 0, .pid = 0, .driver_data = 0 },
|
||||
};
|
||||
|
||||
+114
-22
@@ -31,10 +31,6 @@ static void start_deactivation (FpImageDevice *dev);
|
||||
#define CTRL_TIMEOUT 4000
|
||||
#define BULK_TIMEOUT 4000
|
||||
|
||||
#define IMAGE_WIDTH 144
|
||||
#define IMAGE_HEIGHT 384
|
||||
#define IMAGE_SIZE (IMAGE_WIDTH * IMAGE_HEIGHT)
|
||||
|
||||
#define MAX_CMD_SIZE 64
|
||||
#define MAX_RESPONSE_SIZE 2052
|
||||
#define SHORT_RESPONSE_SIZE 64
|
||||
@@ -47,8 +43,10 @@ struct _FpiDeviceUpektcImg
|
||||
unsigned char response[MAX_RESPONSE_SIZE];
|
||||
unsigned char *image_bits;
|
||||
unsigned char seq;
|
||||
size_t expected_image_size;
|
||||
size_t image_size;
|
||||
size_t response_rest;
|
||||
gboolean area_sensor;
|
||||
gboolean deactivating;
|
||||
};
|
||||
G_DECLARE_FINAL_TYPE (FpiDeviceUpektcImg, fpi_device_upektc_img, FPI,
|
||||
@@ -180,6 +178,7 @@ capture_read_data_cb (FpiUsbTransfer *transfer, FpDevice *device,
|
||||
gpointer user_data, GError *error)
|
||||
{
|
||||
FpImageDevice *dev = FP_IMAGE_DEVICE (device);
|
||||
FpImageDeviceClass *img_class = FP_IMAGE_DEVICE_GET_CLASS (dev);
|
||||
FpiDeviceUpektcImg *self = FPI_DEVICE_UPEKTC_IMG (dev);
|
||||
unsigned char *data = self->response;
|
||||
FpImage *img;
|
||||
@@ -221,7 +220,7 @@ capture_read_data_cb (FpiUsbTransfer *transfer, FpDevice *device,
|
||||
if (response_size > transfer->actual_length)
|
||||
{
|
||||
fp_dbg ("response_size is %lu, actual_length is %d",
|
||||
response_size, (gint) transfer->actual_length);
|
||||
(gulong) response_size, (gint) transfer->actual_length);
|
||||
fp_dbg ("Waiting for rest of transfer");
|
||||
BUG_ON (self->response_rest);
|
||||
self->response_rest = response_size - transfer->actual_length;
|
||||
@@ -247,8 +246,30 @@ capture_read_data_cb (FpiUsbTransfer *transfer, FpDevice *device,
|
||||
CAPTURE_ACK_00_28);
|
||||
break;
|
||||
|
||||
case 0x13:
|
||||
/* finger is present keep your finger on reader */
|
||||
fpi_device_report_finger_status_changes (device,
|
||||
FP_FINGER_STATUS_NEEDED,
|
||||
FP_FINGER_STATUS_NONE);
|
||||
fpi_ssm_jump_to_state (transfer->ssm,
|
||||
self->area_sensor ?
|
||||
CAPTURE_ACK_00_28 : CAPTURE_ACK_00_28_TERM);
|
||||
break;
|
||||
|
||||
case 0x00:
|
||||
/* finger is present! */
|
||||
fpi_device_report_finger_status_changes (device,
|
||||
FP_FINGER_STATUS_PRESENT,
|
||||
FP_FINGER_STATUS_NONE);
|
||||
fpi_ssm_jump_to_state (transfer->ssm,
|
||||
CAPTURE_ACK_00_28);
|
||||
break;
|
||||
|
||||
case 0x01:
|
||||
/* no finger! */
|
||||
fpi_device_report_finger_status_changes (device,
|
||||
FP_FINGER_STATUS_NONE,
|
||||
FP_FINGER_STATUS_PRESENT);
|
||||
fpi_ssm_jump_to_state (transfer->ssm,
|
||||
CAPTURE_ACK_00_28);
|
||||
break;
|
||||
@@ -261,18 +282,20 @@ capture_read_data_cb (FpiUsbTransfer *transfer, FpDevice *device,
|
||||
fpi_image_device_report_finger_status (dev,
|
||||
FALSE);
|
||||
fpi_ssm_jump_to_state (transfer->ssm,
|
||||
CAPTURE_ACK_00_28_TERM);
|
||||
self->area_sensor ?
|
||||
CAPTURE_ACK_00_28 : CAPTURE_ACK_00_28_TERM);
|
||||
break;
|
||||
|
||||
case 0x1d:
|
||||
/* too much horisontal movement */
|
||||
fp_err ("too much horisontal movement, aborting");
|
||||
/* too much horizontal movement */
|
||||
fp_err ("too much horizontal movement, aborting");
|
||||
fpi_image_device_retry_scan (dev,
|
||||
FP_DEVICE_RETRY_CENTER_FINGER);
|
||||
fpi_image_device_report_finger_status (dev,
|
||||
FALSE);
|
||||
fpi_ssm_jump_to_state (transfer->ssm,
|
||||
CAPTURE_ACK_00_28_TERM);
|
||||
self->area_sensor ?
|
||||
CAPTURE_ACK_00_28 : CAPTURE_ACK_00_28_TERM);
|
||||
break;
|
||||
|
||||
default:
|
||||
@@ -283,7 +306,8 @@ capture_read_data_cb (FpiUsbTransfer *transfer, FpDevice *device,
|
||||
fpi_image_device_report_finger_status (dev,
|
||||
FALSE);
|
||||
fpi_ssm_jump_to_state (transfer->ssm,
|
||||
CAPTURE_ACK_00_28_TERM);
|
||||
self->area_sensor ?
|
||||
CAPTURE_ACK_00_28 : CAPTURE_ACK_00_28_TERM);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
@@ -307,13 +331,13 @@ capture_read_data_cb (FpiUsbTransfer *transfer, FpDevice *device,
|
||||
self->image_size +=
|
||||
upektc_img_process_image_frame (self->image_bits + self->image_size,
|
||||
data);
|
||||
BUG_ON (self->image_size != IMAGE_SIZE);
|
||||
BUG_ON (self->image_size != self->expected_image_size);
|
||||
fp_dbg ("Image size is %lu",
|
||||
self->image_size);
|
||||
img = fp_image_new (IMAGE_WIDTH, IMAGE_HEIGHT);
|
||||
(gulong) self->image_size);
|
||||
img = fp_image_new (img_class->img_width, img_class->img_height);
|
||||
img->flags |= FPI_IMAGE_PARTIAL;
|
||||
memcpy (img->data, self->image_bits,
|
||||
IMAGE_SIZE);
|
||||
self->image_size);
|
||||
fpi_image_device_image_captured (dev, img);
|
||||
fpi_image_device_report_finger_status (dev,
|
||||
FALSE);
|
||||
@@ -346,6 +370,10 @@ capture_run_state (FpiSsm *ssm, FpDevice *_dev)
|
||||
switch (fpi_ssm_get_cur_state (ssm))
|
||||
{
|
||||
case CAPTURE_INIT_CAPTURE:
|
||||
if (self->area_sensor)
|
||||
upektc_img_submit_req (ssm, dev, upek2020_init_capture_press, sizeof (upek2020_init_capture_press),
|
||||
self->seq, capture_reqs_cb);
|
||||
else
|
||||
upektc_img_submit_req (ssm, dev, upek2020_init_capture, sizeof (upek2020_init_capture),
|
||||
self->seq, capture_reqs_cb);
|
||||
self->seq++;
|
||||
@@ -513,15 +541,81 @@ init_reqs_cb (FpiUsbTransfer *transfer, FpDevice *device,
|
||||
fpi_ssm_mark_failed (transfer->ssm, error);
|
||||
}
|
||||
|
||||
/* TODO: process response properly */
|
||||
static void
|
||||
init_read_data_cb (FpiUsbTransfer *transfer, FpDevice *device,
|
||||
gpointer user_data, GError *error)
|
||||
{
|
||||
if (!error)
|
||||
fpi_ssm_next_state (transfer->ssm);
|
||||
else
|
||||
FpImageDevice *dev = FP_IMAGE_DEVICE (device);
|
||||
FpiDeviceUpektcImg *self = FPI_DEVICE_UPEKTC_IMG (dev);
|
||||
unsigned char *data = self->response;
|
||||
|
||||
if (error)
|
||||
{
|
||||
fpi_ssm_mark_failed (transfer->ssm, error);
|
||||
return;
|
||||
}
|
||||
|
||||
if (data[12] == 0x06 && data[13] == 0x14) /* if get_info */
|
||||
{
|
||||
FpImageDeviceClass *img_class = FP_IMAGE_DEVICE_GET_CLASS (dev);
|
||||
uint16_t width = (data[51] << 8) | data[50];
|
||||
uint16_t height = (data[53] << 8) | data[52];
|
||||
|
||||
self->area_sensor = !(data[49] & 0x80);
|
||||
|
||||
switch (width)
|
||||
{
|
||||
case 256:
|
||||
fp_dbg ("Sensor type : TCS1x, width x height: %hu x %hu", width, height); /* 360x256 --- 270x192 must be set */
|
||||
BUG_ON (height != 360);
|
||||
img_class->img_width = 192;
|
||||
img_class->img_height = 270;
|
||||
break;
|
||||
|
||||
case 208:
|
||||
fp_dbg ("Sensor type : TCS2, width x height: %hu x %hu", width, height); /* 288x208 --- 216x156 must be set */
|
||||
BUG_ON (height != 288);
|
||||
img_class->img_width = 156;
|
||||
img_class->img_height = 216;
|
||||
break;
|
||||
|
||||
case 248:
|
||||
fp_dbg ("Sensor type : TCS3, width x height: %hu x %hu", width, height); /* 360x248 --- 270x186 must be set */
|
||||
BUG_ON (height != 360);
|
||||
img_class->img_width = 186;
|
||||
img_class->img_height = 270;
|
||||
break;
|
||||
|
||||
case 192:
|
||||
fp_dbg ("Sensor type : TCS4x, width x height: %hu x %hu", width, height); /* 512x192 --- 384x144 must be set */
|
||||
BUG_ON (height != 512);
|
||||
img_class->img_width = 144;
|
||||
img_class->img_height = 384;
|
||||
break;
|
||||
|
||||
case 144:
|
||||
fp_dbg ("Sensor type : TCS5x, width x height: %hu x %hu", width, height); /* 512x144 --- 384x108 must be set */
|
||||
BUG_ON (height != 512);
|
||||
img_class->img_width = 108;
|
||||
img_class->img_height = 384;
|
||||
break;
|
||||
|
||||
default:
|
||||
fp_dbg ("Sensor type : Unknown");
|
||||
|
||||
fpi_ssm_mark_failed (transfer->ssm,
|
||||
fpi_device_error_new_msg (FP_DEVICE_ERROR_PROTO,
|
||||
"Unknown sensor type (reported size %dx%d)",
|
||||
width, height));
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
self->expected_image_size = img_class->img_width * img_class->img_height;
|
||||
self->image_bits = g_malloc0 (self->expected_image_size * 2);
|
||||
}
|
||||
|
||||
fpi_ssm_next_state (transfer->ssm);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -616,7 +710,6 @@ dev_deactivate (FpImageDevice *dev)
|
||||
static void
|
||||
dev_init (FpImageDevice *dev)
|
||||
{
|
||||
FpiDeviceUpektcImg *self = FPI_DEVICE_UPEKTC_IMG (dev);
|
||||
GError *error = NULL;
|
||||
|
||||
/* TODO check that device has endpoints we're using */
|
||||
@@ -627,7 +720,6 @@ dev_init (FpImageDevice *dev)
|
||||
return;
|
||||
}
|
||||
|
||||
self->image_bits = g_malloc0 (IMAGE_SIZE * 2);
|
||||
fpi_image_device_open_complete (dev, NULL);
|
||||
}
|
||||
|
||||
@@ -687,6 +779,6 @@ fpi_device_upektc_img_class_init (FpiDeviceUpektcImgClass *klass)
|
||||
|
||||
img_class->bz3_threshold = 20;
|
||||
|
||||
img_class->img_width = IMAGE_WIDTH;
|
||||
img_class->img_height = IMAGE_HEIGHT;
|
||||
img_class->img_width = -1;
|
||||
img_class->img_height = -1;
|
||||
}
|
||||
|
||||
@@ -75,6 +75,22 @@ static const unsigned char upek2020_init_capture[] = {
|
||||
0x02,
|
||||
0x00, /* Wait for acceptable finger */
|
||||
0x02,
|
||||
0x25, 0xa9 /* CRC */
|
||||
};
|
||||
|
||||
static const unsigned char upek2020_init_capture_press[] = {
|
||||
'C', 'i', 'a', 'o',
|
||||
0x00,
|
||||
0x00, 0x0e, /* Seq = 7, len = 0x00e */
|
||||
0x28, /* CMD = 0x28 */
|
||||
0x0b, 0x00, /* Inner len = 0x000b */
|
||||
0x00, 0x00,
|
||||
0x0e, /* SUBCMD = 0x0e */
|
||||
0x02,
|
||||
0xfe, 0xff, 0xff, 0xff, /* timeout = -2 = 0xfffffffe = infinite time */
|
||||
0x02,
|
||||
0x01, /* Wait for finger */
|
||||
0x02,
|
||||
0x14, 0x9a /* CRC */
|
||||
};
|
||||
|
||||
|
||||
@@ -366,7 +366,7 @@ read_msg_cb (FpiUsbTransfer *transfer, FpDevice *device,
|
||||
fp_err ("async msg read too short (%d)",
|
||||
(gint) transfer->actual_length);
|
||||
error = fpi_device_error_new_msg (FP_DEVICE_ERROR_PROTO,
|
||||
"Packet from device was too short (%lu)",
|
||||
"Packet from device was too short (%" G_GSSIZE_FORMAT ")",
|
||||
transfer->actual_length);
|
||||
goto err;
|
||||
}
|
||||
@@ -993,7 +993,7 @@ e_handle_resp00 (FpDevice *dev, unsigned char *data,
|
||||
|
||||
if (data_len != 14)
|
||||
{
|
||||
fp_err ("received 3001 poll response of %lu bytes?", data_len);
|
||||
fp_err ("received 3001 poll response of %" G_GSIZE_FORMAT " bytes?", data_len);
|
||||
do_enroll_stop (dev, NULL,
|
||||
fpi_device_error_new_msg (FP_DEVICE_ERROR_PROTO,
|
||||
"received 3001 response with wrong length"));
|
||||
@@ -1090,7 +1090,7 @@ e_handle_resp02 (FpDevice *dev, unsigned char *data,
|
||||
|
||||
if (data_len < sizeof (scan_comp))
|
||||
{
|
||||
fp_err ("fingerprint data too short (%lu bytes)", data_len);
|
||||
fp_err ("fingerprint data too short (%" G_GSIZE_FORMAT "u bytes)", data_len);
|
||||
error = fpi_device_error_new_msg (FP_DEVICE_ERROR_PROTO, "fingerprint data too short");
|
||||
}
|
||||
else if (memcmp (data, scan_comp, sizeof (scan_comp)) != 0)
|
||||
@@ -1318,7 +1318,7 @@ v_handle_resp00 (FpDevice *dev, unsigned char *data,
|
||||
|
||||
if (data_len != 14)
|
||||
{
|
||||
fp_warn ("received 3001 poll response of %lu bytes?", data_len);
|
||||
fp_warn ("received 3001 poll response of %" G_GSIZE_FORMAT "u bytes?", data_len);
|
||||
error = fpi_device_error_new (FP_DEVICE_ERROR_PROTO);
|
||||
goto out;
|
||||
}
|
||||
|
||||
@@ -317,6 +317,7 @@ irq_handler (FpiUsbTransfer *transfer,
|
||||
if (urudev->irqs_stopped_cb)
|
||||
urudev->irqs_stopped_cb (imgdev);
|
||||
urudev->irqs_stopped_cb = NULL;
|
||||
g_clear_error (&error);
|
||||
return;
|
||||
}
|
||||
else if (error)
|
||||
@@ -360,7 +361,7 @@ start_irq_handler (FpImageDevice *dev)
|
||||
transfer = fpi_usb_transfer_new (FP_DEVICE (dev));
|
||||
transfer->ssm = NULL;
|
||||
transfer->short_is_error = TRUE;
|
||||
fpi_usb_transfer_fill_bulk (transfer,
|
||||
fpi_usb_transfer_fill_interrupt (transfer,
|
||||
EP_INTR,
|
||||
IRQ_LENGTH);
|
||||
fpi_usb_transfer_submit (transfer, 0, self->irq_cancellable, irq_handler, NULL);
|
||||
@@ -551,7 +552,7 @@ image_transfer_cb (FpiUsbTransfer *transfer, FpDevice *dev,
|
||||
}
|
||||
else
|
||||
{
|
||||
self->img_data = g_memdup (transfer->buffer, sizeof (struct uru4k_image));
|
||||
self->img_data = g_memdup2 (transfer->buffer, sizeof (struct uru4k_image));
|
||||
self->img_data_actual_length = transfer->actual_length;
|
||||
fpi_ssm_next_state (ssm);
|
||||
}
|
||||
@@ -1413,6 +1414,9 @@ dev_deinit (FpImageDevice *dev)
|
||||
SECITEM_FreeItem (self->param, PR_TRUE);
|
||||
if (self->slot)
|
||||
PK11_FreeSlot (self->slot);
|
||||
|
||||
NSS_Shutdown ();
|
||||
|
||||
g_usb_device_release_interface (fpi_device_get_usb_device (FP_DEVICE (dev)),
|
||||
self->interface, 0, &error);
|
||||
g_clear_pointer (&self->rand, g_rand_free);
|
||||
|
||||
@@ -581,7 +581,7 @@ activate_ssm (FpiSsm *ssm, FpDevice *dev)
|
||||
/* Initialize fingerprint buffer */
|
||||
g_free (self->lines_buffer);
|
||||
self->memory = VFS_USB_BUFFER_SIZE;
|
||||
self->lines_buffer = g_malloc (self->memory);
|
||||
self->lines_buffer = g_malloc0 (self->memory);
|
||||
self->bytes = 0;
|
||||
|
||||
/* Finger is on the scanner */
|
||||
@@ -589,12 +589,15 @@ activate_ssm (FpiSsm *ssm, FpDevice *dev)
|
||||
}
|
||||
|
||||
/* Increase buffer size while it's insufficient */
|
||||
while (self->bytes + VFS_USB_BUFFER_SIZE > self->memory)
|
||||
while (self->memory < self->bytes + VFS_USB_BUFFER_SIZE)
|
||||
{
|
||||
self->memory <<= 1;
|
||||
int pre_memory = self->memory;
|
||||
self->memory += VFS_USB_BUFFER_SIZE;
|
||||
self->lines_buffer =
|
||||
(struct vfs_line *) g_realloc (self->lines_buffer,
|
||||
self->memory);
|
||||
memset ((guint8 *) self->lines_buffer + pre_memory, 0,
|
||||
VFS_USB_BUFFER_SIZE);
|
||||
}
|
||||
|
||||
/* Receive chunk of data */
|
||||
|
||||
@@ -432,7 +432,7 @@ img_process_data (int first_block, FpDeviceVfs301 *dev, const guint8 *buf, int l
|
||||
usb_send (dev, data, len, NULL); \
|
||||
}
|
||||
|
||||
#define RAW_DATA(x) g_memdup (x, sizeof (x)), sizeof (x)
|
||||
#define RAW_DATA(x) g_memdup2 (x, sizeof (x)), sizeof (x)
|
||||
|
||||
#define IS_VFS301_FP_SEQ_START(b) ((b[0] == 0x01) && (b[1] == 0xfe))
|
||||
|
||||
|
||||
@@ -273,7 +273,8 @@ on_stream_read_cb (GObject *source_object,
|
||||
}
|
||||
else
|
||||
{
|
||||
// g_task_return_new_error (task, G_IO_ERROR, G_IO_ERROR_INVALID_DATA, "Got empty data");
|
||||
g_task_return_new_error (task, G_IO_ERROR, G_IO_ERROR_INVALID_DATA,
|
||||
"Got empty data");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -67,12 +67,17 @@ dev_identify (FpDevice *dev)
|
||||
new_scan,
|
||||
(GEqualFunc) fp_print_equal,
|
||||
NULL))
|
||||
error = fpi_device_error_new (FP_DEVICE_ERROR_DATA_NOT_FOUND);
|
||||
{
|
||||
match = FALSE;
|
||||
g_clear_object (&new_scan);
|
||||
}
|
||||
else if (g_ptr_array_find_with_equal_func (prints,
|
||||
new_scan,
|
||||
(GEqualFunc) fp_print_equal,
|
||||
&idx))
|
||||
{
|
||||
match = g_ptr_array_index (prints, idx);
|
||||
}
|
||||
|
||||
if (!self->match_reported)
|
||||
{
|
||||
|
||||
@@ -150,6 +150,8 @@ process_cmds (FpDeviceVirtualDevice * self,
|
||||
char **scan_id,
|
||||
GError **error)
|
||||
{
|
||||
gboolean removed;
|
||||
|
||||
if (g_cancellable_is_cancelled (self->cancellable) ||
|
||||
(fpi_device_get_current_action (FP_DEVICE (self)) != FPI_DEVICE_ACTION_NONE &&
|
||||
g_cancellable_is_cancelled (fpi_device_get_cancellable (FP_DEVICE (self)))))
|
||||
@@ -192,7 +194,7 @@ process_cmds (FpDeviceVirtualDevice * self,
|
||||
{
|
||||
guint64 sleep_ms = g_ascii_strtoull (cmd + strlen (SLEEP_CMD_PREFIX), NULL, 10);
|
||||
|
||||
g_debug ("Sleeping %lums", sleep_ms);
|
||||
g_debug ("Sleeping %" G_GUINT64_FORMAT "ms", sleep_ms);
|
||||
self->sleep_timeout_id = g_timeout_add (sleep_ms, sleep_timeout_cb, self);
|
||||
|
||||
return FALSE;
|
||||
@@ -250,7 +252,10 @@ process_cmds (FpDeviceVirtualDevice * self,
|
||||
if (self->ignore_wait)
|
||||
return TRUE;
|
||||
|
||||
g_object_get (self, "removed", &removed, NULL);
|
||||
|
||||
g_assert (self->wait_command_id == 0);
|
||||
if (!scan || removed)
|
||||
self->wait_command_id = g_timeout_add (500, wait_for_command_timeout, self);
|
||||
return FALSE;
|
||||
}
|
||||
@@ -275,7 +280,7 @@ recv_instruction_cb (GObject *source_object,
|
||||
gsize bytes;
|
||||
|
||||
bytes = fpi_device_virtual_listener_read_finish (listener, res, &error);
|
||||
fp_dbg ("Got instructions of length %ld", bytes);
|
||||
fp_dbg ("Got instructions of length %" G_GSIZE_FORMAT, bytes);
|
||||
|
||||
if (error)
|
||||
{
|
||||
@@ -304,6 +309,7 @@ recv_instruction_cb (GObject *source_object,
|
||||
else if (g_str_has_prefix (cmd, UNPLUG_CMD))
|
||||
{
|
||||
fpi_device_remove (FP_DEVICE (self));
|
||||
maybe_continue_current_action (self);
|
||||
}
|
||||
else if (g_str_has_prefix (cmd, SET_ENROLL_STAGES_PREFIX))
|
||||
{
|
||||
@@ -520,8 +526,8 @@ dev_verify (FpDevice *dev)
|
||||
|
||||
if (scan_id)
|
||||
{
|
||||
g_autoptr(FpPrint) new_scan = NULL;
|
||||
GVariant *data = NULL;
|
||||
FpPrint *new_scan;
|
||||
FpPrint *print;
|
||||
gboolean success;
|
||||
|
||||
@@ -537,7 +543,7 @@ dev_verify (FpDevice *dev)
|
||||
|
||||
if (self->prints_storage && !g_hash_table_contains (self->prints_storage, scan_id))
|
||||
{
|
||||
error = fpi_device_error_new (FP_DEVICE_ERROR_DATA_NOT_FOUND);
|
||||
g_clear_object (&new_scan);
|
||||
success = FALSE;
|
||||
}
|
||||
else
|
||||
@@ -550,7 +556,7 @@ dev_verify (FpDevice *dev)
|
||||
self->match_reported = TRUE;
|
||||
fpi_device_verify_report (dev,
|
||||
success ? FPI_MATCH_SUCCESS : FPI_MATCH_FAIL,
|
||||
new_scan,
|
||||
g_steal_pointer (&new_scan),
|
||||
NULL);
|
||||
}
|
||||
}
|
||||
@@ -727,7 +733,13 @@ dev_deinit (FpDevice *dev)
|
||||
}
|
||||
|
||||
if (!self->keep_alive)
|
||||
{
|
||||
stop_listener (self);
|
||||
self->supports_cancellation = TRUE;
|
||||
}
|
||||
|
||||
self->enroll_stages_passed = 0;
|
||||
self->match_reported = FALSE;
|
||||
|
||||
fpi_device_close_complete (dev, NULL);
|
||||
}
|
||||
|
||||
+38
-20
@@ -27,6 +27,10 @@
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#ifdef HAVE_LIBFPRINT_TOD
|
||||
#include "tod/tod-shared-loader.h"
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_UDEV
|
||||
#include <gudev/gudev.h>
|
||||
#endif
|
||||
@@ -67,32 +71,26 @@ enum {
|
||||
static guint signals[LAST_SIGNAL] = { 0 };
|
||||
|
||||
static const char *
|
||||
get_drivers_whitelist_env (void)
|
||||
get_drivers_allowlist_env (void)
|
||||
{
|
||||
return g_getenv ("FP_DRIVERS_WHITELIST");
|
||||
return g_getenv ("FP_DRIVERS_ALLOWLIST");
|
||||
}
|
||||
|
||||
static gboolean
|
||||
is_driver_allowed (const gchar *driver)
|
||||
{
|
||||
g_auto(GStrv) whitelisted_drivers = NULL;
|
||||
const char *fp_drivers_whitelist_env;
|
||||
int i;
|
||||
g_auto(GStrv) allowlisted_drivers = NULL;
|
||||
const char *fp_drivers_allowlist_env;
|
||||
|
||||
g_return_val_if_fail (driver, TRUE);
|
||||
|
||||
fp_drivers_whitelist_env = get_drivers_whitelist_env ();
|
||||
fp_drivers_allowlist_env = get_drivers_allowlist_env ();
|
||||
|
||||
if (!fp_drivers_whitelist_env)
|
||||
if (!fp_drivers_allowlist_env)
|
||||
return TRUE;
|
||||
|
||||
whitelisted_drivers = g_strsplit (fp_drivers_whitelist_env, ":", -1);
|
||||
|
||||
for (i = 0; whitelisted_drivers[i]; ++i)
|
||||
if (g_strcmp0 (driver, whitelisted_drivers[i]) == 0)
|
||||
return TRUE;
|
||||
|
||||
return FALSE;
|
||||
allowlisted_drivers = g_strsplit (fp_drivers_allowlist_env, ":", -1);
|
||||
return g_strv_contains ((const gchar * const *) allowlisted_drivers, driver);
|
||||
}
|
||||
|
||||
typedef struct
|
||||
@@ -291,11 +289,10 @@ fp_context_finalize (GObject *object)
|
||||
FpContext *self = (FpContext *) object;
|
||||
FpContextPrivate *priv = fp_context_get_instance_private (self);
|
||||
|
||||
g_clear_pointer (&priv->devices, g_ptr_array_unref);
|
||||
|
||||
g_cancellable_cancel (priv->cancellable);
|
||||
g_clear_object (&priv->cancellable);
|
||||
g_clear_pointer (&priv->drivers, g_array_unref);
|
||||
g_clear_pointer (&priv->devices, g_ptr_array_unref);
|
||||
|
||||
g_slist_free_full (g_steal_pointer (&priv->sources), (GDestroyNotify) g_source_destroy);
|
||||
|
||||
@@ -303,6 +300,8 @@ fp_context_finalize (GObject *object)
|
||||
g_object_run_dispose (G_OBJECT (priv->usb_ctx));
|
||||
g_clear_object (&priv->usb_ctx);
|
||||
|
||||
tod_shared_drivers_unregister ();
|
||||
|
||||
G_OBJECT_CLASS (fp_context_parent_class)->finalize (object);
|
||||
}
|
||||
|
||||
@@ -358,12 +357,19 @@ static void
|
||||
fp_context_init (FpContext *self)
|
||||
{
|
||||
g_autoptr(GError) error = NULL;
|
||||
g_autoptr(GArray) shared_drivers = NULL;
|
||||
FpContextPrivate *priv = fp_context_get_instance_private (self);
|
||||
guint i;
|
||||
|
||||
g_debug ("Initializing FpContext (libfprint version " LIBFPRINT_VERSION ")");
|
||||
|
||||
priv->drivers = fpi_get_driver_types ();
|
||||
|
||||
if (get_drivers_whitelist_env ())
|
||||
tod_shared_drivers_register ();
|
||||
shared_drivers = tod_shared_drivers_get ();
|
||||
g_array_prepend_vals (priv->drivers, shared_drivers->data, shared_drivers->len);
|
||||
|
||||
if (get_drivers_allowlist_env ())
|
||||
{
|
||||
for (i = 0; i < priv->drivers->len;)
|
||||
{
|
||||
@@ -426,6 +432,7 @@ void
|
||||
fp_context_enumerate (FpContext *context)
|
||||
{
|
||||
FpContextPrivate *priv = fp_context_get_instance_private (context);
|
||||
gboolean dispatched;
|
||||
gint i;
|
||||
|
||||
g_return_if_fail (FP_IS_CONTEXT (context));
|
||||
@@ -564,8 +571,19 @@ fp_context_enumerate (FpContext *context)
|
||||
}
|
||||
#endif
|
||||
|
||||
while (priv->pending_devices)
|
||||
g_main_context_iteration (NULL, TRUE);
|
||||
/* Iterate until 1. we have no pending devices, and 2. the mainloop is idle
|
||||
* This takes care of processing hotplug events that happened during
|
||||
* enumeration.
|
||||
* This is important due to USB `persist` being turned off. At resume time,
|
||||
* devices will disappear and immediately re-appear. In this situation,
|
||||
* enumerate could first see the old state with a removed device resulting
|
||||
* in it to not be discovered.
|
||||
* As a hotplug event is seemingly emitted by the kernel immediately, we can
|
||||
* simply make sure to process all events before returning from enumerate.
|
||||
*/
|
||||
dispatched = TRUE;
|
||||
while (priv->pending_devices || dispatched)
|
||||
dispatched = g_main_context_iteration (NULL, !!priv->pending_devices);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -574,7 +592,7 @@ fp_context_enumerate (FpContext *context)
|
||||
*
|
||||
* Get all devices. fp_context_enumerate() will be called as needed.
|
||||
*
|
||||
* Returns: (transfer none) (element-type FpDevice): a new #GPtrArray of #GUsbDevice's.
|
||||
* Returns: (transfer none) (element-type FpDevice): a new #GPtrArray of #FpDevice's.
|
||||
*/
|
||||
GPtrArray *
|
||||
fp_context_get_devices (FpContext *context)
|
||||
|
||||
@@ -22,12 +22,29 @@
|
||||
|
||||
#include "fpi-device.h"
|
||||
|
||||
/* Chosen so that if we turn on after WARM -> COLD, it takes exactly one time
|
||||
* constant to go from COLD -> HOT.
|
||||
* TEMP_COLD_THRESH = 1 / (e + 1)
|
||||
*/
|
||||
#define TEMP_COLD_THRESH (0.26894142136999512075)
|
||||
#define TEMP_WARM_HOT_THRESH (1.0 - TEMP_COLD_THRESH)
|
||||
#define TEMP_HOT_WARM_THRESH (0.5)
|
||||
|
||||
/* Delay updates by 100ms to avoid hitting the border exactly */
|
||||
#define TEMP_DELAY_SECONDS 0.1
|
||||
|
||||
/* Hopefully 3min is long enough to not get in the way, while also not
|
||||
* properly overheating any devices.
|
||||
*/
|
||||
#define DEFAULT_TEMP_HOT_SECONDS (3 * 60)
|
||||
#define DEFAULT_TEMP_COLD_SECONDS (9 * 60)
|
||||
|
||||
typedef struct
|
||||
{
|
||||
FpDeviceType type;
|
||||
|
||||
GUsbDevice *usb_device;
|
||||
const gchar *virtual_env;
|
||||
gchar *virtual_env;
|
||||
struct
|
||||
{
|
||||
gchar *spidev_path;
|
||||
@@ -36,6 +53,7 @@ typedef struct
|
||||
|
||||
gboolean is_removed;
|
||||
gboolean is_open;
|
||||
gboolean is_suspended;
|
||||
|
||||
gchar *device_id;
|
||||
gchar *device_name;
|
||||
@@ -50,14 +68,37 @@ typedef struct
|
||||
/* We always make sure that only one task is run at a time. */
|
||||
FpiDeviceAction current_action;
|
||||
GTask *current_task;
|
||||
GError *current_cancellation_reason;
|
||||
GAsyncReadyCallback current_user_cb;
|
||||
GCancellable *current_cancellable;
|
||||
gulong current_cancellable_id;
|
||||
gulong current_task_cancellable_id;
|
||||
GSource *current_idle_cancel_source;
|
||||
GSource *current_task_idle_return_source;
|
||||
|
||||
/* State for tasks */
|
||||
gboolean wait_for_finger;
|
||||
FpFingerStatusFlags finger_status;
|
||||
|
||||
/* Driver critical sections */
|
||||
guint critical_section;
|
||||
GSource *critical_section_flush_source;
|
||||
gboolean cancel_queued;
|
||||
gboolean suspend_queued;
|
||||
gboolean resume_queued;
|
||||
|
||||
/* Suspend/resume tasks */
|
||||
GTask *suspend_resume_task;
|
||||
GError *suspend_error;
|
||||
|
||||
/* Device temperature model information and state */
|
||||
GSource *temp_timeout;
|
||||
FpTemperature temp_current;
|
||||
gint32 temp_hot_seconds;
|
||||
gint32 temp_cold_seconds;
|
||||
gint64 temp_last_update;
|
||||
gboolean temp_last_active;
|
||||
gdouble temp_current_ratio;
|
||||
} FpDevicePrivate;
|
||||
|
||||
|
||||
@@ -70,8 +111,6 @@ typedef struct
|
||||
GDestroyNotify enroll_progress_destroy;
|
||||
} FpEnrollData;
|
||||
|
||||
void enroll_data_free (FpEnrollData *enroll_data);
|
||||
|
||||
typedef struct
|
||||
{
|
||||
FpPrint *enrolled_print; /* verify */
|
||||
@@ -87,4 +126,11 @@ typedef struct
|
||||
GDestroyNotify match_destroy;
|
||||
} FpMatchData;
|
||||
|
||||
void match_data_free (FpMatchData *match_data);
|
||||
|
||||
void fpi_device_suspend (FpDevice *device);
|
||||
void fpi_device_resume (FpDevice *device);
|
||||
|
||||
void fpi_device_configure_wakeup (FpDevice *device,
|
||||
gboolean enabled);
|
||||
void fpi_device_update_temp (FpDevice *device,
|
||||
gboolean is_active);
|
||||
|
||||
+436
-43
@@ -48,6 +48,7 @@ enum {
|
||||
PROP_NR_ENROLL_STAGES,
|
||||
PROP_SCAN_TYPE,
|
||||
PROP_FINGER_STATUS,
|
||||
PROP_TEMPERATURE,
|
||||
PROP_FPI_ENVIRON,
|
||||
PROP_FPI_USB_DEVICE,
|
||||
PROP_FPI_UDEV_DATA_SPIDEV,
|
||||
@@ -93,6 +94,9 @@ fp_device_cancel_in_idle_cb (gpointer user_data)
|
||||
|
||||
priv->current_idle_cancel_source = NULL;
|
||||
|
||||
if (priv->critical_section)
|
||||
priv->cancel_queued = TRUE;
|
||||
else
|
||||
cls->cancel (self);
|
||||
|
||||
fpi_device_report_finger_status (self, FP_FINGER_STATUS_NONE);
|
||||
@@ -118,20 +122,40 @@ fp_device_cancelled_cb (GCancellable *cancellable, FpDevice *self)
|
||||
g_source_unref (priv->current_idle_cancel_source);
|
||||
}
|
||||
|
||||
/* Forward the external task cancellable to the internal one. */
|
||||
static void
|
||||
maybe_cancel_on_cancelled (FpDevice *device,
|
||||
GCancellable *cancellable)
|
||||
fp_device_task_cancelled_cb (GCancellable *cancellable, FpDevice *self)
|
||||
{
|
||||
FpDevicePrivate *priv = fp_device_get_instance_private (self);
|
||||
|
||||
g_cancellable_cancel (priv->current_cancellable);
|
||||
}
|
||||
|
||||
static void
|
||||
setup_task_cancellable (FpDevice *device)
|
||||
{
|
||||
FpDeviceClass *cls = FP_DEVICE_GET_CLASS (device);
|
||||
FpDevicePrivate *priv = fp_device_get_instance_private (device);
|
||||
FpDeviceClass *cls = FP_DEVICE_GET_CLASS (device);
|
||||
|
||||
if (!cancellable || !cls->cancel)
|
||||
return;
|
||||
|
||||
priv->current_cancellable_id = g_cancellable_connect (cancellable,
|
||||
/* Create an internal cancellable and hook it up. */
|
||||
priv->current_cancellable = g_cancellable_new ();
|
||||
if (cls->cancel)
|
||||
{
|
||||
priv->current_cancellable_id = g_cancellable_connect (priv->current_cancellable,
|
||||
G_CALLBACK (fp_device_cancelled_cb),
|
||||
device,
|
||||
NULL);
|
||||
}
|
||||
|
||||
/* Task cancellable is the externally visible one, make our internal one
|
||||
* a slave of the external one. */
|
||||
if (g_task_get_cancellable (priv->current_task))
|
||||
{
|
||||
priv->current_task_cancellable_id = g_cancellable_connect (g_task_get_cancellable (priv->current_task),
|
||||
G_CALLBACK (fp_device_task_cancelled_cb),
|
||||
device,
|
||||
NULL);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -151,6 +175,36 @@ fp_device_constructed (GObject *object)
|
||||
priv->device_name = g_strdup (cls->full_name);
|
||||
priv->device_id = g_strdup ("0");
|
||||
|
||||
if (cls->temp_hot_seconds > 0)
|
||||
{
|
||||
priv->temp_hot_seconds = cls->temp_hot_seconds;
|
||||
priv->temp_cold_seconds = cls->temp_cold_seconds;
|
||||
g_assert (priv->temp_cold_seconds > 0);
|
||||
}
|
||||
else if (cls->temp_hot_seconds == 0)
|
||||
{
|
||||
priv->temp_hot_seconds = DEFAULT_TEMP_HOT_SECONDS;
|
||||
priv->temp_cold_seconds = DEFAULT_TEMP_COLD_SECONDS;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Temperature management disabled */
|
||||
priv->temp_hot_seconds = -1;
|
||||
priv->temp_cold_seconds = -1;
|
||||
}
|
||||
|
||||
/* Start out at not completely cold (i.e. assume we are only at the upper
|
||||
* bound of COLD).
|
||||
* To be fair, the warm-up from 0 to WARM should be really short either way.
|
||||
*
|
||||
* Note that a call to fpi_device_update_temp() is not needed here as no
|
||||
* timeout must be registered.
|
||||
*/
|
||||
priv->temp_current = FP_TEMPERATURE_COLD;
|
||||
priv->temp_current_ratio = TEMP_COLD_THRESH;
|
||||
priv->temp_last_update = g_get_monotonic_time ();
|
||||
priv->temp_last_active = FALSE;
|
||||
|
||||
G_OBJECT_CLASS (fp_device_parent_class)->constructed (object);
|
||||
}
|
||||
|
||||
@@ -165,10 +219,13 @@ fp_device_finalize (GObject *object)
|
||||
if (priv->is_open)
|
||||
g_warning ("User destroyed open device! Not cleaning up properly!");
|
||||
|
||||
g_clear_pointer (&priv->temp_timeout, g_source_destroy);
|
||||
|
||||
g_slist_free_full (priv->sources, (GDestroyNotify) g_source_destroy);
|
||||
|
||||
g_clear_pointer (&priv->current_idle_cancel_source, g_source_destroy);
|
||||
g_clear_pointer (&priv->current_task_idle_return_source, g_source_destroy);
|
||||
g_clear_pointer (&priv->critical_section_flush_source, g_source_destroy);
|
||||
|
||||
g_clear_pointer (&priv->device_id, g_free);
|
||||
g_clear_pointer (&priv->device_name, g_free);
|
||||
@@ -189,6 +246,7 @@ fp_device_get_property (GObject *object,
|
||||
{
|
||||
FpDevice *self = FP_DEVICE (object);
|
||||
FpDevicePrivate *priv = fp_device_get_instance_private (self);
|
||||
FpDeviceClass *cls = FP_DEVICE_GET_CLASS (self);
|
||||
|
||||
switch (prop_id)
|
||||
{
|
||||
@@ -204,6 +262,10 @@ fp_device_get_property (GObject *object,
|
||||
g_value_set_flags (value, priv->finger_status);
|
||||
break;
|
||||
|
||||
case PROP_TEMPERATURE:
|
||||
g_value_set_enum (value, priv->temp_current);
|
||||
break;
|
||||
|
||||
case PROP_DRIVER:
|
||||
g_value_set_static_string (value, FP_DEVICE_GET_CLASS (self)->id);
|
||||
break;
|
||||
@@ -224,6 +286,24 @@ fp_device_get_property (GObject *object,
|
||||
g_value_set_boolean (value, priv->is_removed);
|
||||
break;
|
||||
|
||||
case PROP_FPI_USB_DEVICE:
|
||||
g_value_set_object (value, priv->usb_device);
|
||||
break;
|
||||
|
||||
case PROP_FPI_UDEV_DATA_SPIDEV:
|
||||
if (cls->type == FP_DEVICE_TYPE_UDEV)
|
||||
g_value_set_string (value, g_strdup (priv->udev_data.spidev_path));
|
||||
else
|
||||
g_value_set_string (value, NULL);
|
||||
break;
|
||||
|
||||
case PROP_FPI_UDEV_DATA_HIDRAW:
|
||||
if (cls->type == FP_DEVICE_TYPE_UDEV)
|
||||
g_value_set_string (value, g_strdup (priv->udev_data.hidraw_path));
|
||||
else
|
||||
g_value_set_string (value, NULL);
|
||||
break;
|
||||
|
||||
default:
|
||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
||||
}
|
||||
@@ -279,6 +359,24 @@ fp_device_set_property (GObject *object,
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
device_idle_probe_cb (FpDevice *self, gpointer user_data)
|
||||
{
|
||||
/* This should not be an idle handler, see comment where it is registered.
|
||||
*
|
||||
* This effectively disables USB "persist" for us, and possibly turns off
|
||||
* USB wakeup if it was enabled for some reason.
|
||||
*/
|
||||
fpi_device_configure_wakeup (self, FALSE);
|
||||
|
||||
if (!FP_DEVICE_GET_CLASS (self)->probe)
|
||||
fpi_device_probe_complete (self, NULL, NULL, NULL);
|
||||
else
|
||||
FP_DEVICE_GET_CLASS (self)->probe (self);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
static void
|
||||
fp_device_async_initable_init_async (GAsyncInitable *initable,
|
||||
int io_priority,
|
||||
@@ -298,17 +396,16 @@ fp_device_async_initable_init_async (GAsyncInitable *initable,
|
||||
if (g_task_return_error_if_cancelled (task))
|
||||
return;
|
||||
|
||||
if (!FP_DEVICE_GET_CLASS (self)->probe)
|
||||
{
|
||||
g_task_return_boolean (task, TRUE);
|
||||
return;
|
||||
}
|
||||
|
||||
priv->current_action = FPI_DEVICE_ACTION_PROBE;
|
||||
priv->current_task = g_steal_pointer (&task);
|
||||
maybe_cancel_on_cancelled (self, cancellable);
|
||||
setup_task_cancellable (self);
|
||||
|
||||
FP_DEVICE_GET_CLASS (self)->probe (self);
|
||||
/* We push this into an idle handler for compatibility with libgusb
|
||||
* 0.3.7 and before.
|
||||
* See https://github.com/hughsie/libgusb/pull/50
|
||||
*/
|
||||
g_source_set_name (fpi_device_add_timeout (self, 0, device_idle_probe_cb, NULL, NULL),
|
||||
"libusb probe in idle");
|
||||
}
|
||||
|
||||
static gboolean
|
||||
@@ -358,6 +455,13 @@ fp_device_class_init (FpDeviceClass *klass)
|
||||
FP_TYPE_FINGER_STATUS_FLAGS, FP_FINGER_STATUS_NONE,
|
||||
G_PARAM_STATIC_STRINGS | G_PARAM_READABLE);
|
||||
|
||||
properties[PROP_TEMPERATURE] =
|
||||
g_param_spec_enum ("temperature",
|
||||
"Temperature",
|
||||
"The temperature estimation for device to prevent overheating.",
|
||||
FP_TYPE_TEMPERATURE, FP_TEMPERATURE_COLD,
|
||||
G_PARAM_STATIC_STRINGS | G_PARAM_READABLE);
|
||||
|
||||
properties[PROP_DRIVER] =
|
||||
g_param_spec_string ("driver",
|
||||
"Driver",
|
||||
@@ -446,7 +550,7 @@ fp_device_class_init (FpDeviceClass *klass)
|
||||
"USB Device",
|
||||
"Private: The USB device for the device",
|
||||
G_USB_TYPE_DEVICE,
|
||||
G_PARAM_STATIC_STRINGS | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY);
|
||||
G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY);
|
||||
/**
|
||||
* FpDevice::fpi-udev-data-spidev: (skip)
|
||||
*
|
||||
@@ -459,7 +563,7 @@ fp_device_class_init (FpDeviceClass *klass)
|
||||
"Udev data: spidev path",
|
||||
"Private: The path to /dev/spidevN.M",
|
||||
NULL,
|
||||
G_PARAM_STATIC_STRINGS | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY);
|
||||
G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY);
|
||||
/**
|
||||
* FpDevice::fpi-udev-data-hidraw: (skip)
|
||||
*
|
||||
@@ -472,7 +576,7 @@ fp_device_class_init (FpDeviceClass *klass)
|
||||
"Udev data: hidraw path",
|
||||
"Private: The path to /dev/hidrawN",
|
||||
NULL,
|
||||
G_PARAM_STATIC_STRINGS | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY);
|
||||
G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY);
|
||||
|
||||
/**
|
||||
* FpDevice::fpi-driver-data: (skip)
|
||||
@@ -616,6 +720,25 @@ fp_device_get_nr_enroll_stages (FpDevice *device)
|
||||
return priv->nr_enroll_stages;
|
||||
}
|
||||
|
||||
/**
|
||||
* fp_device_get_temperature:
|
||||
* @device: A #FpDevice
|
||||
*
|
||||
* Retrieves simple temperature information for device. It is not possible
|
||||
* to use a device when this is #FP_TEMPERATURE_HOT.
|
||||
*
|
||||
* Returns: The current temperature estimation.
|
||||
*/
|
||||
FpTemperature
|
||||
fp_device_get_temperature (FpDevice *device)
|
||||
{
|
||||
FpDevicePrivate *priv = fp_device_get_instance_private (device);
|
||||
|
||||
g_return_val_if_fail (FP_IS_DEVICE (device), -1);
|
||||
|
||||
return priv->temp_current;
|
||||
}
|
||||
|
||||
/**
|
||||
* fp_device_supports_identify:
|
||||
* @device: A #FpDevice
|
||||
@@ -708,7 +831,7 @@ fp_device_open (FpDevice *device,
|
||||
return;
|
||||
}
|
||||
|
||||
if (priv->current_task)
|
||||
if (priv->current_task || priv->is_suspended)
|
||||
{
|
||||
g_task_return_error (task,
|
||||
fpi_device_error_new (FP_DEVICE_ERROR_BUSY));
|
||||
@@ -737,7 +860,7 @@ fp_device_open (FpDevice *device,
|
||||
|
||||
priv->current_action = FPI_DEVICE_ACTION_OPEN;
|
||||
priv->current_task = g_steal_pointer (&task);
|
||||
maybe_cancel_on_cancelled (device, cancellable);
|
||||
setup_task_cancellable (device);
|
||||
fpi_device_report_finger_status (device, FP_FINGER_STATUS_NONE);
|
||||
|
||||
FP_DEVICE_GET_CLASS (device)->open (device);
|
||||
@@ -793,7 +916,7 @@ fp_device_close (FpDevice *device,
|
||||
return;
|
||||
}
|
||||
|
||||
if (priv->current_task)
|
||||
if (priv->current_task || priv->is_suspended)
|
||||
{
|
||||
g_task_return_error (task,
|
||||
fpi_device_error_new (FP_DEVICE_ERROR_BUSY));
|
||||
@@ -802,7 +925,7 @@ fp_device_close (FpDevice *device,
|
||||
|
||||
priv->current_action = FPI_DEVICE_ACTION_CLOSE;
|
||||
priv->current_task = g_steal_pointer (&task);
|
||||
maybe_cancel_on_cancelled (device, cancellable);
|
||||
setup_task_cancellable (device);
|
||||
|
||||
FP_DEVICE_GET_CLASS (device)->close (device);
|
||||
}
|
||||
@@ -826,6 +949,154 @@ fp_device_close_finish (FpDevice *device,
|
||||
return g_task_propagate_boolean (G_TASK (result), error);
|
||||
}
|
||||
|
||||
/**
|
||||
* fp_device_suspend:
|
||||
* @device: a #FpDevice
|
||||
* @cancellable: (nullable): a #GCancellable, or %NULL, currently not used
|
||||
* @callback: the function to call on completion
|
||||
* @user_data: the data to pass to @callback
|
||||
*
|
||||
* Prepare the device for system suspend. Retrieve the result with
|
||||
* fp_device_suspend_finish().
|
||||
*
|
||||
* The suspend method can be called at any time (even if the device is not
|
||||
* opened) and must be paired with a corresponding resume call. It is undefined
|
||||
* when or how any ongoing operation is finished. This call might wait for an
|
||||
* ongoing operation to finish, might cancel the ongoing operation or may
|
||||
* prepare the device so that the host is resumed when the operation can be
|
||||
* finished.
|
||||
*
|
||||
* If an ongoing operation must be cancelled then it will complete with an error
|
||||
* code of #FP_DEVICE_ERROR_BUSY before the suspend async routine finishes.
|
||||
*
|
||||
* Any operation started while the device is suspended will fail with
|
||||
* #FP_DEVICE_ERROR_BUSY, this includes calls to open or close the device.
|
||||
*/
|
||||
void
|
||||
fp_device_suspend (FpDevice *device,
|
||||
GCancellable *cancellable,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data)
|
||||
{
|
||||
g_autoptr(GTask) task = NULL;
|
||||
FpDevicePrivate *priv = fp_device_get_instance_private (device);
|
||||
|
||||
task = g_task_new (device, cancellable, callback, user_data);
|
||||
|
||||
if (priv->suspend_resume_task || priv->is_suspended)
|
||||
{
|
||||
g_task_return_error (task,
|
||||
fpi_device_error_new (FP_DEVICE_ERROR_BUSY));
|
||||
return;
|
||||
}
|
||||
|
||||
if (priv->is_removed)
|
||||
{
|
||||
g_task_return_error (task,
|
||||
fpi_device_error_new (FP_DEVICE_ERROR_REMOVED));
|
||||
return;
|
||||
}
|
||||
|
||||
priv->suspend_resume_task = g_steal_pointer (&task);
|
||||
|
||||
fpi_device_suspend (device);
|
||||
}
|
||||
|
||||
/**
|
||||
* fp_device_suspend_finish:
|
||||
* @device: A #FpDevice
|
||||
* @result: A #GAsyncResult
|
||||
* @error: Return location for errors, or %NULL to ignore
|
||||
*
|
||||
* Finish an asynchronous operation to prepare the device for suspend.
|
||||
* See fp_device_suspend().
|
||||
*
|
||||
* The API user should accept an error of #FP_DEVICE_ERROR_NOT_SUPPORTED.
|
||||
*
|
||||
* Returns: (type void): %FALSE on error, %TRUE otherwise
|
||||
*/
|
||||
gboolean
|
||||
fp_device_suspend_finish (FpDevice *device,
|
||||
GAsyncResult *result,
|
||||
GError **error)
|
||||
{
|
||||
return g_task_propagate_boolean (G_TASK (result), error);
|
||||
}
|
||||
|
||||
/**
|
||||
* fp_device_resume:
|
||||
* @device: a #FpDevice
|
||||
* @cancellable: (nullable): a #GCancellable, or %NULL, currently not used
|
||||
* @callback: the function to call on completion
|
||||
* @user_data: the data to pass to @callback
|
||||
*
|
||||
* Resume device after system suspend. Retrieve the result with
|
||||
* fp_device_suspend_finish().
|
||||
*
|
||||
* Note that it is not defined when any ongoing operation may return (success or
|
||||
* error). You must be ready to handle this before, during or after the
|
||||
* resume operation.
|
||||
*/
|
||||
void
|
||||
fp_device_resume (FpDevice *device,
|
||||
GCancellable *cancellable,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data)
|
||||
{
|
||||
g_autoptr(GTask) task = NULL;
|
||||
FpDevicePrivate *priv = fp_device_get_instance_private (device);
|
||||
|
||||
task = g_task_new (device, cancellable, callback, user_data);
|
||||
|
||||
if (priv->suspend_resume_task || !priv->is_suspended)
|
||||
{
|
||||
g_task_return_error (task,
|
||||
fpi_device_error_new (FP_DEVICE_ERROR_BUSY));
|
||||
return;
|
||||
}
|
||||
|
||||
if (priv->is_removed)
|
||||
{
|
||||
g_task_return_error (task,
|
||||
fpi_device_error_new (FP_DEVICE_ERROR_REMOVED));
|
||||
return;
|
||||
}
|
||||
|
||||
priv->suspend_resume_task = g_steal_pointer (&task);
|
||||
|
||||
fpi_device_resume (device);
|
||||
}
|
||||
|
||||
/**
|
||||
* fp_device_resume_finish:
|
||||
* @device: A #FpDevice
|
||||
* @result: A #GAsyncResult
|
||||
* @error: Return location for errors, or %NULL to ignore
|
||||
*
|
||||
* Finish an asynchronous operation to resume the device after suspend.
|
||||
* See fp_device_resume().
|
||||
*
|
||||
* The API user should accept an error of #FP_DEVICE_ERROR_NOT_SUPPORTED.
|
||||
*
|
||||
* Returns: (type void): %FALSE on error, %TRUE otherwise
|
||||
*/
|
||||
gboolean
|
||||
fp_device_resume_finish (FpDevice *device,
|
||||
GAsyncResult *result,
|
||||
GError **error)
|
||||
{
|
||||
return g_task_propagate_boolean (G_TASK (result), error);
|
||||
}
|
||||
|
||||
static void
|
||||
enroll_data_free (FpEnrollData *data)
|
||||
{
|
||||
if (data->enroll_progress_destroy)
|
||||
data->enroll_progress_destroy (data->enroll_progress_data);
|
||||
data->enroll_progress_data = NULL;
|
||||
g_clear_object (&data->print);
|
||||
g_free (data);
|
||||
}
|
||||
|
||||
/**
|
||||
* fp_device_enroll:
|
||||
@@ -843,10 +1114,11 @@ fp_device_close_finish (FpDevice *device,
|
||||
* fp_device_enroll_finish().
|
||||
*
|
||||
* The @template_print parameter is a #FpPrint with available metadata filled
|
||||
* in. The driver may make use of this metadata, when e.g. storing the print on
|
||||
* device memory. It is undefined whether this print is filled in by the driver
|
||||
* and returned, or whether the driver will return a newly created print after
|
||||
* enrollment succeeded.
|
||||
* in and, optionally, with existing fingerprint data to be updated with newly
|
||||
* enrolled fingerprints if a device driver supports it. The driver may make use
|
||||
* of the metadata, when e.g. storing the print on device memory. It is undefined
|
||||
* whether this print is filled in by the driver and returned, or whether the
|
||||
* driver will return a newly created print after enrollment succeeded.
|
||||
*/
|
||||
void
|
||||
fp_device_enroll (FpDevice *device,
|
||||
@@ -874,7 +1146,7 @@ fp_device_enroll (FpDevice *device,
|
||||
return;
|
||||
}
|
||||
|
||||
if (priv->current_task)
|
||||
if (priv->current_task || priv->is_suspended)
|
||||
{
|
||||
g_task_return_error (task,
|
||||
fpi_device_error_new (FP_DEVICE_ERROR_BUSY));
|
||||
@@ -883,24 +1155,43 @@ fp_device_enroll (FpDevice *device,
|
||||
|
||||
if (!FP_IS_PRINT (template_print))
|
||||
{
|
||||
g_warning ("User did not pass a print template!");
|
||||
g_task_return_error (task,
|
||||
fpi_device_error_new (FP_DEVICE_ERROR_DATA_INVALID));
|
||||
fpi_device_error_new_msg (FP_DEVICE_ERROR_DATA_INVALID,
|
||||
"User did not pass a print template!"));
|
||||
return;
|
||||
}
|
||||
|
||||
g_object_get (template_print, "fpi-type", &print_type, NULL);
|
||||
if (print_type != FPI_PRINT_UNDEFINED)
|
||||
{
|
||||
g_warning ("Passed print template must be newly created and blank!");
|
||||
if (!fp_device_has_feature (device, FP_DEVICE_FEATURE_UPDATE_PRINT))
|
||||
{
|
||||
g_task_return_error (task,
|
||||
fpi_device_error_new (FP_DEVICE_ERROR_DATA_INVALID));
|
||||
fpi_device_error_new_msg (FP_DEVICE_ERROR_DATA_INVALID,
|
||||
"A device does not support print updates!"));
|
||||
return;
|
||||
}
|
||||
if (!fp_print_compatible (template_print, device))
|
||||
{
|
||||
g_task_return_error (task,
|
||||
fpi_device_error_new_msg (FP_DEVICE_ERROR_DATA_INVALID,
|
||||
"The print and device must have a matching driver and device id"
|
||||
" for a fingerprint update to succeed"));
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
fpi_device_update_temp (device, TRUE);
|
||||
if (priv->temp_current == FP_TEMPERATURE_HOT)
|
||||
{
|
||||
g_task_return_error (task, fpi_device_error_new (FP_DEVICE_ERROR_TOO_HOT));
|
||||
fpi_device_update_temp (device, FALSE);
|
||||
return;
|
||||
}
|
||||
|
||||
priv->current_action = FPI_DEVICE_ACTION_ENROLL;
|
||||
priv->current_task = g_steal_pointer (&task);
|
||||
maybe_cancel_on_cancelled (device, cancellable);
|
||||
setup_task_cancellable (device);
|
||||
|
||||
data = g_new0 (FpEnrollData, 1);
|
||||
data->print = g_object_ref_sink (template_print);
|
||||
@@ -935,6 +1226,23 @@ fp_device_enroll_finish (FpDevice *device,
|
||||
return g_task_propagate_pointer (G_TASK (result), error);
|
||||
}
|
||||
|
||||
static void
|
||||
match_data_free (FpMatchData *data)
|
||||
{
|
||||
g_clear_object (&data->print);
|
||||
g_clear_object (&data->match);
|
||||
g_clear_error (&data->error);
|
||||
|
||||
if (data->match_destroy)
|
||||
data->match_destroy (data->match_data);
|
||||
data->match_data = NULL;
|
||||
|
||||
g_clear_object (&data->enrolled_print);
|
||||
g_clear_pointer (&data->gallery, g_ptr_array_unref);
|
||||
|
||||
g_free (data);
|
||||
}
|
||||
|
||||
/**
|
||||
* fp_device_verify:
|
||||
* @device: a #FpDevice
|
||||
@@ -976,7 +1284,7 @@ fp_device_verify (FpDevice *device,
|
||||
return;
|
||||
}
|
||||
|
||||
if (priv->current_task)
|
||||
if (priv->current_task || priv->is_suspended)
|
||||
{
|
||||
g_task_return_error (task,
|
||||
fpi_device_error_new (FP_DEVICE_ERROR_BUSY));
|
||||
@@ -991,9 +1299,17 @@ fp_device_verify (FpDevice *device,
|
||||
return;
|
||||
}
|
||||
|
||||
fpi_device_update_temp (device, TRUE);
|
||||
if (priv->temp_current == FP_TEMPERATURE_HOT)
|
||||
{
|
||||
g_task_return_error (task, fpi_device_error_new (FP_DEVICE_ERROR_TOO_HOT));
|
||||
fpi_device_update_temp (device, FALSE);
|
||||
return;
|
||||
}
|
||||
|
||||
priv->current_action = FPI_DEVICE_ACTION_VERIFY;
|
||||
priv->current_task = g_steal_pointer (&task);
|
||||
maybe_cancel_on_cancelled (device, cancellable);
|
||||
setup_task_cancellable (device);
|
||||
|
||||
data = g_new0 (FpMatchData, 1);
|
||||
data->enrolled_print = g_object_ref (enrolled_print);
|
||||
@@ -1095,7 +1411,7 @@ fp_device_identify (FpDevice *device,
|
||||
return;
|
||||
}
|
||||
|
||||
if (priv->current_task)
|
||||
if (priv->current_task || priv->is_suspended)
|
||||
{
|
||||
g_task_return_error (task,
|
||||
fpi_device_error_new (FP_DEVICE_ERROR_BUSY));
|
||||
@@ -1110,9 +1426,25 @@ fp_device_identify (FpDevice *device,
|
||||
return;
|
||||
}
|
||||
|
||||
if (prints == NULL)
|
||||
{
|
||||
g_task_return_error (task,
|
||||
fpi_device_error_new_msg (FP_DEVICE_ERROR_DATA_INVALID,
|
||||
"Invalid gallery array"));
|
||||
return;
|
||||
}
|
||||
|
||||
fpi_device_update_temp (device, TRUE);
|
||||
if (priv->temp_current == FP_TEMPERATURE_HOT)
|
||||
{
|
||||
g_task_return_error (task, fpi_device_error_new (FP_DEVICE_ERROR_TOO_HOT));
|
||||
fpi_device_update_temp (device, FALSE);
|
||||
return;
|
||||
}
|
||||
|
||||
priv->current_action = FPI_DEVICE_ACTION_IDENTIFY;
|
||||
priv->current_task = g_steal_pointer (&task);
|
||||
maybe_cancel_on_cancelled (device, cancellable);
|
||||
setup_task_cancellable (device);
|
||||
|
||||
data = g_new0 (FpMatchData, 1);
|
||||
/* We cannot store the gallery directly, because the ptr array may not own
|
||||
@@ -1212,7 +1544,7 @@ fp_device_capture (FpDevice *device,
|
||||
return;
|
||||
}
|
||||
|
||||
if (priv->current_task)
|
||||
if (priv->current_task || priv->is_suspended)
|
||||
{
|
||||
g_task_return_error (task,
|
||||
fpi_device_error_new (FP_DEVICE_ERROR_BUSY));
|
||||
@@ -1227,9 +1559,17 @@ fp_device_capture (FpDevice *device,
|
||||
return;
|
||||
}
|
||||
|
||||
fpi_device_update_temp (device, TRUE);
|
||||
if (priv->temp_current == FP_TEMPERATURE_HOT)
|
||||
{
|
||||
g_task_return_error (task, fpi_device_error_new (FP_DEVICE_ERROR_TOO_HOT));
|
||||
fpi_device_update_temp (device, FALSE);
|
||||
return;
|
||||
}
|
||||
|
||||
priv->current_action = FPI_DEVICE_ACTION_CAPTURE;
|
||||
priv->current_task = g_steal_pointer (&task);
|
||||
maybe_cancel_on_cancelled (device, cancellable);
|
||||
setup_task_cancellable (device);
|
||||
|
||||
priv->wait_for_finger = wait_for_finger;
|
||||
|
||||
@@ -1295,7 +1635,7 @@ fp_device_delete_print (FpDevice *device,
|
||||
return;
|
||||
}
|
||||
|
||||
if (priv->current_task)
|
||||
if (priv->current_task || priv->is_suspended)
|
||||
{
|
||||
g_task_return_error (task,
|
||||
fpi_device_error_new (FP_DEVICE_ERROR_BUSY));
|
||||
@@ -1311,7 +1651,7 @@ fp_device_delete_print (FpDevice *device,
|
||||
|
||||
priv->current_action = FPI_DEVICE_ACTION_DELETE;
|
||||
priv->current_task = g_steal_pointer (&task);
|
||||
maybe_cancel_on_cancelled (device, cancellable);
|
||||
setup_task_cancellable (device);
|
||||
|
||||
g_task_set_task_data (priv->current_task,
|
||||
g_object_ref (enrolled_print),
|
||||
@@ -1373,7 +1713,7 @@ fp_device_list_prints (FpDevice *device,
|
||||
return;
|
||||
}
|
||||
|
||||
if (priv->current_task)
|
||||
if (priv->current_task || priv->is_suspended)
|
||||
{
|
||||
g_task_return_error (task,
|
||||
fpi_device_error_new (FP_DEVICE_ERROR_BUSY));
|
||||
@@ -1390,7 +1730,7 @@ fp_device_list_prints (FpDevice *device,
|
||||
|
||||
priv->current_action = FPI_DEVICE_ACTION_LIST;
|
||||
priv->current_task = g_steal_pointer (&task);
|
||||
maybe_cancel_on_cancelled (device, cancellable);
|
||||
setup_task_cancellable (device);
|
||||
|
||||
cls->list (device);
|
||||
}
|
||||
@@ -1475,7 +1815,7 @@ fp_device_clear_storage (FpDevice *device,
|
||||
|
||||
priv->current_action = FPI_DEVICE_ACTION_CLEAR_STORAGE;
|
||||
priv->current_task = g_steal_pointer (&task);
|
||||
maybe_cancel_on_cancelled (device, cancellable);
|
||||
setup_task_cancellable (device);
|
||||
|
||||
cls->clear_storage (device);
|
||||
|
||||
@@ -1769,6 +2109,7 @@ fp_device_list_prints_sync (FpDevice *device,
|
||||
return fp_device_list_prints_finish (device, task, error);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* fp_device_clear_storage_sync:
|
||||
* @device: a #FpDevice
|
||||
@@ -1797,6 +2138,58 @@ fp_device_clear_storage_sync (FpDevice *device,
|
||||
return fp_device_clear_storage_finish (device, task, error);
|
||||
}
|
||||
|
||||
/**
|
||||
* fp_device_suspend_sync:
|
||||
* @device: a #FpDevice
|
||||
* @cancellable: (nullable): a #GCancellable, or %NULL, currently not used
|
||||
* @error: Return location for errors, or %NULL to ignore
|
||||
*
|
||||
* Prepare device for suspend.
|
||||
*
|
||||
* Returns: (type void): %FALSE on error, %TRUE otherwise
|
||||
*/
|
||||
gboolean
|
||||
fp_device_suspend_sync (FpDevice *device,
|
||||
GCancellable *cancellable,
|
||||
GError **error)
|
||||
{
|
||||
g_autoptr(GAsyncResult) task = NULL;
|
||||
|
||||
g_return_val_if_fail (FP_IS_DEVICE (device), FALSE);
|
||||
|
||||
fp_device_suspend (device, cancellable, async_result_ready, &task);
|
||||
while (!task)
|
||||
g_main_context_iteration (NULL, TRUE);
|
||||
|
||||
return fp_device_suspend_finish (device, task, error);
|
||||
}
|
||||
|
||||
/**
|
||||
* fp_device_resume_sync:
|
||||
* @device: a #FpDevice
|
||||
* @cancellable: (nullable): a #GCancellable, or %NULL, currently not used
|
||||
* @error: Return location for errors, or %NULL to ignore
|
||||
*
|
||||
* Resume device after suspend.
|
||||
*
|
||||
* Returns: (type void): %FALSE on error, %TRUE otherwise
|
||||
*/
|
||||
gboolean
|
||||
fp_device_resume_sync (FpDevice *device,
|
||||
GCancellable *cancellable,
|
||||
GError **error)
|
||||
{
|
||||
g_autoptr(GAsyncResult) task = NULL;
|
||||
|
||||
g_return_val_if_fail (FP_IS_DEVICE (device), FALSE);
|
||||
|
||||
fp_device_resume (device, cancellable, async_result_ready, &task);
|
||||
while (!task)
|
||||
g_main_context_iteration (NULL, TRUE);
|
||||
|
||||
return fp_device_resume_finish (device, task, error);
|
||||
}
|
||||
|
||||
/**
|
||||
* fp_device_get_features:
|
||||
* @device: a #FpDevice
|
||||
|
||||
+48
-1
@@ -43,8 +43,8 @@ G_DECLARE_DERIVABLE_TYPE (FpDevice, fp_device, FP, DEVICE, GObject)
|
||||
*/
|
||||
typedef enum {
|
||||
FP_DEVICE_TYPE_VIRTUAL,
|
||||
FP_DEVICE_TYPE_UDEV,
|
||||
FP_DEVICE_TYPE_USB,
|
||||
FP_DEVICE_TYPE_UDEV,
|
||||
} FpDeviceType;
|
||||
|
||||
/**
|
||||
@@ -58,6 +58,8 @@ typedef enum {
|
||||
* @FP_DEVICE_FEATURE_STORAGE_DELETE: Supports deleting stored templates
|
||||
* @FP_DEVICE_FEATURE_STORAGE_CLEAR: Supports clearing the whole storage
|
||||
* @FP_DEVICE_FEATURE_DUPLICATES_CHECK: Natively supports duplicates detection
|
||||
* @FP_DEVICE_FEATURE_ALWAYS_ON: Whether the device can run continuously
|
||||
* @FP_DEVICE_FEATURE_UPDATE_PRINT: Supports updating an existing print record using new scans
|
||||
*/
|
||||
typedef enum /*< flags >*/ {
|
||||
FP_DEVICE_FEATURE_NONE = 0,
|
||||
@@ -69,6 +71,8 @@ typedef enum /*< flags >*/ {
|
||||
FP_DEVICE_FEATURE_STORAGE_DELETE = 1 << 5,
|
||||
FP_DEVICE_FEATURE_STORAGE_CLEAR = 1 << 6,
|
||||
FP_DEVICE_FEATURE_DUPLICATES_CHECK = 1 << 7,
|
||||
FP_DEVICE_FEATURE_ALWAYS_ON = 1 << 8,
|
||||
FP_DEVICE_FEATURE_UPDATE_PRINT = 1 << 9,
|
||||
} FpDeviceFeature;
|
||||
|
||||
/**
|
||||
@@ -81,6 +85,23 @@ typedef enum {
|
||||
FP_SCAN_TYPE_PRESS,
|
||||
} FpScanType;
|
||||
|
||||
/**
|
||||
* FpTemperature:
|
||||
* @FP_TEMPERATURE_COLD: Sensor is considered cold.
|
||||
* @FP_TEMPERATURE_WARM: Sensor is warm, usage time may be limited.
|
||||
* @FP_TEMPERATURE_HOT: Sensor is hot and cannot be used.
|
||||
*
|
||||
* When a device is created, it is assumed to be cold. Applications such as
|
||||
* fprintd may want to ensure all devices on the system are cold before
|
||||
* shutting down in order to ensure that the cool-off period is not violated
|
||||
* because the internal libfprint state about the device is lost.
|
||||
*/
|
||||
typedef enum {
|
||||
FP_TEMPERATURE_COLD,
|
||||
FP_TEMPERATURE_WARM,
|
||||
FP_TEMPERATURE_HOT,
|
||||
} FpTemperature;
|
||||
|
||||
/**
|
||||
* FpDeviceRetry:
|
||||
* @FP_DEVICE_RETRY_GENERAL: The scan did not succeed due to poor scan quality
|
||||
@@ -118,6 +139,7 @@ typedef enum {
|
||||
* @FP_DEVICE_ERROR_DATA_FULL: No space on device available for operation
|
||||
* @FP_DEVICE_ERROR_DATA_DUPLICATE: Enrolling template duplicates storaged templates
|
||||
* @FP_DEVICE_ERROR_REMOVED: The device has been removed.
|
||||
* @FP_DEVICE_ERROR_TOO_HOT: The device might be getting too hot
|
||||
*
|
||||
* Error codes for device operations. More specific errors from other domains
|
||||
* such as #G_IO_ERROR or #G_USB_DEVICE_ERROR may also be reported.
|
||||
@@ -135,6 +157,7 @@ typedef enum {
|
||||
FP_DEVICE_ERROR_DATA_DUPLICATE,
|
||||
/* Leave some room to add more DATA related errors */
|
||||
FP_DEVICE_ERROR_REMOVED = 0x100,
|
||||
FP_DEVICE_ERROR_TOO_HOT,
|
||||
} FpDeviceError;
|
||||
|
||||
GQuark fp_device_retry_quark (void);
|
||||
@@ -201,6 +224,7 @@ gboolean fp_device_is_open (FpDevice *device);
|
||||
FpScanType fp_device_get_scan_type (FpDevice *device);
|
||||
FpFingerStatusFlags fp_device_get_finger_status (FpDevice *device);
|
||||
gint fp_device_get_nr_enroll_stages (FpDevice *device);
|
||||
FpTemperature fp_device_get_temperature (FpDevice *device);
|
||||
|
||||
FpDeviceFeature fp_device_get_features (FpDevice *device);
|
||||
gboolean fp_device_has_feature (FpDevice *device,
|
||||
@@ -217,6 +241,16 @@ void fp_device_close (FpDevice *device,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data);
|
||||
|
||||
void fp_device_suspend (FpDevice *device,
|
||||
GCancellable *cancellable,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data);
|
||||
|
||||
void fp_device_resume (FpDevice *device,
|
||||
GCancellable *cancellable,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data);
|
||||
|
||||
void fp_device_enroll (FpDevice *device,
|
||||
FpPrint *template_print,
|
||||
GCancellable *cancellable,
|
||||
@@ -272,6 +306,12 @@ gboolean fp_device_open_finish (FpDevice *device,
|
||||
gboolean fp_device_close_finish (FpDevice *device,
|
||||
GAsyncResult *result,
|
||||
GError **error);
|
||||
gboolean fp_device_suspend_finish (FpDevice *device,
|
||||
GAsyncResult *result,
|
||||
GError **error);
|
||||
gboolean fp_device_resume_finish (FpDevice *device,
|
||||
GAsyncResult *result,
|
||||
GError **error);
|
||||
FpPrint *fp_device_enroll_finish (FpDevice *device,
|
||||
GAsyncResult *result,
|
||||
GError **error);
|
||||
@@ -340,6 +380,13 @@ GPtrArray * fp_device_list_prints_sync (FpDevice *device,
|
||||
gboolean fp_device_clear_storage_sync (FpDevice *device,
|
||||
GCancellable *cancellable,
|
||||
GError **error);
|
||||
gboolean fp_device_suspend_sync (FpDevice *device,
|
||||
GCancellable *cancellable,
|
||||
GError **error);
|
||||
gboolean fp_device_resume_sync (FpDevice *device,
|
||||
GCancellable *cancellable,
|
||||
GError **error);
|
||||
|
||||
/* Deprecated functions */
|
||||
G_DEPRECATED_FOR (fp_device_get_features)
|
||||
gboolean fp_device_supports_identify (FpDevice *device);
|
||||
|
||||
@@ -101,6 +101,7 @@ fp_image_device_start_capture_action (FpDevice *device)
|
||||
FpImageDevice *self = FP_IMAGE_DEVICE (device);
|
||||
FpImageDevicePrivate *priv = fp_image_device_get_instance_private (self);
|
||||
FpiDeviceAction action;
|
||||
FpiPrintType print_type;
|
||||
|
||||
/* There is just one action that we cannot support out
|
||||
* of the box, which is a capture without first waiting
|
||||
@@ -124,6 +125,8 @@ fp_image_device_start_capture_action (FpDevice *device)
|
||||
FpPrint *enroll_print = NULL;
|
||||
|
||||
fpi_device_get_enroll_data (device, &enroll_print);
|
||||
g_object_get (enroll_print, "fpi-type", &print_type, NULL);
|
||||
if (print_type != FPI_PRINT_NBIS)
|
||||
fpi_print_set_type (enroll_print, FPI_PRINT_NBIS);
|
||||
}
|
||||
|
||||
@@ -221,6 +224,7 @@ fp_image_device_class_init (FpImageDeviceClass *klass)
|
||||
fp_device_class->cancel = fp_image_device_cancel_action;
|
||||
|
||||
fpi_device_class_auto_initialize_features (fp_device_class);
|
||||
fp_device_class->features |= FP_DEVICE_FEATURE_UPDATE_PRINT;
|
||||
|
||||
/* Default implementations */
|
||||
klass->activate = fp_image_device_default_activate;
|
||||
|
||||
+123
-79
@@ -20,9 +20,11 @@
|
||||
|
||||
#define FP_COMPONENT "image"
|
||||
|
||||
#include "fpi-compat.h"
|
||||
#include "fpi-image.h"
|
||||
#include "fpi-log.h"
|
||||
|
||||
#include <config.h>
|
||||
#include <nbis.h>
|
||||
|
||||
/**
|
||||
@@ -158,60 +160,65 @@ fp_image_init (FpImage *self)
|
||||
|
||||
typedef struct
|
||||
{
|
||||
GAsyncReadyCallback user_cb;
|
||||
struct fp_minutiae *minutiae;
|
||||
gint width, height;
|
||||
gdouble ppmm;
|
||||
FpiImageFlags flags;
|
||||
guchar *image;
|
||||
guchar *binarized;
|
||||
} DetectMinutiaeData;
|
||||
FpiImageFlags flags;
|
||||
unsigned char *image;
|
||||
gboolean image_changed;
|
||||
} DetectMinutiaeNbisData;
|
||||
|
||||
static void
|
||||
fp_image_detect_minutiae_free (DetectMinutiaeData *data)
|
||||
fp_image_detect_minutiae_free (DetectMinutiaeNbisData *data)
|
||||
{
|
||||
g_clear_pointer (&data->image, g_free);
|
||||
g_clear_pointer (&data->minutiae, free_minutiae);
|
||||
g_clear_pointer (&data->binarized, g_free);
|
||||
|
||||
if (data->image_changed)
|
||||
g_clear_pointer (&data->image, g_free);
|
||||
|
||||
g_free (data);
|
||||
}
|
||||
|
||||
static void
|
||||
fp_image_detect_minutiae_cb (GObject *source_object,
|
||||
GAsyncResult *res,
|
||||
gpointer user_data)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DetectMinutiaeNbisData, fp_image_detect_minutiae_free)
|
||||
|
||||
|
||||
static gboolean
|
||||
fp_image_detect_minutiae_nbis_finish (FpImage *self,
|
||||
GTask *task,
|
||||
GError **error)
|
||||
{
|
||||
GTask *task = G_TASK (res);
|
||||
FpImage *image;
|
||||
DetectMinutiaeData *data = g_task_get_task_data (task);
|
||||
g_autoptr(DetectMinutiaeNbisData) data = NULL;
|
||||
|
||||
if (!g_task_had_error (task))
|
||||
data = g_task_propagate_pointer (task, error);
|
||||
|
||||
if (data != NULL)
|
||||
{
|
||||
gint i;
|
||||
image = FP_IMAGE (source_object);
|
||||
self->flags = data->flags;
|
||||
|
||||
image->flags = data->flags;
|
||||
|
||||
g_clear_pointer (&image->data, g_free);
|
||||
image->data = g_steal_pointer (&data->image);
|
||||
|
||||
g_clear_pointer (&image->binarized, g_free);
|
||||
image->binarized = g_steal_pointer (&data->binarized);
|
||||
|
||||
g_clear_pointer (&image->minutiae, g_ptr_array_unref);
|
||||
image->minutiae = g_ptr_array_new_full (data->minutiae->num,
|
||||
(GDestroyNotify) free_minutia);
|
||||
|
||||
for (i = 0; i < data->minutiae->num; i++)
|
||||
g_ptr_array_add (image->minutiae,
|
||||
g_steal_pointer (&data->minutiae->list[i]));
|
||||
|
||||
/* Don't let it delete anything. */
|
||||
data->minutiae->num = 0;
|
||||
if (data->image_changed)
|
||||
{
|
||||
g_clear_pointer (&self->data, g_free);
|
||||
self->data = g_steal_pointer (&data->image);
|
||||
}
|
||||
|
||||
if (data->user_cb)
|
||||
data->user_cb (source_object, res, user_data);
|
||||
g_clear_pointer (&self->binarized, g_free);
|
||||
self->binarized = g_steal_pointer (&data->binarized);
|
||||
|
||||
g_clear_pointer (&self->minutiae, g_ptr_array_unref);
|
||||
self->minutiae = g_ptr_array_new_full (data->minutiae->num,
|
||||
(GDestroyNotify) free_minutia);
|
||||
|
||||
for (int i = 0; i < data->minutiae->num; i++)
|
||||
g_ptr_array_add (self->minutiae,
|
||||
g_steal_pointer (&data->minutiae->list[i]));
|
||||
|
||||
/* Don't let free_minutiae delete the minutiae that we now own. */
|
||||
data->minutiae->num = 0;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -264,70 +271,83 @@ invert_colors (guint8 *data, gint width, gint height)
|
||||
}
|
||||
|
||||
static void
|
||||
fp_image_detect_minutiae_thread_func (GTask *task,
|
||||
fp_image_detect_minutiae_nbis_thread_func (GTask *task,
|
||||
gpointer source_object,
|
||||
gpointer task_data,
|
||||
GCancellable *cancellable)
|
||||
{
|
||||
g_autoptr(GTimer) timer = NULL;
|
||||
DetectMinutiaeData *data = task_data;
|
||||
struct fp_minutiae *minutiae = NULL;
|
||||
g_autoptr(DetectMinutiaeNbisData) ret_data = NULL;
|
||||
g_autoptr(GTask) thread_task = g_steal_pointer (&task);
|
||||
g_autofree gint *direction_map = NULL;
|
||||
g_autofree gint *low_contrast_map = NULL;
|
||||
g_autofree gint *low_flow_map = NULL;
|
||||
g_autofree gint *high_curve_map = NULL;
|
||||
g_autofree gint *quality_map = NULL;
|
||||
g_autofree guchar *bdata = NULL;
|
||||
g_autofree LFSPARMS *lfsparms = NULL;
|
||||
FpImage *self = source_object;
|
||||
FpiImageFlags minutiae_flags;
|
||||
unsigned char *image;
|
||||
gint map_w, map_h;
|
||||
gint bw, bh, bd;
|
||||
gint r;
|
||||
g_autofree LFSPARMS *lfsparms = NULL;
|
||||
|
||||
image = self->data;
|
||||
minutiae_flags = self->flags & ~(FPI_IMAGE_H_FLIPPED |
|
||||
FPI_IMAGE_V_FLIPPED |
|
||||
FPI_IMAGE_COLORS_INVERTED);
|
||||
|
||||
if (minutiae_flags != FPI_IMAGE_NONE)
|
||||
image = g_memdup2 (self->data, self->width * self->height);
|
||||
|
||||
ret_data = g_new0 (DetectMinutiaeNbisData, 1);
|
||||
ret_data->flags = minutiae_flags;
|
||||
ret_data->image = image;
|
||||
ret_data->image_changed = image != self->data;
|
||||
|
||||
/* Normalize the image first */
|
||||
if (data->flags & FPI_IMAGE_H_FLIPPED)
|
||||
hflip (data->image, data->width, data->height);
|
||||
if (self->flags & FPI_IMAGE_H_FLIPPED)
|
||||
hflip (image, self->width, self->height);
|
||||
|
||||
if (data->flags & FPI_IMAGE_V_FLIPPED)
|
||||
vflip (data->image, data->width, data->height);
|
||||
if (self->flags & FPI_IMAGE_V_FLIPPED)
|
||||
vflip (image, self->width, self->height);
|
||||
|
||||
if (data->flags & FPI_IMAGE_COLORS_INVERTED)
|
||||
invert_colors (data->image, data->width, data->height);
|
||||
if (self->flags & FPI_IMAGE_COLORS_INVERTED)
|
||||
invert_colors (image, self->width, self->height);
|
||||
|
||||
data->flags &= ~(FPI_IMAGE_H_FLIPPED | FPI_IMAGE_V_FLIPPED | FPI_IMAGE_COLORS_INVERTED);
|
||||
|
||||
lfsparms = g_memdup (&g_lfsparms_V2, sizeof (LFSPARMS));
|
||||
lfsparms->remove_perimeter_pts = data->flags & FPI_IMAGE_PARTIAL ? TRUE : FALSE;
|
||||
lfsparms = g_memdup2 (&g_lfsparms_V2, sizeof (LFSPARMS));
|
||||
lfsparms->remove_perimeter_pts = minutiae_flags & FPI_IMAGE_PARTIAL ? TRUE : FALSE;
|
||||
|
||||
timer = g_timer_new ();
|
||||
r = get_minutiae (&minutiae, &quality_map, &direction_map,
|
||||
r = get_minutiae (&ret_data->minutiae, &quality_map, &direction_map,
|
||||
&low_contrast_map, &low_flow_map, &high_curve_map,
|
||||
&map_w, &map_h, &bdata, &bw, &bh, &bd,
|
||||
data->image, data->width, data->height, 8,
|
||||
data->ppmm, lfsparms);
|
||||
&map_w, &map_h, &ret_data->binarized, &bw, &bh, &bd,
|
||||
image, self->width, self->height, 8,
|
||||
self->ppmm, lfsparms);
|
||||
g_timer_stop (timer);
|
||||
fp_dbg ("Minutiae scan completed in %f secs", g_timer_elapsed (timer, NULL));
|
||||
|
||||
data->binarized = g_steal_pointer (&bdata);
|
||||
data->minutiae = minutiae;
|
||||
if (g_task_had_error (thread_task))
|
||||
return;
|
||||
|
||||
if (r)
|
||||
{
|
||||
fp_err ("get minutiae failed, code %d", r);
|
||||
g_task_return_new_error (task, G_IO_ERROR, G_IO_ERROR_FAILED, "Minutiae scan failed with code %d", r);
|
||||
g_object_unref (task);
|
||||
g_task_return_new_error (thread_task, G_IO_ERROR,
|
||||
G_IO_ERROR_FAILED,
|
||||
"Minutiae scan failed with code %d", r);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!data->minutiae || data->minutiae->num == 0)
|
||||
if (!ret_data->minutiae || ret_data->minutiae->num == 0)
|
||||
{
|
||||
g_task_return_new_error (task, G_IO_ERROR, G_IO_ERROR_FAILED,
|
||||
g_task_return_new_error (thread_task, G_IO_ERROR, G_IO_ERROR_FAILED,
|
||||
"No minutiae found");
|
||||
g_object_unref (task);
|
||||
return;
|
||||
}
|
||||
|
||||
g_task_return_boolean (task, TRUE);
|
||||
g_object_unref (task);
|
||||
g_task_return_pointer (thread_task, g_steal_pointer (&ret_data),
|
||||
(GDestroyNotify) fp_image_detect_minutiae_free);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -443,21 +463,25 @@ fp_image_detect_minutiae (FpImage *self,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data)
|
||||
{
|
||||
GTask *task;
|
||||
DetectMinutiaeData *data = g_new0 (DetectMinutiaeData, 1);
|
||||
g_autoptr(GTask) task = NULL;
|
||||
|
||||
task = g_task_new (self, cancellable, fp_image_detect_minutiae_cb, user_data);
|
||||
g_return_if_fail (FP_IS_IMAGE (self));
|
||||
g_return_if_fail (callback != NULL);
|
||||
|
||||
data->image = g_malloc (self->width * self->height);
|
||||
memcpy (data->image, self->data, self->width * self->height);
|
||||
data->flags = self->flags;
|
||||
data->width = self->width;
|
||||
data->height = self->height;
|
||||
data->ppmm = self->ppmm;
|
||||
data->user_cb = callback;
|
||||
task = g_task_new (self, cancellable, callback, user_data);
|
||||
g_task_set_source_tag (task, fp_image_detect_minutiae);
|
||||
g_task_set_check_cancellable (task, TRUE);
|
||||
|
||||
g_task_set_task_data (task, data, (GDestroyNotify) fp_image_detect_minutiae_free);
|
||||
g_task_run_in_thread (task, fp_image_detect_minutiae_thread_func);
|
||||
if (!g_atomic_int_compare_and_exchange (&self->detection_in_progress,
|
||||
FALSE, TRUE))
|
||||
{
|
||||
g_task_return_new_error (task, G_IO_ERROR, G_IO_ERROR_ADDRESS_IN_USE,
|
||||
"Minutiae detection is already in progress");
|
||||
return;
|
||||
}
|
||||
|
||||
g_task_run_in_thread (g_steal_pointer (&task),
|
||||
fp_image_detect_minutiae_nbis_thread_func);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -475,7 +499,27 @@ fp_image_detect_minutiae_finish (FpImage *self,
|
||||
GAsyncResult *result,
|
||||
GError **error)
|
||||
{
|
||||
return g_task_propagate_boolean (G_TASK (result), error);
|
||||
GTask *task;
|
||||
gboolean changed;
|
||||
|
||||
g_return_val_if_fail (FP_IS_IMAGE (self), FALSE);
|
||||
g_return_val_if_fail (g_task_is_valid (result, self), FALSE);
|
||||
g_return_val_if_fail (g_task_get_source_tag (G_TASK (result)) ==
|
||||
fp_image_detect_minutiae, FALSE);
|
||||
|
||||
task = G_TASK (result);
|
||||
changed = g_atomic_int_compare_and_exchange (&self->detection_in_progress,
|
||||
TRUE, FALSE);
|
||||
g_assert (changed);
|
||||
|
||||
if (g_task_had_error (task))
|
||||
{
|
||||
gpointer data = g_task_propagate_pointer (task, error);
|
||||
g_assert (data == NULL);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return fp_image_detect_minutiae_nbis_finish (self, task, error);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+30
-7
@@ -61,6 +61,7 @@ enum {
|
||||
/* Private property*/
|
||||
PROP_FPI_TYPE,
|
||||
PROP_FPI_DATA,
|
||||
PROP_FPI_PRINTS,
|
||||
N_PROPS
|
||||
};
|
||||
|
||||
@@ -133,6 +134,10 @@ fp_print_get_property (GObject *object,
|
||||
g_value_set_variant (value, self->data);
|
||||
break;
|
||||
|
||||
case PROP_FPI_PRINTS:
|
||||
g_value_set_pointer (value, self->prints);
|
||||
break;
|
||||
|
||||
default:
|
||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
||||
}
|
||||
@@ -188,6 +193,11 @@ fp_print_set_property (GObject *object,
|
||||
self->data = g_value_dup_variant (value);
|
||||
break;
|
||||
|
||||
case PROP_FPI_PRINTS:
|
||||
g_clear_pointer (&self->prints, g_ptr_array_unref);
|
||||
self->prints = g_value_get_pointer (value);
|
||||
break;
|
||||
|
||||
default:
|
||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
||||
}
|
||||
@@ -281,7 +291,7 @@ fp_print_class_init (FpPrintClass *klass)
|
||||
"Type",
|
||||
"Private: The type of the print data",
|
||||
FPI_TYPE_PRINT_TYPE,
|
||||
FPI_PRINT_RAW,
|
||||
FPI_PRINT_UNDEFINED,
|
||||
G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY);
|
||||
|
||||
/**
|
||||
@@ -299,6 +309,19 @@ fp_print_class_init (FpPrintClass *klass)
|
||||
NULL,
|
||||
G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE);
|
||||
|
||||
/**
|
||||
* FpPrint::fpi-prints: (skip)
|
||||
*
|
||||
* This property is only for internal purposes.
|
||||
*
|
||||
* Stability: private
|
||||
*/
|
||||
properties[PROP_FPI_PRINTS] =
|
||||
g_param_spec_pointer ("fpi-prints",
|
||||
"Prints",
|
||||
"Prints for internal use only",
|
||||
G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE);
|
||||
|
||||
g_object_class_install_properties (object_class, N_PROPS, properties);
|
||||
}
|
||||
|
||||
@@ -316,7 +339,7 @@ fp_print_init (FpPrint *self)
|
||||
* create a new print, fill in the relevant metadata, and then start
|
||||
* enrollment.
|
||||
*
|
||||
* Returns: (transfer floating): A newyl created #FpPrint
|
||||
* Returns: (transfer floating): A newly created #FpPrint
|
||||
*/
|
||||
FpPrint *
|
||||
fp_print_new (FpDevice *device)
|
||||
@@ -698,13 +721,12 @@ fp_print_serialize (FpPrint *print,
|
||||
|
||||
result = g_variant_builder_end (&builder);
|
||||
|
||||
if (G_BYTE_ORDER == G_BIG_ENDIAN)
|
||||
{
|
||||
#if (G_BYTE_ORDER == G_BIG_ENDIAN)
|
||||
GVariant *tmp;
|
||||
tmp = g_variant_byteswap (result);
|
||||
g_variant_unref (result);
|
||||
result = tmp;
|
||||
}
|
||||
#endif
|
||||
|
||||
len = g_variant_get_size (result);
|
||||
/* Add 3 bytes of header */
|
||||
@@ -777,10 +799,11 @@ fp_print_deserialize (const guchar *data,
|
||||
if (!raw_value)
|
||||
goto invalid_format;
|
||||
|
||||
if (G_BYTE_ORDER == G_BIG_ENDIAN)
|
||||
#if (G_BYTE_ORDER == G_BIG_ENDIAN)
|
||||
value = g_variant_byteswap (raw_value);
|
||||
else
|
||||
#else
|
||||
value = g_variant_get_normal_form (raw_value);
|
||||
#endif
|
||||
|
||||
g_variant_get (value,
|
||||
"(i&s&sbymsmsi@a{sv}v)",
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "fp-image.h"
|
||||
#include "tod/tod-macros.h"
|
||||
|
||||
/**
|
||||
* fpi_frame:
|
||||
@@ -110,6 +111,9 @@ struct fpi_line_asmbl_ctx
|
||||
unsigned char (*get_pixel)(struct fpi_line_asmbl_ctx *ctx,
|
||||
GSList *line,
|
||||
unsigned int x);
|
||||
|
||||
/*< private >*/
|
||||
TOD_PADDING (32, 0);
|
||||
};
|
||||
|
||||
FpImage *fpi_assemble_lines (struct fpi_line_asmbl_ctx *ctx,
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user