提交 2c84afb5 编写于 作者: C Charles Keepax 提交者: Mark Brown

ASoC: cs35l35: Improve power down time

Shorten the time it takes to power down the amp by disabling the volume
ramp whilst doing the final shutdown. The driver has already muted the
amplifier at this stage so doing the volume ramp serves no purpose.
Signed-off-by: NCharles Keepax <ckeepax@opensource.wolfsonmicro.com>
Acked-by: NBrian Austin <brian.austin@cirrus.com>
Signed-off-by: NMark Brown <broonie@kernel.org>
上级 8e71321d
...@@ -187,6 +187,10 @@ static int cs35l35_sdin_event(struct snd_soc_dapm_widget *w, ...@@ -187,6 +187,10 @@ static int cs35l35_sdin_event(struct snd_soc_dapm_widget *w,
regmap_update_bits(cs35l35->regmap, CS35L35_PWRCTL1, regmap_update_bits(cs35l35->regmap, CS35L35_PWRCTL1,
CS35L35_PDN_ALL_MASK, 1); CS35L35_PDN_ALL_MASK, 1);
/* Already muted, so disable volume ramp for faster shutdown */
regmap_update_bits(cs35l35->regmap, CS35L35_AMP_DIG_VOL_CTL,
CS35L35_AMP_DIGSFT_MASK, 0);
reinit_completion(&cs35l35->pdn_done); reinit_completion(&cs35l35->pdn_done);
ret = wait_for_completion_timeout(&cs35l35->pdn_done, ret = wait_for_completion_timeout(&cs35l35->pdn_done,
...@@ -199,6 +203,10 @@ static int cs35l35_sdin_event(struct snd_soc_dapm_widget *w, ...@@ -199,6 +203,10 @@ static int cs35l35_sdin_event(struct snd_soc_dapm_widget *w,
regmap_update_bits(cs35l35->regmap, CS35L35_CLK_CTL1, regmap_update_bits(cs35l35->regmap, CS35L35_CLK_CTL1,
CS35L35_MCLK_DIS_MASK, CS35L35_MCLK_DIS_MASK,
1 << CS35L35_MCLK_DIS_SHIFT); 1 << CS35L35_MCLK_DIS_SHIFT);
regmap_update_bits(cs35l35->regmap, CS35L35_AMP_DIG_VOL_CTL,
CS35L35_AMP_DIGSFT_MASK,
1 << CS35L35_AMP_DIGSFT_SHIFT);
break; break;
default: default:
dev_err(codec->dev, "Invalid event = 0x%x\n", event); dev_err(codec->dev, "Invalid event = 0x%x\n", event);
......
...@@ -190,6 +190,9 @@ ...@@ -190,6 +190,9 @@
#define CS35L35_AMP_GAIN_ZC_MASK 0x10 #define CS35L35_AMP_GAIN_ZC_MASK 0x10
#define CS35L35_AMP_GAIN_ZC_SHIFT 4 #define CS35L35_AMP_GAIN_ZC_SHIFT 4
#define CS35L35_AMP_DIGSFT_MASK 0x02
#define CS35L35_AMP_DIGSFT_SHIFT 1
/* CS35L35_SP_FMT_CTL3 */ /* CS35L35_SP_FMT_CTL3 */
#define CS35L35_SP_I2S_DRV_MASK 0x03 #define CS35L35_SP_I2S_DRV_MASK 0x03
#define CS35L35_SP_I2S_DRV_SHIFT 0 #define CS35L35_SP_I2S_DRV_SHIFT 0
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册