diff options
author | Takashi Iwai <tiwai@suse.de> | 2016-02-29 11:23:50 -0500 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2016-02-29 22:02:05 -0500 |
commit | 127ee199d5d232f29ad64bace3b441127fce6cd3 (patch) | |
tree | 20968fdc7dca9119e30675978970e058353be4da | |
parent | 1457ad0e99dc5b1fe3fe3123d5135c95c00ed74b (diff) |
ASoC: pxa: magician: Fix enum ctl accesses in a wrong type
"Input Select" ctl in magician driver is an enum, while the current
driver accesses wrongly via value.integer.value[]. They have to be
via value.enumerated.item[] instead.
(Meanwhile "Headphone Switch" and "Speaker Switch" are boolean, so
they should stay to access via value.integer.value[] as is.)
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r-- | sound/soc/pxa/magician.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sound/soc/pxa/magician.c b/sound/soc/pxa/magician.c index 241d0be42d7a..62b8377a9d2b 100644 --- a/sound/soc/pxa/magician.c +++ b/sound/soc/pxa/magician.c | |||
@@ -308,17 +308,17 @@ static int magician_set_spk(struct snd_kcontrol *kcontrol, | |||
308 | static int magician_get_input(struct snd_kcontrol *kcontrol, | 308 | static int magician_get_input(struct snd_kcontrol *kcontrol, |
309 | struct snd_ctl_elem_value *ucontrol) | 309 | struct snd_ctl_elem_value *ucontrol) |
310 | { | 310 | { |
311 | ucontrol->value.integer.value[0] = magician_in_sel; | 311 | ucontrol->value.enumerated.item[0] = magician_in_sel; |
312 | return 0; | 312 | return 0; |
313 | } | 313 | } |
314 | 314 | ||
315 | static int magician_set_input(struct snd_kcontrol *kcontrol, | 315 | static int magician_set_input(struct snd_kcontrol *kcontrol, |
316 | struct snd_ctl_elem_value *ucontrol) | 316 | struct snd_ctl_elem_value *ucontrol) |
317 | { | 317 | { |
318 | if (magician_in_sel == ucontrol->value.integer.value[0]) | 318 | if (magician_in_sel == ucontrol->value.enumerated.item[0]) |
319 | return 0; | 319 | return 0; |
320 | 320 | ||
321 | magician_in_sel = ucontrol->value.integer.value[0]; | 321 | magician_in_sel = ucontrol->value.enumerated.item[0]; |
322 | 322 | ||
323 | switch (magician_in_sel) { | 323 | switch (magician_in_sel) { |
324 | case MAGICIAN_MIC: | 324 | case MAGICIAN_MIC: |