Jump to content

AppleALC — dynamic AppleHDA patching


vit9696
5,371 posts in this topic

Recommended Posts

7 hours ago, ammoune78 said:

I think it's just an _DSM Method that need to be changed with the DSDT for iOREG you showed, change that _DSM because I had same thing for my Laptop when I changed the _DSM the HDEF reappeared and worked with AppleALC, you can see it in few posts ago here!

What would I change it to though? Changed it to XDSM with no result.

4 hours ago, Dr. Hurt said:

 

Did you apply the IRQ fix to your DSDT? (Check rehabman’s DSDT patches on fithub).

For me, AppleHDA refused to load without that patch.

Yeah I've added it but still not working.

Link to comment
Share on other sites

1 hour ago, Shaneee said:

What would I change it to though? Changed it to XDSM with no result.

Yeah I've added it but still not working.

Excuse me my english is in learning mode :( :D, but what i meant isn't to change _DSM to XDSM, no but i just talked about changing that _DSM Method it self like this example:

 On my HP Laptop i had null result with AppleALC using this _DSM:

#
# IDT 92HD91BXX
# Fix HDEF device for the IDT 92HD91BXX audio codec
into method label _DSM parent_label HDEF remove_entry;
into device label HDEF insert begin
Method (_DSM, 4, NotSerialized)\n
{\n
	Store (Package () {\n
		"device_type", Buffer () {"IDT 92HD91BXX"},\n
		"codec-id", Buffer (0x04) {0x11,0x76,0x1D,0x11},\n
		"layout-id", Buffer (0x04) {0x01,0x00,0x00,0x00},\n
		"PinConfigurations", Buffer (Zero) {},\n
		"MaximumBootBeepVolume", Buffer(One) {0x00},\n
		"MultiEQDevicesPresence", Buffer () {0x00,0x00,0x01,0x00},\n
	}, Local0)\n
	DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))\n
	Return (Local0)\n
}\n
end;

Assuming that this method _DSM work on my Desktop, but after getting help from chris1111 "thanks" he pointed me about RehabMan Audio patch which it use this:

#   Inject Audio info
into method label _DSM parent_label HDEF remove_entry;
into device label HDEF insert
begin
Method (_DSM, 4, NotSerialized)\n
{\n
    If (LEqual (Arg2, Zero)) { Return (Buffer() { 0x03 } ) }\n
    Return (Package()\n
    {\n
        "layout-id", Buffer() { 84, 0x00, 0x00, 0x00 },\n
        "hda-gfx", Buffer() { "onboard-1" },\n
        "PinConfigurations", Buffer() { },\n
        //"MaximumBootBeepVolume", 77,\n
    })\n
}\n
end;

And it worked

So I think that if you change the actual _DSM Method that you use maybe you'll have sound working and the good way is to continue from the DSDT that showed on iOREG HDEF device that it was loaded

Link to comment
Share on other sites

@MacPeet, hey dude, please here's my IDT 92HD91BXX codec dump from linux if you can:

codec_dump.txt

I know it maybe disturb you to just make a translation from German about that guide you just linked previously, I learned German in the Tourist institute but it's gone many years ago it was in 2001, and as I have no one with who I can speak German, so this language decided to go out from my mind day after day Hhh, i still know the basically basic, but the other things has gone! But it's much more useful to us, because we will be able to add more codecs to the DataBase of the AppleALC and by the way different users will have more support for their Codecs, in my point I'm telling that because sometimes i work with an friend of mine here in MOROCCO that sell Computer Parts such as motherboards, CPU's and all the things we know, i build and install for him many PC's if he need someone to do it because of lot of work!

So it will be good enough if we know how to do it from codec_dump step to the last, for me it's pleasure, and this will be my little contribution to that Effort you made (coders and Vit9696)

Link to comment
Share on other sites

10 hours ago, MacPeet said:

@jin2k9

Try this:

Trial_CX20641_LayoutID11_(0B).zip

AppleALC and Lilu in Clovers /other folder
original AppleHDA in S/L/E is required
delete all VoodooHDA files
KextInject "YES" in Clover

Inject via Clover:
Inject 11 and set FixHDA

Inject via DSDT:
DSDT / HDEF is 0B (= 11) not set FixHDA in Clover

your dump:

CX20641.png.aaae2dad42b1dba91e47017f0142f7b0.png

Nodes:

28 - 16
25 - 17
20 - 26
21 - 27

Both first attempts in ManualMode!

 

If it works later in SwitchMode configuration!

have fun :D

Wow ! The soundcard works ! I have not tried the microphone yet as I need to find a microphone to test it out. But Line Out works great ! Thank you very much !!! =)

  • Like 1
Link to comment
Share on other sites

Ok I can confirm that the blue Line In port in the back is working(used a 3,5mm cable connected to my phone playing music, which gets picked up properly in Audacity and the VU meter in the settings). The front mic port, for whatever reason doesn't pick up any sounds at all. Any ideas what's wrong?

Although, to be fair, microphone/line-in is not a priority for me. If I happen to need to do some recordings, I would use a USB mic anyway. So it would be nice to have all the inputs working just in case some other user with the same codec would need it sometime in the future...

Edited by junoir
Link to comment
Share on other sites

@jin2k9 and @junoir

for both - try this:

Trial_CX20641_and_CX20642_LayoutID11_(0B)_and LayoutID13_(0D).zip

LayoutID 11 (0B) - ManualMode as before

LayoutID 13 (0D) - SwitchMode

In ManualMode both devices (LineOut and Headphones) are visible in the sound settings. You have to choose manually.

In SwitchMode, LineOut (back green) is configured as internal speaker. This allows automatic detection and switching if you plug in the headphones at the front.

This trial version is not in the AppleALC release yet.
For the release I need exact information.

Which computers do you have exactly?

ManualMode:
LineOut back and headphones work in front?
Input's?

SwitchMode:
IntSpeaker (LineOut back) works and the automatic switching works when headphones are plugged in?
Input's?

Input's you can also test with iPhone or other phone via jack to jack cable, if you do not have a mic.

Quote @junoir:
Great thanks, gonna give it a try and report back. One thing I don't get though, don't I have to also figure out a correct path map for each node for this to work? Or are there preconfigured correct layout ids that make this unnecessary?

You do not have to patch anything anymore. I did everything.
The pictures and nodes were for your information.

 

@ammoune78

Codecs for IDT92HD91BXX already available in the AppleALC release.
LayoutID 3, 12, 13, 33 and 84
all codecs tried? Is your audio not working? I can watch the dump if you have no sound.

I do not quite understand. You would like to create a translation of my tutorial? With indication of the source no problem.
My english is not perfect, sorry.

The tutorial is older, for patch AppleHDA. Many steps are no longer necessary for AppleALC. Much easier with AppleALC.

Link to comment
Share on other sites

Awesome news, SwitchMode works perfectly too, thanks. Here's a spec sheet of my system(pre-built SFF Fujitsu) http://www.fujitsu.com/be/Images/prel-ds-ESPRIMO-E910-E90.pdf

As far as outputs go, it's all smooth sailing. Regarding inputs, nothing changed with the new kext. The pink microphone input in the back and the mic input in the front still don't work(just the blue line-in does).

  • Like 1
Link to comment
Share on other sites

@ammoune78 Thanks for the help but nothing seems to be working. I'll go back to VoodooHDA for now and try again at some other time.

 

@MacPeet Would you be able to help out? HDEF is in DSDT but no Audio. Turns out AppleHDA isn't getting loaded either. Here is a dump from Linux in the hope it helps.

 

codec_dump.txt.zip

Link to comment
Share on other sites

2 hours ago, Shaneee said:

 

Would you be able to help out? HDEF is in DSDT but no Audio. Turns out AppleHDA isn't getting loaded either. Here is a dump from Linux in the hope it helps.

 

AppleHDA didn't work on AMD motherboard. The only way for AMD is VoodooHDA. 

  • Like 3
Link to comment
Share on other sites

8 hours ago, MacPeet said:

@ammoune78

all codecs tried? Is your audio not working? I can watch the dump if you have no sound.

I do not quite understand. You would like to create a translation of my tutorial? With indication of the source no problem.
My english is not perfect, sorry.

The tutorial is older, for patch AppleHDA. Many steps are no longer necessary for AppleALC. Much easier with AppleALC.

Thanks my MAN for the reply :wink_anim:

I have the audio working, just tried yesterday the _DSM that i do for my Desktop with a different way and worked, but, I need to know if the settings for that chip are universal (work for all laptops or desktops that have the same one) or specific for each laptop or desktop series from manufacturer?

No I didn't meant that, but instead from that guide, if I try to translate it to English in Google Translate, the result is not good translation, so we just need the steps needed for AppleALC to do it by ourselves, and then we can send the result to you or vit9696 or vandroiy2012 to add them into the AppleALC source code, so you'll have less work

As i told in the post earlier, I work some times for a friend of mine, that sells computer parts, and sometimes when he have a lot of work, he gives me the PC configurations to assemble them in my home, and in my home I can try to add more codecs from the sound card of that motherboards, and it's good thing, this is why I'm just trying to know how to fully dump a codec to send you from time to time the result of each codec I've finished, so you can add them into AppleALC!

Thanks dude    

Link to comment
Share on other sites

@junoir

I did not configure the rear mic.

Try this with LayoutID 13:

Trial_AppleALC.kext.zip

I have configured the Front Mic as LineIn here.


@ammoune78

ok I understand

The settings and nodes are often different for laptops and desktops of different manufacturers.

Your file (codec_dump.txt) in the upper post is the wrong file.
This is from HDMI.
Important is the dump of the internal audio.

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

Ok, I can confirm that front input is detected as line-in and music being played from my phone is being picked up now. Attached screenshot as to how it looks like in System Profiles and System Preferences(notice the VU meter).

Is there any difference between the input being configured as line-in or as microphone?

Screen Shot 2018-03-24 at 13.31.57.png

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

Guest ricoc90
14 hours ago, ammoune78 said:

As i told in the post earlier, I work some times for a friend of mine, that sells computer parts, and sometimes when he have a lot of work, he gives me the PC configurations to assemble them in my home, and in my home I can try to add more codecs from the sound card of that motherboards, and it's good thing, this is why I'm just trying to know how to fully dump a codec to send you from time to time the result of each codec I've finished, so you can add them into AppleALC! 

Follow MacPeet's guide on root86 and omit the AppleHDA patching part.
As far as I understand you just need to create the layoutXX.xml.zlib and PlatformsXX.xml.zlib using the information gathered in the codec_dump.txt -> codecgraph -> verbs.txt -> PinConfigurator as per his guide.

The process of adding the codec to AppleALC is described here:
https://github.com/vit9696/AppleALC/wiki/Adding-codec-support

But please correct me if I'm wrong :D

Link to comment
Share on other sites

7 hours ago, MacPeet said:

@ammoune78

Your file (codec_dump.txt) in the upper post is the wrong file.
This is from HDMI.
Important is the dump of the internal audio.

Excuse me, there's two file generated, here's:

card0-codec#0.txt

card1-codec#0.txt

Thanks

 

44 minutes ago, ricoc90 said:

Follow MacPeet's guide on root86 and omit the AppleHDA patching part.
As far as I understand you just need to create the layoutXX.xml.zlib and PlatformsXX.xml.zlib using the information gathered in the codec_dump.txt -> codecgraph -> verbs.txt -> PinConfigurator as per his guide.

The process of adding the codec to AppleALC is described here:
https://github.com/vit9696/AppleALC/wiki/Adding-codec-support

But please correct me if I'm wrong :D

Thanks for this explanation, i'll try it this night, hope if i can do all the steps ^_^

Link to comment
Share on other sites

On 3/8/2016 at 5:46 AM, vit9696 said:

Hello,

This is going to be a support/discussion topic of AppleALC on InsanelyMac. 
AppleALC is a kernel extension allowing you to enable native apple HD audio without any filesystem modifications. It dynamically injects the necessary modifications to AppleHDA (and other kexts) including the

layouts, and makes your audio work starting from the OS installation.

 

It should be noted that AppleALC starting with version 1.1.0 requires Lilu.kext to be put in the same folder as AppleALC.kext. See this topic for more details.

 

For quite some time we are trying to obtain the necessary information about AppleALC codec compatibility. If you use something, please, consider checking the compatibility table (do not worry, it is in English), and report (here) on your codec. We are also looking for all the possible revisions of the codec, if we do not have the revisions listed for your codec please report as well. Thanks for understanding. 

 

The report is meant to contain:

1. Laptop model/Motherboard model
2. Codec name
3. Layout used with the info what works for you (ideally if you try them all)
4. OS X versions you tried
5. Autogenerated Info.plist made with the help of this utility.

 
All the details including the source code are available on github:
https://github.com/vit9696/AppleALC
Some short wiki articles explaining the usage are included.
 
As for now the project is relatively immature without practically any codec support. But it should be pretty easy to add more of them, I am hoping for the support of the "community" :)
If you have any issues, better report them on github for structural reasons.

Hi Mr vit9696, here I want to ask u to build my alc 270 codec, because my alc270 is 0x0100 not 0x10100, then is it defferent betwen ac270 0x10100 with 0x0100. I'll send to you my AppleHDA file, so I hope you can rebuild it.
AppleHDA.kext 2.zip

I hope you can help me. Thanks a lot for your attention

AppleHDA.kext 2.zip

Link to comment
Share on other sites

On 3/23/2018 at 4:13 PM, MacPeet said:

@jin2k9 and @junoir

for both - try this:

Trial_CX20641_and_CX20642_LayoutID11_(0B)_and LayoutID13_(0D).zip

LayoutID 11 (0B) - ManualMode as before

LayoutID 13 (0D) - SwitchMode

In ManualMode both devices (LineOut and Headphones) are visible in the sound settings. You have to choose manually.

In SwitchMode, LineOut (back green) is configured as internal speaker. This allows automatic detection and switching if you plug in the headphones at the front.

This trial version is not in the AppleALC release yet.
For the release I need exact information.

Which computers do you have exactly?

I have some Dell OptiPlex 3010 DT PCs. One has the I3 CPU and one with the I5 CPU. Mobos are 100% identical though. I will try the LayoutID 13 (0D) - SwitchMode.

Edit: The switchmode works. It switches the Audio output automatically from front speakers to headphones when I plug in the mini jack to their respective outputs. I did not have any microphone to test with but I connected my headset into the MIC input in the back (Pink connector) and shouted into the headset. The meter under input devices moved, however the port is detected/listed as LINE IN. When I connect to the Line IN (Blue connector) it still says Line IN but the Input Volume meter does not respond to any sound Input. When I connect to the front Microphone connector in front of the cabinet it still says Line IN but the input volume meter does not respond to any sound input. I guess it does not detect any changes when the mini jack gets plugged in and therfore does not switch to the Front Mic connector. The same may be the case with the rear Line IN (Blue) connector. But what puzzels me is that the pink MIC connector works but lists as Line IN and still seems to respond fine to a weak MIC Level input even though it is listed as LINE IN.

However nothing of this is any issue for me. I was quite happy with the first "manual" kext that made the soundcard work and enabled the use of the Headphone and the Speaker outputs even though they had to be selected manually. In any case I would like to record audio or use a microphone I would use a USB Microphone for mic level input recording or an external stand alone studio soundcard for line in level input audio recording.

Edited by jin2k9
Link to comment
Share on other sites

@jin2k9
There is no rear mic in your dump.

try this with 11 and 13:

Trial_AppleALC.kext.zip

