shiecldk Posted December 14, 2013 Share Posted December 14, 2013 (edited) 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. The KiNG's Guide EMlyDinEsH's Guide Take my ALC889 as example: 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 6. Mic 7. S/PDIF Optical and Coaxial Internal Speakers: 5 + 1 + 2 Line Out: 3 Digital Out: 7 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. PinConfigurations 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 Fixed PinConfigurations: 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 9042 01 10 9041 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". Layout Outputs: Headphone: 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: It's necessary to setup this SignalProcessing under IntSpeaker, otherwise sound will be distorted even you are not using 6 channel output. 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. This whole SignalProcessing section was discovered by VCH888. Thanks to him! 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: SPDIFOut: The signal is digital, so no need to setup any value right here. Inputs: LineIn: 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: MuteGPIO: 0x50 (VREF_80) + 0100 + NodeID (18) = 0x50010018 = 1342242840 SignalProcessing is used for reducing noise. Platforms The easiest part for sure if you patch AppleHDA in normal way, but using AppleHDA's multi-channel output rules is another case. 0 -0 //Mic (rear mic) --0 -1 //LineIn (front mic) --0 1 -0 //LineIn --0 2 -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 -1 //Headphone --0 3 -0 //LineOut --0 4 -0 //SPDIFOut --0 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 (2, 0, 1) Orange Jack - Center Speaker and Subwoofer (2, 0, 2) Green Jack - Left and Right Front When it comes to mic: The higher Boost value (0~3) you setup, the more sensitive mic you get. Result: 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. Files: ALC889: AppleHDA.kext in forum Downloads layout & Platforms: ALC889 xml.zip Binary patch: 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: Device (HDEF) { Name (_ADR, 0x001B0000) // _ADR: Address ...skip... Method (_DSM, 4, NotSerialized) // _DSM: Device-Specific Method { Store (Package (0x0E) { "AAPL,slot-name", Buffer (0x09) { "Built-in" }, "name", Buffer (0x06) { "audio" }, "model", Buffer (0x0F) { "Realtek ALC889" }, "device_type", Buffer (0x16) { "High Definition Audio" }, "layout-id", Buffer (0x04) { 0x20, 0x00, 0x00, 0x00 }, "hda-gfx", Buffer (0x0A) { "onboard-1" }, "PinConfigurations", Buffer (Zero) {} }, Local0) DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0)) Return (Local0) } } **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: kext-dev-mode=1 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. ) Edited February 7, 2015 by shiecldk 13 Link to comment Share on other sites More sharing options...
Rampage Dev Posted December 14, 2013 Share Posted December 14, 2013 Great work. Link to comment Share on other sites More sharing options...
Mirone Posted December 14, 2013 Share Posted December 14, 2013 Good Work! Link to comment Share on other sites More sharing options...
toleda Posted December 16, 2013 Share Posted December 16, 2013 Outstanding. Link to comment Share on other sites More sharing options...
carbo178 Posted December 17, 2013 Share Posted December 17, 2013 Great, work perfectly on my system Link to comment Share on other sites More sharing options...
AREOS Posted December 24, 2013 Share Posted December 24, 2013 Thanks man, thanks to your work I enable 2.1 output in my Asus G750 Laptop and works great!!!!! Link to comment Share on other sites More sharing options...
Funkoyote Posted February 27, 2014 Share Posted February 27, 2014 GA-X58A-UD3R v2 Loads the kext but don't work. System Profile shows the info but System Preferences don't show anything for 10.9.2 :-( I do the DSDT edits without problem. Link to comment Share on other sites More sharing options...
carbo178 Posted February 28, 2014 Share Posted February 28, 2014 GA-X58A-UD3R v2 Loads the kext but don't work. System Profile shows the info but System Preferences don't show anything. :-( I do the DSDT edits without problem. Same issue in my system with new version AppleHDA for 10.9.2 Link to comment Share on other sites More sharing options...
Funkoyote Posted February 28, 2014 Share Posted February 28, 2014 I found this 10.9.2 AppleHDA.kext that works for my GA-X58A-UD3R v2 ALC889 Motherboard with DSDT edits.ALC889 AppleHDA.kext v... Link to comment Share on other sites More sharing options...
shiecldk Posted March 3, 2014 Author Share Posted March 3, 2014 GA-X58A-UD3R v2 Loads the kext but don't work. System Profile shows the info but System Preferences don't show anything for 10.9.2 :-( I do the DSDT edits without problem. Same issue in my system with new version AppleHDA for 10.9.2 Sorry, I forgot to do the binary patch. Updated now. If you like, you can try again. 2 Link to comment Share on other sites More sharing options...
carbo178 Posted March 3, 2014 Share Posted March 3, 2014 Great, work well and switch automatically to headphones when plugged in Link to comment Share on other sites More sharing options...
carbo178 Posted March 4, 2014 Share Posted March 4, 2014 Hmmm... i have an issue, sound doesn't work after sleep, i try the previous version Link to comment Share on other sites More sharing options...
uzmi Posted March 12, 2014 Share Posted March 12, 2014 Hmmm... i have an issue, sound doesn't work after sleep, i try the previous version http://www.insanelymac.com/forum/topic/296474-1092-audio-lost-after-sleep/ 1 Link to comment Share on other sites More sharing options...
carbo178 Posted March 12, 2014 Share Posted March 12, 2014 http://www.insanelymac.com/forum/topic/296474-1092-audio-lost-after-sleep/ Thanks, but solved with 10.9.1 kext Link to comment Share on other sites More sharing options...
shiecldk Posted March 15, 2014 Author Share Posted March 15, 2014 Hmmm... i have an issue, sound doesn't work after sleep, i try the previous version Work fine on my system... (Gigabyte board) Are you using the latest AppleACPIPlatform.kext (2.0)? It seems some people, who are using the older AppleACPIPlatform.kext, have problem with 10.9.2's AppleHDA. Link to comment Share on other sites More sharing options...
uzmi Posted March 15, 2014 Share Posted March 15, 2014 Work fine on my system... (Gigabyte board) Are you using the latest AppleACPIPlatform.kext (2.0)? It seems some people, who are using the older AppleACPIPlatform.kext, have problem with 10.9.2's AppleHDA. Hi: I followed your guide for ALC892, but I couldn't make it to work (10.9.2) Using DSDT with Layout 1 I am experiencing a hybrid between a guide and a AppleHda.kext of Toleda (which works when it wants to) I'll try changing AppleACPIPlatform.kext and see what happens. Thank you. P.S.: More information to check and try http://forum.osxlatitude.com/index.php?/topic/3084-eapd-fix-in-a-standalone-kext-no-need-ioaudiofamily-patch/ Link to comment Share on other sites More sharing options...
shiecldk Posted March 15, 2014 Author Share Posted March 15, 2014 Hi: I followed your guide for ALC892, but I couldn't make it to work (10.9.2) Using DSDT with Layout 1 I am experiencing a hybrid between a guide and a AppleHda.kext of Toleda (which works when it wants to) I'll try changing AppleACPIPlatform.kext and see what happens. Thank you. Are you using the right binary patch for ALC892? According to bcc9's topic, it should be this one in your case: sudo perl -pi -e 's|\x8b\x19\xd4\x11|\x92\x08\xec\x10|g' /System/Library/Extensions/AppleHDA.kext/Contents/MacOS/AppleHDA I'd recommend you to make your own AppleHDA staring from the vanilla one. Try to understand the guide from THe KiNG -> EMlyDinEsH -> and finally this topic. If you've already known how to setup PinConfigurations' value, you can skip to EMlyDinEsH's guide. (It will take you a little time to understand how to patch AppleHDA. Good luck! ) 1 Link to comment Share on other sites More sharing options...
nmano Posted August 1, 2014 Share Posted August 1, 2014 I can't make dsdt with "layout-id", Buffer (0x04) { 0x20, 0x00, 0x00, 0x00 }, how to resolve "layout-id", Unicode (" "), 1 Link to comment Share on other sites More sharing options...
og-phantom Posted August 11, 2014 Share Posted August 11, 2014 I can't make dsdt with "layout-id", Buffer (0x04) { 0x20, 0x00, 0x00, 0x00 }, how to resolve "layout-id", Unicode (" "), I am also having this issue. Any way to resolve? Link to comment Share on other sites More sharing options...
carbo178 Posted August 11, 2014 Share Posted August 11, 2014 @manor and og-phantom: Yes, same issue in dsdt, but audio works well. Check if layout is 32 in System Profiler Link to comment Share on other sites More sharing options...
shiecldk Posted August 18, 2014 Author Share Posted August 18, 2014 @manor, og-phantom and carbo178 (lol There's too many of them...) I use MaciASL to edit my DSDT. It will convert "0x20, 0x00, 0x00, 0x00" to unicode automatically, so that you won't have to be worry about it. Link to comment Share on other sites More sharing options...
carbo178 Posted August 18, 2014 Share Posted August 18, 2014 Yes, is all OK, my sound works well and layout-id is 32 I use DSDT Editor and it convert exadecimal in unicode same as maciasl Sorry for my english Link to comment Share on other sites More sharing options...
Rodion2010 Posted May 9, 2015 Share Posted May 9, 2015 Thanks for the Guide! Can You or anyone else describe more exactly what to do with AMP values? All Amp values must be same as what the pictures show below. (2, 0, 0) Black Jack - Left and Right Surround (2, 0, 1) Orange Jack - Center Speaker and Subwoofer (2, 0, 2) Green Jack - Left and Right Front <key>Channels</key> <array> <dict> <key>Bind</key> <integer>1</integer> <key>Channel</key> <integer>3</integer> </dict> <dict> <key>Bind</key> <integer>2</integer> <key>Channel</key> <integer>4</integer> </dict> I think 1 and 2 is Front, 3 and 4 - Center/LFE , 5 and 6 - Surround. Is it OK for any Codec and where did these values come from? and another question, if path contains two AMPs <array> <array> <dict> <key>NodeID</key> <integer>18</integer> </dict> <dict> <key>Amp</key> <dict> <key>Channels</key> <array> <dict> <key>Bind</key> <integer>1</integer> <key>Channel</key> <integer>1</integer> </dict> <dict> <key>Bind</key> <integer>2</integer> <key>Channel</key> <integer>2</integer> </dict> </array> <key>MuteInputAmp</key> <true/> </dict> <key>NodeID</key> <integer>41</integer> </dict> <dict> <key>Amp</key> <dict> <key>Channels</key> <array> <dict> <key>Bind</key> <integer>1</integer> <key>Channel</key> <integer>1</integer> </dict> <dict> <key>Bind</key> <integer>2</integer> <key>Channel</key> <integer>2</integer> </dict> </array> <key>PublishVolume</key> <true/> </dict> <key>NodeID</key> <integer>4</integer> </dict> </array> How do I need to modify Channels and Bind? The First One, the Second or Both? Link to comment Share on other sites More sharing options...
Rodion2010 Posted March 19, 2016 Share Posted March 19, 2016 finally I made Platforms.xml for my codec, AD1988b and it works, but sound is distorted (( I have problems with DSP Section and need some help. Thanks Link to comment Share on other sites More sharing options...
VCH888 Posted March 24, 2016 Share Posted March 24, 2016 5.1ch_ALC898.zip This folder is a sample of 5.1ch_ALC898. I made two layouts and SoftwareDSP was based on layout70. They are almost the same except “ParameterInfo of DspFunction2, 3, and 4.” I have no idea how to edit or modify “ParameterInfo” and hope that someone can make it better, especially ParameterInfo. Note: 1) I had to swap channel of orange jack to get sound on Center speaker. (using an additional 3.5 mm jack male to female cable and swapping audio cable) 2) The sound from layout1, w/ ParameterInfo, is better than layout2, w/o ParameterInfo. 2 Link to comment Share on other sites More sharing options...
Recommended Posts