mirror of
https://github.com/torvalds/linux.git
synced 2024-11-10 22:21:40 +00:00
Merge remote-tracking branches 'asoc/fix/wm8985', 'asoc/fix/wm8994', 'asoc/fix/wm8996', 'asoc/fix/wm9081' and 'asoc/fix/wm9713' into asoc-linus
This commit is contained in:
commit
02db17ff37
@ -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;
|
||||
}
|
||||
@ -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;
|
||||
}
|
||||
@ -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);
|
||||
|
@ -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;
|
||||
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
}
|
||||
@ -365,7 +365,7 @@ 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;
|
||||
|
||||
@ -373,7 +373,7 @@ static int speaker_mode_put(struct snd_kcontrol *kcontrol,
|
||||
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;
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user