Skip to contentSkip to conversation

ASoC: SOF: sof-audio: don't squelch errors in WIDGET_SETUP phase

PATCH In review Peter Ujfalusi 2 participants 2 messages Mar 7, 2023 – Mar 8, 2023

Subsystems (3)
lore
Share & tools
lore

Peter Ujfalusi

author maintainer
#0 lore raw

PATCH 1/1 ASoC: SOF: sof-audio: don't squelch errors in WIDGET_SETUP phase

From: Pierre-Louis Bossart <[email protected]>

When an IPC error happens while setting-up a widget during the FE hw_params phase, the existing logic will unwind all previous configurations but will overwrite the return status. The ALSA/ASoC logic will then proceed with the prepare and trigger phases, even though the firmware resources are not available.

Fix by returning the initial error code and ignoring the code returned in the UNPREPARE phase.

---
 sound/soc/sof/sof-audio.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
sound/soc/sof/sof-audio.c +2 -2
index d7df29f2ada8..6de388a8d0b8 100644
@@ -610,8 +610,8 @@ int sof_widget_list_setup(struct snd_sof_dev *sdev, struct snd_sof_pcm *spcm,
 	ret = sof_walk_widgets_in_order(sdev, spcm, fe_params, platform_params,
 					dir, SOF_WIDGET_SETUP);
 	if (ret < 0) {
-		ret = sof_walk_widgets_in_order(sdev, spcm, fe_params, platform_params,
-						dir, SOF_WIDGET_UNPREPARE);
+		sof_walk_widgets_in_order(sdev, spcm, fe_params, platform_params,
+					  dir, SOF_WIDGET_UNPREPARE);
 		return ret;
 	}
 
Signature · 1 line
2.39.2
maintainer
#1 lore raw
Quoted 10 lines · Peter Ujfalusi

When an IPC error happens while setting-up a widget during the FE hw_params phase, the existing logic will unwind all previous configurations but will overwrite the return status. The ALSA/ASoC logic will then proceed with the prepare and trigger phases, even though the firmware resources are not available.

Fix by returning the initial error code and ignoring the code returned in the UNPREPARE phase.

[...]

Applied to

https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[1/1] ASoC: SOF: sof-audio: don't squelch errors in WIDGET_SETUP phase

      commit: c7e328f1cbf22efe23bc3cd7dd6bb14efccc28d0

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