* [PATCH] ASoC: wm8994: Fix class W controls
@ 2013-08-05 20:03 Mark Brown
2013-08-05 20:12 ` Lars-Peter Clausen
0 siblings, 1 reply; 6+ messages in thread
From: Mark Brown @ 2013-08-05 20:03 UTC (permalink / raw)
To: Lars-Peter Clausen, Liam Girdwood; +Cc: alsa-devel, patches, Mark Brown
From: Mark Brown <broonie@linaro.org>
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.
Signed-off-by: Mark Brown <broonie@linaro.org>
---
sound/soc/codecs/wm8994.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/sound/soc/codecs/wm8994.c b/sound/soc/codecs/wm8994.c
index d76b056..f32998a 100644
--- a/sound/soc/codecs/wm8994.c
+++ b/sound/soc/codecs/wm8994.c
@@ -1432,8 +1432,10 @@ 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)
+{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \
+ .info = snd_soc_info_volsw, \
+ .get = snd_soc_dapm_get_volsw, .put = wm8994_put_class_w, \
+ .private_value = SOC_SINGLE_VALUE(reg, shift, max, invert, 0) }
static int wm8994_put_class_w(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
--
1.8.4.rc0
^ permalink raw reply related [flat|nested] 6+ messages in thread* Re: [PATCH] ASoC: wm8994: Fix class W controls
2013-08-05 20:03 [PATCH] ASoC: wm8994: Fix class W controls Mark Brown
@ 2013-08-05 20:12 ` Lars-Peter Clausen
2013-08-05 20:28 ` Mark Brown
0 siblings, 1 reply; 6+ messages in thread
From: Lars-Peter Clausen @ 2013-08-05 20:12 UTC (permalink / raw)
To: Mark Brown; +Cc: alsa-devel, patches, Liam Girdwood, Mark Brown
On 08/05/2013 10:03 PM, Mark Brown wrote:
> From: Mark Brown <broonie@linaro.org>
>
> 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.
>
> Signed-off-by: Mark Brown <broonie@linaro.org>
> ---
> sound/soc/codecs/wm8994.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/sound/soc/codecs/wm8994.c b/sound/soc/codecs/wm8994.c
> index d76b056..f32998a 100644
> --- a/sound/soc/codecs/wm8994.c
> +++ b/sound/soc/codecs/wm8994.c
> @@ -1432,8 +1432,10 @@ 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)
> +{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \
> + .info = snd_soc_info_volsw, \
> + .get = snd_soc_dapm_get_volsw, .put = wm8994_put_class_w, \
> + .private_value = SOC_SINGLE_VALUE(reg, shift, max, invert, 0) }
Hm, right. But I think it should be enough to just replace the
snd_soc_get_volsw with snd_soc_dapm_get_volsw
- Lars
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH] ASoC: wm8994: Fix class W controls
2013-08-05 20:12 ` Lars-Peter Clausen
@ 2013-08-05 20:28 ` Mark Brown
0 siblings, 0 replies; 6+ messages in thread
From: Mark Brown @ 2013-08-05 20:28 UTC (permalink / raw)
To: Lars-Peter Clausen; +Cc: alsa-devel, patches, Liam Girdwood
[-- Attachment #1.1: Type: text/plain, Size: 210 bytes --]
On Mon, Aug 05, 2013 at 10:12:51PM +0200, Lars-Peter Clausen wrote:
> Hm, right. But I think it should be enough to just replace the
> snd_soc_get_volsw with snd_soc_dapm_get_volsw
Yes, that should work too.
[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] ASoC: wm8994: Fix class W controls
@ 2013-08-05 22:35 Mark Brown
2013-08-06 8:40 ` Lars-Peter Clausen
0 siblings, 1 reply; 6+ messages in thread
From: Mark Brown @ 2013-08-05 22:35 UTC (permalink / raw)
To: Lars-Peter Clausen, Liam Girdwood; +Cc: alsa-devel, patches, Mark Brown
From: Mark Brown <broonie@linaro.org>
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.
Signed-off-by: Mark Brown <broonie@linaro.org>
---
sound/soc/codecs/wm8994.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sound/soc/codecs/wm8994.c b/sound/soc/codecs/wm8994.c
index d76b056..29ad480 100644
--- a/sound/soc/codecs/wm8994.c
+++ b/sound/soc/codecs/wm8994.c
@@ -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)
--
1.8.4.rc0
^ permalink raw reply related [flat|nested] 6+ messages in thread* Re: [PATCH] ASoC: wm8994: Fix class W controls
2013-08-05 22:35 Mark Brown
@ 2013-08-06 8:40 ` Lars-Peter Clausen
2013-08-06 9:51 ` Mark Brown
0 siblings, 1 reply; 6+ messages in thread
From: Lars-Peter Clausen @ 2013-08-06 8:40 UTC (permalink / raw)
To: Mark Brown; +Cc: alsa-devel, patches, Liam Girdwood, Mark Brown
On 08/06/2013 12:35 AM, Mark Brown wrote:
> From: Mark Brown <broonie@linaro.org>
>
> 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.
>
> Signed-off-by: Mark Brown <broonie@linaro.org>
> ---
> sound/soc/codecs/wm8994.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/sound/soc/codecs/wm8994.c b/sound/soc/codecs/wm8994.c
> index d76b056..29ad480 100644
> --- a/sound/soc/codecs/wm8994.c
> +++ b/sound/soc/codecs/wm8994.c
> @@ -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.
> + 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)
>
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH] ASoC: wm8994: Fix class W controls
2013-08-06 8:40 ` Lars-Peter Clausen
@ 2013-08-06 9:51 ` Mark Brown
0 siblings, 0 replies; 6+ messages in thread
From: Mark Brown @ 2013-08-06 9:51 UTC (permalink / raw)
To: Lars-Peter Clausen; +Cc: alsa-devel, patches, Liam Girdwood
[-- Attachment #1.1: Type: text/plain, Size: 486 bytes --]
On Tue, Aug 06, 2013 at 10:40:56AM +0200, Lars-Peter Clausen wrote:
> On 08/06/2013 12:35 AM, Mark Brown wrote:
> > #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.
Meh, cut'n'paste - fixed now. Though actually those values are always
right anyway as far as I remember.
[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2013-08-06 9:51 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-05 20:03 [PATCH] ASoC: wm8994: Fix class W controls Mark Brown
2013-08-05 20:12 ` Lars-Peter Clausen
2013-08-05 20:28 ` Mark Brown
-- strict thread matches above, loose matches on Subject: below --
2013-08-05 22:35 Mark Brown
2013-08-06 8:40 ` Lars-Peter Clausen
2013-08-06 9:51 ` 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.