kopia lustrzana https://gitlab.com/sane-project/backends
Canon PIXMA MG8200 is working now
rodzic
b86f0b895b
commit
ded994f348
|
@ -684,6 +684,7 @@ static unsigned calc_shifting (pixma_t * s)
|
||||||
|
|
||||||
case MP980_PID:
|
case MP980_PID:
|
||||||
case MP990_PID:
|
case MP990_PID:
|
||||||
|
case MG8200_PID:
|
||||||
if (s->param->ydpi > 150)
|
if (s->param->ydpi > 150)
|
||||||
{
|
{
|
||||||
mp->color_shift = s->param->ydpi / 75;
|
mp->color_shift = s->param->ydpi / 75;
|
||||||
|
@ -848,8 +849,8 @@ static int send_scan_param (pixma_t * s)
|
||||||
* -----+-------+---------+---------------------------
|
* -----+-------+---------+---------------------------
|
||||||
* 0x24 | 1 | all | 0x01
|
* 0x24 | 1 | all | 0x01
|
||||||
* -----+-------+---------+---------------------------
|
* -----+-------+---------+---------------------------
|
||||||
* 0x25 | 1 | default | 0x01, cs9000f: 0x00
|
* 0x25 | 1 | default | 0x00; cs8800f: 0x01
|
||||||
* | | tpu | 0x00, cs9000f: 0x01
|
* | | tpu | 0x00; cs9000f, mg8200: 0x01
|
||||||
* | | tpuir | cs9000f: 0x00
|
* | | tpuir | cs9000f: 0x00
|
||||||
* -----+-------+---------+---------------------------
|
* -----+-------+---------+---------------------------
|
||||||
* ... | 1 | all | 0x00
|
* ... | 1 | all | 0x00
|
||||||
|
@ -873,7 +874,8 @@ static int send_scan_param (pixma_t * s)
|
||||||
data[0x02] = 0x03;
|
data[0x02] = 0x03;
|
||||||
data[0x03] = 0x03;
|
data[0x03] = 0x03;
|
||||||
}
|
}
|
||||||
data[0x05] = 0x01; /* This one also seen at 0. Don't know yet what's used for */
|
if (s->cfg->pid != MG8200_PID)
|
||||||
|
data[0x05] = 0x01; /* This one also seen at 0. Don't know yet what's used for */
|
||||||
/* the scanner controls the scan */
|
/* the scanner controls the scan */
|
||||||
/* no software control needed */
|
/* no software control needed */
|
||||||
pixma_set_be16 (s->param->xdpi | 0x8000, data + 0x08);
|
pixma_set_be16 (s->param->xdpi | 0x8000, data + 0x08);
|
||||||
|
@ -896,7 +898,7 @@ static int send_scan_param (pixma_t * s)
|
||||||
|
|
||||||
data[0x1f] = 0x01; /* for 9000F this appears to be 0x00, not sure if that is because of positives */
|
data[0x1f] = 0x01; /* for 9000F this appears to be 0x00, not sure if that is because of positives */
|
||||||
|
|
||||||
if (s->cfg->pid == CS9000F_PID || s->cfg->pid == CS9000F_MII_PID)
|
if (s->cfg->pid == CS9000F_PID || s->cfg->pid == CS9000F_MII_PID || s->cfg->pid == MG8200_PID)
|
||||||
{
|
{
|
||||||
data[0x1f] = 0x00;
|
data[0x1f] = 0x00;
|
||||||
}
|
}
|
||||||
|
@ -906,6 +908,15 @@ static int send_scan_param (pixma_t * s)
|
||||||
data[0x23] = 0x02;
|
data[0x23] = 0x02;
|
||||||
data[0x24] = 0x01;
|
data[0x24] = 0x01;
|
||||||
|
|
||||||
|
/* MG8200 addition */
|
||||||
|
if (s->cfg->pid == MG8200_PID)
|
||||||
|
{
|
||||||
|
if (is_scanning_from_tpu (s))
|
||||||
|
{
|
||||||
|
data[0x25] = 0x01;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* CS8800F & CS9000F addition */
|
/* CS8800F & CS9000F addition */
|
||||||
if (s->cfg->pid == CS8800F_PID || s->cfg->pid == CS9000F_PID || s->cfg->pid == CS9000F_MII_PID)
|
if (s->cfg->pid == CS8800F_PID || s->cfg->pid == CS9000F_PID || s->cfg->pid == CS9000F_MII_PID)
|
||||||
{
|
{
|
||||||
|
@ -1091,19 +1102,25 @@ static int handle_interrupt (pixma_t * s, int timeout)
|
||||||
return PIXMA_EPROTO;
|
return PIXMA_EPROTO;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* More than one event can be reported at the same time. */
|
|
||||||
if (buf[3] & 1)
|
|
||||||
send_time (s);
|
|
||||||
if (buf[9] & 2)
|
|
||||||
query_status (s);
|
|
||||||
|
|
||||||
/* s->event = 0x0boott
|
/* s->event = 0x0boott
|
||||||
* b: button
|
* b: button
|
||||||
* oo: original
|
* oo: original
|
||||||
* tt: target
|
* tt: target
|
||||||
* poll event with 'scanimage -A'
|
* poll event with 'scanimage -A'
|
||||||
* */
|
* */
|
||||||
if (s->cfg->pid == CS9000F_PID || s->cfg->pid == CS9000F_MII_PID)
|
if (s->cfg->pid == MG8200_PID)
|
||||||
|
/* button no. in buf[7]
|
||||||
|
* size in buf[10] 01=A4; 02=Letter; 08=10x15; 09=13x18; 0b=auto
|
||||||
|
* format in buf[11] 01=JPEG; 02=TIFF; 03=PDF; 04=Kompakt-PDF
|
||||||
|
* dpi in buf[12] 01=75; 02=150; 03=300; 04=600
|
||||||
|
* target = format; original = size */
|
||||||
|
{
|
||||||
|
if (buf[7] & 1)
|
||||||
|
s->events = PIXMA_EV_BUTTON1 | buf[11] | buf[10]<<8; /* color scan */
|
||||||
|
if (buf[7] & 2)
|
||||||
|
s->events = PIXMA_EV_BUTTON2 | buf[11] | buf[10]<<8; /* b/w scan */
|
||||||
|
}
|
||||||
|
else if (s->cfg->pid == CS9000F_PID || s->cfg->pid == CS9000F_MII_PID)
|
||||||
/* button no. in buf[1]
|
/* button no. in buf[1]
|
||||||
* target = button no. */
|
* target = button no. */
|
||||||
{
|
{
|
||||||
|
@ -1117,6 +1134,12 @@ static int handle_interrupt (pixma_t * s, int timeout)
|
||||||
* original in buf[0]
|
* original in buf[0]
|
||||||
* target in buf[1] */
|
* target in buf[1] */
|
||||||
{
|
{
|
||||||
|
/* More than one event can be reported at the same time. */
|
||||||
|
if (buf[3] & 1)
|
||||||
|
send_time (s); /* FIXME: some scanners hang here */
|
||||||
|
if (buf[9] & 2)
|
||||||
|
query_status (s);
|
||||||
|
|
||||||
if (buf[0] & 2)
|
if (buf[0] & 2)
|
||||||
s->events = PIXMA_EV_BUTTON2 | buf[1] | ((buf[0] & 0xf0) << 4); /* b/w scan */
|
s->events = PIXMA_EV_BUTTON2 | buf[1] | ((buf[0] & 0xf0) << 4); /* b/w scan */
|
||||||
if (buf[0] & 1)
|
if (buf[0] & 1)
|
||||||
|
@ -1200,6 +1223,9 @@ shift_colors (uint8_t * dptr, uint8_t * sptr, unsigned w, unsigned dpi,
|
||||||
sg = colshft[1];
|
sg = colshft[1];
|
||||||
sb = colshft[2];
|
sb = colshft[2];
|
||||||
|
|
||||||
|
/* PDBG (pixma_dbg (4, "*shift_colors***** c=%u, w=%i, sr=%u, sg=%u, sb=%u, strshft=%u ***** \n",
|
||||||
|
c, w, sr, sg, sb, strshft)); */
|
||||||
|
|
||||||
for (i = 0; i < w; i++)
|
for (i = 0; i < w; i++)
|
||||||
{
|
{
|
||||||
/* stripes shift for MP970 at 4800 dpi, MP810 at 2400 dpi */
|
/* stripes shift for MP970 at 4800 dpi, MP810 at 2400 dpi */
|
||||||
|
@ -1513,7 +1539,7 @@ static unsigned post_process_image_data (pixma_t * s, pixma_imagebuf_t * ib)
|
||||||
n = s->param->xdpi / 2400;
|
n = s->param->xdpi / 2400;
|
||||||
|
|
||||||
/* Some exceptions to global rules here */
|
/* Some exceptions to global rules here */
|
||||||
if (s->cfg->pid == MP970_PID || s->cfg->pid == MP990_PID
|
if (s->cfg->pid == MP970_PID || s->cfg->pid == MP990_PID || s->cfg->pid == MG8200_PID
|
||||||
|| s->cfg->pid == CS8800F_PID || s->cfg->pid == CS9000F_PID || s->cfg->pid == CS9000F_MII_PID)
|
|| s->cfg->pid == CS8800F_PID || s->cfg->pid == CS9000F_PID || s->cfg->pid == CS9000F_MII_PID)
|
||||||
n = MIN (n, 4);
|
n = MIN (n, 4);
|
||||||
|
|
||||||
|
|
|
@ -133,10 +133,10 @@
|
||||||
:comment "Testers needed!"
|
:comment "Testers needed!"
|
||||||
|
|
||||||
:model "PIXMA MG8200 Series"
|
:model "PIXMA MG8200 Series"
|
||||||
:interface "USB"
|
:interface "USB Ethernet"
|
||||||
:usbid "0x04a9" "0x1756"
|
:usbid "0x04a9" "0x1756"
|
||||||
:status :untested
|
:status :complete
|
||||||
:comment "Testers needed!"
|
:comment "All resolutions supported (up to 4800DPI)."
|
||||||
|
|
||||||
:model "PIXMA MP140"
|
:model "PIXMA MP140"
|
||||||
:interface "USB"
|
:interface "USB"
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
.TH "sane\-pixma" "5" "03 Jul 2013" "@PACKAGEVERSION@" "SANE Scanner Access Now Easy"
|
.TH "sane\-pixma" "5" "18 Jul 2013" "@PACKAGEVERSION@" "SANE Scanner Access Now Easy"
|
||||||
.IX sane\-pixma
|
.IX sane\-pixma
|
||||||
.SH NAME
|
.SH NAME
|
||||||
sane\-pixma \- SANE backend for Canon Multi-Function Printers and CanoScan Scanners
|
sane\-pixma \- SANE backend for Canon Multi-Function Printers and CanoScan Scanners
|
||||||
|
@ -17,7 +17,7 @@ Currently, the following models work with this backend:
|
||||||
.RS
|
.RS
|
||||||
PIXMA MG2100, MG3100, MG4200, MG5100, MG5200, MG5300
|
PIXMA MG2100, MG3100, MG4200, MG5100, MG5200, MG5300
|
||||||
.br
|
.br
|
||||||
PIXMA MG6100, MG6200, MG6300
|
PIXMA MG6100, MG6200, MG6300, MG8200
|
||||||
.br
|
.br
|
||||||
PIXMA MP140, MP150, MP160, MP170, MP180, MP190
|
PIXMA MP140, MP150, MP160, MP170, MP180, MP190
|
||||||
.br
|
.br
|
||||||
|
@ -77,9 +77,7 @@ Feedback in the sane\-devel mailing list welcome.
|
||||||
.RS
|
.RS
|
||||||
PIXMA E500, E510, E600, E610
|
PIXMA E500, E510, E600, E610
|
||||||
.br
|
.br
|
||||||
PIXMA MG2200, MG3200, MG4100, MG5400
|
PIXMA MG2200, MG3200, MG4100, MG5400, MG8100
|
||||||
.br
|
|
||||||
PIXMA MG8100, MG8200
|
|
||||||
.br
|
.br
|
||||||
PIXMA MP375R, MP493, MP495, MP740
|
PIXMA MP375R, MP493, MP495, MP740
|
||||||
.br
|
.br
|
||||||
|
|
Ładowanie…
Reference in New Issue