Skip to contentSkip to conversation

ASoC: Fix WM8580 CLKSEL mask selection

PATCH In review Mark Brown 2 participants 3 messages Aug 16, 2010

Subsystems (3)
lore
Share & tools
lore

Mark Brown

author
#0 lore raw

PATCH 1/2 ASoC: Fix WM8580 CLKSEL mask selection

The RX and TX directions were inverted.

---
 sound/soc/codecs/wm8580.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
sound/soc/codecs/wm8580.c +2 -2
index af4517e..42a6699 100644
@@ -703,12 +703,12 @@ static int wm8580_set_sysclk(struct snd_soc_dai *dai, int clk_id,
 	int sel, sel_mask, sel_shift;
 
 	switch (dai->driver->id) {
-	case WM8580_DAI_PAIFTX:
+	case WM8580_DAI_PAIFRX:
 		sel_mask = 0x3;
 		sel_shift = 0;
 		break;
 
-	case WM8580_DAI_PAIFRX:
+	case WM8580_DAI_PAIFTX:
 		sel_mask = 0xc;
 		sel_shift = 2;
 		break;
Signature · 1 line
1.7.1
author
#1 lore raw

PATCH 2/2 ASoC: Fix argument ordering for snd_soc_update_bits() in WM8580

---
 sound/soc/codecs/wm8580.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
sound/soc/codecs/wm8580.c +1 -1
index 42a6699..910c62a 100644
@@ -741,7 +741,7 @@ static int wm8580_set_sysclk(struct snd_soc_dai *dai, int clk_id,
 	/* We really should validate PLL settings but not yet */
 	wm8580->sysclk[dai->id] = freq;
 
-	return snd_soc_update_bits(codec, WM8580_CLKSEL, sel, sel_mask);
+	return snd_soc_update_bits(codec, WM8580_CLKSEL, sel_mask, sel);
 }
 
 static int wm8580_digital_mute(struct snd_soc_dai *codec_dai, int mute)
Signature · 1 line
1.7.1
Acked-by on v1 1/2
#2 lore raw
In reply to Mark Brown
Quoted 17 lines · Mark Brown

The RX and TX directions were inverted.

---
 sound/soc/codecs/wm8580.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
sound/soc/codecs/wm8580.c +0 -1
index af4517e..42a6699 100644
@@ -703,12 +703,12 @@ static int wm8580_set_sysclk(struct snd_soc_dai *dai, int clk_id,
 	int sel, sel_mask, sel_shift;
 
 	switch (dai->driver->id) {
-	case WM8580_DAI_PAIFTX:

sound/soc/codecs/wm8580.c static int wm8580_set_sysclk(struct snd_soc_dai *dai, int clk_id, · line 714

Quoted 10 lines
sound/soc/codecs/wm8580.c +2 -1
+	case WM8580_DAI_PAIFRX:
 		sel_mask = 0x3;
 		sel_shift = 0;
 		break;
 
-	case WM8580_DAI_PAIFRX:
+	case WM8580_DAI_PAIFTX:
 		sel_mask = 0xc;
 		sel_shift = 2;
 		break;

Both

Signature · 3 lines
Freelance Developer, SlimLogic Ltd
ASoC and Voltage Regulator Maintainer.
http://www.slimlogic.co.uk