]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/sound/soc.h
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/shaggy...
[linux-2.6-omap-h63xx.git] / include / sound / soc.h
index 359ec49f8d0daa3d2156bab1efcbd3069a4e65df..f86e455d3828b222e6cab7331d6cbfda5fef0456 100644 (file)
@@ -149,16 +149,21 @@ struct snd_soc_ops;
 struct snd_soc_dai_mode;
 struct snd_soc_pcm_runtime;
 struct snd_soc_dai;
+struct snd_soc_platform;
 struct snd_soc_codec;
 struct soc_enum;
 struct snd_soc_ac97_ops;
-struct snd_soc_clock_info;
 
 typedef int (*hw_write_t)(void *,const char* ,int);
 typedef int (*hw_read_t)(void *,char* ,int);
 
 extern struct snd_ac97_bus_ops soc_ac97_ops;
 
+int snd_soc_register_platform(struct snd_soc_platform *platform);
+void snd_soc_unregister_platform(struct snd_soc_platform *platform);
+int snd_soc_register_codec(struct snd_soc_codec *codec);
+void snd_soc_unregister_codec(struct snd_soc_codec *codec);
+
 /* pcm <-> DAI connect */
 void snd_soc_free_pcms(struct snd_soc_device *socdev);
 int snd_soc_new_pcms(struct snd_soc_device *socdev, int idx, const char *xid);
@@ -244,6 +249,9 @@ struct snd_soc_codec {
        char *name;
        struct module *owner;
        struct mutex mutex;
+       struct device *dev;
+
+       struct list_head list;
 
        /* callbacks */
        int (*set_bias_level)(struct snd_soc_codec *,
@@ -279,6 +287,11 @@ struct snd_soc_codec {
        /* codec DAI's */
        struct snd_soc_dai *dai;
        unsigned int num_dai;
+
+#ifdef CONFIG_DEBUG_FS
+       struct dentry *debugfs_reg;
+       struct dentry *debugfs_pop_time;
+#endif
 };
 
 /* codec device */
@@ -292,13 +305,12 @@ struct snd_soc_codec_device {
 /* SoC platform interface */
 struct snd_soc_platform {
        char *name;
+       struct list_head list;
 
        int (*probe)(struct platform_device *pdev);
        int (*remove)(struct platform_device *pdev);
-       int (*suspend)(struct platform_device *pdev,
-               struct snd_soc_dai *dai);
-       int (*resume)(struct platform_device *pdev,
-               struct snd_soc_dai *dai);
+       int (*suspend)(struct snd_soc_dai *dai);
+       int (*resume)(struct snd_soc_dai *dai);
 
        /* pcm creation and destruction */
        int (*pcm_new)(struct snd_card *, struct snd_soc_dai *,
@@ -331,6 +343,11 @@ struct snd_soc_dai_link  {
 /* SoC card */
 struct snd_soc_card {
        char *name;
+       struct device *dev;
+
+       struct list_head list;
+
+       int instantiated;
 
        int (*probe)(struct platform_device *pdev);
        int (*remove)(struct platform_device *pdev);
@@ -352,6 +369,7 @@ struct snd_soc_card {
 
        struct snd_soc_device *socdev;
 
+       struct snd_soc_platform *platform;
        struct delayed_work delayed_work;
        struct work_struct deferred_resume_work;
 };
@@ -360,13 +378,9 @@ struct snd_soc_card {
 struct snd_soc_device {
        struct device *dev;
        struct snd_soc_card *card;
-       struct snd_soc_platform *platform;
        struct snd_soc_codec *codec;
        struct snd_soc_codec_device *codec_dev;
        void *codec_data;
-#ifdef CONFIG_DEBUG_FS
-       struct dentry   *debugfs_root;
-#endif
 };
 
 /* runtime channel data */