Merge branch 'master' of ssh://git.debian.org/git/sane/sane-backends

merge-requests/1/head
Nicolas Martin 2010-11-25 21:57:03 +01:00
commit 3d5cfff36a
18 zmienionych plików z 429 dodań i 220 usunięć

Wyświetl plik

@ -1,3 +1,53 @@
2010-11-24 m. allan noah <kitno455 at gmail dot com>
* backend/fujitsu.c, backend/fujitsu.conf.in,
doc/descriptions/fujitsu.desc, doc/sane-fujitsu.man:
Fujitsu backend versions 103 and 104
- remove compiled-in default config file
- initial support for new fi-6xxx machines
- never request more than s->buffer_size from scanner
- silence noisy set_window() calls from init_interlace()
2010-11-19 Julien Blache <jb@jblache.org>
* doc/descriptions-external/epkowa.desc: update for iScan 2.26.1,
from Olaf Meeuwissen <olaf.meeuwissen@avasys.jp>.
2010-11-17 Stéphane Voltz <stef.dev@free.fr>
* backend/genesys.c: don't write scan data unless specified by debug
level.
2010-11-08 Marc Deslauriers <marc.deslauriers@ubuntu.com>
* backend/v4l.c: convert v4l1 BGR data to RGB; v4l1 always returns
BGR for RGB due to a coding error way back.
2010-11-07 Marc Deslauriers <marc.deslauriers@ubuntu.com>
* backend/v4l.c: loop through the read buffers in the v4l backend so
we don't get stale frames.
2010-11-06 Stéphane Voltz <stef.dev@free.fr>
* frontend/scanimage.c doc/scanimage.man: add -A/--all-options to list
all control options exposed by a backend.
2010-11-01 Stéphane Voltz <stef.dev@free.fr>
* frontend/scanimage.c: don't print readonly device options since
they can't be set on command line
2010-11-01 Stéphane Voltz <stef.dev@free.fr>
* backend/genesys.c backend/genesys_devices.c backend/genesys_gl843.c
backend/genesys_gl843.h backend/genesys_gl847.c: up build number to 41,
rework head parking,
fixed clear-calibration option reading,
make calibration cache expire for non sheetfed gl847 scanners,
tuned KV-SS080 timings to improve image quality,
raised LiDE 100/200 defaukt gamma to 1.7
2010-10-31 Julien Blache <jb@jblache.org>
* doc/descriptions/hp.desc: add SCSI IDs for ScanJet 4c.
2010-10-30 Julien Blache <jb@jblache.org>
* backend/xerox_mfp.conf.in, doc/descriptions/xerox_mfp.desc: add
Samsung SCX 4824 & 4825FN (Debian #601748). Resync desc file with
config file.
2010-10-13 Stéphane Voltz <stef.dev@free.fr>
* backend/genesys_devices.c backend/genesys_gl843.c
backend/genesys_gl843.h: added 100, 150, 400 and 600 dpi modes for

Wyświetl plik

@ -8,9 +8,14 @@
Copyright (C) 2001-2004 Oliver Schirrmeister
Copyright (C) 2003-2010 m. allan noah
JPEG output support funded by Archivista GmbH, www.archivista.ch
Endorser support funded by O A S Oilfield Accounting Service Ltd, www.oas.ca
Automatic length detection support funded by Martin G. Miller
JPEG output and low memory usage support funded by:
Archivista GmbH, www.archivista.ch
Endorser support funded by:
O A S Oilfield Accounting Service Ltd, www.oas.ca
Automatic length detection support funded by:
Martin G. Miller, mgmiller at optonline.net
Software image enhancement routines funded by:
Fujitsu Computer Products of America, Inc. www.fcpa.com
--------------------------------------------------------------------------
@ -466,6 +471,12 @@
- fix compilation bug when jpeg is enabled
v102 2010-09-22, MAN
- fix infinite loop when scan is an odd number of lines
v103 2010-11-23, MAN
- remove compiled-in default config file
- initial support for new fi-6xxx machines
v104 2010-11-24, MAN
- never request more than s->buffer_size from scanner
- silence noisy set_window() calls from init_interlace()
SANE FLOW DIAGRAM
@ -515,7 +526,7 @@
#include "fujitsu.h"
#define DEBUG 1
#define BUILD 101
#define BUILD 104
/* values for SANE_DEBUG_FUJITSU env var:
- errors 5
@ -740,103 +751,8 @@ sane_get_devices (const SANE_Device *** device_list, SANE_Bool local_only)
}
else {
DBG (5, "sane_get_devices: no config file '%s', using defaults\n", FUJITSU_CONFIG_FILE);
DBG (15, "sane_get_devices: looking for 'scsi FUJITSU'\n");
sanei_config_attach_matching_devices ("scsi FUJITSU", attach_one_scsi);
DBG (15, "sane_get_devices: looking for 'usb 0x04c5 0x1041'\n");
sanei_usb_attach_matching_devices("usb 0x04c5 0x1041", attach_one_usb);
DBG (15, "sane_get_devices: looking for 'usb 0x04c5 0x1042'\n");
sanei_usb_attach_matching_devices("usb 0x04c5 0x1042", attach_one_usb);
DBG (15, "sane_get_devices: looking for 'usb 0x04c5 0x1078'\n");
sanei_usb_attach_matching_devices("usb 0x04c5 0x1078", attach_one_usb);
DBG (15, "sane_get_devices: looking for 'usb 0x04c5 0x1095'\n");
sanei_usb_attach_matching_devices("usb 0x04c5 0x1095", attach_one_usb);
DBG (15, "sane_get_devices: looking for 'usb 0x04c5 0x1096'\n");
sanei_usb_attach_matching_devices("usb 0x04c5 0x1096", attach_one_usb);
DBG (15, "sane_get_devices: looking for 'usb 0x04c5 0x1097'\n");
sanei_usb_attach_matching_devices("usb 0x04c5 0x1097", attach_one_usb);
DBG (15, "sane_get_devices: looking for 'usb 0x04c5 0x10ad'\n");
sanei_usb_attach_matching_devices("usb 0x04c5 0x10ad", attach_one_usb);
DBG (15, "sane_get_devices: looking for 'usb 0x04c5 0x10ae'\n");
sanei_usb_attach_matching_devices("usb 0x04c5 0x10ae", attach_one_usb);
DBG (15, "sane_get_devices: looking for 'usb 0x04c5 0x10af'\n");
sanei_usb_attach_matching_devices("usb 0x04c5 0x10af", attach_one_usb);
DBG (15, "sane_get_devices: looking for 'usb 0x04c5 0x10cf'\n");
sanei_usb_attach_matching_devices("usb 0x04c5 0x10cf", attach_one_usb);
DBG (15, "sane_get_devices: looking for 'usb 0x04c5 0x10e0'\n");
sanei_usb_attach_matching_devices("usb 0x04c5 0x10e0", attach_one_usb);
DBG (15, "sane_get_devices: looking for 'usb 0x04c5 0x10e1'\n");
sanei_usb_attach_matching_devices("usb 0x04c5 0x10e1", attach_one_usb);
DBG (15, "sane_get_devices: looking for 'usb 0x04c5 0x10e2'\n");
sanei_usb_attach_matching_devices("usb 0x04c5 0x10e2", attach_one_usb);
DBG (15, "sane_get_devices: looking for 'usb 0x04c5 0x10e6'\n");
sanei_usb_attach_matching_devices("usb 0x04c5 0x10e6", attach_one_usb);
DBG (15, "sane_get_devices: looking for 'usb 0x04c5 0x10e7'\n");
sanei_usb_attach_matching_devices("usb 0x04c5 0x10e7", attach_one_usb);
DBG (15, "sane_get_devices: looking for 'usb 0x04c5 0x10f2'\n");
sanei_usb_attach_matching_devices("usb 0x04c5 0x10f2", attach_one_usb);
DBG (15, "sane_get_devices: looking for 'usb 0x04c5 0x10fe'\n");
sanei_usb_attach_matching_devices("usb 0x04c5 0x10fe", attach_one_usb);
DBG (15, "sane_get_devices: looking for 'usb 0x04c5 0x1135'\n");
sanei_usb_attach_matching_devices("usb 0x04c5 0x1135", attach_one_usb);
DBG (15, "sane_get_devices: looking for 'usb 0x04c5 0x114a'\n");
sanei_usb_attach_matching_devices("usb 0x04c5 0x114a", attach_one_usb);
DBG (15, "sane_get_devices: looking for 'usb 0x04c5 0x114d'\n");
sanei_usb_attach_matching_devices("usb 0x04c5 0x114d", attach_one_usb);
DBG (15, "sane_get_devices: looking for 'usb 0x04c5 0x114e'\n");
sanei_usb_attach_matching_devices("usb 0x04c5 0x114e", attach_one_usb);
DBG (15, "sane_get_devices: looking for 'usb 0x04c5 0x114f'\n");
sanei_usb_attach_matching_devices("usb 0x04c5 0x114f", attach_one_usb);
DBG (15, "sane_get_devices: looking for 'usb 0x04c5 0x1150\n");
sanei_usb_attach_matching_devices("usb 0x04c5 0x1150", attach_one_usb);
DBG (15, "sane_get_devices: looking for 'usb 0x04c5 0x1155'\n");
sanei_usb_attach_matching_devices("usb 0x04c5 0x1155", attach_one_usb);
DBG (15, "sane_get_devices: looking for 'usb 0x04c5 0x116f'\n");
sanei_usb_attach_matching_devices("usb 0x04c5 0x116f", attach_one_usb);
DBG (15, "sane_get_devices: looking for 'usb 0x04c5 0x1174'\n");
sanei_usb_attach_matching_devices("usb 0x04c5 0x1174", attach_one_usb);
DBG (15, "sane_get_devices: looking for 'usb 0x04c5 0x1175'\n");
sanei_usb_attach_matching_devices("usb 0x04c5 0x1175", attach_one_usb);
DBG (15, "sane_get_devices: looking for 'usb 0x04c5 0x1176'\n");
sanei_usb_attach_matching_devices("usb 0x04c5 0x1176", attach_one_usb);
DBG (15, "sane_get_devices: looking for 'usb 0x04c5 0x1177'\n");
sanei_usb_attach_matching_devices("usb 0x04c5 0x1177", attach_one_usb);
DBG (15, "sane_get_devices: looking for 'usb 0x04c5 0x1178'\n");
sanei_usb_attach_matching_devices("usb 0x04c5 0x1178", attach_one_usb);
DBG (15, "sane_get_devices: looking for 'usb 0x04c5 0x11a2'\n");
sanei_usb_attach_matching_devices("usb 0x04c5 0x11a2", attach_one_usb);
DBG (5, "sane_get_devices: missing required config file '%s'!\n",
FUJITSU_CONFIG_FILE);
}
/*delete missing scanners from list*/
@ -1644,7 +1560,7 @@ static SANE_Status
init_ms(struct fujitsu *s)
{
int ret;
int oldDbg;
int oldDbg=0;
unsigned char cmd[MODE_SENSE_len];
size_t cmdLen = MODE_SENSE_len;
@ -1659,8 +1575,6 @@ init_ms(struct fujitsu *s)
return SANE_STATUS_GOOD;
}
oldDbg=0;
/* some of the following probes will produce errors */
/* so we reduce the dbg level to reduce the noise */
/* however, if user builds with NDEBUG, we can't do that */
@ -2176,6 +2090,7 @@ init_interlace (struct fujitsu *s)
{
SANE_Status ret = SANE_STATUS_GOOD;
int curr_mode = s->mode;
int oldDbg=0;
DBG (10, "init_interlace: start\n");
@ -2204,12 +2119,22 @@ init_interlace (struct fujitsu *s)
s->color_interlace <= COLOR_INTERLACE_RRGGBB;
s->color_interlace++){
/* some of the following probes will produce errors */
/* so we reduce the dbg level to reduce the noise */
/* however, if user builds with NDEBUG, we can't do that */
/* so we protect the code with the following macro */
IF_DBG( oldDbg=DBG_LEVEL; )
IF_DBG( if(DBG_LEVEL < 35){ DBG_LEVEL = 0; } )
ret = set_window(s);
IF_DBG (DBG_LEVEL = oldDbg;)
if (ret == SANE_STATUS_GOOD){
break;
}
else{
DBG (5, "init_interlace: not %d\n", s->color_interlace);
DBG (15, "init_interlace: not %d\n", s->color_interlace);
}
}
@ -7101,6 +7026,9 @@ read_from_JPEGduplex(struct fujitsu *s)
if(bytes > remain){
bytes = remain;
}
if(bytes > s->buffer_size){
bytes = s->buffer_size;
}
DBG(15, "read_from_JPEGduplex: fto:%d frx:%d bto:%d brx:%d re:%d pa:%d\n",
s->bytes_tot[SIDE_FRONT], s->bytes_rx[SIDE_FRONT],
@ -7359,6 +7287,9 @@ read_from_3091duplex(struct fujitsu *s)
if(bytes > remain){
bytes = remain;
}
if(bytes > s->buffer_size){
bytes = s->buffer_size;
}
/* all requests must end on line boundary */
bytes -= (bytes % s->params.bytes_per_line);
@ -7479,6 +7410,9 @@ read_from_scanner(struct fujitsu *s, int side)
if(bytes > remain){
bytes = remain;
}
if(bytes > s->buffer_size){
bytes = s->buffer_size;
}
/* all requests must end on line boundary */
bytes -= (bytes % s->params.bytes_per_line);

Wyświetl plik

@ -107,5 +107,38 @@ usb 0x04c5 0x1177
#fi-6750S
usb 0x04c5 0x1178
#fi-6800
usb 0x04c5 0x119d
#fi-6800-CGA
usb 0x04c5 0x119e
#fi-6900
usb 0x04c5 0x119f
#fi-6900-CGA
usb 0x04c5 0x11a0
#S1500 & S1500M
usb 0x04c5 0x11a2
#fi-6125
usb 0x04c5 0x11ee
#fi-6225
usb 0x04c5 0x11ef
#fi-6145
usb 0x04c5 0x11f1
#fi-6245
usb 0x04c5 0x11f2
#fi-6135
usb 0x04c5 0x11f3
#fi-6235
usb 0x04c5 0x11f4
#fi-6110
usb 0x04c5 0x11fc

Wyświetl plik

@ -53,12 +53,12 @@
*/
/*
* SANE backend for Genesys Logic GL646/GL841/GL843/GL847 based scanners
* SANE backend for Genesys Logic GL646/GL841/GL842/GL843/GL847 based scanners
*/
#include "../include/sane/config.h"
#define BUILD 33
#define BUILD 41
#include <errno.h>
#include <string.h>
@ -5137,7 +5137,7 @@ genesys_fill_read_buffer (Genesys_Device * dev)
return SANE_STATUS_IO_ERROR;
}
#ifdef SANE_DEBUG_LOG_RAW_DATA
if (rawfile != NULL)
if (rawfile != NULL && DBG_LEVEL >= DBG_data)
{
/*TODO: convert big/little endian if depth == 16.
note: xv got this wrong for P5/P6. */
@ -5347,7 +5347,7 @@ genesys_read_ordered_data (Genesys_Device * dev, SANE_Byte * destination,
return SANE_STATUS_EOF;
}
#ifdef SANE_DEBUG_LOG_RAW_DATA
if (rawfile == NULL)
if (rawfile == NULL && DBG_LEVEL >= DBG_data)
{
rawfile = fopen ("raw.pnm", "wb");
if (rawfile != NULL)
@ -7275,12 +7275,7 @@ sane_close (SANE_Handle handle)
{
s->dev->model->cmd_set->eject_document (s->dev);
}
else
{
/* for flatbed scanners, get sure the head is parked before leaving */
s->dev->model->cmd_set->slow_back_home (s->dev, SANE_TRUE);
}
/* here is the place to store calibration cache */
write_calibration (s->dev);
@ -7384,6 +7379,7 @@ get_option_value (Genesys_Scanner * s, int option, void *val)
case OPT_THRESHOLD:
case OPT_THRESHOLD_CURVE:
case OPT_DISABLE_DYNAMIC_LINEART:
case OPT_CLEAR_CALIBRATION:
case OPT_DISABLE_INTERPOLATION:
case OPT_LAMP_OFF_TIME:
case OPT_SWDESKEW:

Wyświetl plik

@ -439,7 +439,7 @@ static Genesys_Sensor Sensor[] = {
0x41
}
,
1.0, 1.0, 1.0,
1.7, 1.7, 1.7,
NULL, NULL, NULL}
,
/* CANONLIDE100 */
@ -465,7 +465,7 @@ static Genesys_Sensor Sensor[] = {
0x41
}
,
1.0, 1.0, 1.0,
1.7, 1.7, 1.7,
NULL, NULL, NULL}
,
{CCD_KVSS080,
@ -473,13 +473,13 @@ static Genesys_Sensor Sensor[] = {
38, /* black pixels on left */
38, /* 36 dummy pixels */
152,
5200, /* 5100 */
5376, /* 5100-> 5200 */
160, /* TAU white ref */
160, /* gain white ref */
/* 08 09 0a 0b */
{0x00, 0x00, 0x00, 0x6a} ,
/* 10 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d */
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x33, 0x1c, 0x01, 0x2a, 0x2c, 0x00, 0x20, 0x04} , /* 18=00 at 600 dpi */
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x33, 0x1c, 0x00, 0x2a, 0x2c, 0x00, 0x20, 0x04} , /* 18=00 at 600 dpi */
/* 52 53 54 55 56 57 58 59 5a 5b 5c 5d 5e */
{0x0c, 0x0f, 0x00, 0x03, 0x06, 0x09, 0x6b, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x23} ,
1.0, 1.0, 1.0,
@ -1004,15 +1004,15 @@ static Genesys_Model panasonic_kvss080_model = {
GENESYS_GL843,
NULL,
{ 600, 500, 400, 300, 200, 150, 100, 75, 0}, /* possible x-resolutions */
{ 1200, 600, 500, 400, 300, 200, 150, 100, 75, 0}, /* possible y-resolutions */
{ 600, /* 500, 400,*/ 300, 200, 150, 100, 75, 0}, /* possible x-resolutions */
{ 1200, 600, /* 500, 400, */ 300, 200, 150, 100, 75, 0}, /* possible y-resolutions */
{16, 8, 0}, /* possible depths in gray mode */
{16, 8, 0}, /* possible depths in color mode */
SANE_FIX (7.6), /* Start of scan area in mm (x) */
SANE_FIX (13.8), /* Start of scan area in mm (y) */
SANE_FIX (218.5), /* Size of scan area in mm (x) */
SANE_FIX (297.0), /* Size of scan area in mm (y) */
SANE_FIX (7.2), /* Start of scan area in mm (x) */
SANE_FIX (14.7), /* Start of scan area in mm (y) */
SANE_FIX (217.7), /* Size of scan area in mm (x) */
SANE_FIX (300.0), /* Size of scan area in mm (y) */
SANE_FIX (9.0), /* Start of white strip in mm (y) */
SANE_FIX (0.0), /* Start of black mark in mm (x) */
@ -1055,8 +1055,8 @@ static Genesys_Model hpg4010_model = {
GENESYS_GL843,
NULL,
{ /*2400, 1200, */600, 400, 300, 200, 150, 100, 0}, /* TODO when settled down, add 800 and 1600 */
{ /*2400, 1200, */600, 400, 300, 200, 150, 100, 0}, /* TODO 4800 available */
{ 2400, 1200, 600, 400, 300, 200, 150, 100, 0}, /* TODO when settled down, add 800 and 1600 */
{ 2400, 1200, 600, 400, 300, 200, 150, 100, 0}, /* TODO 4800 available */
{16, 8, 0}, /* possible depths in gray mode */
{16, 8, 0}, /* possible depths in color mode */
@ -1107,8 +1107,8 @@ static Genesys_Model hpg4050_model = {
GENESYS_GL843,
NULL,
{ /*2400, 1200, */600, 400, 300, 200, 150, 100, 0}, /* TODO when settled down, add 800 and 1600 */
{ /*2400, 1200, */600, 400, 300, 200, 150, 100, 0}, /* TODO 4800 available */
{ 2400, 1200, 600, 400, 300, 200, 150, 100, 0}, /* TODO when settled down, add 800 and 1600 */
{ 2400, 1200, 600, 400, 300, 200, 150, 100, 0}, /* TODO 4800 available */
{16, 8, 0}, /* possible depths in gray mode */
{16, 8, 0}, /* possible depths in color mode */

Wyświetl plik

@ -597,22 +597,6 @@ gl843_setup_sensor (Genesys_Device * dev, Genesys_Register_Set * regs, int dpi)
/* TODO we need to create another data struct
* for CKxMAP and CKSEL */
/* use x1 cksel when at higher resolutions */
/* KV-SS080 sensor */
if (dev->model->ccd_type == CCD_KVSS080)
{
if(dpi>dev->sensor.optical_res/2)
{
r = sanei_genesys_get_address (regs, 0x18);
r->value &= ~REG18_CKSEL;
sanei_genesys_write_register (dev, 0x78, 0x03);
}
else
{
sanei_genesys_write_register (dev, 0x78, 0x07);
}
}
/* G4050/G4010 sensor */
if (dev->model->ccd_type == CCD_G4050)
{
@ -630,9 +614,17 @@ gl843_setup_sensor (Genesys_Device * dev, Genesys_Register_Set * regs, int dpi)
}
else /* 800 to 2400 case */
{
sanei_genesys_write_register (dev, 0x74, 0x00);
sanei_genesys_write_register (dev, 0x75, 0x3f);
sanei_genesys_write_register (dev, 0x5a, 0x40);
sanei_genesys_write_register (dev, 0x74, 0x0f);
sanei_genesys_write_register (dev, 0x75, 0xff);
sanei_genesys_write_register (dev, 0x76, 0xff);
sanei_genesys_write_register (dev, 0x77, 0x00);
sanei_genesys_write_register (dev, 0x78, 0x01);
sanei_genesys_write_register (dev, 0x7a, 0x00);
sanei_genesys_write_register (dev, 0x7b, 0x01);
sanei_genesys_write_register (dev, 0x7d, 0x90);
sanei_genesys_write_register (dev, 0x80, 0x05);
sanei_genesys_write_register (dev, 0x9e, 0xc0);
}
}
@ -1161,7 +1153,7 @@ gl843_get_dpihw (Genesys_Device * dev)
return 0;
}
/**@brief compute hardware sensor dpi exposure to use
/**@brief compute hardware sensor dpi to use
* compute the sensor hardware dpi based on target resolution
*/
static int gl843_compute_dpihw(Genesys_Device *dev, int xres)
@ -1196,11 +1188,11 @@ static int gl843_compute_exposure(Genesys_Device *dev, int xres)
switch(dev->model->ccd_type)
{
case CCD_G4050:
if(xres<1200)
if(xres<=600)
{
return 8016;
}
return 21376;
return 56064 /* 21376 */;
case CCD_KVSS080:
default:
return 8000;
@ -1497,7 +1489,9 @@ gl843_get_led_exposure (Genesys_Device * dev)
static
#endif
SANE_Status
gl843_init_scan_regs (Genesys_Device * dev, Genesys_Register_Set * reg, float xres, /*dpi */
gl843_init_scan_regs (Genesys_Device * dev,
Genesys_Register_Set * reg,
float xres, /*dpi */
float yres, /*dpi */
float startx, /*optical_res, from dummy_pixel+1 */
float starty, /*base_ydpi, from home! */
@ -2365,7 +2359,6 @@ gl843_begin_scan (Genesys_Device * dev, Genesys_Register_Set * reg,
RIE(sanei_genesys_write_register(dev,0x7e,0x01));
}
/* clear scan and feed count */
RIE (sanei_genesys_write_register (dev, REG0D, REG0D_CLRLNCNT | REG0D_CLRMCNT));
@ -2426,7 +2419,8 @@ gl843_end_scan (Genesys_Device * dev, Genesys_Register_Set * reg,
}
/* Moves the slider to the home (top) position slowly */
/** @brief Moves the slider to the home (top) position slowly
* */
#ifndef UNIT_TESTING
static
#endif
@ -2437,6 +2431,8 @@ gl843_slow_back_home (Genesys_Device * dev, SANE_Bool wait_until_home)
SANE_Status status;
Genesys_Register_Set *r;
uint8_t val;
float resolution;
int loop = 0;
DBG (DBG_proc, "gl843_slow_back_home (wait_until_home = %d)\n",
wait_until_home);
@ -2464,32 +2460,35 @@ gl843_slow_back_home (Genesys_Device * dev, SANE_Bool wait_until_home)
memcpy (local_reg, dev->reg,
GENESYS_GL843_MAX_REGS * sizeof (Genesys_Register_Set));
resolution=gl843_get_lowest_ydpi(dev);
gl843_init_scan_regs (dev,
local_reg,
300,
300,
dev->sensor.sensor_pixels/4,
0,
dev->sensor.sensor_pixels/2,
1,
resolution,
resolution,
100,
100,
100,
100,
8,
3,
dev->settings.color_filter,
SCAN_FLAG_DISABLE_SHADING |
SCAN_FLAG_DISABLE_GAMMA |
SCAN_FLAG_SINGLE_LINE |
SCAN_FLAG_IGNORE_LINE_DISTANCE);
gl843_init_motor_regs_scan (dev,
local_reg,
gl843_compute_exposure (dev, 300),
300,
gl843_compute_exposure (dev, resolution),
resolution,
gl843_compute_step_type(dev, resolution),
1,
1,
1,
30000,
30000, /* feed steps */
0,
0);
/* clear scan and feed count */
RIE (sanei_genesys_write_register (dev, REG0D, REG0D_CLRLNCNT | REG0D_CLRMCNT));
/* set up for reverse and no scan */
r = sanei_genesys_get_address (local_reg, REG02);
@ -2497,7 +2496,7 @@ gl843_slow_back_home (Genesys_Device * dev, SANE_Bool wait_until_home)
r = sanei_genesys_get_address (local_reg, REG01);
r->value &= ~REG01_SCAN;
RIE ( gl843_bulk_write_register (dev, local_reg, GENESYS_GL843_MAX_REGS));
RIE (gl843_bulk_write_register (dev, local_reg, GENESYS_GL843_MAX_REGS));
status = gl843_start_action (dev);
if (status != SANE_STATUS_GOOD)
@ -2513,7 +2512,6 @@ gl843_slow_back_home (Genesys_Device * dev, SANE_Bool wait_until_home)
if (wait_until_home)
{
int loop = 0;
while (loop < 300) /* do not wait longer then 30 seconds */
{
@ -2737,7 +2735,7 @@ gl843_init_regs_for_shading (Genesys_Device * dev)
dev->calib_channels = 3;
dev->calib_pixels = dev->sensor.sensor_pixels;
resolution=dev->sensor.optical_res;
resolution=gl843_compute_dpihw(dev,dev->settings.xres);
/* distance to move to reach white target */
move = SANE_UNFIX (dev->model->y_offset_calib);
@ -3575,7 +3573,7 @@ gl843_is_compatible_calibration (Genesys_Device * dev,
sane_strstatus (status));
return status;
}
resolution=dev->sensor.optical_res;
resolution=gl843_compute_dpihw(dev,dev->settings.xres);
dev->current_setup.scan_method = dev->settings.scan_method;
DBG (DBG_proc, "gl843_is_compatible_calibration: checking\n");
@ -3699,7 +3697,7 @@ gl843_cold_boot (Genesys_Device * dev)
/* URB 14 control 0x40 0x0c 0x8c 0x10 len 1 wrote 0xb4 */
RIE (write_end_access (dev, 0x10, 0xb4));
/* set up clock once for all TODO use sensor type for these sensor realted registers */
/* set up clock once for all TODO use sensor type for these sensor related registers */
if (strncmp (dev->model->name, "hewlett-packard-scanjet-g40", 27) == 0)
{
/* CK1MAP */
@ -3719,8 +3717,8 @@ gl843_cold_boot (Genesys_Device * dev)
RIE (sanei_genesys_write_register (dev, 0x76, 0x00));
/* CK3MAP */
RIE (sanei_genesys_write_register (dev, 0x77, 0x00));
RIE (sanei_genesys_write_register (dev, 0x78, 0x07));
RIE (sanei_genesys_write_register (dev, 0x79, 0xfe));
RIE (sanei_genesys_write_register (dev, 0x78, 0xff));
RIE (sanei_genesys_write_register (dev, 0x79, 0xff));
}
/* CK4MAP */
RIE (sanei_genesys_write_register (dev, 0x7a, 0x03));

Wyświetl plik

@ -532,6 +532,7 @@ static Motor_Profile motors[]={
{MOTOR_KVSS080, 8000, kvss080},
{MOTOR_G4050, 8016, g4050},
{MOTOR_G4050, 21376, g4050},
{MOTOR_G4050, 56064, g4050},
};
/* *INDENT-ON* */

Wyświetl plik

@ -3952,6 +3952,9 @@ gl847_is_compatible_calibration (Genesys_Device * dev,
Genesys_Calibration_Cache * cache,
int for_overwrite)
{
#ifdef HAVE_SYS_TIME_H
struct timeval time;
#endif
SANE_Status status;
DBG (DBG_proc, "gl847_is_compatible_calibration\n");
@ -3971,6 +3974,19 @@ gl847_is_compatible_calibration (Genesys_Device * dev,
if (dev->current_setup.half_ccd != cache->used_setup.half_ccd)
return SANE_STATUS_UNSUPPORTED;
/* a cache entry expires after 60 minutes for non sheetfed scanners */
#ifdef HAVE_SYS_TIME_H
gettimeofday (&time, NULL);
if ((time.tv_sec - cache->last_calibration > 60 * 60)
&& (dev->model->is_sheetfed == SANE_FALSE)
&& (dev->settings.scan_method == SCAN_METHOD_FLATBED))
{
DBG (DBG_proc,
"gl847_is_compatible_calibration: expired entry, non compatible cache\n");
return SANE_STATUS_UNSUPPORTED;
}
#endif
DBG (DBG_proc, "gl847_is_compatible_calibration: completed\n");
return SANE_STATUS_GOOD;

Wyświetl plik

@ -949,8 +949,9 @@ sane_get_parameters (SANE_Handle handle, SANE_Parameters * params)
SANE_Status
sane_start (SANE_Handle handle)
{
int len;
int len, loop;
V4L_Scanner *s;
char data;
DBG (2, "sane_start\n");
for (s = first_handle; s; s = s->next)
@ -1005,23 +1006,42 @@ sane_start (SANE_Handle handle)
s->mmap.format = s->pict.palette;
DBG (2, "sane_start: mmapped frame %d x %d with palette %d\n",
s->mmap.width, s->mmap.height, s->mmap.format);
len = v4l1_ioctl (s->fd, VIDIOCMCAPTURE, &s->mmap);
if (len == -1)
{
DBG (1, "sane_start: ioctl VIDIOCMCAPTURE failed: %s\n",
strerror (errno));
return SANE_STATUS_INVAL;
}
DBG (3, "sane_start: waiting for frame %x\n", s->mmap.frame);
len = v4l1_ioctl (s->fd, VIDIOCSYNC, &(s->mmap.frame));
if (-1 == len)
{
DBG (1, "sane_start: call to ioctl(%d, VIDIOCSYNC, ..) failed\n",
s->fd);
return SANE_STATUS_INVAL;
}
/* We need to loop here to empty the read buffers, so we don't
get a stale image */
for (loop = 0; loop <= s->mbuf.frames; loop++)
{
len = v4l1_ioctl (s->fd, VIDIOCMCAPTURE, &s->mmap);
if (len == -1)
{
DBG (1, "sane_start: ioctl VIDIOCMCAPTURE failed: %s\n",
strerror (errno));
return SANE_STATUS_INVAL;
}
DBG (3, "sane_start: waiting for frame %x, loop %d\n", s->mmap.frame, loop);
len = v4l1_ioctl (s->fd, VIDIOCSYNC, &(s->mmap.frame));
if (-1 == len)
{
DBG (1, "sane_start: call to ioctl(%d, VIDIOCSYNC, ..) failed\n",
s->fd);
return SANE_STATUS_INVAL;
}
}
DBG (3, "sane_start: frame %x done\n", s->mmap.frame);
}
/* v4l1 actually returns BGR when we ask for RGB, so convert it */
if (s->pict.palette == VIDEO_PALETTE_RGB24)
{
DBG (3, "sane_start: converting from BGR to RGB\n");
for (loop = 0; loop < (s->window.width * s->window.height * 3); loop += 3)
{
data = *(buffer + loop);
*(buffer + loop) = *(buffer + loop + 2);
*(buffer + loop + 2) = data;
}
}
DBG (3, "sane_start: done\n");
return SANE_STATUS_GOOD;
}

Wyświetl plik

@ -24,6 +24,9 @@ usb 0x04e8 0x3426
# Samsung SCX-4500W
usb 0x04e8 0x342b
# Samsung SCX-4824
usb 0x04e8 0x342c
# Samsung SCX-4300
usb 0x04e8 0x342e
@ -36,6 +39,9 @@ usb 0x0924 0x4265
#Samsung SCX-4623
usb 0x04e8 0x3434
# Samsung SCX-4825FN
usb 0x04e8 0x343c
#Xerox WorkCentre 4118 Series
usb 0x0924 0x420c

Wyświetl plik

@ -38,7 +38,7 @@
;; Backend data.
;;
:backend "epkowa"
:version "iscan 2.26.0/iscan-data 1.3.0"
:version "iscan 2.26.1/iscan-data 1.5.0"
:url "http://www.avasys.jp/english/linux_e/"
;:comment "Based on the epson backend of sane-backends-1.0.15."
@ -100,6 +100,18 @@
:status :good
:comment "network interface not supported"
:model "AcuLaser MX20DN"
:interface "USB"
:usbid "0x04b8" "0x0866"
:status :complete
:comment "network interface not supported<br>business all-in-one"
:model "AcuLaser MX20DNF"
:interface "USB"
:usbid "0x04b8" "0x0866"
:status :complete
:comment "network interface not supported<br>business all-in-one"
:model "Artisan 700"
:interface "USB"
:usbid "0x04b8" "0x0846"
@ -905,6 +917,12 @@
:status :good
:comment "network interface option supported via DFSG non-free iscan-network-nt package<br>all-in-one"
:model "ME OFFICE 620F Series"
:interface "USB"
:usbid "0x04b8" "0x0863"
:status :complete
:comment "network interface option supported via DFSG non-free iscan-network-nt package<br>all-in-one"
:model "ME OFFICE 650FN Series"
:interface "USB"
:usbid "0x04b8" "0x0854"
@ -1856,12 +1874,24 @@
:status :complete
:comment "network interface supported via DFSG non-free iscan-network-nt package<br>all-in-one<br>overseas version of the PX-602F"
:model "Stylus Office TX620FWD Series"
:interface "USB"
:usbid "0x04b8" "0x085d"
:status :complete
:comment "network interface supported via DFSG non-free iscan-network-nt package<br>all-in-one"
:model "Stylus Photo PX650 Series"
:interface "USB"
:usbid "0x04b8" "0x0850"
:status :complete
:comment "network interface supported via DFSG non-free iscan-network-nt package<br>all-in-one<br>overseas version of the EP-702A"
:model "Stylus Photo PX660 Series"
:interface "USB"
:usbid "0x04b8" "0x0862"
:status :complete
:comment "network interface option supported via DFSG non-free iscan-network-nt package<br>all-in-one<br>overseas version of the EP-703A"
:model "Stylus Photo PX700W"
:interface "USB"
:usbid "0x04b8" "0x0846"
@ -2312,6 +2342,12 @@
:status :good
:comment "all-in-one<br>overseas version of the PX-502A"
:model "Stylus TX560WD Series"
:interface "USB"
:usbid "0x04b8" "0x085e"
:status :complete
:comment "network interface supported via DFSG non-free iscan-network-nt package<br>all-in-one<br>overseas version of the PX-503A"
:model "WorkForce 310 Series"
:interface "USB"
:usbid "0x04b8" "0x0854"

Wyświetl plik

@ -36,7 +36,7 @@
:model "ScanSnap S300M"
:interface "USB"
:status :untested
:status :good
:usbid "0x04c5" "0x117f"
:comment "Same as S300, with different usb id"

Wyświetl plik

@ -12,9 +12,9 @@
:backend "fujitsu" ; name of backend
:url "http://www.thebility.com/fujitsu/"
:version "98" ; version of backend
:version "103" ; version of backend
:manpage "sane-fujitsu" ; name of manpage (if it exists)
:comment "Backend updated for SANE release 1.0.21, see sane-fujitsu manpage"
:comment "Backend updated for SANE release 1.0.22, see sane-fujitsu manpage"
:devicetype :scanner ; start of a list of devices....
; other types: :stillcam, :vidcam,
; :meta, :api
@ -162,6 +162,48 @@
:usbid "0x04c5" "0x11a2"
:comment "small, current, same as S1500"
:model "fi-6125"
:interface "USB"
:status :untested
:usbid "0x04c5" "0x11ee"
:comment "small, unreleased"
:model "fi-6225"
:interface "USB"
:status :untested
:usbid "0x04c5" "0x11ef"
:comment "small, unreleased"
:model "fi-6145"
:interface "USB"
:status :untested
:usbid "0x04c5" "0x11f1"
:comment "small, unreleased"
:model "fi-6245"
:interface "USB"
:status :untested
:usbid "0x04c5" "0x11f2"
:comment "small, unreleased"
:model "fi-6135"
:interface "USB"
:status :untested
:usbid "0x04c5" "0x11f3"
:comment "small, unreleased"
:model "fi-6235"
:interface "USB"
:status :untested
:usbid "0x04c5" "0x11f4"
:comment "small, unreleased"
:model "fi-6110"
:interface "USB"
:status :good
:usbid "0x04c5" "0x11fc"
:comment "small, unreleased"
;==================================================
; DISCONTINUED OLDER MODELS, MEDIUM
:model "M3093E"
@ -385,6 +427,24 @@
:model "fi-6800"
:interface "SCSI USB"
;:usbid "0x04c5" "0x11xx"
:status :untested
:comment "big, current, similar to fi-5900?"
:usbid "0x04c5" "0x119d"
:comment "big, current"
:model "fi-6800-CGA"
:interface "SCSI USB"
:status :untested
:usbid "0x04c5" "0x119e"
:comment "big, current. VRS CGA board unsupported"
:model "fi-6900"
:interface "SCSI USB"
:status :untested
:usbid "0x04c5" "0x119f"
:comment "big, unreleased, similar to fi-5900?"
:model "fi-6900-CGA"
:interface "SCSI USB"
:status :untested
:usbid "0x04c5" "0x11a0"
:comment "big, unreleased, similar to fi-5900? VRS CGA board unsupported"

Wyświetl plik

@ -52,6 +52,7 @@
:model "ScanJet 4c"
:interface "SCSI"
:status :complete
:scsi "HP" "C2520A" "processor"
:model "ScanJet 4p"
:interface "SCSI"

Wyświetl plik

@ -27,6 +27,16 @@
:usbid "0x0924" "0x420c"
:status :good
:model "WorkCentre 3210"
:interface "USB"
:usbid "0x0924" "0x4293"
:status :good
:model "WorkCentre 3220"
:interface "USB"
:usbid "0x0924" "0x4294"
:status :good
:mfg "Dell"
:url "http://www.dell.com/"
@ -63,6 +73,11 @@
:usbid "0x04e8" "0x342a"
:status :good
:model "SCX-4824"
:interface "USB"
:usbid "0x04e8" "0x342c"
:status :good
:model "SCX-4300"
:interface "USB"
:usbid "0x04e8" "0x342e"
@ -78,6 +93,12 @@
:usbid "0x04e8" "0x3434"
:status :good
:model "SCX-4825FN"
:interface "USB"
:usbid "0x04e8" "0x343c"
:status :good
:model "SCX-4500W"
:interface "Ethernet"
:interface "USB Ethernet"
:usbid "0x04e8" "0x342b"
:status :basic

Wyświetl plik

@ -1,4 +1,4 @@
.TH sane\-fujitsu 5 "10 Feb 2010" "@PACKAGEVERSION@" "SANE Scanner Access Now Easy"
.TH sane\-fujitsu 5 "23 Nov 2010" "@PACKAGEVERSION@" "SANE Scanner Access Now Easy"
.IX sane\-fujitsu
.SH NAME
@ -10,7 +10,7 @@ The
library implements a SANE (Scanner Access Now Easy) backend which
provides access to most Fujitsu flatbed and ADF scanners.
This document describes backend version 98, which shipped with SANE 1.0.21.
This document describes backend version 103, which shipped with SANE 1.0.22.
.SH SUPPORTED HARDWARE
This version supports every known model which speaks the Fujitsu SCSI and
@ -102,8 +102,7 @@ The configuration file "fujitsu.conf" is used to tell the backend how to look
for scanners, and provide options controlling the operation of the backend.
This file is read each time the frontend asks the backend for a list
of scanners, generally only when the frontend starts. If the configuration
file is missing, the backend will use a set of compiled defaults, which
are identical to the default configuration file shipped with SANE.
file is missing, the backend will be unable to locate any scanners.
.PP
Scanners can be specified in the configuration file in 4 ways:
.PP
@ -200,7 +199,7 @@ fi\-4220C and basic USB support: Ron Cemer <ron a t roncemer d o t com>
fi\-4120, fi\-series color, backend re\-write, jpeg, current maintainer:
m. allan noah: <kitno455 a t gmail d o t com>
JPEG output support funded by:
JPEG output and low memory usage support funded by:
Archivista GmbH
www.archivista.ch
@ -216,8 +215,9 @@ Automatic length detection support funded by:
Martin G. Miller
mgmiller at optonline.net
Hardware donated by Fujitsu Computer Products of America, Inc.
http://us.fujitsu.com/fcpa
Software image enhancement routines funded and hardware donated by:
Fujitsu Computer Products of America, Inc.
www.fcpa.com
.SH "SEE ALSO"
sane(7),

Wyświetl plik

@ -26,6 +26,7 @@ scanimage \- scan an image
.RB [ \-p | \-\-progress ]
.RB [ \-n | \-\-dont\-scan ]
.RB [ \-T | \-\-test ]
.RB [ \-A | \-\-all-options ]
.RB [ \-h | \-\-help ]
.RB [ \-v | \-\-verbose ]
.RB [ \-B | \-\-buffer-size
@ -234,6 +235,15 @@ API (in particular the
function is exercised by this test).
.PP
The
.B \-A
or
.B \-\-all-options
option requests that
.B scanimage
lists all available options exposed the backend, including button options.
The information is printed on standard output and no scan will be done.
.PP
The
.B \-h
or
.B \-\-help

Wyświetl plik

@ -87,6 +87,7 @@ static struct option basic_options[] = {
{"verbose", no_argument, NULL, 'v'},
{"progress", no_argument, NULL, 'p'},
{"test", no_argument, NULL, 'T'},
{"all-options", no_argument, NULL, 'A'},
{"version", no_argument, NULL, 'V'},
{"buffer-size", optional_argument, NULL, 'B'},
{"batch", optional_argument, NULL, 'b'},
@ -105,7 +106,7 @@ static struct option basic_options[] = {
#define OUTPUT_PNM 0
#define OUTPUT_TIFF 1
#define BASE_OPTSTRING "d:hi:Lf:B::nvVTbp"
#define BASE_OPTSTRING "d:hi:Lf:B::nvVTAbp"
#define STRIP_HEIGHT 256 /* # lines we increment image height */
static struct option *all_options;
@ -115,6 +116,7 @@ static SANE_Handle device;
static int verbose;
static int progress = 0;
static int test;
static int all;
static int output_format = OUTPUT_PNM;
static int help;
static int dont_scan = 0;
@ -1660,11 +1662,41 @@ scanimage_exit (void)
fprintf (stderr, "scanimage: finished\n");
}
/** @brief print device options to stdout
*
* @param device struct of the opened device to describe
* @param num_dev_options number of device options
* @param ro SANE_TRUE to print read-only options
*/
static void print_options(SANE_Device * device, SANE_Int num_dev_options, SANE_Bool ro)
{
int i, j;
const SANE_Option_Descriptor *opt;
for (i = 1; i < num_dev_options; ++i)
{
opt = 0;
/* scan area uses modified option struct */
for (j = 0; j < 4; ++j)
if (i == window[j])
opt = window_option + j;
if (!opt)
opt = sane_get_option_descriptor (device, i);
if (ro || SANE_OPTION_IS_SETTABLE (opt->cap)
|| opt->type == SANE_TYPE_GROUP)
print_option (device, i, opt);
}
if (num_dev_options)
fputc ('\n', stdout);
}
int
main (int argc, char **argv)
{
int ch, i, index, all_options_len;
const SANE_Option_Descriptor *opt;
const SANE_Device **device_list;
SANE_Int num_dev_options = 0;
const char *devname = 0;
@ -1735,6 +1767,9 @@ main (int argc, char **argv)
case 'T':
test = 1;
break;
case 'A':
all = 1;
break;
case 'n':
dont_scan = 1;
break;
@ -1929,6 +1964,7 @@ Parameters are separated by a blank from single-character options (e.g.\n\
-p, --progress print progress messages\n\
-n, --dont-scan only set options, don't actually scan\n\
-T, --test test backend thoroughly\n\
-A, --all-options list all available backend options\n\
-h, --help display this help message and exit\n\
-v, --verbose give even more status messages\n\
-B, --buffer-size=# change input buffer size (in kB, default 32)\n\
@ -2127,24 +2163,15 @@ Parameters are separated by a blank from single-character options (e.g.\n\
if (help)
{
printf ("\nOptions specific to device `%s':\n", devname);
print_options(device, num_dev_options, SANE_FALSE);
}
for (i = 1; i < num_dev_options; ++i)
{
int j;
opt = 0;
/* scan area uses modified option struct */
for (j = 0; j < 4; ++j)
if (i == window[j])
opt = window_option + j;
if (!opt)
opt = sane_get_option_descriptor (device, i);
print_option (device, i, opt);
}
if (num_dev_options)
fputc ('\n', stdout);
/* list all device-specific options */
if (all)
{
printf ("\nAll options specific to device `%s':\n", devname);
print_options(device, num_dev_options, SANE_TRUE);
exit (0);
}
}