Skip to contentSkip to conversation

ASoC: wm8994: Fix class W controls

PATCH In review Mark Brown 2 participants 3 messages Aug 5, 2013 – Aug 6, 2013

Subsystems (3)
lore
Share & tools
lore

Mark Brown

author maintainer
#0 lore raw

PATCH 1/1 ASoC: wm8994: Fix class W controls

From: Mark Brown <[email protected]>

Commit 6e0650 (ASoC: wm8994: Use SOC_SINGLE_EXT() instead of open-coding it) went too far and converted a DAPM control to use SOC_SINGLE_EXT() which crashes. Revert that portion of the patch.

---
 sound/soc/codecs/wm8994.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
sound/soc/codecs/wm8994.c +2 -2
index d76b056..29ad480 100644
@@ -1432,8 +1432,8 @@ SOC_DAPM_SINGLE("AIF1.1 Switch", WM8994_DAC2_RIGHT_MIXER_ROUTING,
 };
 
 #define WM8994_CLASS_W_SWITCH(xname, reg, shift, max, invert) \
-	SOC_SINGLE_EXT(xname, reg, shift, max, invert, \
-		snd_soc_get_volsw, wm8994_put_class_w)
+	SOC_SINGLE_EXT(xname, reg, shift, 1, 0, \
+		snd_soc_dapm_get_volsw, wm8994_put_class_w)
 
 static int wm8994_put_class_w(struct snd_kcontrol *kcontrol,
 			      struct snd_ctl_elem_value *ucontrol)
Signature · 1 line
1.8.4.rc0
#1 lore raw
Quoted 16 lines · Mark Brown

From: Mark Brown <[email protected]>

Commit 6e0650 (ASoC: wm8994: Use SOC_SINGLE_EXT() instead of open-coding it) went too far and converted a DAPM control to use SOC_SINGLE_EXT() which crashes. Revert that portion of the patch.

---
  sound/soc/codecs/wm8994.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
sound/soc/codecs/wm8994.c +0 -0
index d76b056..29ad480 100644

sound/soc/codecs/wm8994.c SOC_DAPM_SINGLE("AIF1.1 Switch", WM8994_DAC2_RIGHT_MIXER_ROUTING, · line 1435

Quoted 6 lines
sound/soc/codecs/wm8994.c +1 -2
@@ -1432,8 +1432,8 @@ SOC_DAPM_SINGLE("AIF1.1 Switch", WM8994_DAC2_RIGHT_MIXER_ROUTING,
  };
 
  #define WM8994_CLASS_W_SWITCH(xname, reg, shift, max, invert) \
-	SOC_SINGLE_EXT(xname, reg, shift, max, invert, \
-		snd_soc_get_volsw, wm8994_put_class_w)
+	SOC_SINGLE_EXT(xname, reg, shift, 1, 0, \

The patch changed 'max' to 1 and 'invert' to 0.

Quoted 5 lines
sound/soc/codecs/wm8994.c +1 -0
+		snd_soc_dapm_get_volsw, wm8994_put_class_w)
 
  static int wm8994_put_class_w(struct snd_kcontrol *kcontrol,
  			      struct snd_ctl_elem_value *ucontrol)
author maintainer
#2 lore raw
Quoted 8 lines · Lars-Peter Clausen

sound/soc/codecs/wm8994.c SOC_DAPM_SINGLE("AIF1.1 Switch", WM8994_DAC2_RIGHT_MIXER_ROUTING, · line 1435

Quoted 4 lines · Mark Brown

#define WM8994_CLASS_W_SWITCH(xname, reg, shift, max, invert) \

sound/soc/codecs/wm8994.c +1 -2
-	SOC_SINGLE_EXT(xname, reg, shift, max, invert, \
-		snd_soc_get_volsw, wm8994_put_class_w)
+	SOC_SINGLE_EXT(xname, reg, shift, 1, 0, \

The patch changed 'max' to 1 and 'invert' to 0.

Meh, cut'n'paste - fixed now. Though actually those values are always right anyway as far as I remember.