Well AC97 is a generic way to describe a sound card.
Sort of like 'I have a ATI VGA card'. So if you know the actual chipset or whatnot then that may narrow it down a bit.
You can use the sudo lspci command in your terminal to get details about hardware.
To turn on spdif out on some realtek chipsets you would open up a terminal and run 'alsamixer' command.
Alsamixer is a little ncurses app that goes in and allows you to control the sound controls on your sound card more directly then the generic gnome mixer controls (or whatever your using). It reflects more accurately the hardware controls.
IEC958 is the standard hardware stuff for SPDIF out. So see if you can find a mixer control called that and umute it. Maybe that will be enough.
Here is somebody's notes on now he did spdif on his realtek chipset.
http://alsa.opensrc.org/index.php?page=Realtek+ALC950
(skip the stuff about installing and configuring the driver. Ubuntu should already have that stuff by default. Just skip down to the spdif support section.)
Also his Realtek ALC950 is realy a 'via8233' chipset. So additional information can be found on that page.
So I think that's all you should have to do to get it to work.
.....
but maybe you want to do some more.
Also for Alsa each user can have very specific configurations for their sound cards. You sometimes can do neat things like send some applications to output their sound to the 'rear' sound card output while others to the 'front' sound card output. That sort of thing.
There is also 'plugins' used for Alsa for doing different things. The most common one is a plugin called 'dmix'. Dmix is a low resource software mixing device that you can use to mix multiple sound inputs for cards that don't have hardware mixing (which is most) and for changing the sound format so it plays better on different hardware.(For instance my Ibook can handle sound formats at rate of 48000 but it had sound quality issues when watching movies.. so I used dmix to turn it into a 44100 rate (default for things like cdroms and music files) which sounded better.
Nowadays dmix is setup by default on many sound cards. Previously you would only get one sound at a time on non-hardware mixing in Linux unless you set it specific up.
So having to do a custom configuration isn't as common as it used to be.
But it may be usefull for different things. This custom configuration can be stored as a .asoundrc plain text file in your user's home directory.
For instance this page has a .asoundrc file this guy used for his Mythtv media box.
http://www.mythtv.org/wiki/index.php/Asoundrc_alc850
He set it up so that by default it used spdif out on the hardware directly with no software mixing or whatnot. But he also had configured a 'dmix' option for spdif out so he could use that if he felt like it.
Here is some info on the asoundrc file:
http://alsa.opensrc.org/index.php?page=.asoundrc
Also don't confuse SPDIF out with AC3 or DTS passthrough for watching movies. These things bypass the sound card and sound system and use the spdif out on the sound card to feed the digital information directly into a receiver that has hardware to decode AC3 or DTS signals. You would do this for watching surround sound movies, for instance. Not all sound cards and not all software supports this. I don't know if realtek stuff does.. But my favorite apps for movie watching is Xine and Mplayer.
Unfortunately for me my cheap-o sony receiver will get confused if the 'DVD' channel is set to autosense if the input is spdif or analog audio and will get confused if you try to use ac3 passthrough on Xine or sometimes mplayer. Were it would lock up and not use any spdif sound anymore. Stupid thing. So I have to set it to digital input always.
Hope that helps.