ASoC: snd_soc_component_driver has pmdown_time
[sfrench/cifs-2.6.git] / include / sound / soc.h
index d22de9712c451d67a9ee068ab8001589f55901bd..44fab951b686b57ca45582568a1d970f11169f9a 100644 (file)
@@ -468,6 +468,11 @@ int snd_soc_register_codec(struct device *dev,
                const struct snd_soc_codec_driver *codec_drv,
                struct snd_soc_dai_driver *dai_drv, int num_dai);
 void snd_soc_unregister_codec(struct device *dev);
+int snd_soc_add_component(struct device *dev,
+               struct snd_soc_component *component,
+               const struct snd_soc_component_driver *component_driver,
+               struct snd_soc_dai_driver *dai_drv,
+               int num_dai);
 int snd_soc_register_component(struct device *dev,
                         const struct snd_soc_component_driver *component_driver,
                         struct snd_soc_dai_driver *dai_drv, int num_dai);
@@ -475,6 +480,8 @@ int devm_snd_soc_register_component(struct device *dev,
                         const struct snd_soc_component_driver *component_driver,
                         struct snd_soc_dai_driver *dai_drv, int num_dai);
 void snd_soc_unregister_component(struct device *dev);
+struct snd_soc_component *snd_soc_lookup_component(struct device *dev,
+                                                  const char *driver_name);
 int snd_soc_cache_init(struct snd_soc_codec *codec);
 int snd_soc_cache_exit(struct snd_soc_codec *codec);
 
@@ -795,6 +802,10 @@ struct snd_soc_component_driver {
        int (*suspend)(struct snd_soc_component *);
        int (*resume)(struct snd_soc_component *);
 
+       /* pcm creation and destruction */
+       int (*pcm_new)(struct snd_soc_pcm_runtime *);
+       void (*pcm_free)(struct snd_pcm *);
+
        /* component wide operations */
        int (*set_sysclk)(struct snd_soc_component *component,
                          int clk_id, int source, unsigned int freq, int dir);
@@ -812,10 +823,20 @@ struct snd_soc_component_driver {
        void (*seq_notifier)(struct snd_soc_component *, enum snd_soc_dapm_type,
                int subseq);
        int (*stream_event)(struct snd_soc_component *, int event);
+       int (*set_bias_level)(struct snd_soc_component *component,
+                             enum snd_soc_bias_level level);
+
+       const struct snd_pcm_ops *ops;
+       const struct snd_compr_ops *compr_ops;
 
        /* probe ordering - for components with runtime dependencies */
        int probe_order;
        int remove_order;
+
+       /* bits */
+       unsigned int idle_bias_on:1;
+       unsigned int suspend_bias_off:1;
+       unsigned int pmdown_time:1; /* care pmdown_time at stop */
 };
 
 struct snd_soc_component {
@@ -872,6 +893,8 @@ struct snd_soc_component {
        void (*remove)(struct snd_soc_component *);
        int (*suspend)(struct snd_soc_component *);
        int (*resume)(struct snd_soc_component *);
+       int (*pcm_new)(struct snd_soc_component *, struct snd_soc_pcm_runtime *);
+       void (*pcm_free)(struct snd_soc_component *, struct snd_pcm *);
 
        int (*set_sysclk)(struct snd_soc_component *component,
                          int clk_id, int source, unsigned int freq, int dir);
@@ -879,6 +902,8 @@ struct snd_soc_component {
                       int source, unsigned int freq_in, unsigned int freq_out);
        int (*set_jack)(struct snd_soc_component *component,
                        struct snd_soc_jack *jack,  void *data);
+       int (*set_bias_level)(struct snd_soc_component *component,
+                             enum snd_soc_bias_level level);
 
        /* machine specific init */
        int (*init)(struct snd_soc_component *component);
@@ -1487,6 +1512,8 @@ int snd_soc_component_set_sysclk(struct snd_soc_component *component,
 int snd_soc_component_set_pll(struct snd_soc_component *component, int pll_id,
                              int source, unsigned int freq_in,
                              unsigned int freq_out);
+int snd_soc_component_set_jack(struct snd_soc_component *component,
+                              struct snd_soc_jack *jack, void *data);
 
 #ifdef CONFIG_REGMAP