Linux-IIO Archive on lore.kernel.org
 help / 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, back to index

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

Linux-IIO Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-iio/0 linux-iio/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-iio linux-iio/ https://lore.kernel.org/linux-iio \
		linux-iio@vger.kernel.org linux-iio@archiver.kernel.org
	public-inbox-index linux-iio


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-iio


AGPL code for this site: git clone https://public-inbox.org/ public-inbox