aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/soc-core.c
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2008-10-21 16:45:08 -0400
committerMark Brown <broonie@opensource.wolfsonmicro.com>2008-10-30 10:34:03 -0400
commitf24368c2fb524e911b831b86b5f0acfb38c70317 (patch)
treebdcc256912ee120dee8ce4e4fc41b8fa0969ff93 /sound/soc/soc-core.c
parentd45f6219d256b4e02f9ebee2e3911f4ea80bac70 (diff)
ASoC: Convert core to use standard debug print macros
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/soc-core.c')
-rw-r--r--sound/soc/soc-core.c36
1 files changed, 14 insertions, 22 deletions
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index 411fd3bcf44f..8f384df941fd 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -35,14 +35,6 @@
35#include <sound/soc-dapm.h> 35#include <sound/soc-dapm.h>
36#include <sound/initval.h> 36#include <sound/initval.h>
37 37
38/* debug */
39#define SOC_DEBUG 0
40#if SOC_DEBUG
41#define dbg(format, arg...) printk(format, ## arg)
42#else
43#define dbg(format, arg...)
44#endif
45
46static DEFINE_MUTEX(pcm_mutex); 38static DEFINE_MUTEX(pcm_mutex);
47static DEFINE_MUTEX(io_mutex); 39static DEFINE_MUTEX(io_mutex);
48static DECLARE_WAIT_QUEUE_HEAD(soc_pm_waitq); 40static DECLARE_WAIT_QUEUE_HEAD(soc_pm_waitq);
@@ -229,12 +221,12 @@ static int soc_pcm_open(struct snd_pcm_substream *substream)
229 goto machine_err; 221 goto machine_err;
230 } 222 }
231 223
232 dbg("asoc: %s <-> %s info:\n", codec_dai->name, cpu_dai->name); 224 pr_debug("asoc: %s <-> %s info:\n", codec_dai->name, cpu_dai->name);
233 dbg("asoc: rate mask 0x%x\n", runtime->hw.rates); 225 pr_debug("asoc: rate mask 0x%x\n", runtime->hw.rates);
234 dbg("asoc: min ch %d max ch %d\n", runtime->hw.channels_min, 226 pr_debug("asoc: min ch %d max ch %d\n", runtime->hw.channels_min,
235 runtime->hw.channels_max); 227 runtime->hw.channels_max);
236 dbg("asoc: min rate %d max rate %d\n", runtime->hw.rate_min, 228 pr_debug("asoc: min rate %d max rate %d\n", runtime->hw.rate_min,
237 runtime->hw.rate_max); 229 runtime->hw.rate_max);
238 230
239 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) 231 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
240 cpu_dai->playback.active = codec_dai->playback.active = 1; 232 cpu_dai->playback.active = codec_dai->playback.active = 1;
@@ -279,18 +271,18 @@ static void close_delayed_work(struct work_struct *work)
279 for (i = 0; i < codec->num_dai; i++) { 271 for (i = 0; i < codec->num_dai; i++) {
280 codec_dai = &codec->dai[i]; 272 codec_dai = &codec->dai[i];
281 273
282 dbg("pop wq checking: %s status: %s waiting: %s\n", 274 pr_debug("pop wq checking: %s status: %s waiting: %s\n",
283 codec_dai->playback.stream_name, 275 codec_dai->playback.stream_name,
284 codec_dai->playback.active ? "active" : "inactive", 276 codec_dai->playback.active ? "active" : "inactive",
285 codec_dai->pop_wait ? "yes" : "no"); 277 codec_dai->pop_wait ? "yes" : "no");
286 278
287 /* are we waiting on this codec DAI stream */ 279 /* are we waiting on this codec DAI stream */
288 if (codec_dai->pop_wait == 1) { 280 if (codec_dai->pop_wait == 1) {
289 281
290 /* Reduce power if no longer active */ 282 /* Reduce power if no longer active */
291 if (codec->active == 0) { 283 if (codec->active == 0) {
292 dbg("pop wq D1 %s %s\n", codec->name, 284 pr_debug("pop wq D1 %s %s\n", codec->name,
293 codec_dai->playback.stream_name); 285 codec_dai->playback.stream_name);
294 snd_soc_dapm_set_bias_level(socdev, 286 snd_soc_dapm_set_bias_level(socdev,
295 SND_SOC_BIAS_PREPARE); 287 SND_SOC_BIAS_PREPARE);
296 } 288 }
@@ -302,8 +294,8 @@ static void close_delayed_work(struct work_struct *work)
302 294
303 /* Fall into standby if no longer active */ 295 /* Fall into standby if no longer active */
304 if (codec->active == 0) { 296 if (codec->active == 0) {
305 dbg("pop wq D3 %s %s\n", codec->name, 297 pr_debug("pop wq D3 %s %s\n", codec->name,
306 codec_dai->playback.stream_name); 298 codec_dai->playback.stream_name);
307 snd_soc_dapm_set_bias_level(socdev, 299 snd_soc_dapm_set_bias_level(socdev,
308 SND_SOC_BIAS_STANDBY); 300 SND_SOC_BIAS_STANDBY);
309 } 301 }