Vote Charlie!

Striving for surround sound

Posted at age 27.
Edited .

Update: I’ve settled on a solution using the Creative SB1560 and three audio cables, giving up on optical digital audio.

This week I’ve been trying to get true surround sound from my desktop’s optical digital port. I haven’t been totally successful yet, but I do have a much better understanding of audio formats and channels and and technologies involved. Using Windows, everything works splendidly, but I’m primarily running OS X El Capitan. Needless to say, it’s been frustrating! I currently can only get reliable DTS surround sound using the Plex Home Theater app, but that’s clunky and won’t play any video file like VLC player.

Note: Some of the below could use another pass, though I’m not sure I’ll get time. I didn’t know this was going to become a blog entry till I got deep into it and figured I should record some of my research. I’m planning to try a USB device and see if I can circumvent the problem, in which case I’ll probably report back. There are a couple sections in the program specific results at the bottom that need more testing.

Back in January, I built a hackintosh after trying the 2015 12” MacBook and finding it much to slow. I figured I could buy a MacBook Pro, or for the same money, build a more powerful desktop. I also needed to save money since I had recently quit my job. I’ve since bought a 2016 12” MacBook anyway, but that’s a separate story.

Speaker setup

I have been using normal desk speakers (Creative GigaWorks T40, purchased September 20, 2009) for playing audiobooks and watching videos at my desk. When projecting movies on my wall or listening to music, I use my home theater speakers (Logitech Z-5500, purchased April 10, 2007, for $255, but now discontinued and used ones are much more expensive!). To conveniently use both setups simultaneously, I use a FiiO E10K USB DAC (digital to analog converter) for more power than the computer’s stereo jack, and into that I have plugged a Monster iSplitter 1000 Y-Splitter, which connects via a stereo cable to each speaker set. I’ve therefore only been using two stereo channels, despite the Z-5500 supporting six channels of Dolby Digital or DTS audio. I hadn’t even had the center speaker connected, as I didn’t like the faked surround sound mode and preferred to use simple “stereo x2”, where it plays the front signals in the rear speakers as well.

Well, a week ago, I decided to give surround sound another try. I bought a gold plated Toslink cable to connect the optical S/PDIF ports on my ASUS motherboard and Z-5500 speakers. I also bought 100 feet of AmazonBasics 16 gauge speaker wire I thought I’d use to connect the center speaker and replace the old networking cable I salvaged to connect the other speakers. I underestimated the weight of the wire, though, and after consulting the Z-5500 manual to see what thickness was originally used, I ordered 100 feet of white GearIT 18 gauge speaker wire.

That arrived Wednesday, and I immediately broke from writing – a journal entry about how I hadn’t been writing for six weeks – to run nice new wire and set up the speakers. While I was at it, I attached the speakers to the walls and ceiling for a nicer setup. I used to avoid putting holes in the wall, but after installing thousands of dollars in SmartThings related devices in this house, I figured I’ll be here long enough to justify a few more holes to repair some day.

Initial surround sound tests

Once I connected the optical cable and changed OS X’s sound output device from “FiiO USB DAC-E10” to “Digital Out”, I found two test videos to help make sure I set up the speakers correctly and they worked.

Initially I thought the setup was working. The Z-5500 was receiving a digital signal, though the “effect” selector allowed the typical options of “Stereo”, “Stereo x2”, “PLII Movie” (Pro Logic II Movie) and “PLII Music” (Pro Logic II Music). I tried the movie and music versions, and while the center speaker worked with the movie one, it was heavily using center and barely using front left and right, so the sound wouldn’t have seemed to come from the actors if I were watching a movie. Using the music setting, it was better. Using the test videos, the audio for the center channel did indeed seem to only be coming from the center speaker. This was more than I had experienced before, so I thought it must be working. But the “right surround” and “left surround” sound came from both the front and rear speakers. I wasn’t sure if this was wrong, as it did say “surround” and not “rear”, and the rear speakers only worked during the “right surround” and “left surround” and not during the “front right” and “front left” portions. It seemed there were clearly more than two stereo channels, so it must be correct.

My suspicion all was not well nagged, and I decided to test some videos after booting into my Windows 7 installation. There I knew my motherboard’s Realtek ALC892 audio would be fully functional since device drivers are readily available for Windows and it doesn’t require any of the hacking so sadly necessary to run OS X on custom hardware. When I played a video with a DTS track, I was amazed to see something I had never seen on the Z-5500 screen before: “DTS Digital”. That told me something must not have been right on the Apple OS X side. The test videos this time yielded “right surround” and “left surround” coming only from the rear speakers! I tried a video with an AC3 5.1 channel track and saw another new-to-me status: “Digital” (Dolby Digital).

After reading the Z-5500 manual more closely, I surmised I previously was only receiving two channel audio, and those Pro Logic II movie and music modes were special algorithms to fake surround sound using a normal stereo audio source.

Surround sound background

One of the below guides linked to a great explanation of surround sound that was very helpful for my understanding and shed a bit of light on the OS X utility Audio MIDI Setup. In “Setting Up Multi-Channel Sound Cards in OS X” (pdf), “Dr. Lex” wrote:

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.

That might explain some of my confusion over digital ports reporting 2 channels below.

Dr. Lex explains the two options are:

  1. decode the stream on the computer and output many channels
  2. pass the encoded surround signal intact to an external receiver that does the decoding

Another very helpful passage:

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.

That seems to be where I am stuck. I can’t figure out how to get many media players to pass through the streams, and I’m not sure if this is due to OS X removing some support for encoded streams, or my kext files are not properly configured to reveal the option, or due to the media players I am using not providing proper support. The evidence seems scattered, but since I have gotten true surround sound to work a couple of times with specific players, I know it’s at least possible for a player to circumvent the problem with OS X, or perhaps there is not a problem with OS X at all, and it’s all the players’ faults.

Note there is also some helpful information in the “Caveats” section of Dr. Lex’s C-Media CM6206 Enabler for Mac OS X v2.1 page, though it applies to a slightly different situation with a specific sound card.

Realtek ALC and surround guides

Given my knowledge I did not yet have multichannel sound coming out of my computer, I dove back into the convoluted web of forum and blog posts regarding setting up a hackintosh. I first looked for guides specifically mentioning using my motherboard, the ASUS Z97-A/USB 3.1 DDR3 LGA 1150 ATX board. I found a couple posts, but nothing newer than January or containing any steps I didn’t do that might explain my audio options being different. Then I searched various combinations of “hackintosh”, “Z97”, “ALC892”, “El Capitan”, “digital out”, “optical” and “DTS”. I found a ton of discussion, but it was hard to figure out what was relevant. Below are some notes.

Audio - Realtek ALC AppleHDA [Guide] on tonymacx86.com

This seems to be the definitive guide I needed. It mentioned Realtek ALC 892 and OS X El Capitan specifically. I did not immediately understand the format of the document, though. For instance, it starts with this:

Realtek ALC Installation Methods

  1. Audio codec/ALC Injection? audio_codecdetect.command.zip (Select View Raw, double click)
  2. Native AppleHDA.kext? Restore native AppleHDA [Guide].pdf
  3. Select one method, remove method to try/install a different method
  4. Uninstall Realtek ALC AppleHDA, below

You’d think there are a sequence of steps given the author used a numbered list instead of a bulleted list, but I was pretty sure I didn’t want to uninstall in Step 4 what I installed in the other steps, and Step three seemed to be referring to the first two. So then I thought those were more of a table of contents, but the next part of the document had three sections denoted with Roman numerals, and they seemed to be three installation methods. What a mess! And so typical of everything hackintosh.

I was pretty sure what was explained in “I. MultiBeast Realtek ALC AppleHDA” was what I originally did in setting up my computer, so I looked at “II. Realtek ALC AppleHDA Scripts”. This section, too, was a bit ambiguous, but I was pretty sure it meant for me to choose one of the three scripts and run it. I ended up trying all three scripts, but none gave me anything more than the digital out I already had working with two channels. The command output was suspicious, though, so I wasn’t sure if the method even worked correctly. There were messages like “This is an unsupported configuration, likely to break in the future and leave your machine in an unknown state.” and “Error: Invalid argument detected: -d /Library/Extensions Aborting …”. Here is the full output of one of the scripts:

[SPOILER=Output of audio_pikeralphaALC-110_v1.0r10.command]

Last login: Fri May 27 16:06:32 on ttys000
You have new mail.
/Users/cgorichanaz/Desktop/audio_pikeralphaALC-110_v1.0r10.command ; exit;
  ~ /Users/cgorichanaz/Desktop/audio_pikeralphaALC-110_v1.0r10.command ; exit;

