Contribute
Register

AppleHDA Surround Sound [Guide]

toleda

Moderator
Joined
May 20, 2010
Messages
24,103
Motherboard
Asus Maximus VII Impact
CPU
Core i7-4770K
Graphics
RX 560 + HD4600
Mac
iMac, MacBook Pro, Mac mini
Classic Mac
512K, LC, Power Mac
Mobile Phone
iOS
AppleHDA Surround Sound [Guide]
Screen Shot 2014-05-24 at 5.43.02 PM.png

These solutions enable macOS surround sound audio for HDMI, DP, Optical, Analog and USB. There are many other solutions providing similar capabilities. Professional audio is beyond the scope of this guide.

This thread is not a buyer's guide; posts requesting purchase recommendations will be deleted.

Posts documenting macOS surround sound successes are requested.

Change Log
  1. v3.0 - 12/18/2017 - High Sierra, Plex Media Player
    • Renamed from Audio - Surround Sound Realtek ALC AppleHDA [Guide]
  2. v2.2 - 11/8/2016 - Sierra, minor updates
  3. v2.1 - 11/14/2015 - El Capitan
  4. v2.0 - 12/20/2014 - Yosemite
  5. v1.0 - 5/25/2014 - Mavericks 1st Release
Requirements
  1. macOS/OS X
    • High Sierra 10.13+
    • Sierra/10.12+
    • El Capitan/10.11+
    • Yosemite/10.10+
    • Mavericks/10.9+
  2. Speakers
    • 2.1
    • 3.0, 3.1
    • 4.0, 4.1
    • 5.1
  3. 5.1 Content
    • Dolby Digital 5.1
    • DTS 5.1
Recommendations
  1. HDMI/DP - highest quality surround sound solution, native/nearly native (Note 1, 2 and 3)
    1. Players
    • Plex Media Player (PMP)
    • Kodi - select System/Audio/Enable Passthrough
    • VLC - select Audio/Audio Devices/HDMI (Encoded Output)
    • MPlayerX - Yes/DD D/DTS (Preferences/Audio/Pass through AC3=Yes/DTS=Yes)
  2. Optical 5.1 - DD/DTS receiver/speakers with SPDIFin (Note 2, 3 and 4)
    1. Players
    • Plex Media Player (PMP)
    • Kodi - select System/Audio/Enable Passthrough
    • MPlayerX - Yes/DD D/DTS (Preferences/Audio/Pass through AC3=Yes/DTS=Yes)
  3. Analog 5.1 - 2.1, 3.0, 3.1, 4.0, 4.1 or 5.1 speakers (Note 2, 3 and 4)
    1. Players
    • Plex Media Player (PMP)
    • Kodi - select System/Audio/Analog_5.1_Surround
    • VLC - select Audio/Audio Devices/Analog_5.1_Surround
  4. USB 5.1 - 2.1 or 5.1 speakers with or without Receiver/optical
    1. USB2Optical 5.1, same as Optical 5.1 above
    2. USB2Analog 5.1, same as Analog 5.1 above
Installation
  1. HDMI/DP audio
    1. AppleHDA HDMI Audio
    2. Select System Preferences/Sound/Output/HDMI
  2. Optical audio
    1. Onboard audio
    2. Select System Preferences/Sound/Output/Built-in Digital
  3. Analog audio
    1. Onboard audio
    2. Audio MIDI Setup/Aggregate Device/Analog_5.1_Surround
      • See Audio MIDI Setup/Create Aggregate Device - Below
    3. Select System Preferences/Sound/Output/Analog_5.1_Surround
  4. USB audio (example, Sound Blaster Omni Surround 5.1, both)
    1. USB2Optical 5.1 (MICRO II - Turtle Beach, Inc.)
      1. Audio MIDI Setup/Aggregate Device/USB2Optical
        • See Audio MIDI Setup/USB2Optical/Format - Below
      2. Select System Preferences/Sound/Output/USB2Optical_5.1_Surround
    2. USB2Analog 5.1 (XS71U - DIAMOND Xtreme Sound 7.1 USB Audio Device)
      1. Audio MIDI Setup/Aggregate Device/USB2Analog
        • Audio MIDI Setup/USB2Analog/Configure Speakers - Below
      2. Select System Preferences/Sound/Output/USB2Analog_5.1_Surround
Player Downloads
  1. Plex Media Server - Your media on all your devices
    1. Plex Media Server: Download Plex Media Server & Apps/1.
    2. Plex Home Theater: 3. Get apps and ...
  2. Kodi | Open Source Home Theater Software
  3. MPlayerX
  4. VideoLAN - Official page for VLC media player
Details

