~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/sound/core/pcm_trace.h

Version: ~ [ linux-5.8-rc4 ] ~ [ linux-5.7.7 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.50 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.131 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.187 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.229 ] ~ [ linux-4.8.17 ] ~ [ linux-4.7.10 ] ~ [ linux-4.6.7 ] ~ [ linux-4.5.7 ] ~ [ linux-4.4.229 ] ~ [ linux-4.3.6 ] ~ [ linux-4.2.8 ] ~ [ linux-4.1.52 ] ~ [ linux-4.0.9 ] ~ [ linux-3.19.8 ] ~ [ linux-3.18.140 ] ~ [ linux-3.17.8 ] ~ [ linux-3.16.85 ] ~ [ linux-3.15.10 ] ~ [ linux-3.14.79 ] ~ [ linux-3.13.11 ] ~ [ linux-3.12.74 ] ~ [ linux-3.11.10 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.5 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 #undef TRACE_SYSTEM
  2 #define TRACE_SYSTEM snd_pcm
  3 #define TRACE_INCLUDE_FILE pcm_trace
  4 
  5 #if !defined(_PCM_TRACE_H) || defined(TRACE_HEADER_MULTI_READ)
  6 #define _PCM_TRACE_H
  7 
  8 #include <linux/tracepoint.h>
  9 
 10 TRACE_EVENT(hwptr,
 11         TP_PROTO(struct snd_pcm_substream *substream, snd_pcm_uframes_t pos, bool irq),
 12         TP_ARGS(substream, pos, irq),
 13         TP_STRUCT__entry(
 14                 __field( bool, in_interrupt )
 15                 __field( unsigned int, card )
 16                 __field( unsigned int, device )
 17                 __field( unsigned int, number )
 18                 __field( unsigned int, stream )
 19                 __field( snd_pcm_uframes_t, pos )
 20                 __field( snd_pcm_uframes_t, period_size )
 21                 __field( snd_pcm_uframes_t, buffer_size )
 22                 __field( snd_pcm_uframes_t, old_hw_ptr )
 23                 __field( snd_pcm_uframes_t, hw_ptr_base )
 24         ),
 25         TP_fast_assign(
 26                 __entry->in_interrupt = (irq);
 27                 __entry->card = (substream)->pcm->card->number;
 28                 __entry->device = (substream)->pcm->device;
 29                 __entry->number = (substream)->number;
 30                 __entry->stream = (substream)->stream;
 31                 __entry->pos = (pos);
 32                 __entry->period_size = (substream)->runtime->period_size;
 33                 __entry->buffer_size = (substream)->runtime->buffer_size;
 34                 __entry->old_hw_ptr = (substream)->runtime->status->hw_ptr;
 35                 __entry->hw_ptr_base = (substream)->runtime->hw_ptr_base;
 36         ),
 37         TP_printk("pcmC%dD%d%c/sub%d: %s: pos=%lu, old=%lu, base=%lu, period=%lu, buf=%lu",
 38                   __entry->card, __entry->device,
 39                   __entry->stream == SNDRV_PCM_STREAM_PLAYBACK ? 'p' : 'c',
 40                   __entry->number,
 41                   __entry->in_interrupt ? "IRQ" : "POS",
 42                   (unsigned long)__entry->pos,
 43                   (unsigned long)__entry->old_hw_ptr,
 44                   (unsigned long)__entry->hw_ptr_base,
 45                   (unsigned long)__entry->period_size,
 46                   (unsigned long)__entry->buffer_size)
 47 );
 48 
 49 TRACE_EVENT(xrun,
 50         TP_PROTO(struct snd_pcm_substream *substream),
 51         TP_ARGS(substream),
 52         TP_STRUCT__entry(
 53                 __field( unsigned int, card )
 54                 __field( unsigned int, device )
 55                 __field( unsigned int, number )
 56                 __field( unsigned int, stream )
 57                 __field( snd_pcm_uframes_t, period_size )
 58                 __field( snd_pcm_uframes_t, buffer_size )
 59                 __field( snd_pcm_uframes_t, old_hw_ptr )
 60                 __field( snd_pcm_uframes_t, hw_ptr_base )
 61         ),
 62         TP_fast_assign(
 63                 __entry->card = (substream)->pcm->card->number;
 64                 __entry->device = (substream)->pcm->device;
 65                 __entry->number = (substream)->number;
 66                 __entry->stream = (substream)->stream;
 67                 __entry->period_size = (substream)->runtime->period_size;
 68                 __entry->buffer_size = (substream)->runtime->buffer_size;
 69                 __entry->old_hw_ptr = (substream)->runtime->status->hw_ptr;
 70                 __entry->hw_ptr_base = (substream)->runtime->hw_ptr_base;
 71         ),
 72         TP_printk("pcmC%dD%d%c/sub%d: XRUN: old=%lu, base=%lu, period=%lu, buf=%lu",
 73                   __entry->card, __entry->device,
 74                   __entry->stream == SNDRV_PCM_STREAM_PLAYBACK ? 'p' : 'c',
 75                   __entry->number,
 76                   (unsigned long)__entry->old_hw_ptr,
 77                   (unsigned long)__entry->hw_ptr_base,
 78                   (unsigned long)__entry->period_size,
 79                   (unsigned long)__entry->buffer_size)
 80 );
 81 
 82 TRACE_EVENT(hw_ptr_error,
 83         TP_PROTO(struct snd_pcm_substream *substream, const char *why),
 84         TP_ARGS(substream, why),
 85         TP_STRUCT__entry(
 86                 __field( unsigned int, card )
 87                 __field( unsigned int, device )
 88                 __field( unsigned int, number )
 89                 __field( unsigned int, stream )
 90                 __field( const char *, reason )
 91         ),
 92         TP_fast_assign(
 93                 __entry->card = (substream)->pcm->card->number;
 94                 __entry->device = (substream)->pcm->device;
 95                 __entry->number = (substream)->number;
 96                 __entry->stream = (substream)->stream;
 97                 __entry->reason = (why);
 98         ),
 99         TP_printk("pcmC%dD%d%c/sub%d: ERROR: %s",
100                   __entry->card, __entry->device,
101                   __entry->stream == SNDRV_PCM_STREAM_PLAYBACK ? 'p' : 'c',
102                   __entry->number, __entry->reason)
103 );
104 
105 #endif /* _PCM_TRACE_H */
106 
107 /* This part must be outside protection */
108 #undef TRACE_INCLUDE_PATH
109 #define TRACE_INCLUDE_PATH .
110 #include <trace/define_trace.h>
111 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | Wiki (Japanese) | Wiki (English) | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

osdn.jp