summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorAlan Tull <r80115@freescale.com>2009-11-24 16:20:38 -0600
committerAlan Tull <r80115@freescale.com>2009-11-25 10:34:29 -0600
commitb8450d20d2ae670981f6ce147bae3735a8a076b0 (patch)
tree53f22c38e15c0205fd4c5e0d677da2fc394c4516 /sound
parente87733b7bf097b8be587eaf736a7aec895a02e07 (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;
}