ProjectOSX

Welcome Guest!

Returning User? Login here.

Want membership privileges? Register here.

 
Start a new topic Add Reply
> Dsdt Edit For Hdmi Audio
Krazubu
post Apr 18 2010, 03:42 PM
Post #1
I hunted for new tracks about HDMI audio support that works with latest mbp and found some interesting stuff.
I found that a string hda-gfx is injected at 2 places, inside GFX node and HDEF one, and this stuff comes from DSDT.
As I really don't like to mess with DSDT I leave it up to you to find how to copy it on your own hardware.
Maybe it works only with nvidia, I don't really know.

GFX area :
CODE
Scope (\_SB.PCI0.IXVE.IGPU)
            {
                OperationRegion (A1E0, PCI_Config, 0x00, 0x40)
                Field (A1E0, ByteAcc, NoLock, Preserve)
                {
                    VID,    16,
                    DID,    16
                }

                Method (CMPB, 2, NotSerialized)
                {
                    Store (SizeOf (Arg0), Local1)
                    If (LNotEqual (Local1, SizeOf (Arg1)))
                    {
                        Return (0x00)
                    }

                    Store (0x00, Local0)
                    While (LLess (Local0, Local1))
                    {
                        If (LNotEqual (DerefOf (Index (Arg0, Local0)), DerefOf (Index (
                            Arg1, Local0))))
                        {
                            Return (0x00)
                        }

                        Increment (Local0)
                    }

                    Return (0x01)
                }

                Method (_DSM, 4, NotSerialized)
                {
                    Name (GUI1, Buffer (0x10)
                    {
                        /* 0000 */    0xC6, 0xB7, 0xB5, 0xA0, 0x18, 0x13, 0x1C, 0x44,
                        /* 0008 */    0xB0, 0xC9, 0xFE, 0x69, 0x5E, 0xAF, 0x94, 0x9B
                    })
                    If (LEqual (CMPB (Arg0, GUI1), 0x01))
                    {
                        If (LNotEqual (And (DID, 0xFFFF), 0xFFFF))
                        {
                            Store (Package (0x02)
                                {
                                    "hda-gfx",
                                    Buffer (0x0A)
                                    {
                                        "onboard-1"
                                    }
                                }, Local0)
                            DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
                            Return (Local0)
                        }

                        Return (0x80000002)
                    }

                    Store ("----- IGPU _DSM --------", Debug)
                    If (CMPB (Arg0, Buffer (0x10)
                            {
                                /* 0000 */    0x75, 0x0B, 0xA5, 0xD4, 0xC7, 0x65, 0xF7, 0x46,
                                /* 0008 */    0xBF, 0xB7, 0x41, 0x51, 0x4C, 0xEA, 0x02, 0x44
                            }))
                    {
                        Return (NBCI (Arg0, Arg1, Arg2, Arg3))
                    }

                    Return (0x80000002)
                }
            }


HDEF area :
CODE
Scope (\_SB.PCI0.IXVE.IGPU)
            {
                OperationRegion (A1E0, PCI_Config, 0x00, 0x40)
                Field (A1E0, ByteAcc, NoLock, Preserve)
                {
                    VID,    16,
                    DID,    16
                }

                Method (CMPB, 2, NotSerialized)
                {
                    Store (SizeOf (Arg0), Local1)
                    If (LNotEqual (Local1, SizeOf (Arg1)))
                    {
                        Return (0x00)
                    }

                    Store (0x00, Local0)
                    While (LLess (Local0, Local1))
                    {
                        If (LNotEqual (DerefOf (Index (Arg0, Local0)), DerefOf (Index (
                            Arg1, Local0))))
                        {
                            Return (0x00)
                        }

                        Increment (Local0)
                    }

                    Return (0x01)
                }

                Method (_DSM, 4, NotSerialized)
                {
                    Name (GUI1, Buffer (0x10)
                    {
                        /* 0000 */    0xC6, 0xB7, 0xB5, 0xA0, 0x18, 0x13, 0x1C, 0x44,
                        /* 0008 */    0xB0, 0xC9, 0xFE, 0x69, 0x5E, 0xAF, 0x94, 0x9B
                    })
                    If (LEqual (CMPB (Arg0, GUI1), 0x01))
                    {
                        If (LNotEqual (And (DID, 0xFFFF), 0xFFFF))
                        {
                            Store (Package (0x02)
                                {
                                    "hda-gfx",
                                    Buffer (0x0A)
                                    {
                                        "onboard-1"
                                    }
                                }, Local0)
                            DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
                            Return (Local0)
                        }

                        Return (0x80000002)
                    }

                    Store ("----- IGPU _DSM --------", Debug)
                    If (CMPB (Arg0, Buffer (0x10)
                            {
                                /* 0000 */    0x75, 0x0B, 0xA5, 0xD4, 0xC7, 0x65, 0xF7, 0x46,
                                /* 0008 */    0xBF, 0xB7, 0x41, 0x51, 0x4C, 0xEA, 0x02, 0x44
                            }))
                    {
                        Return (NBCI (Arg0, Arg1, Arg2, Arg3))
                    }

                    Return (0x80000002)
                }
            }

