Overview This guide will explain how to implement HDMI audio for laptops equipped with HDMI ports connected to the Intel integrated GPU. Some of the content also applies to laptops equipped with a DP connector. You can also read this guide if your laptop has an external DP port. Laptops with external DP ports require a subset of the patches presented here. In order to implement HDMI/DP, the following requirements must be met: - native Audio with AppleHDA (for more information, read the FAQ... implementing onboard audio is outside the scope of this guide) - appropriate framebuffer (kext) patches to change the connector-type to match the physical connector. This is done by patching the data associated with the ig-platform-id in use. - Haswell/Broadwell: renaming B0D3 to HDAU (device at 0x00030000) - injecting property "hda-gfx" = "onboard-1" on HDAU, IGPU, HDEF objects. - Haswell/Broadwell: injecting layout-id on HDAU to match layout-id on HDEF - Haswell: installing FakePCIID.kext and FakePCIID_Intel_HDMI_Audio.kext Note: Typically, for PC laptops, the ACPI identifier for the Intel graphics device is GFX0 (some Lenovo products use VID). Since this identifier is typically changed to IGPU to enable IGPU power management, this guide will refer to it as IGPU. Keep that in mind if you haven't yet implemented IGPU PM. Note: In case you're wondering Skylake (and Kaby Lake) are similar to HD3000/HD4000 in that the HDMI/DP codec is on HDEF (typically HDAS in PC DSDT, renamed to HDEF for OS X) instead on a separate device HDAU. Note on Clover and the Clover laptop guide If you followed the guide here: https://www.tonymacx86.com/threads/guide-booting-the-os-x-installer-on-laptops-with-clover.148093/... Your config.plist will already contain the renames required. And you can rename #AddProperties in config.plist/Devices to AddProperties and it will enable the needed "hda-gfx" and other audio injections required. Look into it... Frame buffer patching The data associated with ig-platform-id (or snb-platform-id with Sandy Bridge), has, for each connector, bits that represent the type of the connector (and other connector related data). Since most Apple products use DP, most connectors by default are DP. In order to get HDMI audio to work, you must patch the kext so the connector data matches the physical connector. If your connector is DP, nothing needs to be done, but if your port is HDMI, you will likely need to patch the connector so it becomes an HDMI connector instead of DP connector. DP connectors are identified in ioreg by connector-type <00 04 00 00> HDMI connectors are identified in ioreg by connector-type = <00 08 00 00> In the plists linked by my guide, you will find patches for each connector in various ig-platform-id data. http://www.tonymacx86.com/el-capita...de-booting-os-x-installer-laptops-clover.html The patches in each are disabled by default. You can read about disabled patches and how to enable them in post #2 of the guide. The patch you need to use depends on which port the HDMI connector is plugged into. Each port has its own AppleIntelFramebuffer node under IGPU. For example, this image shows each framebuffer node under IGPU on my Lenovo u430: If there were an HDMI device plugged into one of these framebuffers, you would see AppleDisplay under the respective framebuffer, much as you see AppleBacklightDisplay under the framebuffer associated with the LVDS port (laptop internal display). The the case of my Lenovo u430, the HDMI port is associated with AppleIntelFramebuffer@2. Each framebuffer (@0, @1, @2, @3) corresponds to a set of connector data inside the ig-platform-id data, which resides in the framebuffer kext binary. Each connector has a prefix that describes the port number and each is positional within the kext (for example: 0105, 0204, 0306, in that order). Each patch in the provided plists are commented with the prefix and are in the order they appear in the platform data. So, in the case of the Lenovo u430, which uses ig-platform-id 0xa260006, the external ports (@1 and @2) are tagged with 0105 and 0204. Since the HDMI port on the u430 is attached to the AppleIntelFramebuffer@2 which is the 0204 connector, we can narrow it down to patches that apply only to 0204 for 0xa260006. There are only two such patches in the plist. For each connector, there is the option of patching with a non-(12) patch or one of the (12) patches. The difference is that the "(12)" variants, besides patching for connector-type, also patch a byte which is believed to define some sort of delay. Some laptops need this delay lengthened from the default (09) to (12). It is matter of trial and error in determining which you need. Assuming you have all other HDMI audio requirements met, and the non-12 patch results in a KP/reboot, you will likely need the 12 variant. In the case of a KP/reboot upon hotplug of the HDMI monitor, it is difficult to tell which port your external port is assigned (because you can't look at ioreg with the monitor plugged in). In this case, you should apply all the (12 variant) patches that apply to the ig-platform-id you're using. That should get you past the KP/reboot, upon which you can look at ioreg, determine which port was actually used, and eliminate or disable the unneeded patches. In the case of my u430, I did not have the KP/reboot problem, so I was able to determine which port was used by HDMI simply by plugging in the monitor and looking at ioreg. As I mentioned before, it was the 0204 connector (framebuffer@2). As a result, the Lenovo u430 uses the patch labeled "HDMI-audio, port 0204, 0x0a260005 0x0a260006". It appears like this in my config.plist (in Xcode): Before patching for HDMI-audio, the connector-type for AppleIntelFramebuffer@2 is <00 04 00 00>. After patching, it will change to <00 08 00 00>. Before patching: After patching: If your physical connector is DP, you do not need to patch for connector-type. But it is possible you may need to patch for the 09 vs. 12 delay. Looking at the hex data for Replace in each patch, it should be obvious how to change the patch such that it keeps the <00 04 00 00> connector-type instead of changing it to <00 08 00 00>. Renaming B0D3 to HDAU Sandy Bridge (HD3000) and Ivy Bridge (HD4000) use a single audio device (HDEF) with multiple codecs. Both onboard audio and HDMI audio live on the same HDEF device. As a result, there is no second device, so no need to rename it to HDAU. Haswell and Broadwell use a separate device for the HDMI audio codec. Typically it is named B0D3 (it can be defined in either DSDT or an OEM SSDT). You will see the B0D3 node under PCI0 in ioreg. For OS X, it must be renamed to HDAU. The address of the device is always 0x00030000. You can use "Rename B0D3 to HDAU" from my laptop patch repository to rename the device. The patch should be applied to any DSDT or SSDT that contains B0D3 references. The same patch also defines a _DSM which injects "hda-gfx"="onboard-1" on HDAU. It also contains a patch that injects "hda-gfx" for the IGPU. See the ACPI patching guide more more information on ACPI patching: http://www.tonymacx86.com/el-capitan-laptop-support/152573-guide-patching-laptop-dsdt-ssdts.html Note: Skylake seems to use a single audio device, usually named HDAS. It must be renamed to HDEF for OS X. Injecting property hda-gfx (and layout-id) For Sandy Bridge and Ivy Bridge (HD3000/HD4000), "hda-gfx"="onboard-1" must be injected on IGPU and HDEF. For Haswell and Broadwell, "hda-gfx"="onboard-1" must be injected on IGPU and HDAU. It is not necessary to inject "hda-gfx" on HDEF, although it doesn't seem to cause a problem. The "Audio Layout*" patches ("Audio Layout 3", "Audio Layout 12", or one customized for your layout-id) inject "hda-gfx" on HDEF. Typically, HDEF is defined in DSDT. Note: HDAU/IGPU "hda-gfx" comes from "Rename B0D3 to HDAU", or for the case of IGPU other IGPU related patches. Search the repo patches for "hda-gfx" and you'll see several. The "Rename B0D3 to HDAU" patch also injects "hda-gfx" for IGPU. Typically, the HDAU and IGPU objects are defined in the same SSDT, but is is possible to be a different file (such as DSDT). There is no harm in applying the patch just to see if it applies to a given file. Typically the following will work to do all required renames and injections: - apply "Audio Layout *" (layout-id depends on your patched AppleHDA) to DSDT - apply "Rename B0D3 to HDAU" to DSDT and all OEM SSDTs. Note also that the "Rename B0D3 to HDAU" patch injects layout-id on HDAU. The layout-id must match the layout-id on HDEF. Modify the layout-id in the patch as needed before applying it. Note: hda-gfx on HDEF is not required for Haswell and Broadwell. Installing FakePCIID.kext FakePCIID_Intel_HDMI_Audio The AppleHDAController kext implements a whitelist for certain HDAU devices. Some PCs use devices that are not directly supported. But FakePCIID_Intel_HDMI_Audio can spoof the PCI IDs in order to satisfy AppleHDAController's whitelist check. Install both FakePCIID.kext and FakePCIID_Intel_HDMI_Audio.kext: https://github.com/RehabMan/OS-X-Fake-PCI-ID Read the README to find pre-built kext binaries. There is no harm in installing FakePCIID_Intel_HDMI_Audio even in the case you have a supported HDAU device. The kext will not attach to a device that is natively supported. Checking your work You can tell if everything is implemented completely within IORegistryExplorer. Initial IORegistryExplorer setup: - Download from here (it is attached to the post): http://www.tonymacx86.com/audio/58368-guide-how-make-copy-ioreg.html - Preferences->Find, check "Property Keys" Checking for "hda-gfx"="onboard-1" - in the search box, type "hda-gfx". - you should find it on HDEF/IGPU (Sandy/Ivy/Skylake), and on HDAU/IGPU (Haswell/Broadwell). - looking at at the property value, you should see "onboard-1" Checking for HDAU (Haswell/Broadwell only): - you should find HDAU (not B0D3) under PCI0 Checking layout-id: - in the search box, type "layout-id" - you should find it on HDAU (if applicable) and HDEF - if you examine the value in each HDAU and HDEF, HDAU should have the same value Checking the framebuffer: - check the framebuffer under IGPU that corresponds to your HDMI/DP connector - it should match the physical connector (DP: <00 04 00 00>, HDMI: <00 08 00 00>) Check under HDAU for FakePCIID loading: - if you have an unsupported HDAU, you will notice FakePCIID has attached to the HDAU device If only one of the requirements is not met, it will not work. Problem Reporting Attach ioreg as ZIP: http://www.tonymacx86.com/audio/58368-guide-how-make-copy-ioreg.html. Please, use the IORegistryExplorer v2.1 attached to the post! DO NOT reply with an ioreg from any other version of IORegistryExplorer.app. Provide output (in Terminal): Code (Text): kextstat|grep -y acpiplat kextstat|grep -y appleintelcpu kextstat|grep -y applelpc kextstat|grep -y applehda Attach EFI/Clover folder as ZIP (press F4 at main Clover screen before collecting). Please eliminate 'themes' directory. Provide only EFI/Clover, not the entire EFI folder. Attach output of (in Terminal): Code (Text): sudo touch /System/Library/Extensions && sudo kextcache -u / Compress all files as ZIP. Do not use external links. Attach all files using site attachments only.