kopia lustrzana https://gitlab.com/sane-project/backends
backend/avision: i1120: add option AV_FASTFEED_ON_CANCEL
Some scanners like i1120 support fast feed-out of the sheet when cancelling a running scan. Add a new option for this release type. Signed-off-by: Michael Niewöhner <foss@mniewoehner.de>merge-requests/501/head
rodzic
8b467b248e
commit
de19ebc61a
|
@ -901,7 +901,8 @@ static Avision_HWEntry Avision_Device_List [] =
|
|||
{ NULL, NULL,
|
||||
0x040a, 0x6013,
|
||||
"Kodak", "i1120",
|
||||
AV_INT_BUTTON | AV_2ND_LINE_INTERLACED | AV_USE_GRAY_FILTER | AV_SOFT_SCALE | AV_FORCE_CALIB | AV_NO_QSCAN_MODE | AV_OVERSCAN_OPTDPI | AV_NO_REAR },
|
||||
AV_INT_BUTTON | AV_2ND_LINE_INTERLACED | AV_USE_GRAY_FILTER | AV_SOFT_SCALE |
|
||||
AV_FORCE_CALIB | AV_NO_QSCAN_MODE | AV_OVERSCAN_OPTDPI | AV_NO_REAR | AV_FASTFEED_ON_CANCEL },
|
||||
/* comment="duplex sheetfed scanner" */
|
||||
/* status="basic" */
|
||||
/* This is a Kodak OEM device manufactured by avision.
|
||||
|
@ -6238,6 +6239,8 @@ do_eof (Avision_Scanner *s)
|
|||
static SANE_Status
|
||||
do_cancel (Avision_Scanner* s)
|
||||
{
|
||||
int status, release_type = 0;
|
||||
|
||||
DBG (3, "do_cancel:\n");
|
||||
|
||||
s->prepared = s->scanning = SANE_FALSE;
|
||||
|
@ -6259,6 +6262,12 @@ do_cancel (Avision_Scanner* s)
|
|||
sanei_thread_invalidate (s->reader_pid);
|
||||
}
|
||||
|
||||
if (s->hw->hw->feature_type & AV_FASTFEED_ON_CANCEL)
|
||||
release_type = 1;
|
||||
status = release_unit (s, release_type);
|
||||
if (status != SANE_STATUS_GOOD)
|
||||
DBG (1, "do_cancel: release_unit failed\n");
|
||||
|
||||
return SANE_STATUS_CANCELLED;
|
||||
}
|
||||
|
||||
|
|
|
@ -213,6 +213,9 @@ typedef struct Avision_HWEntry {
|
|||
/* at least Kodak i1120 optical DPI is used for overscan calculation */
|
||||
#define AV_OVERSCAN_OPTDPI ((uint64_t)1<<38)
|
||||
|
||||
/* some scanners support fast feed-out of the sheet when cancelling a running scan */
|
||||
#define AV_FASTFEED_ON_CANCEL ((uint64_t)1<<39)
|
||||
|
||||
/* maybe more ...*/
|
||||
uint64_t feature_type;
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue