diff --git a/ChangeLog b/ChangeLog index dc2f96a06..08efd2985 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,6 @@ +2008-06-09 Stéphane Voltz + * backend/rts8891.c: fix for model with 'XPA' sensor + 2008-06-06 Julien Blache * backend/net.c: lock the Avahi thread before stopping it and tearing down the Avahi objects. @@ -39,7 +42,7 @@ 2008-05-26 Stéphane Voltz * backend/sane_strstatus.c: added new status and internationalization support - * frontend/scanimage.c, tstbackend.c: added handling of status + * frontend/scanimage.c, frontend/tstbackend.c: added handling of status SANE_STATUS_WARMING_UP * backend/pnm.c: added 2 more virtual devices, one that is hardware locked, and another that always do warming before scan. diff --git a/backend/rts8891.c b/backend/rts8891.c index e2452ff52..9e39b6b02 100644 --- a/backend/rts8891.c +++ b/backend/rts8891.c @@ -818,14 +818,7 @@ set_option_value (Rts8891_Session * s, int option, void *val, /* sanity checks */ for (i = 0; i < (int) (s->opt[option].size / sizeof (SANE_Word)); i++) { - if (((SANE_Int *) val)[i] < 0 || ((SANE_Int *) val)[i] > 255) - { - DBG (2, - "sane_control_option: gamma value (%d) at index %d out of range\n", - ((SANE_Int *) val)[i], i); - return SANE_STATUS_INVAL; - } - /* avoid aa values since they will be problematic */ + /* avoid 0xaa values since they will be problematic */ if (((SANE_Int *) val)[i] == 0xaa) ((SANE_Int *) val)[i] = 0xab; } @@ -5626,7 +5619,14 @@ write_scan_registers (struct Rts8891_Session *session) dev->blue_gain); status1 = 0x20; - status2 = 0x3b; + if (dev->sensor == SENSOR_TYPE_XPA) + { + status2 = 0x3f; + } + else + { + status2 = 0x3b; + } /* default to 75 dpi color scan */ dev->regs[0x0b] = 0x70;