Jump to content

ACPI (DSDT) Patcher for BIOS and AML


koalala
 Share

845 posts in this topic

Recommended Posts

PEGP, yes for sure. I won't correct it immediatly, only in RC1.

The label is not the good one, but this function create Device(PEGP) so this isn't a major problem.

For sound, there is a lot of revision of ALC888 and the PinConfiguration depends on the ALC rev. The value in the program is the most common. I may differenciate it later.

 

Make sure to include an option to enter your own pinconf. And pls, either post a guide on how to convert values got from here

http://forum.insanelymac.com/index.php?showtopic=137188 (maybe there is one, I just have not found it :D ) or make patcher do it automatically.

 

Thanks for all your work! ;)

Link to comment
Share on other sites

Make sure to include an option to enter your own pinconf. And pls, either post a guide on how to convert values got from here

http://forum.insanelymac.com/index.php?showtopic=137188 (maybe there is one, I just have not found it :D ) or make patcher do it automatically.

 

Thanks for all your work! ;)

Ok, I won't made a patcher now, but I will add custom PinConfiguration and CodecID selecter in 0.2 RC1.

Version 0.2 will be a version for advanced users since there will be a lot of checkbox and combobox.

The first release was a tool to simplify patching but now ...

Version 0.3 will have normal and advanced mode.

Link to comment
Share on other sites

Okay. here we go.

 

I can confirm that with Gigabyte P35-DS3L Rev. 2 (F9b BIOS) + HIS HD 3870 512 MB:

 

1. Graphics works great just like it should

2. TM fix works great

3. Sleep, Shutdown, Restart works great (AppleDecrypt + OpenHaltRestart)

4. Sound doesn't work with Taruga's AppleHDA (used to work with EFI string) -> will keep on trying with 889a probably

 

Save your time with documentation - just add explanatory tooltips.

 

Hi, i have also an allinone dsdt fixing running - with Apple HDA working.

 

Perhaps your .plist changes (small , in 2 .plists) arent OK?!

Also check if you have changes AZAL (2 times! for my EP35DS3) into HDEF in the readable .dsl and recompiled ?

 

I attach my AppleHDA.kext, 10.5.6, no code changes - only small changes in 2 .plists (setting 889A as device known).

Before an Sytemupate simple save them (2 .plists , you indicate them as latest+same change dates)

update to 10.5.X and replace that 2 .plists with your 889A .plists.

AppleHDA_1056_889A_DSDT.kext.sitx

Link to comment
Share on other sites

koalala, mitch_de

 

Thanks for help. I just can't figure out that thing. Was trying to patch AppleHDA manually to have a latest kext (as Taruga's patcher writes quite an old version) but this is too complex for my small brain - all those pin configs etc.

The only sound i get is with AppleHDA from Taruga's patch (1.4.0a22) + efi string which EFIStudio writes for me:

 

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>PciRoot(0x1)/Pci(0x1b,0x0)</key>
 <dict>
  <key>PinConfigurations</key>
  <string></string>
  <key>built-in</key>
  <string>0x00</string>
  <key>layout-id</key>
  <string>0x0000000c</string>
  <key>revision-id</key>
  <string>0x00000001</string>
  <key>subsystem-id</key>
  <string>0x0000a002</string>
  <key>subsystem-vendor-id</key>
  <string>0x00001458</string>
  <key>vendor-id</key>
  <string>0x00008086</string>
  </dict>
</dict>
</plist>

 

I guess this is a PinConfig? Does koalala's patcher inject the same XML ?

What do i need to do with vanilla AppleHDA to get all connectors working.

 

By the way. i dunno whether this is important, but EFIStudio creates only AZAL device for me and says that there is no HDEF one. BUT. When i place HDAEnabler this is vice-versa : no AZAL but HDEF. But the XML it produces is the same in both cases (see above)

 

I think my brain's going to explode!

 

mitch_de

 

What exactly i must change in plists to have sound? You say you didn't patch the binary. But will it help me as my codec is ALC888 (P35-DS3L) and you have a DS3 mobo. Is there any decent manual on that?

Link to comment
Share on other sites

Next function will be SSDT patching, the patcher will be renamed ACPI Patcher.

It will (normally) fix shutdown, reboot, sleep and speedtest.

But won't be released before 2 weeks.

 

Status :

Patcher can extract SSDT table from Award and AMI BIOS.

Since SSDT table are larger than Mac ones, tables can be modified and BIOS recompiled.

Link to comment
Share on other sites

Koalala,

 

Great stuff. BTW, in .0.2a when I choose 889a audio. It displays 888 in Sys Profiler. I'm guessing there was a mistype of sorts in this version. Also, I'm assuming it's loading 888 info since my 889a/885 kexts aren't loading appropriately.

 

Take care! Thanks!

 

-Stell

It's a beta so it's in order to correct bugs. Thanks for reporting (I can't test all function with all values).

LayoutID was always "888". That's why it reported 888. But PinConfigurations and CodecID was 889a ones.

I fixed LayoutID bug in attached Beta2b.

Patcher02Beta2b.zip

Link to comment
Share on other sites

It's a beta so it's in order to correct bugs. Thanks for reporting (I can't test all function with all values).

LayoutID was always "888". That's why it reported 888. But PinConfigurations and CodecID was 889a ones.

I fixed LayoutID bug in attached Beta2b.

 

Ahhh, ok. Thanks. I decompiled the fixed DSDT I made with your app and saw that it said ALC 889a. So I thought I was eating my own words so I decided to delete my post, haha.

 

Seriously though, I want to say thanks to Koalala and everyone involved including Roisoft for working on this DSDT and SSDT stuff. I really think this is THE direction the osx86 scene is headed for an amazing evolution in development.

 

Cheers, and looking forward to the newest SSDT app. :rolleyes:

 

-Stell

Link to comment
Share on other sites

koalala, mitch_de

 

 

What exactly i must change in plists to have sound? You say you didn't patch the binary. But will it help me as my codec is ALC888 (P35-DS3L) and you have a DS3 mobo. Is there any decent manual on that?

 

You must change nothing inmy download (AppleHDA). The 2 .plists are already edited for 889A / dsdt HDEF usage. The rest of all is unpatched orig. Apple 10.5.6

You only need an dsdt of your bios with HDEF insted of AZAL (as device).

Also be sure you dont have any other Audio injectors (like natit for gpu) in system extensions like ALCINJEXT.kext !!!! - remove them and remove extensions.mkext also before next reboot !

Link to comment
Share on other sites

mitch_de, is your mic on rear pink work with your dsdt and appleHDA, i use your plugins from UInstaller with your dsdt and appleHDA from 10.5.6 but mic wont work (no injector, nothing), front or rear, same result, nothing. :(

Link to comment
Share on other sites

mitch_de, is your mic on rear pink work with your dsdt and appleHDA, i use your plugins from UInstaller with your dsdt and appleHDA from 10.5.6 but mic wont work (no injector, nothing), front or rear, same result, nothing. :pirate2:

 

I have an EP35-DS3 (No R) board.

How is your Systempreferences Sound looking ?

Do you have all devices available and! check if you can get Mic if you switch what Mic Input device to use.

My Mic is on the red-rose plug and i set Mic to Mic internal and of course working :)

 

I attached my Systemprefs Sound screenshoot

Bild_245.jpg

Link to comment
Share on other sites

mitch_de

 

Okay. After a couple of experiments i think i found something:

 

1. your EP35-DS3 has ALC 889a codec so you don't need a binary patch for AppleHDA, only plist changes

2. my P35-DS3L has ALC 888 codec thus probably needs a binary patch (can someone confirm this ??)

3. my sound works only with old AppleHDA patched with Taruga's patcher + this efi string:

 

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>PciRoot(0x1)/Pci(0x1b,0x0)</key>
 <dict>
  <key>PinConfigurations</key>
  <string></string>
  <key>built-in</key>
  <string>0x00</string>
  <key>layout-id</key>
  <string>0x0000000c</string>
  <key>revision-id</key>
  <string>0x00000001</string>
  <key>subsystem-id</key>
  <string>0x0000a002</string>
  <key>subsystem-vendor-id</key>
  <string>0x00001458</string>
  <key>vendor-id</key>
  <string>0x00008086</string>
  </dict>
</dict>
</plist>

 

4. koalala's dsdt patcher produces the following code when ALC 888 HDEF selected:

 

Device (HDEF)
		{
			Name (_ADR, 0x001B0000)
			Method (_PRW, 0, NotSerialized)
			{
				Return (Package (0x02)
				{
					0x0D, 
					0x05
				})
			}

			Method (_DSM, 4, NotSerialized)
			{
				Store (Package (0x08)
					{
						"codec-id", 
						Buffer (0x04)
						{
							0x88, 0x08, 0xEC, 0x10
						}, 

						"layout-id", 
						Buffer (0x04)
						{
							0x78, 0x03, 0x00, 0x00
						}, 

						"device-type", 
						Buffer (0x0F)
						{
							"Realtek ALC888"
						}, 

						"PinConfigurations", 
						Buffer (0x28)
						{
							/* 0000 */	0x50, 0x70, 0x21, 0x01, 0x40, 0x01, 0x13, 0x90, 
							/* 0008 */	0x20, 0x30, 0x81, 0x01, 0x41, 0x40, 0x01, 0x01, 
							/* 0010 */	0x30, 0xE0, 0xC5, 0x01, 0x60, 0xE0, 0x45, 0x01, 
							/* 0018 */	0x0F, 0x00, 0x00, 0x40, 0x0F, 0x00, 0x00, 0x40, 
							/* 0020 */	0x10, 0x01, 0xA0, 0x90, 0x11, 0x01, 0xA0, 0x90
						}
					}, Local0)
				DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
				Return (Local0)
			}
		}

 

And it doesn't work when compiled in dsdt.aml with old patched AppleHDA (but it works with efi string). Sound Preference says that i have no Input / Output devices at all.

 

So I guess this dsdt code is wrong. Could somebody help me to translate that XML that works into DSDT code (pin config etc).

The next step is to manually modify AppleHDA in the way Taruga's patch does to work with DSDT.

 

Please help! I have everything else working with this great DSDT patcher except this bloody HDA.

Link to comment
Share on other sites

Try this

            Device (HDEF)
           {
               Name (_ADR, 0x001B0000)
               Method (_PRW, 0, NotSerialized)
               {
                   Return (Package (0x02)
                   {
                       0x05, 
                       0x05
                   })
               }

               Method (_DSM, 4, NotSerialized)
               {
                   Store (Package (0x08)
                       {
                           "codec-id", 
                           Buffer (0x04)
                           {
                               0x88, 0x08, 0xec, 0x10 // the hex codec ID (reverse order)
                           }, 
                           "layout-id", 
                           Buffer (0x04)
                           {
                               0x0c, 0x00, 0x00, 0x00 // the hex layout ID (reverse order) 
                           }, 
                           "device-type", 
                           Buffer (0x0e)
                           {
                               "Realtek ALC888"
                           }, 
                           "PinConfigurations", 
                           Buffer (0x28)
                           {
                               /* 0000 */    0x10, 0x40, 0x11, 0x01, 0x20, 0x40, 0x21, 0x02,
                               /* 0008 */    0x30, 0x90, 0xa1, 0x02, 0x40, 0x30, 0x81, 0x01,
                               /* 0010 */    0x50, 0x10, 0x01, 0x01, 0x60, 0x60, 0x01, 0x01,
                               /* 0018 */    0x70, 0x20, 0x01, 0x01, 0x80, 0x11, 0x45, 0x01,
                               /* 0020 */    0x90, 0x91, 0xc5, 0x01
                           }
                       }, Local0)
                   DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
                   Return (Local0)
               }
           }

 

and use this AppleHDA.kext. On my Hack it gives fully functioning audio with all ports (tested) working except rear grey line out, correct info in system profiler, and rear green line out muted when headphones plugged in front. This switch is also displayed in Sound sys prefs: internal speaker changes to headphone.

AppleHDA.kext.zip

Link to comment
Share on other sites

Try this code if you only want to replace EFI strings :

 

Device (HDEF)
		 {
			 Name (_ADR, 0x001B0000)
			 Method (_PRW, 0, NotSerialized)
			 {
				 Return (Package (0x02)
				 {
					 0x0D, 
					 0x05
				 })
			 }

			 Method (_DSM, 4, NotSerialized)
			 {
				 Store (Package (0x0E)
					 {
						"built-in", 
						 Buffer (One)
						 {
							 0x00
						 }, 

						 "revision-id", 
						 Buffer (0x04)
						 {
							 0x01, 0x00, 0x00, 0x00
						 }, 

						 "subsystem-vendor-id", 
						 Buffer (0x04)
						 {
							 0x58, 0x14, 0x00, 0x00
						 }, 

						 "layout-id", 
						 Buffer (0x04)
						 {
							 0x0C, 0x00, 0x00, 0x00
						 }, 

						 "vendor-id", 
						 Buffer (0x04)
						 {
							 0x86, 0x80, 0x00, 0x00
						 }, 

						 "subsystem-id", 
						 Buffer (0x04)
						 {
							 0x02, 0xA0, 0x00, 0x00
						 }, 

						 "PinConfigurations", 
						 Buffer (One)
						 {
							0x00
						 }
					 }, Local0)
				 DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
				 Return (Local0)
			 }
		 }

 

I know that some people have problems with AMI BIOS on AppleLife.ru

Please report it here in english since I can't read russian.

If the people who have an Asus card could post his patched non-working BIOS here...

Thanks

Link to comment
Share on other sites

mitch_de, ok thx to reply, now i know whats the problem, my mic is only show as external and i cant change it in audio midi configuration, and i now remember when it work it was internal, i've to dig around to find a solution.

 

94476961on3.th.png 70781223fd3.th.png

Link to comment
Share on other sites

This code and the attached applehda works for P35-DS3L and ALC888

 

Device (HDEF)
		{
			Name (_ADR, 0x001B0000)
			Method (_PRW, 0, NotSerialized)
			{
				Return (Package (0x02)
				{
					0x0D,
					0x05
				})
			}

	Method (_DSM, 4, NotSerialized)
			{
				Store (Package (0x08)
					{
						"codec-id",
						Buffer (0x04)
						{
							0x88, 0x08, 0xec, 0x10
						},

						"layout-id",
						Buffer (0x04)
						{
							0x0c, 0x00, 0x00, 0x00 
						},

						"device-type",
						Buffer (0x06)
						{
							"ALC888"
						},

						"PinConfigurations",
						Buffer (0x20)
						{
							/* 0000 */	0x10, 0x40, 0x01, 0x01, 0x20, 0x10, 0x11, 0x01,
							/* 0008 */	0x30, 0x60, 0x21, 0x01, 0x40, 0x30, 0x81, 0x01,
							/* 0010 */	0x50, 0x90, 0xA1, 0x01, 0x60, 0x61, 0x4B, 0x01,
							/* 0018 */	0xf0, 0x01, 0xCB, 0x00
						}

					}, Local0)
				Return (Local0)
			}
		}

 

 

 

AppleHDA.kext10.5.6.zip

Link to comment
Share on other sites

Hey guys! You are great! Thanks a lot.

 

dgsga

Your solution worked, line out and front out worked (autodetection works also). But now i'm having POP sounds when system produces a sound after a short idle time. Is your kext PLIST modded only (no binary patch)?

 

roisoft

Will try your solution now and report.

 

 

UPDATE:

 

roisoft

 

DSDT you provided doesn't work for me (no devices at all). Then i tested your AppleHDA with dgsga's DSDT code - and it worked. But i have no headphone out (front panel), only line out and same POP sounds.

 

so what do i do?

Link to comment
Share on other sites

Not sure why the popping is happening, sorry I can't help with that one. The kext is 10.5.6 original with modded binary and plists. I had to mod the binary as I use Chameleon as bootloader on hardware raid.

 

Cheers

 

UPDATE: I am using vanilla AppleSMBIOS.kext with AppleSMBIOSEFI.kext. Try using these if you're not already...

Link to comment
Share on other sites

dgsga

 

I have vanilla AppleSMBIOS.kext but no AppleSMBIOSEFI.kext. Think the latter kext will solve the problem but I think that is a wrong approach.

Ang how is the binary patch connected with Chameleon? I think everyone is using Chameleon nowadays.

 

UPDATE:

 

With your DSDT code even old Taruga's AppleHDA kext works with no POP sounds. I think i must dig into AppleHDA.kext plists as now i have a fully woking DSDT.

 

BTW, they say someone's writing a complete solution for the whole HDA thing from scratch not involving any patching, and it will be completed very soon!

As they say.

Link to comment
Share on other sites

With your DSDT code even old Taruga's AppleHDA kext works with no POP sounds. I think i must dig into AppleHDA.kext plists as now i have a fully woking DSDT.

 

Since 3/4 codes are posted, which one is working ? I will include it in the patcher.

Link to comment
Share on other sites

I have trying to compile previously decompiled DSDT.dsl, but the patcher throws an exception "File *** not found!", and deleted my DSDT.dsl. I was trying to include roisoft's solution for HDA on P35-DS3L.

Link to comment
Share on other sites

koalala

 

This one worked for me (Gigabyte P35-DS3L):

 

			Device (HDEF)

		{

			Name (_ADR, 0x001B0000)

			Method (_PRW, 0, NotSerialized)

			{

				Return (Package (0x02)

				{

					0x05, 

					0x05

				})

			}



			Method (_DSM, 4, NotSerialized)

			{

				Store (Package (0x08)

					{

						"codec-id", 

						Buffer (0x04)

						{

							0x88, 0x08, 0xec, 0x10

						}, 

						"layout-id", 

						Buffer (0x04)

						{

							0x0c, 0x00, 0x00, 0x00

						}, 

						"device-type", 

						Buffer (0x0e)

						{

							"Realtek ALC888"

						}, 

						"PinConfigurations", 

						Buffer (0x28)

						{

							/* 0000 */	0x10, 0x40, 0x11, 0x01, 0x20, 0x40, 0x21, 0x02,

							/* 0008 */	0x30, 0x90, 0xa1, 0x02, 0x40, 0x30, 0x81, 0x01,

							/* 0010 */	0x50, 0x10, 0x01, 0x01, 0x60, 0x60, 0x01, 0x01,

							/* 0018 */	0x70, 0x20, 0x01, 0x01, 0x80, 0x11, 0x45, 0x01,

							/* 0020 */	0x90, 0x91, 0xc5, 0x01

						}

					}, Local0)

				DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))

				Return (Local0)

			}

		}

 

But i think you must be careful as it seems to be very particular mobo-specific. I wanted to learn how this works but it appears to be very complicated - so using AS IS with Taruga's old AppleHDA patched with ALC888 Address 2 codec.

 

Looking forward new cool features in your app!

Link to comment
Share on other sites

Ver : 0.2 (Beta)

-Partial AMI BIOS support (don't use GFX or Network to prevent overflow and not booting) : HPET, RTC and Aliases (=CPU Cores)

(Working with almost all AMI BIOS but not with very recent laptops like MSI Wind for the moment.)

-You can extract DSDT.dsl from AMI BIOS now

-MUTE fix

-Dual-DVI, DVI+VGA, TV-OUT ... nVCAP selecter (based on Krazubu research)

-Graphics hardware location selecter, 7950GT added

-P0P added for network hardware location

-Bug fixes

 

Question on the cpu aliases fix- I've got an ECS mb (g31t-m) and I've used your patcher to patch the AMI bios for the board. I don't seem to be able to see both cores of my core 2 duo after the patch, is that the only way I can verify whether the aliases patch worked? Any logs I can check? Thanks!

Link to comment
Share on other sites

 Share

×
×
  • Create New...