Subscribe to our RSS news feed
AAPL 199.94 (-1.25)

> Forum Guidelines.

Welcome to the Genius Bar. Here's how this forum works:

1. Members are encouraged to make a guide that details something that they might have found troubling or challenging.
Chances are, if you've seen the same question asked over and over again, you should write a guide for it.

2. This is not the forum for asking questions. If you have a question about a thread that's already here, feel free to ask it.
Just don't start a thread for a specific question. Use the other forums here for that.

3. Posting links to off-site tutorials is not allowed.

4. That's it! Thanks for sharing your information with the rest of us. :)

To keep this forum clean this forum is moderated. You can post in existing topics but new ones will have to be approved before they show up.

20 Pages V   1 2 3 > »   
Reply to this topic Start new topic
[HOW TO] Patch AppleHDA - Knowledge Base
*****
  • Group: Members
  • Posts: 296
  • Joined: 29-August 06
  • Member No.: 53,345
Deleted. Done with this.
PM Profile Card
Go to the top of the page
+ Quote Post
Group Icon
  • Group: Retired
  • Posts: 2,854
  • Joined: 8-July 05
  • From: The Land of Hairy-Arsed Highlanders
  • Member No.: 286
nice guide man... will be trying this soon smile.gif
PM Profile Card
Go to the top of the page
+ Quote Post
Group Icon
  • Group: Retired
  • Posts: 338
  • Joined: 6-February 08
  • From: Outskirts of insanity
  • Member No.: 183,389
VERY nice guide.
PM Profile Card
Go to the top of the page
+ Quote Post
*****
  • Group: Members
  • Posts: 296
  • Joined: 29-August 06
  • Member No.: 53,345
Thanks

Its not complete, was a fast write... I have to add on it more info and howto...
For now I'm stuck on codec verbs...searching on intel docs(I hate that, especial b/c dunno for what to look) also that missing info on terms makes this patching stuff even more hard..
Laso if u look on my converted dump there are some connections with an "*" on it, also dunno why:
CONNECTION: 5
12* 13 14 15 38
Maybe Taruga can help us to understand better.

L.E. Seems that "*" means connection in use.
Dunno for sure, maybe someone can confirm/or not this.
PM Profile Card
Go to the top of the page
+ Quote Post
Group Icon
  • Group: Retired
  • Posts: 2,854
  • Joined: 8-July 05
  • From: The Land of Hairy-Arsed Highlanders
  • Member No.: 286
attaching a ruby script which will convert the hex values to decimal.

usage:

chmod +x convert_hex_to_dec.rb
./convert_hex_to_dec.rb dumpfile.txt

it will output to stdout. if you want u can pipe it to a file with:

./convert_hex_to_dec.rb dumpfile.txt >newdumpfile.txt
Attached File(s)
Attached File  convert_hex_to_dec.rb.zip ( 411bytes ) Number of downloads: 117
 
PM Profile Card
Go to the top of the page
+ Quote Post
*****
  • Group: Members
  • Posts: 296
  • Joined: 29-August 06
  • Member No.: 53,345
QUOTE (munky @ Sep 30 2008, 04:43 PM) *
attaching a ruby script which will convert the hex values to decimal.

thumbsup_anim.gif
THANKS for this man, manual convert was a PITA!
I will add it on linux dump section, to keep things organized...
Thanks again! smile.gif

L.E. Info added on guide, also added codecgraph how to.
PM Profile Card
Go to the top of the page
+ Quote Post
*******
  • Group: Members
  • Posts: 914
  • Joined: 24-October 07
  • From: Brussels
  • Member No.: 144,874
I get
CODE
File "/Users/paul/Desktop/codecgraph/codecgraph.py", line 496, in <module>
    main(sys.argv)
  File "/Users/paul/Desktop/codecgraph/codecgraph.py", line 492, in main
    ci = CodecInfo(f)
  File "/Users/paul/Desktop/codecgraph/codecgraph.py", line 442, in __init__
    n = Node(self, item, subitems)
  File "/Users/paul/Desktop/codecgraph/codecgraph.py", line 106, in __init__
    self.nid = int(m.group(1), 16)
AttributeError: 'NoneType' object has no attribute 'group'

when trying to generate the codec.txt.svg it says then
CODE
Generating ALC889a.txt.svg

But
CODE
bash-3.2# ls ~/Desktop/codecgraph/
.DS_Store    COPYING        README        codecgraph.py    samples
ALC889a.txt    IDEAS        codecgraph    codecs.txt
BUGS        Makefile    codecgraph.1    out


What's the matter ?

Does the .profile file goes in ~/ ? Which profile file is it ? graphviz ?

Thank's
PM!


EDIT : OK my dump was wrong. I't ok now... i can follow the guide.
PM Profile Card
Go to the top of the page
+ Quote Post
**
  • Group: Members
  • Posts: 63
  • Joined: 8-April 07
  • From: Israel
  • Member No.: 99,133
My little research about AppleHDA, i don't know if this things is right or not, just my experience.

We trying to understand how to modify codec verb (ConfigData)

