aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2016-02-29 11:23:53 -0500
committerMark Brown <broonie@kernel.org>2016-02-29 22:02:05 -0500
commit419396d5a1d12003a18a58785687697800d2f02a (patch)
tree3f5de5739bbdbc4dece3211342801605b3663065
parent49a1ba16ab15b9a572c188fe0d9d79017d2fef99 (diff)
ASoC: pxa: tosa: Fix enum ctl accesses in a wrong type
"Jack Function" and "Speaker Function" ctls in tosa are enum, while the current driver accesses wrongly via value.integer.value[]. They have to be via value.enumerated.item[] instead. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r--sound/soc/pxa/tosa.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/sound/soc/pxa/tosa.c b/sound/soc/pxa/tosa.c
index 49518dd642aa..c508f024ecfb 100644
--- a/sound/soc/pxa/tosa.c
+++ b/sound/soc/pxa/tosa.c
@@ -95,7 +95,7 @@ static struct snd_soc_ops tosa_ops = {
95static int tosa_get_jack(struct snd_kcontrol *kcontrol, 95static int tosa_get_jack(struct snd_kcontrol *kcontrol,
96 struct snd_ctl_elem_value *ucontrol) 96 struct snd_ctl_elem_value *ucontrol)
97{ 97{
98 ucontrol->value.integer.value[0] = tosa_jack_func; 98 ucontrol->value.enumerated.item[0] = tosa_jack_func;
99 return 0; 99 return 0;
100} 100}
101 101
@@ -104,10 +104,10 @@ static int tosa_set_jack(struct snd_kcontrol *kcontrol,
104{ 104{
105 struct snd_soc_card *card = snd_kcontrol_chip(kcontrol); 105 struct snd_soc_card *card = snd_kcontrol_chip(kcontrol);
106 106
107 if (tosa_jack_func == ucontrol->value.integer.value[0]) 107 if (tosa_jack_func == ucontrol->value.enumerated.item[0])
108 return 0; 108 return 0;
109 109
110 tosa_jack_func = ucontrol->value.integer.value[0]; 110 tosa_jack_func = ucontrol->value.enumerated.item[0];
111 tosa_ext_control(&card->dapm); 111 tosa_ext_control(&card->dapm);
112 return 1; 112 return 1;
113} 113}
@@ -115,7 +115,7 @@ static int tosa_set_jack(struct snd_kcontrol *kcontrol,
115static int tosa_get_spk(struct snd_kcontrol *kcontrol, 115static int tosa_get_spk(struct snd_kcontrol *kcontrol,
116 struct snd_ctl_elem_value *ucontrol) 116 struct snd_ctl_elem_value *ucontrol)
117{ 117{
118 ucontrol->value.integer.value[0] = tosa_spk_func; 118 ucontrol->value.enumerated.item[0] = tosa_spk_func;
119 return 0; 119 return 0;
120} 120}
121 121
@@ -124,10 +124,10 @@ static int tosa_set_spk(struct snd_kcontrol *kcontrol,
124{ 124{
125 struct snd_soc_card *card = snd_kcontrol_chip(kcontrol); 125 struct snd_soc_card *card = snd_kcontrol_chip(kcontrol);
126 126
127 if (tosa_spk_func == ucontrol->value.integer.value[0]) 127 if (tosa_spk_func == ucontrol->value.enumerated.item[0])
128 return 0; 128 return 0;
129 129
130 tosa_spk_func = ucontrol->value.integer.value[0]; 130 tosa_spk_func = ucontrol->value.enumerated.item[0];
131 tosa_ext_control(&card->dapm); 131 tosa_ext_control(&card->dapm);
132 return 1; 132 return 1;
133} 133}