summaryrefslogtreecommitdiffstats
path: root/include/sound
diff options
context:
space:
mode:
authorMark Brown <broonie@linaro.org>2014-03-12 23:03:58 +0000
committerMark Brown <broonie@linaro.org>2014-03-12 23:03:58 +0000
commitda8ab21cfea80655a0f7bbbc3f2fa0975970b8cb (patch)
tree66d5a4804f0a15b5dc224bb2de9b0d9cb208eb91 /include/sound
parentc6c124225f9551d78a19c291a2e204618f7e1e92 (diff)
parent5c1d5f091dc39eecf9a34a8be01492d14c23ad91 (diff)
downloadlinux-da8ab21cfea80655a0f7bbbc3f2fa0975970b8cb.tar.bz2
Merge remote-tracking branch 'asoc/topic/core' into asoc-next
Diffstat (limited to 'include/sound')
-rw-r--r--include/sound/soc-dai.h1
-rw-r--r--include/sound/soc.h24
2 files changed, 23 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..37b470c1e127 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,12 +660,19 @@ 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;
int num_dai;
const struct snd_soc_component_driver *driver;
+
+ struct list_head dai_list;
};
/* SoC Audio Codec device */
@@ -683,7 +694,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 +719,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 +1177,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);