The ConfigData looks like this:
<01471cf0 01471d00 01471e11 01471f40 01571c30 01571d40 01571e01 01571f01 01671c0f 01671d00 01671e00 01671f40 01771c0f 01771d00 01771e00 01771f40 01871c10 01871d01 01871ea0 01871f90 01971c11 01971d01 01971ea0 01971f90 01a71c20 01a71d30 01a71e81 01a71f01 01b71c50 01b71d70 01b71e21 01b71f01 01f71c30 01f71de0 01f71ec5 01f71f01 01e71c60 01e71de0 01e71e45 01e71f01>

As you can see, here is group of 4 values: 01471cf0 01471d00 01471e11 01471f40

This is what i found on every group:

01471xx = Green (Internal Speaker)
01571xx = Black (Line Out)
01671xx = ?
01771xx = ?
01871xx = Pink (External Mic In)
01971xx = ?
01a71xx = Blue (Line In)
01b71xx = Front (Headphones)
01f71xx = ?
01e71xx = ?

Another finding, again, im not sure if its right.

Group look like this:
01471cf0 01471d00 01471e11 01471f40

Value 1) Something with sound mapping <- if you change this value, you broke the sound.
Value 2) ?
Value 3) Changing Name (ex: Line out to Headphones)
Lets say if you change 01471e11 to 01471e40 you'll see that your Internal Speaker changed to Headphones, but only the name, mapping still the same.
Value 4) ?

Thats it. smile.gif
Enjoy.

Feel free to add your researches or correct ours.
PM Profile Card
Go to the top of the page
+ Quote Post
*******
  • Group: Members
  • Posts: 582
  • Joined: 17-July 07
  • Member No.: 121,674
Gave link to Codecgraph to Taruga here post #15 back in FEB '08.
Good to see someone finally found value in it.
Never knew if Taruga did.
Speaking of Taruga
What happened to him???

Good Tutorial though.
PM Profile Card
Go to the top of the page
+ Quote Post
*****
  • Group: Members
  • Posts: 256
  • Joined: 30-June 07
  • Member No.: 118,200
Codec Graph for STAC9274D found on badaxe2 in hex and decimal and archived as a zip file and codec dump

TheKing:

QUOTE
Layouts dunno... I leave them as they are...someone?


look in Taruga's patched AppleHDA.kext/Contents/Resources. Here you will find a number of Layout.xml and PathMap.xml files, it might help.
Attached File(s)
Attached File  hex_stac9274d.txt ( 5.73K ) Number of downloads: 68
Attached File  STAC9274D_svg.zip ( 17.56K ) Number of downloads: 55
 
PM Profile Card
Go to the top of the page
+ Quote Post
*
  • Group: Members
  • Posts: 25
  • Joined: 25-November 07
  • Member No.: 156,616
hey i was wandering how to convert the hex to dec in OSX calculator. im really confused
PM Profile Card
Go to the top of the page
+ Quote Post
*****
  • Group: Members
  • Posts: 296
  • Joined: 29-August 06
  • Member No.: 53,345
QUOTE (justvisiting @ Oct 5 2008, 01:17 AM) *
look in Taruga's patched AppleHDA.kext/Contents/Resources. Here you will find a number of Layout.xml and PathMap.xml files, it might help.

What you quote was from 5. Editing AppleHDAController Info.Plist section <--- That Layouts, under the PostConstructionInitialization entry, I dont get what are you trying to say...

@jaysonz Why you still try to use calculator for converssion now once u have a script for that, also I dont get what is not clear for using calculator...if you still want to spend a lot of time... blink.gif
PM Profile Card
Go to the top of the page
+ Quote Post
***
  • Group: Members
  • Posts: 103
  • Joined: 27-April 07
  • Member No.: 103,792
QUOTE (stickpin @ Oct 4 2008, 05:37 PM) *
My little research about AppleHDA, i don't know if this things is right or not, just my experience.

Group look like this:
01471cf0 01471d00 01471e11 01471f40

Value 1) Something with sound mapping <- if you change this value, you broke the sound.
Value 2) ?
Value 3) Changing Name (ex: Line out to Headphones)
Lets say if you change 01471e11 to 01471e40 you'll see that your Internal Speaker changed to Headphones, but only the name, mapping still the same.
Value 4) ?

Thats it. smile.gif
Enjoy.

Feel free to add your researches or correct ours.

Last one; 01471f"40" changes connection type from Combo, Internal, 1/8 Jack
PM Profile Card
Go to the top of the page
+ Quote Post
*******
  • Group: Members
  • Posts: 934
  • Joined: 18-August 06
  • Member No.: 51,637
Im trying this to work on an ADI1981.... took the ADI1988b patched from taruga as a model....
no success so far...

how to generate a diagram with codecgraph?
PM Profile Card
Go to the top of the page
+ Quote Post
Group Icon
  • Group: Moderators
  • Posts: 861
  • Joined: 11-November 07
  • From: France
  • Member No.: 151,988
very very interesting topic, thank you THe King wink.gif
PM Profile Card
Go to the top of the page
+ Quote Post
*******
  • Group: Members
  • Posts: 735
  • Joined: 8-October 06
  • Member No.: 59,183
should i give some time with 1998B or it's worthless?
i don't know about progress so far, taruga wiki is down a long time
PM Profile Card
Go to the top of the page
+ Quote Post
*******
  • Group: Members
  • Posts: 934
  • Joined: 18-August 06
  • Member No.: 51,637
I made a graph from the codec dump

but I get this errors while doing it:

QUOTE
bash-3.2# ./codecgraph /Users/dlow/Desktop/codecgraph/ADI1981.txt
Codec: Analog Devices AD1981
Node 0x05: Amp-In vals count is wrong: values found: 2. expected: 1
Node 0x08: Amp-In vals count is wrong: values found: 0. expected: 1
Node 0x09: Amp-In vals count is wrong: values found: 2. expected: 1
Node 0x18: Amp-In vals count is wrong: values found: 2. expected: 1
Generating ADI1981.txt.svg


Although the graphic seems to be ok...
PM Profile Card
Go to the top of the page
+ Quote Post
*
  • Group: Members
  • Posts: 3
  • Joined: 27-June 08
  • Member No.: 249,893
Dear,

First, thank very much this helpful guide to understand AppleHDA structure.
This is what I was looking for during a month to understand...

BTW, when I tryed to build Graphviz from MacPort, I failed...(becuase I'm newbie of Mac)
However, I found the binary package of this 'Graphviz' for Leopard from here http://www.pixelglow.com/graphviz/download/. It is version 2.18(March 2008).

I do not test yet, but I hope it will be helpful for others.

Thanks,
PM Profile Card
Go to the top of the page
+ Quote Post
**
  • Group: Members
  • Posts: 50
  • Joined: 27-October 07
  • Member No.: 145,919
QUOTE (PM! @ Oct 2 2008, 11:12 AM) *
I get
CODE
File "/Users/paul/Desktop/codecgraph/codecgraph.py", line 496, in <module>
    main(sys.argv)
  File "/Users/paul/Desktop/codecgraph/codecgraph.py", line 492, in main
    ci = CodecInfo(f)
  File "/Users/paul/Desktop/codecgraph/codecgraph.py", line 442, in __init__
    n = Node(self, item, subitems)
  File "/Users/paul/Desktop/codecgraph/codecgraph.py", line 106, in __init__
    self.nid = int(m.group(1), 16)
AttributeError: 'NoneType' object has no attribute 'group'

when trying to generate the codec.txt.svg it says then
CODE
Generating ALC889a.txt.svg

But
CODE
bash-3.2# ls ~/Desktop/codecgraph/
.DS_Store    COPYING        README        codecgraph.py    samples
ALC889a.txt    IDEAS        codecgraph    codecs.txt
BUGS        Makefile    codecgraph.1    out


What's the matter ?

Does the .profile file goes in ~/ ? Which profile file is it ? graphviz ?

Thank's
PM!


EDIT : OK my dump was wrong. I't ok now... i can follow the guide.





You say your dump was wrong, how was it wrong? I am getting the same error, i converted the dump to dec but i can't convert it to svg format. if my dump is in hex format then it converts to svg without any problems
PM Profile Card
Go to the top of the page
+ Quote Post
*
  • Group: Members
  • Posts: 23
  • Joined: 22-April 06
  • Member No.: 35,710
QUOTE (THe KiNG @ Sep 24 2008, 01:36 PM) *
- after install is done and u got this last mesg: ---> Cleaning graphviz type in terminal(press enter after each line):
cd
then type:
nano .profile
copy/paste this line in terminal: export PATH=/opt/local/bin:/opt/local/sbin:$PATH
Then press ctrl+x
type y
then enter
Jobe is done, close and open terminal again for the next step:
- Download CodecGraph *Tip look first on already uploaded codec graphs, on the main site, if you codec is already there(specific hw also!) then u are lucky and u don't need to make a new one, just skip the making part and just convert hex to dec for easy undestanding and plist modd.
- unzip it to desktop and rename the folder to codecgraph(also rename your codec dump to just 1 name if it have more, like alcxxx.txt), put your codec dump in the same folder
- now in terminal cd to your codecgraph folder example:
cd /Users/theking/Desktop/codecgraph
- then type:
./codecgraph /Users/theking/Desktop/codecgraph/M50SV.txt *replace "theking" & "M50SV.txt" with your user and codec name file


That's what I get:
CODE
bash-3.2# ./codecgraph /Users/snooker/Desktop/codecgraph/dumpfile.txt
error: dot executable not found (did you install graphviz?)
bash-3.2#

I definately did install graphwiz. Procedure ended as expected with ---> Cleaning graphviz.
I presume it depends on the location of the .profile file.
Is it correct that is has to be in my home directory? because a simple cd command is directing me to there.
PM Profile Card
Go to the top of the page
+ Quote Post
20 Pages V   1 2 3 > » 
Reply to this topic Start new topic

2 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
1 Members: nenif

 

RSS Lo-Fi Version Time is now: 21st November 2009 - 11:36 PM