[SnapScan] Acer 300 (310/... ??) bug correction

From: Sebastien Sable (sebastien.sable@gmx.net)
Date: Sat Oct 07 2000 - 07:51:22 PDT

  • Next message: Peck Dickens: "Re: (bit off topic) Re: Lineart with xsane/mustek"

    Seb presents: Acer 300f Mega Power Patch 2000 (see end of mail)

    It adds support for the Acer 300f and corrects a bug that put noise on
    the major part of the picture when scanning.
    The interesting part in itself is only 2 lines long! (but you can't
    imagine what I had to do to find those two missing lines)

    I think this patch can solve the same problem reported for some other
    models as well. To do this, search for ACER300F in snpascan-scsi.c and
    snapscan.c and add your model in the "if" test (I didn't do it myself
    in order not to break support for working scanners).

    This is not a complete correction however:
    * it removes gamma correction for this model (who cares?)

    * while the picture looks fine most of the time, I have problems with
    big pictures in high resolution; in 300dpi GreyScale the scanner needs
    to stop and go back producing a picture with traces; in 300dpi Color,
    the scanner blocks in the middle of the scan.
    This problem is probably the same reported by Lawrence Glaister
    before, but his proposed correction doesn't work in my case.

    Enjoy

    -- 
    Sébastien Sablé
    sebastien.sable@gmx.net
    

    acerpatch.diff: use "patch -p0 <acerpatch.diff" to apply

    diff -r -C 2 sane-1.0.3/backend/snapscan-scsi.c sane-1.0.3.ok3/backend/snapscan-scsi.c *** sane-1.0.3/backend/snapscan-scsi.c Sat Aug 12 17:16:36 2000 --- sane-1.0.3.ok3/backend/snapscan-scsi.c Sat Oct 7 02:27:56 2000 *************** *** 726,731 **** pc[SET_WINDOW_P_COMPRESSION_TYPE] = 0; /* none */ pc[SET_WINDOW_P_COMPRESSION_ARG] = 0; /* none applicable */ ! pc[SET_WINDOW_P_DEBUG_MODE] = 2; /* use full 128k buffer */ ! pc[SET_WINDOW_P_GAMMA_NO] = 0x01; /* downloaded table */ source = 0x20; if (pss->preview) --- 726,735 ---- pc[SET_WINDOW_P_COMPRESSION_TYPE] = 0; /* none */ pc[SET_WINDOW_P_COMPRESSION_ARG] = 0; /* none applicable */ ! ! if(pss->pdev->model != ACER300F) /* Seb added */ ! { ! pc[SET_WINDOW_P_DEBUG_MODE] = 2; /* use full 128k buffer */ ! pc[SET_WINDOW_P_GAMMA_NO] = 0x01; /* downloaded table */ ! } source = 0x20; if (pss->preview) diff -r -C 2 sane-1.0.3/backend/snapscan.c sane-1.0.3.ok3/backend/snapscan.c *** sane-1.0.3/backend/snapscan.c Sat Aug 12 17:16:51 2000 --- sane-1.0.3.ok3/backend/snapscan.c Sat Oct 7 02:47:56 2000 *************** *** 855,859 **** model, "AGFA SnapScan 300, 310, 600 or 1236s, " ! "Acer VUEGO 310S, 610S, or 610plus, " "Acer PRISA model 620S"); sanei_scsi_close (fd); --- 855,859 ---- model, "AGFA SnapScan 300, 310, 600 or 1236s, " ! "Acer VUEGO 300f, 310S, 610S, or 610plus, " "Acer PRISA model 620S"); sanei_scsi_close (fd); *************** *** 2127,2131 **** if (pss->pdev->model == PRISA620S /* GP added - blocking mode only */ || ! pss->pdev->model == VUEGO610S) /* SJU added */ { status = SANE_STATUS_UNSUPPORTED; --- 2127,2134 ---- if (pss->pdev->model == PRISA620S /* GP added - blocking mode only */ || ! pss->pdev->model == VUEGO610S /* SJU added */ ! || ! pss->pdev->model == ACER300F) /* Seb added */ ! { status = SANE_STATUS_UNSUPPORTED; diff -r -C 2 sane-1.0.3/backend/snapscan.conf sane-1.0.3.ok3/backend/snapscan.conf *** sane-1.0.3/backend/snapscan.conf Mon Aug 9 20:05:49 1999 --- sane-1.0.3.ok3/backend/snapscan.conf Sat Oct 7 02:46:56 2000 *************** *** 1,4 **** --- 1,5 ---- scsi AGFA scsi COLOR + scsi ACERPER /dev/scanner /dev/sga diff -r -C 2 sane-1.0.3/backend/snapscan.desc sane-1.0.3.ok3/backend/snapscan.desc *** sane-1.0.3/backend/snapscan.desc Sat Aug 12 17:09:37 2000 --- sane-1.0.3.ok3/backend/snapscan.desc Sat Oct 7 02:47:31 2000 *************** *** 40,43 **** --- 40,44 ---- :comment "Close SnapScan 310 compatible." :mfg "Acer" + :model "300f" :model "310s" :interface "SCSI" diff -r -C 2 sane-1.0.3/backend/snapscan.h sane-1.0.3.ok3/backend/snapscan.h *** sane-1.0.3/backend/snapscan.h Sat Aug 12 17:16:52 2000 --- sane-1.0.3.ok3/backend/snapscan.h Fri Oct 6 01:16:50 2000 *************** *** 73,76 **** --- 73,77 ---- SNAPSCAN600, /* the SnapScan 600 */ SNAPSCAN1236S, /* the SnapScan 1236s */ + ACER300F, VUEGO310S, /* Vuego-Version of SnapScan 310 WG changed */ VUEGO610S, /* Vuego 610S and 610plus SJU changed */ *************** *** 95,98 **** --- 96,100 ---- {"SNAPSCAN 600", SNAPSCAN600}, {"SnapScan", SNAPSCAN300}, + {"ACERSCAN_A4____1", ACER300F} }; #define known_scanners ((int) (sizeof(scanners)/sizeof(scanners[0]))) *************** *** 102,106 **** /* SCSI Vendor name */ "AGFA", ! "COLOR" }; #define known_vendors ((int) (sizeof(vendors)/sizeof(vendors[0]))) --- 104,109 ---- /* SCSI Vendor name */ "AGFA", ! "COLOR", ! "ACERPER" }; #define known_vendors ((int) (sizeof(vendors)/sizeof(vendors[0])))

    -- Source code, list archive, and docs: http://www.mostang.com/sane/ To unsubscribe: echo unsubscribe sane-devel | mail majordomo@mostang.com



    This archive was generated by hypermail 2b29 : Sat Oct 07 2000 - 07:54:34 PDT