mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Venkata Prasad Potturu <venkataprasad.potturu@amd.com>
To: <broonie@kernel.org>, <alsa-devel@alsa-project.org>
Cc: <vsujithkumar.reddy@amd.com>, <Vijendar.Mukunda@amd.com>,
	<Basavaraj.Hiregoudar@amd.com>, <Sunil-kumar.Dommati@amd.com>,
	<ssabakar@amd.com>,
	Venkata Prasad Potturu <venkataprasad.potturu@amd.com>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
	V sujith kumar Reddy <Vsujithkumar.Reddy@amd.com>,
	Ajit Kumar Pandey <AjitKumar.Pandey@amd.com>,
	Akihiko Odaki <akihiko.odaki@gmail.com>,
	Jia-Ju Bai <baijiaju1990@gmail.com>,
	open list <linux-kernel@vger.kernel.org>
Subject: [PATCH 1/5] ASoC: amd: acp: Refactor i2s bclk calculation
Date: Tue, 20 Dec 2022 12:57:01 +0530	[thread overview]
Message-ID: <20221220072705.1456908-2-venkataprasad.potturu@amd.com> (raw)
In-Reply-To: <20221220072705.1456908-1-venkataprasad.potturu@amd.com>

Refactor i2s bclk value based on hw_params.

Signed-off-by: Venkata Prasad Potturu <venkataprasad.potturu@amd.com>
---
 sound/soc/amd/acp/acp-mach-common.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/sound/soc/amd/acp/acp-mach-common.c b/sound/soc/amd/acp/acp-mach-common.c
index a78cf29387a7..016110fd6ad8 100644
--- a/sound/soc/amd/acp/acp-mach-common.c
+++ b/sound/soc/amd/acp/acp-mach-common.c
@@ -352,8 +352,11 @@ static int acp_card_rt1019_hw_params(struct snd_pcm_substream *substream,
 	struct acp_card_drvdata *drvdata = card->drvdata;
 	struct snd_soc_dai *codec_dai;
 	int srate, i, ret = 0;
+	unsigned int ch, format;
 
 	srate = params_rate(params);
+	ch = params_channels(params);
+	format = 8 * params_format(params);
 
 	if (drvdata->amp_codec_id != RT1019)
 		return -EINVAL;
@@ -363,7 +366,7 @@ static int acp_card_rt1019_hw_params(struct snd_pcm_substream *substream,
 			continue;
 
 		ret = snd_soc_dai_set_pll(codec_dai, 0, RT1019_PLL_S_BCLK,
-					  64 * srate, 256 * srate);
+					  ch * format * srate, 256 * srate);
 		if (ret < 0)
 			return ret;
 
-- 
2.25.1


       reply	other threads:[~2022-12-20  7:23 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20221220072705.1456908-1-venkataprasad.potturu@amd.com>
2022-12-20  7:27 ` Venkata Prasad Potturu [this message]
2022-12-20  7:27 ` [PATCH 2/5] ASoC: amd: acp: Add new cpu dai's in machine driver Venkata Prasad Potturu
2022-12-20  7:27 ` [PATCH 3/5] ASoC: amd: acp: Refactor dai format implementation Venkata Prasad Potturu
2022-12-26 22:57   ` Mark Brown
2022-12-20  7:27 ` [PATCH 4/5] ASoC: amd: acp: Add tdm support in machine driver Venkata Prasad Potturu
2022-12-20  7:27 ` [PATCH 5/5] ASoC: amd: acp: Enable tdm support for skyrim platforms 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=20221220072705.1456908-2-venkataprasad.potturu@amd.com \
    --to=venkataprasad.potturu@amd.com \
    --cc=AjitKumar.Pandey@amd.com \
    --cc=Basavaraj.Hiregoudar@amd.com \
    --cc=Sunil-kumar.Dommati@amd.com \
    --cc=Vijendar.Mukunda@amd.com \
    --cc=akihiko.odaki@gmail.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=baijiaju1990@gmail.com \
    --cc=broonie@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=ssabakar@amd.com \
    --cc=tiwai@suse.com \
    --cc=vsujithkumar.reddy@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®