[sane-devel] Lexmark experimental backend

Fred Odendaal freshshelf at rogers.com
Sun May 21 01:41:13 UTC 2006


Stéphane,

When I tried the default maximum scan size at 150dpi I got blue streaks 
down the middle of the scan. Also, it had the wrong initial y position 
as it scanned the area off the glass and didn't scan to the maximum y 
coordinate. It also rewound to far.

When I tried smaller scans at 75 dpi, the colours were really wrong! The 
gain and offset registers are very different than the ones set by the 
Windows driver, so I assume something funny is happening in the 
calibration. When I took a quick look through the code a few questions 
came up:

 1.  In the sanei_lexmark_x1100_offset_calibration function there is a 
while loop that loops through the ranges while its not the null range 
and the average is more than the offset_threshold. However, I can't find 
where the offset_threshold is being set. Is 
dev->sensor->offset_threshold set anywhere?

2. In the function sanei_lexmark_x1100_calibration you set the registers 
like this:   
      dev->shadow_regs[0x02] = dev->offset.red;
      dev->shadow_regs[0x03] = dev->offset.red;
      dev->shadow_regs[0x04] = dev->offset.green;
      dev->shadow_regs[0x05] = dev->offset.green;
      dev->shadow_regs[0x06] = dev->offset.blue;
      dev->shadow_regs[0x07] = dev->offset.blue;

Are you sure this is correct? For my scanner the:
red offset is for shadow_regs[0x02] and shadow_regs[0x05]
green offset is for shadow_regs[0x03] and shadow_regs[0x06]
blue offset is for shadow_regs[0x04] and shadow_regs[0x07]

Fred.

Stéphane VOLTZ wrote:
> Le Vendredi 19 Mai 2006 05:11, Fred Odendaal a écrit :
>   
>> Stéphane,
>>
>> I tested it on my Lexmark X1185.
>>
>> It is broken really badly. It hangs in the function
>> sanei_lexmark_x1100_search_home_fwd - infinite read loop in a poll after
>> trying to move the scan head. I did a register compare from usb dumps of
>> a good scan (sane-backends-1.0.17) and a bad scan (experimental) and
>> none of the lexmark register defaults are set! There are 35 registers
>> that used to have non-zero default values and now have 0x00 and one
>> register that was 0x01 and is now 0x81.
>>
>> Fred
>>
>>     
>
> 	Hello,
>
> 	 after checking I only got register 0xC3 different. however while commiting 
> this change, I noticed that more files were updated than I'd expected. I 
> think I did my previous commit wrongly.
> 	Things should be much better now. But in case there are other problems I'd 
> like to have the logs. I can override model detection to make the regular 
> backend to think my A920 is a X1100, and so get registers values before the 
> chnages, but I won't be able to do it past 
> sanei_lexmark_x1100_search_home_bwd().
>
> Regards,
> 	Stef
>
>   

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.alioth.debian.org/pipermail/sane-devel/attachments/20060520/c8c97e34/attachment.htm


More information about the sane-devel mailing list