Wykres commitów

52 Commity (master)

Autor SHA1 Wiadomość Data
Artur Shepilko 86bb976ad6 xerox_mfp: When scanning from ADF, do not stop the device at page completion
- Stopping and releasing the device causes the ADF to purge any remaining pages,
thus only the first page gets properly scanned (observed with Samsung
SCX-4729FW).
- Instead, when sourcing from the ADF, at each page's completion it should
continue and issue "OBJECT POSITION" command to proceed to the next page.
- Once all pages have been processed, the subsequent "OBJECT POSITION" command
returns the proper "CHECK CONDITION" status  (ADF is empty) and triggers the
device stop and release.
- Additionally, the status of the ADF (loaded/empty) needs to be requeried
at the `sane_start()` for proper handling of the "Auto" mode. Otherwise,
the scanning session retains the ADF state from the start of the session,
even though ADF will become empty. Thus the "Auto" mode will not properly
switch to Flatbed as intended in the client application (observed in
Simple-Scan).

> NOTE: the initial "READ" command in `sane_start()` is extraneous and
> appears to always return STATUS_BUSY (indeed, the scanner is usually
> busy loading the page). The actual READ is correctly done in
> `dev_acquire()`. It may appear benign in a single page scan mode, however,
> it becomes malfunctioning in the mutipage ADF mode. The initial READ,
> when successful, will cause the skipping of the read block from processing,
> as the actual processing is tied to content read from `dev_acquire()`.
>
> Therefore, the initial READ command in the `sane_start()` is removed.
2024-01-25 17:20:03 -06:00
Artur Shepilko 8fe58ab678 xerox_mfp: Use doc source macros for clarity 2024-01-25 17:20:13 -06:00
Artur Shepilko 0a9bf84d3c xerox_mfp: Add support for Samsung SCX-4729FW (network mode) 2024-01-25 17:20:03 -06:00
Marc Schink 3a58649ff1 xerox_mfp: Fix lineart and halftone mode
Halftone and lineart mode do not work properly except for a
resolution of 600 dpi. The very last part of a scanned document is
missing and displayed as black stripe. This problem was found with a
Samsung SCX-4521F, but is assumed to affect other devices, too.

Decode the data received from the device in halftone and lineart mode
to fix this problem.

This patch was tested with a Samsung SCX-4521F device for all
resolutions supported by the device with color, grayscale, lineart
and halftone mode.
No regression test with other devices supported by the xerox_mfp
driver was done because of lack of devices.
2023-09-27 16:32:45 +03:00
Marc Schink 7b0572a180 xerox_mfp: Fix various format specifiers 2023-09-27 16:30:16 +03:00
Marc Schink 1e1f8affb6 xerox_mfp: Add support for Samsung SCX-4521F
The acquisition with the xerox_mfp driver works almost out of the box
for the Samsung SCX-4521F but the process stops just before the end
of the document until an USB transfer timeout expires. The very last
part of the scanned document is missing then.

Do not request more data from the device than available for the last
USB transfer to overcome this problem and to be conform with the
properties of the vendor driver.

The driver was tested for all resolutions supported by the device
with color and grayscale mode.
No regression test with other devices supported by the xerox_mfp
driver was done because of lack of devices.
2023-09-27 16:30:09 +03:00
Ralph Little 5f99edda9f Resolve "sane terminates on flatbed-scanning (Xerox 3225, xerox_mfp) with : Not a JPEG file: starts with 0x00 0x00" 2023-02-21 00:48:34 +00:00
Ralph Little 388d75715f xerox_mfp: Added 4x28 to JPEG blacklist.
User reports the common JPEG problem with his Samsung SCX-4828 FN.
Machine announces itself as "Samsung SCX-4x28 Series"
2022-10-21 18:32:30 -07:00
Ralph Little 6054620c69 Merge branch '583-samsung-scx-4824fn-support' into 'master'
Resolve "Samsung SCX-4824FN Support"

Closes #583

See merge request sane-project/backends!707
2022-03-19 16:20:34 +00:00
Ralph Little 2cf41870b9 xerox_mfp: added fix for Samsung SCX-4824FN and friends for broken JPEg support 2022-03-14 16:35:19 -07:00
David Ward 1a933bba7e Cast pointer arguments if needed when using "%p" format specifier
Pointer arguments must have type (void *) when printed with the format
specifier "%p".
2022-03-08 19:00:00 -05:00
Andrew Sayers a336f5ed2f xerox_mfp: make JPEG compression user-configurable
JPEG compression improves scan time, and some scanners require it
for high DPI values.  But it loses some data, and we already support
toggling it at compile-time.

