Jump to content

[HOW TO] Patch AppleHDA - Knowledge Base


  • Please log in to reply
392 replies to this topic

#121
SMF

SMF

    InsanelyMac Geek

  • Members
  • PipPipPipPip
  • 188 posts
I didn't see this posted elsewhere on Insanelymac and hopefully this will help us figure things out -

Here's a codec dump from a new MacBook made using Mandriva Linux.

SMF

Attached Files



#122
THe KiNG

THe KiNG

    InsanelyMac Legend

  • Gurus
  • 674 posts
  • Gender:Male

Im not really back yet, I cant push myself too much, Im still recovering and Im on sick leave on my 3rd month now. I mostly try to watch the osx community evolution and news, watch tv and rest as must as possible.

I'm very happy that you are OK and making progress on recovery :)
I hope soon you can help me to finish(as much is possible) this guide since is based more then 80% on your work.

One advice to people with curiosity in audio and PinConfigurations, there is no need to setup them up on DSDT (do it if you want to). I just changed AZAL to HDEF and I used a couple of plists for AppleHDA to send the correct verbs to the audio codec.
PinConfigurations also knows as codec verbs are used and sent when AppleHDA establishes a link to the audio codec. And that happens with AppleHDAController, I dont see a way of DSDT editing to make some miracles I did with some codecs, like 1988b, alc861, etc... Most of them use special codec verbs to do other audio codecs setups. You can get the idea with alsa source of from some xp and vista drivers that come with codecs verbs that not only set pin configs right but also enables sound on some muted systems.
PinConfigurations are a small part of all the Codec Verbs Power !!!
If the codec verbs are set right on AppleHDAController info.plist even the PinConfigurations will be filled out if its property value is empty.
As I said before, I dont think AppleHDA will be the solution for ever and for all. That is way I started coding some months ago a generic HD Audio Driver that will not need any messy plists. AppleHDA was made only with some codecs in mind and can give a lot of different problems with some chipsets and audio codecs. Maybe Ill release a more 'smart' patcher that one click does it all or maybe Ill just continue what I was working on before I got sick, the generic 'smart' audio driver to replace AppleHDA.
.....
Since Ive started my own sound driver I realized most of the problems and issues I expect (and will expect) in the present and future with AppleHDA.kext. Even the last months before I got sick, while testing on 3 different chipsets and audio codecs I got several issues to take in consideration because the driver behaved different on the three chipsets ICH7 with ALC882, ICH8 with AD1988b and ICH9 with ALC889a. This a very complex and time consuming driver and I have no estimated date for release. The driver will have lots of additional stuff and will work will real macs also.
I just hope I recover well and can continue working on it, it would be a shame to loose all the time I spend coding it until a few months back.
........
I think all the info is welcome and I think Im helping with this post on something....I hope.

About DSDT, I posted that trick keeping in mind the future Snow Leopard, and as I mentioned this step can be done only if the sound works 100% and patching hda on that codec is closed subject. You are right about AZAL->HDEF, in my case was HDAC or on my desktop was no entry for sound in DSDT so I added HDEF entry.
I still didn't figured out a way to replace the hdacontroller and hdaplatform plists on the fly w/o those ugly dependencies errors on boot or how to inject them using DSDT.
I did some research on my other board(P5K3 Deluxe ICH9R) with AD1988b using same method, so far I got 5.1 analog out and anemic mic in w/o volume controll on it and digital in/out(not tested). I didn't have much time to play with it since my focus is on my lappie(notebook's as far more PITA)

I agree that a dedicated driver is the best solution, I heard that other dev's are doing something on porting/writing a new driver, but until then we still have to mess with HDA..and get how much is possible from it, and that was the main reason for me to write this guide since is impossible for 1-2 people to fix so much codecs on so many configurations...

I hope you will recover soon.

#123
THe KiNG

THe KiNG

    InsanelyMac Legend

  • Gurus
  • 674 posts
  • Gender:Male

