mirror of
https://gitlab.freedesktop.org/libfprint/libfprint.git
synced 2026-09-10 21:06:51 +00:00
Compare commits
5
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
788fd9ca7a | ||
|
|
8c5eede914 | ||
|
|
07c8481bf6 | ||
|
|
d435fc7c2c | ||
|
|
dc3b5e52ac |
@@ -1,10 +0,0 @@
|
|||||||
# The commits that did automated reformatting. You can ignore them
|
|
||||||
# during git-blame with `--ignore-rev` or `--ignore-revs-file`.
|
|
||||||
#
|
|
||||||
# $ git config --add 'blame.ignoreRevsFile' '.git-blame-ignore-revs'
|
|
||||||
#
|
|
||||||
|
|
||||||
d1fb1e26f3b79e54febc94496c1184763cf2af3d
|
|
||||||
e4f9935706be4c0e3253afe251c182019ff7ccef
|
|
||||||
65e602d8c72baa7020efb62d10bf28e621feb05d
|
|
||||||
4115ae7ced77d392ee11ea55212206d9404356f0
|
|
||||||
+22
-1
@@ -1,3 +1,24 @@
|
|||||||
|
ltmain.sh
|
||||||
|
missing
|
||||||
|
stamp-h1
|
||||||
|
libtool
|
||||||
|
*.la
|
||||||
|
*.lo
|
||||||
*.o
|
*.o
|
||||||
*.swp
|
*.swp
|
||||||
_build
|
Makefile
|
||||||
|
Makefile.in
|
||||||
|
config.h*
|
||||||
|
aclocal.m4
|
||||||
|
autom4te.cache
|
||||||
|
config.guess
|
||||||
|
config.log
|
||||||
|
config.status
|
||||||
|
config.sub
|
||||||
|
configure
|
||||||
|
depcomp
|
||||||
|
install-sh
|
||||||
|
.deps
|
||||||
|
.libs
|
||||||
|
compile
|
||||||
|
ChangeLog
|
||||||
|
|||||||
+100
-192
@@ -1,56 +1,36 @@
|
|||||||
include:
|
|
||||||
- local: '.gitlab-ci/libfprint-image-variables.yaml'
|
|
||||||
- local: '.gitlab-ci/libfprint-templates.yaml'
|
|
||||||
- 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:
|
variables:
|
||||||
extends: .libfprint_common_variables
|
FEDORA_TAG: rawhide
|
||||||
FDO_DISTRIBUTION_TAG: $LIBFPRINT_IMAGE_TAG
|
FEDORA_VERSION: rawhide
|
||||||
FDO_DISTRIBUTION_VERSION: rawhide
|
FEDORA_IMAGE: "$CI_REGISTRY/libfprint/$CI_PROJECT_NAME/fedora/$FEDORA_VERSION:$FEDORA_TAG"
|
||||||
FDO_UPSTREAM_REPO: "libfprint/$CI_PROJECT_NAME"
|
BUNDLE: "org.freedesktop.libfprint.Demo.flatpak"
|
||||||
FEDORA_IMAGE: "$CI_REGISTRY/libfprint/$CI_PROJECT_NAME/fedora/$FDO_DISTRIBUTION_VERSION:$FDO_DISTRIBUTION_TAG"
|
|
||||||
LAST_ABI_BREAK: "056ea541ddc97f5806cffbd99a12dc87e4da3546"
|
LAST_ABI_BREAK: "056ea541ddc97f5806cffbd99a12dc87e4da3546"
|
||||||
|
|
||||||
workflow:
|
include:
|
||||||
rules:
|
- project: 'wayland/ci-templates'
|
||||||
- if: $CI_PIPELINE_SOURCE == 'merge_request_event'
|
ref: master
|
||||||
- if: $CI_PIPELINE_SOURCE == 'push'
|
file: '/templates/fedora.yml'
|
||||||
|
|
||||||
stages:
|
stages:
|
||||||
- image-build
|
|
||||||
- check-source
|
- check-source
|
||||||
- build
|
- build
|
||||||
- test
|
- test
|
||||||
- flatpak
|
- flatpack
|
||||||
|
|
||||||
image: $FEDORA_IMAGE
|
image: "$FEDORA_IMAGE"
|
||||||
|
|
||||||
.build_one_driver_template: &build_one_driver
|
.build_one_driver_template: &build_one_driver
|
||||||
script:
|
script:
|
||||||
# Build with a driver that doesn't need imaging, or nss
|
# Build with a driver that doesn't need imaging, or nss
|
||||||
- meson setup _build --werror -Ddrivers=$driver
|
- meson --werror -Ddrivers=$driver . _build
|
||||||
- meson compile -C _build
|
- ninja -C _build
|
||||||
- rm -rf _build/
|
- rm -rf _build/
|
||||||
|
|
||||||
.build_template: &build
|
.build_template: &build
|
||||||
script:
|
script:
|
||||||
# And build with everything
|
# And build with everything
|
||||||
- meson setup _build --werror -Ddrivers=all
|
- meson --werror -Ddrivers=all . _build
|
||||||
- meson compile -C _build
|
- ninja -C _build
|
||||||
- meson install -C _build
|
- ninja -C _build install
|
||||||
|
|
||||||
.build_template: &check_abi
|
.build_template: &check_abi
|
||||||
script:
|
script:
|
||||||
@@ -66,12 +46,6 @@ build:
|
|||||||
<<: *build_one_driver
|
<<: *build_one_driver
|
||||||
<<: *build
|
<<: *build
|
||||||
# <<: *check_abi
|
# <<: *check_abi
|
||||||
artifacts:
|
|
||||||
expose_as: "HTML Documentation"
|
|
||||||
paths:
|
|
||||||
- _build/doc/html
|
|
||||||
- _build/doc/html/index.html
|
|
||||||
expire_in: 1 week
|
|
||||||
|
|
||||||
test:
|
test:
|
||||||
stage: test
|
stage: test
|
||||||
@@ -79,84 +53,24 @@ test:
|
|||||||
variables:
|
variables:
|
||||||
- $CI_PIPELINE_SOURCE == "schedule"
|
- $CI_PIPELINE_SOURCE == "schedule"
|
||||||
script:
|
script:
|
||||||
- meson setup _build --werror -Ddrivers=all -Db_coverage=true
|
- meson --werror -Ddrivers=all -Db_coverage=true . _build
|
||||||
- meson test -C _build --print-errorlogs --no-stdsplit --timeout-multiplier 3
|
- ninja -C _build
|
||||||
|
- meson test -C _build --verbose --no-stdsplit --timeout-multiplier 3
|
||||||
- ninja -C _build coverage
|
- ninja -C _build coverage
|
||||||
- cat _build/meson-logs/coverage.txt || true
|
|
||||||
artifacts:
|
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:
|
paths:
|
||||||
- _build/meson-logs
|
- _build/meson-logs
|
||||||
- _build/meson-logs/coveragereport/index.html
|
|
||||||
expire_in: 1 week
|
expire_in: 1 week
|
||||||
coverage: '/^TOTAL.*\s+(\d+\%)$/'
|
|
||||||
|
|
||||||
test_valgrind:
|
test_valgrind:
|
||||||
stage: test
|
stage: test
|
||||||
allow_failure: true
|
|
||||||
except:
|
except:
|
||||||
variables:
|
variables:
|
||||||
- $CI_PIPELINE_SOURCE == "schedule"
|
- $CI_PIPELINE_SOURCE == "schedule"
|
||||||
script:
|
script:
|
||||||
- meson setup _build -Ddrivers=all
|
- meson -Ddrivers=all . _build
|
||||||
- meson compile -C _build
|
- ninja -C _build
|
||||||
- meson test -C _build --print-errorlogs --no-stdsplit --setup=valgrind
|
- meson test -C _build --verbose --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
|
|
||||||
except:
|
|
||||||
variables:
|
|
||||||
- $CI_PIPELINE_SOURCE == "schedule"
|
|
||||||
allow_failure: true
|
|
||||||
script:
|
|
||||||
- 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
|
|
||||||
artifacts:
|
|
||||||
when: on_failure
|
|
||||||
paths:
|
|
||||||
- _build/meson-logs
|
|
||||||
expire_in: 1 week
|
|
||||||
|
|
||||||
test_indent:
|
test_indent:
|
||||||
stage: check-source
|
stage: check-source
|
||||||
@@ -164,96 +78,90 @@ test_indent:
|
|||||||
variables:
|
variables:
|
||||||
- $CI_PIPELINE_SOURCE == "schedule"
|
- $CI_PIPELINE_SOURCE == "schedule"
|
||||||
script:
|
script:
|
||||||
- scripts/uncrustify.sh
|
- scripts/uncrustify.sh --check
|
||||||
- git diff
|
|
||||||
- git diff-index --name-only --exit-code HEAD
|
|
||||||
|
|
||||||
test_unsupported_list:
|
.flatpak_script_template: &flatpak_script
|
||||||
stage: check-source
|
script:
|
||||||
except:
|
- flatpak-builder --stop-at=${FLATPAK_MODULE} app ${MANIFEST_PATH}
|
||||||
|
# Make sure to keep this in sync with the Flatpak manifest, all arguments
|
||||||
|
# are passed except the config-args because we build it ourselves
|
||||||
|
- flatpak build app meson --prefix=/app --libdir=lib ${MESON_ARGS} _build
|
||||||
|
- flatpak build app ninja -C _build install
|
||||||
|
- flatpak build app rm -rf /app/include/ /app/lib/pkgconfig/
|
||||||
|
- flatpak-builder --finish-only --repo=repo app ${MANIFEST_PATH}
|
||||||
|
# Generate a Flatpak bundle
|
||||||
|
- flatpak build-bundle repo ${BUNDLE} --runtime-repo=${RUNTIME_REPO} ${DBUS_ID}
|
||||||
|
|
||||||
|
.flatpak_artifacts_template: &flatpak_artifacts
|
||||||
|
artifacts:
|
||||||
|
paths:
|
||||||
|
- ${BUNDLE}
|
||||||
|
when: always
|
||||||
|
expire_in: 30 days
|
||||||
|
|
||||||
|
.flatpak_template: &flatpak
|
||||||
|
<<: *flatpak_script
|
||||||
|
<<: *flatpak_artifacts
|
||||||
|
|
||||||
|
.flatpak_master_template: &flatpak_master
|
||||||
|
image: registry.gitlab.gnome.org/gnome/gnome-runtime-images/gnome:3.32
|
||||||
|
stage: flatpack
|
||||||
|
except:
|
||||||
|
variables:
|
||||||
|
- $CI_PIPELINE_SOURCE == "schedule"
|
||||||
variables:
|
variables:
|
||||||
- $CI_PIPELINE_SOURCE == "schedule"
|
MANIFEST_PATH: "demo/org.freedesktop.libfprint.Demo.json"
|
||||||
allow_failure: true
|
# From demo/org.freedesktop.libfprint.Demo.json
|
||||||
script:
|
MESON_ARGS: "-Dudev_rules=false -Dx11-examples=false -Dgtk-examples=true"
|
||||||
- tests/hwdb-check-unsupported.py
|
FLATPAK_MODULE: "libfprint"
|
||||||
|
DBUS_ID: "org.freedesktop.libfprint.Demo"
|
||||||
|
<<: *flatpak
|
||||||
|
|
||||||
flatpak:
|
flatpak-auto master:
|
||||||
stage: flatpak
|
<<: *flatpak_master
|
||||||
extends: .flatpak@x86_64
|
when: always
|
||||||
variables:
|
only:
|
||||||
MANIFEST_PATH: "demo/org.freedesktop.libfprint.Demo.json"
|
- tags
|
||||||
FLATPAK_MODULE: "libfprint"
|
- master
|
||||||
APP_ID: "org.freedesktop.libfprint.Demo"
|
|
||||||
BUNDLE: "org.freedesktop.libfprint.Demo.flatpak"
|
flatpak-manual master:
|
||||||
RUNTIME_REPO: "https://nightly.gnome.org/gnome-nightly.flatpakrepo"
|
<<: *flatpak_master
|
||||||
# Build with any builder
|
when: manual
|
||||||
tags: []
|
except:
|
||||||
rules:
|
- tags
|
||||||
- if: '$CI_PROJECT_PATH != "libfprint/libfprint"'
|
- master
|
||||||
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
|
# CONTAINERS creation stage
|
||||||
.container_fedora_build_base:
|
container_fedora_build:
|
||||||
extends: .fdo.container-build@fedora
|
extends: .fedora@container-build
|
||||||
stage: image-build
|
|
||||||
only:
|
|
||||||
variables:
|
|
||||||
- $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
|
|
||||||
FDO_DISTRIBUTION_PACKAGES:
|
|
||||||
$LIBFPRINT_DEPENDENCIES
|
|
||||||
vala
|
|
||||||
libpcap-devel
|
|
||||||
libudev-devel
|
|
||||||
FDO_DISTRIBUTION_EXEC: |
|
|
||||||
$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:
|
only:
|
||||||
variables:
|
variables:
|
||||||
- $CI_PIPELINE_SOURCE == "schedule" && $CRON_TASK == "BUILD_CI_IMAGES"
|
- $CI_PIPELINE_SOURCE == "schedule" && $CRON_TASK == "BUILD_CI_IMAGES"
|
||||||
|
variables:
|
||||||
container_fedora_build_manual:
|
GIT_STRATEGY: none # no need to pull the whole tree for rebuilding the image
|
||||||
extends:
|
# a list of packages to install
|
||||||
- .container_fedora_build_base
|
FEDORA_RPMS:
|
||||||
- .container_fedora_build_forced
|
doxygen
|
||||||
only:
|
flatpak-builder
|
||||||
variables:
|
gcc
|
||||||
- $LIBFPRINT_CI_ACTION == "build-image"
|
gcc-c++
|
||||||
|
gcovr
|
||||||
container_fedora_build_on_deps_changed:
|
git
|
||||||
extends: .container_fedora_build_base
|
glib2-devel
|
||||||
only:
|
glibc-devel
|
||||||
variables:
|
gobject-introspection-devel
|
||||||
- $CI_PROJECT_NAMESPACE == "libfprint" && $CI_PIPELINE_SOURCE != "schedule"
|
gtk-doc
|
||||||
refs:
|
gtk3-devel
|
||||||
- branches
|
libabigail
|
||||||
- merge_requests
|
libgusb-devel
|
||||||
changes:
|
libX11-devel
|
||||||
- .gitlab-ci/libfprint-image-variables.yaml
|
libXv-devel
|
||||||
|
meson
|
||||||
|
nss-devel
|
||||||
|
pixman-devel
|
||||||
|
python3-cairo
|
||||||
|
python3-gobject
|
||||||
|
systemd
|
||||||
|
umockdev
|
||||||
|
uncrustify
|
||||||
|
valgrind
|
||||||
|
|||||||
@@ -1,2 +0,0 @@
|
|||||||
variables:
|
|
||||||
LIBFPRINT_IMAGE_TAG: v3
|
|
||||||
@@ -1,49 +0,0 @@
|
|||||||
# 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++
|
|
||||||
gcovr
|
|
||||||
git
|
|
||||||
glib2-devel
|
|
||||||
glibc-devel
|
|
||||||
gobject-introspection-devel
|
|
||||||
gnome-desktop-testing
|
|
||||||
gtk-doc
|
|
||||||
gtk3-devel
|
|
||||||
libabigail
|
|
||||||
libgusb-devel
|
|
||||||
libgudev-devel
|
|
||||||
libX11-devel
|
|
||||||
libXv-devel
|
|
||||||
meson
|
|
||||||
nss-devel
|
|
||||||
pixman-devel
|
|
||||||
python3-cairo
|
|
||||||
python3-gobject
|
|
||||||
systemd
|
|
||||||
umockdev
|
|
||||||
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,4 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
# This wrapper just disables the malloc checker
|
|
||||||
exec /usr/bin/scan-build --status-bugs -disable-checker unix.Malloc "$@"
|
|
||||||
-13
@@ -1,13 +0,0 @@
|
|||||||
Current maintainers of libfprint are:
|
|
||||||
|
|
||||||
* Benjamin Berg <bberg@redhat.com>
|
|
||||||
* Marco Trevisan (Treviño) <mail@3v1n0.net>
|
|
||||||
|
|
||||||
Many drivers are not actively maintained and may not be fully functional.
|
|
||||||
We are happy to receive contributions, but the support we can give is
|
|
||||||
limitted unfortunately. For many drivers we may not even have test devices.
|
|
||||||
|
|
||||||
Maintained drivers are:
|
|
||||||
* synaptics:
|
|
||||||
Contributed and maintained by Synaptics Inc.
|
|
||||||
Contact: Vincent Huang <vincent.huang@tw.synaptics.com>
|
|
||||||
@@ -1,274 +1,6 @@
|
|||||||
This file lists notable changes in each release. For the full history of all
|
This file lists notable changes in each release. For the full history of all
|
||||||
changes, see ChangeLog.
|
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:
|
|
||||||
* Support for SPI devices was added together with the elanspi driver
|
|
||||||
* Generate hwdb for autosuspend (which is now pulled by systemd)
|
|
||||||
* An API was added to clear the device storage.
|
|
||||||
Note: Devices may not implement the "list" API anymore.
|
|
||||||
* Device features can now be queried using a common API
|
|
||||||
|
|
||||||
New drivers:
|
|
||||||
* vfs7552
|
|
||||||
* nb1010
|
|
||||||
* elanspi
|
|
||||||
|
|
||||||
Driver changes:
|
|
||||||
* uru4000: Fix deactivation when unplugged unexpectedly
|
|
||||||
* goodixmoc: Correctly complete verify/identify after retry condition
|
|
||||||
* goodixmoc: Support power shield feature
|
|
||||||
* goodixmoc: Support new PIDs
|
|
||||||
* synaptics: Fix driver lockup when sequence counter overflows (#358)
|
|
||||||
* synaptics: Remove unnecessary device reset
|
|
||||||
* synaptics: Support new PIDs
|
|
||||||
* synaptics: Add clear_storage and remove list support
|
|
||||||
* synaptics: Fix initialization if the device is still busy when opening
|
|
||||||
* upeksonly: Fix double free in USB transfer callbacks
|
|
||||||
* elan: Support new PIDs
|
|
||||||
* vfs301: Fix leak of USB transfer
|
|
||||||
* uru4000: Silence warning happening during startup
|
|
||||||
|
|
||||||
Internal API changes:
|
|
||||||
* ssm: Add getter for the device
|
|
||||||
* ssm: Add cleanup state feature
|
|
||||||
* image-device: Allow overriding number of enroll stages
|
|
||||||
* context: Support udev based device discovery
|
|
||||||
* spi-transfer: Add SPI transfer helper routines
|
|
||||||
|
|
||||||
Other:
|
|
||||||
* Use pcap based USB replay for CI
|
|
||||||
* New virtual drivers for more advanced testing
|
|
||||||
* Ensure async operations are run in the thread local main context
|
|
||||||
* Disable drivers on big-endian unless they are verified to work
|
|
||||||
* Add missing gobject-introspection dependency
|
|
||||||
|
|
||||||
|
|
||||||
2020-12-01: v1.90.7 release
|
|
||||||
|
|
||||||
Highlights:
|
|
||||||
* vfs5011: Fix possible use-after-free
|
|
||||||
* goodixmoc: Add two new PIDs (0x63AC, 0x639C)
|
|
||||||
* goodixmoc: Support finger status API
|
|
||||||
* synaptics: Only identify within provided prints
|
|
||||||
* synaptics: Reject devices with old firmware during probe (#239)
|
|
||||||
|
|
||||||
|
|
||||||
2020-12-01: v1.90.6 release
|
|
||||||
|
|
||||||
This release is primarily a bugfix release for some older issues.
|
|
||||||
|
|
||||||
The major change is that fp_print_deserialize will now correctly return a
|
|
||||||
sunken reference rather than a floating one. Most API users will have
|
|
||||||
assumed this was true, and issues could happen at a later point.
|
|
||||||
If any API user worked around this libfprint bug, they will now leak the
|
|
||||||
returned print.
|
|
||||||
|
|
||||||
Highlights:
|
|
||||||
* Object reference management fixes for FpPrint and identify
|
|
||||||
* Fixed issues that caused problem on non-x86 machines (#236)
|
|
||||||
* Fix building with older GLib versions
|
|
||||||
* synaptics: Support PID 00e7
|
|
||||||
* goodix: Fix issue with long USB packages
|
|
||||||
|
|
||||||
|
|
||||||
2020-12-01: v1.90.5 release
|
|
||||||
|
|
||||||
The 1.90.4 release caused a major regression, as it included a USB hub in
|
|
||||||
UDEV the autosupend rule list.
|
|
||||||
|
|
||||||
Highlights:
|
|
||||||
* Remove USB hub from udev autosupend rules
|
|
||||||
* synaptics: Add PID 0x00c9 which is used in some HP laptops
|
|
||||||
|
|
||||||
|
|
||||||
2020-11-27: v1.90.4 release
|
|
||||||
|
|
||||||
This release contains a number of important bugfixes. On the feature side,
|
|
||||||
the USB hotplug support was improved. A lot of drivers received fixes and
|
|
||||||
improvements.
|
|
||||||
|
|
||||||
Highlights:
|
|
||||||
* Work around GUsb cancellation issue
|
|
||||||
* Redefine internal image device state machine for more robustness
|
|
||||||
* Add public finger-status reporting to FpDevice
|
|
||||||
* Rework device removal API to be convenient (#330)
|
|
||||||
* Enable powersave for unsupported USB devices
|
|
||||||
* Improvements to examples
|
|
||||||
* synaptics: Support identify operation
|
|
||||||
* synaptics: Fix possible crash when the interrupt transfer is resubmitted
|
|
||||||
* synaptics: Add support for PIDs 0x00f9, 0x00fc and 0x00c2
|
|
||||||
* elan: Add PID 0x0c4d to supported device list
|
|
||||||
* aes3k: Fix driver and add CI test (#306)
|
|
||||||
* uru4000: Fix reference counting of image transfer
|
|
||||||
* vfs301: Fix driver and add CI test (#320)
|
|
||||||
|
|
||||||
2020-06-08: v1.90.3 release
|
|
||||||
|
|
||||||
This release mostly contains support for a number of new match-on-chip
|
|
||||||
devices. Most notable is the addition of the new goodixmoc driver.
|
|
||||||
Currently the driver has the small caveat that we have no strategy to
|
|
||||||
garbage collect old prints yet (a simple strategy could be implemented
|
|
||||||
in fprintd).
|
|
||||||
|
|
||||||
Highlights:
|
|
||||||
* New goodixmoc driver supporting Goodix USB devices:
|
|
||||||
27C6:5840
|
|
||||||
27C6:6496
|
|
||||||
27C6:60A2
|
|
||||||
* Newly added support for Synaptics device:
|
|
||||||
06CB:00E9
|
|
||||||
06CB:00DF
|
|
||||||
* Fixed an issue with Synaptics devices sometimes not working at boot
|
|
||||||
* Fix issue with aes3k driver (#306)
|
|
||||||
|
|
||||||
2020-06-08: v1.90.2 release
|
|
||||||
|
|
||||||
This release contains a large amount of bug and regression fixes. These
|
|
||||||
are not listed explicitly, but affect the majority of drivers.
|
|
||||||
|
|
||||||
Highlights:
|
|
||||||
* A patch for nbis required for some sensors was accidentally dropped in
|
|
||||||
an earlier release. Users of these sensors/drivers (aes1610, aes2501,
|
|
||||||
aes2550, aes1660, aes2660, elan, upektc_img) need to re-enroll (#142).
|
|
||||||
|
|
||||||
2019-11-20: v1.90.1 release
|
|
||||||
|
|
||||||
This release fixes a lot of the regressions introduced in 1.90.0. Please note
|
|
||||||
that both the driver and external APIs have changed, as both the verify and
|
|
||||||
the identify functions now have early reporting mechanisms.
|
|
||||||
The soname for the library, as well as a number of file locations have also
|
|
||||||
changed. While this allows installation in parallel with the 1.0 version of
|
|
||||||
libfprint, we recommend installing only one, and migrating from version 1.0 to
|
|
||||||
version 2.0 alongside its main consumer (fprintd).
|
|
||||||
|
|
||||||
Only major changes are listed below. A lot of other cleanup work and small
|
|
||||||
fixes have also been merged.
|
|
||||||
|
|
||||||
* Library:
|
|
||||||
- Add support to run tests in gdb/valgrind
|
|
||||||
- Allow testing on all architectures
|
|
||||||
- Avoid image device AWAIT_FINGER_ON to deactivate state transitions
|
|
||||||
- Fix verify/identify error propagation to library user
|
|
||||||
- Correctly read image device information from class data
|
|
||||||
- Continue enroll after an image driver reported a retry error
|
|
||||||
- Change external API to allow reporting match results early
|
|
||||||
- A lot of new unit tests and integration tests have been added
|
|
||||||
|
|
||||||
* Drivers API
|
|
||||||
- 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:
|
|
||||||
- elan: Ensure correct deactivation of device
|
|
||||||
- uru4000: Fix IRQ handler registration and internal state handling
|
|
||||||
- uru4000: Fix control transfer request type
|
|
||||||
- synaptics: Ensure errors are only reported after finger removal
|
|
||||||
|
|
||||||
2019-11-20: v1.90.0 release
|
2019-11-20: v1.90.0 release
|
||||||
|
|
||||||
This release updates the core of the library to use GLib routines and Gio
|
This release updates the core of the library to use GLib routines and Gio
|
||||||
@@ -372,7 +104,7 @@ tests of the drivers using umockdev.
|
|||||||
- Mark fp_dscv_print functions as deprecated
|
- Mark fp_dscv_print functions as deprecated
|
||||||
|
|
||||||
* Udev rules:
|
* Udev rules:
|
||||||
- Add some unsupported devices to the allowlist
|
- Add some unsupported devices to the whitelist
|
||||||
|
|
||||||
2017-05-14: v0.7.0 release
|
2017-05-14: v0.7.0 release
|
||||||
* Drivers:
|
* Drivers:
|
||||||
@@ -422,7 +154,7 @@ tests of the drivers using umockdev.
|
|||||||
- Fix possible race condition, and cancellation in uru4000 driver
|
- Fix possible race condition, and cancellation in uru4000 driver
|
||||||
|
|
||||||
* Udev rules:
|
* Udev rules:
|
||||||
- Add Microsoft keyboard to the suspend denylist
|
- Add Microsoft keyboard to the suspend blacklist
|
||||||
|
|
||||||
* Plenty of build fixes
|
* Plenty of build fixes
|
||||||
|
|
||||||
|
|||||||
-25
@@ -1,25 +0,0 @@
|
|||||||
### 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)
|
|
||||||
@@ -0,0 +1,51 @@
|
|||||||
|
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/
|
||||||
@@ -1,90 +0,0 @@
|
|||||||
|
|
||||||
|
|
||||||
<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
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
### 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
|
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
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
|
||||||
@@ -1,416 +0,0 @@
|
|||||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
|
||||||
# This file has been generated using fprint-list-udev-hwdb with all drivers enabled
|
|
||||||
|
|
||||||
# Supported by libfprint driver aes1610
|
|
||||||
usb:v08FFp1600*
|
|
||||||
ID_AUTOSUSPEND=1
|
|
||||||
ID_PERSIST=0
|
|
||||||
|
|
||||||
# Supported by libfprint driver aes1660
|
|
||||||
usb:v08FFp1660*
|
|
||||||
usb:v08FFp1680*
|
|
||||||
usb:v08FFp1681*
|
|
||||||
usb:v08FFp1682*
|
|
||||||
usb:v08FFp1683*
|
|
||||||
usb:v08FFp1684*
|
|
||||||
usb:v08FFp1685*
|
|
||||||
usb:v08FFp1686*
|
|
||||||
usb:v08FFp1687*
|
|
||||||
usb:v08FFp1688*
|
|
||||||
usb:v08FFp1689*
|
|
||||||
usb:v08FFp168A*
|
|
||||||
usb:v08FFp168B*
|
|
||||||
usb:v08FFp168C*
|
|
||||||
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*
|
|
||||||
usb:v08FFp2680*
|
|
||||||
usb:v08FFp2681*
|
|
||||||
usb:v08FFp2682*
|
|
||||||
usb:v08FFp2683*
|
|
||||||
usb:v08FFp2684*
|
|
||||||
usb:v08FFp2685*
|
|
||||||
usb:v08FFp2686*
|
|
||||||
usb:v08FFp2687*
|
|
||||||
usb:v08FFp2688*
|
|
||||||
usb:v08FFp2689*
|
|
||||||
usb:v08FFp268A*
|
|
||||||
usb:v08FFp268B*
|
|
||||||
usb:v08FFp268C*
|
|
||||||
usb:v08FFp268D*
|
|
||||||
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: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*
|
|
||||||
usb:v04F3p0907*
|
|
||||||
usb:v04F3p0C01*
|
|
||||||
usb:v04F3p0C02*
|
|
||||||
usb:v04F3p0C03*
|
|
||||||
usb:v04F3p0C04*
|
|
||||||
usb:v04F3p0C05*
|
|
||||||
usb:v04F3p0C06*
|
|
||||||
usb:v04F3p0C07*
|
|
||||||
usb:v04F3p0C08*
|
|
||||||
usb:v04F3p0C09*
|
|
||||||
usb:v04F3p0C0A*
|
|
||||||
usb:v04F3p0C0B*
|
|
||||||
usb:v04F3p0C0C*
|
|
||||||
usb:v04F3p0C0D*
|
|
||||||
usb:v04F3p0C0E*
|
|
||||||
usb:v04F3p0C0F*
|
|
||||||
usb:v04F3p0C10*
|
|
||||||
usb:v04F3p0C11*
|
|
||||||
usb:v04F3p0C12*
|
|
||||||
usb:v04F3p0C13*
|
|
||||||
usb:v04F3p0C14*
|
|
||||||
usb:v04F3p0C15*
|
|
||||||
usb:v04F3p0C16*
|
|
||||||
usb:v04F3p0C17*
|
|
||||||
usb:v04F3p0C18*
|
|
||||||
usb:v04F3p0C19*
|
|
||||||
usb:v04F3p0C1A*
|
|
||||||
usb:v04F3p0C1B*
|
|
||||||
usb:v04F3p0C1C*
|
|
||||||
usb:v04F3p0C1D*
|
|
||||||
usb:v04F3p0C1E*
|
|
||||||
usb:v04F3p0C1F*
|
|
||||||
usb:v04F3p0C20*
|
|
||||||
usb:v04F3p0C21*
|
|
||||||
usb:v04F3p0C22*
|
|
||||||
usb:v04F3p0C23*
|
|
||||||
usb:v04F3p0C24*
|
|
||||||
usb:v04F3p0C25*
|
|
||||||
usb:v04F3p0C26*
|
|
||||||
usb:v04F3p0C27*
|
|
||||||
usb:v04F3p0C28*
|
|
||||||
usb:v04F3p0C29*
|
|
||||||
usb:v04F3p0C2A*
|
|
||||||
usb:v04F3p0C2B*
|
|
||||||
usb:v04F3p0C2C*
|
|
||||||
usb:v04F3p0C2D*
|
|
||||||
usb:v04F3p0C2E*
|
|
||||||
usb:v04F3p0C2F*
|
|
||||||
usb:v04F3p0C30*
|
|
||||||
usb:v04F3p0C31*
|
|
||||||
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*
|
|
||||||
usb:v06CBp00DF*
|
|
||||||
usb:v06CBp00F9*
|
|
||||||
usb:v06CBp00FC*
|
|
||||||
usb:v06CBp00C2*
|
|
||||||
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*
|
|
||||||
usb:v045Ep00BD*
|
|
||||||
usb:v045Ep00CA*
|
|
||||||
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*
|
|
||||||
usb:v138Ap0011*
|
|
||||||
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: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*
|
|
||||||
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*
|
|
||||||
usb:v138Ap003C*
|
|
||||||
usb:v138Ap003D*
|
|
||||||
usb:v138Ap003F*
|
|
||||||
usb:v138Ap0090*
|
|
||||||
usb:v138Ap0092*
|
|
||||||
usb:v138Ap0094*
|
|
||||||
usb:v138Ap0097*
|
|
||||||
usb:v138Ap009D*
|
|
||||||
usb:v138Ap00AB*
|
|
||||||
usb:v138Ap00A6*
|
|
||||||
usb:v147Ep1002*
|
|
||||||
usb:v1491p0088*
|
|
||||||
usb:v16D1p1027*
|
|
||||||
usb:v1C7Ap0300*
|
|
||||||
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
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
if udev_hwdb_dir != ''
|
|
||||||
# This file has to be updated using
|
|
||||||
# ninja -C <builddir> libfprint/sync-udev-hwdb
|
|
||||||
# Note that the unsupported device list needs to be manually synced from
|
|
||||||
# the wiki. See comment in libfprint/fprint-list-uev-hwdb.c
|
|
||||||
|
|
||||||
install_data('autosuspend.hwdb',
|
|
||||||
rename: '60-autosuspend-@0@.hwdb'.format(versioned_libname),
|
|
||||||
install_dir: udev_hwdb_dir,
|
|
||||||
)
|
|
||||||
endif
|
|
||||||
Vendored
-10
@@ -1,10 +0,0 @@
|
|||||||
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
@@ -1,14 +0,0 @@
|
|||||||
### 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
@@ -1,203 +0,0 @@
|
|||||||
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
@@ -1,45 +0,0 @@
|
|||||||
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
@@ -1,2 +0,0 @@
|
|||||||
NEWS
|
|
||||||
README.md
|
|
||||||
Vendored
-8
@@ -1,8 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
set -e
|
|
||||||
|
|
||||||
dch -v"$GBP_DEBIAN_VERSION" "New upstream release"
|
|
||||||
git add debian/changelog
|
|
||||||
debcommit
|
|
||||||
|
|
||||||
debian/update-udev-triggers.sh
|
|
||||||
Vendored
-19
@@ -1,19 +0,0 @@
|
|||||||
[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
@@ -1 +0,0 @@
|
|||||||
usr/lib/${DEB_HOST_MULTIARCH}/girepository-1.0/FPrint-*.typelib
|
|
||||||
Vendored
-3
@@ -1,3 +0,0 @@
|
|||||||
usr/lib/udev/hwdb.d/
|
|
||||||
usr/lib/udev/rules.d/
|
|
||||||
usr/lib/${DEB_HOST_MULTIARCH}/libfprint-[0-9].so.*
|
|
||||||
-3
@@ -1,3 +0,0 @@
|
|||||||
# For security reasons, we don't want the fingerprint readers to be accessible
|
|
||||||
# by unprivileged users
|
|
||||||
udev-rule-missing-uaccess
|
|
||||||
Vendored
-315
@@ -1,315 +0,0 @@
|
|||||||
#!/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
@@ -1,17 +0,0 @@
|
|||||||
#!/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
@@ -1,94 +0,0 @@
|
|||||||
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
@@ -1,4 +0,0 @@
|
|||||||
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
@@ -1 +0,0 @@
|
|||||||
usr/share/gtk-doc/*/libfprint-*
|
|
||||||
Vendored
-2
@@ -1,2 +0,0 @@
|
|||||||
usr/libexec/installed-tests/libfprint-[0-9]
|
|
||||||
usr/share/installed-tests/libfprint-[0-9]
|
|
||||||
Vendored
-3
@@ -1,3 +0,0 @@
|
|||||||
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
@@ -1 +0,0 @@
|
|||||||
usr/lib/${DEB_HOST_MULTIARCH}/libfprint-[0-9]-tod.so.*
|
|
||||||
Vendored
-239
@@ -1,239 +0,0 @@
|
|||||||
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
@@ -1,37 +0,0 @@
|
|||||||
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
@@ -1,28 +0,0 @@
|
|||||||
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 */
|
|
||||||
};
|
|
||||||
|
|
||||||
@@ -1,37 +0,0 @@
|
|||||||
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
@@ -1,44 +0,0 @@
|
|||||||
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
@@ -1,7 +0,0 @@
|
|||||||
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
|
|
||||||
@@ -1,39 +0,0 @@
|
|||||||
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
|
|
||||||
|
|
||||||
@@ -1,40 +0,0 @@
|
|||||||
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
|
|
||||||
|
|
||||||
@@ -1,54 +0,0 @@
|
|||||||
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 */
|
|
||||||
};
|
|
||||||
|
|
||||||
Vendored
-26
@@ -1,26 +0,0 @@
|
|||||||
#!/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
@@ -1 +0,0 @@
|
|||||||
3.0 (quilt)
|
|
||||||
Vendored
-3
@@ -1,3 +0,0 @@
|
|||||||
# 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
@@ -1,6 +0,0 @@
|
|||||||
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
|
|
||||||
Vendored
-32
@@ -1,32 +0,0 @@
|
|||||||
#!/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
@@ -1,4 +0,0 @@
|
|||||||
---
|
|
||||||
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
@@ -1,5 +0,0 @@
|
|||||||
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@
|
|
||||||
@@ -102,9 +102,9 @@ plot_minutiae (unsigned char *rgbdata,
|
|||||||
int i;
|
int i;
|
||||||
|
|
||||||
#define write_pixel(num) do { \
|
#define write_pixel(num) do { \
|
||||||
rgbdata[((num) * 3)] = 0xff; \
|
rgbdata[((num) * 3)] = 0xff; \
|
||||||
rgbdata[((num) * 3) + 1] = 0; \
|
rgbdata[((num) * 3) + 1] = 0; \
|
||||||
rgbdata[((num) * 3) + 2] = 0; \
|
rgbdata[((num) * 3) + 2] = 0; \
|
||||||
} while(0)
|
} while(0)
|
||||||
|
|
||||||
for (i = 0; i < minutiae->len; i++)
|
for (i = 0; i < minutiae->len; i++)
|
||||||
@@ -241,8 +241,6 @@ dev_capture_start_cb (FpDevice *dev,
|
|||||||
if (error->domain == FP_DEVICE_RETRY ||
|
if (error->domain == FP_DEVICE_RETRY ||
|
||||||
g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED))
|
g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED))
|
||||||
libfprint_demo_set_mode (win, RETRY_MODE);
|
libfprint_demo_set_mode (win, RETRY_MODE);
|
||||||
else if (g_error_matches (error, FP_DEVICE_ERROR, FP_DEVICE_ERROR_NOT_SUPPORTED))
|
|
||||||
libfprint_demo_set_mode (win, NOIMAGING_MODE);
|
|
||||||
else
|
else
|
||||||
libfprint_demo_set_mode (win, ERROR_MODE);
|
libfprint_demo_set_mode (win, ERROR_MODE);
|
||||||
return;
|
return;
|
||||||
@@ -526,7 +524,7 @@ libfprint_demo_window_init (LibfprintDemoWindow *window)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!fp_device_has_feature (g_ptr_array_index (devices, 0), FP_DEVICE_FEATURE_CAPTURE))
|
if (!fp_device_supports_capture (g_ptr_array_index (devices, 0)))
|
||||||
{
|
{
|
||||||
libfprint_demo_set_mode (window, NOIMAGING_MODE);
|
libfprint_demo_set_mode (window, NOIMAGING_MODE);
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"app-id": "org.freedesktop.libfprint.Demo",
|
"app-id": "org.freedesktop.libfprint.Demo",
|
||||||
"runtime": "org.gnome.Platform",
|
"runtime": "org.gnome.Platform",
|
||||||
"runtime-version": "master",
|
"runtime-version": "3.32",
|
||||||
"sdk": "org.gnome.Sdk",
|
"sdk": "org.gnome.Sdk",
|
||||||
"command": "gtk-libfprint-test",
|
"command": "gtk-libfprint-test",
|
||||||
"finish-args": [
|
"finish-args": [
|
||||||
/* X11 + XShm access */
|
/* X11 + XShm access */
|
||||||
"--share=ipc", "--socket=fallback-x11",
|
"--share=ipc", "--socket=x11",
|
||||||
/* Wayland access */
|
/* Wayland access */
|
||||||
"--socket=wayland",
|
"--socket=wayland",
|
||||||
/* OpenGL access */
|
/* OpenGL access */
|
||||||
@@ -18,7 +18,7 @@
|
|||||||
"modules": [
|
"modules": [
|
||||||
{
|
{
|
||||||
"name": "libusb",
|
"name": "libusb",
|
||||||
"config-opts": [ "--disable-static" ],
|
"config-opts": [ "--disable-static", "--disable-udev" ],
|
||||||
"cleanup": [
|
"cleanup": [
|
||||||
"/lib/*.la",
|
"/lib/*.la",
|
||||||
"/lib/pkgconfig",
|
"/lib/pkgconfig",
|
||||||
@@ -26,47 +26,36 @@
|
|||||||
],
|
],
|
||||||
"sources": [
|
"sources": [
|
||||||
{
|
{
|
||||||
"type": "archive",
|
"type": "archive",
|
||||||
"url": "https://github.com/libusb/libusb/releases/download/v1.0.26/libusb-1.0.26.tar.bz2",
|
"url": "https://github.com/libusb/libusb/archive/v1.0.22.tar.gz",
|
||||||
"sha256": "12ce7a61fc9854d1d2a1ffe095f7b5fac19ddba095c259e6067a46500381b5a5"
|
"sha256": "3500f7b182750cd9ccf9be8b1df998f83df56a39ab264976bdb3307773e16f48"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"post-install": [
|
"post-install": [
|
||||||
"install -Dm644 COPYING /app/share/licenses/libusb/COPYING"
|
"install -Dm644 COPYING /app/share/licenses/libgusb/COPYING"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "libgusb",
|
"name": "libgusb",
|
||||||
"buildsystem": "meson",
|
"buildsystem": "meson",
|
||||||
"config-opts": [ "-Dtests=false", "-Dvapi=false", "-Ddocs=false" ],
|
"config-opts": [ "-Dtests=false", "-Dvapi=false", "-Ddocs=false", "-Dintrospection=false" ],
|
||||||
"sources": [
|
"sources": [
|
||||||
{
|
{
|
||||||
"type": "archive",
|
"type": "archive",
|
||||||
"url": "https://github.com/hughsie/libgusb/releases/download/0.4.6/libgusb-0.4.6.tar.xz",
|
"url": "https://github.com/hughsie/libgusb/archive/0.3.0.tar.gz",
|
||||||
"sha256": "1b0422bdcd72183272ac42eec9398c5a0bc48a02f618fa3242c468cbbd003049"
|
"sha256": "b36310f8405d5fd68f6caf4a829f7ab4c627b38fd3d02a139d411fce0f3a49f1"
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "gudev",
|
|
||||||
"buildsystem": "meson",
|
|
||||||
"config-opts": [ "-Dtests=disabled", "-Dintrospection=disabled", "-Dvapi=disabled" ],
|
|
||||||
"sources": [
|
|
||||||
{
|
|
||||||
"type": "archive",
|
|
||||||
"url": "https://download.gnome.org/sources/libgudev/238/libgudev-238.tar.xz",
|
|
||||||
"sha256": "61266ab1afc9d73dbc60a8b2af73e99d2fdff47d99544d085760e4fa667b5dd1"
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "libfprint",
|
"name": "libfprint",
|
||||||
"buildsystem": "meson",
|
"buildsystem": "meson",
|
||||||
"config-opts": [ "-Dudev_hwdb=disabled", "-Dudev_rules=disabled", "-Dgtk-examples=true", "-Ddrivers=all" ],
|
"config-opts": [ "-Dudev_rules=false", "-Dx11-examples=false", "-Dgtk-examples=true", "-Ddrivers=all" ],
|
||||||
"sources": [
|
"sources": [
|
||||||
{
|
{
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://gitlab.freedesktop.org/libfprint/libfprint.git"
|
"url": "https://gitlab.freedesktop.org/libfprint/libfprint.git",
|
||||||
|
"branch": "wip/benzea/v2"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +0,0 @@
|
|||||||
#include <fprint.h>
|
|
||||||
#include <fp-image-device.h>
|
|
||||||
|
|
||||||
fp_context_get_type
|
|
||||||
fp_device_get_type
|
|
||||||
fp_image_device_get_type
|
|
||||||
fp_image_get_type
|
|
||||||
fp_print_get_type
|
|
||||||
@@ -41,8 +41,7 @@
|
|||||||
</chapter>
|
</chapter>
|
||||||
|
|
||||||
<chapter id="driver-helpers">
|
<chapter id="driver-helpers">
|
||||||
<title>USB, SPI and State Machine helpers</title>
|
<title>USB 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-usb-transfer.xml"/>
|
||||||
<xi:include href="xml/fpi-ssm.xml"/>
|
<xi:include href="xml/fpi-ssm.xml"/>
|
||||||
<xi:include href="xml/fpi-log.xml"/>
|
<xi:include href="xml/fpi-log.xml"/>
|
||||||
|
|||||||
@@ -20,27 +20,20 @@ FP_TYPE_DEVICE
|
|||||||
FP_DEVICE_RETRY
|
FP_DEVICE_RETRY
|
||||||
FP_DEVICE_ERROR
|
FP_DEVICE_ERROR
|
||||||
FpDeviceType
|
FpDeviceType
|
||||||
FpDeviceFeature
|
|
||||||
FpScanType
|
FpScanType
|
||||||
FpDeviceRetry
|
FpDeviceRetry
|
||||||
FpDeviceError
|
FpDeviceError
|
||||||
FpFingerStatusFlags
|
|
||||||
fp_device_retry_quark
|
fp_device_retry_quark
|
||||||
fp_device_error_quark
|
fp_device_error_quark
|
||||||
FpEnrollProgress
|
FpEnrollProgress
|
||||||
FpMatchCb
|
|
||||||
fp_device_get_driver
|
fp_device_get_driver
|
||||||
fp_device_get_device_id
|
fp_device_get_device_id
|
||||||
fp_device_get_name
|
fp_device_get_name
|
||||||
fp_device_get_scan_type
|
fp_device_get_scan_type
|
||||||
fp_device_get_nr_enroll_stages
|
fp_device_get_nr_enroll_stages
|
||||||
fp_device_get_finger_status
|
|
||||||
fp_device_get_features
|
|
||||||
fp_device_has_feature
|
|
||||||
fp_device_has_storage
|
fp_device_has_storage
|
||||||
fp_device_supports_identify
|
fp_device_supports_identify
|
||||||
fp_device_supports_capture
|
fp_device_supports_capture
|
||||||
fp_device_is_open
|
|
||||||
fp_device_open
|
fp_device_open
|
||||||
fp_device_close
|
fp_device_close
|
||||||
fp_device_enroll
|
fp_device_enroll
|
||||||
@@ -49,9 +42,6 @@ fp_device_identify
|
|||||||
fp_device_capture
|
fp_device_capture
|
||||||
fp_device_delete_print
|
fp_device_delete_print
|
||||||
fp_device_list_prints
|
fp_device_list_prints
|
||||||
fp_device_clear_storage
|
|
||||||
fp_device_suspend
|
|
||||||
fp_device_resume
|
|
||||||
fp_device_open_finish
|
fp_device_open_finish
|
||||||
fp_device_close_finish
|
fp_device_close_finish
|
||||||
fp_device_enroll_finish
|
fp_device_enroll_finish
|
||||||
@@ -60,9 +50,6 @@ fp_device_identify_finish
|
|||||||
fp_device_capture_finish
|
fp_device_capture_finish
|
||||||
fp_device_delete_print_finish
|
fp_device_delete_print_finish
|
||||||
fp_device_list_prints_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_open_sync
|
||||||
fp_device_close_sync
|
fp_device_close_sync
|
||||||
fp_device_enroll_sync
|
fp_device_enroll_sync
|
||||||
@@ -71,9 +58,6 @@ fp_device_identify_sync
|
|||||||
fp_device_capture_sync
|
fp_device_capture_sync
|
||||||
fp_device_delete_print_sync
|
fp_device_delete_print_sync
|
||||||
fp_device_list_prints_sync
|
fp_device_list_prints_sync
|
||||||
fp_device_clear_storage_sync
|
|
||||||
fp_device_suspend_sync
|
|
||||||
fp_device_resume_sync
|
|
||||||
FpDevice
|
FpDevice
|
||||||
</SECTION>
|
</SECTION>
|
||||||
|
|
||||||
@@ -106,6 +90,8 @@ FP_TYPE_PRINT
|
|||||||
FpFinger
|
FpFinger
|
||||||
FpPrint
|
FpPrint
|
||||||
fp_print_new
|
fp_print_new
|
||||||
|
fp_print_new_from_data
|
||||||
|
fp_print_to_data
|
||||||
fp_print_get_driver
|
fp_print_get_driver
|
||||||
fp_print_get_device_id
|
fp_print_get_device_id
|
||||||
fp_print_get_device_stored
|
fp_print_get_device_stored
|
||||||
@@ -143,11 +129,9 @@ fpi_get_driver_types
|
|||||||
<FILE>fpi-device</FILE>
|
<FILE>fpi-device</FILE>
|
||||||
FpDeviceClass
|
FpDeviceClass
|
||||||
FpTimeoutFunc
|
FpTimeoutFunc
|
||||||
FpiDeviceAction
|
FpDeviceAction
|
||||||
FpIdEntry
|
FpIdEntry
|
||||||
FpiDeviceUdevSubtypeFlags
|
|
||||||
fpi_device_get_usb_device
|
fpi_device_get_usb_device
|
||||||
fpi_device_get_udev_data
|
|
||||||
fpi_device_get_virtual_env
|
fpi_device_get_virtual_env
|
||||||
fpi_device_get_current_action
|
fpi_device_get_current_action
|
||||||
fpi_device_retry_new
|
fpi_device_retry_new
|
||||||
@@ -165,12 +149,6 @@ fpi_device_action_is_cancelled
|
|||||||
fpi_device_add_timeout
|
fpi_device_add_timeout
|
||||||
fpi_device_set_nr_enroll_stages
|
fpi_device_set_nr_enroll_stages
|
||||||
fpi_device_set_scan_type
|
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
|
|
||||||
fpi_device_action_error
|
fpi_device_action_error
|
||||||
fpi_device_probe_complete
|
fpi_device_probe_complete
|
||||||
fpi_device_open_complete
|
fpi_device_open_complete
|
||||||
@@ -179,15 +157,8 @@ fpi_device_enroll_complete
|
|||||||
fpi_device_verify_complete
|
fpi_device_verify_complete
|
||||||
fpi_device_identify_complete
|
fpi_device_identify_complete
|
||||||
fpi_device_capture_complete
|
fpi_device_capture_complete
|
||||||
fpi_device_clear_storage_complete
|
|
||||||
fpi_device_delete_complete
|
fpi_device_delete_complete
|
||||||
fpi_device_list_complete
|
|
||||||
fpi_device_suspend_complete
|
|
||||||
fpi_device_resume_complete
|
|
||||||
fpi_device_enroll_progress
|
fpi_device_enroll_progress
|
||||||
fpi_device_verify_report
|
|
||||||
fpi_device_identify_report
|
|
||||||
fpi_device_class_auto_initialize_features
|
|
||||||
</SECTION>
|
</SECTION>
|
||||||
|
|
||||||
<SECTION>
|
<SECTION>
|
||||||
@@ -201,8 +172,8 @@ fpi_image_resize
|
|||||||
|
|
||||||
<SECTION>
|
<SECTION>
|
||||||
<FILE>fpi-image-device</FILE>
|
<FILE>fpi-image-device</FILE>
|
||||||
<TITLE>Internal FpImageDevice</TITLE>
|
<TITLE>FpImageDevice</TITLE>
|
||||||
FpiImageDeviceState
|
FpImageDeviceState
|
||||||
FpImageDeviceClass
|
FpImageDeviceClass
|
||||||
fpi_image_device_session_error
|
fpi_image_device_session_error
|
||||||
fpi_image_device_open_complete
|
fpi_image_device_open_complete
|
||||||
@@ -212,7 +183,6 @@ fpi_image_device_deactivate_complete
|
|||||||
fpi_image_device_report_finger_status
|
fpi_image_device_report_finger_status
|
||||||
fpi_image_device_image_captured
|
fpi_image_device_image_captured
|
||||||
fpi_image_device_retry_scan
|
fpi_image_device_retry_scan
|
||||||
fpi_image_device_set_bz3_threshold
|
|
||||||
</SECTION>
|
</SECTION>
|
||||||
|
|
||||||
<SECTION>
|
<SECTION>
|
||||||
@@ -227,15 +197,13 @@ BUG
|
|||||||
|
|
||||||
<SECTION>
|
<SECTION>
|
||||||
<FILE>fpi-print</FILE>
|
<FILE>fpi-print</FILE>
|
||||||
FpiPrintType
|
FpPrintType
|
||||||
FpiMatchResult
|
FpiMatchResult
|
||||||
fpi_print_add_print
|
fpi_print_add_print
|
||||||
fpi_print_set_type
|
fpi_print_set_type
|
||||||
fpi_print_set_device_stored
|
fpi_print_set_device_stored
|
||||||
fpi_print_add_from_image
|
fpi_print_add_from_image
|
||||||
fpi_print_bz3_match
|
fpi_print_bz3_match
|
||||||
fpi_print_generate_user_id
|
|
||||||
fpi_print_fill_from_user_id
|
|
||||||
</SECTION>
|
</SECTION>
|
||||||
|
|
||||||
<SECTION>
|
<SECTION>
|
||||||
@@ -256,15 +224,11 @@ fpi_ssm_mark_completed
|
|||||||
fpi_ssm_mark_failed
|
fpi_ssm_mark_failed
|
||||||
fpi_ssm_set_data
|
fpi_ssm_set_data
|
||||||
fpi_ssm_get_data
|
fpi_ssm_get_data
|
||||||
fpi_ssm_get_device
|
|
||||||
fpi_ssm_get_error
|
fpi_ssm_get_error
|
||||||
fpi_ssm_dup_error
|
fpi_ssm_dup_error
|
||||||
fpi_ssm_get_cur_state
|
fpi_ssm_get_cur_state
|
||||||
fpi_ssm_silence_debug
|
fpi_ssm_next_state_timeout_cb
|
||||||
fpi_ssm_spi_transfer_cb
|
|
||||||
fpi_ssm_spi_transfer_with_weak_pointer_cb
|
|
||||||
fpi_ssm_usb_transfer_cb
|
fpi_ssm_usb_transfer_cb
|
||||||
fpi_ssm_usb_transfer_with_weak_pointer_cb
|
|
||||||
FpiSsm
|
FpiSsm
|
||||||
</SECTION>
|
</SECTION>
|
||||||
|
|
||||||
@@ -291,20 +255,3 @@ FPI_TYPE_USB_TRANSFER
|
|||||||
fpi_usb_transfer_get_type
|
fpi_usb_transfer_get_type
|
||||||
</SECTION>
|
</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>
|
|
||||||
@@ -90,7 +90,7 @@ fp_image_get_width
|
|||||||
<TITLE>Base class for image devices</TITLE>
|
<TITLE>Base class for image devices</TITLE>
|
||||||
FpImageDevice
|
FpImageDevice
|
||||||
FpImageDeviceClass
|
FpImageDeviceClass
|
||||||
FpiImageDeviceState
|
FpImageDeviceState
|
||||||
</SECTION>
|
</SECTION>
|
||||||
|
|
||||||
<SECTION>
|
<SECTION>
|
||||||
@@ -114,3 +114,5 @@ FpUsbTransferCallback
|
|||||||
FP_USB_ENDPOINT_IN
|
FP_USB_ENDPOINT_IN
|
||||||
FP_USB_ENDPOINT_OUT
|
FP_USB_ENDPOINT_OUT
|
||||||
</SECTION>
|
</SECTION>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+8
-6
@@ -4,6 +4,7 @@ private_headers = [
|
|||||||
'config.h',
|
'config.h',
|
||||||
'nbis-helpers.h',
|
'nbis-helpers.h',
|
||||||
'fprint.h',
|
'fprint.h',
|
||||||
|
'fp_internal.h',
|
||||||
|
|
||||||
# Subdirectories to ignore
|
# Subdirectories to ignore
|
||||||
'drivers',
|
'drivers',
|
||||||
@@ -19,19 +20,20 @@ content_files = [
|
|||||||
|
|
||||||
expand_content_files = content_files
|
expand_content_files = content_files
|
||||||
|
|
||||||
glib_prefix = dependency('glib-2.0').get_variable(pkgconfig: 'prefix')
|
glib_prefix = dependency('glib-2.0').get_pkgconfig_variable('prefix')
|
||||||
glib_docpath = join_paths(glib_prefix, 'share', 'gtk-doc', 'html')
|
glib_docpath = join_paths(glib_prefix, 'share', 'gtk-doc', 'html')
|
||||||
docpath = join_paths(get_option('datadir'), 'gtk-doc', 'html')
|
docpath = join_paths(get_option('datadir'), 'gtk-doc', 'html')
|
||||||
|
|
||||||
gnome.gtkdoc(versioned_libname,
|
gnome.gtkdoc('libfprint',
|
||||||
main_xml: 'libfprint-docs.xml',
|
main_xml: 'libfprint-docs.xml',
|
||||||
src_dir: join_paths(meson.project_source_root(), 'libfprint'),
|
src_dir: join_paths(meson.source_root(), 'libfprint'),
|
||||||
include_directories: include_directories('../libfprint'),
|
|
||||||
dependencies: libfprint_dep,
|
dependencies: libfprint_dep,
|
||||||
content_files: content_files,
|
content_files: content_files,
|
||||||
expand_content_files: expand_content_files,
|
expand_content_files: expand_content_files,
|
||||||
ignore_headers: private_headers,
|
scan_args: [
|
||||||
gobject_typesfile: 'libfprint-2.types',
|
#'--rebuild-sections',
|
||||||
|
'--ignore-headers=' + ' '.join(private_headers),
|
||||||
|
],
|
||||||
fixxref_args: [
|
fixxref_args: [
|
||||||
'--html-dir=@0@'.format(docpath),
|
'--html-dir=@0@'.format(docpath),
|
||||||
'--extra-dir=@0@'.format(join_paths(glib_docpath, 'glib')),
|
'--extra-dir=@0@'.format(join_paths(glib_docpath, 'glib')),
|
||||||
|
|||||||
+3
-3
@@ -1,8 +1,8 @@
|
|||||||
ent_conf = configuration_data()
|
ent_conf = configuration_data()
|
||||||
ent_conf.set('PACKAGE', versioned_libname)
|
ent_conf.set('PACKAGE', 'libfprint')
|
||||||
ent_conf.set('PACKAGE_BUGREPORT', 'https://gitlab.freedesktop.org/libfprint/libfprint/issues')
|
ent_conf.set('PACKAGE_BUGREPORT', 'https://gitlab.freedesktop.org/libfprint/libfprint/issues')
|
||||||
ent_conf.set('PACKAGE_NAME', versioned_libname)
|
ent_conf.set('PACKAGE_NAME', 'libfprint')
|
||||||
ent_conf.set('PACKAGE_STRING', versioned_libname)
|
ent_conf.set('PACKAGE_STRING', 'libfprint')
|
||||||
ent_conf.set('PACKAGE_TARNAME', 'libfprint-' + meson.project_version())
|
ent_conf.set('PACKAGE_TARNAME', 'libfprint-' + meson.project_version())
|
||||||
ent_conf.set('PACKAGE_URL', 'https://fprint.freedesktop.org/')
|
ent_conf.set('PACKAGE_URL', 'https://fprint.freedesktop.org/')
|
||||||
ent_conf.set('PACKAGE_VERSION', meson.project_version())
|
ent_conf.set('PACKAGE_VERSION', meson.project_version())
|
||||||
|
|||||||
+25
-101
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Example fingerprint enrollment program
|
* Example fingerprint enrollment program
|
||||||
* Enrolls your chosen finger and saves the print to disk
|
* Enrolls your choosen finger and saves the print to disk
|
||||||
* Copyright (C) 2007 Daniel Drake <dsd@gentoo.org>
|
* Copyright (C) 2007 Daniel Drake <dsd@gentoo.org>
|
||||||
* Copyright (C) 2019 Marco Trevisan <marco.trevisan@canonical.com>
|
* Copyright (C) 2019 Marco Trevisan <marco.trevisan@canonical.com>
|
||||||
*
|
*
|
||||||
@@ -19,30 +19,22 @@
|
|||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define FP_COMPONENT "example-enroll"
|
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <libfprint/fprint.h>
|
#include <libfprint/fprint.h>
|
||||||
#include <glib-unix.h>
|
|
||||||
|
|
||||||
#include "storage.h"
|
#include "storage.h"
|
||||||
#include "utilities.h"
|
#include "utilities.h"
|
||||||
|
|
||||||
typedef struct _EnrollData
|
typedef struct _EnrollData
|
||||||
{
|
{
|
||||||
GMainLoop *loop;
|
GMainLoop *loop;
|
||||||
GCancellable *cancellable;
|
FpFinger finger;
|
||||||
unsigned int sigint_handler;
|
int ret_value;
|
||||||
FpFinger finger;
|
|
||||||
int ret_value;
|
|
||||||
gboolean update_fingerprint;
|
|
||||||
} EnrollData;
|
} EnrollData;
|
||||||
|
|
||||||
static void
|
static void
|
||||||
enroll_data_free (EnrollData *enroll_data)
|
enroll_data_free (EnrollData *enroll_data)
|
||||||
{
|
{
|
||||||
g_clear_handle_id (&enroll_data->sigint_handler, g_source_remove);
|
|
||||||
g_clear_object (&enroll_data->cancellable);
|
|
||||||
g_main_loop_unref (enroll_data->loop);
|
g_main_loop_unref (enroll_data->loop);
|
||||||
g_free (enroll_data);
|
g_free (enroll_data);
|
||||||
}
|
}
|
||||||
@@ -58,7 +50,7 @@ on_device_closed (FpDevice *dev, GAsyncResult *res, void *user_data)
|
|||||||
fp_device_close_finish (dev, res, &error);
|
fp_device_close_finish (dev, res, &error);
|
||||||
|
|
||||||
if (error)
|
if (error)
|
||||||
g_warning ("Failed closing device %s", error->message);
|
g_warning ("Failed closing device %s\n", error->message);
|
||||||
|
|
||||||
g_main_loop_quit (enroll_data->loop);
|
g_main_loop_quit (enroll_data->loop);
|
||||||
}
|
}
|
||||||
@@ -77,25 +69,20 @@ on_enroll_completed (FpDevice *dev, GAsyncResult *res, void *user_data)
|
|||||||
{
|
{
|
||||||
enroll_data->ret_value = EXIT_SUCCESS;
|
enroll_data->ret_value = EXIT_SUCCESS;
|
||||||
|
|
||||||
if (fp_device_has_feature (dev, FP_DEVICE_FEATURE_STORAGE))
|
if (!fp_device_has_storage (dev))
|
||||||
g_debug ("Device has storage, saving a print reference locally");
|
|
||||||
else
|
|
||||||
g_debug ("Device has not storage, saving print only locally");
|
|
||||||
|
|
||||||
/* 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,
|
|
||||||
enroll_data->update_fingerprint);
|
|
||||||
if (r < 0)
|
|
||||||
{
|
{
|
||||||
g_warning ("Data save failed, code %d", r);
|
g_debug ("Device has not storage, saving locally");
|
||||||
enroll_data->ret_value = EXIT_FAILURE;
|
int r = print_data_save (print, enroll_data->finger);
|
||||||
|
if (r < 0)
|
||||||
|
{
|
||||||
|
g_warning ("Data save failed, code %d", r);
|
||||||
|
enroll_data->ret_value = EXIT_FAILURE;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
g_warning ("Enroll failed with error %s", error->message);
|
g_warning ("Enroll failed with error %s\n", error->message);
|
||||||
}
|
}
|
||||||
|
|
||||||
fp_device_close (dev, NULL, (GAsyncReadyCallback) on_device_closed,
|
fp_device_close (dev, NULL, (GAsyncReadyCallback) on_device_closed,
|
||||||
@@ -118,7 +105,7 @@ on_enroll_progress (FpDevice *device,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (print && fp_print_get_image (print) &&
|
if (fp_device_supports_capture (device) &&
|
||||||
print_image_save (print, "enrolled.pgm"))
|
print_image_save (print, "enrolled.pgm"))
|
||||||
printf ("Wrote scanned image to enrolled.pgm\n");
|
printf ("Wrote scanned image to enrolled.pgm\n");
|
||||||
|
|
||||||
@@ -126,40 +113,6 @@ on_enroll_progress (FpDevice *device,
|
|||||||
fp_device_get_nr_enroll_stages (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
|
static void
|
||||||
on_device_opened (FpDevice *dev, GAsyncResult *res, void *user_data)
|
on_device_opened (FpDevice *dev, GAsyncResult *res, void *user_data)
|
||||||
{
|
{
|
||||||
@@ -175,42 +128,18 @@ on_device_opened (FpDevice *dev, GAsyncResult *res, void *user_data)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
printf ("Opened device.\n");
|
printf ("Opened device. It's now time to enroll your finger.\n\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 "
|
printf ("You will need to successfully scan your %s finger %d times to "
|
||||||
"complete the process.\n\n", finger_to_string (enroll_data->finger),
|
"complete the process.\n\n", finger_to_string (enroll_data->finger),
|
||||||
fp_device_get_nr_enroll_stages (dev));
|
fp_device_get_nr_enroll_stages (dev));
|
||||||
printf ("Scan your finger now.\n");
|
printf ("Scan your finger now.\n");
|
||||||
|
|
||||||
print_template = print_create_template (dev, enroll_data->finger, enroll_data->update_fingerprint);
|
print_template = print_create_template (dev, enroll_data->finger);
|
||||||
fp_device_enroll (dev, print_template, enroll_data->cancellable,
|
fp_device_enroll (dev, print_template, NULL, on_enroll_progress, NULL,
|
||||||
on_enroll_progress, NULL, NULL,
|
NULL, (GAsyncReadyCallback) on_enroll_completed,
|
||||||
(GAsyncReadyCallback) on_enroll_completed,
|
|
||||||
enroll_data);
|
enroll_data);
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
|
||||||
sigint_cb (void *user_data)
|
|
||||||
{
|
|
||||||
EnrollData *enroll_data = user_data;
|
|
||||||
|
|
||||||
g_cancellable_cancel (enroll_data->cancellable);
|
|
||||||
|
|
||||||
return G_SOURCE_CONTINUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
int
|
int
|
||||||
main (void)
|
main (void)
|
||||||
{
|
{
|
||||||
@@ -220,9 +149,11 @@ main (void)
|
|||||||
FpDevice *dev;
|
FpDevice *dev;
|
||||||
FpFinger finger;
|
FpFinger finger;
|
||||||
|
|
||||||
g_print ("This program will enroll the selected finger overwriting any print for the same"
|
g_print ("This program will enroll the selected finger, unconditionally "
|
||||||
" finger that was enrolled previously. Fingerprint updates without erasing old data"
|
"overwriting any print for the same finger that was enrolled "
|
||||||
" are possible on devices supporting that. Ctrl+C interrupts program execution.\n");
|
"previously. If you want to continue, press enter, otherwise hit "
|
||||||
|
"Ctrl+C\n");
|
||||||
|
getchar ();
|
||||||
|
|
||||||
g_print ("Choose the finger to enroll:\n");
|
g_print ("Choose the finger to enroll:\n");
|
||||||
finger = finger_chooser ();
|
finger = finger_chooser ();
|
||||||
@@ -255,15 +186,8 @@ main (void)
|
|||||||
enroll_data->finger = finger;
|
enroll_data->finger = finger;
|
||||||
enroll_data->ret_value = EXIT_FAILURE;
|
enroll_data->ret_value = EXIT_FAILURE;
|
||||||
enroll_data->loop = g_main_loop_new (NULL, FALSE);
|
enroll_data->loop = g_main_loop_new (NULL, FALSE);
|
||||||
enroll_data->cancellable = g_cancellable_new ();
|
|
||||||
enroll_data->sigint_handler = g_unix_signal_add_full (G_PRIORITY_HIGH,
|
|
||||||
SIGINT,
|
|
||||||
sigint_cb,
|
|
||||||
enroll_data,
|
|
||||||
NULL);
|
|
||||||
|
|
||||||
fp_device_open (dev, enroll_data->cancellable,
|
fp_device_open (dev, NULL, (GAsyncReadyCallback) on_device_opened,
|
||||||
(GAsyncReadyCallback) on_device_opened,
|
|
||||||
enroll_data);
|
enroll_data);
|
||||||
|
|
||||||
g_main_loop_run (enroll_data->loop);
|
g_main_loop_run (enroll_data->loop);
|
||||||
|
|||||||
@@ -1,321 +0,0 @@
|
|||||||
/*
|
|
||||||
* Example fingerprint verification program, which verifies the
|
|
||||||
* finger which has been previously enrolled to disk.
|
|
||||||
* Copyright (C) 2020 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
|
|
||||||
*/
|
|
||||||
|
|
||||||
#define FP_COMPONENT "example-identify"
|
|
||||||
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <libfprint/fprint.h>
|
|
||||||
#include <glib-unix.h>
|
|
||||||
|
|
||||||
#include "storage.h"
|
|
||||||
#include "utilities.h"
|
|
||||||
|
|
||||||
typedef struct _IdentifyData
|
|
||||||
{
|
|
||||||
GMainLoop *loop;
|
|
||||||
GCancellable *cancellable;
|
|
||||||
unsigned int sigint_handler;
|
|
||||||
int ret_value;
|
|
||||||
} IdentifyData;
|
|
||||||
|
|
||||||
static void
|
|
||||||
identify_data_free (IdentifyData *identify_data)
|
|
||||||
{
|
|
||||||
g_clear_handle_id (&identify_data->sigint_handler, g_source_remove);
|
|
||||||
g_clear_object (&identify_data->cancellable);
|
|
||||||
g_main_loop_unref (identify_data->loop);
|
|
||||||
g_free (identify_data);
|
|
||||||
}
|
|
||||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC (IdentifyData, identify_data_free)
|
|
||||||
|
|
||||||
static void
|
|
||||||
on_device_closed (FpDevice *dev, GAsyncResult *res, void *user_data)
|
|
||||||
{
|
|
||||||
IdentifyData *identify_data = user_data;
|
|
||||||
|
|
||||||
g_autoptr(GError) error = NULL;
|
|
||||||
|
|
||||||
fp_device_close_finish (dev, res, &error);
|
|
||||||
|
|
||||||
if (error)
|
|
||||||
g_warning ("Failed closing device %s", error->message);
|
|
||||||
|
|
||||||
g_main_loop_quit (identify_data->loop);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
identify_quit (FpDevice *dev,
|
|
||||||
IdentifyData *identify_data)
|
|
||||||
{
|
|
||||||
if (!fp_device_is_open (dev))
|
|
||||||
{
|
|
||||||
g_main_loop_quit (identify_data->loop);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
fp_device_close (dev, NULL, (GAsyncReadyCallback) on_device_closed, identify_data);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void start_identification (FpDevice *dev,
|
|
||||||
IdentifyData *identify_data);
|
|
||||||
|
|
||||||
static void
|
|
||||||
on_identify_completed (FpDevice *dev, GAsyncResult *res, void *user_data)
|
|
||||||
{
|
|
||||||
IdentifyData *identify_data = user_data;
|
|
||||||
|
|
||||||
g_autoptr(FpPrint) print = NULL;
|
|
||||||
g_autoptr(FpPrint) match = NULL;
|
|
||||||
g_autoptr(GError) error = NULL;
|
|
||||||
char buffer[20];
|
|
||||||
|
|
||||||
if (!fp_device_identify_finish (dev, res, &match, &print, &error))
|
|
||||||
{
|
|
||||||
g_warning ("Failed to identify print: %s", error->message);
|
|
||||||
identify_data->ret_value = EXIT_FAILURE;
|
|
||||||
|
|
||||||
if (error->domain != FP_DEVICE_RETRY)
|
|
||||||
{
|
|
||||||
identify_quit (dev, identify_data);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
g_print ("Identify again? [Y/n]? ");
|
|
||||||
if (fgets (buffer, sizeof (buffer), stdin) &&
|
|
||||||
(buffer[0] == 'Y' || buffer[0] == 'y' || buffer[0] == '\n'))
|
|
||||||
{
|
|
||||||
start_identification (dev, identify_data);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
identify_quit (dev, identify_data);
|
|
||||||
}
|
|
||||||
|
|
||||||
static FpPrint *
|
|
||||||
get_stored_print (FpDevice *dev, FpPrint *print)
|
|
||||||
{
|
|
||||||
g_autoptr(GPtrArray) gallery = gallery_data_load (dev);
|
|
||||||
guint index;
|
|
||||||
|
|
||||||
if (g_ptr_array_find_with_equal_func (gallery, print,
|
|
||||||
(GEqualFunc) fp_print_equal,
|
|
||||||
&index))
|
|
||||||
return g_object_ref (g_ptr_array_index (gallery, index));
|
|
||||||
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
on_identify_cb (FpDevice *dev, FpPrint *match, FpPrint *print,
|
|
||||||
gpointer user_data, GError *error)
|
|
||||||
{
|
|
||||||
IdentifyData *identify_data = user_data;
|
|
||||||
|
|
||||||
if (error)
|
|
||||||
{
|
|
||||||
g_warning ("Identify report: No finger matched, retry error reported: %s",
|
|
||||||
error->message);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (print && fp_print_get_image (print) &&
|
|
||||||
print_image_save (print, "identify.pgm"))
|
|
||||||
g_print ("Print image saved as identify.pgm\n");
|
|
||||||
|
|
||||||
if (match)
|
|
||||||
{
|
|
||||||
g_autoptr(FpPrint) matched_print = g_object_ref (match);
|
|
||||||
const GDate *date;
|
|
||||||
char date_str[128] = {};
|
|
||||||
|
|
||||||
identify_data->ret_value = EXIT_SUCCESS;
|
|
||||||
|
|
||||||
if (fp_print_get_device_stored (match))
|
|
||||||
{
|
|
||||||
FpPrint *stored_print = get_stored_print (dev, match);
|
|
||||||
|
|
||||||
if (stored_print)
|
|
||||||
matched_print = g_steal_pointer (&stored_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
|
|
||||||
strcpy (date_str, "<unknown>");
|
|
||||||
|
|
||||||
g_debug ("Identify report: device %s matched finger %s successfully "
|
|
||||||
"with print '%s', enrolled on date %s by user %s",
|
|
||||||
fp_device_get_name (dev),
|
|
||||||
finger_to_string (fp_print_get_finger (matched_print)),
|
|
||||||
fp_print_get_description (matched_print), date_str,
|
|
||||||
fp_print_get_username (matched_print));
|
|
||||||
|
|
||||||
g_print ("IDENTIFIED!\n");
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
g_debug ("Identification report: No finger matched");
|
|
||||||
g_print ("NOT IDENTIFIED!\n");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
on_list_completed (FpDevice *dev, GAsyncResult *res, gpointer user_data)
|
|
||||||
{
|
|
||||||
IdentifyData *identify_data = user_data;
|
|
||||||
|
|
||||||
g_autoptr(GPtrArray) gallery = NULL;
|
|
||||||
g_autoptr(GError) error = NULL;
|
|
||||||
|
|
||||||
gallery = fp_device_list_prints_finish (dev, res, &error);
|
|
||||||
|
|
||||||
if (!error)
|
|
||||||
{
|
|
||||||
if (!gallery->len)
|
|
||||||
{
|
|
||||||
g_warning ("No prints saved on device");
|
|
||||||
identify_quit (dev, identify_data);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
g_debug ("Identifying with %u prints in gallery", gallery->len);
|
|
||||||
fp_device_identify (dev, gallery, identify_data->cancellable,
|
|
||||||
on_identify_cb, identify_data, NULL,
|
|
||||||
(GAsyncReadyCallback) on_identify_completed,
|
|
||||||
identify_data);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
g_warning ("Loading prints failed with error %s", error->message);
|
|
||||||
identify_quit (dev, identify_data);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
start_identification (FpDevice *dev, IdentifyData *identify_data)
|
|
||||||
{
|
|
||||||
if (fp_device_has_feature (dev, FP_DEVICE_FEATURE_STORAGE))
|
|
||||||
{
|
|
||||||
g_print ("Creating finger template, using device storage...\n");
|
|
||||||
fp_device_list_prints (dev, NULL,
|
|
||||||
(GAsyncReadyCallback) on_list_completed,
|
|
||||||
identify_data);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
g_autoptr(GPtrArray) gallery = gallery_data_load (dev);
|
|
||||||
|
|
||||||
if (!gallery)
|
|
||||||
{
|
|
||||||
identify_quit (dev, identify_data);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
g_print ("Gallery loaded. Time to identify!\n");
|
|
||||||
fp_device_identify (dev, gallery, identify_data->cancellable,
|
|
||||||
on_identify_cb, identify_data, NULL,
|
|
||||||
(GAsyncReadyCallback) on_identify_completed,
|
|
||||||
identify_data);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
on_device_opened (FpDevice *dev, GAsyncResult *res, void *user_data)
|
|
||||||
{
|
|
||||||
IdentifyData *identify_data = user_data;
|
|
||||||
|
|
||||||
g_autoptr(GError) error = NULL;
|
|
||||||
|
|
||||||
if (!fp_device_open_finish (dev, res, &error))
|
|
||||||
{
|
|
||||||
g_warning ("Failed to open device: %s", error->message);
|
|
||||||
identify_quit (dev, identify_data);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
g_print ("Opened device. ");
|
|
||||||
|
|
||||||
start_identification (dev, identify_data);
|
|
||||||
}
|
|
||||||
|
|
||||||
static gboolean
|
|
||||||
sigint_cb (void *user_data)
|
|
||||||
{
|
|
||||||
IdentifyData *identify_data = user_data;
|
|
||||||
|
|
||||||
g_cancellable_cancel (identify_data->cancellable);
|
|
||||||
|
|
||||||
return G_SOURCE_CONTINUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
int
|
|
||||||
main (void)
|
|
||||||
{
|
|
||||||
g_autoptr(FpContext) ctx = NULL;
|
|
||||||
g_autoptr(IdentifyData) identify_data = NULL;
|
|
||||||
GPtrArray *devices;
|
|
||||||
FpDevice *dev;
|
|
||||||
|
|
||||||
setenv ("G_MESSAGES_DEBUG", "all", 0);
|
|
||||||
setenv ("LIBUSB_DEBUG", "3", 0);
|
|
||||||
|
|
||||||
ctx = fp_context_new ();
|
|
||||||
|
|
||||||
devices = fp_context_get_devices (ctx);
|
|
||||||
if (!devices)
|
|
||||||
{
|
|
||||||
g_warning ("Impossible to get devices");
|
|
||||||
return EXIT_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
dev = discover_device (devices);
|
|
||||||
if (!dev)
|
|
||||||
{
|
|
||||||
g_warning ("No devices detected.");
|
|
||||||
return EXIT_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!fp_device_has_feature (dev, FP_DEVICE_FEATURE_IDENTIFY))
|
|
||||||
{
|
|
||||||
g_warning ("Device %s does not support identification.",
|
|
||||||
fp_device_get_name (dev));
|
|
||||||
return EXIT_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
identify_data = g_new0 (IdentifyData, 1);
|
|
||||||
identify_data->ret_value = EXIT_FAILURE;
|
|
||||||
identify_data->loop = g_main_loop_new (NULL, FALSE);
|
|
||||||
identify_data->cancellable = g_cancellable_new ();
|
|
||||||
identify_data->sigint_handler = g_unix_signal_add_full (G_PRIORITY_HIGH,
|
|
||||||
SIGINT,
|
|
||||||
sigint_cb,
|
|
||||||
identify_data,
|
|
||||||
NULL);
|
|
||||||
fp_device_open (dev, identify_data->cancellable,
|
|
||||||
(GAsyncReadyCallback) on_device_opened,
|
|
||||||
identify_data);
|
|
||||||
|
|
||||||
g_main_loop_run (identify_data->loop);
|
|
||||||
|
|
||||||
return identify_data->ret_value;
|
|
||||||
}
|
|
||||||
@@ -1,192 +0,0 @@
|
|||||||
/*
|
|
||||||
* Example fingerprint verification program, which verifies the
|
|
||||||
* finger which has been previously enrolled to disk.
|
|
||||||
* Copyright (C) 2007 Daniel Drake <dsd@gentoo.org>
|
|
||||||
* Copyright (C) 2019 Marco Trevisan <marco.trevisan@canonical.com>
|
|
||||||
* Copyright (C) 2020 Vasily Khoruzhick <anarsoul@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 "example-capture"
|
|
||||||
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <libfprint/fprint.h>
|
|
||||||
#include <glib-unix.h>
|
|
||||||
|
|
||||||
#include "storage.h"
|
|
||||||
#include "utilities.h"
|
|
||||||
|
|
||||||
typedef struct CaptureData
|
|
||||||
{
|
|
||||||
GMainLoop *loop;
|
|
||||||
GCancellable *cancellable;
|
|
||||||
unsigned int sigint_handler;
|
|
||||||
int ret_value;
|
|
||||||
const char *filename;
|
|
||||||
} CaptureData;
|
|
||||||
|
|
||||||
static void
|
|
||||||
capture_data_free (CaptureData *capture_data)
|
|
||||||
{
|
|
||||||
g_clear_handle_id (&capture_data->sigint_handler, g_source_remove);
|
|
||||||
g_clear_object (&capture_data->cancellable);
|
|
||||||
g_main_loop_unref (capture_data->loop);
|
|
||||||
g_free (capture_data);
|
|
||||||
}
|
|
||||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC (CaptureData, capture_data_free)
|
|
||||||
|
|
||||||
static void
|
|
||||||
on_device_closed (FpDevice *dev, GAsyncResult *res, void *user_data)
|
|
||||||
{
|
|
||||||
CaptureData *capture_data = user_data;
|
|
||||||
|
|
||||||
g_autoptr(GError) error = NULL;
|
|
||||||
|
|
||||||
fp_device_close_finish (dev, res, &error);
|
|
||||||
|
|
||||||
if (error)
|
|
||||||
g_warning ("Failed closing device %s", error->message);
|
|
||||||
|
|
||||||
g_main_loop_quit (capture_data->loop);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
capture_quit (FpDevice *dev,
|
|
||||||
CaptureData *capture_data)
|
|
||||||
{
|
|
||||||
if (!fp_device_is_open (dev))
|
|
||||||
{
|
|
||||||
g_main_loop_quit (capture_data->loop);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
fp_device_close (dev, NULL, (GAsyncReadyCallback) on_device_closed, capture_data);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
dev_capture_cb (FpDevice *dev,
|
|
||||||
GAsyncResult *res,
|
|
||||||
void *user_data)
|
|
||||||
{
|
|
||||||
g_autoptr(GError) error = NULL;
|
|
||||||
CaptureData *capture_data = user_data;
|
|
||||||
FpImage *image = NULL;
|
|
||||||
|
|
||||||
g_clear_object (&capture_data->cancellable);
|
|
||||||
|
|
||||||
image = fp_device_capture_finish (dev, res, &error);
|
|
||||||
if (!image)
|
|
||||||
{
|
|
||||||
g_warning ("Error capturing data: %s", error->message);
|
|
||||||
capture_quit (dev, capture_data);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
save_image_to_pgm (image, capture_data->filename);
|
|
||||||
|
|
||||||
capture_quit (dev, capture_data);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
start_capture (FpDevice *dev, CaptureData *capture_data)
|
|
||||||
{
|
|
||||||
fp_device_capture (dev, TRUE, capture_data->cancellable, (GAsyncReadyCallback) dev_capture_cb, capture_data);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
on_device_opened (FpDevice *dev, GAsyncResult *res, void *user_data)
|
|
||||||
{
|
|
||||||
CaptureData *capture_data = user_data;
|
|
||||||
|
|
||||||
g_autoptr(GError) error = NULL;
|
|
||||||
|
|
||||||
if (!fp_device_open_finish (dev, res, &error))
|
|
||||||
{
|
|
||||||
g_warning ("Failed to open device: %s", error->message);
|
|
||||||
capture_quit (dev, capture_data);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
g_print ("Opened device. ");
|
|
||||||
|
|
||||||
start_capture (dev, capture_data);
|
|
||||||
}
|
|
||||||
|
|
||||||
static gboolean
|
|
||||||
sigint_cb (void *user_data)
|
|
||||||
{
|
|
||||||
CaptureData *capture_data = user_data;
|
|
||||||
|
|
||||||
g_cancellable_cancel (capture_data->cancellable);
|
|
||||||
|
|
||||||
return G_SOURCE_CONTINUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
int
|
|
||||||
main (int argc, const char *argv[])
|
|
||||||
{
|
|
||||||
g_autoptr(FpContext) ctx = NULL;
|
|
||||||
g_autoptr(CaptureData) capture_data = NULL;
|
|
||||||
GPtrArray *devices;
|
|
||||||
FpDevice *dev;
|
|
||||||
|
|
||||||
setenv ("G_MESSAGES_DEBUG", "all", 0);
|
|
||||||
setenv ("LIBUSB_DEBUG", "3", 0);
|
|
||||||
|
|
||||||
ctx = fp_context_new ();
|
|
||||||
|
|
||||||
devices = fp_context_get_devices (ctx);
|
|
||||||
if (!devices)
|
|
||||||
{
|
|
||||||
g_warning ("Impossible to get devices");
|
|
||||||
return EXIT_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
dev = discover_device (devices);
|
|
||||||
if (!dev)
|
|
||||||
{
|
|
||||||
g_warning ("No devices detected.");
|
|
||||||
return EXIT_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!fp_device_has_feature (dev, FP_DEVICE_FEATURE_CAPTURE))
|
|
||||||
{
|
|
||||||
g_warning ("Device %s doesn't support capture",
|
|
||||||
fp_device_get_name (dev));
|
|
||||||
return EXIT_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
capture_data = g_new0 (CaptureData, 1);
|
|
||||||
capture_data->ret_value = EXIT_FAILURE;
|
|
||||||
capture_data->loop = g_main_loop_new (NULL, FALSE);
|
|
||||||
capture_data->cancellable = g_cancellable_new ();
|
|
||||||
capture_data->sigint_handler = g_unix_signal_add_full (G_PRIORITY_HIGH,
|
|
||||||
SIGINT,
|
|
||||||
sigint_cb,
|
|
||||||
capture_data,
|
|
||||||
NULL);
|
|
||||||
if (argc == 2)
|
|
||||||
capture_data->filename = argv[1];
|
|
||||||
else
|
|
||||||
capture_data->filename = "finger.pgm";
|
|
||||||
fp_device_open (dev, capture_data->cancellable,
|
|
||||||
(GAsyncReadyCallback) on_device_opened,
|
|
||||||
capture_data);
|
|
||||||
|
|
||||||
g_main_loop_run (capture_data->loop);
|
|
||||||
|
|
||||||
return capture_data->ret_value;
|
|
||||||
}
|
|
||||||
@@ -18,8 +18,6 @@
|
|||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define FP_COMPONENT "example-mange-prints"
|
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
#include <libfprint/fprint.h>
|
#include <libfprint/fprint.h>
|
||||||
@@ -54,7 +52,7 @@ on_device_closed (FpDevice *dev,
|
|||||||
fp_device_close_finish (dev, res, &error);
|
fp_device_close_finish (dev, res, &error);
|
||||||
|
|
||||||
if (error)
|
if (error)
|
||||||
g_warning ("Failed closing device %s", error->message);
|
g_warning ("Failed closing device %s\n", error->message);
|
||||||
|
|
||||||
g_main_loop_quit (list_data->loop);
|
g_main_loop_quit (list_data->loop);
|
||||||
}
|
}
|
||||||
@@ -86,7 +84,7 @@ delete_next_print (FpDevice *dev,
|
|||||||
g_assert_nonnull (list_data->to_delete);
|
g_assert_nonnull (list_data->to_delete);
|
||||||
print = list_data->to_delete->data;
|
print = list_data->to_delete->data;
|
||||||
|
|
||||||
g_debug ("Deleting print %s", fp_print_get_description (print));
|
g_debug ("Deleting print %s\n", fp_print_get_description (print));
|
||||||
fp_device_delete_print (dev, print, NULL,
|
fp_device_delete_print (dev, print, NULL,
|
||||||
(GAsyncReadyCallback) on_print_deleted, list_data);
|
(GAsyncReadyCallback) on_print_deleted, list_data);
|
||||||
}
|
}
|
||||||
@@ -161,7 +159,7 @@ on_list_completed (FpDevice *dev,
|
|||||||
finger_to_string (fp_print_get_finger (print)),
|
finger_to_string (fp_print_get_finger (print)),
|
||||||
fp_print_get_username (print));
|
fp_print_get_username (print));
|
||||||
|
|
||||||
if (date && g_date_valid (date))
|
if (date)
|
||||||
{
|
{
|
||||||
g_date_strftime (buf, G_N_ELEMENTS (buf), "%Y-%m-%d\0", date);
|
g_date_strftime (buf, G_N_ELEMENTS (buf), "%Y-%m-%d\0", date);
|
||||||
g_print (", enrolled on %s", buf);
|
g_print (", enrolled on %s", buf);
|
||||||
@@ -231,7 +229,7 @@ on_device_opened (FpDevice *dev,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!fp_device_has_feature (dev, FP_DEVICE_FEATURE_STORAGE))
|
if (!fp_device_has_storage (dev))
|
||||||
{
|
{
|
||||||
g_warning ("Device %s doesn't support storage", fp_device_get_name (dev));
|
g_warning ("Device %s doesn't support storage", fp_device_get_name (dev));
|
||||||
g_main_loop_quit (list_data->loop);
|
g_main_loop_quit (list_data->loop);
|
||||||
|
|||||||
+1
-23
@@ -1,12 +1,5 @@
|
|||||||
|
|
||||||
examples = [
|
examples = [ 'enroll', 'verify', 'manage-prints' ]
|
||||||
'enroll',
|
|
||||||
'identify',
|
|
||||||
'img-capture',
|
|
||||||
'manage-prints',
|
|
||||||
'verify',
|
|
||||||
]
|
|
||||||
|
|
||||||
foreach example: examples
|
foreach example: examples
|
||||||
executable(example,
|
executable(example,
|
||||||
[ example + '.c', 'storage.c', 'utilities.c' ],
|
[ example + '.c', 'storage.c', 'utilities.c' ],
|
||||||
@@ -21,18 +14,3 @@ executable('cpp-test',
|
|||||||
'cpp-test.cpp',
|
'cpp-test.cpp',
|
||||||
dependencies: libfprint_dep,
|
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
|
|
||||||
|
|||||||
+26
-95
@@ -2,7 +2,7 @@
|
|||||||
* Trivial storage driver for example programs
|
* Trivial storage driver for example programs
|
||||||
*
|
*
|
||||||
* Copyright (C) 2019 Benjamin Berg <bberg@redhat.com>
|
* Copyright (C) 2019 Benjamin Berg <bberg@redhat.com>
|
||||||
* Copyright (C) 2019-2020 Marco Trevisan <marco.trevisan@canonical.com>
|
* Copyright (C) 2019 Marco Trevisan <marco.trevisan@canonical.com>
|
||||||
*
|
*
|
||||||
* This library is free software; you can redistribute it and/or
|
* This library is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU Lesser General Public
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
@@ -19,10 +19,7 @@
|
|||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define FP_COMPONENT "example-storage"
|
|
||||||
|
|
||||||
#include <libfprint/fprint.h>
|
#include <libfprint/fprint.h>
|
||||||
#include <libfprint/fpi-compat.h>
|
|
||||||
#include "storage.h"
|
#include "storage.h"
|
||||||
|
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
@@ -60,7 +57,7 @@ load_data (void)
|
|||||||
{
|
{
|
||||||
GVariantDict *res;
|
GVariantDict *res;
|
||||||
GVariant *var;
|
GVariant *var;
|
||||||
gchar *contents = NULL;
|
g_autofree gchar *contents = NULL;
|
||||||
gsize length = 0;
|
gsize length = 0;
|
||||||
|
|
||||||
if (!g_file_get_contents (STORAGE_FILE, &contents, &length, NULL))
|
if (!g_file_get_contents (STORAGE_FILE, &contents, &length, NULL))
|
||||||
@@ -69,12 +66,7 @@ load_data (void)
|
|||||||
return g_variant_dict_new (NULL);
|
return g_variant_dict_new (NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
var = g_variant_new_from_data (G_VARIANT_TYPE_VARDICT,
|
var = g_variant_new_from_data (G_VARIANT_TYPE_VARDICT, contents, length, FALSE, NULL, NULL);
|
||||||
contents,
|
|
||||||
length,
|
|
||||||
FALSE,
|
|
||||||
g_free,
|
|
||||||
contents);
|
|
||||||
|
|
||||||
res = g_variant_dict_new (var);
|
res = g_variant_dict_new (var);
|
||||||
g_variant_unref (var);
|
g_variant_unref (var);
|
||||||
@@ -102,23 +94,8 @@ save_data (GVariant *data)
|
|||||||
return 0;
|
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
|
int
|
||||||
print_data_save (FpPrint *print, FpFinger finger, gboolean update_fingerprint)
|
print_data_save (FpPrint *print, FpFinger finger)
|
||||||
{
|
{
|
||||||
g_autofree gchar *descr = get_print_data_descriptor (print, NULL, finger);
|
g_autofree gchar *descr = get_print_data_descriptor (print, NULL, finger);
|
||||||
|
|
||||||
@@ -152,97 +129,51 @@ print_data_load (FpDevice *dev, FpFinger finger)
|
|||||||
|
|
||||||
g_autoptr(GVariant) val = NULL;
|
g_autoptr(GVariant) val = NULL;
|
||||||
g_autoptr(GVariantDict) dict = NULL;
|
g_autoptr(GVariantDict) dict = NULL;
|
||||||
|
g_autofree guchar *stored_data = NULL;
|
||||||
|
gsize stored_len;
|
||||||
|
|
||||||
dict = load_data ();
|
dict = load_data ();
|
||||||
val = g_variant_dict_lookup_value (dict, descr, G_VARIANT_TYPE ("ay"));
|
val = g_variant_dict_lookup_value (dict, descr, G_VARIANT_TYPE ("ay"));
|
||||||
|
|
||||||
if (val)
|
if (val)
|
||||||
return load_print_from_data (val);
|
{
|
||||||
|
FpPrint *print;
|
||||||
|
g_autoptr(GError) error = NULL;
|
||||||
|
|
||||||
|
stored_data = (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 NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
GPtrArray *
|
|
||||||
gallery_data_load (FpDevice *dev)
|
|
||||||
{
|
|
||||||
g_autoptr(GVariantDict) dict = NULL;
|
|
||||||
g_autoptr(GVariant) dict_variant = NULL;
|
|
||||||
g_autofree char *dev_prefix = NULL;
|
|
||||||
GPtrArray *gallery;
|
|
||||||
const char *driver;
|
|
||||||
const char *dev_id;
|
|
||||||
GVariantIter iter;
|
|
||||||
GVariant *value;
|
|
||||||
gchar *key;
|
|
||||||
|
|
||||||
gallery = g_ptr_array_new_with_free_func (g_object_unref);
|
|
||||||
dict = load_data ();
|
|
||||||
dict_variant = g_variant_dict_end (dict);
|
|
||||||
driver = fp_device_get_driver (dev);
|
|
||||||
dev_id = fp_device_get_device_id (dev);
|
|
||||||
dev_prefix = g_strdup_printf ("%s/%s/", driver, dev_id);
|
|
||||||
|
|
||||||
g_variant_iter_init (&iter, dict_variant);
|
|
||||||
while (g_variant_iter_loop (&iter, "{sv}", &key, &value))
|
|
||||||
{
|
|
||||||
FpPrint *print;
|
|
||||||
const guchar *stored_data;
|
|
||||||
g_autoptr(GError) error = NULL;
|
|
||||||
gsize stored_len;
|
|
||||||
|
|
||||||
if (!g_str_has_prefix (key, dev_prefix))
|
|
||||||
continue;
|
|
||||||
|
|
||||||
stored_data = (const guchar *) g_variant_get_fixed_array (value, &stored_len, 1);
|
|
||||||
print = fp_print_deserialize (stored_data, stored_len, &error);
|
|
||||||
|
|
||||||
if (error)
|
|
||||||
{
|
|
||||||
g_warning ("Error deserializing data: %s", error->message);
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
g_ptr_array_add (gallery, print);
|
|
||||||
}
|
|
||||||
|
|
||||||
return gallery;
|
|
||||||
}
|
|
||||||
|
|
||||||
FpPrint *
|
FpPrint *
|
||||||
print_create_template (FpDevice *dev, FpFinger finger, gboolean load_existing)
|
print_create_template (FpDevice *dev, FpFinger finger)
|
||||||
{
|
{
|
||||||
g_autoptr(GVariantDict) dict = NULL;
|
|
||||||
g_autoptr(GDateTime) datetime = 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;
|
FpPrint *template = NULL;
|
||||||
|
GDate *date = NULL;
|
||||||
gint year, month, day;
|
gint year, month, day;
|
||||||
|
|
||||||
if (load_existing)
|
template = fp_print_new (dev);
|
||||||
{
|
fp_print_set_finger (template, finger);
|
||||||
dict = load_data ();
|
fp_print_set_username (template, g_get_user_name ());
|
||||||
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 ();
|
datetime = g_date_time_new_now_local ();
|
||||||
g_date_time_get_ymd (datetime, &year, &month, &day);
|
g_date_time_get_ymd (datetime, &year, &month, &day);
|
||||||
date = g_date_new_dmy (day, month, year);
|
date = g_date_new_dmy (day, month, year);
|
||||||
fp_print_set_enroll_date (template, date);
|
fp_print_set_enroll_date (template, date);
|
||||||
|
g_date_free (date);
|
||||||
|
|
||||||
return template;
|
return template;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
gboolean
|
static gboolean
|
||||||
save_image_to_pgm (FpImage *img, const char *path)
|
save_image_to_pgm (FpImage *img, const char *path)
|
||||||
{
|
{
|
||||||
FILE *fd = fopen (path, "w");
|
FILE *fd = fopen (path, "w");
|
||||||
@@ -282,7 +213,7 @@ save_image_to_pgm (FpImage *img, const char *path)
|
|||||||
gboolean
|
gboolean
|
||||||
print_image_save (FpPrint *print, const char *path)
|
print_image_save (FpPrint *print, const char *path)
|
||||||
{
|
{
|
||||||
FpImage *img = NULL;
|
g_autoptr(FpImage) img = NULL;
|
||||||
|
|
||||||
g_return_val_if_fail (FP_IS_PRINT (print), FALSE);
|
g_return_val_if_fail (FP_IS_PRINT (print), FALSE);
|
||||||
g_return_val_if_fail (path != NULL, FALSE);
|
g_return_val_if_fail (path != NULL, FALSE);
|
||||||
|
|||||||
+8
-9
@@ -18,18 +18,17 @@
|
|||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#pragma once
|
#ifndef __STORAGE_H
|
||||||
|
#define __STORAGE_H
|
||||||
|
|
||||||
|
|
||||||
int print_data_save (FpPrint *print,
|
int print_data_save (FpPrint *print,
|
||||||
FpFinger finger,
|
FpFinger finger);
|
||||||
gboolean update_fingerprint);
|
|
||||||
FpPrint * print_data_load (FpDevice *dev,
|
FpPrint * print_data_load (FpDevice *dev,
|
||||||
FpFinger finger);
|
FpFinger finger);
|
||||||
GPtrArray * gallery_data_load (FpDevice *dev);
|
FpPrint * print_create_template (FpDevice *dev,
|
||||||
FpPrint * print_create_template (FpDevice *dev,
|
FpFinger finger);
|
||||||
FpFinger finger,
|
|
||||||
const gboolean load_existing);
|
|
||||||
gboolean print_image_save (FpPrint *print,
|
gboolean print_image_save (FpPrint *print,
|
||||||
const char *path);
|
const char *path);
|
||||||
gboolean save_image_to_pgm (FpImage *img,
|
|
||||||
const char *path);
|
#endif /* __STORAGE_H */
|
||||||
|
|||||||
@@ -1,161 +0,0 @@
|
|||||||
/*
|
|
||||||
* 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 ();
|
|
||||||
}
|
|
||||||
+17
-10
@@ -18,8 +18,6 @@
|
|||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define FP_COMPONENT "example-utilities"
|
|
||||||
|
|
||||||
#include <libfprint/fprint.h>
|
#include <libfprint/fprint.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
@@ -101,7 +99,6 @@ finger_to_string (FpFinger finger)
|
|||||||
case FP_FINGER_RIGHT_LITTLE:
|
case FP_FINGER_RIGHT_LITTLE:
|
||||||
return "right little";
|
return "right little";
|
||||||
|
|
||||||
case FP_FINGER_UNKNOWN:
|
|
||||||
default:
|
default:
|
||||||
return "unknown";
|
return "unknown";
|
||||||
}
|
}
|
||||||
@@ -110,19 +107,29 @@ finger_to_string (FpFinger finger)
|
|||||||
FpFinger
|
FpFinger
|
||||||
finger_chooser (void)
|
finger_chooser (void)
|
||||||
{
|
{
|
||||||
int i = FP_FINGER_UNKNOWN;
|
int i;
|
||||||
|
const FpFinger all_fingers[] = {
|
||||||
|
FP_FINGER_LEFT_THUMB,
|
||||||
|
FP_FINGER_LEFT_INDEX,
|
||||||
|
FP_FINGER_LEFT_MIDDLE,
|
||||||
|
FP_FINGER_LEFT_RING,
|
||||||
|
FP_FINGER_LEFT_LITTLE,
|
||||||
|
FP_FINGER_RIGHT_THUMB,
|
||||||
|
FP_FINGER_RIGHT_INDEX,
|
||||||
|
FP_FINGER_RIGHT_MIDDLE,
|
||||||
|
FP_FINGER_RIGHT_RING,
|
||||||
|
FP_FINGER_RIGHT_LITTLE,
|
||||||
|
};
|
||||||
|
|
||||||
for (i = FP_FINGER_FIRST; i <= FP_FINGER_LAST; ++i)
|
for (i = all_fingers[0]; i <= G_N_ELEMENTS (all_fingers); ++i)
|
||||||
g_print (" [%d] %s\n", (i - FP_FINGER_FIRST), finger_to_string (i));
|
g_print (" [%d] %s\n", (i - all_fingers[0]), finger_to_string (i));
|
||||||
|
|
||||||
g_print ("> ");
|
g_print ("> ");
|
||||||
if (!scanf ("%d%*c", &i))
|
if (!scanf ("%d%*c", &i))
|
||||||
return FP_FINGER_UNKNOWN;
|
return FP_FINGER_UNKNOWN;
|
||||||
|
|
||||||
i += FP_FINGER_FIRST;
|
if (i < 0 || i >= G_N_ELEMENTS (all_fingers))
|
||||||
|
|
||||||
if (i < FP_FINGER_FIRST || i > FP_FINGER_LAST)
|
|
||||||
return FP_FINGER_UNKNOWN;
|
return FP_FINGER_UNKNOWN;
|
||||||
|
|
||||||
return i;
|
return all_fingers[i];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,8 +18,11 @@
|
|||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#pragma once
|
#ifndef __UTILITIES_H
|
||||||
|
#define __UTILITIES_H
|
||||||
|
|
||||||
FpDevice * discover_device (GPtrArray *devices);
|
FpDevice * discover_device (GPtrArray *devices);
|
||||||
FpFinger finger_chooser (void);
|
FpFinger finger_chooser (void);
|
||||||
const char * finger_to_string (FpFinger finger);
|
const char * finger_to_string (FpFinger finger);
|
||||||
|
|
||||||
|
#endif /* __UTILITIES_H */
|
||||||
|
|||||||
+46
-142
@@ -19,29 +19,22 @@
|
|||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define FP_COMPONENT "example-verify"
|
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <libfprint/fprint.h>
|
#include <libfprint/fprint.h>
|
||||||
#include <glib-unix.h>
|
|
||||||
|
|
||||||
#include "storage.h"
|
#include "storage.h"
|
||||||
#include "utilities.h"
|
#include "utilities.h"
|
||||||
|
|
||||||
typedef struct _VerifyData
|
typedef struct _VerifyData
|
||||||
{
|
{
|
||||||
GMainLoop *loop;
|
GMainLoop *loop;
|
||||||
GCancellable *cancellable;
|
FpFinger finger;
|
||||||
unsigned int sigint_handler;
|
int ret_value;
|
||||||
FpFinger finger;
|
|
||||||
int ret_value;
|
|
||||||
} VerifyData;
|
} VerifyData;
|
||||||
|
|
||||||
static void
|
static void
|
||||||
verify_data_free (VerifyData *verify_data)
|
verify_data_free (VerifyData *verify_data)
|
||||||
{
|
{
|
||||||
g_clear_handle_id (&verify_data->sigint_handler, g_source_remove);
|
|
||||||
g_clear_object (&verify_data->cancellable);
|
|
||||||
g_main_loop_unref (verify_data->loop);
|
g_main_loop_unref (verify_data->loop);
|
||||||
g_free (verify_data);
|
g_free (verify_data);
|
||||||
}
|
}
|
||||||
@@ -57,24 +50,11 @@ on_device_closed (FpDevice *dev, GAsyncResult *res, void *user_data)
|
|||||||
fp_device_close_finish (dev, res, &error);
|
fp_device_close_finish (dev, res, &error);
|
||||||
|
|
||||||
if (error)
|
if (error)
|
||||||
g_warning ("Failed closing device %s", error->message);
|
g_warning ("Failed closing device %s\n", error->message);
|
||||||
|
|
||||||
g_main_loop_quit (verify_data->loop);
|
g_main_loop_quit (verify_data->loop);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
|
||||||
verify_quit (FpDevice *dev,
|
|
||||||
VerifyData *verify_data)
|
|
||||||
{
|
|
||||||
if (!fp_device_is_open (dev))
|
|
||||||
{
|
|
||||||
g_main_loop_quit (verify_data->loop);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
fp_device_close (dev, NULL, (GAsyncReadyCallback) on_device_closed, verify_data);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void start_verification (FpDevice *dev,
|
static void start_verification (FpDevice *dev,
|
||||||
VerifyData *verify_data);
|
VerifyData *verify_data);
|
||||||
|
|
||||||
@@ -91,87 +71,35 @@ on_verify_completed (FpDevice *dev, GAsyncResult *res, void *user_data)
|
|||||||
if (!fp_device_verify_finish (dev, res, &match, &print, &error))
|
if (!fp_device_verify_finish (dev, res, &match, &print, &error))
|
||||||
{
|
{
|
||||||
g_warning ("Failed to verify print: %s", error->message);
|
g_warning ("Failed to verify print: %s", error->message);
|
||||||
verify_data->ret_value = EXIT_FAILURE;
|
g_main_loop_quit (verify_data->loop);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (error->domain != FP_DEVICE_RETRY)
|
if (match)
|
||||||
{
|
{
|
||||||
verify_quit (dev, verify_data);
|
g_print ("MATCH!\n");
|
||||||
return;
|
if (fp_device_supports_capture (dev) &&
|
||||||
}
|
print_image_save (print, "verify.pgm"))
|
||||||
|
g_print ("Print image saved as verify.pgm");
|
||||||
|
|
||||||
|
verify_data->ret_value = EXIT_SUCCESS;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
g_print ("NO MATCH!\n");
|
||||||
|
verify_data->ret_value = EXIT_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
g_print ("Verify again? [Y/n]? ");
|
g_print ("Verify again? [Y/n]? ");
|
||||||
if (fgets (buffer, sizeof (buffer), stdin) &&
|
if (fgets (buffer, sizeof (buffer), stdin) &&
|
||||||
(buffer[0] == 'Y' || buffer[0] == 'y' || buffer[0] == '\n'))
|
(buffer[0] == 'Y' || buffer[0] == 'y'))
|
||||||
{
|
{
|
||||||
start_verification (dev, verify_data);
|
start_verification (dev, verify_data);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
verify_quit (dev, verify_data);
|
fp_device_close (dev, NULL, (GAsyncReadyCallback) on_device_closed,
|
||||||
}
|
verify_data);
|
||||||
|
|
||||||
static void
|
|
||||||
on_match_cb (FpDevice *dev, FpPrint *match, FpPrint *print,
|
|
||||||
gpointer user_data, GError *error)
|
|
||||||
{
|
|
||||||
VerifyData *verify_data = user_data;
|
|
||||||
|
|
||||||
if (error)
|
|
||||||
{
|
|
||||||
g_warning ("Match report: Finger not matched, retry error reported: %s",
|
|
||||||
error->message);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (print && fp_print_get_image (print) &&
|
|
||||||
print_image_save (print, "verify.pgm"))
|
|
||||||
g_print ("Print image saved as verify.pgm\n");
|
|
||||||
|
|
||||||
if (match)
|
|
||||||
{
|
|
||||||
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 "
|
|
||||||
"with print %s, enrolled on date %s by user %s",
|
|
||||||
fp_device_get_name (dev),
|
|
||||||
finger_to_string (fp_print_get_finger (match)),
|
|
||||||
fp_print_get_description (match), date_str,
|
|
||||||
fp_print_get_username (match));
|
|
||||||
|
|
||||||
g_print ("MATCH!\n");
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
g_debug ("Match report: Finger not matched");
|
|
||||||
g_print ("NO MATCH!\n");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static FpPrint *
|
|
||||||
get_stored_print (FpDevice *dev, VerifyData *verify_data)
|
|
||||||
{
|
|
||||||
FpPrint *verify_print;
|
|
||||||
|
|
||||||
g_print ("Loading previously enrolled %s finger data...\n",
|
|
||||||
finger_to_string (verify_data->finger));
|
|
||||||
|
|
||||||
verify_print = print_data_load (dev, verify_data->finger);
|
|
||||||
|
|
||||||
if (!verify_print)
|
|
||||||
{
|
|
||||||
g_warning ("Failed to load fingerprint data");
|
|
||||||
g_warning ("Did you remember to enroll your %s finger first?",
|
|
||||||
finger_to_string (verify_data->finger));
|
|
||||||
}
|
|
||||||
|
|
||||||
return verify_print;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@@ -187,27 +115,15 @@ on_list_completed (FpDevice *dev, GAsyncResult *res, gpointer user_data)
|
|||||||
if (!error)
|
if (!error)
|
||||||
{
|
{
|
||||||
FpPrint *verify_print = NULL;
|
FpPrint *verify_print = NULL;
|
||||||
g_autoptr(FpPrint) stored_print = NULL;
|
|
||||||
guint i;
|
guint i;
|
||||||
|
|
||||||
if (!prints->len)
|
if (!prints->len)
|
||||||
{
|
g_warning ("No prints saved on device");
|
||||||
g_warning ("No prints saved on device");
|
|
||||||
verify_quit (dev, verify_data);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
stored_print = get_stored_print (dev, verify_data);
|
|
||||||
|
|
||||||
for (i = 0; i < prints->len; ++i)
|
for (i = 0; i < prints->len; ++i)
|
||||||
{
|
{
|
||||||
FpPrint *print = prints->pdata[i];
|
FpPrint *print = prints->pdata[i];
|
||||||
|
|
||||||
if (stored_print && fp_print_equal (stored_print, print))
|
|
||||||
/* If the private print data matches, let's use the stored print
|
|
||||||
* as it contains more metadata to show */
|
|
||||||
print = stored_print;
|
|
||||||
|
|
||||||
if (fp_print_get_finger (print) == verify_data->finger &&
|
if (fp_print_get_finger (print) == verify_data->finger &&
|
||||||
g_strcmp0 (fp_print_get_username (print), g_get_user_name ()) == 0)
|
g_strcmp0 (fp_print_get_username (print), g_get_user_name ()) == 0)
|
||||||
{
|
{
|
||||||
@@ -225,7 +141,9 @@ on_list_completed (FpDevice *dev, GAsyncResult *res, gpointer user_data)
|
|||||||
|
|
||||||
if (!verify_print)
|
if (!verify_print)
|
||||||
{
|
{
|
||||||
verify_quit (dev, verify_data);
|
g_warning ("Did you remember to enroll your %s finger first?",
|
||||||
|
finger_to_string (verify_data->finger));
|
||||||
|
g_main_loop_quit (verify_data->loop);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -233,36 +151,32 @@ on_list_completed (FpDevice *dev, GAsyncResult *res, gpointer user_data)
|
|||||||
fp_print_get_description (verify_print));
|
fp_print_get_description (verify_print));
|
||||||
|
|
||||||
g_print ("Print loaded. Time to verify!\n");
|
g_print ("Print loaded. Time to verify!\n");
|
||||||
fp_device_verify (dev, verify_print, verify_data->cancellable,
|
fp_device_verify (dev, verify_print, NULL,
|
||||||
on_match_cb, verify_data, NULL,
|
|
||||||
(GAsyncReadyCallback) on_verify_completed,
|
(GAsyncReadyCallback) on_verify_completed,
|
||||||
verify_data);
|
verify_data);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
g_warning ("Loading prints failed with error %s", error->message);
|
g_warning ("Loading prints failed with error %s", error->message);
|
||||||
verify_quit (dev, verify_data);
|
g_main_loop_quit (verify_data->loop);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
start_verification (FpDevice *dev, VerifyData *verify_data)
|
start_verification (FpDevice *dev, VerifyData *verify_data)
|
||||||
{
|
{
|
||||||
if (verify_data->finger == FP_FINGER_UNKNOWN)
|
g_print ("Choose the finger to verify:\n");
|
||||||
{
|
verify_data->finger = finger_chooser ();
|
||||||
g_print ("Choose the finger to verify:\n");
|
|
||||||
verify_data->finger = finger_chooser ();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (verify_data->finger == FP_FINGER_UNKNOWN)
|
if (verify_data->finger == FP_FINGER_UNKNOWN)
|
||||||
{
|
{
|
||||||
g_warning ("Unknown finger selected");
|
g_warning ("Unknown finger selected");
|
||||||
verify_data->ret_value = EXIT_FAILURE;
|
verify_data->ret_value = EXIT_FAILURE;
|
||||||
verify_quit (dev, verify_data);
|
g_main_loop_quit (verify_data->loop);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (fp_device_has_feature (dev, FP_DEVICE_FEATURE_STORAGE))
|
if (fp_device_has_storage (dev))
|
||||||
{
|
{
|
||||||
g_print ("Creating finger template, using device storage...\n");
|
g_print ("Creating finger template, using device storage...\n");
|
||||||
fp_device_list_prints (dev, NULL,
|
fp_device_list_prints (dev, NULL,
|
||||||
@@ -271,17 +185,23 @@ start_verification (FpDevice *dev, VerifyData *verify_data)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
g_autoptr(FpPrint) verify_print = get_stored_print (dev, verify_data);
|
g_print ("Loading previously enrolled %s finger data...\n",
|
||||||
|
finger_to_string (verify_data->finger));
|
||||||
|
g_autoptr(FpPrint) verify_print = NULL;
|
||||||
|
|
||||||
|
verify_print = print_data_load (dev, verify_data->finger);
|
||||||
|
|
||||||
if (!verify_print)
|
if (!verify_print)
|
||||||
{
|
{
|
||||||
verify_quit (dev, verify_data);
|
g_warning ("Failed to load fingerprint data");
|
||||||
|
g_warning ("Did you remember to enroll your %s finger first?",
|
||||||
|
finger_to_string (verify_data->finger));
|
||||||
|
g_main_loop_quit (verify_data->loop);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
g_print ("Print loaded. Time to verify!\n");
|
g_print ("Print loaded. Time to verify!\n");
|
||||||
fp_device_verify (dev, verify_print, verify_data->cancellable,
|
fp_device_verify (dev, verify_print, NULL,
|
||||||
on_match_cb, verify_data, NULL,
|
|
||||||
(GAsyncReadyCallback) on_verify_completed,
|
(GAsyncReadyCallback) on_verify_completed,
|
||||||
verify_data);
|
verify_data);
|
||||||
}
|
}
|
||||||
@@ -297,7 +217,7 @@ on_device_opened (FpDevice *dev, GAsyncResult *res, void *user_data)
|
|||||||
if (!fp_device_open_finish (dev, res, &error))
|
if (!fp_device_open_finish (dev, res, &error))
|
||||||
{
|
{
|
||||||
g_warning ("Failed to open device: %s", error->message);
|
g_warning ("Failed to open device: %s", error->message);
|
||||||
verify_quit (dev, verify_data);
|
g_main_loop_quit (verify_data->loop);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -306,16 +226,6 @@ on_device_opened (FpDevice *dev, GAsyncResult *res, void *user_data)
|
|||||||
start_verification (dev, verify_data);
|
start_verification (dev, verify_data);
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
|
||||||
sigint_cb (void *user_data)
|
|
||||||
{
|
|
||||||
VerifyData *verify_data = user_data;
|
|
||||||
|
|
||||||
g_cancellable_cancel (verify_data->cancellable);
|
|
||||||
|
|
||||||
return G_SOURCE_CONTINUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
int
|
int
|
||||||
main (void)
|
main (void)
|
||||||
{
|
{
|
||||||
@@ -346,14 +256,8 @@ main (void)
|
|||||||
verify_data = g_new0 (VerifyData, 1);
|
verify_data = g_new0 (VerifyData, 1);
|
||||||
verify_data->ret_value = EXIT_FAILURE;
|
verify_data->ret_value = EXIT_FAILURE;
|
||||||
verify_data->loop = g_main_loop_new (NULL, FALSE);
|
verify_data->loop = g_main_loop_new (NULL, FALSE);
|
||||||
verify_data->cancellable = g_cancellable_new ();
|
|
||||||
verify_data->sigint_handler = g_unix_signal_add_full (G_PRIORITY_HIGH,
|
fp_device_open (dev, NULL, (GAsyncReadyCallback) on_device_opened,
|
||||||
SIGINT,
|
|
||||||
sigint_cb,
|
|
||||||
verify_data,
|
|
||||||
NULL);
|
|
||||||
fp_device_open (dev, verify_data->cancellable,
|
|
||||||
(GAsyncReadyCallback) on_device_opened,
|
|
||||||
verify_data);
|
verify_data);
|
||||||
|
|
||||||
g_main_loop_run (verify_data->loop);
|
g_main_loop_run (verify_data->loop);
|
||||||
|
|||||||
@@ -135,8 +135,10 @@ generic_read_ignore_data (FpiSsm *ssm, FpDevice *dev,
|
|||||||
size_t bytes)
|
size_t bytes)
|
||||||
{
|
{
|
||||||
FpiUsbTransfer *transfer = fpi_usb_transfer_new (dev);
|
FpiUsbTransfer *transfer = fpi_usb_transfer_new (dev);
|
||||||
|
unsigned char *data;
|
||||||
|
|
||||||
fpi_usb_transfer_fill_bulk (transfer, EP_IN, bytes);
|
data = g_malloc (bytes);
|
||||||
|
fpi_usb_transfer_fill_bulk_full (transfer, EP_IN, data, bytes, NULL);
|
||||||
transfer->ssm = ssm;
|
transfer->ssm = ssm;
|
||||||
transfer->short_is_error = TRUE;
|
transfer->short_is_error = TRUE;
|
||||||
fpi_usb_transfer_submit (transfer, BULK_TIMEOUT, NULL,
|
fpi_usb_transfer_submit (transfer, BULK_TIMEOUT, NULL,
|
||||||
@@ -612,7 +614,6 @@ capture_read_strip_cb (FpiUsbTransfer *transfer, FpDevice *device,
|
|||||||
self->strips = g_slist_reverse (self->strips);
|
self->strips = g_slist_reverse (self->strips);
|
||||||
fpi_do_movement_estimation (&assembling_ctx, self->strips);
|
fpi_do_movement_estimation (&assembling_ctx, self->strips);
|
||||||
img = fpi_assemble_frames (&assembling_ctx, self->strips);
|
img = fpi_assemble_frames (&assembling_ctx, self->strips);
|
||||||
img->flags |= FPI_IMAGE_PARTIAL;
|
|
||||||
|
|
||||||
g_slist_free_full (self->strips, g_free);
|
g_slist_free_full (self->strips, g_free);
|
||||||
self->strips = NULL;
|
self->strips = NULL;
|
||||||
|
|||||||
@@ -18,12 +18,11 @@
|
|||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#pragma once
|
#ifndef __AES1660_H
|
||||||
|
#define __AES1660_H
|
||||||
|
|
||||||
#define AES1660_FRAME_SIZE 0x244
|
#define AES1660_FRAME_SIZE 0x244
|
||||||
|
|
||||||
/* *INDENT-OFF* */
|
|
||||||
|
|
||||||
/* First init sequence, 0x07 cmd returns following before INIT1:
|
/* First init sequence, 0x07 cmd returns following before INIT1:
|
||||||
* { 0x07, 0x05, 0x00, 0x8f, 0x16, 0x25, 0x01, 0x00 }
|
* { 0x07, 0x05, 0x00, 0x8f, 0x16, 0x25, 0x01, 0x00 }
|
||||||
*/
|
*/
|
||||||
@@ -1987,3 +1986,5 @@ static const unsigned char aes1660_start_imaging_cmd[] = {
|
|||||||
0x55, 0x07, 0x00, 0x80, 0x42, 0x00, 0x7f, 0x00, 0x00, 0x14,
|
0x55, 0x07, 0x00, 0x80, 0x42, 0x00, 0x7f, 0x00, 0x00, 0x14,
|
||||||
0x49, 0x03, 0x00, 0x20, 0x00, 0xc8
|
0x49, 0x03, 0x00, 0x20, 0x00, 0xc8
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|||||||
@@ -458,7 +458,6 @@ capture_read_strip_cb (FpiUsbTransfer *transfer, FpDevice *_dev,
|
|||||||
fpi_do_movement_estimation (&assembling_ctx, self->strips);
|
fpi_do_movement_estimation (&assembling_ctx, self->strips);
|
||||||
img = fpi_assemble_frames (&assembling_ctx,
|
img = fpi_assemble_frames (&assembling_ctx,
|
||||||
self->strips);
|
self->strips);
|
||||||
img->flags |= FPI_IMAGE_PARTIAL;
|
|
||||||
g_slist_free_full (self->strips, g_free);
|
g_slist_free_full (self->strips, g_free);
|
||||||
self->strips = NULL;
|
self->strips = NULL;
|
||||||
self->strips_len = 0;
|
self->strips_len = 0;
|
||||||
|
|||||||
@@ -19,7 +19,8 @@
|
|||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#pragma once
|
#ifndef __AES2501_H
|
||||||
|
#define __AES2501_H
|
||||||
|
|
||||||
enum aes2501_regs {
|
enum aes2501_regs {
|
||||||
AES2501_REG_CTRL1 = 0x80,
|
AES2501_REG_CTRL1 = 0x80,
|
||||||
@@ -171,3 +172,5 @@ enum aes2501_sensor_gain2 {
|
|||||||
|
|
||||||
#define AES2501_SUM_HIGH_THRESH 1000
|
#define AES2501_SUM_HIGH_THRESH 1000
|
||||||
#define AES2501_SUM_LOW_THRESH 700
|
#define AES2501_SUM_LOW_THRESH 700
|
||||||
|
|
||||||
|
#endif /* __AES2501_H */
|
||||||
|
|||||||
@@ -197,12 +197,12 @@ process_strip_data (FpiSsm *ssm, FpImageDevice *dev,
|
|||||||
|
|
||||||
if (data[0] != AES2550_EDATA_MAGIC)
|
if (data[0] != AES2550_EDATA_MAGIC)
|
||||||
{
|
{
|
||||||
fp_dbg ("Bogus magic: %.2x", (int) (data[0]));
|
fp_dbg ("Bogus magic: %.2x\n", (int) (data[0]));
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
len = data[1] * 256 + data[2];
|
len = data[1] * 256 + data[2];
|
||||||
if (len != (AES2550_STRIP_SIZE - 3))
|
if (len != (AES2550_STRIP_SIZE - 3))
|
||||||
fp_dbg ("Bogus frame len: %.4x", len);
|
fp_dbg ("Bogus frame len: %.4x\n", len);
|
||||||
stripe = g_malloc0 (FRAME_WIDTH * FRAME_HEIGHT / 2 + sizeof (struct fpi_frame)); /* 4 bits per pixel */
|
stripe = g_malloc0 (FRAME_WIDTH * FRAME_HEIGHT / 2 + sizeof (struct fpi_frame)); /* 4 bits per pixel */
|
||||||
stripe->delta_x = (int8_t) data[6];
|
stripe->delta_x = (int8_t) data[6];
|
||||||
stripe->delta_y = -(int8_t) data[7];
|
stripe->delta_y = -(int8_t) data[7];
|
||||||
@@ -230,7 +230,6 @@ capture_set_idle_reqs_cb (FpiUsbTransfer *transfer,
|
|||||||
|
|
||||||
self->strips = g_slist_reverse (self->strips);
|
self->strips = g_slist_reverse (self->strips);
|
||||||
img = fpi_assemble_frames (&assembling_ctx, self->strips);
|
img = fpi_assemble_frames (&assembling_ctx, self->strips);
|
||||||
img->flags |= FPI_IMAGE_PARTIAL;
|
|
||||||
g_slist_free_full (self->strips, g_free);
|
g_slist_free_full (self->strips, g_free);
|
||||||
self->strips = NULL;
|
self->strips = NULL;
|
||||||
self->strips_len = 0;
|
self->strips_len = 0;
|
||||||
|
|||||||
@@ -17,7 +17,8 @@
|
|||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#pragma once
|
#ifndef __AES2550_H
|
||||||
|
#define __AES2550_H
|
||||||
|
|
||||||
/* Registers bits */
|
/* Registers bits */
|
||||||
|
|
||||||
@@ -109,3 +110,5 @@ enum aes2550_cmds {
|
|||||||
#define AES2550_HEARTBEAT_MAGIC 0xdb
|
#define AES2550_HEARTBEAT_MAGIC 0xdb
|
||||||
|
|
||||||
#define AES2550_EP_IN_BUF_SIZE 8192
|
#define AES2550_EP_IN_BUF_SIZE 8192
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|||||||
@@ -17,12 +17,11 @@
|
|||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#pragma once
|
#ifndef __AES2660_H
|
||||||
|
#define __AES2660_H
|
||||||
|
|
||||||
#define AES2660_FRAME_SIZE 0x354
|
#define AES2660_FRAME_SIZE 0x354
|
||||||
|
|
||||||
/* *INDENT-OFF* */
|
|
||||||
|
|
||||||
/* First init sequence, 0x07 cmd returns following before INIT1:
|
/* First init sequence, 0x07 cmd returns following before INIT1:
|
||||||
* { 0x07, 0x05, 0x00, 0x91, 0x26, 0x21, 0x00, 0x00 }
|
* { 0x07, 0x05, 0x00, 0x91, 0x26, 0x21, 0x00, 0x00 }
|
||||||
*/
|
*/
|
||||||
@@ -1961,3 +1960,5 @@ static const unsigned char aes2660_start_imaging_cmd[] = {
|
|||||||
0x55, 0x07, 0x00, 0x80, 0x42, 0x00, 0xbf, 0x00, 0x00, 0x18,
|
0x55, 0x07, 0x00, 0x80, 0x42, 0x00, 0xbf, 0x00, 0x00, 0x18,
|
||||||
0x49, 0x03, 0x00, 0x20, 0x08, 0xc8
|
0x49, 0x03, 0x00, 0x20, 0x08, 0xc8
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|||||||
@@ -106,9 +106,7 @@ static struct aes_regwrite init_reqs[] = {
|
|||||||
{ 0x9e, 0x53 }, /* clear challenge word bits */
|
{ 0x9e, 0x53 }, /* clear challenge word bits */
|
||||||
{ 0x9f, 0x6b }, /* set some challenge word bits */
|
{ 0x9f, 0x6b }, /* set some challenge word bits */
|
||||||
{ 0, 0 },
|
{ 0, 0 },
|
||||||
};
|
|
||||||
|
|
||||||
static struct aes_regwrite capture_reqs[] = {
|
|
||||||
{ 0x80, 0x00 },
|
{ 0x80, 0x00 },
|
||||||
{ 0x81, 0x00 },
|
{ 0x81, 0x00 },
|
||||||
{ 0, 0 },
|
{ 0, 0 },
|
||||||
@@ -157,6 +155,4 @@ fpi_device_aes3500_class_init (FpiDeviceAes3500Class *klass)
|
|||||||
aes_class->enlarge_factor = ENLARGE_FACTOR;
|
aes_class->enlarge_factor = ENLARGE_FACTOR;
|
||||||
aes_class->init_reqs = init_reqs;
|
aes_class->init_reqs = init_reqs;
|
||||||
aes_class->init_reqs_len = G_N_ELEMENTS (init_reqs);
|
aes_class->init_reqs_len = G_N_ELEMENTS (init_reqs);
|
||||||
aes_class->capture_reqs = capture_reqs;
|
|
||||||
aes_class->capture_reqs_len = G_N_ELEMENTS (capture_reqs);
|
|
||||||
}
|
}
|
||||||
|
|||||||
+21
-67
@@ -42,10 +42,8 @@
|
|||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
/* This is used both as a flag that we are in a capture operation
|
FpiUsbTransfer *img_trf;
|
||||||
* and for cancellation.
|
gboolean deactivating;
|
||||||
*/
|
|
||||||
GCancellable *img_capture_cancel;
|
|
||||||
} FpiDeviceAes3kPrivate;
|
} FpiDeviceAes3kPrivate;
|
||||||
|
|
||||||
#define CTRL_TIMEOUT 1000
|
#define CTRL_TIMEOUT 1000
|
||||||
@@ -86,8 +84,7 @@ img_cb (FpiUsbTransfer *transfer, FpDevice *device,
|
|||||||
FpImage *img;
|
FpImage *img;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
/* Image capture operation is finished (error/completed) */
|
priv->img_trf = NULL;
|
||||||
g_clear_object (&priv->img_capture_cancel);
|
|
||||||
|
|
||||||
if (error)
|
if (error)
|
||||||
{
|
{
|
||||||
@@ -95,14 +92,14 @@ img_cb (FpiUsbTransfer *transfer, FpDevice *device,
|
|||||||
G_IO_ERROR,
|
G_IO_ERROR,
|
||||||
G_IO_ERROR_CANCELLED))
|
G_IO_ERROR_CANCELLED))
|
||||||
{
|
{
|
||||||
/* Cancellation implies we are deactivating. */
|
/* Deactivation was completed. */
|
||||||
g_error_free (error);
|
g_error_free (error);
|
||||||
fpi_image_device_deactivate_complete (dev, NULL);
|
if (priv->deactivating)
|
||||||
|
fpi_image_device_deactivate_complete (dev, NULL);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
fpi_image_device_session_error (dev, error);
|
fpi_image_device_session_error (dev, error);
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fpi_image_device_report_finger_status (dev, TRUE);
|
fpi_image_device_report_finger_status (dev, TRUE);
|
||||||
@@ -126,69 +123,43 @@ img_cb (FpiUsbTransfer *transfer, FpDevice *device,
|
|||||||
fpi_image_device_image_captured (dev, img);
|
fpi_image_device_image_captured (dev, img);
|
||||||
|
|
||||||
/* FIXME: rather than assuming finger has gone, we should poll regs until
|
/* FIXME: rather than assuming finger has gone, we should poll regs until
|
||||||
* it really has. */
|
* it really has, then restart the capture */
|
||||||
fpi_image_device_report_finger_status (dev, FALSE);
|
fpi_image_device_report_finger_status (dev, FALSE);
|
||||||
|
|
||||||
/* Note: The transfer is re-started when we switch to the AWAIT_FINGER_ON state. */
|
do_capture (dev);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
do_capture (FpImageDevice *dev)
|
do_capture (FpImageDevice *dev)
|
||||||
{
|
{
|
||||||
g_autoptr(FpiUsbTransfer) img_trf = NULL;
|
|
||||||
FpiDeviceAes3k *self = FPI_DEVICE_AES3K (dev);
|
FpiDeviceAes3k *self = FPI_DEVICE_AES3K (dev);
|
||||||
FpiDeviceAes3kPrivate *priv = fpi_device_aes3k_get_instance_private (self);
|
FpiDeviceAes3kPrivate *priv = fpi_device_aes3k_get_instance_private (self);
|
||||||
FpiDeviceAes3kClass *cls = FPI_DEVICE_AES3K_GET_CLASS (self);
|
FpiDeviceAes3kClass *cls = FPI_DEVICE_AES3K_GET_CLASS (self);
|
||||||
|
|
||||||
img_trf = fpi_usb_transfer_new (FP_DEVICE (dev));
|
priv->img_trf = fpi_usb_transfer_new (FP_DEVICE (dev));
|
||||||
fpi_usb_transfer_fill_bulk (img_trf, EP_IN, cls->data_buflen);
|
fpi_usb_transfer_fill_bulk (priv->img_trf, EP_IN, cls->data_buflen);
|
||||||
img_trf->short_is_error = TRUE;
|
priv->img_trf->short_is_error = TRUE;
|
||||||
fpi_usb_transfer_submit (g_steal_pointer (&img_trf), 0,
|
fpi_usb_transfer_submit (priv->img_trf, 0,
|
||||||
priv->img_capture_cancel,
|
fpi_device_get_cancellable (FP_DEVICE (dev)),
|
||||||
img_cb, NULL);
|
img_cb, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
|
||||||
capture_reqs_cb (FpImageDevice *dev, GError *result, void *user_data)
|
|
||||||
{
|
|
||||||
FpiDeviceAes3k *self = FPI_DEVICE_AES3K (dev);
|
|
||||||
FpiDeviceAes3kPrivate *priv = fpi_device_aes3k_get_instance_private (self);
|
|
||||||
|
|
||||||
if (result)
|
|
||||||
{
|
|
||||||
g_clear_object (&priv->img_capture_cancel);
|
|
||||||
fpi_image_device_session_error (dev, result);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* FIXME: we never cancel a pending capture. So we are likely leaving the
|
|
||||||
* hardware in a bad state should we abort the capture operation and the
|
|
||||||
* user does not touch the device.
|
|
||||||
* But, we don't know how we might cancel, so just leave it as is. */
|
|
||||||
do_capture (dev);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
do_capture_start (FpImageDevice *dev)
|
|
||||||
{
|
|
||||||
FpiDeviceAes3k *self = FPI_DEVICE_AES3K (dev);
|
|
||||||
FpiDeviceAes3kClass *cls = FPI_DEVICE_AES3K_GET_CLASS (self);
|
|
||||||
|
|
||||||
aes_write_regv (dev, cls->capture_reqs, cls->capture_reqs_len, capture_reqs_cb, NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
init_reqs_cb (FpImageDevice *dev, GError *result, void *user_data)
|
init_reqs_cb (FpImageDevice *dev, GError *result, void *user_data)
|
||||||
{
|
{
|
||||||
fpi_image_device_activate_complete (dev, result);
|
fpi_image_device_activate_complete (dev, result);
|
||||||
|
if (!result)
|
||||||
|
do_capture (dev);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
aes3k_dev_activate (FpImageDevice *dev)
|
aes3k_dev_activate (FpImageDevice *dev)
|
||||||
{
|
{
|
||||||
FpiDeviceAes3k *self = FPI_DEVICE_AES3K (dev);
|
FpiDeviceAes3k *self = FPI_DEVICE_AES3K (dev);
|
||||||
|
FpiDeviceAes3kPrivate *priv = fpi_device_aes3k_get_instance_private (self);
|
||||||
FpiDeviceAes3kClass *cls = FPI_DEVICE_AES3K_GET_CLASS (self);
|
FpiDeviceAes3kClass *cls = FPI_DEVICE_AES3K_GET_CLASS (self);
|
||||||
|
|
||||||
|
priv->deactivating = FALSE;
|
||||||
aes_write_regv (dev, cls->init_reqs, cls->init_reqs_len, init_reqs_cb, NULL);
|
aes_write_regv (dev, cls->init_reqs, cls->init_reqs_len, init_reqs_cb, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -198,26 +169,10 @@ aes3k_dev_deactivate (FpImageDevice *dev)
|
|||||||
FpiDeviceAes3k *self = FPI_DEVICE_AES3K (dev);
|
FpiDeviceAes3k *self = FPI_DEVICE_AES3K (dev);
|
||||||
FpiDeviceAes3kPrivate *priv = fpi_device_aes3k_get_instance_private (self);
|
FpiDeviceAes3kPrivate *priv = fpi_device_aes3k_get_instance_private (self);
|
||||||
|
|
||||||
/* If a capture is running, then deactivation finishes from the cancellation handler */
|
priv->deactivating = TRUE;
|
||||||
if (priv->img_capture_cancel)
|
if (priv->img_trf)
|
||||||
g_cancellable_cancel (priv->img_capture_cancel);
|
return;
|
||||||
else
|
fpi_image_device_deactivate_complete (dev, NULL);
|
||||||
fpi_image_device_deactivate_complete (dev, NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
aes3k_dev_change_state (FpImageDevice *dev, FpiImageDeviceState state)
|
|
||||||
{
|
|
||||||
FpiDeviceAes3k *self = FPI_DEVICE_AES3K (dev);
|
|
||||||
FpiDeviceAes3kPrivate *priv = fpi_device_aes3k_get_instance_private (self);
|
|
||||||
|
|
||||||
if (state == FPI_IMAGE_DEVICE_STATE_AWAIT_FINGER_ON)
|
|
||||||
{
|
|
||||||
g_assert (!priv->img_capture_cancel);
|
|
||||||
priv->img_capture_cancel = g_cancellable_new ();
|
|
||||||
|
|
||||||
do_capture_start (dev);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@@ -262,7 +217,6 @@ fpi_device_aes3k_class_init (FpiDeviceAes3kClass *klass)
|
|||||||
img_class->img_open = aes3k_dev_init;
|
img_class->img_open = aes3k_dev_init;
|
||||||
img_class->img_close = aes3k_dev_deinit;
|
img_class->img_close = aes3k_dev_deinit;
|
||||||
img_class->activate = aes3k_dev_activate;
|
img_class->activate = aes3k_dev_activate;
|
||||||
img_class->change_state = aes3k_dev_change_state;
|
|
||||||
img_class->deactivate = aes3k_dev_deactivate;
|
img_class->deactivate = aes3k_dev_deactivate;
|
||||||
|
|
||||||
/* Extremely low due to low image quality. */
|
/* Extremely low due to low image quality. */
|
||||||
|
|||||||
@@ -57,6 +57,4 @@ struct _FpiDeviceAes3kClass
|
|||||||
gsize data_buflen; /* buffer length of usb bulk transfer */
|
gsize data_buflen; /* buffer length of usb bulk transfer */
|
||||||
struct aes_regwrite *init_reqs; /* initial values sent to device */
|
struct aes_regwrite *init_reqs; /* initial values sent to device */
|
||||||
gsize init_reqs_len;
|
gsize init_reqs_len;
|
||||||
struct aes_regwrite *capture_reqs; /* capture values sent to device */
|
|
||||||
gsize capture_reqs_len;
|
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -103,9 +103,7 @@ static struct aes_regwrite init_reqs[] = {
|
|||||||
{ 0x9e, 0x53 }, /* clear challenge word bits */
|
{ 0x9e, 0x53 }, /* clear challenge word bits */
|
||||||
{ 0x9f, 0x6b }, /* set some challenge word bits */
|
{ 0x9f, 0x6b }, /* set some challenge word bits */
|
||||||
{ 0, 0 },
|
{ 0, 0 },
|
||||||
};
|
|
||||||
|
|
||||||
static struct aes_regwrite capture_reqs[] = {
|
|
||||||
{ 0x80, 0x00 },
|
{ 0x80, 0x00 },
|
||||||
{ 0x81, 0x00 },
|
{ 0x81, 0x00 },
|
||||||
{ 0, 0 },
|
{ 0, 0 },
|
||||||
@@ -124,7 +122,7 @@ G_DEFINE_TYPE (FpiDeviceAes4000, fpi_device_aes4000, FPI_TYPE_DEVICE_AES3K);
|
|||||||
|
|
||||||
|
|
||||||
static const FpIdEntry id_table[] = {
|
static const FpIdEntry id_table[] = {
|
||||||
{ .vid = 0x08ff, .pid = 0x5501 },
|
{ .pid = 0x08ff, .vid = 0x5501 },
|
||||||
{ .vid = 0, .pid = 0, .driver_data = 0 },
|
{ .vid = 0, .pid = 0, .driver_data = 0 },
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -154,6 +152,4 @@ fpi_device_aes4000_class_init (FpiDeviceAes4000Class *klass)
|
|||||||
aes_class->enlarge_factor = ENLARGE_FACTOR;
|
aes_class->enlarge_factor = ENLARGE_FACTOR;
|
||||||
aes_class->init_reqs = init_reqs;
|
aes_class->init_reqs = init_reqs;
|
||||||
aes_class->init_reqs_len = G_N_ELEMENTS (init_reqs);
|
aes_class->init_reqs_len = G_N_ELEMENTS (init_reqs);
|
||||||
aes_class->capture_reqs = capture_reqs;
|
|
||||||
aes_class->capture_reqs_len = G_N_ELEMENTS (capture_reqs);
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,11 +19,13 @@
|
|||||||
|
|
||||||
#define FP_COMPONENT "aeslib"
|
#define FP_COMPONENT "aeslib"
|
||||||
|
|
||||||
#include "drivers_api.h"
|
#include "fp_internal.h"
|
||||||
|
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
#include "fpi-usb-transfer.h"
|
||||||
|
#include "fpi-assembling.h"
|
||||||
#include "aeslib.h"
|
#include "aeslib.h"
|
||||||
|
|
||||||
#define MAX_REGWRITES_PER_REQUEST 16
|
#define MAX_REGWRITES_PER_REQUEST 16
|
||||||
|
|||||||
@@ -17,7 +17,8 @@
|
|||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#pragma once
|
#ifndef __AESLIB_H__
|
||||||
|
#define __AESLIB_H__
|
||||||
|
|
||||||
#include <fprint.h>
|
#include <fprint.h>
|
||||||
|
|
||||||
@@ -44,3 +45,5 @@ unsigned char aes_get_pixel (struct fpi_frame_asmbl_ctx *ctx,
|
|||||||
struct fpi_frame *frame,
|
struct fpi_frame *frame,
|
||||||
unsigned int x,
|
unsigned int x,
|
||||||
unsigned int y);
|
unsigned int y);
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|||||||
+22
-24
@@ -54,7 +54,6 @@ static void complete_deactivation (FpImageDevice *dev);
|
|||||||
#define CALIBRATE_DATA_LEN 4
|
#define CALIBRATE_DATA_LEN 4
|
||||||
#define FINGER_DET_DATA_LEN 4
|
#define FINGER_DET_DATA_LEN 4
|
||||||
|
|
||||||
FP_GNUC_ACCESS (read_only, 3, 4)
|
|
||||||
static void
|
static void
|
||||||
aesX660_send_cmd_timeout (FpiSsm *ssm,
|
aesX660_send_cmd_timeout (FpiSsm *ssm,
|
||||||
FpDevice *_dev,
|
FpDevice *_dev,
|
||||||
@@ -71,7 +70,6 @@ aesX660_send_cmd_timeout (FpiSsm *ssm,
|
|||||||
fpi_usb_transfer_submit (transfer, timeout, NULL, callback, NULL);
|
fpi_usb_transfer_submit (transfer, timeout, NULL, callback, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
FP_GNUC_ACCESS (read_only, 3, 4)
|
|
||||||
static void
|
static void
|
||||||
aesX660_send_cmd (FpiSsm *ssm,
|
aesX660_send_cmd (FpiSsm *ssm,
|
||||||
FpDevice *dev,
|
FpDevice *dev,
|
||||||
@@ -91,12 +89,13 @@ aesX660_read_response (FpiSsm *ssm,
|
|||||||
FpiUsbTransferCallback callback)
|
FpiUsbTransferCallback callback)
|
||||||
{
|
{
|
||||||
FpiUsbTransfer *transfer = fpi_usb_transfer_new (_dev);
|
FpiUsbTransfer *transfer = fpi_usb_transfer_new (_dev);
|
||||||
|
unsigned char *data;
|
||||||
GCancellable *cancel = NULL;
|
GCancellable *cancel = NULL;
|
||||||
|
|
||||||
if (cancellable)
|
if (cancellable)
|
||||||
cancel = fpi_device_get_cancellable (_dev);
|
cancel = fpi_device_get_cancellable (_dev);
|
||||||
|
data = g_malloc (buf_len);
|
||||||
fpi_usb_transfer_fill_bulk (transfer, EP_IN, buf_len);
|
fpi_usb_transfer_fill_bulk_full (transfer, EP_IN, data, buf_len, NULL);
|
||||||
transfer->ssm = ssm;
|
transfer->ssm = ssm;
|
||||||
transfer->short_is_error = short_is_error;
|
transfer->short_is_error = short_is_error;
|
||||||
fpi_usb_transfer_submit (transfer, BULK_TIMEOUT, cancel, callback, NULL);
|
fpi_usb_transfer_submit (transfer, BULK_TIMEOUT, cancel, callback, NULL);
|
||||||
@@ -117,7 +116,7 @@ aesX660_read_calibrate_data_cb (FpiUsbTransfer *transfer,
|
|||||||
/* Calibrate response was read correctly? */
|
/* Calibrate response was read correctly? */
|
||||||
if (data[AESX660_RESPONSE_TYPE_OFFSET] != AESX660_CALIBRATE_RESPONSE)
|
if (data[AESX660_RESPONSE_TYPE_OFFSET] != AESX660_CALIBRATE_RESPONSE)
|
||||||
{
|
{
|
||||||
fp_dbg ("Bogus calibrate response: %.2x", data[0]);
|
fp_dbg ("Bogus calibrate response: %.2x\n", data[0]);
|
||||||
fpi_ssm_mark_failed (transfer->ssm,
|
fpi_ssm_mark_failed (transfer->ssm,
|
||||||
fpi_device_error_new_msg (FP_DEVICE_ERROR_PROTO,
|
fpi_device_error_new_msg (FP_DEVICE_ERROR_PROTO,
|
||||||
"Bogus calibrate "
|
"Bogus calibrate "
|
||||||
@@ -156,14 +155,14 @@ finger_det_read_fd_data_cb (FpiUsbTransfer *transfer,
|
|||||||
|
|
||||||
if (error)
|
if (error)
|
||||||
{
|
{
|
||||||
fp_dbg ("Failed to read FD data");
|
fp_dbg ("Failed to read FD data\n");
|
||||||
fpi_ssm_mark_failed (transfer->ssm, error);
|
fpi_ssm_mark_failed (transfer->ssm, error);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (data[AESX660_RESPONSE_TYPE_OFFSET] != AESX660_FINGER_DET_RESPONSE)
|
if (data[AESX660_RESPONSE_TYPE_OFFSET] != AESX660_FINGER_DET_RESPONSE)
|
||||||
{
|
{
|
||||||
fp_dbg ("Bogus FD response: %.2x", data[0]);
|
fp_dbg ("Bogus FD response: %.2x\n", data[0]);
|
||||||
fpi_ssm_mark_failed (transfer->ssm,
|
fpi_ssm_mark_failed (transfer->ssm,
|
||||||
fpi_device_error_new_msg (FP_DEVICE_ERROR_PROTO,
|
fpi_device_error_new_msg (FP_DEVICE_ERROR_PROTO,
|
||||||
"Bogus FD response %.2x",
|
"Bogus FD response %.2x",
|
||||||
@@ -178,7 +177,7 @@ finger_det_read_fd_data_cb (FpiUsbTransfer *transfer,
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
fp_dbg ("Wait for finger returned %.2x as result",
|
fp_dbg ("Wait for finger returned %.2x as result\n",
|
||||||
data[AESX660_FINGER_PRESENT_OFFSET]);
|
data[AESX660_FINGER_PRESENT_OFFSET]);
|
||||||
fpi_ssm_jump_to_state (transfer->ssm, FINGER_DET_SEND_FD_CMD);
|
fpi_ssm_jump_to_state (transfer->ssm, FINGER_DET_SEND_FD_CMD);
|
||||||
}
|
}
|
||||||
@@ -332,7 +331,6 @@ capture_set_idle_cmd_cb (FpiUsbTransfer *transfer, FpDevice *device,
|
|||||||
|
|
||||||
priv->strips = g_slist_reverse (priv->strips);
|
priv->strips = g_slist_reverse (priv->strips);
|
||||||
img = fpi_assemble_frames (cls->assembling_ctx, priv->strips);
|
img = fpi_assemble_frames (cls->assembling_ctx, priv->strips);
|
||||||
img->flags |= FPI_IMAGE_PARTIAL;
|
|
||||||
g_slist_foreach (priv->strips, (GFunc) g_free, NULL);
|
g_slist_foreach (priv->strips, (GFunc) g_free, NULL);
|
||||||
g_slist_free (priv->strips);
|
g_slist_free (priv->strips);
|
||||||
priv->strips = NULL;
|
priv->strips = NULL;
|
||||||
@@ -365,7 +363,7 @@ capture_read_stripe_data_cb (FpiUsbTransfer *transfer,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
fp_dbg ("Got %" G_GSIZE_FORMAT " bytes of data", actual_length);
|
fp_dbg ("Got %lu bytes of data", actual_length);
|
||||||
while (actual_length)
|
while (actual_length)
|
||||||
{
|
{
|
||||||
gssize payload_length;
|
gssize payload_length;
|
||||||
@@ -386,7 +384,7 @@ capture_read_stripe_data_cb (FpiUsbTransfer *transfer,
|
|||||||
(priv->stripe_packet->data[AESX660_RESPONSE_SIZE_MSB_OFFSET] << 8);
|
(priv->stripe_packet->data[AESX660_RESPONSE_SIZE_MSB_OFFSET] << 8);
|
||||||
fp_dbg ("Got frame, type %.2x payload of size %.4lx",
|
fp_dbg ("Got frame, type %.2x payload of size %.4lx",
|
||||||
priv->stripe_packet->data[AESX660_RESPONSE_TYPE_OFFSET],
|
priv->stripe_packet->data[AESX660_RESPONSE_TYPE_OFFSET],
|
||||||
(long) payload_length);
|
payload_length);
|
||||||
|
|
||||||
still_needed_len = MAX (0, AESX660_HEADER_SIZE + payload_length - (gssize) priv->stripe_packet->len);
|
still_needed_len = MAX (0, AESX660_HEADER_SIZE + payload_length - (gssize) priv->stripe_packet->len);
|
||||||
copy_len = MIN (actual_length, still_needed_len);
|
copy_len = MIN (actual_length, still_needed_len);
|
||||||
@@ -406,7 +404,7 @@ capture_read_stripe_data_cb (FpiUsbTransfer *transfer,
|
|||||||
g_byte_array_set_size (priv->stripe_packet, 0);
|
g_byte_array_set_size (priv->stripe_packet, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
fp_dbg ("finger %s", finger_missing ? "missing" : "present");
|
fp_dbg ("finger %s\n", finger_missing ? "missing" : "present");
|
||||||
|
|
||||||
if (finger_missing)
|
if (finger_missing)
|
||||||
fpi_ssm_next_state (transfer->ssm);
|
fpi_ssm_next_state (transfer->ssm);
|
||||||
@@ -441,7 +439,7 @@ capture_run_state (FpiSsm *ssm, FpDevice *_dev)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case CAPTURE_SET_IDLE:
|
case CAPTURE_SET_IDLE:
|
||||||
fp_dbg ("Got %" G_GSIZE_FORMAT " frames", priv->strips_len);
|
fp_dbg ("Got %lu frames\n", priv->strips_len);
|
||||||
aesX660_send_cmd (ssm, _dev, set_idle_cmd, sizeof (set_idle_cmd),
|
aesX660_send_cmd (ssm, _dev, set_idle_cmd, sizeof (set_idle_cmd),
|
||||||
capture_set_idle_cmd_cb);
|
capture_set_idle_cmd_cb);
|
||||||
break;
|
break;
|
||||||
@@ -514,19 +512,19 @@ activate_read_id_cb (FpiUsbTransfer *transfer, FpDevice *device,
|
|||||||
|
|
||||||
if (error)
|
if (error)
|
||||||
{
|
{
|
||||||
fp_dbg ("read_id cmd failed");
|
fp_dbg ("read_id cmd failed\n");
|
||||||
fpi_ssm_mark_failed (transfer->ssm, error);
|
fpi_ssm_mark_failed (transfer->ssm, error);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
/* ID was read correctly */
|
/* ID was read correctly */
|
||||||
if (data[0] == 0x07)
|
if (data[0] == 0x07)
|
||||||
{
|
{
|
||||||
fp_dbg ("Sensor device id: %.2x%2x, bcdDevice: %.2x.%.2x, init status: %.2x",
|
fp_dbg ("Sensor device id: %.2x%2x, bcdDevice: %.2x.%.2x, init status: %.2x\n",
|
||||||
data[4], data[3], data[5], data[6], data[7]);
|
data[4], data[3], data[5], data[6], data[7]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
fp_dbg ("Bogus read ID response: %.2x", data[AESX660_RESPONSE_TYPE_OFFSET]);
|
fp_dbg ("Bogus read ID response: %.2x\n", data[AESX660_RESPONSE_TYPE_OFFSET]);
|
||||||
fpi_ssm_mark_failed (transfer->ssm,
|
fpi_ssm_mark_failed (transfer->ssm,
|
||||||
fpi_device_error_new_msg (FP_DEVICE_ERROR_PROTO,
|
fpi_device_error_new_msg (FP_DEVICE_ERROR_PROTO,
|
||||||
"Bogus read ID response %.2x",
|
"Bogus read ID response %.2x",
|
||||||
@@ -554,7 +552,7 @@ activate_read_id_cb (FpiUsbTransfer *transfer, FpDevice *device,
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
fp_dbg ("Failed to init device! init status: %.2x", data[7]);
|
fp_dbg ("Failed to init device! init status: %.2x\n", data[7]);
|
||||||
fpi_ssm_mark_failed (transfer->ssm,
|
fpi_ssm_mark_failed (transfer->ssm,
|
||||||
fpi_device_error_new_msg (FP_DEVICE_ERROR_PROTO,
|
fpi_device_error_new_msg (FP_DEVICE_ERROR_PROTO,
|
||||||
"Failed to init device %.2x",
|
"Failed to init device %.2x",
|
||||||
@@ -571,11 +569,11 @@ activate_read_init_cb (FpiUsbTransfer *transfer, FpDevice *device,
|
|||||||
FpiDeviceAesX660Private *priv = fpi_device_aes_x660_get_instance_private (self);
|
FpiDeviceAesX660Private *priv = fpi_device_aes_x660_get_instance_private (self);
|
||||||
unsigned char *data = transfer->buffer;
|
unsigned char *data = transfer->buffer;
|
||||||
|
|
||||||
fp_dbg ("read_init_cb");
|
fp_dbg ("read_init_cb\n");
|
||||||
|
|
||||||
if (error)
|
if (error)
|
||||||
{
|
{
|
||||||
fp_dbg ("read_init transfer status: %s, actual_len: %d", error->message,
|
fp_dbg ("read_init transfer status: %s, actual_len: %d\n", error->message,
|
||||||
(gint) transfer->actual_length);
|
(gint) transfer->actual_length);
|
||||||
fpi_ssm_mark_failed (transfer->ssm, error);
|
fpi_ssm_mark_failed (transfer->ssm, error);
|
||||||
return;
|
return;
|
||||||
@@ -583,7 +581,7 @@ activate_read_init_cb (FpiUsbTransfer *transfer, FpDevice *device,
|
|||||||
/* ID was read correctly */
|
/* ID was read correctly */
|
||||||
if (data[0] != 0x42 || data[3] != 0x01)
|
if (data[0] != 0x42 || data[3] != 0x01)
|
||||||
{
|
{
|
||||||
fp_dbg ("Bogus read init response: %.2x %.2x", data[0],
|
fp_dbg ("Bogus read init response: %.2x %.2x\n", data[0],
|
||||||
data[3]);
|
data[3]);
|
||||||
fpi_ssm_mark_failed (transfer->ssm,
|
fpi_ssm_mark_failed (transfer->ssm,
|
||||||
fpi_device_error_new_msg (FP_DEVICE_ERROR_PROTO,
|
fpi_device_error_new_msg (FP_DEVICE_ERROR_PROTO,
|
||||||
@@ -615,13 +613,13 @@ activate_run_state (FpiSsm *ssm, FpDevice *_dev)
|
|||||||
{
|
{
|
||||||
case ACTIVATE_SET_IDLE:
|
case ACTIVATE_SET_IDLE:
|
||||||
priv->init_seq_idx = 0;
|
priv->init_seq_idx = 0;
|
||||||
fp_dbg ("Activate: set idle");
|
fp_dbg ("Activate: set idle\n");
|
||||||
aesX660_send_cmd (ssm, _dev, set_idle_cmd, sizeof (set_idle_cmd),
|
aesX660_send_cmd (ssm, _dev, set_idle_cmd, sizeof (set_idle_cmd),
|
||||||
fpi_ssm_usb_transfer_cb);
|
fpi_ssm_usb_transfer_cb);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ACTIVATE_SEND_READ_ID_CMD:
|
case ACTIVATE_SEND_READ_ID_CMD:
|
||||||
fp_dbg ("Activate: read ID");
|
fp_dbg ("Activate: read ID\n");
|
||||||
aesX660_send_cmd (ssm, _dev, read_id_cmd, sizeof (read_id_cmd),
|
aesX660_send_cmd (ssm, _dev, read_id_cmd, sizeof (read_id_cmd),
|
||||||
fpi_ssm_usb_transfer_cb);
|
fpi_ssm_usb_transfer_cb);
|
||||||
break;
|
break;
|
||||||
@@ -631,7 +629,7 @@ activate_run_state (FpiSsm *ssm, FpDevice *_dev)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case ACTIVATE_SEND_INIT_CMD:
|
case ACTIVATE_SEND_INIT_CMD:
|
||||||
fp_dbg ("Activate: send init seq #%d cmd #%d",
|
fp_dbg ("Activate: send init seq #%d cmd #%d\n",
|
||||||
priv->init_seq_idx,
|
priv->init_seq_idx,
|
||||||
priv->init_cmd_idx);
|
priv->init_cmd_idx);
|
||||||
aesX660_send_cmd (ssm, _dev,
|
aesX660_send_cmd (ssm, _dev,
|
||||||
@@ -641,7 +639,7 @@ activate_run_state (FpiSsm *ssm, FpDevice *_dev)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case ACTIVATE_READ_INIT_RESPONSE:
|
case ACTIVATE_READ_INIT_RESPONSE:
|
||||||
fp_dbg ("Activate: read init response");
|
fp_dbg ("Activate: read init response\n");
|
||||||
aesX660_read_response (ssm, _dev, TRUE, FALSE, INIT_LEN, activate_read_init_cb);
|
aesX660_read_response (ssm, _dev, TRUE, FALSE, INIT_LEN, activate_read_init_cb);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|||||||
@@ -1,444 +0,0 @@
|
|||||||
/*
|
|
||||||
* 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 */
|
|
||||||
}
|
|
||||||
@@ -1,177 +0,0 @@
|
|||||||
/*
|
|
||||||
* 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
@@ -1,222 +0,0 @@
|
|||||||
/*
|
|
||||||
* 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;
|
|
||||||
+135
-60
@@ -73,19 +73,22 @@ struct _FpiDeviceElan
|
|||||||
/* end commands */
|
/* end commands */
|
||||||
|
|
||||||
/* state */
|
/* state */
|
||||||
gboolean active;
|
gboolean deactivating;
|
||||||
gboolean deactivating;
|
FpImageDeviceState dev_state;
|
||||||
unsigned char *last_read;
|
FpImageDeviceState dev_state_next;
|
||||||
unsigned char calib_atts_left;
|
unsigned char *last_read;
|
||||||
unsigned char calib_status;
|
unsigned char calib_atts_left;
|
||||||
unsigned short *background;
|
unsigned char calib_status;
|
||||||
unsigned char frame_width;
|
unsigned short *background;
|
||||||
unsigned char frame_height;
|
unsigned char frame_width;
|
||||||
unsigned char raw_frame_height;
|
unsigned char frame_height;
|
||||||
int num_frames;
|
unsigned char raw_frame_height;
|
||||||
GSList *frames;
|
int num_frames;
|
||||||
|
GSList *frames;
|
||||||
/* end state */
|
/* end state */
|
||||||
};
|
};
|
||||||
|
G_DECLARE_FINAL_TYPE (FpiDeviceElan, fpi_device_elan, FPI, DEVICE_ELAN,
|
||||||
|
FpImageDevice);
|
||||||
G_DEFINE_TYPE (FpiDeviceElan, fpi_device_elan, FP_TYPE_IMAGE_DEVICE);
|
G_DEFINE_TYPE (FpiDeviceElan, fpi_device_elan, FP_TYPE_IMAGE_DEVICE);
|
||||||
|
|
||||||
static int
|
static int
|
||||||
@@ -204,7 +207,6 @@ elan_save_img_frame (FpiDeviceElan *elandev)
|
|||||||
|
|
||||||
unsigned int frame_size = elandev->frame_width * elandev->frame_height;
|
unsigned int frame_size = elandev->frame_width * elandev->frame_height;
|
||||||
unsigned short *frame = g_malloc (frame_size * sizeof (short));
|
unsigned short *frame = g_malloc (frame_size * sizeof (short));
|
||||||
|
|
||||||
elan_save_frame (elandev, frame);
|
elan_save_frame (elandev, frame);
|
||||||
unsigned int sum = 0;
|
unsigned int sum = 0;
|
||||||
|
|
||||||
@@ -242,7 +244,6 @@ elan_process_frame_linear (unsigned short *raw_frame,
|
|||||||
G_DEBUG_HERE ();
|
G_DEBUG_HERE ();
|
||||||
|
|
||||||
unsigned short min = 0xffff, max = 0;
|
unsigned short min = 0xffff, max = 0;
|
||||||
|
|
||||||
for (int i = 0; i < frame_size; i++)
|
for (int i = 0; i < frame_size; i++)
|
||||||
{
|
{
|
||||||
if (raw_frame[i] < min)
|
if (raw_frame[i] < min)
|
||||||
@@ -254,7 +255,6 @@ elan_process_frame_linear (unsigned short *raw_frame,
|
|||||||
g_assert (max != min);
|
g_assert (max != min);
|
||||||
|
|
||||||
unsigned short px;
|
unsigned short px;
|
||||||
|
|
||||||
for (int i = 0; i < frame_size; i++)
|
for (int i = 0; i < frame_size; i++)
|
||||||
{
|
{
|
||||||
px = raw_frame[i];
|
px = raw_frame[i];
|
||||||
@@ -278,7 +278,6 @@ elan_process_frame_thirds (unsigned short *raw_frame,
|
|||||||
|
|
||||||
unsigned short lvl0, lvl1, lvl2, lvl3;
|
unsigned short lvl0, lvl1, lvl2, lvl3;
|
||||||
unsigned short *sorted = g_malloc (frame_size * sizeof (short));
|
unsigned short *sorted = g_malloc (frame_size * sizeof (short));
|
||||||
|
|
||||||
memcpy (sorted, raw_frame, frame_size * sizeof (short));
|
memcpy (sorted, raw_frame, frame_size * sizeof (short));
|
||||||
qsort (sorted, frame_size, sizeof (short), cmp_short);
|
qsort (sorted, frame_size, sizeof (short), cmp_short);
|
||||||
lvl0 = sorted[0];
|
lvl0 = sorted[0];
|
||||||
@@ -288,7 +287,6 @@ elan_process_frame_thirds (unsigned short *raw_frame,
|
|||||||
g_free (sorted);
|
g_free (sorted);
|
||||||
|
|
||||||
unsigned short px;
|
unsigned short px;
|
||||||
|
|
||||||
for (int i = 0; i < frame_size; i++)
|
for (int i = 0; i < frame_size; i++)
|
||||||
{
|
{
|
||||||
px = raw_frame[i];
|
px = raw_frame[i];
|
||||||
@@ -322,7 +320,6 @@ elan_submit_image (FpImageDevice *dev)
|
|||||||
g_slist_foreach (raw_frames, (GFunc) self->process_frame, &frames);
|
g_slist_foreach (raw_frames, (GFunc) self->process_frame, &frames);
|
||||||
fpi_do_movement_estimation (&assembling_ctx, frames);
|
fpi_do_movement_estimation (&assembling_ctx, frames);
|
||||||
img = fpi_assemble_frames (&assembling_ctx, frames);
|
img = fpi_assemble_frames (&assembling_ctx, frames);
|
||||||
img->flags |= FPI_IMAGE_PARTIAL;
|
|
||||||
|
|
||||||
g_slist_free_full (frames, g_free);
|
g_slist_free_full (frames, g_free);
|
||||||
|
|
||||||
@@ -357,7 +354,7 @@ elan_cmd_cb (FpiUsbTransfer *transfer, FpDevice *dev,
|
|||||||
if (transfer->endpoint & FPI_USB_ENDPOINT_IN)
|
if (transfer->endpoint & FPI_USB_ENDPOINT_IN)
|
||||||
{
|
{
|
||||||
/* just finished receiving */
|
/* just finished receiving */
|
||||||
self->last_read = g_memdup2 (transfer->buffer, transfer->actual_length);
|
self->last_read = g_memdup (transfer->buffer, transfer->actual_length);
|
||||||
elan_cmd_done (ssm);
|
elan_cmd_done (ssm);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -484,7 +481,7 @@ stop_capture_complete (FpiSsm *ssm, FpDevice *_dev, GError *error)
|
|||||||
|
|
||||||
|
|
||||||
/* The device is inactive at this point. */
|
/* The device is inactive at this point. */
|
||||||
self->active = FALSE;
|
self->dev_state = FP_IMAGE_DEVICE_STATE_INACTIVE;
|
||||||
|
|
||||||
if (self->deactivating)
|
if (self->deactivating)
|
||||||
{
|
{
|
||||||
@@ -502,15 +499,16 @@ stop_capture_complete (FpiSsm *ssm, FpDevice *_dev, GError *error)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
elan_stop_capture (FpiDeviceElan *self)
|
elan_stop_capture (FpDevice *dev)
|
||||||
{
|
{
|
||||||
|
FpiDeviceElan *self = FPI_DEVICE_ELAN (dev);
|
||||||
|
|
||||||
G_DEBUG_HERE ();
|
G_DEBUG_HERE ();
|
||||||
|
|
||||||
elan_dev_reset_state (self);
|
elan_dev_reset_state (self);
|
||||||
|
|
||||||
FpiSsm *ssm =
|
FpiSsm *ssm =
|
||||||
fpi_ssm_new (FP_DEVICE (self), stop_capture_run_state, STOP_CAPTURE_NUM_STATES);
|
fpi_ssm_new (dev, stop_capture_run_state, STOP_CAPTURE_NUM_STATES);
|
||||||
|
|
||||||
fpi_ssm_start (ssm, stop_capture_complete);
|
fpi_ssm_start (ssm, stop_capture_complete);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -540,6 +538,8 @@ capture_run_state (FpiSsm *ssm, FpDevice *dev)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case CAPTURE_READ_DATA:
|
case CAPTURE_READ_DATA:
|
||||||
|
self->dev_state = FP_IMAGE_DEVICE_STATE_CAPTURE;
|
||||||
|
|
||||||
/* 0x55 - finger present
|
/* 0x55 - finger present
|
||||||
* 0xff - device not calibrated (probably) */
|
* 0xff - device not calibrated (probably) */
|
||||||
if (self->last_read && self->last_read[0] == 0x55)
|
if (self->last_read && self->last_read[0] == 0x55)
|
||||||
@@ -549,11 +549,7 @@ capture_run_state (FpiSsm *ssm, FpDevice *dev)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* XXX: The timeout is emulated incorrectly, resulting in a zero byte read. */
|
fpi_ssm_mark_failed (ssm, fpi_device_error_new (FP_DEVICE_ERROR_PROTO));
|
||||||
if (g_strcmp0 (g_getenv ("FP_DEVICE_EMULATION"), "1") == 0)
|
|
||||||
fpi_ssm_mark_completed (ssm);
|
|
||||||
else
|
|
||||||
fpi_ssm_mark_failed (ssm, fpi_device_error_new (FP_DEVICE_ERROR_PROTO));
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -585,6 +581,8 @@ capture_complete (FpiSsm *ssm, FpDevice *_dev, GError *error)
|
|||||||
|
|
||||||
G_DEBUG_HERE ();
|
G_DEBUG_HERE ();
|
||||||
|
|
||||||
|
/* XXX: cancellation was specially handled by doing nothing! */
|
||||||
|
|
||||||
/* either max frames captured or timed out waiting for the next frame */
|
/* either max frames captured or timed out waiting for the next frame */
|
||||||
if (!error ||
|
if (!error ||
|
||||||
(g_error_matches (error, G_USB_DEVICE_ERROR, G_USB_DEVICE_ERROR_TIMED_OUT) &&
|
(g_error_matches (error, G_USB_DEVICE_ERROR, G_USB_DEVICE_ERROR_TIMED_OUT) &&
|
||||||
@@ -607,22 +605,18 @@ capture_complete (FpiSsm *ssm, FpDevice *_dev, GError *error)
|
|||||||
fpi_image_device_session_error (dev, error);
|
fpi_image_device_session_error (dev, error);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Note: We always stop capturing even if that may not be needed always.
|
|
||||||
* Doing this between captures appears to make it at least less likely for
|
|
||||||
* devices to end up in a bad state.
|
|
||||||
*/
|
|
||||||
elan_stop_capture (self);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
elan_capture (FpiDeviceElan *self)
|
elan_capture (FpDevice *dev)
|
||||||
{
|
{
|
||||||
|
FpiDeviceElan *self = FPI_DEVICE_ELAN (dev);
|
||||||
|
|
||||||
G_DEBUG_HERE ();
|
G_DEBUG_HERE ();
|
||||||
|
|
||||||
elan_dev_reset_state (self);
|
elan_dev_reset_state (self);
|
||||||
FpiSsm *ssm =
|
FpiSsm *ssm =
|
||||||
fpi_ssm_new (FP_DEVICE (self), capture_run_state, CAPTURE_NUM_STATES);
|
fpi_ssm_new (dev, capture_run_state, CAPTURE_NUM_STATES);
|
||||||
|
|
||||||
fpi_ssm_start (ssm, capture_complete);
|
fpi_ssm_start (ssm, capture_complete);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -737,7 +731,7 @@ calibrate_run_state (FpiSsm *ssm, FpDevice *dev)
|
|||||||
fp_dbg ("calibration failed");
|
fp_dbg ("calibration failed");
|
||||||
fpi_ssm_mark_failed (ssm,
|
fpi_ssm_mark_failed (ssm,
|
||||||
fpi_device_error_new_msg (FP_DEVICE_ERROR_GENERAL,
|
fpi_device_error_new_msg (FP_DEVICE_ERROR_GENERAL,
|
||||||
"Calibration failed!"));
|
"Callibration failed!"));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -760,7 +754,7 @@ calibrate_run_state (FpiSsm *ssm, FpDevice *dev)
|
|||||||
if (self->calib_status == 0x00 &&
|
if (self->calib_status == 0x00 &&
|
||||||
self->last_read[0] == 0x01)
|
self->last_read[0] == 0x01)
|
||||||
self->calib_status = 0x01;
|
self->calib_status = 0x01;
|
||||||
fpi_ssm_next_state_delayed (ssm, 50);
|
fpi_ssm_next_state_delayed (ssm, 50, NULL);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -773,33 +767,34 @@ calibrate_run_state (FpiSsm *ssm, FpDevice *dev)
|
|||||||
static void
|
static void
|
||||||
calibrate_complete (FpiSsm *ssm, FpDevice *dev, GError *error)
|
calibrate_complete (FpiSsm *ssm, FpDevice *dev, GError *error)
|
||||||
{
|
{
|
||||||
|
FpiDeviceElan *self = FPI_DEVICE_ELAN (dev);
|
||||||
|
|
||||||
G_DEBUG_HERE ();
|
G_DEBUG_HERE ();
|
||||||
|
|
||||||
if (error)
|
if (error)
|
||||||
{
|
{
|
||||||
|
self->dev_state = FP_IMAGE_DEVICE_STATE_INACTIVE;
|
||||||
fpi_image_device_session_error (FP_IMAGE_DEVICE (dev), error);
|
fpi_image_device_session_error (FP_IMAGE_DEVICE (dev), error);
|
||||||
elan_stop_capture (FPI_DEVICE_ELAN (dev));
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
elan_capture (FPI_DEVICE_ELAN (dev));
|
elan_capture (dev);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
elan_calibrate (FpiDeviceElan *self)
|
elan_calibrate (FpDevice *dev)
|
||||||
{
|
{
|
||||||
|
FpiDeviceElan *self = FPI_DEVICE_ELAN (dev);
|
||||||
|
|
||||||
G_DEBUG_HERE ();
|
G_DEBUG_HERE ();
|
||||||
|
|
||||||
elan_dev_reset_state (self);
|
elan_dev_reset_state (self);
|
||||||
|
|
||||||
g_return_if_fail (!self->active);
|
|
||||||
self->active = TRUE;
|
|
||||||
self->calib_atts_left = ELAN_CALIBRATION_ATTEMPTS;
|
self->calib_atts_left = ELAN_CALIBRATION_ATTEMPTS;
|
||||||
|
|
||||||
FpiSsm *ssm = fpi_ssm_new (FP_DEVICE (self), calibrate_run_state,
|
FpiSsm *ssm = fpi_ssm_new (FP_DEVICE (dev), calibrate_run_state,
|
||||||
CALIBRATE_NUM_STATES);
|
CALIBRATE_NUM_STATES);
|
||||||
|
|
||||||
fpi_ssm_start (ssm, calibrate_complete);
|
fpi_ssm_start (ssm, calibrate_complete);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -895,7 +890,6 @@ elan_activate (FpImageDevice *dev)
|
|||||||
FpiSsm *ssm =
|
FpiSsm *ssm =
|
||||||
fpi_ssm_new (FP_DEVICE (dev), activate_run_state,
|
fpi_ssm_new (FP_DEVICE (dev), activate_run_state,
|
||||||
ACTIVATE_NUM_STATES);
|
ACTIVATE_NUM_STATES);
|
||||||
|
|
||||||
fpi_ssm_start (ssm, activate_complete);
|
fpi_ssm_start (ssm, activate_complete);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -953,18 +947,94 @@ dev_activate (FpImageDevice *dev)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
dev_change_state (FpImageDevice *dev, FpiImageDeviceState state)
|
elan_change_state (FpImageDevice *idev)
|
||||||
|
{
|
||||||
|
FpDevice *dev = FP_DEVICE (idev);
|
||||||
|
FpiDeviceElan *self = FPI_DEVICE_ELAN (dev);
|
||||||
|
FpImageDeviceState next_state = self->dev_state_next;
|
||||||
|
|
||||||
|
if (self->dev_state == next_state)
|
||||||
|
{
|
||||||
|
fp_dbg ("already in %d", next_state);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
fp_dbg ("changing to %d", next_state);
|
||||||
|
}
|
||||||
|
|
||||||
|
switch (next_state)
|
||||||
|
{
|
||||||
|
case FP_IMAGE_DEVICE_STATE_AWAIT_FINGER_ON:
|
||||||
|
/* activation completed or another enroll stage started */
|
||||||
|
self->dev_state = FP_IMAGE_DEVICE_STATE_AWAIT_FINGER_ON;
|
||||||
|
elan_calibrate (dev);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case FP_IMAGE_DEVICE_STATE_CAPTURE:
|
||||||
|
/* not used */
|
||||||
|
break;
|
||||||
|
|
||||||
|
case FP_IMAGE_DEVICE_STATE_INACTIVE:
|
||||||
|
case FP_IMAGE_DEVICE_STATE_AWAIT_FINGER_OFF:
|
||||||
|
elan_stop_capture (dev);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
elan_change_state_async (FpDevice *dev,
|
||||||
|
void *data)
|
||||||
|
{
|
||||||
|
g_message ("state change dev: %p", dev);
|
||||||
|
elan_change_state (FP_IMAGE_DEVICE (dev));
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
dev_change_state (FpImageDevice *dev, FpImageDeviceState state)
|
||||||
{
|
{
|
||||||
FpiDeviceElan *self = FPI_DEVICE_ELAN (dev);
|
FpiDeviceElan *self = FPI_DEVICE_ELAN (dev);
|
||||||
|
GSource *timeout;
|
||||||
|
|
||||||
G_DEBUG_HERE ();
|
G_DEBUG_HERE ();
|
||||||
|
|
||||||
/* Note: We always calibrate even if that may not be needed always.
|
/* Inactive and await finger off are equivalent for the elan driver. */
|
||||||
* Doing this for each capture appears to make it at least less likely for
|
if (state == FP_IMAGE_DEVICE_STATE_AWAIT_FINGER_OFF)
|
||||||
* devices to end up in a bad state.
|
state = FP_IMAGE_DEVICE_STATE_INACTIVE;
|
||||||
*/
|
|
||||||
if (state == FPI_IMAGE_DEVICE_STATE_AWAIT_FINGER_ON)
|
if (self->dev_state_next == state)
|
||||||
elan_calibrate (self);
|
fp_dbg ("change to state %d already queued", state);
|
||||||
|
|
||||||
|
switch (state)
|
||||||
|
{
|
||||||
|
case FP_IMAGE_DEVICE_STATE_INACTIVE:
|
||||||
|
case FP_IMAGE_DEVICE_STATE_AWAIT_FINGER_ON:
|
||||||
|
case FP_IMAGE_DEVICE_STATE_AWAIT_FINGER_OFF: {
|
||||||
|
char *name;
|
||||||
|
|
||||||
|
/* schedule state change instead of calling it directly to allow all actions
|
||||||
|
* related to the previous state to complete */
|
||||||
|
self->dev_state_next = state;
|
||||||
|
timeout = fpi_device_add_timeout (FP_DEVICE (dev), 10,
|
||||||
|
elan_change_state_async,
|
||||||
|
NULL, NULL);
|
||||||
|
|
||||||
|
name = g_strdup_printf ("dev_change_state to %d", state);
|
||||||
|
g_source_set_name (timeout, name);
|
||||||
|
g_free (name);
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
case FP_IMAGE_DEVICE_STATE_CAPTURE:
|
||||||
|
/* TODO MAYBE: split capture ssm into smaller ssms and use this state */
|
||||||
|
self->dev_state = state;
|
||||||
|
self->dev_state_next = state;
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
g_assert_not_reached ();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@@ -974,14 +1044,19 @@ dev_deactivate (FpImageDevice *dev)
|
|||||||
|
|
||||||
G_DEBUG_HERE ();
|
G_DEBUG_HERE ();
|
||||||
|
|
||||||
if (!self->active)
|
if (self->dev_state == FP_IMAGE_DEVICE_STATE_INACTIVE)
|
||||||
/* The device is inactive already, complete the operation immediately. */
|
{
|
||||||
fpi_image_device_deactivate_complete (dev, NULL);
|
/* The device is inactive already, complete the operation immediately. */
|
||||||
|
fpi_image_device_deactivate_complete (dev, NULL);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
/* The device is not yet inactive, flag that we are deactivating (and
|
{
|
||||||
* need to signal back deactivation).
|
/* The device is not yet inactive, flag that we are deactivating (and
|
||||||
* Note that any running capture will be cancelled already if needed. */
|
* need to signal back deactivation) and then ensure we will change
|
||||||
self->deactivating = TRUE;
|
* to the inactive state eventually. */
|
||||||
|
self->deactivating = TRUE;
|
||||||
|
dev_change_state (dev, FP_IMAGE_DEVICE_STATE_INACTIVE);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|||||||
@@ -18,7 +18,8 @@
|
|||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#pragma once
|
#ifndef __ELAN_H
|
||||||
|
#define __ELAN_H
|
||||||
|
|
||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
|
|
||||||
@@ -70,9 +71,6 @@
|
|||||||
#define ELAN_CMD_TIMEOUT 10000
|
#define ELAN_CMD_TIMEOUT 10000
|
||||||
#define ELAN_FINGER_TIMEOUT 200
|
#define ELAN_FINGER_TIMEOUT 200
|
||||||
|
|
||||||
G_DECLARE_FINAL_TYPE (FpiDeviceElan, fpi_device_elan, FPI, DEVICE_ELAN,
|
|
||||||
FpImageDevice);
|
|
||||||
|
|
||||||
struct elan_cmd
|
struct elan_cmd
|
||||||
{
|
{
|
||||||
unsigned char cmd[ELAN_CMD_LEN];
|
unsigned char cmd[ELAN_CMD_LEN];
|
||||||
@@ -213,14 +211,7 @@ static const FpIdEntry elan_id_table[] = {
|
|||||||
{.vid = ELAN_VEND_ID, .pid = 0x0c31, .driver_data = ELAN_ALL_DEV},
|
{.vid = ELAN_VEND_ID, .pid = 0x0c31, .driver_data = ELAN_ALL_DEV},
|
||||||
{.vid = ELAN_VEND_ID, .pid = 0x0c32, .driver_data = ELAN_ALL_DEV},
|
{.vid = ELAN_VEND_ID, .pid = 0x0c32, .driver_data = ELAN_ALL_DEV},
|
||||||
{.vid = ELAN_VEND_ID, .pid = 0x0c33, .driver_data = ELAN_ALL_DEV},
|
{.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 = 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},
|
{.vid = 0, .pid = 0, .driver_data = 0},
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -228,8 +219,10 @@ static void elan_cmd_done (FpiSsm *ssm);
|
|||||||
static void elan_cmd_read (FpiSsm *ssm,
|
static void elan_cmd_read (FpiSsm *ssm,
|
||||||
FpDevice *dev);
|
FpDevice *dev);
|
||||||
|
|
||||||
static void elan_calibrate (FpiDeviceElan *self);
|
static void elan_calibrate (FpDevice *dev);
|
||||||
static void elan_capture (FpiDeviceElan *self);
|
static void elan_capture (FpDevice *dev);
|
||||||
|
|
||||||
static void dev_change_state (FpImageDevice *dev,
|
static void dev_change_state (FpImageDevice *dev,
|
||||||
FpiImageDeviceState state);
|
FpImageDeviceState state);
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -1,196 +0,0 @@
|
|||||||
/*
|
|
||||||
* 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;
|
|
||||||
};
|
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -1,382 +0,0 @@
|
|||||||
/*
|
|
||||||
* Elan SPI driver for libfprint
|
|
||||||
*
|
|
||||||
* Copyright (C) 2021 Matthew Mirvish <matthew@mm12.xyz>
|
|
||||||
*
|
|
||||||
* 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 <config.h>
|
|
||||||
|
|
||||||
#ifndef HAVE_UDEV
|
|
||||||
#error "elanspi requires udev"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <fp-device.h>
|
|
||||||
#include <fpi-device.h>
|
|
||||||
|
|
||||||
#define ELANSPI_TP_PID 0x04f3
|
|
||||||
|
|
||||||
/* Sensor ID information copied from the windows driver */
|
|
||||||
|
|
||||||
struct elanspi_sensor_entry
|
|
||||||
{
|
|
||||||
unsigned char sensor_id, height, width, ic_version;
|
|
||||||
gboolean is_otp_model;
|
|
||||||
const gchar * name;
|
|
||||||
};
|
|
||||||
|
|
||||||
static const struct elanspi_sensor_entry elanspi_sensor_table[] = {
|
|
||||||
{0x0, 0x78, 0x78, 0x0, 0x0, "eFSA120S"},
|
|
||||||
{0x1, 0x78, 0x78, 0x1, 0x1, "eFSA120SA"},
|
|
||||||
{0x2, 0xA0, 0xA0, 0x0, 0x0, "eFSA160S"},
|
|
||||||
{0x3, 0xd0, 0x50, 0x0, 0x0, "eFSA820R"},
|
|
||||||
{0x4, 0xC0, 0x38, 0x0, 0x0, "eFSA519R"},
|
|
||||||
{0x5, 0x60, 0x60, 0x0, 0x0, "eFSA96S"},
|
|
||||||
{0x6, 0x60, 0x60, 0x1, 0x1, "eFSA96SA"},
|
|
||||||
{0x7, 0x60, 0x60, 0x2, 0x1, "eFSA96SB"},
|
|
||||||
{0x8, 0xa0, 0x50, 0x1, 0x1, "eFSA816RA"},
|
|
||||||
{0x9, 0x90, 0x40, 0x1, 0x1, "eFSA614RA"},
|
|
||||||
{0xA, 0x90, 0x40, 0x2, 0x1, "eFSA614RB"},
|
|
||||||
{0xB, 0x40, 0x58, 0x1, 0x1, "eFSA688RA"},
|
|
||||||
{0xC, 0x50, 0x50, 0x1, 0x0, "eFSA80SA"},
|
|
||||||
{0xD, 0x47, 0x80, 0x1, 0x1, "eFSA712RA"},
|
|
||||||
{0xE, 0x50, 0x50, 0x2, 0x0, "eFSA80SC"},
|
|
||||||
{0, 0, 0, 0, 0, NULL}
|
|
||||||
};
|
|
||||||
|
|
||||||
struct elanspi_reg_entry
|
|
||||||
{
|
|
||||||
unsigned char addr, value;
|
|
||||||
/* terminates with 0xFF, 0xFF since register 0x0 is valid */
|
|
||||||
};
|
|
||||||
|
|
||||||
struct elanspi_regtable
|
|
||||||
{
|
|
||||||
const struct elanspi_reg_entry *other;
|
|
||||||
struct
|
|
||||||
{
|
|
||||||
unsigned char sid;
|
|
||||||
const struct elanspi_reg_entry *table;
|
|
||||||
} entries[];
|
|
||||||
};
|
|
||||||
|
|
||||||
static const struct elanspi_reg_entry elanspi_calibration_table_default[] = {
|
|
||||||
{0x05, 0x60},
|
|
||||||
{0x06, 0xc0},
|
|
||||||
{0x07, 0x80},
|
|
||||||
{0x08, 0x04},
|
|
||||||
{0x0a, 0x97},
|
|
||||||
{0x0b, 0x72},
|
|
||||||
{0x0c, 0x69},
|
|
||||||
{0x0f, 0x2a},
|
|
||||||
{0x11, 0x2a},
|
|
||||||
{0x13, 0x27},
|
|
||||||
{0x15, 0x67},
|
|
||||||
{0x18, 0x04},
|
|
||||||
{0x21, 0x20},
|
|
||||||
{0x22, 0x36},
|
|
||||||
{0x2a, 0x5f},
|
|
||||||
{0x2b, 0xc0},
|
|
||||||
{0x2e, 0xff},
|
|
||||||
|
|
||||||
{0xff, 0xff}
|
|
||||||
};
|
|
||||||
|
|
||||||
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},
|
|
||||||
{0x7, 0x80},
|
|
||||||
{0x8, 0x04},
|
|
||||||
{0xA, 0x97},
|
|
||||||
{0xB, 0x72},
|
|
||||||
{0xC, 0x69},
|
|
||||||
{0xF, 0x2A},
|
|
||||||
{0x11, 0x2A},
|
|
||||||
{0x13, 0x27},
|
|
||||||
{0x15, 0x67},
|
|
||||||
{0x18, 0x04},
|
|
||||||
{0x21, 0x20},
|
|
||||||
{0x22, 0x36},
|
|
||||||
{0x2A, 0x5F},
|
|
||||||
{0x2B, 0xC0},
|
|
||||||
{0x2E, 0xFF},
|
|
||||||
|
|
||||||
{0xff, 0xff}
|
|
||||||
};
|
|
||||||
|
|
||||||
static const struct elanspi_reg_entry elanspi_calibration_table_id0[] = {
|
|
||||||
{0x5, 0x60},
|
|
||||||
{0x6, 0xC0},
|
|
||||||
{0x8, 0x04},
|
|
||||||
{0xA, 0x97},
|
|
||||||
{0xB, 0x72},
|
|
||||||
{0xC, 0x69},
|
|
||||||
{0xF, 0x2B},
|
|
||||||
{0x11, 0x2B},
|
|
||||||
{0x13, 0x28},
|
|
||||||
{0x15, 0x28},
|
|
||||||
{0x18, 0x04},
|
|
||||||
{0x21, 0x20},
|
|
||||||
{0x2A, 0x4B},
|
|
||||||
|
|
||||||
{0xff, 0xff}
|
|
||||||
};
|
|
||||||
|
|
||||||
// old style sensor calibration, with only one page of registers
|
|
||||||
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_id57 },
|
|
||||||
{ .sid = 0x6, .table = elanspi_calibration_table_id6 },
|
|
||||||
{ .sid = 0x7, .table = elanspi_calibration_table_id57 },
|
|
||||||
{ .sid = 0x0, .table = NULL }
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
// new style sensor calibration, with two pages of registers
|
|
||||||
static const struct elanspi_reg_entry elanspi_calibration_table_page0_id14[] = {
|
|
||||||
{0x00, 0x5a},
|
|
||||||
{0x01, 0x00},
|
|
||||||
{0x02, 0x4f},
|
|
||||||
{0x03, 0x00},
|
|
||||||
{0x04, 0x4f},
|
|
||||||
{0x05, 0xa0},
|
|
||||||
{0x06, 0x00},
|
|
||||||
{0x07, 0x00},
|
|
||||||
{0x08, 0x00},
|
|
||||||
{0x09, 0x04},
|
|
||||||
{0x0a, 0x74},
|
|
||||||
{0x0b, 0x05},
|
|
||||||
{0x0c, 0x08},
|
|
||||||
{0x0d, 0x00},
|
|
||||||
{0x0e, 0x00},
|
|
||||||
{0x0f, 0x14},
|
|
||||||
{0x10, 0x3c},
|
|
||||||
{0x11, 0x41},
|
|
||||||
{0x12, 0x0c},
|
|
||||||
{0x13, 0x00},
|
|
||||||
{0x14, 0x00},
|
|
||||||
{0x15, 0x04},
|
|
||||||
{0x16, 0x02},
|
|
||||||
{0x17, 0x00},
|
|
||||||
{0x18, 0x01},
|
|
||||||
{0x19, 0xf4},
|
|
||||||
{0x1a, 0x00},
|
|
||||||
{0x1b, 0x00},
|
|
||||||
{0x1c, 0x00},
|
|
||||||
{0x1d, 0x00},
|
|
||||||
{0x1e, 0x00},
|
|
||||||
{0x1f, 0x00},
|
|
||||||
{0x20, 0x00},
|
|
||||||
{0x21, 0x80},
|
|
||||||
{0x22, 0x06},
|
|
||||||
{0x23, 0x00},
|
|
||||||
{0x24, 0x00},
|
|
||||||
{0x25, 0x00},
|
|
||||||
{0x26, 0x00},
|
|
||||||
{0x27, 0x00},
|
|
||||||
{0x28, 0x00},
|
|
||||||
{0x29, 0x04},
|
|
||||||
{0x2a, 0x5f},
|
|
||||||
{0x2b, 0xe2},
|
|
||||||
{0x2c, 0xa0},
|
|
||||||
{0x2d, 0x00},
|
|
||||||
{0x2e, 0xff},
|
|
||||||
{0x2f, 0x40},
|
|
||||||
{0x30, 0x01},
|
|
||||||
{0x31, 0x38},
|
|
||||||
{0x32, 0x00},
|
|
||||||
{0x33, 0x00},
|
|
||||||
{0x34, 0x00},
|
|
||||||
{0x35, 0x1f},
|
|
||||||
{0x36, 0xff},
|
|
||||||
{0x37, 0x00},
|
|
||||||
{0x38, 0x00},
|
|
||||||
{0x39, 0x00},
|
|
||||||
{0x3a, 0x00},
|
|
||||||
{0xff, 0xff}
|
|
||||||
};
|
|
||||||
|
|
||||||
static const struct elanspi_reg_entry elanspi_calibration_table_page1_id14[] = {
|
|
||||||
{0x00, 0x7b},
|
|
||||||
{0x01, 0x7f},
|
|
||||||
{0x02, 0x77},
|
|
||||||
{0x03, 0xd4},
|
|
||||||
{0x04, 0x7d},
|
|
||||||
{0x05, 0x19},
|
|
||||||
{0x06, 0x80},
|
|
||||||
{0x07, 0x40},
|
|
||||||
{0x08, 0x11},
|
|
||||||
{0x09, 0x00},
|
|
||||||
{0x0a, 0x00},
|
|
||||||
{0x0b, 0x14},
|
|
||||||
{0x0c, 0x00},
|
|
||||||
{0x0d, 0x00},
|
|
||||||
{0x0e, 0x32},
|
|
||||||
{0x0f, 0x02},
|
|
||||||
{0x10, 0x08},
|
|
||||||
{0x11, 0x6c},
|
|
||||||
{0x12, 0x00},
|
|
||||||
{0x13, 0x00},
|
|
||||||
{0x14, 0x32},
|
|
||||||
{0x15, 0x01},
|
|
||||||
{0x16, 0x16},
|
|
||||||
{0x17, 0x01},
|
|
||||||
{0x18, 0x14},
|
|
||||||
{0x19, 0x01},
|
|
||||||
{0x1a, 0x16},
|
|
||||||
{0x1b, 0x01},
|
|
||||||
{0x1c, 0x17},
|
|
||||||
{0x1d, 0x01},
|
|
||||||
{0x1e, 0x0a},
|
|
||||||
{0x1f, 0x01},
|
|
||||||
{0x20, 0x0a},
|
|
||||||
{0x21, 0x02},
|
|
||||||
{0x22, 0x08},
|
|
||||||
{0x23, 0x29},
|
|
||||||
{0x24, 0x00},
|
|
||||||
{0x25, 0x0c},
|
|
||||||
{0x26, 0x1a},
|
|
||||||
{0x27, 0x30},
|
|
||||||
{0x28, 0x1a},
|
|
||||||
{0x29, 0x30},
|
|
||||||
{0x2a, 0x00},
|
|
||||||
{0x2b, 0x00},
|
|
||||||
{0x2c, 0x01},
|
|
||||||
{0x2d, 0x16},
|
|
||||||
{0x2e, 0x01},
|
|
||||||
{0x2f, 0x17},
|
|
||||||
{0x30, 0x03},
|
|
||||||
{0x31, 0x2d},
|
|
||||||
{0x32, 0x03},
|
|
||||||
{0x33, 0x2d},
|
|
||||||
{0x34, 0x14},
|
|
||||||
{0x35, 0x00},
|
|
||||||
{0x36, 0x00},
|
|
||||||
{0x37, 0x00},
|
|
||||||
{0x38, 0x00},
|
|
||||||
{0x39, 0x03},
|
|
||||||
{0x3a, 0xfe},
|
|
||||||
{0x3b, 0x00},
|
|
||||||
{0x3c, 0x00},
|
|
||||||
{0x3d, 0x02},
|
|
||||||
{0x3e, 0x00},
|
|
||||||
{0x3f, 0x00},
|
|
||||||
{0xff, 0xff}
|
|
||||||
};
|
|
||||||
|
|
||||||
static const struct elanspi_regtable elanspi_calibration_table_new_page0 = {
|
|
||||||
.other = NULL,
|
|
||||||
.entries = {
|
|
||||||
{ .sid = 0xe, .table = elanspi_calibration_table_page0_id14 },
|
|
||||||
{ .sid = 0x0, .table = NULL }
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
static const struct elanspi_regtable elanspi_calibration_table_new_page1 = {
|
|
||||||
.other = NULL,
|
|
||||||
.entries = {
|
|
||||||
{ .sid = 0xe, .table = elanspi_calibration_table_page1_id14 },
|
|
||||||
{ .sid = 0x0, .table = NULL }
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
#define ELANSPI_NO_ROTATE 0
|
|
||||||
#define ELANSPI_90LEFT_ROTATE 1
|
|
||||||
#define ELANSPI_180_ROTATE 2
|
|
||||||
#define ELANSPI_90RIGHT_ROTATE 3
|
|
||||||
|
|
||||||
#define ELANSPI_HV_FLIPPED 1
|
|
||||||
|
|
||||||
#define ELANSPI_UDEV_TYPES FPI_DEVICE_UDEV_SUBTYPE_SPIDEV | FPI_DEVICE_UDEV_SUBTYPE_HIDRAW
|
|
||||||
#define ELANSPI_TP_VID 0x04f3
|
|
||||||
|
|
||||||
// using checkargs ACPI:HIDPID
|
|
||||||
static const FpIdEntry elanspi_id_table[] = {
|
|
||||||
{.udev_types = ELANSPI_UDEV_TYPES, .spi_acpi_id = "ELAN7001", .hid_id = {.vid = ELANSPI_TP_VID, .pid = 0x3057}, .driver_data = ELANSPI_180_ROTATE},
|
|
||||||
{.udev_types = ELANSPI_UDEV_TYPES, .spi_acpi_id = "ELAN7001", .hid_id = {.vid = ELANSPI_TP_VID, .pid = 0x3087}, .driver_data = ELANSPI_180_ROTATE},
|
|
||||||
{.udev_types = ELANSPI_UDEV_TYPES, .spi_acpi_id = "ELAN7001", .hid_id = {.vid = ELANSPI_TP_VID, .pid = 0x30c6}, .driver_data = ELANSPI_180_ROTATE},
|
|
||||||
{.udev_types = ELANSPI_UDEV_TYPES, .spi_acpi_id = "ELAN70A1", .hid_id = {.vid = ELANSPI_TP_VID, .pid = 0x3134}, .driver_data = ELANSPI_90LEFT_ROTATE},
|
|
||||||
{.udev_types = ELANSPI_UDEV_TYPES, .spi_acpi_id = "ELAN7001", .hid_id = {.vid = ELANSPI_TP_VID, .pid = 0x3148}, .driver_data = ELANSPI_180_ROTATE},
|
|
||||||
{.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}
|
|
||||||
};
|
|
||||||
|
|
||||||
#define ELANSPI_MAX_OLD_STAGE1_CALIBRATION_MEAN 1000
|
|
||||||
|
|
||||||
#define ELANSPI_MIN_OLD_STAGE2_CALBIRATION_MEAN 3000
|
|
||||||
#define ELANSPI_MAX_OLD_STAGE2_CALBIRATION_MEAN 8000
|
|
||||||
|
|
||||||
#define ELANSPI_HV_CALIBRATION_TARGET_MEAN 3000
|
|
||||||
|
|
||||||
#define ELANSPI_MIN_EMPTY_INVALID_PERCENT 6
|
|
||||||
#define ELANSPI_MAX_REAL_INVALID_PERCENT 3
|
|
||||||
|
|
||||||
#define ELANSPI_MIN_REAL_STDDEV (592 * 592)
|
|
||||||
#define ELANSPI_MAX_EMPTY_STDDEV (350 * 350)
|
|
||||||
|
|
||||||
#define ELANSPI_MIN_FRAMES_DEBOUNCE 2
|
|
||||||
|
|
||||||
#define ELANSPI_SWIPE_FRAMES_DISCARD 1
|
|
||||||
#define ELANSPI_MIN_FRAMES_SWIPE (7 + ELANSPI_SWIPE_FRAMES_DISCARD)
|
|
||||||
#define ELANSPI_MAX_FRAMES_SWIPE (20 + ELANSPI_SWIPE_FRAMES_DISCARD)
|
|
||||||
|
|
||||||
#define ELANSPI_MAX_FRAME_HEIGHT 43
|
|
||||||
#define ELANSPI_MIN_FRAME_TO_FRAME_DIFF (250 * 250)
|
|
||||||
|
|
||||||
#define ELANSPI_HV_SENSOR_FRAME_DELAY 23
|
|
||||||
|
|
||||||
#define ELANSPI_OTP_TIMEOUT_USEC (12 * 1000)
|
|
||||||
|
|
||||||
#define ELANSPI_OLD_CAPTURE_TIMEOUT_USEC (100 * 1000)
|
|
||||||
#define ELANSPI_HV_CAPTURE_TIMEOUT_USEC (50 * 1000)
|
|
||||||
+12
-20
@@ -859,29 +859,21 @@ m_capture_state (FpiSsm *ssm, FpDevice *dev)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
FpImage *img;
|
||||||
|
unsigned int img_size;
|
||||||
/* Remove empty parts 2 times for the 2 frames */
|
/* Remove empty parts 2 times for the 2 frames */
|
||||||
process_removefpi_end (self);
|
process_removefpi_end (self);
|
||||||
process_removefpi_end (self);
|
process_removefpi_end (self);
|
||||||
|
img_size = self->fp_height * FE_WIDTH;
|
||||||
if (self->fp_height >= FE_WIDTH)
|
img = fp_image_new (FE_WIDTH, self->fp_height);
|
||||||
{
|
/* Images received are white on black, so invert it. */
|
||||||
FpImage *img = fp_image_new (FE_WIDTH, self->fp_height);
|
/* TODO detect sweep direction */
|
||||||
unsigned int img_size = self->fp_height * FE_WIDTH;
|
img->flags = FPI_IMAGE_COLORS_INVERTED | FPI_IMAGE_V_FLIPPED;
|
||||||
|
img->height = self->fp_height;
|
||||||
/* Images received are white on black, so invert it. */
|
process_4to8_bpp (self->fp, img_size / 2, img->data);
|
||||||
/* TODO detect sweep direction */
|
fp_dbg ("Sending the raw fingerprint image (%dx%d)",
|
||||||
img->flags = FPI_IMAGE_COLORS_INVERTED | FPI_IMAGE_V_FLIPPED;
|
img->width, img->height);
|
||||||
img->height = self->fp_height;
|
fpi_image_device_image_captured (idev, img);
|
||||||
process_4to8_bpp (self->fp, img_size / 2, img->data);
|
|
||||||
fp_dbg ("Sending the raw fingerprint image (%dx%d)",
|
|
||||||
img->width, img->height);
|
|
||||||
fpi_image_device_image_captured (idev, img);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
fpi_image_device_retry_scan (idev, FP_DEVICE_RETRY_TOO_SHORT);
|
|
||||||
}
|
|
||||||
|
|
||||||
fpi_image_device_report_finger_status (idev, FALSE);
|
fpi_image_device_report_finger_status (idev, FALSE);
|
||||||
fpi_ssm_mark_completed (ssm);
|
fpi_ssm_mark_completed (ssm);
|
||||||
}
|
}
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -1,52 +0,0 @@
|
|||||||
/*
|
|
||||||
* 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
@@ -1,221 +0,0 @@
|
|||||||
/*
|
|
||||||
* 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;
|
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -1,63 +0,0 @@
|
|||||||
/*
|
|
||||||
* Goodix Moc driver for libfprint
|
|
||||||
* Copyright (C) 2019 Shenzhen Goodix Technology Co., Ltd.
|
|
||||||
*
|
|
||||||
* 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 (FpiDeviceGoodixMoc, fpi_device_goodixmoc, FPI, DEVICE_GOODIXMOC, FpDevice)
|
|
||||||
|
|
||||||
typedef enum {
|
|
||||||
FP_CMD_SEND = 0,
|
|
||||||
FP_CMD_GET_ACK,
|
|
||||||
FP_CMD_GET_DATA,
|
|
||||||
FP_CMD_NUM_STATES,
|
|
||||||
} FpCmdState;
|
|
||||||
|
|
||||||
|
|
||||||
typedef enum {
|
|
||||||
FP_INIT_VERSION = 0,
|
|
||||||
FP_INIT_CONFIG,
|
|
||||||
FP_INIT_TEMPLATE_LIST,
|
|
||||||
FP_INIT_RESET_DEVICE,
|
|
||||||
FP_INIT_NUM_STATES,
|
|
||||||
} FpInitState;
|
|
||||||
|
|
||||||
|
|
||||||
typedef enum {
|
|
||||||
FP_ENROLL_PWR_BTN_SHIELD_ON = 0,
|
|
||||||
FP_ENROLL_ENUM,
|
|
||||||
FP_ENROLL_CREATE,
|
|
||||||
FP_ENROLL_CAPTURE,
|
|
||||||
FP_ENROLL_UPDATE,
|
|
||||||
FP_ENROLL_WAIT_FINGER_UP,
|
|
||||||
FP_ENROLL_CHECK_DUPLICATE,
|
|
||||||
FP_ENROLL_COMMIT,
|
|
||||||
FP_ENROLL_PWR_BTN_SHIELD_OFF,
|
|
||||||
FP_ENROLL_NUM_STATES,
|
|
||||||
} FpEnrollState;
|
|
||||||
|
|
||||||
typedef enum {
|
|
||||||
FP_VERIFY_PWR_BTN_SHIELD_ON = 0,
|
|
||||||
FP_VERIFY_CAPTURE,
|
|
||||||
FP_VERIFY_IDENTIFY,
|
|
||||||
FP_VERIFY_PWR_BTN_SHIELD_OFF,
|
|
||||||
FP_VERIFY_NUM_STATES,
|
|
||||||
} FpVerifyState;
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user