No sound when passing onboard audio to VM

Right now I have an issue that has come out of nowhere.

For the past few weeks have have had a GPU passthrough setup that has been working great for me. Here is the guide I used to set it up.

I have never been able to get my audio working on my host, so I decided to simply just dedicate my onboard audio to my VM. However, now Windows dosn’t detect it (sort of). Up until now it’s been working fine.

I am still able to see it when I enable “hidden devices” in devices manager in Windows. However, I’m not the best Windows user, I’m better with Linux. So I decided to boot my VM using a Ubuntu iso. Here is some info according to alsa-info in the guest. So it appears it’s being passed through correctly seeing as it’s being detected, but it seems like ALSA does not want to interact with it for some reason, so I have no idea what the issue is. I’m writing this from my VM, so I’ll update this in a moment with more info from the host when I shutdown the VM.

alsa-info shows 2 audio devices detected, but only one working

first one is onboard audio
01:00.0 Audio device: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) HD Audio Controller
but is not showing in most of ALSA ,except dmesg at the end:
snd_hda_intel 0000:01:00.0: no codecs found!

device shown as active in ALSA is nVidia GPU HDMI audio
07:00.0 Audio device: NVIDIA Corporation GP102 HDMI Audio Controller (rev a1)

I’ve had all sorts of sound issues with Qemu’s q35-4.0 machine — is that the version you are running? Constraining it to q35-3.1 fixed it for me. There are some known issues with nvidia due to a change as well.