kopia lustrzana https://gitlab.com/sane-project/backends
genesys: Remove sensor setting duplication on gl646
rodzic
1938bcfbeb
commit
a3ad02c8bf
|
@ -637,15 +637,9 @@ void scanner_setup_sensor(Genesys_Device& dev, const Genesys_Sensor& sensor,
|
|||
{
|
||||
DBG_HELPER(dbg);
|
||||
|
||||
if (dev.model->asic_type == AsicType::GL646) {
|
||||
for (const auto& custom_reg : sensor.custom_base_regs) {
|
||||
regs.set8(custom_reg.address, custom_reg.value);
|
||||
}
|
||||
} else {
|
||||
for (const auto& custom_reg : sensor.custom_regs) {
|
||||
regs.set8(custom_reg.address, custom_reg.value);
|
||||
}
|
||||
}
|
||||
|
||||
if (dev.model->asic_type != AsicType::GL841 &&
|
||||
dev.model->asic_type != AsicType::GL843)
|
||||
|
|
|
@ -143,7 +143,6 @@ std::ostream& operator<<(std::ostream& out, const Genesys_Sensor& sensor)
|
|||
<< format_indent_braced_list(4, format_vector_unsigned(4, sensor.segment_order)) << '\n'
|
||||
<< " stagger_config: " << format_indent_braced_list(4, sensor.stagger_config) << '\n'
|
||||
<< " use_host_side_calib: " << sensor.use_host_side_calib << '\n'
|
||||
<< " custom_base_regs: " << format_indent_braced_list(4, sensor.custom_base_regs) << '\n'
|
||||
<< " custom_regs: " << format_indent_braced_list(4, sensor.custom_regs) << '\n'
|
||||
<< " custom_fe_regs: " << format_indent_braced_list(4, sensor.custom_fe_regs) << '\n'
|
||||
<< " gamma.red: " << sensor.gamma[0] << '\n'
|
||||
|
|
|
@ -325,7 +325,6 @@ struct Genesys_Sensor {
|
|||
// True if calibration should be performed on host-side
|
||||
bool use_host_side_calib = false;
|
||||
|
||||
GenesysRegisterSettingSet custom_base_regs; // gl646-specific
|
||||
GenesysRegisterSettingSet custom_regs;
|
||||
GenesysRegisterSettingSet custom_fe_regs;
|
||||
|
||||
|
@ -381,7 +380,6 @@ struct Genesys_Sensor {
|
|||
segment_order == other.segment_order &&
|
||||
stagger_config == other.stagger_config &&
|
||||
use_host_side_calib == other.use_host_side_calib &&
|
||||
custom_base_regs == other.custom_base_regs &&
|
||||
custom_regs == other.custom_regs &&
|
||||
custom_fe_regs == other.custom_fe_regs &&
|
||||
gamma == other.gamma;
|
||||
|
@ -419,8 +417,6 @@ void serialize(Stream& str, Genesys_Sensor& x)
|
|||
serialize_newline(str);
|
||||
serialize(str, x.use_host_side_calib);
|
||||
serialize_newline(str);
|
||||
serialize(str, x.custom_base_regs);
|
||||
serialize_newline(str);
|
||||
serialize(str, x.custom_regs);
|
||||
serialize_newline(str);
|
||||
serialize(str, x.custom_fe_regs);
|
||||
|
|
|
@ -232,14 +232,6 @@ void genesys_init_sensor_tables()
|
|||
sensor.gain_white_ref = 190;
|
||||
sensor.exposure = { 0x0000, 0x0000, 0x0000 };
|
||||
sensor.stagger_config = StaggerConfig{ 1200, 4 }; // FIXME: may be incorrect
|
||||
sensor.custom_base_regs = {
|
||||
{ 0x08, 0x0d }, { 0x09, 0x0f }, { 0x0a, 0x11 }, { 0x0b, 0x13 },
|
||||
{ 0x16, 0x0b }, { 0x17, 0x0a }, { 0x18, 0x30 }, { 0x19, 0x2a },
|
||||
{ 0x1a, 0x00 }, { 0x1b, 0x00 }, { 0x1c, 0x00 }, { 0x1d, 0x03 },
|
||||
{ 0x52, 0x0f }, { 0x53, 0x13 }, { 0x54, 0x17 }, { 0x55, 0x03 },
|
||||
{ 0x56, 0x07 }, { 0x57, 0x0b }, { 0x58, 0x23 }, { 0x59, 0x00 }, { 0x5a, 0xc1 },
|
||||
{ 0x5b, 0x00 }, { 0x5c, 0x00 }, { 0x5d, 0x00 }, { 0x5e, 0x00 },
|
||||
};
|
||||
sensor.gamma = { 2.38f, 2.35f, 2.34f };
|
||||
sensor.get_ccd_size_divisor_fun = get_ccd_size_divisor_exact;
|
||||
|
||||
|
@ -361,14 +353,6 @@ void genesys_init_sensor_tables()
|
|||
sensor.gain_white_ref = 200;
|
||||
sensor.exposure = { 0x0000, 0x0000, 0x0000 };
|
||||
sensor.stagger_config = StaggerConfig{1200, 4}; // FIXME: may be incorrect
|
||||
sensor.custom_base_regs = {
|
||||
{ 0x08, 0x14 }, { 0x09, 0x15 }, { 0x0a, 0x00 }, { 0x0b, 0x00 },
|
||||
{ 0x16, 0xbf }, { 0x17, 0x08 }, { 0x18, 0x3f }, { 0x19, 0x2a },
|
||||
{ 0x1a, 0x00 }, { 0x1b, 0x00 }, { 0x1c, 0x00 }, { 0x1d, 0x02 },
|
||||
{ 0x52, 0x0b }, { 0x53, 0x0f }, { 0x54, 0x13 }, { 0x55, 0x17 },
|
||||
{ 0x56, 0x03 }, { 0x57, 0x07 }, { 0x58, 0x63 }, { 0x59, 0x00 }, { 0x5a, 0xc1 },
|
||||
{ 0x5b, 0x00 }, { 0x5c, 0x0e }, { 0x5d, 0x00 }, { 0x5e, 0x00 },
|
||||
};
|
||||
sensor.gamma = { 2.1f, 2.1f, 2.1f };
|
||||
sensor.get_ccd_size_divisor_fun = get_ccd_size_divisor_exact;
|
||||
|
||||
|
@ -461,14 +445,6 @@ void genesys_init_sensor_tables()
|
|||
sensor.fau_gain_white_ref = 180;
|
||||
sensor.gain_white_ref = 180;
|
||||
sensor.exposure = { 0x0000, 0x0000, 0x0000 };
|
||||
sensor.custom_base_regs = {
|
||||
{ 0x08, 0x16 }, { 0x09, 0x00 }, { 0x0a, 0x01 }, { 0x0b, 0x03 },
|
||||
{ 0x16, 0xb7 }, { 0x17, 0x0a }, { 0x18, 0x20 }, { 0x19, 0x2a },
|
||||
{ 0x1a, 0x6a }, { 0x1b, 0x8a }, { 0x1c, 0x00 }, { 0x1d, 0x05 },
|
||||
{ 0x52, 0x0f }, { 0x53, 0x13 }, { 0x54, 0x17 }, { 0x55, 0x03 },
|
||||
{ 0x56, 0x07 }, { 0x57, 0x0b }, { 0x58, 0x83 }, { 0x59, 0x00 }, { 0x5a, 0xc1 },
|
||||
{ 0x5b, 0x06 }, { 0x5c, 0x0b }, { 0x5d, 0x10 }, { 0x5e, 0x16 },
|
||||
};
|
||||
sensor.gamma = { 2.1f, 2.1f, 2.1f };
|
||||
sensor.get_ccd_size_divisor_fun = get_ccd_size_divisor_exact;
|
||||
|
||||
|
@ -592,14 +568,6 @@ void genesys_init_sensor_tables()
|
|||
sensor.fau_gain_white_ref = 200;
|
||||
sensor.gain_white_ref = 200;
|
||||
sensor.exposure = { 0x1450, 0x0c80, 0x0a28 };
|
||||
sensor.custom_base_regs = {
|
||||
{ 0x08, 0x16 }, { 0x09, 0x00 }, { 0x0a, 0x01 }, { 0x0b, 0x03 },
|
||||
{ 0x16, 0xb7 }, { 0x17, 0x0a }, { 0x18, 0x20 }, { 0x19, 0x2a },
|
||||
{ 0x1a, 0x6a }, { 0x1b, 0x8a }, { 0x1c, 0x00 }, { 0x1d, 0x05 },
|
||||
{ 0x52, 0x0f }, { 0x53, 0x13 }, { 0x54, 0x17 }, { 0x55, 0x03 },
|
||||
{ 0x56, 0x07 }, { 0x57, 0x0b }, { 0x58, 0x83 }, { 0x59, 0x00 }, { 0x5a, 0xc1 },
|
||||
{ 0x5b, 0x06 }, { 0x5c, 0x0b }, { 0x5d, 0x10 }, { 0x5e, 0x16 },
|
||||
};
|
||||
sensor.custom_regs = {
|
||||
{ 0x08, 0x06 }, { 0x09, 0x07 }, { 0x0a, 0x0a }, { 0x0b, 0x04 },
|
||||
{ 0x16, 0x24 }, { 0x17, 0x04 }, { 0x18, 0x00 }, { 0x19, 0x2a },
|
||||
|
@ -655,14 +623,6 @@ void genesys_init_sensor_tables()
|
|||
sensor.gain_white_ref = 200;
|
||||
sensor.exposure = { 0, 0, 0 };
|
||||
sensor.stagger_config = StaggerConfig{1200, 4}; // FIXME: may be incorrect
|
||||
sensor.custom_base_regs = {
|
||||
{ 0x08, 0x00 }, { 0x09, 0x0a }, { 0x0a, 0x0b }, { 0x0b, 0x0d },
|
||||
{ 0x16, 0x33 }, { 0x17, 0x07 }, { 0x18, 0x20 }, { 0x19, 0x2a },
|
||||
{ 0x1a, 0x00 }, { 0x1b, 0x00 }, { 0x1c, 0xc0 }, { 0x1d, 0x43 },
|
||||
{ 0x52, 0x0f }, { 0x53, 0x13 }, { 0x54, 0x17 }, { 0x55, 0x03 },
|
||||
{ 0x56, 0x07 }, { 0x57, 0x0b }, { 0x58, 0x83 }, { 0x59, 0x00 }, { 0x5a, 0x15 },
|
||||
{ 0x5b, 0x05 }, { 0x5c, 0x0a }, { 0x5d, 0x0f }, { 0x5e, 0x00 },
|
||||
};
|
||||
sensor.gamma = { 1.0f, 1.0f, 1.0f };
|
||||
sensor.get_ccd_size_divisor_fun = get_ccd_size_divisor_exact;
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue