Re: continuous DMA broken (ni_mio_common: buffer overflow) in comedi-cvs

On Sun, Oct 20, 2002 at 10:41:56AM +0200, Tomasz Motylewski wrote:
> OK, but even if I do not use the hack with substituting my buffers and use
> comedi_mmap() and then I do not call comedi_get_buf_head_pos() and
> comedi_set_user_int_count() for the time longer than the length of the
> buffer, it will overflow?

Yes.  It might be a bit difficult to cleanly integrate a method to
turn this off.

> Why I can not just set up the transfer and then peek into the buffer from
> time to time when(if) I wish?

Because you're the only person to ever ask for this.

> When the DMA ring is circular there is no
> need for any interrupts at all. I know you will say "register the callback
> and just do there comedi_set_user_int_count()", but these are precious
> microseconds!

It is possible, and quite reasonable, to access the buffer from a
periodic task that is not tied to the board acquisition rate.  This
is the method I would suggest, if you want to decrease latency as
much as possible.  Of course, you have to deal with the fact that
you might not always get the same number of samples per period.
Also, the ni_pcimio driver would need a better implementation for
ni_ai_poll().



dave...

Received on 2002-10-21Z07:21:38