summaryrefslogtreecommitdiff
path: root/sound/soc/codecs/rt5645.c
diff options
context:
space:
mode:
authorBard Liao <bardliao@realtek.com>2015-12-30 10:33:21 +0300
committerMark Brown <broonie@kernel.org>2015-12-30 19:35:07 +0300
commitca8457bb02d8ecddf7f49ab874127dd4df782b16 (patch)
tree079c9ffbcb089694455b7dbe5b98ecaaa01188a1 /sound/soc/codecs/rt5645.c
parent8005c49d9aea74d382f474ce11afbbc7d7130bec (diff)
downloadlinux-ca8457bb02d8ecddf7f49ab874127dd4df782b16.tar.xz
ASoC: rt5645: add sys clk detection
Add system clock detection to prevent output DC from SPO. Signed-off-by: Bard Liao <bardliao@realtek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/codecs/rt5645.c')
-rw-r--r--sound/soc/codecs/rt5645.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sound/soc/codecs/rt5645.c b/sound/soc/codecs/rt5645.c
index 28132375e427..61bbeac0c117 100644
--- a/sound/soc/codecs/rt5645.c
+++ b/sound/soc/codecs/rt5645.c
@@ -1646,9 +1646,13 @@ static int rt5645_spk_event(struct snd_soc_dapm_widget *w,
RT5645_PWR_CLS_D_L,
RT5645_PWR_CLS_D | RT5645_PWR_CLS_D_R |
RT5645_PWR_CLS_D_L);
+ snd_soc_update_bits(codec, RT5645_GEN_CTRL3,
+ RT5645_DET_CLK_MASK, RT5645_DET_CLK_MODE1);
break;
case SND_SOC_DAPM_PRE_PMD:
+ snd_soc_update_bits(codec, RT5645_GEN_CTRL3,
+ RT5645_DET_CLK_MASK, RT5645_DET_CLK_DIS);
snd_soc_write(codec, RT5645_EQ_CTRL2, 0);
snd_soc_update_bits(codec, RT5645_PWR_DIG1,
RT5645_PWR_CLS_D | RT5645_PWR_CLS_D_R |