summaryrefslogtreecommitdiffstats
path: root/sound/core/pcm.c
diff options
context:
space:
mode:
authorJaroslav Kysela <perex@perex.cz>2009-12-20 11:47:57 +0100
committerJaroslav Kysela <perex@perex.cz>2010-01-07 15:47:24 +0100
commit4d96eb255c53ab5e39b37fd4d484ea3dc39ab456 (patch)
tree139ce65a63a2a39ee7dedfa3ca16c70bd5a1b2ba /sound/core/pcm.c
parent741b20cfb9109760937f403d18d731bfde31f56f (diff)
downloadlinux-4d96eb255c53ab5e39b37fd4d484ea3dc39ab456.tar.bz2
ALSA: pcm_lib - add possibility to log last 10 DMA ring buffer positions
In some debug cases, it might be usefull to see previous ring buffer positions to determine position problems from the lowlevel drivers. Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Diffstat (limited to 'sound/core/pcm.c')
-rw-r--r--sound/core/pcm.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sound/core/pcm.c b/sound/core/pcm.c
index 6884ae031f6f..df57a0e30bf2 100644
--- a/sound/core/pcm.c
+++ b/sound/core/pcm.c
@@ -921,6 +921,10 @@ void snd_pcm_detach_substream(struct snd_pcm_substream *substream)
snd_free_pages((void*)runtime->control,
PAGE_ALIGN(sizeof(struct snd_pcm_mmap_control)));
kfree(runtime->hw_constraints.rules);
+#ifdef CONFIG_SND_PCM_XRUN_DEBUG
+ if (runtime->hwptr_log)
+ kfree(runtime->hwptr_log);
+#endif
kfree(runtime);
substream->runtime = NULL;
put_pid(substream->pid);