[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20250310104601.7325-13-venkataprasad.potturu@amd.com>
Date: Mon, 10 Mar 2025 16:15:59 +0530
From: Venkata Prasad Potturu <venkataprasad.potturu@....com>
To: <broonie@...nel.org>, <alsa-devel@...a-project.org>
CC: <Vijendar.Mukunda@....com>, <mario.limonciello@....com>,
<Basavaraj.Hiregoudar@....com>, <Sunil-kumar.Dommati@....com>,
<syed.sabakareem@....com>, Venkata Prasad Potturu
<venkataprasad.potturu@....com>, Liam Girdwood <lgirdwood@...il.com>,
Jaroslav Kysela <perex@...ex.cz>, Takashi Iwai <tiwai@...e.com>, Greg KH
<gregkh@...uxfoundation.org>, Peter Zijlstra <peterz@...radead.org>, "Jeff
Johnson" <quic_jjohnson@...cinc.com>, Uwe Kleine-König
<u.kleine-koenig@...libre.com>, "open list:SOUND - SOC LAYER / DYNAMIC AUDIO
POWER MANAGEM..." <linux-sound@...r.kernel.org>, open list
<linux-kernel@...r.kernel.org>
Subject: [PATCH 12/14] ASoC: amd: acp: Refactor rembrant platform resource structure
Refactor rembrandt platform resource private structure to amd.h
header fle.
Signed-off-by: Venkata Prasad Potturu <venkataprasad.potturu@....com>
---
sound/soc/amd/acp/acp-pci.c | 1 +
sound/soc/amd/acp/acp-rembrandt.c | 13 +------------
sound/soc/amd/acp/amd.h | 10 ++++++++++
3 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/sound/soc/amd/acp/acp-pci.c b/sound/soc/amd/acp/acp-pci.c
index 91c6476c7371..cf4794cc2f54 100644
--- a/sound/soc/amd/acp/acp-pci.c
+++ b/sound/soc/amd/acp/acp-pci.c
@@ -140,6 +140,7 @@ static int acp_pci_probe(struct pci_dev *pci, const struct pci_device_id *pci_id
break;
case 0x6f:
chip->name = "acp_asoc_rembrandt";
+ chip->rsrc = &rmb_rsrc;
chip->acp_hw_ops_init = acp6x_hw_ops_init;
chip->machines = snd_soc_acpi_amd_rmb_acp_machines;
break;
diff --git a/sound/soc/amd/acp/acp-rembrandt.c b/sound/soc/amd/acp/acp-rembrandt.c
index dfb18d5cdc7a..21614e2e1b6c 100644
--- a/sound/soc/amd/acp/acp-rembrandt.c
+++ b/sound/soc/amd/acp/acp-rembrandt.c
@@ -34,16 +34,6 @@
#define MP1_C2PMSG_85 0x3B10A54
#define MP1_C2PMSG_93 0x3B10A74
-static struct acp_resource rsrc = {
- .offset = 0,
- .no_of_ctrls = 2,
- .irqp_used = 1,
- .soc_mclk = true,
- .irq_reg_offset = 0x1a00,
- .scratch_reg_offset = 0x12800,
- .sram_pte_offset = 0x03802800,
-};
-
static struct snd_soc_dai_driver acp_rmb_dai[] = {
{
.name = "acp-i2s-sp",
@@ -171,11 +161,10 @@ static int rembrandt_audio_probe(struct platform_device *pdev)
}
chip->dev = dev;
- chip->rsrc = &rsrc;
chip->dai_driver = acp_rmb_dai;
chip->num_dai = ARRAY_SIZE(acp_rmb_dai);
- if (chip->is_i2s_config && rsrc.soc_mclk) {
+ if (chip->is_i2s_config && chip->rsrc->soc_mclk) {
ret = acp6x_master_clock_generate(dev);
if (ret)
return ret;
diff --git a/sound/soc/amd/acp/amd.h b/sound/soc/amd/acp/amd.h
index 5f1d513148f3..67bc6b84564e 100644
--- a/sound/soc/amd/acp/amd.h
+++ b/sound/soc/amd/acp/amd.h
@@ -238,6 +238,16 @@ enum acp_config {
ACP_CONFIG_20,
};
+struct acp_resource rmb_rsrc = {
+ .offset = 0,
+ .no_of_ctrls = 2,
+ .irqp_used = 1,
+ .soc_mclk = true,
+ .irq_reg_offset = 0x1a00,
+ .scratch_reg_offset = 0x12800,
+ .sram_pte_offset = 0x03802800,
+};
+
struct acp_resource acp63_rsrc = {
.offset = 0,
.no_of_ctrls = 2,
--
2.39.2
Powered by blists - more mailing lists