All of lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Jason Andryuk <jandryuk@gmail.com>
Cc: alsa-devel@alsa-project.org
Subject: Re: snd_hda_intel initialization failure with Xen PCI passthrough
Date: Wed, 23 Mar 2022 10:41:27 +0100	[thread overview]
Message-ID: <s5hh77puhtk.wl-tiwai@suse.de> (raw)
In-Reply-To: <CAKf6xpuRJ84RVfqPRJu3RL4xGF-FLkvO84SHTWEmXJFUWTgBGQ@mail.gmail.com>

On Tue, 22 Mar 2022 19:57:27 +0100,
Jason Andryuk wrote:
> 
> 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?

First off, 5.4.x is way too old to debug, please confirm the issue
with the latest kernel.

And, one test I'd try is to unload snd-hda-intel module before
rebooting.  Does the problem persist?


Takashi

  reply	other threads:[~2022-03-23  9:42 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-22 18:57 snd_hda_intel initialization failure with Xen PCI passthrough Jason Andryuk
2022-03-23  9:41 ` Takashi Iwai [this message]
2022-03-23 18:52   ` Jason Andryuk
2022-03-23 19:05     ` Takashi Iwai
2022-03-24 15:16       ` Jason Andryuk

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=s5hh77puhtk.wl-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=jandryuk@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.