* [PATCH for 7.0] ASoC: SOF: ipc4-topology: Allow bytes controls without initial payload
@ 2026-03-26 7:56 Peter Ujfalusi
2026-03-26 11:16 ` Mark Brown
0 siblings, 1 reply; 2+ messages in thread
From: Peter Ujfalusi @ 2026-03-26 7:56 UTC (permalink / raw)
To: lgirdwood, broonie
Cc: linux-sound, kai.vehmanen, ranjani.sridharan, yung-chuan.liao,
pierre-louis.bossart, seppo.ingalsuo, liam.r.girdwood, stable
It is unexpected, but allowed to have no initial payload for a bytes
control and the code is prepared to handle this case, but the size check
missed this corner case.
Update the check for minimal size to allow the initial size to be 0.
Cc: stable@vger.kernel.org
Fixes: a653820700b8 ("ASoC: SOF: ipc4-topology: Correct the allocation size for bytes controls")
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Liam Girdwood <liam.r.girdwood@intel.com>
Reviewed-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
---
Hi Mark,
The patch that this is fixing is in 7.0-rc which is marked to be
backported [1], so I guess this patch will follow it in this way or need
to point to the older patch to be carried back?
[1] a382082ff74b ("ASoC: SOF: ipc4-topology: Add support for TPLG_CTL_BYTES")
Regards,
Peter
sound/soc/sof/ipc4-topology.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/sof/ipc4-topology.c b/sound/soc/sof/ipc4-topology.c
index 82f1e44a145e..76812d8fb567 100644
--- a/sound/soc/sof/ipc4-topology.c
+++ b/sound/soc/sof/ipc4-topology.c
@@ -2951,7 +2951,7 @@ static int sof_ipc4_control_load_bytes(struct snd_sof_dev *sdev, struct snd_sof_
return -EINVAL;
}
- if (scontrol->priv_size < sizeof(struct sof_abi_hdr)) {
+ if (scontrol->priv_size && scontrol->priv_size < sizeof(struct sof_abi_hdr)) {
dev_err(sdev->dev,
"bytes control %s initial data size %zu is insufficient.\n",
scontrol->name, scontrol->priv_size);
--
2.53.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH for 7.0] ASoC: SOF: ipc4-topology: Allow bytes controls without initial payload
2026-03-26 7:56 [PATCH for 7.0] ASoC: SOF: ipc4-topology: Allow bytes controls without initial payload Peter Ujfalusi
@ 2026-03-26 11:16 ` Mark Brown
0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2026-03-26 11:16 UTC (permalink / raw)
To: lgirdwood, Peter Ujfalusi
Cc: linux-sound, kai.vehmanen, ranjani.sridharan, yung-chuan.liao,
pierre-louis.bossart, seppo.ingalsuo, liam.r.girdwood, stable
On Thu, 26 Mar 2026 09:56:18 +0200, Peter Ujfalusi wrote:
> ASoC: SOF: ipc4-topology: Allow bytes controls without initial payload
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-7.0
Thanks!
[1/1] ASoC: SOF: ipc4-topology: Allow bytes controls without initial payload
https://git.kernel.org/broonie/sound/c/d40a198e2b78
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] 2+ messages in thread
end of thread, other threads:[~2026-03-26 16:21 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-26 7:56 [PATCH for 7.0] ASoC: SOF: ipc4-topology: Allow bytes controls without initial payload Peter Ujfalusi
2026-03-26 11:16 ` Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox