Jump to content
Welcome to InsanelyMac Forum

Register now to gain access to all of our features. Once registered and logged in, you will be able to contribute to this site by submitting your own content or replying to existing content. You'll be able to customize your profile, receive reputation points as a reward for submitting content, while also communicating with other members via your own private inbox, plus much more! This message will be removed once you have signed in.

  • Announcements

    • Allan

      Forum Rules   04/13/2018

      Hello folks! As some things are being fixed, we'll keep you updated. Per hour the Forum Rules don't have a dedicated "Tab", so here is the place that we have our Rules back. New Users Lounge > [READ] - InsanelyMac Forum Rules - The InsanelyMac Staff Team. 
Kasakka

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

3 posts in this topic

Recommended 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?

Share this post


Link to post
Share on other sites

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!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Recently Browsing   0 members

    No registered users viewing this page.



×