hauppauge wintv-dual hd - only see one tuner

  • The patch applies...

    But only one tuner shows up. I'm thinking something will need a patch in the media tree?? I'll try to dig in later tonight.

  • Adding that patch to media build did allow the second tuner to show up in tvh. However scanning muxes is not showing any service reception - so I'm wondering if I'll need to bring over the other patches - or so I need to update the tvheadend addon. The Leia build seems to be using HTS Tvheadend 4.1.2415 ~ LibreELEC Tvh-addon v9.0.109

    Thanks CvH for pointing out the media-build patch location! I'll try to add in the other patches tomorrow.

  • Instructions given in post #24 worked for me on DVB-T version.

    thanks a lot @Puffin Chunks

    Now this thread is talking about patching ATSC version of the dongle witch is a complete different beast only used in north america/Canada

    Maybe splitting this thread would help avoiding confusion?

  • Thanks a bunch Puffin Chunks,

    With your excellent instructions I now have capture from two WinTV DualHD devices (ie. 4 tuners) running off my rpi3.

    (Although I am using it as a mythtv backend - for now ;).

    Works beautifully with my synology NAS (Maria dB on the NAS) and another rpi3 as frontend. The family loves it - much simpler, more power efficient and more reliable than my old setup.

    Cheers - and many, many thanks.

  • I am updating Puffin Chunks instructions to cover both DVB-C/T/T2 and ATSC tuners. Thanks @Puffin Chunks 

    • This patch has been built, tested and confirmed working on a rPi Model 3 for Kernel 4.11.3
    • Whilst this patch was compiled for a Model 3, I see no reason why it would not work on other models of Pi as the sources are the same.


    With that said, follow the instructions for compiling your own kernel as detailed in the Raspberry Pi documentation here: Kernel building - Raspberry Pi Documentation but make the following changes:

    • When instructed to get the sources, use the following command instead to ensure that you grab the sources for the 4.11 kernel:
    Code
    git clone --depth 1 -b rpi-4.11.y https://github.com/raspberrypi/linux

    Once you have retrieved the sources, but before running any other commands, grab the patch from here: add hauppauge patch · CvH/LibreELEC.tv@6f53d92 · GitHub and copy it one folder up from where you have downloaded the rpi kernel source (eg: if your source downloaded to /home/user/linux then copy the patch to /home/user)


    Enter the kernel source directory and apply the patch

    Code
    cd linux
    patch -p1 < ../0001-em28xx-Hauppauge-DualHD-DVB-ATSC-second-tuner-suppor.patch

    The following output should tell you whether you've successfully applied the patch:

    Code
    patching file drivers/media/usb/em28xx/em28xx-cards.c
    patching file drivers/media/usb/em28xx/em28xx-core.c
    patching file drivers/media/usb/em28xx/em28xx-dvb.c
    patching file drivers/media/usb/em28xx/em28xx.h
    • With the patch successfully applied to the source you can now continue to follow the instructions on the Raspberry Pi documentation. It is up to you whether you compile locally on the Pi or on a different machine. My advice is the latter as it takes just minutes, but can take many hours to compile on a Pi.
    • For DVB-C/T/T2 tuners only: Once compiled and installed on the Pi, don't forget to grab the firmware for the card from here: dvb-demod-si2168-b40-01.fw and copy it to your /lib/firmware folder on your Pi.

    As to your other questions, be aware, an apt-get upgrade will update the kernel if a new one has been released for Raspbian, so you will want to suppress this from your updates to avoid overwriting your custom kernel.

    The Raspberry Pi documentation will tell you how to either compile on your pi or on another system and transfer it over. As I stated above, I recommend cross-compiling on a different machine, but do whatever you feel most comfortable with, just be prepared for a long wait if compiling on the Pi.

    Edited 3 times, last by leading_edjge (June 18, 2017 at 4:17 PM).

  • Instructions given in post #24 worked for me on DVB-T version.

    thanks a lot @Puffin Chunks

    Now this thread is talking about patching ATSC version of the dongle witch is a complete different beast only used in north america/Canada

    Maybe splitting this thread would help avoiding confusion?

    The latest patch add hauppauge patch · CvH/LibreELEC.tv@6f53d92 · GitHub will solve the dual tuner problem on ATSC and DVB-C/T/T2. Any solution on the ATSC will fix problems on the DVB-C/T/T2 and visa versa. A Hauppauge engineer is evaluating this patch and will work on it to submit it to the mainline of a future Linux kernel.

  • yep, I did realize that later.

    Regarding the Hauppauge's engineer, I had the page where it says he come back in 18 days bookmarked since day 1 :D

    One question : is the new patch different from the one from @Puffin Chunks in post #24 ?

    Now I have not one but 2 x wintv-dual hd so 4 DVB-T2 tunners in total that for now look to works perfectly with Puffin Chunks patch.

    I am wondering if it worth repatching with the new one.

  • CvH - I attempted to compile for the RPi2/3 off of your repo with the temp_mb_haup branch - but received the error

    Do I need to compile from a different base and add in the hauppauge patch? Sorry if this is a basic question.

  • One question : is the new patch different from the one from @Puffin Chunks in post #24 ?

    Now I have not one but 2 x wintv-dual hd so 4 DVB-T2 tunners in total that for now look to works perfectly with Puffin Chunks patch.

    I am wondering if it worth repatching with the new one.


    Yes, the new patch is different. Puffin Chunks commented out the lgdt3306a section (ATSC tuner) to get his patch to be successfully applied.

    I had both of my ATSC tuners working using a different patch for kernel linux 4.2.5. See Post #26

    Here is my reason for repatching with a newer patch:

    I was only 2 versions behind the Raspberry kernel of 4.4 at that time.

    Now that Raspberry kernel has been updated to 4.9, I was 7 versions behind.

    I was trying to figure out how to put the ATSC/lgdt3306a section for the single tuner ATSC patches now in kernel 4.11 into Puffin Chunks patches. I gave up since the new patch is out, for kernel 4.11. Now I am 2 versions ahead of the updated Raspberry kernel.

    The new patch should be closer to the one in the mainline of the future kernel. Kernel 4.12 will come out in the beginning of July. It will be months after July when we will see a future kernel with the new patch in the mainline.

    Edited 4 times, last by leading_edjge (June 18, 2017 at 7:40 PM).

  • excuse my ignorance, but what command should I use to get the patch?

    I did tried with git clone + the url but that doesnt works


    Edit : not sure I finaly get the patch : I did put .patch at the end of the url

    Then :

    Edited once, last by propergol (June 18, 2017 at 9:43 PM).

  • So there is no way to apply your patch to Raspbian Jessie kernel?

    That is what I did with post #24 instructions and it worked.

    Post #79 also seems to give instructions to use your patch on standard distrib but I dont understand how to get the patch itself.

  • Here is the 0001-em28xx-Hauppauge-DualHD-DVB-ATSC-second-tuner-suppor.patch. Copy below using the copy icon and paste it into the file of 0001-em28xx-Hauppauge-DualHD-DVB-ATSC-second-tuner-suppor.patch.

  • Thanks trillions :) @leading_edjge

    Edit : sadly :( it gives error :

    Edited 2 times, last by propergol (June 19, 2017 at 10:09 AM).

  • Try the following:

    Code
    wget https://raw.githubusercontent.com/b-rad-NDi/Ubuntu-media-tree-kernel-builder/master/patches/ubuntu-zesty-4.10.0/extra/0001-em28xx-Hauppauge-DualHD-DVB-ATSC-second-tuner-suppor.patch

    Edit the 0001-em28xx-Hauppauge-DualHD-DVB-ATSC-second-tuner-suppor.patch file

    Remove this from the top of the file:

    Remove this from the bottom of file:

    Code
    -- 
    2.11.0

    Save the 0001-em28xx-Hauppauge-DualHD-DVB-ATSC-second-tuner-suppor.patch file


    If you still cannot get the patch working, go to Ubuntu-media-tree-kernel-builder/patches/ubuntu-zesty-4.10.0/extra at master · b-rad-NDi/Ubuntu-media-tree-kernel-builder · GitHub

    Click on 0001-em28xx-Hauppauge-DualHD-DVB-ATSC-second-tuner-suppor.patch

    Click on Raw

    You should be now at 0001-em28xx-Hauppauge-DualHD-DVB-ATSC-second-tuner-suppor.patch

    Copy everything from

    Diff
    diff --git a/drivers/media/usb/em28xx/em28xx-cards.c b/drivers/media/usb/em28xx/em28xx-cards.c
    index a12b599a1fa2..df0e080bd08e 100644
    --- a/drivers/media/usb/em28xx/em28xx-cards.c
    +++ b/drivers/media/usb/em28xx/em28xx-cards.c

    to

    Code
    +
    +    struct em28xx    *dev_next;
    +    int ts;
     };
     
     #define kref_to_dev(d) container_of(d, struct em28xx, ref)

    and paste into 0001-em28xx-Hauppauge-DualHD-DVB-ATSC-second-tuner-suppor.patch. These steps should work.

  • I think his issue is Jessie has the older linux kernel. It's the same error I received when trying to use the patches on LE 8. The media tree needs to be updated before the patches can be run on the older kernels.