Commit 02db17ff authored by Mark Brown's avatar Mark Brown

Merge remote-tracking branches 'asoc/fix/wm8985', 'asoc/fix/wm8994',...

Merge remote-tracking branches 'asoc/fix/wm8985', 'asoc/fix/wm8994', 'asoc/fix/wm8996', 'asoc/fix/wm9081' and 'asoc/fix/wm9713' into asoc-linus
...@@ -531,9 +531,9 @@ static int eqmode_get(struct snd_kcontrol *kcontrol, ...@@ -531,9 +531,9 @@ static int eqmode_get(struct snd_kcontrol *kcontrol,
reg = snd_soc_read(codec, WM8985_EQ1_LOW_SHELF); reg = snd_soc_read(codec, WM8985_EQ1_LOW_SHELF);
if (reg & WM8985_EQ3DMODE) if (reg & WM8985_EQ3DMODE)
ucontrol->value.integer.value[0] = 1; ucontrol->value.enumerated.item[0] = 1;
else else
ucontrol->value.integer.value[0] = 0; ucontrol->value.enumerated.item[0] = 0;
return 0; return 0;
} }
...@@ -545,18 +545,18 @@ static int eqmode_put(struct snd_kcontrol *kcontrol, ...@@ -545,18 +545,18 @@ static int eqmode_put(struct snd_kcontrol *kcontrol,
unsigned int regpwr2, regpwr3; unsigned int regpwr2, regpwr3;
unsigned int reg_eq; unsigned int reg_eq;
if (ucontrol->value.integer.value[0] != 0 if (ucontrol->value.enumerated.item[0] != 0
&& ucontrol->value.integer.value[0] != 1) && ucontrol->value.enumerated.item[0] != 1)
return -EINVAL; return -EINVAL;
reg_eq = snd_soc_read(codec, WM8985_EQ1_LOW_SHELF); reg_eq = snd_soc_read(codec, WM8985_EQ1_LOW_SHELF);
switch ((reg_eq & WM8985_EQ3DMODE) >> WM8985_EQ3DMODE_SHIFT) { switch ((reg_eq & WM8985_EQ3DMODE) >> WM8985_EQ3DMODE_SHIFT) {
case 0: case 0:
if (!ucontrol->value.integer.value[0]) if (!ucontrol->value.enumerated.item[0])
return 0; return 0;
break; break;
case 1: case 1:
if (ucontrol->value.integer.value[0]) if (ucontrol->value.enumerated.item[0])
return 0; return 0;
break; break;
} }
...@@ -573,7 +573,7 @@ static int eqmode_put(struct snd_kcontrol *kcontrol, ...@@ -573,7 +573,7 @@ static int eqmode_put(struct snd_kcontrol *kcontrol,
/* set the desired eqmode */ /* set the desired eqmode */
snd_soc_update_bits(codec, WM8985_EQ1_LOW_SHELF, snd_soc_update_bits(codec, WM8985_EQ1_LOW_SHELF,
WM8985_EQ3DMODE_MASK, WM8985_EQ3DMODE_MASK,
ucontrol->value.integer.value[0] ucontrol->value.enumerated.item[0]
<< WM8985_EQ3DMODE_SHIFT); << WM8985_EQ3DMODE_SHIFT);
/* restore DAC/ADC configuration */ /* restore DAC/ADC configuration */
snd_soc_write(codec, WM8985_POWER_MANAGEMENT_2, regpwr2); snd_soc_write(codec, WM8985_POWER_MANAGEMENT_2, regpwr2);
......
...@@ -362,7 +362,7 @@ static int wm8994_put_drc_enum(struct snd_kcontrol *kcontrol, ...@@ -362,7 +362,7 @@ static int wm8994_put_drc_enum(struct snd_kcontrol *kcontrol,
struct wm8994 *control = wm8994->wm8994; struct wm8994 *control = wm8994->wm8994;
struct wm8994_pdata *pdata = &control->pdata; struct wm8994_pdata *pdata = &control->pdata;
int drc = wm8994_get_drc(kcontrol->id.name); int drc = wm8994_get_drc(kcontrol->id.name);
int value = ucontrol->value.integer.value[0]; int value = ucontrol->value.enumerated.item[0];
if (drc < 0) if (drc < 0)
return drc; return drc;
...@@ -469,7 +469,7 @@ static int wm8994_put_retune_mobile_enum(struct snd_kcontrol *kcontrol, ...@@ -469,7 +469,7 @@ static int wm8994_put_retune_mobile_enum(struct snd_kcontrol *kcontrol,
struct wm8994 *control = wm8994->wm8994; struct wm8994 *control = wm8994->wm8994;
struct wm8994_pdata *pdata = &control->pdata; struct wm8994_pdata *pdata = &control->pdata;
int block = wm8994_get_retune_mobile_block(kcontrol->id.name); int block = wm8994_get_retune_mobile_block(kcontrol->id.name);
int value = ucontrol->value.integer.value[0]; int value = ucontrol->value.enumerated.item[0];
if (block < 0) if (block < 0)
return block; return block;
......
...@@ -416,7 +416,7 @@ static int wm8996_put_retune_mobile_enum(struct snd_kcontrol *kcontrol, ...@@ -416,7 +416,7 @@ static int wm8996_put_retune_mobile_enum(struct snd_kcontrol *kcontrol,
struct wm8996_priv *wm8996 = snd_soc_codec_get_drvdata(codec); struct wm8996_priv *wm8996 = snd_soc_codec_get_drvdata(codec);
struct wm8996_pdata *pdata = &wm8996->pdata; struct wm8996_pdata *pdata = &wm8996->pdata;
int block = wm8996_get_retune_mobile_block(kcontrol->id.name); int block = wm8996_get_retune_mobile_block(kcontrol->id.name);
int value = ucontrol->value.integer.value[0]; int value = ucontrol->value.enumerated.item[0];
if (block < 0) if (block < 0)
return block; return block;
......
...@@ -344,9 +344,9 @@ static int speaker_mode_get(struct snd_kcontrol *kcontrol, ...@@ -344,9 +344,9 @@ static int speaker_mode_get(struct snd_kcontrol *kcontrol,
reg = snd_soc_read(codec, WM9081_ANALOGUE_SPEAKER_2); reg = snd_soc_read(codec, WM9081_ANALOGUE_SPEAKER_2);
if (reg & WM9081_SPK_MODE) if (reg & WM9081_SPK_MODE)
ucontrol->value.integer.value[0] = 1; ucontrol->value.enumerated.item[0] = 1;
else else
ucontrol->value.integer.value[0] = 0; ucontrol->value.enumerated.item[0] = 0;
return 0; return 0;
} }
...@@ -365,7 +365,7 @@ static int speaker_mode_put(struct snd_kcontrol *kcontrol, ...@@ -365,7 +365,7 @@ static int speaker_mode_put(struct snd_kcontrol *kcontrol,
unsigned int reg2 = snd_soc_read(codec, WM9081_ANALOGUE_SPEAKER_2); unsigned int reg2 = snd_soc_read(codec, WM9081_ANALOGUE_SPEAKER_2);
/* Are we changing anything? */ /* Are we changing anything? */
if (ucontrol->value.integer.value[0] == if (ucontrol->value.enumerated.item[0] ==
((reg2 & WM9081_SPK_MODE) != 0)) ((reg2 & WM9081_SPK_MODE) != 0))
return 0; return 0;
...@@ -373,7 +373,7 @@ static int speaker_mode_put(struct snd_kcontrol *kcontrol, ...@@ -373,7 +373,7 @@ static int speaker_mode_put(struct snd_kcontrol *kcontrol,
if (reg_pwr & WM9081_SPK_ENA) if (reg_pwr & WM9081_SPK_ENA)
return -EINVAL; return -EINVAL;
if (ucontrol->value.integer.value[0]) { if (ucontrol->value.enumerated.item[0]) {
/* Class AB */ /* Class AB */
reg2 &= ~(WM9081_SPK_INV_MUTE | WM9081_OUT_SPK_CTRL); reg2 &= ~(WM9081_SPK_INV_MUTE | WM9081_OUT_SPK_CTRL);
reg2 |= WM9081_SPK_MODE; reg2 |= WM9081_SPK_MODE;
......
...@@ -1212,7 +1212,7 @@ static int wm9713_soc_probe(struct snd_soc_codec *codec) ...@@ -1212,7 +1212,7 @@ static int wm9713_soc_probe(struct snd_soc_codec *codec)
if (IS_ERR(wm9713->ac97)) if (IS_ERR(wm9713->ac97))
return PTR_ERR(wm9713->ac97); return PTR_ERR(wm9713->ac97);
regmap = devm_regmap_init_ac97(wm9713->ac97, &wm9713_regmap_config); regmap = regmap_init_ac97(wm9713->ac97, &wm9713_regmap_config);
if (IS_ERR(regmap)) { if (IS_ERR(regmap)) {
snd_soc_free_ac97_codec(wm9713->ac97); snd_soc_free_ac97_codec(wm9713->ac97);
return PTR_ERR(regmap); return PTR_ERR(regmap);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment