- minor tweaks for hp4400 support

merge-requests/1/head
Stéphane Voltz 2008-09-03 04:43:15 +00:00
rodzic 3a8c2cc40f
commit a2cb00cdc3
5 zmienionych plików z 130 dodań i 91 usunięć

Wyświetl plik

@ -1,8 +1,12 @@
2008-08-21 Stéphane Voltz <stef.dev@free.fr>
* backend/rts8891.c backend/rts8891_low.c backend/rts8891_low.h
backend/rts88xx_lib.c: minor changes for hp4400 support
2008-09-02 Nicolas Martin <nicols-guest at users.alioth.debian.org> 2008-09-02 Nicolas Martin <nicols-guest at users.alioth.debian.org>
* backend/pixma_mp150.c: * backend/pixma_mp150.c:
Some tweaks to have PIXMA MP810 supported by the pixma backend. Some tweaks to have PIXMA MP810 supported by the pixma backend.
2008-06-03 St<EFBFBD>phane Voltz <stef.dev@free.fr> 2008-06-03 Stéphane Voltz <stef.dev@free.fr>
* backend/genesys.c backend/genesys_gl646.c backend/genesys_devices.c: * backend/genesys.c backend/genesys_gl646.c backend/genesys_devices.c:
- move to configuration framework - move to configuration framework
- fix GL646 GPO value usage - fix GL646 GPO value usage
@ -34,18 +38,18 @@
* doc/descriptions/plustek.desc: Added entry for Strobe XP100 * doc/descriptions/plustek.desc: Added entry for Strobe XP100
* doc/descriptions/unsupported.desc: Removed entry for Strobe XP100 * doc/descriptions/unsupported.desc: Removed entry for Strobe XP100
2008-08-21 St<EFBFBD>phane Voltz <stef.dev@free.fr> 2008-08-21 Stéphane Voltz <stef.dev@free.fr>
* backend/rts8891.c: calibration updating and 75 dpi scan for hp400 * backend/rts8891.c: calibration updating and 75 dpi scan for hp400
2008-08-23 m. allan noah <kitno455 a t gmail d o t com> 2008-08-23 m. allan noah <kitno455 a t gmail d o t com>
* doc/descriptions/fujitsu.desc: set lots of scanners to complete :) * doc/descriptions/fujitsu.desc: set lots of scanners to complete :)
2008-08-21 St<EFBFBD>phane Voltz <stef.dev@free.fr> 2008-08-21 Stéphane Voltz <stef.dev@free.fr>
* backend/rts8891.c backend/rts8891_devices.c backend/rts8891_low.c * backend/rts8891.c backend/rts8891_devices.c backend/rts8891_low.c
backend/rts88xx_lib.c: add sensor type field and use it in geometry backend/rts88xx_lib.c: add sensor type field and use it in geometry
detection. detection.
2008-08-14 St<EFBFBD>phane Voltz <stef.dev@free.fr> 2008-08-14 Stéphane Voltz <stef.dev@free.fr>
* backend/rts8891.c backend/rts88xx_lib.c: fix for hp4400 init * backend/rts8891.c backend/rts88xx_lib.c: fix for hp4400 init
2008-08-13 m. allan noah <kitno455 a t gmail d o t com> 2008-08-13 m. allan noah <kitno455 a t gmail d o t com>
@ -67,7 +71,7 @@
* frontend/scanimage.c: fetch_options(), actually get option * frontend/scanimage.c: fetch_options(), actually get option
descriptor 0 before attempting to get the value of option 0. descriptor 0 before attempting to get the value of option 0.
2008-08-04 St<EFBFBD>phane Voltz <stef.dev@free.fr> 2008-08-04 Stéphane Voltz <stef.dev@free.fr>
* backend/umax_pp.c backend/umaxp_pp.h backend/umax_pp.conf.in: * backend/umax_pp.c backend/umaxp_pp.h backend/umax_pp.conf.in:
use configuration framework use configuration framework
@ -130,19 +134,19 @@
- fi-5330C and fi-5650C can't handle 10 bit LUT via USB - fi-5330C and fi-5650C can't handle 10 bit LUT via USB
- fi-5900 has background color, though it reports otherwise - fi-5900 has background color, though it reports otherwise
2008-07-10 St<EFBFBD>phane Voltz <stef.dev@free.fr> 2008-07-10 Stéphane Voltz <stef.dev@free.fr>
* sanei/sanei_config.c: handle cases where config or callback * sanei/sanei_config.c: handle cases where config or callback
function is NULL function is NULL
* backend/rts8891.c: use new configuration parsing framework * backend/rts8891.c: use new configuration parsing framework
2008-07-10 St<EFBFBD>phane Voltz <stef.dev@free.fr> 2008-07-10 Stéphane Voltz <stef.dev@free.fr>
* include/sane/sanei_config.h: doxygen fix for new function * include/sane/sanei_config.h: doxygen fix for new function
2008-07-10 St<EFBFBD>phane Voltz <stef.dev@free.fr> 2008-07-10 Stéphane Voltz <stef.dev@free.fr>
* backend/sanei_constrain_value.c: add support for SANE_Bool * backend/sanei_constrain_value.c: add support for SANE_Bool
in sanei_check_value in sanei_check_value
* backend/Makefile.in: add sanei_constrain_value.lo to libsane * backend/Makefile.in: add sanei_constrain_value.lo to libsane
2008-07-10 St<EFBFBD>phane Voltz <stef.dev@free.fr> 2008-07-10 Stéphane Voltz <stef.dev@free.fr>
* backend/sanei_constrain_value.c: add support for SANE_Bool * backend/sanei_constrain_value.c: add support for SANE_Bool
in sanei_check_value in sanei_check_value
* backend/Makefile.in: add sanei_constrain_value.lo to libsane * backend/Makefile.in: add sanei_constrain_value.lo to libsane
@ -235,20 +239,20 @@
Remove "experimental" in pixma buttons options and text. Remove "experimental" in pixma buttons options and text.
Fix some French translation typos, and update man page. Fix some French translation typos, and update man page.
2008-06-10 St<EFBFBD>phane Voltz <stef.dev@free.fr> 2008-06-10 Stéphane Voltz <stef.dev@free.fr>
* backend/sanei_constrain_value.c: add support for arrays of SANE_Word * backend/sanei_constrain_value.c: add support for arrays of SANE_Word
in sanei_constrain_value in sanei_constrain_value
* backend/umax_pp.c: remove now unneede 'hand made' constrain on * backend/umax_pp.c: remove now unneede 'hand made' constrain on
gamma tables gamma tables
2008-06-09 St<EFBFBD>phane Voltz <stef.dev@free.fr> 2008-06-09 Stéphane Voltz <stef.dev@free.fr>
* backend/rts8891.c: fix for model with 'XPA' sensor * backend/rts8891.c: fix for model with 'XPA' sensor
2008-06-06 Julien Blache <jb@jblache.org> 2008-06-06 Julien Blache <jb@jblache.org>
* backend/net.c: lock the Avahi thread before stopping it and * backend/net.c: lock the Avahi thread before stopping it and
tearing down the Avahi objects. tearing down the Avahi objects.
2008-06-03 St<EFBFBD>phane Voltz <stef.dev@free.fr> 2008-06-03 Stéphane Voltz <stef.dev@free.fr>
* backend/genesys_gl646.c: fixed wrong offset for start * backend/genesys_gl646.c: fixed wrong offset for start
of scanarea for MD6471 scanner. of scanarea for MD6471 scanner.
@ -282,7 +286,7 @@
and device ID updates, including fixing uninitialized variables due and device ID updates, including fixing uninitialized variables due
former defect merge and exposure control for film / dia scanners former defect merge and exposure control for film / dia scanners
2008-05-26 St<EFBFBD>phane Voltz <stef.dev@free.fr> 2008-05-26 Stéphane Voltz <stef.dev@free.fr>
* backend/sane_strstatus.c: added new status and internationalization * backend/sane_strstatus.c: added new status and internationalization
support support
* frontend/scanimage.c, frontend/tstbackend.c: added handling of status * frontend/scanimage.c, frontend/tstbackend.c: added handling of status
@ -290,13 +294,13 @@
* backend/pnm.c: added 2 more virtual devices, one that is hardware * backend/pnm.c: added 2 more virtual devices, one that is hardware
locked, and another that always do warming before scan. locked, and another that always do warming before scan.
2008-05-26 St<EFBFBD>phane Voltz <stef.dev@free.fr> 2008-05-26 Stéphane Voltz <stef.dev@free.fr>
* backend/rts8891.[ch], backend/rts8891_low.[ch], * backend/rts8891.[ch], backend/rts8891_low.[ch],
backend/rts88xx_lib.[ch]: renamed per frontend struct, made use of backend/rts88xx_lib.[ch]: renamed per frontend struct, made use of
new well-known option groups. Added warming-up handling in new well-known option groups. Added warming-up handling in
sane_start(). sane_start().
2008-05-22 St<EFBFBD>phane Voltz <stef.dev@free.fr> 2008-05-22 Stéphane Voltz <stef.dev@free.fr>
* backend/genesys.c: * backend/genesys.c:
changed top of scan area detection for MD6228/MD6471 models changed top of scan area detection for MD6228/MD6471 models
@ -310,7 +314,7 @@
backend/hp3900_usb.c: Fixed reference position detection for backend/hp3900_usb.c: Fixed reference position detection for
HP3800/HPG2710 scanners. Code clean up. HP3800/HPG2710 scanners. Code clean up.
2008-05-22 St<EFBFBD>phane Voltz <stef.dev@free.fr> 2008-05-22 Stéphane Voltz <stef.dev@free.fr>
* backend/rts8891.c: * backend/rts8891.c:
minor tweak for scanjet 4470cx minor tweak for scanjet 4470cx
@ -337,7 +341,7 @@
* backend/qcam.c, backend/v4l.c, frontend/tstbackend.c: * backend/qcam.c, backend/v4l.c, frontend/tstbackend.c:
remove undocumented and otherwise unused SANE_CAP_ALWAYS_SETTABLE remove undocumented and otherwise unused SANE_CAP_ALWAYS_SETTABLE
2008-05-19 St<EFBFBD>phane Voltz <stef.dev@free.fr> 2008-05-19 Stéphane Voltz <stef.dev@free.fr>
* backend/rts8891.c: * backend/rts8891.c:
150/300 dpi shading calibration fixes for 'XPA' sensor HP4470 models 150/300 dpi shading calibration fixes for 'XPA' sensor HP4470 models
@ -374,7 +378,7 @@
include/sane/sanei_thread.h, sanei/sanei_thread.c: include/sane/sanei_thread.h, sanei/sanei_thread.c:
Fix for bug #306751: sanei-thread with pthreads on 64 bit Fix for bug #306751: sanei-thread with pthreads on 64 bit
2008-05-12 St<EFBFBD>phane Voltz <stef.dev@free.fr> 2008-05-12 Stéphane Voltz <stef.dev@free.fr>
* backend/rts8891.c * backend/rts8891.c
150/300 dpi mode fixes for 'XPA' sensor HP4470 models 150/300 dpi mode fixes for 'XPA' sensor HP4470 models
@ -401,7 +405,7 @@
* doc/sane-sm3840.man: Add lineart and halftone options to page * doc/sane-sm3840.man: Add lineart and halftone options to page
* backend/sm3840*: Remove 64-bit compile warnings * backend/sm3840*: Remove 64-bit compile warnings
2008-04-05 St<EFBFBD>phane Voltz <stef.dev@free.fr> 2008-04-05 Stéphane Voltz <stef.dev@free.fr>
* backend/rts8891.c backend/rts8891_low.c * backend/rts8891.c backend/rts8891_low.c
doc/descriptions/rts8891.desc: doc/descriptions/rts8891.desc:
150 dpi mode fix for 'XPA' sensor HP4470 models, description 150 dpi mode fix for 'XPA' sensor HP4470 models, description
@ -592,7 +596,7 @@
sections (separate inetd configuration under the INETD sections (separate inetd configuration under the INETD
CONFIGURATION section). CONFIGURATION section).
2008-04-05 St<EFBFBD>phane Voltz <stef.dev@free.fr> 2008-04-05 Stéphane Voltz <stef.dev@free.fr>
* backend/genesys.c backend/genesys.h backend/genesys_devices.c * backend/genesys.c backend/genesys.h backend/genesys_devices.c
backend/genesys_gl646.c backend/genesys_low.h: backend/genesys_gl646.c backend/genesys_low.h:
Fixed double free problems, made OPT_COLOR_FILTER work for Fixed double free problems, made OPT_COLOR_FILTER work for
@ -600,7 +604,7 @@
options, split sane_control_options to make it more readable, options, split sane_control_options to make it more readable,
fixed 'reset stream' problem for MD6471. fixed 'reset stream' problem for MD6471.
2008-04-05 St<EFBFBD>phane Voltz <stef.dev@free.fr> 2008-04-05 Stéphane Voltz <stef.dev@free.fr>
* backend/rts8891.c: * backend/rts8891.c:
split sane_control_option() to make it more readable split sane_control_option() to make it more readable
@ -633,7 +637,7 @@
* sanei/sanei_scsi.c: fix bug in sanei_scsi_find_devices() which * sanei/sanei_scsi.c: fix bug in sanei_scsi_find_devices() which
caused early return if attach callback returned error. caused early return if attach callback returned error.
2008-03-22 St<EFBFBD>phane Voltz <stef.dev@free.fr> 2008-03-22 Stéphane Voltz <stef.dev@free.fr>
* AUTHORS configure configure.in backend/dll.conf.in * AUTHORS configure configure.in backend/dll.conf.in
backend/Makefile.in backend/rts8891.c backend/rts8891.conf.in backend/Makefile.in backend/rts8891.c backend/rts8891.conf.in
backend/rts8891_devices.c backend/rts8891.h backend/rts8891_low.c backend/rts8891_devices.c backend/rts8891.h backend/rts8891_low.c
@ -658,7 +662,7 @@
2008-03-15 Julien Blache <jb@jblache.org> 2008-03-15 Julien Blache <jb@jblache.org>
* include/sane/sanei_usb.h: typo fix. * include/sane/sanei_usb.h: typo fix.
2008-03-02 St<EFBFBD>phane Voltz <stef.dev@free.fr> 2008-03-02 Stéphane Voltz <stef.dev@free.fr>
* doc/descriptions/lexmark.desc: added X1195 * doc/descriptions/lexmark.desc: added X1195
* doc/descriptions/unsupported.desc: removed X11xx, X12xx and * doc/descriptions/unsupported.desc: removed X11xx, X12xx and
Dell A920 which are to be handled by the lexmark backend Dell A920 which are to be handled by the lexmark backend

