Jump to content

Pin Config Patching VoodooHDA 0.2.7.2 Project OS X Branch


  • Please log in to reply
52 replies to this topic

#41
Blacky

Blacky

    InsanelyMac Protégé

  • Members
  • Pip
  • 10 posts
They are located in front of the chassis (it's a HP DC7900). They have their own connector on the mobo.
The speakers work fine under Windows XP/Vista/7 and Linux Ubuntu.
I opened my issue here as well: http://code.google.c...id=170&sort=-id

No one seems to be interested and I know there are plenty of PCs out there with internal speakers.

#42
PookyMacMan

PookyMacMan

    InsanelyMac Legend

  • Moderators
  • 1,459 posts
  • Gender:Male
  • Location:Earth–Western Hemisphere, specifically
  • Interests:Computer science, engineering, trumpet performance, and a host of others. :D
Indeed. Internal speakers = usually a laptop, with the exception of some prebuilt desktops. I think the guide coming will help you. ;)

An update on how it's going: I've been writing it up on my MacBook, but it took a fall and the display hinge is being repaired, and I don't have a copy of it on my hack here...so it'll be a few more days yet.

Thank you guys for waiting so long, especially Wcool. :) You guys are awesome!!

#43
PookyMacMan

PookyMacMan

    InsanelyMac Legend

  • Moderators
  • 1,459 posts
  • Gender:Male
  • Location:Earth–Western Hemisphere, specifically
  • Interests:Computer science, engineering, trumpet performance, and a host of others. :D
Got my MacBook early, and finished part 2! :D

First, let's look at the first set of (byte-flipped) verbs from RegEdit:
01171c40
01171d01
01171e43
01171f99
If we apply our knowledge from part 1, we can see that this is for codec #0, and node 17 (notice that the node number is 11 in regedit, but converting it from hex to decimal it is 17). Looking at the VoodooHDA pin defaults in codecdump.txt for node 17 (nid 17), we have:
0x99430140
The format for the pin defaults is:
0x[71f][71e][71d][71c]
As we look at this, Voodoo has detected this output (S/PDIF) correctly. Now, the most important digits are those in 71c. The other digits are merely cosmetic, but 71c determines functionality. The last two digits are 71c, and we want the sequence to be 0. Here, we see that sequence is 0, so the output will show in System Preferences.

Now the next node (18):
Regedit:
01271cf0
01271d11
01271e11
01271f41
Voodoo:
0x411111f0
Voodoo has detected everything correctly. (Internal speaker), and the sequence is also 0.

On node 20,
Regedit:
01471c10
01471d44
01471e01
01471f01
For Voodoo:
01014410
This node also appears to be correct (Green Line-out), and it also has the proper association of 0.

Now for the next one (21):
Regedit:
01571c12
01571d14
01571e01
01571f01
Voodoo:
01011412
Voodoo has detected it correctly (Black Line-out), but notice the sequence is 2. OS X won't be able to use the jack correctly when it is not 0, so we'll need to patch it. We'll patch the nodes at the end. ;)

For node 22:
Regedit:
01671c11
01671d64
01671e01
01671f01
Voodoo:
01016411
It's detected correctly (Orange Line-out), but it has the same problem as the black line-out.

For node 23:
Regedit:
01771c14
01771d24
01771e01
01771f01
Voodoo:
01012414
Ditto for this Grey Line-out. Same problem as above two nodes.

For node 24:
RegEdit:
01871c50
01871d9c
01871ea1
01871f01
Voodoo:
01a19c50
This is actually an input (Pink Microphone - rear), and it is set up correctly with the sequence of 0.

Now for node 25:
Regedit:
01971c60
01971d9c
01971ea1
01971f02
Voodoo:
02a19c60
Correct (Pink Microphone - front), and the sequence is 0. :)

Node 26:
Regedit:
01a71c5f
01a71d34
01a71e81
01a71f01
Voodoo:
0181345f
This is correctly detected as a Blue Line-in, but we'll need to patch it later on because we don't like f for inputs, only outputs (more on the f value later on).

Node 27:
Regedit:
01b71c20
01b71d4c
01b71e21
01b71f02
Voodoo:
02214c20
This is the Headphone port, which has a sequence of 0, but most likely we're actually going to want it to be f with a default association of 1 (the same as Green Line-out). But if it's supposed to be 0, why would we want f? The reason why we would want f is for jack auto-detect; namely, if it is configured with a 71c figure of 1f, then when you plug something into the headphone port and it will disable the green line-out automatically and pipe it through to the headphone port, rather than having to go into System Preferences and changing the input manually. But, if that's what you prefer, that's OK. You don't have to add that patch when we get there. ;)

Node 28:
Regedit:
01c71cf0
01c71d11
01c71e11
01c71f41
Voodoo:
411111f0
You'll notice this is the same as the other speaker. Why it's listed twice (actually, node 31 is also a speaker so there are 3) I don't know, other than there are three speaker outputs on your motherboard…? I don't think this matters much, correct me if I'm wrong.

Next is node 30:
Regedit:
01e71c30
01e71d21
01e71e45
01e71f01
Voodoo:
01452130
Correct and it's 0 (it's the other S/PDIF Out).

Last is node 31, but if you look at it it's the other speaker, so we're done!! :D Now for the actual patching.

Open Terminal (/Applications/Utilities) and type:
sudo nano /System/Library/Extensions/VoodooHDA.kext/Contents/Info.plist
Scroll down with the arrow keys down to (a long way down) where you see:
<key>NodesToPatch</key>
<array>
</array>
Next, create a new line after <array>, indent it, and type <dict>. It should look like this:
<key>NodesToPatch</key>
<array>
			   <dict>
