Contribute
Register

A little Qemu action....

Joined
Jul 24, 2014
Messages
21
Motherboard
Zotac GF9300 A-E
CPU
E6750
Graphics
Quadro 600
Mac
Classic Mac
Mobile Phone
I'm using PCI Passthough of a RX580 on Qemu on a Linux host, did a little hacking and got HDMI Audio working.

First this assumes your using qemu_system_x86_64 with the -machine pc-q35-2.9 and you'll need to properly pass the device something like:

Code:
-device ioh3420,bus=pcie.0,addr=1c.0,multifunction=on,port=1,chassis=1,id=root.1 \
          -device vfio-pci,host=23:00.0,bus=root.1,addr=00.0,multifunction=on,x-vga=on,romfile=./RX580.rom \
          -device vfio-pci,host=23:00.1,bus=root.1,addr=00.1 \
You'll need to make the edit's to fit the host=address and romfile, if any, of course.

This will give you a proper PCI layout, otherwise your Audio device will show up in it's own slot, rather than the same slot as the VGA card.

Then a little IOJones action should give you the slot name of SE0. Then one of Toleda's scripts from:

https://github.com/toleda/audio_hdmi_amd-nvidia/tree/master/ssdt_hdmi-amd

I just used https://github.com/toleda/audio_hdmi_amd-nvidia/blob/master/ssdt_hdmi-amd/ssdt_hdmi-amd-default-PEG0.zip

A few edits, you just want to change PEG0 to SE0:

Code:
/*
* Intel ACPI Component Architecture
* AML/ASL+ Disassembler version 20161210-64(RM)
* Copyright (c) 2000 - 2016 Intel Corporation
*
* Disassembling to non-symbolic legacy ASL operators
*
* Disassembly of iASL4uCWFO.aml, Sat Dec  2 07:05:23 2017
*
* Original Table Header:
*     Signature        "SSDT"
*     Length           0x0000011F (287)
*     Revision         0x01
*     Checksum         0x6C
*     OEM ID           "toleda"
*     OEM Table ID     "intx58a"
*     OEM Revision     0x00003000 (12288)
*     Compiler ID      "INTL"
*     Compiler Version 0x20161210 (538317328)
*/
DefinitionBlock ("", "SSDT", 1, "toleda", "intx58a", 0x00003000)
{
    External (_SB_.PCI0.SE0_, DeviceObj)    // (from opcode)

    Scope (\_SB.PCI0.SE0)
    {
        Device (GFX0)
        {
            Name (_ADR, Zero)  // _ADR: Address
            Name (_SUN, One)  // _SUN: Slot User Number
            Method (_DSM, 4, NotSerialized)  // _DSM: Device-Specific Method
            {
                If (LEqual (Arg2, Zero))
                {
                    Return (Buffer (One)
                    {
                         0x03                                         
                    })
                }

                Return (Package (0x02)
                {
                    "hda-gfx",
                    Buffer (0x0A)
                    {
                        "onboard-2"
                    }
                })
            }
        }

        Device (HDAU)
        {
            Name (_ADR, One)  // _ADR: Address
            Method (_DSM, 4, NotSerialized)  // _DSM: Device-Specific Method
            {
                If (LEqual (Arg2, Zero))
                {
                    Return (Buffer (One)
                    {
                         0x03                                         
                    })
                }

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

                    "hda-gfx",
                    Buffer (0x0A)
                    {
                        "onboard-2"
                    }
                })
            }
        }
    }

    Store ("ssdt-intel-x58-series_amd-default_hdmi_audio_v3.0 github.com/toleda", Debug)
}
Compile it and place it in the EFI/Clover/ACPI/Pached folder as SSDT-1.aml and reboot.
 
Last edited:
Top