- M3091 does not support scanner_control(adf)
- Correct buffer overflow in read_from_3091duplex()
- sane_read() now always calls read_from_*()
- read_from_*() are callable when there is no data, and read to eof
- sane_read() will keep alternate duplex reads to similar length
- Added debugging statements
- Corrected comments
- Updated Copyright
- merged x/y resolution options
- moved page width/height to start of geometry group
- use mode to pick resolution list v/s range
- improved M3091 resolution choices
epson2-commands.c: Include <sys/types.h> to resolve u_long.
epson2.c, magicolor.c, xerox_mfp-tcp.c: Include <sys/types.h>
and to <sys/socket.h> for anyone using setsockopt().
sanei_tcp.h: Include <sys/types.h> since ssize_t is referenced.
sanei_usb.c: Newer FreeBSD version checks.
All changes in this patch set come from FreeBSD ports patches.
Bug #312503.
Options were in README but removed at some point. They
are useful so add them back.
Document BACKENDS and PRELOADABLE_BACKENDS variables in
README as well as in configure --help output.
dll.c is were optional preload behavior is implemented.
Since its linked in using a convienence library, we need
to libraries to have different behavior.
Current backend/Makefile.am states difference between libsane and
libsane-dll as:
> libsane.la and libsane-dll.la are the same thing except for
> the addition of backends listed by PRELOADABLE_BACKENDS that are
> statically linked in.
We were (mistakenly) linking in dll-preload.h and thus symbols
for all preload backends for both libraries but we were only
linking in those symbols for libsane.
This mistake became obvious on mingw which does not allow for
any unresolved symbols. Resolve by forcing an empty preload
backend list for libsane-dll.
Add check for winsock2.h for socket.h replancement. Also, use this
check to add ws2_32 library. Also, switch all winsock.h references
to winsock2.h.
Add check for getuid and getpass; which are not on mingw.
Add a syslog() replacement that is basically a print(). This
is also used by vsyslog() replacement.
Comment out parts of replacement sigprocmask.c on mingw.
To support these configure.in changes, I need to rebuild all
related files with autoconf 2.68 and libtool 2.4. Hand ported
our sane-backend specific changes to newer ltmain.sh.
It was about an 90/10 split with usleep/sleep. We have portablity
logic to make usleep on all platforms but not sleep. This is
needed to link tools directory under mingw.
- warming up working for gl843 scanners
- per resolution motor/sensor profiles for gl843 scanners
- use sanei_genesysy_slope_tale for gl843 scanners
- glxxx_set_motor_power usage cleanups
So far, the snmp detection would stop working after the first response, because libsnmp
haved like that if we return 1 in the callback. Since we want multiple responses to one
broadcast query, we don't tell libsnmp that the response has answered our query.
As a drawback, libsnmp will send the same query in 1-second-intervals, and each device
will answer again. So, we have to keep a list of all devices already detected.
- initial support for DR-5020
- use ppl_mod instead of Bpl_mod, apply to all modes
- invert logic of read_panel tracking
- add ability to disable read_panel()
- automatically disable read/send_panel if unsupported
these devices need no reading USB-in-USB acknowledgement after each command.
To achieve that, proto_flags are passed down to low-level functions. These
flags are taken from device descriptions
hp5590: fixed up get_status command - index should be 0x00, not 0x20
hp5590: bump up the backend version
This fix correctly initializes the AV220-G by querying the firmware.
Added the correct option to support the interlaced duplex format used by
this unit.
Flipping duplex scanners must flip the page in order to scan the back side
of the page. With this option set (which is the default), the page is
flipped back to the original orientation. This is important if you have
a stack of papers. However, if you don't care if every page ends up
flipped compared to how it was loaded, turning this option off might save
some scanning time as the paper won't have to be pulled back through the
ADF mechanism a third time.
Although the flipping duplexer is working, there are some issues relating to
the mechanics of physically flipping paper. First among these is that the
back side of each page is physically scanned in reverse, resulting in an
upside down image. Secondly, the page is held partially in the ADF
mechanism while waiting for the frontend to make another scan request for
the back side image, thus resulting in a stuck page if the frontend fails to
follow through.
My solution to these problems is to treat page flipping as an extreme
extension of interlaced scanning; page level interlacing. This means making
another scan request on behalf of the frontend, and writing the resulting
image to a file as would have been done if the page were line interlaced.
We would have had to write this image to a file anyway to flip the image
right-side up, so we aren't doing any extra work, and technique allows us to
reuse existing code for most of the file handling. The reader_process()
function is called again (recursively) after scanning the front page. We
use the page length of the front side to determine the length of the back,
so that we can write the lines to the file starting at the end and working
towards the beginning (thus flipping the image).
A side effect of this solution was the discovery that the scanner must be
reminded that the paper needs to be re-flipped after each scan, so
set_window() must also be called in reader_process() before starting the
second scan.
Finally, with this change, a minor bug was exposed where frontends were
given the number of lines which would be scanned, which makes sense in
flatbed mode, but does not make sense for an ADF, where the page may be
smaller than the scan window. The code was changed to follow the
specifications, returning -1 in ADF mode (when the length cannot be
determined).
After fixing the duplexer initialization, it became clear that the code was
mirroring the back pages. Since the scanner already supports page
mirroring internally with an optional bit setting (which was already set)
it made the most sense to simplify the code base and remove the variable.
For scanners which potentially have flipping duplexers, only enable
duplexing if there is an ADF present. This leads to the next problem, that
the flipping duplexers (present only on the HP 8200 series AFAIK) don't
always seem to be properly configured when powered up. To solve this some
magical values are written to magical memory locations, and some more
magical status is read back, causing an apparent firmware reset which
blocks communication for a short period of time. See adf_reset() for
details.
Added the AV_ADF_FLIPPING_DUPLEX flag to activate the flipping duplex code
only for models known to have such duplexing ADFs. Prior to this a doubious
huristic was used to guess when the hardware had a flipping duplex unit.
The additional_probe variable protected add_source_mode() and
add_color_mode() from being entered upon subsequent calls. These functions
were patched to not insert duplicate records in this case, removing the
need for the gatekeeper variable.
Until now the code has been changing the frontend supplied pointer to point
to our internal data structure. There are two problems with this. It
orphans the data previously associated with that pointer, which causes a
memory leak. It also gives the frontend the ability to munge our internal
data structure.
The only downside to this change is the possibility that a frontend took the
spec too literally and merely supplies a pointer but does not allocate
storage space for the result. Technically, the spec is a bit vague on this
point, because it does not specifically state who should allocate the
structure, but I feel a reasonable programmer would guess that space
allocation is a frontend obligation.
There was an old TODO in the code which suggests creating an option for using
the paper_length field to detect double feeds in the ADF. I've added it as
an option, but set the default to not use it since it might cause older
scanners to get confused.
I felt that the ehancements group was doing double duity for image tuning and
other more hardware related options. This new group takes ownership of those.
I'm not happy with the name, but that can always be changed.
- don't center window when using flatbed
- improve request sense error messages
- enable flatbed for all known models
- ad usb ids for DR-6030C, CR-135i & CR-190i
- moved DR-2020U to unsupported.desc
- initial support for DR-3080 and DR-5060
- add code to clamp scan width to an arbitrary byte width boundary
- add code to prevent setting of brightness/threshold/contrast
- don't send dropout color command on non-color scanners
-) LAN and USB communication
-) SNMP LAN auto-detection (using libsnmp, added configure check!)
-) Based on the epson2 backend, with many structural changes
-) B/W, Gray, Color scanning works in 150/300/600dpi (full-page
color scan only possible with <=300dpi)
-) The timeouts (SNMP, scan data, other data) are configurable in the
magicolor.conf file
-) Keeps list of known scanners in sane_get_devices, does not destroy
existing handles; Also correctly calls sanei_usb_init.
Added support for the Avision AV210D2+ scanner. This is the first scanner
to require the use of the gray filter bits, so code was added to enable them.
Regenerated description file to reflect this change.
Moved device init code from sane_init() to the newly created
sane_reload_devices() function, which is now called from sane_get_devices().
This means that device initialization now happens when sane_get_devices() is
called, not when sane_init() is called.
Replaced the clever, yet totally confusing, code using the "adf_mode"
variable. This variable was used with a complex interaction of bit shifts
and subtraction indirectly influnced by the value of s->source_mode. The
replacement code direct references s->source_mode instead, simplifying
things greatly. This change is functionally identical.
As a side note, the adf_mode code allowed "ADF Rear" scanners, in addition to
"ADF Duplex" scanners, to enter the section of code normally used for (HP)
duplex scanners. It's not clear if this was the intended effect, or if, as
the comments suggest, this was an unnoticed side effect caused by the
confusing code. The point is moot, however, because prior in the code, the
ADF Duplex flag is set anytime the ADF Rear flag is set. As long as all
ADF Rear scanners are duplex scanners this shouldn't be a problem.
Changed the AVISION_FILTER_* defines to their final values rather than
bit-shifting them prior to use. This make reading the code much easier
since no mental calculation is necessary to determine what the final
bit-pattern/value will be.
Wrap scanner entries with duplicate USB ids with ifdefs so they will not be
compiled. This shortens the search for new scanners because we don't try
the same USB id more than once.
create a place holder for low level commands
move low level functions to genesys_low.c
GL124 progresses
enable genesys_low debug and add DAC for LiDE 110
gl124 WIP
- gl847 cleanups
- genesys_low refactor
- gl124 starting version
GL124 WIP
- read scancnt/fedcnt,valid words coded
- memory layout coded
LiDE110 WIP
GL 124 WIP
- definition and use of get/set double/triple
- define register names
all mods done, ready to test
set fe OK
GL124 WIP : ready to test scans
GL124 WIP
GL124 WIP
- fixed analog fe issue: don't put afe regs in global set
GL124 : first light at 300 dpi
GL124 WIP
- 300 and 600 uncalibrated mostly ok (x coordinate rounding)
- 150 and 75 OK x-wise, y to be solved
solved rounding errors for gl124
re-add 400, 200 and 100 dpi modes
GL124 : tous x dpi OK
before adding line cropping
GL124 : line cropping almost finished
GL124 WIP : working line deletion
compute step rework
GL124 WIP : high speed table for dpi <= 300
move to scan area working
line skipping fix
new slope table for 600 dpi base
geometry and movement tuned
GL124 WIP : shading calibration almost working
working 600 dpi shading
GL124 : working shading calibration for all modes but 1200 dpi
working 1200 dpi shading
beta 1 of GL124 support
last tuning
update genesys.desc for LiDE 110
motor slope and start area tuning
shading coefficient computing clean up
add support for GL124 based CanoScan LiDE 110
feed almost OK up to 300 dpi
feeding is fixed
all issues fixed
the same and already work, but this change will reflect that fact on the
website.
- Generated a new version of doc/descriptions/avision.desc from avision.c.