[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230130100104.4076640-1-venkataprasad.potturu@amd.com>
Date: Mon, 30 Jan 2023 15:31:00 +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>,
Akihiko Odaki <akihiko.odaki@...il.com>,
"Ajit Kumar Pandey" <AjitKumar.Pandey@....com>,
Jia-Ju Bai <baijiaju1990@...il.com>,
ye xingchen <ye.xingchen@....com.cn>,
open list <linux-kernel@...r.kernel.org>
Subject: [PATCH] ASoC: amd: acp: Refactor bit width calculation
Refactor bit width calculation using params_physical_width()
instead hard-code values.
Signed-off-by: Venkata Prasad Potturu <venkataprasad.potturu@....com>
---
sound/soc/amd/acp/acp-mach-common.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/sound/soc/amd/acp/acp-mach-common.c b/sound/soc/amd/acp/acp-mach-common.c
index b83ae946b3e4..b4dcce4fbae9 100644
--- a/sound/soc/amd/acp/acp-mach-common.c
+++ b/sound/soc/amd/acp/acp-mach-common.c
@@ -186,7 +186,7 @@ static int acp_card_rt5682_hw_params(struct snd_pcm_substream *substream,
srate = params_rate(params);
ch = params_channels(params);
- format = 8 * params_format(params);
+ format = params_physical_width(params);
if (drvdata->tdm_mode)
fmt = SND_SOC_DAIFMT_DSP_A;
@@ -330,7 +330,7 @@ static int acp_card_rt5682s_hw_params(struct snd_pcm_substream *substream,
srate = params_rate(params);
ch = params_channels(params);
- format = 8 * params_format(params);
+ format = params_physical_width(params);
if (drvdata->tdm_mode)
fmt = SND_SOC_DAIFMT_DSP_A;
@@ -475,7 +475,7 @@ static int acp_card_rt1019_hw_params(struct snd_pcm_substream *substream,
srate = params_rate(params);
ch = params_channels(params);
- format = 8 * params_format(params);
+ format = params_physical_width(params);
if (drvdata->amp_codec_id != RT1019)
return -EINVAL;
@@ -616,7 +616,7 @@ static int acp_card_maxim_hw_params(struct snd_pcm_substream *substream,
srate = params_rate(params);
ch = params_channels(params);
- format = 8 * params_format(params);
+ format = params_physical_width(params);
if (drvdata->tdm_mode)
fmt = SND_SOC_DAIFMT_DSP_A;
--
2.25.1
Powered by blists - more mailing lists