* [PATCH] ASoC: arizona: Add 32uS delay after putting FLL into freerun
@ 2015-11-26 14:03 Charles Keepax
2015-11-27 12:26 ` Mark Brown
0 siblings, 1 reply; 5+ messages in thread
From: Charles Keepax @ 2015-11-26 14:03 UTC (permalink / raw)
To: broonie; +Cc: alsa-devel, patches, lgirdwood
When switching between two clock sources using the FLL freerun to smooth
the transition we should wait 32uS after putting the FLL into freerun
before we proceed. In practice we appear to be getting enough delay from
the surrounding code, but better to make it explicit.
Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
---
sound/soc/codecs/arizona.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/sound/soc/codecs/arizona.c b/sound/soc/codecs/arizona.c
index e76ecc7..8cd448c 100644
--- a/sound/soc/codecs/arizona.c
+++ b/sound/soc/codecs/arizona.c
@@ -2215,6 +2215,7 @@ static int arizona_enable_fll(struct arizona_fll *fll)
regmap_update_bits_async(fll->arizona->regmap, fll->base + 1,
ARIZONA_FLL1_FREERUN,
ARIZONA_FLL1_FREERUN);
+ udelay(32);
}
/*
--
1.7.2.5
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] ASoC: arizona: Add 32uS delay after putting FLL into freerun
2015-11-26 14:03 [PATCH] ASoC: arizona: Add 32uS delay after putting FLL into freerun Charles Keepax
@ 2015-11-27 12:26 ` Mark Brown
2015-11-27 13:05 ` Charles Keepax
0 siblings, 1 reply; 5+ messages in thread
From: Mark Brown @ 2015-11-27 12:26 UTC (permalink / raw)
To: Charles Keepax; +Cc: alsa-devel, patches, lgirdwood
[-- Attachment #1.1: Type: text/plain, Size: 967 bytes --]
On Thu, Nov 26, 2015 at 02:03:20PM +0000, Charles Keepax wrote:
> When switching between two clock sources using the FLL freerun to smooth
> the transition we should wait 32uS after putting the FLL into freerun
> before we proceed. In practice we appear to be getting enough delay from
> the surrounding code, but better to make it explicit.
You'll almost certainly get 32us from just setting up the I/O and
also...
> +++ b/sound/soc/codecs/arizona.c
> @@ -2215,6 +2215,7 @@ static int arizona_enable_fll(struct arizona_fll *fll)
> regmap_update_bits_async(fll->arizona->regmap, fll->base + 1,
> ARIZONA_FLL1_FREERUN,
> ARIZONA_FLL1_FREERUN);
> + udelay(32);
...this won't do what you say it will - the I/O is asynchronous so what
this will do is add a delay immediately after scheduling the I/O while
the I/O is at best in progress and most likely before it is ever begun.
You'd need to make the I/O synchronous to actually introduce the delay.
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 473 bytes --]
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] ASoC: arizona: Add 32uS delay after putting FLL into freerun
2015-11-27 12:26 ` Mark Brown
@ 2015-11-27 13:05 ` Charles Keepax
0 siblings, 0 replies; 5+ messages in thread
From: Charles Keepax @ 2015-11-27 13:05 UTC (permalink / raw)
To: Mark Brown; +Cc: alsa-devel, patches, lgirdwood
On Fri, Nov 27, 2015 at 12:26:27PM +0000, Mark Brown wrote:
> On Thu, Nov 26, 2015 at 02:03:20PM +0000, Charles Keepax wrote:
> > When switching between two clock sources using the FLL freerun to smooth
> > the transition we should wait 32uS after putting the FLL into freerun
> > before we proceed. In practice we appear to be getting enough delay from
> > the surrounding code, but better to make it explicit.
>
> You'll almost certainly get 32us from just setting up the I/O and
> also...
>
> > +++ b/sound/soc/codecs/arizona.c
> > @@ -2215,6 +2215,7 @@ static int arizona_enable_fll(struct arizona_fll *fll)
> > regmap_update_bits_async(fll->arizona->regmap, fll->base + 1,
> > ARIZONA_FLL1_FREERUN,
> > ARIZONA_FLL1_FREERUN);
> > + udelay(32);
>
> ...this won't do what you say it will - the I/O is asynchronous so what
> this will do is add a delay immediately after scheduling the I/O while
> the I/O is at best in progress and most likely before it is ever begun.
> You'd need to make the I/O synchronous to actually introduce the delay.
Oops.. missed that, apologies I will respin.
Thanks,
Charles
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] ASoC: arizona: Add 32uS delay after putting FLL into freerun
@ 2015-11-30 17:37 Charles Keepax
2015-12-01 22:59 ` Applied "ASoC: arizona: Add 32uS delay after putting FLL into freerun" to the asoc tree Mark Brown
0 siblings, 1 reply; 5+ messages in thread
From: Charles Keepax @ 2015-11-30 17:37 UTC (permalink / raw)
To: broonie; +Cc: alsa-devel, patches, lgirdwood
When switching between two clock sources using the FLL freerun to smooth
the transition we should wait 32uS after putting the FLL into freerun
before we proceed. In practice we appear to be getting enough delay from
the surrounding code, but better to make it explicit.
Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
---
sound/soc/codecs/arizona.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/sound/soc/codecs/arizona.c b/sound/soc/codecs/arizona.c
index e76ecc7..a23f7d1 100644
--- a/sound/soc/codecs/arizona.c
+++ b/sound/soc/codecs/arizona.c
@@ -2212,9 +2212,9 @@ static int arizona_enable_fll(struct arizona_fll *fll)
/* Facilitate smooth refclk across the transition */
regmap_update_bits_async(fll->arizona->regmap, fll->base + 0x9,
ARIZONA_FLL1_GAIN_MASK, 0);
- regmap_update_bits_async(fll->arizona->regmap, fll->base + 1,
- ARIZONA_FLL1_FREERUN,
- ARIZONA_FLL1_FREERUN);
+ regmap_update_bits(fll->arizona->regmap, fll->base + 1,
+ ARIZONA_FLL1_FREERUN, ARIZONA_FLL1_FREERUN);
+ udelay(32);
}
/*
--
2.1.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Applied "ASoC: arizona: Add 32uS delay after putting FLL into freerun" to the asoc tree
2015-11-30 17:37 [PATCH] ASoC: arizona: Add 32uS delay after putting FLL into freerun Charles Keepax
@ 2015-12-01 22:59 ` Mark Brown
0 siblings, 0 replies; 5+ messages in thread
From: Mark Brown @ 2015-12-01 22:59 UTC (permalink / raw)
To: Charles Keepax, Mark Brown; +Cc: alsa-devel
The patch
ASoC: arizona: Add 32uS delay after putting FLL into freerun
has been applied to the asoc tree at
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
All 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
>From 800f297e8ef91901b93c280425863684dff2d9c6 Mon Sep 17 00:00:00 2001
From: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Date: Mon, 30 Nov 2015 17:37:28 +0000
Subject: [PATCH] ASoC: arizona: Add 32uS delay after putting FLL into freerun
When switching between two clock sources using the FLL freerun to smooth
the transition we should wait 32uS after putting the FLL into freerun
before we proceed. In practice we appear to be getting enough delay from
the surrounding code, but better to make it explicit.
Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
sound/soc/codecs/arizona.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/sound/soc/codecs/arizona.c b/sound/soc/codecs/arizona.c
index e76ecc7cc775..a23f7d15324a 100644
--- a/sound/soc/codecs/arizona.c
+++ b/sound/soc/codecs/arizona.c
@@ -2212,9 +2212,9 @@ static int arizona_enable_fll(struct arizona_fll *fll)
/* Facilitate smooth refclk across the transition */
regmap_update_bits_async(fll->arizona->regmap, fll->base + 0x9,
ARIZONA_FLL1_GAIN_MASK, 0);
- regmap_update_bits_async(fll->arizona->regmap, fll->base + 1,
- ARIZONA_FLL1_FREERUN,
- ARIZONA_FLL1_FREERUN);
+ regmap_update_bits(fll->arizona->regmap, fll->base + 1,
+ ARIZONA_FLL1_FREERUN, ARIZONA_FLL1_FREERUN);
+ udelay(32);
}
/*
--
2.6.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-12-01 22:59 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-30 17:37 [PATCH] ASoC: arizona: Add 32uS delay after putting FLL into freerun Charles Keepax
2015-12-01 22:59 ` Applied "ASoC: arizona: Add 32uS delay after putting FLL into freerun" to the asoc tree Mark Brown
-- strict thread matches above, loose matches on Subject: below --
2015-11-26 14:03 [PATCH] ASoC: arizona: Add 32uS delay after putting FLL into freerun Charles Keepax
2015-11-27 12:26 ` Mark Brown
2015-11-27 13:05 ` Charles Keepax
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox