Contribute
Register

Optimized AppleHDA for Realtek ALC 887/888b on Lion - Update

Status
Not open for further replies.

toleda

Moderator
Joined
May 19, 2010
Messages
22,845
Motherboard
Asus Maximus VII Impact
CPU
Core i7-4770K
Graphics
RX 560 + HD4600
Mac
  1. iMac
  2. MacBook Pro
  3. Mac mini
Classic Mac
  1. 512K
  2. LC
  3. Power Mac
Mobile Phone
  1. iOS
2787035531_066ba1ee85.jpeg
ALC887 edited Lion AppleHDA.kext


Update 6/25/2012 -
10.7.4 AppleHDA.kext available in MultiBeast 4.6.0 and newer
Select 887_v100202 or 887_v100302


The ALC887 edited Lion AppleHDA.kext is available for Lion 10.7.2/.3 and motherboards with the Realtek ALC887 audio codec . Supports most Lion analog and digital audio capabilities. Users interested in capabilities beyond standard on board audio should consider this option for HDMi audio (discrete and HD3000 integrated), front panel audio and more. This kext supports three Audio IDs: Audio ID: 887 for full 887 analog audio on any 887 motherboard with or without discrete graphics card HDMI audio (Note 1), lAudio ID: 387 for 887 analog audio on a 887 Sandy Bridge motherboard with HD3000 HDMI audio (Note 2) and Audio ID 287 for 3 port 887 analog audio on any 887 motherboard with or without discrete graphics card HDMI audio (Note 1).

Verify the audio codec device_id for compatibility rather the product name (Note 4). For example, the ALC888B and ALC888S are actually the ALC887

Changes
1. 10.7.4 AppleHDA.kext
2. Ivy Bridge Audio Support

Benefits
1. 887 on board audio
2. HDMI audio, if configured
3. Front panel audio with auto mute
4. Optical Surround Sound (Note 3)
5. Improved audio quality
6. Less popping
7. Easy installation
8. Nearly native

Requirements
1. 10.7.2 or newer - 64 bit kernel
2. ALC887 audio codec/Device_id: 10ec0887 (Note 4)
3. dsdt w/HDEF/Layout-id is 0x77 0x03 0x00 0x00 (no dsdt - Note 5)
a. For HD3000 HDMI audio; dsdt w/HDEF/Layout-id is 0x83 0x01 0x00 0x00
b. For 3 port motherboard audio; dsdt w/HDEF/layout-id is 0x1F 0x01 0x00 0x00

ALC887 Versions (IOReg/AppleHDAController/IOHDACodecDevice/IOHDACodecVendorID)
1. Rev 100202
2. Rev 100302

Which Audio ID?
1. Use Audio ID 287 for 3 audio port motherboards (on board, AMD or Nvidia HDMI audio)
2. Use Audio ID 387 only with HD3000 HDMI audio enabled
3. Use Audio ID 887 for all audio needs (on board, AMD or Nvidia HDMI audio)

Configurations
Audio_Configurations_887.png


Installation
Available in MultiBeast_v4.6 and newer
1. Select: Drivers & Bootloaders/Kexts & Enablers/Audio/Realtek ALC8xx//Patched AppleHDA/ALC887_v100202 or ALC887_v100302
If no DSDT or no DSDT/HDEF, select both 1 and 2. If DSDT installed, skip Step 2
2. Select: Drivers & Bootloaders/Kexts & Enablers/Audio/Realtek ALC8xx/Non-DSDT HDAEnabler/ALC887
3. Always select: System Utilities

Installation Notes
1. Backup S/L/E/AppleHDA.kext before System Update
2. If a Patched AppleHDA selected, do not Select ALC8xxHDA or AppleHDA Rollback.
3. if a DSDT is installed, do not install an enabler

Attachments
1. 887_Lion_AppleHDA_887-100202-1
Obsolete, use MultiBeast for latest
2. 887_Lion_AppleHDA_887-100302-1
Obsolete, use MultiBeast for latest
3. View attachment -Read_Me_First-887_AppleHDA.kext.pdf

Customization
AppleHDA customization, see Customizing the Optimized Lion AppleHDA.kext
1. Add SPDIFIn
2. Manual Mic and Front Mic Selection
3. Manual Speaker and Headphone Selection
4. Add Boost to input (Mic/Rear. Mic/Front and/or Line In)
5. Substitute Gray (Side) for Black (Rear)
6. Add Line Out (Gray/Rear -Rear Speakers) for analog 7.1 Surround Sound
7. Substitute SPDIF-2 Wire Output
8. SPDIF Optical Output/Encoded Digital Audio
9. HDMI audio (AMD/Nvidia/HD3000) - Lion HDMI Audio

10.7.2/.3 Nvidia HDMI Audio Information
If your system boots to a black screen after installing this kext:
1. Reboot with GraphicsEnabler=No
2. Install your AppleHDA.kext backup
3. See this thread (TBA)

Notes
1. HDMI audio dsdt and kext edits required, , more information viewtopic.php?f=162&t=31664.
2. HD3000 HDMI audio dsdt and kext edits required.
3. SPDIFOut Encoded Digital Audio (Surround Sound) requires DD/DTS source, DD/DTS player (Plex, XBMC, Boxee) and DD/DTS sound system. Audi MIDI Setup/Audio Devices/Digital Output/ always shows 2 Channel Stereo. VLC encoded digital audio requires the edited Optical Surround/AppleHDA binary. See the Customization Guide - Above
4. IORegistryExplorer/Search: IOHDACodecDevice (either result is OK)
a. @1B,0/IOHDACodecVendorID: 0x10ec0887
b. @1B,2/IOHDACodecVendorID: 0x10ec0887
5. For Audio ID: 887, a non-dsdt Enabler can be be installed in S/L/E with MultiBeast.

HDEF Edits:
Audio ID:887, layout-id: 377
The default 887 layout-id is for maximum onboard choices.
Code:
           Device (HDEF)
            {
                Name (_ADR, 0x001B0000)
                Method (_PRW, 0, NotSerialized)
                {
                    Return (Package (0x02)
                    {
                        0x0D, 
                        0x05
                    })
                }

                Method (_DSM, 4, NotSerialized)
                {
                    Store (Package (0x04)
                        {
                            "layout-id", 
                            Buffer (0x04)
                            {
                                0x77, 0x03, 0x00, 0x00
                            }, 

                            "PinConfigurations", 
                            Buffer (Zero) {}
                        }, Local0)
                    DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
                    Return (Local0)
                }
            }
Credits
sacaman
VHC888 http://www.insanlynac.com/forum/index.php?showtopic=140941
.:ErmaC:. http://www.insanlynac.com/forum/index.php?showtopic=266531&view=findpost&p=1752351
blueking http://tonymacx86.com/viewtopic.php?p=244839#p244839
BigDonkey http://tonymacx86.com/viewtopic.php?p=244748#p244748
RevoGirl http://revogirl.wordpress.com/2012/01/15/how-to-patch-applehda-for-892-and-898-one-file/#respond
Galan-od http://www.tonymacx86.com/viewtopic.php?p=344481#p344481
 

Attachments

  • ALC8xxHDA.kext.zip
    11.7 KB · Views: 1,775
Last edited by a moderator:
There is no Layout287 in the AppleHDA. Was that an oversight or am I missing something?

Using a Gigabyte Z77-DS3H with the following HDEF edit (Layout 287) AppleHDA does not load. I also tried the 887 layout ID and surprisingly it still did not load.

I confirmed that this is indeed 10ec_0887 within Windows Device Manager.

Perhaps the problem is the HDEF device. I used the uploaded DSDT for the depository, but there were no errors or warnings fixed, so I have little faith in it. I fixed all warnings/errors, but this HDEF device has an OperationRegion which is not normally present, plus HDAR, which is also unusual.

HDEF does show in IOreg though.

