More digital cameras

Hidetoshi Shimokawa simokawa at sat.t.u-tokyo.ac.jp
Sun Jul 25 23:24:05 PDT 2004


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 at sat.t.u-tokyo.ac.jp
PGP public key: http://www.sat.t.u-tokyo.ac.jp/~simokawa/pgp.html


More information about the freebsd-firewire mailing list