kopia lustrzana https://gitlab.com/sane-project/backends
2000-11-26 Henning Meier-Geinitz <hmg@gmx.de>
* AUTHORS: Added Karsten Festag as maintainer of microtek2. * backend/mustek.* doc/sane-mustek.man: Update to Mustek backend 1.0-100. Added option fast-preview that tries to use the fastest mode available for preview. This is supported for the 3-pass scanners (was option "preview in gray") and some of the ScanExpress scanners (6000 SP, 12000 SP Plus). Use #include "../include/sane/...". Put option force-wait into mustek.conf (disabled). Removed block mode for Paragon 6000 SP and 8000 SP. Code cleanup. More debug output. Details in backend/mustek.CHANGES. * doc/.cvsignore: Added sane-as6e.5 and sane-nec.5.DEVEL_2_0_BRANCH-1
rodzic
2ba681f320
commit
e3b1b06b2b
3
AUTHORS
3
AUTHORS
|
@ -25,7 +25,7 @@ Backends:
|
|||
Geoffrey Dairiki
|
||||
m3096g: Randolph Bentson (*)
|
||||
microtek: Matthew Marjanovic (*)
|
||||
microtek2: Bernd Schroeder (*)
|
||||
microtek2: Bernd Schroeder, Karsten Festag (*)
|
||||
mustek: Andreas Bolsch, David Mosberger, Andreas Czechanowski and
|
||||
Henning Meier-Geinitz (*)
|
||||
mustek_pp: Jochen Eisinger (*)
|
||||
|
@ -96,6 +96,7 @@ Jeff Freedman <jsf@hevanet.com>
|
|||
Jochen Eisinger <jochen.eisinger@gmx.net>
|
||||
Karl Anders Øygard <karlo@opera.no>
|
||||
Karl Heinz Kremer <khk@khk.net>
|
||||
Karsten Festag <karsten.festag@t-online.de>
|
||||
Kazuhiro Sasayama <kaz@hypercore.co.jp>
|
||||
Kevin Charter <charter@cs.rice.edu>
|
||||
Manuel Panea <Manuel.Panea@rzg.mpg.de>
|
||||
|
|
|
@ -1,5 +1,45 @@
|
|||
CHANGES for the SANE Mustek backend
|
||||
|
||||
2000-11-26
|
||||
* Default for "fast preview" is "false" now because this option doesn't work
|
||||
for all SE scanners correctly.
|
||||
* Added more debug output for area_and_windows.
|
||||
* Added more debug output for set_window.
|
||||
* Set minimum tly for 8000SP to 0.
|
||||
* Don't use block mode for Paragon 8000 SP scanners because this breaks
|
||||
color mode with firmware 2.x.
|
||||
|
||||
2000-11-19
|
||||
* Paragon 6000 SP doesn't use block mode any more. It's a bit faster now.
|
||||
* Updated sane-mustek.man concerning buffersize and blocksite.
|
||||
|
||||
2000-11-17
|
||||
* Updated manpage concerning force-wait. Some minor corrections and additions
|
||||
* Added option force-wait to mustek.conf and did some minor changes.
|
||||
|
||||
2000-11-16
|
||||
* With option force_wait set, the backend waits also before sending the
|
||||
inquiry command. This seems to be necessary for the 600 II N.
|
||||
|
||||
2000-11-12
|
||||
* Use SANE_Int, SANE_Bool, SANE_Word for int wherever this seems to
|
||||
be appropriate.
|
||||
* Move macros to mustek.h.
|
||||
* Code cleanup.
|
||||
|
||||
2000-11-11
|
||||
* OPT_GRAY_PREVIEW is now called OPT_FAST_PREVIEW.
|
||||
* For SE scanners use 36/38 dpi color for fast preview.
|
||||
* use include "../include/sane/" instead of "sane/"
|
||||
* go back to old scheme for SE scanners in color mode (faster scans
|
||||
couldn't be reproduced)
|
||||
|
||||
2000-11-10
|
||||
* added more debug output in constrain_value
|
||||
|
||||
2000-11-05
|
||||
* Released backend version 1.0-98.
|
||||
|
||||
2000-11-05
|
||||
* Added support for TAIV for SE 12000 SP. Lamp is turned off while
|
||||
scanning (seems to work for firmware >= 2.00)
|
||||
|
|
|
@ -1,7 +1,10 @@
|
|||
# See sane-mustek(5) for documentation.
|
||||
|
||||
#--------------------------- Global options ---------------------------------
|
||||
option strip-height 1 # some SCSI adapters need this; scanning may
|
||||
# be faster without this option
|
||||
#option force-wait # wait for scanner to be ready (only necessary
|
||||
# when scanner freezes)
|
||||
|
||||
#-------------------------- SCSI scanners -----------------------------------
|
||||
scsi MUSTEK * Scanner
|
||||
|
@ -22,9 +25,8 @@ scsi SCANNER
|
|||
# option blocksize 2048 # set non standard block size (in kb)
|
||||
option lineart-fix # lineart may be faster with this option off.
|
||||
|
||||
|
||||
#-------------------------- 600 II N ----------------------------------------
|
||||
#0x2eb
|
||||
# For the 600 II N try one of 0x26b, 0x2ab,
|
||||
# 0x2eb, 0x22b, 0x32b, 0x36b, 0x3ab, 0x3eb.
|
||||
# option linedistance-fix # only neccessary with firmware 2.00
|
||||
# option linedistance-fix # only neccessary with firmware 2.x
|
||||
|
|
|
@ -9,38 +9,71 @@
|
|||
;
|
||||
|
||||
:backend "mustek" ; name of backend
|
||||
:version "0.73" ; version of backend
|
||||
:version "1.0-100" ; version of backend
|
||||
:status :beta ; :alpha, :beta, :stable, :new
|
||||
:manpage "sane-mustek" ; name of manpage (if it exists)
|
||||
:url "http://hmg.home.pages.de/sane/"
|
||||
|
||||
:devicetype :scanner
|
||||
|
||||
:mfg "Mustek" ; name a manufacturer
|
||||
:url "http://www.mustek.com/"
|
||||
:model "MFC-600S" ; name models for above-specified mfg.
|
||||
:comment "1 pass; (f/w >= 1.01; scsi id MFC-06000CZ)"
|
||||
:model "MFC-600CD" ; name models for above-specified mfg.
|
||||
:comment "1 pass; (f/w >= 2.03; scsi id MFC-06000CZ)"
|
||||
:model "MFS-6000CX"
|
||||
:comment "3 pass; (f/w >= 2.71; scsi id MSF-06000CX)"
|
||||
:model "MSF-6000SP"
|
||||
:comment "1 pass; (f/w >= 3.12; scsi id MSF-06000SP)"
|
||||
:model "MFS-8000SP"
|
||||
:comment "1 pass; (f/w >= 2.05; scsi id MSF-08000SP) lineart drops lines?"
|
||||
:model "MFC-800S"
|
||||
:comment "1 pass; (f/w == 1.06; scsi id MFC-08000CZ) color fails?"
|
||||
:model "MFS-1200SP"
|
||||
:comment "1 pass; (f/w == 1.00; scsi id MSF-12000SP)"
|
||||
:model "MFS-1200SP"
|
||||
:comment "1 pass; (f/w == 1.07; scsi id MFS-12000SP)"
|
||||
:model "MFS-1200SP"
|
||||
:comment "1 pass; (f/w == 1.02; scsi id MFS-12000SP) color fails?"
|
||||
:model "MFS-12000CX"
|
||||
:comment "3 pass; (f/w == 2.71; scsi id MFS-12000CX)"
|
||||
:model "SE-6000SP"
|
||||
:comment "1 pass; (f/w == ? ; scsi id C03 S10IDW)"
|
||||
:model "SE-12000SP"
|
||||
:comment "1 pass; (f/w == 1.01; scsi id C06 S12IDW)"
|
||||
|
||||
:model "Paragon MFS-6000CX"
|
||||
:interface "SCSI"
|
||||
:comment "3-pass"
|
||||
:model "Paragon MFS-12000CX"
|
||||
:interface "SCSI"
|
||||
:comment "3-pass"
|
||||
:model "Paragon MFC-600S"
|
||||
:interface "SCSI"
|
||||
:model "Paragon 600 II CD"
|
||||
:interface "SCSI"
|
||||
:model "ScanMagic 600 II SP"
|
||||
:interface "SCSI"
|
||||
:model "Paragon MFC-800S"
|
||||
:interface "SCSI"
|
||||
:model "Paragon 800 II SP"
|
||||
:interface "SCSI"
|
||||
:model "Paragon MFS-6000SP"
|
||||
:interface "SCSI"
|
||||
:model "Paragon MFS-8000SP"
|
||||
:interface "SCSI"
|
||||
:model "Paragon MFS-1200SP"
|
||||
:interface "SCSI"
|
||||
:model "Paragon MFS-12000SP"
|
||||
:interface "SCSI"
|
||||
:model "ScanExpress 6000SP"
|
||||
:interface "SCSI"
|
||||
:model "ScanExpress 12000SP"
|
||||
:interface "SCSI"
|
||||
:model "ScanExpress 12000SP Plus"
|
||||
:interface "SCSI"
|
||||
:model "Paragon 1200 III SP"
|
||||
:interface "SCSI"
|
||||
:model "ScanMagic 9636S"
|
||||
:interface "SCSI"
|
||||
:model "ScanMagic 9636S Plus"
|
||||
:interface "SCSI"
|
||||
:model "ScanExpress A3 SP"
|
||||
:interface "SCSI"
|
||||
:comment "Please test!"
|
||||
:model "Paragon 1200 SP Pro"
|
||||
:interface "SCSI"
|
||||
:comment "Please test!"
|
||||
:model "Paragon 1200 A3 Pro"
|
||||
:interface "SCSI"
|
||||
:comment "Please test!"
|
||||
:model "Paragon 600 II N"
|
||||
:interface "Proprietary"
|
||||
:mfg "Trust" ; name a manufacturer
|
||||
:url "http://www.trust-site.com"
|
||||
:model "Imagery 1200 SP"
|
||||
:interface "SCSI"
|
||||
:model "Imagery 4800 SP"
|
||||
:interface "SCSI"
|
||||
:model "SCSI Connect 19200"
|
||||
:interface "SCSI"
|
||||
|
||||
; :comment and :url specifiers are optional after :mfg, :model, :desc,
|
||||
; and at the top-level.
|
||||
|
|
205
backend/mustek.h
205
backend/mustek.h
|
@ -1,6 +1,7 @@
|
|||
/* sane - Scanner Access Now Easy.
|
||||
Copyright (C) 1996, 1997 David Mosberger-Tang, 1998 Andreas Bolsch for
|
||||
extension to ScanExpress models version 0.5
|
||||
extension to ScanExpress models version 0.5,
|
||||
2000 Henning Meier-Geinitz
|
||||
This file is part of the SANE package.
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
|
@ -37,36 +38,120 @@
|
|||
|
||||
If you write modifications of your own for SANE, it is your choice
|
||||
whether to permit this exception to apply to your modifications.
|
||||
If you do not wish that, delete this exception notice. */
|
||||
If you do not wish that, delete this exception notice.
|
||||
|
||||
This file implements a SANE backend for Mustek and some Trust flatbed
|
||||
scanners with SCSI or proprietary interface. */
|
||||
|
||||
#ifndef mustek_h
|
||||
#define mustek_h
|
||||
|
||||
#include "../include/sane/config.h"
|
||||
#include <sys/types.h>
|
||||
|
||||
/* flag values: */
|
||||
#define MUSTEK_FLAG_SINGLE_PASS (1 << 0) /* single-pass scanner? */
|
||||
#define MUSTEK_FLAG_ADF (1 << 1) /* automatic document feeder */
|
||||
#define MUSTEK_FLAG_ADF_READY (1 << 2) /* paper present */
|
||||
#define MUSTEK_FLAG_TA (1 << 3) /* transparency adapter */
|
||||
#define MUSTEK_FLAG_USE_EIGHTS (1 << 4) /* use 1/8" lengths */
|
||||
#define MUSTEK_FLAG_LD_FIX (1 << 5) /* need line-distance fix? */
|
||||
#define MUSTEK_FLAG_LD_MFS (1 << 6) /* MFS line-distance corr? */
|
||||
#define MUSTEK_FLAG_LD_NONE (1 << 7) /* no line-distance corr? */
|
||||
#define MUSTEK_FLAG_LINEART_FIX (1 << 8) /* lineart fix/hack */
|
||||
#define MUSTEK_FLAG_PP (1 << 9) /* //-port scanner? */
|
||||
#define MUSTEK_FLAG_SE (1 << 10) /* ScanExpress model ? */
|
||||
#define MUSTEK_FLAG_DOUBLE_RES (1 << 11) /* MSF-06000CZ res. encoding */
|
||||
/* Some constants */
|
||||
#define INQ_LEN 0x60 /* Length of SCSI inquiry */
|
||||
#ifndef PATH_MAX
|
||||
# define PATH_MAX 1024
|
||||
#endif
|
||||
#define MUSTEK_CONFIG_FILE "mustek.conf"
|
||||
#define MM_PER_INCH 25.4
|
||||
|
||||
/* source values: */
|
||||
#define MAX_WAITING_TIME 60 /* How long to wait for scanner to become ready */
|
||||
#define MAX_LINE_DIST 40 /* Extra lines needed for LD correction */
|
||||
|
||||
/* Flag values */
|
||||
/* Scanner types */
|
||||
#define MUSTEK_FLAG_THREE_PASS (1 << 0) /* three pass scanner */
|
||||
#define MUSTEK_FLAG_PARAGON_1 (1 << 1) /* Paragon series I scanner */
|
||||
#define MUSTEK_FLAG_PARAGON_2 (1 << 2) /* Paragon series II (A4) scanner */
|
||||
#define MUSTEK_FLAG_SE (1 << 3) /* ScanExpress scanner */
|
||||
#define MUSTEK_FLAG_SE_PLUS (1 << 4) /* ScanExpress Plus scanner */
|
||||
#define MUSTEK_FLAG_PRO (1 << 5) /* Professional series scanner */
|
||||
#define MUSTEK_FLAG_N (1 << 6) /* N-type scanner (non SCSI) */
|
||||
/* Additional equipment */
|
||||
#define MUSTEK_FLAG_ADF (1 << 7) /* automatic document feeder */
|
||||
#define MUSTEK_FLAG_ADF_READY (1 << 8) /* paper present */
|
||||
#define MUSTEK_FLAG_TA (1 << 9) /* transparency adapter */
|
||||
/* Line-distance correction */
|
||||
#define MUSTEK_FLAG_LD_NONE (1 << 10) /* no line-distance corr */
|
||||
#define MUSTEK_FLAG_LD_BLOCK (1 << 11) /* blockwise LD corr */
|
||||
#define MUSTEK_FLAG_LD_N1 (1 << 12) /* LD corr for N-type v1 */
|
||||
#define MUSTEK_FLAG_LD_N2 (1 << 13) /* LD corr for N-type v2 */
|
||||
/* Manual fixes */
|
||||
#define MUSTEK_FLAG_LD_FIX (1 << 14) /* need line-distance fix? */
|
||||
#define MUSTEK_FLAG_LINEART_FIX (1 << 15) /* lineart fix/hack */
|
||||
#define MUSTEK_FLAG_USE_EIGHTS (1 << 16) /* use 1/8" lengths */
|
||||
#define MUSTEK_FLAG_FORCE_GAMMA (1 << 17) /* force gamma table upload */
|
||||
#define MUSTEK_FLAG_ENLARGE_X (1 << 18) /* need to enlarge x-res */
|
||||
#define MUSTEK_FLAG_COVER_SENSOR (1 << 19) /* scanner can detect open cover */
|
||||
#define MUSTEK_FLAG_USE_BLOCK (1 << 20) /* use blockmode */
|
||||
|
||||
/* Source values: */
|
||||
#define MUSTEK_SOURCE_FLATBED 0
|
||||
#define MUSTEK_SOURCE_ADF 1
|
||||
#define MUSTEK_SOURCE_TA 2
|
||||
|
||||
/* mode values: */
|
||||
#define MUSTEK_MODE_MULTIBIT (1 << 0) /* one-bit vs multi-bit */
|
||||
#define MUSTEK_MODE_COLOR (1 << 1) /* grayscale vs color */
|
||||
#define MUSTEK_MODE_HALFTONE (1 << 2) /* use dithering? */
|
||||
/* Mode values: */
|
||||
#define MUSTEK_MODE_LINEART (1 << 0) /* grayscale 1 bit / pixel */
|
||||
#define MUSTEK_MODE_GRAY (1 << 1) /* grayscale 8 bits / pixel */
|
||||
#define MUSTEK_MODE_COLOR (1 << 2) /* color 24 bits / pixel */
|
||||
#define MUSTEK_MODE_HALFTONE (1 << 3) /* use dithering */
|
||||
#define MUSTEK_MODE_GRAY_FAST (1 << 4) /* Pro series fast grayscale */
|
||||
#define MUSTEK_MODE_COLOR_48 (1 << 5) /* color 48 bits / pixel */
|
||||
|
||||
/* Color band codes: */
|
||||
#define MUSTEK_CODE_GRAY 0
|
||||
#define MUSTEK_CODE_RED 1
|
||||
#define MUSTEK_CODE_GREEN 2
|
||||
#define MUSTEK_CODE_BLUE 3
|
||||
|
||||
/* SCSI commands that the Mustek scanners understand (or not): */
|
||||
#define MUSTEK_SCSI_TEST_UNIT_READY 0x00
|
||||
#define MUSTEK_SCSI_REQUEST_SENSE 0x03
|
||||
#define MUSTEK_SCSI_AREA_AND_WINDOWS 0x04
|
||||
#define MUSTEK_SCSI_READ_SCANNED_DATA 0x08
|
||||
#define MUSTEK_SCSI_GET_IMAGE_STATUS 0x0f
|
||||
#define MUSTEK_SCSI_ADF_AND_BACKTRACK 0x10
|
||||
#define MUSTEK_SCSI_CCD_DISTANCE 0x11
|
||||
#define MUSTEK_SCSI_INQUIRY 0x12
|
||||
#define MUSTEK_SCSI_MODE_SELECT 0x15
|
||||
#define MUSTEK_SCSI_START_STOP 0x1b
|
||||
#define MUSTEK_SCSI_SET_WINDOW 0x24
|
||||
#define MUSTEK_SCSI_GET_WINDOW 0x25
|
||||
#define MUSTEK_SCSI_READ_DATA 0x28
|
||||
#define MUSTEK_SCSI_SEND_DATA 0x2a
|
||||
#define MUSTEK_SCSI_LOOKUP_TABLE 0x55
|
||||
|
||||
/* Convenience macros */
|
||||
#define MIN(a,b) ((a) < (b) ? (a) : (b))
|
||||
#define MAX(a,b) ((a) > (b) ? (a) : (b))
|
||||
/* Copy values to memeory ('L' = little endian, 'B' = big endian */
|
||||
#define STORE16L(cp,v) \
|
||||
do { \
|
||||
int value = (v); \
|
||||
\
|
||||
*(cp)++ = (value >> 0) & 0xff; \
|
||||
*(cp)++ = (value >> 8) & 0xff; \
|
||||
} while (0)
|
||||
#define STORE16B(cp,v) \
|
||||
do { \
|
||||
int value = (v); \
|
||||
\
|
||||
*(cp)++ = (value >> 8) & 0xff; \
|
||||
*(cp)++ = (value >> 0) & 0xff; \
|
||||
} while (0)
|
||||
#define STORE32B(cp,v) \
|
||||
do { \
|
||||
long int value = (v); \
|
||||
\
|
||||
*(cp)++ = (value >> 24) & 0xff; \
|
||||
*(cp)++ = (value >> 16) & 0xff; \
|
||||
*(cp)++ = (value >> 8) & 0xff; \
|
||||
*(cp)++ = (value >> 0) & 0xff; \
|
||||
} while (0)
|
||||
|
||||
/* declarations */
|
||||
enum Mustek_Option
|
||||
{
|
||||
OPT_NUM_OPTS = 0,
|
||||
|
@ -76,9 +161,8 @@ enum Mustek_Option
|
|||
OPT_RESOLUTION,
|
||||
OPT_SPEED,
|
||||
OPT_SOURCE,
|
||||
OPT_BACKTRACK,
|
||||
OPT_PREVIEW,
|
||||
OPT_GRAY_PREVIEW,
|
||||
OPT_FAST_PREVIEW,
|
||||
|
||||
OPT_GEOMETRY_GROUP,
|
||||
OPT_TL_X, /* top-left x */
|
||||
|
@ -87,9 +171,14 @@ enum Mustek_Option
|
|||
OPT_BR_Y, /* bottom-right y */
|
||||
|
||||
OPT_ENHANCEMENT_GROUP,
|
||||
OPT_GRAIN_SIZE,
|
||||
OPT_BRIGHTNESS,
|
||||
OPT_BRIGHTNESS_R,
|
||||
OPT_BRIGHTNESS_G,
|
||||
OPT_BRIGHTNESS_B,
|
||||
OPT_CONTRAST,
|
||||
OPT_CONTRAST_R,
|
||||
OPT_CONTRAST_G,
|
||||
OPT_CONTRAST_B,
|
||||
OPT_CUSTOM_GAMMA, /* use custom gamma tables? */
|
||||
/* The gamma vectors MUST appear in the order gray, red, green,
|
||||
blue. */
|
||||
|
@ -97,6 +186,7 @@ enum Mustek_Option
|
|||
OPT_GAMMA_VECTOR_R,
|
||||
OPT_GAMMA_VECTOR_G,
|
||||
OPT_GAMMA_VECTOR_B,
|
||||
OPT_QUALITY_CAL,
|
||||
OPT_HALFTONE_DIMENSION,
|
||||
OPT_HALFTONE_PATTERN,
|
||||
|
||||
|
@ -115,6 +205,7 @@ Option_Value;
|
|||
typedef struct Mustek_Device
|
||||
{
|
||||
struct Mustek_Device *next;
|
||||
SANE_String name;
|
||||
SANE_Device sane;
|
||||
SANE_Range dpi_range;
|
||||
SANE_Range x_range;
|
||||
|
@ -122,18 +213,34 @@ typedef struct Mustek_Device
|
|||
/* scan area when transparency adapter is used: */
|
||||
SANE_Range x_trans_range;
|
||||
SANE_Range y_trans_range;
|
||||
unsigned flags;
|
||||
SANE_Word flags;
|
||||
/* length of gamma table, probably always <= 4096 for the SE */
|
||||
int gamma_length;
|
||||
SANE_Int gamma_length;
|
||||
/* values actually used by scanner, not necessarily the desired! */
|
||||
int bpl, lines;
|
||||
/* what is needed for calibration */
|
||||
SANE_Int bpl, lines;
|
||||
/* what is needed for calibration (ScanExpress and Pro series)*/
|
||||
struct
|
||||
{
|
||||
int bytes;
|
||||
int lines;
|
||||
SANE_Int bytes;
|
||||
SANE_Int lines;
|
||||
SANE_Byte *buffer;
|
||||
}
|
||||
cal;
|
||||
/* current and maximum buffer size used by the backend */
|
||||
/* the buffer sent to the scanner is actually half of this size */
|
||||
SANE_Int buffer_size;
|
||||
SANE_Int max_buffer_size;
|
||||
/* maximum size scanned in one block and corresponding lines */
|
||||
SANE_Int max_block_buffer_size;
|
||||
SANE_Int lines_per_block;
|
||||
SANE_Byte *block_buffer;
|
||||
|
||||
/* firmware format: 0 = old, MUSTEK at pos 8; 1 = new, MUSTEK at
|
||||
pos 36 */
|
||||
SANE_Int firmware_format;
|
||||
/* firmware revision system: 0 = old, x.yz; 1 = new, Vxyz */
|
||||
SANE_Int firmware_revision_system;
|
||||
/* For SE scanners: which resolutions are allowed in color mode */
|
||||
}
|
||||
Mustek_Device;
|
||||
|
||||
|
@ -146,20 +253,24 @@ typedef struct Mustek_Scanner
|
|||
Option_Value val[NUM_OPTIONS];
|
||||
SANE_Int gamma_table[4][256];
|
||||
SANE_Int halftone_pattern[64];
|
||||
SANE_Bool custom_halftone_pattern;
|
||||
SANE_Int halftone_pattern_type;
|
||||
|
||||
int scanning;
|
||||
int pass; /* pass number */
|
||||
int line; /* current line number */
|
||||
SANE_Bool scanning;
|
||||
SANE_Bool cancelled;
|
||||
SANE_Int pass; /* pass number */
|
||||
SANE_Int line; /* current line number */
|
||||
SANE_Parameters params;
|
||||
|
||||
/* Parsed option values and variables that are valid only during
|
||||
actual scanning: */
|
||||
int mode;
|
||||
int one_pass_color_scan;
|
||||
int resolution_code;
|
||||
SANE_Word mode;
|
||||
SANE_Bool one_pass_color_scan;
|
||||
SANE_Int resolution_code;
|
||||
int fd; /* SCSI filedescriptor */
|
||||
pid_t reader_pid; /* process id of reader */
|
||||
int pipe; /* pipe to reader process */
|
||||
long start_time; /* at this time the scan started */
|
||||
|
||||
/* scanner dependent/low-level state: */
|
||||
Mustek_Device *hw;
|
||||
|
@ -167,18 +278,18 @@ typedef struct Mustek_Scanner
|
|||
/* line-distance correction related state: */
|
||||
struct
|
||||
{
|
||||
int color; /* first color appearing in read data */
|
||||
int max_value;
|
||||
int peak_res;
|
||||
int dist[3]; /* line distance */
|
||||
int index[3]; /* index for R/G/B color assignment */
|
||||
int quant[3]; /* for resolution correection */
|
||||
int saved[3]; /* number of saved color lines */
|
||||
/* these are used for SE, MFS and pp line-distance correction: */
|
||||
char *buf[3];
|
||||
/* these are used for parallel-port line-distance correction only: */
|
||||
int ld_line; /* line # currently processed in ld-correction */
|
||||
int lmod3; /* line # modulo 3 */
|
||||
SANE_Int color; /* first color appearing in read data */
|
||||
SANE_Int max_value;
|
||||
SANE_Int peak_res;
|
||||
SANE_Int dist[3]; /* line distance */
|
||||
SANE_Int index[3]; /* index for R/G/B color assignment */
|
||||
SANE_Int quant[3]; /* for resolution correction */
|
||||
SANE_Int saved[3]; /* number of saved color lines */
|
||||
/* these are used for SE, MFS and N line-distance correction: */
|
||||
SANE_Byte *buf[3];
|
||||
/* these are used for N line-distance correction only: */
|
||||
SANE_Int ld_line;/* line # currently processed in ld-correction */
|
||||
SANE_Int lmod3; /* line # modulo 3 */
|
||||
}
|
||||
ld;
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
.TH sane-mustek 5 "23 Sep 2000"
|
||||
.TH sane-mustek 5 "19 Nov 2000"
|
||||
.IX sane-mustek
|
||||
.SH NAME
|
||||
sane-mustek - SANE backend for Mustek flatbed scanners
|
||||
|
@ -143,42 +143,44 @@ should fix the problem but may slow down scanning a bit.
|
|||
|
||||
Option
|
||||
.B buffersize
|
||||
is a positional option that overrides the default value set for the
|
||||
total SCSI buffer size. The buffer size is specified in kilobytes. The
|
||||
default value depends on the scanner type. Because of double buffering
|
||||
the buffer actually send to the scanner is half of the size of this
|
||||
value. Note that some ScanExpress scanners don't like buffer sizes
|
||||
above 64 kb (buffersize = 128). If your sg driver can't set SCSI
|
||||
buffer sizes at runtime you may have to change that value, too. See
|
||||
sane-scsi(5) for details.
|
||||
is a positional option that overrides the default value set for the size of
|
||||
the SCSI buffer. The buffer size is specified in kilobytes. The default value
|
||||
is 128. Because of double buffering the buffer actually sent to the scanner
|
||||
is half the size of this value. Try to increase this value to achieve higher
|
||||
scan speeds. Note that some ScanExpress scanners don't like buffer sizes above
|
||||
64 kb (buffersize = 128). If your sg driver can't set SCSI buffer sizes at
|
||||
runtime you may have to change that value, too. See sane-scsi(5) for details.
|
||||
|
||||
Option
|
||||
.B blocksize
|
||||
is a positional option that overrides the default value set for the
|
||||
maximum amount of data scanned in one block. The buffer size is
|
||||
specified in kilobytes. Some scanners freeze if this value is bigger
|
||||
than 2048. The default value is 1 GB (so effectively no limit) for
|
||||
most scanners.
|
||||
is a positional option that overrides the default value set for the maximum
|
||||
amount of data scanned in one block. The buffer size is specified in
|
||||
kilobytes. Some scanners freeze if this value is bigger than 2048. The default
|
||||
value is 1 GB (so effectively no limit) for most scanners. Don't change this
|
||||
value if you don't know exactly what you do.
|
||||
|
||||
Option
|
||||
.B strip-height is a global option. If enabled, the Mustek backend
|
||||
waits after each scan until the scan slider reaches its start position.
|
||||
This option may be useful for testing. Default is off (not enabled).
|
||||
.B strip-height
|
||||
is a global option that limits the maximum height of the strip scanned with a
|
||||
single SCSI read command. The height is specified in inches and may contain a
|
||||
fractional part (e.g., 1.5). Setting the strip-height to a small value (one
|
||||
inch, for example) reduces the likelihood of encountering problems with SCSI
|
||||
driver timeouts and/or timeouts with other devices on the same SCSI bus.
|
||||
Unfortunately, it also increases scan times. Thus, if the scanner is the only
|
||||
device on the SCSI bus it is connected to and if it is known that the SCSI
|
||||
driver does not suffer from premature timeouts, it is recommended to increase
|
||||
the strip-height or remove the option completely, which corresponds to an
|
||||
infinite strip height. See sane-scsi(5) on how to avoid problems with SCSI
|
||||
timeouts.
|
||||
|
||||
Finally,
|
||||
.B strip-height
|
||||
is a global option limits the maximum height of the strip scanned with
|
||||
a single SCSI read command. The height is specified in inches and may
|
||||
contain a fractional part (e.g., 1.5). Setting the strip-height to a
|
||||
small value (one inch, for example) reduces the likelihood of
|
||||
encountering problems with SCSI driver timeouts and/or timeouts with
|
||||
other devices on the same SCSI bus. Unfortunately, it also increases
|
||||
scan times. Thus, if the scanner is the only device on the SCSI bus
|
||||
it is connected to and if it is known that the SCSI driver does not
|
||||
suffer from premature timeouts, it is recommended to increase the
|
||||
strip-height or remove the option completely, which corresponds to an
|
||||
infinite strip height. See sane-scsi(5) on how to avoid problems with
|
||||
SCSI timeouts.
|
||||
.B force-wait
|
||||
is a global option. If set, the backend will wait until the device is ready
|
||||
before sending the inquiry command. Further more the backend will force the
|
||||
scan slider to return to its starting position (not implemented for all
|
||||
scanners). This option may be necessary with the 600 II N or when scanimage is
|
||||
used multiple times (e.g. in scripts). The default is off (not set).
|
||||
|
||||
.PP
|
||||
A sample configuration file is shown below:
|
||||
.PP
|
||||
|
@ -263,6 +265,9 @@ If your images have horizontal stripes in color mode, check option
|
|||
linedistance-fix (see above). Apply this option for a scanner with
|
||||
firmware version 2.x and disable it for version 1.x.
|
||||
.PP
|
||||
If the Mustek backend blocks while sending the inqiury command to the scanner,
|
||||
add the option force-wait to mustek.conf.
|
||||
.PP
|
||||
Also note that after a while of no activity, some scanners themself (not
|
||||
the SANE backend) turns off their CCFL lamps. This shutdown is not always
|
||||
perfect with the result that the lamp sometimes continues to glow
|
||||
|
@ -318,17 +323,19 @@ Example:
|
|||
export SANE_DEBUG_MUSTEK=4
|
||||
|
||||
.SH "SEE ALSO"
|
||||
sane\-scsi(5)
|
||||
sane\-scsi(5), sane-mustek_pp(5)
|
||||
.SH AUTHOR
|
||||
David Mosberger and Andreas Czechanowski, SE extensions Andreas
|
||||
Bolsch, bug fixes and Pro series extension Henning Meier-Geinitz
|
||||
David Mosberger, Andreas Czechanowski, Andreas Bolsch (SE extensions),
|
||||
Henning Meier-Geinitz
|
||||
.SH BUGS
|
||||
Scanning with the SCSI adapters supplied by Mustek is very slow at
|
||||
high resolutions and wide scanareas.
|
||||
|
||||
Only 1, 8 and 24 bit modes are supported.
|
||||
Only 1, 8 and 24 bit modes are supported until now.
|
||||
|
||||
Some scanners (e.g. Paragon 1200 A3 Pro) need more testing.
|
||||
Calibration doesn't work yet.
|
||||
|
||||
Some scanners (e.g. Paragon 1200 A3 + Pro, SE A3) need more testing.
|
||||
|
||||
More detailed bug information is available at the Mustek backend
|
||||
homepage
|
||||
|
|
Ładowanie…
Reference in New Issue