alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* [alsa-devel] [PATCH] ASoC: wm8962: fix lambda value
@ 2019-12-11 11:57 Shengjiu Wang
  2019-12-12 16:48 ` Charles Keepax
  2019-12-16 12:05 ` [alsa-devel] Applied "ASoC: wm8962: fix lambda value" to the asoc tree Mark Brown
  0 siblings, 2 replies; 7+ messages in thread
From: Shengjiu Wang @ 2019-12-11 11:57 UTC (permalink / raw)
  To: lgirdwood, broonie, perex, tiwai, gregkh, kstewart, allison,
	guennadi.liakhovetski, tglx, shengjiu.wang, patches, alsa-devel,
	linux-kernel

According to user manual, it is required that FLL_LAMBDA > 0
in all cases (Integer and Franctional modes).

Fixes: 9a76f1ff6e29 ("ASoC: Add initial WM8962 CODEC driver")
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
---
 sound/soc/codecs/wm8962.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sound/soc/codecs/wm8962.c b/sound/soc/codecs/wm8962.c
index 3e5c69fbc33a..d9d59f45833f 100644
--- a/sound/soc/codecs/wm8962.c
+++ b/sound/soc/codecs/wm8962.c
@@ -2788,7 +2788,7 @@ static int fll_factors(struct _fll_div *fll_div, unsigned int Fref,
 
 	if (target % Fref == 0) {
 		fll_div->theta = 0;
-		fll_div->lambda = 0;
+		fll_div->lambda = 1;
 	} else {
 		gcd_fll = gcd(target, fratio * Fref);
 
@@ -2858,7 +2858,7 @@ static int wm8962_set_fll(struct snd_soc_component *component, int fll_id, int s
 		return -EINVAL;
 	}
 
-	if (fll_div.theta || fll_div.lambda)
+	if (fll_div.theta)
 		fll1 |= WM8962_FLL_FRAC;
 
 	/* Stop the FLL while we reconfigure */
-- 
2.21.0

_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [alsa-devel] [PATCH] ASoC: wm8962: fix lambda value
  2019-12-11 11:57 [alsa-devel] [PATCH] ASoC: wm8962: fix lambda value Shengjiu Wang
@ 2019-12-12 16:48 ` Charles Keepax
  2019-12-12 16:53   ` Mark Brown
  2019-12-16 12:05 ` [alsa-devel] Applied "ASoC: wm8962: fix lambda value" to the asoc tree Mark Brown
  1 sibling, 1 reply; 7+ messages in thread
From: Charles Keepax @ 2019-12-12 16:48 UTC (permalink / raw)
  To: Shengjiu Wang
  Cc: kstewart, guennadi.liakhovetski, alsa-devel, linux-kernel,
	gregkh, tiwai, lgirdwood, broonie, patches, tglx, allison

On Wed, Dec 11, 2019 at 07:57:22PM +0800, Shengjiu Wang wrote:
> According to user manual, it is required that FLL_LAMBDA > 0
> in all cases (Integer and Franctional modes).
> 
> Fixes: 9a76f1ff6e29 ("ASoC: Add initial WM8962 CODEC driver")
> Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
> ---
>  sound/soc/codecs/wm8962.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/sound/soc/codecs/wm8962.c b/sound/soc/codecs/wm8962.c
> index 3e5c69fbc33a..d9d59f45833f 100644
> --- a/sound/soc/codecs/wm8962.c
> +++ b/sound/soc/codecs/wm8962.c
> @@ -2788,7 +2788,7 @@ static int fll_factors(struct _fll_div *fll_div, unsigned int Fref,
>  
>  	if (target % Fref == 0) {
>  		fll_div->theta = 0;
> -		fll_div->lambda = 0;
> +		fll_div->lambda = 1;
>  	} else {
>  		gcd_fll = gcd(target, fratio * Fref);
>  
> @@ -2858,7 +2858,7 @@ static int wm8962_set_fll(struct snd_soc_component *component, int fll_id, int s
>  		return -EINVAL;
>  	}
>  
> -	if (fll_div.theta || fll_div.lambda)
> +	if (fll_div.theta)
>  		fll1 |= WM8962_FLL_FRAC;

How well tested is this change, and is it addressing an issue you
have observed? I agree this does better fit the datasheet just a
little nervous as its an older part that has seen a lot of usage.

Thanks,
Charles
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [alsa-devel] [PATCH] ASoC: wm8962: fix lambda value
  2019-12-12 16:48 ` Charles Keepax
@ 2019-12-12 16:53   ` Mark Brown
  2019-12-13  3:09     ` Shengjiu Wang
  0 siblings, 1 reply; 7+ messages in thread
From: Mark Brown @ 2019-12-12 16:53 UTC (permalink / raw)
  To: Charles Keepax
  Cc: kstewart, guennadi.liakhovetski, alsa-devel, linux-kernel,
	gregkh, Shengjiu Wang, tiwai, lgirdwood, patches, tglx, allison


[-- Attachment #1.1: Type: text/plain, Size: 543 bytes --]

On Thu, Dec 12, 2019 at 04:48:35PM +0000, Charles Keepax wrote:
> On Wed, Dec 11, 2019 at 07:57:22PM +0800, Shengjiu Wang wrote:
> > According to user manual, it is required that FLL_LAMBDA > 0
> > in all cases (Integer and Franctional modes).

> How well tested is this change, and is it addressing an issue you
> have observed? I agree this does better fit the datasheet just a
> little nervous as its an older part that has seen a lot of usage.

I've got a feeling that requirement might've been added in later
versions of the datasheet...

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

[-- Attachment #2: Type: text/plain, Size: 161 bytes --]

_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [alsa-devel] [PATCH] ASoC: wm8962: fix lambda value
  2019-12-12 16:53   ` Mark Brown
@ 2019-12-13  3:09     ` Shengjiu Wang
  2019-12-13 10:56       ` Charles Keepax
  2019-12-13 12:05       ` Fabio Estevam
  0 siblings, 2 replies; 7+ messages in thread
From: Shengjiu Wang @ 2019-12-13  3:09 UTC (permalink / raw)
  To: Mark Brown
  Cc: kstewart, guennadi.liakhovetski, Linux-ALSA, Charles Keepax,
	Liam Girdwood, gregkh, Shengjiu Wang, linux-kernel, Takashi Iwai,
	patches, tglx, allison

Hi

On Fri, Dec 13, 2019 at 12:54 AM Mark Brown <broonie@kernel.org> wrote:
>
> On Thu, Dec 12, 2019 at 04:48:35PM +0000, Charles Keepax wrote:
> > On Wed, Dec 11, 2019 at 07:57:22PM +0800, Shengjiu Wang wrote:
> > > According to user manual, it is required that FLL_LAMBDA > 0
> > > in all cases (Integer and Franctional modes).
>
> > How well tested is this change, and is it addressing an issue you
> > have observed? I agree this does better fit the datasheet just a
> > little nervous as its an older part that has seen a lot of usage.
>
> I've got a feeling that requirement might've been added in later
> versions of the datasheet...

We encounter an issue that when Integer mode, the lambda=theta=0,
the output sound is slower than expected. After change lambda=1
the issue is gone.

Best regards
Wang Shengjiu
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [alsa-devel] [PATCH] ASoC: wm8962: fix lambda value
  2019-12-13  3:09     ` Shengjiu Wang
@ 2019-12-13 10:56       ` Charles Keepax
  2019-12-13 12:05       ` Fabio Estevam
  1 sibling, 0 replies; 7+ messages in thread
From: Charles Keepax @ 2019-12-13 10:56 UTC (permalink / raw)
  To: Shengjiu Wang
  Cc: kstewart, guennadi.liakhovetski, Linux-ALSA, Liam Girdwood,
	gregkh, Shengjiu Wang, linux-kernel, Takashi Iwai, Mark Brown,
	patches, tglx, allison

On Fri, Dec 13, 2019 at 11:09:09AM +0800, Shengjiu Wang wrote:
> Hi
> 
> On Fri, Dec 13, 2019 at 12:54 AM Mark Brown <broonie@kernel.org> wrote:
> >
> > On Thu, Dec 12, 2019 at 04:48:35PM +0000, Charles Keepax wrote:
> > > On Wed, Dec 11, 2019 at 07:57:22PM +0800, Shengjiu Wang wrote:
> > > > According to user manual, it is required that FLL_LAMBDA > 0
> > > > in all cases (Integer and Franctional modes).
> >
> > > How well tested is this change, and is it addressing an issue you
> > > have observed? I agree this does better fit the datasheet just a
> > > little nervous as its an older part that has seen a lot of usage.
> >
> > I've got a feeling that requirement might've been added in later
> > versions of the datasheet...
> 
> We encounter an issue that when Integer mode, the lambda=theta=0,
> the output sound is slower than expected. After change lambda=1
> the issue is gone.
> 

Cool alright if there is a real issue here, then we should be
getting it fixed.

Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>

Thanks,
Charles
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [alsa-devel] [PATCH] ASoC: wm8962: fix lambda value
  2019-12-13  3:09     ` Shengjiu Wang
  2019-12-13 10:56       ` Charles Keepax
@ 2019-12-13 12:05       ` Fabio Estevam
  1 sibling, 0 replies; 7+ messages in thread
From: Fabio Estevam @ 2019-12-13 12:05 UTC (permalink / raw)
  To: Shengjiu Wang
  Cc: Kate Stewart, guennadi.liakhovetski, Linux-ALSA, Charles Keepax,
	Greg Kroah-Hartman, Shengjiu Wang, Takashi Iwai, Liam Girdwood,
	linux-kernel, Mark Brown, patches, Thomas Gleixner, allison

Hi Shengjiu,

On Fri, Dec 13, 2019 at 12:10 AM Shengjiu Wang <shengjiu.wang@gmail.com> wrote:

> We encounter an issue that when Integer mode, the lambda=theta=0,
> the output sound is slower than expected. After change lambda=1
> the issue is gone.

This is important information and it would be nice to have it included
in the commit log.

Thanks
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [alsa-devel] Applied "ASoC: wm8962: fix lambda value" to the asoc tree
  2019-12-11 11:57 [alsa-devel] [PATCH] ASoC: wm8962: fix lambda value Shengjiu Wang
  2019-12-12 16:48 ` Charles Keepax
@ 2019-12-16 12:05 ` Mark Brown
  1 sibling, 0 replies; 7+ messages in thread
From: Mark Brown @ 2019-12-16 12:05 UTC (permalink / raw)
  To: Shengjiu Wang
  Cc: kstewart, guennadi.liakhovetski, alsa-devel, Charles Keepax,
	gregkh, shengjiu.wang, tiwai, lgirdwood, linux-kernel,
	Mark Brown, patches, tglx, allison

The patch

   ASoC: wm8962: fix lambda value

has been applied to the asoc tree at

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-5.5

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 556672d75ff486e0b6786056da624131679e0576 Mon Sep 17 00:00:00 2001
From: Shengjiu Wang <shengjiu.wang@nxp.com>
Date: Wed, 11 Dec 2019 19:57:22 +0800
Subject: [PATCH] ASoC: wm8962: fix lambda value

According to user manual, it is required that FLL_LAMBDA > 0
in all cases (Integer and Franctional modes).

Fixes: 9a76f1ff6e29 ("ASoC: Add initial WM8962 CODEC driver")
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/1576065442-19763-1-git-send-email-shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 sound/soc/codecs/wm8962.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sound/soc/codecs/wm8962.c b/sound/soc/codecs/wm8962.c
index 3e5c69fbc33a..d9d59f45833f 100644
--- a/sound/soc/codecs/wm8962.c
+++ b/sound/soc/codecs/wm8962.c
@@ -2788,7 +2788,7 @@ static int fll_factors(struct _fll_div *fll_div, unsigned int Fref,
 
 	if (target % Fref == 0) {
 		fll_div->theta = 0;
-		fll_div->lambda = 0;
+		fll_div->lambda = 1;
 	} else {
 		gcd_fll = gcd(target, fratio * Fref);
 
@@ -2858,7 +2858,7 @@ static int wm8962_set_fll(struct snd_soc_component *component, int fll_id, int s
 		return -EINVAL;
 	}
 
-	if (fll_div.theta || fll_div.lambda)
+	if (fll_div.theta)
 		fll1 |= WM8962_FLL_FRAC;
 
 	/* Stop the FLL while we reconfigure */
-- 
2.20.1

_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2019-12-16 12:16 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-11 11:57 [alsa-devel] [PATCH] ASoC: wm8962: fix lambda value Shengjiu Wang
2019-12-12 16:48 ` Charles Keepax
2019-12-12 16:53   ` Mark Brown
2019-12-13  3:09     ` Shengjiu Wang
2019-12-13 10:56       ` Charles Keepax
2019-12-13 12:05       ` Fabio Estevam
2019-12-16 12:05 ` [alsa-devel] Applied "ASoC: wm8962: fix lambda value" to the asoc tree Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).