From: Syed Saba Kareem <Syed.SabaKareem@amd.com>
To: <broonie@kernel.org>, <alsa-devel@alsa-project.org>
Cc: <Vijendar.Mukunda@amd.com>, <Basavaraj.Hiregoudar@amd.com>,
<Sunil-kumar.Dommati@amd.com>, <mario.limonciello@amd.com>,
<venkataprasad.potturu@amd.com>, <arungopal.kondaveeti@amd.com>,
<mastan.katragadda@amd.com>, <juan.martinez@amd.com>,
<amadeuszx.slawinski@linux.intel.com>, <dan.carpenter@linaro.org>,
"Syed Saba Kareem" <Syed.SabaKareem@amd.com>,
Liam Girdwood <lgirdwood@gmail.com>,
Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
"Kuninori Morimoto" <kuninori.morimoto.gx@renesas.com>,
open list <linux-kernel@vger.kernel.org>
Subject: [PATCH 3/3] ASoC: amd: acp: fix for i2s mode register field update
Date: Tue, 31 Oct 2023 19:29:34 +0530 [thread overview]
Message-ID: <20231031135949.1064581-3-Syed.SabaKareem@amd.com> (raw)
In-Reply-To: <20231031135949.1064581-1-Syed.SabaKareem@amd.com>
I2S mode register field will be set to 1 when tdm mode is enabled.
Update the I2S mode field based on tdm_mode flag check.
This will fix below smatch checker warning.
sound/soc/amd/acp/acp-i2s.c:59 acp_set_i2s_clk()
warn: odd binop '0x0 & 0x2'
Fixes: 40f74d5f09d7 ("ASoC: amd: acp: refactor acp i2s clock
generation code")
Reported-By: Dan Carpenter <dan.carpenter@linaro.org>
Signed-off-by: Syed Saba Kareem <Syed.SabaKareem@amd.com>
---
sound/soc/amd/acp/acp-i2s.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sound/soc/amd/acp/acp-i2s.c b/sound/soc/amd/acp/acp-i2s.c
index 1185e5aac523..60cbc881be6e 100644
--- a/sound/soc/amd/acp/acp-i2s.c
+++ b/sound/soc/amd/acp/acp-i2s.c
@@ -26,7 +26,6 @@
#define DRV_NAME "acp_i2s_playcap"
#define I2S_MASTER_MODE_ENABLE 1
-#define I2S_MODE_ENABLE 0
#define LRCLK_DIV_FIELD GENMASK(10, 2)
#define BCLK_DIV_FIELD GENMASK(23, 11)
#define ACP63_LRCLK_DIV_FIELD GENMASK(12, 2)
@@ -56,7 +55,8 @@ static inline void acp_set_i2s_clk(struct acp_dev_data *adata, int dai_id)
}
val = I2S_MASTER_MODE_ENABLE;
- val |= I2S_MODE_ENABLE & BIT(1);
+ if (adata->tdm_mode)
+ val |= BIT(1);
switch (chip->acp_rev) {
case ACP63_DEV:
--
2.25.1
next prev parent reply other threads:[~2023-10-31 14:00 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-31 13:59 [PATCH 1/3] ASoC: amd: acp: Fix for indentation issue Syed Saba Kareem
2023-10-31 13:59 ` [PATCH 2/3] ASoC: amd: acp: correct the format order Syed Saba Kareem
2023-10-31 13:59 ` Syed Saba Kareem [this message]
2023-11-01 7:30 ` [PATCH 3/3] ASoC: amd: acp: fix for i2s mode register field update Dan Carpenter
2023-10-31 15:54 ` (subset) [PATCH 1/3] ASoC: amd: acp: Fix for indentation issue Mark Brown
2023-11-06 13:03 ` 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=20231031135949.1064581-3-Syed.SabaKareem@amd.com \
--to=syed.sabakareem@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=amadeuszx.slawinski@linux.intel.com \
--cc=arungopal.kondaveeti@amd.com \
--cc=broonie@kernel.org \
--cc=dan.carpenter@linaro.org \
--cc=juan.martinez@amd.com \
--cc=kuninori.morimoto.gx@renesas.com \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mario.limonciello@amd.com \
--cc=mastan.katragadda@amd.com \
--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
all inboxes | Powered by JetHome®