All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Ujfalusi <peter.ujfalusi@ti.com>
To: Mark Brown <broonie@kernel.org>, Liam Girdwood <lgirdwood@gmail.com>
Cc: alsa-devel@alsa-project.org, jarkko.nikula@bitmer.com, jsarha@ti.com
Subject: [PATCH 3/3] ASoC: tlv320aic3x: Add controls for selecting HP power down modes
Date: Fri, 23 Dec 2016 11:21:12 +0200	[thread overview]
Message-ID: <20161223092112.7992-4-peter.ujfalusi@ti.com> (raw)
In-Reply-To: <20161223092112.7992-1-peter.ujfalusi@ti.com>

When the HP drivers are powered down, their output can be placed in
high-impedance state or it can be weakly driven to the VCM level.
High-impedance mode provides better power saving in the expense of pop
noise when powering up the HP.
When the output is driven to VCM level the artifacts can be minimized, but
the power down power consumption will be slightly higher.

The patch adds way to select the HPL/R power-down mode.

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

diff --git a/sound/soc/codecs/tlv320aic3x.c b/sound/soc/codecs/tlv320aic3x.c
index bc220f83dd1f..3e66dedeafac 100644
--- a/sound/soc/codecs/tlv320aic3x.c
+++ b/sound/soc/codecs/tlv320aic3x.c
@@ -305,6 +305,13 @@ static const char * const aic3x_rampup_step[] = { "0ms", "1ms", "2ms", "4ms" };
 static SOC_ENUM_SINGLE_DECL(aic3x_rampup_step_enum, HPOUT_POP_REDUCTION, 2,
 			    aic3x_rampup_step);
 
+static const char * const aic3x_output_pdown_mode[] = {
+	"Drive to a common-mode", "High-impedance mode"};
+static SOC_ENUM_SINGLE_DECL(aic3x_hpl_pdown_mode_enum, HPLOUT_CTRL, 2,
+			    aic3x_output_pdown_mode);
+static SOC_ENUM_SINGLE_DECL(aic3x_hpr_pdown_mode_enum, HPROUT_CTRL, 2,
+			    aic3x_output_pdown_mode);
+
 /*
  * DAC digital volumes. From -63.5 to 0 dB in 0.5 dB steps
  */
@@ -392,6 +399,9 @@ static const struct snd_kcontrol_new aic3x_snd_controls[] = {
 	SOC_DOUBLE_R("HPCOM Playback Switch", HPLCOM_CTRL, HPRCOM_CTRL, 3,
 		     0x01, 0),
 
+	SOC_ENUM("Left HP Power Down mode", aic3x_hpl_pdown_mode_enum),
+	SOC_ENUM("Right HP Power Down mode", aic3x_hpr_pdown_mode_enum),
+
 	/*
 	 * Note: enable Automatic input Gain Controller with care. It can
 	 * adjust PGA to max value when ADC is on and will never go back.
-- 
2.11.0

  parent reply	other threads:[~2016-12-23  9:21 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-23  9:21 [PATCH 0/3] ASoC: tlv320aic3x: Pop noise reductions Peter Ujfalusi
2016-12-23  9:21 ` [PATCH 1/3] ASoC: tlv320aic3x: Mark the RESET register as volatile Peter Ujfalusi
2016-12-23 18:27   ` Jarkko Nikula
2017-01-02 11:51     ` Peter Ujfalusi
2016-12-31 19:19   ` Applied "ASoC: tlv320aic3x: Mark the RESET register as volatile" to the asoc tree Mark Brown
2016-12-23  9:21 ` [PATCH 2/3] ASoC: tlv320aic3x: Add delay after power on and register sync Peter Ujfalusi
2016-12-31 19:19   ` Applied "ASoC: tlv320aic3x: Add delay after power on and register sync" to the asoc tree Mark Brown
2016-12-23  9:21 ` Peter Ujfalusi [this message]
2016-12-23 18:47   ` [PATCH 3/3] ASoC: tlv320aic3x: Add controls for selecting HP power down modes Jarkko Nikula
2016-12-31 18:49     ` Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20161223092112.7992-4-peter.ujfalusi@ti.com \
    --to=peter.ujfalusi@ti.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=jarkko.nikula@bitmer.com \
    --cc=jsarha@ti.com \
    --cc=lgirdwood@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.