summaryrefslogtreecommitdiff
path: root/sound/soc/fsl/fsl_micfil.c
diff options
context:
space:
mode:
authorShengjiu Wang <shengjiu.wang@nxp.com>2022-05-07 15:14:14 +0300
committerMark Brown <broonie@kernel.org>2022-05-11 19:42:54 +0300
commitb776c4a4618ec1b5219d494c423dc142f23c4e8f (patch)
tree4e0afa7a76cd8bedf2e67c9c92351d039f89ecb7 /sound/soc/fsl/fsl_micfil.c
parent292709b9cf3ba470af94b62c9bb60284cc581b79 (diff)
downloadlinux-b776c4a4618ec1b5219d494c423dc142f23c4e8f.tar.xz
ASoC: fsl_micfil: explicitly clear CHnF flags
There may be failure when start 1 channel recording after 8 channels recording. The reason is that the CHnF flags are not cleared successfully by software reset. This issue is triggerred by the change of clearing software reset bit. CHnF flags are write 1 clear bits. Clear them by force write. Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> Link: https://lore.kernel.org/r/1651925654-32060-2-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/fsl/fsl_micfil.c')
-rw-r--r--sound/soc/fsl/fsl_micfil.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/sound/soc/fsl/fsl_micfil.c b/sound/soc/fsl/fsl_micfil.c
index cb84d95c3aac..d1cd104f8584 100644
--- a/sound/soc/fsl/fsl_micfil.c
+++ b/sound/soc/fsl/fsl_micfil.c
@@ -202,6 +202,14 @@ static int fsl_micfil_reset(struct device *dev)
if (ret)
return ret;
+ /*
+ * Set SRES should clear CHnF flags, But even add delay here
+ * the CHnF may not be cleared sometimes, so clear CHnF explicitly.
+ */
+ ret = regmap_write_bits(micfil->regmap, REG_MICFIL_STAT, 0xFF, 0xFF);
+ if (ret)
+ return ret;
+
return 0;
}