All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] ASoC: tlv320aic3x: Add output driver pop reduction controls
@ 2014-11-10 10:27 Peter Ujfalusi
  2014-11-10 10:27 ` [PATCH 2/2] ASoC: tlv320aic3x: Add TDM support Peter Ujfalusi
  2014-11-10 10:51 ` [PATCH 1/2] ASoC: tlv320aic3x: Add output driver pop reduction controls Mark Brown
  0 siblings, 2 replies; 7+ messages in thread
From: Peter Ujfalusi @ 2014-11-10 10:27 UTC (permalink / raw)
  To: Mark Brown, Liam Girdwood; +Cc: Misael Lopez Cruz, alsa-devel

From: Misael Lopez Cruz <misael.lopez@ti.com>

Output driver has two parameters that can be configured to reduce
pop noise: power-on delay and ramp-up step time. Two new kcontrols
have been added to set these parameters.

Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
---
 sound/soc/codecs/tlv320aic3x.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/sound/soc/codecs/tlv320aic3x.c b/sound/soc/codecs/tlv320aic3x.c
index f7c2a575a892..70f8b8be9173 100644
--- a/sound/soc/codecs/tlv320aic3x.c
+++ b/sound/soc/codecs/tlv320aic3x.c
@@ -270,6 +270,15 @@ static const struct soc_enum aic3x_agc_decay_enum[] = {
 	SOC_ENUM_SINGLE(RAGC_CTRL_A, 0, 4, aic3x_agc_decay),
 };
 
+static const char * const aic3x_poweron_time[] = {
+	"0us", "10us", "100us", "1ms", "10ms", "50ms",
+	"100ms", "200ms", "400ms", "800ms", "2s", "4s" };
+static const char * const aic3x_rampup_step[] = { "0ms", "1ms", "2ms", "4ms" };
+static const struct soc_enum aic3x_pop_reduction_enum[] = {
+	SOC_ENUM_SINGLE(HPOUT_POP_REDUCTION, 4, 12, aic3x_poweron_time),
+	SOC_ENUM_SINGLE(HPOUT_POP_REDUCTION, 2, 4, aic3x_rampup_step),
+};
+
 /*
  * DAC digital volumes. From -63.5 to 0 dB in 0.5 dB steps
  */
@@ -399,6 +408,10 @@ static const struct snd_kcontrol_new aic3x_snd_controls[] = {
 	SOC_DOUBLE_R("PGA Capture Switch", LADC_VOL, RADC_VOL, 7, 0x01, 1),
 
 	SOC_ENUM("ADC HPF Cut-off", aic3x_enum[ADC_HPF_ENUM]),
+
+	/* Pop reduction */
+	SOC_ENUM("Output Driver Power-On time", aic3x_pop_reduction_enum[0]),
+	SOC_ENUM("Output Driver Ramp-up step", aic3x_pop_reduction_enum[1]),
 };
 
 static const struct snd_kcontrol_new aic3x_mono_controls[] = {
-- 
2.1.3

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2014-11-11  8:01 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-10 10:27 [PATCH 1/2] ASoC: tlv320aic3x: Add output driver pop reduction controls Peter Ujfalusi
2014-11-10 10:27 ` [PATCH 2/2] ASoC: tlv320aic3x: Add TDM support Peter Ujfalusi
2014-11-10 12:06   ` Mark Brown
2014-11-10 10:51 ` [PATCH 1/2] ASoC: tlv320aic3x: Add output driver pop reduction controls Mark Brown
2014-11-10 13:23   ` Peter Ujfalusi
2014-11-10 13:27     ` Mark Brown
2014-11-11  8:01       ` Peter Ujfalusi

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.