Browse Source

ASoC: tlv320aic3x: Add controls for selecting HP power down modes

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>
Peter Ujfalusi 9 years ago
parent
commit
a5df71f096
1 changed files with 10 additions and 0 deletions
  1. 10 0
      sound/soc/codecs/tlv320aic3x.c

+ 10 - 0
sound/soc/codecs/tlv320aic3x.c

@@ -307,6 +307,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,
 static SOC_ENUM_SINGLE_DECL(aic3x_rampup_step_enum, HPOUT_POP_REDUCTION, 2,
 			    aic3x_rampup_step);
 			    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
  * DAC digital volumes. From -63.5 to 0 dB in 0.5 dB steps
  */
  */
@@ -394,6 +401,9 @@ static const struct snd_kcontrol_new aic3x_snd_controls[] = {
 	SOC_DOUBLE_R("HPCOM Playback Switch", HPLCOM_CTRL, HPRCOM_CTRL, 3,
 	SOC_DOUBLE_R("HPCOM Playback Switch", HPLCOM_CTRL, HPRCOM_CTRL, 3,
 		     0x01, 0),
 		     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
 	 * Note: enable Automatic input Gain Controller with care. It can
 	 * adjust PGA to max value when ADC is on and will never go back.
 	 * adjust PGA to max value when ADC is on and will never go back.