]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - include/sound/soc.h
Merge remote-tracking branches 'asoc/topic/davinci', 'asoc/topic/davinci-vcif', ...
[karo-tx-linux.git] / include / sound / soc.h
index 93df8bf9d54a9e1b9502836faec752b4c6aa20b0..9f944821484b8e135cb7a2bed2cc9943922b2038 100644 (file)
@@ -526,7 +526,8 @@ int snd_soc_test_bits(struct snd_soc_codec *codec, unsigned int reg,
 
 #ifdef CONFIG_SND_SOC_AC97_BUS
 struct snd_ac97 *snd_soc_alloc_ac97_codec(struct snd_soc_codec *codec);
-struct snd_ac97 *snd_soc_new_ac97_codec(struct snd_soc_codec *codec);
+struct snd_ac97 *snd_soc_new_ac97_codec(struct snd_soc_codec *codec,
+       unsigned int id, unsigned int id_mask);
 void snd_soc_free_ac97_codec(struct snd_ac97 *ac97);
 
 int snd_soc_set_ac97_ops(struct snd_ac97_bus_ops *ops);
@@ -619,6 +620,7 @@ int snd_soc_put_strobe(struct snd_kcontrol *kcontrol,
  * @pin:    name of the pin to update
  * @mask:   bits to check for in reported jack status
  * @invert: if non-zero then pin is enabled when status is not reported
+ * @list:   internal list entry
  */
 struct snd_soc_jack_pin {
        struct list_head list;
@@ -635,7 +637,7 @@ struct snd_soc_jack_pin {
  * @jack_type: type of jack that is expected for this voltage
  * @debounce_time: debounce_time for jack, codec driver should wait for this
  *             duration before reading the adc for voltages
- * @:list: list container
+ * @list:   internal list entry
  */
 struct snd_soc_jack_zone {
        unsigned int min_mv;
@@ -651,12 +653,12 @@ struct snd_soc_jack_zone {
  * @gpio:         legacy gpio number
  * @idx:          gpio descriptor index within the function of the GPIO
  *                consumer device
- * @gpiod_dev     GPIO consumer device
+ * @gpiod_dev:    GPIO consumer device
  * @name:         gpio name. Also as connection ID for the GPIO consumer
  *                device function name lookup
  * @report:       value to report when jack detected
  * @invert:       report presence in low state
- * @debouce_time: debouce time in ms
+ * @debounce_time: debounce time in ms
  * @wake:        enable as wake source
  * @jack_status_check: callback function which overrides the detection
  *                    to provide more complex checks (eg, reading an
@@ -672,11 +674,13 @@ struct snd_soc_jack_gpio {
        int debounce_time;
        bool wake;
 
+       /* private: */
        struct snd_soc_jack *jack;
        struct delayed_work work;
        struct gpio_desc *desc;
 
        void *data;
+       /* public: */
        int (*jack_status_check)(void *data);
 };
 
@@ -758,7 +762,6 @@ struct snd_soc_component {
 
        unsigned int ignore_pmdown_time:1; /* pmdown_time is ignored at stop */
        unsigned int registered_as_component:1;
-       unsigned int probed:1;
 
        struct list_head list;
 
@@ -792,7 +795,6 @@ struct snd_soc_component {
 
        /* Don't use these, use snd_soc_component_get_dapm() */
        struct snd_soc_dapm_context dapm;
-       struct snd_soc_dapm_context *dapm_ptr;
 
        const struct snd_kcontrol_new *controls;
        unsigned int num_controls;
@@ -832,9 +834,6 @@ struct snd_soc_codec {
        /* component */
        struct snd_soc_component component;
 
-       /* Don't access this directly, use snd_soc_codec_get_dapm() */
-       struct snd_soc_dapm_context dapm;
-
 #ifdef CONFIG_DEBUG_FS
        struct dentry *debugfs_reg;
 #endif
@@ -1277,7 +1276,7 @@ static inline struct snd_soc_component *snd_soc_dapm_to_component(
 static inline struct snd_soc_codec *snd_soc_dapm_to_codec(
        struct snd_soc_dapm_context *dapm)
 {
-       return container_of(dapm, struct snd_soc_codec, dapm);
+       return snd_soc_component_to_codec(snd_soc_dapm_to_component(dapm));
 }
 
 /**
@@ -1302,7 +1301,7 @@ static inline struct snd_soc_platform *snd_soc_dapm_to_platform(
 static inline struct snd_soc_dapm_context *snd_soc_component_get_dapm(
        struct snd_soc_component *component)
 {
-       return component->dapm_ptr;
+       return &component->dapm;
 }
 
 /**
@@ -1314,12 +1313,12 @@ static inline struct snd_soc_dapm_context *snd_soc_component_get_dapm(
 static inline struct snd_soc_dapm_context *snd_soc_codec_get_dapm(
        struct snd_soc_codec *codec)
 {
-       return &codec->dapm;
+       return snd_soc_component_get_dapm(&codec->component);
 }
 
 /**
  * snd_soc_dapm_init_bias_level() - Initialize CODEC DAPM bias level
- * @dapm: The CODEC for which to initialize the DAPM bias level
+ * @codec: The CODEC for which to initialize the DAPM bias level
  * @level: The DAPM level to initialize to
  *
  * Initializes the CODEC DAPM bias level. See snd_soc_dapm_init_bias_level().