ASoC: SDCA: remove the max count of initialization table
Subsystems (3)
PATCH 1/2 ASoC: SDCA: remove the max count of initialization table
From: Shuming Fan <[email protected]>
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.
--- include/sound/sdca_function.h | 5 ----- sound/soc/sdca/sdca_functions.c | 3 --- 2 files changed, 8 deletions(-)
include/sound/sdca_function.h +0 -5
@@ -26,11 +26,6 @@ struct sdca_function_desc;*/ #define SDCA_MAX_ENTITY_COUNT 128 -/* -* Sanity check on number of initialization writes, can be expanded if needed. -*/ -#define SDCA_MAX_INIT_COUNT 2048 -/* * The Cluster IDs are 16-bit, so a maximum of 65535 Clusters per * function can be represented, however limit this to a slightly
sound/soc/sdca/sdca_functions.c +0 -3
@@ -216,9 +216,6 @@ static int find_sdca_init_table(struct device *dev, }else if (num_init_writes %sizeof (*raw) !=0 ) {dev_err (dev,"%pfwP: init table size invalid\n" , function_node);return -EINVAL ; - }else if ((num_init_writes /sizeof (*raw)) >SDCA_MAX_INIT_COUNT ) { -dev_err (dev,"%pfwP: maximum init table size exceeded\n" , function_node); -return -EINVAL ; } raw =kzalloc (num_init_writes,GFP_KERNEL );
Signature · 1 line
2.53.0
Charles Keepax
maintainerQuoted 5 lines · On Wed, Mar 25, 2026 at 05:20:17PM +0800, [email protected] wrote:
From: Shuming Fan <[email protected]>
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.
We were concerned this might be a little too low. Are we sure we want to remove the limit rather than just increasing the allowed size? I feel like I can see arguments for both ways, on one hand this is input to the driver rather than part of it so it feels sensible to sanity check it, on the other hand its the BIOS so really we should be able to trust that.
Thanks,
Charles
Quoted 7 lines · On Wed, Mar 25, 2026 at 05:20:17PM +0800, [email protected] wrote:
Quoted 5 lines
From: Shuming Fan <[email protected]>
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.
Quoted 5 lines
We were concerned this might be a little too low. Are we sure we want to remove the limit rather than just increasing the allowed size? I feel like I can see arguments for both ways, on one hand this is input to the driver rather than part of it so it feels sensible to sanity check it, on the other hand its the BIOS so really we should be able to trust that.
I think we should trust the BIOS.
If the BIOS is updated, the number may increase. It's difficult to define a fixed value for this argument.
Quoted 12 lines · Shuming [范書銘]
Quoted 11 lines · On Wed, Mar 25, 2026 at 05:20:17PM +0800, [email protected] wrote:
Quoted 4 lines
From: Shuming Fan <[email protected]>
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.We were concerned this might be a little too low. Are we sure we want to remove the limit rather than just increasing the allowed size? I feel like I can see arguments for both ways, on one hand this is input to the driver rather than part of it so it feels sensible to sanity check it, on the other hand its the BIOS so really we should be able to trust that.
Quoted 3 lines
I think we should trust the BIOS.
If the BIOS is updated, the number may increase. It's difficult to define a fixed value for this argument.
Alright, lets go with that then.
Thanks,
Charles
Mark Brown
maintainerRe: (subset) [PATCH 1/2] ASoC: SDCA: remove the max count of initialization table
In reply to [email protected]Quoted 1 line · On Wed, 25 Mar 2026 17:20:17 +0800, [email protected] wrote:
ASoC: SDCA: remove the max count of initialization table
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-7.0
Thanks!
[1/2] ASoC: SDCA: remove the max count of initialization table
https://git.kernel.org/broonie/sound/c/c991ca323841
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark