summaryrefslogtreecommitdiffstats
path: root/include/sound/soc-topology.h
diff options
context:
space:
mode:
authorMengdong Lin <mengdong.lin@intel.com>2015-08-18 18:12:20 +0800
committerMark Brown <broonie@kernel.org>2015-08-21 15:26:53 -0700
commit1a3232d2f61d2853a848464b7bde2d54960c58bb (patch)
treeb2f6daf4b73a6a8fe271f9c430ae27404c3fa0ab /include/sound/soc-topology.h
parent2b5cdb9156f76162d5302e2847f84a79de8a3ad1 (diff)
downloadlinux-0-day-1a3232d2f61d2853a848464b7bde2d54960c58bb.tar.gz
linux-0-day-1a3232d2f61d2853a848464b7bde2d54960c58bb.tar.xz
ASoC: topology: Add support for TLV bytes controls
Allow vendor drivers to define bespoke bytes ext handlers and IDs for TLV bytes controls. And the topology core will bind these handlers by matching IDs defined by the vendor driver and user space topology data file. And TLV callback binding is moved to soc_tplg_kcontrol_bind_io(). This function process all handler binding now. Signed-off-by: Mengdong Lin <mengdong.lin@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'include/sound/soc-topology.h')
-rw-r--r--include/sound/soc-topology.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/sound/soc-topology.h b/include/sound/soc-topology.h
index a6541a1bc7093..ea387ed8f98be 100644
--- a/include/sound/soc-topology.h
+++ b/include/sound/soc-topology.h
@@ -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.
*/
@@ -139,6 +146,10 @@ struct snd_soc_tplg_ops {
/* 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;
};
/* gets a pointer to data from the firmware block header */