lkml.org 
[lkml]   [2011]   [Feb]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] [23/139] ASoC: fix deemphasis control in wm8904/55/60 codecs
Date
2.6.35-longterm review patch.  If anyone has any objections, please let me know.

------------------
From: Dmitry Artamonow <mad_soft@inbox.ru>

commit 3f343f8512c7882a3637d9aea4ec6b3801cbcdc5 upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Andi Kleen <ak@linux.intel.com>

---
sound/soc/codecs/wm8904.c | 3 ++-
sound/soc/codecs/wm8955.c | 3 ++-
sound/soc/codecs/wm8960.c | 3 ++-
3 files changed, 6 insertions(+), 3 deletions(-)

Index: linux-2.6.35.y/sound/soc/codecs/wm8904.c
===================================================================
--- linux-2.6.35.y.orig/sound/soc/codecs/wm8904.c
+++ linux-2.6.35.y/sound/soc/codecs/wm8904.c
@@ -820,7 +820,8 @@ static int wm8904_get_deemph(struct snd_
struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol);
struct wm8904_priv *wm8904 = snd_soc_codec_get_drvdata(codec);

- return wm8904->deemph;
+ ucontrol->value.enumerated.item[0] = wm8904->deemph;
+ return 0;
}

static int wm8904_put_deemph(struct snd_kcontrol *kcontrol,
Index: linux-2.6.35.y/sound/soc/codecs/wm8955.c
===================================================================
--- linux-2.6.35.y.orig/sound/soc/codecs/wm8955.c
+++ linux-2.6.35.y/sound/soc/codecs/wm8955.c
@@ -384,7 +384,8 @@ static int wm8955_get_deemph(struct snd_
struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol);
struct wm8955_priv *wm8955 = snd_soc_codec_get_drvdata(codec);

- return wm8955->deemph;
+ ucontrol->value.enumerated.item[0] = wm8955->deemph;
+ return 0;
}

static int wm8955_put_deemph(struct snd_kcontrol *kcontrol,

\
 
 \ /
  Last update: 2011-02-02 01:47    [W:0.282 / U:0.864 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site