From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Takashi Iwai <tiwai@suse.de>
Cc: alsa-devel@alsa-project.org,
Mark Brown <broonie@opensource.wolfsonmicro.com>
Subject: [PATCH 8/8] ASoC: Stop WM8903 SYSCLK when suspending
Date: Wed, 10 Dec 2008 20:01:15 +0000 [thread overview]
Message-ID: <1228939275-7768-8-git-send-email-broonie@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <1228939275-7768-7-git-send-email-broonie@opensource.wolfsonmicro.com>
This will save some additional power.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
---
sound/soc/codecs/wm8903.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/sound/soc/codecs/wm8903.c b/sound/soc/codecs/wm8903.c
index c80968f..bde7454 100644
--- a/sound/soc/codecs/wm8903.c
+++ b/sound/soc/codecs/wm8903.c
@@ -997,6 +997,9 @@ static int wm8903_set_bias_level(struct snd_soc_codec *codec,
case SND_SOC_BIAS_STANDBY:
if (codec->bias_level == SND_SOC_BIAS_OFF) {
+ wm8903_write(codec, WM8903_CLOCK_RATES_2,
+ WM8903_CLK_SYS_ENA);
+
wm8903_run_sequence(codec, 0);
wm8903_sync_reg_cache(codec, codec->reg_cache);
@@ -1027,6 +1030,9 @@ static int wm8903_set_bias_level(struct snd_soc_codec *codec,
case SND_SOC_BIAS_OFF:
wm8903_run_sequence(codec, 32);
+ reg = wm8903_read(codec, WM8903_CLOCK_RATES_2);
+ reg &= ~WM8903_CLK_SYS_ENA;
+ wm8903_write(codec, WM8903_CLOCK_RATES_2, reg);
break;
}
@@ -1619,9 +1625,6 @@ static int wm8903_i2c_probe(struct i2c_client *i2c,
wm8903_reset(codec);
- /* SYSCLK is required for pretty much anything */
- wm8903_write(codec, WM8903_CLOCK_RATES_2, WM8903_CLK_SYS_ENA);
-
/* power on device */
wm8903_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
--
1.5.6.5
next prev parent reply other threads:[~2008-12-10 20:01 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-10 19:58 [PATCH 0/8] ASoC updates Mark Brown
2008-12-10 20:01 ` [PATCH 1/8] ASoC: Work around warnings from some build environments Mark Brown
2008-12-10 20:01 ` [PATCH 2/8] ASoC: TWL4030: Add missing Carkit output Mark Brown
2008-12-10 20:01 ` [PATCH 3/8] ASoC: TWL4030: Small cleanup Mark Brown
2008-12-10 20:01 ` [PATCH 4/8] ASoC: TWL4030: Change the name for the DACs Mark Brown
2008-12-10 20:01 ` [PATCH 5/8] ASoC: Add codec registration API Mark Brown
2008-12-10 20:01 ` [PATCH 6/8] ASoC: Convert WM8900 to do more work at I2C probe time Mark Brown
2008-12-10 20:01 ` [PATCH 7/8] ASoC: Convert WM8903 driver to register " Mark Brown
2008-12-10 20:01 ` Mark Brown [this message]
2008-12-10 20:34 ` [PATCH 0/8] ASoC updates Takashi Iwai
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1228939275-7768-8-git-send-email-broonie@opensource.wolfsonmicro.com \
--to=broonie@opensource.wolfsonmicro.com \
--cc=alsa-devel@alsa-project.org \
--cc=tiwai@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox