aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2014-03-05 07:17:44 -0500
committerMark Brown <broonie@linaro.org>2014-03-06 04:04:55 -0500
commita1a0cc0646e38b41bfaac94f2b84422bb1df40e0 (patch)
tree38ec513eeb8f5cfe5096f85c616c5a68c8ddc555
parent24894b76468ed250d03f9718ddfe77b902995cbd (diff)
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>
-rw-r--r--sound/soc/soc-pcm.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c
index 1a9857519d65..71a01dda1867 100644
--- a/sound/soc/soc-pcm.c
+++ b/sound/soc/soc-pcm.c
@@ -61,7 +61,9 @@ void snd_soc_runtime_activate(struct snd_soc_pcm_runtime *rtd, int stream)
61 61
62 cpu_dai->active++; 62 cpu_dai->active++;
63 codec_dai->active++; 63 codec_dai->active++;
64 rtd->codec->active++; 64 if (cpu_dai->codec)
65 cpu_dai->codec->active++;
66 codec_dai->codec->active++;
65} 67}
66 68
67/** 69/**
@@ -91,7 +93,9 @@ void snd_soc_runtime_deactivate(struct snd_soc_pcm_runtime *rtd, int stream)
91 93
92 cpu_dai->active--; 94 cpu_dai->active--;
93 codec_dai->active--; 95 codec_dai->active--;
94 rtd->codec->active--; 96 if (cpu_dai->codec)
97 cpu_dai->codec->active--;
98 codec_dai->codec->active--;
95} 99}
96 100
97/** 101/**