version 1.0.24
- use (hopefully stable) Alioth download URL - update udev patch, remove obsolete patches
This commit is contained in:
parent
7b6b2d8715
commit
7c059f77f0
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,3 +1,4 @@
|
|||||||
sane-backends-1.0.21.tar.gz
|
sane-backends-1.0.21.tar.gz
|
||||||
/sane-backends-1.0.22.tar.gz
|
/sane-backends-1.0.22.tar.gz
|
||||||
/sane-backends-1.0.23.tar.gz
|
/sane-backends-1.0.23.tar.gz
|
||||||
|
/sane-backends-1.0.24.tar.gz
|
||||||
|
@ -1,34 +0,0 @@
|
|||||||
From 0643804b4e76c0047df1d61ebee1adfe4696d9d4 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Nils Philippsen <nils@redhat.com>
|
|
||||||
Date: Wed, 3 Nov 2010 17:54:24 +0100
|
|
||||||
Subject: [PATCH] patch: SCX4500W
|
|
||||||
|
|
||||||
Squashed commit of the following:
|
|
||||||
|
|
||||||
commit d3d53225c2a5ee271141bd058e628ffa66d0c065
|
|
||||||
Author: Nils Philippsen <nils@redhat.com>
|
|
||||||
Date: Wed Nov 3 17:53:32 2010 +0100
|
|
||||||
|
|
||||||
add USB id for SCX-4500W
|
|
||||||
---
|
|
||||||
doc/descriptions/xerox_mfp.desc | 4 ++++
|
|
||||||
1 files changed, 4 insertions(+), 0 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/doc/descriptions/xerox_mfp.desc b/doc/descriptions/xerox_mfp.desc
|
|
||||||
index 406510f..6b8aa5f 100644
|
|
||||||
--- a/doc/descriptions/xerox_mfp.desc
|
|
||||||
+++ b/doc/descriptions/xerox_mfp.desc
|
|
||||||
@@ -48,6 +48,10 @@
|
|
||||||
:usbid "0x04e8" "0x3426"
|
|
||||||
:status :good
|
|
||||||
|
|
||||||
+:model "SCX-4500W"
|
|
||||||
+:interface "USB"
|
|
||||||
+:usbid "0x04e8" "0x342b"
|
|
||||||
+
|
|
||||||
:model "CLX-3170fn"
|
|
||||||
:interface "USB"
|
|
||||||
:usbid "0x04e8" "0x342a"
|
|
||||||
--
|
|
||||||
1.7.3.2
|
|
||||||
|
|
@ -1,491 +0,0 @@
|
|||||||
From 9282aef3c04c50d198e54225dc1db26d5cf70d4d Mon Sep 17 00:00:00 2001
|
|
||||||
From: Nils Philippsen <nils@redhat.com>
|
|
||||||
Date: Fri, 1 Feb 2013 16:50:29 +0100
|
|
||||||
Subject: [PATCH] patch: coolscan-multiscan
|
|
||||||
|
|
||||||
Squashed commit of the following:
|
|
||||||
|
|
||||||
commit 8c83fd9274e41cc44e84c62eb4294e07e6651584
|
|
||||||
Author: Nils Philippsen <nils@tiptoe.de>
|
|
||||||
Date: Fri Dec 14 19:00:42 2012 +0100
|
|
||||||
|
|
||||||
coolscan3: average multiple samples
|
|
||||||
|
|
||||||
(ported from coolscan2, commit 4126b6796dfc79152408e387e923a73e96814191)
|
|
||||||
(cherry picked from commit a1273d1c6500ff9c8bf68946dda910da02834b01)
|
|
||||||
|
|
||||||
commit 9856fd6b83eef5d5dde48b8627716bca48dde36f
|
|
||||||
Author: Nils Philippsen <nils@tiptoe.de>
|
|
||||||
Date: Fri Dec 14 18:20:08 2012 +0100
|
|
||||||
|
|
||||||
coolscan3: set multi-sampling on scanner
|
|
||||||
|
|
||||||
(ported from coolscan2, commit 238565790449b5257c34ef4cb69edd789e884b7d)
|
|
||||||
(cherry picked from commit 2bc59796cad213d9a40b2eb0d4ecbf80e4e9b351)
|
|
||||||
|
|
||||||
commit 946511ce3508c96cd749021a249d28b3b79e7daa
|
|
||||||
Author: Nils Philippsen <nils@tiptoe.de>
|
|
||||||
Date: Fri Dec 14 18:12:01 2012 +0100
|
|
||||||
|
|
||||||
coolscan3: only offer samples-per-scan for devices supporting it
|
|
||||||
|
|
||||||
(ported from coolscan2, commit ed9ac6f15df070767f1532b24aad4b5b8e92156f)
|
|
||||||
(cherry picked from commit 6589dbd5c027fb008383ff5d748c1b9ec209d2b1)
|
|
||||||
|
|
||||||
commit a75d020371e81e179b87050ed014fa36bac03d9a
|
|
||||||
Author: Nils Philippsen <nils@tiptoe.de>
|
|
||||||
Date: Fri Dec 14 18:09:28 2012 +0100
|
|
||||||
|
|
||||||
coolscan3: add samples-per-scan option
|
|
||||||
|
|
||||||
(ported from coolscan2, commit 121afa695b94af64821a75adee919637ef5a1b73)
|
|
||||||
(cherry picked from commit 82139b08239f87d329c4f216655926bd7d9d6581)
|
|
||||||
|
|
||||||
commit b9bf83802012646c9d40e1dab9843025fba0cc21
|
|
||||||
Author: Nils Philippsen <nils@tiptoe.de>
|
|
||||||
Date: Sun Apr 1 05:01:09 2012 +0200
|
|
||||||
|
|
||||||
coolscan2: average multiple samples
|
|
||||||
(cherry picked from commit 4126b6796dfc79152408e387e923a73e96814191)
|
|
||||||
|
|
||||||
commit bc12adabf430cae57bf195ef228b64e3d493b265
|
|
||||||
Author: Nils Philippsen <nils@tiptoe.de>
|
|
||||||
Date: Sat Mar 31 20:48:37 2012 +0200
|
|
||||||
|
|
||||||
coolscan2: set multi-sampling on scanner
|
|
||||||
(cherry picked from commit 238565790449b5257c34ef4cb69edd789e884b7d)
|
|
||||||
|
|
||||||
commit 924fd319a339fa48e2efe40ba2b8292336c33e7c
|
|
||||||
Author: Nils Philippsen <nils@tiptoe.de>
|
|
||||||
Date: Sat Mar 31 21:39:01 2012 +0200
|
|
||||||
|
|
||||||
coolscan2: only offer samples-per-scan for devices supporting it
|
|
||||||
(cherry picked from commit ed9ac6f15df070767f1532b24aad4b5b8e92156f)
|
|
||||||
|
|
||||||
commit bdcb3aec8501d25560253a937ef1e5ddc06432cb
|
|
||||||
Author: Nils Philippsen <nils@tiptoe.de>
|
|
||||||
Date: Sat Mar 31 20:48:16 2012 +0200
|
|
||||||
|
|
||||||
coolscan2: add samples-per-scan option
|
|
||||||
(cherry picked from commit 121afa695b94af64821a75adee919637ef5a1b73)
|
|
||||||
---
|
|
||||||
backend/coolscan2.c | 103 +++++++++++++++++++++++++++++++++++++++++++-------
|
|
||||||
backend/coolscan3.c | 106 ++++++++++++++++++++++++++++++++++++++++++++--------
|
|
||||||
2 files changed, 179 insertions(+), 30 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/backend/coolscan2.c b/backend/coolscan2.c
|
|
||||||
index 43d6c55..9f9efde 100644
|
|
||||||
--- a/backend/coolscan2.c
|
|
||||||
+++ b/backend/coolscan2.c
|
|
||||||
@@ -181,6 +181,8 @@ typedef enum
|
|
||||||
|
|
||||||
CS2_OPTION_INFRARED,
|
|
||||||
|
|
||||||
+ CS2_OPTION_SAMPLES_PER_SCAN,
|
|
||||||
+
|
|
||||||
CS2_OPTION_DEPTH,
|
|
||||||
|
|
||||||
CS2_OPTION_EXPOSURE,
|
|
||||||
@@ -249,8 +251,8 @@ typedef struct
|
|
||||||
|
|
||||||
/* settings */
|
|
||||||
SANE_Bool preview, negative, infrared;
|
|
||||||
- int depth, real_depth, bytes_per_pixel, shift_bits, n_colour_in,
|
|
||||||
- n_colour_out;
|
|
||||||
+ int samples_per_scan, depth, real_depth, bytes_per_pixel, shift_bits,
|
|
||||||
+ n_colour_in, n_colour_out;
|
|
||||||
cs2_pixel_t n_lut;
|
|
||||||
cs2_pixel_t *lut_r, *lut_g, *lut_b, *lut_neutral;
|
|
||||||
unsigned long resx, resy, res, res_independent, res_preview;
|
|
||||||
@@ -508,6 +510,29 @@ sane_open (SANE_String_Const name, SANE_Handle * h)
|
|
||||||
o.size = WSIZE;
|
|
||||||
o.cap = SANE_CAP_SOFT_SELECT | SANE_CAP_SOFT_DETECT;
|
|
||||||
break;
|
|
||||||
+ case CS2_OPTION_SAMPLES_PER_SCAN:
|
|
||||||
+ o.name = "samples-per-scan";
|
|
||||||
+ o.title = "Samples per Scan";
|
|
||||||
+ o.desc = "Number of samples per scan";
|
|
||||||
+ o.type = SANE_TYPE_INT;
|
|
||||||
+ o.unit = SANE_UNIT_NONE;
|
|
||||||
+ o.size = WSIZE;
|
|
||||||
+ o.cap = SANE_CAP_SOFT_SELECT | SANE_CAP_SOFT_DETECT;
|
|
||||||
+ if (s->type != CS2_TYPE_LS2000 && s->type != CS2_TYPE_LS4000
|
|
||||||
+ && s->type != CS2_TYPE_LS5000 && s->type != CS2_TYPE_LS8000)
|
|
||||||
+ o.cap |= SANE_CAP_INACTIVE;
|
|
||||||
+ o.constraint_type = SANE_CONSTRAINT_RANGE;
|
|
||||||
+ range = (SANE_Range *) cs2_xmalloc (sizeof (SANE_Range));
|
|
||||||
+ if (! range)
|
|
||||||
+ alloc_failed = 1;
|
|
||||||
+ else
|
|
||||||
+ {
|
|
||||||
+ range->min = 1;
|
|
||||||
+ range->max = 16;
|
|
||||||
+ range->quant = 1;
|
|
||||||
+ o.constraint.range = range;
|
|
||||||
+ }
|
|
||||||
+ break;
|
|
||||||
case CS2_OPTION_DEPTH:
|
|
||||||
o.name = "depth";
|
|
||||||
o.title = "Bit depth per channel";
|
|
||||||
@@ -994,6 +1019,7 @@ sane_open (SANE_String_Const name, SANE_Handle * h)
|
|
||||||
s->negative = SANE_FALSE;
|
|
||||||
s->depth = 8;
|
|
||||||
s->infrared = 0;
|
|
||||||
+ s->samples_per_scan = 1;
|
|
||||||
s->i_frame = 1;
|
|
||||||
s->subframe = 0.;
|
|
||||||
s->res = s->resx = s->resx_max;
|
|
||||||
@@ -1080,6 +1106,9 @@ sane_control_option (SANE_Handle h, SANE_Int n, SANE_Action a, void *v,
|
|
||||||
case CS2_OPTION_INFRARED:
|
|
||||||
*(SANE_Word *) v = s->infrared;
|
|
||||||
break;
|
|
||||||
+ case CS2_OPTION_SAMPLES_PER_SCAN:
|
|
||||||
+ *(SANE_Word *) v = s->samples_per_scan;
|
|
||||||
+ break;
|
|
||||||
case CS2_OPTION_DEPTH:
|
|
||||||
*(SANE_Word *) v = s->depth;
|
|
||||||
break;
|
|
||||||
@@ -1231,6 +1260,9 @@ sane_control_option (SANE_Handle h, SANE_Int n, SANE_Action a, void *v,
|
|
||||||
s->infrared = *(SANE_Word *) v;
|
|
||||||
/* flags |= SANE_INFO_RELOAD_PARAMS; XXXXXXXXXXXXXXXXX */
|
|
||||||
break;
|
|
||||||
+ case CS2_OPTION_SAMPLES_PER_SCAN:
|
|
||||||
+ s->samples_per_scan = *(SANE_Word *) v;
|
|
||||||
+ break;
|
|
||||||
case CS2_OPTION_DEPTH:
|
|
||||||
s->depth = *(SANE_Word *) v;
|
|
||||||
flags |= SANE_INFO_RELOAD_PARAMS;
|
|
||||||
@@ -1462,9 +1494,10 @@ sane_read (SANE_Handle h, SANE_Byte * buf, SANE_Int maxlen, SANE_Int * len)
|
|
||||||
SANE_Status status;
|
|
||||||
ssize_t xfer_len_in, xfer_len_line, xfer_len_out;
|
|
||||||
unsigned long index;
|
|
||||||
- int colour;
|
|
||||||
+ int colour, n_colours, sample_pass;
|
|
||||||
uint8_t *s8 = NULL;
|
|
||||||
uint16_t *s16 = NULL;
|
|
||||||
+ double m_avg_sum;
|
|
||||||
SANE_Byte *line_buf_new;
|
|
||||||
|
|
||||||
DBG (10, "sane_read() called, maxlen = %i.\n", maxlen);
|
|
||||||
@@ -1554,6 +1587,9 @@ sane_read (SANE_Handle h, SANE_Byte * buf, SANE_Int maxlen, SANE_Int * len)
|
|
||||||
s->n_line_buf = xfer_len_line;
|
|
||||||
}
|
|
||||||
|
|
||||||
+ /* adapt for multi-sampling */
|
|
||||||
+ xfer_len_in *= s->samples_per_scan;
|
|
||||||
+
|
|
||||||
cs2_scanner_ready (s, CS2_STATUS_READY);
|
|
||||||
cs2_init_buffer (s);
|
|
||||||
cs2_parse_cmd (s, "28 00 00 00 00 00");
|
|
||||||
@@ -1570,24 +1606,44 @@ sane_read (SANE_Handle h, SANE_Byte * buf, SANE_Int maxlen, SANE_Int * len)
|
|
||||||
return status;
|
|
||||||
}
|
|
||||||
|
|
||||||
+ n_colours = s->n_colour_out +
|
|
||||||
+ (s->infrared_stage == CS2_INFRARED_IN ? 1 : 0);
|
|
||||||
+
|
|
||||||
for (index = 0; index < s->logical_width; index++)
|
|
||||||
- for (colour = 0;
|
|
||||||
- colour < s->n_colour_out + (s->infrared_stage ==
|
|
||||||
- CS2_INFRARED_IN ? 1 : 0); colour++)
|
|
||||||
+ for (colour = 0; colour < n_colours; colour++) {
|
|
||||||
+ m_avg_sum = 0.0;
|
|
||||||
switch (s->bytes_per_pixel)
|
|
||||||
{
|
|
||||||
case 1:
|
|
||||||
+ /* calculate target address */
|
|
||||||
if ((s->infrared_stage == CS2_INFRARED_IN)
|
|
||||||
&& (colour == s->n_colour_out))
|
|
||||||
s8 = (uint8_t *) & (s->infrared_buf[s->infrared_index++]);
|
|
||||||
else
|
|
||||||
s8 =
|
|
||||||
(uint8_t *) & (s->line_buf[s->n_colour_out * index + colour]);
|
|
||||||
- *s8 =
|
|
||||||
- s->recv_buf[colour * s->logical_width +
|
|
||||||
- (colour + 1) * s->odd_padding + index];
|
|
||||||
+
|
|
||||||
+ if (s->samples_per_scan > 1)
|
|
||||||
+ {
|
|
||||||
+ /* calculate average of multi samples */
|
|
||||||
+ for (sample_pass = 0;
|
|
||||||
+ sample_pass < s->samples_per_scan;
|
|
||||||
+ sample_pass++)
|
|
||||||
+ m_avg_sum += (double)
|
|
||||||
+ s->recv_buf[s->logical_width *
|
|
||||||
+ (sample_pass * n_colours + colour) +
|
|
||||||
+ (colour + 1) * s->odd_padding + index];
|
|
||||||
+
|
|
||||||
+ *s8 = (uint8_t) (m_avg_sum / s->samples_per_scan + 0.5);
|
|
||||||
+ }
|
|
||||||
+ else
|
|
||||||
+ /* shortcut for single sample */
|
|
||||||
+ *s8 =
|
|
||||||
+ s->recv_buf[colour * s->logical_width +
|
|
||||||
+ (colour + 1) * s->odd_padding + index];
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
+ /* calculate target address */
|
|
||||||
if ((s->infrared_stage == CS2_INFRARED_IN)
|
|
||||||
&& (colour == s->n_colour_out))
|
|
||||||
s16 =
|
|
||||||
@@ -1597,9 +1653,24 @@ sane_read (SANE_Handle h, SANE_Byte * buf, SANE_Int maxlen, SANE_Int * len)
|
|
||||||
(uint16_t *) & (s->
|
|
||||||
line_buf[2 *
|
|
||||||
(s->n_colour_out * index + colour)]);
|
|
||||||
- *s16 =
|
|
||||||
- s->recv_buf[2 * (colour * s->logical_width + index)] * 256 +
|
|
||||||
- s->recv_buf[2 * (colour * s->logical_width + index) + 1];
|
|
||||||
+
|
|
||||||
+ if (s->samples_per_scan > 1)
|
|
||||||
+ {
|
|
||||||
+ /* calculate average of multi samples */
|
|
||||||
+ for (sample_pass = 0;
|
|
||||||
+ s->samples_per_scan > 1 && sample_pass < s->samples_per_scan;
|
|
||||||
+ sample_pass++)
|
|
||||||
+ m_avg_sum += (double)
|
|
||||||
+ (s->recv_buf[2 * (s->logical_width * (sample_pass * n_colours + colour) + index)] * 256 +
|
|
||||||
+ s->recv_buf[2 * (s->logical_width * (sample_pass * n_colours + colour) + index) + 1]);
|
|
||||||
+
|
|
||||||
+ *s16 = (uint16_t) (m_avg_sum / s->samples_per_scan + 0.5);
|
|
||||||
+ }
|
|
||||||
+ else
|
|
||||||
+ /* shortcut for single sample */
|
|
||||||
+ *s16 =
|
|
||||||
+ s->recv_buf[2 * (colour * s->logical_width + index)] * 256 +
|
|
||||||
+ s->recv_buf[2 * (colour * s->logical_width + index) + 1];
|
|
||||||
*s16 <<= s->shift_bits;
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
@@ -1608,6 +1679,7 @@ sane_read (SANE_Handle h, SANE_Byte * buf, SANE_Int maxlen, SANE_Int * len)
|
|
||||||
return SANE_STATUS_INVAL;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
+ }
|
|
||||||
s->xfer_position += xfer_len_line;
|
|
||||||
|
|
||||||
xfer_len_out = xfer_len_line;
|
|
||||||
@@ -2870,7 +2942,7 @@ cs2_scan (cs2_t * s, cs2_scan_t type)
|
|
||||||
cs2_pack_byte (s, 0x05); /* image composition CCCCCCC */
|
|
||||||
cs2_pack_byte (s, s->real_depth); /* pixel composition */
|
|
||||||
cs2_parse_cmd (s, "00 00 00 00 00 00 00 00 00 00 00 00 00");
|
|
||||||
- cs2_pack_byte (s, 0x00); /* multiread, ordering */
|
|
||||||
+ cs2_pack_byte (s, ((s->samples_per_scan - 1) << 4) + 0x00); /* multiread, ordering */
|
|
||||||
/* No need to use an undocumented bit in LS50 */
|
|
||||||
if ((s->type == CS2_TYPE_LS50) || (s->type == CS2_TYPE_LS5000))
|
|
||||||
cs2_pack_byte (s, 0x00 + (s->negative ? 0 : 1)); /* averaging, pos/neg */
|
|
||||||
@@ -2892,7 +2964,10 @@ cs2_scan (cs2_t * s, cs2_scan_t type)
|
|
||||||
DBG (1, "BUG: cs2_scan(): Unknown scanning type.\n");
|
|
||||||
return SANE_STATUS_INVAL;
|
|
||||||
}
|
|
||||||
- cs2_pack_byte (s, 0x02); /* scanning mode */
|
|
||||||
+ if (s->samples_per_scan == 1)
|
|
||||||
+ cs2_pack_byte (s, 0x02); /* scanning mode single */
|
|
||||||
+ else
|
|
||||||
+ cs2_pack_byte (s, 0x10); /* scanning mode multi */
|
|
||||||
cs2_pack_byte (s, 0x02); /* colour interleaving */
|
|
||||||
cs2_pack_byte (s, 0xff); /* (ae) */
|
|
||||||
if (i_colour == 3) /* infrared */
|
|
||||||
diff --git a/backend/coolscan3.c b/backend/coolscan3.c
|
|
||||||
index eca357c..a1d6fe6 100644
|
|
||||||
--- a/backend/coolscan3.c
|
|
||||||
+++ b/backend/coolscan3.c
|
|
||||||
@@ -115,6 +115,8 @@ typedef enum
|
|
||||||
|
|
||||||
CS3_OPTION_INFRARED,
|
|
||||||
|
|
||||||
+ CS3_OPTION_SAMPLES_PER_SCAN,
|
|
||||||
+
|
|
||||||
CS3_OPTION_DEPTH,
|
|
||||||
|
|
||||||
CS3_OPTION_EXPOSURE,
|
|
||||||
@@ -212,7 +214,8 @@ typedef struct
|
|
||||||
|
|
||||||
/* settings */
|
|
||||||
SANE_Bool preview, negative, infrared, autoload, autofocus, ae, aewb;
|
|
||||||
- int depth, real_depth, bytes_per_pixel, shift_bits, n_colors;
|
|
||||||
+ int samples_per_scan, depth, real_depth, bytes_per_pixel, shift_bits,
|
|
||||||
+ n_colors;
|
|
||||||
cs3_pixel_t n_lut;
|
|
||||||
cs3_pixel_t *lut_r, *lut_g, *lut_b, *lut_neutral;
|
|
||||||
unsigned long resx, resy, res, res_independent, res_preview;
|
|
||||||
@@ -463,6 +466,30 @@ sane_open(SANE_String_Const name, SANE_Handle * h)
|
|
||||||
#endif
|
|
||||||
break;
|
|
||||||
|
|
||||||
+ case CS3_OPTION_SAMPLES_PER_SCAN:
|
|
||||||
+ o.name = "samples-per-scan";
|
|
||||||
+ o.title = "Samples per Scan";
|
|
||||||
+ o.desc = "Number of samples per scan";
|
|
||||||
+ o.type = SANE_TYPE_INT;
|
|
||||||
+ o.unit = SANE_UNIT_NONE;
|
|
||||||
+ o.size = WSIZE;
|
|
||||||
+ o.cap = SANE_CAP_SOFT_SELECT | SANE_CAP_SOFT_DETECT;
|
|
||||||
+ if (s->type != CS3_TYPE_LS2000 && s->type != CS3_TYPE_LS4000
|
|
||||||
+ && s->type != CS3_TYPE_LS5000 && s->type != CS3_TYPE_LS8000)
|
|
||||||
+ o.cap |= SANE_CAP_INACTIVE;
|
|
||||||
+ o.constraint_type = SANE_CONSTRAINT_RANGE;
|
|
||||||
+ range = (SANE_Range *) cs3_xmalloc (sizeof (SANE_Range));
|
|
||||||
+ if (! range)
|
|
||||||
+ alloc_failed = 1;
|
|
||||||
+ else
|
|
||||||
+ {
|
|
||||||
+ range->min = 1;
|
|
||||||
+ range->max = 16;
|
|
||||||
+ range->quant = 1;
|
|
||||||
+ o.constraint.range = range;
|
|
||||||
+ }
|
|
||||||
+ break;
|
|
||||||
+
|
|
||||||
case CS3_OPTION_DEPTH:
|
|
||||||
o.name = "depth";
|
|
||||||
o.title = "Bit depth per channel";
|
|
||||||
@@ -983,6 +1010,7 @@ sane_open(SANE_String_Const name, SANE_Handle * h)
|
|
||||||
s->infrared = SANE_FALSE;
|
|
||||||
s->ae = SANE_FALSE;
|
|
||||||
s->aewb = SANE_FALSE;
|
|
||||||
+ s->samples_per_scan = 1;
|
|
||||||
s->depth = 8;
|
|
||||||
s->i_frame = 1;
|
|
||||||
s->frame_count = 1;
|
|
||||||
@@ -1064,6 +1092,9 @@ sane_control_option(SANE_Handle h, SANE_Int n, SANE_Action a, void *v,
|
|
||||||
case CS3_OPTION_INFRARED:
|
|
||||||
*(SANE_Word *) v = s->infrared;
|
|
||||||
break;
|
|
||||||
+ case CS3_OPTION_SAMPLES_PER_SCAN:
|
|
||||||
+ *(SANE_Word *) v = s->samples_per_scan;
|
|
||||||
+ break;
|
|
||||||
case CS3_OPTION_DEPTH:
|
|
||||||
*(SANE_Word *) v = s->depth;
|
|
||||||
break;
|
|
||||||
@@ -1222,6 +1253,9 @@ sane_control_option(SANE_Handle h, SANE_Int n, SANE_Action a, void *v,
|
|
||||||
s->infrared = *(SANE_Word *) v;
|
|
||||||
/* flags |= SANE_INFO_RELOAD_PARAMS; XXX */
|
|
||||||
break;
|
|
||||||
+ case CS3_OPTION_SAMPLES_PER_SCAN:
|
|
||||||
+ s->samples_per_scan = *(SANE_Word *) v;
|
|
||||||
+ break;
|
|
||||||
case CS3_OPTION_DEPTH:
|
|
||||||
if (*(SANE_Word *) v > s->maxbits)
|
|
||||||
return SANE_STATUS_INVAL;
|
|
||||||
@@ -1487,9 +1521,10 @@ sane_read(SANE_Handle h, SANE_Byte * buf, SANE_Int maxlen, SANE_Int * len)
|
|
||||||
SANE_Status status;
|
|
||||||
ssize_t xfer_len_in, xfer_len_line, xfer_len_out;
|
|
||||||
unsigned long index;
|
|
||||||
- int color;
|
|
||||||
+ int color, sample_pass;
|
|
||||||
uint8_t *s8 = NULL;
|
|
||||||
uint16_t *s16 = NULL;
|
|
||||||
+ double m_avg_sum;
|
|
||||||
SANE_Byte *line_buf_new;
|
|
||||||
|
|
||||||
DBG(32, "%s, maxlen = %i.\n", __func__, maxlen);
|
|
||||||
@@ -1567,6 +1602,9 @@ sane_read(SANE_Handle h, SANE_Byte * buf, SANE_Int maxlen, SANE_Int * len)
|
|
||||||
s->n_line_buf = xfer_len_line;
|
|
||||||
}
|
|
||||||
|
|
||||||
+ /* adapt for multi-sampling */
|
|
||||||
+ xfer_len_in *= s->samples_per_scan;
|
|
||||||
+
|
|
||||||
cs3_scanner_ready(s, CS3_STATUS_READY);
|
|
||||||
cs3_init_buffer(s);
|
|
||||||
cs3_parse_cmd(s, "28 00 00 00 00 00");
|
|
||||||
@@ -1584,30 +1622,63 @@ sane_read(SANE_Handle h, SANE_Byte * buf, SANE_Int maxlen, SANE_Int * len)
|
|
||||||
|
|
||||||
for (index = 0; index < s->logical_width; index++) {
|
|
||||||
for (color = 0; color < s->n_colors; color++) {
|
|
||||||
-
|
|
||||||
int where = s->bytes_per_pixel
|
|
||||||
* (s->n_colors * index + color);
|
|
||||||
|
|
||||||
+ m_avg_sum = 0.0;
|
|
||||||
+
|
|
||||||
switch (s->bytes_per_pixel) {
|
|
||||||
case 1:
|
|
||||||
{
|
|
||||||
- int p8 = color * s->logical_width
|
|
||||||
- + (color + 1) * s->odd_padding
|
|
||||||
- + index;
|
|
||||||
-
|
|
||||||
+ /* target address */
|
|
||||||
s8 = (uint8_t *) & (s->line_buf[where]);
|
|
||||||
- *s8 = s->recv_buf[p8];
|
|
||||||
+
|
|
||||||
+ if (s->samples_per_scan > 1) {
|
|
||||||
+ /* calculate average of multi samples */
|
|
||||||
+ for (sample_pass = 0;
|
|
||||||
+ sample_pass < s->samples_per_scan;
|
|
||||||
+ sample_pass++) {
|
|
||||||
+ /* source index */
|
|
||||||
+ int p8 = (sample_pass * s->n_colors + color)
|
|
||||||
+ * s->logical_width
|
|
||||||
+ + (color + 1) * s->odd_padding
|
|
||||||
+ + index;
|
|
||||||
+ m_avg_sum += (double) s->recv_buf[p8];
|
|
||||||
+ }
|
|
||||||
+ *s8 = (uint8_t) (m_avg_sum / s->samples_per_scan + 0.5);
|
|
||||||
+ } else {
|
|
||||||
+ /* shortcut for single sample */
|
|
||||||
+ int p8 = s->logical_width * color
|
|
||||||
+ + (color + 1) * s->odd_padding
|
|
||||||
+ + index;
|
|
||||||
+ *s8 = s->recv_buf[p8];
|
|
||||||
+ }
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
{
|
|
||||||
- int p16 =
|
|
||||||
- 2 * (color * s->logical_width +
|
|
||||||
- index);
|
|
||||||
-
|
|
||||||
+ /* target address */
|
|
||||||
s16 = (uint16_t *) & (s->line_buf[where]);
|
|
||||||
- *s16 = (s->recv_buf[p16] << 8)
|
|
||||||
- + s->recv_buf[p16 + 1];
|
|
||||||
+
|
|
||||||
+ if (s->samples_per_scan > 1) {
|
|
||||||
+ /* calculate average of multi samples */
|
|
||||||
+ for (sample_pass = 0;
|
|
||||||
+ sample_pass < s->samples_per_scan;
|
|
||||||
+ sample_pass++) {
|
|
||||||
+ /* source index */
|
|
||||||
+ int p16 = 2 * ((sample_pass * s->n_colors + color)
|
|
||||||
+ * s->logical_width + index);
|
|
||||||
+ m_avg_sum += (double) ((s->recv_buf[p16] << 8)
|
|
||||||
+ + s->recv_buf[p16 + 1]);
|
|
||||||
+ }
|
|
||||||
+ *s16 = (uint16_t) (m_avg_sum / s->samples_per_scan + 0.5);
|
|
||||||
+ } else {
|
|
||||||
+ /* shortcut for single sample */
|
|
||||||
+ int p16 = 2 * (color * s->logical_width + index);
|
|
||||||
+
|
|
||||||
+ *s16 = (s->recv_buf[p16] << 8)
|
|
||||||
+ + s->recv_buf[p16 + 1];
|
|
||||||
+ }
|
|
||||||
|
|
||||||
*s16 <<= s->shift_bits;
|
|
||||||
}
|
|
||||||
@@ -2955,7 +3026,7 @@ cs3_set_window(cs3_t * s, cs3_scan_t type)
|
|
||||||
cs3_pack_byte(s, 0x05); /* image composition CCCCCCC */
|
|
||||||
cs3_pack_byte(s, s->real_depth); /* pixel composition */
|
|
||||||
cs3_parse_cmd(s, "00 00 00 00 00 00 00 00 00 00 00 00 00");
|
|
||||||
- cs3_pack_byte(s, 0x00); /* multiread, ordering */
|
|
||||||
+ cs3_pack_byte(s, ((s->samples_per_scan - 1) << 4) | 0x00); /* multiread, ordering */
|
|
||||||
|
|
||||||
cs3_pack_byte(s, 0x80 | (s->negative ? 0 : 1)); /* averaging, pos/neg */
|
|
||||||
|
|
||||||
@@ -2973,7 +3044,10 @@ cs3_set_window(cs3_t * s, cs3_scan_t type)
|
|
||||||
DBG(1, "BUG: cs3_scan(): Unknown scanning type.\n");
|
|
||||||
return SANE_STATUS_INVAL;
|
|
||||||
}
|
|
||||||
- cs3_pack_byte(s, 0x02); /* scanning mode */
|
|
||||||
+ if (s->samples_per_scan == 1)
|
|
||||||
+ cs3_pack_byte(s, 0x02); /* scanning mode single */
|
|
||||||
+ else
|
|
||||||
+ cs3_pack_byte(s, 0x10); /* scanning mode multi */
|
|
||||||
cs3_pack_byte(s, 0x02); /* color interleaving */
|
|
||||||
cs3_pack_byte(s, 0xff); /* (ae) */
|
|
||||||
if (color == 3) /* infrared */
|
|
||||||
--
|
|
||||||
1.8.1
|
|
||||||
|
|
@ -1,116 +0,0 @@
|
|||||||
From 60380826afe0f04bd56e88842b90916e6d030714 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Nils Philippsen <nils@redhat.com>
|
|
||||||
Date: Fri, 12 Jul 2013 11:47:56 +0200
|
|
||||||
Subject: [PATCH] patch: genesys-gl646
|
|
||||||
MIME-Version: 1.0
|
|
||||||
Content-Type: text/plain; charset=UTF-8
|
|
||||||
Content-Transfer-Encoding: 8bit
|
|
||||||
|
|
||||||
Squashed commit of the following:
|
|
||||||
|
|
||||||
commit 7efcf373058f6031643db3db289014faee6acc35
|
|
||||||
Author: Stéphane Voltz <stef.dev@free.fr>
|
|
||||||
Date: Mon Jun 3 06:33:08 2013 +0200
|
|
||||||
|
|
||||||
bug 314293 fix
|
|
||||||
|
|
||||||
- don't use non-existent end of records
|
|
||||||
|
|
||||||
(cherry picked from commit 9a8b640d8da2190ff1695169bfa45ce633b5e8c2)
|
|
||||||
|
|
||||||
Conflicts:
|
|
||||||
ChangeLog
|
|
||||||
|
|
||||||
commit 4762f1cd02f7c43748af2b069186d467b6a8f1e2
|
|
||||||
Author: Stéphane Voltz <stef.dev@free.fr>
|
|
||||||
Date: Mon May 27 10:41:32 2013 +0200
|
|
||||||
|
|
||||||
fix bug #314261
|
|
||||||
|
|
||||||
(cherry picked from commit 40b5d75aa3e1cc033d9a489d64ff6c7b05c388cf)
|
|
||||||
|
|
||||||
Conflicts:
|
|
||||||
ChangeLog
|
|
||||||
---
|
|
||||||
backend/genesys_gl646.c | 16 ++++++++--------
|
|
||||||
1 file changed, 8 insertions(+), 8 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/backend/genesys_gl646.c b/backend/genesys_gl646.c
|
|
||||||
index a97f887..7d3ef3c 100644
|
|
||||||
--- a/backend/genesys_gl646.c
|
|
||||||
+++ b/backend/genesys_gl646.c
|
|
||||||
@@ -551,7 +551,7 @@ get_lowest_resolution (int sensor, SANE_Bool color)
|
|
||||||
i = 0;
|
|
||||||
dpi = 9600;
|
|
||||||
nb = sizeof (sensor_master) / sizeof (Sensor_Master);
|
|
||||||
- while (sensor_master[i].sensor != -1 && i < nb)
|
|
||||||
+ while (i < nb)
|
|
||||||
{
|
|
||||||
/* computes distance and keep mode if it is closer than previous */
|
|
||||||
if (sensor == sensor_master[i].sensor
|
|
||||||
@@ -585,7 +585,7 @@ get_closest_resolution (int sensor, int required, SANE_Bool color)
|
|
||||||
dpi = 0;
|
|
||||||
dist = 9600;
|
|
||||||
nb = sizeof (sensor_master) / sizeof (Sensor_Master);
|
|
||||||
- while (sensor_master[i].sensor != -1 && i < nb)
|
|
||||||
+ while (i < nb)
|
|
||||||
{
|
|
||||||
/* exit on perfect match */
|
|
||||||
if (sensor == sensor_master[i].sensor
|
|
||||||
@@ -628,7 +628,7 @@ is_half_ccd (int sensor, int required, SANE_Bool color)
|
|
||||||
|
|
||||||
i = 0;
|
|
||||||
nb = sizeof (sensor_master) / sizeof (Sensor_Master);
|
|
||||||
- while (sensor_master[i].sensor != -1 && i < nb)
|
|
||||||
+ while (i < nb)
|
|
||||||
{
|
|
||||||
/* exit on perfect match */
|
|
||||||
if (sensor == sensor_master[i].sensor
|
|
||||||
@@ -659,7 +659,7 @@ get_cksel (int sensor, int required, SANE_Bool color)
|
|
||||||
|
|
||||||
i = 0;
|
|
||||||
nb = sizeof (sensor_master) / sizeof (Sensor_Master);
|
|
||||||
- while (sensor_master[i].sensor != -1 && i < nb)
|
|
||||||
+ while (i < nb)
|
|
||||||
{
|
|
||||||
/* exit on perfect match */
|
|
||||||
if (sensor == sensor_master[i].sensor
|
|
||||||
@@ -745,7 +745,7 @@ gl646_setup_registers (Genesys_Device * dev,
|
|
||||||
* sensor mode setting */
|
|
||||||
i = 0;
|
|
||||||
nb = sizeof (sensor_master) / sizeof (Sensor_Master);
|
|
||||||
- while (sensor_master[i].sensor != -1 && i < nb)
|
|
||||||
+ while (i < nb)
|
|
||||||
{
|
|
||||||
if (dev->model->ccd_type == sensor_master[i].sensor
|
|
||||||
&& sensor_master[i].dpi == xresolution
|
|
||||||
@@ -767,7 +767,7 @@ gl646_setup_registers (Genesys_Device * dev,
|
|
||||||
* motor mode setting */
|
|
||||||
i = 0;
|
|
||||||
nb = sizeof (motor_master) / sizeof (Motor_Master);
|
|
||||||
- while (motor_master[i].motor != -1 && i < nb)
|
|
||||||
+ while (i < nb)
|
|
||||||
{
|
|
||||||
if (dev->model->motor_type == motor_master[i].motor
|
|
||||||
&& motor_master[i].dpi == resolution
|
|
||||||
@@ -788,7 +788,7 @@ gl646_setup_registers (Genesys_Device * dev,
|
|
||||||
/* now we can search for the specific sensor settings */
|
|
||||||
i = 0;
|
|
||||||
nb = sizeof (sensor_settings) / sizeof (Sensor_Settings);
|
|
||||||
- while (sensor_settings[i].sensor != -1 && i < nb)
|
|
||||||
+ while (i < nb)
|
|
||||||
{
|
|
||||||
if (sensor->sensor == sensor_settings[i].sensor
|
|
||||||
&& sensor->cksel == sensor_settings[i].cksel)
|
|
||||||
@@ -5082,7 +5082,7 @@ simple_scan (Genesys_Device * dev, Genesys_Settings settings, SANE_Bool move,
|
|
||||||
DBG (DBG_error,
|
|
||||||
"simple_scan: failed to bulk write registers: %s\n",
|
|
||||||
sane_strstatus (status));
|
|
||||||
- free (data);
|
|
||||||
+ free (*data);
|
|
||||||
return status;
|
|
||||||
}
|
|
||||||
|
|
||||||
--
|
|
||||||
1.8.3.1
|
|
||||||
|
|
@ -1,68 +0,0 @@
|
|||||||
From a1b77e545c9f5a12d4aba53efe9dfdf36b362083 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Nils Philippsen <nils@redhat.com>
|
|
||||||
Date: Mon, 8 Jul 2013 15:36:13 +0200
|
|
||||||
Subject: [PATCH] patch: saned-help
|
|
||||||
|
|
||||||
Squashed commit of the following:
|
|
||||||
|
|
||||||
commit 06a8563916e974210aea9f1d356b142ef3c64bf9
|
|
||||||
Author: Nils Philippsen <nils@redhat.com>
|
|
||||||
Date: Mon Jul 8 15:09:51 2013 +0200
|
|
||||||
|
|
||||||
Add short help message to saned
|
|
||||||
|
|
||||||
(cherry picked from commit fab378a6817c5df72b3991d160d48a23f24a1111)
|
|
||||||
|
|
||||||
Conflicts:
|
|
||||||
doc/saned.man
|
|
||||||
---
|
|
||||||
doc/saned.man | 5 +++++
|
|
||||||
frontend/saned.c | 9 +++++++++
|
|
||||||
2 files changed, 14 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/doc/saned.man b/doc/saned.man
|
|
||||||
index ad4f535..4f79510 100644
|
|
||||||
--- a/doc/saned.man
|
|
||||||
+++ b/doc/saned.man
|
|
||||||
@@ -10,6 +10,7 @@ saned \- SANE network daemon
|
|
||||||
.I [ n ]
|
|
||||||
.B | \-s
|
|
||||||
.I [ n ]
|
|
||||||
+.B | \-h
|
|
||||||
.B ]
|
|
||||||
.SH DESCRIPTION
|
|
||||||
.B saned
|
|
||||||
@@ -61,6 +62,10 @@ requests using syslog.
|
|
||||||
If
|
|
||||||
.B saned
|
|
||||||
is run from inetd or xinetd, no option can be given.
|
|
||||||
+.PP
|
|
||||||
+The
|
|
||||||
+.B \-h
|
|
||||||
+flag displays a short help message.
|
|
||||||
.SH CONFIGURATION
|
|
||||||
First and foremost:
|
|
||||||
.B saned
|
|
||||||
diff --git a/frontend/saned.c b/frontend/saned.c
|
|
||||||
index 252b51e..f9787a0 100644
|
|
||||||
--- a/frontend/saned.c
|
|
||||||
+++ b/frontend/saned.c
|
|
||||||
@@ -3254,6 +3254,15 @@ main (int argc, char *argv[])
|
|
||||||
}
|
|
||||||
else if (strncmp (argv[1], "-s", 2) == 0)
|
|
||||||
run_mode = SANED_RUN_DEBUG;
|
|
||||||
+ else
|
|
||||||
+ {
|
|
||||||
+ printf ("Usage: saned [ -a [ username ] | -d [ n ] | -s [ n ] ] | -h\n");
|
|
||||||
+ if ((strncmp (argv[1], "-h", 2) == 0) ||
|
|
||||||
+ (strncmp (argv[1], "--help", 6) == 0))
|
|
||||||
+ exit (EXIT_SUCCESS);
|
|
||||||
+ else
|
|
||||||
+ exit (EXIT_FAILURE);
|
|
||||||
+ }
|
|
||||||
}
|
|
||||||
|
|
||||||
if (run_mode == SANED_RUN_DEBUG)
|
|
||||||
--
|
|
||||||
1.8.3.1
|
|
||||||
|
|
@ -1,34 +0,0 @@
|
|||||||
From bf4f0506c4cc74865939299a2c923bab61a203c3 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Nils Philippsen <nils@redhat.com>
|
|
||||||
Date: Mon, 8 Jul 2013 15:35:03 +0200
|
|
||||||
Subject: [PATCH] patch: scanimage-man
|
|
||||||
|
|
||||||
Squashed commit of the following:
|
|
||||||
|
|
||||||
commit 3ad5fe77d5643b055448556b353fc7311b88669e
|
|
||||||
Author: Nils Philippsen <nils@redhat.com>
|
|
||||||
Date: Mon Jul 8 14:21:52 2013 +0200
|
|
||||||
|
|
||||||
mention missing "-b" short option for "--batch"
|
|
||||||
|
|
||||||
(cherry picked from commit 4fc171100db7c8258448cf9aaa11b6308e233b58)
|
|
||||||
---
|
|
||||||
doc/scanimage.man | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/doc/scanimage.man b/doc/scanimage.man
|
|
||||||
index 0012f6e..79a1251 100644
|
|
||||||
--- a/doc/scanimage.man
|
|
||||||
+++ b/doc/scanimage.man
|
|
||||||
@@ -13,7 +13,7 @@ scanimage \- scan an image
|
|
||||||
.RB [ \-L | \-\-list\-devices ]
|
|
||||||
.RB [ \-f | \-\-formatted\-device\-list
|
|
||||||
.IR format ]
|
|
||||||
-.RB [ \-\-batch
|
|
||||||
+.RB [ \-b | \-\-batch
|
|
||||||
.RI [= format ]]
|
|
||||||
.RB [ \-\-batch\-start
|
|
||||||
.IR start ]
|
|
||||||
--
|
|
||||||
1.8.3.1
|
|
||||||
|
|
@ -1,38 +0,0 @@
|
|||||||
From b7ee97acddee63c5991d901b0c9ea506fb33f611 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Nils Philippsen <nils@redhat.com>
|
|
||||||
Date: Fri, 1 Feb 2013 16:47:30 +0100
|
|
||||||
Subject: [PATCH] patch: umax-init-error
|
|
||||||
|
|
||||||
Squashed commit of the following:
|
|
||||||
|
|
||||||
commit 13fb7a94adfa786b81a11755f22e8ab647cfac69
|
|
||||||
Author: Nils Philippsen <nils@redhat.com>
|
|
||||||
Date: Wed Jan 16 11:57:37 2013 +0100
|
|
||||||
|
|
||||||
umax: initialize reader_pid early in sane_start()
|
|
||||||
|
|
||||||
This avoids that subsequent errors followed by do_cancel() attempt to
|
|
||||||
phtread_cancel() an invalid thread (which may cause a crash).
|
|
||||||
(cherry picked from commit defdc1ab5c365735ac85e347d463a01cf96fc72d)
|
|
||||||
---
|
|
||||||
backend/umax.c | 4 ++++
|
|
||||||
1 file changed, 4 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/backend/umax.c b/backend/umax.c
|
|
||||||
index a9d1723..b2ceb00 100644
|
|
||||||
--- a/backend/umax.c
|
|
||||||
+++ b/backend/umax.c
|
|
||||||
@@ -7285,6 +7285,10 @@ SANE_Status sane_start(SANE_Handle handle)
|
|
||||||
|
|
||||||
DBG(DBG_sane_init,"sane_start\n");
|
|
||||||
|
|
||||||
+ /* Initialize reader_pid to invalid so a subsequent error and following call
|
|
||||||
+ * to do_cancel() won't trip over it. */
|
|
||||||
+ scanner->reader_pid = -1;
|
|
||||||
+
|
|
||||||
mode = scanner->val[OPT_MODE].s;
|
|
||||||
|
|
||||||
if (scanner->device->sfd == -1) /* first call, don`t run this routine again on multi frame or multi image scan */
|
|
||||||
--
|
|
||||||
1.8.1
|
|
||||||
|
|
@ -1,30 +1,30 @@
|
|||||||
From c7f5126447ed5335a54d9333ac37f35c2189fbf4 Mon Sep 17 00:00:00 2001
|
From f757d61aff2aa7a331f406c59c0a31f2d5e25553 Mon Sep 17 00:00:00 2001
|
||||||
From: Nils Philippsen <nils@redhat.com>
|
From: Nils Philippsen <nils@redhat.com>
|
||||||
Date: Mon, 10 Sep 2012 12:25:33 +0200
|
Date: Tue, 8 Oct 2013 16:29:13 +0200
|
||||||
Subject: [PATCH] patch: udev
|
Subject: [PATCH] patch: udev
|
||||||
|
|
||||||
Squashed commit of the following:
|
Squashed commit of the following:
|
||||||
|
|
||||||
commit 3d19b3eaf91fa8c3c2a78956f570d3e0f4c3f342
|
commit fb6d1f4c0d17f1df33429bf03a64cd4fbb819ea5
|
||||||
Author: Nils Philippsen <nils@redhat.com>
|
Author: Nils Philippsen <nils@redhat.com>
|
||||||
Date: Mon Sep 10 12:25:16 2012 +0200
|
Date: Tue Oct 8 16:24:49 2013 +0200
|
||||||
|
|
||||||
adapt generated udev rules for Fedora
|
adapt generated udev rules for Fedora
|
||||||
|
|
||||||
commit 7017c3ad1dadc27edd2c47ceec04f8648c839d53
|
commit 8bffaccc1eeb19ecbaddb4ac9da73954af4c5d4f
|
||||||
Author: Nils Philippsen <nils@redhat.com>
|
Author: Nils Philippsen <nils@redhat.com>
|
||||||
Date: Mon Sep 10 12:20:43 2012 +0200
|
Date: Mon Sep 10 12:20:43 2012 +0200
|
||||||
|
|
||||||
use group and mode macros consistently
|
use group and mode macros consistently
|
||||||
---
|
---
|
||||||
tools/sane-desc.c | 13 ++++++-------
|
tools/sane-desc.c | 14 +++++++-------
|
||||||
1 file changed, 6 insertions(+), 7 deletions(-)
|
1 file changed, 7 insertions(+), 7 deletions(-)
|
||||||
|
|
||||||
diff --git a/tools/sane-desc.c b/tools/sane-desc.c
|
diff --git a/tools/sane-desc.c b/tools/sane-desc.c
|
||||||
index 7bbd012..5c5bbe9 100644
|
index 3cc4407..df6d348 100644
|
||||||
--- a/tools/sane-desc.c
|
--- a/tools/sane-desc.c
|
||||||
+++ b/tools/sane-desc.c
|
+++ b/tools/sane-desc.c
|
||||||
@@ -56,9 +56,9 @@
|
@@ -57,9 +57,9 @@
|
||||||
#define COLOR_NEW "\"#F00000\""
|
#define COLOR_NEW "\"#F00000\""
|
||||||
#define COLOR_UNKNOWN "\"#000000\""
|
#define COLOR_UNKNOWN "\"#000000\""
|
||||||
|
|
||||||
@ -36,7 +36,7 @@ index 7bbd012..5c5bbe9 100644
|
|||||||
|
|
||||||
#ifndef PATH_MAX
|
#ifndef PATH_MAX
|
||||||
# define PATH_MAX 1024
|
# define PATH_MAX 1024
|
||||||
@@ -3543,7 +3543,8 @@ print_udev (void)
|
@@ -3564,7 +3564,8 @@ print_udev (void)
|
||||||
}
|
}
|
||||||
|
|
||||||
printf("\n# The following rule will disable USB autosuspend for the device\n");
|
printf("\n# The following rule will disable USB autosuspend for the device\n");
|
||||||
@ -46,7 +46,7 @@ index 7bbd012..5c5bbe9 100644
|
|||||||
|
|
||||||
printf ("\nLABEL=\"libsane_usb_rules_end\"\n\n");
|
printf ("\nLABEL=\"libsane_usb_rules_end\"\n\n");
|
||||||
|
|
||||||
@@ -3619,10 +3620,8 @@ print_udev (void)
|
@@ -3640,10 +3641,8 @@ print_udev (void)
|
||||||
}
|
}
|
||||||
printf ("LABEL=\"libsane_scsi_rules_end\"\n");
|
printf ("LABEL=\"libsane_scsi_rules_end\"\n");
|
||||||
|
|
||||||
@ -59,6 +59,14 @@ index 7bbd012..5c5bbe9 100644
|
|||||||
|
|
||||||
printf ("\nLABEL=\"libsane_rules_end\"\n");
|
printf ("\nLABEL=\"libsane_rules_end\"\n");
|
||||||
}
|
}
|
||||||
--
|
@@ -3694,6 +3693,7 @@ print_udevhwdb (void)
|
||||||
1.7.11.4
|
|
||||||
|
printf("# The following rule will disable USB autosuspend for the device\n");
|
||||||
|
printf("ENV{DEVTYPE}==\"usb_device\", ENV{libsane_matched}==\"yes\", TEST==\"power/control\", ATTR{power/control}=\"on\"\n\n");
|
||||||
|
+ printf("ENV{DEVTYPE}==\"usb_device\", ENV{libsane_matched}==\"yes\", TEST!=\"power/control\", TEST==\"power/level\", ATTR{power/level}=\"on\"\n");
|
||||||
|
|
||||||
|
printf ("SUBSYSTEMS!=\"scsi\", GOTO=\"libsane_rules_end\"\n");
|
||||||
|
printf ("KERNEL!=\"sg[0-9]*\", GOTO=\"libsane_rules_end\"\n\n");
|
||||||
|
--
|
||||||
|
1.8.3.1
|
||||||
|
|
@ -34,42 +34,26 @@
|
|||||||
|
|
||||||
Summary: Scanner access software
|
Summary: Scanner access software
|
||||||
Name: sane-backends
|
Name: sane-backends
|
||||||
Version: 1.0.23
|
Version: 1.0.24
|
||||||
Release: 18%{?dist}
|
Release: 1%{?dist}
|
||||||
# lib/ is LGPLv2+, backends are GPLv2+ with exceptions
|
# lib/ is LGPLv2+, backends are GPLv2+ with exceptions
|
||||||
# Tools are GPLv2+, docs are public domain
|
# Tools are GPLv2+, docs are public domain
|
||||||
# see LICENSE for details
|
# see LICENSE for details
|
||||||
License: GPLv2+ and GPLv2+ with exceptions and Public Domain
|
License: GPLv2+ and GPLv2+ with exceptions and Public Domain
|
||||||
Group: System Environment/Libraries
|
Group: System Environment/Libraries
|
||||||
Source0: ftp://ftp.sane-project.org/pub/sane/%{name}-%{version}/%{name}-%{version}.tar.gz
|
# Alioth Download URLs are amazing.
|
||||||
|
Source0: https://alioth.debian.org/frs/download.php/latestfile/176/sane-backends-%{version}.tar.gz
|
||||||
Source1: sane.png
|
Source1: sane.png
|
||||||
|
|
||||||
# Fedora-specific, not generally applicable:
|
# Fedora-specific, not generally applicable:
|
||||||
Patch0: sane-backends-1.0.23-udev.patch
|
Patch0: sane-backends-1.0.24-udev.patch
|
||||||
# Upstreamed at: https://alioth.debian.org/tracker/index.php?func=detail&aid=313040
|
# Upstream commit b491261f0c0f6df47d1e4859cde88448f98718dd
|
||||||
Patch1: sane-backends-1.0.21-epson-expression800.patch
|
Patch1: sane-backends-1.0.21-epson-expression800.patch
|
||||||
# Upstreamed at: https://alioth.debian.org/tracker/index.php?func=detail&aid=313043
|
|
||||||
Patch2: sane-backends-1.0.21-SCX4500W.patch
|
|
||||||
# Fedora-specific (for now): don't use the same SONAME for backend libs and
|
# Fedora-specific (for now): don't use the same SONAME for backend libs and
|
||||||
# main lib
|
# main lib
|
||||||
Patch3: sane-backends-1.0.23-soname.patch
|
Patch2: sane-backends-1.0.23-soname.patch
|
||||||
# Fedora-specific (for now): make installed sane-config multi-lib aware again
|
# Fedora-specific (for now): make installed sane-config multi-lib aware again
|
||||||
Patch4: sane-backends-1.0.23-sane-config-multilib.patch
|
Patch3: sane-backends-1.0.23-sane-config-multilib.patch
|
||||||
# Submitted upstream: don't barf on umax init errors
|
|
||||||
Patch5: sane-backends-1.0.23-umax-init-error.patch
|
|
||||||
# Submitted upstream: coolscan2/3: support multi-scan option of some devices
|
|
||||||
Patch6: sane-backends-1.0.23-coolscan-multiscan.patch
|
|
||||||
# Describe missing flag "-b" in scanimage man page.
|
|
||||||
# Upstream commit: 4fc171100db7c8258448cf9aaa11b6308e233b58
|
|
||||||
Patch7: sane-backends-1.0.23-scanimage-man.patch
|
|
||||||
# Add short help message to saned.
|
|
||||||
# Upstream commit: fab378a6817c5df72b3991d160d48a23f24a1111
|
|
||||||
Patch8: sane-backends-1.0.23-saned-help.patch
|
|
||||||
# Fix crash in genesys (gl646) backend (#983694)
|
|
||||||
# Upstream commits:
|
|
||||||
# 9a8b640d8da2190ff1695169bfa45ce633b5e8c2
|
|
||||||
# 40b5d75aa3e1cc033d9a489d64ff6c7b05c388cf
|
|
||||||
Patch9: sane-backends-1.0.23-genesys-gl646.patch
|
|
||||||
|
|
||||||
URL: http://www.sane-project.org
|
URL: http://www.sane-project.org
|
||||||
|
|
||||||
@ -185,14 +169,8 @@ This package contains backend drivers to access digital cameras through SANE.
|
|||||||
|
|
||||||
%patch0 -p1 -b .udev
|
%patch0 -p1 -b .udev
|
||||||
%patch1 -p1 -b .epson-expression800
|
%patch1 -p1 -b .epson-expression800
|
||||||
%patch2 -p1 -b .SCX4500W
|
%patch2 -p1 -b .soname
|
||||||
%patch3 -p1 -b .soname
|
%patch3 -p1 -b .sane-config-multilib
|
||||||
%patch4 -p1 -b .sane-config-multilib
|
|
||||||
%patch5 -p1 -b .umax-init-error
|
|
||||||
%patch6 -p1 -b .coolscan-multiscan
|
|
||||||
%patch7 -p1 -b .scanimage-man
|
|
||||||
%patch8 -p1 -b .saned-help
|
|
||||||
%patch9 -p1 -b .genesys-gl646
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
CFLAGS="%optflags -fno-strict-aliasing"
|
CFLAGS="%optflags -fno-strict-aliasing"
|
||||||
@ -303,6 +281,11 @@ popd
|
|||||||
%{_libdir}/sane/*gphoto2.so*
|
%{_libdir}/sane/*gphoto2.so*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Oct 09 2013 Nils Philippsen <nils@redhat.com> - 1.0.24-1
|
||||||
|
- version 1.0.24
|
||||||
|
- use (hopefully stable) Alioth download URL
|
||||||
|
- update udev patch, remove obsolete patches
|
||||||
|
|
||||||
* Mon Sep 09 2013 Nils Philippsen <nils@redhat.com> - 1.0.23-18
|
* Mon Sep 09 2013 Nils Philippsen <nils@redhat.com> - 1.0.23-18
|
||||||
- build against libusb-1.0 on Fedora >= 18 (#1003193)
|
- build against libusb-1.0 on Fedora >= 18 (#1003193)
|
||||||
- require libusbx-devel instead of libusb1-devel which is obsolete
|
- require libusbx-devel instead of libusb1-devel which is obsolete
|
||||||
|
Loading…
Reference in New Issue
Block a user