Contribute
Register

Customizing the Optimized Lion AppleHDA.kext

Status
Not open for further replies.

toleda

Moderator
Joined
May 19, 2010
Messages
22,834
Motherboard
Asus Maximus VII Impact
CPU
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

Customizing the Optimized Lion AppleHDA.kext


There have been numerous requests for additional AppleHDA.kext functionality. Often the requests can be satisfied with changes to the property lists embedded in AppleHDA.kext. This guide offers solutions for removing the automatic switching on inputs and outputs, adding and changing speaker configurations and increased SPDIF digital audio flexibility. All solutions are based on the Optimized AppleHDA.kexts for the 885, 887, 888, 889, 892 and 898 (soon) Realtek audio codecs.

Guidelines
1. This is not a how to guide. It shows what something looks likes before and what it should look like after the edit. The how is left to the reader.

OS X Surround Sound
1. OS X volume control and mute (OSD, System Preferences, keyboard, mouse, Apple Remote, etc.)
a. Supports volume control/mute for connected analog stereo speakers only
b. No volume control/mute support for digital audio or aggregate devices
i. Use the controls and/or remote for the audio device attached making sound
ii. There is no known way around this; don't ask. For DD/DTS, this restriction is the same for Windows
2. Surround Sound in OS X requires
a. DD/DTS source (movies, iTunes/AC3 only)
b. DD/DTS player (Plex, XBMC, Boxee, VLC - see 5 below)
c. DD/DTS sound system.
3. Analog 5.1/7.1 Surround Sound http://www.tonymacx86.com/viewtopic.php?f=16&t=848
4. Audi MIDI Setup/Audio Devices/Digital Output/ always shows 2 Channel Stereo.
5. VLC encoded digital audio requires the edited Optical Surround/AppleHDA binary.

Requirements
1. 10.7.2 or newer - 64 bit kernel
2. Any optimized AppleHDA.kext v2.1.3 or newer

Tools
1. Property List Editor -
a. Mac OS X Retail Install Disc v10.6 or v10.6.3 (Optional Installs/Xcode)
b. sveinbjorn http://sveinbjorn.org/install_property_list_editor_app_on_mac_os_x_lion
2. PListEdit Pro http://www.fatcatsoftware.com/plisteditpro/
3. Applications/TextEdit

Table Of Contents
0. AppleHDA.kext Assumptions, Structure and Documents
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 - Not available for 892 or 898
9. HDMI audio (AMD/Nvidia/HD3000) - Lion HDMI Audio
Appendix:. AppleHDA.kext Reference

Editing Tip
1. To ensure successful pasting of printed data into a plist
a. paste first to TextEdit and make plain text (Format/Plain Text)
b. copy from TextEdit and paste into plist

Attachments
1. View attachment Customizing the Optimized Lion AppleHDA.kext.pdf.zip
2. View attachment 885_Lion_AppleHDA.zip

Credits
THe KiNG http://www.projectosx.com/forum/index.php?showtopic=465
VHC888 http://www.insanlynac.com/forum/index.php?showtopic=140941
Note: In the link above, replace the second n with m in insanlynac.com. It is not in the original text, must be a new feature.

Change Log
v0.1 - 5/28/12 - Draft
v0.2 - 6/13/12 - Added Download
 
also trying it out as i write :)
 
first in the pdf i'm confused..

Code:
a. Edit Platforms.xml
Open PathMap 885
Copy Item 2 SPDIFIn (NodeID/Number/31)
Open PathMap for edit
Paste SPDIFIn on PathMap
Move Item 2 to top of Items
Repeat
New
Item 2 PathMap as follows:
Item 0/NodeID/Number/10
Item 1/NodeID/Number/31
Save

i open platforms.xml in plistedit and i can find pathmapid 885 under the item numbered 1

under that i expand pathmap numbered 2 then i expand 0, 0 again and then i expand 0 and 1 where i find node id 10 and 31

the instructions say copy item 2... is that pathmaps 1 or pathmap 2? (note missing s in the latter)

if it was the last option ie pathmap 2.. why not simple drag pathmap 2 to top of list?
 
by simple drag and drop and i get as far as attached pic, but what about detectdelegate line?
 

Attachments

  • Skærmbillede 2012-06-06 kl. 13.06.01.png
    Skærmbillede 2012-06-06 kl. 13.06.01.png
    69.5 KB · Views: 1,466
next step also is a bit confusing:

Code:
b. Edit layoutxyz.xml
Open layout885.xml
Open PathMapRef
Open Item 0
Copy SPDIFIn
Open layoutxyz.xml
Open PathMapRef
Open Item 0
Paste SPDIFIn on Item 0
Move all items above SPDIFOut to Item 0 (one at a time)
In layout885.xml
Open Inputs
Copy SPDIFIn
In layoutxyz.xml
Open Inputs
Paste SPDIFIn
Move all items above SPDIFIn to Inputs(one at a time)
Close layout885.xm
Save

i start by opening layout885.xml then i copy SPDIFIn.. i then open layout889.xml as i have a 889 chipset. i then highlight item on and paste SPDIFin, but it now becomes item 1

if i just drag and drop i can get SPDIFIn to show up under item 0... should it be on top of list or all the way at buttom?

then this is the most confusing part:

Code:
Move all items above SPDIFOut to Item 0 (one at a time)

they are allready under item 0???

same issue is when i paste spdifin to input (i dragged/dropped it)
 

Attachments

  • Skærmbillede 2012-06-06 kl. 13.29.51.png
    Skærmbillede 2012-06-06 kl. 13.29.51.png
    51.9 KB · Views: 1,434
  • Skærmbillede 2012-06-06 kl. 13.34.00.png
    Skærmbillede 2012-06-06 kl. 13.34.00.png
    80 KB · Views: 1,417
  • Skærmbillede 2012-06-06 kl. 13.38.05.png
    Skærmbillede 2012-06-06 kl. 13.38.05.png
    79.3 KB · Views: 1,412
decided to give up on the first steps and go to point 6 where i should get 7.1 sound

Code:
6. Add Line Out (Rear Speakers) for analog 7.1 Surround Sound
Adds side speaker for 7.1 analog surround sound
Note: Not available for Audio ID: 3yz
a. Edit Platforms.xml
Copy and paste the Line Out so there are two of the same. (2nd to last item)
Edit this path map as follows:
Current:
Item 0/NodeID/Number/21
Item 1/NodeID/Number/13
Item 2/NodeID/Number/3
New:
Item 0/NodeID/Number/23
Item 1/NodeID/Number/15
Item 2/NodeID/Number/5
b. Edit Hardware Config/info.plist
PinConfig
Find: 21771cf0 21771d00 21771e00 21771f40
Replace: 21771c80 21771d20 21771e01 21771f01
c. Save, install and restart

Code:
Copy and paste the Line Out so there are two of the same. (2nd to last item)

that line did not clearly tell where but i tried to look for the node id number and i got it i think, please look at attach pic

then i looked for 21771cf0 21771d00 21771e00 21771f40 but i found that more than once... should i replace them all? item 0-13
 

Attachments

  • Skærmbillede 2012-06-06 kl. 14.40.34.png
    Skærmbillede 2012-06-06 kl. 14.40.34.png
    125.4 KB · Views: 1,432
  • Skærmbillede 2012-06-06 kl. 14.48.30.png
    Skærmbillede 2012-06-06 kl. 14.48.30.png
    185.3 KB · Views: 1,449
i got an idea, maybe not bright as i can not do it myself

but what about a script that can mod the files?

ie the user extracts them to desktop and the scripts mod them and then the user puts them back?
 
boelle said:
first in the pdf i'm confused..

Code:
a. Edit Platforms.xml
Open PathMap 885
Copy Item 2 SPDIFIn (NodeID/Number/31)
Open PathMap for edit
Paste SPDIFIn on PathMap
Move Item 2 to top of Items
Repeat
New
Item 2 PathMap as follows:
Item 0/NodeID/Number/10
Item 1/NodeID/Number/31
Save

i open platforms.xml in plistedit and i can find pathmapid 885 under the item numbered 1

under that i expand pathmap numbered 2 then i expand 0, 0 again and then i expand 0 and 1 where i find node id 10 and 31

the instructions say copy item 2... is that pathmaps 1 or pathmap 2? (note missing s in the latter)

if it was the last option ie pathmap 2.. why not simple drag pathmap 2 to top of list?
Step by Step, Instructions in Bold, "Item 0 > Mic" means Item 0 is the mics (rear and front) audio device

Asumption
Under Pathmap 885 there are the following audio devices:
PathMap ID 885
PathMap
Item 0 > Mics
Item 1 > Line In
Item 2 > SPDIFIn
Item 3 > Speaker/Headphone
....

Assumption
Under Pathmap 889 there are the following audio devices:
PathMap ID 889
PathMap
Item 0 > Mics
Item 1 > Line In
Item 2 > Speaker/Headphone
....

Copy Item 2 SPDIFIn (NodeID/Number/31) from 885

Item 2 - SPDIFIn

Paste SPDIFIn on PathMap

PathMap ID 889
PathMap
Item 0 > SPDIFIn
Item 1 > Mics
Item 2 > Line In
Item 3 > Speaker/Headphone
....

Move Item 2 to top of Items
Repeat


PathMap ID 889
PathMap
Item 0 > Mics
Item 1 > Line In
Item 2 > SPDIFIn
Item 3 > Speaker/Headphone
....

The only reason you open a device is to verify you have the correct device, to copy in this case.
 
boelle said:
next step also is a bit confusing:

Code:
b. Edit layoutxyz.xml
Open layout885.xml
Open PathMapRef
Open Item 0
Copy SPDIFIn
Open layoutxyz.xml
Open PathMapRef
Open Item 0
Paste SPDIFIn on Item 0
Move all items above SPDIFOut to Item 0 (one at a time)
In layout885.xml
Open Inputs
Copy SPDIFIn
In layoutxyz.xml
Open Inputs
Paste SPDIFIn
Move all items above SPDIFIn to Inputs(one at a time)
Close layout885.xm
Save

i start by opening layout885.xml then i copy SPDIFIn.. i then open layout889.xml as i have a 889 chipset. i then highlight item on and paste SPDIFin, but it now becomes item 1

if i just drag and drop i can get SPDIFIn to show up under item 0... should it be on top of list or all the way at buttom?

then this is the most confusing part:

Code:
Move all items above SPDIFOut to Item 0 (one at a time)

they are allready under item 0???

same issue is when i paste spdifin to input (i dragged/dropped it)
Simply make layout889.xml look like layout885.xml. Copy what you need, paste it where it can be pasted and adjust the sequence with drag and drop.
 
Status
Not open for further replies.
Back
Top