]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: fsl_asrc: refine the check of available clock divider
authorShengjiu Wang <shengjiu.wang@nxp.com>
Wed, 5 Jan 2022 11:08:03 +0000 (19:08 +0800)
committerMark Brown <broonie@kernel.org>
Thu, 6 Jan 2022 13:55:54 +0000 (13:55 +0000)
commit45e10676867008b8e8174890ace64d10de0eecb1
tree38ea18173d1d7afd05209919438c775514fd97ac
parent03bc83a7fd30596f950852e42038ac68098466d1
ASoC: fsl_asrc: refine the check of available clock divider

According to RM, the clock divider range is from 1 to 8, clock
prescaling ratio may be any power of 2 from 1 to 128.
So the supported divider is not all the value between
1 and 1024, just limited value in that range.

Create table for the supported divder and add function to
check the clock divider is available by comparing with
the table.

Fixes: 70b61d8885f0 ("ASoC: fsl_asrc: Add an option to select internal ratio mode")
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Link: https://lore.kernel.org/r/1641380883-20709-1-git-send-email-shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/fsl/fsl_asrc.c