ASoC: add Component level set_pll
[sfrench/cifs-2.6.git] / include / sound / soc.h
index 9c94b97c17f8ebc830f9ccac9e00c9a0b0e1d463..23681538c849e5422574531e68693bbb03a31031 100644 (file)
@@ -469,10 +469,10 @@ int snd_soc_register_codec(struct device *dev,
                struct snd_soc_dai_driver *dai_drv, int num_dai);
 void snd_soc_unregister_codec(struct device *dev);
 int snd_soc_register_component(struct device *dev,
-                        const struct snd_soc_component_driver *cmpnt_drv,
+                        const struct snd_soc_component_driver *component_driver,
                         struct snd_soc_dai_driver *dai_drv, int num_dai);
 int devm_snd_soc_register_component(struct device *dev,
-                        const struct snd_soc_component_driver *cmpnt_drv,
+                        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);
 int snd_soc_cache_init(struct snd_soc_codec *codec);
@@ -795,9 +795,11 @@ 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);
+       int (*set_pll)(struct snd_soc_component *component, int pll_id,
+                      int source, unsigned int freq_in, unsigned int freq_out);
 
        /* DT */
        int (*of_xlate_dai_name)(struct snd_soc_component *component,
@@ -862,20 +864,17 @@ struct snd_soc_component {
        /* Don't use these, use snd_soc_component_get_dapm() */
        struct snd_soc_dapm_context dapm;
 
-       const struct snd_kcontrol_new *controls;
-       unsigned int num_controls;
-       const struct snd_soc_dapm_widget *dapm_widgets;
-       unsigned int num_dapm_widgets;
-       const struct snd_soc_dapm_route *dapm_routes;
-       unsigned int num_dapm_routes;
        struct snd_soc_codec *codec;
 
        int (*probe)(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_pcm_runtime *);
-       void (*pcm_free)(struct snd_pcm *);
+
+       int (*set_sysclk)(struct snd_soc_component *component,
+                         int clk_id, int source, unsigned int freq, int dir);
+       int (*set_pll)(struct snd_soc_component *component, int pll_id,
+                      int source, unsigned int freq_in, unsigned int freq_out);
 
        /* machine specific init */
        int (*init)(struct snd_soc_component *component);
@@ -1471,6 +1470,13 @@ void snd_soc_component_async_complete(struct snd_soc_component *component);
 int snd_soc_component_test_bits(struct snd_soc_component *component,
        unsigned int reg, unsigned int mask, unsigned int value);
 
+/* component wide operations */
+int snd_soc_component_set_sysclk(struct snd_soc_component *component,
+                       int clk_id, int source, unsigned int freq, int dir);
+int snd_soc_component_set_pll(struct snd_soc_component *component, int pll_id,
+                             int source, unsigned int freq_in,
+                             unsigned int freq_out);
+
 #ifdef CONFIG_REGMAP
 
 void snd_soc_component_init_regmap(struct snd_soc_component *component,