OSDN Git Service

ASoC: fsl_asrc: refine the setting of internal clock divider
authorShengjiu Wang <shengjiu.wang@nxp.com>
Mon, 28 Oct 2019 09:10:29 +0000 (17:10 +0800)
committerMark Brown <broonie@kernel.org>
Mon, 28 Oct 2019 13:13:18 +0000 (13:13 +0000)
commitb39eb1e250c32c695a780f1814086f2bfa0fb593
tree335dcb1f2fbea7a9219df81d37e5a3767367fab7
parent15747a80207585fe942416025540c0ff34e2aef8
ASoC: fsl_asrc: refine the setting of internal clock divider

The output divider should align with the output sample
rate, if use ideal sample rate, there will be a lot of overload,
which would cause underrun.

The maximum divider of asrc clock is 1024, but there is no
judgement for this limitation in driver, which may cause the divider
setting not correct.

For non-ideal ratio mode, the clock rate should divide the sample
rate with no remainder, and the quotient should be less than 1024.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Acked-by: Nicolin Chen <nicoleotsuka@gmail.com>
Link: https://lore.kernel.org/r/23c634e4bf58afce5b3ae67f5f42e8d1cae2639a.1572252307.git.shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/fsl/fsl_asrc.c