ASoC: codec: tlv3204: Moving GPIO reset and add ADC reset
authorMichael Sit Wei Hong <michael.wei.hong.sit@intel.com>
Wed, 12 Aug 2020 09:46:31 +0000 (17:46 +0800)
committerMark Brown <broonie@kernel.org>
Mon, 17 Aug 2020 15:36:24 +0000 (16:36 +0100)
commit9d4befff5a959e5f2f94357b3554a6929f596e15
tree0087aec97cec83ece3895e8dea7bd5e803393e23
parentd1c859d314d87c6f4dc09c3d7cf6f3ec9f44bcc5
ASoC: codec: tlv3204: Moving GPIO reset and add ADC reset

Moving GPIO reset to a later stage and before clock registration to
ensure that the host system and codec clocks are in sync. If the host
register clock values prior to gpio reset, the last configured codec clock
is registered to the host. The codec then gets gpio resetted setting the
codec clocks to their default value, causing a mismatch. Host system will
skip clock setting thinking the codec clocks are already at the requested
rate.

ADC reset is added to ensure the next audio capture does not have
undesired artifacts. It is probably related to the original code
where the probe function resets the ADC prior to 1st record.

Signed-off-by: Michael Sit Wei Hong <michael.wei.hong.sit@intel.com>
Reviewed-by: Sia Jee Heng <jee.heng.sia@intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20200812094631.4698-4-michael.wei.hong.sit@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/tlv320aic32x4.c