From 9720d21c887d8967935cf5ff52b393e850f4e964 Mon Sep 17 00:00:00 2001 From: Peter Ujfalusi Date: Mon, 26 Sep 2011 16:05:59 +0300 Subject: [PATCH] --- yaml --- r: 270671 b: refs/heads/master c: 7bf3d92cdd61e2d47fc5ae403ee5bc598c757f29 h: refs/heads/master i: 270669: 9f142dd54cdf0cea13578956a071d2524174546c 270667: 14755a9b0fad9fb969d71e430a7abe5b9e4bc572 270663: 8a405a4e4e26657a1977c50319560aefd1af0dc1 270655: 0da7848df50f80fc34c9991adf7ed576792032bf v: v3 --- [refs] | 2 +- trunk/sound/soc/omap/sdp4430.c | 10 +++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index 619cc341af26..e72460be6a77 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 89b0d550a6800793b917ce2290ddcd55374d7df6 +refs/heads/master: 7bf3d92cdd61e2d47fc5ae403ee5bc598c757f29 diff --git a/trunk/sound/soc/omap/sdp4430.c b/trunk/sound/soc/omap/sdp4430.c index 4200eb4b71a4..249d84b705fc 100644 --- a/trunk/sound/soc/omap/sdp4430.c +++ b/trunk/sound/soc/omap/sdp4430.c @@ -121,7 +121,7 @@ static int sdp4430_twl6040_init(struct snd_soc_pcm_runtime *rtd) { struct snd_soc_codec *codec = rtd->codec; struct snd_soc_dapm_context *dapm = &codec->dapm; - int ret; + int ret, hs_trim; /* Add SDP4430 specific widgets */ 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) if (ret) return ret; + /* + * Configure McPDM offset cancellation based on the HSOTRIM value from + * twl6040. + */ + hs_trim = twl6040_get_trim_value(codec, TWL6040_TRIM_HSOTRIM); + omap_mcpdm_configure_dn_offsets(rtd, TWL6040_HSF_TRIM_LEFT(hs_trim), + TWL6040_HSF_TRIM_RIGHT(hs_trim)); + /* Headset jack detection */ ret = snd_soc_jack_new(codec, "Headset Jack", SND_JACK_HEADSET, &hs_jack);