From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
To: Jaroslav Kysela <perex@perex.cz>,
ALSA development <alsa-devel@alsa-project.org>
Cc: Takashi Iwai <tiwai@suse.de>
Subject: Re: [alsa-devel] [PATCH] ASoC: Skylake SST driver - blacklist the PCI device IDs for the auto probe
Date: Mon, 23 Sep 2019 13:24:22 -0500 [thread overview]
Message-ID: <cf20bc02-adb1-0207-5fb2-7b9f0479885e@linux.intel.com> (raw)
In-Reply-To: <20190923165739.3975-1-perex@perex.cz>
On 9/23/19 11:57 AM, Jaroslav Kysela wrote:
> There are basically three drivers for the PCI devices for
> the recent Intel hardware with the build-in DSPs. The legacy HDA
> driver has dmic_detect module option for the auto detection
> of the platforms with the digital microphone. Because the SOF
> driver is preferred, just skip PCI probe in the Skylake SST
> driver when the PCI device ID clashes by default. The user
> can override the auto behaviour with the pci_binding
> module parameter.
Thanks Jaroslav for re-opening this mutual-exclusion issue.
I think we want to deal with this in two alternate ways
1. static built-time exclusion based on Kconfigs
2. probe-time exclusion based on quirks (CPU ID + DMI)
For example with a SKL/KBL/APL chromebook w/ DMIC we'd want to use the
SST driver and for GLK+ we want to use SOF. For any device with
HDAudio+DMIC we'd want SOF, same for any device with SoundWire when it's
fully supported.
I can't recall if I shared the patches I worked on a couple of months
ago, but they are still at https://github.com/thesofproject/linux/pull/927
the first part essentially does the same thing as this patch, the second
relies on quirks. I've been busy with other things but indeed it's high
time we closed this for distributions.
> Boot log from Lenovo Carbon X1 (7th gen) with the default settings:
>
> snd_hda_intel 0000:00:1f.3: Digital mics found on Skylake+ platform, aborting probe
> snd_soc_skl 0000:00:1f.3: SOF driver is preferred on this platform, aborting probe
> sof-audio-pci 0000:00:1f.3: warning: No matching ASoC machine driver found
> sof-audio-pci 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if 0x040380
> ....
>
> Perhaps, it may be more wise to create one shared module and all
> three drivers should call the driver detection routine(s) from one
> place.
We did look into this and it's a bit complicated in terms of plumbing.
>
> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
> Cc: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
> ---
> sound/soc/intel/skylake/skl.c | 37 +++++++++++++++++++++++++++++++++++
> 1 file changed, 37 insertions(+)
>
> diff --git a/sound/soc/intel/skylake/skl.c b/sound/soc/intel/skylake/skl.c
> index 141dbbf975ac..cace55ca8d55 100644
> --- a/sound/soc/intel/skylake/skl.c
> +++ b/sound/soc/intel/skylake/skl.c
> @@ -38,6 +38,39 @@ static int skl_pci_binding;
> 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");
>
> +/*
> + *
> + */
> +static int skl_sof_support(struct pci_dev *pci)
> +{
> + /* the SOF driver has same PCI IDs */
> + if (pci->vendor == 0x8086) {
> + switch (pci->device) {
> +#if IS_ENABLED(CONFIG_SND_SOC_SOF_COMETLAKE_LP)
> + case 0x02c8: /* CML-LP */
> +#endif
> +#if IS_ENABLED(CONFIG_SND_SOC_SOF_COMETLAKE_H)
> + case 0x06c8: /* CML-H */
> +#endif
> +#if IS_ENABLED(CONFIG_SND_SOC_SOF_GEMINILAKE)
> + case 0x3198: /* GLK */
> +#endif
> +#if IS_ENABLED(CONFIG_SND_SOC_SOF_APOLLOLAKE)
> + case 0x5a98: /* BXT-P */
> +#endif
> +#if IS_ENABLED(CONFIG_SND_SOC_SOF_CANNONLAKE)
> + case 0x9dc8: /* CNL */
> +#endif
> +#if IS_ENABLED(CONFIG_SND_SOC_SOF_COFFEELAKE)
> + case 0xa348: /* CFL */
> +#endif
> + case 0x0000: /* a dummy value when no SOF driver enabled */
> + return 1;
> + }
> + }
> + return 0;
> +}
> +
> /*
> * initialize the PCI registers
> */
> @@ -1002,6 +1035,10 @@ static int skl_probe(struct pci_dev *pci,
> dev_err(&pci->dev, "Unknown PCI class/subclass/prog-if information (0x%06x) found, aborting probe\n", pci->class);
> return -ENODEV;
> }
> + if (skl_sof_support(pci)) {
> + dev_info(&pci->dev, "SOF driver is preferred on this platform, aborting probe\n");
> + return -ENODEV;
> + }
> dev_info(&pci->dev, "DSP detected with PCI class/subclass/prog-if info 0x%06x\n", pci->class);
> break;
> case SND_SKL_PCI_BIND_LEGACY:
>
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel
next prev parent reply other threads:[~2019-09-23 18:25 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-23 16:57 [alsa-devel] [PATCH] ASoC: Skylake SST driver - blacklist the PCI device IDs for the auto probe Jaroslav Kysela
2019-09-23 18:24 ` Pierre-Louis Bossart [this message]
2019-09-23 20:35 ` Jaroslav Kysela
2019-09-23 21:21 ` Takashi Iwai
2019-09-23 23:34 ` Pierre-Louis Bossart
2019-09-24 6:46 ` Jaroslav Kysela
2019-09-24 7:31 ` Takashi Iwai
2019-09-24 13:41 ` Pierre-Louis Bossart
2019-09-24 17:29 ` Jaroslav Kysela
2019-09-24 19:27 ` Pierre-Louis Bossart
2019-09-27 15:31 ` Cezary Rojewski
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=cf20bc02-adb1-0207-5fb2-7b9f0479885e@linux.intel.com \
--to=pierre-louis.bossart@linux.intel.com \
--cc=alsa-devel@alsa-project.org \
--cc=perex@perex.cz \
--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