No switching between analog and digital audio output on the nForce3
Saturday, November 25th, 2006The audio output on my MythTV system is connected to a reasonably nice stereo, and it feeds the stereo both analog and digital audio, depending on whether you tell it to use ALSA:mixed-analog or ALSA:mixed digital as the playback audio device. I frequently switch between the two. HD broadcasts use digital sound, as do DVDs, but due to a quirk in the wiring, I need to use analog sound if I want to route the sound to my television and use TV volume controls.
I’m not the first person to have this problem, so I was hopeful when I found an article about switching the playback source with a remote control button in the MythTV wiki. In that article, there’s a script that uses the amixer command to switch the “IEC958 Playback Source”
#!/bin/sh
# Get current setting of PCM/analog switch
AUDIO=`amixer get 'IEC958 Playback Source' | grep 'Item0:' | cut -d\' -f 2`
if [ "${AUDIO}" == "PCM" ]; then
# Route analog signal to S/PDIF
amixer set ‘IEC958 Playback Source’,0 ‘Analog’
# Could also be: sudo /sbin/alsactl -f /home/mythtv/asound.analog2spdif restore 0
else
# Route PCM signal to S/PDIF
amixer set ‘IEC958 Playback Source’,0 ‘PCM’
# Could also be: sudo /sbin/alsactl -f /home/mythtv/asound.pcm2spdif restore 0
fi
Excited, I opened a command line to see if I had support for selecting the audio source, but found that my nForce3 doesn’t support it:
myth ~ # amixer | grep IEC958
Simple mixer control 'IEC958',0
Simple mixer control 'IEC958 Playback AC97-SPSA',0
Nuts! I’ve filed this mentally under the reasons why I want to do a hardware re-spin on my Myth sytem. Although all of the parts were reasonable selections at the time, I would like to replace the noisy 60 mm fans in the Silverstone case (and maybe get a few more drive bays while I’m at it), and get a bit more processing power for transcoding.



