Stereo is not yet supported by dapm widgets, so remove stereo code from snd_soc_dapm_get_volsw().
Cc: Liam Girdwood lrg@ti.com Cc: Mark Brown broonie@opensource.wolfsonmicro.com Cc: alsa-devel@alsa-project.org Signed-off-by: Benoît Thébaudeau benoit.thebaudeau@advansee.com --- .../sound/soc/soc-dapm.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-)
diff --git linux-next-HEAD-5d2b7d6.orig/sound/soc/soc-dapm.c linux-next-HEAD-5d2b7d6/sound/soc/soc-dapm.c index c93e832..9333e01 100644 --- linux-next-HEAD-5d2b7d6.orig/sound/soc/soc-dapm.c +++ linux-next-HEAD-5d2b7d6/sound/soc/soc-dapm.c @@ -2464,23 +2464,15 @@ int snd_soc_dapm_get_volsw(struct snd_kcontrol *kcontrol, (struct soc_mixer_control *)kcontrol->private_value; unsigned int reg = mc->reg; unsigned int shift = mc->shift; - unsigned int rshift = mc->rshift; int max = mc->max; - unsigned int invert = mc->invert; unsigned int mask = (1 << fls(max)) - 1; + unsigned int invert = mc->invert;
ucontrol->value.integer.value[0] = (snd_soc_read(widget->codec, reg) >> shift) & mask; - if (shift != rshift) - ucontrol->value.integer.value[1] = - (snd_soc_read(widget->codec, reg) >> rshift) & mask; - if (invert) { + if (invert) ucontrol->value.integer.value[0] = max - ucontrol->value.integer.value[0]; - if (shift != rshift) - ucontrol->value.integer.value[1] = - max - ucontrol->value.integer.value[1]; - }
return 0; }