This script worked like a charm for my Nvidia MCP7A HDMI (I'm guessing that's the audio chip that ships with most Ion motherboards.) on Jaunty.
I'm using ICH958 (optical) output to my reciever, and the script gave me access to the switches 'ICH958' which enables 2ch audio for XBMC and most apps, and 'ICH958 Default PCM' which enables 6ch surround.
The only problem I ran into was that the 'ICH958' switch would uncheck itself every reboot. It took me a few hours of searching google for things like "ALSA IEC958 switch will not survive reboot" before I could cobble together a solution. I'd figured I would share what worked for me:
From terminal run:Press F3 to view Playback settings. You'll probably have to scroll to the right using the arrow keys to be able to view the 'IEC958' and 'IEC958 D' settings. Highlight each one and use the ">" key to change the value from 'MM' (Muted) to '00' (Unmuted). Press ESC to exit alsamixer.Code:
The next step is to save these settings. To do so, type in terminal:This will tell AlsaCtl to save the settings you just made into /etc/asound.stateCode:
sudo alsactl store 0
Now, for whatever reason, Ubuntu Jaunty does not read the /etc/asound.state file on startup. This is really stupid, and results in the gnome panel applet and 'alsamixer' settings not surviving a reboot. Jaunty is actually looking for asound.state in /var/lib/alsa/. So whenever you make changes with aslamixer and save them with alsactl, make sure to copy the asound.state file to /var/lib/alsa/. In Terminal:This allowed my switches and settings to survive reboot. I hope this helps someone else, cuz I spent a couple hours trying to figure out why all my audio settings reset every reboot. ](*,)Code:
sudo cp /etc/asound.state /var/lib/alsa/asound.state