Tag Archives: DVB

Mantis drivers

This is from www.verbraak.org/wiki/index.php/Linux_Mantis_driver but his site seems to be down a lot so I have mirrored it here because I am trying to get my 1034 card to work with Linux.

 

Linux Mantis driver

From My Interesting Version

Jump to: navigation, search

Currently the Mantis chipset driver for linux is in Alpha state.

This Mantis chipset is used on DVB board for reception of DVB-T, DVB-S, DVB-S2, DVB-C signals.

In this small Howto i explain how I got the mantis driver up and
running in my vanilla linux kernel.
I had to do it in this way because I also own two Hauppauge PVR cards
(PVR-350 and PVR-150) which do not work well with the mantis module.

This example has been tested with linux kernel source 2.6.22
and the ivtv driver from the linuxtv.org hg reposititory and the one
included in the kernel on a Fedora Core 6 setup.

WARNING: IVTV 0.10.3 and Mantis and kernel 2.6.21 and up do not work together.
From kernel 2.6.22 the ivtv module is part of the kernel and you do not need to download it from the ivtvdriver.org website.
To get ivtv and the mantis working in kernel 2.6.21 and up you need to add extra module parameters to the saa7115 module. 
See the instructions at the end for this.

[edit] Following steps you need to take (short ways for kernel 2.6.23.1):

  • Download the patch file for kernel 2.6.23.1.
  • use your current kernel or take a kernel source tree from http://www.kernel.org. Make sure you have the kernel headers/sources files/packages installed and you have the kernel up and running.
  • Apply the patch.
#> cd <path to kernel source>
#> patch -p1 < <path to mantis-2.6.23.1.patch file>/mantis-2.6.23.1.patch
  • Activate the mantis modules in your kernel config. Answer yes to the Mantis parts.
#> make oldconfig
  • Compile.
#> make
#> make modules_install
  • When you use your current kernel sources do load the modules
#> modprobe mantis
#> dmesg | grep -i dvb
found a VP-1034 PCI DVB-S/DSS device on (02:05.0),
DVB: registering new adapter (Mantis dvb adapter).
mantis_frontend_init (0): Probing for MB86A16 (DVB-S/DSS)
mantis_frontend_init (0): found MB86A16 DVB-S/DSS frontend @0x08
DVB: registering frontend 0 (Fujitsu MB86A16 DVB-S)...

[edit] Following steps you need to take (long way for kernels 2.6.21 and up):

  • use your current kernel or take a kernel source tree from http://www.kernel.org. Make sure you have the kernel headers/sources files/packages installed and you have the kernel up and running.
  • Get the mantis dvb source tree from http://jusst.de/hg/mantis/archive/tip.tar.bz2
  • Copy the directory <path to mantis
    tree>/linux/drivers/media/dvb/mantis to <path to kernel
    source>/drivers/media/dvb/
  • Add the following three lines to the file <path to kernel
    source>/drivers/media/dvb/Kconfig. Add them before the last entry in
    this file.
comment "Supported Mantis Adapters"
depends on DVB_CORE && PCI && I2C
source "drivers/media/dvb/mantis/Kconfig"
  • Add the following option "mantis/" to the file path to kernel source>/drivers/media/dvb/Makefile. It should look like this
#
# Makefile for the kernel multimedia device drivers.
# 
obj-y        := dvb-core/ frontends/ ttpci/ ttusb-dec/ ttusb-budget/ b2c2/ bt8xx/ cinergyT2/ dvb-usb/ pluto2/ mantis/
  • Copy the files <path to mantis
    tree>/linux/drivers/media/dvb/frontends/mb86a16* to <path to
    kernel source>/drivers/media/dvb/frontends
  • Copy the files <path to mantis
    tree>/linux/drivers/media/dvb/frontends/cu1216* to <path to
    kernel source>/drivers/media/dvb/frontends
  • Add the following lines to the file <path to kernel source>/drivers/media/dvb/frontends/Kconfig just after the config DVB_TDA10086
