summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolin Chen <Guangyu.Chen@freescale.com>2014-04-21 11:40:22 +0800
committerNicolin Chen <Guangyu.Chen@freescale.com>2014-04-22 12:02:55 +0800
commit5d891c7b305dd2d39b0005aecf2c80b242fadaf0 (patch)
treec0eb92f0046679fad8f92555b8b1199298aa56f3
parent2d18a34b29ffd2804d6b90751c198ed484621e9f (diff)
ENGR00309468-3 ASoC: fsl_spdif: Print selected rate for debug
It'd better to tell people what's the current rate from the clock selecting function against the required sample rate. Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com> (cherry picked from commit 468755326e5ab405e1567480d4c09c3387ce028a)
-rw-r--r--sound/soc/fsl/fsl_spdif.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/sound/soc/fsl/fsl_spdif.c b/sound/soc/fsl/fsl_spdif.c
index c1baba2ca029..b47c436e03a9 100644
--- a/sound/soc/fsl/fsl_spdif.c
+++ b/sound/soc/fsl/fsl_spdif.c
@@ -1067,6 +1067,7 @@ static int fsl_spdif_probe_txclk(struct fsl_spdif_priv *spdif_priv,
struct device *dev = &pdev->dev;
u64 savesub = 100000, ret;
struct clk *clk;
+ long rate_final;
char tmp[16];
int i;
@@ -1100,6 +1101,10 @@ static int fsl_spdif_probe_txclk(struct fsl_spdif_priv *spdif_priv,
if (spdif_priv->txclk[index] == spdif_priv->sysclk)
dev_dbg(&pdev->dev, "use sysclk_df %d for %dHz sample rate\n",
spdif_priv->sysclk_df[index], rate[index]);
+ rate_final = clk_get_rate(spdif_priv->txclk[index]);
+ rate_final /= 64 * spdif_priv->txclk_div[index] * spdif_priv->sysclk_df[index];
+ dev_dbg(&pdev->dev, "The best rate for %dHz sample rate is %ldHz\n",
+ rate[index], rate_final);
return 0;
}