My guess is that you just inject "hda-gfx"="onboard-1" to your HDEF and GFX nodes, then ensure your mobo audio header is detected and working.

If you go somewhere with that keep us updated thanks.
intamara
post May 20 2010, 03:48 AM
Post #2
Can you submit DSDT.dsl of latest MBP?

Thank you.
Z77X-UP5 TH; i7 3770K; HD4000 (platform-id = 0166000a for getting HDMI audio) & HD6870 (ssdt-"Gibba"+Clover for patching AMD6000Controller); as MBP10,1 ; 10.8.5 Mountain Lion
Clover UEFI: Sleep/Wake OK
Jingu
post Aug 21 2010, 01:12 PM
Post #3
HDMI AUDIO WORKING!!

I have an Asus Core i7 laptop with the NVidia GT240M. I got my instructions from Tmongkol on insanelymac. Post #785 for my details.

http://www.insanelymac.com/forum/index.php...p;#entry1448833

The HDMI is connected to my Onkyo TX-SR606 audio receiver. I can do up to 7.1 multichannel analog, or bitstream Dolby Digital 5.1 to the receiver with VLC Media Player by selecting Built-In HDMI Output (Encoded Output).

I tried the 5.1 AAC encoded Apple trailer of Skyline. Crisp, neat and vibrant 5.1 analog sound coming out of all 5 speakers and the subwoofer. Quite neat.

Attached File  SystProfHDMI.png ( 95.96K ) Number of downloads: 324
Attached File  MIDIAudioDev.png ( 91.16K ) Number of downloads: 273
Attached File  SoundPrefOut.png ( 57.92K ) Number of downloads: 248


This post has been edited by Jingu: Aug 27 2010, 02:33 PM
jaxparo
post Feb 8 2011, 09:09 AM
Post #4
QUOTE (Krazubu @ Apr 18 2010, 09:42 AM) *
I hunted for new tracks about HDMI audio support that works with latest mbp and found some interesting stuff.
I found that a string hda-gfx is injected at 2 places, inside GFX node and HDEF one, and this stuff comes from DSDT.

I think you mistakenly posted the same segments of DSDT twice, both identical and both coming from from what you're calling the GFX node?

I've got the DSDT extracted from a new Mini with HDMI and this extracted DSDT segment is identical to the segment you've posted, in Device IXVE rather than GFX. I'll attach the complete DSDT.aml file, and the two code segments below are what I believe should match your two segments:

From Device HDEF area:
CODE

Device (HDEF)
{
Name (_ADR, 0x00080000)
OperationRegion (A1E0, PCI_Config, 0x00, 0x04)
Field (A1E0, ByteAcc, NoLock, Preserve)
{
VID0, 16,
DID0, 16
}

OperationRegion (A1E2, PCI_Config, 0xF4, 0x04)
Field (A1E2, ByteAcc, NoLock, Preserve)
{
, 20,
HDCD, 1
}

OperationRegion (PMCR, PCI_Config, 0x48, 0x04)
Field (PMCR, AnyAcc, NoLock, Preserve)
{
PMDX, 2
}

OperationRegion (FCFG, PCI_Config, 0xF8, 0x04)
Field (FCFG, AnyAcc, NoLock, Preserve)
{
Offset (0x02),
MCOH, 2
}

Method (_PS0, 0, NotSerialized)
{
If (\_SB.PCI0.COHW ())
{
Store (0x00, PMDX)
Sleep (0x05)
Store (0x01, MCOH)
}
}

Method (_PS3, 0, NotSerialized)
{
}

Method (_DSM, 4, NotSerialized)
{
If (LEqual (Arg0, Buffer (0x10)
{
/* 0000 */ 0xC6, 0xB7, 0xB5, 0xA0, 0x18, 0x13, 0x1C, 0x44,
/* 0008 */ 0xB0, 0xC9, 0xFE, 0x69, 0x5E, 0xAF, 0x94, 0x9B
}))
{
If (LNotEqual (And (VID0, 0xFFFF), 0xFFFF))
{
If (LEqual (And (HDCD, 0x01), 0x01))
{
Store (Package (0x02)
{
"hda-gfx",
Buffer (0x0A)
{
"onboard-1"
}
}, Local0)
DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
Return (Local0)
}
}
}

Return (0x80000002)
}
}


From Device IXVE area:
CODE

Scope (\_SB.PCI0.IXVE.IGPU)
{
OperationRegion (A1E0, PCI_Config, 0x00, 0x40)
Field (A1E0, ByteAcc, NoLock, Preserve)
{
VID, 16,
DID, 16
}

Method (CMPB, 2, NotSerialized)
{
Store (SizeOf (Arg0), Local1)
If (LNotEqual (Local1, SizeOf (Arg1)))
{
Return (0x00)
}

Store (0x00, Local0)
While (LLess (Local0, Local1))
{
If (LNotEqual (DerefOf (Index (Arg0, Local0)), DerefOf (Index (
Arg1, Local0))))
{
Return (0x00)
}

Increment (Local0)
}

Return (0x01)
}

Method (_DSM, 4, NotSerialized)
{
Name (GUI1, Buffer (0x10)
{
/* 0000 */ 0xC6, 0xB7, 0xB5, 0xA0, 0x18, 0x13, 0x1C, 0x44,
/* 0008 */ 0xB0, 0xC9, 0xFE, 0x69, 0x5E, 0xAF, 0x94, 0x9B
})
If (LEqual (CMPB (Arg0, GUI1), 0x01))
{
If (LNotEqual (And (DID, 0xFFFF), 0xFFFF))
{
Store (Package (0x02)
{
"hda-gfx",
Buffer (0x0A)
{
"onboard-1"
}
}, Local0)
DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
Return (Local0)
}

Return (0x80000002)
Jingu
post Mar 28 2011, 12:42 AM
Post #5
UPDATE: HDMI Audio on SL 10.6.6

Thanks to tmongkol/toleda on insanelymac post# 760, I've re-enable HDMI audio on SL 10.6.6

http://www.insanelymac.com/forum/index.php...p;#entry1448833


An additional device properties has to be injected to get HDMI back: @1,connector-type

CODE
"@1,connector-type",
Buffer (0x04)
{
0x00, 0x08, 0x00, 0x00
},


Or, with Chameleon 2 RC5 bootloader, I've added 2 additional lines to the nvidia.c file

CODE
uint8_t connector_type_1[]= {0x00, 0x08, 0x00, 0x00};
devprop_add_value(device, "@1,connector-type", connector_type_1, 4);


Now, HDMI audio is back on SL 10.6.6

This post has been edited by Jingu: Mar 29 2011, 03:58 PM
toleda
post Apr 18 2011, 02:36 AM
Post #6
QUOTE (Jingu @ Mar 27 2011, 08:42 PM) *
UPDATE: HDMI Audio on SL 10.6.6

Thanks to tmongkol/toleda on insanelymac post# 760, I've re-enable HDMI audio on SL 10.6.6

http://www.insanelymac.com/forum/index.php...p;#entry1448833


Or, with Chameleon 2 RC5 bootloader, I've added 2 additional lines to the nvidia.c file

CODE
uint8_t connector_type_1[]= {0x00, 0x08, 0x00, 0x00};
devprop_add_value(device, "@1,connector-type", connector_type_1, 4);


Now, HDMI audio is back on SL 10.6.6


Jingu, I'm interested in learning more about your modification to nvidia.c in Chameleon 2 RC. Any links? Thanks.

Slice
post Apr 18 2011, 06:33 AM
Post #7
QUOTE (toleda @ Apr 18 2011, 06:36 AM) *
Jingu, I'm interested in learning more about your modification to nvidia.c in Chameleon 2 RC. Any links? Thanks.

http://forge.voodooprojects.org/p/chameleo...e/HEAD/branches
Пожалуйста, прочитайте ЧаВо!
i3-2120 GA-H61M-S1, Radeon HD6670, ALC887(VoodooHDA 2.8.4), OS⌘10.9.2, OS⌘ 10.7.5 Clover FakeSMC_plugins_3.3.1 Realtek LAN v3.1.2

Add Reply Start a new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members: