attach the /etc/asound.state. there is a mixer switch to enable the spdif, "IEC958 Playback Switch". together with the switch, you need to set up the IEC958 status bits correctly.
but in general, you can play with "spdif" device, such as
aplay -Dplug:spdif foo.wav
(when the wav file is 16bit).
Have you been able to find anything that might be causing the problem with the digital out that is not functioning?
Dennis
asound.state
Description: Binary data