提交 1135ef11 编写于 作者: P Peter Ujfalusi 提交者: Mark Brown

ASoC: twl6040: Select LPPLL during standby

When the codec is in standby we do not need to keep the HPPLL active.
Signed-off-by: NPeter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: NMark Brown <broonie@kernel.org>
上级 f55532a0
...@@ -824,7 +824,7 @@ static int twl6040_set_bias_level(struct snd_soc_codec *codec, ...@@ -824,7 +824,7 @@ static int twl6040_set_bias_level(struct snd_soc_codec *codec,
{ {
struct twl6040 *twl6040 = codec->control_data; struct twl6040 *twl6040 = codec->control_data;
struct twl6040_data *priv = snd_soc_codec_get_drvdata(codec); struct twl6040_data *priv = snd_soc_codec_get_drvdata(codec);
int ret; int ret = 0;
switch (level) { switch (level) {
case SND_SOC_BIAS_ON: case SND_SOC_BIAS_ON:
...@@ -832,12 +832,16 @@ static int twl6040_set_bias_level(struct snd_soc_codec *codec, ...@@ -832,12 +832,16 @@ static int twl6040_set_bias_level(struct snd_soc_codec *codec,
case SND_SOC_BIAS_PREPARE: case SND_SOC_BIAS_PREPARE:
break; break;
case SND_SOC_BIAS_STANDBY: case SND_SOC_BIAS_STANDBY:
if (priv->codec_powered) if (priv->codec_powered) {
/* Select low power PLL in standby */
ret = twl6040_set_pll(twl6040, TWL6040_SYSCLK_SEL_LPPLL,
32768, 19200000);
break; break;
}
ret = twl6040_power(twl6040, 1); ret = twl6040_power(twl6040, 1);
if (ret) if (ret)
return ret; break;
priv->codec_powered = 1; priv->codec_powered = 1;
...@@ -853,7 +857,7 @@ static int twl6040_set_bias_level(struct snd_soc_codec *codec, ...@@ -853,7 +857,7 @@ static int twl6040_set_bias_level(struct snd_soc_codec *codec,
break; break;
} }
return 0; return ret;
} }
static int twl6040_startup(struct snd_pcm_substream *substream, static int twl6040_startup(struct snd_pcm_substream *substream,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册