[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240924061821.1127054-9-Vijendar.Mukunda@amd.com>
Date: Tue, 24 Sep 2024 11:48:20 +0530
From: Vijendar Mukunda <Vijendar.Mukunda@....com>
To: <broonie@...nel.org>
CC: <alsa-devel@...a-project.org>, <lgirdwood@...il.com>, <perex@...ex.cz>,
<tiwai@...e.com>, <Basavaraj.Hiregoudar@....com>,
<Sunil-kumar.Dommati@....com>, <venkataprasad.potturu@....com>,
<linux-sound@...r.kernel.org>, <linux-kernel@...r.kernel.org>, "Vijendar
Mukunda" <Vijendar.Mukunda@....com>
Subject: [PATCH V2 8/9] ASoC: amd: acp: replace adata->platform conditional check
Replace adata->platform condition check with acp pci revision id
variable in config_acp_dma() & acp70_i2s_master_clock_generate()
functions.
Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@....com>
---
sound/soc/amd/acp/acp-platform.c | 6 +++---
sound/soc/amd/acp/acp70.c | 4 ++--
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/sound/soc/amd/acp/acp-platform.c b/sound/soc/amd/acp/acp-platform.c
index 78fcff6ea657..7be9b4ff7923 100644
--- a/sound/soc/amd/acp/acp-platform.c
+++ b/sound/soc/amd/acp/acp-platform.c
@@ -205,9 +205,9 @@ void config_acp_dma(struct acp_dev_data *adata, struct acp_stream *stream, int s
u32 low, high, val;
u16 page_idx;
- switch (adata->platform) {
- case ACP70:
- case ACP71:
+ switch (adata->acp_rev) {
+ case ACP70_PCI_ID:
+ case ACP71_PCI_ID:
switch (stream->dai_id) {
case I2S_SP_INSTANCE:
if (stream->dir == SNDRV_PCM_STREAM_PLAYBACK)
diff --git a/sound/soc/amd/acp/acp70.c b/sound/soc/amd/acp/acp70.c
index 82c26e4fefc1..db5dd64969b0 100644
--- a/sound/soc/amd/acp/acp70.c
+++ b/sound/soc/amd/acp/acp70.c
@@ -142,9 +142,9 @@ static int acp70_i2s_master_clock_generate(struct acp_dev_data *adata)
struct pci_dev *smn_dev;
u32 device_id;
- if (adata->platform == ACP70)
+ if (adata->acp_rev == ACP70_PCI_ID)
device_id = 0x1507;
- else if (adata->platform == ACP71)
+ else if (adata->acp_rev == ACP71_PCI_ID)
device_id = 0x1122;
else
return -ENODEV;
--
2.34.1
Powered by blists - more mailing lists