.hesoez Tux's lil' helper
Joined: 09 Mar 2004 Posts: 78 Location: Belgium
|
Posted: Thu Feb 16, 2006 3:04 pm Post subject: alsa, use the second soundcard as default |
|
|
hi,
i'm trying to setup my system so that it allows using mythtv on the tv and a regular gnome session on the monitor.
my xorg.conf:
Code: | Section "Module"
Load "dbe"
SubSection "extmod"
Option "omit xfree86-dga"
EndSubSection
Load "glx"
EndSection
Section "Files"
RgbPath "/usr/X11R6/lib/X11/rgb"
FontPath "/usr/share/fonts/misc/"
FontPath "/usr/share/fonts/TTF/"
FontPath "/usr/share/fonts/Type1/"
FontPath "/usr/share/fonts/75dpi/"
FontPath "/usr/share/fonts/100dpi/"
FontPath "/usr/share/fonts/local/"
EndSection
Section "ServerFlags"
EndSection
Section "InputDevice"
Identifier "Keyboard0"
Driver "kbd"
Option "AutoRepeat" "500 30"
Option "XkbRules" "xorg"
Option "XkbModel" "pc105"
Option "XkbLayout" "be"
EndSection
Section "InputDevice"
Identifier "Mouse0"
Driver "mouse"
Option "Protocol" "IMPS/2"
Option "Device" "/dev/input/mice"
Option "ZAxisMapping" "4 5"
EndSection
Section "Monitor"
Identifier "Monitor0"
HorizSync 31.5 - 64.3
VertRefresh 50 - 100
EndSection
Section "Monitor"
Identifier "TV0"
HorizSync 30 - 50
VertRefresh 60
EndSection
Section "Device"
Identifier "Nvidia0"
Driver "nvidia"
EndSection
Section "Device"
Identifier "Nvidia1"
Driver "nvidia"
BusID "PCI:1:0:0"
Option "NoLogo"
Option "TVStandard" "PAL-B"
Option "ConnectedMonitor" "TV"
Option "TVoutFormat" "COMPOSITE"
EndSection
Section "Screen"
Identifier "Screen0"
Device "Nvidia0"
Monitor "Monitor0"
DefaultDepth 24
Subsection "Display"
Depth 8
Modes "1024x768" "800x600" "640x480"
ViewPort 0 0
EndSubsection
Subsection "Display"
Depth 16
Modes "1024x768" "800x600" "640x480"
ViewPort 0 0
EndSubsection
Subsection "Display"
Depth 24
Modes "1024x768" "800x600" "640x480"
ViewPort 0 0
EndSubsection
EndSection
Section "Screen"
Identifier "Screen1"
Device "Nvidia1"
Monitor "TV0"
DefaultColorDepth 24
SubSection "Display"
Depth 24
Modes "800x600"
EndSubSection
EndSection
Section "ServerLayout"
Identifier "Layout0"
Screen "Screen0"
InputDevice "Mouse0" "CorePointer"
InputDevice "Keyboard0" "CoreKeyboard"
EndSection
Section "ServerLayout"
Identifier "Layout1"
Screen "Screen1"
InputDevice "Mouse0" "CorePointer"
InputDevice "Keyboard0" "CoreKeyboard"
EndSection |
and i use this script to startup myth on the tv:
Code: | #!/bin/bash
DISPLAY_NO=":1"
LAYOUT_NAME="Layout1"
X $DISPLAY_NO -ac -layout $LAYOUT_NAME &
sleep 5
X_PID=`ps aux | grep "X $DISPLAY_NO" | grep root | tr -s " " | cut -d " " -f2`
export DISPLAY=:1
mythfrontend &
~/.config/openbox/exec &
openbox
kill $X_PID
exit 0 |
~/.config/openbox/exec & just contains a line to get rid of the blue lines in ogle which has to be run after openbox is loaded.
this does not allow 2 simultanious x-servers but that is a problem for later.
i have 2 soundcards, the first is for gnome(/dev/dsp) and the second for mythtv(/dev/dsp1).
they both work but i have a problem with openbox:
first i did not use openbox because myth spans to the whole screen but i had the problem of losing my keyboard input when launching mplayer in myth.
this was solved by using a window manager(openbox).
i have set the audio output in myth to /dev/dsp1 and it worked well without openbox, but with openbox the sound is always redirected to /dev/dsp no matter the configuration in myth.
could it be that openbox always uses the default audio output? and how to change that? maybe an ~/.asoundrc that only allows playback on /dev/dsp1
or maybe use another wm, if it really should be openbox that causes this?
grtz |
|