aboutsummaryrefslogtreecommitdiffstats
path: root/sound/core/pcm_trace.h
diff options
context:
space:
mode:
Diffstat (limited to 'sound/core/pcm_trace.h')
-rw-r--r--sound/core/pcm_trace.h50
1 files changed, 44 insertions, 6 deletions
diff --git a/sound/core/pcm_trace.h b/sound/core/pcm_trace.h
index b63b654da5ff..3ddec1b8ae46 100644
--- a/sound/core/pcm_trace.h
+++ b/sound/core/pcm_trace.h
@@ -34,9 +34,9 @@ TRACE_EVENT(hwptr,
34 __entry->old_hw_ptr = (substream)->runtime->status->hw_ptr; 34 __entry->old_hw_ptr = (substream)->runtime->status->hw_ptr;
35 __entry->hw_ptr_base = (substream)->runtime->hw_ptr_base; 35 __entry->hw_ptr_base = (substream)->runtime->hw_ptr_base;
36 ), 36 ),
37 TP_printk("pcmC%dD%d%c/sub%d: %s: pos=%lu, old=%lu, base=%lu, period=%lu, buf=%lu", 37 TP_printk("pcmC%dD%d%s/sub%d: %s: pos=%lu, old=%lu, base=%lu, period=%lu, buf=%lu",
38 __entry->card, __entry->device, 38 __entry->card, __entry->device,
39 __entry->stream == SNDRV_PCM_STREAM_PLAYBACK ? 'p' : 'c', 39 __entry->stream == SNDRV_PCM_STREAM_PLAYBACK ? "p" : "c",
40 __entry->number, 40 __entry->number,
41 __entry->in_interrupt ? "IRQ" : "POS", 41 __entry->in_interrupt ? "IRQ" : "POS",
42 (unsigned long)__entry->pos, 42 (unsigned long)__entry->pos,
@@ -69,9 +69,9 @@ TRACE_EVENT(xrun,
69 __entry->old_hw_ptr = (substream)->runtime->status->hw_ptr; 69 __entry->old_hw_ptr = (substream)->runtime->status->hw_ptr;
70 __entry->hw_ptr_base = (substream)->runtime->hw_ptr_base; 70 __entry->hw_ptr_base = (substream)->runtime->hw_ptr_base;
71 ), 71 ),
72 TP_printk("pcmC%dD%d%c/sub%d: XRUN: old=%lu, base=%lu, period=%lu, buf=%lu", 72 TP_printk("pcmC%dD%d%s/sub%d: XRUN: old=%lu, base=%lu, period=%lu, buf=%lu",
73 __entry->card, __entry->device, 73 __entry->card, __entry->device,
74 __entry->stream == SNDRV_PCM_STREAM_PLAYBACK ? 'p' : 'c', 74 __entry->stream == SNDRV_PCM_STREAM_PLAYBACK ? "p" : "c",
75 __entry->number, 75 __entry->number,
76 (unsigned long)__entry->old_hw_ptr, 76 (unsigned long)__entry->old_hw_ptr,
77 (unsigned long)__entry->hw_ptr_base, 77 (unsigned long)__entry->hw_ptr_base,
@@ -96,12 +96,50 @@ TRACE_EVENT(hw_ptr_error,
96 __entry->stream = (substream)->stream; 96 __entry->stream = (substream)->stream;
97 __entry->reason = (why); 97 __entry->reason = (why);
98 ), 98 ),
99 TP_printk("pcmC%dD%d%c/sub%d: ERROR: %s", 99 TP_printk("pcmC%dD%d%s/sub%d: ERROR: %s",
100 __entry->card, __entry->device, 100 __entry->card, __entry->device,
101 __entry->stream == SNDRV_PCM_STREAM_PLAYBACK ? 'p' : 'c', 101 __entry->stream == SNDRV_PCM_STREAM_PLAYBACK ? "p" : "c",
102 __entry->number, __entry->reason) 102 __entry->number, __entry->reason)
103); 103);
104 104
105TRACE_EVENT(applptr,
106 TP_PROTO(struct snd_pcm_substream *substream, snd_pcm_uframes_t prev, snd_pcm_uframes_t curr),
107 TP_ARGS(substream, prev, curr),
108 TP_STRUCT__entry(
109 __field( unsigned int, card )
110 __field( unsigned int, device )
111 __field( unsigned int, number )
112 __field( unsigned int, stream )
113 __field( snd_pcm_uframes_t, prev )
114 __field( snd_pcm_uframes_t, curr )
115 __field( snd_pcm_uframes_t, avail )
116 __field( snd_pcm_uframes_t, period_size )
117 __field( snd_pcm_uframes_t, buffer_size )
118 ),
119 TP_fast_assign(
120 __entry->card = (substream)->pcm->card->number;
121 __entry->device = (substream)->pcm->device;
122 __entry->number = (substream)->number;
123 __entry->stream = (substream)->stream;
124 __entry->prev = (prev);
125 __entry->curr = (curr);
126 __entry->avail = (substream)->stream ? snd_pcm_capture_avail(substream->runtime) : snd_pcm_playback_avail(substream->runtime);
127 __entry->period_size = (substream)->runtime->period_size;
128 __entry->buffer_size = (substream)->runtime->buffer_size;
129 ),
130 TP_printk("pcmC%dD%d%s/sub%d: prev=%lu, curr=%lu, avail=%lu, period=%lu, buf=%lu",
131 __entry->card,
132 __entry->device,
133 __entry->stream ? "c" : "p",
134 __entry->number,
135 __entry->prev,
136 __entry->curr,
137 __entry->avail,
138 __entry->period_size,
139 __entry->buffer_size
140 )
141);
142
105#endif /* _PCM_TRACE_H */ 143#endif /* _PCM_TRACE_H */
106 144
107/* This part must be outside protection */ 145/* This part must be outside protection */