Skip to content

Commit 60e5b24

Browse files
Venkata-Prasad-Potturubroonie
authored andcommitted
ASoC: amd: ps: Add SoundWire pci and dma driver support for acp7.2 platform
Add SoundWire pci and dma driver support for acp7.2 platform. Signed-off-by: Venkata Prasad Potturu <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent 918b744 commit 60e5b24

File tree

3 files changed

+10
-0
lines changed

3 files changed

+10
-0
lines changed

sound/soc/amd/ps/acp63.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
#define ACP63_PCI_REV 0x63
1515
#define ACP70_PCI_REV 0x70
1616
#define ACP71_PCI_REV 0x71
17+
#define ACP72_PCI_REV 0x72
1718

1819
#define ACP_SOFT_RESET_SOFTRESET_AUDDONE_MASK 0x00010001
1920
#define ACP63_PGFSM_CNTL_POWER_ON_MASK 1

sound/soc/amd/ps/pci-ps.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ static short int check_and_handle_sdw_dma_irq(struct acp63_dev_data *adata, u32
117117
break;
118118
case ACP70_PCI_REV:
119119
case ACP71_PCI_REV:
120+
case ACP72_PCI_REV:
120121
adata->acp70_sdw0_dma_intr_stat[stream_id] = 1;
121122
break;
122123
}
@@ -141,6 +142,7 @@ static short int check_and_handle_sdw_dma_irq(struct acp63_dev_data *adata, u32
141142
break;
142143
case ACP70_PCI_REV:
143144
case ACP71_PCI_REV:
145+
case ACP72_PCI_REV:
144146
if (ext_intr_stat1 & ACP70_P1_SDW_DMA_IRQ_MASK) {
145147
for (index = ACP70_P1_AUDIO2_RX_THRESHOLD;
146148
index <= ACP70_P1_AUDIO0_TX_THRESHOLD; index++) {
@@ -552,6 +554,7 @@ static int acp_hw_init_ops(struct acp63_dev_data *adata, struct pci_dev *pci)
552554
break;
553555
case ACP70_PCI_REV:
554556
case ACP71_PCI_REV:
557+
case ACP72_PCI_REV:
555558
acp70_hw_init_ops(adata->hw_ops);
556559
break;
557560
default:
@@ -581,6 +584,7 @@ static int snd_acp63_probe(struct pci_dev *pci,
581584
case ACP63_PCI_REV:
582585
case ACP70_PCI_REV:
583586
case ACP71_PCI_REV:
587+
case ACP72_PCI_REV:
584588
break;
585589
default:
586590
dev_dbg(&pci->dev, "acp63/acp70/acp71 pci device not found\n");

sound/soc/amd/ps/ps-sdw-dma.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,7 @@ static int acp63_configure_sdw_ringbuffer(void __iomem *acp_base, u32 stream_id,
269269
break;
270270
case ACP70_PCI_REV:
271271
case ACP71_PCI_REV:
272+
case ACP72_PCI_REV:
272273
switch (manager_instance) {
273274
case ACP_SDW0:
274275
reg_dma_size = acp70_sdw0_dma_reg[stream_id].reg_dma_size;
@@ -382,6 +383,7 @@ static int acp63_sdw_dma_hw_params(struct snd_soc_component *component,
382383
break;
383384
case ACP70_PCI_REV:
384385
case ACP71_PCI_REV:
386+
case ACP72_PCI_REV:
385387
switch (stream->instance) {
386388
case ACP_SDW0:
387389
sdw_data->acp70_sdw0_dma_stream[stream_id] = substream;
@@ -451,6 +453,7 @@ static u64 acp63_sdw_get_byte_count(struct acp_sdw_dma_stream *stream, void __io
451453
break;
452454
case ACP70_PCI_REV:
453455
case ACP71_PCI_REV:
456+
case ACP72_PCI_REV:
454457
switch (stream->instance) {
455458
case ACP_SDW0:
456459
pos_low_reg = acp70_sdw0_dma_reg[stream->stream_id].pos_low_reg;
@@ -529,6 +532,7 @@ static int acp63_sdw_dma_close(struct snd_soc_component *component,
529532
break;
530533
case ACP70_PCI_REV:
531534
case ACP71_PCI_REV:
535+
case ACP72_PCI_REV:
532536
switch (stream->instance) {
533537
case ACP_SDW0:
534538
sdw_data->acp70_sdw0_dma_stream[stream->stream_id] = NULL;
@@ -574,6 +578,7 @@ static int acp63_sdw_dma_enable(struct snd_pcm_substream *substream,
574578
break;
575579
case ACP70_PCI_REV:
576580
case ACP71_PCI_REV:
581+
case ACP72_PCI_REV:
577582
switch (stream->instance) {
578583
case ACP_SDW0:
579584
sdw_dma_en_reg = acp70_sdw0_dma_enable_reg[stream_id];

0 commit comments

Comments
 (0)