From: Charles Keepax <ckeepax@opensource.cirrus.com>
To: Ahmad Fatoum <a.fatoum@pengutronix.de>
Cc: David Rhodes <david.rhodes@cirrus.com>,
Richard Fitzgerald <rf@opensource.cirrus.com>,
Liam Girdwood <lgirdwood@gmail.com>,
Mark Brown <broonie@kernel.org>, Jaroslav Kysela <perex@perex.cz>,
Takashi Iwai <tiwai@suse.com>,
Paul Handrigan <paulha@opensource.cirrus.com>,
linux-sound@vger.kernel.org, patches@opensource.cirrus.com,
linux-kernel@vger.kernel.org, kernel@pengutronix.de,
Vitaly Rodionov <vitalyr@opensource.cirrus.com>
Subject: Re: [PATCH] ASoC: cs530x: Fix expected MCLK rates for CS5302/4/8
Date: Sat, 20 Jun 2026 11:27:34 +0100 [thread overview]
Message-ID: <ajZrCNMpPoln5Rzd@opensource.cirrus.com> (raw)
In-Reply-To: <20260617-cs530x-mclk-v1-1-0215b5f1a0a4@pengutronix.de>
On Wed, Jun 17, 2026 at 04:47:53PM +0200, Ahmad Fatoum wrote:
> When this driver was first added, it accepted rates of 24.56 MHz and
> 22.572 MHz for the MCLK when PLL bypass is enabled.
>
> These rates seem to have no basis in the datasheets and were thus replaced
> with 45.1584 MHz and 49.152 MHz, respectively, in commit e7ab858390f2
> ("ASoC: cs530x: Correct MCLK reference frequency values").
>
> While the new rates are indeed correct for the CS4xxx ICs[0][1][2][3],
> they are incorrect for the CS530x ICs the driver was originally written to
> support as the MCLK frequencies are halved there[4][5][6].
>
> Fix this by checking against the correct type-appropriate rates.
>
> While at it, drop the CS530X_SYSCLK_REF_* macros. They arguably confuse
> more than they help, especially as they are not applicable to the
> cs5302/4/8.
>
> [0]: https://statics.cirrus.com/pubs/proDatasheet/CS4282P_DS1318F1.pdf
> [1]: https://statics.cirrus.com/pubs/proDatasheet/CS4302P_DS1315F1.pdf
> [2]: https://statics.cirrus.com/pubs/proDatasheet/CS4304P_DS1316F1.pdf
> [3]: https://statics.cirrus.com/pubs/proDatasheet/CS4308P_DS1317F1.pdf
> [4]: https://statics.cirrus.com/pubs/proDatasheet/CS5302P_DS1312F1.pdf
> [5]: https://statics.cirrus.com/pubs/proDatasheet/CS5304P_DS1313F1.pdf
> [6]: https://statics.cirrus.com/pubs/proDatasheet/CS5308P_DS1314F1.pdf
>
> Fixes: 2884c29152c0 ("ASoC: cs530x: Support for cs530x ADCs")
> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
> ---
Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Thanks,
Charles
next prev parent reply other threads:[~2026-06-20 10:28 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-17 14:47 Ahmad Fatoum
2026-06-20 10:27 ` Charles Keepax [this message]
2026-06-22 17:29 ` 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=ajZrCNMpPoln5Rzd@opensource.cirrus.com \
--to=ckeepax@opensource.cirrus.com \
--cc=a.fatoum@pengutronix.de \
--cc=broonie@kernel.org \
--cc=david.rhodes@cirrus.com \
--cc=kernel@pengutronix.de \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=patches@opensource.cirrus.com \
--cc=paulha@opensource.cirrus.com \
--cc=perex@perex.cz \
--cc=rf@opensource.cirrus.com \
--cc=tiwai@suse.com \
--cc=vitalyr@opensource.cirrus.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
Powered by JetHome