Agreement
The audio_cloverALC-110 script is for personal use only. Do not distribute
the patch, any or all of the files or the resulting patched AppleHDA.kext
for any reason without permission. The audio_cloverALC-110 script is
provided as is and without any kind of warranty.

File: audio_pikeralphaALC-110.command_v1.0r10
EFI partition is mounted
System Integrity Protection status: enabled (Custom Configuration).

Configuration:
    Apple Internal: disabled
    Kext Signing: disabled
    Filesystem Protections: disabled
    Debugging Restrictions: enabled
    DTrace Restrictions: enabled
    NVRAM Protections: enabled

This is an unsupported configuration, likely to break in the future and leave your machine in an unknown state.

OK to patch
Confirm Realtek ALC892 (y/n): y
Clover Audio ID Injection (y/n): y
Use Audio ID: 1 (y/n): y
Edit config.plist/Devices/Audio/Inject/1
Download kext patches
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  1404  100  1404    0     0   3787      0 --:--:-- --:--:-- --:--:--  3794
Download Piker-Alpha/AppleHDA8Series.sh
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0

 some stuff I missed before screen cleared automatically 

AppleHDA8Series.sh v3.4 Copyright (c) 2013-2016 by Pike R. Alpha
                   Patched XML files by Toleda and contributors.
----------------------------------------------------------------
Bugs > https://github.com/Piker-Alpha/AppleHDA8Series.sh/issues <

Error: Invalid argument detected: -d /Library/Extensions Aborting ...
Done.

rm: /tmp/ALC892.zip: No such file or directory
rm: /tmp/892: No such file or directory
rm: /tmp/ConfigData-ALC892.xml: No such file or directory
rm: /tmp/HDEF.txt: No such file or directory
Fix permissions ...
Kernel cache...
rebuilding //System/Library/PrelinkedKernels/prelinkedkernel
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext USBInjectAll.kext
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext realtekALC.kext
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext LPCSensors.kext
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext GPUSensors.kext
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext GenericUSBXHCI.kext
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext FakeSMC.kext
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext CPUSensors.kext
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext AHCI_Intel_Generic_SATA.kext
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext AHCI_3rdParty_eSATA.kext
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext ACPISensors.kext
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext FakePCIID_XHCIMux.kext
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext FakePCIID.kext
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext daspi.kext
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext AppleIntelE1000e.kext
kext-dev-mode allowing invalid signature -67030 0xFFFFFFFFFFFEFA2A for kext AppleHDALoader.kext
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext AppleHDA892.kext
kextcache updated critical boot files, requesting launchd reboot

Install finished, restart required.
To save a Copy of this Terminal session: Terminal/Shell/Export Text As ...

[Process completed]

[/SPOILER]

I looked at “III. Piker-Alpha AppleHDA8series Script”, but it seemed to overlap a bit with the other scripts, as AppleHDA8Series.sh is called from within audio_pikeralphaALC-110_v1.0r10.command.

Under the “Requirements” section, under “OS X versions supported”, the post listed “El Capitan/10.11+, see Notes 1 and 2, below”. (I was pretty sure I met the other requirements, which overlapped with the scripts again.) Note 2 said I needed to start with the original AppleHDA.kext, which I restored following Restore native AppleHDA [Guide].pdf. Note 1 shows:

  1. OS X System Protection
    1. El Capitan/10.11.x (Disable SIP, Mandatory)

That linked document says:

Relevant user options for SIP are as follows:
csr-active-config 0x0 = SIP Enabled (Default)
csr-active-config 0x3 = SIP Partially Disabled (Loads unsigned kexts)
csr-active-config 0x67 = SIP Disabled completely

I have my csr-active-config set to 0x3, and while the requirement doesn’t specify whether “Disable SIP” means partially or completely, I’m guessing partially disabled is good enough here as that’s enough to get the unsigned kexts loading. Also, in El Capitan: Realtek ALC AppleHDA Audio on InsanelyMac, one person wrote:

Disabled SIP completely. Ran this to clear the cache:

System Integrity Protection status: disabled.
sudo touch /System/Library/Extensions/ && sudo kextcache -u /

And toleda replied “Do not see the problem”. In my command output above, though, I got System Integrity Protection status: enabled (Custom Configuration).. Maybe I should try setting csr-active-config set to 0x67?

But, in El Capitan: Realtek ALC AppleHDA Audio by toleda on InsanelyMac, it shows more explicitly:

Requirements

  1. OS X versions supported
    1. El Capitan/10.11.x
      1. Disable SIP: CsrActiveConfig=0x3

Back in the main Realtek ALC AppleHDA guide, the only other pertinent section is “5.1/Surround Sound, see Surround Sound Realtek ALC AppleHDA” under “Optional Installs”, which I’ll describe next.

Surround Sound - Realtek ALC AppleHDA [Guide] on tonymacx86.com

This guide’s change log shows no update since 2014 for Yosemite, but it shows El Capitan under “Requirements”.

Under “Recommendations”, there are sections for various methods of audio output, including HDMI and optical and analog directly or via USB. I looked a the direct optical section:

  1. Optical 5.1 - DD/DTS receiver/speakers with SPDIFin (Note 2, 3 and 4)
    1. Players
      1. PlexHT_v1.0.13
      2. XBMC_v13.0 - select System/Audio/Enable Passthrough
      3. MPlayerX_v1.0.22.1 - Yes/DD D/DTS (Preferences/Audio/Pass through AC3=Yes/DTS=Yes)

The relevant notes:

  1. Realtek ALC AppleHDA.kext
    1. onboard audio codec support
      1. ALC892
  2. Onboard audio is not available with an unsupported codec
  3. 8 series motherboard onboard audio may frequently unexpectedly stop
    1. Best fix is HDMI audio
    2. Slight chance USB audio may stop

As far as I can tell, none of those are steps I missed. Next is the “Installation” section. Relevant to me was:

  1. Optical audio
    1. Onboard audio
      1. Realtek ALC AppleHDA
    2. Select System Preferences/Sound/Output/Built-in Digital

That linked document is the first one I described above, and I already set my sound output to “Digital Out” as reported by the Sound system preferences panel or “Built-in Digital Output” as reported by the OS X utility Audio MIDI Setup. So it seems I should be able to use DTS audio with at least those three mentioned players, Plex Home Theater, Kodi (XBMC) and MPlayer.

Next in the surround guide is a results section:

Player Test Results (OSX: 10.9.2/C1021/DD 5.1/DTS 5.1)

  1. 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)

Given those results are from OS X 10.9, and I’m on 10.11, I’m not sure I would even trust them. But so far it’s seemed this issue has mostly to do with the kext files and the Realtek ALC line in use, and less to do with the particular motherboard or version of OS X. I’m not sure how to interpret “Yes/DD D/DTS”, though since one of them under HDMI says “Yes/DD (AC3), No DTS”, I am assuming the “D/DTS” means yes. Perhaps “D” is short for “ditto” or something, but if that’s the case, why the hell it couldn’t say “Yes” is beyond me. Again, none of this is very clear, and definitely isn’t written to help anyone new to the area looking for help.

Anyway, I just tested various apps myself, but it was somewhat helpful to see what settings I might need to look for. In particular, I was curious of there was anything special about the “48k Hz/2ch-16bit integer” value that was apparently used for testing. My Z-5500 speakers support 96KHz-24bit, and my motherboard’s ALC892 apparently supports 192kHz-24bit:

Realtek® ALC892 8-Channel High Definition Audio CODEC featuring Crystal Sound 2
- Supports : Jack-detection, Multi-streaming, Front Panel MIC Jack-retasking
Audio Feature :
- Absolute Pitch 192kHz/ 24-bit True BD Lossless Sound
- DTS Ultra PC II
- DTS Connect
- Optical S/PDIF out port(s) at back panel

My app test results are below the following notes on some more pages.

Audio MIDI Setup reported channels

In a comment on the Audio - Realtek ALC AppleHDA [Guide] linked above, ajemutt said:

optical audio is currently working great in stereo. I am attempting to now enable 5.1 output via the optical.

And toleda replied:

See Post #1/Optional Installs/1. 5.1/Surround Sound

I of course have the same problem as ajemutt, but I don’t think the surround sound guide added anything to the other guide, and I’m not sure what else I should do.

I noticed my “Built-in Digital Output” item shows “0 in/ 2 out”, which seems to indicate I could only hope to pass through DTS audio, but can’t generate it on the OS X end. But I can also imagine it uses 2 channels either way, and even if it’s not passed through from the source file, OS X might still encode the DTS audio format and send it over those 2 channels. So I guess in a way “2 out” might be what I expect. It’s a little hard to wrap your head around.

audio_midi_setup_2channel_digital.png

audio_midi_setup_2channel_digital.png

Some other sources below indicated this might not be a problem:

  • Experimental 6 channel AppleHDA on InsanelyMac

    This is from December 2013, so I think whatever breakthroughs exist here are already incorporated into the above guides. Of note, though, was this (bold added):

    No longer need to setup aggregate device in Audio MIDI Setup to get 6 channel output!

    6 channel sound is confirm worked on Built-in Output, even though it’s showed as 2 channel in Audio MIDI Setup. (same as Built-in Digital Output)

    There is no way to adjust the volume in each channel under OS X. You have to adjust the volume on your speakers.

  • El Capitan: Realtek ALC AppleHDA Audio on InsanelyMac

    Someone wrote:

    Thanks toleda, i use ‘audio_cloverALC-110.command.zip’ Script and works great except one problem:

    HDEF audio_ID tried both 1 and 2 but still don’t have 5.1 digital surround (optical)
    Audi MIDI Setup - > Built-in Digital Output : only have 2 Channels. it should have 5 Channels

    To which apparent expert toleda responded:

    Digital Out is working.
    2 Channels is correct; Audio MIDI Setup is not designed for digital audio.

    iTTT wrote:

    i connect Digital Out to Xbox®5.1 Surround Sound System. only KODI player can output DTS 5.1,.
    Below players cannot. so i am confuse.

    Mac Bluray Player
    MPlayerX
    SPlayer
    VLC
    Aurora Blu-ray Player

    Toleda replied on January 7, 2016:

    The player has to set up Encoded Output, those listed don’t with one exception: MPlayerX_v1.0.22.1 - Yes/DD D/DTS (Set Preferences/Audio/Pass through AC3=Yes/DTS=Yes)
    Add Plex to the DTS5.1 yes list.

  • Mac OS X Dolby Digital 5.1 with Mac Mini [solved]

    In describing Audio MIDI Setup settings, Jari Turkia wrote of some strange and inconsistent behavior getting surround sound working. Some tidbits seemed they might apply to me:

    In the Mac, at the HDMI, in Format set it as Encoded Digital Audio, the Hz setting is irrelevant

    MacOSXDolby-EncodedDigitalAudio.png

    MacOSXDolby-EncodedDigitalAudio.png

    and

    Update 1st Jan 2014:
    The number of channels configured into Audio Setup does not reflect the actual number of speakers you have. That is done in Configure Speakers. I have 8ch (or 8 speakers) configured in the Audio Setup, but this is a screenshot of my speaker setup:

    MacOSXAudioDevicesConfigureSpeakers.png

    MacOSXAudioDevicesConfigureSpeakers.png

    They have different number of speakers! It still works. That’s how it is supposed to be.

    There is some more discussion in the comments about whether it should show 2 channels or many, or whether the speaker configuration popup should show many, but I wasn’t sure if these were relevant to me since I’m not dealing with HDMI.

    It does seem like I should have an “encoded output” option, though, to get this working.

And it seems this may have worked before OS X Lion:

  • lost surround sound (5.1) with lion upgrade on Apple Support Communities

    I have lost Dolby 5.1 output through the optical cable with the Lion upgrade. Worked fine in Leopard and Snow Leopard. The Audio MIDI Setup app recognizes “Digital Out” as the source, but “Encoded Digital Audio” / “Configure Speakers” grays out everything but “Stereo.” As expected, the amplifier only reports PCM as the sound source. Anyone else run across this? I’m hoping this will quietly correct itself with a future update, as most x.0 problems do.

    Years later, it seems Apple has failed to make the problem “quietly correct itself”. Another comment reads:

    The only one sotware that works for 5.1 under lion is PLEX, in my case. Give it a try. I don´t like it very much, is a bit heavy but works.

    I found Plex Home Theater does indeed work for me also, apparently because it can pass through the DTS stream directly to the optical port somehow. A later comment mentions VLC started working again, though I can’t get it to work now years later:

    The latest VLC (1.1.12) now passes DD 5.1 through the optical cable. Gotta love open source. Still waiting for Apple to support more than stereo in its Audio/Midi Utility and DVD Player.

A little more information, but from 2012:

  • VLC and Optical/SPDIF - anyone have AC3/DD/DTS working? on tonymacx86.com

    The following indicates I may need some modification to my AppleHDA kext to get “Encoded Digital Audio” to show up in Audio MIDI Setup, but since this is from 2012, I’m not sure if it still applies since the above post made it seem that might have disappeared in OS X Lion.

    natdeamer wrote:

    Does anyone have DD/DTS/AC3 Passthrough working with VLC?

    My setup is ALC888 via optical to my amp. I have sound working fine and Output is set to ‘Digital Out’.

    In VLC I have set ‘ User S/PIDF when available and force detection of Dolby Surround.

    In Audio Midi I have Format: 48000.0Hz 2ch-24bit Integer

    MPlayerX works, but I would prefer VLC…..

    toleda replied:

    My experience, DD/DTS only works in OS X/VLC when the option Digital Output (Encoded) appears in the VLC/Audio menu. To get that option in Audio MIDI Setup, select Format/Encoded Digital Audio. If you don’t have that option, the AppleHDA binary in your 888 AppleHDA.kext can be edited to provide that capability.

    As an aside, your current settings will enable DD/DTS in Plex and XBMC (without the Encoded Digital Audio option). Perhaps this will be solved in VLC 2.0, available soon.

    In VideoLAN Forums from 2013, it seems VLC may have handled surround in the past, but lost some functionality along the way:

  • 5.1 audio changes after update 2.1.1

    JSLover wrote:

    There are many posts on the forum about this issue, see my reply here…

    Re: TO VLC TEAM NEW 2.1.0 WONT LET ME PLAY 5.1 OR STEREO WHY

    …the sad truth is: They removed that menu (or should I say “they re-purposed the name Audio Device to mean something else than what it meant before”…don’t get me wrong: the new meaning is better, but the old menu items need to make a comeback, somewhere else)…& they can’t understand why that upsets us — they didn’t even understand the problem for the 1st 10+ posts — I’m still not even sure the Devs understand the problem: we need/want those menu items!

    I hope they will bring those menu items back (in a new menu). We should be able to select the options that were on the previous “Audio Device” menu. Make a new menu, call it “Audio Output Mode” or whatever. We should be able to force 5.1/Mono/etc in VLC without changing it in the OS. Why should we be able to? — cuz it was a feature that was already written/implemented & worked fine!

    misiriou said, “So I dumped 2.1.1 and returned to 2.0.8”.

    Many other comments debate whether any needed functionality was actually removed. And it seems to be talking about Windows, so I again am unsure if this applies to me. Just in case, I tried downloading VLC 2.0.10 for OS X, vlc-2.0.10-intel32.dmg, but it made no difference to me. I couldn’t try anything older as it wouldn’t run on El Capitan.

Other possibilities

MultiBeast update

While researching all this, I noticed a newer version of MultiBeast was released since I used 8.0 in January to first set up this computer. The change log for 8.0.1 and the current 8.1 doesn’t show anything related to Realtek ALC 892, I think, but just in case, I downloaded the latest MultiBeast and ran through the driver installation again. I saw it apparently included USB fixes for 7/8/9 series motherboards, so I wondered if this would resolve all the USB port problems I had at the beginning, where I still have several unusable USB ports. Alas, it made no difference. I guess I already made whatever patches were included in this MultiBeast.

Output device limit

Despite having at least six stereo jacks in addition to my SPDIF port, I only have four output items in Audio MIDI Setup. That matches what toleda wrote below. I’m not sure it’s related to my problem, though, as my SPDIF port is one of the four I do have, and I think the procedures mentioned are outdated compared to what I followed above.

In Digital Audio - Can i enable onboard SPDIF out ? on tonymacx86.com, josephpoon0506 asked on March 9, 2014, about enabling the SPDIF port.

Toleda wrote:

Use Procedure 7. Substitute SPDIF-2 Wire Output in M-Realtek_ALC_AppleHDA_Customization.pdf, toleda/audio_ALCInjection

and

VLC does not support DTS. Encoded Digital Audio patching does not work in 10.8 or 10.9. Only XMBC and Plex support DD/DTS 5.1. Use either for surround sound in Mavericks

and then

AppleHDA.kext supports a maximum of 4 audio output devices. The customization guide provides instructions for creating user specific audio solution. To add the second digital output, determine which existing audio device to eliminate. If you decide the 1st Line Out (Orange) is not needed, use layout-id 3 and add the 2nd digital out to the required ALC892/layout-id: 3 files.

VLC for OS X

I could not get VLC player to output anything more than two channel audio despite playing videos with DTS audio and videos with 5.1 channel AC3 audio.

[SPOILER=Steps to reproduce]

  1. Download the VLC 2.2.3 Weatherwax (Intel 64bit) DMG package from the VLC for Mac OS X page.
  2. Open the vlc-2.2.3.dmg disk image.
  3. Launch VLC.app, or move to Applications folder and then launch.
  4. Open a video file that has a DTS audio track and start playing it.
  5. My Logitech Z5500 speakers reported a digital signal, but it did not appear to be “DTS Digital”, as I could only select effects such as “PLII Music”.
  6. Navigate to VLC menu > Preferences > Show All (button at lower left) > Audio.
  7. Configure as follows and click Save.

    • Use S/PDIF when available: [checked]
    • Force detection of Dolby Surround: On
    • Stereo audio output mode: Dolby Surround
    VLC_settings.png

    VLC_settings.png

  8. Quit and restart VLC for good measure.

  9. Open a video file that has a DTS audio track and start playing it.
  10. Observe Z5500 still reporting a two channel signal instead of expected DTS digital surround sound signal.

[/SPOILER]

Possible update:

Later I tried these and managed to get a surround signal, I think, but I need to do more testing. It may have also depended on Audio MIDI Setup being set to a specific frequency and bits.

VLC_settings.png

VLC_settings.png

Kodi for OS X

(Formerly known as XMBC)

Needs updating: I think I got DTS digital surround working with Kodi, but it seemed unpredictable, so the settings need to be tested some more.

[SPOILER=Steps to reproduce]

  1. Download the Kodi DMG package from the Kodi downloads page.
  2. Open the kodi-16.1-Jarvis-x86_64.dmg disk image.
  3. Launch Kodi.app, or move to Applications folder and then launch.
  4. Open a video file that has a DTS audio track and start playing it.
  5. [continue this list when time for testing]
kodi_1.jpg

kodi_1.jpg

kodi_2.jpg

kodi_2.jpg

kodi_3.jpg

kodi_3.jpg

kodi_4.jpg

kodi_4.jpg

[/SPOILER]

Plex web app

Using the Plex web player with Firefox or Chrome yielded my Logitech Z5500 speakers reporting a two channel signal, as it displayed “PLII Music”, despite playing videos with DTS audio and videos with AC3 5.1 channel audio. It looks like Google made Chrome able to directly play MKV video files and allow AC3 passthrough, but someone from Google wrote on April 30, 2015, “We don’t have plans to support DTS at this time.” I’m not sure why I cannot at least pass through AC3 audio using Plex web player, but Plex’s settings page does specifically mention MP4 videos, and I do not have an MP4 with 5.1 channel AC3 audio to test.

[SPOILER=Steps to reproduce]

  1. Open Firefox 46.0.1.
  2. Load the Plex web app.
  3. Navigate to Settings > Web > Show Advanced > Player.
  4. Configure as follows and click Save Changes.

    • Streaming Quality
      • Local Quality: Original
      • Remote Quality: 4 Mbps 720p
      • Online Quality: Original
      • HTML5 Player: [checked]
        Prefer the HTML5 video player over the Flash player.
      • Direct Play: [checked]
        Allows the player to play compatible media without any conversion. In most browsers, direct play supports MP4 videos with h264 video and AAC audio. Videos with subtitles cannot be played directly.
      • Direct Stream: [checked]
        Allows the server to copy compatible audio and video streams without converting them.
    • Audio & Subtitles
      • Allow Direct Play of AC3 Audio: [checked] Allow MP4 videos with AC3 audio to be played directly. Browser support for AC3 audio is limited.
      • Prefer AAC Audio: [checked] Prefer AAC over MP3 when transcoding audio. Some devices, like the Wii U, only support HLS with AAC audio.
      • Multi-Channel Audio Boost: None Boost volume when converting multi-channel audio to stereo.
      • Subtitle Size: Normal
      • Burn Subtitles: Automatic
    plex_home_theater_settings.jpg

    plex_home_theater_settings.jpg

  5. Open Chrome 51.0.2704.63 (64-bit).

  6. Load the Plex web app.
  7. Open a video file that has a DTS audio track and start playing it.
  8. My Logitech Z5500 speakers reported a digital signal, but it did not appear to be “DTS Digital”, as I could only select effects such as “PLII Music”.
  9. Open a video file that has an AC3 5.1 channel audio track and start playing it.
  10. Again, my Logitech Z5500 speakers reported a two channel digital signal.
  11. In the first browser, Firefox, navigate within Plex web app to Status > Now Playing and observe the playing AC3 video is being transcoded to AAC:

    Transcoding
    Video: Direct Stream
    Audio: Transcode (aac)

    plex_transcoding.png

    plex_transcoding.png

