aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorPeter Ujfalusi <peter.ujfalusi@nokia.com>2010-11-30 16:00:01 +0200
committerLiam Girdwood <lrg@slimlogic.co.uk>2010-11-30 15:39:39 +0000
commitd534bacd918fcf0909039b95db7c090702e739d5 (patch)
tree00c3587f44d23317462b4da91357ae05f7e61ab3 /sound
parentd5876ce1242b78987e6243ba3cb23bb61d44d4a9 (diff)
downloadkernel_samsung_smdk4412-d534bacd918fcf0909039b95db7c090702e739d5.zip
kernel_samsung_smdk4412-d534bacd918fcf0909039b95db7c090702e739d5.tar.gz
kernel_samsung_smdk4412-d534bacd918fcf0909039b95db7c090702e739d5.tar.bz2
ASoC: tpa6130a2: Defer SW enable from power enable
Do not enable the amplifier right after the power has been restored to the amplifier. The DAPM_SUPPLY widget turns on the amp early in the DAPM power walk, and the unmuting of channel happens quite late. Keeping the amp in SW reset state ensures better muting. In this way the pop noise coming from other components (codec) can be filtered out. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/codecs/tpa6130a2.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/sound/soc/codecs/tpa6130a2.c b/sound/soc/codecs/tpa6130a2.c
index 199edf0..42887ae 100644
--- a/sound/soc/codecs/tpa6130a2.c
+++ b/sound/soc/codecs/tpa6130a2.c
@@ -151,11 +151,6 @@ static int tpa6130a2_power(u8 power)
data->power_state = 0;
goto exit;
}
-
- /* Clear SWS */
- val = tpa6130a2_read(TPA6130A2_REG_CONTROL);
- val &= ~TPA6130A2_SWS;
- tpa6130a2_i2c_write(TPA6130A2_REG_CONTROL, val);
} else {
/* set SWS */
val = tpa6130a2_read(TPA6130A2_REG_CONTROL);
@@ -301,6 +296,7 @@ static void tpa6130a2_channel_enable(u8 channel, int enable)
/* Enable amplifier */
val = tpa6130a2_read(TPA6130A2_REG_CONTROL);
val |= channel;
+ val &= ~TPA6130A2_SWS;
tpa6130a2_i2c_write(TPA6130A2_REG_CONTROL, val);
/* Unmute channel */