mmap'd streaming acquisition

Hi,

I'm trying to get memory-mapped streaming AI-acquisition working on my
NI PCI-MIO-16e board. I'm using the ni_pcimio.o driver on a RH7.2 linux
box.

The "cmd" example program, demonstrating asynchronous acquisition using
the read() function works fine. However the "mmap" example doesn't. As
far as I can see the function comedi_get_buffer_offset() always returns
0 - hence the loop hangs. 

However, if I insert an extra read() function into the loop (e.g.
read(comedi_fileno(dev),DummyBuffer,512)), the program seems to work and
comedi_get_buffer_offset() returns the correct buffer offset.

Can anyone suggest how to get comedi_get_buffer_offset() working without
the read() call? I've tried disabling DMA in ni_pcimio.c with no change.
I've also tried inserting comedi_poll() calls with no effect.
 
any suggestions would be much appreciated.
cheers,

Bryan

Received on 2002-08-05Z15:35:33