http://helllabs.org/codecgraph/ doesn't work :angry:(((

Could anyone upload codecgraph here ?

Cheers. :P

Here it is: Codecgraph & ConvertHexToDec.rb
I hope the reason for site down is for update ... :D

#124
Guest: BuildSmart_*

Guest: BuildSmart_*
  • Guests

One advice to people with curiosity in audio and PinConfigurations, there is no need to setup them up on DSDT (do it if you want to). I just changed AZAL to HDEF and I used a couple of plists for AppleHDA to send the correct verbs to the audio codec.
PinConfigurations also knows as codec verbs are used and sent when AppleHDA establishes a link to the audio codec. And that happens with AppleHDAController, I dont see a way of DSDT editing to make some miracles I did with some codecs, like 1988b, alc861, etc... Most of them use special codec verbs to do other audio codecs setups. You can get the idea with alsa source of from some xp and vista drivers that come with codecs verbs that not only set pin configs right but also enables sound on some muted systems.
PinConfigurations are a small part of all the Codec Verbs Power !!!
If the codec verbs are set right on AppleHDAController info.plist even the PinConfigurations will be filled out if its property value is empty.
As I said before, I dont think AppleHDA will be the solution for ever and for all. That is way I started coding some months ago a generic HD Audio Driver that will not need any messy plists. AppleHDA was made only with some codecs in mind and can give a lot of different problems with some chipsets and audio codecs. Maybe Ill release a more 'smart' patcher that one click does it all or maybe Ill just continue what I was working on before I got sick, the generic 'smart' audio driver to replace AppleHDA. Most sound issues will continue without a proper driver made for PC's in mind. I think most of you will agree with what Im saying. Why most recent Realtek codecs work and some others ? Because they are very similar in pin nids, mixers, adcs and dacs and AppleHDA supports some of them with some changes. AppleHDA is always changing and things gets more hard to fix. Motherboard chipset incompatibilities, audio codecs not totally supported by AppleHDA, etc....

Since Ive started my own sound driver I realized most of the problems and issues I expect (and will expect) in the present and future with AppleHDA.kext. Even the last months before I got sick, while testing on 3 different chipsets and audio codecs I got several issues to take in consideration because the driver behaved different on the three chipsets ICH7 with ALC882, ICH8 with AD1988b and ICH9 with ALC889a. This a very complex and time consuming driver and I have no estimated date for release. The driver will have lots of additional stuff and will work will real macs also.
I just hope I recover well and can continue working on it, it would be a shame to loose all the time I spend coding it until a few months back.

I dont know if any of this makes sense to any of you guys, also, Im too drugged to think right and maybe my point of view, informations and suggestions dont make much sense. My head is still a little screwed up at the moment.

I think all the info is welcome and I think Im helping with this post on something....I hope.

First, sorry to hear of your ill-health and hoe you make a speedy recovery.

None of this shows any working audio with sigmatel STAC9274D or STAC9221D-A2 (or other common sigmatel chipsets).

What I do know is DSDT can provide data to not only the device but to drivers that load so claiming that DSDT modification is pointless or has little validity makes no sense.

You modify plist file data to make audio work, DSDT can supply the modified data so plist modification is not required so how can you say that this isn't useful or wont make any difference?

The fact that I work from limited data is the reason to obtain a working solution in the chipsets I do have so I can work it into DSDT and the failure to have one is the delaying factor in advancement of audio.

For me, the issue at hand before a full working DSDT solution can be provided is to be able to have a working sigmatel audio that is nothing more than plist modification and not one person has been able to show it despite the claims to have achieved this at some time.

I can't work on audio I don't have and while some have claimed to make audio for sigmatel work by plist modification, there is always some underlying excuse why it cannot be shown now.

Once a working solution has been provided for the sigmatel audio I do have, it can then be moved to DSDT and then allow progress for other sigmatel audio chipsets and even into ALC8xx (which I understand requires less work to make work natively) but I can't/wont spend the time making audio for a chipset I don't have work cause I have no way of testing it and relying on someone else with limited knowledge to test the work is difficult at best because anyone with knowledge/experience to figure some things out with a faulty boot caused by a mistake has better things to do with their time than to be on call to test potential solutions on-demand.

#125
THe KiNG

THe KiNG

    InsanelyMac Legend

  • Gurus
  • 674 posts
  • Gender:Male

None of this shows any working audio with sigmatel STAC9274D or STAC9221D-A2 (or other common sigmatel chipsets).
I did some tests on Sigmatel and what I can tell is that is possible to make it working!
AFAIK is hard for me to do it w/o that hardware(require lots of tests...)
Here is an example on what I did so far:

Codec: SigmaTel STAC9228
Address: 0
Vendor Id: 0x83847616
Subsystem Id: 0x10280209
Revision Id: 0x100201

Node 0x0a pin default 0x0221101f - [Jack] HP Out at Ext Front
VERBS 00a71c1f 00a71d10 00a71e21 00a71f02 
Node 0x0c pin default 0x90a79130 - [Fixed] Mic at Int N/A
VERBS 00c71c30 00c71d91 00c71ea7 00c71f90 
Node 0x0d pin default 0x90170110 - [Fixed] Speaker at Int N/A
VERBS 00d71c10 00d71d01 00d71e17 00d71f90 
Node 0x0e pin default 0x02a79130 - [Jack] Mic at Ext Front
VERBS 00e71c30 00e71d91 00e71ea7 00e71f02 
Node 0x0f pin default 0x0227011f - [Jack] HP Out at Ext Front
VERBS 00f71c1f 00f71d01 00f71e27 00f71f02 
Node 0x13 pin default 0x90a60040 - [Fixed] Mic at Int N/A
VERBS 01371c40 01371d00 01371ea6 01371f90 
Node 0x21 pin default 0x01442070 - [Jack] SPDIF Out at Ext Rear
VERBS 02171c70 02171d20 02171e44 02171f01 
Node 0x22 pin default 0x40f000f6 - [N/A] Other at Ext N/A
VERBS 02271cf6 02271d00 02271ef0 02271f40 

<00a71c30 00a71d40 00a71e21 00a71f01 00d71c40 00d71d01 00d71e10 00d71f90 00f71c20 00f71d10 00f71e21 00f71f01 02171c60 02171d01 02171e41 02171f01 00e71c50 00e71d90 00e71ea1 00e71f01 00c71c10 00c71d01 00c71ea0 00c71f90 02271cf0 02271d11 02271e56 02271f10>
Sigmatel and/or other codecs can be fixed using right verbs and plist's

What I do know is DSDT can provide data to not only the device but to drivers that load so claiming that DSDT modification is pointless or has little validity makes no sense.
Can you explain/show how?

For me, the issue at hand before a full working DSDT solution can be provided is to be able to have a working sigmatel audio that is nothing more than plist modification and not one person has been able to show it despite the claims to have achieved this at some time.

Once a working solution has been provided for the sigmatel audio I do have, it can then be moved to DSDT and then allow progress for other sigmatel audio chipsets and even into ALC8xx (which I understand requires less work to make work natively) but I can't/wont spend the time making audio for a chipset I don't have work cause I have no way of testing it and relying on someone else with limited knowledge to test the work is difficult at best because anyone with knowledge/experience to figure some things out with a faulty boot caused by a mistake has better things to do with their time than to be on call to test potential solutions on-demand.



#126
Guest: BuildSmart_*

Guest: BuildSmart_*
  • Guests
Funny but you were one of the ones who said you made it work at one time with sigmatel and now you offer generating the PinConfiguration data as a partial solution, that isn't a working solution and as a stop gap I already export the PinConfiguration from DSDT using the 10.4 modified AppleHDA.kext until a solution becomes present that I can move into DSDT and get away from modifying plist files.

Explain what/how, if you want to see examples of DSDT exporting data just look at the current DSDT, it has several examples of data injection.

#127
THe KiNG

THe KiNG

    InsanelyMac Legend

  • Gurus
  • 674 posts
  • Gender:Male

Funny but you were one of the ones who said you made it work at one time with sigmatel and now you offer generating the PinConfiguration data as a partial solution, that isn't a working solution and as a stop gap I already export the PinConfiguration from DSDT using the 10.4 modified AppleHDA.kext until a solution becomes present that I can move into DSDT and get away from modifying plist files.

Explain what/how, if you want to see examples of DSDT exporting data just look at the current DSDT, it has several examples of data injection.

I think you are confusing me with someone else...
What I did (working kexts/fix) is in this guide, that example was to show you just a part(save space here) on how it can be done, and you are confusing things... "PinConfigurations" does nothing more then printing in system profiler info w/o hdacontroller injection/fix!
And I tried to inject the rest of missing data w/o luck, and stop treating me as a n00b, at least on sound I'm not.
You have attached the complete SigmaTel STAC9228 set, is not 100% fixed is just to show u what needs to be injected in plus...
If you can give me screen access 24/7 on that BadAxe box I can try to fix it, or u can come on irc and find me...

Attached Files



#128
 Mysticus C*

 Mysticus C*

    InsanelyMac Deity

  • Members
  • PipPipPipPipPipPipPipPipPipPip
  • 2,280 posts
  • Location:Seyfert's Sextet
hey thee the king:

I have made codec dump+codec hex to dec+made pin configs applied it to the system in applehda.kext (included is also plugins/hdaenabler) but sound dont work...

I am attaching the everything i found and the modded hda, if you can take a look at it and tell me which part is wrong, because this whole thing is a bit confusing at some parts... i still made the kext but doesnt wanna load/work...

before you look at the attachment maybe you may have an opinion already so here it is: This is a Realtek 027210ec card (it works with azalia audio driver, which makes me think that the codec maybe transfered or altered/modified to work with hda.kext... i read somewhere that codec of 272 is new and it may be not supported by hda ?) if you think it can work please take a look at the driver and tell me if there is anything wrong or needs to be modified?

Attached are:
+ codec dump from linux
+ codec hex t0 dec convertion
+ pin configs i found i believe right when it may be wrong?
+ configdata
+ patched hda incl hdaenabler
=============================
So what do you suggest with the attached information mate? thanx

Attached Files



#129
coconup

coconup

    InsanelyMac Geek

  • Members
  • PipPipPipPip
  • 190 posts
any idea of why I get full audio in and out with a very old kext (10.4.9) while I get nothing at all using the same procedure on the latest kexts? (same pin config, verbs and so on)

I have an alc883 address 0 on a gm965 motherboard (laptop)

#130
MacNutty

MacNutty

    Mad for Mac

  • Members
  • PipPipPipPipPipPipPip
  • 648 posts
  • Gender:Male
  • Location:India
I tried using your ALC888/S/T for desktop with patched AppleHDA.kext, speaker works but no headphone and mic, no front jacks too. Can you post the complete AppleHDA.kext for ALC888/S/T? I am having:

Intel High Definition Audio subsystem in the following configuration:
  • 6-channel (5.1) audio subsystem using the Realtek ALC888* audio codec


#131
THe KiNG

THe KiNG

    InsanelyMac Legend

  • Gurus
  • 674 posts
  • Gender:Male

I tried using your ALC888/S/T for desktop with patched AppleHDA.kext,....

Where did I say to use it with patched AppleHDA.kext??
I say to use it with vanilla(that mean original one) in place! ;)

#132
 Mysticus C*

 Mysticus C*

    InsanelyMac Deity

  • Members
  • PipPipPipPipPipPipPipPipPipPip
  • 2,280 posts
  • Location:Seyfert's Sextet
The king:
do you know what does

Sound assertion "0 == fInterruptSource" failed in "/SourceCache/AppleHDA/AppleHDA-157.1.24/AppleHDAController/AppleHDAController.cpp" at line 215 goto Exit1

error means?

i made all the corrections and insertions correctly, but codec 027210ec refusing to load,

#133
MacNutty

MacNutty

    Mad for Mac

  • Members
  • PipPipPipPipPipPipPip
  • 648 posts
  • Gender:Male
  • Location:India

Where did I say to use it with patched AppleHDA.kext??
I say to use it with vanilla(that mean original one) in place! :)


I already have vanilla, do you mean that I should use the original AppleHDA.kext? Please suggest.

#134
cparm

cparm

    InsanelyMac Legend

  • Retired
  • 997 posts
  • Gender:Male
@P35-DS3L users

here is the 10.5.6 patched applehda (with 5.1 analog support)

#135
triple675

triple675

    InsanelyMac Protégé

  • Members
  • Pip
  • 39 posts

@P35-DS3L users

here is the 10.5.6 patched applehda (with 5.1 analog support)


I'm trying this on my EFI partition boot install. I hope it works.

EDIT: Doesn't work if I place it in EFI/Extensions but works in /S/L/E. Maybe I should try modifying the LegacyHDA*.kext. Interesting observation...with HDAEnabler.kext in EFI/Extensions with vanilla (10.5.6) AppleHDA.kext the Audio ID is 888 under System Profiler, but with your patched AppleHDA.kext the Audio ID is 12. Any ideas? Thanks!

#136
ac3bcn

ac3bcn

    InsanelyMac Protégé

  • Members
  • PipPip
  • 67 posts
  • Gender:Male
  • Location:ESP

@P35-DS3L users

here is the 10.5.6 patched applehda (with 5.1 analog support)

Hi, cparm, could you explain how did you patched ? Any special care?
I have an 889a on my EP35DS3P, I tried to patch following The King guide without succes.I have assertion errors. With the previous version had no problems.
After Update to 10.5.6 my Legacy Kexts (plist only) stop working, even patched AppleHDA.kext from 10.5.5 give me assertion errors now in 10.5.6.
Any Ideas?

thanks

SOLVED: With Stipckin Legacy Kexts.

#137
 Mysticus C*

 Mysticus C*

    InsanelyMac Deity

  • Members
  • PipPipPipPipPipPipPipPipPipPip
  • 2,280 posts
  • Location:Seyfert's Sextet
i dont want to be mean, but what is the point of making a topic if you dont answer people at all with usefull constructive comments...

you provided so much information and all mixed up, one showing up graphicx other vista etc... and you dont even take 5- mins to answer people...

the method you provided does not mention how many codecs are provided in the hda driver, guess you have to try by hard way...

another thing is when you do a test, and wanna make another one, you have to remove /s/l/e/caches/com* and /s/l/extensions.mkext in order for new kext to load else it grabs previous caches and causes a nice mixture of soup...

your method works to certain degree (if you are lucky like yourself) with built in supported codecs for drivers and you fail to mention any further information or provide any further help....

it is appreciated that you put down some information you COLLECTED/GRABBED from other sources, but it is useless if you dont provide further help...

#138
macgirl

macgirl

    Stargate's Pharaoh

  • Retired
  • 7,612 posts
  • Gender:Female
  • Location:Mexico City
  • Interests:Techie gadgets

@P35-DS3L users

here is the 10.5.6 patched applehda (with 5.1 analog support)

Thanks, it work.

I do not use it because I need headphones sometimes :)

#139
ar4er

ar4er

    InsanelyMac Protégé

  • Members
  • Pip
  • 34 posts
  • Gender:Male
  • Location:Donetsk, Ukraine
real run VIA VT1708B at 5.1 or 7.1?

#140
coconup

coconup

    InsanelyMac Geek

  • Members
  • PipPipPipPip
  • 190 posts

I finally figured out how to get internal mic working!
I'm too tired to explain what I did now, but I will edit later...


so, can you explain how did u do?





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