From: Chris Fries Date: Tue, 11 Jan 2011 05:01:57 +0000 (-0600) Subject: [ARM] mfd: cpcap-audio: CPCAP CODEC Capture pop X-Git-Tag: firefly_0821_release~9834^2~178 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=9d91c8ebaf20a14cd2063b24a46ef561c3149187;p=firefly-linux-kernel-4.4.55.git [ARM] mfd: cpcap-audio: CPCAP CODEC Capture pop There appears to be a warm-up time for the CODEC to stabilize of 25 milliseconds (by measurement). Avoid noise at the start of audio capture by holding off the CODEC enable for this duration. Change-Id: I078af9272875cb77388fbbbd2796c4ba69301cb4 Signed-off-by: Iliyan Malchev --- diff --git a/drivers/mfd/cpcap-audio-core.c b/drivers/mfd/cpcap-audio-core.c index d7180f43bbea..599172728819 100644 --- a/drivers/mfd/cpcap-audio-core.c +++ b/drivers/mfd/cpcap-audio-core.c @@ -31,6 +31,7 @@ #include +#define CODEC_WARMUP_TIME_MS 25 #define SLEEP_ACTIVATE_POWER_DELAY_MS 2 #define STM_STDAC_ACTIVATE_RAMP_TIME 1 #define CLOCK_TREE_RESET_DELAY_MS 1 @@ -671,6 +672,8 @@ static void cpcap_audio_configure_codec(struct cpcap_audio_state *state, mdelay(CLOCK_TREE_RESET_DELAY_MS); } + /* Todo: Follow-up with STMicro about why this is needed */ + msleep(CODEC_WARMUP_TIME_MS); /* Clear old settings */ codec_changes.mask = codec_changes.value | prev_codec_data; prev_codec_data = codec_changes.value;