diff options
author | Lars-Peter Clausen <lars@metafoo.de> | 2014-03-05 13:17:47 +0100 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2014-03-06 17:04:55 +0800 |
commit | cdde4ccb14b4959bd1c96a07367bf02b746328d3 (patch) | |
tree | d810edb5e51f268dfb1005a8e74ba90cc3dd9f69 /sound/soc/soc-pcm.c | |
parent | 6106d12947d1b05dc15ca3933eb514347d6ed726 (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.c | 10 |
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) cpu_dai->active++; codec_dai->active++; - if (cpu_dai->codec) - cpu_dai->codec->active++; - codec_dai->codec->active++; + cpu_dai->component->active++; + codec_dai->component->active++; } /** @@ -93,9 +92,8 @@ void snd_soc_runtime_deactivate(struct snd_soc_pcm_runtime *rtd, int stream) cpu_dai->active--; codec_dai->active--; - if (cpu_dai->codec) - cpu_dai->codec->active--; - codec_dai->codec->active--; + cpu_dai->component->active--; + codec_dai->component->active--; } /** |