aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorDmitry Artamonow <mad_soft@inbox.ru>2010-12-08 15:36:17 -0500
committerMark Brown <broonie@opensource.wolfsonmicro.com>2010-12-09 05:55:37 -0500
commit3f343f8512c7882a3637d9aea4ec6b3801cbcdc5 (patch)
tree129d750e31f41b9cdabb9bed5458061e44f74130 /sound
parent2a7b1a00206895cfa444fd83477dca67a88a9d25 (diff)
ASoC: fix deemphasis control in wm8904/55/60 codecs
Deemphasis control's .get callback should update control's value instead of returning it - return value of callback function is used for indicating error or success of operation. Signed-off-by: Dmitry Artamonow <mad_soft@inbox.ru> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: stable@kernel.org
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/codecs/wm8904.c3
-rw-r--r--sound/soc/codecs/wm8955.c3
-rw-r--r--sound/soc/codecs/wm8960.c3
3 files changed, 6 insertions, 3 deletions
diff --git a/sound/soc/codecs/wm8904.c b/sound/soc/codecs/wm8904.c
index fca60a0b57b8..9001cc48ba13 100644
--- a/sound/soc/codecs/wm8904.c
+++ b/sound/soc/codecs/wm8904.c
@@ -818,7 +818,8 @@ static int wm8904_get_deemph(struct snd_kcontrol *kcontrol,
818 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); 818 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol);
819 struct wm8904_priv *wm8904 = snd_soc_codec_get_drvdata(codec); 819 struct wm8904_priv *wm8904 = snd_soc_codec_get_drvdata(codec);
820 820
821 return wm8904->deemph; 821 ucontrol->value.enumerated.item[0] = wm8904->deemph;
822 return 0;
822} 823}
823 824
824static int wm8904_put_deemph(struct snd_kcontrol *kcontrol, 825static int wm8904_put_deemph(struct snd_kcontrol *kcontrol,
diff --git a/sound/soc/codecs/wm8955.c b/sound/soc/codecs/wm8955.c
index f89ad6c9a80b..9cbab8e1de01 100644
--- a/sound/soc/codecs/wm8955.c
+++ b/sound/soc/codecs/wm8955.c
@@ -380,7 +380,8 @@ static int wm8955_get_deemph(struct snd_kcontrol *kcontrol,
380 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); 380 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol);
381 struct wm8955_priv *wm8955 = snd_soc_codec_get_drvdata(codec); 381 struct wm8955_priv *wm8955 = snd_soc_codec_get_drvdata(codec);
382 382
383 return wm8955->deemph; 383 ucontrol->value.enumerated.item[0] = wm8955->deemph;
384 return 0;
384} 385}
385 386
386static int wm8955_put_deemph(struct snd_kcontrol *kcontrol, 387static int wm8955_put_deemph(struct snd_kcontrol *kcontrol,
diff --git a/sound/soc/codecs/wm8960.c b/sound/soc/codecs/wm8960.c
index 8d5efb333c33..21986c42272f 100644
--- a/sound/soc/codecs/wm8960.c
+++ b/sound/soc/codecs/wm8960.c
@@ -138,7 +138,8 @@ static int wm8960_get_deemph(struct snd_kcontrol *kcontrol,
138 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); 138 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol);
139 struct wm8960_priv *wm8960 = snd_soc_codec_get_drvdata(codec); 139 struct wm8960_priv *wm8960 = snd_soc_codec_get_drvdata(codec);
140 140
141 return wm8960->deemph; 141 ucontrol->value.enumerated.item[0] = wm8960->deemph;
142 return 0;
142} 143}
143 144
144static int wm8960_put_deemph(struct snd_kcontrol *kcontrol, 145static int wm8960_put_deemph(struct snd_kcontrol *kcontrol,