Skip to content

Commit 451bd0e

Browse files
vijendarmukundabroonie
authored andcommitted
ASoC: SOF: amd: add ACP7.1 platform support
Add SOF support for ACP7.1 platform. Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Link: https://patch.msgid.link/20250502154445.3008598-4-Vijendar.Mukunda@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent 7c2bad7 commit 451bd0e

4 files changed

Lines changed: 19 additions & 5 deletions

File tree

sound/soc/sof/amd/Kconfig

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,13 +94,13 @@ config SND_SOC_SOF_AMD_ACP63
9494
If unsure select "N".
9595

9696
config SND_SOC_SOF_AMD_ACP70
97-
tristate "SOF support for ACP7.0 platform"
97+
tristate "SOF support for ACP7.0/ACP7.1 platforms"
9898
depends on SND_SOC_SOF_PCI
9999
depends on AMD_NODE
100100
select SND_SOC_SOF_AMD_COMMON
101101
help
102102
Select this option for SOF support on
103-
AMD ACP7.0 version based platforms.
104-
Say Y if you want to enable SOF on ACP7.0 based platform.
103+
AMD ACP7.0/ACP7.1 version based platforms.
104+
Say Y if you want to enable SOF on ACP7.0/ACP7.1 based platforms.
105105

106106
endif

sound/soc/sof/amd/acp.c

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ static void init_dma_descriptor(struct acp_dev_data *adata)
5858

5959
switch (acp_data->pci_rev) {
6060
case ACP70_PCI_ID:
61+
case ACP71_PCI_ID:
6162
acp_dma_desc_base_addr = ACP70_DMA_DESC_BASE_ADDR;
6263
acp_dma_desc_max_num_dscr = ACP70_DMA_DESC_MAX_NUM_DSCR;
6364
break;
@@ -97,6 +98,7 @@ static int config_dma_channel(struct acp_dev_data *adata, unsigned int ch,
9798

9899
switch (acp_data->pci_rev) {
99100
case ACP70_PCI_ID:
101+
case ACP71_PCI_ID:
100102
acp_dma_cntl_0 = ACP70_DMA_CNTL_0;
101103
acp_dma_ch_rst_sts = ACP70_DMA_CH_RST_STS;
102104
acp_dma_dscr_err_sts_0 = ACP70_DMA_ERR_STS_0;
@@ -336,6 +338,7 @@ int acp_dma_status(struct acp_dev_data *adata, unsigned char ch)
336338

337339
switch (adata->pci_rev) {
338340
case ACP70_PCI_ID:
341+
case ACP71_PCI_ID:
339342
acp_dma_ch_sts = ACP70_DMA_CH_STS;
340343
break;
341344
default:
@@ -486,6 +489,7 @@ static int acp_power_on(struct snd_sof_dev *sdev)
486489
acp_pgfsm_cntl_mask = ACP6X_PGFSM_CNTL_POWER_ON_MASK;
487490
break;
488491
case ACP70_PCI_ID:
492+
case ACP71_PCI_ID:
489493
acp_pgfsm_status_mask = ACP70_PGFSM_STATUS_MASK;
490494
acp_pgfsm_cntl_mask = ACP70_PGFSM_CNTL_POWER_ON_MASK;
491495
break;
@@ -616,8 +620,12 @@ int amd_sof_acp_suspend(struct snd_sof_dev *sdev, u32 target_state)
616620
dev_err(sdev->dev, "ACP Reset failed\n");
617621
return ret;
618622
}
619-
if (acp_data->pci_rev == ACP70_PCI_ID)
623+
switch (acp_data->pci_rev) {
624+
case ACP70_PCI_ID:
625+
case ACP71_PCI_ID:
620626
enable = true;
627+
break;
628+
}
621629
snd_sof_dsp_write(sdev, ACP_DSP_BAR, ACP_CONTROL, enable);
622630

623631
return 0;

sound/soc/sof/amd/acp.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@
7474
#define ACP_RMB_PCI_ID 0x6F
7575
#define ACP63_PCI_ID 0x63
7676
#define ACP70_PCI_ID 0x70
77+
#define ACP71_PCI_ID 0x71
7778

7879
#define HOST_BRIDGE_CZN 0x1630
7980
#define HOST_BRIDGE_VGH 0x1645

sound/soc/sof/amd/pci-acp70.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,13 @@ static int acp70_pci_probe(struct pci_dev *pci, const struct pci_device_id *pci_
7171
{
7272
unsigned int flag;
7373

74-
if (pci->revision != ACP70_PCI_ID)
74+
switch (pci->revision) {
75+
case ACP70_PCI_ID:
76+
case ACP71_PCI_ID:
77+
break;
78+
default:
7579
return -ENODEV;
80+
}
7681

7782
flag = snd_amd_acp_find_config(pci);
7883
if (flag != FLAG_AMD_SOF && flag != FLAG_AMD_SOF_ONLY_DMIC)

0 commit comments

Comments
 (0)