Skip to content

Commit c7e328f

Browse files
plbossartbroonie
authored andcommitted
ASoC: SOF: sof-audio: don't squelch errors in WIDGET_SETUP phase
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. Signed-off-by: Pierre-Louis Bossart <[email protected]> Reviewed-by: Ranjani Sridharan <[email protected]> Reviewed-by: Chao Song <[email protected]> Reviewed-by: Bard Liao <[email protected]> Signed-off-by: Peter Ujfalusi <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent 8bac40b commit c7e328f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sound/soc/sof/sof-audio.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -610,8 +610,8 @@ int sof_widget_list_setup(struct snd_sof_dev *sdev, struct snd_sof_pcm *spcm,
610610
ret = sof_walk_widgets_in_order(sdev, spcm, fe_params, platform_params,
611611
dir, SOF_WIDGET_SETUP);
612612
if (ret < 0) {
613-
ret = sof_walk_widgets_in_order(sdev, spcm, fe_params, platform_params,
614-
dir, SOF_WIDGET_UNPREPARE);
613+
sof_walk_widgets_in_order(sdev, spcm, fe_params, platform_params,
614+
dir, SOF_WIDGET_UNPREPARE);
615615
return ret;
616616
}
617617

0 commit comments

Comments
 (0)