Jump to content

AppleALC — dynamic AppleHDA patching


vit9696
5,390 posts in this topic

Recommended Posts

3 hours ago, Speaker007 said:

Acer Aspire E5-571G-50XE
ALC283
_____

Layout-id 1 - works only Headphones (very good), No Internal Sound, no mic.
Layout-id 3 - Internal Speaker - OK, Mic - OK, Headphones - cracking

Layout-id 11 - Internal Speaker - OK, Mic - OK, Headphones - cracking 

Layout-id 66 - Internal Speaker -OK, Headphones - cracking, no mic.

It's possible to fix it ?

 

Mic from id 1 + id 3 or something else...

 

Could be an issue with the pin config data for your codec.

 

Try doing a Codec dump in Linux and consolidate your codec verbs, then paste the consolidated verbs into pin configurator, apply fix and generate corrected pin config data.

Finally replace the the pin config data in Layout 3 of ALC283 in AppleALC's info.plist with your generated pin config data.

 

You can find guides on how to do all of this in these forums, just search for the appropriate terms.

 

Cheers

Jay

Link to comment
Share on other sites

30 minutes ago, jaymonkey said:

 

Could be an issue with the pin config data for your codec.

 

Try doing a Codec dump in Linux and consolidate your codec verbs, then paste the consolidated verbs into pin configurator, apply fix and generate corrected pin config data.

Finally replace the the pin config data in Layout 3 of ALC283 in AppleALC's info.plist with your generated pin config data.

 

You can find guides on how to do all of this in these forums, just search for the appropriate terms.

 

Cheers

Jay

 

Could you mention a good one? :)

 

I'm trying to get my layout id fixed and...I couldn't find a complete guide on how to do this for AppleALC. I found plenty for patching AppleHDA (which is similar, but not quite the same thing). And I don't want to mess with that. I just want to compile an AppleALC kext for my motherboard layout. Shouldn't be that hard, should it? I suppose the problem in my case are probably the resources (LayoutID.xml and Platforms.xml). Also, I never understood why a specific Layout ID needs to be used. I mean, in this case, why 3? Why not 66? How do you choose? You flip a coin? There has to be some sort of reasoning behind it. But nobody seems to either know it, or explain it.

 

I wish someone could point me to the right direction. I'm probably pretty close to getting this done. But it just doesn't work. And I don't know why. I tried taking examples from the other layout IDs for my codec, but nothing worked. And there are so many things that I don't understand why are they used. Or where do they come from. I feel there might be an easier way to accomplish what I want (which is just a better mapping of my ports for my particular motherboard). But I couldn't find a complete tutorial. I learned some things form one tutorial, others from other tutorials. But I couldn't find any tutorial to learn how to do it from A to Z. From the beginning which is taking a codec dump, to compiling AppleALC into a kext. I know that would probably be a huge thread. But there are too many missing informations right now. Too many variables to change. And it's getting really frustrating.

Edited by arsradu
  • Like 1
Link to comment
Share on other sites

I'm also having some issues with my ALC887 on Mojave with AppleALC.kext (v.1.3.2) and Lilu.kext (v.1.2.7). No sound and no outputs (or inputs) in System Preferences -> Sound. I only see DisplayPort in System Information -> Sound.

 

Same config.plist (layout-id 1) and kext versions work fine on High Sierra. I boot with -lilubeta -alcbeta on Mojave although I don't think -lilubeta is needed. 

 

alc-layout-id is <01 00 00 00>

layout-id is <07 00 00 00>

 

Values are the same between High Sierra and Mojave.

 

Any advice? Please let me know if any additional information is needed.

Edited by yobro
Link to comment
Share on other sites

23 hours ago, arsradu said:

 

Could you mention a good one? :)

 

I'm trying to get my layout id fixed and...I couldn't find a complete guide on how to do this for AppleALC. I found plenty for patching AppleHDA (which is similar, but not quite the same thing). And I don't want to mess with that. I just want to compile an AppleALC kext for my motherboard layout. Shouldn't be that hard, should it? I suppose the problem in my case are probably the resources (LayoutID.xml and Platforms.xml). Also, I never understood why a specific Layout ID needs to be used. I mean, in this case, why 3? Why not 66? How do you choose? You flip a coin? There has to be some sort of reasoning behind it. But nobody seems to either know it, or explain it.

 

I wish someone could point me to the right direction. I'm probably pretty close to getting this done. But it just doesn't work. And I don't know why. I tried taking examples from the other layout IDs for my codec, but nothing worked. And there are so many things that I don't understand why are they used. Or where do they come from. I feel there might be an easier way to accomplish what I want (which is just a better mapping of my ports for my particular motherboard). But I couldn't find a complete tutorial. I learned some things form one tutorial, others from other tutorials. But I couldn't find any tutorial to learn how to do it from A to Z. From the beginning which is taking a codec dump, to compiling AppleALC into a kext. I know that would probably be a huge thread. But there are too many missing informations right now. Too many variables to change. And it's getting really frustrating.

 

AppleHDA patching is probably one of the most complex and in depth processes one can choose to learn in the Hackingtosh world, I only understand a very small part of it namely setting the pin config data.

Even with well written guides it's still very complex if your new to it, there are a few AppleHDA patching masters and guru's in this area and if you need more specific help I suggest sending a PM to one of them.

 

The most complete guide i know of is the one written by EMlyDinEsH here :-

 

https://osxlatitude.com/forums/topic/1946-complete-applehda-patching-guide/


Its old but still very valid as nothing has really changed in the process and although it's written as a AppleHDA patching guide everything in there is relevant to AppleALC, put rather simply AppleALC is basically a AppleHDA patching engine, with an internal database of patches, layout and platforms files for all the codecs that it supports. If you create a new layout then you simply need to add it to the relevant codec folder in the AppleALC source and add a few lines to the relevant info.plist which defines the new layout's id, platform and layout files to use. Some information on this is in the AppleALC wiki.

 

 If you just need to collect and set the pin config data then this guide by MacPeet may be a better option :-

 

https://www.root86.com/blog/40/entry-51-guide-anleitung-patch-applehda/ (it's in German but if you use chrome it will automatically translate it for you)

 

Cheers

Jay

 

 

  • Like 3
  • Thanks 1
Link to comment
Share on other sites

29 minutes ago, jaymonkey said:

 

AppleHDA patching is probably one of the most complex and in depth processes one can choose to learn in the Hackingtosh world, I only understand a very small part of it namely setting the pin config data.

Even with well written guides it's still very complex if your new to it, there are a few AppleHDA patching masters and guru's in this area and if you need more specific help I suggest sending a PM to one of them.

 

The most complete guide i know of is the one written by EMlyDinEsH here :-

 

https://osxlatitude.com/forums/topic/1946-complete-applehda-patching-guide/


Its old but still very valid as nothing has really changed in the process and although it's written as a AppleHDA patching guide everything in there is relevant to AppleALC, put rather simply AppleALC is basically a AppleHDA patching engine, with an internal database of patches, layout and platforms files for all the codecs that it supports. If you create a new layout then you simply need to add it to the relevant codec folder in the AppleALC source and add a few lines to the relevant info.plist which defines the new layout's id, platform and layout files to use. Some information on this is in the AppleALC wiki.

 

 If you just need to collect and set the pin config data then this guide by MacPeet may be a better option :-

 

https://www.root86.com/blog/40/entry-51-guide-anleitung-patch-applehda/ (it's in German but if you use chrome it will automatically translate it for you)

 

Cheers

Jay

 

 

 

Thanks a lot!

 

You would probably be surprised to know that I've actually read both of them. And I actually started this journey on the AppleALC wiki page. :) So yeah...I did some research on this, as well. :D It's not like I waited for someone to do it for me. And this is actually more about learning how to do it, than fixing the actual layout. I love to learn! And this has proven to be pretty damn challenging to learn. Also, I found the first tutorial to be mind boggling hard, though very detailed, maybe too detailed (especially for someone with 0 experience and knowledge in this area) and the second one, credit to MacPeet, really, really good, a lot more accessible and easier to understand (especially after the first one. :))) .

 

Still, I must be doing something wrong, or trying to do more than I should, or not doing something...cause I can't seem to get it to work. I get no sound and no options in System Preferences... I also thought it should be easier, since I'm not actually adding an entirely new codec, but rather just a new layout to an existing one. But yeah, so far, no luck. And, judging from what you said above, I guess I'm doing more than I should... So I'm breaking something by trying too hard. I just don't know what that is. Everything seems in order. It just...doesn't work..

 

Thank you very much for the suggestions. :)

Edited by arsradu
Link to comment
Share on other sites

4 hours ago, arsradu said:

.... I love to learn! And this has proven to be pretty damn challenging to learn. Also, I found the first tutorial to be mind boggling hard, though very detailed, maybe too detailed (especially for someone with 0 experience and knowledge in this area) and the second one, credit to MacPeet, really, really good, a lot more accessible and easier to understand .....

 

@arsradu

 

@MacPeet lives in these forums so maybe you could try sending him a PM along with info on what your trying to do .....

He's a good guy, he had a go at trying to solve an issue i was having (which is still on going)  a month or so ago, just be patent ... these guys have day jobs too !!!

 

Cheers

Jay

Link to comment
Share on other sites

Hey, using High Sierra & ALC887  for a long time with AppleALC with my headphones connected to the front audio jack and speakers connected to the back audio jack.

My headphones and Internal speakers use the same output when opening the Audio menubar.

 

If my headphones are connected sounds works only through the headphones using the "Headphones" output. If I remove the headphones connector, the headphones output is changing to "Internal speakers". Selecting it will output audio through the speakers.

 

I'd like to be able to switch between outputs without removing the headphones connector.

 

Is there any solution to this?

Edited by Shasoosh
Link to comment
Share on other sites

Use another output on your mainboard backpanel if you have 6 audio jacks...

Since a couple of those are inputs, look for the Black or Grey jack.

Then switch within "System Preferences"->"Sound"->"Output" and try both "Line Out" entries.

 

Link to comment
Share on other sites

15 hours ago, al6042 said:

Use another output on your mainboard backpanel if you have 6 audio jacks...

Since a couple of those are inputs, look for the Black or Grey jack.

Then switch within "System Preferences"->"Sound"->"Output" and try both "Line Out" entries.

 

Thanks, I only have 3 outputs. Pink, blue and Green. 

Link to comment
Share on other sites

Any reason as to why HDMI patches were removed?

 

I added them back to Clover... but it took me some time to discover why HDMI audio broke after the update!!!

 

It might be worth mentioning this somewhere to help out users who use HDMI 

Link to comment
Share on other sites

12 hours ago, Shasoosh said:

It works! Awesome! Thanks!

 

Would you mind telling me what you changed in the source code for me to maintain in future AppleALC versions?

I just rearranged the nodes that the devices are disconnected instead of switching automatically.

In a previous post, you said that your mainboard has only one output, since there are already two layouts without auto switching, I would suggest trying layout 11 and 50. Layout-id 1 is for 5.1 speakers and you have 2 non-functioning devices. If layout 11 or 50 does not meet your requirements, I can create a new layout and upload it so that vit9696/vandroiy can add it to the ALC source.

  • Like 4
Link to comment
Share on other sites

@arsradu

I can not upload via PM.

 

Quote: Also, do I need to add both xml and xml.zlib files for both layout11 and Platforms11?
No. In current source AppleALC-master the insertion of the xml files is sufficient.
The xml.zlib are created automatically when compiling with xcode.

 

Your Info.plist (PinConfigs): Miss your Pinconfig entry
Your layout11.xml: LineOut entry is missing
Your Platforms11.xml: has errors (duplicate entries in the inputs)

 

Try using these files:

Archiv.zip

 

PinConfig.png.84aff6acd7d5a6f59ad49b909e44a826.png

 

01471C10 01471D40 01471E11 01471F91 01470C02 01B71C20 01B71D40 01B71E21 01B71F02 01B70C02 01571C50 01571D10 01571E01 01571F01 01671C60 01671D60 01671E01 01671F01 01771C70 01771D20 01771E01 01771F01 01971C80 01971D90 01971E81 01971F02 01A71C90 01A71D30 01A71E81 01A71F01


Speaker and HP have EAPD: 2
Mic's configured as LineIn

 

- Info.plist (PinConfigs) to AppleALC-master/Resources/PinConfigs.kext/Contents/
- Info.plist, layout11.xml and Platforms11.xml (ALC892) to AppleALC-master/Resources/ALC892/
- delete old layout11.xml.zlib and Platforms11.xml.zlib
- compile new with xcode

  • Like 1
Link to comment
Share on other sites

6 hours ago, insanelyDeepak said:

@jaymonkey Hi try these versions layout 13, if both fails , i request you to come to traditional ways of test cloverHDA or patched AppleHDA 

 

 

Many thanks DP,

 

Am away from home at the moment but should be able to test later today.

 

Cheers

Jay

Link to comment
Share on other sites

3 hours ago, MacPeet said:

arsradu

I can not upload via PM.

 

Quote: Also, do I need to add both xml and xml.zlib files for both layout11 and Platforms11?
No. In current source AppleALC-master the insertion of the xml files is sufficient.
The xml.zlib are created automatically when compiling with xcode.

 

Your Info.plist (PinConfigs): Miss your Pinconfig entry
Your layout11.xml: LineOut entry is missing
Your Platforms11.xml: has errors (duplicate entries in the inputs)

 

Try using these files:

Archiv.zip

 

PinConfig.png.84aff6acd7d5a6f59ad49b909e44a826.png

 

01471C10 01471D40 01471E11 01471F91 01470C02 01B71C20 01B71D40 01B71E21 01B71F02 01B70C02 01571C50 01571D10 01571E01 01571F01 01671C60 01671D60 01671E01 01671F01 01771C70 01771D20 01771E01 01771F01 01971C80 01971D90 01971E81 01971F02 01A71C90 01A71D30 01A71E81 01A71F01


Speaker and HP have EAPD: 2
Mic's configured as LineIn

 

- Info.plist (PinConfigs) to AppleALC-master/Resources/PinConfigs.kext/Contents/
- Info.plist, layout11.xml and Platforms11.xml (ALC892) to AppleALC-master/Resources/ALC892/
- delete old layout11.xml.zlib and Platforms11.xml.zlib
- compile new with xcode

 

With the attached files, at first I didn't have sound with Internal Speakers option. The layout itself was present (1 internal speaker & 3 Line Outs), but no actual sound with the Internal Speakers option.

 

Turns out there was a duplicated entry in PinConfig.kext -> Info.plist. It was present at line 24 and 204 (as per your screenshot). :) 

So I removed my entry and recompiled, leaving only your entry. And that fixed the problem.

 

31354960_Screenshot2018-09-23at17_00_12.png.2d959f8b96ac2b864f2f6848c5463e33.png

 

And with that, I also saw some differences between my attempt and your editing.

 

So far so good! :D Now I'll just have to take a look at the points you mentioned above and learn how to do it better in the future. Cause you're a wizard. And I've got so much to learn from you.

 

@MacPeet, many, many thanks for this!

 

Edited by arsradu
Link to comment
Share on other sites

×
×
  • Create New...