aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc
diff options
context:
space:
mode:
authorMarkus Pargmann <mpa@pengutronix.de>2014-01-27 07:03:06 -0500
committerMark Brown <broonie@linaro.org>2014-01-27 13:13:44 -0500
commit609e6025b8ed347c5eba54eb12357193e46dd34f (patch)
tree1c5864982f36bbd8fb3f8c4f8ccc271859617629 /sound/soc
parentb44aa40f875b06b1986a18251d601ee1832c4476 (diff)
ASoC: tlv320aic32x4: Fix MICPGA input configuration
Currently the Negative Terminal Input Routing Configuration is only set when there is a special routing configuration. If we don't use one of the inputs IN1 or IN2 as negative terminal input, the PGA and recording does not work. This patch adds a route from CM1L/CM1R to the PGA as negative input by default. With this configuration the PGA can amplify all input signals and line-in/mic works again. Signed-off-by: Markus Pargmann <mpa@pengutronix.de> Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'sound/soc')
-rw-r--r--sound/soc/codecs/tlv320aic32x4.c10
-rw-r--r--sound/soc/codecs/tlv320aic32x4.h2
2 files changed, 8 insertions, 4 deletions
diff --git a/sound/soc/codecs/tlv320aic32x4.c b/sound/soc/codecs/tlv320aic32x4.c
index ee9ad05f9137..688151ba309a 100644
--- a/sound/soc/codecs/tlv320aic32x4.c
+++ b/sound/soc/codecs/tlv320aic32x4.c
@@ -618,12 +618,14 @@ static int aic32x4_probe(struct snd_soc_codec *codec)
618 snd_soc_write(codec, AIC32X4_CMMODE, tmp_reg); 618 snd_soc_write(codec, AIC32X4_CMMODE, tmp_reg);
619 619
620 /* Mic PGA routing */ 620 /* Mic PGA routing */
621 if (aic32x4->micpga_routing & AIC32X4_MICPGA_ROUTE_LMIC_IN2R_10K) { 621 if (aic32x4->micpga_routing & AIC32X4_MICPGA_ROUTE_LMIC_IN2R_10K)
622 snd_soc_write(codec, AIC32X4_LMICPGANIN, AIC32X4_LMICPGANIN_IN2R_10K); 622 snd_soc_write(codec, AIC32X4_LMICPGANIN, AIC32X4_LMICPGANIN_IN2R_10K);
623 } 623 else
624 if (aic32x4->micpga_routing & AIC32X4_MICPGA_ROUTE_RMIC_IN1L_10K) { 624 snd_soc_write(codec, AIC32X4_LMICPGANIN, AIC32X4_LMICPGANIN_CM1L_10K);
625 if (aic32x4->micpga_routing & AIC32X4_MICPGA_ROUTE_RMIC_IN1L_10K)
625 snd_soc_write(codec, AIC32X4_RMICPGANIN, AIC32X4_RMICPGANIN_IN1L_10K); 626 snd_soc_write(codec, AIC32X4_RMICPGANIN, AIC32X4_RMICPGANIN_IN1L_10K);
626 } 627 else
628 snd_soc_write(codec, AIC32X4_RMICPGANIN, AIC32X4_RMICPGANIN_CM1R_10K);
627 629
628 aic32x4_set_bias_level(codec, SND_SOC_BIAS_STANDBY); 630 aic32x4_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
629 631
diff --git a/sound/soc/codecs/tlv320aic32x4.h b/sound/soc/codecs/tlv320aic32x4.h
index 83795af8c75f..995f033a855d 100644
--- a/sound/soc/codecs/tlv320aic32x4.h
+++ b/sound/soc/codecs/tlv320aic32x4.h
@@ -120,7 +120,9 @@
120#define AIC32X4_MICBIAS_2075V 0x60 120#define AIC32X4_MICBIAS_2075V 0x60
121 121
122#define AIC32X4_LMICPGANIN_IN2R_10K 0x10 122#define AIC32X4_LMICPGANIN_IN2R_10K 0x10
123#define AIC32X4_LMICPGANIN_CM1L_10K 0x40
123#define AIC32X4_RMICPGANIN_IN1L_10K 0x10 124#define AIC32X4_RMICPGANIN_IN1L_10K 0x10
125#define AIC32X4_RMICPGANIN_CM1R_10K 0x40
124 126
125#define AIC32X4_LMICPGAVOL_NOGAIN 0x80 127#define AIC32X4_LMICPGAVOL_NOGAIN 0x80
126#define AIC32X4_RMICPGAVOL_NOGAIN 0x80 128#define AIC32X4_RMICPGAVOL_NOGAIN 0x80