</array>
Next, create a new line, indent twice (so it's one beyond <dict>) like so:
<key>NodesToPatch</key>
<array>
			   <dict>
							  <key>Codec</key>
</array>
Now, we'll need to insert the codec number for the node we're patching. Remember, the first digit in the Regedit dumps is the codec number, and if you look at the dump it is 0. So, we will add <integer>0</integer>:
<key>NodesToPatch</key>
<array>
			   <dict>
							  <key>Codec</key>
							  <integer>0</integer>
</array>
If it was 2, we would have <integer>2</integer>, for example; others can change it to whatever it needs to be.
Below it add <key>Config</key>:
<key>NodesToPatch</key>
<array>
			   <dict>
							  <key>Codec</key>
							  <integer>0</integer>
							  <key>Config</key>
</array>
Next, we will add the patch. Remember, we had nodes 21 (Black Line-out), 22 (Orange Line-out), 23 (Grey Line-out), and 26 (Blue Line-in) to patch because the sequence was not 0 for those. So, first, let's look at Voodoo's current config for node 21 (the first one we'll patch) again (not Regedit!):
01011412
What we must do is change the last digit (sequence) to 0, but if you look there is already a port with a sequence of 0 with a default association (the second to last digit) of 1 (namely, the green line-out). So, we must change the default association as well, to a digit that no other input/output has. So, lets take a look at which default associations are taken by jacks with a default association of 0:
1 = nid 20 (Green Line-out)
2 = nid 27 (Headphones)
3 = nid 30 (S/PDIF Out)
4 = nid 17 (S/PDIF Out)
5 = nid 24 (Pink Microphone - rear)
6 = nid 25 (Pink Microphone - front)
f = nid 18, 28, 31 (Speaker)
Those are the default associations that we cannot use; you can check those node IDs and you will find that the sequence is 0 with those default association values. There is one exception, however - the headphones. Remember, we're going to change it anyway to a different default association, so that frees up default association 2. We'll use that for this black line-out. So, if you change the default association to 2 and the sequence to 0, the new config for node 21 is:
01011420
So, let's put 0x before it and place it between <string> and </string> below the Config key as follows:
<key>NodesToPatch</key>
<array>
			   <dict>
							  <key>Codec</key>
							  <integer>0</integer>
							  <key>Config</key>
							  <string>0x0101420</string>
</array>
Next we need to add <key>Node</key>:
<array>
			   <dict>
							  <key>Codec</key>
							  <integer>0</integer>
							  <key>Config</key>
							  <string>0x0101420</string>
							  <key>Node</key>
</array>
Below it, we will add the node ID in decimal (which is Voodoo's format), so we'll add <integer>21</integer> in this case:
<array>
			  <dict>
							 <key>Codec</key>
							 <integer>0</integer>
							 <key>Config</key>
							 <string>0x0101420</string>
							 <key>Node</key>
							 <integer>21</integer>
</array>
And lastly, we'll add </dict> below the initial <dict>:
<array>
			   <dict>
							  <key>Codec</key>
							  <integer>0</integer>
							  <key>Config</key>
							  <string>0x0101420</string>
							  <key>Node</key>
							  <integer>21</integer>
			   </dict>
</array>
And now the black line-out is patched and it will show up in System Preferences. :) Now, we're not finished, we need to add the other input/outputs. So, below the dict you added above create another dict with the Codec + codec number:
<array>
			   <dict>
							  <key>Codec</key>
							  <integer>0</integer>
							  <key>Config</key>
							  <string>0x0101420</string>
							  <key>Node</key>
							  <integer>21</integer>
			   </dict>
			   <dict>
							  <key>Codec</key>
							  <integer>0</integer>
</array>
Now, for the config, node 22 (the next node to patch) is:
01016411
Looking back at our list of "occupied" default associations, the next lowest number we can use is 7. So, our new config looks like this:
01016470
And now we'll insert it in our NodesToPatch array:

<array>
			   <dict>
							  <key>Codec</key>
							  <integer>0</integer>
							  <key>Config</key>
							  <string>0x0101420</string>
							  <key>Node</key>
							  <integer>21</integer>
			   </dict>
			   <dict>
							  <key>Codec</key>
							  <integer>0</integer>
							  <key>Config</key>
							  <string>0x01016470</string>
</array>
And lastly insert the node ID:

<array>
			   <dict>
							  <key>Codec</key>
							  <integer>0</integer>
							  <key>Config</key>
							  <string>0x0101420</string>
							  <key>Node</key>
							  <integer>21</integer>
			   </dict>
			   <dict>
							  <key>Codec</key>
							  <integer>0</integer>
							  <key>Config</key>
							  <string>0x01016470</string>
							  <key>Node</key>
							  <integer>22</integer>
			   </dict>
</array>
The next node to patch is node 23, also from codec 0. The current config is 01012414, so we'll change it to 01012480. Now let's insert the entire patch:

<array>
			   <dict>
							  <key>Codec</key>
							  <integer>0</integer>
							  <key>Config</key>
							  <string>0x0101420</string>
							  <key>Node</key>
							  <integer>21</integer>
			   </dict>
			   <dict>
							  <key>Codec</key>
							  <integer>0</integer>
							  <key>Config</key>
							  <string>0x01016470</string>
							  <key>Node</key>
							  <integer>22</integer>
			   </dict>
			   <dict>
							  <key>Codec</key>
							  <integer>0</integer>
							  <key>Config</key>
							  <string>0x01012480</string>
							  <key>Node</key>
							  <integer>23</integer>
			   </dict>
</array>
See how this goes? Now let's apply the same thing to node 26:

<array>
			   <dict>
							  <key>Codec</key>
							  <integer>0</integer>
							  <key>Config</key>
							  <string>0x0101420</string>
							  <key>Node</key>
							  <integer>21</integer>
			   </dict>
			   <dict>
							  <key>Codec</key>
							  <integer>0</integer>
							  <key>Config</key>
							  <string>0x01016470</string>
							  <key>Node</key>
							  <integer>22</integer>
			   </dict>
			   <dict>
							  <key>Codec</key>
							  <integer>0</integer>
							  <key>Config</key>
							  <string>0x01012480</string>
							  <key>Node</key>
							  <integer>23</integer>
			   </dict>
			   <dict>
							  <key>Codec</key>
							  <integer>0</integer>
							  <key>Config</key>
							  <string>0x01813490</string>
							  <key>Node</key>
							  <integer>26</integer>
			   </dict>
</array>
So we changed to config from 0181345f to 01813490 so it will be usable.

Now the last patch is optional if you want headphones to be auto detect; we still use the same process, and this is what it looks like:

<array>
			   <dict>
							  <key>Codec</key>
							  <integer>0</integer>
							  <key>Config</key>
							  <string>0x0101420</string>
							  <key>Node</key>
							  <integer>21</integer>
			   </dict>
			   <dict>
							  <key>Codec</key>
							  <integer>0</integer>
							  <key>Config</key>
							  <string>0x01016470</string>
							  <key>Node</key>
							  <integer>22</integer>
			   </dict>
			   <dict>
							  <key>Codec</key>
							  <integer>0</integer>
							  <key>Config</key>
							  <string>0x01012480</string>
							  <key>Node</key>
							  <integer>23</integer>
			   </dict>
			   <dict>
							  <key>Codec</key>
							  <integer>0</integer>
							  <key>Config</key>
							  <string>0x01813490</string>
							  <key>Node</key>
							  <integer>26</integer>
			   </dict>
			   <dict>
							  <key>Codec</key>
							  <integer>0</integer>
							  <key>Config</key>
							  <string>0x02214c1f</string>
							  <key>Node</key>
							  <integer>27</integer>
			   </dict>
</array>
And…we're done!!! :D :D Yahoo! Remember, also, that since VoodooHDA covers multiple codecs (i.e. HDMI and built-in inputs/outputs), you can insert patches for your other codecs in the same NodesToPatch array as the others.

Now, lastly, to finish it up, press Control-O to save (and press enter to confirm), and Control-X to exit. Now, update the kext caches (see the FAQ). This is very important; if you don't update the caches the patches will not be applied.

Once you update the caches, reboot, and enjoy all your audio ports. :) Hope this helped!!

#44
Blacky

Blacky

    InsanelyMac Protégé

  • Members
  • Pip
  • 10 posts
Thanx! But I don't have a Windows installation on my hackintosh... so is there no other way to get the RegEdit nodes? Like, using Linux for instance?

#45
Riley Freeman

Riley Freeman

    InsanelyMac Legend

  • Members
  • PipPipPipPipPipPipPip
  • 848 posts
  • Gender:Male
  • Location:The Streets
Thanks for the post above PookyMacMan. It explains things nice and clearly. I lost my notes from when I was hacking AppleHDA previously and still want to try and fix a few things in my kext. The verb info you've posted should be very helpful with that!

The main fix I want is getting it to detect when I'm using the S/PDIF out. It defaults to using Line out (or Headphone out, I can't remember). I can get Line out/HP out to switch, but can I also add the S/PDIF into the mix so it can disable the line out when connected?

#46
PookyMacMan

PookyMacMan

    InsanelyMac Legend

  • Moderators
  • 1,459 posts
  • Gender:Male
  • Location:Earth–Western Hemisphere, specifically
  • Interests:Computer science, engineering, trumpet performance, and a host of others. :D
@Blacky Yes, you can make a Linux codec dump as well. I just can't remember the process ATM, you should be able to find it online.

@Riley Hm...I'm not too sure about AppleHDA patching (never found a guide to do it manually for Snow Leo/Lion, only THe KiNG's old Leo one), but I hope that verb info helps. :)

#47
Blacky

Blacky

    InsanelyMac Protégé

  • Members
  • Pip
  • 10 posts
I've already made the Linux code dump:
http://code.google.c...s:1342098329331
I just don't know how to use it...

#48
MacFaulty

MacFaulty

    InsanelyMac Geek

  • Members
  • PipPipPip
  • 155 posts
  • Gender:Male
  • Location:Netherlands
  • Interests:Programming, programming, programming... AND scripting :)
Srry for the very late reply, my apologies.

I will start with this very soon now that I have holiday. :D
Anyway, I would like to thank you, PookyMacMan, for providing such a great piece of art that'll help people to get their stuff working and not even ask anything for it in return (you're just like me :D I am sometimes too much helpful, but that's another thing).

