summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2016-02-29 11:23:51 -0500
committerMark Brown <broonie@kernel.org>2016-02-29 22:02:05 -0500
commit7a3f4b488ce366de6ab2cf19d95353da9814bdd9 (patch)
treec40d6df8351f110766faa0ffcbe2f1c7cd633b9c
parent127ee199d5d232f29ad64bace3b441127fce6cd3 (diff)
ASoC: pxa: poodle: Fix enum ctl accesses in a wrong type
"Jack Function" and "Speaker Function" ctls in poodle 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/poodle.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/sound/soc/pxa/poodle.c b/sound/soc/pxa/poodle.c
index 84d0e2e50808..4b3b714f5ee7 100644
--- a/sound/soc/pxa/poodle.c
+++ b/sound/soc/pxa/poodle.c
@@ -138,7 +138,7 @@ static struct snd_soc_ops poodle_ops = {
138static int poodle_get_jack(struct snd_kcontrol *kcontrol, 138static int poodle_get_jack(struct snd_kcontrol *kcontrol,
139 struct snd_ctl_elem_value *ucontrol) 139 struct snd_ctl_elem_value *ucontrol)
140{ 140{
141 ucontrol->value.integer.value[0] = poodle_jack_func; 141 ucontrol->value.enumerated.item[0] = poodle_jack_func;
142 return 0; 142 return 0;
143} 143}
144 144
@@ -147,10 +147,10 @@ static int poodle_set_jack(struct snd_kcontrol *kcontrol,
147{ 147{
148 struct snd_soc_card *card = snd_kcontrol_chip(kcontrol); 148 struct snd_soc_card *card = snd_kcontrol_chip(kcontrol);
149 149
150 if (poodle_jack_func == ucontrol->value.integer.value[0]) 150 if (poodle_jack_func == ucontrol->value.enumerated.item[0])
151 return 0; 151 return 0;
152 152
153 poodle_jack_func = ucontrol->value.integer.value[0]; 153 poodle_jack_func = ucontrol->value.enumerated.item[0];
154 poodle_ext_control(&card->dapm); 154 poodle_ext_control(&card->dapm);
155 return 1; 155 return 1;
156} 156}
@@ -158,7 +158,7 @@ static int poodle_set_jack(struct snd_kcontrol *kcontrol,
158static int poodle_get_spk(struct snd_kcontrol *kcontrol, 158static int poodle_get_spk(struct snd_kcontrol *kcontrol,
159 struct snd_ctl_elem_value *ucontrol) 159 struct snd_ctl_elem_value *ucontrol)
160{ 160{
161 ucontrol->value.integer.value[0] = poodle_spk_func; 161 ucontrol->value.enumerated.item[0] = poodle_spk_func;
162 return 0; 162 return 0;
163} 163}
164 164
@@ -167,10 +167,10 @@ static int poodle_set_spk(struct snd_kcontrol *kcontrol,
167{ 167{
168 struct snd_soc_card *card = snd_kcontrol_chip(kcontrol); 168 struct snd_soc_card *card = snd_kcontrol_chip(kcontrol);
169 169
170 if (poodle_spk_func == ucontrol->value.integer.value[0]) 170 if (poodle_spk_func == ucontrol->value.enumerated.item[0])
171 return 0; 171 return 0;
172 172
173 poodle_spk_func = ucontrol->value.integer.value[0]; 173 poodle_spk_func = ucontrol->value.enumerated.item[0];
174 poodle_ext_control(&card->dapm); 174 poodle_ext_control(&card->dapm);
175 return 1; 175 return 1;
176} 176}