Solutions
Player Test Result
Configurations
Audio MIDI Setup/Create Aggregate Device
Audio MIDI Setup/USB2Optical/Format
Audio MIDI Setup/USB2Analog/Configure Speakers
Notes
Problem Resolution
Screenshots

Solutions
  1. Digital audio - HDMI/DP/DVI devices
    1. Supported codec (Note 2)
      1. Realtek ALC AppleHDA.kext
      2. Audio ID: 1, 2 or 3
    2. Other codec (Note 3)
      1. Native AppleHDA.kext
      2. Audio ID: 1
    3. HDMI2Optical Adapter
  2. Optical audio - Receiver/Soundbar w/SPDIF input
    1. Supported codec (Note 2)
      1. Realtek ALC AppleHDA.kext
      2. Audio ID: 1, 2 or 3
  3. Analog audio - 3, 4, 5, 6, 8 speakers
    1. Supported codec (Note 2)
      1. Realtek ALC AppleHDA.kext
      2. Audio ID: 1 or 2 (Audio ID: 3, not supported)
  4. USB audio - 3, 4, 5, 6 speakers
    1. Other codec/No codec (Note 3)
    2. USB2Optical 5.1 Adapter (DD/DTS Encoded Digital Audio capable)
    3. USB2Analog 5.1 Adapter (up to 48000 Hz/24 bit)
