MLK-14679-1: ARM: clk: spdif clock rate is too high for asrc
authorShengjiu Wang <shengjiu.wang@freescale.com>
Wed, 12 Apr 2017 06:45:53 +0000 (14:45 +0800)
committerNitin Garg <nitin.garg@nxp.com>
Mon, 19 Mar 2018 20:21:54 +0000 (15:21 -0500)
spdif clock is one of the asrc clock source, which is used
for ideal ratio mode. when set to 98.304MHz, it cause the
divider of asrc input clock and output clock exceed the
maximum value, and asrc driver saturate the value to maximum
value, which will cause the ASRC's performance very bad.
So we need to set spdif clock to a proper rate. which make asrc
divider not exceed maximum value, at least one of divider not
exceed maximum value.
The target is spdif clock rate / output(or input) sample rate
less than 1024(which is maximum divider).

Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
drivers/clk/imx/clk-imx6sx.c

index d9e9fa4..a915e28 100644 (file)
@@ -1,5 +1,6 @@
 /*
  * Copyright (C) 2014-2016 Freescale Semiconductor, Inc.
+ * Copyright 2017 NXP
  *
  * The code contained herein is licensed under the GNU General Public
  * License. You may obtain a copy of the GNU General Public License
@@ -623,7 +624,7 @@ static void __init imx6sx_clocks_init(struct device_node *ccm_node)
        imx_clk_set_rate(clks[IMX6SX_CLK_PLL4_AUDIO_DIV], 393216000);
 
        imx_clk_set_parent(clks[IMX6SX_CLK_SPDIF_SEL], clks[IMX6SX_CLK_PLL4_AUDIO_DIV]);
-       imx_clk_set_rate(clks[IMX6SX_CLK_SPDIF_PODF], 98304000);
+       imx_clk_set_rate(clks[IMX6SX_CLK_SPDIF_PODF], 24576000);
 
        imx_clk_set_parent(clks[IMX6SX_CLK_AUDIO_SEL], clks[IMX6SX_CLK_PLL3_USB_OTG]);
        imx_clk_set_rate(clks[IMX6SX_CLK_AUDIO_PODF], 24000000);