linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* iio buffer dmaengine
@ 2019-05-15 14:15 Paul Thomas
  2019-05-15 18:57 ` Lars-Peter Clausen
  0 siblings, 1 reply; 2+ messages in thread
From: Paul Thomas @ 2019-05-15 14:15 UTC (permalink / raw)
  To: linux-iio

Hello,

Currently I have a driver directly using a dmaengine channel and then
calling iio_push_to_buffers_with_timestamp() in the callback. I ran
accross the industrialiio-buffer-dmaengin.c implementation, and it
looks like this may be a better way to go. However, I had a few
questions.

First, am I correct that there are no current users of this interface
in the mainline kernel? I pulled the analog devices kernel and I see
users there, but the interface is a little bit different.

Second, it's not clear to me how or if multiple samples / dma transfer
and time stamping is supported.

thanks,
Paul

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: iio buffer dmaengine
  2019-05-15 14:15 iio buffer dmaengine Paul Thomas
@ 2019-05-15 18:57 ` Lars-Peter Clausen
  0 siblings, 0 replies; 2+ messages in thread
From: Lars-Peter Clausen @ 2019-05-15 18:57 UTC (permalink / raw)
  To: Paul Thomas, linux-iio

On 5/15/19 4:15 PM, Paul Thomas wrote:
> Hello,
> 
> Currently I have a driver directly using a dmaengine channel and then
> calling iio_push_to_buffers_with_timestamp() in the callback. I ran
> accross the industrialiio-buffer-dmaengin.c implementation, and it
> looks like this may be a better way to go. However, I had a few
> questions.
> 
> First, am I correct that there are no current users of this interface
> in the mainline kernel? I pulled the analog devices kernel and I see
> users there, but the interface is a little bit different.
> 
> Second, it's not clear to me how or if multiple samples / dma transfer
> and time stamping is supported.

If you are using the DMA based buffer it is not possible to have per
sample software timestamps. The idea behind the DMA support is that all
the data is supplied by the device and the kernel driver never has to
never even look at it. Inserting a timestamp for each sample would
negate all the benefits of DMA and provide not much improvement in terms
of performance over a non DMA setup.

If you have to insert timestamps by software and your update rate is low
enough your current implementation is probably the best approach.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-05-15 19:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-15 14:15 iio buffer dmaengine Paul Thomas
2019-05-15 18:57 ` Lars-Peter Clausen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).