linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Lars-Peter Clausen <lars@metafoo.de>
To: Paul Thomas <pthomas8589@gmail.com>, linux-iio@vger.kernel.org
Subject: Re: iio buffer dmaengine
Date: Wed, 15 May 2019 20:57:26 +0200	[thread overview]
Message-ID: <dfafbc0e-5fdd-16e4-35d1-7b4375394674@metafoo.de> (raw)
In-Reply-To: <CAD56B7eKeaobf5xES8PFLSKvMHvpe2t52-w-rnVnRJpBX7bh8Q@mail.gmail.com>

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.

      reply	other threads:[~2019-05-15 19:25 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-15 14:15 iio buffer dmaengine Paul Thomas
2019-05-15 18:57 ` Lars-Peter Clausen [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=dfafbc0e-5fdd-16e4-35d1-7b4375394674@metafoo.de \
    --to=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=pthomas8589@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).