Setting Up Multi-Channel Sound Cards in OS X

This is a companion page to my CM6206 enabler, although it is generally applicable.

Here is a procedure that will give you a reasonable chance of getting surround sound in Mac OS X through a multi-channel USB or FireWire sound card hooked up to an external sound system. The procedure is cumbersome and if you do anything wrong in any of the steps, you will either get no sound at all, only stereo, or horrible noise. Good luck. First, some information to check if you really need and want to go through this ordeal at all.

A Very Short History of Surround Audio

First a short introduction about how digital consumer surround sound works. In the analog-only era, there were already certain systems like Dolby Pro Logic that rely on ‘multiplexing’ extra channels into a stereo signal by means of phase differences. This has some limitations, but works pretty well nevertheless. Then came digital sound which originally only supported stereo. After a while people wanted to upgrade to surround, and history repeated itself in a certain way.

For many years, digital 5.1 surround has actually been a bit of a clever hack of the existing S/PDIF standard that only supported uncompressed stereo audio. The trick is to compress the six separate channels into a bitstream that is not larger than an uncompressed (so-called PCM) stereo stream of about 1.5 Mbit/s. The compressed stream is then transmitted as if it were a regular stereo stream. Because the transmission is all digital, there is no risk of degradation that could destroy the information in the compressed data. A surround-capable decoder recognises this special stream. Instead of treating it as stereo sound, it interprets it as digital data and decodes it, just like an MP3 player decodes the compressed data in an MP3 file. A decoder that does not recognise the encoding will output a terrible noise because that is what one gets when trying to treat compressed data as PCM sound. The most popular standards for encoding 5.1 audio in a bitstream of 1.5 Mbit or less are Dolby Digital (AC3) and DTS.

Multichannel Output versus Pass-through

5.1 setups

There are two very distinct ways to get surround sound out of your Mac (or any computer). The first is to decode the surround stream on the computer itself and send the six (or more) channels of raw audio to a dumb sound card like the CM6206 that has six (or more) outputs. All the card does, is pass the raw decoded audio to the analog outputs, it does not decode anything. These outputs are connected to an amplifier through analog cables. That is the method to which the list of instructions below applies.

The second way is to keep the undecoded surround stream intact and pass it through to a smarter external device like a surround receiver, which then does the decoding to its six (or more) outputs. The most popular way to send the AC3 or DTS stream to external decoders used to be over an optical cable, often called S/PDIF or TOSLink. With the advent of HDMI, it has become possible and common to send the stream over the HDMI cable. To make this work, all you need to do is force your media player to pass through the encoded stream, and ensure that the outgoing ‘audio’ is not altered by a volume control or anything else. If you can change the volume, you must set it to 100%. It should then only depend on the receiving device whether it is capable of decoding the stream or not. The instructions below are unnecessary for the pass-through method. You do not need to bother about Audio Midi Setup when you pass through the encoded stream. Right up to the point where it is decoded in the receiver, this stream looks like, and is treated as, an ordinary stereo stream.

To be honest, if you are serious about hooking up your Mac or PC to a surround sound system, I recommend the pass-through method: buy a standalone 5.1 decoder, connect it through an optical cable (with a 3.5mm jack adaptor if needed), and set up your media player to pass through the AC3 or DTS stream. This will be much less hassle, you do not need to go through the steps below, it will work in more media players, and it will avoid bugs in the few media players that do support multi-channel sound cards. You can also use the decoder with any other hardware device that has an optical output.

