updated to Avision backend build 25. More stable for HP usb scanners,

suport for Misubishi scanners and various cleanups.
DEVEL_2_0_BRANCH-1
Rene Rebe 2002-04-08 14:35:32 +00:00
rodzic 7f316583eb
commit 3c9ce35908
5 zmienionych plików z 1262 dodań i 746 usunięć

Plik diff jest za duży Load Diff

Wyświetl plik

@ -2,5 +2,5 @@ scsi AVISION
/dev/scanner /dev/scanner
#option disable-gamma-table #option disable-gamma-table
#option disable-calibration
#option force-a4 #option force-a4
#option allow-usb

Wyświetl plik

@ -0,0 +1,59 @@
; SANE Backend specification file
;
; It's basically emacs-lisp --- so ";" indicates comment to end of line.
; All syntactic elements are keyword tokens, followed by a string or
; keyword argument, as specified.
;
; ":backend" *must* be specified.
; All other information is optional (but what good is the file without it?).
:backend "avision" ; name of backend
:version "0.3.1" ; version of backend
:status :beta ; :alpha, :beta, :stable, :new
:url "http://drocklinux.dyndns.org/rene/avision/index.html" ; backend's web page
:manpage "sane-avision" ; name of manpage (if it exists)
:devicetype :scanner
:mfg "Avision" ; name a manufacturer
:url "http://www.avision.com/"
:model "AV 6240" ; name models for above-specified mfg.
:interface "SCSI"
:comment "1 pass, ??? DPI"
:model "AV 630 CS"
:interface "SCSI"
:comment "1 pass, 600 DPI"
:model "AV 620 CS"
:interface "SCSI"
:comment "1 pass, 600 DPI"
:mfg "HP"
:url "http://www.hp.com/"
:model "HP 5300"
:interface "USB"
:comment "1 pass, 600 DPI"
:model "HP 5370c"
:interface "USB"
:comment "1 pass, 600 DPI"
:model "HP 7400"
:interface "USB"
:comment "1 pass, 1200 DPI"
:mfg "MINOLTA"
:url "http://www.minolta.com/"
:model "FS-V1"
:interface "USB"
:comment "1 pass, 2820 DPI, film-scanner"
:mfg "Mitsubishi"
:model "MCA-S600C"
:interface "SCSI
:model "MCA-SS600"
:interface "SCSI"

Wyświetl plik

@ -45,13 +45,20 @@
Copyright 1999, 2000, 2001, 2002 by Copyright 1999, 2000, 2001, 2002 by
"René Rebe" <rene.rebe@gmx.net> "René Rebe" <rene.rebe@gmx.net>
"Meino Christian Cramer" <mccramer@s.netic.de> "Meino Christian Cramer" <mccramer@s.netic.de>
"Martin Jelínek" <mates@sirrah.troja.mff.cuni.cz> "Jose Paulo Moitinho de Almeida" <moitinho@civil.ist.utl.pt>
Additional Contributers: Additional Contributers:
"Gunter Wagner" "Gunter Wagner"
(some fixes and the transparency option) (some fixes and the transparency option)
"Martin Jelínek" <mates@sirrah.troja.mff.cuni.cz>
nice attach debug output
"Marcin Siennicki" <m.siennicki@cloos.pl>
found some typos
"Frank Zago" <fzago@greshamstorage.com>
Mitsubishi IDs and report
Very much thanks to: Very much thanks to:
Oliver Neukum who sponsored a HP 5300 USB scanner !!! ;-)
Avision INC for the documentation we got! ;-) Avision INC for the documentation we got! ;-)
Check the avision.c file for a ChangeLog ... Check the avision.c file for a ChangeLog ...
@ -67,6 +74,7 @@ typedef struct Avision_HWEntry {
char* mfg; char* mfg;
char* model; char* model;
SANE_Bool usb; SANE_Bool usb;
SANE_Bool film;
} Avision_HWEntry; } Avision_HWEntry;
enum Avision_Option enum Avision_Option
@ -99,6 +107,8 @@ enum Avision_Option
OPT_GAMMA_VECTOR_G, OPT_GAMMA_VECTOR_G,
OPT_GAMMA_VECTOR_B, OPT_GAMMA_VECTOR_B,
OPT_FRAME, /* Film holder control */
NUM_OPTIONS /* must come last */ NUM_OPTIONS /* must come last */
}; };
@ -111,17 +121,23 @@ typedef union Option_Value
typedef struct Avision_Dimensions typedef struct Avision_Dimensions
{ {
/* in dpi */
int res;
int resx;
int rexy;
/* in 1200/dpi */
long tlx; long tlx;
long tly; long tly;
long brx; long brx;
long bry; long bry;
long wid;
long len; long width;
long pixelnum; long length;
long linenum;
int resx; /* in pixels */
int rexy; int line_difference;
int res;
} Avision_Dimensions; } Avision_Dimensions;
/* this contains our low-level info - not relevant for the SANE interface */ /* this contains our low-level info - not relevant for the SANE interface */
@ -137,14 +153,15 @@ typedef struct Avision_Device
SANE_Range speed_range; SANE_Range speed_range;
SANE_Bool is_usb; SANE_Bool is_usb;
SANE_Bool is_film_scanner;
SANE_Bool inquiry_new_protocol; SANE_Bool inquiry_new_protocol;
SANE_Bool inquiry_needs_calibration; SANE_Bool inquiry_needs_calibration;
SANE_Bool inquiry_needs_gamma; SANE_Bool inquiry_needs_gamma;
SANE_Bool inquiry_needs_software_colorpack; SANE_Bool inquiry_needs_software_colorpack;
int inquiry_grey_res; /* in dpi */ int inquiry_optical_res; /* in dpi */
int inquiry_color_res; /* in dpi */ int inquiry_max_res; /* in dpi */
double inquiry_x_range; /* in mm */ double inquiry_x_range; /* in mm */
double inquiry_y_range; /* in mm */ double inquiry_y_range; /* in mm */
@ -159,7 +176,11 @@ typedef struct Avision_Device
int inquiry_grey_boundary; int inquiry_grey_boundary;
int inquiry_line_difference; /* software color pack */ int inquiry_line_difference; /* software color pack */
int inquiry_bits_per_channel; /* int inquiry_bits_per_channel; */
SANE_Range frame_range;
SANE_Word current_frame;
SANE_Word holder_type;
} Avision_Device; } Avision_Device;
@ -173,20 +194,18 @@ typedef struct Avision_Scanner
Option_Value val [NUM_OPTIONS]; Option_Value val [NUM_OPTIONS];
SANE_Int gamma_table [4][256]; SANE_Int gamma_table [4][256];
SANE_Bool scanning; /* scan in progress */
/*int pass;*/ /* pass number */
int line; /* current line number */
SANE_Parameters params;
/* Parsed option values and variables that are valid only during /* Parsed option values and variables that are valid only during
actual scanning: */ the actual scan: */
SANE_Bool scanning; /* scan in progress */
SANE_Parameters params; /* scan window */
Avision_Dimensions avdimen; /* scan window - detailed internals */
int mode; int mode;
Avision_Dimensions avdimen; /* Used for internal calculationg */
int fd; /* SCSI filedescriptor */ int fd; /* SCSI filedescriptor */
pid_t reader_pid; /* process id of reader */ pid_t reader_pid; /* process id of reader */
int pipe; /* pipe to reader process */ int pipe; /* pipe to reader process */
int line; /* current line number during scan */
} Avision_Scanner; } Avision_Scanner;
@ -304,108 +323,107 @@ typedef struct Avision_Scanner
struct command_header struct command_header
{ {
unsigned char opc; u_int8_t opc;
unsigned char pad0 [3]; u_int8_t pad0 [3];
unsigned char len; u_int8_t len;
unsigned char pad1; u_int8_t pad1;
}; };
struct command_set_window struct command_set_window
{ {
unsigned char opc; u_int8_t opc;
unsigned char reserved0 [5]; u_int8_t reserved0 [5];
unsigned char transferlen [3]; u_int8_t transferlen [3];
unsigned char control; u_int8_t control;
}; };
struct command_read struct command_read
{ {
unsigned char opc; u_int8_t opc;
unsigned char bitset1; u_int8_t bitset1;
unsigned char datatypecode; u_int8_t datatypecode;
unsigned char calibchn; u_int8_t calibchn;
unsigned char datatypequal [2]; u_int8_t datatypequal [2];
unsigned char transferlen [3]; u_int8_t transferlen [3];
unsigned char control; u_int8_t control;
}; };
struct command_scan struct command_scan
{ {
unsigned char opc; u_int8_t opc;
unsigned char pad0 [3]; u_int8_t pad0 [3];
unsigned char transferlen; u_int8_t transferlen;
unsigned char bitset1; u_int8_t bitset1;
}; };
struct command_send struct command_send
{ {
unsigned char opc; u_int8_t opc;
unsigned char bitset1; u_int8_t bitset1;
unsigned char datatypecode; u_int8_t datatypecode;
unsigned char reserved0; u_int8_t reserved0;
unsigned char datatypequal [2]; u_int8_t datatypequal [2];
unsigned char transferlen [3]; u_int8_t transferlen [3];
unsigned char reserved1; u_int8_t reserved1;
}; };
struct command_set_window_window_header struct command_set_window_window_header
{ {
unsigned char reserved0 [6]; u_int8_t reserved0 [6];
unsigned char desclen [2]; u_int8_t desclen [2];
}; };
struct command_set_window_window_descriptor struct command_set_window_window_descriptor
{ {
unsigned char winid; u_int8_t winid;
unsigned char pad0; u_int8_t pad0;
unsigned char xres [2]; u_int8_t xres [2];
unsigned char yres [2]; u_int8_t yres [2];
unsigned char ulx [4]; u_int8_t ulx [4];
unsigned char uly [4]; u_int8_t uly [4];
unsigned char width [4]; u_int8_t width [4];
unsigned char length [4]; u_int8_t length [4];
unsigned char brightness; u_int8_t brightness;
unsigned char thresh; u_int8_t thresh;
unsigned char contrast; u_int8_t contrast;
unsigned char image_comp; u_int8_t image_comp;
unsigned char bpp; u_int8_t bpc;
unsigned char halftone [2]; u_int8_t halftone [2];
unsigned char pad_type; u_int8_t pad_type;
unsigned char bitordering [2]; u_int8_t bitordering [2];
unsigned char compr_type; u_int8_t compr_type;
unsigned char compr_arg; u_int8_t compr_arg;
unsigned char pad4 [6]; u_int8_t pad4 [6];
unsigned char vendor_specid; u_int8_t vendor_specid;
unsigned char paralen; u_int8_t paralen;
unsigned char bitset1; u_int8_t bitset1;
unsigned char highlight; u_int8_t highlight;
unsigned char shadow; u_int8_t shadow;
unsigned char linewidth [2]; u_int8_t linewidth [2];
unsigned char linecount [2]; u_int8_t linecount [2];
unsigned char bitset2; u_int8_t bitset2;
unsigned char pad5; u_int8_t pad5;
#if 1
unsigned char r_exposure_time [2]; u_int8_t r_exposure_time [2];
unsigned char g_exposure_time [2]; u_int8_t g_exposure_time [2];
unsigned char b_exposure_time [2]; u_int8_t b_exposure_time [2];
#endif
}; };
struct page_header struct page_header
{ {
char pad0 [4]; u_int8_t pad0 [4];
char code; u_int8_t code;
char length; u_int8_t length;
}; };
struct avision_page struct avision_page
{ {
char gamma; u_int8_t gamma;
char thresh; u_int8_t thresh;
char masks; u_int8_t masks;
char delay; u_int8_t delay;
char features; u_int8_t features;
char pad0; u_int8_t pad0;
}; };
/* set SCSI highended variables. Declare them as an array of chars */ /* set SCSI highended variables. Declare them as an array of chars */
@ -424,4 +442,9 @@ struct avision_page
#define BIT(n, p) ((n & ( 1 << p))?1:0) #define BIT(n, p) ((n & ( 1 << p))?1:0)
/* These should be in saneopts.h */
#define SANE_NAME_FRAME "frame"
#define SANE_TITLE_FRAME SANE_I18N("Number of the frame to scan")
#define SANE_DESC_FRAME SANE_I18N("Selects the number of the frame to scan")
#endif /* avision_h */ #endif /* avision_h */

Wyświetl plik

@ -2,7 +2,8 @@
.IX sane-avision .IX sane-avision
.SH NAME .SH NAME
sane-avision - SANE backend for Avision (and OEM HP, Minolta) flatbed scanners sane-avision - SANE backend for original Avision and Avision OEM scanners
(HP, Minolta, Mitsubishi, UMAX and possibly more) flatbed scanners
.SH ABOUT THIS FILE .SH ABOUT THIS FILE
@ -34,7 +35,6 @@ the first scans!
# this is a comment # this is a comment
# #
option force-a4 option force-a4
option allow-usb
option disable-gamma-table option disable-gamma-table
- force-a4: - force-a4:
@ -44,14 +44,15 @@ the first scans!
which retuns the area in a unkown format our backend which retuns the area in a unkown format our backend
doesn't recongize yet. doesn't recongize yet.
- allow-usb:
Tells the backend to use USB scanner - which do not
work correctly yet.
- disable-gamma-table: - disable-gamma-table:
Disables the usage of the scanner's gamma-table. You Disables the usage of the scanner's gamma-table. You
might try this if your scans hang, or only produces might try this if your scans hang, or only produces
random garbage. random garbage.
- disable-calibration:
Disables the scanner's color calibration. You
might try this if your scans hang, or only produces
random garbage.
.SH "DEVICE NAMES" .SH "DEVICE NAMES"
This backend expects device names of the form: This backend expects device names of the form: