Merge remote-tracking branches 'asoc/topic/tas2552', 'asoc/topic/tas5086', 'asoc...
[linux-2.6-microblaze.git] / include / sound / soc-topology.h
index 865a141..086cd7f 100644 (file)
@@ -89,6 +89,13 @@ struct snd_soc_tplg_kcontrol_ops {
                struct snd_ctl_elem_info *uinfo);
 };
 
+/* Bytes ext operations, for TLV byte controls */
+struct snd_soc_tplg_bytes_ext_ops {
+       u32 id;
+       int (*get)(unsigned int __user *bytes, unsigned int size);
+       int (*put)(const unsigned int __user *bytes, unsigned int size);
+};
+
 /*
  * DAPM widget event handlers - used to map handlers onto widgets.
  */
@@ -136,11 +143,17 @@ struct snd_soc_tplg_ops {
        int (*manifest)(struct snd_soc_component *,
                struct snd_soc_tplg_manifest *);
 
-       /* bespoke kcontrol handlers available for binding */
+       /* vendor specific kcontrol handlers available for binding */
        const struct snd_soc_tplg_kcontrol_ops *io_ops;
        int io_ops_count;
+
+       /* vendor specific bytes ext handlers available for binding */
+       const struct snd_soc_tplg_bytes_ext_ops *bytes_ext_ops;
+       int bytes_ext_ops_count;
 };
 
+#ifdef CONFIG_SND_SOC_TOPOLOGY
+
 /* gets a pointer to data from the firmware block header */
 static inline const void *snd_soc_tplg_get_data(struct snd_soc_tplg_hdr *hdr)
 {
@@ -165,4 +178,14 @@ int snd_soc_tplg_widget_bind_event(struct snd_soc_dapm_widget *w,
        const struct snd_soc_tplg_widget_events *events, int num_events,
        u16 event_type);
 
+#else
+
+static inline int snd_soc_tplg_component_remove(struct snd_soc_component *comp,
+                                               u32 index)
+{
+       return 0;
+}
+
+#endif
+
 #endif