summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>2019-05-24 18:03:39 +0900
committerTakashi Iwai <tiwai@suse.de>2019-05-24 11:18:01 +0200
commit3c194923154132836d143d9ba37f5ee94d790c75 (patch)
treeb619bef30ffcd0d353c4ee66cedf55e589e186f7
parentb18f0cfaf16bee36bc4d3cab6771c7d74ed472ac (diff)
downloadlinux-stable-3c194923154132836d143d9ba37f5ee94d790c75.tar.gz
linux-stable-3c194923154132836d143d9ba37f5ee94d790c75.tar.bz2
linux-stable-3c194923154132836d143d9ba37f5ee94d790c75.zip
ALSA: firewire-lib: fix data block counter for incoming packet without CIP header
The value of data block counter is not calculated for incoming packet without CIP header. This commit fixes the bug. Fixes: 947b437e1263 ("ALSA: firewire-lib: unify packet handler for IR context") Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r--sound/firewire/amdtp-stream.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sound/firewire/amdtp-stream.c b/sound/firewire/amdtp-stream.c
index 791efa5585c2..8a7da86650ea 100644
--- a/sound/firewire/amdtp-stream.c
+++ b/sound/firewire/amdtp-stream.c
@@ -674,6 +674,8 @@ static int handle_in_packet(struct amdtp_stream *s, unsigned int cycle,
cip_header = NULL;
data_blocks = payload_length / 4 / s->data_block_quadlets;
syt = 0;
+ s->data_block_counter =
+ (s->data_block_counter + data_blocks) & 0xff;
}
trace_amdtp_packet(s, cycle, cip_header, payload_length, data_blocks,