ASoC: cs42l42: Add bitclock frequency argument to cs42l42_pll_config()
authorRichard Fitzgerald <rf@opensource.cirrus.com>
Thu, 15 Sep 2022 09:44:35 +0000 (11:44 +0200)
committerMark Brown <broonie@kernel.org>
Mon, 19 Sep 2022 17:05:28 +0000 (18:05 +0100)
commit7e178946c3e4e64cebda4e60d0b7e5c02a502d13
treed318570c67e9ffcc7d2d69db8bc13ecc04d3f0ba
parent23162672ff85c24afc19293309500d3a63134ef8
ASoC: cs42l42: Add bitclock frequency argument to cs42l42_pll_config()

Clean up the handling of bitclock frequency by keeping all the logic
in cs42l42_pcm_hw_params(), which then simply passes the frequency as
an argument to cs42l42_pll_config().

The previous code had become clunky as a legacy of earlier versions of
the clock handling. The logic was split across cs42l42_pcm_hw_params()
and cs42l42_pll_config(), with the params-derived bclk stashed in
struct cs42l42_private only to pass it to cs42l42_pll_config().

Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Signed-off-by: Martin PoviĊĦer <povik+lin@cutebit.org>
Link: https://lore.kernel.org/r/20220915094444.11434-3-povik+lin@cutebit.org
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/cs42l42.c
sound/soc/codecs/cs42l42.h