diff options
author | Mengdong Lin <mengdong.lin@intel.com> | 2015-08-18 12:12:20 +0200 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2015-08-22 00:26:53 +0200 |
commit | 1a3232d2f61d2853a848464b7bde2d54960c58bb (patch) | |
tree | b2f6daf4b73a6a8fe271f9c430ae27404c3fa0ab /include/sound | |
parent | ASoC: topology: Reduce arguments of soc_tplg_kcontrol_bind_io() (diff) | |
download | linux-1a3232d2f61d2853a848464b7bde2d54960c58bb.tar.xz linux-1a3232d2f61d2853a848464b7bde2d54960c58bb.zip |
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')
-rw-r--r-- | include/sound/soc-topology.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/sound/soc-topology.h b/include/sound/soc-topology.h index a6541a1bc709..ea387ed8f98b 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 */ |