Code:
Device (HDEF)
        {
            Name (_ADR, 0x001B0000)
            OperationRegion (HDAR, PCI_Config, 0x4C, 0x10)
            Field (HDAR, WordAcc, NoLock, Preserve)
            {
                DCKA,   1, 
                        Offset (0x01), 
                DCKM,   1, 
                    ,   6, 
                DCKS,   1, 
                        Offset (0x08), 
                    ,   15, 
                PMES,   1
            }
            Method (_PRW, 0, NotSerialized)
            {
                Return (Package (0x02)
                {
                    0x0D, 
                    0x05
                })
            }
            Method (_DSM, 4, NotSerialized)
            {
                Store (Package (0x04)
                    {
                        "layout-id", 
                        Buffer (0x04)
                        {
                            0x1F, 0x01, 0x00, 0x00
                        }, 
                        "PinConfigurations", 
                        Buffer (Zero) {}
                    }, Local0)
                DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
                Return (Local0)
            }
        }
 

Attachments

  • ALC887_Z77_DS3H.aml
    38.5 KB · Views: 452
maleorderbride said:
There is no Layout287 in the AppleHDA. Was that an oversight or am I missing something?

Using a Gigabyte Z77-DS3H with the following HDEF edit (Layout 287) AppleHDA does not load. I also tried the 887 layout ID and surprisingly it still did not load.

Perhaps the problem is the HDEF device. I used the uploaded DSDT for the depository, but there were no errors or warnings fixed, so I have little faith in it. I fixed all warnings/errors, but this HDEF device has an OperationRegion which is not normally present, plus HDAR, which is also unusual.

HDEF does show in IOreg though.
My mistake. Thank you for bring this to my attention. The download in the first post has been updated with the addition of layout287.xml. Try the new download.

The Gigabyte Z77s now have HDEF and include OperationRegion. I haven't looked at HDAR yet. Reply with a copy of IOReg and Console/sound assertions.
 
Thanks! Attached is the IOreg and Console. I only see a single sound assertion error:

setupHostInterrupt ()" failed in AppleHDAController at line 441 goto Exit.

System Profiler shows Layout ID: 287, but does not list any devices. This is using the optional Platform.xml as the included one does not have Layout ID 287.

I am also using your latest upload that show LayoutID within the Resources folder.

Let me know if you need anything else. I should stop buying newly released motherboards =/
 
maleorderbride said:
Thanks! Attached is the IOreg and Console. I only see a single sound assertion error:

setupHostInterrupt ()" failed in AppleHDAController at line 441 goto Exit.

System Profiler shows Layout ID: 287, but does not list any devices. This is using the optional Platform.xml as the included one does not have Layout ID 287.
You found another mistake. There is a new download. I think all the pieces are now in place for the 287. Sorry about the problems with the 287 audio id. Attach an IOReg.
 
No problem--thank you for doing this!

I attached the latest round of IOreg and Console. We are getting closer. AppleHDA loads, but no audio makes it out of the speakers, much like with early version of the ALC898 Lion AppleHDA.

System Profiler now seems to show the correct outputs:
 

Attachments

  • Screen Shot 2012-05-03 at 4.13.29 PM.png
    Screen Shot 2012-05-03 at 4.13.29 PM.png
    16.8 KB · Views: 5,826
  • ALC887_Layour297_take 2.zip
    409.1 KB · Views: 281
maleorderbride said:
No problem--thank you for doing this!

I attached the latest round of IOreg and Console. We are getting closer. AppleHDA loads, but no audio makes it out of the speakers, much like with early version of the ALC898 Lion AppleHDA.
I may have lost the 287 formula. Try the AppleHDA from this post http://www.tonymacx86.com/viewtopic.php?p=362648#p362648. It uses the special Platforms.xml. If it doesn't work try the Platforms.xml from the current download. Reply with results.
 
Update 5/21/12:
This is how I currently have sound operating normally:

tonymacx86 said:
NOTE: For now, on the GA-Z77-DS3H, you MUST use the alternate ALC8xxHDA from page 1 of this thread combined with AppleHDA Rollback and the DSDT from the Database. We are going to make 2 versions of ALC8xxHDA available in the next MultiBeast.

Lion 10.7.3
Gigabyte Z77-DS3H F3 Bios
Ivy Bridge 3570K


Still testing with toleda's patched applehda here
Files attached as requested.

Update:
IOReg kept giving me corrupted file error, so I used DSDTE instead.
 
Status
Not open for further replies.
Back
Top