Wykres commitów

155 Commity (00df971593ee8b0c6bc23f2574291ac5f653408f)

Autor SHA1 Wiadomość Data
Olaf Meeuwissen e79adde8b2
Use URL to refer users to copies of the GPL and LGPL
With the exception of use in three quotes as well as our inlcuded copy
of the GPL, all use of the Free Software Foundation's postal address
has been removed.

Re #320.
2021-02-12 17:41:38 +09:00
Ralph Little e111c48562 avision: added increment of the line variable in non-interpolated case 2020-12-19 17:28:36 -08:00
Ralph Little 15e200a981 avision: added some brackets to silence warnings about precedence ambiguity 2020-12-19 17:27:23 -08:00
Nikolai Kostrigin 5ef217b19d add ID information for Avision AV186+ and AV188 sheetfed USB scanners
backend/avision.c: add AV186+ as 'good',
                       AV188 as 'untested'
doc/descriptions/avision.desc: add AV186+ as 'good',
                                   AV188 as 'untested'
2020-09-28 18:31:56 +03:00
Olaf Meeuwissen cea2a83ea2 Merge branch 'master-spelling' into 'master'
spelling fixes

See merge request sane-project/backends!516
2020-09-07 09:24:15 +00:00
Peter Marschall 269a7c0413 spelling fixes for avision backend 2020-08-29 09:18:04 +02:00
Adam Richter f089aeac8c backend/avision.c adf_reset(): In debug message "adf_reset: read ... failed ...", fix arithmetic and compiler warning about printf integer format type mismatch. 2020-08-24 03:56:36 -07:00
Michael Niewöhner 743290300a backend/avision: fix lock-up of scanners not supporting fastfeed
de19ebc introduced a regression, where some scanners would lock-up
completely and require a full power cycle.

To fix that, do not call release_unit for any scanners not supporting
fastfeed for now, since that leads to lock-ups on at least one device.
Currently, it isn't clear what exactly is causing the problems, so it
maybe be enabled in a correct way again, later.

Resolves issue !337.

Signed-off-by: Michael Niewöhner <foss@mniewoehner.de>
2020-08-10 19:46:52 +02:00
Michael Niewöhner e8ae2ca16f backend/avision: fix: use fabs instead of abs for double values
Signed-off-by: Michael Niewöhner <foss@mniewoehner.de>
2020-07-26 12:20:03 +02:00
Michael Niewöhner fa6dfcc44e backend/avision: i1120: finally set correct offsets for duplex
Signed-off-by: Michael Niewöhner <foss@mniewoehner.de>
2020-07-26 12:19:56 +02:00
Michael Niewöhner 7d7184a209 backend/avision: add missing offsets for bry
Signed-off-by: Michael Niewöhner <foss@mniewoehner.de>
2020-07-26 12:19:12 +02:00
Michael Niewöhner 6a6927b198 backend/avision: implement ADF first-sheet offset compensation
i1120 has another offset. When scanning in ADF multi-page mode (the
default), the very first sheet is moved 1.5mm down. That leads to 1.5mm
being cut off at the bottom.
This implements the (hopefully last) offset setting for multi-sheet ADF
scans.

Signed-off-by: Michael Niewöhner <foss@mniewoehner.de>
2020-07-26 12:16:07 +02:00
Michael Niewöhner e96ce8887e backend/avision: add ADF front-only offset compensation
This adds offset compensation for ADF front-only scans, which may
have different offsets than ADF duplex scans.

Signed-off-by: Michael Niewöhner <foss@mniewoehner.de>
2020-07-26 12:16:07 +02:00
Michael Niewöhner 58a3cdd042 backend/avision: Rewrite offset compensation
This is a complete rewrite of the offset compensation using a
combination of overscan and line skipping. It replaces the option
AV_REAR_OFFSET by specifying exact offset values for each scanner.
This was needed for Kodak i1120 which needs bottom line skipping.
The old implementation could not skip bottom lines since we could
not know how many lines we will get in the end from ADF.
The new implementation redirects the output file descriptor to a
temporary file. After the current page is completely scanned,
offsets are applied and the output is passed to the original
output file descriptor.

Signed-off-by: Michael Niewöhner <foss@mniewoehner.de>
2020-07-26 12:16:07 +02:00
Michael Niewoehner b4716f6264 backend/avision: i1120: Add option AV_MULTI_SHEET_SCAN
Kodak i1120 has single-sheet and multi-sheet scan modes. This option sets
bitset3[7] which enables multi-sheet scan by default so there is no pause
of 1s between two sheets in ADF scan mode. This also fixes some offsets
when scanning multiple sheets.

