Finally, the moment has arrived! After trying on at least five GNU/Linux distributions and FreeBSD, 5.1 surround sound via S/PDIF (aka. IEC958) finally works, on the latest stable version of the new wunderkind of distributions, Ubuntu Gutsy. The instructions were easy enough, and what follows is a version you can pretty much copy to the command line. Note that these are for ASUS P5K-E motherboards (which have the Analog AD1988B sound chip) - they may not work for you.

  1. sudo apt-get install linux-ubuntu-modules-2.6.22-14-386 (look out for newer versions later)
  2. Restart
  3. sudo depmod -aAe
  4. sudo modprobe snd-hda-intel

I fired up a DVD, a Dolby Surround demo, and Doom 3 with the latest patch (Update: sorry, the link is dead) and +set s_alsa_pcm spdif +set s_numberOfSpeakers 6, and whaddyaknow! It all works! Even the manufacturer's Windows driver doesn't support optical surround sound.

Thank you developers!

Update: +set s_alsa_pcm spdif +set s_numberOfSpeakers 6 also works for Enemy Territory: Quake Wars. Yay!