ASoC: SOF: ipc4-topology: Allow bytes controls without initial payload
Subsystems (2)
PATCH 1/1 ASoC: SOF: ipc4-topology: Allow bytes controls without initial payload
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.
---
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(-)
sound/soc/sof/ipc4-topology.c +1 -1
@@ -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);
Signature · 1 line
2.53.0
Quoted 1 line · Peter Ujfalusi
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