lib: add AES2660 driver
https://bugs.freedesktop.org/show_bug.cgi?id=57426
This commit is contained in:
parent
313bfede77
commit
118c610e29
7 changed files with 2112 additions and 1 deletions
15
configure.ac
15
configure.ac
|
@ -23,7 +23,7 @@ AC_SUBST(lt_major)
|
||||||
AC_SUBST(lt_revision)
|
AC_SUBST(lt_revision)
|
||||||
AC_SUBST(lt_age)
|
AC_SUBST(lt_age)
|
||||||
|
|
||||||
all_drivers="upeke2 upekts upektc upeksonly vcom5s uru4000 fdu2000 aes1610 aes1660 aes2501 aes2550 aes4000 vfs101 vfs301"
|
all_drivers="upeke2 upekts upektc upeksonly vcom5s uru4000 fdu2000 aes1610 aes1660 aes2501 aes2550 aes2660 aes4000 vfs101 vfs301"
|
||||||
|
|
||||||
require_imaging='no'
|
require_imaging='no'
|
||||||
require_aeslib='no'
|
require_aeslib='no'
|
||||||
|
@ -38,6 +38,7 @@ enable_aes1610='no'
|
||||||
enable_aes1660='no'
|
enable_aes1660='no'
|
||||||
enable_aes2501='no'
|
enable_aes2501='no'
|
||||||
enable_aes2550='no'
|
enable_aes2550='no'
|
||||||
|
enable_aes2660='no'
|
||||||
enable_aes4000='no'
|
enable_aes4000='no'
|
||||||
enable_vfs101='no'
|
enable_vfs101='no'
|
||||||
enable_vfs301='no'
|
enable_vfs301='no'
|
||||||
|
@ -99,6 +100,12 @@ for driver in `echo ${drivers} | sed -e 's/,/ /g' -e 's/,$//g'`; do
|
||||||
require_aesX660="yes"
|
require_aesX660="yes"
|
||||||
enable_aes1660="yes"
|
enable_aes1660="yes"
|
||||||
;;
|
;;
|
||||||
|
aes2660)
|
||||||
|
AC_DEFINE([ENABLE_AES2660], [], [Build AuthenTec AES1660 driver])
|
||||||
|
require_aeslib="yes"
|
||||||
|
require_aesX660="yes"
|
||||||
|
enable_aes2660="yes"
|
||||||
|
;;
|
||||||
aes4000)
|
aes4000)
|
||||||
AC_DEFINE([ENABLE_AES4000], [], [Build AuthenTec AES4000 driver])
|
AC_DEFINE([ENABLE_AES4000], [], [Build AuthenTec AES4000 driver])
|
||||||
require_aeslib="yes"
|
require_aeslib="yes"
|
||||||
|
@ -127,6 +134,7 @@ AM_CONDITIONAL([ENABLE_AES1610], [test "$enable_aes1610" = "yes"])
|
||||||
AM_CONDITIONAL([ENABLE_AES1660], [test "$enable_aes1660" = "yes"])
|
AM_CONDITIONAL([ENABLE_AES1660], [test "$enable_aes1660" = "yes"])
|
||||||
AM_CONDITIONAL([ENABLE_AES2501], [test "$enable_aes2501" = "yes"])
|
AM_CONDITIONAL([ENABLE_AES2501], [test "$enable_aes2501" = "yes"])
|
||||||
AM_CONDITIONAL([ENABLE_AES2550], [test "$enable_aes2550" = "yes"])
|
AM_CONDITIONAL([ENABLE_AES2550], [test "$enable_aes2550" = "yes"])
|
||||||
|
AM_CONDITIONAL([ENABLE_AES2660], [test "$enable_aes2660" = "yes"])
|
||||||
AM_CONDITIONAL([ENABLE_AES4000], [test "$enable_aes4000" = "yes"])
|
AM_CONDITIONAL([ENABLE_AES4000], [test "$enable_aes4000" = "yes"])
|
||||||
AM_CONDITIONAL([REQUIRE_AESLIB], [test "$require_aeslib" = "yes"])
|
AM_CONDITIONAL([REQUIRE_AESLIB], [test "$require_aeslib" = "yes"])
|
||||||
AM_CONDITIONAL([REQUIRE_AESX660], [test "$require_aesX660" = "yes"])
|
AM_CONDITIONAL([REQUIRE_AESX660], [test "$require_aesX660" = "yes"])
|
||||||
|
@ -319,6 +327,11 @@ if test x$enable_aes2550 != xno ; then
|
||||||
else
|
else
|
||||||
AC_MSG_NOTICE([ aes2550/aes2810 driver disabled])
|
AC_MSG_NOTICE([ aes2550/aes2810 driver disabled])
|
||||||
fi
|
fi
|
||||||
|
if test x$enable_aes2660 != xno ; then
|
||||||
|
AC_MSG_NOTICE([** aes2660 driver enabled])
|
||||||
|
else
|
||||||
|
AC_MSG_NOTICE([ aes2660 driver disabled])
|
||||||
|
fi
|
||||||
if test x$enable_aes4000 != xno ; then
|
if test x$enable_aes4000 != xno ; then
|
||||||
AC_MSG_NOTICE([** aes4000 driver enabled])
|
AC_MSG_NOTICE([** aes4000 driver enabled])
|
||||||
else
|
else
|
||||||
|
|
|
@ -11,6 +11,7 @@ AES1610_SRC = drivers/aes1610.c
|
||||||
AES1660_SRC = drivers/aes1660.c drivers/aes1660.h
|
AES1660_SRC = drivers/aes1660.c drivers/aes1660.h
|
||||||
AES2501_SRC = drivers/aes2501.c drivers/aes2501.h
|
AES2501_SRC = drivers/aes2501.c drivers/aes2501.h
|
||||||
AES2550_SRC = drivers/aes2550.c drivers/aes2550.h
|
AES2550_SRC = drivers/aes2550.c drivers/aes2550.h
|
||||||
|
AES2660_SRC = drivers/aes2660.c drivers/aes2660.h
|
||||||
AES4000_SRC = drivers/aes4000.c
|
AES4000_SRC = drivers/aes4000.c
|
||||||
FDU2000_SRC = drivers/fdu2000.c
|
FDU2000_SRC = drivers/fdu2000.c
|
||||||
VCOM5S_SRC = drivers/vcom5s.c
|
VCOM5S_SRC = drivers/vcom5s.c
|
||||||
|
@ -27,6 +28,7 @@ EXTRA_DIST = \
|
||||||
$(AES1660_SRC) \
|
$(AES1660_SRC) \
|
||||||
$(AES2501_SRC) \
|
$(AES2501_SRC) \
|
||||||
$(AES2550_SRC) \
|
$(AES2550_SRC) \
|
||||||
|
$(AES2660_SRC) \
|
||||||
$(AES4000_SRC) \
|
$(AES4000_SRC) \
|
||||||
$(FDU2000_SRC) \
|
$(FDU2000_SRC) \
|
||||||
$(VCOM5S_SRC) \
|
$(VCOM5S_SRC) \
|
||||||
|
@ -137,6 +139,10 @@ if ENABLE_AES2550
|
||||||
DRIVER_SRC += $(AES2550_SRC)
|
DRIVER_SRC += $(AES2550_SRC)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
if ENABLE_AES2660
|
||||||
|
DRIVER_SRC += $(AES2660_SRC)
|
||||||
|
endif
|
||||||
|
|
||||||
if ENABLE_AES4000
|
if ENABLE_AES4000
|
||||||
DRIVER_SRC += $(AES4000_SRC)
|
DRIVER_SRC += $(AES4000_SRC)
|
||||||
endif
|
endif
|
||||||
|
|
|
@ -374,6 +374,9 @@ static struct fp_img_driver * const img_drivers[] = {
|
||||||
#ifdef ENABLE_AES1660
|
#ifdef ENABLE_AES1660
|
||||||
&aes1660_driver,
|
&aes1660_driver,
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef ENABLE_AES2660
|
||||||
|
&aes2660_driver,
|
||||||
|
#endif
|
||||||
#ifdef ENABLE_VFS101
|
#ifdef ENABLE_VFS101
|
||||||
&vfs101_driver,
|
&vfs101_driver,
|
||||||
#endif
|
#endif
|
||||||
|
|
121
libfprint/drivers/aes2660.c
Normal file
121
libfprint/drivers/aes2660.c
Normal file
|
@ -0,0 +1,121 @@
|
||||||
|
/*
|
||||||
|
* AuthenTec AES2660 driver for libfprint
|
||||||
|
* Copyright (C) 2012 Vasily Khoruzhick
|
||||||
|
*
|
||||||
|
* 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 "aes2660"
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
#include <errno.h>
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
|
#include <libusb.h>
|
||||||
|
|
||||||
|
#include <fp_internal.h>
|
||||||
|
|
||||||
|
#include "aesx660.h"
|
||||||
|
#include "aes2660.h"
|
||||||
|
#include "driver_ids.h"
|
||||||
|
|
||||||
|
#define FRAME_WIDTH 192
|
||||||
|
|
||||||
|
static int dev_init(struct fp_img_dev *dev, unsigned long driver_data)
|
||||||
|
{
|
||||||
|
/* TODO check that device has endpoints we're using */
|
||||||
|
int r;
|
||||||
|
struct aesX660_dev *aesdev;
|
||||||
|
|
||||||
|
r = libusb_claim_interface(dev->udev, 0);
|
||||||
|
if (r < 0) {
|
||||||
|
fp_err("could not claim interface 0");
|
||||||
|
return r;
|
||||||
|
}
|
||||||
|
|
||||||
|
dev->priv = aesdev = g_malloc0(sizeof(struct aesX660_dev));
|
||||||
|
if (!aesdev)
|
||||||
|
return -ENOMEM;
|
||||||
|
|
||||||
|
aesdev->buffer = g_malloc0(AES2660_FRAME_SIZE + AESX660_HEADER_SIZE);
|
||||||
|
if (!aesdev->buffer) {
|
||||||
|
g_free(aesdev);
|
||||||
|
dev->priv = NULL;
|
||||||
|
return -ENOMEM;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* No scaling for AES2660 */
|
||||||
|
aesdev->h_scale_factor = 1;
|
||||||
|
aesdev->init_seqs[0] = aes2660_init_1;
|
||||||
|
aesdev->init_seqs_len[0] = array_n_elements(aes2660_init_1);
|
||||||
|
aesdev->init_seqs[1] = aes2660_init_2;
|
||||||
|
aesdev->init_seqs_len[1] = array_n_elements(aes2660_init_2);
|
||||||
|
aesdev->start_imaging_cmd = (unsigned char *)aes2660_start_imaging_cmd;
|
||||||
|
aesdev->start_imaging_cmd_len = sizeof(aes2660_start_imaging_cmd);
|
||||||
|
aesdev->frame_width = FRAME_WIDTH;
|
||||||
|
|
||||||
|
fpi_imgdev_open_complete(dev, 0);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void dev_deinit(struct fp_img_dev *dev)
|
||||||
|
{
|
||||||
|
struct aesX660_dev *aesdev = dev->priv;
|
||||||
|
g_free(aesdev->buffer);
|
||||||
|
g_free(aesdev);
|
||||||
|
libusb_release_interface(dev->udev, 0);
|
||||||
|
fpi_imgdev_close_complete(dev);
|
||||||
|
}
|
||||||
|
|
||||||
|
static const struct usb_id id_table[] = {
|
||||||
|
{ .vendor = 0x08ff, .product = 0x2660 },
|
||||||
|
{ .vendor = 0x08ff, .product = 0x2680 },
|
||||||
|
{ .vendor = 0x08ff, .product = 0x2681 },
|
||||||
|
{ .vendor = 0x08ff, .product = 0x2682 },
|
||||||
|
{ .vendor = 0x08ff, .product = 0x2683 },
|
||||||
|
{ .vendor = 0x08ff, .product = 0x2684 },
|
||||||
|
{ .vendor = 0x08ff, .product = 0x2685 },
|
||||||
|
{ .vendor = 0x08ff, .product = 0x2686 },
|
||||||
|
{ .vendor = 0x08ff, .product = 0x2687 },
|
||||||
|
{ .vendor = 0x08ff, .product = 0x2688 },
|
||||||
|
{ .vendor = 0x08ff, .product = 0x2689 },
|
||||||
|
{ .vendor = 0x08ff, .product = 0x268a },
|
||||||
|
{ .vendor = 0x08ff, .product = 0x268b },
|
||||||
|
{ .vendor = 0x08ff, .product = 0x268c },
|
||||||
|
{ .vendor = 0x08ff, .product = 0x268d },
|
||||||
|
{ .vendor = 0x08ff, .product = 0x268e },
|
||||||
|
{ .vendor = 0x08ff, .product = 0x268f },
|
||||||
|
{ .vendor = 0x08ff, .product = 0x2691 },
|
||||||
|
{ 0, 0, 0, },
|
||||||
|
};
|
||||||
|
|
||||||
|
struct fp_img_driver aes2660_driver = {
|
||||||
|
.driver = {
|
||||||
|
.id = AES2660_ID,
|
||||||
|
.name = FP_COMPONENT,
|
||||||
|
.full_name = "AuthenTec AES2660",
|
||||||
|
.id_table = id_table,
|
||||||
|
.scan_type = FP_SCAN_TYPE_SWIPE,
|
||||||
|
},
|
||||||
|
.flags = 0,
|
||||||
|
.img_height = -1,
|
||||||
|
.img_width = FRAME_WIDTH,
|
||||||
|
|
||||||
|
.open = dev_init,
|
||||||
|
.close = dev_deinit,
|
||||||
|
.activate = aesX660_dev_activate,
|
||||||
|
.deactivate = aesX660_dev_deactivate,
|
||||||
|
};
|
1964
libfprint/drivers/aes2660.h
Normal file
1964
libfprint/drivers/aes2660.h
Normal file
File diff suppressed because it is too large
Load diff
|
@ -35,6 +35,7 @@ enum {
|
||||||
AES2550_ID = 12,
|
AES2550_ID = 12,
|
||||||
UPEKE2_ID = 13,
|
UPEKE2_ID = 13,
|
||||||
AES1660_ID = 14,
|
AES1660_ID = 14,
|
||||||
|
AES2660_ID = 15,
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -264,6 +264,9 @@ extern struct fp_img_driver aes2501_driver;
|
||||||
#ifdef ENABLE_AES2550
|
#ifdef ENABLE_AES2550
|
||||||
extern struct fp_img_driver aes2550_driver;
|
extern struct fp_img_driver aes2550_driver;
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef ENABLE_AES2660
|
||||||
|
extern struct fp_img_driver aes2660_driver;
|
||||||
|
#endif
|
||||||
#ifdef ENABLE_AES4000
|
#ifdef ENABLE_AES4000
|
||||||
extern struct fp_img_driver aes4000_driver;
|
extern struct fp_img_driver aes4000_driver;
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue