public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Ingo Molnar <mingo@kernel.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
	Takashi Iwai <tiwai@suse.de>,
	Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>,
	Mark Brown <broonie@kernel.org>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [GIT PULL] sound updates for 4.21
Date: Fri, 28 Dec 2018 18:07:09 +0100	[thread overview]
Message-ID: <s5hmuoplgw2.wl-tiwai@suse.de> (raw)
In-Reply-To: <20181228124303.GA16558@gmail.com>

On Fri, 28 Dec 2018 13:43:03 +0100,
Ingo Molnar wrote:
> 
> 
> * Linus Torvalds <torvalds@linux-foundation.org> wrote:
> 
> > On Thu, Dec 20, 2018 at 7:38 AM Takashi Iwai <tiwai@suse.de> wrote:
> > >
> > >   git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git tags/sound-4.21-rc1
> > 
> > Hmm.
> > 
> > It turns out that commit c337104b1a16 ("ALSA: HD-Audio: SKL+: abort
> > probe if DSP is present and Skylake driver selected") causes my laptop
> > (XPS13 9350) to no longer suspend.
> 
> Just a wild guess, I can see two ways in which that commit could make a 
> difference on your setup:
> 
> 1)
> 
> If any of these is not set in your .config:
> 
> +       select SND_HDA_INTEL_DSP_DETECTION_SKL if SND_SOC_INTEL_SKL
> +       select SND_HDA_INTEL_DSP_DETECTION_APL if SND_SOC_INTEL_APL
> +       select SND_HDA_INTEL_DSP_DETECTION_KBL if SND_SOC_INTEL_KBL
> +       select SND_HDA_INTEL_DSP_DETECTION_GLK if SND_SOC_INTEL_GLK
> +       select SND_HDA_INTEL_DSP_DETECTION_CNL if SND_SOC_INTEL_CNL
> +       select SND_HDA_INTEL_DSP_DETECTION_CFL if SND_SOC_INTEL_CFL
> 
> I.e. I'd enable all of the SND_SOC_INTEL_* options to cover this angle.
> 
> 2)
> 
> There's the added logic of checking whether the DSP is enabled:
> 
> +       /* check if this driver can be used on SKL+ Intel platforms */
> +       if ((pci_id->driver_data & AZX_DCAPS_INTEL_SHARED) &&
> +           pci->class != 0x040300)
> +               return -ENODEV;
> +
> 
> if pci->class is not 0x040300 the driver could end up not detecting the 
> device while previously it would.
> 
> That code goes through several transformations later on - but the hack 
> below should make the commit an invariant. I think. Totally untested 
> though.

Yes, Linus pointed out a similar "fix" to make things working again in
a later thread without Cc to ML.

The problem seems to be that this laptop doesn't work with ASoC Intel
SST driver now we're trying to bind when DSP is available.  From
heuristics, it's identified from PCI class number, but this doesn't
seem enough on some models, unfortunately.

And, the old behavior (bind with "legacy" HDA-Intel driver) should be
achieved simply by passing pci_binding=1 option to snd-hda-intel
module, i.e. a patch like below would be enough:

--- a/sound/pci/hda/hda_intel.c
+++ b/sound/pci/hda/hda_intel.c
@@ -172,7 +172,7 @@ module_param_array(beep_mode, bool, NULL, 0444);
 MODULE_PARM_DESC(beep_mode, "Select HDA Beep registration mode "
 			    "(0=off, 1=on) (default=1).");
 #endif
-static int skl_pci_binding;
+static int skl_pci_binding = 1;
 module_param_named(pci_binding, skl_pci_binding, int, 0444);
 MODULE_PARM_DESC(pci_binding, "PCI binding (0=auto, 1=only legacy, 2=only asoc");
 
===

Actually, there are two aspects wrt this problem:

1) Whether ASoC driver cannot work with these Dell machines at all

2) Whether we want to keep binding with the legacy HDA driver even if
   DSP is available

AFAIK, the problem seems specific to some Dell models (XPS13 or such),
and I thought Intel already tested with these laptops.  But maybe the
behavior differs depending on the model number or BIOS.  IIRC, XPS13
already showed a drastic change of the HD-audio binding by BIOS
upgrades in the past, too.  So (1) might be some machine-specific
fixes in the end.

But, even if (1) is fixed somehow, the user-visible behavior may be
slightly different from the earlier kernels (e.g. routing setup
required, etc), and this might annoy existing users.  That's the
question in (2).

If we prefer being conservative and keeping the binding with the
legacy HDA driver as-is, it'd be reasonable to provide (yet) another
Kconfig to choose the default option value above.

Or, we may add some blacklisting (e.g. via DMI matching) in HDA-Intel
driver side to skip the faulty PCI class check.

I'm not sure which solution we'll take in the end, but certainly it's
a bug that has to be fixed soonish.


thanks,

Takashi

  reply	other threads:[~2018-12-28 17:07 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-20 15:38 [GIT PULL] sound updates for 4.21 Takashi Iwai
2018-12-25 23:20 ` pr-tracker-bot
2018-12-27  3:31 ` Linus Torvalds
2018-12-28 12:43   ` Ingo Molnar
2018-12-28 17:07     ` Takashi Iwai [this message]
2018-12-28 19:04       ` Linus Torvalds
2018-12-30  9:21         ` Takashi Iwai
     [not found]           ` <82bb7f60-c3c2-4715-a0a0-f1f2a8b14c74@linux.intel.com>
2018-12-31  0:19             ` Linus Torvalds
2018-12-31  0:54               ` Pierre-Louis Bossart
2018-12-31  8:11             ` Takashi Iwai
2018-12-31 10:24               ` Pierre-Louis Bossart
2018-12-31 18:15                 ` Takashi Iwai
2018-12-31 20:10                   ` Pierre-Louis Bossart
2018-12-31 21:02                     ` Hans de Goede
2018-12-31 13:43               ` Azat Khuzhin
2018-12-31 15:22                 ` Pierre-Louis Bossart
2019-01-05  0:34                   ` Azat Khuzhin
2019-01-05  2:12                     ` Pierre-Louis Bossart

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=s5hmuoplgw2.wl-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=broonie@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=pierre-louis.bossart@linux.intel.com \
    --cc=torvalds@linux-foundation.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