All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ASoC: wm8960: Fix input boost mixer left/right naming
@ 2016-01-19 13:09 stuarth
  2016-01-19 13:09 ` [PATCH] ASoC: wm8960: Fix WM8960_SYSCLK_PLL mode stuarth
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: stuarth @ 2016-01-19 13:09 UTC (permalink / raw)
  To: broonie, lgirdwood; +Cc: Stuart Henderson, alsa-devel, ckeepax, zidan.wang

From: Stuart Henderson <stuart.henderson@cirrus.com>

INBMIX1 controls LINPUTs and INBMIX2 controls RINPUTs, so fix the naming
accordingly.

Signed-off-by: Stuart Henderson <stuart.henderson@cirrus.com>
---
 sound/soc/codecs/wm8960.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/sound/soc/codecs/wm8960.c b/sound/soc/codecs/wm8960.c
index ff23772..7f20fb2 100644
--- a/sound/soc/codecs/wm8960.c
+++ b/sound/soc/codecs/wm8960.c
@@ -240,13 +240,13 @@ SOC_DOUBLE_R("Capture Volume ZC Switch", WM8960_LINVOL, WM8960_RINVOL,
 SOC_DOUBLE_R("Capture Switch", WM8960_LINVOL, WM8960_RINVOL,
 	7, 1, 1),
 
-SOC_SINGLE_TLV("Right Input Boost Mixer RINPUT3 Volume",
+SOC_SINGLE_TLV("Left Input Boost Mixer LINPUT3 Volume",
 	       WM8960_INBMIX1, 4, 7, 0, lineinboost_tlv),
-SOC_SINGLE_TLV("Right Input Boost Mixer RINPUT2 Volume",
+SOC_SINGLE_TLV("Left Input Boost Mixer LINPUT2 Volume",
 	       WM8960_INBMIX1, 1, 7, 0, lineinboost_tlv),
-SOC_SINGLE_TLV("Left Input Boost Mixer LINPUT3 Volume",
+SOC_SINGLE_TLV("Right Input Boost Mixer RINPUT3 Volume",
 	       WM8960_INBMIX2, 4, 7, 0, lineinboost_tlv),
-SOC_SINGLE_TLV("Left Input Boost Mixer LINPUT2 Volume",
+SOC_SINGLE_TLV("Right Input Boost Mixer RINPUT2 Volume",
 	       WM8960_INBMIX2, 1, 7, 0, lineinboost_tlv),
 SOC_SINGLE_TLV("Right Input Boost Mixer RINPUT1 Volume",
 		WM8960_RINPATH, 4, 3, 0, micboost_tlv),
-- 
2.1.4

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

* [PATCH] ASoC: wm8960: Fix WM8960_SYSCLK_PLL mode
  2016-01-19 13:09 [PATCH] ASoC: wm8960: Fix input boost mixer left/right naming stuarth
@ 2016-01-19 13:09 ` stuarth
  2016-01-19 13:49   ` Charles Keepax
                     ` (2 more replies)
  2016-01-19 13:47 ` [PATCH] ASoC: wm8960: Fix input boost mixer left/right naming Charles Keepax
  2016-01-22 18:26 ` Applied "ASoC: wm8960: Fix input boost mixer left/right naming" to the asoc tree Mark Brown
  2 siblings, 3 replies; 8+ messages in thread
From: stuarth @ 2016-01-19 13:09 UTC (permalink / raw)
  To: broonie, lgirdwood; +Cc: Stuart Henderson, alsa-devel, ckeepax, zidan.wang

From: Stuart Henderson <stuart.henderson@cirrus.com>

With the introduction of WM8960_SYSCLK_AUTO mode, WM8960_SYSCLK_PLL mode was
made unusable.  Ensure we're not PLL mode before trying to use MCLK.

Fixes: 3176bf2d7ccd ("ASoC: wm8960: update pll and clock setting function")
Signed-off-by: Stuart Henderson <stuart.henderson@cirrus.com>
---
 sound/soc/codecs/wm8960.c | 32 +++++++++++++++++---------------
 1 file changed, 17 insertions(+), 15 deletions(-)

diff --git a/sound/soc/codecs/wm8960.c b/sound/soc/codecs/wm8960.c
index 7f20fb2..d7f444f 100644
--- a/sound/soc/codecs/wm8960.c
+++ b/sound/soc/codecs/wm8960.c
@@ -643,29 +643,31 @@ static int wm8960_configure_clocking(struct snd_soc_codec *codec)
 		return -EINVAL;
 	}
 
-	/* check if the sysclk frequency is available. */
-	for (i = 0; i < ARRAY_SIZE(sysclk_divs); ++i) {
-		if (sysclk_divs[i] == -1)
-			continue;
-		sysclk = freq_out / sysclk_divs[i];
-		for (j = 0; j < ARRAY_SIZE(dac_divs); ++j) {
-			if (sysclk == dac_divs[j] * lrclk) {
+	if (wm8960->clk_id != WM8960_SYSCLK_PLL) {
+		/* check if the sysclk frequency is available. */
+		for (i = 0; i < ARRAY_SIZE(sysclk_divs); ++i) {
+			if (sysclk_divs[i] == -1)
+				continue;
+			sysclk = freq_out / sysclk_divs[i];
+			for (j = 0; j < ARRAY_SIZE(dac_divs); ++j) {
+				if (sysclk != dac_divs[j] * lrclk)
+					continue;
 				for (k = 0; k < ARRAY_SIZE(bclk_divs); ++k)
 					if (sysclk == bclk * bclk_divs[k] / 10)
 						break;
 				if (k != ARRAY_SIZE(bclk_divs))
 					break;
 			}
+			if (j != ARRAY_SIZE(dac_divs))
+				break;
 		}
-		if (j != ARRAY_SIZE(dac_divs))
-			break;
-	}
 
-	if (i != ARRAY_SIZE(sysclk_divs)) {
-		goto configure_clock;
-	} else if (wm8960->clk_id != WM8960_SYSCLK_AUTO) {
-		dev_err(codec->dev, "failed to configure clock\n");
-		return -EINVAL;
+		if (i != ARRAY_SIZE(sysclk_divs)) {
+			goto configure_clock;
+		} else if (wm8960->clk_id != WM8960_SYSCLK_AUTO) {
+			dev_err(codec->dev, "failed to configure clock\n");
+			return -EINVAL;
+		}
 	}
 	/* get a available pll out frequency and set pll */
 	for (i = 0; i < ARRAY_SIZE(sysclk_divs); ++i) {
-- 
2.1.4

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

* Re: [PATCH] ASoC: wm8960: Fix input boost mixer left/right naming
  2016-01-19 13:09 [PATCH] ASoC: wm8960: Fix input boost mixer left/right naming stuarth
  2016-01-19 13:09 ` [PATCH] ASoC: wm8960: Fix WM8960_SYSCLK_PLL mode stuarth
@ 2016-01-19 13:47 ` Charles Keepax
  2016-01-22 18:26 ` Applied "ASoC: wm8960: Fix input boost mixer left/right naming" to the asoc tree Mark Brown
  2 siblings, 0 replies; 8+ messages in thread
From: Charles Keepax @ 2016-01-19 13:47 UTC (permalink / raw)
  To: stuarth; +Cc: Stuart Henderson, alsa-devel, broonie, lgirdwood, zidan.wang

On Tue, Jan 19, 2016 at 01:09:08PM +0000, stuarth@opensource.wolfsonmicro.com wrote:
> From: Stuart Henderson <stuart.henderson@cirrus.com>
> 
> INBMIX1 controls LINPUTs and INBMIX2 controls RINPUTs, so fix the naming
> accordingly.
> 
> Signed-off-by: Stuart Henderson <stuart.henderson@cirrus.com>
> ---

Reviewed-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>

Thanks,
Charles

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

* Re: [PATCH] ASoC: wm8960: Fix WM8960_SYSCLK_PLL mode
  2016-01-19 13:09 ` [PATCH] ASoC: wm8960: Fix WM8960_SYSCLK_PLL mode stuarth
@ 2016-01-19 13:49   ` Charles Keepax
  2016-01-19 17:07   ` Mark Brown
  2016-01-22 18:26   ` Applied "ASoC: wm8960: Fix WM8960_SYSCLK_PLL mode" to the asoc tree Mark Brown
  2 siblings, 0 replies; 8+ messages in thread
From: Charles Keepax @ 2016-01-19 13:49 UTC (permalink / raw)
  To: stuarth; +Cc: Stuart Henderson, alsa-devel, broonie, lgirdwood, zidan.wang

On Tue, Jan 19, 2016 at 01:09:09PM +0000, stuarth@opensource.wolfsonmicro.com wrote:
> From: Stuart Henderson <stuart.henderson@cirrus.com>
> 
> With the introduction of WM8960_SYSCLK_AUTO mode, WM8960_SYSCLK_PLL mode was
> made unusable.  Ensure we're not PLL mode before trying to use MCLK.
> 
> Fixes: 3176bf2d7ccd ("ASoC: wm8960: update pll and clock setting function")
> Signed-off-by: Stuart Henderson <stuart.henderson@cirrus.com>
> ---

Reviewed-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>

Thanks,
Charles

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

* Re: [PATCH] ASoC: wm8960: Fix WM8960_SYSCLK_PLL mode
  2016-01-19 13:09 ` [PATCH] ASoC: wm8960: Fix WM8960_SYSCLK_PLL mode stuarth
  2016-01-19 13:49   ` Charles Keepax
@ 2016-01-19 17:07   ` Mark Brown
  2016-01-20  9:57     ` Stuart Henderson
  2016-01-22 18:26   ` Applied "ASoC: wm8960: Fix WM8960_SYSCLK_PLL mode" to the asoc tree Mark Brown
  2 siblings, 1 reply; 8+ messages in thread
From: Mark Brown @ 2016-01-19 17:07 UTC (permalink / raw)
  To: stuarth; +Cc: Stuart Henderson, alsa-devel, ckeepax, lgirdwood, zidan.wang


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

On Tue, Jan 19, 2016 at 01:09:09PM +0000, stuarth@opensource.wolfsonmicro.com wrote:
> From: Stuart Henderson <stuart.henderson@cirrus.com>

I'm moderately sure that "stuarth@opensource.wolfsonmicro.com" is the
same person but it'd be a lot better if everything joined up.  Please
also note that if your mail server adds any unfortunate disclaimers or
anything you probably don't want community e-mails going to there.

[-- 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] 8+ messages in thread

* Re: [PATCH] ASoC: wm8960: Fix WM8960_SYSCLK_PLL mode
  2016-01-19 17:07   ` Mark Brown
@ 2016-01-20  9:57     ` Stuart Henderson
  0 siblings, 0 replies; 8+ messages in thread
From: Stuart Henderson @ 2016-01-20  9:57 UTC (permalink / raw)
  To: Mark Brown; +Cc: Stuart Henderson, alsa-devel, ckeepax, lgirdwood, zidan.wang


On 19/01/16 17:07, Mark Brown wrote:
> I'm moderately sure that "stuarth@opensource.wolfsonmicro.com" is the
> same person but it'd be a lot better if everything joined up.

I'm happy to respin the patches using the o.wm.com email address if that 
makes things easier.

Stu

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

* Applied "ASoC: wm8960: Fix WM8960_SYSCLK_PLL mode" to the asoc tree
  2016-01-19 13:09 ` [PATCH] ASoC: wm8960: Fix WM8960_SYSCLK_PLL mode stuarth
  2016-01-19 13:49   ` Charles Keepax
  2016-01-19 17:07   ` Mark Brown
@ 2016-01-22 18:26   ` Mark Brown
  2 siblings, 0 replies; 8+ messages in thread
From: Mark Brown @ 2016-01-22 18:26 UTC (permalink / raw)
  To: Stuart Henderson, Mark Brown; +Cc: alsa-devel

The patch

   ASoC: wm8960: Fix WM8960_SYSCLK_PLL mode

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 6bb7451429084cefcb3a18fff809f7992595d2af Mon Sep 17 00:00:00 2001
From: Stuart Henderson <stuart.henderson@cirrus.com>
Date: Tue, 19 Jan 2016 13:09:09 +0000
Subject: [PATCH] ASoC: wm8960: Fix WM8960_SYSCLK_PLL mode

With the introduction of WM8960_SYSCLK_AUTO mode, WM8960_SYSCLK_PLL mode was
made unusable.  Ensure we're not PLL mode before trying to use MCLK.

Fixes: 3176bf2d7ccd ("ASoC: wm8960: update pll and clock setting function")
Signed-off-by: Stuart Henderson <stuart.henderson@cirrus.com>
Reviewed-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 sound/soc/codecs/wm8960.c | 32 +++++++++++++++++---------------
 1 file changed, 17 insertions(+), 15 deletions(-)

diff --git a/sound/soc/codecs/wm8960.c b/sound/soc/codecs/wm8960.c
index 66057f853fae..4b4401329591 100644
--- a/sound/soc/codecs/wm8960.c
+++ b/sound/soc/codecs/wm8960.c
@@ -631,29 +631,31 @@ static int wm8960_configure_clocking(struct snd_soc_codec *codec)
 		return -EINVAL;
 	}
 
-	/* check if the sysclk frequency is available. */
-	for (i = 0; i < ARRAY_SIZE(sysclk_divs); ++i) {
-		if (sysclk_divs[i] == -1)
-			continue;
-		sysclk = freq_out / sysclk_divs[i];
-		for (j = 0; j < ARRAY_SIZE(dac_divs); ++j) {
-			if (sysclk == dac_divs[j] * lrclk) {
+	if (wm8960->clk_id != WM8960_SYSCLK_PLL) {
+		/* check if the sysclk frequency is available. */
+		for (i = 0; i < ARRAY_SIZE(sysclk_divs); ++i) {
+			if (sysclk_divs[i] == -1)
+				continue;
+			sysclk = freq_out / sysclk_divs[i];
+			for (j = 0; j < ARRAY_SIZE(dac_divs); ++j) {
+				if (sysclk != dac_divs[j] * lrclk)
+					continue;
 				for (k = 0; k < ARRAY_SIZE(bclk_divs); ++k)
 					if (sysclk == bclk * bclk_divs[k] / 10)
 						break;
 				if (k != ARRAY_SIZE(bclk_divs))
 					break;
 			}
+			if (j != ARRAY_SIZE(dac_divs))
+				break;
 		}
-		if (j != ARRAY_SIZE(dac_divs))
-			break;
-	}
 
-	if (i != ARRAY_SIZE(sysclk_divs)) {
-		goto configure_clock;
-	} else if (wm8960->clk_id != WM8960_SYSCLK_AUTO) {
-		dev_err(codec->dev, "failed to configure clock\n");
-		return -EINVAL;
+		if (i != ARRAY_SIZE(sysclk_divs)) {
+			goto configure_clock;
+		} else if (wm8960->clk_id != WM8960_SYSCLK_AUTO) {
+			dev_err(codec->dev, "failed to configure clock\n");
+			return -EINVAL;
+		}
 	}
 	/* get a available pll out frequency and set pll */
 	for (i = 0; i < ARRAY_SIZE(sysclk_divs); ++i) {
-- 
2.7.0.rc3

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

* Applied "ASoC: wm8960: Fix input boost mixer left/right naming" to the asoc tree
  2016-01-19 13:09 [PATCH] ASoC: wm8960: Fix input boost mixer left/right naming stuarth
  2016-01-19 13:09 ` [PATCH] ASoC: wm8960: Fix WM8960_SYSCLK_PLL mode stuarth
  2016-01-19 13:47 ` [PATCH] ASoC: wm8960: Fix input boost mixer left/right naming Charles Keepax
@ 2016-01-22 18:26 ` Mark Brown
  2 siblings, 0 replies; 8+ messages in thread
From: Mark Brown @ 2016-01-22 18:26 UTC (permalink / raw)
  To: Stuart Henderson, Mark Brown; +Cc: alsa-devel

The patch

   ASoC: wm8960: Fix input boost mixer left/right naming

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 95826a37991de87659e21b3649f265a049724aa2 Mon Sep 17 00:00:00 2001
From: Stuart Henderson <stuart.henderson@cirrus.com>
Date: Tue, 19 Jan 2016 13:09:08 +0000
Subject: [PATCH] ASoC: wm8960: Fix input boost mixer left/right naming

INBMIX1 controls LINPUTs and INBMIX2 controls RINPUTs, so fix the naming
accordingly.

Signed-off-by: Stuart Henderson <stuart.henderson@cirrus.com>
Reviewed-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 sound/soc/codecs/wm8960.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/sound/soc/codecs/wm8960.c b/sound/soc/codecs/wm8960.c
index 5380798883b5..66057f853fae 100644
--- a/sound/soc/codecs/wm8960.c
+++ b/sound/soc/codecs/wm8960.c
@@ -231,13 +231,13 @@ SOC_DOUBLE_R("Capture Volume ZC Switch", WM8960_LINVOL, WM8960_RINVOL,
 SOC_DOUBLE_R("Capture Switch", WM8960_LINVOL, WM8960_RINVOL,
 	7, 1, 1),
 
-SOC_SINGLE_TLV("Right Input Boost Mixer RINPUT3 Volume",
+SOC_SINGLE_TLV("Left Input Boost Mixer LINPUT3 Volume",
 	       WM8960_INBMIX1, 4, 7, 0, lineinboost_tlv),
-SOC_SINGLE_TLV("Right Input Boost Mixer RINPUT2 Volume",
+SOC_SINGLE_TLV("Left Input Boost Mixer LINPUT2 Volume",
 	       WM8960_INBMIX1, 1, 7, 0, lineinboost_tlv),
-SOC_SINGLE_TLV("Left Input Boost Mixer LINPUT3 Volume",
+SOC_SINGLE_TLV("Right Input Boost Mixer RINPUT3 Volume",
 	       WM8960_INBMIX2, 4, 7, 0, lineinboost_tlv),
-SOC_SINGLE_TLV("Left Input Boost Mixer LINPUT2 Volume",
+SOC_SINGLE_TLV("Right Input Boost Mixer RINPUT2 Volume",
 	       WM8960_INBMIX2, 1, 7, 0, lineinboost_tlv),
 SOC_SINGLE_TLV("Right Input Boost Mixer RINPUT1 Volume",
 		WM8960_RINPATH, 4, 3, 0, micboost_tlv),
-- 
2.7.0.rc3

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

end of thread, other threads:[~2016-01-22 18:27 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-19 13:09 [PATCH] ASoC: wm8960: Fix input boost mixer left/right naming stuarth
2016-01-19 13:09 ` [PATCH] ASoC: wm8960: Fix WM8960_SYSCLK_PLL mode stuarth
2016-01-19 13:49   ` Charles Keepax
2016-01-19 17:07   ` Mark Brown
2016-01-20  9:57     ` Stuart Henderson
2016-01-22 18:26   ` Applied "ASoC: wm8960: Fix WM8960_SYSCLK_PLL mode" to the asoc tree Mark Brown
2016-01-19 13:47 ` [PATCH] ASoC: wm8960: Fix input boost mixer left/right naming Charles Keepax
2016-01-22 18:26 ` Applied "ASoC: wm8960: Fix input boost mixer left/right naming" to the asoc tree Mark Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.