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
#option disable-gamma-table
#option disable-calibration
#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
"René Rebe" <rene.rebe@gmx.net>
"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:
"Gunter Wagner"
(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:
Oliver Neukum who sponsored a HP 5300 USB scanner !!! ;-)
Avision INC for the documentation we got! ;-)
Check the avision.c file for a ChangeLog ...
@ -67,6 +74,7 @@ typedef struct Avision_HWEntry {
char* mfg;
char* model;
SANE_Bool usb;
SANE_Bool film;
} Avision_HWEntry;
enum Avision_Option
@ -99,6 +107,8 @@ enum Avision_Option
OPT_GAMMA_VECTOR_G,
OPT_GAMMA_VECTOR_B,
OPT_FRAME, /* Film holder control */
NUM_OPTIONS /* must come last */
};
@ -111,17 +121,23 @@ typedef union Option_Value
typedef struct Avision_Dimensions
{
/* in dpi */
int res;
int resx;
int rexy;
/* in 1200/dpi */
long tlx;
long tly;
long brx;
long bry;
long wid;
long len;
long pixelnum;
long linenum;
int resx;
int rexy;
int res;
long width;
long length;
/* in pixels */
int line_difference;
} Avision_Dimensions;
/* 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_Bool is_usb;
SANE_Bool is_film_scanner;
SANE_Bool inquiry_new_protocol;
SANE_Bool inquiry_needs_calibration;
SANE_Bool inquiry_needs_gamma;
SANE_Bool inquiry_needs_software_colorpack;
int inquiry_grey_res; /* in dpi */
int inquiry_color_res; /* in dpi */
int inquiry_optical_res; /* in dpi */
int inquiry_max_res; /* in dpi */
double inquiry_x_range; /* in mm */
double inquiry_y_range; /* in mm */
@ -159,7 +176,11 @@ typedef struct Avision_Device
int inquiry_grey_boundary;
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;
@ -173,20 +194,18 @@ typedef struct Avision_Scanner
Option_Value val [NUM_OPTIONS];
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
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;
Avision_Dimensions avdimen; /* Used for internal calculationg */
int fd; /* SCSI filedescriptor */
pid_t reader_pid; /* process id of reader */
int pipe; /* pipe to reader process */
int line; /* current line number during scan */
} Avision_Scanner;
@ -304,108 +323,107 @@ typedef struct Avision_Scanner
struct command_header
{
unsigned char opc;
unsigned char pad0 [3];
unsigned char len;
unsigned char pad1;
u_int8_t opc;
u_int8_t pad0 [3];
u_int8_t len;
u_int8_t pad1;
};
struct command_set_window
{
unsigned char opc;
unsigned char reserved0 [5];
unsigned char transferlen [3];
unsigned char control;
u_int8_t opc;
u_int8_t reserved0 [5];
u_int8_t transferlen [3];
u_int8_t control;
};
struct command_read
{
unsigned char opc;
unsigned char bitset1;
unsigned char datatypecode;
unsigned char calibchn;
unsigned char datatypequal [2];
unsigned char transferlen [3];
unsigned char control;
u_int8_t opc;
u_int8_t bitset1;
u_int8_t datatypecode;
u_int8_t calibchn;
u_int8_t datatypequal [2];
u_int8_t transferlen [3];
u_int8_t control;
};
struct command_scan
{
unsigned char opc;
unsigned char pad0 [3];
unsigned char transferlen;
unsigned char bitset1;
u_int8_t opc;
u_int8_t pad0 [3];
u_int8_t transferlen;
u_int8_t bitset1;
};
struct command_send
{
unsigned char opc;
unsigned char bitset1;
unsigned char datatypecode;
unsigned char reserved0;
unsigned char datatypequal [2];
unsigned char transferlen [3];
unsigned char reserved1;
u_int8_t opc;
u_int8_t bitset1;
u_int8_t datatypecode;
u_int8_t reserved0;
u_int8_t datatypequal [2];
u_int8_t transferlen [3];
u_int8_t reserved1;
};
struct command_set_window_window_header
{
unsigned char reserved0 [6];
unsigned char desclen [2];
u_int8_t reserved0 [6];
u_int8_t desclen [2];
};
struct command_set_window_window_descriptor
{
unsigned char winid;
unsigned char pad0;
unsigned char xres [2];
unsigned char yres [2];
unsigned char ulx [4];
unsigned char uly [4];
unsigned char width [4];
unsigned char length [4];
unsigned char brightness;
unsigned char thresh;
unsigned char contrast;
unsigned char image_comp;
unsigned char bpp;
unsigned char halftone [2];
unsigned char pad_type;
unsigned char bitordering [2];
unsigned char compr_type;
unsigned char compr_arg;
unsigned char pad4 [6];
unsigned char vendor_specid;
unsigned char paralen;
unsigned char bitset1;
unsigned char highlight;
unsigned char shadow;
unsigned char linewidth [2];
unsigned char linecount [2];
unsigned char bitset2;
unsigned char pad5;
#if 1
unsigned char r_exposure_time [2];
unsigned char g_exposure_time [2];
unsigned char b_exposure_time [2];
#endif
u_int8_t winid;
u_int8_t pad0;
u_int8_t xres [2];
u_int8_t yres [2];
u_int8_t ulx [4];
u_int8_t uly [4];
u_int8_t width [4];
u_int8_t length [4];
u_int8_t brightness;
u_int8_t thresh;
u_int8_t contrast;
u_int8_t image_comp;
u_int8_t bpc;
u_int8_t halftone [2];
u_int8_t pad_type;
u_int8_t bitordering [2];
u_int8_t compr_type;
u_int8_t compr_arg;
u_int8_t pad4 [6];
u_int8_t vendor_specid;
u_int8_t paralen;
u_int8_t bitset1;
u_int8_t highlight;
u_int8_t shadow;
u_int8_t linewidth [2];
u_int8_t linecount [2];
u_int8_t bitset2;
u_int8_t pad5;
u_int8_t r_exposure_time [2];
u_int8_t g_exposure_time [2];
u_int8_t b_exposure_time [2];
};
struct page_header
{
char pad0 [4];
char code;
char length;
u_int8_t pad0 [4];
u_int8_t code;
u_int8_t length;
};
struct avision_page
{
char gamma;
char thresh;
char masks;
char delay;
char features;
char pad0;
u_int8_t gamma;
u_int8_t thresh;
u_int8_t masks;
u_int8_t delay;
u_int8_t features;
u_int8_t pad0;
};
/* 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)
/* 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 */

Wyświetl plik

@ -2,7 +2,8 @@
.IX sane-avision
.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
@ -34,7 +35,6 @@ the first scans!
# this is a comment
#
option force-a4
option allow-usb
option disable-gamma-table
- force-a4:
@ -44,14 +44,15 @@ the first scans!
which retuns the area in a unkown format our backend
doesn't recongize yet.
- allow-usb:
Tells the backend to use USB scanner - which do not
work correctly yet.
- disable-gamma-table:
Disables the usage of the scanner's gamma-table. You
might try this if your scans hang, or only produces
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"
This backend expects device names of the form: