Skip to contentSkip to conversation

ASoC: SOF: hda: reset DAI widget before reconfiguring it

PATCH In review Kai Vehmanen 2 participants 2 messages Nov 23, 2021 – Nov 24, 2021

Subsystems (3)
lore
Share & tools
lore

Kai Vehmanen

author reviewer
#0 lore raw

PATCH 1/1 ASoC: SOF: hda: reset DAI widget before reconfiguring it

From: Ranjani Sridharan <[email protected]>

It is not unusual for ALSA/ASoC hw_params callbacks to be invoked multiple times. Reset and free the DAI widget before reconfiguring it to keep the DAI widget use_count balanced.

Fixes 0acb48dd31e3 ("ASoC: SOF: Intel: hda: make sure DAI widget is set up before IPC")
---
 sound/soc/sof/intel/hda.c | 7 +++++++
 1 file changed, 7 insertions(+)
sound/soc/sof/intel/hda.c +7 -0
index 1e1e9659ea86..54dd18dce8d0 100644
@@ -58,6 +58,13 @@ int hda_ctrl_dai_widget_setup(struct snd_soc_dapm_widget *w)
 		return -EINVAL;
 	}
 
+	/* DAI already configured, reset it before reconfiguring it */
+	if (sof_dai->configured) {
+		ret = hda_ctrl_dai_widget_free(w);
+		if (ret < 0)
+			return ret;
+	}
+
 	config = &sof_dai->dai_config[sof_dai->current_config];
 
 	/*

base-commit: 65c16dd2942f4476a3f96a2625b1475c6137c09a

Signature · 1 line
2.33.0
maintainer
#1 lore raw
Quoted 8 lines · Kai Vehmanen

From: Ranjani Sridharan <[email protected]>

It is not unusual for ALSA/ASoC hw_params callbacks to be invoked multiple times. Reset and free the DAI widget before reconfiguring it to keep the DAI widget use_count balanced.

[...]

Applied to

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

Thanks!

[1/1] ASoC: SOF: hda: reset DAI widget before reconfiguring it

      commit: 86f74ba3fef56dd1cee19b7a15ae27fc0da5bb61

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