Hauppauge WinTV-HVR-4000

From LinuxTVWiki
Revision as of 19:08, 20 August 2008 by Vertiger (talk | contribs) (Undo revision 14497 by Vertiger (Talk))
Jump to navigation Jump to search
The HVR-4000 and Remote

A hybrid DVB-S2 PCI card from Hauppauge.

It is currently not supported under Linux. However, experimental support for some of the device's features is available (see below for details).

Overview/Features

Features DVB-S2, DVB-S, DVB-T, Analog TV, Composite, and FM Radio (not supported yet) all in one card!

Note: DVB-T and DVB-S cannot be used at the same, but you can use 1 if not using the other.

Components Used

  • Conexant CX24116 (demodulator)
  • Conexant CX24118A (demodulator)
  • Conexant CX23880 (A/V decoder & PCI bridge)

Identification

04:08.0 0400: 14f1:8800 (rev 05)
        Subsystem: 0070:6902
        Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B-
        Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR-
        Latency: 32 (5000ns min, 13750ns max), Cache Line Size: 32 bytes
        Interrupt: pin A routed to IRQ 21
        Region 0: Memory at fa000000 (32-bit, non-prefetchable) [size=16M]
        Capabilities: [44] Vital Product Data
        Capabilities: [4c] Power Management version 2
                Flags: PMEClk- DSI+ D1- D2- AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot-,D3cold-)
                Status: D0 PME-Enable- DSel=0 DScale=0 PME-

04:08.1 0480: 14f1:8811 (rev 05)
        Subsystem: 0070:6902
        Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B-
        Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR-
        Latency: 32 (1000ns min, 63750ns max), Cache Line Size: 32 bytes
        Interrupt: pin A routed to IRQ 21
        Region 0: Memory at f9000000 (32-bit, non-prefetchable) [size=16M]
        Capabilities: [4c] Power Management version 2
                Flags: PMEClk- DSI+ D1- D2- AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot-,D3cold-)
                Status: D0 PME-Enable- DSel=0 DScale=0 PME-

04:08.2 0480: 14f1:8802 (rev 05)
        Subsystem: 0070:6902
        Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B-
        Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR-
        Latency: 32 (1500ns min, 22000ns max), Cache Line Size: 32 bytes
        Interrupt: pin A routed to IRQ 21
        Region 0: Memory at f8000000 (32-bit, non-prefetchable) [size=16M]
        Capabilities: [4c] Power Management version 2
                Flags: PMEClk- DSI+ D1- D2- AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot-,D3cold-)
                Status: D0 PME-Enable- DSel=0 DScale=0 PME-

04:08.4 0480: 14f1:8804 (rev 05)
        Subsystem: 0070:6902
        Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B-
        Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR-
        Latency: 32 (1500ns min, 63750ns max), Cache Line Size: 32 bytes
        Interrupt: pin A routed to IRQ 255
        Region 0: Memory at f7000000 (32-bit, non-prefetchable) [size=16M]
        Capabilities: [4c] Power Management version 2
                Flags: PMEClk- DSI+ D1- D2- AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot-,D3cold-)
                Status: D0 PME-Enable- DSel=0 DScale=0 PME-

Making it Work

Firmware

One could use the script provided from wget-fw.sh to fetch the firmware for us. Basically what it does is :

1) fetch an archive : "wget ftp://167.206.143.11/outgoing/Oxford/88x_2_119_25023_WHQL.zip"

2) decompress what's needed : "unzip -jo 88x_2_119_25023_WHQL.zip Driver88/hcw88bda.sys"

3) put the firmware at the right place : "dd if=hcw88bda.sys of=/lib/firmware/dvb-fe-cx24116.fw skip=81768 bs=1 count=32522"

  Debian: Place file in /usr/lib/hotplug/firmware/

For slightly newer firmware using drivers from Hauppauge

1) Download the driver archive : "wget http://www.wintvcd.co.uk/drivers/88x_2_122_26109_WHQL.zip"

2) Decompress the .sys file : "unzip -jo 88x_2_122_26109_WHQL.zip Driver88/hcw88bda.sys"

3) Extract the firmware at the right place : "dd if=hcw88bda.sys of=dvb-fe-cx24116.fw skip=75504 bs=1 count=32501"

4) Copy the firmware file (dvb-fe-cx24116.fw) to the appropriate place (typically /lib/firmware)

Drivers

There are currently no in kernel drivers for this card.

Note: If someone wants to provide a brief synopsis of the driver tale of woe, outlining why there isn't a greater level of support, then do so here ... or just read here

However, experimental support does exist.

