Linux Sound subsystem development
 help / color / mirror / Atom feed
From: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
To: <broonie@kernel.org>
Cc: <alsa-devel@alsa-project.org>, <lgirdwood@gmail.com>,
	<perex@perex.cz>, <tiwai@suse.com>,
	<Basavaraj.Hiregoudar@amd.com>, <Sunil-kumar.Dommati@amd.com>,
	<venkataprasad.potturu@amd.com>, <linux-sound@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>,
	"Vijendar Mukunda" <Vijendar.Mukunda@amd.com>
Subject: [PATCH 7/8] ASoC: amd: acp: replace adata->platform conditional check
Date: Wed, 18 Sep 2024 11:45:39 +0530	[thread overview]
Message-ID: <20240918061540.685579-8-Vijendar.Mukunda@amd.com> (raw)
In-Reply-To: <20240918061540.685579-1-Vijendar.Mukunda@amd.com>

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@amd.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 a6e5cb263377..b66e7f69ec75 100644
--- a/sound/soc/amd/acp/acp-platform.c
+++ b/sound/soc/amd/acp/acp-platform.c
@@ -204,9 +204,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


  parent reply	other threads:[~2024-09-18  6:22 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-18  6:15 [PATCH 0/8] ASoC: amd: acp: refactor acp version differentiation logic Vijendar Mukunda
2024-09-18  6:15 ` [PATCH 1/8] ASoC: amd: acp: simplify platform conditional checks code Vijendar Mukunda
2024-09-18  6:15 ` [PATCH 2/8] ASoC: amd: acp: use acp_rev for platform specific conditional checks Vijendar Mukunda
2024-09-18  6:15 ` [PATCH 3/8] ASoC: amd: acp: use acp pci revision id for platform differntiation Vijendar Mukunda
2024-09-18  6:15 ` [PATCH 4/8] ASoC: amd: acp: store acp pci rev id in platform driver private structure Vijendar Mukunda
2024-09-18  6:15 ` [PATCH 5/8] ASoC: amd: acp: pass acp pci revision id as platform data Vijendar Mukunda
2024-09-18  6:15 ` [PATCH 6/8] ASoC: amd: acp: remove unused variable from acp_card_drvdata structure Vijendar Mukunda
2024-09-18  6:15 ` Vijendar Mukunda [this message]
2024-09-18  6:15 ` [PATCH 8/8] ASoC: amd: acp: remove unused variable from acp platform driver Vijendar Mukunda
2024-09-20  8:42 ` [PATCH 0/8] ASoC: amd: acp: refactor acp version differentiation logic Mukunda,Vijendar
2024-10-01 17:53 ` Mark Brown

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=20240918061540.685579-8-Vijendar.Mukunda@amd.com \
    --to=vijendar.mukunda@amd.com \
    --cc=Basavaraj.Hiregoudar@amd.com \
    --cc=Sunil-kumar.Dommati@amd.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=tiwai@suse.com \
    --cc=venkataprasad.potturu@amd.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