aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/sof
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2020-11-20 16:09:39 +0000
committerMark Brown <broonie@kernel.org>2020-11-20 16:09:39 +0000
commit991e74d149eb9027881bd7423a8cdb87c212396a (patch)
tree6cbe25d68bf5afdf3f3e507bd41f883040ed0e42 /sound/soc/sof
parentASoC: qcom: sm8250: fix HDMI audio playback (diff)
parentASoC: SOF: Intel: allow for coexistence between SOF and catpt drivers (diff)
downloadlinux-dev-991e74d149eb9027881bd7423a8cdb87c212396a.tar.xz
linux-dev-991e74d149eb9027881bd7423a8cdb87c212396a.zip
Merge series "ASoC: Intel/SOF: extend run-time driver selection to ACPI devices" from Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>:
The module snd-intel-dspcfg, suggested by Jaroslav last year, currently provide the means to select a PCI driver at run-time, based on quirks, recommendations or user selection via a kernel parameter. This capability removed a lot of confusions in distributions and removed the need for recompilations to select legacy HDaudio, SST or SOF drivers. This patchset extends the concept to ACPI devices. This was driven by the desire to at some point deprecate the Atom/SST driver for Baytrail and Cherrytrail, which is no longer maintained by Intel. By having the SOF driver enabled by distributions for Baytrail/Cherrytrail, we can enable more end-user tests and make the transition easier for distributions (likely in 2021 at this point). This patchset provides the same solution for Broadwell, mainly to have a single build for all Intel platforms. SOF on Broadwell remains an option not recommended for distributions, as long as the 'catpt' driver is maintained there is no burning desire to make SOF the default on the three Broadwell-based platforms with the DSP enabled. Pierre-Louis Bossart (14): ASoC: Intel: broadwell: add missing pm_ops ASoC: Intel: bdw-rt5677: add missing pm_ops ALSA: hda: intel-dsp-config: add helper for ACPI DSP driver selection ASoC: soc-acpi: add helper to identify parent driver. ASoC: Intel: boards: byt/cht: set card and driver name at run time ASoC: Intel: byt/cht: set pm ops dynamically ASoC: SOF: acpi: add dynamic selection of DSP driver ASoC: Intel: Atom: add dynamic selection of DSP driver ASoC: SOF: Intel: allow for coexistence between SOF and Atom/SST drivers ALSA: hda: intel-dsp-config: add Broadwell ACPI DSP driver selection ASoC: Intel: broadwell: set card and driver name dynamically ASoC: Intel: catpt: add dynamic selection of DSP driver ASoC: SOF: Intel: allow for coexistence between SOF and catpt drivers ALSA: hda: intel-dsp-config: ignore dsp_driver parameter for PCI legacy devices include/sound/intel-dsp-config.h | 7 ++ include/sound/soc-acpi.h | 6 + sound/hda/intel-dsp-config.c | 111 +++++++++++++++++++ sound/soc/intel/Kconfig | 2 + sound/soc/intel/atom/sst/sst_acpi.c | 8 ++ sound/soc/intel/boards/bdw-rt5650.c | 17 ++- sound/soc/intel/boards/bdw-rt5677.c | 18 ++- sound/soc/intel/boards/broadwell.c | 20 ++-- sound/soc/intel/boards/bytcht_cx2072x.c | 27 +++-- sound/soc/intel/boards/bytcht_da7213.c | 27 +++-- sound/soc/intel/boards/bytcht_es8316.c | 29 +++-- sound/soc/intel/boards/bytcr_rt5640.c | 30 +++-- sound/soc/intel/boards/bytcr_rt5651.c | 27 +++-- sound/soc/intel/boards/cht_bsw_max98090_ti.c | 29 +++-- sound/soc/intel/boards/cht_bsw_nau8824.c | 29 +++-- sound/soc/intel/boards/cht_bsw_rt5645.c | 38 ++++--- sound/soc/intel/boards/cht_bsw_rt5672.c | 29 +++-- sound/soc/intel/catpt/device.c | 12 ++ sound/soc/sof/intel/Kconfig | 33 +++--- sound/soc/sof/sof-acpi-dev.c | 14 ++- 20 files changed, 392 insertions(+), 121 deletions(-) -- 2.25.1
Diffstat (limited to 'sound/soc/sof')
-rw-r--r--sound/soc/sof/intel/Kconfig33
-rw-r--r--sound/soc/sof/sof-acpi-dev.c14
2 files changed, 30 insertions, 17 deletions
diff --git a/sound/soc/sof/intel/Kconfig b/sound/soc/sof/intel/Kconfig
index b607dba5fb2a..e6302bb03c55 100644
--- a/sound/soc/sof/intel/Kconfig
+++ b/sound/soc/sof/intel/Kconfig
@@ -62,40 +62,41 @@ if SND_SOC_SOF_INTEL_ACPI
config SND_SOC_SOF_BAYTRAIL_SUPPORT
bool "SOF support for Baytrail, Braswell and Cherrytrail"
- depends on SND_SST_ATOM_HIFI2_PLATFORM_ACPI=n
help
This adds support for Sound Open Firmware for Intel(R) platforms
using the Baytrail, Braswell or Cherrytrail processors.
- This option is mutually exclusive with the Atom/SST and Baytrail
- legacy drivers. If you want to enable SOF on Baytrail/Cherrytrail,
- you need to deselect those options first.
- SOF does not support Baytrail-CR for now, so this option is not
- recommended for distros. At some point all legacy drivers will be
- deprecated but not before all userspace firmware/topology/UCM files
- are made available to downstream distros.
+ This option can coexist in the same build with the Atom legacy
+ drivers, currently the default but which will be deprecated
+ at some point.
+ Existing firmware/topology binaries and UCM configurations
+ typically located in the root file system are already
+ compatible with both SOF or Atom/SST legacy drivers.
+ This is a recommended option for distributions.
Say Y if you want to enable SOF on Baytrail/Cherrytrail.
If unsure select "N".
config SND_SOC_SOF_BAYTRAIL
tristate
select SND_SOC_SOF_INTEL_ATOM_HIFI_EP
+ select SND_INTEL_DSP_CONFIG
help
This option is not user-selectable but automagically handled by
'select' statements at a higher level.
config SND_SOC_SOF_BROADWELL_SUPPORT
bool "SOF support for Broadwell"
- depends on SND_SOC_INTEL_HASWELL=n
+ select SND_INTEL_DSP_CONFIG
help
This adds support for Sound Open Firmware for Intel(R) platforms
using the Broadwell processors.
- This option is mutually exclusive with the Haswell/Broadwell legacy
- driver. If you want to enable SOF on Broadwell you need to deselect
- the legacy driver first.
- SOF does not fully support Broadwell yet, so this option is not
- recommended for distros. At some point all legacy drivers will be
- deprecated but not before all userspace firmware/topology/UCM files
- are made available to downstream distros.
+ This option can coexist in the same build with the default 'catpt'
+ driver.
+ Existing firmware/topology binaries and UCM configurations typically
+ located in the root file system are already compatible with both SOF
+ or catpt drivers.
+ SOF does not fully support Broadwell and has limitations related to
+ DMA and suspend-resume, this is not a recommended option for
+ distributions.
Say Y if you want to enable SOF on Broadwell.
If unsure select "N".
diff --git a/sound/soc/sof/sof-acpi-dev.c b/sound/soc/sof/sof-acpi-dev.c
index a78b76ef37b2..2a369c2c6551 100644
--- a/sound/soc/sof/sof-acpi-dev.c
+++ b/sound/soc/sof/sof-acpi-dev.c
@@ -12,6 +12,7 @@
#include <linux/firmware.h>
#include <linux/module.h>
#include <linux/pm_runtime.h>
+#include <sound/intel-dsp-config.h>
#include <sound/soc-acpi.h>
#include <sound/soc-acpi-intel-match.h>
#include <sound/sof.h>
@@ -120,12 +121,23 @@ static void sof_acpi_probe_complete(struct device *dev)
static int sof_acpi_probe(struct platform_device *pdev)
{
struct device *dev = &pdev->dev;
+ const struct acpi_device_id *id;
const struct sof_dev_desc *desc;
struct snd_sof_pdata *sof_pdata;
const struct snd_sof_dsp_ops *ops;
int ret;
- dev_dbg(&pdev->dev, "ACPI DSP detected");
+ id = acpi_match_device(dev->driver->acpi_match_table, dev);
+ if (!id)
+ return -ENODEV;
+
+ ret = snd_intel_acpi_dsp_driver_probe(dev, id->id);
+ if (ret != SND_INTEL_DSP_DRIVER_ANY && ret != SND_INTEL_DSP_DRIVER_SOF) {
+ dev_dbg(dev, "SOF ACPI driver not selected, aborting probe\n");
+ return -ENODEV;
+ }
+
+ dev_dbg(dev, "ACPI DSP detected");
sof_pdata = devm_kzalloc(dev, sizeof(*sof_pdata), GFP_KERNEL);
if (!sof_pdata)