linuxv4l2uvc

How do I enable the UVC_QUIRK_FIX_BANDWIDTH quirk in Linux UVC Driver?


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?


Solution

  • 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