Skip to content

Commit

Permalink
ASoC: fsl_micfil: explicitly clear CHnF flags
Browse files Browse the repository at this point in the history
[ Upstream commit b776c4a ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
Shengjiu Wang authored and Greg Kroah-Hartman committed Dec 19, 2022
1 parent a49c1a7 commit 344739d
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions sound/soc/fsl/fsl_micfil.c
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,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;
}

Expand Down

0 comments on commit 344739d

Please sign in to comment.