Skip to content

Commit d078482

Browse files
tiwaibroonie
authored andcommitted
ASoC: wm8958: Fix enum ctl accesses in a wrong type
"MBC Mode", "VSS Mode", "VSS HPF Mode" and "Enhanced EQ Mode" ctls in wm8958 codec driver 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 <[email protected]> Signed-off-by: Mark Brown <[email protected]> Cc: [email protected]
1 parent 92e963f commit d078482

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

sound/soc/codecs/wm8958-dsp2.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -459,7 +459,7 @@ static int wm8958_put_mbc_enum(struct snd_kcontrol *kcontrol,
459459
struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
460460
struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec);
461461
struct wm8994 *control = wm8994->wm8994;
462-
int value = ucontrol->value.integer.value[0];
462+
int value = ucontrol->value.enumerated.item[0];
463463
int reg;
464464

465465
/* Don't allow on the fly reconfiguration */
@@ -549,7 +549,7 @@ static int wm8958_put_vss_enum(struct snd_kcontrol *kcontrol,
549549
struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
550550
struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec);
551551
struct wm8994 *control = wm8994->wm8994;
552-
int value = ucontrol->value.integer.value[0];
552+
int value = ucontrol->value.enumerated.item[0];
553553
int reg;
554554

555555
/* Don't allow on the fly reconfiguration */
@@ -582,7 +582,7 @@ static int wm8958_put_vss_hpf_enum(struct snd_kcontrol *kcontrol,
582582
struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
583583
struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec);
584584
struct wm8994 *control = wm8994->wm8994;
585-
int value = ucontrol->value.integer.value[0];
585+
int value = ucontrol->value.enumerated.item[0];
586586
int reg;
587587

588588
/* Don't allow on the fly reconfiguration */
@@ -749,7 +749,7 @@ static int wm8958_put_enh_eq_enum(struct snd_kcontrol *kcontrol,
749749
struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
750750
struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec);
751751
struct wm8994 *control = wm8994->wm8994;
752-
int value = ucontrol->value.integer.value[0];
752+
int value = ucontrol->value.enumerated.item[0];
753753
int reg;
754754

755755
/* Don't allow on the fly reconfiguration */

0 commit comments

Comments
 (0)