5.1 audio no worky, help needed :(

I've searched and searched but despite trying everything I could I still can't get 5.1 audio of any description from any program out of my Mac Pro to my AV amp using either .mkv files or with them re-encoded for use with my AppleTV.

The AppleTV outputs 5.1 audio to my AV amp downstairs in the lounge but as I spend most of my time upstairs in my room with my Mac Pro (I live with my parents) I'd quite like to get the same surround sound that my "cheap OS X computer" can do downstairs.

The Mac Pro is connected to a Cambridge Audio azur 540R receiver via an optical cable. The "Audio/Midi" app in Utilities seems next to useless at configuring for multiple speakers as when digital output is selected it won't let me configure more than two speakers. In the dropdown list next to the sample rate it allows me to select 2ch-16bit, 2ch-20bit and 2ch-24 bit with no problems but if I select "Encoded Digital Audio" then the "Default Output" and "System Output" drop downs above revert me from "Built-in Digital Output" to "Built-in Output" and the sound comes from the internal speaker.

I'm at my wits end with this! How come my AppleTV can do this and my much more expensive Mac Pro can't?

I mean the AppleTV is nothing more than a low end computer designed with a specific purpose in mind. The Mac Pro features the same optical output, I'm using the same files that play and output 5.1 audio fine on my AppleTV, and the Mac Pro runs the same(ish) operating system.

I just can't understand why Apple hasn't fixed this or why it is so difficult to get working.

After fiddling around a bit and actually paying attention to my amp as I played a movie, I noticed that when I started a (.mkv) movie in Quicktime or VLC the amp would display "Dobly D Ex" or "DTS ES" but only light up the front three speakers on its display.
I investigated this a bit further and discovered that in the speaker setup section of the amp I had "Small" selected for the front and centre speakers but "None" selected for the rears. Hence the lack of surround sound

iTunes however still does not output surround sound when playing the re-encoded for AppleTV .mp4 or .mov files. I would guess that's because the audio has been re-encoded to AAC and my amp doesn't know how to decode this and so drops down to 2.1 audio.

Although Apple TV and Apple DVD player support passthrough of a 5.1 AC3 file to an external amp to be decoded it isn't supported in Quicktime Player or iTunes on OS X by default - at least today. There are rumours that the next version of Quicktime may add it but time will tell.

For now you can use VLC to play the files or use Perian. I tried these instructions I found here on a test file:

MacRumors attracts a broad audience
of both consumers and professionals interested in
the latest technologies and products. We also boast an active community focused on
purchasing decisions and technical aspects of the iPhone, iPod, iPad, and Mac platforms.