ASoC: Fix active count tracking for CODEC to CODEC links

For CODEC to CODEC links we need to make sure to also manage the 'active' field
of the cpu_dai CODEC.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
This commit is contained in:
Lars-Peter Clausen 2014-03-05 13:17:44 +01:00 committed by Mark Brown
parent 24894b7646
commit a1a0cc0646
1 changed files with 6 additions and 2 deletions

View File

@ -61,7 +61,9 @@ void snd_soc_runtime_activate(struct snd_soc_pcm_runtime *rtd, int stream)
cpu_dai->active++;
codec_dai->active++;
rtd->codec->active++;
if (cpu_dai->codec)
cpu_dai->codec->active++;
codec_dai->codec->active++;
}
/**
@ -91,7 +93,9 @@ void snd_soc_runtime_deactivate(struct snd_soc_pcm_runtime *rtd, int stream)
cpu_dai->active--;
codec_dai->active--;
rtd->codec->active--;
if (cpu_dai->codec)
cpu_dai->codec->active--;
codec_dai->codec->active--;
}
/**