kopia lustrzana https://gitlab.com/sane-project/backends
update lide 110 to match scan lide 210
- use lide 210 mode for lide 110 - prepare true gray for GL124merge-requests/1/head
rodzic
c9a4cbe7a1
commit
1fa067861c
|
@ -5762,8 +5762,8 @@ init_options (Genesys_Scanner * s)
|
|||
("When using gray or lineart this option selects the used color.");
|
||||
s->opt[OPT_COLOR_FILTER].type = SANE_TYPE_STRING;
|
||||
s->opt[OPT_COLOR_FILTER].constraint_type = SANE_CONSTRAINT_STRING_LIST;
|
||||
/* true gray not yet supported for GL847 scanners */
|
||||
if(!model->is_cis || model->asic_type==GENESYS_GL847)
|
||||
/* true gray not yet supported for GL847 and GL124 scanners */
|
||||
if(!model->is_cis || model->asic_type==GENESYS_GL847 || model->asic_type==GENESYS_GL124)
|
||||
{
|
||||
s->opt[OPT_COLOR_FILTER].size = max_string_size (color_filter_list);
|
||||
s->opt[OPT_COLOR_FILTER].constraint.string_list = color_filter_list;
|
||||
|
|
|
@ -1806,6 +1806,8 @@ static Genesys_Model canon_lide_110_model = {
|
|||
GENESYS_FLAG_SKIP_WARMUP
|
||||
| GENESYS_FLAG_OFFSET_CALIBRATION
|
||||
| GENESYS_FLAG_DARK_CALIBRATION
|
||||
| GENESYS_FLAG_HALF_CCD_MODE
|
||||
| GENESYS_FLAG_SHADING_REPARK
|
||||
| GENESYS_FLAG_CUSTOM_GAMMA,
|
||||
GENESYS_HAS_SCAN_SW | GENESYS_HAS_COPY_SW | GENESYS_HAS_EMAIL_SW | GENESYS_HAS_FILE_SW,
|
||||
50,
|
||||
|
|
|
@ -988,7 +988,13 @@ gl124_init_motor_regs_scan (Genesys_Device * dev,
|
|||
else
|
||||
{
|
||||
min_speed = 600;
|
||||
if(dev->model->ccd_type==MOTOR_CANONLIDE110)
|
||||
{
|
||||
min_speed = 300;
|
||||
}
|
||||
}
|
||||
|
||||
/* compute min_speed and linesel */
|
||||
if(scan_yres<min_speed)
|
||||
{
|
||||
yres=min_speed;
|
||||
|
@ -1251,6 +1257,7 @@ gl124_init_optical_regs_scan (Genesys_Device * dev,
|
|||
unsigned int bytes;
|
||||
Genesys_Register_Set *r;
|
||||
SANE_Status status;
|
||||
uint32_t expmax, exp;
|
||||
|
||||
DBG (DBG_proc, "%s : exposure_time=%d, "
|
||||
"used_res=%d, start=%d, pixels=%d, channels=%d, depth=%d, "
|
||||
|
@ -1391,6 +1398,42 @@ gl124_init_optical_regs_scan (Genesys_Device * dev,
|
|||
|
||||
r = sanei_genesys_get_address (reg, REG06);
|
||||
r->value |= REG06_GAIN4;
|
||||
|
||||
/* CIS scanners can do true gray by setting LEDADD */
|
||||
/* we set up LEDADD only when asked */
|
||||
if (dev->model->is_cis == SANE_TRUE)
|
||||
{
|
||||
r = sanei_genesys_get_address (reg, REG60);
|
||||
r->value &= ~REG60_LEDADD;
|
||||
if (channels == 1 && (flags & OPTICAL_FLAG_ENABLE_LEDADD))
|
||||
{
|
||||
r->value |= REG60_LEDADD;
|
||||
sanei_genesys_get_triple(reg,REG_EXPR,&expmax);
|
||||
sanei_genesys_get_triple(reg,REG_EXPG,&exp);
|
||||
if(exp>expmax)
|
||||
{
|
||||
expmax=exp;
|
||||
}
|
||||
sanei_genesys_get_triple(reg,REG_EXPB,&exp);
|
||||
if(exp>expmax)
|
||||
{
|
||||
expmax=exp;
|
||||
}
|
||||
sanei_genesys_set_triple(dev->reg,REG_EXPR,expmax);
|
||||
sanei_genesys_set_triple(dev->reg,REG_EXPG,expmax);
|
||||
sanei_genesys_set_triple(dev->reg,REG_EXPB,expmax);
|
||||
}
|
||||
/* RGB weighting, REG_TRUER,G and B are to be set */
|
||||
r = sanei_genesys_get_address (reg, 0x01);
|
||||
r->value &= ~REG01_TRUEGRAY;
|
||||
if (channels == 1 && (flags & OPTICAL_FLAG_ENABLE_LEDADD))
|
||||
{
|
||||
r->value |= REG01_TRUEGRAY;
|
||||
sanei_genesys_write_register (dev, REG_TRUER, 0x80);
|
||||
sanei_genesys_write_register (dev, REG_TRUEG, 0x80);
|
||||
sanei_genesys_write_register (dev, REG_TRUEB, 0x80);
|
||||
}
|
||||
}
|
||||
|
||||
/* segment number */
|
||||
r = sanei_genesys_get_address (reg, 0x98);
|
||||
|
@ -1603,6 +1646,11 @@ gl124_init_scan_regs (Genesys_Device * dev,
|
|||
oflags |= OPTICAL_FLAG_DISABLE_LAMP;
|
||||
if (flags & SCAN_FLAG_CALIBRATION)
|
||||
oflags |= OPTICAL_FLAG_DISABLE_DOUBLE;
|
||||
|
||||
if (dev->model->is_cis && dev->settings.true_gray)
|
||||
{
|
||||
oflags |= OPTICAL_FLAG_ENABLE_LEDADD;
|
||||
}
|
||||
|
||||
/* now _LOGICAL_ optical values used are known, setup registers */
|
||||
status = gl124_init_optical_regs_scan (dev,
|
||||
|
|
|
@ -205,6 +205,16 @@
|
|||
#define REG38 0x38
|
||||
#define REG39 0x39
|
||||
|
||||
#define REG60 0x60
|
||||
#define REG60_LED4TG 0x80
|
||||
#define REG60_YENB 0x40
|
||||
#define REG60_YBIT 0x20
|
||||
#define REG60_ACYNCNRLC 0x10
|
||||
#define REG60_ENOFFSET 0x08
|
||||
#define REG60_LEDADD 0x04
|
||||
#define REG60_CK4ADC 0x02
|
||||
#define REG60_AUTOCONF 0x01
|
||||
|
||||
#define REG80 0x80
|
||||
#define REG81 0x81
|
||||
|
||||
|
@ -256,8 +266,8 @@
|
|||
#define REG100_MOTMFLG 0x02
|
||||
#define REG100_DATAENB 0x01
|
||||
|
||||
#define REG114 0x14
|
||||
#define REG115 0x15
|
||||
#define REG114 0x114
|
||||
#define REG115 0x115
|
||||
|
||||
#define REG_LINCNT 0x25
|
||||
#define REG_MAXWD 0x28
|
||||
|
@ -287,6 +297,10 @@
|
|||
#define REG_Z1MOD 0xb2
|
||||
#define REG_Z2MOD 0xb5
|
||||
|
||||
#define REG_TRUER 0x110
|
||||
#define REG_TRUEG 0x111
|
||||
#define REG_TRUEB 0x112
|
||||
|
||||
/**
|
||||
* writable scanner registers */
|
||||
enum
|
||||
|
@ -600,7 +614,7 @@ static size_t order_0213[]={0,2,1,3};
|
|||
* database of sensor profiles
|
||||
*/
|
||||
static Sensor_Profile sensors[]={
|
||||
{CIS_CANONLIDE110, 300, 0, 5359, 0x1e, 0x9f, 0x55, 5168, 154, 101, 388, 574, 393, NULL , 0x00, 0x0a, 0x20, 0x21},
|
||||
{CIS_CANONLIDE210, 600, 1, 2768, 0x1e, 0x9f, 0x55, 2584, 154, 101, 388, 574, 393, NULL , 0x00, 0x0c, 0x20, 0x21},
|
||||
{CIS_CANONLIDE110, 600, 0, 5360, 0x1e, 0x9f, 0x55, 5168, 163, 101, 388, 574, 393, NULL , 0x00, 0x0a, 0x20, 0x21},
|
||||
{CIS_CANONLIDE110, 1200, 0, 10528, 0x1e, 0x9f, 0x55, 5168, 163, 101, 388, 574, 393, order_01 , 0x00, 0x08, 0x20, 0x22},
|
||||
{CIS_CANONLIDE110, 2400, 0, 20864, 0x1e, 0x9f, 0x55, 5168, 163, 4679, 6839, 8401, 6859, order_0213, 0x00, 0x06, 0x20, 0x24},
|
||||
|
@ -614,10 +628,6 @@ static Sensor_Profile sensors[]={
|
|||
#define MOVE_DPI 200
|
||||
#define MOVE_EXPOSURE 2304
|
||||
|
||||
static uint32_t lide110_max[] = { 62496, 31296, 0};
|
||||
static uint32_t lide110_slow[] = { 62496, 7896, 0};
|
||||
static uint32_t lide110_alt[] = { 62496, 2343, 2343, 2343, 2343, 2343, 2343, 2343, 2343, 2051, 1432, 1372, 1323, 1280, 1246, 1216, 1188, 1163, 1142, 1121, 1101, 1084, 1068, 1051, 1036, 1020, 1007, 995, 983, 971, 959, 949, 938, 929, 917, 908, 900, 891, 882, 874, 866, 857, 849, 843, 835, 829, 821, 816, 808, 802, 795, 789, 784, 778, 773, 765, 760, 755, 749, 744, 739, 734, 731, 726, 721, 716, 711, 707, 702, 698, 693, 690, 685, 682, 677, 672, 669, 665, 662, 657, 654, 650, 647, 644, 639, 637, 632, 629, 626, 622, 619, 617, 614, 610, 607, 604, 601, 599, 595, 592, 589, 587, 584, 581, 579, 576, 572, 570, 567, 564, 562, 559, 557, 554, 552, 549, 547, 544, 542, 539, 538, 536, 533, 531, 529, 526, 524, 522, 519, 518, 516, 513, 511, 509, 506, 505, 503, 501, 498, 497, 495, 493, 491, 490, 487, 485, 483, 482, 480, 477, 476, 474, 472, 470, 469, 467, 465, 464, 462, 460, 458, 456, 455, 453, 451, 450, 448, 447, 445, 444, 442, 440, 439, 437, 436, 434, 433, 431, 430, 428, 427, 425, 423, 422, 420, 419, 417, 417, 415, 414, 413, 411, 410, 408, 407, 405, 404, 402, 401, 400, 399, 398, 396, 395, 393, 392, 391, 390, 389, 387, 386, 385, 383, 382, 381, 380, 379, 377, 376, 375, 374, 373, 371, 370, 369, 368, 367, 366, 364, 363, 363, 361, 360, 359, 358, 357, 356, 355, 353, 352, 352, 350, 349, 348, 347, 346, 345, 344, 343, 342, 341, 340, 339, 338, 335, 335, 0};
|
||||
|
||||
static uint32_t lide210_max[] = { 62496, 31296, 0};
|
||||
static uint32_t lide210_slow[] = { 62496, 7896, 0};
|
||||
static uint32_t lide210_fast[] = { 62496, 2343, 2343, 2343, 2343, 2343, 2343, 2343, 2343, 2051, 1432, 1372, 1323, 1280, 1246, 1216, 1188, 1163, 1142, 1121, 1101, 1084, 1068, 1051, 1036, 1020, 1007, 995, 983, 971, 959, 949, 938, 929, 917, 908, 900, 891, 882, 874, 866, 857, 849, 843, 835, 829, 821, 816, 808, 802, 795, 789, 784, 778, 773, 765, 760, 755, 749, 744, 739, 734, 731, 726, 721, 716, 711, 707, 702, 698, 693, 690, 685, 682, 677, 672, 669, 665, 662, 657, 654, 650, 647, 644, 639, 637, 632, 629, 626, 622, 619, 617, 614, 610, 607, 604, 601, 599, 595, 592, 589, 587, 584, 581, 579, 576, 572, 570, 567, 564, 562, 559, 557, 554, 552, 549, 547, 544, 542, 539, 538, 536, 533, 531, 529, 526, 524, 522, 519, 518, 516, 513, 511, 509, 506, 505, 503, 501, 498, 497, 495, 493, 491, 490, 487, 485, 483, 482, 480, 477, 476, 474, 472, 470, 469, 467, 465, 464, 462, 460, 458, 456, 455, 453, 451, 450, 448, 447, 445, 444, 442, 440, 439, 437, 436, 434, 433, 431, 430, 428, 427, 425, 423, 422, 420, 419, 417, 417, 415, 414, 413, 411, 410, 408, 407, 405, 404, 402, 401, 400, 399, 398, 396, 395, 393, 392, 391, 390, 389, 387, 386, 385, 383, 382, 381, 380, 379, 377, 376, 375, 374, 373, 371, 370, 369, 368, 367, 366, 364, 363, 363, 361, 360, 359, 358, 357, 356, 355, 353, 352, 352, 350, 349, 348, 347, 346, 345, 344, 343, 342, 341, 340, 339, 338, 335, 335, 0};
|
||||
|
@ -630,10 +640,10 @@ static uint32_t lide210_ok[] = { 62496, 2343, 2343, 2343, 2343, 2343, 2343, 23
|
|||
|
||||
/* NEXT LPERIOD=PREVIOUS*2-192 */
|
||||
static Motor_Profile motors[]={
|
||||
{MOTOR_CANONLIDE110, 5359, 0, lide110_alt},
|
||||
{MOTOR_CANONLIDE110, 5360, 1, lide110_alt},
|
||||
{MOTOR_CANONLIDE110, 10528, 1, lide110_slow},
|
||||
{MOTOR_CANONLIDE110, 20864, 2, lide110_max},
|
||||
{MOTOR_CANONLIDE110, 2768, 0, lide210_fast},
|
||||
{MOTOR_CANONLIDE110, 5360, 0, lide210_ok},
|
||||
{MOTOR_CANONLIDE110, 10528, 1, lide210_slow},
|
||||
{MOTOR_CANONLIDE110, 20864, 2, lide210_max},
|
||||
{MOTOR_CANONLIDE210, 2768, 0, lide210_fast},
|
||||
{MOTOR_CANONLIDE210, 5360, 0, lide210_ok},
|
||||
{MOTOR_CANONLIDE210, 10528, 1, lide210_slow},
|
||||
|
|
Ładowanie…
Reference in New Issue