Possible way to 'reset' a sound card in the host OS after it has been used?

I have a fully working Linux Mint 18.3 installation (host) with a GPU passthrough’d Windows VM and a GPU passthrough’d Linux-based VM (using libvirt in both cases). I use one VM at a time.

I have a Sound Blaster Zx that I pass through to both VMs above and it works as intended individually.

However, as soon as I initialize the Windows VM (and stop it) the sound card stops working in the Linux-based VM any time after that. If I don’t initialize the Windows VM the sound card works in the Linux-based VM, even if I start/stop the VM repeatedly.

The sound card is using the snd_hda_intel driver on the Linux side of things and is throwing a couple of kernel lines when booting up:

snd_hda_intel azx_get response timeout, switching to polling mode: last cmd=0x005f0900
snd_hda_intel IRQ timing workaround is activated for card 1. Suggest a bigger bdl_pos_adj.

Note that those lines exist in the log in both cases (working/not working).

The only way, so far, to get the sound card to get back to a working state in the Linux-based VM is to reboot the host OS.

So, is there a way to ‘reset’ the sound card in the host OS after the Windows VM has shut down, please?

You can do an lsmod before booting the VMs and see which module is being used for sound. You can then power on the VM and create the fault situation.

Use lsmod again to see if the module is still loaded. also take a look at dmesg to see what the last lines are, you may want to tail /var/log as well.

modprobe <module_name> should be able to load the module in question. If it cannot load, it should give you an error message.


sudo alsactl restore


sudo alsa-reload

Would alsa have control of the sound card if it was handed to another “machine” via Virt/KVM?

I wouldn’t know.

OP was asking about resetting sound in Linux Mint