From: Venkata Prasad Potturu <venkataprasad.potturu@amd.com>
To: <broonie@kernel.org>, <alsa-devel@alsa-project.org>
Cc: Vijendar.Mukunda@amd.com, mario.limonciello@amd.com,
Basavaraj.Hiregoudar@amd.com, Sunil-kumar.Dommati@amd.com,
syed.sabakareem@amd.com,
"Venkata Prasad Potturu" <venkataprasad.potturu@amd.com>,
"Liam Girdwood" <lgirdwood@gmail.com>,
"Jaroslav Kysela" <perex@perex.cz>,
"Takashi Iwai" <tiwai@suse.com>,
"Greg KH" <gregkh@linuxfoundation.org>,
"Peter Zijlstra" <peterz@infradead.org>,
"Jeff Johnson" <quic_jjohnson@quicinc.com>,
"Uwe Kleine-König" <u.kleine-koenig@baylibre.com>,
"open list:SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEM..."
<linux-sound@vger.kernel.org>,
"open list" <linux-kernel@vger.kernel.org>
Subject: [PATCH 12/14] ASoC: amd: acp: Refactor rembrant platform resource structure
Date: Mon, 10 Mar 2025 16:15:59 +0530 [thread overview]
Message-ID: <20250310104601.7325-13-venkataprasad.potturu@amd.com> (raw)
In-Reply-To: <20250310104601.7325-1-venkataprasad.potturu@amd.com>
Refactor rembrandt platform resource private structure to amd.h
header fle.
Signed-off-by: Venkata Prasad Potturu <venkataprasad.potturu@amd.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
next prev parent reply other threads:[~2025-03-10 10:47 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20250310104601.7325-1-venkataprasad.potturu@amd.com>
2025-03-10 10:45 ` [PATCH 01/14] ASoC: amd: acp: Remove redundant acp70 chip->name Venkata Prasad Potturu
2025-03-10 10:45 ` [PATCH 02/14] ASoC: amd: acp: Implement acp_common_hw_ops support for acp platforms Venkata Prasad Potturu
2025-03-10 11:25 ` Amadeusz Sławiński
2025-03-10 12:06 ` potturu venkata prasad
2025-03-10 10:45 ` [PATCH 03/14] ASoC: amd: acp: Refactor dmic-codec platform device creation Venkata Prasad Potturu
2025-03-10 11:30 ` Amadeusz Sławiński
2025-03-10 12:09 ` potturu venkata prasad
2025-03-10 10:45 ` [PATCH 04/14] ASoC: amd: acp: Refactor acp " Venkata Prasad Potturu
2025-03-10 10:45 ` [PATCH 05/14] ASoC: amd: acp: Refactor acp machine select Venkata Prasad Potturu
2025-03-10 10:45 ` [PATCH 06/14] ASoC: amd: acp: Add new interrupt handle callbacks in acp_common_hw_ops Venkata Prasad Potturu
2025-03-10 10:45 ` [PATCH 07/14] ASoC: amd: acp: Remove redundant acp_dev_data structure Venkata Prasad Potturu
2025-03-10 10:45 ` [PATCH 08/14] ASoC: amd: acp: Move spin_lock and list initialization to acp-pci driver Venkata Prasad Potturu
2025-03-10 10:45 ` [PATCH 09/14] ASoC: amd: acp: Remove white line Venkata Prasad Potturu
2025-03-10 10:45 ` [PATCH 10/14] ASoC: amd: acp: Refactor acp70 platform resource structure Venkata Prasad Potturu
2025-03-10 10:45 ` [PATCH 11/14] ASoC: amd: acp: Refactor acp63 " Venkata Prasad Potturu
2025-03-10 10:45 ` Venkata Prasad Potturu [this message]
2025-03-10 10:46 ` [PATCH 13/14] ASoC: amd: acp: Refactor renoir " Venkata Prasad Potturu
2025-03-10 10:46 ` [PATCH 14/14] ASoC: amd: acp: Fix for enabling DMIC on acp platforms via _DSD entry Venkata Prasad Potturu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250310104601.7325-13-venkataprasad.potturu@amd.com \
--to=venkataprasad.potturu@amd.com \
--cc=Basavaraj.Hiregoudar@amd.com \
--cc=Sunil-kumar.Dommati@amd.com \
--cc=Vijendar.Mukunda@amd.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=mario.limonciello@amd.com \
--cc=perex@perex.cz \
--cc=peterz@infradead.org \
--cc=quic_jjohnson@quicinc.com \
--cc=syed.sabakareem@amd.com \
--cc=tiwai@suse.com \
--cc=u.kleine-koenig@baylibre.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox