[alsa-devel] [PATCH] ASoC: dapm: Treat DAI widgets like AIF widgets for power

Stephen Warren swarren at wwwdotorg.org
Wed Jun 5 22:44:12 CEST 2013

On 06/05/2013 12:37 PM, Mark Brown wrote:
> Even though they are virtual widgets DAI widgets still get counted for the
> DAPM context power management so we can't just use the active state to
> check if they should be powered as they may not be part of a complete path.
> Instead split them into input and output widgets and do the same power
> checks as we perform on AIFs.

> diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c

> @@ -3428,8 +3421,13 @@ int snd_soc_dapm_link_dai_widgets(struct snd_soc_card *card)
>  	/* For each DAI widget... */
>  	list_for_each_entry(dai_w, &card->widgets, list) {
> -		if (dai_w->id != snd_soc_dapm_dai)
> +		switch (w->id) {

That should be dai_w->id not w->id.

With that fixed,
Tested-by: Stephen Warren <swarren at nvidia.com>

I tested two things:

1) General audio playback in next-20130605, for regressions. System
suspend wasn't tested since it doesn't work there on Tegra yet.

2) System suspend, in a kernel based on v3.8, with this patch replacing
my previous "ASoC: dapm: check suspend state in dapm_dai_check_power()".


More information about the Alsa-devel mailing list