DVB installation

From VDR Wiki
Jump to navigation Jump to search

Howto make your DVB card working.

Note: here, we can give only general installation information (as for the example of a full featured DVB card [1] with hardware decoder). Best is you search for your specific device name in the DVB Wiki.

Introduction

You need a recent Linux kernel with some special settings. Whether it is a kernel from the 2.4 series or the 2.6 series depends on personal preference and/or other requirements.

Get the kernel source code from [2] and decompress it under /usr/src as user root.

su
cd /usr/src
tar -jxvf linux-<VERSION>.tar.bz2
ln -s linux-<VERSION> linux

Kernel 2.4

Requirements

  • The kernel needs V4L support and Input core support
Multimedia devices  --->
  <*> Video For Linux

Input core support  --->
  <*> Input core support
  <*>   Event interface support

Driver installation

The driver can be obtained from LinuxTV. The version used for the development of VDR can be obtained from the VDR homepage.

First the downloaded archive has to be decompressed and a symbolic link from DVB to the new directory has to be created

cd $SOURCEDIR
tar -xvjf /path/to/linux-dvb.2003-11-08.tar.bz2
ln -s linux-dvb.2003-11-08 DVB
cd DVB/driver

Before compiling the DVB driver the Makefile can be adapted. For a 'normal' (hardware decoding) DVB card it should work as is.

##
#  Configs
#

CARDS = av7110
#CARDS += margi
#CARDS += em8300
CARDS += b2c2

then a simple

make
make install

Configuration

Loading the driver (still from the DVB source directory)

make insmod CARDS="av7110"

With an older driver a "Convergence" could be seen on the TV. Otherwise a lsmod outputs a list of loaded modules. E.g.

Module                  Size  Used by
lirc_serial             7040   1
lirc_dev                8320   1  [lirc_serial]
dvb-ttpci             300736   8
evdev                   4160   0  (unused)
input                   3072   0  [dvb-ttpci evdev]
mt312                   5088   0
tda1004x                7952   0
ves1820                 4304   0
stv0299                 6592   0  (unused)
grundig_29504-491       3200   0
grundig_29504-401       3584   0
alps_tdlb7              4992   0
alps_tdmb7              3360   0
alps_bsrv2              3456   1
dvb-core               36720  31  [dvb-ttpci mt312 tda1004x ves1820 stv0299 grundig_29504-491 grundig_29504-401 alps_tdlb7 alps_tdmb7 alps_bsrv2]
videodev                4544   2  [dvb-ttpci]
ipv6                  124736  -1  (autoclean)
8139too                11936   1  (autoclean)
reiserfs              147920   2

To unload the driver

make rmmod CARDS="av7110"

Kernel 2.6

There are two possibilities the get a DVB driver for kernel 2.6

  • a separate driver
  • the driver included in the kernel

Requirements

The following kernel option has to be selected to get the kernel DVB driver. Either compiled into kernel or as kernel modules.

Device Drivers  --->
  Multimedia devices  --->
    Digital Video Broadcasting Devices  --->
      [*] DVB For Linux
      <*>   DVB Core Support
      ---   Supported Frontend Modules
      <*> (whatever is appropiate)
      <*> AV7110 cards
      [*]   Compile AV7110 firmware into the driver (NEW)
      [*]   AV7110 OSD support

When the firmware should be compiled into the kernel and the above option is not visible, then

Code maturity level options  --->
  [ ]   Select only drivers that don't need compile-time external firmware

has to be deselected before.

Firmware may be downloaded from http://www.linuxtv.org/downloads/firmware/

For AV7710 based cards and kernel compiled without firmware into the driver, if you use the hotplug firmware loader you must put the firmware file in /lib/firmware/dvb-ttpci-01.fw (in previous versions of the Linux hotplug scripts it was /usr/lib/hotplug/firmware/dvb-ttpci-01.fw)

Driver Installation

If possible compile the driver as modules, then it can be reloaded without reboot after a crash. After the rest of the kernel is configured

make
make modules_install

and the kernel is to be installed. See the documentation about kernel compilation for further information.

Configuration

In 2004, the DVB driver in kernel 2.6 got the official major device number 212. Before it was the experimental major device number 250. So be aware of it if updating the system. (Under kernel 2.4 the major device number is still 250.)

The following script will help to change the major device number to 212.

#!/bin/sh
rm -rf /dev/dvb/adapter*/*
device=0
for card in `seq 0 3`; do
  mkdir -p /dev/dvb/adapter$card
  device=`echo $card \* 64 | bc`
  for dev in video audio sec frontend demux dvr ca net osd; do
    mknod /dev/dvb/adapter${card}/${dev}0 c 212 $device
    chmod 0660 /dev/dvb/adapter${card}/${dev}0
    let device=device+1
  done
done

If you're using a recent 2.6-series kernel with udev, you should find that the device nodes are created automatically.

If using a recent kernel but a not recent udev (like the one present in Suse 9.2) you may need to update configuration of udev according to http://mythtv.org/pipermail/mythtv-users/2005-January/067169.html

CVS

cvs -d :pserver:anonymous@linuxtv.org:/cvs/linuxtv login
cvs -d :pserver:anonymous@linuxtv.org:/cvs/linuxtv co dvb-kernel

Links

[1] http://www.linuxtv.org/ LinuxTV homepage
[2] http://www.kernel.org/ Linux kernel homepage
[3] http://www.linux-dvb.tv/download/ Nightly driver snapshots from Convergence DVB driver
[4] http://www.cadsoft.de/vdr/ VDR homepage
[5] ftp://ftp.cadsoft.de/vdr/Developer/ VDR FTP download directory
[6] http://www.linuxtv.org/cgi-bin/viewcvs.cgi/dvb-kernel/linux/Documentation/dvb/?only_with_tag=HEAD#dirlist DVB Documentation from cvs sources

}