aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sound/soc/codecs/tlv320aic3x.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/sound/soc/codecs/tlv320aic3x.c b/sound/soc/codecs/tlv320aic3x.c
index b47a749c5ea2..aea0cb72d80a 100644
--- a/sound/soc/codecs/tlv320aic3x.c
+++ b/sound/soc/codecs/tlv320aic3x.c
@@ -165,10 +165,13 @@ static int snd_soc_dapm_put_volsw_aic3x(struct snd_kcontrol *kcontrol,
165 struct snd_ctl_elem_value *ucontrol) 165 struct snd_ctl_elem_value *ucontrol)
166{ 166{
167 struct snd_soc_dapm_widget *widget = snd_kcontrol_chip(kcontrol); 167 struct snd_soc_dapm_widget *widget = snd_kcontrol_chip(kcontrol);
168 int reg = kcontrol->private_value & 0xff; 168 struct soc_mixer_control *mc =
169 int shift = (kcontrol->private_value >> 8) & 0x0f; 169 (struct soc_mixer_control *)kcontrol->private_value;
170 int mask = (kcontrol->private_value >> 16) & 0xff; 170 unsigned int reg = mc->reg;
171 int invert = (kcontrol->private_value >> 24) & 0x01; 171 unsigned int shift = mc->shift;
172 int max = mc->max;
173 unsigned int mask = (1 << fls(max)) - 1;
174 unsigned int invert = mc->invert;
172 unsigned short val, val_mask; 175 unsigned short val, val_mask;
173 int ret; 176 int ret;
174 struct snd_soc_dapm_path *path; 177 struct snd_soc_dapm_path *path;