Minor bug fixes for some older Wolfson devices
Subsystems (3)
v2 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
Changes from v1:
- Adding the original reporter I forgot to CC, apologies.
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 v2 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.
---
No change since v1.
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
Re: [PATCH v2 1/3] ASoC: wm8940: Correct PLL rate rounding
Quoted 36 lines · Charles Keepax
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.
Fixes 294833fc9eb4 ("ASoC: wm8940: Rewrite code to set proper clocks")Reported-by Ankur Tyagi <[email protected]>Signed-off-by Charles Keepax <[email protected]>---
No change since v1.
sound/soc/codecs/wm8940.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)sound/soc/codecs/wm8940.c +6
-2@@ -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); --2.47.2
PATCH v2 2/3 ASoC: wm8940: Correct typo in control name
In reply to Charles Keepax---
No change since v1.
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
Re: [PATCH v2 2/3] ASoC: wm8940: Correct typo in control name
Quoted 27 lines · Charles Keepax
Fixes 0b5e92c5e020 ("ASoC WM8940 Driver")Reported-by Ankur Tyagi <[email protected]>Signed-off-by Charles Keepax <[email protected]>---
No change since v1.
sound/soc/codecs/wm8940.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)sound/soc/codecs/wm8940.c +1
-2@@ -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), --2.47.2
PATCH v2 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.
---
No change since v1.
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
Mark Brown
maintainerQuoted 8 lines · Charles Keepax
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[...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
Thanks!
[1/3] ASoC: wm8940: Correct PLL rate rounding
commit: d05afb53c683ef7ed1228b593c3360f4d3126c58
[2/3] ASoC: wm8940: Correct typo in control name
commit: b4799520dcd6fe1e14495cecbbe9975d847cd482
[3/3] ASoC: wm8974: Correct PLL rate rounding
commit: 9b17d3724df55ecc2bc67978822585f2b023be48All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark