Kernel hacking: ov51x-jpeg module with 2 webcams

来源:互联网 发布:sql server 2005 iis 编辑:程序博客网 时间:2024/05/21 10:03

墙外文章,贴来慢慢看

原文地址:

http://awesomegeekblog.blogspot.tw/2009/04/kernel-hacking-ov51x-jpeg-module-with-2.html

This is par­tially a note-to-self, and pretty es­o­teric. If you don't get what I'm talk­ing about, don't worry. This prob­a­bly doesn't apply to you. 

I have sent this fix to the mod­ule cre­ator, but until a so­lu­tion be­comes avail­able in the ac­tual mod­ule, I'm shar­ing the in­for­ma­tion here.

The fol­low­ing changes are made en­tirely at your own peril. I take ab­solutely no re­spon­si­bil­ity for what­ever doom it may bring upon your com­puter. It may cause your com­puter to go up in flames, your girl­friend to cheat on you and hor­ri­bly dis­fig­ur­ing and ag­o­niz­ing dis­eases to be in­flicted upon you. Don't say I didn't warn you.

I have had prob­lems with get­ting the ov51x-jpeg ker­nel mod­ule to ac­cept mul­ti­ple we­b­cams with my OV519 cam­eras. I'm quite sim­ply run­ning out of USB band­width. Now the mod­ule has built in func­tion­al­ity to han­dle this: You mod­probe with the ar­gu­ment "cams=2". This did not work for me. I was still using too much band­width. 

If you make the fol­low­ing al­ter­ation to ov51x-jpeg-1.5.9. 

File: ov51x-jpeg-core.c
5435 case BRG_OV519:
5436 if (cams == 1) size = 896;
5437 else if (cams == 2) size = 512;
5438 else {

is changed into
5435 case BRG_OV519:
5436 if (cams == 1) size = 896;
5437 else if (cams == 2) size = 512;
5438 else if (cams == 3) size = 384;
5439 else {


Un­load the ov51x-jpeg mod­ule. Re­com­pile the mod­ule sources. Load with

modprobe ov51x-jpeg cams=3

... and it works. At least for me.  

原创粉丝点击