ASoC: simple-card-utils: Set sysclk on all components
authorRobert Hancock <robert.hancock@calian.com>
Thu, 20 Jan 2022 19:58:30 +0000 (13:58 -0600)
committerMark Brown <broonie@kernel.org>
Mon, 24 Jan 2022 19:45:39 +0000 (19:45 +0000)
commitce2f7b8d4290c22e462e465d1da38a1c113ae66a
treeaedc61266f4f0fe47480342285cb085bfe596b38
parentc47aef899c1bb0cbda48808356e7c040d95ca612
ASoC: simple-card-utils: Set sysclk on all components

If an mclk-fs value was provided in the device tree configuration, the
calculated MCLK was fed into the downstream codec DAI and CPU DAI,
however set_sysclk was not being called on the platform device. Some
platform devices such as the Xilinx Audio Formatter need to know the MCLK
as well.

Call snd_soc_component_set_sysclk on each component in the stream to set
the proper sysclk value in addition to the existing call of
snd_soc_dai_set_sysclk on the codec DAI and CPU DAI. This may end up
resulting in redundant calls if one of the snd_soc_dai_set_sysclk calls
ends up calling snd_soc_component_set_sysclk itself, but that isn't
expected to cause any significant harm.

Fixes: f48dcbb6d47d ("ASoC: simple-card-utils: share asoc_simple_hw_param()")
Signed-off-by: Robert Hancock <robert.hancock@calian.com>
Reviewed-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/20220120195832.1742271-5-robert.hancock@calian.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/generic/simple-card-utils.c