I just committed your patch to the git tree, before I'll forget it. Cheers, Rolf
Am 08.11.2013 22:38, schrieb Rolf Bensch: > Am 06.11.2013 02:50, schrieb human2013odd at icebubble.org: >> Rolf Bensch <rolf at bensch-online.de> writes: >> >>> Please check scanner's raw data with this patch: >> <snip /> >> >> With that patch applied, the raw data exhibits the same color shifting. >> See attached PNM. >> > Please check color shifting for all resolutions. By now the scanners > don't need any color shifting @ 75dpi. It seems that your scanner needs > different color shift handling. > >>> There is a well known bug for ADF scans. If you like I can send you some >>> test code so that we can fix this issue. I have no ADF scanner to test >>> this by myself. >> Sure, I'd be happy to test it. >> > I attached patch files for pixma.c and for pixma_mp150.c. > > The problem seems to be inside pixma.c or pixma_common.c. Pixma backend > uses two independent processes for scanner control: > (1) send scan parameters and start / stop around reader_loop() in > pixma.c and pixma_common.c which call functions in pixma_mp150.c. > (2) read image data using sane_read() in pixma.c. > > Until last summer pthread support was disabled by default. This avoided > data exchange between both processes. Now we have 2 threads which can > use e.g. the struct ss for data exchange. > > You can see functional behaviour with enabled debug messages: 'export > SANE_DEBUG_PIXMA=4'. You can use macro PDBG (pixma_dbg (4, ...)) to add > additional debug info. > > After the last page the scanner is programmed to scan an empty page and > detect paper empty. > > At the first page the scanner is initialised with start_session(s) and > after the last page the scanner is closed with abort_session(s), both in > pixma_mp150.c. Between scanning single pages the scanner stays idle. You > can find all scanner related functions in pixma_mp150.c. > > An interesting value is the no. of scanned ADF pages which is controlled > with the parameters sp->adf_pageid or s->param->adf_pageid and > ss->page_count. > >>> Your scanner should also button controlled. Please test this patch: >> <snip /> >> >> With that patch applied, the button status is correctly reflected by >> "scanimage -A", and the buttons can be used in --button-controlled=yes >> mode. However, button control is buggy: >> >> 1. If you press Gray to cancel, scanimage exits as expected, but the >> scanner sits there (waiting for something) and can't be used. After >> about 30 seconds, it times out, and the scanner can be used again. >> >> 2. If you press one of the buttons before scanimage has a chance to >> poll button status, the scanner does the same thing (just wait). >> After the scanner times out and comes back to reality, a subsequent >> button press is received and processed by scanimage correctly. >> > Please check if you can see any differences in the USB protocols in both > cases. You can enable debug output for USB protocols with 'export > SANE_DEBUG_PIXMA=11'. > > I'm using scanbd for button controlled scanning. I attached my config files. > > Cheers, > Rolf