To enable 5.1 output through a digital output:
- get a Dolby Digital encoder license; either
- buy it from Dolby Labs, or
- you already got one when you bought a sound card that ships with such an encoder, or
- you don't need one because software patents are not valid in your jurisdiction;
- install the ffmpeg package (which is not shipped with most distributions for legal reasons);
- recompile the alsa-plugins package;
- configure ALSA to use the a52 plugin (see doc/a52.txt).