Skip to content

Commit c991ca3

Browse files
shumingfanbroonie
authored andcommitted
ASoC: SDCA: remove the max count of initialization table
The number of the initialization table may exceed 2048. Therefore, this patch removes the limitation and allows the driver to allocate memory dynamically based on the size of the initialization table. Signed-off-by: Shuming Fan <shumingf@realtek.com> Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://patch.msgid.link/20260325092017.3221640-1-shumingf@realtek.com Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent cfb385a commit c991ca3

2 files changed

Lines changed: 0 additions & 8 deletions

File tree

include/sound/sdca_function.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,6 @@ struct sdca_function_desc;
2626
*/
2727
#define SDCA_MAX_ENTITY_COUNT 128
2828

29-
/*
30-
* Sanity check on number of initialization writes, can be expanded if needed.
31-
*/
32-
#define SDCA_MAX_INIT_COUNT 2048
33-
3429
/*
3530
* The Cluster IDs are 16-bit, so a maximum of 65535 Clusters per
3631
* function can be represented, however limit this to a slightly

sound/soc/sdca/sdca_functions.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -216,9 +216,6 @@ static int find_sdca_init_table(struct device *dev,
216216
} else if (num_init_writes % sizeof(*raw) != 0) {
217217
dev_err(dev, "%pfwP: init table size invalid\n", function_node);
218218
return -EINVAL;
219-
} else if ((num_init_writes / sizeof(*raw)) > SDCA_MAX_INIT_COUNT) {
220-
dev_err(dev, "%pfwP: maximum init table size exceeded\n", function_node);
221-
return -EINVAL;
222219
}
223220

224221
raw = kzalloc(num_init_writes, GFP_KERNEL);

0 commit comments

Comments
 (0)