Skip to content

Commit a536f3c

Browse files
vijendarmukundabroonie
authored andcommitted
ASoC: SOF: amd: enable soundwire host wake irq mask
Enable SoundWire host wake interrupt mask during acp init sequence based on wake enable checks for each SoundWire manager instance for ACP7.0 & ACP7.1 platforms. Signed-off-by: Vijendar Mukunda <[email protected]> Reviewed-by: Ranjani Sridharan <[email protected]> Reviewed-by: Bard Liao <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent 169c5e4 commit a536f3c

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

sound/soc/sof/amd/acp-dsp-offset.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,4 +131,9 @@
131131
#define ACP_SW0_EN 0x3000
132132
#define ACP_SW1_EN 0x3C00
133133
#define ACP70_PME_EN 0x1400
134+
#define ACP70_EXTERNAL_INTR_CNTL1 0x1A08
135+
#define ACP70_SW0_WAKE_EN 0x1458
136+
#define ACP70_SW1_WAKE_EN 0x1460
137+
#define ACP70_SDW_HOST_WAKE_MASK 0x0C00000
138+
134139
#endif

sound/soc/sof/amd/acp.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -563,6 +563,7 @@ static int acp_init(struct snd_sof_dev *sdev)
563563
{
564564
const struct sof_amd_acp_desc *desc = get_chip_info(sdev->pdata);
565565
struct acp_dev_data *acp_data;
566+
unsigned int sdw0_wake_en, sdw1_wake_en;
566567
int ret;
567568

568569
/* power on */
@@ -591,6 +592,12 @@ static int acp_init(struct snd_sof_dev *sdev)
591592
switch (acp_data->pci_rev) {
592593
case ACP70_PCI_ID:
593594
case ACP71_PCI_ID:
595+
sdw0_wake_en = snd_sof_dsp_read(sdev, ACP_DSP_BAR, ACP70_SW0_WAKE_EN);
596+
sdw1_wake_en = snd_sof_dsp_read(sdev, ACP_DSP_BAR, ACP70_SW1_WAKE_EN);
597+
if (sdw0_wake_en || sdw1_wake_en)
598+
snd_sof_dsp_update_bits(sdev, ACP_DSP_BAR, ACP70_EXTERNAL_INTR_CNTL1,
599+
ACP70_SDW_HOST_WAKE_MASK, ACP70_SDW_HOST_WAKE_MASK);
600+
594601
snd_sof_dsp_write(sdev, ACP_DSP_BAR, ACP70_PME_EN, 1);
595602
break;
596603
}

0 commit comments

Comments
 (0)