Jump to content

fluid | fixed

Editing custom personalities for ATI Radeon HD[45]xxx


  • Please log in to reply
650 replies to this topic

#101
max22

max22

    InsanelyMac Protégé

  • Members
  • PipPip
  • 89 posts
On my Sapphire 4670 (Shrike framebuffer), I have tried changing from
0000000	02  00  00  00  40  00  00  00  09  00  00  00  02  01  00  03
0000010	02  00  00  00  00  01  00  00  09  01  00  00  20  01  02  02
0000020	00  04  00  00  04  07  00  00  00  01  00  00  10  00  01  01
0000030	00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00
to
0000000	02  00  00  00  40  00  00  00  09  00  00  00  02  01  00  03
0000010	08  00  00  00  00  01  00  00  09  01  00  00  20  01  02  05 (HDMI)
0000020	00  04  00  00  04  07  00  00  00  01  00  00  10  00  01  01 (DVI)
0000030	00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00
to enable HDMI on Port 1, but but i can't get hdmi output (dvi works). http://pastebin.com/1tUc8SHj

What did i make wrong?

#102
bcc9

bcc9

    InsanelyMac Legend

  • Coders
  • 1,154 posts
  • Gender:Male

View Postwmarsh, on Mar 7 2011, 09:20 PM, said:

byte senseid;    /* Sense line is bits 0-3
                        Use hw i2c flag is bit 4 */
              /* i2cid = (senseid & 0xf-1)+0x90 */
              /* senseid = (i2cid & 0xf) +1*/[/code]
For instance, in earlier post you told me to use senseid 01
But if I want to set hw i2c flag, should I not use in byte stream
xx xx xx 11 ?
In the static ConnectorInfo tables, I have not seen one that has this "use hw i2c" flag bit set.  Have you?
I would first look for similar hardware to yours in a genuine mac and see what bits it is setting.
I actually haven't seen this bit get used other than to pretty print that it is called the "use h2 i2c" flag bit.
But I have not done an exhaustive search.
I kind of stopped doing exhaustive searches of the code once I found what was sufficient for the typical desktop case.  That being setting the ConnectorType and senseid values properly, and leaving the other bytes as is (but taken from a genuine entry whose connectortype matches what you're trying to get working).
  

View Postwmarsh, on Mar 7 2011, 09:20 PM, said:

And can you add any more info in the 1st 3 bytes?
I haven't had time to look further, you could try reading the ATISupport code to see the usages, following thru to ATIFramebuffer if necessary (that's what I did).

View Postjsl, on Mar 7 2011, 09:24 PM, said:

Thanks again for bcc9 !
You have saved my time and money !
Can you provide more guide for Nvidia GT-260M card which is internal display for Asus G51J/60J laptop.
Updated to 10.6.2 ~ 10.6.6 its HDMI port became unable to connect, only VGA is available for external monitor.
I think your info for 9400M can be applied to it.
High five!
Sounds like the NVCAP ioregistry entry isn't set up right, but I'm not sure.  Is there some other thread discussing that?  
For my nvidia 9400, I'm having a lot of trouble figuring out how to control av-signal-type properly.  I get av-signal-type=2 for hdmi and 16 for displayport instead of 8 for hdmi like with genuine mac hardware (mac mini).
If someone would solve that for me I'd have more time to look at ConnectorInfo :)

View Postmax22, on Mar 8 2011, 11:30 AM, said:

to
0000000	02  00  00  00  40  00  00  00  09  00  00  00  02  01  00  03
	0000010	08  00  00  00  00  01  00  00  09  01  00  00  20  01  02  05 (HDMI)
	0000020	00  04  00  00  04  07  00  00  00  01  00  00  10  00  01  01 (DVI)
	0000030	00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00
to enable HDMI on Port 1, but but i can't get hdmi output (dvi works). http://pastebin.com/1tUc8SHj

What did i make wrong?
Well for starters you got the byte order wrong for hdmi.

View Postbcc9, on Mar 8 2011, 12:09 PM, said:

Well for starters you got the byte order wrong for hdmi.
Secondly you're modifying an existing LVDS entry instead of working with an HDMI entry, so some of the other bytes are wrong such as the features byte (you have the use_internal flag set for example which must be wrong for hdmi).

#103
jsl

jsl

    InsanelyMac Geek

  • Members
  • PipPipPipPip
  • 182 posts

View Postmax22, on Mar 8 2011, 07:30 PM, said:

On my Sapphire 4670 (Shrike framebuffer), I have tried changing from
0000000	02  00  00  00  40  00  00  00  09  00  00  00  02  01  00  03
0000010	02  00  00  00  00  01  00  00  09  01  00  00  20  01  02  02
0000020	00  04  00  00  04  07  00  00  00  01  00  00  10  00  01  01
0000030	00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00
to
0000000	02  00  00  00  40  00  00  00  09  00  00  00  02  01  00  03
0000010	08  00  00  00  00  01  00  00  09  01  00  00  20  01  02  05 (HDMI)
0000020	00  04  00  00  04  07  00  00  00  01  00  00  10  00  01  01 (DVI)
0000030	00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00
to enable HDMI on Port 1, but but i can't get hdmi output (dvi works). http://pastebin.com/1tUc8SHj

What did i make wrong?
Please change from this :
0000010 08  00  00  00  00  01  00  00  09  01  00  00  20  01  02  05 (HDMI)
To:
0000010 00  08  00  00  00  01  00  00  09  01  00  00  20  01  02  05 (HDMI)
And try again !

If it does not work, try to copy from other framebuffer in which starting with 00 08 xx xx .....
My experience showed HDMI audio need both of the following:
(1) starting at 00 08
(20 end with correct senseID for your HDMI (using radeondump to get it)

#104
jsl

jsl

    InsanelyMac Geek

  • Members
  • PipPipPipPip
  • 182 posts

View Postbcc9, on Mar 8 2011, 08:26 PM, said:

High five!
Sounds like the NVCAP ioregistry entry isn't set up right, but I'm not sure.  Is there some other thread discussing that?  
For my nvidia 9400, I'm having a lot of trouble figuring out how to control av-signal-type properly.  I get av-signal-type=2 for hdmi and 16 for displayport instead of 8 for hdmi like with genuine mac hardware (mac mini).
If someone would solve that for me I'd have more time to look at ConnectorInfo ;)
Thanks for your prompt reply.
After patched Connector-type and working HDMI audio I met just one minor problem again.
Before this I can easily Sleep and Wake my Hackintosh by mouse or keyboard, but now I can Sleep & Unable to Wake by keyboard or mouse any more.
Have you the same problem after patching ?

Solved only for MSI Hawk 5770 in Asus P6T SE MB (arch=x86_64) by myself now.
Need Sleep at DVI dispaly only without mirror in Vervet, Uakari, Eulemur FB, then I can Wake by keyboard or mouse now.
One exception for Baboon FB: need Sleep at HDMI only display, then I can Wake by KB or Mouse.

Still suffering the same Sleep/Wake Problems for Asus EAH 5770 in Asus M3A MB (arch=i386) & Asus EAH 5850 in Asus P5Q PRO (arch=x86_64)

Very tricky !
Another queer phenomenon:
Different ATI 5xxx cards have their unique behavor.
For MSI Hawk 5770 in Asus P6T SE MB (arch=x86_64):
Even I can activate Zonalis FB in DVI and HDMI (including its audio) dispaly, they behave normally only by mirror.
Without mirror both display shows only background without Apple Menu for selection at all.
And its Baboon FB sometimes behave queer too.
For Asus EAH 5770 in Asus M3A MB (arch=i386)
Both Baboon and Zonalis seem much better without such problems because it has VGA port instead of DP port.

So my conclusion:
Each ATI 5xxx card need individual modification and test by your specific OSX and MB.
You need refer other's successful ATIFramebuffer and re-adjust to your specific evironment for trial & error.
Otherwise you may waste too much time, energy, and even money !
bcc9's guide is the best up to now.

#105
wmarsh

wmarsh

    InsanelyMac Legend

  • Members
  • PipPipPipPipPipPipPip
  • 892 posts

View Postbcc9, on Mar 8 2011, 03:26 PM, said:

In the static ConnectorInfo tables, I have not seen one that has this "use hw i2c" flag bit set.  Have you?
I would first look for similar hardware to yours in a genuine mac and see what bits it is setting.
Well the whole problem for Mobility Radeons is there is not similiar genuine macs, at least until these new ones came out. We could give up -- dongs FB works great -- but with no QE usability is limited.

#106
bcc9

bcc9

    InsanelyMac Legend

  • Coders
  • 1,154 posts
  • Gender:Male

View Postwmarsh, on Mar 8 2011, 07:25 PM, said:

Well the whole problem for Mobility Radeons is there is not similiar genuine macs, at least until these new ones came out. We could give up -- dongs FB works great -- but with no QE usability is limited.
You could give up if you don't want to do any homework on this...  Look at the personality used by the genuine macs, look at their ioregistry, their bios dump.  This should tell you what values can work in practice.  Then work backwards from there.

#107
kizwan

kizwan

    InsanelyMac Legend

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 1,422 posts

View Posttmongkol, on Mar 5 2011, 02:10 PM, said:

@ kizwan

Did you add Device(GFX0) & Device (HDAU) into your DSDT?

			Device (PEGP)  //adding this device
			{
				Name (_ADR, 0x00010000)   //using lspci tool for your graphic address
				Name (_PRW, Package (0x02)  //based on Gigabyte DSDT
				{
					0x09, 
					0x05
				})
				Device (GFX0)
				{
					Name (_ADR, Zero)
					Method (_DSM, 4, NotSerialized)
					{
						Store (Package (0x02)
							{
								"hda-gfx", 
								Buffer (0x0A)
								{
									"onboard-1"
								}
							}, Local0)
						DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
						Return (Local0)
					}
				}

				Device (HDAU)
				{
					Name (_ADR, One)
					Method (_DSM, 4, NotSerialized)
					{
						 Store (Package (0x02)
							 {
								 "hda-gfx", 
								 Buffer (0x0A)
								 {
									 "onboard-1"
								 }
							 }, Local0)
						DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
						Return (Local0)
					}
				}
			}


Hi tmongkol,

I already inject HDAU device in DSDT. System Profiler now reported HDMI audio but there is no HDMI audio in audio/sound preferences. I checked & found the device ID 0x1002AA01 already exist in AppleHDA binary. What did I miss?

#108
VCH888

VCH888

    InsanelyMac Legend

  • Members
  • PipPipPipPipPipPipPip
  • 575 posts

View Postkizwan, on Mar 10 2011, 12:05 AM, said:

Hi tmongkol,

I already inject HDAU device in DSDT. System Profiler now reported HDMI audio but there is no HDMI audio in audio/sound preferences. I checked & found the device ID 0x1002AA01 already exist in AppleHDA binary. What did I miss?
Attached File  100.jpg   20.18K   45 downloads
Do you have this in IORegistryExplorer?  Did you connect HDMI cable?  Which framebuffer? HDMI sense-id?
Sorry for asking many questions.

#109
wmarsh

wmarsh

    InsanelyMac Legend

  • Members
  • PipPipPipPipPipPipPip
  • 892 posts

View Postbcc9, on Feb 27 2011, 11:38 PM, said:

In the static ConnectorInfo tables, I have not seen one that has this "use hw i2c" flag bit set. Have you?
Looks to me like Iago and Hypoprion do

#110
kizwan

kizwan

    InsanelyMac Legend

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 1,422 posts

View Posttmongkol, on Mar 10 2011, 10:37 AM, said:

Attachment 100.jpg
Do you have this in IORegistryExplorer?  Did you connect HDMI cable?  Which framebuffer? HDMI sense-id?
Sorry for asking many questions.
Yes, I have that in my IORegistryExplorer. Yes I did connect HDMI cable. I have "High Speed HDMI Cable with Ethernet" if that matters.  :D Currently I'm using Vervet framebuffer. HDMI sense ID is 0x02. I'm using 10.7's kexts though.

#111
bcc9

bcc9

    InsanelyMac Legend

  • Coders
  • 1,154 posts
  • Gender:Male

View Postkizwan, on Mar 9 2011, 07:24 PM, said:

Yes, I have that in my IORegistryExplorer. Yes I did connect HDMI cable. I have "High Speed HDMI Cable with Ethernet" if that matters.  :) Currently I'm using Vervet framebuffer. HDMI sense ID is 0x02. I'm using 10.7's kexts though.
connector-id in your ioregistry for your hdmi connector=2048?

#112
kizwan

kizwan

    InsanelyMac Legend

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 1,422 posts

View Postbcc9, on Mar 10 2011, 02:50 PM, said:

connector-id in your ioregistry for your hdmi connector=2048?
No, there is no connector-id found in my ioregistry. I looked everywhere.

#113
VCH888

VCH888

    InsanelyMac Legend

  • Members
  • PipPipPipPipPipPipPip
  • 575 posts

View Postkizwan, on Mar 10 2011, 05:02 PM, said:

No, there is no connector-id found in my ioregistry. I looked everywhere.

I think bcc9 means connector-type. I may be wrong about this.  See the below picture from my HD5770;
Attached File  102.jpg   111.55K   63 downloads

Hex 0x800 = Dec 2048

Did you get video output thru HDMI?  If yes, can you post a picture of av-signal & connector-type.  

Did you try to change senseid of Vervet?

$ od -Ax -tx1 /tmp/Vervet
0000000    00  04  00  00  00  04  00  00  00  01  00  00  12  04  04  02  --> 01
0000010    04  00  00  00  14  00  00  00  00  01  00  00  01  12  01  04
0000020    00  02  00  00  14  00  00  00  00  01  00  00  00  00  06  03
0000030    00  08  00  00  00  02  00  00  00  01  00  00  22  05  05  01  --> 02

if not working for you, swap rows or copy the fourth row to the first row.

#114
kizwan

kizwan

    InsanelyMac Legend

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 1,422 posts

View Posttmongkol, on Mar 10 2011, 10:54 PM, said:

Did you get video output thru HDMI?  If yes, can you post a picture of av-signal & connector-type.
Yes, I get video output through HDMI.
Attached File  ati_hdmi_port.jpg   121.97K   60 downloads

View Posttmongkol, on Mar 10 2011, 10:54 PM, said:

Did you try to change senseid of Vervet?

$ od -Ax -tx1 /tmp/Vervet
0000000    00  04  00  00  00  04  00  00  00  01  00  00  12  04  04  02  --> 01
0000010    04  00  00  00  14  00  00  00  00  01  00  00  01  12  01  04
0000020    00  02  00  00  14  00  00  00  00  01  00  00  00  00  06  03
0000030    00  08  00  00  00  02  00  00  00  01  00  00  22  05  05  01  --> 02

if not working for you, swap rows or copy the fourth row to the first row.
I'm using 10.7's kext. The 10.7's ATIFramebuffer is different than 10.6's Framebuffer. So I'm unable to test the senseid.

With 10.6's kexts & ATIFramebuffer patched, no output on external monitor (connected to HDMI). The display just sleep. However, monitor does detected in IORegistry with correct EDID & correct connector-type (0x800). When checked via VNC, I found QE/CI are enabled.

These are screenshots of the HDAU device:-
Attached File  ati_hdmi_audio_1.jpg   232.58K   55 downloadsAttached File  ati_hdmi_audio_2.jpg   182.78K   36 downloadsAttached File  ati_hdmi_audio_3.jpg   45.95K   28 downloads

#115
VCH888

VCH888

    InsanelyMac Legend

  • Members
  • PipPipPipPipPipPipPip
  • 575 posts

View Postkizwan, on Mar 10 2011, 10:42 PM, said:

Yes, I get video output through HDMI.
Attachment ati_hdmi_port.jpg

I'm using 10.7's kext. The 10.7's ATIFramebuffer is different than 10.6's Framebuffer. So I'm unable to test the senseid.

With 10.6's kexts & ATIFramebuffer patched, no output on external monitor (connected to HDMI). The display just sleep. However, monitor does detected in IORegistry with correct EDID & correct connector-type (0x800). When checked via VNC, I found QE/CI are enabled.

These are screenshots of the HDAU device:-
Attachment ati_hdmi_audio_1.jpgAttachment ati_hdmi_audio_2.jpgAttachment ati_hdmi_audio_3.jpg

You should remove IOKitPersonalities of BuiltInHDA from LegacyHDA.kext as I saw the middle picture.  my ati & nvidia;
Attached File  ati.jpg   122.18K   25 downloads Attached File  nvidia.jpg   133.22K   24 downloads

I would like to tell you from my experience.  I updated OS X to 10.6.6 and tried to used old AppleHDA.kext (10.6.4) and then I could not get HDMI audio for my HD5770. After that I got to use AppleHDA.kext v1.9.9f12 and then I got HDMI audio again.  I was thinking that ATIframebuffer might be related to AppleHDA.kext in some way but I had no idea how.  In contrast, I got to use old AppleHDA.kext (from 10.6.2-.4) for my GT240 to get HDMI audio after updating to 10.6.5-.6.  I hope bbc9 can find out something.

#116
kizwan

kizwan

    InsanelyMac Legend

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 1,422 posts

View Posttmongkol, on Mar 11 2011, 12:34 AM, said:

You should remove IOKitPersonalities of BuiltInHDA from LegacyHDA.kext as I saw the middle picture.
I'll remove it. Thanks.

View Posttmongkol, on Mar 11 2011, 12:34 AM, said:

I would like to tell you from my experience.  I updated OS X to 10.6.6 and tried to used old AppleHDA.kext (10.6.4) and then I could not get HDMI audio for my HD5770. After that I got to use AppleHDA.kext v1.9.9f12 and then I got HDMI audio again.  I was thinking that ATIframebuffer might be related to AppleHDA.kext in some way but I had no idea how.  In contrast, I got to use old AppleHDA.kext (from 10.6.2-.4) for my GT240 to get HDMI audio after updating to 10.6.5-.6.  I hope bbc9 can find out something.
I'll grab an older AppleHDA.kext from 10.6.2-4 & test it.

I will post here later after I have done some more test on this. Thank you very much.

#117
bcc9

bcc9

    InsanelyMac Legend

  • Coders
  • 1,154 posts
  • Gender:Male

View Posttmongkol, on Mar 10 2011, 06:54 AM, said:

I think bcc9 means connector-type. I may be wrong about this.  See the below picture from my HD5770;
Yes, sorry that's what I meant.  I see that he does have that value matching up just fine (as well as av-signal-type).
kizwan,
We've seen the hda-gfx under the HDAU node, but is the other matching one injecting correctly under GFX0?
If you use
ioreg -l -t -w0 > file
and send in the HDAU and GFX0 subtrees from that file then there would be no need for 20 questions about your ioregistry & screen captures :thumbsup_anim:

View Postwmarsh, on Mar 9 2011, 06:42 PM, said:

Looks to me like Iago and Hypoprion do
Ah yes, I had looked at the wrong bytes when I first checked Hypoprion.
Good to see something uses that bit.

Have you seen this thread with working LVDS for an ati mobility system?
http://www.insanelym...p...=250405&hl=
Bit 4 is 0 in this case.

