From: Iuliana Prodan <iuliana.prodan@nxp.com>
To: Shengjiu Wang <shengjiu.wang@nxp.com>,
nicoleotsuka@gmail.com, Xiubo.Lee@gmail.com, festevam@gmail.com,
shengjiu.wang@gmail.com, lgirdwood@gmail.com, broonie@kernel.org,
perex@perex.cz, tiwai@suse.com, alsa-devel@alsa-project.org
Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ASoC: fsl_xcvr: refine the requested phy clock frequency
Date: Thu, 23 Nov 2023 11:06:27 +0200 [thread overview]
Message-ID: <da13e561-0b3b-401b-966f-9a54e2e9c36b@nxp.com> (raw)
In-Reply-To: <1700702093-8008-1-git-send-email-shengjiu.wang@nxp.com>
On 11/23/2023 3:14 AM, Shengjiu Wang wrote:
> As the input phy clock frequency will divided by 2 by default
> on i.MX8MP with the implementation of clk-imx8mp-audiomix driver,
> So the requested frequency need to be updated.
>
> The relation of phy clock is:
> sai_pll_ref_sel
> sai_pll
> sai_pll_bypass
> sai_pll_out
> sai_pll_out_div2
> earc_phy_cg
>
> Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Iuliana Prodan <iuliana.prodan@nxp.com>
Thanks,
Iulia
> ---
> sound/soc/fsl/fsl_xcvr.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/sound/soc/fsl/fsl_xcvr.c b/sound/soc/fsl/fsl_xcvr.c
> index 77f8e2394bf9..f0fb33d719c2 100644
> --- a/sound/soc/fsl/fsl_xcvr.c
> +++ b/sound/soc/fsl/fsl_xcvr.c
> @@ -358,7 +358,7 @@ static int fsl_xcvr_en_aud_pll(struct fsl_xcvr *xcvr, u32 freq)
> struct device *dev = &xcvr->pdev->dev;
> int ret;
>
> - freq = xcvr->soc_data->spdif_only ? freq / 10 : freq;
> + freq = xcvr->soc_data->spdif_only ? freq / 5 : freq;
> clk_disable_unprepare(xcvr->phy_clk);
> ret = clk_set_rate(xcvr->phy_clk, freq);
> if (ret < 0) {
> @@ -409,7 +409,7 @@ static int fsl_xcvr_prepare(struct snd_pcm_substream *substream,
> bool tx = substream->stream == SNDRV_PCM_STREAM_PLAYBACK;
> u32 m_ctl = 0, v_ctl = 0;
> u32 r = substream->runtime->rate, ch = substream->runtime->channels;
> - u32 fout = 32 * r * ch * 10 * 2;
> + u32 fout = 32 * r * ch * 10;
> int ret = 0;
>
> switch (xcvr->mode) {
next prev parent reply other threads:[~2023-11-23 9:07 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-23 1:14 [PATCH] ASoC: fsl_xcvr: refine the requested phy clock frequency Shengjiu Wang
2023-11-23 9:06 ` Iuliana Prodan [this message]
2023-11-23 17:00 ` 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=da13e561-0b3b-401b-966f-9a54e2e9c36b@nxp.com \
--to=iuliana.prodan@nxp.com \
--cc=Xiubo.Lee@gmail.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=festevam@gmail.com \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=nicoleotsuka@gmail.com \
--cc=perex@perex.cz \
--cc=shengjiu.wang@gmail.com \
--cc=shengjiu.wang@nxp.com \
--cc=tiwai@suse.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;
as well as URLs for NNTP newsgroup(s).