diff options
Diffstat (limited to 'sound/firewire/amdtp.c')
-rw-r--r-- | sound/firewire/amdtp.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/sound/firewire/amdtp.c b/sound/firewire/amdtp.c index 28ee3d86164d..690c60828872 100644 --- a/sound/firewire/amdtp.c +++ b/sound/firewire/amdtp.c | |||
@@ -665,7 +665,8 @@ static void handle_in_packet(struct amdtp_stream *s, | |||
665 | 665 | ||
666 | /* Check data block counter continuity */ | 666 | /* Check data block counter continuity */ |
667 | data_block_counter = cip_header[0] & AMDTP_DBC_MASK; | 667 | data_block_counter = cip_header[0] & AMDTP_DBC_MASK; |
668 | if ((s->flags & CIP_SKIP_DBC_ZERO_CHECK) && data_block_counter == 0) { | 668 | if (((s->flags & CIP_SKIP_DBC_ZERO_CHECK) && data_block_counter == 0) || |
669 | (s->data_block_counter == UINT_MAX)) { | ||
669 | lost = false; | 670 | lost = false; |
670 | } else if (!(s->flags & CIP_DBC_IS_END_EVENT)) { | 671 | } else if (!(s->flags & CIP_DBC_IS_END_EVENT)) { |
671 | lost = data_block_counter != s->data_block_counter; | 672 | lost = data_block_counter != s->data_block_counter; |
@@ -850,7 +851,11 @@ int amdtp_stream_start(struct amdtp_stream *s, int channel, int speed) | |||
850 | goto err_unlock; | 851 | goto err_unlock; |
851 | } | 852 | } |
852 | 853 | ||
853 | s->data_block_counter = 0; | 854 | if (s->direction == AMDTP_IN_STREAM && |
855 | s->flags & CIP_SKIP_INIT_DBC_CHECK) | ||
856 | s->data_block_counter = UINT_MAX; | ||
857 | else | ||
858 | s->data_block_counter = 0; | ||
854 | s->data_block_state = initial_state[s->sfc].data_block; | 859 | s->data_block_state = initial_state[s->sfc].data_block; |
855 | s->syt_offset_state = initial_state[s->sfc].syt_offset; | 860 | s->syt_offset_state = initial_state[s->sfc].syt_offset; |
856 | s->last_syt_offset = TICKS_PER_CYCLE; | 861 | s->last_syt_offset = TICKS_PER_CYCLE; |