summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMark Brown <broonie@linaro.org>2014-03-10 12:17:48 +0000
committerMark Brown <broonie@linaro.org>2014-03-10 12:17:48 +0000
commita707d030da09793956a339066f0c91deafef14a3 (patch)
tree19e3d4512672e05a42c5a72d570dddce2eaec7f6 /include
parenta1a564ed6abf62e05fcffa9ed3f46a826400df3a (diff)
parent3d59400fe47e7e8bfb024cd1651433bef42e268e (diff)
Merge branch 'topic/pcm' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-core
Diffstat (limited to 'include')
-rw-r--r--include/sound/soc-dai.h1
-rw-r--r--include/sound/soc.h22
2 files changed, 21 insertions, 2 deletions
diff --git a/include/sound/soc-dai.h b/include/sound/soc-dai.h
index 71f27c403194..8763e539c487 100644
--- a/include/sound/soc-dai.h
+++ b/include/sound/soc-dai.h
@@ -270,6 +270,7 @@ struct snd_soc_dai {
/* parent platform/codec */
struct snd_soc_platform *platform;
struct snd_soc_codec *codec;
+ struct snd_soc_component *component;
struct snd_soc_card *card;
diff --git a/include/sound/soc.h b/include/sound/soc.h
index 9a001472b96a..b14acd8228ab 100644
--- a/include/sound/soc.h
+++ b/include/sound/soc.h
@@ -413,6 +413,10 @@ struct snd_pcm_substream *snd_soc_get_dai_substream(struct snd_soc_card *card,
struct snd_soc_pcm_runtime *snd_soc_get_pcm_runtime(struct snd_soc_card *card,
const char *dai_link);
+bool snd_soc_runtime_ignore_pmdown_time(struct snd_soc_pcm_runtime *rtd);
+void snd_soc_runtime_activate(struct snd_soc_pcm_runtime *rtd, int stream);
+void snd_soc_runtime_deactivate(struct snd_soc_pcm_runtime *rtd, int stream);
+
/* Utility functions to get clock rates from various things */
int snd_soc_calc_frame_size(int sample_size, int channels, int tdm_slots);
int snd_soc_params_to_frame_size(struct snd_pcm_hw_params *params);
@@ -656,6 +660,11 @@ struct snd_soc_component {
const char *name;
int id;
struct device *dev;
+
+ unsigned int active;
+
+ unsigned int ignore_pmdown_time:1; /* pmdown_time is ignored at stop */
+
struct list_head list;
struct snd_soc_dai_driver *dai_drv;
@@ -683,7 +692,6 @@ struct snd_soc_codec {
/* runtime */
struct snd_ac97 *ac97; /* for ad-hoc ac97 devices */
- unsigned int active;
unsigned int cache_bypass:1; /* Suppress access to the cache */
unsigned int suspended:1; /* Codec is in suspend PM state */
unsigned int probed:1; /* Codec has been probed */
@@ -709,7 +717,6 @@ struct snd_soc_codec {
/* dapm */
struct snd_soc_dapm_context dapm;
- unsigned int ignore_pmdown_time:1; /* pmdown_time is ignored at stop */
#ifdef CONFIG_DEBUG_FS
struct dentry *debugfs_codec_root;
@@ -1168,6 +1175,17 @@ static inline bool snd_soc_volsw_is_stereo(struct soc_mixer_control *mc)
return 1;
}
+static inline bool snd_soc_component_is_active(
+ struct snd_soc_component *component)
+{
+ return component->active != 0;
+}
+
+static inline bool snd_soc_codec_is_active(struct snd_soc_codec *codec)
+{
+ return snd_soc_component_is_active(&codec->component);
+}
+
int snd_soc_util_init(void);
void snd_soc_util_exit(void);