Commit 45ef4969 authored by Sylwester Nawrocki's avatar Sylwester Nawrocki Committed by Mark Brown

ASoC: samsung: s3c24xx_uda134x: debug/error trace cleanup

Switch from pr_* to dev_* macros and drop some debug traces.
Signed-off-by: default avatarSylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 28405212
...@@ -62,18 +62,18 @@ static int s3c24xx_uda134x_startup(struct snd_pcm_substream *substream) ...@@ -62,18 +62,18 @@ static int s3c24xx_uda134x_startup(struct snd_pcm_substream *substream)
#endif #endif
mutex_lock(&clk_lock); mutex_lock(&clk_lock);
pr_debug("%s %d\n", __func__, clk_users);
if (clk_users == 0) { if (clk_users == 0) {
xtal = clk_get(rtd->dev, "xtal"); xtal = clk_get(rtd->dev, "xtal");
if (IS_ERR(xtal)) { if (IS_ERR(xtal)) {
printk(KERN_ERR "%s cannot get xtal\n", __func__); dev_err(rtd->dev, "%s cannot get xtal\n", __func__);
ret = PTR_ERR(xtal); ret = PTR_ERR(xtal);
} else { } else {
pclk = clk_get(&s3c24xx_uda134x_snd_device->dev, pclk = clk_get(&s3c24xx_uda134x_snd_device->dev,
"pclk"); "pclk");
if (IS_ERR(pclk)) { if (IS_ERR(pclk)) {
printk(KERN_ERR "%s cannot get pclk\n", dev_err(rtd->dev, "%s cannot get pclk\n",
__func__); __func__);
clk_put(xtal); clk_put(xtal);
ret = PTR_ERR(pclk); ret = PTR_ERR(pclk);
} }
...@@ -99,8 +99,8 @@ static int s3c24xx_uda134x_startup(struct snd_pcm_substream *substream) ...@@ -99,8 +99,8 @@ static int s3c24xx_uda134x_startup(struct snd_pcm_substream *substream)
SNDRV_PCM_HW_PARAM_RATE, SNDRV_PCM_HW_PARAM_RATE,
&hw_constraints_rates); &hw_constraints_rates);
if (ret < 0) if (ret < 0)
printk(KERN_ERR "%s cannot set constraints\n", dev_err(rtd->dev, "%s cannot set constraints\n",
__func__); __func__);
#endif #endif
} }
return ret; return ret;
...@@ -109,7 +109,6 @@ static int s3c24xx_uda134x_startup(struct snd_pcm_substream *substream) ...@@ -109,7 +109,6 @@ static int s3c24xx_uda134x_startup(struct snd_pcm_substream *substream)
static void s3c24xx_uda134x_shutdown(struct snd_pcm_substream *substream) static void s3c24xx_uda134x_shutdown(struct snd_pcm_substream *substream)
{ {
mutex_lock(&clk_lock); mutex_lock(&clk_lock);
pr_debug("%s %d\n", __func__, clk_users);
clk_users -= 1; clk_users -= 1;
if (clk_users == 0) { if (clk_users == 0) {
clk_put(xtal); clk_put(xtal);
...@@ -156,18 +155,19 @@ static int s3c24xx_uda134x_hw_params(struct snd_pcm_substream *substream, ...@@ -156,18 +155,19 @@ static int s3c24xx_uda134x_hw_params(struct snd_pcm_substream *substream,
clk_source = S3C24XX_CLKSRC_PCLK; clk_source = S3C24XX_CLKSRC_PCLK;
div = bi % 33; div = bi % 33;
} }
pr_debug("%s desired rate %lu, %d\n", __func__, rate, bi);
dev_dbg(rtd->dev, "%s desired rate %lu, %d\n", __func__, rate, bi);
clk = (fs_mode == S3C2410_IISMOD_384FS ? 384 : 256) * rate; clk = (fs_mode == S3C2410_IISMOD_384FS ? 384 : 256) * rate;
pr_debug("%s will use: %s %s %d sysclk %d err %ld\n", __func__,
fs_mode == S3C2410_IISMOD_384FS ? "384FS" : "256FS", dev_dbg(rtd->dev, "%s will use: %s %s %d sysclk %d err %ld\n", __func__,
clk_source == S3C24XX_CLKSRC_MPLL ? "MPLLin" : "PCLK", fs_mode == S3C2410_IISMOD_384FS ? "384FS" : "256FS",
div, clk, err); clk_source == S3C24XX_CLKSRC_MPLL ? "MPLLin" : "PCLK",
div, clk, err);
if ((err * 100 / rate) > 5) { if ((err * 100 / rate) > 5) {
printk(KERN_ERR "S3C24XX_UDA134X: effective frequency " dev_err(rtd->dev, "effective frequency too different "
"too different from desired (%ld%%)\n", "from desired (%ld%%)\n", err * 100 / rate);
err * 100 / rate);
return -EINVAL; return -EINVAL;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment