Skip to content

Commit

Permalink
ALSA: firewire-lib: fix different data block counter between probed e…
Browse files Browse the repository at this point in the history
…vent and transferred isochronous packet

For IT context, tracepoints event is probed after calculating next data
block counter. This brings difference of data block counter between
the probed event and actual isochronous packet.

This commit fixes it.

Signed-off-by: Takashi Sakamoto <[email protected]>
Signed-off-by: Takashi Iwai <[email protected]>
  • Loading branch information
takaswie authored and tiwai committed Jul 8, 2019
1 parent 4ece7f6 commit 213fa98
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions sound/firewire/amdtp-stream.c
Original file line number Diff line number Diff line change
Expand Up @@ -510,13 +510,13 @@ static void build_it_pkt_header(struct amdtp_stream *s, unsigned int cycle,
cip_header = NULL;
}

trace_amdtp_packet(s, cycle, cip_header, payload_length, data_blocks,
index);

if (!(s->flags & CIP_DBC_IS_END_EVENT)) {
s->data_block_counter =
(s->data_block_counter + data_blocks) & 0xff;
}

trace_amdtp_packet(s, cycle, cip_header, payload_length, data_blocks,
index);
}

static int check_cip_header(struct amdtp_stream *s, const __be32 *buf,
Expand Down

0 comments on commit 213fa98

Please sign in to comment.