nouveau.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Kai-Heng Feng <kai.heng.feng-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>
To: Ilia Mirkin <imirkin-FrUbXkNCsVf2fBVCVOL8/A@public.gmane.org>
Cc: "moderated list:SOUND"
	<alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw@public.gmane.org>,
	Kai Vehmanen
	<kai.vehmanen-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>,
	Takashi Iwai <tiwai-l3A5Bk7waGM@public.gmane.org>,
	nouveau
	<nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org>,
	tiwai-IBi9RG/b67k@public.gmane.org,
	open list <linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	Pierre-Louis Bossart
	<pierre-louis.bossart-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>,
	Alex Deucher <alexander.deucher-5C7GfCeVMHo@public.gmane.org>,
	Alan Stern
	<stern-nwvwT67g6+6dFdvTe/nMLpVzexx5G7lz@public.gmane.org>,
	Linux PCI <linux-pci-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	Bjorn Helgaas <bhelgaas-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>,
	Jaroslav Kysela <perex-/Fr2/VpizcU@public.gmane.org>,
	Mike Rapoport <rppt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
Subject: Re: [PATCH v2] ALSA: hda: Continue to probe when codec probe fails
Date: Tue, 22 Dec 2020 10:49:53 +0800	[thread overview]
Message-ID: <CAAd53p4=bSX26QzsPyV1sxADiuVn2sowWyb5JFDoPZQ+ZYoCzA@mail.gmail.com> (raw)
In-Reply-To: <CAKb7UvjWX7xbwMKtnad5EVy16nY1M-A13YJeRWyUwHzemcVswA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

On Tue, Dec 22, 2020 at 1:56 AM Ilia Mirkin <imirkin-FrUbXkNCsVf2fBVCVOL8/A@public.gmane.org> wrote:
>
> On Mon, Dec 21, 2020 at 11:33 AM Kai-Heng Feng
> <kai.heng.feng-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org> wrote:
> >
> > [+Cc nouveau]
> >
> > On Fri, Dec 18, 2020 at 4:06 PM Takashi Iwai <tiwai-l3A5Bk7waGM@public.gmane.org> wrote:
> > [snip]
> > > > Quite possibly the system doesn't power up HDA controller when there's
> > > > no external monitor.
> > > > So when it's connected to external monitor, it's still needed for HDMI audio.
> > > > Let me ask the user to confirm this.
> > >
> > > Yeah, it's the basic question whether the HD-audio is supposed to work
> > > on this machine at all.  If yes, the current approach we take makes
> > > less sense - instead we should rather make the HD-audio controller
> > > working.
> >
> > Yea, confirmed that the Nvidia HDA works when HDMI is connected prior boot.
> >
> > > > > - The second problem is that pci_enable_device() ignores the error
> > > > >   returned from pci_set_power_state() if it's -EIO.  And the
> > > > >   inaccessible access error returns -EIO, although it's rather a fatal
> > > > >   problem.  So the driver believes as the PCI device gets enabled
> > > > >   properly.
> > > >
> > > > This was introduced in 2005, by Alan's 11f3859b1e85 ("[PATCH] PCI: Fix
> > > > regression in pci_enable_device_bars") to fix UHCI controller.
> > > >
> > > > >
> > > > > - The third problem is that HD-audio driver blindly believes the
> > > > >   codec_mask read from the register even if it's a read failure as I
> > > > >   already showed.
> > > >
> > > > This approach has least regression risk.
> > >
> > > Yes, but it assumes that HD-audio is really non-existent.
> >
> > I really don't know any good approach to address this.
> > On Windows, HDA PCI is "hidden" until HDMI cable is plugged, then the
> > driver will flag the magic bit to make HDA audio appear on the PCI
> > bus.
> > IIRC the current approach is to make nouveau and device link work.
>
> I don't have the full context of this discussion, but the kernel
> force-enables the HDA subfunction nowadays, irrespective of nouveau or
> nvidia or whatever:

That's the problem.

The nvidia HDA controller on the affected system only gets its power
after HDMI cable plugged, so the probe on boot fails.

Kai-Heng

>
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/pci/quirks.c?h=v5.10#n5267
>
> Cheers,
>
>   -ilia

  parent reply	other threads:[~2020-12-22  2:49 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20201214060621.1102931-1-kai.heng.feng@canonical.com>
     [not found] ` <20201216124726.2842197-1-kai.heng.feng@canonical.com>
     [not found]   ` <s5h5z51oj12.wl-tiwai@suse.de>
     [not found]     ` <CAAd53p6kORC1GsW5zt+=0=J5ki43iriO-OqtFvf5W67LWhyyhA@mail.gmail.com>
     [not found]       ` <s5hzh2dn3oa.wl-tiwai@suse.de>
     [not found]         ` <CAAd53p6Ef2zFX_t3y1c6O7BmHnxYGtGSfgzXAMQSom1ainWXzg@mail.gmail.com>
     [not found]           ` <s5hsg85n2km.wl-tiwai@suse.de>
     [not found]             ` <s5hmtydn0yg.wl-tiwai@suse.de>
     [not found]               ` <CAAd53p6MMFh=HCNF9pyrJc9hVMZWFe7_8MvBcBHVWARqHU_TTA@mail.gmail.com>
     [not found]                 ` <s5h7dpfk06y.wl-tiwai@suse.de>
     [not found]                   ` <s5h7dpfk06y.wl-tiwai-l3A5Bk7waGM@public.gmane.org>
2020-12-21 16:33                     ` [PATCH v2] ALSA: hda: Continue to probe when codec probe fails Kai-Heng Feng
     [not found]                       ` <CAAd53p53w0H6tsb4JgQtFTkYinniicTYBs2uk7tc=heP2dM_Cw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2020-12-21 16:47                         ` Takashi Iwai
     [not found]                           ` <s5hft3zf6mi.wl-tiwai-l3A5Bk7waGM@public.gmane.org>
2020-12-21 17:15                             ` Kai-Heng Feng
2020-12-21 17:56                         ` Ilia Mirkin
     [not found]                           ` <CAKb7UvjWX7xbwMKtnad5EVy16nY1M-A13YJeRWyUwHzemcVswA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2020-12-22  2:49                             ` Kai-Heng Feng [this message]
     [not found]                               ` <CAAd53p4=bSX26QzsPyV1sxADiuVn2sowWyb5JFDoPZQ+ZYoCzA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2021-01-04 13:20                                 ` Karol Herbst
2021-04-10 15:51                                   ` [Nouveau] " Roy Spliet
2021-04-10 19:23                                     ` Lukas Wunner
2021-04-10 20:48                                       ` Roy Spliet
2021-04-12 19:06                                         ` Aaron Plattner
2021-04-12 19:36                                           ` Roy Spliet
2021-04-12 20:00                                             ` Aaron Plattner
2021-04-12 20:03                                               ` Ilia Mirkin
2021-04-13  0:10                                             ` Karol Herbst
2021-04-13  8:24                                               ` Roy Spliet
2021-04-13  9:48                                                 ` Karol Herbst
2021-04-13 11:17                                                   ` Roy Spliet
2021-04-13 11:49                                                     ` Karol Herbst

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='CAAd53p4=bSX26QzsPyV1sxADiuVn2sowWyb5JFDoPZQ+ZYoCzA@mail.gmail.com' \
    --to=kai.heng.feng-z7wlfzj8ewms+fvcfc7uqw@public.gmane.org \
    --cc=alexander.deucher-5C7GfCeVMHo@public.gmane.org \
    --cc=alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw@public.gmane.org \
    --cc=bhelgaas-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org \
    --cc=imirkin-FrUbXkNCsVf2fBVCVOL8/A@public.gmane.org \
    --cc=kai.vehmanen-VuQAYsv1563Yd54FQh9/CA@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-pci-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    --cc=perex-/Fr2/VpizcU@public.gmane.org \
    --cc=pierre-louis.bossart-VuQAYsv1563Yd54FQh9/CA@public.gmane.org \
    --cc=rppt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=stern-nwvwT67g6+6dFdvTe/nMLpVzexx5G7lz@public.gmane.org \
    --cc=tiwai-IBi9RG/b67k@public.gmane.org \
    --cc=tiwai-l3A5Bk7waGM@public.gmane.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).