Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: alsa-devel@alsa-project.org,
	Kai Vehmanen <kai.vehmanen@linux.intel.com>,
	Takashi Iwai <tiwai@suse.de>,
	intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org
Subject: Re: [Intel-xe] [PATCH] ALSA: hda: i915: Alays handle -EPROBE_DEFER
Date: Wed, 15 Nov 2023 22:33:32 +0200	[thread overview]
Message-ID: <ZVUrHJL4387iYEby@intel.com> (raw)
In-Reply-To: <20231115123625.74286-1-maarten.lankhorst@linux.intel.com>

On Wed, Nov 15, 2023 at 01:36:25PM +0100, Maarten Lankhorst wrote:
> It turns out that even if the comment says that the driver can load
> fine, it's not really the case and no codecs are detected.
> Specifically for -EPROBE_DEFER, always fail the probe.
> 
> This fixes a regression when HDA-intel is loaded before i915.
> 
> Reported-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> Tested-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
> Fixes: e6d0c13e9f46 ("ALSA: hda: i915: Remove extra argument from snd_hdac_i915_init")
> Cc: Takashi Iwai <tiwai@suse.de>

Appears to work here as well. Thanks.

> 
> ---
> Using Takashi's version, as I like the separate -EPROBE_DEFER if more.
> ---
>  sound/pci/hda/hda_intel.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
> index 058f6e6491f9..8e9a003daa8d 100644
> --- a/sound/pci/hda/hda_intel.c
> +++ b/sound/pci/hda/hda_intel.c
> @@ -2140,6 +2140,9 @@ static int azx_probe(struct pci_dev *pci,
>  	if (chip->driver_caps & AZX_DCAPS_I915_COMPONENT) {
>  		err = snd_hdac_i915_init(azx_bus(chip));
>  		if (err < 0) {
> +			if (err == -EPROBE_DEFER)
> +				goto out_free;
> +
>  			/* if the controller is bound only with HDMI/DP
>  			 * (for HSW and BDW), we need to abort the probe;
>  			 * for other chips, still continue probing as other
> -- 
> 2.40.1

-- 
Ville Syrjälä
Intel

  parent reply	other threads:[~2023-11-15 20:33 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-15 12:36 [Intel-xe] [PATCH] ALSA: hda: i915: Alays handle -EPROBE_DEFER Maarten Lankhorst
2023-11-15 12:43 ` Takashi Iwai
2023-11-15 16:10 ` [Intel-xe] ✓ CI.Patch_applied: success for " Patchwork
2023-11-15 16:11 ` [Intel-xe] ✗ CI.checkpatch: warning " Patchwork
2023-11-15 16:12 ` [Intel-xe] ✓ CI.KUnit: success " Patchwork
2023-11-15 16:19 ` [Intel-xe] ✓ CI.Build: " Patchwork
2023-11-15 16:19 ` [Intel-xe] ✓ CI.Hooks: " Patchwork
2023-11-15 16:21 ` [Intel-xe] ✓ CI.checksparse: " Patchwork
2023-11-15 20:33 ` Ville Syrjälä [this message]
2023-11-17 13:09 ` [Intel-xe] ✗ CI.Patch_applied: failure " Patchwork

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=ZVUrHJL4387iYEby@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=kai.vehmanen@linux.intel.com \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=tiwai@suse.de \
    /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