]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: simple-card: set cpu dai clk in hw_params
authorDaniel Mack <daniel@zonque.org>
Wed, 30 May 2018 19:45:56 +0000 (21:45 +0200)
committerMark Brown <broonie@kernel.org>
Fri, 1 Jun 2018 10:27:26 +0000 (11:27 +0100)
commitabfcb443365389e051519f8d1eed9e8a081ab365
treecf5acc06e1a53ac4fcfbe9d7162f877cdfc5efeb
parent635ea0af7a39027eebab93e9de840e2b4c4e0aeb
ASoC: simple-card: set cpu dai clk in hw_params

The simple-card driver currently accepts a clock node in the cpu dai
sub-node and only uses it as an alternative to the
'system-clock-frequency' property to get the current frequency.

This patch adds another use of the passed clock node. If mclk-fs is
specified, the clocks in cpu and codec dai sub-nodes will be set to
the calculated rate (stream rate * mclk_fs) in hw_params.

This allows platforms to pass tuneable clocks as phandle that will
automatically be set to the right rates.

Signed-off-by: Daniel Mack <daniel@zonque.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
Documentation/devicetree/bindings/sound/simple-card.txt
sound/soc/generic/simple-card.c