aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/omap
diff options
context:
space:
mode:
authorPeter Ujfalusi <peter.ujfalusi@ti.com>2011-09-26 09:05:59 -0400
committerMark Brown <broonie@opensource.wolfsonmicro.com>2011-09-26 17:23:32 -0400
commit7bf3d92cdd61e2d47fc5ae403ee5bc598c757f29 (patch)
treea9c511ad9f64e26a5d76c40f4be6998fff559cfe /sound/soc/omap
parent89b0d550a6800793b917ce2290ddcd55374d7df6 (diff)
ASoC: sdp4430: Configure McPDM offset cancellation
Based on the values from twl6040 codec (HSOTRIM L/R) we can configure the McPDM offset cancellation. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/omap')
-rw-r--r--sound/soc/omap/sdp4430.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/sound/soc/omap/sdp4430.c b/sound/soc/omap/sdp4430.c
index 4200eb4b71a4..249d84b705fc 100644
--- a/sound/soc/omap/sdp4430.c
+++ b/sound/soc/omap/sdp4430.c
@@ -121,7 +121,7 @@ static int sdp4430_twl6040_init(struct snd_soc_pcm_runtime *rtd)
121{ 121{
122 struct snd_soc_codec *codec = rtd->codec; 122 struct snd_soc_codec *codec = rtd->codec;
123 struct snd_soc_dapm_context *dapm = &codec->dapm; 123 struct snd_soc_dapm_context *dapm = &codec->dapm;
124 int ret; 124 int ret, hs_trim;
125 125
126 /* Add SDP4430 specific widgets */ 126 /* Add SDP4430 specific widgets */
127 ret = snd_soc_dapm_new_controls(dapm, sdp4430_twl6040_dapm_widgets, 127 ret = snd_soc_dapm_new_controls(dapm, sdp4430_twl6040_dapm_widgets,
@@ -144,6 +144,14 @@ static int sdp4430_twl6040_init(struct snd_soc_pcm_runtime *rtd)
144 if (ret) 144 if (ret)
145 return ret; 145 return ret;
146 146
147 /*
148 * Configure McPDM offset cancellation based on the HSOTRIM value from
149 * twl6040.
150 */
151 hs_trim = twl6040_get_trim_value(codec, TWL6040_TRIM_HSOTRIM);
152 omap_mcpdm_configure_dn_offsets(rtd, TWL6040_HSF_TRIM_LEFT(hs_trim),
153 TWL6040_HSF_TRIM_RIGHT(hs_trim));
154
147 /* Headset jack detection */ 155 /* Headset jack detection */
148 ret = snd_soc_jack_new(codec, "Headset Jack", 156 ret = snd_soc_jack_new(codec, "Headset Jack",
149 SND_JACK_HEADSET, &hs_jack); 157 SND_JACK_HEADSET, &hs_jack);