]> asedeno.scripts.mit.edu Git - linux.git/commit
ASoC: soc-dpm: fixup DAI active unbalance
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Fri, 17 May 2019 01:21:12 +0000 (10:21 +0900)
committerMark Brown <broonie@kernel.org>
Mon, 20 May 2019 14:16:42 +0000 (15:16 +0100)
commitf7c4842abfa1a219554a3ffd8c317e8fdd979bec
treedb49242fb42e2609338cf53f765ef1af49f5536f
parentad6eecbfc01c987e0253371f274c3872042e4350
ASoC: soc-dpm: fixup DAI active unbalance

snd_soc_dai_link_event() is updating snd_soc_dai :: active,
but it is unbalance.
It counts up if it has startup callback.

case SND_SOC_DAPM_PRE_PMU:
...
snd_soc_dapm_widget_for_each_source_path(w, path) {
...
if (source->driver->ops->startup) {
...
=> source->active++;
}
...
}
...

But, always counts down

case SND_SOC_DAPM_PRE_PMD:
...
snd_soc_dapm_widget_for_each_source_path(w, path) {
...
=> source->active--;
...
}

This patch always counts up when SND_SOC_DAPM_PRE_PMD.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/soc-dapm.c