Switch sound device from command line in KDE

Hello,
my computer is connected to my TV through HDMI using ATI HDMI output. I have written a small script to switch display from monitor to TV when a want to watch a DVD, but I didn’t find how to switch sound from speakers to HDMI in command line. For the moment I have to open KDE system settings -> Multimedia and move sound devices by hand. Does anyone know how to automate this ?
Thanks.

Nobody for helping me ?

romainht wrote:
> Nobody for helping me ?
>
>
i just read (15 minutes ago) somewhere in a new posting to a
different forum here that all of KDE’s settings exist in text files
inside your home’s /.kde

now, i think we both knew that already…but, it seems ‘just’ a matter
of figuring out exactly what file changes “when you open KDE system
settings → Multimedia and move sound devices by hand”

you can do that with some patience and a tool like diff to compare
state A to state B…then, just put the the needed file changes into
your script…right?


palladium

Well I finally wrote a tiny script to run xbmc and configured xbmc to use HDMI sound output


xrandr --output DFP2 --auto
xrandr --output DFP1 --off
xbmc
xrandr --output DFP1 --auto
xrandr --output DFP2 --off