LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (http://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   Why Linux kernel has restrictions on USB port and USB cameras? (http://www.linuxquestions.org/questions/linux-hardware-18/why-linux-kernel-has-restrictions-on-usb-port-and-usb-cameras-903210/)

Dstruct0 09-15-2011 12:47 PM

Why Linux kernel has restrictions on USB port and USB cameras?
 
I love Linux and in fact all the computers that i own has Linux on it. But why
kernel authors put restrictions on the data transfer rate using USB port?

Is this true at all? I'm sayin' this because all the 6 cameras(ps3eye) that I have can be used
320x240@60fps on win7 at the same time in all cameras but on Debian Squeeze it won't
go over 20frames/sec.

I asked a Linux guru who himself hacked the kernel to get 30fps.

Also I've tested my cameras with two different applications.


Is there any way to counter this restriction? Any easy way to bypass this problem?

MS3FGX 09-15-2011 02:18 PM

I would really doubt it's some kind of intentional limitation in the kernel; more likely just an area where the drivers could be improved upon.

jefro 09-15-2011 03:38 PM

When you see that guru ask him where in the kernel code is this limit so I can edit it also.

Skaperen 09-15-2011 04:29 PM

I suspect a possibility that the manufacturer has special or secret knowledge about how the camera works, and knows a way to modify the transfers or buffering to enhance things. For example, the camera may be operating in a "safe mode" where it only sends one buffer at a time, and waits for acknowledgment before sending the next. This mode can limit the transfer rates. With that knowledge, the manufacturer can write a driver that knows how to change the transfer or buffering mode to allow multiple buffers concurrently. They would still be transferred over the USB bus one at a time, but this could make it work efficiently with each buffer sending just as soon as the previous is sent, rather than waiting for the OS to acknowledge the previous buffer.

And they only make that driver for Windows.

When things get up into high end speeds, tricks like this are often needed. I know they do stuff like that with 10 Gbit ethernet cards and high end RAID controllers. But that is at PCIe bus speeds. USB is effectively a bus, too, but a much lower speed than PCIe. And the limitations may exist in the camera chips, where the tricks are often cheaper than getting a chip that can run at 4 times the clock speed.

But I really don't know if the above is so for your case or not. Maybe you can ask the manufacturer what is going on.

Dstruct0 09-17-2011 08:30 PM

Thank you Skaperen for clearing this matter.


So I had wrong idea about this. I really want to transport the same driver used in Windows 7(64bit) to Linux to help the community. Where do I start? What tools do I need?

I am a self taught programmer and have knowledge in C, C++ and Linux assembly programming(asm). What knowledge do I need for this task?


Thanks everyone for your response. I learned a lot by opening this thread.

Skaperen 09-19-2011 04:14 PM

Quote:

Originally Posted by Dstruct0 (Post 4474827)
Thank you Skaperen for clearing this matter.


So I had wrong idea about this. I really want to transport the same driver used in Windows 7(64bit) to Linux to help the community. Where do I start? What tools do I need?

I am a self taught programmer and have knowledge in C, C++ and Linux assembly programming(asm). What knowledge do I need for this task?


Thanks everyone for your response. I learned a lot by opening this thread.

Porting Windows drivers in binary over to Linux is not something I know about. Sorry, I can't help you in that area. If you could get manufacturer information, maybe you could write a better native driver.


All times are GMT -5. The time now is 11:00 AM.