* [PATCH 1/2] ASoC: SDCA: remove the max count of initialization table
@ 2026-03-25 9:20 shumingf
2026-03-25 10:00 ` Charles Keepax
2026-03-25 12:22 ` (subset) " Mark Brown
0 siblings, 2 replies; 5+ messages in thread
From: shumingf @ 2026-03-25 9:20 UTC (permalink / raw)
To: broonie, lgirdwood
Cc: linux-sound, lars, flove, oder_chiou, jack.yu, derek.fang,
ckeepax, Shuming Fan
From: Shuming Fan <shumingf@realtek.com>
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>
---
include/sound/sdca_function.h | 5 -----
sound/soc/sdca/sdca_functions.c | 3 ---
2 files changed, 8 deletions(-)
diff --git a/include/sound/sdca_function.h b/include/sound/sdca_function.h
index 79bd5a7a0f88..0e871c786513 100644
--- a/include/sound/sdca_function.h
+++ b/include/sound/sdca_function.h
@@ -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
diff --git a/sound/soc/sdca/sdca_functions.c b/sound/soc/sdca/sdca_functions.c
index 257158bc67ea..0b7d97dcb236 100644
--- a/sound/soc/sdca/sdca_functions.c
+++ b/sound/soc/sdca/sdca_functions.c
@@ -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);
--
2.53.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] ASoC: SDCA: remove the max count of initialization table
2026-03-25 9:20 [PATCH 1/2] ASoC: SDCA: remove the max count of initialization table shumingf
@ 2026-03-25 10:00 ` Charles Keepax
2026-03-25 10:51 ` Shuming [范書銘]
2026-03-25 12:22 ` (subset) " Mark Brown
1 sibling, 1 reply; 5+ messages in thread
From: Charles Keepax @ 2026-03-25 10:00 UTC (permalink / raw)
To: shumingf
Cc: broonie, lgirdwood, linux-sound, lars, flove, oder_chiou, jack.yu,
derek.fang
On Wed, Mar 25, 2026 at 05:20:17PM +0800, shumingf@realtek.com wrote:
> From: Shuming Fan <shumingf@realtek.com>
>
> 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
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: [PATCH 1/2] ASoC: SDCA: remove the max count of initialization table
2026-03-25 10:00 ` Charles Keepax
@ 2026-03-25 10:51 ` Shuming [范書銘]
2026-03-25 10:58 ` Charles Keepax
0 siblings, 1 reply; 5+ messages in thread
From: Shuming [范書銘] @ 2026-03-25 10:51 UTC (permalink / raw)
To: Charles Keepax
Cc: broonie@kernel.org, lgirdwood@gmail.com,
linux-sound@vger.kernel.org, lars@metafoo.de, Flove(HsinFu),
Oder Chiou, Jack Yu, Derek [方德義]
> On Wed, Mar 25, 2026 at 05:20:17PM +0800, shumingf@realtek.com wrote:
> > From: Shuming Fan <shumingf@realtek.com>
> >
> > 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.
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.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] ASoC: SDCA: remove the max count of initialization table
2026-03-25 10:51 ` Shuming [范書銘]
@ 2026-03-25 10:58 ` Charles Keepax
0 siblings, 0 replies; 5+ messages in thread
From: Charles Keepax @ 2026-03-25 10:58 UTC (permalink / raw)
To: Shuming [范書銘]
Cc: broonie@kernel.org, lgirdwood@gmail.com,
linux-sound@vger.kernel.org, lars@metafoo.de, Flove(HsinFu),
Oder Chiou, Jack Yu, Derek [方德義]
On Wed, Mar 25, 2026 at 10:51:24AM +0000, Shuming [范書銘] wrote:
> > On Wed, Mar 25, 2026 at 05:20:17PM +0800, shumingf@realtek.com wrote:
> > > From: Shuming Fan <shumingf@realtek.com>
> > > 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.
>
> 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.
Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Thanks,
Charles
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: (subset) [PATCH 1/2] ASoC: SDCA: remove the max count of initialization table
2026-03-25 9:20 [PATCH 1/2] ASoC: SDCA: remove the max count of initialization table shumingf
2026-03-25 10:00 ` Charles Keepax
@ 2026-03-25 12:22 ` Mark Brown
1 sibling, 0 replies; 5+ messages in thread
From: Mark Brown @ 2026-03-25 12:22 UTC (permalink / raw)
To: lgirdwood, shumingf
Cc: linux-sound, lars, flove, oder_chiou, jack.yu, derek.fang,
ckeepax
On Wed, 25 Mar 2026 17:20:17 +0800, shumingf@realtek.com 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
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2026-03-25 18:31 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-25 9:20 [PATCH 1/2] ASoC: SDCA: remove the max count of initialization table shumingf
2026-03-25 10:00 ` Charles Keepax
2026-03-25 10:51 ` Shuming [范書銘]
2026-03-25 10:58 ` Charles Keepax
2026-03-25 12:22 ` (subset) " Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox