alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] ASoC: wm8960: Fix input boost mixer left/right naming
@ 2016-01-20 10:12 Stuart Henderson
  2016-01-20 10:12 ` [PATCH v2] ASoC: wm8960: Fix WM8960_SYSCLK_PLL mode Stuart Henderson
  2016-01-20 10:47 ` [PATCH v2] ASoC: wm8960: Fix input boost mixer left/right naming Mark Brown
  0 siblings, 2 replies; 3+ messages in thread
From: Stuart Henderson @ 2016-01-20 10:12 UTC (permalink / raw)
  To: broonie, lgirdwood; +Cc: Stuart Henderson, alsa-devel, ckeepax, zidan.wang

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

Change-Id: Ie15f97ad7370c4e0d008e1e7b4ecaf9762892e94
Signed-off-by: Stuart Henderson <stuarth@opensource.wolfsonmicro.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] 3+ messages in thread

* [PATCH v2] ASoC: wm8960: Fix WM8960_SYSCLK_PLL mode
  2016-01-20 10:12 [PATCH v2] ASoC: wm8960: Fix input boost mixer left/right naming Stuart Henderson
@ 2016-01-20 10:12 ` Stuart Henderson
  2016-01-20 10:47 ` [PATCH v2] ASoC: wm8960: Fix input boost mixer left/right naming Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Stuart Henderson @ 2016-01-20 10:12 UTC (permalink / raw)
  To: broonie, lgirdwood; +Cc: Stuart Henderson, alsa-devel, ckeepax, zidan.wang

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.

Change-Id: Iee623a84fc8bf561bc13865dc92589ecc6998f2a
Fixes: 3176bf2d7ccd ("ASoC: wm8960: update pll and clock setting function")
Signed-off-by: Stuart Henderson <stuarth@opensource.wolfsonmicro.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] 3+ messages in thread

* Re: [PATCH v2] ASoC: wm8960: Fix input boost mixer left/right naming
  2016-01-20 10:12 [PATCH v2] ASoC: wm8960: Fix input boost mixer left/right naming Stuart Henderson
  2016-01-20 10:12 ` [PATCH v2] ASoC: wm8960: Fix WM8960_SYSCLK_PLL mode Stuart Henderson
@ 2016-01-20 10:47 ` Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2016-01-20 10:47 UTC (permalink / raw)
  To: Stuart Henderson; +Cc: alsa-devel, ckeepax, lgirdwood, zidan.wang


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

On Wed, Jan 20, 2016 at 10:12:35AM +0000, Stuart Henderson wrote:

> Change-Id: Ie15f97ad7370c4e0d008e1e7b4ecaf9762892e94

Please don't include noise like this in upstream submissions.  Your
internal processes are irrelevant to upstream.

> Signed-off-by: Stuart Henderson <stuarth@opensource.wolfsonmicro.com>
> ---

If you are resending something that has previously been reviewed by
someone please include any tags they provided so they don't get lost.

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

end of thread, other threads:[~2016-01-20 10:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-20 10:12 [PATCH v2] ASoC: wm8960: Fix input boost mixer left/right naming Stuart Henderson
2016-01-20 10:12 ` [PATCH v2] ASoC: wm8960: Fix WM8960_SYSCLK_PLL mode Stuart Henderson
2016-01-20 10:47 ` [PATCH v2] ASoC: wm8960: Fix input boost mixer left/right naming 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).