Hauppauge USBLive2 and new HVR-850 support

If you happen to own one of the newer Hauppauge USBLive2 video grabbers, or the newest version of the Hauppauge HVR-850, you can find support for it here:

http://kernellabs.com/hg/~dheitmueller/polaris4/

It’s not completely cleaned up yet, but both devices are working.

Thanks go out to Conexant for making available a base Linux driver, and to Hauppauge for sample hardware and sponsoring device support and a bunch of the cleanup work required to get the changes into the mainline kernel.

Tester feedback welcome, as always.

132 thoughts on “Hauppauge USBLive2 and new HVR-850 support

  1. Hi Devin,

    I recently purchased a cx231xx based HVR-850 and am trying to get it working under 2.6.39.3. However, when loading the cx231xx_dvb driver I get “DVB: Unable to find symbol lgdt3305_attach()” and “cx231xx: Failed to attach LG3305 front end” errors, and no devices show up in /dev/dvb. I do have the lgdt330x module installed, and I’ve made sure that it was loaded before loading the cx231xx_dvb module. Any ideas what’s going wrong?

    [ 102.407937] Linux video capture interface: v2.00
    [ 102.437973] cx231xx v4l2 driver loaded.
    [ 102.438028] cx231xx #0: New device Hauppauge Hauppauge Device @ 480 Mbps (204
    0:b140) with 6 interfaces
    [ 102.438030] cx231xx #0: registering interface 1
    [ 102.438135] cx231xx #0: Identified as Hauppauge EXETER (card=8)
    [ 102.560006] cx231xx #0: cx231xx_dif_set_standard: setStandard to ffffffff
    [ 102.573011] cx25840 1-0044: cx23102 A/V decoder found @ 0x88 (cx231xx #0)
    [ 102.591038] cx25840 1-0044: Firmware download size changed to 16 bytes max l
    ength
    [ 104.524002] cx25840 1-0044: loaded v4l-cx231xx-avcore-01.fw firmware (16382 b
    ytes)
    [ 104.562095] i2c-core: driver [tuner] using legacy suspend method
    [ 104.562098] i2c-core: driver [tuner] using legacy resume method
    [ 104.582999] Chip ID is not zero. It is not a TEA5767
    [ 104.583072] tuner 2-0060: Tuner -1 found with type(s) Radio TV.
    [ 104.592645] tda18271 2-0060: creating new instance
    [ 104.594749] TDA18271HD/C2 detected @ 2-0060
    [ 104.771623] tda18271: performing RF tracking filter calibration
    [ 106.226994] tda18271: RF tracking filter calibration complete
    [ 106.258495] cx231xx #0: cx231xx #0: v4l2 driver version 0.0.1
    [ 106.270744] cx231xx #0: cx231xx_dif_set_standard: setStandard to b000
    [ 106.339119] cx231xx #0: video_mux : 0
    [ 106.339121] cx231xx #0: do_mode_ctrl_overrides : 0xb000
    [ 106.339868] cx231xx #0: do_mode_ctrl_overrides NTSC
    [ 106.346446] cx231xx #0: cx231xx #0/0: registered device video0 [v4l2]
    [ 106.346479] cx231xx #0: cx231xx #0/0: registered device vbi0
    [ 106.346482] cx231xx #0: V4L2 device registered as video0 and vbi0
    [ 106.346485] cx231xx #0: EndPoint Addr 0x84, Alternate settings: 5
    [ 106.346487] cx231xx #0: Alternate setting 0, max size= 512
    [ 106.346490] cx231xx #0: Alternate setting 1, max size= 184
    [ 106.346492] cx231xx #0: Alternate setting 2, max size= 728
    [ 106.346494] cx231xx #0: Alternate setting 3, max size= 2892
    [ 106.346497] cx231xx #0: Alternate setting 4, max size= 1800
    [ 106.346499] cx231xx #0: EndPoint Addr 0x85, Alternate settings: 2
    [ 106.346502] cx231xx #0: Alternate setting 0, max size= 512
    [ 106.346504] cx231xx #0: Alternate setting 1, max size= 512
    [ 106.346506] cx231xx #0: EndPoint Addr 0x86, Alternate settings: 2
    [ 106.346509] cx231xx #0: Alternate setting 0, max size= 512
    [ 106.346511] cx231xx #0: Alternate setting 1, max size= 576
    [ 106.346513] cx231xx #0: EndPoint Addr 0x81, Alternate settings: 6
    [ 106.346516] cx231xx #0: Alternate setting 0, max size= 512
    [ 106.346518] cx231xx #0: Alternate setting 1, max size= 64
    [ 106.346520] cx231xx #0: Alternate setting 2, max size= 128
    [ 106.346523] cx231xx #0: Alternate setting 3, max size= 316
    [ 106.346525] cx231xx #0: Alternate setting 4, max size= 712
    [ 106.346527] cx231xx #0: Alternate setting 5, max size= 1424
    [ 106.346618] usbcore: registered new interface driver cx231xx
    [ 106.382118] dvb_init: looking for tuner / demod on i2c bus: 2
    [ 106.383290] DVB: Unable to find symbol lgdt3305_attach()
    [ 106.383293] cx231xx: Failed to attach LG3305 front end
    [ 106.383496] cx231xx: Cx231xx dvb Extension initialized
    [ 106.383504] cx231xx #0: setPowerMode::mode = 32, No Change req.
    [ 106.383530] cx231xx #0: cx231xx-audio.c: probing for cx231xx non standard usb
    audio
    [ 106.383894] cx231xx #0: EndPoint Addr 0x83, Alternate settings: 3
    [ 106.383896] cx231xx #0: Alternate setting 0, max size= 512
    [ 106.383899] cx231xx #0: Alternate setting 1, max size= 28
    [ 106.383901] cx231xx #0: Alternate setting 2, max size= 52
    [ 106.383903] cx231xx: Cx231xx Audio Extension initialized

    • Devin Heitmueller

      Hello Jimbo,

      You need the lgdt3305 module, not the lgdt330x (which is for lgdt3302/3303).

      Generally speaking, if you’ve never built LinuxTV drivers before, the safer approach is to build all of them (don’t try to cherry pick which drivers you *think* you need). Then if you want to optimize the process, you can remove unneeded modules.

      Cheers,

      Devin

  2. Hi Devin,

    First congratulations for the good work you’re putting on these drivers!

    I am looking for a USB DVB-T dongle I can use with my Beagle Board (ARM Cortex-8), and I was wondering if Haupauge 850 would work.

    I’m using 2.6.38, and au0828 is in the kernel source.

    Is there any limitation I should be aware of with drivers on ARM?

    Thanks in advance,
    Reda

    • Devin Heitmueller

      Hi Reda,

      First off, it’s important to note that the HVR-850 is an ATSC/ClearQAM tuner. So if you are not in the United States, that product will not work for you. Also, there are various versions of the HVR-850 with different chipsets, so you should plug it into a regular PC and make sure that it actually is the au0828 version before trying to compile a custom kernel just containing that driver (on a stock LInux kernel, you will see the au0828 driver load when the device is plugged in).

      Regarding ARM, I have seen ARM related bugs in the past, but they are pretty rare. Usually these devices work on ARM with no need to change the drivers. That said, if you do experience problems you should report them to the linux-media mailing list (after trying the same scenario on a regular PC to confirm it actually is an ARM issue and not some form of operator error).

      Devin

      • Hi Devin,
        Thank you for your fast response.

        on the ARM target (BB XM), the stock kernel doesn’t provide all the drivers I need, including au0828, so a full recompile will be in order.

        I did a first try with a ITE IT9135 based USB DVB-T dongle, but the drivers used a closed source “DemoAPI” that was precompiled for x86: I asked the manufacturer for precompiled ARM binaries, as I noticed they used Linaro distro for compilation, but to no avail.

        on the fancy side, I looked into decompiling/recompiling the binaries, and found really promising software: Boomerang and REC.

        For the moment, it is too much work for too little reward, so I’m trying now to get a dongle that I know works fine on linux x86 and then on linux ARM.

        Thanks for notifying me about US / Eu dfference, I found the dongle sold on Ebay Italy, so it should be supported in the country, I’ll then need to try for the drivers.

        btw, nice tutorials on rev. eng, and tuners, I’ll read more if you write them.

        Best,
        Reda

        • Devin Heitmueller

          Hi Reda,

          I can tell you quite definitively – regardless of where you bought it the HVR-850 will *not* work in Europe. You need a tuner that support DVB-T which the HVR-850 does not.

          There are many DVB-T devices out there which have open source drivers. You should consult the linuxtv.org wiki or the #linuxtv IRC channel for examples. The mythtv-users mailing list also has many examples of users who are using DVB-T dongles under Linux on a regular basis.

          Devin

          • Hi again Devin,

            Thank you for the heads up.

            I will get in touch with linuxtv folks.

            Btw, all the dongles using IT9035 won’t work on ARM (all non x86 targets) because of the DemoAPI x86 binary blob.

            Thank you Devin for your help.

            Cheers,
            Reda

          • Devin Heitmueller

            Hi Reda,

            There are IT931x drivers recently submitted to the linux-media mailing list (check the archive for more info). That said though, they are a fairly unpopular device, which is why they have gotten so little attention by the Linux community.

            Devin

  3. As a follow up, I found your post : Why is selecting a tuner product so hard? , and read it.

    So now, I should rephrase: are the DVB drivers working on ARM targets?

    I’m compiling them as we speak, so should I expect them to work, or is there a catch somewhere?

    Thanks again,
    Reda

  4. Hi Devin,

    I’m using an HVR-850 under Linux 3.0.0. Much of the time it works right, but sometimes it fails to work and I have to reboot to get it going. I see these errors when it’s not working right, have any ideas what’s going wrong?

    Aug 4 17:55:58 rosie kernel: [ 8.088656] usbcore: registered new interface driver cx231xx
    Aug 4 17:55:58 rosie kernel: [ 8.095887] cx231xx #0: cx231xxcx231xx: called cx231xx_uninit_vbi_isoc
    Aug 4 17:55:58 rosie kernel: [ 8.095892] cx231xx #0: cx231xx_stop_stream():: ep_mask = 10
    Aug 4 17:55:58 rosie kernel: [ 8.096225] cx231xx #0: cx231xx_stop_stream():: ep_mask = 8
    Aug 4 17:55:58 rosie kernel: [ 8.105234] cx231xx #0: cx231xx-audio.c: probing for cx231xx non standard usbaudio
    Aug 4 17:55:58 rosie kernel: [ 8.105595] cx231xx #0: EndPoint Addr 0x83, Alternate settings: 3
    Aug 4 17:55:58 rosie kernel: [ 8.105598] cx231xx #0: Alternate setting 0, max size= 512
    Aug 4 17:55:58 rosie kernel: [ 8.105600] cx231xx #0: Alternate setting 1, max size= 28
    Aug 4 17:55:58 rosie kernel: [ 8.105602] cx231xx #0: Alternate setting 2, max size= 52
    Aug 4 17:55:58 rosie kernel: [ 8.105603] cx231xx: Cx231xx Audio Extension initialized
    Aug 4 17:55:58 rosie kernel: [ 8.122223] cx231xx #0: Changing the i2c master port to 1
    Aug 4 17:55:58 rosie kernel: [ 8.238616] cx231xx #0: UsbInterface::sendCommand, failed with status –32
    Aug 4 17:55:58 rosie kernel: [ 8.395761] DVB: registering new adapter (cx231xx #0)
    Aug 4 17:55:58 rosie kernel: [ 8.396048] Successfully loaded cx231xx-dvb
    Aug 4 17:55:58 rosie kernel: [ 8.396358] cx231xx: Cx231xx dvb Extension initialized
    Aug 4 17:56:28 rosie kernel: [ 38.114848] cx231xx #0: setPowerMode::mode = 16, No Change req.
    Aug 4 17:56:28 rosie kernel: [ 38.151745] cx231xx #0: UsbInterface::sendCommand, failed with status –32
    Aug 4 17:56:29 rosie kernel: [ 39.751603] cx231xx #0: setPowerMode::mode = 16, No Change req.
    Aug 4 17:56:29 rosie kernel: [ 39.751844] cx231xx #0: setPowerMode::mode = 16, No Change req.
    Aug 4 17:56:29 rosie kernel: [ 39.875725] cx231xx #0: UsbInterface::sendCommand, failed with status –32

  5. Hi Devin,

    At little more info: sometimes the USB tuner works (usually after a reboot), sometimes the USB tuner fails with status –32 at boot time, and sometimes it fails with status –71 at boot time (cut and pasted below). It seems like it tends to fail when I first power on the machine, and tends to work when I reboot. I see there’s a workaround for error –71 in cx231xx-cards.c, cx231xx-core.c, and cx231xx-video.c. Do you think I need to a patch for my kernel to get this working right all the time?

    [ 7.835450] cx231xx #0: V4L2 device registered as video0 and vbi0
    [ 7.835454] cx231xx #0: EndPoint Addr 0x84, Alternate settings: 5
    [ 7.835456] cx231xx #0: Alternate setting 0, max size= 512
    [ 7.835458] cx231xx #0: Alternate setting 1, max size= 184
    [ 7.835461] cx231xx #0: Alternate setting 2, max size= 728
    [ 7.835463] cx231xx #0: Alternate setting 3, max size= 2892
    [ 7.835465] cx231xx #0: Alternate setting 4, max size= 1800
    [ 7.835467] cx231xx #0: EndPoint Addr 0x85, Alternate settings: 2
    [ 7.835469] cx231xx #0: Alternate setting 0, max size= 512
    [ 7.835471] cx231xx #0: Alternate setting 1, max size= 512
    [ 7.835474] cx231xx #0: EndPoint Addr 0x86, Alternate settings: 2
    [ 7.835476] cx231xx #0: Alternate setting 0, max size= 512
    [ 7.835478] cx231xx #0: Alternate setting 1, max size= 576
    [ 7.835480] cx231xx #0: EndPoint Addr 0x81, Alternate settings: 6
    [ 7.835482] cx231xx #0: Alternate setting 0, max size= 512
    [ 7.835485] cx231xx #0: Alternate setting 1, max size= 64
    [ 7.835487] cx231xx #0: Alternate setting 2, max size= 128
    [ 7.835489] cx231xx #0: Alternate setting 3, max size= 316
    [ 7.835491] cx231xx #0: Alternate setting 4, max size= 712
    [ 7.835493] cx231xx #0: Alternate setting 5, max size= 1424
    [ 7.835550] usbcore: registered new interface driver cx231xx
    [ 7.843068] cx231xx #0: setPowerMode::mode = 32, No Change req.
    [ 7.858575] cx231xx #0: cx231xx-audio.c: probing for cx231xx non standard usbaudio
    [ 7.859381] cx231xx #0: EndPoint Addr 0x83, Alternate settings: 3
    [ 7.859384] cx231xx #0: Alternate setting 0, max size= 512
    [ 7.859386] cx231xx #0: Alternate setting 1, max size= 28
    [ 7.859388] cx231xx #0: Alternate setting 2, max size= 52
    [ 7.859390] cx231xx: Cx231xx Audio Extension initialized
    [ 7.861377] cx231xx #0: UsbInterface::sendCommand, failed with status –71
    [ 7.865501] cx231xx #0: UsbInterface::sendCommand, failed with status –71
    [ 7.869625] cx231xx #0: can’t change interface 5 alt no. to 0 (err=-71)
    [ 7.869667] cx231xx #0: cx231xxcx231xx: called cx231xx_uninit_vbi_isoc
    [ 7.869670] cx231xx #0: cx231xx_stop_stream():: ep_mask = 10
    [ 7.877879] cx231xx #0: can’t change interface 5 alt no. to 0 (err=-71)
    [ 7.930017] dvb_init: looking for tuner / demod on i2c bus: 5
    [ 7.943387] cx231xx #0: UsbInterface::sendCommand, failed with status –71
    [ 7.943391] lgdt3305_read_reg: error (addr 0e reg 0001 error (ret == -71)
    [ 7.943394] lgdt3305_attach: error -71 on line 1144
    [ 7.943396] lgdt3305_attach: unable to detect LGDT3305 hardware
    [ 7.943399] cx231xx: Failed to attach LG3305 front end
    [ 7.947512] cx231xx #0: UsbInterface::sendCommand, failed with status –71
    [ 7.951635] cx231xx #0: UsbInterface::sendCommand, failed with status –71

  6. Hi Devin,

    On the usb-live2 does the audio work? and if so, is the audio synchronized with the video?. I’m asking you this because i’m planning to buy this capture card for a production environment, but i’m not in USA, so i will have to import it.

    Thanks.

    • Hello Jankarlitos,

      Both the audio and video are delivered in raw form as quickly as possible (there is effectively no buffering in the hardware), so it is the responsibility of the application to provide/maintain synchronization. It tends to not be trivial to implement this with a raw capture device, so if this is a key requirement you should consider using a device which has an onboard MPEG encoder (where synchronization is done in the hardware itself). It *is* possible, but it tends to take alot of development effort to do properly/reliably.

      Devin

  7. Hi Devin,

    Something that has been changed in the media_build tree in the last month or so appears to have broken audio capture on the USBLive2. Since you posted the fix “Fix for Hauppauge USBLive2 Regression”, the device has been working fine in Ubuntu 11.10 (kernels 3.0.0-12 to 3.0.0-14) by building the current media_build tree (i.e. git clone git://linuxtv.org/media_build.git ) and installing. Last successful build was on 14 Dec 2011 against 3.0.0-14. For now I have reverted to using that kernel. Build on 31 Jan 2012 against 3.0.0-15 first exhibited the audio problem and a new build on 11 Feb is the same. Video capture is working and the ALSA cx231xx capture device is there… everything looks in order, but if you try to use it, you hear no sound. If you capture the sound stream and view it, it’s a flat line, all zeros.

    I tried building the current media_build tree against kernels 3.0.0-12 and 14 on a different computer and had same result, suggesting it’s not a hardware or a kernel thing, something in the media_build code has changed. I know my hardware is fine as by reverting to 3.0.0-14 kernel and the modules built in Dec it works fine, have sound and video working.

    Thanks.

    • Hello mjs4378,

      You should definitely report this to the linux-media mailing list (and if you could do a git bisect to figure out where the regression was introduced that would be very helpful). The fact of the matter is they break these drivers every couple of months and I simply don’t have time to validate every device I ever added support for on an ongoing basis. The problem is systemic (device support frequently gets broken from release to release), so you should definitely complain to the mailing list.

      Cheers,

      Devin

      • Hi Devin,

        Thanks, I’ll endeavour to do just that. That’s something I was wanting to figure out how to do the other day, how to build a dated snapshot of the media_build tree instead of just the latest. That way I can find the last day the drivers still worked and for the time being I presume still build against the kernels coming out now in mainstream Ubuntu, since they are a little delayed. I’ll google how to do a git bisect and see how far I get.

        Also hopefully might be able to pin down what may have broken the audio if there are some changelogs to examine from around the time.

        Thanks for your work on this. I use the device and hence your drivers nearly every day.

        Cheers,
        Mark

  8. Done. Building the dated source tarballs I find at: http://linuxtv.org/downloads/drivers/ , sound works on my USB-LIVE-2 up to 2012-01-08. 2012-01-11 introduces the audio problem which as of last week remained in the latest release. I’ll write up a message for the linux media mailing list. Looks like this: http://git.linuxtv.org/media_tree.git/shortlog should be where the changelogs are but have not been updated since end of October 2011. They must have been moved?

    • Devin Heitmueller

      Looking at the panic dump, it’s definitely related to audio (it’s crashing when the audio URB handler resubmits the buffer). That said, I have no idea what they screwed up after the code was submitted upstream. Your best bet is to complain to the linux-media mailing list (and it would probably be worthwhile to bisect the kernel and identify when the regression got introduced if you’re able to).

      Regards,

      Devin

Leave a Reply