From ef8194ce21f36b9e59d9406b3892d2d6bb8c530c Mon Sep 17 00:00:00 2001 From: Ben Gardiner Date: Wed, 18 May 2011 10:03:34 -0400 Subject: [PATCH] --- yaml --- r: 248191 b: refs/heads/master c: ec08b14483de0702ca43e3a8506e149486975f9b h: refs/heads/master i: 248189: 274743f95b9b75c272e694499e4fe6ed9d6b88f6 248187: 23e05c08002da245d0a21d20650a38004e9ab021 248183: 05017376badb1859d1071b25362344df049a04aa 248175: 7ce8b5978bb56d95020954f28ed270755eacd79c 248159: 6142dff048854db5ec4a7144b12bb74adf70b6ab 248127: 1d4fb3b19f3d5df4dfc3e12c2eb87dea0a88b864 248063: f2b16ac2e2c1d8d63794a1ef048f5155e3cbb514 v: v3 --- [refs] | 2 +- trunk/sound/core/pcm_lib.c | 12 ++++++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/[refs] b/[refs] index 8a41f414e730..f08522c58463 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 7cdd8d73139ec935a8e91806131a5b91e26c653e +refs/heads/master: ec08b14483de0702ca43e3a8506e149486975f9b diff --git a/trunk/sound/core/pcm_lib.c b/trunk/sound/core/pcm_lib.c index 64449cb8f873..c8c8091f9a71 100644 --- a/trunk/sound/core/pcm_lib.c +++ b/trunk/sound/core/pcm_lib.c @@ -189,6 +189,7 @@ static void xrun(struct snd_pcm_substream *substream) #define XRUN_LOG_CNT 10 struct hwptr_log_entry { + unsigned int in_interrupt; unsigned long jiffies; snd_pcm_uframes_t pos; snd_pcm_uframes_t period_size; @@ -204,7 +205,7 @@ struct snd_pcm_hwptr_log { }; static void xrun_log(struct snd_pcm_substream *substream, - snd_pcm_uframes_t pos) + snd_pcm_uframes_t pos, int in_interrupt) { struct snd_pcm_runtime *runtime = substream->runtime; struct snd_pcm_hwptr_log *log = runtime->hwptr_log; @@ -220,6 +221,7 @@ static void xrun_log(struct snd_pcm_substream *substream, return; } entry = &log->entries[log->idx]; + entry->in_interrupt = in_interrupt; entry->jiffies = jiffies; entry->pos = pos; entry->period_size = runtime->period_size; @@ -246,9 +248,11 @@ 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: j=%lu, pos=%ld/%ld/%ld, " + snd_printd("hwptr log: %s: %sj=%lu, pos=%ld/%ld/%ld, " "hwptr=%ld/%ld\n", - name, entry->jiffies, (unsigned long)entry->pos, + name, entry->in_interrupt ? "[Q] " : "", + entry->jiffies, + (unsigned long)entry->pos, (unsigned long)entry->period_size, (unsigned long)entry->buffer_size, (unsigned long)entry->old_hw_ptr, @@ -326,7 +330,7 @@ static int snd_pcm_update_hw_ptr0(struct snd_pcm_substream *substream, } pos -= pos % runtime->min_align; if (xrun_debug(substream, XRUN_DEBUG_LOG)) - xrun_log(substream, pos); + xrun_log(substream, pos, in_interrupt); hw_base = runtime->hw_ptr_base; new_hw_ptr = hw_base + pos; if (in_interrupt) {