Firstly make sure you are NOT running all manner of add-ons as the ATV1 has limited RAM to use, the basic ones are fine.
Crystalbuntu:
XBMC > System > Settings > System > Video > Acceleration > Allow hardware acceleration (Crystal HD) > Enable
Then:
Settings > System > Audio Output > and set the configuration below:
Audio Output:
Bottom Left - select Settings Level - Expert
- Audio Output Device - Default (HDA Intel ALC889A Analog) (This is the only way to get Passthrough via SPDIF to work properly)
- Number of Channels - 2.0 (Don't worry as this is only the number of transport modulation channels NOT the 5.1 speaker setup when passing through via SPDIF)
- Output configuration - Optimized
- Stereo upmix - Enable
- Normalize levels on downmix - Disable
- Resample Quality - Medium
- Enable Passthrough - Enable
- Passthrough output device - the one with SPDIF in it.
- Enable Dolby Digital Transcoding - Enable
Then select whatever options your receiver is capable of decoding ie Dolby Digital AC3, DTS etc...
TV's are usually only capable of decoding AC3.