[/COLLAPSE]

Plex Home Theater for Mac

I was able to successfully play DTS audio using the standalone app Plex Home Theater for Mac 64 bit after checking the DTS capable receiver box and setting Audio output channels to “5.1”!

[SPOILER=Steps to reproduce]

  1. Download Plex Home Theater for Mac 64 bit ZIP file from the Plex downloads page.
  2. Extract PlexHomeTheater-1.4.1.469-47a90f01-macosx-x86_64.zip.
  3. Launch Plex Home Theater.app, or move to Applications folder and then launch.
  4. Navigate to Preferences > Change Preferences for System > Audio output.
  5. Check DTS capable receiver and set Audio output channels to “5.1”. The rest of the settings were fine for me. All the audio output settings follow:

    Audio output: Optical/Coax
    Audio offset: 0ms
    - Dolby Digital (AC3) capable receiver: [checked]
    - DTS capable receiver: [checked]
    - Multichannel LPCM capable receiver: [greyed out and unchecked]
    Boost volume level on downmix: [checked]
    Audio output channels: 5.1
    Audio output device: Built-in Digital
    Passthrough output device:** Default 1. Open a video file that has a DTS audio track and start playing it. 1. My Logitech Z5500 speakers reported “DTS Digital”.

[/COLLAPSE]

MPlayer OSX Extended rev15 (1511)

I get white noise when DTS passthrough is enabled. Regardless of that setting and the Surround setting menu, my Logitech Z5500 speakers only receive a two channel signal though the optical digital line.

[SPOILER=Steps to reproduce]

  1. Download MPlayer OSX Extended ZIP file from the MPlayer website.
  2. Extract MPlayer-OSX-Extended_rev15.zip.
  3. Launch MPlayer OSX Extended.app.
  4. Dialog appears: > Move to Applications folder in your Home folder?
    > I can move myself to the Applications folder if you’d like.

    Select “Move to Applications Folder” to install the app for later use.

    mplayer_move.png 1. Dialog appears:

    A new version of Offocial MPlayer SVN is available!
    Official MPlayer SVN r36986 is now available–you have r36505. Would you like to download it now?

    Select “Install Update”.

    mplayer_update.png 1. Once update is complete, launch MPlayer OSX Extended again if needed. 1. Open a video file that has a DTS audio track and start playing it. 1. My Logitech Z5500 speakers reported a digital signal, but it did not appear to be “DTS Digital”, as I could only select effects such as “PLII Music”.

    User toleda in comment #127 on El Capitan: Realtek ALC AppleHDA Audio wrote:

    The player has to set up Encoded Output, those listed don’t with one exception: MPlayerX_v1.0.22.1 - Yes/DD D/DTS (Set Preferences/Audio/Pass through AC3=Yes/DTS=Yes)
    Add Plex to the DTS5.1 yes list. 1. From the menu: MPlayer OSX Extended > Preferences… > Audio

    mplayer_preferences_audio.png 1. Check the “DTS” and “AC3” boxes under Hardware decoders: Enable pass-through for hardware decoders. Upon making a change, a Restart Playback button appears at the bottom right. Click this.

    For me, very loud static immediately started playing from my speakers, though the Z5500 still reported a digital signal and showed the “96··24” text that I believe indicates the signal is the maximum the Z5500 supports, 96KHz and 24 bits. It still showed “PLII Music”, so I think the signal is still only two channels.

    The items under Output device match what appears in my Audio MIDI Setup utility. Of note, it lists “Built-in Digital Output (2ch)”. That “2ch” bit is what seems to be causing me strife. I changed the Surround option from the default “Automatic (same as output device)” to “5.1 Surround” and restarted playback, but it made no difference. I only hear static when the DTS passthrough option is enabled, but regardless of the settings for DTS passthrough and Output device and Surround, I seem to be getting only two channels.

[/COLLAPSE]

Help get me elected by purchasing products mentioned in this entry!