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.