[alsa-devel] [ASoC]Changing the order of trigger in soc_pcm_trigger

Nobin Mathew nobin.mathew at gmail.com
Wed Jun 6 15:06:52 CEST 2007


Liam,

I have one suggestion.

Can we use this

if (rtd->codec_dai->ops.trigger) {
		ret = rtd->codec_dai->ops.trigger(substream, cmd);
		if (ret < 0)
			return ret;
	}

if (rtd->cpu_dai->ops.trigger) {
	ret = rtd->cpu_dai->ops.trigger(substream, cmd);
	if (ret < 0)
		return ret;
}
if (platform->pcm_ops->trigger) {
	ret = platform->pcm_ops->trigger(substream, cmd);
	if (ret < 0)
		return ret;
}

Instead of

if (rtd->codec_dai->ops.trigger) {
		ret = rtd->codec_dai->ops.trigger(substream, cmd);
		if (ret < 0)
			return ret;
	}

if (platform->pcm_ops->trigger) {
	ret = platform->pcm_ops->trigger(substream, cmd);
	if (ret < 0)
		return ret;
}

if (rtd->cpu_dai->ops.trigger) {
	ret = rtd->cpu_dai->ops.trigger(substream, cmd);
	if (ret < 0)
		return ret;
}


That means trigger the Cpu before pcm. Because most of the controllers
needs to be initialized and triggered before external DMA is
triggered.

Correct me if i am going wrong.

This was causing so many problems in my hardware.

Nobin Mathew


More information about the Alsa-devel mailing list