From 88a17d8fb7c4a156ec13e6668b46dbbedf670ff7 Mon Sep 17 00:00:00 2001 From: Mengdong Lin Date: Tue, 18 Aug 2015 18:11:51 +0800 Subject: ASoC: topology: Bind vendor specific kcontrol handlers before standard ones Vendor specific handlers should override standard handlers. So we can handle things in the order from specific to generic. Signed-off-by: Mengdong Lin Signed-off-by: Mark Brown --- include/sound/soc-topology.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/sound/soc-topology.h') diff --git a/include/sound/soc-topology.h b/include/sound/soc-topology.h index 865a141b118b..a6541a1bc709 100644 --- a/include/sound/soc-topology.h +++ b/include/sound/soc-topology.h @@ -136,7 +136,7 @@ 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; }; -- cgit From 1a3232d2f61d2853a848464b7bde2d54960c58bb Mon Sep 17 00:00:00 2001 From: Mengdong Lin Date: Tue, 18 Aug 2015 18:12:20 +0800 Subject: 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 Signed-off-by: Mark Brown --- include/sound/soc-topology.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'include/sound/soc-topology.h') 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 */ -- cgit