ASoC: ti: davinci-i2s: Use external clock to drive sample rate generator
authorBastien Curutchet <bastien.curutchet@bootlin.com>
Tue, 2 Apr 2024 07:12:05 +0000 (09:12 +0200)
committerMark Brown <broonie@kernel.org>
Tue, 9 Apr 2024 15:58:36 +0000 (16:58 +0100)
commit714ffb8d36f94bdc6d576417b451e9c568c83894
treebbb07f473e624ec52c2ae28daea0d17cd185f00e
parent6b1517b30d6dc9442d92f0273726f1e7390eff2c
ASoC: ti: davinci-i2s: Use external clock to drive sample rate generator

McBSP's internal sample rate generator can be programed to be driven by
its internal clock or by an external clock source located on CLKS pin.
The external clock source case is not handled by the driver.

Handle an optional clock related to this external clock source. If
present, the driver uses the clock located on CLKS pin as input for the
sample rate generator. Thus, the external clock rate is used to compute
divisors. If this optional clock is not present, the sample rate
generator is driven by the McBSP's functional clock.

Signed-off-by: Bastien Curutchet <bastien.curutchet@bootlin.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@gmail.com>
Link: https://msgid.link/r/20240402071213.11671-6-bastien.curutchet@bootlin.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/ti/davinci-i2s.c