Giter Club home page Giter Club logo

Comments (10)

mengdonglin avatar mengdonglin commented on August 16, 2024

@lgirdwood Would you provide more info here so validation can reproduce and follow up?

  • topology
  • the steps to reproduce this issue

I think you're using UP2, latest sof-dev, and sof master branch.

from linux.

lgirdwood avatar lgirdwood commented on August 16, 2024

Leafhill, I've only seen it once and it looks like an obvious runtime PM get() is needed during the duration of all topology loading.

from linux.

plbossart avatar plbossart commented on August 16, 2024

@lgirdwood did you mean something like this:

int snd_sof_load_topology(struct snd_sof_dev *sdev, const char *file)
{
	const struct firmware *fw;
	struct snd_soc_tplg_hdr *hdr;
	int ret;

	dev_dbg(sdev->dev, "loading topology:%s\n", file);

	ret = request_firmware(&fw, file, sdev->dev);
	if (ret < 0) {
		dev_err(sdev->dev, "error: tplg %s load failed with %d\n",
			file, ret);
		return ret;
	}

	ret = pm_runtime_get_sync(sdev->dev);
	if (ret < 0) {
		dev_err(sdev->dev, "error: topology load pm_runtime_get_sync failed with %d\n",
			ret);
		return ret;
	}

	hdr = (struct snd_soc_tplg_hdr *)fw->data;
	ret = snd_soc_tplg_component_load(sdev->component,
					  &sof_tplg_ops, fw,
					  SND_SOC_TPLG_INDEX_ALL);
	if (ret < 0) {
		dev_err(sdev->dev, "error: tplg component load failed %d\n",
			ret);
		ret = -EINVAL;
	}

	ret = pm_runtime_put(sdev->dev);
	if (ret < 0)
		dev_err(sdev->dev, "error: topology load pm_runtime_put failed with %d\n",
			ret);

	release_firmware(fw);
	return ret;
}

from linux.

lgirdwood avatar lgirdwood commented on August 16, 2024

@plbossart yep

from linux.

plbossart avatar plbossart commented on August 16, 2024

ok, will push this code then. Thanks

from linux.

ranj063 avatar ranj063 commented on August 16, 2024

@plbossart we enable runtime pm on sof device after the topology is loaded. To make the change above, maybe we need to change that as well?

from linux.

lgirdwood avatar lgirdwood commented on August 16, 2024

@ranj063 is that a recent update ? If not then why did we get D3 entry during topology loading as above log.

from linux.

ranj063 avatar ranj063 commented on August 16, 2024

@lgirdwood no this is not a recent change. Let me look into this today and I will comment on @plbossart 's pull request

from linux.

xiulipan avatar xiulipan commented on August 16, 2024

@ranj063
How about the resume process?
We will reload the tplg after the DSP is resumed, which means that

[ 5.445792] sof-audio sof-audio: error: failed to enter PM idle -11
May not happen at the first boot.

I believe this PR is good for the following resume tplg load.

from linux.

ranj063 avatar ranj063 commented on August 16, 2024

#249 fixes this issue

from linux.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.