aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/soc-pcm.c
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2014-03-05 07:17:47 -0500
committerMark Brown <broonie@linaro.org>2014-03-06 04:04:55 -0500
commitcdde4ccb14b4959bd1c96a07367bf02b746328d3 (patch)
treed810edb5e51f268dfb1005a8e74ba90cc3dd9f69 /sound/soc/soc-pcm.c
parent6106d12947d1b05dc15ca3933eb514347d6ed726 (diff)
ASoC: Move active count from CODEC to component
There is no reason why active count tracking should only be done for CODECs but not for other components. Moving the active count from the snd_soc_codec struct to the snd_soc_component struct reduces the differences between CODECs and other components and will eventually allow component to component DAI links (Which is a prerequisite for converting CODECs to components). Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'sound/soc/soc-pcm.c')
-rw-r--r--sound/soc/soc-pcm.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c
index 71a01dda1867..98b46295785d 100644
--- a/sound/soc/soc-pcm.c
+++ b/sound/soc/soc-pcm.c
@@ -61,9 +61,8 @@ 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 if (cpu_dai->codec) 64 cpu_dai->component->active++;
65 cpu_dai->codec->active++; 65 codec_dai->component->active++;
66 codec_dai->codec->active++;
67} 66}
68 67
69/** 68/**
@@ -93,9 +92,8 @@ void snd_soc_runtime_deactivate(struct snd_soc_pcm_runtime *rtd, int stream)
93 92
94 cpu_dai->active--; 93 cpu_dai->active--;
95 codec_dai->active--; 94 codec_dai->active--;
96 if (cpu_dai->codec) 95 cpu_dai->component->active--;
97 cpu_dai->codec->active--; 96 codec_dai->component->active--;
98 codec_dai->codec->active--;
99} 97}
100 98
101/** 99/**