kernel patch for CX23103 Video Grabber Linux Support

I recently bought a “LogiLink USB2.0 Video Grabber with Snap Shot” – Model VG0005B v.1.0 – (EAN 4052792002102)

When I bought it I did not realize, that it is officially not supported in Linux (also see http://www.linuxtv.org/wiki/index.php/SilverCrest_USB_2.0_Video_Grabber_SVG_2.0_A2) – because I missed some part of the product name when searching for support.

Kernel fun

After spending the whole day trying to recompile a new kernel, stumbling over various oddities, it finally worked.
capture

I don’t know how such drivers can be published, but the nvidia drivers at first would not compile, stating that my 3.0.x kernel is not compatible (only 2.6 an newer are supported, you know). The reason in pseudo code: if [ major -lt 2 -o minor -lt 6 ]; … yes, thats an OR in the middle and yes, the 0 in 3.0 is smaller than 6.

Also all the version magic included in modules is p.i.t.a. when you try to compile one module for a destirbution kernel – so I recompiled the whole kernel and modules because although my module had been built fine, it failed to load the video grabber module because the version magic did not match.

Getting it to work

My idea was, that there are not many reference designs out there for this chip and that the manufacturer hopefully does not reinvent the wheel in his chips either. And it seems I was right.

What is needed for this to work is a 2 line patch to the cx231xx driver to tell it that the chip is supported and what configuration to use:

So in drivers/media/video/cx231xx/cx231xx-cards.c go to struct usb_device_id cx231xx_id_table[] and add these two lines e.g. at the beginning of the definition:

        {USB_DEVICE(0x1D19, 0x6109),
         .driver_info = CX231XX_BOARD_PV_XCAPTURE_USB},

Here the lucky part is, that the LogiLink people use the exact same design thats used by the board mentioned above. Caveat: I have not tested the audio part.

And yes, I will now try to get that upstream and included into the kernel.

Update: capturing audio crashed my systen…

Posted in en, freude, hardware, Linux, Uncategorized

Archiv