Wykres commitów

148 Commity (a94c17175f2bd3bf541fc62ff1036351c44eefa0)

Autor SHA1 Wiadomość Data
Mike Kelly 983d44887c Corrected the logic to set lines = -1 for ADF mode. 2012-03-21 21:04:00 -07:00
Mike Kelly 33bb529c5f Added sane_reload_devices() to sane_init().
Adding sane_reload_devices() to sane_init() required sane_init() to be moved
below the sane_reload_devices() declaration.  This restores the original
functionality present before I split the sane_reload_devices() code out of
sane_init() so that it could be called from sane_get_devices().
2012-03-21 21:03:00 -07:00
Mike Kelly 11b3604e92 Moved a comment nearer its code. 2012-03-21 21:02:00 -07:00
Mike Kelly 0ab145c316 Skip post-processing when caching flipping duplex
In a previous patch, I attempted to avoid the possibility of a page remaining
partially inside the ADF unit of a flipping duplex scanner after a scan.
Unfortunately, I introduced a bug where the backside page was accidentally
returned to the client in addition to being cached.  This was because I had
a misunderstanding of the post-processing code.  This patch skips the post-
processing section altogether, avoiding any unnecessary post-processing and
subsequent unwanted output.  The other alternative here was to try to monkey
with the buffers (as is done for LINE deinterlacing), but I felt this would
be harder to implement and even harder to debug in the future.
2012-03-21 21:01:00 -07:00
Mike Kelly 0e159fc516 Added Gray mode support for Kodak i30 and i40. 2012-03-21 21:00:00 -07:00
Nils Philippsen c648a4411e avision: reenable grayscale and lineart modes for AV220
See https://bugzilla.redhat.com/show_bug.cgi?id=700725
2011-11-18 12:17:22 +01:00
Mike Kelly 8e623c473e Bumped the BUILD version 2011-01-29 11:50:17 +09:00
Mike Kelly edcf4cbadb Fixed initialization and duplexing for AV220-G
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.
2011-01-29 11:50:15 +09:00
Mike Kelly d7b3076142 Add page re-flipping as an option
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.
2011-01-29 11:50:14 +09:00
Mike Kelly b82e9949b5 Fixed back page handling for flipping duplexers
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).
2011-01-29 11:50:13 +09:00
Mike Kelly 104b43a183 Removed inquiry_adf_need_mirror_rear variable
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.
2011-01-29 11:50:12 +09:00
Mike Kelly 1b1b0b9a78 Fixed flipping duplexer initialization
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.
2011-01-29 11:50:11 +09:00
Mike Kelly 12924236c6 Enable firmware reading for some scanners.
Sometimes scanners like to have their firmware read to cause them to
function properly.
2011-01-29 11:50:10 +09:00
Mike Kelly 1b1df46e41 Add feature type for flipping duplexing ADF units
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.
2011-01-29 11:50:09 +09:00
Mike Kelly 1904dad962 Removed additional_probe gatekeeper variable
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.
2011-01-29 11:50:08 +09:00
Mike Kelly 4d38523bda Return copied values in sane_get_parameters()
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.
2011-01-29 11:50:07 +09:00
Mike Kelly 64caf38683 Don't compute parameters twice (in a row)
Removed a redundant call to compute parameters.  This function is called
from within the last function call, no need to call it again.
2011-01-29 11:50:06 +09:00
Mike Kelly b45400222d Added paper-length option to prevent double feeds
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.
2011-01-29 11:50:05 +09:00
Mike Kelly 42cdb00aa1 Added a Misc option group to hold misc features
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.
2011-01-29 11:50:04 +09:00
Mike Kelly d48f749cae Fixed debug level for a single message
There is no reason that this message needs to be triggered at 100 when
everything else only goes to 9.
2011-01-29 11:50:03 +09:00
Mike Kelly 1bc4003b6c Whitespace changes. 2011-01-29 11:50:02 +09:00
Mike Kelly a230ee3ae2 Fixed spelling and grammar 2011-01-29 11:50:01 +09:00
Mike Kelly 260e86397f Updated copyright because it's 2011! 2011-01-29 11:50:00 +09:00
Mike Kelly 99853b5360 Bumped build number 2010-12-23 20:50:46 +09:00
Mike Kelly e422d4456d Removed "regularly tested" from various scanners
These scanners are no longer tested regularly by the maintainter, and should
not be listed as such in the description file.
2010-12-23 20:25:21 +09:00
Mike Kelly 9920c2b324 Fixed USB id for Avision FB2080E
Added leading zero to the USB id of Avision FB2080E.  Regenerated description
file.
2010-12-23 20:24:50 +09:00
Mike Kelly 24237f2562 Added support for the Avision AV210D2+ scanner
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.
2010-12-23 19:47:56 +09:00
Mike Kelly 37b45c4f76 Moved device init code to sane_get_devices()
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.
2010-12-23 19:38:24 +09:00
Mike Kelly 046441ad6c Rewrote indirect "adf_mode" code to be more direct
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.
2010-12-23 19:38:24 +09:00
Mike Kelly 8bd4e454ca Fixed indentation 2010-12-23 19:38:13 +09:00
Mike Kelly 7999eeb19d Changed AVISION_FILTER_* defs to use final values
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.
2010-12-23 19:38:13 +09:00
Mike Kelly ce8b353950 Wrap duplicate USB id entries with ifdefs
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.
2010-12-23 19:38:13 +09:00
Mike Kelly 0233072a5e Removed a duplicate entry for Avision AV210C2
Removed a duplicate entry for Avision AV210C2 and Regenerated the
description file.
2010-12-23 19:38:07 +09:00
Mike Kelly 336a057594 Print out USB ids as four digit hex numbers
Print out USB ids as four digit hex numbers.
Also fixed a spelling/type-o error in a comment.
2010-12-23 19:37:52 +09:00
Mike Kelly 82bcacb732 Enhance sane_get_option_descriptor() debug message
Print the value of the "option" parameter to the sane_get_option_descriptor()
function.
2010-12-23 19:13:52 +09:00
Mike Kelly 4fcd69a7da - Added the full range of the HP 8300 series scanners. These scanners are all
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.
2010-12-09 16:25:32 +09:00
Mike Kelly 6a49df4496 - Added Xerox DocuMate262i.
- Generated a new version of doc/descriptions/avision.desc from avision.c.
2010-12-09 16:23:18 +09:00
Mike Kelly 12ce47285d - Fixed what appears to have been a fat-fingered change to the USB id for
the AV610, and added a comment for the @V5100 in avision.c.
- Generated a new version of doc/descriptions/avision.desc from avision.c.
  This restores information lost with my last update.  I've intentionally
  seperated these changes so that they can be more easily understood.
