Passthough audio card

jonathan.young

Active Member
Apr 26, 2020
33
0
26
59
Hi All,

I would be grateful if anyone could help me with this problem. I have successfully setup and am passing through my graphics card and other devices to a windows VM. I would also like to passthrough my motherboard's sound card if possible. From lspci, the device is:

34:00.4 Audio device: Advanced Micro Devices, Inc. [AMD] Starship/Matisse HD Audio Controller

If I do: lspci -n -s 34:00.4, I get:

34:00.4 0403: 1022:1487

so I have added 1022:1487 to my vfio.conf in modprobe.d so:
more /etc/modprobe.d/vfio.conf
# Graphics Cards
options vfio-pci ids=10de:1d01,10de:0fb8,10de:1288,10de:0e0f disable_vga=1

# USB3
options vfio-pci ids=1912:0015

# SATA Controller
options vfio-pci ids=1022:7901

# Sound
options vfio-pci ids=1022:1487

# Wifi
options vfio-pci ids=8086:2723

The audio card is on in its own in an IOMMU group:
IOMMU Group 41:
34:00.4 Audio device [0403]: Advanced Micro Devices, Inc. [AMD] Starship/Matisse HD Audio Controller [1022:1487]

and I have blacklisted the snd_hda_intel drive in blacklist.conf for good measure. If I pass the other devices, the starts up fine but if I add the sound card to the vmid.conf the whole machine crashes eventually. Before that happens, I see these errors in my syslog:
May 09 19:53:41 ryzen3 kernel: vfio-pci 0000:34:00.4: not ready 1023ms after FLR; waiting
May 09 19:53:44 ryzen3 kernel: vfio-pci 0000:34:00.4: not ready 2047ms after FLR; waiting
May 09 19:53:47 ryzen3 kernel: vfio-pci 0000:34:00.4: not ready 4095ms after FLR; waiting
May 09 19:53:52 ryzen3 kernel: vfio-pci 0000:34:00.4: not ready 8191ms after FLR; waiting

Can anybody tell me where I am going wrong? Thanks
 
I suspect it's the same issue as described at length in this post. All the TRX40 "Starship devices" have some bug/quirk where FLR (function level reset) doesn't work correctly. I'm not sure if the "fix" (read: workaround) with the kernel patch for USB controllers also works for the sound card though.
 
  • Like
Reactions: fabiosun
I suspect it's the same issue as described at length in this post. All the TRX40 "Starship devices" have some bug/quirk where FLR (function level reset) doesn't work correctly. I'm not sure if the "fix" (read: workaround) with the kernel patch for USB controllers also works for the sound card though.
yes it works and you can pass and boot fine with FLR patches all available usb/audio controllers

No need to blacklist anything on my MSI TRX40 Pro 10G
for user case (All TRX40 boards I know have the same id for those problematic controllers)
id 1022:1487
id 1022:148c
Compiling kernel with these give the change to pass them..
Is it useful? not so sure of this

To see audio device working you can only pass an USB controller..which is not related to the ones you see in lspci -nnk
04:00.3 Starship USB 3.0 Host Controller [1022:148c]
23:00.3 Starship USB 3.0 Host Controller [1022:148c]
23:00.4 Starship/Matisse HD Audio Controller [1022:1487]
46:00.1 Matisse USB 3.0 Host Controller [1022:149c]
46:00.3 Matisse USB 3.0 Host Controller [1022:149c]


to see audio you can pass only:
46:00.1 Matisse USB 3.0 Host Controller [1022:149c]
46:00.3 Matisse USB 3.0 Host Controller [1022:149c]

passing only these two seems to pass all usb available(I do not pass asmedia USB controllerbecause I use proxmox on a USB disk connected to this controller) on my motherboard with also internal Realtek 2.0 USB audio (new trx40 have two chip for audio and it is possible to find a detailed technical detail about it googling)

when you pass controller using FLR patches you could see in log a similar message:
kvm: vfio: Cannot reset device 0000:23:00.4, no available reset mechanism.

This message seems to have no effect to a correct working system

*red one are not passable without patching FLR
 
Last edited:
Hi All,

----

Can anybody tell me where I am going wrong? Thanks

this attached is my window vm config:

bios: ovmf
bootdisk: sata0
cores: 64
cpu: host
efidisk0: local-lvm:vm-104-disk-1,size=4M
hostpci0: 21:00,pcie=1,x-vga=1
hostpci6: 46:00
ide0: local:iso/virtio-win-0.1.173.iso,media=cdrom,size=384670K
machine: q35
memory: 65536
name: Windows
net0: e1000=B6:90:7C:45:AF:F9,bridge=vmbr0,firewall=1
numa: 0
ostype: win10
sata0: local-lvm:vm-104-disk-0,size=32G
scsihw: virtio-scsi-pci
smbios1: uuid=89fee8df-5637-4f57-965d-e27c8ecf49ab
sockets: 1
tablet: 0
vga: none
vmgenid: 13d26033-ec05-455b-990c-cec2b600ee5b

mouse and keyboard are connected in back plate motherboard USB
But all USB are available and audio is perfect passing only that "USB" controller

I do not see your entire output of your rig (lspci -nnk) but all TRX40 I have tested have the same results (different number (46:00 for me) but same ids)
 
now that Linus Torvald has a trx40 pc..maybe we can hope in a faster development also for this new hardware :)
 
Looks like the patch has been applied as I am now able to passthough my audio card without any extra config. Hooray!
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!