I have. Here's part 1; part 2 will be coming in a little bit.
Each part of your audio codec has four verbs
that determine the properties of your audio ports; however, Mac OS has a limited knowledge of codec verbs (just like DSDT), so we need to correct the verbs so your ports are seen in Mac OS.
First, we need to modify your Windows codec dump; we need to byte flip
each one of the hex strings (which are the codec verbs). Here's an example: if we look at your first verb, it looks like this:
00000000 40 1c 17 01
When byte flipped, it looks like this:
00000000 01 17 1c 40
See what changed? The fourth two characters (40) is first, the third two characters (1c) is second, the second two characters (17) becomes third, and the first two characters (01) is fourth. Now, I would actually condense the digits to a single string just to make it simpler.
Do this to every one (I know, it's hard
) and continue.
Now, each of these characters has a purpose. The first character is the codec ID
. Every operating system numbers the audio cards (with their respective codecs), so this will always be 0 (as it is here) unless you are working with an audio source that is not built-in (i.e. a PCI/PCIe audio card or HDMI).
The next two digits is the node ID
. This is actually not a decimal number; it is actually hexadecimal. Why does one need to know that? Well, VoodooHDA uses decimal for it's node ID, so we need to convert it. Here's a table for converting the first 20 decimal numbers, hex listed first:
01=1 02=2 03=3 04=4 05=5 06=6 07=7 08=8 09=9 0a=10 0b=11 0c=12 0d=13 0e=14 0f=15 10=16 11=17 12=18 13=19 14=20
If you're confused, it will make more sense when we get to patching.
The next three digits after the node ID is the verb indicator
. This simply means that then next two characters define something about the codec. What do they define? Well, that depends on the third character of the verb indicator. I'll explain:
: the first digit after 71c is the default association
. This determines which audio jacks are grouped together as one (such as three or four port surround sound). The second digit is the sequence
. This determines the order of the jacks in the particular default association. If it doesn't make sense it will later on.
: the first digit after 71d is the color
. This is cosmetic; it simply describes what color to display in System Preferences or audio programs, such as Line-out (Green). Here is a table for the numbers (in hex):
The second digit after 71d is miscellaneous
. This simply defines whether or not the device supports jack detect; it is 0 if there is jack detect (such as Headphones and Mic) or 1-4 if there is no jack detect (such as internal speakers).
: the first digit after 71e is the default device
. This defines whether the audio port is line-out or any other type of port. The key is as follows (in hex):
3=CD (a.k.a. ATAPI)
5=Digital Other Out
6=Modem Line Side
7=Modem Handset Side
9=AUX (a.k.a. auxiliary port)
d=Digital Other In
The second digit after 71e is the connection type
. This defines what type of jack you have; the key is as follows (in hex):
8=Multichannel Analog (DIN)
: the digits after 71f are unique because both digits are dependent on each other! The reason is actually the two digits are determined in binary
, but are seen by us as hexadecimal numbers. The first two bits are the port connectivity
, which determines whether the ports have jacks (such as 1/8" or ATAPI; the two digits will be 00), no physical connections (01), a fixed function device (integrated speaker; 10), or both jack and internal device (11). The next two digits make up the first part of the location
, 00 being external on primary chassis, 01 is internal, 10 is separate chassis, and 11 is other. The next four digits are the second part of the location dependent on the first part; if part 1 is 00, 0001 is Rear, 0010 is Front, 0011 is Left, 0100 is Right, 0101 is Top, 0110 is Bottom, 0111 is Special (Rear Panel), and 1000 is Special (Drive Bay). If part 1 is 01, 0111 is Special (Riser), 1000 is HDMI, and 1001 is ATAPI. If part one is 10, 0001 is Rear, 0010 is Front, 0011 is Left, 0100 is Right, 0101 is Top, and 0110 is Bottom. If part 1 is 11, 0111 is Inside Mobile Lid (i.e. mic), and 1000 is Outside Mobile Lid. If you want to see what the binary is for port connectivity and location, open Calculator (/Applications), go up to the menu Mode (or similar) and choose Programmer's Calculator. In hex, enter the two digits after 71f and compare the binary below it to the code above. All of this just went over your head? Don't worry; we may or may not need it.
This is part 1 (explanation). Part 2 (application) will be coming a little bit later.