front Mic now as LineIn and LineIn back blue (Input's are manual configured)


@junoir
Is there any difference between the input being configured as line-in or as microphone?

Not necessarily. When it works, everything is fine.
The inputs are often difficult under OSX.

In the last trial AppleALC also your LayoutID 11 is renewed.
Last attempt before sending for the release.

Link to comment
Share on other sites

Manual mode (layout id 11) works as expected, both line-ins showing. In SwitchMode I've made a change and configured the front mic as a microphone instead of line-in and set the port as internal+jack, and surprise, surprise, OSX sees it as an internal microphone now(see attached screenshot). Only thing missing now(for the sake of perfection) is the pink microphone input in the back at node 27, which I've tried adding the same way but it doesn't get detected. Regardless, I would consider this done :D

Screen Shot 2018-03-25 at 13.30.30.png

  • Like 1
Link to comment
Share on other sites

@junoir
great job :thumbsup_anim::thumbsup_anim::thumbsup_anim:

I had cleared the 27 for first attempts, since there are only two input nodes (20 and 21).
try this with 13:

Trial_AppleALC.kext.zip

Front Mic as internal, Back Mic as LineIn. Both in SwitchMode with input node 20.

Platforms13.xml.zip

Nodes:

frontMic black 26 - 20

backMic pink as LineIn 27 - 20

LineIn back blue 29 - 21

21c71c10 21c71d40 21c71e11 21c71f90 21a71c20 21a71d10 21a71ea1 21a71f92 21b71c30 21b71d90 21b71e81 21b71f01 21971c40 21971d10 21971e21 21971f02 21d71c50 21d71d30 21d71e81 21d71f01

CX20642.png.9db3f4e3a3f93d8e0c354e5d78678ff8.png

Edited by MacPeet
Link to comment
Share on other sites

hi

1. motherboard - GA-B250M-D3H
2. codec - 892
3. layoutID - tried all, using layout 1 right now
4. macos - 10.13.3
5. info.plist - https://bpaste.net/show/0ee0a2792b57

i have weird problem with front audio panel, headphones only gets detected if i plugin in jack half way in and only one channel is working if i insert it all way in headphones wont be detected at all. and no its not hardware problem i dual boot and there is no issue on windows. audio from mb ports is working fine, but its not "Audio HD" much lower quality than from front panel ports.

do i need build my own codec or custom patching? thanks

Link to comment
Share on other sites

12 hours ago, MacPeet said:

@jin2k9
There is no rear mic in your dump.

try this with 11 and 13:

Trial_AppleALC.kext.zip

front Mic now as LineIn and LineIn back blue (Input's are manual configured)

 

OK, like you expected there are now 2 line in inputs. now all inputs responds. rear line in blue connector and rear mic input pink responds on 1 of the line in inputs. the front mic connector now responds on the other line in input. auto switching works great just as before. in manual mode 11 all inputs and outputs are listed. I consider this as good as it can get, every output and input jack responds. why the 2 in the back uses on the same line input is probably self explainatory since my dump didnt have any rear mic for some reason. Anyways, thank you very much for adding the codec.

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

7 hours ago, insant9999 said:

headphones only gets detected if i plugin in jack half way in and only one channel is working if i insert it all way in headphones wont be detected at all.

there is no issue on windows.

Front panel connector is defective, pin detect is not working; replace

Windows, not relevant.  Windows supports AC97, macOS does not; both support HD Audio

Workaround is to split front panel green audio device from motherboard green

 

Edited by toleda
  • Thanks 1
Link to comment
Share on other sites

Hello

 

I am trying to do myself using AppleALC.

The report is meant to contain:

1. Laptop model/Motherboard model
   Asus S14 S410UN i5-8250U

2. Codec name

    Conexant Smart HD Audio ID 14f1:1f72

 Vendor Id: 0x14f11f72
Subsystem Id: 0x10431c50
Revision Id: 0x100000

    Codec0 from linux included

3. Layout used with the info what works for you (ideally if you try them all)

    I am using 13 but not works, going others, config.plist included...
4. OS X versions you tried

   OSX HighSierra 10.13.3


5. Autogenerated Info.plist

attached..

 

	Layout, hex: 0x0000000d , dec: 13
	PinConfigurations:
4010210310011790f001f0403010a1032001a795
	Codecs Found: 1
HDA:
0 CodecAddress:0x0
VendorID: 0x14f11f72
RevisionID: 0x100000
CodecID: 351346546
Revision(dec):=1048576
Id=0x1f72
Id(dec)=8050
Vendor=0x14f1
Vendor(dec)=5361
	File Doesn't Exist, Will Create: /Users/tatok/Desktop/Info.plist
Merge: Error Reading File: Patch.plist
Merge: Error Reading File: Patch.plist
./Codec-Info.command: line 127: ((: 1f72: value too great for base (error token is "1f72")
Merge: Error Reading File: Patch.plist
Merge: Error Reading File: Patch.plist
Merge: Error Reading File: Patch.plist
	

 

config.plist, hdef renaming on and patched dsdt (unpatched for hda/hdef)

Other logs and clover config http://www34.zippyshare.com/v/o2JDbbno/file.html

codec0.txt

Info.plist

 

 

EDIT: 

Now it works wth layout 3. Detected as Conexant CX8050

Attached the debug files : logshow.log

logshow.log

Edited by Babiloe
Link to comment
Share on other sites

@jin2k9
Thanks, I'll give the codec to the release.

@junoir
No, the Platforms13.xml was only for your own experiments with the AppleALC source.

One last try:

Trial_AppleALC.kext.zip

Mic front in the switch with LineIn back blue
Mic back separately

Under OSX two inputs are already good. Important is the front mic.

  • Like 1
Link to comment
Share on other sites

×
×
  • Create New...