diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2009-06-10 08:55:34 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2009-06-10 08:55:34 -0400 |
commit | 236e6723bedb483b2ebf73ada01e2c853c5cac01 (patch) | |
tree | 40eda80565fe140f10053c0924d721dad1dce63b /sound | |
parent | 74b8f955a73d20b1e22403fd1ef85834fbf38d98 (diff) |
ASoC: Fix lm4857 control
Commit 4eaa9819dc08d7bfd1065ce530e31b18a119dcaf changed semantics of
private_value member of kcontrol. This resulted in inability to control
amplifier and subsequently in very low output volume.
Tested-by: Johannes Schauer <josch@pyneo.org>
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/s3c24xx/neo1973_wm8753.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/sound/soc/s3c24xx/neo1973_wm8753.c b/sound/soc/s3c24xx/neo1973_wm8753.c index 289fadf60b10..906709e6dd5f 100644 --- a/sound/soc/s3c24xx/neo1973_wm8753.c +++ b/sound/soc/s3c24xx/neo1973_wm8753.c | |||
@@ -345,9 +345,11 @@ static void lm4857_write_regs(void) | |||
345 | static int lm4857_get_reg(struct snd_kcontrol *kcontrol, | 345 | static int lm4857_get_reg(struct snd_kcontrol *kcontrol, |
346 | struct snd_ctl_elem_value *ucontrol) | 346 | struct snd_ctl_elem_value *ucontrol) |
347 | { | 347 | { |
348 | int reg = kcontrol->private_value & 0xFF; | 348 | struct soc_mixer_control *mc = |
349 | int shift = (kcontrol->private_value >> 8) & 0x0F; | 349 | (struct soc_mixer_control *)kcontrol->private_value; |
350 | int mask = (kcontrol->private_value >> 16) & 0xFF; | 350 | int reg = mc->reg; |
351 | int shift = mc->shift; | ||
352 | int mask = mc->max; | ||
351 | 353 | ||
352 | pr_debug("Entered %s\n", __func__); | 354 | pr_debug("Entered %s\n", __func__); |
353 | 355 | ||
@@ -358,9 +360,11 @@ static int lm4857_get_reg(struct snd_kcontrol *kcontrol, | |||
358 | static int lm4857_set_reg(struct snd_kcontrol *kcontrol, | 360 | static int lm4857_set_reg(struct snd_kcontrol *kcontrol, |
359 | struct snd_ctl_elem_value *ucontrol) | 361 | struct snd_ctl_elem_value *ucontrol) |
360 | { | 362 | { |
361 | int reg = kcontrol->private_value & 0xFF; | 363 | struct soc_mixer_control *mc = |
362 | int shift = (kcontrol->private_value >> 8) & 0x0F; | 364 | (struct soc_mixer_control *)kcontrol->private_value; |
363 | int mask = (kcontrol->private_value >> 16) & 0xFF; | 365 | int reg = mc->reg; |
366 | int shift = mc->shift; | ||
367 | int mask = mc->max; | ||
364 | 368 | ||
365 | if (((lm4857_regs[reg] >> shift) & mask) == | 369 | if (((lm4857_regs[reg] >> shift) & mask) == |
366 | ucontrol->value.integer.value[0]) | 370 | ucontrol->value.integer.value[0]) |