[PATCH 45/133] [Jaunty SRU] ARM.imx51 Freescale:ENGR00110748 SGTL5000: Shut down i2s sclk/lrclk after audio playback stops

Brad Figg brad.figg at canonical.com
Thu Jul 9 16:48:35 UTC 2009


From: Lionel.Xu <r63889 at freescale.com>

Sgtl5000 sclk/lrclk should only be turned on when audio playback is running in
i2s master mode. These clocks should be turned off after playback to save the
power.

Signed-off-by: Lionel Xu <r63889 at freescale.com>
Signed-off-by: Brad Figg <brad.figg at canonical.com>
---
 sound/soc/codecs/sgtl5000.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/sound/soc/codecs/sgtl5000.c b/sound/soc/codecs/sgtl5000.c
index 954784a..ed39df3 100644
--- a/sound/soc/codecs/sgtl5000.c
+++ b/sound/soc/codecs/sgtl5000.c
@@ -494,6 +494,10 @@ static void sgtl5000_pcm_shutdown(struct snd_pcm_substream *substream)
 	reg = sgtl5000_read(codec, SGTL5000_CHIP_DIG_POWER);
 	reg &= ~(SGTL5000_I2S_IN_POWERUP | SGTL5000_I2S_OUT_POWERUP);
 	sgtl5000_write(codec, SGTL5000_CHIP_DIG_POWER, reg);
+
+	reg = sgtl5000_read(codec, SGTL5000_CHIP_I2S_CTRL);
+	reg &= ~SGTL5000_I2S_MASTER;
+	sgtl5000_write(codec, SGTL5000_CHIP_I2S_CTRL, reg);
 }
 
 /*
-- 
1.6.0.4





More information about the kernel-team mailing list