Re: iio channel sync

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Greetings,

On 08/30/2016 09:26 AM, Jonathan Cameron wrote:
>
> On 30 August 2016 08:41:18 BST, Matt Ranostay <mranostay@xxxxxxxxx> wrote:
>> On Mon, Aug 29, 2016 at 10:03 AM, Joshua Clayton
>> <stillcompiling@xxxxxxxxx> wrote:
>>> Jonathan,
>>>
>>> I have an out-of tree driver I am working on mainlining.
>>>
>>> The device is a sensor that gets phase and amplitude (x and y) data
>>>
>>> on multiple physical and/or time multiplexed channels.
>>>
>>> It also has up to 4 optical encoders to get physical location.
>>>
>>> The existing driver bundles x and y together with a snapshot
>>>
>>> of the encoder sums at that moment.
>>>
>>>
>>> This seems like a good fit for iio, but one item is bothering me.
>>>
>>> How is synchronization between streams usually handled with
>>>
>>> iio drivers? Timing can be important.
>> Wouldn't the trigger buffer framework be good enough for this?
> Perhaps you could describe your usecase a little more?
>
> Is the interesting bit that you want to sync streams with different sampling frequencies?
> Are those encoders better represented by a separate driver? (In which case I have some thoughts on simple additions to IIO trigger handling that might help - basically a hold off on triggers until all relevant devices are attached)
Thanks for responding.

The encoders (often a pair of them, could be up to 4) represent the position
of the sensor in relation to an object to be tested. (linear movement or
rotation around an axis).
The Maximum sample rate of the encoders is much higher than the sensor,
but they are moved by a motor or by hand, so the actual sample rate is
variable and may be higher or lower that the sensor sample rate.

The encoders are sometimes used as a trigger for data collection, but
the encoders are also used as positional data alongside the sensor data.

The way we get around this now is to bundle a snapshot of the encoder
with the sensor data and discard it later if the encoder hasn't changed and
the trigger function is enabled.
--
To unsubscribe from this list: send the line "unsubscribe linux-iio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux