Re: Adding new protocol to linux.

2016-03-28 Thread Manoj Nayak
Hi Daniel,

Some of the Network application use two connections. One connection for
control channel to send commands and status update. Other connection is
used for real data transfer. For example: FTP. However this needs two
socket.

TCP talks about out-of-band data transfer using Urgent Pointer flag and
Urgent pointer offset in the tcp header. However the data transfer uses the
same connection.

Regards
Manoj Nayak
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: SWSUSP for arm

2016-03-28 Thread Greg KH
On Mon, Mar 28, 2016 at 09:51:40PM +0530, Ranjith T wrote:
> Hi All,
> 
> I have to port software suspend for IMX6 Dual lite board to reduce boot time.
> But I really don't know how to do that. Could somebody assist me?.

That sounds like a work assignment, do we get paid to do this?  :)

Also, why do you think it will reduce boot time?

> Note: I have arm-none-linux-gnueabi toolcain, linux kernel version 3.14, NAND
> Flash can be used to store suspended image

3.14 is very old and obsolete, please get support from the company that
is forcing you to stick with this kernel version, as you are paying them
for this.

good luck!

greg k-h

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: Adding new protocol to linux.

2016-03-28 Thread Daniel.
Hey everybody, I see that sockets, protocols and network device
drivers are pieces of a same puzzle. So after some digging and
thinking I'm considering write the driver in such way that it only
deals with data link layer, no socket bits. It should sit at 2nd OSI
layer and let routing and segmenting for the other layers. This way
everything that works with TCP/UDP/IP should work with our little
radio transciver. The one million dollars question remains, how do
this with only 32bytes MTU and as a bonus, how to spread the
communications of several nodes throughout all available channels so
that I have less collisions as possible. The first idea that I have
was using some connection based protocol where, when someone wants to
transfers some N bytes of data, the source makes a request to
destination which choses one avaible channel to be used for the
transfers. The data is transferred through the selected channel and
the connection is closed. The comunication used to open some
"connection" would be done on a "control channel" which should be used
as few as possible, while the realdata is transmitted on *some of*
"data channels". What you guys think?

I'll keep working (as much as my sparse time allows me) to get this up
and running then I think at details, if someone has interest here is
the (not yet finished) code: https://github.com/gkos/nrf24l01p

Cheers

2016-03-28 17:08 GMT-03:00 Rami Rosen :
> Hi,
> Header files under include/net are for kernel internal use.
> Header files under include/uapi are for exposure to userspace:
> http://lxr.free-electrons.com/source/include/uapi/
>
> Regards,
> Rami Rosen
> http://ramirose.wix.com/ramirosen
>
> בתאריך 28 במרץ 2016 18:04, "Manoj Nayak"  כתב:
>>
>> > 1) Is it possible to write a new protocol for linux with an out of
>> > tree module without modifing socket.h file?
>>
>> I think this has been already tried in the following code.
>>
>> http://lxr.free-electrons.com/source/include/net/bluetooth/bluetooth.h#L36
>>
>> http://lxr.free-electrons.com/source/include/linux/socket.h#L239
>>
>> The challenge is to expose this development specific header file to
>> userspace.
>> The following document talks about that.
>>
>> http://kernelnewbies.org/KernelHeaders
>>
>> Regards
>> Manoj Nayak
>>
>>
>> ___
>> Kernelnewbies mailing list
>> Kernelnewbies@kernelnewbies.org
>> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>>
>
> ___
> Kernelnewbies mailing list
> Kernelnewbies@kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>



-- 
"Do or do not. There is no try"
  Yoda Master

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: Adding new protocol to linux.

2016-03-28 Thread Rami Rosen
Hi,
Header files under include/net are for kernel internal use.
Header files under include/uapi are for exposure to userspace:
http://lxr.free-electrons.com/source/include/uapi/

Regards,
Rami Rosen
http://ramirose.wix.com/ramirosen
בתאריך 28 במרץ 2016 18:04, "Manoj Nayak"  כתב:

> > 1) Is it possible to write a new protocol for linux with an out of
> > tree module without modifing socket.h file?
>
> I think this has been already tried in the following code.
>
> http://lxr.free-electrons.com/source/include/net/bluetooth/bluetooth.h#L36
>
> http://lxr.free-electrons.com/source/include/linux/socket.h#L239
>
> The challenge is to expose this development specific header file to
> userspace.
> The following document talks about that.
>
> http://kernelnewbies.org/KernelHeaders
>
> Regards
> Manoj Nayak
>
>
> ___
> Kernelnewbies mailing list
> Kernelnewbies@kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>
>
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: Real-time audio over local network with good quality

2016-03-28 Thread Ricardo Biehl
2016-03-28 4:42 GMT-03:00 Henrik Austad :
> On Sun, Mar 27, 2016 at 9:18 PM, Ricardo Biehl  wrote:
>> Hello guys!
>
> Hi Ricardo,
>
>> Sorry if this question is not part of the scope of this list.
>>
>> I'm developing a real-time microphone system that will work over local
>> network using ALSA library and sockets API with IP (UDP/TCP support)
>> .
>
> This looks like pure userspace, and going up to the level above, this
> list is probably not the best place for it.

Thank you, I'll avoid to write messages like this.

>
>> The purpose is to make a good replacement to traditional microphone
>> systems (wired or wireless).
>> The problem is that I found difficulties in network control and in
>> ALSA library too :-) .
>
> Yes, I know :)

:-)

>
>> Basically I need help to select the best network scheduler algorithm,
>> set the right parameters, and (in audio) create a PCM plug which
>> supports (1 channel * 16 bit sample * 22050 Hz) and BLOCKING opening
>> mode. All this without quality loss and real-time.
>
> Theres a lot of details you gloss over here, that will eventually have
> to be solved
>
> 1) how do you handle signalling (mic goes way, new one appears)
> 2) what kind of equipment do you support? (one computer for each mic
> gives you expensive mics)
> 3) signal (time)correlation, you need some timestamping to the samples
> to if you are going to combine local feedback
> 4) Consistent alsa config across all endpoints

These factors are really important, I'm going to thinking about!

1 -> In my current state I do not have signal handling yet.
1 -> Equipment is a detail which I'm very concerned, I thought
smartphones is a good transmitter. :-) .
3 -> I think timestamping could be ignored right now in my current branch!?
4 -> ALSA conf files are one of the most important parts, because they
are necessary to convert rate etc.

>
> What you need is network hardware, both in the NIC and in the network
> infrastructure that can properly prioritize your streams and provide
> accurate timestamps.

It's ok.

>
> Have you looked at similar projects, like AES67 and TSN/AVB?
>
> AES67 is a best-effort approach, TSN requires support in the network
> to prioritize the streams. Go and have a gander at OpenAVB  [1]
>
>> Any contribution with the project is welcome!
>
> There may be something in the works that will be shipped out for RFC
> soon (see [2])
>

I haven't looked it yet, thanks!

Thank you for reply!
Big hug!

>
> 1) https://github.com/AVnu/Open-AVB
> 2) http://mailman.alsa-project.org/pipermail/alsa-devel/2014-May/077087.html
>
> --
> Henrik Austad



-- 
Ricardo Biehl Pasquali

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: Real-time audio over local network with good quality

2016-03-28 Thread Ricardo Biehl
2016-03-27 23:27 GMT-03:00 Rohit Vashist :
> Hello Ricardo,
>
> Hope you are good.
> I would suggest you post the query on alsa dev list(mail forum) for more
> specific reply on your queries on ALSA driver.

Ok, thanks :-)
I'll do it!

> Also,i kind of like the idea.Are you looking for some assistance on your
> project would love to contribute.

Cool!
As I've told, anyone is welcomed to contribute in the project,
provided that it respects the original purpose and the KISS philosophy.

>
> I am working in an MNC in Audio Driver Domain for last 7 years.

Wow!

>
> https://www.linkedin.com/profile/preview?locale=en_US=prof-0-sb-preview-primary-button

^ this link didn't open :-(

Cheers and thank you for reply!

>
> On Mon, Mar 28, 2016 at 12:48 AM, Ricardo Biehl 
> wrote:
>>
>> Hello guys!
>>
>> Sorry if this question is not part of the scope of this list.
>>
>> I'm developing a real-time microphone system that will work over local
>> network using ALSA library and sockets API with IP (UDP/TCP support)
>> .
>> The purpose is to make a good replacement to traditional microphone
>> systems (wired or wireless).
>> The problem is that I found difficulties in network control and in
>> ALSA library too :-) .
>> Basically I need help to select the best network scheduler algorithm,
>> set the right parameters, and (in audio) create a PCM plug which
>> supports (1 channel * 16 bit sample * 22050 Hz) and BLOCKING opening
>> mode. All this without quality loss and real-time.
>>
>> Any contribution with the project is welcome!
>>
>> Thank you!
>>
>> --
>> Ricardo Biehl Pasquali
>>
>> ___
>> Kernelnewbies mailing list
>> Kernelnewbies@kernelnewbies.org
>> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>
>
>
>
> --
> Regards,
> Rohit Vashist
>
>

-- 
Ricardo Biehl Pasquali

2016-03-27 23:27 GMT-03:00 Rohit Vashist :
> Hello Ricardo,
>
> Hope you are good.
> I would suggest you post the query on alsa dev list(mail forum) for more
> specific reply on your queries on ALSA driver.
> Also,i kind of like the idea.Are you looking for some assistance on your
> project would love to contribute.
>
> I am working in an MNC in Audio Driver Domain for last 7 years.
>
> https://www.linkedin.com/profile/preview?locale=en_US=prof-0-sb-preview-primary-button
>
> On Mon, Mar 28, 2016 at 12:48 AM, Ricardo Biehl 
> wrote:
>>
>> Hello guys!
>>
>> Sorry if this question is not part of the scope of this list.
>>
>> I'm developing a real-time microphone system that will work over local
>> network using ALSA library and sockets API with IP (UDP/TCP support)
>> .
>> The purpose is to make a good replacement to traditional microphone
>> systems (wired or wireless).
>> The problem is that I found difficulties in network control and in
>> ALSA library too :-) .
>> Basically I need help to select the best network scheduler algorithm,
>> set the right parameters, and (in audio) create a PCM plug which
>> supports (1 channel * 16 bit sample * 22050 Hz) and BLOCKING opening
>> mode. All this without quality loss and real-time.
>>
>> Any contribution with the project is welcome!
>>
>> Thank you!
>>
>> --
>> Ricardo Biehl Pasquali
>>
>> ___
>> Kernelnewbies mailing list
>> Kernelnewbies@kernelnewbies.org
>> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>
>
>
>
> --
> Regards,
> Rohit Vashist
>
>



-- 
Ricardo Biehl Pasquali

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


RE: SWSUSP for arm

2016-03-28 Thread Ranjith T
Hi All,

I have to port software suspend for IMX6 Dual lite board to reduce boot
time. But I really don't know how to do that. Could somebody assist me?.

Note: I have arm-none-linux-gnueabi toolcain, linux kernel version 3.14,
NAND Flash can be used to store suspended image

Thanks,
Ranjith.T,
Software Engineer.
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: Adding new protocol to linux.

2016-03-28 Thread Manoj Nayak
> 1) Is it possible to write a new protocol for linux with an out of
> tree module without modifing socket.h file?

I think this has been already tried in the following code.

http://lxr.free-electrons.com/source/include/net/bluetooth/bluetooth.h#L36

http://lxr.free-electrons.com/source/include/linux/socket.h#L239

The challenge is to expose this development specific header file to
userspace.
The following document talks about that.

http://kernelnewbies.org/KernelHeaders

Regards
Manoj Nayak
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: unregister_input_polled_device() leads to null pointer deref

2016-03-28 Thread Okash Khawaja


> On 28 Mar 2016, at 14:55, Carlo Caione  wrote:
> 
>> On Mon, Mar 28, 2016 at 3:32 PM, Okash Khawaja  
>> wrote:
>> Hi,
>> 
>> I'm writing a i2c device driver. In probe(), among other things I call:
>> 
>> polled_input = input_allocate_polled_device();
>> input_register_polled_device(polled_input);
>> 
>> Then inside remove(), I extract the instance of input_polled_dev and
>> call
>> 
>> input_unregister_polled_device(polled_input);
>> 
>> This results in kernel error:
>> 
>> "Unable to handle kernel NULL pointer dereference at virtual address
>> 0474".
>> 
>> It turns out that the input_dev pointer inside input_polled_dev is null
>> which leads to this error. But why is input_dev pointer null? It is not
>> null inside probe() function and I don't release it anywhere.
>> 
>> This is code: http://pastebin.com/JJdepyEG and here is link to the output,
>> along with my log statements: http://pastebin.com/badwSvyy.
> 
> input_free_polled_device(polled_input) is always called in your probe 
> function.

Of course! Thanks very much 

> 
> 
> -- 
> Carlo Caione

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: Adding new protocol to linux

2016-03-28 Thread Manoj Nayak
> 2) Could netlink socket be used to solve this? .. and

Netlink is used to transfer information between kernel and user-space
processes.  It consists of a standard sockets-based interface for
user space processes and an internal kernel API for kernel modules.
netlink socket does not call dev_queue_xmit().

But here the requirement is to transfer the packet using Nordic's nRF24L01+.

AF_PACKET is used to output a raw packet from userspace to a device layer.
Even AF_PACKET does that using proto_ops and net_proto_family.

Regards
Manoj Nayak
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: unregister_input_polled_device() leads to null pointer deref

2016-03-28 Thread Carlo Caione
On Mon, Mar 28, 2016 at 3:32 PM, Okash Khawaja  wrote:
> Hi,
>
> I'm writing a i2c device driver. In probe(), among other things I call:
>
> polled_input = input_allocate_polled_device();
> input_register_polled_device(polled_input);
>
> Then inside remove(), I extract the instance of input_polled_dev and
> call
>
> input_unregister_polled_device(polled_input);
>
> This results in kernel error:
>
> "Unable to handle kernel NULL pointer dereference at virtual address
> 0474".
>
> It turns out that the input_dev pointer inside input_polled_dev is null
> which leads to this error. But why is input_dev pointer null? It is not
> null inside probe() function and I don't release it anywhere.
>
> This is code: http://pastebin.com/JJdepyEG and here is link to the output,
> along with my log statements: http://pastebin.com/badwSvyy.
>

input_free_polled_device(polled_input) is always called in your probe function.


-- 
Carlo Caione

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


unregister_input_polled_device() leads to null pointer deref

2016-03-28 Thread Okash Khawaja
Hi,

I'm writing a i2c device driver. In probe(), among other things I call:

polled_input = input_allocate_polled_device();
input_register_polled_device(polled_input);

Then inside remove(), I extract the instance of input_polled_dev and
call 

input_unregister_polled_device(polled_input);

This results in kernel error:

"Unable to handle kernel NULL pointer dereference at virtual address
0474". 

It turns out that the input_dev pointer inside input_polled_dev is null
which leads to this error. But why is input_dev pointer null? It is not
null inside probe() function and I don't release it anywhere.

This is code: http://pastebin.com/JJdepyEG and here is link to the output,
along with my log statements: http://pastebin.com/badwSvyy. 

Thanks,
Okash

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: Real-time audio over local network with good quality

2016-03-28 Thread Henrik Austad
On Sun, Mar 27, 2016 at 9:18 PM, Ricardo Biehl  wrote:
> Hello guys!

Hi Ricardo,

> Sorry if this question is not part of the scope of this list.
>
> I'm developing a real-time microphone system that will work over local
> network using ALSA library and sockets API with IP (UDP/TCP support)
> .

This looks like pure userspace, and going up to the level above, this
list is probably not the best place for it.

> The purpose is to make a good replacement to traditional microphone
> systems (wired or wireless).
> The problem is that I found difficulties in network control and in
> ALSA library too :-) .

Yes, I know :)

> Basically I need help to select the best network scheduler algorithm,
> set the right parameters, and (in audio) create a PCM plug which
> supports (1 channel * 16 bit sample * 22050 Hz) and BLOCKING opening
> mode. All this without quality loss and real-time.

Theres a lot of details you gloss over here, that will eventually have
to be solved

1) how do you handle signalling (mic goes way, new one appears)
2) what kind of equipment do you support? (one computer for each mic
gives you expensive mics)
3) signal (time)correlation, you need some timestamping to the samples
to if you are going to combine local feedback
4) Consistent alsa config across all endpoints

What you need is network hardware, both in the NIC and in the network
infrastructure that can properly prioritize your streams and provide
accurate timestamps.

Have you looked at similar projects, like AES67 and TSN/AVB?

AES67 is a best-effort approach, TSN requires support in the network
to prioritize the streams. Go and have a gander at OpenAVB  [1]

> Any contribution with the project is welcome!

There may be something in the works that will be shipped out for RFC
soon (see [2])


1) https://github.com/AVnu/Open-AVB
2) http://mailman.alsa-project.org/pipermail/alsa-devel/2014-May/077087.html

-- 
Henrik Austad

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies