mirror of
https://gitlab.freedesktop.org/libfprint/libfprint.git
synced 2026-09-11 05:10:05 +00:00
Compare commits
824
Commits
+110
-37
@@ -1,20 +1,36 @@
|
|||||||
include:
|
include:
|
||||||
|
- local: '.gitlab-ci/libfprint-image-variables.yaml'
|
||||||
- local: '.gitlab-ci/libfprint-templates.yaml'
|
- local: '.gitlab-ci/libfprint-templates.yaml'
|
||||||
- project: 'freedesktop/ci-templates'
|
- project: 'freedesktop/ci-templates'
|
||||||
ref: master
|
ref: master
|
||||||
file: '/templates/fedora.yml'
|
file: '/templates/fedora.yml'
|
||||||
- remote: 'https://gitlab.gnome.org/GNOME/citemplates/-/raw/master/flatpak/flatpak_ci_initiative.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
|
extends: .libfprint_common_variables
|
||||||
FDO_DISTRIBUTION_TAG: latest
|
FDO_DISTRIBUTION_TAG: $LIBFPRINT_IMAGE_TAG
|
||||||
FDO_DISTRIBUTION_VERSION: rawhide
|
FDO_DISTRIBUTION_VERSION: rawhide
|
||||||
FDO_UPSTREAM_REPO: "libfprint/$CI_PROJECT_NAME"
|
FDO_UPSTREAM_REPO: "libfprint/$CI_PROJECT_NAME"
|
||||||
FEDORA_IMAGE: "$CI_REGISTRY/libfprint/$CI_PROJECT_NAME/fedora/$FDO_DISTRIBUTION_VERSION:$FDO_DISTRIBUTION_TAG"
|
FEDORA_IMAGE: "$CI_REGISTRY/libfprint/$CI_PROJECT_NAME/fedora/$FDO_DISTRIBUTION_VERSION:$FDO_DISTRIBUTION_TAG"
|
||||||
BUNDLE: "org.freedesktop.libfprint.Demo.flatpak"
|
|
||||||
LAST_ABI_BREAK: "056ea541ddc97f5806cffbd99a12dc87e4da3546"
|
LAST_ABI_BREAK: "056ea541ddc97f5806cffbd99a12dc87e4da3546"
|
||||||
|
|
||||||
|
workflow:
|
||||||
|
rules:
|
||||||
|
- if: $CI_PIPELINE_SOURCE == 'merge_request_event'
|
||||||
|
- if: $CI_PIPELINE_SOURCE == 'push'
|
||||||
|
|
||||||
stages:
|
stages:
|
||||||
|
- image-build
|
||||||
- check-source
|
- check-source
|
||||||
- build
|
- build
|
||||||
- test
|
- test
|
||||||
@@ -25,16 +41,16 @@ 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 --werror -Ddrivers=$driver . _build
|
- meson setup _build --werror -Ddrivers=$driver
|
||||||
- ninja -C _build
|
- meson compile -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 --werror -Ddrivers=all . _build
|
- meson setup _build --werror -Ddrivers=all
|
||||||
- ninja -C _build
|
- meson compile -C _build
|
||||||
- ninja -C _build install
|
- meson install -C _build
|
||||||
|
|
||||||
.build_template: &check_abi
|
.build_template: &check_abi
|
||||||
script:
|
script:
|
||||||
@@ -63,12 +79,16 @@ test:
|
|||||||
variables:
|
variables:
|
||||||
- $CI_PIPELINE_SOURCE == "schedule"
|
- $CI_PIPELINE_SOURCE == "schedule"
|
||||||
script:
|
script:
|
||||||
- meson --werror -Ddrivers=all -Db_coverage=true -Dsdcp_virt_binary=/usr/local/bin/sdcp_virt_device . _build
|
- meson setup _build --werror -Ddrivers=all -Db_coverage=true
|
||||||
- ninja -C _build
|
|
||||||
- meson test -C _build --print-errorlogs --no-stdsplit --timeout-multiplier 3
|
- meson test -C _build --print-errorlogs --no-stdsplit --timeout-multiplier 3
|
||||||
- ninja -C _build coverage
|
- ninja -C _build coverage
|
||||||
- cat _build/meson-logs/coverage.txt
|
- 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'
|
expose_as: 'Coverage Report'
|
||||||
when: always
|
when: always
|
||||||
paths:
|
paths:
|
||||||
@@ -79,14 +99,17 @@ test:
|
|||||||
|
|
||||||
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 -Ddrivers=all -Dsdcp_virt_binary=/usr/local/bin/sdcp_virt_device . _build
|
- meson setup _build -Ddrivers=all
|
||||||
- ninja -C _build
|
- meson compile -C _build
|
||||||
- meson test -C _build --print-errorlogs --no-stdsplit --setup=valgrind
|
- meson test -C _build --print-errorlogs --no-stdsplit --setup=valgrind
|
||||||
artifacts:
|
artifacts:
|
||||||
|
reports:
|
||||||
|
junit: "_build/meson-logs/testlog-valgrind.junit.xml"
|
||||||
expose_as: 'Valgrind test logs'
|
expose_as: 'Valgrind test logs'
|
||||||
when: always
|
when: always
|
||||||
paths:
|
paths:
|
||||||
@@ -94,6 +117,29 @@ test_valgrind:
|
|||||||
- _build/meson-logs/testlog-valgrind.txt
|
- _build/meson-logs/testlog-valgrind.txt
|
||||||
expire_in: 1 week
|
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:
|
test_scan_build:
|
||||||
stage: test
|
stage: test
|
||||||
@@ -102,10 +148,12 @@ test_scan_build:
|
|||||||
- $CI_PIPELINE_SOURCE == "schedule"
|
- $CI_PIPELINE_SOURCE == "schedule"
|
||||||
allow_failure: true
|
allow_failure: true
|
||||||
script:
|
script:
|
||||||
- meson -Ddrivers=all . _build
|
- meson setup _build -Ddrivers=all
|
||||||
# Wrapper to add --status-bugs and disable malloc checker
|
# Wrapper to add --status-bugs and disable malloc checker
|
||||||
- SCANBUILD=$CI_PROJECT_DIR/.gitlab-ci/scan-build ninja -C _build scan-build
|
- SCANBUILD=$CI_PROJECT_DIR/.gitlab-ci/scan-build
|
||||||
|
ninja -C _build scan-build
|
||||||
artifacts:
|
artifacts:
|
||||||
|
when: on_failure
|
||||||
paths:
|
paths:
|
||||||
- _build/meson-logs
|
- _build/meson-logs
|
||||||
expire_in: 1 week
|
expire_in: 1 week
|
||||||
@@ -118,7 +166,7 @@ test_indent:
|
|||||||
script:
|
script:
|
||||||
- scripts/uncrustify.sh
|
- scripts/uncrustify.sh
|
||||||
- git diff
|
- git diff
|
||||||
- "! git status -s | grep -q ."
|
- git diff-index --name-only --exit-code HEAD
|
||||||
|
|
||||||
test_unsupported_list:
|
test_unsupported_list:
|
||||||
stage: check-source
|
stage: check-source
|
||||||
@@ -131,56 +179,81 @@ test_unsupported_list:
|
|||||||
|
|
||||||
flatpak:
|
flatpak:
|
||||||
stage: flatpak
|
stage: flatpak
|
||||||
extends: .flatpak
|
extends: .flatpak@x86_64
|
||||||
image: registry.gitlab.gnome.org/gnome/gnome-runtime-images/gnome:3.36
|
|
||||||
variables:
|
variables:
|
||||||
MANIFEST_PATH: "demo/org.freedesktop.libfprint.Demo.json"
|
MANIFEST_PATH: "demo/org.freedesktop.libfprint.Demo.json"
|
||||||
FLATPAK_MODULE: "libfprint"
|
FLATPAK_MODULE: "libfprint"
|
||||||
APP_ID: "org.freedesktop.libfprint.Demo"
|
APP_ID: "org.freedesktop.libfprint.Demo"
|
||||||
|
BUNDLE: "org.freedesktop.libfprint.Demo.flatpak"
|
||||||
|
RUNTIME_REPO: "https://nightly.gnome.org/gnome-nightly.flatpakrepo"
|
||||||
|
# Build with any builder
|
||||||
|
tags: []
|
||||||
rules:
|
rules:
|
||||||
- if: '$CI_PROJECT_PATH != "libfprint/libfprint"'
|
- if: '$CI_PROJECT_PATH != "libfprint/libfprint"'
|
||||||
when: never
|
when: manual
|
||||||
|
allow_failure: true
|
||||||
- if: '$CI_PIPELINE_SOURCE == "schedule"'
|
- if: '$CI_PIPELINE_SOURCE == "schedule"'
|
||||||
when: never
|
when: never
|
||||||
- if: '$CI_COMMIT_BRANCH == "master"'
|
- if: '$CI_COMMIT_BRANCH == "master"'
|
||||||
|
allow_failure: true
|
||||||
when: always
|
when: always
|
||||||
- if: '$CI_COMMIT_TAG'
|
- if: '$CI_COMMIT_TAG'
|
||||||
|
allow_failure: true
|
||||||
when: always
|
when: always
|
||||||
# For any other (commit), allow manual run.
|
# For any other (commit), allow manual run.
|
||||||
# This excludes MRs which would create a duplicate pipeline
|
# This excludes MRs which would create a duplicate pipeline
|
||||||
- if: '$CI_COMMIT_BRANCH'
|
- if: '$CI_COMMIT_BRANCH'
|
||||||
when: manual
|
when: manual
|
||||||
allow_failure: true
|
allow_failure: true
|
||||||
|
- if: '$CI_MERGE_REQUEST_ID'
|
||||||
|
when: manual
|
||||||
|
allow_failure: true
|
||||||
|
|
||||||
# CONTAINERS creation stage
|
# CONTAINERS creation stage
|
||||||
container_fedora_build:
|
.container_fedora_build_base:
|
||||||
extends: .fdo.container-build@fedora
|
extends: .fdo.container-build@fedora
|
||||||
|
stage: image-build
|
||||||
only:
|
only:
|
||||||
variables:
|
variables:
|
||||||
- $CI_PIPELINE_SOURCE == "schedule" && $CRON_TASK == "BUILD_CI_IMAGES"
|
- $CI_PIPELINE_SOURCE == "never"
|
||||||
variables:
|
variables:
|
||||||
GIT_STRATEGY: none # no need to pull the whole tree for rebuilding the image
|
GIT_STRATEGY: none # no need to pull the whole tree for rebuilding the image
|
||||||
FDO_FORCE_REBUILD: 1
|
|
||||||
# a list of packages to install
|
# a list of packages to install
|
||||||
FDO_DISTRIBUTION_PACKAGES:
|
FDO_DISTRIBUTION_PACKAGES:
|
||||||
$LIBFPRINT_DEPENDENCIES
|
$LIBFPRINT_DEPENDENCIES
|
||||||
vala
|
vala
|
||||||
libpcap-devel
|
libpcap-devel
|
||||||
libudev-devel
|
libudev-devel
|
||||||
mbedtls-devel
|
|
||||||
FDO_DISTRIBUTION_EXEC: |
|
FDO_DISTRIBUTION_EXEC: |
|
||||||
git clone https://github.com/martinpitt/umockdev.git && \
|
$LIBFPRINT_EXEC
|
||||||
cd umockdev && \
|
|
||||||
meson _build --prefix=/usr && \
|
.container_fedora_build_forced:
|
||||||
ninja -C _build && ninja -C _build install
|
variables:
|
||||||
cd /tmp
|
FDO_FORCE_REBUILD: 1
|
||||||
mkdir -p /usr/local/bin
|
|
||||||
git clone https://github.com/benzea/SecureDeviceConnectionProtocol.git
|
container_fedora_build_schedule:
|
||||||
# Don't bother with cmake
|
extends:
|
||||||
gcc -l mbedcrypto -I SecureDeviceConnectionProtocol/src/include \
|
- .container_fedora_build_base
|
||||||
SecureDeviceConnectionProtocol/src/test/virt_device.c \
|
- .container_fedora_build_forced
|
||||||
SecureDeviceConnectionProtocol/src/client/client.c \
|
only:
|
||||||
SecureDeviceConnectionProtocol/src/test/helpers.c \
|
variables:
|
||||||
SecureDeviceConnectionProtocol/src/test/testkeys.c \
|
- $CI_PIPELINE_SOURCE == "schedule" && $CRON_TASK == "BUILD_CI_IMAGES"
|
||||||
-o /usr/local/bin/sdcp_virt_device
|
|
||||||
rm -rf SecureDeviceConnectionProtocol
|
container_fedora_build_manual:
|
||||||
|
extends:
|
||||||
|
- .container_fedora_build_base
|
||||||
|
- .container_fedora_build_forced
|
||||||
|
only:
|
||||||
|
variables:
|
||||||
|
- $LIBFPRINT_CI_ACTION == "build-image"
|
||||||
|
|
||||||
|
container_fedora_build_on_deps_changed:
|
||||||
|
extends: .container_fedora_build_base
|
||||||
|
only:
|
||||||
|
variables:
|
||||||
|
- $CI_PROJECT_NAMESPACE == "libfprint" && $CI_PIPELINE_SOURCE != "schedule"
|
||||||
|
refs:
|
||||||
|
- branches
|
||||||
|
- merge_requests
|
||||||
|
changes:
|
||||||
|
- .gitlab-ci/libfprint-image-variables.yaml
|
||||||
|
|||||||
@@ -0,0 +1,2 @@
|
|||||||
|
variables:
|
||||||
|
LIBFPRINT_IMAGE_TAG: v3
|
||||||
@@ -1,6 +1,10 @@
|
|||||||
|
# Bump image version on .gitlab-ci/libfprint-image-variables.yaml to trigger
|
||||||
|
# a rebuild on changes to this file
|
||||||
|
|
||||||
.libfprint_common_variables:
|
.libfprint_common_variables:
|
||||||
LIBFPRINT_DEPENDENCIES:
|
LIBFPRINT_DEPENDENCIES:
|
||||||
doxygen
|
doxygen
|
||||||
|
dnf-plugins-core
|
||||||
flatpak-builder
|
flatpak-builder
|
||||||
gcc
|
gcc
|
||||||
gcc-c++
|
gcc-c++
|
||||||
@@ -9,6 +13,7 @@
|
|||||||
glib2-devel
|
glib2-devel
|
||||||
glibc-devel
|
glibc-devel
|
||||||
gobject-introspection-devel
|
gobject-introspection-devel
|
||||||
|
gnome-desktop-testing
|
||||||
gtk-doc
|
gtk-doc
|
||||||
gtk3-devel
|
gtk3-devel
|
||||||
libabigail
|
libabigail
|
||||||
@@ -27,3 +32,18 @@
|
|||||||
valgrind
|
valgrind
|
||||||
clang-analyzer
|
clang-analyzer
|
||||||
diffutils
|
diffutils
|
||||||
|
|
||||||
|
LIBFPRINT_EXEC: |
|
||||||
|
dnf -y install dnf-utils
|
||||||
|
debuginfo-install -y \
|
||||||
|
glib2 \
|
||||||
|
glibc \
|
||||||
|
libgusb \
|
||||||
|
libusb \
|
||||||
|
nss \
|
||||||
|
pixman
|
||||||
|
|
||||||
|
git clone https://github.com/martinpitt/umockdev.git && \
|
||||||
|
cd umockdev && \
|
||||||
|
meson _build --prefix=/usr && \
|
||||||
|
ninja -C _build && ninja -C _build install
|
||||||
|
|||||||
@@ -1,6 +1,59 @@
|
|||||||
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
|
2021-11-02: v1.94.3 release
|
||||||
|
|
||||||
Highlights:
|
Highlights:
|
||||||
@@ -319,7 +372,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 whitelist
|
- Add some unsupported devices to the allowlist
|
||||||
|
|
||||||
2017-05-14: v0.7.0 release
|
2017-05-14: v0.7.0 release
|
||||||
* Drivers:
|
* Drivers:
|
||||||
@@ -369,7 +422,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 blacklist
|
- Add Microsoft keyboard to the suspend denylist
|
||||||
|
|
||||||
* Plenty of build fixes
|
* Plenty of build fixes
|
||||||
|
|
||||||
|
|||||||
+25
@@ -0,0 +1,25 @@
|
|||||||
|
### libfprint-TOD v1
|
||||||
|
|
||||||
|
- First public release
|
||||||
|
- Based on [libfprint 1.90.1](https://gitlab.freedesktop.org/libfprint/libfprint/-/releases#v1.90.1)
|
||||||
|
- Bumped TOD version to 1
|
||||||
|
|
||||||
|
### Highlights of the Drivers API changes
|
||||||
|
|
||||||
|
Both the driver and external APIs have changed, as both the verify and the identify functions now have early reporting mechanisms.
|
||||||
|
|
||||||
|
- Added API for early report of matching results or retry errors
|
||||||
|
- Verify and identification completion functions have been simplified
|
||||||
|
- Support variadic arguments in error functions
|
||||||
|
- Various re-definitions of ownership handling
|
||||||
|
- Add convenience API to change state after a timeout
|
||||||
|
- Add unit tests for all the drivers API
|
||||||
|
|
||||||
|
### Drivers required changes
|
||||||
|
As per the early report mechanism, drivers need to adapt, in particular:
|
||||||
|
- New pkg-config dependency name is `libfprint-2-tod-1`
|
||||||
|
- Verification and Identification API for non-image drivers has changed and drivers need to both `report` the result of the action and complete it:
|
||||||
|
- `fpi_device_{verify,identify}_report` must inform whether a match/no-match or identification happened or report a *retry error*.
|
||||||
|
- `fpi_device_{verify,identify}_complete` must be called once the device has completed the verification / identification process, in case reporting device errors (not retry ones!)
|
||||||
|
|
||||||
|
You can see examples of changes needed in the [reference example driver](https://gitlab.freedesktop.org/3v1n0/libfprint-tod-example-driver/-/commit/8308f84f7d1cfd1b9ed0936c13c73b43a4a46772) or the [upstream synaptics driver](https://gitlab.freedesktop.org/libfprint/libfprint/-/merge_requests/112/diffs)
|
||||||
@@ -1,54 +1,90 @@
|
|||||||
# libfprint
|
|
||||||
|
|
||||||
libfprint is part of the fprint project:
|
|
||||||
https://fprint.freedesktop.org/
|
<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
|
## History
|
||||||
|
|
||||||
libfprint was originally developed as part of an academic project at the
|
**LibFPrint** was originally developed as part of an
|
||||||
University of Manchester with the aim of hiding differences between different
|
academic project at the **[University Of Manchester]**.
|
||||||
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
|
It aimed to hide the differences between consumer
|
||||||
from this one, although I try to keep them as similar as possible (I'm not
|
fingerprint scanners and provide a single uniform
|
||||||
hiding anything in the academic branch, it's just the open source release
|
API to application developers.
|
||||||
contains some commits excluded from the academic project).
|
|
||||||
|
## Goal
|
||||||
|
|
||||||
|
The ultimate goal of the **FPrint** project is to make
|
||||||
|
fingerprint scanners widely and easily usable under
|
||||||
|
common Linux environments.
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
THE UNIVERSITY OF MANCHESTER DOES NOT ENDORSE THIS THIS SOFTWARE RELEASE AND
|
`Section 6` of the license states that for compiled works that use
|
||||||
IS IN NO WAY RESPONSIBLE FOR THE CODE CONTAINED WITHIN, OR ANY DAMAGES CAUSED
|
this library, such works must include **LibFPrint** copyright notices
|
||||||
BY USING OR DISTRIBUTING THE SOFTWARE. Development does not happen on
|
alongside the copyright notices for the other parts of the work.
|
||||||
university computers and the project is not hosted at the university either.
|
|
||||||
|
|
||||||
For more information on libfprint, supported devices, API documentation, etc.,
|
**LibFPrint** includes code from **NIST's** **[NBIS]** software distribution.
|
||||||
see the homepage:
|
|
||||||
https://fprint.freedesktop.org/
|
|
||||||
|
|
||||||
libfprint is licensed under the GNU LGPL version 2.1. See the COPYING file
|
We include **Bozorth3** from the **[US Export Controlled]**
|
||||||
for the license text.
|
distribution, which we have determined to be fine
|
||||||
|
being shipped in an open source project.
|
||||||
|
|
||||||
Section 6 of the license states that for compiled works that use this
|
<br/>
|
||||||
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:
|
<div align="right">
|
||||||
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
|
[![Badge License]][License]
|
||||||
|
|
||||||
Older versions of libfprint are available at:
|
</div>
|
||||||
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/
|
|
||||||
|
[Documentation]: https://fprint.freedesktop.org/libfprint-dev/
|
||||||
|
[Contributors]: https://gitlab.freedesktop.org/libfprint/libfprint/-/graphs/master
|
||||||
|
[Unsupported]: https://gitlab.freedesktop.org/libfprint/wiki/-/wikis/Unsupported-Devices
|
||||||
|
[Supported]: https://fprint.freedesktop.org/supported-devices.html
|
||||||
|
[Website]: https://fprint.freedesktop.org/
|
||||||
|
|
||||||
|
[Contribute]: ./HACKING.md
|
||||||
|
[License]: ./COPYING
|
||||||
|
|
||||||
|
[University Of Manchester]: https://www.manchester.ac.uk/
|
||||||
|
[US Export Controlled]: https://fprint.freedesktop.org/us-export-control.html
|
||||||
|
[NBIS]: http://fingerprint.nist.gov/NBIS/index.html
|
||||||
|
|
||||||
|
|
||||||
|
<!---------------------------------[ Badges ]---------------------------------->
|
||||||
|
|
||||||
|
[Badge License]: https://img.shields.io/badge/License-LGPL2.1-015d93.svg?style=for-the-badge&labelColor=blue
|
||||||
|
|
||||||
|
|
||||||
|
<!---------------------------------[ Buttons ]--------------------------------->
|
||||||
|
|
||||||
|
[Button Documentation]: https://img.shields.io/badge/Documentation-04ACE6?style=for-the-badge&logoColor=white&logo=BookStack
|
||||||
|
[Button Contributors]: https://img.shields.io/badge/Contributors-FF4F8B?style=for-the-badge&logoColor=white&logo=ActiGraph
|
||||||
|
[Button Unsupported]: https://img.shields.io/badge/Unsupported_Devices-EF2D5E?style=for-the-badge&logoColor=white&logo=AdBlock
|
||||||
|
[Button Contribute]: https://img.shields.io/badge/Contribute-66459B?style=for-the-badge&logoColor=white&logo=Git
|
||||||
|
[Button Supported]: https://img.shields.io/badge/Supported_Devices-428813?style=for-the-badge&logoColor=white&logo=AdGuard
|
||||||
|
[Button Website]: https://img.shields.io/badge/Homepage-3B80AE?style=for-the-badge&logoColor=white&logo=freedesktopDotOrg
|
||||||
|
|||||||
@@ -0,0 +1,9 @@
|
|||||||
|
### libfprint-TOD - libfprint for Touch OEM Drivers
|
||||||
|
|
||||||
|
This is a light fork of libfprint to expose internal Drivers API in order to
|
||||||
|
create drivers as shared libraries.
|
||||||
|
|
||||||
|
Fork is hosted at: https://gitlab.freedesktop.org/3v1n0/libfprint/tree/tod
|
||||||
|
|
||||||
|
An example driver implementation is available:
|
||||||
|
- https://gitlab.freedesktop.org/3v1n0/libfprint-tod-example-driver
|
||||||
+80
-2
@@ -67,7 +67,7 @@ usb:v08FFp5731*
|
|||||||
ID_PERSIST=0
|
ID_PERSIST=0
|
||||||
|
|
||||||
# Supported by libfprint driver aes4000
|
# Supported by libfprint driver aes4000
|
||||||
usb:v5501p08FF*
|
usb:v08FFp5501*
|
||||||
ID_AUTOSUSPEND=1
|
ID_AUTOSUSPEND=1
|
||||||
ID_PERSIST=0
|
ID_PERSIST=0
|
||||||
|
|
||||||
@@ -77,6 +77,12 @@ usb:v1C7Ap0571*
|
|||||||
ID_AUTOSUSPEND=1
|
ID_AUTOSUSPEND=1
|
||||||
ID_PERSIST=0
|
ID_PERSIST=0
|
||||||
|
|
||||||
|
# Supported by libfprint driver egismoc
|
||||||
|
usb:v1C7Ap0582*
|
||||||
|
usb:v1C7Ap05A1*
|
||||||
|
ID_AUTOSUSPEND=1
|
||||||
|
ID_PERSIST=0
|
||||||
|
|
||||||
# Supported by libfprint driver elan
|
# Supported by libfprint driver elan
|
||||||
usb:v04F3p0903*
|
usb:v04F3p0903*
|
||||||
usb:v04F3p0907*
|
usb:v04F3p0907*
|
||||||
@@ -133,6 +139,7 @@ usb:v04F3p0C32*
|
|||||||
usb:v04F3p0C33*
|
usb:v04F3p0C33*
|
||||||
usb:v04F3p0C3D*
|
usb:v04F3p0C3D*
|
||||||
usb:v04F3p0C42*
|
usb:v04F3p0C42*
|
||||||
|
usb:v04F3p0C4B*
|
||||||
usb:v04F3p0C4D*
|
usb:v04F3p0C4D*
|
||||||
usb:v04F3p0C4F*
|
usb:v04F3p0C4F*
|
||||||
usb:v04F3p0C63*
|
usb:v04F3p0C63*
|
||||||
@@ -144,6 +151,11 @@ usb:v04F3p0C58*
|
|||||||
# Supported by libfprint driver elanmoc
|
# Supported by libfprint driver elanmoc
|
||||||
usb:v04F3p0C7D*
|
usb:v04F3p0C7D*
|
||||||
usb:v04F3p0C7E*
|
usb:v04F3p0C7E*
|
||||||
|
usb:v04F3p0C82*
|
||||||
|
usb:v04F3p0C88*
|
||||||
|
usb:v04F3p0C8C*
|
||||||
|
usb:v04F3p0C8D*
|
||||||
|
usb:v04F3p0C99*
|
||||||
ID_AUTOSUSPEND=1
|
ID_AUTOSUSPEND=1
|
||||||
ID_PERSIST=0
|
ID_PERSIST=0
|
||||||
|
|
||||||
@@ -152,19 +164,47 @@ usb:v1C7Ap0603*
|
|||||||
ID_AUTOSUSPEND=1
|
ID_AUTOSUSPEND=1
|
||||||
ID_PERSIST=0
|
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
|
# Supported by libfprint driver goodixmoc
|
||||||
usb:v27C6p5840*
|
usb:v27C6p5840*
|
||||||
|
usb:v27C6p6014*
|
||||||
|
usb:v27C6p6092*
|
||||||
|
usb:v27C6p6094*
|
||||||
usb:v27C6p609C*
|
usb:v27C6p609C*
|
||||||
usb:v27C6p60A2*
|
usb:v27C6p60A2*
|
||||||
|
usb:v27C6p60A4*
|
||||||
|
usb:v27C6p60BC*
|
||||||
|
usb:v27C6p6304*
|
||||||
|
usb:v27C6p631C*
|
||||||
|
usb:v27C6p633C*
|
||||||
|
usb:v27C6p634C*
|
||||||
|
usb:v27C6p6384*
|
||||||
usb:v27C6p639C*
|
usb:v27C6p639C*
|
||||||
usb:v27C6p63AC*
|
usb:v27C6p63AC*
|
||||||
usb:v27C6p63BC*
|
usb:v27C6p63BC*
|
||||||
usb:v27C6p63CC*
|
usb:v27C6p63CC*
|
||||||
usb:v27C6p6496*
|
usb:v27C6p6496*
|
||||||
|
usb:v27C6p6582*
|
||||||
usb:v27C6p6584*
|
usb:v27C6p6584*
|
||||||
usb:v27C6p658C*
|
usb:v27C6p658C*
|
||||||
usb:v27C6p6592*
|
usb:v27C6p6592*
|
||||||
usb:v27C6p6594*
|
usb:v27C6p6594*
|
||||||
|
usb:v27C6p659A*
|
||||||
usb:v27C6p659C*
|
usb:v27C6p659C*
|
||||||
usb:v27C6p6A94*
|
usb:v27C6p6A94*
|
||||||
ID_AUTOSUSPEND=1
|
ID_AUTOSUSPEND=1
|
||||||
@@ -175,6 +215,11 @@ usb:v298Dp1010*
|
|||||||
ID_AUTOSUSPEND=1
|
ID_AUTOSUSPEND=1
|
||||||
ID_PERSIST=0
|
ID_PERSIST=0
|
||||||
|
|
||||||
|
# Supported by libfprint driver realtek
|
||||||
|
usb:v0BDAp5813*
|
||||||
|
ID_AUTOSUSPEND=1
|
||||||
|
ID_PERSIST=0
|
||||||
|
|
||||||
# Supported by libfprint driver synaptics
|
# Supported by libfprint driver synaptics
|
||||||
usb:v06CBp00BD*
|
usb:v06CBp00BD*
|
||||||
usb:v06CBp00DF*
|
usb:v06CBp00DF*
|
||||||
@@ -185,8 +230,14 @@ usb:v06CBp0100*
|
|||||||
usb:v06CBp00F0*
|
usb:v06CBp00F0*
|
||||||
usb:v06CBp0103*
|
usb:v06CBp0103*
|
||||||
usb:v06CBp0123*
|
usb:v06CBp0123*
|
||||||
|
usb:v06CBp0124*
|
||||||
usb:v06CBp0126*
|
usb:v06CBp0126*
|
||||||
usb:v06CBp0129*
|
usb:v06CBp0129*
|
||||||
|
usb:v06CBp0168*
|
||||||
|
usb:v06CBp015F*
|
||||||
|
usb:v06CBp0104*
|
||||||
|
usb:v06CBp0173*
|
||||||
|
usb:v06CBp0106*
|
||||||
ID_AUTOSUSPEND=1
|
ID_AUTOSUSPEND=1
|
||||||
ID_PERSIST=0
|
ID_PERSIST=0
|
||||||
|
|
||||||
@@ -199,6 +250,7 @@ usb:v147Ep1001*
|
|||||||
|
|
||||||
# Supported by libfprint driver upektc
|
# Supported by libfprint driver upektc
|
||||||
usb:v0483p2015*
|
usb:v0483p2015*
|
||||||
|
usb:v0483p2017*
|
||||||
usb:v147Ep3001*
|
usb:v147Ep3001*
|
||||||
ID_AUTOSUSPEND=1
|
ID_AUTOSUSPEND=1
|
||||||
ID_PERSIST=0
|
ID_PERSIST=0
|
||||||
@@ -254,13 +306,24 @@ usb:v138Ap0091*
|
|||||||
ID_PERSIST=0
|
ID_PERSIST=0
|
||||||
|
|
||||||
# Known unsupported devices
|
# Known unsupported devices
|
||||||
|
usb:v047Dp00F2*
|
||||||
|
usb:v04E8p730B*
|
||||||
usb:v04F3p036B*
|
usb:v04F3p036B*
|
||||||
usb:v04F3p0C00*
|
usb:v04F3p0C00*
|
||||||
usb:v04F3p0C4B*
|
|
||||||
usb:v04F3p0C4C*
|
usb:v04F3p0C4C*
|
||||||
usb:v04F3p0C57*
|
usb:v04F3p0C57*
|
||||||
usb:v04F3p0C5E*
|
usb:v04F3p0C5E*
|
||||||
|
usb:v04F3p0C5A*
|
||||||
|
usb:v04F3p0C6C*
|
||||||
|
usb:v04F3p0C70*
|
||||||
|
usb:v04F3p0C72*
|
||||||
|
usb:v04F3p0C77*
|
||||||
usb:v04F3p2706*
|
usb:v04F3p2706*
|
||||||
|
usb:v04F3p3032*
|
||||||
|
usb:v04F3p3057*
|
||||||
|
usb:v04F3p3104*
|
||||||
|
usb:v04F3p310D*
|
||||||
|
usb:v04F3p3128*
|
||||||
usb:v06CBp0081*
|
usb:v06CBp0081*
|
||||||
usb:v06CBp0088*
|
usb:v06CBp0088*
|
||||||
usb:v06CBp008A*
|
usb:v06CBp008A*
|
||||||
@@ -277,6 +340,7 @@ usb:v06CBp00C9*
|
|||||||
usb:v06CBp00D8*
|
usb:v06CBp00D8*
|
||||||
usb:v06CBp00DA*
|
usb:v06CBp00DA*
|
||||||
usb:v06CBp00DC*
|
usb:v06CBp00DC*
|
||||||
|
usb:v06CBp00E4*
|
||||||
usb:v06CBp00E7*
|
usb:v06CBp00E7*
|
||||||
usb:v06CBp00E9*
|
usb:v06CBp00E9*
|
||||||
usb:v06CBp00FD*
|
usb:v06CBp00FD*
|
||||||
@@ -292,6 +356,8 @@ usb:v0A5Cp5845*
|
|||||||
usb:v0BDAp5812*
|
usb:v0BDAp5812*
|
||||||
usb:v10A5p0007*
|
usb:v10A5p0007*
|
||||||
usb:v10A5p9200*
|
usb:v10A5p9200*
|
||||||
|
usb:v10A5p9800*
|
||||||
|
usb:v10A5pE340*
|
||||||
usb:v1188p9545*
|
usb:v1188p9545*
|
||||||
usb:v138Ap0007*
|
usb:v138Ap0007*
|
||||||
usb:v138Ap003A*
|
usb:v138Ap003A*
|
||||||
@@ -304,33 +370,45 @@ usb:v138Ap0094*
|
|||||||
usb:v138Ap0097*
|
usb:v138Ap0097*
|
||||||
usb:v138Ap009D*
|
usb:v138Ap009D*
|
||||||
usb:v138Ap00AB*
|
usb:v138Ap00AB*
|
||||||
|
usb:v138Ap00A6*
|
||||||
usb:v147Ep1002*
|
usb:v147Ep1002*
|
||||||
usb:v1491p0088*
|
usb:v1491p0088*
|
||||||
usb:v16D1p1027*
|
usb:v16D1p1027*
|
||||||
usb:v1C7Ap0300*
|
usb:v1C7Ap0300*
|
||||||
usb:v1C7Ap0575*
|
usb:v1C7Ap0575*
|
||||||
usb:v1C7Ap0576*
|
usb:v1C7Ap0576*
|
||||||
|
usb:v1C7Ap0577*
|
||||||
usb:v27C6p5042*
|
usb:v27C6p5042*
|
||||||
usb:v27C6p5110*
|
usb:v27C6p5110*
|
||||||
usb:v27C6p5117*
|
usb:v27C6p5117*
|
||||||
|
usb:v27C6p5120*
|
||||||
|
usb:v27C6p5125*
|
||||||
usb:v27C6p5201*
|
usb:v27C6p5201*
|
||||||
usb:v27C6p521D*
|
usb:v27C6p521D*
|
||||||
usb:v27C6p5301*
|
usb:v27C6p5301*
|
||||||
usb:v27C6p530C*
|
usb:v27C6p530C*
|
||||||
usb:v27C6p532D*
|
usb:v27C6p532D*
|
||||||
|
usb:v27C6p5335*
|
||||||
usb:v27C6p533C*
|
usb:v27C6p533C*
|
||||||
usb:v27C6p5381*
|
usb:v27C6p5381*
|
||||||
usb:v27C6p5385*
|
usb:v27C6p5385*
|
||||||
usb:v27C6p538C*
|
usb:v27C6p538C*
|
||||||
usb:v27C6p538D*
|
usb:v27C6p538D*
|
||||||
usb:v27C6p5395*
|
usb:v27C6p5395*
|
||||||
|
usb:v27C6p5503*
|
||||||
|
usb:v27C6p550A*
|
||||||
|
usb:v27C6p550C*
|
||||||
usb:v27C6p5584*
|
usb:v27C6p5584*
|
||||||
usb:v27C6p55A2*
|
usb:v27C6p55A2*
|
||||||
usb:v27C6p55A4*
|
usb:v27C6p55A4*
|
||||||
usb:v27C6p55B4*
|
usb:v27C6p55B4*
|
||||||
usb:v27C6p5740*
|
usb:v27C6p5740*
|
||||||
usb:v27C6p5E0A*
|
usb:v27C6p5E0A*
|
||||||
|
usb:v27C6p581A*
|
||||||
|
usb:v27C6p589A*
|
||||||
|
usb:v27C6p6382*
|
||||||
usb:v2808p9338*
|
usb:v2808p9338*
|
||||||
|
usb:v2808p93A9*
|
||||||
usb:v298Dp2020*
|
usb:v298Dp2020*
|
||||||
usb:v298Dp2033*
|
usb:v298Dp2033*
|
||||||
usb:v3538p0930*
|
usb:v3538p0930*
|
||||||
|
|||||||
Vendored
+10
@@ -0,0 +1,10 @@
|
|||||||
|
The libfprint-2-2 postinst script calls udevadmin trigger for all the supported
|
||||||
|
USB readers. The list of readers used in that file is generated using the gbp
|
||||||
|
import hook when `gbp import-orig` (via --uscan or with a tarball) is used.
|
||||||
|
|
||||||
|
Alternatively it can be called manually by using:
|
||||||
|
|
||||||
|
GBP_SOURCES_DIR=. debian/update-udev-triggers.sh
|
||||||
|
|
||||||
|
When preparing a new upstream release, this script should be called against the
|
||||||
|
upstream provided .hwdb file.
|
||||||
Vendored
+14
@@ -0,0 +1,14 @@
|
|||||||
|
### libfprint-TOD - libfprint for Touch OEM Drivers
|
||||||
|
|
||||||
|
This is a light fork of libfprint to expose internal Drivers API in order to
|
||||||
|
create drivers as shared libraries.
|
||||||
|
|
||||||
|
Fork is hosted at: https://gitlab.freedesktop.org/3v1n0/libfprint/tree/tod
|
||||||
|
|
||||||
|
Packaging for this is handled via gbp, so you need to make sure that you have
|
||||||
|
added the remote:
|
||||||
|
|
||||||
|
git remote add origin-tod https://gitlab.freedesktop.org/3v1n0/libfprint.git
|
||||||
|
git fetch origin-tod --tags
|
||||||
|
|
||||||
|
To get the latest tod release, just use `gbp import-orig --uscan`.
|
||||||
Vendored
+1012
File diff suppressed because it is too large
Load Diff
Vendored
+203
@@ -0,0 +1,203 @@
|
|||||||
|
Source: libfprint
|
||||||
|
Priority: optional
|
||||||
|
Section: libs
|
||||||
|
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
|
||||||
|
XSBC-Original-Maintainer: FingerForce Team <fingerforce-devel@lists.alioth.debian.org>
|
||||||
|
Uploaders: Marco Trevisan <marco@ubuntu.com>
|
||||||
|
Build-Depends: debhelper-compat (= 13),
|
||||||
|
gir1.2-gobject-2.0-dev <!nogir>,
|
||||||
|
gir1.2-gio-2.0-dev <!nogir>,
|
||||||
|
gobject-introspection,
|
||||||
|
gtk-doc-tools,
|
||||||
|
libcairo-dev <!nocheck>,
|
||||||
|
libgirepository1.0-dev,
|
||||||
|
libglib2.0-dev,
|
||||||
|
libgudev-1.0-dev,
|
||||||
|
libgusb-dev,
|
||||||
|
libnss3-dev,
|
||||||
|
libpixman-1-dev,
|
||||||
|
meson,
|
||||||
|
python3 <!nocheck>,
|
||||||
|
python3-cairo <!nocheck>,
|
||||||
|
python3-gi <!nocheck>,
|
||||||
|
systemd-dev,
|
||||||
|
umockdev <!nocheck>
|
||||||
|
Build-Depends-Indep: libglib2.0-doc <!nodoc>, libgusb-doc <!nodoc>
|
||||||
|
Standards-Version: 4.6.2
|
||||||
|
Homepage: https://www.freedesktop.org/wiki/Software/fprint/libfprint
|
||||||
|
Vcs-Browser: https://salsa.debian.org/ubuntu-dev-team/libfprint/tree/noble
|
||||||
|
Vcs-Git: https://salsa.debian.org/ubuntu-dev-team/libfprint.git -b noble
|
||||||
|
|
||||||
|
Package: libfprint-2-2
|
||||||
|
Architecture: any
|
||||||
|
Depends: ${misc:Depends}, ${shlibs:Depends}
|
||||||
|
Pre-Depends: ${misc:Pre-Depends}
|
||||||
|
Description: async fingerprint library of fprint project, shared libraries
|
||||||
|
The fprint project aims to support for consumer fingerprint reader devices.
|
||||||
|
.
|
||||||
|
Previously, Linux support for such devices has been scattered amongst different
|
||||||
|
projects (many incomplete) and inconsistent in that application developers
|
||||||
|
would have to implement support for each type of fingerprint reader separately.
|
||||||
|
The idea is to change that by providing a central system to support all the
|
||||||
|
fingerprint readers as it's possible to get hands on.
|
||||||
|
.
|
||||||
|
libfprint is the centre of efforts, this component does the dirty job of
|
||||||
|
talking to fingerprint reading devices, and processing fingerprint data.
|
||||||
|
.
|
||||||
|
This library depends on the new libusb, which performs asynchronous callbacks,
|
||||||
|
allowing fprint to perform non-blocking device tasks.
|
||||||
|
.
|
||||||
|
This package provides shared libraries.
|
||||||
|
|
||||||
|
Package: libfprint-2-dev
|
||||||
|
Section: libdevel
|
||||||
|
Architecture: any
|
||||||
|
Multi-Arch: same
|
||||||
|
Depends: gir1.2-fprint-2.0 (= ${binary:Version}),
|
||||||
|
libfprint-2-2 (= ${binary:Version}),
|
||||||
|
${misc:Depends},
|
||||||
|
${gir:Depends},
|
||||||
|
Provides: ${gir:Provides},
|
||||||
|
Suggests: libfprint-2-doc
|
||||||
|
Description: async fingerprint library of fprint project, development headers
|
||||||
|
The fprint project aims to support for consumer fingerprint reader devices.
|
||||||
|
.
|
||||||
|
Previously, Linux support for such devices has been scattered amongst different
|
||||||
|
projects (many incomplete) and inconsistent in that application developers
|
||||||
|
would have to implement support for each type of fingerprint reader separately.
|
||||||
|
The idea is to change that by providing a central system to support all the
|
||||||
|
fingerprint readers as it's possible to get hands on.
|
||||||
|
.
|
||||||
|
libfprint is the centre of efforts, this component does the dirty job of
|
||||||
|
talking to fingerprint reading devices, and processing fingerprint data.
|
||||||
|
.
|
||||||
|
This library depends on the new libusb, which performs asynchronous callbacks,
|
||||||
|
allowing fprint to perform non-blocking device tasks.
|
||||||
|
.
|
||||||
|
This package provides development headers.
|
||||||
|
|
||||||
|
Package: libfprint-2-doc
|
||||||
|
Section: doc
|
||||||
|
Architecture: all
|
||||||
|
Multi-Arch: foreign
|
||||||
|
Depends: ${misc:Depends}
|
||||||
|
Description: async fingerprint library of fprint project, API documentation
|
||||||
|
The fprint project aims to support for consumer fingerprint reader devices.
|
||||||
|
.
|
||||||
|
Previously, Linux support for such devices has been scattered amongst different
|
||||||
|
projects (many incomplete) and inconsistent in that application developers
|
||||||
|
would have to implement support for each type of fingerprint reader separately.
|
||||||
|
The idea is to change that by providing a central system to support all the
|
||||||
|
fingerprint readers as it's possible to get hands on.
|
||||||
|
.
|
||||||
|
libfprint is the centre of efforts, this component does the dirty job of
|
||||||
|
talking to fingerprint reading devices, and processing fingerprint data.
|
||||||
|
.
|
||||||
|
This library depends on the new libusb, which performs asynchronous callbacks,
|
||||||
|
allowing fprint to perform non-blocking device tasks.
|
||||||
|
.
|
||||||
|
This package provides the API documentation.
|
||||||
|
|
||||||
|
Package: gir1.2-fprint-2.0
|
||||||
|
Architecture: any
|
||||||
|
Multi-Arch: same
|
||||||
|
Section: introspection
|
||||||
|
Depends: ${gir:Depends}, ${misc:Depends}, ${shlibs:Depends}
|
||||||
|
Pre-Depends: ${misc:Pre-Depends}
|
||||||
|
Description: async fingerprint library of fprint project, gir bindings
|
||||||
|
The fprint project aims to support for consumer fingerprint reader devices.
|
||||||
|
.
|
||||||
|
Previously, Linux support for such devices has been scattered amongst different
|
||||||
|
projects (many incomplete) and inconsistent in that application developers
|
||||||
|
would have to implement support for each type of fingerprint reader separately.
|
||||||
|
The idea is to change that by providing a central system to support all the
|
||||||
|
fingerprint readers as it's possible to get hands on.
|
||||||
|
.
|
||||||
|
libfprint is the centre of efforts, this component does the dirty job of
|
||||||
|
talking to fingerprint reading devices, and processing fingerprint data.
|
||||||
|
.
|
||||||
|
This library depends on the new libusb, which performs asynchronous callbacks,
|
||||||
|
allowing fprint to perform non-blocking device tasks.
|
||||||
|
.
|
||||||
|
This package can be used by other packages using the GIRepository format to
|
||||||
|
generate dynamic bindings.
|
||||||
|
|
||||||
|
Package: libfprint-2-tod1
|
||||||
|
Architecture: any
|
||||||
|
Multi-Arch: same
|
||||||
|
Depends: ${misc:Depends}, ${shlibs:Depends}
|
||||||
|
Pre-Depends: ${misc:Pre-Depends}
|
||||||
|
Description: async fingerprint library of fprint project, drivers shared libraries
|
||||||
|
The fprint project aims to support for consumer fingerprint reader devices.
|
||||||
|
.
|
||||||
|
Previously, Linux support for such devices has been scattered amongst different
|
||||||
|
projects (many incomplete) and inconsistent in that application developers
|
||||||
|
would have to implement support for each type of fingerprint reader separately.
|
||||||
|
The idea is to change that by providing a central system to support all the
|
||||||
|
fingerprint readers as it's possible to get hands on.
|
||||||
|
.
|
||||||
|
libfprint is the centre of efforts, this component does the dirty job of
|
||||||
|
talking to fingerprint reading devices, and processing fingerprint data.
|
||||||
|
.
|
||||||
|
This library depends on the new libusb, which performs asynchronous callbacks,
|
||||||
|
allowing fprint to perform non-blocking device tasks.
|
||||||
|
.
|
||||||
|
This package provides shared libraries for the TOD drivers.
|
||||||
|
|
||||||
|
Package: libfprint-2-tod-dev
|
||||||
|
Section: libdevel
|
||||||
|
Architecture: any
|
||||||
|
Multi-Arch: same
|
||||||
|
Depends: libfprint-2-tod1 (= ${binary:Version}),
|
||||||
|
libfprint-2-dev (= ${binary:Version}),
|
||||||
|
libglib2.0-dev (>= 2.56),
|
||||||
|
libgudev-1.0-dev,
|
||||||
|
libgusb-dev (>= 0.2.0),
|
||||||
|
libpixman-1-dev,
|
||||||
|
libnss3-dev,
|
||||||
|
${misc:Depends}
|
||||||
|
Description: async fingerprint library of fprint project, drivers development headers
|
||||||
|
The fprint project aims to support for consumer fingerprint reader devices.
|
||||||
|
.
|
||||||
|
Previously, Linux support for such devices has been scattered amongst different
|
||||||
|
projects (many incomplete) and inconsistent in that application developers
|
||||||
|
would have to implement support for each type of fingerprint reader separately.
|
||||||
|
The idea is to change that by providing a central system to support all the
|
||||||
|
fingerprint readers as it's possible to get hands on.
|
||||||
|
.
|
||||||
|
libfprint is the centre of efforts, this component does the dirty job of
|
||||||
|
talking to fingerprint reading devices, and processing fingerprint data.
|
||||||
|
.
|
||||||
|
This library depends on the new libusb, which performs asynchronous callbacks,
|
||||||
|
allowing fprint to perform non-blocking device tasks.
|
||||||
|
.
|
||||||
|
This package provides development headers for creating device drivers.
|
||||||
|
An example driver is available at:
|
||||||
|
https://gitlab.freedesktop.org/3v1n0/libfprint-tod-example-driver
|
||||||
|
|
||||||
|
Package: libfprint-2-tests
|
||||||
|
Architecture: any
|
||||||
|
Depends: gir1.2-fprint-2.0 (= ${binary:Version}),
|
||||||
|
libfprint-2-2 (= ${binary:Version}),
|
||||||
|
python3,
|
||||||
|
python3-cairo,
|
||||||
|
python3-gi,
|
||||||
|
umockdev,
|
||||||
|
${misc:Depends}, ${shlibs:Depends}
|
||||||
|
Description: Tests for async fingerprint library of fprint project
|
||||||
|
The fprint project aims to support for consumer fingerprint reader devices.
|
||||||
|
.
|
||||||
|
Previously, Linux support for such devices has been scattered amongst different
|
||||||
|
projects (many incomplete) and inconsistent in that application developers
|
||||||
|
would have to implement support for each type of fingerprint reader separately.
|
||||||
|
The idea is to change that by providing a central system to support all the
|
||||||
|
fingerprint readers as it's possible to get hands on.
|
||||||
|
.
|
||||||
|
libfprint is the centre of efforts, this component does the dirty job of
|
||||||
|
talking to fingerprint reading devices, and processing fingerprint data.
|
||||||
|
.
|
||||||
|
This library depends on the new libusb, which performs asynchronous callbacks,
|
||||||
|
allowing fprint to perform non-blocking device tasks.
|
||||||
|
.
|
||||||
|
This package contains test programs, designed to be run as part of a
|
||||||
|
regression testsuite.
|
||||||
Vendored
+45
@@ -0,0 +1,45 @@
|
|||||||
|
This package was debianized by Ulises Vitulli <uvitulli@fi.uba.ar> on
|
||||||
|
Fri, 19 Sep 2008 05:14:30 -0300.
|
||||||
|
|
||||||
|
It was downloaded from <http://reactivated.net/fprint/wiki/Libfprint>
|
||||||
|
|
||||||
|
Upstream Authors, and Copyright:
|
||||||
|
|
||||||
|
Copyright © 2007 Daniel Drake <dsd@gentoo.org>
|
||||||
|
Copyright © 2006-2007 Timo Hoenig <thoenig@suse.de>
|
||||||
|
Copyright © 2006 Pavel Machek <pavel@suse.cz>
|
||||||
|
Copyright © 1999 Erik Walthinsen <omega@cse.ogi.edu>
|
||||||
|
Copyright © 2004,2006 Thomas Vander Stichele <thomas at apestaart dot org>
|
||||||
|
Copyright © 2007 Cyrille Bagard
|
||||||
|
Copyright © 2007 Vasily Khoruzhick
|
||||||
|
Copyright © 2007 Jan-Michael Brummer <buzz2@gmx.de>
|
||||||
|
Copyright © 2007 Anthony Bretaudeau <wxcover@users.sourceforge.net>
|
||||||
|
|
||||||
|
|
||||||
|
License:
|
||||||
|
This library is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU Lesser General Public
|
||||||
|
License as published by the Free Software Foundation; either
|
||||||
|
version 2.1 of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
This library is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
Lesser General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU Lesser General Public
|
||||||
|
License along with this library; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
|
The files under libfprint/nbis directory has this license:
|
||||||
|
|
||||||
|
This software was developed at the National Institute of Standards and
|
||||||
|
Technology (NIST) by employees of the Federal Government in the course
|
||||||
|
of their official duties. Pursuant to title 17 Section 105 of the
|
||||||
|
United States Code, this software is not subject to copyright protection
|
||||||
|
and is in the public domain. NIST assumes no responsibility whatsoever for
|
||||||
|
its use by other parties, and makes no guarantees, expressed or implied,
|
||||||
|
about its quality, reliability, or any other characteristic.
|
||||||
|
|
||||||
|
The Debian packaging is © 2008, Ulises Vitulli <uvitulli@fi.uba.ar> and is
|
||||||
|
licensed under the LGPL v2.1, see `/usr/share/common-licenses/LGPL-2.1'.
|
||||||
Vendored
+2
@@ -0,0 +1,2 @@
|
|||||||
|
NEWS
|
||||||
|
README.md
|
||||||
+8
@@ -0,0 +1,8 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
set -e
|
||||||
|
|
||||||
|
dch -v"$GBP_DEBIAN_VERSION" "New upstream release"
|
||||||
|
git add debian/changelog
|
||||||
|
debcommit
|
||||||
|
|
||||||
|
debian/update-udev-triggers.sh
|
||||||
Vendored
+19
@@ -0,0 +1,19 @@
|
|||||||
|
[DEFAULT]
|
||||||
|
pristine-tar = True
|
||||||
|
debian-branch = noble
|
||||||
|
upstream-vcs-tag = v%(version)s
|
||||||
|
upstream-branch = upstream-tod
|
||||||
|
debian-tag=ubuntu/%(version)s
|
||||||
|
|
||||||
|
[buildpackage]
|
||||||
|
sign-tags = True
|
||||||
|
|
||||||
|
[dch]
|
||||||
|
multimaint-merge = True
|
||||||
|
|
||||||
|
[import-orig]
|
||||||
|
postimport = debian/gbp-post-import-hook.sh
|
||||||
|
|
||||||
|
[pq]
|
||||||
|
patch-numbers = False
|
||||||
|
|
||||||
Vendored
+1
@@ -0,0 +1 @@
|
|||||||
|
usr/lib/${DEB_HOST_MULTIARCH}/girepository-1.0/FPrint-*.typelib
|
||||||
Vendored
+3
@@ -0,0 +1,3 @@
|
|||||||
|
usr/lib/udev/hwdb.d/
|
||||||
|
usr/lib/udev/rules.d/
|
||||||
|
usr/lib/${DEB_HOST_MULTIARCH}/libfprint-[0-9].so.*
|
||||||
+3
@@ -0,0 +1,3 @@
|
|||||||
|
# For security reasons, we don't want the fingerprint readers to be accessible
|
||||||
|
# by unprivileged users
|
||||||
|
udev-rule-missing-uaccess
|
||||||
Vendored
+315
@@ -0,0 +1,315 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
#DEBHELPER#
|
||||||
|
|
||||||
|
if [ "$1" = "configure" -o "$1" = "upgrade" ] && command -V udevadm >/dev/null 2>&1; then
|
||||||
|
# apply hwdb rules at package installation, see
|
||||||
|
# <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=683863#27>
|
||||||
|
# NOTA BENE: after the DEBHELPER section since dh_installudev
|
||||||
|
# adds stuff there
|
||||||
|
# The devices ID list is auto-generated using the gbp postimport hook
|
||||||
|
# see debian/README.sources for more details.
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=08ff --attr-match=idProduct=1600 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=08ff --attr-match=idProduct=1660 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=08ff --attr-match=idProduct=1680 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=08ff --attr-match=idProduct=1681 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=08ff --attr-match=idProduct=1682 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=08ff --attr-match=idProduct=1683 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=08ff --attr-match=idProduct=1684 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=08ff --attr-match=idProduct=1685 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=08ff --attr-match=idProduct=1686 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=08ff --attr-match=idProduct=1687 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=08ff --attr-match=idProduct=1688 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=08ff --attr-match=idProduct=1689 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=08ff --attr-match=idProduct=168a || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=08ff --attr-match=idProduct=168b || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=08ff --attr-match=idProduct=168c || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=08ff --attr-match=idProduct=168d || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=08ff --attr-match=idProduct=168e || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=08ff --attr-match=idProduct=168f || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=08ff --attr-match=idProduct=2500 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=08ff --attr-match=idProduct=2580 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=08ff --attr-match=idProduct=2550 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=08ff --attr-match=idProduct=2810 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=08ff --attr-match=idProduct=2660 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=08ff --attr-match=idProduct=2680 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=08ff --attr-match=idProduct=2681 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=08ff --attr-match=idProduct=2682 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=08ff --attr-match=idProduct=2683 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=08ff --attr-match=idProduct=2684 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=08ff --attr-match=idProduct=2685 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=08ff --attr-match=idProduct=2686 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=08ff --attr-match=idProduct=2687 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=08ff --attr-match=idProduct=2688 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=08ff --attr-match=idProduct=2689 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=08ff --attr-match=idProduct=268a || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=08ff --attr-match=idProduct=268b || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=08ff --attr-match=idProduct=268c || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=08ff --attr-match=idProduct=268d || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=08ff --attr-match=idProduct=268e || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=08ff --attr-match=idProduct=268f || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=08ff --attr-match=idProduct=2691 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=08ff --attr-match=idProduct=5731 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=08ff --attr-match=idProduct=5501 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=1c7a --attr-match=idProduct=0570 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=1c7a --attr-match=idProduct=0571 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=1c7a --attr-match=idProduct=0582 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=1c7a --attr-match=idProduct=05a1 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=0903 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=0907 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=0c01 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=0c02 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=0c03 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=0c04 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=0c05 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=0c06 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=0c07 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=0c08 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=0c09 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=0c0a || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=0c0b || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=0c0c || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=0c0d || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=0c0e || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=0c0f || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=0c10 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=0c11 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=0c12 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=0c13 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=0c14 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=0c15 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=0c16 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=0c17 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=0c18 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=0c19 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=0c1a || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=0c1b || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=0c1c || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=0c1d || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=0c1e || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=0c1f || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=0c20 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=0c21 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=0c22 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=0c23 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=0c24 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=0c25 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=0c26 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=0c27 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=0c28 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=0c29 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=0c2a || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=0c2b || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=0c2c || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=0c2d || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=0c2e || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=0c2f || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=0c30 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=0c31 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=0c32 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=0c33 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=0c3d || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=0c42 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=0c4b || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=0c4d || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=0c4f || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=0c63 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=0c6e || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=0c58 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=0c7d || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=0c7e || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=0c82 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=0c88 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=0c8c || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=0c8d || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=0c99 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=1c7a --attr-match=idProduct=0603 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=2808 --attr-match=idProduct=9e48 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=2808 --attr-match=idProduct=d979 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=2808 --attr-match=idProduct=a959 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=10a5 --attr-match=idProduct=ffe0 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=10a5 --attr-match=idProduct=a305 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=10a5 --attr-match=idProduct=da04 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=10a5 --attr-match=idProduct=d805 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=10a5 --attr-match=idProduct=d205 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=27c6 --attr-match=idProduct=5840 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=27c6 --attr-match=idProduct=6014 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=27c6 --attr-match=idProduct=6092 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=27c6 --attr-match=idProduct=6094 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=27c6 --attr-match=idProduct=609c || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=27c6 --attr-match=idProduct=60a2 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=27c6 --attr-match=idProduct=60a4 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=27c6 --attr-match=idProduct=60bc || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=27c6 --attr-match=idProduct=6304 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=27c6 --attr-match=idProduct=631c || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=27c6 --attr-match=idProduct=633c || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=27c6 --attr-match=idProduct=634c || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=27c6 --attr-match=idProduct=6384 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=27c6 --attr-match=idProduct=639c || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=27c6 --attr-match=idProduct=63ac || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=27c6 --attr-match=idProduct=63bc || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=27c6 --attr-match=idProduct=63cc || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=27c6 --attr-match=idProduct=6496 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=27c6 --attr-match=idProduct=6582 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=27c6 --attr-match=idProduct=6584 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=27c6 --attr-match=idProduct=658c || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=27c6 --attr-match=idProduct=6592 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=27c6 --attr-match=idProduct=6594 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=27c6 --attr-match=idProduct=659a || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=27c6 --attr-match=idProduct=659c || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=27c6 --attr-match=idProduct=6a94 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=298d --attr-match=idProduct=1010 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=0bda --attr-match=idProduct=5813 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=06cb --attr-match=idProduct=00bd || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=06cb --attr-match=idProduct=00df || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=06cb --attr-match=idProduct=00f9 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=06cb --attr-match=idProduct=00fc || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=06cb --attr-match=idProduct=00c2 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=06cb --attr-match=idProduct=0100 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=06cb --attr-match=idProduct=00f0 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=06cb --attr-match=idProduct=0103 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=06cb --attr-match=idProduct=0123 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=06cb --attr-match=idProduct=0124 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=06cb --attr-match=idProduct=0126 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=06cb --attr-match=idProduct=0129 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=06cb --attr-match=idProduct=0168 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=06cb --attr-match=idProduct=015f || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=06cb --attr-match=idProduct=0104 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=06cb --attr-match=idProduct=0173 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=06cb --attr-match=idProduct=0106 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=147e --attr-match=idProduct=2016 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=147e --attr-match=idProduct=1000 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=147e --attr-match=idProduct=1001 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=0483 --attr-match=idProduct=2015 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=0483 --attr-match=idProduct=2017 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=147e --attr-match=idProduct=3001 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=147e --attr-match=idProduct=2020 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=045e --attr-match=idProduct=00bc || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=045e --attr-match=idProduct=00bd || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=045e --attr-match=idProduct=00ca || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=05ba --attr-match=idProduct=0007 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=05ba --attr-match=idProduct=0008 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=05ba --attr-match=idProduct=000a || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=061a --attr-match=idProduct=0110 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=138a --attr-match=idProduct=0050 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=138a --attr-match=idProduct=0001 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=138a --attr-match=idProduct=0005 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=138a --attr-match=idProduct=0008 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=138a --attr-match=idProduct=0010 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=138a --attr-match=idProduct=0011 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=138a --attr-match=idProduct=0015 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=138a --attr-match=idProduct=0017 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=138a --attr-match=idProduct=0018 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=138a --attr-match=idProduct=0091 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=047d --attr-match=idProduct=00f2 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=04e8 --attr-match=idProduct=730b || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=036b || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=0c00 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=0c4c || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=0c57 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=0c5e || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=0c5a || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=0c6c || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=0c70 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=0c72 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=0c77 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=2706 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=3032 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=3057 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=3104 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=310d || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=04f3 --attr-match=idProduct=3128 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=06cb --attr-match=idProduct=0081 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=06cb --attr-match=idProduct=0088 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=06cb --attr-match=idProduct=008a || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=06cb --attr-match=idProduct=009a || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=06cb --attr-match=idProduct=009b || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=06cb --attr-match=idProduct=00a2 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=06cb --attr-match=idProduct=00a8 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=06cb --attr-match=idProduct=00b7 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=06cb --attr-match=idProduct=00bb || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=06cb --attr-match=idProduct=00be || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=06cb --attr-match=idProduct=00c4 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=06cb --attr-match=idProduct=00cb || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=06cb --attr-match=idProduct=00c9 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=06cb --attr-match=idProduct=00d8 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=06cb --attr-match=idProduct=00da || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=06cb --attr-match=idProduct=00dc || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=06cb --attr-match=idProduct=00e4 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=06cb --attr-match=idProduct=00e7 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=06cb --attr-match=idProduct=00e9 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=06cb --attr-match=idProduct=00fd || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=0a5c --attr-match=idProduct=5801 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=0a5c --attr-match=idProduct=5805 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=0a5c --attr-match=idProduct=5834 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=0a5c --attr-match=idProduct=5840 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=0a5c --attr-match=idProduct=5841 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=0a5c --attr-match=idProduct=5842 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=0a5c --attr-match=idProduct=5843 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=0a5c --attr-match=idProduct=5844 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=0a5c --attr-match=idProduct=5845 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=0bda --attr-match=idProduct=5812 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=10a5 --attr-match=idProduct=0007 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=10a5 --attr-match=idProduct=9200 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=10a5 --attr-match=idProduct=9800 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=10a5 --attr-match=idProduct=e340 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=1188 --attr-match=idProduct=9545 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=138a --attr-match=idProduct=0007 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=138a --attr-match=idProduct=003a || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=138a --attr-match=idProduct=003c || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=138a --attr-match=idProduct=003d || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=138a --attr-match=idProduct=003f || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=138a --attr-match=idProduct=0090 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=138a --attr-match=idProduct=0092 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=138a --attr-match=idProduct=0094 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=138a --attr-match=idProduct=0097 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=138a --attr-match=idProduct=009d || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=138a --attr-match=idProduct=00ab || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=138a --attr-match=idProduct=00a6 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=147e --attr-match=idProduct=1002 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=1491 --attr-match=idProduct=0088 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=16d1 --attr-match=idProduct=1027 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=1c7a --attr-match=idProduct=0300 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=1c7a --attr-match=idProduct=0575 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=1c7a --attr-match=idProduct=0576 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=1c7a --attr-match=idProduct=0577 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=27c6 --attr-match=idProduct=5042 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=27c6 --attr-match=idProduct=5110 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=27c6 --attr-match=idProduct=5117 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=27c6 --attr-match=idProduct=5120 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=27c6 --attr-match=idProduct=5125 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=27c6 --attr-match=idProduct=5201 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=27c6 --attr-match=idProduct=521d || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=27c6 --attr-match=idProduct=5301 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=27c6 --attr-match=idProduct=530c || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=27c6 --attr-match=idProduct=532d || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=27c6 --attr-match=idProduct=5335 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=27c6 --attr-match=idProduct=533c || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=27c6 --attr-match=idProduct=5381 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=27c6 --attr-match=idProduct=5385 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=27c6 --attr-match=idProduct=538c || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=27c6 --attr-match=idProduct=538d || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=27c6 --attr-match=idProduct=5395 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=27c6 --attr-match=idProduct=5503 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=27c6 --attr-match=idProduct=550a || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=27c6 --attr-match=idProduct=550c || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=27c6 --attr-match=idProduct=5584 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=27c6 --attr-match=idProduct=55a2 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=27c6 --attr-match=idProduct=55a4 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=27c6 --attr-match=idProduct=55b4 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=27c6 --attr-match=idProduct=5740 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=27c6 --attr-match=idProduct=5e0a || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=27c6 --attr-match=idProduct=581a || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=27c6 --attr-match=idProduct=589a || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=27c6 --attr-match=idProduct=6382 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=2808 --attr-match=idProduct=9338 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=2808 --attr-match=idProduct=93a9 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=298d --attr-match=idProduct=2020 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=298d --attr-match=idProduct=2033 || true
|
||||||
|
udevadm trigger --action=add --attr-match=idVendor=3538 --attr-match=idProduct=0930 || true
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
exit 0
|
||||||
Vendored
+17
@@ -0,0 +1,17 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
#DEBHELPER#
|
||||||
|
|
||||||
|
if [ "$1" = "configure" -o "$1" = "upgrade" ] && command -V udevadm >/dev/null 2>&1; then
|
||||||
|
# apply hwdb rules at package installation, see
|
||||||
|
# <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=683863#27>
|
||||||
|
# NOTA BENE: after the DEBHELPER section since dh_installudev
|
||||||
|
# adds stuff there
|
||||||
|
# The devices ID list is auto-generated using the gbp postimport hook
|
||||||
|
# see debian/README.sources for more details.
|
||||||
|
@UDEVADM_TRIGGERS@
|
||||||
|
fi
|
||||||
|
|
||||||
|
exit 0
|
||||||
Vendored
+94
@@ -0,0 +1,94 @@
|
|||||||
|
libfprint-2.so.2 libfprint-2-2 #MINVER#
|
||||||
|
* Build-Depends-Package: libfprint-2-dev
|
||||||
|
LIBFPRINT_2.0.0@LIBFPRINT_2.0.0 1:1.90.1
|
||||||
|
fp_context_enumerate@LIBFPRINT_2.0.0 1:1.90.1
|
||||||
|
fp_context_get_devices@LIBFPRINT_2.0.0 1:1.90.1
|
||||||
|
fp_context_get_type@LIBFPRINT_2.0.0 1:1.90.1
|
||||||
|
fp_context_new@LIBFPRINT_2.0.0 1:1.90.1
|
||||||
|
fp_device_capture@LIBFPRINT_2.0.0 1:1.90.1
|
||||||
|
fp_device_capture_finish@LIBFPRINT_2.0.0 1:1.90.1
|
||||||
|
fp_device_capture_sync@LIBFPRINT_2.0.0 1:1.90.1
|
||||||
|
fp_device_clear_storage@LIBFPRINT_2.0.0 1:1.94.1
|
||||||
|
fp_device_clear_storage_finish@LIBFPRINT_2.0.0 1:1.94.1
|
||||||
|
fp_device_clear_storage_sync@LIBFPRINT_2.0.0 1:1.94.1
|
||||||
|
fp_device_close@LIBFPRINT_2.0.0 1:1.90.1
|
||||||
|
fp_device_close_finish@LIBFPRINT_2.0.0 1:1.90.1
|
||||||
|
fp_device_close_sync@LIBFPRINT_2.0.0 1:1.90.1
|
||||||
|
fp_device_delete_print@LIBFPRINT_2.0.0 1:1.90.1
|
||||||
|
fp_device_delete_print_finish@LIBFPRINT_2.0.0 1:1.90.1
|
||||||
|
fp_device_delete_print_sync@LIBFPRINT_2.0.0 1:1.90.1
|
||||||
|
fp_device_enroll@LIBFPRINT_2.0.0 1:1.90.1
|
||||||
|
fp_device_enroll_finish@LIBFPRINT_2.0.0 1:1.90.1
|
||||||
|
fp_device_enroll_sync@LIBFPRINT_2.0.0 1:1.90.1
|
||||||
|
fp_device_error_get_type@LIBFPRINT_2.0.0 1:1.90.1
|
||||||
|
fp_device_error_quark@LIBFPRINT_2.0.0 1:1.90.1
|
||||||
|
fp_device_feature_get_type@LIBFPRINT_2.0.0 1:1.94.1
|
||||||
|
fp_device_get_device_id@LIBFPRINT_2.0.0 1:1.90.1
|
||||||
|
fp_device_get_driver@LIBFPRINT_2.0.0 1:1.90.1
|
||||||
|
fp_device_get_features@LIBFPRINT_2.0.0 1:1.94.1
|
||||||
|
fp_device_get_finger_status@LIBFPRINT_2.0.0 1:1.90.4
|
||||||
|
fp_device_get_name@LIBFPRINT_2.0.0 1:1.90.1
|
||||||
|
fp_device_get_nr_enroll_stages@LIBFPRINT_2.0.0 1:1.90.1
|
||||||
|
fp_device_get_scan_type@LIBFPRINT_2.0.0 1:1.90.1
|
||||||
|
fp_device_get_temperature@LIBFPRINT_2.0.0 1:1.94.1
|
||||||
|
fp_device_get_type@LIBFPRINT_2.0.0 1:1.90.1
|
||||||
|
fp_device_has_feature@LIBFPRINT_2.0.0 1:1.94.1
|
||||||
|
fp_device_has_storage@LIBFPRINT_2.0.0 1:1.90.1
|
||||||
|
fp_device_identify@LIBFPRINT_2.0.0 1:1.90.1
|
||||||
|
fp_device_identify_finish@LIBFPRINT_2.0.0 1:1.90.1
|
||||||
|
fp_device_identify_sync@LIBFPRINT_2.0.0 1:1.90.1
|
||||||
|
fp_device_is_open@LIBFPRINT_2.0.0 1:1.90.1
|
||||||
|
fp_device_list_prints@LIBFPRINT_2.0.0 1:1.90.1
|
||||||
|
fp_device_list_prints_finish@LIBFPRINT_2.0.0 1:1.90.1
|
||||||
|
fp_device_list_prints_sync@LIBFPRINT_2.0.0 1:1.90.1
|
||||||
|
fp_device_open@LIBFPRINT_2.0.0 1:1.90.1
|
||||||
|
fp_device_open_finish@LIBFPRINT_2.0.0 1:1.90.1
|
||||||
|
fp_device_open_sync@LIBFPRINT_2.0.0 1:1.90.1
|
||||||
|
fp_device_resume@LIBFPRINT_2.0.0 1:1.94.1
|
||||||
|
fp_device_resume_finish@LIBFPRINT_2.0.0 1:1.94.1
|
||||||
|
fp_device_resume_sync@LIBFPRINT_2.0.0 1:1.94.1
|
||||||
|
fp_device_retry_get_type@LIBFPRINT_2.0.0 1:1.90.1
|
||||||
|
fp_device_retry_quark@LIBFPRINT_2.0.0 1:1.90.1
|
||||||
|
fp_device_supports_capture@LIBFPRINT_2.0.0 1:1.90.1
|
||||||
|
fp_device_supports_identify@LIBFPRINT_2.0.0 1:1.90.1
|
||||||
|
fp_device_suspend@LIBFPRINT_2.0.0 1:1.94.1
|
||||||
|
fp_device_suspend_finish@LIBFPRINT_2.0.0 1:1.94.1
|
||||||
|
fp_device_suspend_sync@LIBFPRINT_2.0.0 1:1.94.1
|
||||||
|
fp_device_type_get_type@LIBFPRINT_2.0.0 1:1.90.1
|
||||||
|
fp_device_verify@LIBFPRINT_2.0.0 1:1.90.1
|
||||||
|
fp_device_verify_finish@LIBFPRINT_2.0.0 1:1.90.1
|
||||||
|
fp_device_verify_sync@LIBFPRINT_2.0.0 1:1.90.1
|
||||||
|
fp_finger_get_type@LIBFPRINT_2.0.0 1:1.90.1
|
||||||
|
fp_finger_status_flags_get_type@LIBFPRINT_2.0.0 1:1.90.4
|
||||||
|
fp_image_detect_minutiae@LIBFPRINT_2.0.0 1:1.90.1
|
||||||
|
fp_image_detect_minutiae_finish@LIBFPRINT_2.0.0 1:1.90.1
|
||||||
|
fp_image_device_get_type@LIBFPRINT_2.0.0 1:1.90.1
|
||||||
|
fp_image_get_binarized@LIBFPRINT_2.0.0 1:1.90.1
|
||||||
|
fp_image_get_data@LIBFPRINT_2.0.0 1:1.90.1
|
||||||
|
fp_image_get_height@LIBFPRINT_2.0.0 1:1.90.1
|
||||||
|
fp_image_get_minutiae@LIBFPRINT_2.0.0 1:1.90.1
|
||||||
|
fp_image_get_ppmm@LIBFPRINT_2.0.0 1:1.90.1
|
||||||
|
fp_image_get_type@LIBFPRINT_2.0.0 1:1.90.1
|
||||||
|
fp_image_get_width@LIBFPRINT_2.0.0 1:1.90.1
|
||||||
|
fp_image_new@LIBFPRINT_2.0.0 1:1.90.1
|
||||||
|
fp_minutia_get_coords@LIBFPRINT_2.0.0 1:1.90.1
|
||||||
|
fp_print_compatible@LIBFPRINT_2.0.0 1:1.90.1
|
||||||
|
fp_print_deserialize@LIBFPRINT_2.0.0 1:1.90.1
|
||||||
|
fp_print_equal@LIBFPRINT_2.0.0 1:1.90.1
|
||||||
|
fp_print_get_description@LIBFPRINT_2.0.0 1:1.90.1
|
||||||
|
fp_print_get_device_id@LIBFPRINT_2.0.0 1:1.90.1
|
||||||
|
fp_print_get_device_stored@LIBFPRINT_2.0.0 1:1.90.1
|
||||||
|
fp_print_get_driver@LIBFPRINT_2.0.0 1:1.90.1
|
||||||
|
fp_print_get_enroll_date@LIBFPRINT_2.0.0 1:1.90.1
|
||||||
|
fp_print_get_finger@LIBFPRINT_2.0.0 1:1.90.1
|
||||||
|
fp_print_get_image@LIBFPRINT_2.0.0 1:1.90.1
|
||||||
|
fp_print_get_type@LIBFPRINT_2.0.0 1:1.90.1
|
||||||
|
fp_print_get_username@LIBFPRINT_2.0.0 1:1.90.1
|
||||||
|
fp_print_new@LIBFPRINT_2.0.0 1:1.90.1
|
||||||
|
fp_print_serialize@LIBFPRINT_2.0.0 1:1.90.1
|
||||||
|
fp_print_set_description@LIBFPRINT_2.0.0 1:1.90.1
|
||||||
|
fp_print_set_enroll_date@LIBFPRINT_2.0.0 1:1.90.1
|
||||||
|
fp_print_set_finger@LIBFPRINT_2.0.0 1:1.90.1
|
||||||
|
fp_print_set_username@LIBFPRINT_2.0.0 1:1.90.1
|
||||||
|
fp_scan_type_get_type@LIBFPRINT_2.0.0 1:1.90.1
|
||||||
|
fp_temperature_get_type@LIBFPRINT_2.0.0 1:1.94.1
|
||||||
Vendored
+4
@@ -0,0 +1,4 @@
|
|||||||
|
usr/include/libfprint-[0-9]/*.h
|
||||||
|
usr/lib/${DEB_HOST_MULTIARCH}/libfprint-[0-9].so
|
||||||
|
usr/lib/${DEB_HOST_MULTIARCH}/pkgconfig/libfprint-[0-9].pc
|
||||||
|
usr/share/gir-1.0/FPrint-*.gir
|
||||||
Vendored
+1
@@ -0,0 +1 @@
|
|||||||
|
usr/share/gtk-doc/*/libfprint-*
|
||||||
Vendored
+2
@@ -0,0 +1,2 @@
|
|||||||
|
usr/libexec/installed-tests/libfprint-[0-9]
|
||||||
|
usr/share/installed-tests/libfprint-[0-9]
|
||||||
Vendored
+3
@@ -0,0 +1,3 @@
|
|||||||
|
usr/include/libfprint-[0-9]/tod-[0-9]/*
|
||||||
|
usr/lib/${DEB_HOST_MULTIARCH}/libfprint-[0-9]-tod.so
|
||||||
|
usr/lib/${DEB_HOST_MULTIARCH}/pkgconfig/libfprint-[0-9]-tod-[0-9].pc
|
||||||
Vendored
+1
@@ -0,0 +1 @@
|
|||||||
|
usr/lib/${DEB_HOST_MULTIARCH}/libfprint-[0-9]-tod.so.*
|
||||||
Vendored
+239
@@ -0,0 +1,239 @@
|
|||||||
|
libfprint-2-tod.so.1 libfprint-2-tod1 #MINVER#
|
||||||
|
LIBFPRINT_TOD_1.0.0@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
LIBFPRINT_TOD_1_1.92@LIBFPRINT_TOD_1_1.92 1:1.94.1+tod1
|
||||||
|
LIBFPRINT_TOD_1_1.94@LIBFPRINT_TOD_1_1.94 1:1.94.1+tod1
|
||||||
|
fpi_assemble_frames@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_assemble_lines@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_byte_reader_dup_data@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_byte_reader_dup_string_utf16@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_byte_reader_dup_string_utf32@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_byte_reader_dup_string_utf8@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_byte_reader_free@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_byte_reader_get_data@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_byte_reader_get_float32_be@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_byte_reader_get_float32_le@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_byte_reader_get_float64_be@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_byte_reader_get_float64_le@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_byte_reader_get_int16_be@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_byte_reader_get_int16_le@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_byte_reader_get_int24_be@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_byte_reader_get_int24_le@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_byte_reader_get_int32_be@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_byte_reader_get_int32_le@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_byte_reader_get_int64_be@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_byte_reader_get_int64_le@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_byte_reader_get_int8@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_byte_reader_get_pos@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_byte_reader_get_remaining@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_byte_reader_get_size@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_byte_reader_get_string_utf8@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_byte_reader_get_sub_reader@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_byte_reader_get_uint16_be@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_byte_reader_get_uint16_le@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_byte_reader_get_uint24_be@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_byte_reader_get_uint24_le@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_byte_reader_get_uint32_be@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_byte_reader_get_uint32_le@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_byte_reader_get_uint64_be@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_byte_reader_get_uint64_le@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_byte_reader_get_uint8@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_byte_reader_init@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_byte_reader_masked_scan_uint32@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_byte_reader_masked_scan_uint32_peek@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_byte_reader_new@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_byte_reader_peek_data@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_byte_reader_peek_float32_be@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_byte_reader_peek_float32_le@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_byte_reader_peek_float64_be@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_byte_reader_peek_float64_le@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_byte_reader_peek_int16_be@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_byte_reader_peek_int16_le@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_byte_reader_peek_int24_be@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_byte_reader_peek_int24_le@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_byte_reader_peek_int32_be@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_byte_reader_peek_int32_le@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_byte_reader_peek_int64_be@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_byte_reader_peek_int64_le@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_byte_reader_peek_int8@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_byte_reader_peek_string_utf8@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_byte_reader_peek_sub_reader@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_byte_reader_peek_uint16_be@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_byte_reader_peek_uint16_le@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_byte_reader_peek_uint24_be@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_byte_reader_peek_uint24_le@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_byte_reader_peek_uint32_be@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_byte_reader_peek_uint32_le@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_byte_reader_peek_uint64_be@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_byte_reader_peek_uint64_le@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_byte_reader_peek_uint8@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_byte_reader_set_pos@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_byte_reader_skip@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_byte_reader_skip_string_utf16@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_byte_reader_skip_string_utf32@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_byte_reader_skip_string_utf8@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_byte_writer_ensure_free_space@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_byte_writer_fill@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_byte_writer_free@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_byte_writer_free_and_get_data@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_byte_writer_get_remaining@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_byte_writer_init@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_byte_writer_init_with_data@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_byte_writer_init_with_size@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_byte_writer_new@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_byte_writer_new_with_data@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_byte_writer_new_with_size@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_byte_writer_put_data@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_byte_writer_put_float32_be@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_byte_writer_put_float32_le@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_byte_writer_put_float64_be@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_byte_writer_put_float64_le@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_byte_writer_put_int16_be@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_byte_writer_put_int16_le@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_byte_writer_put_int24_be@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_byte_writer_put_int24_le@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_byte_writer_put_int32_be@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_byte_writer_put_int32_le@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_byte_writer_put_int64_be@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_byte_writer_put_int64_le@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_byte_writer_put_int8@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_byte_writer_put_string_utf16@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_byte_writer_put_string_utf32@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_byte_writer_put_string_utf8@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_byte_writer_put_uint16_be@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_byte_writer_put_uint16_le@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_byte_writer_put_uint24_be@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_byte_writer_put_uint24_le@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_byte_writer_put_uint32_be@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_byte_writer_put_uint32_le@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_byte_writer_put_uint64_be@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_byte_writer_put_uint64_le@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_byte_writer_put_uint8@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_byte_writer_reset@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_byte_writer_reset_and_get_data@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_device_action_error@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_device_action_get_type@LIBFPRINT_TOD_1.0.0 1:1.90.3+tod1
|
||||||
|
fpi_device_action_is_cancelled@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_device_add_timeout@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_device_capture_complete@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_device_class_auto_initialize_features@LIBFPRINT_TOD_1_1.92 1:1.94.1+tod1
|
||||||
|
fpi_device_clear_storage_complete@LIBFPRINT_TOD_1_1.92 1:1.94.1+tod1
|
||||||
|
fpi_device_close_complete@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_device_configure_wakeup@LIBFPRINT_TOD_1.0.0 1:1.94.1+tod1
|
||||||
|
fpi_device_critical_enter@LIBFPRINT_TOD_1_1.94 1:1.94.1+tod1
|
||||||
|
fpi_device_critical_leave@LIBFPRINT_TOD_1_1.94 1:1.94.1+tod1
|
||||||
|
fpi_device_delete_complete@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_device_enroll_complete@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_device_enroll_progress@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_device_error_new@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_device_error_new_msg@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_device_get_cancellable@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_device_get_capture_data@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_device_get_current_action@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_device_get_delete_data@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_device_get_driver_data@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_device_get_enroll_data@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_device_get_identify_data@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_device_get_udev_data@LIBFPRINT_TOD_1_1.92 1:1.94.1+tod1
|
||||||
|
fpi_device_get_usb_device@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_device_get_verify_data@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_device_get_virtual_env@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_device_identify_complete@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_device_identify_report@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_device_list_complete@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_device_open_complete@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_device_probe_complete@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_device_remove@LIBFPRINT_TOD_1.0.0 1:1.90.5+tod1
|
||||||
|
fpi_device_report_finger_status@LIBFPRINT_TOD_1.0.0 1:1.90.5+tod1
|
||||||
|
fpi_device_report_finger_status_changes@LIBFPRINT_TOD_1.0.0 1:1.90.5+tod1
|
||||||
|
fpi_device_resume@LIBFPRINT_TOD_1_1.94 1:1.94.5+tod1
|
||||||
|
fpi_device_resume_complete@LIBFPRINT_TOD_1_1.94 1:1.94.1+tod1
|
||||||
|
fpi_device_retry_new@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_device_retry_new_msg@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_device_set_nr_enroll_stages@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_device_set_scan_type@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_device_suspend@LIBFPRINT_TOD_1_1.94 1:1.94.5+tod1
|
||||||
|
fpi_device_suspend_complete@LIBFPRINT_TOD_1_1.94 1:1.94.1+tod1
|
||||||
|
fpi_device_udev_subtype_flags_get_type@LIBFPRINT_TOD_1.0.0 1:1.94.1+tod1
|
||||||
|
fpi_device_update_features@LIBFPRINT_TOD_1_1.92 1:1.94.1+tod1
|
||||||
|
fpi_device_update_temp@LIBFPRINT_TOD_1.0.0 1:1.94.1+tod1
|
||||||
|
fpi_device_verify_complete@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_device_verify_report@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_do_movement_estimation@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_image_device_activate@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_image_device_activate_complete@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_image_device_close_complete@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_image_device_deactivate@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_image_device_deactivate_complete@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_image_device_image_captured@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_image_device_open_complete@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_image_device_report_finger_status@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_image_device_retry_scan@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_image_device_session_error@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_image_device_set_bz3_threshold@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_image_device_state_get_type@LIBFPRINT_TOD_1.0.0 1:1.90.3+tod1
|
||||||
|
fpi_image_flags_get_type@LIBFPRINT_TOD_1.0.0 1:1.90.3+tod1
|
||||||
|
fpi_image_resize@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_match_result_get_type@LIBFPRINT_TOD_1.0.0 1:1.90.3+tod1
|
||||||
|
fpi_mean_sq_diff_norm@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_print_add_from_image@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_print_add_print@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_print_bz3_match@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_print_fill_from_user_id@LIBFPRINT_TOD_1.0.0 1:1.90.2+tod1
|
||||||
|
fpi_print_generate_user_id@LIBFPRINT_TOD_1.0.0 1:1.90.2+tod1
|
||||||
|
fpi_print_set_device_stored@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_print_set_type@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_print_type_get_type@LIBFPRINT_TOD_1.0.0 1:1.90.3+tod1
|
||||||
|
fpi_spi_transfer_get_type@LIBFPRINT_TOD_1_1.92 1:1.94.1+tod1
|
||||||
|
fpi_spi_transfer_new@LIBFPRINT_TOD_1_1.92 1:1.94.1+tod1
|
||||||
|
fpi_spi_transfer_read@LIBFPRINT_TOD_1_1.92 1:1.94.1+tod1
|
||||||
|
fpi_spi_transfer_read_full@LIBFPRINT_TOD_1_1.92 1:1.94.1+tod1
|
||||||
|
fpi_spi_transfer_ref@LIBFPRINT_TOD_1_1.92 1:1.94.1+tod1
|
||||||
|
fpi_spi_transfer_submit@LIBFPRINT_TOD_1_1.92 1:1.94.1+tod1
|
||||||
|
fpi_spi_transfer_submit_sync@LIBFPRINT_TOD_1_1.92 1:1.94.1+tod1
|
||||||
|
fpi_spi_transfer_unref@LIBFPRINT_TOD_1_1.92 1:1.94.1+tod1
|
||||||
|
fpi_spi_transfer_write@LIBFPRINT_TOD_1_1.92 1:1.94.1+tod1
|
||||||
|
fpi_spi_transfer_write_full@LIBFPRINT_TOD_1_1.92 1:1.94.1+tod1
|
||||||
|
fpi_ssm_cancel_delayed_state_change@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_ssm_dup_error@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_ssm_free@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_ssm_get_cur_state@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_ssm_get_data@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_ssm_get_device@LIBFPRINT_TOD_1_1.92 1:1.94.1+tod1
|
||||||
|
fpi_ssm_get_error@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_ssm_jump_to_state@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_ssm_jump_to_state_delayed@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_ssm_jump_to_state_delayed@LIBFPRINT_TOD_1_1.92 1:1.94.1+tod1
|
||||||
|
fpi_ssm_jump_to_state_delayed_1_90@LIBFPRINT_TOD_1.0.0 1:1.94.1+tod1
|
||||||
|
fpi_ssm_mark_completed@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_ssm_mark_completed_delayed@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_ssm_mark_completed_delayed@LIBFPRINT_TOD_1_1.92 1:1.94.1+tod1
|
||||||
|
fpi_ssm_mark_completed_delayed_1_90@LIBFPRINT_TOD_1.0.0 1:1.94.1+tod1
|
||||||
|
fpi_ssm_mark_failed@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_ssm_new_full@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_ssm_new_full@LIBFPRINT_TOD_1_1.92 1:1.94.1+tod1
|
||||||
|
fpi_ssm_new_full_1_90@LIBFPRINT_TOD_1.0.0 1:1.94.1+tod1
|
||||||
|
fpi_ssm_next_state@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_ssm_next_state_delayed@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_ssm_next_state_delayed@LIBFPRINT_TOD_1_1.92 1:1.94.1+tod1
|
||||||
|
fpi_ssm_next_state_delayed_1_90@LIBFPRINT_TOD_1.0.0 1:1.94.1+tod1
|
||||||
|
fpi_ssm_set_data@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_ssm_silence_debug@LIBFPRINT_TOD_1_1.94 1:1.94.3+tod1
|
||||||
|
fpi_ssm_spi_transfer_cb@LIBFPRINT_TOD_1_1.92 1:1.94.1+tod1
|
||||||
|
fpi_ssm_spi_transfer_with_weak_pointer_cb@LIBFPRINT_TOD_1_1.92 1:1.94.1+tod1
|
||||||
|
fpi_ssm_start@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_ssm_start_subsm@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_ssm_usb_transfer_cb@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_ssm_usb_transfer_with_weak_pointer_cb@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_std_sq_dev@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_transfer_type_get_type@LIBFPRINT_TOD_1.0.0 1:1.90.3+tod1
|
||||||
|
fpi_usb_transfer_fill_bulk@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_usb_transfer_fill_bulk_full@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_usb_transfer_fill_control@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_usb_transfer_fill_interrupt@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_usb_transfer_fill_interrupt_full@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_usb_transfer_get_type@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_usb_transfer_new@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_usb_transfer_ref@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_usb_transfer_submit@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_usb_transfer_submit_sync@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
|
fpi_usb_transfer_unref@LIBFPRINT_TOD_1.0.0 1:1.90.1+tod1
|
||||||
+37
@@ -0,0 +1,37 @@
|
|||||||
|
From a603b95786836d27679301ecd4e68e4227ab4c82 Mon Sep 17 00:00:00 2001
|
||||||
|
From: herman lin <herman.lin@emc.com.tw>
|
||||||
|
Date: Thu, 8 May 2025 15:34:37 +0800
|
||||||
|
Subject: [PATCH] elanmoc: Add new PID 0x0CA8
|
||||||
|
|
||||||
|
---
|
||||||
|
data/autosuspend.hwdb | 1 +
|
||||||
|
libfprint/drivers/elanmoc/elanmoc.c | 1 +
|
||||||
|
2 files changed, 2 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/data/autosuspend.hwdb b/data/autosuspend.hwdb
|
||||||
|
index 39dd316..43190cb 100644
|
||||||
|
--- a/data/autosuspend.hwdb
|
||||||
|
+++ b/data/autosuspend.hwdb
|
||||||
|
@@ -157,6 +157,7 @@ usb:v04F3p0C8C*
|
||||||
|
usb:v04F3p0C8D*
|
||||||
|
usb:v04F3p0C99*
|
||||||
|
usb:v04F3p0C9F*
|
||||||
|
+usb:v04F3p0CA8*
|
||||||
|
ID_AUTOSUSPEND=1
|
||||||
|
ID_PERSIST=0
|
||||||
|
|
||||||
|
diff --git a/libfprint/drivers/elanmoc/elanmoc.c b/libfprint/drivers/elanmoc/elanmoc.c
|
||||||
|
index 42a84a6..0e99e57 100644
|
||||||
|
--- a/libfprint/drivers/elanmoc/elanmoc.c
|
||||||
|
+++ b/libfprint/drivers/elanmoc/elanmoc.c
|
||||||
|
@@ -33,6 +33,7 @@ static const FpIdEntry id_table[] = {
|
||||||
|
{ .vid = 0x04f3, .pid = 0x0c8d, },
|
||||||
|
{ .vid = 0x04f3, .pid = 0x0c99, },
|
||||||
|
{ .vid = 0x04f3, .pid = 0x0c9f, },
|
||||||
|
+ { .vid = 0x04f3, .pid = 0x0ca8, },
|
||||||
|
{ .vid = 0, .pid = 0, .driver_data = 0 }, /* terminating entry */
|
||||||
|
};
|
||||||
|
|
||||||
|
--
|
||||||
|
2.43.0
|
||||||
|
|
||||||
+28
@@ -0,0 +1,28 @@
|
|||||||
|
Subject: elanmoc: Add new PID 0x0C9F
|
||||||
|
Origin: upstream, https://gitlab.freedesktop.org/libfprint/libfprint/-/merge_requests/501
|
||||||
|
Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/libfprint/+bug/2089367
|
||||||
|
|
||||||
|
diff --git a/data/autosuspend.hwdb b/data/autosuspend.hwdb
|
||||||
|
index 8e0e6eab12e772058a8957a2b9f2d39e0bdc8e11..342c6d0e6538028d90a11d1607cd9e07086aeb8c 100644
|
||||||
|
--- a/data/autosuspend.hwdb
|
||||||
|
+++ b/data/autosuspend.hwdb
|
||||||
|
@@ -156,6 +156,7 @@ usb:v04F3p0C88*
|
||||||
|
usb:v04F3p0C8C*
|
||||||
|
usb:v04F3p0C8D*
|
||||||
|
usb:v04F3p0C99*
|
||||||
|
+usb:v04F3p0C9F*
|
||||||
|
ID_AUTOSUSPEND=1
|
||||||
|
ID_PERSIST=0
|
||||||
|
|
||||||
|
diff --git a/libfprint/drivers/elanmoc/elanmoc.c b/libfprint/drivers/elanmoc/elanmoc.c
|
||||||
|
index e86b79a28ec2240a303ad602b567d10447e3b09b..42a84a627e68020bb070bce1a6cffa669cffe9ed 100644
|
||||||
|
--- a/libfprint/drivers/elanmoc/elanmoc.c
|
||||||
|
+++ b/libfprint/drivers/elanmoc/elanmoc.c
|
||||||
|
@@ -32,6 +32,7 @@ static const FpIdEntry id_table[] = {
|
||||||
|
{ .vid = 0x04f3, .pid = 0x0c8c, },
|
||||||
|
{ .vid = 0x04f3, .pid = 0x0c8d, },
|
||||||
|
{ .vid = 0x04f3, .pid = 0x0c99, },
|
||||||
|
+ { .vid = 0x04f3, .pid = 0x0c9f, },
|
||||||
|
{ .vid = 0, .pid = 0, .driver_data = 0 }, /* terminating entry */
|
||||||
|
};
|
||||||
|
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
From 763b6830006ca88bced7744c219c9a961d1637f4 Mon Sep 17 00:00:00 2001
|
||||||
|
From: jialei <jialei@egoodix.com>
|
||||||
|
Date: Wed, 29 Oct 2025 14:32:54 +0800
|
||||||
|
Subject: [PATCH] goodixmoc:add new PID 0x66A9
|
||||||
|
|
||||||
|
---
|
||||||
|
data/autosuspend.hwdb | 1 +
|
||||||
|
libfprint/drivers/goodixmoc/goodix.c | 1 +
|
||||||
|
2 files changed, 2 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/data/autosuspend.hwdb b/data/autosuspend.hwdb
|
||||||
|
index 74ac65b..df18494 100644
|
||||||
|
--- a/data/autosuspend.hwdb
|
||||||
|
+++ b/data/autosuspend.hwdb
|
||||||
|
@@ -207,6 +207,7 @@ usb:v27C6p6594*
|
||||||
|
usb:v27C6p659A*
|
||||||
|
usb:v27C6p659C*
|
||||||
|
usb:v27C6p6A94*
|
||||||
|
+usb:v27C6p66A9*
|
||||||
|
ID_AUTOSUSPEND=1
|
||||||
|
ID_PERSIST=0
|
||||||
|
|
||||||
|
diff --git a/libfprint/drivers/goodixmoc/goodix.c b/libfprint/drivers/goodixmoc/goodix.c
|
||||||
|
index 5a3ffac..8aea175 100644
|
||||||
|
--- a/libfprint/drivers/goodixmoc/goodix.c
|
||||||
|
+++ b/libfprint/drivers/goodixmoc/goodix.c
|
||||||
|
@@ -1632,6 +1632,7 @@ static const FpIdEntry id_table[] = {
|
||||||
|
{ .vid = 0x27c6, .pid = 0x659A, },
|
||||||
|
{ .vid = 0x27c6, .pid = 0x659C, },
|
||||||
|
{ .vid = 0x27c6, .pid = 0x6A94, },
|
||||||
|
+ { .vid = 0x27c6, .pid = 0x66A9, },
|
||||||
|
{ .vid = 0, .pid = 0, .driver_data = 0 }, /* terminating entry */
|
||||||
|
};
|
||||||
|
|
||||||
|
--
|
||||||
|
2.43.0
|
||||||
|
|
||||||
+44
@@ -0,0 +1,44 @@
|
|||||||
|
From: =?utf-8?b?Ik1hcmNvIFRyZXZpc2FuIChUcmV2acOxbyki?= <mail@3v1n0.net>
|
||||||
|
Date: Wed, 22 May 2024 17:08:19 +0200
|
||||||
|
Subject: libfprint-fprint-list-udev-hwdb: Add new broadcom device IDs
|
||||||
|
|
||||||
|
(cherry picked from commit eaec2339ccaee64b2bdb1d1e27f51ada673e4087)
|
||||||
|
---
|
||||||
|
data/autosuspend.hwdb | 6 ++++++
|
||||||
|
libfprint/fprint-list-udev-hwdb.c | 6 ++++++
|
||||||
|
2 files changed, 12 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/data/autosuspend.hwdb b/data/autosuspend.hwdb
|
||||||
|
index 74ac65b..cb3e74b 100644
|
||||||
|
--- a/data/autosuspend.hwdb
|
||||||
|
+++ b/data/autosuspend.hwdb
|
||||||
|
@@ -353,6 +353,12 @@ usb:v0A5Cp5842*
|
||||||
|
usb:v0A5Cp5843*
|
||||||
|
usb:v0A5Cp5844*
|
||||||
|
usb:v0A5Cp5845*
|
||||||
|
+usb:v0A5Cp5860*
|
||||||
|
+usb:v0A5Cp5863*
|
||||||
|
+usb:v0A5Cp5864*
|
||||||
|
+usb:v0A5Cp5865*
|
||||||
|
+usb:v0A5Cp5866*
|
||||||
|
+usb:v0A5Cp5867*
|
||||||
|
usb:v0BDAp5812*
|
||||||
|
usb:v10A5p0007*
|
||||||
|
usb:v10A5p9200*
|
||||||
|
diff --git a/libfprint/fprint-list-udev-hwdb.c b/libfprint/fprint-list-udev-hwdb.c
|
||||||
|
index bace9f9..4d056ae 100644
|
||||||
|
--- a/libfprint/fprint-list-udev-hwdb.c
|
||||||
|
+++ b/libfprint/fprint-list-udev-hwdb.c
|
||||||
|
@@ -76,6 +76,12 @@ static const FpIdEntry allowlist_id_table[] = {
|
||||||
|
{ .vid = 0x0a5c, .pid = 0x5843 },
|
||||||
|
{ .vid = 0x0a5c, .pid = 0x5844 },
|
||||||
|
{ .vid = 0x0a5c, .pid = 0x5845 },
|
||||||
|
+ { .vid = 0x0a5c, .pid = 0x5860 },
|
||||||
|
+ { .vid = 0x0a5c, .pid = 0x5863 },
|
||||||
|
+ { .vid = 0x0a5c, .pid = 0x5864 },
|
||||||
|
+ { .vid = 0x0a5c, .pid = 0x5865 },
|
||||||
|
+ { .vid = 0x0a5c, .pid = 0x5866 },
|
||||||
|
+ { .vid = 0x0a5c, .pid = 0x5867 },
|
||||||
|
{ .vid = 0x0bda, .pid = 0x5812 },
|
||||||
|
{ .vid = 0x10a5, .pid = 0x0007 },
|
||||||
|
{ .vid = 0x10a5, .pid = 0x9200 },
|
||||||
Vendored
+7
@@ -0,0 +1,7 @@
|
|||||||
|
libfprint-fprint-list-udev-hwdb-Add-new-broadcom-device-I.patch
|
||||||
|
elanmoc-add-new-pid-0x0c9f.patch
|
||||||
|
synaptics-Add-new-PID-0x0107-and-0x108.patch
|
||||||
|
synaptics-Add-new-PID-0x019D.patch
|
||||||
|
synaptics-add-new-PID-0x019F-0x109-and-0x10A.patch
|
||||||
|
goodixmoc-add-new-PID-0x66A9.patch
|
||||||
|
elanmoc-Add-new-PID-0x0CA8.patch
|
||||||
@@ -0,0 +1,39 @@
|
|||||||
|
From a8ef1672a4ca7e60760349ce320a8f5b778244d5 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Aris Lin <aris.lin@synaptics.com>
|
||||||
|
Date: Mon, 18 Nov 2024 11:18:29 +0800
|
||||||
|
Subject: [PATCH] synaptics: Add new PID 0x0107 and 0x108
|
||||||
|
|
||||||
|
---
|
||||||
|
data/autosuspend.hwdb | 2 ++
|
||||||
|
libfprint/drivers/synaptics/synaptics.c | 2 ++
|
||||||
|
2 files changed, 4 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/data/autosuspend.hwdb b/data/autosuspend.hwdb
|
||||||
|
index 74ac65b..386d8bd 100644
|
||||||
|
--- a/data/autosuspend.hwdb
|
||||||
|
+++ b/data/autosuspend.hwdb
|
||||||
|
@@ -229,6 +229,8 @@ usb:v06CBp00C2*
|
||||||
|
usb:v06CBp0100*
|
||||||
|
usb:v06CBp00F0*
|
||||||
|
usb:v06CBp0103*
|
||||||
|
+usb:v06CBp0107*
|
||||||
|
+usb:v06CBp0108*
|
||||||
|
usb:v06CBp0123*
|
||||||
|
usb:v06CBp0124*
|
||||||
|
usb:v06CBp0126*
|
||||||
|
diff --git a/libfprint/drivers/synaptics/synaptics.c b/libfprint/drivers/synaptics/synaptics.c
|
||||||
|
index 138e734..a5d2990 100644
|
||||||
|
--- a/libfprint/drivers/synaptics/synaptics.c
|
||||||
|
+++ b/libfprint/drivers/synaptics/synaptics.c
|
||||||
|
@@ -39,6 +39,8 @@ static const FpIdEntry id_table[] = {
|
||||||
|
{ .vid = SYNAPTICS_VENDOR_ID, .pid = 0x0100, },
|
||||||
|
{ .vid = SYNAPTICS_VENDOR_ID, .pid = 0x00F0, },
|
||||||
|
{ .vid = SYNAPTICS_VENDOR_ID, .pid = 0x0103, },
|
||||||
|
+ { .vid = SYNAPTICS_VENDOR_ID, .pid = 0x0107, },
|
||||||
|
+ { .vid = SYNAPTICS_VENDOR_ID, .pid = 0x0108, },
|
||||||
|
{ .vid = SYNAPTICS_VENDOR_ID, .pid = 0x0123, },
|
||||||
|
{ .vid = SYNAPTICS_VENDOR_ID, .pid = 0x0124, },
|
||||||
|
{ .vid = SYNAPTICS_VENDOR_ID, .pid = 0x0126, },
|
||||||
|
--
|
||||||
|
2.43.0
|
||||||
|
|
||||||
@@ -0,0 +1,40 @@
|
|||||||
|
From 2e766904f0250873aaa2133f5d0e84440843ec8b Mon Sep 17 00:00:00 2001
|
||||||
|
From: Aris Lin <aris.lin@synaptics.com>
|
||||||
|
Date: Mon, 13 May 2024 16:21:57 +0800
|
||||||
|
Subject: [PATCH] synaptics: Add new PID 0x019D
|
||||||
|
Origin: upstream, https://gitlab.freedesktop.org/libfprint/libfprint/-/commit/2e766904f0250873aaa2133f5d0e84440843ec8b
|
||||||
|
Bug-Ubuntu: https://bugs.launchpad.net/bugs/2114712
|
||||||
|
Signed-off-by: Atlas Yu <atlas.yu@canonical.com>
|
||||||
|
|
||||||
|
---
|
||||||
|
data/autosuspend.hwdb | 1 +
|
||||||
|
libfprint/drivers/synaptics/synaptics.c | 1 +
|
||||||
|
2 files changed, 2 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/data/autosuspend.hwdb b/data/autosuspend.hwdb
|
||||||
|
index 342c6d0..ef81674 100644
|
||||||
|
--- a/data/autosuspend.hwdb
|
||||||
|
+++ b/data/autosuspend.hwdb
|
||||||
|
@@ -243,6 +243,7 @@ usb:v06CBp015F*
|
||||||
|
usb:v06CBp0104*
|
||||||
|
usb:v06CBp0173*
|
||||||
|
usb:v06CBp0106*
|
||||||
|
+usb:v06CBp019D*
|
||||||
|
ID_AUTOSUSPEND=1
|
||||||
|
ID_PERSIST=0
|
||||||
|
|
||||||
|
diff --git a/libfprint/drivers/synaptics/synaptics.c b/libfprint/drivers/synaptics/synaptics.c
|
||||||
|
index 138e734..7b7bf73 100644
|
||||||
|
--- a/libfprint/drivers/synaptics/synaptics.c
|
||||||
|
+++ b/libfprint/drivers/synaptics/synaptics.c
|
||||||
|
@@ -48,6 +48,7 @@ static const FpIdEntry id_table[] = {
|
||||||
|
{ .vid = SYNAPTICS_VENDOR_ID, .pid = 0x0104, },
|
||||||
|
{ .vid = SYNAPTICS_VENDOR_ID, .pid = 0x0173, },
|
||||||
|
{ .vid = SYNAPTICS_VENDOR_ID, .pid = 0x0106, },
|
||||||
|
+ { .vid = SYNAPTICS_VENDOR_ID, .pid = 0x019D, },
|
||||||
|
{ .vid = 0, .pid = 0, .driver_data = 0 }, /* terminating entry */
|
||||||
|
};
|
||||||
|
|
||||||
|
--
|
||||||
|
2.43.0
|
||||||
|
|
||||||
@@ -0,0 +1,54 @@
|
|||||||
|
From: Aris Lin <aris.lin@synaptics.com>
|
||||||
|
Date: Mon, 14 Jul 2025 11:52:56 +0800
|
||||||
|
Subject: [PATCH] synaptics: add new PID 0x019F, 0x109 and 0x10A
|
||||||
|
|
||||||
|
Origin: upstream, https://gitlab.freedesktop.org/libfprint/libfprint/-/commit/7f5304d6eec37955c8d462e571c3d72af0be4684
|
||||||
|
Bug-Ubuntu: https://bugs.launchpad.net/bugs/2133704
|
||||||
|
Signed-off-by: Bin Li <binli@ubuntu.com>
|
||||||
|
---
|
||||||
|
data/autosuspend.hwdb | 3 +++
|
||||||
|
libfprint/drivers/synaptics/synaptics.c | 3 +++
|
||||||
|
2 files changed, 6 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/data/autosuspend.hwdb b/data/autosuspend.hwdb
|
||||||
|
index 7a1759e..10e643c 100644
|
||||||
|
--- a/data/autosuspend.hwdb
|
||||||
|
+++ b/data/autosuspend.hwdb
|
||||||
|
@@ -232,6 +232,8 @@ usb:v06CBp00F0*
|
||||||
|
usb:v06CBp0103*
|
||||||
|
usb:v06CBp0107*
|
||||||
|
usb:v06CBp0108*
|
||||||
|
+usb:v06CBp0109*
|
||||||
|
+usb:v06CBp010A*
|
||||||
|
usb:v06CBp0123*
|
||||||
|
usb:v06CBp0124*
|
||||||
|
usb:v06CBp0126*
|
||||||
|
@@ -242,6 +244,7 @@ usb:v06CBp0104*
|
||||||
|
usb:v06CBp0173*
|
||||||
|
usb:v06CBp0106*
|
||||||
|
usb:v06CBp019D*
|
||||||
|
+usb:v06CBp019F*
|
||||||
|
ID_AUTOSUSPEND=1
|
||||||
|
ID_PERSIST=0
|
||||||
|
|
||||||
|
diff --git a/libfprint/drivers/synaptics/synaptics.c b/libfprint/drivers/synaptics/synaptics.c
|
||||||
|
index d272421..29fb5f1 100644
|
||||||
|
--- a/libfprint/drivers/synaptics/synaptics.c
|
||||||
|
+++ b/libfprint/drivers/synaptics/synaptics.c
|
||||||
|
@@ -41,6 +41,8 @@ static const FpIdEntry id_table[] = {
|
||||||
|
{ .vid = SYNAPTICS_VENDOR_ID, .pid = 0x0103, },
|
||||||
|
{ .vid = SYNAPTICS_VENDOR_ID, .pid = 0x0107, },
|
||||||
|
{ .vid = SYNAPTICS_VENDOR_ID, .pid = 0x0108, },
|
||||||
|
+ { .vid = SYNAPTICS_VENDOR_ID, .pid = 0x0109, },
|
||||||
|
+ { .vid = SYNAPTICS_VENDOR_ID, .pid = 0x010A, },
|
||||||
|
{ .vid = SYNAPTICS_VENDOR_ID, .pid = 0x0123, },
|
||||||
|
{ .vid = SYNAPTICS_VENDOR_ID, .pid = 0x0124, },
|
||||||
|
{ .vid = SYNAPTICS_VENDOR_ID, .pid = 0x0126, },
|
||||||
|
@@ -51,6 +53,7 @@ static const FpIdEntry id_table[] = {
|
||||||
|
{ .vid = SYNAPTICS_VENDOR_ID, .pid = 0x0173, },
|
||||||
|
{ .vid = SYNAPTICS_VENDOR_ID, .pid = 0x0106, },
|
||||||
|
{ .vid = SYNAPTICS_VENDOR_ID, .pid = 0x019D, },
|
||||||
|
+ { .vid = SYNAPTICS_VENDOR_ID, .pid = 0x019F, },
|
||||||
|
{ .vid = 0, .pid = 0, .driver_data = 0 }, /* terminating entry */
|
||||||
|
};
|
||||||
|
|
||||||
+26
@@ -0,0 +1,26 @@
|
|||||||
|
#!/usr/bin/make -f
|
||||||
|
|
||||||
|
export DEB_BUILD_MAINT_OPTIONS = optimize=-lto
|
||||||
|
export DPKG_GENSYMBOLS_CHECK_LEVEL = 2
|
||||||
|
|
||||||
|
BUILDDIR = $(CURDIR)/obj-$(DEB_HOST_GNU_TYPE)
|
||||||
|
|
||||||
|
# Configuration arguments
|
||||||
|
CONFIG_ARGS = \
|
||||||
|
-Dudev_hwdb=enabled \
|
||||||
|
-Dudev_rules=enabled \
|
||||||
|
-Ddrivers=all \
|
||||||
|
-Dgtk-examples=false
|
||||||
|
|
||||||
|
%:
|
||||||
|
dh $@ --with gir
|
||||||
|
|
||||||
|
override_dh_auto_configure:
|
||||||
|
dh_auto_configure -- $(CONFIG_ARGS)
|
||||||
|
|
||||||
|
override_dh_auto_test:
|
||||||
|
dh_auto_test -- -C $(BUILDDIR) --timeout-multiplier 5
|
||||||
|
|
||||||
|
override_dh_auto_clean:
|
||||||
|
rm -rf tests/__pycache__
|
||||||
|
dh_auto_clean
|
||||||
Vendored
+1
@@ -0,0 +1 @@
|
|||||||
|
3.0 (quilt)
|
||||||
Vendored
+3
@@ -0,0 +1,3 @@
|
|||||||
|
# This TOD driver binary is built using sources inside this package
|
||||||
|
# but at previous version, see tests/tod-drivers/README.md for more information
|
||||||
|
libfprint source: source-is-missing [tests/tod-drivers/tod-*.so]
|
||||||
Vendored
+6
@@ -0,0 +1,6 @@
|
|||||||
|
Test-Command: gnome-desktop-testing-runner libfprint-2
|
||||||
|
Features: test-name=installed-tests
|
||||||
|
Classes: desktop
|
||||||
|
Depends: gnome-desktop-testing,
|
||||||
|
libfprint-2-tests
|
||||||
|
Restrictions: allow-stderr
|
||||||
+32
@@ -0,0 +1,32 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
set -e
|
||||||
|
|
||||||
|
srcdir="${GBP_SOURCES_DIR:-.}"
|
||||||
|
debpath="$(dirname "$0")"
|
||||||
|
autosuspend_file="$srcdir/data/autosuspend.hwdb"
|
||||||
|
commands_lines=()
|
||||||
|
|
||||||
|
while IFS= read -r line; do
|
||||||
|
if [[ $line =~ ^usb:v([A-Fa-f0-9]{4})p([A-Fa-f0-9]{4}) ]]; then
|
||||||
|
vendor="$(echo "${BASH_REMATCH[1]}" | tr '[:upper:]' '[:lower:]')"
|
||||||
|
product="$(echo "${BASH_REMATCH[2]}" | tr '[:upper:]' '[:lower:]')"
|
||||||
|
commands_lines+=("\tudevadm trigger --action=add --attr-match=idVendor=$vendor --attr-match=idProduct=$product || true")
|
||||||
|
fi
|
||||||
|
done < "$autosuspend_file"
|
||||||
|
|
||||||
|
UDEVADM_TRIGGERS=$( IFS=$'\n'; echo -e "${commands_lines[*]}" )
|
||||||
|
export UDEVADM_TRIGGERS
|
||||||
|
|
||||||
|
for i in "$debpath"/libfprint-*.post*.in; do
|
||||||
|
out="${i%.in}"
|
||||||
|
perl -pe 's/\@UDEVADM_TRIGGERS\@/`printenv UDEVADM_TRIGGERS`/e' "$i" > "$out"
|
||||||
|
|
||||||
|
if [ -n "$GBP_BRANCH" ]; then
|
||||||
|
if ! git diff-index --quiet HEAD -- "$out"; then
|
||||||
|
git add "$out"
|
||||||
|
dch "${out#$srcdir}: Devices triggers updated"
|
||||||
|
git add debian/changelog
|
||||||
|
debcommit
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
done
|
||||||
Vendored
+4
@@ -0,0 +1,4 @@
|
|||||||
|
---
|
||||||
|
Bug-Database: https://gitlab.freedesktop.org/3v1n0/libfprint/-/issues
|
||||||
|
Bug-Submit: https://gitlab.freedesktop.org/3v1n0/libfprint/-/issues/new
|
||||||
|
Repository-Browse: https://gitlab.freedesktop.org/3v1n0/libfprint/tree/tod
|
||||||
Vendored
+5
@@ -0,0 +1,5 @@
|
|||||||
|
version=4
|
||||||
|
|
||||||
|
opts=versionmangle=s/_/./g \
|
||||||
|
https://gitlab.freedesktop.org/3v1n0/@PACKAGE@/tags \
|
||||||
|
.*\/archive\/[Vv]_?([\d_\+\.]+(?:\+git[0-9]+)?\+tod[0-9]+)\/@PACKAGE@-.*@ARCHIVE_EXT@
|
||||||
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"app-id": "org.freedesktop.libfprint.Demo",
|
"app-id": "org.freedesktop.libfprint.Demo",
|
||||||
"runtime": "org.gnome.Platform",
|
"runtime": "org.gnome.Platform",
|
||||||
"runtime-version": "3.36",
|
"runtime-version": "master",
|
||||||
"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=x11",
|
"--share=ipc", "--socket=fallback-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", "--disable-udev" ],
|
"config-opts": [ "--disable-static" ],
|
||||||
"cleanup": [
|
"cleanup": [
|
||||||
"/lib/*.la",
|
"/lib/*.la",
|
||||||
"/lib/pkgconfig",
|
"/lib/pkgconfig",
|
||||||
@@ -27,47 +27,46 @@
|
|||||||
"sources": [
|
"sources": [
|
||||||
{
|
{
|
||||||
"type": "archive",
|
"type": "archive",
|
||||||
"url": "https://github.com/libusb/libusb/archive/v1.0.22.tar.gz",
|
"url": "https://github.com/libusb/libusb/releases/download/v1.0.26/libusb-1.0.26.tar.bz2",
|
||||||
"sha256": "3500f7b182750cd9ccf9be8b1df998f83df56a39ab264976bdb3307773e16f48"
|
"sha256": "12ce7a61fc9854d1d2a1ffe095f7b5fac19ddba095c259e6067a46500381b5a5"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"post-install": [
|
"post-install": [
|
||||||
"install -Dm644 COPYING /app/share/licenses/libgusb/COPYING"
|
"install -Dm644 COPYING /app/share/licenses/libusb/COPYING"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "libgusb",
|
"name": "libgusb",
|
||||||
"buildsystem": "meson",
|
"buildsystem": "meson",
|
||||||
"config-opts": [ "-Dtests=false", "-Dvapi=false", "-Ddocs=false", "-Dintrospection=false" ],
|
"config-opts": [ "-Dtests=false", "-Dvapi=false", "-Ddocs=false" ],
|
||||||
"sources": [
|
"sources": [
|
||||||
{
|
{
|
||||||
"type": "archive",
|
"type": "archive",
|
||||||
"url": "https://github.com/hughsie/libgusb/archive/0.3.0.tar.gz",
|
"url": "https://github.com/hughsie/libgusb/releases/download/0.4.6/libgusb-0.4.6.tar.xz",
|
||||||
"sha256": "b36310f8405d5fd68f6caf4a829f7ab4c627b38fd3d02a139d411fce0f3a49f1"
|
"sha256": "1b0422bdcd72183272ac42eec9398c5a0bc48a02f618fa3242c468cbbd003049"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "gudev",
|
"name": "gudev",
|
||||||
"buildsystem": "meson",
|
"buildsystem": "meson",
|
||||||
"config-opts": [ "-Dtests=disabled", "-Dintrospection=disabled" ],
|
"config-opts": [ "-Dtests=disabled", "-Dintrospection=disabled", "-Dvapi=disabled" ],
|
||||||
"sources": [
|
"sources": [
|
||||||
{
|
{
|
||||||
"type": "archive",
|
"type": "archive",
|
||||||
"url": "https://download.gnome.org/sources/libgudev/236/libgudev-236.tar.xz",
|
"url": "https://download.gnome.org/sources/libgudev/238/libgudev-238.tar.xz",
|
||||||
"sha256": "e50369d06d594bae615eb7aeb787de304ebaad07a26d1043cef8e9c7ab7c9524"
|
"sha256": "61266ab1afc9d73dbc60a8b2af73e99d2fdff47d99544d085760e4fa667b5dd1"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "libfprint",
|
"name": "libfprint",
|
||||||
"buildsystem": "meson",
|
"buildsystem": "meson",
|
||||||
"config-opts": [ "-Dudev_hwdb=disabled", "-Dudev_rules=disabled", "-Dx11-examples=false", "-Dgtk-examples=true", "-Ddrivers=all" ],
|
"config-opts": [ "-Dudev_hwdb=disabled", "-Dudev_rules=disabled", "-Dgtk-examples=true", "-Ddrivers=all" ],
|
||||||
"sources": [
|
"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"
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -100,12 +100,6 @@ FP_TYPE_IMAGE_DEVICE
|
|||||||
FpImageDevice
|
FpImageDevice
|
||||||
</SECTION>
|
</SECTION>
|
||||||
|
|
||||||
<SECTION>
|
|
||||||
<FILE>fp-sdcp-device</FILE>
|
|
||||||
FP_TYPE_SDCP_DEVICE
|
|
||||||
FpSdcpDevice
|
|
||||||
</SECTION>
|
|
||||||
|
|
||||||
<SECTION>
|
<SECTION>
|
||||||
<FILE>fp-print</FILE>
|
<FILE>fp-print</FILE>
|
||||||
FP_TYPE_PRINT
|
FP_TYPE_PRINT
|
||||||
@@ -221,26 +215,6 @@ fpi_image_device_retry_scan
|
|||||||
fpi_image_device_set_bz3_threshold
|
fpi_image_device_set_bz3_threshold
|
||||||
</SECTION>
|
</SECTION>
|
||||||
|
|
||||||
<SECTION>
|
|
||||||
<FILE>fpi-sdcp-device</FILE>
|
|
||||||
<TITLE>Internal FpSdcpDevice</TITLE>
|
|
||||||
FpiSdcpClaim
|
|
||||||
FpSdcpDeviceClass
|
|
||||||
fpi_sdcp_claim_copy
|
|
||||||
fpi_sdcp_claim_free
|
|
||||||
fpi_sdcp_claim_get_type
|
|
||||||
fpi_sdcp_claim_new
|
|
||||||
fpi_sdcp_device_connect_complete
|
|
||||||
fpi_sdcp_device_get_connect_data
|
|
||||||
fpi_sdcp_device_get_reconnect_data
|
|
||||||
fpi_sdcp_device_reconnect_complete
|
|
||||||
fpi_sdcp_device_enroll_commit_complete
|
|
||||||
fpi_sdcp_device_enroll_ready
|
|
||||||
fpi_sdcp_device_enroll_set_nonce
|
|
||||||
fpi_sdcp_device_identify_retry
|
|
||||||
fpi_sdcp_device_identify_complete
|
|
||||||
</SECTION>
|
|
||||||
|
|
||||||
<SECTION>
|
<SECTION>
|
||||||
<FILE>fpi-log</FILE>
|
<FILE>fpi-log</FILE>
|
||||||
fp_dbg
|
fp_dbg
|
||||||
|
|||||||
@@ -28,7 +28,6 @@
|
|||||||
<xi:include href="xml/fp-context.xml"/>
|
<xi:include href="xml/fp-context.xml"/>
|
||||||
<xi:include href="xml/fp-device.xml"/>
|
<xi:include href="xml/fp-device.xml"/>
|
||||||
<xi:include href="xml/fp-image-device.xml"/>
|
<xi:include href="xml/fp-image-device.xml"/>
|
||||||
<xi:include href="xml/fp-sdcp-device.xml"/>
|
|
||||||
<xi:include href="xml/fp-print.xml"/>
|
<xi:include href="xml/fp-print.xml"/>
|
||||||
<xi:include href="xml/fp-image.xml"/>
|
<xi:include href="xml/fp-image.xml"/>
|
||||||
</part>
|
</part>
|
||||||
@@ -39,7 +38,6 @@
|
|||||||
<title>Device methods for drivers</title>
|
<title>Device methods for drivers</title>
|
||||||
<xi:include href="xml/fpi-device.xml"/>
|
<xi:include href="xml/fpi-device.xml"/>
|
||||||
<xi:include href="xml/fpi-image-device.xml"/>
|
<xi:include href="xml/fpi-image-device.xml"/>
|
||||||
<xi:include href="xml/fpi-sdcp-device.xml"/>
|
|
||||||
</chapter>
|
</chapter>
|
||||||
|
|
||||||
<chapter id="driver-helpers">
|
<chapter id="driver-helpers">
|
||||||
|
|||||||
+2
-2
@@ -19,13 +19,13 @@ content_files = [
|
|||||||
|
|
||||||
expand_content_files = content_files
|
expand_content_files = content_files
|
||||||
|
|
||||||
glib_prefix = dependency('glib-2.0').get_pkgconfig_variable('prefix')
|
glib_prefix = dependency('glib-2.0').get_variable(pkgconfig: 'prefix')
|
||||||
glib_docpath = join_paths(glib_prefix, 'share', 'gtk-doc', 'html')
|
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(versioned_libname,
|
||||||
main_xml: 'libfprint-docs.xml',
|
main_xml: 'libfprint-docs.xml',
|
||||||
src_dir: join_paths(meson.source_root(), 'libfprint'),
|
src_dir: join_paths(meson.project_source_root(), 'libfprint'),
|
||||||
include_directories: include_directories('../libfprint'),
|
include_directories: include_directories('../libfprint'),
|
||||||
dependencies: libfprint_dep,
|
dependencies: libfprint_dep,
|
||||||
content_files: content_files,
|
content_files: content_files,
|
||||||
|
|||||||
@@ -21,3 +21,18 @@ 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
|
||||||
|
|||||||
@@ -0,0 +1,161 @@
|
|||||||
|
/*
|
||||||
|
* Shared library loader for libfprint
|
||||||
|
* Copyright (C) 2021 Marco Trevisan <marco.trevisan@canonical.com>
|
||||||
|
*
|
||||||
|
* This library is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
|
* License as published by the Free Software Foundation; either
|
||||||
|
* version 2.1 of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This library is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
|
* License along with this library; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <libfprint/fprint.h>
|
||||||
|
|
||||||
|
#include "libfprint/tod/tod-shared-loader.h"
|
||||||
|
#include "libfprint/fpi-device.h"
|
||||||
|
|
||||||
|
static char *
|
||||||
|
id_table_to_string (FpDeviceType device_type,
|
||||||
|
const FpIdEntry *id_table)
|
||||||
|
{
|
||||||
|
const FpIdEntry *entry;
|
||||||
|
char *str = NULL;
|
||||||
|
|
||||||
|
if (!id_table)
|
||||||
|
return g_strdup ("INVALID: Empty ID table");
|
||||||
|
|
||||||
|
entry = id_table;
|
||||||
|
while (TRUE)
|
||||||
|
{
|
||||||
|
g_autofree char *value = NULL;
|
||||||
|
|
||||||
|
if (device_type == FP_DEVICE_TYPE_VIRTUAL)
|
||||||
|
{
|
||||||
|
if (entry->virtual_envvar)
|
||||||
|
value = g_strdup (entry->virtual_envvar);
|
||||||
|
}
|
||||||
|
else if (device_type == FP_DEVICE_TYPE_USB)
|
||||||
|
{
|
||||||
|
if (entry->vid)
|
||||||
|
value = g_strdup_printf ("%04x:%04x", entry->vid, entry->pid);
|
||||||
|
}
|
||||||
|
else if (device_type == FP_DEVICE_TYPE_UDEV)
|
||||||
|
{
|
||||||
|
if (entry->hid_id.vid)
|
||||||
|
{
|
||||||
|
g_autofree gchar *udev_flags = NULL;
|
||||||
|
|
||||||
|
udev_flags = g_flags_to_string (fpi_device_udev_subtype_flags_get_type (),
|
||||||
|
entry->udev_types);
|
||||||
|
value = g_strdup_printf ("%s (%04x:%04x) [%s]",
|
||||||
|
entry->spi_acpi_id,
|
||||||
|
entry->hid_id.vid, entry->hid_id.pid,
|
||||||
|
udev_flags);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
value = g_strdup (entry->spi_acpi_id);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return g_strdup ("Unsupported device type");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!value)
|
||||||
|
return str;
|
||||||
|
|
||||||
|
if (!str)
|
||||||
|
{
|
||||||
|
str = g_steal_pointer (&value);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
g_autofree char *tmp = g_steal_pointer (&str);
|
||||||
|
str = g_strconcat (tmp, ", ", value, NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
entry++;
|
||||||
|
}
|
||||||
|
|
||||||
|
return str;
|
||||||
|
}
|
||||||
|
|
||||||
|
static const char *
|
||||||
|
device_type_to_string (FpDeviceType device_type)
|
||||||
|
{
|
||||||
|
g_autoptr(GEnumClass) device_types = g_type_class_ref (fp_device_type_get_type ());
|
||||||
|
GEnumValue *value = g_enum_get_value (device_types, device_type);
|
||||||
|
|
||||||
|
return value->value_nick;
|
||||||
|
}
|
||||||
|
|
||||||
|
static const char *
|
||||||
|
scan_type_to_string (FpScanType scan_type)
|
||||||
|
{
|
||||||
|
g_autoptr(GEnumClass) scan_types = g_type_class_ref (fp_scan_type_get_type ());
|
||||||
|
GEnumValue *value = g_enum_get_value (scan_types, scan_type);
|
||||||
|
|
||||||
|
return value->value_nick;
|
||||||
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
main (void)
|
||||||
|
{
|
||||||
|
g_autoptr(GArray) shared_drivers = NULL;
|
||||||
|
guint i;
|
||||||
|
|
||||||
|
tod_shared_drivers_register ();
|
||||||
|
|
||||||
|
shared_drivers = tod_shared_drivers_get ();
|
||||||
|
g_print ("Found %u drivers\n", shared_drivers->len);
|
||||||
|
|
||||||
|
for (i = 0; i < shared_drivers->len; i++)
|
||||||
|
{
|
||||||
|
GType driver = g_array_index (shared_drivers, GType, i);
|
||||||
|
g_autoptr(FpDeviceClass) cls = g_type_class_ref (driver);
|
||||||
|
g_autofree char *id_table = NULL;
|
||||||
|
g_autofree char *features = NULL;
|
||||||
|
|
||||||
|
id_table = id_table_to_string (cls->type, cls->id_table);
|
||||||
|
features = g_flags_to_string (fp_device_feature_get_type (), cls->features);
|
||||||
|
|
||||||
|
g_print ("ID: %s\n", cls->id);
|
||||||
|
g_print ("Full Name: %s\n", cls->full_name);
|
||||||
|
g_print ("Type: %s\n", device_type_to_string (cls->type));
|
||||||
|
g_print ("Enroll stages: %d\n", cls->nr_enroll_stages);
|
||||||
|
g_print ("Scan type: %s\n", scan_type_to_string (cls->scan_type));
|
||||||
|
g_print ("Seconds to get Hot: %d\n", cls->temp_hot_seconds);
|
||||||
|
g_print ("Seconds to get Cold: %d\n", cls->temp_cold_seconds);
|
||||||
|
g_print ("Supported Devices: %s\n", id_table);
|
||||||
|
g_print ("Supported features: %s\n", features);
|
||||||
|
g_print ("Implemented VFuncs:\n");
|
||||||
|
g_print (" usb_discover: %s\n", cls->usb_discover ? "true" : "false");
|
||||||
|
g_print (" probe: %s\n", cls->probe ? "true" : "false");
|
||||||
|
g_print (" open: %s\n", cls->open ? "true" : "false");
|
||||||
|
g_print (" close: %s\n", cls->close ? "true" : "false");
|
||||||
|
g_print (" suspend: %s\n", cls->suspend ? "true" : "false");
|
||||||
|
g_print (" resume: %s\n", cls->resume ? "true" : "false");
|
||||||
|
g_print (" enroll: %s\n", cls->enroll ? "true" : "false");
|
||||||
|
g_print (" verify: %s\n", cls->verify ? "true" : "false");
|
||||||
|
g_print (" identify: %s\n", cls->identify ? "true" : "false");
|
||||||
|
g_print (" capture: %s\n", cls->capture ? "true" : "false");
|
||||||
|
g_print (" list: %s\n", cls->list ? "true" : "false");
|
||||||
|
g_print (" delete: %s\n", cls->delete ? "true" : "false");
|
||||||
|
g_print (" clear_storage: %s\n", cls->clear_storage ? "true" : "false");
|
||||||
|
g_print (" cancel: %s\n", cls->cancel ? "true" : "false");
|
||||||
|
|
||||||
|
if (i < shared_drivers->len - 1)
|
||||||
|
g_print ("------------\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
tod_shared_drivers_unregister ();
|
||||||
|
}
|
||||||
@@ -124,7 +124,7 @@ G_DEFINE_TYPE (FpiDeviceAes4000, fpi_device_aes4000, FPI_TYPE_DEVICE_AES3K);
|
|||||||
|
|
||||||
|
|
||||||
static const FpIdEntry id_table[] = {
|
static const FpIdEntry id_table[] = {
|
||||||
{ .pid = 0x08ff, .vid = 0x5501 },
|
{ .vid = 0x08ff, .pid = 0x5501 },
|
||||||
{ .vid = 0, .pid = 0, .driver_data = 0 },
|
{ .vid = 0, .pid = 0, .driver_data = 0 },
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -190,7 +190,7 @@ data_resp_cb (FpiUsbTransfer *transfer, FpDevice *dev, gpointer user_data, GErro
|
|||||||
{
|
{
|
||||||
if (!self->stop && (self->strips_len > 0))
|
if (!self->stop && (self->strips_len > 0))
|
||||||
{
|
{
|
||||||
FpImage *img;
|
g_autoptr(FpImage) img = NULL;
|
||||||
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);
|
||||||
@@ -199,7 +199,7 @@ data_resp_cb (FpiUsbTransfer *transfer, FpDevice *dev, gpointer user_data, GErro
|
|||||||
self->strips = NULL;
|
self->strips = NULL;
|
||||||
self->strips_len = 0;
|
self->strips_len = 0;
|
||||||
FpImage *resizeImage = fpi_image_resize (img, EGIS0570_RESIZE, EGIS0570_RESIZE);
|
FpImage *resizeImage = fpi_image_resize (img, EGIS0570_RESIZE, EGIS0570_RESIZE);
|
||||||
fpi_image_device_image_captured (img_self, resizeImage);
|
fpi_image_device_image_captured (img_self, g_steal_pointer (&resizeImage));
|
||||||
}
|
}
|
||||||
|
|
||||||
fpi_image_device_report_finger_status (img_self, FALSE);
|
fpi_image_device_report_finger_status (img_self, FALSE);
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,222 @@
|
|||||||
|
/*
|
||||||
|
* Driver for Egis Technology (LighTuning) Match-On-Chip sensors
|
||||||
|
* Originally authored 2023 by Joshua Grisham <josh@joshuagrisham.com>
|
||||||
|
*
|
||||||
|
* Portions of code and logic inspired from the elanmoc libfprint driver
|
||||||
|
* which is copyright (C) 2021 Elan Microelectronics Inc (see elanmoc.c)
|
||||||
|
*
|
||||||
|
* Based on original reverse-engineering work by Joshua Grisham. The protocol has
|
||||||
|
* been reverse-engineered from captures of the official Windows driver, and by
|
||||||
|
* testing commands on the sensor with a multiplatform Python prototype driver:
|
||||||
|
* https://github.com/joshuagrisham/galaxy-book2-pro-linux/tree/main/fingerprint/
|
||||||
|
*
|
||||||
|
* This library is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
|
* License as published by the Free Software Foundation; either
|
||||||
|
* version 2.1 of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This library is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
|
* License along with this library; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "fpi-device.h"
|
||||||
|
#include "fpi-ssm.h"
|
||||||
|
|
||||||
|
G_DECLARE_FINAL_TYPE (FpiDeviceEgisMoc, fpi_device_egismoc, FPI, DEVICE_EGISMOC, FpDevice)
|
||||||
|
|
||||||
|
#define EGISMOC_DRIVER_FULLNAME "Egis Technology (LighTuning) Match-on-Chip"
|
||||||
|
|
||||||
|
#define EGISMOC_DRIVER_CHECK_PREFIX_TYPE1 (1 << 0)
|
||||||
|
#define EGISMOC_DRIVER_CHECK_PREFIX_TYPE2 (1 << 1)
|
||||||
|
|
||||||
|
#define EGISMOC_EP_CMD_OUT (0x02 | FPI_USB_ENDPOINT_OUT)
|
||||||
|
#define EGISMOC_EP_CMD_IN (0x81 | FPI_USB_ENDPOINT_IN)
|
||||||
|
#define EGISMOC_EP_CMD_INTERRUPT_IN 0x83
|
||||||
|
|
||||||
|
#define EGISMOC_USB_CONTROL_TIMEOUT 5000
|
||||||
|
#define EGISMOC_USB_SEND_TIMEOUT 5000
|
||||||
|
#define EGISMOC_USB_RECV_TIMEOUT 5000
|
||||||
|
#define EGISMOC_USB_INTERRUPT_TIMEOUT 60000
|
||||||
|
|
||||||
|
#define EGISMOC_USB_IN_RECV_LENGTH 4096
|
||||||
|
#define EGISMOC_USB_INTERRUPT_IN_RECV_LENGTH 64
|
||||||
|
|
||||||
|
#define EGISMOC_ENROLL_TIMES 10
|
||||||
|
#define EGISMOC_MAX_ENROLL_NUM 10
|
||||||
|
#define EGISMOC_FINGERPRINT_DATA_SIZE 32
|
||||||
|
#define EGISMOC_LIST_RESPONSE_PREFIX_SIZE 14
|
||||||
|
#define EGISMOC_LIST_RESPONSE_SUFFIX_SIZE 2
|
||||||
|
|
||||||
|
/* standard prefixes for all read/writes */
|
||||||
|
|
||||||
|
static guchar egismoc_write_prefix[] = {'E', 'G', 'I', 'S', 0x00, 0x00, 0x00, 0x01};
|
||||||
|
static gsize egismoc_write_prefix_len = sizeof (egismoc_write_prefix) / sizeof (egismoc_write_prefix[0]);
|
||||||
|
|
||||||
|
static guchar egismoc_read_prefix[] = {'S', 'I', 'G', 'E', 0x00, 0x00, 0x00, 0x01};
|
||||||
|
static gsize egismoc_read_prefix_len = sizeof (egismoc_read_prefix) / sizeof (egismoc_read_prefix[0]);
|
||||||
|
|
||||||
|
|
||||||
|
/* hard-coded command payloads */
|
||||||
|
|
||||||
|
static guchar cmd_fw_version[] = {0x00, 0x00, 0x00, 0x07, 0x50, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x0c};
|
||||||
|
static gsize cmd_fw_version_len = sizeof (cmd_fw_version) / sizeof (cmd_fw_version[0]);
|
||||||
|
static guchar rsp_fw_version_suffix[] = {0x90, 0x00};
|
||||||
|
static gsize rsp_fw_version_suffix_len = sizeof (rsp_fw_version_suffix) / sizeof (rsp_fw_version_suffix[0]);
|
||||||
|
|
||||||
|
static guchar cmd_list[] = {0x00, 0x00, 0x00, 0x07, 0x50, 0x19, 0x04, 0x00, 0x00, 0x01, 0x40};
|
||||||
|
static gsize cmd_list_len = sizeof (cmd_list) / sizeof (cmd_list[0]);
|
||||||
|
|
||||||
|
static guchar cmd_sensor_reset[] = {0x00, 0x00, 0x00, 0x04, 0x50, 0x1a, 0x00, 0x00};
|
||||||
|
static gsize cmd_sensor_reset_len = sizeof (cmd_sensor_reset) / sizeof (cmd_sensor_reset[0]);
|
||||||
|
|
||||||
|
static guchar cmd_sensor_check[] = {0x00, 0x00, 0x00, 0x04, 0x50, 0x17, 0x02, 0x00};
|
||||||
|
static gsize cmd_sensor_check_len = sizeof (cmd_sensor_check) / sizeof (cmd_sensor_check[0]);
|
||||||
|
|
||||||
|
static guchar cmd_sensor_identify[] = {0x00, 0x00, 0x00, 0x04, 0x50, 0x17, 0x01, 0x01};
|
||||||
|
static gsize cmd_sensor_identify_len = sizeof (cmd_sensor_identify) / sizeof (cmd_sensor_identify[0]);
|
||||||
|
static guchar rsp_identify_match_suffix[] = {0x90, 0x00};
|
||||||
|
static gsize rsp_identify_match_suffix_len = sizeof (rsp_identify_match_suffix) / sizeof (rsp_identify_match_suffix[0]);
|
||||||
|
static guchar rsp_identify_notmatch_suffix[] = {0x90, 0x04};
|
||||||
|
static gsize rsp_identify_notmatch_suffix_len = sizeof (rsp_identify_notmatch_suffix) / sizeof (rsp_identify_notmatch_suffix[0]);
|
||||||
|
|
||||||
|
static guchar cmd_sensor_enroll[] = {0x00, 0x00, 0x00, 0x04, 0x50, 0x17, 0x01, 0x00};
|
||||||
|
static gsize cmd_sensor_enroll_len = sizeof (cmd_sensor_enroll) / sizeof (cmd_sensor_enroll[0]);
|
||||||
|
|
||||||
|
static guchar cmd_enroll_starting[] = {0x00, 0x00, 0x00, 0x07, 0x50, 0x16, 0x01, 0x00, 0x00, 0x00, 0x20};
|
||||||
|
static gsize cmd_enroll_starting_len = sizeof (cmd_enroll_starting) / sizeof (cmd_enroll_starting[0]);
|
||||||
|
|
||||||
|
static guchar cmd_sensor_start_capture[] = {0x00, 0x00, 0x00, 0x04, 0x50, 0x16, 0x02, 0x01};
|
||||||
|
static gsize cmd_sensor_start_capture_len = sizeof (cmd_sensor_start_capture) / sizeof (cmd_sensor_start_capture[0]);
|
||||||
|
|
||||||
|
static guchar cmd_read_capture[] = {0x00, 0x00, 0x00, 0x07, 0x50, 0x16, 0x02, 0x02, 0x00, 0x00, 0x02};
|
||||||
|
static gsize cmd_read_capture_len = sizeof (cmd_read_capture) / sizeof (cmd_read_capture[0]);
|
||||||
|
static guchar rsp_read_success_prefix[] = {0x00, 0x00, 0x00, 0x04};
|
||||||
|
static gsize rsp_read_success_prefix_len = sizeof (rsp_read_success_prefix) / sizeof (rsp_read_success_prefix[0]);
|
||||||
|
static guchar rsp_read_success_suffix[] = {0x0a, 0x90, 0x00};
|
||||||
|
static gsize rsp_read_success_suffix_len = sizeof (rsp_read_success_suffix) / sizeof (rsp_read_success_suffix[0]);
|
||||||
|
static guchar rsp_read_offcenter_prefix[] = {0x00, 0x00, 0x00, 0x04};
|
||||||
|
static gsize rsp_read_offcenter_prefix_len = sizeof (rsp_read_offcenter_prefix) / sizeof (rsp_read_offcenter_prefix[0]);
|
||||||
|
static guchar rsp_read_offcenter_suffix[] = {0x0a, 0x64, 0x91};
|
||||||
|
static gsize rsp_read_offcenter_suffix_len = sizeof (rsp_read_offcenter_suffix) / sizeof (rsp_read_offcenter_suffix[0]);
|
||||||
|
static guchar rsp_read_dirty_prefix[] = {0x00, 0x00, 0x00, 0x02, 0x64};
|
||||||
|
static gsize rsp_read_dirty_prefix_len = sizeof (rsp_read_dirty_prefix) / sizeof (rsp_read_dirty_prefix[0]);
|
||||||
|
|
||||||
|
static guchar cmd_commit_starting[] = {0x00, 0x00, 0x00, 0x07, 0x50, 0x16, 0x05, 0x00, 0x00, 0x00, 0x20};
|
||||||
|
static gsize cmd_commit_starting_len = sizeof (cmd_commit_starting) / sizeof (cmd_commit_starting[0]);
|
||||||
|
|
||||||
|
|
||||||
|
/* commands which exist on the device but are currently not used */
|
||||||
|
/*
|
||||||
|
static guchar cmd_sensor_cancel[] = {0x00, 0x00, 0x00, 0x04, 0x50, 0x16, 0x04, 0x00};
|
||||||
|
static gsize cmd_sensor_cancel_len = sizeof(cmd_sensor_cancel) / sizeof(cmd_sensor_cancel[0]);
|
||||||
|
|
||||||
|
static guchar cmd_sensor_verify[] = {0x00, 0x00, 0x00, 0x04, 0x50, 0x04, 0x01, 0x00};
|
||||||
|
static gsize cmd_sensor_verify_len = sizeof(cmd_sensor_verify) / sizeof(cmd_sensor_verify[0]);
|
||||||
|
|
||||||
|
static guchar cmd_read_verify[] = {0x00, 0x00, 0x00, 0x04, 0x50, 0x04, 0x02, 0x00};
|
||||||
|
static gsize cmd_read_verify_len = sizeof(cmd_read_verify) / sizeof(cmd_read_verify[0]);
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
/* prefixes/suffixes and other things for dynamically created command payloads */
|
||||||
|
|
||||||
|
#define EGISMOC_CHECK_BYTES_LENGTH 2
|
||||||
|
#define EGISMOC_IDENTIFY_RESPONSE_PRINT_ID_OFFSET 46
|
||||||
|
#define EGISMOC_CMD_CHECK_SEPARATOR_LENGTH 32
|
||||||
|
|
||||||
|
static guchar cmd_new_print_prefix[] = {0x00, 0x00, 0x00, 0x27, 0x50, 0x16, 0x03, 0x00, 0x00, 0x00, 0x20};
|
||||||
|
static gsize cmd_new_print_prefix_len = sizeof (cmd_new_print_prefix) / sizeof (cmd_new_print_prefix[0]);
|
||||||
|
|
||||||
|
static guchar cmd_delete_prefix[] = {0x50, 0x18, 0x04, 0x00, 0x00};
|
||||||
|
static gsize cmd_delete_prefix_len = sizeof (cmd_delete_prefix) / sizeof (cmd_delete_prefix[0]);
|
||||||
|
static guchar rsp_delete_success_prefix[] = {0x00, 0x00, 0x00, 0x02, 0x90, 0x00};
|
||||||
|
static gsize rsp_delete_success_prefix_len = sizeof (rsp_delete_success_prefix) / sizeof (rsp_delete_success_prefix[0]);
|
||||||
|
|
||||||
|
static guchar cmd_check_prefix_type1[] = {0x50, 0x17, 0x03, 0x00, 0x00};
|
||||||
|
static gsize cmd_check_prefix_type1_len = sizeof (cmd_check_prefix_type1) / sizeof (cmd_check_prefix_type1[0]);
|
||||||
|
static guchar cmd_check_prefix_type2[] = {0x50, 0x17, 0x03, 0x80, 0x00};
|
||||||
|
static gsize cmd_check_prefix_type2_len = sizeof (cmd_check_prefix_type2) / sizeof (cmd_check_prefix_type2[0]);
|
||||||
|
static guchar cmd_check_suffix[] = {0x00, 0x40};
|
||||||
|
static gsize cmd_check_suffix_len = sizeof (cmd_check_suffix) / sizeof (cmd_check_suffix[0]);
|
||||||
|
static guchar rsp_check_not_yet_enrolled_suffix[] = {0x90, 0x04};
|
||||||
|
static gsize rsp_check_not_yet_enrolled_suffix_len = sizeof (rsp_check_not_yet_enrolled_suffix) / sizeof (rsp_check_not_yet_enrolled_suffix[0]);
|
||||||
|
|
||||||
|
|
||||||
|
/* SSM task states and various status enums */
|
||||||
|
|
||||||
|
typedef enum {
|
||||||
|
CMD_SEND,
|
||||||
|
CMD_GET,
|
||||||
|
CMD_STATES,
|
||||||
|
} CommandStates;
|
||||||
|
|
||||||
|
typedef enum {
|
||||||
|
DEV_INIT_CONTROL1,
|
||||||
|
DEV_INIT_CONTROL2,
|
||||||
|
DEV_INIT_CONTROL3,
|
||||||
|
DEV_INIT_CONTROL4,
|
||||||
|
DEV_INIT_CONTROL5,
|
||||||
|
DEV_GET_FW_VERSION,
|
||||||
|
DEV_INIT_STATES,
|
||||||
|
} DeviceInitStates;
|
||||||
|
|
||||||
|
typedef enum {
|
||||||
|
IDENTIFY_GET_ENROLLED_IDS,
|
||||||
|
IDENTIFY_CHECK_ENROLLED_NUM,
|
||||||
|
IDENTIFY_SENSOR_RESET,
|
||||||
|
IDENTIFY_SENSOR_IDENTIFY,
|
||||||
|
IDENTIFY_WAIT_FINGER,
|
||||||
|
IDENTIFY_SENSOR_CHECK,
|
||||||
|
IDENTIFY_CHECK,
|
||||||
|
IDENTIFY_COMPLETE_SENSOR_RESET,
|
||||||
|
IDENTIFY_COMPLETE,
|
||||||
|
IDENTIFY_STATES,
|
||||||
|
} IdentifyStates;
|
||||||
|
|
||||||
|
typedef enum {
|
||||||
|
ENROLL_GET_ENROLLED_IDS,
|
||||||
|
ENROLL_CHECK_ENROLLED_NUM,
|
||||||
|
ENROLL_SENSOR_RESET,
|
||||||
|
ENROLL_SENSOR_ENROLL,
|
||||||
|
ENROLL_WAIT_FINGER,
|
||||||
|
ENROLL_SENSOR_CHECK,
|
||||||
|
ENROLL_CHECK,
|
||||||
|
ENROLL_START,
|
||||||
|
ENROLL_CAPTURE_SENSOR_RESET,
|
||||||
|
ENROLL_CAPTURE_SENSOR_START_CAPTURE,
|
||||||
|
ENROLL_CAPTURE_WAIT_FINGER,
|
||||||
|
ENROLL_CAPTURE_READ_RESPONSE,
|
||||||
|
ENROLL_COMMIT_START,
|
||||||
|
ENROLL_COMMIT,
|
||||||
|
ENROLL_COMMIT_SENSOR_RESET,
|
||||||
|
ENROLL_COMPLETE,
|
||||||
|
ENROLL_STATES,
|
||||||
|
} EnrollStates;
|
||||||
|
|
||||||
|
typedef enum {
|
||||||
|
ENROLL_STATUS_DEVICE_FULL,
|
||||||
|
ENROLL_STATUS_DUPLICATE,
|
||||||
|
ENROLL_STATUS_PARTIAL_OK,
|
||||||
|
ENROLL_STATUS_RETRY,
|
||||||
|
ENROLL_STATUS_COMPLETE,
|
||||||
|
} EnrollStatus;
|
||||||
|
|
||||||
|
typedef enum {
|
||||||
|
LIST_GET_ENROLLED_IDS,
|
||||||
|
LIST_RETURN_ENROLLED_PRINTS,
|
||||||
|
LIST_STATES,
|
||||||
|
} ListStates;
|
||||||
|
|
||||||
|
typedef enum {
|
||||||
|
DELETE_GET_ENROLLED_IDS,
|
||||||
|
DELETE_DELETE,
|
||||||
|
DELETE_STATES,
|
||||||
|
} DeleteStates;
|
||||||
@@ -357,7 +357,7 @@ elan_cmd_cb (FpiUsbTransfer *transfer, FpDevice *dev,
|
|||||||
if (transfer->endpoint & FPI_USB_ENDPOINT_IN)
|
if (transfer->endpoint & FPI_USB_ENDPOINT_IN)
|
||||||
{
|
{
|
||||||
/* just finished receiving */
|
/* just finished receiving */
|
||||||
self->last_read = g_memdup (transfer->buffer, transfer->actual_length);
|
self->last_read = g_memdup2 (transfer->buffer, transfer->actual_length);
|
||||||
elan_cmd_done (ssm);
|
elan_cmd_done (ssm);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -215,6 +215,7 @@ static const FpIdEntry elan_id_table[] = {
|
|||||||
{.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 = 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 = 0x0c4d, .driver_data = ELAN_ALL_DEV},
|
||||||
{.vid = ELAN_VEND_ID, .pid = 0x0c4f, .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 = 0x0c63, .driver_data = ELAN_ALL_DEV},
|
||||||
|
|||||||
@@ -27,6 +27,11 @@ G_DEFINE_TYPE (FpiDeviceElanmoc, fpi_device_elanmoc, FP_TYPE_DEVICE)
|
|||||||
static const FpIdEntry id_table[] = {
|
static const FpIdEntry id_table[] = {
|
||||||
{ .vid = 0x04f3, .pid = 0x0c7d, },
|
{ .vid = 0x04f3, .pid = 0x0c7d, },
|
||||||
{ .vid = 0x04f3, .pid = 0x0c7e, },
|
{ .vid = 0x04f3, .pid = 0x0c7e, },
|
||||||
|
{ .vid = 0x04f3, .pid = 0x0c82, },
|
||||||
|
{ .vid = 0x04f3, .pid = 0x0c88, },
|
||||||
|
{ .vid = 0x04f3, .pid = 0x0c8c, },
|
||||||
|
{ .vid = 0x04f3, .pid = 0x0c8d, },
|
||||||
|
{ .vid = 0x04f3, .pid = 0x0c99, },
|
||||||
{ .vid = 0, .pid = 0, .driver_data = 0 }, /* terminating entry */
|
{ .vid = 0, .pid = 0, .driver_data = 0 }, /* terminating entry */
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -45,9 +50,9 @@ elanmoc_compose_cmd (
|
|||||||
const struct elanmoc_cmd *cmd_info
|
const struct elanmoc_cmd *cmd_info
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
g_autofree char *cmd_buf = NULL;
|
g_autofree uint8_t *cmd_buf = NULL;
|
||||||
|
|
||||||
cmd_buf = g_malloc0 (cmd_info->cmd_len);
|
cmd_buf = g_new0 (uint8_t, cmd_info->cmd_len);
|
||||||
if(cmd_info->cmd_len < ELAN_MAX_HDR_LEN)
|
if(cmd_info->cmd_len < ELAN_MAX_HDR_LEN)
|
||||||
memcpy (cmd_buf, &cmd_info->cmd_header, cmd_info->cmd_len);
|
memcpy (cmd_buf, &cmd_info->cmd_header, cmd_info->cmd_len);
|
||||||
else
|
else
|
||||||
@@ -375,9 +380,9 @@ elanmoc_enroll_cb (FpiDeviceElanmoc *self,
|
|||||||
enroll_status_report (self, ENROLL_RSP_RETRY, self->num_frames, NULL);
|
enroll_status_report (self, ENROLL_RSP_RETRY, self->num_frames, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (self->num_frames == ELAN_MOC_ENROLL_TIMES && buffer_in[1] == ELAN_MSG_OK)
|
if (self->num_frames == self->max_moc_enroll_time && buffer_in[1] == ELAN_MSG_OK)
|
||||||
fpi_ssm_next_state (self->task_ssm);
|
fpi_ssm_next_state (self->task_ssm);
|
||||||
else if (self->num_frames < ELAN_MOC_ENROLL_TIMES)
|
else if (self->num_frames < self->max_moc_enroll_time)
|
||||||
fpi_ssm_jump_to_state (self->task_ssm, MOC_ENROLL_WAIT_FINGER);
|
fpi_ssm_jump_to_state (self->task_ssm, MOC_ENROLL_WAIT_FINGER);
|
||||||
else
|
else
|
||||||
fpi_ssm_mark_failed (self->task_ssm, error);
|
fpi_ssm_mark_failed (self->task_ssm, error);
|
||||||
@@ -440,7 +445,7 @@ elan_enroll_run_state (FpiSsm *ssm, FpDevice *dev)
|
|||||||
case MOC_ENROLL_WAIT_FINGER:
|
case MOC_ENROLL_WAIT_FINGER:
|
||||||
cmd_buf = elanmoc_compose_cmd (&elanmoc_enroll_cmd);
|
cmd_buf = elanmoc_compose_cmd (&elanmoc_enroll_cmd);
|
||||||
cmd_buf[3] = self->curr_enrolled;
|
cmd_buf[3] = self->curr_enrolled;
|
||||||
cmd_buf[4] = ELAN_MOC_ENROLL_TIMES;
|
cmd_buf[4] = self->max_moc_enroll_time;
|
||||||
cmd_buf[5] = self->num_frames;
|
cmd_buf[5] = self->num_frames;
|
||||||
elanmoc_get_cmd (dev, cmd_buf, elanmoc_enroll_cmd.cmd_len, elanmoc_enroll_cmd.resp_len, 1, elanmoc_enroll_cb);
|
elanmoc_get_cmd (dev, cmd_buf, elanmoc_enroll_cmd.cmd_len, elanmoc_enroll_cmd.resp_len, 1, elanmoc_enroll_cb);
|
||||||
break;
|
break;
|
||||||
@@ -505,7 +510,7 @@ create_print_from_response (FpiDeviceElanmoc *self,
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
userid = g_memdup (&buffer_in[5], userid_len);
|
userid = g_memdup2 (&buffer_in[5], userid_len);
|
||||||
userid_safe = g_strndup ((const char *) &buffer_in[5], userid_len);
|
userid_safe = g_strndup ((const char *) &buffer_in[5], userid_len);
|
||||||
print = fp_print_new (FP_DEVICE (self));
|
print = fp_print_new (FP_DEVICE (self));
|
||||||
uid = g_variant_new_fixed_array (G_VARIANT_TYPE_BYTE, userid, userid_len, 1);
|
uid = g_variant_new_fixed_array (G_VARIANT_TYPE_BYTE, userid, userid_len, 1);
|
||||||
@@ -757,6 +762,7 @@ identify_status_report (FpiDeviceElanmoc *self, int verify_status_id,
|
|||||||
}
|
}
|
||||||
|
|
||||||
enum identify_states {
|
enum identify_states {
|
||||||
|
IDENTIFY_SET_MODE,
|
||||||
IDENTIFY_WAIT_FINGER,
|
IDENTIFY_WAIT_FINGER,
|
||||||
IDENTIFY_NUM_STATES,
|
IDENTIFY_NUM_STATES,
|
||||||
};
|
};
|
||||||
@@ -792,6 +798,13 @@ elan_identify_run_state (FpiSsm *ssm, FpDevice *dev)
|
|||||||
fp_info ("elanmoc %s ", __func__);
|
fp_info ("elanmoc %s ", __func__);
|
||||||
switch (fpi_ssm_get_cur_state (ssm))
|
switch (fpi_ssm_get_cur_state (ssm))
|
||||||
{
|
{
|
||||||
|
case IDENTIFY_SET_MODE:
|
||||||
|
fp_info ("elanmoc %s IDENTIFY_SET_MODE", __func__);
|
||||||
|
cmd_buf = elanmoc_compose_cmd (&elanmoc_set_mod_cmd);
|
||||||
|
cmd_buf[3] = 0x03;
|
||||||
|
elanmoc_get_cmd (dev, cmd_buf, elanmoc_set_mod_cmd.cmd_len, elanmoc_set_mod_cmd.resp_len, 0, elanmoc_cmd_ack_cb);
|
||||||
|
break;
|
||||||
|
|
||||||
case IDENTIFY_WAIT_FINGER:
|
case IDENTIFY_WAIT_FINGER:
|
||||||
fp_info ("elanmoc %s VERIFY_WAIT_FINGER", __func__);
|
fp_info ("elanmoc %s VERIFY_WAIT_FINGER", __func__);
|
||||||
cmd_buf = elanmoc_compose_cmd (&elanmoc_verify_cmd);
|
cmd_buf = elanmoc_compose_cmd (&elanmoc_verify_cmd);
|
||||||
@@ -998,6 +1011,12 @@ elanmoc_get_status_cb (FpiDeviceElanmoc *self,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (buffer_in[1] != 0x03 && self->cmd_retry_cnt != 0)
|
if (buffer_in[1] != 0x03 && self->cmd_retry_cnt != 0)
|
||||||
|
{
|
||||||
|
self->cmd_retry_cnt--;
|
||||||
|
cmd_buf = elanmoc_compose_cmd (&cal_status_cmd);
|
||||||
|
elanmoc_get_cmd (FP_DEVICE (self), cmd_buf, cal_status_cmd.cmd_len, cal_status_cmd.resp_len, 0, elanmoc_get_status_cb);
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
if(self->cmd_retry_cnt == 0)
|
if(self->cmd_retry_cnt == 0)
|
||||||
{
|
{
|
||||||
@@ -1006,12 +1025,6 @@ elanmoc_get_status_cb (FpiDeviceElanmoc *self,
|
|||||||
"Sensor not ready"));
|
"Sensor not ready"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
self->cmd_retry_cnt--;
|
|
||||||
cmd_buf = elanmoc_compose_cmd (&cal_status_cmd);
|
|
||||||
elanmoc_get_cmd (FP_DEVICE (self), cmd_buf, cal_status_cmd.cmd_len, cal_status_cmd.resp_len, 0, elanmoc_get_status_cb);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
fpi_ssm_next_state (self->task_ssm);
|
fpi_ssm_next_state (self->task_ssm);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1059,6 +1072,7 @@ elanmoc_open (FpDevice *device)
|
|||||||
{
|
{
|
||||||
FpiDeviceElanmoc *self = FPI_DEVICE_ELANMOC (device);
|
FpiDeviceElanmoc *self = FPI_DEVICE_ELANMOC (device);
|
||||||
GError *error = NULL;
|
GError *error = NULL;
|
||||||
|
gint productid = 0;
|
||||||
|
|
||||||
if (!g_usb_device_reset (fpi_device_get_usb_device (device), &error))
|
if (!g_usb_device_reset (fpi_device_get_usb_device (device), &error))
|
||||||
goto error;
|
goto error;
|
||||||
@@ -1066,6 +1080,28 @@ elanmoc_open (FpDevice *device)
|
|||||||
if (!g_usb_device_claim_interface (fpi_device_get_usb_device (device), 0, 0, &error))
|
if (!g_usb_device_claim_interface (fpi_device_get_usb_device (device), 0, 0, &error))
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
|
productid = g_usb_device_get_pid (fpi_device_get_usb_device (device));
|
||||||
|
switch (productid)
|
||||||
|
{
|
||||||
|
case 0x0c8c:
|
||||||
|
self->max_moc_enroll_time = 11;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 0x0c99:
|
||||||
|
self->max_moc_enroll_time = 14;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 0x0c8d:
|
||||||
|
self->max_moc_enroll_time = 17;
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
self->max_moc_enroll_time = ELAN_MOC_ENROLL_TIMES;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
fpi_device_set_nr_enroll_stages (device, self->max_moc_enroll_time);
|
||||||
|
|
||||||
self->task_ssm = fpi_ssm_new (FP_DEVICE (self), dev_init_handler, DEV_INIT_STATES);
|
self->task_ssm = fpi_ssm_new (FP_DEVICE (self), dev_init_handler, DEV_INIT_STATES);
|
||||||
fpi_ssm_start (self->task_ssm, task_ssm_init_done);
|
fpi_ssm_start (self->task_ssm, task_ssm_init_done);
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -188,6 +188,7 @@ struct _FpiDeviceElanmoc
|
|||||||
unsigned char y_trace;
|
unsigned char y_trace;
|
||||||
int num_frames;
|
int num_frames;
|
||||||
int curr_enrolled;
|
int curr_enrolled;
|
||||||
|
int max_moc_enroll_time;
|
||||||
int cancel_result;
|
int cancel_result;
|
||||||
int cmd_retry_cnt;
|
int cmd_retry_cnt;
|
||||||
int list_index;
|
int list_index;
|
||||||
|
|||||||
@@ -348,6 +348,7 @@ static const FpIdEntry elanspi_id_table[] = {
|
|||||||
{.udev_types = ELANSPI_UDEV_TYPES, .spi_acpi_id = "ELAN7001", .hid_id = {.vid = ELANSPI_TP_VID, .pid = 0x30b2}, .driver_data = ELANSPI_NO_ROTATE},
|
{.udev_types = ELANSPI_UDEV_TYPES, .spi_acpi_id = "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 = "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 = 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}
|
{.udev_types = 0}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,52 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2021 Focaltech Microelectronics
|
||||||
|
*
|
||||||
|
* This library is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
|
* License as published by the Free Software Foundation; either
|
||||||
|
* version 2.1 of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This library is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
|
* License along with this library; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "fpi-device.h"
|
||||||
|
#include "fpi-ssm.h"
|
||||||
|
#include <libusb.h>
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
|
||||||
|
G_DECLARE_FINAL_TYPE (FpiDeviceFocaltechMoc, fpi_device_focaltech_moc, FPI, DEVICE_FOCALTECH_MOC, FpDevice)
|
||||||
|
|
||||||
|
#define FOCALTECH_MOC_DRIVER_FULLNAME "Focaltech MOC Sensors"
|
||||||
|
|
||||||
|
#define FOCALTECH_MOC_CMD_TIMEOUT 1000
|
||||||
|
#define FOCALTECH_MOC_MAX_FINGERS 10
|
||||||
|
#define FOCALTECH_MOC_UID_PREFIX_LENGTH 8
|
||||||
|
#define FOCALTECH_MOC_USER_ID_LENGTH 64
|
||||||
|
|
||||||
|
typedef void (*FocaltechCmdMsgCallback) (FpiDeviceFocaltechMoc *self,
|
||||||
|
GError *error);
|
||||||
|
|
||||||
|
struct _FpiDeviceFocaltechMoc
|
||||||
|
{
|
||||||
|
FpDevice parent;
|
||||||
|
FpiSsm *task_ssm;
|
||||||
|
FpiSsm *cmd_ssm;
|
||||||
|
FpiUsbTransfer *cmd_transfer;
|
||||||
|
gboolean cmd_cancelable;
|
||||||
|
gsize cmd_len_in;
|
||||||
|
int num_frames;
|
||||||
|
int delete_slot;
|
||||||
|
guint8 bulk_in_ep;
|
||||||
|
guint8 bulk_out_ep;
|
||||||
|
};
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,221 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2022 Fingerprint Cards AB <tech@fingerprints.com>
|
||||||
|
*
|
||||||
|
* This library is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
|
* License as published by the Free Software Foundation; either
|
||||||
|
* version 2.1 of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This library is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
|
* License along with this library; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "fpi-device.h"
|
||||||
|
#include "fpi-ssm.h"
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
|
||||||
|
#define TEMPLATE_ID_SIZE (32)
|
||||||
|
#define MAX_FW_VERSION_STR_LEN (16)
|
||||||
|
#define FPC_CMD_INIT (0x01)
|
||||||
|
#define FPC_CMD_ARM (0x02)
|
||||||
|
#define FPC_CMD_ABORT (0x03)
|
||||||
|
#define FPC_CMD_INDICATE_S_STATE (0x08)
|
||||||
|
#define FPC_CMD_GET_IMG (0x09)
|
||||||
|
#define FPC_CMD_GET_KPI (0x0C)
|
||||||
|
#define FPC_CMD_LOAD_DB (0x60)
|
||||||
|
#define FPC_CMD_STORE_DB (0x61)
|
||||||
|
#define FPC_CMD_DELETE_DB (0x62)
|
||||||
|
#define FPC_CMD_DELETE_TEMPLATE (0x63)
|
||||||
|
#define FPC_CMD_BEGIN_ENROL (0x67)
|
||||||
|
#define FPC_CMD_ENROL (0x68)
|
||||||
|
#define FPC_CMD_END_ENROL (0x69)
|
||||||
|
#define FPC_CMD_BIND_IDENTITY (0x6A)
|
||||||
|
#define FPC_CMD_IDENTIFY (0x6B)
|
||||||
|
#define FPC_CMD_ENUM (0x70)
|
||||||
|
#define FPC_EVT_INIT_RESULT (0x02)
|
||||||
|
#define FPC_EVT_FINGER_DWN (0x06)
|
||||||
|
#define FPC_EVT_IMG (0x08)
|
||||||
|
#define FPC_EVT_FID_DATA (0x31)
|
||||||
|
#define FPC_DB_ID_LEN (16)
|
||||||
|
#define FPC_IDENTITY_TYPE_WILDCARD (0x1)
|
||||||
|
#define FPC_IDENTITY_TYPE_RESERVED (0x3)
|
||||||
|
#define FPC_IDENTITY_WILDCARD (0x25066282)
|
||||||
|
#define FPC_SUBTYPE_ANY (0xFF)
|
||||||
|
#define FPC_SUBTYPE_RESERVED (0xF5)
|
||||||
|
#define FPC_SUBTYPE_NOINFORMATION (0x00)
|
||||||
|
#define FPC_CAPTUREID_RESERVED (0x701100F)
|
||||||
|
#define FPC_SESSIONID_RESERVED (0x0077FF12)
|
||||||
|
#define FPC_TEMPLATES_MAX (10)
|
||||||
|
#define SECURITY_MAX_SID_SIZE (68)
|
||||||
|
#define FPC_HOST_MS_S0 (0x10)
|
||||||
|
#define FPC_HOST_MS_SX (0x11)
|
||||||
|
|
||||||
|
G_DECLARE_FINAL_TYPE (FpiDeviceFpcMoc, fpi_device_fpcmoc, FPI,
|
||||||
|
DEVICE_FPCMOC, FpDevice);
|
||||||
|
|
||||||
|
typedef struct _FPC_FID_DATA
|
||||||
|
{
|
||||||
|
guint32 identity_type;
|
||||||
|
guint32 reserved;
|
||||||
|
guint32 identity_size;
|
||||||
|
guint32 subfactor;
|
||||||
|
guint8 data[SECURITY_MAX_SID_SIZE];
|
||||||
|
} FPC_FID_DATA, *PFPC_FID_DATA;
|
||||||
|
|
||||||
|
typedef struct _FPC_LOAD_DB
|
||||||
|
{
|
||||||
|
gint32 status;
|
||||||
|
guint32 reserved;
|
||||||
|
guint32 database_id_size;
|
||||||
|
guint8 data[FPC_DB_ID_LEN];
|
||||||
|
} FPC_LOAD_DB, *PFPC_LOAD_DB;
|
||||||
|
|
||||||
|
typedef union _FPC_DELETE_DB
|
||||||
|
{
|
||||||
|
guint32 reserved;
|
||||||
|
guint32 database_id_size;
|
||||||
|
guint8 data[FPC_DB_ID_LEN];
|
||||||
|
} FPC_DB_OP, *PFPC_DB_OP;
|
||||||
|
|
||||||
|
typedef struct _FPC_BEGIN_ENROL
|
||||||
|
{
|
||||||
|
gint32 status;
|
||||||
|
guint32 reserved1;
|
||||||
|
guint32 reserved2;
|
||||||
|
} FPC_BEGIN_ENROL, *PFPC_BEGIN_ENROL;
|
||||||
|
|
||||||
|
typedef struct _FPC_ENROL
|
||||||
|
{
|
||||||
|
gint32 status;
|
||||||
|
guint32 remaining;
|
||||||
|
} FPC_ENROL, *PFPC_ENROL;
|
||||||
|
|
||||||
|
typedef struct _FPC_END_ENROL
|
||||||
|
{
|
||||||
|
gint32 status;
|
||||||
|
guint32 fid;
|
||||||
|
} FPC_END_ENROL, *PFPC_END_ENROL;
|
||||||
|
|
||||||
|
typedef struct _FPC_IDENTIFY
|
||||||
|
{
|
||||||
|
gint32 status;
|
||||||
|
guint32 identity_type;
|
||||||
|
guint32 identity_offset;
|
||||||
|
guint32 identity_size;
|
||||||
|
guint32 subfactor;
|
||||||
|
guint8 data[SECURITY_MAX_SID_SIZE];
|
||||||
|
} FPC_IDENTIFY, *PFPC_IDENTIFY;
|
||||||
|
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
guint32 cmdid;
|
||||||
|
guint32 length;
|
||||||
|
guint32 status;
|
||||||
|
} evt_hdr_t;
|
||||||
|
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
evt_hdr_t hdr;
|
||||||
|
guint16 sensor;
|
||||||
|
guint16 hw_id;
|
||||||
|
guint16 img_w;
|
||||||
|
guint16 img_h;
|
||||||
|
guint8 fw_version[MAX_FW_VERSION_STR_LEN];
|
||||||
|
guint16 fw_capabilities;
|
||||||
|
} evt_initiated_t;
|
||||||
|
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
guint8 subfactor;
|
||||||
|
guint32 identity_type;
|
||||||
|
guint32 identity_size;
|
||||||
|
guint8 identity[SECURITY_MAX_SID_SIZE];
|
||||||
|
} __attribute__((packed)) fpc_fid_data_t;
|
||||||
|
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
evt_hdr_t hdr;
|
||||||
|
gint status;
|
||||||
|
guint32 num_ids;
|
||||||
|
fpc_fid_data_t fid_data[FPC_TEMPLATES_MAX];
|
||||||
|
} __attribute__((packed)) evt_enum_fids_t;
|
||||||
|
|
||||||
|
typedef struct _fp_cmd_response
|
||||||
|
{
|
||||||
|
union
|
||||||
|
{
|
||||||
|
evt_hdr_t evt_hdr;
|
||||||
|
evt_initiated_t evt_inited;
|
||||||
|
evt_enum_fids_t evt_enum_fids;
|
||||||
|
};
|
||||||
|
} fpc_cmd_response_t, *pfpc_cmd_response_t;
|
||||||
|
|
||||||
|
enum {
|
||||||
|
FPC_ENROL_STATUS_COMPLETED = 0,
|
||||||
|
FPC_ENROL_STATUS_PROGRESS = 1,
|
||||||
|
FPC_ENROL_STATUS_FAILED_COULD_NOT_COMPLETE = 2,
|
||||||
|
FPC_ENROL_STATUS_FAILED_ALREADY_ENROLED = 3,
|
||||||
|
FPC_ENROL_STATUS_IMAGE_LOW_COVERAGE = 4,
|
||||||
|
FPC_ENROL_STATUS_IMAGE_TOO_SIMILAR = 5,
|
||||||
|
FPC_ENROL_STATUS_IMAGE_LOW_QUALITY = 6,
|
||||||
|
};
|
||||||
|
|
||||||
|
typedef enum {
|
||||||
|
FPC_CMDTYPE_UNKNOWN = 0,
|
||||||
|
FPC_CMDTYPE_TO_DEVICE,
|
||||||
|
FPC_CMDTYPE_TO_DEVICE_EVTDATA,
|
||||||
|
FPC_CMDTYPE_FROM_DEVICE,
|
||||||
|
} FpcCmdType;
|
||||||
|
|
||||||
|
typedef enum {
|
||||||
|
FP_CMD_SEND = 0,
|
||||||
|
FP_CMD_GET_DATA,
|
||||||
|
FP_CMD_SUSPENDED,
|
||||||
|
FP_CMD_RESUME,
|
||||||
|
FP_CMD_NUM_STATES,
|
||||||
|
} FpCmdState;
|
||||||
|
|
||||||
|
typedef enum {
|
||||||
|
FP_INIT = 0,
|
||||||
|
FP_LOAD_DB,
|
||||||
|
FP_INIT_NUM_STATES,
|
||||||
|
} FpInitState;
|
||||||
|
|
||||||
|
typedef enum {
|
||||||
|
FP_ENROLL_ENUM = 0,
|
||||||
|
FP_ENROLL_CREATE,
|
||||||
|
FP_ENROLL_CAPTURE,
|
||||||
|
FP_ENROLL_GET_IMG,
|
||||||
|
FP_ENROLL_UPDATE,
|
||||||
|
FP_ENROLL_COMPLETE,
|
||||||
|
FP_ENROLL_CHECK_DUPLICATE,
|
||||||
|
FP_ENROLL_BINDID,
|
||||||
|
FP_ENROLL_COMMIT,
|
||||||
|
FP_ENROLL_DICARD,
|
||||||
|
FP_ENROLL_CLEANUP,
|
||||||
|
FP_ENROLL_NUM_STATES,
|
||||||
|
} FpEnrollState;
|
||||||
|
|
||||||
|
typedef enum {
|
||||||
|
FP_VERIFY_CAPTURE = 0,
|
||||||
|
FP_VERIFY_GET_IMG,
|
||||||
|
FP_VERIFY_IDENTIFY,
|
||||||
|
FP_VERIFY_CANCEL,
|
||||||
|
FP_VERIFY_NUM_STATES,
|
||||||
|
} FpVerifyState;
|
||||||
|
|
||||||
|
typedef enum {
|
||||||
|
FP_CLEAR_DELETE_DB = 0,
|
||||||
|
FP_CLEAR_CREATE_DB,
|
||||||
|
FP_CLEAR_NUM_STATES,
|
||||||
|
} FpClearState;
|
||||||
@@ -631,11 +631,11 @@ fp_enroll_enum_cb (FpiDeviceGoodixMoc *self,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
fpi_ssm_jump_to_state (self->task_ssm, FP_ENROLL_CAPTURE);
|
fpi_ssm_next_state (self->task_ssm);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
fp_enroll_init_cb (FpiDeviceGoodixMoc *self,
|
fp_enroll_create_cb (FpiDeviceGoodixMoc *self,
|
||||||
gxfp_cmd_response_t *resp,
|
gxfp_cmd_response_t *resp,
|
||||||
GError *error)
|
GError *error)
|
||||||
{
|
{
|
||||||
@@ -644,7 +644,7 @@ fp_enroll_init_cb (FpiDeviceGoodixMoc *self,
|
|||||||
fpi_ssm_mark_failed (self->task_ssm, error);
|
fpi_ssm_mark_failed (self->task_ssm, error);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
memcpy (self->template_id, resp->enroll_init.tid, TEMPLATE_ID_SIZE);
|
memcpy (self->template_id, resp->enroll_create.tid, TEMPLATE_ID_SIZE);
|
||||||
fpi_ssm_next_state (self->task_ssm);
|
fpi_ssm_next_state (self->task_ssm);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -661,7 +661,7 @@ fp_enroll_capture_cb (FpiDeviceGoodixMoc *self,
|
|||||||
/* */
|
/* */
|
||||||
if (resp->result >= GX_FAILED)
|
if (resp->result >= GX_FAILED)
|
||||||
{
|
{
|
||||||
fp_warn ("Capture sample failed, result: 0x%x", resp->result);
|
fp_info ("Capture sample failed, result: 0x%x", resp->result);
|
||||||
fpi_device_enroll_progress (FP_DEVICE (self),
|
fpi_device_enroll_progress (FP_DEVICE (self),
|
||||||
self->enroll_stage,
|
self->enroll_stage,
|
||||||
NULL,
|
NULL,
|
||||||
@@ -675,7 +675,7 @@ fp_enroll_capture_cb (FpiDeviceGoodixMoc *self,
|
|||||||
if ((resp->capture_data_resp.img_quality < self->sensorcfg->config[4]) ||
|
if ((resp->capture_data_resp.img_quality < self->sensorcfg->config[4]) ||
|
||||||
(resp->capture_data_resp.img_coverage < self->sensorcfg->config[5]))
|
(resp->capture_data_resp.img_coverage < self->sensorcfg->config[5]))
|
||||||
{
|
{
|
||||||
fp_warn ("Capture sample poor quality(%d): %d or coverage(%d): %d",
|
fp_info ("Capture sample poor quality(%d): %d or coverage(%d): %d",
|
||||||
self->sensorcfg->config[4],
|
self->sensorcfg->config[4],
|
||||||
resp->capture_data_resp.img_quality,
|
resp->capture_data_resp.img_quality,
|
||||||
self->sensorcfg->config[5],
|
self->sensorcfg->config[5],
|
||||||
@@ -837,16 +837,6 @@ fp_enroll_sm_run_state (FpiSsm *ssm, FpDevice *device)
|
|||||||
|
|
||||||
switch (fpi_ssm_get_cur_state (ssm))
|
switch (fpi_ssm_get_cur_state (ssm))
|
||||||
{
|
{
|
||||||
case FP_ENROLL_ENUM:
|
|
||||||
{
|
|
||||||
goodix_sensor_cmd (self, MOC_CMD0_GETFINGERLIST, MOC_CMD1_DEFAULT,
|
|
||||||
false,
|
|
||||||
(const guint8 *) &dummy,
|
|
||||||
1,
|
|
||||||
fp_enroll_enum_cb);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
case FP_ENROLL_PWR_BTN_SHIELD_ON:
|
case FP_ENROLL_PWR_BTN_SHIELD_ON:
|
||||||
{
|
{
|
||||||
goodix_sensor_cmd (self, MOC_CMD0_PWR_BTN_SHIELD, MOC_CMD1_PWR_BTN_SHIELD_ON,
|
goodix_sensor_cmd (self, MOC_CMD0_PWR_BTN_SHIELD, MOC_CMD1_PWR_BTN_SHIELD_ON,
|
||||||
@@ -857,13 +847,23 @@ fp_enroll_sm_run_state (FpiSsm *ssm, FpDevice *device)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case FP_ENROLL_ENUM:
|
||||||
|
{
|
||||||
|
goodix_sensor_cmd (self, MOC_CMD0_GETFINGERLIST, MOC_CMD1_DEFAULT,
|
||||||
|
false,
|
||||||
|
(const guint8 *) &dummy,
|
||||||
|
1,
|
||||||
|
fp_enroll_enum_cb);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
case FP_ENROLL_CREATE:
|
case FP_ENROLL_CREATE:
|
||||||
{
|
{
|
||||||
goodix_sensor_cmd (self, MOC_CMD0_ENROLL_INIT, MOC_CMD1_DEFAULT,
|
goodix_sensor_cmd (self, MOC_CMD0_ENROLL_INIT, MOC_CMD1_DEFAULT,
|
||||||
false,
|
false,
|
||||||
(const guint8 *) &dummy,
|
(const guint8 *) &dummy,
|
||||||
1,
|
1,
|
||||||
fp_enroll_init_cb);
|
fp_enroll_create_cb);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -1041,6 +1041,47 @@ fp_init_config_cb (FpiDeviceGoodixMoc *self,
|
|||||||
fpi_ssm_next_state (self->task_ssm);
|
fpi_ssm_next_state (self->task_ssm);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
fp_init_cb_reset_or_complete (FpiDeviceGoodixMoc *self,
|
||||||
|
gxfp_cmd_response_t *resp,
|
||||||
|
GError *error)
|
||||||
|
{
|
||||||
|
if (error)
|
||||||
|
{
|
||||||
|
fp_warn ("Template storage appears to have been corrupted! Error was: %s", error->message);
|
||||||
|
fp_warn ("A known reason for this to happen is a firmware bug triggered by another storage area being initialized.");
|
||||||
|
fpi_ssm_jump_to_state (self->task_ssm, FP_INIT_RESET_DEVICE);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
fpi_ssm_mark_completed (self->task_ssm);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
fp_init_reset_device_cb (FpiDeviceGoodixMoc *self,
|
||||||
|
gxfp_cmd_response_t *resp,
|
||||||
|
GError *error)
|
||||||
|
{
|
||||||
|
if (error)
|
||||||
|
{
|
||||||
|
fp_warn ("Reset failed: %s", error->message);
|
||||||
|
fpi_ssm_mark_failed (self->task_ssm, error);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if ((resp->result >= GX_FAILED) && (resp->result != GX_ERROR_FINGER_ID_NOEXIST))
|
||||||
|
{
|
||||||
|
fp_warn ("Reset failed, device reported: 0x%x", resp->result);
|
||||||
|
fpi_ssm_mark_failed (self->task_ssm,
|
||||||
|
fpi_device_error_new_msg (FP_DEVICE_ERROR_GENERAL,
|
||||||
|
"Failed clear storage, result: 0x%x",
|
||||||
|
resp->result));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
fp_warn ("Reset completed");
|
||||||
|
fpi_ssm_mark_completed (self->task_ssm);
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
fp_init_sm_run_state (FpiSsm *ssm, FpDevice *device)
|
fp_init_sm_run_state (FpiSsm *ssm, FpDevice *device)
|
||||||
@@ -1065,6 +1106,30 @@ fp_init_sm_run_state (FpiSsm *ssm, FpDevice *device)
|
|||||||
sizeof (gxfp_sensor_cfg_t),
|
sizeof (gxfp_sensor_cfg_t),
|
||||||
fp_init_config_cb);
|
fp_init_config_cb);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case FP_INIT_TEMPLATE_LIST:
|
||||||
|
/* List prints to check whether the template DB was corrupted.
|
||||||
|
* As of 2022-06-13 there is a known firmware issue that can cause the
|
||||||
|
* stored templates for Linux to be corrupted when the Windows storage
|
||||||
|
* area is initialized.
|
||||||
|
* In that case, we'll get a protocol failure trying to retrieve the
|
||||||
|
* list of prints.
|
||||||
|
*/
|
||||||
|
goodix_sensor_cmd (self, MOC_CMD0_GETFINGERLIST, MOC_CMD1_DEFAULT,
|
||||||
|
FALSE,
|
||||||
|
(const guint8 *) &dummy,
|
||||||
|
1,
|
||||||
|
fp_init_cb_reset_or_complete);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case FP_INIT_RESET_DEVICE:
|
||||||
|
fp_warn ("Resetting device storage, you will need to enroll all prints again!");
|
||||||
|
goodix_sensor_cmd (self, MOC_CMD0_DELETETEMPLATE, MOC_CMD1_DELETE_ALL,
|
||||||
|
FALSE,
|
||||||
|
NULL,
|
||||||
|
0,
|
||||||
|
fp_init_reset_device_cb);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -1294,12 +1359,24 @@ gx_fp_probe (FpDevice *device)
|
|||||||
{
|
{
|
||||||
case 0x6496:
|
case 0x6496:
|
||||||
case 0x60A2:
|
case 0x60A2:
|
||||||
|
case 0x60A4:
|
||||||
|
case 0x6014:
|
||||||
|
case 0x6092:
|
||||||
|
case 0x6094:
|
||||||
case 0x609C:
|
case 0x609C:
|
||||||
|
case 0x60BC:
|
||||||
|
case 0x6304:
|
||||||
|
case 0x631C:
|
||||||
|
case 0x633C:
|
||||||
|
case 0x634C:
|
||||||
|
case 0x6384:
|
||||||
case 0x639C:
|
case 0x639C:
|
||||||
case 0x63AC:
|
case 0x63AC:
|
||||||
case 0x63BC:
|
case 0x63BC:
|
||||||
case 0x63CC:
|
case 0x63CC:
|
||||||
|
case 0x6582:
|
||||||
case 0x6A94:
|
case 0x6A94:
|
||||||
|
case 0x659A:
|
||||||
self->max_enroll_stage = 12;
|
self->max_enroll_stage = 12;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -1530,17 +1607,29 @@ fpi_device_goodixmoc_init (FpiDeviceGoodixMoc *self)
|
|||||||
|
|
||||||
static const FpIdEntry id_table[] = {
|
static const FpIdEntry id_table[] = {
|
||||||
{ .vid = 0x27c6, .pid = 0x5840, },
|
{ .vid = 0x27c6, .pid = 0x5840, },
|
||||||
|
{ .vid = 0x27c6, .pid = 0x6014, },
|
||||||
|
{ .vid = 0x27c6, .pid = 0x6092, },
|
||||||
|
{ .vid = 0x27c6, .pid = 0x6094, },
|
||||||
{ .vid = 0x27c6, .pid = 0x609C, },
|
{ .vid = 0x27c6, .pid = 0x609C, },
|
||||||
{ .vid = 0x27c6, .pid = 0x60A2, },
|
{ .vid = 0x27c6, .pid = 0x60A2, },
|
||||||
|
{ .vid = 0x27c6, .pid = 0x60A4, },
|
||||||
|
{ .vid = 0x27c6, .pid = 0x60BC, },
|
||||||
|
{ .vid = 0x27c6, .pid = 0x6304, },
|
||||||
|
{ .vid = 0x27c6, .pid = 0x631C, },
|
||||||
|
{ .vid = 0x27c6, .pid = 0x633C, },
|
||||||
|
{ .vid = 0x27c6, .pid = 0x634C, },
|
||||||
|
{ .vid = 0x27c6, .pid = 0x6384, },
|
||||||
{ .vid = 0x27c6, .pid = 0x639C, },
|
{ .vid = 0x27c6, .pid = 0x639C, },
|
||||||
{ .vid = 0x27c6, .pid = 0x63AC, },
|
{ .vid = 0x27c6, .pid = 0x63AC, },
|
||||||
{ .vid = 0x27c6, .pid = 0x63BC, },
|
{ .vid = 0x27c6, .pid = 0x63BC, },
|
||||||
{ .vid = 0x27c6, .pid = 0x63CC, },
|
{ .vid = 0x27c6, .pid = 0x63CC, },
|
||||||
{ .vid = 0x27c6, .pid = 0x6496, },
|
{ .vid = 0x27c6, .pid = 0x6496, },
|
||||||
|
{ .vid = 0x27c6, .pid = 0x6582, },
|
||||||
{ .vid = 0x27c6, .pid = 0x6584, },
|
{ .vid = 0x27c6, .pid = 0x6584, },
|
||||||
{ .vid = 0x27c6, .pid = 0x658C, },
|
{ .vid = 0x27c6, .pid = 0x658C, },
|
||||||
{ .vid = 0x27c6, .pid = 0x6592, },
|
{ .vid = 0x27c6, .pid = 0x6592, },
|
||||||
{ .vid = 0x27c6, .pid = 0x6594, },
|
{ .vid = 0x27c6, .pid = 0x6594, },
|
||||||
|
{ .vid = 0x27c6, .pid = 0x659A, },
|
||||||
{ .vid = 0x27c6, .pid = 0x659C, },
|
{ .vid = 0x27c6, .pid = 0x659C, },
|
||||||
{ .vid = 0x27c6, .pid = 0x6A94, },
|
{ .vid = 0x27c6, .pid = 0x6A94, },
|
||||||
{ .vid = 0, .pid = 0, .driver_data = 0 }, /* terminating entry */
|
{ .vid = 0, .pid = 0, .driver_data = 0 }, /* terminating entry */
|
||||||
|
|||||||
@@ -35,6 +35,8 @@ typedef enum {
|
|||||||
typedef enum {
|
typedef enum {
|
||||||
FP_INIT_VERSION = 0,
|
FP_INIT_VERSION = 0,
|
||||||
FP_INIT_CONFIG,
|
FP_INIT_CONFIG,
|
||||||
|
FP_INIT_TEMPLATE_LIST,
|
||||||
|
FP_INIT_RESET_DEVICE,
|
||||||
FP_INIT_NUM_STATES,
|
FP_INIT_NUM_STATES,
|
||||||
} FpInitState;
|
} FpInitState;
|
||||||
|
|
||||||
@@ -42,7 +44,6 @@ typedef enum {
|
|||||||
typedef enum {
|
typedef enum {
|
||||||
FP_ENROLL_PWR_BTN_SHIELD_ON = 0,
|
FP_ENROLL_PWR_BTN_SHIELD_ON = 0,
|
||||||
FP_ENROLL_ENUM,
|
FP_ENROLL_ENUM,
|
||||||
FP_ENROLL_IDENTIFY,
|
|
||||||
FP_ENROLL_CREATE,
|
FP_ENROLL_CREATE,
|
||||||
FP_ENROLL_CAPTURE,
|
FP_ENROLL_CAPTURE,
|
||||||
FP_ENROLL_UPDATE,
|
FP_ENROLL_UPDATE,
|
||||||
|
|||||||
@@ -343,10 +343,10 @@ gx_proto_parse_body (uint16_t cmd, uint8_t *buffer, uint16_t buffer_len, pgxfp_c
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case MOC_CMD0_ENROLL_INIT:
|
case MOC_CMD0_ENROLL_INIT:
|
||||||
if (buffer_len < sizeof (gxfp_enroll_init_t) + 1)
|
if (buffer_len < sizeof (gxfp_enroll_create_t) + 1)
|
||||||
return -1;
|
return -1;
|
||||||
if (presp->result == GX_SUCCESS)
|
if (presp->result == GX_SUCCESS)
|
||||||
memcpy (&presp->enroll_init.tid, &buffer[1], TEMPLATE_ID_SIZE);
|
memcpy (&presp->enroll_create.tid, &buffer[1], TEMPLATE_ID_SIZE);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case MOC_CMD0_ENROLL:
|
case MOC_CMD0_ENROLL:
|
||||||
@@ -393,10 +393,8 @@ gx_proto_parse_body (uint16_t cmd, uint8_t *buffer, uint16_t buffer_len, pgxfp_c
|
|||||||
fingerid_length,
|
fingerid_length,
|
||||||
&presp->finger_list_resp.finger_list[num]) != 0)
|
&presp->finger_list_resp.finger_list[num]) != 0)
|
||||||
{
|
{
|
||||||
g_error ("parse fingerlist error");
|
g_warning ("Failed to parse finger list");
|
||||||
presp->finger_list_resp.finger_num = 0;
|
return -1;
|
||||||
presp->result = GX_FAILED;
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
offset += fingerid_length;
|
offset += fingerid_length;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -105,10 +105,10 @@ typedef struct _gxfp_parse_msg
|
|||||||
} gxfp_parse_msg_t, *pgxfp_parse_msg_t;
|
} gxfp_parse_msg_t, *pgxfp_parse_msg_t;
|
||||||
|
|
||||||
|
|
||||||
typedef struct _gxfp_enroll_init
|
typedef struct _gxfp_enroll_create
|
||||||
{
|
{
|
||||||
uint8_t tid[TEMPLATE_ID_SIZE];
|
uint8_t tid[TEMPLATE_ID_SIZE];
|
||||||
} gxfp_enroll_init_t, *pgxfp_enroll_init_t;
|
} gxfp_enroll_create_t, *pgxfp_enroll_create_t;
|
||||||
|
|
||||||
#pragma pack(push, 1)
|
#pragma pack(push, 1)
|
||||||
typedef struct _template_format
|
typedef struct _template_format
|
||||||
@@ -192,7 +192,7 @@ typedef struct _fp_cmd_response
|
|||||||
{
|
{
|
||||||
gxfp_parse_msg_t parse_msg;
|
gxfp_parse_msg_t parse_msg;
|
||||||
gxfp_verify_t verify;
|
gxfp_verify_t verify;
|
||||||
gxfp_enroll_init_t enroll_init;
|
gxfp_enroll_create_t enroll_create;
|
||||||
gxfp_capturedata_t capture_data_resp;
|
gxfp_capturedata_t capture_data_resp;
|
||||||
gxfp_check_duplicate_t check_duplicate_resp;
|
gxfp_check_duplicate_t check_duplicate_resp;
|
||||||
gxfp_enroll_commit_t enroll_commit;
|
gxfp_enroll_commit_t enroll_commit;
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,220 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2022-2023 Realtek Corp.
|
||||||
|
*
|
||||||
|
* This library is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
|
* License as published by the Free Software Foundation; either
|
||||||
|
* version 2.1 of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This library is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
|
* License along with this library; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "fpi-device.h"
|
||||||
|
#include "fpi-ssm.h"
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
|
#define EP_IN (2 | FPI_USB_ENDPOINT_IN)
|
||||||
|
#define EP_OUT (1 | FPI_USB_ENDPOINT_OUT)
|
||||||
|
|
||||||
|
#define EP_IN_MAX_BUF_SIZE 2048
|
||||||
|
|
||||||
|
#define FP_RTK_CMD_TOTAL_LEN 12
|
||||||
|
#define FP_RTK_CMD_LEN 2
|
||||||
|
#define FP_RTK_CMD_PARAM_LEN 4
|
||||||
|
#define FP_RTK_CMD_ADDR_LEN 4
|
||||||
|
#define FP_RTK_CMD_DATA_LEN 2
|
||||||
|
|
||||||
|
#define TEMPLATE_LEN 35
|
||||||
|
#define SUBFACTOR_OFFSET 2
|
||||||
|
#define UID_OFFSET 3
|
||||||
|
#define UID_PAYLOAD_LEN 32
|
||||||
|
|
||||||
|
/* Command transfer timeout :ms*/
|
||||||
|
#define CMD_TIMEOUT 1000
|
||||||
|
#define DATA_TIMEOUT 5000
|
||||||
|
#define STATUS_TIMEOUT 2000
|
||||||
|
|
||||||
|
#define MAX_ENROLL_SAMPLES 8
|
||||||
|
#define DEFAULT_UID_LEN 28
|
||||||
|
#define SUB_FINGER_01 0xFF
|
||||||
|
|
||||||
|
#define GET_CMD_TYPE(val) ((val & 0xC0) >> 6)
|
||||||
|
#define GET_TRANS_DATA_LEN(len_h, len_l) ((len_h << 8) | len_l)
|
||||||
|
#define GET_LEN_L(total_data_len) ((total_data_len) & 0xff)
|
||||||
|
#define GET_LEN_H(total_data_len) ((total_data_len) >> 8)
|
||||||
|
|
||||||
|
G_DECLARE_FINAL_TYPE (FpiDeviceRealtek, fpi_device_realtek, FPI, DEVICE_REALTEK, FpDevice)
|
||||||
|
|
||||||
|
typedef void (*SynCmdMsgCallback) (FpiDeviceRealtek *self,
|
||||||
|
uint8_t *buffer_in,
|
||||||
|
GError *error);
|
||||||
|
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
SynCmdMsgCallback callback;
|
||||||
|
} CommandData;
|
||||||
|
|
||||||
|
typedef enum {
|
||||||
|
FP_RTK_CMD_ONLY = 0,
|
||||||
|
FP_RTK_CMD_READ,
|
||||||
|
FP_RTK_CMD_WRITE,
|
||||||
|
} FpRtkCmdType;
|
||||||
|
|
||||||
|
typedef enum {
|
||||||
|
FP_RTK_MSG_PLAINTEXT = 0,
|
||||||
|
FP_RTK_MSG_PLAINTEXT_NO_STATUS,
|
||||||
|
} FpRtkMsgType;
|
||||||
|
|
||||||
|
typedef enum {
|
||||||
|
FP_RTK_PURPOSE_IDENTIFY = 0x01, /* identify before enroll */
|
||||||
|
FP_RTK_PURPOSE_VERIFY = 0x02,
|
||||||
|
FP_RTK_PURPOSE_ENROLL = 0x04,
|
||||||
|
} FpRtkPurpose;
|
||||||
|
|
||||||
|
typedef enum {
|
||||||
|
FP_RTK_SUCCESS = 0x0,
|
||||||
|
FP_RTK_TOO_HIGH,
|
||||||
|
FP_RTK_TOO_LOW,
|
||||||
|
FP_RTK_TOO_LEFT,
|
||||||
|
FP_RTK_TOO_RIGHT,
|
||||||
|
FP_RTK_TOO_FAST,
|
||||||
|
FP_RTK_TOO_SLOW,
|
||||||
|
FP_RTK_POOR_QUALITY,
|
||||||
|
FP_RTK_TOO_SKEWED,
|
||||||
|
FP_RTK_TOO_SHORT,
|
||||||
|
FP_RTK_MERGE_FAILURE,
|
||||||
|
FP_RTK_MATCH_FAIL,
|
||||||
|
FP_RTK_CMD_ERR,
|
||||||
|
} FpRtkInStatus;
|
||||||
|
|
||||||
|
typedef enum {
|
||||||
|
FP_RTK_ENROLL_GET_TEMPLATE = 0,
|
||||||
|
FP_RTK_ENROLL_BEGIN_POS,
|
||||||
|
FP_RTK_ENROLL_CAPTURE,
|
||||||
|
FP_RTK_ENROLL_FINISH_CAPTURE,
|
||||||
|
FP_RTK_ENROLL_ACCEPT_SAMPLE,
|
||||||
|
FP_RTK_ENROLL_CHECK_DUPLICATE,
|
||||||
|
FP_RTK_ENROLL_COMMIT,
|
||||||
|
FP_RTK_ENROLL_NUM_STATES,
|
||||||
|
} FpRtkEnrollState;
|
||||||
|
|
||||||
|
typedef enum {
|
||||||
|
FP_RTK_VERIFY_CAPTURE = 0,
|
||||||
|
FP_RTK_VERIFY_FINISH_CAPTURE,
|
||||||
|
FP_RTK_VERIFY_ACCEPT_SAMPLE,
|
||||||
|
FP_RTK_VERIFY_INDENTIFY_FEATURE,
|
||||||
|
FP_RTK_VERIFY_UPDATE_TEMPLATE,
|
||||||
|
FP_RTK_VERIFY_NUM_STATES,
|
||||||
|
} FpRtkVerifyState;
|
||||||
|
|
||||||
|
typedef enum {
|
||||||
|
FP_RTK_DELETE_GET_POS = 0,
|
||||||
|
FP_RTK_DELETE_PRINT,
|
||||||
|
FP_RTK_DELETE_NUM_STATES,
|
||||||
|
} FpRtkDeleteState;
|
||||||
|
|
||||||
|
typedef enum {
|
||||||
|
FP_RTK_INIT_SELECT_OS = 0,
|
||||||
|
FP_RTK_INIT_GET_ENROLL_NUM,
|
||||||
|
FP_RTK_INIT_NUM_STATES,
|
||||||
|
} FpRtkInitState;
|
||||||
|
|
||||||
|
typedef enum {
|
||||||
|
FP_RTK_CMD_SEND = 0,
|
||||||
|
FP_RTK_CMD_TRANS_DATA,
|
||||||
|
FP_RTK_CMD_GET_STATUS,
|
||||||
|
FP_RTK_CMD_NUM_STATES,
|
||||||
|
} FpRtkCmdState;
|
||||||
|
|
||||||
|
struct _FpiDeviceRealtek
|
||||||
|
{
|
||||||
|
FpDevice parent;
|
||||||
|
FpiSsm *task_ssm;
|
||||||
|
FpiSsm *cmd_ssm;
|
||||||
|
FpiUsbTransfer *cmd_transfer;
|
||||||
|
FpiUsbTransfer *data_transfer;
|
||||||
|
gint cmd_type;
|
||||||
|
FpRtkMsgType message_type;
|
||||||
|
gboolean cmd_cancellable;
|
||||||
|
gint enroll_stage;
|
||||||
|
gint max_enroll_stage;
|
||||||
|
guchar *read_data;
|
||||||
|
gsize trans_data_len;
|
||||||
|
FpRtkPurpose fp_purpose;
|
||||||
|
gint pos_index;
|
||||||
|
gint template_num;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct realtek_fp_cmd
|
||||||
|
{
|
||||||
|
uint8_t cmd[FP_RTK_CMD_LEN];
|
||||||
|
uint8_t param[FP_RTK_CMD_PARAM_LEN];
|
||||||
|
uint8_t addr[FP_RTK_CMD_ADDR_LEN];
|
||||||
|
uint8_t data_len[FP_RTK_CMD_DATA_LEN];
|
||||||
|
};
|
||||||
|
|
||||||
|
static struct realtek_fp_cmd co_start_capture = {
|
||||||
|
.cmd = {0x05, 0x05},
|
||||||
|
};
|
||||||
|
|
||||||
|
static struct realtek_fp_cmd co_finish_capture = {
|
||||||
|
.cmd = {0x45, 0x06},
|
||||||
|
.data_len = {0x05},
|
||||||
|
};
|
||||||
|
|
||||||
|
static struct realtek_fp_cmd co_accept_sample = {
|
||||||
|
.cmd = {0x45, 0x08},
|
||||||
|
.data_len = {0x09},
|
||||||
|
};
|
||||||
|
|
||||||
|
static struct realtek_fp_cmd tls_identify_feature = {
|
||||||
|
.cmd = {0x45, 0x22},
|
||||||
|
.data_len = {0x2A},
|
||||||
|
};
|
||||||
|
|
||||||
|
static struct realtek_fp_cmd co_get_enroll_num = {
|
||||||
|
.cmd = {0x45, 0x0d},
|
||||||
|
.data_len = {0x02},
|
||||||
|
};
|
||||||
|
|
||||||
|
static struct realtek_fp_cmd co_get_template = {
|
||||||
|
.cmd = {0x45, 0x0E},
|
||||||
|
};
|
||||||
|
|
||||||
|
static struct realtek_fp_cmd tls_enroll_begin = {
|
||||||
|
.cmd = {0x05, 0x20},
|
||||||
|
};
|
||||||
|
|
||||||
|
static struct realtek_fp_cmd co_check_duplicate = {
|
||||||
|
.cmd = {0x45, 0x10},
|
||||||
|
.data_len = {0x22},
|
||||||
|
};
|
||||||
|
|
||||||
|
static struct realtek_fp_cmd tls_enroll_commit = {
|
||||||
|
.cmd = {0x85, 0x21},
|
||||||
|
.data_len = {0x20},
|
||||||
|
};
|
||||||
|
|
||||||
|
static struct realtek_fp_cmd co_update_template = {
|
||||||
|
.cmd = {0x05, 0x11},
|
||||||
|
};
|
||||||
|
|
||||||
|
static struct realtek_fp_cmd co_delete_record = {
|
||||||
|
.cmd = {0x05, 0x0F},
|
||||||
|
};
|
||||||
|
|
||||||
|
static struct realtek_fp_cmd co_select_system = {
|
||||||
|
.cmd = {0x05, 0x13},
|
||||||
|
};
|
||||||
@@ -40,8 +40,14 @@ static const FpIdEntry id_table[] = {
|
|||||||
{ .vid = SYNAPTICS_VENDOR_ID, .pid = 0x00F0, },
|
{ .vid = SYNAPTICS_VENDOR_ID, .pid = 0x00F0, },
|
||||||
{ .vid = SYNAPTICS_VENDOR_ID, .pid = 0x0103, },
|
{ .vid = SYNAPTICS_VENDOR_ID, .pid = 0x0103, },
|
||||||
{ .vid = SYNAPTICS_VENDOR_ID, .pid = 0x0123, },
|
{ .vid = SYNAPTICS_VENDOR_ID, .pid = 0x0123, },
|
||||||
|
{ .vid = SYNAPTICS_VENDOR_ID, .pid = 0x0124, },
|
||||||
{ .vid = SYNAPTICS_VENDOR_ID, .pid = 0x0126, },
|
{ .vid = SYNAPTICS_VENDOR_ID, .pid = 0x0126, },
|
||||||
{ .vid = SYNAPTICS_VENDOR_ID, .pid = 0x0129, },
|
{ .vid = SYNAPTICS_VENDOR_ID, .pid = 0x0129, },
|
||||||
|
{ .vid = SYNAPTICS_VENDOR_ID, .pid = 0x0168, },
|
||||||
|
{ .vid = SYNAPTICS_VENDOR_ID, .pid = 0x015F, },
|
||||||
|
{ .vid = SYNAPTICS_VENDOR_ID, .pid = 0x0104, },
|
||||||
|
{ .vid = SYNAPTICS_VENDOR_ID, .pid = 0x0173, },
|
||||||
|
{ .vid = SYNAPTICS_VENDOR_ID, .pid = 0x0106, },
|
||||||
{ .vid = 0, .pid = 0, .driver_data = 0 }, /* terminating entry */
|
{ .vid = 0, .pid = 0, .driver_data = 0 }, /* terminating entry */
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -103,6 +109,10 @@ cmd_receive_cb (FpiUsbTransfer *transfer,
|
|||||||
|
|
||||||
if (self->cmd_complete_on_removal)
|
if (self->cmd_complete_on_removal)
|
||||||
{
|
{
|
||||||
|
if (self->delay_error)
|
||||||
|
fpi_ssm_mark_failed (transfer->ssm,
|
||||||
|
g_steal_pointer (&self->delay_error));
|
||||||
|
else
|
||||||
fpi_ssm_mark_completed (transfer->ssm);
|
fpi_ssm_mark_completed (transfer->ssm);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -224,6 +234,7 @@ cmd_interrupt_cb (FpiUsbTransfer *transfer,
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
fpi_device_critical_leave (device);
|
||||||
fpi_usb_transfer_submit (fpi_usb_transfer_ref (transfer),
|
fpi_usb_transfer_submit (fpi_usb_transfer_ref (transfer),
|
||||||
0,
|
0,
|
||||||
NULL,
|
NULL,
|
||||||
@@ -637,18 +648,21 @@ verify (FpDevice *device)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
identify_complete_after_finger_removal (FpiDeviceSynaptics *self)
|
identify_complete_after_finger_removal (FpiDeviceSynaptics *self, GError *error)
|
||||||
{
|
{
|
||||||
FpDevice *device = FP_DEVICE (self);
|
FpDevice *device = FP_DEVICE (self);
|
||||||
|
|
||||||
if (self->finger_on_sensor)
|
if (self->finger_on_sensor)
|
||||||
{
|
{
|
||||||
fp_dbg ("delaying identify report until after finger removal!");
|
fp_dbg ("delaying identify report until after finger removal!");
|
||||||
|
if (error)
|
||||||
|
g_propagate_error (&self->delay_error, error);
|
||||||
|
|
||||||
self->cmd_complete_on_removal = TRUE;
|
self->cmd_complete_on_removal = TRUE;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
fpi_device_identify_complete (device, NULL);
|
fpi_device_identify_complete (device, error);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -698,19 +712,18 @@ identify_msg_cb (FpiDeviceSynaptics *self,
|
|||||||
fp_info ("Match error occurred");
|
fp_info ("Match error occurred");
|
||||||
fpi_device_identify_report (device, NULL, NULL,
|
fpi_device_identify_report (device, NULL, NULL,
|
||||||
fpi_device_retry_new (FP_DEVICE_RETRY_GENERAL));
|
fpi_device_retry_new (FP_DEVICE_RETRY_GENERAL));
|
||||||
identify_complete_after_finger_removal (self);
|
identify_complete_after_finger_removal (self, NULL);
|
||||||
}
|
}
|
||||||
else if (resp->result == BMKT_FP_NO_MATCH)
|
else if (resp->result == BMKT_FP_NO_MATCH)
|
||||||
{
|
{
|
||||||
fp_info ("Print didn't match");
|
fp_info ("Print didn't match");
|
||||||
fpi_device_identify_report (device, NULL, NULL, NULL);
|
fpi_device_identify_report (device, NULL, NULL, NULL);
|
||||||
identify_complete_after_finger_removal (self);
|
identify_complete_after_finger_removal (self, NULL);
|
||||||
}
|
}
|
||||||
else if (resp->result == BMKT_FP_DATABASE_NO_RECORD_EXISTS)
|
else if (resp->result == BMKT_FP_DATABASE_NO_RECORD_EXISTS || resp->result == BMKT_FP_DATABASE_EMPTY)
|
||||||
{
|
{
|
||||||
fp_info ("Print is not in database");
|
fp_info ("Print is not in database");
|
||||||
fpi_device_identify_complete (device,
|
identify_complete_after_finger_removal (self, fpi_device_error_new (FP_DEVICE_ERROR_DATA_NOT_FOUND));
|
||||||
fpi_device_error_new (FP_DEVICE_ERROR_DATA_NOT_FOUND));
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -746,7 +759,7 @@ identify_msg_cb (FpiDeviceSynaptics *self,
|
|||||||
else
|
else
|
||||||
fpi_device_identify_report (device, NULL, print, NULL);
|
fpi_device_identify_report (device, NULL, print, NULL);
|
||||||
|
|
||||||
identify_complete_after_finger_removal (self);
|
identify_complete_after_finger_removal (self, NULL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -127,4 +127,5 @@ struct _FpiDeviceSynaptics
|
|||||||
|
|
||||||
struct syna_enroll_resp_data enroll_resp_data;
|
struct syna_enroll_resp_data enroll_resp_data;
|
||||||
syna_state_t state;
|
syna_state_t state;
|
||||||
|
GError *delay_error;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -431,6 +431,7 @@ dev_deinit (FpImageDevice *dev)
|
|||||||
|
|
||||||
static const FpIdEntry id_table[] = {
|
static const FpIdEntry id_table[] = {
|
||||||
{ .vid = 0x0483, .pid = 0x2015, .driver_data = UPEKTC_2015 },
|
{ .vid = 0x0483, .pid = 0x2015, .driver_data = UPEKTC_2015 },
|
||||||
|
{ .vid = 0x0483, .pid = 0x2017, .driver_data = UPEKTC_2015 },
|
||||||
{ .vid = 0x147e, .pid = 0x3001, .driver_data = UPEKTC_3001 },
|
{ .vid = 0x147e, .pid = 0x3001, .driver_data = UPEKTC_3001 },
|
||||||
{ .vid = 0, .pid = 0, .driver_data = 0 },
|
{ .vid = 0, .pid = 0, .driver_data = 0 },
|
||||||
};
|
};
|
||||||
|
|||||||
+112
-20
@@ -31,10 +31,6 @@ static void start_deactivation (FpImageDevice *dev);
|
|||||||
#define CTRL_TIMEOUT 4000
|
#define CTRL_TIMEOUT 4000
|
||||||
#define BULK_TIMEOUT 4000
|
#define BULK_TIMEOUT 4000
|
||||||
|
|
||||||
#define IMAGE_WIDTH 144
|
|
||||||
#define IMAGE_HEIGHT 384
|
|
||||||
#define IMAGE_SIZE (IMAGE_WIDTH * IMAGE_HEIGHT)
|
|
||||||
|
|
||||||
#define MAX_CMD_SIZE 64
|
#define MAX_CMD_SIZE 64
|
||||||
#define MAX_RESPONSE_SIZE 2052
|
#define MAX_RESPONSE_SIZE 2052
|
||||||
#define SHORT_RESPONSE_SIZE 64
|
#define SHORT_RESPONSE_SIZE 64
|
||||||
@@ -47,8 +43,10 @@ struct _FpiDeviceUpektcImg
|
|||||||
unsigned char response[MAX_RESPONSE_SIZE];
|
unsigned char response[MAX_RESPONSE_SIZE];
|
||||||
unsigned char *image_bits;
|
unsigned char *image_bits;
|
||||||
unsigned char seq;
|
unsigned char seq;
|
||||||
|
size_t expected_image_size;
|
||||||
size_t image_size;
|
size_t image_size;
|
||||||
size_t response_rest;
|
size_t response_rest;
|
||||||
|
gboolean area_sensor;
|
||||||
gboolean deactivating;
|
gboolean deactivating;
|
||||||
};
|
};
|
||||||
G_DECLARE_FINAL_TYPE (FpiDeviceUpektcImg, fpi_device_upektc_img, FPI,
|
G_DECLARE_FINAL_TYPE (FpiDeviceUpektcImg, fpi_device_upektc_img, FPI,
|
||||||
@@ -180,6 +178,7 @@ capture_read_data_cb (FpiUsbTransfer *transfer, FpDevice *device,
|
|||||||
gpointer user_data, GError *error)
|
gpointer user_data, GError *error)
|
||||||
{
|
{
|
||||||
FpImageDevice *dev = FP_IMAGE_DEVICE (device);
|
FpImageDevice *dev = FP_IMAGE_DEVICE (device);
|
||||||
|
FpImageDeviceClass *img_class = FP_IMAGE_DEVICE_GET_CLASS (dev);
|
||||||
FpiDeviceUpektcImg *self = FPI_DEVICE_UPEKTC_IMG (dev);
|
FpiDeviceUpektcImg *self = FPI_DEVICE_UPEKTC_IMG (dev);
|
||||||
unsigned char *data = self->response;
|
unsigned char *data = self->response;
|
||||||
FpImage *img;
|
FpImage *img;
|
||||||
@@ -247,8 +246,30 @@ capture_read_data_cb (FpiUsbTransfer *transfer, FpDevice *device,
|
|||||||
CAPTURE_ACK_00_28);
|
CAPTURE_ACK_00_28);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case 0x13:
|
||||||
|
/* finger is present keep your finger on reader */
|
||||||
|
fpi_device_report_finger_status_changes (device,
|
||||||
|
FP_FINGER_STATUS_NEEDED,
|
||||||
|
FP_FINGER_STATUS_NONE);
|
||||||
|
fpi_ssm_jump_to_state (transfer->ssm,
|
||||||
|
self->area_sensor ?
|
||||||
|
CAPTURE_ACK_00_28 : CAPTURE_ACK_00_28_TERM);
|
||||||
|
break;
|
||||||
|
|
||||||
case 0x00:
|
case 0x00:
|
||||||
/* finger is present! */
|
/* finger is present! */
|
||||||
|
fpi_device_report_finger_status_changes (device,
|
||||||
|
FP_FINGER_STATUS_PRESENT,
|
||||||
|
FP_FINGER_STATUS_NONE);
|
||||||
|
fpi_ssm_jump_to_state (transfer->ssm,
|
||||||
|
CAPTURE_ACK_00_28);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 0x01:
|
||||||
|
/* no finger! */
|
||||||
|
fpi_device_report_finger_status_changes (device,
|
||||||
|
FP_FINGER_STATUS_NONE,
|
||||||
|
FP_FINGER_STATUS_PRESENT);
|
||||||
fpi_ssm_jump_to_state (transfer->ssm,
|
fpi_ssm_jump_to_state (transfer->ssm,
|
||||||
CAPTURE_ACK_00_28);
|
CAPTURE_ACK_00_28);
|
||||||
break;
|
break;
|
||||||
@@ -261,18 +282,20 @@ capture_read_data_cb (FpiUsbTransfer *transfer, FpDevice *device,
|
|||||||
fpi_image_device_report_finger_status (dev,
|
fpi_image_device_report_finger_status (dev,
|
||||||
FALSE);
|
FALSE);
|
||||||
fpi_ssm_jump_to_state (transfer->ssm,
|
fpi_ssm_jump_to_state (transfer->ssm,
|
||||||
CAPTURE_ACK_00_28_TERM);
|
self->area_sensor ?
|
||||||
|
CAPTURE_ACK_00_28 : CAPTURE_ACK_00_28_TERM);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 0x1d:
|
case 0x1d:
|
||||||
/* too much horisontal movement */
|
/* too much horizontal movement */
|
||||||
fp_err ("too much horisontal movement, aborting");
|
fp_err ("too much horizontal movement, aborting");
|
||||||
fpi_image_device_retry_scan (dev,
|
fpi_image_device_retry_scan (dev,
|
||||||
FP_DEVICE_RETRY_CENTER_FINGER);
|
FP_DEVICE_RETRY_CENTER_FINGER);
|
||||||
fpi_image_device_report_finger_status (dev,
|
fpi_image_device_report_finger_status (dev,
|
||||||
FALSE);
|
FALSE);
|
||||||
fpi_ssm_jump_to_state (transfer->ssm,
|
fpi_ssm_jump_to_state (transfer->ssm,
|
||||||
CAPTURE_ACK_00_28_TERM);
|
self->area_sensor ?
|
||||||
|
CAPTURE_ACK_00_28 : CAPTURE_ACK_00_28_TERM);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
@@ -283,7 +306,8 @@ capture_read_data_cb (FpiUsbTransfer *transfer, FpDevice *device,
|
|||||||
fpi_image_device_report_finger_status (dev,
|
fpi_image_device_report_finger_status (dev,
|
||||||
FALSE);
|
FALSE);
|
||||||
fpi_ssm_jump_to_state (transfer->ssm,
|
fpi_ssm_jump_to_state (transfer->ssm,
|
||||||
CAPTURE_ACK_00_28_TERM);
|
self->area_sensor ?
|
||||||
|
CAPTURE_ACK_00_28 : CAPTURE_ACK_00_28_TERM);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -307,13 +331,13 @@ capture_read_data_cb (FpiUsbTransfer *transfer, FpDevice *device,
|
|||||||
self->image_size +=
|
self->image_size +=
|
||||||
upektc_img_process_image_frame (self->image_bits + self->image_size,
|
upektc_img_process_image_frame (self->image_bits + self->image_size,
|
||||||
data);
|
data);
|
||||||
BUG_ON (self->image_size != IMAGE_SIZE);
|
BUG_ON (self->image_size != self->expected_image_size);
|
||||||
fp_dbg ("Image size is %lu",
|
fp_dbg ("Image size is %lu",
|
||||||
(gulong) self->image_size);
|
(gulong) self->image_size);
|
||||||
img = fp_image_new (IMAGE_WIDTH, IMAGE_HEIGHT);
|
img = fp_image_new (img_class->img_width, img_class->img_height);
|
||||||
img->flags |= FPI_IMAGE_PARTIAL;
|
img->flags |= FPI_IMAGE_PARTIAL;
|
||||||
memcpy (img->data, self->image_bits,
|
memcpy (img->data, self->image_bits,
|
||||||
IMAGE_SIZE);
|
self->image_size);
|
||||||
fpi_image_device_image_captured (dev, img);
|
fpi_image_device_image_captured (dev, img);
|
||||||
fpi_image_device_report_finger_status (dev,
|
fpi_image_device_report_finger_status (dev,
|
||||||
FALSE);
|
FALSE);
|
||||||
@@ -346,6 +370,10 @@ capture_run_state (FpiSsm *ssm, FpDevice *_dev)
|
|||||||
switch (fpi_ssm_get_cur_state (ssm))
|
switch (fpi_ssm_get_cur_state (ssm))
|
||||||
{
|
{
|
||||||
case CAPTURE_INIT_CAPTURE:
|
case CAPTURE_INIT_CAPTURE:
|
||||||
|
if (self->area_sensor)
|
||||||
|
upektc_img_submit_req (ssm, dev, upek2020_init_capture_press, sizeof (upek2020_init_capture_press),
|
||||||
|
self->seq, capture_reqs_cb);
|
||||||
|
else
|
||||||
upektc_img_submit_req (ssm, dev, upek2020_init_capture, sizeof (upek2020_init_capture),
|
upektc_img_submit_req (ssm, dev, upek2020_init_capture, sizeof (upek2020_init_capture),
|
||||||
self->seq, capture_reqs_cb);
|
self->seq, capture_reqs_cb);
|
||||||
self->seq++;
|
self->seq++;
|
||||||
@@ -513,15 +541,81 @@ init_reqs_cb (FpiUsbTransfer *transfer, FpDevice *device,
|
|||||||
fpi_ssm_mark_failed (transfer->ssm, error);
|
fpi_ssm_mark_failed (transfer->ssm, error);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* TODO: process response properly */
|
|
||||||
static void
|
static void
|
||||||
init_read_data_cb (FpiUsbTransfer *transfer, FpDevice *device,
|
init_read_data_cb (FpiUsbTransfer *transfer, FpDevice *device,
|
||||||
gpointer user_data, GError *error)
|
gpointer user_data, GError *error)
|
||||||
{
|
{
|
||||||
if (!error)
|
FpImageDevice *dev = FP_IMAGE_DEVICE (device);
|
||||||
fpi_ssm_next_state (transfer->ssm);
|
FpiDeviceUpektcImg *self = FPI_DEVICE_UPEKTC_IMG (dev);
|
||||||
else
|
unsigned char *data = self->response;
|
||||||
|
|
||||||
|
if (error)
|
||||||
|
{
|
||||||
fpi_ssm_mark_failed (transfer->ssm, error);
|
fpi_ssm_mark_failed (transfer->ssm, error);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (data[12] == 0x06 && data[13] == 0x14) /* if get_info */
|
||||||
|
{
|
||||||
|
FpImageDeviceClass *img_class = FP_IMAGE_DEVICE_GET_CLASS (dev);
|
||||||
|
uint16_t width = (data[51] << 8) | data[50];
|
||||||
|
uint16_t height = (data[53] << 8) | data[52];
|
||||||
|
|
||||||
|
self->area_sensor = !(data[49] & 0x80);
|
||||||
|
|
||||||
|
switch (width)
|
||||||
|
{
|
||||||
|
case 256:
|
||||||
|
fp_dbg ("Sensor type : TCS1x, width x height: %hu x %hu", width, height); /* 360x256 --- 270x192 must be set */
|
||||||
|
BUG_ON (height != 360);
|
||||||
|
img_class->img_width = 192;
|
||||||
|
img_class->img_height = 270;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 208:
|
||||||
|
fp_dbg ("Sensor type : TCS2, width x height: %hu x %hu", width, height); /* 288x208 --- 216x156 must be set */
|
||||||
|
BUG_ON (height != 288);
|
||||||
|
img_class->img_width = 156;
|
||||||
|
img_class->img_height = 216;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 248:
|
||||||
|
fp_dbg ("Sensor type : TCS3, width x height: %hu x %hu", width, height); /* 360x248 --- 270x186 must be set */
|
||||||
|
BUG_ON (height != 360);
|
||||||
|
img_class->img_width = 186;
|
||||||
|
img_class->img_height = 270;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 192:
|
||||||
|
fp_dbg ("Sensor type : TCS4x, width x height: %hu x %hu", width, height); /* 512x192 --- 384x144 must be set */
|
||||||
|
BUG_ON (height != 512);
|
||||||
|
img_class->img_width = 144;
|
||||||
|
img_class->img_height = 384;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 144:
|
||||||
|
fp_dbg ("Sensor type : TCS5x, width x height: %hu x %hu", width, height); /* 512x144 --- 384x108 must be set */
|
||||||
|
BUG_ON (height != 512);
|
||||||
|
img_class->img_width = 108;
|
||||||
|
img_class->img_height = 384;
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
fp_dbg ("Sensor type : Unknown");
|
||||||
|
|
||||||
|
fpi_ssm_mark_failed (transfer->ssm,
|
||||||
|
fpi_device_error_new_msg (FP_DEVICE_ERROR_PROTO,
|
||||||
|
"Unknown sensor type (reported size %dx%d)",
|
||||||
|
width, height));
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
self->expected_image_size = img_class->img_width * img_class->img_height;
|
||||||
|
self->image_bits = g_malloc0 (self->expected_image_size * 2);
|
||||||
|
}
|
||||||
|
|
||||||
|
fpi_ssm_next_state (transfer->ssm);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@@ -616,7 +710,6 @@ dev_deactivate (FpImageDevice *dev)
|
|||||||
static void
|
static void
|
||||||
dev_init (FpImageDevice *dev)
|
dev_init (FpImageDevice *dev)
|
||||||
{
|
{
|
||||||
FpiDeviceUpektcImg *self = FPI_DEVICE_UPEKTC_IMG (dev);
|
|
||||||
GError *error = NULL;
|
GError *error = NULL;
|
||||||
|
|
||||||
/* TODO check that device has endpoints we're using */
|
/* TODO check that device has endpoints we're using */
|
||||||
@@ -627,7 +720,6 @@ dev_init (FpImageDevice *dev)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
self->image_bits = g_malloc0 (IMAGE_SIZE * 2);
|
|
||||||
fpi_image_device_open_complete (dev, NULL);
|
fpi_image_device_open_complete (dev, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -687,6 +779,6 @@ fpi_device_upektc_img_class_init (FpiDeviceUpektcImgClass *klass)
|
|||||||
|
|
||||||
img_class->bz3_threshold = 20;
|
img_class->bz3_threshold = 20;
|
||||||
|
|
||||||
img_class->img_width = IMAGE_WIDTH;
|
img_class->img_width = -1;
|
||||||
img_class->img_height = IMAGE_HEIGHT;
|
img_class->img_height = -1;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -75,6 +75,22 @@ static const unsigned char upek2020_init_capture[] = {
|
|||||||
0x02,
|
0x02,
|
||||||
0x00, /* Wait for acceptable finger */
|
0x00, /* Wait for acceptable finger */
|
||||||
0x02,
|
0x02,
|
||||||
|
0x25, 0xa9 /* CRC */
|
||||||
|
};
|
||||||
|
|
||||||
|
static const unsigned char upek2020_init_capture_press[] = {
|
||||||
|
'C', 'i', 'a', 'o',
|
||||||
|
0x00,
|
||||||
|
0x00, 0x0e, /* Seq = 7, len = 0x00e */
|
||||||
|
0x28, /* CMD = 0x28 */
|
||||||
|
0x0b, 0x00, /* Inner len = 0x000b */
|
||||||
|
0x00, 0x00,
|
||||||
|
0x0e, /* SUBCMD = 0x0e */
|
||||||
|
0x02,
|
||||||
|
0xfe, 0xff, 0xff, 0xff, /* timeout = -2 = 0xfffffffe = infinite time */
|
||||||
|
0x02,
|
||||||
|
0x01, /* Wait for finger */
|
||||||
|
0x02,
|
||||||
0x14, 0x9a /* CRC */
|
0x14, 0x9a /* CRC */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -317,6 +317,7 @@ irq_handler (FpiUsbTransfer *transfer,
|
|||||||
if (urudev->irqs_stopped_cb)
|
if (urudev->irqs_stopped_cb)
|
||||||
urudev->irqs_stopped_cb (imgdev);
|
urudev->irqs_stopped_cb (imgdev);
|
||||||
urudev->irqs_stopped_cb = NULL;
|
urudev->irqs_stopped_cb = NULL;
|
||||||
|
g_clear_error (&error);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else if (error)
|
else if (error)
|
||||||
@@ -551,7 +552,7 @@ image_transfer_cb (FpiUsbTransfer *transfer, FpDevice *dev,
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
self->img_data = g_memdup (transfer->buffer, sizeof (struct uru4k_image));
|
self->img_data = g_memdup2 (transfer->buffer, sizeof (struct uru4k_image));
|
||||||
self->img_data_actual_length = transfer->actual_length;
|
self->img_data_actual_length = transfer->actual_length;
|
||||||
fpi_ssm_next_state (ssm);
|
fpi_ssm_next_state (ssm);
|
||||||
}
|
}
|
||||||
@@ -1413,6 +1414,9 @@ dev_deinit (FpImageDevice *dev)
|
|||||||
SECITEM_FreeItem (self->param, PR_TRUE);
|
SECITEM_FreeItem (self->param, PR_TRUE);
|
||||||
if (self->slot)
|
if (self->slot)
|
||||||
PK11_FreeSlot (self->slot);
|
PK11_FreeSlot (self->slot);
|
||||||
|
|
||||||
|
NSS_Shutdown ();
|
||||||
|
|
||||||
g_usb_device_release_interface (fpi_device_get_usb_device (FP_DEVICE (dev)),
|
g_usb_device_release_interface (fpi_device_get_usb_device (FP_DEVICE (dev)),
|
||||||
self->interface, 0, &error);
|
self->interface, 0, &error);
|
||||||
g_clear_pointer (&self->rand, g_rand_free);
|
g_clear_pointer (&self->rand, g_rand_free);
|
||||||
|
|||||||
@@ -581,7 +581,7 @@ activate_ssm (FpiSsm *ssm, FpDevice *dev)
|
|||||||
/* Initialize fingerprint buffer */
|
/* Initialize fingerprint buffer */
|
||||||
g_free (self->lines_buffer);
|
g_free (self->lines_buffer);
|
||||||
self->memory = VFS_USB_BUFFER_SIZE;
|
self->memory = VFS_USB_BUFFER_SIZE;
|
||||||
self->lines_buffer = g_malloc (self->memory);
|
self->lines_buffer = g_malloc0 (self->memory);
|
||||||
self->bytes = 0;
|
self->bytes = 0;
|
||||||
|
|
||||||
/* Finger is on the scanner */
|
/* Finger is on the scanner */
|
||||||
@@ -589,12 +589,15 @@ activate_ssm (FpiSsm *ssm, FpDevice *dev)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Increase buffer size while it's insufficient */
|
/* Increase buffer size while it's insufficient */
|
||||||
while (self->bytes + VFS_USB_BUFFER_SIZE > self->memory)
|
while (self->memory < self->bytes + VFS_USB_BUFFER_SIZE)
|
||||||
{
|
{
|
||||||
self->memory <<= 1;
|
int pre_memory = self->memory;
|
||||||
|
self->memory += VFS_USB_BUFFER_SIZE;
|
||||||
self->lines_buffer =
|
self->lines_buffer =
|
||||||
(struct vfs_line *) g_realloc (self->lines_buffer,
|
(struct vfs_line *) g_realloc (self->lines_buffer,
|
||||||
self->memory);
|
self->memory);
|
||||||
|
memset ((guint8 *) self->lines_buffer + pre_memory, 0,
|
||||||
|
VFS_USB_BUFFER_SIZE);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Receive chunk of data */
|
/* Receive chunk of data */
|
||||||
|
|||||||
@@ -432,7 +432,7 @@ img_process_data (int first_block, FpDeviceVfs301 *dev, const guint8 *buf, int l
|
|||||||
usb_send (dev, data, len, NULL); \
|
usb_send (dev, data, len, NULL); \
|
||||||
}
|
}
|
||||||
|
|
||||||
#define RAW_DATA(x) g_memdup (x, sizeof (x)), sizeof (x)
|
#define RAW_DATA(x) g_memdup2 (x, sizeof (x)), sizeof (x)
|
||||||
|
|
||||||
#define IS_VFS301_FP_SEQ_START(b) ((b[0] == 0x01) && (b[1] == 0xfe))
|
#define IS_VFS301_FP_SEQ_START(b) ((b[0] == 0x01) && (b[1] == 0xfe))
|
||||||
|
|
||||||
|
|||||||
@@ -273,7 +273,8 @@ on_stream_read_cb (GObject *source_object,
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// g_task_return_new_error (task, G_IO_ERROR, G_IO_ERROR_INVALID_DATA, "Got empty data");
|
g_task_return_new_error (task, G_IO_ERROR, G_IO_ERROR_INVALID_DATA,
|
||||||
|
"Got empty data");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -526,8 +526,8 @@ dev_verify (FpDevice *dev)
|
|||||||
|
|
||||||
if (scan_id)
|
if (scan_id)
|
||||||
{
|
{
|
||||||
|
g_autoptr(FpPrint) new_scan = NULL;
|
||||||
GVariant *data = NULL;
|
GVariant *data = NULL;
|
||||||
FpPrint *new_scan;
|
|
||||||
FpPrint *print;
|
FpPrint *print;
|
||||||
gboolean success;
|
gboolean success;
|
||||||
|
|
||||||
@@ -556,7 +556,7 @@ dev_verify (FpDevice *dev)
|
|||||||
self->match_reported = TRUE;
|
self->match_reported = TRUE;
|
||||||
fpi_device_verify_report (dev,
|
fpi_device_verify_report (dev,
|
||||||
success ? FPI_MATCH_SUCCESS : FPI_MATCH_FAIL,
|
success ? FPI_MATCH_SUCCESS : FPI_MATCH_FAIL,
|
||||||
new_scan,
|
g_steal_pointer (&new_scan),
|
||||||
NULL);
|
NULL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -733,7 +733,13 @@ dev_deinit (FpDevice *dev)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!self->keep_alive)
|
if (!self->keep_alive)
|
||||||
|
{
|
||||||
stop_listener (self);
|
stop_listener (self);
|
||||||
|
self->supports_cancellation = TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
self->enroll_stages_passed = 0;
|
||||||
|
self->match_reported = FALSE;
|
||||||
|
|
||||||
fpi_device_close_complete (dev, NULL);
|
fpi_device_close_complete (dev, NULL);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,676 +0,0 @@
|
|||||||
/*
|
|
||||||
* Virtual driver for SDCP device debugging
|
|
||||||
*
|
|
||||||
* Copyright (C) 2020 Benjamin Berg <bberg@redhat.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
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
* This is a virtual test driver to test the basic SDCP functionality.
|
|
||||||
* It uses the test binaries from Microsoft, which were extended to allow
|
|
||||||
* a simple chat with the device.
|
|
||||||
* The environment variable contains the to be executed binary including
|
|
||||||
* arguments. This binary should be compiled from the code in
|
|
||||||
* https://github.com/Microsoft/SecureDeviceConnectionProtocol
|
|
||||||
* or, until it is merged upstream
|
|
||||||
* https://github.com/benzea/SecureDeviceConnectionProtocol
|
|
||||||
*
|
|
||||||
* Note that using this as an external executable has the advantage that we
|
|
||||||
* do not need to link against mbedtls or any other crypto library.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#define FP_COMPONENT "virtual_sdcp"
|
|
||||||
|
|
||||||
#include "fpi-log.h"
|
|
||||||
#include "fpi-ssm.h"
|
|
||||||
|
|
||||||
#include "../fpi-sdcp-device.h"
|
|
||||||
|
|
||||||
#include <glib/gstdio.h>
|
|
||||||
#include <gio/gio.h>
|
|
||||||
|
|
||||||
struct _FpDeviceVirtualSdcp
|
|
||||||
{
|
|
||||||
FpSdcpDevice parent;
|
|
||||||
|
|
||||||
GSubprocess *proc;
|
|
||||||
GOutputStream *proc_stdin;
|
|
||||||
GInputStream *proc_stdout;
|
|
||||||
|
|
||||||
/* Only valid while a read/write is pending */
|
|
||||||
GByteArray *msg_out;
|
|
||||||
GByteArray *msg_in;
|
|
||||||
|
|
||||||
GByteArray *connect_msg;
|
|
||||||
};
|
|
||||||
|
|
||||||
G_DECLARE_FINAL_TYPE (FpDeviceVirtualSdcp, fpi_device_virtual_sdcp, FPI, DEVICE_VIRTUAL_SDCP, FpSdcpDevice)
|
|
||||||
G_DEFINE_TYPE (FpDeviceVirtualSdcp, fpi_device_virtual_sdcp, FP_TYPE_SDCP_DEVICE)
|
|
||||||
|
|
||||||
guint8 ca_1[] = {
|
|
||||||
0x30, 0x82, 0x03, 0xFD, 0x30, 0x82, 0x03, 0x82, 0xA0, 0x03, 0x02, 0x01, 0x02, 0x02, 0x13, 0x33,
|
|
||||||
0x00, 0x00, 0x00, 0x07, 0xE8, 0x9D, 0x61, 0x62, 0x4D, 0x46, 0x0F, 0x95, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x07, 0x30, 0x0A, 0x06, 0x08, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x04, 0x03, 0x02, 0x30, 0x81,
|
|
||||||
0x84, 0x31, 0x0B, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x06, 0x13, 0x02, 0x55, 0x53, 0x31, 0x13,
|
|
||||||
0x30, 0x11, 0x06, 0x03, 0x55, 0x04, 0x08, 0x13, 0x0A, 0x57, 0x61, 0x73, 0x68, 0x69, 0x6E, 0x67,
|
|
||||||
0x74, 0x6F, 0x6E, 0x31, 0x10, 0x30, 0x0E, 0x06, 0x03, 0x55, 0x04, 0x07, 0x13, 0x07, 0x52, 0x65,
|
|
||||||
0x64, 0x6D, 0x6F, 0x6E, 0x64, 0x31, 0x1E, 0x30, 0x1C, 0x06, 0x03, 0x55, 0x04, 0x0A, 0x13, 0x15,
|
|
||||||
0x4D, 0x69, 0x63, 0x72, 0x6F, 0x73, 0x6F, 0x66, 0x74, 0x20, 0x43, 0x6F, 0x72, 0x70, 0x6F, 0x72,
|
|
||||||
0x61, 0x74, 0x69, 0x6F, 0x6E, 0x31, 0x2E, 0x30, 0x2C, 0x06, 0x03, 0x55, 0x04, 0x03, 0x13, 0x25,
|
|
||||||
0x57, 0x69, 0x6E, 0x64, 0x6F, 0x77, 0x73, 0x20, 0x48, 0x65, 0x6C, 0x6C, 0x6F, 0x20, 0x53, 0x65,
|
|
||||||
0x63, 0x75, 0x72, 0x65, 0x20, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x73, 0x20, 0x50, 0x43, 0x41,
|
|
||||||
0x20, 0x32, 0x30, 0x31, 0x38, 0x30, 0x1E, 0x17, 0x0D, 0x31, 0x38, 0x30, 0x31, 0x33, 0x31, 0x31,
|
|
||||||
0x39, 0x35, 0x34, 0x35, 0x33, 0x5A, 0x17, 0x0D, 0x32, 0x38, 0x30, 0x31, 0x33, 0x31, 0x32, 0x30,
|
|
||||||
0x30, 0x34, 0x35, 0x33, 0x5A, 0x30, 0x7D, 0x31, 0x0B, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x06,
|
|
||||||
0x13, 0x02, 0x55, 0x53, 0x31, 0x13, 0x30, 0x11, 0x06, 0x03, 0x55, 0x04, 0x08, 0x13, 0x0A, 0x57,
|
|
||||||
0x61, 0x73, 0x68, 0x69, 0x6E, 0x67, 0x74, 0x6F, 0x6E, 0x31, 0x10, 0x30, 0x0E, 0x06, 0x03, 0x55,
|
|
||||||
0x04, 0x07, 0x13, 0x07, 0x52, 0x65, 0x64, 0x6D, 0x6F, 0x6E, 0x64, 0x31, 0x1E, 0x30, 0x1C, 0x06,
|
|
||||||
0x03, 0x55, 0x04, 0x0A, 0x13, 0x15, 0x4D, 0x69, 0x63, 0x72, 0x6F, 0x73, 0x6F, 0x66, 0x74, 0x20,
|
|
||||||
0x43, 0x6F, 0x72, 0x70, 0x6F, 0x72, 0x61, 0x74, 0x69, 0x6F, 0x6E, 0x31, 0x27, 0x30, 0x25, 0x06,
|
|
||||||
0x03, 0x55, 0x04, 0x03, 0x13, 0x1E, 0x57, 0x69, 0x6E, 0x64, 0x6F, 0x77, 0x73, 0x20, 0x48, 0x65,
|
|
||||||
0x6C, 0x6C, 0x6F, 0x20, 0x31, 0x39, 0x42, 0x39, 0x32, 0x39, 0x36, 0x35, 0x20, 0x43, 0x41, 0x20,
|
|
||||||
0x32, 0x30, 0x31, 0x38, 0x30, 0x59, 0x30, 0x13, 0x06, 0x07, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x02,
|
|
||||||
0x01, 0x06, 0x08, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x03, 0x01, 0x07, 0x03, 0x42, 0x00, 0x04, 0xBE,
|
|
||||||
0x4B, 0x90, 0x6E, 0x24, 0xFC, 0xA1, 0x53, 0xC8, 0xA7, 0x3C, 0x70, 0xE8, 0x97, 0xCD, 0x1B, 0x31,
|
|
||||||
0xE4, 0x95, 0x91, 0x7A, 0x58, 0xA2, 0x86, 0xA8, 0x70, 0xF6, 0x09, 0x30, 0x77, 0x99, 0x3D, 0x10,
|
|
||||||
0xDF, 0xF7, 0x95, 0x0F, 0x68, 0x83, 0xE6, 0xA4, 0x11, 0x7C, 0xDA, 0x82, 0xE7, 0x0B, 0x8B, 0xF2,
|
|
||||||
0x9D, 0x6B, 0x5B, 0xF5, 0x3E, 0x77, 0xB4, 0xC1, 0x0E, 0x49, 0x00, 0x83, 0xBA, 0x94, 0xF8, 0xA3,
|
|
||||||
0x82, 0x01, 0xD7, 0x30, 0x82, 0x01, 0xD3, 0x30, 0x10, 0x06, 0x09, 0x2B, 0x06, 0x01, 0x04, 0x01,
|
|
||||||
0x82, 0x37, 0x15, 0x01, 0x04, 0x03, 0x02, 0x01, 0x00, 0x30, 0x1D, 0x06, 0x03, 0x55, 0x1D, 0x0E,
|
|
||||||
0x04, 0x16, 0x04, 0x14, 0x13, 0x93, 0xC8, 0xCD, 0xF2, 0x23, 0x9A, 0x2D, 0xC6, 0x9B, 0x2A, 0xEB,
|
|
||||||
0x9A, 0xAB, 0x99, 0x0B, 0x56, 0x04, 0x5E, 0x7C, 0x30, 0x65, 0x06, 0x03, 0x55, 0x1D, 0x20, 0x04,
|
|
||||||
0x5E, 0x30, 0x5C, 0x30, 0x06, 0x06, 0x04, 0x55, 0x1D, 0x20, 0x00, 0x30, 0x52, 0x06, 0x0C, 0x2B,
|
|
||||||
0x06, 0x01, 0x04, 0x01, 0x82, 0x37, 0x4C, 0x83, 0x7D, 0x01, 0x01, 0x30, 0x42, 0x30, 0x40, 0x06,
|
|
||||||
0x08, 0x2B, 0x06, 0x01, 0x05, 0x05, 0x07, 0x02, 0x01, 0x16, 0x34, 0x68, 0x74, 0x74, 0x70, 0x3A,
|
|
||||||
0x2F, 0x2F, 0x77, 0x77, 0x77, 0x2E, 0x6D, 0x69, 0x63, 0x72, 0x6F, 0x73, 0x6F, 0x66, 0x74, 0x2E,
|
|
||||||
0x63, 0x6F, 0x6D, 0x2F, 0x70, 0x6B, 0x69, 0x6F, 0x70, 0x73, 0x2F, 0x44, 0x6F, 0x63, 0x73, 0x2F,
|
|
||||||
0x52, 0x65, 0x70, 0x6F, 0x73, 0x69, 0x74, 0x6F, 0x72, 0x79, 0x2E, 0x68, 0x74, 0x6D, 0x00, 0x30,
|
|
||||||
0x19, 0x06, 0x09, 0x2B, 0x06, 0x01, 0x04, 0x01, 0x82, 0x37, 0x14, 0x02, 0x04, 0x0C, 0x1E, 0x0A,
|
|
||||||
0x00, 0x53, 0x00, 0x75, 0x00, 0x62, 0x00, 0x43, 0x00, 0x41, 0x30, 0x0B, 0x06, 0x03, 0x55, 0x1D,
|
|
||||||
0x0F, 0x04, 0x04, 0x03, 0x02, 0x01, 0x86, 0x30, 0x0F, 0x06, 0x03, 0x55, 0x1D, 0x13, 0x01, 0x01,
|
|
||||||
0xFF, 0x04, 0x05, 0x30, 0x03, 0x01, 0x01, 0xFF, 0x30, 0x1F, 0x06, 0x03, 0x55, 0x1D, 0x23, 0x04,
|
|
||||||
0x18, 0x30, 0x16, 0x80, 0x14, 0xDA, 0xCA, 0x4B, 0xD0, 0x4C, 0x56, 0x03, 0x27, 0x5F, 0x97, 0xEB,
|
|
||||||
0x75, 0xA3, 0x02, 0xC3, 0xBF, 0x45, 0x9C, 0xF8, 0xB1, 0x30, 0x68, 0x06, 0x03, 0x55, 0x1D, 0x1F,
|
|
||||||
0x04, 0x61, 0x30, 0x5F, 0x30, 0x5D, 0xA0, 0x5B, 0xA0, 0x59, 0x86, 0x57, 0x68, 0x74, 0x74, 0x70,
|
|
||||||
0x3A, 0x2F, 0x2F, 0x77, 0x77, 0x77, 0x2E, 0x6D, 0x69, 0x63, 0x72, 0x6F, 0x73, 0x6F, 0x66, 0x74,
|
|
||||||
0x2E, 0x63, 0x6F, 0x6D, 0x2F, 0x70, 0x6B, 0x69, 0x6F, 0x70, 0x73, 0x2F, 0x63, 0x72, 0x6C, 0x2F,
|
|
||||||
0x57, 0x69, 0x6E, 0x64, 0x6F, 0x77, 0x73, 0x25, 0x32, 0x30, 0x48, 0x65, 0x6C, 0x6C, 0x6F, 0x25,
|
|
||||||
0x32, 0x30, 0x53, 0x65, 0x63, 0x75, 0x72, 0x65, 0x25, 0x32, 0x30, 0x44, 0x65, 0x76, 0x69, 0x63,
|
|
||||||
0x65, 0x73, 0x25, 0x32, 0x30, 0x50, 0x43, 0x41, 0x25, 0x32, 0x30, 0x32, 0x30, 0x31, 0x38, 0x2E,
|
|
||||||
0x63, 0x72, 0x6C, 0x30, 0x75, 0x06, 0x08, 0x2B, 0x06, 0x01, 0x05, 0x05, 0x07, 0x01, 0x01, 0x04,
|
|
||||||
0x69, 0x30, 0x67, 0x30, 0x65, 0x06, 0x08, 0x2B, 0x06, 0x01, 0x05, 0x05, 0x07, 0x30, 0x02, 0x86,
|
|
||||||
0x59, 0x68, 0x74, 0x74, 0x70, 0x3A, 0x2F, 0x2F, 0x77, 0x77, 0x77, 0x2E, 0x6D, 0x69, 0x63, 0x72,
|
|
||||||
0x6F, 0x73, 0x6F, 0x66, 0x74, 0x2E, 0x63, 0x6F, 0x6D, 0x2F, 0x70, 0x6B, 0x69, 0x6F, 0x70, 0x73,
|
|
||||||
0x2F, 0x63, 0x65, 0x72, 0x74, 0x73, 0x2F, 0x57, 0x69, 0x6E, 0x64, 0x6F, 0x77, 0x73, 0x25, 0x32,
|
|
||||||
0x30, 0x48, 0x65, 0x6C, 0x6C, 0x6F, 0x25, 0x32, 0x30, 0x53, 0x65, 0x63, 0x75, 0x72, 0x65, 0x25,
|
|
||||||
0x32, 0x30, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x73, 0x25, 0x32, 0x30, 0x50, 0x43, 0x41, 0x25,
|
|
||||||
0x32, 0x30, 0x32, 0x30, 0x31, 0x38, 0x2E, 0x63, 0x72, 0x74, 0x30, 0x0A, 0x06, 0x08, 0x2A, 0x86,
|
|
||||||
0x48, 0xCE, 0x3D, 0x04, 0x03, 0x02, 0x03, 0x69, 0x00, 0x30, 0x66, 0x02, 0x31, 0x00, 0x87, 0xB6,
|
|
||||||
0x82, 0xF3, 0xDA, 0xBE, 0xB1, 0x7B, 0x98, 0x7D, 0x3D, 0x0A, 0x90, 0xA8, 0xF5, 0xBF, 0x15, 0xC3,
|
|
||||||
0xEE, 0x8A, 0x4E, 0xC0, 0x7B, 0x10, 0x1D, 0xA9, 0xE3, 0x0B, 0xEC, 0x2C, 0x53, 0x4E, 0xA7, 0xBD,
|
|
||||||
0xF1, 0x6C, 0xAD, 0x18, 0x55, 0xBA, 0x25, 0x73, 0x55, 0xB7, 0x5B, 0x12, 0x24, 0xF4, 0x02, 0x31,
|
|
||||||
0x00, 0xAF, 0x02, 0x9C, 0x4B, 0x92, 0xD0, 0x72, 0xA5, 0x80, 0xCA, 0x69, 0x2B, 0x38, 0x50, 0x64,
|
|
||||||
0xD8, 0x58, 0x9E, 0xEA, 0xD6, 0x35, 0xCF, 0x68, 0x98, 0x92, 0x81, 0x09, 0x61, 0xC2, 0xBD, 0xB1,
|
|
||||||
0x4C, 0x7F, 0xAE, 0x55, 0x7B, 0xFC, 0x22, 0xDD, 0xD6, 0xB7, 0x7C, 0xB5, 0xA8, 0x18, 0x5D, 0x33,
|
|
||||||
0x04
|
|
||||||
};
|
|
||||||
guint8 ca_2[] = {
|
|
||||||
0x30, 0x82, 0x04, 0x56, 0x30, 0x82, 0x03, 0xDC, 0xA0, 0x03, 0x02, 0x01, 0x02, 0x02, 0x13, 0x33,
|
|
||||||
0x00, 0x00, 0x00, 0x03, 0x6C, 0xCF, 0xED, 0xE2, 0x44, 0x70, 0x19, 0xBF, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x03, 0x30, 0x0A, 0x06, 0x08, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x04, 0x03, 0x03, 0x30, 0x81,
|
|
||||||
0x94, 0x31, 0x0B, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x06, 0x13, 0x02, 0x55, 0x53, 0x31, 0x13,
|
|
||||||
0x30, 0x11, 0x06, 0x03, 0x55, 0x04, 0x08, 0x13, 0x0A, 0x57, 0x61, 0x73, 0x68, 0x69, 0x6E, 0x67,
|
|
||||||
0x74, 0x6F, 0x6E, 0x31, 0x10, 0x30, 0x0E, 0x06, 0x03, 0x55, 0x04, 0x07, 0x13, 0x07, 0x52, 0x65,
|
|
||||||
0x64, 0x6D, 0x6F, 0x6E, 0x64, 0x31, 0x1E, 0x30, 0x1C, 0x06, 0x03, 0x55, 0x04, 0x0A, 0x13, 0x15,
|
|
||||||
0x4D, 0x69, 0x63, 0x72, 0x6F, 0x73, 0x6F, 0x66, 0x74, 0x20, 0x43, 0x6F, 0x72, 0x70, 0x6F, 0x72,
|
|
||||||
0x61, 0x74, 0x69, 0x6F, 0x6E, 0x31, 0x3E, 0x30, 0x3C, 0x06, 0x03, 0x55, 0x04, 0x03, 0x13, 0x35,
|
|
||||||
0x4D, 0x69, 0x63, 0x72, 0x6F, 0x73, 0x6F, 0x66, 0x74, 0x20, 0x45, 0x43, 0x43, 0x20, 0x44, 0x65,
|
|
||||||
0x76, 0x69, 0x63, 0x65, 0x73, 0x20, 0x52, 0x6F, 0x6F, 0x74, 0x20, 0x43, 0x65, 0x72, 0x74, 0x69,
|
|
||||||
0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x20, 0x41, 0x75, 0x74, 0x68, 0x6F, 0x72, 0x69, 0x74, 0x79,
|
|
||||||
0x20, 0x32, 0x30, 0x31, 0x37, 0x30, 0x1E, 0x17, 0x0D, 0x31, 0x38, 0x30, 0x31, 0x32, 0x35, 0x31,
|
|
||||||
0x39, 0x34, 0x39, 0x33, 0x38, 0x5A, 0x17, 0x0D, 0x33, 0x33, 0x30, 0x31, 0x32, 0x35, 0x31, 0x39,
|
|
||||||
0x35, 0x39, 0x33, 0x38, 0x5A, 0x30, 0x81, 0x84, 0x31, 0x0B, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04,
|
|
||||||
0x06, 0x13, 0x02, 0x55, 0x53, 0x31, 0x13, 0x30, 0x11, 0x06, 0x03, 0x55, 0x04, 0x08, 0x13, 0x0A,
|
|
||||||
0x57, 0x61, 0x73, 0x68, 0x69, 0x6E, 0x67, 0x74, 0x6F, 0x6E, 0x31, 0x10, 0x30, 0x0E, 0x06, 0x03,
|
|
||||||
0x55, 0x04, 0x07, 0x13, 0x07, 0x52, 0x65, 0x64, 0x6D, 0x6F, 0x6E, 0x64, 0x31, 0x1E, 0x30, 0x1C,
|
|
||||||
0x06, 0x03, 0x55, 0x04, 0x0A, 0x13, 0x15, 0x4D, 0x69, 0x63, 0x72, 0x6F, 0x73, 0x6F, 0x66, 0x74,
|
|
||||||
0x20, 0x43, 0x6F, 0x72, 0x70, 0x6F, 0x72, 0x61, 0x74, 0x69, 0x6F, 0x6E, 0x31, 0x2E, 0x30, 0x2C,
|
|
||||||
0x06, 0x03, 0x55, 0x04, 0x03, 0x13, 0x25, 0x57, 0x69, 0x6E, 0x64, 0x6F, 0x77, 0x73, 0x20, 0x48,
|
|
||||||
0x65, 0x6C, 0x6C, 0x6F, 0x20, 0x53, 0x65, 0x63, 0x75, 0x72, 0x65, 0x20, 0x44, 0x65, 0x76, 0x69,
|
|
||||||
0x63, 0x65, 0x73, 0x20, 0x50, 0x43, 0x41, 0x20, 0x32, 0x30, 0x31, 0x38, 0x30, 0x76, 0x30, 0x10,
|
|
||||||
0x06, 0x07, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x02, 0x01, 0x06, 0x05, 0x2B, 0x81, 0x04, 0x00, 0x22,
|
|
||||||
0x03, 0x62, 0x00, 0x04, 0x1D, 0xDD, 0x08, 0x02, 0x03, 0x25, 0x75, 0x20, 0xE2, 0x71, 0x8B, 0xAD,
|
|
||||||
0x28, 0x09, 0x82, 0xE9, 0x06, 0xEE, 0x83, 0xC5, 0x3A, 0x6C, 0x4B, 0x71, 0x92, 0x50, 0x4E, 0x20,
|
|
||||||
0xE9, 0x72, 0xB4, 0xFC, 0x53, 0x2A, 0xEF, 0x5D, 0xCC, 0x9A, 0xB4, 0xCD, 0x76, 0xB8, 0x94, 0x97,
|
|
||||||
0x44, 0xB2, 0x71, 0x0E, 0xC9, 0xB1, 0x16, 0x03, 0xA1, 0x65, 0x2B, 0xB9, 0xE8, 0x5D, 0x5F, 0xF2,
|
|
||||||
0x30, 0x2E, 0xDD, 0xB1, 0x2B, 0x20, 0xFC, 0xBE, 0x00, 0x88, 0xEA, 0x1F, 0xA7, 0x7F, 0x99, 0x84,
|
|
||||||
0x98, 0x7C, 0x71, 0x3E, 0x4D, 0x34, 0x83, 0x69, 0x9B, 0x08, 0xCB, 0x78, 0xB2, 0x4B, 0xBD, 0xD7,
|
|
||||||
0x3E, 0xBE, 0x67, 0xA0, 0xA3, 0x82, 0x01, 0xFC, 0x30, 0x82, 0x01, 0xF8, 0x30, 0x10, 0x06, 0x09,
|
|
||||||
0x2B, 0x06, 0x01, 0x04, 0x01, 0x82, 0x37, 0x15, 0x01, 0x04, 0x03, 0x02, 0x01, 0x00, 0x30, 0x1D,
|
|
||||||
0x06, 0x03, 0x55, 0x1D, 0x0E, 0x04, 0x16, 0x04, 0x14, 0xDA, 0xCA, 0x4B, 0xD0, 0x4C, 0x56, 0x03,
|
|
||||||
0x27, 0x5F, 0x97, 0xEB, 0x75, 0xA3, 0x02, 0xC3, 0xBF, 0x45, 0x9C, 0xF8, 0xB1, 0x30, 0x65, 0x06,
|
|
||||||
0x03, 0x55, 0x1D, 0x20, 0x04, 0x5E, 0x30, 0x5C, 0x30, 0x06, 0x06, 0x04, 0x55, 0x1D, 0x20, 0x00,
|
|
||||||
0x30, 0x52, 0x06, 0x0C, 0x2B, 0x06, 0x01, 0x04, 0x01, 0x82, 0x37, 0x4C, 0x83, 0x7D, 0x01, 0x01,
|
|
||||||
0x30, 0x42, 0x30, 0x40, 0x06, 0x08, 0x2B, 0x06, 0x01, 0x05, 0x05, 0x07, 0x02, 0x01, 0x16, 0x34,
|
|
||||||
0x68, 0x74, 0x74, 0x70, 0x3A, 0x2F, 0x2F, 0x77, 0x77, 0x77, 0x2E, 0x6D, 0x69, 0x63, 0x72, 0x6F,
|
|
||||||
0x73, 0x6F, 0x66, 0x74, 0x2E, 0x63, 0x6F, 0x6D, 0x2F, 0x70, 0x6B, 0x69, 0x6F, 0x70, 0x73, 0x2F,
|
|
||||||
0x44, 0x6F, 0x63, 0x73, 0x2F, 0x52, 0x65, 0x70, 0x6F, 0x73, 0x69, 0x74, 0x6F, 0x72, 0x79, 0x2E,
|
|
||||||
0x68, 0x74, 0x6D, 0x00, 0x30, 0x19, 0x06, 0x09, 0x2B, 0x06, 0x01, 0x04, 0x01, 0x82, 0x37, 0x14,
|
|
||||||
0x02, 0x04, 0x0C, 0x1E, 0x0A, 0x00, 0x53, 0x00, 0x75, 0x00, 0x62, 0x00, 0x43, 0x00, 0x41, 0x30,
|
|
||||||
0x0B, 0x06, 0x03, 0x55, 0x1D, 0x0F, 0x04, 0x04, 0x03, 0x02, 0x01, 0x86, 0x30, 0x0F, 0x06, 0x03,
|
|
||||||
0x55, 0x1D, 0x13, 0x01, 0x01, 0xFF, 0x04, 0x05, 0x30, 0x03, 0x01, 0x01, 0xFF, 0x30, 0x1F, 0x06,
|
|
||||||
0x03, 0x55, 0x1D, 0x23, 0x04, 0x18, 0x30, 0x16, 0x80, 0x14, 0x14, 0xDA, 0x5B, 0xF1, 0x0E, 0x66,
|
|
||||||
0x47, 0xD1, 0x5D, 0x13, 0x5F, 0x5B, 0x7A, 0xEB, 0xEB, 0x5F, 0x01, 0x08, 0xB5, 0x49, 0x30, 0x7A,
|
|
||||||
0x06, 0x03, 0x55, 0x1D, 0x1F, 0x04, 0x73, 0x30, 0x71, 0x30, 0x6F, 0xA0, 0x6D, 0xA0, 0x6B, 0x86,
|
|
||||||
0x69, 0x68, 0x74, 0x74, 0x70, 0x3A, 0x2F, 0x2F, 0x77, 0x77, 0x77, 0x2E, 0x6D, 0x69, 0x63, 0x72,
|
|
||||||
0x6F, 0x73, 0x6F, 0x66, 0x74, 0x2E, 0x63, 0x6F, 0x6D, 0x2F, 0x70, 0x6B, 0x69, 0x6F, 0x70, 0x73,
|
|
||||||
0x2F, 0x63, 0x72, 0x6C, 0x2F, 0x4D, 0x69, 0x63, 0x72, 0x6F, 0x73, 0x6F, 0x66, 0x74, 0x25, 0x32,
|
|
||||||
0x30, 0x45, 0x43, 0x43, 0x25, 0x32, 0x30, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x73, 0x25, 0x32,
|
|
||||||
0x30, 0x52, 0x6F, 0x6F, 0x74, 0x25, 0x32, 0x30, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63,
|
|
||||||
0x61, 0x74, 0x65, 0x25, 0x32, 0x30, 0x41, 0x75, 0x74, 0x68, 0x6F, 0x72, 0x69, 0x74, 0x79, 0x25,
|
|
||||||
0x32, 0x30, 0x32, 0x30, 0x31, 0x37, 0x2E, 0x63, 0x72, 0x6C, 0x30, 0x81, 0x87, 0x06, 0x08, 0x2B,
|
|
||||||
0x06, 0x01, 0x05, 0x05, 0x07, 0x01, 0x01, 0x04, 0x7B, 0x30, 0x79, 0x30, 0x77, 0x06, 0x08, 0x2B,
|
|
||||||
0x06, 0x01, 0x05, 0x05, 0x07, 0x30, 0x02, 0x86, 0x6B, 0x68, 0x74, 0x74, 0x70, 0x3A, 0x2F, 0x2F,
|
|
||||||
0x77, 0x77, 0x77, 0x2E, 0x6D, 0x69, 0x63, 0x72, 0x6F, 0x73, 0x6F, 0x66, 0x74, 0x2E, 0x63, 0x6F,
|
|
||||||
0x6D, 0x2F, 0x70, 0x6B, 0x69, 0x6F, 0x70, 0x73, 0x2F, 0x63, 0x65, 0x72, 0x74, 0x73, 0x2F, 0x4D,
|
|
||||||
0x69, 0x63, 0x72, 0x6F, 0x73, 0x6F, 0x66, 0x74, 0x25, 0x32, 0x30, 0x45, 0x43, 0x43, 0x25, 0x32,
|
|
||||||
0x30, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x73, 0x25, 0x32, 0x30, 0x52, 0x6F, 0x6F, 0x74, 0x25,
|
|
||||||
0x32, 0x30, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x25, 0x32, 0x30,
|
|
||||||
0x41, 0x75, 0x74, 0x68, 0x6F, 0x72, 0x69, 0x74, 0x79, 0x25, 0x32, 0x30, 0x32, 0x30, 0x31, 0x37,
|
|
||||||
0x2E, 0x63, 0x72, 0x74, 0x30, 0x0A, 0x06, 0x08, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x04, 0x03, 0x03,
|
|
||||||
0x03, 0x68, 0x00, 0x30, 0x65, 0x02, 0x30, 0x56, 0x2A, 0xAD, 0x72, 0x4C, 0xB9, 0x8C, 0xB3, 0x23,
|
|
||||||
0x80, 0xF5, 0x5F, 0xF8, 0x21, 0x94, 0x66, 0x0F, 0x76, 0x77, 0xE2, 0x7B, 0x03, 0xDD, 0x30, 0x5E,
|
|
||||||
0xCB, 0x90, 0xCA, 0x78, 0xE6, 0x0B, 0x2D, 0x12, 0xE5, 0xF7, 0x67, 0x31, 0x58, 0x71, 0xE6, 0xF3,
|
|
||||||
0x64, 0xC1, 0x04, 0xB3, 0x8B, 0xE9, 0xE2, 0x02, 0x31, 0x00, 0xB9, 0x20, 0x61, 0xB9, 0xD0, 0x5E,
|
|
||||||
0x3A, 0xA4, 0xA2, 0x8A, 0xFE, 0x1D, 0xFC, 0x27, 0x61, 0x0B, 0x98, 0x16, 0x8C, 0x02, 0x9C, 0x20,
|
|
||||||
0x7F, 0xEE, 0xF3, 0xCB, 0x1F, 0x0A, 0x37, 0x62, 0xB1, 0x8E, 0xCE, 0xD9, 0x9A, 0x9E, 0xAC, 0xE6,
|
|
||||||
0x1A, 0xD4, 0xB8, 0xF1, 0xA8, 0x2B, 0xB1, 0xB4, 0x40, 0x9B
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
static void
|
|
||||||
msg_written_cb (GObject *source_object,
|
|
||||||
GAsyncResult *res,
|
|
||||||
gpointer user_data)
|
|
||||||
{
|
|
||||||
GError *error = NULL;
|
|
||||||
GOutputStream *stream = G_OUTPUT_STREAM (source_object);
|
|
||||||
FpiSsm *ssm = user_data;
|
|
||||||
FpDeviceVirtualSdcp *self = FPI_DEVICE_VIRTUAL_SDCP (fpi_ssm_get_device (ssm));
|
|
||||||
|
|
||||||
g_clear_pointer (&self->msg_out, g_byte_array_unref);
|
|
||||||
g_assert (self->msg_out == NULL);
|
|
||||||
|
|
||||||
if (!g_output_stream_write_all_finish (stream, res, NULL, &error))
|
|
||||||
{
|
|
||||||
fpi_ssm_mark_failed (ssm, error);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
fpi_ssm_next_state (ssm);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
msg_received_cb (GObject *source_object,
|
|
||||||
GAsyncResult *res,
|
|
||||||
gpointer user_data)
|
|
||||||
{
|
|
||||||
GError *error = NULL;
|
|
||||||
GInputStream *stream = G_INPUT_STREAM (source_object);
|
|
||||||
FpiSsm *ssm = user_data;
|
|
||||||
FpDeviceVirtualSdcp *self = FPI_DEVICE_VIRTUAL_SDCP (fpi_ssm_get_device (ssm));
|
|
||||||
gsize read;
|
|
||||||
|
|
||||||
g_assert (self->msg_out == NULL);
|
|
||||||
|
|
||||||
if (!g_input_stream_read_all_finish (stream, res, &read, &error) ||
|
|
||||||
read != self->msg_in->len)
|
|
||||||
{
|
|
||||||
g_clear_pointer (&self->msg_in, g_byte_array_unref);
|
|
||||||
|
|
||||||
if (!error)
|
|
||||||
error = fpi_device_error_new_msg (FP_DEVICE_ERROR_PROTO,
|
|
||||||
"Received EOF while reading from test binary.");
|
|
||||||
|
|
||||||
fpi_ssm_mark_failed (ssm, error);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
fpi_ssm_next_state (ssm);
|
|
||||||
}
|
|
||||||
|
|
||||||
enum {
|
|
||||||
SEND_MESSAGE,
|
|
||||||
RECV_MESSAGE,
|
|
||||||
SEND_RECV_STATES
|
|
||||||
};
|
|
||||||
|
|
||||||
static void
|
|
||||||
send_recv_ssm (FpiSsm *ssm, FpDevice *dev)
|
|
||||||
{
|
|
||||||
FpDeviceVirtualSdcp *self = FPI_DEVICE_VIRTUAL_SDCP (dev);
|
|
||||||
|
|
||||||
switch (fpi_ssm_get_cur_state (ssm))
|
|
||||||
{
|
|
||||||
case SEND_MESSAGE:
|
|
||||||
g_output_stream_write_all_async (self->proc_stdin,
|
|
||||||
self->msg_out->data,
|
|
||||||
self->msg_out->len,
|
|
||||||
G_PRIORITY_DEFAULT,
|
|
||||||
fpi_device_get_cancellable (FP_DEVICE (dev)),
|
|
||||||
msg_written_cb,
|
|
||||||
ssm);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case RECV_MESSAGE:
|
|
||||||
g_input_stream_read_all_async (self->proc_stdout,
|
|
||||||
self->msg_in->data,
|
|
||||||
self->msg_in->len,
|
|
||||||
G_PRIORITY_DEFAULT,
|
|
||||||
fpi_device_get_cancellable (FP_DEVICE (dev)),
|
|
||||||
msg_received_cb,
|
|
||||||
ssm);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
connect_2_cb (FpiSsm *ssm, FpDevice *dev, GError *error)
|
|
||||||
{
|
|
||||||
g_autoptr(GBytes) recv_data = NULL;
|
|
||||||
g_autoptr(GBytes) r_d = NULL;
|
|
||||||
g_autoptr(FpiSdcpClaim) claim = NULL;
|
|
||||||
g_autoptr(GBytes) mac = NULL;
|
|
||||||
g_autoptr(GBytes) ca_1_bytes = NULL, ca_2_bytes = NULL;
|
|
||||||
FpDeviceVirtualSdcp *self = FPI_DEVICE_VIRTUAL_SDCP (dev);
|
|
||||||
guint16 cert_size;
|
|
||||||
|
|
||||||
if (error)
|
|
||||||
{
|
|
||||||
fpi_sdcp_device_connect_complete (FP_SDCP_DEVICE (dev), NULL, NULL, NULL, error);
|
|
||||||
g_clear_pointer (&self->connect_msg, g_byte_array_unref);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
memcpy (&cert_size, self->connect_msg->data + 32, 2);
|
|
||||||
g_byte_array_append (self->connect_msg, self->msg_in->data, self->msg_in->len);
|
|
||||||
g_clear_pointer (&self->msg_in, g_byte_array_unref);
|
|
||||||
/* Double check that the size is correct. */
|
|
||||||
g_assert (self->connect_msg->len == 32 + (2 + cert_size + 65 + 65 + 32 + 64 + 64) + 32);
|
|
||||||
recv_data = g_byte_array_free_to_bytes (g_steal_pointer (&self->connect_msg));
|
|
||||||
|
|
||||||
claim = fpi_sdcp_claim_new ();
|
|
||||||
r_d = g_bytes_new_from_bytes (recv_data, 0, 32);
|
|
||||||
claim->cert_m = g_bytes_new_from_bytes (recv_data, 34, cert_size);
|
|
||||||
claim->pk_d = g_bytes_new_from_bytes (recv_data, 34 + cert_size, 65);
|
|
||||||
claim->pk_f = g_bytes_new_from_bytes (recv_data, 34 + cert_size + 65, 65);
|
|
||||||
claim->h_f = g_bytes_new_from_bytes (recv_data, 34 + cert_size + 65 + 65, 32);
|
|
||||||
claim->s_m = g_bytes_new_from_bytes (recv_data, 34 + cert_size + 65 + 65 + 32, 64);
|
|
||||||
claim->s_d = g_bytes_new_from_bytes (recv_data, 34 + cert_size + 65 + 65 + 32 + 64, 64);
|
|
||||||
mac = g_bytes_new_from_bytes (recv_data, 34 + cert_size + 65 + 65 + 32 + 64 + 64, 32);
|
|
||||||
|
|
||||||
ca_1_bytes = g_bytes_new_static (ca_1, G_N_ELEMENTS (ca_1));
|
|
||||||
ca_2_bytes = g_bytes_new_static (ca_2, G_N_ELEMENTS (ca_2));
|
|
||||||
|
|
||||||
fpi_sdcp_device_set_intermediat_cas (FP_SDCP_DEVICE (dev),
|
|
||||||
ca_1_bytes,
|
|
||||||
ca_2_bytes);
|
|
||||||
|
|
||||||
fpi_sdcp_device_connect_complete (FP_SDCP_DEVICE (dev), r_d, claim, mac, NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
connect_1_cb (FpiSsm *ssm, FpDevice *dev, GError *error)
|
|
||||||
{
|
|
||||||
FpDeviceVirtualSdcp *self = FPI_DEVICE_VIRTUAL_SDCP (dev);
|
|
||||||
guint16 cert_size;
|
|
||||||
|
|
||||||
if (error)
|
|
||||||
{
|
|
||||||
fpi_sdcp_device_connect_complete (FP_SDCP_DEVICE (dev), NULL, NULL, NULL, error);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
g_clear_pointer (&self->connect_msg, g_byte_array_unref);
|
|
||||||
self->connect_msg = g_steal_pointer (&self->msg_in);
|
|
||||||
|
|
||||||
memcpy (&cert_size, self->connect_msg->data + 32, 2);
|
|
||||||
|
|
||||||
/* Nothing to send and the rest to receive. */
|
|
||||||
self->msg_out = g_byte_array_new ();
|
|
||||||
self->msg_in = g_byte_array_new ();
|
|
||||||
g_byte_array_set_size (self->msg_in, 32 + (2 + cert_size + 65 + 65 + 32 + 64 + 64) + 32 - self->connect_msg->len);
|
|
||||||
|
|
||||||
/* New SSM */
|
|
||||||
ssm = fpi_ssm_new_full (FP_DEVICE (dev), send_recv_ssm, SEND_RECV_STATES, SEND_RECV_STATES, "connect 2");
|
|
||||||
fpi_ssm_start (ssm, connect_2_cb);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
connect (FpSdcpDevice *dev)
|
|
||||||
{
|
|
||||||
g_autoptr(GBytes) r_h = NULL;
|
|
||||||
g_autoptr(GBytes) pk_h = NULL;
|
|
||||||
FpDeviceVirtualSdcp *self = FPI_DEVICE_VIRTUAL_SDCP (dev);
|
|
||||||
FpiSsm *ssm;
|
|
||||||
|
|
||||||
G_DEBUG_HERE ();
|
|
||||||
|
|
||||||
g_assert (self->proc);
|
|
||||||
g_assert (self->connect_msg == NULL);
|
|
||||||
|
|
||||||
fpi_sdcp_device_get_connect_data (dev, &r_h, &pk_h);
|
|
||||||
|
|
||||||
self->msg_out = g_byte_array_new ();
|
|
||||||
g_byte_array_append (self->msg_out, (const guint8 *) "C", 1);
|
|
||||||
g_byte_array_append (self->msg_out,
|
|
||||||
g_bytes_get_data (r_h, NULL),
|
|
||||||
g_bytes_get_size (r_h));
|
|
||||||
g_byte_array_append (self->msg_out,
|
|
||||||
g_bytes_get_data (pk_h, NULL),
|
|
||||||
g_bytes_get_size (pk_h));
|
|
||||||
|
|
||||||
self->msg_in = g_byte_array_new ();
|
|
||||||
g_byte_array_set_size (self->msg_in, 34);
|
|
||||||
|
|
||||||
ssm = fpi_ssm_new_full (FP_DEVICE (dev), send_recv_ssm, SEND_RECV_STATES, SEND_RECV_STATES, "connect");
|
|
||||||
fpi_ssm_start (ssm, connect_1_cb);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
reconnect_cb (FpiSsm *ssm, FpDevice *dev, GError *error)
|
|
||||||
{
|
|
||||||
g_autoptr(GBytes) mac = NULL;
|
|
||||||
FpDeviceVirtualSdcp *self = FPI_DEVICE_VIRTUAL_SDCP (dev);
|
|
||||||
|
|
||||||
if (error)
|
|
||||||
{
|
|
||||||
fpi_sdcp_device_reconnect_complete (FP_SDCP_DEVICE (dev), mac, error);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
mac = g_byte_array_free_to_bytes (g_steal_pointer (&self->msg_in));
|
|
||||||
|
|
||||||
fpi_sdcp_device_reconnect_complete (FP_SDCP_DEVICE (dev), mac, NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
reconnect (FpSdcpDevice *dev)
|
|
||||||
{
|
|
||||||
g_autoptr(GBytes) r_h = NULL;
|
|
||||||
FpDeviceVirtualSdcp *self = FPI_DEVICE_VIRTUAL_SDCP (dev);
|
|
||||||
FpiSsm *ssm;
|
|
||||||
|
|
||||||
G_DEBUG_HERE ();
|
|
||||||
|
|
||||||
g_assert (self->proc);
|
|
||||||
|
|
||||||
fpi_sdcp_device_get_reconnect_data (dev, &r_h);
|
|
||||||
|
|
||||||
self->msg_out = g_byte_array_new ();
|
|
||||||
g_byte_array_append (self->msg_out, (const guint8 *) "R", 1);
|
|
||||||
g_byte_array_append (self->msg_out,
|
|
||||||
g_bytes_get_data (r_h, NULL),
|
|
||||||
g_bytes_get_size (r_h));
|
|
||||||
|
|
||||||
self->msg_in = g_byte_array_new ();
|
|
||||||
g_byte_array_set_size (self->msg_in, 32);
|
|
||||||
|
|
||||||
ssm = fpi_ssm_new_full (FP_DEVICE (dev), send_recv_ssm, SEND_RECV_STATES, SEND_RECV_STATES, "connect 2");
|
|
||||||
fpi_ssm_start (ssm, reconnect_cb);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
enroll_begin_cb (FpiSsm *ssm, FpDevice *dev, GError *error)
|
|
||||||
{
|
|
||||||
g_autoptr(GBytes) nonce = NULL;
|
|
||||||
FpDeviceVirtualSdcp *self = FPI_DEVICE_VIRTUAL_SDCP (dev);
|
|
||||||
|
|
||||||
if (error)
|
|
||||||
{
|
|
||||||
fpi_sdcp_device_enroll_ready (FP_SDCP_DEVICE (dev), error);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
nonce = g_byte_array_free_to_bytes (g_steal_pointer (&self->msg_in));
|
|
||||||
|
|
||||||
fpi_sdcp_device_enroll_set_nonce (FP_SDCP_DEVICE (dev), nonce);
|
|
||||||
|
|
||||||
/* Claim that we completed one enroll step. */
|
|
||||||
fpi_device_enroll_progress (dev, 1, NULL, NULL);
|
|
||||||
|
|
||||||
/* And signal that we are ready to commit. */
|
|
||||||
fpi_sdcp_device_enroll_ready (FP_SDCP_DEVICE (dev), NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
enroll_begin (FpSdcpDevice *dev)
|
|
||||||
{
|
|
||||||
g_autoptr(GBytes) r_h = NULL;
|
|
||||||
FpDeviceVirtualSdcp *self = FPI_DEVICE_VIRTUAL_SDCP (dev);
|
|
||||||
FpiSsm *ssm;
|
|
||||||
|
|
||||||
G_DEBUG_HERE ();
|
|
||||||
|
|
||||||
g_assert (self->proc);
|
|
||||||
|
|
||||||
fpi_sdcp_device_get_reconnect_data (dev, &r_h);
|
|
||||||
|
|
||||||
self->msg_out = g_byte_array_new ();
|
|
||||||
g_byte_array_append (self->msg_out, (const guint8 *) "E", 1);
|
|
||||||
|
|
||||||
/* Expect 32 byte nonce */
|
|
||||||
self->msg_in = g_byte_array_new ();
|
|
||||||
g_byte_array_set_size (self->msg_in, 32);
|
|
||||||
|
|
||||||
ssm = fpi_ssm_new_full (FP_DEVICE (dev), send_recv_ssm, SEND_RECV_STATES, SEND_RECV_STATES, "enroll_begin");
|
|
||||||
fpi_ssm_start (ssm, enroll_begin_cb);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
enroll_commit_cb (FpiSsm *ssm, FpDevice *dev, GError *error)
|
|
||||||
{
|
|
||||||
FpDeviceVirtualSdcp *self = FPI_DEVICE_VIRTUAL_SDCP (dev);
|
|
||||||
|
|
||||||
g_clear_pointer (&self->msg_in, g_byte_array_unref);
|
|
||||||
|
|
||||||
if (error)
|
|
||||||
{
|
|
||||||
fpi_sdcp_device_enroll_ready (FP_SDCP_DEVICE (dev), error);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Signal that we have committed. We don't expect a response
|
|
||||||
* from the virtual device (even though that is kind of broken).
|
|
||||||
*/
|
|
||||||
fpi_sdcp_device_enroll_commit_complete (FP_SDCP_DEVICE (dev), NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
enroll_commit (FpSdcpDevice *dev, GBytes *id_in)
|
|
||||||
{
|
|
||||||
g_autoptr(GBytes) r_h = NULL;
|
|
||||||
g_autoptr(GBytes) id = id_in;
|
|
||||||
FpDeviceVirtualSdcp *self = FPI_DEVICE_VIRTUAL_SDCP (dev);
|
|
||||||
FpiSsm *ssm;
|
|
||||||
|
|
||||||
G_DEBUG_HERE ();
|
|
||||||
|
|
||||||
g_assert (self->proc);
|
|
||||||
|
|
||||||
fpi_sdcp_device_get_reconnect_data (dev, &r_h);
|
|
||||||
|
|
||||||
self->msg_out = g_byte_array_new ();
|
|
||||||
self->msg_in = g_byte_array_new ();
|
|
||||||
if (id)
|
|
||||||
{
|
|
||||||
g_byte_array_append (self->msg_out, (const guint8 *) "F", 1);
|
|
||||||
g_byte_array_append (self->msg_out,
|
|
||||||
g_bytes_get_data (id, NULL),
|
|
||||||
g_bytes_get_size (id));
|
|
||||||
|
|
||||||
/* NOTE: No response from device, assume commit works. */
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
/* Cancel enroll (does not receive a reply) */
|
|
||||||
g_byte_array_append (self->msg_out, (const guint8 *) "G", 1);
|
|
||||||
|
|
||||||
/* NOTE: No response from device, assume cancellation works. */
|
|
||||||
}
|
|
||||||
|
|
||||||
ssm = fpi_ssm_new_full (FP_DEVICE (dev), send_recv_ssm, SEND_RECV_STATES, SEND_RECV_STATES, "enroll_commit");
|
|
||||||
fpi_ssm_start (ssm, enroll_commit_cb);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
identify_cb (FpiSsm *ssm, FpDevice *dev, GError *error)
|
|
||||||
{
|
|
||||||
g_autoptr(GBytes) reply = NULL;
|
|
||||||
g_autoptr(GBytes) id = NULL;
|
|
||||||
g_autoptr(GBytes) mac = NULL;
|
|
||||||
FpDeviceVirtualSdcp *self = FPI_DEVICE_VIRTUAL_SDCP (dev);
|
|
||||||
|
|
||||||
if (error)
|
|
||||||
{
|
|
||||||
fpi_sdcp_device_identify_complete (FP_SDCP_DEVICE (dev), NULL, NULL, error);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
reply = g_byte_array_free_to_bytes (g_steal_pointer (&self->msg_in));
|
|
||||||
id = g_bytes_new_from_bytes (reply, 0, 32);
|
|
||||||
mac = g_bytes_new_from_bytes (reply, 32, 32);
|
|
||||||
|
|
||||||
fpi_sdcp_device_identify_complete (FP_SDCP_DEVICE (self), id, mac, NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
identify (FpSdcpDevice *dev)
|
|
||||||
{
|
|
||||||
g_autoptr(GBytes) nonce = NULL;
|
|
||||||
FpDeviceVirtualSdcp *self = FPI_DEVICE_VIRTUAL_SDCP (dev);
|
|
||||||
FpiSsm *ssm;
|
|
||||||
|
|
||||||
G_DEBUG_HERE ();
|
|
||||||
|
|
||||||
g_assert (self->proc);
|
|
||||||
|
|
||||||
fpi_sdcp_device_get_identify_data (dev, &nonce);
|
|
||||||
|
|
||||||
self->msg_out = g_byte_array_new ();
|
|
||||||
g_byte_array_append (self->msg_out, (const guint8 *) "I", 1);
|
|
||||||
g_byte_array_append (self->msg_out, g_bytes_get_data (nonce, NULL), g_bytes_get_size (nonce));
|
|
||||||
|
|
||||||
/* Expect 64 byte nonce */
|
|
||||||
self->msg_in = g_byte_array_new ();
|
|
||||||
g_byte_array_set_size (self->msg_in, 64);
|
|
||||||
|
|
||||||
ssm = fpi_ssm_new_full (FP_DEVICE (dev), send_recv_ssm, SEND_RECV_STATES, SEND_RECV_STATES, "identify");
|
|
||||||
fpi_ssm_start (ssm, identify_cb);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
probe (FpDevice *dev)
|
|
||||||
{
|
|
||||||
g_auto(GStrv) argv = NULL;
|
|
||||||
FpDeviceVirtualSdcp *self = FPI_DEVICE_VIRTUAL_SDCP (dev);
|
|
||||||
GError *error = NULL;
|
|
||||||
const char *env;
|
|
||||||
|
|
||||||
/* We launch the test binary alread at probe time and quit only when
|
|
||||||
* the object is finalized. This allows testing reconnect properly.
|
|
||||||
*
|
|
||||||
* Also, we'll fail probe if something goes wrong executing it.
|
|
||||||
*/
|
|
||||||
env = fpi_device_get_virtual_env (FP_DEVICE (self));
|
|
||||||
|
|
||||||
if (!g_shell_parse_argv (env, NULL, &argv, &error))
|
|
||||||
goto out;
|
|
||||||
|
|
||||||
self->proc = g_subprocess_newv ((const char * const *) argv,
|
|
||||||
G_SUBPROCESS_FLAGS_STDIN_PIPE | G_SUBPROCESS_FLAGS_STDOUT_PIPE,
|
|
||||||
&error);
|
|
||||||
if (!self->proc)
|
|
||||||
goto out;
|
|
||||||
|
|
||||||
self->proc_stdin = g_object_ref (g_subprocess_get_stdin_pipe (self->proc));
|
|
||||||
self->proc_stdout = g_object_ref (g_subprocess_get_stdout_pipe (self->proc));
|
|
||||||
|
|
||||||
|
|
||||||
out:
|
|
||||||
fpi_device_probe_complete (dev, "virtual-sdcp", NULL, error);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
dev_close (FpDevice *dev)
|
|
||||||
{
|
|
||||||
/* No-op, needs to be defined. */
|
|
||||||
fpi_device_close_complete (dev, NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
fpi_device_virtual_sdcp_init (FpDeviceVirtualSdcp *self)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
fpi_device_virtual_sdcp_finalize (GObject *obj)
|
|
||||||
{
|
|
||||||
FpDeviceVirtualSdcp *self = FPI_DEVICE_VIRTUAL_SDCP (obj);
|
|
||||||
|
|
||||||
/* Just kill the subprocess, no need to be graceful here. */
|
|
||||||
if (self->proc)
|
|
||||||
g_subprocess_force_exit (self->proc);
|
|
||||||
|
|
||||||
g_clear_object (&self->proc);
|
|
||||||
g_clear_object (&self->proc_stdin);
|
|
||||||
g_clear_object (&self->proc_stdout);
|
|
||||||
|
|
||||||
G_OBJECT_CLASS (fpi_device_virtual_sdcp_parent_class)->finalize (obj);
|
|
||||||
}
|
|
||||||
|
|
||||||
static const FpIdEntry driver_ids[] = {
|
|
||||||
{ .virtual_envvar = "FP_VIRTUAL_SDCP" },
|
|
||||||
{ .virtual_envvar = NULL }
|
|
||||||
};
|
|
||||||
|
|
||||||
static void
|
|
||||||
fpi_device_virtual_sdcp_class_init (FpDeviceVirtualSdcpClass *klass)
|
|
||||||
{
|
|
||||||
GObjectClass *obj_class = G_OBJECT_CLASS (klass);
|
|
||||||
FpDeviceClass *dev_class = FP_DEVICE_CLASS (klass);
|
|
||||||
FpSdcpDeviceClass *sdcp_class = FP_SDCP_DEVICE_CLASS (klass);
|
|
||||||
|
|
||||||
obj_class->finalize = fpi_device_virtual_sdcp_finalize;
|
|
||||||
|
|
||||||
dev_class->id = FP_COMPONENT;
|
|
||||||
dev_class->full_name = "Virtual SDCP device talking to MS test code";
|
|
||||||
dev_class->type = FP_DEVICE_TYPE_VIRTUAL;
|
|
||||||
dev_class->id_table = driver_ids;
|
|
||||||
dev_class->nr_enroll_stages = 1;
|
|
||||||
|
|
||||||
/* The SDCP base class may need to override this in the long run */
|
|
||||||
dev_class->probe = probe;
|
|
||||||
dev_class->close = dev_close;
|
|
||||||
|
|
||||||
sdcp_class->connect = connect;
|
|
||||||
sdcp_class->reconnect = reconnect;
|
|
||||||
|
|
||||||
sdcp_class->enroll_begin = enroll_begin;
|
|
||||||
sdcp_class->enroll_commit = enroll_commit;
|
|
||||||
|
|
||||||
sdcp_class->identify = identify;
|
|
||||||
}
|
|
||||||
+23
-17
@@ -27,6 +27,10 @@
|
|||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
|
|
||||||
|
#ifdef HAVE_LIBFPRINT_TOD
|
||||||
|
#include "tod/tod-shared-loader.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_UDEV
|
#ifdef HAVE_UDEV
|
||||||
#include <gudev/gudev.h>
|
#include <gudev/gudev.h>
|
||||||
#endif
|
#endif
|
||||||
@@ -67,32 +71,26 @@ enum {
|
|||||||
static guint signals[LAST_SIGNAL] = { 0 };
|
static guint signals[LAST_SIGNAL] = { 0 };
|
||||||
|
|
||||||
static const char *
|
static const char *
|
||||||
get_drivers_whitelist_env (void)
|
get_drivers_allowlist_env (void)
|
||||||
{
|
{
|
||||||
return g_getenv ("FP_DRIVERS_WHITELIST");
|
return g_getenv ("FP_DRIVERS_ALLOWLIST");
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
is_driver_allowed (const gchar *driver)
|
is_driver_allowed (const gchar *driver)
|
||||||
{
|
{
|
||||||
g_auto(GStrv) whitelisted_drivers = NULL;
|
g_auto(GStrv) allowlisted_drivers = NULL;
|
||||||
const char *fp_drivers_whitelist_env;
|
const char *fp_drivers_allowlist_env;
|
||||||
int i;
|
|
||||||
|
|
||||||
g_return_val_if_fail (driver, TRUE);
|
g_return_val_if_fail (driver, TRUE);
|
||||||
|
|
||||||
fp_drivers_whitelist_env = get_drivers_whitelist_env ();
|
fp_drivers_allowlist_env = get_drivers_allowlist_env ();
|
||||||
|
|
||||||
if (!fp_drivers_whitelist_env)
|
if (!fp_drivers_allowlist_env)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
whitelisted_drivers = g_strsplit (fp_drivers_whitelist_env, ":", -1);
|
allowlisted_drivers = g_strsplit (fp_drivers_allowlist_env, ":", -1);
|
||||||
|
return g_strv_contains ((const gchar * const *) allowlisted_drivers, driver);
|
||||||
for (i = 0; whitelisted_drivers[i]; ++i)
|
|
||||||
if (g_strcmp0 (driver, whitelisted_drivers[i]) == 0)
|
|
||||||
return TRUE;
|
|
||||||
|
|
||||||
return FALSE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
@@ -291,11 +289,10 @@ fp_context_finalize (GObject *object)
|
|||||||
FpContext *self = (FpContext *) object;
|
FpContext *self = (FpContext *) object;
|
||||||
FpContextPrivate *priv = fp_context_get_instance_private (self);
|
FpContextPrivate *priv = fp_context_get_instance_private (self);
|
||||||
|
|
||||||
g_clear_pointer (&priv->devices, g_ptr_array_unref);
|
|
||||||
|
|
||||||
g_cancellable_cancel (priv->cancellable);
|
g_cancellable_cancel (priv->cancellable);
|
||||||
g_clear_object (&priv->cancellable);
|
g_clear_object (&priv->cancellable);
|
||||||
g_clear_pointer (&priv->drivers, g_array_unref);
|
g_clear_pointer (&priv->drivers, g_array_unref);
|
||||||
|
g_clear_pointer (&priv->devices, g_ptr_array_unref);
|
||||||
|
|
||||||
g_slist_free_full (g_steal_pointer (&priv->sources), (GDestroyNotify) g_source_destroy);
|
g_slist_free_full (g_steal_pointer (&priv->sources), (GDestroyNotify) g_source_destroy);
|
||||||
|
|
||||||
@@ -303,6 +300,8 @@ fp_context_finalize (GObject *object)
|
|||||||
g_object_run_dispose (G_OBJECT (priv->usb_ctx));
|
g_object_run_dispose (G_OBJECT (priv->usb_ctx));
|
||||||
g_clear_object (&priv->usb_ctx);
|
g_clear_object (&priv->usb_ctx);
|
||||||
|
|
||||||
|
tod_shared_drivers_unregister ();
|
||||||
|
|
||||||
G_OBJECT_CLASS (fp_context_parent_class)->finalize (object);
|
G_OBJECT_CLASS (fp_context_parent_class)->finalize (object);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -358,12 +357,19 @@ static void
|
|||||||
fp_context_init (FpContext *self)
|
fp_context_init (FpContext *self)
|
||||||
{
|
{
|
||||||
g_autoptr(GError) error = NULL;
|
g_autoptr(GError) error = NULL;
|
||||||
|
g_autoptr(GArray) shared_drivers = NULL;
|
||||||
FpContextPrivate *priv = fp_context_get_instance_private (self);
|
FpContextPrivate *priv = fp_context_get_instance_private (self);
|
||||||
guint i;
|
guint i;
|
||||||
|
|
||||||
|
g_debug ("Initializing FpContext (libfprint version " LIBFPRINT_VERSION ")");
|
||||||
|
|
||||||
priv->drivers = fpi_get_driver_types ();
|
priv->drivers = fpi_get_driver_types ();
|
||||||
|
|
||||||
if (get_drivers_whitelist_env ())
|
tod_shared_drivers_register ();
|
||||||
|
shared_drivers = tod_shared_drivers_get ();
|
||||||
|
g_array_prepend_vals (priv->drivers, shared_drivers->data, shared_drivers->len);
|
||||||
|
|
||||||
|
if (get_drivers_allowlist_env ())
|
||||||
{
|
{
|
||||||
for (i = 0; i < priv->drivers->len;)
|
for (i = 0; i < priv->drivers->len;)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ typedef struct
|
|||||||
FpDeviceType type;
|
FpDeviceType type;
|
||||||
|
|
||||||
GUsbDevice *usb_device;
|
GUsbDevice *usb_device;
|
||||||
const gchar *virtual_env;
|
gchar *virtual_env;
|
||||||
struct
|
struct
|
||||||
{
|
{
|
||||||
gchar *spidev_path;
|
gchar *spidev_path;
|
||||||
@@ -111,8 +111,6 @@ typedef struct
|
|||||||
GDestroyNotify enroll_progress_destroy;
|
GDestroyNotify enroll_progress_destroy;
|
||||||
} FpEnrollData;
|
} FpEnrollData;
|
||||||
|
|
||||||
void enroll_data_free (FpEnrollData *enroll_data);
|
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
FpPrint *enrolled_print; /* verify */
|
FpPrint *enrolled_print; /* verify */
|
||||||
@@ -128,7 +126,9 @@ typedef struct
|
|||||||
GDestroyNotify match_destroy;
|
GDestroyNotify match_destroy;
|
||||||
} FpMatchData;
|
} FpMatchData;
|
||||||
|
|
||||||
void match_data_free (FpMatchData *match_data);
|
|
||||||
|
void fpi_device_suspend (FpDevice *device);
|
||||||
|
void fpi_device_resume (FpDevice *device);
|
||||||
|
|
||||||
void fpi_device_configure_wakeup (FpDevice *device,
|
void fpi_device_configure_wakeup (FpDevice *device,
|
||||||
gboolean enabled);
|
gboolean enabled);
|
||||||
|
|||||||
+52
-102
@@ -225,6 +225,7 @@ fp_device_finalize (GObject *object)
|
|||||||
|
|
||||||
g_clear_pointer (&priv->current_idle_cancel_source, g_source_destroy);
|
g_clear_pointer (&priv->current_idle_cancel_source, g_source_destroy);
|
||||||
g_clear_pointer (&priv->current_task_idle_return_source, g_source_destroy);
|
g_clear_pointer (&priv->current_task_idle_return_source, g_source_destroy);
|
||||||
|
g_clear_pointer (&priv->critical_section_flush_source, g_source_destroy);
|
||||||
|
|
||||||
g_clear_pointer (&priv->device_id, g_free);
|
g_clear_pointer (&priv->device_id, g_free);
|
||||||
g_clear_pointer (&priv->device_name, g_free);
|
g_clear_pointer (&priv->device_name, g_free);
|
||||||
@@ -948,16 +949,6 @@ fp_device_close_finish (FpDevice *device,
|
|||||||
return g_task_propagate_boolean (G_TASK (result), error);
|
return g_task_propagate_boolean (G_TASK (result), error);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
|
||||||
complete_suspend_resume_task (FpDevice *device)
|
|
||||||
{
|
|
||||||
FpDevicePrivate *priv = fp_device_get_instance_private (device);
|
|
||||||
|
|
||||||
g_assert (priv->suspend_resume_task);
|
|
||||||
|
|
||||||
g_task_return_boolean (g_steal_pointer (&priv->suspend_resume_task), TRUE);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* fp_device_suspend:
|
* fp_device_suspend:
|
||||||
* @device: a #FpDevice
|
* @device: a #FpDevice
|
||||||
@@ -1008,48 +999,7 @@ fp_device_suspend (FpDevice *device,
|
|||||||
|
|
||||||
priv->suspend_resume_task = g_steal_pointer (&task);
|
priv->suspend_resume_task = g_steal_pointer (&task);
|
||||||
|
|
||||||
/* If the device is currently idle, just complete immediately.
|
fpi_device_suspend (device);
|
||||||
* For long running tasks, call the driver handler right away, for short
|
|
||||||
* tasks, wait for completion and then return the task.
|
|
||||||
*/
|
|
||||||
switch (priv->current_action)
|
|
||||||
{
|
|
||||||
case FPI_DEVICE_ACTION_NONE:
|
|
||||||
fpi_device_suspend_complete (device, NULL);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case FPI_DEVICE_ACTION_ENROLL:
|
|
||||||
case FPI_DEVICE_ACTION_VERIFY:
|
|
||||||
case FPI_DEVICE_ACTION_IDENTIFY:
|
|
||||||
case FPI_DEVICE_ACTION_CAPTURE:
|
|
||||||
if (FP_DEVICE_GET_CLASS (device)->suspend)
|
|
||||||
{
|
|
||||||
if (priv->critical_section)
|
|
||||||
priv->suspend_queued = TRUE;
|
|
||||||
else
|
|
||||||
FP_DEVICE_GET_CLASS (device)->suspend (device);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
fpi_device_suspend_complete (device, fpi_device_error_new (FP_DEVICE_ERROR_NOT_SUPPORTED));
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
case FPI_DEVICE_ACTION_PROBE:
|
|
||||||
case FPI_DEVICE_ACTION_OPEN:
|
|
||||||
case FPI_DEVICE_ACTION_CLOSE:
|
|
||||||
case FPI_DEVICE_ACTION_DELETE:
|
|
||||||
case FPI_DEVICE_ACTION_LIST:
|
|
||||||
case FPI_DEVICE_ACTION_CLEAR_STORAGE:
|
|
||||||
g_signal_connect_object (priv->current_task,
|
|
||||||
"notify::completed",
|
|
||||||
G_CALLBACK (complete_suspend_resume_task),
|
|
||||||
device,
|
|
||||||
G_CONNECT_SWAPPED);
|
|
||||||
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1114,41 +1064,7 @@ fp_device_resume (FpDevice *device,
|
|||||||
|
|
||||||
priv->suspend_resume_task = g_steal_pointer (&task);
|
priv->suspend_resume_task = g_steal_pointer (&task);
|
||||||
|
|
||||||
switch (priv->current_action)
|
fpi_device_resume (device);
|
||||||
{
|
|
||||||
case FPI_DEVICE_ACTION_NONE:
|
|
||||||
fpi_device_resume_complete (device, NULL);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case FPI_DEVICE_ACTION_ENROLL:
|
|
||||||
case FPI_DEVICE_ACTION_VERIFY:
|
|
||||||
case FPI_DEVICE_ACTION_IDENTIFY:
|
|
||||||
case FPI_DEVICE_ACTION_CAPTURE:
|
|
||||||
if (FP_DEVICE_GET_CLASS (device)->resume)
|
|
||||||
{
|
|
||||||
if (priv->critical_section)
|
|
||||||
priv->resume_queued = TRUE;
|
|
||||||
else
|
|
||||||
FP_DEVICE_GET_CLASS (device)->resume (device);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
fpi_device_resume_complete (device, fpi_device_error_new (FP_DEVICE_ERROR_NOT_SUPPORTED));
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
case FPI_DEVICE_ACTION_PROBE:
|
|
||||||
case FPI_DEVICE_ACTION_OPEN:
|
|
||||||
case FPI_DEVICE_ACTION_CLOSE:
|
|
||||||
case FPI_DEVICE_ACTION_DELETE:
|
|
||||||
case FPI_DEVICE_ACTION_LIST:
|
|
||||||
case FPI_DEVICE_ACTION_CLEAR_STORAGE:
|
|
||||||
/* cannot happen as we make sure these tasks complete before suspend */
|
|
||||||
g_assert_not_reached ();
|
|
||||||
complete_suspend_resume_task (device);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1172,6 +1088,15 @@ fp_device_resume_finish (FpDevice *device,
|
|||||||
return g_task_propagate_boolean (G_TASK (result), error);
|
return g_task_propagate_boolean (G_TASK (result), error);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
enroll_data_free (FpEnrollData *data)
|
||||||
|
{
|
||||||
|
if (data->enroll_progress_destroy)
|
||||||
|
data->enroll_progress_destroy (data->enroll_progress_data);
|
||||||
|
data->enroll_progress_data = NULL;
|
||||||
|
g_clear_object (&data->print);
|
||||||
|
g_free (data);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* fp_device_enroll:
|
* fp_device_enroll:
|
||||||
@@ -1256,10 +1181,6 @@ fp_device_enroll (FpDevice *device,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
priv->current_action = FPI_DEVICE_ACTION_ENROLL;
|
|
||||||
priv->current_task = g_steal_pointer (&task);
|
|
||||||
setup_task_cancellable (device);
|
|
||||||
|
|
||||||
fpi_device_update_temp (device, TRUE);
|
fpi_device_update_temp (device, TRUE);
|
||||||
if (priv->temp_current == FP_TEMPERATURE_HOT)
|
if (priv->temp_current == FP_TEMPERATURE_HOT)
|
||||||
{
|
{
|
||||||
@@ -1268,6 +1189,10 @@ fp_device_enroll (FpDevice *device,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
priv->current_action = FPI_DEVICE_ACTION_ENROLL;
|
||||||
|
priv->current_task = g_steal_pointer (&task);
|
||||||
|
setup_task_cancellable (device);
|
||||||
|
|
||||||
data = g_new0 (FpEnrollData, 1);
|
data = g_new0 (FpEnrollData, 1);
|
||||||
data->print = g_object_ref_sink (template_print);
|
data->print = g_object_ref_sink (template_print);
|
||||||
data->enroll_progress_cb = progress_cb;
|
data->enroll_progress_cb = progress_cb;
|
||||||
@@ -1301,6 +1226,23 @@ fp_device_enroll_finish (FpDevice *device,
|
|||||||
return g_task_propagate_pointer (G_TASK (result), error);
|
return g_task_propagate_pointer (G_TASK (result), error);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
match_data_free (FpMatchData *data)
|
||||||
|
{
|
||||||
|
g_clear_object (&data->print);
|
||||||
|
g_clear_object (&data->match);
|
||||||
|
g_clear_error (&data->error);
|
||||||
|
|
||||||
|
if (data->match_destroy)
|
||||||
|
data->match_destroy (data->match_data);
|
||||||
|
data->match_data = NULL;
|
||||||
|
|
||||||
|
g_clear_object (&data->enrolled_print);
|
||||||
|
g_clear_pointer (&data->gallery, g_ptr_array_unref);
|
||||||
|
|
||||||
|
g_free (data);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* fp_device_verify:
|
* fp_device_verify:
|
||||||
* @device: a #FpDevice
|
* @device: a #FpDevice
|
||||||
@@ -1357,10 +1299,6 @@ fp_device_verify (FpDevice *device,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
priv->current_action = FPI_DEVICE_ACTION_VERIFY;
|
|
||||||
priv->current_task = g_steal_pointer (&task);
|
|
||||||
setup_task_cancellable (device);
|
|
||||||
|
|
||||||
fpi_device_update_temp (device, TRUE);
|
fpi_device_update_temp (device, TRUE);
|
||||||
if (priv->temp_current == FP_TEMPERATURE_HOT)
|
if (priv->temp_current == FP_TEMPERATURE_HOT)
|
||||||
{
|
{
|
||||||
@@ -1369,6 +1307,10 @@ fp_device_verify (FpDevice *device,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
priv->current_action = FPI_DEVICE_ACTION_VERIFY;
|
||||||
|
priv->current_task = g_steal_pointer (&task);
|
||||||
|
setup_task_cancellable (device);
|
||||||
|
|
||||||
data = g_new0 (FpMatchData, 1);
|
data = g_new0 (FpMatchData, 1);
|
||||||
data->enrolled_print = g_object_ref (enrolled_print);
|
data->enrolled_print = g_object_ref (enrolled_print);
|
||||||
data->match_cb = match_cb;
|
data->match_cb = match_cb;
|
||||||
@@ -1484,9 +1426,13 @@ fp_device_identify (FpDevice *device,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
priv->current_action = FPI_DEVICE_ACTION_IDENTIFY;
|
if (prints == NULL)
|
||||||
priv->current_task = g_steal_pointer (&task);
|
{
|
||||||
setup_task_cancellable (device);
|
g_task_return_error (task,
|
||||||
|
fpi_device_error_new_msg (FP_DEVICE_ERROR_DATA_INVALID,
|
||||||
|
"Invalid gallery array"));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
fpi_device_update_temp (device, TRUE);
|
fpi_device_update_temp (device, TRUE);
|
||||||
if (priv->temp_current == FP_TEMPERATURE_HOT)
|
if (priv->temp_current == FP_TEMPERATURE_HOT)
|
||||||
@@ -1496,6 +1442,10 @@ fp_device_identify (FpDevice *device,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
priv->current_action = FPI_DEVICE_ACTION_IDENTIFY;
|
||||||
|
priv->current_task = g_steal_pointer (&task);
|
||||||
|
setup_task_cancellable (device);
|
||||||
|
|
||||||
data = g_new0 (FpMatchData, 1);
|
data = g_new0 (FpMatchData, 1);
|
||||||
/* We cannot store the gallery directly, because the ptr array may not own
|
/* We cannot store the gallery directly, because the ptr array may not own
|
||||||
* a reference to each print. Also, the caller could in principle modify the
|
* a reference to each print. Also, the caller could in principle modify the
|
||||||
@@ -1609,10 +1559,6 @@ fp_device_capture (FpDevice *device,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
priv->current_action = FPI_DEVICE_ACTION_CAPTURE;
|
|
||||||
priv->current_task = g_steal_pointer (&task);
|
|
||||||
setup_task_cancellable (device);
|
|
||||||
|
|
||||||
fpi_device_update_temp (device, TRUE);
|
fpi_device_update_temp (device, TRUE);
|
||||||
if (priv->temp_current == FP_TEMPERATURE_HOT)
|
if (priv->temp_current == FP_TEMPERATURE_HOT)
|
||||||
{
|
{
|
||||||
@@ -1621,6 +1567,10 @@ fp_device_capture (FpDevice *device,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
priv->current_action = FPI_DEVICE_ACTION_CAPTURE;
|
||||||
|
priv->current_task = g_steal_pointer (&task);
|
||||||
|
setup_task_cancellable (device);
|
||||||
|
|
||||||
priv->wait_for_finger = wait_for_finger;
|
priv->wait_for_finger = wait_for_finger;
|
||||||
|
|
||||||
cls->capture (device);
|
cls->capture (device);
|
||||||
|
|||||||
@@ -43,8 +43,8 @@ G_DECLARE_DERIVABLE_TYPE (FpDevice, fp_device, FP, DEVICE, GObject)
|
|||||||
*/
|
*/
|
||||||
typedef enum {
|
typedef enum {
|
||||||
FP_DEVICE_TYPE_VIRTUAL,
|
FP_DEVICE_TYPE_VIRTUAL,
|
||||||
FP_DEVICE_TYPE_UDEV,
|
|
||||||
FP_DEVICE_TYPE_USB,
|
FP_DEVICE_TYPE_USB,
|
||||||
|
FP_DEVICE_TYPE_UDEV,
|
||||||
} FpDeviceType;
|
} FpDeviceType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -140,7 +140,6 @@ typedef enum {
|
|||||||
* @FP_DEVICE_ERROR_DATA_DUPLICATE: Enrolling template duplicates storaged templates
|
* @FP_DEVICE_ERROR_DATA_DUPLICATE: Enrolling template duplicates storaged templates
|
||||||
* @FP_DEVICE_ERROR_REMOVED: The device has been removed.
|
* @FP_DEVICE_ERROR_REMOVED: The device has been removed.
|
||||||
* @FP_DEVICE_ERROR_TOO_HOT: The device might be getting too hot
|
* @FP_DEVICE_ERROR_TOO_HOT: The device might be getting too hot
|
||||||
* @FP_DEVICE_ERROR_UNTRUSTED: Device cannot be trusted
|
|
||||||
*
|
*
|
||||||
* Error codes for device operations. More specific errors from other domains
|
* Error codes for device operations. More specific errors from other domains
|
||||||
* such as #G_IO_ERROR or #G_USB_DEVICE_ERROR may also be reported.
|
* such as #G_IO_ERROR or #G_USB_DEVICE_ERROR may also be reported.
|
||||||
@@ -159,7 +158,6 @@ typedef enum {
|
|||||||
/* Leave some room to add more DATA related errors */
|
/* Leave some room to add more DATA related errors */
|
||||||
FP_DEVICE_ERROR_REMOVED = 0x100,
|
FP_DEVICE_ERROR_REMOVED = 0x100,
|
||||||
FP_DEVICE_ERROR_TOO_HOT,
|
FP_DEVICE_ERROR_TOO_HOT,
|
||||||
FP_DEVICE_ERROR_UNTRUSTED,
|
|
||||||
} FpDeviceError;
|
} FpDeviceError;
|
||||||
|
|
||||||
GQuark fp_device_retry_quark (void);
|
GQuark fp_device_retry_quark (void);
|
||||||
|
|||||||
+123
-79
@@ -20,9 +20,11 @@
|
|||||||
|
|
||||||
#define FP_COMPONENT "image"
|
#define FP_COMPONENT "image"
|
||||||
|
|
||||||
|
#include "fpi-compat.h"
|
||||||
#include "fpi-image.h"
|
#include "fpi-image.h"
|
||||||
#include "fpi-log.h"
|
#include "fpi-log.h"
|
||||||
|
|
||||||
|
#include <config.h>
|
||||||
#include <nbis.h>
|
#include <nbis.h>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -158,60 +160,65 @@ fp_image_init (FpImage *self)
|
|||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
GAsyncReadyCallback user_cb;
|
|
||||||
struct fp_minutiae *minutiae;
|
struct fp_minutiae *minutiae;
|
||||||
gint width, height;
|
|
||||||
gdouble ppmm;
|
|
||||||
FpiImageFlags flags;
|
|
||||||
guchar *image;
|
|
||||||
guchar *binarized;
|
guchar *binarized;
|
||||||
} DetectMinutiaeData;
|
FpiImageFlags flags;
|
||||||
|
unsigned char *image;
|
||||||
|
gboolean image_changed;
|
||||||
|
} DetectMinutiaeNbisData;
|
||||||
|
|
||||||
static void
|
static void
|
||||||
fp_image_detect_minutiae_free (DetectMinutiaeData *data)
|
fp_image_detect_minutiae_free (DetectMinutiaeNbisData *data)
|
||||||
{
|
{
|
||||||
g_clear_pointer (&data->image, g_free);
|
|
||||||
g_clear_pointer (&data->minutiae, free_minutiae);
|
g_clear_pointer (&data->minutiae, free_minutiae);
|
||||||
g_clear_pointer (&data->binarized, g_free);
|
g_clear_pointer (&data->binarized, g_free);
|
||||||
|
|
||||||
|
if (data->image_changed)
|
||||||
|
g_clear_pointer (&data->image, g_free);
|
||||||
|
|
||||||
g_free (data);
|
g_free (data);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DetectMinutiaeNbisData, fp_image_detect_minutiae_free)
|
||||||
fp_image_detect_minutiae_cb (GObject *source_object,
|
|
||||||
GAsyncResult *res,
|
|
||||||
gpointer user_data)
|
static gboolean
|
||||||
|
fp_image_detect_minutiae_nbis_finish (FpImage *self,
|
||||||
|
GTask *task,
|
||||||
|
GError **error)
|
||||||
{
|
{
|
||||||
GTask *task = G_TASK (res);
|
g_autoptr(DetectMinutiaeNbisData) data = NULL;
|
||||||
FpImage *image;
|
|
||||||
DetectMinutiaeData *data = g_task_get_task_data (task);
|
|
||||||
|
|
||||||
if (!g_task_had_error (task))
|
data = g_task_propagate_pointer (task, error);
|
||||||
|
|
||||||
|
if (data != NULL)
|
||||||
{
|
{
|
||||||
gint i;
|
self->flags = data->flags;
|
||||||
image = FP_IMAGE (source_object);
|
|
||||||
|
|
||||||
image->flags = data->flags;
|
if (data->image_changed)
|
||||||
|
{
|
||||||
g_clear_pointer (&image->data, g_free);
|
g_clear_pointer (&self->data, g_free);
|
||||||
image->data = g_steal_pointer (&data->image);
|
self->data = g_steal_pointer (&data->image);
|
||||||
|
|
||||||
g_clear_pointer (&image->binarized, g_free);
|
|
||||||
image->binarized = g_steal_pointer (&data->binarized);
|
|
||||||
|
|
||||||
g_clear_pointer (&image->minutiae, g_ptr_array_unref);
|
|
||||||
image->minutiae = g_ptr_array_new_full (data->minutiae->num,
|
|
||||||
(GDestroyNotify) free_minutia);
|
|
||||||
|
|
||||||
for (i = 0; i < data->minutiae->num; i++)
|
|
||||||
g_ptr_array_add (image->minutiae,
|
|
||||||
g_steal_pointer (&data->minutiae->list[i]));
|
|
||||||
|
|
||||||
/* Don't let it delete anything. */
|
|
||||||
data->minutiae->num = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (data->user_cb)
|
g_clear_pointer (&self->binarized, g_free);
|
||||||
data->user_cb (source_object, res, user_data);
|
self->binarized = g_steal_pointer (&data->binarized);
|
||||||
|
|
||||||
|
g_clear_pointer (&self->minutiae, g_ptr_array_unref);
|
||||||
|
self->minutiae = g_ptr_array_new_full (data->minutiae->num,
|
||||||
|
(GDestroyNotify) free_minutia);
|
||||||
|
|
||||||
|
for (int i = 0; i < data->minutiae->num; i++)
|
||||||
|
g_ptr_array_add (self->minutiae,
|
||||||
|
g_steal_pointer (&data->minutiae->list[i]));
|
||||||
|
|
||||||
|
/* Don't let free_minutiae delete the minutiae that we now own. */
|
||||||
|
data->minutiae->num = 0;
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@@ -264,70 +271,83 @@ invert_colors (guint8 *data, gint width, gint height)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
fp_image_detect_minutiae_thread_func (GTask *task,
|
fp_image_detect_minutiae_nbis_thread_func (GTask *task,
|
||||||
gpointer source_object,
|
gpointer source_object,
|
||||||
gpointer task_data,
|
gpointer task_data,
|
||||||
GCancellable *cancellable)
|
GCancellable *cancellable)
|
||||||
{
|
{
|
||||||
g_autoptr(GTimer) timer = NULL;
|
g_autoptr(GTimer) timer = NULL;
|
||||||
DetectMinutiaeData *data = task_data;
|
g_autoptr(DetectMinutiaeNbisData) ret_data = NULL;
|
||||||
struct fp_minutiae *minutiae = NULL;
|
g_autoptr(GTask) thread_task = g_steal_pointer (&task);
|
||||||
g_autofree gint *direction_map = NULL;
|
g_autofree gint *direction_map = NULL;
|
||||||
g_autofree gint *low_contrast_map = NULL;
|
g_autofree gint *low_contrast_map = NULL;
|
||||||
g_autofree gint *low_flow_map = NULL;
|
g_autofree gint *low_flow_map = NULL;
|
||||||
g_autofree gint *high_curve_map = NULL;
|
g_autofree gint *high_curve_map = NULL;
|
||||||
g_autofree gint *quality_map = NULL;
|
g_autofree gint *quality_map = NULL;
|
||||||
g_autofree guchar *bdata = NULL;
|
g_autofree LFSPARMS *lfsparms = NULL;
|
||||||
|
FpImage *self = source_object;
|
||||||
|
FpiImageFlags minutiae_flags;
|
||||||
|
unsigned char *image;
|
||||||
gint map_w, map_h;
|
gint map_w, map_h;
|
||||||
gint bw, bh, bd;
|
gint bw, bh, bd;
|
||||||
gint r;
|
gint r;
|
||||||
g_autofree LFSPARMS *lfsparms = NULL;
|
|
||||||
|
image = self->data;
|
||||||
|
minutiae_flags = self->flags & ~(FPI_IMAGE_H_FLIPPED |
|
||||||
|
FPI_IMAGE_V_FLIPPED |
|
||||||
|
FPI_IMAGE_COLORS_INVERTED);
|
||||||
|
|
||||||
|
if (minutiae_flags != FPI_IMAGE_NONE)
|
||||||
|
image = g_memdup2 (self->data, self->width * self->height);
|
||||||
|
|
||||||
|
ret_data = g_new0 (DetectMinutiaeNbisData, 1);
|
||||||
|
ret_data->flags = minutiae_flags;
|
||||||
|
ret_data->image = image;
|
||||||
|
ret_data->image_changed = image != self->data;
|
||||||
|
|
||||||
/* Normalize the image first */
|
/* Normalize the image first */
|
||||||
if (data->flags & FPI_IMAGE_H_FLIPPED)
|
if (self->flags & FPI_IMAGE_H_FLIPPED)
|
||||||
hflip (data->image, data->width, data->height);
|
hflip (image, self->width, self->height);
|
||||||
|
|
||||||
if (data->flags & FPI_IMAGE_V_FLIPPED)
|
if (self->flags & FPI_IMAGE_V_FLIPPED)
|
||||||
vflip (data->image, data->width, data->height);
|
vflip (image, self->width, self->height);
|
||||||
|
|
||||||
if (data->flags & FPI_IMAGE_COLORS_INVERTED)
|
if (self->flags & FPI_IMAGE_COLORS_INVERTED)
|
||||||
invert_colors (data->image, data->width, data->height);
|
invert_colors (image, self->width, self->height);
|
||||||
|
|
||||||
data->flags &= ~(FPI_IMAGE_H_FLIPPED | FPI_IMAGE_V_FLIPPED | FPI_IMAGE_COLORS_INVERTED);
|
lfsparms = g_memdup2 (&g_lfsparms_V2, sizeof (LFSPARMS));
|
||||||
|
lfsparms->remove_perimeter_pts = minutiae_flags & FPI_IMAGE_PARTIAL ? TRUE : FALSE;
|
||||||
lfsparms = g_memdup (&g_lfsparms_V2, sizeof (LFSPARMS));
|
|
||||||
lfsparms->remove_perimeter_pts = data->flags & FPI_IMAGE_PARTIAL ? TRUE : FALSE;
|
|
||||||
|
|
||||||
timer = g_timer_new ();
|
timer = g_timer_new ();
|
||||||
r = get_minutiae (&minutiae, &quality_map, &direction_map,
|
r = get_minutiae (&ret_data->minutiae, &quality_map, &direction_map,
|
||||||
&low_contrast_map, &low_flow_map, &high_curve_map,
|
&low_contrast_map, &low_flow_map, &high_curve_map,
|
||||||
&map_w, &map_h, &bdata, &bw, &bh, &bd,
|
&map_w, &map_h, &ret_data->binarized, &bw, &bh, &bd,
|
||||||
data->image, data->width, data->height, 8,
|
image, self->width, self->height, 8,
|
||||||
data->ppmm, lfsparms);
|
self->ppmm, lfsparms);
|
||||||
g_timer_stop (timer);
|
g_timer_stop (timer);
|
||||||
fp_dbg ("Minutiae scan completed in %f secs", g_timer_elapsed (timer, NULL));
|
fp_dbg ("Minutiae scan completed in %f secs", g_timer_elapsed (timer, NULL));
|
||||||
|
|
||||||
data->binarized = g_steal_pointer (&bdata);
|
if (g_task_had_error (thread_task))
|
||||||
data->minutiae = minutiae;
|
return;
|
||||||
|
|
||||||
if (r)
|
if (r)
|
||||||
{
|
{
|
||||||
fp_err ("get minutiae failed, code %d", r);
|
fp_err ("get minutiae failed, code %d", r);
|
||||||
g_task_return_new_error (task, G_IO_ERROR, G_IO_ERROR_FAILED, "Minutiae scan failed with code %d", r);
|
g_task_return_new_error (thread_task, G_IO_ERROR,
|
||||||
g_object_unref (task);
|
G_IO_ERROR_FAILED,
|
||||||
|
"Minutiae scan failed with code %d", r);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!data->minutiae || data->minutiae->num == 0)
|
if (!ret_data->minutiae || ret_data->minutiae->num == 0)
|
||||||
{
|
{
|
||||||
g_task_return_new_error (task, G_IO_ERROR, G_IO_ERROR_FAILED,
|
g_task_return_new_error (thread_task, G_IO_ERROR, G_IO_ERROR_FAILED,
|
||||||
"No minutiae found");
|
"No minutiae found");
|
||||||
g_object_unref (task);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
g_task_return_boolean (task, TRUE);
|
g_task_return_pointer (thread_task, g_steal_pointer (&ret_data),
|
||||||
g_object_unref (task);
|
(GDestroyNotify) fp_image_detect_minutiae_free);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -443,21 +463,25 @@ fp_image_detect_minutiae (FpImage *self,
|
|||||||
GAsyncReadyCallback callback,
|
GAsyncReadyCallback callback,
|
||||||
gpointer user_data)
|
gpointer user_data)
|
||||||
{
|
{
|
||||||
GTask *task;
|
g_autoptr(GTask) task = NULL;
|
||||||
DetectMinutiaeData *data = g_new0 (DetectMinutiaeData, 1);
|
|
||||||
|
|
||||||
task = g_task_new (self, cancellable, fp_image_detect_minutiae_cb, user_data);
|
g_return_if_fail (FP_IS_IMAGE (self));
|
||||||
|
g_return_if_fail (callback != NULL);
|
||||||
|
|
||||||
data->image = g_malloc (self->width * self->height);
|
task = g_task_new (self, cancellable, callback, user_data);
|
||||||
memcpy (data->image, self->data, self->width * self->height);
|
g_task_set_source_tag (task, fp_image_detect_minutiae);
|
||||||
data->flags = self->flags;
|
g_task_set_check_cancellable (task, TRUE);
|
||||||
data->width = self->width;
|
|
||||||
data->height = self->height;
|
|
||||||
data->ppmm = self->ppmm;
|
|
||||||
data->user_cb = callback;
|
|
||||||
|
|
||||||
g_task_set_task_data (task, data, (GDestroyNotify) fp_image_detect_minutiae_free);
|
if (!g_atomic_int_compare_and_exchange (&self->detection_in_progress,
|
||||||
g_task_run_in_thread (task, fp_image_detect_minutiae_thread_func);
|
FALSE, TRUE))
|
||||||
|
{
|
||||||
|
g_task_return_new_error (task, G_IO_ERROR, G_IO_ERROR_ADDRESS_IN_USE,
|
||||||
|
"Minutiae detection is already in progress");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
g_task_run_in_thread (g_steal_pointer (&task),
|
||||||
|
fp_image_detect_minutiae_nbis_thread_func);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -475,7 +499,27 @@ fp_image_detect_minutiae_finish (FpImage *self,
|
|||||||
GAsyncResult *result,
|
GAsyncResult *result,
|
||||||
GError **error)
|
GError **error)
|
||||||
{
|
{
|
||||||
return g_task_propagate_boolean (G_TASK (result), error);
|
GTask *task;
|
||||||
|
gboolean changed;
|
||||||
|
|
||||||
|
g_return_val_if_fail (FP_IS_IMAGE (self), FALSE);
|
||||||
|
g_return_val_if_fail (g_task_is_valid (result, self), FALSE);
|
||||||
|
g_return_val_if_fail (g_task_get_source_tag (G_TASK (result)) ==
|
||||||
|
fp_image_detect_minutiae, FALSE);
|
||||||
|
|
||||||
|
task = G_TASK (result);
|
||||||
|
changed = g_atomic_int_compare_and_exchange (&self->detection_in_progress,
|
||||||
|
TRUE, FALSE);
|
||||||
|
g_assert (changed);
|
||||||
|
|
||||||
|
if (g_task_had_error (task))
|
||||||
|
{
|
||||||
|
gpointer data = g_task_propagate_pointer (task, error);
|
||||||
|
g_assert (data == NULL);
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
return fp_image_detect_minutiae_nbis_finish (self, task, error);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -339,7 +339,7 @@ fp_print_init (FpPrint *self)
|
|||||||
* create a new print, fill in the relevant metadata, and then start
|
* create a new print, fill in the relevant metadata, and then start
|
||||||
* enrollment.
|
* enrollment.
|
||||||
*
|
*
|
||||||
* Returns: (transfer floating): A newyl created #FpPrint
|
* Returns: (transfer floating): A newly created #FpPrint
|
||||||
*/
|
*/
|
||||||
FpPrint *
|
FpPrint *
|
||||||
fp_print_new (FpDevice *device)
|
fp_print_new (FpDevice *device)
|
||||||
@@ -605,7 +605,7 @@ fp_print_equal (FpPrint *self, FpPrint *other)
|
|||||||
if (g_strcmp0 (self->device_id, other->device_id))
|
if (g_strcmp0 (self->device_id, other->device_id))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
if (self->type == FPI_PRINT_RAW || self->type == FPI_PRINT_SDCP)
|
if (self->type == FPI_PRINT_RAW)
|
||||||
{
|
{
|
||||||
return g_variant_equal (self->data, other->data);
|
return g_variant_equal (self->data, other->data);
|
||||||
}
|
}
|
||||||
@@ -721,13 +721,12 @@ fp_print_serialize (FpPrint *print,
|
|||||||
|
|
||||||
result = g_variant_builder_end (&builder);
|
result = g_variant_builder_end (&builder);
|
||||||
|
|
||||||
if (G_BYTE_ORDER == G_BIG_ENDIAN)
|
#if (G_BYTE_ORDER == G_BIG_ENDIAN)
|
||||||
{
|
|
||||||
GVariant *tmp;
|
GVariant *tmp;
|
||||||
tmp = g_variant_byteswap (result);
|
tmp = g_variant_byteswap (result);
|
||||||
g_variant_unref (result);
|
g_variant_unref (result);
|
||||||
result = tmp;
|
result = tmp;
|
||||||
}
|
#endif
|
||||||
|
|
||||||
len = g_variant_get_size (result);
|
len = g_variant_get_size (result);
|
||||||
/* Add 3 bytes of header */
|
/* Add 3 bytes of header */
|
||||||
@@ -800,10 +799,11 @@ fp_print_deserialize (const guchar *data,
|
|||||||
if (!raw_value)
|
if (!raw_value)
|
||||||
goto invalid_format;
|
goto invalid_format;
|
||||||
|
|
||||||
if (G_BYTE_ORDER == G_BIG_ENDIAN)
|
#if (G_BYTE_ORDER == G_BIG_ENDIAN)
|
||||||
value = g_variant_byteswap (raw_value);
|
value = g_variant_byteswap (raw_value);
|
||||||
else
|
#else
|
||||||
value = g_variant_get_normal_form (raw_value);
|
value = g_variant_get_normal_form (raw_value);
|
||||||
|
#endif
|
||||||
|
|
||||||
g_variant_get (value,
|
g_variant_get (value,
|
||||||
"(i&s&sbymsmsi@a{sv}v)",
|
"(i&s&sbymsmsi@a{sv}v)",
|
||||||
@@ -870,7 +870,7 @@ fp_print_deserialize (const guchar *data,
|
|||||||
g_ptr_array_add (result->prints, g_steal_pointer (&xyt));
|
g_ptr_array_add (result->prints, g_steal_pointer (&xyt));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (type == FPI_PRINT_RAW || type == FPI_PRINT_SDCP)
|
else if (type == FPI_PRINT_RAW)
|
||||||
{
|
{
|
||||||
g_autoptr(GVariant) fp_data = g_variant_get_child_value (print_data, 0);
|
g_autoptr(GVariant) fp_data = g_variant_get_child_value (print_data, 0);
|
||||||
|
|
||||||
|
|||||||
@@ -1,58 +0,0 @@
|
|||||||
/*
|
|
||||||
* FpSdcpDevice - A base class for SDCP enabled devices
|
|
||||||
* Copyright (C) 2020 Benjamin Berg <bberg@redhat.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-sdcp-device.h"
|
|
||||||
|
|
||||||
#include <nss.h>
|
|
||||||
#include <keyhi.h>
|
|
||||||
#include <keythi.h>
|
|
||||||
#include <pk11pub.h>
|
|
||||||
|
|
||||||
typedef struct
|
|
||||||
{
|
|
||||||
GError *enroll_pre_commit_error;
|
|
||||||
|
|
||||||
/* XXX: Do we want a separate SDCP session object?
|
|
||||||
*/
|
|
||||||
|
|
||||||
GPtrArray *intermediate_cas;
|
|
||||||
|
|
||||||
/* Host random for the connection */
|
|
||||||
guint8 host_random[32];
|
|
||||||
|
|
||||||
NSSInitContext *nss_init_context;
|
|
||||||
PK11SlotInfo *slot;
|
|
||||||
SECKEYPrivateKey *host_key_private;
|
|
||||||
SECKEYPublicKey *host_key_public;
|
|
||||||
|
|
||||||
/* Master secret is required for reconnects.
|
|
||||||
* TODO: We probably want to serialize this to disk so it can survive
|
|
||||||
* fprintd idle shutdown. */
|
|
||||||
PK11SymKey *master_secret;
|
|
||||||
PK11SymKey *mac_secret;
|
|
||||||
|
|
||||||
} FpSdcpDevicePrivate;
|
|
||||||
|
|
||||||
void fpi_sdcp_device_connect (FpSdcpDevice *self);
|
|
||||||
void fpi_sdcp_device_reconnect (FpSdcpDevice *self);
|
|
||||||
|
|
||||||
void fpi_sdcp_device_enroll (FpSdcpDevice *self);
|
|
||||||
void fpi_sdcp_device_identify (FpSdcpDevice *self);
|
|
||||||
@@ -1,141 +0,0 @@
|
|||||||
/*
|
|
||||||
* FpSdcpDevice - A base class for SDCP enabled devices
|
|
||||||
* Copyright (C) 2020 Benjamin Berg <bberg@redhat.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 "sdcp_device"
|
|
||||||
#include "fpi-log.h"
|
|
||||||
|
|
||||||
#include "fp-sdcp-device-private.h"
|
|
||||||
|
|
||||||
/**
|
|
||||||
* SECTION: fp-sdcp-device
|
|
||||||
* @title: FpSdcpDevice
|
|
||||||
* @short_description: SDCP device subclass
|
|
||||||
*
|
|
||||||
* This is a base class for devices implementing the SDCP security protocol.
|
|
||||||
*/
|
|
||||||
|
|
||||||
G_DEFINE_ABSTRACT_TYPE_WITH_PRIVATE (FpSdcpDevice, fp_sdcp_device, FP_TYPE_DEVICE)
|
|
||||||
|
|
||||||
#if 0
|
|
||||||
/* XXX: We'll very likely want/need some properties on this class. */
|
|
||||||
enum {
|
|
||||||
PROP_0,
|
|
||||||
N_PROPS
|
|
||||||
};
|
|
||||||
|
|
||||||
static GParamSpec *properties[N_PROPS];
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*******************************************************/
|
|
||||||
|
|
||||||
/* Callbacks/vfuncs */
|
|
||||||
static void
|
|
||||||
fp_sdcp_device_open (FpDevice *device)
|
|
||||||
{
|
|
||||||
FpSdcpDevice *self = FP_SDCP_DEVICE (device);
|
|
||||||
FpSdcpDevicePrivate *priv = fp_sdcp_device_get_instance_private (self);
|
|
||||||
|
|
||||||
/* Try a reconnect if we still have the mac secret. */
|
|
||||||
if (priv->mac_secret)
|
|
||||||
fpi_sdcp_device_reconnect (self);
|
|
||||||
else
|
|
||||||
fpi_sdcp_device_connect (self);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
fp_sdcp_device_enroll (FpDevice *device)
|
|
||||||
{
|
|
||||||
FpSdcpDevice *self = FP_SDCP_DEVICE (device);
|
|
||||||
|
|
||||||
fpi_sdcp_device_enroll (self);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
fp_sdcp_device_identify (FpDevice *device)
|
|
||||||
{
|
|
||||||
FpSdcpDevice *self = FP_SDCP_DEVICE (device);
|
|
||||||
|
|
||||||
fpi_sdcp_device_identify (self);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*********************************************************/
|
|
||||||
|
|
||||||
static void
|
|
||||||
fp_sdcp_device_finalize (GObject *object)
|
|
||||||
{
|
|
||||||
FpSdcpDevice *self = (FpSdcpDevice *) object;
|
|
||||||
FpSdcpDevicePrivate *priv = fp_sdcp_device_get_instance_private (self);
|
|
||||||
|
|
||||||
g_clear_pointer (&priv->intermediate_cas, g_ptr_array_unref);
|
|
||||||
g_clear_pointer (&priv->slot, PK11_FreeSlot);
|
|
||||||
g_clear_pointer (&priv->host_key_private, SECKEY_DestroyPrivateKey);
|
|
||||||
g_clear_pointer (&priv->host_key_public, SECKEY_DestroyPublicKey);
|
|
||||||
g_clear_pointer (&priv->master_secret, PK11_FreeSymKey);
|
|
||||||
g_clear_pointer (&priv->mac_secret, PK11_FreeSymKey);
|
|
||||||
g_clear_pointer (&priv->nss_init_context, NSS_ShutdownContext);
|
|
||||||
|
|
||||||
G_OBJECT_CLASS (fp_sdcp_device_parent_class)->finalize (object);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
fp_sdcp_device_get_property (GObject *object,
|
|
||||||
guint prop_id,
|
|
||||||
GValue *value,
|
|
||||||
GParamSpec *pspec)
|
|
||||||
{
|
|
||||||
switch (prop_id)
|
|
||||||
{
|
|
||||||
default:
|
|
||||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
fp_sdcp_device_constructed (GObject *obj)
|
|
||||||
{
|
|
||||||
G_OBJECT_CLASS (fp_sdcp_device_parent_class)->constructed (obj);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
fp_sdcp_device_class_init (FpSdcpDeviceClass *klass)
|
|
||||||
{
|
|
||||||
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
|
||||||
FpDeviceClass *fp_device_class = FP_DEVICE_CLASS (klass);
|
|
||||||
|
|
||||||
object_class->finalize = fp_sdcp_device_finalize;
|
|
||||||
object_class->get_property = fp_sdcp_device_get_property;
|
|
||||||
object_class->constructed = fp_sdcp_device_constructed;
|
|
||||||
|
|
||||||
fp_device_class->open = fp_sdcp_device_open;
|
|
||||||
fp_device_class->enroll = fp_sdcp_device_enroll;
|
|
||||||
fp_device_class->verify = fp_sdcp_device_identify;
|
|
||||||
fp_device_class->identify = fp_sdcp_device_identify;
|
|
||||||
|
|
||||||
#if 0
|
|
||||||
g_object_class_install_properties (object_class, N_PROPS, properties);
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
fp_sdcp_device_init (FpSdcpDevice *self)
|
|
||||||
{
|
|
||||||
FpSdcpDevicePrivate *priv = fp_sdcp_device_get_instance_private (self);
|
|
||||||
|
|
||||||
priv->intermediate_cas = g_ptr_array_new_with_free_func ((GDestroyNotify) g_bytes_unref);
|
|
||||||
}
|
|
||||||
@@ -20,6 +20,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "fp-image.h"
|
#include "fp-image.h"
|
||||||
|
#include "tod/tod-macros.h"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* fpi_frame:
|
* fpi_frame:
|
||||||
@@ -110,6 +111,9 @@ struct fpi_line_asmbl_ctx
|
|||||||
unsigned char (*get_pixel)(struct fpi_line_asmbl_ctx *ctx,
|
unsigned char (*get_pixel)(struct fpi_line_asmbl_ctx *ctx,
|
||||||
GSList *line,
|
GSList *line,
|
||||||
unsigned int x);
|
unsigned int x);
|
||||||
|
|
||||||
|
/*< private >*/
|
||||||
|
TOD_PADDING (32, 0);
|
||||||
};
|
};
|
||||||
|
|
||||||
FpImage *fpi_assemble_lines (struct fpi_line_asmbl_ctx *ctx,
|
FpImage *fpi_assemble_lines (struct fpi_line_asmbl_ctx *ctx,
|
||||||
|
|||||||
@@ -1181,7 +1181,7 @@ fpi_byte_reader_dup_string_utf##bits (FpiByteReader * reader, type ** str) \
|
|||||||
*str = NULL; \
|
*str = NULL; \
|
||||||
return FALSE; \
|
return FALSE; \
|
||||||
} \
|
} \
|
||||||
*str = g_memdup (reader->data + reader->byte, size); \
|
*str = g_memdup2 (reader->data + reader->byte, size); \
|
||||||
reader->byte += size; \
|
reader->byte += size; \
|
||||||
return TRUE; \
|
return TRUE; \
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,6 +22,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
|
#include "fpi-compat.h"
|
||||||
#include "fpi-byte-utils.h"
|
#include "fpi-byte-utils.h"
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
@@ -360,7 +361,7 @@ static inline guint8 *
|
|||||||
fpi_byte_reader_dup_data_unchecked (FpiByteReader * reader, guint size)
|
fpi_byte_reader_dup_data_unchecked (FpiByteReader * reader, guint size)
|
||||||
{
|
{
|
||||||
gconstpointer data = fpi_byte_reader_get_data_unchecked (reader, size);
|
gconstpointer data = fpi_byte_reader_get_data_unchecked (reader, size);
|
||||||
return (guint8 *) g_memdup (data, size);
|
return (guint8 *) g_memdup2 (data, size);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Unchecked variants that should not be used */
|
/* Unchecked variants that should not be used */
|
||||||
|
|||||||
@@ -211,7 +211,7 @@ fpi_byte_writer_reset_and_get_data (FpiByteWriter * writer)
|
|||||||
|
|
||||||
data = (guint8 *) writer->parent.data;
|
data = (guint8 *) writer->parent.data;
|
||||||
if (!writer->owned)
|
if (!writer->owned)
|
||||||
data = g_memdup (data, writer->parent.size);
|
data = g_memdup2 (data, writer->parent.size);
|
||||||
writer->parent.data = NULL;
|
writer->parent.data = NULL;
|
||||||
fpi_byte_writer_reset (writer);
|
fpi_byte_writer_reset (writer);
|
||||||
|
|
||||||
|
|||||||
@@ -20,25 +20,6 @@
|
|||||||
|
|
||||||
#include <glib-object.h>
|
#include <glib-object.h>
|
||||||
|
|
||||||
#if !GLIB_CHECK_VERSION (2, 57, 0)
|
|
||||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC (GTypeClass, g_type_class_unref);
|
|
||||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC (GEnumClass, g_type_class_unref);
|
|
||||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC (GFlagsClass, g_type_class_unref);
|
|
||||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC (GParamSpec, g_param_spec_unref);
|
|
||||||
#else
|
|
||||||
/* Re-define G_SOURCE_FUNC as we are technically not allowed to use it with
|
|
||||||
* the version we depend on currently. */
|
|
||||||
#undef G_SOURCE_FUNC
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define G_SOURCE_FUNC(f) ((GSourceFunc) (void (*)(void))(f))
|
|
||||||
|
|
||||||
#if !GLIB_CHECK_VERSION (2, 63, 3)
|
|
||||||
typedef struct _FpDeviceClass FpDeviceClass;
|
|
||||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC (FpDeviceClass, g_type_class_unref);
|
|
||||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC (GDate, g_date_free);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if __GNUC__ > 10 || (__GNUC__ == 10 && __GNUC_MINOR__ >= 1)
|
#if __GNUC__ > 10 || (__GNUC__ == 10 && __GNUC_MINOR__ >= 1)
|
||||||
#define FP_GNUC_ACCESS(m, p, s) __attribute__((access (m, p, s)))
|
#define FP_GNUC_ACCESS(m, p, s) __attribute__((access (m, p, s)))
|
||||||
#else
|
#else
|
||||||
|
|||||||
+221
-86
@@ -21,6 +21,7 @@
|
|||||||
#define FP_COMPONENT "device"
|
#define FP_COMPONENT "device"
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
|
#include <errno.h>
|
||||||
|
|
||||||
#include "fpi-log.h"
|
#include "fpi-log.h"
|
||||||
|
|
||||||
@@ -185,9 +186,6 @@ fpi_device_error_new (FpDeviceError error)
|
|||||||
|
|
||||||
case FP_DEVICE_ERROR_TOO_HOT:
|
case FP_DEVICE_ERROR_TOO_HOT:
|
||||||
msg = "Device disabled to prevent overheating.";
|
msg = "Device disabled to prevent overheating.";
|
||||||
|
|
||||||
case FP_DEVICE_ERROR_UNTRUSTED:
|
|
||||||
msg = "Could not verify integrity of the device, it cannot be trusted!";
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
@@ -524,33 +522,6 @@ fpi_device_get_driver_data (FpDevice *device)
|
|||||||
return priv->driver_data;
|
return priv->driver_data;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
enroll_data_free (FpEnrollData *data)
|
|
||||||
{
|
|
||||||
if (data->enroll_progress_destroy)
|
|
||||||
data->enroll_progress_destroy (data->enroll_progress_data);
|
|
||||||
data->enroll_progress_data = NULL;
|
|
||||||
g_clear_object (&data->print);
|
|
||||||
g_free (data);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
match_data_free (FpMatchData *data)
|
|
||||||
{
|
|
||||||
g_clear_object (&data->print);
|
|
||||||
g_clear_object (&data->match);
|
|
||||||
g_clear_error (&data->error);
|
|
||||||
|
|
||||||
if (data->match_destroy)
|
|
||||||
data->match_destroy (data->match_data);
|
|
||||||
data->match_data = NULL;
|
|
||||||
|
|
||||||
g_clear_object (&data->enrolled_print);
|
|
||||||
g_clear_pointer (&data->gallery, g_ptr_array_unref);
|
|
||||||
|
|
||||||
g_free (data);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* fpi_device_get_enroll_data:
|
* fpi_device_get_enroll_data:
|
||||||
* @device: The #FpDevice
|
* @device: The #FpDevice
|
||||||
@@ -624,7 +595,14 @@ fpi_device_get_verify_data (FpDevice *device,
|
|||||||
* @device: The #FpDevice
|
* @device: The #FpDevice
|
||||||
* @prints: (out) (transfer none) (element-type FpPrint): The gallery of prints
|
* @prints: (out) (transfer none) (element-type FpPrint): The gallery of prints
|
||||||
*
|
*
|
||||||
* Get data for identify.
|
* Get prints gallery for identification.
|
||||||
|
*
|
||||||
|
* The @prints array is always non-%NULL and may contain a list of #FpPrint's
|
||||||
|
* that the device should match against.
|
||||||
|
*
|
||||||
|
* Note that @prints can be an empty array, in such case the device is expected
|
||||||
|
* to report the scanned print matching the one in its internal storage, if any.
|
||||||
|
*
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
fpi_device_get_identify_data (FpDevice *device,
|
fpi_device_get_identify_data (FpDevice *device,
|
||||||
@@ -869,16 +847,16 @@ fpi_device_critical_section_flush_idle_cb (FpDevice *device)
|
|||||||
|
|
||||||
if (priv->suspend_queued)
|
if (priv->suspend_queued)
|
||||||
{
|
{
|
||||||
cls->suspend (device);
|
|
||||||
priv->suspend_queued = FALSE;
|
priv->suspend_queued = FALSE;
|
||||||
|
fpi_device_suspend (device);
|
||||||
|
|
||||||
return G_SOURCE_CONTINUE;
|
return G_SOURCE_CONTINUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (priv->resume_queued)
|
if (priv->resume_queued)
|
||||||
{
|
{
|
||||||
cls->resume (device);
|
|
||||||
priv->resume_queued = FALSE;
|
priv->resume_queued = FALSE;
|
||||||
|
fpi_device_resume (device);
|
||||||
|
|
||||||
return G_SOURCE_CONTINUE;
|
return G_SOURCE_CONTINUE;
|
||||||
}
|
}
|
||||||
@@ -915,6 +893,7 @@ fpi_device_critical_leave (FpDevice *device)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
priv->critical_section_flush_source = g_idle_source_new ();
|
priv->critical_section_flush_source = g_idle_source_new ();
|
||||||
|
g_source_set_priority (priv->critical_section_flush_source, G_PRIORITY_HIGH);
|
||||||
g_source_set_callback (priv->critical_section_flush_source,
|
g_source_set_callback (priv->critical_section_flush_source,
|
||||||
(GSourceFunc) fpi_device_critical_section_flush_idle_cb,
|
(GSourceFunc) fpi_device_critical_section_flush_idle_cb,
|
||||||
device,
|
device,
|
||||||
@@ -1313,12 +1292,14 @@ fpi_device_enroll_complete (FpDevice *device, FpPrint *print, GError *error)
|
|||||||
* @device: The #FpDevice
|
* @device: The #FpDevice
|
||||||
* @error: A #GError if result is %FPI_MATCH_ERROR
|
* @error: A #GError if result is %FPI_MATCH_ERROR
|
||||||
*
|
*
|
||||||
* Finish an ongoing verify operation. The returned print should be
|
* Finish an ongoing verify operation.
|
||||||
* representing the new scan and not the one passed for verification.
|
|
||||||
*
|
*
|
||||||
* Note that @error should only be set for actual errors. In the case
|
* Note that @error should only be set for actual errors. In the case
|
||||||
* of retry errors, report these using fpi_device_verify_report()
|
* of retry errors, report these using fpi_device_verify_report()
|
||||||
* and then call this function without any error argument.
|
* and then call this function without any error argument.
|
||||||
|
*
|
||||||
|
* If @error is not set, we expect that a result (and print, in case)
|
||||||
|
* have been already reported via fpi_device_verify_report().
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
fpi_device_verify_complete (FpDevice *device,
|
fpi_device_verify_complete (FpDevice *device,
|
||||||
@@ -1376,9 +1357,14 @@ fpi_device_verify_complete (FpDevice *device,
|
|||||||
* @device: The #FpDevice
|
* @device: The #FpDevice
|
||||||
* @error: The #GError or %NULL on success
|
* @error: The #GError or %NULL on success
|
||||||
*
|
*
|
||||||
* Finish an ongoing identify operation. The match that was identified is
|
* Finish an ongoing identify operation.
|
||||||
* returned in @match. The @print parameter returns the newly created scan
|
*
|
||||||
* that was used for matching.
|
* Note that @error should only be set for actual errors. In the case
|
||||||
|
* of retry errors, report these using fpi_device_identify_report()
|
||||||
|
* and then call this function without any error argument.
|
||||||
|
*
|
||||||
|
* If @error is not set, we expect that a match and / or a print have been
|
||||||
|
* already reported via fpi_device_identify_report()
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
fpi_device_identify_complete (FpDevice *device,
|
fpi_device_identify_complete (FpDevice *device,
|
||||||
@@ -1553,6 +1539,150 @@ fpi_device_list_complete (FpDevice *device,
|
|||||||
fpi_device_return_task_in_idle (device, FP_DEVICE_TASK_RETURN_ERROR, error);
|
fpi_device_return_task_in_idle (device, FP_DEVICE_TASK_RETURN_ERROR, error);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int
|
||||||
|
update_attr (const char *attr, const char *value)
|
||||||
|
{
|
||||||
|
int fd, err;
|
||||||
|
gssize r;
|
||||||
|
char buf[50] = { 0 };
|
||||||
|
|
||||||
|
fd = open (attr, O_RDONLY);
|
||||||
|
err = -errno;
|
||||||
|
if (fd < 0)
|
||||||
|
return -err;
|
||||||
|
|
||||||
|
r = read (fd, buf, sizeof (buf) - 1);
|
||||||
|
err = errno;
|
||||||
|
close (fd);
|
||||||
|
if (r < 0)
|
||||||
|
return -err;
|
||||||
|
|
||||||
|
g_strchomp (buf);
|
||||||
|
if (g_strcmp0 (buf, value) == 0)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
/* O_TRUNC makes things work in the umockdev environment */
|
||||||
|
fd = open (attr, O_WRONLY | O_TRUNC);
|
||||||
|
err = errno;
|
||||||
|
if (fd < 0)
|
||||||
|
return -err;
|
||||||
|
|
||||||
|
r = write (fd, value, strlen (value));
|
||||||
|
err = -errno;
|
||||||
|
close (fd);
|
||||||
|
if (r < 0)
|
||||||
|
{
|
||||||
|
/* Write failures are weird, and are worth a warning */
|
||||||
|
g_warning ("Could not write %s to %s", value, attr);
|
||||||
|
return -err;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
complete_suspend_resume_task (FpDevice *device)
|
||||||
|
{
|
||||||
|
g_autoptr(GTask) task = NULL;
|
||||||
|
FpDevicePrivate *priv = fp_device_get_instance_private (device);
|
||||||
|
|
||||||
|
g_assert (priv->suspend_resume_task);
|
||||||
|
task = g_steal_pointer (&priv->suspend_resume_task);
|
||||||
|
|
||||||
|
g_task_return_boolean (task, TRUE);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
fpi_device_suspend (FpDevice *device)
|
||||||
|
{
|
||||||
|
FpDevicePrivate *priv = fp_device_get_instance_private (device);
|
||||||
|
|
||||||
|
/* If the device is currently idle, just complete immediately.
|
||||||
|
* For long running tasks, call the driver handler right away, for short
|
||||||
|
* tasks, wait for completion and then return the task.
|
||||||
|
*/
|
||||||
|
switch (priv->current_action)
|
||||||
|
{
|
||||||
|
case FPI_DEVICE_ACTION_NONE:
|
||||||
|
fpi_device_suspend_complete (device, NULL);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case FPI_DEVICE_ACTION_ENROLL:
|
||||||
|
case FPI_DEVICE_ACTION_VERIFY:
|
||||||
|
case FPI_DEVICE_ACTION_IDENTIFY:
|
||||||
|
case FPI_DEVICE_ACTION_CAPTURE:
|
||||||
|
if (FP_DEVICE_GET_CLASS (device)->suspend)
|
||||||
|
{
|
||||||
|
if (priv->critical_section)
|
||||||
|
priv->suspend_queued = TRUE;
|
||||||
|
else
|
||||||
|
FP_DEVICE_GET_CLASS (device)->suspend (device);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
fpi_device_suspend_complete (device, fpi_device_error_new (FP_DEVICE_ERROR_NOT_SUPPORTED));
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
case FPI_DEVICE_ACTION_PROBE:
|
||||||
|
case FPI_DEVICE_ACTION_OPEN:
|
||||||
|
case FPI_DEVICE_ACTION_CLOSE:
|
||||||
|
case FPI_DEVICE_ACTION_DELETE:
|
||||||
|
case FPI_DEVICE_ACTION_LIST:
|
||||||
|
case FPI_DEVICE_ACTION_CLEAR_STORAGE:
|
||||||
|
g_signal_connect_object (priv->current_task,
|
||||||
|
"notify::completed",
|
||||||
|
G_CALLBACK (complete_suspend_resume_task),
|
||||||
|
device,
|
||||||
|
G_CONNECT_SWAPPED);
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
fpi_device_resume (FpDevice *device)
|
||||||
|
{
|
||||||
|
FpDevicePrivate *priv = fp_device_get_instance_private (device);
|
||||||
|
|
||||||
|
switch (priv->current_action)
|
||||||
|
{
|
||||||
|
case FPI_DEVICE_ACTION_NONE:
|
||||||
|
fpi_device_resume_complete (device, NULL);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case FPI_DEVICE_ACTION_ENROLL:
|
||||||
|
case FPI_DEVICE_ACTION_VERIFY:
|
||||||
|
case FPI_DEVICE_ACTION_IDENTIFY:
|
||||||
|
case FPI_DEVICE_ACTION_CAPTURE:
|
||||||
|
if (FP_DEVICE_GET_CLASS (device)->resume)
|
||||||
|
{
|
||||||
|
if (priv->critical_section)
|
||||||
|
priv->resume_queued = TRUE;
|
||||||
|
else
|
||||||
|
FP_DEVICE_GET_CLASS (device)->resume (device);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
fpi_device_resume_complete (device, fpi_device_error_new (FP_DEVICE_ERROR_NOT_SUPPORTED));
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
case FPI_DEVICE_ACTION_PROBE:
|
||||||
|
case FPI_DEVICE_ACTION_OPEN:
|
||||||
|
case FPI_DEVICE_ACTION_CLOSE:
|
||||||
|
case FPI_DEVICE_ACTION_DELETE:
|
||||||
|
case FPI_DEVICE_ACTION_LIST:
|
||||||
|
case FPI_DEVICE_ACTION_CLEAR_STORAGE:
|
||||||
|
/* cannot happen as we make sure these tasks complete before suspend */
|
||||||
|
g_assert_not_reached ();
|
||||||
|
complete_suspend_resume_task (device);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
fpi_device_configure_wakeup (FpDevice *device, gboolean enabled)
|
fpi_device_configure_wakeup (FpDevice *device, gboolean enabled)
|
||||||
{
|
{
|
||||||
@@ -1563,42 +1693,38 @@ fpi_device_configure_wakeup (FpDevice *device, gboolean enabled)
|
|||||||
case FP_DEVICE_TYPE_USB:
|
case FP_DEVICE_TYPE_USB:
|
||||||
{
|
{
|
||||||
g_autoptr(GString) ports = NULL;
|
g_autoptr(GString) ports = NULL;
|
||||||
GUsbDevice *dev, *parent;
|
g_autoptr(GUsbDevice) dev = NULL;
|
||||||
const char *wakeup_command = enabled ? "enabled" : "disabled";
|
const char *wakeup_command = enabled ? "enabled" : "disabled";
|
||||||
guint8 bus, port;
|
guint8 bus;
|
||||||
g_autofree gchar *sysfs_wakeup = NULL;
|
g_autofree gchar *sysfs_wakeup = NULL;
|
||||||
g_autofree gchar *sysfs_persist = NULL;
|
g_autofree gchar *sysfs_persist = NULL;
|
||||||
gssize r;
|
int res;
|
||||||
int fd;
|
|
||||||
|
|
||||||
ports = g_string_new (NULL);
|
ports = g_string_new (NULL);
|
||||||
bus = g_usb_device_get_bus (priv->usb_device);
|
bus = g_usb_device_get_bus (priv->usb_device);
|
||||||
|
|
||||||
/* Walk up, skipping the root hub. */
|
/* Walk up, skipping the root hub. */
|
||||||
dev = priv->usb_device;
|
g_set_object (&dev, priv->usb_device);
|
||||||
while ((parent = g_usb_device_get_parent (dev)))
|
while (TRUE)
|
||||||
{
|
{
|
||||||
|
g_autoptr(GUsbDevice) parent = g_usb_device_get_parent (dev);
|
||||||
|
g_autofree gchar *port_str = NULL;
|
||||||
|
guint8 port;
|
||||||
|
|
||||||
|
if (!parent)
|
||||||
|
break;
|
||||||
|
|
||||||
port = g_usb_device_get_port_number (dev);
|
port = g_usb_device_get_port_number (dev);
|
||||||
g_string_prepend (ports, g_strdup_printf ("%d.", port));
|
port_str = g_strdup_printf ("%d.", port);
|
||||||
dev = parent;
|
g_string_prepend (ports, port_str);
|
||||||
|
g_set_object (&dev, parent);
|
||||||
}
|
}
|
||||||
g_string_set_size (ports, ports->len - 1);
|
g_string_set_size (ports, ports->len - 1);
|
||||||
|
|
||||||
sysfs_wakeup = g_strdup_printf ("/sys/bus/usb/devices/%d-%s/power/wakeup", bus, ports->str);
|
sysfs_wakeup = g_strdup_printf ("/sys/bus/usb/devices/%d-%s/power/wakeup", bus, ports->str);
|
||||||
fd = open (sysfs_wakeup, O_WRONLY);
|
res = update_attr (sysfs_wakeup, wakeup_command);
|
||||||
|
if (res < 0)
|
||||||
if (fd < 0)
|
g_debug ("Failed to set %s to %s", sysfs_wakeup, wakeup_command);
|
||||||
{
|
|
||||||
/* Wakeup not existing appears to be relatively normal. */
|
|
||||||
g_debug ("Failed to open %s", sysfs_wakeup);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
r = write (fd, wakeup_command, strlen (wakeup_command));
|
|
||||||
if (r < 0)
|
|
||||||
g_warning ("Could not configure wakeup to %s by writing %s", wakeup_command, sysfs_wakeup);
|
|
||||||
close (fd);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Persist means that the kernel tries to keep the USB device open
|
/* Persist means that the kernel tries to keep the USB device open
|
||||||
* in case it is "replugged" due to suspend.
|
* in case it is "replugged" due to suspend.
|
||||||
@@ -1606,20 +1732,9 @@ fpi_device_configure_wakeup (FpDevice *device, gboolean enabled)
|
|||||||
* state. Instead, seeing an unplug and a new device makes more sense.
|
* state. Instead, seeing an unplug and a new device makes more sense.
|
||||||
*/
|
*/
|
||||||
sysfs_persist = g_strdup_printf ("/sys/bus/usb/devices/%d-%s/power/persist", bus, ports->str);
|
sysfs_persist = g_strdup_printf ("/sys/bus/usb/devices/%d-%s/power/persist", bus, ports->str);
|
||||||
fd = open (sysfs_persist, O_WRONLY);
|
res = update_attr (sysfs_persist, "0");
|
||||||
|
if (res < 0)
|
||||||
if (fd < 0)
|
g_warning ("Failed to disable USB persist by writing to %s", sysfs_persist);
|
||||||
{
|
|
||||||
g_warning ("Failed to open %s", sysfs_persist);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
r = write (fd, "0", 1);
|
|
||||||
if (r < 0)
|
|
||||||
g_message ("Could not disable USB persist by writing to %s", sysfs_persist);
|
|
||||||
close (fd);
|
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -1639,6 +1754,7 @@ fpi_device_configure_wakeup (FpDevice *device, gboolean enabled)
|
|||||||
static void
|
static void
|
||||||
fpi_device_suspend_completed (FpDevice *device)
|
fpi_device_suspend_completed (FpDevice *device)
|
||||||
{
|
{
|
||||||
|
g_autoptr(GTask) task = NULL;
|
||||||
FpDevicePrivate *priv = fp_device_get_instance_private (device);
|
FpDevicePrivate *priv = fp_device_get_instance_private (device);
|
||||||
|
|
||||||
/* We have an ongoing operation, allow the device to wake up the machine. */
|
/* We have an ongoing operation, allow the device to wake up the machine. */
|
||||||
@@ -1648,11 +1764,12 @@ fpi_device_suspend_completed (FpDevice *device)
|
|||||||
if (priv->critical_section)
|
if (priv->critical_section)
|
||||||
g_warning ("Driver was in a critical section at suspend time. It likely deadlocked!");
|
g_warning ("Driver was in a critical section at suspend time. It likely deadlocked!");
|
||||||
|
|
||||||
|
task = g_steal_pointer (&priv->suspend_resume_task);
|
||||||
|
|
||||||
if (priv->suspend_error)
|
if (priv->suspend_error)
|
||||||
g_task_return_error (g_steal_pointer (&priv->suspend_resume_task),
|
g_task_return_error (task, g_steal_pointer (&priv->suspend_error));
|
||||||
g_steal_pointer (&priv->suspend_error));
|
|
||||||
else
|
else
|
||||||
g_task_return_boolean (g_steal_pointer (&priv->suspend_resume_task), TRUE);
|
g_task_return_boolean (task, TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1680,11 +1797,12 @@ fpi_device_suspend_complete (FpDevice *device,
|
|||||||
g_return_if_fail (priv->suspend_resume_task);
|
g_return_if_fail (priv->suspend_resume_task);
|
||||||
g_return_if_fail (priv->suspend_error == NULL);
|
g_return_if_fail (priv->suspend_error == NULL);
|
||||||
|
|
||||||
priv->suspend_error = error;
|
priv->suspend_error = g_steal_pointer (&error);
|
||||||
priv->is_suspended = TRUE;
|
priv->is_suspended = TRUE;
|
||||||
|
|
||||||
/* If there is no error, we have no running task, return immediately. */
|
/* If there is no error, we have no running task, return immediately. */
|
||||||
if (error == NULL || !priv->current_task || g_task_get_completed (priv->current_task))
|
if (!priv->suspend_error || !priv->current_task ||
|
||||||
|
g_task_get_completed (priv->current_task))
|
||||||
{
|
{
|
||||||
fpi_device_suspend_completed (device);
|
fpi_device_suspend_completed (device);
|
||||||
return;
|
return;
|
||||||
@@ -1716,6 +1834,7 @@ void
|
|||||||
fpi_device_resume_complete (FpDevice *device,
|
fpi_device_resume_complete (FpDevice *device,
|
||||||
GError *error)
|
GError *error)
|
||||||
{
|
{
|
||||||
|
g_autoptr(GTask) task = NULL;
|
||||||
FpDevicePrivate *priv = fp_device_get_instance_private (device);
|
FpDevicePrivate *priv = fp_device_get_instance_private (device);
|
||||||
|
|
||||||
g_return_if_fail (FP_IS_DEVICE (device));
|
g_return_if_fail (FP_IS_DEVICE (device));
|
||||||
@@ -1724,10 +1843,12 @@ fpi_device_resume_complete (FpDevice *device,
|
|||||||
priv->is_suspended = FALSE;
|
priv->is_suspended = FALSE;
|
||||||
fpi_device_configure_wakeup (device, FALSE);
|
fpi_device_configure_wakeup (device, FALSE);
|
||||||
|
|
||||||
|
task = g_steal_pointer (&priv->suspend_resume_task);
|
||||||
|
|
||||||
if (error)
|
if (error)
|
||||||
g_task_return_error (g_steal_pointer (&priv->suspend_resume_task), error);
|
g_task_return_error (task, error);
|
||||||
else
|
else
|
||||||
g_task_return_boolean (g_steal_pointer (&priv->suspend_resume_task), TRUE);
|
g_task_return_boolean (task, TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1884,12 +2005,26 @@ fpi_device_verify_report (FpDevice *device,
|
|||||||
* fpi_device_identify_report:
|
* fpi_device_identify_report:
|
||||||
* @device: The #FpDevice
|
* @device: The #FpDevice
|
||||||
* @match: (transfer none): The #FpPrint from the gallery that matched
|
* @match: (transfer none): The #FpPrint from the gallery that matched
|
||||||
* @print: (transfer floating): The scanned #FpPrint
|
* @print: (transfer floating): The scanned #FpPrint, set in the absence
|
||||||
* @error: A #GError if result is %FPI_MATCH_ERROR
|
* of an error.
|
||||||
|
* @error: A #GError of %FP_DEVICE_RETRY type if @match and @print are unset.
|
||||||
*
|
*
|
||||||
* Report the result of a identify operation. Note that the passed @error must be
|
* Report the results of an identify operation.
|
||||||
* a retry error with the %FP_DEVICE_RETRY domain. For all other error cases,
|
*
|
||||||
* the error should passed to fpi_device_identify_complete().
|
* In case of successful identification @match is expected to be set to a
|
||||||
|
* #FpPrint that matches one from the provided gallery, while @print
|
||||||
|
* represents the scanned print and will be different.
|
||||||
|
*
|
||||||
|
* If there are no errors, it's expected that the device always reports the
|
||||||
|
* recognized @print even if there is no @match with the provided gallery (that
|
||||||
|
* can be potentially empty). This is required for application logic further
|
||||||
|
* up in the stack, such as for enroll-duplicate checking. @print needs to be
|
||||||
|
* sufficiently filled to do a comparison.
|
||||||
|
*
|
||||||
|
* In case of error, both @match and @print are expected to be %NULL.
|
||||||
|
* Note that the passed @error must be a retry error from the %FP_DEVICE_RETRY
|
||||||
|
* domain. For all other error cases, the error should passed to
|
||||||
|
* fpi_device_identify_complete().
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
fpi_device_identify_report (FpDevice *device,
|
fpi_device_identify_report (FpDevice *device,
|
||||||
|
|||||||
+30
-7
@@ -23,6 +23,7 @@
|
|||||||
#include "fp-device.h"
|
#include "fp-device.h"
|
||||||
#include "fp-image.h"
|
#include "fp-image.h"
|
||||||
#include "fpi-print.h"
|
#include "fpi-print.h"
|
||||||
|
#include "tod/tod-macros.h"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* FpiDeviceUdevSubtypeFlags:
|
* FpiDeviceUdevSubtypeFlags:
|
||||||
@@ -55,6 +56,12 @@ struct _FpIdEntry
|
|||||||
guint vid;
|
guint vid;
|
||||||
};
|
};
|
||||||
const gchar *virtual_envvar;
|
const gchar *virtual_envvar;
|
||||||
|
};
|
||||||
|
guint64 driver_data;
|
||||||
|
|
||||||
|
/* Elements added after TODv1 */
|
||||||
|
union
|
||||||
|
{
|
||||||
struct
|
struct
|
||||||
{
|
{
|
||||||
FpiDeviceUdevSubtypeFlags udev_types;
|
FpiDeviceUdevSubtypeFlags udev_types;
|
||||||
@@ -66,7 +73,13 @@ struct _FpIdEntry
|
|||||||
} hid_id;
|
} hid_id;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
guint64 driver_data;
|
|
||||||
|
/*< private >*/
|
||||||
|
/* padding for future expansion */
|
||||||
|
TOD_PADDING_ALIGNED (16,
|
||||||
|
sizeof (guint) * 2 +
|
||||||
|
sizeof (FpiDeviceUdevSubtypeFlags) +
|
||||||
|
sizeof (gpointer));
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -147,16 +160,11 @@ struct _FpDeviceClass
|
|||||||
const gchar *full_name;
|
const gchar *full_name;
|
||||||
FpDeviceType type;
|
FpDeviceType type;
|
||||||
const FpIdEntry *id_table;
|
const FpIdEntry *id_table;
|
||||||
FpDeviceFeature features;
|
|
||||||
|
|
||||||
/* Defaults for device properties */
|
/* Defaults for device properties */
|
||||||
gint nr_enroll_stages;
|
gint nr_enroll_stages;
|
||||||
FpScanType scan_type;
|
FpScanType scan_type;
|
||||||
|
|
||||||
/* Simple device temperature model constants */
|
|
||||||
gint32 temp_hot_seconds;
|
|
||||||
gint32 temp_cold_seconds;
|
|
||||||
|
|
||||||
/* Callbacks */
|
/* Callbacks */
|
||||||
gint (*usb_discover) (GUsbDevice *usb_device);
|
gint (*usb_discover) (GUsbDevice *usb_device);
|
||||||
void (*probe) (FpDevice *device);
|
void (*probe) (FpDevice *device);
|
||||||
@@ -168,11 +176,26 @@ struct _FpDeviceClass
|
|||||||
void (*capture) (FpDevice *device);
|
void (*capture) (FpDevice *device);
|
||||||
void (*list) (FpDevice *device);
|
void (*list) (FpDevice *device);
|
||||||
void (*delete) (FpDevice * device);
|
void (*delete) (FpDevice * device);
|
||||||
void (*clear_storage) (FpDevice * device);
|
|
||||||
|
|
||||||
void (*cancel) (FpDevice *device);
|
void (*cancel) (FpDevice *device);
|
||||||
|
|
||||||
|
/* Class elements added after tod-v1 */
|
||||||
|
FpDeviceFeature features;
|
||||||
|
|
||||||
|
/* Simple device temperature model constants */
|
||||||
|
gint32 temp_hot_seconds;
|
||||||
|
gint32 temp_cold_seconds;
|
||||||
|
|
||||||
|
void (*clear_storage) (FpDevice * device);
|
||||||
void (*suspend) (FpDevice *device);
|
void (*suspend) (FpDevice *device);
|
||||||
void (*resume) (FpDevice *device);
|
void (*resume) (FpDevice *device);
|
||||||
|
|
||||||
|
/*< private >*/
|
||||||
|
/* padding for future expansion */
|
||||||
|
TOD_PADDING_ALIGNED8 (32,
|
||||||
|
sizeof (FpDeviceFeature) +
|
||||||
|
sizeof (gint32) * 2 +
|
||||||
|
sizeof (gpointer) * 3);
|
||||||
};
|
};
|
||||||
|
|
||||||
void fpi_device_class_auto_initialize_features (FpDeviceClass *device_class);
|
void fpi_device_class_auto_initialize_features (FpDeviceClass *device_class);
|
||||||
|
|||||||
@@ -62,12 +62,12 @@
|
|||||||
*/
|
*/
|
||||||
typedef enum {
|
typedef enum {
|
||||||
FPI_IMAGE_DEVICE_STATE_INACTIVE,
|
FPI_IMAGE_DEVICE_STATE_INACTIVE,
|
||||||
FPI_IMAGE_DEVICE_STATE_ACTIVATING,
|
|
||||||
FPI_IMAGE_DEVICE_STATE_DEACTIVATING,
|
|
||||||
FPI_IMAGE_DEVICE_STATE_IDLE,
|
|
||||||
FPI_IMAGE_DEVICE_STATE_AWAIT_FINGER_ON,
|
FPI_IMAGE_DEVICE_STATE_AWAIT_FINGER_ON,
|
||||||
FPI_IMAGE_DEVICE_STATE_CAPTURE,
|
FPI_IMAGE_DEVICE_STATE_CAPTURE,
|
||||||
FPI_IMAGE_DEVICE_STATE_AWAIT_FINGER_OFF,
|
FPI_IMAGE_DEVICE_STATE_AWAIT_FINGER_OFF,
|
||||||
|
FPI_IMAGE_DEVICE_STATE_ACTIVATING,
|
||||||
|
FPI_IMAGE_DEVICE_STATE_DEACTIVATING,
|
||||||
|
FPI_IMAGE_DEVICE_STATE_IDLE,
|
||||||
} FpiImageDeviceState;
|
} FpiImageDeviceState;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -114,6 +114,10 @@ struct _FpImageDeviceClass
|
|||||||
void (*change_state) (FpImageDevice *dev,
|
void (*change_state) (FpImageDevice *dev,
|
||||||
FpiImageDeviceState state);
|
FpiImageDeviceState state);
|
||||||
void (*deactivate) (FpImageDevice *dev);
|
void (*deactivate) (FpImageDevice *dev);
|
||||||
|
|
||||||
|
/*< private >*/
|
||||||
|
/* padding for future expansion */
|
||||||
|
TOD_PADDING (32, 0);
|
||||||
};
|
};
|
||||||
|
|
||||||
void fpi_image_device_set_bz3_threshold (FpImageDevice *self,
|
void fpi_image_device_set_bz3_threshold (FpImageDevice *self,
|
||||||
|
|||||||
@@ -24,8 +24,9 @@
|
|||||||
#include "fpi-log.h"
|
#include "fpi-log.h"
|
||||||
|
|
||||||
#include <nbis.h>
|
#include <nbis.h>
|
||||||
|
#include <config.h>
|
||||||
|
|
||||||
#if HAVE_PIXMAN
|
#ifdef HAVE_PIXMAN
|
||||||
#include <pixman.h>
|
#include <pixman.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -107,12 +108,12 @@ fpi_mean_sq_diff_norm (const guint8 *buf1,
|
|||||||
return res / size;
|
return res / size;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if HAVE_PIXMAN
|
|
||||||
FpImage *
|
FpImage *
|
||||||
fpi_image_resize (FpImage *orig_img,
|
fpi_image_resize (FpImage *orig_img,
|
||||||
guint w_factor,
|
guint w_factor,
|
||||||
guint h_factor)
|
guint h_factor)
|
||||||
{
|
{
|
||||||
|
#ifdef HAVE_PIXMAN
|
||||||
int new_width = orig_img->width * w_factor;
|
int new_width = orig_img->width * w_factor;
|
||||||
int new_height = orig_img->height * h_factor;
|
int new_height = orig_img->height * h_factor;
|
||||||
pixman_image_t *orig, *resized;
|
pixman_image_t *orig, *resized;
|
||||||
@@ -145,5 +146,9 @@ fpi_image_resize (FpImage *orig_img,
|
|||||||
pixman_image_unref (resized);
|
pixman_image_unref (resized);
|
||||||
|
|
||||||
return newimg;
|
return newimg;
|
||||||
}
|
#else
|
||||||
|
fp_err ("Libfprint compiled without pixman support, impossible to resize");
|
||||||
|
|
||||||
|
return g_object_ref (orig_img);
|
||||||
#endif
|
#endif
|
||||||
|
}
|
||||||
|
|||||||
@@ -20,11 +20,12 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <config.h>
|
|
||||||
#include "fp-image.h"
|
#include "fp-image.h"
|
||||||
|
#include "tod/tod-macros.h"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* FpiImageFlags:
|
* FpiImageFlags:
|
||||||
|
* @FPI_IMAGE_NONE: no flag set
|
||||||
* @FPI_IMAGE_V_FLIPPED: the image is vertically flipped
|
* @FPI_IMAGE_V_FLIPPED: the image is vertically flipped
|
||||||
* @FPI_IMAGE_H_FLIPPED: the image is horizontally flipped
|
* @FPI_IMAGE_H_FLIPPED: the image is horizontally flipped
|
||||||
* @FPI_IMAGE_COLORS_INVERTED: the colours are inverted
|
* @FPI_IMAGE_COLORS_INVERTED: the colours are inverted
|
||||||
@@ -34,6 +35,7 @@
|
|||||||
* rely on the image to be normalized by libfprint before further processing.
|
* rely on the image to be normalized by libfprint before further processing.
|
||||||
*/
|
*/
|
||||||
typedef enum {
|
typedef enum {
|
||||||
|
FPI_IMAGE_NONE = 0,
|
||||||
FPI_IMAGE_V_FLIPPED = 1 << 0,
|
FPI_IMAGE_V_FLIPPED = 1 << 0,
|
||||||
FPI_IMAGE_H_FLIPPED = 1 << 1,
|
FPI_IMAGE_H_FLIPPED = 1 << 1,
|
||||||
FPI_IMAGE_COLORS_INVERTED = 1 << 2,
|
FPI_IMAGE_COLORS_INVERTED = 1 << 2,
|
||||||
@@ -68,7 +70,12 @@ struct _FpImage
|
|||||||
guint8 *binarized;
|
guint8 *binarized;
|
||||||
|
|
||||||
GPtrArray *minutiae;
|
GPtrArray *minutiae;
|
||||||
|
/* Unused */
|
||||||
guint ref_count;
|
guint ref_count;
|
||||||
|
|
||||||
|
gboolean detection_in_progress;
|
||||||
|
|
||||||
|
TOD_PADDING (32, sizeof (gboolean));
|
||||||
};
|
};
|
||||||
|
|
||||||
gint fpi_std_sq_dev (const guint8 *buf,
|
gint fpi_std_sq_dev (const guint8 *buf,
|
||||||
@@ -77,8 +84,6 @@ gint fpi_mean_sq_diff_norm (const guint8 *buf1,
|
|||||||
const guint8 *buf2,
|
const guint8 *buf2,
|
||||||
gint size);
|
gint size);
|
||||||
|
|
||||||
#if HAVE_PIXMAN
|
|
||||||
FpImage *fpi_image_resize (FpImage *orig,
|
FpImage *fpi_image_resize (FpImage *orig,
|
||||||
guint w_factor,
|
guint w_factor,
|
||||||
guint h_factor);
|
guint h_factor);
|
||||||
#endif
|
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ fpi_print_add_print (FpPrint *print, FpPrint *add)
|
|||||||
g_return_if_fail (add->type == FPI_PRINT_NBIS);
|
g_return_if_fail (add->type == FPI_PRINT_NBIS);
|
||||||
|
|
||||||
g_assert (add->prints->len == 1);
|
g_assert (add->prints->len == 1);
|
||||||
g_ptr_array_add (print->prints, g_memdup (add->prints->pdata[0], sizeof (struct xyt_struct)));
|
g_ptr_array_add (print->prints, g_memdup2 (add->prints->pdata[0], sizeof (struct xyt_struct)));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -11,13 +11,11 @@ G_BEGIN_DECLS
|
|||||||
* @FPI_PRINT_UNDEFINED: Undefined type, this happens prior to enrollment
|
* @FPI_PRINT_UNDEFINED: Undefined type, this happens prior to enrollment
|
||||||
* @FPI_PRINT_RAW: A raw print where the data is directly compared
|
* @FPI_PRINT_RAW: A raw print where the data is directly compared
|
||||||
* @FPI_PRINT_NBIS: NBIS minutiae comparison
|
* @FPI_PRINT_NBIS: NBIS minutiae comparison
|
||||||
* @FPI_PRINT_SDCP: Print from an SDCP conforming device
|
|
||||||
*/
|
*/
|
||||||
typedef enum {
|
typedef enum {
|
||||||
FPI_PRINT_UNDEFINED = 0,
|
FPI_PRINT_UNDEFINED = 0,
|
||||||
FPI_PRINT_RAW,
|
FPI_PRINT_RAW,
|
||||||
FPI_PRINT_NBIS,
|
FPI_PRINT_NBIS,
|
||||||
FPI_PRINT_SDCP,
|
|
||||||
} FpiPrintType;
|
} FpiPrintType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -44,8 +42,8 @@ gboolean fpi_print_add_from_image (FpPrint *print,
|
|||||||
FpImage *image,
|
FpImage *image,
|
||||||
GError **error);
|
GError **error);
|
||||||
|
|
||||||
FpiMatchResult fpi_print_bz3_match (FpPrint * template,
|
FpiMatchResult fpi_print_bz3_match (FpPrint *temp,
|
||||||
FpPrint * print,
|
FpPrint *print,
|
||||||
gint bz3_threshold,
|
gint bz3_threshold,
|
||||||
GError **error);
|
GError **error);
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user