2 * amdtp-motu-trace.h - tracepoint definitions to dump a part of packet data
4 * Copyright (c) 2017 Takashi Sakamoto
5 * Licensed under the terms of the GNU General Public License, version 2.
9 #define TRACE_SYSTEM snd_firewire_motu
11 #if !defined(_SND_FIREWIRE_MOTU_TRACE_H) || defined(TRACE_HEADER_MULTI_READ)
12 #define _SND_FIREWIRE_MOTU_TRACE_H
14 #include <linux/tracepoint.h>
16 static void copy_sph(u32
*frame
, __be32
*buffer
, unsigned int data_blocks
,
17 unsigned int data_block_quadlets
);
18 static void copy_message(u64
*frames
, __be32
*buffer
, unsigned int data_blocks
,
19 unsigned int data_block_quadlets
);
21 TRACE_EVENT(in_data_block_sph
,
22 TP_PROTO(struct amdtp_stream
*s
, unsigned int data_blocks
, __be32
*buffer
),
23 TP_ARGS(s
, data_blocks
, buffer
),
27 __field(unsigned int, data_blocks
)
28 __dynamic_array(u32
, tstamps
, data_blocks
)
31 __entry
->src
= fw_parent_device(s
->unit
)->node_id
;
32 __entry
->dst
= fw_parent_device(s
->unit
)->card
->node_id
;
33 __entry
->data_blocks
= data_blocks
;
34 copy_sph(__get_dynamic_array(tstamps
), buffer
, data_blocks
, s
->data_block_quadlets
);
41 __print_array(__get_dynamic_array(tstamps
), __entry
->data_blocks
, 4)
45 TRACE_EVENT(out_data_block_sph
,
46 TP_PROTO(struct amdtp_stream
*s
, unsigned int data_blocks
, __be32
*buffer
),
47 TP_ARGS(s
, data_blocks
, buffer
),
51 __field(unsigned int, data_blocks
)
52 __dynamic_array(u32
, tstamps
, data_blocks
)
55 __entry
->src
= fw_parent_device(s
->unit
)->card
->node_id
;
56 __entry
->dst
= fw_parent_device(s
->unit
)->node_id
;
57 __entry
->data_blocks
= data_blocks
;
58 copy_sph(__get_dynamic_array(tstamps
), buffer
, data_blocks
, s
->data_block_quadlets
);
65 __print_array(__get_dynamic_array(tstamps
), __entry
->data_blocks
, 4)
69 TRACE_EVENT(in_data_block_message
,
70 TP_PROTO(struct amdtp_stream
*s
, unsigned int data_blocks
, __be32
*buffer
),
71 TP_ARGS(s
, data_blocks
, buffer
),
75 __field(unsigned int, data_blocks
)
76 __dynamic_array(u64
, messages
, data_blocks
)
79 __entry
->src
= fw_parent_device(s
->unit
)->node_id
;
80 __entry
->dst
= fw_parent_device(s
->unit
)->card
->node_id
;
81 __entry
->data_blocks
= data_blocks
;
82 copy_message(__get_dynamic_array(messages
), buffer
, data_blocks
, s
->data_block_quadlets
);
89 __print_array(__get_dynamic_array(messages
), __entry
->data_blocks
, 8)
93 TRACE_EVENT(out_data_block_message
,
94 TP_PROTO(struct amdtp_stream
*s
, unsigned int data_blocks
, __be32
*buffer
),
95 TP_ARGS(s
, data_blocks
, buffer
),
99 __field(unsigned int, data_blocks
)
100 __dynamic_array(u64
, messages
, data_blocks
)
103 __entry
->src
= fw_parent_device(s
->unit
)->card
->node_id
;
104 __entry
->dst
= fw_parent_device(s
->unit
)->node_id
;
105 __entry
->data_blocks
= data_blocks
;
106 copy_message(__get_dynamic_array(messages
), buffer
, data_blocks
, s
->data_block_quadlets
);
112 __entry
->data_blocks
,
113 __print_array(__get_dynamic_array(messages
), __entry
->data_blocks
, 8)
119 #undef TRACE_INCLUDE_PATH
120 #define TRACE_INCLUDE_PATH .
121 #undef TRACE_INCLUDE_FILE
122 #define TRACE_INCLUDE_FILE amdtp-motu-trace
123 #include <trace/define_trace.h>