Signed-off-by: Michael Niewöhner <foss@mniewoehner.de>
2020-07-26 12:16:06 +02:00
Michael Niewoehner e54c9602e9 backend/avision: i1120: add option AV_GAMMA_UINT16
Kodak i1120 has a different gamma table format that looks like a
uint16/double array. Implement it and add an option for it.

Signed-off-by: Michael Niewöhner <foss@mniewoehner.de>
2020-07-26 12:16:06 +02:00
Michael Niewoehner d8bf392424 backend/avision: i1120: add option AV_GAMMA_10
Kodak i1120 needs gamma to be set to 1.0 to give decent scan results.
Add an option for this.

Signed-off-by: Michael Niewöhner <foss@mniewoehner.de>
2020-07-26 12:16:06 +02:00
Michael Niewoehner 886bf85d88 backend/avision: i1120: add option AV_NO_QCALIB_MODE
i1120 does not have an explicit "quality-calibration" mode. Add an
option to disable this mode.

Signed-off-by: Michael Niewöhner <foss@mniewoehner.de>
2020-07-26 12:16:06 +02:00
Michael Niewoehner de19ebc61a backend/avision: i1120: add option AV_FASTFEED_ON_CANCEL
Some scanners like i1120 support fast feed-out of the sheet when
cancelling a running scan. Add a new option for this release type.

Signed-off-by: Michael Niewöhner <foss@mniewoehner.de>
2020-07-26 12:16:06 +02:00
Michael Niewoehner 8b467b248e backend/avision: i1120: set AV_NO_REAR
Kodak broke rear-only scan (bitset3[3]) when they modified the Avision
firmware. It would be possible to add a work-around that drops front data and
writes rear data only. Because of deinterlacing, offsets etc. this is way too
complicated. The simpliest solution to scan rear-only is to turn around the
paper stack and use front scan instead.

Signed-off-by: Michael Niewöhner <foss@mniewoehner.de>
2020-07-26 12:16:06 +02:00
Michael Niewoehner 692f87389b backend/avision: i1120: add option AV_OVERSCAN_OPTDPI
i1120 uses optical DPI for overscan calculation. Add an option for it.

Signed-off-by: Michael Niewöhner <foss@mniewoehner.de>
2020-07-26 12:16:06 +02:00
Michael Niewoehner 74e94e6901 backend/avision: i1120: add option AV_NO_QSCAN_MODE
i1120 does not have an explicit quality-scan mode. Add an option to disable it.

Signed-off-by: Michael Niewöhner <foss@mniewoehner.de>
2020-07-26 12:16:06 +02:00
Michael Niewoehner aff30cbb21 backend/avision: ability[3] seems to be a typo since ability[2] is dark cal indicator
Signed-off-by: Michael Niewöhner <foss@mniewoehner.de>
2020-07-26 12:16:06 +02:00
Michael Niewoehner de1a873cb7 backend/avision: i1120: use AV_SOFT_SCALE
Signed-off-by: Michael Niewöhner <foss@mniewoehner.de>
2020-07-26 12:16:06 +02:00
Michael Niewoehner c1c8ee8ea6 backend/avision: i1120: Enable gray filter to match windows driver
Signed-off-by: Michael Niewöhner <foss@mniewoehner.de>
2020-07-26 12:16:06 +02:00
Michael Niewoehner f393f8f246 backend/avision: i1120: add option AV_FORCE_CALIB
Add option AV_FORCE_CALIB to force calibration when scanner claims it is
not needed but it is.

Signed-off-by: Michael Niewöhner <foss@mniewoehner.de>
2020-07-26 12:16:06 +02:00
Michael Niewoehner 196ce0b046 backend/avision: Add basic support for KODAK i1120
Signed-off-by: Michael Niewöhner <foss@mniewoehner.de>
2020-07-26 12:16:06 +02:00
Olaf Meeuwissen 090973fa94 Merge branch 'for-upstream/backend_avision_nonfilm_noexposure' into 'master'
backend/avision: Disable exposure option for non-filmscanners

See merge request sane-project/backends!23
2020-03-07 09:35:18 +00:00
Olaf Meeuwissen 960394b1e4 Merge branch 'for-upstream/backend_avision_fix_threading' into 'master'
backend/avision: fix thread cancellation

See merge request sane-project/backends!21
2020-03-07 09:25:59 +00:00
Rosen Penev c320a72e32
treewide: Replace mktemp by mkstemp
mktemp has been removed in POSIX 2008. uClibc-ng optionally does not make
it available.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2019-10-03 11:47:49 -07:00
Olaf Meeuwissen 296542905e avision: Fix threaded ADF flipping duplex handling. Re #24 2019-05-04 23:39:33 +09:00
Michael Niewoehner c16ff3ffe0 backend/avision: fix thread cancellation
sigprocmask does not work for threads but only for forked processes.
Even though a thread-safe version, pthread_sigmask, we do not use it
since using singals with threads is a bad practice. Instead implement
pthread's own cancellation method. Because sane_read blocks when
reader_process is terminated, read_fds is closed and invalidated to
make sane_read abort read and return gracefully.
2018-10-28 12:36:35 +01:00
Michael Niewoehner 6d2dda4a98 backend/avision: Disable exposure option for non-filmscanners 2018-09-29 21:21:18 +02:00
Olaf Meeuwissen df1aba21bc SANE_Pid: Fix [-Wint-conversion] issues
Not all pthreads implementations use an integer type for pthread_t.
As a matter of fact, POSIX has explicitly withdrawn the requirement
that it must be an arithmatic type.

