diff --git a/ChangeLog b/ChangeLog index 79b082dfc..cabea5906 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2004-11-14 Oliver Schwartz + + * backend/snapscan.h backend/snapscan.c backend/snapscan-scsi.c + backend/snapscan-options.c doc/descriptions/snapscan.desc: + Added support for Epson Perfection 1270 + 2004-12-01 Henning Meier-Geinitz * doc/descriptions/umax1220u.desc doc/descriptions/unsupported.desc diff --git a/backend/snapscan-options.c b/backend/snapscan-options.c index 41f959db6..f11757b98 100644 --- a/backend/snapscan-options.c +++ b/backend/snapscan-options.c @@ -244,6 +244,7 @@ static void init_options (SnapScan_Scanner * ps) x_range_tpo = x_range_tpo_e50; y_range_tpo = y_range_tpo_e50; break; + case PERFECTION1270: case PERFECTION1670: x_range_tpo = x_range_tpo_1670; y_range_tpo = y_range_tpo_1670; @@ -335,7 +336,13 @@ static void init_options (SnapScan_Scanner * ps) SANE_CAP_SOFT_SELECT | SANE_CAP_SOFT_DETECT | SANE_CAP_AUTOMATIC; po[OPT_HIGHQUALITY].constraint_type = SANE_CONSTRAINT_NONE; ps->highquality = DEFAULT_HIGHQUALITY; - + if (ps->pdev->model == PERFECTION1270) + { + po[OPT_HIGHQUALITY].cap |= SANE_CAP_INACTIVE; + ps->val[OPT_QUALITY_CAL].b = SANE_TRUE; + ps->highquality=SANE_TRUE; + } + po[OPT_BRIGHTNESS].name = SANE_NAME_BRIGHTNESS; po[OPT_BRIGHTNESS].title = SANE_TITLE_BRIGHTNESS; po[OPT_BRIGHTNESS].desc = SANE_DESC_BRIGHTNESS; @@ -1508,6 +1515,9 @@ SANE_Status sane_control_option (SANE_Handle h, /* * $Log$ + * Revision 1.18 2004/12/01 22:12:02 oliver-guest + * Added support for Epson 1270 + * * Revision 1.17 2004/09/02 20:59:11 oliver-guest * Added support for Epson 2480 * diff --git a/backend/snapscan-scsi.c b/backend/snapscan-scsi.c index 3801c260e..42bbcaa98 100644 --- a/backend/snapscan-scsi.c +++ b/backend/snapscan-scsi.c @@ -502,6 +502,7 @@ static SANE_Status inquiry (SnapScan_Scanner *pss) pss->bpp = 8; switch (pss->pdev->model) { + case PERFECTION1270: case PERFECTION1670: case PERFECTION2480: pss->bpp = 14; @@ -765,6 +766,7 @@ static SANE_Status set_window (SnapScan_Scanner *pss) case PRISA5000: pos_factor = (pss->res > 600) ? 1200 : 600; break; + case PERFECTION1270: case PERFECTION1670: pos_factor = (pss->res > 800) ? 1600 : 800; break; @@ -1172,6 +1174,7 @@ static SANE_Status download_firmware(SnapScan_Scanner * pss) bufLength = ftell(fd); fseek(fd, 0, SEEK_SET); break; + case PERFECTION1270: case PERFECTION1670: case PERFECTION2480: /* Epson firmware files contain an info block which @@ -1227,6 +1230,9 @@ static SANE_Status download_firmware(SnapScan_Scanner * pss) /* * $Log$ + * Revision 1.30 2004/12/01 22:12:03 oliver-guest + * Added support for Epson 1270 + * * Revision 1.29 2004/10/03 17:34:36 hmg-guest * 64 bit platform fixes (bug #300799). * diff --git a/backend/snapscan.c b/backend/snapscan.c index cd3b0fafb..e8beb774b 100644 --- a/backend/snapscan.c +++ b/backend/snapscan.c @@ -79,7 +79,7 @@ #define EXPECTED_MAJOR 1 #define MINOR_VERSION 4 -#define BUILD 40 +#define BUILD 41 #define BACKEND_NAME snapscan @@ -176,6 +176,7 @@ static inline int calibration_line_length(SnapScan_Scanner *pss) case PRISA5000: pos_factor = 600; break; + case PERFECTION1270: case PERFECTION1670: pos_factor = 800; break; @@ -1261,11 +1262,17 @@ static SANE_Status send_gamma_table (SnapScan_Scanner *pss, u_char dtc, u_char d SANE_Status status = SANE_STATUS_GOOD; status = send (pss, dtc, dtcq); CHECK_STATUS (status, me, "send"); - if ((pss->pdev->model == PERFECTION1670) || (pss->pdev->model == PERFECTION2480)) + switch (pss->pdev->model) { - /* Epson Perfection 1670 needs an extra invitation */ - status = send (pss, dtc, dtcq); - CHECK_STATUS (status, me, "send"); + case PERFECTION1270: + case PERFECTION1670: + case PERFECTION2480: + /* Some epson scanners need the gamma table twice */ + status = send (pss, dtc, dtcq); + CHECK_STATUS (status, me, "2nd send"); + break; + default: + break; } return status; } @@ -1567,13 +1574,7 @@ SANE_Status sane_start (SANE_Handle h) status = download_gamma_tables(pss); CHECK_STATUS (status, me, "download_gamma_tables"); - if ((pss->pdev->model == PERFECTION1670) || (pss->pdev->model == PERFECTION2480)) - { - /* Epson Perfections needs the gamma table twice */ - status = download_gamma_tables(pss); - CHECK_STATUS (status, me, "download_gamma_tables (2nd try)"); - } - + status = download_halftone_matrices(pss); CHECK_STATUS (status, me, "download_halftone_matrices"); @@ -1837,6 +1838,9 @@ SANE_Status sane_get_select_fd (SANE_Handle h, SANE_Int * fd) /* * $Log$ + * Revision 1.46 2004/12/01 22:12:03 oliver-guest + * Added support for Epson 1270 + * * Revision 1.45 2004/10/03 17:34:36 hmg-guest * 64 bit platform fixes (bug #300799). * diff --git a/backend/snapscan.h b/backend/snapscan.h index 6d915cc97..9385b6889 100644 --- a/backend/snapscan.h +++ b/backend/snapscan.h @@ -100,6 +100,7 @@ typedef enum PRISA5000, /* Acer ScanPrisa 5000 - 1200 DPI */ PRISA5300, /* Acer ScanPrisa 5300 - 1200 DPI */ PERFECTION660, /* Epson Perfection 660 - 1200 DPI */ + PERFECTION1270, /* Epson Perfection 1270 - 1600 DPI */ PERFECTION1670, /* Epson Perfection 1670 - 1600 DPI */ PERFECTION2480, ARCUS1200 /* Agfa Arcus 1200 - 1200 DPI (rebadged Acer?) */ @@ -135,6 +136,7 @@ static struct SnapScan_Driver_desc drivers[] = {PRISA5300, "Acer5300"}, {ARCUS1200, "Arcus1200"}, {PERFECTION660, "Perfection 660"}, + {PERFECTION1270, "Perfection 1270"}, {PERFECTION1670, "Perfection 1670"}, {PERFECTION2480, "Perfection 2480"} }; @@ -214,6 +216,7 @@ static char *vendors[] = #define USB_PRODUCT_PRISA320 0x2022 /* Epson product IDs */ #define USB_PRODUCT_PERFECTION660 0x0114 +#define USB_PRODUCT_PERFECTION1270 0x0120 #define USB_PRODUCT_PERFECTION1670 0x011f #define USB_PRODUCT_PERFECTION2480 0x0121 @@ -238,6 +241,7 @@ static struct SnapScan_USB_Model_desc usb_scanners[] = {USB_VENDOR_ACER, USB_PRODUCT_PRISA310, PRISA310}, /* Acer 310U */ {USB_VENDOR_ACER, USB_PRODUCT_PRISA320, PRISA310}, /* Acer 320U */ {USB_VENDOR_EPSON, USB_PRODUCT_PERFECTION660, PERFECTION660}, /* Epson Perfection 660 */ + {USB_VENDOR_EPSON, USB_PRODUCT_PERFECTION1270, PERFECTION1270}, /* Epson Perfection 1270 */ {USB_VENDOR_EPSON, USB_PRODUCT_PERFECTION1670, PERFECTION1670}, /* Epson Perfection 1670 */ {USB_VENDOR_EPSON, USB_PRODUCT_PERFECTION2480, PERFECTION2480} /* Epson Perfection 2480 */ }; @@ -400,6 +404,9 @@ struct snapscan_scanner /* * $Log$ + * Revision 1.31 2004/12/01 22:12:04 oliver-guest + * Added support for Epson 1270 + * * Revision 1.30 2004/09/02 20:59:12 oliver-guest * Added support for Epson 2480 * diff --git a/doc/descriptions/snapscan.desc b/doc/descriptions/snapscan.desc index 91045097c..55f57fdd4 100644 --- a/doc/descriptions/snapscan.desc +++ b/doc/descriptions/snapscan.desc @@ -234,6 +234,10 @@ :interface "USB" :status :good +:model "Perfection 1270" +:interface "USB" +:status :good + :model "Perfection 1670" :interface "USB" :status :good