- From: Frank Mori Hess <fmhess_at_users.sourceforge.net>
- Date: Sun, 23 Nov 2003 15:35:44 -0500
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Thursday 20 November 2003 04:24 pm, Alan Chen wrote: > My goal is to achieve streaming analog in with minimal latency. Right > now I achieve this with a non-blocking read() and if no data was read > then call a comedi_poll() to flush the card's buffer and read again. > This process is encapsulated in a loop. The problem is comedi_poll() > doesn't work with DMA enabled and I must wait until the FIFO (is it a > hardware or a software FIFO?) is filled. This results in a large chunk > of data being sent at once, and at a low sampling rate the latency > becomes quite high. I can use the stated method without DMA, but the > cpu usage rockets to 100% and the computer can't keep up with high > sampling rates. So my question is, "can does DMA work with > comedi_poll(), or is there another way of streaming with comedi?" Support needs to be added to the driver (that is, the ni_ai_poll() function in ni_mio_common needs to be completed). I believe the hardware is capable of what you want though. The setting of the AI_Mode_3_Register might need to be changed to generate dma requests on fifo-not-empty. Have you tried just setting the TRIG_WAKE_EOS flag? - -- Frank -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE/wRog5vihyNWuA4URApIkAKC0G1l2JV3G2BnmkLpGCoLlQpKynACgmCY6 Xxbc8R+18pAYnaYbMtcIruU= =vfUW -----END PGP SIGNATURE-----
Received on 2003-11-23Z20:35:44