Add an advanced option so users can decide at scan-time.
2021-12-30 20:34:05 +02:00
Andrew Sayers 40f4885ab8 xerox_mfp: return correct value in dev_acquire()
dev_acquire() is expected to return 1 on success and 0 on failure.
Fix the cases where it returned non-zero on error.
2021-12-16 11:59:52 +02:00
Wolfram Sang eb42ad08d5 treewide: use SANE_CURRENT_* macros consistently
Backends use a mixture of SANE_CURRENT_{MAJOR | MINOR} and V_{MAJOR |
MINOR} with all kind of permutations. I was confused by this and one
comment in pieusb.c tells me I was not alone. Some items in old
changelogs suggest to use the SANE_CURRENT_ macros in backends, so let's
switch to do that with the exception of net.c and dll.c. Done with:

$ find backend -name '*.[ch]' | xargs sed -i '/nearly every/ ! { s/\<V_M/SANE_CURRENT_M/g }'
$ git checkout backend/net.c backend/dll.c

And manually removing the comment from pieusb.c. Everything still builds
fine.
2021-06-08 19:01:41 +02:00
Peter Marschall cd8c018585 spelling fixes for xerox_mfp backend 2020-08-29 09:18:04 +02:00
pobrn 45f84a569c respect 'local_only' parameter of sane_get_devices()
Certain backends do network scans even if the 'local_only'
parameter for 'sane_get_devices()' is true. Fix that.

Changes:

1. Modify 'sanei_configure_attach()' so that backend specific
   data may be passed to the 'attach()' function.

2. Use this in certain backends to pass the value of the
   'local_only' parameter so that network related activities
   are only carried out when the value is false.
2020-08-12 12:29:38 +02:00
Jakub Benda b30784a730 xerox_mfp: Fix Samsung CLX-3175FW color scan "Not a JPEG file"
Exclude "Samsung CLX-3170 Series" from JPEG mode. Closes #200.

Reference: https://gitlab.com/sane-project/backends/issues/200
2020-01-03 19:50:36 +03:00
Alex Belkin 7e7f02773e xerox_mfp: Fix crash in test mode
Do not decode JPEG into output buffer if it's NULL.
Also, I add assert() for `dev->decData` size, which is never
checked anywhere. Thanks to Michal Nowak for report and
testing. Fixes #128.

References:
  https://gitlab.com/sane-project/backends/issues/128

Tested-by: Michal Nowak <Mno-hime@gitlab>
2019-11-15 23:04:43 +03:00
Zdenek Dohnal bc2f40b274 Samsung C460 does not have the JPEG mode 2019-10-15 12:49:48 +02:00
Alex Belkin ad20558bb2 xerox_mfp: Blacklist Samsung M288x Series from jpeg mode
Fix issue #315839 reported by Jan Christoph Ebersach
https://alioth.debian.org/tracker/?func=detail&group_id=30186&aid=315839&atid=410366
2018-05-18 01:51:01 +03:00
Alex Belkin 54a55700f6 xerox_mfp: blacklist SCX-4500W from jpeg mode
Fix issue #315876 reported by Bernard Cafarelli
https://alioth.debian.org/tracker/?func=detail&atid=410366&aid=315876&group_id=30186
2018-05-18 01:35:21 +03:00
Alex Belkin 69a008830b Pre-create temporary file for Jpeg scanning.
Jpeg mode (as submitted by Samsung developer) uses temporary file with
fixed name. This opens attacks on reading its content or overwriting any
other user-writable file (with symlink). This change pre-creates
temporary file with O_CREAT|O_EXCL and mode 0600. Assuming usual +t
permissions for tmp this should mitigate issue.
2016-11-06 22:55:58 +03:00
Alex Belkin 226c2b9deb Update header and copyright statements for xerox_mfp. 2016-11-06 21:50:06 +03:00
Alex Belkin 83bbcfe7d5 Run indent: astyle -A8 -U -H -k3 -W3 -o xerox_mfp.[ch]
This is purely indent commit w/o any code changes.
To prove run `git diff -w`.
2016-11-06 20:24:02 +03:00
Olaf Meeuwissen e6faafcdc9 xerox_mfp: fix [-Wunused-parameter] compiler warnings
These are issued when libjpeg was not found during configuration.
2016-09-25 15:44:36 +09:00
Olaf Meeuwissen c9027378a1 xerox_mpf: Make JPEG support an option 2016-06-13 20:38:55 +09:00
Alex Belkin 926bfade54 Color scanning for Samsung models, which support JPEG Lossy compression.
Patch is submitted by Laxmeesh Onkar Markod <m.laxmeesh@samsung.com>

Patch to code is applied almost verbatim, except, insignificant
formatting fixes and making new functions static.

Also, new USB ids added and scanner support is changed as reported.
2016-05-07 22:33:03 +03:00
Olaf Meeuwissen f9e4496380 xerox_mfp: fix [-Wunused-but-set-variable] compiler warning 2015-12-27 18:41:55 +09:00
Volker Diels-Grabsch baec5e0395 Use consistently __func__ instead of __FUNCTION__
Some parts of SANE used __FUNCTION__ while other parts used __func__.
Now, __func__ is used consistently throughout the SANE sources.  This
fixes all occurrences of the following GCC warning:

warning: ISO C does not support '__FUNCTION__' predefined identifier
2015-12-20 15:27:45 +09:00
Alex Belkin 79240ac397 increment BACKEND_BUILD to distinguish from buggy version 2012-06-03 01:48:45 +04:00
Mattias Ellert 9e639753a3 Include <sys/types.h> for definition of u_long on MacOS X 2011-10-30 10:32:34 +01:00
Alex Belkin 5ea227caea keep usb device by default (correct for bug introduced by tcp sub-backend 2011-03-08 17:57:19 +03:00
Alex Belkin 842c98d204 Added Samsung SCX-4500W scan over network support for xerox_mfp backend (by Alexander Kuznetsov).
autoconf and automake reconfigure.
2010-09-30 15:11:56 +04:00
Julien BLACHE 7598a1a2c2 xerox_mfp: fix sane_init() DBG() call wrt function pointer cast to void * 2010-06-23 18:21:33 +02:00
Alex Belkin 043cc4b165 Corrected color mode malfunction.
Bug was introduced by mass change to SANE_VALUE macro, (commit ff048f4176).
2010-05-03 04:28:47 +04: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
Alex Belkin db08de0d94 more sanity checking for debug mode 2009-07-17 20:54:40 +04:00
Alex Belkin a937e22bd7 backend version increment 2009-06-13 17:35:32 +04:00
Alex Belkin dda029430e additional error check to (stop scanadf) + fix of it 2009-05-22 16:29:50 +04:00
Alex Belkin 0b2693cbda Additional error check (to stop scanadf). 2009-05-21 19:19:23 +04: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
Alex Belkin 739f09d65f update version number for upcoming rel. 2009-04-21 07:23:15 +00:00
m. allan noah 0342a63033 Updates to prepare for 1.0.20 release:
* configure.in: change version to 1.0.20cvs
* configure: rebuild from configure.in
* include/sane/sane.h: hide API changes (minor, frame and status)
* backend/canon_dr.c, backend/fujitsu.c: SANE_FRAME_JPEG
* backend/coolscan3.c: SANE_FRAME_RGBI
* backend/genesys_gl646.c, backend/genesys_gl841.c: STATUS_HW_LOCKED
* backend/rts8891.c, frontend/scanimage.c: STATUS_WARMING_UP
* backend/pixma_io_sanei.c, backend/xerox_mfp.c,
  backend/sane_strstatus.c: STATUS_HW_LOCKED & STATUS_WARMING_UP
* doc/releases.txt: minor updates for new build system
2009-04-12 19:40:31 +00:00
Alex Belkin ba825f1050 compatibility with scanners w/o feeder 2009-03-31 05:49:50 +00:00
m. allan noah b85947768d backend/*.[ch]: more consistent #include "../include/sane/config.h" 2009-02-25 02:11:17 +00:00
Alex Belkin f4fbdcbfa9 fix threshold value 2009-02-02 20:04:18 +00:00
Alex Belkin 133d37e4e4 Proper handling of parameters (to fix xsane crash) 2009-02-02 18:29:08 +00:00
Mattias Ellert 7e6153827f format fixes. 2009-02-01 21:58:04 +00:00
Alex Belkin 75ceb5bca9 proper opt group names 2009-01-12 04:10:10 +00:00
Alex Belkin 77c8b43209 linking xerox_mfp to build infrastructure 2008-12-15 21:48:20 +00:00