Credit to @bcc9
AppleHDA.kext/Contents/PlugIns/AppleHDAHardwareConfigDriver.kext/Contents/Info.plistLayout12.xml and Platforms.xlm (zlib)
I state that the files I'm talking about, they contain a lot of information that I do not speak, simply because I do not have full knowledge, but that does not stop me from having the sound on my speakers. Only trust you now have some insight on what to do.
In Snow Leopard, these two files are located within a single plist, by Lion onwards are divided into two distinct files, and are placed at this path:
the difference between Lion and Moutain Lion, is that in 10.8 are zlib compressed, for which the method of patching these files is almost identical, with the only difference that in Lion files are decompressed (Layoutxx.xml and Platforms.xlm), while in Mountain Lion are compressed (Layoutxx.xml.zlib and Platforms.xml . zlib)....so if you have a working 10.7 AppleHDA.kext, most likely you can recover these files, compress it and use them to Mountain Lion!
From this, then comes the need to decompress these files in Mountain Lion, and thanks to the script "zlib.pl" by Samantha, we are able to compress and decompress those files.Decompress/CompressLayout12.xml
Layoutxx files, seems to be an inventory of audio inputs and outputs, we declare that we have, and how they are arranged. Platforms.xml obviously, there are the paths of the nodes, for all that we have in the Layout12.xml.
Failure to comply with what you wrote in one, generates assertions (will not be only reason).Platforms.xml
Looking at the graph above, we have to decide how to build/modify our Platforms.xml. How to do it?
I think first you need the PinComplex we are interested in, such as headphones, microphone and speaker, and then see which path to follow: the Pathmaps
so I have to bring to work Node 11 (Headphones), Node 17 (Microphone) and Node 13 ( Internal Speaker (in 111d76e0 codec)), all in decimal
, this is also according with verbs.txt.
So now to clean up the plist, and we take what we do not need (optional), and we set the "PathMapID" as in Layout12.xml, ie 1
As already mentioned "how to edit AppleHDA.kext" is very similar for both 10.7 and 10.8, so now you can use the Layout12.xml and Platforms.xml "as they are" for Lion, or compress in zlib for Mountain Lion!DSDT Editing: