kopia lustrzana https://gitlab.com/sane-project/backends
genesys: Implement a way to override DPISET on GL124 and GL843
rodzic
db15a75504
commit
a76a2a096e
|
@ -1005,8 +1005,13 @@ static void gl124_init_optical_regs_scan(Genesys_Device* dev, const Genesys_Sens
|
|||
r->value |= REG05_GMMENB;
|
||||
}
|
||||
|
||||
reg->set16(REG_DPISET, dpiset * ccd_size_divisor);
|
||||
DBG (DBG_io2, "%s: dpiset used=%d\n", __func__, dpiset * ccd_size_divisor);
|
||||
unsigned dpiset_reg = dpiset * ccd_size_divisor;
|
||||
if (sensor.dpiset_override != 0) {
|
||||
dpiset_reg = sensor.dpiset_override;
|
||||
}
|
||||
|
||||
reg->set16(REG_DPISET, dpiset_reg);
|
||||
DBG (DBG_io2, "%s: dpiset used=%d\n", __func__, dpiset_reg);
|
||||
|
||||
r = sanei_genesys_get_address (reg, REG06);
|
||||
r->value |= REG06_GAIN4;
|
||||
|
|
|
@ -1145,6 +1145,10 @@ static void gl843_init_optical_regs_scan(Genesys_Device* dev, const Genesys_Sens
|
|||
|
||||
unsigned dpiset = session.output_resolution * session.ccd_size_divisor *
|
||||
ccd_pixels_per_system_pixel;
|
||||
|
||||
if (sensor.dpiset_override != 0) {
|
||||
dpiset = sensor.dpiset_override;
|
||||
}
|
||||
reg->set16(REG_DPISET, dpiset);
|
||||
DBG(DBG_io2, "%s: dpiset used=%d\n", __func__, dpiset);
|
||||
|
||||
|
|
|
@ -162,9 +162,14 @@ struct Genesys_Sensor {
|
|||
// the scan method used with the sensor
|
||||
ScanMethod method = ScanMethod::FLATBED;
|
||||
|
||||
// The scanner may be setup to use a constant dpihw. If non-zero, the overridden dpihw is set
|
||||
// The scanner may be setup to use a custom dpihw that does not correspond to any actual
|
||||
// resolution. The value zero does not set the override.
|
||||
unsigned dpihw_override = 0;
|
||||
|
||||
// The scanner may be setup to use a custom dpiset value that does not correspond to any actual
|
||||
// resolution. The value zero does not set the override.
|
||||
unsigned dpiset_override = 0;
|
||||
|
||||
// CCD may present itself as half or quarter-size CCD on certain resolutions
|
||||
int ccd_size_divisor = 1;
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue