summaryrefslogtreecommitdiffstats
path: root/include/sound/pcm.h
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2014-11-04 14:02:40 +0100
committerTakashi Iwai <tiwai@suse.de>2014-11-04 14:09:16 +0100
commit2b30d411dbc6eddfb5b4f9afd5a2c57b6f4dd96c (patch)
tree02f9efaa6a39b5579eb3f708435ef743b2ab4d09 /include/sound/pcm.h
parentALSA: pcm: Replace PCM hwptr tracking with tracepoints (diff)
downloadlinux-2b30d411dbc6eddfb5b4f9afd5a2c57b6f4dd96c.tar.xz
linux-2b30d411dbc6eddfb5b4f9afd5a2c57b6f4dd96c.zip
ALSA: pcm: Add xrun_injection proc entry
This patch adds a new proc entry for PCM substreams to inject an XRUN. When a PCM substream is running and any value is written to its xrun_injection proc file, the driver triggers XRUN. This is a useful feature for debugging XRUN and error handling code paths. Note that this entry is enabled only when CONFIG_SND_PCM_XRUN_DEBUG is set. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'include/sound/pcm.h')
-rw-r--r--include/sound/pcm.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/sound/pcm.h b/include/sound/pcm.h
index 29eb09ef2969..0b8daeed0a33 100644
--- a/include/sound/pcm.h
+++ b/include/sound/pcm.h
@@ -416,7 +416,10 @@ struct snd_pcm_substream {
struct snd_info_entry *proc_status_entry;
struct snd_info_entry *proc_prealloc_entry;
struct snd_info_entry *proc_prealloc_max_entry;
+#ifdef CONFIG_SND_PCM_XRUN_DEBUG
+ struct snd_info_entry *proc_xrun_injection_entry;
#endif
+#endif /* CONFIG_SND_VERBOSE_PROCFS */
/* misc flags */
unsigned int hw_opened: 1;
};