This patch method will get analog surround sound work in AppleHDA's native multi-channel output rule. If you have problem with this, please use traditional way to patch your AppleHDA.
Credit to: THe KiNG, bcc9, Revogirl, TimeWalker, 紫米, VCH888, EMlyDinEsH and many others.
If you've never patched AppleHDA, I recommend you to read these two guides about patching AppleHDA before reading this topic.
Take my ALC889 as example:
Rear Jacks.jpg 21.05KB 27 downloads
1. Center Speaker and Subwoofer
2. Left and Right Surround
3. Left and Right Rear (used for 7.1 surround sound)
4. Line in
5. Left and Right Front
7. S/PDIF Optical and Coaxial
Output.jpg 58.18KB 22 downloads
Internal Speakers: 5 + 1 + 2
Line Out: 3
Digital Out: 7
Input.jpg 65.55KB 13 downloads
Internal microphone: 6
Line In: 4
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.
Audio MIDI Setup.jpg 80.39KB 18 downloads
Original ALC889 Codec dumped from Ubuntu:
Codec: Realtek ALC889 Address: 2 Node 11 40 01 43 99 [Fixed] SPDIF Out at Int ATAPI Unknown Node 12 20 00 00 00 [N/A] Speaker at Ext Rear Black Node 14 10 44 01 01 [Jack] Line Out at Ext Rear Green EAPD Node 15 12 14 01 01 [Jack] Line Out at Ext Rear Black EAPD Node 16 11 64 01 01 [Jack] Line Out at Ext Rear Orange Node 17 14 24 01 01 [Jack] Line Out at Ext Rear Grey Node 18 50 9c a1 01 [Jack] Mic at Ext Rear Pink VREF_80 Node 19 60 9c a1 02 [Jack] Mic at Ext Front Pink VREF_80 Node 1a 5f 34 81 01 [Jack] Line In at Ext Rear Blue VREF_HIZ Node 1b 20 4c 21 02 [Jack] HP Out at Ext Front Green VREF_HIZ Node 1c f0 01 33 99 [Fixed] CD at Int ATAPI Unknown Node 1d 01 e6 05 40 [N/A] Line Out at Ext N/A White Node 1e 30 61 4b 01 [Jack] SPDIF Out at Ext Rear Orange Node 1f f0 11 11 41 [N/A] Speaker at Ext Rear Black
01171cf0 01171d00 01171e00 01171f40 01271cf0 01271d00 01271e00 01271f40 01471c40 01471d01 01471e10 01471f90 // green jack Internal Speakers 01571c42 01571d01 01571e10 01571f90 // black jack Internal Speakers 01671c41 01671d01 01671e10 01671f90 // orange jack Internal Speakers 01771c30 01771d01 01771e00 01771f90 // grey jack Line Out 01871c10 01871d91 01871ea0 01871f90 // rear mic Internal microphone 01971c70 01971d30 01971e81 01971f02 // front mic Line In 01a71c20 01a71d30 01a71e81 01a71f01 // rear line in Line In 01b71c50 01b71d40 01b71e21 01b71f01 // headphone Headphones 01c71cf0 01c71d00 01c71e00 01c71f40 01d71cf0 01d71d00 01d71e00 01d71f40 01e71c60 01e71de0 01e71e4b 01e71f01 // s/pdif Digital Out 01f71cf0 01f71d00 01f71e00 01f71f40
Be careful about the Internal Speakers:
We need to setup "Sequence" (0, 1 & 2) for the analogy multi-channel jacks and use the same "Default Association" to group them.
I also changed the jack color to unknown (0), as Mac always use 0 for speakers in PinConfigurations. But I don't think it's necessary.
And change all "Default Device" to speakers (1).
40 01 10 90
42 01 10 90
41 01 10 90
Let's take MacBookPro5,2's PinConfigurations as reference:
50 40 2b 01 20 30 8b 01 41 01 10 90 // 6ch speaker 42 01 10 90 // 6ch speaker 10 01 a0 90 40 01 10 90 // 6ch speaker 70 90 a1 01 60 e0 4b 01 30 e0 cb 01
"Use ambient noise reduction" is available for Internal microphone (rear mic) in System Preferences after changing "50 9c a1 01" to "10 91 a0 90".
Outputs.png 15.91KB 20 downloads
Headphone.png 7.56KB 14 downloads
I've tried to put AmpPostDelay and AmpPreDelay=100 under both Headphone and IntSpeaker. But I found out there are some instrumental sound being cut down in musics and human voice become a bit lower?! I'm not sure.
IntSpeaker.png 15.56KB 17 downloads
It's necessary to setup this SignalProcessing under IntSpeaker, otherwise sound will be distorted even you are not using 6 channel output.
IntSpeaker 2.jpg 37.76KB 15 downloads
There is a value "Dsp6ChOutput" in SignalProcessing. As the name implies, it's used for 6 channel. This is a key to enable AppleHDA's native 6 channel DSP support. Even if you have a different sound card other than my ALC889, you should still use this SignalProcessing section inside the layout.xml, which I attached in ALC889 xml.zip at the bottom of this post, for your IntSpeaker.
But unfortunately, there is no Dsp8ChOutput in AppleHDA, as I've checked all layout xml files and AppleHDA's binary. It's not possible to setup 8 channel sound this way, as AppleHDA does not have 8 channel DSP support.
LineOut.png 7.15KB 12 downloads
SPDIFOut.png 7.43KB 11 downloads
The signal is digital, so no need to setup any value right here.
Inputs.png 9.97KB 9 downloads
LineIn.png 12.88KB 11 downloads
There are some problems for hackintosh to use ExtMic. So I changed the rear and front mic to internal mic and line in.
MuteGPIO: 0x50 (VREF_80) + 0100 + NodeID (19) = 0x50010019 = 1342242841
Mic.png 14.93KB 10 downloads
MuteGPIO: 0x50 (VREF_80) + 0100 + NodeID (18) = 0x50010018 = 1342242840
SignalProcessing is used for reducing noise.
The easiest part for sure if you patch AppleHDA in normal way, but using AppleHDA's multi-channel output rules is another case.
Platforms.jpg 45.01KB 11 downloads
-0 //Mic (rear mic)
-1 //LineIn (front mic)
-0 //IntSpeaker (We have to be careful about this in PathMaps. Notice that the jacks are in the same group.)
--0 * Black Jack - Left and Right Surround
--1 * Orange Jack - Center Speaker and Subwoofer
--2 * Green Jack - Left and Right Front
Let's talk about IntSpeaker:
All Amp values must be same as what the pictures show below.
(2, 0, 0) Black Jack - Left and Right Surround
Platforms - Black Jack.jpg 30.1KB 15 downloads
(2, 0, 1) Orange Jack - Center Speaker and Subwoofer
Platforms - Orange Jack.jpg 29.66KB 14 downloads
(2, 0, 2) Green Jack - Left and Right Front
Platforms - Green Jack.jpg 29.71KB 12 downloads
When it comes to mic:
Platforms - Mic.jpg 30.36KB 10 downloads
The higher Boost value (0~3) you setup, the more sensitive mic you get.
System Info.jpg 63.23KB 12 downloads
Analog 6 channel surround sound can be output by selecting "Internal Speakers" in System Preferences!
And no more useless LineOut devices in System Preferences now.
layout & Platforms: ALC889 xml.zip 24.4KB 164 downloads
sudo perl -pi -e 's|\x84\x19\xd4\x11|\x89\x08\xec\x10|g' /System/Library/Extensions/AppleHDA.kext/Contents/MacOS/AppleHDA
HDEF section under DSDT:
**Cautions for OS X Yosemite**
There are some changes needed to be made after updating to OS X Yosemite.
Firstly, this Boot Argument is necessary to be added in order to load the patched AppleHDA correctly:
Secondly, Binary Patch had also changed:
sudo perl -pi -e 's|\x84\x19\xd4\x11|\x00\x00\x00\x00|g' /System/Library/Extensions/AppleHDA.kext/Contents/MacOS/AppleHDA sudo perl -pi -e 's|\x8b\x19\xd4\x11|\x89\x08\xec\x10|g' /System/Library/Extensions/AppleHDA.kext/Contents/MacOS/AppleHDA
Good luck! And please do not copy my guide to other website, especially Tonymac's forum! (But I guess they won't even understand this. )