4th of July: PCTV 80e Support

On this fine Independence Day, the PCTV 80e declares independence from the tyranny of Windows.

Ok, apologies to anyone from the U.K. for my quirky American sense of humor.

Seriously though, Trident Microsystems finally agreed to allow the DRX-J code to be released under a BSD license. This means that we can finally release a driver for the PCTV 80e.

http://www.kernellabs.com/hg/~dheitmueller/v4l-dvb-80e

The ATSC support has been tested. Haven’t had a chance to burn in the ClearQAM support. And there’s a bunch of cleanup work required before it can be submitted upstream. But it does work, and should satisfy those who have this board and want to see it working under Linux.

Thanks go out to Trident Microsystems for finally allowing this release, as well as to Hauppauge and PCTV Systems for pushing them on it for so long.

Testing/feedback welcome of course in the comments below.

53 thoughts on “4th of July: PCTV 80e Support

  1. I can hardly believe this act of generosity on behalf of Trident MicroSystems. Personally, I’m glad that they bought the rights to this hardware! As a user of Linux, I thank you, Trident. I also thank you, Devin, for working on releasing this driver! Whoopee! I can hardly wait to download this code. My 80e is no longer an orphan sitting on the shelf! Hopefully, we’ll see this code in the Linux kernel soon!

  2. Devin,

    I’m using a 2.6.33.6 kernel with the aforementioned v4l-dvb-80e overlay which includes the drx39xyj driver. I’m also using many v4l devices (zoneminder) which include a Hauppauge WinTV USB2 (em28xx) device for use as a remote control. Relevant kernel output from dmesg referring to drx-j driver:

    IP: [] CtrlUCode+0x167/0x4b0 [drx39xyj]
    RIP: 0010:[] [] CtrlUCode+0x167/0x4b0 [drx39xyj]
    [] ? DRXBSP_I2C_WriteRead+0x69/0x100 [drx39xyj]
    [] ? DRXDAP_FASI_WriteBlock+0x196/0x260 [drx39xyj]
    [] DRX_Ctrl+0x10d/0x8d0 [drx39xyj]
    [] ? DRXJ_DAP_WriteReg16+0x49/0x110 [drx39xyj]
    [] ? DRXDAP_FASI_WriteReg16+0x28/0x30 [drx39xyj]
    [] ? CtrlSetCfgMPEGOutput+0x29f/0xbf0 [drx39xyj]
    [] ? DRXJ_DAP_WriteReg16+0x49/0x110 [drx39xyj]
    [] DRXJ_Open+0x30c/0x920 [drx39xyj]
    [] DRX_Open+0x55/0x70 [drx39xyj]
    [] drx39xxj_attach+0x227/0x540 [drx39xyj]
    RIP [] CtrlUCode+0x167/0x4b0 [drx39xyj]

  3. Devin,

    After removing the Hauppauge WinTV USB2 from my PC, I get following output after booting my PC with the Pinnacle PCTV 80e in place of the Hauppauge WinTV USB2:

    em28xx: New device Pinnacle Systems PCTV 80e @ 480 Mbps (2304:023f, interface 0, class 0)
    em28xx #0: chip ID is em2874
    em28xx #0: Identified as Pinnacle PCTV HD Mini (card=76)
    em28xx #0: v4l2 driver version 0.1.2
    em28xx #0: V4L2 video device registered as video1
    usbcore: registered new interface driver em28xx

    em28xx driver loaded
    [] dvb_init+0x2c2/0xa60 [em28xx_dvb]
    [] em28xx_register_extension+0x65/0xc0 [em28xx]
    [] ? em28xx_dvb_register+0x0/0x12 [em28xx_dvb]
    [] em28xx_dvb_register+0x10/0x12 [em28xx_dvb]

    HTH and thanks for the driver!

    • Devin Heitmueller

      Hello tpreitzel,

      If you could email me the full dmesg output, it would be very helpful (so I can get more context on the problem).

      Also, do you get the error on device insertion? Or does it happen at some later point?

      Thanks,

      Devin

      • Devin,

        I sent your requested information to Steven Toth and asked him to pass the information to you because I didn’t locate your e-mail address.

        Basically, the kernel emits errors when the PCTV 80e is inserted into a USB2 slot. The PC needs to be rebooted to regain operation.

        HTH!

  4. Excellent, excellent, excellent!
    I’m very impressed by Devin’s comittment to this project, and by this gracious move on Trident’s part. Thank you Devin for all your hard work, and thank you Trident for recognizing it. Can’t wait till I can unpack my TV stick and try it out!
    -David (hesperaux)

  5. I am stuck at the exact same point as tpreitzel on a 2.6.34 gentoo amd64 kernel.
    Linux video capture interface: v2.00
    em28xx: New device Pinnacle Systems PCTV 80e @ 480 Mbps (2304:023f, interface 0, class 0)
    em28xx #0: chip ID is em2874
    em28xx #0: Identified as Pinnacle PCTV HD Mini (card=76)
    em28xx #0: v4l2 driver version 0.1.2
    em28xx #0: V4L2 video device registered as video0
    usbcore: registered new interface driver em28xx
    em28xx driver loaded
    BUG: unable to handle kernel paging request at ffffffffb80cc1c0
    IP: [] CtrlUCode+0x16d/0x450 [drx39xyj]
    PGD 17e3067 PUD 17e7063 PMD 0
    Oops: 0000 [#1] SMP
    last sysfs file:
    CPU 0
    Modules linked in: drx39xyj em28xx_dvb(+) dvb_core em28xx v4l2_common videodev v4l1_compat v4l2_compat_ioctl32 ir_common videobuf_vmalloc videobuf_core ir_core tveeprom

    Pid: 1869, comm: modprobe Not tainted 2.6.34-gentoo #8 ‘K8N’/K8N
    RIP: 0010:[] [] CtrlUCode+0x16d/0x450 [drx39xyj]
    RSP: 0000:ffff88007d48bc28 EFLAGS: 00010286
    RAX: 0000000000000000 RBX: ffff88007d48bdf8 RCX: 000000000000007d
    RDX: 0000000000000000 RSI: ffffffffa00c58e0 RDI: ffffffffb80cc1c0
    RBP: ffff88007e1d4640 R08: 0000000000000000 R09: 0000000000000002
    R10: ffffffffa00c58ea R11: 0000000000000000 R12: 0000000000000000
    R13: 0000000000000014 R14: ffff88007e2b2400 R15: ffff88007e2c3600
    FS: 00007f64fbc8e700(0000) GS:ffff880001a00000(0000) knlGS:0000000000000000
    CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b
    CR2: ffffffffb80cc1c0 CR3: 000000007d4e4000 CR4: 00000000000006f0
    DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
    DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
    Process modprobe (pid: 1869, threadinfo ffff88007d48a000, task ffff88007d4d32f0)
    Stack:
    ffff88007d48bd38 0000000000000002 0006000000000002 ffff88007e1dbc40
    0000000400000029 ffff88007d48bcb8 ffff000200010029 ffff88007d48bcc8
    0000000000000001 ffffffffa00c4255 0000000000001262 0000000000000002
    Call Trace:
    [] ? DRXDAP_FASI_WriteBlock+0x185/0x270 [drx39xyj]
    [] ? DRX_Ctrl+0x7ed/0x970 [drx39xyj]
    [] ? DRXJ_DAP_ReadReg16+0x49/0x150 [drx39xyj]
    [] ? DRXDAP_FASI_WriteReg16+0x22/0x30 [drx39xyj]
    [] ? DRXJ_DAP_WriteReg16+0x4a/0x110 [drx39xyj]
    [] ? DRXJ_Open+0x323/0x880 [drx39xyj]
    [] ? DRX_Open+0x45/0x60 [drx39xyj]
    [] ? drx39xxj_attach+0x2df/0x450 [drx39xyj]
    [] ? __symbol_get+0x2f/0xd0
    [] ? dvb_init+0x2f9/0xa10 [em28xx_dvb]
    [] ? em28xx_register_extension+0x5b/0xc0 [em28xx]
    [] ? em28xx_dvb_register+0x0/0xc [em28xx_dvb]
    [] ? do_one_initcall+0x35/0x190
    [] ? sys_init_module+0xdd/0x250
    [] ? system_call_fastpath+0x16/0x1b
    Code: 0f b6 6e 09 74 b8 0f b6 c0 0f b6 fa 48 c1 e0 08 48 09 c7 0f b6 c1 48 c1 e7 08 48 09 c7 41 0f b6 c0 48 c1 e7 08 48 09 c7 48 03 3b b6 07 0f b6 57 01 c1 e0 08 09 c2 66 81 fa 00 80 75 80 48 8b
    RIP [] CtrlUCode+0x16d/0x450 [drx39xyj]
    RSP
    CR2: ffffffffb80cc1c0
    —[ end trace ebbee2ff7439d6a1 ]—
    udev: starting version 154
    bttv: driver version 0.9.18 loaded
    bttv: using 8 buffers with 2080k (520 pages) each for capture
    bttv: Bt8xx card found (0).
    bttv 0000:02:07.0: PCI INT A -> Link[LNKB] -> GSI 10 (level, low) -> IRQ 10
    bttv0: Bt878 (rev 17) at 0000:02:07.0, irq: 10, latency: 64, mmio: 0xea7fe000
    bttv0: detected: Pinnacle PCTV [bswap] [card=39], PCI subsystem ID is bd11:1200
    bttv0: using: Pinnacle PCTV Studio/Rave [card=39,autodetected]
    IRQ 10/bttv0: IRQF_DISABLED is not guaranteed on shared IRQs
    bttv0: gpio: en=00000000, out=00000000 in=00ff0fff [init]
    bttv0: i2c: checking for MSP34xx @ 0x80… not found
    bttv0: miro: id=3 tuner=2 radio=no stereo=no
    bttv0: tuner type=2
    bttv0: audio absent, no audio device found!
    All bytes are equal. It is not a TEA5767
    tuner 2-0060: chip found @ 0xc0 (bt878 #0 [sw])
    tuner-simple 2-0060: creating new instance
    tuner-simple 2-0060: type set to 2 (Philips NTSC (FI1236,FM1236 and compatibles))
    bttv0: registered device video1
    bttv0: registered device vbi0
    bttv0: PLL: 28636363 => 35468950 .. ok

  6. Do you know if this mean that I can use this driver with the Hauppauge WinTV-HVR-930C too? As far as I know it use the Empia em2884 and DRX-K chipsets. If DRX-K doesn’t it work with your DRX-J code could it with adjustments of the code? Maybe DRX-K isn’t included in the BSD release of this.

    I’m very keen on getting a Hauppauge WinTV-HVR-930C working with Linux.

    Hope you can shed some light on this.

    /Philip

    • Hi Philip,

      All I can say at this point is to be patient. I am keenly aware of the value there is to the community in seeing a DRX-K driver working under Linux.

      The DRX-K will *not* work with the DRX-J codebase (and in fact attempting such could damage the hardware so I would advise against trying).

      Devin

      • Hello again

        I wish patience was my middle name so to speak but I’m glad there is progress when it comes to any of the DRX-chipsets.

        Is the released BSD codebase only covering the DRX-J and not the DRX-K at all or is it just so that work to implement it as Linux kernel drivers only have been done for the DRX-J by you Devin so far? I don’t have the skills to make any drivers myself from any codebase but is hoping for others to to get the DRX-K working if it’s possible to do so now from the breakthrough with the released code. In the later case it’s mostly work and time to get things done and not any company that is holding on to the key for a happy community in this case.

        /Philip

  7. Ok guys, I have been all over the internet searching for drivers for linux and finally landed here. I just built an htpc and want to use the device in question in ubuntu 10.04. Here is my problem; I am new to the linux world and I admit, most of it has me stumped. I barely made it through an install of xbmc. I have done a lot of research on the ins and outs of linux and I want to learn.

    So, I would appreciate any help you can share with me to get this device working. If anyone can offer some one on one help, I would be forever in your debt.

    • Jim,

      Personally, I don’t use Ubuntu, but you have access to Ubuntu’s forums which are a very valuable resource.
      At this point, the current DRX-J driver has problems so you’ll need to wait for Devin to locate and fix the problems. Devin has promised to do so when he has the time. In the meantime, search for Ubuntu’s forums and read as much as you can about Ubuntu’s version of Linux. Good luck!

    • Hello tcarwash,

      It does work in a limited set of circumstances, however the tree is suffering from some bit rot with newer kernels largely due to gratuitous renaming of core functions in the kernel. It really needs a developer to give it some TLC to get it back to a working state.

      So to answer the question, no it hasn’t been forgotten, but it isn’t at the top of my TODO list either.

      Devin

  8. Hey Devin, or anyone else who might know the answer. It took me a few hours of trial and error, google research, and code modifications, but I finally got this driver compiled an installed in spite of the major kernel changes in ubuntu 10.10.

    Sadly, even though both Kaffeine and MythTV detect the device, neither of them will successfully scan channels. I’ve attempted to use the w_scan utility as I’ve read it can typically find channels when other tools can’t. To be clear, I’ve attempted using an HD antennae to pick up the 1-2 channels I get here as a test, and set it up as ATSC. I’ve also connected it to my Comcast Cable, (trying DVB-C among others) and still get nothing. Both of those methods work when I attach the device to my windows machine, so I know my inputs are sound.

    All that being said, is there something else I’m missing here? The em28xx modules are loaded according to lsmod and it creates the following devices under the /dev/dvb/adapter0/ directory: demux0, dvr0, frontend0, net0.

    There is also a /dev/video0 device. Each of these get destroyed/created whenever I unplug or plug-in the usb 80e stick.

    I’ve reached the end of the internet it seems, and I don’t really know where else to turn. If you have any suggestions, please throw them at me.

    Thank you for your hard work on this.

  9. Somehow I missed the part where you said “Haven’t had a chance to burn in the ClearQAM support.” above. After some additional research, it seems that Comcast in my area is either ClearQAM or ATSC.

    Am I correct in interpreting that comment as “ClearQAM isn’t currently working with this driver”?

    If so, are there plans to make that happen? If not, then I’ll give up on this device and purchase something that actually works well in Linux.

  10. To Michael McNiel and Devin Heitmueller,

    Would you mind posting the changes you made to the driver code so that we all can see how you got it to compile? I’ve been working for a while now trying to switch the ioctl calls to unlocked_ioctl calls and changing references to struct inode *inode to ioctl(file->f_path.dentry->d_inode. This has fixed a lot of issues (as far as I can tell), however I am running into problems now with v4l2-compat-ioctl32.c, when there are references to ioctl:

    /root/v4l-dvb-80e-30c6512030ac/v4l/v4l2-common.c: In function ‘v4l2_i2c_new_subdev_board’:
    /root/v4l-dvb-80e-30c6512030ac/v4l/v4l2-common.c:911: error: too few arguments to function ‘i2c_new_probed_device’
    make[3]: *** [/root/v4l-dvb-80e-30c6512030ac/v4l/v4l2-common.o] Error 1
    make[3]: *** Waiting for unfinished jobs….
    /root/v4l-dvb-80e-30c6512030ac/v4l/v4l2-compat-ioctl32.c: In function ‘native_ioctl’:
    /root/v4l-dvb-80e-30c6512030ac/v4l/v4l2-compat-ioctl32.c:232: error: ‘const struct file_operations’ has no member named ‘ioctl’
    /root/v4l-dvb-80e-30c6512030ac/v4l/v4l2-compat-ioctl32.c:237: error: ‘const struct file_operations’ has no member named ‘ioctl’
    /root/v4l-dvb-80e-30c6512030ac/v4l/v4l2-compat-ioctl32.c: In function ‘v4l2_compat_ioctl32’:
    /root/v4l-dvb-80e-30c6512030ac/v4l/v4l2-compat-ioctl32.c:981: error: ‘const struct file_operations’ has no member named ‘ioctl’

    • Devin Heitmueller

      Hello Hesperaux,

      All of my code is on the hg server. The issue is that the kernel has continued to change since it was originally posted.

      Your best bet would probably be to just take a current media_build tree from linuxtv.org and then apply the last few patches that are on my hg tree which provide the driver support. They should merge pretty cleanly (probably some very minor merging required in em28xx-cards.c).

      Devin

      • David "hesperaux" Bieber

        Devin,

        Thanks for your reply! I actually managed to get it all to compile last night. I grabbed the latest hdtv tree as a bz2 the other day and then copied your tarball onto that. This was really sloppy and probably screwed up things I’m not aware of… The driver loads, detects the device, but then none of my software can see the device (mythtv, w_scan).

        I will definitely try doing what you suggested and see if that works better. Thanks again for all of your work on this.

        And by the way, what patches are you referring to, and how do I apply them? I’m afraid my programming skills are very limited and I’ve never done any projects involving multiple source files or patches.

        -David

        • Just an update on this…
          Compiling the kernel modules with the source code I made modifcations to caused a number of problems. It’s not enough to simply make all the code use the unlocked_ioctl calls. I had to change i2c-dev.c, which brought lots of problems with my other kernel drivers. I was receiving lots of interesting errors in dmesg on bootup and shutdown (in fact, I couldn’t shutdown). Not to mention the driver didn’t work with my modifications either, so I really didn’t gain anything by getting it to compile. I figured this would happen, but I thought everyone should know in case they are hoping I have an answer to this.
          -David

  11. This driver has never worked properly. If any of you finally get it to work, please post the results here so others can duplicate it. From the number of comments, there’s obviously a tremendous interest in finally getting this driver operational.

  12. could someone point me to a simple step-by-step guide to getting a pctv 80e device working with a current ubuntu 10.10 system please.

    My system runs 2.6.35-28-generic, is amd64, and I have the kernel sources etc., I’ve tried to download the files from http://www.kernellabs.com/hg/~dheitmueller/v4l-dvb-80e and follow the patches described by others in a variety of places to bring the code up to 2.6.35.

    But, I still can’t get the device to work.

  13. can you please fix it to work with the newest kernel? or get it mainlined into the kernel?
    these cards are cheap($30) and would be great if they worked under a current Linux.

    • Hi Racerx,

      Abandoned is perhaps a bit of a subjective term. It works in my case for ATSC, but I haven’t had a chance to debug a couple of issues people reported, nor have I had a chance to forward port the patches to modern kernels. Even if I did do the forward port, the kernel upstream maintainers won’t accept it into the mainline unless I’m willing to waste a dozen hours cleaning up “coding style” issues like how many spaces the functions should be indented.

      I’m too busy to work on this, and even less motivated to do useless “shit work” because the of stuff like the notion that the code uses tabs instead of spaces for indentation.

      I wish I had a better answer for you. At this point the code will stay in it’s current state unless somebody comes along willing to do the requisite work to make the code acceptable to the upstream kernel maintainers.

      Devin

      • Thanks for the update. I’m using the latest kernel used by ubuntu 11.04. The source does not compile for me. I have limited skills to get this to work. Guess I can just hope someone posts an update. Guess I will have to use windows for this for now 🙁

      • If the “coding style” issues get fixed, will the kernel team help in maintaining it (making sure it works when they make changes to the kernel), or will you be responsible for that also?

        The nice thing about “coding style” issues is that virtually anyone can fix those for you. All they need to do is clear out the tabs on each line (granted there may be 1,000+ lines), and hit their spacebar the required number of times. It’s just the bug-fixing and other development issues that require some knowledge.

        Also, I’m assuming that you have to download the files in order and the patches to the default file, correct? Are they coded in such a way, that you could just copy/paste the patch into the original source, and it would be updated (or are there additional files and such that need to be applied to the original in the patches)?

        Depending on how much work is entailed in getting the patches into the original code (or making it all into something that works and will be kernel-ready), I might take a shot at this. I’m NOT a C developer by any means (in reality I’m barely even a developer at all), so I probably won’t be as useful as I’d like. But, I can give it a shot (at least on the coding style stuff).

        Have a great weekend:)
        Patrick.

  14. So far, the main error that I’m getting is with the implicit function ‘kfree’ and ‘kzalloc’ (might just be ‘kalloc’ or another variation). In Googling the error, I found that adding the line ‘#include ‘ to the files fixes the error. And in greping the files in the v4l directory for ‘kfree’, I found the following to have that function in them (so they all need the #include statement — or at least the ones required for your specific tuner to work):

    adv7170.c
    adv7175.c
    adv7180.c
    adv7343.c
    af9005-fe.c
    af9013.c
    af9015.c
    arv.c
    at76c651.c
    atbm8830.c
    au0828-core.c
    au0828-dvb.c
    au0828-video.c
    au8522_decoder.c
    av7110.c
    bcm3510.c
    bt819.c
    bt856.c
    bt866.c
    bt87x.c
    bttv-driver.c
    bttv-gpio.c
    bttv-input.c
    bttv-risc.c
    budget-av.c
    budget.c
    budget-ci.c
    budget-patch.c
    bw-qcam.c
    cafe_ccic.c
    cimax2.c
    cinergyT2-fe.c
    conex.c
    cpia2_core.c
    cpia2_usb.c
    cpia2_v4l.c
    cpia.c
    cpia_pp.c
    cpia_usb.c
    c-qcam.c
    cs5345.c
    cs53l32a.c
    cx18-alsa-main.c
    cx18-controls.c
    cx18-driver.c
    cx18-fileops.c
    cx18-queue.c
    cx22700.c
    cx22702.c
    cx231xx-audio.c
    cx231xx-cards.c
    cx231xx-core.c
    cx231xx-dvb.c
    cx231xx-input.c
    cx231xx-vbi.c
    cx231xx-video.c
    cx23885-417.c
    cx23885-core.c
    cx23885-input.c
    cx23885-video.c
    cx23888-ir.c
    cx24110.c
    cx24113.c
    cx24116.c
    cx24123.c
    cx25821-alsa.c
    cx25821-audio-upstream.c
    cx25821-audups11.c
    cx25821-core.c
    cx25821-video0.c
    cx25821-video1.c
    cx25821-video2.c
    cx25821-video3.c
    cx25821-video4.c
    cx25821-video5.c
    cx25821-video6.c
    cx25821-video7.c
    cx25821-videoioctl.c
    cx25821-video-upstream.c
    cx25821-video-upstream-ch2.c
    cx25821-vidups10.c
    cx25821-vidups9.c
    cx25840-core.c
    cx88-alsa.c
    cx88-blackbird.c
    cx88-cards.c
    cx88-core.c
    cx88-dsp.c
    cx88-input.c
    cx88-mpeg.c
    cx88-video.c
    cx88-vp3054-i2c.c
    cxusb.c
    dabusb.c
    dib0070.c
    dib0090.c
    dib3000mb.c
    dib3000mc.c
    dib7000m.c
    dib7000p.c
    dib8000.c
    dm1105.c
    dmxdev.c
    drx397xD.c
    drx39xxj.c
    ds3000.c
    dsbr100.c
    dst.c
    dst_ca.c
    dtt200u-fe.c
    dvb-bt8xx.c
    dvb_ca_en50221.c
    dvb_demux.c
    dvbdev.c
    dvb_dummy_fe.c
    dvb_frontend.c
    dvb_net.c
    dvb-pll.c
    dvb-ttusb-budget.c
    dvb-usb-init.c
    dw2102.c
    ec100.c
    em28xx-audio.c
    em28xx-cards.c
    em28xx-core.c
    em28xx-dvb.c
    em28xx-input.c
    em28xx-video.c
    et61x251_core.c
    firedtv-1394.c
    firedtv-fw.c
    firedtv-rc.c
    flexcop.c
    flexcop-pci.c
    flexcop-usb.c
    friio-fe.c
    go7007-driver.c
    go7007-fw.c
    go7007-usb.c
    go7007-v4l2.c
    gp8psk.c
    gp8psk-fe.c
    gspca.c
    hdpvr-control.c
    hdpvr-core.c
    hdpvr-i2c.c
    hdpvr-video.c
    hexium_gemini.c
    hexium_orion.c
    hopper_cards.c
    indycam.c
    ir-kbd-i2c.c
    ir-keytable.c
    ir-sysfs.c
    isl6405.c
    isl6421.c
    isl6423.c
    itd1000.c
    ivtv-controls.c
    ivtv-driver.c
    ivtvfb.c
    ivtv-fileops.c
    ivtv-queue.c
    ivtv-yuv.c
    jeilinj.c
    ks0127.c
    l64781.c
    lgdt3304.c
    lgdt3305.c
    lgdt330x.c
    lgs8gl5.c
    lgs8gxx.c
    lnbp21.c
    m52790.c
    m5602_mt9m111.c
    m5602_ov7660.c
    m5602_ov9650.c
    m5602_po1030.c
    m5602_s5k4aa.c
    m5602_s5k83a.c
    m920x.c
    mantis_ca.c
    mantis_cards.c
    mars.c
    max2165.c
    mb86a16.c
    mc44s803.c
    msp3400-driver.c
    mt2060.c
    mt20xx.c
    mt2131.c
    mt2266.c
    mt312.c
    mt352.c
    mt9m001.c
    mt9m111.c
    mt9t031.c
    mt9t112.c
    mt9v011.c
    mt9v022.c
    mx1_camera.c
    mxb.c
    mxl5005s.c
    ngene-core.c
    nxt200x.c
    nxt6000.c
    omap24xxcam.c
    opera1.c
    or51132.c
    or51211.c
    ov511.c
    ov6x20.c
    ov6x30.c
    ov7670.c
    ov76be.c
    ov772x.c
    ov7x10.c
    ov7x20.c
    ov9640.c
    ovcamchip_core.c
    pd-main.c
    pd-video.c
    pluto2.c
    pt1.c
    pvrusb2-context.c
    pvrusb2-dvb.c
    pvrusb2-eeprom.c
    pvrusb2-hdw.c
    pvrusb2-io.c
    pvrusb2-ioread.c
    pvrusb2-sysfs.c
    pvrusb2-v4l2.c
    pwc-ctrl.c
    pwc-dec23.c
    pwc-if.c
    pxa_camera.c
    qt1010.c
    quickcam_messenger.c
    radio-gemtek-pci.c
    radio-maestro.c
    radio-maxiradio.c
    radio-mr800.c
    radio-si470x-i2c.c
    radio-si470x-usb.c
    radio-si4713.c
    radio-tea5764.c
    radio-timb.c
    rj54n1cb0c.c
    s2250-board.c
    s2250-loader.c
    s2255drv.c
    s5h1409.c
    s5h1411.c
    s5h1420.c
    s921_module.c
    saa5246a.c
    saa5249.c
    saa6588.c
    saa6752hs.c
    saa7110.c
    saa7115.c
    saa7127.c
    saa7134-alsa.c
    saa7134-core.c
    saa7134-go7007.c
    saa7134-input.c
    saa7134-video.c
    saa7146_core.c
    saa7146_fops.c
    saa7164-api.c
    saa7164-buffer.c
    saa7164-core.c
    saa7164-fw.c
    saa717x.c
    saa7185.c
    saa7191.c
    saa7706h.c
    se401.c
    sh_mobile_ceu_camera.c
    si21xx.c
    si4713-i2c.c
    smscoreapi.c
    smsdvb.c
    smssdio.c
    smsusb.c
    sn9c102_core.c
    sn9c20x.c
    snd-go7007.c
    soc_camera.c
    soc_camera_platform.c
    sonixj.c
    sp8870.c
    sp887x.c
    spca500.c
    sq905.c
    sq905c.c
    stb0899_drv.c
    stb6000.c
    stb6100.c
    stk014.c
    stk-webcam.c
    stradis.c
    stv0288.c
    stv0297.c
    stv0299.c
    stv06xx_hdcs.c
    stv06xx_pb0100.c
    stv06xx_st6422.c
    stv06xx_vv6410.c
    stv0900_core.c
    stv090x.c
    stv6110.c
    stv6110x.c
    stv680.c
    sunplus.c
    t613.c
    tda10021.c
    tda10023.c
    tda10048.c
    tda1004x.c
    tda10086.c
    tda665x.c
    tda7432.c
    tda8083.c
    tda80xx.c
    tda8261.c
    tda826x.c
    tda827x.c
    tda8290.c
    tda9840.c
    tda9875.c
    tea575x-tuner.c
    tea5761.c
    tea5767.c
    tea6415c.c
    tea6420.c
    tef6862.c
    ths7303.c
    tlv320aic23b.c
    tm6000-cards.c
    tm6000-core.c
    tm6000-dvb.c
    tm6000-video.c
    ttusb_dec.c
    ttusbdecfe.c
    tua6100.c
    tuner-core.c
    tuner-xc2028.c
    tvaudio.c
    tvp514x.c
    tvp5150.c
    tvp7002.c
    tw9910.c
    upd64031a.c
    upd64083.c
    usbvideo.c
    usbvision-video.c
    uvc_ctrl.c
    uvc_driver.c
    uvc_status.c
    uvc_v4l2.c
    uvc_video.c
    v4l1-compat.c
    v4l2-common.c
    v4l2-dev.c
    v4l2-ioctl.c
    va1j5jf8007s.c
    va1j5jf8007t.c
    ves1820.c
    ves1x93.c
    vicam.c
    videobuf-core.c
    videobuf-dma-contig.c
    videobuf-dma-sg.c
    videobuf-dvb.c
    videobuf-vmalloc.c
    videocodec.c
    vino.c
    vivi.c
    vp27smpx.c
    vp702x-fe.c
    vp7045-fe.c
    vpfe_capture.c
    vpif_capture.c
    vpif_display.c
    vpx3220.c
    w9966.c
    w9968cf.c
    w996Xcf.c
    wis-saa7113.c
    wis-saa7115.c
    wis-sony-tuner.c
    wis-tw2804.c
    wis-tw9903.c
    wm8739.c
    wm8775.c
    zc0301_core.c
    zc3xx.c
    zl10036.c
    zl10039.c
    zl10353.c
    zoran_card.c
    zoran_driver.c
    zr36016.c
    zr36050.c
    zr36060.c
    zr364xx.c

    My questions are:
    1. Is it easier and quicker to fix them all, or just the ones that you need?
    2. If someone fixes all of them, how would they go about uploading the corrected versions, so others can use them?
    3. What will this break?
    4. In the page that I found (which is about the v4ldvb file, ironically enough) they talk about using slab.h for newer kernels and module.h for older kernels (pre-2.6.34). How much of a requirement is that now, and will including both files in the #include statements cause a problem?
    5. Will this fix the issue through subsequent kernel version changes (as long as they don’t remove the slab.h file or move these functions out of it)?

    I’m going through file by file as make finds them, and fixing the issue. However I’m wondering if I’ll end up doing all of the files anyhow. My theory is, if I get this working on my HTPC (Mythbuntu), then I’ll port it over to my laptop and try it with other TV programs for when I travel.

    I’ll try to reply to my own comment with any updates on how this goes.

    Have a great day:)
    Patrick.

    • Hi Patrick,

      A simpler approach may be to generate patches for the last couple of commits on the hg tree, then apply them to the current git and resolve any conflicts. This will avoid all the merging issues with making the entire hg tree work against current kernels.

      I believe it should merge pretty cleanly. Probably only a few conflicts will occur which should be trivial to resolve (mainly in em28xx-cards.c).

      Devin

    • Hello Xavier,

      In fact there is currently working going on to get this merged upstream. However, the individual doing the work is now discovering what an enormous amount of work that is. It takes in some cases dozens of hours, costing thousands of dollars in effort that could be spent doing other work. You can read about the challenges he is facing on the linux-media mailing list.

      As for ClearQAM, the support will eventually be added, either when some interested party takes the time to figure it out or I find a few hours to do it myself.

      In reality, you bought a single stick. You didn’t pay for Linux support. You were promised *nothing*. If you were a commercial party who paid us to implement Linux support, you would have a legitimate grievance. Otherwise, you can just say “thank you” for the tens of thousands of dollars of engineering that went into getting the chipset vendor to provide driver code, working through the licensing issues to make it GPL compatible, and bootstrapping the driver to the point where it generally works (most of the work was related to making it work in the first place – ClearQAM is a small incremental amount of work).

      Devin

  15. Devin,
    Thanks for your hard work on this, It’s sad to see so many people who think this was posted just to gloat. To cut to the chase, I’m really not very advanced with linux but I did manage to get these drivers to compile. However, they don’t seem to work with my particular Trident based card. I’ve put some information which I’ve found on the card below. I suspect that the FM function of this card may pass I/Q samples directly making it a good little Software Defined Radio device. Check this thread out as well as it’s parent reddit for more info. If you have any interest, I’m sure your help would be appreciated.

    ezcap EzTV306_1.2
    Trident DRX3933J_B2 (demodulator)
    NXP TDA18271HDC2 Tuner
    Empia em2874B usb bridge

    https://www.box.com/s/cf09c4a217274d663127

    WHat would I need to do, beyond the work already done on these drivers, to get this device running, especially in fm mode? Thanks!

    • Devin Heitmueller

      Hello Labarowski,

      That device will not support FM. The em2874 bridge chip only supports MPEG transport streams and has no functionality for uncompressed audio. Indeed the 18271 supports FM, as well as some variants of the drx-j chip. However you need all three links in the chain to support it (the tuner, demodulator, and bridge) in order for it to work.

      Devin

      • Thanks Devin. I was under the impression that the usb bridge was a more passive device that just passed on whatever information was given it. It’s not terribly surprising that this isn’t the case though. This explains why the company didn’t bother to implement fm mode in this version. Out of curiosity’s sake more than anything, what would be necessary to get the ATSC mode working using these drivers? Would it be as simple as changing a vendor or product id somewhere in the driver source or would much more in depth changes be necessary?

        • Devin Heitmueller

          Hi Labarowski,

          Yeah, different USB bridges support different functionality depending on the use case. The following article describes the details of how these devices are setup in more detail:

          http://www.kernellabs.com/blog/?p=1045

          Regarding supporting your device, the core elements for supporting such a device are present, but the work tends to be more than just a USB VID/PID. You would need to know or be able to determine the GPIO layout, identify the correct IF and other tuning parameters related to the chip setup, and there’s the possibility that the version of the driver for the drx-j doesn’t actually match the silicon that you’re using.

          Devin

          • Thanks for your work on all these articles! I found that link very informative. I also looked at your HVR-1600 Performance and Reverse Engineering article and found it very interesting. I have a somewhat limited understanding of hardware from classes and my personal studies but I’m afraid drivers are a bit beyond me. I have enough trouble getting pre-made programs to compile under Linux, so I should probably start small. Nevertheless, great work on all of this and thanks for putting the information out there for others. I’ll definitely keep an eye on this blog as I get time.

Leave a Reply