Hauppauge WinTV-HVR-4000

  • Hello, I have a Hauppauge WinTV-HVR4000 DVB-S/S2/T/Hybrid card which supports both DVB/S2 and DVB/T streams. The hardware driver provides access to frontend0 and frontend1 through one adapter. These can be accessed independently using the v4l apps however VDR only detects frontend0. I note that some work was done back in 2018 to build support for multiple frontend cards but this does not appear to support this card. Can this be addressed?


    Pertinent dmesg output:


    cx88xx: subsystem: 0070:6902, board: Hauppauge WinTV-HVR4000 DVB-S/S2/T/Hybrid [card=68,autodetected], frontend(s): 2

    cx88xx: i2c init: enabling analog demod on HVR1300/3000/4000 tuner

    tda9887 10-0043: creating new instance

    tda9887 10-0043: tda988[5/6/7] found

    tuner: 10-0043: Tuner 74 found with type(s) Radio TV.

    tuner: 10-0061: Tuner -1 found with type(s) Radio TV.

    tveeprom: Hauppauge model 69009, rev B2D3, serial# 4029845100

    tveeprom: MAC address is 00:0d:fe:32:8e:6c

    tveeprom: tuner model is Philips FMD1216MEX (idx 133, type 78)

    tveeprom: TV standards PAL(B/G) PAL(I) SECAM(L/L') PAL(D/D1/K) ATSC/DVB Digital (eeprom 0xf4)

    tveeprom: audio processor is CX882 (idx 33)

    tveeprom: decoder processor is CX882 (idx 25)

    tveeprom: has radio, has IR receiver, has no IR transmitter

    cx88xx: hauppauge eeprom: model=69009

    tuner-simple 10-0061: creating new instance

    tuner-simple 10-0061: type set to 78 (Philips FMD1216MEX MK3 Hybrid Tuner)

    Registered IR keymap rc-hauppauge

    IR RC5(x/sz) protocol handler initialized

    rc rc0: cx88 IR (Hauppauge WinTV-HVR400 as /devices/pci0000:00/0000:00:1e.0/0000:03:00.2/rc/rc0

    rc rc0: lirc_dev: driver cx88xx registered at minor = 0, raw IR receiver, no transmitter

    input: cx88 IR (Hauppauge WinTV-HVR400 as /devices/pci0000:00/0000:00:1e.0/0000:03:00.2/rc/rc0/input12

    cx8802: cx2388x 8802 Driver Manager

    cx8802: found at 0000:03:00.2, rev: 5, irq: 19, latency: 64, mmio: 0xfc000000

    cx8800: found at 0000:03:00.0, rev: 5, irq: 19, latency: 64, mmio: 0xfa000000

    cx88_alsa: cx88[0]: alsa: CX88x/0: ALSA support for cx2388x boards

    wm8775 10-001b: chip found @ 0x36 (cx88[0])

    cx88_dvb: cx2388x dvb driver version 1.0.0 loaded

    cx8802: registering cx8802 driver, type: dvb access: shared

    cx8802: subsystem: 0070:6902, board: Hauppauge WinTV-HVR4000 DVB-S/S2/T/Hybrid [card=68]

    cx8800: registered device video0 [v4l2]

    cx8800: registered device vbi0

    cx8800: registered device radio0

    cx88_dvb: cx2388x based DVB/ATSC card

    cx88_dvb: cx8802_alloc_frontends: allocating 2 frontend(s)

    tuner-simple 10-0061: attaching existing instance

    tuner-simple 10-0061: couldn't set type to 63. Using 78 (Philips FMD1216MEX MK3 Hybrid Tuner) instead

    dvbdev: DVB: registering new adapter (cx88[0])

    cx88-mpeg driver manager 0000:03:00.2: DVB: registering adapter 1 frontend 0 (Conexant CX24116/CX24118)...

    cx88-mpeg driver manager 0000:03:00.2: DVB: registering adapter 1 frontend 1 (Conexant CX22702 DVB-T)...

    cx24116_firmware_ondemand: Waiting for firmware upload (dvb-fe-cx24116.fw)...

    cx24116_firmware_ondemand: Waiting for firmware upload(2)...

    cx24116_load_firmware: FW version 1.26.90.0

    cx24116_firmware_ondemand: Firmware upload complete

    Thanks,


    MD.

  • On further investigation i discovered the following code in dvbdevice.c

    This appears to look for a second frontend on an adapter but then ignore it if a corresponding demux is also present, which is the case with the Hauppauge Win TV-HVR-4000 card. The /dev/dvb/adapter(n) folder for the card actually contains: frontend0, demux0, net0, dvr0, frontend1, demux1, net1 and dvr1.


    That is about as far as I can go with this as my dvb knowledge is limited but can anyone suggest why the presence of a second demux on an adapter should preclude the use of a second frontend in VDR?


    Thanks,

    MD.

  • Due to the existing demux0 and demux1, VDR treats each frontend as an independent dvbDevice and both frontends are opened during initialization.
    In the linuxtv wiki i for your card i found this:


    Due to a hardware limitation, the two frontends cannot be used simultaneously. However they can be used sequentially within the same application.


    I suspect that after opening frontend0 no information for frontend1 can be queried. You could check the VDR-start log for some information on frontend1.


    And you can try the (untested) patch in the attachment. With it, VDR should treat your card as a multi-frontend device and only one frontend is open at a time.

    Helmut

  • Hi Helmut,


    your assumption is strange.


    Quering a DVB device is always possible with any fd, no matter if R or RW.

    However, an open() request using RW to query the device, is going to fail, if any other prog opened the device using RW.


    If VDR opens a device using RW to query it (not using R), this is a bug.

  • Hi Wirbel,

    you are right, that's a wild assumption, but "...however VDR only detects frontend0" is perhaps not too much information.


    You can see in the driver that both frontends have separate tuners and demodulators, so there must be other "shared" hardware (or wires) that prevents the two frontends from being used at the same time - but DvbOpen() still could work.


    With "query" I mean more cDvbFrontend :: QueryDeliverySystems () after a successful DvbOpen() of frontend1. if VDR don't get any useful information here, the DvbDevice for frontend1 does exist, but it is "stupid" and would therefore always be ignored when selecting a channel.


    But we will see if separating the access to this two frontends has any effect.

    BR Helmut

  • Hi Helmut,


    With your patch applied the DVB-T frontend (frontend1) is now visible to VDR and works, while the DVB-S2 front end (frontend0) is also visible but does not work. According to femon a strong signal is present but there is no signal quality. If I attach the LNB to one of the STV090x frontends i get a picture so it should/can work

    .

    My adapter arrangement is as follows:

    Code
    1. dmesg | grep "registering adapter"
    2. budget dvb 0000:03:01.0: DVB: registering adapter 0 frontend 0 (LSI L64781 DVB-T)...
    3. cx88-mpeg driver manager 0000:03:00.2: DVB: registering adapter 1 frontend 0 (Conexant CX24116/CX24118)...
    4. cx88-mpeg driver manager 0000:03:00.2: DVB: registering adapter 1 frontend 1 (Conexant CX22702 DVB-T)...
    5. SAA716x FF 0000:02:00.0: DVB: registering adapter 2 frontend 0 (STV090x Multistandard)...
    6. SAA716x FF 0000:02:00.0: DVB: registering adapter 3 frontend 0 (STV090x Multistandard)...

    The DVB-T and DVB-S channels in channels.conf used for the test both used CA 2.

    Any ideas?


    Thanks,


    MD.

  • Hi,

    I assume that the HVR-4000 DVB-S2 frontend0 was able to display the program with the unpatched VDR in your 1st post - right?
    Can you post the syslog from the start of the patched VDR up to the switch from DVB-T to DVB-T2 on this device (and, if available the syslog without the patch too).

    BR Helmut

  • Probably S2 will work, if you remove any C/T channels from channels.conf.


    Note: DVB-T and DVB-S/S2 cannot be used simultaneously due to a hardware limitation, but you can easily switch from one to the other.


    @thread opener: "Hello, I have a Hauppauge WinTV-HVR4000 DVB-S/S2/T/Hybrid card which supports both DVB/S2 and DVB/T streams"


    >>>> which supports DVB-S2 or DVB-T streams

  • Hi Helmut,


    After a lot of experimentation with and without your patch it appears that the DVB-S2 side of the card is broken :(. It has definitely worked in the past but I cant get it to work now, even on a legacy set up from some 10 years ago when I last used the card.


    However, I have managed to source an identical second hand replacement card at a good price and I am waiting for it to arrive. This may take a few weeks but I am still very keen to use this card so will be in touch again when it arrives, hopefully with some better news.


    Thanks,


    MD.

  • Hi Helmut,


    An update: So the card is NOT broken after all. I ran Windows / Prog-DVB on the same machine and it was able to see and successfully use both frontends.


    So on to the firmware and drivers. The firmware seems to be loading and reporting itself correctly:


    cx24116_firmware_ondemand: Waiting for firmware upload (dvb-fe-cx24116.fw)...

    cx24116_firmware_ondemand: Waiting for firmware upload(2)...

    cx24116_load_firmware: FW version 1.26.90.0

    cx24116_firmware_ondemand: Firmware upload complete


    As for the drivers I am using kernel 5.11.0 so I downloaded, built and installed the latest drivers from the v4l-dvb backport tree. I noted the the size of the new cx24116 driver was different to my old driver so I was hopeful that things might now work but alas the behavior was the same. I am now contemplating updating my kernel to the latest and greatest but before I do I thought id ask if you (or anyone else) has any other suggestions as to what I might try or look at.


    Meanwhile I can report that your patch appears to be working in that I can successfully switch back and forth between both front ends on VDR and the femon plugin is correctly reporting the connected frontend in each case, but just without a lock on the Conexant cx24116/cx24118 DVB-S2 frontend.


    Any suggestions much appreciated.


    Thanks,


    MD.

  • Hi,

    can you post the lines from your channels.conf for the programs you want to receive and the output of vdr in syslog (or of 'Journalctl -u vdr').


    Try to access these card with a different software, e.g. use w_scan2 (and select the adapter with the '-a' option) to scan the transponders for a LOCK.


    Helmut

  • Some hints:


    - check the md5sums of the firmware files in /lib/firmware, which needs to fit the driver.

    For numbers, compare to https://www.linuxtv.org/wiki/i…/Hauppauge_WinTV-HVR-4000


    - dont use old w_scan or it's fork w_scan2 anymore, use w_scan_cpp instead.

  • Hi Helmut and Wirbel, thanks for your prompt replies.


    wirbel : Thanks for your suggestions.

    I'm using version 1.26.90.0 downloaded from hauppauge as suggested in your link. The md5sum for the unzipped hcw88bda.sys is 3f685a2ca6d1dae35b10c06f3a538d82 which checks out, and the md5sum for the extracted /lib/firmware/dvb-fe-cx24116-1.26.90.0.fw is 6755898e8f8s479bfba07fc85d647079 which you might like to confirm.

    I am using dvbv5-scan to test the card outside of VDR, see below.


    @Helmut: Channels.conf extract follows:


    :@100 Terestrial TV

    7 Melbourne;Seven Network:177500:B7C34D0G16M64S0T8Y0:T:27500:769=2:770=eng@3:772:2:1328:4115:1283:0

    :@300 Satellite TV

    Al Jazeera;Foxtel:12136:VM2O0P0S1:S156.0E:27800:1121=2:1122=eng@4:1126:3:32012:4096:32:0


    Output from dvbv5-scan using the DVB-S2 frontend on the troublesome card:


    dvbv5-scan -a 1 -f 0 -l L10700 /discs/sdc/sdc3/configs/dvb/dtv-scan-tables/dvb-s/Optus-D310-156.0E

    Using LNBf L10700

    L10700

    Freqs : 11750 to 12750 MHz, LO: 10700 MHz

    WARNING Ignoring device /dev/dvb/adapter2/osd0

    ERROR command BANDWIDTH_HZ (5) not found during retrieve

    Cannot calc frequency shift. Either bandwidth/symbol-rate is unavailable (yet).

    Scanning frequency #1 11762000 (0x00) Signal= 91.51% C/N= 0.00% UCB= 0 postBER= 0

    Scanning frequency #2 11804000 (0x00) Signal= 91.51% C/N= 0.00% UCB= 0 postBER= 0

    Scanning frequency #3 11804000 (0x00) Signal= 91.51% C/N= 0.00% UCB= 0 postBER= 0

    Scanning frequency #4 11845000 (0x00) Signal= 91.51% C/N= 0.00% UCB= 0 postBER= 0

    Scanning frequency #5 11845000 (0x00) Signal= 91.90% C/N= 0.00% UCB= 0 postBER= 0

    Scanning frequency #6 11886000 (0x00) Signal= 91.11% C/N= 0.00% UCB= 0 postBER= 0

    Scanning frequency #7 11886000 (0x00) Signal= 91.51% C/N= 0.00% UCB= 0 postBER= 0

    Scanning frequency #8 11928000 (0x00) Signal= 91.51% C/N= 0.00% UCB= 0 postBER= 0

    Scanning frequency #9 11928000 (0x00) Signal= 91.51% C/N= 0.00% UCB= 0 postBER= 0

    .

    .

    .

    Scanning frequency #32 12598000 (0x00) Signal= 91.51% C/N= 0.00% UCB= 0 postBER= 0

    Scanning frequency #33 12638000 (0x00) Signal= 91.51% C/N= 0.00% UCB= 0 postBER= 0

    Scanning frequency #34 12647000 (0x00) Signal= 91.51% C/N= 0.00% UCB= 0 postBER= 0

    Scanning frequency #35 12707000 (0x00) Signal= 91.51% C/N= 0.00% UCB= 0 postBER= 0

    Scanning frequency #36 12718000 (0x00) Signal= 91.51% C/N= 0.00% UCB= 0 postBER= 0

    Scanning frequency #37 12727000 (0x00) Signal= 91.51% C/N= 0.00% UCB= 0 postBER= 0

    root@Nutrigrain:/home#


    The same scan works (locks transponders) when i use it on one of the technotrend fe's attached to the same LNB.


    Thoughts?


    MD.

  • wrong md5sum for this fw version, should be b8c856ac15b768854a222e6864e7dc7f


    Try attached file in /lib/firmware

  • channel string is wrong.


    Al Jazeera;Foxtel:12136:VM2O0S0C34:....

  • Hi guys,


    Thanks again for your prompt replies.


    One word - Success !!!


    I tried the new firmware but no joy with dvbv5-scan so I was not confident that vdr would work with the modified transponder parameters. But it did. I then switched back to my previous firmware to pinpoint what fixed things and the old firmware also worked. So it was as simple as an incorrect channels.conf entry. Interestingly my technotrend card with two SAA716x FF (STV090x Multistandard) frontends is happy to lock on to the transponder with the old transponder parameters so I just assumed that they were OK.


    Helmut, your patch works very well. I am able to repetitively switch between the S and T frontends on the card without issue. The switch back from the Terrestrial frontend does take a little longer as the cx24116 firmware is reloaded each time. Is this to be expected or should the firmware be loaded once only? Its not an issue or concern, just something i noticed looking through dmesg.


    Thank you both for your assistance in getting to the bottom of this.


    Regards,


    MD.