Hangs with B&W QuickCam

Andrew Kuchling (amk@magnet.com)
Fri, 11 Jul 1997 14:50:46 -0400 (EDT)

Using my own code, I've found that it's not always possible to do two
scans in a row with a B&W QuickCam. In debugging mode, the second
scan hangs after outputting:

[qcam] qc_lock_wait: acquiring lock for 0x378
[qcam] qc_lock_wait: got lock for 0x378

This is the call to qc_lock() in sane_start(). xcam and xscanimage
also hang, but it gets farther; see the debug output below. It looks
like the camera gets into a wedged state somehow. Opening and closing
the device for every scan doesn't help the problem, but doing
sane_init() and sane_exit() around each scan does; everything works
fine if you do that.

Presumably colour QuickCams don't do this, or someone would
have noticed it. Before I try to track down the problem, could
someone else with a B&W QuickCam try running xcam or xscanimage, and
see if they get the hang too? Perhaps my setup is broken somehow...

Thanks in advance!

Andrew Kuchling
amk@magnet.com
http://people.magnet.com/%7Eamk/

[qcam] qc_lock_wait: acquiring lock for 0x378
[qcam] qc_lock_wait: got lock for 0x378
[qcam] now holding the lock
[qcam] qc_send: sent 0x11, camera echoed 0xff
[qcam] qc_send: (re-read does not help)
[qcam] qc_send: sent 0xf6, camera echoed 0xff
[qcam] qc_send: (re-read does not help)
[qcam] qc_send: sent 0x13, camera echoed 0xff
[qcam] qc_send: (re-read does not help)
[qcam] qc_send: sent 0x53, camera echoed 0xff
[qcam] qc_send: (re-read does not help)
[qcam] sane_start: top=0, left=5, white=150, bright=135, contr=104
[qcam] qc_send: sent 0x0f, camera echoed 0xff
[qcam] qc_send: (re-read does not help)
[qcam] qc_send: sent 0x05, camera echoed 0xff
[qcam] qc_send: (re-read does not help)
[qcam] qc_send: sent 0x0d, camera echoed 0xff
[qcam] qc_send: (re-read does not help)
[qcam] qc_send: sent 0x01, camera echoed 0xff
[qcam] qc_send: (re-read does not help)
[qcam] qc_send: (re-read does not help)
[qcam] start: unidir 246 lines of 330 pixels each (81180 bytes) => 330x246
[qcam] scanmode (before increment): 0x2
[qcam] reader_process: got request for 81180 bytes
[qcam] qc_send: sent 0x07, camera echoed 0xff
[qcam] qc_send: (re-read does not help)
[qcam] qc_send: sent 0x02, camera echoed 0xff
[qcam] qc_send: (re-read does not help)

--
Source code, list archive, and docs: http://www.azstarnet.com/~axplinux/sane/
To unsubscribe: mail -s unsubscribe sane-devel-request@listserv.azstarnet.com