The musl C library uses a `struct __pthread *` which triggered the
warnings.  As of this change, sanei_thread.h works around this by
providing two new macros to help keep this issue out of sight.  All
backends have been changed to use these macros.
2017-07-15 14:47:54 +09:00
Olaf Meeuwissen 398d5850fa avision: Fix [-Wunused-const-variable=] compiler warning
The const variable's definition has been #ifdef'd to prevent loss of
protocol info.
2017-06-26 11:08:03 +09:00
Olaf Meeuwissen 0f70ce9aac avision: Fix [-Wunused-const-variable=] compiler warning
The threshold option which used the abs_percentage_range was removed
in e2169ec4.
2017-06-26 11:05:01 +09:00
Olaf Meeuwissen 23891a2646 .editorconfig: trim trailing whitespace 2017-05-29 21:14:29 +09:00
Dave Platt 755e829caa avision.c: abort "wait for light" loop if interrupted
Adds a "cancelled" flag to the Avision device structure, cleared
in sane_start() and set in sane_cancel().  Test this flag in
wait_4_light() and bail out of the 90-second "wait for the
light to warm up" loop if the scan is cancelled.
2016-12-15 23:12:07 -08:00
Dave Platt 28963459a4 avision.c: Recognize "backlight on" status
Avision scanners can return an additional light-status value meaning
"Transparent Media Adapter back-light is on".  Accept this as
equivalent to "on" during the lamp-warmup check prior to starting a
scan.  Re-check the light status after sending the window command, as
the light selection might have been changed and a further warm-up
may be required.
2016-12-15 23:02:42 -08:00
Dave Platt 6585b6f60d avision.c: Add "skip-adf" option
The code which tries aggressively to reset/initialize HP 82xx/83xx
Automatic Document Feeders doesn't work well if there's no ADF attached,
because the scanner reports a non-zero ADF model type in this case.
The retry code makes several attempts to initialize the ADF, and then
bails out with an "Operation not supported" error.

Add a new "option skip-adf" which will cause the backend to believe
the "ADF not present" status if that's what the scanner reports.

Fixes #313751
2016-12-15 22:56:09 -08:00
Olaf Meeuwissen 592430016c avision: fix [-Wunused-but-set-variable] compiler warning
The variable seems to have been superseded by conv_out_size in the
else branch of set_calib_data().
2015-12-27 18:38:40 +09:00
Olaf Meeuwissen e094c5b43b Invert sense of sanei_thread validity check
Double negatives suck.
2015-11-24 18:19:31 +09:00
Olaf Meeuwissen fe12d31e68 Fix SANE_Pid related -Wsign-compare warnings
This may fix threading related issues on WIN32 platforms, BTW.
2015-11-24 18:19:31 +09:00
René Rebe ca97cb22bd reverted 4d38523bda, the long commit message
is a nice fairy tale, not more - of course the ponter deref copies the whole
params, and most other packends do it the same way: grep *params *.c, and
consult your local C "assembler frontend" bible, ...
2015-03-07 18:56:54 +00:00
René Rebe f69a1ad50e removed unnecessary feature_type2 clutter by using a uint64_t to share all bits 2015-03-07 11:16:47 +00:00
René Rebe e05607323d fixed duplex for some avision scanners 2015-03-07 10:50:36 +00:00
René Rebe d5c7e22328 fixed multiple Avision regressions: most scanner basically did not
work at all anymore, ... range initilaizer, clobbering paper-length
window bits, ...) introduced over the past years, added support for
newer ASIC gamma table size, added AV220D2+ ID
2015-03-07 05:07:27 +00:00
Rolf Bensch 681c8366b5 Remove firmware checking for HP5370c scanners 2014-11-15 14:40:49 +01:00
Mike Kelly d46d19808c Bumped version number. 2012-03-25 15:05:00 -07:00
Mike Kelly 2903d6687c Fixed bug using wrong enum in x/y range check.
In the "check if x/y ranges are valid" section of the attach() function, the
enum source_mode was being used instead of source_mode_dim.  Since these two
enums are very similar, it's not likely this change will affect anything, but
it does fix the compiler warning.
2012-03-25 15:04:00 -07:00