Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 26 Jul 2004 15:25:47 +0900
From:      Hidetoshi Shimokawa <simokawa@sat.t.u-tokyo.ac.jp>
To:        Buzz Slye <buzz@gaia.arc.nasa.gov>
Cc:        freebsd-firewire@freebsd.org
Subject:   Re: More digital cameras
Message-ID:  <87oem3mgic.wl@tora.nunu.org>
In-Reply-To: <Pine.GSO.4.61.0407231112010.24645@tioga.arc.nasa.gov>
References:  <Pine.GSO.4.61.0407231112010.24645@tioga.arc.nasa.gov>

next in thread | previous in thread | raw e-mail | index | archive | help
At Fri, 23 Jul 2004 11:15:06 -0700 (PDT),
Buzz Slye wrote:
> 
> Camera registers are set with asynchronous commands to set onboard registers
> (i.e., setting the gain, shutter, and image size. etc.). Camera operation
> is started by setting a bit in the iso_enable register to start iso
> transmission.  Camera operation is described in the "1394-based Digital
> Camera Specification".  Some cameras support continuous iso transmission
> or may be run in one shot mode.
> 
> After the fix to uiomove in fw_read, (fwdev.c line 334):
>      err = uiomove((caddr_t)fp, sizeof(struct fw_isohdr), uio);
>      err = uiomove((caddr_t)xfer->recv.payload, xfer->recv.pay_len, uio);
> I get:
>    fwohci0: IR DMA overrun (0x40008051) --- but not always after every frame.
> Is this really an error on should I just delete the message ?

IR DMA overrun means that you have run out input buffer.
It may be because of small input buffer or interrupt latency.

> The call from fw_read with the fix is for (xfer != NULL).  I thought this
> was for non bulkxfer, so how do we get to the message "overrun" by a call
> to fwohci_irx_enable  which is from (ir->stproc != NULL) ?
> Should there be a call to fwohci_irx_enable from (xfer != NULL) ?
> 
> Just what is an overrun anyway ?

I can not figure out what happens without code you use.
For example, 'fwcontrol -R' uses bulkxfer to prevent buffer overrun
by reducing interrupt and processing packets efficiently.

As far as I remember, iso stream is received only by bulkxfer
and (xfer != NULL) case is called when you have a binding of
some address region. (you need some bindings to receive a
async. response from the camera, right?)

> We have been lately trying to use 5.2 (June) but that worked badly for us.
> But have fallen back to 5.2 (May) but still have problems.
> We are using a buffer of 1 chunk and a packet size of 4k, since we
> have a new camera of spec 1.30 with a packet size up to 4k.  We can also
> run the new camera on the old system of one year ago if we set the camera
> packet size to 2k.
> 
> Is poll broken, it just times out ?

I think you need larger chunk and packet size to avoid overrun.
FreeBSD-5.X has worse interrupt latency than FreeBSD-4.

> Buzz Slye
> NASA/Ames

Our kernel to userland interface is very poor. I tend think to that
we should impelement linux compatible interface.
(a.k.a. /dev/raw1394)

/\ Hidetoshi Shimokawa
\/  simokawa@sat.t.u-tokyo.ac.jp
PGP public key: http://www.sat.t.u-tokyo.ac.jp/~simokawa/pgp.html



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?87oem3mgic.wl>