Upgrade to 2.6.22 seems to break everything in the ivtv suite. It all disappeared from the rpms, so we need to install from source.

* ivtv
* ivtv-fb
* ivtv-xdriver  

* ivtvfbctl (now gone)

In particular, some web posts indicate that support for the PVR-350 has been eliminated somehow. This doesn’t seem to be completely true - but maybe there’s a problem with the hardware decoding from MythTV. By doing the following, the PVR-350 can be made to display X in framebuffer mode, and do the output via the framebuffer too…

If the hardware-based decoding (which can be overlaid on the X display) can be made to work then the Use PVR-350 output in MythTV can be enabled. Which also means that doing MythTV should result in very low processor load.

ivtv and ivtv-fb on Fedora 7 : 2.6.22

yum install kernel-devel kernel-headers  

We don’t need to build the ivtv stuff entirely from source : the ivtv driver has now been moved into the kernel. However, the ivtv-fb isn’t in the kernel… So we need to compile that part afresh (the rest of ivtv is in the v4l-dvb / v4l tree, shown below).

This is the only part that needs to be done if you’re upgrading between 2.6.22.xx versions.

/sbin/modprobe ivtv-fb # Should fail now  
curl -O http://dl.ivtvdriver.org/ivtv/stable/ivtv-1.0.2.tar.gz  
tar -xzf ivtv-1.0.2.tar.gz  
cd ivtv-1.0.2/  
cp v4l-cx2341x-init.mpg /lib/firmware/  
make clean  
make   
make install # To create the ivtv-fb module  
/sbin/modprobe ivtv-fb # Should work now  

To install the firmware (may not be necessary now)

yum install ivtv-firmware  

or

cp ivtv-1.0.2/v4l-cx2341x-init.mpg /lib/firmware/  

For the v4l stuff - actually, may be better for ivtvfb

Do this only if the old FC6 v4l stuff is installed, since the control commands are expecting a different version of ivtv to be answering on the other end.

This includes the control suite necessary to change alpha and input/output channels on the card - so it’s important to have this in sync with the ivtv version.

Go to http://linuxtv.org/ and then pick up the most recent tar from the link at the top of the page : http://linuxtv.org/hg/v4l-dvb

mkdir -p /root/MythTV/2.6.22-ivtv/  
cd /root/MythTV/2.6.22-ivtv/  
curl -O http://linuxtv.org/hg/v4l-dvb/archive/tip.tar.gz   # around 2.7Mb  
tar -xzf tip.tar.gz  
cd v4l-dvb-* # Adjust this directory name  
make clean  
make  
make install  

ivtv-fb (?) : Installing Firmware

Fedora 7 : The location where hotplug expects firmware to be loaded into (for example, firmware for Cardbus cards) has changed from /usr/lib/hotplug/firmware to /lib/firmware. Existing firmware files must be moved into the new directory.

Get the firmware from the main ivtv page : http://ivtvdriver.org/index.php/Main_Page.

References :

  • http://www.gossamer-threads.com/lists/ivtv/users/36406

Fedora 7 xdriver

yum install video4linux  
yum remove ivtv_xdriver  # This is the old fc6 version  

Check whether it’s there already :

ls -l /usr/lib/xorg/modules/drivers/ | grep ivtv  

If there’s no ivtvdev_drv.so we need to build it :

curl -O http://ivtvdriver.org/viewcvs/xdriver/trunk.tar.gz?view=tar  
tar -xf trunk.tar.gz\?view\=tar  
cd trunk  
ls -l  
more README  
chmod 755 configure  
./configure --prefix=/usr/  
make clean  
make  
make install  

Setting up the modprobe configuration

Into /etc/modprobe.conf put :

# load ivtv-fb for PVR-350 output  
alias char-major-81 videodev  
alias char-major-81-0 ivtv  
options ivtv-fb osd_compat=1  
install ivtv /sbin/modprobe --ignore-install ivtv; /sbin/modprobe ivtv-fb  

Checking it all works

# ll /dev/video*  
lrwxrwxrwx  1 root    root      6 2007-06-13 09:18 /dev/video -> video0  
crw-------+ 1 yoshika root 81,  0 2007-06-13 09:18 /dev/video0  
crw-------+ 1 yoshika root 81, 16 2007-06-13 09:18 /dev/video16  
crw-------+ 1 yoshika root 81, 24 2007-06-13 09:18 /dev/video24  
crw-------+ 1 yoshika root 81, 32 2007-06-13 09:18 /dev/video32  
crw-------+ 1 yoshika root 81, 48 2007-06-13 09:18 /dev/video48  

`

/bin/dmesg |grep Initialized

ivtv0: Initialized Hauppauge WinTV PVR-350, card #0
[drm] Initialized drm 1.1.0 20060810
[drm] Initialized i915 1.6.0 20060119 on minor 0

This shows that the framebuffer is on /dev/fb0 :  

cat /proc/fb

0 cx23415 TV out

And, just to confirm :  

ls -l /dev/fb*

lrwxrwxrwx 1 root root 3 2007-06-13 09:18 /dev/fb -> fb0
crw——- 1 yoshika root 29, 0 2007-06-13 09:18 /dev/fb0

To find the BusId of the PVR-350 (for the /etc/X11/xorg.conf file) :  
  

/sbin/lspci | grep “Internext Compression”

01:05.0 Multimedia video controller: Internext Compression Inc iTVC15 MPEG-2 Encoder (rev 01)

### Testing the Devices Work

  
  
Set up the Inputs and Outputs to Composite (the RCA connectors) :  

v4l2-ctl -i 2

v4l2-ctl -o 2

Test the input connection :  

cat /dev/video0 > /tmp/test_capture.mpg

mplayer /tmp/test_capture.mpg

**NEW IN 2.6.22 : ivtvfbctl no longer working - must use v4l2 to control alpha**  
  
Set the framebuffer to be hidden :  

OLD VERSION : ivtvfbctl –device=/dev/fb0 –globalalpha=on –localalpha=on -v 0

v4l2-ctl –set-fmt-output-overlay=global_alpha=0

Get the video signal to passthrough :  

ivtvctl -K 1

This should show a passthrough video/audio signal.  
(or, as a one-liner :  
`# v4l2-ctl -i 2; v4l2-ctl -o 2; ``  
# OLD VERSION : ivtvfbctl --device=/dev/fb0 --globalalpha=on --localalpha=on -v 0  
# v4l2-ctl --set-fmt-output-overlay=global_alpha=0  
``  
ivtvctl -K 1  

)

Set the framebuffer to be entirely in front of MPEG decoder :

# OLD VERSION : ivtvfbctl --device=/dev/fb0 --globalalpha=on --localalpha=on -v 255  
# v4l2-ctl --set-fmt-output-overlay=global_alpha=255  
  

Set the framebuffer to be dimly in front of MPEG decoder :

# OLD VERSION : ivtvfbctl --device=/dev/fb0 --globalalpha=on --localalpha=on -v 100  
# v4l2-ctl --set-fmt-output-overlay=global_alpha=100  

Test whether the encode/decode cycle works :

# ivtvctl -K 0  
# dd if=/dev/video0 of=/dev/video16 bs=64k  

This may come in handy later :

# v4l2-ctl -d /dev/video0 --set-fmt-video=width=720,height=480  


Martin Andrews

{Finance, Software, AI} entrepreneur, living in Singapore with my family.