-->Donations via PayPal [External Link Removed for Guests] :guitar
-->Installation/Post Installation Tutorial [Local Link Removed for Guests]
-->Useful Links [Local Link Removed for Guests]
-->Olarila Images - Updated images [Local Link Removed for Guests]
-->Guides and Tutorials [Local Link Removed for Guests]
-->Clover Folder for All Chipsets [Local Link Removed for Guests]
-->DSDT Patch Requests [Local Link Removed for Guests]

5.1/7.1 multichannel audio using VoodooHDA

Post Reply
User avatar
Cassio
Olarila Staff
Olarila Staff
Posts: 3765
Joined: 26 Aug 2011, 22:53

5.1/7.1 multichannel audio using VoodooHDA

Post by Cassio » 25 Oct 2011, 14:38

In order to have multichannel audio in Mac OS we just have to open Applications - Utilities - Audio MIDI Setup and create an aggregate device with 3 (5.1) or 4 outputs (7.1)

The problem is that on most codecs VoodooHDA enables only one output. It happens because the codec has more than one node with the same Default Association, only Sequence changes.

To get a dump of your codec use the getDump command (get it in VoodooHDA [External Link Removed for Guests]).

Example:
nid 17 0x02214030 as 3 seq 0 Headphones Jack jack 1 loc 2 color Green misc 0 nid 18 0x01014010 as 1 seq 0 Line-out Jack jack 1 loc 1 color Green misc 0 nid 19 0x511711f0 as 15 seq 0 Speaker None jack 7 loc 17 color Black misc 1 nid 20 0x02a1902e as 2 seq 14 Microphone Jack jack 1 loc 2 color Pink misc 0 nid 21 0x01813021 as 2 seq 1 Line-in Jack jack 1 loc 1 color Blue misc 0 nid 22 0x01011012 as 1 seq 2 Line-out Jack jack 1 loc 1 color Black misc 0 nid 23 0x01a19020 as 2 seq 0 Microphone Jack jack 1 loc 1 color Pink misc 0 nid 24 0x99331122 as 2 seq 2 CD Fixed jack 3 loc 25 color Black misc 1 nid 27 0x0145f1a0 as 10 seq 0 SPDIF-out Jack jack 5 loc 1 color Other misc 1 nid 28 0x41c5f160 as 6 seq 0 SPDIF-in None jack 5 loc 1 color Other misc 1 nid 36 0x01016011 as 1 seq 1 Line-out Jack jack 1 loc 1 color Orange misc 0 nid 37 0x01012014 as 1 seq 4 Line-out Jack jack 1 loc 1 color Grey misc 0
PinDefault is composed of 8 hex chars

Code: [Local Link Removed for Guests]

0x01011012
  |||||||+- Sequence
  ||||||+-- Default Association
  |||||+--- Misc
  ||||+---- Color
  |||+----- Connection Type
  ||+------ Default Device
  |+------- Location
  +-------- Port Connectivity
More info [Local Link Removed for Guests]

Apple doesn't use multichannel analog output, so we need to use a different Default Association for each line-out (use the first available value). Sequence is always zero.

To change these values we include NodesToPatch in VoodooHDA Info.plist file, for example:
<key>NodesToPatch</key> <array> <dict> <key>Codec</key> <integer>0</integer> <!-- codec address ("Probing codec #0" in getDump) --> <key>Config</key> <string>0x01011070</string> <!-- new PinDefault --> <key>Node</key> <integer>22</integer> <!-- node ID (nid) --> </dict> </array>
In some cases it's also necessary to adjust Port Connectivity. For jacks, bits 6 and 7 must be zero, so any value greater than 1 in char 7 of PinDefault means the node is disabled (you will see "Disabling pin nid X due to None connectivity" in getDump).

This also works for inputs, so if you don't have mic or line-in in sound preferences, you can use the same method to enable the inputs.

The only case we use the same Default Association in two nodes is when we want auto-detection, for example, line-out (green rear) and headphones (green front)
nid 17 0x0221401f as 1 seq 15 Headphones Jack jack 1 loc 2 color Green misc 0 nid 18 0x01014010 as 1 seq 0 Line-out Jack jack 1 loc 1 color Green misc 0
The primary output (line-out or speaker) has Sequence 0 and headphones (auto-detect) has Sequence f.

If your mobo has only one line-out you can change rear mic and line-in into line-out to have 5.1 audio, for this you just have to change the Default Device byte of these nodes to zero.

Before
nid 24 0x01a19830 as 3 seq 0 Microphone Jack jack 1 loc 1 color Pink misc 8 nid 26 0x01813050 as 5 seq 0 Line-in Jack jack 1 loc 1 color Blue misc 0
After
nid 24 0x01019830 as 3 seq 0 Line-out Jack jack 1 loc 1 color Pink misc 8 nid 26 0x01013050 as 5 seq 0 Line-out Jack jack 1 loc 1 color Blue misc 0
ASUS N53Jq • CPU: Intel Core i7-740QM 1.73GHz • RAM: 6,0GB • HD: 500GB • GPU: GeForce GT 425M 1GB 1920x1080 • OS: [External Link Removed for Guests] • Linux Mint 15 • Windows 8
Post Reply

Return to “Guides and tutorials”