Re: [PATCH] zoran: more fixes
Trent Piepho <[email protected]>
| Newsgroups | gmane.comp.video.mjpeg.devel |
|---|---|
| Message-ID | <[email protected]> |
On Wed, 6 Jun 2007, Jean Delvare wrote: > On Tue, 5 Jun 2007 21:20:22 -0700 (PDT), Trent Piepho wrote: > > On Sat, 2 Jun 2007, Ronald Bultje wrote: > > > On 6/2/07, Trent Piepho <[email protected]> wrote: > > > > After capture stops, the FrabGrab flag is stuck at 1 (capture pending). > > > > Writing a zero to it doesn't reset it, I tried that. So this warning will > > > > print every time capture stops/starts. > > > > > > Is that a hardware bug then? Please add a comment that FrameGrab used to be > > > there and that it's always 1, then I'm OK with it > > > > Ok, I'll add some sort of comment. > > > > From the datasheet, it seems like the expected operation. The FrameGrab > > bit is listed as "RS" not "RW", so I take that to mean one should only > > expect to be able to Read and Set the bit, but not clear it to zero. > > > > When FrameGrab is set to 1, it triggers the zr36067 to start a capture, and > > the zr36067 chip will clear FrameGrab to zero when the capture is done. If > > you turn off a pending capture before it finishes, no capture is completed > > to trigger clearing FrameGrab, so it just stays at one. > > > > The bug in the driver that this patch fixes (besides the extra warning), is > > that one must _write_ a one to FrameGrab to trigger a capture, even if > > FrameGrab is already one because of the previous pending capture that was > > aborted. If you don't write a one after turning back back on, the chip > > won't acutally start capturing frames. > > Wouldn't it be cleaner to let the capture finish so that the hardware > sets FrameGrab to 0? When an app calls STREAMOFF, do they want streaming to stop now, or after one more frame is captured? Probably now is better. That would complicate stopping capture somewhat too, you would have to sleep on the capq waiting for a frame to finish in the STREAMOFF ioctl. If the signal is no good or absent, a frame will never be captured, so you have to time out and then you're back to having FrameGrab==1 when capture has been stopped. ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/