~ubuntu-branches/debian/jessie/sane-backends/jessie

« back to all changes in this revision

Viewing changes to backend/pixma_imageclass.c

  • Committer: Package Import Robot
  • Author(s): Markus Koschany
  • Date: 2013-07-04 17:41:47 UTC
  • mfrom: (1.1.13)
  • Revision ID: package-import@ubuntu.com-20130704174147-tl5tzd8bwvmctka2
Tags: 1.0.23-1
* QA upload.
* New upstream release.
* This package has been orphaned. Set maintainer to the Debian QA Group.
* Bump compat level to 9 (was 5) and require debhelper >= 9.
* debian/control:
  - sane-utils: Inherit Section: graphics from source package sane-backends.
  - Remove versioned dependencies. They are trivially satisfied.
* Drop the following patches. They are merged upstream now.
  - fix_v4l_build.patch
  - hurd_path_max_fix.patch
  - sane_desc_udev+acl.patch
  - scanimage_man_batch_start.patch
  - udev_usb_suspend.patch
  - xerox_mfp_add_scx_4623fw.patch
  - xerox_mfp_fix_usb_device.patch
* Drop disable_rpath.patch because the RPATH is already removed by chrpath
  in debian/rules.
* Rebase and refresh all other patches against the new upstream relase.
* debian/rules:
  - Simplify debian/rules by using dh sequencer.
  - Build with --parallel and with autotools_dev.
  - Enable all hardening build flags.
  - Install umax_pp with sane-utils.install.
* Build-Depend on libtiff5-dev. Thanks to Michael Terry for the patch.
  (Closes: #681079)
* Build-Depend on libusb-1.0-0-dev and enable libusb1.0 support in
  debian/rules. Thanks to Martin Pitt for the report and Whoopie for the
  patch. (Closes: #687137)

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
 
3
3
   Copyright (C) 2007-2009 Nicolas Martin, <nicols-guest at alioth dot debian dot org>
4
4
   Copyright (C) 2008 Dennis Lou, dlou 99 at yahoo dot com
 
5
   Copyright (C) 2011-2012 Rolf Bensch <rolf at bensch hyphen online dot de>
5
6
 
6
7
   This file is part of the SANE package.
7
8
 
77
78
#define MF4320_PID 0x26ee
78
79
#define MF3200_PID 0x2684
79
80
#define MF6500_PID 0x2686
 
81
#define MF4410_PID 0x2737
80
82
/* the following are all untested */
81
83
#define MF5630_PID 0x264e
82
84
#define MF5650_PID 0x264f
99
101
  cmd_scan_param = 0xde20,
100
102
  cmd_status = 0xf320,
101
103
  cmd_abort_session = 0xef20,
102
 
  cmd_read_image = 0xd420,
 
104
  cmd_read_image  = 0xd420,
 
105
  cmd_read_image2 = 0xd460,     /* New multifunctionals, such as MF4410 */
103
106
  cmd_error_info = 0xff20,
104
107
 
105
108
  cmd_activate = 0xcf60
264
267
  const int hlen = 2 + 6;
265
268
 
266
269
  memset (mf->cb.buf, 0, 11);
267
 
  pixma_set_be16 (cmd_read_image, mf->cb.buf);
 
270
  pixma_set_be16 ((s->cfg->pid == MF4410_PID ? cmd_read_image2 : cmd_read_image), mf->cb.buf);
268
271
  mf->cb.buf[8] = flag;
269
272
  mf->cb.buf[10] = 0x06;
270
 
  expected_len = (s->cfg->pid == MF4600_PID ||
 
273
  expected_len = (s->cfg->pid == MF4410_PID ||
 
274
                  s->cfg->pid == MF4600_PID ||
271
275
                  s->cfg->pid == MF6500_PID ||
272
276
                  s->cfg->pid == MF8030_PID) ? 512 : hlen;
273
277
  mf->cb.reslen = pixma_cmd_transaction (s, mf->cb.buf, 11, mf->cb.buf, expected_len);
277
281
      *size = pixma_get_be16 (mf->cb.buf + 6);    /* 16bit size */
278
282
      error = 0;
279
283
 
280
 
      if (s->cfg->pid == MF4600_PID ||
 
284
      if (s->cfg->pid == MF4410_PID ||
 
285
          s->cfg->pid == MF4600_PID ||
281
286
          s->cfg->pid == MF6500_PID ||
282
287
          s->cfg->pid == MF8030_PID)
283
288
        {                                         /* 32bit size */
299
304
  int error;
300
305
  unsigned maxchunksize, chunksize, count = 0;
301
306
  
302
 
  maxchunksize = MAX_CHUNK_SIZE * ((s->cfg->pid == MF4600_PID || 
 
307
  maxchunksize = MAX_CHUNK_SIZE * ((s->cfg->pid == MF4410_PID ||
 
308
                                    s->cfg->pid == MF4600_PID ||
303
309
                                    s->cfg->pid == MF6500_PID ||
304
310
                                    s->cfg->pid == MF8030_PID) ? 4 : 1);
305
311
  while (size)
595
601
      if (n != 0)
596
602
        {
597
603
          if (s->param->channels != 1 &&
 
604
                  s->cfg->pid != MF4410_PID &&
598
605
                  s->cfg->pid != MF4600_PID &&
599
606
                  s->cfg->pid != MF6500_PID &&
600
607
                  s->cfg->pid != MF8030_PID)
643
650
      query_status (s);
644
651
      activate (s, 0);
645
652
      query_status (s);
646
 
      if (mf->last_block == 0x28)
 
653
      if (mf->last_block == 0x28 || (s->cfg->pid==MF4410_PID && mf->last_block==0x38))
647
654
        {
648
655
          abort_session (s);
649
656
        }
696
703
            1,                        /* iface */               \
697
704
            &pixma_iclass_ops,        /* ops */         \
698
705
            dpi, dpi,                 /* xdpi, ydpi */  \
 
706
            0, 0,                     /* ext_min_dpi & ext_max_dpi not used in this subdriver */ \
699
707
            w, h,                     /* width, height */       \
700
708
            PIXMA_CAP_GRAY|PIXMA_CAP_EVENTS|cap             \
701
709
}
709
717
  DEV ("Canon imageCLASS MF4010", "MF4010", MF4010_PID, 600, 640, 877, 0),
710
718
  DEV ("Canon imageCLASS MF3240", "MF3240", MF3200_PID, 600, 640, 877, 0),
711
719
  DEV ("Canon imageClass MF6500", "MF6500", MF6500_PID, 600, 640, 877, PIXMA_CAP_ADF),
 
720
  DEV ("Canon imageCLASS MF4410", "MF4410", MF4410_PID, 600, 640, 877, 0),
712
721
  /* FIXME: the following capabilities all need updating/verifying */
713
722
  DEV ("Canon imageCLASS MF5630", "MF5630", MF5630_PID, 600, 640, 877, PIXMA_CAP_ADF),
714
723
  DEV ("Canon laserBase MF5650", "MF5650", MF5650_PID, 600, 640, 877, PIXMA_CAP_ADF),