Difference between revisions of "IVTV Install"

From MythTV Official Wiki
Jump to: navigation, search
m
Line 144: Line 144:
 
  modprobe ivtv-fb
 
  modprobe ivtv-fb
  
Check the output from dmesg as this will show you which fb device ivtv-fb has grabbed.
+
Check the output from [[dmesg]] as this will show you which fb device ivtv-fb has grabbed.
 
eg in a system thatis already using the vesafb module it may show
 
eg in a system thatis already using the vesafb module it may show
 
   fb1: iTVC15 TV out frame buffer device
 
   fb1: iTVC15 TV out frame buffer device

Revision as of 21:53, 9 November 2008

These instructions are for installing the ivtv driver as a module.

There have been quite a few changes in the module parameters since 0.1.9 and early 'ck' releases. The current version will almost certainly require changes to /etc/modules.conf, /etc/modprobe.conf or /etc/modprobe.d/ or wherever your distribution manages module parameters. The intention is that autodetection works for most people and no module parameters are needed.

Basic Checklist

1. Check the kernel configuration (see approriate section below) and rebuild, install and reboot if neccesary

2. Type:

cd .../src/drivers/ivtv/

3. Unpack the tarball (tar -xzf ivtv-*.tgz)

4. Type:

cd ivtv-*/driver

5. Type:

make (or make EXTRAVERSION=whatever)

6. Type:

make install (or make EXTRAVERSION=whatever install)

7. Stop Myth and (if using ivtv-fb) X and any other applications using the driver

8. Unload any old drivers.

rmmod ivtv-fb ivtv saa7127 saa7115 msp3400 tveeprom)

9. Fix your modules.conf (see 'Module configuration' below)

10. run: depmod -ae on RH/FC, modules-update on Gentoo, update-modules on Debian/Knopp Myth, varies on others

11. Type:

modprobe ivtv

12. Type:

modprobe ivtv-fb (if using the PVR350 framebuffer for X)

Kernel Configuration

Kernel 2.6

CONFIG needed:
I2C Support (y/m)
 I2C device interface (y/m)
  I2C Algorithms
    I2C bit-banging interfaces (y/m)
Multimedia Devices
  Video For Linux (y/m)
   Video Adapters (none)
   Radio Adapters (none)
  Digital Video Broadcasting (no)

Take care, the msp3400 driver should not be selected. If it is selected then you should see a warning when you install ivtv.

Comments:

  • The driver is not affected by the 4k/8k stacks kernel configuration.

Kernel 2.4

CONFIG needed:

(can we check this?)

General Comments

Note that the msp3400 driver supplied here is not the same as the one that comes with the kernel. 'make install' will try and tell you if the kernel has the standard driver built as a module already. Good practice is to either remove or rename your existing msp3400 driver.

Microtune 4049FM5 tuner

If you have a Microtune 4049FM5 tuner then you need to set the tda9887 ivtv module option to 0 when in the SECAM world, or to 1+ for others (need more precise data here!).

For this to work, make sure that tda9887.ko is from bttv version 0.9.15 or up, or from the 2.6.7 or up linux kernel.

Module configuration

Because everything should be properly auto-detected now, your mod{ules,probe}.conf file should contain *only* these lines for ivtv:

alias char-major-81 videodev
alias char-major-81-0 ivtv

The are a few exceptions, such as the tuner module type on AVerMedia M179 and Yuan MPG600 or Yuan MPG160 cards, and a few PAL-specific parameters.

If you're using the PVR-350's output, you should also have this line:

install ivtv /sbin/modprobe --ignore-install ivtv; /sbin/modprobe ivtv-fb

This will cause the framebuffer driver to load right after ivtv loads.

For Knopp Myth the file to change is /etc/modprobe.d/Knopp Myth

Creating device entries

If you are using udev or devfsd then devices should be created automatically.

You may need to:

for i in 0 1 2 3 16 32 48 224 ; do \
   if [ ! -f /dev/video$i ]; then \
      echo "Creating /dev/video$i" && mknod /dev/video$i c 81 $i && \
      chown :video /dev/video$i && \
      chmod 660 /dev/video$i; \
   else echo "/dev/video$i already exists";\
   fi;\
done
ln -s /dev/video0 /dev/video 

Here is a list of the base v4l devices:

crw-rw----    1 root     video     81,   0 Jun 19 22:22 /dev/video0
crw-rw----    1 root     video     81,  16 Jun 19 22:22 /dev/video16
crw-rw----    1 root     video     81,  24 Jun 19 22:22 /dev/video24
crw-rw----    1 root     video     81,  32 Jun 19 22:22 /dev/video32
crw-rw----    1 root     video     81,  48 Jun 19 22:22 /dev/video48
crw-rw----    1 root     video     81,  64 Jun 19 22:22 /dev/radio0
crw-rw----    1 root     video     81, 224 Jun 19 22:22 /dev/vbi0
crw-rw----    1 root     video     81, 228 Jun 19 22:22 /dev/vbi4
crw-rw----    1 root     video     81, 232 Jun 19 22:22 /dev/vbi8

note that the permissions are often restricted and that you may need to add users to a particular group in order that they might access the devices.

On Red Hat/Fedora Core systems, the device ownerships change automatically on login to permit access. (Changes to /etc/security/console.perms may be required for the vbi devices though).

Testing the installation

First see if it's fine: install the modules

 modprobe ivtv

Capture some video

 cat /dev/video0 > my.mpg

(press ctrl-c after a few seconds)

play it back

 dd if=my.mpg of=/dev/video16 bs=64k

With any luck you'll see a picture (or more likely static) and hear some sound.

You can now use ivtvctl to set the input (s-video, audio etc)

You may also now install the ivtv-fb module:

modprobe ivtv-fb

Check the output from dmesg as this will show you which fb device ivtv-fb has grabbed. eg in a system thatis already using the vesafb module it may show

 fb1: iTVC15 TV out frame buffer device

This value is what you need in your XF86Config-4

This can result in a black screen as nothing is being shown. ivtvfbctl allows you to change the alpha (transparency) settings:

ivtvfbctl /dev/fb1 -noglobalalpha -nolocalalpha
or
ivtvfbctl --device=/dev/fb1 --globalalpha=on --localalpha=on

would turn off the fb display (clearest possible video)

ivtvfbctl /dev/fb1 -globalalpha -localalpha -alpha 50
or
ivtvfbctl --device=/dev/fb1 --globalalpha=on --localalpha=on --alpha=50

would set the framebuffer to be transparency level 50 over the video.

Debugging

First make sure everything is wired up correctly.

Check video out

Remove the video generating module and start it with a testcard image:

rmmod saa7127
modprobe saa7127 test_image=1

You should see 8 coloured bars on the screen.

Then restore normal operation:

rmmod saa7127
modprobe saa7127

Page Allocation Failure

Some systems see occasional page allocation problems on module reload/init (even on systems with 1GB of ram). The following command may help:

echo 16384 > /proc/sys/vm/min_free_kbytes

See Also

  1. XV on PVR-350
  2. How-to on ivtvdriver.org
  3. Gentoo:HOWTO X windows through Hauppauge 350 TV Out