diff options
-rw-r--r-- | sound/core/pcm_lib.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/sound/core/pcm_lib.c b/sound/core/pcm_lib.c index 64449cb8f873..c8c8091f9a71 100644 --- a/sound/core/pcm_lib.c +++ b/sound/core/pcm_lib.c | |||
@@ -189,6 +189,7 @@ static void xrun(struct snd_pcm_substream *substream) | |||
189 | #define XRUN_LOG_CNT 10 | 189 | #define XRUN_LOG_CNT 10 |
190 | 190 | ||
191 | struct hwptr_log_entry { | 191 | struct hwptr_log_entry { |
192 | unsigned int in_interrupt; | ||
192 | unsigned long jiffies; | 193 | unsigned long jiffies; |
193 | snd_pcm_uframes_t pos; | 194 | snd_pcm_uframes_t pos; |
194 | snd_pcm_uframes_t period_size; | 195 | snd_pcm_uframes_t period_size; |
@@ -204,7 +205,7 @@ struct snd_pcm_hwptr_log { | |||
204 | }; | 205 | }; |
205 | 206 | ||
206 | static void xrun_log(struct snd_pcm_substream *substream, | 207 | static void xrun_log(struct snd_pcm_substream *substream, |
207 | snd_pcm_uframes_t pos) | 208 | snd_pcm_uframes_t pos, int in_interrupt) |
208 | { | 209 | { |
209 | struct snd_pcm_runtime *runtime = substream->runtime; | 210 | struct snd_pcm_runtime *runtime = substream->runtime; |
210 | struct snd_pcm_hwptr_log *log = runtime->hwptr_log; | 211 | struct snd_pcm_hwptr_log *log = runtime->hwptr_log; |
@@ -220,6 +221,7 @@ static void xrun_log(struct snd_pcm_substream *substream, | |||
220 | return; | 221 | return; |
221 | } | 222 | } |
222 | entry = &log->entries[log->idx]; | 223 | entry = &log->entries[log->idx]; |
224 | entry->in_interrupt = in_interrupt; | ||
223 | entry->jiffies = jiffies; | 225 | entry->jiffies = jiffies; |
224 | entry->pos = pos; | 226 | entry->pos = pos; |
225 | entry->period_size = runtime->period_size; | 227 | entry->period_size = runtime->period_size; |
@@ -246,9 +248,11 @@ static void xrun_log_show(struct snd_pcm_substream *substream) | |||
246 | entry = &log->entries[idx]; | 248 | entry = &log->entries[idx]; |
247 | if (entry->period_size == 0) | 249 | if (entry->period_size == 0) |
248 | break; | 250 | break; |
249 | snd_printd("hwptr log: %s: j=%lu, pos=%ld/%ld/%ld, " | 251 | snd_printd("hwptr log: %s: %sj=%lu, pos=%ld/%ld/%ld, " |
250 | "hwptr=%ld/%ld\n", | 252 | "hwptr=%ld/%ld\n", |
251 | name, entry->jiffies, (unsigned long)entry->pos, | 253 | name, entry->in_interrupt ? "[Q] " : "", |
254 | entry->jiffies, | ||
255 | (unsigned long)entry->pos, | ||
252 | (unsigned long)entry->period_size, | 256 | (unsigned long)entry->period_size, |
253 | (unsigned long)entry->buffer_size, | 257 | (unsigned long)entry->buffer_size, |
254 | (unsigned long)entry->old_hw_ptr, | 258 | (unsigned long)entry->old_hw_ptr, |
@@ -326,7 +330,7 @@ static int snd_pcm_update_hw_ptr0(struct snd_pcm_substream *substream, | |||
326 | } | 330 | } |
327 | pos -= pos % runtime->min_align; | 331 | pos -= pos % runtime->min_align; |
328 | if (xrun_debug(substream, XRUN_DEBUG_LOG)) | 332 | if (xrun_debug(substream, XRUN_DEBUG_LOG)) |
329 | xrun_log(substream, pos); | 333 | xrun_log(substream, pos, in_interrupt); |
330 | hw_base = runtime->hw_ptr_base; | 334 | hw_base = runtime->hw_ptr_base; |
331 | new_hw_ptr = hw_base + pos; | 335 | new_hw_ptr = hw_base + pos; |
332 | if (in_interrupt) { | 336 | if (in_interrupt) { |