kopia lustrzana https://gitlab.com/sane-project/backends
backend/avision: i1120: Add option AV_MULTI_SHEET_SCAN
Kodak i1120 has single-sheet and multi-sheet scan modes. This option sets bitset3[7] which enables multi-sheet scan by default so there is no pause of 1s between two sheets in ADF scan mode. This also fixes some offsets when scanning multiple sheets. Signed-off-by: Michael Niewöhner <foss@mniewoehner.de>merge-requests/244/head
rodzic
e54c9602e9
commit
b4716f6264
|
@ -903,7 +903,7 @@ static Avision_HWEntry Avision_Device_List [] =
|
|||
"Kodak", "i1120",
|
||||
AV_INT_BUTTON | AV_2ND_LINE_INTERLACED | AV_USE_GRAY_FILTER | AV_SOFT_SCALE |
|
||||
AV_FORCE_CALIB | AV_NO_QSCAN_MODE | AV_NO_QCALIB_MODE | AV_OVERSCAN_OPTDPI |
|
||||
AV_NO_REAR | AV_FASTFEED_ON_CANCEL | AV_GAMMA_10 },
|
||||
AV_NO_REAR | AV_FASTFEED_ON_CANCEL | AV_GAMMA_10 | AV_MULTI_SHEET_SCAN },
|
||||
/* comment="duplex sheetfed scanner" */
|
||||
/* status="basic" */
|
||||
/* This is a Kodak OEM device manufactured by avision.
|
||||
|
@ -5632,8 +5632,10 @@ set_window (Avision_Scanner* s)
|
|||
paralen += sizeof (cmd.window.avision.type.fujitsu);
|
||||
else if (!dev->inquiry_new_protocol)
|
||||
paralen += sizeof (cmd.window.avision.type.old);
|
||||
else
|
||||
else if (dev->hw->feature_type & AV_MULTI_SHEET_SCAN)
|
||||
paralen += sizeof (cmd.window.avision.type.normal);
|
||||
else
|
||||
paralen += sizeof (cmd.window.avision.type.normal) - 1;
|
||||
|
||||
DBG (2, "set_window: final paralen: %d\n", paralen);
|
||||
|
||||
|
@ -5702,6 +5704,13 @@ set_window (Avision_Scanner* s)
|
|||
DBG (3, "set_window: filling ADF bits\n");
|
||||
SET_BIT (cmd.window.avision.bitset1, 7);
|
||||
|
||||
if (dev->hw->feature_type & AV_MULTI_SHEET_SCAN) {
|
||||
/* Always set bit 7 to enable single_sheet_scan option (defaults to off).
|
||||
This removes the 1s pause between two sheets and fixes some offsets. */
|
||||
SET_BIT(cmd.window.avision.type.normal.bitset3, 7);
|
||||
cmd.window.avision.type.normal.single_sheet_scan = 0;
|
||||
}
|
||||
|
||||
/* normal, interlaced duplex scanners */
|
||||
if (dev->inquiry_duplex_interlaced) {
|
||||
DBG (3, "set_window: interlaced duplex type\n");
|
||||
|
|
|
@ -225,6 +225,12 @@ typedef struct Avision_HWEntry {
|
|||
/* Kodak i1120 has a different gamma table format (like a uint16/double array) */
|
||||
#define AV_GAMMA_UINT16 ((uint64_t)1<<42)
|
||||
|
||||
/* Kodak i1120 has single-sheet and multi-sheet scan modes. This option sets
|
||||
bitset3[7] which enables multi-sheet scan by default so there is no pause
|
||||
of 1s between two sheets in ADF scan mode. This also fixes some offsets
|
||||
when scanning multiple sheets. */
|
||||
#define AV_MULTI_SHEET_SCAN ((uint64_t)1<<43)
|
||||
|
||||
/* maybe more ...*/
|
||||
uint64_t feature_type;
|
||||
|
||||
|
@ -691,6 +697,8 @@ typedef struct command_set_window_window
|
|||
uint8_t line_width_msb;
|
||||
uint8_t line_count_msb;
|
||||
uint8_t background_lines;
|
||||
|
||||
uint8_t single_sheet_scan; /* from Kodak SVT tool */
|
||||
} normal;
|
||||
|
||||
struct {
|
||||
|
|
Ładowanie…
Reference in New Issue