Fixed warmup bug

Fixed device hang problem (EPSON & CanoScan)
Some fine-tuning
merge-requests/1/head
Gerhard Jaeger 2003-08-14 12:54:11 +00:00
rodzic ab3033d827
commit f7ce836c46
7 zmienionych plików z 61 dodań i 26 usunięć

Wyświetl plik

@ -1,5 +1,15 @@
2003-08-14 Gerhard Jaeger <gerhard@gjaeger.de>
* doc/sane-plustek.man: Added debug description
* backend/plustek.c backend/plustek-usbhw.c backend/plustek-usbshading.c
backend/plustek-usbscan.c backend/plustek-devs.c
Fixed warmup bug
Fixed EPSON12x0 and CanoScan hangs during init step
Some fine-tuning for the CanoScan devices
2003-08-10 Gerhard Jaeger <gerhard@gjaeger.de>
* doc/descritpions/plustek.desc: Update to new keywords,
* doc/descriptions/plustek.desc: Update to new keywords,
added Genius Colorpage HR6X EPP
* TODO: moved Plustek topics to done section

Wyświetl plik

@ -1854,7 +1854,7 @@ static HWDef Hw0x04A9_0x2206_0 =
0x00, /* bReg 0x27 color mode */
2, /* bReg 0x29 illumination mode (runtime) */
/* illumination mode settings */
{ 3, 0, 0, 23, 1800, 0, 0 },
{ 3, 0, 0, 23, 1500, 0, 0 },
{ 2, 23, 4000, 23, 2600, 23, 1600 },
1, /* StepperPhaseCorrection (reg 0x1a + 0x1b) */

Wyświetl plik

