Merge branch 'locks-3.15' of git://git.samba.org/jlayton/linux
[deliverable/linux.git] / sound / core / pcm_lib.c
index 5dcf88bed9b785e38dd01eecf5121f09e1d43255..ce83def9f43bf9d30755e48f1129d25af81792a9 100644 (file)
@@ -174,7 +174,7 @@ static void xrun(struct snd_pcm_substream *substream)
        if (xrun_debug(substream, XRUN_DEBUG_BASIC)) {
                char name[16];
                snd_pcm_debug_name(substream, name, sizeof(name));
-               snd_printd(KERN_DEBUG "XRUN: %s\n", name);
+               pcm_warn(substream->pcm, "XRUN: %s\n", name);
                dump_stack_on_xrun(substream);
        }
 }
@@ -184,9 +184,7 @@ static void xrun(struct snd_pcm_substream *substream)
        do {                                                            \
                if (xrun_debug(substream, XRUN_DEBUG_BASIC)) {          \
                        xrun_log_show(substream);                       \
-                       if (snd_printd_ratelimit()) {                   \
-                               snd_printd("PCM: " fmt, ##args);        \
-                       }                                               \
+                       pr_err_ratelimited("ALSA: PCM: " fmt, ##args);  \
                        dump_stack_on_xrun(substream);                  \
                }                                                       \
        } while (0)
@@ -253,7 +251,7 @@ static void xrun_log_show(struct snd_pcm_substream *substream)
                entry = &log->entries[idx];
                if (entry->period_size == 0)
                        break;
-               snd_printd("hwptr log: %s: %sj=%lu, pos=%ld/%ld/%ld, "
+               pr_info("hwptr log: %s: %sj=%lu, pos=%ld/%ld/%ld, "
                           "hwptr=%ld/%ld\n",
                           name, entry->in_interrupt ? "[Q] " : "",
                           entry->jiffies,
@@ -342,14 +340,14 @@ static int snd_pcm_update_hw_ptr0(struct snd_pcm_substream *substream,
                return -EPIPE;
        }
        if (pos >= runtime->buffer_size) {
-               if (snd_printd_ratelimit()) {
+               if (printk_ratelimit()) {
                        char name[16];
                        snd_pcm_debug_name(substream, name, sizeof(name));
                        xrun_log_show(substream);
-                       snd_printd(KERN_ERR  "BUG: %s, pos = %ld, "
-                                  "buffer size = %ld, period size = %ld\n",
-                                  name, pos, runtime->buffer_size,
-                                  runtime->period_size);
+                       pcm_err(substream->pcm,
+                               "BUG: %s, pos = %ld, buffer size = %ld, period size = %ld\n",
+                               name, pos, runtime->buffer_size,
+                               runtime->period_size);
                }
                pos = 0;
        }
@@ -394,8 +392,8 @@ static int snd_pcm_update_hw_ptr0(struct snd_pcm_substream *substream,
                        XRUN_DEBUG_PERIODUPDATE : XRUN_DEBUG_HWPTRUPDATE)) {
                char name[16];
                snd_pcm_debug_name(substream, name, sizeof(name));
-               snd_printd("%s_update: %s: pos=%u/%u/%u, "
-                          "hwptr=%ld/%ld/%ld/%ld\n",
+               pcm_dbg(substream->pcm,
+                       "%s_update: %s: pos=%u/%u/%u, hwptr=%ld/%ld/%ld/%ld\n",
                           in_interrupt ? "period" : "hwptr",
                           name,
                           (unsigned int)pos,
@@ -1942,8 +1940,9 @@ static int wait_for_avail(struct snd_pcm_substream *substream,
                        continue;
                }
                if (!tout) {
-                       snd_printd("%s write error (DMA or IRQ trouble?)\n",
-                                  is_playback ? "playback" : "capture");
+                       pcm_dbg(substream->pcm,
+                               "%s write error (DMA or IRQ trouble?)\n",
+                               is_playback ? "playback" : "capture");
                        err = -EIO;
                        break;
                }
This page took 0.098836 seconds and 5 git commands to generate.