Wyświetl plik

@ -118,7 +118,7 @@
/* #define FAST_INIT 1 */ /* #define FAST_INIT 1 */
#define BUILD 4 #define BUILD 5
#define MOVE_DPI 100 #define MOVE_DPI 100
@ -1174,10 +1174,11 @@ sane_start (SANE_Handle handle)
mode = 0x10; mode = 0x10;
break; break;
default: default:
light = SENSOR_TYPE_XPA; light = 0x3b;
mode = 0x20; mode = 0x20;
break; break;
} }
DBG (DBG_info, "sane_start: mode=0x%02x, light=0x%02x\n", mode, light);
/* step 2: dark calibration */ /* step 2: dark calibration */
status = dark_calibration (dev, mode, light); status = dark_calibration (dev, mode, light);
@ -2959,13 +2960,13 @@ find_origin (struct Rts8891_Device *dev, SANE_Bool * changed)
dev->regs[0x35] = 0x1b; dev->regs[0x35] = 0x1b;
dev->regs[0x36] = 0x29; dev->regs[0x36] = 0x29;
dev->regs[0x3a] = 0x1b; dev->regs[0x3a] = 0x1b;
dev->regs[0x80] = 0x32; dev->regs[0x80] = 0x32; /* 8180-> 50 */
dev->regs[0x82] = 0x33; dev->regs[0x82] = 0x33; /* 8382-> 51 */
dev->regs[0x85] = 0x00; dev->regs[0x85] = 0x00;
dev->regs[0x86] = 0x06; dev->regs[0x86] = 0x06;
dev->regs[0x87] = 0x00; dev->regs[0x87] = 0x00;
dev->regs[0x88] = 0x06; dev->regs[0x88] = 0x06;
dev->regs[0x89] = 0x34; dev->regs[0x89] = 0x34; /* 8a89-> 52 */
dev->regs[0x8d] = 0x80; dev->regs[0x8d] = 0x80;
dev->regs[0x8e] = 0x68; dev->regs[0x8e] = 0x68;
@ -2996,8 +2997,9 @@ find_origin (struct Rts8891_Device *dev, SANE_Bool * changed)
dev->regs[0xe2] = 0x01; dev->regs[0xe2] = 0x01;
dev->regs[0xe3] = 0x00; dev->regs[0xe3] = 0x00;
dev->regs[0xe4] = 0x00; dev->regs[0xe4] = 0x00;
dev->regs[0xe5] = 0x1c; SET_DOUBLE (dev->regs, EXPOSURE_REG, 4124);
dev->regs[0xe6] = 0x10; /* 101c=4124 */ /* dev->regs[0xe5] = 0x1c;
dev->regs[0xe6] = 0x10; 101c=4124 */
dev->regs[0xe7] = 0x00; dev->regs[0xe7] = 0x00;
dev->regs[0xe8] = 0x00; dev->regs[0xe8] = 0x00;
dev->regs[0xe9] = 0x00; dev->regs[0xe9] = 0x00;
@ -3155,8 +3157,9 @@ find_origin (struct Rts8891_Device *dev, SANE_Bool * changed)
dev->regs[0xe2] = 0x03; dev->regs[0xe2] = 0x03;
dev->regs[0xe2] = 0x03; /* 0x01 */ dev->regs[0xe2] = 0x03; /* 0x01 */
dev->regs[0xe5] = 0x0d; /* 0x1c */ /* dev->regs[0xe5] = 0x0d; 0x1c
dev->regs[0xe6] = 0x08; /* 0x10 080d=2061=1030*2+1 */ dev->regs[0xe6] = 0x08; 0x10 080d=2061=1030*2+1 */
SET_DOUBLE (dev->regs, EXPOSURE_REG, 2061);
} }
else else
{ {
@ -3166,8 +3169,10 @@ find_origin (struct Rts8891_Device *dev, SANE_Bool * changed)
dev->regs[0xe2] = 0x07; dev->regs[0xe2] = 0x07;
/*
dev->regs[0xe5] = 0x06; dev->regs[0xe5] = 0x06;
dev->regs[0xe6] = 0x04; /* 406=1030 */ dev->regs[0xe6] = 0x04; 406=1030 */
SET_DOUBLE (dev->regs, EXPOSURE_REG, 1030);
} }
/* move by a fixed amount relative to the 'top' of the scanner */ /* move by a fixed amount relative to the 'top' of the scanner */
@ -3260,8 +3265,9 @@ find_margin (struct Rts8891_Device *dev)
dev->regs[0xe2] = 0x01; dev->regs[0xe2] = 0x01;
dev->regs[0xe5] = 0x7b; /* dev->regs[0xe5] = 0x7b;
dev->regs[0xe6] = 0x15; /* 157b=5499 */ dev->regs[0xe6] = 0x15; 157b=5499 */
SET_DOUBLE (dev->regs, EXPOSURE_REG, 5499);
dev->regs[0xe7] = 0x00; dev->regs[0xe7] = 0x00;
dev->regs[0xe8] = 0x00; dev->regs[0xe8] = 0x00;
@ -3522,7 +3528,8 @@ initialize_device (struct Rts8891_Device *dev)
dev->regs[0xd9] = 0x80; /* 0x00 */ dev->regs[0xd9] = 0x80; /* 0x00 */
dev->regs[0xda] = 0x00; /* 0x15 */ dev->regs[0xda] = 0x00; /* 0x15 */
dev->regs[0xe2] = 0x01; /* 0x00 */ dev->regs[0xe2] = 0x01; /* 0x00 */
dev->regs[0xe5] = 0x14; /* 0x0f */ /* dev->regs[0xe5] = 0x14; 0x0f */
SET_DOUBLE (dev->regs, EXPOSURE_REG, 20);
status = rts8891_write_all (dev->devnum, dev->regs, dev->reg_count); status = rts8891_write_all (dev->devnum, dev->regs, dev->reg_count);
@ -3889,8 +3896,9 @@ init_device (struct Rts8891_Device *dev)
dev->regs[0xe3] = 0x00; dev->regs[0xe3] = 0x00;
dev->regs[0xe4] = 0x00; dev->regs[0xe4] = 0x00;
dev->regs[0xe5] = 0x14; /*dev->regs[0xe5] = 0x14;
dev->regs[0xe6] = 0x00; /* 14=20 */ dev->regs[0xe6] = 0x00; 14=20 */
SET_DOUBLE (dev->regs, EXPOSURE_REG, 20);
dev->regs[0xe7] = 0x00; dev->regs[0xe7] = 0x00;
dev->regs[0xe8] = 0x00; dev->regs[0xe8] = 0x00;
@ -4384,8 +4392,9 @@ dark_calibration (struct Rts8891_Device *dev, int mode, int light)
dev->regs[0xd8] = 0x52; dev->regs[0xd8] = 0x52;
dev->regs[0xe2] = 0x1f; dev->regs[0xe2] = 0x1f;
dev->regs[0xe5] = 0x28; /* 28=40 */ /*dev->regs[0xe5] = 0x28; 28=40
dev->regs[0xe6] = 0x00; dev->regs[0xe6] = 0x00; */
SET_DOUBLE (dev->regs, EXPOSURE_REG, 40);
dev->regs[0xe7] = 0x75; dev->regs[0xe7] = 0x75;
dev->regs[0xe8] = 0x01; dev->regs[0xe8] = 0x01;
@ -4434,7 +4443,8 @@ dark_calibration (struct Rts8891_Device *dev, int mode, int light)
dev->regs[0x35] = 0x48; /* 0x45 */ dev->regs[0x35] = 0x48; /* 0x45 */
dev->regs[0x39] = 0x00; /* 0x02 */ dev->regs[0x39] = 0x00; /* 0x02 */
dev->regs[0xe2] = 0x0f; /* 0x1f */ dev->regs[0xe2] = 0x0f; /* 0x1f */
dev->regs[0xe5] = 0x52; /* 0x28 */ /* dev->regs[0xe5] = 0x52; 0x28 */
SET_DOUBLE (dev->regs, EXPOSURE_REG, 82); /* 2*40+2 */
dev->regs[0xe7] = 0x0e; /* 0x75 */ dev->regs[0xe7] = 0x0e; /* 0x75 */
dev->regs[0xe9] = 0x0a; /* 0x0b */ dev->regs[0xe9] = 0x0a; /* 0x0b */
dev->regs[0xea] = 0xc2; /* 0x54 */ dev->regs[0xea] = 0xc2; /* 0x54 */
@ -4615,8 +4625,9 @@ gain_calibration (struct Rts8891_Device *dev, int mode, int light)
dev->regs[0xd8] = 0x52; dev->regs[0xd8] = 0x52;
dev->regs[0xe2] = 0x1f; dev->regs[0xe2] = 0x1f;
dev->regs[0xe5] = 0x28; /* dev->regs[0xe5] = 0x28;
dev->regs[0xe6] = 0x00; /* 28=40 */ dev->regs[0xe6] = 0x00; 28=40 */
SET_DOUBLE (dev->regs, EXPOSURE_REG, 40);
dev->regs[0xe7] = 0x75; dev->regs[0xe7] = 0x75;
dev->regs[0xe8] = 0x01; dev->regs[0xe8] = 0x01;
@ -4667,8 +4678,9 @@ gain_calibration (struct Rts8891_Device *dev, int mode, int light)
dev->regs[0xd7] = 0x10; dev->regs[0xd7] = 0x10;
dev->regs[0xd8] = 0x52; dev->regs[0xd8] = 0x52;
dev->regs[0xe2] = 0x1f; dev->regs[0xe2] = 0x1f;
dev->regs[0xe5] = 0x28; /* dev->regs[0xe5] = 0x28; 0028 -> 40
dev->regs[0xe6] = 0x00; dev->regs[0xe6] = 0x00; */
SET_DOUBLE (dev->regs, EXPOSURE_REG, 40);
dev->regs[0xe7] = 0x75; dev->regs[0xe7] = 0x75;
dev->regs[0xe8] = 0x01; dev->regs[0xe8] = 0x01;
dev->regs[0xe9] = 0x0b; dev->regs[0xe9] = 0x0b;
@ -4685,7 +4697,8 @@ gain_calibration (struct Rts8891_Device *dev, int mode, int light)
dev->regs[0x35] = 0x48; /* 0x45 */ dev->regs[0x35] = 0x48; /* 0x45 */
/* c5, c6 ? : untouched from previous scan ... */ /* c5, c6 ? : untouched from previous scan ... */
dev->regs[0xe2] = 0x0f; /* 0x1f */ dev->regs[0xe2] = 0x0f; /* 0x1f */
dev->regs[0xe5] = 0x52; /* 0x28 */ /* dev->regs[0xe5] = 0x52; */
SET_DOUBLE (dev->regs, EXPOSURE_REG, 82); /* 2*40+2 */
dev->regs[0xe7] = 0x0e; /* 0x75 */ dev->regs[0xe7] = 0x0e; /* 0x75 */
dev->regs[0xe9] = 0x0a; /* 0x0b */ dev->regs[0xe9] = 0x0a; /* 0x0b */
dev->regs[0xea] = 0xc2; /* 0x54 */ dev->regs[0xea] = 0xc2; /* 0x54 */
@ -4934,8 +4947,9 @@ offset_calibration (struct Rts8891_Device *dev, int mode, int light)
dev->regs[0xd6] = 0x0f; dev->regs[0xd6] = 0x0f;
dev->regs[0xd8] = 0x52; dev->regs[0xd8] = 0x52;
dev->regs[0xe2] = 0x1f; dev->regs[0xe2] = 0x1f;
dev->regs[0xe5] = 0x28; /* dev->regs[0xe5] = 0x28;
dev->regs[0xe6] = 0x00; /* 0x28=40 */ dev->regs[0xe6] = 0x00; 0x0028=40 */
SET_DOUBLE (dev->regs, EXPOSURE_REG, 40);
dev->regs[0xe7] = 0x75; dev->regs[0xe7] = 0x75;
dev->regs[0xe8] = 0x01; dev->regs[0xe8] = 0x01;
dev->regs[0xe9] = 0x0b; dev->regs[0xe9] = 0x0b;
@ -4978,7 +4992,8 @@ offset_calibration (struct Rts8891_Device *dev, int mode, int light)
dev->regs[0x35] = 0x48; /* 0x45 */ dev->regs[0x35] = 0x48; /* 0x45 */
/* c5,c6 ?? */ /* c5,c6 ?? */
dev->regs[0xe2] = 0x0f; /* 0x1f */ dev->regs[0xe2] = 0x0f; /* 0x1f */
dev->regs[0xe5] = 0x52; /* 0x28 */ /* dev->regs[0xe5] = 0x52; 0x28 */
SET_DOUBLE (dev->regs, EXPOSURE_REG, 82); /* 2*40+2 */
dev->regs[0xe7] = 0x0e; /* 0x75 */ dev->regs[0xe7] = 0x0e; /* 0x75 */
dev->regs[0xe9] = 0x0a; /* 0x0b */ dev->regs[0xe9] = 0x0a; /* 0x0b */
dev->regs[0xea] = 0xc2; /* 0x54 */ dev->regs[0xea] = 0xc2; /* 0x54 */
@ -5157,7 +5172,8 @@ shading_calibration (struct Rts8891_Device *dev, SANE_Bool color, int mode,
switch (dev->xdpi) switch (dev->xdpi)
{ {
case 75: case 75:
dev->regs[0xe5] = 0xdd; /* dev->regs[0xe5] = 0xdd; */
SET_DOUBLE (dev->regs, EXPOSURE_REG, 221);
if (dev->sensor == SENSOR_TYPE_XPA || dev->sensor == SENSOR_TYPE_4400) if (dev->sensor == SENSOR_TYPE_XPA || dev->sensor == SENSOR_TYPE_4400)
{ {
dev->regs[0xc0] = 0x67; dev->regs[0xc0] = 0x67;
@ -5202,8 +5218,9 @@ shading_calibration (struct Rts8891_Device *dev, SANE_Bool color, int mode,
dev->regs[0xd3] = 0x02; /* 0x0e */ dev->regs[0xd3] = 0x02; /* 0x0e */
dev->regs[0xd4] = 0x04; /* 0x10 */ dev->regs[0xd4] = 0x04; /* 0x10 */
dev->regs[0xe2] = 0x02; /* 0x05 */ dev->regs[0xe2] = 0x02; /* 0x05 */
dev->regs[0xe5] = 0xbb; /* 0xe4 */ /* dev->regs[0xe5] = 0xbb;
dev->regs[0xe6] = 0x01; /* 0x00 */ dev->regs[0xe6] = 0x01; 1bb =443 */
SET_DOUBLE (dev->regs, EXPOSURE_REG, 443); /* 221*2+1 */
} }
break; break;
@ -5212,15 +5229,15 @@ shading_calibration (struct Rts8891_Device *dev, SANE_Bool color, int mode,
if (dev->sensor == SENSOR_TYPE_XPA) if (dev->sensor == SENSOR_TYPE_XPA)
{ {
dev->regs[0x80] = 0x2b; dev->regs[0x80] = 0x2b;
dev->regs[0x81] = 0x02; dev->regs[0x81] = 0x02; /* 22b=555 */
dev->regs[0x82] = 0x2c; dev->regs[0x82] = 0x2c;
dev->regs[0x83] = 0x02; dev->regs[0x83] = 0x02; /* 22c=556 */
dev->regs[0x85] = 0x18; dev->regs[0x85] = 0x18;
dev->regs[0x86] = 0x1b; dev->regs[0x86] = 0x1b;
dev->regs[0x87] = 0x30; dev->regs[0x87] = 0x30;
dev->regs[0x88] = 0x30; dev->regs[0x88] = 0x30;
dev->regs[0x89] = 0x2d; dev->regs[0x89] = 0x2d;
dev->regs[0x8a] = 0x02; dev->regs[0x8a] = 0x02; /* 22d=557=3*150+107 */
dev->regs[0x8d] = 0xef; dev->regs[0x8d] = 0xef;
dev->regs[0xc0] = 0x00; dev->regs[0xc0] = 0x00;
dev->regs[0xc1] = 0x8e; dev->regs[0xc1] = 0x8e;
@ -5243,20 +5260,21 @@ shading_calibration (struct Rts8891_Device *dev, SANE_Bool color, int mode,
dev->regs[0xd2] = 0x17; dev->regs[0xd2] = 0x17;
dev->regs[0xd3] = 0x0b; dev->regs[0xd3] = 0x0b;
dev->regs[0xd4] = 0x0d; dev->regs[0xd4] = 0x0d;
dev->regs[0xe5] = 0xe4; /* dev->regs[0xe5] = 0xe4; */
SET_DOUBLE (dev->regs, EXPOSURE_REG, 228);
} }
else else
{ {
dev->regs[0x80] = 0x2e; dev->regs[0x80] = 0x2e;
dev->regs[0x81] = 0x01; dev->regs[0x81] = 0x01; /* 12e=302 */
dev->regs[0x82] = 0x2f; dev->regs[0x82] = 0x2f;
dev->regs[0x83] = 0x01; dev->regs[0x83] = 0x01; /* 12f */
dev->regs[0x85] = 0x8c; dev->regs[0x85] = 0x8c;
dev->regs[0x86] = 0x10; dev->regs[0x86] = 0x10;
dev->regs[0x87] = 0x18; dev->regs[0x87] = 0x18;
dev->regs[0x88] = 0x1b; dev->regs[0x88] = 0x1b;
dev->regs[0x89] = 0x30; dev->regs[0x89] = 0x30;
dev->regs[0x8a] = 0x01; dev->regs[0x8a] = 0x01; /* 130 */
dev->regs[0x8d] = 0x77; dev->regs[0x8d] = 0x77;
dev->regs[0xc0] = 0x80; dev->regs[0xc0] = 0x80;
dev->regs[0xc1] = 0x87; dev->regs[0xc1] = 0x87;
@ -5275,7 +5293,8 @@ shading_calibration (struct Rts8891_Device *dev, SANE_Bool color, int mode,
dev->regs[0xd3] = 0x0e; dev->regs[0xd3] = 0x0e;
dev->regs[0xd4] = 0x10; dev->regs[0xd4] = 0x10;
dev->regs[0xe5] = 0xe4; /* dev->regs[0xe5] = 0xe4; */
SET_DOUBLE (dev->regs, EXPOSURE_REG, 228);
} }
break; break;
@ -5314,8 +5333,9 @@ shading_calibration (struct Rts8891_Device *dev, SANE_Bool color, int mode,
dev->regs[0xd2] = 0x03; dev->regs[0xd2] = 0x03;
dev->regs[0xd3] = 0x17; dev->regs[0xd3] = 0x17;
dev->regs[0xd4] = 0x01; dev->regs[0xd4] = 0x01;
dev->regs[0xe5] = 0xc9; /* dev->regs[0xe5] = 0xc9;
dev->regs[0xe6] = 0x01; dev->regs[0xe6] = 0x01; 0x01c9=457 */
SET_DOUBLE (dev->regs, EXPOSURE_REG, 457);
} }
else else
{ {
@ -5351,8 +5371,9 @@ shading_calibration (struct Rts8891_Device *dev, SANE_Bool color, int mode,
dev->regs[0xd3] = 0x17; dev->regs[0xd3] = 0x17;
dev->regs[0xd4] = 0x01; dev->regs[0xd4] = 0x01;
dev->regs[0xe5] = 0xc9; /* dev->regs[0xe5] = 0xc9;
dev->regs[0xe6] = 0x01; /* 0x1c9=457 */ dev->regs[0xe6] = 0x01; 0x1c9=457 */
SET_DOUBLE (dev->regs, EXPOSURE_REG, 457);
} }
break; break;
@ -5397,8 +5418,9 @@ shading_calibration (struct Rts8891_Device *dev, SANE_Bool color, int mode,
dev->regs[0xd7] = 0x14; dev->regs[0xd7] = 0x14;
dev->regs[0xe5] = 0x93; /* dev->regs[0xe5] = 0x93;
dev->regs[0xe6] = 0x03; /* 0x393=915 */ dev->regs[0xe6] = 0x03; 0x393=915 = 457*2+1 */
SET_DOUBLE (dev->regs, EXPOSURE_REG, 915);
break; break;
case 1200: case 1200:
@ -5444,8 +5466,9 @@ shading_calibration (struct Rts8891_Device *dev, SANE_Bool color, int mode,
dev->regs[0xd4] = 0xc1; dev->regs[0xd4] = 0xc1;
dev->regs[0xd7] = 0x14; dev->regs[0xd7] = 0x14;
dev->regs[0xd8] = 0xa4; dev->regs[0xd8] = 0xa4;
dev->regs[0xe5] = 0x28; /* dev->regs[0xe5] = 0x28;
dev->regs[0xe6] = 0x07; /* 0x728=1832 */ dev->regs[0xe6] = 0x07; 0x728=1832=915*2+2 */
SET_DOUBLE (dev->regs, EXPOSURE_REG, 1832);
break; break;
} }
@ -6111,8 +6134,9 @@ write_scan_registers (struct Rts8891_Session *session)
dev->regs[0xe3] = 0x85; dev->regs[0xe3] = 0x85;
dev->regs[0xe4] = 0x03; dev->regs[0xe4] = 0x03;
dev->regs[0xe5] = 0x52; /* dev->regs[0xe5] = 0x52;
dev->regs[0xe6] = 0x00; /* exposure time 0x0052=82 */ dev->regs[0xe6] = 0x00; exposure time 0x0052=82 */
SET_DOUBLE (dev->regs, EXPOSURE_REG, 82);
dev->regs[0xe7] = 0x75; dev->regs[0xe7] = 0x75;
dev->regs[0xe8] = 0x01; dev->regs[0xe8] = 0x01;
@ -6179,7 +6203,8 @@ write_scan_registers (struct Rts8891_Session *session)
dev->regs[0xd4] = 0x04; /* 0x10 */ dev->regs[0xd4] = 0x04; /* 0x10 */
dev->regs[0xe2] = 0x07; /* 0x0f */ dev->regs[0xe2] = 0x07; /* 0x0f */
dev->regs[0xe3] = 0x84; /* 0x87 */ dev->regs[0xe3] = 0x84; /* 0x87 */
dev->regs[0xe5] = 0xa5; /* 0x54 */ /*dev->regs[0xe5] = 0xa5; 0x54 */
SET_DOUBLE (dev->regs, EXPOSURE_REG, 165); /* 82*2+1 */
dev->regs[0xe7] = 0x0e; /* 0xa8 */ dev->regs[0xe7] = 0x0e; /* 0xa8 */
dev->regs[0xe8] = 0x01; /* 0x00 */ dev->regs[0xe8] = 0x01; /* 0x00 */
dev->regs[0xe9] = 0x0a; /* 0x0b */ dev->regs[0xe9] = 0x0a; /* 0x0b */
@ -6214,8 +6239,9 @@ write_scan_registers (struct Rts8891_Session *session)
dev->regs[0xe3] = 0x87; dev->regs[0xe3] = 0x87;
dev->regs[0xe5] = 0x54; /* dev->regs[0xe5] = 0x54;
dev->regs[0xe6] = 0x00; /* exposure time 0x0054=84 */ dev->regs[0xe6] = 0x00; exposure time 0x0054=84 */
SET_DOUBLE (dev->regs, EXPOSURE_REG, 84);
dev->regs[0xe7] = 0xa8; dev->regs[0xe7] = 0xa8;
dev->regs[0xe8] = 0x00; dev->regs[0xe8] = 0x00;
@ -6365,8 +6391,9 @@ write_scan_registers (struct Rts8891_Session *session)
dev->regs[0xe2] = 0x07; dev->regs[0xe2] = 0x07;
dev->regs[0xe3] = 0x00; dev->regs[0xe3] = 0x00;
dev->regs[0xe4] = 0x00; dev->regs[0xe4] = 0x00;
dev->regs[0xe5] = 0x56; /* dev->regs[0xe5] = 0x56;
dev->regs[0xe6] = 0x01; dev->regs[0xe6] = 0x01; */
SET_DOUBLE (dev->regs, EXPOSURE_REG, 342); /* 171*2 */
dev->regs[0xf2] = 0x00; dev->regs[0xf2] = 0x00;
} }
else else
@ -6396,8 +6423,9 @@ write_scan_registers (struct Rts8891_Session *session)
dev->regs[0xe3] = 0x00; dev->regs[0xe3] = 0x00;
dev->regs[0xe4] = 0x00; dev->regs[0xe4] = 0x00;
dev->regs[0xe5] = 0x56; /* dev->regs[0xe5] = 0x56;
dev->regs[0xe6] = 0x01; /* exposure time 0x156 (~ 5500 /16) */ dev->regs[0xe6] = 0x01; exposure time 0x156 (~ 5500 /16) */
SET_DOUBLE (dev->regs, EXPOSURE_REG, 342);
} }
break; break;
@ -6413,15 +6441,15 @@ write_scan_registers (struct Rts8891_Session *session)
dev->regs[0x73] = 0x15; dev->regs[0x73] = 0x15;
dev->regs[0x74] = 0x62; dev->regs[0x74] = 0x62;
dev->regs[0x80] = 0x25; dev->regs[0x80] = 0x25; /* 425=1061 */
dev->regs[0x81] = 0x04; dev->regs[0x81] = 0x04;
dev->regs[0x82] = 0x26; dev->regs[0x82] = 0x26; /* 426=1062 */
dev->regs[0x83] = 0x04; dev->regs[0x83] = 0x04;
dev->regs[0x85] = 0x30; dev->regs[0x85] = 0x30;
dev->regs[0x86] = 0x30; dev->regs[0x86] = 0x30;
dev->regs[0x87] = 0x60; dev->regs[0x87] = 0x60;
dev->regs[0x88] = 0x5a; dev->regs[0x88] = 0x5a;
dev->regs[0x89] = 0x27; dev->regs[0x89] = 0x27; /* 427=1063 */
dev->regs[0x8a] = 0x04; dev->regs[0x8a] = 0x04;
dev->regs[0x8d] = 0xde; dev->regs[0x8d] = 0xde;
@ -6447,8 +6475,9 @@ write_scan_registers (struct Rts8891_Session *session)
dev->regs[0xe2] = 0x01; dev->regs[0xe2] = 0x01;
dev->regs[0xe3] = 0x00; dev->regs[0xe3] = 0x00;
dev->regs[0xe4] = 0x00; dev->regs[0xe4] = 0x00;
dev->regs[0xe5] = 0xbd; /* dev->regs[0xe5] = 0xbd;
dev->regs[0xe6] = 0x0a; /* exposure time = 0x0abd=2749 (5500/2-1) */ dev->regs[0xe6] = 0x0a; exposure time = 0x0abd=2749 (5500/2-1) */
SET_DOUBLE (dev->regs, EXPOSURE_REG, 2749);
dev->regs[0xe7] = 0x00; dev->regs[0xe7] = 0x00;
dev->regs[0xe8] = 0x00; dev->regs[0xe8] = 0x00;
dev->regs[0xe9] = 0x00; dev->regs[0xe9] = 0x00;
@ -6469,15 +6498,15 @@ write_scan_registers (struct Rts8891_Session *session)
dev->regs[0x3a] = 0x1b; dev->regs[0x3a] = 0x1b;
dev->regs[0x40] = 0xac; dev->regs[0x40] = 0xac;
dev->regs[0x80] = 0x1a; dev->regs[0x80] = 0x1a;
dev->regs[0x81] = 0x08; dev->regs[0x81] = 0x08; /* 81a=2074 */
dev->regs[0x82] = 0x1b; dev->regs[0x82] = 0x1b;
dev->regs[0x83] = 0x08; dev->regs[0x83] = 0x08; /* 81b=2075 */
dev->regs[0x85] = 0x60; dev->regs[0x85] = 0x60;
dev->regs[0x86] = 0x5a; dev->regs[0x86] = 0x5a;
dev->regs[0x87] = 0xc0; dev->regs[0x87] = 0xc0;
dev->regs[0x88] = 0xae; dev->regs[0x88] = 0xae;
dev->regs[0x89] = 0x1c; dev->regs[0x89] = 0x1c;
dev->regs[0x8a] = 0x08; dev->regs[0x8a] = 0x08; /* 81c=2076 */
dev->regs[0x8d] = 0xbd; /* about twice the 600 dpi values */ dev->regs[0x8d] = 0xbd; /* about twice the 600 dpi values */
dev->regs[0x8e] = 0x63; /* low nibble of 8e and 8d are proportional to dev->regs[0x8e] = 0x63; /* low nibble of 8e and 8d are proportional to
@ -6509,8 +6538,9 @@ write_scan_registers (struct Rts8891_Session *session)
dev->regs[0xe2] = 0x01; dev->regs[0xe2] = 0x01;
dev->regs[0xe3] = 0x00; dev->regs[0xe3] = 0x00;
dev->regs[0xe4] = 0x00; dev->regs[0xe4] = 0x00;
dev->regs[0xe5] = 0x7b; /* dev->regs[0xe5] = 0x7b;
dev->regs[0xe6] = 0x15; /* exposure time = 0x157b=5499 */ dev->regs[0xe6] = 0x15; exposure time = 0x157b=5499 */
SET_DOUBLE (dev->regs, EXPOSURE_REG, 5499);
dev->regs[0xe7] = 0x00; dev->regs[0xe7] = 0x00;
dev->regs[0xe8] = 0x00; dev->regs[0xe8] = 0x00;
dev->regs[0xe9] = 0x00; dev->regs[0xe9] = 0x00;

Wyświetl plik

@ -57,7 +57,7 @@
#endif #endif
#include "rts8891_low.h" #include "rts8891_low.h"
#define RTS8891_BUILD 3 #define RTS8891_BUILD 5
#define RTS8891_MAX_REGISTERS 244 #define RTS8891_MAX_REGISTERS 244
/* init rts8891 library */ /* init rts8891 library */

Wyświetl plik

@ -78,6 +78,7 @@
/* Forward typedefs */ /* Forward typedefs */
typedef struct Rts8891_Device Rts8891_Device; typedef struct Rts8891_Device Rts8891_Device;
#define SET_DOUBLE(regs,idx,value) regs[idx]=(SANE_Byte)((value)>>8); regs[idx-1]=(SANE_Byte)((value) & 0xff);
/* /*
* defines for RTS8891 registers name * defines for RTS8891 registers name
*/ */
@ -86,6 +87,10 @@ typedef struct Rts8891_Device Rts8891_Device;
#define LAMP_REG 0xd9 #define LAMP_REG 0xd9
#define LAMP_BRIGHT_REG 0xda #define LAMP_BRIGHT_REG 0xda
/* double reg (E6,E5) -> timing doubles when y resolution doubles
* E6 is high byte */
#define EXPOSURE_REG 0xe6
/* this struc describes a particular model which is handled by the backend */ /* this struc describes a particular model which is handled by the backend */
/* available resolutions, physical goemetry, scanning area, ... */ /* available resolutions, physical goemetry, scanning area, ... */

Wyświetl plik

@ -52,7 +52,7 @@
#include <stdio.h> #include <stdio.h>
#include <sys/time.h> #include <sys/time.h>
#define RTS88XX_LIB_BUILD 2 #define RTS88XX_LIB_BUILD 5
/* init rts88xx library */ /* init rts88xx library */
void void