Skip to content

Commit

Permalink
Merge remote-tracking branches 'asoc/fix/wm8985', 'asoc/fix/wm8994', …
Browse files Browse the repository at this point in the history
…'asoc/fix/wm8996', 'asoc/fix/wm9081' and 'asoc/fix/wm9713' into asoc-linus
  • Loading branch information
Mark Brown committed Mar 5, 2016
6 parents b23229e + 251d604 + 8019c0b + 8293004 + 39a79fe + da9b930 commit 02db17f
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 15 deletions.
14 changes: 7 additions & 7 deletions sound/soc/codecs/wm8985.c
Original file line number Diff line number Diff line change
Expand Up @@ -531,9 +531,9 @@ static int eqmode_get(struct snd_kcontrol *kcontrol,

reg = snd_soc_read(codec, WM8985_EQ1_LOW_SHELF);
if (reg & WM8985_EQ3DMODE)
ucontrol->value.integer.value[0] = 1;
ucontrol->value.enumerated.item[0] = 1;
else
ucontrol->value.integer.value[0] = 0;
ucontrol->value.enumerated.item[0] = 0;

return 0;
}
Expand All @@ -545,18 +545,18 @@ static int eqmode_put(struct snd_kcontrol *kcontrol,
unsigned int regpwr2, regpwr3;
unsigned int reg_eq;

if (ucontrol->value.integer.value[0] != 0
&& ucontrol->value.integer.value[0] != 1)
if (ucontrol->value.enumerated.item[0] != 0
&& ucontrol->value.enumerated.item[0] != 1)
return -EINVAL;

reg_eq = snd_soc_read(codec, WM8985_EQ1_LOW_SHELF);
switch ((reg_eq & WM8985_EQ3DMODE) >> WM8985_EQ3DMODE_SHIFT) {
case 0:
if (!ucontrol->value.integer.value[0])
if (!ucontrol->value.enumerated.item[0])
return 0;
break;
case 1:
if (ucontrol->value.integer.value[0])
if (ucontrol->value.enumerated.item[0])
return 0;
break;
}
Expand All @@ -573,7 +573,7 @@ static int eqmode_put(struct snd_kcontrol *kcontrol,
/* set the desired eqmode */
snd_soc_update_bits(codec, WM8985_EQ1_LOW_SHELF,
WM8985_EQ3DMODE_MASK,
ucontrol->value.integer.value[0]
ucontrol->value.enumerated.item[0]
<< WM8985_EQ3DMODE_SHIFT);
/* restore DAC/ADC configuration */
snd_soc_write(codec, WM8985_POWER_MANAGEMENT_2, regpwr2);
Expand Down
4 changes: 2 additions & 2 deletions sound/soc/codecs/wm8994.c
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ static int wm8994_put_drc_enum(struct snd_kcontrol *kcontrol,
struct wm8994 *control = wm8994->wm8994;
struct wm8994_pdata *pdata = &control->pdata;
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)
return drc;
Expand Down Expand Up @@ -469,7 +469,7 @@ static int wm8994_put_retune_mobile_enum(struct snd_kcontrol *kcontrol,
struct wm8994 *control = wm8994->wm8994;
struct wm8994_pdata *pdata = &control->pdata;
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)
return block;
Expand Down
2 changes: 1 addition & 1 deletion sound/soc/codecs/wm8996.c
Original file line number Diff line number Diff line change
Expand Up @@ -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_pdata *pdata = &wm8996->pdata;
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)
return block;
Expand Down
8 changes: 4 additions & 4 deletions sound/soc/codecs/wm9081.c
Original file line number Diff line number Diff line change
Expand Up @@ -344,9 +344,9 @@ static int speaker_mode_get(struct snd_kcontrol *kcontrol,

reg = snd_soc_read(codec, WM9081_ANALOGUE_SPEAKER_2);
if (reg & WM9081_SPK_MODE)
ucontrol->value.integer.value[0] = 1;
ucontrol->value.enumerated.item[0] = 1;
else
ucontrol->value.integer.value[0] = 0;
ucontrol->value.enumerated.item[0] = 0;

return 0;
}
Expand All @@ -365,15 +365,15 @@ static int speaker_mode_put(struct snd_kcontrol *kcontrol,
unsigned int reg2 = snd_soc_read(codec, WM9081_ANALOGUE_SPEAKER_2);

/* Are we changing anything? */
if (ucontrol->value.integer.value[0] ==
if (ucontrol->value.enumerated.item[0] ==
((reg2 & WM9081_SPK_MODE) != 0))
return 0;

/* Don't try to change modes while enabled */
if (reg_pwr & WM9081_SPK_ENA)
return -EINVAL;

if (ucontrol->value.integer.value[0]) {
if (ucontrol->value.enumerated.item[0]) {
/* Class AB */
reg2 &= ~(WM9081_SPK_INV_MUTE | WM9081_OUT_SPK_CTRL);
reg2 |= WM9081_SPK_MODE;
Expand Down
2 changes: 1 addition & 1 deletion sound/soc/codecs/wm9713.c
Original file line number Diff line number Diff line change
Expand Up @@ -1212,7 +1212,7 @@ static int wm9713_soc_probe(struct snd_soc_codec *codec)
if (IS_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)) {
snd_soc_free_ac97_codec(wm9713->ac97);
return PTR_ERR(regmap);
Expand Down

0 comments on commit 02db17f

Please sign in to comment.