Skip to contentSkip to conversation

ASoC: soc-pcm.c: Complete the active count for components without DAIs

PATCH Superseded Chancel Liu 2 participants 2 messages Dec 4, 2023 – Dec 18, 2023

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ASoC: soc-pcm.c: Complete the active count for components without DAIs

Some components like platforms don't have DAIs. If the active count of these components is ignored pinctrl may be wrongly selected between default and sleep state. So need to increment or decrement the active count for components without DAIs to avoid it.

---
 sound/soc/soc-pcm.c | 8 ++++++++
 1 file changed, 8 insertions(+)
sound/soc/soc-pcm.c +8 -0
index efde4203bbf7..7dd4d41f680a 100644
@@ -292,6 +292,7 @@ static void dpcm_set_be_update_state(struct snd_soc_pcm_runtime *be,
 void snd_soc_runtime_action(struct snd_soc_pcm_runtime *rtd,
 			    int stream, int action)
 {
+	struct snd_soc_component *component;
 	struct snd_soc_dai *dai;
 	int i;
 
@@ -299,6 +300,13 @@ void snd_soc_runtime_action(struct snd_soc_pcm_runtime *rtd,
 
 	for_each_rtd_dais(rtd, i, dai)
 		snd_soc_dai_action(dai, stream, action);
+
+	/* Increments/Decrements the active count for components without DAIs */
+	for_each_rtd_components(rtd, i, component) {
+		if (component->num_dai)
+			continue;
+		component->active += action;
+	}
 }
 EXPORT_SYMBOL_GPL(snd_soc_runtime_action);
 
Signature · 1 line
2.42.0
maintainer
#1 lore raw
Quoted 6 lines · Chancel Liu

Some components like platforms don't have DAIs. If the active count of these components is ignored pinctrl may be wrongly selected between default and sleep state. So need to increment or decrement the active count for components without DAIs to avoid it.

Applied to

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

Thanks!

[1/1] ASoC: soc-pcm.c: Complete the active count for components without DAIs

      commit: 8f039360897bdd2f1f455b46a7f504b677405913

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