Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1475281
| From | Charles Keepax <ckeepax@opensource.wolfsonmicro.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 1/6] ASoC: arizona: Correct handling of FLL theta in synchroniser mode |
| Date | 2016-09-02 18:00 +0200 |
| Message-ID | <scZ2P-1kr-31@gated-at.bofh.it> (permalink) |
| References | <scZ2O-1kr-19@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Theta/lambda is used to give the fractional portion of the FLL
frequency multiplication. When the synchroniser is active the
reference path lambda value is hard coded in the hardware to
65536. This patch corrects the handling of theta such that it
is scaled to match this denominator, when the synchroniser is
active.
Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
---
sound/soc/codecs/arizona.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/sound/soc/codecs/arizona.c b/sound/soc/codecs/arizona.c
index ccb3ca2..ded235f 100644
--- a/sound/soc/codecs/arizona.c
+++ b/sound/soc/codecs/arizona.c
@@ -1920,8 +1920,8 @@ static struct {
struct arizona_fll_cfg {
int n;
- int theta;
- int lambda;
+ unsigned int theta;
+ unsigned int lambda;
int refdiv;
int outdiv;
int fratio;
@@ -2233,6 +2233,10 @@ static int arizona_enable_fll(struct arizona_fll *fll)
fll->ref_src != fll->sync_src) {
arizona_calc_fll(fll, &cfg, fll->ref_freq, false);
+ /* Ref path hardcodes lambda to 65536 when sync is on */
+ if (fll->sync_src >= 0 && cfg.lambda)
+ cfg.theta = (cfg.theta * (1 << 16)) / cfg.lambda;
+
arizona_apply_fll(arizona, fll->base, &cfg, fll->ref_src,
false);
if (fll->sync_src >= 0) {
--
2.1.4
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 0/6] Arizona FLL fixes and Clocking Improvements Charles Keepax <ckeepax@opensource.wolfsonmicro.com> - 2016-09-02 18:00 +0200
[PATCH 4/6] mfd: arizona: Add gating of external MCLKn clocks Charles Keepax <ckeepax@opensource.wolfsonmicro.com> - 2016-09-02 18:00 +0200
[PATCH 1/6] ASoC: arizona: Correct handling of FLL theta in synchroniser mode Charles Keepax <ckeepax@opensource.wolfsonmicro.com> - 2016-09-02 18:00 +0200
Applied "ASoC: arizona: Correct handling of FLL theta in synchroniser mode" to the asoc tree Mark Brown <broonie@kernel.org> - 2016-09-03 13:10 +0200
[PATCH 6/6] ASoC: arizona: Add gating for source clocks of the FLLs Charles Keepax <ckeepax@opensource.wolfsonmicro.com> - 2016-09-02 18:00 +0200
Re: [PATCH 6/6] ASoC: arizona: Add gating for source clocks of the FLLs Sylwester Nawrocki <s.nawrocki@samsung.com> - 2016-09-05 10:20 +0200
[PATCH 3/6] ASoC: arizona: Avoid changing SYNC_ENA whilst the FLL_ENA is set Charles Keepax <ckeepax@opensource.wolfsonmicro.com> - 2016-09-02 18:00 +0200
[PATCH 5/6] ASoC: arizona: Add gating for clock when used for direct MCLK Charles Keepax <ckeepax@opensource.wolfsonmicro.com> - 2016-09-02 18:00 +0200
Re: [PATCH 5/6] ASoC: arizona: Add gating for clock when used for direct MCLK Sylwester Nawrocki <s.nawrocki@samsung.com> - 2016-09-05 10:20 +0200
[PATCH 2/6] ASoC: arizona: Allow specification of base for arizona_is_enabled_fll Charles Keepax <ckeepax@opensource.wolfsonmicro.com> - 2016-09-02 18:00 +0200
csiph-web