Webcam woes

Bas Huisman bhuism@cs.utwente.nl
Wed, 18 Aug 1999 12:25:16 +0200


Peter Pregler wrote:
> 
> On 17-Aug-99 Peter Pregler wrote:
> >
> > One more question, the CPU-utilization is quite high for me. It consumes
> > about 70% cpu in _kernel_ mode. I do the test on a PII at 350MHz. So
> > this worries me a bit. Do you have any idea where this could come from? I
> > see no busy wait in the code.
> 
> Sometimes people are just blind. :) The WHILE_OUT-macro is just a big busy
> wait. So my question is: was this intentional? In any case I will
> implement a timer-version just to see how it performs.

I first made it much nicer (with things like schedule()) but when It all
didn't work I began ditching al code which was different from the dos code,
and at one time, my wait had to go and the UGLY macro came.

> Oh yeah, and the interrupt stuff is not that easy. Do you have a
> documentation pointer where I can see when an interrupt is generated. Or
> am I blind again?

took me some time to find it in the doc's but it's there:

in the "vision cpia datasheet" (cpia_datasheet4.pdf) it's stated
at page 30

under "Notes on Image Stream transfers":

---
"CPiA produces a low going pulse, of approximately 200 µ s, on the nAck line
when image stream data is
available to upload. If the host driver can use this pulse to trigger a
parallel port interrupt service
routine to start the the image transfer process."
---

that's why in my source in interface_pp_low.c in Negotiate2Setup() I remarked
the line in the paranoid check for nAck is high ... (it's there!) this check
failed occasionally signalling a ready new image.

Cheers,

Bas
-- 
                          .eeree$$              eee
                       .d$"   e$"                z$$
                      J$" .  $$"                 $$%
                      $$  4 $$F                 $$P
                      $$..P$$P  .ePb...  z$$$. J$$ ..
                       """d$$  $$" $$$ .$$ $$%.$$d $$
                         4$$".$$P 4$$ .$$%   .$$$e$"  
                         $$$P $$ .$$%z"$$   e3$$ $$$.
                   ..e="$$$   "$$"*$@  "$$d".$$  *$$"
                 e$P   .$$
                 $$   .$$    bhuism@cs.utwente.nl
                 *$. z$"
-----------------------------------------------------------------------------
To unsubscribe from this mailinglist, send the line "unsubscribe vision-webcam" in the
body of a message to "majordomo@errors.no".