lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20221220072705.1456908-2-venkataprasad.potturu@amd.com>
Date:   Tue, 20 Dec 2022 12:57:01 +0530
From:   Venkata Prasad Potturu <venkataprasad.potturu@....com>
To:     <broonie@...nel.org>, <alsa-devel@...a-project.org>
CC:     <vsujithkumar.reddy@....com>, <Vijendar.Mukunda@....com>,
        <Basavaraj.Hiregoudar@....com>, <Sunil-kumar.Dommati@....com>,
        <ssabakar@....com>,
        Venkata Prasad Potturu <venkataprasad.potturu@....com>,
        Liam Girdwood <lgirdwood@...il.com>,
        Jaroslav Kysela <perex@...ex.cz>,
        Takashi Iwai <tiwai@...e.com>,
        V sujith kumar Reddy <Vsujithkumar.Reddy@....com>,
        Ajit Kumar Pandey <AjitKumar.Pandey@....com>,
        Akihiko Odaki <akihiko.odaki@...il.com>,
        Jia-Ju Bai <baijiaju1990@...il.com>,
        open list <linux-kernel@...r.kernel.org>
Subject: [PATCH 1/5] ASoC: amd: acp: Refactor i2s bclk calculation

Refactor i2s bclk value based on hw_params.

Signed-off-by: Venkata Prasad Potturu <venkataprasad.potturu@....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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