[mythtv-users] Re: Definitive Guide for G400 TV Out?
Stefan Frank
sfr+lists at 6913304088794.gnuu.de
Wed Sep 3 12:43:04 EDT 2003
Hi Jason,
i'll write quickly how i set it up.
- set up framebuffer support for the G400 in the kernel
- compile the latest mgavideo (0.1.1b afaik) modules
- during boot-up configure the G400 for TV-Out on the 2nd head
Here's a snippet from my init script:
# needed for G400 only
#modprobe -k i2c-algo-bit
modprobe -k i2c-matroxfb
modprobe -k matroxfb_crtc2
modprobe -k matroxfb_maven
matroxset -f /dev/fb0 -m 0 # this disconnects fb0 from outputs
matroxset -f /dev/fb0 -m 3 # this connects fb0 to both outputs
(So the same picture is shown on the monitor and on the TV
Search google for how to get an independent picture on both)
matroxset -f /dev/fb0 -o 1 1 # this sets fb0 to PAL output
fbset -fb /dev/fb0 640x512-52
Note that at this stage the mgavideo modules are NOT loaded yet! As you
suspected they seem to conflict with the framebuffer ones. (At least
that's what i remember from setting it all up. I might be wrong though,
but this setup works for me!).
You might have to play with the framebuffer settings to get a correctly
sized & positioned picture on the TV.
This is the framebuffer mode i use:
mode "640x512-52"
# D: 25.175 MHz, H: 32.442 kHz, V: 51.907 Hz
geometry 640 512 640 528 32
timings 39722 60 0 70 39 76 4
bcast true
accel true
#rgba 8/16,8/8,8/0,8/24
endmode
And now i load the mgavideo modules via the iv4l1 script from mgavideo.
But i made some changes to it, so here's my version of it:
#!/bin/sh
KERNEL=`uname -r`
MODULES="/lib/modules/$KERNEL/misc/"
if [ -f $MODULES/i2c-algo-ks.o ]; then
/sbin/modprobe -k i2c-core i2c_debug=0
/sbin/modprobe -k i2c-algo-ks i2c_debug=0 bit_scan=1
else
if ! ( /sbin/modprobe -k i2c-core scan=1) ; then
if ! ( /sbin/modprobe -k i2c scan=1) ; then
echo Please check that the kernel configuration
echo has I2C included as modules.
fi
fi
fi
d_i2c=0
d_core=0
d_mjpg=0
d_dvd=0
d_i34=0
d_mw=0
if [ -f $MODULES/ks0127.o ]; then
/sbin/modprobe -k msp3400 debug=$d_i2c simple=0
#/sbin/modprobe -k maven debug=$d_i2c
/sbin/modprobe -k ks0127 debug=$d_i2c
/sbin/modprobe -k tuner
fi
/sbin/modprobe -k videodev
/sbin/modprobe -k mga_core vdo_enable=0 bes_brightness=31 mgacore_debug=$d_core mgai2c_debug=$d_i2c mgaclk_debug=$d_core mgabus_debug=$d_core
/sbin/modprobe -k mgagrab debug=$d_mw
/sbin/modprobe -k mgacap debug=$d_mw
/sbin/modprobe -k mgavideo default_norm=0 debug=$d_mw
if [ -f $MODULES/zr36060.o ]; then
/sbin/modprobe -k zr36060 debug=$d_mjpg
/sbin/modprobe -k i33 debug=$d_mjpg
/sbin/modprobe -k char-major-81-0 debug=$d_mjpg
fi
if [ -f $MODULES/i34.o ]; then
/sbin/modprobe -k i34 debug=$d_i34
/sbin/modprobe -k mgadvd debug=$d_dvd
fi
#/sbin/modprobe -k mgayuv
I also had to move aside some default kernel modules to prevent their
usage, namely:
kernel/drivers/char/drm/mga.o (was confusing XFree i think)
kernel/drivers/media/video/msp3400.o (mgavideo provides a module with
the same name, even more with the kernel-included one i couldn't control
the sound)
That's it almost, only thing left is to configure XFree to use the
framebuffer mode and the same resolution as set with fbset.
Here's the device section from my XFree86-4:
Section "Device"
Identifier "FBG400DH_1"
Driver "mga"
BusID "PCI:1:0:0"
Screen 0
#VideoRam 32768
#VideoRam 16376
VideoRam 8192
Option "hw cursor" "off"
Option "UseFBDev" "on"
EndSection
And here's the mode setting i use in X:
Mode "640x512PAL"
# D: 25.175 MHz, H: 32.442 kHz, V: 51.907 Hz
DotClock 25.176
HTimings 640 640 716 776
VTimings 512 551 555 625
Flags "-HSync" "-VSync" # Warning: XFree86 doesn't support accel
EndMode
I chose this rather low resolution because i only have a ~20" TV and
still need to use the console from time to time :-)!
I had the biggest problems in getting a nice fb mode set up and later on
to get the mgavideo modules to play nicely with the rest.
HTH, Stefan
--
It does me no injury for my neighbor to say there are twenty gods or no God.
It neither picks my pocket nor breaks my leg.
-- Thomas Jefferson
--
It does me no injury for my neighbor to say there are twenty gods or no God.
It neither picks my pocket nor breaks my leg.
-- Thomas Jefferson
More information about the mythtv-users
mailing list