Kernel Support

Kernels 2.6.28-rc1 and later have a working multiple frontend driver built in.

Darron Broad & Fabio M. Di Nitto HVR3000/4000 comes in two flavours as a diff patch, one with a single frontend (you select frontend via options flag in modprobe.conf eg single /dev/adapter0/fe0) and the other with both frontends (selectable from adapter0/fe0 and adapter fe1)

This uses work from Steve Toths original HVR3000 repository (at time of writing 16 months old and will not compile with current v4l-dvb)

Driver Sources

Steve Toth's repository (22 Sep 2008)

On September 2008, you can get patched v4l sources from Steve Toth's repository ( http://linuxtv.org/hg/~stoth/s2-mfe/ ) via mercurial and you won't have to get any patch to get working this card (this version also has got support for HVR4000). It has been tested on Ubuntu 8.04.1 (working DVB-T and DVB-S, analogue audio didn't work for me) with a 2.6.24-21-generic kernel version/flavour. The way to compile the modules is the same as it would be getting the official v4l sources but without having to patch them. The way to get the v4l "patch included" sources is (supposing that you have mercurial installed):

# hg clone -r 8894 http://linuxtv.org/hg/~stoth/s2-mfe

After it, on the s2-mfe directory you get a patched version of the v4l drivers. Maybe you will want/need to configure it, with a "make menuconfig". Finally, just compile and install the modules:

# make && make install

Remember: on ubuntu you need to delete the "original" modules for cx88 and saa7134

On Ubuntu 8.10 Intrepid, when kernel changed from 2.6.27-7 to 2.6.27-9 or to 2.6.27-11,
you must delete the previous kernel headers 2.6.27-nn, the old modules in directories cx88 and saa7134
(they are now in /lib/modules/`uname -r`/kernel/drivers/media/video/. ),
do a depmod -a, then download the new s2-mfe tree, recompile and reinstall.

kewl.org HVR3000 (06 Mar 08)

Please follow these instructions based on FC8/Ubuntu 8.04 using yum or apt-get.

# yum install mercurial

Or

# apt-get install mercurial

As the current patch does NOT work with the current version of v4l you will have to pull a working revision from the repository. In order to do that you will have to install one of the newer versions of mercurial. So if your version of Mercurial doesn't support revisions you will have to get an updated package or compile a current version yourself.

Then get the diff you want (sfe or mfe). Note how the filename represents the version of the v4l repository that you have to use. You can also check at http://dev.kewl.org/hauppauge if a newer version of the patch exists and use another version of the repository accordingly.

This step is only required if you are running an Ubuntu variant, after one of their bug fixes duplicated the modules being run.
This also may be useful to anyone who gets dmesg errors like : cx88xx: disagrees about version of symbol (videobuf_dma_free)

If you apply the patch and get errors, you can contact Darron at kewl dot org whom will most likely refresh the patch against the latest v4l-dvb, or jarb1 at uk2 dot net whom has a tar.gz copy of the v4l-dvb the above patch works with (Well works with FC8 2.6.23 anyway)

(With plan B ====DVB-S==== Only; No further configuration is applicable; You may configure the Kaffiene and watch Sat on Linux :))

Single Frontend Diff (sfe)

Now all you need to do is edit /etc/modprobe.conf to have

This option will load the DVB-S/S2 frontend and is
the default:
options cx88-dvb frontend=0

This option will load the DVB-T frontend:
options cx88-dvb frontend=1

NOTE: On Debian and Ubuntu Systems you will have to enter /etc/modprobe.d/ and create a custom named file that holds the above mentioned content.

Multiple Frontend Diff (mfe)

No further configuration is applicable.

Enter directory /dev/dvb/adapterX for the HVR3000 and you should see more than one frontend (eg. demux0 demux1 dvr0 dvr1 frontend0 frontend1 net0 net1). If you only see one of each then the HVR3000 has not installed correctly and your kernel is running the release version of V4l_DVB which presently has no support for the DVB-S side of HVR3000.

If the module has not loaded (/sbin/lsmod) try

# modprobe cx88_dvb

Problems

On Ubuntu Hardy with the latest kernel the driver doesn't survive suspend/resume. tested with Mythtv using Plan A (sfe).
On Ubuntu Jaunty with the latest kernel trying to use DVB-T:

Testing

DVB-T

To test DVB-T the scandvb command can be used. Use the relevant channel info in the dvb-t folder for your transmitter.

# scandvb /usr/share/dvb-apps/dvb-t/uk-EmleyMoor > channels.conf

If the card is working this will create a channels.conf file with the channel information

To test you can copy the channels.conf into your ~/.mplayer folder and view with mplayer by issuing a command like

# mplayer dvb://0@'BBC ONE'

Note : Some dvb-apps : scandvb is dvbscan

DVB-S

For testing DVB-S we also use scan DVB with the provided initial tuning data. Use the correct data for your satelite. Note the -f (frontend) and -d demux options to select the correct frontend. You can also specify which DVB adapter by adding option -a 2 for /dev/dvb/adapter2 etc.

MythTv users don't forget to set the Diseqc option to LNB if you have a basic satelite dish.

Sound

This part of the article is original and has not been rewritten since Steve Toths version as I use the onboard sound card.

To hear sound from the card you will need to pipe the sound output from the cards sound device back into your sound card. There are a number of ways of doing it, but I only managed to make 1 work properly. In theory you can use sox to stream from one device to another, but I had problems with resampling and it just sounded wrong. You can also use arecord to get data from the alsa device, then pipe it to aplay using - as a source (stdin), but when I did that the sound came out nearly a second later than the picture. I had success only using mplayer:-

Where My Sky DigiBox is tuned to channel 25, my video card is /dev/video0 it's PAL-I (europe-west) and the cx88_alsa device is card2 sub 0 (ie hw.2,0). I want sound in stereo (amode=1) at 48k. I had problems with buffers overflowing, so I set the buffersize to twice what was needed and the sound is now perfect.

My Sky DigiBox is setup for a 16:9 screen, even though PAL-I isn't so the -aspect 16:9 corrects the screen size

Useful Information

Remote Control

The HVR3000 has onboard IR receiver. This can be configured by following the V4L wiki here at LinuxTV. Search Remote Contollers.

I found however when you booted with or without a keyboard and mouse the event no changed and you had to manually start lircd each time. The following bash script is a simple way of automatically determining the event no and starting lircd.

The startup script has a work around for systems with more than one HVR3000 card. Please adjust the cardno to start.

Multiple Frontends

There does not seem to be a consensus on multiple frontends and how to handle them in applications. The basic DVB apps can easily select the correct frontend, but for instance in MythTV this support is not available and will only select a complete adapter.