This allows DVB-T or DVB-S support:

hg clone http://linuxtv.org/hg/v4l-dvb
wget http://dev.kewl.org/hauppauge/v4l-dvb-hg-sfe-latest.diff
patch -d v4l-dvb -p1 < v4l-dvb-hg-sfe-latest.diff
cd v4l-dvb && make && make install && reboot 
Note: The last revision I know of that the patches apply cleanly to is 127f67dea087, so you'll probably have to check the repository out this way: hg clone -r 127f67dea087 http://linuxtv.org/hg/v4l-dvb --Growlizing 13:10, 10 April 2008 (CEST)
This didn't work for me with Mercurial 0.9.1: I got the message "abort: clone by revision not supported yet for remote repositories". Uninstalling the distribution version, then downloading and make install-ing 1.0.2 fixed it. Doesn't build against Linux 2.6.26.2, though. Bloop 20:18, 20 August 2008 (CEST)


See: http://dev.kewl.org/hauppauge/ about enabling DVB-T or DVB-S2 (DVB-S is the default at the moment)

Multifrontend driver

These drivers give you the ability to have multi frontend on the HVR4000. (ie DVB-T and DVB-S tuners )

See: http://dev.kewl.org/hauppauge/

hg clone http://linuxtv.org/hg/v4l-dvb
wget http://dev.kewl.org/hauppauge/v4l-dvb-hg-mfe-latest.diff
patch -d v4l-dvb -p1 < v4l-dvb-hg-mfe-latest.diff
cd v4l-dvb && make && make install && reboot 
Note: As above, the latest diff for Multifrontend is against a version of V4L that is not the latest. You will need to use: hg clone -r 1abbd650fe07 http://linuxtv.org/hg/v4l-dvb --Comm 14:06, 20 May 2008 (BST)

Most programs such as mythtv doesn't know about multi frontends yet. You can only use 1 at a time, but this allows you to swap between them without having to load the modules in differently.

mkdir /dev/dvb/adapter1
ln -s /dev/dvb/adapter0/frontend1 /dev/dvb/adapter1/frontend0
ln -s /dev/dvb/adapter0/net1 /dev/dvb/adapter1/net0
ln -s /dev/dvb/adapter0/dvr1 /dev/dvb/adapter1/dvr0
ln -s /dev/dvb/adapter0/demux1 /dev/dvb/adapter1/demux0

Multiproto driver

The wiki in german languagedescribes what has to be done in order to compile "standard" multiproto driver.
Unfortunately at the date of writing, there is no support for our beloved card, so one should fetch
the patch from linuxtv mailing list which you should apply to the tree before compiling the driver. I haven't tested the patch which adds the multi frontend support but it's certainly a way to follow :-)

After having applied the patch, one could follow the first link of this section to have a VDR with full DVB-S2 support!!!

Latest - 29-1-08
---------------------------
hg clone http://jusst.de/hg/multiproto
wget http://www.linuxtv.org/pipermail/linux-dvb/attachments/20080128/adee4c88/attachment-0001.bin
mv attachment-0001.bin multiproto-hvr4k-2008-01-28.patch.bz2
bunzip2 multiproto-hvr4k-2008-01-28.patch.bz2
ln -s multiproto a; ln -s multiproto b
patch -p0 < multiproto-hvr4k-2008-01-28.patch
cd multiproto
run make menuconfig and disable the USB capture cards as the em88 drivers are broken and make sure customise frontends is enabled.
make && make install && reboot

UPDATE 1st Aug 2008: Igor Liplianin has created another repository containing multiproto code and szap2 at http://liplianindvb.sourceforge.net/hg/, reported to be working with the HVR-4000. See http://www.linuxtv.org/pipermail/linux-dvb/2008-July/027514.html. This appears to be similar to the V4L/DVB staging development repository at http://linuxtv.org/hg/v4l-dvb/ but with the addition of multiproto code.

hg clone http://liplianindvb.sourceforge.net/hg/liplianindvb
hg clone http://liplianindvb.sourceforge.net/hg/szap2

Sample kernel output


When Enabled for DVB-S (options cx88-dvb frontend=0) (Kernel 2.6.23.14)
-----------------------------------------------------------------------

cx88/2: cx2388x MPEG-TS Driver Manager version 0.0.6 loaded
cx88/0: cx2388x v4l2 driver version 0.0.6 loaded
cx88[0]: subsystem: 0070:6902, board: Hauppauge WinTV-HVR4000 DVB-S/S2/T/Hybrid [card=59,autodetected]
cx88[0]: TV tuner type 63, Radio tuner type -1
cx2388x alsa driver version 0.0.6 loaded
cx88[0]: i2c init: enabling analog demod on HVR1300/3000/4000 tuner
tveeprom 2-0050: Hauppauge model 69009, rev B2D3, serial# 2807241
tveeprom 2-0050: MAC address is 00-0D-FE-2A-D5-C9
tveeprom 2-0050: tuner model is Philips FMD1216MEX (idx 133, type 63)
tveeprom 2-0050: TV standards PAL(B/G) PAL(I) SECAM(L/L') PAL(D/D1/K) ATSC/DVB Digital (eeprom 0xf4)
tveeprom 2-0050: audio processor is CX882 (idx 33)
tveeprom 2-0050: decoder processor is CX882 (idx 25)
tveeprom 2-0050: has radio, has IR receiver, has no IR transmitter
cx88[0]: hauppauge eeprom: model=69009
input: cx88 IR (Hauppauge WinTV-HVR400 as /class/input/input3
cx88[0]/2: cx2388x 8802 Driver Manager
cx88[0]/2: found at 0000:04:08.2, rev: 5, irq: 21, latency: 32, mmio: 0xf8000000
cx88[0]/0: found at 0000:04:08.0, rev: 5, irq: 21, latency: 32, mmio: 0xfa000000
cx88/2: cx2388x dvb driver version 0.0.6 loaded
cx88/2: registering cx8802 driver, type: dvb access: shared
cx88[0]/2: subsystem: 0070:6902, board: Hauppauge WinTV-HVR4000 DVB-S/S2/T/Hybrid [card=59]
cx88[0]/2: cx2388x based DVB/ATSC card
tuner' 2-0043: chip found @ 0x86 (cx88[0])
tda9887 2-0043: tda988[5/6/7] found
tuner' 2-0061: chip found @ 0xc2 (cx88[0])
tuner-simple 2-0061: type set to 63 (Philips FMD1216ME MK3 Hybrid Tuner)
tuner' 2-0063: chip found @ 0xc6 (cx88[0])
cx88[0]/0: registered device video0 [v4l2]
cx88[0]/0: registered device vbi0
cx88[0]/0: registered device radio0
DVB: registering new adapter (cx88[0])
DVB: registering frontend 0 (Conexant CX24116/CX24118)...
cx88[0]/1: CX88x/0: ALSA support for cx2388x boards
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.20.79.0
cx24116_firmware_ondemand: Firmware upload complete


When enabled for DVB-T (options cx88-dvb frontend=1) (Kernel 2.6.23.14)
-----------------------------------------------------------------------

cx88/0: cx2388x v4l2 driver version 0.0.6 loaded
cx88/2: cx2388x MPEG-TS Driver Manager version 0.0.6 loaded
cx88[0]: subsystem: 0070:6902, board: Hauppauge WinTV-HVR4000 DVB-S/S2/T/Hybrid [card=59,autodetected]
cx88[0]: TV tuner type 63, Radio tuner type -1
cx2388x alsa driver version 0.0.6 loaded
cx88[0]: i2c init: enabling analog demod on HVR1300/3000/4000 tuner
tveeprom 2-0050: Hauppauge model 69009, rev B2D3, serial# 2807241
tveeprom 2-0050: MAC address is 00-0D-FE-2A-D5-C9
tveeprom 2-0050: tuner model is Philips FMD1216MEX (idx 133, type 63)
tveeprom 2-0050: TV standards PAL(B/G) PAL(I) SECAM(L/L') PAL(D/D1/K) ATSC/DVB Digital (eeprom 0xf4)
tveeprom 2-0050: audio processor is CX882 (idx 33)
tveeprom 2-0050: decoder processor is CX882 (idx 25)
tveeprom 2-0050: has radio, has IR receiver, has no IR transmitter
cx88[0]: hauppauge eeprom: model=69009
input: cx88 IR (Hauppauge WinTV-HVR400 as /class/input/input3
cx88[0]/0: found at 0000:04:08.0, rev: 5, irq: 20, latency: 32, mmio: 0xfa000000
tuner' 2-0043: chip found @ 0x86 (cx88[0])
tda9887 2-0043: tda988[5/6/7] found
tuner' 2-0061: chip found @ 0xc2 (cx88[0])
tuner-simple 2-0061: type set to 63 (Philips FMD1216ME MK3 Hybrid Tuner)
tuner' 2-0063: chip found @ 0xc6 (cx88[0])
cx88[0]/0: registered device video0 [v4l2]
cx88[0]/0: registered device vbi0
cx88[0]/0: registered device radio0
cx88[0]/2: cx2388x 8802 Driver Manager
cx88[0]/1: CX88x/0: ALSA support for cx2388x boards
cx88/2: cx2388x dvb driver version 0.0.6 loaded
cx88/2: registering cx8802 driver, type: dvb access: shared
cx88[0]/2: subsystem: 0070:6902, board: Hauppauge WinTV-HVR4000 DVB-S/S2/T/Hybrid [card=59]
cx88[0]/2: cx2388x based DVB/ATSC card
DVB: registering new adapter (cx88[0])
DVB: registering frontend 0 (Conexant CX22702 DVB-T)...


When Enabled for DVB-S/S2 multiproto (options cx88-dvb frontend=0) (Kernel 2.6.23.1)
------------------------------------------------------------------------------------
cx2388x v4l2 driver version 0.0.6 loaded
CORE cx88[0]: subsystem: 0070:6902, board: Hauppauge WinTV-HVR4000 DVB-S/S2/T/Hybrid [card=58,autodetected]
TV tuner 63 at 0x1fe, Radio tuner -1 at 0x1fe
cx2388x cx88-mpeg Driver Manager version 0.0.6 loaded
cx88[0]: i2c init: enabling analog demod on HVR1300/3000/4000 tuner
tveeprom 2-0050: Hauppauge model 69009, rev B2D3, serial# 2807241
tveeprom 2-0050: MAC address is 00-0D-FE-2A-D5-C9
tveeprom 2-0050: tuner model is Philips FMD1216MEX (idx 133, type 63)
tveeprom 2-0050: TV standards PAL(B/G) PAL(I) SECAM(L/L') PAL(D/D1/K) ATSC/DVB Digital (eeprom 0xf4)
tveeprom 2-0050: audio processor is CX882 (idx 33)
tveeprom 2-0050: decoder processor is CX882 (idx 25)
tveeprom 2-0050: has radio, has IR receiver, has no IR transmitter
cx88[0]: hauppauge eeprom: model=69009
input: cx88 IR (Hauppauge WinTV-HVR400 as /class/input/input3
cx88[0]/0: found at 0000:04:08.0, rev: 5, irq: 20, latency: 32, mmio: 0xfa000000
cx2388x alsa driver version 0.0.6 loaded
tuner 2-0043: chip found @ 0x86 (cx88[0])
tda9887 2-0043: tda988[5/6/7] found @ 0x43 (tuner)
tuner 2-0061: chip found @ 0xc2 (cx88[0])
tuner 2-0061: type set to 63 (Philips FMD1216ME MK3 Hybrid Tuner)
tuner 2-0061: type set to 63 (Philips FMD1216ME MK3 Hybrid Tuner)
tuner 2-0063: chip found @ 0xc6 (cx88[0])
cx88[0]/0: registered device video0 [v4l2]
cx88[0]/0: registered device vbi0
cx88[0]/0: registered device radio0
cx88[0]/2: cx2388x 8802 Driver Manager
cx88[0]/2: found at 0000:04:08.2, rev: 5, irq: 20, latency: 32, mmio: 0xf8000000
cx2388x dvb driver version 0.0.6 loaded
cx8802_register_driver() ->registering driver type=dvb access=shared
CORE cx88[0]: subsystem: 0070:6902, board: Hauppauge WinTV-HVR4000 DVB-S/S2/T/Hybrid [card=58]
cx88[0]/2: cx2388x based dvb card
ACPI: PCI Interrupt 0000:04:08.1[A] -> Link [APC1] -> GSI 16 (level, low) -> IRQ 20
cx88[0]/1: CX88x/0: ALSA support for cx2388x boards
DVB: registering new adapter (cx88[0])
DVB: registering frontend 0 (Conexant CX24116/CX24118)...
cx24116_firmware_ondemand: Waiting for firmware upload (dvb-fe-cx24116.fw)...
cx24116_firmware_ondemand: Waiting for firmware upload(2)...
cx24116_firmware_ondemand: Firmware upload complete


Multi Frontend Drivers (kernel 2.6.24)
--------------------------------------

cx88/0: cx2388x v4l2 driver version 0.0.6 loaded
cx88/2: cx2388x MPEG-TS Driver Manager version 0.0.6 loaded
cx88[0]: subsystem: 0070:6902, board: Hauppauge WinTV-HVR4000 DVB-S/S2/T/Hybrid [card=59,autodetected], frontend(s): 2
cx88[0]: TV tuner type 63, Radio tuner type -1
cx2388x alsa driver version 0.0.6 loaded
cx88[0]: i2c init: enabling analog demod on HVR1300/3000/4000 tuner
tveeprom 2-0050: Hauppauge model 69009, rev B2D3, serial# 2807241
tveeprom 2-0050: MAC address is 00-0D-FE-2A-D5-C9
tveeprom 2-0050: tuner model is Philips FMD1216MEX (idx 133, type 63)
tveeprom 2-0050: TV standards PAL(B/G) PAL(I) SECAM(L/L') PAL(D/D1/K) ATSC/DVB Digital (eeprom 0xf4)
tveeprom 2-0050: audio processor is CX882 (idx 33)
tveeprom 2-0050: decoder processor is CX882 (idx 25)
tveeprom 2-0050: has radio, has IR receiver, has no IR transmitter
cx88[0]: hauppauge eeprom: model=69009
input: cx88 IR (Hauppauge WinTV-HVR400 as /class/input/input3
cx88[0]/2: cx2388x 8802 Driver Manager
cx88[0]/2: found at 0000:04:08.2, rev: 5, irq: 21, latency: 32, mmio: 0xf8000000
cx8802_probe() allocating 2 frontend(s)
cx88[0]/0: found at 0000:04:08.0, rev: 5, irq: 21, latency: 32, mmio: 0xfa000000
cx88/2: cx2388x dvb driver version 0.0.6 loaded
cx88/2: registering cx8802 driver, type: dvb access: shared
cx88[0]/2: subsystem: 0070:6902, board: Hauppauge WinTV-HVR4000 DVB-S/S2/T/Hybrid [card=59]
cx88[0]/2: cx2388x based DVB/ATSC card
tuner' 2-0043: chip found @ 0x86 (cx88[0])
tda9887 2-0043: tda988[5/6/7] found
tuner' 2-0061: chip found @ 0xc2 (cx88[0])
tuner-simple 2-0061: type set to 63 (Philips FMD1216ME MK3 Hybrid Tuner)
tuner' 2-0063: chip found @ 0xc6 (cx88[0])
cx88[0]/0: registered device video0 [v4l2]
cx88[0]/0: registered device vbi0
cx88[0]/0: registered device radio0
cx88[0]/1: CX88x/0: ALSA support for cx2388x boards
tda9887 2-0043: i2c i/o error: rc == -121 (should be 4)
DVB: registering new adapter (cx88[0])
DVB: registering adapter 0 frontend 0 (Conexant CX24116/CX24118)...
DVB: registering adapter 0 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.20.79.0
cx24116_firmware_ondemand: Firmware upload complete

Remote Control Support

When you have installed the drivers check dmesg/logs and you'll find a line like:

input: CX88 IR (Hauppauge WinTV-HVR4000 as /class/input/inputX

You can run lirc for example like: lircd --driver=dev/input --device=/dev/input/eventX (replace X with what it finds in the dmesg)

  Debian: edit /etc/lirc/hardware.conf
  DRIVER="dev/input"
  DEVICE="/dev/input/eventX"

/etc/lirc/lircd.conf (Works)

begin remote

  name  Hauppauge-HVR4000-Remote
  bits           16
  eps            30
  aeps          100

  one             0     0
  zero            0     0
  pre_data_bits   16
  pre_data       0x8001
  gap          133325
  toggle_bit_mask 0x8001001C

      begin codes
          Power                    0x0074
          Go                       0x0161
          TV                       0x0179
          Video                    0x0189
          Music                    0x0188
          Pictures                 0x016F
          Guide                    0x016D
          Radio                    0x0181
          Up                       0x0067
          Down                     0x006C
          Left                     0x0069
          Right                    0x006A
          OK                       0x001C
          Back/Exit                0x00AE
          Menu                     0x008B
          PrevCh                   0x019C
          Mute                     0x0071
          Vol+                     0x0073
          Vol-                     0x0072
          Ch+                      0x0192
          Ch-                      0x0193
          Rec                      0x00A7
          Stop                     0x0080
          Play                     0x00CF
          Pause                    0x0077
          Rewind                   0x00A8
          Forward                  0x00D0
          Replay                   0x00A5
          Skip                     0x00A3
          1                        0x0002
          2                        0x0003
          3                        0x0004
          4                        0x0005
          5                        0x0006
          6                        0x0007
          7                        0x0008
          8                        0x0009
          9                        0x000A
          0                        0x000B
          Text                     0x0184
          Sub/CC                   0x0172
          Red                      0x018E
          Green                    0x018F
          Yellow                   0x0190
          Blue                     0x0191
      end codes

end remote

External Links