LMCE attempts to "self-repair" as much as possible, and as such most config files are regenerated at boot. usually all you need to do is make sure settings are correct on the various devices in the web admin, but for more customizing you may need to modify the scripts that write the config files. these are generally in various .sh files in /usr/pluto/bin.
Last time I asked this (which was recently), I was told to edit files in the MD's template dir. So, I did. It didn't help. I cried...lots.
Now I'm supposed to edit the scripts that generate the config files. This sounds to me like a non-permanent solution, too. What will happen if there's an upgrade that includes the very file I changed? Won't it be over written?
This is the file I'm looking to change now: /usr/pluto/bin/SetupAudioVideo.sh. This is the section I believe I should change:
Setup_AsoundConf()
{
local AudioSetting="$1"
local SoundCard
SoundCard=$(GetDeviceData "$PK_Device" "$DEVICEDATA_Sound_Card"|cut -f2 -d";")
SoundCard=$(TranslateSoundCard "$SoundCard")
if [[ -z "$SoundCard" ]]; then
SoundCard=0
fi
sed -r "s,%MAIN_CARD%,$SoundCard,g" /usr/pluto/templates/asound.conf >/etc/asound.conf
case "$AudioSetting" in
*[CO]*)
# audio setting is Coaxial or Optical, i.e. S/PDIF
echo 'pcm.!default asym_spdif' >>/etc/asound.conf
EnableDigitalOutputs
;;
*H*)
# audio setting is HDMI
echo 'pcm.!default asym_hdmi' >>/etc/asound.conf
EnableDigitalOutputs
;;
*)
# audio setting is Stereo or something unknown
echo 'pcm.!default asym_analog' >>/etc/asound.conf
;;
esac
}
I think if I change the "*H*)" case to the following, audio over HDMI will start working on every boot.:
*H*)
# audio setting is HDMI
echo -e 'pcm.!default {\n\ttype hw\n\tcard 0\n\tdevice 7\n}' >> /etc/asound.conf
EnableDigitalOutputs
Will that work? Should I do something else? Maybe I should try updating the nvidia drivers before messing with the setup scripts.
there is often a better way of doing whatever it is that you are trying to accomplish though, and in particular if its a bug in something, others might appreciate the contribution of proper patch.
I have a Jetway Ecomini. It has a nvidia chipset, which appears to be detected correctly. But, the asound.conf that gets created doesn't give me ANY sound over HDMI. In the other thread I started, I explain what I've tried (
http://forum.linuxmce.org/index.php/topic,12082.0.html).