]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - include/sound/soc.h
Merge remote-tracking branch 'block/for-next'
[karo-tx-linux.git] / include / sound / soc.h
index 1dd7dc5f7d5230b30a19a51dff5c2a9577ed903d..1f741cb24f337c3e4662c2ff2cd45f78985c54c1 100644 (file)
@@ -331,7 +331,6 @@ struct soc_enum;
 struct snd_soc_jack;
 struct snd_soc_jack_zone;
 struct snd_soc_jack_pin;
-struct snd_soc_cache_ops;
 #include <sound/soc-dapm.h>
 #include <sound/soc-dpcm.h>
 
@@ -349,10 +348,6 @@ enum snd_soc_control_type {
        SND_SOC_REGMAP,
 };
 
-enum snd_soc_compress_type {
-       SND_SOC_FLAT_COMPRESSION = 1,
-};
-
 enum snd_soc_pcm_subclass {
        SND_SOC_PCM_CLASS_PCM   = 0,
        SND_SOC_PCM_CLASS_BE    = 1,
@@ -370,6 +365,7 @@ int snd_soc_codec_set_pll(struct snd_soc_codec *codec, int pll_id, int source,
 
 int snd_soc_register_card(struct snd_soc_card *card);
 int snd_soc_unregister_card(struct snd_soc_card *card);
+int devm_snd_soc_register_card(struct device *dev, struct snd_soc_card *card);
 int snd_soc_suspend(struct device *dev);
 int snd_soc_resume(struct device *dev);
 int snd_soc_poweroff(struct device *dev);
@@ -387,6 +383,9 @@ void snd_soc_unregister_codec(struct device *dev);
 int snd_soc_register_component(struct device *dev,
                         const struct snd_soc_component_driver *cmpnt_drv,
                         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,
+                        struct snd_soc_dai_driver *dai_drv, int num_dai);
 void snd_soc_unregister_component(struct device *dev);
 int snd_soc_codec_volatile_register(struct snd_soc_codec *codec,
                                    unsigned int reg);
@@ -404,12 +403,6 @@ int snd_soc_cache_write(struct snd_soc_codec *codec,
                        unsigned int reg, unsigned int value);
 int snd_soc_cache_read(struct snd_soc_codec *codec,
                       unsigned int reg, unsigned int *value);
-int snd_soc_default_volatile_register(struct snd_soc_codec *codec,
-                                     unsigned int reg);
-int snd_soc_default_readable_register(struct snd_soc_codec *codec,
-                                     unsigned int reg);
-int snd_soc_default_writable_register(struct snd_soc_codec *codec,
-                                     unsigned int reg);
 int snd_soc_platform_read(struct snd_soc_platform *platform,
                                        unsigned int reg);
 int snd_soc_platform_write(struct snd_soc_platform *platform,
@@ -542,22 +535,6 @@ int snd_soc_get_strobe(struct snd_kcontrol *kcontrol,
 int snd_soc_put_strobe(struct snd_kcontrol *kcontrol,
        struct snd_ctl_elem_value *ucontrol);
 
-/**
- * struct snd_soc_reg_access - Describes whether a given register is
- * readable, writable or volatile.
- *
- * @reg: the register number
- * @read: whether this register is readable
- * @write: whether this register is writable
- * @vol: whether this register is volatile
- */
-struct snd_soc_reg_access {
-       u16 reg;
-       u16 read;
-       u16 write;
-       u16 vol;
-};
-
 /**
  * struct snd_soc_jack_pin - Describes a pin to update based on jack detection
  *
@@ -658,19 +635,6 @@ struct snd_soc_compr_ops {
        int (*trigger)(struct snd_compr_stream *);
 };
 
-/* SoC cache ops */
-struct snd_soc_cache_ops {
-       const char *name;
-       enum snd_soc_compress_type id;
-       int (*init)(struct snd_soc_codec *codec);
-       int (*exit)(struct snd_soc_codec *codec);
-       int (*read)(struct snd_soc_codec *codec, unsigned int reg,
-               unsigned int *value);
-       int (*write)(struct snd_soc_codec *codec, unsigned int reg,
-               unsigned int value);
-       int (*sync)(struct snd_soc_codec *codec);
-};
-
 /* component interface */
 struct snd_soc_component_driver {
        const char *name;
@@ -684,10 +648,12 @@ struct snd_soc_component_driver {
 struct snd_soc_component {
        const char *name;
        int id;
-       int num_dai;
        struct device *dev;
        struct list_head list;
 
+       struct snd_soc_dai_driver *dai_drv;
+       int num_dai;
+
        const struct snd_soc_component_driver *driver;
 };
 
@@ -704,8 +670,6 @@ struct snd_soc_codec {
        struct list_head list;
        struct list_head card_list;
        int num_dai;
-       enum snd_soc_compress_type compress_type;
-       size_t reg_size;        /* reg_cache_size * reg_word_size */
        int (*volatile_register)(struct snd_soc_codec *, unsigned int);
        int (*readable_register)(struct snd_soc_codec *, unsigned int);
        int (*writable_register)(struct snd_soc_codec *, unsigned int);
@@ -729,10 +693,7 @@ struct snd_soc_codec {
        unsigned int (*hw_read)(struct snd_soc_codec *, unsigned int);
        unsigned int (*read)(struct snd_soc_codec *, unsigned int);
        int (*write)(struct snd_soc_codec *, unsigned int, unsigned int);
-       int (*bulk_write_raw)(struct snd_soc_codec *, unsigned int, const void *, size_t);
        void *reg_cache;
-       const void *reg_def_copy;
-       const struct snd_soc_cache_ops *cache_ops;
        struct mutex cache_rw_mutex;
        int val_bytes;
 
@@ -785,9 +746,6 @@ struct snd_soc_codec_driver {
        short reg_cache_step;
        short reg_word_size;
        const void *reg_cache_default;
-       short reg_access_size;
-       const struct snd_soc_reg_access *reg_access_default;
-       enum snd_soc_compress_type compress_type;
 
        /* codec bias level */
        int (*set_bias_level)(struct snd_soc_codec *,
@@ -955,12 +913,6 @@ struct snd_soc_codec_conf {
         * associated per device
         */
        const char *name_prefix;
-
-       /*
-        * set this to the desired compression type if you want to
-        * override the one supplied in codec->driver->compress_type
-        */
-       enum snd_soc_compress_type compress_type;
 };
 
 struct snd_soc_aux_dev {
@@ -1099,7 +1051,8 @@ struct snd_soc_pcm_runtime {
 /* mixer control */
 struct soc_mixer_control {
        int min, max, platform_max;
-       unsigned int reg, rreg, shift, rshift;
+       int reg, rreg;
+       unsigned int shift, rshift;
        unsigned int invert:1;
        unsigned int autodisable:1;
 };
@@ -1132,8 +1085,6 @@ struct soc_enum {
 unsigned int snd_soc_read(struct snd_soc_codec *codec, unsigned int reg);
 unsigned int snd_soc_write(struct snd_soc_codec *codec,
                           unsigned int reg, unsigned int val);
-unsigned int snd_soc_bulk_write_raw(struct snd_soc_codec *codec,
-                                   unsigned int reg, const void *data, size_t len);
 
 /* device driver data */