summaryrefslogtreecommitdiff
path: root/backend/pixma_imageclass.c
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2019-07-31 17:00:20 +0200
committerJörg Frings-Fürst <debian@jff-webhosting.net>2019-07-31 17:00:20 +0200
commit3759ce55ba79b8d3b9d8ed247a252273ee7dade3 (patch)
treed69692a274dd1c7d0672e6bb7155a0fc106f9d49 /backend/pixma_imageclass.c
parentc8bd2513ecba169cff44c09c8058c36987357b18 (diff)
parent1687222e1b9e74c89cafbb5910e72d8ec7bfd40f (diff)
Update upstream source from tag 'upstream/1.0.28'
Update to upstream version '1.0.28' with Debian dir ec5bb298266630fc3801ff6dc0c258f6df7ba979
Diffstat (limited to 'backend/pixma_imageclass.c')
-rw-r--r--backend/pixma_imageclass.c50
1 files changed, 41 insertions, 9 deletions
diff --git a/backend/pixma_imageclass.c b/backend/pixma_imageclass.c
index 8ad0083..9301bc6 100644
--- a/backend/pixma_imageclass.c
+++ b/backend/pixma_imageclass.c
@@ -1,6 +1,6 @@
/* SANE - Scanner Access Now Easy.
- Copyright (C) 2011-2016 Rolf Bensch <rolf at bensch hyphen online dot de>
+ Copyright (C) 2011-2019 Rolf Bensch <rolf at bensch hyphen online dot de>
Copyright (C) 2007-2009 Nicolas Martin, <nicols-guest at alioth dot debian dot org>
Copyright (C) 2008 Dennis Lou, dlou 99 at yahoo dot com
@@ -83,6 +83,7 @@
#define MF8300_PID 0x2708
#define MF4500_PID 0x2736
#define MF4410_PID 0x2737
+#define D550_PID 0x2738
#define MF3010_PID 0x2759
#define MF4570_PID 0x275a
#define MF4800_PID 0x2773
@@ -103,8 +104,22 @@
#define MF820_PID 0x27a6
#define MF220_PID 0x27a8
#define MF210_PID 0x27a9
+#define MF620_PID 0x27b4
+#define MF410_PID 0x27c0
+#define MF510_PID 0x27c2
#define MF230_PID 0x27d1
#define MF240_PID 0x27d2
+#define MF630_PID 0x27e1
+#define MF634_PID 0x27e2
+#define MF730_PID 0x27e4
+#define MF731_PID 0x27e5
+#define D570_PID 0x27e8
+#define MF110_PID 0x27ed
+#define MF520_PID 0x27f0
+#define MF420_PID 0x27f1
+#define MF260_PID 0x27f4
+#define MF740_PID 0x27fb
+#define MF640_PID 0x27fe
enum iclass_state_t
@@ -333,7 +348,7 @@ request_image_block (pixma_t * s, unsigned flag, uint8_t * info,
s->cfg->pid == MF8030_PID)
{ /* 32bit size */
*datalen = mf->cb.reslen - hlen;
- *size = (*datalen + hlen == 512) ? pixma_get_be32 (mf->cb.buf + 4) - *datalen : 0;
+ *size = (*datalen + hlen == 512) ? pixma_get_be32 (mf->cb.buf + 4) - *datalen : *size;
memcpy (data, mf->cb.buf + hlen, *datalen);
}
PDBG (pixma_dbg (11, "*request_image_block***** size = %u *****\n", *size));
@@ -351,7 +366,7 @@ read_image_block (pixma_t * s, uint8_t * data, unsigned size)
iclass_t *mf = (iclass_t *) s->subdriver;
int error;
unsigned maxchunksize, chunksize, count = 0;
-
+
maxchunksize = MAX_CHUNK_SIZE * ((mf->generation >= 2 ||
s->cfg->pid == MF4600_PID ||
s->cfg->pid == MF6500_PID ||
@@ -704,7 +719,7 @@ iclass_fill_buffer (pixma_t * s, pixma_imagebuf_t * ib)
}
first_block_size = 0;
- error = request_image_block (s, 4, &info, &block_size,
+ error = request_image_block (s, 4, &info, &block_size,
mf->blkptr + mf->blk_len, &first_block_size);
/* add current block to remainder of previous */
mf->blk_len += first_block_size;
@@ -919,6 +934,7 @@ const pixma_config_t pixma_iclass_devices[] = {
DEV ("Canon imageCLASS MF3240", "MF3240", MF3200_PID, 600, 0, 640, 877, 0),
DEV ("Canon imageClass MF6500", "MF6500", MF6500_PID, 600, 0, 640, 877, PIXMA_CAP_ADF),
DEV ("Canon imageCLASS MF4410", "MF4410", MF4410_PID, 600, 0, 640, 877, PIXMA_CAP_ADF),
+ DEV ("Canon imageCLASS D550", "D550", D550_PID, 600, 0, 640, 1050, PIXMA_CAP_ADF),
DEV ("Canon i-SENSYS MF4500 Series", "MF4500", MF4500_PID, 600, 0, 640, 877, PIXMA_CAP_ADF),
DEV ("Canon i-SENSYS MF3010", "MF3010", MF3010_PID, 600, 0, 640, 877, 0),
DEV ("Canon i-SENSYS MF4700 Series", "MF4700", MF4700_PID, 600, 0, 640, 1050, PIXMA_CAP_ADF),
@@ -934,14 +950,30 @@ const pixma_config_t pixma_iclass_devices[] = {
DEV ("Canon imageClass MF8030", "MF8030", MF8030_PID, 600, 0, 640, 877, PIXMA_CAP_ADF),
DEV ("Canon i-SENSYS MF5880dn", "MF5880", MF5880_PID, 600, 0, 640, 877, PIXMA_CAP_ADFDUP),
DEV ("Canon i-SENSYS MF6680dn", "MF6680", MF6680_PID, 600, 0, 640, 877, PIXMA_CAP_ADFDUP),
- DEV ("Canon imageRUNNER 1133", "iR1133", IR1133_PID, 600, 0, 637, 877, PIXMA_CAP_ADFDUP),
+ DEV ("Canon imageRUNNER 1133", "iR1133", IR1133_PID, 600, 0, 637, 877, PIXMA_CAP_ADFDUP), /* max. w = 216mm */
DEV ("Canon i-SENSYS MF5900 Series", "MF5900", MF5900_PID, 600, 0, 640, 1050, PIXMA_CAP_ADFDUP),
DEV ("Canon i-SENSYS MF8500C Series", "MF8500C", MF8500_PID, 600, 0, 640, 1050, PIXMA_CAP_ADFDUP),
DEV ("Canon i-SENSYS MF6100 Series", "MF6100", MF6100_PID, 600, 300, 640, 1050, PIXMA_CAP_ADFDUP),
DEV ("Canon imageClass MF810/820", "MF810/820", MF820_PID, 600, 0, 640, 1050, PIXMA_CAP_ADFDUP),
- DEV ("Canon i-SENSYS MF220 Series", "MF220", MF220_PID, 600, 0, 640, 1050, PIXMA_CAP_ADFDUP),
- DEV ("Canon i-SENSYS MF210 Series", "MF210", MF210_PID, 600, 0, 640, 1050, PIXMA_CAP_ADF),
- DEV ("Canon i-SENSYS MF230 Series", "MF230", MF230_PID, 600, 0, 640, 1050, PIXMA_CAP_ADF),
- DEV ("Canon i-SENSYS MF240 Series", "MF240", MF240_PID, 600, 0, 640, 1050, PIXMA_CAP_ADF),
+ DEV ("Canon i-SENSYS MF220 Series", "MF220", MF220_PID, 600, 0, 637, 1050, PIXMA_CAP_ADFDUP), /* max. w = 216mm */
+ DEV ("Canon i-SENSYS MF210 Series", "MF210", MF210_PID, 600, 0, 637, 1050, PIXMA_CAP_ADF), /* max. w = 216mm */
+ DEV ("Canon i-SENSYS MF620 Series", "MF620", MF620_PID, 600, 0, 637, 1050, PIXMA_CAP_ADF),
+ DEV ("Canon i-SENSYS MF410 Series", "MF410", MF410_PID, 600, 0, 637, 1050, PIXMA_CAP_ADFDUP), /* max. w = 216mm */
+ DEV ("Canon i-SENSYS MF510 Series", "MF510", MF510_PID, 600, 0, 640, 1050, PIXMA_CAP_ADFDUP),
+ DEV ("Canon i-SENSYS MF230 Series", "MF230", MF230_PID, 600, 0, 637, 1050, PIXMA_CAP_ADF), /* max. w = 216mm */
+ DEV ("Canon i-SENSYS MF240 Series", "MF240", MF240_PID, 600, 300, 634, 1050, PIXMA_CAP_ADF), /* max. w = 215mm, */
+ /* TODO: fix black stripes for 216mm @ 600dpi */
+ DEV ("Canon i-SENSYS MF630 Series", "MF630", MF630_PID, 600, 0, 637, 1050, PIXMA_CAP_ADFDUP),
+ DEV ("Canon i-SENSYS MF730 Series", "MF730", MF730_PID, 600, 0, 637, 1050, PIXMA_CAP_ADFDUP),
+ DEV ("Canon i-SENSYS MF731C", "MF731", MF731_PID, 600, 0, 637, 1050, PIXMA_CAP_ADFDUP),
+ DEV ("Canon imageCLASS MF634C", "MF632C/634C", MF634_PID, 600, 0, 637, 1050, PIXMA_CAP_ADFDUP),
+ DEV ("Canon imageCLASS MF733C", "MF731C/733C", MF731_PID, 600, 0, 637, 1050, PIXMA_CAP_ADFDUP), /* however, we need this for ethernet/wifi */
+ DEV ("Canon imageCLASS D570", "D570", D570_PID, 600, 0, 640, 877, 0),
+ DEV ("Canon i-SENSYS MF110 Series", "MF110", MF110_PID, 600, 0, 640, 1050, 0),
+ DEV ("Canon i-SENSYS MF520 Series", "MF520", MF520_PID, 600, 0, 640, 1050, PIXMA_CAP_ADFDUP),
+ DEV ("Canon i-SENSYS MF420 Series", "MF420", MF420_PID, 600, 0, 640, 1050, PIXMA_CAP_ADFDUP),
+ DEV ("Canon i-SENSYS MF260 Series", "MF260", MF260_PID, 600, 0, 640, 1050, 0),
+ DEV ("Canon i-SENSYS MF740 Series", "MF740", MF740_PID, 600, 0, 640, 1050, PIXMA_CAP_ADFDUP),
+ DEV ("Canon i-SENSYS MF640 Series", "MF640", MF640_PID, 600, 0, 640, 1050, PIXMA_CAP_ADFDUP),
DEV (NULL, NULL, 0, 0, 0, 0, 0, 0)
};