summaryrefslogtreecommitdiffstats
path: root/include/sound/soc.h
diff options
context:
space:
mode:
authorLiam Girdwood <lrg@ti.com>2011-06-07 16:08:05 +0100
committerMark Brown <broonie@opensource.wolfsonmicro.com>2011-06-07 18:38:27 +0100
commit0168bf0d130de83cd3532b834237c6228a6158dd (patch)
tree55a6c2ef757af0c2bf4111ef2be0e806ff6fb650 /include/sound/soc.h
parent552d1ef6b5a98d7b95959d5b139071e3c90cebf1 (diff)
downloadop-kernel-dev-0168bf0d130de83cd3532b834237c6228a6158dd.zip
op-kernel-dev-0168bf0d130de83cd3532b834237c6228a6158dd.tar.gz
ASoC: core - Allow components to probe/remove in sequence.
Some ASoC components depend on other ASoC components to provide clocks and power resources in order to probe() and vice versa for remove(). Allow components to be ordered so that components can be probed() and removed() in sequences that conform to their dependencies. Signed-off-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'include/sound/soc.h')
-rw-r--r--include/sound/soc.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/include/sound/soc.h b/include/sound/soc.h
index 74093be..d5db87e 100644
--- a/include/sound/soc.h
+++ b/include/sound/soc.h
@@ -203,6 +203,16 @@
SOC_VALUE_ENUM_DOUBLE_DECL(name, xreg, xshift, xshift, xmask, xtexts, xvalues)
/*
+ * Component probe and remove ordering levels for components with runtime
+ * dependencies.
+ */
+#define SND_SOC_COMP_ORDER_FIRST -2
+#define SND_SOC_COMP_ORDER_EARLY -1
+#define SND_SOC_COMP_ORDER_NORMAL 0
+#define SND_SOC_COMP_ORDER_LATE 1
+#define SND_SOC_COMP_ORDER_LAST 2
+
+/*
* Bias levels
*
* @ON: Bias is fully on for audio playback and capture operations.
@@ -613,6 +623,10 @@ struct snd_soc_codec_driver {
void (*seq_notifier)(struct snd_soc_dapm_context *,
enum snd_soc_dapm_type, int);
+
+ /* probe ordering - for components with runtime dependencies */
+ int probe_order;
+ int remove_order;
};
/* SoC platform interface */
@@ -636,6 +650,10 @@ struct snd_soc_platform_driver {
/* platform stream ops */
struct snd_pcm_ops *ops;
+
+ /* probe ordering - for components with runtime dependencies */
+ int probe_order;
+ int remove_order;
};
struct snd_soc_platform {
OpenPOWER on IntegriCloud