So, Thank you VERY, VERY much! I'll try this asap (that's As Soon As Possible, right? :)).

#49
PookyMacMan

PookyMacMan

    InsanelyMac Legend

  • Moderators
  • 1,459 posts
  • Gender:Male
  • Location:Earth–Western Hemisphere, specifically
  • Interests:Computer science, engineering, trumpet performance, and a host of others. :D

Anyway, I would like to thank you, PookyMacMan, for providing such a great piece of art that'll help people to get their stuff working and not even ask anything for it in return

You are very welcome. :)

I am sometimes too much helpful, but that's another thing).

Me too... :blush:

So, Thank you VERY, VERY much! I'll try this asap (that's As Soon As Possible, right? :)).

You are correct. :)

I'm also thinking that the three parts put together could make a good guide for the Genius Bar...I'll think about putting that together. :)

@Blacky...compare the Linux pin defaults (you will see this value many times in your dump) with the pin defaults of Voodoo's codec dump. I think they are one and the same. :)

#50
Blacky

Blacky

    InsanelyMac Protégé

  • Members
  • Pip
  • 10 posts
I am trying to patch the nodes. But I find it impossible, since Voodoo dump only detects my Nvidia HDMI ports:
http://code.google.c...3A1342267474588

Although my audio is working fine, except for the internal speakers.

Edit,

I tried to add the following lines to Info.plist

<key>NodesToPatch</key>
<array>

<dict>
<key>Codec</key>
<integer>0</integer>
<key>Config</key>
<string>0x400000</string>
<key>Node</key>
<integer>26</integer>
</dict>

<dict>
<key>Codec</key>
<integer>0</integer>
<key>Config</key>
<string>0x40050c</string>
<key>Node</key>
<integer>19</integer>
</dict>
</array>

But didn't work. Internal speaker still not working.

#51
SmurfBiterJay

SmurfBiterJay

    InsanelyMac Protégé

  • Members
  • Pip
  • 19 posts
Hey Pooky MacMan, been trying to follow along, I've gotten through the first part, got my bytes flipped, however VoodooHDA only seems to be picking up HDMI, also sounds like sound is coming from the mic as there's a hellalous noise coming from it which is partly what I want to fix. The other part is this Laptop has 2.1 audio, but I can only use the 2 internal speakers or the subwoofer indecently from each other . If you get a sec to look through my files think you can help me out and tell me where I screwed up at?

Attached Files



#52
TUX FIRE

TUX FIRE

    InsanelyMac Geek

  • Members
  • PipPipPip
  • 113 posts
Thank you Pooky for this tutorial !! nice work man !! :thumbsup_anim:

#53
Blacky

Blacky

    InsanelyMac Protégé

  • Members
  • Pip
  • 10 posts
I think in Win XP, this is where you find the pinconf (since there is no pinconfigoverride):
http://img43.imagesh...769/pinconf.png

EDIT:

I finally managed to get the thing to semi-work! Thank you so much! Your guide was very helpful.
When I said semi-work I mean that:
- There is sound from the internal speakers now (yyeeey!), but the volume is rather low
- if I plug-in the headphones, the sound in the headphones is very loud
- The front headphone plugs don't work, only the ones in the back





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

© 2014 InsanelyMac  |   News  |   Forum  |   Downloads  |   OSx86 Wiki  |   Mac Netbook  |   PHP hosting by CatN  |   Designed by Ed Gain  |   Logo by irfan  |   Privacy Policy