Skip to contentSkip to conversation

ASoC: rt712-sdca: fix speaker route missing issue

PATCH In review [email protected] 3 participants 3 messages Oct 30, 2023

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

PATCH 1/1 ASoC: rt712-sdca: fix speaker route missing issue

From: Shuming Fan <[email protected]>

Sometimes the codec probe would be called earlier than the hardware initialization. Therefore, the speaker route should be added before the the first_hw_init check.

---
 sound/soc/codecs/rt712-sdca.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)
sound/soc/codecs/rt712-sdca.c +7 -7
index 7077ff6ba1f4..6954fbe7ec5f 100644
@@ -963,13 +963,6 @@ static int rt712_sdca_probe(struct snd_soc_component *component)
 	rt712_sdca_parse_dt(rt712, &rt712->slave->dev);
 	rt712->component = component;
 
-	if (!rt712->first_hw_init)
-		return 0;
-
-	ret = pm_runtime_resume(component->dev);
-	if (ret < 0 && ret != -EACCES)
-		return ret;
-
 	/* add SPK route */
 	if (rt712->hw_id != RT712_DEV_ID_713) {
 		snd_soc_add_component_controls(component,
@@ -980,6 +973,13 @@ static int rt712_sdca_probe(struct snd_soc_component *component)
 			rt712_sdca_spk_dapm_routes, ARRAY_SIZE(rt712_sdca_spk_dapm_routes));
 	}
 
+	if (!rt712->first_hw_init)
+		return 0;
+
+	ret = pm_runtime_resume(component->dev);
+	if (ret < 0 && ret != -EACCES)
+		return ret;
+
 	return 0;
 }
 
Signature · 1 line
2.34.1
#1 lore raw
Quoted 6 lines · On 2023/10/30 下午 06:36, [email protected] wrote:

From: Shuming Fan <[email protected]>

Sometimes the codec probe would be called earlier than the hardware initialization. Therefore, the speaker route should be added before the the first_hw_init check.

Do we need

Fixes f3da2ed110e2 ("ASoC: rt1712-sdca: enable pm_runtime in probe, keep status as 'suspended'")?
Quoted 36 lines
---
  sound/soc/codecs/rt712-sdca.c | 14 +++++++-------
  1 file changed, 7 insertions(+), 7 deletions(-)
sound/soc/codecs/rt712-sdca.c +7 -7
index 7077ff6ba1f4..6954fbe7ec5f 100644
@@ -963,13 +963,6 @@ static int rt712_sdca_probe(struct snd_soc_component *component)
  	rt712_sdca_parse_dt(rt712, &rt712->slave->dev);
  	rt712->component = component;
 
-	if (!rt712->first_hw_init)
-		return 0;
-
-	ret = pm_runtime_resume(component->dev);
-	if (ret < 0 && ret != -EACCES)
-		return ret;
-
  	/* add SPK route */
  	if (rt712->hw_id != RT712_DEV_ID_713) {
  		snd_soc_add_component_controls(component,
@@ -980,6 +973,13 @@ static int rt712_sdca_probe(struct snd_soc_component *component)
  			rt712_sdca_spk_dapm_routes, ARRAY_SIZE(rt712_sdca_spk_dapm_routes));
  	}
 
+	if (!rt712->first_hw_init)
+		return 0;
+
+	ret = pm_runtime_resume(component->dev);
+	if (ret < 0 && ret != -EACCES)
+		return ret;
+
  	return 0;
  }
 
maintainer
#2 lore raw
In reply to [email protected]
Quoted 4 lines · On Mon, 30 Oct 2023 18:36:44 +0800, [email protected] wrote:

Sometimes the codec probe would be called earlier than the hardware initialization. Therefore, the speaker route should be added before the the first_hw_init check.

Applied to

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

Thanks!

[1/1] ASoC: rt712-sdca: fix speaker route missing issue

      commit: 1a3b7eab8500a6b923f7b62cc8aa4d832c7dfb3e

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