Commit a8520f3e authored by Takashi Sakamoto's avatar Takashi Sakamoto Committed by Takashi Iwai

ALSA: firewire-lib: use the same unit for payload argument in tracing events

The most of tracing event in this module have the size of payload in
byte unit, however 'in_packet_without_header' event have the argument
in quadlet unit.

This commit change the unit for argument to be consistent.
Signed-off-by: default avatarTakashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 64d0bf4d
...@@ -39,7 +39,7 @@ TRACE_EVENT(in_packet, ...@@ -39,7 +39,7 @@ TRACE_EVENT(in_packet,
__entry->dest = fw_parent_device(s->unit)->card->node_id; __entry->dest = fw_parent_device(s->unit)->card->node_id;
__entry->cip_header0 = be32_to_cpu(cip_header[0]); __entry->cip_header0 = be32_to_cpu(cip_header[0]);
__entry->cip_header1 = be32_to_cpu(cip_header[1]); __entry->cip_header1 = be32_to_cpu(cip_header[1]);
__entry->payload_quadlets = payload_length / 4; __entry->payload_quadlets = payload_length / sizeof(__be32);
__entry->data_blocks = data_blocks; __entry->data_blocks = data_blocks;
__entry->data_block_counter = s->data_block_counter, __entry->data_block_counter = s->data_block_counter,
__entry->packet_index = s->packet_index; __entry->packet_index = s->packet_index;
...@@ -89,7 +89,7 @@ TRACE_EVENT(out_packet, ...@@ -89,7 +89,7 @@ TRACE_EVENT(out_packet,
__entry->dest = fw_parent_device(s->unit)->node_id; __entry->dest = fw_parent_device(s->unit)->node_id;
__entry->cip_header0 = be32_to_cpu(cip_header[0]); __entry->cip_header0 = be32_to_cpu(cip_header[0]);
__entry->cip_header1 = be32_to_cpu(cip_header[1]); __entry->cip_header1 = be32_to_cpu(cip_header[1]);
__entry->payload_quadlets = payload_length / 4; __entry->payload_quadlets = payload_length / sizeof(__be32);
__entry->data_blocks = data_blocks; __entry->data_blocks = data_blocks;
__entry->data_block_counter = s->data_block_counter, __entry->data_block_counter = s->data_block_counter,
__entry->packet_index = s->packet_index; __entry->packet_index = s->packet_index;
...@@ -114,8 +114,8 @@ TRACE_EVENT(out_packet, ...@@ -114,8 +114,8 @@ TRACE_EVENT(out_packet,
); );
TRACE_EVENT(in_packet_without_header, TRACE_EVENT(in_packet_without_header,
TP_PROTO(const struct amdtp_stream *s, u32 cycles, unsigned int payload_quadlets, unsigned int data_blocks, unsigned int index), TP_PROTO(const struct amdtp_stream *s, u32 cycles, unsigned int payload_length, unsigned int data_blocks, unsigned int index),
TP_ARGS(s, cycles, payload_quadlets, data_blocks, index), TP_ARGS(s, cycles, payload_length, data_blocks, index),
TP_STRUCT__entry( TP_STRUCT__entry(
__field(unsigned int, second) __field(unsigned int, second)
__field(unsigned int, cycle) __field(unsigned int, cycle)
...@@ -135,7 +135,7 @@ TRACE_EVENT(in_packet_without_header, ...@@ -135,7 +135,7 @@ TRACE_EVENT(in_packet_without_header,
__entry->channel = s->context->channel; __entry->channel = s->context->channel;
__entry->src = fw_parent_device(s->unit)->node_id; __entry->src = fw_parent_device(s->unit)->node_id;
__entry->dest = fw_parent_device(s->unit)->card->node_id; __entry->dest = fw_parent_device(s->unit)->card->node_id;
__entry->payload_quadlets = payload_quadlets; __entry->payload_quadlets = payload_length / sizeof(__be32);
__entry->data_blocks = data_blocks, __entry->data_blocks = data_blocks,
__entry->data_block_counter = s->data_block_counter, __entry->data_block_counter = s->data_block_counter,
__entry->packet_index = s->packet_index; __entry->packet_index = s->packet_index;
...@@ -179,7 +179,7 @@ TRACE_EVENT(out_packet_without_header, ...@@ -179,7 +179,7 @@ TRACE_EVENT(out_packet_without_header,
__entry->channel = s->context->channel; __entry->channel = s->context->channel;
__entry->src = fw_parent_device(s->unit)->card->node_id; __entry->src = fw_parent_device(s->unit)->card->node_id;
__entry->dest = fw_parent_device(s->unit)->node_id; __entry->dest = fw_parent_device(s->unit)->node_id;
__entry->payload_quadlets = payload_length / 4; __entry->payload_quadlets = payload_length / sizeof(__be32);
__entry->data_blocks = data_blocks, __entry->data_blocks = data_blocks,
__entry->data_block_counter = s->data_block_counter, __entry->data_block_counter = s->data_block_counter,
__entry->packet_index = s->packet_index; __entry->packet_index = s->packet_index;
......
...@@ -659,16 +659,14 @@ static int handle_in_packet_without_header(struct amdtp_stream *s, ...@@ -659,16 +659,14 @@ static int handle_in_packet_without_header(struct amdtp_stream *s,
unsigned int index) unsigned int index)
{ {
__be32 *buffer; __be32 *buffer;
unsigned int payload_quadlets;
unsigned int data_blocks; unsigned int data_blocks;
struct snd_pcm_substream *pcm; struct snd_pcm_substream *pcm;
unsigned int pcm_frames; unsigned int pcm_frames;
buffer = s->buffer.packets[s->packet_index].buffer; buffer = s->buffer.packets[s->packet_index].buffer;
payload_quadlets = payload_length / 4; data_blocks = payload_length / sizeof(__be32) / s->data_block_quadlets;
data_blocks = payload_quadlets / s->data_block_quadlets;
trace_in_packet_without_header(s, cycle, payload_quadlets, data_blocks, trace_in_packet_without_header(s, cycle, payload_length, data_blocks,
index); index);
pcm_frames = s->process_data_blocks(s, buffer, data_blocks, NULL); pcm_frames = s->process_data_blocks(s, buffer, data_blocks, NULL);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment