Minor bug fixes for some older Wolfson devices
Subsystems (3)
cover Minor bug fixes for some older Wolfson devices
Minor bug fixes for a couple of older devices reported by some users. Mostly this centers around the automatic PLL configuration getting the wrong values due to rounding.
Thanks,
Charles
Charles Keepax (3):
ASoC: wm8940: Correct PLL rate rounding
ASoC: wm8940: Correct typo in control name
ASoC: wm8974: Correct PLL rate rounding
sound/soc/codecs/wm8940.c | 9 +++++++-- sound/soc/codecs/wm8974.c | 8 ++++++-- 2 files changed, 13 insertions(+), 4 deletions(-)
Signature · 1 line
2.47.2
PATCH 1/3 ASoC: wm8940: Correct PLL rate rounding
Using a single value of 22500000 for both 48000Hz and 44100Hz audio will sometimes result in returning wrong dividers due to rounding. Update the code to use the actual value for both.
--- sound/soc/codecs/wm8940.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
sound/soc/codecs/wm8940.c +6 -1
@@ -693,7 +693,12 @@ static int wm8940_update_clocks(struct snd_soc_dai *dai) f =wm8940_get_mclkdiv (priv->mclk, fs256, &mclkdiv);if (f != priv->mclk) {/* The PLL performs best around 90MHz */ - fpll =wm8940_get_mclkdiv (22500000 , fs256, &mclkdiv); +if (fs256 %8000 ) + f =22579200 ; +else + f =24576000 ; + + fpll =wm8940_get_mclkdiv (f, fs256, &mclkdiv); }wm8940_set_dai_pll (dai,0 ,0 , priv->mclk, fpll);
Signature · 1 line
2.47.2
PATCH 2/3 ASoC: wm8940: Correct typo in control name
In reply to Charles Keepax--- sound/soc/codecs/wm8940.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/codecs/wm8940.c +1 -1
@@ -220,7 +220,7 @@ static const struct snd_kcontrol_new wm8940_snd_controls[] = {SOC_SINGLE_TLV ("Digital Capture Volume" ,WM8940_ADCVOL ,0 ,255 ,0 , wm8940_adc_tlv),SOC_ENUM ("Mic Bias Level" , wm8940_mic_bias_level_enum), -SOC_SINGLE_TLV ("Capture Boost Volue" ,WM8940_ADCBOOST , +SOC_SINGLE_TLV ("Capture Boost Volume" ,WM8940_ADCBOOST ,8 ,1 ,0 , wm8940_capture_boost_vol_tlv),SOC_SINGLE_TLV ("Speaker Playback Volume" ,WM8940_SPKVOL , 0, 63, 0, wm8940_spk_vol_tlv),
Signature · 1 line
2.47.2
PATCH 3/3 ASoC: wm8974: Correct PLL rate rounding
In reply to Charles KeepaxUsing a single value of 22500000 for both 48000Hz and 44100Hz audio will sometimes result in returning wrong dividers due to rounding. Update the code to use the actual value for both.
--- sound/soc/codecs/wm8974.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
sound/soc/codecs/wm8974.c +6 -2
@@ -419,10 +419,14 @@ static int wm8974_update_clocks(struct snd_soc_dai *dai) fs256 =256 * priv->fs; f =wm8974_get_mclkdiv (priv->mclk, fs256, &mclkdiv); -if (f != priv->mclk) {/* The PLL performs best around 90MHz */ - fpll =wm8974_get_mclkdiv (22500000 , fs256, &mclkdiv); +if (fs256 %8000 ) + f =22579200 ; +else + f =24576000 ; + + fpll =wm8974_get_mclkdiv (f, fs256, &mclkdiv); }wm8974_set_dai_pll (dai,0 ,0 , priv->mclk, fpll);
Signature · 1 line
2.47.2