summaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/tlv320aic32x4.c
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2020-09-21 23:37:14 +0200
committerMark Brown <broonie@kernel.org>2020-09-21 23:37:14 +0200
commit97ee967e6c56db6eb5ed5951276b9a6db04c6489 (patch)
tree9cc49cbcd56acd0a0b78be8788760550db02c421 /sound/soc/codecs/tlv320aic32x4.c
parentASoC: tas2562: Add the TAS2564 compatible (diff)
parentASoC: tlv320aic32x4: Enable fast charge (diff)
downloadlinux-97ee967e6c56db6eb5ed5951276b9a6db04c6489.tar.xz
linux-97ee967e6c56db6eb5ed5951276b9a6db04c6489.zip
Merge branch 'asoc-5.9' into asoc-5.10
Diffstat (limited to 'sound/soc/codecs/tlv320aic32x4.c')
-rw-r--r--sound/soc/codecs/tlv320aic32x4.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/sound/soc/codecs/tlv320aic32x4.c b/sound/soc/codecs/tlv320aic32x4.c
index 470dc0ef0359..9e3de9ded0ef 100644
--- a/sound/soc/codecs/tlv320aic32x4.c
+++ b/sound/soc/codecs/tlv320aic32x4.c
@@ -688,7 +688,7 @@ static int aic32x4_set_processing_blocks(struct snd_soc_component *component,
}
static int aic32x4_setup_clocks(struct snd_soc_component *component,
- unsigned int sample_rate, unsigned int channel,
+ unsigned int sample_rate, unsigned int channels,
unsigned int bit_depth)
{
u8 aosr;
@@ -777,8 +777,9 @@ static int aic32x4_setup_clocks(struct snd_soc_component *component,
dosr);
clk_set_rate(clocks[5].clk,
- sample_rate * channel *
+ sample_rate * channels *
bit_depth);
+
return 0;
}
}
@@ -1030,6 +1031,14 @@ static int aic32x4_component_probe(struct snd_soc_component *component)
AIC32X4_LADC_EN | AIC32X4_RADC_EN);
snd_soc_component_write(component, AIC32X4_ADCSETUP, tmp_reg);
+ /*
+ * Enable the fast charging feature and ensure the needed 40ms ellapsed
+ * before using the analog circuits.
+ */
+ snd_soc_component_write(component, AIC32X4_REFPOWERUP,
+ AIC32X4_REFPOWERUP_40MS);
+ msleep(40);
+
return 0;
}