diff options
author | Peter Ujfalusi <peter.ujfalusi@nokia.com> | 2009-10-28 04:57:05 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2009-10-28 06:04:21 -0400 |
commit | 2845fa13e5cbe708ece7fafe29c91f32c66e4f59 (patch) | |
tree | baa3650d6645594eb06f077c1a1e74f9456dc2ab /sound/soc/codecs/twl4030.c | |
parent | 78e08e2f209e5e7777e81919d32cfcddad126cfa (diff) |
ASoC: TWL4030: Change codec_muted to apll_enabled
codec_muted is missleading, change it to apll_enabled,
which is what it is doing: enabing and disabling the APLL.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/codecs/twl4030.c')
-rw-r--r-- | sound/soc/codecs/twl4030.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/sound/soc/codecs/twl4030.c b/sound/soc/codecs/twl4030.c index 24002269f03a..9163713a0307 100644 --- a/sound/soc/codecs/twl4030.c +++ b/sound/soc/codecs/twl4030.c | |||
@@ -123,7 +123,7 @@ struct twl4030_priv { | |||
123 | struct snd_soc_codec codec; | 123 | struct snd_soc_codec codec; |
124 | 124 | ||
125 | unsigned int codec_powered; | 125 | unsigned int codec_powered; |
126 | unsigned int codec_muted; | 126 | unsigned int apll_enabled; |
127 | 127 | ||
128 | struct snd_pcm_substream *master_substream; | 128 | struct snd_pcm_substream *master_substream; |
129 | struct snd_pcm_substream *slave_substream; | 129 | struct snd_pcm_substream *slave_substream; |
@@ -218,25 +218,25 @@ static void twl4030_init_chip(struct snd_soc_codec *codec) | |||
218 | 218 | ||
219 | } | 219 | } |
220 | 220 | ||
221 | static void twl4030_codec_mute(struct snd_soc_codec *codec, int mute) | 221 | static void twl4030_apll_enable(struct snd_soc_codec *codec, int enable) |
222 | { | 222 | { |
223 | struct twl4030_priv *twl4030 = codec->private_data; | 223 | struct twl4030_priv *twl4030 = codec->private_data; |
224 | int status; | 224 | int status; |
225 | 225 | ||
226 | if (mute == twl4030->codec_muted) | 226 | if (enable == twl4030->apll_enabled) |
227 | return; | 227 | return; |
228 | 228 | ||
229 | if (mute) | 229 | if (enable) |
230 | /* Disable PLL */ | ||
231 | status = twl4030_codec_disable_resource(TWL4030_CODEC_RES_APLL); | ||
232 | else | ||
233 | /* Enable PLL */ | 230 | /* Enable PLL */ |
234 | status = twl4030_codec_enable_resource(TWL4030_CODEC_RES_APLL); | 231 | status = twl4030_codec_enable_resource(TWL4030_CODEC_RES_APLL); |
232 | else | ||
233 | /* Disable PLL */ | ||
234 | status = twl4030_codec_disable_resource(TWL4030_CODEC_RES_APLL); | ||
235 | 235 | ||
236 | if (status >= 0) | 236 | if (status >= 0) |
237 | twl4030_write_reg_cache(codec, TWL4030_REG_APLL_CTL, status); | 237 | twl4030_write_reg_cache(codec, TWL4030_REG_APLL_CTL, status); |
238 | 238 | ||
239 | twl4030->codec_muted = mute; | 239 | twl4030->apll_enabled = enable; |
240 | } | 240 | } |
241 | 241 | ||
242 | static void twl4030_power_up(struct snd_soc_codec *codec) | 242 | static void twl4030_power_up(struct snd_soc_codec *codec) |
@@ -1464,14 +1464,14 @@ static int twl4030_set_bias_level(struct snd_soc_codec *codec, | |||
1464 | { | 1464 | { |
1465 | switch (level) { | 1465 | switch (level) { |
1466 | case SND_SOC_BIAS_ON: | 1466 | case SND_SOC_BIAS_ON: |
1467 | twl4030_codec_mute(codec, 0); | 1467 | twl4030_apll_enable(codec, 1); |
1468 | break; | 1468 | break; |
1469 | case SND_SOC_BIAS_PREPARE: | 1469 | case SND_SOC_BIAS_PREPARE: |
1470 | break; | 1470 | break; |
1471 | case SND_SOC_BIAS_STANDBY: | 1471 | case SND_SOC_BIAS_STANDBY: |
1472 | if (codec->bias_level == SND_SOC_BIAS_OFF) | 1472 | if (codec->bias_level == SND_SOC_BIAS_OFF) |
1473 | twl4030_power_up(codec); | 1473 | twl4030_power_up(codec); |
1474 | twl4030_codec_mute(codec, 1); | 1474 | twl4030_apll_enable(codec, 0); |
1475 | break; | 1475 | break; |
1476 | case SND_SOC_BIAS_OFF: | 1476 | case SND_SOC_BIAS_OFF: |
1477 | twl4030_power_down(codec); | 1477 | twl4030_power_down(codec); |