ASoC: dmic: Add optional wakeup delay
authorMatthias Kaehlcke <mka@chromium.org>
Fri, 16 Feb 2018 17:53:12 +0000 (09:53 -0800)
committerMark Brown <broonie@kernel.org>
Mon, 19 Feb 2018 12:16:41 +0000 (12:16 +0000)
commit05c9b302eda71083840392d74ce62dd1e1f30621
tree623d9880bea900d9f98e0f2571fabe91826e6237
parent6d6c3946d877adf1e73c6292f947bbb687452ed5
ASoC: dmic: Add optional wakeup delay

On some systems a delay is needed after switching on the clocks, to allow
the output to stabilize and avoid a popping noise at the beginning of
the recording. Add the optional device tree property 'wakeup-delay-ms'
and apply the specified delay after enabling the mic. A blocking delay
can't be applied in dmic_daiops_trigger() since the function is called
in atomic context. Instead use a DAPM event handler to set the enable
GPIO and apply the delay in the handler.

Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
Reviewed-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Documentation/devicetree/bindings/sound/dmic.txt
sound/soc/codecs/dmic.c