Unverified Commit 27744454 authored by Mark Brown's avatar Mark Brown
Browse files

ASoC: SOF: enable multicore with dynamic pipelines

Merge series from Kai Vehmanen <kai.vehmanen@linux.intel.com>:

	When a pipeline is marked dynamic in the SOF DSP firmware
	topology definition (the tplg file kernel loads from filesystem),
	it means the pipeline resources are not allocated when DSP is
	booted (at driver probe, or at runtime resume), but rather delayed
	until the pipeline is actually used.
parents fdd53528 05827a15
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -188,6 +188,7 @@ static int imx8_probe(struct snd_sof_dev *sdev)
	if (!priv)
		return -ENOMEM;

	sdev->num_cores = 1;
	sdev->pdata->hw_pdata = priv;
	priv->dev = sdev->dev;
	priv->sdev = sdev;
+1 −0
Original line number Diff line number Diff line
@@ -108,6 +108,7 @@ static int imx8m_probe(struct snd_sof_dev *sdev)
	if (!priv)
		return -ENOMEM;

	sdev->num_cores = 1;
	sdev->pdata->hw_pdata = priv;
	priv->dev = sdev->dev;
	priv->sdev = sdev;
+2 −3
Original line number Diff line number Diff line
@@ -101,9 +101,8 @@ const struct snd_sof_dsp_ops sof_apl_ops = {
	/* parse platform specific extended manifest */
	.parse_platform_ext_manifest = hda_dsp_ext_man_get_cavs_config_data,

	/* dsp core power up/down */
	.core_power_up = hda_dsp_enable_core,
	.core_power_down = hda_dsp_core_reset_power_down,
	/* dsp core get/put */
	.core_get = hda_dsp_core_get,

	/* trace callback */
	.trace_init = hda_dsp_trace_init,
+9 −0
Original line number Diff line number Diff line
@@ -412,10 +412,19 @@ static int bdw_probe(struct snd_sof_dev *sdev)
	const struct sof_dev_desc *desc = pdata->desc;
	struct platform_device *pdev =
		container_of(sdev->dev, struct platform_device, dev);
	const struct sof_intel_dsp_desc *chip;
	struct resource *mmio;
	u32 base, size;
	int ret;

	chip = get_chip_info(sdev->pdata);
	if (!chip) {
		dev_err(sdev->dev, "error: no such device supported\n");
		return -EIO;
	}

	sdev->num_cores = chip->cores_num;

	/* LPE base */
	mmio = platform_get_resource(pdev, IORESOURCE_MEM,
				     desc->resindex_lpe_base);
+9 −0
Original line number Diff line number Diff line
@@ -113,10 +113,19 @@ static int byt_acpi_probe(struct snd_sof_dev *sdev)
	const struct sof_dev_desc *desc = pdata->desc;
	struct platform_device *pdev =
		container_of(sdev->dev, struct platform_device, dev);
	const struct sof_intel_dsp_desc *chip;
	struct resource *mmio;
	u32 base, size;
	int ret;

	chip = get_chip_info(sdev->pdata);
	if (!chip) {
		dev_err(sdev->dev, "error: no such device supported\n");
		return -EIO;
	}

	sdev->num_cores = chip->cores_num;

	/* DSP DMA can only access low 31 bits of host memory */
	ret = dma_coerce_mask_and_coherent(sdev->dev, DMA_BIT_MASK(31));
	if (ret < 0) {
Loading