Skip to content

Commit 93c60ab

Browse files
yongzhi1plbossart
authored andcommitted
ASoC: SOF: Intel: MTL: conditionally wake WPIO1PG domain
Wake IO1 from power gating if there is SoundWire enabled link discovered by ACPI scan. Signed-off-by: Yong Zhi <yong.zhi@intel.com>
1 parent 43d022d commit 93c60ab

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

sound/soc/sof/intel/mtl.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,7 @@ static int mtl_enable_interrupts(struct snd_sof_dev *sdev, bool enable)
217217
/* pre fw run operations */
218218
static int mtl_dsp_pre_fw_run(struct snd_sof_dev *sdev)
219219
{
220+
struct sof_intel_hda_dev *hdev = sdev->pdata->hw_pdata;
220221
u32 dsphfpwrsts;
221222
u32 dsphfdsscs;
222223
u32 cpa;
@@ -255,9 +256,11 @@ static int mtl_dsp_pre_fw_run(struct snd_sof_dev *sdev)
255256
if (ret < 0)
256257
dev_err(sdev->dev, "failed to power up gated DSP domain\n");
257258

258-
/* make sure SoundWire is not power-gated */
259-
snd_sof_dsp_update_bits(sdev, HDA_DSP_BAR, MTL_HFPWRCTL,
260-
MTL_HfPWRCTL_WPIOXPG(1), MTL_HfPWRCTL_WPIOXPG(1));
259+
/* if SoundWire is used, make sure it is not power-gated */
260+
if (hdev->info.handle && hdev->info.link_mask > 0)
261+
snd_sof_dsp_update_bits(sdev, HDA_DSP_BAR, MTL_HFPWRCTL,
262+
MTL_HfPWRCTL_WPIOXPG(1), MTL_HfPWRCTL_WPIOXPG(1));
263+
261264
return ret;
262265
}
263266

0 commit comments

Comments
 (0)