mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-10 04:48:04 +09:00
ASoC: fix deemphasis control in wm8904/55/60 codecs
commit 3f343f8512 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>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
a51f753947
commit
6f92687b79
@@ -820,7 +820,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,
|
||||
|
||||
@@ -384,7 +384,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,
|
||||
|
||||
@@ -137,7 +137,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,
|
||||
|
||||
Reference in New Issue
Block a user