diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2009-02-06 14:19:45 +0000 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2009-02-06 14:19:45 +0000 |
commit | e255265b475824fd5291df706093705ab677c29f (patch) | |
tree | 47388bb39a164a79096e0e5f371a350cbc2dc602 /sound/soc/codecs/tlv320aic3x.c | |
parent | 85ef2375ef2ebbb2bf660ad3a27c644d0ebf1b1a (diff) | |
parent | 397d5aeeb5a2c9ca6108899a04b35a51cd904503 (diff) |
Merge branch 'for-2.6.29' into for-2.6.30
Diffstat (limited to 'sound/soc/codecs/tlv320aic3x.c')
-rw-r--r-- | sound/soc/codecs/tlv320aic3x.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/sound/soc/codecs/tlv320aic3x.c b/sound/soc/codecs/tlv320aic3x.c index ba64b0c617e..ac73e692a99 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, struct snd_ctl_elem_value *ucontrol) { struct snd_soc_dapm_widget *widget = snd_kcontrol_chip(kcontrol); - int reg = kcontrol->private_value & 0xff; - int shift = (kcontrol->private_value >> 8) & 0x0f; - int mask = (kcontrol->private_value >> 16) & 0xff; - int invert = (kcontrol->private_value >> 24) & 0x01; + struct soc_mixer_control *mc = + (struct soc_mixer_control *)kcontrol->private_value; + unsigned int reg = mc->reg; + unsigned int shift = mc->shift; + int max = mc->max; + unsigned int mask = (1 << fls(max)) - 1; + unsigned int invert = mc->invert; unsigned short val, val_mask; int ret; struct snd_soc_dapm_path *path; |