snd_hda_intel initialization failure with Xen PCI passthrough

Jason Andryuk jandryuk at gmail.com
Tue Mar 22 19:57:27 CET 2022


Hi,

I'm running Xen hypervisor and using PCI passthrough to assign an
Intel HDA audio device (00:1f.3 Audio device: Intel Corporation Cannon
Point-LP High Definition Audio Controller (rev 30)) to a Xen HVM
virtual machine.  I do this for both Linux 5.4.185 and a different
Windows 10 VM (only one at a time).  The Windows VM seems to work
every time.  The Linux VM has issues after the first VM boot.  This is
one boot of the physical hardware and multiple boots of the virtual
machines.

For Linux, on first boot, the sound card is detected and works
properly.  After that, things usually don't work.  I just ran a reboot
loop and it was:
1st boot - audio detected and working
2 & 3 - no audio
4th - audio detected and working
5 - 20 - no audio

For boots 2, 3, 5-7, dmesg shows:
[    0.760401] hdaudio hdaudioC0D0: no AFG or MFG node found
[    0.760415] snd_hda_intel 0000:00:06.0: no codecs initialized

For boots 8+, the errors changed to:
[    0.783397] hdaudio hdaudioC0D0: cannot read sub nodes for FG 0x10
[    0.783413] snd_hda_intel 0000:00:06.0: no codecs initialized

At this point, I booted a Windows 10 VM and audio works

Trying to boot Linux again gives a new error message
[    0.789041] snd_hda_intel 0000:00:06.0: Unknown capability 0
[    1.811205] snd_hda_intel 0000:00:06.0: No response from codec,
resetting bus: last cmd=0x0eef0004
[    1.811246] hdaudio hdaudioC0D0: cannot read sub nodes for FG 0x10ee
[    1.811263] snd_hda_intel 0000:00:06.0: no codecs initialized

Reboot VM and it's back to:
[    0.775917] hdaudio hdaudioC0D0: no AFG or MFG node found
[    0.775932] snd_hda_intel 0000:00:06.0: no codecs initialized

Reboot VM and again:
[    0.789069] hdaudio hdaudioC0D0: cannot read sub nodes for FG 0x10
[    0.789084] snd_hda_intel 0000:00:06.0: no codecs initialized

Reboot physical laptop:
1. boot Windows 10 - audio works
2. boot Linux - audio works
3. reboot Linux - no audio
[    0.773111] hdaudio hdaudioC0D0: no AFG or MFG node found
[    0.773151] snd_hda_intel 0000:00:06.0: no codecs initialized

This seems to me like Windows does a better job resetting the card to
get the audio hardware working.  Any suggestions on what to
investigate?

Thanks,
Jason


More information about the Alsa-devel mailing list