Setting up a Multi-channel Sound Card: the Procedure

  1. Log in using an administrator account. This is the kind of account that allows to install stuff. If you don't do this, OS X will silently ignore any changes you make to the multichannel setup. The good news is that you will normally need to do steps 1 through 7 only once. Those settings should be permanently stored even if you switch to a plain user account.
  2. Go to System Preferences and in the Sound control panel, select the USB audio output device. Turn up the system output volume all the way to the maximum. Do not change the system volume after this, you should only control the volume either from within your media player or on your hardware sound system.
  3. Open the ‘Audio Midi Setup’ program in your Applications/Utilities folder. Audio Midi Setup
  4. Open the menu ‘Audio Midi Setup’ → ‘Preferences’. Go to ‘Audio’ and drag the slider almost all the way to the left(1). This is to avoid that your ears or loudspeakers will explode when you play the channel test sound. Do not set the slider all the way to the left, do it as in this image:
    AMS preferences
  5. Select the USB card as output device and set the sampling rate to 44100 or 48000 depending on the rate of the audio you want to play (for a movie it's most likely 48000). Set the gain sliders of all channels to 0dB.
  6. Set the number of channels to the number of loudspeakers in the sound system connected to the sound card (most likely: “6ch-16bit”).
  7. Click ‘Configure speakers’ → ‘Multichannel’ and choose “5.1 surround” (or whatever setup you have). Click the buttons to test each speaker and tweak the hardware volume controls on your sound system such that all channels sound equally loud. Don't try to tweak the sliders in Audio Midi Setup, not all of them affect the test volume.
    AMS surround setup
  8. VLCPlexThe two media players I know to support multi-channel sound, are Plex and VLC. VLC has an annoying bug that can cause the calibration between center/front/surround channel volumes to change with each movie you play. Therefore I recommend Plex, but mind that it is part of a media center solution that is not practical to play a single movie file once in a while. It is best suited for managing a collection of movies and TV series.
  9. To use the USB sound card in Plex, dig around in its ‘System’ preferences, and set the following settings: ‘Audio Output’ = “Analog”, ‘Speaker Configuration’ = 5.1 or 7.1 depending on your setup, and ‘Audio Output Device’ = “USB Sound Device”. To switch VLC to USB sound output, you must already be playing something that has sound. While it is playing, open the ‘Audio’ menu and set ‘Audio Device’ to your sound card, probably “USB Audio Device”. You can use a test sound or movie that loops through all surround channels, to see if they are correct.
  10. Start playing the movie you wanted to watch. Remember, do not touch your system volume: either use the volume control in your media player, or on your sound system. If you're lucky, the channels will be correctly balanced. Especially when using VLC though, it is likely that the rear channels and perhaps also the center channel will be too silent or loud. Fiddle with either the controls on your sound system or the sliders in Audio MIDI Setup until it “sounds right”. Be prepared to re-do this for each and every movie you play. If you get sick of this, either ask the VLC developers to fix this bug, use Plex instead (although I cannot guarantee it does not have the same bug), or re-read the to be honest paragraph above.

If you get loud noise instead of the film soundtrack, you probably configured Plex or VLC to pass through the undecoded 5.1 stream. Make sure to disable this.

Mind that you will, of course, only get surround from material that is encoded as surround. You will not get surround out of an MP3 or an audio CD, unless you have installed some kind of plug-in that can ‘inflate’ stereo sound to surround, if such thing exists for VLC. You can however get ‘faux surround’ by duplicating the stereo signal on the surround channels with something like Soundflower.

Also mind that this is not everything. Even when ignoring possible bugs in your media player that can cause the channels to be incorrectly balanced, to get really correct surround sound you should make sure that the LFE channel (often mistakenly called “Subwoofer” channel) is amplified with +10dB relative to the other channels. Moreover, you should not just send only the LFE channel to your subwoofer. Ideally you should do ‘bass management’, i.e. strip the bass off all other channels that have loudspeakers that cannot represent deep bass sounds, and re-route it mixed together with the LFE to your subwoofer. With some luck, your sound system already does this for you. But even otherwise the above procedure will produce decent surround sound that will be good enough for most people.

These instructions were written for OS X Snow Leopard and Lion, but they should remain valid for future releases unless Apple some day revamps Audio Midi Setup.

Can I use my Mac as a surround decoder?

A few people have mailed me with the question whether it is possible to feed a 5.1 optical stream to the Mac's input port, decode it in software, and send the outputs to a multi-channel sound card. The answer is: no.

Theoretically it is possible, but nobody has bothered writing software that can do it (anyone that tries to, might have their ass whooped by DTS and Dolby lawyers). If you are looking for a reasonably cheap device to decode an optical stream to multiple analog channels, you can look for the ‘HD Audio Rush’ or ‘Mocha’.

©2011-2015 Alexander Thomas

(1): The reason why this slider needs to be used in this strange way can be found elsewhere on my site. Shame on Apple for using a linear slider in an audio setup application.