mirror of
https://gitlab.freedesktop.org/libfprint/libfprint.git
synced 2026-02-08 18:40:31 +01:00
Merge branch 'focaltech-support' into 'master'
focaltech_moc: Add support for 2808:6553 Closes #681 See merge request libfprint/libfprint!554
This commit is contained in:
commit
4e4153a6eb
6 changed files with 311 additions and 5 deletions
|
|
@ -185,6 +185,7 @@ usb:v2808pA99A*
|
|||
usb:v2808pA57A*
|
||||
usb:v2808pA78A*
|
||||
usb:v2808p1579*
|
||||
usb:v2808p6553*
|
||||
ID_AUTOSUSPEND=1
|
||||
ID_PERSIST=0
|
||||
|
||||
|
|
|
|||
|
|
@ -35,6 +35,7 @@ static const FpIdEntry id_table[] = {
|
|||
{ .vid = 0x2808, .pid = 0xa57a, },
|
||||
{ .vid = 0x2808, .pid = 0xa78a, },
|
||||
{ .vid = 0x2808, .pid = 0x1579, },
|
||||
{ .vid = 0x2808, .pid = 0x6553, },
|
||||
{ .vid = 0, .pid = 0, .driver_data = 0 }, /* terminating entry */
|
||||
};
|
||||
|
||||
|
|
@ -1043,7 +1044,7 @@ focaltech_moc_get_enrolled_info_cb (FpiDeviceFocaltechMoc *self,
|
|||
fp_cmd = (FpCmd *) buffer_in;
|
||||
items = (struct EnrolledInfoItem *) (fp_cmd + 1);
|
||||
|
||||
if (fp_cmd->code != 0x04)
|
||||
if (fp_cmd->code != 0x04 && fp_cmd->code != 0x09)
|
||||
{
|
||||
fpi_ssm_mark_failed (self->task_ssm,
|
||||
fpi_device_error_new_msg (FP_DEVICE_ERROR_PROTO,
|
||||
|
|
@ -1051,8 +1052,13 @@ focaltech_moc_get_enrolled_info_cb (FpiDeviceFocaltechMoc *self,
|
|||
}
|
||||
else
|
||||
{
|
||||
memcpy (&data->enrolled_info->items[0], items,
|
||||
FOCALTECH_MOC_MAX_FINGERS * sizeof (struct EnrolledInfoItem));
|
||||
if (fp_cmd->code == 0x04)
|
||||
memcpy (&data->enrolled_info->items[0], items,
|
||||
FOCALTECH_MOC_MAX_FINGERS * sizeof (struct EnrolledInfoItem));
|
||||
else if (fp_cmd->code == 0x09)
|
||||
memset (&data->enrolled_info->items[0], 0,
|
||||
FOCALTECH_MOC_MAX_FINGERS * sizeof (struct EnrolledInfoItem));
|
||||
|
||||
fpi_ssm_next_state (self->task_ssm);
|
||||
}
|
||||
}
|
||||
|
|
@ -1350,7 +1356,7 @@ focaltech_moc_set_enrolled_info_cb (FpiDeviceFocaltechMoc *self,
|
|||
|
||||
fp_cmd = (FpCmd *) buffer_in;
|
||||
|
||||
if (fp_cmd->code != 0x04)
|
||||
if (fp_cmd->code != 0x04 && fp_cmd->code != 0x09)
|
||||
{
|
||||
fpi_ssm_mark_failed (self->task_ssm,
|
||||
fpi_device_error_new_msg (FP_DEVICE_ERROR_PROTO,
|
||||
|
|
@ -1377,7 +1383,7 @@ focaltech_moc_commit_cb (FpiDeviceFocaltechMoc *self,
|
|||
|
||||
fp_cmd = (FpCmd *) buffer_in;
|
||||
|
||||
if (fp_cmd->code != 0x04)
|
||||
if (fp_cmd->code != 0x04 && fp_cmd->code != 0x09)
|
||||
{
|
||||
fpi_ssm_mark_failed (self->task_ssm,
|
||||
fpi_device_error_new_msg (FP_DEVICE_ERROR_PROTO,
|
||||
|
|
|
|||
BIN
tests/focaltech_moc-6553/custom.pcapng
Normal file
BIN
tests/focaltech_moc-6553/custom.pcapng
Normal file
Binary file not shown.
31
tests/focaltech_moc-6553/custom.py
Normal file
31
tests/focaltech_moc-6553/custom.py
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
#!/usr/bin/python3
|
||||
import traceback
|
||||
import sys
|
||||
import gi
|
||||
gi.require_version('FPrint', '2.0')
|
||||
from gi.repository import FPrint, GLib
|
||||
|
||||
sys.excepthook = lambda *args: (traceback.print_exception(*args), sys.exit(1))
|
||||
|
||||
ctx = GLib.main_context_default()
|
||||
c = FPrint.Context()
|
||||
c.enumerate()
|
||||
d = c.get_devices()[0]
|
||||
|
||||
d.open_sync()
|
||||
|
||||
print("Listing prints...")
|
||||
stored = d.list_prints_sync()
|
||||
assert len(stored) > 0
|
||||
|
||||
target = stored[0]
|
||||
print("Verifying against the first stored print...")
|
||||
|
||||
match, _ = d.verify_sync(target)
|
||||
if match:
|
||||
print("SUCCESS: Verification passed.")
|
||||
else:
|
||||
print("FAILURE: Verification failed.")
|
||||
sys.exit(1)
|
||||
|
||||
d.close_sync()
|
||||
267
tests/focaltech_moc-6553/device
Normal file
267
tests/focaltech_moc-6553/device
Normal file
|
|
@ -0,0 +1,267 @@
|
|||
P: /devices/pci0000:00/0000:00:14.0/usb3/3-2
|
||||
N: bus/usb/003/002=12010102000000400828536501210301020109022000010104A0FA0904000002DCA0B0000705010240000007058202400000
|
||||
E: BUSNUM=003
|
||||
E: CURRENT_TAGS=:seat:
|
||||
E: DEVNAME=/dev/bus/usb/003/002
|
||||
E: DEVNUM=002
|
||||
E: DEVTYPE=usb_device
|
||||
E: DRIVER=usb
|
||||
E: ID_AUTOSUSPEND=1
|
||||
E: ID_BUS=usb
|
||||
E: ID_FOR_SEAT=usb-pci-0000_00_14_0-usb-0_2
|
||||
E: ID_MODEL=Focaltech_FT9365_ESS
|
||||
E: ID_MODEL_ENC=Focaltech\x20FT9365\x20ESS
|
||||
E: ID_MODEL_ID=6553
|
||||
E: ID_PATH=pci-0000:00:14.0-usb-0:2
|
||||
E: ID_PATH_TAG=pci-0000_00_14_0-usb-0_2
|
||||
E: ID_PATH_WITH_USB_REVISION=pci-0000:00:14.0-usbv2-0:2
|
||||
E: ID_PERSIST=0
|
||||
E: ID_REVISION=2101
|
||||
E: ID_SERIAL=Generic_Focaltech_FT9365_ESS_201801010001
|
||||
E: ID_SERIAL_SHORT=201801010001
|
||||
E: ID_USB_INTERFACES=:dca0b0:
|
||||
E: ID_USB_MODEL=Focaltech_FT9365_ESS
|
||||
E: ID_USB_MODEL_ENC=Focaltech\x20FT9365\x20ESS
|
||||
E: ID_USB_MODEL_ID=6553
|
||||
E: ID_USB_REVISION=2101
|
||||
E: ID_USB_SERIAL=Generic_Focaltech_FT9365_ESS_201801010001
|
||||
E: ID_USB_SERIAL_SHORT=201801010001
|
||||
E: ID_USB_VENDOR=Generic
|
||||
E: ID_USB_VENDOR_ENC=Generic
|
||||
E: ID_USB_VENDOR_ID=2808
|
||||
E: ID_VENDOR=Generic
|
||||
E: ID_VENDOR_ENC=Generic
|
||||
E: ID_VENDOR_ID=2808
|
||||
E: MAJOR=189
|
||||
E: MINOR=257
|
||||
E: PRODUCT=2808/6553/2101
|
||||
E: SUBSYSTEM=usb
|
||||
E: TAGS=:seat:
|
||||
E: TYPE=0/0/0
|
||||
A: authorized=1\n
|
||||
A: avoid_reset_quirk=0\n
|
||||
A: bConfigurationValue=1\n
|
||||
A: bDeviceClass=00\n
|
||||
A: bDeviceProtocol=00\n
|
||||
A: bDeviceSubClass=00\n
|
||||
A: bMaxPacketSize0=64\n
|
||||
A: bMaxPower=500mA\n
|
||||
A: bNumConfigurations=1\n
|
||||
A: bNumInterfaces= 1\n
|
||||
A: bcdDevice=2101\n
|
||||
A: bmAttributes=a0\n
|
||||
H: bos_descriptors=050F2900021C100500DF60DDD88945C74C9CD2659D9E648A9F000003066E0315000810110103000000
|
||||
A: busnum=3\n
|
||||
A: configuration=Focaltech FT9365 ESS\n
|
||||
H: descriptors=12010102000000400828536501210301020109022000010104A0FA0904000002DCA0B0000705010240000007058202400000
|
||||
A: dev=189:257\n
|
||||
A: devnum=2\n
|
||||
A: devpath=2\n
|
||||
L: driver=../../../../../bus/usb/drivers/usb
|
||||
L: firmware_node=../../../../LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:56/device:57/device:59
|
||||
A: idProduct=6553\n
|
||||
A: idVendor=2808\n
|
||||
A: ltm_capable=no\n
|
||||
A: manufacturer=Generic\n
|
||||
A: maxchild=0\n
|
||||
A: physical_location/dock=no\n
|
||||
A: physical_location/horizontal_position=left\n
|
||||
A: physical_location/lid=no\n
|
||||
A: physical_location/panel=top\n
|
||||
A: physical_location/vertical_position=upper\n
|
||||
L: port=../3-0:1.0/usb3-port2
|
||||
A: power/active_duration=894834\n
|
||||
A: power/autosuspend=2\n
|
||||
A: power/autosuspend_delay_ms=2000\n
|
||||
A: power/connected_duration=1647549\n
|
||||
A: power/control=auto\n
|
||||
A: power/level=auto\n
|
||||
A: power/persist=0\n
|
||||
A: power/runtime_active_time=894782\n
|
||||
A: power/runtime_status=active\n
|
||||
A: power/runtime_suspended_time=752529\n
|
||||
A: power/wakeup=disabled\n
|
||||
A: power/wakeup_abort_count=\n
|
||||
A: power/wakeup_active=\n
|
||||
A: power/wakeup_active_count=\n
|
||||
A: power/wakeup_count=\n
|
||||
A: power/wakeup_expire_count=\n
|
||||
A: power/wakeup_last_time_ms=\n
|
||||
A: power/wakeup_max_time_ms=\n
|
||||
A: power/wakeup_total_time_ms=\n
|
||||
A: product=Focaltech FT9365 ESS\n
|
||||
A: quirks=0x0\n
|
||||
A: removable=fixed\n
|
||||
A: rx_lanes=1\n
|
||||
A: serial=201801010001\n
|
||||
A: speed=12\n
|
||||
A: tx_lanes=1\n
|
||||
A: urbnum=917\n
|
||||
A: version= 2.01\n
|
||||
|
||||
P: /devices/pci0000:00/0000:00:14.0/usb3
|
||||
N: bus/usb/003/001=12010002090001406B1D020017060302010109021900010100E0000904000001090000000705810304000C
|
||||
E: BUSNUM=003
|
||||
E: CURRENT_TAGS=:seat:
|
||||
E: DEVNAME=/dev/bus/usb/003/001
|
||||
E: DEVNUM=001
|
||||
E: DEVTYPE=usb_device
|
||||
E: DRIVER=usb
|
||||
E: ID_AUTOSUSPEND=1
|
||||
E: ID_BUS=usb
|
||||
E: ID_FOR_SEAT=usb-pci-0000_00_14_0
|
||||
E: ID_MODEL=xHCI_Host_Controller
|
||||
E: ID_MODEL_ENC=xHCI\x20Host\x20Controller
|
||||
E: ID_MODEL_FROM_DATABASE=2.0 root hub
|
||||
E: ID_MODEL_ID=0002
|
||||
E: ID_PATH=pci-0000:00:14.0
|
||||
E: ID_PATH_TAG=pci-0000_00_14_0
|
||||
E: ID_REVISION=0617
|
||||
E: ID_SERIAL=Linux_6.17.9-arch1-1_xhci-hcd_xHCI_Host_Controller_0000:00:14.0
|
||||
E: ID_SERIAL_SHORT=0000:00:14.0
|
||||
E: ID_USB_INTERFACES=:090000:
|
||||
E: ID_USB_MODEL=xHCI_Host_Controller
|
||||
E: ID_USB_MODEL_ENC=xHCI\x20Host\x20Controller
|
||||
E: ID_USB_MODEL_ID=0002
|
||||
E: ID_USB_REVISION=0617
|
||||
E: ID_USB_SERIAL=Linux_6.17.9-arch1-1_xhci-hcd_xHCI_Host_Controller_0000:00:14.0
|
||||
E: ID_USB_SERIAL_SHORT=0000:00:14.0
|
||||
E: ID_USB_VENDOR=Linux_6.17.9-arch1-1_xhci-hcd
|
||||
E: ID_USB_VENDOR_ENC=Linux\x206.17.9-arch1-1\x20xhci-hcd
|
||||
E: ID_USB_VENDOR_ID=1d6b
|
||||
E: ID_VENDOR=Linux_6.17.9-arch1-1_xhci-hcd
|
||||
E: ID_VENDOR_ENC=Linux\x206.17.9-arch1-1\x20xhci-hcd
|
||||
E: ID_VENDOR_FROM_DATABASE=Linux Foundation
|
||||
E: ID_VENDOR_ID=1d6b
|
||||
E: MAJOR=189
|
||||
E: MINOR=256
|
||||
E: PRODUCT=1d6b/2/617
|
||||
E: SUBSYSTEM=usb
|
||||
E: TAGS=:seat:
|
||||
E: TYPE=9/0/1
|
||||
A: authorized=1\n
|
||||
A: authorized_default=1\n
|
||||
A: avoid_reset_quirk=0\n
|
||||
A: bConfigurationValue=1\n
|
||||
A: bDeviceClass=09\n
|
||||
A: bDeviceProtocol=01\n
|
||||
A: bDeviceSubClass=00\n
|
||||
A: bMaxPacketSize0=64\n
|
||||
A: bMaxPower=0mA\n
|
||||
A: bNumConfigurations=1\n
|
||||
A: bNumInterfaces= 1\n
|
||||
A: bcdDevice=0617\n
|
||||
A: bmAttributes=e0\n
|
||||
A: busnum=3\n
|
||||
A: configuration=
|
||||
H: descriptors=12010002090001406B1D020017060302010109021900010100E0000904000001090000000705810304000C
|
||||
A: dev=189:256\n
|
||||
A: devnum=1\n
|
||||
A: devpath=0\n
|
||||
L: driver=../../../../bus/usb/drivers/usb
|
||||
L: firmware_node=../../../LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:56/device:57
|
||||
A: idProduct=0002\n
|
||||
A: idVendor=1d6b\n
|
||||
A: interface_authorized_default=1\n
|
||||
A: ltm_capable=no\n
|
||||
A: manufacturer=Linux 6.17.9-arch1-1 xhci-hcd\n
|
||||
A: maxchild=12\n
|
||||
A: power/active_duration=903021\n
|
||||
A: power/autosuspend=0\n
|
||||
A: power/autosuspend_delay_ms=0\n
|
||||
A: power/connected_duration=1647681\n
|
||||
A: power/control=auto\n
|
||||
A: power/level=auto\n
|
||||
A: power/runtime_active_time=903018\n
|
||||
A: power/runtime_status=active\n
|
||||
A: power/runtime_suspended_time=744660\n
|
||||
A: power/wakeup=disabled\n
|
||||
A: power/wakeup_abort_count=\n
|
||||
A: power/wakeup_active=\n
|
||||
A: power/wakeup_active_count=\n
|
||||
A: power/wakeup_count=\n
|
||||
A: power/wakeup_expire_count=\n
|
||||
A: power/wakeup_last_time_ms=\n
|
||||
A: power/wakeup_max_time_ms=\n
|
||||
A: power/wakeup_total_time_ms=\n
|
||||
A: product=xHCI Host Controller\n
|
||||
A: quirks=0x0\n
|
||||
A: removable=unknown\n
|
||||
A: rx_lanes=1\n
|
||||
A: serial=0000:00:14.0\n
|
||||
A: speed=480\n
|
||||
A: tx_lanes=1\n
|
||||
A: urbnum=208\n
|
||||
A: version= 2.00\n
|
||||
|
||||
P: /devices/pci0000:00/0000:00:14.0
|
||||
E: DRIVER=xhci_hcd
|
||||
E: ID_AUTOSUSPEND=1
|
||||
E: ID_MODEL_FROM_DATABASE=Alder Lake PCH USB 3.2 xHCI Host Controller
|
||||
E: ID_PATH=pci-0000:00:14.0
|
||||
E: ID_PATH_TAG=pci-0000_00_14_0
|
||||
E: ID_PCI_CLASS_FROM_DATABASE=Serial bus controller
|
||||
E: ID_PCI_INTERFACE_FROM_DATABASE=XHCI
|
||||
E: ID_PCI_SUBCLASS_FROM_DATABASE=USB controller
|
||||
E: ID_VENDOR_FROM_DATABASE=Intel Corporation
|
||||
E: MODALIAS=pci:v00008086d000051EDsv0000144Dsd0000C1D9bc0Csc03i30
|
||||
E: PCI_CLASS=C0330
|
||||
E: PCI_ID=8086:51ED
|
||||
E: PCI_SLOT_NAME=0000:00:14.0
|
||||
E: PCI_SUBSYS_ID=144D:C1D9
|
||||
E: SUBSYSTEM=pci
|
||||
A: ari_enabled=0\n
|
||||
A: broken_parity_status=0\n
|
||||
A: class=0x0c0330\n
|
||||
H: config=8680ED51060490020130030C00008000040012016000000000000000000000000000000000000000000000004D14D9C1000000007000000000000000FF010000FD0134A089C27F8000000000000000003F6DD80F000000000000000000000000316000000000000000000000000000000180C2C10800000000000000000000000590B7001804E0FE000000000000000009B014F01000400100000000C10A080000080E00001800008F50020000010000090000018680C00009001014000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000B50F110112000000
|
||||
A: consistent_dma_mask_bits=64\n
|
||||
A: d3cold_allowed=1\n
|
||||
A: dbc=disabled\n
|
||||
A: dbc_bInterfaceProtocol=01\n
|
||||
A: dbc_bcdDevice=0010\n
|
||||
A: dbc_idProduct=0010\n
|
||||
A: dbc_idVendor=1d6b\n
|
||||
A: dbc_poll_interval_ms=64\n
|
||||
A: device=0x51ed\n
|
||||
A: dma_mask_bits=64\n
|
||||
L: driver=../../../bus/pci/drivers/xhci_hcd
|
||||
A: driver_override=(null)\n
|
||||
A: enable=1\n
|
||||
L: firmware_node=../../LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:56
|
||||
A: index=5\n
|
||||
A: irq=131\n
|
||||
A: label=Onboard - Other\n
|
||||
A: local_cpulist=0-11\n
|
||||
A: local_cpus=fff\n
|
||||
A: modalias=pci:v00008086d000051EDsv0000144Dsd0000C1D9bc0Csc03i30\n
|
||||
A: msi_bus=1\n
|
||||
A: msi_irqs/131=msi\n
|
||||
A: msi_irqs/132=msi\n
|
||||
A: msi_irqs/133=msi\n
|
||||
A: msi_irqs/134=msi\n
|
||||
A: msi_irqs/135=msi\n
|
||||
A: msi_irqs/136=msi\n
|
||||
A: msi_irqs/137=msi\n
|
||||
A: msi_irqs/138=msi\n
|
||||
A: numa_node=-1\n
|
||||
A: pools=poolinfo - 0.1\nbuffer-2048 0 0 2048 0\nbuffer-512 0 0 512 0\nbuffer-128 0 0 128 0\nbuffer-32 0 0 32 0\nxHCI 256 port bw ctx arrays 0 0 256 0\nxHCI 1KB stream ctx arrays 0 0 1024 0\nxHCI 256 byte stream ctx arrays 0 0 256 0\nxHCI input/output contexts 8 9 2112 9\nxHCI ring segments 33 33 4096 33\nbuffer-2048 0 0 2048 0\nbuffer-512 0 0 512 0\nbuffer-128 0 0 128 0\nbuffer-32 0 0 32 0\n
|
||||
A: power/control=auto\n
|
||||
A: power/runtime_active_time=921162\n
|
||||
A: power/runtime_status=active\n
|
||||
A: power/runtime_suspended_time=744560\n
|
||||
A: power/wakeup=enabled\n
|
||||
A: power/wakeup_abort_count=0\n
|
||||
A: power/wakeup_active=0\n
|
||||
A: power/wakeup_active_count=0\n
|
||||
A: power/wakeup_count=0\n
|
||||
A: power/wakeup_expire_count=0\n
|
||||
A: power/wakeup_last_time_ms=0\n
|
||||
A: power/wakeup_max_time_ms=0\n
|
||||
A: power/wakeup_total_time_ms=0\n
|
||||
A: power_state=D0\n
|
||||
A: resource=0x0000006001120000 0x000000600112ffff 0x0000000000140204\n0x0000000000000000 0x0000000000000000 0x0000000000000000\n0x0000000000000000 0x0000000000000000 0x0000000000000000\n0x0000000000000000 0x0000000000000000 0x0000000000000000\n0x0000000000000000 0x0000000000000000 0x0000000000000000\n0x0000000000000000 0x0000000000000000 0x0000000000000000\n0x0000000000000000 0x0000000000000000 0x0000000000000000\n0x0000000000000000 0x0000000000000000 0x0000000000000000\n0x0000000000000000 0x0000000000000000 0x0000000000000000\n0x0000000000000000 0x0000000000000000 0x0000000000000000\n0x0000000000000000 0x0000000000000000 0x0000000000000000\n0x0000000000000000 0x0000000000000000 0x0000000000000000\n0x0000000000000000 0x0000000000000000 0x0000000000000000\n
|
||||
A: revision=0x01\n
|
||||
A: subsystem_device=0xc1d9\n
|
||||
A: subsystem_vendor=0x144d\n
|
||||
A: vendor=0x8086\n
|
||||
|
||||
|
|
@ -59,6 +59,7 @@ drivers_tests = [
|
|||
'realtek',
|
||||
'realtek-5816',
|
||||
'focaltech_moc',
|
||||
'focaltech_moc-6553',
|
||||
]
|
||||
|
||||
if get_option('introspection')
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue