summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorAlan Tull <r80115@freescale.com>2009-11-24 16:20:38 -0600
committerAlejandro Gonzalez <alex.gonzalez@digi.com>2010-02-12 17:19:38 +0100
commit273323477e41bdef0cf9b884f9330998b7730999 (patch)
tree53f22c38e15c0205fd4c5e0d677da2fc394c4516 /sound
parent72ff5bc951c8fd98e8720966d0493a10a071e503 (diff)
ENGR00117456: fix dac_get_volsw
Fix shift direction. Don't return left channel value for both channels. Signed-off-by: Alan Tull <r80115@freescale.com>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/codecs/sgtl5000.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sound/soc/codecs/sgtl5000.c b/sound/soc/codecs/sgtl5000.c
index 9cc8756ccccd..1d5843e94bd0 100644
--- a/sound/soc/codecs/sgtl5000.c
+++ b/sound/soc/codecs/sgtl5000.c
@@ -317,8 +317,8 @@ static int dac_get_volsw(struct snd_kcontrol *kcontrol,
int reg, l, r;
reg = sgtl5000_read(codec, SGTL5000_CHIP_DAC_VOL);
- l = (reg & SGTL5000_DAC_VOL_LEFT_MASK) << SGTL5000_DAC_VOL_LEFT_SHIFT;
- r = (reg & SGTL5000_DAC_VOL_RIGHT_MASK) << SGTL5000_DAC_VOL_RIGHT_SHIFT;
+ l = (reg & SGTL5000_DAC_VOL_LEFT_MASK) >> SGTL5000_DAC_VOL_LEFT_SHIFT;
+ r = (reg & SGTL5000_DAC_VOL_RIGHT_MASK) >> SGTL5000_DAC_VOL_RIGHT_SHIFT;
l = l < 0x3c ? 0x3c : l;
l = l > 0xfc ? 0xfc : l;
r = r < 0x3c ? 0x3c : r;
@@ -327,7 +327,7 @@ static int dac_get_volsw(struct snd_kcontrol *kcontrol,
r = 0xfc - r;
ucontrol->value.integer.value[0] = l;
- ucontrol->value.integer.value[1] = l;
+ ucontrol->value.integer.value[1] = r;
return 0;
}