Skip to content

Commit

Permalink
ASoC: fix deemphasis control in wm8904/55/60 codecs
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Dmitry Artamonow authored and Mark Brown committed Dec 9, 2010
1 parent 2a7b1a0 commit 3f343f8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion sound/soc/codecs/wm8904.c
Original file line number Diff line number Diff line change
Expand Up @@ -818,7 +818,8 @@ static int wm8904_get_deemph(struct snd_kcontrol *kcontrol,
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,
Expand Down
3 changes: 2 additions & 1 deletion sound/soc/codecs/wm8955.c
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,8 @@ static int wm8955_get_deemph(struct snd_kcontrol *kcontrol,
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,
Expand Down
3 changes: 2 additions & 1 deletion sound/soc/codecs/wm8960.c
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,8 @@ static int wm8960_get_deemph(struct snd_kcontrol *kcontrol,
struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol);
struct wm8960_priv *wm8960 = snd_soc_codec_get_drvdata(codec);

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

static int wm8960_put_deemph(struct snd_kcontrol *kcontrol,
Expand Down

0 comments on commit 3f343f8

Please sign in to comment.