aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicolin Chen <Guangyu.Chen@freescale.com>2014-04-20 23:40:22 -0400
committerNicolin Chen <Guangyu.Chen@freescale.com>2014-04-21 23:57:53 -0400
commit468755326e5ab405e1567480d4c09c3387ce028a (patch)
tree9ecc693b70ec704c90e3f9572f15ab11f38f1563
parent3092f062768d7c4312c54c7ec2c5f9acfbbf7e69 (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>
-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,
1067 struct device *dev = &pdev->dev; 1067 struct device *dev = &pdev->dev;
1068 u64 savesub = 100000, ret; 1068 u64 savesub = 100000, ret;
1069 struct clk *clk; 1069 struct clk *clk;
1070 long rate_final;
1070 char tmp[16]; 1071 char tmp[16];
1071 int i; 1072 int i;
1072 1073
@@ -1100,6 +1101,10 @@ static int fsl_spdif_probe_txclk(struct fsl_spdif_priv *spdif_priv,
1100 if (spdif_priv->txclk[index] == spdif_priv->sysclk) 1101 if (spdif_priv->txclk[index] == spdif_priv->sysclk)
1101 dev_dbg(&pdev->dev, "use sysclk_df %d for %dHz sample rate\n", 1102 dev_dbg(&pdev->dev, "use sysclk_df %d for %dHz sample rate\n",
1102 spdif_priv->sysclk_df[index], rate[index]); 1103 spdif_priv->sysclk_df[index], rate[index]);
1104 rate_final = clk_get_rate(spdif_priv->txclk[index]);
1105 rate_final /= 64 * spdif_priv->txclk_div[index] * spdif_priv->sysclk_df[index];
1106 dev_dbg(&pdev->dev, "The best rate for %dHz sample rate is %ldHz\n",
1107 rate[index], rate_final);
1103 1108
1104 return 0; 1109 return 0;
1105} 1110}