Jump to content

VIA VT2021 - Need some help getting both, and with HDMI audio

VT2021 DSDT HDMI audio GA-Z77X-UD3H

Best Answer Kasakka, 03 September 2013 - 12:31 PM

Answering my own question:

Method (_DSM, 4, NotSerialized)
            {
                Store (Package (0x06)
                    {
                        "hda-gfx", 
                        Buffer (0x0A)
                        {
                            "onboard-1"
                        },
                        "layout-id", 
                        Buffer (0x04)
                        {
                            0x0C, 0x00, 0x00, 0x00
                        }, 
                        "PinConfigurations", 
                        Buffer (0x30)
                        {
                            /* 0000 */    0x10, 0x40, 0x11, 0x01, 0xF0, 0x00, 0x00, 0x40, 
                            /* 0008 */    0xF0, 0x00, 0x00, 0x40, 0xF0, 0x00, 0x00, 0x40, 
                            /* 0010 */    0xF0, 0x00, 0x00, 0x40, 0xF0, 0x00, 0x00, 0x40, 
                            /* 0018 */    0x50, 0x30, 0x81, 0x01, 0x60, 0x90, 0xA1, 0x90, 
                            /* 0020 */    0xF0, 0x00, 0x00, 0x40, 0x20, 0x21, 0x45, 0x07, 
                            /* 0028 */    0xF0, 0x00, 0x00, 0x40, 0xF0, 0x00, 0x00, 0x40
                        }
                    }, Local0)
                DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
                Return (Local0)
            }

Thanks to toleda for code!

Go to the full post


  • Please log in to reply
2 replies to this topic

#1
Kasakka

Kasakka

    InsanelyMac Geek

  • Members
  • PipPipPip
  • 145 posts

So I've found these DSDT patches:

 

VIA VT2021, verified working built-in audio on my Gigabyte GA-Z77X-UD3H

Device (HDEF)
        {
            Name (_ADR, 0x001B0000)
            OperationRegion (HDAR, PCI_Config, 0x4C, 0x10)
            Field (HDAR, WordAcc, NoLock, Preserve)
            {
                DCKA,   1, 
                        Offset (0x01), 
                DCKM,   1, 
                    ,   6, 
                DCKS,   1, 
                        Offset (0x08), 
                    ,   15, 
                PMES,   1
            }

            Method (_PRW, 0, NotSerialized)
            {
                Return (Package (0x02)
                {
                    0x0D, 
                    0x05
                })
            }

            Method (_DSM, 4, NotSerialized)
            {
                Store (Package (0x04)
                    {
                        "layout-id", 
                        Buffer (0x04)
                        {
                             0x0C, 0x00, 0x00, 0x00
                        }, 
                        "PinConfigurations", 
                        Buffer (0x30)
                        {
                            /* 0000 */   0x10, 0x40, 0x11, 0x01, 0xF0, 0x00, 0x00, 0x40,
                            /* 0008 */   0xF0, 0x00, 0x00, 0x40, 0xF0, 0x00, 0x00, 0x40,
                            /* 0010 */   0xF0, 0x00, 0x00, 0x40, 0xF0, 0x00, 0x00, 0x40,
                            /* 0018 */   0x50, 0x30, 0x81, 0x01, 0x60, 0x90, 0xA1, 0x90,
                            /* 0020 */   0xF0, 0x00, 0x00, 0x40, 0x20, 0x21, 0x45, 0x07,
                            /* 0028 */   0xF0, 0x00, 0x00, 0x40, 0xF0, 0x00, 0x00, 0x40
                        }
                    }, Local0)
                DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
                Return (Local0)
            }
        }

HDMI audio patch (there's other stuff in this one but this is the only thing relating to HDEF), verified working on my Nvidia GTX 660 Ti

        Device (HDEF)
        {
            Name (_ADR, 0x001B0000)
            OperationRegion (HDAR, PCI_Config, 0x4C, 0x10)
            Field (HDAR, WordAcc, NoLock, Preserve)
            {
                DCKA,   1, 
                        Offset (0x01), 
                DCKM,   1, 
                    ,   6, 
                DCKS,   1, 
                        Offset (0x08), 
                    ,   15, 
                PMES,   1
            }

            Method (_PRW, 0, NotSerialized)
            {
                Return (Package (0x02)
                {
                    0x0D, 
                    0x05
                })
            }

            Method (_DSM, 4, NotSerialized)
            {
                If (LEqual (Arg2, Zero))
                {
                    Return (Buffer (One)
                    {
                        0x03
                    })
                }

                Return (Package (0x06)
                {
                    "layout-id", 
                    Buffer (0x04)
                    {
                        0x01, 0x00, 0x00, 0x00
                    }, 

                    "PinConfigurations", 
                    Buffer (Zero) {}, 
                    "hda-gfx", 
                    Buffer (0x0A)
                    {
                        "onboard-1"
                    }
                })
            }
        }

Can anyone help me combine these two so I could have the option to use BOTH internal soundcard and HDMI audio? The only differences are in Method _DSM but I don't understand how the Buffers etc relate to device functionality. I suppose the Buffer 0x30 and its contents are the VT2021 inputs and outputs but why does one use Store and the other Return etc?



#2
Kasakka

Kasakka

    InsanelyMac Geek

  • Members
  • PipPipPip
  • 145 posts

Best Answer

Answering my own question:

Method (_DSM, 4, NotSerialized)
            {
                Store (Package (0x06)
                    {
                        "hda-gfx", 
                        Buffer (0x0A)
                        {
                            "onboard-1"
                        },
                        "layout-id", 
                        Buffer (0x04)
                        {
                            0x0C, 0x00, 0x00, 0x00
                        }, 
                        "PinConfigurations", 
                        Buffer (0x30)
                        {
                            /* 0000 */    0x10, 0x40, 0x11, 0x01, 0xF0, 0x00, 0x00, 0x40, 
                            /* 0008 */    0xF0, 0x00, 0x00, 0x40, 0xF0, 0x00, 0x00, 0x40, 
                            /* 0010 */    0xF0, 0x00, 0x00, 0x40, 0xF0, 0x00, 0x00, 0x40, 
                            /* 0018 */    0x50, 0x30, 0x81, 0x01, 0x60, 0x90, 0xA1, 0x90, 
                            /* 0020 */    0xF0, 0x00, 0x00, 0x40, 0x20, 0x21, 0x45, 0x07, 
                            /* 0028 */    0xF0, 0x00, 0x00, 0x40, 0xF0, 0x00, 0x00, 0x40
                        }
                    }, Local0)
                DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
                Return (Local0)
            }

Thanks to toleda for code!



#3
ekica

ekica

    InsanelyMac Sage

  • Members
  • PipPipPipPipPipPip
  • 492 posts
  • Gender:Male
  • Location:Serbia,Zaječar,Salaš

Do you see both cards in the system report?







Also tagged with one or more of these keywords: VT2021, DSDT, HDMI audio, GA-Z77X-UD3H


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

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