Help - Search - Members - Calendar
Full Version: Dsdt Edit For Hdmi Audio
Project OS X Forums > OS X 10.6 (Snow Leopard) > Hardware Information > Sound
Krazubu
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
Can you submit DSDT.dsl of latest MBP?

Thank you.
Jingu
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.

Click to view attachment Click to view attachment Click to view attachment
jaxparo
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
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
toleda
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
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
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2012 Invision Power Services, Inc.