So which personality is the closest match for your hardware?  (Ie which generation of ATI hardware does apple run these personalities on)?

View Posttmongkol, on Mar 10 2011, 08:34 AM, said:

I would like to tell you from my experience.  I updated OS X to 10.6.6 and tried to used old AppleHDA.kext (10.6.4) and then I could not get HDMI audio for my HD5770. After that I got to use AppleHDA.kext v1.9.9f12 and then I got HDMI audio again.  I was thinking that ATIframebuffer might be related to AppleHDA.kext in some way but I had no idea how.  In contrast, I got to use old AppleHDA.kext (from 10.6.2-.4) for my GT240 to get HDMI audio after updating to 10.6.5-.6.  I hope bbc9 can find out something.
Newer applehdacontroller has specific PCI-id checks that affect nvidia (it checks for 10de:0ac0 and 10de:0d94 in framebuffererEventHandler()).  Older code has no such checks.
Since the gt240 is 10de:0be4, I suspect this check is breaking your support.  I think the result is that it won't find the right codec-id # for your HDMI audio.  
With 10.6.6 applehda, you could try either injecting audio-codec-index into the IGPU device, for example the following if your hdmi codec is #3:i
"@1,audio-codec-index",
  Buffer (0x04)
   {
   0x03, 0x00, 0x00, 0x00
  },
or edit applehdacontroller changing one of those pci id matches to match your hardware.

#118
kizwan

kizwan

    InsanelyMac Legend

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 1,422 posts

View Postbcc9, on Mar 11 2011, 02:01 AM, said:

Yes, sorry that's what I meant.  I see that he does have that value matching up just fine (as well as av-signal-type).
kizwan,
We've seen the hda-gfx under the HDAU node, but is the other matching one injecting correctly under GFX0?
If you use
ioreg -l -t -w0 > file
and send in the HDAU and GFX0 subtrees from that file then there would be no need for 20 questions about your ioregistry & screen captures :)
There is a matching set ("hda-gfx=onboard=1") under GFX0 (or to be precised M86). This is my ioreg dump:-
Attached File  kizwan___s_1557.ioreg.zip   617.54K   20 downloads

#119
bcc9

bcc9

    InsanelyMac Legend

  • Coders
  • 1,154 posts
  • Gender:Male

View Postkizwan, on Mar 10 2011, 11:08 AM, said:

There is a matching set ("hda-gfx=onboard=1") under GFX0 (or to be precised M86). This is my ioreg dump:-
The hda-gfx set looks fine.  I don't see anything obviously wrong from that dump.  You are in a bit of unchartered ground with 10.7 video on a 10.6 system.  (10.6 AppleHDA I presume).

#120
VCH888

VCH888

    InsanelyMac Legend

  • Members
  • PipPipPipPipPipPipPip
  • 575 posts

View Postbcc9, on Mar 11 2011, 01:01 AM, said:

Newer applehdacontroller has specific PCI-id checks that affect nvidia (it checks for 10de:0ac0 and 10de:0d94 in framebuffererEventHandler()).  Older code has no such checks.
Since the gt240 is 10de:0be4, I suspect this check is breaking your support.  I think the result is that it won't find the right codec-id # for your HDMI audio.  
With 10.6.6 applehda, you could try either injecting audio-codec-index into the IGPU device, for example the following if your hdmi codec is #3:i
"@1,audio-codec-index",
  Buffer (0x04)
   {
   0x03, 0x00, 0x00, 0x00
  },
or edit applehdacontroller changing one of those pci id matches to match your hardware.

Thank you.  I will try this method.

Edit:
still couldn't get it. will try this weekend again.





2 user(s) are reading this topic

2 members, 0 guests, 0 anonymous users


© 2013 InsanelyMac  |   News  |   Forum  |   Downloads  |   OSx86 Wiki  |   Mac Netbook  |   Web hosting by CatN  |   Designed by Ed Gain  |   Logo by irfan  |   Privacy Policy