8

I am currently trying to run 2 webcams on a Wandboard board, which have to share a USB hub. Problem is , the current driver implementation (YUV only) saturates the USB hub and in the end I can only connect one camera.

However the UVC driver implementation has a quirk for this kind of situation, and others.

Problem is, I did not find any documentation on how to load these quirks. Could you please assist me with that?

2 Answers 2

17

you can change the behaviour of many kernel-modules by passing some parameters.

you can get a list of all available module parameters with the modinfo command:

# modinfo uvcvideo

shows that there is a "quirks" parameters, which can be used. looking at the faq you posted, it seems that the quirks are really a bitfield, so if you want to enable multiple quirks, you have to add the numbers.

first unload the driver (obviously you must not use it when doing so):

 # rmmod uvcvideo

then re-load it with the quirks parameter. assuming you want to enable both UVC_QUIRK_FIX_BANDWIDTH (which has the hex-value 0x80, which is 128 in decimal) and UVC_QUIRK_RESTRICT_FRAME_RATE (which is 0x200 thus 512) you would use a quirks value of 640 (which is 128+512 resp. 0x200|0x80):

 # modprobe uvcvideo quirks=640
1
  • To get the current value: cat /sys/module/uvcvideo/parameters/quirks
    – Udi
    Nov 1, 2020 at 13:39
8

To make umläute's answer survive reboots, I created file /etc/modprobe.d/uvcvideo.conf with content

options uvcvideo quirks=0x80

To get the module to reload uvcvideo.conf, unload and load the module:

rmmod uvcvideo
modprobe uvcvideo

Interestingly, using echo to set quirks (i.e., while uvcvideo is loaded) did not work, even though the UVC driver FAQ uses echo to modify the trace parameter of uvcvideo.

Note: UVC_QUIRK_FIX_BANDWIDTH enabled many Microsoft LifeCam Cinema webcams per USB host controller in my case (on Ubuntu 14.04) for a machine vision application. The LifeCam Cinema reserves about 48% of USB 2.0 bandwidth (according to Device Manager on Windows), so without the quirk one can operate at most two LifeCams per host controller. (For several host controller chips, I was even limited to one LifeCam without the quirk.)

2
  • 3
    PS: the quirk is not operational for compressed formats (but the LifeCam, e.g., still reserves 48% of USB 2.0 bandwidth); this answer has a UVC driver hack to make the quirk also work for compressed formats. Have not tried the hack but code looked correct. :) Feb 12, 2016 at 19:33
  • For my Quelima at was quirks=2 as option. Work like a charm :)
    – suther
    Feb 7 at 14:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.