aboutsummaryrefslogtreecommitdiffstats
path: root/sound/firewire/amdtp-stream.c
diff options
context:
space:
mode:
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>2019-05-19 19:01:07 +0900
committerTakashi Iwai <tiwai@suse.de>2019-05-21 07:46:43 +0200
commita8520f3e9314edddf95479c4796f05b7d594be32 (patch)
tree90e779367b1268d820162b975cddc59815ae1dc7 /sound/firewire/amdtp-stream.c
parentALSA: firewire-lib: add data_blocks/data_block_counter parameter to in_packet/out_packet tracing events (diff)
downloadlinux-dev-a8520f3e9314edddf95479c4796f05b7d594be32.tar.xz
linux-dev-a8520f3e9314edddf95479c4796f05b7d594be32.zip
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: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/firewire/amdtp-stream.c')
-rw-r--r--sound/firewire/amdtp-stream.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/sound/firewire/amdtp-stream.c b/sound/firewire/amdtp-stream.c
index 67b60490e505..15ae1f2989e5 100644
--- a/sound/firewire/amdtp-stream.c
+++ b/sound/firewire/amdtp-stream.c
@@ -659,16 +659,14 @@ static int handle_in_packet_without_header(struct amdtp_stream *s,
unsigned int index)
{
__be32 *buffer;
- unsigned int payload_quadlets;
unsigned int data_blocks;
struct snd_pcm_substream *pcm;
unsigned int pcm_frames;
buffer = s->buffer.packets[s->packet_index].buffer;
- payload_quadlets = payload_length / 4;
- data_blocks = payload_quadlets / s->data_block_quadlets;
+ data_blocks = payload_length / sizeof(__be32) / 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);
pcm_frames = s->process_data_blocks(s, buffer, data_blocks, NULL);