ASoC: dapm: Add regulator member to struct dapm_widget
[cascardo/linux.git] / include / sound / soc-dapm.h
index e46107f..7562b8f 100644 (file)
 #ifndef __LINUX_SND_SOC_DAPM_H
 #define __LINUX_SND_SOC_DAPM_H
 
-#include <linux/device.h>
 #include <linux/types.h>
 #include <sound/control.h>
 
+struct device;
+
 /* widget has no PM register bit */
 #define SND_SOC_NOPM   -1
 
@@ -323,6 +324,7 @@ struct snd_soc_dapm_path;
 struct snd_soc_dapm_pin;
 struct snd_soc_dapm_route;
 struct snd_soc_dapm_context;
+struct regulator;
 
 int dapm_reg_event(struct snd_soc_dapm_widget *w,
                   struct snd_kcontrol *kcontrol, int event);
@@ -368,8 +370,8 @@ int snd_soc_dapm_weak_routes(struct snd_soc_dapm_context *dapm,
                             const struct snd_soc_dapm_route *route, int num);
 
 /* dapm events */
-int snd_soc_dapm_stream_event(struct snd_soc_pcm_runtime *rtd, int stream,
-                             struct snd_soc_dai *dai, int event);
+void snd_soc_dapm_stream_event(struct snd_soc_pcm_runtime *rtd, int stream,
+       int event);
 void snd_soc_dapm_shutdown(struct snd_soc_card *card);
 
 /* external DAPM widget events */
@@ -431,6 +433,11 @@ enum snd_soc_dapm_type {
        snd_soc_dapm_dai,               /* link to DAI structure */
 };
 
+enum snd_soc_dapm_subclass {
+       SND_SOC_DAPM_CLASS_INIT         = 0,
+       SND_SOC_DAPM_CLASS_RUNTIME      = 1,
+};
+
 /*
  * DAPM audio route definition.
  *
@@ -481,6 +488,7 @@ struct snd_soc_dapm_widget {
        struct snd_soc_dapm_context *dapm;
 
        void *priv;                             /* widget specific data */
+       struct regulator *regulator;            /* attached regulator */
 
        /* dapm control */
        short reg;                                              /* negative reg = no direct dapm */