config DVB_MB86A16
tristate "Fujitsu MB86A16 based"
depends on DVB_CORE && I2C
default m
help
A DVB-S/DSS tuner module. Say Y when you want to support this frontend.
config DVB_CU1216
tristate "Philips CU1216 tuner based"
depends on DVB_CORE && I2C
default m
help
A DVB-C tuner module. Say Y when you want to support this frontend.
  • Add the following two lines to the file <path to kernel source>/drivers/media/dvb/frontends/Makefile
obj-$(CONFIG_DVB_MB86A16) += mb86a16.o
obj-$(CONFIG_DVB_CU1216) += cu1216.o
  • Change in the file <path to kernel
    source>/drivers/media/dvb/frontends/cu1216.c line 37 to look like
    this (ignore the line numbers)
     34 #include <linux/slab.h>
35  
36 #include "dvb_frontend.h"
37 #include "../mantis/mantis_core.h"
38 #include "cu1216.h"
39 #include "cu1216_regs.h"
  • You can now compile your kernel in the normal way and install
    the modules. If you wish to make sure the Mantis modules have been
    selected do a make menuconfig
#> cd <path to kernelsource>
#> make menuconfig
#> make
#> make modules_install
  • When you use your current kernel sources do load the modules
#> modprobe mantis
#> dmesg | grep -i dvb
found a VP-1034 PCI DVB-S/DSS device on (02:05.0),
DVB: registering new adapter (Mantis dvb adapter).
mantis_frontend_init (0): Probing for MB86A16 (DVB-S/DSS)
mantis_frontend_init (0): found MB86A16 DVB-S/DSS frontend @0x08
DVB: registering frontend 0 (Fujitsu MB86A16 DVB-S)...
  • Check the output of the dmesg command to see if the mantis modules loaded. Sometimes a reboot of the system is needed.
  • IMPORTANT: For kernels 2.6.21 and below the order in which you do the installations is also important. Every time you perform a make modules_install for the kernel you need to do the make install for the ivtv driver as well.


To get the Hauppauge cards working do the following:

#> tar -zxvpf ivtv-0.10.5.tar.gz
#> cd ivtv-0.10.5
#> make; make install
#> cd /lib/firmware
#> wget http://dl.ivtvdriver.org/ivtv/firmware/firmware.tar.gz
#> tar -zxvpf firmware.tar.gz
  • Load the ivtv modules:
#> modprobe ivtv
#> dmesg | grep -i ivtv
ivtv:  ==================== START INIT IVTV ====================
ivtv:  version 0.10.3 (development snapshot compiled on zo 20 mei 2007 08:57:55 CEST) loading
ivtv:  Linux version: 2.6.21.1 SMP mod_unload PENTIUM4 4KSTACKS 
ivtv:  In case of problems please include the debug info between
ivtv:  the START INIT IVTV and END INIT IVTV lines, along with
ivtv:  any module options, when mailing the ivtv-users mailinglist.
ivtv0: Autodetected Hauppauge card (cx23415 based)
ivtv0: loaded v4l-cx2341x-enc.fw firmware (376836 bytes)
ivtv0: loaded v4l-cx2341x-dec.fw firmware (262144 bytes)
ivtv0: Encoder revision: 0x02060039
ivtv0: Decoder revision: 0x02020023
ivtv0: Autodetected Hauppauge WinTV PVR-350
tuner 1-0061: chip found @ 0xc2 (ivtv i2c driver #0)
saa7115 1-0021: saa7115 found (1f7115d0e100000) @ 0x42 (ivtv i2c driver #0)
saa7127 1-0044: saa7127 found @ 0x88 (ivtv i2c driver #0)
msp3400 1-0040: MSP4418G-A2 found @ 0x80 (ivtv i2c driver #0)
ivtv0: Registered device video0 for encoder MPEG (4 MB)
ivtv0: Registered device video32 for encoder YUV (2 MB)
ivtv0: Registered device vbi0 for encoder VBI (1 MB)
ivtv0: Registered device video24 for encoder PCM audio (1 MB)
ivtv0: Registered device radio0 for encoder radio
ivtv0: Registered device video16 for decoder MPEG (1 MB)
ivtv0: Registered device vbi8 for decoder VBI (1 MB)
ivtv0: Registered device vbi16 for decoder VOUT
ivtv0: Registered device video48 for decoder YUV (1 MB)
ivtv0: loaded v4l-cx2341x-init.mpg firmware (155648 bytes)
ivtv0: Initialized Hauppauge WinTV PVR-350, card #0
ivtv:  ======================  NEXT CARD  ======================
ivtv1: Autodetected Hauppauge card (cx23416 based)
ivtv1: loaded v4l-cx2341x-enc.fw firmware (376836 bytes)
ivtv1: Encoder revision: 0x02060039
tuner 2-0043: chip found @ 0x86 (ivtv i2c driver #1)
tuner 2-0061: chip found @ 0xc2 (ivtv i2c driver #1)
ivtv1: Autodetected Hauppauge WinTV PVR-150
ivtv1: reopen i2c bus for IR-blaster support
tuner 2-0043: chip found @ 0x86 (ivtv i2c driver #1)
tuner 2-0061: chip found @ 0xc2 (ivtv i2c driver #1)
cx25840 2-0044: cx25843-23 found @ 0x88 (ivtv i2c driver #1)
wm8775 2-001b: chip found @ 0x36 (ivtv i2c driver #1)
ivtv1: Registered device video1 for encoder MPEG (4 MB)
ivtv1: Registered device video33 for encoder YUV (2 MB)
ivtv1: Registered device vbi1 for encoder VBI (1 MB)
ivtv1: Registered device video25 for encoder PCM audio (1 MB)
ivtv1: Initialized Hauppauge WinTV PVR-150, card #1
ivtv:  ====================  END INIT IVTV  ====================
  • Check the output of the dmesg command. Sometimes a reboot is needed.

When you are using kernel 2.6.21 and higher ivtv and mantis will
nog work together. Depening on which module loads first the mantis
module will freeze.

To resolve this problem you will have to add extra module parameters to the saa7115 module.
Do the following to determine the values for the module parameters:

  • Get i2c bus number used by the Mantis driver.
#> modprobe i2c-dev
#> i2cdetect -l
i2c-3   i2c             ivtv i2c driver #1                      I2C adapter
i2c-2   i2c             ivtv i2c driver #0                      I2C adapter
i2c-1   smbus           Mantis I2C                              SMBus adapter
i2c-0   smbus           SMBus I801 adapter at 0400              SMBus adapter
  • The i2c bus used by the Mantis driver is bus 1 (see i2c-1 part) in this example.
  • Add the following line to your /etc/modprobe.conf
options saa7115 ignore=1,0x25,1,0x24,1,0x21,1,0x20
  • Replace all the 1’s (one’s) with your i2c bus number leave the hexadecimal numbers intact.
  • Now reboot your machine and both the mantis and the ivtv modules should load without a problem and work without a problem.

Continue reading

Posted in Computers | Tagged , , | Leave a comment

Gentoo MythTV and Dvico DVB

OMG what a world of hurt I have put myself in.

I decided to upgrade my computer at home so I could play Battlefield 2 properly. So now I have a DFI Nforce 4 SLI motherboard with 2Gb of OCZ Ram, a AMD 3000 Venice core processor clocked up to 2339Mhz (above the default 1800Mhz) and a brand spanking 7800GT graphics card….hmmmmm

Expensive stuff. Anyway my old PC was now suitable for use as a PVR and I did have my old Windows XP system working well with the Dvico software and boring old Windows. It worked looked nice but user interface wise it wasn’t working very well with the TV.

So here come Linux. I have started learning Linux by installing Gentoo at work. It’s good for the task. I have an old P3 500Mhz machine I wanted as a LAMP server so I could run Cacti to monitor all the SNMP devices at the paper machine I work on. It works well and uses the hardware better than Windows 2000 did.

But Linux and digital TV. Damn its not easy. I started with Ubuntu thinking it would be quite easy. It was….kind of. Got it going quickly but it was frustrating how it was hiding things from me. I found it confusing partitioning the disks because I didn’t know how it was going to boot the system. So I mucked around a bit but it worked. Ubuntu started up into Gnome fine, more mucking around and I had TV out working…nice. Little more and the Wireless network was going. But to get the USB wireless keyboard to work….nah. Try to install Myth….nah. Stuff it, I’ll stick with what I know and at least compiling from source I can add patches as I need and not be afraid when I compile the kernel that it will be broken.

Continue reading

Posted in Computers | Tagged , , , , | Leave a comment