From a1788412870b05f561b6b59e72f160f32ec58cd0 Mon Sep 17 00:00:00 2001 From: Rolf Bensch Date: Tue, 24 Sep 2013 21:25:19 +0200 Subject: [PATCH] new scanner Canon imageCLASS MF4770n --- ChangeLog | 5 +++++ backend/pixma_imageclass.c | 18 +++++++++++++++++- doc/descriptions/pixma.desc | 6 ++++++ doc/sane-pixma.man | 4 ++-- 4 files changed, 30 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index ee18e5dc2..a0adc8d03 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2013-09-24 Rolf Bensch + * backend/pixma_imageclass.c, doc/descriptions/pixma.desc, + doc/sane-pixma.man: New scanner Canon imageCLASS MF4770n + reported by Ralph Little. + 2013-09-18 Alex Belkin * backend/xerox_mfp.conf.in doc/descriptions/xerox_mfp.desc: usb id for dell 1235cn, reported by Jean-Francois Labrousse. diff --git a/backend/pixma_imageclass.c b/backend/pixma_imageclass.c index a0f83f222..c0287a3ef 100644 --- a/backend/pixma_imageclass.c +++ b/backend/pixma_imageclass.c @@ -81,6 +81,7 @@ #define MF6500_PID 0x2686 #define MF4410_PID 0x2737 #define MF3010_PID 0x2759 +#define MF4770_PID 0x2774 /* the following are all untested */ #define MF5630_PID 0x264e #define MF5650_PID 0x264f @@ -279,11 +280,15 @@ request_image_block (pixma_t * s, unsigned flag, uint8_t * info, const int hlen = 2 + 6; memset (mf->cb.buf, 0, 11); - pixma_set_be16 (((s->cfg->pid == MF3010_PID || s->cfg->pid == MF4410_PID || s->cfg->pid == MF4550_PID) ? cmd_read_image2 : cmd_read_image), mf->cb.buf); + pixma_set_be16 (((s->cfg->pid == MF3010_PID || + s->cfg->pid == MF4410_PID || + s->cfg->pid == MF4770_PID || + s->cfg->pid == MF4550_PID) ? cmd_read_image2 : cmd_read_image), mf->cb.buf); mf->cb.buf[8] = flag; mf->cb.buf[10] = 0x06; expected_len = (s->cfg->pid == MF3010_PID || s->cfg->pid == MF4410_PID || + s->cfg->pid == MF4770_PID || s->cfg->pid == MF4550_PID || s->cfg->pid == MF4600_PID || s->cfg->pid == MF6500_PID || @@ -297,6 +302,7 @@ request_image_block (pixma_t * s, unsigned flag, uint8_t * info, if (s->cfg->pid == MF3010_PID || s->cfg->pid == MF4410_PID || + s->cfg->pid == MF4770_PID || s->cfg->pid == MF4550_PID || s->cfg->pid == MF4600_PID || s->cfg->pid == MF6500_PID || @@ -322,6 +328,7 @@ read_image_block (pixma_t * s, uint8_t * data, unsigned size) maxchunksize = MAX_CHUNK_SIZE * ((s->cfg->pid == MF3010_PID || s->cfg->pid == MF4410_PID || + s->cfg->pid == MF4770_PID || s->cfg->pid == MF4550_PID || s->cfg->pid == MF4600_PID || s->cfg->pid == MF6500_PID || @@ -503,6 +510,13 @@ iclass_check_param (pixma_t * s, pixma_scan_param_t * sp) sp->depth = 8; sp->line_size = ALIGN_SUP (sp->w, 32) * sp->channels; + + /* Some exceptions here for particular devices */ + /* Those devices can scan up to Legal 14" with ADF, but A4 11.7" in flatbed */ + if (sp->source == PIXMA_SOURCE_FLATBED + && ( s->cfg->pid == MF4770_PID )) + sp->h = MIN (sp->h, 877 * sp->xdpi / 75); + return 0; } @@ -639,6 +653,7 @@ iclass_fill_buffer (pixma_t * s, pixma_imagebuf_t * ib) if (s->param->channels != 1 && s->cfg->pid != MF3010_PID && s->cfg->pid != MF4410_PID && + s->cfg->pid != MF4770_PID && s->cfg->pid != MF4550_PID && s->cfg->pid != MF4600_PID && s->cfg->pid != MF6500_PID && @@ -770,6 +785,7 @@ const pixma_config_t pixma_iclass_devices[] = { DEV ("Canon imageCLASS MF4410", "MF4410", MF4410_PID, 600, 640, 877, PIXMA_CAP_ADF), DEV ("Canon i-SENSYS MF4550d", "MF4550", MF4550_PID, 600, 640, 877, PIXMA_CAP_ADF), DEV ("Canon i-SENSYS MF3010", "MF3010", MF3010_PID, 600, 640, 877, 0), + DEV ("Canon imageCLASS MF4770n", "MF4770", MF4770_PID, 600, 640, 1050, PIXMA_CAP_ADF), /* FIXME: the following capabilities all need updating/verifying */ DEV ("Canon imageCLASS MF5630", "MF5630", MF5630_PID, 600, 640, 877, PIXMA_CAP_ADF), DEV ("Canon laserBase MF5650", "MF5650", MF5650_PID, 600, 640, 877, PIXMA_CAP_ADF), diff --git a/doc/descriptions/pixma.desc b/doc/descriptions/pixma.desc index 95fd44cb3..5983b0ae1 100644 --- a/doc/descriptions/pixma.desc +++ b/doc/descriptions/pixma.desc @@ -787,6 +787,12 @@ :status :good :comment "Flatbed and ADF scan. All resolutions supported (up to 600DPI)." +:model "imageCLASS MF4770n" +:interface "USB Ethernet" +:usbid "0x04a9" "0x2774" +:status :good +:comment "Flatbed scan. All resolutions supported (up to 600DPI). ADF buggy." + :model "imageCLASS MF4570dw" :interface "USB" :usbid "0x04a9" "0x275a" diff --git a/doc/sane-pixma.man b/doc/sane-pixma.man index 0d51715a1..b108679c3 100644 --- a/doc/sane-pixma.man +++ b/doc/sane-pixma.man @@ -1,4 +1,4 @@ -.TH "sane\-pixma" "5" "13 Sep 2013" "@PACKAGEVERSION@" "SANE Scanner Access Now Easy" +.TH "sane\-pixma" "5" "24 Sep 2013" "@PACKAGEVERSION@" "SANE Scanner Access Now Easy" .IX sane\-pixma .SH NAME sane\-pixma \- SANE backend for Canon Multi-Function Printers and CanoScan Scanners @@ -49,7 +49,7 @@ imageCLASS MF4120, MF4122, MF4140, MF4150 .br imageCLASS MF4270, MF4350d, MF4370dn, MF4380dn .br -imageCLASS MF4410, MF4430, MF4660, MF4690 +imageCLASS MF4410, MF4430, MF4660, MF4690, MF4770n .br imageCLASS MF5730, MF5770, MF6550, D420, D480 .br