From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
To: Venkata Prasad Potturu <venkataprasad.potturu@amd.com>,
broonie@kernel.org, alsa-devel@alsa-project.org
Cc: Sunil-kumar.Dommati@amd.com, ssabakar@amd.com,
Ajit Kumar Pandey <AjitKumar.Pandey@amd.com>,
Liam Girdwood <lgirdwood@gmail.com>,
Basavaraj.Hiregoudar@amd.com, Takashi Iwai <tiwai@suse.com>,
open list <linux-kernel@vger.kernel.org>,
Jia-Ju Bai <baijiaju1990@gmail.com>,
Mario Limonciello <mario.limonciello@amd.com>,
Akihiko Odaki <akihiko.odaki@gmail.com>,
Vijendar.Mukunda@amd.com,
V sujith kumar Reddy <Vsujithkumar.Reddy@amd.com>
Subject: Re: [PATCH v2 3/5] ASoC: amd: acp: Refactor i2s clocks programming sequence
Date: Wed, 25 Jan 2023 11:15:30 -0600 [thread overview]
Message-ID: <92052eef-3c61-7f3e-75c1-09b76cd38e24@linux.intel.com> (raw)
In-Reply-To: <20230109132104.1259479-4-venkataprasad.potturu@amd.com>
This patch adds new Sparse warnings [1]:
sound/soc/amd/acp/acp-mach-common.c:189:35: error: restricted
snd_pcm_format_t degrades to integer
sound/soc/amd/acp/acp-mach-common.c:333:35: error: restricted
snd_pcm_format_t degrades to integer
sound/soc/amd/acp/acp-mach-common.c:478:35: error: restricted
snd_pcm_format_t degrades to integer
sound/soc/amd/acp/acp-mach-common.c:619:35: error: restricted
snd_pcm_format_t degrades to integer
> @@ -193,7 +163,11 @@ static int acp_card_rt5682_hw_params(struct snd_pcm_substream *substream,
> struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0);
> struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0);
> int ret;
> - unsigned int fmt;
> + unsigned int fmt, srate, ch, format;
> +
> + srate = params_rate(params);
> + ch = params_channels(params);
> + format = 8 * params_format(params);
This last line looks suspicious, no? format-to-physical-size conversions
should be using existing macros.
Should it be
format = params_physical_width(params);
?
> + /* Set tdm/i2s1 master bclk ratio */
> + ret = snd_soc_dai_set_bclk_ratio(codec_dai, ch * format);
> + if (ret < 0) {
> + dev_err(rtd->dev, "Failed to set rt5682 tdm bclk ratio: %d\n", ret);
> + return ret;
> + }
> +
> + if (!drvdata->soc_mclk) {
> + ret = acp_clk_enable(drvdata, srate, ch * format);
> + if (ret < 0) {
> + dev_err(rtd->card->dev, "Failed to enable HS clk: %d\n", ret);
> + return ret;
> + }
[1]
https://github.com/thesofproject/linux/actions/runs/4005001249/jobs/6874834205
next prev parent reply other threads:[~2023-01-25 17:17 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-09 13:20 [PATCH v2 0/5] Add tdm support in acp machine driver Venkata Prasad Potturu
2023-01-09 13:21 ` [PATCH v2 1/5] ASoC: amd: acp: Add new cpu dai's in " Venkata Prasad Potturu
2023-01-09 13:21 ` [PATCH v2 2/5] ASoC: amd: acp: Refactor dai format implementation Venkata Prasad Potturu
2023-01-09 13:21 ` [PATCH v2 3/5] ASoC: amd: acp: Refactor i2s clocks programming sequence Venkata Prasad Potturu
2023-01-25 17:15 ` Pierre-Louis Bossart [this message]
2023-01-26 7:54 ` Péter Ujfalusi
2023-01-30 5:56 ` Venkata Prasad Potturu
2023-01-09 13:21 ` [PATCH v2 4/5] ASoC: amd: acp: Add i2s tdm support in machine driver Venkata Prasad Potturu
2023-01-09 13:21 ` [PATCH v2 5/5] ASoC: amd: acp: Enable i2s tdm support for skyrim platforms Venkata Prasad Potturu
2023-01-12 15:12 ` [PATCH v2 0/5] Add tdm support in acp machine driver 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=92052eef-3c61-7f3e-75c1-09b76cd38e24@linux.intel.com \
--to=pierre-louis.bossart@linux.intel.com \
--cc=AjitKumar.Pandey@amd.com \
--cc=Basavaraj.Hiregoudar@amd.com \
--cc=Sunil-kumar.Dommati@amd.com \
--cc=Vijendar.Mukunda@amd.com \
--cc=Vsujithkumar.Reddy@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=mario.limonciello@amd.com \
--cc=ssabakar@amd.com \
--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