- From: Dan Christian <dchristian_at_mail.arc.nasa.gov>
- Date: Mon, 15 Jul 2002 09:24:29 -0700
On Tuesday 09 July 2002 12:04, David Schleef wrote: > pcidas-4020 uses DMA, correct? Then it should be allocating chunks > using comedi_buf_write_alloc(), DMAing to them, and then freeing > them using comedi_buf_write_free(). This will get all the > bookkeeping correct and also be zero-copy. I haven't implemented > this correctly yet on any driver. I'm just starting to look at DMA support, and this confuses me. Does this assume that the total transfer is smaller than the buffer size? It seems like you can only do a zero copy transfer if no conversion operations are needed. In my case, any channels with bipolar ADC inputs have to have 2048 added to them before they can be put in the buffer. I was planning to: allocate two transfer buffers (each buffer is 1/2 FIFO in length) lock them in physical memory setup a continuous, two buffer DMA transfer interrupt after each transfer convert to comedi samples within the transfer buffer pass the data to comedi (using comedi_buf_put_array?) Is this the right approach? Is there a way to do this without the transfer buffers? -Dan Christian
Received on 2002-07-15Z15:24:29