summaryrefslogtreecommitdiffstats
path: root/sound/soc/sof/topology.c
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2023-05-30 20:41:29 +0100
committerMark Brown <broonie@kernel.org>2023-05-30 20:41:29 +0100
commitb48aa6a3577cccd13ea21392540f6cde437dd04d (patch)
tree77091078bd9c3fd7c38efea83ec71a0719676819 /sound/soc/sof/topology.c
parentf2d4aa7e97eb60f426b92b95da712a6b3c18dc9a (diff)
parent60413129ee2b38a80347489270af7f6e1c1de4d0 (diff)
downloadlinux-stable-b48aa6a3577cccd13ea21392540f6cde437dd04d.tar.gz
linux-stable-b48aa6a3577cccd13ea21392540f6cde437dd04d.tar.bz2
linux-stable-b48aa6a3577cccd13ea21392540f6cde437dd04d.zip
ES8316 audio codec fixes on Rock5B
Merge series from Cristian Ciocaltea <cristian.ciocaltea@collabora.com>: This patch series handles a few issues related to the ES8316 audio codec, discovered while doing some testing on the Rock 5B board.
Diffstat (limited to 'sound/soc/sof/topology.c')
-rw-r--r--sound/soc/sof/topology.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sound/soc/sof/topology.c b/sound/soc/sof/topology.c
index b572c809581d..698129dccc7d 100644
--- a/sound/soc/sof/topology.c
+++ b/sound/soc/sof/topology.c
@@ -586,6 +586,10 @@ static int sof_copy_tuples(struct snd_sof_dev *sdev, struct snd_soc_tplg_vendor_
if (*num_copied_tuples == tuples_size)
return 0;
}
+
+ /* stop when we've found the required token instances */
+ if (found == num_tokens * token_instance_num)
+ return 0;
}
/* next array */
@@ -1261,7 +1265,7 @@ static int sof_widget_parse_tokens(struct snd_soc_component *scomp, struct snd_s
if (num_sets > 1) {
struct snd_sof_tuple *new_tuples;
- num_tuples += token_list[object_token_list[i]].count * num_sets;
+ num_tuples += token_list[object_token_list[i]].count * (num_sets - 1);
new_tuples = krealloc(swidget->tuples,
sizeof(*new_tuples) * num_tuples, GFP_KERNEL);
if (!new_tuples) {