summaryrefslogtreecommitdiff
path: root/include/sound/soc.h
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2014-03-05 13:17:45 +0100
committerMark Brown <broonie@linaro.org>2014-03-06 17:04:55 +0800
commit5c898e74d135a23ce12e0263c1a3c78eeae1b52b (patch)
tree987d9a6a06174368d141d6caee65ad4c9e6349bf /include/sound/soc.h
parenta1a0cc0646e38b41bfaac94f2b84422bb1df40e0 (diff)
downloadlwn-5c898e74d135a23ce12e0263c1a3c78eeae1b52b.tar.gz
lwn-5c898e74d135a23ce12e0263c1a3c78eeae1b52b.zip
ASoC: Add helper function to check whether a CODEC is active
Instead of directly checking the 'active' field of the CODEC struct add a new helper function that will return either true or false depending on whether the CODEC is active. This will make the migration to the component level easier. The patch also updates all CODEC drivers that check the active attribute to use the new helper function. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'include/sound/soc.h')
-rw-r--r--include/sound/soc.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/sound/soc.h b/include/sound/soc.h
index 53d15e0e6e89..5c2b4f4b5cfa 100644
--- a/include/sound/soc.h
+++ b/include/sound/soc.h
@@ -1172,6 +1172,11 @@ static inline bool snd_soc_volsw_is_stereo(struct soc_mixer_control *mc)
return 1;
}
+static inline bool snd_soc_codec_is_active(struct snd_soc_codec *codec)
+{
+ return codec->active != 0;
+}
+
int snd_soc_util_init(void);
void snd_soc_util_exit(void);