Friday, April 17, 2009

Kernel hacking: ov51x-jpeg module with 2 webcams

This is partially a note-to-self, and pretty esoteric. If you don't get what I'm talking about, don't worry. This probably doesn't apply to you.

I have sent this fix to the module creator, but until a solution becomes available in the actual module, I'm sharing the information here.

The following changes are made entirely at your own peril. I take absolutely no responsibility for whatever doom it may bring upon your computer. It may cause your computer to go up in flames, your girlfriend to cheat on you and horribly disfiguring and agonizing diseases to be inflicted upon you. Don't say I didn't warn you.

I have had problems with getting the ov51x-jpeg kernel module to accept multiple webcams with my OV519 cameras. I'm quite simply running out of USB bandwidth. Now the module has built in functionality to handle this: You modprobe with the argument "cams=2". This did not work for me. I was still using too much bandwidth.

If you make the following alteration 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 {


Unload the ov51x-jpeg module. Recompile the module sources. Load with

modprobe ov51x-jpeg cams=3

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

1 comment:

  1. it looks like programming, i guess. seems something really very difficult.

    ReplyDelete