@ -1288,7 +1288,7 @@ static SANE_Bool usb_Wait4Warmup( pPlustek_Device dev )
pHWDef hw = &dev->usbDev.HwSetting;
if( hw->bReg_0x29 != 1 ) {
if( hw->bReg_0x26 & _ONE_CH_COLOR ) {
DBG(_DBG_INFO,"Warmup: skipped for CIS devices\n" );
return SANE_TRUE;
}

Wyświetl plik

@ -1155,15 +1155,17 @@ static SANE_Bool usb_SetScanParameters( pPlustek_Device dev, pScanParam pParam )
return SANE_FALSE;
a_bRegs[0x07] = 0;
a_bRegs[0x28] = 0;
/* set unused registers to 0 */
memset( &a_bRegs[0x03], 0, 3 );
memset( &a_bRegs[0x5f], 0, 0x7f-0x5f+1 );
/* set the merlin registers */
_UIO(sanei_lm983x_write( dev->fd, 0x03, &a_bRegs[0x03], 3, SANE_TRUE));
_UIO(sanei_lm983x_write( dev->fd, 0x08, &a_bRegs[0x08], 0x7f - 0x08+1, SANE_TRUE));
usleep( 50 );
usleep( 100 );
if( !usbio_WriteReg( dev->fd, 0x07, 0 ))
return SANE_FALSE;

Wyświetl plik

@ -333,9 +333,20 @@ static void usb_GetSoftwareOffsetGain( pPlustek_Device dev )
case kCIS650:
DBG( _DBG_INFO2, "kCIS650 adjustments\n" );
pParam->swGain[0] = 1160;
pParam->swGain[1] = 1160;
pParam->swGain[2] = 1160;
if(pParam->bDataType == SCANDATATYPE_Color) {
pParam->swGain[0] = 1160;
pParam->swGain[1] = 1160;
pParam->swGain[2] = 1160;
} else {
pParam->swOffset[0] =
pParam->swOffset[1] =
pParam->swOffset[2] = -1500;
pParam->swGain[0] =
pParam->swGain[1] =
pParam->swGain[2] = 1000;
}
break;
case kCIS670:
@ -349,13 +360,13 @@ static void usb_GetSoftwareOffsetGain( pPlustek_Device dev )
pParam->swGain[1] = 1150;
pParam->swGain[2] = 1150;
} else {
pParam->swOffset[0] = -1500;
pParam->swOffset[1] = -1500;
pParam->swOffset[2] = -1500;
pParam->swOffset[0] =
pParam->swOffset[1] =
pParam->swOffset[2] = -2800;
pParam->swGain[0] = 900;
pParam->swGain[1] = 900;
pParam->swGain[2] = 900;
pParam->swGain[0] =
pParam->swGain[1] =
pParam->swGain[2] = 980;
}
break;
@ -555,7 +566,6 @@ static void usb_GetSoftwareOffsetGain( pPlustek_Device dev )
}
/** as the name says..
*
*/
static void usb_Swap( u_short *pw, u_long dwBytes )
{
@ -564,7 +574,6 @@ static void usb_Swap( u_short *pw, u_long dwBytes )
}
/** according to the pixel values,
*
*/
static u_char usb_GetNewGain( u_short wMax )
{
@ -2485,11 +2494,16 @@ static int usb_DoCalibration( pPlustek_Device dev )
*/
static SANE_Bool usb_DownloadShadingData( pPlustek_Device dev, u_char bJobID )
{
u_char channel;
pDCapsDef scaps = &dev->usbDev.Caps;
pHWDef hw = &dev->usbDev.HwSetting;
DBG( _DBG_INFO2, "usb_DownloadShadingData(%u)\n", bJobID );
channel = CHANNEL_green;
if( hw->bReg_0x26 & _ONE_CH_COLOR )
channel = CHANNEL_blue;
switch( bJobID ) {
case PARAM_WhiteShading:
@ -2504,7 +2518,7 @@ static SANE_Bool usb_DownloadShadingData( pPlustek_Device dev, u_char bJobID )
m_ScanParam.Size.dwPhyPixels * 2,
(u_short)m_ScanParam.Size.dwPhyPixels * 2);
} else {
usb_SetDarkShading( dev->fd, CHANNEL_green, a_wDarkShading +
usb_SetDarkShading( dev->fd, channel, a_wDarkShading +
m_ScanParam.Size.dwPhyPixels,
(u_short)m_ScanParam.Size.dwPhyPixels * 2);
}
@ -2575,7 +2589,7 @@ static SANE_Bool usb_DownloadShadingData( pPlustek_Device dev, u_char bJobID )
a_wDarkShading + m_dwPixels * 2,
(u_short)m_ScanParam.Size.dwPhyPixels * 2);
} else {
usb_SetDarkShading( dev->fd, CHANNEL_green,
usb_SetDarkShading( dev->fd, channel,
a_wDarkShading + m_dwPixels,
(u_short)m_ScanParam.Size.dwPhyPixels * 2);
}
@ -2586,13 +2600,13 @@ static SANE_Bool usb_DownloadShadingData( pPlustek_Device dev, u_char bJobID )
usb_SetWhiteShading( dev->fd, CHANNEL_green,
a_wWhiteShading +
m_ScanParam.Size.dwPhyPixels,
(u_short)m_ScanParam.Size.dwPhyPixels * 2);
(u_short)m_ScanParam.Size.dwPhyPixels * 2);
usb_SetWhiteShading( dev->fd, CHANNEL_blue,
a_wWhiteShading +
m_ScanParam.Size.dwPhyPixels * 2,
(u_short)m_ScanParam.Size.dwPhyPixels * 2);
(u_short)m_ScanParam.Size.dwPhyPixels * 2);
} else {
usb_SetWhiteShading( dev->fd,CHANNEL_green,a_wWhiteShading,
usb_SetWhiteShading( dev->fd, channel, a_wWhiteShading,
(u_short)m_ScanParam.Size.dwPhyPixels * 2);
}

Wyświetl plik

@ -131,7 +131,7 @@
#include "sane/sanei.h"
#include "sane/saneopts.h"
#define BACKEND_VERSION "0.45-6"
#define BACKEND_VERSION "0.45-7"
#define BACKEND_NAME plustek
#include "sane/sanei_backend.h"
#include "sane/sanei_config.h"

Wyświetl plik

@ -1,4 +1,4 @@
.TH sane-plustek 5 "18 May 2003" "@PACKAGEVERSION@" "SANE Scanner Access Now Easy"
.TH sane-plustek 5 "30 May 2003" "@PACKAGEVERSION@" "SANE Scanner Access Now Easy"
.IX sane-plustek
.SH NAME
sane-plustek \- SANE backend for Plustek parallel port and
@ -593,10 +593,6 @@ These values can be used to adjust the internally detected gain values of
the AFE for each channel. The range is between 0 and 63.
.RE
.PP
See the plustek.conf file for examples.
.PP
@ -657,6 +653,19 @@ or directly from the projects' homepage at:
.br
.B http://www.gjaeger.de/scanner/plustek.html
.PP
To obtain debug messages from the backend, please set the
environment-variable
.I SANE_DEBUG_PLUSTEK
before calling your favorite scan-frontend (i.e. xscanimage).
.br
.B i.e.: export SANE_DEBUG_PLUSTEK=20 ; xscanimage
.PP
The value controls the verbosity of the backend. Please note, that
values greater than 19 force the backend to output raw data files,
which could be rather large. The ending of these files is ".raw".
For problem reports it should be enough the set the verbosity to
13.
.PP
.SH "KNOWN BUGS & RESTRICTIONS"
.PP