[pkg-fso-commits] [SCM] linux-2.6-openmoko, the Linux 2.6 kernel tree from Openmoko branch, andy-tracking, updated. upstream/20090303.gitb9de904e-144-gd7ac922

Nelson Castillo arhuaco at freaks-unidos.net
Thu Jun 11 09:55:14 UTC 2009


The following commit has been merged in the andy-tracking branch:
commit e6c028cdcc8c3baf5bcd053f4c37fa49bad6cf60
Author: Paul Fertser <fercerpav at gmail.com>
Date:   Wed Jun 10 15:39:38 2009 +0400

    gta01: 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 at pyneo.org>
    Signed-off-by: Paul Fertser <fercerpav at gmail.com>

diff --git a/sound/soc/s3c24xx/neo1973_wm8753.c b/sound/soc/s3c24xx/neo1973_wm8753.c
index 2970305..3f170cb 100644
--- a/sound/soc/s3c24xx/neo1973_wm8753.c
+++ b/sound/soc/s3c24xx/neo1973_wm8753.c
@@ -353,9 +353,11 @@ static void lm4857_write_regs(void)
 static int lm4857_get_reg(struct snd_kcontrol *kcontrol,
 	struct snd_ctl_elem_value *ucontrol)
 {
-	int reg = kcontrol->private_value & 0xFF;
-	int shift = (kcontrol->private_value >> 8) & 0x0F;
-	int mask = (kcontrol->private_value >> 16) & 0xFF;
+	struct soc_mixer_control *mc =
+		(struct soc_mixer_control *)kcontrol->private_value;
+	int reg = mc->reg;
+	int shift = mc->shift;
+	int mask = mc->max;
 
 	DBG("Entered %s\n", __func__);
 
@@ -366,9 +368,11 @@ static int lm4857_get_reg(struct snd_kcontrol *kcontrol,
 static int lm4857_set_reg(struct snd_kcontrol *kcontrol,
 	struct snd_ctl_elem_value *ucontrol)
 {
-	int reg = kcontrol->private_value & 0xFF;
-	int shift = (kcontrol->private_value >> 8) & 0x0F;
-	int mask = (kcontrol->private_value >> 16) & 0xFF;
+	struct soc_mixer_control *mc =
+		(struct soc_mixer_control *)kcontrol->private_value;
+	int reg = mc->reg;
+	int shift = mc->shift;
+	int mask = mc->max;
 
 	if (((lm4857_regs[reg] >> shift) & mask) ==
 		ucontrol->value.integer.value[0])

-- 
linux-2.6-openmoko, the Linux 2.6 kernel tree from Openmoko



More information about the pkg-fso-commits mailing list