This guide will show you how to enable audio using the native AppleHDA.kext (no patches) with Clover and AppleHDA8Series by Piker-Alpha. With this method, audio won't be affected by software updates replacing AppleHDA.kext. Thanks to toleda for the bin patches, the layout IDs, and the layout ID list.
NOTE: This guide requires Clover and basic knowledge of how to modify config.plist, as well as using Terminal. It is designed for desktops using Realtek ALC 8xx and Realtek ALC 1150 codecs. You need an original, unpatched AppleHDA.kext (you can download version 272.18 for OS X 10.10.3 here, unzip and rename from AppleHDA.kext-master to AppleHDA.kext, copy to /System/Library/Extensions, repair permissions, rebuild kext caches, and then reboot). This guide is for OS X 10.8.5 and above; older versions require different patches.
Layout ID Injection
This can accomplished in several different ways. You can edit Clover's config.plist or do edits to your DSDT. Make sure you pick the right layout ID for your setup.
Supported layout IDs
Audio ID: 1 supports 885, 887, 888, 889, 892, 898, 1150
- Realtek ALC audio (default, 1/2/3/5/6 motherboard audio ports)
Audio ID: 2 supports 887, 888, 889, 892, 898, 1150
- Realtek ALC/5.1 surround sound (3 motherboard audio ports)
Audio ID: 3 supports 887, 888, 889, 892, 898
- Intel HD 3000/HD 4000 HDMI audio with Realtek ALC audio
Clover config.plist editing
Edit the Inject key under Devices/Audio in config.plist. If it doesn't exist, paste it in.
<key>Devices</key> <dict> <key>Audio</key> <dict> <key>Inject</key> <integer>1</integer> </dict> </dict>
Replace 1 with the layout ID you wish to use.
DSDT HDEF device injection
Apply the following patch using MaciASL. If your DSDT already has device properties injected into the HDEF device, change the layout ID to the one you wish to use.
into method label _DSM parent_label HDEF remove_entry; into device label HDEF insert begin Method (_DSM, 4, NotSerialized)\n {\n If (LEqual (Arg2, Zero)) { Return (Buffer() { 0x03 } ) }\n Return (Package () {\n "MaximumBootBeepVolume", Buffer() { 0x4D },\n "MaximumBootBeepVolumeAlt", Buffer() { 0x00},\n "layout-id", Buffer() { 0x01, 0x00, 0x00, 0x00 },\n "PinConfigurations", Buffer(Zero) {},\n "hda-gfx", Buffer() { "onboard-1" }\n })\n }\n end;
Replace 0x01 with the layout ID you wish to use in hex.
Add Kext Patch to Clover config.plist
Since OS X 10.6.3, AppleHDA.kext requires a bin patch for third-party codecs to work. Clover can patch AppleHDA.kext in memory at every boot. This is a cleaner alternative to manually patching AppleHDA.kext, and isn't affected by software updates. Make sure you pick the right patch for your codec.
Supported codec patches
NOTE: ALC885 is native (it's in AppleHDA.kext already), so it doesn't need a bin patch.
Kext to patch: AppleHDA
Data to find: 8b19d411 [Hex] or ixnUEQ== [Base64]
Data to replace:
ALC 887: 8708ec10 [Hex] or iHjsEA== [Base64]
ALC 888: 8808ec10 [Hex] or iAjsEA== [Base64]
ALC 889: 8908ec10 [Hex] or iQjsEA== [Base64]
ALC 892: 9208ec10 [Hex] or kgjsEA== [Base64]
ALC 898: 9908ec10 [Hex] or mQjsEA== [Base64]
ALC 1150: 0008ec10 [Hex] or AAjsEA== [Base64]
Clover config.plist editing
Add a new key under KernelAndKextPatches/KextsToPatch in config.plist. If it doesn't exist, paste it in. If you are using a regular text editor, use the Base64 encoded versions of the patches. If you are using a property list editor or Clover Configurator, use the hex versions of the patches.
<key>KernelAndKextPatches</key> <dict> <key>KextsToPatch</key> <array> <dict> <key>Comment</key> <string>Realtek ALC 898 Patch</string> <key>Find</key> <data>ixnUEQ==</data> <key>Name</key> <string>AppleHDA</string> <key>Replace</key> <data>mQjsEA==</data> </dict> </array> </dict>
Edit the Replace key with the patch for your codec. You may also want to change the comment for your codec.
Create Injector Kext with AppleHDA8Series.sh
AppleHDA8Series.sh by Piker-Alpha will create an injector kext that loads AppleHDA with the proper layout XML files. This is a cleaner alternative to manually replacing the layout XML files in AppleHDA.kext, and isn't affected by software updates.
Script Instructions
Download the AppleHDA8Series script and make it executable:
curl -o ~/AppleHDA8Series.sh https://raw.githubusercontent.com/Piker-Alpha/AppleHDA8Series.sh/master/AppleHDA8Series.sh
chmod +x ~/AppleHDA8Series.sh`Run the script and enter your password:
~/AppleHDA8Series.sh
This script must be run as root! Password:
Select your audio codec and confirm your layout ID:
AppleHDA8Series.sh v3.1 Copyright (c) 2013-2015 by Pike R. Alpha patched XML files by Toleda and contributors ---------------------------------------------------------------- The supported Realtek ALC codecs for AppleHDA8Series.sh are: [1] Realtek ALC 885 (0x10EC0885 / 283904133) [2] Realtek ALC 887 (0x10EC0887 / 283904135) [3] Realtek ALC 888 (0x10EC0888 / 283904136) [4] Realtek ALC 889 (0x10EC0889 / 283904137) [5] Realtek ALC 892 (0x10EC0892 / 283904146) [6] Realtek ALC 898 (0x10EC0899 / 283904153) [7] Realtek ALC 1150 (0x10EC0900 / 283904256) Please choose the desired codec for the hardware: 6 Do you want to use [1] as the layout-id (y/n)? y
Don't copy the newly-created kext to /System/Library/Extensions just yet. There seems to be a bug in the script where the symbolic link to AppleHDA breaks when you do that:
Creating AppleHDA898.kext in: /Users/theracermaster Creating symbolic link to AppleHDA ... AppleHDA898.kext appears to be loadable (including linkage for on-disk libraries). Do you want to copy AppleHDA898.kext to: /System/Library/Extensions? (y/n) n Done.
Manually move the newly-created kext to /System/Library/Extensions and fix the permissions (replace 898 with your codec):
sudo mv ~/AppleHDA898.kext /System/Library/Extensions/AppleHDA898.kext
sudo chmod -R 755 /System/Library/Extensions/AppleHDA898.kext
sudo chown -R root:wheel /System/Library/Extensions/AppleHDA898.kext
Clear the current kext caches and then rebuild kext caches
sudo kextcache -system-caches
sudo kextcache -prelinked-kernel
kext-dev-mode allowing invalid signature -67023 0xFFFFFFFFFFFEFA31 for kext AppleHDALoader.kext kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext AppleHDA898.kext
Reboot, and audio should be working.
sudo reboot
Troubleshooting
Audio pops before starting playback
This is caused by OS X putting the audio codec to sleep. You can try disabling AFGLowPowerState in Clover config.plist:
<key>Devices</key> <dict> <key>Audio</key> <dict> <key>AFGLowPowerState</key> <false/> </dict> </dict>
If this doesn't work and the popping is still present, try using antipop.
Green ports (front and rear) don't work on Gigabyte GA-Z77X-UD5H
Revision 1.0 of the GA-Z77X-UD5H motherboard doesn't have working green port audio in Linux or OS X due to the layout of the motherboard. Revision 1.0 of the GA-Z77X-UD5H motherboard has the green port working in Linux and OS X.
[link] [comment]
What is missing? Please comment to help! For more info try www.iatkos.net
Post a Comment