Commit a1a0cc06 authored by Lars-Peter Clausen's avatar Lars-Peter Clausen Committed by Mark Brown

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: default avatarLars-Peter Clausen <lars@metafoo.de>
Signed-off-by: default avatarMark Brown <broonie@linaro.org>
parent 24894b76
...@@ -61,7 +61,9 @@ void snd_soc_runtime_activate(struct snd_soc_pcm_runtime *rtd, int stream) ...@@ -61,7 +61,9 @@ void snd_soc_runtime_activate(struct snd_soc_pcm_runtime *rtd, int stream)
cpu_dai->active++; cpu_dai->active++;
codec_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) ...@@ -91,7 +93,9 @@ void snd_soc_runtime_deactivate(struct snd_soc_pcm_runtime *rtd, int stream)
cpu_dai->active--; cpu_dai->active--;
codec_dai->active--; codec_dai->active--;
rtd->codec->active--; if (cpu_dai->codec)
cpu_dai->codec->active--;
codec_dai->codec->active--;
} }
/** /**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment