ASoC: ti: davinci-mcasp: Improve the sysclk selection
authorPeter Ujfalusi <peter.ujfalusi@ti.com>
Wed, 4 Dec 2019 19:20:05 +0000 (21:20 +0200)
committerMark Brown <broonie@kernel.org>
Mon, 9 Dec 2019 18:35:37 +0000 (18:35 +0000)
commit253f584a0699d12a90bde9d524d499a921cc7827
tree9602decdb31094a1ba8600cc81b076ee86297741
parentabe3b6727b653307c27870a2d4ecbf9de4e914a5
ASoC: ti: davinci-mcasp: Improve the sysclk selection

When McASP is master the bclk can be generated from two main source:
AUXCLK: functional clock for McASP or
AHCLK: from external source or internal mux in dra7x family

With this patch it is possible to select between the two source. The patch
is not breaking existing machine drivers since historically the clk_id was
ignored and left as 0 in all cases.

When output clock is configured - which can be only the AHCLK, we select
the AUXCLK as source for the internal HCLK. In this case the HCLK rate is
the same as the output clock.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Link: https://lore.kernel.org/r/20191204192005.31210-1-peter.ujfalusi@ti.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/ti/davinci-mcasp.c
sound/soc/ti/davinci-mcasp.h