Skip to contentSkip to conversation

ASoC: SOF: Intel: MTL: conditionally wake WPIO1PG domain

PATCH In review Pierre-Louis Bossart 2 participants 2 messages Apr 6, 2023

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

PATCH 1/1 ASoC: SOF: Intel: MTL: conditionally wake WPIO1PG domain

From: Yong Zhi <[email protected]>

Wake IO1 from power gating if there is SoundWire enabled link discovered by ACPI scan.

---
 sound/soc/sof/intel/mtl.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
sound/soc/sof/intel/mtl.c +6 -3
index 58959c24cb71..882ce5536ab6 100644
@@ -217,6 +217,7 @@ static int mtl_enable_interrupts(struct snd_sof_dev *sdev, bool enable)
 /* pre fw run operations */
 static int mtl_dsp_pre_fw_run(struct snd_sof_dev *sdev)
 {
+	struct sof_intel_hda_dev *hdev = sdev->pdata->hw_pdata;
 	u32 dsphfpwrsts;
 	u32 dsphfdsscs;
 	u32 cpa;
@@ -255,9 +256,11 @@ static int mtl_dsp_pre_fw_run(struct snd_sof_dev *sdev)
 	if (ret < 0)
 		dev_err(sdev->dev, "failed to power up gated DSP domain\n");
 
-	/* make sure SoundWire is not power-gated */
-	snd_sof_dsp_update_bits(sdev, HDA_DSP_BAR, MTL_HFPWRCTL,
-				MTL_HfPWRCTL_WPIOXPG(1), MTL_HfPWRCTL_WPIOXPG(1));
+	/* if SoundWire is used, make sure it is not power-gated */
+	if (hdev->info.handle && hdev->info.link_mask > 0)
+		snd_sof_dsp_update_bits(sdev, HDA_DSP_BAR, MTL_HFPWRCTL,
+					MTL_HfPWRCTL_WPIOXPG(1), MTL_HfPWRCTL_WPIOXPG(1));
+
 	return ret;
 }
 
Signature · 1 line
2.37.2
maintainer
#1 lore raw
Quoted 4 lines · Pierre-Louis Bossart

Wake IO1 from power gating if there is SoundWire enabled link discovered by ACPI scan.

Applied to

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

Thanks!

[1/1] ASoC: SOF: Intel: MTL: conditionally wake WPIO1PG domain

      commit: f747eb86e4a82d0823328f642a667bffce703028

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