2010-12-09 16:22:03 +09:00
Mike Kelly 12930627d3 - Adding myself as maintainer.
- Bumping version number.
2010-12-09 16:12:39 +09:00
m. allan noah 19c52ae761 patch for AV122-C2 from Ori Koren 2010-07-02 09:59:35 -04:00
Julien BLACHE e780514515 avision: wrap unused function in #if 0 2010-06-23 18:54:13 +02:00
Julien BLACHE 79dcfdd72d Revert "avision: kill unused function"
This reverts commit 1c908927de.
2010-06-23 18:53:26 +02:00
Julien BLACHE 1cb507e84e avision: fix format strings for DBG() 2010-06-23 18:21:34 +02:00
Julien BLACHE 1c908927de avision: kill unused function 2010-06-23 18:21:34 +02:00
Julien BLACHE 634bb89a71 avision: fix missing parentheses 2010-06-23 18:21:34 +02:00
m. allan noah 909919d0d5 add Fujitsu fi-5015C 2010-05-24 13:44:15 -04:00
m. allan noah 1465e3b12e updated settings for Visioneer 9450 2010-02-13 13:09:38 -05:00
m. allan noah ff048f4176 add three new SANE_VALUE macros and use mode name macros from saneopts.h 2010-02-10 23:48:21 -05:00
m. allan noah 4034d379a8 Set AV_LIGHT_CHECK_BOGUS on Fujitsu SP620C 2009-06-29 21:30:32 -04:00
Alessandro Zummo b39c12dd7b Define MM_PER_INCH once for all 2009-06-18 15:54:49 +02:00
chris@cnpbagwell.com 4d9e8138af standardize including local sane/ include files.
Source code was inconsistent on how they were referencing
include files in include/sane.  In certain cases, sane/sane.h
and sane/saneopts.h was really including external copies (with
some preprocessor implementations anyways).
2009-05-07 22:06:20 -05:00
Julien BLACHE 8c90ce6b75 Fix typos in error messages in sense_handler(). 2009-03-28 14:48:08 +00:00
Chris Bagwell 70f3fdfba4 * acinclude.m4, backend/*.[ch], tools/*.[ch], frontend/*.[ch]:
Global replace of u_int??_t with C9x standard based uintxx_t
 in order to remove some tricky and overlapping portability logic
 from acinclude.m4 and leave it in only m4/stdint.m4.
2009-02-26 03:15:43 +00:00
m. allan noah b85947768d backend/*.[ch]: more consistent #include "../include/sane/config.h" 2009-02-25 02:11:17 +00:00
m. allan noah 8f82d9f60b * backend/avision.c: backend v290, fix reader_pid and NVRAM option
issues, by Mattias Ellert.
* backend/fujitsu.c: backend v89, fi-4750 has no serial number support
* doc/descriptions/fujitsu.desc: backend v89, remove 'MAC/TWAIN' text
* doc/sane-fujitsu.man: backend v89
* backend/.cvsignore: ignore *.loT
2009-02-20 19:57:21 +00:00
m. allan noah 7eedd6b799 * backend/avision.c: backend v289
- fix sending SIGTERM when reader_pid == 0
2008-12-08 14:46:07 +00:00
m. allan noah 91598aa800 * backend/*.[ch]: nearly every backend used V_MAJOR
instead of SANE_CURRENT_MAJOR in sane_init()
* backend/snapscan.c: remove EXPECTED_VERSION check
since new SANE standard is forward compatible
2008-11-26 21:21:31 +00:00
Mattias Ellert 1e8ff4c986 Fix the logic 2008-05-29 20:46:07 +00:00
Rene Rebe 3f0f3be9e3 * backend/avision.{c,h}: merged latest upstream SVN changes, bug fixes
and device ID updates, including fixing uninitialized variables due
          former defect merge and exposure control for film / dia scanners
2008-05-26 09:57:28 +00:00
Rene Rebe abf10f87a3 * backend/avision.ch: fixed device list matching for entries
with partial matches on USB ID, but vendor / product string
          matches as mostly only the HP5300 vs. HP5370, fixed non-color
          calibration for devices not filling all RGB fields of calibration
          format information, do not send 3x3 color matrix to older devices
          (ASIC versions) as some HP53xx does not correctly handle it,
          improved calibration accuracy and fixed transparency adapter
          detection to not use non-zero as present, but just 1 (some
          devices now set 0xff as (-1) - not present ...
2008-02-09 10:42:46 +00:00
Mattias Ellert 7c6b4d6a99 Fix handling of valid "negative" PIDs 2007-11-18 10:59:18 +00:00
Rene Rebe 6b45291c02 * backend/avision.[ch]:
Implemented support for latest Avision ASICs and features,
          including overscan, background raster, software scaling for
          cheaper ASICs used in HP scanners. Changed types used to
          more portable uint* ones, without underscore (_), removed
          in-file ChangeLog history, as the files became big enough.
          Implemented early calibration for easier handling of
          Avision-based film scanners and implemented support for
          2-pass duplex scanners.
2007-11-17 16:19:53 +00:00
Rene Rebe 91255bd85a the last remaining Avision usbid without tailing zeros, sorry 2006-06-06 11:35:12 +00:00
Rene Rebe ead7bf6036 hopefully fixed the remaining Avision usbids to make the scripts happy 2006-06-06 11:32:00 +00:00
Rene Rebe 66fe987c4d Avision backend update (Build 182 -> 201), the ChaneLog has the details 2006-06-06 11:24:18 +00:00
Rene Rebe 0c5da94b17 fixed more typos in comments and debug output, removed obsolete
options from the parser, example avision.conf and manual page.
          Fixed 12 Bit gray and color modes to actually work as well as
          software CCD line-difference correction. Minimal scan resolutions
          have been slightly adapted for some ASICs.
2005-12-05 23:27:22 +00:00
Rene Rebe dff12fc90b * backend/avision.c backend/avision.h: updated the Avision backend
from BUILD 167 to 179, including support for HP 5370, AV600U,
          AV210C2, AV220C2,  et. al. The USB i/o paths got hardened, and a
          lot of fixes as well es enhancements and optimizations where added
          and a lot of typos, mostly in debug output and comments, got fixed.
          The "Line Art" mode was renamed to "Lineart" to match the other
          backends.
2005-12-04 21:29:22 +00:00
Rene Rebe e5a5f45497 Updated the Avision backend with the latest off-site maintained version:
fixed segmentation faults for some modes, many many new devices, two
different duplex modes are supported, vast speedup of multi page batch scans,
buttons as well a 7-segment LED readout and some quirks for old scanners not
filling all fields
2005-07-15 09:12:27 +00:00
Rene Rebe ce7d34ba23 2004-11-19 Rene Rebe <rene@exactcode.de>
* backend/avison.c doc/descriptions/avision.desc: just added new IDs
2004-11-19 15:48:18 +00:00
Rene Rebe 5eb4ca04c1 * backend/avision.h backend/avision.c: update of the scanner ID table,
wait_4_light bugfixes, fixed color packing, fixed 16bit modes
  (especially for big-endian systems), avoid 16bit modes for default
  modes, fixed gamma-table for some models as well as spelling on the
  way
2004-10-21 15:01:04 +00:00
Rene Rebe c70b8a260c 2004-10-20 Rene Rebe <rene@exactcode.de>
* backend/avision.c doc/descriptions/avision.desc doc/sane-avision.man:           substituted my mail address and web-site to a new one - due to
          leaving the rocklinux project
2004-10-20 06:09:08 +00:00
Henning Geinitz af58065746 64 bit platform fixes (bug #300799). 2004-10-03 17:34:36 +00:00
Rene Rebe 4897ea92fa * backend/avision.c, backend/avision.h, doc/sane-avision.man:
Fixed compilation warning (Bug #300399) and added a force-a3
  option, needed for A3 scanner returning bogus scan area definitions
2004-06-22 14:12:52 +00:00
Mattias Ellert ac9ec0ff1c Missed one... 2004-06-20 01:22:44 +00:00
Rene Rebe c4b01509ab 2004-04-14 Rene Rebe <rene@rocklinux.org>
* backend/avision.h, backend/avision.c: the current development state,
          including cleanups, code refactoring, dynamic color and scan source
          list creation, implemented ADF mirroring needed for some ASICs ,
          some scan window scaliing fixes for some ASICs, added 16bit gray
          and color support, fixed a tiny big-endian issue, fixed command
          error reporting for some ASICs, improved inquiry logging and some
          tiny fixes for film-scanners.

Sorry for such a bit chunk so late in feature freeze (...). But tested on Ultra
SPARC, PowerPC and x86 Linux ... ;-)
2004-04-14 20:20:39 +00:00
Rene Rebe 477b0029ff * backend/avision.c backend/avision.h: the current development state,
including cleanups, code refactoring and nearly complete HP
  53xx/75xx ADF support
2003-11-23 23:35:53 +00:00
Rene Rebe 023f7c1e7a Also fixed Bugs #300288 and #300196, removed the conflicting Option_Value
now present in sanei_backend.h and made requested clarifications (Bugs #300290,
#300291)
2003-10-28 11:24:21 +00:00
Rene Rebe 8425846c8e merge of the current Subversion revision of SANE/Avision. The fixes include:
endianess fixes, calibration code, ADF detection, correct lamp warmup,
gamma table for new ASICs, some workarounds for ASIC variations and the
convertion to use OPT_SOURCE instead of seperate OPT_ADF and OPT_TRANS.
2003-10-28 09:41:27 +00:00
Rene Rebe ea653fab7e a nice warning when no config file is present ... 2003-05-09 01:36:20 +00:00
Rene Rebe 408b313285 oops - compile fix for normal compilers ... sorry. 2003-05-09 01:32:07 +00:00
Rene Rebe caa3c7f853 update to the tatest avision backend including fix for segmentation-fault
when no config file is present.
2003-05-09 01:29:50 +00:00
Rene Rebe 8ce6e0d515 Updated the avision backend to latest build. This includes user-space
USB support and OS/2 thread handling.
2003-03-25 01:43:35 +00:00
Rene Rebe 2f8f90a79a Update to the latest Avision backend release. It includes feature
and stability improvements and bug fixes. The sane man-page now
mentions that the avision backend supports more than the AV 630 CS ...
2003-02-16 17:35:05 +00:00
Rene Rebe 3e1655a2ce New avision backend - including the auto-generated .desc file. 2002-12-01 13:42:18 +00:00
Rene Rebe 71bbc23961 Updated the Avisin backend to my todays snapshot. It supports more devices
as well as ADF and A3 size.
Massive code cleanups.
2002-11-23 16:17:07 +00:00
Rene Rebe c67286adee Commited the latest avision backend. 2002-08-30 09:21:51 +00:00
Rene Rebe baeb578a8f next Avision backend version 2002-06-04 17:27:00 +00:00
Rene Rebe 7db886750b next backend version, several bug-fixes and new scsi id's ... 2002-04-21 23:08:05 +00:00
Rene Rebe e29b57f2df bug fixes (incl. the close bug in attach) 2002-04-12 00:14:01 +00:00
Rene Rebe 36edd317c9 fixed avision.desc syntax 2002-04-08 18:02:54 +00:00
Rene Rebe 3c9ce35908 updated to Avision backend build 25. More stable for HP usb scanners,
suport for Misubishi scanners and various cleanups.
2002-04-08 14:35:32 +00:00
Rene Rebe 5a5f5a92fb many cleanups, fixed sane_cancel to not hang - but perform the
cancel, added a disable-gamma-table option and added the possible
options into the avision.conf file
2002-01-19 00:38:07 +00:00
Rene Rebe ca707b94e5 removed the call of exit in a debug case 2002-01-17 23:38:20 +00:00
Rene Rebe a4101b2fe5 Merged the Avision 0.3.0 backend (incl. genreal cleanups, USB handling ...)
also updated the homepage url and the man-page.
2002-01-16 23:18:43 +00:00
Rene Rebe e2169ec4e0 Some fixes for the Avision backend. (Brightness and contrast via gamma-table
clean up. First config option.)
2000-11-15 19:07:56 +00:00
Rene Rebe 83d084d8d3 Added gamma table support and brightness / contrast emulation via the gamma
-table to the avision backend. Additional code clean ups ...
Added my new e-mail address to the AUTHORS file.
2000-11-14 20:05:35 +00:00
Petter Reinholdtsen b4a1a513c9 Merge devel (v1.0.3) into head branch. 2000-08-12 15:11:46 +00:00
Petter Reinholdtsen 760423d864 Merged main branch with current DEVEL_1_9. 2000-03-05 13:57:25 +00:00