Player Test Results (OSX: 10.9.2/C1021/DD 5.1/DTS 5.1)
  1. HDMI 5.1
    1. Plex_v0.9.3.4 - Yes/DD D/DTS
    2. PlexHT_v1.0.7 - Yes/DD D/DTS
    3. PlexHT_v1.0.13 - Yes/DD D/DTS
    4. XBMC_v12.3 - Yes/DD D/DTS
    5. XBMC_v13.0 - Yes/DD D/DTS (Enable Passthrough), Yes/LPCM
    6. VLC_v2.1.4 - Yes/DD D/DTS (HDMI (Encoded Output)
    7. MPlayerX_v1.0.22.1 - Yes/DD D/DTS (Preferences/Audio/Pass through AC3=Yes/DTS=Yes)
    8. iTunes/QuickTime/DVDPlayer - Yes/DD (AC3), No DTS
  2. Optical 5.1 (48k Hz/2ch-16bit integer)
    1. Plex_v0.9.3.4 - Yes/DD D/DTS
    2. PlexHT_v1.0.7 - No (Video problem - pause/play)
    3. PlexHT_v1.0.13 - Yes/DD D/DTS
    4. XBMC_v12.3 - No (Video problem - 0.5x)
    5. XBMC_v13.0 - Yes/DD D/DTS (Enable Passthrough) Yes/DD PL II/LPCM (DD/DTS)
    6. VLC_v2.1.4 - Yes/DD PL II/LPCM (DD/DTS)
    7. MPlayerX_v1.0.22.1 - Yes/DD D/DTS (Preferences/Audio/Pass through AC3=Yes/DTS=Yes)
    8. iTunes/QuickTime/DVDPlayer - No (885 yes)
  3. Analog 5.1
    1. Plex_v0.9.3.4 - No/2 channel
    2. PlexHT_v1.0.7 - No/2 channel
    3. PlexHT_v1.0.13 - Yes/DD D/DTS
    4. XBMC_v12.3 - Yes/DD D/DTS
    5. XBMC_v13.0 - No/6 channel (Video problem - 2x)
    6. VLC_v2.1.4 - Yes/DD D/DTS
    7. MPlayerX_v1.0.22.1 - No/2 channel
    8. iTunes/QuickTime/DVDPlayer - No/2 channel
  4. USB 5.1
    1. Optical 5.1 (48k Hz/Encoded Digital Audio) - as above
    2. Analog 5.1 (48k Hz/6ch-16bit integer) - as above
Configurations (audio only)
  1. HDMI 5.1
    1. OS X/Player > HDMI > Receiver > Speakers
    2. OS X/Player > HDMI > Sound Bar
    3. OS X/Player > HDMI > TV > Receiver > Speakers
    4. OS X/Player > HDMI > TV > Sound Bar
    5. OS X/Player > HDMI > TV
  2. Optical 5.1
    1. OS X/Player > Optical > Receiver > Speakers
    2. OS X/Player > Optical > Sound Bar
  3. Analog 5.1
    1. OS X/Player > Speakers
  4. USB 5.1
    1. OS X/Player > USB > Optical > Receiver > Speakers
    2. OS X/Player > USB > Optical > Sound Bar
    3. OS X/Player > USB > Speakers
Audio MIDI Setup/Create Aggregate Device
  1. Analog_5.1_Surround (applies to 2.1, 3.0, 3.1, 4.0, 4.1 and 5.1)
    1. See tonymacx86 - How to enable 5.1-channel analogue audio in OS X
    2. Applications/Utilities/Audio MIDI Setup
      1. Format: 48000 Hz/2ch-24bit integer, verify the following devices
        • Built-in Output
        • Built-in Line Output
        • Built-in Line Output
      2. Audio Devices/+/Create Aggregate Device
      3. Select - see see Screenshot 1.
        • Built-in Output
        • Built-in Line Output
        • Built-in Line Output
      4. Verify Selections
        • Stream 1 checked
        • Stream 2 checked
        • Stream 3 checked
      5. Select/Configure Speakers - see Screenshot 2.
        • Multichannel
        • 5.1 Surround
      6. Verify Speakers
        • Select/Left Front
        • Verify Left Front/Sound
        • Repeat for each speaker
      7. Apply
      8. Done
      9. Rename Aggregate Device
        • Analog_5.1_Surround
Audio MIDI Setup/USB2Optical/Format
  1. USB2Optical_5.1_Surround
    1. Applications/Utilities/Audio MIDI Setup
      1. Audio Devices/USB digital audio - see see Screenshot 3.
      2. Format: 48000 Hz Encoded Digital Audio
      3. Done
Audio MIDI Setup/USB2Analog/Configure Speakers
  1. USB2Analog_5.1_Surround
    1. Applications/Utilities/Audio MIDI Setup
      1. Audio Devices/USB analog audio- see see Screenshot 4.
      2. Format: 48000 Hz/6ch-16bit integer
      3. Select/Configure Speakers
        • Multichannel
        • 5.1 Surround
      4. Verify Speakers - see see Screenshot 5.
        • Select/Left Front
        • Verify Left Front/Sound
        • Repeat for each speaker
      5. Apply
      6. Done
Notes
  1. HDMI includes
    1. HDMI audio
    2. DP audio
    3. DP2HDMI audio
    4. DVI audio
      • Nvidia 4xx and newer
      • Intel HD4600/HD5000+/HD6000+/HD5x0+/HD6x0+
  2. Realtek ALC AppleHDA.kext
    1. onboard audio codec support
      • ALC885
      • ALC887
      • ALC888
      • ALC889
      • ALC892
      • ALC898
      • ALC1150
      • ALC1220
    2. HDMIDP/DVI audio codec support
    • AMD* HD 5xxx, HD 6xxx, HD 7xxx, R7/R9 2xx, R7/R9 3xx
      • * OS X/macOS default drivers
    • Intel HD3000, HD 4000, HD4600+, HD5000+, HD6000+, HD5x0
    • Nvidia GT/S/X 4xx, 5xx, 6xx, 7xx, 9xx
      • * Nvidia Web drivers
  3. Onboard audio is not available with an unsupported codec
Problem Resolution (limited support)
  1. AppleHDA: AppleHDA Realtek Audio/Post #1/IX. Problem Reporting
  2. HDMI audio: AppleHDA HDMI Audio/Post #1/IX. Problem Reporting
  3. USB - Start a new thread with device, specs and problem description
    1. Install not working
      • USB device incompatible with OS X
      • Incorrect setup, verify Audio MIDI Setup/Format
    2. Stopped working/poor sound quality
      • Incorrect setup, verify Audio MIDI Setup/Format
      • Restart
More Information
  1. Alexander Thomas: Setting up surround sound in OS X with a multi-channel sound card
Screenshots
1. Audio MIDI Setup/Audio Devices/+/Create Aggregate Device/Format
Screen Shot 2014-05-09 at 11.02.15 PM.png
2. Audio MIDI Setup/Audio Devices/+/Create Aggregate Device/Configure Speakers
Screen Shot 2014-05-09 at 11.02.23 PM.png
3. Audio MIDI Setup/Audio Devices/USB2Optical/Format
Screen Shot 2014-05-24 at 1.16.47 PM.png
4. Audio MIDI Setup/Audio Devices/USB2Analog/Format
Screen Shot 2014-05-24 at 1.17.32 PM.png
5. Audio MIDI Setup/Audio Devices/USB2Analog/Configure Speakers
Screen Shot 2014-05-24 at 1.17.43 PM.png
 
Last edited:
Joined
Jul 23, 2012
Messages
45
Motherboard
Asus P8H67-V
CPU
Intel Core I5-2500
Graphics
Asus EAH6850
Mac
iMac
Classic Mac
Mobile Phone
iOS
Mavericks: Surround Sound [Guide]

I have ALC887_v100302 with your kext installed in Multibeast 6.3. I wanna use surround sound (5.1) but the problem is that VLC cannot play with 5.1. I only play 5.1 with app Mac Bluray Player and XBMC. Surround sound in VLC only plays 4 channels (Front L/R and Rear L/R) not Center and Subwoofer. Thanks for ur support.
 
Joined
May 3, 2012
Messages
165
Motherboard
Gigabyte X79-UD3
CPU
i7 X9730k
Graphics
Nvidia GeForce GTX670 OC
Mac
MacBook Pro
Classic Mac
Mobile Phone
Android
Mavericks: Surround Sound [Guide]

I have fully functional audio through all sources using the MB 6.3. I personally use optical to a receiver. Is there any reason why this guide pertains to me. Am I not getting true 5.1? It seems like I am getting 5.1. Just not sure who exactly this is for.
 
Joined
Apr 2, 2010
Messages
14
Motherboard
Asus Z97-DELUXE
CPU
Intel i7 4790k
Graphics
GTX 780
Mac
MacBook Air
Classic Mac
Mobile Phone
iOS
Mavericks: Surround Sound [Guide]

I am using the Optical digital output with an ALC1150 soundcard and I finally found why DTS wasn't working: in Audio MIDI Setup, the format for Digital Out was set to 44.1kHz. Setting it to 48kHz fixed DTS decoding using MPlayerX.

Still doesn't work with VLC though. Use S/PDIF when available and Force Dolby Detection are both checked.

Also, I can't play DTS-HD streams. AFAIK, DTS-HD contains a core track inside for "older" receivers not supporting DTS-HD. On Windows, I can play those fine, I still get DTS sound. But I only get static with MPlayerX.

As a side note, on my old hackintosh with ALC888, the AppleHDA patch described in the customization guide allowed me to play those DTS-HD streams from VLC.
 
Joined
Apr 2, 2010
Messages
14
Motherboard
Asus Z97-DELUXE
CPU
Intel i7 4790k
Graphics
GTX 780
Mac
MacBook Air
Classic Mac
Mobile Phone
iOS
Mavericks: Surround Sound [Guide]

Some news.

I managed to get proper DTS passthrough today. When I had an ALC888 codec, I used multibeast's AppleHDA with the following patch from one of toleda's guide
Code:
$ sudo perl -pi -e 's|\x88\x08\xec\x10|\x80\x08\xec\x10|g' AppleHDA.kext/Contents/MacOS/AppleHDA
$ sudo perl -pi -e 's|\x85\x08\xec\x10|\x88\x08\xec\x10|g' AppleHDA.kext/Contents/MacOS/AppleHDA
This worked in Mavericks, however I would sometimes lose sound when trying to play a DTS movie and needed to reboot, but that happened really rarely (1 time out of 100)

So for ALC1150, I tried to apply the same patch, but with the right codec ID (0x0900 instead of 0x0888). That worked too, but in Sound preferences, the Internal Speakers output kept flashing between Internal Speakers and Headphones.

The worst is that I had the same problem in Windows 8, I kept getting "A jack cable was plugged/unplugged" on the front speaker plug. I actually sent back a motherboard because of that same bug because I thought it was a hardware problem, but it turns out it's that patch. Putting back the original kext did nothing.

In order to fix it I had to remove the motherboard's battery for 15 minutes in order to reset everything. That fixed the problem.

Is there any more info on this patch? Seems like it could almost allow native optical 5.1 sound on Mavericks. Is there a thread where we could talk more "technically" about this? This might be off-topic for this thread.
 
Joined
Oct 9, 2014
Messages
3
Mac
Classic Mac
Mobile Phone
Audio - Surround Sound Realtek ALC AppleHDA [Guide]

Toledo, I know this is going to be a stupid question, but where can I get the Kext for Optical 5.1 audio that you mention here, and how do I get it into Multibeast?

Obviously I'm a newbie, and I'm lost, but my Asus z87m-plus gets stereo sound (digital optical) with the 887 codec, but I don't have the additional ID's that you list here. Please help a moron in need! :)
 

toleda

Moderator
Joined
May 20, 2010
Messages
24,103
Motherboard
Asus Maximus VII Impact
CPU
Core i7-4770K
Graphics
RX 560 + HD4600
Mac
iMac, MacBook Pro, Mac mini
Classic Mac
512K, LC, Power Mac
Mobile Phone
iOS
Audio - Surround Sound Realtek ALC AppleHDA [Guide]

my Asus z87m-plus gets stereo sound (digital optical) with the 887 codec
All MultiBeast ALCxxx AppleHDAs support optical 5.1. Post #1 identifies the applications/settings required for OS X 5.1 audio. Only your receiver can confirm 5.1 digital audio.
 
Top