aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sound/soc/codecs/wm9081.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sound/soc/codecs/wm9081.c b/sound/soc/codecs/wm9081.c
index ccb3b15139ad..363b3b667616 100644
--- a/sound/soc/codecs/wm9081.c
+++ b/sound/soc/codecs/wm9081.c
@@ -344,9 +344,9 @@ static int speaker_mode_get(struct snd_kcontrol *kcontrol,
344 344
345 reg = snd_soc_read(codec, WM9081_ANALOGUE_SPEAKER_2); 345 reg = snd_soc_read(codec, WM9081_ANALOGUE_SPEAKER_2);
346 if (reg & WM9081_SPK_MODE) 346 if (reg & WM9081_SPK_MODE)
347 ucontrol->value.integer.value[0] = 1; 347 ucontrol->value.enumerated.item[0] = 1;
348 else 348 else
349 ucontrol->value.integer.value[0] = 0; 349 ucontrol->value.enumerated.item[0] = 0;
350 350
351 return 0; 351 return 0;
352} 352}
@@ -365,7 +365,7 @@ static int speaker_mode_put(struct snd_kcontrol *kcontrol,
365 unsigned int reg2 = snd_soc_read(codec, WM9081_ANALOGUE_SPEAKER_2); 365 unsigned int reg2 = snd_soc_read(codec, WM9081_ANALOGUE_SPEAKER_2);
366 366
367 /* Are we changing anything? */ 367 /* Are we changing anything? */
368 if (ucontrol->value.integer.value[0] == 368 if (ucontrol->value.enumerated.item[0] ==
369 ((reg2 & WM9081_SPK_MODE) != 0)) 369 ((reg2 & WM9081_SPK_MODE) != 0))
370 return 0; 370 return 0;
371 371
@@ -373,7 +373,7 @@ static int speaker_mode_put(struct snd_kcontrol *kcontrol,
373 if (reg_pwr & WM9081_SPK_ENA) 373 if (reg_pwr & WM9081_SPK_ENA)
374 return -EINVAL; 374 return -EINVAL;
375 375
376 if (ucontrol->value.integer.value[0]) { 376 if (ucontrol->value.enumerated.item[0]) {
377 /* Class AB */ 377 /* Class AB */
378 reg2 &= ~(WM9081_SPK_INV_MUTE | WM9081_OUT_SPK_CTRL); 378 reg2 &= ~(WM9081_SPK_INV_MUTE | WM9081_OUT_SPK_CTRL);
379 reg2 |= WM9081_SPK_MODE; 379 reg2 |= WM9081_SPK_MODE;