Merge tag 'remoteproc-4.1-next' of git://git.kernel.org/pub/scm/linux/kernel/git...
[linux-2.6-block.git] / include / sound / soc.h
index b371aef9819f2adde194b39fecf72a035f6e03b4..fcb312b3f25809e781098e2bd2514ae89f59329f 100644 (file)
@@ -943,6 +943,7 @@ struct snd_soc_dai_link {
        int be_id;      /* optional ID for machine driver BE identification */
 
        const struct snd_soc_pcm_stream *params;
+       unsigned int num_params;
 
        unsigned int dai_fmt;           /* format to set on init */
 
@@ -1268,6 +1269,19 @@ static inline struct snd_soc_dapm_context *snd_soc_component_get_dapm(
        return component->dapm_ptr;
 }
 
+/**
+ * snd_soc_dapm_kcontrol_codec() - Returns the codec associated to a kcontrol
+ * @kcontrol: The kcontrol
+ *
+ * This function must only be used on DAPM contexts that are known to be part of
+ * a CODEC (e.g. in a CODEC driver). Otherwise the behavior is undefined.
+ */
+static inline struct snd_soc_codec *snd_soc_dapm_kcontrol_codec(
+       struct snd_kcontrol *kcontrol)
+{
+       return snd_soc_dapm_to_codec(snd_soc_dapm_kcontrol_dapm(kcontrol));
+}
+
 /* codec IO */
 unsigned int snd_soc_read(struct snd_soc_codec *codec, unsigned int reg);
 int snd_soc_write(struct snd_soc_codec *codec, unsigned int reg,