kopia lustrzana https://gitlab.com/sane-project/website
482 wiersze
14 KiB
HTML
482 wiersze
14 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
|
|
"http://www.w3.org/TR/REC-html40/loose.dtd">
|
|
<HTML>
|
|
<HEAD>
|
|
<TITLE>sane-devel: Re: Missing mustek backend maintainer, got patches?</TITLE>
|
|
<META NAME="Author" CONTENT="Henning Meier-Geinitz (henningmg@gmx.de)">
|
|
<META NAME="Subject" CONTENT="Re: Missing mustek backend maintainer, got patches?">
|
|
</HEAD>
|
|
<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
|
|
<H1>Re: Missing mustek backend maintainer, got patches?</H1>
|
|
<!-- received="Wed Feb 16 23:34:21 2000" -->
|
|
<!-- isoreceived="20000217073421" -->
|
|
<!-- sent="Thu, 17 Feb 2000 00:07:39 +0100" -->
|
|
<!-- isosent="20000216230739" -->
|
|
<!-- name="Henning Meier-Geinitz" -->
|
|
<!-- email="henningmg@gmx.de" -->
|
|
<!-- subject="Re: Missing mustek backend maintainer, got patches?" -->
|
|
<!-- id="20000217000739.B20942@hmg1.vortex.robin.de" -->
|
|
<!-- inreplyto="200002150129.JAA26331@minerva.ee.uwa.edu.au" -->
|
|
<STRONG>From:</STRONG> Henning Meier-Geinitz (<A HREF="mailto:henningmg@gmx.de?Subject=Re:%20Missing%20mustek%20backend%20maintainer,%20got%20patches?&In-Reply-To=<20000217000739.B20942@hmg1.vortex.robin.de>"><EM>henningmg@gmx.de</EM></A>)<BR>
|
|
<STRONG>Date:</STRONG> Wed Feb 16 2000 - 15:07:39 PST
|
|
<P>
|
|
<!-- next="start" -->
|
|
<LI><STRONG>Next message:</STRONG> <A HREF="0175.html">Karl Heinz Kremer: "Re: 'scanimage -T' ?"</A>
|
|
<UL>
|
|
<LI><STRONG>Previous message:</STRONG> <A HREF="0173.html">Henning Meier-Geinitz: "Re: New CVS snapshot 20000213"</A>
|
|
<LI><STRONG>In reply to:</STRONG> <A HREF="0142.html">Petter Reinholdtsen: "Missing mustek backend maintainer, got patches?"</A>
|
|
<!-- nextthread="start" -->
|
|
<LI><STRONG>Next in thread:</STRONG> <A HREF="0235.html">Petter Reinholdtsen: "Re: Missing mustek backend maintainer, got patches?"</A>
|
|
<!-- reply="end" -->
|
|
<LI><STRONG>Messages sorted by:</STRONG>
|
|
<A HREF="date.html#174">[ date ]</A>
|
|
<A HREF="index.html#174">[ thread ]</A>
|
|
<A HREF="subject.html#174">[ subject ]</A>
|
|
<A HREF="author.html#174">[ author ]</A>
|
|
</UL>
|
|
<HR NOSHADE><P>
|
|
<!-- body="start" -->
|
|
<P>
|
|
Hi,
|
|
<BR>
|
|
<P><EM>> I am not qualified to apply and test these patches (I don't have a
|
|
</EM><BR>
|
|
<EM>> supported scanner), and would really like someone else to keep the
|
|
</EM><BR>
|
|
<EM>> mustek backend up to date. What should I do?
|
|
</EM><BR>
|
|
<P>I don't know much about the other Mustek scanners and don't have any
|
|
<BR>
|
|
documentation so I'm not sure if I can help here.
|
|
<BR>
|
|
<P>As a interim solution I have reworked my patch a bit to avoid possible
|
|
<BR>
|
|
problems with other (non 600 II N) scanners as I don't want to break
|
|
<BR>
|
|
anything. So the bug "cancel during scan freezes scanner" isn't fixed. The
|
|
<BR>
|
|
remaining patch fixes a timeout problem for 600 II Ns and adds (working)
|
|
<BR>
|
|
color support for 600 II Ns firmware 1.01 (including documentation updates).
|
|
<BR>
|
|
It doesn't touch anything for non parallel port scanners so this should be
|
|
<BR>
|
|
ok.
|
|
<BR>
|
|
<P>If this patch is included I could test the Mustek backend on a different
|
|
<BR>
|
|
Mustek scanner (belonging to a friend, IIRC a mfs 6000 cz SCSI scanner).
|
|
<BR>
|
|
I am on vacation next week so I can't do this before 2000-02-28.
|
|
<BR>
|
|
<P>Anybody out there using the Mustek backend who could test the patch for not
|
|
<BR>
|
|
breaking anything?
|
|
<BR>
|
|
<P>Some more information about the Mustek 600 II N can be found here:
|
|
<BR>
|
|
<A HREF="http://hmg.home.pages.de/sane/">http://hmg.home.pages.de/sane/</A>
|
|
<BR>
|
|
<P>Bye, Henning
|
|
<BR>
|
|
<P>cd sane-devel-20000213;patch -p1 </path/to/patch
|
|
<BR>
|
|
<P>----------------------- snip ------------------------------
|
|
<BR>
|
|
diff -u -r sane-1.0.1/backend/mustek.c sane-1.0.1.patched/backend/mustek.c
|
|
<BR>
|
|
--- sane-1.0.1/backend/mustek.c Sat Apr 3 07:02:21 1999
|
|
<BR>
|
|
+++ sane-1.0.1.patched/backend/mustek.c Wed Jan 26 23:07:08 2000
|
|
<BR>
|
|
@@ -1452,7 +1452,8 @@
|
|
<BR>
|
|
|
|
<BR>
|
|
if (s->fd >= 0)
|
|
<BR>
|
|
{
|
|
<BR>
|
|
- if (status == SANE_STATUS_CANCELLED)
|
|
<BR>
|
|
+ if ((status == SANE_STATUS_CANCELLED) &&
|
|
<BR>
|
|
+ !(s->hw->flags & MUSTEK_FLAG_PP))
|
|
<BR>
|
|
{
|
|
<BR>
|
|
DBG(4, "do_stop: waiting for scanner to become ready\n");
|
|
<BR>
|
|
dev_wait_ready (s);
|
|
<BR>
|
|
@@ -1509,7 +1510,9 @@
|
|
<BR>
|
|
/* According to Andreas Czechanowski, the line-distance
|
|
<BR>
|
|
values returned for the parallel-port scanners are
|
|
<BR>
|
|
garbage, so we have to fix things up manually. Not
|
|
<BR>
|
|
- good. */
|
|
<BR>
|
|
+ good.
|
|
<BR>
|
|
+ This is true for firmware 2.00. PP scanners with firmware
|
|
<BR>
|
|
+ 1.01 don't need this fix. */
|
|
<BR>
|
|
if (peak_res == 600)
|
|
<BR>
|
|
{
|
|
<BR>
|
|
if (res < 51)
|
|
<BR>
|
|
@@ -1851,9 +1854,10 @@
|
|
<BR>
|
|
}
|
|
<BR>
|
|
}
|
|
<BR>
|
|
|
|
<BR>
|
|
+/* Mustek 600 II N firmware 2.00 */
|
|
<BR>
|
|
static int
|
|
<BR>
|
|
-fix_line_distance_pp (Mustek_Scanner *s, int num_lines, int bpl,
|
|
<BR>
|
|
- u_int8_t *raw, u_int8_t *out)
|
|
<BR>
|
|
+fix_line_distance_pp_2 (Mustek_Scanner *s, int num_lines, int bpl,
|
|
<BR>
|
|
+ u_int8_t *raw, u_int8_t *out)
|
|
<BR>
|
|
{
|
|
<BR>
|
|
u_int8_t *out_end, *out_ptr, *raw_end = raw + num_lines * bpl;
|
|
<BR>
|
|
int c, num_saved_lines, line;
|
|
<BR>
|
|
@@ -1925,6 +1929,85 @@
|
|
<BR>
|
|
}
|
|
<BR>
|
|
}
|
|
<BR>
|
|
|
|
<BR>
|
|
+/* Mustek 600 II N firmware 1.01; the last lines returned are ...rgbrgbrgb
|
|
<BR>
|
|
+ not e.g. ...rgbgbgbbbbb so some lines are missing. The color sequence
|
|
<BR>
|
|
+ is different form the one of 2.0.
|
|
<BR>
|
|
+ Henning Meier-Geinitz <<A HREF="mailto:hmg@gmx.de?Subject=Re:%20Missing%20mustek%20backend%20maintainer,%20got%20patches?&In-Reply-To=<20000217000739.B20942@hmg1.vortex.robin.de>">hmg@gmx.de</A>> */
|
|
<BR>
|
|
+static int
|
|
<BR>
|
|
+fix_line_distance_pp_1 (Mustek_Scanner *s, int num_lines, int bpl,
|
|
<BR>
|
|
+ u_int8_t *raw, u_int8_t *out)
|
|
<BR>
|
|
+{
|
|
<BR>
|
|
+ u_int8_t *out_end, *out_ptr, *raw_end = raw + num_lines * bpl;
|
|
<BR>
|
|
+ int c, num_saved_lines, line;
|
|
<BR>
|
|
+
|
|
<BR>
|
|
+ if (!s->ld.buf[0])
|
|
<BR>
|
|
+ {
|
|
<BR>
|
|
+ /* This buffer must be big enough to hold maximum line distance
|
|
<BR>
|
|
+ times max_bpl bytes. The maximum line distance for 600 dpi
|
|
<BR>
|
|
+ parallel-port scanners is 23. We use 32 to play it safe... */
|
|
<BR>
|
|
+ DBG(2, "fix_line_distance_pp: allocating temp buffer of %d*%d bytes\n",
|
|
<BR>
|
|
+ 32, bpl);
|
|
<BR>
|
|
+ s->ld.buf[0] = malloc (32 * (long) bpl);
|
|
<BR>
|
|
+ if (!s->ld.buf[0])
|
|
<BR>
|
|
+ {
|
|
<BR>
|
|
+ DBG(1, "fix_line_distance_pp: failed to malloc temporary buffer\n");
|
|
<BR>
|
|
+ return 0;
|
|
<BR>
|
|
+ }
|
|
<BR>
|
|
+ }
|
|
<BR>
|
|
+
|
|
<BR>
|
|
+ num_saved_lines = s->ld.index[0] - s->ld.index[1];
|
|
<BR>
|
|
+ if (num_saved_lines > 0)
|
|
<BR>
|
|
+ /* restore the previously saved lines: */
|
|
<BR>
|
|
+ memcpy (out, s->ld.buf[0], num_saved_lines * bpl);
|
|
<BR>
|
|
+
|
|
<BR>
|
|
+ while (1)
|
|
<BR>
|
|
+ {
|
|
<BR>
|
|
+ if (++s->ld.lmod3 >= 3)
|
|
<BR>
|
|
+ s->ld.lmod3 = 0;
|
|
<BR>
|
|
+
|
|
<BR>
|
|
+ c = s->ld.lmod3;
|
|
<BR>
|
|
+ if (s->ld.index[c] < 0)
|
|
<BR>
|
|
+ ++s->ld.index[c];
|
|
<BR>
|
|
+ else
|
|
<BR>
|
|
+ {
|
|
<BR>
|
|
+ s->ld.quant[c] += s->ld.peak_res;
|
|
<BR>
|
|
+ if (s->ld.quant[c] > s->ld.max_value)
|
|
<BR>
|
|
+ {
|
|
<BR>
|
|
+ s->ld.quant[c] -= s->ld.max_value;
|
|
<BR>
|
|
+ line = s->ld.index[c]++ - s->ld.ld_line;
|
|
<BR>
|
|
+ out_ptr = out + line * bpl + c;
|
|
<BR>
|
|
+ out_end = out_ptr + bpl;
|
|
<BR>
|
|
+ while (out_ptr != out_end)
|
|
<BR>
|
|
+ {
|
|
<BR>
|
|
+ *out_ptr = *raw++;
|
|
<BR>
|
|
+ out_ptr += 3;
|
|
<BR>
|
|
+ }
|
|
<BR>
|
|
+
|
|
<BR>
|
|
+ if (raw >= raw_end)
|
|
<BR>
|
|
+ {
|
|
<BR>
|
|
+ DBG (1, "fix_line_distance_pp: lmod3=%d, index=(%d,%d,%d)\n",
|
|
<BR>
|
|
+ s->ld.lmod3,
|
|
<BR>
|
|
+ s->ld.index[0], s->ld.index[1], s->ld.index[2]);
|
|
<BR>
|
|
+ num_lines = s->ld.index[1] - s->ld.ld_line;
|
|
<BR>
|
|
+
|
|
<BR>
|
|
+ /* copy away the lines with at least one missing
|
|
<BR>
|
|
+ color component, so that we can interleave them
|
|
<BR>
|
|
+ with new scan data on the next call */
|
|
<BR>
|
|
+ num_saved_lines = s->ld.index[0] - s->ld.index[1];
|
|
<BR>
|
|
+ memcpy (s->ld.buf[0], out + num_lines * bpl,
|
|
<BR>
|
|
+ num_saved_lines * bpl);
|
|
<BR>
|
|
+
|
|
<BR>
|
|
+ /* notice the number of lines we processed */
|
|
<BR>
|
|
+ s->ld.ld_line = s->ld.index[1];
|
|
<BR>
|
|
+ /* return number of complete (r+g+b) lines */
|
|
<BR>
|
|
+ return num_lines;
|
|
<BR>
|
|
+ }
|
|
<BR>
|
|
+ }
|
|
<BR>
|
|
+ }
|
|
<BR>
|
|
+ }
|
|
<BR>
|
|
+}
|
|
<BR>
|
|
+
|
|
<BR>
|
|
+
|
|
<BR>
|
|
static int
|
|
<BR>
|
|
fix_line_distance_se (Mustek_Scanner *s, int num_lines, int bpl,
|
|
<BR>
|
|
u_int8_t *raw, u_int8_t *out)
|
|
<BR>
|
|
@@ -2481,7 +2564,17 @@
|
|
<BR>
|
|
else if (s->ld.max_value)
|
|
<BR>
|
|
{
|
|
<BR>
|
|
if (s->hw->flags & MUSTEK_FLAG_PP)
|
|
<BR>
|
|
- num_lines = fix_line_distance_pp (s, num_lines, bpl, data, extra);
|
|
<BR>
|
|
+ {
|
|
<BR>
|
|
+ if (s->hw->flags & MUSTEK_FLAG_LD_FIX)
|
|
<BR>
|
|
+ /* If we need manual line distance values it's probably a
|
|
<BR>
|
|
+ scanner with firmware 2.00 */
|
|
<BR>
|
|
+ num_lines = fix_line_distance_pp_2 (s, num_lines, bpl, data,
|
|
<BR>
|
|
+ extra);
|
|
<BR>
|
|
+ else
|
|
<BR>
|
|
+ /* Otherwise it's firmware 1.01 or some other */
|
|
<BR>
|
|
+ num_lines = fix_line_distance_pp_1 (s, num_lines, bpl, data,
|
|
<BR>
|
|
+ extra);
|
|
<BR>
|
|
+ }
|
|
<BR>
|
|
else
|
|
<BR>
|
|
fix_line_distance_normal (s, num_lines, bpl, data, extra);
|
|
<BR>
|
|
}
|
|
<BR>
|
|
diff -u -r sane-1.0.1/backend/mustek.desc sane-1.0.1.patched/backend/mustek.desc
|
|
<BR>
|
|
--- sane-1.0.1/backend/mustek.desc Fri Oct 30 07:23:33 1998
|
|
<BR>
|
|
+++ sane-1.0.1.patched/backend/mustek.desc Wed Jan 26 23:04:24 2000
|
|
<BR>
|
|
@@ -41,6 +41,8 @@
|
|
<BR>
|
|
:comment "1 pass; (f/w == ? ; scsi id C03 S10IDW)"
|
|
<BR>
|
|
:model "SE-12000SP"
|
|
<BR>
|
|
:comment "1 pass; (f/w == 1.01; scsi id C06 S12IDW)"
|
|
<BR>
|
|
-
|
|
<BR>
|
|
+:model "600 II N"
|
|
<BR>
|
|
+:comment "1 pass; (f/w = 1.01 & 2.00; non SCSI; id MFC-06000CZ)"
|
|
<BR>
|
|
+:url "<A HREF="http://hmg.home.pages.de/sane/">http://hmg.home.pages.de/sane/</A>"
|
|
<BR>
|
|
; :comment and :url specifiers are optional after :mfg, :model, :desc,
|
|
<BR>
|
|
; and at the top-level.
|
|
<BR>
|
|
diff -u -r sane-1.0.1/doc/sane-mustek.man sane-1.0.1.patched/doc/sane-mustek.man
|
|
<BR>
|
|
--- sane-1.0.1/doc/sane-mustek.man Fri Oct 30 07:22:19 1998
|
|
<BR>
|
|
+++ sane-1.0.1.patched/doc/sane-mustek.man Wed Jan 26 23:04:24 2000
|
|
<BR>
|
|
@@ -95,7 +95,8 @@
|
|
<BR>
|
|
controllers (notably the ncr810 controller under Linux). If color
|
|
<BR>
|
|
scans have horizontal stripes and/or the colors are off, then it's
|
|
<BR>
|
|
likely that your controller suffers from this problem. Turning on
|
|
<BR>
|
|
-this option usually fixes the problem.
|
|
<BR>
|
|
+this option usually fixes the problem. The parallel port scanner 600
|
|
<BR>
|
|
+II N is a special case, see section PARALLEL PORT SCANNERS below.
|
|
<BR>
|
|
|
|
<BR>
|
|
Option
|
|
<BR>
|
|
.B lineart-fix
|
|
<BR>
|
|
@@ -196,6 +197,13 @@
|
|
<BR>
|
|
brightness. However, the first image scanned after such a shutdown may
|
|
<BR>
|
|
have stripes and appear to be over-exposed. When this happens, just
|
|
<BR>
|
|
take another scan, and the image will be fine.
|
|
<BR>
|
|
+.PP
|
|
<BR>
|
|
+If your images have horizontal stripes in color mode, check option
|
|
<BR>
|
|
+linedistance-fix (see above). Apply this option for a scanner with
|
|
<BR>
|
|
+firmware version 2.00 and disable it for version 1.01. Please contact
|
|
<BR>
|
|
+the mailing list
|
|
<BR>
|
|
+.IR sane\<A HREF="mailto:-devel@mostang.com?Subject=Re:%20Missing%20mustek%20backend%20maintainer,%20got%20patches?&In-Reply-To=<20000217000739.B20942@hmg1.vortex.robin.de>">-devel@mostang.com</A>
|
|
<BR>
|
|
+if you have a 600 II N with a different firmware version.
|
|
<BR>
|
|
.SH FILES
|
|
<BR>
|
|
.TP
|
|
<BR>
|
|
.I @CONFIGDIR@/mustek.conf
|
|
<BR>
|
|
<P><P><P><P><PRE>
|
|
--
|
|
Source code, list archive, and docs: <A HREF="http://www.mostang.com/sane/">http://www.mostang.com/sane/</A>
|
|
To unsubscribe: echo unsubscribe sane-devel | mail <A HREF="mailto:majordomo@mostang.com?Subject=Re:%20Missing%20mustek%20backend%20maintainer,%20got%20patches?&In-Reply-To=<20000217000739.B20942@hmg1.vortex.robin.de>">majordomo@mostang.com</A>
|
|
</PRE>
|
|
<P><!-- body="end" -->
|
|
<HR NOSHADE>
|
|
<UL>
|
|
<!-- next="start" -->
|
|
<LI><STRONG>Next message:</STRONG> <A HREF="0175.html">Karl Heinz Kremer: "Re: 'scanimage -T' ?"</A>
|
|
<LI><STRONG>Previous message:</STRONG> <A HREF="0173.html">Henning Meier-Geinitz: "Re: New CVS snapshot 20000213"</A>
|
|
<LI><STRONG>In reply to:</STRONG> <A HREF="0142.html">Petter Reinholdtsen: "Missing mustek backend maintainer, got patches?"</A>
|
|
<!-- nextthread="start" -->
|
|
<LI><STRONG>Next in thread:</STRONG> <A HREF="0235.html">Petter Reinholdtsen: "Re: Missing mustek backend maintainer, got patches?"</A>
|
|
<!-- reply="end" -->
|
|
<LI><STRONG>Messages sorted by:</STRONG>
|
|
<A HREF="date.html#174">[ date ]</A>
|
|
<A HREF="index.html#174">[ thread ]</A>
|
|
<A HREF="subject.html#174">[ subject ]</A>
|
|
<A HREF="author.html#174">[ author ]</A>
|
|
</UL>
|
|
<!-- trailer="footer" -->
|
|
<HR NOSHADE>
|
|
<P>
|
|
<SMALL>
|
|
<EM>
|
|
This archive was generated by <A HREF="http://www.hypermail.org/">hypermail 2b29</A>
|
|
: <EM>Wed Feb 16 2000 - 23:38:40 PST</EM>
|
|
</EM>
|
|
</SMALL>
|
|
</BODY>
|
|
</HTML>
|