[alsa-devel] [PATCH 3/7] ASoC: simple_card_utils: Set clock frequency
Ladislav Michl
ladis at linux-mips.org
Tue Jan 30 12:08:45 CET 2018
Signed-off-by: Ladislav Michl <ladis at linux-mips.org>
---
sound/soc/generic/simple-card-utils.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/sound/soc/generic/simple-card-utils.c b/sound/soc/generic/simple-card-utils.c
index 3751a07de6aa..6b0cadc56933 100644
--- a/sound/soc/generic/simple-card-utils.c
+++ b/sound/soc/generic/simple-card-utils.c
@@ -185,6 +185,10 @@ int asoc_simple_card_parse_clk(struct device *dev,
*/
clk = devm_get_clk_from_child(dev, node, NULL);
if (!IS_ERR(clk)) {
+ if (!of_property_read_u32(node, "clock-frequency", &val)) {
+ if (clk_set_rate(clk, val))
+ dev_err(dev, "failed to set frequency %d\n", val);
+ }
simple_dai->sysclk = clk_get_rate(clk);
asoc_simple_card_clk_register(simple_dai, clk);
--
2.15.1
More information about the Alsa-devel
mailing list