]>
Commit | Line | Data |
---|---|---|
0a212480 GKH |
1 | From d7f58db49d9ad92bdb12d21fdc2308b76bc2ed38 Mon Sep 17 00:00:00 2001 |
2 | From: Takashi Iwai <tiwai@suse.de> | |
3 | Date: Tue, 10 Mar 2015 12:39:07 +0100 | |
4 | Subject: ASoC: pcm1681: Fix wrong value references for boolean kctl | |
5 | ||
6 | From: Takashi Iwai <tiwai@suse.de> | |
7 | ||
8 | commit d7f58db49d9ad92bdb12d21fdc2308b76bc2ed38 upstream. | |
9 | ||
10 | The correct values referred by a boolean control are | |
11 | value.integer.value[], not value.enumerated.item[]. | |
12 | The former is long while the latter is int, so it's even incompatible | |
13 | on 64bit architectures. | |
14 | ||
15 | Signed-off-by: Takashi Iwai <tiwai@suse.de> | |
16 | Signed-off-by: Mark Brown <broonie@kernel.org> | |
17 | Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | |
18 | ||
19 | --- | |
20 | sound/soc/codecs/pcm1681.c | 4 ++-- | |
21 | 1 file changed, 2 insertions(+), 2 deletions(-) | |
22 | ||
23 | --- a/sound/soc/codecs/pcm1681.c | |
24 | +++ b/sound/soc/codecs/pcm1681.c | |
25 | @@ -118,7 +118,7 @@ static int pcm1681_get_deemph(struct snd | |
26 | struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol); | |
27 | struct pcm1681_private *priv = snd_soc_codec_get_drvdata(codec); | |
28 | ||
29 | - ucontrol->value.enumerated.item[0] = priv->deemph; | |
30 | + ucontrol->value.integer.value[0] = priv->deemph; | |
31 | ||
32 | return 0; | |
33 | } | |
34 | @@ -129,7 +129,7 @@ static int pcm1681_put_deemph(struct snd | |
35 | struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol); | |
36 | struct pcm1681_private *priv = snd_soc_codec_get_drvdata(codec); | |
37 | ||
38 | - priv->deemph = ucontrol->value.enumerated.item[0]; | |
39 | + priv->deemph = ucontrol->value.integer.value[0]; | |
40 | ||
41 | return pcm1681_set_deemph(codec); | |
42 | } |