summaryrefslogtreecommitdiffstats
path: root/sound/soc/soc-topology.c
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2020-09-17 16:35:38 +0100
committerMark Brown <broonie@kernel.org>2020-09-17 16:35:38 +0100
commit4db68e62a0b912655c598de829b05b2383da0cab (patch)
tree14c717646e8de62283aaa9c08b747e8db3871dbd /sound/soc/soc-topology.c
parentd70a4412e264cd8ff7a034505184c0b54876532a (diff)
parent244ac15de75ca62ed7a09c7291b67aeead9e12ac (diff)
Merge branch 'asoc-5.9' into asoc-5.10
Diffstat (limited to 'sound/soc/soc-topology.c')
-rw-r--r--sound/soc/soc-topology.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/sound/soc/soc-topology.c b/sound/soc/soc-topology.c
index 28faaf58326e..63086fa8b861 100644
--- a/sound/soc/soc-topology.c
+++ b/sound/soc/soc-topology.c
@@ -592,6 +592,17 @@ static int soc_tplg_kcontrol_bind_io(struct snd_soc_tplg_ctl_hdr *hdr,
k->info = snd_soc_bytes_info_ext;
k->tlv.c = snd_soc_bytes_tlv_callback;
+ /*
+ * When a topology-based implementation abuses the
+ * control interface and uses bytes_ext controls of
+ * more than 512 bytes, we need to disable the size
+ * checks, otherwise accesses to such controls will
+ * return an -EINVAL error and prevent the card from
+ * being configured.
+ */
+ if (IS_ENABLED(CONFIG_SND_CTL_VALIDATION) && sbe->max > 512)
+ k->access |= SNDRV_CTL_ELEM_ACCESS_SKIP_CHECK;
+
ext_ops = tplg->bytes_ext_ops;
num_ops = tplg->bytes_ext_ops_count;
for (i = 0; i < num_ops; i++) {