diff options
author | Takashi Sakamoto <o-takashi@sakamocchi.jp> | 2019-07-07 08:07:54 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2019-07-08 08:50:37 -0400 |
commit | 7fbf909668d69d7ab4428f6f55cb53fe4451b9b1 (patch) | |
tree | e5e9ec91cc41cc29aee6199bae32f81a2041107b /sound | |
parent | 0ebf3ceb83648f9d149220bf0c6986ddce11361a (diff) |
ALSA: firewire-lib/fireface: fix initial value of data block counter for IR context with CIP_NO_HEADER
For IR context, ALSA IEC 61883-1/6 engine uses initial value of data
block counter as UINT_MAX, to detect first isochronous packet in the
middle of packet streaming.
At present, when CIP_NO_HEADER is used (i.e. for ALSA fireface driver),
the initial value is used for tracepoints event. 0x00 should be
for the event when the initial value is UINT_MAX because isochronous
packets with CIP_NO_HEADER option has no field for data block count.
This commit fixes the bug.
Fixes: 76864868dbab ("ALSA: firewire-lib: cache next data_block_counter after probing tracepoints event for IR context")
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/firewire/amdtp-stream.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sound/firewire/amdtp-stream.c b/sound/firewire/amdtp-stream.c index 427624009de9..b60cf25ee5a8 100644 --- a/sound/firewire/amdtp-stream.c +++ b/sound/firewire/amdtp-stream.c | |||
@@ -646,8 +646,12 @@ static int parse_ir_ctx_header(struct amdtp_stream *s, unsigned int cycle, | |||
646 | err = 0; | 646 | err = 0; |
647 | *data_blocks = *payload_length / sizeof(__be32) / | 647 | *data_blocks = *payload_length / sizeof(__be32) / |
648 | s->data_block_quadlets; | 648 | s->data_block_quadlets; |
649 | *dbc = s->data_block_counter; | ||
650 | *syt = 0; | 649 | *syt = 0; |
650 | |||
651 | if (s->data_block_counter != UINT_MAX) | ||
652 | *dbc = s->data_block_counter; | ||
653 | else | ||
654 | *dbc = 0; | ||
651 | } | 655 | } |
652 | 656 | ||
653 | if (err >= 0 && s->flags & CIP_DBC_IS_END_EVENT) | 657 | if (err >= 0 && s->flags & CIP_DBC_IS_END_EVENT) |