diff options
author | Takashi Sakamoto <o-takashi@sakamocchi.jp> | 2023-01-10 00:32:31 +0300 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2023-01-10 11:34:47 +0300 |
commit | fef4e61b0b765b6d22badcd5b6575b159e7d510a (patch) | |
tree | 69f705ed09726ce2d0630184b949dd75d30fa3e8 /sound/firewire/amdtp-stream-trace.h | |
parent | f0117128879be643947411e4794550ce015d7c94 (diff) | |
download | linux-fef4e61b0b765b6d22badcd5b6575b159e7d510a.tar.xz |
ALSA: firewire-lib: extend tracepoints event including CYCLE_TIME of 1394 OHCI
A commit baa914cd81f5 ("firewire: add kernel API to access CYCLE_TIME
register") allow unit drivers to read CYCLE_TIME of 1394 OHCI controller.
The value expresses monotonic time with 42.195 Mhz resolution and wrapping
around every 128 seconds. The controller uses the time to govern
isochronous cycle.
This commit extends tracepoints event including the value so that event
parser can compute gap between current isochronous cycle and the latest
isochronous cycle in which packet is processed (in IR context) or scheduled
(in IT context). It loses backward compatibility to former format of the
tracepoints event.
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Link: https://lore.kernel.org/r/20230109213231.138223-1-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/firewire/amdtp-stream-trace.h')
-rw-r--r-- | sound/firewire/amdtp-stream-trace.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/sound/firewire/amdtp-stream-trace.h b/sound/firewire/amdtp-stream-trace.h index 5fd2aeccdfc2..208f97cf8de6 100644 --- a/sound/firewire/amdtp-stream-trace.h +++ b/sound/firewire/amdtp-stream-trace.h @@ -14,9 +14,10 @@ #include <linux/tracepoint.h> TRACE_EVENT(amdtp_packet, - TP_PROTO(const struct amdtp_stream *s, u32 cycles, const __be32 *cip_header, unsigned int payload_length, unsigned int data_blocks, unsigned int data_block_counter, unsigned int packet_index, unsigned int index), - TP_ARGS(s, cycles, cip_header, payload_length, data_blocks, data_block_counter, packet_index, index), + TP_PROTO(const struct amdtp_stream *s, u32 cycles, const __be32 *cip_header, unsigned int payload_length, unsigned int data_blocks, unsigned int data_block_counter, unsigned int packet_index, unsigned int index, u32 curr_cycle_time), + TP_ARGS(s, cycles, cip_header, payload_length, data_blocks, data_block_counter, packet_index, index, curr_cycle_time), TP_STRUCT__entry( + __field(unsigned int, cycle_time) __field(unsigned int, second) __field(unsigned int, cycle) __field(int, channel) @@ -31,6 +32,7 @@ TRACE_EVENT(amdtp_packet, __field(unsigned int, index) ), TP_fast_assign( + __entry->cycle_time = curr_cycle_time; __entry->second = cycles / CYCLES_PER_SECOND; __entry->cycle = cycles % CYCLES_PER_SECOND; __entry->channel = s->context->channel; @@ -53,7 +55,8 @@ TRACE_EVENT(amdtp_packet, __entry->index = index; ), TP_printk( - "%02u %04u %04x %04x %02d %03u %02u %03u %02u %01u %02u %s", + "%08x %02u %04u %04x %04x %02d %03u %02u %03u %02u %01u %02u %s", + __entry->cycle_time, __entry->second, __entry->cycle, __entry->src, |