Setting up the TV output of the PVR-350

I looked at the following web pages:
	http://www.abarbaccia.com/component/option,com_smf/Itemid,39/expv,0/topic,67.new
	http://gentoo-wiki.com/HOWTO_X_windows_through_Hauppauge_350_TV_Out
	http://www.schaefer.dhcp.biz/pvr350tvout.htm
	http://wiki.osuosl.org/pages/viewpage.action?pageId=7041
	http://ozlabs.org/~jk/docs/mergefb/
Use lspci to find the bus address of the PVR-350 card. Look for Multimedia video controller: "Internext Compression Inc iTVC15 MPEG-2". Mine shows as:
	0000:02:02.0 
Which contains the bus, slot, and function. Convert to:
	BusID "PCI:02:02:0"
Run the following to show the frame buffers.
	cat /proc/fb
Before having the PVR-350 installed, mine shows:
	0 VGA16 VGA
Running the following shows the devices.
	ls /dev/fb* shows
Before the PVR-350 is installed, mine shows:
	/dev/fb0
After changing xorg.conf, /var/log/Xorg.0.log shows
	(EE) fglrx(0): ivtvHWProvbe failed to do IVTVFB_IOCTL_GET_STATE for device /dev/fb0
This is because the ivtv-fb driver is not loaded. Use modprobe ivtv-fb, and then a /dev/fb1 device is created. To load automatically, create a file /etc/init.d/ivtv and add lines in file as follows:
	modprobe ivtv
	modprobe ivtv-fb # if using PVR-350 and framebuffer
Make it executable
	$ sudo chmod +x /etc/init.d/ivtv

	sudo update-rc.d ivtv defaults 12
Video can get messed up unless the following is added to /boot/grub/menu.lst.
	kopt=vga=792
I must have gotten the following error at some point.
	(EE) IVTVDEV_TST(0)Framebuffer id from dev /dev/fb1is 1
Means driver should not be ivtv-0.4.2? Running grep fb /var/log/messages shows:
	Feb  3 20:29:18 localhost kernel: [   19.363808] vga16fb: mapped to 0xffff8100000a0000
	Feb  3 20:29:18 localhost kernel: [   19.449396] fb0:/ VGA16 VGA frame buffer device
from http://gentoo-wiki.com/HOWTO_X_windows_through_Hauppauge_350_TV_Out
	cd ~/downloads/ivtv/
	wget http://www.mail-archive.com/[email protected]/msg00496/ivtv-xorg.tar.bz2
	tar xvjf ivtv-xorg.tar.bz2
from http://www.abarbaccia.com/component/option,com_smf/Itemid,39/expv,0/topic,67.new
	sudo cp usr/lib64/modules/drivers/ivtvdev_drv.o /usr/X11R6/lib/modules/drivers/
Use cat /proc/fb to see the frame buffers. After everything is configured properly, mine says
	0 VGA16 VGA
	1 cx23415 TV out
My xorg.conf file looks like the following:
Section "ServerLayout"
	Identifier     "Default Layout"
	Screen      0  "aticonfig Screen 0" 0 0
	InputDevice    "Generic Keyboard"
	InputDevice    "Configured Mouse"
EndSection

# use startx -layout flag to select.
Section "ServerLayout"
	Identifier  "TV Layout"
	Screen "Hauppauge Screen"
	InputDevice    "Generic Keyboard"
	InputDevice    "Configured Mouse"
EndSection

Section "Files"

        # paths to defoma fonts
	FontPath     "/usr/share/X11/fonts/misc"
	FontPath     "/usr/share/X11/fonts/cyrillic"
	FontPath     "/usr/share/X11/fonts/100dpi/:unscaled"
	FontPath     "/usr/share/X11/fonts/75dpi/:unscaled"
	FontPath     "/usr/share/X11/fonts/Type1"
	FontPath     "/usr/share/X11/fonts/CID"
	FontPath     "/usr/share/X11/fonts/100dpi"
	FontPath     "/usr/share/X11/fonts/75dpi"
	FontPath     "/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType"
	FontPath     "/var/lib/defoma/x-ttcidfont-conf.d/dirs/CID"
EndSection

Section "Module"
	Load  "GLcore"
	Load  "bitmap"
	Load  "ddc"
	Load  "dri"
	Load  "extmod"
	Load  "freetype"
	Load  "glx"
#	Load  "int10"
	Load  "type1"
	Load  "vbe"
EndSection

Section "InputDevice"
	Identifier  "Generic Keyboard"
	Driver      "kbd"
	Option	    "CoreKeyboard"
	Option	    "XkbRules" "xorg"
	Option	    "XkbModel" "pc104"
	Option	    "XkbLayout" "us"
EndSection

Section "InputDevice"
	Identifier  "Configured Mouse"
	Driver      "mouse"
	Option	    "CorePointer"
	Option	    "Device" "/dev/input/mice"
	Option	    "Protocol" "ImPS/2"
	Option	    "Emulate3Buttons" "true"
	Option	    "ZAxisMapping" "4 5"
EndSection

Section "Monitor"
	Identifier   "Generic Monitor"
	HorizSync    28.0 - 51.0
	VertRefresh  43.0 - 60.0
	Option	    "DPMS"
EndSection

Section "Monitor"
	Identifier   "aticonfig Monitor 0"
EndSection

Section "Device"
	Identifier  "ATI Technologies, Inc. Radeon Xpress 200 (RS480)"
	Driver      "fglrx"
	BusID       "PCI:1:5:0"
EndSection

Section "Device"
	Identifier  "ATI Graphics Adapter 0"
	Driver      "fglrx"
	BusID       "PCI:1:5:0"
EndSection

Section "Screen"
	Identifier "Default Screen"
	Device     "ATI Technologies, Inc. Radeon Xpress 200 (RS480)"
	Monitor    "Generic Monitor"
	DefaultDepth     24
	SubSection "Display"
		Depth     1
		Modes    "1024x768" "800x600" "640x480"
	EndSubSection
	SubSection "Display"
		Depth     4
		Modes    "1024x768" "800x600" "640x480"
	EndSubSection
	SubSection "Display"
		Depth     8
		Modes    "1024x768" "800x600" "640x480"
	EndSubSection
	SubSection "Display"
		Depth     15
		Modes    "1024x768" "800x600" "640x480"
	EndSubSection
	SubSection "Display"
		Depth     16
		Modes    "1024x768" "800x600" "640x480"
	EndSubSection
	SubSection "Display"
		Depth     24
		Modes    "1024x768" "800x600" "640x480"
	EndSubSection
EndSection

Section "Screen"
	Identifier "aticonfig Screen 0"
	Device     "ATI Graphics Adapter 0"
	Monitor    "aticonfig Monitor 0"
	DefaultDepth     24
	SubSection "Display"
		Viewport   0 0
		Depth     24
	EndSubSection
EndSection

Section "DRI"
	Mode         0666
EndSection

#---------------------------
	Section "Monitor"
		Identifier  "NTSC Television on Hauppauge card"
		# D: 34.563 MHz, H: 37.244 kHz, V: 73.897 Hz
		HorizSync   30-68
		VertRefresh 50-120
		Mode "720x480"
			DotClock 34.564
			HTimings 720 752 840 928
			VTimings 480 484 488 504
			Flags "-HSync" "-VSync"
		EndMode
	EndSection

	Section "Device"
		Identifier "Hauppauge WinTV PVR 350"
		Driver "ivtvdev"
		Option "fbdev" "/dev/fb1"
		Option "ivtv" "/dev/fb1"
		BusID "PCI:02:02:0"
	EndSection

	Section "Screen"
		Identifier  "Hauppauge Screen"
		Device      "Hauppauge WinTV PVR 350"
		Monitor     "NTSC Television on Hauppauge card"
		DefaultDepth 24
		DefaultFbbpp 32

		Subsection "Display"
			Depth 24
			FbBpp 32
			Modes "720x480"
		#	Modes "720x576" # PAL
		EndSubsection
	EndSection
Hosted by www.Geocities.ws

1