Re: IIO: Why cannot open two iio device node file descriptors simultaneously ?

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

 



On Mon, Aug 4, 2014 at 12:48 PM, Lars-Peter Clausen <lars@xxxxxxxxxx> wrote:
> On 08/03/2014 11:32 AM, Aniroop Mathur wrote:
>>
>> On Sun, Aug 3, 2014 at 1:41 PM, Lars-Peter Clausen <lars@xxxxxxxxxx>
>> wrote:
>>>
>>> On 08/02/2014 06:57 PM, Jonathan Cameron wrote:
>>> [...]
>>>
>>>>> So, even after opening iio device node,
>>>>> can we write the data to IIO device node from user space ?
>>>>> (I do not see write function in below fileops)
>>>>
>>>>
>>>>
>>>> Indeed.  Lars was working on some buffered support for DACs but hasn't
>>>> yet submitted it for mainline inclusion.  Lars how is the buffered
>>>> output
>>>> stuff coming along?
>>>
>>>
>>>
>>> I still need to do the re-write you wanted me to do, otherwise its
>>> working
>>> fine ;)
>>>
>>
>> Great :)
>> So, it is possible to write data to iio fd ?
>
>
> No you can't. At least not with the upstream code. What exactly is it that
> you want to do with this?
>

Okay :)
Actually, I am working on IIO device simulator android application.
This simulator will record the sensor data first and then replay it again.
For recording, we can read the data from iio device node and store it some file.
And for replay, we need to write the recorded data back to iio device node.
But as you said, from hal/application we cannot write the data to iio
device node
and therefore i am stuck how to replay back the recorded data.

In normal input device node, we can both read and write data,
so simulator is working fine for this case.
I was hoping to do the same with IIO device node.

Is there any scope this facility will be included in future for IIO ? :)

Also, few days back I posted this query on Linuxquestions.org.
http://www.linuxquestions.org/questions/linux-general-1/iio-why-cannot-open-same-iio-device-node-twice-4175512869/

I think now this thread could be marked as solved.
Title - IIO: Why cannot open same iio device node twice ?

May be if it is okay, please help to put the answer upon the link above.

>From my side,
Below is the answer i am able to derive from above discussion:

"Basically IIO is a different design for the userspace interfaces.
IIO mainly deals with much faster devices so overhead of description of data
has been removed to avoid overhead in kernel.

An alternate solution would be to use a input client driver for IIO,
which can uses an iio device as the source of it's data.
That way we end up with all the normal input interfaces.

Ultimately if we want multiple user applications to share a datastream,
then it makes sense to avoid multiple switches in and out of the kernel
and do it in userspace instead."

Is the answer okay ?

> - Lars
--
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