Re: [PATCH] zoran: more fixes

Trent Piepho <[email protected]>
Newsgroups gmane.comp.video.mjpeg.devel
Message-ID <[email protected]>
On Sat, 2 Jun 2007, Ronald Bultje wrote:
> On 6/2/07, Trent Piepho <[email protected]> wrote:
> >
> > On Sat, 2 Jun 2007, Ronald Bultje wrote:
> > > On 6/1/07, Trent Piepho <[email protected]> wrote:
> > > > I figured out what was keeping tvtime from being able to switch
> > > > inputs.  It
> > > > was a problem with restarting capture after stopping it like I
> > thought.
> > > > The fix ended up being simple, but finding what exactly was the
> > problem
> > > > was
> > > > a pain.
> > >
> > >
> > > -             if (btread(ZR36057_VSSFGR) &
> > > -                 (ZR36057_VSSFGR_SnapShot | ZR36057_VSSFGR_FrameGrab))
> > > +             if (btread(ZR36057_VSSFGR) & ZR36057_VSSFGR_SnapShot)
> > >                       dprintk(1,
> > >                               KERN_WARNING
> > > -                             "%s: zr36057_set_memgrab(1) with SnapShot
> > or FrameGrab on!?\n",
> > > +                             "%s: zr36057_set_memgrab(1) with SnapShot
> > on!?\n",
> > >                               ZR_DEVNAME(zr));
> > >
> > >
> > > Why? The rest is fine, but I don't see why this was changed.
> >
> > 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.

-------------------------------------------------------------------------
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/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.