ASoC: Convert core to use standard debug print macros
authorMark Brown <broonie@opensource.wolfsonmicro.com>
Tue, 21 Oct 2008 20:45:08 +0000 (21:45 +0100)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Thu, 30 Oct 2008 14:34:03 +0000 (14:34 +0000)
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
sound/soc/soc-core.c

index 411fd3bcf44f67a44ad664d18ad87dd6282cf2ae..8f384df941fd410bb12ddcb1f817ddf1d44909ba 100644 (file)
 #include <sound/soc-dapm.h>
 #include <sound/initval.h>
 
-/* debug */
-#define SOC_DEBUG 0
-#if SOC_DEBUG
-#define dbg(format, arg...) printk(format, ## arg)
-#else
-#define dbg(format, arg...)
-#endif
-
 static DEFINE_MUTEX(pcm_mutex);
 static DEFINE_MUTEX(io_mutex);
 static DECLARE_WAIT_QUEUE_HEAD(soc_pm_waitq);
@@ -229,12 +221,12 @@ static int soc_pcm_open(struct snd_pcm_substream *substream)
                goto machine_err;
        }
 
-       dbg("asoc: %s <-> %s info:\n", codec_dai->name, cpu_dai->name);
-       dbg("asoc: rate mask 0x%x\n", runtime->hw.rates);
-       dbg("asoc: min ch %d max ch %d\n", runtime->hw.channels_min,
-               runtime->hw.channels_max);
-       dbg("asoc: min rate %d max rate %d\n", runtime->hw.rate_min,
-               runtime->hw.rate_max);
+       pr_debug("asoc: %s <-> %s info:\n", codec_dai->name, cpu_dai->name);
+       pr_debug("asoc: rate mask 0x%x\n", runtime->hw.rates);
+       pr_debug("asoc: min ch %d max ch %d\n", runtime->hw.channels_min,
+                runtime->hw.channels_max);
+       pr_debug("asoc: min rate %d max rate %d\n", runtime->hw.rate_min,
+                runtime->hw.rate_max);
 
        if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
                cpu_dai->playback.active = codec_dai->playback.active = 1;
@@ -279,18 +271,18 @@ static void close_delayed_work(struct work_struct *work)
        for (i = 0; i < codec->num_dai; i++) {
                codec_dai = &codec->dai[i];
 
-               dbg("pop wq checking: %s status: %s waiting: %s\n",
-                       codec_dai->playback.stream_name,
-                       codec_dai->playback.active ? "active" : "inactive",
-                       codec_dai->pop_wait ? "yes" : "no");
+               pr_debug("pop wq checking: %s status: %s waiting: %s\n",
+                        codec_dai->playback.stream_name,
+                        codec_dai->playback.active ? "active" : "inactive",
+                        codec_dai->pop_wait ? "yes" : "no");
 
                /* are we waiting on this codec DAI stream */
                if (codec_dai->pop_wait == 1) {
 
                        /* Reduce power if no longer active */
                        if (codec->active == 0) {
-                               dbg("pop wq D1 %s %s\n", codec->name,
-                                       codec_dai->playback.stream_name);
+                               pr_debug("pop wq D1 %s %s\n", codec->name,
+                                        codec_dai->playback.stream_name);
                                snd_soc_dapm_set_bias_level(socdev,
                                        SND_SOC_BIAS_PREPARE);
                        }
@@ -302,8 +294,8 @@ static void close_delayed_work(struct work_struct *work)
 
                        /* Fall into standby if no longer active */
                        if (codec->active == 0) {
-                               dbg("pop wq D3 %s %s\n", codec->name,
-                                       codec_dai->playback.stream_name);
+                               pr_debug("pop wq D3 %s %s\n", codec->name,
+                                        codec_dai->playback.stream_name);
                                snd_soc_dapm_set_bias_level(socdev,
                                        SND_SOC_BIAS_STANDBY);
                        }